Repository navigation
Commit 9441ea9
TaskJob::getChildren(): fix iterator-invalidation UB, likely real cause of "internal files never show"
Same bug shape as the 16 sites fixed earlier today (GUIValues.C,
DavEDSI.C, etc., all found via that session's own audit): both filter
loops here called ret->erase(resItor) without reseating resItor from
erase()'s return value. erase() invalidates the iterator it's given;
the for loop's own next condition check then read a dangling iterator
-- undefined behavior, not just on the entry being filtered out but
for the rest of the iteration.
This is a strong, independent explanation for a longstanding report:
internal files (Inputs/Outputs, and without ECCE_DEVELOPER set,
Parameters/Props) have reportedly never actually displayed even when
"Show ECCE Internal Files" is on and nothing crashes -- unrelated to
the tree-reentrancy crashes fixed earlier today. Silently corrupting
the iteration right after the first filtered-out entry would explain
exactly that: whatever child happened to land next in the vector could
be silently dropped from the result too, not just the one meant to be
filtered.
Audited the same erase(iterator)-without-reseat pattern tree-wide
again; found one more site (Session.C:171) but it's safe (erase()
immediately followed by break, never touching the iterator again).
Co-Authored-By: Claude Sonnet 5 <noreply@anthropic.com>1 parent 8e847ff commit 9441ea9
1 file changed
Lines changed: 16 additions & 3 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
122 | 122 | | |
123 | 123 | | |
124 | 124 | | |
| 125 | + | |
| 126 | + | |
| 127 | + | |
| 128 | + | |
| 129 | + | |
| 130 | + | |
| 131 | + | |
| 132 | + | |
| 133 | + | |
| 134 | + | |
| 135 | + | |
| 136 | + | |
| 137 | + | |
125 | 138 | | |
126 | 139 | | |
127 | 140 | | |
128 | 141 | | |
129 | | - | |
| 142 | + | |
130 | 143 | | |
131 | 144 | | |
132 | 145 | | |
| |||
137 | 150 | | |
138 | 151 | | |
139 | 152 | | |
140 | | - | |
| 153 | + | |
141 | 154 | | |
142 | 155 | | |
143 | 156 | | |
144 | | - | |
| 157 | + | |
145 | 158 | | |
146 | 159 | | |
147 | 160 | | |
| |||
0 commit comments