In bookmark.c there are a couple of calls to bmark_margin_get_initial_bookmark() in which the (integer) 'offset' parameter is supplied as a pointer to a text iterator instead. I'm not sure if that even works but with upcoming changes to gcc (scheduled for gcc 14), this will result in a compile error regarding unsupported conversion between pointer and integer.
I am currently trying to fix some such issues ahead of the release of gcc 14, so the attached patch, which calls gtk_text_iter_get_offset() on the text iterator to provide the integer offset associated with that text iterator (which appears to be the intent of the code), fixes the compilation problem. This seems right but I haven't tested the resulting editor as I'm unfamiliar with its use of bookmarks.
I tried the modified code and it seemed to work. I added a couple of bookmarks and was able to go to first/last/next/previous successfully, then delete the bookmarks, without issues.
thanks, committed revision 9014.
I wonder if the old code actually worked, if I look at it the old code probably failed in many situations.