Re: [sqlite] SQLite and SIGFPE

2011-02-20 Thread Richard Hipp
On Sun, Feb 20, 2011 at 7:39 PM, Samuel Adam wrote: > [I]f SQLite can *guarantee* no SIGFPE *ever*—under any possible inputs, > period, bar none ... that should also be documented. > SQLite attempts to intercept division by 0.0, replacing the result with NULL, but otherwise trusts the C compiler

Re: [sqlite] SQLite and SIGFPE

2011-02-20 Thread Samuel Adam
On Sun, 20 Feb 2011 14:51:12 -0500, Nico Williams wrote: > On Sun, Feb 20, 2011 at 6:24 AM, Samuel Adam wrote: [big snip] >> Any numerics experts (which I am not) or fp-software gurus care to chime >> in? *If* I am correct in my inductive hypothesis that the SQLite core >> may >> in rare ci

Re: [sqlite] SQLite and SIGFPE

2011-02-20 Thread Nico Williams
On Sun, Feb 20, 2011 at 6:24 AM, Samuel Adam wrote: > I’m not writing anything multithreaded right now.  But next month or next > year, the humble little SQL user functions I now make could grow up and > get plugged into something bigger.  And before I longjmp(), I like to know > with certainty wh

Re: [sqlite] SQLite and SIGFPE

2011-02-20 Thread Samuel Adam
[In general reply to interesting answers by Messrs. Williams and Binns:] The potential SIGFPE in my case is optionally raised by a numeric library as part of its error-handling mechanism; its manual expressly suggests installing a signal handler and longjmp()ing back to find out what went wr

Re: [sqlite] SQLite and SIGFPE

2011-02-18 Thread Nico Williams
On Fri, Feb 18, 2011 at 9:32 PM, Roger Binns wrote: > On 02/18/2011 07:03 PM, Nico Williams wrote: >> BUT, because SIGFPE is a synchronous >> signal so you are on much firmer ground: you can't block it, > > Incidentally you can block it sometimes but the mechanism is very operating > system specif

Re: [sqlite] SQLite and SIGFPE

2011-02-18 Thread Roger Binns
-BEGIN PGP SIGNED MESSAGE- Hash: SHA1 On 02/18/2011 07:03 PM, Nico Williams wrote: > BUT, because SIGFPE is a synchronous > signal so you are on much firmer ground: you can't block it, Incidentally you can block it sometimes but the mechanism is very operating system specific. For exampl

Re: [sqlite] SQLite and SIGFPE

2011-02-18 Thread Nico Williams
If you know what you are doing, threads are fine. As you know, async signal handling and threading don't mix well, BUT, because SIGFPE is a synchronous signal so you are on much firmer ground: you can't block it, but since it is synchronous you can lexically determine where it might be generated a