Operating System - HP-UX
1836640 Members
1722 Online
110102 Solutions
New Discussion

Re: CXX app crashes when compile and link with debug.

 
tnguyen
Occasional Contributor

CXX app crashes when compile and link with debug.

Hi Mr. Wizard,
I have a CXX program with multiple inheritance as following:

class A {
public: virtual void a()=0;
};

class B : virtual public A {
public: virtual void b()=0;
};

class C : virtual public A {
public: virtual void c()=0;
};

class D : public B, public C {
public:
void a() {}
void b() {}
void c() {}
};

void main() {
D d;
}

----------------------------
1) Compile and link without debug the program works (i.e. cxx test, cxxlink test)
2) Compile and link with debug, the program works (i.e. cxx/deb test, cxxlink/deb test).
3) Compile and link with debug and with NOOPT (i.e. cxx/deb/noopt test, cxxlink/deb test). The program crashes with access violation at C::C+1088 when main tries to instantiate d object.

System is OpenVMS IA64 V8.2-1
Compiler HP C++ V7.2-018.

Attached are the CXX program.

Thankyou very much.
2 REPLIES 2
Steven E. Protter
Exalted Contributor

Re: CXX app crashes when compile and link with debug.

Shalom,

Sounds like a bad debugger.

Maybe there is a patch available.

SEP
Steven E Protter
Owner of ISN Corporation
http://isnamerica.com
http://hpuxconsulting.com
Sponsor: http://hpux.ws
Twitter: http://twitter.com/hpuxlinux
Founder http://newdatacloud.com
Dennis Handly
Acclaimed Contributor

Re: CXX app crashes when compile and link with debug.

I'm not sure why you are posting this here? It works perfectly fine on HP-UX. ;-)