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

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: (view raw, whole thread or download thread mbox)
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.



# 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


pgsql-hackers by date

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

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