1 diff -Brup a/stdlib/msort.c b/stdlib/msort.c
2 --- a/stdlib/msort.c 2010-05-04 07:27:23.000000000 -0400
3 +++ b/stdlib/msort.c 2012-08-07 13:30:14.131765346 -0400
13 @@ -182,7 +184,7 @@ qsort_r (void *b, size_t n, size_t s, __
14 static long int phys_pages;
17 - if (phys_pages == 0)
20 phys_pages = __sysconf (_SC_PHYS_PAGES);
22 @@ -197,6 +199,9 @@ qsort_r (void *b, size_t n, size_t s, __
23 a quarter of the physical memory. */
26 + /* Make sure phys_pages is written to memory. */
27 + atomic_write_barrier ();
29 pagesize = __sysconf (_SC_PAGESIZE);