public inbox for java-prs@sourceware.org
help / color / mirror / Atom feed
* [Bug java/15543] New: "jv-scan --complexity" segfaults
@ 2004-05-19 16:00 vadimn at redhat dot com
  2004-05-19 16:03 ` [Bug java/15543] " vadimn at redhat dot com
                   ` (6 more replies)
  0 siblings, 7 replies; 8+ messages in thread
From: vadimn at redhat dot com @ 2004-05-19 16:00 UTC (permalink / raw)
  To: java-prs

I came across two .java files that cause jv-scan to segfault.  The files
are

http://cvs.forge.objectweb.org/cgi-bin/viewcvs.cgi/*checkout*/speedo/src/org/objectweb/speedo/generation/enhancer/CodeDuplicator.java?rev=1.6&content-type=text/plain
http://cvs.forge.objectweb.org/cgi-bin/viewcvs.cgi/*checkout*/speedo/src/org/objectweb/speedo/generation/enhancer/ClassAccessorModifier.java?rev=1.31&content-type=text/plain

Here's what I get:

$ jv-scan --complexity \
 src/org/objectweb/speedo/generation/enhancer/CodeDuplicator.java
Segmentation fault
$ jv-scan34 --complexity \
 src/org/objectweb/speedo/generation/enhancer/CodeDuplicator.java
Segmentation fault

Build information for jv-scan is as follows:

$ rpm -ql $(rpm -qf $(which jv-scan)) | grep /bin
/usr/bin/gcj
/usr/bin/gcjh
/usr/bin/jcf-dump
/usr/bin/jv-scan
$ /usr/bin/gcj -v
Reading specs from /usr/lib/gcc-lib/i386-redhat-linux/3.3.3/specs
Reading specs from /usr/lib/gcc-lib/i386-redhat-linux/3.3.3/libgcj.spec
rename spec lib to liborig
Configured with: ../configure --prefix=/usr --mandir=/usr/share/man \
--infodir=/usr/share/info --enable-shared --enable-threads=posix \
--disable-checking --disable-libunwind-exceptions --with-system-zlib \
--enable-__cxa_atexit --host=i386-redhat-linux

Thread model: posix
gcc version 3.3.3 20040412 (Red Hat Linux 3.3.3-7)


Build information for jv-scan34 is as follows:

$ rpm -ql $(rpm -qf $(which jv-scan34)) | grep /bin
/usr/bin/gcj34
/usr/bin/gcjh34
/usr/bin/jcf-dump34
/usr/bin/jv-scan34
$ /usr/bin/gcj34 -v
Reading specs from /usr/lib/gcc/i386-redhat-linux/3.4.0/specs
Reading specs from /usr/lib/gcc/i386-redhat-linux/3.4.0/libgcj.spec
rename spec lib to liborig
Configured with: ../configure --prefix=/usr --mandir=/usr/share/man \
--infodir=/usr/share/info --enable-shared --enable-threads=posix \
--disable-checking --with-system-zlib --enable-__cxa_atexit \
--disable-libunwind-exceptions --enable-languages=c,c++,objc,java,f77 \
--host=i386-redhat-linux

Thread model: posix
gcc version 3.4.0 (Red Hat Linux 3.4.0-1)

-- 
           Summary: "jv-scan --complexity" segfaults
           Product: gcc
           Version: 3.4.0
            Status: UNCONFIRMED
          Severity: normal
          Priority: P2
         Component: java
        AssignedTo: unassigned at gcc dot gnu dot org
        ReportedBy: vadimn at redhat dot com
                CC: gcc-bugs at gcc dot gnu dot org,java-prs at gcc dot gnu
                    dot org


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


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

* [Bug java/15543] "jv-scan --complexity" segfaults
  2004-05-19 16:00 [Bug java/15543] New: "jv-scan --complexity" segfaults vadimn at redhat dot com
@ 2004-05-19 16:03 ` vadimn at redhat dot com
  2004-05-19 16:04 ` pinskia at gcc dot gnu dot org
                   ` (5 subsequent siblings)
  6 siblings, 0 replies; 8+ messages in thread
From: vadimn at redhat dot com @ 2004-05-19 16:03 UTC (permalink / raw)
  To: java-prs


------- Additional Comments From vadimn at redhat dot com  2004-05-19 16:03 -------
Created an attachment (id=6343)
 --> (http://gcc.gnu.org/bugzilla/attachment.cgi?id=6343&action=view)
src/org/objectweb/speedo/generation/enhancer/ClassAccessorModifier.java

Attaching ClassAccessorModifier.java in case the above link to ViewCVS
goes dead.

-- 


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


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

* [Bug java/15543] "jv-scan --complexity" segfaults
  2004-05-19 16:00 [Bug java/15543] New: "jv-scan --complexity" segfaults vadimn at redhat dot com
  2004-05-19 16:03 ` [Bug java/15543] " vadimn at redhat dot com
