BLUE
Profile banner
E
eliza🌻
@elizas.website
e-girl (engineering girl) • interested in the kind of software nobody writes anymore • making computers at @oxidecomputer.bsky.social • love too cheap to meter • nulla crux, nulla corona
2.3k followers316 following2k posts
Eelizas.website

ringbuf: Eliminate potential panics #1856

> The ~~Hitchhiker's Guide to the Galaxy~~ ringbuf has already
> supplanted ~~the great Encyclopaedia Galactica~~ text-based logging as
> the standard repository of all knowledge and wisdom, for though it has
> many omissions, it scores over the older, more pedestrian work in two
> important respects. First, it is slightly cheaper; and secondly it has
> the words DON'T PANIC inscribed in large friendly letters on its
> cover.

We have support in userlib for statically disabling all panics at
compile-time. When a task enables the no-panic feature flag on
userlib, any panic in that task will result in a link error. This
allows us to guarantee that some tasks will never panic, and we get a
nice code size reduction from doing so. However, the ringbuf crate
currently cannot be used in no-panic tasks, as it does fallible array
indexing, and calls into the StaticCell::borrow_mut method in
static-cell, which can panic.

This commit removes all panics
1
Eelizas.website

referring to phone numbers as “POTS addrs” just to be obnoxious

2
Reposted by eliza🌻
JMjamesmunns.com

> This is wretched, but...it does seem like it should work (and it looks sound AFAICT)! I can't immediately think of a better way to implement [this] High praise from @elizas.website

0
Eelizas.website

so true!

0
Eelizas.website

the DHH “i would simply run CI locally” thing is not a bad idea, if you live on a planet where dynamic linking doesn’t exist, and environment variables also don’t exist.

1
Eelizas.website

if you really want a peek into my dark and twisted psyche, consider the following: 1) the phrase “Prochot & Thermtrip, Attorneys at Law” just emerged fully formed into my mind, and, B) i thought it was funny enough that i had to post it

0
Eelizas.website

endorsed by “The C Programming Language”

2
Eelizas.website

‪i heard they have an airport there that’s Bad‬

1
Profile banner
E
eliza🌻
@elizas.website
e-girl (engineering girl) • interested in the kind of software nobody writes anymore • making computers at @oxidecomputer.bsky.social • love too cheap to meter • nulla crux, nulla corona
2.3k followers316 following2k posts