Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

libbacktrace fails on macOS Sequoia #136

Open
nolaforensix opened this issue Sep 24, 2024 · 7 comments
Open

libbacktrace fails on macOS Sequoia #136

nolaforensix opened this issue Sep 24, 2024 · 7 comments

Comments

@nolaforensix
Copy link

Hi,

libbacktrace seems to fail on macOS Sequoia , both using make check and in the application in which I've used it for some time. Here's the log generated by make check:

thelonious:libbacktrace golden$ cat test-suite.log

package-unused version-unused: ./test-suite.log

TOTAL: 21

PASS: 11

SKIP: 0

XFAIL: 0

FAIL: 10

XPASS: 0

ERROR: 0

.. contents:: :depth: 2

FAIL: allocfail.sh

FAIL allocfail.sh (exit status: 1)

FAIL: btest

DW_FORM_addrx value out of range
no debug info in Mach-O executable (make sure to compile with -g; may need to run dsymutil)
no debug info in Mach-O executable (make sure to compile with -g; may need to run dsymutil)
no debug info in Mach-O executable (make sure to compile with -g; may need to run dsymutil)
no debug info in Mach-O executable (make sure to compile with -g; may need to run dsymutil)
test1: not enough frames; got 0, expected at least 3
no debug info in Mach-O executable (make sure to compile with -g; may need to run dsymutil)
no debug info in Mach-O executable (make sure to compile with -g; may need to run dsymutil)
no debug info in Mach-O executable (make sure to compile with -g; may need to run dsymutil)
no debug info in Mach-O executable (make sure to compile with -g; may need to run dsymutil)
no debug info in Mach-O executable (make sure to compile with -g; may need to run dsymutil)
FAIL: backtrace_full noinline
FAIL: backtrace_full inline
FAIL: backtrace_simple noinline
FAIL: backtrace_simple inline
PASS: backtrace_syminfo variable
FAIL btest (exit status: 1)

FAIL: btest_alloc

DW_FORM_addrx value out of range
no debug info in Mach-O executable (make sure to compile with -g; may need to run dsymutil)
no debug info in Mach-O executable (make sure to compile with -g; may need to run dsymutil)
no debug info in Mach-O executable (make sure to compile with -g; may need to run dsymutil)
no debug info in Mach-O executable (make sure to compile with -g; may need to run dsymutil)
test1: not enough frames; got 0, expected at least 3
no debug info in Mach-O executable (make sure to compile with -g; may need to run dsymutil)
no debug info in Mach-O executable (make sure to compile with -g; may need to run dsymutil)
no debug info in Mach-O executable (make sure to compile with -g; may need to run dsymutil)
no debug info in Mach-O executable (make sure to compile with -g; may need to run dsymutil)
no debug info in Mach-O executable (make sure to compile with -g; may need to run dsymutil)
FAIL: backtrace_full noinline
FAIL: backtrace_full inline
FAIL: backtrace_simple noinline
FAIL: backtrace_simple inline
PASS: backtrace_syminfo variable
FAIL btest_alloc (exit status: 1)

FAIL: edtest

DW_FORM_addrx value out of range
no debug info in Mach-O executable (make sure to compile with -g; may need to run dsymutil)
no debug info in Mach-O executable (make sure to compile with -g; may need to run dsymutil)
no debug info in Mach-O executable (make sure to compile with -g; may need to run dsymutil)
no debug info in Mach-O executable (make sure to compile with -g; may need to run dsymutil)
test1: not enough frames; got 0, expected at least 3
FAIL: backtrace_full alloc stress
FAIL edtest (exit status: 1)

FAIL: edtest_alloc

DW_FORM_addrx value out of range
no debug info in Mach-O executable (make sure to compile with -g; may need to run dsymutil)
no debug info in Mach-O executable (make sure to compile with -g; may need to run dsymutil)
no debug info in Mach-O executable (make sure to compile with -g; may need to run dsymutil)
no debug info in Mach-O executable (make sure to compile with -g; may need to run dsymutil)
test1: not enough frames; got 0, expected at least 3
FAIL: backtrace_full alloc stress
FAIL edtest_alloc (exit status: 1)

FAIL: ttest

DW_FORM_addrx value out of range
DW_FORM_addrx value out of range
DW_FORM_addrx value out of range
DW_FORM_addrx value out of range
DW_FORM_addrx value out of range
no debug info in Mach-O executable (make sure to compile with -g; may need to run dsymutil)
no debug info in Mach-O executable (make sure to compile with -g; may need to run dsymutil)
no debug info in Mach-O executable (make sure to compile with -g; may need to run dsymutil)
no debug info in Mach-O executable (make sure to compile with -g; may need to run dsymutil)
test1: not enough frames; got 0, expected at least 3
no debug info in Mach-O executable (make sure to compile with -g; may need to run dsymutil)
no debug info in Mach-O executable (make sure to compile with -g; may need to run dsymutil)
no debug info in Mach-O executable (make sure to compile with -g; may need to run dsymutil)
no debug info in Mach-O executable (make sure to compile with -g; may need to run dsymutil)
test1: not enough frames; got 0, expected at least 3
no debug info in Mach-O executable (make sure to compile with -g; may need to run dsymutil)
no debug info in Mach-O executable (make sure to compile with -g; may need to run dsymutil)
DW_FORM_addrx value out of range
DW_FORM_addrx value out of range
no debug info in Mach-O executable (make sure to compile with -g; may need to run dsymutil)
no debug info in Mach-O executable (make sure to compile with -g; may need to run dsymutil)
no debug info in Mach-O executable (make sure to compile with -g; may need to run dsymutil)
no debug info in Mach-O executable (make sure to compile with -g; may need to run dsymutil)
no debug info in Mach-O executable (make sure to compile with -g; may need to run dsymutil)
no debug info in Mach-O executable (make sure to compile with -g; may need to run dsymutil)
no debug info in Mach-O executable (make sure to compile with -g; may need to run dsymutil)
no debug info in Mach-O executable (make sure to compile with -g; may need to run dsymutil)
test1: not enough frames; got 0, expected at least 3
no debug info in Mach-O executable (make sure to compile with -g; may need to run dsymutil)
DW_FORM_addrx value out of range
test1: not enough frames; got 0, expected at least 3
DW_FORM_addrx value out of range
no debug info in Mach-O executable (make sure to compile with -g; may need to run dsymutil)
no debug info in Mach-O executable (make sure to compile with -g; may need to run dsymutil)
test1: not enough frames; got 0, expected at least 3
no debug info in Mach-O executable (make sure to compile with -g; may need to run dsymutil)
no debug info in Mach-O executable (make sure to compile with -g; may need to run dsymutil)
no debug info in Mach-O executable (make sure to compile with -g; may need to run dsymutil)
no debug info in Mach-O executable (make sure to compile with -g; may need to run dsymutil)
test1: not enough frames; got 0, expected at least 3
no debug info in Mach-O executable (make sure to compile with -g; may need to run dsymutil)
no debug info in Mach-O executable (make sure to compile with -g; may need to run dsymutil)
no debug info in Mach-O executable (make sure to compile with -g; may need to run dsymutil)
test1: not enough frames; got 0, expected at least 3
DW_FORM_addrx value out of range
no debug info in Mach-O executable (make sure to compile with -g; may need to run dsymutil)
no debug info in Mach-O executable (make sure to compile with -g; may need to run dsymutil)
no debug info in Mach-O executable (make sure to compile with -g; may need to run dsymutil)
no debug info in Mach-O executable (make sure to compile with -g; may need to run dsymutil)
test1: not enough frames; got 0, expected at least 3
no debug info in Mach-O executable (make sure to compile with -g; may need to run dsymutil)
no debug info in Mach-O executable (make sure to compile with -g; may need to run dsymutil)
no debug info in Mach-O executable (make sure to compile with -g; may need to run dsymutil)
no debug info in Mach-O executable (make sure to compile with -g; may need to run dsymutil)
test1: not enough frames; got 0, expected at least 3
no debug info in Mach-O executable (make sure to compile with -g; may need to run dsymutil)
no debug info in Mach-O executable (make sure to compile with -g; may need to run dsymutil)
no debug info in Mach-O executable (make sure to compile with -g; may need to run dsymutil)
no debug info in Mach-O executable (make sure to compile with -g; may need to run dsymutil)
test1: not enough frames; got 0, expected at least 3
FAIL: threaded backtrace_full noinline
FAIL ttest (exit status: 1)

FAIL: ttest_alloc

DW_FORM_addrx value out of range
DW_FORM_addrx value out of range
DW_FORM_addrx value out of range
DW_FORM_addrx value out of range
no debug info in Mach-O executable (make sure to compile with -g; may need to run dsymutil)
no debug info in Mach-O executable (make sure to compile with -g; may need to run dsymutil)
no debug info in Mach-O executable (make sure to compile with -g; may need to run dsymutil)
no debug info in Mach-O executable (make sure to compile with -g; may need to run dsymutil)
DW_FORM_addrx value out of range
no debug info in Mach-O executable (make sure to compile with -g; may need to run dsymutil)
no debug info in Mach-O executable (make sure to compile with -g; may need to run dsymutil)
no debug info in Mach-O executable (make sure to compile with -g; may need to run dsymutil)
no debug info in Mach-O executable (make sure to compile with -g; may need to run dsymutil)
test1: not enough frames; got 0, expected at least 3
no debug info in Mach-O executable (make sure to compile with -g; may need to run dsymutil)
no debug info in Mach-O executable (make sure to compile with -g; may need to run dsymutil)
no debug info in Mach-O executable (make sure to compile with -g; may need to run dsymutil)
no debug info in Mach-O executable (make sure to compile with -g; may need to run dsymutil)
test1: not enough frames; got 0, expected at least 3
no debug info in Mach-O executable (make sure to compile with -g; may need to run dsymutil)
no debug info in Mach-O executable (make sure to compile with -g; may need to run dsymutil)
no debug info in Mach-O executable (make sure to compile with -g; may need to run dsymutil)
no debug info in Mach-O executable (make sure to compile with -g; may need to run dsymutil)
test1: not enough frames; got 0, expected at least 3
DW_FORM_addrx value out of range
no debug info in Mach-O executable (make sure to compile with -g; may need to run dsymutil)
DW_FORM_addrx value out of range
DW_FORM_addrx value out of range
no debug info in Mach-O executable (make sure to compile with -g; may need to run dsymutil)
no debug info in Mach-O executable (make sure to compile with -g; may need to run dsymutil)
no debug info in Mach-O executable (make sure to compile with -g; may need to run dsymutil)
DW_FORM_addrx value out of rangetest1: not enough frames; got 0, expected at least 3
DW_FORM_addrx value out of range
no debug info in Mach-O executable (make sure to compile with -g; may need to run dsymutil)
test1: not enough frames; got 0, expected at least 3
no debug info in Mach-O executable (make sure to compile with -g; may need to run dsymutil)
no debug info in Mach-O executable (make sure to compile with -g; may need to run dsymutil)
no debug info in Mach-O executable (make sure to compile with -g; may need to run dsymutil)
no debug info in Mach-O executable (make sure to compile with -g; may need to run dsymutil)
no debug info in Mach-O executable (make sure to compile with -g; may need to run dsymutil)
no debug info in Mach-O executable (make sure to compile with -g; may need to run dsymutil)
test1: not enough frames; got 0, expected at least 3
no debug info in Mach-O executable (make sure to compile with -g; may need to run dsymutil)
test1: not enough frames; got 0, expected at least 3

no debug info in Mach-O executable (make sure to compile with -g; may need to run dsymutil)
no debug info in Mach-O executable (make sure to compile with -g; may need to run dsymutil)
no debug info in Mach-O executable (make sure to compile with -g; may need to run dsymutil)
no debug info in Mach-O executable (make sure to compile with -g; may need to run dsymutil)
test1: not enough frames; got 0, expected at least 3
no debug info in Mach-O executable (make sure to compile with -g; may need to run dsymutil)
no debug info in Mach-O executable (make sure to compile with -g; may need to run dsymutil)
no debug info in Mach-O executable (make sure to compile with -g; may need to run dsymutil)
no debug info in Mach-O executable (make sure to compile with -g; may need to run dsymutil)
test1: not enough frames; got 0, expected at least 3
no debug info in Mach-O executable (make sure to compile with -g; may need to run dsymutil)
no debug info in Mach-O executable (make sure to compile with -g; may need to run dsymutil)
no debug info in Mach-O executable (make sure to compile with -g; may need to run dsymutil)
no debug info in Mach-O executable (make sure to compile with -g; may need to run dsymutil)
test1: not enough frames; got 0, expected at least 3
FAIL: threaded backtrace_full noinline
FAIL ttest_alloc (exit status: 1)

FAIL: dwarf5

