This is the mail archive of the
java@gcc.gnu.org
mailing list for the Java project.
Re: this pointer off by one?
- To: Adam Megacz <gcj at lists dot megacz dot com>
- Subject: Re: this pointer off by one?
- From: Bryce McKinlay <bryce at waitaki dot otago dot ac dot nz>
- Date: Mon, 12 Nov 2001 17:26:16 +1300
- Cc: java at gcc dot gnu dot org
- References: <m3lmhcherk.fsf@noneofyourbusiness.com>
Adam Megacz wrote:
>Very bizarre... I have a native method written in C++ using CNI, but
>within the body of the method, all variable accesses end up accessing
>a memory location four octets (32 bits) beyond the proper location.
>
>I'm using GCJ 3.0.2. Any ideas what might cause this?
>
Sounds like C++ is confused over whether you are using hash
synchronization? Try dumping the preprocessor output (-save-temps) and
checking the definition of java::lang::Object. The following line:
jobject sync_info;
should be present only if hash synchronization is in effect (ie
-fhash-synchronization is being passed to gcj from libgcj.spec). I don't
remember if GCJ 3.0 uses hash sync by default or not.
regards
Bryce.