diff options
Diffstat (limited to 'linux-user')
-rw-r--r-- | linux-user/elfload.c | 2 | ||||
-rw-r--r-- | linux-user/syscall.c | 18 | ||||
-rw-r--r-- | linux-user/trace-events | 2 |
3 files changed, 16 insertions, 6 deletions
diff --git a/linux-user/elfload.c b/linux-user/elfload.c index 2a902f7..7906288 100644 --- a/linux-user/elfload.c +++ b/linux-user/elfload.c @@ -1099,7 +1099,7 @@ static inline void elf_core_copy_regs(target_elf_gregset_t *regs, int i; for (i = 0; i < 16; i++) { - (*regs[i]) = tswapreg(env->gregs[i]); + (*regs)[i] = tswapreg(env->gregs[i]); } (*regs)[TARGET_REG_PC] = tswapreg(env->pc); diff --git a/linux-user/syscall.c b/linux-user/syscall.c index 003943b..dfc1301 100644 --- a/linux-user/syscall.c +++ b/linux-user/syscall.c @@ -1622,6 +1622,7 @@ static inline abi_long host_to_target_sockaddr(abi_ulong target_addr, if (len == 0) { return 0; } + assert(addr); target_saddr = lock_user(VERIFY_WRITE, target_addr, len, 0); if (!target_saddr) @@ -5573,6 +5574,7 @@ static abi_long do_ioctl_rt(const IOCTLEntry *ie, uint8_t *buf_temp, field_types, THUNK_HOST); } unlock_user(argptr, arg, 0); + assert(host_rt_dev_ptr); ret = get_errno(safe_ioctl(fd, ie->host_cmd, buf_temp)); if (*host_rt_dev_ptr != 0) { @@ -11740,7 +11742,9 @@ abi_long do_syscall(void *cpu_env, int num, abi_long arg1, #if defined(TARGET_NR_inotify_init) && defined(__NR_inotify_init) case TARGET_NR_inotify_init: ret = get_errno(sys_inotify_init()); - fd_trans_register(ret, &target_inotify_trans); + if (ret >= 0) { + fd_trans_register(ret, &target_inotify_trans); + } break; #endif #ifdef CONFIG_INOTIFY1 @@ -11748,7 +11752,9 @@ abi_long do_syscall(void *cpu_env, int num, abi_long arg1, case TARGET_NR_inotify_init1: ret = get_errno(sys_inotify_init1(target_to_host_bitmask(arg1, fcntl_flags_tbl))); - fd_trans_register(ret, &target_inotify_trans); + if (ret >= 0) { + fd_trans_register(ret, &target_inotify_trans); + } break; #endif #endif @@ -11914,7 +11920,9 @@ abi_long do_syscall(void *cpu_env, int num, abi_long arg1, #if defined(TARGET_NR_eventfd) case TARGET_NR_eventfd: ret = get_errno(eventfd(arg1, 0)); - fd_trans_register(ret, &target_eventfd_trans); + if (ret >= 0) { + fd_trans_register(ret, &target_eventfd_trans); + } break; #endif #if defined(TARGET_NR_eventfd2) @@ -11928,7 +11936,9 @@ abi_long do_syscall(void *cpu_env, int num, abi_long arg1, host_flags |= O_CLOEXEC; } ret = get_errno(eventfd(arg1, host_flags)); - fd_trans_register(ret, &target_eventfd_trans); + if (ret >= 0) { + fd_trans_register(ret, &target_eventfd_trans); + } break; } #endif diff --git a/linux-user/trace-events b/linux-user/trace-events index fc71f91..80ad957 100644 --- a/linux-user/trace-events +++ b/linux-user/trace-events @@ -1,4 +1,4 @@ -# See docs/tracing.txt for syntax documentation. +# See docs/devel/tracing.txt for syntax documentation. # linux-user/signal.c user_setup_frame(void *env, uint64_t frame_addr) "env=%p frame_addr=%"PRIx64 |