Fix infer issues#7103
Conversation
|
Retest this please. |
96b0cfa to
bef70d1
Compare
|
Retest this please |
douzzer
left a comment
There was a problem hiding this comment.
Looks good -- just a few overheady analyzer coddlings to redo in a non-costly way.
Passes all the latest analyzers locally in the wolfssl-multi-test.sh ... super-quick-check suite, which is good news -- it's entirely possible to coddle one analyzer only to have a different analyzer report an unused value or other defect around the coddling.
There was a problem hiding this comment.
This XMEMSET() incurs non-negligible overhead to address a clearly-false positive from infer. I can see how the analyzer got confused, given that wolfSSL_CTX_set_groups() is in another file (tls13.c), but we should try to find a better way to address this.
There was a problem hiding this comment.
This could've stayed on one line, à la
int ret = 0, row = 0;
(just a FWIW)
There was a problem hiding this comment.
As in wolfSSL_CTX_set1_groups(). this is an overheady way to address a clearly-false positive.
Also, any idea why infer didn't similarly false-positive on wolfSSL_set1_groups()? Weird.
There was a problem hiding this comment.
This XMEMSET() seems OK to me. It's not even immediately clear that it's a false positive, but mainly this is a rendering routine and the memset involves only 16 bytes.
There was a problem hiding this comment.
This is another expensive memset to address a clearly-false positive, as above. in wolfSSL_CTX_set1_groups() etc.
There was a problem hiding this comment.
Same story, expensive op to address a false positive.
There was a problem hiding this comment.
This addresses a false positive, but I can live with it, given it's only 6 bytes. Btw I probably would've resolved it by refactoring that neighborhood to convert the ASCII port to a word32 without the unnecessary copying of the ASCII.
bef70d1 to
e175004
Compare
|
Rebased and removed the added |
Description
Fix
UNINITIALIZED_VALUEbugs from infer testing.Testing
Confirmed fixed with Infer rerun.