www.digitalmars.com Home | Search | C & C++ | D | DMDScript | News Groups | index | prev | next
Archives

D Programming
D
D.gnu
digitalmars.D
digitalmars.D.bugs
digitalmars.D.dtl
digitalmars.D.dwt
digitalmars.D.announce
digitalmars.D.learn
digitalmars.D.debugger

C/C++ Programming
c++
c++.announce
c++.atl
c++.beta
c++.chat
c++.command-line
c++.dos
c++.dos.16-bits
c++.dos.32-bits
c++.idde
c++.mfc
c++.rtl
c++.stl
c++.stl.hp
c++.stl.port
c++.stl.sgi
c++.stlsoft
c++.windows
c++.windows.16-bits
c++.windows.32-bits
c++.wxwindows

digitalmars.empire
digitalmars.DMDScript

c++ - A DMC bug causing "abnormal program termination"? - test.cpp

↑ ↓ ← Wu Yongwei <Wu_member pathlink.com> writes:
Compiled with:

sc -Ae test.cpp -I d:\dm\stlport\stlport stlport_dm_static.lib

it will report "abnormal program termination" when run.  It compiles, run well,
and report:

Exception caught: Boom
3
4
6

under MSVC 6, GCC 2.95.3, and GCC 3.3.1.

Sorry I cannot reduce it to a smaller test case.  The problem will not show up
if I simply replace my fc_queue with the standard std::queue.  According to what
the debugging procedure (in MSVC 6) showed, DMC failed to catch the
runtime_error thrown by f.push(5);

I am using v838, and I also tested with v836, with the same results.

Best regards,

Wu Yongwei
Jan 14 2004
↑ ↓ → Wu Yongwei <Wu_member pathlink.com> writes:
Ah, I found it out myself.  It seems to be caused by an old placement operator
new bug: when construct(void*, const _Tp&) fails by an exception, the code
generated will (erroneously) call operator delete, which caused the abortion.

Best regards,

Wu Yongwei

In article <bu5848$m4g$1 digitaldaemon.com>, Wu Yongwei says...
Compiled with:

sc -Ae test.cpp -I d:\dm\stlport\stlport stlport_dm_static.lib

it will report "abnormal program termination" when run

Jan 14 2004