<div dir="ltr">On 11 October 2013 12:20, Anton Smirnov <span dir="ltr"><<a href="mailto:dev@antonsmirnov.name" target="_blank">dev@antonsmirnov.name</a>></span> wrote:<br><div class="gmail_extra"><div class="gmail_quote">
<blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left-width:1px;border-left-color:rgb(204,204,204);border-left-style:solid;padding-left:1ex"><div dir="ltr"><div class="gmail_extra">My idea is not CXInstance pointer address is corrupted (it's exactly the same), but memory for this address.</div>
</div></blockquote><div><br></div><div>This is also possible, JNI is *also* famous for heap corruption.</div><div><br></div><div><br></div><blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left-width:1px;border-left-color:rgb(204,204,204);border-left-style:solid;padding-left:1ex">
<div dir="ltr"><div class="gmail_extra">I can provide code output where all the clang invocations are done with one single native invocation and it works (tokens are found).</div></div></blockquote><div><br></div><div>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.</div>
<div><br></div><div>Something similar to the problem I had, with a similar fix:</div><div><br></div><div><a href="http://stackoverflow.com/questions/5305079/how-to-debug-jni-heap-corruption-problems">http://stackoverflow.com/questions/5305079/how-to-debug-jni-heap-corruption-problems</a><br>
</div><div><br></div><div>cheers,</div><div>--renato</div><div> </div></div><br></div></div>