<!DOCTYPE html><html><head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8">
</head>
<body>
<p><br>
</p>
<div class="moz-cite-prefix">On 2024-10-09 09:39, Baesken, Matthias
wrote:<br>
</div>
<blockquote type="cite" cite="mid:AM9PR02MB6770BB095FC1E1DDC2489944937F2@AM9PR02MB6770.eurprd02.prod.outlook.com">
<meta name="Generator" content="Microsoft Word 15 (filtered medium)">
<style>@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;}p.MsoNormal, li.MsoNormal, div.MsoNormal
{margin:0cm;
font-size:11.0pt;
font-family:"Calibri",sans-serif;
mso-ligatures:standardcontextual;
mso-fareast-language:EN-US;}a:link, span.MsoHyperlink
{mso-style-priority:99;
color:#0563C1;
text-decoration:underline;}span.EmailStyle17
{mso-style-type:personal-compose;
font-family:"Calibri",sans-serif;
color:windowtext;}.MsoChpDefault
{mso-style-type:export-only;
mso-fareast-language:EN-US;}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 lang="EN-US">Hi, <o:p></o:p></span></p>
<p class="MsoNormal"><span lang="EN-US"><o:p> </o:p></span></p>
<p class="MsoNormal"><span style="font-size:10.5pt;font-family:"Arial",sans-serif;color:#172B4D;background:white" lang="en-DE">I wanted to try the "minimal runtime" option of
ubsan because it might be faster and has other benefits.</span><span style="font-size:10.5pt;font-family:"Arial",sans-serif;color:#172B4D" lang="en-DE"><br>
<span style="background:white">See</span><br>
</span><span lang="en-DE"><a href="https://clang.llvm.org/docs/UndefinedBehaviorSanitizer.html#minimal-runtime" moz-do-not-send="true"><span style="font-size:10.5pt;font-family:"Arial",sans-serif;color:#0052CC;background:white">https://clang.llvm.org/docs/UndefinedBehaviorSanitizer.html#minimal-runtime</span></a></span><span style="font-size:10.5pt;font-family:"Arial",sans-serif;color:#172B4D" lang="en-DE"><br>
<br>
<span style="background:white">Unfortunately it seems to be
available only with clang on Linux, not (yet?) gcc, so I
configured</span><br>
<span style="background:white">--with-additional-ubsan-checks=-fsanitize-minimal-runtime
--with-toolchain-type=clang</span><br>
<br>
<span style="background:white">but after some compilation I
run into this link error :</span><br>
<span style="background:white">jdk/lib/server/libjvm.so:
undefined symbol: __ubsan_handle_type_mismatch_minimal</span><br>
<br>
<span style="background:white">Any ideas what's wrong here ?</span><br>
</span><span lang="en-DE"><a href="https://github.com/systemd/systemd/issues/26975" moz-do-not-send="true"><span style="font-size:10.5pt;font-family:"Arial",sans-serif;color:#0052CC;background:white">https://github.com/systemd/systemd/issues/26975</span></a></span><span style="font-size:10.5pt;font-family:"Arial",sans-serif;color:#172B4D" lang="en-DE"><br>
<span style="background:white">suggests that we might need
to adjust the linker settings to allow undefined symbols ,
not sure if this is the same issue ?</span></span></p>
</div>
</blockquote>
I'd say it looks like you need to link with another library? Where
should the __ubsan_handle_type_mismatch_minimal symbol come from?<br>
<blockquote type="cite" cite="mid:AM9PR02MB6770BB095FC1E1DDC2489944937F2@AM9PR02MB6770.eurprd02.prod.outlook.com">
<div class="WordSection1">
<p class="MsoNormal"><span style="font-size:10.5pt;font-family:"Arial",sans-serif;color:#172B4D" lang="en-DE"><span style="background:white"><o:p></o:p></span></span></p>
<p class="MsoNormal"><span style="font-size:10.5pt;font-family:"Arial",sans-serif;color:#172B4D;background:white" lang="en-DE"><o:p> </o:p></span></p>
<p class="MsoNormal"><span style="font-size:10.5pt;font-family:"Arial",sans-serif;color:#172B4D;background:white" lang="en-DE"><o:p> </o:p></span></p>
<p class="MsoNormal"><span lang="EN-US">On the other hand, I
tried the minimal runtime option with some standalone
program examples outside the OpenJDK, and<o:p></o:p></span></p>
<p class="MsoNormal"><span lang="EN-US">The error output was
indeed “minimal” (without line numbers of the error); so
it looked not very useful to me but this might be my
limited understanding.</span></p>
</div>
</blockquote>
<p>So what you're saying is that it is not really worth spending any
time on sorting this out?</p>
<p>/Magnus<br>
</p>
<blockquote type="cite" cite="mid:AM9PR02MB6770BB095FC1E1DDC2489944937F2@AM9PR02MB6770.eurprd02.prod.outlook.com">
<div class="WordSection1">
<p class="MsoNormal"><span lang="EN-US"><o:p></o:p></span></p>
<p class="MsoNormal"><span lang="EN-US"><o:p> </o:p></span></p>
<p class="MsoNormal"><span lang="EN-US">Any experience with this
option ?<o:p></o:p></span></p>
<p class="MsoNormal"><span lang="EN-US"><o:p> </o:p></span></p>
<p class="MsoNormal"><span lang="EN-US">Best regards, Matthias<o:p></o:p></span></p>
<p class="MsoNormal"><span lang="EN-US"><o:p></o:p></span></p>
</div>
</blockquote>
</body>
</html>