|
Ran
|
Jobs
1
|
Files
89
|
Run time
266min
|
Badge
README BADGES
|
push
github
Handle stack reallocation in debug.setmetatable() and lua_setmetatable(). Thanks to Sergey Kaplun. (cherry picked from commit 88ed9fdbb) When we use the aforementioned functions to set a metatable for types with one shared metatable, we must flush all traces since they are specialized to base metatables. If we have enabled vmevent handlers, they invoke a callback on trace flushing. This callback may reallocate the Lua stack. Thus invalidates the reference to the `TValue *` object `o` by the given index in the `lua_setmetatable()` and leads to a heap-use-after-free error. This patch fixes the behaviour by recalculating the address by the given index after possible stack reallocation. Sergey Kaplun: * added the description and the test for the problem Part of tarantool/tarantool#9595 Reviewed-by: Maxim Kokryashkin <m.kokryashkin@tarantool.org> Reviewed-by: Sergey Bronnikov <sergeyb@tarantool.org> Signed-off-by: Sergey Kaplun <skaplun@tarantool.org> (cherry picked from commit e996ad3d7)
5661 of 6018 branches covered (94.07%)
Branch coverage included in aggregate %.
1 of 1 new or added line in 1 file covered. (100.0%)
7 existing lines in 4 files now uncovered.21623 of 23417 relevant lines covered (92.34%)
2934682.08 hits per line
| Lines | Coverage | ∆ | File |
|---|---|---|---|
| 1 |
96.15 |
-0.05% | src/lj_record.c |
| 1 |
96.08 |
-0.18% | src/lj_opt_mem.c |
| 1 |
89.7 |
2.35% | src/lj_crecord.c |
| 4 |
94.74 |
-2.87% | src/lj_str.c |
| ID | Job ID | Ran | Files | Coverage | |
|---|---|---|---|---|---|
| 1 | 8554012556.1 | 89 |
92.69 |
GitHub Action Run |
| Coverage | ∆ | File | Lines | Relevant | Covered | Missed | Hits/Line | Branch Hits | Branch Misses |
|---|