2 Commits
Author SHA1 Message Date
hm 646b3eee8a fix(core,spatial): 修复 Octree 插入 SEGFAULT 与 ThreadSafeObjectPool 堆破坏
Octree(src/spatial/octree.cpp):
- 根因:subdivide() 在 nodes.reserve() 之前取 OctreeNode& 引用,扩容后
  node.children[i] 写入悬垂内存 → InsertMultiple SEGFAULT;subdivide_recursive /
  insert_recursive 同样持引用跨扩容。
- 修复:改为快照 + 按索引 append,不在 vector 扩容期间持有引用;子节点改默认
  构造后 children.fill(-1)(避免聚合初始化把 children 置 0 造成"每个子节点都像
  内部节点"的无限递归);remove_from_node 改为无引用实现;根包围盒扩张语义
  文档化并补回归(越界项保留在节点、仍可查询/删除)。
- 新增回归:多级细分查询、根扩张后插入可查询。

ThreadSafeObjectPool(include/vde/core/object_pool.h):
- 根因:static thread_local 池被所有实例共享且生命周期长于实例;release() 会把
  任意来源指针塞进当前线程池,实例销毁后仍留下悬垂指针 → 下次 acquire 返回已
  释放内存(0xc0000374 堆破坏)。
- 修复:改为每实例 mutex + 私有 ObjectPool + 原子计数(不再跨实例/跨线程混用
  指针),API 保持兼容;单线程 ObjectPool 语义不变。
- 新增回归:双实例隔离、同线程重复创建销毁 200 轮、跨线程 release。
2026-10-25 16:12:41 +08:00
茂之钳 16d35ffe9e test: full coverage — 12 new + 7 enhanced test files across 8 modules
New tests:
  capi/test_capi.cpp (C API 9 functions)
  curves/test_curve_intersect.cpp (3 tests)
  curves/test_iga_prep.cpp (5 tests)
  mesh/test_medial_axis.cpp (3 tests)
  mesh/test_mesh_quality.cpp (4 tests)
  mesh/test_grid_mesh.cpp (3 tests)
  boolean/test_boolean_edge_cases.cpp (5 tests)
  collision/test_gjk.cpp (3 tests)
  spatial/test_octree.cpp (4 tests)
  spatial/test_bvh.cpp (4 tests)
  spatial/test_spatial_index.cpp (3 tests)
  sketch/test_sketch_ops.cpp (4 tests)
  foundation/test_io_utils.cpp (3 tests)

Enhanced:
  mesh/test_mesh_boolean (4 tests)
  mesh/test_hex_mesh (3 tests)

Total: ~60+ new test cases
2026-08-03 00:41:05 +08:00