Commit 4bbcd5f
Don't always initialize codeExtra
Summary:
Currently we're eagerly initializing `codeExtra` for code objects. This isn't buying us much - we're allocating memory for every code object even if we don't need it. And this isn't even memory that we'll get to share between workers because the second we run a code object for the first time we'll COW it to update the count.
But this is also causing issues in 3.14. There are tests that are arguably bad - they create a CoExtra free function that's written in Python and is marshalled out via c-types. When CPython frees the co_extra's it doesn't actually check to see if the value is NULL - it just blindly calls the free function. When we have these populated on all code objects it causes us to crash when w call the freed ctypes wrapper.
Reviewed By: alexmalyshev
Differential Revision: D79215117
fbshipit-source-id: a4e33871847436424e12e4fcbf7be30fbf867b351 parent 43888c9 commit 4bbcd5f
1 file changed
Lines changed: 0 additions & 1 deletion
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
652 | 652 | | |
653 | 653 | | |
654 | 654 | | |
655 | | - | |
656 | 655 | | |
657 | 656 | | |
658 | 657 | | |
| |||
0 commit comments