public inbox for gcc-bugs@sourceware.org
help / color / mirror / Atom feed
* [Bug other/55387] New: Build problem: malloc error in genautomata
@ 2012-11-19  1:23 townsend at astro dot wisc.edu
  2012-11-19 21:46 ` [Bug bootstrap/55387] [4.8 Regression] " pinskia at gcc dot gnu.org
                   ` (5 more replies)
  0 siblings, 6 replies; 7+ messages in thread
From: townsend at astro dot wisc.edu @ 2012-11-19  1:23 UTC (permalink / raw)
  To: gcc-bugs


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

             Bug #: 55387
           Summary: Build problem: malloc error in genautomata
    Classification: Unclassified
           Product: gcc
           Version: 4.8.0
            Status: UNCONFIRMED
          Severity: normal
          Priority: P3
         Component: other
        AssignedTo: unassigned@gcc.gnu.org
        ReportedBy: townsend@astro.wisc.edu


When attempting to build the latest SVN gcc (4.8.0, rev. 193610), I get the
following error:

build/genautomata ../.././gcc/config/i386/i386.md \
      insn-conditions.md > tmp-automata.c
genautomata(1500) malloc: *** error for object 0xc1e8b60252d64: pointer being
freed was not allocated
*** set a breakpoint in malloc_error_break to debug
/bin/sh: line 1:  1500 Abort trap: 6           build/genautomata
../.././gcc/config/i386/i386.md insn-conditions.md > tmp-automata.c
make[3]: *** [s-automata] Error 134
make[2]: *** [all-stage1-gcc] Error 2
make[1]: *** [stage1-bubble] Error 2
make: *** [all] Error 2

This is on OS X 10.7.5, with the following config options:

./configure CC=gcc -D_FORTIFY_SOURCE=0 \
  --build=x86_64-apple-darwin11.4.2 \
  --prefix=/Applications/madsdk \
  --with-gmp=/Applications/madsdk \
  --with-mpfr=/Applications/madsdk \
  --with-mpc=/Applications/madsdk \
  --enable-languages=c,c++,fortran --disable-multilib


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

* [Bug bootstrap/55387] [4.8 Regression] Build problem: malloc error in genautomata
  2012-11-19  1:23 [Bug other/55387] New: Build problem: malloc error in genautomata townsend at astro dot wisc.edu
@ 2012-11-19 21:46 ` pinskia at gcc dot gnu.org
  2012-11-19 21:47 ` pinskia at gcc dot gnu.org
                   ` (4 subsequent siblings)
  5 siblings, 0 replies; 7+ messages in thread
From: pinskia at gcc dot gnu.org @ 2012-11-19 21:46 UTC (permalink / raw)
  To: gcc-bugs


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

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

           What    |Removed                     |Added
----------------------------------------------------------------------------
          Component|other                       |bootstrap
         Depends on|                            |55398
   Target Milestone|---                         |4.8.0
            Summary|Build problem: malloc error |[4.8 Regression] Build
                   |in genautomata              |problem: malloc error in
                   |                            |genautomata
           Severity|normal                      |blocker


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

* [Bug bootstrap/55387] [4.8 Regression] Build problem: malloc error in genautomata
  2012-11-19  1:23 [Bug other/55387] New: Build problem: malloc error in genautomata townsend at astro dot wisc.edu
  2012-11-19 21:46 ` [Bug bootstrap/55387] [4.8 Regression] " pinskia at gcc dot gnu.org
@ 2012-11-19 21:47 ` pinskia at gcc dot gnu.org
  2012-11-19 21:51 ` howarth at nitro dot med.uc.edu
                   ` (3 subsequent siblings)
  5 siblings, 0 replies; 7+ messages in thread
From: pinskia at gcc dot gnu.org @ 2012-11-19 21:47 UTC (permalink / raw)
  To: gcc-bugs


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

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

           What    |Removed                     |Added
----------------------------------------------------------------------------
                 CC|                            |howarth at nitro dot
                   |                            |med.uc.edu

--- Comment #1 from Andrew Pinski <pinskia at gcc dot gnu.org> 2012-11-19 21:46:45 UTC ---
*** Bug 55400 has been marked as a duplicate of this bug. ***


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

* [Bug bootstrap/55387] [4.8 Regression] Build problem: malloc error in genautomata
  2012-11-19  1:23 [Bug other/55387] New: Build problem: malloc error in genautomata townsend at astro dot wisc.edu
  2012-11-19 21:46 ` [Bug bootstrap/55387] [4.8 Regression] " pinskia at gcc dot gnu.org
  2012-11-19 21:47 ` pinskia at gcc dot gnu.org
@ 2012-11-19 21:51 ` howarth at nitro dot med.uc.edu
  2012-11-20 14:11 ` dnovillo at gcc dot gnu.org
                   ` (2 subsequent siblings)
  5 siblings, 0 replies; 7+ messages in thread
