Commit decb43f
[aix/ibmi] fix leaptiering crash
After enabling leaptiering by default I discovered a crash with
mksnapshot.
I rebuilt with DCHECKs enabled by setting: v8_enable_debugging_features
= true This revealed a DCHECK error while running mksnapshot at:
```sh
./mksnapshot
\ --turbo_instruction_scheduling
\ --stress-turbo-late-spilling
\ --target_os=aix
\ --target_arch=ppc64
\ --embedded_src gen/embedded.S
\ --predictable
\ --no-use-ic
\ --embedded_variant Default
\ --random-seed 314159265
\ --startup_blob snapshot_blob.bin
\ --native-code-counters
\ --concurrent-builtin-generation
\ --concurrent-turbofan-max-threads=0
\ --verify-heap
```
https://source.chromium.org/chromium/chromium/src/+/main:v8/src/sandbox/js-dispatch-table-inl.h;l=24
In the DCHECK above looks like kObjectPointerShift is set to 16 and
purpose of the check is to ensure the top 16 bits (2 bytes) are empty.
From what I understand mmap will give you back an address in 0x0A....
segment on AIX
0x0A00000000000000 - 0x0AFFFFFFFFFFFFFFF
More details:
https://www.ibm.com/docs/en/aix/7.2?topic=memory-1-tb-segment-aliasing
So there will be something set in the upper bits there leading to
garbage results once the bits get shuffled around.
I did some additional investigation and its looks like golang ran into a
similar problem on AIX and uses offsets
https://github.com/golang/go/blob/28d7eec3a23c04fb74863d032d499b76c3c3d4c3/src/runtime/malloc.go#L300-L304
My solution here is to introduce similar offset solution by adding
kObjectPointerOffset to the JSDispatchEntry struct.
Change-Id: I67ad82f78d763bd35ad90d6c45c8f123d28022fe
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/6320599
Reviewed-by: Olivier Flückiger <[email protected]>
Reviewed-by: Samuel Groß <[email protected]>
Commit-Queue: Samuel Groß <[email protected]>
Cr-Commit-Position: refs/heads/main@{#100011}1 parent 4f1eda2 commit decb43f
3 files changed
Lines changed: 40 additions & 9 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
1984 | 1984 | | |
1985 | 1985 | | |
1986 | 1986 | | |
1987 | | - | |
1988 | | - | |
1989 | | - | |
| 1987 | + | |
| 1988 | + | |
| 1989 | + | |
| 1990 | + | |
| 1991 | + | |
| 1992 | + | |
| 1993 | + | |
| 1994 | + | |
| 1995 | + | |
| 1996 | + | |
| 1997 | + | |
| 1998 | + | |
| 1999 | + | |
1990 | 2000 | | |
1991 | 2001 | | |
1992 | 2002 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
23 | 23 | | |
24 | 24 | | |
25 | 25 | | |
26 | | - | |
27 | | - | |
28 | | - | |
29 | | - | |
| 26 | + | |
| 27 | + | |
| 28 | + | |
| 29 | + | |
| 30 | + | |
| 31 | + | |
| 32 | + | |
| 33 | + | |
| 34 | + | |
| 35 | + | |
30 | 36 | | |
31 | 37 | | |
32 | 38 | | |
| |||
49 | 55 | | |
50 | 56 | | |
51 | 57 | | |
52 | | - | |
| 58 | + | |
| 59 | + | |
53 | 60 | | |
54 | 61 | | |
55 | 62 | | |
| |||
178 | 185 | | |
179 | 186 | | |
180 | 187 | | |
181 | | - | |
| 188 | + | |
| 189 | + | |
| 190 | + | |
182 | 191 | | |
183 | 192 | | |
184 | 193 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
75 | 75 | | |
76 | 76 | | |
77 | 77 | | |
| 78 | + | |
| 79 | + | |
| 80 | + | |
| 81 | + | |
| 82 | + | |
| 83 | + | |
| 84 | + | |
| 85 | + | |
| 86 | + | |
| 87 | + | |
| 88 | + | |
| 89 | + | |
78 | 90 | | |
79 | 91 | | |
80 | 92 | | |
| |||
0 commit comments