[PyQt] segfault / infinite loop in sip's parser
Erick Tryzelaar
idadesub at users.sourceforge.net
Wed Jun 4 00:15:05 BST 2008
Hello again,
I'm still trying to track down the other segfaults, but in the process
I found one in sip's grammar. I found that if I edited pyqt4's
sip/phonon/phononmod.sip to be:
%Module PyQt4.phonon 0
%Import QtCore/QtCoremod.sip
%Import QtGui/QtGuimod.sip
And then had sip/QWebKit/QWebKitmod.sip to be:
%Module PyQt4.QtWebKit 0
%Import QtCore/QtCoremod.sip
%Import QtGui/QtGuimod.sip
%Import QtNetwork/QtNetworkmod.sip
It will segfault with an infinite loop as sip manages the imports. I
believe this is happening because the parser isn't calling
"handleEOM". It looks like there needs to be at least one non-import
token after an import for it to get called. If we add this:
%Module PyQt4.phonon 0
%Import QtCore/QtCoremod.sip
%Import QtGui/QtGuimod.sip
%Copying
%End
It won't segfault anymore.
More information about the PyQt
mailing list