Bug 230207

Summary: StackTrace outputs a garbage prefix because WTF::StackTrace::m_prefix is filled with the stack content
Product: WebKit Reporter: Fujii Hironori <Hironori.Fujii>
Component: Web Template FrameworkAssignee: Fujii Hironori <Hironori.Fujii>
Status: RESOLVED FIXED    
Severity: Normal CC: benjamin, cdumez, cmarcelo, ews-watchlist, hi, mark.lam, webkit-bug-importer, ysuzuki
Priority: P2 Keywords: InRadar
Version: WebKit Nightly Build   
Hardware: Unspecified   
OS: Unspecified   
See Also: https://bugs.webkit.org/show_bug.cgi?id=230208
Bug Depends on: 226390    
Bug Blocks:    
Attachments:
Description Flags
Patch
ews-feeder: commit-queue-
Patch
none
Patch none

Description Fujii Hironori 2021-09-12 21:15:01 PDT
StackTrace outputs a garbage prefix because WTF::StackTrace::m_prefix is filled with the stack content

r278474 (Bug 226390) added a new member m_prefix to StackTrace at the bottom of the structure.
However, StackTrace isn't a normal structure. the members are filled with the stack content.
Comment 1 Fujii Hironori 2021-09-12 21:17:20 PDT
In WinCairo, it outputs the garbage prefix like the following:

PS C:\home\webkit\gc> .\WebKitBuild\Debug\bin64\WebKitTestRunner.exe LayoutTests/js/dom/transform-stream.html
ERROR: 000001F52DC4CE10 - ResourceLoadStatisticsDatabaseStore::turnOnIncrementalAutoVacuum failed, error message: not an error
C:\home\webkit\gc\Source\WebKit\NetworkProcess/Classifier/ResourceLoadStatisticsDatabaseStore.cpp(315) : WebKit::ResourceLoadStatisticsDatabaseStore::ResourceLoadStatisticsDatabaseStore
ERROR: Unchecked JS exception:
    This scope can throw a JS exception: JSC::JSObject::get @ C:\home\webkit\gc\WebKitBuild\Debug\JavaScriptCore\PrivateHeaders\JavaScriptCore\JSObject.h:1504
        (ExceptionScope::m_recursionDepth was 13)
    But the exception was unchecked as of this scope: WebCore::invokeWritableStreamFunction @ C:\home\webkit\gc\Source\WebCore\bindings/js/InternalWritableStream.cpp:42
        (ExceptionScope::m_recursionDepth was 13)

Unchecked exception detected at:
H<D$pHĀX_^AIIIIIIIIIIIIIIIIH%LWHēPH<D$`H<    1   00007FFC1110464F JSC::VM::verifyExceptionCheckNeedIsSatisfied
H<D$pHĀX_^AIIIIIIIIIIIIIIIIH%LWHēPH<D$`H<    2   00007FFC110D8924 JSC::ThrowScope::ThrowScope
H<D$pHĀX_^AIIIIIIIIIIIIIIIIH%LWHēPH<D$`H<    3   00007FFBEE14D4EB WebCore::invokeWritableStreamFunction
H<D$pHĀX_^AIIIIIIIIIIIIIIIIH%LWHēPH<D$`H<    4   00007FFBEE14C6E1 WebCore::InternalWritableStream::create
H<D$pHĀX_^AIIIIIIIIIIIIIIIIH%LWHēPH<D$`H<    5   00007FFBEDF0733C WebCore::WritableStream::create
H<D$pHĀX_^AIIIIIIIIIIIIIIIIH%LWHēPH<D$`H<    6   00007FFBEDF07207 WebCore::WritableStream::create
H<D$pHĀX_^AIIIIIIIIIIIIIIIIH%LWHēPH<D$`H<    7   00007FFBEDAF98B6 WebCore::JSDOMConstructor<WebCore::JSWritableStream>::construct
H<D$pHĀX_^AIIIIIIIIIIIIIIIIH%LWHēPH<D$`H<    8   00007FFC108BBB6F JSC::NativeFunction::operator()
H<D$pHĀX_^AIIIIIIIIIIIIIIIIH%LWHēPH<D$`H<    9   00007FFC108BBBBC JSC::TaggedNativeFunction::operator()
H<D$pHĀX_^AIIIIIIIIIIIIIIIIH%LWHēPH<D$`H<    10  00007FFC1095567B JSC::LLInt::handleHostCall
H<D$pHĀX_^AIIIIIIIIIIIIIIIIH%LWHēPH<D$`H<    11  00007FFC1096BC4A JSC::LLInt::setUpCall
H<D$pHĀX_^AIIIIIIIIIIIIIIIIH%LWHēPH<D$`H<    12  00007FFC109616D6 JSC::LLInt::genericCall<JSC::OpConstruct>
H<D$pHĀX_^AIIIIIIIIIIIIIIIIH%LWHēPH<D$`H<    13  00007FFC1094DBAF llint_slow_path_construct
H<D$pHĀX_^AIIIIIIIIIIIIIIIIH%LWHēPH<D$`H<    14  00007FFC0F88C4C6 llint_entry

ASSERTION FAILED: !m_needExceptionCheck
C:\home\webkit\gc\Source\JavaScriptCore\runtime/VM.cpp(1490) : JSC::VM::verifyExceptionCheckNeedIsSatisfied
1   00007FFC3CCA1DEB WTFCrash
2   00007FFC0F88FFBE WTFCrashWithInfo
3   00007FFC11104790 JSC::VM::verifyExceptionCheckNeedIsSatisfied
4   00007FFC110D8924 JSC::ThrowScope::ThrowScope
5   00007FFBEE14D4EB WebCore::invokeWritableStreamFunction
6   00007FFBEE14C6E1 WebCore::InternalWritableStream::create
7   00007FFBEDF0733C WebCore::WritableStream::create
8   00007FFBEDF07207 WebCore::WritableStream::create
9   00007FFBEDAF98B6 WebCore::JSDOMConstructor<WebCore::JSWritableStream>::construct
10  00007FFC108BBB6F JSC::NativeFunction::operator()
11  00007FFC108BBBBC JSC::TaggedNativeFunction::operator()
12  00007FFC1095567B JSC::LLInt::handleHostCall
13  00007FFC1096BC4A JSC::LLInt::setUpCall
14  00007FFC109616D6 JSC::LLInt::genericCall<JSC::OpConstruct>
15  00007FFC1094DBAF llint_slow_path_construct
16  00007FFC0F88C4C6 llint_entry
ERROR: 000001D9626D94D0 - [PID=17864] WebProcessProxy::didClose (web process crash)
C:\home\webkit\gc\Source\WebKit\UIProcess/WebProcessProxy.cpp(910) : WebKit::WebProcessProxy::didClose
ERROR: 000001D9626D94D0 - [PID=17864] WebProcessProxy::processDidTerminateOrFailedToLaunch: reason=4
C:\home\webkit\gc\Source\WebKit\UIProcess/WebProcessProxy.cpp(918) : WebKit::WebProcessProxy::processDidTerminateOrFailedToLaunch
ERROR: 000001D9626A6D60 - [pageProxyID=9, webPageID=10, PID=17864] WebPageProxy::processDidTerminate: (pid 17864), reason 4
C:\home\webkit\gc\Source\WebKit\UIProcess/WebPageProxy.cpp(7705) : WebKit::WebPageProxy::resetStateAfterProcessTermination
ERROR: 000001D9626A6D60 - [pageProxyID=9, webPageID=10, PID=17864] WebPageProxy::dispatchProcessDidTerminate: reason=4
C:\home\webkit\gc\Source\WebKit\UIProcess/WebPageProxy.cpp(7760) : WebKit::WebPageProxy::dispatchProcessDidTerminate
WebProcess terminated (pid 17864) because the process crashed
#CRASHED - WebProcess (pid 17864)
LEAK: 1 WebProcessPool
LEAK: 1 WebPageProxy
PS C:\home\webkit\gc>
Comment 2 Fujii Hironori 2021-09-12 21:19:49 PDT
Created attachment 438008 [details]
Patch
Comment 3 Fujii Hironori 2021-09-12 21:30:21 PDT
Created attachment 438011 [details]
Patch
Comment 4 Fujii Hironori 2021-09-13 01:02:51 PDT
Mac EWS failed.
Fixing this bug reveals Bug 230208 for Mac port.
Comment 5 Fujii Hironori 2021-09-13 21:10:42 PDT
Created attachment 438099 [details]
Patch
Comment 6 Fujii Hironori 2021-09-14 12:53:39 PDT
r282351 fixed Bug 230208. I resubmitted the patch to EWS. It reports all green now.
Comment 7 Yusuke Suzuki 2021-09-14 12:55:14 PDT
Comment on attachment 438099 [details]
Patch

r=me
Comment 8 Mark Lam 2021-09-14 13:04:11 PDT
Comment on attachment 438099 [details]
Patch

Nice catch.
Comment 9 Fujii Hironori 2021-09-14 13:09:15 PDT
Comment on attachment 438099 [details]
Patch

Clearing flags on attachment: 438099

Committed r282405 (241666@main): <https://commits.webkit.org/241666@main>
Comment 10 Fujii Hironori 2021-09-14 13:09:20 PDT
All reviewed patches have been landed.  Closing bug.
Comment 11 Radar WebKit Bug Importer 2021-09-14 13:10:35 PDT
<rdar://problem/83113555>