[Uml-devel] Bugfix for strange SEGFAULT in UMLClassifier::checkOperationSignature()

Achim Spangler Achim.Spangler at mnet-online.de
Thu Nov 2 21:35:23 UTC 2006


Hi,
I discovered a strange problem with creation of overloaded member functions 
(i.e. same name but different attributes).

While a small project didn't cause a problem, my big project caused always a 
SEGFAULT, when I tried to insert a function to a class, which has already a 
function with same name but different signature.

I detected, that somehow the stack got corrupted in 
UMLClassifier::checkOperationSignature(), so that the SEGFAULT has been 
caused at very surprising points - for example the stack view in kdbg showed 
me the line 

int pCount = testParams->count();

as the last executed line before the SEGFAULT. The pointer testParams is NOT 
NULL at this point, and the list is also not broken, as the function 
testParams->isEmpty() does NOT cause any segfault.

I changed the parameter comparing loop to NOT use "count()" - just by 
iterating with first() and next().

THIS version does NOT cause any SEGFAULT - even with my big project - I really 
do not know why.

Please merge the attached patch, as it should be even a little more 
efficient - it is at least not having a lower quality.

Bye,
Achim
-------------- next part --------------
A non-text attachment was scrubbed...
Name: NoSegfaultOnOverload.diff
Type: text/x-diff
Size: 1652 bytes
Desc: not available
URL: <http://mail.kde.org/pipermail/umbrello-devel/attachments/20061102/ca05e48e/attachment.bin>


More information about the umbrello-devel mailing list