<feed xmlns='http://www.w3.org/2005/Atom'>
<title>rust/src/libstd/collections/hash, branch 1.31.1</title>
<subtitle>https://github.com/rust-lang/rust
</subtitle>
<id>http://git.dreamy.place/mirrors/rust/atom?h=1.31.1</id>
<link rel='self' href='http://git.dreamy.place/mirrors/rust/atom?h=1.31.1'/>
<link rel='alternate' type='text/html' href='http://git.dreamy.place/mirrors/rust/'/>
<updated>2018-09-16T18:03:39+00:00</updated>
<entry>
<title>Auto merge of #53804 - RalfJung:ptr-invalid, r=nagisa</title>
<updated>2018-09-16T18:03:39+00:00</updated>
<author>
<name>bors</name>
<email>bors@rust-lang.org</email>
</author>
<published>2018-09-16T18:03:39+00:00</published>
<link rel='alternate' type='text/html' href='http://git.dreamy.place/mirrors/rust/commit/?id=8a2dec6e583bc6425a91b277bdc6c602088845f1'/>
<id>urn:sha1:8a2dec6e583bc6425a91b277bdc6c602088845f1</id>
<content type='text'>
fix some uses of pointer intrinsics with invalid pointers

[Found by miri](https://github.com/solson/miri/pull/446):

* `Vec::into_iter` calls `ptr::read` (and the underlying `copy_nonoverlapping`) with an unaligned pointer to a ZST. [According to LLVM devs](https://bugs.llvm.org/show_bug.cgi?id=38583), this is UB because it contradicts the metadata we are attaching to that pointer.
* `HashMap` creation calls `ptr:.write_bytes` on a NULL pointer with a count of 0. This is likely not currently UB *currently*, but it violates the rules we are setting in https://github.com/rust-lang/rust/pull/53783, and we might want to exploit those rules later (e.g. with more `nonnull` attributes for LLVM).

    Probably what `HashMap` really should do is use `NonNull::dangling()` instead of 0 for the empty case, but that would require a more careful analysis of the code.

It seems like ideally, we should do a review of usage of such intrinsics all over libstd to ensure that they use valid pointers even when the size is 0. Is it worth opening an issue for that?
</content>
</entry>
<entry>
<title>Eliminate unused variable warning</title>
<updated>2018-09-13T20:48:09+00:00</updated>
<author>
<name>Jonathan Behrens</name>
<email>fintelia@gmail.com</email>
</author>
<published>2018-09-13T20:48:09+00:00</published>
<link rel='alternate' type='text/html' href='http://git.dreamy.place/mirrors/rust/commit/?id=e9583628b2dcc389a69999e5ff431b70c1561488'/>
<id>urn:sha1:e9583628b2dcc389a69999e5ff431b70c1561488</id>
<content type='text'>
</content>
</entry>
<entry>
<title>Remove println!() statement from HashMap unit test</title>
<updated>2018-09-13T18:58:13+00:00</updated>
<author>
<name>Jonathan Behrens</name>
<email>fintelia@gmail.com</email>
</author>
<published>2018-09-13T18:58:13+00:00</published>
<link rel='alternate' type='text/html' href='http://git.dreamy.place/mirrors/rust/commit/?id=1ad0919fa9a9404ba82125c2c654f3d8c25a202b'/>
<id>urn:sha1:1ad0919fa9a9404ba82125c2c654f3d8c25a202b</id>
<content type='text'>
</content>
</entry>
<entry>
<title>fix typos in growth algo description</title>
<updated>2018-09-10T16:02:16+00:00</updated>
<author>
<name>Val</name>
<email>dgm97@cornell.edu</email>
</author>
<published>2018-09-10T16:02:16+00:00</published>
<link rel='alternate' type='text/html' href='http://git.dreamy.place/mirrors/rust/commit/?id=abe0f027ae23b47dfabeb217aaa56b155d565ae3'/>
<id>urn:sha1:abe0f027ae23b47dfabeb217aaa56b155d565ae3</id>
<content type='text'>
modified to read "the first table overflows into the second, and the second into the first." plus smaller typos</content>
</entry>
<entry>
<title>Fix invalid urls</title>
<updated>2018-09-06T21:32:30+00:00</updated>
<author>
<name>Guillaume Gomez</name>
<email>guillaume1.gomez@gmail.com</email>
</author>
<published>2018-07-01T16:51:39+00:00</published>
<link rel='alternate' type='text/html' href='http://git.dreamy.place/mirrors/rust/commit/?id=c1ad1b03388778893159c549db82b2716c71f102'/>
<id>urn:sha1:c1ad1b03388778893159c549db82b2716c71f102</id>
<content type='text'>
</content>
</entry>
<entry>
<title>fix some uses of pointer intrinsics with invalid pointers</title>
<updated>2018-08-29T21:08:47+00:00</updated>
<author>
<name>Ralf Jung</name>
<email>post@ralfj.de</email>
</author>
<published>2018-08-29T21:08:47+00:00</published>
<link rel='alternate' type='text/html' href='http://git.dreamy.place/mirrors/rust/commit/?id=61f0a2b3fd961c9ae6d327d384bcffabf89a1c26'/>
<id>urn:sha1:61f0a2b3fd961c9ae6d327d384bcffabf89a1c26</id>
<content type='text'>
</content>
</entry>
<entry>
<title>Replace usages of ptr::offset with ptr::{add,sub}.</title>
<updated>2018-08-20T11:28:34+00:00</updated>
<author>
<name>Corey Farwell</name>
<email>coreyf@rwell.org</email>
</author>
<published>2018-08-20T02:16:22+00:00</published>
<link rel='alternate' type='text/html' href='http://git.dreamy.place/mirrors/rust/commit/?id=993fb934640b7e514f3c629c33a2698a83ed8c3e'/>
<id>urn:sha1:993fb934640b7e514f3c629c33a2698a83ed8c3e</id>
<content type='text'>
</content>
</entry>
<entry>
<title>Move core::alloc::CollectionAllocErr to alloc::collections</title>
<updated>2018-06-29T12:01:33+00:00</updated>
<author>
<name>Simon Sapin</name>
<email>simon.sapin@exyr.org</email>
</author>
<published>2018-06-15T01:56:35+00:00</published>
<link rel='alternate' type='text/html' href='http://git.dreamy.place/mirrors/rust/commit/?id=b0547cea0ae50f49619ded26f43d0d55a1674b14'/>
<id>urn:sha1:b0547cea0ae50f49619ded26f43d0d55a1674b14</id>
<content type='text'>
</content>
</entry>
<entry>
<title>Auto merge of #51543 - SimonSapin:oom, r=SimonSapin</title>
<updated>2018-06-19T19:22:12+00:00</updated>
<author>
<name>bors</name>
<email>bors@rust-lang.org</email>
</author>
<published>2018-06-19T19:22:12+00:00</published>
<link rel='alternate' type='text/html' href='http://git.dreamy.place/mirrors/rust/commit/?id=d692ab406ebab720f99f950ac3e9aba1e01296af'/>
<id>urn:sha1:d692ab406ebab720f99f950ac3e9aba1e01296af</id>
<content type='text'>
Rename OOM to allocation error

The acronym is not descriptive unless one has seen it before.

* Rename the `oom` function to `handle_alloc_error`. It was **stabilized in 1.28**, so if we do this at all we need to land it this cycle.
* Rename `set_oom_hook` to `set_alloc_error_hook`
* Rename `take_oom_hook` to `take_alloc_error_hook`

Bikeshed: `on` v.s. `for`, `alloc` v.s. `allocator`, `error` v.s. `failure`
</content>
</entry>
<entry>
<title>Rename OOM to allocation error</title>
<updated>2018-06-18T19:41:24+00:00</updated>
<author>
<name>Simon Sapin</name>
<email>simon.sapin@exyr.org</email>
</author>
<published>2018-06-13T22:32:30+00:00</published>
<link rel='alternate' type='text/html' href='http://git.dreamy.place/mirrors/rust/commit/?id=2b789bd0570983e82533f9ed30c80312ac334694'/>
<id>urn:sha1:2b789bd0570983e82533f9ed30c80312ac334694</id>
<content type='text'>
The acronym is not descriptive unless one has seen it before.

* Rename the `oom` function to `handle_alloc_error`. It was **stabilized in 1.28**, so if we do this at all we need to land it this cycle.
* Rename `set_oom_hook` to `set_alloc_error_hook`
* Rename `take_oom_hook` to `take_alloc_error_hook`

Bikeshed: `alloc` v.s. `allocator`, `error` v.s. `failure`
</content>
</entry>
</feed>
