From 1cd55299205543b1ce7124907de87ba055cd688b Mon Sep 17 00:00:00 2001 From: dgp Date: Wed, 5 Dec 2007 20:24:28 +0000 Subject: merge updates from HEAD --- ChangeLog | 11 +++++++++++ tests/stack.test | 27 ++++++++++++++++++++++----- win/configure | 3 ++- win/tcl.m4 | 3 ++- 4 files changed, 37 insertions(+), 7 deletions(-) diff --git a/ChangeLog b/ChangeLog index 8bde93f..87b48e9 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,3 +1,14 @@ +2007-12-05 Miguel Sofer + + * tests/stack.test: made the tests for stack overflow not care + about which mechanism caused the error (interp's recursion limit + or C-stack depth detector). + +2007-12-05 Jeff Hobbs + + * win/configure, win/tcl.m4 (LIBS_GUI): mingw needs -lole32 + -loleaut32 but not msvc for Tk's [send]. [Bug 1844749] + 2007-12-05 Donal K. Fellows * generic/tclCmdIL.c (Tcl_LsearchObjCmd): Prevent shimmering crash diff --git a/tests/stack.test b/tests/stack.test index e09e9c1..661657a 100644 --- a/tests/stack.test +++ b/tests/stack.test @@ -9,7 +9,7 @@ # See the file "license.terms" for information on usage and redistribution # of this file, and for a DISCLAIMER OF ALL WARRANTIES. # -# RCS: @(#) $Id: stack.test,v 1.20 2006/03/22 18:32:39 rmax Exp $ +# RCS: @(#) $Id: stack.test,v 1.20.6.1 2007/12/05 20:24:29 dgp Exp $ if {[lsearch [namespace children] ::tcltest] == -1} { package require tcltest 2 @@ -35,23 +35,40 @@ if {[testConstraint unix]} { } } -test stack-1.1 {maxNestingDepth reached on infinite recursion} {minStack2400} { +# +# Custom match to detect a stack overflow independently of the mechanism that +# triggered the error. +# + +customMatch stackOverflow StackOverflow +proc StackOverflow {- res} { + set msgList [list \ + "too many nested evaluations (infinite loop?)"\ + "out of stack space (infinite loop?)"] + expr {$res in $msgList} +} + +test stack-1.1 {maxNestingDepth reached on infinite recursion} -constraints { + minStack2400 +} -body { # do this in a sub process in case it segfaults exec [interpreter] << { proc recurse {} { recurse } catch { recurse } rv puts $rv } -} {too many nested evaluations (infinite loop?)} +} -match stackOverflow -test stack-2.1 {maxNestingDepth reached on infinite recursion} {minStack2400} { +test stack-2.1 {maxNestingDepth reached on infinite recursion} -constraints { + minStack2400 +} -body { # do this in a sub process in case it segfaults exec [interpreter] << { interp alias {} unknown {} notaknownproc catch { unknown } msg puts $msg } -} {too many nested evaluations (infinite loop?)} +} -match stackOverflow # Make sure that there is enough stack to run regexp even if we're # close to the recursion limit. [Bug 947070] [Patch 746378] diff --git a/win/configure b/win/configure index ef3e311..5dbcca8 100755 --- a/win/configure +++ b/win/configure @@ -3378,7 +3378,8 @@ echo "$as_me: WARNING: 64bit mode not supported with GCC on Windows" >&2;} SHLIB_LD="" SHLIB_LD_LIBS="" LIBS="-lws2_32" - LIBS_GUI="-lgdi32 -lcomdlg32 -limm32 -lcomctl32 -lshell32 -luuid" + # mingw needs to link ole32 and oleaut32 for [send], but MSVC doesn't + LIBS_GUI="-lgdi32 -lcomdlg32 -limm32 -lcomctl32 -lshell32 -luuid -lole32 -loleaut32" STLIB_LD='${AR} cr' RC_OUT=-o RC_TYPE= diff --git a/win/tcl.m4 b/win/tcl.m4 index 63b9053..833680f 100644 --- a/win/tcl.m4 +++ b/win/tcl.m4 @@ -447,7 +447,8 @@ AC_DEFUN([SC_CONFIG_CFLAGS], [ SHLIB_LD="" SHLIB_LD_LIBS="" LIBS="-lws2_32" - LIBS_GUI="-lgdi32 -lcomdlg32 -limm32 -lcomctl32 -lshell32 -luuid" + # mingw needs to link ole32 and oleaut32 for [send], but MSVC doesn't + LIBS_GUI="-lgdi32 -lcomdlg32 -limm32 -lcomctl32 -lshell32 -luuid -lole32 -loleaut32" STLIB_LD='${AR} cr' RC_OUT=-o RC_TYPE= -- cgit v0.12