[PATCH] Fix 'info os' crashes on sparc.

Pedro Alves palves@redhat.com
Tue Nov 20 14:44:00 GMT 2012


On 11/20/2012 06:13 AM, David Miller wrote:

> The thing is, this code still has a problem.  The number of cpus
> active doesn't tell us anything about what the largest cpu number
> might be.
> 
> The cpus numbers themselves can be arbitrarily sparse and beyond the
> number of cpus.
> 
> And it's the cpu numbers that are used to index these various tables.
> 

Indeed.

> gdb/
> 
> 2012-11-19  David S. Miller  <davem@davemloft.net>
> 
> 	* common/linux-osdata.c (get_number_of_cpu_cores): Delete.
> 	(linux_xfer_osdata_processes): Fetch _SC_NPROCESSORS_ONLN via
> 	sysconf.
> 	(get_cores_used_by_process): Update comment.

OK.  Thanks.

-- 
Pedro Alves



More information about the Gdb-patches mailing list