🚀 go-pugleaf

RetroBBS NetNews Server

Inspired by RockSolid Light RIP Retro Guy

Article View: comp.sys.hp.hpux
Article #28

Re: Bug in CC exception handling?

#28
From: Russ W Soukoreff
Date: Thu, 23 Nov 1995 02:27
181 lines
7185 bytes
In article <489r8v$dri@news.Ieunet.ie> ohurley@iona.ie (Oisin Hurley) writes:

> eshayne@ibm.net (Ethan Shayne) writes:
> 
> >I'm told by the HP people that there are actually a few separate
> >exception handling bugs which all show the same basic symptoms (i.e.
> >objects being destroyed twice). Many have been fixed and these fixes
> >are included in the latest patches which are already available. 
> 
> Can any HP people here drop a few pointers to the location of a description
> of these bugs plus associated patches? Has the old no +eh with +Z feature
> been eradicated in the latest compiler version? And what is the latest
> compiler version exactly (I'm currently back on 3.50) ?

I'm not HP, but I struggle enough with the stuff to be able to answer some
of your questions. 

First, here is where I go to do my HPUX Patch Browsing and Downloading:

http://us.external.hp.com/slx/html/patches.html Fri Oct 13 11:02:31 1995

As far as C++ goes, I have found that version 3.72 is the most stable with
respect to exception handling and templates.  The problems we've seen with
3.50 and 3.56 are too many to list, but I've include snippets of HP's bug
fixes from the 3.72 patch concerning "eh".

Patch Name:  PHSS_5734

Patch Description: s700_800 9.X cumulative ld(1) and dld.sl(5) patch

Hardware Platforms - OS Releases: s700: 9.01 9.03 9.05 9.07 & s800: 9.00 9.04

        This patch is needed by C++ customers who install patch
        PHSS_5731, which allows C++ code in a shared library to
        throw an exception.  This patch replaces all previous
        linker patches. ...

Supersedes:  
        PHSS_1782 PHSS_1783 PHSS_2187 PHSS_2188 PHSS_2534 PHSS_2535
        PHSS_3011 PHSS_3012 PHSS_3068 PHSS_3069 PHSS_3536 PHSS_3537
        PHSS_3598 PHSS_3812 PHSS_4366 PHSS_4411 PHSS_4644 PHSS_4716
        PHSS_5083 PHSS_5290 PHSS_5564


Patch Name:  PHSS_6204
======================

Patch Description: s700_800 9.X HP C++ patch A.03.72 to fix numerous defects

Creation Date: 95/10/24
Post Date:  95/11/07
Products:

        The following symptoms correspond to the descriptions in
        the defect descriptions field for patch PHSS_6204:

        11. Can't rethrow an exception from within a shared library

        30. Potential runtime error when calling derived destructor
            explicitly

        31. Explicit call to destructor results in compiler core
            dump

        32. Temporary destructed improperly, resulting in eh code to
            core dump

        49. Destructor without matching constructor when using +eh
            on nested call

        57. Template inline routine lost when -g/+eh is used, ld
            unsat

        58. Error 7103 with +eh and inline function, +T 1588, 1549

        PHSS_5731:
        The following symptoms correspond to the descriptions in
        the defect descriptions field for patch PHSS_5731:

        8. Error 3058 with +d with +eh in skiptypedefs

        14. Runtime Internal Error: Index out of range on switch
            with throw

        19. Bad C is generated for inline function containing a
           "throw" and a label

        28. +eh core dumps on inline constructor

        29. Runtime Internal Error: Index out of range with +eh,
            inline destructor

        30. Possible eh runtime errors on member initialization list

        31. Destructor not getting called with +eh, arrays of class,
            default parm

        33. +Xehdtcount detects bad global reference in static ctor

        34. Error 3058 with +eh and +T in cleanup_walk_statements

        36. Error 7403, 5172 with +eh, inline of delete, +T gives
            cc errors

        37. Throw resulted in an abort due to illegal instruction,
            branch to 0

        38. Program aborts when compiling with +eh and initializing
            with cast

        43. Default constructor required in exception class

        49. Error 3135 on global reference with +eh

        50. Abort at runtime when +eh range errors

        51. Program aborts when a throw is executed

        11. A coredump will occur when using +eh in a shared library
            in compiler mode.  This will occur for any function that
            has a try block that does not enclose the throw or the
            call to the function that does a throw.

        18. EH bug caused the code to compile unsuccessfuly.

        29. A program generated an internal error.

        30. Calling a derived destructor explicitly through a
            reference caused a runtime error on throw.

        31. The compiler core dumped when compiling a program with
            +eh

        44. Unsat when compiling with +eh __eh_Cfoo, first member
            not defined.

        55. When compiling a program with templates and typedefs and
            using the options +eh and -g the compiler gave error
            1034.

        28. +eh core dumped on inline constructors that had a
            return.

        30. An eh runtime error sometimes occurred if an exception
            was thrown during or after the construction of an object
            in main().

        31. Use of default constructors with default argument
            expressions in the construction of an array of objects
            caused bad eh code.  Creating an array of objects
            without explicit initialization corrupted the exception-
            handling housekeeping information.  As a result, not all
            objects were destructed when an exception was thrown.

        34. The elimination of compiler generated temporaries on the
            eh side of the code mistakenly assumed that it was a
            "non-symmetric temp".

        38. eh destructor count incorrectly incremented when
            initializing with cast

        49. Internal Error 3135 sometimes occurred when compiling
            with +eh when a global reference with an initializer was
            encountered.

        50. +eh problems with functions returning objects and copy
            constructor

        51. Objects or archive libraries compiled with +eh on 9.x
            releases aborted when linked and run on 10.x.  This only
            occurred for functions with try/catch and only when the
            throw is executed.

Supersedes:  
        PHSS_5089 PHSS_5090 PHSS_5731

Equivalent Patches: PHSS_6206: for HPUX 10.10

---  Russ Soukoreff, Software Consultant
     XyTech Systems Inc. Alberta, Canada
     Russ.Soukoreff@ipl.ca
Technical Details
Message-ID: <SOUKOREF.95Nov22192725@xytec1.ipl.ca>
Path: arc1-ca.pugleaf.net!inetgtwy.ipl.ca!usenet
References: <47gm0m$j26@blackice.winternet.com> <47k18n$1upa@news-s01.ny.us.ibm.net> <489r8v$dri@news.Ieunet.ie>

Show Full Headers
Complete Article Headers
Path: arc1-ca.pugleaf.net!inetgtwy.ipl.ca!usenet
From: soukoref@xytec1.ipl.ca (Russ W Soukoreff)
Newsgroups: comp.sys.hp.hpux,comp.lang.c++
Subject: Re: Bug in CC exception handling?
Date: 23 Nov 1995 02:27:25 GMT
Organization: Interprovincial Pipe Line Inc.
Message-ID: <SOUKOREF.95Nov22192725@xytec1.ipl.ca>
References: <47gm0m$j26@blackice.winternet.com> <47k18n$1upa@news-s01.ny.us.ibm.net>
 <489r8v$dri@news.Ieunet.ie>
NNTP-Posting-Host: 161.141.128.30
In-reply-to: ohurley@iona.ie's message of 14 Nov 1995 10:33:03 GMT