[master] 8ce9d4069 vtree: Inject contextual parent checks during import

Dridi Boukelmoune dridi.boukelmoune at gmail.com
Mon Apr 28 13:22:06 UTC 2025


commit 8ce9d40697edfaabd38866bf47df5644058e5dbd
Author: Dridi Boukelmoune <dridi.boukelmoune at gmail.com>
Date:   Thu Apr 17 13:26:17 2025 +0200

    vtree: Inject contextual parent checks during import
    
    This is an attempt at adding assertions without keeping track of a
    specific line of code. Tested with tree.h from the current tip of the
    main branch.
    
    Refs freebsd/freebsd-src at a962800a09a45b8f702ebd1a06b8f20bc84e97b1

diff --git a/tools/import_vtree_from_freebsd.sh b/tools/import_vtree_from_freebsd.sh
index dd8fd69c1..3a2d8f3ba 100644
--- a/tools/import_vtree_from_freebsd.sh
+++ b/tools/import_vtree_from_freebsd.sh
@@ -16,8 +16,7 @@ git diff vtree.h | git apply -R > /dev/null 2>&1 || true
 GR=f6e54eb360a78856dcde930a00d9b2b3627309ab
 (cd /usr/src/ && git show $GR:sys/sys/tree.h ) |
 sed -E '
-485a\
-		AN(parent);			\\
+s/(\t*)parent = RB_PARENT.*/\0\n\1AN(parent);\t\t\t\t\\/
 s/_SYS_TREE_H_/_VTREE_H_/
 s/__uintptr_t/uintptr_t/g
 s/SPLAY/VSPLAY/g


More information about the varnish-commit mailing list