HPE GreenLake Administration
- Community Home
- >
- Servers and Operating Systems
- >
- Operating Systems
- >
- Operating System - HP-UX
- >
- Core dump casting NULL to virtual base class
Operating System - HP-UX
1834158
Members
2406
Online
110064
Solutions
Forums
Categories
Company
Local Language
back
Forums
Discussions
Forums
- Data Protection and Retention
- Entry Storage Systems
- Legacy
- Midrange and Enterprise Storage
- Storage Networking
- HPE Nimble Storage
Discussions
Forums
Discussions
Discussions
Discussions
Forums
Discussions
back
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
- BladeSystem Infrastructure and Application Solutions
- Appliance Servers
- Alpha Servers
- BackOffice Products
- Internet Products
- HPE 9000 and HPE e3000 Servers
- Networking
- Netservers
- Secure OS Software for Linux
- Server Management (Insight Manager 7)
- Windows Server 2003
- Operating System - Tru64 Unix
- ProLiant Deployment and Provisioning
- Linux-Based Community / Regional
- Microsoft System Center Integration
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Blogs
Information
Community
Resources
Community Language
Language
Forums
Blogs
Go to solution
Topic Options
- Subscribe to RSS Feed
- Mark Topic as New
- Mark Topic as Read
- Float this Topic for Current User
- Bookmark
- Subscribe
- Printer Friendly Page
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
12-06-2001 07:57 PM
12-06-2001 07:57 PM
Bug(?) with "aCC: HP ANSI C++ B3910B A.03.30"
Casting a null pointer to a virtual base class
appears to try to reference its virtual (function)
table and crash. This works on older versions of
the compiler and on other compilers (Sun's and MSVC).
Casting of NULL pointers as a special case is
described in "The C++ Programming Language" by
Bjarne Stroustrup Section 15.4.1 (dynamic_cast).
The following code compiles but (incorrectly)
core dumps. Is there a patch for this? I could
not find one.
Dave Lauderback
davel@silvaco.com
======= Dummy example code ==================
class Item
{
public:
Item(){}
virtual ~Item();
};
Item::~Item()
{
}
class List : virtual public Item
{
public:
List(){}
virtual ~List(){}
};
int main(int argc , char* argv[])
{
List* context = 0;
Item* death = context;
return 0;
}
======= end example ==========================
Casting a null pointer to a virtual base class
appears to try to reference its virtual (function)
table and crash. This works on older versions of
the compiler and on other compilers (Sun's and MSVC).
Casting of NULL pointers as a special case is
described in "The C++ Programming Language" by
Bjarne Stroustrup Section 15.4.1 (dynamic_cast).
The following code compiles but (incorrectly)
core dumps. Is there a patch for this? I could
not find one.
Dave Lauderback
davel@silvaco.com
======= Dummy example code ==================
class Item
{
public:
Item(){}
virtual ~Item();
};
Item::~Item()
{
}
class List : virtual public Item
{
public:
List(){}
virtual ~List(){}
};
int main(int argc , char* argv[])
{
List* context = 0;
Item* death = context;
return 0;
}
======= end example ==========================
Solved! Go to Solution.
2 REPLIES 2
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
12-07-2001 02:29 AM
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
01-30-2002 04:07 PM
01-30-2002 04:07 PM
Re: Core dump casting NULL to virtual base class
Thanks, PHSS_25170 did solve
my problem. Due to priority
changes, I did not get a chance to
test it until now.
Thanks again.
Dave L.
my problem. Due to priority
changes, I did not get a chance to
test it until now.
Thanks again.
Dave L.
The opinions expressed above are the personal opinions of the authors, not of Hewlett Packard Enterprise. By using this site, you accept the Terms of Use and Rules of Participation.
Company
Events and news
Customer resources
© Copyright 2025 Hewlett Packard Enterprise Development LP