|
|
Subscribe / Log in / New account

Exceptions in BPF

Exceptions in BPF

Posted Jul 23, 2023 7:35 UTC (Sun) by xi0n (subscriber, #138144)
In reply to: Exceptions in BPF by softball
Parent article: Exceptions in BPF

Panics in idiomatic Rust are only caught to prevent them from crossing an FFI boundary, i.e. escaping a Rust callback that’s been called from C. Otherwise, programs can set a global panic handler if the standard one is inadequate, but that is only really used for embedded and other no_std environments.

This saying, the mechanism proposed here is so close to Rust panics (and Go panics) that NOT calling it such will only lead to confusion, esp. when “exception” is such an overloaded term already.


to post comments

Exceptions in BPF

Posted Jul 25, 2023 6:59 UTC (Tue) by taladar (subscriber, #68407) [Link]

Setting a custom panic handler is also frequently used in situations where the panic should be logged before exiting.

Exceptions in BPF

Posted Nov 5, 2023 13:03 UTC (Sun) by ibukanov (subscriber, #3942) [Link]

Go panics are exactly the exceptions. They can be caught at arbitrary points and can pass arbitrary values across the stack.


Copyright © 2025, Eklektix, Inc.
Comments and public postings are copyrighted by their creators.
Linux is a registered trademark of Linus Torvalds