llvm-ifs: YAML:1:1: error: Got empty plain scalar
- Dominant language
- LLVM
- Stars
- 40.5k
- Forks
- 18.7k
- PR merge metrics
- PR metrics pending
Description
I got this crash when running:
`llvm-ifs-18 libcudnn_engines_precompiled.so.9.3.0 test1`
```
YAML:1:1: error: Got empty plain scalar
ELF� @��g@8@�Y�Y Y Z Z�w��2� e� f� f� Y Z Z P�td� #� #� #�>�>Q�tdR�td Y Z Z�
PLEASE submit a bug report to https://github.com/llvm/llvm-project/issues/ and include the crash backtrace.
Stack dump:
0. Program arguments: llvm-ifs-18 libcudnn_engines_precompiled.so.9.3.0 test1
#0 0x000072c9835a63bf llvm::sys::PrintStackTrace(llvm::raw_ostream&, int) build-llvm/tools/clang/stage2-bins/llvm/lib/Support/Unix/Signals.inc:723:13
#1 0x000072c9835a44f9 llvm::sys::RunSignalHandlers() build-llvm/tools/clang/stage2-bins/llvm/lib/Support/Signals.cpp:106:18
#2 0x000072c9835a6b00 SignalHandler build-llvm/tools/clang/stage2-bins/llvm/lib/Support/Unix/Signals.inc:413:1
#3 0x000072c982045330 (/lib/x86_64-linux-gnu/libc.so.6+0x45330)
#4 0x000072c983584ae7 setError build-llvm/tools/clang/stage2-bins/llvm/lib/Support/YAMLTraits.cpp:358:19
#5 0x000072c983584ae7 llvm::yaml::Input::setError(llvm::Twine const&) build-llvm/tools/clang/stage2-bins/llvm/lib/Support/YAMLTraits.cpp:471:3
#6 0x000072c9837be57e processKey build-llvm/tools/clang/stage2-bins/llvm/include/llvm/Support/YAMLTraits.h:954:16
#7 0x000072c9837be57e mapRequired build-llvm/tools/clang/stage2-bins/llvm/include/llvm/Support/YAMLTraits.h:877:11
#8 0x000072c9837be57e mapping build-llvm/tools/clang/stage2-bins/llvm/lib/InterfaceStub/IFSHandler.cpp:156:8
#9 0x000072c9837bccc6 doMapping build-llvm/tools/clang/stage2-bins/llvm/include/llvm/Support/YAMLTraits.h:0:3
#10 0x000072c9837bccc6 yamlize build-llvm/tools/clang/stage2-bins/llvm/include/llvm/Support/YAMLTraits.h:1130:5
#11 0x000072c9837bccc6 operator>> build-llvm/tools/clang/stage2-bins/llvm/include/llvm/Support/YAMLTraits.h:1799:3
#12 0x000072c9837bccc6 llvm::ifs::readIFSFromBuffer(llvm::StringRef) build-llvm/tools/clang/stage2-bins/llvm/lib/InterfaceStub/IFSHandler.cpp:183:12
#13 0x0000611ecd774743 readInputFile build-llvm/tools/clang/stage2-bins/llvm/tools/llvm-ifs/llvm-ifs.cpp:158:9
#14 0x0000611ecd774743 llvm_ifs_main build-llvm/tools/clang/stage2-bins/llvm/tools/llvm-ifs/llvm-ifs.cpp:398:9
#15 0x0000611ecd77a263 main build-llvm/tools/clang/stage2-bins/build-llvm/tools/clang/stage2-bins/tools/llvm-ifs/llvm-ifs-driver.cpp:17:10
#16 0x000072c98202a1ca __libc_start_call_main ./csu/../sysdeps/nptl/libc_start_call_main.h:74:3
#17 0x000072c98202a28b call_init ./csu/../csu/libc-start.c:128:20
#18 0x000072c98202a28b __libc_start_main ./csu/../csu/libc-start.c:347:5
#19 0x0000611ecd772385 (/usr/lib/llvm-18/bin/llvm-ifs+0x4385)
Segmentation fault (core dumped)
```
the file I ran it on comes from NVIDIA shared object compiled for the aarch64 architecture.
libcudnn_engines_precompiled.so.9.3.0: ELF 64-bit LSB shared object, ARM aarch64, version 1 (SYSV), dynamically linked, stripped
I might very much be doing something very silly but it has asked to submit the backtrace so there you go!
Contributor guide
Research direction
Reproduce the crash with llvm-ifs-18 and the reported libcudnn_engines_precompiled.so.9.3.0 input. Start in tools/llvm-ifs/llvm-ifs.cpp at readInputFile, then follow readIFSFromBuffer and the mapping in lib/InterfaceStub/IFSHandler.cpp, including the YAML error path in YAMLTraits.cpp. Done should be a clear handled failure rather than a segmentation fault.
Written by the indexing model from the issue text.
Assessment
- Domain
- compilers
- Issue type
- Bug
- Difficulty
- 4/5
- Estimated time
- 3-5 days
- Activity status
- Stale
- Clarity
- Needs clarification
- Newbie friendliness
- 25/100