Skip to content

Conversation

nabijaczleweli
Copy link
Contributor

@nabijaczleweli nabijaczleweli commented Jul 22, 2025

What does this PR try to resolve?

The type is

typedef struct {
	const gchar *name;
	SecretSchemaFlags flags;
	SecretSchemaAttribute attributes[32];

	/* <private> */
	gint reserved;
	gpointer reserved1;
	gpointer reserved2;
	gpointer reserved3;
	gpointer reserved4;
	gpointer reserved5;
	gpointer reserved6;
	gpointer reserved7;
} SecretSchema;

so the current object we give it is 8 pointers too short

It's incredibly lucky that libsecret, at this time, only uses reserved, and not in any of the functions we call

Also, some obvious cleanups while I was there and comparing with my implementation from cargo-update 17.0.0.

How to test and review this PR?

Observe https://sources.debian.org/src/libsecret/0.20.5-3/libsecret/secret-schema.h/#L43 I suppose?

@rustbot
Copy link
Collaborator

rustbot commented Jul 22, 2025

r? @epage

rustbot has assigned @epage.
They will have a look at your PR within the next two weeks and either review your PR or reassign to another reviewer.

Use r? to explicitly pick a reviewer

@rustbot rustbot added A-credential-provider Area: credential provider for storing and retreiving credentials S-waiting-on-review Status: Awaiting review from the assignee but also interested parties. labels Jul 22, 2025
The type is
	typedef struct {
		const gchar *name;
		SecretSchemaFlags flags;
		SecretSchemaAttribute attributes[32];

		/* <private> */
		gint reserved;
		gpointer reserved1;
		gpointer reserved2;
		gpointer reserved3;
		gpointer reserved4;
		gpointer reserved5;
		gpointer reserved6;
		gpointer reserved7;
	} SecretSchema;
so the current object we give it is 8 pointers too short

It's incredibly lucky that libsecret, at this time,
only uses reserved, and not in any of the functions we call
We already don't do this and use this precise idiom elsewhere
Copy link
Member

@weihanglo weihanglo left a comment

Choose a reason for hiding this comment

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

Thanks!

@weihanglo weihanglo enabled auto-merge July 22, 2025 23:08
@weihanglo weihanglo added this pull request to the merge queue Jul 22, 2025
Merged via the queue into rust-lang:master with commit d2ee2df Jul 23, 2025
24 checks passed
@rustbot rustbot removed the S-waiting-on-review Status: Awaiting review from the assignee but also interested parties. label Jul 23, 2025
bors added a commit to rust-lang/rust that referenced this pull request Jul 25, 2025
Update cargo

