HeaderIncludesCallback and HeaderIncludesJSONCallback classes may own
resources and free them in the destructor. However they don't have copy
user-written constructors/assignment operators, so an attempt to copy a
HeaderIncludesCallback object will use compiler-generated copy
constructor which will only do dummy copy and afterwards there will be
use-after-free issues.
Details
Details
Diff Detail
Diff Detail
- Repository
- rG LLVM Github Monorepo
Event Timeline
Comment Actions
This is a good change since the default copy constructor would do bad things when ownsOutputFile is true. The copy assignment operator is already implicitly deleted because of the presence of a data member of reference type, but I think it is helpful to explicitly delete both.