From: Tobias Koch <tobias.koch@nonterra.com>
To: musl <musl@lists.openwall.com>
Subject: Crash in 'system' while executing '__clone'
Date: Wed, 22 Feb 2017 11:44:12 +0000 [thread overview]
Message-ID: <AM3PR01MB063212D7E2BC38992CB1AB2789500@AM3PR01MB0632.eurprd01.prod.exchangelabs.com> (raw)
Hi,
the following code snippet
#include <stdlib.h>
int main(void)
{
system("ls");
}
segfaults while running inside a 1.1.16 musl-based chroot on a
Linux debian 4.9.0-1-amd64 #1 SMP Debian 4.9.6-3 (2017-01-28) x86_64 GNU/Linux
host. The crash happens when __clone returns:
Reading symbols from test...done.
(gdb) break __clone
Function "__clone" not defined.
Make breakpoint pending on future shared library load? (y or [n]) y
Breakpoint 1 (__clone) pending.
(gdb) run
Starting program: /home/tobias/test
Breakpoint 1, __clone () at src/thread/x86_64/clone.s:5
56xor %eax,%eax
(gdb) next
64mov $56,%al
(gdb)
77mov %rdi,%r11
(gdb)
8mov %rdx,%rdi
(gdb)
9899mov %r8,%rdx
(gdb)
1000mov %r9,%r8
(gdb)
11mov 8(%rsp),%r10
(gdb)
128mov %r11,%r9
(gdb)
13and $-16,%rsi
(gdb)
14sub $8,%rsi
(gdb)
15mov %rcx,(%rsi)
(gdb)
16syscall
(gdb)
17test %eax,%eax
(gdb) backup git pkgs repo spool temp.txt test test.c test.txt
18jnz 1f
(gdb)
__clone () at src/thread/x86_64/clone.s:27
271:271ret(gdb)
0x0000000000000000 in ?? ()
Any ideas what might be wrong or what I can do to investigate further?
Tobias
next reply other threads:[~2017-02-22 11:44 UTC|newest]
Thread overview: 3+ messages / expand[flat|nested] mbox.gz Atom feed top
2017-02-22 11:44 Tobias Koch [this message]
2017-02-22 15:27 ` Markus Wichmann
2017-02-22 16:00 ` Rich Felker
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=AM3PR01MB063212D7E2BC38992CB1AB2789500@AM3PR01MB0632.eurprd01.prod.exchangelabs.com \
--to=tobias.koch@nonterra.com \
--cc=musl@lists.openwall.com \
/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.
Code repositories for project(s) associated with this public inbox
https://git.vuxu.org/mirror/musl/
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).