Bug in Qt4's rcc.exe

Andreas Hausladen Andreas.Hausladen at gmx.de
Sun Aug 21 20:20:10 CEST 2005


There is a bug in src/tools/rcc.cpp which raises a float point division
by zero (appears as access violation). This does not happen if rcc is
compiled with QT_NO_COMPRESS. The bug is in Qt 4.0.0 and 4.0.1.

And there seems to be a buffer overflow in moc.exe but I'm not sure if
it is really moc or another bug in the Borland C++ Compiler 5.5.1/5.6.4.
The synthom is that moc.exe sometimes crashes while allocating memory.
But this "sometimes" means that if I change my PATH enviroment variable
(add some stupid chars or remove some entries) moc.exe processes the
files. If I add a Preprocessor::Macros["blabla"] = "nonsens"; then I
have to make other changes (or even non) to the PATH envvar. Another
solution is to change to a subdirectory and start the makefile. Adding
further DEFINEs to the command line change moc's behaviour, too. But all
these solutions are not garanteed to work.
That really looks like a buffer overflow. And it only happens with
Borland's memory manager (and that one is not the problem as it is the
MM from C++Builder. And there are lots of programs in productive use,
using this MM).

"Unfortunatelly" moc.exe does not crash while debugging so finding the
bug (may it a bug in moc or bcc32) is not really easy. I can only
identify the location where it crashes because the memory was
overwritten but that code is not the problem.


Regards,
Andreas Hausladen
-------------- next part --------------
An embedded and charset-unspecified text was scrubbed...
Name: rcc.cpp.patch
Url: http://mail.kde.org/pipermail/kde-cygwin/attachments/20050821/a8067820/rcc.cpp.ksh


More information about the kde-cygwin mailing list