[llvm-bugs] [Bug 41513] New: [yaml2obj] will crash when reading a yaml file which only contains comments.
via llvm-bugs
llvm-bugs at lists.llvm.org
Tue Apr 16 08:58:21 PDT 2019
https://bugs.llvm.org/show_bug.cgi?id=41513
Bug ID: 41513
Summary: [yaml2obj] will crash when reading a yaml file which
only contains comments.
Product: new-bugs
Version: trunk
Hardware: PC
OS: All
Status: NEW
Severity: enhancement
Priority: P
Component: new bugs
Assignee: unassignedbugs at nondot.org
Reporter: higuoxing at gmail.com
CC: htmldeveloper at gmail.com, llvm-bugs at lists.llvm.org
yaml2obj will crash if it reads a yaml file only contains comments. e.g.
```
$ cat empty.yaml
# some comment
$ yaml2obj empty.yaml
Stack dump:
0. Program arguments:
/Users/cat/Workspace/llvm/llvm-tools-lld-build/bin/yaml2obj empty.yaml
0 yaml2obj 0x0000000106d96138
llvm::sys::PrintStackTrace(llvm::raw_ostream&) + 40
1 yaml2obj 0x0000000106d952b5 llvm::sys::RunSignalHandlers() +
85
2 yaml2obj 0x0000000106d967a8 SignalHandler(int) + 264
3 libsystem_platform.dylib 0x00007fffbf796b3a _sigtramp + 26
4 libsystem_platform.dylib 0x00007fff58f65060 _sigtramp + 2575099200
5 yaml2obj 0x0000000106d4d1fd
llvm::yaml::MappingTraits<llvm::yaml::YamlObjectFile>::mapping(llvm::yaml::IO&,
llvm::yaml::YamlObjectFile&) + 141
6 yaml2obj 0x0000000106c9cc0c main + 892
7 libdyld.dylib 0x00007fffbf587235 start + 1
8 libdyld.dylib 0x0000000000000002 start + 1084722638
[1] 2847 segmentation fault
~/Workspace/llvm/llvm-tools-lld-build/bin/yaml2obj empty.yaml
```
--
You are receiving this mail because:
You are on the CC list for the bug.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.llvm.org/pipermail/llvm-bugs/attachments/20190416/7a98c5f4/attachment.html>
More information about the llvm-bugs
mailing list