/[base]
ViewVC logotype

Revision 361646


Jump to revision: Previous Next
Author: jilles
Date: Sat May 30 13:39:56 2020 UTC (4 years, 1 month ago)
Changed paths: 4
Log Message:
MFC r361112,r361117: sh: Fix double INTON with vfork

The shell maintains a count of the number of times SIGINT processing has
been disabled via INTOFF, so SIGINT processing resumes when all disables
have enabled again (INTON).

If an error occurs in a vfork() child, the processing of the error enables
SIGINT processing again, and the INTON in vforkexecshell() causes the count
to become negative.

As a result, a later INTOFF may not actually disable SIGINT processing. This
might cause memory corruption if a SIGINT arrives at an inopportune time.

Note that various places such as errors in non-special builtins
unconditionally reset the count to 0, so the problem might still not always
be visible.

PR:		246497


Changed paths

Path Details
Directorystable/12/ modified , props changed
Directorystable/12/bin/sh/jobs.c modified , text changed
Directorystable/12/bin/sh/tests/execution/Makefile modified , text changed
Directorystable/12/bin/sh/tests/execution/unknown2.0
(Copied from head/bin/sh/tests/execution/unknown2.0, r361112)
added , props changed

  ViewVC Help
Powered by ViewVC 1.1.27