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

acc: results test #136

Merged
merged 3 commits into from
Nov 2, 2021
Merged

acc: results test #136

merged 3 commits into from
Nov 2, 2021

Conversation

mmcloughlin
Copy link
Owner

Updates #129

@codecov-commenter
Copy link

codecov-commenter commented Nov 1, 2021

Codecov Report

Merging #136 (74a7784) into master (515cfe4) will not change coverage.
The diff coverage is n/a.

Impacted file tree graph

@@           Coverage Diff           @@
##           master     #136   +/-   ##
=======================================
  Coverage   74.00%   74.00%           
=======================================
  Files          36       36           
  Lines        2177     2177           
=======================================
  Hits         1611     1611           
  Misses        492      492           
  Partials       74       74           
Flag Coverage Δ
unittests 74.00% <ø> (ø)

Flags with carried forward coverage won't be shown. Click here to find out more.


Continue to review full report at Codecov.

Legend - Click here to learn more
Δ = absolute <relative> (impact), ø = not affected, ? = missing data
Powered by Codecov. Last update 515cfe4...74a7784. Read the comment docs.

@mmcloughlin
Copy link
Owner Author

When run locally:

=== RUN   TestResults
=== RUN   TestResults/curve25519_field
=== RUN   TestResults/p256_field
=== RUN   TestResults/p384_field
=== RUN   TestResults/secp256k1_field
=== RUN   TestResults/curve25519_scalar
    results_test.go:46: assertion failure: output operand 30 missing allocation
=== RUN   TestResults/p256_scalar
=== RUN   TestResults/p384_scalar
...

Related: dead code elimination #133

mmcloughlin added a commit that referenced this pull request Nov 2, 2021
The variable allocator currently raises an assertion error if it encounters a
write to an operand without an allocation.  Allocation is done like liveness
analysis: the instructions are processed in reverse and variables are
allocated as they are read, freed when they're written to. Therefore this
assertion would trigger if the operand is never read after it's written.

Therefore, this would only happen for a _redundant_ chain which computes a
value it never needs. Clearly this isn't ideal, but it does seem to happen for
some algorithms.  It seems best that the allocator doesn't crash in these
cases.

This PR updates the allocation logic to handle this case. In practice if this
happens the variable would be immediately allocated and freed.

Updates #129 #133 #136
@mmcloughlin mmcloughlin merged commit ef3e014 into master Nov 2, 2021
@mmcloughlin mmcloughlin deleted the acc-results-test branch November 2, 2021 06:45
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

Successfully merging this pull request may close these issues.

2 participants