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

Enable output of variable names in ASan and MSan error reporting. #4004

Merged
merged 1 commit into from
Jun 26, 2022

Conversation

JohanEngelen
Copy link
Member

I've finally found what was the problem! Now the user will see the variable name that is overflown (close to the address read), e.g.:

=================================================================
==73095==ERROR: AddressSanitizer: stack-buffer-overflow on address 0x000101507f08 at pc 0x000100c7ece8 bp 0x000101507e70 sp 0x000101507e68
WRITE of size 4 at 0x000101507f08 thread T0
    #0 0x100c7ece4 in _D10asan_fiber3fooFPiZv asan_fiber.d:21
    #1 0x100c7ee1c in _D10asan_fiber6prefooFZv asan_fiber.d:31
    #2 0x100de8ecc in fiber_entryPoint+0x4c (asan_fiber.d.tmp:arm64+0x10016cecc)

Address 0x000101507f08 is located in stack of thread T0 at offset 72 in frame
    #0 0x100c7ed0c in _D10asan_fiber6prefooFZv asan_fiber.d:28

  This frame has 1 object(s):
    [32, 72) 'aiaiaiaiaiaiaiaiaiai' <== Memory access at offset 72 overflows this variable

@JohanEngelen JohanEngelen added the sanitizers ASan, libFuzzer, ... label Jun 25, 2022
@JohanEngelen JohanEngelen merged commit a2ce3f3 into ldc-developers:master Jun 26, 2022
@JohanEngelen JohanEngelen deleted the asan_variablenames branch June 26, 2022 09:13
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
sanitizers ASan, libFuzzer, ...
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants