mrbc segfaults on syntax error #457

joequery opened this Issue Sep 7, 2012 · 0 comments

2 participants


Consider the file rubyfile.rb, which only contains an = sign, a clear syntax error.

$ mrbc -c rubyfile.rb 
rubyfile.rb:1:2: syntax error, unexpected '='
Segmentation fault

Stacktrace gist.

I tried debugging for a long time, and from what I've observed in the stack trace, the sym that appears to correspond to SyntaxError, 243, gets discarded during/after the first call to const_get in src/variable.c. Eventually 245, which seems to correspond to NameError, takes its place. I wasn't able to fix the issue.

@matz matz closed this in 9e7ca5d Sep 9, 2012
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment