Assertion failure: !values_.has(def) (Discarding a definition still in the set) in js/src/jit/ValueNumbering.cpp
Categories
(Core :: JavaScript: WebAssembly, defect, P1)
Tracking
()
| Tracking | Status | |
|---|---|---|
| firefox-esr115 | --- | unaffected |
| firefox-esr128 | --- | unaffected |
| firefox139 | --- | unaffected |
| firefox140 | --- | fixed |
| firefox141 | --- | fixed |
People
(Reporter: sakura, Assigned: bvisness)
References
(Blocks 1 open bug, Regression)
Details
(4 keywords, Whiteboard: [client-bounty-form][leave closed until 1970713 is open])
Attachments
(1 file, 3 external files)
|
2.28 KB,
text/javascript
|
Details |
Reproduce
- Clone the Firefox mirror from https://github.com/mozilla/gecko-dev
- Run build command:
mkdir fuzzbuild_OPT.OBJ && cd fuzzbuild_OPT.OBJ && ../configure --enable-address-sanitizer --disable-jemalloc --enable-debug --enable-optimize --disable-shared-js --enable-application=js --enable-gczeal && make -j64in the js/src directory of the firefox checkout - Run poc:
fuzzbuild_OPT.OBJ/dist/bin/js poc.js
- my test spidermonkey commit hash
commit bd57b566959758d0455c6e37afca00648c8e4ff0 (HEAD -> master, origin/master, origin/HEAD)
Author: Michael Froman <mfroman@mozilla.com>
Date: Fri May 16 14:05:49 2025 -0500
Bug 1963852 - Vendor libwebrtc from 2c8f5be692
Upstream commit: https://webrtc.googlesource.com/src/+/2c8f5be6924d507ee74191b1aeadcec07f747f21
Publish guidelines for organizational contributions to WebRTC
Bug: None
Change-Id: Ie17600e64fb5054ed3baa0f424bdd3adfa728c37
Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/370440
Commit-Queue: Harald Alvestrand <hta@webrtc.org>
Reviewed-by: Fredrik Solenberg <solenberg@webrtc.org>
Cr-Commit-Position: refs/heads/main@{#44272}
Bisect
Debug Log
[1571101] Assertion failure: !values_.has(def) (Discarding a definition still in the set), at gecko-dev/js/src/jit/ValueNumbering.cpp:326
#01: ???[/home/sakura/gecko-dev/js/src/fuzzbuild_OPT.OBJ/dist/bin/js +0x528fcb2]
#02: ???[/home/sakura/gecko-dev/js/src/fuzzbuild_OPT.OBJ/dist/bin/js +0x528f34b]
#03: ???[/home/sakura/gecko-dev/js/src/fuzzbuild_OPT.OBJ/dist/bin/js +0x5298054]
#04: ???[/home/sakura/gecko-dev/js/src/fuzzbuild_OPT.OBJ/dist/bin/js +0x529873c]
#05: ???[/home/sakura/gecko-dev/js/src/fuzzbuild_OPT.OBJ/dist/bin/js +0x529945c]
#06: ???[/home/sakura/gecko-dev/js/src/fuzzbuild_OPT.OBJ/dist/bin/js +0x529cbd1]
#07: ???[/home/sakura/gecko-dev/js/src/fuzzbuild_OPT.OBJ/dist/bin/js +0x5c07fcc]
#08: ???[/home/sakura/gecko-dev/js/src/fuzzbuild_OPT.OBJ/dist/bin/js +0x63a8a87]
#09: ???[/home/sakura/gecko-dev/js/src/fuzzbuild_OPT.OBJ/dist/bin/js +0x6334399]
#10: ???[/home/sakura/gecko-dev/js/src/fuzzbuild_OPT.OBJ/dist/bin/js +0x6339d9d]
#11: ???[/home/sakura/gecko-dev/js/src/fuzzbuild_OPT.OBJ/dist/bin/js +0x62a7704]
#12: ???[/home/sakura/gecko-dev/js/src/fuzzbuild_OPT.OBJ/dist/bin/js +0x62d41dc]
#13: ???[/home/sakura/gecko-dev/js/src/fuzzbuild_OPT.OBJ/dist/bin/js +0x3427378]
#14: ???[/home/sakura/gecko-dev/js/src/fuzzbuild_OPT.OBJ/dist/bin/js +0x342708d]
#15: ???[/home/sakura/gecko-dev/js/src/fuzzbuild_OPT.OBJ/dist/bin/js +0x34a294b]
#16: ???[/home/sakura/gecko-dev/js/src/fuzzbuild_OPT.OBJ/dist/bin/js +0x34a20bb]
#17: ???[/home/sakura/gecko-dev/js/src/fuzzbuild_OPT.OBJ/dist/bin/js +0x34d391b]
#18: ???[/home/sakura/gecko-dev/js/src/fuzzbuild_OPT.OBJ/dist/bin/js +0x2d48e67]
#19: ???[/lib/x86_64-linux-gnu/libc.so.6 +0x94ac3]
#20: ???[/lib/x86_64-linux-gnu/libc.so.6 +0x126a40]
#21: ??? (???:???)
| Reporter | ||
Comment 1•1 year ago
|
||
Updated•1 year ago
|
| Comment hidden (obsolete) |
Updated•1 year ago
|
Comment 3•1 year ago
|
||
Bug 1968410 from that regression range looks WASM related.
| Assignee | ||
Comment 4•1 year ago
|
||
Using the wasm ref type in a congruentTo check is not safe because the
ref type can change during optimization, specifically now that we take
the LUB when replacing nodes in GVN. Using the ref type hierarchy (if
available) is a stable check.
Updated•1 year ago
|
| Assignee | ||
Comment 5•1 year ago
|
||
This seems to be occurring because a congruentTo check on two null constants is sometimes returning false and sometimes returning true, depending on how we've changed the ref type of the node. We should no longer use wasmRefType() in congruentTo checks because of this. (I already removed the only other such case in bug 1968410.)
Pernosco with notes: https://pernos.co/debug/DDgAlZ2jUVCwhjH6eirPeQ/index.html#f{m[BGI,AQvAgQ_,t[Aw,kyU_,f{e[BGI,AQvAew_,s{aV7u8QLAA,bBQ,uBQDdSA,oBQwY3w___/
| Comment hidden (obsolete) |
| Comment hidden (obsolete) |
| Comment hidden (obsolete) |
Comment 9•1 year ago
|
||
Thanks for taking a look. Do you think this is exploitable?
Updated•1 year ago
|
| Assignee | ||
Comment 11•1 year ago
|
||
From discussion with others on the team more familiar with GVN, we feel like it's likely unexploitable but hard to say for sure since it causes some incorrect behavior in the GVN pass itself. Should be fine at sec-moderate.
This and bug 1970713 will need to be uplifted if bug 1968410 is uplifted. I will confer with the team and decide how to proceed.
Updated•1 year ago
|
Updated•1 year ago
|
| Assignee | ||
Comment 13•1 year ago
|
||
Updated•1 year ago
|
Comment 14•1 year ago
|
||
| Assignee | ||
Comment 15•1 year ago
|
||
Using the wasm ref type in a congruentTo check is not safe because the
ref type can change during optimization, specifically now that we take
the LUB when replacing nodes in GVN. Using the ref type hierarchy (if
available) is a stable check.
Original Revision: https://phabricator.services.mozilla.com/D252733
Updated•1 year ago
|
Comment 16•1 year ago
|
||
firefox-beta Uplift Approval Request
- User impact if declined: Incorrect codegen in some cases, which we believe to not be exploitable. Caused by the patch from bug 1968410, which has also been requested for uplift; if that one is uplifted, this one should be as well.
- Code covered by automated testing: no
- Fix verified in Nightly: yes
- Needs manual QE test: no
- Steps to reproduce for manual QE testing: n/a
- Risk associated with taking this patch: Low
- Explanation of risk level: This reverts to previously-existing logic that had held up under testing. (A recent patch invalidated the old implementation of this logic.)
- String changes made/needed: n/a
- Is Android affected?: yes
Comment 17•1 year ago
|
||
Updated•1 year ago
|
Updated•1 year ago
|
Comment 18•1 year ago
|
||
| uplift | ||
Updated•1 year ago
|
Updated•1 year ago
|
Comment 19•1 year ago
|
||
Bounty split with bug 1970563
Updated•11 months ago
|
Comment 20•10 months ago
|
||
Comment 21•10 months ago
|
||
Comment 22•10 months ago
|
||
Comment 23•10 months ago
|
||
Comment 24•10 months ago
|
||
| bugherder | ||
| Assignee | ||
Updated•10 months ago
|
Description
•