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
fix rakudo/rakudo#2965 #1116
fix rakudo/rakudo#2965 #1116
Conversation
After this patch, the following throws 3 compile-time exceptions instead of segfaulting:
I'm trying to figure out how to write a test that passes when it throws an exception at compile time |
|
This will segfault until it's built on MoarVM/MoarVM#1116
This will segfault until it's built on MoarVM/MoarVM#1116
Hm, this causes the new exception to be thrown upon attempts to HAS objects of types that aren't CArray/CUnion/CP*STruct. I should move the check into all the appropriate switch branches so it fails right for the never-HASable cases... |
You can't HAS a type before it's defined, whether it be stubbed or an attempt at recursive HASation. This changes the penalty from segfaulty death to merciful exception.
3645bc0
to
36469a6
Compare
Ok, I made the check more fine grained so the new error will never occur when a null-derived pointer dereference didn't before |
This will segfault until it's built on MoarVM/MoarVM#1116
This will segfault until it's built on MoarVM/MoarVM#1116
Exception rather than segfault in response to an attempt to HAS a type before it's defined (rakudo/rakudo#2965)