From 912ae405506fa3b064b7403a17fdd6de77303fcf Mon Sep 17 00:00:00 2001 From: Roland Conybeare Date: Sat, 11 Apr 2026 16:51:52 -0400 Subject: [PATCH] xo-gc: bugfixes for GCObjectStore, unit test exapnded In particular: drop casual assignment to DList.rest_, will break acyclic assumption of DList.size() --- include/xo/object2/DList.hpp | 4 ++-- src/object2/DList.cpp | 2 +- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/include/xo/object2/DList.hpp b/include/xo/object2/DList.hpp index 608f82b..a862f18 100644 --- a/include/xo/object2/DList.hpp +++ b/include/xo/object2/DList.hpp @@ -65,8 +65,8 @@ namespace xo { /** assign head **/ void assign_head(obj gc, obj h); - /** assign rest-pointer **/ - void assign_rest(DList * r); + /** assign rest-pointer. Caller responsible for preserving acyclic property! **/ + void _assign_rest(DList * r); /** pretty-printing driver; combine layout+printing **/ bool pretty(const ppindentinfo & ppii) const; diff --git a/src/object2/DList.cpp b/src/object2/DList.cpp index 612ed98..7208bb9 100644 --- a/src/object2/DList.cpp +++ b/src/object2/DList.cpp @@ -128,7 +128,7 @@ namespace xo { } void - DList::assign_rest(DList * r) + DList::_assign_rest(DList * r) { scope log(XO_DEBUG(true), "need write barrier");