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

Use after move in format-inl.h #2278

Closed
rsjaffe opened this issue May 11, 2021 · 1 comment
Closed

Use after move in format-inl.h #2278

rsjaffe opened this issue May 11, 2021 · 1 comment

Comments

@rsjaffe
Copy link

rsjaffe commented May 11, 2021

int num_bigits = static_cast<int>(bigits_.size());
uses bigits_ after it has been moved. There is further use of bigits_ in that function as well, some of which may be appropriate, some not.

void square() {
    basic_memory_buffer<bigit, bigits_capacity> n(std::move(bigits_));
    int num_bigits = static_cast<int>(bigits_.size());
vitaut added a commit that referenced this issue May 11, 2021
@vitaut
Copy link
Contributor

vitaut commented May 11, 2021

Good catch, thanks. This access happens to be benign but unnecessary - fixed in 02896da.

@vitaut vitaut closed this as completed May 11, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants