Skip to content

fix(ecs): guard against capacity overflow in ComponentReflectionRegistry::Register - #678

Merged
jnyfah merged 1 commit into
JeanPhilippeKernel:developfrom
jnyfah:user/jnyfah/fix
Aug 28, 2026
Merged

fix(ecs): guard against capacity overflow in ComponentReflectionRegistry::Register#678
jnyfah merged 1 commit into
JeanPhilippeKernel:developfrom
jnyfah:user/jnyfah/fix

Conversation

@jnyfah

@jnyfah jnyfah commented Aug 26, 2026

Copy link
Copy Markdown
Collaborator

Summary

  • Adds a ZENGINE_VALIDATE_ASSERT before m_meta.push(meta) in ComponentReflectionRegistry::Register to catch capacity overflows at the call site.
  • Without this guard, pushing beyond the reserved capacity would silently overflow or trigger an assertion deeper inside the push implementation, making the root cause harder to diagnose.

Changes

Test plan

  • Register components up to and beyond the reserved capacity and confirm the assert fires with a clear message.
  • Confirm no regression in normal component registration paths.

@jnyfah jnyfah changed the title feat(ecs): fix feat(ecs): add a ZENGINE_VALIDATE_ASSERT in Register Aug 26, 2026
@jnyfah
jnyfah marked this pull request as ready for review August 26, 2026 08:04
@jnyfah
jnyfah merged commit c664122 into JeanPhilippeKernel:develop Aug 28, 2026
17 checks passed
@JeanPhilippeKernel JeanPhilippeKernel changed the title feat(ecs): add a ZENGINE_VALIDATE_ASSERT in Register fix(ecs): guard against capacity overflow in ComponentReflectionRegistry::Register Aug 28, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

Status: Done

Development

Successfully merging this pull request may close these issues.

add a ZENGINE_VALIDATE_ASSERT(m_meta.size() < 64, ...) inside Register() to enforce the documented 64-slot capacity constraint at runtime

2 participants