5

I have written a jvmti agent to trace method invocations. I code it with C and jvmti and jni functions. Our os is Fedora 15 and the agent is compiled into a .so file. When I test it with a non-trivial java program, it crashes and gives the following error message:

A fatal error has been detected by the Java Runtime Environment:
  SIGSEGV (0xb) at pc=0x4e8e4e28, pid=24294, tid=3065949040.
  JRE version: 6.0_32-b05.
  Java VM: Java HotSpot (TM) Server VM (20.7-b02 mixed mode linux-x86).
  **Problematic frame:
    C [libc.so.6+0x7ae68] strcpy+0x18.**
4

1 回答 1

1

IGSEGV是 Signal Segmentation Violation 的缩写。在 POSIX 兼容的平台上,SIGSEGV 是当进程进行无效内存引用或分段错误时发送给进程的信号。

您必须检查 JVMTI 代理中的指针。您很可能会进行一些不干净的指针操作。

于 2012-10-01T21:48:31.073 回答