Re: [PATCH] Guard `CLOBBER_FREED_MEMORY` & `MEMORY_CONTEXT_CHECKING` - Mailing list pgsql-hackers

From Samuel Marks
Subject Re: [PATCH] Guard `CLOBBER_FREED_MEMORY` & `MEMORY_CONTEXT_CHECKING`
Date
Msg-id CAMfPbcaRFpRZ1zXH6wvjuXD58xVk+NJQzTYF0+TJA7LhRTLRvA@mail.gmail.com
Whole thread Raw
In response to Re: [PATCH] Guard `CLOBBER_FREED_MEMORY` & `MEMORY_CONTEXT_CHECKING`  (Tom Lane <tgl@sss.pgh.pa.us>)
Responses Re: [PATCH] Guard `CLOBBER_FREED_MEMORY` & `MEMORY_CONTEXT_CHECKING`
List pgsql-hackers
It will resolve the large number of these warnings from
https://github.com/pgcentralfoundation/pgrx/blob/6dfb9d1/cargo-pgrx/src/command/init.rs#L411-L412:

<command-line>: note: this is the location of the previous definition
./../../src/include/pg_config_manual.h:274: warning:
"MEMORY_CONTEXT_CHECKING" redefined
 | #define MEMORY_CONTEXT_CHECKING
 |
 <command-line>: note: this is the location of the previous definition
 In file included from ../../../src/include/c.h:55,
 from ../../../src/include/postgres.h:46,
 from xactdesc.c:15:
 ../../../src/include/pg_config_manual.h:265: warning:
"CLOBBER_FREED_MEMORY" redefined
 | #define CLOBBER_FREED_MEMORY






and yes will be sending them a patch also. But there's no harm in not
redefining symbols, so not sure why this is a controversial patch.

On Fri, Aug 23, 2024 at 4:11 PM Tom Lane <tgl@sss.pgh.pa.us> wrote:
>
> Samuel Marks <samuelmarks@gmail.com> writes:
> > Subject: [PATCH] [src/include/pg_config_manual.h] Guard `CLOBBER_FREED_MEMORY`
> >  & `MEMORY_CONTEXT_CHECKING`
>
> Why is this a good idea?
>
>                         regards, tom lane



pgsql-hackers by date:

Previous
From: Cary Huang
Date:
Subject: Re: [Patch] remove duplicated smgrclose
Next
From: Tom Lane
Date:
Subject: Re: [PATCH] Guard `CLOBBER_FREED_MEMORY` & `MEMORY_CONTEXT_CHECKING`