Bug#2120: KDevelop crashes on long comments [23:38,07.10.99]
Lubos Lunak
l.lunak at sh.cvut.cz
Thu Oct 7 21:54:37 UTC 1999
Package: kdevelop
Version: 1.0-19991005-A
Severity: grave
Bugreport ID : 23:38,07.10.99
Originator : Lubos Lunak
E-Mail : l.lunak at email.cz
Subject : KDevelop crashes on long comments
Error Class : software bug
Error Location: class tree
Priority : medium
Bug Description ---------------------------
KDevelop crashes on comments longer than 2kB.
How to repeat the error -------------------
Open a new .cpp file and enter :
/*
now a lot of characters, at least 3000 of them or so.
If you're lucky, you may even get a permanent busy
cursor or other nice things, much more interesting
than just a crash.
*/
Bugfix or Workaround ----------------------
Sure :) :
I think I've located the problem in file
classparser/ClassParser.cc at the beginning
( extern char comment[ 2048 ]; )
and file classparser/tokenizer.l at the beginning
( char comment[ 2048 ]; )
The simplest fix seems to be either to use QString
or a dynamically allocated array and an overflow check
in tokenizer.l . Well, maybe the simplest would be to
change that 2048 to something larger, but if I needed
more than 8000 today, maybe someone else would need
even more tomorrow.
System Information ------------------------
KDevelop version : 1.0-19991005-A
KDE version : 1.1.1
QT version : 1.44
OS/Distribution : RedHat Linux 6.0
Compiler : egcs-1.1.2
More information about the KDevelop-devel
mailing list