-
Notifications
You must be signed in to change notification settings - Fork 116
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
[DeviceSanitizer] Only try to get backtrace symbols when needed #2128
[DeviceSanitizer] Only try to get backtrace symbols when needed #2128
Conversation
Hi @oneapi-src/unified-runtime-maintain, could you please help review this PR? Thanks. |
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.
just one minor suggestion, feel free to ignore.
Stack.stack.emplace_back(addr_info); | ||
} | ||
free(Symbols); | ||
Stack.stack = |
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.
nit, we should be able to skip the stack buffer by writing to the vector directly:
StackTrace Stack;
Stack.stack.reserve(MAX_BACKTRACE_FRAMES);
int FrameCount = backtrace(Stack.stack.data(), MAX_BACKTRACE_FRAMES);
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 didn't want to delay merging because of this. If you want to change it, include it in another PR.
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.
Thanks. I'll do this later.
No description provided.