Commit be944da
Fix transform node null store cache on exception and restore NUMPY_ARRAY_CONVERTER null check
Two fixes for py:vectypes:
1. declared_transform.hpp: When stores_.insert() creates a new entry with a
default (null) value and the user callback throws, the null entry remained
in the cache. On subsequent messages with the same hash, the null store was
reused and sent downstream, causing null pointer propagation through the
graph. Fix: wrap the callback in try/catch and erase the entry on exception.
2. modulewrap.cpp: Restore the null check for pyobj in NUMPY_ARRAY_CONVERTER
that was removed in PR #213. Without it, PyArray_Check(nullptr) and
Py_DECREF(nullptr) cause undefined behavior, leading to intermittent
SEGFAULTs or incorrect behavior.
Co-authored-by: greenc-FNAL <2372949+greenc-FNAL@users.noreply.github.com>1 parent baf4717 commit be944da
File tree
2 files changed
+21
-12
lines changed- phlex/core
- plugins/python/src
2 files changed
+21
-12
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
98 | 98 | | |
99 | 99 | | |
100 | 100 | | |
101 | | - | |
102 | | - | |
103 | | - | |
104 | | - | |
105 | | - | |
106 | | - | |
107 | | - | |
108 | | - | |
109 | | - | |
110 | | - | |
111 | | - | |
112 | | - | |
| 101 | + | |
| 102 | + | |
| 103 | + | |
| 104 | + | |
| 105 | + | |
| 106 | + | |
| 107 | + | |
| 108 | + | |
| 109 | + | |
| 110 | + | |
| 111 | + | |
| 112 | + | |
| 113 | + | |
| 114 | + | |
| 115 | + | |
| 116 | + | |
| 117 | + | |
113 | 118 | | |
114 | 119 | | |
115 | 120 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
405 | 405 | | |
406 | 406 | | |
407 | 407 | | |
| 408 | + | |
| 409 | + | |
| 410 | + | |
| 411 | + | |
408 | 412 | | |
409 | 413 | | |
410 | 414 | | |
| |||
0 commit comments