PySide Bugzilla Closed for New Bugs

PySide is now a Qt Add-on and uses the Qt Project's JIRA Bug Tracker instead of this Bugzilla instance. This Bugzilla is left for reference purposes.

Bug 1057 - valgrind detected "Conditional jump or move depends on uninitialised value"
: valgrind detected "Conditional jump or move depends on uninitialised value"
Status: CLOSED FIXED
Product: PySide
Classification: Unclassified
Component: Shiboken
: 1.0.7
: PC Linux
: P2 normal
Assigned To: Paulo Alcantara
:
:
:
  Show dependency treegraph
 
Reported: 2011-11-15 18:21 EET by Dennis
Modified: 2011-11-29 21:28 EET (History)
9 users (show)

See Also:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Dennis 2011-11-15 18:21:00 EET
==31137== Conditional jump or move depends on uninitialised value(s)
==31137==    at 0xE3A055E: Shiboken::GilState::release() (gilstate.cpp:43)
==31137==    by 0xE39EFF1: Shiboken::Object::destroy(SbkObject*, void*)
(basewrapper.cpp:1041)
==31137==    by 0xE3A2199: Shiboken::BindingManager::~BindingManager()
(bindingmanager.cpp:161)
==31137==    by 0x637E960: exit (exit.c:78)
==31137==    by 0x6363F05: (below main) (libc-start.c:258)

libshiboken/gilstate.cpp

GilState::GilState()
{
    if(Py_IsInitialized()) {
        m_gstate = PyGILState_Ensure();
        m_locked = true;
    }
}

'm_locked' is initialized only if python is still active
release() later depends on unitialized variable

void GilState::release()
{
    if(m_locked && Py_IsInitialized()) {
        PyGILState_Release(m_gstate);
        m_locked = false;
    }
}

propose:

GilState::GilState() : m_locked(false) {...}
Comment 1 Paulo Alcantara 2011-11-23 20:43:02 EET
Thanks for the bug report!

Fixed on Shiboken commit 9f110f83c213867e15b0141a802ebbf74f2ed9f7.
Comment 2 Luciano Wolf 2011-11-29 21:28:41 EET
Released on PySide 1.0.9. Closing.