jimingham wrote: This mostly looks safe.
TypeCategoryMap::AnyMatches passes back a pointer to the string in the map holding the category in which the match was found. So that opens the possibility that someone could add a category, get a match and hold onto the pointer to the category name, then delete the category. That would make the underlying StringMap element go away, and render the pointer bad. In this case, I think you get away with it because the TypeCategoryImpl holds a copy of its category name (as a ConstString at present) and AnyMatches actually returns the ConstString pointer, so that's safe. But that seems like mostly an accident. And when you come for the ConstString in TypeCategoryImpl you'll have to find some other persistent store for this. https://github.com/llvm/llvm-project/pull/208117 _______________________________________________ lldb-commits mailing list [email protected] https://lists.llvm.org/cgi-bin/mailman/listinfo/lldb-commits
