Re: Issues with C++ exception handling in an FDW

Поиск
Список
Период
Сортировка
Искать
От
Andres Freund
Тема
Re: Issues with C++ exception handling in an FDW
Дата
Msg-id
201201312001.06000.andres@anarazel.de
Ответ на
Список
Дерево обсуждения
Issues with C++ exception handling in an FDW "Soules, Craig" <craig.soules@hp.com>
Re: Issues with C++ exception handling in an FDW Robert Haas <robertmhaas@gmail.com>
Re: Issues with C++ exception handling in an FDW Peter Geoghegan <peter@2ndquadrant.com>
Re: Issues with C++ exception handling in an FDW Andres Freund <andres@anarazel.de>
Re: Issues with C++ exception handling in an FDW Peter Geoghegan <peter@2ndquadrant.com>
Re: Issues with C++ exception handling in an FDW "Soules, Craig" <craig.soules@hp.com>
On Tuesday, January 31, 2012 07:52:52 PM Peter Geoghegan wrote:
> On 30 January 2012 23:04, Soules, Craig  wrote:
> > When there are no errors everything works flawlessly, however, we noticed
> > that even throwing an exception in the C++ layer was causing an
> > immediate segmentation fault.  Even when encapsulated in a try { }
> > catch(...) { } block.
> > 
> > If anyone has seen anything like this, any pointers or suggestions would
> > be much appreciated.  I have followed all of the recommendations in the
> > PostgreSQL documentation, with no luck.  I am not overloading the
> > _init() functions in either shared library (another potential source of
> > errors I have read about).
> 
> I suggest that you generalise from the example of PLV8. The basic
> problem is that the effect of longjmp()ing over an area of the stack
> with a C++ non-POD type is undefined. I don't think you can even use
> structs, as they have implicit destructors in C++.
The PODness of a struct depends on its contents.

Andres

В списке pgsql-hackers по дате отправления
От: Robert Haas
Дата:
От: Dean Rasheed
Дата:
FAQ