<div dir="ltr">On 11 October 2013 10:02, 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:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"><div dir="ltr"><div>The problem is that if i do in the same invocation from java (f.e. in single Java_name_antonsmirnov_clang_clang_1wrapper_tokenize() function) - it works good.</div>

<div>For example if i just remember parameters and then create index, parse, tokenize (clang-c invocations) within tokenize() method it's okay.</div><div><br></div><div>If i do everything in separate native methods (clang-c invocation in separate native calls from java) (as it's designed to do) pointers are corrupted.</div>

<div>So unpacked CXIndex in parse() invocation is corrupted even if it was packed/unpacked correctly and the pointer is the same.</div></div></blockquote><div></div></div><br></div><div class="gmail_extra">This looks a lot like standard JNI stack corruption to me. This is the exact same behaviour I've seen in JNI 10 years ago, and I'm not surprised they're still there...</div>
<div class="gmail_extra"><br></div><div class="gmail_extra">cheers,</div><div class="gmail_extra">--renato</div></div>