public inbox for gcc-prs@sourceware.org
help / color / mirror / Atom feed
From: Tom Tromey <tromey@redhat.com>
To: nobody@gcc.gnu.org
Cc: gcc-prs@gcc.gnu.org,
Subject: Re: java/5812: GCJ 3.0.2 segfaults on class file from Sun JDK 1.3 compiler
Date: Sat, 02 Mar 2002 10:46:00 -0000	[thread overview]
Message-ID: <20020302184604.2601.qmail@sources.redhat.com> (raw)

The following reply was made to PR java/5812; it has been noted by GNATS.

From: Tom Tromey <tromey@redhat.com>
To: adam@medovina.org
Cc: gcc-gnats@gcc.gnu.org, Per Bothner <per@bothner.com>
Subject: Re: java/5812: GCJ 3.0.2 segfaults on class file from Sun JDK 1.3 compiler
Date: 02 Mar 2002 12:10:11 -0700

 >>>>> "Adam" == Adam Dingle <adam@medovina.org> writes:
 
 Adam> When I compile the class definition below with the Sun JDK 1.3
 Adam> compiler and then feed the class file to GCJ 3.0.2, GCJ
 Adam> segfaults.  I've included the .class file as an attachment.
 
 First, I agree that gcj should not crash.  That is a bug.
 
 However, this is unusual bytecode.
 Here it is:
 
   0: jsr 12
   3: goto 15
   6: astore_1
   7: jsr 12
  10: aload_1
  11: athrow
  12: astore_2
  13: iconst_1
  14: ireturn
  15: return
 
 It isn't clear to me whether this should verify.
 The `return' at PC=15 is invalid, since the method signature is ()I.
 Ordinarily this would be a verification error.
 
 However, given that Sun's compiler generated this, perhaps they intend
 that we only verify reachable code.  In this case, the `return' is not
 reachable since there is no `ret' corresponding to the `jsr'.
 
 Per, what do you think about this?
 
 I do think it is bogus that Sun's compiler does this.
 For this source we generate the aesthetically pleasing:
 
   0: iconst_1
   1: ireturn
 
 Tom


             reply	other threads:[~2002-03-02 18:46 UTC|newest]

Thread overview: 7+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2002-03-02 10:46 Tom Tromey [this message]
  -- strict thread matches above, loose matches on Subject: below --
2002-03-25 22:27 tromey
2002-03-05 11:36 Per Bothner
2002-03-02 12:16 Adam Dingle
2002-03-02 11:06 Per Bothner
2002-03-02 10:16 Alexandre Petit-Bianco
2002-03-02  8:56 adam

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20020302184604.2601.qmail@sources.redhat.com \
    --to=tromey@redhat.com \
    --cc=gcc-prs@gcc.gnu.org \
    --cc=nobody@gcc.gnu.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
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).