[lldb-dev] [Bug 20476] New: Breakpoint on malloc() fails on FreeBSD stable/10

bugzilla-daemon at llvm.org bugzilla-daemon at llvm.org
Mon Jul 28 09:52:50 PDT 2014


http://llvm.org/bugs/show_bug.cgi?id=20476

            Bug ID: 20476
           Summary: Breakpoint on malloc() fails on FreeBSD stable/10
           Product: lldb
           Version: unspecified
          Hardware: PC
                OS: FreeBSD
            Status: NEW
          Severity: normal
          Priority: P
         Component: All Bugs
          Assignee: lldb-dev at cs.uiuc.edu
          Reporter: emaste at freebsd.org
    Classification: Unclassified

I recently updated my development machine to FreeBSD stable/10, and afterward
the TestThreadAPI test started failing.  I found that the test sets a
breakpoint on malloc(), which did not work.

It worked on stable/9 (9.x) before the upgrade and works on my FreeBSD-CURRENT
(11.x) laptop.  I suspect that this is caused by the MALLOC_PRODUCTION knob,
which turns off additional diagnostics and consistency checks in the userland
malloc, but I have not confirmed.  Details to be added once this is
investigated.

Working case:
(lldb) %                                                                       
joule% bin/lldb /bin/echo hello
Current executable set to '/bin/echo' (x86_64).
(lldb) b malloc
Breakpoint 1: no locations (pending).
WARNING:  Unable to resolve breakpoint to any actual locations.
(lldb) run
Process 2070 launching
Process 2070 stopped
Process 2070 launched: '/bin/echo' (x86_64)
Process 2070 stopped
* thread #1: tid = 100577, 0x00000008008c83f6 libc.so.7`__malloc(size=1) + 22
at jemalloc_jemalloc.c:931, name = 'echo', stop reason = breakpoint 1.1
    frame #0: 0x00000008008c83f6 libc.so.7`__malloc(size=1) + 22 at
jemalloc_jemalloc.c:931
   928          void *ret;
   929          size_t usize JEMALLOC_CC_SILENCE_INIT(0);
   930 
-> 931          if (size == 0)
   932                  size = 1;
   933 
   934          MALLOC_BODY(ret, size, usize);
(lldb) 

Failing case:
(lldb) %                                                                       
joule% bin/lldb /bin/echo hello
Current executable set to '/bin/echo' (x86_64).
(lldb) b malloc
Breakpoint 1: no locations (pending).
WARNING:  Unable to resolve breakpoint to any actual locations.
(lldb) run
Process 26904 launching
Process 26904 stopped
Process 26904 launched: '/bin/echo' (x86_64)
hello
Process 26904 exited with status = 0 (0x00000000)
(lldb)

-- 
You are receiving this mail because:
You are the assignee for the bug.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.llvm.org/pipermail/lldb-dev/attachments/20140728/749a0682/attachment.html>


More information about the lldb-dev mailing list