RHEL Engineering is moving the tracking of its product development work on RHEL 6 through RHEL 9 to Red Hat Jira (issues.redhat.com). If you're a Red Hat customer, please continue to file support cases via the Red Hat customer portal. If you're not, please head to the "RHEL project" in Red Hat Jira and file new tickets here. Individual Bugzilla bugs in the statuses "NEW", "ASSIGNED", and "POST" are being migrated throughout September 2023. Bugs of Red Hat partners with an assigned Engineering Partner Manager (EPM) are migrated in late September as per pre-agreed dates. Bugs against components "kernel", "kernel-rt", and "kpatch" are only migrated if still in "NEW" or "ASSIGNED". If you cannot log in to RH Jira, please consult article #7032570. That failing, please send an e-mail to the RH Jira admins at rh-issues@redhat.com to troubleshoot your issue as a user management inquiry. The email creates a ServiceNow ticket with Red Hat. Individual Bugzilla bugs that are migrated will be moved to status "CLOSED", resolution "MIGRATED", and set with "MigratedToJIRA" in "Keywords". The link to the successor Jira issue will be found under "Links", have a little "two-footprint" icon next to it, and direct you to the "RHEL project" in Red Hat Jira (issue links are of type "https://issues.redhat.com/browse/RHEL-XXXX", where "X" is a digit). This same link will be available in a blue banner at the top of the page informing you that that bug has been migrated.
Bug 1875597 - fwrite on stream opened with open_memstream() truncates the buffer size
Summary: fwrite on stream opened with open_memstream() truncates the buffer size
Keywords:
Status: CLOSED WONTFIX
Alias: None
Product: Red Hat Enterprise Linux 7
Classification: Red Hat
Component: glibc
Version: 7.8
Hardware: All
OS: Linux
unspecified
medium
Target Milestone: rc
: ---
Assignee: glibc team
QA Contact: qe-baseos-tools-bugs
URL:
Whiteboard:
Depends On: 1875596
Blocks:
TreeView+ depends on / blocked
 
Reported: 2020-09-03 20:35 UTC by Paulo Andrade
Modified: 2020-10-05 08:33 UTC (History)
9 users (show)

Fixed In Version:
Doc Type: If docs needed, set a value
Doc Text:
Clone Of: 1875596
Environment:
Last Closed: 2020-09-11 14:27:07 UTC
Target Upstream Version:
Embargoed:


Attachments (Terms of Use)


Links
System ID Private Priority Status Summary Last Updated
Sourceware 26557 0 P2 UNCONFIRMED Incorrect behavior with open_memstream in recent version(s) of glibc 2020-09-23 18:54:55 UTC

Description Paulo Andrade 2020-09-03 20:35:22 UTC
+++ This bug was initially created as a clone of Bug #1875596 +++

Current output:

"""
Running test: fopen()
position after fwrite: 24
position after SEEK_END: 24

Running test: fmemopen()
position after fwrite: 24
position after SEEK_END: 24

Running test: open_memstream()
position after fwrite: 24
position after SEEK_END: 4

open_memstream() final buffer size: 4
"""

Expected ouput:
"""
Running test: fopen()
position after fwrite: 24
position after SEEK_END: 24

Running test: fmemopen()
position after fwrite: 24
position after SEEK_END: 24

Running test: open_memstream()
position after fwrite: 24
position after SEEK_END: 24

open_memstream() final buffer size: 24
"""

  The seek to the start of the buffer, and write data smaller than
the stream length truncates the memory stream.

Comment 2 Carlos O'Donell 2020-09-11 14:27:07 UTC
Red Hat Enterprise Linux 7 has entered Maintenance Support 2 and as such we will not be fixing this issue in RHEL 7. The behaviour is not a regression in RHEL 7. We will be tracking this issue upstream and reviewing the RHEL 8 situation (bug 1875596). Closing as CLOSED/WONTFIX.


Note You need to log in before you can comment on or make changes to this bug.