Commit 0980dc8
Fix re-entrancy problem while initialization interpreter frame
Summary:
Fixes S544229
There is some surprise re-entrancy below `_PyFrame_InitializeExternalFrame`. The allocation can presumably release the GIL or cause GC and therefore the function can be initialized before we try calling it a 2nd time. This causes us to only perform the initialization if the object is still a non-function.
D78124674 would presumably fix this as well in that we're not replacing the function object anymore, so we'd just update it. But w/ D78124674 someone else's reifier could say they don't want to update the function in which case this is the right fix.
Reviewed By: diansheng92
Differential Revision: D78930696
fbshipit-source-id: bbc37bee98744c1e04939baea84b3108d046b8cf1 parent 65e8bb0 commit 0980dc8
1 file changed
Lines changed: 4 additions & 0 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
167 | 167 | | |
168 | 168 | | |
169 | 169 | | |
| 170 | + | |
| 171 | + | |
| 172 | + | |
| 173 | + | |
170 | 174 | | |
171 | 175 | | |
172 | 176 | | |
| |||
0 commit comments