https://bugs.llvm.org/show_bug.cgi?id=17000
Fangrui Song <i...@maskray.me> changed:
What |Removed |Added
----------------------------------------------------------------------------
CC| |i...@maskray.me
Resolution|MOVED |FIXED
--- Comment #4 from Fangrui Song <i...@maskray.me> ---
See https://bugs.llvm.org/show_bug.cgi?id=19535
float-divide-by-zero was removed from the -fsanitize=undefined by
https://reviews.llvm.org/D63793
% cat a.c
int main() { float x = 1.f; float y = x/0.f; y = x/0.f; }
% clang -fsanitize=undefined a.c -o a && ./a
% clang++ -xc++ -fsanitize=undefined a.c -o a && ./a
% gcc -fsanitize=undefined a.c -o a && ./a
% gcc -xc++ -fsanitize=undefined a.c -o a && ./a
# no complaint
The fallout should be fixed by D64317.
% clang -fsanitize=float-divide-by-zero a.c -o a && ./a
a.c:1:40: runtime error: division by zero
a.c:1:51: runtime error: division by zero
% gcc -fsanitize=float-divide-by-zero a.c -o a && ./a
a.c:1:40: runtime error: division by zero
a.c:1:51: runtime error: division by zero
The changes shall be included by clang 9.
--
You are receiving this mail because:
You are on the CC list for the bug.
_______________________________________________
llvm-bugs mailing list
llvm-bugs@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/llvm-bugs