incubator-stdcxx-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Liviu Nicoara <nico...@roguewave.com>
Subject std::locale mt test failing
Date Thu, 30 Mar 2006 17:06:02 GMT
The following test case fails intermittently with SIGSEGV:

$ uname -a
SunOS doc 5.10 Generic_118822-19 sun4u sparc SUNW,Ultra-Enterprise

$ gcc --version
gcc (GCC) 3.4.4
Copyright (C) 2004 Free Software Foundation, Inc.
This is free software; see the source for copying conditions.  There is
NO warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR
PURPOSE.

$ cat t.cpp

#include <locale>
#include <pthread.h>

extern "C" void* thread_func (void* pv)
{
    for (int i = 0; i < 1000; ++i)
        std::locale loc ("de");

    return 0;
}

int main ()
{
    pthread_t tid [4];

    for (int i = 0; i < 4; ++i)
        if (pthread_create (tid + i, 0, thread_func, 0))
            return 1;

    for (int i = 0; i < 4; ++i)
        if (pthread_join (tid [i], 0))
            return 2;

    return 0;
}

$ make t
gcc  -D_RWCONFIG=12d
-I/build/nicoara/hal9u1/tests/stdlib/locale/../include
-I./../../../../include -I/build/nicoara/hal9u1/include
-I/build/nicoara/hal9u1/include/ansi -I./../../../..
-I/build/nicoara/hal9u1 -I/build/nicoara/hal9u1/tests/stdlib/locale -I.
-O2 -pthreads --pedantic -Wall -W -Wno-long-long  -c
/build/nicoara/hal9u1/tests/stdlib/locale/t.cpp
/build/nicoara/hal9u1/tests/stdlib/locale/t.cpp:5: warning: unused
parameter 'pv'
gcc  -pthreads -L./../../../../lib -o t   t.o  -lm -ltestx1012d
-ltlt1012d -lstd4112d -lsupc++
Segmentation Fault (core dumped)

I do not have a stack trace yet. I will file a JIRA incident soon.

Thanks,
Liviu


Mime
View raw message