Bug 1791 - wtf is synopsis?
Summary: wtf is synopsis?
Status: RESOLVED INVALID
Alias: None
Product: gcc
Classification: Unclassified
Component: c++ (show other bugs)
Version: 2.96
: P2 critical
Target Milestone: ---
Assignee: Not yet assigned to anyone
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2001-01-26 16:46 UTC by batelcruiser
Modified: 2005-06-18 23:36 UTC (History)
3 users (show)

See Also:
Host:
Target:
Build:
Known to work:
Known to fail:
Last reconfirmed:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description batelcruiser 2001-01-26 16:46:00 UTC
In a header file a class is declared. One of the methods of the class, namely:

    public:
        void    setTimeout(void){m_dtDateTime.setNow();}

was mistakenly defined as:
        void    setTimeout(void){m_dtDateTime.setNow;}.

This resulted in a segfault. "setNow" is a: 
	void setNow(void); 
and is a member of another class.

"setTimeout" is on line 59 in the header file. Here's the command line and the error msgs:

c++ -DHAVE_CONFIG_H -I. -I. -I.. -I /home/alexe/work/vm/vmshared -I /home/alexe/work/vm/vminternal -I /home/alexe/work/vm/vminternal/tcp -I /home/alexe/work/bm/bminternal/threads  -I /home/alexe/work/bm/bminternal/packets -I /usr/local/ssl/include     -g -g -O2 -Wall -Wno-unused   -c VMScheduler.cpp
VMScheduler.h: In method `BOOL VMScheduler::forceEvent (int, BMObject 
*, int)':
VMScheduler.h:59: Internal error: Segmentation fault.

After correcting the error the code compiled properly (no warnings, no errors) and there was no segfault anymore.

I am sorry for being unable to submit the full source to you, but will gladly answer your questions if you have any. Here's the class declaration:

class SMSTimerEvent : public VMObject
{
friend VMScheduler;
        ccDateTime     	m_dtDateTime;
        smsTimerCode_t 	m_iCode;
        BOOL            m_bRecurring;  
    public:
        SMSTimerEvent(){m_iCode = TE_INVALID; setParent(NULL); setEmplr(NULL);};
        SMSTimerEvent(ccDateTime& t, smsTimerCode_t c, BOOL recr, VMObject* ptrObj, VMObject* ptrParent);
        
        BOOL    isTimeout(void){return m_dtDateTime.isExpired();}
        void    setTimeout(void){m_dtDateTime.setNow();}
        
        BOOL    isRecurring(void){return m_bRecurring;}
       
        virtual ~SMSTimerEvent(){};
        void    dump(int=0);
        void    process(void);
};

Release:
gcc --version = 2.96

Environment:
RedHat 7.0, PII-400Mhz, 128MB, bash, non-root user
Comment 1 batelcruiser 2001-01-26 16:46:00 UTC
Fix:
After correcting the error (i.e. put brackets after function call) the code compiled properly (no warnings, no errors) and there was no segfault anymore.
Same code compiles and runs properly with gcc ver 2.91.
Comment 2 Craig Rodrigues 2001-02-17 17:02:04 UTC
From: Craig Rodrigues <rodrigc@mediaone.net>
To: gcc-gnats@gcc.gnu.org, batelcruiser@yahoo.com, nobody@gcc.gnu.org,
   rodrigc@mediaone.net
Cc:  
Subject: Re: c++/1791
Date: Sat, 17 Feb 2001 17:02:04 -0500

 http://gcc.gnu.org/cgi-bin/gnatsweb.pl?cmd=view&pr=1791&database=gcc
 
 Does upgrading to the latest version of Redhat's gcc package
 at ftp://rawhide.redhat.com solve your problem?
 
 I cannot verify the problem, because you could not provide
 a reproducible test case.
 --
 Craig Rodrigues
 http://www.gis.net/~craigr
 rodrigc@mediaone.net
 
 
Comment 3 Neil Booth 2001-02-25 04:48:48 UTC
State-Changed-From-To: open->closed
State-Changed-Why: We cannot help you without source code.
Comment 4 Neil Booth 2001-02-25 12:48:48 UTC
From: neil@gcc.gnu.org
To: batelcruiser@yahoo.com, gcc-gnats@gcc.gnu.org, nobody@gcc.gnu.org
Cc:  
Subject: Re: c++/1791
Date: 25 Feb 2001 12:48:48 -0000

 Synopsis: wtf is synopsis?
 
 State-Changed-From-To: open->closed
 State-Changed-By: neil
 State-Changed-When: Sun Feb 25 04:48:48 2001
 State-Changed-Why:
     We cannot help you without source code.
 
 http://gcc.gnu.org/cgi-bin/gnatsweb.pl?cmd=view&pr=1791&database=gcc
Comment 5 Andrew Pinski 2005-06-18 23:36:21 UTC
Reopening to ...
Comment 6 Andrew Pinski 2005-06-18 23:36:43 UTC
Mark as invalid.