<div dir="ltr">It would be awesome to use the sanitizers to find native code bugs in openjdk, but it seems like a serious project.  Here at Google we are doing our small part by improving support for clang on Linux.</div><div class="gmail_extra"><br><div class="gmail_quote">On Wed, Sep 5, 2018 at 6:17 PM, Leslie Zhai <span dir="ltr"><<a href="mailto:zhaixiang@loongson.cn" target="_blank">zhaixiang@loongson.cn</a>></span> wrote:<br><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">It might be UBSan false positive :) What about ASan? <a href="https://bugs.openjdk.java.net/browse/JDK-8189800" rel="noreferrer" target="_blank">https://bugs.openjdk.java.net/<wbr>browse/JDK-8189800</a><span class=""><br>
<br>
<br>
在 2018年09月06日 09:12, Martin Buchholz 写道:<br>
</span><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"><span class="">
it's difficult to use llvm tools like sanitizers on openjdk sources, because of the "cheating" - relying on undefined behavior, and the JIT.<br>
<br></span><span class="">
On Wed, Sep 5, 2018 at 6:09 PM, Leslie Zhai <<a href="mailto:zhaixiang@loongson.cn" target="_blank">zhaixiang@loongson.cn</a> <mailto:<a href="mailto:zhaixiang@loongson.cn" target="_blank">zhaixiang@loongson.cn</a>><wbr>> wrote:<br>
<br>
    Hi Martin,<br>
<br>
    Thanks for your response!<br>
<br>
    I haven't tested compiling OpenJDK 12-dev with LLVM toolchain,<br>
    perhaps the issue had been fixed already, because clang treat<br>
    invalid argument '-std=gnu++98' not allowed with 'C' as error.  It<br>
    is better only apply EXTRA_CFLAGS to C without EXTRA_CXXFLAGS.<br>
<br>
    Furthermore, I just have interest, did you use clang analyzer,<br>
    sanitizer and libfuzzer towards hotspot and jdk native library?<br>
    Thanks!<br>
<br>
<br>
    在 2018年09月06日 02:10, Martin Buchholz 写道:<br>
<br>
        We seem to have some confusion about flags for C vs. flags for<br>
        C++.  Most flags for most toolchains apply to both C and C++,<br>
        so it's understandable that we want to unify them.  But some<br>
        flags, notably -std, are language-specific.  We have both<br>
        EXTRA_CFLAGS and EXTRA_CXXFLAGS, so we should expect<br>
        EXTRA_CFLAGS to only apply to C.<br>
<br>
<br>
    --     Regards,<br>
    Leslie Zhai<br>
<br>
<br>
<br>
</span></blockquote><span class="HOEnZb"><font color="#888888">
<br>
-- <br>
Regards,<br>
Leslie Zhai<br>
<br>
<br>
</font></span></blockquote></div><br></div>