Repo Added
|
Files
89
|
Badge
README BADGES
|
push
github
Rework stack overflow handling. Reported by pwnhacker0x18. Fixed by Peter Cawley. (cherry picked from commit defe61a56) In case of the Lua stack overflow error, LuaJIT restores the `L->top` value and pushes the error message above. It is possible that the restored value is greater than `L->maxstack`, so pushing the error message causes dirty write out-of-bounds. This patch prevents it by overwriting stack overflow handling machinery. Now, in the aforementioned case, the last frame is replaced with a dummy frame to avoid dirty writes. In some cases, there may not be enough space on the stack to invoke the error handler. See the related changes in the <test/LuaJIT-tests/lang/stackov.lua>. Sergey Kaplun: * added the description and the test for the problem Part of tarantool/tarantool#11278
5710 of 6045 branches covered (94.46%)
Branch coverage included in aggregate %.
29 of 31 new or added lines in 2 files covered. (93.55%)
21793 of 23506 relevant lines covered (92.71%)
3834446.44 hits per line
Coverage | ∆ | File | Lines | Relevant | Covered | Missed | Hits/Line | Branch Hits | Branch Misses |
---|---|---|---|---|---|---|---|---|---|
13.79 | src/lj_utils_leb128.c | 132 | 51 | 7 | 44 | 1375966.0 + 219 | 1 | 6 | |
65.41 | src/lj_clib.c | 432 | 102 | 69 | 33 | 3709.0 + 15 | 18 | 13 | |
76.62 | src/lj_wbuf.c | 141 | 66 | 48 | 18 | 491422.0 + 83 | 11 | 0 | |
78.59 | src/lj_opt_fold.c | 2554 | 982 | 758 + 1 | 224 - 1 | 740385.0 + 30609 | 248 | 50 | |
78.75 | src/lib_math.c | 224 | 72 | 56 | 16 | 20826.0 + 18 | 7 | 1 | |
78.81 | src/lj_api.c | 1369 | 860 | 675 + 10 | 185 - 10 | 911656.0 - 12787 | 184 + 1 | 46 - 1 | |
84.03 | src/lj_ccall.c | 1183 | 172 | 145 | 27 | 30336.0 + 22 | 55 | 11 | |
84.21 | src/lj_load.c | 164 | 81 | 69 | 12 | 30980.0 + 94 | 11 | 3 | |
86.84 | src/lj_vmevent.c | 57 | 31 | 27 | 4 | 18809.0 | 6 | 1 | |
87.65 | src/lib_jit.c | 752 | 335 | 295 | 40 | 432.0 + 7 | 60 | 10 |