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

From Tom Lane
Subject Re: [PATCH] Guard `CLOBBER_FREED_MEMORY` & `MEMORY_CONTEXT_CHECKING`
Date
Msg-id 2296691.1724449180@sss.pgh.pa.us
Whole thread Raw
In response to Re: [PATCH] Guard `CLOBBER_FREED_MEMORY` & `MEMORY_CONTEXT_CHECKING`  (Samuel Marks <samuelmarks@gmail.com>)
Responses Re: [PATCH] Guard `CLOBBER_FREED_MEMORY` & `MEMORY_CONTEXT_CHECKING`
List pgsql-hackers
Samuel Marks <samuelmarks@gmail.com> writes:
> 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:

Hmm, that seems like their problem not ours.  It's not very clear
to me why they'd want to force these flags from the compiler
command line in the first place, but if they do they should be
consistent with the more usual ways to set them.

> 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.

The reason I'm resistant to changing it is that the code you want
to touch has been unchanged since 2003 in the first case, and 2013
in the second.  It's fairly unclear what external code might have
grown dependencies on the current behavior, but with that much
history I'm not eager to bet that the answer is "none".  Also,
the present setup makes it clear that you are supposed to test
"#ifdef CLOBBER_FREED_MEMORY" not "#if CLOBBER_FREED_MEMORY".
If we stop locking down the expected contents of the macro, bugs
of that sort could sneak in.

            regards, tom lane



pgsql-hackers by date:

Previous
From: Samuel Marks
Date:
Subject: Re: [PATCH] Guard `CLOBBER_FREED_MEMORY` & `MEMORY_CONTEXT_CHECKING`
Next
From: "Joel Jacobson"
Date:
Subject: Re: Optimising numeric division