public inbox for gcc-bugs@sourceware.org
help / color / mirror / Atom feed
* [Bug tree-optimization/103456] New: [12 Regression] gcc/gcc.c:9502:8: runtime error: load of address 0x0000009f5037 with insufficient space for an object of type 'const char' since r12-5548-g4a2007594cff78fba6a29a0ec07fad31a7af19ff
@ 2021-11-28 15:12 marxin at gcc dot gnu.org
  2021-11-28 15:13 ` [Bug tree-optimization/103456] " marxin at gcc dot gnu.org
                   ` (8 more replies)
  0 siblings, 9 replies; 10+ messages in thread
From: marxin at gcc dot gnu.org @ 2021-11-28 15:12 UTC (permalink / raw)
  To: gcc-bugs

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

            Bug ID: 103456
           Summary: [12 Regression] gcc/gcc.c:9502:8: runtime error: load
                    of address 0x0000009f5037 with insufficient space for
                    an object of type 'const char' since
                    r12-5548-g4a2007594cff78fba6a29a0ec07fad31a7af19ff
           Product: gcc
           Version: 12.0
            Status: UNCONFIRMED
          Severity: normal
          Priority: P3
         Component: tree-optimization
          Assignee: unassigned at gcc dot gnu.org
          Reporter: marxin at gcc dot gnu.org
                CC: siddhesh at redhat dot com
  Target Milestone: ---

GCC UBSAN bootstrap is broken since the revision:
../configure --with-build-config=bootstrap-ubsan --enable-languages=c,c++
--disable-multilib --enable-shared

/home/marxin/Programming/gcc/objdir/./gcc/xgcc
-B/home/marxin/Programming/gcc/objdir/./gcc/
-B/usr/local/x86_64-pc-linux-gnu/bin/ -B/usr/local/x86_64-pc-linux-gnu/lib/
-isystem /usr/local/x86_64-pc-linux-gnu/include -isystem
/usr/local/x86_64-pc-linux-gnu/sys-include   -fno-checking -g -O2 -O2  -g -O2
-DIN_GCC    -W -Wall -Wno-narrowing -Wwrite-strings -Wcast-qual
-Wno-error=format-diag -Wstrict-prototypes -Wmissing-prototypes
-Wno-error=format-diag -Wold-style-definition  -isystem ./include  -fpic
-mlong-double-80 -DUSE_ELF_SYMVER -fcf-protection -mshstk -g -DIN_LIBGCC2
-fbuilding-libgcc -fno-stack-protector  -fpic -mlong-double-80 -DUSE_ELF_SYMVER
-fcf-protection -mshstk -I. -I. -I../.././gcc -I../../../libgcc
-I../../../libgcc/. -I../../../libgcc/../gcc -I../../../libgcc/../include
-I../../../libgcc/config/libbid -DENABLE_DECIMAL_BID_FORMAT -DHAVE_CC_TLS 
-DUSE_TLS  -o _divdc3.o -MT _divdc3.o -MD -MP -MF _divdc3.dep -DL_divdc3 -c
../../../libgcc/libgcc2.c -fvisibility=hidden -DHIDE_EXPORTS
../../gcc/gcc.c:9494:11: runtime error: load of address 0x0000009f5034 with
insufficient space for an object of type 'const char'
0x0000009f5034: note: pointer points here
  6d 36 34 20 6d 36 34 3b  6d 33 32 20 6d 33 32 3b  00 00 00 00 00 00 00 00  21
00 00 00 00 00 00 00
              ^ 
    #0 0x43f0ee in used_arg_t::operator()(char const*, int)
../../gcc/gcc.c:9494
    #1 0x441ba9 in set_multilib_dir ../../gcc/gcc.c:9797
    #2 0x441ba9 in driver::set_up_specs() const ../../gcc/gcc.c:8544
    #3 0x412dc6 in driver::main(int, char**) ../../gcc/gcc.c:8126
    #4 0x413987 in main ../../gcc/gcc-main.c:47
    #5 0x7ffff7ce05bf in __libc_start_call_main (/lib64/libc.so.6+0x405bf)
    #6 0x7ffff7ce067b in __libc_start_main_alias_2 (/lib64/libc.so.6+0x4067b)
    #7 0x413b04 in _start
(/home/marxin/Programming/gcc/objdir/gcc/xgcc+0x413b04)

../../gcc/gcc.c:9494:11: runtime error: load of address 0x0000009f5034 with
insufficient space for an object of type 'const char'
0x0000009f5034: note: pointer points here
  6d 36 34 20 6d 36 34 3b  6d 33 32 20 6d 33 32 3b  00 00 00 00 00 00 00 00  21
00 00 00 00 00 00 00
              ^ 
    #0 0x43f101 in used_arg_t::operator()(char const*, int)
../../gcc/gcc.c:9494
    #1 0x441ba9 in set_multilib_dir ../../gcc/gcc.c:9797
    #2 0x441ba9 in driver::set_up_specs() const ../../gcc/gcc.c:8544
    #3 0x412dc6 in driver::main(int, char**) ../../gcc/gcc.c:8126
    #4 0x413987 in main ../../gcc/gcc-main.c:47
    #5 0x7ffff7ce05bf in __libc_start_call_main (/lib64/libc.so.6+0x405bf)
    #6 0x7ffff7ce067b in __libc_start_main_alias_2 (/lib64/libc.so.6+0x4067b)
    #7 0x413b04 in _start
(/home/marxin/Programming/gcc/objdir/gcc/xgcc+0x413b04)

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

* [Bug tree-optimization/103456] [12 Regression] gcc/gcc.c:9502:8: runtime error: load of address 0x0000009f5037 with insufficient space for an object of type 'const char' since r12-5548-g4a2007594cff78fba6a29a0ec07fad31a7af19ff
  2021-11-28 15:12 [Bug tree-optimization/103456] New: [12 Regression] gcc/gcc.c:9502:8: runtime error: load of address 0x0000009f5037 with insufficient space for an object of type 'const char' since r12-5548-g4a2007594cff78fba6a29a0ec07fad31a7af19ff marxin at gcc dot gnu.org
@ 2021-11-28 15:13 ` marxin at gcc dot gnu.org
  2021-11-28 23:43 ` pinskia at gcc dot gnu.org
                   ` (7 subsequent siblings)
  8 siblings, 0 replies; 10+ messages in thread
From: marxin at gcc dot gnu.org @ 2021-11-28 15:13 UTC (permalink / raw)
  To: gcc-bugs

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

Martin Liška <marxin at gcc dot gnu.org> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
             Status|UNCONFIRMED                 |NEW
           Priority|P3                          |P1
   Last reconfirmed|                            |2021-11-28
   Target Milestone|---                         |12.0
     Ever confirmed|0                           |1

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

* [Bug tree-optimization/103456] [12 Regression] gcc/gcc.c:9502:8: runtime error: load of address 0x0000009f5037 with insufficient space for an object of type 'const char' since r12-5548-g4a2007594cff78fba6a29a0ec07fad31a7af19ff
  2021-11-28 15:12 [Bug tree-optimization/103456] New: [12 Regression] gcc/gcc.c:9502:8: runtime error: load of address 0x0000009f5037 with insufficient space for an object of type 'const char' since r12-5548-g4a2007594cff78fba6a29a0ec07fad31a7af19ff marxin at gcc dot gnu.org
  2021-11-28 15:13 ` [Bug tree-optimization/103456] " marxin at gcc dot gnu.org
@ 2021-11-28 23:43 ` pinskia at gcc dot gnu.org
  2021-11-29 15:10 ` siddhesh at gotplt dot org
                   ` (6 subsequent siblings)
  8 siblings, 0 replies; 10+ messages in thread
From: pinskia at gcc dot gnu.org @ 2021-11-28 23:43 UTC (permalink / raw)
  To: gcc-bugs

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

Andrew Pinski <pinskia at gcc dot gnu.org> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
           Severity|normal                      |blocker

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

* [Bug tree-optimization/103456] [12 Regression] gcc/gcc.c:9502:8: runtime error: load of address 0x0000009f5037 with insufficient space for an object of type 'const char' since r12-5548-g4a2007594cff78fba6a29a0ec07fad31a7af19ff
  2021-11-28 15:12 [Bug tree-optimization/103456] New: [12 Regression] gcc/gcc.c:9502:8: runtime error: load of address 0x0000009f5037 with insufficient space for an object of type 'const char' since r12-5548-g4a2007594cff78fba6a29a0ec07fad31a7af19ff marxin at gcc dot gnu.org
  2021-11-28 15:13 ` [Bug tree-optimization/103456] " marxin at gcc dot gnu.org
  2021-11-28 23:43 ` pinskia at gcc dot gnu.org
@ 2021-11-29 15:10 ` siddhesh at gotplt dot org
  2021-11-29 15:19 ` marxin at gcc dot gnu.org
                   ` (5 subsequent siblings)
  8 siblings, 0 replies; 10+ messages in thread
