[libpas] Report more actionable crash in pas_enumerator
Created attachment 454060 [details] Patch
Comment on attachment 454060 [details] Patch View in context: https://bugs.webkit.org/attachment.cgi?id=454060&action=review > Source/bmalloc/libpas/src/libpas/pas_utils.c:60 > + pas_panic("%s:%d: %s: assertion %s failed.\n", filename, line, function, expression); It looks like pas_panic will trample on the incoming args: ``` void pas_panic(const char* format, ...) { static const bool fast_panic = false; if (!fast_panic) { ... pas_vlog(format, arg_list); } __builtin_trap(); } ``` Can you also change pas_panic to not call __builtin_trap() directly, but call a NEVER_INLINE pas_trap(const char* filename, int line, const char* function, const char* expression) (similar to WTFCrashWithInfoImpl()). This way we can at least see the line number in crash logs as well. I think this will be useful.
Comment on attachment 454060 [details] Patch View in context: https://bugs.webkit.org/attachment.cgi?id=454060&action=review >> Source/bmalloc/libpas/src/libpas/pas_utils.c:60 >> + pas_panic("%s:%d: %s: assertion %s failed.\n", filename, line, function, expression); > > It looks like pas_panic will trample on the incoming args: > ``` > void pas_panic(const char* format, ...) > { > static const bool fast_panic = false; > if (!fast_panic) { > ... > pas_vlog(format, arg_list); > } > __builtin_trap(); > } > ``` > > Can you also change pas_panic to not call __builtin_trap() directly, but call a NEVER_INLINE pas_trap(const char* filename, int line, const char* function, const char* expression) (similar to WTFCrashWithInfoImpl()). This way we can at least see the line number in crash logs as well. I think this will be useful. Never mind. Yusuke reminded me offline that the caller of pas_assertion_failed_no_inline will be on the stack trace in the crash log. So, the needed information is captured after all.
Committed r291007 (248183@main): <https://commits.webkit.org/248183@main> All reviewed patches have been landed. Closing bug and clearing flags on attachment 454060 [details].
<rdar://problem/89984164>
Committed r291199 (248354@trunk): <https://commits.webkit.org/248354@trunk>