NetBSD-Bugs archive

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]

Re: port-alpha/48782: # top [1] Floating point exception (core dumped) top



The following reply was made to PR port-alpha/48782; it has been noted by GNATS.

From: Martin Husemann <martin%duskware.de@localhost>
To: gnats-bugs%NetBSD.org@localhost
Cc: 
Subject: Re: port-alpha/48782: # top [1] Floating point exception (core dumped) 
top
Date: Sun, 4 May 2014 09:42:47 +0200

 This would only paper over the issue, as the code does a division by zero in
 hash_lookup_uint():
 
 412         result = NULL;
 413         if ((bucket = &(ht->buckets[(key % ht->num_buckets)])) != NULL)
 414         {
 415             ll = &(bucket->list);
 
 and ht->num_buckets is 0 (and an integer type). This is undefined
 behaviour - but I am actually not sure why libm changes interfere
 here, though I remember similar effects on sun3 due to bugs in fp emulation
 of TME.
 
 Martin
 


Home | Main Index | Thread Index | Old Index