<feed xmlns='http://www.w3.org/2005/Atom'>
<title>rust/library/std/src/io/buffered, branch lcnr/rustc-dev-guide</title>
<subtitle>https://github.com/rust-lang/rust
</subtitle>
<id>http://git.dreamy.place/mirrors/rust/atom?h=lcnr/rustc-dev-guide</id>
<link rel='self' href='http://git.dreamy.place/mirrors/rust/atom?h=lcnr/rustc-dev-guide'/>
<link rel='alternate' type='text/html' href='http://git.dreamy.place/mirrors/rust/'/>
<updated>2025-03-31T22:08:02+00:00</updated>
<entry>
<title>io: Avoid Avoid marking bytes as uninit in `BufReader::peek`</title>
<updated>2025-03-31T22:08:02+00:00</updated>
<author>
<name>Benoît du Garreau</name>
<email>benoit@dugarreau.fr</email>
</author>
<published>2025-03-28T14:52:56+00:00</published>
<link rel='alternate' type='text/html' href='http://git.dreamy.place/mirrors/rust/commit/?id=878786848fdbe29325e9172d0ab86ed964eca7a6'/>
<id>urn:sha1:878786848fdbe29325e9172d0ab86ed964eca7a6</id>
<content type='text'>
</content>
</entry>
<entry>
<title>Rollup merge of #137890 - lolbinarycat:docs-bufreader-peek-consume, r=Mark-Simulacrum</title>
<updated>2025-03-16T01:40:03+00:00</updated>
<author>
<name>许杰友 Jieyou Xu (Joe)</name>
<email>39484203+jieyouxu@users.noreply.github.com</email>
</author>
<published>2025-03-16T01:40:03+00:00</published>
<link rel='alternate' type='text/html' href='http://git.dreamy.place/mirrors/rust/commit/?id=f16ce2ae6ce84428a7df8ed6b9745815ed6c1ca4'/>
<id>urn:sha1:f16ce2ae6ce84428a7df8ed6b9745815ed6c1ca4</id>
<content type='text'>
doc: clarify that consume can be called after BufReader::peek

tracking issue #128405
</content>
</entry>
<entry>
<title>doc: clarify that consume can be called after BufReader::peek</title>
<updated>2025-03-02T15:49:43+00:00</updated>
<author>
<name>binarycat</name>
<email>binarycat@envs.net</email>
</author>
<published>2025-03-02T15:49:43+00:00</published>
<link rel='alternate' type='text/html' href='http://git.dreamy.place/mirrors/rust/commit/?id=57046e1470385078c866cbe2e2d5bfb0c666d0fd'/>
<id>urn:sha1:57046e1470385078c866cbe2e2d5bfb0c666d0fd</id>
<content type='text'>
</content>
</entry>
<entry>
<title>Fix logic error in Buffer::read_more()</title>
<updated>2025-03-01T01:36:19+00:00</updated>
<author>
<name>Will Woods</name>
<email>w@wizard.zone</email>
</author>
<published>2025-03-01T01:36:19+00:00</published>
<link rel='alternate' type='text/html' href='http://git.dreamy.place/mirrors/rust/commit/?id=6d07144613ffb54e6856bd5543acfe5e12eb3447'/>
<id>urn:sha1:6d07144613ffb54e6856bd5543acfe5e12eb3447</id>
<content type='text'>
Buffer::read_more() is supposed to refill the buffer without discarding
its contents, which are in the range `pos .. filled`.

It mistakenly borrows the range `pos ..`, fills that, and then
increments `filled` by the amount read. This overwrites the buffer's
existing contents and sets `filled` to a too-large value that either
exposes uninitialized bytes or walks off the end of the buffer entirely.

