diff --git a/compiler-rt/lib/fuzzer/FuzzerCommand.h b/compiler-rt/lib/fuzzer/FuzzerCommand.h --- a/compiler-rt/lib/fuzzer/FuzzerCommand.h +++ b/compiler-rt/lib/fuzzer/FuzzerCommand.h @@ -41,9 +41,11 @@ OutputFile(Other.OutputFile) {} Command &operator=(const Command &Other) { - Args = Other.Args; - CombinedOutAndErr = Other.CombinedOutAndErr; - OutputFile = Other.OutputFile; + if (&Other != this) { + Args = Other.Args; + CombinedOutAndErr = Other.CombinedOutAndErr; + OutputFile = Other.OutputFile; + } return *this; }