``Strong typing is a crutch for people with weak memories.''
Correct a bug that should have wreaked havoc everywhere, but for some reason only bit unlucky people who use `-march' optimizations. The compiler cannot assist one in distinguishing between the two function calls below. int nsdispatch(void *, ...); void *discard; nsdispatch(&discard, ...); /* correct .. no, really! */ nsdispatch(discard, ...); /* Boom */ Robin provided me with a debugging environment in which I could see what was going on. Badness when using CPUTYPE was Reported by: "Robin P. Blanchard" <Robin.Blanchard@gactr.uga.edu> Reported by: nork Sponsored by: DARPA, Network Associates Laboratories
This commit is contained in:
parent
29fde418c1
commit
5460b1abd2
@ -929,12 +929,12 @@ compat_group(void *retval, void *mdata, va_list ap)
|
||||
errnop);
|
||||
break;
|
||||
case nss_lt_id:
|
||||
rv = _nsdispatch(discard, dtab, NSDB_GROUP_COMPAT,
|
||||
rv = _nsdispatch(&discard, dtab, NSDB_GROUP_COMPAT,
|
||||
"getgrgid_r", compatsrc, gid, grp, buffer, bufsize,
|
||||
errnop);
|
||||
break;
|
||||
case nss_lt_name:
|
||||
rv = _nsdispatch(discard, dtab, NSDB_GROUP_COMPAT,
|
||||
rv = _nsdispatch(&discard, dtab, NSDB_GROUP_COMPAT,
|
||||
"getgrnam_r", compatsrc, name, grp, buffer,
|
||||
bufsize, errnop);
|
||||
break;
|
||||
@ -945,7 +945,7 @@ compat_group(void *retval, void *mdata, va_list ap)
|
||||
break;
|
||||
case COMPAT_MODE_NAME:
|
||||
set_lookup_type(dtab, nss_lt_name);
|
||||
rv = _nsdispatch(discard, dtab, NSDB_GROUP_COMPAT,
|
||||
rv = _nsdispatch(&discard, dtab, NSDB_GROUP_COMPAT,
|
||||
"getgrnam_r", compatsrc, st->name, grp, buffer, bufsize,
|
||||
errnop);
|
||||
switch (rv) {
|
||||
|
Loading…
Reference in New Issue
Block a user