Commit ca9ae94
authored
empty_argv is no longer static in Python 3.8, but it is declared in
a temporary scope, whereas argv keeps a reference to it.
empty_argv memory (allocated on the stack) is reused by
make_sys_argv() code which is inlined when using gcc -O3.
Define empty_argv in PySys_SetArgvEx() body, to ensure
that it remains valid for the whole lifetime of
the PySys_SetArgvEx() call.
(cherry picked from commit c486825)
1 parent 994925b commit ca9ae94
2 files changed
Lines changed: 3 additions & 1 deletion
Lines changed: 1 addition & 0 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
| 1 | + | |
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
3080 | 3080 | | |
3081 | 3081 | | |
3082 | 3082 | | |
| 3083 | + | |
| 3084 | + | |
3083 | 3085 | | |
3084 | 3086 | | |
3085 | | - | |
3086 | 3087 | | |
3087 | 3088 | | |
3088 | 3089 | | |
| |||
0 commit comments