This is the mail archive of the
java@gcc.gnu.org
mailing list for the Java project.
Re: gcj seg fault in InetAddress.lookup
- From: Tom Tromey <tromey at redhat dot com>
- To: "Jacob Gladish" <jake at gladish dot info>
- Cc: <java at gcc dot gnu dot org>
- Date: 15 Jun 2004 21:46:31 -0600
- Subject: Re: gcj seg fault in InetAddress.lookup
- References: <003c01c45320$26c32a80$a711620a@hq.netapp.com>
- Reply-to: tromey at redhat dot com
>>>>> "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