[PATCH] D82549: [AIX][XCOFF] parsing xcoff object file auxiliary header
Hubert Tong via Phabricator via llvm-commits
llvm-commits at lists.llvm.org
Wed Jul 8 10:25:58 PDT 2020
hubert.reinterpretcast added inline comments.
================
Comment at: llvm/tools/llvm-readobj/XCOFFDumper.cpp:491
+ W.print##H(S, T); \
+ if ((X = X - sizeof(T)) == 0) \
+ return
----------------
This strikes me as extremely hazardous. What if we get a length value that is reflective of a partial field?
================
Comment at: llvm/tools/llvm-readobj/XCOFFDumper.cpp:501
+ DictScope DS(W, "AuxiliaryHeader");
+ PrintAuxMember(Hex, "Magic", AuxHeader->AuxMagic, AuxSize);
+ PrintAuxMember(Hex, "Version", AuxHeader->Version, AuxSize);
----------------
jasonliu wrote:
> Why do you need to pass in `AuxSize` to the macro function when all inputs are the same?
`AuxSize` is modified by each macro(!) invocation...
Repository:
rG LLVM Github Monorepo
CHANGES SINCE LAST ACTION
https://reviews.llvm.org/D82549/new/
https://reviews.llvm.org/D82549
More information about the llvm-commits
mailing list