January 15, 2004
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


January 15, 2004
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