NEW 221304
Null Ptr Deref @ libWebCoreTestSupport.dylib: WebCoreTestSupport::resetInternalsObject
https://bugs.webkit.org/show_bug.cgi?id=221304
Summary Null Ptr Deref @ libWebCoreTestSupport.dylib: WebCoreTestSupport::resetIntern...
Jonathan Bedard
Reported 2021-02-02 15:52:29 PST
A buzzer caught this when using our test harness a few months back, not an urgent change, but the fix is trivial.
Attachments
Patch (1.63 KB, patch)
2021-02-02 15:54 PST, Jonathan Bedard
ap: review-
Patch (1.62 KB, patch)
2021-02-03 12:08 PST, Jonathan Bedard
no flags
Jonathan Bedard
Comment 1 2021-02-02 15:53:04 PST
Jonathan Bedard
Comment 2 2021-02-02 15:54:32 PST
Jonathan Bedard
Comment 3 2021-02-02 15:55:16 PST
(In reply to Jonathan Bedard from comment #0) > A buzzer caught this when using our test harness a few months back, not an > urgent change, but the fix is trivial. *fuzzer, not buzzer
Alexey Proskuryakov
Comment 4 2021-02-02 17:20:25 PST
Comment on attachment 419076 [details] Patch View in context: https://bugs.webkit.org/attachment.cgi?id=419076&action=review > Source/WebCore/testing/js/WebCoreTestSupport.cpp:84 > + if (!scriptContext) > + return; When can this happen? This function should always run, and if we return early, the next test will misbehave because we didn't reset the settings. I think that adding an early return is not OK, and we need to actually make sure that we cannot get here.
Jonathan Bedard
Comment 5 2021-02-02 20:55:01 PST
Comment on attachment 419076 [details] Patch View in context: https://bugs.webkit.org/attachment.cgi?id=419076&action=review >> Source/WebCore/testing/js/WebCoreTestSupport.cpp:84 >> + return; > > When can this happen? This function should always run, and if we return early, the next test will misbehave because we didn't reset the settings. I think that adding an early return is not OK, and we need to actually make sure that we cannot get here. This was reported when using one of our test runners to fuzz WebKit. It doesn't seem like the scriptContext or the page should ever be null, and if this were production code, I would agree that these should just be assertions. But it does seem more helpful for fuzzers if the crashes from unexpected behavior occur in production code rather than testing code, even at the cost of putting the test harness in a bad state.
Alexey Proskuryakov
Comment 6 2021-02-02 22:16:35 PST
Seeing the original bug, I do not believe that it's more important than messing up regression tests.
Jonathan Bedard
Comment 7 2021-02-03 12:08:16 PST
Alexey Proskuryakov
Comment 8 2021-02-03 12:11:14 PST
Comment on attachment 419076 [details] Patch I'll say r- based on the previous conversation. I think that we need to get to the bottom of this, as silencing the crash with a null check will be more costly in terms of manual work analyzing failures than hitting crashes is.
Note You need to log in before you can comment on or make changes to this bug.