os-rust/compiler/rustc_codegen_gcc/src
bors aa01891700 Auto merge of #99420 - RalfJung:vtable, r=oli-obk
make vtable pointers entirely opaque

This implements the scheme discussed in https://github.com/rust-lang/unsafe-code-guidelines/issues/338: vtable pointers should be considered entirely opaque and not even readable by Rust code, similar to function pointers.

- We have a new kind of `GlobalAlloc` that symbolically refers to a vtable.
- Miri uses that kind of allocation when generating a vtable.
- The codegen backends, upon encountering such an allocation, call `vtable_allocation` to obtain an actually dataful allocation for this vtable.
- We need new intrinsics to obtain the size and align from a vtable (for some `ptr::metadata` APIs), since direct accesses are UB now.

I had to touch quite a bit of code that I am not very familiar with, so some of this might not make much sense...
r? `@oli-obk`
2022-07-22 01:33:49 +00:00
..
back simplify a self-profiling activity call in the cg_gcc backend 2022-04-07 15:47:20 +02:00
intrinsic Add llvm.type.checked.load intrinsic 2022-06-14 14:50:52 +02:00
abi.rs Remove unused StableMap and StableSet types from rustc_data_structures 2022-07-20 13:11:39 +02:00
allocator.rs Rename debugging_opts to unstable_opts 2022-07-13 17:47:06 -05:00
archive.rs Remove the source archive functionality of ArchiveWriter 2022-06-19 12:56:31 +00:00
asm.rs Merge commit 'e8dca3e87d164d2806098c462c6ce41301341f68' into sync_from_cg_gcc 2022-06-06 22:04:37 -04:00
base.rs Rename debugging_opts to unstable_opts 2022-07-13 17:47:06 -05:00
builder.rs Remove unused StableMap and StableSet types from rustc_data_structures 2022-07-20 13:11:39 +02:00
callee.rs Update TypeVisitor paths 2022-07-06 06:41:53 +01:00
common.rs slightly cleaner, if more verbose, vtable handling in codegen backends 2022-07-20 17:12:07 -04:00
consts.rs Merge commit 'e8dca3e87d164d2806098c462c6ce41301341f68' into sync_from_cg_gcc 2022-06-06 22:04:37 -04:00
context.rs Avoid unnecessary string interning for const_str 2022-06-28 18:38:36 +00:00
coverageinfo.rs Merge commit 'e228f0c16ea8c34794a6285bf57aab627c26b147' into libgccjit-codegen 2021-08-15 08:29:07 -04:00
debuginfo.rs debuginfo: Refactor debuginfo generation for types -- Rename DebugInfoMethods::create_vtable_metadata() to DebugInfoMethods::create_vtable_debuginfo() 2022-03-14 17:25:24 +01:00
declare.rs Merge commit 'e8dca3e87d164d2806098c462c6ce41301341f68' into sync_from_cg_gcc 2022-06-06 22:04:37 -04:00
int.rs Merge commit 'e8dca3e87d164d2806098c462c6ce41301341f68' into sync_from_cg_gcc 2022-06-06 22:04:37 -04:00
lib.rs Rollup merge of #99155 - Amanieu:unstable-target-features, r=davidtwco 2022-07-13 19:32:36 +05:30
mono_item.rs Update TypeVisitor paths 2022-07-06 06:41:53 +01:00
type_.rs Merge commit 'e8dca3e87d164d2806098c462c6ce41301341f68' into sync_from_cg_gcc 2022-06-06 22:04:37 -04:00
type_of.rs Update TypeVisitor paths 2022-07-06 06:41:53 +01:00