public inbox for gcc-bugs@sourceware.org
help / color / mirror / Atom feed
* [Bug rtl-optimization/47201] New: [4.6 Regression] ICE: SIGSEGV in adjust_mems (var-tracking.c:814) with -O -fPIC -g
@ 2011-01-07  4:29 zsojka at seznam dot cz
  2011-01-07  9:15 ` [Bug target/47201] [4.5/4.6 " jakub at gcc dot gnu.org
                   ` (5 more replies)
  0 siblings, 6 replies; 7+ messages in thread
From: zsojka at seznam dot cz @ 2011-01-07  4:29 UTC (permalink / raw)
  To: gcc-bugs

http://gcc.gnu.org/bugzilla/show_bug.cgi?id=47201

           Summary: [4.6 Regression] ICE: SIGSEGV in adjust_mems
                    (var-tracking.c:814) with -O -fPIC -g
           Product: gcc
           Version: 4.6.0
            Status: UNCONFIRMED
          Severity: normal
          Priority: P3
         Component: rtl-optimization
        AssignedTo: unassigned@gcc.gnu.org
        ReportedBy: zsojka@seznam.cz
              Host: x86_64-pc-linux-gnu
            Target: x86_64-pc-linux-gnu


Created attachment 22919
  --> http://gcc.gnu.org/bugzilla/attachment.cgi?id=22919
reduced testcase

valgrind output:
$ gcc -O -fPIC -g testcase.c
==20054== Invalid read of size 2
==20054==    at 0xA70C22: adjust_mems (var-tracking.c:814)
==20054==    by 0x8C08FE: simplify_replace_fn_rtx (simplify-rtx.c:371)
==20054==    by 0xA6D075: adjust_mem_uses (var-tracking.c:930)
==20054==    by 0x86387D: note_uses (rtlanal.c:1524)
==20054==    by 0xA7756B: vt_initialize (var-tracking.c:1016)
==20054==    by 0xA80226: variable_tracking_main (var-tracking.c:8532)
==20054==    by 0x7F1F65: execute_one_pass (passes.c:1553)
==20054==    by 0x7F2254: execute_pass_list (passes.c:1608)
==20054==    by 0x7F2266: execute_pass_list (passes.c:1609)
==20054==    by 0x7F2266: execute_pass_list (passes.c:1609)
==20054==    by 0x932325: tree_rest_of_compilation (tree-optimize.c:422)
==20054==    by 0xAF74A1: cgraph_expand_function (cgraphunit.c:1519)
==20054==    by 0xAF9B69: cgraph_optimize (cgraphunit.c:1578)
==20054==    by 0xAFA0E9: cgraph_finalize_compilation_unit (cgraphunit.c:1042)
==20054==    by 0x509D6B: c_write_global_declarations (c-decl.c:9843)
==20054==    by 0x8DBAF5: toplev_main (toplev.c:591)
==20054==    by 0x6369BBC: (below main) (in /lib64/libc-2.11.2.so)
==20054==  Address 0x0 is not stack'd, malloc'd or (recently) free'd
==20054== 
testcase.c: In function 'foo':
testcase.c:13:1: internal compiler error: Segmentation fault
Please submit a full bug report,
with preprocessed source if appropriate.
See <http://gcc.gnu.org/bugs.html> for instructions.



Program received signal SIGSEGV, Segmentation fault.
0x0000000000a70c22 in adjust_mems (loc=0x7ffff5d2d498, old_rtx=0x0,
data=0x7fffffffd740)
    at /usr/portage/distfiles/svn-src/gcc/trunk/gcc/var-tracking.c:814
814               if (mem != loc && !MEM_P (mem))
(gdb) bt
#0  0x0000000000a70c22 in adjust_mems (loc=0x7ffff5d2d498, old_rtx=0x0,
data=0x7fffffffd740)
    at /usr/portage/distfiles/svn-src/gcc/trunk/gcc/var-tracking.c:814
#1  0x00000000008c08ff in simplify_replace_fn_rtx (x=0x7ffff5d2d498,
old_rtx=0x0, fn=0xa70500 <adjust_mems>, 
    data=0x7fffffffd740) at
/usr/portage/distfiles/svn-src/gcc/trunk/gcc/simplify-rtx.c:371
#2  0x0000000000a6d076 in adjust_mem_uses (x=0x7ffff5cd1c28, data=<value
optimized out>)
    at /usr/portage/distfiles/svn-src/gcc/trunk/gcc/var-tracking.c:930
#3  0x000000000086387e in note_uses (pbody=<value optimized out>, fun=0xa6d060
<adjust_mem_uses>, data=0x7fffffffd740)
    at /usr/portage/distfiles/svn-src/gcc/trunk/gcc/rtlanal.c:1524
#4  0x0000000000a7756c in adjust_insn () at
/usr/portage/distfiles/svn-src/gcc/trunk/gcc/var-tracking.c:1016
#5  vt_initialize () at
/usr/portage/distfiles/svn-src/gcc/trunk/gcc/var-tracking.c:8375
#6  0x0000000000a80227 in variable_tracking_main_1 () at
/usr/portage/distfiles/svn-src/gcc/trunk/gcc/var-tracking.c:8532
#7  variable_tracking_main () at
/usr/portage/distfiles/svn-src/gcc/trunk/gcc/var-tracking.c:8584
#8  0x00000000007f1f66 in execute_one_pass (pass=0x163b620) at
/usr/portage/distfiles/svn-src/gcc/trunk/gcc/passes.c:1553
#9  0x00000000007f2255 in execute_pass_list (pass=0x163b620) at
/usr/portage/distfiles/svn-src/gcc/trunk/gcc/passes.c:1608
#10 0x00000000007f2267 in execute_pass_list (pass=0x16381a0) at
/usr/portage/distfiles/svn-src/gcc/trunk/gcc/passes.c:1609
#11 0x00000000007f2267 in execute_pass_list (pass=0x1638200) at
/usr/portage/distfiles/svn-src/gcc/trunk/gcc/passes.c:1609
#12 0x0000000000932326 in tree_rest_of_compilation (fndecl=0x7ffff5cc3f00)
    at /usr/portage/distfiles/svn-src/gcc/trunk/gcc/tree-optimize.c:422
#13 0x0000000000af74a2 in cgraph_expand_function (node=0x7ffff5cc8160)
    at /usr/portage/distfiles/svn-src/gcc/trunk/gcc/cgraphunit.c:1519
#14 0x0000000000af9b6a in cgraph_expand_all_functions () at
/usr/portage/distfiles/svn-src/gcc/trunk/gcc/cgraphunit.c:1578
#15 cgraph_optimize () at
/usr/portage/distfiles/svn-src/gcc/trunk/gcc/cgraphunit.c:1838
#16 0x0000000000afa0ea in cgraph_finalize_compilation_unit ()
    at /usr/portage/distfiles/svn-src/gcc/trunk/gcc/cgraphunit.c:1042
#17 0x0000000000509d6c in c_write_global_declarations () at
/usr/portage/distfiles/svn-src/gcc/trunk/gcc/c-decl.c:9843
#18 0x00000000008dbaf6 in compile_file (argc=15, argv=0x7fffffffdab8)
    at /usr/portage/distfiles/svn-src/gcc/trunk/gcc/toplev.c:591
#19 do_compile (argc=15, argv=0x7fffffffdab8) at
/usr/portage/distfiles/svn-src/gcc/trunk/gcc/toplev.c:1874
#20 toplev_main (argc=15, argv=0x7fffffffdab8) at
/usr/portage/distfiles/svn-src/gcc/trunk/gcc/toplev.c:1937
#21 0x00007ffff6586bbd in __libc_start_main () from /lib/libc.so.6
#22 0x00000000004f0955 in _start ()


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

* [Bug target/47201] [4.5/4.6 Regression] ICE: SIGSEGV in adjust_mems (var-tracking.c:814) with -O -fPIC -g
  2011-01-07  4:29 [Bug rtl-optimization/47201] New: [4.6 Regression] ICE: SIGSEGV in adjust_mems (var-tracking.c:814) with -O -fPIC -g zsojka at seznam dot cz
@ 2011-01-07  9:15 ` jakub at gcc dot gnu.org
  2011-01-07  9:25 ` jakub at gcc dot gnu.org
                   ` (4 subsequent siblings)
  5 siblings, 0 replies; 7+ messages in thread
From: jakub at gcc dot gnu.org @ 2011-01-07  9:15 UTC (permalink / raw)
  To: gcc-bugs

http://gcc.gnu.org/bugzilla/show_bug.cgi?id=47201

Jakub Jelinek <jakub at gcc dot gnu.org> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
           Priority|P3                          |P2
             Status|UNCONFIRMED                 |ASSIGNED
   Last reconfirmed|                            |2011.01.07 08:55:39
          Component|rtl-optimization            |target
                 CC|                            |jakub at gcc dot gnu.org
         AssignedTo|unassigned at gcc dot       |jakub at gcc dot gnu.org
                   |gnu.org                     |
     Ever Confirmed|0                           |1
   Target Milestone|---                         |4.6.0


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

* [Bug target/47201] [4.5/4.6 Regression] ICE: SIGSEGV in adjust_mems (var-tracking.c:814) with -O -fPIC -g
  2011-01-07  4:29 [Bug rtl-optimization/47201] New: [4.6 Regression] ICE: SIGSEGV in adjust_mems (var-tracking.c:814) with -O -fPIC -g zsojka at seznam dot cz
  2011-01-07  9:15 ` [Bug target/47201] [4.5/4.6 " jakub at gcc dot gnu.org
@ 2011-01-07  9:25 ` jakub at gcc dot gnu.org
  2011-01-07 18:43 ` jakub at gcc dot gnu.org
                   ` (3 subsequent siblings)
  5 siblings, 0 replies; 7+ messages in thread
From: jakub at gcc dot gnu.org @ 2011-01-07  9:25 UTC (permalink / raw)
  To: gcc-bugs

http://gcc.gnu.org/bugzilla/show_bug.cgi?id=47201

--- Comment #1 from Jakub Jelinek <jakub at gcc dot gnu.org> 2011-01-07 09:06:37 UTC ---
Created attachment 22920
  --> http://gcc.gnu.org/bugzilla/attachment.cgi?id=22920
gcc46-pr47201.patch

Untested fix.


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

* [Bug target/47201] [4.5/4.6 Regression] ICE: SIGSEGV in adjust_mems (var-tracking.c:814) with -O -fPIC -g
  2011-01-07  4:29 [Bug rtl-optimization/47201] New: [4.6 Regression] ICE: SIGSEGV in adjust_mems (var-tracking.c:814) with -O -fPIC -g zsojka at seznam dot cz
  2011-01-07  9:15 ` [Bug target/47201] [4.5/4.6 " jakub at gcc dot gnu.org
  2011-01-07  9:25 ` jakub at gcc dot gnu.org
@ 2011-01-07 18:43 ` jakub at gcc dot gnu.org
  2011-01-07 19:27 ` [Bug target/47201] [4.5 " jakub at gcc dot gnu.org
                   ` (2 subsequent siblings)
  5 siblings, 0 replies; 7+ messages in thread
From: jakub at gcc dot gnu.org @ 2011-01-07 18:43 UTC (permalink / raw)
  To: gcc-bugs

http://gcc.gnu.org/bugzilla/show_bug.cgi?id=47201

--- Comment #2 from Jakub Jelinek <jakub at gcc dot gnu.org> 2011-01-07 18:41:42 UTC ---
Author: jakub
Date: Fri Jan  7 18:41:40 2011
New Revision: 168582

URL: http://gcc.gnu.org/viewcvs?root=gcc&view=rev&rev=168582
Log:
    PR target/47201
    * config/i386/i386.c (ix86_delegitimize_address): If
    simplify_gen_subreg fails, return orig_x.

    * gcc.dg/pr47201.c: New test.

Added:
    trunk/gcc/testsuite/gcc.dg/pr47201.c
Modified:
    trunk/gcc/ChangeLog
    trunk/gcc/config/i386/i386.c
    trunk/gcc/testsuite/ChangeLog


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

* [Bug target/47201] [4.5 Regression] ICE: SIGSEGV in adjust_mems (var-tracking.c:814) with -O -fPIC -g
  2011-01-07  4:29 [Bug rtl-optimization/47201] New: [4.6 Regression] ICE: SIGSEGV in adjust_mems (var-tracking.c:814) with -O -fPIC -g zsojka at seznam dot cz
                   ` (2 preceding siblings ...)
  2011-01-07 18:43 ` jakub at gcc dot gnu.org
@ 2011-01-07 19:27 ` jakub at gcc dot gnu.org
  2011-01-16 20:42 ` jakub at gcc dot gnu.org
  2011-01-17  8:07 ` jakub at gcc dot gnu.org
  5 siblings, 0 replies; 7+ messages in thread
From: jakub at gcc dot gnu.org @ 2011-01-07 19:27 UTC (permalink / raw)
  To: gcc-bugs

http://gcc.gnu.org/bugzilla/show_bug.cgi?id=47201

Jakub Jelinek <jakub at gcc dot gnu.org> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
      Known to work|                            |4.6.0
            Summary|[4.5/4.6 Regression] ICE:   |[4.5 Regression] ICE:
                   |SIGSEGV in adjust_mems      |SIGSEGV in adjust_mems
                   |(var-tracking.c:814) with   |(var-tracking.c:814) with
                   |-O -fPIC -g                 |-O -fPIC -g
      Known to fail|4.6.0                       |

--- Comment #3 from Jakub Jelinek <jakub at gcc dot gnu.org> 2011-01-07 18:45:47 UTC ---
Fixed on the trunk so far.


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

* [Bug target/47201] [4.5 Regression] ICE: SIGSEGV in adjust_mems (var-tracking.c:814) with -O -fPIC -g
  2011-01-07  4:29 [Bug rtl-optimization/47201] New: [4.6 Regression] ICE: SIGSEGV in adjust_mems (var-tracking.c:814) with -O -fPIC -g zsojka at seznam dot cz
                   ` (3 preceding siblings ...)
  2011-01-07 19:27 ` [Bug target/47201] [4.5 " jakub at gcc dot gnu.org
@ 2011-01-16 20:42 ` jakub at gcc dot gnu.org
  2011-01-17  8:07 ` jakub at gcc dot gnu.org
  5 siblings, 0 replies; 7+ messages in thread
From: jakub at gcc dot gnu.org @ 2011-01-16 20:42 UTC (permalink / raw)
  To: gcc-bugs

http://gcc.gnu.org/bugzilla/show_bug.cgi?id=47201

--- Comment #4 from Jakub Jelinek <jakub at gcc dot gnu.org> 2011-01-16 20:27:57 UTC ---
Author: jakub
Date: Sun Jan 16 20:27:54 2011
New Revision: 168870

URL: http://gcc.gnu.org/viewcvs?root=gcc&view=rev&rev=168870
Log:
    Backport from mainline
    2011-01-07  Jakub Jelinek  <jakub@redhat.com>

    PR target/47201
    * config/i386/i386.c (ix86_delegitimize_address): If
    simplify_gen_subreg fails, return orig_x.

    * gcc.dg/pr47201.c: New test.

Added:
    branches/gcc-4_5-branch/gcc/testsuite/gcc.dg/pr47201.c
Modified:
    branches/gcc-4_5-branch/gcc/ChangeLog
    branches/gcc-4_5-branch/gcc/config/i386/i386.c
    branches/gcc-4_5-branch/gcc/testsuite/ChangeLog


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

* [Bug target/47201] [4.5 Regression] ICE: SIGSEGV in adjust_mems (var-tracking.c:814) with -O -fPIC -g
  2011-01-07  4:29 [Bug rtl-optimization/47201] New: [4.6 Regression] ICE: SIGSEGV in adjust_mems (var-tracking.c:814) with -O -fPIC -g zsojka at seznam dot cz
                   ` (4 preceding siblings ...)
  2011-01-16 20:42 ` jakub at gcc dot gnu.org
@ 2011-01-17  8:07 ` jakub at gcc dot gnu.org
  5 siblings, 0 replies; 7+ messages in thread
From: jakub at gcc dot gnu.org @ 2011-01-17  8:07 UTC (permalink / raw)
  To: gcc-bugs

http://gcc.gnu.org/bugzilla/show_bug.cgi?id=47201

Jakub Jelinek <jakub at gcc dot gnu.org> changed:

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

--- Comment #5 from Jakub Jelinek <jakub at gcc dot gnu.org> 2011-01-17 08:05:40 UTC ---
Fixed.


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

end of thread, other threads:[~2011-01-17  8:05 UTC | newest]

Thread overview: 7+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2011-01-07  4:29 [Bug rtl-optimization/47201] New: [4.6 Regression] ICE: SIGSEGV in adjust_mems (var-tracking.c:814) with -O -fPIC -g zsojka at seznam dot cz
2011-01-07  9:15 ` [Bug target/47201] [4.5/4.6 " jakub at gcc dot gnu.org
2011-01-07  9:25 ` jakub at gcc dot gnu.org
2011-01-07 18:43 ` jakub at gcc dot gnu.org
2011-01-07 19:27 ` [Bug target/47201] [4.5 " jakub at gcc dot gnu.org
2011-01-16 20:42 ` jakub at gcc dot gnu.org
2011-01-17  8:07 ` 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).