Обсуждение: Unitialized Values in record_image_cmp

Поиск
Список
Период
Сортировка

Unitialized Values in record_image_cmp

От
Andres Freund
Дата:
Hi,

Valgrind tells me:
==442828== Conditional jump or move depends on uninitialised value(s)
==442828==    at 0x80084F: record_image_cmp (rowtypes.c:1521)
==442828==    by 0x801522: btrecordimagecmp (rowtypes.c:1839)
==442828==    by 0x8C6604: comparison_shim (sortsupport.c:53)
==442828==    by 0x64284D: ApplySortComparator (sortsupport.h:143)
==442828==    by 0x642F3B: MJCompare (nodeMergejoin.c:412)
==442828==    by 0x643A29: ExecMergeJoin (nodeMergejoin.c:1211)
==442828==    by 0x62305A: ExecProcNode (execProcnode.c:453)
==442828==    by 0x640800: ExecLimit (nodeLimit.c:91)
==442828==    by 0x623135: ExecProcNode (execProcnode.c:500)
==442828==    by 0x620E15: ExecutePlan (execMain.c:1472)
==442828==    by 0x61EF94: standard_ExecutorRun (execMain.c:307)
==442828==    by 0x61EE0B: ExecutorRun (execMain.c:255)

And a quick look indeed seems to confirm that that's possible.

Greetings,

Andres Freund

-- Andres Freund                       http://www.2ndQuadrant.com/PostgreSQL Development, 24x7 Support, Training &
Services



Re: Unitialized Values in record_image_cmp

От
Merlin Moncure
Дата:
On Thu, Oct 17, 2013 at 8:01 AM, Andres Freund <andres@2ndquadrant.com> wrote:
> Hi,
>
> Valgrind tells me:
> ==442828== Conditional jump or move depends on uninitialised value(s)
> ==442828==    at 0x80084F: record_image_cmp (rowtypes.c:1521)
> ==442828==    by 0x801522: btrecordimagecmp (rowtypes.c:1839)
> ==442828==    by 0x8C6604: comparison_shim (sortsupport.c:53)
> ==442828==    by 0x64284D: ApplySortComparator (sortsupport.h:143)
> ==442828==    by 0x642F3B: MJCompare (nodeMergejoin.c:412)
> ==442828==    by 0x643A29: ExecMergeJoin (nodeMergejoin.c:1211)
> ==442828==    by 0x62305A: ExecProcNode (execProcnode.c:453)
> ==442828==    by 0x640800: ExecLimit (nodeLimit.c:91)
> ==442828==    by 0x623135: ExecProcNode (execProcnode.c:500)
> ==442828==    by 0x620E15: ExecutePlan (execMain.c:1472)
> ==442828==    by 0x61EF94: standard_ExecutorRun (execMain.c:307)
> ==442828==    by 0x61EE0B: ExecutorRun (execMain.c:255)
>

I think Kevin got to it already.  see:
http://postgresql.1045698.n5.nabble.com/Record-comparison-compiler-warning-td5774794.html

merlin



Re: Unitialized Values in record_image_cmp

От
Andres Freund
Дата:
On 2013-10-17 08:16:58 -0500, Merlin Moncure wrote:
> On Thu, Oct 17, 2013 at 8:01 AM, Andres Freund <andres@2ndquadrant.com> wrote:
> > Hi,
> >
> > Valgrind tells me:
> > ==442828== Conditional jump or move depends on uninitialised value(s)
> > ==442828==    at 0x80084F: record_image_cmp (rowtypes.c:1521)
> > ==442828==    by 0x801522: btrecordimagecmp (rowtypes.c:1839)
> > ==442828==    by 0x8C6604: comparison_shim (sortsupport.c:53)
> > ==442828==    by 0x64284D: ApplySortComparator (sortsupport.h:143)
> > ==442828==    by 0x642F3B: MJCompare (nodeMergejoin.c:412)
> > ==442828==    by 0x643A29: ExecMergeJoin (nodeMergejoin.c:1211)
> > ==442828==    by 0x62305A: ExecProcNode (execProcnode.c:453)
> > ==442828==    by 0x640800: ExecLimit (nodeLimit.c:91)
> > ==442828==    by 0x623135: ExecProcNode (execProcnode.c:500)
> > ==442828==    by 0x620E15: ExecutePlan (execMain.c:1472)
> > ==442828==    by 0x61EF94: standard_ExecutorRun (execMain.c:307)
> > ==442828==    by 0x61EE0B: ExecutorRun (execMain.c:255)
> >
> 
> I think Kevin got to it already.  see:
> http://postgresql.1045698.n5.nabble.com/Record-comparison-compiler-warning-td5774794.html

At least that patch isn't applicable - there was an unitialized value at
runtime, even using a cassert enabled build.

Greetings,

Andres Freund

-- Andres Freund                       http://www.2ndQuadrant.com/PostgreSQL Development, 24x7 Support, Training &
Services