Package: g++
Version: 2.95.x
The following program breaks on mips and mipsel:
#include <stdio.h>
class shex {
public:
shex();
~shex();
shex(const shex&);
shex& operator=(const shex&);
};
shex::shex()
{
printf("creating new shex @%p\n", this);
}
shex::shex(const shex& that)
{
printf("creating new shex @%p from %p\n", this, &that);
}
shex& shex::operator=(const shex& that)
{
printf("copying shex from %p to %p\n", &that, this);
return *this;
}
shex::~shex()
{
printf("destroying shex @%p\n", this);
}
int main()
{
try {
throw shex();
} catch(const shex&) {
printf("Caught shex (ok)\n");
} catch(...) {
printf("Caught unknown exception (BAD)\n");
}
return 0;
}
[EMAIL PROTECTED]:~/shtest% uname -a
Linux resume.rfc822.org 2.4.2 #8 Sun Apr 1 20:56:43 CEST 2001 mips unknown
[EMAIL PROTECTED]:~/shtest% dpkg --print-architecture
mips
[EMAIL PROTECTED]:~/shtest% dpkg -l g++
Desired=Unknown/Install/Remove/Purge/Hold
| Status=Not/Installed/Config-files/Unpacked/Failed-config/Half-installed
|/ Err?=(none)/Hold/Reinst-required/X=both-problems (Status,Err: uppercase=bad)
||/ Name Version Description
+++-==============-==============-============================================
ii g++ 2.95.4-4 The GNU C++ compiler.
[EMAIL PROTECTED]:~/shtest% g++ -Wall -W -o catchfails catchfails.cpp
[EMAIL PROTECTED]:~/shtest% ./catchfails
creating new shex @0x7fff7958
creating new shex @0x10000228 from 0x7fff7958
destroying shex @0x7fff7958
zsh: 17066 segmentation fault ./catchfails
[EMAIL PROTECTED]:~/shtest%
[EMAIL PROTECTED]:~$ uname -a
Linux repeat.rfc822.org 2.4.1 #2 Thu Apr 5 02:26:22 CEST 2001 mips unknown
[EMAIL PROTECTED]:~$ dpkg --print-architecture
mipsel
[EMAIL PROTECTED]:~$ dpkg -l g++
Desired=Unknown/Install/Remove/Purge/Hold
| Status=Not/Installed/Config-files/Unpacked/Failed-config/Half-installed
|/ Err?=(none)/Hold/Reinst-required/X=both-problems (Status,Err: uppercase=bad)
||/ Name Version Description
+++-==============-==============-============================================
ii g++ 2.95.3-7 The GNU C++ compiler.
[EMAIL PROTECTED]:~$ g++ -Wall -W -o catchfails catchfails.cpp
[EMAIL PROTECTED]:~$ ./catchfails
creating new shex @0x7fff7c98
creating new shex @0x10000228 from 0x7fff7c98
destroying shex @0x7fff7c98
Segmentation fault
[EMAIL PROTECTED]:~$
Phil.