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

[ASAN] clang missing presets macro __SANITIZE_ADDRESS__ #1846

Open
sendaoYan opened this issue Feb 6, 2025 · 0 comments
Open

[ASAN] clang missing presets macro __SANITIZE_ADDRESS__ #1846

sendaoYan opened this issue Feb 6, 2025 · 0 comments

Comments

@sendaoYan
Copy link

gcc:

gcc -fsanitize=address -dM -E - < /dev/null | grep __SANITIZE_ADDRESS__
#define __SANITIZE_ADDRESS__ 1

gcc -v
Using built-in specs.
COLLECT_GCC=gcc
COLLECT_LTO_WRAPPER=/usr/libexec/gcc/x86_64-redhat-linux/10/lto-wrapper
Target: x86_64-redhat-linux
Configured with: ../configure --enable-bootstrap --enable-languages=c,c++,fortran,lto --prefix=/usr --mandir=/usr/share/man --infodir=/usr/share/info --with-bugurl=http://bugzilla.redhat.com/bugzilla --enable-shared --enable-threads=posix --enable-checking=release --disable-multilib --with-system-zlib --enable-__cxa_atexit --disable-libunwind-exceptions --enable-gnu-unique-object --enable-linker-build-id --with-gcc-major-version-only --with-linker-hash-style=gnu --enable-plugin --enable-initfini-array --with-isl --enable-gnu-indirect-function --enable-cet --with-tune=generic --with-arch_32=x86-64 --build=x86_64-redhat-linux
Thread model: posix
Supported LTO compression algorithms: zlib zstd
gcc version 10.2.1 20200825 (Alibaba 10.2.1-3.8 2.32) (GCC) 

clang:

clang -fsanitize=address -dM -E - < /dev/null | grep __SANITIZE_ADDRESS__
clang -fsanitize=address -dM -E - < /dev/null | grep -i sanitize
clang -fsanitize=address -dM -E - < /dev/null | grep -i address
#define __seg_fs __attribute__((address_space(257)))
#define __seg_gs __attribute__((address_space(256)))

clang -v
clang version 17.0.6 (Alibaba Cloud Compiler 17.0.6.4-25.01.22.al8)
Target: x86_64-unknown-linux-gnu
Thread model: posix
InstalledDir: /home/yansendao/software/acc/opt/alibaba-cloud-compiler/bin
Found candidate GCC installation: /opt/rh/gcc-toolset-12/root/usr/lib/gcc/x86_64-redhat-linux/12
Selected GCC installation: /opt/rh/gcc-toolset-12/root/usr/lib/gcc/x86_64-redhat-linux/12
Candidate multilib: .;@m64
Candidate multilib: 32;@m32
Selected multilib: .;@m64
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

1 participant