Issue 36308: Fix warning in _PyPathConfig_ComputeArgv0
Created on 2019-03-15 20:25 by matrixise, last changed 2022-04-11 14:59 by admin. This issue is now closed.
| Pull Requests | |||
|---|---|---|---|
| URL | Status | Linked | Edit |
| PR 12357 | closed | matrixise, 2019-03-15 20:28 | |
| Messages (6) | |||
|---|---|---|---|
| msg338027 - (view) | Author: Stéphane Wirtel (matrixise) * ![]() |
Date: 2019-03-15 20:25 | |
Python/pathconfig.c: In function '_PyPathConfig_ComputeArgv0': Python/pathconfig.c:615:26: warning: 'argv0' may be used uninitialized in this function [-Wmaybe-uninitialized] wchar_t *q = wcsrchr(argv0, SEP); ^~~~~~~~~~~~~~~~~~~ |
|||
| msg338029 - (view) | Author: Stéphane Wirtel (matrixise) * ![]() |
Date: 2019-03-15 20:31 | |
@vstinner I just initialized argv0 to NULL but the wcsrchr could generate a SIGSEGV. What do you suggest for the initial value of argv0? try to detect the sys.executable and use it for argv0? |
|||
| msg338369 - (view) | Author: Pablo Galindo Salgado (pablogsal) * ![]() |
Date: 2019-03-19 15:54 | |
This issue is already been handled in https://github.com/python/cpython/pull/12441 |
|||
| msg338370 - (view) | Author: Stéphane Wirtel (matrixise) * ![]() |
Date: 2019-03-19 15:56 | |
Yep, Victor has started the refactoring/cleaning after my PR, but I close this one and the issue. |
|||
| msg338373 - (view) | Author: Pablo Galindo Salgado (pablogsal) * ![]() |
Date: 2019-03-19 16:04 | |
Thanks for the time detecting this, opening this issue and the PR (and all the others), Stéphane! :) |
|||
| msg338374 - (view) | Author: Stéphane Wirtel (matrixise) * ![]() |
Date: 2019-03-19 16:10 | |
That was funny to use gdb and valgrind for the debugging session. Now I can help you for the refleaks ;-) |
|||
| History | |||
|---|---|---|---|
| Date | User | Action | Args |
| 2022-04-11 14:59:12 | admin | set | github: 80489 |
| 2019-03-19 16:10:41 | matrixise | set | messages: + msg338374 |
| 2019-03-19 16:04:57 | pablogsal | set | messages: + msg338373 |
| 2019-03-19 15:56:32 | matrixise | set | status: open -> closed messages:
+ msg338370 |
| 2019-03-19 15:54:24 | pablogsal | set | nosy:
+ pablogsal messages: + msg338369 |
| 2019-03-17 17:44:18 | matrixise | set | nosy:
+ serhiy.storchaka |
| 2019-03-15 20:31:19 | matrixise | set | messages:
+ msg338029 stage: patch review -> (no value) |
| 2019-03-15 20:28:50 | matrixise | set | keywords:
+ patch stage: patch review pull_requests: + pull_request12324 |
| 2019-03-15 20:25:34 | matrixise | create | |
