-
Notifications
You must be signed in to change notification settings - Fork 520
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Assertion Fail DUK_HOBJECT_E_GET_KEY(thr->heap, obj, i) != key in duk_hobject_props.c #2315
Comments
I'd be very interested, it would be great to have some automatic fuzzing in the CI runs 👍 In case it matters, I'm fine with being able to run the fuzzing with Docker, which might simplify cleaning up the setup. |
The assert is triggered because property write code is trying to add a certain key as a new property table entry when the key already exists (which is obviously not supposed to happen). The offending key seems to be |
What I have currently is thrown together on top of both Fuzzilli and Duktape, and breaks standard usage of both. Cleaning it up should be straightforward, to where it's a new profile in Fuzzilli, and an additional make target in Duktape. FYI, the two bugs here, and the two I emailed separately were found with 7 cores over 3 days, to give a sense of scale. I'll make an issue to track, and get a couple design decisions from you, as well as make an issue to add the profile to Fuzzilli. |
Ok, sounds good!
Good to know - the best solution is probably then to have the setup easily executable from this repo so that anyone can run it if they wish. I can then run it offline with master, and before releases. |
Ok, I think I figured this out. When the enum code sorts an internal temporary object's keys, it's missing a rehash so the hash part becomes invalid. This matters if the enumeration involves inherited duplicate keys. I'll merge the fix tomorrow. |
I found this using Fuzzilli, a Javascript engine fuzzer that I patched duktape to run on. I can share the setup if you're interested (requires code cleanup on my end, and a patch to Fuzzilli).
Compilation Target: dukd in v2-maintenance branch, commit 468c7b4
Source:
Backtrace with -fsanitize=undefined and debug assertions enabled
The text was updated successfully, but these errors were encountered: