[Fedora-i18n-bugs] [Bug 1151238] New: gettext causes m4 to consume infinite memory on util-linux configure.ac
by Red Hat Bugzilla
https://bugzilla.redhat.com/show_bug.cgi?id=1151238
Bug ID: 1151238
Summary: gettext causes m4 to consume infinite memory on
util-linux configure.ac
Product: Fedora
Version: 20
Component: gettext
Assignee: dueno(a)redhat.com
Reporter: eblake(a)redhat.com
QA Contact: extras-qa(a)fedoraproject.org
CC: dueno(a)redhat.com, i18n-bugs(a)lists.fedoraproject.org,
petersen(a)redhat.com, praiskup(a)redhat.com
Description of problem:
In 0.18, gettext switched from using grep to using autom4te to probe the values
of certain macros in configure.ac. However, the conversion is flawed, and can
lead to an attempt to run 'autopoint' or 'gettextize' invoking an m4 process
with an infinite memory expansion on some configure.ac. In particular, this
was reported on the debian list when trying to build util-linux 2.20.1:
https://bugs.debian.org/cgi-bin/bugreport.cgi?bug=764580
Version-Release number of selected component (if applicable):
gettext-devel-0.18.3.2-1.fc20.x86_64
How reproducible:
100%
Steps to Reproduce:
1. git clone git://git.debian.org/git/collab-maint/pkg-util-linux.git
util-linux
2. cd util-linux
3. git checkout v2.20.1
4. autopoint --force
Actual results:
m4 becomes a memory hog
Expected results:
the operation completes quickly
Additional info:
patch proposed:
diff --git i/gettext-tools/misc/autopoint.in
w/gettext-tools/misc/autopoint.in
index c31943f..87ee374 100644
--- i/gettext-tools/misc/autopoint.in
+++ w/gettext-tools/misc/autopoint.in
@@ -1,6 +1,6 @@
#! /bin/sh
#
-# Copyright (C) 2002-2013 Free Software Foundation, Inc.
+# Copyright (C) 2002-2014 Free Software Foundation, Inc.
#
# This program is free software: you can redistribute it and/or modify
# it under the terms of the GNU General Public License as published by
@@ -143,14 +143,14 @@ fi
func_trace_autoconf ()
{
echo '\
-dnl disable macros which may abort autom4te
-m4_undefine([m4_assert])
-m4_undefine([m4_fatal])
-m4_undefine([m4_warn])
-m4_undefine([m4_errprintn])
-m4_undefine([m4_exit])
-m4_undefine([m4_include])
-m4_undefine([m4_esyscmd])
+dnl replace macros which may abort autom4te with a no-op variant
+m4_pushdef([m4_assert])
+m4_pushdef([m4_fatal])
+m4_pushdef([m4_warn])
+m4_pushdef([m4_errprintn])
+m4_pushdef([m4_exit])
+m4_pushdef([m4_include])
+m4_pushdef([m4_esyscmd])
' \
| "$AUTOM4TE" --no-cache --language=Autoconf-without-aclocal-m4 \
--trace="$1":\$% - "$2" 2>/dev/null
diff --git i/gettext-tools/misc/gettextize.in
w/gettext-tools/misc/gettextize.in
index dbe4d1e..33299b9 100644
--- i/gettext-tools/misc/gettextize.in
+++ w/gettext-tools/misc/gettextize.in
@@ -1,6 +1,6 @@
#! /bin/sh
#
-# Copyright (C) 1995-1998, 2000-2013 Free Software Foundation, Inc.
+# Copyright (C) 1995-1998, 2000-2014 Free Software Foundation, Inc.
#
# This program is free software: you can redistribute it and/or modify
# it under the terms of the GNU General Public License as published by
@@ -143,14 +143,14 @@ fi
func_trace_autoconf ()
{
echo '\
-dnl disable macros which may abort autom4te
-m4_undefine([m4_assert])
-m4_undefine([m4_fatal])
-m4_undefine([m4_warn])
-m4_undefine([m4_errprintn])
-m4_undefine([m4_exit])
-m4_undefine([m4_include])
-m4_undefine([m4_esyscmd])
+dnl replace macros which may abort autom4te with a no-op variant
+m4_pushdef([m4_assert])
+m4_pushdef([m4_fatal])
+m4_pushdef([m4_warn])
+m4_pushdef([m4_errprintn])
+m4_pushdef([m4_exit])
+m4_pushdef([m4_include])
+m4_pushdef([m4_esyscmd])
' \
| "$AUTOM4TE" --no-cache --language=Autoconf-without-aclocal-m4 \
--trace="$1":\$% - "$2" 2>/dev/null
--
You are receiving this mail because:
You are on the CC list for the bug.
Unsubscribe from this bug https://bugzilla.redhat.com/token.cgi?t=gqSmS7QBO7&a=cc_unsubscribe
9 years, 5 months