[llvm-bugs] [Bug 26397] New: Missing debug info if address sanitizer is in use: "no symbol in current context"

via llvm-bugs llvm-bugs at lists.llvm.org
Sat Jan 30 13:02:24 PST 2016


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

            Bug ID: 26397
           Summary: Missing debug info if address sanitizer is in use: "no
                    symbol in current context"
           Product: clang
           Version: 3.7
          Hardware: PC
                OS: Linux
            Status: NEW
          Severity: normal
          Priority: P
         Component: -New Bugs
          Assignee: unassignedclangbugs at nondot.org
          Reporter: kean at ruggedinbox.com
                CC: llvm-bugs at lists.llvm.org
    Classification: Unclassified

Created attachment 15767
  --> https://llvm.org/bugs/attachment.cgi?id=15767&action=edit
minimal program souce that reproduces the problem

Hello everyone,

I hope I am reporting this the right way. Please excuse me if this bug has been
reported or even fixed already, but I could only try this with the pre-compiled
clang 3.7.1 binary on Ubuntu 14.04 (amd64).

It seems like clang is emitting binaries with faulty or missing debug
information in some cases when address sanitizer is used. The attached file
(main.cpp) provides a minimal example. If compiled with
clang++ -fsanitize=address -o testcase -g -O0 main.cpp
gdb (version 7.10.1) is unable to print the value of variable `i`. In
particular, if one tries to run
gdb testcase -ex "b main.cpp:6" -ex r -ex "p i"
then gdb reports:
No symbol "i" in current context.

If one compiles without the `-fsanitize=address` option, gdb prints a value for
i.

Please let me know in case you need more information.

-- 
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/20160130/3b53286d/attachment.html>


More information about the llvm-bugs mailing list