Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!
Bug 218567 - dev-util/cvs-1.12.12-r4 fails when compiled with -D_FORTIFY_SOURCE=2
Summary: dev-util/cvs-1.12.12-r4 fails when compiled with -D_FORTIFY_SOURCE=2
Alias: None
Product: Gentoo Linux
Classification: Unclassified
Component: [OLD] Games (show other bugs)
Hardware: All Linux
: High normal (vote)
Assignee: Maintainers for cvs, and cvs related tools (the version control system) [OBSOLETE]
: 230849 257465 (view as bug list)
Depends on:
Blocks: fortify-source
  Show dependency tree
Reported: 2008-04-20 12:58 UTC by Martin Väth
Modified: 2009-02-18 00:21 UTC (History)
3 users (show)

See Also:
Package list:
Runtime testing required: ---


Note You need to log in before you can comment on or make changes to this bug.
Description Martin Väth 2008-04-20 12:58:09 UTC
emerging ultimatestunts gives immediately the following strange error
which is apparently due to the "autopoint -f" command in the ebuild:

*** %n in writable segment detected ***
*** %n in writable segment detected ***
[several hundred times repeated]
*** %n in writable segment detected ***
Segmentation fault
autopoint: *** infrastructure files for version 0.11.2 not found; this is autopoint from GNU gettext-tools 0.17
autopoint: *** Stop.

I had compiled gettext with gcc-4.3 and "risky" CFLAGS, but also after
recompiling with gcc-4.2.1 and CFLAGS="-march=pentium3m -O2 -fno-ident -pipe"
the same result occurs.

I had similar messages (including a segfault) also with an old (unsupported)
xaralx ebuild which used "autoreconf" (not the newer eautoreconf).
Comment 1 Tomáš Chvátal (RETIRED) gentoo-dev 2008-04-21 19:56:18 UTC
compiles fine on today ~x86. so you have problem somewhere else.
Comment 2 Martin Väth 2008-04-21 22:05:35 UTC
Thanks. I hadn't expected this, because I thought that autopoint is a rather
self-consistent binary. But now I investigated further and found that it is
essentially a shell script which calls cvs.

It turned out that the culprit was cvs compiled with -D_FORTIFY_SOURCE=2.
Probably this means that cvs will fail with hardened.

Not sure whether I should close the bug as invalid or whether it should be reassigned to either the cvs or hardened people. You decide...
Comment 3 Jeroen Roovers (RETIRED) gentoo-dev 2008-04-22 18:05:24 UTC
emerge --info, please.
Comment 4 Matt 2008-06-10 15:44:56 UTC
confirmed !

this happens approx. from gcc-4.2.0 to gcc-4.3.1 with and cvs compiled with -D_FORTIFY_SOURCE=2 enabled in cflags/cxxflags 

if -D_FORTIFY_SOURCE=2 is disabled there's no such problem

>*** %n in writable segment detected ***
>*** %n in writable segment detected ***
>[several hundred times repeated]

this does so much load on the x-server / system, that working isn't possible anymore ...

only killing via magic sysrq key is possible (as last resort)

Portage (default/linux/amd64/2008.0, gcc-4.3.1, glibc-2.8_p20080602-r0, 2.6.26-rc5-zen1.0 x86_64)
System uname: 2.6.26-rc5-zen1.0 x86_64 Intel(R) Core(TM)2 CPU 6600 @ 2.40GHz
Timestamp of tree: Tue, 10 Jun 2008 12:16:01 +0000
app-shells/bash:     3.2_p39
dev-java/java-config: 1.3.7, 2.1.6
dev-lang/python:     2.4.4-r9, 2.5.2-r4
dev-python/pycrypto: 2.0.1-r6
sys-apps/baselayout: 2.0.0
sys-apps/openrc:     9999
sys-devel/autoconf:  2.13, 2.62
sys-devel/automake:  1.4_p6, 1.5, 1.6.3, 1.7.9-r1, 1.8.5-r3, 1.9.6-r2, 1.10.1-r1
sys-devel/binutils:  2.18-r1,,,,
sys-devel/gcc-config: 1.4.1
sys-devel/libtool:   1.5.26
virtual/os-headers:  2.6.25-r4
ACCEPT_KEYWORDS="amd64 ~amd64"
Comment 6 Patrick Lauer gentoo-dev 2009-02-01 18:04:35 UTC
+  01 Feb 2009; Patrick Lauer <>                                                                                        
+  +files/cvs-1.12.12-cvs-gnulib-vasnprintf.patch, +cvs-1.12.12-r6.ebuild:                                                                
+  Fixing cvs to work with gcc 4.3.3 which enables FORTIFY_SOURCES. Fixes                                                                 
+  #230849. Patch from Bruno Haible <>, thanks to Magnus                                                                   
+  Granberg <> for some hints and explanations.
Comment 7 Patrick Lauer gentoo-dev 2009-02-01 18:05:06 UTC
*** Bug 230849 has been marked as a duplicate of this bug. ***
Comment 8 SpanKY gentoo-dev 2009-02-17 16:14:40 UTC
*** Bug 257465 has been marked as a duplicate of this bug. ***