Details
-
Bug
-
Status: Closed
-
Blocker
-
Resolution: Fixed
-
4.1.2
-
None
-
all
Description
Discovered with SunPro 5.7 and reproducible also with SunPro 5.6 and gcc 3.4.3 but only on Solaris 10.
$ cat t.cpp && nice gmake t && ./t
#include <assert.h>
#include <pthread.h>
#include <string>
const std::string str ("0123456789");
const std::string expect = str + '*';
extern "C" void* thread_func (void*)
{
for (int i = 0; i < 100000; ++i)
return 0;
}
int main ()
{
pthread_t tid [4];
unsigned i = 0;
for (i = 0; i != sizeof tid / sizeof *tid; ++i)
{ if (pthread_create (tid + i, 0, thread_func, (void*)0)) return 1; }for (i = 0; i != sizeof tid / sizeof *tid; ++i)
{ if (pthread_join (tid [i], 0)) return 2; }}
CC -c -D_RWSTDDEBUG -mt -D_RWSTD_USE_CONFIG -I/build/sebor/sunpro-5.7.j4-15s/include -I/build/sebor/dev/stdlib/include -I/build/sebor/dev/stdlib/examples/include -library=%none -g +w t.cpp
CC t.o -o t -library=%none -L/build/sebor/sunpro-5.7.j4-15s/lib -mt -L/build/sebor/sunpro-5.7.j4-15s/lib -lstd15s -lm
Assertion failed: s == expect, file t.cpp, line 13
Assertion failed: s == expect, file t.cpp, line 13
Assertion failed: s == expect, file t.cpp, line 13
Abort (core dumped)