intmap: add test case which failed, extracted from real world usage.
authorRusty Russell <rusty@rustcorp.com.au>
Mon, 26 Mar 2018 10:37:34 +0000 (21:07 +1030)
committerRusty Russell <rusty@rustcorp.com.au>
Mon, 26 Mar 2018 10:37:34 +0000 (21:07 +1030)
commit4d9c7e1c2f899930a0bef5f05391615875ff668c
treed00b400b36b7c68093bfdbcecd38e7f4915fe729
parente59acd521d11c1f392264762d79195fd6cc2b992
intmap: add test case which failed, extracted from real world usage.

Because intmap_after_() would simply examine the critbits to walk the
tree, it wouldn't realize that it might be in the completely wrong tree.

In this case:

         Bit 4:
         0   1
        /     \
       /       \
  100000011  100001011

When we ask for intmap_after_(011111111) we would check the critbit, it's
a 1, so we end up on the right leaf instead of the left.

Signed-off-by: Rusty Russell <rusty@rustcorp.com.au>
ccan/intmap/test/run-after-fail.c [new file with mode: 0644]