Yes, I can build with this patch, please apply to cvs. But the story is not over .... :(
cc -DHAVE_CONFIG_H -I. -I. -I.. -I.. -I.. -I../gnulib -I../gnulib -I../m4 -I../m4 -I/software/@sys/usr/include -I/usr/local2/include -I/usr/local/include -I/usr/local2/openssl/include -O2 -arch ev56 -c stackovf.c /bin/bash ../libtool --mode=link cc -O2 -arch ev56 -o m4 -no-undefined -export-dynamic -dlpreopen force -dlpreopen ../modules/m4.la -dlpreopen .../modules/traditional.la -dlpreopen ../modules/gnu.la getopt.o getopt1.o version-etc.o main.o freeze.o stackovf.o ../m4/libm4.la -L/software/@sys/usr/lib -L/usr/local2/lib -L/usr/local/lib -L/usr/local/openssl/lib mkdir .libs
*** Warning: Linking the executable m4 against the loadable module *** m4.so is not portable!
*** Warning: Linking the executable m4 against the loadable module *** traditional.so is not portable!
*** Warning: Linking the executable m4 against the loadable module *** gnu.so is not portable! rm -f .libs/m4.nm .libs/m4.nmS .libs/m4.nmT creating .libs/m4S.c extracting global C symbols from `../modules/.libs/m4.a' extracting global C symbols from `../modules/.libs/traditional.a' extracting global C symbols from `../modules/.libs/gnu.a' (cd .libs && cc -c "m4S.c") rm -f .libs/m4S.c .libs/m4.nm .libs/m4.nmS .libs/m4.nmT cc -O2 -arch ev56 -o .libs/m4 .libs/m4S.o getopt.o getopt1.o version-etc.o main.o freeze.o stackovf.o ../modules/.libs/m4.so -L/software/@sys/usr/lib -L/usr/local/lib -L/usr/local/openssl/lib -L/usr/lib -L/usr/local2/lib ../modules/.libs/traditional.so ../modules/.libs/gnu.so /usr/local/scratch/m4/m4/.libs/libm4.so ../m4/.libs/libm4.so /software/@sys/usr/lib/libintl.so /software/@sys/usr/lib/libiconv.so -lc -rpath /software/@sys/usr/libexec/m4:/software/@sys/usr/lib creating m4 make[2]: Leaving directory `/usr/local/scratch/m4/src'
make[2]: Entering directory `/usr/local/scratch/m4/tests' { \ echo '# Signature of the current package.'; \ echo 'm4_define([AT_PACKAGE_NAME], [GNU m4])'; \ echo 'm4_define([AT_PACKAGE_TARNAME], [m4])'; \ echo 'm4_define([AT_PACKAGE_VERSION], [1.4q])'; \ echo 'm4_define([AT_PACKAGE_STRING], [GNU m4 1.4q])'; \ echo 'm4_define([AT_PACKAGE_BUGREPORT], [EMAIL PROTECTED])'; \ } >./package.m4 autom4te --language=autotest -I . testsuite.at -o testsuite /bin/bash ./testsuite ## ----------------------- ## ## GNU m4 1.4q test suite. ## ## ----------------------- ##
Macro definitions.
1: Arity and defn ok 2: Arity, defn, and freeze FAILED (macros.at:78) 3: pushdef/popdef ok 4: Tracing Hanoi Towers ok 5: Propagation of traceon ok 6: Propagation of --trace ok
Torturing builtins.
7: [define] ok 8: [divert] ok 9: debug ok 10: esyscmd ok 11: exp ok 12: gmp skipped (builtins.at:181) 13: include ok 14: indir ok 15: multiquotes ok 16: patsubst ok 17: regexp ok 18: sync-lines ok 19: translit ok 20: undivert ok 21: wrap ok
Options.
22: Discard comments ok 23: import-environment ok
Composite macros.
24: Capitalize ok 25: Comments ok 26: foreach ok 27: forloop ok 28: fstab ok 29: hanoi ok 30: iso8859 ok 31: misc ok 32: reverse ok 33: sysv-args ok
Module support.
34: Freezing modules FAILED (modules.at:59) 35: --module-directory: absolute path ok 36: --module-directory: relative path ok 37: M4MODPATH: absolute path ok 38: M4MODPATH: relative path ok 39: LTDL_LIBRARY_PATH: absolute path ok 40: LTDL_LIBRARY_PATH: relative path ok 41: modules: shadow ok 42: modules: unload ok 43: modules: importing FAILED (modules.at:376) 44: modules: trace ok
Documentation examples.
45: [Inhibiting Invocation] ok 46: [Define] ok 47: [Arguments] ok 48: [Pseudo Arguments] ok 49: [Undefine] ok 50: [Defn] ok 51: [Pushdef] ok 52: [Indir] ok 53: [Symbols] ok 54: [Ifdef] ok 55: [Ifelse] ok 56: [Loops] ok 57: [Dumpdef] ok 58: [Trace] ok 59: [Dnl] ok 60: [Changequote] ok 61: [Changecom] ok 62: [Changesyntax] ok 63: [M4wrap] ok 64: [Include] ok 65: [Divert] ok 66: [Undivert] ok 67: [Divnum] ok 68: [Cleardiv] ok 69: [Len] ok 70: [Index] ok 71: [Eregexp and Regexp] ok 72: [Substr] ok 73: [Translit] ok 74: [Epatsubst and Patsubst] ok 75: [Format] ok 76: [Incr] ok 77: [Eval] ok 78: [Esyscmd] ok 79: [Sysval] ok 80: [Errprint] ok 81: [M4exit] ok
## ------------- ## ## Test results. ## ## ------------- ##
ERROR: 80 tests were run, 3 failed unexpectedly. 1 test was skipped. ## -------------------------- ## ## testsuite.log was created. ## ## -------------------------- ##
Please send `testsuite.log' and all information you think might help:
To: <[EMAIL PROTECTED]> Subject: [GNU m4 1.4q] testsuite: 2 34 43 failed
## ---------------------- ## ## Detailed failed tests. ## ## ---------------------- ##
2. macros.at:71: testing freezeme.m4 frozen.m4f... macros.at:78: m4 -b -d --freeze-state=frozen.m4f freezeme.m4 --- /dev/null 2003-10-09 17:28:07.000000000 +0200 +++ /usr/local/scratch/m4/tests/testsuite.dir/at-stderr 2003-10-09 17:28:08.000000000 +0200 @@ -0,0 +1,3 @@ +/usr/local/scratch/m4/tests/m4: 212728 Memory fault - core dumped +Memory bounds violation detected (SIGSEGV). Either a stack overflow +occurred, or there is a bug in /usr/local/scratch/m4/src/.libs/lt-m4. Check for possible infinite recursion. macros.at:78: exit code was 139, expected 0 2. macros.at:71: 2. Arity, defn, and freeze (macros.at:71): FAILED (macros.at:78)
34. modules.at:27: testing frozen.m4f... modules.at:52: m4 -b -d -m load frozen.m4 unfrozen.m4 stderr: Test module loaded. Test module unloaded. stdout: ->local::test
->Test module called. Shadow module loaded. ->Shadow::test called. local::test Test module called. Shadow::test called. modules.at:59: m4 -b -d -m load -F frozen.m4f frozen.m4 stderr: /usr/local/scratch/m4/tests/m4: 214190 Memory fault - core dumped Test module loaded. Memory bounds violation detected (SIGSEGV). Either a stack overflow occurred, or there is a bug in /usr/local/scratch/m4/src/.libs/lt-m4. Check for possible infinite recursion. stdout: modules.at:59: exit code was 139, expected 0 34. modules.at:27: 34. Freezing modules (modules.at:27): FAILED (modules.at:59)
43. modules.at:343: testing ... modules.at:376: m4 -b -d -m load input.m4 --- experr 2003-10-09 17:28:22.000000000 +0200 +++ /usr/local/scratch/m4/tests/testsuite.dir/at-stderr 2003-10-09 17:28:23.000000000 +0200 @@ -6,4 +6,4 @@
TRUE m4: input.m4: 6: Warning: cannot load symbol `no_such' from module `modtest' -m4: input.m4: 7: cannot open module `no_such': no_such.so: cannot open shared object file: No such file or directory +m4: input.m4: 7: cannot open module `no_such': dlopen: Cannot map library no_such.so 43. modules.at:343: 43. modules: importing (modules.at:343): FAILED (modules.at:376)
serow# ls -la ./testsuite.dir/34/core -rw------- 1 root 183 638976 Oct 9 17:36 ./testsuite.dir/34/core serow# ls -la ./testsuite.dir/02/core -rw------- 1 root 183 614400 Oct 9 17:36 ./testsuite.dir/02/core serow#
serow# dbx ./src/.libs/lt-m4 tests/testsuite.dir/34/core dbx version 5.1 Type 'help' for help. Core file created by program "lt-m4"
signal Segmentation fault at >*[strlen, 0x3ff800d2590] ldq_u t0, 0(a0) (dbx) where
0 strlen(0x30000015928, 0x140004980, 0x120006ac4, 0x140004990, 0x140004980) [0x3ff800d2590]
1 produce_module_dump(file = 0x3ffc00800f8, handle = (nil)) ["freeze.c":120, 0x120006b08] 2 produce_module_dump(file = 0x3ffc00800f8, handle = 0x140004980) ["freeze.c":118, 0x120006af4] 3 produce_module_dump(file = 0x3ffc00800f8, handle = 0x1400049e0) ["freeze.c":118, 0x120006af4] 4 produce_module_dump(file = 0x3ffc00800f8, handle = 0x140004b00) ["freeze.c":118, 0x120006af4] 5 produce_module_dump(file = 0x3ffc00800f8, handle = 0x140004bc0) ["freeze.c":118, 0x120006af4] 6 produce_module_dump(file = 0x3ffc00800f8, handle = 0x1400048c0) ["freeze.c":118, 0x120006af4] 7 produce_module_dump(file = 0x3ffc00800f8, handle = 0x140004860) ["freeze.c":118, 0x120006af4] 8 produce_module_dump(file = 0x3ffc00800f8, handle = 0x140004ce0) ["freeze.c":118, 0x120006af4] 9 produce_module_dump(file = 0x3ffc00800f8, handle = 0x140004da0) ["freeze.c":118, 0x120006af4] 10 produce_frozen_state(context = 0x140008000, name = 0x11fffe0b8 = "frozen.m4f") ["freeze.c":256, 0x1200075f4] 11 main(argc = 9, argv = 0x11fffc018, envp = 0x11fffc068) ["main.c":525, 0x120006790] (dbx)
serow# dbx ./src/.libs/lt-m4 tests/testsuite.dir/02/core dbx version 5.1 Type 'help' for help. Core file created by program "lt-m4"
signal Segmentation fault at >*[strlen, 0x3ff800d2590] ldq_u t0, 0(a0) (dbx) where
0 strlen(0x30000015928, 0x140004980, 0x120006ac4, 0x140004990, 0x140004980) [0x3ff800d2590]
1 produce_module_dump(file = 0x3ffc00800f8, handle = (nil)) ["freeze.c":120, 0x120006b08] 2 produce_module_dump(file = 0x3ffc00800f8, handle = 0x140004980) ["freeze.c":118, 0x120006af4] 3 produce_module_dump(file = 0x3ffc00800f8, handle = 0x1400049e0) ["freeze.c":118, 0x120006af4] 4 produce_module_dump(file = 0x3ffc00800f8, handle = 0x140004b00) ["freeze.c":118, 0x120006af4] 5 produce_module_dump(file = 0x3ffc00800f8, handle = 0x140004bc0) ["freeze.c":118, 0x120006af4] 6 produce_module_dump(file = 0x3ffc00800f8, handle = 0x1400048c0) ["freeze.c":118, 0x120006af4] 7 produce_frozen_state(context = 0x140008000, name = 0x11fffe0af = "frozen.m4f") ["freeze.c":256, 0x1200075f4] 8 main(argc = 6, argv = 0x11fffc018, envp = 0x11fffc050) ["main.c":525, 0x120006790] (dbx)
Martin MOKREJŠ wrote: > On Thu, 9 Oct 2003, Akim Demaille wrote: > > >> > Martin MOKREJ? wrote: >> >> configure.ac:241: warning: gl_CHECK_HEADER_wcar_ is m4_require'd but isnot m4_defun'd >> >> > comes from gnulib/acm4/regex.m4: >> >>Nope: read better: gl_CHECK_HEADER_wcar_ says m4. GNU M4 1.4's >>translit is buggy. Use this better GNU M4 1.4 instead: >> >> http://www.lrde.epita.fr/~akim/download/m4-1.4.tar.gz >> > > > OK, I installed this and resynced cvs, built latest m4 > > I get get around the problem below only with gcc. Can you change the code > somehow?
Does this patch work for you? I have no regressions on linux or darwin.
Cheers, Gary.
-- Martin Mokrejs <[EMAIL PROTECTED]>, <[EMAIL PROTECTED]> PGP5.0i key is at http://www.natur.cuni.cz/~mmokrejs MIPS / Institute for Bioinformatics <http://mips.gsf.de> GSF - National Research Center for Environment and Health Ingolstaedter Landstrasse 1, D-85764 Neuherberg, Germany tel.: +49-89-3187 3683 , fax: +49-89-3187 3585
Index: m4/m4private.h
=========================
=========================
=================
RCS file: /cvsroot/m4/m4/m4/m4private.h,v
retrieving revision 1.39
diff -u -p -u -r1.39 m4private.h
--- m4/m4private.h 8 Oct 2003 14:46:12 -0000 1.39
+++ m4/m4private.h 9 Oct 2003 15:05:24 -0000
@@ -312,6 +312,13 @@ struct m4__search_path_info {
putc ('\n', m4_get_debug_file (C)); \
} } M4_STMT_END
+
+
+
+/* Convenience macro to zero a variable after freeing it. */
+#define DELETE(Expr) ((Expr) = (free (Expr), (void *) 0))
+
+
#if DEBUG
# define DEBUG_INPUT
# define DEBUG_MACRO
Index: m4/system_.h
=========================
=========================
=================
RCS file: /cvsroot/m4/m4/m4/system_.h,v
retrieving revision 1.8
diff -u -p -u -r1.8 system_.h
--- m4/system_.h 7 Oct 2003 14:10:14 -0000 1.8
+++ m4/system_.h 9 Oct 2003 15:05:24 -0000
@@ -18,7 +18,7 @@
*/
/**
- * @configure_generated@
+ * @configure_output@
*
* This file is installed, so cannot rely on the contents of config.h.
* It works best if included _after_ system headers.
@@ -33,7 +33,14 @@
@INCLUDE_ERROR_H@
@INCLUDE_OBSTACK_H@
@INCLUDE_REGEX_H@
+
+/* These are not in m4's namespace so for safety undefine any errant
+ definitions before including stdbool.h. */
+#undef bool
+#undef false
+#undef true
@INCLUDE_STDBOOL_H@
+
#include <m4/exit.h>
#include <m4/xalloc.h>
#include <m4/xstrndup.h>
@@ -146,10 +153,6 @@ BEGIN_C_DECLS
# define _CONC(a, b) a##b
# define CONC(a, b) _CONC(a, b)
#endif
-
-
-
-#define DELETE(Expr) ((Expr) = (free (Expr), (void *) 0))
END_C_DECLS
Index: modules/perl.c
=========================
=========================
=================
RCS file: /cvsroot/m4/m4/modules/perl.c,v
retrieving revision 1.12
diff -u -p -u -r1.12 perl.c
--- modules/perl.c 27 Aug 2003 17:10:12 -0000 1.12
+++ modules/perl.c 9 Oct 2003 15:05:24 -0000
@@ -23,6 +23,7 @@
#undef PACKAGE
#include "perlxsi.c" /* Perl stuff */
+#undef try
#undef _
#include <m4module.h>
_______________________________________________ Bug-m4 mailing list [EMAIL PROTECTED] http://mail.gnu.org/mailman/listinfo/bug-m4
