Re: _FORTIFY_SOURCE by default?

From: Peter Eisentraut <peter_e(at)gmx(dot)net>
To: Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>
Cc: pgsql-hackers(at)postgresql(dot)org
Subject: Re: _FORTIFY_SOURCE by default?
Date: 2012-09-16 18:30:57
Message-ID: 1347820257.559.2.camel@vanquo.pezone.net
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-hackers

On Sun, 2012-09-16 at 00:41 -0400, Tom Lane wrote:
> Peter Eisentraut <peter_e(at)gmx(dot)net> writes:
> > _FORTIFY_SOURCE=2 appears to be the default for package building on many
> > Linux distributions now, as part of harding or security options. But we
> > often hear about problems related to this only when we hand the source
> > over to the packagers. So I think we might as well add this to our
> > standard compilation options, for example in src/include/port/linux.h.
> > What do you think?
>
> Doesn't seem like a good idea to me to add platform-specific options
> with unspecified effects to platform-independent upstream sources.

It's effectively a warning option, and we end up fixing all the warnings
anyway, so I don't see the point of deferring that effort. We could
rephrase this request as, how about adding this new warning option, it's
occasionally useful -- which we frequently do.

We add platform-specific warning and optimization options in many
places, and I don't think this is much different.

In response to

Responses

Browse pgsql-hackers by date

  From Date Subject
Next Message Peter Eisentraut 2012-09-16 18:34:56 Re: _FORTIFY_SOURCE by default?
Previous Message Andres Freund 2012-09-16 17:56:54 Re: embedded list v2