Re: memory bug debugging
От | Tom Lane |
---|---|
Тема | Re: memory bug debugging |
Дата | |
Msg-id | 7881.1128435447@sss.pgh.pa.us обсуждение исходный текст |
Ответ на | Re: memory bug debugging (Martijn van Oosterhout <kleptog@svana.org>) |
Список | pgsql-hackers |
Martijn van Oosterhout <kleptog@svana.org> writes: > On Tue, Oct 04, 2005 at 01:11:41PM +0200, Markus Schiltknecht wrote: >> I'm fiddling around with the backend and have created a memory bug. I >> guess I'm overriding a palloced chunk, but can't figure out where. > There are some defines (MEMORY_CONTEXT_CHECKING and > CLOBBER_FREED_MEMORY) which can help find leaks. Those are on by default if you built with --enable-cassert (which you should surely always do when testing new backend code). Best idea that comes to mind is: (1) make sure you have a reproducible scenario in which the clobber always happens at the same physical location. (This shouldn't be too hard if you start a fresh backend for each trial.) (2) run it under gdb and set a hardware watchpoint at that location. You'll get some false matches from touches in the aset.c code, but hopefully not too many. The first breakpoint outside aset.c is your problem. regards, tom lane
В списке pgsql-hackers по дате отправления: