Closed Bug 1020118 Opened 10 years ago Closed 10 years ago

Win64 cppunittests: Assertion failure: atomic++ == array1 + 1 (Atomic post-increment did not work)

Categories

(Core :: MFBT, defect)

32 Branch
x86_64
Windows 7
defect
Not set
normal

Tracking

()

RESOLVED FIXED
mozilla32

People

(Reporter: away, Assigned: froydnj)

References

Details

Attachments

(1 file)

https://tbpl.mozilla.org/php/getParsedLog.php?id=40996677&tree=Date&full=1 http://dxr.mozilla.org/mozilla-central/source/mfbt/tests/TestAtomics.cpp#83 I can reproduce locally with VS2010. In TestPointerWithOrdering<int>, it seems that incrementing |atomic| moves it forward by 8 bytes, but an expression like |array1 + 1| refers to an offset of 4 bytes. Maybe there's some confusion between sizeof(int) and sizeof(int*)? There are so many layers of templates that I'm having trouble tracing this back to code.
(In reply to David Major [:dmajor] (UTC+12) from comment #0) > Maybe there's some confusion between sizeof(int) and sizeof(int*)? There are > so many layers of templates that I'm having trouble tracing this back to > code. Yeah, there's some bugginess here. Thanks for poking at things in the debugger, I think I have a fix.
Assignee: nobody → nfroyd
(In reply to David Major [:dmajor] (UTC+12) from comment #0) > https://tbpl.mozilla.org/php/getParsedLog.php?id=40996677&tree=Date&full=1 I am a little worried and slightly frightened that that orange is intermittent.
Whoops on using T* (or moral equivalent) when we should have been using T.
Attachment #8434437 - Flags: review?(Pidgeot18)
> I am a little worried and slightly frightened that that orange is intermittent. It was consistent on my machine and the (few) runs on Date. The tests are happy with this patch, thanks!
Attachment #8434437 - Flags: review?(Pidgeot18) → review+
Status: NEW → RESOLVED
Closed: 10 years ago
Resolution: --- → FIXED
Target Milestone: --- → mozilla32
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Created:
Updated:
Size: