2005/05/22

Mozilla shlibsing が SEGV をだす。

gdbに食わせると
SIGSEGV
dbm/src/hash.c:154

extern DB*
__hash_open(const char *file, int flags, int mode, const HASHINFO *info, int dflags)
{
HTAB *hashp=NULL;
struct stat statbuf;
DB *dbp;
int bpages, hdrsize, new_table, nsegs, save_errno;

if ((flags & O_ACCMODE) == O_WRONLY) {
errno = EINVAL;
return NULL;
}

/* zero the statbuffer so that
* we can check it for a non-zero
* date to see if stat succeeded
*/
memset(&statbuf, 0, sizeof(struct stat));


memset(&statbuf, 0, sizeof(struct stat));
なんで?
これはgcc-4.0のバグではなかろーか。
http://lxr.mozilla.org/
Mozilla の code から探すときに便利です。