Skip to content

Fix intermittent assert failures in lutpack functions#505

Merged
alanminko merged 2 commits intoberkeley-abc:masterfrom
gigeresk:lutpack_assert_fix
May 3, 2026
Merged

Fix intermittent assert failures in lutpack functions#505
alanminko merged 2 commits intoberkeley-abc:masterfrom
gigeresk:lutpack_assert_fix

Conversation

@gigeresk
Copy link
Copy Markdown
Contributor

@gigeresk gigeresk commented May 2, 2026

The assert on line 200 causes intermittent failures for FPGA flows (as seen here). The assert is checking that pData doesn't hold a "small integer value" (<= 0xFFFF) which is a valid defensive check.
However, the check casts pData (8B on 64-bit) through ABC_PTRUINT_T to unsigned, which truncates the high 32 bits.
When pData is a valid pointer to data allocated at or above 4 GB boundaries, this assert is triggered because the high bits are non-zero but the lower 32 bits can be near zero.
This fix preserves the original intent and is safe on 32-bit and 64-bit platforms.

@alanminko alanminko merged commit 298bcee into berkeley-abc:master May 3, 2026
9 checks passed
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.

2 participants