<html>
<head>
<meta content="text/html; charset=ISO-8859-1"
http-equiv="Content-Type">
</head>
<body bgcolor="#FFFFFF" text="#000000">
<div class="moz-cite-prefix">On 12/19/2012 12:39 PM, harold seigel
wrote:<br>
</div>
<blockquote cite="mid:50D1FBD1.3000504@oracle.com" type="cite">
<meta content="text/html; charset=ISO-8859-1"
http-equiv="Content-Type">
>> <span
style="font-size:11.0pt;font-family:"Calibri","sans-serif";color:#1F497D"><o:p></o:p></span><span
style="font-size:11.0pt;font-family:"Calibri","sans-serif";color:#1F497D">I
say file the bug merely to document the issue and get this code
checked in</span><br>
I agree.<br>
</blockquote>
<br>
Harold, Thank you for looking at this change closely.<br>
Dan, please file a bug about the fake path and include this writeup
below, because I think I hit this bug with testing CDS with the
gamma launcher and it might explain it.<br>
Thanks,<br>
Coleen<br>
<br>
<blockquote cite="mid:50D1FBD1.3000504@oracle.com" type="cite"> <br>
Harold<br>
<br>
On 12/19/2012 12:11 PM, Ron Durbin wrote:
<blockquote
cite="mid:684945f3-4869-4674-bf17-74193ff9ffa7@default"
type="cite">
<meta http-equiv="Content-Type" content="text/html;
charset=ISO-8859-1">
<meta name="Generator" content="Microsoft Word 12 (filtered
medium)">
<style><!--
/* Font Definitions */
@font-face
        {font-family:"Cambria Math";
        panose-1:2 4 5 3 5 4 6 3 2 4;}
@font-face
        {font-family:Calibri;
        panose-1:2 15 5 2 2 2 4 3 2 4;}
@font-face
        {font-family:Tahoma;
        panose-1:2 11 6 4 3 5 4 4 2 4;}
@font-face
        {font-family:Consolas;
        panose-1:2 11 6 9 2 2 4 3 2 4;}
/* Style Definitions */
p.MsoNormal, li.MsoNormal, div.MsoNormal
        {margin:0in;
        margin-bottom:.0001pt;
        font-size:12.0pt;
        font-family:"Times New Roman","serif";
        color:black;}
a:link, span.MsoHyperlink
        {mso-style-priority:99;
        color:blue;
        text-decoration:underline;}
a:visited, span.MsoHyperlinkFollowed
        {mso-style-priority:99;
        color:purple;
        text-decoration:underline;}
pre
        {mso-style-priority:99;
        mso-style-link:"HTML Preformatted Char";
        margin:0in;
        margin-bottom:.0001pt;
        font-size:10.0pt;
        font-family:"Courier New","serif";
        color:black;}
tt
        {mso-style-priority:99;
        font-family:"Courier New","serif";}
p.MsoAcetate, li.MsoAcetate, div.MsoAcetate
        {mso-style-priority:99;
        mso-style-link:"Balloon Text Char";
        margin:0in;
        margin-bottom:.0001pt;
        font-size:8.0pt;
        font-family:"Tahoma","sans-serif";
        color:black;}
span.HTMLPreformattedChar
        {mso-style-name:"HTML Preformatted Char";
        mso-style-priority:99;
        mso-style-link:"HTML Preformatted";
        font-family:Consolas;
        color:black;}
span.BalloonTextChar
        {mso-style-name:"Balloon Text Char";
        mso-style-priority:99;
        mso-style-link:"Balloon Text";
        font-family:"Tahoma","sans-serif";
        color:black;}
span.changed
        {mso-style-name:changed;}