From: siddhesh at gotplt dot org @ 2021-11-29 15:10 UTC (permalink / raw)
  To: gcc-bugs

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

Siddhesh Poyarekar <siddhesh at gotplt dot org> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
                 CC|                            |siddhesh at gotplt dot org

--- Comment #1 from Siddhesh Poyarekar <siddhesh at gotplt dot org> ---
I'm looking at this, I don't seem to have the right blessings to assign it to
myself though.

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

* [Bug tree-optimization/103456] [12 Regression] gcc/gcc.c:9502:8: runtime error: load of address 0x0000009f5037 with insufficient space for an object of type 'const char' since r12-5548-g4a2007594cff78fba6a29a0ec07fad31a7af19ff
  2021-11-28 15:12 [Bug tree-optimization/103456] New: [12 Regression] gcc/gcc.c:9502:8: runtime error: load of address 0x0000009f5037 with insufficient space for an object of type 'const char' since r12-5548-g4a2007594cff78fba6a29a0ec07fad31a7af19ff marxin at gcc dot gnu.org
                   ` (2 preceding siblings ...)
  2021-11-29 15:10 ` siddhesh at gotplt dot org
@ 2021-11-29 15:19 ` marxin at gcc dot gnu.org
  2021-11-30  0:41 ` siddhesh at gcc dot gnu.org
                   ` (4 subsequent siblings)
  8 siblings, 0 replies; 10+ messages in thread
From: marxin at gcc dot gnu.org @ 2021-11-29 15:19 UTC (permalink / raw)
  To: gcc-bugs

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

Martin Liška <marxin at gcc dot gnu.org> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
           Assignee|unassigned at gcc dot gnu.org      |siddhesh at gotplt dot org

--- Comment #2 from Martin Liška <marxin at gcc dot gnu.org> ---
(In reply to Siddhesh Poyarekar from comment #1)
> I'm looking at this, I don't seem to have the right blessings to assign it
> to myself though.

Heh :) The blessing is provided only to bugzilla accounts ending with
@gcc.gnu.org.

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

* [Bug tree-optimization/103456] [12 Regression] gcc/gcc.c:9502:8: runtime error: load of address 0x0000009f5037 with insufficient space for an object of type 'const char' since r12-5548-g4a2007594cff78fba6a29a0ec07fad31a7af19ff
  2021-11-28 15:12 [Bug tree-optimization/103456] New: [12 Regression] gcc/gcc.c:9502:8: runtime error: load of address 0x0000009f5037 with insufficient space for an object of type 'const char' since r12-5548-g4a2007594cff78fba6a29a0ec07fad31a7af19ff marxin at gcc dot gnu.org
                   ` (3 preceding siblings ...)
  2021-11-29 15:19 ` marxin at gcc dot gnu.org
@ 2021-11-30  0:41 ` siddhesh at gcc dot gnu.org
  2021-11-30 15:56 ` marxin at gcc dot gnu.org
                   ` (3 subsequent siblings)
  8 siblings, 0 replies; 10+ messages in thread
From: siddhesh at gcc dot gnu.org @ 2021-11-30  0:41 UTC (permalink / raw)
  To: gcc-bugs

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

Siddhesh Poyarekar <siddhesh at gcc dot gnu.org> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
                 CC|siddhesh at redhat dot com         |
             Status|NEW                         |ASSIGNED

--- Comment #3 from Siddhesh Poyarekar <siddhesh at gcc dot gnu.org> ---
(In reply to Martin Liška from comment #2)
> Heh :) The blessing is provided only to bugzilla accounts ending with
> @gcc.gnu.org.

Aha, fixed.

Confirmed that backing out r12-5548-g4a2007594cff78fba6a29a0ec07fad31a7af19ff
fixes the problem.  Now to figure out what the problem is.

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

