Logo AND Algorithmique Numérique Distribuée

Public GIT Repository
GARGH. Fix a *nasty* long standing bug in dictionaries (many thanks to Cristian)
authormquinson <mquinson@48e7efb5-ca39-0410-a469-dd3cf9ba447f>
Wed, 19 Aug 2009 13:51:22 +0000 (13:51 +0000)
committermquinson <mquinson@48e7efb5-ca39-0410-a469-dd3cf9ba447f>
Wed, 19 Aug 2009 13:51:22 +0000 (13:51 +0000)
commit1a87ce3be5a701f892a145f43328ebc369ea432f
treed4796d98189ea4ed8a0154245f75bd939649fc76
parentb53ef390fc0f797baa50fd59172db15c7ba92c81
GARGH. Fix a *nasty* long standing bug in dictionaries (many thanks to Cristian)

The deal is that strcmp was used regardless of whether the entry was
created through the _ext interface or not. So, when you used pointers
as key (as we do in gras datadesc for cycle detection for example),
the key got truncated on the first \0 (and the rest of it was
uninitialized).

This is what caused my bug with gras datadesc tests. And it happened
only some times because the pointer does not always contain a 0. And
it happened more often on 64bits because the pointers are longer and
thus have a bigger probability to contain \0.

Actually, this bug was already fixed by Cristian on 2008-11-25, but on
the mc branch of our private git in Nancy, and never propagated to the
trunk. We are still git childrens...

git-svn-id: svn+ssh://scm.gforge.inria.fr/svn/simgrid/simgrid/trunk@6605 48e7efb5-ca39-0410-a469-dd3cf9ba447f
src/xbt/dict_elm.c