This is the mail archive of the java@gcc.gnu.org mailing list for the Java project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

Re: gcj seg fault in InetAddress.lookup


>>>>> "Jacob" == Jacob Gladish <jake@gladish.info> writes:

Jacob> Has anyone seen this segfault before? I?m running on freebsd 5.1, gcj
Jacob> 3.3.1. The strange part is that if I write a small unit test that just
Jacob> calls the same exact code, it works.
Jacob> InetAddress.getLocalHost().getHostName().

I don't really know this code, so I can't suggest something other
than just plain old debugging...

Jacob> The dereference of "bytes"
Jacob> seems to be causing it. Why didn't the call to elements fail? 

The compiler turns elements() into a simple addition, with no
dereference.  It is just returning the address of a field in a
structure whose address you pass in.

Tom


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