Skip to content
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

Protect against NULL frames #17

Closed
wants to merge 1 commit into from

Conversation

lmarburger
Copy link

Found this bug while running a simple app on puma. Here's the gdb @eric helped track down.

Program received signal EXC_BAD_ACCESS, Could not access memory.
Reason: KERN_INVALID_ADDRESS at address: 0x0000000000000048
profiler_hook (event=64, data=<value temporarily unavailable, due to optimizations>, self=140532051804240, mid=<value temporarily unavailable, due to optimizations>, klass=140532051804200) at rblineprof.c:476
476         if (frame->srcfile != prev->srcfile) {
(gdb) where
#0  profiler_hook (event=64, data=<value temporarily unavailable, due to optimizations>, self=140532051804240, mid=<value temporarily unavailable, due to optimizations>, klass=140532051804200) at rblineprof.c:476
#1  0x0000000109b36b6f in thread_exec_event_hooks ()
#2  0x0000000109b368c3 in thread_suppress_tracing ()
#3  0x0000000109b369ad in rb_threadptr_exec_event_hooks ()
#4  0x0000000109b32718 in vm_call_method ()
#5  0x0000000109b1eeb5 in vm_exec_core ()
#6  0x0000000109b23aea in vm_exec ()
#7  0x0000000109b23f60 in rb_iseq_eval ()
#8  0x00000001099eff2b in rb_load_internal ()
#9  0x00000001099f174d in rb_f_load ()
#10 0x0000000109b31a67 in vm_call_method ()
#11 0x0000000109b1eeb5 in vm_exec_core ()
#12 0x0000000109b23aea in vm_exec ()
#13 0x0000000109b23dcc in rb_iseq_eval_main ()
#14 0x00000001099ecf82 in ruby_exec_internal ()
#15 0x00000001099efaec in ruby_run_node ()
#16 0x00000001099ad89f in main ()
(gdb) p frame
$1 = (stackframe_t *) 0x0
(gdb) p prev
$2 = (stackframe_t *) 0x109e5a0c8

@eric
Copy link

eric commented May 24, 2013

@lmarburger lmarburger mentioned this pull request May 24, 2013
@tmm1 tmm1 closed this in 31d747e Jun 3, 2013
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants