You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
It is easily possible to enter an infinite loop (and a subsequent core dump) using the ostream operator if OneToManyRelations are used like they are e.g. in ExampleMC (only the important parts here):
will lead to an infinite loop in the ostream operator, since that is generated to be
std::ostream& operator<<( std::ostream& o,const ConstExampleMC& value ){
o << " id : " << value.id() << std::endl ;
o << " parents : " ;
for(unsigned i=0,N=value.parents_size(); i<N ; ++i)
o << value.parents(i) << "" ; // the problem is here
o << std::endl ;
o << " daughters ): " ;
for(unsigned i=0,N=value.daughters_size(); i<N ; ++i)
o << value.daughters(i) << "" ; // and also here
o << std::endl ;
return o ;
}
and is thus calling itself over and over again if such a circular relation is found.
The text was updated successfully, but these errors were encountered:
It is easily possible to enter an infinite loop (and a subsequent core dump) using the ostream operator if
OneToManyRelations
are used like they are e.g. inExampleMC
(only the important parts here):Properly setting mother/daughter relations in this case
will lead to an infinite loop in the ostream operator, since that is generated to be
and is thus calling itself over and over again if such a circular relation is found.
The text was updated successfully, but these errors were encountered: