Skip to content

Increase max_thunk_size from 1 MiB to 8 MiB#1583

Open
bamo wants to merge 1 commit into
rui314:mainfrom
bamo:fix/bump-max-thunk-size
Open

Increase max_thunk_size from 1 MiB to 8 MiB#1583
bamo wants to merge 1 commit into
rui314:mainfrom
bamo:fix/bump-max-thunk-size

Conversation

@bamo
Copy link
Copy Markdown
Contributor

@bamo bamo commented May 14, 2026

Large C++ debug libraries on ARM64 (e.g. deal.II's libdeal_II.g.so) can have batches whose first-pass thunk group exceeds 4 MiB — mostly PLT- routed DSO imports — tripping the assertion at thunks.cc:217. 8 MiB is the smallest clean power-of-two cap above the empirical threshold (4 MiB fails, 5 MiB works).

d_thunk_end already reserves max_thunk_size of space ahead of d, so a larger cap is safe by construction. No measurable wall-time or RSS impact in our testing.

Fixes #1538.

Large C++ debug libraries on ARM64 (e.g. deal.II's libdeal_II.g.so) can
have batches whose first-pass thunk group exceeds 4 MiB — mostly PLT-
routed DSO imports — tripping the assertion at thunks.cc:217. 8 MiB is
the smallest clean power-of-two cap above the empirical threshold (4 MiB
fails, 5 MiB works).

d_thunk_end already reserves max_thunk_size of space ahead of d, so a
larger cap is safe by construction. No measurable wall-time or RSS
impact in our testing.

Fixes rui314#1538.
@bamo
Copy link
Copy Markdown
Contributor Author

bamo commented May 15, 2026

build failure is fixed by #1580

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

1 participant