Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

function with different value for arguments crashes mserver #2708

Closed
monetdb-team opened this issue Nov 30, 2020 · 0 comments
Closed

function with different value for arguments crashes mserver #2708

monetdb-team opened this issue Nov 30, 2020 · 0 comments
Labels

Comments

@monetdb-team
Copy link

@monetdb-team monetdb-team commented Nov 30, 2020

Date: 2010-10-26 21:02:23 +0200
From: @romulogoncalves
To: SQL devs <>
Version: 2.40.1 (Oct2010) [obsolete]
CC: @njnes

Last updated: 2011-03-28 17:31:22 +0200

Comment 15113

Date: 2010-10-26 21:02:23 +0200
From: @romulogoncalves

User-Agent: Mozilla/5.0 (X11; U; Linux x86_64; en-GB; rv:1.9.1.12) Gecko/20100907 Fedora/3.5.12-1.fc12 Firefox/3.5.12
Build Identifier:

the following sql code crashes mserver:

create function f2(pra double, pdec double)
returns Table (objID bigint, distance double)
begin
return TABLE(select 50,60.0);
end;

SELECT distance FROM f2(161.68835,-0.3138) n;
SELECT distance FROM f2(293.07867,-4) n;

DROP ALL FUNCTION f2;

Reproducible: Always

Steps to Reproduce:

1.see the "details"
2.
3.

Actual Results:

crash

Expected Results:

% .n table_name
% distance name
% double type
% 22 length
[ 60 ]
% .n table_name
% distance name
% double type
% 22 length
[ 60 ]

mserver5: /ufs/goncalve/MonetDB/current/sql/src/server/sql_atom.c:675: atom_cast: Assertion `(lng) ((sht) (-32767 - 1)) <= (lng) a->data.val.shval * mul && (lng) a->data.val.shval * mul <= (lng) ((sht) 32767)' failed.

Program received signal SIGABRT, Aborted.
[Switching to Thread 0x7fffdf793710 (LWP 20268)]
0x000000399e8326c5 in raise () from /lib64/libc.so.6
(gdb) bt
0 0x000000399e8326c5 in raise () from /lib64/libc.so.6
1 0x000000399e833ea5 in abort () from /lib64/libc.so.6
2 0x000000399e82b7b5 in __assert_fail () from /lib64/libc.so.6
3 0x00007fffdfe22e1f in atom_cast (a=0x7fffd0414568, tp=0x7fffd0008060)
at /ufs/goncalve/MonetDB/current/sql/src/server/sql_atom.c:675
4 0x00007fffdfe0aeea in SQLexecutePrepared (c=0x605b78, be=0x7fffd04067d8, q=0x7fffd04220d8)
at /ufs/goncalve/MonetDB/current/sql/src/backends/monet5/sql_scenario.mx:1449
5 0x00007fffdfe0b275 in SQLengineIntern (c=0x605b78, be=0x7fffd04067d8)
at /ufs/goncalve/MonetDB/current/sql/src/backends/monet5/sql_scenario.mx:1517
6 0x00007fffdfe0b7b0 in SQLengine (c=0x605b78)
at /ufs/goncalve/MonetDB/current/sql/src/backends/monet5/sql_scenario.mx:1627
7 0x00007ffff7d2337e in runPhase (c=0x605b78, phase=4)
at /ufs/goncalve/MonetDB/current/MonetDB5/src/mal/mal_scenario.mx:604
8 0x00007ffff7d23555 in runScenarioBody (c=0x605b78)
at /ufs/goncalve/MonetDB/current/MonetDB5/src/mal/mal_scenario.mx:655
9 0x00007ffff7d2373d in runScenario (c=0x605b78)
at /ufs/goncalve/MonetDB/current/MonetDB5/src/mal/mal_scenario.mx:682
10 0x00007ffff7cd0167 in MSserveClient (dummy=0x605b78)
at /ufs/goncalve/MonetDB/current/MonetDB5/src/mal/mal_session.mx:480
11 0x000000399f406a3a in start_thread () from /lib64/libpthread.so.0
12 0x000000399e8de77d in clone () from /lib64/libc.so.6
13 0x0000000000000000 in ?? ()
(gdb)

Comment 15240

Date: 2010-12-01 23:16:57 +0100
From: @njnes

doesn't crash anymore. Could you add the test?

Comment 15613

Date: 2011-03-28 17:31:22 +0200
From: @sjoerdmullender

The Mar2011 version has been released.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Linked pull requests

Successfully merging a pull request may close this issue.

None yet
1 participant