v4: assert when an unsupported double value is stored in a value
authorFawzi Mohamed <fawzi.mohamed@digia.com>
Tue, 29 Apr 2014 10:13:08 +0000 (12:13 +0200)
committerThe Qt Project <gerrit-noreply@qt-project.org>
Wed, 30 Apr 2014 16:23:48 +0000 (18:23 +0200)
commitd59c6238abffb5a53342e4e4a23f122b135812e3
treee5356d6d308422c6fd886da731d627e913446d74
parent6f8f73e74f85ae189f3fdb8619e88fe266204e87
v4: assert when an unsupported double value is stored in a value

we assume that just few NaN values can be generated by the HW
(currently 0x7ff800..00 and 0x7ffc00..00), and we use the other values
to encode js values.
If uninitialized memory is interpreted as double or another NaN is
explicitly constructed and feed to the interpreter, it might crash
(later when actually accessing that value).
Adding an assertion to catch those values when assertions are active
for the 32 bit encoding (64 bit already has it).

Task-number: QTBUG-36859
Change-Id: I7ac7b2619f286ba19066729836af718014a515a6
Reviewed-by: Johannes Matokic <johannes.matokic@microchip.com>
Reviewed-by: Simon Hausmann <simon.hausmann@digia.com>
Reviewed-by: Lars Knoll <lars.knoll@digia.com>
src/qml/jsruntime/qv4value_p.h