From: Mark Wielaard Date: Wed, 9 Feb 2022 22:37:53 +0000 (+0100) Subject: Do not try to record fd name for io_uring_setup X-Git-Tag: VALGRIND_3_19_0~38 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=c90561e20f7df2e9c5ae30f1cdafd330b0172345;p=thirdparty%2Fvalgrind.git Do not try to record fd name for io_uring_setup In POST(sys_io_uring_setup) we tried to use record_fd_open_with_given_name with ARG1 as name. But ARG1 isn't a char pointer. So this might crash with --track-fds=yes. Since no (file) name is associated with the fd returned by io_uring_setup use record_fd_open_nameless instead. https://bugs.kde.org/show_bug.cgi?id=449838 --- diff --git a/NEWS b/NEWS index 718b8aef0a..a60a07c915 100644 --- a/NEWS +++ b/NEWS @@ -65,6 +65,7 @@ are not entered into bugzilla tend to get forgotten about or ignored. 449483 Powerpc: vcmpgtsq., vcmpgtuq,, vcmpequq. instructions not setting the condition code correctly. 449672 ppc64 --track-origins=yes failures because of bad cmov addHRegUse +449838 sigsegv liburing the 'impossible' happened for io_uring_setup To see details of a given bug, visit https://bugs.kde.org/show_bug.cgi?id=XXXXXX diff --git a/coregrind/m_syswrap/syswrap-linux.c b/coregrind/m_syswrap/syswrap-linux.c index ac2a9f0c36..792589766b 100644 --- a/coregrind/m_syswrap/syswrap-linux.c +++ b/coregrind/m_syswrap/syswrap-linux.c @@ -13206,7 +13206,7 @@ POST(sys_io_uring_setup) SET_STATUS_Failure( VKI_EMFILE ); } else { if (VG_(clo_track_fds)) - ML_(record_fd_open_with_given_name)(tid, RES, (HChar*)(Addr)ARG1); + ML_(record_fd_open_nameless)(tid, RES); POST_MEM_WRITE(ARG2 + offsetof(struct vki_io_uring_params, sq_off), sizeof(struct vki_io_sqring_offsets) + sizeof(struct vki_io_cqring_offsets));