-
-
Notifications
You must be signed in to change notification settings - Fork 32.1k
gh-91048: Prevent optimizing away the asyncio debug offsets structure on Windows #132963
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Changes from 2 commits
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -185,6 +185,10 @@ typedef struct { | |
/* Counter for autogenerated Task names */ | ||
uint64_t task_name_counter; | ||
|
||
/* Pointer to the asyncio debug offset to avoid it to be optimized away | ||
by the compiler in Windows (other platforms don't need this) */ | ||
void *debug_offsets; | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Then we'd even do not need the There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Yeah I still prefer to keep it |
||
|
||
} asyncio_state; | ||
|
||
static inline asyncio_state * | ||
|
@@ -4320,6 +4324,8 @@ module_init(asyncio_state *state) | |
goto fail; | ||
} | ||
|
||
state->debug_offsets = &_AsyncioDebug; | ||
|
||
Py_DECREF(module); | ||
return 0; | ||
|
||
|
Uh oh!
There was an error while loading. Please reload this page.