* gmalloc.c: Fix bug that causes malloc & free to
authorJohn Gilmore <gnu@cygnus>
Sat, 7 Dec 1991 12:16:13 +0000 (12:16 +0000)
committerJohn Gilmore <gnu@cygnus>
Sat, 7 Dec 1991 12:16:13 +0000 (12:16 +0000)
commit1d0709e2a5f0eab3479845bef72a36a0ef17c314
tree298dd8b471617faedc3a974de3bd4c3be5855e80
parent0e0643c7a6aa4c31988d081081ec9b7f8d9a33b2
* gmalloc.c:  Fix bug that causes malloc & free to
fail on systems where pointers have the high bit set (0x800efcf0
for example).  The problem is that the difference between two
pointers is a signed integer, so the computation

(char *) 0x800efcf0 - (char *) 0

yields a negative value.  The sign of the result of the modulus
operator is machine dependent for negative operands, thus it is
possible for it to end up negative.  From Fred Fish.
gdb/gmalloc.c
This page took 0.023514 seconds and 4 git commands to generate.