0 Replies Latest reply on Jan 16, 2012 8:29 AM by 911249

    getting core dump when using EXEC SQL CLOSE

      In my pro*c program , i have used a cursor to fetch the set of accounts.Once cursor is opened , code will perform set

      of operation using fetched data and then cursor is closed. Between open and closing of cursor , i have used 23 EXEC

      SQL CLOSE. For example i am copying the value of a to b using strlcpy between fetch and close cursor statement.If

      returned value from strlcpy is greater than size of destination variable, then flow should not proceed , in that case I will

      close the cursor using EXEC SQL CLOSE and return the flow to calling program. Similarly i have closed the cursor at

      another 22 locations.

      When i compile the code and run binary the core dump occurs. On analyzing the core it shows

      t@null (l@8) terminated by signal SEGV (no mapping at the fault address)
      0xffffffffffffffff: <bad address 0xffffffffffffffff>
      dbx: core file read error: address 0xfc4ffe48 not in data space
      Current function is dbMtBaseClass::Pswd_Change
      7860 sqlcxt(&_dbMtCtx, &sqlctx, &sqlstm, &sqlfpn);

      if I remove any of the three EXEC SQL CLOSE commands , core dump does not occurs.

      It looks strange.Please help me to resolve the issue.