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

Test restoring zeroed data #9011

Merged
3 commits merged into from
Jun 15, 2021
Merged

Test restoring zeroed data #9011

3 commits merged into from
Jun 15, 2021

Conversation

pepyakin
Copy link
Contributor

@pepyakin pepyakin commented Jun 3, 2021

This PR adds a test similar to one we already had: returns_mutable_static. This time is for zero-initialized memory.

@pepyakin pepyakin added A0-please_review Pull request needs code review. B0-silent Changes should not be mentioned in any release notes C1-low PR touches the given topic and has a low impact on builders. D3-trivial 🧸 PR contains trivial changes in a runtime directory that do not require an audit labels Jun 3, 2021
@athei
Copy link
Member

athei commented Jun 11, 2021

Why is it important that the memory is an array and not only a single primitive? Shouldn't all zero initialized memory be located in the bss? I am asking because you only access a single element of the array.

@pepyakin
Copy link
Contributor Author

It's not important. I started with ptr::null() but then for some reason switched to an array.

@athei
Copy link
Member

athei commented Jun 12, 2021

Can you switch to just using a primitive?

Then it would be consistent with the non-BSS test.

static mut MUTABLE_STATIC_BSS: u32 = 0;

@pepyakin
Copy link
Contributor Author

bot merge

@ghost
Copy link

ghost commented Jun 15, 2021

Trying merge.

@ghost
Copy link

ghost commented Jun 15, 2021

Bot will approve on the behalf of @pepyakin, since they are a team lead, in an attempt to reach the minimum approval count

@ghost ghost merged commit f32aa22 into master Jun 15, 2021
@ghost ghost deleted the ser-bss branch June 15, 2021 10:58
This pull request was closed.
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
A0-please_review Pull request needs code review. B0-silent Changes should not be mentioned in any release notes C1-low PR touches the given topic and has a low impact on builders. D3-trivial 🧸 PR contains trivial changes in a runtime directory that do not require an audit
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants