Home | History | Annotate | Download | only in sh
History log of /src/bin/sh/nodes.c.pat
RevisionDateAuthorComments
 1.14  22-Jun-2018  kre branches: 1.14.2;
Deal with ref after free found by ASAN when a function redefines
itself, or some other function which is still active.
This was a long known bug (fixed ages ago in the FreeBSD sh) which
hadn't been fixed as in practice, the situation that causes the
problem simply doesn't arise .. ASAN found it in the sh dotcmd
tests which do have this odd "feature" in the way they are written
(but where it never caused a problem, as the tests are so simple
that no mem is ever allocated between when the old version of the
function was deleted, and when it finished executing, so its code
all remained intact, despite having been freed.)

The fix is taken from the FreeBSD sh.

XXX -- pullup-8 (after a while to ensure no other problems arise).
 1.13  20-Mar-2012  matt branches: 1.13.26; 1.13.32;
Use C89 function definitions
 1.12  15-Jun-2004  dsl branches: 1.12.48;
Change '\0' to 0 so that the SVR4 'echo' doesn't convert it to a null byte.
Fixes bin/25938
 1.11  07-Aug-2003  agc Move UCB-licensed code from 4-clause to 3-clause licence.

Patches provided by Joel Baker in PR 22249, verified by myself.
 1.10  24-Nov-2002  christos Fixes from David Laight:
- ansification
- format of output of jobs command (etc)
- job identiers %+, %- etc
- $? and $(...)
- correct quoting of output of set, export -p and readonly -p
- differentiation between nornal and 'posix special' builtins
- correct behaviour (posix) for errors on builtins and special builtins
- builtin printf and kill
- set -o debug (if compiled with DEBUG)
- cd src obj (as ksh - too useful to do without)
- unset -e name, remove non-readonly variable from export list.
(so I could unset -e PS1 before running the test shell...)
 1.9  04-Oct-2002  christos Rename ALIGN to SHELL_ALIGN and simplify macro so that it does not have side
effects, and add double to it, so that it aligns doubles correctly too. This
is just a workaround to fix the sparc64 problem where ALIGN() is now defined
in some include file to be 16 instead of 8. Thanks to martin for debugging this.
 1.8  11-Apr-1997  christos Pointer arithmetic on void * is illegal but gcc does not care.
 1.7  11-May-1995  christos Merge in my changes from vangogh, and fix the x=`false`; echo $? == 0
bug.
 1.6  21-Mar-1995  cgd convert to new RCS id conventions.
 1.5  11-Jun-1994  mycroft Add RCS ids.
 1.4  11-May-1994  jtc sync with 4.4lite
 1.3  23-Mar-1993  cgd changed "Id" to "Header" for rcsids
 1.2  22-Mar-1993  cgd added rcs ids to all files
 1.1  21-Mar-1993  cgd branches: 1.1.1;
Initial revision
 1.1.1.2  11-May-1994  jtc 44lite code
 1.1.1.1  21-Mar-1993  cgd initial import of 386bsd-0.1 sources
 1.12.48.1  17-Apr-2012  yamt sync with head
 1.13.32.1  25-Jun-2018  pgoyette Sync with HEAD
 1.13.26.1  13-Jul-2018  martin Pull up following revision(s) (requested by kre in ticket #906):

bin/sh/eval.c: revision 1.155
bin/sh/mknodes.sh: revision 1.3
bin/sh/nodes.c.pat: revision 1.14
bin/sh/exec.h: revision 1.27
bin/sh/exec.c: revision 1.52

Deal with ref after free found by ASAN when a function redefines
itself, or some other function which is still active.

This was a long known bug (fixed ages ago in the FreeBSD sh) which
hadn't been fixed as in practice, the situation that causes the
problem simply doesn't arise .. ASAN found it in the sh dotcmd
tests which do have this odd "feature" in the way they are written
(but where it never caused a problem, as the tests are so simple
that no mem is ever allocated between when the old version of the
function was deleted, and when it finished executing, so its code
all remained intact, despite having been freed.)

The fix is taken from the FreeBSD sh.

XXX -- pullup-8 (after a while to ensure no other problems arise).
 1.14.2.2  21-Apr-2020  martin Ooops, restore accidently removed files from merge mishap
 1.14.2.1  21-Apr-2020  martin Sync with HEAD

RSS XML Feed