public inbox for gcc-bugs@sourceware.org
help / color / mirror / Atom feed
* [Bug c/37156] New: Hangwith -g -O2 (or higher) (discovered with malloc.c in sqlite3)
@ 2008-08-18 22:22 cw at f00f dot org
2008-08-18 22:35 ` [Bug debug/37156] " cw at f00f dot org
` (8 more replies)
0 siblings, 9 replies; 10+ messages in thread
From: cw at f00f dot org @ 2008-08-18 22:22 UTC (permalink / raw)
To: gcc-bugs
[-- Warning: decoded text below may be mangled, UTF-8 assumed --]
[-- Attachment #1: Type: text/plain, Size: 2296 bytes --]
cw@lysdexia:~/wk/sqlite-cvs-git/build$ gcc -v
Using built-in specs.
Target: x86_64-linux-gnu
Configured with: ../src/configure -v --with-pkgversion='Debian 4.3.1-2'
--with-bugurl=file:///usr/share/doc/gcc-4.3/README.Bugs
--enable-languages=c,c++,fortran,objc,obj-c++ --prefix=/usr --enable-shared
--with-system-zlib --libexecdir=/usr/lib --without-included-gettext
--enable-threads=posix --enable-nls --with-gxx-include-dir=/usr/include/c++/4.3
--program-suffix=-4.3 --enable-clocale=gnu --enable-libstdcxx-debug
--enable-objc-gc --enable-mpfr --enable-cld --enable-checking=release
--build=x86_64-linux-gnu --host=x86_64-linux-gnu --target=x86_64-linux-gnu
Thread model: posix
gcc version 4.3.1 (Debian 4.3.1-2)
I get a hang:
cw@lysdexia:~/wk/sqlite-cvs-git/build$ gcc -Wall -c -O2 -g malloc.i
malloc.i: In function sqlite3_memory_used:
malloc.i:10: warning: call to sqlite3_status declared with attribute warning:
is experimental
<...hang...>
malloc.i (below, and which i will also attach if i can) is derived from
malloc.c from sqlite (CVS as of this morning), i butchered it as much a i could
to make it as small as possible but still show the problem.
-O1 -g hangs
-O2 is ok
-O2 -g hangs
if you take out either function or any calls the hang seems to go away
cw@lysdexia:~/wk/sqlite-cvs-git/build$ cat malloc.i
typedef long long int sqlite_int64;
typedef sqlite_int64 sqlite3_int64;
__attribute__ ((warning ("is experimental"))) int sqlite3_status(int op, int
*pCurrent, int *pHighwater, int resetFlag);
sqlite3_int64 sqlite3_memory_used(void){
int n, mx;
sqlite3_int64 res;
sqlite3_status(0, &n, &mx, 0);
res = (sqlite3_int64)n;
return res;
}
void sqlite3_soft_heap_limit(int n){
int overage;
overage = sqlite3_memory_used() - n;
}
--
Summary: Hangwith -g -O2 (or higher) (discovered with malloc.c
in sqlite3)
Product: gcc
Version: 4.3.1
Status: UNCONFIRMED
Severity: major
Priority: P3
Component: c
AssignedTo: unassigned at gcc dot gnu dot org
ReportedBy: cw at f00f dot org
GCC build triplet: x86_64-linux-gnu
GCC host triplet: x86_64-linux-gnu
GCC target triplet: x86_64-linux-gnu
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=37156
^ permalink raw reply [flat|nested] 10+ messages in thread
* [Bug debug/37156] Hangwith -g -O2 (or higher) (discovered with malloc.c in sqlite3)
2008-08-18 22:22 [Bug c/37156] New: Hangwith -g -O2 (or higher) (discovered with malloc.c in sqlite3) cw at f00f dot org
@ 2008-08-18 22:35 ` cw at f00f dot org
2008-08-18 22:38 ` cw at f00f dot org
` (7 subsequent siblings)
8 siblings, 0 replies; 10+ messages in thread
From: cw at f00f dot org @ 2008-08-18 22:35 UTC (permalink / raw)
To: gcc-bugs
------- Comment #1 from cw at f00f dot org 2008-08-18 22:34 -------
Created an attachment (id=16091)
--> (http://gcc.gnu.org/bugzilla/attachment.cgi?id=16091&action=view)
malloc.i hangs with -O2 -g on gcc 4.3.1
--
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=37156
^ permalink raw reply [flat|nested] 10+ messages in thread
* [Bug debug/37156] Hangwith -g -O2 (or higher) (discovered with malloc.c in sqlite3)
2008-08-18 22:22 [Bug c/37156] New: Hangwith -g -O2 (or higher) (discovered with malloc.c in sqlite3) cw at f00f dot org
2008-08-18 22:35 ` [Bug debug/37156] " cw at f00f dot org
@ 2008-08-18 22:38 ` cw at f00f dot org
2008-08-19 0:40 ` [Bug debug/37156] Hang with " cw at f00f dot org
` (6 subsequent siblings)
8 siblings, 0 replies; 10+ messages in thread
From: cw at f00f dot org @ 2008-08-18 22:38 UTC (permalink / raw)
To: gcc-bugs
------- Comment #2 from cw at f00f dot org 2008-08-18 22:37 -------
(sorry, this should have been clarified earlier)
-O1 -g is fine
-O2 is fine
-O2 -g HANGS
dropping __attribute__((warning...) also makes the hang go away --- so
interaction with that an debugging?
gcc 4.1 is fine
gcc 4.2 is fine
gcc 4.4 untested
--
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=37156
^ permalink raw reply [flat|nested] 10+ messages in thread
* [Bug debug/37156] Hang with -g -O2 (or higher) (discovered with malloc.c in sqlite3)
2008-08-18 22:22 [Bug c/37156] New: Hangwith -g -O2 (or higher) (discovered with malloc.c in sqlite3) cw at f00f dot org
2008-08-18 22:35 ` [Bug debug/37156] " cw at f00f dot org
2008-08-18 22:38 ` cw at f00f dot org
@ 2008-08-19 0:40 ` cw at f00f dot org
2008-08-19 0:42 ` cw at f00f dot org
` (5 subsequent siblings)
8 siblings, 0 replies; 10+ messages in thread
From: cw at f00f dot org @ 2008-08-19 0:40 UTC (permalink / raw)
To: gcc-bugs
------- Comment #3 from cw at f00f dot org 2008-08-19 00:38 -------
Someone was able to reproduce the hang and pointed out the first attachment I
put up as edited without the __attribute__
Using built-in specs.
Target: x86_64-redhat-linux
Configured with: ../configure --prefix=/usr --mandir=/usr/share/man
--infodir=/usr/share/info
--with-bugurl=http://bugzilla.redhat.com/bugzilla --enable-bootstrap
--enable-shared
--enable-threads=posix --enable-checking=release --with-system-zlib
--enable-__cxa_atexit
--disable-libunwind-exceptions
--enable-languages=c,c++,objc,obj-c++,java,fortran,ada
--enable-java-awt=gtk --disable-dssi --enable-plugin
--with-java-home=/usr/lib/jvm/java-1.5.0-gcj-1.5.0.0/jre
--enable-libgcj-multifile
--enable-java-maintainer-mode --with-ecj-jar=/usr/share/java/eclipse-ecj.jar
--disable-libjava-multilib
--with-cpu=generic --build=x86_64-redhat-linux
Thread model: posix
gcc version 4.3.1 20080708 (Red Hat 4.3.1-4) (GCC)
--
cw at f00f dot org changed:
What |Removed |Added
----------------------------------------------------------------------------
Summary|Hangwith -g -O2 (or higher) |Hang with -g -O2 (or higher)
|(discovered with malloc.c in|(discovered with malloc.c in
|sqlite3) |sqlite3)
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=37156
^ permalink raw reply [flat|nested] 10+ messages in thread
* [Bug debug/37156] Hang with -g -O2 (or higher) (discovered with malloc.c in sqlite3)
2008-08-18 22:22 [Bug c/37156] New: Hangwith -g -O2 (or higher) (discovered with malloc.c in sqlite3) cw at f00f dot org
` (2 preceding siblings ...)
2008-08-19 0:40 ` [Bug debug/37156] Hang with " cw at f00f dot org
@ 2008-08-19 0:42 ` cw at f00f dot org
2008-08-19 0:43 ` cw at f00f dot org
` (4 subsequent siblings)
8 siblings, 0 replies; 10+ messages in thread
From: cw at f00f dot org @ 2008-08-19 0:42 UTC (permalink / raw)
To: gcc-bugs
------- Comment #4 from cw at f00f dot org 2008-08-19 00:41 -------
Created an attachment (id=16092)
--> (http://gcc.gnu.org/bugzilla/attachment.cgi?id=16092&action=view)
updated test case that actually shows the hang
--
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=37156
^ permalink raw reply [flat|nested] 10+ messages in thread
* [Bug debug/37156] Hang with -g -O2 (or higher) (discovered with malloc.c in sqlite3)
2008-08-18 22:22 [Bug c/37156] New: Hangwith -g -O2 (or higher) (discovered with malloc.c in sqlite3) cw at f00f dot org
` (3 preceding siblings ...)
2008-08-19 0:42 ` cw at f00f dot org
@ 2008-08-19 0:43 ` cw at f00f dot org
2008-08-19 7:44 ` [Bug debug/37156] [4.3 Regression] " jakub at gcc dot gnu dot org
` (3 subsequent siblings)
8 siblings, 0 replies; 10+ messages in thread
From: cw at f00f dot org @ 2008-08-19 0:43 UTC (permalink / raw)
To: gcc-bugs
------- Comment #5 from cw at f00f dot org 2008-08-19 00:42 -------
(From update of attachment 16091)
doesn't show the hang as __attribute__ is missing
--
cw at f00f dot org changed:
What |Removed |Added
----------------------------------------------------------------------------
Attachment #16091|0 |1
is obsolete| |
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=37156
^ permalink raw reply [flat|nested] 10+ messages in thread
* [Bug debug/37156] [4.3 Regression] Hang with -g -O2 (or higher) (discovered with malloc.c in sqlite3)
2008-08-18 22:22 [Bug c/37156] New: Hangwith -g -O2 (or higher) (discovered with malloc.c in sqlite3) cw at f00f dot org
` (4 preceding siblings ...)
2008-08-19 0:43 ` cw at f00f dot org
@ 2008-08-19 7:44 ` jakub at gcc dot gnu dot org
2008-08-19 11:47 ` jakub at gcc dot gnu dot org
` (2 subsequent siblings)
8 siblings, 0 replies; 10+ messages in thread
From: jakub at gcc dot gnu dot org @ 2008-08-19 7:44 UTC (permalink / raw)
To: gcc-bugs
------- Comment #6 from jakub at gcc dot gnu dot org 2008-08-19 07:42 -------
Related to PR36811, except in a different routine.
--
jakub at gcc dot gnu dot org changed:
What |Removed |Added
----------------------------------------------------------------------------
AssignedTo|unassigned at gcc dot gnu |jakub at gcc dot gnu dot org
|dot org |
Status|UNCONFIRMED |ASSIGNED
Ever Confirmed|0 |1
Last reconfirmed|0000-00-00 00:00:00 |2008-08-19 07:42:50
date| |
Summary|Hang with -g -O2 (or higher)|[4.3 Regression] Hang with -
|(discovered with malloc.c in|g -O2 (or higher)
|sqlite3) |(discovered with malloc.c in
| |sqlite3)
Target Milestone|--- |4.3.2
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=37156
^ permalink raw reply [flat|nested] 10+ messages in thread
* [Bug debug/37156] [4.3 Regression] Hang with -g -O2 (or higher) (discovered with malloc.c in sqlite3)
2008-08-18 22:22 [Bug c/37156] New: Hangwith -g -O2 (or higher) (discovered with malloc.c in sqlite3) cw at f00f dot org
` (5 preceding siblings ...)
2008-08-19 7:44 ` [Bug debug/37156] [4.3 Regression] " jakub at gcc dot gnu dot org
@ 2008-08-19 11:47 ` jakub at gcc dot gnu dot org
2008-08-19 11:52 ` jakub at gcc dot gnu dot org
2008-08-19 11:53 ` jakub at gcc dot gnu dot org
8 siblings, 0 replies; 10+ messages in thread
From: jakub at gcc dot gnu dot org @ 2008-08-19 11:47 UTC (permalink / raw)
To: gcc-bugs
------- Comment #7 from jakub at gcc dot gnu dot org 2008-08-19 11:46 -------
Subject: Bug 37156
Author: jakub
Date: Tue Aug 19 11:44:42 2008
New Revision: 139230
URL: http://gcc.gnu.org/viewcvs?root=gcc&view=rev&rev=139230
Log:
PR debug/37156
* pretty-print.c (pp_base_format): Deal with recursive BLOCK trees.
* tree.c (block_nonartificial_location): Likewise.
* error.c (cp_print_error_function): Deal with recursive BLOCK trees.
* gcc.dg/pr37156.c: New test.
Added:
trunk/gcc/testsuite/gcc.dg/pr37156.c
Modified:
trunk/gcc/ChangeLog
trunk/gcc/cp/ChangeLog
trunk/gcc/cp/error.c
trunk/gcc/pretty-print.c
trunk/gcc/testsuite/ChangeLog
trunk/gcc/tree.c
--
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=37156
^ permalink raw reply [flat|nested] 10+ messages in thread
* [Bug debug/37156] [4.3 Regression] Hang with -g -O2 (or higher) (discovered with malloc.c in sqlite3)
2008-08-18 22:22 [Bug c/37156] New: Hangwith -g -O2 (or higher) (discovered with malloc.c in sqlite3) cw at f00f dot org
` (6 preceding siblings ...)
2008-08-19 11:47 ` jakub at gcc dot gnu dot org
@ 2008-08-19 11:52 ` jakub at gcc dot gnu dot org
2008-08-19 11:53 ` jakub at gcc dot gnu dot org
8 siblings, 0 replies; 10+ messages in thread
From: jakub at gcc dot gnu dot org @ 2008-08-19 11:52 UTC (permalink / raw)
To: gcc-bugs
------- Comment #8 from jakub at gcc dot gnu dot org 2008-08-19 11:51 -------
Subject: Bug 37156
Author: jakub
Date: Tue Aug 19 11:50:11 2008
New Revision: 139231
URL: http://gcc.gnu.org/viewcvs?root=gcc&view=rev&rev=139231
Log:
PR debug/37156
* pretty-print.c (pp_base_format): Deal with recursive BLOCK trees.
* tree.c (block_nonartificial_location): Likewise.
* error.c (cp_print_error_function): Deal with recursive BLOCK trees.
* gcc.dg/pr37156.c: New test.
Added:
branches/gcc-4_3-branch/gcc/testsuite/gcc.dg/pr37156.c
Modified:
branches/gcc-4_3-branch/gcc/ChangeLog
branches/gcc-4_3-branch/gcc/cp/ChangeLog
branches/gcc-4_3-branch/gcc/cp/error.c
branches/gcc-4_3-branch/gcc/pretty-print.c
branches/gcc-4_3-branch/gcc/testsuite/ChangeLog
branches/gcc-4_3-branch/gcc/tree.c
--
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=37156
^ permalink raw reply [flat|nested] 10+ messages in thread
* [Bug debug/37156] [4.3 Regression] Hang with -g -O2 (or higher) (discovered with malloc.c in sqlite3)
2008-08-18 22:22 [Bug c/37156] New: Hangwith -g -O2 (or higher) (discovered with malloc.c in sqlite3) cw at f00f dot org
` (7 preceding siblings ...)
2008-08-19 11:52 ` jakub at gcc dot gnu dot org
@ 2008-08-19 11:53 ` jakub at gcc dot gnu dot org
8 siblings, 0 replies; 10+ messages in thread
From: jakub at gcc dot gnu dot org @ 2008-08-19 11:53 UTC (permalink / raw)
To: gcc-bugs
------- Comment #9 from jakub at gcc dot gnu dot org 2008-08-19 11:52 -------
Fixed.
--
jakub at gcc dot gnu dot org changed:
What |Removed |Added
----------------------------------------------------------------------------
Status|ASSIGNED |RESOLVED
Resolution| |FIXED
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=37156
^ permalink raw reply [flat|nested] 10+ messages in thread
end of thread, other threads:[~2008-08-19 11:53 UTC | newest]
Thread overview: 10+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2008-08-18 22:22 [Bug c/37156] New: Hangwith -g -O2 (or higher) (discovered with malloc.c in sqlite3) cw at f00f dot org
2008-08-18 22:35 ` [Bug debug/37156] " cw at f00f dot org
2008-08-18 22:38 ` cw at f00f dot org
2008-08-19 0:40 ` [Bug debug/37156] Hang with " cw at f00f dot org
2008-08-19 0:42 ` cw at f00f dot org
2008-08-19 0:43 ` cw at f00f dot org
2008-08-19 7:44 ` [Bug debug/37156] [4.3 Regression] " jakub at gcc dot gnu dot org
2008-08-19 11:47 ` jakub at gcc dot gnu dot org
2008-08-19 11:52 ` jakub at gcc dot gnu dot org
2008-08-19 11:53 ` jakub at gcc dot gnu dot 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).