RFR (XS) JDK-8010389 - After fix for 7107135 a failed dlopen() call results in a VM crash

David Holmes david.holmes at oracle.com
Thu Mar 21 15:47:52 PDT 2013


This looks fine to me Ioi.

David

On 22/03/2013 8:11 AM, Ioi Lam wrote:
> Hi Coleen,
>
> Thanks for the review. I have now moved the call to dlopen and strncpy
> into a helper function, so the code is a little cleaner.
>
> http://cr.openjdk.java.net/~iklam/8010389/dlopen_crash_003/
> <http://cr.openjdk.java.net/%7Eiklam/8010389/dlopen_crash_003/>
>
> - Ioi
>
> On 03/21/2013 02:09 PM, Coleen Phillimore wrote:
>>
>> Hi Ioi,
>>
>> In this code, do you only want to copy the dlerror() to the buffer if
>> the dlopen fails?
>> Why not have the check for null result and copy to error buffer at
>> line 1870 and not have the bool to copy it later?
>>
>> Thanks,
>> Coleen
>>
>> On 03/21/2013 04:54 PM, Ioi Lam wrote:
>>> Hi,
>>>
>>> Could some give a quick review. This is a P2 bug and I'd like fix it
>>> quickly.
>>>
>>> I have updated the patch to have a more simplified test case:
>>>
>>> http://cr.openjdk.java.net/~iklam/8010389/dlopen_crash_002/
>>>
>>>
>>> Thanks
>>>
>>> - Ioi
>>>
>>>
>>> On 03/21/2013 05:55 AM, Christian Tornqvist wrote:
>>>>
>>>> Hi Ioi,
>>>>
>>>> Adding ’-Djava.library.path=.’ to the @run tag seems to work.
>>>>
>>>> Thanks,
>>>>
>>>> Christian
>>>>
>>>> *From:*Ioi Lam [mailto:ioi.lam at oracle.com]
>>>> *Sent:* den 21 mars 2013 05:22
>>>> *To:* hotspot-runtime-dev at openjdk.java.net; Christian Törnqvist
>>>> *Subject:* RFR (XS) JDK-8010389 - After fix for 7107135 a failed
>>>> dlopen() call results in a VM crash
>>>>
>>>> Please review:
>>>>
>>>> http://cr.openjdk.java.net/~iklam/8010389/dlopen_crash_001/
>>>> <http://cr.openjdk.java.net/%7Eiklam/8010389/dlopen_crash_001/>
>>>>
>>>> Bug: After fix for 7107135 a failed dlopen() call results in a VM crash
>>>>
>>>> http://bugs.sun.com/bugdatabase/view_bug.do?bug_id=8010389
>>>> https://jbs.oracle.com/bugs/browse/JDK-8010389
>>>>
>>>>     (The bugs.sun.com page may be unavailable for a couple of days)
>>>>
>>>> Summary of fix:
>>>>
>>>>     Previously, if dlopen() fails inside the VM Thread, the Java
>>>> thread would
>>>>     call dlerror() to try to find out what happened, but would get a
>>>> NULL return
>>>>     instead. Attempts to use this NULL value causes the JVM to crash.
>>>>
>>>>     The fix is to read dlerror() in the VM Thread when necessary.
>>>>
>>>> To Christian:
>>>>
>>>>     I integrated your test into jtreg, but I needed to write a shell
>>>> test to set
>>>>     the LD_LIBRARY_PATH. Is there a way to avoid the shell test?
>>>>
>>>> Tests executed:
>>>>
>>>>     * JPRT (linux only)
>>>>     * UTE (vm.quick.testlist)
>>>>     * JTREG
>>>>
>>>> Thanks,
>>>> Ioi
>>>>
>>>
>>
>


More information about the hotspot-runtime-dev mailing list