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

tarantool / luajit / 5999839971
93%

Build:
DEFAULT BRANCH: tarantool/master
Ran 28 Aug 2023 12:33PM UTC
Jobs 1
Files 89
Run time 2s
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

28 Aug 2023 12:11PM UTC coverage: 88.157% (+0.02%) from 88.133%
5999839971

push

github

igormunkin
Fix predict_next() in parser.

Reported by Sergey Kaplun.

(cherry-picked from commit caf7cbc57)

Assume, we have the following Lua code:
| local _
| for _ in (nil):foo() do end

The first part of the bytecode emitted for it is the following:
| 0001    KNIL     0   1
| 0002    MOV      2   1
| 0003    TGETS    1   1   0  ; "foo"
| 0004    CALL     1   4   2

The `0001 KNIL` is a result of merging two `KPRI` instructions: one for
the local variable, one for the slot with `nil` object. During parsing in
`predict_next()` the second `MOV` bytecode is examined to set `pairs` or
`next` local variable. But, as far as it moves `nil` value, that isn't
an actual variable and has no the name, so this leads to the crash.

This patch adds a check to be sure that `RD` (see <src/lj_bc.h>) in the
`MOV` bytecode is an actual variable.

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

Part of tarantool/tarantool#8825

Reviewed-by: Maxim Kokryashkin <m.kokryashkin@tarantool.org>
Reviewed-by: Sergey Bronnikov <sergeyb@tarantool.org>
Signed-off-by: Igor Munkin <imun@tarantool.org>

5326 of 5963 branches covered (0.0%)

Branch coverage included in aggregate %.

20452 of 23278 relevant lines covered (87.86%)

1291476.03 hits per line

Uncovered Existing Lines

Lines Coverage ∆ File
1
95.68
-0.05% src/lj_record.c
6
94.74
-4.31% src/lj_str.c
Jobs
ID Job ID Ran Files Coverage
1 5999839971.1 28 Aug 2023 12:33PM UTC 89
88.16
GitHub Action Run
Source Files on build 5999839971
  • Tree
  • List 89
  • Changed 85
  • Source Changed 0
  • Coverage Changed 6
Coverage ∆ File Lines Relevant Covered Missed Hits/Line Branch Hits Branch Misses
  • Back to Repo
  • Github Actions Build #5999839971
  • 61ebb67b on github
  • Prev Build on imun/tarantool-master (#5972391182)
  • Next Build on tarantool/master (#6003489289)
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