Access violation from palloc, Visual Studio 2005, C-language function

Поиск
Список
Период
Сортировка
От Kevin Flanagan
Тема Access violation from palloc, Visual Studio 2005, C-language function
Дата
Msg-id 005401cabfe6$4cd82f20$e6888d60$@com
обсуждение исходный текст
Ответ на Re: Core dump running PL/Perl installcheck with bleadperl [PATCH]  (Tom Lane <tgl@sss.pgh.pa.us>)
Ответы Re: Access violation from palloc, Visual Studio 2005, C-language function
Список pgsql-hackers
Environment: Windows Vista, PostgreSQL 8.4 (1-click installer), Visual
Studio 2005 sp1.

I have a bare-bones DLL built as per the above, compiling the 'add_one' and
'copytext' samples found at
http://www.postgresql.org/docs/8.4/interactive/xfunc-c.html (version 1
calling convention), compiled as 'C'. I can use 'add_one' just fine from
within SQL, but if I use 'copytext', an access violation occurs as soon as
palloc() is called.

Could anyone suggest what the problem might be?

Failing that, are there any other (creative?) ways to return strings from a
C-language function without using palloc?

Thanks in advance for any leads

Kevin.




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

Предыдущее
От: Tom Lane
Дата:
Сообщение: Re: Core dump running PL/Perl installcheck with bleadperl [PATCH]
Следующее
От: Tom Lane
Дата:
Сообщение: Re: Access violation from palloc, Visual Studio 2005, C-language function