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

tarantool / luajit / 30092415860
93%
tarantool/master: 93%

Build:
Build:
LAST BUILD BRANCH: ligurio/lj-1459-ub-carith_ptr
DEFAULT BRANCH: tarantool/master
Ran 24 Jul 2026 12:18PM 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

24 Jul 2026 12:14PM UTC coverage: 93.219% (-0.01%) from 93.233%
30092415860

push

github

ligurio
FFI: Prevent sanitizer warning in carith_ptr().

Reported by Sergey Bronnikov.

(cherry picked from commit c3b379bf5)

The Undefined Behaviour Sanitizer [1] produce a warning about
signed integer overflow in the function carith_ptr(), when idx
equals INT_MIN in the expression idx = -idx. In practice,
on 32-bit platforms, negating -2147483648 wraps back to itself
instead of producing the correct positive value, leading to
incorrect pointer arithmetic in carith_ptr() for MM_sub (pointer
subtraction). The patch fixes that by converting idx to unsigned
(uintptr_t), computes two's complement negation via bitwise
negation + 1 (safe from overflow in unsigned arithmetic), and casts
back to ptrdiff_t. This avoids signed overflow entirely and
correctly negates even the INT_MIN edge case.

[1]: https://clang.llvm.org/docs/UndefinedBehaviorSanitizer.html

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

Part of tarantool/tarantool#12480

5734 of 6058 branches covered (94.65%)

Branch coverage included in aggregate %.

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

12 existing lines in 2 files now uncovered.

21871 of 23555 relevant lines covered (92.85%)

3971505.22 hits per line

Coverage Regressions

Lines Coverage ∆ File
10
77.88
-1.01% src/lj_api.c
2
92.0
-0.44% src/luajit.c
Jobs
ID Job ID Ran Files Coverage
1 30092415860.1 24 Jul 2026 12:18PM UTC 89
93.22
GitHub Action Run
Source Files on build 30092415860
  • Tree
  • List 89
  • Changed 3
  • Source Changed 0
  • Coverage Changed 3
Coverage ∆ File Lines Relevant Covered Missed Hits/Line Branch Hits Branch Misses
  • Back to Repo
  • Github Actions Build #30092415860
  • 7266d024 on github
  • Prev Build on tarantool/master (#27124968400)
  • Next Build on ligurio/lj-1459-ub-carith_ptr (#30093835005)
STATUS · Troubleshooting · Open an Issue · Sales · Support · CAREERS · ENTERPRISE · START FREE TRIAL · SCHEDULE DEMO
ANNOUNCEMENTS · TWITTER · TOS & SLA · Supported CI Services · What's a CI service? · Automated Testing

© 2026 Coveralls, Inc