Repo Added
|
Files
89
|
Badge
README BADGES
|
push
github
Fix error generation in load*. Reported by Sergey Kaplun. (cherry picked from commit e76bb50d4) The chunkname pointer to the "@filename" is put on the Lua stack before the `lua_loadx()` and is removed right before the next `lua_pushfstring()` in case of the error. If the GC takes the step right at this moment inside `lua_pushfstring()` the string may be collected, and the next read from this `chunkname + 1` is from the deallocated memory. This patch fixes this by using the source string (or the constant one) instead. Sergey Kaplun: * added the description and the test for the problem Part of tarantool/tarantool#11278 Reviewed-by: Sergey Bronnikov <sergeyb@tarantool.org> Signed-off-by: Sergey Kaplun <skaplun@tarantool.org> (cherry picked from commit 046e9b3a0)
5711 of 6047 branches covered (94.44%)
Branch coverage included in aggregate %.
2 of 2 new or added lines in 1 file covered. (100.0%)
22 existing lines in 5 files now uncovered.21786 of 23509 relevant lines covered (92.67%)
3867303.07 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 | 1394329.0 - 125 | 1 | 6 | |
65.41 | src/lj_clib.c | 432 | 102 | 69 | 33 | 3678.0 - 33 | 18 | 13 | |
76.62 | src/lj_wbuf.c | 141 | 66 | 48 | 18 | 497973.0 - 29 | 11 | 0 | |
77.8 | src/lj_api.c | 1369 | 860 | 665 - 10 | 195 + 10 | 928866.0 + 16007 | 183 - 1 | 47 + 1 | |
78.44 | src/lj_opt_fold.c | 2554 | 982 | 756 - 2 | 226 + 2 | 721795.0 - 21990 | 248 | 50 | |
78.75 | src/lib_math.c | 224 | 72 | 56 | 16 | 20799.0 - 28 | 7 | 1 | |
84.03 | src/lj_ccall.c | 1183 | 172 | 145 | 27 | 30035.0 - 301 | 55 | 11 | |
86.84 | src/lj_vmevent.c | 57 | 31 | 27 | 4 | 18810.0 + 1.0 | 6 | 1 | |
87.65 | src/lib_jit.c | 752 | 335 | 295 | 40 | 441.0 + 4 | 60 | 10 | |
87.77 | src/lj_sysprof.c | 577 | 194 | 166 | 28 | 1847.0 + 217 | 35 | 0 |