File tree Expand file tree Collapse file tree 2 files changed +3
-3
lines changed
library/std/src/sys/pal/sbf Expand file tree Collapse file tree 2 files changed +3
-3
lines changed Original file line number Diff line number Diff line change @@ -41,6 +41,6 @@ extern "C" {
41
41
#[ cfg( target_feature = "static-syscalls" ) ]
42
42
fn sol_alloc_free_ ( size : u64 , ptr : u64 ) -> * mut u8 {
43
43
let syscall: extern "C" fn ( u64 , u64 ) -> * mut u8 =
44
- unsafe { core:: mem:: transmute ( 11usize ) } ; // 11 is the code for "sol_alloc_free_"
44
+ unsafe { core:: mem:: transmute ( 2213547663u64 ) } ; // murmur32 hash of "sol_alloc_free_"
45
45
syscall ( size, ptr)
46
46
}
Original file line number Diff line number Diff line change @@ -47,13 +47,13 @@ extern "C" {
47
47
48
48
#[ cfg( target_feature = "static-syscalls" ) ]
49
49
unsafe extern "C" fn abort ( ) -> ! {
50
- let syscall: extern "C" fn ( ) -> ! = core:: mem:: transmute ( 1usize ) ; // 1 is the code for "abort"
50
+ let syscall: extern "C" fn ( ) -> ! = core:: mem:: transmute ( 3069975057u64 ) ; // murmur32 hash of "abort"
51
51
syscall ( )
52
52
}
53
53
54
54
#[ cfg( target_feature = "static-syscalls" ) ]
55
55
unsafe extern "C" fn sol_log_ ( message : * const u8 , length : u64 ) {
56
- let syscall: extern "C" fn ( * const u8 , u64 ) = core:: mem:: transmute ( 7usize ) ; // 7 is the code for "sol_log_"
56
+ let syscall: extern "C" fn ( * const u8 , u64 ) = core:: mem:: transmute ( 544561597u64 ) ; // murmur32 hash of "sol_log_"
57
57
syscall ( message, length)
58
58
}
59
59
You can’t perform that action at this time.
0 commit comments