Re: [PATCH v2] libio: Fix fmemopen_write on appending condition
Project / Subsystem
glibc / libio
Date
2026-04-17
Proposer
Rocket Ma <[email protected]>
Source type
public_inbox
Consensus
Under Review
Sentiment
5/10
Technical tradeoffs
- • The proposed fix involves directly setting the buffer to NULL, rejecting `setbuf` requests, and returning `EINVAL` if space is insufficient. This approach may limit flexibility.
- • Alternative approaches, such as adding a specific size of allocated buffer function, may introduce inconsistencies if the user sets the buffer manually.
All attributes
- project
- glibc
- subsystem
- libio
- patch_id
- —
- discussion_id
- CAO_32JoTKeJpUmG+_PiVJGRThrQ0Y2DU+mSDx8iCfxH2w=_5gA@mail.gmail.com
- source_type
- public_inbox
- title
- Re: [PATCH v2] libio: Fix fmemopen_write on appending condition
- headline
- libio: Seeking feedback on fmemopen_write fix
- tldr
- Rocket Ma is pinging for feedback on a patch to fix `fmemopen_write` in appending condition.
- stakes
- Corrects memory stream handling, potentially preventing unexpected behavior when appending with fmemopen.
- proposer
- Rocket Ma <[email protected]>
- consensus
- Under Review
- outcome
- under_review
- sentiment_score
- 5
- sentiment_rationale
- The author is explicitly asking for feedback, indicating uncertainty.
- technical_tradeoffs
-
- • The proposed fix involves directly setting the buffer to NULL, rejecting `setbuf` requests, and returning `EINVAL` if space is insufficient. This approach may limit flexibility.
- • Alternative approaches, such as adding a specific size of allocated buffer function, may introduce inconsistencies if the user sets the buffer manually.
- series_id
- —
- series_role
- standalone
- series_parts
- []
- tags
-
- • libio
- • fmemopen
- • append
- • bugfix
- bugzilla_url
- —
- date
- 2026-04-17T00:00:00.000Z
Re: [PATCH v2] libio: Fix fmemopen_write on appending condition
Rocket Ma is requesting feedback on version 2 of a patch that aims to fix fmemopen_write when used in appending condition. The patch’s approach is under discussion, particularly regarding how it handles buffer size and potential inconsistencies with setbuf.