BUG #2827: AV occurs to libpq with newer versions of wine - Mailing list pgsql-bugs

From CN Liou
Subject BUG #2827: AV occurs to libpq with newer versions of wine
Date
Msg-id 200612150436.kBF4aOXk009781@wwwmaster.postgresql.org
Whole thread Raw
List pgsql-bugs
The following bug has been logged online:

Bug reference:      2827
Logged by:          CN Liou
Email address:      cnliou9@fastmail.fm
PostgreSQL version: 8.2
Operating system:   libwine
Description:        AV occurs to libpq with newer versions of wine
Details:

libpq.dll works fine under libwine (http://www.winehq.org) (old) version
20040914.

Access Violation happens in fe-connect.c with newer versions of wine
(0.9.27). libpq in old wine enters case

case CONNECTION_AWAITING_RESPONSE

and then

case CONNECTION_AUTH_OK

in switch(conn->status) in function

PostgresPollingStatusType PQconnectPoll(PGconn *conn)



Libpq in new wine enters case

case CONNECTION_NEEDED:
        while (conn->addr_cur != NULL)
        {
        struct addrinfo *addr_cur = conn->addr_cur;
/*
The following statments output nothing:

f=fopen("c:\\log.txt","a+"); fprintf(f,"%s","A\r\n"); fclose(f);
if(conn == NULL) fprintf(f,"%s","conn");fclose(f);
if(conn->addr_cur == NULL) fprintf(f,"%s","addr_cur");fclose(f);
if(addr_cur->ai_addr == NULL) fputs("addr_cur->ai_addr",f);fclose(f);
if(&conn->raddr.addr == NULL) fputs("conn->raddr.addr",f);fclose(f);
if(addr_cur->ai_addrlen == 0) fputs("addr_cur->ai_addrlen",f);fclose(f);
f=fopen("c:\\log.txt","a+");fputs("B\r\n",f);fclose(f);
*/

      /* Remember current address for possible error msg */
    memcpy(&conn->raddr.addr, addr_cur->ai_addr,
           addr_cur->ai_addrlen);
f=fopen("c:\\log.txt","a+");fputs("C\r\n",f);fclose(f);
    conn->raddr.salen = addr_cur->ai_addrlen;


and AV occurs at memcpy().

pgsql-bugs by date:

Previous
From: ""
Date:
Subject: BUG #2826: Segfault on prepared statement after changing column type
Next
From: Marek Wróbel
Date:
Subject: Re: execute incorect query and get data