Adding a key which is a full prefix of another leads to valgrind warning
When trying to add a key which is a full prefix of another key the following valgrind warning is issued: ==2159== Conditional jump or move depends on uninitialised value(s) ==2159== at 0x4015A8: add_child4 (art.c:420) ==2159== by 0x401CBD: recursive_insert (art.c:519) ==2159== by 0x401CBD: art_insert (art.c:583) ==2159== by 0x400842: append (test.c:36) ==2159== by 0x400842: main (test.c:73) ==2159== ==2159== Conditional jump or move depends on uninitialised value(s) ==2159== at 0x4010EA: find_child (art.c:138) ==2159== by 0x40193A: art_search (art.c:249) ==2159== by 0x400852: append (test.c:38) ==2159== by 0x400852: main (test.c:73) ==2159==
While that action is not allowed by the API (according to issue #12), it would be preferable to fail instead of triggering undefined behaviour.
The program triggering that behaviour is at: http://paste.fedoraproject.org/281806/42043514
@nmav I agree, there should have been a return error code or something. However, now it would be a breaking API change.