Skip to content

Remove size_t to usize conversion#1688

Merged
emilio merged 1 commit into
rust-lang:masterfrom
cmcavity:size_t
Dec 13, 2019
Merged

Remove size_t to usize conversion#1688
emilio merged 1 commit into
rust-lang:masterfrom
cmcavity:size_t

Conversation

@cmcavity

@cmcavity cmcavity commented Dec 4, 2019

Copy link
Copy Markdown
Contributor

Addresses issue #1671.

@emilio emilio left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

This looks ok, but tests need to get updated?

@cmcavity

Copy link
Copy Markdown
Contributor Author

I looked in tests/headers and it seems that in the few test headers in which size_t appears, it is just a typedef of unsigned long long or uint64_t. In that case would the tests not be affected by this change?

@emilio

emilio commented Dec 12, 2019

Copy link
Copy Markdown
Contributor

Well, you can check the travis results for yourself, they're pretty red :)

@cmcavity

Copy link
Copy Markdown
Contributor Author

r? @emilio

@emilio emilio left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Thanks, this looks good. I think we should merge this.

I'm a bit concerned about the portability of bindings for functions that use size_t... If people assume they can use the same thing across architectures.

But we can always add this back behind a runtime flag if somebody asks for it. Thank you!

@emilio emilio merged commit 5d38f2a into rust-lang:master Dec 13, 2019
@cmcavity cmcavity deleted the size_t branch December 13, 2019 22:58
@cmcavity cmcavity mentioned this pull request Jan 22, 2020
@dvdplm dvdplm mentioned this pull request May 5, 2020
@ngirard ngirard mentioned this pull request Dec 4, 2020
2 tasks
TheSven73 pushed a commit to TheSven73/linux that referenced this pull request Apr 13, 2021
The bug which this guard protects against
(rust-lang/rust-bindgen#1671)
was fixed upstream as of rust-bindgen v0.53:
rust-lang/rust-bindgen#1688
d650823839f7 ("Remove size_t to usize conversion")

The current recommended rust-bindgen version for building
the Linux kernel is v0.56, so the guard can be safely
dropped.

Signed-off-by: Sven Van Asbroeck <thesven73@gmail.com>
TheSven73 pushed a commit to TheSven73/linux that referenced this pull request Apr 14, 2021
The bug which this guard protects against
(rust-lang/rust-bindgen#1671)
was fixed upstream as of rust-bindgen v0.53:
rust-lang/rust-bindgen#1688
d650823839f7 ("Remove size_t to usize conversion")

The current recommended rust-bindgen version for building
the Linux kernel is v0.56, so the guard can be safely
dropped.

Signed-off-by: Sven Van Asbroeck <thesven73@gmail.com>
TheSven73 pushed a commit to TheSven73/linux that referenced this pull request Apr 14, 2021
The bug which this guard protects against
(rust-lang/rust-bindgen#1671)
was fixed upstream as of rust-bindgen v0.53:
rust-lang/rust-bindgen#1688
d650823839f7 ("Remove size_t to usize conversion")

The current recommended rust-bindgen version for building
the Linux kernel is v0.56, so the guard can be safely
dropped.

Signed-off-by: Sven Van Asbroeck <thesven73@gmail.com>
TheSven73 pushed a commit to TheSven73/linux that referenced this pull request Apr 15, 2021
On 32-bit arm, `size_t` and 'uintptr_t` are incompatible,
which will trigger the static assertion.

The bug which this guard protects against
(rust-lang/rust-bindgen#1671)
was fixed upstream as of rust-bindgen v0.53:
rust-lang/rust-bindgen#1688
d650823839f7 ("Remove size_t to usize conversion")

The current recommended rust-bindgen version for building
the Linux kernel is v0.56, so the guard can be safely
dropped.

Out of an abundance of caution, remove the guard only
if building for 32-bit arm.

Signed-off-by: Sven Van Asbroeck <thesven73@gmail.com>
TheSven73 pushed a commit to TheSven73/linux that referenced this pull request Apr 15, 2021
On 32-bit arm, `size_t` and 'uintptr_t` are incompatible,
which will trigger the static assertion.

The bug which this guard protects against
(rust-lang/rust-bindgen#1671)
was fixed upstream as of rust-bindgen v0.53:
rust-lang/rust-bindgen#1688
d650823839f7 ("Remove size_t to usize conversion")

The current recommended rust-bindgen version for building
the Linux kernel is v0.56, so the guard can be safely
dropped.

Out of an abundance of caution, remove the guard only
if building for 32-bit arm.

Signed-off-by: Sven Van Asbroeck <thesven73@gmail.com>
TheSven73 pushed a commit to TheSven73/linux that referenced this pull request Apr 15, 2021
On 32-bit arm, `size_t` and 'uintptr_t` are incompatible,
which will trigger the static assertion.

The bug which this guard protects against
(rust-lang/rust-bindgen#1671)
was fixed upstream as of rust-bindgen v0.53:
rust-lang/rust-bindgen#1688
d650823839f7 ("Remove size_t to usize conversion")

The current recommended rust-bindgen version for building
the Linux kernel is v0.56, so the guard can be safely
dropped.

Out of an abundance of caution, remove the guard only
if building for 32-bit arm.

Signed-off-by: Sven Van Asbroeck <thesven73@gmail.com>
TheSven73 pushed a commit to TheSven73/linux that referenced this pull request Apr 15, 2021
On 32-bit arm, `size_t` and 'uintptr_t` are incompatible,
which will trigger the static assertion.

The bug which this guard protects against
(rust-lang/rust-bindgen#1671)
was fixed upstream as of rust-bindgen v0.53:
rust-lang/rust-bindgen#1688
d650823839f7 ("Remove size_t to usize conversion")

The current recommended rust-bindgen version for building
the Linux kernel is v0.56, so the guard can be safely
dropped.

Out of an abundance of caution, remove the guard only
if building for 32-bit arm.

Signed-off-by: Sven Van Asbroeck <thesven73@gmail.com>
TheSven73 pushed a commit to TheSven73/linux that referenced this pull request Apr 16, 2021
On 32-bit arm, `size_t` and 'uintptr_t` are incompatible,
which will trigger the static assertion.

The bug which this guard protects against
(rust-lang/rust-bindgen#1671)
was fixed upstream as of rust-bindgen v0.53:
rust-lang/rust-bindgen#1688
d650823839f7 ("Remove size_t to usize conversion")

The current recommended rust-bindgen version for building
the Linux kernel is v0.56, so the guard can be safely
dropped.

Out of an abundance of caution, remove the guard only
if building for 32-bit arm.

Signed-off-by: Sven Van Asbroeck <thesven73@gmail.com>
TheSven73 pushed a commit to TheSven73/linux that referenced this pull request Apr 16, 2021
On 32-bit arm, `size_t` and 'uintptr_t` are incompatible,
which will trigger the static assertion.

The bug which this guard protects against
(rust-lang/rust-bindgen#1671)
was fixed upstream as of rust-bindgen v0.53:
rust-lang/rust-bindgen#1688
d650823839f7 ("Remove size_t to usize conversion")

The current recommended rust-bindgen version for building
the Linux kernel is v0.56, so the guard can be safely
dropped.

Out of an abundance of caution, remove the guard only
if building for 32-bit arm.

Signed-off-by: Sven Van Asbroeck <thesven73@gmail.com>
ojeda pushed a commit to Rust-for-Linux/linux that referenced this pull request Apr 27, 2021
On 32-bit arm, `size_t` and 'uintptr_t` are incompatible,
which will trigger the static assertion.

The bug which this guard protects against
(rust-lang/rust-bindgen#1671)
was fixed upstream as of rust-bindgen v0.53:
rust-lang/rust-bindgen#1688
d650823839f7 ("Remove size_t to usize conversion")

The current recommended rust-bindgen version for building
the Linux kernel is v0.56, so the guard can be safely
dropped.

Out of an abundance of caution, remove the guard only
if building for 32-bit arm.

Signed-off-by: Sven Van Asbroeck <thesven73@gmail.com>
[normalized title]
Signed-off-by: Miguel Ojeda <ojeda@kernel.org>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants