mirror of
				https://github.com/rust-lang/rust.git
				synced 2025-11-04 06:56:14 +00:00 
			
		
		
		
	This commit improves the LLVM Control Flow Integrity (CFI) support in the Rust compiler by providing forward-edge control flow protection for Rust-compiled code only by aggregating function pointers in groups identified by their return and parameter types. 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 CFI can be enabled with -Zsanitizer=cfi and requires LTO (i.e., -Clto).
		
			
				
	
	
		
			37 lines
		
	
	
		
			1.1 KiB
		
	
	
	
		
			TOML
		
	
	
	
	
	
			
		
		
	
	
			37 lines
		
	
	
		
			1.1 KiB
		
	
	
	
		
			TOML
		
	
	
	
	
	
[package]
 | 
						|
name = "rustc_codegen_llvm"
 | 
						|
version = "0.0.0"
 | 
						|
edition = "2021"
 | 
						|
 | 
						|
[lib]
 | 
						|
test = false
 | 
						|
doctest = false
 | 
						|
 | 
						|
[dependencies]
 | 
						|
bitflags = "1.0"
 | 
						|
cstr = "0.2"
 | 
						|
libc = "0.2"
 | 
						|
libloading = "0.7.1"
 | 
						|
measureme = "10.0.0"
 | 
						|
tracing = "0.1"
 | 
						|
rustc_middle = { path = "../rustc_middle" }
 | 
						|
rustc-demangle = "0.1.21"
 | 
						|
rustc_attr = { path = "../rustc_attr" }
 | 
						|
rustc_codegen_ssa = { path = "../rustc_codegen_ssa" }
 | 
						|
rustc_data_structures = { path = "../rustc_data_structures" }
 | 
						|
rustc_errors = { path = "../rustc_errors" }
 | 
						|
rustc_fs_util = { path = "../rustc_fs_util" }
 | 
						|
rustc_hir = { path = "../rustc_hir" }
 | 
						|
rustc_index = { path = "../rustc_index" }
 | 
						|
rustc_llvm = { path = "../rustc_llvm" }
 | 
						|
rustc_macros = { path = "../rustc_macros" }
 | 
						|
rustc_metadata = { path = "../rustc_metadata" }
 | 
						|
rustc_query_system = { path = "../rustc_query_system" }
 | 
						|
rustc_session = { path = "../rustc_session" }
 | 
						|
rustc_serialize = { path = "../rustc_serialize" }
 | 
						|
rustc_symbol_mangling = { path = "../rustc_symbol_mangling" }
 | 
						|
rustc_target = { path = "../rustc_target" }
 | 
						|
smallvec = { version = "1.8.1", features = ["union", "may_dangle"] }
 | 
						|
rustc_ast = { path = "../rustc_ast" }
 | 
						|
rustc_span = { path = "../rustc_span" }
 |