bin/129706: top(1) corrupts SIZE field when a process allocates
yanefbsd at gmail.com
Tue Dec 16 23:00:05 PST 2008
The following reply was made to PR bin/129706; it has been noted by GNATS.
From: "Garrett Cooper" <yanefbsd at gmail.com>
To: "Bruce Cran" <bruce at cran.org.uk>
Cc: freebsd-gnats-submit at freebsd.org
Subject: Re: bin/129706: top(1) corrupts SIZE field when a process allocates 2048GB memory
Date: Tue, 16 Dec 2008 22:51:42 -0800
On Tue, Dec 16, 2008 at 10:30 PM, Bruce Cran <bruce at cran.org.uk> wrote:
>>Synopsis: top(1) corrupts SIZE field when a process allocates 2048GB memory
>>Arrival-Date: Wed Dec 17 06:40:01 UTC 2008
>>Originator: Bruce Cran
> FreeBSD 7.1-RC1 amd64
> When a process allocates over 2TB, top can corrupt the SIZE field and display a series of characters instead. It only appears to happen on TB boundaries - i.e 2048GB, 3072GB etc. 7.1-RC1 and 8-CURRENT (from 2008-12-15) both show the problem.
> Compile the following code and once running run top to see the process listed.
> #include <stdlib.h>
> int main(void)
> char *c = malloc(2048LL*1024*1024*1024);
> return 0;
Although I'd love to say it's top, it sounds more like a weird corner
case dealing with overflow / underflow and vmem allocation.
More information about the freebsd-bugs