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

qmonnet / rbpf / 6040169379
96%

Build:
DEFAULT BRANCH: main
Ran 31 Aug 2023 04:50PM UTC
Jobs 1
Files 10
Run time 1s
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

31 Aug 2023 04:48PM UTC coverage: 95.988% (+0.008%) from 95.98%
6040169379

push

github

qmonnet
src/jit.rs: Fix offset when skipping insns for handling divisions by 0

When dividing by the content of a register, we have a specific case to
handle divisions by zero. When the denominator is not 0, we skip the
related instructions by emitted a near jump with the relevant offset.

However, this offset was incorrect. We accounted for two instructions: a
2-byte long XOR of the destination register with itself to set it to 0,
and a 5-byte long jump. The former may in fact emit 3 bytes under
certain condition, depending on the destination in use. For example,
when dividing from r7, we emit 3 bytes, and the fixed offset of 7 bytes
we used is incorrect, and triggers a segfault.

To fix this, let's add a check to determine the offset value we should
use. We also add related tests to make sure we don't regress on this in
the future.

Fixes: ce7d416d9a98 ("src/jit.rs: Update behaviour for divisions by zero (JIT)")
Fixes: https://github.com/qmonnet/rbpf/issues/88
Reported-by: Officeyutong
Signed-off-by: Quentin Monnet <quentin@isovalent.com>

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

3278 of 3415 relevant lines covered (95.99%)

211.56 hits per line

Jobs
ID Job ID Ran Files Coverage
1 6040169379.1 31 Aug 2023 04:50PM UTC 0
95.99
GitHub Action Run
Source Files on build 6040169379
Detailed source file information is not available for this build.
  • Back to Repo
  • 0f365500 on github
  • Prev Build on main (#5175807998)
  • Next Build on main (#6101827603)
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