NoQ added a comment. Herald added a subscriber: Charusso. Hmm, here's another one:
struct ListInfo { struct ListInfo *next; }; struct X { struct ListInfo li; int i; }; void list_add(struct ListInfo *list, struct ListInfo *item); void foo(struct ListInfo *list) { struct X *x = malloc(sizeof(struct X)); list_add(list, &x->li); // will free 'x'. } People are C-style-inheriting from a list item base, and are then happy to release the memory through a pointer to a field. Now we're reporting a memory leak on such code. It looks as if we should have somehow disabled //invalidation// but not //pointer escape// for the base region. Repository: rL LLVM CHANGES SINCE LAST ACTION https://reviews.llvm.org/D57230/new/ https://reviews.llvm.org/D57230 _______________________________________________ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits