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

Avoid looking up nonexistent Comballoc debuginfo #9362

Merged
merged 1 commit into from
Mar 17, 2020

Conversation

stedolan
Copy link
Contributor

This is a minor bugfix for #9230. For allocations subject to combining, #9230 stores a pointer to the debuginfo instead of the frametable in backtraces, because the same frametable entry might refer to several allocations from different locations that have been combined.

The bug is that there might not be a debuginfo! In such cases, we should store the frametable entry, to at least get a unique ID for the allocation site rather than a null pointer.

Even when everything is compiled with -g, this still occurs for internally-generated functions (caml_apply2, etc.), for which no debuginfo is generated.

cc @jhjourdan, @gasche

Copy link
Member

@gasche gasche left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I reviewed that this is correct.

(*ptrace)[trace_pos++] = Val_backtrace_slot(Slot_debuginfo(info));
} else {
(*ptrace)[trace_pos++] = Val_backtrace_slot(Slot_frame_descr(descr));
}
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I would have written the (info == NULL) case first (it is shorter and also it makes sense to have it first) but this is extreme nitpicking.

@gasche gasche merged commit 18e5452 into ocaml:trunk Mar 17, 2020
stedolan added a commit to janestreet/ocaml that referenced this pull request Mar 17, 2020
…e5452)

Avoid looking up nonexistent Comballoc debuginfo
mshinwell pushed a commit to mshinwell/ocaml that referenced this pull request Apr 7, 2020
…e5452)

Avoid looking up nonexistent Comballoc debuginfo
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