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

llnl / dftracer-utils / 28286012595

27 Jun 2026 10:04AM UTC coverage: 51.056% (-1.3%) from 52.356%
28286012595

Pull #79

github

web-flow
Merge 6c6535a19 into 8eb383f39
Pull Request #79: Add Valgrind memory checking (C++, Python, MPI) and fix the bugs it found

32079 of 80165 branches covered (40.02%)

Branch coverage included in aggregate %.

129 of 149 new or added lines in 11 files covered. (86.58%)

5116 existing lines in 181 files now uncovered.

32739 of 46790 relevant lines covered (69.97%)

9929.31 hits per line

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

75.86
/src/dftracer/utils/python/indexer_checkpoint.cpp
1
#include <dftracer/utils/python/indexer_checkpoint.h>
2
#include <structmember.h>
3

4
PyObject *IndexerCheckpoint_new(PyTypeObject *type, PyObject *args,
85✔
5
                                PyObject *kwds) {
6
    IndexerCheckpointObject *self;
7
    self = (IndexerCheckpointObject *)type->tp_alloc(type, 0);
85✔
8
    if (self != NULL) {
85!
9
        memset(&self->checkpoint, 0, sizeof(dft_indexer_checkpoint_t));
85✔
10
    }
85✔
11
    return (PyObject *)self;
85✔
12
}
13

14
static void IndexerCheckpoint_dealloc(IndexerCheckpointObject *self) {
85✔
15
    free(self->checkpoint.dict_compressed);
85✔
16
    self->checkpoint.dict_compressed = NULL;
85✔
17
    Py_TYPE(self)->tp_free((PyObject *)self);
85✔
18
}
85✔
19

20
#if PY_VERSION_HEX >= 0x030C0000  // >= 3.12
21

22
static PyMemberDef IndexerCheckpoint_members[] = {
23
    {"checkpoint_idx", Py_T_ULONGLONG,
24
     offsetof(IndexerCheckpointObject, checkpoint.checkpoint_idx), 0,
25
     "Checkpoint index"},
26
    {"uc_offset", Py_T_ULONGLONG,
27
     offsetof(IndexerCheckpointObject, checkpoint.uc_offset), 0,
28
     "Uncompressed offset"},
29
    {"uc_size", Py_T_ULONGLONG,
30
     offsetof(IndexerCheckpointObject, checkpoint.uc_size), 0,
31
     "Uncompressed size"},
32
    {"c_offset", Py_T_ULONGLONG,
33
     offsetof(IndexerCheckpointObject, checkpoint.c_offset), 0,
34
     "Compressed offset"},
35
    {"c_size", Py_T_ULONGLONG,
36
     offsetof(IndexerCheckpointObject, checkpoint.c_size), 0,
37
     "Compressed size"},
38
    {"bits", Py_T_UINT, offsetof(IndexerCheckpointObject, checkpoint.bits), 0,
39
     "Bit position"},
40
    {"num_lines", Py_T_ULONGLONG,
41
     offsetof(IndexerCheckpointObject, checkpoint.num_lines), 0,
42
     "Number of lines in this chunk"},
43
    {NULL} /* Sentinel */
44
};
45

46
#else
47

48
static PyMemberDef IndexerCheckpoint_members[] = {
49
    {"checkpoint_idx", T_ULONGLONG,
50
     offsetof(IndexerCheckpointObject, checkpoint.checkpoint_idx), 0,
51
     "Checkpoint index"},
52
    {"uc_offset", T_ULONGLONG,
53
     offsetof(IndexerCheckpointObject, checkpoint.uc_offset), 0,
54
     "Uncompressed offset"},
55
    {"uc_size", T_ULONGLONG,
56
     offsetof(IndexerCheckpointObject, checkpoint.uc_size), 0,
57
     "Uncompressed size"},
58
    {"c_offset", T_ULONGLONG,
59
     offsetof(IndexerCheckpointObject, checkpoint.c_offset), 0,
60
     "Compressed offset"},
61
    {"c_size", T_ULONGLONG,
62
     offsetof(IndexerCheckpointObject, checkpoint.c_size), 0,
63
     "Compressed size"},
64
    {"bits", T_UINT, offsetof(IndexerCheckpointObject, checkpoint.bits), 0,
65
     "Bit position"},
66
    {"num_lines", T_ULONGLONG,
67
     offsetof(IndexerCheckpointObject, checkpoint.num_lines), 0,
68
     "Number of lines in this chunk"},
69
    {NULL} /* Sentinel */
70
};
71

72
#endif
73

74
PyTypeObject IndexerCheckpointType = {
75
    PyVarObject_HEAD_INIT(NULL, 0) "indexer.IndexerCheckpoint", /* tp_name */
76
    sizeof(IndexerCheckpointObject),       /* tp_basicsize */
77
    0,                                     /* tp_itemsize */
78
    (destructor)IndexerCheckpoint_dealloc, /* tp_dealloc */
79
    0,                                     /* tp_vectorcall_offset */
80
    0,                                     /* tp_getattr */
81
    0,                                     /* tp_setattr */
82
    0,                                     /* tp_as_async */
83
    0,                                     /* tp_repr */
84
    0,                                     /* tp_as_number */
85
    0,                                     /* tp_as_sequence */
86
    0,                                     /* tp_as_mapping */
87
    0,                                     /* tp_hash */
88
    0,                                     /* tp_call */
89
    0,                                     /* tp_str */
90
    0,                                     /* tp_getattro */
91
    0,                                     /* tp_setattro */
92
    0,                                     /* tp_as_buffer */
93
    Py_TPFLAGS_DEFAULT,                    /* tp_flags */
94
    "IndexerCheckpoint objects",           /* tp_doc */
95
    0,                                     /* tp_traverse */
96
    0,                                     /* tp_clear */
97
    0,                                     /* tp_richcompare */
98
    0,                                     /* tp_weaklistoffset */
99
    0,                                     /* tp_iter */
100
    0,                                     /* tp_iternext */
101
    0,                                     /* tp_methods */
102
    IndexerCheckpoint_members,             /* tp_members */
103
    0,                                     /* tp_getset */
104
    0,                                     /* tp_base */
105
    0,                                     /* tp_dict */
106
    0,                                     /* tp_descr_get */
107
    0,                                     /* tp_descr_set */
108
    0,                                     /* tp_dictoffset */
109
    0,                                     /* tp_init */
110
    0,                                     /* tp_alloc */
111
    IndexerCheckpoint_new,                 /* tp_new */
112
};
113

114
int init_indexer_checkpoint(PyObject *m) {
1✔
115
    if (PyType_Ready(&IndexerCheckpointType) < 0) return -1;
1!
116

117
    Py_INCREF(&IndexerCheckpointType);
1✔
118
    if (PyModule_AddObject(m, "IndexerCheckpoint",
2!
119
                           (PyObject *)&IndexerCheckpointType) < 0) {
1✔
UNCOV
120
        Py_DECREF(&IndexerCheckpointType);
×
UNCOV
121
        Py_DECREF(m);
×
122
        return -1;
×
123
    }
124

125
    return 0;
1✔
126
}
1✔
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