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

crypto: tinycrypt: Fix spurious uninitialized array error #3347

Merged
merged 1 commit into from
Nov 27, 2024

Conversation

MariuszSkamra
Copy link
Contributor

@MariuszSkamra MariuszSkamra commented Nov 26, 2024

This disables maybe-uninitialized compile option in tinycrypt library to fix spurious compilation errors.

Error: In function 'uECC_vli_modMult_fast',
inlined from 'uECC_vli_modSquare_fast' at repos/apache-mynewt-core/crypto/tinycrypt/src/ecc.c:386:2,
inlined from 'XYcZ_addC' at repos/apache-mynewt-core/crypto/tinycrypt/src/ecc.c:702:2:
repos/apache-mynewt-core/crypto/tinycrypt/src/ecc.c:377:9: error: 't5' may be used uninitialized [-Werror=maybe-uninitialized]
377 | uECC_vli_mult(product, left, right, curve->num_words);
| ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~

@MariuszSkamra
Copy link
Contributor Author

CC @sjanc @andrzej-kaczmarek @kasjer

This disables maybe-uninitialized compilation option in tinycrypt
library to fix spurious compilation errors.

Error: In function 'uECC_vli_modMult_fast',
    inlined from 'uECC_vli_modSquare_fast' at repos/apache-mynewt-core/crypto/tinycrypt/src/ecc.c:386:2,
    inlined from 'XYcZ_addC' at repos/apache-mynewt-core/crypto/tinycrypt/src/ecc.c:702:2:
repos/apache-mynewt-core/crypto/tinycrypt/src/ecc.c:377:9: error: 't5' may be used uninitialized [-Werror=maybe-uninitialized]
  377 |         uECC_vli_mult(product, left, right, curve->num_words);
      |         ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
@andrzej-kaczmarek andrzej-kaczmarek merged commit 263bcfa into apache:master Nov 27, 2024
20 checks passed
@MariuszSkamra MariuszSkamra deleted the tinycrypt branch November 27, 2024 16:02
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants