Commit 7693da7
[vm] When dual mapping is enabled map the executable part as RX immediately
Currently the initial mapping for the executable mapping is read-only.
Once the first instruction object was allocated into an OS page we would
map that page as RX. Any further allocations of instructions objects
into the same page would just end up mapping it to RX again (even though
it is already that way).
To avoid those additional protection calls we can map the executable
mapping RX from the beginning (it will be filled with zeros after
allocation).
Issue #37739
Issue #36097
Change-Id: Ib83f0be8ea8dacc86646c0a3c0335f4886516caa
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/112244
Commit-Queue: Martin Kustermann <[email protected]>
Reviewed-by: Régis Crelier <[email protected]>1 parent 559f7cd commit 7693da7
File tree
3 files changed
+28
-8
lines changed- runtime/vm
3 files changed
+28
-8
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
80 | 80 | | |
81 | 81 | | |
82 | 82 | | |
| 83 | + | |
83 | 84 | | |
84 | 85 | | |
85 | 86 | | |
| |||
14964 | 14965 | | |
14965 | 14966 | | |
14966 | 14967 | | |
14967 | | - | |
| 14968 | + | |
| 14969 | + | |
| 14970 | + | |
| 14971 | + | |
| 14972 | + | |
| 14973 | + | |
| 14974 | + | |
14968 | 14975 | | |
14969 | 14976 | | |
14970 | 14977 | | |
14971 | 14978 | | |
| 14979 | + | |
| 14980 | + | |
| 14981 | + | |
| 14982 | + | |
| 14983 | + | |
| 14984 | + | |
14972 | 14985 | | |
14973 | | - | |
14974 | | - | |
14975 | | - | |
14976 | 14986 | | |
14977 | 14987 | | |
14978 | 14988 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
69 | 69 | | |
70 | 70 | | |
71 | 71 | | |
| 72 | + | |
| 73 | + | |
| 74 | + | |
| 75 | + | |
72 | 76 | | |
73 | 77 | | |
74 | 78 | | |
| |||
122 | 126 | | |
123 | 127 | | |
124 | 128 | | |
125 | | - | |
126 | | - | |
| 129 | + | |
| 130 | + | |
| 131 | + | |
| 132 | + | |
127 | 133 | | |
128 | 134 | | |
129 | 135 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
164 | 164 | | |
165 | 165 | | |
166 | 166 | | |
| 167 | + | |
| 168 | + | |
| 169 | + | |
167 | 170 | | |
168 | 171 | | |
169 | 172 | | |
| |||
188 | 191 | | |
189 | 192 | | |
190 | 193 | | |
| 194 | + | |
| 195 | + | |
191 | 196 | | |
192 | | - | |
193 | | - | |
| 197 | + | |
194 | 198 | | |
195 | 199 | | |
196 | 200 | | |
| |||
0 commit comments