From: noreply@pgfoundry.org
To: noreply@pgfoundry.org
Subject: [ psqlodbc-Bugs-1010945 ] uninitialised value in QR_Constructor
Date: Fri, 19 Nov 2010 13:40:39 +0000 (UTC)
Message-ID: <20101119134039.A93861071074@pgfoundry.org> (raw)
Bugs item #1010945, was opened at 2010-11-19 14:40
You can respond by visiting:
http://pgfoundry.org/tracker/?func=detail&atid=538&aid=1010945&group_id=1000125
Category: None
Group: None
Status: Open
Resolution: None
Priority: 3
Submitted By: Arno Moore (arno)
Assigned to: Nobody (None)
Summary: uninitialised value in QR_Constructor
Initial Comment:
psqlODBC version: 09.00.0200
The driver is compiled from source under Linux with Kernel 2.6.22 (glibc 2.6.1, gcc 4.2.1).
While examining our program with valgrind, i'm getting the following error:
==8454== Conditional jump or move depends on uninitialised value(s)
==8454== at 0x59072DD: QR_set_rowstart_in_cache (qresult.c:113)
==8454== by 0x590810C: QR_Constructor (qresult.c:165)
==8454== by 0x58ECEC9: CC_send_query_append (connection.c:2742)
==8454== by 0x58F1323: CC_commit (connection.c:512)
[..]
==8454== Uninitialised value was created by a heap allocation
==8454== at 0x4022C13: malloc (vg_replace_malloc.c:195)
==8454== by 0x590807C: QR_Constructor (qresult.c:138)
==8454== by 0x58ECEC9: CC_send_query_append (connection.c:2742)
==8454== by 0x58F1323: CC_commit (connection.c:512)
This belongs to the function "QResultClass *QR_Constructor()" in qresult.c.
QR_set_rowstart_in_cache(rv, -1) is called before rv->flags = 0 is set and so QR_set_rowstart_in_cache evaluates the value of rv->flags in QR_synchronize_keys while it isn't initialised yet.
Setting rv->flags = 0 before calling QR_set_rowstart_in_cache fixed the problem for me.
Thanks
Arno Moore
----------------------------------------------------------------------
You can respond by visiting:
http://pgfoundry.org/tracker/?func=detail&atid=538&aid=1010945&group_id=1000125
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Reply to all the recipients from your mail client; the link fills in
the headers below: reply via email
Some clients, webmail especially, drop In-Reply-To and References from
a link, and the reply then starts a new thread: use the mbox below.
To: pgsql-odbc@postgresql.org
Cc: noreply@pgfoundry.org
Subject: Re: [ psqlodbc-Bugs-1010945 ] uninitialised value in QR_Constructor
In-Reply-To: <20101119134039.A93861071074@pgfoundry.org>
References: <20101119134039.A93861071074@pgfoundry.org>
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
This inbox is served by DDX for PostgreSQL; see mirroring instructions
for how to clone and mirror all data and code used for this inbox