https://bugs.kde.org/show_bug.cgi?id=359871
Steven Smith <so...@archy.org.uk> changed: What |Removed |Added ---------------------------------------------------------------------------- Attachment #97670|0 |1 is obsolete| | --- Comment #14 from Steven Smith <so...@archy.org.uk> --- Created attachment 97682 --> https://bugs.kde.org/attachment.cgi?id=97682&action=edit Third attempt at fixing it on Linux. Still doesn't quite work. Oh, crud, that was embarrassing. Here's another one which avoids that particular error, and even extends the test case to include a failing pselect... ... which just brings us to the next problem: valgrind: m_syswrap/syswrap-main.c:1950 (vgPlain_client_syscall): Assertion 'eq_SyscallArgs(&sci->args, &sci->orig_args)' failed. host stacktrace: ==12189== at 0x38084978: show_sched_status_wrk (m_libcassert.c:343) ==12189== by 0x38084A94: report_and_quit (m_libcassert.c:415) ==12189== by 0x38084C21: vgPlain_assert_fail (m_libcassert.c:481) ==12189== by 0x380D7A44: vgPlain_client_syscall (syswrap-main.c:1950) ==12189== by 0x380D414A: handle_syscall (scheduler.c:1118) >From here: if (sci->status.what == SsComplete && sr_isError(sci->status.sres)) { /* The pre-handler decided to fail syscall itself. */ PRINT(" --> [pre-fail] %s", VG_(sr_as_string)(sci->status.sres)); /* In this case, the pre-handler is also allowed to ask for the post-handler to be run anyway. Changing the args is not allowed. */ vg_assert(0 == (sci->flags & ~(SfMayBlock | SfPostOnFail | SfPollAfter))); vg_assert(eq_SyscallArgs(&sci->args, &sci->orig_args)); } So I can't use the syscall arguments to communicate from the PRE to POST handlers if the PRE call fails the syscall. Do you know if there any other ways of coordinating between them? Or at least some way for the POST handler to tell whether an error came from the PRE handler or from the actual kernel syscall? I'm sorry to have needed quite this many iterations on this one; it turns out to be a little more involved than I'd expected. -- You are receiving this mail because: You are watching all bug changes.