lists.openwall.net   lists  /  announce  owl-users  owl-dev  john-users  john-dev  passwdqc-users  yescrypt  popa3d-users  /  oss-security  kernel-hardening  musl  sabotage  tlsify  passwords  /  crypt-dev  xvendor  /  Bugtraq  Full-Disclosure  linux-kernel  linux-netdev  linux-ext4  linux-hardening  linux-cve-announce  PHC 
Open Source and information security mailing list archives
 
Hash Suite: Windows password security audit tool. GUI, reports in PDF.
[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Date: Wed, 17 Jan 2007 13:39:26 -0500
From: Valdis.Kletnieks@...edu
To: Marcus Graf <m.graf@...plogistics.de>
Cc: full-disclosure@...ts.grok.org.uk
Subject: Re: Major gcc 4.1.1 and up security issue

On Wed, 17 Jan 2007 19:07:19 +0100, Marcus Graf said:
> off topic thoughts:
> 
> > (twice 1.15 will likely be a bit or two different than 3.30).  As Fortran
> > geeks have known for over half a century, a better way to code this is:
> > 
> > 	if (abs(a-b) < n*epsilon*a)
> > 
> > where 'epsilon' is the hardware constant defining the smallest number such
> > that 1+a is different from 1, and 'n' controls how many significant digits
> > we require in the test.

> Hm...
> 
> assume a = b = -1.0
> 
> abs(a-b) is zero or maybe a little bit above
> n*epsilon*a is negative (n>0, epsilon>0, a=-1)
> 
> Test fails :-(
>

D'Oh!  n*epsilon*(abs(a)).  :)   (And I *don't* want to hear from the propeller
beany crowd that points out that (1+epsilon)*a isn't *exactly* the smallest
floating point distinguishable from a.  :)

Content of type "application/pgp-signature" skipped

_______________________________________________
Full-Disclosure - We believe in it.
Charter: http://lists.grok.org.uk/full-disclosure-charter.html
Hosted and sponsored by Secunia - http://secunia.com/

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