Re: Potential use-after-free in partion related code

2023-11-15 Thread Alvaro Herrera
On 2023-Nov-15, Andres Freund wrote: > partConstraint = list_concat(partBoundConstraint, > > RelationGetPartitionQual(rel)); > > At this point partBoundConstraint may not be used anymore, because > list_concat() might have real

Potential use-after-free in partion related code

2023-11-15 Thread Andres Freund
Hi, A while back I had proposed annotations for palloc() et al that let the compiler know about which allocators pair with what freeing functions. One thing that allows the compiler to do is to detect use after free. One such complaint is: ../../../../../home/andres/src/postgresql/src/backend/co