https://gcc.gnu.org/bugzilla/show_bug.cgi?id=112398
Rainer Orth <ro at gcc dot gnu.org> changed:
What |Removed |Added
----------------------------------------------------------------------------
CC| |ro at gcc dot gnu.org
--- Comment #9 from Rainer Orth <ro at gcc dot gnu.org> ---
I've just found that this patch was responsible for a large number (ca. 150)
of analyzer failures on 32-bit Solaris/SPARC, like
+FAIL: c-c++-common/analyzer/out-of-bounds-diagram-11.c -std=c++17 (test for
warnings, line 83)
+FAIL: c-c++-common/analyzer/out-of-bounds-diagram-11.c -std=c++17 expected
multiline pattern lines 49-64
+FAIL: c-c++-common/analyzer/out-of-bounds-diagram-11.c -std=c++17 (internal
compiler error: Segmentation Fault)
+FAIL: c-c++-common/analyzer/out-of-bounds-diagram-11.c -std=c++17 (test for
excess errors)
[...]
/vol/gcc/src/hg/master/local/gcc/testsuite/c-c++-common/analyzer/out-of-bounds-diagram-11.c:83:25:
note: (4) out-of-bounds write
terminate called after throwing an instance of 'std::bad_array_new_length'
what(): std::bad_array_new_length
during IPA pass: analyzer
/vol/gcc/src/hg/master/local/gcc/testsuite/c-c++-common/analyzer/out-of-bounds-diagram-11.c:78:3:
internal compiler error: Abort
0x2448bfb internal_error(char const*, ...)
/vol/gcc/src/hg/master/local/gcc/diagnostic-global-context.cc:518
0x141c407 crash_signal
/vol/gcc/src/hg/master/local/gcc/toplev.cc:323
The failures are due to a SEGV (NULL pointer deref) in
Thread 2 received signal SIGSEGV, Segmentation fault.
[Switching to Thread 1 (LWP 1)]
0xfea98a44 in memcpy%sun4v-hwcap5 () from /lib/libc.so.1
(gdb) bt
#0 0xfea98a44 in memcpy%sun4v-hwcap5 () from /lib/libc.so.1
#1 0x0248af90 in std::uninitialized_copy<__gnu_cxx::__normal_iterator<unsigned
int const*, std::vector<unsigned int, std::allocator<unsigned int> > >,
unsigned int*> (__first=..., __last=..., __result=<optimized out>)
at
/var/gcc/regression/master/11.4-gcc/build/prev-sparc-sun-solaris2.11/libstdc++-v3/include/bits/stl_uninitialized.h:267
#2 std::__uninitialized_copy_a<__gnu_cxx::__normal_iterator<unsigned int
const*, std::vector<unsigned int, std::allocator<unsigned int> > >,
__gnu_cxx::__normal_iterator<unsigned int const*, std::vector<unsigned int,
std::allocator<unsigned int> > >, unsigned int*, unsigned int> (__first=...,
__last=...,
__result=<optimized out>)
at
/var/gcc/regression/master/11.4-gcc/build/prev-sparc-sun-solaris2.11/libstdc++-v3/include/bits/stl_uninitialized.h:619
#3 std::vector<unsigned int, std::allocator<unsigned int> >::vector (
this=0xffbfb034, __x=...)
at
/var/gcc/regression/master/11.4-gcc/build/prev-sparc-sun-solaris2.11/libstdc++-v3/include/bits/stl_vector.h:633
#4 text_art::style::style (this=0xffbfb018)
at /vol/gcc/src/hg/master/local/gcc/text-art/types.h:221
#5 text_art::get_style_from_color_cap_name (name=name@entry=0x71a5c8 "valid")
at /vol/gcc/src/hg/master/local/gcc/text-art/style.cc:274
#6 0x0239d0d8 in ana::access_diagram_impl::access_diagram_impl (
this=0x2b161d8, op=..., region_creation_event_id=..., sm=..., theme=...,
logger=0x0)
at /vol/gcc/src/hg/master/local/gcc/analyzer/access-diagram.cc:2063
#7 0x02392600 in make_unique<ana::access_diagram_impl, ana::access_operation
const&, diagnostic_event_id_t&, text_art::style_manager&, text_art::theme
const&, ana::logger*&> () at /vol/gcc/src/hg/master/local/gcc/make-unique.h:39
#8 ana::access_diagram::access_diagram (this=0xffbfb1c0, op=...,
region_creation_event_id=..., sm=..., theme=..., logger=0x0)
at /vol/gcc/src/hg/master/local/gcc/analyzer/access-diagram.cc:2680
#9 0x023a4630 in ana::out_of_bounds::make_access_diagram (this=0x2b10db0,
op=..., sm=..., theme=..., logger=0x0)
at /vol/gcc/src/hg/master/local/gcc/analyzer/bounds-checking.cc:208
#10 ana::out_of_bounds::maybe_show_diagram (this=0x2b10db0, logger=0x0)
at /vol/gcc/src/hg/master/local/gcc/analyzer/bounds-checking.cc:187
#11 0x023a49fc in ana::symbolic_buffer_over_read::emit (this=0x2b10db0,
ctxt=...)
at /vol/gcc/src/hg/master/local/gcc/analyzer/bounds-checking.cc:1161
#12 0x023cf450 in ana::diagnostic_manager::emit_saved_diagnostic (
this=0xffbfb6f4, eg=..., sd=...)
at
/var/gcc/regression/master/11.4-gcc/build/prev-sparc-sun-solaris2.11/libstdc++-v3/include/bits/unique_ptr.h:193
#13 0x023d34c8 in ana::dedupe_winners::emit_best (this=0xffbfb4dc,
dm=0xffbfb6f4, eg=...)
at /vol/gcc/src/hg/master/local/gcc/analyzer/diagnostic-manager.cc:1473
#14 0x023cfa18 in ana::diagnostic_manager::emit_saved_diagnostics (
this=0xffbfb6f4, eg=...)
at /vol/gcc/src/hg/master/local/gcc/analyzer/diagnostic-manager.cc:1525
#15 0x0193fe24 in ana::impl_run_checkers (logger=0x0)
at /vol/gcc/src/hg/master/local/gcc/analyzer/exploded-graph.h:856
#16 0x01941034 in ana::run_checkers ()
at /vol/gcc/src/hg/master/local/gcc/analyzer/analyzer-logging.h:152
#17 0x0192ea60 in (anonymous namespace)::pass_analyzer::execute (this=0x0)
at /vol/gcc/src/hg/master/local/gcc/analyzer/analyzer-pass.cc:87
#18 0x012b5b34 in execute_one_pass (pass=<opt_pass* 0x2a15cc8 "analyzer"(87)>)
at /vol/gcc/src/hg/master/local/gcc/passes.cc:2660
#19 0x012b7384 in execute_ipa_pass_list (
pass=<opt_pass* 0x2a15cc8 "analyzer"(87)>)
at /vol/gcc/src/hg/master/local/gcc/passes.cc:3114
#20 0x00de47d4 in ipa_passes ()
at /vol/gcc/src/hg/master/local/gcc/cgraphunit.cc:2273
#21 symbol_table::compile (this=0xfac12000)
at /vol/gcc/src/hg/master/local/gcc/cgraphunit.cc:2338
#22 0x00de8584 in symbol_table::compile (this=0xfac12000)
at /vol/gcc/src/hg/master/local/gcc/cgraphunit.cc:2316
#23 symbol_table::finalize_compilation_unit (this=0xfac12000)
at /vol/gcc/src/hg/master/local/gcc/cgraphunit.cc:2590
#24 0x0141cc70 in compile_file ()
at /vol/gcc/src/hg/master/local/gcc/toplev.cc:480
#25 0x01420858 in do_compile ()
at /vol/gcc/src/hg/master/local/gcc/toplev.cc:2211
#26 toplev::main (this=<optimized out>, argc=<optimized out>,
argv=<optimized out>) at /vol/gcc/src/hg/master/local/gcc/toplev.cc:2371
#27 0x02406940 in main (argc=25, argv=0xffbfe73c)
at /vol/gcc/src/hg/master/local/gcc/main.cc:39
and only occur in stage 2 and up, which points to a codegen error.