Exception handling bug w/Borland?

Exception handling bug w/Borland?

Post by Jim Sermershei » Wed, 12 Jun 1996 04:00:00



This simple chunk of code is wreaking havoc when run if compiled with
Borland 4.52 or 5.0.  Works fine in MSVC 4.0.  It produces an invalid
mem read just after the throw long(1); line.  Am I doing something wrong
or is it a borland bug?

Among other variations, if the break is placed outside the braces, the
problem goes away.

Thanks for any insight.
Jim Sermersheim

#include <stdio.h>

struct ABC
{
        ~ABC(){}

Quote:};

void Func1 (void)
{
        try
        {
                throw (int)2;
        }
        catch (int i)
        {
                switch (i)
                {
                        case 2:
                        {
                                ABC abc;
                                break;
                        }
                }
        }
        throw long(1);

Quote:}

void main (void)
{
        try
        {
                Func1();
        }
        catch (long exc)
        {
                printf("WooHoo!");
        }

Quote:}


      [ about comp.lang.c++.moderated. First time posters: do this! ]
 
 
 

1. Bug? (WinNT threads and Borland C++ exceptions)

Hello World,

I end up in the CPU-dump window in the Borland 5.01 IDE when I throw
an exception from a Windows-NT thread, which is started with
_beginthread().

If I examine the call stack I find that the faulty behavior is in the
function "__debuggerExcListChange". This function is probably used to
swap the contents of a global exception root pointer, a quite usual
way of solving the problem of every thread needing to keep track of
it's own exception stack.

Is this a known "__debuggerExcListChange()" bug or?
Is there any known workaround?

--

Pager...: + 46 (0)746 457371    | expressed in this mail might be my
Enea Tel: + 46 (0)8 6385104     | own and that they do not necessarily
Enea Fax: + 46 (0)8 6385050     | represent the opinions of my employer.

2. Any thoughts on the new GigaDesigns 800Mhz G4 upgrade?

3. Exception safety with exceptions handling

4. How do I list all machines under a domain using IAK's nslookup

5. bug bug Borland C++, strstream constructor

6. Space required for RAID 5

7. exception handling not handling

8. deleted profile recovery

9. Exception handling w/ repeated handling code

10. Win2K: POLSTORE.DLL -- bugs and bugs and bugs

11. BUG BUG BUG / VIRUS VIRUS VIRUS

12. BUGS, BUGS, BUGS...HERE IS SOME HELP

13. Borland Exception Error Code