diff options
author | dgp <dgp@users.sourceforge.net> | 2006-11-17 21:22:18 (GMT) |
---|---|---|
committer | dgp <dgp@users.sourceforge.net> | 2006-11-17 21:22:18 (GMT) |
commit | 29582a79b732b0de9a0983adf5b6d1eea8657703 (patch) | |
tree | 20787492ad786901a632c2e4aa4b64aa925c7ccd | |
parent | 8a37e6f38645afc534c9f7f45d2b90c0c3f87ee5 (diff) | |
download | tcl-29582a79b732b0de9a0983adf5b6d1eea8657703.zip tcl-29582a79b732b0de9a0983adf5b6d1eea8657703.tar.gz tcl-29582a79b732b0de9a0983adf5b6d1eea8657703.tar.bz2 |
* generic/tclExecute.c (INST_EXPON): Corrected crash on
[expr 2**(1<<63)]. Was operating on cleared bignum Tcl_Obj.
-rw-r--r-- | ChangeLog | 5 | ||||
-rw-r--r-- | generic/tclExecute.c | 7 |
2 files changed, 11 insertions, 1 deletions
@@ -1,3 +1,8 @@ +2006-11-17 Don Porter <dgp@users.sourceforge.net> + + * 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 <dkf@users.sf.net> * 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; } |