firebird icon indicating copy to clipboard operation
firebird copied to clipboard

Message "Missing arg #1 - possibly status vector overflow" appears in trivial example with ES/EDS

Open pavel-zotov opened this issue 4 months ago • 0 comments

Consoder following script:

set bail ON;
shell if exist r:\temp\tmp4test.fdb del r:\temp\tmp4test.fdb;
create database 'localhost:r:\temp\tmp4test.fdb' user 'sysdba' password 'masterkey';

create exception exc_test '... foo ...';

set term ^;
create or alter procedure sp_test as
begin
    exception exc_test '### bar ###';

 /****************
when any do
    begin
        exception;
    end
-- ***************/

end
^

create or alter procedure sp_caller as
begin
     execute statement ( 'execute procedure sp_test' )
        -- on external 'localhost:' || rdb$get_context('SYSTEM', 'DB_NAME') as user 'SYSDBA' password 'masterkey'
     ;
end
^
set term ;^
commit;

execute procedure sp_caller;

Its output will be:

Statement failed, SQLSTATE = HY000
exception 1
-"PUBLIC"."EXC_TEST"
-### bar ###
-At procedure "PUBLIC"."SP_TEST" line: 3, col: 5
-At procedure "PUBLIC"."SP_CALLER" line: 3, col: 6

(expected).

Now uncomment:

  1. when any block in sp_test and
  2. on external in sp_caller

Output will be:

Statement failed, SQLSTATE = 42000
Execute statement error at isc_dsql_execute2 :
335544517 : exception 1
335544382 : "PUBLIC"."EXC_TEST"
335544382 : ### bar ###
335544842 : At procedure "PUBLIC"."SP_TEST" line: 3, col: 5
335544842 : <Missing arg #1 - possibly status vector overflow>
Statement : execute procedure sp_test
Data source : Firebird::localhost:R:\TEMP\TMP4TEST.FDB
-At procedure "PUBLIC"."SP_CALLER" line: 3, col: 6

(checked on 3.x ... 6.x; of course, all was done in ISQL rather than from IBE or Flamerobin etc)

I've discussed this Q (about 335544842 : <Missing arg #1 ... >) privately with FB-team at Nov-2020 (subj: Message "<Missing arg #1 - possibly status vector overflow>." in error stack, only in IBE ...)

Vlad has told me that ES/EDS mechanism uses old ISC API which has limited array with length = 20 to store status vector (17-nov-2020 12:34 +0300).

But how this array could be 'overflowed' in example above with only one call from 'outer' to 'inner' SP ?

pavel-zotov avatar Aug 06 '25 18:08 pavel-zotov