Subject RE: Access violation in IB_Components


My simple test case. In this case the access violation error changed to "possibly status vector overflow". ;)

create exception testexception 'error';

create or alter procedure testprocedure
    dummy integer)
  exception testexception;

  IB_Connection1.Connected := TRUE;
  IB_Query1.SQL.Text := 'SELECT * FROM testprocedure';

On 32 bit : OK - 'error' error message

On 64 bit : NO - Project Project7.exe raised exception class EIB_ISCError with message '<Missing arg #1 - possibly status vector overflow>'.

On 32 bit after the fix : OK - 'error' error message
On 64 bit after the fix : OK - 'error' error message

---In, <supportlist@...> wrote:

I think it is possible that this is a needful change in IBO.
Will you please provide a simple sample app that allows me to test this for myself?
I would like to test your proposed fix against all versions of Firebird and InterBase, including all platform variations.
Thank you for your efforts in this area and for helping to bring this to light.

From: [] On Behalf Of ma_golyo@...
Sent: Friday, November 29, 2013 5:27 AM
Subject: [IBO] RE: Access violation in IB_Components

Looks like ISC_STATUS definitons is wrong in IB_Header.pas.

After changing from longint to NativeInt (and rebuild IBO) it works as expected.

---In, <ma_golyo@...> wrote:

Using databreakponts it looks like (in callstack) the Self is overwritten in fbclient.dll, after calling isc_dsql_execute2.

So it looks like isc_dsql_execute2 mapping or it's argument type mapping is somehow wrong in 64bit mode.

---In, <ma_golyo@...> wrote:


XE4 upd1
64Win7, 64bit debug
FB2.5.2.26540 (both client and server)

When an EXECUTE PROCEDURE call (TIBOStoredProc.ExecProc) throws an exception at database side (database exception call) then in the TIBOStoredProc Self pointer becomes nil after the

SysExecStatement ( ErrCode, Status );

call (IB_Components.pas, line 25299). Looks like some kind of buffer overflow problem.

Please fix it.

Thank you!