[hardening-discuss] -DFORTIFY_SOURCE seems to cause SIGBUS on sparc
Kees Cook
kees at outflux.net
Thu Jun 19 19:15:45 UTC 2008
Hi Stefan,
On Thu, Jun 19, 2008 at 08:38:33PM +0200, Stefan Fritsch wrote:
> I had this bug report which seems to point to gcc doing something
> wrong on sparc with -DFORTIFY_SOURCE and causing SIGBUS:
>
> http://bugs.debian.org/cgi-bin/bugreport.cgi?bug=485525
>
> Has anyone seen something like that before? Does any other
> FORTIFY_SOURCE-using distribution have sparc?
Hurm. I don't think so. Fedora/RHEL has been the largest user of
FORTIFY_SOURCE so far.
Instead of dropping it entirely for apache2, what about just doing a
arch test for it? Something like this should work:
ifneq (,$(findstring :$(DEB_HOST_ARCH_CPU):,:sparc:))
# enable FORTIFY_SOURCE on non-sparc
CPPFLAGS += -D_FORTIFY_SOURCE=2
endif
Any chance of getting a minimal reproducer so we can open a gcc or glibc
bug for it?
-Kees
--
Kees Cook @outflux.net
More information about the hardening-discuss
mailing list