NetBSD-Bugs archive
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]
Re: bin/52348: sh (alias.c:271) invokes undefined behaviour
The following reply was made to PR bin/52348; it has been noted by GNATS.
From: coypu%sdf.org@localhost
To: Robert Elz <kre%munnari.OZ.AU@localhost>
Cc: gnats-bugs%NetBSD.org@localhost
Subject: Re: bin/52348: sh (alias.c:271) invokes undefined behaviour
Date: Thu, 29 Jun 2017 06:25:30 +0000
I could get useful info by doing this:
#include <assert.h>
STATIC struct alias **
hashalias(const char *p)
{
unsigned int hashval;
assert(*p > -5);
hashval = *p << 4;
while (*p)
hashval+= *p++;
return &atab[hashval % ATABSIZE];
}
But instead it gives me in these cases:
[1] Abort trap AWK=/usr/src/obj...
*** Error code 134
and no coredump.
Home |
Main Index |
Thread Index |
Old Index