================
@@ -59,9 +59,9 @@ class GenericNamedTask : public RTTIExtends<GenericNamedTask,
Task> {
/// Generic task implementation.
template <typename FnT> class GenericNamedTaskImpl : public GenericNamedTask {
public:
- GenericNamedTaskImpl(FnT &&Fn, std::string DescBuffer)
+ GenericNamedTaskImpl(FnT &&Fn, std::string InDescBuffer)
: Fn(std::forward<FnT>(Fn)), Desc(DescBuffer.c_str()),
- DescBuffer(std::move(DescBuffer)) {}
+ DescBuffer(std::move(InDescBuffer)) {}
----------------
philnik777 wrote:
The `DescBuffer` above referred to the input value before, which can result in
a pointer to unrelated stack space. And not that I look at this again, this is
still buggy, since `DescBuffer.c_str()` now always accesses uninitialized
memory.
https://github.com/llvm/llvm-project/pull/204994
_______________________________________________
cfe-commits mailing list
[email protected]
https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits