hokein added a comment. Thanks for the report and revert, and sorry for the failures and the late response (was OOO on Friday).
> One of our guys speculates that because some allocations are "owned" by the > returned TokenStream, but the returned TokenStream is a temporary, the > lifetimes might not be sufficient and some deallocations can happen. > If I change the nested calls stripComments(cook(lex(Code, Opts), Opts)) to > separate calls stored to separate locals, the problem goes away. Thanks for diagnosing it. Yeah, this is the root cause. `cook` returns a tokenStream (which has its own payload), and this token stream is a temporary and being destroyed after the `stripComments` statement, and we have dangling pointers. I will prepare a fix. Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D121678/new/ https://reviews.llvm.org/D121678 _______________________________________________ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits