Commit 9dbb52ab authored by Christopher Dykes's avatar Christopher Dykes Committed by Facebook Github Bot 8

Make sure to return from atomicHashArrayInsertRaceThread

Summary: Because, unfortunately, `pthread_exit` is not marked as noreturn in the pthread library primarily used on Windows, we need to return something to avoid errors.

Reviewed By: yfeldblum

Differential Revision: D3571465

fbshipit-source-id: 4713b2364d6584ae255fb83cd21406fdc33ee299
parent 3f0064f6
...@@ -21,6 +21,8 @@ ...@@ -21,6 +21,8 @@
#include <thread> #include <thread>
#include <atomic> #include <atomic>
#include <memory> #include <memory>
#include <folly/Assume.h>
#include <folly/Benchmark.h> #include <folly/Benchmark.h>
#include <folly/Conv.h> #include <folly/Conv.h>
#include <folly/portability/Atomic.h> #include <folly/portability/Atomic.h>
...@@ -679,6 +681,7 @@ void* atomicHashArrayInsertRaceThread(void* /* j */) { ...@@ -679,6 +681,7 @@ void* atomicHashArrayInsertRaceThread(void* /* j */) {
} }
} }
pthread_exit((void *) numInserted); pthread_exit((void *) numInserted);
folly::assume(false);
} }
TEST(Ahm, atomic_hash_array_insert_race) { TEST(Ahm, atomic_hash_array_insert_race) {
AHA* arr = atomicHashArrayInsertRaceArray.get(); AHA* arr = atomicHashArrayInsertRaceArray.get();
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment