Hi
I am facing a peculiar problem. When i am running my binary it is running fine. But when i am running with gdb it is showing some memory error. Can anyone tell what could be the reason for this?
Thanks in advance
Sas
Hi
I am facing a peculiar problem. When i am running my binary it is running fine. But when i am running with gdb it is showing some memory error. Can anyone tell what could be the reason for this?
Thanks in advance
Sas
Unless you post what's the error, what's the relevant code...
Did you compile with -g option ? before running with gdb?
You could also use valgrind to check memory problems with your program.
I am having jni call from my code
It is showing error like this
Program received signal SIGSEGV, Segmentation fault.
0x00002aaaac3dd66e in checked_jni_DeleteLocalRef () from /opt/jvm64/jdk1.6.0_17/jre/lib/amd64/server/libjvm.so
Thanks
Sas
Without seeing your code, I can't say for sure. My guess is you're probably passing an uninitialized pointer into checked_jni_DeleteLocalRef (perhaps by way of some other function that ultimately calls checked_jni_DeleteLocalRef). You're simply getting lucky that the uninitialized value is in a valid piece of memory when running normally, but it happens to be invalid when using the debugger.