diff options
author | Kevin Enderby <enderby@apple.com> | 2017-09-13 21:01:49 +0000 |
---|---|---|
committer | Kevin Enderby <enderby@apple.com> | 2017-09-13 21:01:49 +0000 |
commit | 44550600f295b4bd3486da95507d37c600d1539e (patch) | |
tree | 2c649210c629a54f358ae4492323ee056655cc8f /llvm/lib/Transforms/IPO/SampleProfile.cpp | |
parent | d91bf3998fb45f5a959b77d5d0e2d86c040b8bed (diff) | |
download | bcm5719-llvm-44550600f295b4bd3486da95507d37c600d1539e.tar.gz bcm5719-llvm-44550600f295b4bd3486da95507d37c600d1539e.zip |
Fix a crash in llvm-nm for a bad Mach-O file that has an N_SECT type symbol and a zero n_sect value.
The code in llvm-nm for Mach-O files to determine the section type for an
N_SECT type symbol it will call getSymbolSection() and check for the error,
but in the case the n_sect value is zero it will return section_end() (aka nullptr).
And the code was using that and crashing instead of just returning a āsā for a
section or printing (?,?) as it would if getSymbolSection() returned an error.
rdar://33136604
llvm-svn: 313193
Diffstat (limited to 'llvm/lib/Transforms/IPO/SampleProfile.cpp')
0 files changed, 0 insertions, 0 deletions