Skip to content

Commit 460d5ee

Browse files
authored
Merge branch 'main' into mh14779/numba-csp-v1
2 parents 3274897 + 84e0ad6 commit 460d5ee

2 files changed

Lines changed: 7 additions & 3 deletions

File tree

.github/workflows/conda.yml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -78,7 +78,7 @@ jobs:
7878
- name: Checkout
7979
uses: actions/checkout@v6
8080

81-
- uses: mamba-org/setup-micromamba@v2
81+
- uses: mamba-org/setup-micromamba@v3
8282
with:
8383
micromamba-version: '2.3.2-0'
8484
environment-file: conda/dev-environment-unix.yml
@@ -89,7 +89,7 @@ jobs:
8989
post-cleanup: 'all'
9090
if: ${{ runner.os != 'Windows' }}
9191

92-
- uses: mamba-org/setup-micromamba@v2
92+
- uses: mamba-org/setup-micromamba@v3
9393
with:
9494
micromamba-version: '2.3.2-0'
9595
environment-file: conda/dev-environment-win.yml

cpp/csp/python/PyNode.cpp

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -307,8 +307,12 @@ void PyNode::executeImpl()
307307

308308
if( tsinputTicked( idx ) || passiveConvert )
309309
{
310-
Py_XDECREF( *m_localVars[ idx ] );
310+
//Note this is intentionally kept in a temp and decref-ed after updating m_localVars[idx] since
311+
//lastValueToPython can trigger a GC Collect which can reach into generator vars ( localVars ) which would be nulled out
312+
PyObject * old = *m_localVars[ idx ];
311313
*m_localVars[ idx ] = lastValueToPython( ts );
314+
Py_XDECREF( old );
315+
312316
if( passiveConvert )
313317
m_passiveCounts[ idx ] = count;
314318
}

0 commit comments

Comments
 (0)