Closed
Bug 1524943
Opened 7 years ago
Closed 7 years ago
Crash [@ js::IsPackedArray] or Assertion failure: args[0].isObject(), at vm/SelfHosting.cpp:783
Categories
(Core :: JavaScript Engine, defect)
Tracking
()
VERIFIED
FIXED
mozilla67
| Tracking | Status | |
|---|---|---|
| firefox-esr60 | --- | unaffected |
| firefox65 | --- | unaffected |
| firefox66 | --- | unaffected |
| firefox67 | + | verified |
People
(Reporter: decoder, Assigned: anba)
References
Details
(5 keywords, Whiteboard: [jsbugmon:update])
Crash Data
Attachments
(1 file)
|
1.72 KB,
patch
|
jandem
:
review+
|
Details | Diff | Splinter Review |
The following testcase crashes on mozilla-central revision 1b713c9f40d5 (build with --enable-posix-nspr-emulation --enable-valgrind --enable-gczeal --disable-tests --disable-profiling --disable-debug --enable-optimize, run with --fuzzing-safe --cpu-count=2 --ion-offthread-compile=off):
function toU8(array) {
return Uint8Array.from(array);
}
Object.prototype[Symbol.iterator] = Array.prototype[Symbol.iterator];
var arrObj = [];
toU8(arrObj.length);
Backtrace:
received signal SIGSEGV, Segmentation fault.
js::IsPackedArray (obj=0x6800000000000) at js/src/vm/NativeObject-inl.h:935
#0 js::IsPackedArray (obj=0x6800000000000) at js/src/vm/NativeObject-inl.h:935
#1 intrinsic_IsPackedArray (cx=0x7ffff5f16000, argc=1, vp=0x7ffff5afc288) at js/src/vm/SelfHosting.cpp:784
#2 0x0000555555899fdd in CallJSNative (args=..., native=0x555555a6fc40 <intrinsic_IsPackedArray(JSContext*, unsigned int, JS::Value*)>, cx=0x7ffff5f16000) at js/src/vm/Interpreter.cpp:441
#3 js::InternalCallOrConstruct (cx=0x7ffff5f16000, args=..., construct=<optimized out>) at js/src/vm/Interpreter.cpp:533
#4 0x000055555588e4e5 in js::CallFromStack (args=..., cx=<optimized out>) at js/src/vm/Interpreter.cpp:592
#5 Interpret (cx=0x7ffff5f16000, state=...) at js/src/vm/Interpreter.cpp:3068
#6 0x00005555558999e3 in js::RunScript (cx=0x7ffff5f16000, state=...) at js/src/vm/Interpreter.cpp:421
[...]
#15 main (argc=<optimized out>, argv=<optimized out>, envp=<optimized out>) at js/src/shell/js.cpp:11209
rax 0x5555574acb60 93825025100640
rbx 0x6800000000000 1829587348619264
rcx 0x2 2
rdx 0x7ffff5afc288 140737315324552
rsi 0x1 1
rdi 0x7ffff5f16000 140737319624704
rbp 0x7fffffffccb0 140737488342192
rsp 0x7fffffffcaa0 140737488341664
r8 0xfffdffffffffffff -562949953421313
r9 0xfffe000000000000 -562949953421312
r10 0x7ffff5afc298 140737315324568
r11 0xfffb000000000000 -1407374883553280
r12 0x7fffffffcb10 140737488341776
r13 0x555555a6fc40 93824997588032
r14 0x7ffff5af7c00 140737315306496
r15 0x7fffffffccb0 140737488342192
rip 0x555555a6fc6a <intrinsic_IsPackedArray(JSContext*, unsigned int, JS::Value*)+42>
=> 0x555555a6fc6a <intrinsic_IsPackedArray(JSContext*, unsigned int, JS::Value*)+42>: mov (%rbx),%rdi
0x555555a6fc6d <intrinsic_IsPackedArray(JSContext*, unsigned int, JS::Value*)+45>: cmp %rax,(%rdi)
This looks like a non-object value flowing into self-hosted code that expects an object. These types of bugs can be critical, hence s-s.
Comment 1•7 years ago
|
||
André, this might be from your TypedArray work :)
Flags: needinfo?(andrebargull)
| Assignee | ||
Comment 2•7 years ago
|
||
Yup, there's simple a missing IsObject(source) check before calling IsPackedArray(source) in TypedArrayStaticFrom.
Assignee: nobody → andrebargull
Status: NEW → ASSIGNED
Flags: needinfo?(andrebargull)
Updated•7 years ago
|
Whiteboard: [jsbugmon:update,bisect] → [jsbugmon:update]
Comment 3•7 years ago
|
||
JSBugMon: Bisection requested, result:
autoBisect shows this is probably related to the following changeset:
The first bad revision is:
changeset: https://hg.mozilla.org/mozilla-central/rev/d58a5867916b
user: André Bargull
date: Thu Jan 31 10:36:27 2019 -0800
summary: Bug 1522157 - Part 1: Add fast path when TypedArray.from is called with packed arrays. r=jandem
This iteration took 542.616 seconds to run.
Updated•7 years ago
|
Blocks: 1522157
status-firefox65:
--- → unaffected
status-firefox66:
--- → unaffected
status-firefox-esr60:
--- → unaffected
| Assignee | ||
Comment 4•7 years ago
|
||
I've added the IsObject call to the outer if-statement, because for bug 1491813 we'll also need to check for objects first before calling IsTypedArray.
Attachment #9041434 -
Flags: review?(jdemooij)
Updated•7 years ago
|
Attachment #9041434 -
Flags: review?(jdemooij) → review+
| Assignee | ||
Updated•7 years ago
|
Keywords: checkin-needed
Comment 5•7 years ago
|
||
Comment 6•7 years ago
|
||
Group: javascript-core-security → core-security-release
Status: ASSIGNED → RESOLVED
Closed: 7 years ago
Resolution: --- → FIXED
Target Milestone: --- → mozilla67
Updated•7 years ago
|
Status: RESOLVED → VERIFIED
Comment 7•7 years ago
|
||
JSBugMon: This bug has been automatically verified fixed.
Updated•5 years ago
|
Group: core-security-release
You need to log in
before you can comment on or make changes to this bug.
Description
•