public inbox for gcc-bugs@sourceware.org
help / color / mirror / Atom feed
* [Bug sanitizer/114956] New: Segmentation fault with -fsanitize=address -fsanitize=null -O2 when attribute no_sanitize_address is enabled
@ 2024-05-06  3:37 iamanonymous.cs at gmail dot com
  2024-05-06  7:21 ` [Bug sanitizer/114956] [11/12/13/14/15 regression] " sjames at gcc dot gnu.org
                   ` (11 more replies)
  0 siblings, 12 replies; 13+ messages in thread
From: iamanonymous.cs at gmail dot com @ 2024-05-06  3:37 UTC (permalink / raw)
  To: gcc-bugs

https://gcc.gnu.org/bugzilla/show_bug.cgi?id=114956

            Bug ID: 114956
           Summary: Segmentation fault with -fsanitize=address
                    -fsanitize=null -O2 when attribute no_sanitize_address
                    is enabled
           Product: gcc
           Version: 15.0
            Status: UNCONFIRMED
          Severity: normal
          Priority: P3
         Component: sanitizer
          Assignee: unassigned at gcc dot gnu.org
          Reporter: iamanonymous.cs at gmail dot com
                CC: dodji at gcc dot gnu.org, dvyukov at gcc dot gnu.org,
                    jakub at gcc dot gnu.org, kcc at gcc dot gnu.org
  Target Milestone: ---

Compiler Explorer: https://godbolt.org/z/33rbWdf49

*******************************************************************************
gcc version:
$ gcc -v
Using built-in specs.
COLLECT_GCC=/home/gcc_set/gcc-trunk/bin/gcc
COLLECT_LTO_WRAPPER=/home/gcc_set/gcc-trunk/libexec/gcc/aarch64-unknown-linux-gnu/15.0.0/lto-wrapper
Target: aarch64-unknown-linux-gnu
Configured with: ../gcc/configure --prefix=/home/gcc_set/gcc-trunk
--with-gmp=/home/build_essential --with-mpfr=/home/build_essential
--with-mpc=/home/build_essential --enable-languages=c,c++ --disable-multilib
--with-sanitizer=address,undefined,thread,leakcd CC=gcc CXX=g++
Thread model: posix
Supported LTO compression algorithms: zlib
gcc version 15.0.0 20240430 (experimental) (GCC)

git version: 22b20ac6c6aead2d3f36c413a77dd0b80adfec39
*******************************************************************************
Program:
$ cat mutant.c
int **a;
__attribute__((always_inline)) int *c() {
  int b[1];
  b;
}
__attribute__((no_sanitize_address)) static char d() { *a = c(); }
void e() { d(); }

*******************************************************************************
Command Lines:
$ gcc -fsanitize=address -fsanitize=null -O2 -c mutant.c
mutant.c:2:37: warning: 'always_inline' function might not be inlinable unless
also declared 'inline' [-Wattributes]
    2 | __attribute__((always_inline)) int *c() {
      |                                     ^
during GIMPLE pass: sanopt
mutant.c: In function 'd.isra':
mutant.c:6:50: internal compiler error: Segmentation fault
    6 | __attribute__((no_sanitize_address)) static char d() { *a = c(); }
      |                                                  ^
0xf2d49b crash_signal
        ../../gcc/gcc/toplev.cc:319
0xf3fcfc contains_struct_check(tree_node*, tree_node_structure_enum, char
const*, int, char const*)
        ../../gcc/gcc/tree.h:3769
0xf3fcfc build_shadow_mem_access
        ../../gcc/gcc/asan.cc:2552
0xf4b90f asan_expand_mark_ifn(gimple_stmt_iterator*)
        ../../gcc/gcc/asan.cc:3854
0xf5f6bf execute
        ../../gcc/gcc/sanopt.cc:1379
Please submit a full bug report, with preprocessed source (by using
-freport-bug).
Please include the complete backtrace with any bug report.
See <https://gcc.gnu.org/bugs/> for instructions

^ permalink raw reply	[flat|nested] 13+ messages in thread

end of thread, other threads:[~2024-06-20 13:44 UTC | newest]

Thread overview: 13+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2024-05-06  3:37 [Bug sanitizer/114956] New: Segmentation fault with -fsanitize=address -fsanitize=null -O2 when attribute no_sanitize_address is enabled iamanonymous.cs at gmail dot com
2024-05-06  7:21 ` [Bug sanitizer/114956] [11/12/13/14/15 regression] " sjames at gcc dot gnu.org
2024-05-06  8:04 ` [Bug sanitizer/114956] [11/12/13/14/15 Regression] Segmentation fault with -fsanitize=address -fsanitize=null -O2 when attribute no_sanitize_address is enabled since r9-5742 jakub at gcc dot gnu.org
2024-05-06  8:58 ` jakub at gcc dot gnu.org
2024-05-07 19:29 ` cvs-commit at gcc dot gnu.org
2024-05-07 19:31 ` cvs-commit at gcc dot gnu.org
2024-05-07 19:32 ` [Bug sanitizer/114956] [11/12/13 " jakub at gcc dot gnu.org
2024-05-09  4:26 ` cvs-commit at gcc dot gnu.org
2024-05-09  8:18 ` [Bug sanitizer/114956] [11/12 " jakub at gcc dot gnu.org
2024-06-11 10:38 ` cvs-commit at gcc dot gnu.org
2024-06-11 10:53 ` [Bug sanitizer/114956] [11 " jakub at gcc dot gnu.org
2024-06-20 13:23 ` cvs-commit at gcc dot gnu.org
2024-06-20 13:44 ` jakub at gcc dot gnu.org

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).