Subject: lib/17102: lib/libc/db generates different *.db file on 32bit and 64bit arch
To: None <gnats-bugs@gnats.netbsd.org>
From: None <itojun@itojun.org>
List: netbsd-bugs
Date: 05/30/2002 22:45:13
>Number: 17102
>Category: lib
>Synopsis: lib/libc/db generates different *.db file on 32bit and 64bit arch
>Confidential: no
>Severity: critical
>Priority: high
>Responsible: lib-bug-people
>State: open
>Class: sw-bug
>Submitter-Id: net
>Arrival-Date: Thu May 30 06:46:01 PDT 2002
>Closed-Date:
>Last-Modified:
>Originator: Jun-ichiro itojun Hagino
>Release: NetBSD 1.6A
>Organization:
itojun.org
>Environment:
System: NetBSD starfruit.itojun.org 1.6A NetBSD 1.6A (STARFRUIT) #22: Thu May 30 13:58:16 JST 2002 itojun@starfruit.itojun.org:/usr/home/itojun/NetBSD/src/sys/arch/i386/compile/STARFRUIT i386
Architecture: i386
Machine: i386
>Description:
*.db format declared in lib/libc/db should be common to all archs.
the format is bi-endian, however, it is not safe against 64bit/32bit
difference.
for instance, lib/libc/db/hash/hash.h uses "int" in struct hashhdr.
it results in 32bit field in 32bit arch, and 64bit field in 64bit arch.
therefore, we cannot share *.db file across 32bit and 64bit platforms.
>How-To-Repeat:
>Fix:
rewrite all on-disk format structure to use int32_t and such.
it would be a bit difficult to provide backward compatibility for
64bit-based *.db files.
>Release-Note:
>Audit-Trail:
>Unformatted: