Skip to content
Commit 730aa585 authored by Dmitry Vyukov's avatar Dmitry Vyukov
Browse files

tsan: make shadow mapping linear within a single user region

This is a follow up to r282152.
A more extensive testing on real apps revealed a subtle bug in r282152.
The revision made shadow mapping non-linear even within a single
user region. But there are lots of code in runtime that processes
memory ranges and assumes that mapping is linear. For example,
region memory access handling simply increments shadow address
to advance to the next shadow cell group. Similarly, DontNeedShadowFor,
java memory mover, search of heap memory block header, etc
make similar assumptions.
To trigger the bug user range would need to cross 0x008000000000 boundary.
This was observed for a module data section.

Make shadow mapping linear within a single user range again.
Add a startup CHECK for linearity.

llvm-svn: 282405
parent a48a998d
Loading
Loading
Loading
Loading
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please to comment