Closed Bug 39712 Opened 24 years ago Closed 24 years ago

Work around the /GT bug of MSVC 6.0 SP3

Categories

(NSPR :: NSPR, defect, P3)

x86
Windows NT
defect

Tracking

(Not tracked)

RESOLVED FIXED

People

(Reporter: wtc, Assigned: wtc)

Details

Attachments

(4 files)

It appears that the /O2 /GT flag of MSVC 6.0 SP3
fails to generate fiber-safe code to access
static thread-local storage, and there are
ways to work around this compiler optimization
bug.  We need to confirm this bug with Microsoft.
Status: NEW → ASSIGNED
Target Milestone: --- → 4.1
Still awaiting a response from Microsoft.

Checked in the workaround (attachment id=8868) on
the main trunk.
/cvsroot/mozilla/nsprpub/config/WIN32.mk, revision 3.10
/cvsroot/mozilla/nsprpub/pr/src/md/windows/ntthread.c, revision 3.10

This workaround needs to be thoroughly tested.
This compiler bug may be fixed in MSVC 6.0 SP4:
Q262515: The /GT compiler option leaves TLSIndex as a constant.
The URL for that Knowledge Base article is
http://support.microsoft.com/support/kb/articles/q262/5/15.asp.

Larry will test SP4 to see if it fixes this bug.
I verified that MSVC 6.0 SP4 generated correct code for
the Switch() function in the sample code fiber.c.  (See
attachment id=10721.)

Larry verified that NSPR's cvar2 test does not hang on
a dual-CPU Windows NT machine when NSPR is built optimized
with MSVC 6.0 SP4.  (That test hangs on a dual-CPU box
if NSPR is built optimized with MSVC 6.0 SP3.)

So I removed the workaround for this compiler bug in
ntthread.c.
/cvsroot/mozilla/nsprpub/pr/src/md/windows/ntthread.c, revision 3.13

We will require MSVC 6.0 SP4 for building the Windows NT
version of NSPR. MSVC 6.0 SP4 can be downloaded from
http://msdn.microsoft.com/vstudio/sp.

Marked the bug fixed.
Status: ASSIGNED → RESOLVED
Closed: 24 years ago
Resolution: --- → FIXED
I removed the -Og- workaround for this bug in WIN32.mk on
the NSPRPUB_RELEASE_4_0_BRANCH.
/cvsroot/mozilla/nsprpub/config/WIN32.mk, revision 3.9.18.1

On the NSPRPUB_CLIENT_BRANCH.
/cvsroot/mozilla/nsprpub/config/WIN32.mk, revision 3.9.32.1
Target Milestone: 4.1 → 4.0.1
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Creator:
Created:
Updated:
Size: