SjoerdMeijer marked an inline comment as done.
SjoerdMeijer added inline comments.
================
Comment at: lib/Parse/ParsePragma.cpp:1011
+ Str = llvm::StringSwitch<StringRef>(Str)
+ .Case("loop", "clang loop " + Str.str())
+ .Case("unroll_and_jam", Str)
----------------
Meinersbur wrote:
> [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.
>
Oopsy, thanks for spotting this! Will fix this!
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