Details
-
Bug
-
Resolution: Done
-
P1: Critical
-
5.2.1
-
None
-
Windows 7 x64, Mingw32
Description
Summary:
JavaScript interpreter crashes if Array#sort arguments are re-used as variables.
e.g.
arr.sort(function(a, b) {
a = transform(a);
b = transform(b);
return a == b ? 0 : a > b ? 1 : -1;
});
Expected result:
Array is sorted successfully
Actual result:
Qt application crashes with SEGFAULT and message:
file:///.../main.qml:23: TypeError: Cannot read property 'val' of null
Full code to reproduce this bug attached as main.qml.
Attachments
Issue Links
- replaces
-
QTBUG-40280 V4 sometimes gives back a reference to a memory location that does not below to the array anymore
- Closed