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

[DeviceSanitizer] Only try to get backtrace symbols when needed #2128

Merged
merged 3 commits into from
Oct 10, 2024

Conversation

zhaomaosu
Copy link
Contributor

No description provided.

@zhaomaosu zhaomaosu requested a review from a team as a code owner September 25, 2024 06:59
@github-actions github-actions bot added loader Loader related feature/bug sanitizer Sanitizer layer issues/changes/specification labels Sep 25, 2024
@zhaomaosu
Copy link
Contributor Author

Hi @oneapi-src/unified-runtime-maintain, could you please help review this PR? Thanks.

Copy link
Contributor

@pbalcer pbalcer left a 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 =
Copy link
Contributor

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);

Copy link
Contributor

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.

Copy link
Contributor Author

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.

@pbalcer pbalcer merged commit 5e95d33 into oneapi-src:main Oct 10, 2024
75 of 76 checks passed
@zhaomaosu zhaomaosu deleted the sink-down-backtrace-symbols branch October 11, 2024 01:56
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
loader Loader related feature/bug sanitizer Sanitizer layer issues/changes/specification
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants