Skip to content
This repository was archived by the owner on Feb 5, 2022. It is now read-only.

Commit f6ed654

Browse files
author
Ulrich Drepper
committed
* sysdeps/x86_64/memset.S: Add sfence after movnti.
1 parent f2a8406 commit f6ed654

File tree

8 files changed

+84
-7
lines changed

8 files changed

+84
-7
lines changed

ChangeLog

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,7 @@
1+
2007-11-07 H.J. Lu <[email protected]>
2+
3+
* sysdeps/x86_64/memset.S: Add sfence after movnti.
4+
15
2007-11-07 Ulrich Drepper <[email protected]>
26

37
[BZ #5277]

localedata/ChangeLog

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,8 @@
11
2007-11-07 Ulrich Drepper <[email protected]>
22

3+
[BZ #5238]
4+
* locales/ug_CN: Fix typo in collating symbol definition.
5+
36
[BZ #5237]
47
* locales/lo_LA: Fix typos in collation symbols.
58

localedata/locales/ug_CN

Lines changed: 5 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@ escape_char /
22
comment_char %
33
%
44
% Uyghur language locale for China
5-
% Source:
5+
% Source:
66
% Contact: Pablo Saratxaga
77
88
% Language: ug
@@ -56,8 +56,8 @@ LC_COLLATE
5656
% U+0224, U+0225 are also similar to ztail and are sorted the same.
5757
%
5858
% new arabic writting uses some extra letters too.
59-
% all vowels are noted, and in beginning of the word there is a
60-
% "yeh with hamza" (U+0626) in the front; should it be ignored
59+
% all vowels are noted, and in beginning of the word there is a
60+
% "yeh with hamza" (U+0626) in the front; should it be ignored
6161
% in sorting?
6262
%
6363
% arabic old latin turkic (from azeri, which has same phonemes)
@@ -107,7 +107,7 @@ collating-symbol <htail>
107107
collating-symbol <ktail>
108108
collating-symbol <ztail>
109109
collating-symbol <obar>
110-
collating-symbol <udiaresis>
110+
collating-symbol <udiaeresis>
111111

112112
collating-element <h,> from "<U0068><U0321>"
113113
collating-element <H,> from "<U0048><U0321>"
@@ -238,7 +238,7 @@ reorder-after <U0648>
238238
<U06D0> <ar_e>;<BAS>;<MIN>;IGNORE
239239
<U06CC> <ar_i>;<BAS>;<MIN>;IGNORE
240240
<U064A> <ar_y>;<BAS>;<MIN>;IGNORE
241-
241+
242242
reorder-end
243243

244244
END LC_COLLATE
@@ -330,4 +330,3 @@ LC_ADDRESS
330330
% FIXME
331331
copy "en_DK"
332332
END LC_ADDRESS
333-

nptl/ChangeLog

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,11 @@
1+
2007-11-07 Ulrich Drepper <[email protected]>
2+
3+
[BZ #5245]
4+
* allocatestack.c (allocate_stack): Change ENOMEM error in case
5+
mmap failed to EAGAIN.
6+
* Makefile (tests): Add tst-basic7.
7+
* tst-basic7.c: New file.
8+
19
2007-11-05 Ulrich Drepper <[email protected]>
210

311
* sysdeps/unix/sysv/linux/register-atfork.c (__register_atfork):

nptl/Makefile

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -222,6 +222,7 @@ tests = tst-typesizes \
222222
tst-barrier1 tst-barrier2 tst-barrier3 tst-barrier4 \
223223
tst-align tst-align2 tst-align3 \
224224
tst-basic1 tst-basic2 tst-basic3 tst-basic4 tst-basic5 tst-basic6 \
225+
tst-basic7 \
225226
tst-kill1 tst-kill2 tst-kill3 tst-kill4 tst-kill5 tst-kill6 \
226227
tst-raise1 \
227228
tst-join1 tst-join2 tst-join3 tst-join4 tst-join5 tst-join6 \

nptl/allocatestack.c

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -462,7 +462,12 @@ allocate_stack (const struct pthread_attr *attr, struct pthread **pdp,
462462
mem = ARCH_RETRY_MMAP (size);
463463
if (__builtin_expect (mem == MAP_FAILED, 0))
464464
#endif
465-
return errno;
465+
{
466+
if (errno == ENOMEM)
467+
errno = EAGAIN;
468+
469+
return errno;
470+
}
466471
}
467472

468473
/* SIZE is guaranteed to be greater than zero.

nptl/tst-basic7.c

Lines changed: 56 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,56 @@
1+
#include <errno.h>
2+
#include <pthread.h>
3+
#include <stdio.h>
4+
#include <stdlib.h>
5+
#include <string.h>
6+
#include <unistd.h>
7+
#include <sys/mman.h>
8+
#include <sys/resource.h>
9+
10+
static void
11+
use_up_memory (void)
12+
{
13+
struct rlimit rl;
14+
getrlimit (RLIMIT_AS, &rl);
15+
rl.rlim_cur = 10 * 1024 * 1024;
16+
setrlimit (RLIMIT_AS, &rl);
17+
18+
char *c;
19+
int PAGESIZE = getpagesize ();
20+
while (1)
21+
{
22+
c = mmap (NULL, PAGESIZE, PROT_NONE, MAP_ANON | MAP_PRIVATE, -1, 0);
23+
if (c == MAP_FAILED)
24+
break;
25+
}
26+
}
27+
28+
static void *
29+
child (void *arg)
30+
{
31+
sleep (1);
32+
return arg;
33+
}
34+
35+
static int
36+
do_test (void)
37+
{
38+
int err;
39+
pthread_t tid;
40+
41+
use_up_memory ();
42+
43+
err = pthread_create (&tid, NULL, child, NULL);
44+
if (err != 0)
45+
{
46+
printf ("pthread_create returns %d: %s\n", err,
47+
err == EAGAIN ? "OK" : "FAIL");
48+
return err != EAGAIN;
49+
}
50+
51+
/* We did not fail to allocate memory despite the preparation. Oh well. */
52+
return 0;
53+
}
54+
55+
#define TEST_FUNCTION do_test ()
56+
#include "../test-skeleton.c"

sysdeps/x86_64/memset.S

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -127,6 +127,7 @@ L(memset_entry):
127127
add $0x40,%rcx
128128
dec %rax
129129
jne 11b
130+
sfence
130131
jmp 4b
131132

132133
END (memset)

0 commit comments

Comments
 (0)