summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorEric Blake <ebb9@byu.net>2008-07-17 16:49:57 -0600
committerEric Blake <ebb9@byu.net>2008-07-17 16:49:57 -0600
commit463db2c7feed2f6d38f5041aff7c502e9c4efb6d (patch)
tree4ba52e58c70407d89efe8c980c2af75317c88f4a
parent8b9feabcec95d380184f3d2feee771ec8f88144a (diff)
downloadm4-463db2c7feed2f6d38f5041aff7c502e9c4efb6d.tar.gz
Remove redundant examples/stackovf.sh.
* examples/stackovf.sh: Delete, now that checks has better version. * examples/Makefile.am (EXTRA_DIST): Don't distribute it. Signed-off-by: Eric Blake <ebb9@byu.net>
-rw-r--r--ChangeLog5
-rw-r--r--examples/Makefile.am1
-rw-r--r--examples/stackovf.sh83
3 files changed, 5 insertions, 84 deletions
diff --git a/ChangeLog b/ChangeLog
index e182a2b9..0861e712 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,5 +1,10 @@
2008-07-17 Eric Blake <ebb9@byu.net>
+ Remove redundant examples/stackovf.sh.
+ * examples/stackovf.sh: Delete, now that checks has better
+ version.
+ * examples/Makefile.am (EXTRA_DIST): Don't distribute it.
+
Adjust to c-stack changes in gnulib.
* src/Makefile.am (m4_LDADD): Use libsigsegv when available and
necessary, via LIBCSTACK.
diff --git a/examples/Makefile.am b/examples/Makefile.am
index 254d2ab9..044f133a 100644
--- a/examples/Makefile.am
+++ b/examples/Makefile.am
@@ -54,7 +54,6 @@ pushpop.m4 \
quote.m4 \
regexp.m4 \
reverse.m4 \
-stackovf.sh \
sync-lines.m4 \
sysv-args.m4 \
trace.m4 \
diff --git a/examples/stackovf.sh b/examples/stackovf.sh
deleted file mode 100644
index 8916afc3..00000000
--- a/examples/stackovf.sh
+++ /dev/null
@@ -1,83 +0,0 @@
-#!/bin/sh
-
-# Script to verify that stack overflow is diagnosed properly when
-# there is infinite macro call nesting.
-# (causes coredump in m4-1.0.3)
-
-# On some systems the ulimit command is available in ksh or bash but not sh
-(exec 2>/dev/null; ulimit -HSs 300) || {
- for altshell in bash bsh ksh ; do
- if (exec >/dev/null 2>&1; $altshell -c 'ulimit -HSs 300') &&
- test -z "$1"
- then
- echo "Using $altshell because it supports ulimit"
- exec $altshell $0 running-with-$altshell
- exit 9
- fi
- done
-}
-
-PATH=.:..:$PATH; export PATH;
-M4=m4
-type $M4
-
-tmpfile=`tempfile 2> /dev/null` || tmpfile=/tmp/t.$$
-trap 'rm -f $tmpfile; exit 1' 1 2 3 15
-
-rm -f core
-perl -e '
-# Generate nested define sequence
-$max=1000000;
-for ($i=0; $i<$max; $i++) {
- print "define(X$i,\n";
-}
-for ($i=$max-1; $i>=0; $i--) {
- print "body with substance no. $i)dnl\n"
-}
-' | \
-(
-# Limit the stack size if the shell we are running permits it
-if (exec 2>/dev/null; ulimit -HSs 50)
-then
- (exec >/dev/null 2>&1; ulimit -v) && ulimitdashv=ok
- ulimit -HSs 50
- #ulimit -HSd 8000
- #test -n "$ulimitdashv" && ulimit -HSv 8000
- echo "Stack limit is `ulimit -s`K";
- echo "Heap limit is `ulimit -d`K";
- test -n "$ulimitdashv" &&
- echo "VMem limit is `ulimit -v`K";
-else
- echo "Can't reset stack limit - this may take a while..."
-fi
-$M4 -L999999999 > $tmpfile 2>&1
-)
-result=$?
-
-exitcode=1
-if test $result -eq 0 ; then
- echo "TEST DID NOT WORK - m4 did not abort. Output:"
-else
- # See if stack overflow was diagnosed
- case "`cat $tmpfile`" in
- *overflow*)
- echo "Test succeeded.";
- exitcode=0
- ;;
- *ut*of*emory*)
- echo "*** Test is INCONCLUSIVE (ran out of heap before stack overflow)";
- ;;
- *) echo "*** Test FAILED. $M4 aborted unexpectedly. Output:";
- ;;
- esac
-fi
-
-if test -f core ; then
- ls -l core
- exitcode=1
-fi
-
-#(test $exitcode -ne 0) &&
- { echo "Output from $M4:"; cat $tmpfile; }
-
-exit $exitcode