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
-
3
1
#ifndef __BAR_H
4
2
#define __BAR_H
5
3
Original file line number Diff line number Diff line change 3
3
#include <stdint.h>
4
4
#include "bar.h"
5
5
6
- extern void foo (float * );
6
+ extern void foo (char * );
7
7
8
- void bar (float * ptr ) {
8
+ void bar (char * ptr ) {
9
9
if (((uintptr_t )ptr >> 56 ) != 0x1f ) {
10
10
fprintf (stderr , "Top byte corrupted on Rust -> C FFI boundary!\n" );
11
11
exit (1 );
Original file line number Diff line number Diff line change 5
5
6
6
extern void foo (unsigned int * );
7
7
8
- void bar (unsigned int * ptr ) {
8
+ void bar (char * ptr ) {
9
9
if (((uintptr_t )ptr >> 56 ) != 0x1f ) {
10
10
fprintf (stderr , "Top byte corrupted on Rust -> C FFI boundary!\n" );
11
11
exit (1 );
Original file line number Diff line number Diff line change 1
1
#include <stdio.h>
2
2
#include <stdlib.h>
3
3
#include <stdint.h>
4
- #include <string.h>
5
4
#include "bar.h"
6
5
7
6
extern void foo (char * );
@@ -33,7 +32,7 @@ int main(void)
33
32
34
33
// Store an arbitrary tag in bits 56-59 of the pointer (where an MTE tag may be),
35
34
// 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 );
37
36
38
37
if (mte_enabled ()) {
39
38
set_tag (ptr );
You can’t perform that action at this time.
0 commit comments