RE: SIGSEGV issue

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



David Sayada writes:

 > To better understand what you are asking:
 > 
 > - I need to look at the gcc-4.1.2 source to see if
 > gnu.java.nio.ServerSocketChannelImpl inherits from
 > java.nio.channels.SocketChannel?

Sure.  In particular, we need to know where exactly the code is that
throws this exception.

I see this:

public final class ServerSocketChannelImpl extends ServerSocketChannel
public abstract class ServerSocketChannel extends AbstractSelectableChannel
public abstract class AbstractSelectableChannel extends SelectableChannel
public abstract class SelectableChannel extends AbstractInterruptibleChannel
public abstract class AbstractInterruptibleChannel
  implements Channel, InterruptibleChannel

so it looks to me like this exception is correctly thrown.  

The cause is very likely:

classpath/gnu/java/nio/SelectorImpl.java:292:                     if (((SocketChannel) key.channel ()).isConnected ())

but that code is surrounded by 

			if (key.channel() instanceof SocketChannel)

so it's very weird.


 > - "This is caused by a bug somewhere when generating stack traces",
 > you mean in classpath or libgcj in my case. I must then return you
 > an indication in your code? This is a bug of yours?

Mine personally?  I doubt it.  The bug is probably in the ARM-specific
code.  We won't know until you've run the program in gdb and let us
see where the SEGV occurs.

Andrew.

 > -----Original Message-----
 > From: Andrew Haley [mailto:aph-gcc@xxxxxxxxxxxxxxxxxxx] 
 > Sent: Thursday, August 30, 2007 10:48 AM
 > To: David Sayada
 > Cc: classpath@xxxxxxx; 'Amnon David'
 > Subject: RE: SIGSEGV issue
 > 
 > David Sayada writes:
 >  > Hi Andrew,
 >  > 
 >  > In fact, the exception I am receiving is the following one:
 >  > 
 >  > java.lang.ClassCastException: 
 >  > > gnu.java.nio.ServerSocketChannelImpl cannot be cast to
 >  > java.nio.channels.SocketChannel
 >  > 
 >  > What can make such an exception to occur?
 > 
 > Does gnu.java.nio.ServerSocketChannelImpl inherit from
 > java.nio.channels.SocketChannel?  Have a look.
 > 
 >  > Also can it cause an application to terminate with signal SIGSEGV?
 > 
 > No.  This is caused by a bug somewhere when generating stack traces.
 > You need to run our app under gdb and tell us exactly where the segv
 > happens.
 > 
 > Andrew.
 > 


[Index of Archives]     [Linux Kernel]     [Linux Cryptography]     [Fedora]     [Fedora Directory]     [Red Hat Development]

  Powered by Linux