m4-commit
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Changes to m4/tests/builtins.at,v


From: Eric Blake
Subject: Changes to m4/tests/builtins.at,v
Date: Thu, 26 Oct 2006 23:19:13 +0000

CVSROOT:        /sources/m4
Module name:    m4
Changes by:     Eric Blake <ericb>      06/10/26 23:19:12

Index: tests/builtins.at
===================================================================
RCS file: /sources/m4/m4/tests/builtins.at,v
retrieving revision 1.27
retrieving revision 1.28
diff -u -b -r1.27 -r1.28
--- tests/builtins.at   26 Oct 2006 23:11:41 -0000      1.27
+++ tests/builtins.at   26 Oct 2006 23:19:12 -0000      1.28
@@ -161,20 +161,13 @@
 Text diverted a second time.
 ]])
 
-dnl Test for allocation overflow.  On 32-bit platforms, this used to
-dnl coredump due to wraparound allocating a smaller array, then referencing
-dnl unallocated memory; it should now cleanly fail outright.  On 64-bit
-dnl platforms, failure is determined by the amount of memory.  If the
-dnl allocation succeeds (hopefully, the testers don't mind the memory
-dnl thrashing), then fake the same exit symptoms as on 32-bit so that the
-dnl test will still pass.
-AT_DATA([[in]], [[divert(eval(`1<<28'))
-divert(`2')
-errprint(__program__`: memory exhausted
-')m4exit(`1')
+dnl Handle large diversions.  In 1.4.7, this caused core dumps; in 1.4.8,
+dnl it exhausted memory on 32-bit platforms.
+AT_DATA([[in]], [[divert(eval(`1<<28'))world
+divert(`2')hello
 ]])
-AT_CHECK_M4([in], [1], [],
-[[m4: memory exhausted
+AT_CHECK_M4([in], [0], [[hello
+world
 ]])
 
 AT_CLEANUP




reply via email to

[Prev in Thread] Current Thread [Next in Thread]