https://bugs.openldap.org/show_bug.cgi?id=10290
--- Comment #1 from Ondřej Kuzník ondra@mistotebe.net --- Another note.
Even if code is changed for rwm/syncrepl try to cooperate despite the callback order being what it is, things go wrong anyway: rwm allocates its modlist with ch_malloc, syncrepl gets it from op->o_tmpmemctx. They cannot safely free each other's modlists, knowing nothing about what the right way to go about it would be.