Summary: | [WPE][GTK] TestJSC incorrectly expects garbage collector to collect variables still on the stack | ||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|
Product: | WebKit | Reporter: | Michael Catanzaro <mcatanzaro> | ||||||||
Component: | JavaScriptCore | Assignee: | Nobody <webkit-unassigned> | ||||||||
Status: | RESOLVED FIXED | ||||||||||
Severity: | Normal | CC: | bugs-noreply, cgarcia, clopez, ews-watchlist, keith_miller, mark.lam, mcatanzaro, msaboff, saam, tzagallo, webkit-bug-importer | ||||||||
Priority: | P2 | Keywords: | InRadar | ||||||||
Version: | WebKit Nightly Build | ||||||||||
Hardware: | PC | ||||||||||
OS: | Linux | ||||||||||
See Also: |
https://bugs.webkit.org/show_bug.cgi?id=181916 https://bugs.webkit.org/show_bug.cgi?id=229321 |
||||||||||
Bug Depends on: | |||||||||||
Bug Blocks: | 181916 | ||||||||||
Attachments: |
|
Description
Michael Catanzaro
2021-03-09 06:28:05 PST
Created attachment 422692 [details] My test patch from bug #181916 I'm going to break this test and mark it as flaky in bug #181916. When fixed, we need to update Tools/TestWebKitAPI/glib/TestExpectations.json. Created attachment 422753 [details]
Yucky test patch that fixes this test
Comment on attachment 422753 [details] Yucky test patch that fixes this test View in context: https://bugs.webkit.org/attachment.cgi?id=422753&action=review > a/Tools/TestWebKitAPI/Tests/JavaScriptCore/glib/TestJSC.cpp:114 > + JSContextGroupRef jsContextGroup = jscVirtualMachineGetContextGroup(jscVM); BTW this is probably leaked. Not sure how refcounting works with the C API. Comment on attachment 422753 [details] Yucky test patch that fixes this test View in context: https://bugs.webkit.org/attachment.cgi?id=422753&action=review > a/Tools/TestWebKitAPI/Tests/JavaScriptCore/glib/TestJSC.cpp:118 > +static void jscContextSanitizeStack(JSCContext* context) > +{ > + JSCVirtualMachine* jscVM = jsc_context_get_virtual_machine(context); > + JSContextGroupRef jsContextGroup = jscVirtualMachineGetContextGroup(jscVM); > + JSC::VM& vm = *toJS(jsContextGroup); > + JSC::JSLockHolder locker(vm); > + sanitizeStackForVM(vm); > +} I think we could add JSCContextInternal.h with jscContextGarbageCollect() and jscContextSanitizeStack() implemented in JSCContext.cpp. That way we only need to include the internal header from the tests and not use the C API nor internal API from tests This seems related to bug 229321 It seems calling sanitizeStackForVM is enough to make the test pass with hidden symbols, no need to move code to a function. Created attachment 440206 [details]
Patch
Committed r283606 (242558@main): <https://commits.webkit.org/242558@main> |