@ 2004-05-19 16:04 ` pinskia at gcc dot gnu dot org
  2005-02-02  7:43 ` rmathew at gcc dot gnu dot org
                   ` (4 subsequent siblings)
  6 siblings, 0 replies; 8+ messages in thread
From: pinskia at gcc dot gnu dot org @ 2004-05-19 16:04 UTC (permalink / raw)
  To: java-prs


------- Additional Comments From pinskia at gcc dot gnu dot org  2004-05-19 16:04 -------
Confirmed, looks like someone forgot to check for an NULL before passing to strlen.
Here is the backtrace on the mainline:
#1  0x0804bba4 in yyparse () at parse-scan.y:517
517                           char *n = xmalloc (bracket_count + 1 + strlen ($$));
(gdb) bt
#0  0x42080bbb in strlen () from /lib/i686/libc.so.6
#1  0x0804bba4 in yyparse () at parse-scan.y:517
#2  0x0804bf91 in main (argc=3, argv=0xbffec3a4) at /home/gates/pinskia/src/gnu/gcc/src/gcc/
java/jv-scan.c:216

-- 
           What    |Removed                     |Added
----------------------------------------------------------------------------
             Status|UNCONFIRMED                 |NEW
     Ever Confirmed|                            |1
   Last reconfirmed|0000-00-00 00:00:00         |2004-05-19 16:04:50
               date|                            |


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


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

* [Bug java/15543] "jv-scan --complexity" segfaults
  2004-05-19 16:00 [Bug java/15543] New: "jv-scan --complexity" segfaults vadimn at redhat dot com
  2004-05-19 16:03 ` [Bug java/15543] " vadimn at redhat dot com
  2004-05-19 16:04 ` pinskia at gcc dot gnu dot org
@ 2005-02-02  7:43 ` rmathew at gcc dot gnu dot org
  2005-02-02 18:41 ` cvs-commit at gcc dot gnu dot org
                   ` (3 subsequent siblings)
  6 siblings, 0 replies; 8+ messages in thread
From: rmathew at gcc dot gnu dot org @ 2005-02-02  7:43 UTC (permalink / raw)
  To: java-prs


------- Additional Comments From rmathew at gcc dot gnu dot org  2005-02-02 07:43 -------
Here's the patch:

  http://gcc.gnu.org/ml/java-patches/2005-q1/msg00268.html

-- 
           What    |Removed                     |Added
----------------------------------------------------------------------------
           Keywords|                            |patch


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


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

* [Bug java/15543] "jv-scan --complexity" segfaults
  2004-05-19 16:00 [Bug java/15543] New: "jv-scan --complexity" segfaults vadimn at redhat dot com
                   ` (2 preceding siblings ...)
  2005-02-02  7:43 ` rmathew at gcc dot gnu dot org
@ 2005-02-02 18:41 ` cvs-commit at gcc dot gnu dot org
  2005-02-10  0:26 ` bothner at gcc dot gnu dot org
                   ` (2 subsequent siblings)
  6 siblings, 0 replies; 8+ messages in thread
From: cvs-commit at gcc dot gnu dot org @ 2005-02-02 18:41 UTC (permalink / raw)
  To: java-prs


------- Additional Comments From cvs-commit at gcc dot gnu dot org  2005-02-02 18:41 -------
Subject: Bug 15543

CVSROOT:	/cvs/gcc
Module name:	gcc
Changes by:	rmathew@gcc.gnu.org	2005-02-02 18:41:30

Modified files:
	gcc/java       : ChangeLog jv-scan.c parse-scan.y 

Log message:
	PR java/15543
	* parse-scan.y (formal_parameter): Use $2 (type) instead of $$
	(modifiers) when square brackets are present in a declaration for
	a final paramter.
	* jv-scan.c (main): Set input_filename and input_line.

Patches:
http://gcc.gnu.org/cgi-bin/cvsweb.cgi/gcc/gcc/java/ChangeLog.diff?cvsroot=gcc&r1=1.1543&r2=1.1544
http://gcc.gnu.org/cgi-bin/cvsweb.cgi/gcc/gcc/java/jv-scan.c.diff?cvsroot=gcc&r1=1.44&r2=1.45
http://gcc.gnu.org/cgi-bin/cvsweb.cgi/gcc/gcc/java/parse-scan.y.diff?cvsroot=gcc&r1=1.37&r2=1.38



-- 


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


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

* [Bug java/15543] "jv-scan --complexity" segfaults
  2004-05-19 16:00 [Bug java/15543] New: "jv-scan --complexity" segfaults vadimn at redhat dot com
                   ` (3 preceding siblings ...)
  2005-02-02 18:41 ` cvs-commit at gcc dot gnu dot org
@ 2005-02-10  0:26 ` bothner at gcc dot gnu dot org
  2005-02-12  8:30 ` cvs-commit at gcc dot gnu dot org
  2005-02-12 13:29 ` bothner at gcc dot gnu dot org
  6 siblings, 0 replies; 8+ messages in thread
