Re: [HACKERS] PL compile warning messages

From: jwieck(at)debis(dot)com (Jan Wieck)
To: brook(at)trillium(dot)NMSU(dot)Edu (Brook Milligan)
Cc: hackers(at)postgreSQL(dot)org
Subject: Re: [HACKERS] PL compile warning messages
Date: 1998-10-09 21:37:58
Message-ID: m0zRkEY-000EBRC@orion.SAPserv.Hamburg.dsh.de
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-hackers

>
> With the new PL code in pl/tcl I am getting a bunch of warnings like
> the following:
>
> pltcl.c:443: warning: variable `prodesc' might be clobbered by `longjmp' or `vfork'
>
> I have never seen this before in any of my programming. What do they
> mean? Is anyone else seeing these? Does it matter?
>
> Cheers,
> Brook
>
>

I get them too and don't know exactly what they mean. I think
gcc is just telling that after returning to the setjmp
location via longjmp the variable might not contain what
there was before (the longjmp mechanism only restores the
stack pointers, not the variable contents on the stack).

But the longjmp's are there only to clean up the Tcl's
interpreter nesting and allocations in the case of an
elog(ERROR) before really jumping back into the postgres main
loop. Tcl doesn't allocate via palloc, so there would be
memory allocations never free'd otherwise. The mentioned
variables aren't accessed after the longjumping session began
(it's really a longjmp party if Tcl triggers use in turn Tcl
functions where the queries invoke other functions/triggers
and so on :-).

Since PL/Tcl is designed to be used as trigger language,
raising errors with elog would be a normal operation from
inside of PL/Tcl.

Nothing I tested so far is really broken. I assume it doesn't
really matter.

Jan

--

#======================================================================#
# It's easier to get forgiveness for being wrong than for being right. #
# Let's break this rule - forgive me. #
#======================================== jwieck(at)debis(dot)com (Jan Wieck) #

In response to

Responses

Browse pgsql-hackers by date

  From Date Subject
Next Message Bruce Momjian 1998-10-09 21:41:18 Re: [HACKERS] dynamic libraries
Previous Message Tom Lane 1998-10-09 21:20:22 Re: [HACKERS] Open 6.4 items