| Issue |
55390
|
| Summary |
ComplexExprEvaluator - Assertion failed: RHS.U.VAL != 0 && "Divide by zero?"
|
| Labels |
clang:frontend,
crash
|
| Assignees |
|
| Reporter |
RKSimon
|
Reduced from https://bugs.chromium.org/p/oss-fuzz/issues/detail?id=36067
```
auto f() { return 43273096 / 65536j; }
```
```
C:\LLVM>stage1\bin\clang -c -S -O3 fuzz.cpp -o -
Assertion failed: RHS.U.VAL != 0 && "Divide by zero?", file C:\LLVM\llvm-project\llvm\lib\Support\APInt.cpp, line 1585
PLEASE submit a bug report to https://github.com/llvm/llvm-project/issues/ and include the crash backtrace, preprocessed source, and associated run script.
Stack dump:
0. Program arguments: stage1\\bin\\clang -c -S -O3 fuzz.cpp -o -
1. fuzz.cpp:1:33: current parser token ';'
2. fuzz.cpp:1:9: parsing function body 'f'
3. fuzz.cpp:1:9: in compound statement ('{}')
#0 0x00007ff6c173e885 HandleAbort C:\LLVM\llvm-project\llvm\lib\Support\Windows\Signals.inc:418:0
#1 0x00007ff86a26cd84 (C:\Windows\System32\ucrtbase.dll+0x7cd84)
#2 0x00007ff86a26dd61 (C:\Windows\System32\ucrtbase.dll+0x7dd61)
#3 0x00007ff86a26f7ea (C:\Windows\System32\ucrtbase.dll+0x7f7ea)
#4 0x00007ff86a26f6e1 (C:\Windows\System32\ucrtbase.dll+0x7f6e1)
#5 0x00007ff86a26f981 (C:\Windows\System32\ucrtbase.dll+0x7f981)
#6 0x00007ff6c175c34a llvm::APInt::udiv(class llvm::APInt const &) const C:\LLVM\llvm-project\llvm\lib\Support\APInt.cpp:1586:0
#7 0x00007ff6c1757de3 llvm::APInt::sdiv(class llvm::APInt const &) const C:\LLVM\llvm-project\llvm\lib\Support\APInt.cpp:1660:0
#8 0x00007ff6c4bd87f9 llvm::APSInt::operator/(class llvm::APSInt const &) const C:\LLVM\llvm-project\llvm\include\llvm\ADT\APSInt.h:134:0
#9 0x00007ff6c4c0981a `anonymous namespace'::ComplexExprEvaluator::VisitBinaryOperator C:\LLVM\llvm-project\clang\lib\AST\ExprConstant.cpp:14468:0
```
_______________________________________________
llvm-bugs mailing list
[email protected]
https://lists.llvm.org/cgi-bin/mailman/listinfo/llvm-bugs