https://gcc.gnu.org/bugzilla/show_bug.cgi?id=64265

Bernd Edlinger <edlinger at gcc dot gnu.org> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
                 CC|                            |edlinger at gcc dot gnu.org

--- Comment #5 from Bernd Edlinger <edlinger at gcc dot gnu.org> ---
Aehm, and if the function throws, the __tsan_func_exit is not
called either:

cat test2.cpp
struct my_class
{
  my_class(){}
};

int test1(int x) throw(my_class)
{
  throw my_class();
  return x;
}


int
main()
{
  for (int i=0; i<10000000; i++)
  {
    try
    {
      test1(i);
    }
    catch (my_class)
    {
    }
  }
  return 0;
}


g++ -g -fsanitize=thread test2.cpp

./a.out

=> here we have another memory leak.

Reply via email to