[PATCH] D98554: Save strings for CC_PRINT env vars
Sean via Phabricator via cfe-commits
cfe-commits at lists.llvm.org
Tue Mar 23 17:46:04 PDT 2021
SeanP marked 2 inline comments as done.
SeanP added inline comments.
================
Comment at: clang/include/clang/Driver/Driver.h:160
/// The file to log CC_PRINT_PROC_STAT_FILE output to, if enabled.
- const char *CCPrintStatReportFilename;
+ std::string CCPrintStatReportFilename;
----------------
hubert.reinterpretcast wrote:
> I'm seeing code left unchanged like:
> ```
> TheDriver.CCPrintOptionsFilename = ::getenv("CC_PRINT_OPTIONS_FILE");
> ```
>
> Assigning to a `std::string` from a null `char *` is known to cause things like
> ```
> Segmentation fault
> ```
>
I've fixed in newest patch.
CHANGES SINCE LAST ACTION
https://reviews.llvm.org/D98554/new/
https://reviews.llvm.org/D98554
More information about the cfe-commits
mailing list