After an evaluation, GNOME has moved from Bugzilla to GitLab. Learn more about GitLab.
No new issues can be reported in GNOME Bugzilla anymore.
To report an issue in a GNOME project, go to GNOME GitLab.
Do not go to GNOME Gitlab for: Bluefish, Doxygen, GnuCash, GStreamer, java-gnome, LDTP, NetworkManager, Tomboy.
Bug 319427 - Use of unset variable in ClassDef
Use of unset variable in ClassDef
Status: RESOLVED FIXED
Product: doxygen
Classification: Other
Component: general
1.4.x
Other All
: Normal normal
: ---
Assigned To: Dimitri van Heesch
Dimitri van Heesch
Depends on:
Blocks:
 
 
Reported: 2005-10-21 15:51 UTC by Michael McTernan
Modified: 2006-07-15 19:12 UTC
See Also:
GNOME target: ---
GNOME version: ---



Description Michael McTernan 2005-10-21 15:51:39 UTC
Please describe the problem:
Another from valgrind and the doxygen-1.4.4-20050815.tar.gz CVS tarball.

classdef.cpp:50:

// constructs a new class definition
ClassDef::ClassDef(
    const char *defFileName,int defLine,
    const char *nm,CompoundType ct,
    const char *lref,const char *fName,
    bool isSymbol)
 : Definition(defFileName,defLine,removeRedundantWhiteSpace(nm),0,0,isSymbol)
{
  m_compType=ct;
  QCString compoundName=compoundTypeString(); 

  ...

Unfortunately compoundTypeString() does the following:

if (m_compType==Interface && m_isObjC) return "class";


Unlike m_compType, m_isObjC hasn't yet been setup.


Steps to reproduce:
Create test harness to call ClassDef, or by generating documentation for C++ or
Objective C.

Run under valgrind to see report of error.

Actual results:
Access is made to an uninitialised variable.

Expected results:


Does this happen every time?
Yes

Other information:
Comment 1 Michael McTernan 2005-10-21 15:54:07 UTC
Found on a RedHat 9.0 system.

$ uname -a
Linux zzz 2.4.20-31.9 #1 Tue Apr 13 18:04:23 EDT 2004 i686 i686 i386 GNU/Linux
$ gcc -v
Reading specs from /usr/lib/gcc-lib/i386-redhat-linux/3.2.2/specs
Configured with: ../configure --prefix=/usr --mandir=/usr/share/man
--infodir=/usr/share/info --enable-shared --enable-threads=posix
--disable-checking --with-system-zlib --enable-__cxa_atexit --host=i386-redhat-linux
Thread model: posix
gcc version 3.2.2 20030222 (Red Hat Linux 3.2.2-5)

Comment 2 Dimitri van Heesch 2006-07-15 19:12:37 UTC
The initialization was added in Release_1_4_5_20051024, so I'll close this bug.