From: Mike Frysinger <vapier@gentoo.org>
To: parisc-linux@lists.parisc-linux.org
Subject: [parisc-linux] bug in arg checking in clone.S ?
Date: Sun, 8 Jan 2006 02:41:07 -0500 [thread overview]
Message-ID: <200601080241.07960.vapier@gentoo.org> (raw)
[-- Attachment #1: Type: text/plain, Size: 669 bytes --]
for some reason the attached test case (originally from LTP) segfaults on
glibc/hppa systems ... every other arch ive tested on works fine ...
for example, a good run would be:
$ gcc errno.c -o errno ; ./errno ; echo $?
0
on hppa, i get:
$ gcc errno.c -o errno ; ./errno ; echo $?
Segmentation fault
tested on Debian (glibc 2.3.5-11) and Gentoo (glibc 2.3.4.20040808-r1), both
fail in the same way:
Program received signal SIGSEGV, Segmentation fault.
0x40538990 in __errno_location () from /lib/libc.so.6
(gdb) bt
#0 0x40538990 in __errno_location () from /lib/libc.so.6
#1 0x40538748 in __libc_start_main () from /lib/libc.so.6
#2 0x00010644 in main ()
-mike
[-- Attachment #2: errno.c --]
[-- Type: text/x-csrc, Size: 497 bytes --]
/* based originally on one the clone tests in the LTP */
#include <stdio.h>
#include <stdlib.h>
#include <errno.h>
#include <sched.h>
int child_fn(void *arg)
{
fprintf(stderr, "in child_fn\n");
exit(1);
}
int main(void)
{
int r_clone, ret_errno;
r_clone = clone(child_fn, NULL, (int) NULL, NULL);
ret_errno = errno;
if (ret_errno != EINVAL || r_clone != -1) {
fprintf(stderr, "clone: res=%d (wanted -1) errno=%d (wanted %d)\n",
r_clone, errno, EINVAL);
return 1;
}
return 0;
}
[-- Attachment #3: Type: text/plain, Size: 169 bytes --]
_______________________________________________
parisc-linux mailing list
parisc-linux@lists.parisc-linux.org
http://lists.parisc-linux.org/mailman/listinfo/parisc-linux
next reply other threads:[~2006-01-08 7:41 UTC|newest]
Thread overview: 2+ messages / expand[flat|nested] mbox.gz Atom feed top
2006-01-08 7:41 Mike Frysinger [this message]
2006-03-04 20:00 ` [parisc-linux] confirme: bug in arg checking in clone.S Joel Soete
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=200601080241.07960.vapier@gentoo.org \
--to=vapier@gentoo.org \
--cc=parisc-linux@lists.parisc-linux.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox