Clang warns about unsequenced code in Pentium Pro workaround
Categories
(NSS :: Libraries, defect, P1)
Tracking
(Not tracked)
People
(Reporter: away, Assigned: jcj)
References
(Blocks 1 open bug)
Details
Attachments
(1 file)
#if defined(XP_WIN32)
/* This is works around some horrible cache/page thrashing problems
** on Win32. Without this, this loop can take up to 6 seconds at
** 100% CPU on a Pentium-Pro 200. The thing this changes is to
** increase the size of the stack frame and modify it.
** Moving the loop code itself seems to have no effect.
** Dunno why this combination makes a difference, but it does.
*/
waste[j & 0xf] = j++;
#endif
I only noticed it because I happened to see this warning scroll past during a build:
17:12:55 INFO - z:/build/build/src/security/nss/lib/pk11wrap/pk11slot.c(2136,27): warning: unsequenced modification and access to 'j' [-Wunsequenced]
17:12:55 INFO - waste[j & 0xf] = j++;
Do we still need this workaround?
Assignee | ||
Comment 1•6 years ago
|
||
That's amazing.
I'll patch this out in NSS 3.43.
(In reply to J.C. Jones [:jcj] (he/him) from comment #1)
I'll patch this out in NSS 3.43.
Is this still the plan? :-)
Assignee | ||
Comment 3•5 years ago
|
||
The comment indicated the wasted effort was to work around a cache issue on the
Pentium Pro. I think it has served its purpose.
Assignee | ||
Comment 4•5 years ago
|
||
Assignee | ||
Updated•5 years ago
|
Description
•