aboutsummaryrefslogtreecommitdiff
path: root/llvm/tools/llvm-objdump/MachODump.cpp
diff options
context:
space:
mode:
authorChandler Carruth <chandlerc@gmail.com>2016-11-04 06:59:50 +0000
committerChandler Carruth <chandlerc@gmail.com>2016-11-04 06:59:50 +0000
commitd9ef4b6601bec251c48e7d7613042f9a4c62582b (patch)
treef1f6cb2ca202d44cce0a091abc3ab1c05ca5b3b0 /llvm/tools/llvm-objdump/MachODump.cpp
parent0f139b4f7164302d5e654dc2b243bb2e2fb1ddfc (diff)
downloadllvm-d9ef4b6601bec251c48e7d7613042f9a4c62582b.zip
llvm-d9ef4b6601bec251c48e7d7613042f9a4c62582b.tar.gz
llvm-d9ef4b6601bec251c48e7d7613042f9a4c62582b.tar.bz2
Only log the visit of a return instruction if we in fact found a return
instruction. This avoids dereferencing null in the debug logging if the instruction was not in fact a return instruction. This potential bug was found by PVS-Studio. This actually fixes the last of the "dereferenced a pointer before checking it for null" reports in the recent PVS-Studio run. However, there are quite a few reports of this nature that I did not do anything to fix because they are pretty glaring false positives. They usually took the form of quite clear correlated checks or a check made in a separate function. I've even added asserts anywhere this correlation wasn't pretty obvious and fundamental to the code. llvm-svn: 285988
Diffstat (limited to 'llvm/tools/llvm-objdump/MachODump.cpp')
0 files changed, 0 insertions, 0 deletions