RFR: 8199323: hsdis could not be loaded which are located on long path

Yasumasa Suenaga yasuenag at gmail.com
Thu Mar 8 13:21:35 UTC 2018


Hi all,

Could you review and sponsor it?

                           webrev: http://cr.openjdk.java.net/~ysuenaga/JDK-8199323/webrev.00/
                              JBS: https://bugs.openjdk.java.net/browse/JDK-8199323
Mach5 test result on submit repo: mach5-one-ysuenaga-JDK-8199323-20180308-1027-13701

I encountered DebuggerException when hsdis is located on long path as below:

Location of hsdis:
/home/yasuenag/work/xxxxxx/xxxxxxxxxxxxxx/xxxxxxxxxxxxx/workspace/usr/lib/jvm/java-1.8.0-openjdk-1.8.0.101-3.b13.el6_8.x86_64/jre/lib/amd64/hsdis-amd64.so

Exception:
sun.jvm.hotspot.debugger.DebuggerException: /home/yasuenag/work/xxxxxx/xxxxxxxxxxxxxx/xxxxxxxxxxxxx/workspace/usr/lib/jvm/java-1.8.0-openjdk-1.8.0.101-3.b13.el6_8.x86_64/j: cannot open shared object file: No such file or directory

In Java_sun_jvm_hotspot_asm_Disassembler_load_1library(), buffer which uses for library path is defined as below:

```
char buffer[128];
```

I copied JVM_MAXPATHLEN related code to sadis.c from os/posix/include/jvm_md.h and os/windows/include/jvm_md.h .


I added noreg-hard label on this ticket because this issue is available when disassembling on coredump.


Thanks,

Yasumasa


More information about the serviceability-dev mailing list