Bugs item #2791356, was opened at 2009-05-13 21:19
Message generated for change (Comment added) made by mlkersten
You can respond by visiting: 
https://sourceforge.net/tracker/?func=detail&atid=482468&aid=2791356&group_id=56967

Please note that this message will contain a full copy of the comment thread,
including the initial issue submission, for this request,
not just the latest update.
Category: SQL/Core
Group: None
Status: Open
Resolution: Fixed
Priority: 4
Private: No
Submitted By: Stefan de Konink (skinkie)
Assigned to: Martin Kersten (mlkersten)
Summary: Floating point exception

Initial Comment:
create table test (bla1 int, bla2 int);
insert into test values (1,1);
select case when (bla1 - bla2) > 0 then 1/(bla1 - bla2) else 0 end from test;

Program received signal SIGFPE, Arithmetic exception.
[Switching to Thread 0x7fffe24f8950 (LWP 9926)]
0x00007fffe888c0cc in CMDcstDIVbat_int_int_int (ret=0x125dfc8, cst=0x125dfb8, 
l=0x125df68)
    at ../../../../src/modules/kernel/batcalc.mx:381
381                             *o = c @2 *p;

(gdb) bt
#0  0x00007fffe888c0cc in CMDcstDIVbat_int_int_int (ret=0x125dfc8, 
cst=0x125dfb8, l=0x125df68)
    at ../../../../src/modules/kernel/batcalc.mx:381
#1  0x00007ffff7d0bb9a in DFLOWstep (t=0x1290c90, fs=0x7fffe2cfb1c8) at 
../../../src/mal/mal_interpreter.mx:1672
#2  0x00007ffff7d1031b in runDFLOWworker (t=0x1290c90) at 
../../../src/mal/mal_interpreter.mx:877
#3  0x0000003c1a4073da in start_thread () from /lib64/libpthread.so.0
#4  0x0000003c19ce62bd in clone () from /lib64/libc.so.6

----------------------------------------------------------------------

>Comment By: Martin Kersten (mlkersten)
Date: 2009-08-12 08:30

Message:
Although the crash has been dealt with, there is still an outstanding issue
that this behavior is questionable, because the user can avoid the division
by zero using if-then constructs. This is not respected by the current code
generator, which leads to a runtime error where it should not. A solution
has to be found at the code generation level of SQL. So, it remains an open
bug with lower priority.

----------------------------------------------------------------------

Comment By: Martin Kersten (mlkersten)
Date: 2009-08-12 08:30

Message:
Although the crash has been dealt with, there is still an outstanding issue
that this behavior is questionable, because the user can avoid the division
by zero using if-then constructs. This is not respected by the current code
generator, which leads to a runtime error where it should not. A solution
has to be found at the code generation level of SQL. So, it remains an open
bug with lower priority.

----------------------------------------------------------------------

Comment By: Stefan Manegold (stmane)
Date: 2009-08-11 13:07

Message:
Added test in Aug2009 release branch as
sql/src/test/BugTracker-2009/Tests/Floating_point_exception.SF-2791356.*

Appears to work fine.


----------------------------------------------------------------------

Comment By: Martin Kersten (mlkersten)
Date: 2009-06-07 21:41

Message:
As mentioned, any further testing should come from the related bug report.

----------------------------------------------------------------------

Comment By: Stefan Manegold (stmane)
Date: 2009-06-07 19:25

Message:
Re-opened to remind us that we should add a test for this bug report
(or at least give a reason why none can / need to be added).


----------------------------------------------------------------------

Comment By: Martin Kersten (mlkersten)
Date: 2009-06-07 17:10

Message:
Added protective test in the code. Creates an exception without segfault.
For the remainder this error message relates to 2791361

----------------------------------------------------------------------

You can respond by visiting: 
https://sourceforge.net/tracker/?func=detail&atid=482468&aid=2791356&group_id=56967

------------------------------------------------------------------------------
Let Crystal Reports handle the reporting - Free Crystal Reports 2008 30-Day 
trial. Simplify your report design, integration and deployment - and focus on 
what you do best, core application coding. Discover what's new with 
Crystal Reports now.  http://p.sf.net/sfu/bobj-july
_______________________________________________
Monetdb-bugs mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/monetdb-bugs

Reply via email to