HomeFreeBSD

mail: add volatile in grabh()

Description

mail: add volatile in grabh()

setjmp() requires that any stack variables modified between the setjmp
call and the longjmp() must be volatile. This means that 'saveint' in
grabh() must be volatile, since it's modified after the setjmp().
Otherwise, the signal handler is not properly restored, resulting in a
crash (SIGBUS) if ^C is typed twice while composing.

PR: 276119
Reported by: Christopher Davidson <christopher.davidson@gmail.com>
MFC after: 2 weeks
Pull Request: https://github.com/freebsd/freebsd-src/pull/993

(cherry picked from commit 6c951b37170f1fb2ae8b4827070743e61b6eaed2)

Details

Provenance
lexi_le-fay.orgAuthored on Jan 4 2024, 10:34 PM
markjCommitted on Jan 19 2024, 2:25 PM
Parents
rG6a75d3b3fbe4: x86: Adjust base addr for PCI MCFG regions
Branches
Unknown
Tags
Unknown