7 Commits
Author SHA1 Message Date
Emanuele 3ac648dcb3 fix(tests): drop const before casting the pointer typeinfo catch slot to a function pointer
PointerRecord::vtable is a const void* const*, so vtable[4] is a const
void*. clang refuses reinterpret_cast from it to a function pointer
(casts away qualifiers), which stopped GuestBadOptionalAccess.cpp from
compiling on macOS; GCC accepts it. The cast now goes through
const_cast<void*>.
2026-11-02 17:36:03 +01:00
akkadbakkad89andDevin 78782d8836 feat(libc): declare the abi typeinfo records and pointer typeinfos
Completes libc's cxxabiv1 data surface relative to the aerolib export
list: the five missing category vtables (__shim, __enum, __array,
__pbase, __pointer_to_member), _ZTISt9type_info plus the eleven
_ZTIN10__cxxabiv1* records forming the real single-inheritance chain
down to std::type_info, and the fifty _ZTIP/_ZTIPK builtin pointer
records whose pointees are the fundamental records.

Every category vtable's typeinfo slot now addresses its exported _ZTIN
record instead of a host type_info, so typeid of a guest typeinfo
object resolves to the canonical symbol.

Generated with [Devin](https://devin.ai)

Co-Authored-By: Devin <158243242+devin-ai-integration[bot]@users.noreply.github.com>
2026-11-02 18:36:21 +05:30
akkadbakkad89 a361119ae1 test(libc): use production exception types in GuestBadOptionalAccess
Include the canonical libc Api.hpp (which also provides the
exceptions/Runtime.hpp cxa declarations) instead of test-local export
declarations: the bad_optional_access ctor/dtor take
LibcException::ExceptionObject*, __cxa_throw takes std::type_info*, and
__cxa_current_exception_type returns std::type_info*. The exported
records are declared as std::type_info / __cxxabiv1::__si_class_type_info
matching their TypeRecord/FundamentalTypeRecord layout, and the
catch-type callback uses the production
bool(const std::type_info*, const std::type_info*, void**, unsigned)
signature from TypeInfo.cpp.
2026-11-01 15:35:33 +05:30
akkadbakkad89 ad55ceb9a4 test(libc): exercise fundamental typeinfo records through the guest catch path 2026-11-01 10:56:25 +05:30
akkadbakkad89andDevin b9343e5301 test(libc): exercise exported fundamental typeinfo records directly
Cover the new _ZTI records the way a guest catch would: the vtable
address point, the fundamental-type kind reachable through vtable[-1],
__do_catch matching and non-matching pairs, and a throw of int through
__cxa_throw that a host catch resolves back to _ZTIi.

Generated with [Devin](https://devin.ai)

Co-Authored-By: Devin <158243242+devin-ai-integration[bot]@users.noreply.github.com>
2026-11-01 10:56:23 +05:30
boykopovar f38d29fd08 refactor(sdk): add canonical headers for remaining libraries 2026-10-24 23:17:42 +03:00
Nithishvelan M e775e456d8 fix(libc): add bad_optional_access exports, test, and clarify debt 2026-10-19 21:20:02 +05:30