Re: Finding memory corruption in an extension

2021-01-08 Thread Tom Lane
Pavel Stehule writes: > pá 8. 1. 2021 v 18:48 odesílatel Jack Orenstein napsal: >> I'm interested in advice on how to go about hunting down my problem. >> Something along the lines of a debugging malloc, or valgrind, for Postgres. > The basic feature is using postgres compiled with --enable-cass

Re: Finding memory corruption in an extension

2021-01-08 Thread Pavel Stehule
Hi pá 8. 1. 2021 v 18:48 odesílatel Jack Orenstein napsal: > An extension I'm creating is causing Postgres to crash, almost certainly > due to memory corruption. I am using palloc0/pfree, calling SET_VARSIZE, > and generally following the procedures documented here: > https://www.postgresql.org

Finding memory corruption in an extension

2021-01-08 Thread Jack Orenstein
An extension I'm creating is causing Postgres to crash, almost certainly due to memory corruption. I am using palloc0/pfree, calling SET_VARSIZE, and generally following the procedures documented here: https://www.postgresql.org/docs/12/xfunc-c.html. I am also testing my code outside of Postgres (