[PATCH] D75843: [ARM,CDE] Implement CDE feature test macros
Simon Tatham via Phabricator via cfe-commits
cfe-commits at lists.llvm.org
Mon Mar 9 08:35:21 PDT 2020
simon_tatham added inline comments.
================
Comment at: clang/lib/Basic/Targets/ARM.cpp:492
HW_FP |= HW_FP_SP | HW_FP_HP;
+ } else if (Feature >= "+cdecp0" && Feature <= "+cdecp7") {
+ unsigned Coproc = Feature.back() - '0';
----------------
As far as I can see, feature names have not already been checked against any whitelist of known strings by the time we get here.
So this test will catch strings like `+cdecp0sdfsdfsdf` as well as the eight strings you actually wanted.
And then the next line makes an out-of-range shift count from the last character.
CHANGES SINCE LAST ACTION
https://reviews.llvm.org/D75843/new/
https://reviews.llvm.org/D75843
More information about the cfe-commits
mailing list