Issue |
140953
|
Summary |
[LLVM] LTO usage errors incorrectly reported to the user as crashes/bugs
|
Labels |
new issue
|
Assignees |
|
Reporter |
bd1976bris
|
Usage errors in `LTOBackend.cpp` are incorrectly reported to users as crashes/bugs.
For example, see the COFF LLD test [`lto-cache-errors.ll`](https://github.com/llvm/llvm-project/blob/e165bea1d4ec2de96ee0548cece79d71a75ce8f8/lld/test/COFF/lto-cache-errors.ll) and note the use of `not --crash` in this test.
This issue is more problematic on Windows than on Linux. On Windows, fatal errors typically produce additional output, including a stack trace and a message urging users to report a bug. For example, using the official LLVM 19 toolchain binaries, specifying an overly long cache directory results in the following output on my Windows 11 machine:
```
"lld-link.exe" msvc.bc /lldltocache:<too long dir name> /entry:main /out:a.out
LLVM ERROR: can't create cache directory <too long dir name>: invalid argument
PLEASE submit a bug report to https://github.com/llvm/llvm-project/issues/ and include the crash backtrace.
Exception Code: 0xC000001D
#0 0x00007ff6b392cf36 xmlLinkGetData (c:\x\clang+llvm-19.1.0-x86_64-pc-windows-msvc\bin\lld-link.exe+0x180cf36)
#1 0x00007ff6b38622d2 xmlLinkGetData (c:\x\clang+llvm-19.1.0-x86_64-pc-windows-msvc\bin\lld-link.exe+0x17422d2)
<...>
```
This kind of reporting is not appropriate for usage errors and recently confused one of Sony’s customers, who submitted a bug report (as instructed by the toolchain) after specifying an invalid LTO cache directory.
**Internal tracker:** TOOLCHAIN-17744
_______________________________________________
llvm-bugs mailing list
llvm-bugs@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/llvm-bugs