From: howarth at nitro dot med.uc.edu @ 2012-11-19 21:51 UTC (permalink / raw)
  To: gcc-bugs


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

--- Comment #2 from Jack Howarth <howarth at nitro dot med.uc.edu> 2012-11-19 21:50:44 UTC ---
This backtraces on x86_64-apple-darwin12 using llvm-gcc from Xcode 4.5.2 as...

# gdb build/genautomata
GNU gdb 6.3.50-20050815 (Apple version gdb-1822) (Sun Aug  5 03:00:42 UTC 2012)
Copyright 2004 Free Software Foundation, Inc.
GDB is free software, covered by the GNU General Public License, and you are
welcome to change it and/or distribute copies of it under certain conditions.
Type "show copying" to see the conditions.
There is absolutely no warranty for GDB.  Type "show warranty" for details.
This GDB was configured as "x86_64-apple-darwin"...Reading symbols for shared
libraries ... done

(gdb) break malloc_error_break
Function "malloc_error_break" not defined.
Make breakpoint pending on future shared library load? (y or [n]) y
Breakpoint 1 (malloc_error_break) pending.
(gdb) r  ../../gcc-4.8-20121119/gcc/config/i386/i386.md insn-conditions.md >
tmp-automata.c
Starting program:
/sw/src/fink.build/gcc48-4.8.0-1000/darwin_objdir/gcc/build/genautomata
../../gcc-4.8-20121119/gcc/config/i386/i386.md insn-conditions.md >
tmp-automata.c
Reading symbols for shared libraries ++............................. done
Breakpoint 1 at 0x7fff94c3a558
Pending breakpoint 1 - "malloc_error_break" resolved
genautomata(20415) malloc: *** error for object 0xd4eb75fbff604: pointer being
freed was not allocated
*** set a breakpoint in malloc_error_break to debug

Breakpoint 1, 0x00007fff94c3a558 in malloc_error_break ()
(gdb) bt
#0  0x00007fff94c3a558 in malloc_error_break ()
#1  0x00007fff94c3b912 in free ()
#2  0x000000010002a3a1 in va_heap::release<state*> (v=@0x7fff5fbff580) at
vec.h:317
#3  0x000000010002a3d7 in vec<state*, va_heap, vl_ptr>::release
(this=0x7fff5fbff580) at vec.h:1485
#4  0x0000000100015e84 in copy_equiv_class (to=0x7fff5fbff580, from={vec_ =
0x100abee00}) at genautomata.c:6030
#5  0x00000001000232f9 in evaluate_equiv_classes (automaton=0x101aa1870,
equiv_classes=0x7fff5fbff580) at genautomata.c:6118
#6  0x00000001000234cc in minimize_DFA (automaton=0x101aa1870) at
genautomata.c:6260
#7  0x0000000100024919 in build_automaton (automaton=0x101aa1870) at
genautomata.c:6350
#8  0x0000000100024ebe in create_automata () at genautomata.c:6779
#9  0x0000000100024f96 in generate () at genautomata.c:9203
#10 0x00000001000252f6 in expand_automata () at genautomata.c:9465
#11 0x00000001000011b0 in main (argc=3, argv=0x7fff5fbff830) at
genautomata.c:9656
(gdb)


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

* [Bug bootstrap/55387] [4.8 Regression] Build problem: malloc error in genautomata
  2012-11-19  1:23 [Bug other/55387] New: Build problem: malloc error in genautomata townsend at astro dot wisc.edu
                   ` (2 preceding siblings ...)
  2012-11-19 21:51 ` howarth at nitro dot med.uc.edu
@ 2012-11-20 14:11 ` dnovillo at gcc dot gnu.org
  2012-11-20 17:44 ` howarth at nitro dot med.uc.edu
  2012-12-07 10:14 ` rguenth at gcc dot gnu.org
  5 siblings, 0 replies; 7+ messages in thread
From: dnovillo at gcc dot gnu.org @ 2012-11-20 14:11 UTC (permalink / raw)
  To: gcc-bugs


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

Diego Novillo <dnovillo at gcc dot gnu.org> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
                 CC|                            |dnovillo at gcc dot gnu.org

--- Comment #3 from Diego Novillo <dnovillo at gcc dot gnu.org> 2012-11-20 14:10:43 UTC ---
Can you show me the value of equiv_classes at frame #6? (inside minimize_DFA)
and frame #4?  (inside copy_equiv_class).  In both cases, it should be
{
  _vec = 0x0;
}

If not, then there is a problem with the initializer of equiv_classes in
minimize_DFA.


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

* [Bug bootstrap/55387] [4.8 Regression] Build problem: malloc error in genautomata
  2012-11-19  1:23 [Bug other/55387] New: Build problem: malloc error in genautomata townsend at astro dot wisc.edu
                   ` (3 preceding siblings ...)
  2012-11-20 14:11 ` dnovillo at gcc dot gnu.org
@ 2012-11-20 17:44 ` howarth at nitro dot med.uc.edu
  2012-12-07 10:14 ` rguenth at gcc dot gnu.org
  5 siblings, 0 replies; 7+ messages in thread
From: howarth at nitro dot med.uc.edu @ 2012-11-20 17:44 UTC (permalink / raw)
  To: gcc-bugs


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

--- Comment #4 from Jack Howarth <howarth at nitro dot med.uc.edu> 2012-11-20 17:43:37 UTC ---
This problem no longer exists at r193669 on x86_64-apple-darwin12 with Xcode
4.5.2 so it appears that...

r193667 | dnovillo | 2012-11-20 11:26:09 -0500 (Tue, 20 Nov 2012) | 26 lines

Convert vec<> into a POD.

This fixes PR 55398 by making vec<> a true POD.  I thought we could get
away with having private fields, but we can't.  We fail to pass vec<>
instances through varargs.

The patch makes every field public and mangles the field names in the
hope that no future patch will try to make use of them directly.  It's
horrible, but I could not think of anything better.

Tested with clang++ as the host compiler.

2012-11-20  Diego Novillo  <dnovillo@google.com>

    PR middle-end/55398
    * vec.h (class vec_prefix): Make every field public.
    Rename field alloc_ to alloc_PRIVATE_.
    Rename field num_ to num_PRIVATE_.
    Update all users.
    (class vec<T, A, vl_embed>): Make every field public.
    Rename field pfx_ to pfx_PRIVATE_.
    Rename field data_ to data_PRIVATE_.
    Update all users.
    (class vec<T, A, vl_ptr>): Make every field public.
    Rename field vec_ to vec_PRIVATE_.
    Update all users.

likely fixed this issue.


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

* [Bug bootstrap/55387] [4.8 Regression] Build problem: malloc error in genautomata
  2012-11-19  1:23 [Bug other/55387] New: Build problem: malloc error in genautomata townsend at astro dot wisc.edu
                   ` (4 preceding siblings ...)
  2012-11-20 17:44 ` howarth at nitro dot med.uc.edu
@ 2012-12-07 10:14 ` rguenth at gcc dot gnu.org
  5 siblings, 0 replies; 7+ messages in thread
From: rguenth at gcc dot gnu.org @ 2012-12-07 10:14 UTC (permalink / raw)
  To: gcc-bugs


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

Richard Biener <rguenth at gcc dot gnu.org> changed:

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

--- Comment #5 from Richard Biener <rguenth at gcc dot gnu.org> 2012-12-07 10:14:33 UTC ---
Let's close it then.


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

end of thread, other threads:[~2012-12-07 10:14 UTC | newest]

Thread overview: 7+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2012-11-19  1:23 [Bug other/55387] New: Build problem: malloc error in genautomata townsend at astro dot wisc.edu
2012-11-19 21:46 ` [Bug bootstrap/55387] [4.8 Regression] " pinskia at gcc dot gnu.org
2012-11-19 21:47 ` pinskia at gcc dot gnu.org
2012-11-19 21:51 ` howarth at nitro dot med.uc.edu
2012-11-20 14:11 ` dnovillo at gcc dot gnu.org
2012-11-20 17:44 ` howarth at nitro dot med.uc.edu
2012-12-07 10:14 ` rguenth 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).