gcj seg fault in InetAddress.lookup

Tom Tromey tromey@redhat.com
Wed Jun 16 03:59:00 GMT 2004


>>>>> "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



More information about the Java mailing list