[PATCH] D99389: [lld-macho] Implement -segprot
Jez Ng via Phabricator via llvm-commits
llvm-commits at lists.llvm.org
Mon Mar 29 10:59:55 PDT 2021
int3 marked an inline comment as done.
int3 added inline comments.
================
Comment at: lld/MachO/Driver.cpp:997-999
+ StringRef segName = arg->getValue(0);
+ uint32_t maxProt = parseProtection(arg->getValue(1));
+ uint32_t initProt = parseProtection(arg->getValue(2));
----------------
oontvoo wrote:
> Maybe I'm being paranoid - but should you check NumValues() to ensure they're 3 (and ignore the option if it's not) to avoid index-out-of-bounds?
The option parser already handles that :)
I'll add a test to make sure.
Repository:
rG LLVM Github Monorepo
CHANGES SINCE LAST ACTION
https://reviews.llvm.org/D99389/new/
https://reviews.llvm.org/D99389
More information about the llvm-commits
mailing list