classification
Title: faulthandler_register_py() may use _Py_sighandler_t previous with initialization
Type: behavior Stage: needs patch
Components: Versions: Python 3.4, Python 3.3
process
Status: closed Resolution: fixed
Dependencies: Superseder:
Assigned To: haypo Nosy List: christian.heimes, haypo, python-dev
Priority: normal Keywords:

Created on 2013-07-01 22:04 by christian.heimes, last changed 2013-07-01 22:18 by haypo. This issue is now closed.

Messages (3)
msg192154 - (view) Author: Christian Heimes (christian.heimes) * (Python committer) Date: 2013-07-01 22:04
faulthandler_register_py() may use the variable previous uninitialized if user->enabled is set.

Excerpt from Coverity log:

var_decl: Declaring variable "previous" without initializer.
711    _Py_sighandler_t previous;

8. Condition "!user->enabled", taking false branch
738    if (!user->enabled) {

CID 984060 (#1 of 1): Uninitialized scalar variable (UNINIT)
12. uninit_use: Using uninitialized value "previous": field "previous"."sa_restorer" is uninitialized.
752    user->previous = previous;
msg192156 - (view) Author: Roundup Robot (python-dev) Date: 2013-07-01 22:17
New changeset 229dde749ed6 by Victor Stinner in branch '3.3':
Issue #18343: faulthandler.register() now keeps the previous signal handler
http://hg.python.org/cpython/rev/229dde749ed6

New changeset 74b7ff20e0e4 by Victor Stinner in branch 'default':
(Merge 3.3) Issue #18343: faulthandler.register() now keeps the previous signal
http://hg.python.org/cpython/rev/74b7ff20e0e4
msg192157 - (view) Author: STINNER Victor (haypo) * (Python committer) Date: 2013-07-01 22:18
Thanks for the report!
History
Date User Action Args
2013-07-01 22:18:59hayposetstatus: open -> closed
resolution: fixed
messages: + msg192157
2013-07-01 22:17:41python-devsetnosy: + python-dev
messages: + msg192156
2013-07-01 22:04:41christian.heimescreate