[odb-users] ODB crashes if callback function cannot be found

Marcel Nehring mne at qosmotec.com
Mon Aug 31 05:16:38 EDT 2015


Hello Boris,

I discovered a crash in the ODB compiler. If one specifies a callback function for an ODB object but forgets to declare this callback ODB crashes. It issues an error message about the missing callback, though. Example code and the corresponding output is attached below.

Regards,
                Marcel

#include <odb/callback.hxx>

#pragma db object callback(foobar)
class Object
{
public:
    #pragma db id
    int id_;
};

error: unable to resolve member function 'foobar' specified with '#pragma db callback' for class 'Object'
*** WARNING *** there are active plugins, do not report this as a bug unless you can reproduce it without enabling any plugins.
Event                            | Plugins
PLUGIN_START_UNIT                | odb
PLUGIN_PRAGMAS                   | odb
PLUGIN_OVERRIDE_GATE             | odb
In file included from c:\######\odb\mingw\include\odb\container-traits.hxx:217:0,
                 from <standard-odb-epilogue>:9:
c:\######\odb\mingw\include\odb\std-unordered-set-traits.hxx:122:1: internal compiler error: Segmentation fault
}
^
libbacktrace could not find executable to open
Please submit a full bug report,
with preprocessed source if appropriate.
See <http://www.codesynthesis.com/products/odb/> for instructions.


More information about the odb-users mailing list