]> git.ipfire.org Git - thirdparty/bird.git/commit
Fixed undefined behavior on signals.
authorMaria Matejka <mq@ucw.cz>
Fri, 4 Oct 2019 10:20:02 +0000 (12:20 +0200)
committerMaria Matejka <mq@jmq.cz>
Fri, 4 Oct 2019 18:52:07 +0000 (20:52 +0200)
commit24493e9169d3058958ab3ec4d2b02c5753954981
treec50c972dc4b0362ca77d9887ddc93a3372036653
parent4821251ebb13c05e8752f6f54b8e5ad6d87fecaa
Fixed undefined behavior on signals.

The C11 specification allows only sig_atomic_t and _Atomic variable
access. All other accesses to global variables are undefined behavior.

Using int was probably OK on x86 and x86_64; yet there were some reports
from other architectures (especially some MIPS) that in rare cases,
after issuing SIGHUP, BIRD did strange things.
sysdep/unix/io.c
sysdep/unix/main.c
sysdep/unix/unix.h
test/birdtest.c