[prev in list] [next in list] [prev in thread] [next in thread] 

List:       openjdk-ppc-aix-port-dev
Subject:    Re: RFR [S]: 8079473: allow demangling to be optional in dll_address_to_function_name
From:       Thomas_Stüfe <thomas.stuefe () gmail ! com>
Date:       2015-10-07 15:22:42
Message-ID: CAA-vtUyu5un6NonjK53OHvi09rQsp9A4XE1mBvjyst-tdUvptA () mail ! gmail ! com
[Download RAW message or body]

Hi Bertrand, Volker,

it may even make sense to disable demangling on AIX by default. AIX
Demangle() function is shaky, so we did switch it off in our VM.

Kind Regards, Thomas



On Fri, Jun 12, 2015 at 12:01 PM, Bertrand Delsart <
bertrand.delsart@oracle.com> wrote:

> Thanks Volker,
>
> Bertrand.
>
>
> On 12/06/2015 11:48, Volker Simonis wrote:
>
>> Hi Bertrand,
>>
>> thanks for caring about the AIX port.
>> The AIX changes look good and work perfectly.
>>
>> Regards,
>> Volker
>>
>>
>> On Fri, Jun 12, 2015 at 8:28 AM, Bertrand Delsart
>> <bertrand.delsart@oracle.com> wrote:
>>
>>> Thanks David,
>>>
>>> Reminder: this webrev includes trivial but untested AIX changes. Second
>>> reviewer need not be from the AIX porting team but feedback appreciated.
>>>
>>> Regards,
>>>
>>> Bertrand.
>>>
>>>
>>> On 12/06/2015 05:53, David Holmes wrote:
>>>
>>>>
>>>> Hi Bertrand,
>>>>
>>>> This all looks okay to me. Thanks for the detailed description.
>>>>
>>>> Thanks,
>>>> David
>>>>
>>>> On 28/05/2015 11:52 PM, Bertrand Delsart wrote:
>>>>
>>>>>
>>>>> Hi all,
>>>>>
>>>>> Here is a webrev that add a 'demangle' argument to
>>>>> dll_address_to_function_name so as to make the demangling optional. The
>>>>> webrev also includes some limited cleanup and fixes an issue I noticed
>>>>> on windows.
>>>>>
>>>>> https://bugs.openjdk.java.net/browse/JDK-8079473
>>>>> http://cr.openjdk.java.net/~bdelsart/8079473/
>>>>>
>>>>> Fix is targeted at JDK9 and will be pushed through hs-rt.
>>>>>
>>>>> This enhancement is currently used only by some closed extensions. It
>>>>> has been validated on linux and the fix is very similar on all
>>>>> platforms
>>>>> except AIX.
>>>>>
>>>>> I've quickly implemented the AIX version but could not test it. Let me
>>>>> know if you would prefer me to remove the AIX code and just ensure that
>>>>> the 'demangle' argument is ignored on that platform.
>>>>>
>>>>> The cleanup is about optional arguments to decode, which were redefined
>>>>> in the overridden versions for the different operating systems. To
>>>>> avoid
>>>>> weird behaviors, the default values should be defined only in the
>>>>> toplevel class AbstractDecoder, not the subclasses (but that was OK as
>>>>> long as the default values were identical)
>>>>>
>>>>> On Windows, I discovered a bug while adding the non-demangling support.
>>>>> This old code from WindowsDecoder::decode should not behave as expected
>>>>> if really used:
>>>>>           if (demangle(pSymbol->Name, buf, buflen)) {
>>>>>             jio_snprintf(buf, buflen, "%s", pSymbol->Name);
>>>>>           }
>>>>> The code is supposed to write in 'buf' the raw form when the demangling
>>>>> fails. Hence, the jio_snprintf should be executed when demangle returns
>>>>> false. The code above fails to properly set buf when the demangling
>>>>> fails and also replaced the demangled form by the raw form when
>>>>> demangling succeeded.
>>>>>
>>>>> It should have been "if (! demangle(...". With my extension, it now is
>>>>> "if (!(demangle_name && demangle(...", like on other platforms.
>>>>>
>>>>> Best regards,
>>>>>
>>>>> Bertrand.
>>>>>
>>>>
>>>
>>>
>>> --
>>> Bertrand Delsart,                     Grenoble Engineering Center
>>> Oracle,         180 av. de l'Europe,          ZIRST de Montbonnot
>>> 38330 Montbonnot Saint Martin,                             FRANCE
>>> bertrand.delsart@oracle.com             Phone : +33 4 76 18 81 23
>>>
>>> ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
>>> NOTICE: This email message is for the sole use of the intended
>>> recipient(s) and may contain confidential and privileged
>>> information. Any unauthorized review, use, disclosure or
>>> distribution is prohibited. If you are not the intended recipient,
>>> please contact the sender by reply email and destroy all copies of
>>> the original message.
>>> ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
>>>
>>
>
> --
> Bertrand Delsart,                     Grenoble Engineering Center
> Oracle,         180 av. de l'Europe,          ZIRST de Montbonnot
> 38330 Montbonnot Saint Martin,                             FRANCE
> bertrand.delsart@oracle.com             Phone : +33 4 76 18 81 23
>
> ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
> NOTICE: This email message is for the sole use of the intended
> recipient(s) and may contain confidential and privileged
> information. Any unauthorized review, use, disclosure or
> distribution is prohibited. If you are not the intended recipient,
> please contact the sender by reply email and destroy all copies of
> the original message.
> ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
>

[Attachment #3 (text/html)]

<div dir="ltr">Hi Bertrand, Volker,<div><br></div><div>it may even make sense to \
disable demangling on AIX by default. AIX Demangle() function is shaky, so we did \
switch it off in our VM.</div><div><br></div><div>Kind Regards, \
Thomas<br><div><br></div><div><br></div></div></div><div class="gmail_extra"><br><div \
class="gmail_quote">On Fri, Jun 12, 2015 at 12:01 PM, Bertrand Delsart <span \
dir="ltr">&lt;<a href="mailto:bertrand.delsart@oracle.com" \
target="_blank">bertrand.delsart@oracle.com</a>&gt;</span> wrote:<br><blockquote \
class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc \
solid;padding-left:1ex">Thanks Volker,<br> <br>
Bertrand.<div class="HOEnZb"><div class="h5"><br>
<br>
On 12/06/2015 11:48, Volker Simonis wrote:<br>
<blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc \
solid;padding-left:1ex"> Hi Bertrand,<br>
<br>
thanks for caring about the AIX port.<br>
The AIX changes look good and work perfectly.<br>
<br>
Regards,<br>
Volker<br>
<br>
<br>
On Fri, Jun 12, 2015 at 8:28 AM, Bertrand Delsart<br>
&lt;<a href="mailto:bertrand.delsart@oracle.com" \
target="_blank">bertrand.delsart@oracle.com</a>&gt; wrote:<br> <blockquote \
class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc \
solid;padding-left:1ex"> Thanks David,<br>
<br>
Reminder: this webrev includes trivial but untested AIX changes. Second<br>
reviewer need not be from the AIX porting team but feedback appreciated.<br>
<br>
Regards,<br>
<br>
Bertrand.<br>
<br>
<br>
On 12/06/2015 05:53, David Holmes wrote:<br>
<blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc \
solid;padding-left:1ex"> <br>
Hi Bertrand,<br>
<br>
This all looks okay to me. Thanks for the detailed description.<br>
<br>
Thanks,<br>
David<br>
<br>
On 28/05/2015 11:52 PM, Bertrand Delsart wrote:<br>
<blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc \
solid;padding-left:1ex"> <br>
Hi all,<br>
<br>
Here is a webrev that add a &#39;demangle&#39; argument to<br>
dll_address_to_function_name so as to make the demangling optional. The<br>
webrev also includes some limited cleanup and fixes an issue I noticed<br>
on windows.<br>
<br>
<a href="https://bugs.openjdk.java.net/browse/JDK-8079473" rel="noreferrer" \
target="_blank">https://bugs.openjdk.java.net/browse/JDK-8079473</a><br> <a \
href="http://cr.openjdk.java.net/~bdelsart/8079473/" rel="noreferrer" \
target="_blank">http://cr.openjdk.java.net/~bdelsart/8079473/</a><br> <br>
Fix is targeted at JDK9 and will be pushed through hs-rt.<br>
<br>
This enhancement is currently used only by some closed extensions. It<br>
has been validated on linux and the fix is very similar on all platforms<br>
except AIX.<br>
<br>
I&#39;ve quickly implemented the AIX version but could not test it. Let me<br>
know if you would prefer me to remove the AIX code and just ensure that<br>
the &#39;demangle&#39; argument is ignored on that platform.<br>
<br>
The cleanup is about optional arguments to decode, which were redefined<br>
in the overridden versions for the different operating systems. To avoid<br>
weird behaviors, the default values should be defined only in the<br>
toplevel class AbstractDecoder, not the subclasses (but that was OK as<br>
long as the default values were identical)<br>
<br>
On Windows, I discovered a bug while adding the non-demangling support.<br>
This old code from WindowsDecoder::decode should not behave as expected<br>
if really used:<br>
               if (demangle(pSymbol-&gt;Name, buf, buflen)) {<br>
                  jio_snprintf(buf, buflen, &quot;%s&quot;, pSymbol-&gt;Name);<br>
               }<br>
The code is supposed to write in &#39;buf&#39; the raw form when the demangling<br>
fails. Hence, the jio_snprintf should be executed when demangle returns<br>
false. The code above fails to properly set buf when the demangling<br>
fails and also replaced the demangled form by the raw form when<br>
demangling succeeded.<br>
<br>
It should have been &quot;if (! demangle(...&quot;. With my extension, it now is<br>
&quot;if (!(demangle_name &amp;&amp; demangle(...&quot;, like on other platforms.<br>
<br>
Best regards,<br>
<br>
Bertrand.<br>
</blockquote></blockquote>
<br>
<br>
<br>
--<br>
Bertrand Delsart,                                Grenoble Engineering Center<br>
Oracle,              180 av. de l&#39;Europe,               ZIRST de Montbonnot<br>
38330 Montbonnot Saint Martin,                                            FRANCE<br>
<a href="mailto:bertrand.delsart@oracle.com" \
target="_blank">bertrand.delsart@oracle.com</a>                    Phone : +33 4 76 \
18 81 23<br> <br>
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~<br>
NOTICE: This email message is for the sole use of the intended<br>
recipient(s) and may contain confidential and privileged<br>
information. Any unauthorized review, use, disclosure or<br>
distribution is prohibited. If you are not the intended recipient,<br>
please contact the sender by reply email and destroy all copies of<br>
the original message.<br>
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~<br>
</blockquote></blockquote>
<br>
<br>
-- <br>
Bertrand Delsart,                                Grenoble Engineering Center<br>
Oracle,              180 av. de l&#39;Europe,               ZIRST de Montbonnot<br>
38330 Montbonnot Saint Martin,                                            FRANCE<br>
<a href="mailto:bertrand.delsart@oracle.com" \
target="_blank">bertrand.delsart@oracle.com</a>                    Phone : +33 4 76 \
18 81 23<br> <br>
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~<br>
NOTICE: This email message is for the sole use of the intended<br>
recipient(s) and may contain confidential and privileged<br>
information. Any unauthorized review, use, disclosure or<br>
distribution is prohibited. If you are not the intended recipient,<br>
please contact the sender by reply email and destroy all copies of<br>
the original message.<br>
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~<br>
</div></div></blockquote></div><br></div>



[prev in list] [next in list] [prev in thread] [next in thread] 

Configure | About | News | Add a list | Sponsored by KoreLogic