Closed programmerjake closed 1 year ago
https://github.com/rust-lang/rust/blob/5697f1620de6bede6f575b51b01509d8c07830cf/library/std/src/sys/wasi/thread.rs#L19-L26
the type which should have its size compared is c_long, not c_int:
c_long
c_int
wasi-libc's code linked in comment above:
TYPEDEF struct { union { int __i[sizeof(long)==8?14:9]; volatile int __vi[sizeof(long)==8?14:9]; unsigned long __s[sizeof(long)==8?7:9]; } __u; } pthread_attr_t;
since you made the commit, cc @g0djan
Hey you're right, I opened a PR with a fix
https://github.com/rust-lang/rust/blob/5697f1620de6bede6f575b51b01509d8c07830cf/library/std/src/sys/wasi/thread.rs#L19-L26
the type which should have its size compared is
c_long
, notc_int
:wasi-libc's code linked in comment above:
since you made the commit, cc @g0djan