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

tarantool / luajit / 12864531570
93%

Build:
DEFAULT BRANCH: tarantool/master
Ran 20 Jan 2025 09:18AM 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

20 Jan 2025 08:41AM UTC coverage: 92.998% (+0.03%) from 92.973%
12864531570

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

Reviewed-by: Sergey Bronnikov <sergeyb@tarantool.org>
Signed-off-by: Sergey Kaplun <skaplun@tarantool.org>

5692 of 6031 branches covered (94.38%)

Branch coverage included in aggregate %.

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

7 existing lines in 3 files now uncovered.

21708 of 23432 relevant lines covered (92.64%)

2945654.5 hits per line

Uncovered Existing Lines

Lines Coverage ∆ File
1
78.5
-0.08% src/lj_opt_fold.c
2
93.09
-0.99% src/lj_ir.c
4
94.74
-2.87% src/lj_str.c
Jobs
ID Job ID Ran Files Coverage
1 12864531570.1 20 Jan 2025 09:17AM UTC 89
93.0
GitHub Action Run
Source Files on build 12864531570
  • Tree
  • List 89
  • Changed 87
  • Source Changed 0
  • Coverage Changed 9
Coverage ∆ File Lines Relevant Covered Missed Hits/Line Branch Hits Branch Misses
  • Back to Repo
  • Github Actions Build #12864531570
  • 861a120f on github
  • Prev Build on tarantool/master (#12862147048)
  • Next Build on tarantool/master (#12890351666)
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