From: Colin A. <col...@go...> - 2007-12-25 23:19:37
|
On 25/12/2007, Eric Bezault <er...@go...> wrote: > I found (and fixed) a bug in `deep_twin': > > * Fixed bug (read/write to non-allocated memory) in implementation of > `deep_twin' when traversing objects of type SPECIAL. > > Do you know if `deep_twin' is used in your program? It might explain > the weird behavior that you get if the memory gets corrupted in such > a way. I don't know. I don't use them in my own classes. I tried checking with Eiffel Studio, and it reports no callers other than deep_clone, and deep_copy, and in turn reports no callers for those. But experience tells me that it doesn't always report all calls. But I checked that there are no other implementations except those in ANY. > I also improved things when declaring user-defined expanded types, > in particular when creating SPECIAL objects of expanded). Feature > `default_create' is still not called on initialization, and `copy' > is still not called on reattachment. If neither of these are redefined > in your user-defined expanded types, then it should now be safe to > use them. Well Berend can say whether or not they are used within eposix. I don't have any user-defined expanded classes in my own code that I remember (I don't think I have ever created an expanded class). Anyway, I will update my repository tomorrow, and see if it makes any difference. |