Skip to content
This repository has been archived by the owner on Oct 26, 2023. It is now read-only.

Fix Github Actions #50

Merged
merged 6 commits into from
Jul 19, 2023
Merged

Conversation

cwfitzgerald
Copy link
Member

No description provided.

@jrmuizel
Copy link
Contributor

looks like clippy needs to be disabled or get some tuning before things will pass

@cwfitzgerald
Copy link
Member Author

@jrmuizel @ErichDonGubler if you want to take a look, this cleans up clippy and makes ComPtr as close to sound as we'll reasonably get

@cwfitzgerald
Copy link
Member Author

@msiglreith any chance of removing appveyor from this repository?

@jrmuizel
Copy link
Contributor

lgtm

@msiglreith
Copy link
Contributor

@cwfitzgerald I removed the project on appveyor including the registered webhook - not sure if there is something left or it just doesn't update right away

@msiglreith
Copy link
Contributor

should probably also delete the bors.toml

@cwfitzgerald
Copy link
Member Author

Great, seems to have worked! Thanks!

@cwfitzgerald cwfitzgerald merged commit ed65d78 into gfx-rs:master Jul 19, 2023
1 check passed
@cwfitzgerald cwfitzgerald deleted the fix-github-actions branch July 19, 2023 21:31
// and only then cast it. As if we cast it, then take a reference, we would
// end up with a reference to a temporary.
let refer: &mut *mut T = &mut self.0;
let void: *mut *mut c_void = refer.cast();
Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

In retrospect, this was incorrect, and sets void to self.0 as *mut *mut c_void instead of &mut self.0 as *mut *mut T as *mut *mut c_void, because .cast applies to the primitive pointer *mut T by reference.

Copy link
Member

@ErichDonGubler ErichDonGubler Sep 26, 2023

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

In addition to the problem that @kdashg points out, there's another issue here: the &mut *mut void extracted here is actually a reference to a *mut c_void temporary in this method, whose lifetime is incorrectly inferred through the pointer deref. (because rustc trusts us to get the lifetime right). This becomes insta-UB; a reference to a binding in a popped stack is no bueno. 😓

I don't think it makes sense to use mutable references here, TBH. I'll fix this up in gfx-rs/wgpu#3987, which vendors in this crate (and will likely result in this repository being archived, for the time being). EDIT: Change of plan, gonna "just" vendor in 0.7.0, which doesn't have this breakage.

CC @jrmuizel; I think he'd want to know about these issues.

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

5 participants