Thread (12 messages) 12 messages, 5 authors, 2020-08-24

Re: Re:Re: [PATCH] powerpc: Fix a bug in __div64_32 if divisor is zero

From: Segher Boessenkool <hidden>
Date: 2020-08-23 00:11:56
Also in: lkml, stable

On Sun, Aug 23, 2020 at 12:54:33AM +0800, Guohua Zhong wrote:
Yet, I have noticed that there is no checking of 'base' in these functions.
But I am not sure how to check is better.As we know that the result is 
undefined when divisor is zero. It maybe good to print error and dump stack.
 Let the process to know that the divisor is zero by sending SIGFPE. 
That is now what the PowerPC integer divide insns do: they just leave
the result undefined (and they can set the overflow flag then, but no
one uses that).


Segher
Keyboard shortcuts
hback out one level
jnext message in thread
kprevious message in thread
ldrill in
Escclose help / fold thread tree
?toggle this help