-
Notifications
You must be signed in to change notification settings - Fork 804
mrb_str_modify segfault #3117
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
Comments
Looks like a null pointer is being passed in as When I add this: MRB_API void
mrb_str_modify(mrb_state *mrb, struct RString *s)
{
fprintf(stderr, "mrb_str_modify\n");
fflush(stderr);
fprintf(stderr, "s: %p\n", s);
fflush(stderr);
fprintf(stderr, "RSTR_PTR %%p: %p\n", RSTR_PTR(s));
fflush(stderr);
fprintf(stderr, "RSTR_PTR %%s: %s\n", RSTR_PTR(s));
fflush(stderr); The first 3 test files all fail with the same final output:
|
Awesome! Thanks! |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
EDIT: Found a minimal reproduction
Previous description follows below
Getting a segfault in mrb_str_modify. Not 100% on what's causing the error yet. To capture what I can for now....
git bisect
leads me to this commit:
Tests & Output
Previous ruby/spec results were ok (relatively few crashes).
When moving from d8fc09^ to d8fc09 I start seeing this instead.
Most of the tests fail with the same segfault. Seems to be something in the mspec HTML formatter, since they all fail just before printing the summary for the tests to the output file.
Any tips for debugging?
Still trying to come up with a minimal reproduction...
The valgrind output shows me where in the c code the error happens. Is there a quick way to dump the ruby stack trace at that point? (edit:
mrb_raise
seems to generate a stack trace pretty well :)The text was updated successfully, but these errors were encountered: