Skip to content
Success

Changes

Summary

  1. Refactor skiplist to avoid UB casts (#9660) (commit: 5946b93) (details)
Commit 5946b93a855eb2549260b36274e2ae43d14efa15 by noreply
Refactor skiplist to avoid UB casts (#9660)

This patch removes casts between struct skiplist * and struct skipcell *, and removes the "layout compatibility" fields in skiplist that were there to enable these casts.

The only algorithmic difference is that caml_skiplist_find is now "stop-at" (see discussion here), as this was slightly easier to write in the no-cast style.
(commit: 5946b93)
The file was modifiedruntime/skiplist.c (diff)
The file was modifiedruntime/caml/skiplist.h (diff)