[Differential] [Request, 3 lines] D4640: Fix array allocation for non-continuous cpu numbers

Christoph Feck noreply at phabricator.kde.org
Fri Feb 17 02:09:11 UTC 2017


cfeck created this revision.
cfeck added a reviewer: Plasma.
cfeck set the repository for this revision to R106 KSysguard.
Restricted Application added a project: Plasma.
Restricted Application added a subscriber: plasma-devel.

REVISION SUMMARY
  As per https://bugs.kde.org/show_bug.cgi?id=376537 ksysguard crashes, when /proc/stat returns the following file:
  
  cpu0 x y z
  cpu3 x y z
  
  The issue is that it counts two CPUs, and later allocates two entries for the array, but uses the CPU number to index that array. An array with indices 0 and 3 should have 4 entries, not 2.

TEST PLAN
  Compiled. Could not test, because this is an SMP machine.

REPOSITORY
  R106 KSysguard

REVISION DETAIL
  https://phabricator.kde.org/D4640

AFFECTED FILES
  ksysguardd/Linux/stat.c

EMAIL PREFERENCES
  https://phabricator.kde.org/settings/panel/emailpreferences/

To: cfeck, #plasma
Cc: plasma-devel, lesliezhai, ali-mohamed, jensreuterberg, abetts, sebas, apol
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mail.kde.org/pipermail/plasma-devel/attachments/20170217/7081dd98/attachment.html>


More information about the Plasma-devel mailing list