[sldev] [PATCH] VWR-962: llprocessor.cpp: enable x86 detection forGCC

Thomas Rowland tom at cornish-pasty.com
Mon Jun 4 20:14:05 PDT 2007


The code +719,28 (in CProcessor::AnalyzeAMDProcessor) could be updated to
include https://jira.secondlife.com/browse/VWR-1049
Simply, the sizeof calculations are broken by a misplaced closing brace;

strncpy( CPUInfo.strBrandID, tmp, sizeof( CPUInfo.strBrandID-1 ) );
CPUInfo.strBrandID[ sizeof( CPUInfo.strBrandID-1 ) ] = '\0';

Where sizeof returns 4
Should be;

strncpy( CPUInfo.strBrandID, tmp, sizeof( CPUInfo.strBrandID ) -1 );
CPUInfo.strBrandID[ sizeof( CPUInfo.strBrandID ) -1 ] = '\0';

Where sizeof is then 64-1

> -----Original Message-----
> From: sldev-bounces at lists.secondlife.com 
> [mailto:sldev-bounces at lists.secondlife.com] On Behalf Of Dzonatas
> Sent: 04 June 2007 23:15
> To: sldev at lists.secondlife.com
> Subject: [sldev] [PATCH] VWR-962: llprocessor.cpp: enable x86 
> detection forGCC
> 
> 
> I've updated the patch to VWR-962. I've confirmed it works on Windows 
> and x86 Linux.
> 
> This alone will produce the raw detection. There are updates 
> I made to 
> related files that process this data further for better results.
> 
> Raw results will most likely be off on scaled processors for 
> Linux since 
> the application doesn't have root access, for example to set desired 
> affinity like Windows easily gives.
> 
> I do not see the CPUSlow mask applied after this patch and 
> the related 
> patches.
> 
> https://jira.secondlife.com/browse/VWR-962
> 
> https://jira.secondlife.com/secure/attachment/10715/llprocesso
r.r62589.patch.txt


-- 
_______________________________________________
Click here to unsubscribe or manage your list subscription:
/index.html



More information about the SLDev mailing list