<!DOCTYPE html><html><head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8">
  </head>
  <body>
    <p>Not sure about intended. The 'JDK' variable naming was introduced
      to basically mean not Hotspot. What flags that should apply to
      tests isn't always clear. I don't think that flags currently
      assigned to variables with JVM in the name should apply to hotspot
      tests. I think we just treat all native tests the same here and
      give them the JDK flags. This area could probably still need some
      careful sorting out and cleanup.<br>
    </p>
    <p>/Erik<br>
    </p>
    <div class="moz-cite-prefix">On 7/10/25 08:23, Baesken, Matthias
      wrote:<br>
    </div>
    <blockquote type="cite" cite="mid:AM9PR02MB6770334B693A05E91D313E619348A@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:Aptos;}p.MsoNormal, li.MsoNormal, div.MsoNormal
        {margin:0cm;
        font-size:11.0pt;
        font-family:"Aptos",sans-serif;
        mso-ligatures:standardcontextual;
        mso-fareast-language:EN-US;}span.EmailStyle17
        {mso-style-type:personal-compose;
        font-family:"Aptos",sans-serif;
        color:windowtext;}.MsoChpDefault
        {mso-style-type:export-only;
        font-size:11.0pt;
        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">When  trying the GCC
            static analyzer (-fanalyzer flag) 
            <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"><o:p> </o:p></span></p>
        <p class="MsoNormal" style="margin-left:36.0pt"><span lang="EN-US">diff --git a/make/autoconf/flags-cflags.m4
            b/make/autoconf/flags-cflags.m4<o:p></o:p></span></p>
        <p class="MsoNormal" style="margin-left:36.0pt"><span lang="EN-US">index e80d9a98957..9d1ae60047b 100644<o:p></o:p></span></p>
        <p class="MsoNormal" style="margin-left:36.0pt"><span lang="EN-US">--- a/make/autoconf/flags-cflags.m4<o:p></o:p></span></p>
        <p class="MsoNormal" style="margin-left:36.0pt"><span lang="EN-US">+++ b/make/autoconf/flags-cflags.m4<o:p></o:p></span></p>
        <p class="MsoNormal" style="margin-left:36.0pt"><span lang="EN-US">@@ -610,7 +610,9 @@
            AC_DEFUN([FLAGS_SETUP_CFLAGS_HELPER],<o:p></o:p></span></p>
        <p class="MsoNormal" style="margin-left:36.0pt"><span lang="EN-US">   # CFLAGS WARNINGS STUFF<o:p></o:p></span></p>
        <p class="MsoNormal" style="margin-left:36.0pt"><span lang="EN-US">   # Set JVM_CFLAGS warning handling<o:p></o:p></span></p>
        <p class="MsoNormal" style="margin-left:36.0pt"><span lang="EN-US">   if test "x$TOOLCHAIN_TYPE" = xgcc; then<o:p></o:p></span></p>
        <p class="MsoNormal" style="margin-left:36.0pt"><span lang="EN-US">-   
            WARNING_CFLAGS_JDK_CONLY="$WARNINGS_ENABLE_ALL_CFLAGS"<o:p></o:p></span></p>
        <p class="MsoNormal" style="margin-left:36.0pt"><span lang="EN-US">+    # enable -fanalyzer (but better only for
            gcc12 + , and also only for C)<o:p></o:p></span></p>
        <p class="MsoNormal" style="margin-left:36.0pt"><span lang="EN-US">+    # too many strange / shaky fd leak
            warnings<o:p></o:p></span></p>
        <p class="MsoNormal" style="margin-left:36.0pt"><span lang="EN-US">+    WARNING_CFLAGS_JDK_CONLY="-fanalyzer
            -Wno-analyzer-fd-leak $WARNINGS_ENABLE_ALL_CFLAGS"<o:p></o:p></span></p>
        <p class="MsoNormal" style="margin-left:36.0pt"><span lang="EN-US">    
            WARNING_CFLAGS_JDK_CXXONLY="$WARNINGS_ENABLE_ALL_CXXFLAGS"<o:p></o:p></span></p>
        <p class="MsoNormal" style="margin-left:36.0pt"><span lang="EN-US">    
            WARNING_CFLAGS_JVM="$WARNINGS_ENABLE_ALL_CXXFLAGS"<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">I noticed that the  
            WARNING_CFLAGS_JDK_CONLY  go into the  hotspot   jtreg
            tests, e.g.  : 
            <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"><o:p> </o:p></span></p>
        <p class="MsoNormal"><span lang="EN-US">/jdk/test/hotspot/jtreg/runtime/ErrorHandling/libTestDwarfHelper.h:46:6:
            error: dereference of NULL '0' [CWE-476]
            [-Werror=analyzer-null-dereference]<o:p></o:p></span></p>
        <p class="MsoNormal"><span lang="EN-US">   46 |   *x = 34; //
            Crash<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">  'dereference_null':
            event 1<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">    |   46 |   *x = 34;
            // Crash<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">    |      |      |<o:p></o:p></span></p>
        <p class="MsoNormal"><span lang="EN-US">    |      |      (1)
            dereference of NULL '0'<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"><o:p> </o:p></span></p>
        <p class="MsoNormal"><span lang="EN-US">This might be intended
            but   I was surprised that the HS  C tests take 
            WARNING_CFLAGS_JDK_CONLY    !?   Is this intended or not ?<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"><o:p> </o:p></span></p>
        <p class="MsoNormal"><span lang="EN-US">Best regards, Matthias<o:p></o:p></span></p>
      </div>
    </blockquote>
  </body>
</html>