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

--- Comment #3 from Sergei Trofimovich <slyfox at gcc dot gnu.org> ---
(In reply to qinzhao from comment #2)
> could you please reduce the testing case to help me debug?

Will do. Might take some time as I'm not very familiar with `file` code base.

> Are you sure that the new buffer overflow is a false positive?

Not 100% certain, but `-fsanitize=address` does not detect any buffer overrun
failures.

But I suspect it's a false positive as the similar check triggers on gcc's own
code base when it builds other projects. Usually looks like:

*** buffer overflow detected ***: terminated
during IPA pass: simdclone
src/libmpg123/layer3.c:2050:1: internal compiler error: Aborted
 2050 | }
      | ^
0x2233d83 diagnostic_context::diagnostic_impl(rich_location*,
diagnostic_metadata const*, diagnostic_option_id, char const*, __va_list_tag
(*) [1], diagnostic_t)
        ???:0
0x2245ffa internal_error(char const*, ...)
        ???:0
0xeec517 crash_signal(int)
        ???:0
0x7ffff78a253c __pthread_kill_implementation
        ???:0
0x7ffff7842e8d gsignal
        ???:0
0x7ffff78293f7 abort
        ???:0
0x7ffff782a429 __libc_message_impl.cold
        ???:0
0x7ffff7936b18 __GI___fortify_fail
        ???:0
0x7ffff79363e3 __chk_fail
        ???:0
0x7ffff7937f34 ___sprintf_chk
        ???:0
0x20fd454 expand_simd_clones(cgraph_node*) [clone .part.0]
        ???:0
0x20fe430 (anonymous namespace)::pass_omp_simd_clone::execute(function*)
        ???:0

Reply via email to