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

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

From: Bruce Momjian <bruce(at)momjian(dot)us>
To: Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>
Cc: Jeremy Drake <pgsql(at)jdrake(dot)com>, 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:39:15
Message-ID: 201109031439.p83EdFA18865@momjian.us (view raw or flat)
Thread:
Lists: pgsql-committerspgsql-hackers
Tom Lane wrote:
> 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.

This would explain why the regular regression test work but the /contrib
modules, which do dynamic loading, do not.   Good to know the problem is
more the contrib/cube.  FYI, I noticed in the contrib/cube failure that
palloc0() was the next line after the reported crash line.   Are the
contrib's crashing on the first access of any backend/DLL function?

-- 
  Bruce Momjian  <bruce(at)momjian(dot)us>        http://momjian.us
  EnterpriseDB                             http://enterprisedb.com

  + It's impossible for everything to be true. +

In response to

pgsql-hackers by date

Next:From: Bruce MomjianDate: 2011-09-03 15:12:11
Subject: Re: pg_upgrade automatic testing
Previous:From: Bruce MomjianDate: 2011-09-03 14:35:41
Subject: Re: pgsql: Remove "fmgr.h" include in cube contrib --- caused crash on a Ge

pgsql-committers by date

Next:From: Tom LaneDate: 2011-09-03 19:36:44
Subject: pgsql: Rearrange planner to save the whole PlannerInfo (subroot) fora
Previous:From: Bruce MomjianDate: 2011-09-03 14:35:41
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