This is the mail archive of the mailing list for the glibc project.

Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

Re: Is it possible to preserve flags for fetestexcept() inside signal handler

On Thu, Jun 7, 2012 at 3:55 PM, Ãngel GonzÃlez <> wrote:
> Maybe it's easier for you to provide a wrapper program which ptraces the
> process and gives the nice output instead of training your users.
> (I think such program could -on some unix- be a thread of your own
> process, but binaries are cheap anyway)

Well, we are just an extensible library that sometimes ends up with
NaN or denormals on our hands due to an error in the user's nonlinear
function evaluation. Because this is so common, we have a run-time
option to set up fp exceptions to help the user find their bugs. (Many
of our users are domain scientists rather than experienced
programmers. They also don't want to learn how to set up exceptions on
each platform themselves.)

An extra process is not a good solution because many of the
architectures we run on do not support spawning threads or forking
processes. Examples include IBM Blue Gene (which runs their own
Compute Node Kernel, not Linux) and Cray which runs a very stripped
down Linux kernel. (There is usually special support for something
ptrace-like, but you have to set the environment specially and it's
not always available to normal user code.)

Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]