From: bothner at gcc dot gnu dot org @ 2005-02-10  0:26 UTC (permalink / raw)
  To: java-prs


------- Additional Comments From bothner at gcc dot gnu dot org  2005-02-09 20:30 -------
The patch causes jv-scan.c to fail to built when --enable-mapped-location.
You can no longer assign to input_filename and input_line individually.
(There are other --enable-mapped-location build failures, which I'm working on.)
Wasn't there talk about removing jv-scan?


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


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


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

* [Bug java/15543] "jv-scan --complexity" segfaults
  2004-05-19 16:00 [Bug java/15543] New: "jv-scan --complexity" segfaults vadimn at redhat dot com
                   ` (4 preceding siblings ...)
  2005-02-10  0:26 ` bothner at gcc dot gnu dot org
@ 2005-02-12  8:30 ` cvs-commit at gcc dot gnu dot org
  2005-02-12 13:29 ` bothner at gcc dot gnu dot org
  6 siblings, 0 replies; 8+ messages in thread
From: cvs-commit at gcc dot gnu dot org @ 2005-02-12  8:30 UTC (permalink / raw)
  To: java-prs


------- Additional Comments From cvs-commit at gcc dot gnu dot org  2005-02-12 06:13 -------
Subject: Bug 15543

CVSROOT:	/cvs/gcc
Module name:	gcc
Changes by:	bothner@gcc.gnu.org	2005-02-12 06:12:48

Modified files:
	gcc/java       : parse-scan.y lex.c jv-scan.c ChangeLog 

Log message:
	PR java/15543
	* parse-scan.y (input_location): Remove variable.
	(main_input_filename): New - replaces input_filename, which isn't
	settable if USE_MAPPED_LOCATION.
	* lex.c (java_init_lex): Wrap some more places in #ifndef JC1-LITE,
	so we don't reference input_location or wfl_operator in that case.
	* jv-scan.c (expand_location): Remove - no longer used.
	(main): Set main_input_filename rather than input_filename.

Patches:
http://gcc.gnu.org/cgi-bin/cvsweb.cgi/gcc/gcc/java/parse-scan.y.diff?cvsroot=gcc&r1=1.38&r2=1.39
http://gcc.gnu.org/cgi-bin/cvsweb.cgi/gcc/gcc/java/lex.c.diff?cvsroot=gcc&r1=1.118&r2=1.119
http://gcc.gnu.org/cgi-bin/cvsweb.cgi/gcc/gcc/java/jv-scan.c.diff?cvsroot=gcc&r1=1.45&r2=1.46
http://gcc.gnu.org/cgi-bin/cvsweb.cgi/gcc/gcc/java/ChangeLog.diff?cvsroot=gcc&r1=1.1548&r2=1.1549



-- 


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


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

* [Bug java/15543] "jv-scan --complexity" segfaults
  2004-05-19 16:00 [Bug java/15543] New: "jv-scan --complexity" segfaults vadimn at redhat dot com
                   ` (5 preceding siblings ...)
  2005-02-12  8:30 ` cvs-commit at gcc dot gnu dot org
@ 2005-02-12 13:29 ` bothner at gcc dot gnu dot org
  6 siblings, 0 replies; 8+ messages in thread
From: bothner at gcc dot gnu dot org @ 2005-02-12 13:29 UTC (permalink / raw)
  To: java-prs


------- Additional Comments From bothner at gcc dot gnu dot org  2005-02-12 06:25 -------
Checked in --enable-mapped-location fix,

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


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


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

end of thread, other threads:[~2005-02-12  6:25 UTC | newest]

Thread overview: 8+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2004-05-19 16:00 [Bug java/15543] New: "jv-scan --complexity" segfaults vadimn at redhat dot com
2004-05-19 16:03 ` [Bug java/15543] " vadimn at redhat dot com
2004-05-19 16:04 ` pinskia at gcc dot gnu dot org
2005-02-02  7:43 ` rmathew at gcc dot gnu dot org
2005-02-02 18:41 ` cvs-commit at gcc dot gnu dot org
2005-02-10  0:26 ` bothner at gcc dot gnu dot org
2005-02-12  8:30 ` cvs-commit at gcc dot gnu dot org
2005-02-12 13:29 ` bothner 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).