* [Bug tree-optimization/103456] [12 Regression] gcc/gcc.c:9502:8: runtime error: load of address 0x0000009f5037 with insufficient space for an object of type 'const char' since r12-5548-g4a2007594cff78fba6a29a0ec07fad31a7af19ff
  2021-11-28 15:12 [Bug tree-optimization/103456] New: [12 Regression] gcc/gcc.c:9502:8: runtime error: load of address 0x0000009f5037 with insufficient space for an object of type 'const char' since r12-5548-g4a2007594cff78fba6a29a0ec07fad31a7af19ff marxin at gcc dot gnu.org
                   ` (4 preceding siblings ...)
  2021-11-30  0:41 ` siddhesh at gcc dot gnu.org
@ 2021-11-30 15:56 ` marxin at gcc dot gnu.org
  2021-12-01  8:31 ` cvs-commit at gcc dot gnu.org
                   ` (2 subsequent siblings)
  8 siblings, 0 replies; 10+ messages in thread
From: marxin at gcc dot gnu.org @ 2021-11-30 15:56 UTC (permalink / raw)
  To: gcc-bugs

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

--- Comment #4 from Martin Liška <marxin at gcc dot gnu.org> ---
Reduced test-case that has a different output in optimized tree-dump:

$ cat gcc.i
static char *multilib_options = "m64/m32";
void used_arg_t() {
  char *q = multilib_options;
  for (;;) {
    while (*q)
      q++;
    while (__builtin_strchr (q, '_') == 0)
      while (*q)
        q++;
  }
}

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

* [Bug tree-optimization/103456] [12 Regression] gcc/gcc.c:9502:8: runtime error: load of address 0x0000009f5037 with insufficient space for an object of type 'const char' since r12-5548-g4a2007594cff78fba6a29a0ec07fad31a7af19ff
  2021-11-28 15:12 [Bug tree-optimization/103456] New: [12 Regression] gcc/gcc.c:9502:8: runtime error: load of address 0x0000009f5037 with insufficient space for an object of type 'const char' since r12-5548-g4a2007594cff78fba6a29a0ec07fad31a7af19ff marxin at gcc dot gnu.org
                   ` (5 preceding siblings ...)
  2021-11-30 15:56 ` marxin at gcc dot gnu.org
@ 2021-12-01  8:31 ` cvs-commit at gcc dot gnu.org
  2021-12-01  9:03 ` siddhesh at gcc dot gnu.org
  2021-12-03 11:12 ` cvs-commit at gcc dot gnu.org
  8 siblings, 0 replies; 10+ messages in thread
From: cvs-commit at gcc dot gnu.org @ 2021-12-01  8:31 UTC (permalink / raw)
  To: gcc-bugs

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

--- Comment #5 from CVS Commits <cvs-commit at gcc dot gnu.org> ---
The master branch has been updated by Siddhesh Poyarekar
<siddhesh@gcc.gnu.org>:

https://gcc.gnu.org/g:da9386f9a70ac494939650c0e0a0e4168a6f76d8

commit r12-5649-gda9386f9a70ac494939650c0e0a0e4168a6f76d8
Author: Siddhesh Poyarekar <siddhesh@gotplt.org>
Date:   Wed Dec 1 12:58:12 2021 +0530

    tree-optimization/103456 - Record only successes from object_sizes_set

    Avoid overwriting osi->changed if object_sizes_set does not update the
    size, so that a previous success in the same pass is not overwritten.
    This fixes the bootstrap-ubsan build config, which was failing due to
    incorrect object size.

    gcc/ChangeLog:

            PR tree-optimization/103456
            * tree-object-size.c (merge_object_sizes): Update osi->changed
            only if object_sizes_set succeeded.

    gcc/testsuite/ChangeLog:

            PR tree-optimization/103456
            * gcc.dg/ubsan/pr103456.c: New test.

    Co-authored-by: Martin Liška <mliska@suse.cz>
    Signed-off-by: Siddhesh Poyarekar <siddhesh@gotplt.org>

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

* [Bug tree-optimization/103456] [12 Regression] gcc/gcc.c:9502:8: runtime error: load of address 0x0000009f5037 with insufficient space for an object of type 'const char' since r12-5548-g4a2007594cff78fba6a29a0ec07fad31a7af19ff
  2021-11-28 15:12 [Bug tree-optimization/103456] New: [12 Regression] gcc/gcc.c:9502:8: runtime error: load of address 0x0000009f5037 with insufficient space for an object of type 'const char' since r12-5548-g4a2007594cff78fba6a29a0ec07fad31a7af19ff marxin at gcc dot gnu.org
                   ` (6 preceding siblings ...)
  2021-12-01  8:31 ` cvs-commit at gcc dot gnu.org
