diff options
author | Matt Davis <nullptr@fb.com> | 2019-09-26 17:03:20 +0000 |
---|---|---|
committer | Matt Davis <nullptr@fb.com> | 2019-09-26 17:03:20 +0000 |
commit | 4d17cdc704db1da4da9f76adb301db88d8e7bdf4 (patch) | |
tree | 4bef18d1086e84acd5d3a6b689ddde44fe7fdf6b /lldb/packages/Python/lldbsuite/test/python_api/signals/TestSignalsAPI.py | |
parent | 01ba7d5efe18b9dd14a5c2bb1f692702513d66f7 (diff) | |
download | bcm5719-llvm-4d17cdc704db1da4da9f76adb301db88d8e7bdf4.tar.gz bcm5719-llvm-4d17cdc704db1da4da9f76adb301db88d8e7bdf4.zip |
[lld][mach-o] Avoid segfaulting when handling an empty section list.
Summary:
The following patch avoids segfaulting if the section list is empty when writing a mach-o MH_OBJECT. I ran into this case from a more complicated example trying to dead_strip while using '-r' in lld.
I'm not sure if having empty sections is a legal mach-o, but it does seem that other llvm-binutils tools can ingest such a boring object with out issue. Would it be better to emit an error, emit a warning, or do nothing? It seems that adding a warning diagnostic might be helpful to users, as I did not expect to have a section-less object when the linker was done.
Reviewers: kledzik, ruiu
Subscribers: llvm-commits, jrm
Tags: #lld, #llvm
Differential Revision: https://reviews.llvm.org/D67735
llvm-svn: 372995
Diffstat (limited to 'lldb/packages/Python/lldbsuite/test/python_api/signals/TestSignalsAPI.py')
0 files changed, 0 insertions, 0 deletions