Re: PL/Perl Does not Like vstrings

Поиск
Список
Период
Сортировка
От Tom Lane
Тема Re: PL/Perl Does not Like vstrings
Дата
Msg-id 17681.1325699790@sss.pgh.pa.us
обсуждение исходный текст
Ответ на Re: PL/Perl Does not Like vstrings  (Andrew Dunstan <andrew@dunslane.net>)
Ответы Re: PL/Perl Does not Like vstrings  (Andrew Dunstan <andrew@dunslane.net>)
Список pgsql-hackers
Andrew Dunstan <andrew@dunslane.net> writes:
> The docs (perldoc perlvar) seem to suggest $^V isn't an SV (i.e. a 
> scalar) but some other sort of animal:

Yeah, it's a version object, but I'd have thought that SvPV and friends
would automatically stringify such an object.  Otherwise, practically
any kind of perl extension could be crashed by passing it one, no?

> But Util.xs::util_elog() expects an SV and doesn't check whether or not 
> it actually has one. I've found a few other ways of crashing this call 
> (e.g. by passing a typeglob), so maybe we need to test that we actually 
> have an SV. I think SvOK() is what we'd use for that - perl gurus please 
> confirm.

I looked at that last night but it appeared that SvOK would be perfectly
happy.  (Didn't actually try it, though, I was just eyeballing the flags
in gdb.)
        regards, tom lane


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

Предыдущее
От: Andrew Dunstan
Дата:
Сообщение: Re: PL/Perl Does not Like vstrings
Следующее
От: Robert Haas
Дата:
Сообщение: Re: Regarding Checkpoint Redo Record