---
title: "Pitfalls in VM Implementation on CHERI: Lessons from Porting CRuby"
url: https://daily.dev/posts/pitfalls-in-vm-implementation-on-cheri-lessons-from-porting-cruby-ou5nmjf2f
source_url: https://programming-journal.org/2026/11/2/
type: article
source: "The Programming Journal"
published: 2026-03-05T19:46:36.819Z
updated: 2026-03-05T19:46:53.782Z
tags: ["c", "ruby", "virtual-machine"]
reading_time: 2
upvotes: 0
comments: 0
language: en
---

> ## Documentation Index
> Fetch the complete documentation index at: https://daily.dev/llms.txt
> Use this file to discover all available pages before exploring further.

# Pitfalls in VM Implementation on CHERI: Lessons from Porting CRuby

**[The Programming Journal](https://daily.dev/sources/programming-journal)** · 2 min read · 0 upvotes · 0 comments

## Summary

CHERI (Capability Hardware Enhanced RISC Instructions) replaces traditional pointers with hardware capabilities to enforce memory safety. Porting virtual machines to CHERI is non-trivial because many VM implementation techniques rely on C undefined behaviors that are valid on conventional architectures but break under CHERI's stricter model. Researchers ported CRuby to CHERI as a case study, categorized the VM-specific pitfalls encountered, and documented workarounds with their trade-offs. The findings are validated against the CRuby port and prior VM porting case studies, providing a practical guide for developers building or porting VMs to CHERI.

## Full article

daily.dev links to this article rather than hosting it. Read it at the original source: <https://programming-journal.org/2026/11/2/>

## Similar posts on daily.dev

- [The computer at the bottom of a canal](https://daily.dev/posts/the-computer-at-the-bottom-of-a-canal-0zdxsba7o) · Hacker News · 2 upvotes · 0 comments
- [CHERIoT 1.0 Released\!](https://daily.dev/posts/cheriot-1-0-released--eg7kkizua) · Lobsters · 0 upvotes · 0 comments
- [Reworking Memory Management in CRuby](https://daily.dev/posts/reworking-memory-management-in-cruby-ebsgc9awb) · RUBYLAND · 0 upvotes · 0 comments
- [Security Researchers Find Current RISC-V CPU Implementations Coming Up Short](https://daily.dev/posts/security-researchers-find-current-risc-v-cpu-implementations-coming-up-short-bwsyclpzr) · Phoronix · 0 upvotes · 0 comments

---

Tags: [#c](https://daily.dev/tags/c), [#ruby](https://daily.dev/tags/ruby), [#virtual-machine](https://daily.dev/tags/virtual-machine)

[View this post on daily.dev](https://daily.dev/posts/pitfalls-in-vm-implementation-on-cheri-lessons-from-porting-cruby-ou5nmjf2f)
