4 Commits
Author SHA1 Message Date
MarcZX10 3e0367de2a test(libc): stop the sce v2 thrower cases reading past an 8-byte exception object
The plain throwers allocate only a vtable pointer, but the inspection hook copied sizeof(ExceptionObject) bytes of every caught object. Copy the pointer size for the thrower cases and restore the full size afterwards.
2026-10-25 10:09:27 +00:00
boykopovar fdf9ca7574 fix(sdk): reconcile public headers after rebase 2026-10-24 23:17:47 +03:00
hypermistandClaude Opus 5.5 b06247e712 Merge remote-tracking branch 'upstream/main' into feat/libc-sce-v2-exceptions
Kept both sides in StandardExceptions.cpp: main's system_category and error_code value at offset 4 plus this PR's SceV2 types; the shared ThrowCppError and the test's ErrorCode follow the new layout. No exports overlap.

Co-Authored-By: Claude Opus 5.5 <[email protected]>
2026-10-24 12:29:29 +13:00
hypermistandClaude Opus 5.5 f159d73083 feat(libc): add the std::__sce_v2 exception types and throwers
The versioned C++ library raises its own exception types:
std::__sce_v2::length_error, out_of_range, invalid_argument, runtime_error,
overflow_error, range_error, system_error, ios_base::failure and the plain
bad_function_call, bad_optional_access, bad_weak_ptr and bad_variant_access.
The message types derive from std::__sce_cxxvers::_Error_exception, which
derives from the shared std::exception. Catch clauses compiled against these
headers name the versioned types, so throwing the unversioned ones (as the
versioned _Xbad_function_call did) never reaches them.

Adds _Error_exception's constructors, destructors, what() and typeinfo; the
versioned _X* throwers, _Throw(const T&) copies and _Throw_Cpp_error; the
versioned _Syserror_map (code 0 is "success", unknown codes are
"unknown error") and _Xtime_get_ticks. _Xbad_alloc throws the shared
std::bad_alloc, as the console does. The unversioned _Throw_Cpp_error body
becomes a helper that takes the exception table.

Co-Authored-By: Claude Opus 5.5 <[email protected]>
Claude-Session: https://claude.ai/code/session_01RbLgECLQ2bpDM7oe2urGZK
2026-10-21 17:50:10 +13:00