diff options
author | 1998-05-13 19:49:25 +0000 | |
---|---|---|
committer | 1998-05-13 19:49:25 +0000 | |
commit | fa47d16ca409b014c8216f812e15e153cfdc482a (patch) | |
tree | 31ee5b0f64db928c672b9c6efd8cfeba0be6fa16 /lib/libc | |
parent | generate int errorcodes instead of long to match the new libcom_err (diff) | |
download | wireguard-openbsd-fa47d16ca409b014c8216f812e15e153cfdc482a.tar.xz wireguard-openbsd-fa47d16ca409b014c8216f812e15e153cfdc482a.zip |
making kernel, drinking LI tea and writing an opus magnum enspired
by the freebsd commit logs:
first of all i should state that we are the only os that uses pentium
counters in their microtime (freebsd, netbsd, etc checked).
the bug fixed derives from the fact that #UD (divide by zero)
is generated in two cases:
a) divide by zero;
b) divide overflow.
so, the later case was the one causing panics on reboot.
due to the divl insn design in the intel processors, the possible
sizes of operands and results are: 16/8=8,8; 32/16=16,16; 64/32=32,32.
the division will generate an #UD exception when the quotient
won't fit into result, that is 32bit in our case (64bit is divided on 32bit).
problem solved by normalizing the dividend by the divisor, so the quotient
would not result a divide overflow.
tested by: mickey, gene, mickey.
talked over: mickey, gene, marc, maillists, mickey.
Diffstat (limited to 'lib/libc')
0 files changed, 0 insertions, 0 deletions