Source-Changes archive

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

CVS commit: [netbsd-8] src/bin/sh



Module Name:    src
Committed By:   martin
Date:           Fri Jul 13 14:29:15 UTC 2018

Modified Files:
        src/bin/sh [netbsd-8]: eval.c exec.c exec.h mknodes.sh nodes.c.pat

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


To generate a diff of this commit:
cvs rdiff -u -r1.140.2.2 -r1.140.2.3 src/bin/sh/eval.c
cvs rdiff -u -r1.47.2.2 -r1.47.2.3 src/bin/sh/exec.c
cvs rdiff -u -r1.24.8.2 -r1.24.8.3 src/bin/sh/exec.h
cvs rdiff -u -r1.2 -r1.2.56.1 src/bin/sh/mknodes.sh
cvs rdiff -u -r1.13 -r1.13.26.1 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