Skip to content

Implement support for `std::terminate` via `::abort`

Felix Morgner requested to merge fmorgner/abort into feat_memory_manager

Since we are running without exception support (-fno-exceptions), functions that would throw an exception will instead call std::terminate. The default terminate-handler calls std::abort (which is ::abort). However, the newlib implementation of ::abort want to do the right thing and thus calls some functions we currently don't have. This change introduces an implementation that overrides the ::abort weak symbol and simply teachos::arch::exception_handling::panics. Additionally, the halting code is now consolidated in teachos::arch::kernel::halt, so that we can get rid of some nasty tricks.

Merge request reports