-
Notifications
You must be signed in to change notification settings - Fork 172
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Double free in invokeNative #270
Comments
@mikehearn, my first suggestion would be to try running it under valgrind. (if you're on Maverics using homebrew, you'll have to install with 'brew install --HEAD valgrind') |
Ah, and apparently there's a patch you MAY still have to apply. See Homebrew/legacy-homebrew#23660. Specifically, editing the formula:
|
On Wed, 21 May 2014, Mike Hearn wrote:
A test case would be very helpful. It doesn't necessarily have to be BTW, which version of Xcode did you use to build OpenJDK 8? Did you build |
I used an old Xcode version. I will try and make a test case that's easier than "build bitcoinj, download junit, run one of the tests under junitrunner with avian" and then valgrind it. |
I'm trying to get the bitcoinj test suite to pass under Avian. ECKeyTest fails as follows:
/Applications/Xcode.app/Contents/Developer/usr/bin/gdb --args /Users/mike/Documents/Source/avian/build/darwin-x86_64-openjdk-src/avian -Dcom.lambdaworks.jni.loader=nil -cp target/bitcoinj-0.12-SNAPSHOT-bundled.jar:/Users/mike/Downloads/junit-4.11.jar:/Users/mike/Downloads/hamcrest-core-1.3.jar:target/test-classes org.junit.runner.JUnitCore com.google.bitcoin.core.ECKeyTest
...avian(57989,0x7fff762be310) malloc: *** error for object 0x1048124a0: pointer being freed was not allocated
*** set a breakpoint in malloc_error_break to debug
Program received signal SIGABRT, Aborted.
0x00007fff84a70866 in __pthread_kill ()
(gdb) bt
#0 0x00007fff84a70866 in __pthread_kill ()
#1 0x00007fff8bf6e35c in pthread_kill ()
#2 0x00007fff8e9dab1a in abort ()
#3 0x00007fff88c3a07f in free ()
#4 0x000000010002a808 in free (this=0x10480a2d0, p=0x6, size=32) at heap.cpp:1865
#5 0x0000000100031e3d in invokeNative2 inlined at /Users/mike/Documents/Source/avian/src/compile.cpp:7328
#6 0x0000000100031e3d in invokeNative (t=0x1048124a0) at compile.cpp:7539
#7 0x0000000105f9b07b in ?? ()
This is with Avian 1.0 compiled against JDK8.
I'm not sure what the best way to debug this is. Any advice appreciated. I can try to make a minimal test case: I suspect it's to do with the scrypt library, which has a JNI component (though I'm trying to disable usage of it with the property flag).
The text was updated successfully, but these errors were encountered: