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

Alan-Jowett / ebpf-verifier / 15194704016

22 May 2025 08:53AM UTC coverage: 88.11% (-0.07%) from 88.177%
15194704016

push

github

elazarg
uniform class names and explicit constructors for adapt_sgraph.hpp

Signed-off-by: Elazar Gershuni <elazarg@gmail.com>

27 of 30 new or added lines in 1 file covered. (90.0%)

481 existing lines in 33 files now uncovered.

8552 of 9706 relevant lines covered (88.11%)

9089054.61 hits per line

Source File
Press 'n' to go to next uncovered line, 'b' for previous

52.5
/src/crab/bitset_domain.cpp
1
// Copyright (c) Prevail Verifier contributors.
2
// SPDX-License-Identifier: MIT
3
#include <ostream>
4

5
#include "bitset_domain.hpp"
6

7
namespace prevail {
8
std::ostream& operator<<(std::ostream& o, const BitsetDomain& b) {
×
9
    o << "Numbers -> {";
×
10
    bool first = true;
×
11
    for (int i = -EBPF_TOTAL_STACK_SIZE; i < 0; i++) {
×
UNCOV
12
        if (b.non_numerical_bytes[EBPF_TOTAL_STACK_SIZE + i]) {
×
13
            continue;
×
14
        }
UNCOV
15
        if (!first) {
×
16
            o << ", ";
×
17
        }
18
        first = false;
×
19
        o << "[" << EBPF_TOTAL_STACK_SIZE + i;
×
20
        int j = i + 1;
×
UNCOV
21
        for (; j < 0; j++) {
×
UNCOV
22
            if (b.non_numerical_bytes[EBPF_TOTAL_STACK_SIZE + j]) {
×
23
                break;
24
            }
25
        }
UNCOV
26
        if (j > i + 1) {
×
27
            o << "..." << EBPF_TOTAL_STACK_SIZE + j - 1;
×
28
        }
UNCOV
29
        o << "]";
×
30
        i = j;
×
31
    }
UNCOV
32
    o << "}";
×
UNCOV
33
    return o;
×
34
}
35

36
StringInvariant BitsetDomain::to_set() const {
1,396✔
37
    if (this->is_bottom()) {
1,396✔
38
        return StringInvariant::bottom();
39
    }
40
    if (this->is_top()) {
1,396✔
41
        return StringInvariant::top();
1,242✔
42
    }
43

44
    std::set<std::string> result;
154✔
45
    for (int i = -EBPF_TOTAL_STACK_SIZE; i < 0; i++) {
629,628✔
46
        if (non_numerical_bytes[EBPF_TOTAL_STACK_SIZE + i]) {
629,474✔
47
            continue;
629,320✔
48
        }
49
        std::string value = "s[" + std::to_string(EBPF_TOTAL_STACK_SIZE + i);
154✔
50
        int j = i + 1;
154✔
51
        for (; j < 0; j++) {
1,310✔
52
            if (non_numerical_bytes[EBPF_TOTAL_STACK_SIZE + j]) {
1,310✔
53
                break;
77✔
54
            }
55
        }
56
        if (j > i + 1) {
154✔
57
            value += "..." + std::to_string(EBPF_TOTAL_STACK_SIZE + j - 1);
222✔
58
        }
59
        value += "].type=number";
154✔
60
        result.insert(value);
154✔
61
        i = j;
154✔
62
    }
154✔
63
    return StringInvariant{result};
154✔
64
}
154✔
65
} // namespace prevail
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