Re: [HACKERS] PL compile warning messages

Поиск
Список
Период
Сортировка
От jwieck@debis.com (Jan Wieck)
Тема Re: [HACKERS] PL compile warning messages
Дата
Msg-id m0zRkEY-000EBRC@orion.SAPserv.Hamburg.dsh.de
обсуждение исходный текст
Ответ на PL compile warning messages  (Brook Milligan <brook@trillium.NMSU.Edu>)
Ответы Re: [HACKERS] PL compile warning messages
Список 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@debis.com (Jan Wieck) #

В списке pgsql-hackers по дате отправления:

Предыдущее
От: Tom Lane
Дата:
Сообщение: Re: [HACKERS] Open 6.4 items
Следующее
От: Bruce Momjian
Дата:
Сообщение: Re: [HACKERS] dynamic libraries