OSDN Git Service

[Object] Initialize LoadConfig member to null
authorReid Kleckner <rnk@google.com>
Mon, 7 Aug 2017 21:23:38 +0000 (21:23 +0000)
committerReid Kleckner <rnk@google.com>
Mon, 7 Aug 2017 21:23:38 +0000 (21:23 +0000)
commited5628c9fc774d14cdb7771edcf9dadb2b8ddf8d
tree2b39c193bdc32facdf20d032b8623137f32f3f2d
parent79302ff8ea636c2656f7fe34f299ca808109987f
[Object] Initialize LoadConfig member to null

Executables may not contain a load config, and clients should be able to
test for nullability. Previously we'd return uninitialized memory. Now
getLoadConfig32/64 return valid pointers or null.

Fixes PR34108

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@310308 91177308-0d34-0410-b5e6-96231b3b80d8
include/llvm/Object/COFF.h
test/tools/llvm-readobj/Inputs/coff-no-load-config.exe [new file with mode: 0644]
test/tools/llvm-readobj/coff-load-config.test