This is the mail archive of the gcc-bugs@gcc.gnu.org mailing list for the GCC project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]

java/4766: Stack overflow when compiling .class file



>Number:         4766
>Category:       java
>Synopsis:       Stack overflow when compiling .class file
>Confidential:   no
>Severity:       non-critical
>Priority:       medium
>Responsible:    unassigned
>State:          open
>Class:          sw-bug
>Submitter-Id:   net
>Arrival-Date:   Thu Nov 01 14:46:01 PST 2001
>Closed-Date:
>Last-Modified:
>Originator:     Blane Nelson
>Release:        gcc 3.0.2
>Organization:
>Environment:
PowerPC (G4 466Mhz) Mandrake PPC Linux 8.0.
>Description:

If you put a return statement in a finally statement it will cause a stack overflow.

I think that the code lised below should not be valid but Sun seems to think that this is legal.
>How-To-Repeat:
The following code will cause a stack overflow when compiling the .class file to a .o file.  If you compile .java to .o it works fine.

public int myfunction()
{
  try
  {
     do.something();
  }
  catch( Exception e )
  {
    e.printStackTrace();
  }
  finally
  {
    return 0;
  }
}

>Fix:

>Release-Note:
>Audit-Trail:
>Unformatted:


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]