From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: by sourceware.org (Postfix, from userid 48) id E89DB3858CDA; Wed, 24 Jan 2024 04:27:39 +0000 (GMT) DKIM-Filter: OpenDKIM Filter v2.11.0 sourceware.org E89DB3858CDA DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=sourceware.org; s=default; t=1706070459; bh=AhqUcfIb9HQIFVGcOIlpbNRb1BLchNLaogNKsBIz19o=; h=From:To:Subject:Date:From; b=cQ9YzNi7Yib+CITGsExA7innLYwPA8HED9R7LxZE4auKfEwpPBByJ9DGraZ6NeoH3 081/8L2dHJPQ7mpr6ZNgvvW2ZXIKKqtd6LsbDV0w5A207oQUyIJxb1TSCd3RzdUBpc hRxh2VlEPL/Qu6fwGWYJJhSzMfGFIUGP5iKQAFW4= From: "carlos at redhat dot com" To: glibc-bugs@sourceware.org Subject: [Bug libc/31286] New: glibc 2.36: Aliasing violation in libio/iovdprintf.c before refactor to internal buffers Date: Wed, 24 Jan 2024 04:27:39 +0000 X-Bugzilla-Reason: CC X-Bugzilla-Type: new X-Bugzilla-Watch-Reason: None X-Bugzilla-Product: glibc X-Bugzilla-Component: libc X-Bugzilla-Version: 2.36 X-Bugzilla-Keywords: X-Bugzilla-Severity: normal X-Bugzilla-Who: carlos at redhat dot com X-Bugzilla-Status: NEW X-Bugzilla-Resolution: X-Bugzilla-Priority: P2 X-Bugzilla-Assigned-To: unassigned at sourceware dot org X-Bugzilla-Target-Milestone: --- X-Bugzilla-Flags: X-Bugzilla-Changed-Fields: bug_id short_desc product version bug_status bug_severity priority component assigned_to reporter cc target_milestone Message-ID: Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: quoted-printable X-Bugzilla-URL: http://sourceware.org/bugzilla/ Auto-Submitted: auto-generated MIME-Version: 1.0 List-Id: https://sourceware.org/bugzilla/show_bug.cgi?id=3D31286 Bug ID: 31286 Summary: glibc 2.36: Aliasing violation in libio/iovdprintf.c before refactor to internal buffers Product: glibc Version: 2.36 Status: NEW Severity: normal Priority: P2 Component: libc Assignee: unassigned at sourceware dot org Reporter: carlos at redhat dot com CC: drepper.fsp at gmail dot com Target Milestone: --- In libio/iovdprintf.c in glibc 2.36 (before 8ece45e4f586abd212d1c02d74d38ef681a45600 and the conversion to internal buffers): 58=20 59 _IO_FINISH (&tmpfil.file); 60=20 The macro casts from the first member to the outer containing struct. 92 /* Essentially ((TYPE *) THIS)->MEMBER, but avoiding the aliasing 93 violation in case THIS has a different pointer type. */ 94 #define _IO_CAST_FIELD_ACCESS(THIS, TYPE, MEMBER) \ 95 (*(_IO_MEMBER_TYPE (TYPE, MEMBER) *)(((char *) (THIS)) \ 96 + offsetof(TYPE, MEMBER))) This works but some downstream pointer provenance checking tooling raises t= his as an error. It really should have been '_IO_FINISH (&tmpfil)' --=20 You are receiving this mail because: You are on the CC list for the bug.=