[odb-users] odb crash when section is loaded
odb at a-cunningham.com
Thu Jun 23 09:59:38 EDT 2016
This sounds like an issue I encountered and Boris quickly fixed in a patch
I suggest you upgrade to 2.5.0a7+ as that fixes another section issue I
2.5.0a7 seems quite robust.
On Thu, Jun 23, 2016 at 2:42 AM, Anton Paymyshev <anton.paymyshev at gmail.com>
> 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