Update the o1heap submodule to 3.0.0

Open
#419 0 comments 0 reactions 0 assignees View on GitHub

Maintainers usually reply within 1 day

Nobody has claimed this yet.

Assessment

Difficulty
4/5
Estimated time
3-5 days
Newbie friendliness
55/100
Issue type
Feature
Clarity
Clearly specified
Activity status
Active
Tech stack
c, cmake, cpp, git

Research direction

Start by comparing the o1heap pin in submodules/o1heap with CETL’s expected version in cetlvast/cmake/modules/ExternalDependenciesGitHub.cmake.in, then inspect verification/CMakeLists.txt and verification/cmake/modules/Findo1heap.cmake. Choose whether to pin 2.2.0 or 3.0.0, account for the 32-bit alignment change, and run the 40 workflows in verification/CMakePresets.json using the specified toolshed image. Done means the chosen pin is updated and all workflows pass; if choosing 3.0.0, file a CETL issue.

Written by the indexing model from the issue text.

Description

build and test dependencies

Summary

Update submodules/o1heap from its current pin, 10e2754 (2.1.1 plus one CI commit, April 2024), to the latest release, 3.0.0.

How Nunavut uses o1heap

Only the verification suite uses it. verification/CMakeLists.txt builds it as a static library (verification/cmake/modules/Findo1heap.cmake) and links it into every native C++ test and the MCU test (target_link_libraries(... PUBLIC o1heap)). No Nunavut source, template, or test calls an o1heap function, and no test includes CETL's cetl/pmr/o1heap_memory_resource_delegate.hpp.

What changed upstream

From the o1heap 3.0.0 changelog:

  • v2.2: adds o1heapMinArenaSize, o1heapGetMaxAllocationSize, and optional trace events (O1HEAP_TRACE).
  • v3.0 (major):
    • Per-fragment overhead drops from 4× to 2× pointer width. On 32-bit targets, O1HEAP_ALIGNMENT becomes 8 bytes instead of 16.
    • Adds o1heapReallocate.
    • Removes the v2.2 trace events.

The rest of the public API (o1heapInit, o1heapAllocate, o1heapFree, o1heapDoInvariantsHold, o1heapGetDiagnostics) is unchanged.

Things to check

  • CETL compatibility. CETL v2.1.0, which Nunavut now pins, tests against o1heap 2.2.0 (cetlvast/cmake/modules/ExternalDependenciesGitHub.cmake.in). Its o1heap_memory_resource_delegate.hpp calls o1heapMinArenaSize and o1heapGetMaxAllocationSize, which the current 2.1.1 pin doesn't have. That's harmless today only because Nunavut never includes that header. 3.0.0 has both functions, but CETL hasn't tested against it. The update should either:
    • stay at 2.2.0 to match CETL, or
    • go to 3.0.0 and file a CETL issue so CETL tests 3.0.0 as well.
  • 32-bit alignment. The gcc-native32 and gcc-arm-none-eabi flavours run on 32-bit targets, where 3.0 halves the alignment. Any test that assumes 16-byte alignment from o1heap would be affected. None are known to exist today.

Work

  1. Move submodules/o1heap to the chosen tag.
  2. Run all 40 verification workflows (verification/CMakePresets.json) in ghcr.io/opencyphal/toolshed:ts26.4.5 and fix any regressions.
Dominant language
Python
Stars
48
Forks
26
Avg merge
1d 18h
Merged PRs (30d)
9

Getting set up

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

More from OpenCyphal/nunavut

All issues in OpenCyphal/nunavut

Similar issues

More Python issues

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.