[llvm-bugs] [Bug 47982] New: [asan] Shadowed stack variables' name are not the exact source name.

via llvm-bugs llvm-bugs at lists.llvm.org
Mon Oct 26 11:03:03 PDT 2020


https://bugs.llvm.org/show_bug.cgi?id=47982

            Bug ID: 47982
           Summary: [asan] Shadowed stack variables' name are not the
                    exact source name.
           Product: clang
           Version: unspecified
          Hardware: All
                OS: All
            Status: NEW
          Severity: normal
          Priority: P
         Component: LLVM Codegen
          Assignee: unassignedclangbugs at nondot.org
          Reporter: pierregousseau14 at gmail.com
                CC: llvm-bugs at lists.llvm.org, neeilans at live.com,
                    richard-llvm at metafoo.co.uk

In the sample below the reported variable's name is the LLVM ir's name 'x1'
instead of 'x'.
Any ideas how to use the source's variable name instead?

Many thanks,

Pierre

///////////////////
int main()
{
  int x;
  {
    int x;
    delete &x;
  }
  delete &x;
  return 0;
}

$ clang++ -fsanitize=address test.cpp && ./a.out
==191==ERROR: AddressSanitizer: attempting free on address which was not
malloc()-ed:
...
  This frame has 2 object(s):
    [32, 36) 'x' (line 3842)
    [48, 52) 'x1' (line 3844) <== Memory access at offset 48 is inside this
variable
///////////////////

-- 
You are receiving this mail because:
You are on the CC list for the bug.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.llvm.org/pipermail/llvm-bugs/attachments/20201026/3f0110c8/attachment-0001.html>


More information about the llvm-bugs mailing list