Age | Commit message (Collapse) | Author | Files | Lines |
|
always include 'proc' even if introspection disabled
correctly set 'proc' at the eval frame level that is currently running
in the given proc. This makes it easier to produce an accurate level stacktrace
even across uplevel, etc.
Update stacktrace to use the new info frame.
Signed-off-by: Steve Bennett <steveb@workware.net.au>
|
|
This issue was caused by the fix in 24b234543c7322d2dd20339b45367fa3f4c53495
Because we used closed hashing for the dict hash table, it is important
that the table doesn't get too full, as it gets very inefficient due to
hash collisions. When allowing for space, also consider dummy entries that
consume slots. If there are too many dummy slots, the hash table is expanded,
clearing out the dummy slots.
Without this fix it is possible to get unlucky when filling a dictionary
and emptying it again (twice) will result all slots become dummy slots
and thus no more entries can be added.
See REGTEST 54
Signed-off-by: Steve Bennett <steveb@workware.net.au>
|
|
[string last foo bar -1] gave segfault due to missing
check for invalid index.
Fixes #161
Signed-off-by: Steve Bennett <steveb@workware.net.au>
|
|
Fixes #155
Signed-off-by: Steve Bennett <steveb@workware.net.au>
|
|
Reported-by: Ryan Whitworth <me@ryanwhitworth.com>
Signed-off-by: Steve Bennett <steveb@workware.net.au>
|
|
Reported-by: Ryan Whitworth <me@ryanwhitworth.com>
Signed-off-by: Steve Bennett <steveb@workware.net.au>
|
|
Reported-by: Ryan Whitworth <me@ryanwhitworth.com>
Signed-off-by: Steve Bennett <steveb@workware.net.au>
|
|
Reported-by: Ryan Whitworth <me@ryanwhitworth.com>
Signed-off-by: Steve Bennett <steveb@workware.net.au>
|
|
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>
|
|
Must have a stringrep before parsing.
Reported-by: Ryan Whitworth <me@ryanwhitworth.com>
Signed-off-by: Steve Bennett <steveb@workware.net.au>
|
|
For counted repetitions
Reported-by: Ryan Whitworth <me@ryanwhitworth.com>
Signed-off-by: Steve Bennett <steveb@workware.net.au>
|
|
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>
|
|
Avoid a stack overflow
Reported-by: Ryan Whitworth <me@ryanwhitworth.com>
Signed-off-by: Steve Bennett <steveb@workware.net.au>
|
|
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>
|
|
Don't read invalid memory
Reported-by: Ryan Whitworth <me@ryanwhitworth.com>
Signed-off-by: Steve Bennett <steveb@workware.net.au>
|
|
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>
|
|
Only duplicate a shared object
Reported-by: Ryan Whitworth <me@ryanwhitworth.com>
Signed-off-by: Steve Bennett <steveb@workware.net.au>
|
|
Reported-by: Ryan Whitworth <me@ryanwhitworth.com>
Signed-off-by: Steve Bennett <steveb@workware.net.au>
|
|
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>
|
|
expr {1 : 2 ? 3}
Reported-by: Ryan Whitworth <me@ryanwhitworth.com>
Signed-off-by: Steve Bennett <steveb@workware.net.au>
|
|
Avoid exception on integer divided by zero
Reported-by: Ryan Whitworth <me@ryanwhitworth.com>
Signed-off-by: Steve Bennett <steveb@workware.net.au>
|
|
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>
|
|
Also, fix build if JIM_OPTIMIZATION is disabled
Signed-off-by: Steve Bennett <steveb@workware.net.au>
|
|
onexecption was using the wrong location
Signed-off-by: Steve Bennett <steveb@workware.net.au>
|
|
|
|
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>
|
|
Signed-off-by: Steve Bennett <steveb@workware.net.au>
|
|
Signed-off-by: Steve Bennett <steveb@workware.net.au>
|
|
Reported-by: Sergei Gavrikov <sergei.gavrikov@gmail.com>
Signed-off-by: Steve Bennett <steveb@workware.net.au>
|
|
Reported-by: Sergei Gavrikov <sergei.gavrikov@gmail.com>
Signed-off-by: Steve Bennett <steveb@workware.net.au>
|
|
Reported-by: Andy <jimdevel@hummypkg.org.uk>
Signed-off-by: Steve Bennett <steveb@workware.net.au>
|
|
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>
|
|
Commit 21d7fc318 introduced a bug where the finalizer was freed too early
Signed-off-by: Steve Bennett <steveb@workware.net.au>
|
|
Signed-off-by: Steve Bennett <steveb@workware.net.au>
|
|
i.e. upvar of a global var to a proc var
Signed-off-by: Steve Bennett <steveb@workware.net.au>
|
|
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>
|
|
During internal rep change to regex
Signed-off-by: Steve Bennett <steveb@workware.net.au>
|
|
Signed-off-by: Steve Bennett <steveb@workware.net.au>
|
|
Signed-off-by: Steve Bennett <steveb@workware.net.au>
|
|
If a null byte is encountered
Signed-off-by: Steve Bennett <steveb@workware.net.au>
|
|
Signed-off-by: Steve Bennett <steveb@workware.net.au>
|
|
expr {5 ne ::}
Signed-off-by: Steve Bennett <steveb@workware.net.au>
|
|
Signed-off-by: Steve Bennett <steveb@workware.net.au>
|
|
Signed-off-by: Steve Bennett <steveb@workware.net.au>
|
|
Reference counting issues
Also don't allow rename to an existing command (Tcl compatible)
Signed-off-by: Steve Bennett <steveb@workware.net.au>
|
|
Signed-off-by: Steve Bennett <steveb@workware.net.au>
|
|
Found by the clang static analyser
Signed-off-by: Steve Bennett <steveb@workware.net.au>
|
|
If the list ended in a trailing newline
Signed-off-by: Steve Bennett <steveb@workware.net.au>
|
|
Need to fix invalid chars in the tag name
Signed-off-by: Steve Bennett <steveb@workware.net.au>
|
|
So that commands are not deleted while executing
Add a regression test for this case
Signed-off-by: Steve Bennett <steveb@workware.net.au>
|