-
Notifications
You must be signed in to change notification settings - Fork 176
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Internals MoarVM Error messages are LTA #1850
Comments
Clang has a couple of annotations that can be added to code to C code that say, "This variable must be guarded by this mutex". This is for compile time, static analysis. They call it Thread Safety Analysis
Whether this is immediately useful to MoarMV depends on
|
I wasn't aware, but there is an annotation to suppress this in clang. https://clang.llvm.org/docs/ThreadSanitizer.html#attribute-no-sanitize-thread I think runtime tools will be essential, but perhaps focusing on refactorings that support static analysis will yield good results in the long run, for both static and runtime analysis. |
added a section on identifying objects by paths from roots to the objects using the heap snapshot machinery to the end of the original post, inspired by a recent rakudo issue report that also has a useful real-world test case for causing concurrent hash writes |
ran the example code from that same issue with CROSS_THREAD_WRITE_LOG and got these results: https://gist.github.com/timo/a938a7d4fb9f07bd008b3ba33e7b3f73 - verdict: at the moment extremely spammy with false positives from Lock::Async (likely caused by |
For example, #1849
When you corrupt your moarvm memory by doing un-thread-safe things, you get one of a variety of "MoarVM Panic: Internal bla bla", which gives you zero clue what might be going wrong.
In this issue I would like to collect ideas for improving error messages.
#define
to turn on extra checks that make moar slower, but can find problems?%rfc_grammar
of the current thread's cur_frame -> outer -> outer would be one interesting name (but reporting just%rfc_grammar
would suffice / be better)Tasks that should be done:
The text was updated successfully, but these errors were encountered: