https://gcc.gnu.org/bugzilla/show_bug.cgi?id=119151
--- Comment #6 from Jakub Jelinek <jakub at gcc dot gnu.org> --- Created attachment 60682 --> https://gcc.gnu.org/bugzilla/attachment.cgi?id=60682&action=edit gcc15-pr119151.patch I agree with your analysis and as I tried to write in the comment, I think it can't be updated during btree_remove unless we walk the tree back to parent (perhaps through recursion), so insertion seems to be the only spot this can be fixed up. I think we shouldn't fix the parent slot's separator in btree_insert though, just the current slot's and fix up the parent slot's in btree_split_inner as done in the attached patch. So far tested just with your reproducer and I'm afraid I don't have any JIT around which could stress test it, I think pretty much everything in GCC testsuite just uses the .eh_frame_hdr based registration at least on targets I'm routinely testing.