I confirm the patch fixes the deadlock I was seeing here.
--
Fabio Erculiani
.
And thanks a lot for fixing this!
whoops, yeah this is my first contribution to qemu ;)
On 03.01.2012, at 08:25, Fabio Erculiani wrote:
Hi all,
this is a patch on top of [PATCH 4/5] linux-user: fake
/proc/self/stat (sorry I couldn't find the git repo bound to this
patchwork) that also
-off-by: Fabio Erculiani lx...@sabayon.org
---
linux-user/syscall.c | 20 +++-
1 files changed, 15 insertions(+), 5 deletions(-)
diff --git a/linux-user/syscall.c b/linux-user/syscall.c
index 9ba51bf..f2af5d5 100644
--- a/linux-user/syscall.c
+++ b/linux-user/syscall.c
@@ -4678,14
ts-bprm-argv seems NULL here.
Isn't it supposed to be set?
--
Fabio Erculiani
This fixes -Wformat warning introduced by
983da8bec44fd1ab5e9730f01e719b3849aa0a35
Signed-off-by: Fabio Erculiani lx...@sabayon.org
---
linux-user/syscall.c |3 ++-
1 files changed, 2 insertions(+), 1 deletions(-)
diff --git a/linux-user/syscall.c b/linux-user/syscall.c
index f2af5d5
On Tue, Jan 3, 2012 at 6:41 PM, Alexander Graf ag...@suse.de wrote:
On 03.01.2012, at 17:07, Fabio Erculiani wrote:
ts-bprm-argv seems NULL here.
Isn't it supposed to be set?
Good question. Maybe we need some other way to fetch argv0 then?
or we could leave just an empty string for now
Or just using linux_binprm-filename with basename()
--
Fabio Erculiani
How about setting ts-bprm-argv = target_argv; ?
I'm not a qemu codebase expert, but if it's always NULL (why is it
NULL?) or can be NULL...
It looks like can be done easily from main.c... without making a
variable global.
--
Fabio Erculiani
Mumble,
that is what happens already...
Let me see why I get NULL here...
--
Fabio Erculiani
Yeah, debugging.
Moreover we have this scenario:
$ /bin/cat /proc/self/stat
32297 (cat) ..
I guess we should use basename() anyway...?
--
Fabio Erculiani
it or the
TaskState lifecycle matches the executable (so there is no need to
free() it) ?
--
Fabio Erculiani
-off-by: Fabio Erculiani lx...@sabayon.org
---
linux-user/syscall.c | 21 -
1 files changed, 16 insertions(+), 5 deletions(-)
diff --git a/linux-user/syscall.c b/linux-user/syscall.c
index 9ba51bf..e563c00 100644
--- a/linux-user/syscall.c
+++ b/linux-user/syscall.c
@@ -4678,14
---
linux-user/main.c |5 -
1 files changed, 0 insertions(+), 5 deletions(-)
diff --git a/linux-user/main.c b/linux-user/main.c
index 788ff98..513d583 100644
--- a/linux-user/main.c
+++ b/linux-user/main.c
@@ -3492,11 +3492,6 @@ int main(int argc, char **argv, char **envp)
Done, it all works now ;-) !
--
Fabio Erculiani
-off-by: Fabio Erculiani lx...@sabayon.org
---
linux-user/syscall.c | 19 +++
1 files changed, 15 insertions(+), 4 deletions(-)
diff --git a/linux-user/syscall.c b/linux-user/syscall.c
index 9ba51bf..3e8e3dd 100644
--- a/linux-user/syscall.c
+++ b/linux-user/syscall.c
@@ -4678,11
TaskState contains linux_bprm struct which encapsulates argv among
other things.
argv might be used around the code and is expected to contain valid
data. Before this patch, ts-bprm-argv was NULL due to it being
freed right after loader_exec().
Signed-off-by: Fabio Erculiani lx...@sabayon.org
, sizeof(buf), 0%c, i == 43 ? '\n' : ' ');
}
- snprintf(buf, sizeof(buf), %PRId64 %c, val, i == 43 ? '\n' : ' ');
len = strlen(buf);
if (write(fd, buf, len) != len) {
return -1;
--
Fabio Erculiani
17 matches
Mail list logo