span.EmailStyle23
        {mso-style-type:personal;
        font-family:"Calibri","sans-serif";
        color:#1F497D;}
span.EmailStyle24
        {mso-style-type:personal;
        font-family:"Calibri","sans-serif";
        color:#1F497D;}
span.EmailStyle25
        {mso-style-type:personal;
        font-family:"Calibri","sans-serif";
        color:#1F497D;}
span.EmailStyle26
        {mso-style-type:personal;
        font-family:"Calibri","sans-serif";
        color:#1F497D;}
span.EmailStyle27
        {mso-style-type:personal;
        font-family:"Calibri","sans-serif";
        color:#1F497D;}
span.EmailStyle28
        {mso-style-type:personal-reply;
        font-family:"Calibri","sans-serif";
        color:#1F497D;}
.MsoChpDefault
        {mso-style-type:export-only;
        font-size:10.0pt;}
@page WordSection1
        {size:8.5in 11.0in;
        margin:1.0in 1.0in 1.0in 1.0in;}
div.WordSection1
        {page:WordSection1;}
--></style><!--[if gte mso 9]><xml>
<o:shapedefaults v:ext="edit" spidmax="1026" />
</xml><![endif]--><!--[if gte mso 9]><xml>
<o:shapelayout v:ext="edit">
<o:idmap v:ext="edit" data="1" />
</o:shapelayout></xml><![endif]-->
<div class="WordSection1">
<p class="MsoNormal"><span
style="font-size:11.0pt;font-family:"Calibri","sans-serif";color:#1F497D">Harold<o:p></o:p></span></p>
<p class="MsoNormal"><span
style="font-size:11.0pt;font-family:"Calibri","sans-serif";color:#1F497D"><o:p> </o:p></span></p>
<p class="MsoNormal"><span
style="font-size:11.0pt;font-family:"Calibri","sans-serif";color:#1F497D">I
would say first off this is not a bug that has manifested
itself yet.<o:p></o:p></span></p>
<p class="MsoNormal"><span
style="font-size:11.0pt;font-family:"Calibri","sans-serif";color:#1F497D">So
it is low priority.<o:p></o:p></span></p>
<p class="MsoNormal"><span
style="font-size:11.0pt;font-family:"Calibri","sans-serif";color:#1F497D"><o:p> </o:p></span></p>
<p class="MsoNormal"><span
style="font-size:11.0pt;font-family:"Calibri","sans-serif";color:#1F497D">That
being said this exposure is not introduced or made more
risky by my changes.<o:p></o:p></span></p>
<p class="MsoNormal"><span
style="font-size:11.0pt;font-family:"Calibri","sans-serif";color:#1F497D">This
is the only issue that we have against this code review
and it does not belong to the changes being reviewed=.<o:p></o:p></span></p>
<p class="MsoNormal"><span
style="font-size:11.0pt;font-family:"Calibri","sans-serif";color:#1F497D"><o:p> </o:p></span></p>
<p class="MsoNormal"><span
style="font-size:11.0pt;font-family:"Calibri","sans-serif";color:#1F497D">I
say file the bug merely to document the issue and get this
code checked in.<o:p></o:p></span></p>
<p class="MsoNormal"><span
style="font-size:11.0pt;font-family:"Calibri","sans-serif";color:#1F497D"><o:p> </o:p></span></p>
<p class="MsoNormal"><span
style="font-size:11.0pt;font-family:"Calibri","sans-serif";color:#1F497D">Ron<o:p></o:p></span></p>
<div>
<div style="border:none;border-top:solid #B5C4DF
1.0pt;padding:3.0pt 0in 0in 0in">
<p class="MsoNormal"><b><span
style="font-size:10.0pt;font-family:"Tahoma","sans-serif";color:windowtext">From:</span></b><span
style="font-size:10.0pt;font-family:"Tahoma","sans-serif";color:windowtext">
Daniel D. Daugherty <br>
<b>Sent:</b> Wednesday, December 19, 2012 9:30 AM<br>
<b>To:</b> <a moz-do-not-send="true"
class="moz-txt-link-abbreviated"
href="mailto:hotspot-runtime-dev@openjdk.java.net">hotspot-runtime-dev@openjdk.java.net</a>;
build-dev; <a moz-do-not-send="true"
class="moz-txt-link-abbreviated"
href="mailto:serviceability-dev@openjdk.java.net">serviceability-dev@openjdk.java.net</a><br>
<b>Subject:</b> Re: Code Review fix for 8005044 remove
crufty '_g' support from HS runtime code<o:p></o:p></span></p>
</div>
</div>
<p class="MsoNormal"><o:p> </o:p></p>
<p class="MsoNormal"><tt><span style="font-size:10.0pt">Adding
the other aliases back in...</span></tt><span
style="font-size:10.0pt;font-family:"Courier
New","serif""><br>
<br>
<tt>Harold,</tt><br>
<br>
<tt>This question:</tt><br>
<br>
<tt>> Another nit: Is it worth checking that all of</tt><br>
<tt>> "/hotspot/libjvm.so" could get copied to buf?
(i.e.: that</tt><br>
<tt>> buflen-len > strlen("/hotspot/libjvm.so")</tt><br>
<br>
<tt>is straight forward and the short answer is: yes, that</tt><br>
<tt>code makes assumptions that "/hotspot/libjvm.so" will</tt><br>
<tt>fit into 'buf'. It should not do that.</tt><br>
<br>
<tt>It is Ron's call as to whether he wants to fix this
existing</tt><br>
<tt>bug as part of this work. It is easy enough to fix the
obvious</tt><br>
<tt>part of the bug, but... as is normal with HotSpot,
there</tt><br>
<tt>is more going on here than meets the eye...</tt><br>
<br>
<tt>The slightly longer answer is that it probably doesn't</tt><br>
<tt>matter because the path being created here is a fake.</tt><br>
<tt>As long as the "/hotspot/l" part gets copied, then the</tt><br>
<tt>callers of os::jvm_path() will be able to handle the</tt><br>
<tt>fakery.</tt><br>
<br>
<tt>Of course, there is an even longer answer. Read on if</tt><br>
<tt>you want gory details (and a history lesson).</tt><br>
<br>
<tt>This gamma launcher stuff is giving me an absolute
headache.</tt><br>
<tt>Unfortunately, there is a lot of history involved
here...</tt><br>
<br>
<tt>Here are the variations:</tt><br>
<br>
<tt>src/os/bsd/vm/os_bsd.cpp:</tt><br>
<br>
<tt> 1715 if (Arguments::created_by_gamma_launcher())
{</tt><br>
<tt> 1716 // Support for the gamma launcher.
Typical value for buf is</tt><br>
<tt> 1717 //
"<JAVA_HOME>/jre/lib/<arch>/<vmtype>/libjvm".
If "/jre/lib/" appears at</tt><br>
<tt> 1718 // the right place in the string, then
assume we are installed in a JDK and</tt><br>
<tt> 1719 // we're done. Otherwise, check for a
JAVA_HOME environment variable and</tt><br>
<tt> 1720 // construct a path to the JVM being
overridden.</tt><br>
<br>
<tt><snip></tt><br>
<br>
<tt> 1762 // If the path exists within
JAVA_HOME, add the JVM library name</tt><br>
<tt> 1763 // to complete the path to JVM being
overridden. Otherwise fallback</tt><br>
<tt> 1764 // to the path to the current library.</tt><br>
<tt> 1765 if (0 == access(buf, F_OK)) {</tt><br>
<tt> 1766 // Use current module name "libjvm"</tt><br>
<tt> 1767 len = strlen(buf);</tt><br>
<tt> 1768 snprintf(buf + len, buflen-len,
"/libjvm%s", JNI_LIB_SUFFIX);</tt><br>
<tt> 1769 } else {</tt><br>
<tt> 1770 // Fall back to path of current
library</tt><br>
<tt> 1771 rp = realpath(dli_fname, buf);</tt><br>
<tt> 1772 if (rp == NULL)</tt><br>
<tt> 1773 return;</tt><br>
<tt> 1774 }</tt><br>
<br>
<tt>src/os/linux/vm/os_linux.cpp:</tt><br>
<br>
<tt> 2206 if (Arguments::created_by_gamma_launcher())
{</tt><br>
<tt> 2207 // Support for the gamma launcher.
Typical value for buf is</tt><br>
<tt> 2208 //
"<JAVA_HOME>/jre/lib/<arch>/<vmtype>/libjvm.so".
If "/jre/lib/" appears at</tt><br>
<tt> 2209 // the right place in the string, then
assume we are installed in a JDK and</tt><br>
<tt> 2210 // we're done. Otherwise, check for a
JAVA_HOME environment variable and fix </tt><br>
<tt> 2211 // up the path so it looks like libjvm.so
is installed there (append a</tt><br>
<tt> 2212 // fake suffix hotspot/libjvm.so).</tt><br>
<br>
<tt><snip></tt><br>
<br>
<tt> 2243 if (0 == access(buf, F_OK)) {</tt><br>
<tt> 2244 // Use current module name
"libjvm.so"</tt><br>
<tt> 2245 len = strlen(buf);</tt><br>
<tt> 2246 snprintf(buf + len, buflen-len,
"/hotspot/libjvm.so");</tt><br>
<tt> 2247 } else {</tt><br>
<tt> 2248 // Go back to path of .so</tt><br>
<tt> 2249 rp = realpath(dli_fname, buf);</tt><br>
<tt> 2250 if (rp == NULL)</tt><br>
<tt> 2251 return;</tt><br>
<tt> 2252 }</tt><br>
<br>
<tt>src/os/solaris/vm/os_solaris.cpp:</tt><br>
<br>
<tt> 2496 if (Arguments::created_by_gamma_launcher())
{</tt><br>
<tt> 2497 // Support for the gamma launcher.
Typical value for buf is</tt><br>
<tt> 2498 //
"<JAVA_HOME>/jre/lib/<arch>/<vmtype>/libjvm.so".
If "/jre/lib/" appears at</tt><br>
<tt> 2499 // the right place in the string, then
assume we are installed in a JDK and</tt><br>
<tt> 2500 // we're done. Otherwise, check for a
JAVA_HOME environment variable and fix</tt><br>
<tt> 2501 // up the path so it looks like libjvm.so
is installed there (append a</tt><br>
<tt> 2502 // fake suffix hotspot/libjvm.so).</tt><br>
<br>
<tt><snip></tt><br>
<br>
<tt> 2539 if (0 == access(buf, F_OK)) {</tt><br>
<tt> 2540 // Use current module name
"libjvm.so"</tt><br>
<tt> 2541 len = strlen(buf);</tt><br>
<tt> 2542 snprintf(buf + len, buflen-len,
"/hotspot/libjvm.so");</tt><br>
<tt> 2543 } else {</tt><br>
<tt> 2544 // Go back to path of .so</tt><br>
<tt> 2545 realpath((char *)dlinfo.dli_fname,
buf);</tt><br>
<tt> 2546 }</tt><br>
<br>
<tt>src/os/windows/vm/os_windows.cpp:</tt><br>
<br>
<tt> 1732 buf[0] = '\0';</tt><br>
<tt> 1733 if (Arguments::created_by_gamma_launcher())
{</tt><br>
<tt> 1734 // Support for the gamma launcher. Check
for an</tt><br>
<tt> 1735 // JAVA_HOME environment variable</tt><br>
<tt> 1736 // and fix up the path so it looks like</tt><br>
<tt> 1737 // libjvm.so is installed there (append a
fake suffix</tt><br>
<tt> 1738 // hotspot/libjvm.so).</tt><br>
<tt> 1739 char* java_home_var =
::getenv("JAVA_HOME");</tt><br>
<tt> 1740 if (java_home_var != NULL &&
java_home_var[0] != 0) {</tt><br>
<tt> 1741 </tt><br>
<tt> 1742 strncpy(buf, java_home_var, buflen);</tt><br>
<tt> 1743 </tt><br>
<tt> 1744 // determine if this is a legacy image
or modules image</tt><br>
<tt> 1745 // modules image doesn't have "jre"
subdirectory</tt><br>
<tt> 1746 size_t len = strlen(buf);</tt><br>
<tt> 1747 char* jrebin_p = buf + len;</tt><br>
<tt> 1748 jio_snprintf(jrebin_p, buflen-len, "<a
moz-do-not-send="true"
href="file:///%5C%5Cjre%5Cbin%5C">\\jre\\bin\\</a>");</tt><br>
<tt> 1749 if (0 != _access(buf, 0)) {</tt><br>
<tt> 1750 jio_snprintf(jrebin_p, buflen-len, "<a
moz-do-not-send="true" href="file:///%5C%5Cbin%5C">\\bin\\</a>");</tt><br>
<tt> 1751 }</tt><br>
<tt> 1752 len = strlen(buf);</tt><br>
<tt> 1753 jio_snprintf(buf + len, buflen-len,
"hotspot\\jvm.dll");</tt><br>
<tt> 1754 }</tt><br>
<tt> 1755 }</tt><br>
<br>
<br>
<tt>Linux, Solaris and Windows all recognize that if they</tt><br>
<tt>get to the point where they are appending a
"hotspot/..."</tt><br>
<tt>path to the jvm_path value, then they are making a
fake</tt><br>
<tt>path. Why are they making a fake path? Well, the gamma</tt><br>
<tt>launcher lets someone use a libjvm.so/jvm.dll that is</tt><br>
<tt>not located in the usual place in a JDK. And, you get</tt><br>
<tt>to use that libjvm.so/jvm.dll WITH THAT JDK. Sounds</tt><br>
<tt>pretty cool and it is pretty cool... until you realize</tt><br>
<tt>that there is code in the VM that tries to find other</tt><br>
<tt>libraries _relative_ to the libjvm.so/jvm.dll that is</tt><br>
<tt>running. Ouch! So enter the above code blocks that
fake</tt><br>
<tt>a path to the libjvm.so/jvm.dll so that callers to</tt><br>
<tt>os::jvm_path() don't get confused.</tt><br>
<br>
<tt>To make matters more convoluted... yes, I know this is</tt><br>
<tt>convoluted enough... The os_bsd.cpp doesn't seem to</tt><br>
<tt>realize that it is creating a fake path here. At one</tt><br>
<tt>point, the os_bsd.cpp code was a copy of os_linux.cpp</tt><br>
<tt>code, but it was obviously tweaked. It will take more</tt><br>
<tt>investigation to figure out the right course of action</tt><br>
<tt>for os_bsd.cpp</tt><br>
<br>
<tt>Dan</tt><br>
<br>
<br>
<br>
</span>On 12/19/12 7:51 AM, harold seigel wrote:<br>
<br>
<o:p></o:p></p>
<p class="MsoNormal">Hi Ron,<br>
<br>
I'm ok with using snprinft().<br>
<br>
Another nit: Is it worth checking that all of
"/hotspot/libjvm.so" could get copied to buf? (i.e.: that
buflen-len > strlen("/hotspot/libjvm.so")<br>
<br>
Thanks, Harold<br>
<br>
On 12/19/2012 9:17 AM, Ron Durbin wrote: <o:p></o:p></p>
<p class="MsoNormal"><span
style="font-size:11.0pt;font-family:"Calibri","sans-serif";color:#1F497D"> </span><o:p></o:p></p>
<p class="MsoNormal"><span
style="font-size:11.0pt;font-family:"Calibri","sans-serif";color:#1F497D">Harold,</span><o:p></o:p></p>
<p class="MsoNormal"><span
style="font-size:11.0pt;font-family:"Calibri","sans-serif";color:#1F497D"> </span><o:p></o:p></p>
<p class="MsoNormal"><span
style="font-size:11.0pt;font-family:"Calibri","sans-serif";color:#1F497D">Did
you have any more points or counter points to make on the
use of snprintf and strncpy ?</span><o:p></o:p></p>
<p class="MsoNormal"><span
style="font-size:11.0pt;font-family:"Calibri","sans-serif";color:#1F497D"> </span><o:p></o:p></p>
<p class="MsoNormal"><span
style="font-size:11.0pt;font-family:"Calibri","sans-serif";color:#1F497D">Ron</span><o:p></o:p></p>
<div>
<div style="border:none;border-top:solid #B5C4DF
1.0pt;padding:3.0pt 0in 0in 0in">
<p class="MsoNormal"><b><span
style="font-size:10.0pt;font-family:"Tahoma","sans-serif";color:windowtext">From:</span></b><span
style="font-size:10.0pt;font-family:"Tahoma","sans-serif";color:windowtext">
Ron Durbin <br>
<b>Sent:</b> Tuesday, December 18, 2012 4:50 PM<br>
<b>To:</b> Daniel Daugherty; <a
moz-do-not-send="true"
href="mailto:hotspot-runtime-dev@openjdk.java.net">hotspot-runtime-dev@openjdk.java.net</a>;
build-dev; <a moz-do-not-send="true"
href="mailto:serviceability-dev@openjdk.java.net">serviceability-dev@openjdk.java.net</a><br>
<b>Subject:</b> RE: Code Review fix for 8005044 remove
crufty '_g' support from HS runtime code</span><o:p></o:p></p>
</div>
</div>
<p class="MsoNormal"> <o:p></o:p></p>
<p class="MsoNormal"><span
style="font-size:11.0pt;font-family:"Calibri","sans-serif";color:#1F497D">Thanks
for the quick reviews by all.</span><o:p></o:p></p>
<p class="MsoNormal"><span
style="font-size:11.0pt;font-family:"Calibri","sans-serif";color:#1F497D"> </span><o:p></o:p></p>
<p class="MsoNormal"><span
style="font-size:11.0pt;font-family:"Calibri","sans-serif";color:#1F497D">I
will agree with Dan on this one, sprint will stay.</span><o:p></o:p></p>
<p class="MsoNormal"><span
style="font-size:11.0pt;font-family:"Calibri","sans-serif";color:#1F497D">Ron</span><o:p></o:p></p>
<p class="MsoNormal"><span
style="font-size:11.0pt;font-family:"Calibri","sans-serif";color:#1F497D"> </span><o:p></o:p></p>
<p class="MsoNormal"><span
style="font-size:11.0pt;font-family:"Calibri","sans-serif";color:#1F497D"> </span><o:p></o:p></p>
<div>
<div style="border:none;border-top:solid #B5C4DF
1.0pt;padding:3.0pt 0in 0in 0in">
<p class="MsoNormal"><b><span
style="font-size:10.0pt;font-family:"Tahoma","sans-serif";color:windowtext">From:</span></b><span
style="font-size:10.0pt;font-family:"Tahoma","sans-serif";color:windowtext">
Daniel D. Daugherty <br>
<b>Sent:</b> Tuesday, December 18, 2012 4:03 PM<br>
<b>To:</b> <a moz-do-not-send="true"
href="mailto:hotspot-runtime-dev@openjdk.java.net">hotspot-runtime-dev@openjdk.java.net</a>;
build-dev; <a moz-do-not-send="true"
href="mailto:serviceability-dev@openjdk.java.net">serviceability-dev@openjdk.java.net</a><br>
<b>Subject:</b> Re: Code Review fix for 8005044 remove
crufty '_g' support from HS runtime code</span><o:p></o:p></p>
</div>
</div>
<p class="MsoNormal"> <o:p></o:p></p>
<p class="MsoNormal" style="margin-bottom:12.0pt"><tt><span
style="font-size:10.0pt">Sorry, I lost my manners
somewhere... :-(</span></tt><span
style="font-size:10.0pt;font-family:"Courier
New","serif""><br>
<br>
<tt>Thanks for the fast review!</tt><br>
<br>
<tt>Dan</tt></span><o:p></o:p></p>
<div>
<p class="MsoNormal">On 12/18/12 3:57 PM, Daniel D.
Daugherty wrote:<o:p></o:p></p>
</div>
<blockquote style="margin-top:5.0pt;margin-bottom:5.0pt">
<p class="MsoNormal" style="margin-bottom:12.0pt"><tt><span
style="font-size:10.0pt">Adding back in the other
aliases...</span></tt><span
style="font-size:10.0pt;font-family:"Courier
New","serif""><br>
<br>
<tt>Harold,</tt><br>
<br>
<tt>The equivalent of:</tt><br>
<br>
<tt> snprintf(buf, n, str);</tt><br>
<br>
<tt>is:</tt><br>
<br>
<tt> strncpy(buf, str, n - 1);</tt><br>
<tt> buf[n - 1] = '\0';</tt><br>
<br>
<tt>because snprintf() will only write out (n - 1) bytes
from</tt><br>
<tt>'str' to 'buf' and then write a NUL in the last
slot.</tt><br>
<tt>strncpy() copies up to 'n' bytes from 'str' to
'buf'.</tt><br>
<tt>strncpy() will not copy past a NUL character in
'str', but</tt><br>
<tt>it will also not NUL terminate 'buf' if a NUL is not
found</tt><br>
<tt>in 'str' before the limit 'n' is reached.</tt><br>
<br>
<tt>Dan</tt></span><o:p></o:p></p>
<div>
<p class="MsoNormal">On 12/18/12 2:48 PM, harold seigel
wrote:<o:p></o:p></p>
</div>
<blockquote style="margin-top:5.0pt;margin-bottom:5.0pt">
<p class="MsoNormal">Hi Ron,<br>
<br>
I think these calls to snprintf() in os_solaris.cpp and
the other os_....cpp files could be replaced with calls
to strncpy(). It might be a little simpler.<br>
<br>
Otherwise, it looks good.<br>
<br>
Thanks, Harold<br>
<br>
2539 if (0 == access(buf, F_OK)) { <br>
<span class="changed">2540 // Use current module name
"libjvm.so"</span> <br>
2541 len = strlen(buf); <br>
<span class="changed">2542 <b>snprintf(buf + len,
buflen-len, "/hotspot/libjvm.so");</b></span> <br>
2543 } else { <br>
2544 // Go back to path of .so <br>
2545 realpath((char *)dlinfo.dli_fname, buf); 2546 } <br>
<br>
On 12/18/2012 3:46 PM, Daniel D. Daugherty wrote: <o:p></o:p></p>
<p class="MsoNormal" style="margin-bottom:12.0pt"><tt><span
style="font-size:11.0pt">Greetings,</span></tt><span
style="font-size:11.0pt;font-family:"Courier
New","serif""><br>
<br>
</span><tt><span style="font-size:10.0pt">I'm sponsoring
this code review request from Ron Durbin. This
change</span></tt><span
style="font-size:11.0pt;font-family:"Courier
New","serif""><br>
</span><tt><span style="font-size:10.0pt">is targeted at
JDK8/HSX-25 in the RT_Baseline repo.</span></tt><span
style="font-size:11.0pt;font-family:"Courier
New","serif""><br>
<br>
</span><tt><span style="font-size:10.0pt">Dan</span></tt><span
style="font-size:11.0pt;font-family:"Courier
New","serif""><br>
<br>
</span><tt><span style="font-size:10.0pt">Sending again
with correct subject line, bug URLs and webrev URL.</span></tt><span
style="font-size:11.0pt;font-family:"Courier
New","serif""><br>
<br>
</span><span
style="font-size:10.0pt;font-family:"Courier
New","serif""><br>
<tt>Intro:</tt><br>
<tt> </tt><br>
<tt>This set of changes removes the runtime support
for generation of debug versions that follow _g
semantics.</tt><br>
<tt> </tt><br>
<tt>Defect:</tt><br>
</span><tt><span style="font-size:9.0pt">JDK-8005044
remove crufty '_g' support from HS runtime code</span></tt><span
style="font-size:10.0pt;font-family:"Courier
New","serif""><br>
<tt><a moz-do-not-send="true"
href="http://bugs.sun.com/bugdatabase/view_bug.do?bug_id=8005044">http://bugs.sun.com/bugdatabase/view_bug.do?bug_id=8005044</a></tt><br>
<tt><a moz-do-not-send="true"
href="https://jbs.oracle.com/bugs/browse/JDK-8005044">https://jbs.oracle.com/bugs/browse/JDK-8005044</a></tt><br>
<br>
<br>
<tt>Webrev</tt><br>
<tt><a moz-do-not-send="true"
href="http://cr.openjdk.java.net/%7Edcubed/for_rdurbin/8005044-webrev/0">http://cr.openjdk.java.net/~dcubed/for_rdurbin/8005044-webrev/0</a>
</tt><br>
<br>
<tt> </tt><br>
<tt>Details:</tt><br>
</span><tt><span style="font-size:11.0pt">Files </span></tt><tt><span
style="font-size:10.0pt">have been modified to
remove all reference and support for debug versions
that follow _g semantics.</span></tt><span
style="font-size:10.0pt;font-family:"Courier
New","serif""><br>
</span><tt><span style="font-size:11.0pt"> </span></tt><span
style="font-size:10.0pt;font-family:"Courier
New","serif""><br>
</span><tt><span style="font-size:11.0pt">Testing:</span></tt><span
style="font-size:10.0pt;font-family:"Courier
New","serif""><br>
</span><tt><span style="font-size:11.0pt"> </span></tt><span
style="font-size:10.0pt;font-family:"Courier
New","serif""><br>
</span><tt><span style="font-size:11.0pt">Passed JPRT
last night:</span></tt><span
style="font-size:10.0pt;font-family:"Courier
New","serif""><br>
</span><tt><span style="font-size:11.0pt"> </span></tt><span
style="font-size:10.0pt;font-family:"Courier
New","serif""><br>
</span><tt><span style="font-size:11.0pt">Additional
Testing In process: (suggested by Dan)</span></tt><tt><span
style="font-size:10.0pt">:</span></tt><span
style="font-size:10.0pt;font-family:"Courier
New","serif""><br>
<br>
<tt>src/share/vm/runtime/arguments.cpp</tt><br>
<tt> - test with shared archive creation and use;
see the e-mail</tt><br>
<tt> from Coleen</tt><br>
<br>
<tt>src/share/tools/ProjectCreator/ProjectCreator.java</tt><br>
<tt> - just a usage message; visual inspection of
the code</tt><br>
<br>
<tt>src/os/windows/vm/os_windows.cpp</tt><br>
<tt> - comments only; no testing needed</tt><br>
<br>
<tt>src/os/{bsd,linux,solaris}/vm/os_{bsd,linux,solaris}.cpp</tt><br>
<tt> - the only code changes come into play when
the "gamma"</tt><br>
<tt> launcher is used</tt><br>
<tt> - and when JAVA_HOME refers to a valid JDK,
the function</tt><br>
<tt> fakes up a JVM path so that callers using
the JVM path</tt><br>
<tt> to find other things in the JDK will work.</tt><br>
<tt> - I can't find any way that the actual JVM
path value</tt><br>
<tt> that is returned is exposed</tt><br>
<tt> - I don't see a way to test this other than
have a debug</tt><br>
<tt> printf() or manual code inspection.</tt></span><o:p></o:p></p>
</blockquote>
<p class="MsoNormal"> <o:p></o:p></p>
</blockquote>
<p class="MsoNormal"> <o:p></o:p></p>
<p class="MsoNormal"><o:p> </o:p></p>
</div>
</blockquote>
</blockquote>
<br>
</body>
</html>