[x264-devel] Fix data race detected by ThreadSanitizer

Anton Mitrofanov git at videolan.org
Mon Mar 11 20:24:06 CET 2019


x264 | branch: master | Anton Mitrofanov <BugMaster at narod.ru> | Mon Feb  4 21:46:12 2019 +0300| [a6327f8a25b72f5edd3515aca82190046d18745b] | committer: Henrik Gramner

Fix data race detected by ThreadSanitizer

Bug report by Daniel Deptford.

> http://git.videolan.org/gitweb.cgi/x264.git/?a=commit;h=a6327f8a25b72f5edd3515aca82190046d18745b
---

 common/threadpool.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/common/threadpool.c b/common/threadpool.c
index 7f98f778..4d36105b 100644
--- a/common/threadpool.c
+++ b/common/threadpool.c
@@ -34,7 +34,7 @@ typedef struct
 
 struct x264_threadpool_t
 {
-    int            exit;
+    volatile int   exit;
     int            threads;
     x264_pthread_t *thread_handle;
     void           (*init_func)(void *);



More information about the x264-devel mailing list