<feed xmlns='http://www.w3.org/2005/Atom'>
<title>rust/compiler/rustc_codegen_llvm/src/allocator.rs, branch 1.72.0</title>
<subtitle>https://github.com/rust-lang/rust
</subtitle>
<id>http://git.dreamy.place/mirrors/rust/atom?h=1.72.0</id>
<link rel='self' href='http://git.dreamy.place/mirrors/rust/atom?h=1.72.0'/>
<link rel='alternate' type='text/html' href='http://git.dreamy.place/mirrors/rust/'/>
<updated>2023-07-05T11:11:27+00:00</updated>
<entry>
<title>Revert "use new c literals instead of cstr! macro"</title>
<updated>2023-07-05T11:11:27+00:00</updated>
<author>
<name>León Orell Valerian Liehr</name>
<email>me@fmease.dev</email>
</author>
<published>2023-07-04T17:53:44+00:00</published>
<link rel='alternate' type='text/html' href='http://git.dreamy.place/mirrors/rust/commit/?id=3788b7ab32a6398e7563557f7b32f741f43704a3'/>
<id>urn:sha1:3788b7ab32a6398e7563557f7b32f741f43704a3</id>
<content type='text'>
This reverts commit a17561ffc90c900cb7d0e96b00c6381244764ef7.
</content>
</entry>
<entry>
<title>use new c literals instead of cstr! macro</title>
<updated>2023-05-31T16:40:24+00:00</updated>
<author>
<name>klensy</name>
<email>klensy@users.noreply.github.com</email>
</author>
<published>2023-05-16T15:43:23+00:00</published>
<link rel='alternate' type='text/html' href='http://git.dreamy.place/mirrors/rust/commit/?id=a17561ffc90c900cb7d0e96b00c6381244764ef7'/>
<id>urn:sha1:a17561ffc90c900cb7d0e96b00c6381244764ef7</id>
<content type='text'>
</content>
</entry>
<entry>
<title>Prevent insta-stable no alloc shim support</title>
<updated>2023-05-11T14:35:09+00:00</updated>
<author>
<name>bjorn3</name>
<email>17426603+bjorn3@users.noreply.github.com</email>
</author>
<published>2022-09-10T11:33:44+00:00</published>
<link rel='alternate' type='text/html' href='http://git.dreamy.place/mirrors/rust/commit/?id=66982a383b6f7d3a933fc6896202632bee7161a4'/>
<id>urn:sha1:66982a383b6f7d3a933fc6896202632bee7161a4</id>
<content type='text'>
You will need to add the following as replacement for the old __rust_*
definitions when not using the alloc shim.

    #[no_mangle]
    static __rust_no_alloc_shim_is_unstable: u8 = 0;
</content>
</entry>
<entry>
<title>Use global_fn_name instead of format!</title>
<updated>2023-05-11T14:35:09+00:00</updated>
<author>
<name>bjorn3</name>
<email>bjorn3@users.noreply.github.com</email>
</author>
<published>2021-07-06T16:56:01+00:00</published>
<link rel='alternate' type='text/html' href='http://git.dreamy.place/mirrors/rust/commit/?id=145b0574efd63603f35beda4d6b69933c8a01c1f'/>
<id>urn:sha1:145b0574efd63603f35beda4d6b69933c8a01c1f</id>
<content type='text'>
</content>
</entry>
<entry>
<title>Split AllocatorKind::fn_name in global_fn_name and default_fn_name</title>
<updated>2023-05-11T14:35:08+00:00</updated>
<author>
<name>bjorn3</name>
<email>bjorn3@users.noreply.github.com</email>
</author>
<published>2021-07-03T15:50:53+00:00</published>
<link rel='alternate' type='text/html' href='http://git.dreamy.place/mirrors/rust/commit/?id=6ba7c5db079132b5d85112083691d4203a6b761c'/>
<id>urn:sha1:6ba7c5db079132b5d85112083691d4203a6b761c</id>
<content type='text'>
</content>
</entry>
<entry>
<title>Don't use an allocator shim for `#[global_allocator]`</title>
<updated>2023-05-11T14:23:31+00:00</updated>
<author>
<name>bjorn3</name>
<email>bjorn3@users.noreply.github.com</email>
</author>
<published>2021-07-03T14:46:41+00:00</published>
<link rel='alternate' type='text/html' href='http://git.dreamy.place/mirrors/rust/commit/?id=4ce20663f767c7d1610411b21ed31db3e9af21f4'/>
<id>urn:sha1:4ce20663f767c7d1610411b21ed31db3e9af21f4</id>
<content type='text'>
This makes it possible to use liballoc/libstd in combination with
`--emit obj` if you use `#[global_allocator]`. Making it work for the
default libstd allocator would require weak functions, which are not
well supported on all systems.
</content>
</entry>
<entry>
<title>Revert "Remove #[alloc_error_handler] from the compiler and library"</title>
<updated>2023-04-24T22:08:35+00:00</updated>
<author>
<name>Matthias Krüger</name>
<email>matthias.krueger@famsik.de</email>
</author>
<published>2023-04-24T22:08:35+00:00</published>
<link rel='alternate' type='text/html' href='http://git.dreamy.place/mirrors/rust/commit/?id=f54dbe6e3116a475f63b580884f07474239a0b25'/>
<id>urn:sha1:f54dbe6e3116a475f63b580884f07474239a0b25</id>
<content type='text'>
This reverts commit abc0660118cc95f47445fd33502a11dd448f5968.
</content>
</entry>
<entry>
<title>Remove #[alloc_error_handler] from the compiler and library</title>
<updated>2023-04-16T15:35:50+00:00</updated>
<author>
<name>Amanieu d'Antras</name>
<email>amanieu@gmail.com</email>
</author>
<published>2023-03-22T23:43:20+00:00</published>
<link rel='alternate' type='text/html' href='http://git.dreamy.place/mirrors/rust/commit/?id=abc0660118cc95f47445fd33502a11dd448f5968'/>
<id>urn:sha1:abc0660118cc95f47445fd33502a11dd448f5968</id>
<content type='text'>
</content>
</entry>
<entry>
<title>Add LLVM KCFI support to the Rust compiler</title>
<updated>2022-12-09T01:24:39+00:00</updated>
<author>
<name>Ramon de C Valle</name>
<email>rcvalle@users.noreply.github.com</email>
</author>
<published>2022-11-22T05:29:00+00:00</published>
<link rel='alternate' type='text/html' href='http://git.dreamy.place/mirrors/rust/commit/?id=65698ae9f30f5ad72224edd1884fb4ddd1279366'/>
<id>urn:sha1:65698ae9f30f5ad72224edd1884fb4ddd1279366</id>
<content type='text'>
This commit adds LLVM Kernel Control Flow Integrity (KCFI) support to
the Rust compiler. It initially provides forward-edge control flow
protection for operating systems kernels for Rust-compiled code only by
aggregating function pointers in groups identified by their return and
parameter types. (See llvm/llvm-project@cff5bef.)

Forward-edge control flow protection for C or C++ and Rust -compiled
code "mixed binaries" (i.e., for when C or C++ and Rust -compiled code
share the same virtual address space) will be provided in later work as
part of this project by identifying C char and integer type uses at the
time types are encoded (see Type metadata in the design document in the
tracking issue #89653).

LLVM KCFI can be enabled with -Zsanitizer=kcfi.

Co-authored-by: bjorn3 &lt;17426603+bjorn3@users.noreply.github.com&gt;
</content>
</entry>
<entry>
<title>Rewrite implementation of `#[alloc_error_handler]`</title>
<updated>2022-10-31T16:32:57+00:00</updated>
<author>
<name>Amanieu d'Antras</name>
<email>amanieu@gmail.com</email>
</author>
<published>2022-10-14T01:24:58+00:00</published>
<link rel='alternate' type='text/html' href='http://git.dreamy.place/mirrors/rust/commit/?id=56074b5231ceef266a1097ea355f62c951e1b468'/>
<id>urn:sha1:56074b5231ceef266a1097ea355f62c951e1b468</id>
<content type='text'>
The new implementation doesn't use weak lang items and instead changes
`#[alloc_error_handler]` to an attribute macro just like
`#[global_allocator]`.

The attribute will generate the `__rg_oom` function which is called by
the compiler-generated `__rust_alloc_error_handler`. If no `__rg_oom`
function is defined in any crate then the compiler shim will call
`__rdl_oom` in the alloc crate which will simply panic.

This also fixes link errors with `-C link-dead-code` with
`default_alloc_error_handler`: `__rg_oom` was previously defined in the
alloc crate and would attempt to reference the `oom` lang item, even if
it didn't exist. This worked as long as `__rg_oom` was excluded from
linking since it was not called.

This is a prerequisite for the stabilization of
`default_alloc_error_handler` (#102318).
</content>
</entry>
</feed>
