add stack traces to pointer stability safety locks #19328
Labels
contributor friendly
This issue is limited in scope and/or knowledge of Zig internals.
enhancement
Solving this issue will likely involve adding new logic or components to the codebase.
standard library
This issue involves writing Zig code for the standard library.
Milestone
Extracted from #17719.
Based on this comment by @GethDW: #17719 (comment)
Comment reproduced here:
I think it would be good to add a
ConfigurableTrace
and panic with it to quickly identify where it was locked. I'm not too familiar withStackTrace
but I played around with it and got:The trace can then look like this:
This issue is to evaluate whether enabling this unconditionally in debug mode is prohibitively expensive in terms of performance and memory, or not. And depending on the results of this investigation, potentially create a std lib configuration option for setting the number of stack trace frames to collect for safety locks.
Related:
The text was updated successfully, but these errors were encountered: