aboutsummaryrefslogtreecommitdiff
path: root/regtest.tcl
AgeCommit message (Collapse)AuthorFilesLines
2017-08-07expr: Fix refcount issue converting invalid booleanSteve Bennett1-0/+5
Reported-by: Ryan Whitworth <me@ryanwhitworth.com> Signed-off-by: Steve Bennett <steveb@workware.net.au>
2017-08-07expr: Check for missing operand to operatorSteve Bennett1-0/+5
Reported-by: Ryan Whitworth <me@ryanwhitworth.com> Signed-off-by: Steve Bennett <steveb@workware.net.au>
2017-05-26format: validate too long precisionSteve Bennett1-0/+5
Reported-by: Ryan Whitworth <me@ryanwhitworth.com> Signed-off-by: Steve Bennett <steveb@workware.net.au>
2017-05-26scan: validate -ve XPG3 specifierSteve Bennett1-0/+5
Reported-by: Ryan Whitworth <me@ryanwhitworth.com> Signed-off-by: Steve Bennett <steveb@workware.net.au>
2017-05-23expr: Replace expression engineSteve Bennett1-0/+5
Rework the expression engine to use recursive descent evaluation rather than a shunting yard algorithm. Among other things, it is easier to make lazy operators and the ternary operator work correctly. In particular, the following expression no longer crashes: $(99?9,99?9:*9:999)?9) And the code is now smaller. Signed-off-by: Steve Bennett <steveb@workware.net.au>
2017-05-12scan: Ensure format is converted to string formSteve Bennett1-0/+5
Must have a stringrep before parsing. Reported-by: Ryan Whitworth <me@ryanwhitworth.com> Signed-off-by: Steve Bennett <steveb@workware.net.au>
2017-05-12regexp: Fix bad memory access on missing close braceSteve Bennett1-0/+5
For counted repetitions Reported-by: Ryan Whitworth <me@ryanwhitworth.com> Signed-off-by: Steve Bennett <steveb@workware.net.au>
2017-05-12lsort -unique: Fix case with no duplicatesSteve Bennett1-0/+5
In this case the final element was written a second time. Reported-by: Ryan Whitworth <me@ryanwhitworth.com> Signed-off-by: Steve Bennett <steveb@workware.net.au>
2017-05-12format: Validate too many flags in format stringSteve Bennett1-0/+5
Avoid a stack overflow Reported-by: Ryan Whitworth <me@ryanwhitworth.com> Signed-off-by: Steve Bennett <steveb@workware.net.au>
2017-05-12exec: Fix check for | and |&Steve Bennett1-0/+5
These are only allowed as separate args. One check was allowing them as a prefix which could lead to an invalid memory access Reported-by: Ryan Whitworth <me@ryanwhitworth.com> Signed-off-by: Steve Bennett <steveb@workware.net.au>
2017-05-12scan: error on missing conversion charSteve Bennett1-0/+5
Don't read invalid memory Reported-by: Ryan Whitworth <me@ryanwhitworth.com> Signed-off-by: Steve Bennett <steveb@workware.net.au>
2017-05-12jim: Fix ref count problem with interpolated dict substSteve Bennett1-0/+1
When duplicating interpolated object type, need to increment ref count of the key to offset the decrement during free. Also remove type-specific dup for dict-substitution which is not needed since it does nothing different from the default dup. Reported-by: Ryan Whitworth <me@ryanwhitworth.com> Signed-off-by: Steve Bennett <steveb@workware.net.au>
2017-05-12lsort: Fix a refcount issueSteve Bennett1-0/+6
Only duplicate a shared object Reported-by: Ryan Whitworth <me@ryanwhitworth.com> Signed-off-by: Steve Bennett <steveb@workware.net.au>
2017-04-07expr: Add better checks for invalid ternary expressionSteve Bennett1-0/+5
Reported-by: Ryan Whitworth <me@ryanwhitworth.com> Signed-off-by: Steve Bennett <steveb@workware.net.au>
2017-04-07Fix ref count for interpolation/expressionSteve Bennett1-0/+6
Ref count may be wrong when an expression is used in interpolation. Reported-by: Ryan Whitworth <me@ryanwhitworth.com> Signed-off-by: Steve Bennett <steveb@workware.net.au>
2017-04-07expr: fix crash on invalid ternary orderSteve Bennett1-0/+5
expr {1 : 2 ? 3} Reported-by: Ryan Whitworth <me@ryanwhitworth.com> Signed-off-by: Steve Bennett <steveb@workware.net.au>
2017-04-07Fix / command: divide by zeroSteve Bennett1-0/+5
Avoid exception on integer divided by zero Reported-by: Ryan Whitworth <me@ryanwhitworth.com> Signed-off-by: Steve Bennett <steveb@workware.net.au>
2016-09-05Fix a crash due to cached local command resolutionSteve Bennett1-0/+15
When a 'local' command is deleted, the proc epoch needs to increase to ensure that subsequent lookups are re-resolved. Signed-off-by: Steve Bennett <steveb@workware.net.au>
2016-08-17Don't unconditionally define _GNU_SOURCESteve Bennett1-1/+7
Also, fix build if JIM_OPTIMIZATION is disabled Signed-off-by: Steve Bennett <steveb@workware.net.au>
2014-04-28aio: Fix conflict between onexception and writableSteve Bennett1-5/+5
onexecption was using the wrong location Signed-off-by: Steve Bennett <steveb@workware.net.au>
2014-04-28Add testSteve Bennett1-0/+8
2014-04-23array: avoid crash on unset variableSteve Bennett1-0/+5
Fix the case where the variable does not exist and a pattern is specified. Courtesy of coverity Signed-off-by: Steve Bennett <steveb@workware.net.au>
2014-01-18regtest: don't exit prematurely from test 32Steve Bennett1-1/+1
Signed-off-by: Steve Bennett <steveb@workware.net.au>
2014-01-03Add regression test for return -code evalSteve Bennett1-0/+9
Signed-off-by: Steve Bennett <steveb@workware.net.au>
2013-12-12Fix infinite loop with error in lsort -uniqueSteve Bennett1-0/+5
Reported-by: Sergei Gavrikov <sergei.gavrikov@gmail.com> Signed-off-by: Steve Bennett <steveb@workware.net.au>
2013-11-11Add titles to recent regression testsSteve Bennett1-0/+5
Reported-by: Sergei Gavrikov <sergei.gavrikov@gmail.com> Signed-off-by: Steve Bennett <steveb@workware.net.au>
2013-11-06Fix [string tolower] buffer overflow for non-utf8Steve Bennett1-0/+4
Reported-by: Andy <jimdevel@hummypkg.org.uk> Signed-off-by: Steve Bennett <steveb@workware.net.au>
2012-03-13Fix a reference counting bugSteve Bennett1-0/+6
Ensure that the internal rep of interp->emptyObj is never changed to a script, since scripts use emptyObj as the source filename when no source info is available. Instead use a special nullScriptObj for this purpose. Signed-off-by: Steve Bennett <steveb@workware.net.au>
2011-12-16Fix bug when calling ref finalizersSteve Bennett1-0/+8
Commit 21d7fc318 introduced a bug where the finalizer was freed too early Signed-off-by: Steve Bennett <steveb@workware.net.au>
2011-12-02Prevent infinite recursion for eval, aliasSteve Bennett1-0/+18
Signed-off-by: Steve Bennett <steveb@workware.net.au>
2011-11-18Don't allow upvar to a higher levelSteve Bennett1-0/+13
i.e. upvar of a global var to a proc var Signed-off-by: Steve Bennett <steveb@workware.net.au>
2011-11-18Improvements to variable caching and resolutionSteve Bennett1-0/+12
Cache the correct callframe id for ::global vars Move variable creation out into JimCreateVariable() Fix some cases of upvar/global with ::global vars Signed-off-by: Steve Bennett <steveb@workware.net.au>
2011-07-27Fix object leak in regexp/regsubSteve Bennett1-0/+10
During internal rep change to regex Signed-off-by: Steve Bennett <steveb@workware.net.au>
2011-07-07Use clock instead of open for loadable module bugSteve Bennett1-3/+4
Signed-off-by: Steve Bennett <steveb@workware.net.au>
2011-06-21Fix crash on dup of object with script repSteve Bennett1-0/+7
Signed-off-by: Steve Bennett <steveb@workware.net.au>
2011-05-26Fix an infinite loop in substSteve Bennett1-0/+5
If a null byte is encountered Signed-off-by: Steve Bennett <steveb@workware.net.au>
2011-05-26Fix crash with: global ::nameSteve Bennett1-0/+6
Signed-off-by: Steve Bennett <steveb@workware.net.au>
2011-05-25Fix a crash when evaluating an invalid expressionSteve Bennett1-0/+7
expr {5 ne ::} Signed-off-by: Steve Bennett <steveb@workware.net.au>
2011-04-12Fix [for] crash if loop var is unsetSteve Bennett1-0/+7
Signed-off-by: Steve Bennett <steveb@workware.net.au>
2010-11-26Bug fix: crash parsing invalid dict sugarSteve Bennett1-0/+5
Signed-off-by: Steve Bennett <steveb@workware.net.au>
2010-10-15Fix bug when renaming the current procSteve Bennett1-0/+5
Reference counting issues Also don't allow rename to an existing command (Tcl compatible) Signed-off-by: Steve Bennett <steveb@workware.net.au>
2010-10-15Fix reference counting of stack trace in 'error'Steve Bennett1-0/+8
Signed-off-by: Steve Bennett <steveb@workware.net.au>
2010-10-15Fix crash on expand of empty argSteve Bennett1-0/+6
Found by the clang static analyser Signed-off-by: Steve Bennett <steveb@workware.net.au>
2010-10-15Fix a crash during list parsingSteve Bennett1-0/+6
If the list ended in a trailing newline Signed-off-by: Steve Bennett <steveb@workware.net.au>
2010-10-15It was possible to create a bad refSteve Bennett1-0/+6
Need to fix invalid chars in the tag name Signed-off-by: Steve Bennett <steveb@workware.net.au>
2010-10-15Reference count commandsSteve Bennett1-0/+6
So that commands are not deleted while executing Add a regression test for this case Signed-off-by: Steve Bennett <steveb@workware.net.au>
2010-10-15Implement unix domain sockets for socketSteve Bennett1-1/+1
*: aio.socket now supports unix and unix.server *: Also, rename aio.open as open and aio.socket as socket
2008-11-052008-11-05 Steve Bennett <steveb@workware.net.au>oharboe1-0/+23
* jim.c: fix lazy expression evaluation with unary not
2005-03-08Applied patch about unset a(x) against non existing 'a' variableantirez1-0/+10
(Clemens Hintze). Dictionary handling code and error messages modified a bit (me).
2005-03-06A specializing version of [for] that appears able to match theantirez1-0/+5
performaces of Tcl8.4 for the specialized forms. The implementation is a bit complex so may contain bugs... to handle with care. Also a [for] bug about [continue] was fixed and the regression test added.