Source-Changes archive

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]

CVS commit: src/bin/sh



Module Name:    src
Committed By:   kre
Date:           Fri Jun 22 11:04:55 UTC 2018

Modified Files:
        src/bin/sh: eval.c exec.c exec.h mknodes.sh nodes.c.pat

Log Message:
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).


To generate a diff of this commit:
cvs rdiff -u -r1.154 -r1.155 src/bin/sh/eval.c
cvs rdiff -u -r1.51 -r1.52 src/bin/sh/exec.c
cvs rdiff -u -r1.26 -r1.27 src/bin/sh/exec.h
cvs rdiff -u -r1.2 -r1.3 src/bin/sh/mknodes.sh
cvs rdiff -u -r1.13 -r1.14 src/bin/sh/nodes.c.pat

Please note that diffs are not public domain; they are subject to the
copyright notices on the relevant files.




Home | Main Index | Thread Index | Old Index