Floating point exceptions with -pthread

Marc Olzheim marcolz at stack.nl
Wed May 4 16:22:38 PDT 2005


On Wed, May 04, 2005 at 07:07:48PM -0400, Daniel Eischen wrote:
> > Question remains why the truncf() doesn't trigger it and the ceilf() and
> > floorf() does.

I just checked all files in /usr/src/lib/msun/i387/.
The following functions are the only ones using stackspace in the i387
dir, the rest just uses the arguments directly:

ceil*(), floor*(), {,l}lrint*(), trunc*().

Of those, only the ceilf(),floorf() and truncf() used more than %esp was
lowered.

> > And why it only triggers with threads (even a single thread is enough).
> 
> For the latter, the threads library may place a stackframe on
> top of the swapped-out thread's stack.  Without threads, or
> even with libthr, the thread's stack doesn't get used by
> anything else.

Ah, that explains.

Thanks a lot, Daniel and David, for your help and time today!

Marc
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: application/pgp-signature
Size: 187 bytes
Desc: not available
Url : http://lists.freebsd.org/pipermail/freebsd-threads/attachments/20050505/aff945b5/attachment.bin


More information about the freebsd-threads mailing list