Hi Andre, > attached patch fixes the issue raised. The issue here was, that a copy of the > base class was generated and its address passed to the _vptr->copy()-method, > which then accessed memory, that was not present in the copy being an object > of > the base class. The patch fixes this by making sure the temporary handle is a > pointer to the data to copy. > > Sorry, when that is not clear. I am not feeling so well today. So here in > terms of pseudo code. This code was formerly generated: > > struct ac {}; > struct a : struct ac { integer *i; }; > > a src, dst; > ac temp; > > temp = src; // temp is now only a copy of ac > > _vptr.copy(&temp, &dst); // temp does not denote memory having a pointer to i > > After the patch, this code is generated: > > // types as above > a src, dst; > ac *temp; // !!! Now a pointer > > temp = &src; > _vptr.copy(temp, &dst); // temp now points to memory that has a pointer to i > // and is valid for copying. > > Bootstraps and regtests ok on x86_64-linux/F23. Ok for trunk?
ok with me. Thanks for the quick fix! Cheers, Janus