DW_FORM_addrx value out of range
no debug info in Mach-O executable (make sure to compile with -g; may need to run dsymutil)
no debug info in Mach-O executable (make sure to compile with -g; may need to run dsymutil)
no debug info in Mach-O executable (make sure to compile with -g; may need to run dsymutil)
no debug info in Mach-O executable (make sure to compile with -g; may need to run dsymutil)
test1: not enough frames; got 0, expected at least 3
no debug info in Mach-O executable (make sure to compile with -g; may need to run dsymutil)
no debug info in Mach-O executable (make sure to compile with -g; may need to run dsymutil)
no debug info in Mach-O executable (make sure to compile with -g; may need to run dsymutil)
no debug info in Mach-O executable (make sure to compile with -g; may need to run dsymutil)
no debug info in Mach-O executable (make sure to compile with -g; may need to run dsymutil)
FAIL: backtrace_full noinline
FAIL: backtrace_full inline
FAIL: backtrace_simple noinline
FAIL: backtrace_simple inline
PASS: backtrace_syminfo variable
FAIL dwarf5 (exit status: 1)

FAIL: dwarf5_alloc

DW_FORM_addrx value out of range
no debug info in Mach-O executable (make sure to compile with -g; may need to run dsymutil)
no debug info in Mach-O executable (make sure to compile with -g; may need to run dsymutil)
no debug info in Mach-O executable (make sure to compile with -g; may need to run dsymutil)
no debug info in Mach-O executable (make sure to compile with -g; may need to run dsymutil)
test1: not enough frames; got 0, expected at least 3
no debug info in Mach-O executable (make sure to compile with -g; may need to run dsymutil)
no debug info in Mach-O executable (make sure to compile with -g; may need to run dsymutil)
no debug info in Mach-O executable (make sure to compile with -g; may need to run dsymutil)
no debug info in Mach-O executable (make sure to compile with -g; may need to run dsymutil)
no debug info in Mach-O executable (make sure to compile with -g; may need to run dsymutil)
FAIL: backtrace_full noinline
FAIL: backtrace_full inline
FAIL: backtrace_simple noinline
FAIL: backtrace_simple inline
PASS: backtrace_syminfo variable
FAIL dwarf5_alloc (exit status: 1)

FAIL: mtest

DW_FORM_addrx value out of range
no debug info in Mach-O executable (make sure to compile with -g; may need to run dsymutil)
no debug info in Mach-O executable (make sure to compile with -g; may need to run dsymutil)
no debug info in Mach-O executable (make sure to compile with -g; may need to run dsymutil)
no debug info in Mach-O executable (make sure to compile with -g; may need to run dsymutil)
test1: not enough frames; got 0, expected at least 3
FAIL: backtrace_full noinline
PASS: backtrace_simple noinline
PASS: backtrace_syminfo variable
FAIL mtest (exit status: 1)

@ianlancetaylor
Copy link
Owner

Which version of clang are you using?

Also, which version of libbacktrace? The symptoms are similar to a bug that was fixed in revision 4ead348.

@nolaforensix
Copy link
Author

Hi,

It's the clang installed with Sequoia's version of XCode and a fresh git clone from the repo:

thelonious:scalpel3 golden$ clang --version
Apple clang version 16.0.0 (clang-1600.0.26.3)
Target: arm64-apple-darwin24.0.0
Thread model: posix
InstalledDir: /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin

@pnsafonov
Copy link

pnsafonov commented Oct 1, 2024

Bug is reproduced.

% clang --version Apple clang version 16.0.0 (clang-1600.0.26.3) Target: arm64-apple-darwin24.0.0 Thread model: posix InstalledDir: /Library/Developer/CommandLineTools/usr/bin
libbacktrace_macos_tests.txt

macOS Sequoia 15.0

latest version of master libbacktrace:
commit 86885d1 (HEAD -> master, origin/master, origin/HEAD)
Author: Ian Lance Taylor [email protected]
Date: Tue Jul 16 21:27:05 2024 -0700

@pnsafonov
Copy link

backtrace_error_callback error_callback returns this:
msg = no debug info in Mach-O executable (make sure to compile with -g; may need to run dsymutil)
errnum = -1

@nolaforensix
Copy link
Author

This is probably already clear, but just wanted to make sure: The executable IS compiled with -g and dsymutil was also run and the error occurs anyway.

@pnsafonov
Copy link

This is probably already clear, but just wanted to make sure: The executable IS compiled with -g and dsymutil was also run and the error occurs anyway.

I checked:
binary compiled with -g option, symbol table exists in binary and correct.

@ianlancetaylor
Copy link
Owner

@pnsafonov The question is not so much the symbol table, it is where the debug information is. There is a bunch of code in libbacktrace to find it. Evidently that code is failing, but how?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants