Skip site navigation (1) Skip section navigation (2)

Re: pgsql: Remove "fmgr.h" include in cube contrib --- caused crash on a Ge

From: Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>
To: Jeremy Drake <pgsql(at)jdrake(dot)com>
Cc: Bruce Momjian <bruce(at)momjian(dot)us>, Alvaro Herrera <alvherre(at)commandprompt(dot)com>, pgsql-committers <pgsql-committers(at)postgresql(dot)org>
Subject: Re: pgsql: Remove "fmgr.h" include in cube contrib --- caused crash on a Ge
Date: 2011-09-03 14:23:09
Message-ID: 2242.1315059789@sss.pgh.pa.us (view raw or flat)
Thread:
Lists: pgsql-committerspgsql-hackers
Jeremy Drake <pgsql(at)jdrake(dot)com> writes:
> ... I'm pretty sure that what it crashed on was
> attempting to access the global external variable CurrentMemoryContext.

Ah-hah, good insight!

> The odd thing is, that the disassembly code between the working and
> non-working was the same, except for the offsets.

The code seems to be fetching a pointer to CurrentMemoryContext from a
PC-relative location; presumably that's a literal that the dynamic
linker is supposed to update at shlib load time.  I guess that pointer
is not correctly computed in the other case, or else it's fetching the
wrong pointer value.

> Still, I have no idea why adding an include would cause issues accessing
> CurrentMemoryContext.

Me either, but at least it's something to work from.  You might try
diffing the working and non-working -E output from cube.c to see if
there are any changes that obviously affect CurrentMemoryContext.

			regards, tom lane

In response to

Responses

pgsql-hackers by date

Next:From: Peter EisentrautDate: 2011-09-03 14:24:40
Subject: Re: pg_upgrade automatic testing
Previous:From: Greg SmithDate: 2011-09-03 06:19:14
Subject: Re: PATCH: regular logging of checkpoint progress

pgsql-committers by date

Next:From: Bruce MomjianDate: 2011-09-03 14:35:41
Subject: Re: pgsql: Remove "fmgr.h" include in cube contrib --- caused crash on a Ge
Previous:From: Jeremy DrakeDate: 2011-09-03 05:54:33
Subject: Re: pgsql: Remove "fmgr.h" include in cube contrib --- caused crash on a Ge

Privacy Policy | About PostgreSQL
Copyright © 1996-2014 The PostgreSQL Global Development Group