Mikael Magnusson
0209635832
34490: Fix leak on print -zf/-sf error
2015-02-10 13:03:51 +01:00
Mikael Magnusson
2dbbc88d0b
34488: Fix use-after-free for print -zf and print -sf
2015-02-10 13:03:49 +01:00
Peter Stephenson
da86d6b4f2
34485: More rationalisation for anonymous functions.
...
Don't attempt to treat as "simple" case as there are too many
hidden problems.
Pull out some post-execution functions to a common case in
execcmd().
2015-02-09 16:39:29 +00:00
Mikael Magnusson
dfbb5e4853
34466: Fix double unmeta in rm verification
2015-02-09 05:13:34 +01:00
Jun-ichi Takimoto
1f62d8d0be
34451: use mmap() also on Mac OS X
...
Let MAP_ANONYMOUS be an alias to MAP_ANON if the former is not
defined.
2015-02-03 20:50:26 +09:00
Peter Stephenson
1a7473cbc1
34455: Further gdbm parameter fixes.
...
Fix memory leak with name of parameter.
Unset old parameter before opening db as it might close an existing
db.
2015-02-03 10:31:03 +00:00
Barton E. Schaefer
1254538a41
34447: fix assignment of key-value array to ztie'd parameter.
...
Add gdbmhashsetfn() for this purpose. Erases and reorganizes the database
before bulk assign.
2015-02-02 09:46:08 -08:00
Barton E. Schaefer
3ae6fb965f
34446: add "ztie -r" and "zuntie -u", update documentation
2015-02-01 14:01:53 -08:00
Peter Stephenson
ce211bb8d1
34439: unset variable about to be tied
2015-01-30 20:03:02 +00:00
Peter Stephenson
bc8491c3dc
34430: parameter fixes for gdbm tied hash.
...
Probably fix the issue with correct parameter hiding or not hiding.
A little extra safety checking.
Possibly fixed a memory leak with untying.
2015-01-29 21:05:17 +00:00
Barton E. Schaefer
5751de7975
34403: refine 34399 to avoid settyinfo() when the input descriptor is not a TTY
2015-01-26 18:48:25 -08:00
Mikael Magnusson
cae0be3af6
34387: Avoid loading the main zsh binary as a module
2015-01-27 00:18:47 +01:00
Mikael Magnusson
bac2bbd058
34382: Handle NULL return from dlerror() more gracefully
2015-01-27 00:17:23 +01:00
Peter Stephenson
5136628599
Unsetting gdbm tied variable basically works.
...
Allows variables in nested scope.
However, explicitly untying a variable doesn't properly expose
the scope above.
2015-01-26 18:10:39 +00:00
Barton E. Schaefer
494c251cb0
34399: fix polltty thinko from 34365
...
Also add missing ChangeLog entry for 34365.
2015-01-25 16:07:49 -08:00
Barton E. Schaefer
2546c86244
34389: fix parsing of ">!" when read from histfile with HIST_LEX_WORDS
2015-01-25 13:15:34 -08:00
Peter Stephenson
4688de1677
34365: History lockfile backoff: randomised time.
...
Time doubles on each lock failure.
zsleep() provides microsecond resolution for sleep; uses nanosleep() if
available, else select via means of existing tty poll function.
2015-01-25 20:29:18 +00:00
Barton E. Schaefer
2fa11b7c54
34350, 34353: document zsh/db/gdbm module, clean up a few things in the code
...
Still core dumps at this revision if the tied parameter is forced to be a local and is not untied before end of scope.
2015-01-25 11:34:26 -08:00
Daniel Shahaf
f7a2fba534
34369: document error and warning codes
2015-01-25 18:08:29 +00:00
Peter Stephenson
ccd3663d4e
34383: ztrdup() should be dupstring() in new cd code
2015-01-25 18:03:20 +00:00
Peter Stephenson
12b813b589
34331: better handling of NULL in cd.
...
Problem was return from symbolic link expander in weird cases
where there file system isn't behaving itself properly.
2015-01-22 20:20:15 +00:00
Peter Stephenson
0e3548994e
34329: add -S option to which and where
2015-01-20 17:31:28 +00:00
Peter Stephenson
e6d9642467
users/19751: remove error on failure to close file descriptor by number.
...
Keep it when closing file descriptor stored in a variable, i.e.
explicitly opened by the user.
2015-01-20 09:29:22 +00:00
Peter Stephenson
c6c9f5daf2
34322: bug with interface to parsestr() etc.
...
Was showing up in places like ${(e)...} where command substitution
could reallocate the token string, but actually there was never any
guarantee that the lexer wouldn't do that, so this was always
a bit iffy.
2015-01-18 22:38:57 +00:00
Peter Stephenson
e34ce85151
34319: fix alias expansion in history for command substitution
2015-01-18 16:43:26 +00:00
Peter Stephenson
aa503b592b
unposted: another dubious comment in hist.c fixed
2015-01-16 20:35:41 +00:00
Peter Stephenson
0f60d18249
unposted: improve comment on hist_in_word().
...
Commit f2a2f28f7 was a bit less clear about how hist_in_word()
was used than it could be.
2015-01-16 20:31:11 +00:00
Peter Stephenson
f2a2f28f7b
32413: turn off history word marking in cmd subst
2015-01-16 20:12:40 +00:00
Peter Stephenson
db05cc51fa
34304: improve use of new cmd subst in completion
2015-01-16 13:20:05 +00:00
Peter Stephenson
3a99ef322d
34280: more widespread use of FORCE_FLOAT.
...
Add the case of variables read for use in arithmetic expressions.
2015-01-15 13:52:40 +00:00
Peter Stephenson
c7aa644390
34287: preprocessor for signal name generation.
...
Some gcc header files are difficult for the signames2.awk
script to process, so if the preprocessor is gcc give the
option -P to strip out the unwanted additions.
2015-01-15 13:52:40 +00:00
Peter Stephenson
5f4325a0a4
Propagate float/integer type in arithmetic assignment.
...
Add test.
Mention this and also floating point mod change in README.
2015-01-12 16:38:00 +00:00
Barton E. Schaefer
39a6e8a7f5
34230: call fmod() for modulo with floats
2015-01-11 11:29:17 -08:00
Peter Stephenson
968dd7387c
34234: use structures for normal and raw lexical buffer state
2015-01-11 19:12:58 +00:00
Peter Stephenson
3b32abafdb
34220: new $(...) handling needs to back up over alias expansion
2015-01-10 20:28:57 +00:00
Peter Stephenson
81ad9ed766
unposted: update copyright for new Src/context.c
2015-01-10 19:55:48 +00:00
Barton E. Schaefer
3495dc5c27
34213: in previous patch, do not change usepm if it is already set
2015-01-10 10:32:31 -08:00
Barton E. Schaefer
daa788d88b
34212: do not change unset-ness of special parameters when exporting them
2015-01-10 10:32:31 -08:00
Mikael Magnusson
573679c34b
select: Fix leak of 256 bytes on every loop when zle is not used
...
Reproduce by
yes | head -n 1000000 | zsh -c 'select foo in a b c; do done; sleep 30; echo'
Found by Coverity (Issue 439082).
2015-01-10 08:48:18 +01:00
Mikael Magnusson
7dcaa2ff60
hist: remove wrong NULL terminator
...
This actually writes a NULL to some arbitrary location in the caller function's stack. Found by Coverity (Issue 1255746).
2015-01-10 08:48:18 +01:00
Peter Stephenson
cfd91eac07
Rearrange context saving.
...
Variables are now associated with the module that declares them, being
initialised and saved/restored there. However, as many variables are
used for communication between modules, many of them are set in multiple
places, so the assignment is ambiguous.
2015-01-09 21:33:39 +00:00
Mikael Magnusson
bc55ddf364
Fix a typo in bin_print error message
2015-01-09 12:37:25 +01:00
Peter Stephenson
c0d01a6fe0
Fix command substitutions to parse contents as they are read in.
...
Do this by refactoring misnamed lexsave()/lexrestore() to allow
continuity of history and input.
Add test.
2015-01-08 12:24:00 +00:00
Barton E. Schaefer
93846edb0d
34154/34155: reorder bin_print() to avoid leaking the output descriptor when incorrect/incompatible options were passed
2015-01-07 22:45:46 -08:00
Jun-ichi Takimoto
152b797596
34144: allocate origline by ztrdup(), not by dupstring()
...
If origline is allocated in heap, it will have been freed
when menuselect() is called directly as a widget.
2015-01-07 21:48:28 +09:00
Bart Schaefer
8fea30a571
34122: module: allow NULL third argument as intended
...
Found by Coverity.
2015-01-06 23:51:19 +01:00
Mikael Magnusson
4701b05cf7
34138: wcs_nicechar: only deref widthp if it was given
2015-01-06 23:51:18 +01:00
Mikael Magnusson
38dc59907b
34120: compctl, jobs: Check contents instead of array
...
text is an array in the struct, and can never be null.
Found by Coverity (Issue 1255780).
2015-01-06 23:51:01 +01:00
Mikael Magnusson
c425cc9632
34108: Don't leak ifs stuff
...
Found by Coverity (Issue 1255785).
2015-01-06 23:51:00 +01:00
Mikael Magnusson
6a5339fdd5
34107: getsubsargs: free ptr1 before returning
...
Found by Coverity (Issue 439073).
2015-01-06 23:51:00 +01:00