Commit Graph

3 Commits

Author SHA1 Message Date
Red Bear OS c1b8c3b4cf abort: fix unsafe-op-in-unsafe-fn, signal path, unused imports
- abort() body: use signal::sys::SIGABRT (the platform-independent name
  the signal module uses for both linux and redox submodules)
- call sites: wrap abort() in unsafe { } blocks (Rust 2024 edition's
  unsafe_op_in_unsafe_fn lint makes this mandatory inside unsafe fns)
- stdlib/mod.rs, start.rs: drop now-unused 'intrinsics' import
2026-06-28 04:17:35 +03:00
Red Bear OS 4e40dc538c abort: raise(SIGABRT) + _Exit instead of ud2
Previously abort() called core::intrinsics::abort() which compiles to
the ud2 instruction, generating an Invalid Opcode fault. The kernel
logs this as 'UNHANDLED EXCEPTION' and kills the process, but the
fault message is alarming and doesn't reflect the actual intent
(SIGABRT from process self-termination).

This change uses the POSIX-compliant abort sequence: raise(SIGABRT)
first (default handler terminates the process), then _Exit(134) as
fallback if the signal handler returns. Six sites updated:
stdlib abort, assert __assert_fail, lib.rs relibc_panic/oom/_Unwind_Resume,
start.rs relibc_verify_host.

The proc-manager-fallback in redox-rt/src/sys.rs retains
core::intrinsics::abort() — that path is a true 'system unreachable'
last resort where raise/_Exit cannot succeed.
2026-06-28 04:00:30 +03:00
Red Bear OS 1b3e94a20d Red Bear OS relibc baseline
From release 0.1.0 pre-patched archive.
This includes all Red Bear modifications previously maintained
as patches in local/patches/relibc/.
2026-06-27 09:19:26 +03:00