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

tarantool / luajit / 8534112221
71%
tarantool/master: 93%

Build:
Build:
LAST BUILD BRANCH: tarantool/release/3.6
DEFAULT BRANCH: tarantool/master
Ran 03 Apr 2024 06:18AM UTC
Jobs 1
Files 89
Run time 77min
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

03 Apr 2024 06:07AM UTC coverage: 92.607% (+0.02%) from 92.583%
8534112221

push

github

Buristan
Prevent down-recursion for side traces.

Thanks to Sergey Kaplun.

(cherry picked from commit cae361187)

Assume we have the root trace that uses some spill slots with the
corresponding stack adjustment. Then its side trace will restore the
stack only at its tail. It may look like the following:

| ---- TRACE 4 mcode 1247
| 55557f7df953  mov rax, [r14-0xe28]
| 55557f7df95a  mov rax, [rax+0x30]
| 55557f7df95e  sub rax, rdx
| 55557f7df961  cmp rax, +0x68
| 55557f7df965  jb 0x55557f7d004c       ->0
| 55557f7df96b  add rsp, -0x10
| ...
| 55557f6efa71  cmp dword [rdx+0x4], -0x05
| 55557f6efa75  jnz 0x55557f6e004c      ->0
| ...
| 55557f7dfe29  add rsp, +0x10
| 55557f7dfe2d  jmp 0x5555556fe573
| ---- TRACE 4 stop -> stitch
|
| ---- TRACE 5 start 4/0
| ---- TRACE 5 mcode 101
| 55557f6ef9d4  mov dword [0x40000518], 0x5
| ...
| 55557f6efa30  add rsp, +0x10
| 55557f6efa34  jmp 0x55557f6ef9d4
| ---- TRACE 5 stop -> down-recursion

Such side traces have no stack adjustment at their heads since their
stack adjustment is inherited from the parent trace. The issue occurs if
the side trace has a down-recursion, as mentioned above. Before any
exit, we can jump back to the start of the trace several times with
growing `rsp`. In that case, the `rsp` is restored incorrectly after
exiting from the trace.

This patch forbids down-recursion for non-root traces.

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

Part of tarantool/tarantool#9595

5660 of 6018 branches covered (94.05%)

Branch coverage included in aggregate %.

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

12 existing lines in 4 files now uncovered.

21598 of 23416 relevant lines covered (92.24%)

2926632.1 hits per line

Uncovered Existing Lines

Lines Coverage ∆ File
1
77.24
-0.08% src/lj_opt_fold.c
2
97.59
-0.19% src/lj_trace.c
3
96.7
0.0% src/lj_asm.c
6
96.2
-0.37% src/lj_record.c
Jobs
ID Job ID Ran Files Coverage
1 8534112221.1 03 Apr 2024 06:18AM UTC 89
92.61
GitHub Action Run
Source Files on build 8534112221
  • Tree
  • List 89
  • Changed 84
  • Source Changed 0
  • Coverage Changed 10
Coverage ∆ File Lines Relevant Covered Missed Hits/Line Branch Hits Branch Misses
  • Back to Repo
  • Github Actions Build #8534112221
  • 21a6ba22 on github
  • Prev Build on tarantool/master (#8511999542)
  • Next Build on skaplun/lj-1169-down-rec-side (#8534112315)
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

© 2025 Coveralls, Inc