Meinersbur requested changes to this revision.
Meinersbur added inline comments.
This revision now requires changes to proceed.
================
Comment at: lib/Parse/ParsePragma.cpp:1011
+ Str = llvm::StringSwitch<StringRef>(Str)
+ .Case("loop", "clang loop " + Str.str())
+ .Case("unroll_and_jam", Str)
----------------
[serious] I know I already accepted the patch, but I just noticed something:
`"clang loop " + Str.str()` will allocate a temporary std::string, `Str` will
potentially point to it, then the temporary string will be released. `Str` will
then point to released memory and returned by this function, i.e. a
use-after-free.
CHANGES SINCE LAST ACTION
https://reviews.llvm.org/D64564/new/
https://reviews.llvm.org/D64564
_______________________________________________
cfe-commits mailing list
[email protected]
https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits