mirror of
https://github.com/jart/cosmopolitan.git
synced 2025-06-02 18:52:29 +00:00
Fix nsync_mu_unlock_slow_() on Apple Silicon
We torture test dlmalloc() in test/libc/stdio/memory_test.c. That test was crashing on occasion on Apple M1 microprocessors when dlmalloc was using *NSYNC locks. It was relatively easy to spot the cause, which is this one particular compare and swap operation, which needed to change to use sequentially-consistent ordering rather than an acquire barrier
This commit is contained in:
parent
3b15d31247
commit
751d20d98d
5 changed files with 36 additions and 2 deletions
1
third_party/dlmalloc/dlmalloc.c
vendored
1
third_party/dlmalloc/dlmalloc.c
vendored
|
@ -23,6 +23,7 @@
|
|||
#include "libc/thread/thread.h"
|
||||
#include "libc/thread/tls.h"
|
||||
#include "third_party/dlmalloc/vespene.internal.h"
|
||||
#include "third_party/nsync/mu.h"
|
||||
// clang-format off
|
||||
|
||||
#define FOOTERS 0
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue