<html>
    <head>
      <base href="https://bugs.llvm.org/">
    </head>
    <body><table border="1" cellspacing="0" cellpadding="8">
        <tr>
          <th>Bug ID</th>
          <td><a class="bz_bug_link 
          bz_status_NEW "
   title="NEW - [yaml2obj] will crash when reading a yaml file which only contains comments."
   href="https://bugs.llvm.org/show_bug.cgi?id=41513">41513</a>
          </td>
        </tr>

        <tr>
          <th>Summary</th>
          <td>[yaml2obj] will crash when reading a yaml file which only contains comments.
          </td>
        </tr>

        <tr>
          <th>Product</th>
          <td>new-bugs
          </td>
        </tr>

        <tr>
          <th>Version</th>
          <td>trunk
          </td>
        </tr>

        <tr>
          <th>Hardware</th>
          <td>PC
          </td>
        </tr>

        <tr>
          <th>OS</th>
          <td>All
          </td>
        </tr>

        <tr>
          <th>Status</th>
          <td>NEW
          </td>
        </tr>

        <tr>
          <th>Severity</th>
          <td>enhancement
          </td>
        </tr>

        <tr>
          <th>Priority</th>
          <td>P
          </td>
        </tr>

        <tr>
          <th>Component</th>
          <td>new bugs
          </td>
        </tr>

        <tr>
          <th>Assignee</th>
          <td>unassignedbugs@nondot.org
          </td>
        </tr>

        <tr>
          <th>Reporter</th>
          <td>higuoxing@gmail.com
          </td>
        </tr>

        <tr>
          <th>CC</th>
          <td>htmldeveloper@gmail.com, llvm-bugs@lists.llvm.org
          </td>
        </tr></table>
      <p>
        <div>
        <pre>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
```</pre>
        </div>
      </p>


      <hr>
      <span>You are receiving this mail because:</span>

      <ul>
          <li>You are on the CC list for the bug.</li>
      </ul>
    </body>
</html>