All users were logged out of Bugzilla on October 13th, 2018

TSan: Blacklist JSRuntime::updateMallocCounter

ASSIGNED
Assigned to

Status

()

--
critical
ASSIGNED
5 years ago
5 years ago

People

(Reporter: decoder, Assigned: decoder)

Tracking

(Blocks: 1 bug, {sec-want})

Trunk
x86_64
Linux
sec-want
Points:
---

Firefox Tracking Flags

(Not tracked)

Details

(Whiteboard: [tsan])

Attachments

(1 attachment)

(Assignee)

Description

5 years ago
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)

Comment 1

5 years ago
Created attachment 822474 [details] [diff] [review]
updateMallocCounter-blacklist.patch
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]
You need to log in before you can comment on or make changes to this bug.