From 29582a79b732b0de9a0983adf5b6d1eea8657703 Mon Sep 17 00:00:00 2001 From: dgp Date: Fri, 17 Nov 2006 21:22:18 +0000 Subject: * generic/tclExecute.c (INST_EXPON): Corrected crash on [expr 2**(1<<63)]. Was operating on cleared bignum Tcl_Obj. --- ChangeLog | 5 +++++ generic/tclExecute.c | 7 ++++++- 2 files changed, 11 insertions(+), 1 deletion(-) diff --git a/ChangeLog b/ChangeLog index 6beb789..ce83e3c 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,3 +1,8 @@ +2006-11-17 Don Porter + + * generic/tclExecute.c (INST_EXPON): Corrected crash on + [expr 2**(1<<63)]. Was operating on cleared bignum Tcl_Obj. + 2006-11-16 Donal K. Fellows * doc/apply.n, doc/chan.n: Added examples. diff --git a/generic/tclExecute.c b/generic/tclExecute.c index 0e8c0d6..c322fac 100644 --- a/generic/tclExecute.c +++ b/generic/tclExecute.c @@ -12,7 +12,7 @@ * See the file "license.terms" for information on usage and redistribution of * this file, and for a DISCLAIMER OF ALL WARRANTIES. * - * RCS: @(#) $Id: tclExecute.c,v 1.251 2006/11/15 20:08:44 dgp Exp $ + * RCS: @(#) $Id: tclExecute.c,v 1.252 2006/11/17 21:22:18 dgp Exp $ */ #include "tclInt.h" @@ -4781,6 +4781,11 @@ TclExecuteByteCode( NEXT_INST_F(1, 2, 1); } } + if (type2 == TCL_NUMBER_BIG) { + Tcl_SetObjResult(interp, + Tcl_NewStringObj("exponent too large", -1)); + goto checkForCatch; + } /* TODO: Perform those computations that fit in native types */ goto overflow; } -- cgit v0.12