View | Details | Raw Unified | Return to bug 46345
Collapse All | Expand All

(-)a/cmd/ecperf/ecperf.c (-5 / +9 lines)
Lines 53-58 PKCS11Thread(void *data) Link Here
53
    SECItem sig;
53
    SECItem sig;
54
    CK_SESSION_HANDLE session;
54
    CK_SESSION_HANDLE session;
55
    CK_RV crv;
55
    CK_RV crv;
56
    /* XXX: avoid storing the address of the local variable into threadData */
57
    void *p2 = threadData->p2;
56
58
57
    threadData->status = SECSuccess;
59
    threadData->status = SECSuccess;
58
    threadData->count = 0;
60
    threadData->count = 0;
Lines 68-79 PKCS11Thread(void *data) Link Here
68
    if (threadData->isSign) {
70
    if (threadData->isSign) {
69
        sig.data = sigData;
71
        sig.data = sigData;
70
        sig.len = sizeof(sigData);
72
        sig.len = sizeof(sigData);
71
        threadData->p2 = (void *)&sig;
73
        p2 = (void *)&sig;
72
    }
74
    }
73
75
74
    while (iters--) {
76
    while (iters--) {
75
        threadData->status = (*op)(session, threadData->p1,
77
        threadData->status = (*op)(session, threadData->p1,
76
                                   threadData->p2, threadData->p3);
78
                                   p2, threadData->p3);
77
        if (threadData->status != SECSuccess) {
79
        if (threadData->status != SECSuccess) {
78
            break;
80
            break;
79
        }
81
        }
Lines 89-107 genericThread(void *data) Link Here
89
    int iters = threadData->iters;
91
    int iters = threadData->iters;
90
    unsigned char sigData[256];
92
    unsigned char sigData[256];
91
    SECItem sig;
93
    SECItem sig;
94
    /* XXX: avoid storing the address of the local variable into threadData */
95
    void *p2 = threadData->p2;
92
96
93
    threadData->status = SECSuccess;
97
    threadData->status = SECSuccess;
94
    threadData->count = 0;
98
    threadData->count = 0;
95
99
96
    if (threadData->isSign) {
100
    if (threadData->isSign) {
101
97
        sig.data = sigData;
102
        sig.data = sigData;
98
        sig.len = sizeof(sigData);
103
        sig.len = sizeof(sigData);
99
        threadData->p2 = (void *)&sig;
104
        p2 = (void *)&sig;
100
    }
105
    }
101
106
102
    while (iters--) {
107
    while (iters--) {
103
        threadData->status = (*threadData->op)(threadData->p1,
108
        threadData->status = (*threadData->op)(threadData->p1,
104
                                               threadData->p2, threadData->p3);
109
                                               p2, threadData->p3);
105
        if (threadData->status != SECSuccess) {
110
        if (threadData->status != SECSuccess) {
106
            break;
111
            break;
107
        }
112
        }
108
- 

Return to bug 46345