RESOLVED FIXED 240209
Force PAS_ASSERT to generate different crash sites for each assertion.
https://bugs.webkit.org/show_bug.cgi?id=240209
Summary Force PAS_ASSERT to generate different crash sites for each assertion.
Mark Lam
Reported 2022-05-07 14:40:30 PDT
Clang currently optimizes all crash sites into one in each function. Hence, if we get a crash address at the 1 crash site, we don't know which failed assertion got us there. This patch uses an asm statement to force Clang to emit a different crash site for each assertion. Benchmarks show that performance is neutral on both Jetstream2 and Speedometer2. Size-wise, there is some increase. The following is the "size" output on JavaScriptCore on M1: __TEXT. __DATA __OBJC others dec hex old 19628032 180224 0 18792448 38600704 24d0000 new 19644416 180224 0 19251200 39075840 2544000 diff 16384 0 0 458752 475136 The increase in the "others" categories are mostly in the String Table, Symbol Table, and Function Start Addresses. These take up disk space but should not impact RAM usage unless they are accessed by a a debugger.
Attachments
[fast-cq] proposed patch. (2.76 KB, patch)
2022-05-07 14:49 PDT, Mark Lam
no flags
Mark Lam
Comment 1 2022-05-07 14:49:09 PDT
Created attachment 459003 [details] [fast-cq] proposed patch.
Yusuke Suzuki
Comment 2 2022-05-07 15:14:40 PDT
Comment on attachment 459003 [details] [fast-cq] proposed patch. r=me
Mark Lam
Comment 3 2022-05-07 15:15:38 PDT
Comment on attachment 459003 [details] [fast-cq] proposed patch. Thanks for the review.
Radar WebKit Bug Importer
Comment 4 2022-05-07 15:17:15 PDT
Alexey Proskuryakov
Comment 5 2022-05-07 18:17:45 PDT
Do we need the same in WTF?
Mark Lam
Comment 6 2022-05-07 19:38:54 PDT
(In reply to Alexey Proskuryakov from comment #5) > Do we need the same in WTF? No because WTF assertion crashes via WTFCrashWithInfoImpl. This effectively puts the caller on the stack, which points to the assertion site.
EWS
Comment 7 2022-05-07 19:42:48 PDT
Committed r293952 (250398@main): <https://commits.webkit.org/250398@main> All reviewed patches have been landed. Closing bug and clearing flags on attachment 459003 [details].
Note You need to log in before you can comment on or make changes to this bug.