[PATCH] Replace deliberate division by zero with raise(SIGFPE).

Werner Koch wk at gnupg.org
Thu Jul 26 13:46:17 CEST 2012


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.


Shalom-Salam,

   Werner

-- 
Die Gedanken sind frei.  Ausnahmen regelt ein Bundesgesetz.




More information about the Gcrypt-devel mailing list