8 commits in 6833aa715d724437dc1247d0166afe314ab6854e..9b296973b425ffb159e12cf3cd56580fd5c85382
2025-07-13 02:25:52 +0000 to 2025-07-25 17:10:08 +0000
- Allow using Cargo-as-a-library with gix's reqwest backend (rust-lang/cargo#15653)
- Make timings graphs scalable to user's window (rust-lang/cargo#15766)
- refactor: rename arg `mode` to `intent` (rust-lang/cargo#15774)
- fix: `no-proc-macro` is overridden by subsequent edges (rust-lang/cargo#15764)
- Use `gix` for `cargo package` (rust-lang/cargo#15534)
- cargo-credential-libsecret: give FFI correctly-sized object (rust-lang/cargo#15767)
- Remove unnecessary target-c-int-width from target specs (rust-lang/cargo#15759)
- Expose artifact dependency getters in cargo-as-a-library (rust-lang/cargo#15753)
bors added a commit to rust-lang/rust that referenced this pull request Jul 25, 2025
Update cargo

8 commits in 6833aa715d724437dc1247d0166afe314ab6854e..9b296973b425ffb159e12cf3cd56580fd5c85382
2025-07-13 02:25:52 +0000 to 2025-07-25 17:10:08 +0000
- Allow using Cargo-as-a-library with gix's reqwest backend (rust-lang/cargo#15653)
- Make timings graphs scalable to user's window (rust-lang/cargo#15766)
- refactor: rename arg `mode` to `intent` (rust-lang/cargo#15774)
- fix: `no-proc-macro` is overridden by subsequent edges (rust-lang/cargo#15764)
- Use `gix` for `cargo package` (rust-lang/cargo#15534)
- cargo-credential-libsecret: give FFI correctly-sized object (rust-lang/cargo#15767)
- Remove unnecessary target-c-int-width from target specs (rust-lang/cargo#15759)
- Expose artifact dependency getters in cargo-as-a-library (rust-lang/cargo#15753)
@rustbot rustbot added this to the 1.90.0 milestone Jul 26, 2025
github-actions bot pushed a commit to rust-lang/rustc-dev-guide that referenced this pull request Jul 28, 2025
Update cargo

8 commits in 6833aa715d724437dc1247d0166afe314ab6854e..9b296973b425ffb159e12cf3cd56580fd5c85382
2025-07-13 02:25:52 +0000 to 2025-07-25 17:10:08 +0000
- Allow using Cargo-as-a-library with gix's reqwest backend (rust-lang/cargo#15653)
- Make timings graphs scalable to user's window (rust-lang/cargo#15766)
- refactor: rename arg `mode` to `intent` (rust-lang/cargo#15774)
- fix: `no-proc-macro` is overridden by subsequent edges (rust-lang/cargo#15764)
- Use `gix` for `cargo package` (rust-lang/cargo#15534)
- cargo-credential-libsecret: give FFI correctly-sized object (rust-lang/cargo#15767)
- Remove unnecessary target-c-int-width from target specs (rust-lang/cargo#15759)
- Expose artifact dependency getters in cargo-as-a-library (rust-lang/cargo#15753)
github-actions bot pushed a commit to rust-lang/rust-analyzer that referenced this pull request Jul 28, 2025
Update cargo

8 commits in 6833aa715d724437dc1247d0166afe314ab6854e..9b296973b425ffb159e12cf3cd56580fd5c85382
2025-07-13 02:25:52 +0000 to 2025-07-25 17:10:08 +0000
- Allow using Cargo-as-a-library with gix's reqwest backend (rust-lang/cargo#15653)
- Make timings graphs scalable to user's window (rust-lang/cargo#15766)
- refactor: rename arg `mode` to `intent` (rust-lang/cargo#15774)
- fix: `no-proc-macro` is overridden by subsequent edges (rust-lang/cargo#15764)
- Use `gix` for `cargo package` (rust-lang/cargo#15534)
- cargo-credential-libsecret: give FFI correctly-sized object (rust-lang/cargo#15767)
- Remove unnecessary target-c-int-width from target specs (rust-lang/cargo#15759)
- Expose artifact dependency getters in cargo-as-a-library (rust-lang/cargo#15753)
rust-cloud-vms bot pushed a commit to makai410/rustc_public that referenced this pull request Aug 16, 2025
Update cargo

8 commits in 6833aa715d724437dc1247d0166afe314ab6854e..9b296973b425ffb159e12cf3cd56580fd5c85382
2025-07-13 02:25:52 +0000 to 2025-07-25 17:10:08 +0000
- Allow using Cargo-as-a-library with gix's reqwest backend (rust-lang/cargo#15653)
- Make timings graphs scalable to user's window (rust-lang/cargo#15766)
- refactor: rename arg `mode` to `intent` (rust-lang/cargo#15774)
- fix: `no-proc-macro` is overridden by subsequent edges (rust-lang/cargo#15764)
- Use `gix` for `cargo package` (rust-lang/cargo#15534)
- cargo-credential-libsecret: give FFI correctly-sized object (rust-lang/cargo#15767)
- Remove unnecessary target-c-int-width from target specs (rust-lang/cargo#15759)
- Expose artifact dependency getters in cargo-as-a-library (rust-lang/cargo#15753)
rust-cloud-vms bot pushed a commit to makai410/rustc_public that referenced this pull request Aug 20, 2025
Update cargo

8 commits in 6833aa715d724437dc1247d0166afe314ab6854e..9b296973b425ffb159e12cf3cd56580fd5c85382
2025-07-13 02:25:52 +0000 to 2025-07-25 17:10:08 +0000
- Allow using Cargo-as-a-library with gix's reqwest backend (rust-lang/cargo#15653)
- Make timings graphs scalable to user's window (rust-lang/cargo#15766)
- refactor: rename arg `mode` to `intent` (rust-lang/cargo#15774)
- fix: `no-proc-macro` is overridden by subsequent edges (rust-lang/cargo#15764)
- Use `gix` for `cargo package` (rust-lang/cargo#15534)
- cargo-credential-libsecret: give FFI correctly-sized object (rust-lang/cargo#15767)
- Remove unnecessary target-c-int-width from target specs (rust-lang/cargo#15759)
- Expose artifact dependency getters in cargo-as-a-library (rust-lang/cargo#15753)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

A-credential-provider Area: credential provider for storing and retreiving credentials

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants