Bug 345651 - rebuilt m4 dies with: %n in writable segment detected
rebuilt m4 dies with: %n in writable segment detected
Status: CLOSED RAWHIDE
Product: Fedora
Classification: Fedora
Component: m4 (Show other bugs)
rawhide
All Linux
high Severity high
: ---
: ---
Assigned To: Vitezslav Crhonek
Fedora Extras Quality Assurance
:
Depends On:
Blocks: fedora-ia64
  Show dependency treegraph
 
Reported: 2007-10-22 14:14 EDT by Doug Chapman
Modified: 2007-12-20 06:57 EST (History)
0 users

See Also:
Fixed In Version:
Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of:
Environment:
Last Closed: 2007-12-20 06:57:11 EST
Type: ---
Regression: ---
Mount Type: ---
Documentation: ---
CRM:
Verified Versions:
Category: ---
oVirt Team: ---
RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: ---


Attachments (Terms of Use)

  None (edit)
Description Doug Chapman 2007-10-22 14:14:41 EDT
Description of problem:
I realize m4 has not changed but I still think this is a bug in m4...

If m4 is built from .src.rpm under F8T3 I then get errors during autoreconf of
other packages built using it:

*** %n in writable segment detected ***

sh: line 1:  7373 Aborted                 /usr/bin/m4 --nesting-limit=1024
--include=/usr/share/autoconf --debug=aflq --fatal-warning
--debugfile=autom4te.cache/traces.0t --trace=AC_ --trace=AC_DEFUN
--trace=AC_DEFUN_ONCE --trace=AC_LIB_APPENDTOVAR --trace=AC_LIB_ARG_WITH
--trace=AC_LIB_HAVE_LINKFLAGS --trace=AC_LIB_LINKFLAGS
--trace=AC_LIB_LINKFLAGS_BODY --trace=AC_LIB_LINKFLAGS_FROM_LIBS
--trace=AC_LIB_PREFIX --trace=AC_LIB_PREPARE_MULTILIB
--trace=AC_LIB_PREPARE_PREFIX --trace=AC_LIB_PROG_LD --trace=AC_LIB_PROG_LD_GNU
--trace=AC_LIB_RPATH --trace=AC_LIB_WITH_FINAL_PREFIX --trace=AC_TYPE_SOCKLEN_T
--trace=AC_TYPE_SSIZE_T --trace=AM_ICONV --trace=AM_ICONV_LINK
--trace=AM_ICONV_LINKFLAGS_BODY --trace=AU_DEFUN --trace=_AM_AUTOCONF_VERSION
--trace=_m4_warn --trace=include --trace=m4_include --trace=m4_pattern_allow
--trace=m4_pattern_forbid
--reload-state=/usr/share/autoconf/autoconf/autoconf.m4f
/usr/share/aclocal/iconv.m4 /usr/share/aclocal/lib-ld.m4
/usr/share/aclocal/lib-link.m4 /usr/share/aclocal/lib-prefix.m4 configure.in >
autom4te.cache/output.0t

autom4te: /usr/bin/m4 failed with exit status: 134



This was seen as I was building Fedora 8 for ia64 but I have reproduced it on
x86_64.  Evidently something in the build environment has changed to be more
strict with respect to using the %n format.  I believe this strict checking was
added to improve security.

This is easily reproduced on x86_64 (and I assume any other arch) using the
procedure below.  It has not been a big problem for existing arches yet since m4
has not needed to be rebuilt but it is blocking the bringup of Fedora on ia64
and other arches and will break on existing arches as soon as m4 needs to be
rebuilt.


Version-Release number of selected component (if applicable):
m4-1.4.10-1.fc8 - as rebuilt undr Fedora 8 Test 3

How reproducible:
100%

Steps to Reproduce:
1. Install or update to Fedora 8 Test 3
2. rpmbuild --rebuild -bb m4-1.4.10-1.fc8.src.rpm
3. rpm -e --nodeps m4
4. rpm -ivh <your newly built m4 rpm>
5. rpmbuild --rebuild -bb tcsh-6.15-1.fc8.src.rpm

Note that it is far from just tcsh that fails to build, many packages will fail
during the configure stage with the new m4.

  
Actual results:
*** %n in writable segment detected ***

sh: line 1:  7373 Aborted                 /usr/bin/m4 --nesting-limit=1024
--include=/usr/share/autoconf --debug=aflq --fatal-warning
--debugfile=autom4te.cache/traces.0t --trace=AC_ --trace=AC_DEFUN
--trace=AC_DEFUN_ONCE --trace=AC_LIB_APPENDTOVAR --trace=AC_LIB_ARG_WITH
--trace=AC_LIB_HAVE_LINKFLAGS --trace=AC_LIB_LINKFLAGS
--trace=AC_LIB_LINKFLAGS_BODY --trace=AC_LIB_LINKFLAGS_FROM_LIBS
--trace=AC_LIB_PREFIX --trace=AC_LIB_PREPARE_MULTILIB
--trace=AC_LIB_PREPARE_PREFIX --trace=AC_LIB_PROG_LD --trace=AC_LIB_PROG_LD_GNU
--trace=AC_LIB_RPATH --trace=AC_LIB_WITH_FINAL_PREFIX --trace=AC_TYPE_SOCKLEN_T
--trace=AC_TYPE_SSIZE_T --trace=AM_ICONV --trace=AM_ICONV_LINK
--trace=AM_ICONV_LINKFLAGS_BODY --trace=AU_DEFUN --trace=_AM_AUTOCONF_VERSION
--trace=_m4_warn --trace=include --trace=m4_include --trace=m4_pattern_allow
--trace=m4_pattern_forbid
--reload-state=/usr/share/autoconf/autoconf/autoconf.m4f
/usr/share/aclocal/iconv.m4 /usr/share/aclocal/lib-ld.m4
/usr/share/aclocal/lib-link.m4 /usr/share/aclocal/lib-prefix.m4 configure.in >
autom4te.cache/output.0t

autom4te: /usr/bin/m4 failed with exit status: 134

aclocal: autom4te failed with exit status: 134

autoreconf: aclocal failed with exit status: 134

error: Bad exit status from /var/tmp/rpm-tmp.9066 (%build)



Expected results:


Additional info:
Comment 1 Doug Chapman 2007-10-22 14:20:15 EDT
There is some discussion about this issue here:

http://www.nabble.com/vasnprintf's-%22-n-in-writable-segment%22-chokes-with-_FORTIFY_SOURCE-%3D%3D-2-t4645780.html

Note You need to log in before you can comment on or make changes to this bug.