[cfe-dev] clang via JNI + libclang-c
renato.golin at linaro.org
Fri Oct 11 04:36:03 PDT 2013
On 11 October 2013 12:20, Anton Smirnov <dev at antonsmirnov.name> wrote:
> My idea is not CXInstance pointer address is corrupted (it's exactly the
> same), but memory for this address.
This is also possible, JNI is *also* famous for heap corruption.
I can provide code output where all the clang invocations are done with one
> single native invocation and it works (tokens are found).
If it works from C and works on pure-C from Java, than the only answer is
that JNI is corrupting the memory. It's either that, or your C compiler has
a serious bug. To make sure it's not the compiler, try different versions.
Search Google for "jni heap corruption" or "jni stack corruption" and
you'll see what I mean.
Something similar to the problem I had, with a similar fix:
-------------- next part --------------
An HTML attachment was scrubbed...
More information about the cfe-dev