[PATCH] Replace deliberate division by zero with raise(SIGFPE).
Xi Wang
xi.wang at gmail.com
Fri Jul 27 01:13:47 CEST 2012
On Jul 26, 2012, at 7:46 PM, Werner Koch wrote:
> On Sat, 14 Jul 2012 23:39, xi.wang at gmail.com said:
>
>> 1) Division by zero doesn't "provoke a signal" on architectures
>> like PowerPC.
>
> The code dates back to 1997. I checked what GMP tehse days does and
> this is what we should do in libgcrypt too:
>
> 1. Call a function to handle case.
> 2. Do a divide by zero in this function.
> 3. If we are still alive abort or rais a signal.
Yeah I can make a separate function to handle the case.
JOOC, why still a division by zero in addition to raise?
- xi
More information about the Gcrypt-devel
mailing list