* [Bug libc/10162] stratcliff test segfaults on ia64
2009-05-17 17:56 [Bug libc/10162] New: stratcliff test segfaults on ia64 aurelien at aurel32 dot net
@ 2009-05-20 17:09 ` drepper at redhat dot com
2009-05-20 21:23 ` hjl dot tools at gmail dot com
` (12 subsequent siblings)
13 siblings, 0 replies; 16+ messages in thread
From: drepper at redhat dot com @ 2009-05-20 17:09 UTC (permalink / raw)
To: glibc-bugs
--
What |Removed |Added
----------------------------------------------------------------------------
AssignedTo|drepper at redhat dot com |hjl dot tools at gmail dot
| |com
Status|NEW |ASSIGNED
http://sourceware.org/bugzilla/show_bug.cgi?id=10162
------- You are receiving this mail because: -------
You are on the CC list for the bug, or are watching someone who is.
^ permalink raw reply [flat|nested] 16+ messages in thread
* [Bug libc/10162] stratcliff test segfaults on ia64
2009-05-17 17:56 [Bug libc/10162] New: stratcliff test segfaults on ia64 aurelien at aurel32 dot net
2009-05-20 17:09 ` [Bug libc/10162] " drepper at redhat dot com
@ 2009-05-20 21:23 ` hjl dot tools at gmail dot com
2009-05-20 22:28 ` hjl dot tools at gmail dot com
` (11 subsequent siblings)
13 siblings, 0 replies; 16+ messages in thread
From: hjl dot tools at gmail dot com @ 2009-05-20 21:23 UTC (permalink / raw)
To: glibc-bugs
------- Additional Comments From hjl dot tools at gmail dot com 2009-05-20 21:22 -------
stratcliff.c has
int size = sysconf (_SC_PAGESIZE);
int nchars = size / sizeof (CHAR);
...
adr = (CHAR *) mmap (NULL, 3 * size, PROT_READ | PROT_WRITE,
MAP_PRIVATE | MAP_ANON, -1, 0);
...
mprotect (adr, size, PROT_NONE);
mprotect (adr + 2 * nchars, size, PROT_NONE);
adr += nchars;
...
CHAR *cp = MEMCHR (&adr[outer], L('V'), 3 * size);
memchr is called with size which contains unreadable pages. How
does it work on any arch?
--
What |Removed |Added
----------------------------------------------------------------------------
Status|ASSIGNED |WAITING
http://sourceware.org/bugzilla/show_bug.cgi?id=10162
------- You are receiving this mail because: -------
You are on the CC list for the bug, or are watching someone who is.
^ permalink raw reply [flat|nested] 16+ messages in thread
* [Bug libc/10162] stratcliff test segfaults on ia64
2009-05-17 17:56 [Bug libc/10162] New: stratcliff test segfaults on ia64 aurelien at aurel32 dot net
2009-05-20 17:09 ` [Bug libc/10162] " drepper at redhat dot com
2009-05-20 21:23 ` hjl dot tools at gmail dot com
@ 2009-05-20 22:28 ` hjl dot tools at gmail dot com
2009-05-20 22:35 ` aurelien at aurel32 dot net
` (10 subsequent siblings)
13 siblings, 0 replies; 16+ messages in thread
From: hjl dot tools at gmail dot com @ 2009-05-20 22:28 UTC (permalink / raw)
To: glibc-bugs
------- Additional Comments From hjl dot tools at gmail dot com 2009-05-20 22:28 -------
The problem is software pipeline doesn't take page boundary into
account.
--
What |Removed |Added
----------------------------------------------------------------------------
Status|WAITING |NEW
http://sourceware.org/bugzilla/show_bug.cgi?id=10162
------- You are receiving this mail because: -------
You are on the CC list for the bug, or are watching someone who is.
^ permalink raw reply [flat|nested] 16+ messages in thread
* [Bug libc/10162] stratcliff test segfaults on ia64
2009-05-17 17:56 [Bug libc/10162] New: stratcliff test segfaults on ia64 aurelien at aurel32 dot net
` (2 preceding siblings ...)
2009-05-20 22:28 ` hjl dot tools at gmail dot com
@ 2009-05-20 22:35 ` aurelien at aurel32 dot net
2009-05-21 19:45 ` hjl dot tools at gmail dot com
` (9 subsequent siblings)
13 siblings, 0 replies; 16+ messages in thread
From: aurelien at aurel32 dot net @ 2009-05-20 22:35 UTC (permalink / raw)
To: glibc-bugs
------- Additional Comments From aurelien at aurel32 dot net 2009-05-20 22:34 -------
(In reply to comment #1)
> stratcliff.c has
>
> int size = sysconf (_SC_PAGESIZE);
> int nchars = size / sizeof (CHAR);
> ...
> adr = (CHAR *) mmap (NULL, 3 * size, PROT_READ | PROT_WRITE,
> MAP_PRIVATE | MAP_ANON, -1, 0);
> ...
> mprotect (adr, size, PROT_NONE);
> mprotect (adr + 2 * nchars, size, PROT_NONE);
> adr += nchars;
> ...
> CHAR *cp = MEMCHR (&adr[outer], L('V'), 3 * size);
>
> memchr is called with size which contains unreadable pages. How
> does it work on any arch?
The looked up char is now to be before the page boundary, that is before the
unreadable pages. This test actually checks that in such condition theses pages
are not accessed.
--
http://sourceware.org/bugzilla/show_bug.cgi?id=10162
------- You are receiving this mail because: -------
You are on the CC list for the bug, or are watching someone who is.
^ permalink raw reply [flat|nested] 16+ messages in thread
* [Bug libc/10162] stratcliff test segfaults on ia64
2009-05-17 17:56 [Bug libc/10162] New: stratcliff test segfaults on ia64 aurelien at aurel32 dot net
` (3 preceding siblings ...)
2009-05-20 22:35 ` aurelien at aurel32 dot net
@ 2009-05-21 19:45 ` hjl dot tools at gmail dot com
2009-05-21 19:46 ` hjl dot tools at gmail dot com
` (8 subsequent siblings)
13 siblings, 0 replies; 16+ messages in thread
From: hjl dot tools at gmail dot com @ 2009-05-21 19:45 UTC (permalink / raw)
To: glibc-bugs
------- Additional Comments From hjl dot tools at gmail dot com 2009-05-21 19:45 -------
A patch is posted at
http://sourceware.org/ml/libc-alpha/2009-05/msg00110.html
--
What |Removed |Added
----------------------------------------------------------------------------
Status|NEW |ASSIGNED
http://sourceware.org/bugzilla/show_bug.cgi?id=10162
------- You are receiving this mail because: -------
You are on the CC list for the bug, or are watching someone who is.
^ permalink raw reply [flat|nested] 16+ messages in thread
* [Bug libc/10162] stratcliff test segfaults on ia64
2009-05-17 17:56 [Bug libc/10162] New: stratcliff test segfaults on ia64 aurelien at aurel32 dot net
` (4 preceding siblings ...)
2009-05-21 19:45 ` hjl dot tools at gmail dot com
@ 2009-05-21 19:46 ` hjl dot tools at gmail dot com
2009-05-21 19:47 ` hjl dot tools at gmail dot com
` (7 subsequent siblings)
13 siblings, 0 replies; 16+ messages in thread
From: hjl dot tools at gmail dot com @ 2009-05-21 19:46 UTC (permalink / raw)
To: glibc-bugs
------- Additional Comments From hjl dot tools at gmail dot com 2009-05-21 19:46 -------
(In reply to comment #4)
> A patch is posted at
>
> http://sourceware.org/ml/libc-alpha/2009-05/msg00110.html
Oops. Wrong patch. I will upload the patch here.
--
http://sourceware.org/bugzilla/show_bug.cgi?id=10162
------- You are receiving this mail because: -------
You are on the CC list for the bug, or are watching someone who is.
^ permalink raw reply [flat|nested] 16+ messages in thread
* [Bug libc/10162] stratcliff test segfaults on ia64
2009-05-17 17:56 [Bug libc/10162] New: stratcliff test segfaults on ia64 aurelien at aurel32 dot net
` (5 preceding siblings ...)
2009-05-21 19:46 ` hjl dot tools at gmail dot com
@ 2009-05-21 19:47 ` hjl dot tools at gmail dot com
2009-05-21 20:57 ` aurelien at aurel32 dot net
` (6 subsequent siblings)
13 siblings, 0 replies; 16+ messages in thread
From: hjl dot tools at gmail dot com @ 2009-05-21 19:47 UTC (permalink / raw)
To: glibc-bugs
------- Additional Comments From hjl dot tools at gmail dot com 2009-05-21 19:47 -------
Created an attachment (id=3955)
--> (http://sourceware.org/bugzilla/attachment.cgi?id=3955&action=view)
A patch
--
http://sourceware.org/bugzilla/show_bug.cgi?id=10162
------- You are receiving this mail because: -------
You are on the CC list for the bug, or are watching someone who is.
^ permalink raw reply [flat|nested] 16+ messages in thread
* [Bug libc/10162] stratcliff test segfaults on ia64
2009-05-17 17:56 [Bug libc/10162] New: stratcliff test segfaults on ia64 aurelien at aurel32 dot net
` (6 preceding siblings ...)
2009-05-21 19:47 ` hjl dot tools at gmail dot com
@ 2009-05-21 20:57 ` aurelien at aurel32 dot net
2009-05-22 1:50 ` drepper at redhat dot com
` (5 subsequent siblings)
13 siblings, 0 replies; 16+ messages in thread
From: aurelien at aurel32 dot net @ 2009-05-21 20:57 UTC (permalink / raw)
To: glibc-bugs
------- Additional Comments From aurelien at aurel32 dot net 2009-05-21 20:57 -------
I confirm it works well, thanks a lot! Could someone apply this patch?
--
http://sourceware.org/bugzilla/show_bug.cgi?id=10162
------- You are receiving this mail because: -------
You are on the CC list for the bug, or are watching someone who is.
^ permalink raw reply [flat|nested] 16+ messages in thread
* [Bug libc/10162] stratcliff test segfaults on ia64
2009-05-17 17:56 [Bug libc/10162] New: stratcliff test segfaults on ia64 aurelien at aurel32 dot net
` (7 preceding siblings ...)
2009-05-21 20:57 ` aurelien at aurel32 dot net
@ 2009-05-22 1:50 ` drepper at redhat dot com
2009-11-09 17:59 ` pasky at suse dot cz
` (4 subsequent siblings)
13 siblings, 0 replies; 16+ messages in thread
From: drepper at redhat dot com @ 2009-05-22 1:50 UTC (permalink / raw)
To: glibc-bugs
------- Additional Comments From drepper at redhat dot com 2009-05-22 01:50 -------
Fixed in current git version.
--
What |Removed |Added
----------------------------------------------------------------------------
Status|ASSIGNED |RESOLVED
Resolution| |FIXED
http://sourceware.org/bugzilla/show_bug.cgi?id=10162
------- You are receiving this mail because: -------
You are on the CC list for the bug, or are watching someone who is.
^ permalink raw reply [flat|nested] 16+ messages in thread
* [Bug libc/10162] stratcliff test segfaults on ia64
2009-05-17 17:56 [Bug libc/10162] New: stratcliff test segfaults on ia64 aurelien at aurel32 dot net
` (8 preceding siblings ...)
2009-05-22 1:50 ` drepper at redhat dot com
@ 2009-11-09 17:59 ` pasky at suse dot cz
2009-11-09 21:02 ` hjl dot tools at gmail dot com
` (3 subsequent siblings)
13 siblings, 0 replies; 16+ messages in thread
From: pasky at suse dot cz @ 2009-11-09 17:59 UTC (permalink / raw)
To: glibc-bugs
------- Additional Comments From pasky at suse dot cz 2009-11-09 17:59 -------
Unfortunately, this seems to break when calling memchr() on a shared mmap()ed
buffer - this crashes now:
#include<sys/mman.h>
#include<string.h>
#include<unistd.h>
#include<fcntl.h>
int main() {
void *m = mmap(NULL, 53, PROT_READ, MAP_SHARED, open("/etc/passwd", O_RDONLY
), 0);
volatile void *q = memchr(m, ':', 53);
}
since memchr() tries to access m-8. I have only very little idea IA64, I think
it is because the kernel cannot fill p[] in time, causing the speculative load
to fail, and the assumption that speculative load fails only if the mapping is
inaccessible is invalid?
--
What |Removed |Added
----------------------------------------------------------------------------
Status|RESOLVED |REOPENED
Resolution|FIXED |
http://sourceware.org/bugzilla/show_bug.cgi?id=10162
------- You are receiving this mail because: -------
You are on the CC list for the bug, or are watching someone who is.
^ permalink raw reply [flat|nested] 16+ messages in thread
* [Bug libc/10162] stratcliff test segfaults on ia64
2009-05-17 17:56 [Bug libc/10162] New: stratcliff test segfaults on ia64 aurelien at aurel32 dot net
` (9 preceding siblings ...)
2009-11-09 17:59 ` pasky at suse dot cz
@ 2009-11-09 21:02 ` hjl dot tools at gmail dot com
2009-11-15 3:21 ` drepper at redhat dot com
` (2 subsequent siblings)
13 siblings, 0 replies; 16+ messages in thread
From: hjl dot tools at gmail dot com @ 2009-11-09 21:02 UTC (permalink / raw)
To: glibc-bugs
------- Additional Comments From hjl dot tools at gmail dot com 2009-11-09 21:01 -------
A patch is posted at
http://sourceware.org/ml/libc-alpha/2009-11/msg00032.html
--
http://sourceware.org/bugzilla/show_bug.cgi?id=10162
------- You are receiving this mail because: -------
You are on the CC list for the bug, or are watching someone who is.
^ permalink raw reply [flat|nested] 16+ messages in thread
* [Bug libc/10162] stratcliff test segfaults on ia64
2009-05-17 17:56 [Bug libc/10162] New: stratcliff test segfaults on ia64 aurelien at aurel32 dot net
` (10 preceding siblings ...)
2009-11-09 21:02 ` hjl dot tools at gmail dot com
@ 2009-11-15 3:21 ` drepper at redhat dot com
2009-11-15 16:18 ` hjl dot tools at gmail dot com
2009-11-20 16:31 ` drepper at redhat dot com
13 siblings, 0 replies; 16+ messages in thread
From: drepper at redhat dot com @ 2009-11-15 3:21 UTC (permalink / raw)
To: glibc-bugs
------- Additional Comments From drepper at redhat dot com 2009-11-15 03:20 -------
Fixed in git.
--
What |Removed |Added
----------------------------------------------------------------------------
Status|REOPENED |RESOLVED
Resolution| |FIXED
http://sourceware.org/bugzilla/show_bug.cgi?id=10162
------- You are receiving this mail because: -------
You are on the CC list for the bug, or are watching someone who is.
^ permalink raw reply [flat|nested] 16+ messages in thread
* [Bug libc/10162] stratcliff test segfaults on ia64
2009-05-17 17:56 [Bug libc/10162] New: stratcliff test segfaults on ia64 aurelien at aurel32 dot net
` (11 preceding siblings ...)
2009-11-15 3:21 ` drepper at redhat dot com
@ 2009-11-15 16:18 ` hjl dot tools at gmail dot com
2009-11-20 16:31 ` drepper at redhat dot com
13 siblings, 0 replies; 16+ messages in thread
From: hjl dot tools at gmail dot com @ 2009-11-15 16:18 UTC (permalink / raw)
To: glibc-bugs
------- Additional Comments From hjl dot tools at gmail dot com 2009-11-15 16:18 -------
(In reply to comment #10)
> A patch is posted at
>
> http://sourceware.org/ml/libc-alpha/2009-11/msg00032.html
Please use the patch above. It handles reading beyond memory
properly, regardless memory size.
--
What |Removed |Added
----------------------------------------------------------------------------
Status|RESOLVED |REOPENED
Resolution|FIXED |
http://sourceware.org/bugzilla/show_bug.cgi?id=10162
------- You are receiving this mail because: -------
You are on the CC list for the bug, or are watching someone who is.
^ permalink raw reply [flat|nested] 16+ messages in thread
* [Bug libc/10162] stratcliff test segfaults on ia64
2009-05-17 17:56 [Bug libc/10162] New: stratcliff test segfaults on ia64 aurelien at aurel32 dot net
` (12 preceding siblings ...)
2009-11-15 16:18 ` hjl dot tools at gmail dot com
@ 2009-11-20 16:31 ` drepper at redhat dot com
13 siblings, 0 replies; 16+ messages in thread
From: drepper at redhat dot com @ 2009-11-20 16:31 UTC (permalink / raw)
To: glibc-bugs
------- Additional Comments From drepper at redhat dot com 2009-11-20 16:31 -------
Applied.
--
What |Removed |Added
----------------------------------------------------------------------------
Status|REOPENED |RESOLVED
Resolution| |FIXED
http://sourceware.org/bugzilla/show_bug.cgi?id=10162
------- You are receiving this mail because: -------
You are on the CC list for the bug, or are watching someone who is.
^ permalink raw reply [flat|nested] 16+ messages in thread