|
Ran
|
Jobs
1
|
Files
89
|
Run time
1min
|
Badge
README BADGES
|
push
github
MIPS64: Avoid unaligned load in lj_vm_exit_interp. Thanks to Sergey Kaplun. (cherry picked from commit 2aec641e0) MIPS processors originally required all memory accesses to be naturally aligned. If we use ld instruction to load a double-word from the address which is word-aligned, MIPS raises the exception SIGBUS. When exiting the interpreter, if the current function is a fast function, the code in the `lj_vm_exit_interp()` throws SIGBUS. The pc field for the fast function points to the word-aligned bytecodes for ASM fast functions, and PC2PROTO offset is double-word-aligned. The resulting address is somewhere in the dispatch table. Hence, some (odd-indexed) fast function access leads to the BUS error. For other architectures the load from unaligned access is not a problem so there are no exceptions. This patch prevents unaligned memory access by address loading only after fast-function checks. Sergey Kaplun: * added the description and the test for the problem Part of tarantool/tarantool#12134 Reviewed-by: Sergey Bronnikov <sergeyb@tarantool.org> Signed-off-by: Sergey Kaplun <skaplun@tarantool.org>
5712 of 6049 branches covered (94.43%)
Branch coverage included in aggregate %.
21804 of 23525 relevant lines covered (92.68%)
3912088.65 hits per line
| Lines | Coverage | ∆ | File |
|---|---|---|---|
| 2 |
92.0 |
-0.44% | src/luajit.c |
| 7 |
77.42 |
-0.39% | src/lj_opt_fold.c |
| 10 |
77.8 |
-1.01% | src/lj_api.c |
| ID | Job ID | Ran | Files | Coverage | |
|---|---|---|---|---|---|
| 1 | 23050958461.1 | 89 |
93.04 |
GitHub Action Run |
| Coverage | ∆ | File | Lines | Relevant | Covered | Missed | Hits/Line | Branch Hits | Branch Misses |
|---|