This patch makes it correctly fill only the unfilled portion of the
buffer, which should maintain all the type invariants and fix the test
failure introduced in commit b1196717fcb.
</content>
</entry>
<entry>
<title>Tweak BufReader::peek() doctest to expose bug in Buffer::read_more()</title>
<updated>2025-03-01T01:30:53+00:00</updated>
<author>
<name>Will Woods</name>
<email>w@wizard.zone</email>
</author>
<published>2025-03-01T01:30:53+00:00</published>
<link rel='alternate' type='text/html' href='http://git.dreamy.place/mirrors/rust/commit/?id=b1196717fcba13d8ff73ec06c3d8c5bee3b74ec9'/>
<id>urn:sha1:b1196717fcba13d8ff73ec06c3d8c5bee3b74ec9</id>
<content type='text'>
This patch makes BufReader::peek()'s doctest call read_more() to refill
the buffer before the inner reader hits EOF. This exposes a bug in
read_more() that causes an out-of-bounds slice access and segfault.
</content>
</entry>
<entry>
<title>Add inherent versions of MaybeUninit methods for slices</title>
<updated>2025-01-12T04:57:00+00:00</updated>
<author>
<name>ltdk</name>
<email>usr@ltdk.xyz</email>
</author>
<published>2024-08-18T23:50:41+00:00</published>
<link rel='alternate' type='text/html' href='http://git.dreamy.place/mirrors/rust/commit/?id=e37daf0c868efc016dd8039d59d53a03303c9c07'/>
<id>urn:sha1:e37daf0c868efc016dd8039d59d53a03303c9c07</id>
<content type='text'>
</content>
</entry>
<entry>
<title>Avoid short writes in LineWriter</title>
<updated>2024-12-21T15:13:22+00:00</updated>
<author>
<name>Chris Denton</name>
<email>chris@chrisdenton.dev</email>
</author>
<published>2024-12-20T12:13:30+00:00</published>
<link rel='alternate' type='text/html' href='http://git.dreamy.place/mirrors/rust/commit/?id=fdb43ef0c456514d634741e46a1f4eba454f1a84'/>
<id>urn:sha1:fdb43ef0c456514d634741e46a1f4eba454f1a84</id>
<content type='text'>
Also update the tests to avoid testing implementation details.
</content>
</entry>
<entry>
<title>std: update internal uses of `io::const_error!`</title>
<updated>2024-11-26T17:38:24+00:00</updated>
<author>
<name>joboet</name>
<email>jonasboettiger@icloud.com</email>
</author>
<published>2024-11-25T12:49:25+00:00</published>
<link rel='alternate' type='text/html' href='http://git.dreamy.place/mirrors/rust/commit/?id=c14d137bfc5133f5a38fad2f58e30fed9c47ffe2'/>
<id>urn:sha1:c14d137bfc5133f5a38fad2f58e30fed9c47ffe2</id>
<content type='text'>
</content>
</entry>
<entry>
<title>Fix std tests for wasm32-wasip2 target</title>
<updated>2024-09-29T02:48:13+00:00</updated>
<author>
<name>Nicola Krumschmidt</name>
<email>git@nkcom.de</email>
</author>
<published>2024-09-04T00:18:32+00:00</published>
<link rel='alternate' type='text/html' href='http://git.dreamy.place/mirrors/rust/commit/?id=87f17f3ccb69e9827562522ae1a38f84d2ba998a'/>
<id>urn:sha1:87f17f3ccb69e9827562522ae1a38f84d2ba998a</id>
<content type='text'>
</content>
</entry>
<entry>
<title>Rollup merge of #125404 - a1phyr:fix-read_buf-uses, r=workingjubilee</title>
<updated>2024-09-28T07:35:08+00:00</updated>
<author>
<name>Matthias Krüger</name>
<email>matthias.krueger@famsik.de</email>
</author>
<published>2024-09-28T07:35:08+00:00</published>
<link rel='alternate' type='text/html' href='http://git.dreamy.place/mirrors/rust/commit/?id=6e9db86787e09e9a15a0d3b9a317fb2d0fc33de9'/>
<id>urn:sha1:6e9db86787e09e9a15a0d3b9a317fb2d0fc33de9</id>
<content type='text'>
Fix `read_buf` uses in `std`

Following lib-team decision here: https://github.com/rust-lang/rust/issues/78485#issuecomment-2122992314

Guard against the pathological behavior of both returning an error and performing a read.
</content>
</entry>
</feed>
