On Tue, 23 Apr 2002 11:09:00 +1000, 
Keith Owens <[EMAIL PROTECTED]> wrote:
>On 22 Apr 2002 17:16:31 -0700, 
>Thomas Duffy <[EMAIL PROTECTED]> wrote:
>>hrm.  don't seem to have a core.  lemme redo it with core dumps turned
>>on.  since this is intermittent, I might need to try for a few times to
>>get it to fail...
>>tduffy@curie:/tmp/kbuild21$ ./scripts/pp_dbdump > /tmp/dbdump
>>unknown record, type l (108), recno 7693413, length 20
>
>'lude', data overwrite somewhere.  That explains the failing assertion,
>record C-39973 has been overwritten.  I will go and stare at the code.

Tom, please try this against core-6.  Using a key directly from a
database record for an operation that might move records is wrong.

diff -ur 2.4.18-kbuild-2.5/scripts/pp_db.c 2.4.18-kbuild-2.5.new/scripts/pp_db.c
--- 2.4.18-kbuild-2.5/scripts/pp_db.c   Thu Apr 25 11:35:38 2002
+++ 2.4.18-kbuild-2.5.new/scripts/pp_db.c       Thu Apr 25 11:28:42 2002
@@ -802,14 +813,15 @@
 new_db_##l##_list(PPDB * db, DB_TOKEN *list_p)                                        
 \
 {                                                                              \
        DB_REC_##U##_LIST d, *c = &d;                                           \
-       datum key = {                                                           \
-               .dptr = (DPTR_T) list_p,                                        \
-               .dsize = sizeof (*list_p)                                       \
-       };                                                                      \
+       DB_TOKEN token;                                                         \
+       datum key;                                                              \
        assert(DB_IS_NULL_TOKEN(*list_p));                                      \
        memset(c, 0, sizeof (*c));                                              \
        __empty_db_##l##_list                                                   \
        assign_db_key(DB_RECTYPE_##U##_LIST, list_p);                           \
+       token = *list_p;                                                        \
+       key.dptr = (DPTR_T) &token;                                             \
+       key.dsize = sizeof (token);                                             \
        new_db_chunk(db, key, c, sizeof(*c), 0, 0);                             \
 }                                                                              \
                                                                                \


_______________________________________________
kbuild-devel mailing list
[EMAIL PROTECTED]
https://lists.sourceforge.net/lists/listinfo/kbuild-devel

Reply via email to