About Meta Memory and Synchronisation

14 views
Skip to first unread message

Sath Prakash Chimmani

unread,
Mar 21, 2024, 10:22:41 PMMar 21
to thread-sanitizer
From reading through the source code of TSAN V3, I understand tsan maps App Addresses to Heap blocks(MBlock) and SyncVar(SyncVar) to monitor them (tsan_sync.h & tsan_sync.cpp).

My question is, 
1) What is MBlock?
2) Is Meta Memory an additional memory on top of Application Memory (like Shadow Memory)? 

I was wondering if anyone group can help me out. Thanks in advance!

Dmitry Vyukov

unread,
Mar 22, 2024, 3:44:18 AMMar 22
to Sath Prakash Chimmani, thread-sanitizer
On Fri, 22 Mar 2024 at 03:22, Sath Prakash Chimmani
<spchi...@gmail.com> wrote:
>
> From reading through the source code of TSAN V3, I understand tsan maps App Addresses to Heap blocks(MBlock) and SyncVar(SyncVar) to monitor them (tsan_sync.h & tsan_sync.cpp).
>
> My question is,
> 1) What is MBlock?

Hi Sath,

MBlock is a descriptor of a heap memory block.

> 2) Is Meta Memory an additional memory on top of Application Memory (like Shadow Memory)?

Yes, meta memory is a shadow memory.
Tsan has 2 shadow memory ranges: one that stores info about memory
access, and the meta shadow that stores info about heap blocks and
synchronization objects.

> I was wondering if anyone group can help me out. Thanks in advance!
>
> --
> You received this message because you are subscribed to the Google Groups "thread-sanitizer" group.
> To unsubscribe from this group and stop receiving emails from it, send an email to thread-sanitiz...@googlegroups.com.
> To view this discussion on the web visit https://groups.google.com/d/msgid/thread-sanitizer/0ac8f56c-5432-427f-a368-fc5d2c1e04b9n%40googlegroups.com.
Reply all
Reply to author
Forward
0 new messages