[odb-users] odb crash when section is loaded

Anton Paymyshev anton.paymyshev at gmail.com
Thu Jun 23 05:42:33 EDT 2016


I'm using odb2.3 + sqlite + vs2015 on windows.

I have a persistent class A with a value struct V which is the only member
of section S.
V has a vector<char> B field marked as BLOB.

There are 3 consecutive transactions.

1) Load object A, load section S
2) Load object A, load section S, set A.V.B to a vector of 1000 bytes,
update A.
3) Load object A, load section S -> crash.

After some debugging it looks like S_section_traits::load gets
select_statement::truncated error from fetch and tries to grow cached
column sizes for section S. But S_section_traits::grow receives *array of
bools for section S* but tries to grow *all fields from object A* causing
memory corruption.

Looks like a bug when section_traits::grow enumerates all fields from
parent object instead of only fields related to corresponding section.

So the questions are:
1) Is is a know problem?
2) Was something like that fixed in 2.4?

If it is a new problem and my quick description is not enough I could
provide a minimum example (if needed).


More information about the odb-users mailing list