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

zenoh-codec-1.0.0-alpha.2: unsafe function not covered #1234

Closed
roby2014 opened this issue Jul 9, 2024 · 3 comments
Closed

zenoh-codec-1.0.0-alpha.2: unsafe function not covered #1234

roby2014 opened this issue Jul 9, 2024 · 3 comments
Labels
bug Something isn't working

Comments

@roby2014
Copy link

roby2014 commented Jul 9, 2024

Describe the bug

   Compiling zenoh-codec v1.0.0-alpha.2
   Compiling zenoh-config v1.0.0-alpha.2
error[E0133]: call to unsafe function `with_slot` is unsafe and requires unsafe function or block
   --> /home/roby/.cargo/registry/src/index.crates.io-6f17d22bba15001f/zenoh-codec-1.0.0-alpha.2/src/core/zint.rs:115:9
    |
115 | /         writer.with_slot(VLE_LEN_MAX, move |buffer| {
116 | |             let mut len = 0;
117 | |             while (x & !0x7f_u64) != 0 {
118 | |                 // SAFETY: buffer is guaranteed to be VLE_LEN long where VLE_LEN is
...   |
141 | |             len
142 | |         })?;
    | |__________^ call to unsafe function
    |
    = note: consult the function's documentation for information on how to avoid undefined behavior

For more information about this error, try `rustc --explain E0133`.
error: could not compile `zenoh-codec` (lib) due to 1 previous error
warning: build failed, waiting for other jobs to finish...

To reproduce

Use the crate and try to build.

System info

  • zenoh-codec v1.0.0-alpha.2
  • Linux roby-thonkcentre 6.5.0-41-generic #41~22.04.2-Ubuntu SMP PREEMPT_DYNAMIC Mon Jun 3 11:32:55 UTC 2 x86_64 x86_64 x86_64 GNU/Linux
@roby2014 roby2014 added the bug Something isn't working label Jul 9, 2024
@roby2014
Copy link
Author

roby2014 commented Jul 9, 2024

I think this error ocurred after I also upgraded my zenoh-plugin-rest to 1.0.0-alpha.2 (?)

@diogomatsubara
Copy link
Contributor

@roby2014 The 1.0.0-alpha.2 crate is busted. It was released by mistake and will be yanked from crates.io. This week we will release a new alpha properly. Apologies for the inconvenience

@diogomatsubara
Copy link
Contributor

1.0.0-alpha.4 has been released correctly so you shouldn't see any errors. Let me know if it works for you @roby2014. Please re-open if you continue to see issues

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

2 participants