You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@stdcxx.apache.org by "Martin Sebor (JIRA)" <ji...@apache.org> on 2007/07/08 23:31:04 UTC

[jira] Updated: (STDCXX-476) [Intel Thread Checker 3.1] calls std::terminate() after throwing exception of class type

     [ https://issues.apache.org/jira/browse/STDCXX-476?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Martin Sebor updated STDCXX-476:
--------------------------------

    Environment: Intel Thread Checker 3.1  (was: Intel Therad Checker 3.1)

> [Intel Thread Checker 3.1] calls std::terminate() after throwing exception of class type
> ----------------------------------------------------------------------------------------
>
>                 Key: STDCXX-476
>                 URL: https://issues.apache.org/jira/browse/STDCXX-476
>             Project: C++ Standard Library
>          Issue Type: Bug
>          Components: External
>         Environment: Intel Thread Checker 3.1
>            Reporter: Martin Sebor
>
> Running a program that throws and catches an exception of user-defined type in a thread function through the thread checker causes a call to terminate():
>  cat t.cpp && make t && icc -v && tcheck_cl t
> #include <pthread.h>
> #include <stdio.h>
> struct S { };
> int loop;
> extern "C" void* thread_proc (void*)
> {
>     for (loop = 0; loop != 2; ++loop) {
>         printf ("%d\n", loop);
>         try { throw S (); }
>         catch (...) { }
>     }
>     return 0;
> }
> int main ()
> {
>     pthread_t tid;
>     if (pthread_create (&tid, 0, thread_proc, 0))
>         return 1;
>     pthread_join (tid, 0);
> }
> icc -c -I/home/sebor/stdcxx/include/ansi -D_RWSTDDEBUG   -D_REENTRANT -I/home/sebor/stdcxx/include -I/build/sebor/stdcxx-icc-10.0.025-15S/include -I/home/sebor/stdcxx/examples/include  -cxxlib-nostd -g   -w1   t.cpp
> icc t.o -o t -cxxlib-nostd  -lpthread  -L/build/sebor/stdcxx-icc-10.0.025-15S/lib  -lstd15S -lcxaguard -lsupc++ -lm 
> Version 10.0 
> Intel(R) Thread Checker 3.1 command line instrumentation driver (24400)
> Copyright (c) 2007 Intel Corporation. All rights reserved.
> Building project
> Instrumenting
>  11% t               ( All Functions ):..
> Running:  /build/sebor/stdcxx-icc-10.0.025-15S/examples/t 
> 0
> terminate called after throwing an instance of 'S'
> Application finished
> _______________________________________________________________________________
> |ID|Short Des|Severit|Co|Context|Description                   |1st Ac|2nd Acc|
> |  |cription |y Name |un|[Best] |                              |cess[B|ess[Bes|
> |  |         |       |t |       |                              |est]  |t]     |
> _______________________________________________________________________________
> |1 |Thread te|Informa|1 |Whole  |Thread termination at         |"t.cpp|"t.cpp"|
> |  |rmination|tion   |  |Program|"t.cpp":24 - includes stack   |":24  |:24    |
> |  |         |       |  |1      |allocation of 10.004 MB and   |      |       |
> |  |         |       |  |       |use of 7.281 KB               |      |       |
> _______________________________________________________________________________
> |2 |Thread te|Informa|1 |Whole  |Thread termination at         |"t.cpp|"t.cpp"|
> |  |rmination|tion   |  |Program|"t.cpp":21 - includes stack   |":21  |:21    |
> |  |         |       |  |2      |allocation of 10 MB and use of|      |       |
> |  |         |       |  |       |4.938 KB                      |      |       |
> _______________________________________________________________________________

-- 
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.