Commit 2cf6043
authored
Fix assert Crash when code size is 0
I encountered a crash from the asertion line (e.g. 1240) when running a Cython generated extension module (grpc-python, which creates async def functions) under PYTHONDEBUGMODE.
It appears that the co object created by Cython in this case has a zero length code bytes -- which probably made sense because there is no python bytecode.
Assuming Cython is correct in reporting a non-zero sized co object in this case, I think we can short circuit the Addr* functions for zero sized co objects.1 parent 28d91d0 commit 2cf6043
1 file changed
Lines changed: 2 additions & 2 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
1015 | 1015 | | |
1016 | 1016 | | |
1017 | 1017 | | |
1018 | | - | |
| 1018 | + | |
1019 | 1019 | | |
1020 | 1020 | | |
1021 | 1021 | | |
| |||
1232 | 1232 | | |
1233 | 1233 | | |
1234 | 1234 | | |
1235 | | - | |
| 1235 | + | |
1236 | 1236 | | |
1237 | 1237 | | |
1238 | 1238 | | |
| |||
0 commit comments