Closed Bug 931144 Opened 11 years ago Closed 3 years ago

TSan: Blacklist JSRuntime::updateMallocCounter

Categories

(Core :: JavaScript: GC, defect)

x86_64
Linux
defect
Not set
critical

Tracking

()

RESOLVED FIXED

People

(Reporter: decoder, Assigned: decoder)

References

(Blocks 1 open bug)

Details

(Keywords: sec-want, Whiteboard: [tsan])

Attachments

(1 file)

The code in JSRuntime::updateMallocCounter does a racy update to gcMallocBytes, but according to the code comments, that is intended/accepted:

>     /* We tolerate any thread races when updating gcMallocBytes. */
>     ptrdiff_t oldCount = gcMallocBytes;
>     ptrdiff_t newCount = oldCount - ptrdiff_t(nbytes);
>     gcMallocBytes = newCount;


Since this function does not do anything else, there is no risk in blacklisting it.
Assignee: general → choller
Status: NEW → ASSIGNED
Attachment #822474 - Flags: review?(jcoppeard)
Comment on attachment 822474 [details] [diff] [review]
updateMallocCounter-blacklist.patch

Review of attachment 822474 [details] [diff] [review]:
-----------------------------------------------------------------

I don't mind blacklisting this for now, but a better solution may be to use atomics here.

This function is also touched by bug 926678 which I hope to land soon.
Attachment #822474 - Flags: review?(jcoppeard) → review+
Whiteboard: [tsan]

Looks like the malloc counter was replaced in bug 1569564, and the new one doesn't seem to raise any questions with tsan, so unless there's any concerns with the new malloc counter I'm going to close this old bug.

Status: ASSIGNED → RESOLVED
Closed: 3 years ago
Resolution: --- → FIXED
Component: JavaScript Engine → JavaScript: GC
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Created:
Updated:
Size: