-
Notifications
You must be signed in to change notification settings - Fork 125
[DeviceSanitizer] Implement symbolizer for more readable information #1844
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] Implement symbolizer for more readable information #1844
Conversation
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.
Could you provide a comparison of the output text so that we can see the result difference?
Take the case https://github.com/intel/llvm/blob/sycl/sycl/test-e2e/AddressSanitizer/use-after-free/use-after-free.cpp as a example. Before this change, the output just like:
After this change, the output just like:
|
if (SymbolizeCode(ModuleName, (uint64_t)Frames[i], Result)) { | ||
SourceInfo SrcInfo = ParseSymbolizerOutput(Result); | ||
std::ostringstream OS; | ||
if (SrcInfo.file != "??") { | ||
OS << "in " << SrcInfo.function << " " << SrcInfo.file | ||
<< ":" << SrcInfo.line << ":" << SrcInfo.column; | ||
} else { | ||
OS << "in " << SrcInfo.function << " (" << ModuleName << "+" | ||
<< Frames[i] << ")"; | ||
} | ||
Stack.stack.emplace_back(OS.str()); | ||
continue; | ||
} |
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 know I was a bit hasty in implementing this part at first, in fact, the symbolization should be invoked as late as possible.
Can you save as few as possible information when doing backtrace, and symbolize them when really need it?
Thank you!
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 think we can get handle of the module, not file path
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 know I was a bit hasty in implementing this part at first, in fact, the symbolization should be invoked as late as possible. Can you save as few as possible information when doing backtrace, and symbolize them when really need it? Thank you!
I agree, the symbolization takes time, so we should only do it when necessary (in error reporting stage I think).
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.
nice suggestions. updated.
The new error reporting message looks good and more useful, nice improvement! |
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.
lgtm
Please provide the link to the PR of intel/llvm. |
e22c966
to
90fc969
Compare
90fc969
to
895cd11
Compare
895cd11
to
dac2a0f
Compare
SYCLOS Part: intel/llvm#14513