Re: [HACKERS] suspicious pointer/integer coersion

2005-07-13 Thread Andrew Dunstan
This seems to have gone AWOL in the email ether, so I am resending. Original Message Tom Lane wrote: Andrew Dunstan <[EMAIL PROTECTED]> writes: I have just noticed this code in plperl.c: hv_store(plperl_proc_hash, internal_proname, proname_len,

Re: [HACKERS] suspicious pointer/integer coersion

2005-07-11 Thread Tom Lane
Andrew Dunstan <[EMAIL PROTECTED]> writes: >> Attached is a patch that fixes (I hope) both a recently introduced >> problem with recursion and a problem with array returns that became >> evident as a result of not throwing away non-fatal warnings (thanks to >> David Fetter for noticing this). Re

Re: [HACKERS] suspicious pointer/integer coersion

2005-07-11 Thread Andrew Dunstan
Andrew Dunstan wrote: Andrew Dunstan wrote: Looking further ... we already do this implicitly for prodesc in the call handler - we would just need to do the same thing for per-call structures and divorce them from prodesc, which can be repeated on the implicit stack. I'll work on

Re: [HACKERS] suspicious pointer/integer coersion

2005-07-11 Thread Andrew Dunstan
Andrew Dunstan wrote: Looking further ... we already do this implicitly for prodesc in the call handler - we would just need to do the same thing for per-call structures and divorce them from prodesc, which can be repeated on the implicit stack. I'll work on that - changes should be q

Re: [HACKERS] suspicious pointer/integer coersion

2005-07-10 Thread Christopher Kings-Lynne
Looking further ... we already do this implicitly for prodesc in the call handler - we would just need to do the same thing for per-call structures and divorce them from prodesc, which can be repeated on the implicit stack. I'll work on that - changes should be quite small. Sounds like recur

Re: [HACKERS] suspicious pointer/integer coersion

2005-07-10 Thread Andrew Dunstan
Andrew Dunstan wrote: Tom Lane wrote: Andrew Dunstan <[EMAIL PROTECTED]> writes: Works for me. There are some other things about the procdesc stuff I'm trying to sort out (especially if we should be storing per-call info inside it). Hmm, probably not ... check to see if a recursive

Re: [HACKERS] suspicious pointer/integer coersion

2005-07-10 Thread Andrew Dunstan
Tom Lane wrote: Andrew Dunstan <[EMAIL PROTECTED]> writes: Works for me. There are some other things about the procdesc stuff I'm trying to sort out (especially if we should be storing per-call info inside it). Hmm, probably not ... check to see if a recursive plperl function behav

Re: [HACKERS] suspicious pointer/integer coersion

2005-07-10 Thread Tom Lane
Andrew Dunstan <[EMAIL PROTECTED]> writes: > Works for me. There are some other things about the procdesc stuff I'm > trying to sort out (especially if we should be storing per-call info > inside it). Hmm, probably not ... check to see if a recursive plperl function behaves sanely. (This might

Re: [HACKERS] suspicious pointer/integer coersion

2005-07-10 Thread Andrew Dunstan
Tom Lane wrote: Andrew Dunstan <[EMAIL PROTECTED]> writes: I have just noticed this code in plperl.c: hv_store(plperl_proc_hash, internal_proname, proname_len, newSViv((IV) prodesc), 0); basically, here prodesc is a pointer to a struct, and we ar

Re: [HACKERS] suspicious pointer/integer coersion

2005-07-10 Thread Tom Lane
Andrew Dunstan <[EMAIL PROTECTED]> writes: > I have just noticed this code in plperl.c: > hv_store(plperl_proc_hash, internal_proname, proname_len, > newSViv((IV) prodesc), 0); > basically, here prodesc is a pointer to a struct, and we are storing it > as an integer in a

[HACKERS] suspicious pointer/integer coersion

2005-07-10 Thread Andrew Dunstan
I have just noticed this code in plperl.c: hv_store(plperl_proc_hash, internal_proname, proname_len, newSViv((IV) prodesc), 0); basically, here prodesc is a pointer to a struct, and we are storing it as an integer in a perl hash for easy lookup by stringified oid. How