|
Posted by Sandy on 07/01/05 10:22
Hi,
I have some C++ code which does the following
retcode = SQLFreeStmt(hStmt,SQL_UNBIND);
retcode = SQLFreeStmt(hStmt,SQL_RESET_PARAMS);
retcode = SQLFreeStmt(hStmt,SQL_CLOSE);
But sometimes it cores in the third statement.
I tried using "SQLCloseCursor (hStmt)" in its place but it also core dumped
sometimes.
Following is the stack
signal SEGV (no mapping at the fault address) in
Or8Statement::setToAllocatedSte at 0xfd1be710
0xfd1be710: setToAllocatedState+0x0368: ld [%o0 + 0xc], %g2
SQLCloseCursor(0x3114d68, 0xffffffff, 0x2fb58d8, 0x4e3f24, 0x45c0b4, 0x2)
BaseStatement::SQLCloseCursor(0x303c8b0, 0xffffffff, 0x0, 0xc, 0x5c,
0xff1f1d14)
BaseStatement::resetToAllocated(0x303c8b0, 0x0, 0x0, 0x8, 0x8, 0x8)
Or8Statement::setToAllocatedState(0x303c8b0, 0x28, 0x8, 0x0, 0x0, 0x0)
The contents of hStmt were same in all three statements at the time of core.
Menas the hStmt handle was still valid because just before the third
statement i tried to get the cursor name from the handle, But then also it
cored after printing the cursor name properly.
I suspect that the data structure to which hStmt points is getting corrupt.
But i don't know how. can it be because of some corruption in my code. I
also tried to move the location on hStmt in my object (as its a member
variable, So it will change its offset inside the object) but then also it
cored at same place.
Any help is greatly appreciated.
Navigation:
[Reply to this message]
|