On Sat, 15 Jun 2013, Henrik Grubbström (Lysator) @ Pike (-) developers forum wrote:
There are quite a few CritBit-related failures right now. Could they be related to the renumbering of PIKE_T_*?
I think that is related to the stack renumbering. But I did not bisect and also didnt investigate.
I believe that I've found the cause:
In serveral places in the CritBit module (eg the macro tree_header.H:CB_CHECK_KEY():
| #define CB_CHECK_KEY(svalue, fun, num) do { \ | CB_TRANSFORM_KEY(svalue); \ | if (!((svalue)->type & T_KEY)) \ | SIMPLE_BAD_ARG_ERROR(fun, (num), STRFY(key_ptype)); \ | } while(0)
) the type checking for svalues is broken. Note that the type check for the svalue above for some reason uses the &-operator. When T_KEY == PIKE_T_INT == 0 these tests will always break hard.
Fixing the above set of bugs reduced the number of CritBit testsuite failures to 4.
Note that the old code would happily accept floats instead of ints (not too bad), and multisets, objects, functions, programs or types (ie everything except arrays, ints or floats) instead of strings (which is worse, since it is likely to follow broken pointers).