Skip to content

Avoid system_limit crash on very large BVV gaps#3

Open
mattwaw67 wants to merge 1 commit into
vernemq:masterfrom
mattwaw67:fix/bvv-large-gap-system-limit
Open

Avoid system_limit crash on very large BVV gaps#3
mattwaw67 wants to merge 1 commit into
vernemq:masterfrom
mattwaw67:fix/bvv-large-gap-system-limit

Conversation

@mattwaw67

@mattwaw67 mattwaw67 commented Jul 2, 2026

Copy link
Copy Markdown

add_aux/2 built the "seen" bitmap with 1 bsl (M-N-1). When the gap
between the entry base N and the incoming dot M is huge (millions),
this allocates a multi-megabit bignum and crashes the emulator with
{system_limit, ...}.

Cap the shift: when the gap exceeds MAX_BSL_BITS, advance the base
directly to {M, 0} instead of materialising a giant bitmap.

add_aux/2 built the "seen" bitmap with `1 bsl (M-N-1)`. When the gap
between the entry base N and the incoming dot M is huge (millions),
this allocates a multi-megabit bignum and crashes the emulator with
{system_limit, ...}.

Cap the shift: when the gap exceeds MAX_BSL_BITS, advance the base
directly to {M, 0} instead of materialising a giant bitmap.
@mattwaw67 mattwaw67 force-pushed the fix/bvv-large-gap-system-limit branch from ea8168f to 758d346 Compare July 2, 2026 09:39
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant