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]

Re: this pointer off by one?


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.



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