[SERVER-31271] don't use nspr allocator for js threads for better ASAN Created: 26/Sep/17  Updated: 30/Oct/23  Resolved: 29/Sep/17

Status: Closed
Project: Core Server
Component/s: None
Affects Version/s: None
Fix Version/s: 3.4.10, 3.6.0-rc0

Type: Bug Priority: Major - P3
Reporter: Gabriel Russell (Inactive) Assignee: Gabriel Russell (Inactive)
Resolution: Fixed Votes: 0
Labels: None
Remaining Estimate: Not Specified
Time Spent: Not Specified
Original Estimate: Not Specified

Issue Links:
Backports
Depends
Backwards Compatibility: Fully Compatible
Operating System: ALL
Backport Requested:
v3.4
Sprint: Platforms 2017-10-02
Participants:
Linked BF Score: 0

 Description   

js threads can be freed in different threads than where they were created, and this breaks our ASAN-specific pointer tracker. So, if we just use the regular allocator for the threads, as opposed to the nspr allocator, then we won't try to track them.



 Comments   
Comment by Githook User [ 06/Oct/17 ]

Author:

{'email': 'gabriel.russell@mongodb.com', 'name': 'Gabriel Russell', 'username': 'gabrielrussell'}

Message: SERVER-31271 don't use nspr allocator for js threads for better ASAN

We can't use the nspr allocator to allocate threads in PR_CreateThread, because under asan
instrument the allocator so that asan can track the pointers correctly. This instrumentation
requires that pointers be deleted in the same thread that they were allocated in.
The threads created in PR_CreateThread are not always freed in the same thread
that they were created in. So, we use the standard allocator here.
Branch: v3.4
https://github.com/mongodb/mongo/commit/d1105687533de0db72f2ceba0cd5f2612145c956

Comment by Githook User [ 29/Sep/17 ]

Author:

{'email': 'gabriel.russell@mongodb.com', 'name': 'Gabriel Russell', 'username': 'gabrielrussell'}

Message: SERVER-31271 don't use nspr allocator for js threads for better ASAN

We can't use the nspr allocator to allocate threads in PR_CreateThread, because under asan
instrument the allocator so that asan can track the pointers correctly. This instrumentation
requires that pointers be deleted in the same thread that they were allocated in.
The threads created in PR_CreateThread are not always freed in the same thread
that they were created in. So, we use the standard allocator here.
Branch: master
https://github.com/mongodb/mongo/commit/496835b0e7b0a16d423d412c4622479a659c0d1d

Generated at Thu Feb 08 04:26:30 UTC 2024 using Jira 9.7.1#970001-sha1:2222b88b221c4928ef0de3161136cc90c8356a66.