Bug 221922 - REGRESSION r272823): Crash in ARM64e Wasm tests
Summary: REGRESSION r272823): Crash in ARM64e Wasm tests
Status: RESOLVED FIXED
Alias: None
Product: WebKit
Classification: Unclassified
Component: JavaScriptCore (show other bugs)
Version: WebKit Nightly Build
Hardware: Unspecified Unspecified
: P2 Normal
Assignee: Michael Saboff
URL:
Keywords: InRadar
Depends on:
Blocks:
 
Reported: 2021-02-15 13:35 PST by Michael Saboff
Modified: 2022-02-27 23:28 PST (History)
6 users (show)

See Also:


Attachments
Patch (2.17 KB, patch)
2021-02-15 13:41 PST, Michael Saboff
no flags Details | Formatted Diff | Diff
Updated patch after offline discussion with Mark Lam (2.28 KB, patch)
2021-02-15 14:52 PST, Michael Saboff
mark.lam: review+
Details | Formatted Diff | Diff

Note You need to log in before you can comment on or make changes to this bug.
Description Michael Saboff 2021-02-15 13:35:00 PST
The Wasm exception throwing tests are crashing on Apple Silicon devices after r272823.

2021-02-15 13:14:12.834908-0800 jsc[15055:74848] ASSERTION FAILED: inStateHash == hashThreadState(outState) ASSERTION FAILED: inStateHash == hashThreadState(outState)
2021-02-15 13:14:12.835412-0800 jsc[15055:74848] /Users/msaboff/src/webkit/OpenSource/Source/WTF/wtf/threads/Signals.cpp(260) : kern_return_t WTF::catch_mach_exception_raise_state(mach_port_t, exception_type_t, const mach_exception_data_t, mach_msg_type_number_t, int *, const thread_state_t, mach_msg_type_number_t, thread_state_t, mach_msg_type_number_t *)
/Users/msaboff/src/webkit/OpenSource/Source/WTF/wtf/threads/Signals.cpp(260) : kern_return_t WTF::catch_mach_exception_raise_state(mach_port_t, exception_type_t, const mach_exception_data_t, mach_msg_type_number_t, int *, const thread_state_t, mach_msg_type_number_t, thread_state_t, mach_msg_type_number_t *)
2021-02-15 13:14:12.901046-0800 jsc[15055:74848] 1   0x10030097c WTFCrash
2021-02-15 13:14:12.903189-0800 jsc[15055:74848] 2   0x10083fec4 JSC::IntlDateTimeFormat* JSC::jsCast<JSC::IntlDateTimeFormat*, JSC::JSCell>(JSC::JSCell*)
2021-02-15 13:14:12.904373-0800 jsc[15055:74848] 3   0x1003a070c catch_mach_exception_raise_state
2021-02-15 13:14:12.905560-0800 jsc[15055:74848] 4   0x10035f520 _Xmach_exception_raise_state
2021-02-15 13:14:12.906490-0800 jsc[15055:74848] 5   0x10035f7fc mach_exc_server
2021-02-15 13:14:12.907461-0800 jsc[15055:74848] 6   0x181f20ec8 mach_msg_server_once
2021-02-15 13:14:12.908340-0800 jsc[15055:74848] 7   0x1003a3ff4 invocation function for block in WTF::startMachExceptionHandlerThread()::$_0::operator()() const
2021-02-15 13:14:12.908367-0800 jsc[15055:74848] 8   0x181d9b014 _dispatch_client_callout
2021-02-15 13:14:12.908375-0800 jsc[15055:74848] 9   0x181d9e67c _dispatch_continuation_pop
2021-02-15 13:14:12.908382-0800 jsc[15055:74848] 10  0x181db2470 _dispatch_source_invoke
2021-02-15 13:14:12.908389-0800 jsc[15055:74848] 11  0x181dae7f0 _dispatch_workloop_worker_thread
2021-02-15 13:14:12.908395-0800 jsc[15055:74848] 12  0x181f4ceb4 _pthread_wqthread
2021-02-15 13:14:12.908410-0800 jsc[15055:74848] 13  0x181f4bbe8 start_wqthread
Process 15055 exited with status = 9 (0x00000009)
Comment 1 Michael Saboff 2021-02-15 13:41:40 PST
Created attachment 420364 [details]
Patch
Comment 2 Michael Saboff 2021-02-15 14:52:43 PST
Created attachment 420380 [details]
Updated patch after offline discussion with Mark Lam
Comment 3 Mark Lam 2021-02-15 15:04:02 PST
Comment on attachment 420380 [details]
Updated patch after offline discussion with Mark Lam

View in context: https://bugs.webkit.org/attachment.cgi?id=420380&action=review

r=me

> Source/WTF/wtf/threads/Signals.cpp:219
> -    ptrauth_generic_signature_t inStateHash = hashThreadState(inState);
> +    ptrauth_generic_signature_t inThreadStateHash = hashThreadState(inState);

nit: I thought that `inStateHash` was a good name because it's a "hash of the inState".  But this is fine too.
Comment 4 Michael Saboff 2021-02-15 15:22:19 PST
(In reply to Mark Lam from comment #3)
...
> > Source/WTF/wtf/threads/Signals.cpp:219
> > -    ptrauth_generic_signature_t inStateHash = hashThreadState(inState);
> > +    ptrauth_generic_signature_t inThreadStateHash = hashThreadState(inState);
> 
> nit: I thought that `inStateHash` was a good name because it's a "hash of
> the inState".  But this is fine too.

I changed it back locally and will land.
Comment 5 Michael Saboff 2021-02-15 15:31:37 PST
Committed r272886 (234119@main): <https://commits.webkit.org/234119@main>
Comment 6 Radar WebKit Bug Importer 2021-02-15 15:32:14 PST
<rdar://problem/74368498>
Comment 7 Michael Saboff 2021-02-15 15:33:16 PST
(In reply to Radar WebKit Bug Importer from comment #6)
> <rdar://problem/74368498>

<rdar://74289949>