Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!

Bug 230849

Summary: cvs-1.12.xx segfaults if compiled with -D_FORTIFY_SOURCE=2
Product: Gentoo Linux Reporter: Attila Tóth <atoth>
Component: [OLD] DevelopmentAssignee: Maintainers for cvs, and cvs related tools (the version control system) [OBSOLETE] <cvs-utils+obsolete>
Severity: normal    
Priority: High    
Version: unspecified   
Hardware: All   
OS: Linux   
Package list:
Runtime testing required: ---
Attachments: vasnprintf modifications just like in m4
Modified ebuild using the above patch

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