Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

bug: UB inside opendal_compat #5239

Open
1 task
Xuanwo opened this issue Oct 24, 2024 · 0 comments
Open
1 task

bug: UB inside opendal_compat #5239

Xuanwo opened this issue Oct 24, 2024 · 0 comments
Labels
bug Something isn't working

Comments

@Xuanwo
Copy link
Member

Xuanwo commented Oct 24, 2024

Describe the bug

opendal_compat depends on transmute to perform conver between structs.

But based on discussion happened at https://rust-lang.github.io/unsafe-code-guidelines/layout/structs-and-tuples.html and https://www.notion.so/xuanwospace/Inbox-1185e01178f980a3b7fadc9d0c1b54d2?pvs=4#1295e01178f9802f8c0fdc38c2b2fcae

It's really UB and results many unexplained bug. It's better to remove all transmute and replace with from/into.

Steps to Reproduce

Perform list over opendal_v0_49

Expected Behavior

All operations should work as expected.

Additional Context

No response

Are you willing to submit a PR to fix this bug?

  • Yes, I would like to submit a PR.
@Xuanwo Xuanwo added the bug Something isn't working label Oct 24, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

1 participant