Moved creation of the kernel tracing entry for exec_team() to a later
point where the argument vector has already been copied to the kernel. Before it was crashing when the syscall provided a bad address. git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@25167 a95241bf-73f2-0310-859d-f6bbb57e9c96
This commit is contained in:
parent
0f75d28cb4
commit
3152304e53
@ -1306,8 +1306,6 @@ exec_team(const char *path, int32 argCount, char * const *args,
|
||||
TRACE(("exec_team(path = \"%s\", argc = %ld, envCount = %ld): team %ld\n",
|
||||
args[0], argCount, envCount, team->id));
|
||||
|
||||
T(ExecTeam(path, argCount, args, envCount, env));
|
||||
|
||||
// switching the kernel at run time is probably not a good idea :)
|
||||
if (team == team_get_kernel_team())
|
||||
return B_NOT_ALLOWED;
|
||||
@ -1348,6 +1346,9 @@ exec_team(const char *path, int32 argCount, char * const *args,
|
||||
if (status != B_OK)
|
||||
return status;
|
||||
|
||||
T(ExecTeam(path, teamArgs->arg_count, teamArgs->args, envCount, env));
|
||||
// trace here, so we don't have to deal with the user addresses
|
||||
|
||||
// replace args[0] with the path argument, just to be on the safe side
|
||||
free(teamArgs->args[0]);
|
||||
teamArgs->args[0] = strdup(path);
|
||||
|
Loading…
x
Reference in New Issue
Block a user