Fixed race conditions in thread tests; exposed by UBSan

llvm-svn: 178029
This commit is contained in:
Marshall Clow 2013-03-26 15:28:33 +00:00
parent 414ef565bb
commit a6d24cc19d
13 changed files with 19 additions and 15 deletions

View File

@ -88,6 +88,10 @@ function afunc
if (ls *.pass.cpp &> /dev/null)
then
for FILE in $(ls *.pass.cpp); do
if [ "$VERBOSE" ]
then
echo "Running test: " $FILE
fi
if $CC $OPTIONS $HEADER_INCLUDE $SOURCE_LIB $FILE $LIBS -o ./$TEST_EXE
then
if ./$TEST_EXE

View File

@ -32,7 +32,7 @@ public:
void operator()()
{
assert(alive_ == 1);
assert(n_alive == 1);
assert(n_alive >= 1);
op_run = true;
}
};

View File

@ -32,7 +32,7 @@ public:
void operator()()
{
assert(alive_ == 1);
assert(n_alive == 1);
assert(n_alive >= 1);
op_run = true;
}

View File

@ -32,14 +32,14 @@ public:
void operator()()
{
assert(alive_ == 1);
assert(n_alive == 1);
assert(n_alive >= 1);
op_run = true;
}
void operator()(int i, double j)
{
assert(alive_ == 1);
assert(n_alive == 1);
assert(n_alive >= 1);
assert(i == 5);
assert(j == 5.5);
op_run = true;

View File

@ -32,14 +32,14 @@ public:
void operator()()
{
assert(alive_ == 1);
assert(n_alive == 1);
assert(n_alive >= 1);
op_run = true;
}
void operator()(int i, double j)
{
assert(alive_ == 1);
assert(n_alive == 1);
assert(n_alive >= 1);
assert(i == 5);
assert(j == 5.5);
op_run = true;

View File

@ -32,14 +32,14 @@ public:
void operator()()
{
assert(alive_ == 1);
assert(n_alive == 1);
assert(n_alive >= 1);
op_run = true;
}
void operator()(int i, double j)
{
assert(alive_ == 1);
assert(n_alive == 1);
assert(n_alive >= 1);
assert(i == 5);
assert(j == 5.5);
op_run = true;

View File

@ -32,7 +32,7 @@ public:
void operator()()
{
assert(alive_ == 1);
assert(n_alive == 1);
assert(n_alive >= 1);
op_run = true;
}
};

View File

@ -32,7 +32,7 @@ public:
void operator()()
{
assert(alive_ == 1);
assert(n_alive == 1);
assert(n_alive >= 1);
op_run = true;
}
};

View File

@ -32,7 +32,7 @@ public:
void operator()()
{
assert(alive_ == 1);
assert(n_alive == 1);
assert(n_alive >= 1);
op_run = true;
}
};

View File

@ -32,7 +32,7 @@ public:
void operator()()
{
assert(alive_ == 1);
assert(n_alive == 1);
assert(n_alive >= 1);
op_run = true;
}
};

View File

@ -32,7 +32,7 @@ public:
void operator()()
{
assert(alive_ == 1);
assert(n_alive == 1);
assert(n_alive >= 1);
op_run = true;
}
};

View File

@ -32,7 +32,7 @@ public:
void operator()()
{
assert(alive_ == 1);
assert(n_alive == 1);
assert(n_alive >= 1);
op_run = true;
}
};

View File

@ -32,7 +32,7 @@ public:
void operator()()
{
assert(alive_ == 1);
assert(n_alive == 1);
assert(n_alive >= 1);
op_run = true;
}
};