Re: Shortcoming in CLOBBER_FREED_MEMORY coverage: disk buffer pointers

From: Jim Nasby <Jim(dot)Nasby(at)BlueTreble(dot)com>
To: Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>, <pgsql-hackers(at)postgreSQL(dot)org>
Subject: Re: Shortcoming in CLOBBER_FREED_MEMORY coverage: disk buffer pointers
Date: 2015-01-26 22:22:33
Message-ID: 54C6BE29.4070507@BlueTreble.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-hackers

On 1/24/15 3:31 PM, Tom Lane wrote:
> Another idea is to teach Valgrind that whenever a backend reduces its
> pin count on a shared buffer to zero, that buffer should become undefined
> memory.

<paranoia>

Shouldn't this technically tie in with ResourceOwners? If a pointer takes the pin count from 1 to 2, then that pointer should be invalid by the time the pin count goes from 2 to 1...

I'm worried that a simple test when pin count is 0 could miss some cases of pointers just happening to be cleared by a second part of the code even though the pin count has already dropped.
--
Jim Nasby, Data Architect, Blue Treble Consulting
Data in Trouble? Get it in Treble! http://BlueTreble.com

In response to

Responses

Browse pgsql-hackers by date

  From Date Subject
Next Message Stephen Frost 2015-01-26 22:23:28 Re: pgaudit - an auditing extension for PostgreSQL
Previous Message Stephen Frost 2015-01-26 22:21:35 Re: pgaudit - an auditing extension for PostgreSQL