#21 ASan crashes with SIGILL on M2 since f40
Closed: Fixed by aodaki. Opened by aodaki.

gcc -fsanitize=address -x c - <<< 'int main(){}' && ./a.out

This command fails with:

Illegal instruction (core dumped)

This is probably fixed in LLVM with: https://github.com/llvm/llvm-project/pull/84061
However, the fix is not included in the latest release of LLVM though I cannot reproduce the same issue with clang included in Fedora.
GCC does not have the fix even in its master branch.


Looks fixed:

$ gcc -fsanitize=address -x c - <<< 'int main(){}' && ./a.out
$  echo $?
0
$ gcc --version
gcc (GCC) 14.2.1 20240912 (Red Hat 14.2.1-3)
Copyright (C) 2024 Free Software Foundation, Inc.
This is free software; see the source for copying conditions.  There is NO
warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
$ lsb_release -d
Description:    Fedora Linux Asahi Remix 40 (Workstation Edition)
$

Metadata Update from @aodaki:
- Issue close_status updated to: Fixed
- Issue status updated to: Closed (was: Open)

Thanks for the great news. Indeed it is fixed with: https://src.fedoraproject.org/rpms/gcc/c/0425b2638c5296d474013d0276c369b19f5c8494
It pulled a fix in GCC tree: https://gcc.gnu.org/git/?p=gcc.git;a=commit;h=24909512101d59807f6d23a9963d64390eca8f60

Metadata