[INFO] cloning repository https://github.com/Jakobzs/memhack-injector [INFO] running `Command { std: "git" "-c" "credential.helper=" "-c" "credential.helper=/workspace/cargo-home/bin/git-credential-null" "clone" "--bare" "https://github.com/Jakobzs/memhack-injector" "/workspace/cache/git-repos/https%3A%2F%2Fgithub.com%2FJakobzs%2Fmemhack-injector", kill_on_drop: false }` [INFO] [stderr] Cloning into bare repository '/workspace/cache/git-repos/https%3A%2F%2Fgithub.com%2FJakobzs%2Fmemhack-injector'... [INFO] running `Command { std: "git" "rev-parse" "HEAD", kill_on_drop: false }` [INFO] [stdout] 8d1617bdd9b9181ffa3a8485eb3c2865177562af [INFO] checking Jakobzs/memhack-injector/8d1617bdd9b9181ffa3a8485eb3c2865177562af against master#f609b7e0586f81fefb3523e3e17adf779ac416be for pr-129466-2 [INFO] running `Command { std: "git" "clone" "/workspace/cache/git-repos/https%3A%2F%2Fgithub.com%2FJakobzs%2Fmemhack-injector" "/workspace/builds/worker-7-tc1/source", kill_on_drop: false }` [INFO] [stderr] Cloning into '/workspace/builds/worker-7-tc1/source'... [INFO] [stderr] done. [INFO] validating manifest of git repo https://github.com/Jakobzs/memhack-injector on toolchain f609b7e0586f81fefb3523e3e17adf779ac416be [INFO] running `Command { std: CARGO_HOME="/workspace/cargo-home" RUSTUP_HOME="/workspace/rustup-home" "/workspace/cargo-home/bin/cargo" "+f609b7e0586f81fefb3523e3e17adf779ac416be" "metadata" "--manifest-path" "Cargo.toml" "--no-deps", kill_on_drop: false }` [INFO] started tweaking git repo https://github.com/Jakobzs/memhack-injector [INFO] finished tweaking git repo https://github.com/Jakobzs/memhack-injector [INFO] tweaked toml for git repo https://github.com/Jakobzs/memhack-injector written to /workspace/builds/worker-7-tc1/source/Cargo.toml [INFO] crate git repo https://github.com/Jakobzs/memhack-injector already has a lockfile, it will not be regenerated [INFO] running `Command { std: CARGO_HOME="/workspace/cargo-home" RUSTUP_HOME="/workspace/rustup-home" "/workspace/cargo-home/bin/cargo" "+f609b7e0586f81fefb3523e3e17adf779ac416be" "fetch" "--manifest-path" "Cargo.toml", kill_on_drop: false }` [INFO] [stderr] Downloading crates ... [INFO] [stderr] Downloaded sysinfo v0.20.1 [INFO] running `Command { std: "docker" "create" "-v" "/var/lib/crater-agent-workspace/builds/worker-7-tc1/target:/opt/rustwide/target:rw,Z" "-v" "/var/lib/crater-agent-workspace/builds/worker-7-tc1/source:/opt/rustwide/workdir:ro,Z" "-v" "/var/lib/crater-agent-workspace/cargo-home:/opt/rustwide/cargo-home:ro,Z" "-v" "/var/lib/crater-agent-workspace/rustup-home:/opt/rustwide/rustup-home:ro,Z" "-e" "SOURCE_DIR=/opt/rustwide/workdir" "-e" "CARGO_TARGET_DIR=/opt/rustwide/target" "-e" "CARGO_HOME=/opt/rustwide/cargo-home" "-e" "RUSTUP_HOME=/opt/rustwide/rustup-home" "-w" "/opt/rustwide/workdir" "-m" "1610612736" "--user" "0:0" "--network" "none" "ghcr.io/rust-lang/crates-build-env/linux@sha256:ceb6ea022f8a89cebbe621bb4987e73a935bd40dfbb726f832cfff4742a5b95a" "/opt/rustwide/cargo-home/bin/cargo" "+f609b7e0586f81fefb3523e3e17adf779ac416be" "metadata" "--no-deps" "--format-version=1", kill_on_drop: false }` [INFO] [stdout] 2f7f0b1ecda1593e529db03702ff463ab259600ea942a06afd5deb54d55d7a05 [INFO] running `Command { std: "docker" "start" "-a" "2f7f0b1ecda1593e529db03702ff463ab259600ea942a06afd5deb54d55d7a05", kill_on_drop: false }` [INFO] running `Command { std: "docker" "inspect" "2f7f0b1ecda1593e529db03702ff463ab259600ea942a06afd5deb54d55d7a05", kill_on_drop: false }` [INFO] running `Command { std: "docker" "rm" "-f" "2f7f0b1ecda1593e529db03702ff463ab259600ea942a06afd5deb54d55d7a05", kill_on_drop: false }` [INFO] [stdout] 2f7f0b1ecda1593e529db03702ff463ab259600ea942a06afd5deb54d55d7a05 [INFO] running `Command { std: "docker" "create" "-v" "/var/lib/crater-agent-workspace/builds/worker-7-tc1/target:/opt/rustwide/target:rw,Z" "-v" "/var/lib/crater-agent-workspace/builds/worker-7-tc1/source:/opt/rustwide/workdir:ro,Z" "-v" "/var/lib/crater-agent-workspace/cargo-home:/opt/rustwide/cargo-home:ro,Z" "-v" "/var/lib/crater-agent-workspace/rustup-home:/opt/rustwide/rustup-home:ro,Z" "-e" "SOURCE_DIR=/opt/rustwide/workdir" "-e" "CARGO_TARGET_DIR=/opt/rustwide/target" "-e" "CARGO_INCREMENTAL=0" "-e" "RUST_BACKTRACE=full" "-e" "RUSTFLAGS=--cap-lints=forbid" "-e" "RUSTDOCFLAGS=--cap-lints=forbid" "-e" "CARGO_HOME=/opt/rustwide/cargo-home" "-e" "RUSTUP_HOME=/opt/rustwide/rustup-home" "-w" "/opt/rustwide/workdir" "-m" "1610612736" "--user" "0:0" "--network" "none" "ghcr.io/rust-lang/crates-build-env/linux@sha256:ceb6ea022f8a89cebbe621bb4987e73a935bd40dfbb726f832cfff4742a5b95a" "/opt/rustwide/cargo-home/bin/cargo" "+f609b7e0586f81fefb3523e3e17adf779ac416be" "check" "--frozen" "--all" "--all-targets" "--message-format=json", kill_on_drop: false }` [INFO] [stdout] 25bf819c800e18fe4958beb336ba8134b251fc440fc992e901249a6f3f5a9121 [INFO] running `Command { std: "docker" "start" "-a" "25bf819c800e18fe4958beb336ba8134b251fc440fc992e901249a6f3f5a9121", kill_on_drop: false }` [INFO] [stderr] Compiling autocfg v1.0.1 [INFO] [stderr] Compiling proc-macro2 v1.0.28 [INFO] [stderr] Compiling unicode-xid v0.2.2 [INFO] [stderr] Compiling syn v1.0.75 [INFO] [stderr] Compiling crossbeam-utils v0.8.5 [INFO] [stderr] Compiling windows_quote v0.19.0 [INFO] [stderr] Compiling windows_reader v0.19.0 [INFO] [stderr] Compiling libc v0.2.101 [INFO] [stderr] Compiling crossbeam-epoch v0.9.5 [INFO] [stderr] Compiling rayon-core v1.9.1 [INFO] [stderr] Compiling const-sha1 v0.2.0 [INFO] [stderr] Compiling memoffset v0.6.4 [INFO] [stderr] Compiling rayon v1.5.1 [INFO] [stderr] Checking crossbeam-channel v0.5.1 [INFO] [stderr] Compiling sysinfo v0.20.1 [INFO] [stderr] Compiling quote v1.0.9 [INFO] [stderr] Checking windows_gen v0.19.0 [INFO] [stderr] Checking either v1.6.1 [INFO] [stderr] Checking num_cpus v1.13.0 [INFO] [stderr] Checking once_cell v1.8.0 [INFO] [stderr] Checking crossbeam-deque v0.8.1 [INFO] [stderr] Compiling windows_macros v0.19.0 [INFO] [stderr] Compiling windows v0.19.0 [INFO] [stderr] Compiling windows_bindings v0.0.0 (/opt/rustwide/workdir/windows_bindings) [INFO] [stdout] warning: unused return value of `Box::::from_raw` that must be used [INFO] [stdout] --> /opt/rustwide/target/debug/build/windows_bindings-b2a6ab9625e071b7/out/windows.rs:1:5264 [INFO] [stdout] | [INFO] [stdout] 1 | ... { if ! value . 0 . is_null ( ) { unsafe { :: std :: boxed :: Box :: from_raw ( value . 0 ) ; } } } } } impl < 'a > :: windows :: Into... [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] = note: call `drop(Box::from_raw(ptr))` if you intend to drop the `Box` [INFO] [stdout] = note: `#[warn(unused_must_use)]` on by default [INFO] [stdout] help: use `let _ = ...` to ignore the resulting value [INFO] [stdout] | [INFO] [stdout] 1 | # [ allow ( unused_variables , non_upper_case_globals , non_snake_case , unused_unsafe , non_camel_case_types , dead_code , clippy :: all ) ] pub mod Windows { # [ allow ( unused_variables , non_upper_case_globals , non_snake_case , unused_unsafe , non_camel_case_types , dead_code , clippy :: all ) ] pub mod Win32 { # [ allow ( unused_variables , non_upper_case_globals , non_snake_case , unused_unsafe , non_camel_case_types , dead_code , clippy :: all ) ] pub mod Foundation { # [ repr ( transparent ) ] # [ derive ( :: std :: default :: Default , :: std :: clone :: Clone , :: std :: marker :: Copy , :: std :: cmp :: PartialEq , :: std :: cmp :: Eq , :: std :: fmt :: Debug ) ] pub struct BOOL ( pub i32 ) ; unsafe impl :: windows :: Abi for BOOL { type Abi = Self ; type DefaultType = Self ; } impl BOOL { # [ inline ] pub fn as_bool ( self ) -> bool { ! ( self . 0 == 0 ) } # [ inline ] pub fn ok ( self ) -> :: windows :: Result < ( ) > { if self . as_bool ( ) { Ok ( ( ) ) } else { Err ( :: windows :: HRESULT :: from_thread ( ) . into ( ) ) } } # [ inline ] # [ track_caller ] pub fn unwrap ( self ) { self . ok ( ) . unwrap ( ) ; } # [ inline ] # [ track_caller ] pub fn expect ( self , msg : & str ) { self . ok ( ) . expect ( msg ) ; } } impl :: std :: convert :: From < BOOL > for bool { fn from ( value : BOOL ) -> Self { value . as_bool ( ) } } impl :: std :: convert :: From < & BOOL > for bool { fn from ( value : & BOOL ) -> Self { value . as_bool ( ) } } impl :: std :: convert :: From < bool > for BOOL { fn from ( value : bool ) -> Self { if value { BOOL ( 1 ) } else { BOOL ( 0 ) } } } impl :: std :: convert :: From < & bool > for BOOL { fn from ( value : & bool ) -> Self { ( * value ) . into ( ) } } impl :: std :: cmp :: PartialEq < bool > for BOOL { fn eq ( & self , other : & bool ) -> bool { self . as_bool ( ) == * other } } impl :: std :: cmp :: PartialEq < BOOL > for bool { fn eq ( & self , other : & BOOL ) -> bool { * self == other . as_bool ( ) } } impl std :: ops :: Not for BOOL { type Output = Self ; fn not ( self ) -> Self :: Output { if self . as_bool ( ) { BOOL ( 0 ) } else { BOOL ( 1 ) } } } impl < 'a > :: windows :: IntoParam < 'a , BOOL > for bool { fn into_param ( self ) -> :: windows :: Param < 'a , BOOL > { :: windows :: Param :: Owned ( self . into ( ) ) } } pub unsafe fn CloseHandle < 'a , > ( hobject : impl :: windows :: IntoParam < 'a , HANDLE > , ) -> BOOL { # [ cfg ( windows ) ] { # [ link ( name ="KERNEL32" ) ] extern "system" { fn CloseHandle ( hobject : HANDLE ) -> BOOL ; } CloseHandle ( hobject . into_param ( ) . abi ( ) ) } # [ cfg ( not ( windows ) ) ] unimplemented ! ( "Unsupported target OS" ) ; } pub type FARPROC = unsafe extern "system" fn ( ) -> isize ; # [ derive ( :: std :: clone :: Clone , :: std :: marker :: Copy ) ] # [ repr ( transparent ) ] pub struct HANDLE ( pub isize ) ; impl HANDLE { } impl :: std :: default :: Default for HANDLE { fn default ( ) -> Self { Self ( 0 ) } } impl HANDLE { pub const NULL : Self = Self ( 0 ) ; pub fn is_null ( & self ) -> bool { self . 0 == 0 } } impl :: std :: fmt :: Debug for HANDLE { fn fmt ( & self , fmt : & mut :: std :: fmt :: Formatter < '_ > ) -> :: std :: fmt :: Result { fmt . debug_struct ( "HANDLE" ) . field ( "Value" , & self .0 ) . finish ( ) } } impl :: std :: cmp :: PartialEq for HANDLE { fn eq ( & self , other : & Self ) -> bool { self .0 == other .0 } } impl :: std :: cmp :: Eq for HANDLE { } unsafe impl :: windows :: Abi for HANDLE { type Abi = Self ; type DefaultType = Self ; } impl HANDLE { pub const INVALID : Self = Self ( - 1 ) ; pub fn is_invalid ( & self ) -> bool { self . 0 == - 1 } } # [ derive ( :: std :: clone :: Clone , :: std :: marker :: Copy ) ] # [ repr ( transparent ) ] pub struct HINSTANCE ( pub isize ) ; impl HINSTANCE { } impl :: std :: default :: Default for HINSTANCE { fn default ( ) -> Self { Self ( 0 ) } } impl HINSTANCE { pub const NULL : Self = Self ( 0 ) ; pub fn is_null ( & self ) -> bool { self . 0 == 0 } } impl :: std :: fmt :: Debug for HINSTANCE { fn fmt ( & self , fmt : & mut :: std :: fmt :: Formatter < '_ > ) -> :: std :: fmt :: Result { fmt . debug_struct ( "HINSTANCE" ) . field ( "Value" , & self .0 ) . finish ( ) } } impl :: std :: cmp :: PartialEq for HINSTANCE { fn eq ( & self , other : & Self ) -> bool { self .0 == other .0 } } impl :: std :: cmp :: Eq for HINSTANCE { } unsafe impl :: windows :: Abi for HINSTANCE { type Abi = Self ; type DefaultType = Self ; } # [ repr ( transparent ) ] # [ derive ( :: std :: clone :: Clone , :: std :: marker :: Copy , :: std :: cmp :: Eq , :: std :: fmt :: Debug ) ] pub struct PSTR ( pub * mut u8 ) ; impl PSTR { pub const NULL : Self = Self ( :: std :: ptr :: null_mut ( ) ) ; pub fn is_null ( & self ) -> bool { self . 0 . is_null ( ) } } impl :: std :: default :: Default for PSTR { fn default ( ) -> Self { Self ( :: std :: ptr :: null_mut ( ) ) } } impl :: std :: cmp :: PartialEq for PSTR { fn eq ( & self , other : & Self ) -> bool { self . 0 == other . 0 } } unsafe impl :: windows :: Abi for PSTR { type Abi = Self ; type DefaultType = Self ; fn drop_param ( param : & mut :: windows :: Param < '_ , Self > ) { if let :: windows :: Param :: Boxed ( value ) = param { if ! value . 0 . is_null ( ) { unsafe { let _ = :: std :: boxed :: Box :: from_raw ( value . 0 ) ; } } } } } impl < 'a > :: windows :: IntoParam < 'a , PSTR > for & 'a str { fn into_param ( self ) -> :: windows :: Param < 'a , PSTR > { :: windows :: Param :: Boxed ( PSTR ( :: std :: boxed :: Box :: < [ u8 ] > :: into_raw ( self . bytes ( ) . chain ( :: std :: iter :: once ( 0 ) ) . collect :: < std :: vec :: Vec < u8 >> ( ) . into_boxed_slice ( ) ) as _ ) ) } } impl < 'a > :: windows :: IntoParam < 'a , PSTR > for String { fn into_param ( self ) -> :: windows :: Param < 'a , PSTR > { :: windows :: Param :: Boxed ( PSTR ( :: std :: boxed :: Box :: < [ u8 ] > :: into_raw ( self . bytes ( ) . chain ( :: std :: iter :: once ( 0 ) ) . collect :: < std :: vec :: Vec < u8 >> ( ) . into_boxed_slice ( ) ) as _ ) ) } } } # [ allow ( unused_variables , non_upper_case_globals , non_snake_case , unused_unsafe , non_camel_case_types , dead_code , clippy :: all ) ] pub mod Security { # [ derive ( :: std :: clone :: Clone , :: std :: marker :: Copy ) ] # [ repr ( C ) ] pub struct SECURITY_ATTRIBUTES { pub nLength : u32 , pub lpSecurityDescriptor : * mut :: std :: ffi :: c_void , pub bInheritHandle : super::Foundation:: BOOL } impl SECURITY_ATTRIBUTES { } impl :: std :: default :: Default for SECURITY_ATTRIBUTES { fn default ( ) -> Self { Self { nLength : 0 , lpSecurityDescriptor : :: std :: ptr :: null_mut ( ) , bInheritHandle : :: std :: default :: Default :: default ( ) } } } impl :: std :: fmt :: Debug for SECURITY_ATTRIBUTES { fn fmt ( & self , fmt : & mut :: std :: fmt :: Formatter < '_ > ) -> :: std :: fmt :: Result { fmt . debug_struct ( "SECURITY_ATTRIBUTES" ) . field ( "nLength" , & self . nLength ) . field ( "lpSecurityDescriptor" , & self . lpSecurityDescriptor ) . field ( "bInheritHandle" , & self . bInheritHandle ) . finish ( ) } } impl :: std :: cmp :: PartialEq for SECURITY_ATTRIBUTES { fn eq ( & self , other : & Self ) -> bool { self . nLength == other . nLength && self . lpSecurityDescriptor == other . lpSecurityDescriptor && self . bInheritHandle == other . bInheritHandle } } impl :: std :: cmp :: Eq for SECURITY_ATTRIBUTES { } unsafe impl :: windows :: Abi for SECURITY_ATTRIBUTES { type Abi = Self ; type DefaultType = Self ; } } # [ allow ( unused_variables , non_upper_case_globals , non_snake_case , unused_unsafe , non_camel_case_types , dead_code , clippy :: all ) ] pub mod System { # [ allow ( unused_variables , non_upper_case_globals , non_snake_case , unused_unsafe , non_camel_case_types , dead_code , clippy :: all ) ] pub mod Diagnostics { # [ allow ( unused_variables , non_upper_case_globals , non_snake_case , unused_unsafe , non_camel_case_types , dead_code , clippy :: all ) ] pub mod Debug { pub unsafe fn WriteProcessMemory < 'a , > ( hprocess : impl :: windows :: IntoParam < 'a , super::super::super::Foundation:: HANDLE > , lpbaseaddress : * mut :: std :: ffi :: c_void , lpbuffer : * const :: std :: ffi :: c_void , nsize : usize , lpnumberofbyteswritten : * mut usize , ) -> super::super::super::Foundation:: BOOL { # [ cfg ( windows ) ] { # [ link ( name ="KERNEL32" ) ] extern "system" { fn WriteProcessMemory ( hprocess : super::super::super::Foundation:: HANDLE , lpbaseaddress : * mut :: std :: ffi :: c_void , lpbuffer : * const :: std :: ffi :: c_void , nsize : usize , lpnumberofbyteswritten : * mut usize ) -> super::super::super::Foundation:: BOOL ; } WriteProcessMemory ( hprocess . into_param ( ) . abi ( ) , :: std :: mem :: transmute ( lpbaseaddress ) , :: std :: mem :: transmute ( lpbuffer ) , :: std :: mem :: transmute ( nsize ) , :: std :: mem :: transmute ( lpnumberofbyteswritten ) ) } # [ cfg ( not ( windows ) ) ] unimplemented ! ( "Unsupported target OS" ) ; } } } # [ allow ( unused_variables , non_upper_case_globals , non_snake_case , unused_unsafe , non_camel_case_types , dead_code , clippy :: all ) ] pub mod LibraryLoader { pub unsafe fn GetModuleHandleA < 'a , > ( lpmodulename : impl :: windows :: IntoParam < 'a , super::super::Foundation:: PSTR > , ) -> super::super::Foundation:: HINSTANCE { # [ cfg ( windows ) ] { # [ link ( name ="KERNEL32" ) ] extern "system" { fn GetModuleHandleA ( lpmodulename : super::super::Foundation:: PSTR ) -> super::super::Foundation:: HINSTANCE ; } GetModuleHandleA ( lpmodulename . into_param ( ) . abi ( ) ) } # [ cfg ( not ( windows ) ) ] unimplemented ! ( "Unsupported target OS" ) ; } pub unsafe fn GetProcAddress < 'a , > ( hmodule : impl :: windows :: IntoParam < 'a , super::super::Foundation:: HINSTANCE > , lpprocname : impl :: windows :: IntoParam < 'a , super::super::Foundation:: PSTR > , ) -> :: std :: option :: Option < super::super::Foundation:: FARPROC > { # [ cfg ( windows ) ] { # [ link ( name ="KERNEL32" ) ] extern "system" { fn GetProcAddress ( hmodule : super::super::Foundation:: HINSTANCE , lpprocname : super::super::Foundation:: PSTR ) -> :: std :: option :: Option < super::super::Foundation:: FARPROC > ; } GetProcAddress ( hmodule . into_param ( ) . abi ( ) , lpprocname . into_param ( ) . abi ( ) ) } # [ cfg ( not ( windows ) ) ] unimplemented ! ( "Unsupported target OS" ) ; } } # [ allow ( unused_variables , non_upper_case_globals , non_snake_case , unused_unsafe , non_camel_case_types , dead_code , clippy :: all ) ] pub mod Memory { # [ derive ( :: std :: cmp :: PartialEq , :: std :: cmp :: Eq , :: std :: marker :: Copy , :: std :: clone :: Clone , :: std :: default :: Default , :: std :: fmt :: Debug ) ] # [ repr ( transparent ) ] pub struct PAGE_PROTECTION_FLAGS ( pub u32 ) ; pub const PAGE_NOACCESS : PAGE_PROTECTION_FLAGS = PAGE_PROTECTION_FLAGS ( 1u32 ) ; pub const PAGE_READONLY : PAGE_PROTECTION_FLAGS = PAGE_PROTECTION_FLAGS ( 2u32 ) ; pub const PAGE_READWRITE : PAGE_PROTECTION_FLAGS = PAGE_PROTECTION_FLAGS ( 4u32 ) ; pub const PAGE_WRITECOPY : PAGE_PROTECTION_FLAGS = PAGE_PROTECTION_FLAGS ( 8u32 ) ; pub const PAGE_EXECUTE : PAGE_PROTECTION_FLAGS = PAGE_PROTECTION_FLAGS ( 16u32 ) ; pub const PAGE_EXECUTE_READ : PAGE_PROTECTION_FLAGS = PAGE_PROTECTION_FLAGS ( 32u32 ) ; pub const PAGE_EXECUTE_READWRITE : PAGE_PROTECTION_FLAGS = PAGE_PROTECTION_FLAGS ( 64u32 ) ; pub const PAGE_EXECUTE_WRITECOPY : PAGE_PROTECTION_FLAGS = PAGE_PROTECTION_FLAGS ( 128u32 ) ; pub const PAGE_GUARD : PAGE_PROTECTION_FLAGS = PAGE_PROTECTION_FLAGS ( 256u32 ) ; pub const PAGE_NOCACHE : PAGE_PROTECTION_FLAGS = PAGE_PROTECTION_FLAGS ( 512u32 ) ; pub const PAGE_WRITECOMBINE : PAGE_PROTECTION_FLAGS = PAGE_PROTECTION_FLAGS ( 1024u32 ) ; pub const PAGE_GRAPHICS_NOACCESS : PAGE_PROTECTION_FLAGS = PAGE_PROTECTION_FLAGS ( 2048u32 ) ; pub const PAGE_GRAPHICS_READONLY : PAGE_PROTECTION_FLAGS = PAGE_PROTECTION_FLAGS ( 4096u32 ) ; pub const PAGE_GRAPHICS_READWRITE : PAGE_PROTECTION_FLAGS = PAGE_PROTECTION_FLAGS ( 8192u32 ) ; pub const PAGE_GRAPHICS_EXECUTE : PAGE_PROTECTION_FLAGS = PAGE_PROTECTION_FLAGS ( 16384u32 ) ; pub const PAGE_GRAPHICS_EXECUTE_READ : PAGE_PROTECTION_FLAGS = PAGE_PROTECTION_FLAGS ( 32768u32 ) ; pub const PAGE_GRAPHICS_EXECUTE_READWRITE : PAGE_PROTECTION_FLAGS = PAGE_PROTECTION_FLAGS ( 65536u32 ) ; pub const PAGE_GRAPHICS_COHERENT : PAGE_PROTECTION_FLAGS = PAGE_PROTECTION_FLAGS ( 131072u32 ) ; pub const PAGE_GRAPHICS_NOCACHE : PAGE_PROTECTION_FLAGS = PAGE_PROTECTION_FLAGS ( 262144u32 ) ; pub const PAGE_ENCLAVE_THREAD_CONTROL : PAGE_PROTECTION_FLAGS = PAGE_PROTECTION_FLAGS ( 2147483648u32 ) ; pub const PAGE_REVERT_TO_FILE_MAP : PAGE_PROTECTION_FLAGS = PAGE_PROTECTION_FLAGS ( 2147483648u32 ) ; pub const PAGE_TARGETS_NO_UPDATE : PAGE_PROTECTION_FLAGS = PAGE_PROTECTION_FLAGS ( 1073741824u32 ) ; pub const PAGE_TARGETS_INVALID : PAGE_PROTECTION_FLAGS = PAGE_PROTECTION_FLAGS ( 1073741824u32 ) ; pub const PAGE_ENCLAVE_UNVALIDATED : PAGE_PROTECTION_FLAGS = PAGE_PROTECTION_FLAGS ( 536870912u32 ) ; pub const PAGE_ENCLAVE_MASK : PAGE_PROTECTION_FLAGS = PAGE_PROTECTION_FLAGS ( 268435456u32 ) ; pub const PAGE_ENCLAVE_DECOMMIT : PAGE_PROTECTION_FLAGS = PAGE_PROTECTION_FLAGS ( 268435456u32 ) ; pub const PAGE_ENCLAVE_SS_FIRST : PAGE_PROTECTION_FLAGS = PAGE_PROTECTION_FLAGS ( 268435457u32 ) ; pub const PAGE_ENCLAVE_SS_REST : PAGE_PROTECTION_FLAGS = PAGE_PROTECTION_FLAGS ( 268435458u32 ) ; pub const SEC_PARTITION_OWNER_HANDLE : PAGE_PROTECTION_FLAGS = PAGE_PROTECTION_FLAGS ( 262144u32 ) ; pub const SEC_64K_PAGES : PAGE_PROTECTION_FLAGS = PAGE_PROTECTION_FLAGS ( 524288u32 ) ; pub const SEC_FILE : PAGE_PROTECTION_FLAGS = PAGE_PROTECTION_FLAGS ( 8388608u32 ) ; pub const SEC_IMAGE : PAGE_PROTECTION_FLAGS = PAGE_PROTECTION_FLAGS ( 16777216u32 ) ; pub const SEC_PROTECTED_IMAGE : PAGE_PROTECTION_FLAGS = PAGE_PROTECTION_FLAGS ( 33554432u32 ) ; pub const SEC_RESERVE : PAGE_PROTECTION_FLAGS = PAGE_PROTECTION_FLAGS ( 67108864u32 ) ; pub const SEC_COMMIT : PAGE_PROTECTION_FLAGS = PAGE_PROTECTION_FLAGS ( 134217728u32 ) ; pub const SEC_NOCACHE : PAGE_PROTECTION_FLAGS = PAGE_PROTECTION_FLAGS ( 268435456u32 ) ; pub const SEC_WRITECOMBINE : PAGE_PROTECTION_FLAGS = PAGE_PROTECTION_FLAGS ( 1073741824u32 ) ; pub const SEC_LARGE_PAGES : PAGE_PROTECTION_FLAGS = PAGE_PROTECTION_FLAGS ( 2147483648u32 ) ; pub const SEC_IMAGE_NO_EXECUTE : PAGE_PROTECTION_FLAGS = PAGE_PROTECTION_FLAGS ( 285212672u32 ) ; impl :: std :: convert :: From < u32 > for PAGE_PROTECTION_FLAGS { fn from ( value : u32 ) -> Self { Self ( value ) } } unsafe impl :: windows :: Abi for PAGE_PROTECTION_FLAGS { type Abi = Self ; type DefaultType = Self ; } impl :: std :: ops :: BitOr for PAGE_PROTECTION_FLAGS { type Output = Self ; fn bitor ( self , rhs : Self ) -> Self { Self ( self . 0 | rhs . 0 ) } } impl :: std :: ops :: BitAnd for PAGE_PROTECTION_FLAGS { type Output = Self ; fn bitand ( self , rhs : Self ) -> Self { Self ( self . 0 & rhs . 0 ) } } impl :: std :: ops :: BitOrAssign for PAGE_PROTECTION_FLAGS { fn bitor_assign ( & mut self , rhs : Self ) { self . 0 . bitor_assign ( rhs . 0 ) } } impl :: std :: ops :: BitAndAssign for PAGE_PROTECTION_FLAGS { fn bitand_assign ( & mut self , rhs : Self ) { self . 0 . bitand_assign ( rhs . 0 ) } } # [ derive ( :: std :: cmp :: PartialEq , :: std :: cmp :: Eq , :: std :: marker :: Copy , :: std :: clone :: Clone , :: std :: default :: Default , :: std :: fmt :: Debug ) ] # [ repr ( transparent ) ] pub struct VIRTUAL_ALLOCATION_TYPE ( pub u32 ) ; pub const MEM_COMMIT : VIRTUAL_ALLOCATION_TYPE = VIRTUAL_ALLOCATION_TYPE ( 4096u32 ) ; pub const MEM_RESERVE : VIRTUAL_ALLOCATION_TYPE = VIRTUAL_ALLOCATION_TYPE ( 8192u32 ) ; pub const MEM_RESET : VIRTUAL_ALLOCATION_TYPE = VIRTUAL_ALLOCATION_TYPE ( 524288u32 ) ; pub const MEM_RESET_UNDO : VIRTUAL_ALLOCATION_TYPE = VIRTUAL_ALLOCATION_TYPE ( 16777216u32 ) ; pub const MEM_REPLACE_PLACEHOLDER : VIRTUAL_ALLOCATION_TYPE = VIRTUAL_ALLOCATION_TYPE ( 16384u32 ) ; pub const MEM_LARGE_PAGES : VIRTUAL_ALLOCATION_TYPE = VIRTUAL_ALLOCATION_TYPE ( 536870912u32 ) ; pub const MEM_RESERVE_PLACEHOLDER : VIRTUAL_ALLOCATION_TYPE = VIRTUAL_ALLOCATION_TYPE ( 262144u32 ) ; pub const MEM_FREE : VIRTUAL_ALLOCATION_TYPE = VIRTUAL_ALLOCATION_TYPE ( 65536u32 ) ; impl :: std :: convert :: From < u32 > for VIRTUAL_ALLOCATION_TYPE { fn from ( value : u32 ) -> Self { Self ( value ) } } unsafe impl :: windows :: Abi for VIRTUAL_ALLOCATION_TYPE { type Abi = Self ; type DefaultType = Self ; } impl :: std :: ops :: BitOr for VIRTUAL_ALLOCATION_TYPE { type Output = Self ; fn bitor ( self , rhs : Self ) -> Self { Self ( self . 0 | rhs . 0 ) } } impl :: std :: ops :: BitAnd for VIRTUAL_ALLOCATION_TYPE { type Output = Self ; fn bitand ( self , rhs : Self ) -> Self { Self ( self . 0 & rhs . 0 ) } } impl :: std :: ops :: BitOrAssign for VIRTUAL_ALLOCATION_TYPE { fn bitor_assign ( & mut self , rhs : Self ) { self . 0 . bitor_assign ( rhs . 0 ) } } impl :: std :: ops :: BitAndAssign for VIRTUAL_ALLOCATION_TYPE { fn bitand_assign ( & mut self , rhs : Self ) { self . 0 . bitand_assign ( rhs . 0 ) } } pub unsafe fn VirtualAllocEx < 'a , > ( hprocess : impl :: windows :: IntoParam < 'a , super::super::Foundation:: HANDLE > , lpaddress : * mut :: std :: ffi :: c_void , dwsize : usize , flallocationtype : VIRTUAL_ALLOCATION_TYPE , flprotect : PAGE_PROTECTION_FLAGS , ) -> * mut :: std :: ffi :: c_void { # [ cfg ( windows ) ] { # [ link ( name ="KERNEL32" ) ] extern "system" { fn VirtualAllocEx ( hprocess : super::super::Foundation:: HANDLE , lpaddress : * mut :: std :: ffi :: c_void , dwsize : usize , flallocationtype : VIRTUAL_ALLOCATION_TYPE , flprotect : PAGE_PROTECTION_FLAGS ) -> * mut :: std :: ffi :: c_void ; } VirtualAllocEx ( hprocess . into_param ( ) . abi ( ) , :: std :: mem :: transmute ( lpaddress ) , :: std :: mem :: transmute ( dwsize ) , :: std :: mem :: transmute ( flallocationtype ) , :: std :: mem :: transmute ( flprotect ) ) } # [ cfg ( not ( windows ) ) ] unimplemented ! ( "Unsupported target OS" ) ; } } # [ allow ( unused_variables , non_upper_case_globals , non_snake_case , unused_unsafe , non_camel_case_types , dead_code , clippy :: all ) ] pub mod SystemServices { pub type LPTHREAD_START_ROUTINE = unsafe extern "system" fn ( lpthreadparameter : * mut :: std :: ffi :: c_void ) -> u32 ; } # [ allow ( unused_variables , non_upper_case_globals , non_snake_case , unused_unsafe , non_camel_case_types , dead_code , clippy :: all ) ] pub mod Threading { pub unsafe fn CreateRemoteThread < 'a , > ( hprocess : impl :: windows :: IntoParam < 'a , super::super::Foundation:: HANDLE > , lpthreadattributes : * mut super::super::Security:: SECURITY_ATTRIBUTES , dwstacksize : usize , lpstartaddress : :: std :: option :: Option < super::SystemServices:: LPTHREAD_START_ROUTINE > , lpparameter : * mut :: std :: ffi :: c_void , dwcreationflags : u32 , lpthreadid : * mut u32 , ) -> super::super::Foundation:: HANDLE { # [ cfg ( windows ) ] { # [ link ( name ="KERNEL32" ) ] extern "system" { fn CreateRemoteThread ( hprocess : super::super::Foundation:: HANDLE , lpthreadattributes : * mut super::super::Security:: SECURITY_ATTRIBUTES , dwstacksize : usize , lpstartaddress : :: windows :: RawPtr , lpparameter : * mut :: std :: ffi :: c_void , dwcreationflags : u32 , lpthreadid : * mut u32 ) -> super::super::Foundation:: HANDLE ; } CreateRemoteThread ( hprocess . into_param ( ) . abi ( ) , :: std :: mem :: transmute ( lpthreadattributes ) , :: std :: mem :: transmute ( dwstacksize ) , :: std :: mem :: transmute ( lpstartaddress ) , :: std :: mem :: transmute ( lpparameter ) , :: std :: mem :: transmute ( dwcreationflags ) , :: std :: mem :: transmute ( lpthreadid ) ) } # [ cfg ( not ( windows ) ) ] unimplemented ! ( "Unsupported target OS" ) ; } pub unsafe fn OpenProcess < 'a , > ( dwdesiredaccess : PROCESS_ACCESS_RIGHTS , binherithandle : impl :: windows :: IntoParam < 'a , super::super::Foundation:: BOOL > , dwprocessid : u32 , ) -> super::super::Foundation:: HANDLE { # [ cfg ( windows ) ] { # [ link ( name ="KERNEL32" ) ] extern "system" { fn OpenProcess ( dwdesiredaccess : PROCESS_ACCESS_RIGHTS , binherithandle : super::super::Foundation:: BOOL , dwprocessid : u32 ) -> super::super::Foundation:: HANDLE ; } OpenProcess ( :: std :: mem :: transmute ( dwdesiredaccess ) , binherithandle . into_param ( ) . abi ( ) , :: std :: mem :: transmute ( dwprocessid ) ) } # [ cfg ( not ( windows ) ) ] unimplemented ! ( "Unsupported target OS" ) ; } # [ derive ( :: std :: cmp :: PartialEq , :: std :: cmp :: Eq , :: std :: marker :: Copy , :: std :: clone :: Clone , :: std :: default :: Default , :: std :: fmt :: Debug ) ] # [ repr ( transparent ) ] pub struct PROCESS_ACCESS_RIGHTS ( pub u32 ) ; pub const PROCESS_TERMINATE : PROCESS_ACCESS_RIGHTS = PROCESS_ACCESS_RIGHTS ( 1u32 ) ; pub const PROCESS_CREATE_THREAD : PROCESS_ACCESS_RIGHTS = PROCESS_ACCESS_RIGHTS ( 2u32 ) ; pub const PROCESS_SET_SESSIONID : PROCESS_ACCESS_RIGHTS = PROCESS_ACCESS_RIGHTS ( 4u32 ) ; pub const PROCESS_VM_OPERATION : PROCESS_ACCESS_RIGHTS = PROCESS_ACCESS_RIGHTS ( 8u32 ) ; pub const PROCESS_VM_READ : PROCESS_ACCESS_RIGHTS = PROCESS_ACCESS_RIGHTS ( 16u32 ) ; pub const PROCESS_VM_WRITE : PROCESS_ACCESS_RIGHTS = PROCESS_ACCESS_RIGHTS ( 32u32 ) ; pub const PROCESS_DUP_HANDLE : PROCESS_ACCESS_RIGHTS = PROCESS_ACCESS_RIGHTS ( 64u32 ) ; pub const PROCESS_CREATE_PROCESS : PROCESS_ACCESS_RIGHTS = PROCESS_ACCESS_RIGHTS ( 128u32 ) ; pub const PROCESS_SET_QUOTA : PROCESS_ACCESS_RIGHTS = PROCESS_ACCESS_RIGHTS ( 256u32 ) ; pub const PROCESS_SET_INFORMATION : PROCESS_ACCESS_RIGHTS = PROCESS_ACCESS_RIGHTS ( 512u32 ) ; pub const PROCESS_QUERY_INFORMATION : PROCESS_ACCESS_RIGHTS = PROCESS_ACCESS_RIGHTS ( 1024u32 ) ; pub const PROCESS_SUSPEND_RESUME : PROCESS_ACCESS_RIGHTS = PROCESS_ACCESS_RIGHTS ( 2048u32 ) ; pub const PROCESS_QUERY_LIMITED_INFORMATION : PROCESS_ACCESS_RIGHTS = PROCESS_ACCESS_RIGHTS ( 4096u32 ) ; pub const PROCESS_SET_LIMITED_INFORMATION : PROCESS_ACCESS_RIGHTS = PROCESS_ACCESS_RIGHTS ( 8192u32 ) ; pub const PROCESS_ALL_ACCESS : PROCESS_ACCESS_RIGHTS = PROCESS_ACCESS_RIGHTS ( 2097151u32 ) ; pub const PROCESS_DELETE : PROCESS_ACCESS_RIGHTS = PROCESS_ACCESS_RIGHTS ( 65536u32 ) ; pub const PROCESS_READ_CONTROL : PROCESS_ACCESS_RIGHTS = PROCESS_ACCESS_RIGHTS ( 131072u32 ) ; pub const PROCESS_WRITE_DAC : PROCESS_ACCESS_RIGHTS = PROCESS_ACCESS_RIGHTS ( 262144u32 ) ; pub const PROCESS_WRITE_OWNER : PROCESS_ACCESS_RIGHTS = PROCESS_ACCESS_RIGHTS ( 524288u32 ) ; pub const PROCESS_SYNCHRONIZE : PROCESS_ACCESS_RIGHTS = PROCESS_ACCESS_RIGHTS ( 1048576u32 ) ; pub const PROCESS_STANDARD_RIGHTS_REQUIRED : PROCESS_ACCESS_RIGHTS = PROCESS_ACCESS_RIGHTS ( 983040u32 ) ; impl :: std :: convert :: From < u32 > for PROCESS_ACCESS_RIGHTS { fn from ( value : u32 ) -> Self { Self ( value ) } } unsafe impl :: windows :: Abi for PROCESS_ACCESS_RIGHTS { type Abi = Self ; type DefaultType = Self ; } impl :: std :: ops :: BitOr for PROCESS_ACCESS_RIGHTS { type Output = Self ; fn bitor ( self , rhs : Self ) -> Self { Self ( self . 0 | rhs . 0 ) } } impl :: std :: ops :: BitAnd for PROCESS_ACCESS_RIGHTS { type Output = Self ; fn bitand ( self , rhs : Self ) -> Self { Self ( self . 0 & rhs . 0 ) } } impl :: std :: ops :: BitOrAssign for PROCESS_ACCESS_RIGHTS { fn bitor_assign ( & mut self , rhs : Self ) { self . 0 . bitor_assign ( rhs . 0 ) } } impl :: std :: ops :: BitAndAssign for PROCESS_ACCESS_RIGHTS { fn bitand_assign ( & mut self , rhs : Self ) { self . 0 . bitand_assign ( rhs . 0 ) } } } } } } [INFO] [stdout] | +++++++ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: 1 warning emitted [INFO] [stdout] [INFO] [stdout] [INFO] [stderr] Checking memhack-injector v0.1.0 (/opt/rustwide/workdir) [INFO] [stdout] error[E0308]: mismatched types [INFO] [stdout] --> src/main.rs:75:5 [INFO] [stdout] | [INFO] [stdout] 65 | pub fn get_process_id(process_name: &str) -> Vec { [INFO] [stdout] | ---------- expected `Vec` because of return type [INFO] [stdout] ... [INFO] [stdout] 71 | process_vec.push(pid.clone()); [INFO] [stdout] | ----------- ----------- this argument has type `i32`... [INFO] [stdout] | | [INFO] [stdout] | ... which causes `process_vec` to have type `Vec` [INFO] [stdout] ... [INFO] [stdout] 75 | process_vec [INFO] [stdout] | ^^^^^^^^^^^ expected `Vec`, found `Vec` [INFO] [stdout] | [INFO] [stdout] = note: expected struct `Vec` [INFO] [stdout] found struct `Vec` [INFO] [stdout] help: you can convert an `i32` to a `usize` and panic if the converted value doesn't fit [INFO] [stdout] | [INFO] [stdout] 71 | process_vec.push(pid.clone().try_into().unwrap()); [INFO] [stdout] | ++++++++++++++++++++ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] error[E0308]: mismatched types [INFO] [stdout] --> src/main.rs:75:5 [INFO] [stdout] | [INFO] [stdout] 65 | pub fn get_process_id(process_name: &str) -> Vec { [INFO] [stdout] | ---------- expected `Vec` because of return type [INFO] [stdout] ... [INFO] [stdout] 71 | process_vec.push(pid.clone()); [INFO] [stdout] | ----------- ----------- this argument has type `i32`... [INFO] [stdout] | | [INFO] [stdout] | ... which causes `process_vec` to have type `Vec` [INFO] [stdout] ... [INFO] [stdout] 75 | process_vec [INFO] [stdout] | ^^^^^^^^^^^ expected `Vec`, found `Vec` [INFO] [stdout] | [INFO] [stdout] = note: expected struct `Vec` [INFO] [stdout] found struct `Vec` [INFO] [stdout] help: you can convert an `i32` to a `usize` and panic if the converted value doesn't fit [INFO] [stdout] | [INFO] [stdout] 71 | process_vec.push(pid.clone().try_into().unwrap()); [INFO] [stdout] | ++++++++++++++++++++ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] error: aborting due to 1 previous error [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] For more information about this error, try `rustc --explain E0308`. [INFO] [stdout] [INFO] [stdout] error: aborting due to 1 previous error [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] For more information about this error, try `rustc --explain E0308`. [INFO] [stdout] [INFO] [stderr] error: could not compile `memhack-injector` (bin "memhack-injector" test) due to 2 previous errors [INFO] [stderr] warning: build failed, waiting for other jobs to finish... [INFO] [stderr] error: could not compile `memhack-injector` (bin "memhack-injector") due to 2 previous errors [INFO] running `Command { std: "docker" "inspect" "25bf819c800e18fe4958beb336ba8134b251fc440fc992e901249a6f3f5a9121", kill_on_drop: false }` [INFO] running `Command { std: "docker" "rm" "-f" "25bf819c800e18fe4958beb336ba8134b251fc440fc992e901249a6f3f5a9121", kill_on_drop: false }` [INFO] [stdout] 25bf819c800e18fe4958beb336ba8134b251fc440fc992e901249a6f3f5a9121