• Open Menu Close Menu
  • Apple
  • Shopping Bag
  • Apple
  • Mac
  • iPad
  • iPhone
  • Watch
  • TV
  • Music
  • Support
  • Search apple.com
  • Shopping Bag

Lists

Open Menu Close Menu
  • Terms and Conditions
  • Lists hosted on this site
  • Email the Postmaster
  • Tips for posting to public mailing lists
jni with Guard Malloc
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

jni with Guard Malloc


  • Subject: jni with Guard Malloc
  • From: Frank Rimlinger <email@hidden>
  • Date: Fri, 10 Sep 2004 23:20:32 -0400

When attempting to debug my C++ program with Guard Malloc, I keep hitting this error

/usr/lib/libSystem.B.dylib(copysign.o) definition of _copysign
/System/Library/Frameworks/JavaVM.framework/Versions/1.4.2/Libraries/ libjava.jnilib(single module) definition of _copysign
Program received signal: "SIGTRAP".


This error does not occur when Guard Malloc is not on. I have stripped my program to the bare bones, with just enough support to make the jni call in the first place. Here is the stack trace.

#0	0x8fe01700 in __dyld_halt
#1	0x8fe0a778 in __dyld_multiply_defined_error
#2	0x8fe0cfec in __dyld_link_library_module
#3	0x8fe14eec in __dyld__dyld_NSLookupSymbolInImage
#4	0x90017fe4 in NSLookupSymbolInImage
#5	0x96fc136c in JVM_GetClassMethodsCount
#6	0x96fd62c0 in JVM_Sleep
#7	0x9700057c in JNI_CreateJavaVM_Impl
#8	0x97000540 in JNI_CreateJavaVM_Impl
#9	0x96ff1448 in JVM_IsPrimitiveClass
#10	0x96fe13b0 in JVM_GetClassDeclaredMethods
#11	0x96ffbd6c in JNI_CreateJavaVM_Impl
#12	0x00032d54 in main at main.cpp:213

I am also getting this error on the console

(gdb) continue
Current language: auto; currently c++
Java HotSpot(TM) Client VM warning: Attempt to protect stack guard pages failed.
Java HotSpot(TM) Client VM warning: Attempt to deallocate stack guard pages failed.
dyld: /Users/frank/Destiny.build/jniTest multiple definitions of symbol _copysign
/usr/lib/libSystem.B.dylib(copysign.o) definition of _copysign
/System/Library/Frameworks/JavaVM.framework/Versions/1.4.2/Libraries/ libjava.jnilib(single module) definition of _copysign
Program received signal: "SIGTRAP".


I suppose there is something called _copysign that is multiply defined, but I only include the stock frameworks JavaVM.framework and libstdc++.a. And why should Guard Malloc care one way or the other as this is not a memory thing. Is there a way around this problem so that I can debug a C++ program that makes jni calls with Guard Malloc?

frank
_______________________________________________
xcode-users mailing list | email@hidden
Help/Unsubscribe/Archives: http://www.lists.apple.com/mailman/listinfo/xcode-users
Do not post admin requests to the list. They will be ignored.


  • Prev by Date: redirected input
  • Next by Date: Re: jni with Guard Malloc
  • Previous by thread: Re: redirected input
  • Next by thread: Re: jni with Guard Malloc
  • Index(es):
    • Date
    • Thread