newlib: Added dbg trap for alloc reent err

Signed-off-by: Max Logaev <maxlogaev@proton.me>
This commit is contained in:
2026-01-16 18:51:55 +03:00
parent 419c67b51a
commit f7ac2601c6

View File

@@ -16,6 +16,11 @@ __init_reent (void)
{
struct _reent *r
= (struct _reent *)_ksys (SF_SYS_MISC, SSF_MEM_ALLOC, sizeof (*r));
if (r == NULL)
{
// Debugger trap
__asm__ ("int3");
}
_REENT_INIT_PTR_ZEROED (r);
__sinit (r);