File tree Expand file tree Collapse file tree 4 files changed +4
-7
lines changed Expand file tree Collapse file tree 4 files changed +4
-7
lines changed Original file line number Diff line number Diff line change 1- // FIXME(#141600) the mte-ffi test doesn't fail in aarch64-gnu
2-
31#ifndef __BAR_H
42#define __BAR_H
53
Original file line number Diff line number Diff line change 33#include <stdint.h>
44#include "bar.h"
55
6- extern void foo (float * );
6+ extern void foo (char * );
77
8- void bar (float * ptr ) {
8+ void bar (char * ptr ) {
99 if (((uintptr_t )ptr >> 56 ) != 0x1f ) {
1010 fprintf (stderr , "Top byte corrupted on Rust -> C FFI boundary!\n" );
1111 exit (1 );
Original file line number Diff line number Diff line change 55
66extern void foo (unsigned int * );
77
8- void bar (unsigned int * ptr ) {
8+ void bar (char * ptr ) {
99 if (((uintptr_t )ptr >> 56 ) != 0x1f ) {
1010 fprintf (stderr , "Top byte corrupted on Rust -> C FFI boundary!\n" );
1111 exit (1 );
Original file line number Diff line number Diff line change 11#include <stdio.h>
22#include <stdlib.h>
33#include <stdint.h>
4- #include <string.h>
54#include "bar.h"
65
76extern void foo (char * );
@@ -33,7 +32,7 @@ int main(void)
3332
3433 // Store an arbitrary tag in bits 56-59 of the pointer (where an MTE tag may be),
3534 // and a different value in the ignored top 4 bits.
36- ptr = (char * )((uintptr_t )ptr | 0x1fl << 56 );
35+ ptr = (unsigned int * )((uintptr_t )ptr | 0x1fl << 56 );
3736
3837 if (mte_enabled ()) {
3938 set_tag (ptr );
You can’t perform that action at this time.
0 commit comments