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

tests: really test the non-var scalar inverse #959

Commits on Jun 28, 2021

  1. tests: really test the non-var scalar inverse

    Function `test_inverse_scalar` contains:
    
        (var ? secp256k1_scalar_inverse_var : secp256k1_scalar_inverse_var)(&l, x);  /* l = 1/x */
    
    The two sides of the condition are the same function. This seems to be
    an error, as there also exists a non-var function, named
    `secp256k1_scalar_inverse`.
    
    Make `test_inverse_scalar` use this other function when `var` is false.
    
    This issue was found using clang's static analyzer, which reported a
    "Logic error: Identical expressions in conditional expression" (with
    checker `alpha.core.IdenticalExpr`).
    niooss-ledger committed Jun 28, 2021
    Configuration menu
    Copy the full SHA
    41ed139 View commit details
    Browse the repository at this point in the history