Open magneticflux- opened 3 months ago
This seems to work:
diff --git a/libflux/flux/src/cffi.rs b/libflux/flux/src/cffi.rs
index 2e686ec4..9fbae64a 100644
--- a/libflux/flux/src/cffi.rs
+++ b/libflux/flux/src/cffi.rs
@@ -1149,7 +1149,7 @@ from(bucket: v.bucket)
fn parse_with_invalid_utf8() {
let cfname = CString::new("foo.flux").unwrap();
let cfname_ptr: *const c_char = cfname.as_ptr();
- let v: Vec<c_char> = vec![-61, 0];
+ let v: Vec<c_char> = vec![-61i8 as c_char, 0];
let csrc: *const c_char = &v[0];
// Safety: both pointers are valid
let pkg = unsafe { flux_parse(cfname_ptr, csrc) };
This issue has had no recent activity and will be closed soon.
Still a build failure.
autoclose bots are silly.
Contrary to popular belief,
char
's signedness is undefined; it is commonly signed on x86_64 and unsigned on AArch64 and the Rustraw
types follow their C counterparts: https://doc.rust-lang.org/std/os/raw/type.c_char.htmlEncountered running tests on AArch64:
The offending unary
-
: https://github.com/influxdata/flux/blob/27fa85da326380acd1e096e846118a24c446f047/libflux/flux/src/cffi.rs#L1148-L1153-61
should probably be changed to194
.