You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
curl builds and links fine with libbacktrace (both Apple clang and llvm/clang), but their memdump look like this:
MEM curl/lib/getenv.c:67 strdup(0x16b82e563) (2) = 0x6000026c7548
MEM curl/lib/escape.c:191 free(0x6000026c7548)
MEM curl/src/tool_cfgable.c:39 calloc(1,1192) = 0x15800ce08
LIMIT curl/lib/easy.c:196 malloc reached memlimit
compile with -g
compile with -g
compile with -g
compile with -g
compile with -g
compile with -g
compile with -g
LIMIT curl/src/tool_paramhlp.c:37 calloc reached memlimit
compile with -g
compile with -g
compile with -g
compile with -g
compile with -g
compile with -g
compile with -g
compile with -g
compile with -g
compile with -g
MEM curl/src/tool_cfgable.c:202 free(0x15800ce08)
(source is compiled with -g, as confirmed by verbose log)
When compiled with gcc-15 with libbacktrace enabled, memdump and test output looks identical to a non-libbacktrace-enabled build.
Activity
vszakats commentedon Jan 28, 2026
Could reproduce. With
-DENABLE_THREADED_RESOLVER=OFF(--disable-threaded-resolver) the leak goes away.vszakats commentedon Jan 28, 2026
This issue predates the ability to run torture tests with the threaded resolver enabled, finalized via fb7033d.
bagder commentedon Jan 28, 2026
I can't seem to reproduce on Linux!
bagder commentedon Jan 28, 2026
Does libbacktrace work on macOS? Can you reproduce using a build with that enabled and then attach the tests/log/memdump file for the torture fail?
vszakats commentedon Jan 28, 2026
curl builds and links fine with libbacktrace (both Apple clang and llvm/clang), but their
memdumplook like this:(source is compiled with
-g, as confirmed by verbose log)When compiled with gcc-15 with libbacktrace enabled,
memdumpand test output looks identical to a non-libbacktrace-enabled build.In theory libbacktrace should recognize mach-o DWARF.
I tried applying suggestions from ElementsProject/lightning#8431 via ianlancetaylor/libbacktrace#158, which made the result the same as with gcc-15, i.e. no backtraces :(
edit: how does libbacktrace output look like when working correctly?
bagder commentedon Jan 29, 2026
It provides a stack trace. Source file name, line number and function name all the way from the function until the main() call.
bagder commentedon Jan 29, 2026
Here's what the memdump file looks like on my Linux machine after I ran
runtests.pl -n -t13 1memdump-stacktrace.txt
hostip.c: fix leak of addrinfo
icing commentedon Jan 29, 2026
Fix in #20468
vszakats commentedon Jan 29, 2026
I confirm #20468 fixes the test failure.
hostip.c: fix leak of addrinfo