Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!
Bug 230849 - cvs-1.12.xx segfaults if compiled with -D_FORTIFY_SOURCE=2
Summary: cvs-1.12.xx segfaults if compiled with -D_FORTIFY_SOURCE=2
Status: RESOLVED DUPLICATE of bug 218567
Alias: None
Product: Gentoo Linux
Classification: Unclassified
Component: [OLD] Development (show other bugs)
Hardware: All Linux
: High normal (vote)
Assignee: Maintainers for cvs, and cvs related tools (the version control system) [OBSOLETE]
Depends on:
Reported: 2008-07-05 12:09 UTC by Attila Tóth
Modified: 2009-02-01 18:05 UTC (History)
0 users

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

vasnprintf modifications just like in m4 (cvs-gnulib-vasnprintf.patch,1.07 KB, patch)
2008-07-05 12:12 UTC, Attila Tóth
Details | Diff
Modified ebuild using the above patch (cvs-1.12.12-r6.ebuild,2.41 KB, text/plain)
2008-07-05 12:13 UTC, Attila Tóth

Note You need to log in before you can comment on or make changes to this bug.
Description Attila Tóth 2008-07-05 12:09:50 UTC
!!! The issue is valid only for toolchains compiling packages with -D_FORTIFY_SOURCE=2. !!!

The problem is caused by the use of vasnprintf. It would use a user supplied format string "%n". FORTIFY_SOURCE blocks the attempt causing a crash. The vasnprintf was taken from gnulib. Upstream suggested a workaround which alsready included in sys-devel/m4.
Other solutions:
- Mandriva prevents cvs from compiling with -D_FORTIFY_SOURCE=2
- FC8 and FC9 uses and older version of cvs (1.11.22)


Reproducible: Always

Steps to Reproduce:
Comment 1 Attila Tóth 2008-07-05 12:12:20 UTC
Created attachment 159607 [details, diff]
vasnprintf modifications just like in m4

Based on the suggestions of gnulib developers. May cause loss of functionality.
Works for me.
Comment 2 Attila Tóth 2008-07-05 12:13:31 UTC
Created attachment 159609 [details]
Modified ebuild using the above patch

Needed until cvs will merge the gnulib changes from upstreams.
Comment 3 Patrick Lauer gentoo-dev 2009-02-01 18:05:06 UTC

*** This bug has been marked as a duplicate of bug 218567 ***