[odb-users] Segmentation fault while executing odb compiler avoided adding a typedef sentence

MM finjulhich at gmail.com
Mon Aug 31 11:05:10 EDT 2015


On 21 August 2015 at 17:59, Boris Kolpackov <boris at codesynthesis.com> wrote:

> Hi Marcos,
>
> Marcos Gonzalez Menendez <marcos.glez at gmail.com> writes:
>
> > I was playing with an small example extracted from the odb user manual
> > while I found that the odb compiler gives a segmentation fault error.
>
> Fixed for the next release:
>
>
> http://scm.codesynthesis.com/?p=odb/odb.git;a=commit;h=15995637f9cab6a4d92a2383e2afdba2b48d5f7b
>
> Thanks for the report and the test case!
>
> Boris
>
> Hi Boris,

I have downloaded 2.5.0.a1 from your tmp directory, applied the 2 commits
 " Export container and section traits" and "Make sure we don't match
namespace ::foo as prefix" after that.

I bootsraped, configured, make, make installed for all of libcutl, odb,
libodb, -boost and -sqlite (in /usr/local/....)
/usr/loca/bin/odb --version is indeed 2.5.0.a1

This statement in c++11:

using derived_frombase = cloneable<base,derived>;   // crashes
#pragma db object(derived_frombase) abstract definition
#pragma db object(derived) table("derivedobjects") definition  // derived
derives from base through cloneable

crashes the compiler with the backtrace below. I made sure
/usr/local/include is set as -I flag for the odb compiler. (Note I still
have odb 2.4.0 from the rpm package installed, and i have 2.5 in /usr/local)

As I have the odb sources now, i am able to quickly test out any fix you
may think of. Thanks

terminate called after throwing an instance of
'cutl::compiler::context::no_entry'
  what():  N4cutl8compiler7context8no_entryE
*** 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
/home/MM/stuff_odb/derived.hpp: In function ‘void
__static_initialization_and_destruction_0(int, int)’:
/home/MM/stuff_odb/derived.hpp:18:48: internal compiler error: Aborted
 using derived_frombase = cloneable<base,derived>;
                                                ^
0x7feda5268bc8 user_sections&
cutl::compiler::context::get<user_sections>(std::basic_string<char,
std::char_traits<char>, std::allocator<char> > const&)
/usr/include/cutl/compiler/context.txx:16
0x7feda52c69b5 user_sections&
cutl::compiler::context::get<user_sections>(char const*)
/usr/include/cutl/compiler/context.hxx:60
0x7feda52b9fd8 traverse_object_pre
/home/MM/Downloads/odb-2.5.0.a1/odb/processor.cxx:2133
0x7feda52bf1eb traverse
/home/MM/Downloads/odb-2.5.0.a1/odb/processor.cxx:2091
0x7feda526e3f5
cutl::compiler::dispatcher<semantics::node>::dispatch(semantics::node&)
/usr/include/cutl/compiler/traversal.txx:90
0x7feda526ee95
cutl::compiler::dispatcher<semantics::edge>::dispatch(semantics::edge&)
/usr/include/cutl/compiler/traversal.txx:90
0x7feda52938dd void
cutl::compiler::dispatcher<semantics::edge>::iterate_and_dispatch<cutl::container::pointer_iterator<std::_List_iterator<semantics::names*>
>,
semantics::edge>(cutl::container::pointer_iterator<std::_List_iterator<semantics::names*>
>, cutl::container::pointer_iterator<std::_List_iterator<semantics::names*>
>, cutl::compiler::dispatcher<semantics::edge>&)
/usr/include/cutl/compiler/traversal.hxx:125
0x7feda52938dd
traversal::scope_template<semantics::namespace_>::names(semantics::namespace_&,
cutl::compiler::dispatcher<semantics::edge>&)
../odb/traversal/elements.hxx:196
0x7feda52938dd
traversal::scope_template<semantics::namespace_>::names(semantics::namespace_&)
../odb/traversal/elements.hxx:190
0x7feda52938dd
traversal::scope_template<semantics::namespace_>::traverse(semantics::namespace_&)
../odb/traversal/elements.hxx:184
0x7feda52938dd cutl::compiler::traverser_impl<semantics::namespace_,
semantics::node>::trampoline(semantics::node&)
/usr/include/cutl/compiler/traversal.txx:24
0x7feda526e3f5
cutl::compiler::dispatcher<semantics::node>::dispatch(semantics::node&)
/usr/include/cutl/compiler/traversal.txx:90
0x7feda526ee95
cutl::compiler::dispatcher<semantics::edge>::dispatch(semantics::edge&)
/usr/include/cutl/compiler/traversal.txx:90
0x7feda52938dd void
cutl::compiler::dispatcher<semantics::edge>::iterate_and_dispatch<cutl::container::pointer_iterator<std::_List_iterator<semantics::names*>
>,
semantics::edge>(cutl::container::pointer_iterator<std::_List_iterator<semantics::names*>
>, cutl::container::pointer_iterator<std::_List_iterator<semantics::names*>
>, cutl::compiler::dispatcher<semantics::edge>&)
/usr/include/cutl/compiler/traversal.hxx:125
0x7feda52938dd
traversal::scope_template<semantics::namespace_>::names(semantics::namespace_&,
cutl::compiler::dispatcher<semantics::edge>&)
../odb/traversal/elements.hxx:196
0x7feda52938dd
traversal::scope_template<semantics::namespace_>::names(semantics::namespace_&)
../odb/traversal/elements.hxx:190
0x7feda52938dd
traversal::scope_template<semantics::namespace_>::traverse(semantics::namespace_&)
../odb/traversal/elements.hxx:184
0x7feda52938dd cutl::compiler::traverser_impl<semantics::namespace_,
semantics::node>::trampoline(semantics::node&)
/usr/include/cutl/compiler/traversal.txx:24
0x7feda526e3f5
cutl::compiler::dispatcher<semantics::node>::dispatch(semantics::node&)
/usr/include/cutl/compiler/traversal.txx:90
0x7feda526ee95
cutl::compiler::dispatcher<semantics::edge>::dispatch(semantics::edge&)
/usr/include/cutl/compiler/traversal.txx:90


More information about the odb-users mailing list