• Home
  • Features
  • Pricing
  • Docs
  • Announcements
  • Sign In

tarantool / luajit / 12808782020
93%
tarantool/master: 93%

Build:
Build:
LAST BUILD BRANCH: tarantool/release/3.6
DEFAULT BRANCH: tarantool/master
Ran 16 Jan 2025 12:26PM UTC
Jobs 1
Files 89
Run time 1min
Badge
Embed ▾
README BADGES
x

If you need to use a raster PNG badge, change the '.svg' to '.png' in the link

Markdown

Textile

RDoc

HTML

Rst

16 Jan 2025 12:21PM UTC coverage: 92.998% (+0.07%) from 92.93%
12808782020

push

github

Buristan
x86/x64: Add more red zone checks to assembler backend.

Thanks to Peter Cawley.

(cherry picked from commit d854d00ce)

Assembling some instructions (like `IR_CONV int.num`, for example) with
many mcode to be emitted may overflow the `MCLIM_REDZONE` (64) at once
due to the huge mcode emitting.

For example `IR_CONV` in this test requires 66 bytes of the
machine code:
|  cvttsd2si r15d, xmm5
|  xorps xmm9, xmm9
|  cvtsi2sd xmm9, r15d
|  ucomisd xmm5, xmm9
|  jnz 0x11edb00e5       ->37
|  jpe 0x11edb00e5       ->37
|  mov [rsp+0x80], r15d
|  mov r15, [rsp+0xe8]
|  movsd xmm9, [rsp+0xe0]
|  movsd xmm5, [rsp+0xd8]

The reproducer needs sufficient register pressure as to immediately
spill the result of the instruction to the stack and then reload the
three registers used by the instruction, and to have chosen enough
registers with numbers >=8 (because shaving off a REX prefix [1] or two
would get 66 back down to <= `MCLIM_REDZONE`), and to be using lots of
spill slots (because memory offsets <= 0x7f are shorter to encode
compared to those >= 0x80. So, each reload instruction consumes 9 bytes.
This makes this reproducer unstable (regarding the register allocator
changes). Thus, only original test case is added as a regression test.

This patch adds the red zone overflow checks more often for the IRs with
many instructions to be emitted.

Sergey Kaplun:
* added the description and the test for the problem

[1]: https://wiki.osdev.org/X86-64_Instruction_Encoding#REX_prefix

Part of tarantool/tarantool#10709

5697 of 6034 branches covered (94.41%)

Branch coverage included in aggregate %.

4 of 4 new or added lines in 1 file covered. (100.0%)

5 existing lines in 1 file now uncovered.

21705 of 23431 relevant lines covered (92.63%)

2937157.87 hits per line

Coverage Regressions

Lines Coverage ∆ File
5
78.42
-0.31% src/lj_opt_fold.c
Jobs
ID Job ID Ran Files Coverage
1 12808782020.1 16 Jan 2025 12:26PM UTC 89
93.0
GitHub Action Run
Source Files on build 12808782020
  • Tree
  • List 89
  • Changed 87
  • Source Changed 0
  • Coverage Changed 7
Coverage ∆ File Lines Relevant Covered Missed Hits/Line Branch Hits Branch Misses
  • Back to Repo
  • Github Actions Build #12808782020
  • 472fcee1 on github
  • Prev Build on tarantool/master (#12785483515)
  • Next Build on skaplun/lj-1116-redzones-checks (#12825437245)
STATUS · Troubleshooting · Open an Issue · Sales · Support · CAREERS · ENTERPRISE · START FREE · SCHEDULE DEMO
ANNOUNCEMENTS · TWITTER · TOS & SLA · Supported CI Services · What's a CI service? · Automated Testing

© 2026 Coveralls, Inc