]> 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 19:00:40 +0000 (21:00 +0200)
commite3c5cf66371eff4f4bc686c337da2f2494734d01
tree5d1cce105185aa736f231101ae49a58dcde56e44
parent3cf4d4191d4d20508de9838c35ec4ad72a552457
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