<html>
<head>
<base href="http://llvm.org/bugs/" />
</head>
<body><table border="1" cellspacing="0" cellpadding="8">
<tr>
<th>Bug ID</th>
<td><a class="bz_bug_link
bz_status_NEW "
title="NEW --- - Breakpoint on malloc() fails on FreeBSD stable/10"
href="http://llvm.org/bugs/show_bug.cgi?id=20476">20476</a>
</td>
</tr>
<tr>
<th>Summary</th>
<td>Breakpoint on malloc() fails on FreeBSD stable/10
</td>
</tr>
<tr>
<th>Product</th>
<td>lldb
</td>
</tr>
<tr>
<th>Version</th>
<td>unspecified
</td>
</tr>
<tr>
<th>Hardware</th>
<td>PC
</td>
</tr>
<tr>
<th>OS</th>
<td>FreeBSD
</td>
</tr>
<tr>
<th>Status</th>
<td>NEW
</td>
</tr>
<tr>
<th>Severity</th>
<td>normal
</td>
</tr>
<tr>
<th>Priority</th>
<td>P
</td>
</tr>
<tr>
<th>Component</th>
<td>All Bugs
</td>
</tr>
<tr>
<th>Assignee</th>
<td>lldb-dev@cs.uiuc.edu
</td>
</tr>
<tr>
<th>Reporter</th>
<td>emaste@freebsd.org
</td>
</tr>
<tr>
<th>Classification</th>
<td>Unclassified
</td>
</tr></table>
<p>
<div>
<pre>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)</pre>
</div>
</p>
<hr>
<span>You are receiving this mail because:</span>
<ul>
<li>You are the assignee for the bug.</li>
</ul>
</body>
</html>