Skip to content

Commit

Permalink
fix variable aliasing in x509storeissuer
Browse files Browse the repository at this point in the history
threadcount is defined globally and in main, which is fine, but doing so
causes assignments to use the local scope rather than the global, which
results in div-by-zero in the thread function when we divide NUM_CALLS
by threadcount

Reviewed-by: Tomas Mraz <tomas@openssl.org>
Reviewed-by: Hugo Landau <hlandau@openssl.org>
(Merged from #182)
  • Loading branch information
nhorman authored and mattcaswell committed Apr 24, 2024
1 parent 50849d4 commit f6a78a2
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion perf/x509storeissuer.c
Original file line number Diff line number Diff line change
Expand Up @@ -65,7 +65,7 @@ static void do_x509storeissuer(size_t num)

int main(int argc, char *argv[])
{
int threadcount, i;
int i;
OSSL_TIME duration, av;
uint64_t us;
double avcalltime;
Expand Down

0 comments on commit f6a78a2

Please sign in to comment.