Commit 133c2ec
committed
CalDet<TPCPadFlags>: Protect against invalid reads
A continuation of the CalDet<TPCFlags> saga, possibly related
to https://its.cern.ch/jira/browse/O2-4671
Tests on ARM, even after deployment of the custom streamer
in #14830, still showed
segfaults in TPC digitization.
With the relevant code isolated into a unit test in
#14850, it was possible to
do a valgrind study. This showed Invalid reads to the mData of CalArray.
Thereafter, putting assert statements showed that we often access
CalArray<PadFlags> data slightly out of bounds - irrespective of custom
streamer or not. This then either indicates a problem in the code logic
or a problem with the calibration CCDB objects. This should clearly be
fixed.
In the meantime, this commit adds a protection against invalid accesses
and returns a trivial answer as well as an error message. This is in any
case better than undefined behaviour.
In addition, this commit introduces possibility to switch off the custom
streamer for further studies.1 parent 0fb4692 commit 133c2ec
File tree
3 files changed
+39
-3
lines changed- Detectors/TPC/base
- include/TPCBase
- src
3 files changed
+39
-3
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
26 | 26 | | |
27 | 27 | | |
28 | 28 | | |
| 29 | + | |
| 30 | + | |
| 31 | + | |
| 32 | + | |
| 33 | + | |
29 | 34 | | |
30 | 35 | | |
31 | 36 | | |
| |||
93 | 98 | | |
94 | 99 | | |
95 | 100 | | |
96 | | - | |
| 101 | + | |
| 102 | + | |
| 103 | + | |
| 104 | + | |
| 105 | + | |
97 | 106 | | |
98 | 107 | | |
99 | 108 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
30 | 30 | | |
31 | 31 | | |
32 | 32 | | |
| 33 | + | |
| 34 | + | |
| 35 | + | |
| 36 | + | |
| 37 | + | |
| 38 | + | |
33 | 39 | | |
34 | 40 | | |
35 | 41 | | |
| |||
211 | 217 | | |
212 | 218 | | |
213 | 219 | | |
214 | | - | |
| 220 | + | |
| 221 | + | |
| 222 | + | |
| 223 | + | |
| 224 | + | |
| 225 | + | |
| 226 | + | |
| 227 | + | |
| 228 | + | |
| 229 | + | |
| 230 | + | |
| 231 | + | |
| 232 | + | |
| 233 | + | |
| 234 | + | |
| 235 | + | |
| 236 | + | |
| 237 | + | |
| 238 | + | |
| 239 | + | |
215 | 240 | | |
216 | 241 | | |
217 | 242 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
69 | 69 | | |
70 | 70 | | |
71 | 71 | | |
72 | | - | |
| 72 | + | |
| 73 | + | |
| 74 | + | |
73 | 75 | | |
74 | 76 | | |
75 | 77 | | |
| |||
0 commit comments