Closed xiangzhai closed 4 years ago
\cc @steveharter
BTW -fsanitize=vptr
should be disabled:
...
../../dlls/mscordac/libmscordaccore.so: undefined reference to `typeinfo for LCGMethodResolver'
../../dlls/mscordac/libmscordaccore.so: undefined reference to `typeinfo for DebuggerRCThread'
clang-8: error: linker command failed with exit code 1 (use -v to see invocation)
src/debug/createdump/CMakeFiles/createdump.dir/build.make:107: recipe for target 'src/debug/createdump/createdump' failed
...
Because:
-fsanitize=vptr: Use of an object whose vptr indicates that it is of the wrong dynamic type, or that its lifetime has not begun or has ended. Incompatible with -fno-rtti
\cc @jkoritzinsky
I believe the fix here is to change the add_compile_definitions
in the following line to add_compile_options
:https://github.com/dotnet/runtime/blob/f72a3217606068a3ab4a67e7255a034726d8c3b3/src/coreclr/configurecompiler.cmake#L342
Hi @jkoritzinsky
Thanks for your response!
Could you reproduce the issue? Workaround for enablesanitizers.sh
:
diff --git a/src/coreclr/enablesanitizers.sh b/src/coreclr/enablesanitizers.sh
index aedb95d..6429692 100755
--- a/src/coreclr/enablesanitizers.sh
+++ b/src/coreclr/enablesanitizers.sh
@@ -73,6 +73,11 @@ else
__ClangMinorVersion=9
__ExportSymbolizerPath=0
;;
+ clang8.0)
+ __ClangMajorVersion=8
+ __ClangMinorVersion=0
+ __ExportSymbolizerPath=0
+ ;;
*)
echo "Unknown arg: $i"
return 1
Thanks, Leslie Zhai
@xiangzhai the sanitizer script is not used internally and thus needs to be manually updated every so often due to new releases of clang.
However, can you explain you use of sanitizers? Currently there is too much noise coming from the sanitizer output (that needs to be addressed by whitelisting or by changing the code), so I'm curious on the usefulness of it for your needs.
Hi @steveharter
Thanks for your response!
However, can you explain you use of sanitizers?
I am the author of Clang Static Analyzer Checkers. And I try to contribute to dynamic analysis for MIPS64 :)
Currently there is too much noise coming from the sanitizer output (that needs to be addressed by whitelisting or by changing the code)
Yes, there are lots of False Positive!
Thanks, Leslie Zhai
Hi,
Base on this commit.
Let
enablesanitizers.sh
to support clang v8.0:Sanitizer failed to work:
Here is the detailed build log runtime.x64.Debug.log
Workaround is just revert the
src/coreclr/configurecompiler.cmake
https://github.com/dotnet/coreclr/pull/26980Then sanitizer is just enable to work:
Thanks, Leslie Zhai