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
workaround for https://github.com/libunwind/libunwind/issues/425 #432
base: master
Are you sure you want to change the base?
Conversation
@@ -430,7 +432,10 @@ tdep_trace (unw_cursor_t *cursor, void **buffer, int *size) | |||
d->stash_frames = 0; | |||
return -UNW_ENOMEM; | |||
} | |||
if (cache->frame_rc > 0) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
So this just fails nested requests?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Yes
|
||
cache->frame_rc = 1; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Won't this fail if there are multiple nested requests? It is a 'reference count', but apparently it doesn't actually count?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Won't this fail if there are multiple nested requests?
Yes
It is a 'reference count', but apparently it doesn't actually count?
At first, I thought of using frame_rc
to represent the reference count of unw_trace_cache_t.frames
, and munmap(frames)
should be delayed until when frame_rc
is 0. Then I realized that the current PR is just a workaround, let’s not make it so complicated. Currently, frame_rc
is used to indicate whether frames
is being used, if so, nested requests will not be allowed to use frames
again.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I can rename frame_rc
toin_use
if needed.
Linking to issue #425 directly. |
No description provided.