Closed
Bug 974418
Opened 12 years ago
Closed 11 years ago
TSan: data race js/src/vm/NativeObject.h:218 clearShouldConvertDoubleElements
Categories
(Core :: JavaScript Engine, defect)
Tracking
()
RESOLVED
FIXED
mozilla39
| Tracking | Status | |
|---|---|---|
| firefox39 | --- | fixed |
People
(Reporter: decoder, Assigned: jandem)
References
(Blocks 1 open bug)
Details
(Whiteboard: [tsan])
Attachments
(3 files)
The attached logfile shows a thread/data race (mozilla-central revision file/tsan-trace100.txt) detected by TSan (ThreadSanitizer).
Typically, races reported by TSan are not false positives, but it is possible that the race is benign. Even in this case though, we should try to come up with a fix unless this would cause inacceptable performance issues. Also note that seemingly benign races can possibly be harmful (also depending on the compiler and the architecture) [1].
If the bug cannot be fixed, then this bug should be used to either make a compile-time annotation for blacklisting or add an entry to the runtime blacklist.
[1] http://software.intel.com/en-us/blogs/2013/01/06/benign-data-races-what-could-possibly-go-wrong
| Reporter | ||
Comment 1•12 years ago
|
||
I think the revision here was meant to be 44ba69cacd7e.
Comment 2•11 years ago
|
||
This race is still present.
Summary: TSan: data race js/src/vm/ObjectImpl.h:818 clearShouldConvertDoubleElements → TSan: data race js/src/vm/NativeObject.h:218 clearShouldConvertDoubleElements
Comment 3•11 years ago
|
||
Here's a more modern trace showing the same problem. Jan, do you know if anybody's able to take a look at this?
Flags: needinfo?(jdemooij)
| Assignee | ||
Comment 4•11 years ago
|
||
Nathan, sorry for the delay.
The problem is that we set/clear the convertDoubleElements flag on the NewArray template object in IonBuilder and CodeGenerator accesses this field. With this patch we no longer modify the template object but store the flag on MNewArray instead.
We now also pass the convertDoubleElements flag to the NewArray VM function, to avoid an unnecessary double conversion later on when that path is used (might matter for some large arrays).
Assignee: nobody → jdemooij
Status: NEW → ASSIGNED
Flags: needinfo?(jdemooij)
Attachment #8575233 -
Flags: review?(bhackett1024)
Comment 5•11 years ago
|
||
(In reply to Jan de Mooij [:jandem] from comment #4)
> Nathan, sorry for the delay.
No problem, thanks for looking at this!
Comment 6•11 years ago
|
||
...and just to confirm, the posted patch eliminates the data race according to a TSan run.
Updated•11 years ago
|
Attachment #8575233 -
Flags: review?(bhackett1024) → review+
| Assignee | ||
Comment 7•11 years ago
|
||
Status: ASSIGNED → RESOLVED
Closed: 11 years ago
status-firefox39:
--- → fixed
Resolution: --- → FIXED
Target Milestone: --- → mozilla39
You need to log in
before you can comment on or make changes to this bug.
Description
•