public inbox for gcc-bugs@sourceware.org
help / color / mirror / Atom feed
* [Bug middle-end/44817]  New: Stage2/stage3 genautomata has invalid memory access
@ 2010-07-04 23:39 hjl dot tools at gmail dot com
  2010-07-05  0:06 ` [Bug middle-end/44817] " hjl dot tools at gmail dot com
                   ` (4 more replies)
  0 siblings, 5 replies; 6+ messages in thread
From: hjl dot tools at gmail dot com @ 2010-07-04 23:39 UTC (permalink / raw)
  To: gcc-bugs

On Linux/x86-64, revision 161806 gave:

# /usr/bin/valgrind --tool=memcheck build/genautomata
/export/gnu/import/svn/gcc-test/src-trunk/gcc/config/i386/i386.md
insn-conditions.md > /dev/null
==5903== Memcheck, a memory error detector
==5903== Copyright (C) 2002-2009, and GNU GPL'd, by Julian Seward et al.
==5903== Using Valgrind-3.5.0 and LibVEX; rerun with -h for copyright info
==5903== Command: build/genautomata
/export/gnu/import/svn/gcc-test/src-trunk/gcc/config/i386/i386.md
insn-conditions.md
==5903== 
==5903== Invalid read of size 8
==5903==    at 0x401BE7: check_absence_pattern_sets (genautomata.c:4353)
==5903==    by 0x40D85F: create_automata (genautomata.c:3503)
==5903==    by 0x4101D5: expand_automata (genautomata.c:9093)
==5903==    by 0x4115B8: main (genautomata.c:9543)
==5903==  Address 0x1c is not stack'd, malloc'd or (recently) free'd
==5903== 
==5903== 
==5903== Process terminating with default action of signal 11 (SIGSEGV)
==5903==  Access not within mapped region at address 0x1C
==5903==    at 0x401BE7: check_absence_pattern_sets (genautomata.c:4353)
==5903==    by 0x40D85F: create_automata (genautomata.c:3503)
==5903==    by 0x4101D5: expand_automata (genautomata.c:9093)
==5903==    by 0x4115B8: main (genautomata.c:9543)
==5903==  If you believe this happened as a result of a stack
==5903==  overflow in your program's main thread (unlikely but
==5903==  possible), you can try to increase the size of the
==5903==  main thread stack using the --main-stacksize= flag.
==5903==  The main thread stack size used in this run was 8388608.
==5903== 
==5903== HEAP SUMMARY:
==5903==     in use at exit: 11,187,082 bytes in 73,185 blocks
==5903==   total heap usage: 83,419 allocs, 10,234 frees, 32,694,074 bytes
allocated
==5903==


-- 
           Summary: Stage2/stage3 genautomata has invalid memory access
           Product: gcc
           Version: 4.5.1
            Status: UNCONFIRMED
          Severity: normal
          Priority: P3
         Component: middle-end
        AssignedTo: unassigned at gcc dot gnu dot org
        ReportedBy: hjl dot tools at gmail dot com


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


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

* [Bug middle-end/44817] Stage2/stage3 genautomata has invalid memory access
  2010-07-04 23:39 [Bug middle-end/44817] New: Stage2/stage3 genautomata has invalid memory access hjl dot tools at gmail dot com
@ 2010-07-05  0:06 ` hjl dot tools at gmail dot com
  2010-07-05  0:20 ` hjl dot tools at gmail dot com
                   ` (3 subsequent siblings)
  4 siblings, 0 replies; 6+ messages in thread
From: hjl dot tools at gmail dot com @ 2010-07-05  0:06 UTC (permalink / raw)
  To: gcc-bugs



------- Comment #1 from hjl dot tools at gmail dot com  2010-07-05 00:05 -------
The code is

0000000000000260 <check_absence_pattern_sets>:
     260:       41 57                   push   %r15  
     262:       44 8b 1d 00 00 00 00    mov    0x0(%rip),%r11d        # 269
<check_absence_pattern_sets+0x9>
     269:       b8 01 00 00 00          mov    $0x1,%eax
     26e:       41 56                   push   %r14  
     270:       45 85 db                test   %r11d,%r11d
     273:       41 55                   push   %r13  
     275:       41 54                   push   %r12  
     277:       55                      push   %rbp  
     278:       53                      push   %rbx  
     279:       0f 8e 94 00 00 00       jle    313
<check_absence_pattern_sets+0xb3>
     27f:       48 8b 05 00 00 00 00    mov    0x0(%rip),%rax        # 286
<check_absence_pattern_sets+0x26>
     286:       48 8b 0d 00 00 00 00    mov    0x0(%rip),%rcx        # 28d
<check_absence_pattern_sets+0x2d>
     28d:       49 89 f5                mov    %rsi,%r13
     290:       4c 8b 35 00 00 00 00    mov    0x0(%rip),%r14        # 297
<check_absence_pattern_sets+0x37>
     297:       45 31 e4                xor    %r12d,%r12d
     29a:       48 89 44 24 f0          mov    %rax,-0x10(%rsp)
     29f:       48 89 4c 24 f8          mov    %rcx,-0x8(%rsp)
                                        ^^^^^^^^^^^^^^^^^^^^^^^ Is this safe?
...
     350:       48 8b 4c 24 f8          mov    -0x8(%rsp),%rcx
                                               ^^^^^^^^^^^ This is 0.
     355:       48 98                   cltq
     357:       4c 8b 14 c1             mov    (%rcx,%rax,8),%r10
     35b:       eb 80                   jmp    2dd
<check_absence_pattern_sets+0x7d>


-- 

hjl dot tools at gmail dot com changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
                 CC|                            |ubizjak at gmail dot com
            Version|4.5.1                       |4.6.0


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


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

* [Bug middle-end/44817] Stage2/stage3 genautomata has invalid memory access
  2010-07-04 23:39 [Bug middle-end/44817] New: Stage2/stage3 genautomata has invalid memory access hjl dot tools at gmail dot com
  2010-07-05  0:06 ` [Bug middle-end/44817] " hjl dot tools at gmail dot com
@ 2010-07-05  0:20 ` hjl dot tools at gmail dot com
  2010-07-05 14:09 ` ubizjak at gmail dot com
                   ` (2 subsequent siblings)
  4 siblings, 0 replies; 6+ messages in thread
From: hjl dot tools at gmail dot com @ 2010-07-05  0:20 UTC (permalink / raw)
  To: gcc-bugs



------- Comment #2 from hjl dot tools at gmail dot com  2010-07-05 00:20 -------
There is a 128byte red-zone. The code seems OK.


-- 


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


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

* [Bug middle-end/44817] Stage2/stage3 genautomata has invalid memory access
  2010-07-04 23:39 [Bug middle-end/44817] New: Stage2/stage3 genautomata has invalid memory access hjl dot tools at gmail dot com
  2010-07-05  0:06 ` [Bug middle-end/44817] " hjl dot tools at gmail dot com
  2010-07-05  0:20 ` hjl dot tools at gmail dot com
@ 2010-07-05 14:09 ` ubizjak at gmail dot com
  2010-07-05 15:57 ` hjl dot tools at gmail dot com
  2010-07-26 18:41 ` hjl dot tools at gmail dot com
  4 siblings, 0 replies; 6+ messages in thread
From: ubizjak at gmail dot com @ 2010-07-05 14:09 UTC (permalink / raw)
  To: gcc-bugs



------- Comment #3 from ubizjak at gmail dot com  2010-07-05 14:09 -------
So, what is the problem here?


-- 


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


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

* [Bug middle-end/44817] Stage2/stage3 genautomata has invalid memory access
  2010-07-04 23:39 [Bug middle-end/44817] New: Stage2/stage3 genautomata has invalid memory access hjl dot tools at gmail dot com
                   ` (2 preceding siblings ...)
  2010-07-05 14:09 ` ubizjak at gmail dot com
@ 2010-07-05 15:57 ` hjl dot tools at gmail dot com
  2010-07-26 18:41 ` hjl dot tools at gmail dot com
  4 siblings, 0 replies; 6+ messages in thread
From: hjl dot tools at gmail dot com @ 2010-07-05 15:57 UTC (permalink / raw)
  To: gcc-bugs



------- Comment #4 from hjl dot tools at gmail dot com  2010-07-05 15:57 -------
This may be a valgrind bug. I will investigate.


-- 


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


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

* [Bug middle-end/44817] Stage2/stage3 genautomata has invalid memory access
  2010-07-04 23:39 [Bug middle-end/44817] New: Stage2/stage3 genautomata has invalid memory access hjl dot tools at gmail dot com
                   ` (3 preceding siblings ...)
  2010-07-05 15:57 ` hjl dot tools at gmail dot com
@ 2010-07-26 18:41 ` hjl dot tools at gmail dot com
  4 siblings, 0 replies; 6+ messages in thread
From: hjl dot tools at gmail dot com @ 2010-07-26 18:41 UTC (permalink / raw)
  To: gcc-bugs



------- Comment #5 from hjl dot tools at gmail dot com  2010-07-26 18:41 -------
It is a valgrind bug. I opened:

https://bugzilla.redhat.com/show_bug.cgi?id=618360


-- 

hjl dot tools at gmail dot com changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
                URL|                            |https://bugzilla.redhat.com/
                   |                            |show_bug.cgi?id=618360
             Status|UNCONFIRMED                 |RESOLVED
         Resolution|                            |INVALID


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


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

end of thread, other threads:[~2010-07-26 18:41 UTC | newest]

Thread overview: 6+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2010-07-04 23:39 [Bug middle-end/44817] New: Stage2/stage3 genautomata has invalid memory access hjl dot tools at gmail dot com
2010-07-05  0:06 ` [Bug middle-end/44817] " hjl dot tools at gmail dot com
2010-07-05  0:20 ` hjl dot tools at gmail dot com
2010-07-05 14:09 ` ubizjak at gmail dot com
2010-07-05 15:57 ` hjl dot tools at gmail dot com
2010-07-26 18:41 ` hjl dot tools at gmail dot com

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).