Why do we need for an Undefined Behavior Annex to C++

This page summarizes the projects mentioned and recommended in the original post on news.ycombinator.com

CodeRabbit: AI Code Reviews for Developers
Revolutionize your code reviews with AI. CodeRabbit offers PR summaries, code walkthroughs, 1-click suggestions, and AST-based analysis. Boost productivity and code quality across all major languages with each PR.
coderabbit.ai
featured
Nutrient – The #1 PDF SDK Library, trusted by 10K+ developers
Other PDF SDKs promise a lot - then break. Laggy scrolling, poor mobile UX, tons of bugs, and lack of support cost you endless frustrations. Nutrient’s SDK handles billion-page workloads - so you don’t have to debug PDFs. Used by ~1 billion end users in more than 150 different countries.
www.nutrient.io
featured
  1. rust

    Empowering everyone to build reliable and efficient software.

    On Unix targets, it installs a signal handler for SIGSEGV and checks if the faulting address falls within the range of the stack guards. See https://github.com/rust-lang/rust/blob/411f34b/library/std/s...

    The stack guards would normally be setup by the system runtime (e.g. kernel in the case of the main thread stack, libc for thread stacks), not Rust's runtime. Likewise, stack probes that ensure stack operations don't skip guard pages are usually (always?) emitted by the compiler backend (e.g. GCC, LLVM), not Rust's instrumentation, per se.

    In this sense Rust isn't doing anything different than any other typical C or C++ binary, except hijacking SIGSEGV as Rust does is normally frowned upon, especially when it's merely for aesthetics--i.e. printing a pretty message. Also, attempting to introspect current thread metadata from a signal handler gives me pause. I'm not familiar enough with Rust to down the underlying code. I presume it's using at some POSIX threads interfaces, but POSIX thread interfaces aren't async-signal-safe, and though SIGSEGV is a synchronous signal, that doesn't mean the Rust runtime isn't technically relying on undefined behavior.

  2. CodeRabbit

    CodeRabbit: AI Code Reviews for Developers. Revolutionize your code reviews with AI. CodeRabbit offers PR summaries, code walkthroughs, 1-click suggestions, and AST-based analysis. Boost productivity and code quality across all major languages with each PR.

    CodeRabbit logo
  3. compiler-builtins

    Porting `compiler-rt` intrinsics to Rust

NOTE: The number of mentions on this list indicates mentions on common posts plus user suggested alternatives. Hence, a higher number means a more popular project.

Suggest a related project

Related posts