-
Notifications
You must be signed in to change notification settings - Fork 784
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
MRuby crashes when compiled with clang-cl #3197
Comments
From call stack list, the direct cause of SEGV is a name error raised before NameError class is initialized. b2fceae will reduce the chance of errors, but I am not sure if it fixes the issue. |
Now it crashes later, but still in
Unfortunately Visual Studio's debugger isn't too friendly when I try to debug a non-VS project executable with it (for example I can't see the values of variables with it), I'll try to find a better tool for this. |
Do you have all debugging options on in mruby? |
I'm testing it with the default The problem with the VS debugger is that when I open an executable with it (as I have no usable solution for building mruby), it correctly displays the source files for the methods on the call stack, but treats them as text files, and shows no debug information about the symbols. So I can traverse the call stack and see the current value of the registers but not the values of local variables / parameters in the IDE. |
If you cannot use the debugger for your program, could you add the following line to the mrb_name_error() function in src/error.c please? fprintf(stderr, "name_error(%s)\n", mrb_sym2name(mrb, id)); |
I tried to retest this with clang-4 (which finally added full msvc-compatble debugging capabilities) and the latest mruby, and I can't reproduce it: mruby compiles and works with clang-cl. Another thing I just noticed that a new toolchain isn't required, as the vs toolchain uses the standard environment variables (CC,CXX,CFLAGS,CXXFLAGS). |
It's easy to build mruby with clang-cl by changing the visual studio toolchain / adding another toolchain named clang_cl:
But when running
ruby minirake test
or justmrbtest.exe
it quickly crashes in an access violation atmrb_obj_respond_to
with a long callstack starting withmrb_open
, I attached the full callstack.callstack.txt
The text was updated successfully, but these errors were encountered: