Uh oh!
There was an error while loading.Please reload this page.
- Notifications
You must be signed in to change notification settings - Fork34k
[tracemalloc] initialize gil_state in functions to stop -Wmaybe-uninitialized warnings#144341
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 ourterms of service andprivacy statement. We’ll occasionally send you account related emails.
Already on GitHub?Sign in to your account
Uh oh!
There was an error while loading.Please reload this page.
Changes fromall commits
File filter
Filter by extension
Conversations
Uh oh!
There was an error while loading.Please reload this page.
Jump to
Uh oh!
There was an error while loading.Please reload this page.
Diff view
Diff view
There are no files selected for viewing
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -525,7 +525,7 @@ tracemalloc_alloc(int need_gil, int use_calloc, | ||
| goto done; | ||
| } | ||
| PyGILState_STATE gil_state = PyGILState_UNLOCKED; | ||
| if (need_gil) { | ||
| gil_state = PyGILState_Ensure(); | ||
| } | ||
| @@ -575,7 +575,7 @@ tracemalloc_realloc(int need_gil, void *ctx, void *ptr, size_t new_size) | ||
| goto done; | ||
| } | ||
| PyGILState_STATE gil_state = PyGILState_UNLOCKED; | ||
| if (need_gil) { | ||
| gil_state = PyGILState_Ensure(); | ||
| } | ||
| @@ -1207,11 +1207,14 @@ int | ||
| PyTraceMalloc_Track(unsigned int domain, uintptr_t ptr, | ||
| size_t size) | ||
| { | ||
| PyGILState_STATE gil_state = PyGILState_UNLOCKED; | ||
Member 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. This change is not needed. | ||
| if (_Py_atomic_load_int_relaxed(&tracemalloc_config.tracing) == 0) { | ||
| /* tracemalloc is not tracing: do nothing */ | ||
| return -2; | ||
| } | ||
| gil_state = PyGILState_Ensure(); | ||
| TABLES_LOCK(); | ||
| int result; | ||
Uh oh!
There was an error while loading.Please reload this page.