This issue tracker has been migrated to GitHub, and is currently read-only.
For more information, see the GitHub FAQs in the Python's Developer Guide.

Title: ctypes.utils uninitialized variable 'paths'
Type: behavior Stage: resolved
Components: ctypes Versions: Python 3.6, Python 3.5, Python 2.7
Status: closed Resolution: fixed
Dependencies: Superseder:
Assigned To: meador.inge Nosy List: amaury.forgeotdarc, belopolsky, kees, martin.panter, meador.inge, python-dev, xiang.zhang
Priority: normal Keywords: easy, patch

Created on 2015-05-02 15:03 by kees, last changed 2022-04-11 14:58 by admin. This issue is now closed.

File name Uploaded Description Edit
ctypes.util-path.patch kees, 2015-05-02 15:03 patch for uninitialized variable 'path' review
issue24114.patch xiang.zhang, 2016-04-28 09:25 review
Messages (8)
msg242401 - (view) Author: Kees Bos (kees) * Date: 2015-05-02 15:03
In certain corner cases, the ctypes.util can raise an error for a uninitialized variable 'path' when with sunos5 the clre program exists, but fails to return valid output lines.

(Also in 2.7.10rc0)
msg243288 - (view) Author: Martin Panter (martin.panter) * (Python committer) Date: 2015-05-16 00:02
I fail to see how this patch does anything. What is the actual error or traceback? Perhaps it is for “paths” (plural)?
msg243299 - (view) Author: Kees Bos (kees) * Date: 2015-05-16 08:04
Sorry, yes. It's plural: 'paths'
msg264425 - (view) Author: Xiang Zhang (xiang.zhang) * (Python committer) Date: 2016-04-28 09:25
Simply add one line to make the function theoretically more robust.
msg264426 - (view) Author: Kees Bos (kees) * Date: 2016-04-28 10:15
It's not entirely theoretical to me. I inherited some solaris boxes that cannot be properly maintained anymore and that have a clre program that dumps core. Hence no valid output and running into uninitialized 'paths'. The patch from Xiang Zhang will fix that.
msg264428 - (view) Author: Meador Inge (meador.inge) * (Python committer) Date: 2016-04-28 12:28
Xiang's patch LGTM.  Given that Kees has verified it, I will apply today.
msg264577 - (view) Author: Roundup Robot (python-dev) (Python triager) Date: 2016-05-01 03:29
New changeset 57bf7a40925f by Meador Inge in branch '2.7':
Issue #24114: Fix an uninitialized variable in `ctypes.util`.

New changeset db5baad7ad69 by Meador Inge in branch '3.5':
Issue #24114: Fix an uninitialized variable in `ctypes.util`.

New changeset 5b5fbce1db9c by Meador Inge in branch 'default':
Issue #24114: Fix an uninitialized variable in `ctypes.util`.
msg264578 - (view) Author: Meador Inge (meador.inge) * (Python committer) Date: 2016-05-01 03:32

Thank y'all for the patch and help with testing.
Date User Action Args
2022-04-11 14:58:16adminsetgithub: 68302
2016-05-01 03:32:51meador.ingesetstatus: open -> closed
resolution: fixed
messages: + msg264578

stage: commit review -> resolved
2016-05-01 03:29:19python-devsetnosy: + python-dev
messages: + msg264577
2016-04-28 12:28:19meador.ingesetassignee: meador.inge
messages: + msg264428
stage: needs patch -> commit review
2016-04-28 10:15:37keessetmessages: + msg264426
2016-04-28 09:25:33xiang.zhangsetfiles: + issue24114.patch
nosy: + xiang.zhang
messages: + msg264425

2016-04-25 04:19:28berker.peksagsetkeywords: + easy
versions: + Python 3.5, Python 3.6
2016-04-25 01:41:20martin.pantersettitle: ctypes.utils uninitialized variable 'path' -> ctypes.utils uninitialized variable 'paths'
type: behavior
stage: patch review -> needs patch
2015-05-16 08:04:23keessetmessages: + msg243299
2015-05-16 00:02:49martin.pantersetnosy: + martin.panter
messages: + msg243288
2015-05-05 20:48:42ned.deilysetnosy: + amaury.forgeotdarc, belopolsky, meador.inge

type: crash -> (no value)
stage: patch review
2015-05-02 15:03:15keescreate