@ 2021-12-01  9:03 ` siddhesh at gcc dot gnu.org
  2021-12-03 11:12 ` cvs-commit at gcc dot gnu.org
  8 siblings, 0 replies; 10+ messages in thread
From: siddhesh at gcc dot gnu.org @ 2021-12-01  9:03 UTC (permalink / raw)
  To: gcc-bugs

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

Siddhesh Poyarekar <siddhesh at gcc dot gnu.org> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
         Resolution|---                         |FIXED
             Status|ASSIGNED                    |RESOLVED

--- Comment #6 from Siddhesh Poyarekar <siddhesh at gcc dot gnu.org> ---
Fixed in trunk.

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

* [Bug tree-optimization/103456] [12 Regression] gcc/gcc.c:9502:8: runtime error: load of address 0x0000009f5037 with insufficient space for an object of type 'const char' since r12-5548-g4a2007594cff78fba6a29a0ec07fad31a7af19ff
  2021-11-28 15:12 [Bug tree-optimization/103456] New: [12 Regression] gcc/gcc.c:9502:8: runtime error: load of address 0x0000009f5037 with insufficient space for an object of type 'const char' since r12-5548-g4a2007594cff78fba6a29a0ec07fad31a7af19ff marxin at gcc dot gnu.org
                   ` (7 preceding siblings ...)
  2021-12-01  9:03 ` siddhesh at gcc dot gnu.org
@ 2021-12-03 11:12 ` cvs-commit at gcc dot gnu.org
  8 siblings, 0 replies; 10+ messages in thread
From: cvs-commit at gcc dot gnu.org @ 2021-12-03 11:12 UTC (permalink / raw)
  To: gcc-bugs

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

--- Comment #7 from CVS Commits <cvs-commit at gcc dot gnu.org> ---
The master branch has been updated by Jakub Jelinek <jakub@gcc.gnu.org>:

https://gcc.gnu.org/g:97ffef3553267f52ca83dbebdcc8b5e3739febee

commit r12-5770-g97ffef3553267f52ca83dbebdcc8b5e3739febee
Author: Jakub Jelinek <jakub@redhat.com>
Date:   Fri Dec 3 12:09:04 2021 +0100

    testsuite: Fix up pr103456.c testcase [PR103456]

    ubsan.exp cycles through torture options, and that includes
    -O2 -flto -fno-fat-lto-objects.  But with those options
    tree dump scans don't work for post-IPA passes, for dg-do
    compile tests nothing after IPA is done.  So we get an
    unresolved testcase:
    gcc.dg/ubsan/pr103456.c   -O2 -flto -fuse-linker-plugin
-fno-fat-lto-objects  : dump file does not exist
    UNRESOLVED: gcc.dg/ubsan/pr103456.c   -O2 -flto -fuse-linker-plugin
-fno-fat-lto-objects   scan-tree-dump-not objsz1 "maximum object size 0"

    Fixed by adding -ffat-lto-objects so that we perform the post-IPA
    passes.

    2021-12-03  Jakub Jelinek  <jakub@redhat.com>

            PR tree-optimization/103456
            * gcc.dg/ubsan/pr103456.c: Add -ffat-lto-objects to dg-options.

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

end of thread, other threads:[~2021-12-03 11:12 UTC | newest]

Thread overview: 10+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2021-11-28 15:12 [Bug tree-optimization/103456] New: [12 Regression] gcc/gcc.c:9502:8: runtime error: load of address 0x0000009f5037 with insufficient space for an object of type 'const char' since r12-5548-g4a2007594cff78fba6a29a0ec07fad31a7af19ff marxin at gcc dot gnu.org
2021-11-28 15:13 ` [Bug tree-optimization/103456] " marxin at gcc dot gnu.org
2021-11-28 23:43 ` pinskia at gcc dot gnu.org
2021-11-29 15:10 ` siddhesh at gotplt dot org
2021-11-29 15:19 ` marxin at gcc dot gnu.org
2021-11-30  0:41 ` siddhesh at gcc dot gnu.org
2021-11-30 15:56 ` marxin at gcc dot gnu.org
2021-12-01  8:31 ` cvs-commit at gcc dot gnu.org
2021-12-01  9:03 ` siddhesh at gcc dot gnu.org
2021-12-03 11:12 ` cvs-commit 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).