Bug#996661: clang-13: -static -fsanitize=undefined causes seg fault of a.out

Ryutaroh Matsumoto ryutaroh at ict.e.titech.ac.jp
Sun Oct 17 01:08:18 BST 2021


Package: clang-13
Version: 1:13.0.0-5
Severity: normal

Dear Maintainer,

-static -fsanitize=undefined causes unusable a.out as below:
$ clang-13 -static -fsanitize=undefined hello.c 
$ ./a.out 
Segmentation fault

On the other hand, gcc-11 produces a usable a.out:
$ gcc-11 -static -fsanitize=undefined hello.c 
$ ./a.out 
hello world!

Best regards, Ryutaroh Matsumoto


-- System Information:
Debian Release: bookworm/sid
  APT prefers testing
  APT policy: (990, 'testing'), (500, 'stable-updates'), (500, 'stable-security'), (500, 'unstable'), (500, 'stable'), (1, 'experimental')
Architecture: arm64 (aarch64)

Kernel: Linux 5.14.12-clang13 (SMP w/4 CPU threads; PREEMPT)
Kernel taint flags: TAINT_CRAP
Locale: LANG=en_US.UTF-8, LC_CTYPE=en_US.UTF-8 (charmap=UTF-8), LANGUAGE not set
Shell: /bin/sh linked to /bin/dash
Init: systemd (via /run/systemd/system)
LSM: AppArmor: enabled

Versions of packages clang-13 depends on:
ii  binutils                2.37-7
ii  libc6                   2.32-4
ii  libc6-dev               2.32-4
ii  libclang-common-13-dev  1:13.0.0-5
ii  libclang-cpp13          1:13.0.0-5
ii  libclang1-13            1:13.0.0-5
ii  libgcc-11-dev           11.2.0-9
ii  libgcc-s1               11.2.0-9
ii  libllvm13               1:13.0.0-5
ii  libobjc-11-dev          11.2.0-9
ii  libstdc++-11-dev        11.2.0-9
ii  libstdc++6              11.2.0-9

Versions of packages clang-13 recommends:
ii  llvm-13-dev  1:13.0.0-5
ii  python3      3.9.2-3

Versions of packages clang-13 suggests:
pn  clang-13-doc  <none>

-- no debconf information



More information about the Pkg-llvm-team mailing list