(2014/07/21 19:43), Itnal, Prakash (NSN - IN/Bangalore) wrote:
> Hi,
>
> Recently we tested this with debug version of psql-odbc driver. Attached is the backtrace. Due security policies I
havedelete certain sections which are any way not relevant from backtrace.
>
> ODBC version: Latest ODBC code from trunk
> Postgres server version: 9.1
> Unix ODBC: 2.2.14
> Target Architecture: mips-64
> Scenario: Restart (server and client both running on same HW unit)
>
>
> Below is quick summary from backtrace:
>
> From backtrace:
> Thread 1 (LWP 7532):
> #0 0x000000555aec5d7c in memcpy () from /lib64/libc.so.6
> No symbol table info available.
> #1 0x000000559b99dd08 in copy_and_convert_field (stmt=0x559c076130, field_type=17, atttypmod=-1,
valuei=0x559c229c90,fCType=-2, precision=0, rgbValue=0x55a7fd7310, cbValueMax=1252, pcbValue=0x55a7fd7298,
pIndicator=0x55a7fd7298)at convert.c:1793
> .
> .
> ptr = 0x0
What's the value of len?
regards.
Hiroshi Inoue
> .
> .
>
>
> From code:
> 1788 if (cbValueMax > 0)
> 1789 {
> 1790 copy_len = (len > cbValueMax) ? cbValueMax : len;
> 1791
> 1792 /* Copy the data */
> 1793 memcpy(rgbValueBindRow, ptr, copy_len);
> 1794
> 1795 /* Adjust data_left for next time */
> 1796 if (stmt->current_col >= 0)
> 1797 pgdc->data_left -= copy_len;
> 1798 }
>
> Since the ptr is 0x0 (NULL), the memcpy is failed. We are not able to debug it fully since we are not fully competent
withpsqlODBC code base.
>
> It would be of great help if someone helps to resolve this!
>
> --
> Regards,
> Prakash I.