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

Details

Provenance
lexi_le-fay.orgAuthored on Jan 4 2024, 10:34 PM
markjCommitted on Jan 5 2024, 2:40 AM
Parents
rG324fd7ec4043: libpfctl: introduce a handle-enabled variant of pfctl_add_rule()
Branches
Unknown
Tags
Unknown