## Coverage Report

#### Created: 2025-03-01 02:43

next uncovered line (L), next uncovered region (R), next uncovered branch (B)

    /libfido2/fuzz/wrap.c

    Line
    Count
    Source
    1
    /*
    2
     * Copyright (c) 2019-2022 Yubico AB. All rights reserved.
    3
     * Use of this source code is governed by a BSD-style
    4
     * license that can be found in the LICENSE file.
    5
     * SPDX-License-Identifier: BSD-2-Clause
    6
     */
    7
    8
    #include <sys/types.h>
    9
    #include <sys/random.h>
    10
    #include <sys/socket.h>
    11
    12
    #include <openssl/bn.h>
    13
    #include <openssl/evp.h>
    14
    #include <openssl/sha.h>
    15
    16
    #include <cbor.h>
    17
    #include <stdbool.h>
    18
    #include <stdint.h>
    19
    #include <stdio.h>
    20
    #include <stdlib.h>
    21
    #include <zlib.h>
    22
    23
    #include "mutator_aux.h"
    24
    25
    extern int prng_up;
    26
    27
    int fuzz_save_corpus;
    28
    29
    /*
    30
     * Build wrappers around functions of interest, and have them fail
    31
     * in a pseudo-random manner. A uniform probability of 0.25% (1/400)
    32
     * allows for a depth of log(0.5)/log(399/400) > 276 operations
    33
     * before simulated errors become statistically more likely.
    34
     */
    35
    36
    #define WRAP(type, name, args, retval, param, prob)     \
    37
    extern type __wrap_##name args;                         \
    38
    extern type __real_##name args;                         \
    39
    52.7M
    type __wrap_##name args {                               \
    40
    52.7M
            if (prng_up && uniform_random(400) < (prob)) {       \
    41
    140k
                    return (retval);                        \
    42
    140k
            }                                                \
    43
    52.7M
                                                            \
    44
    52.7M
            return (__real_##name param);                       \
    45
    52.7M
    }

    __wrap_malloc

    Line
    Count
    Source
    39
    4.00M
    type __wrap_##name args {                               \
    40
    4.00M
            if (prng_up && uniform_random(400) < (prob)) {       \
    41
    9.45k
                    return (retval);                        \
    42
    9.45k
            }                                                \
    43
    4.00M
                                                            \
    44
    4.00M
            return (__real_##name param);                       \
    45
    4.00M
    }

    __wrap_calloc

    Line
    Count
    Source
    39
    30.7M
    type __wrap_##name args {                               \
    40
    30.7M
            if (prng_up && uniform_random(400) < (prob)) {       \
    41
    81.5k
                    return (retval);                        \
    42
    81.5k
            }                                                \
    43
    30.7M
                                                            \
    44
    30.7M
            return (__real_##name param);                       \
    45
    30.7M
    }

    __wrap_realloc

    Line
    Count
    Source
    39
    4.10k
    type __wrap_##name args {                               \
    40
    4.10k
            if (prng_up && uniform_random(400) < (prob)) {       \
    41
    19
                    return (retval);                        \
    42
    19
            }                                                \
    43
    4.10k
                                                            \
    44
    4.10k
            return (__real_##name param);                       \
    45
    4.10k
    }

    __wrap_strdup

    Line
    Count
    Source
    39
    1.59M
    type __wrap_##name args {                               \
    40
    1.59M
            if (prng_up && uniform_random(400) < (prob)) {       \
    41
    5.15k
                    return (retval);                        \
    42
    5.15k
            }                                                \
    43
    1.59M
                                                            \
    44
    1.59M
            return (__real_##name param);                       \
    45
    1.59M
    }

    __wrap_getrandom

    Line
    Count
    Source
    39
    3.35M
    type __wrap_##name args {                               \
    40
    3.35M
            if (prng_up && uniform_random(400) < (prob)) {       \
    41
    7.83k
                    return (retval);                        \
    42
    7.83k
            }                                                \
    43
    3.35M
                                                            \
    44
    3.35M
            return (__real_##name param);                       \
    45
    3.35M
    }

    __wrap_EVP_Cipher

    Line
    Count
    Source
    39
    75.2k
    type __wrap_##name args {                               \
    40
    75.2k
            if (prng_up && uniform_random(400) < (prob)) {       \
    41
    211
                    return (retval);                        \
    42
    211
            }                                                \
    43
    75.2k
                                                            \
    44
    75.2k
            return (__real_##name param);                       \
    45
    75.2k
    }

    __wrap_EVP_CIPHER_CTX_ctrl

    Line
    Count
    Source
    39
    13.5k
    type __wrap_##name args {                               \
    40
    13.5k
            if (prng_up && uniform_random(400) < (prob)) {       \
    41
    50
                    return (retval);                        \
    42
    50
            }                                                \
    43
    13.5k
                                                            \
    44
    13.5k
            return (__real_##name param);                       \
    45
    13.5k
    }

    __wrap_EVP_CIPHER_CTX_new

    Line
    Count
    Source
    39
    48.6k
    type __wrap_##name args {                               \
    40
    48.6k
            if (prng_up && uniform_random(400) < (prob)) {       \
    41
    107
                    return (retval);                        \
    42
    107
            }                                                \
    43
    48.6k
                                                            \
    44
    48.6k
            return (__real_##name param);                       \
    45
    48.6k
    }

    __wrap_EVP_CipherInit

    Line
    Count
    Source
    39
    48.4k
    type __wrap_##name args {                               \
    40
    48.4k
            if (prng_up && uniform_random(400) < (prob)) {       \
    41
    196
                    return (retval);                        \
    42
    196
            }                                                \
    43
    48.4k
                                                            \
    44
    48.4k
            return (__real_##name param);                       \
    45
    48.4k
    }

    __wrap_EVP_PKEY_get0_RSA

    Line
    Count
    Source
    39
    288
    type __wrap_##name args {                               \
    40
    288
            if (prng_up && uniform_random(400) < (prob)) {       \
    41
    5
                    return (retval);                        \
    42
    5
            }                                                \
    43
    288
                                                            \
    44
    288
            return (__real_##name param);                       \
    45
    288
    }

    __wrap_EVP_PKEY_get0_EC_KEY

    Line
    Count
    Source
    39
    108k
    type __wrap_##name args {                               \
    40
    108k
            if (prng_up && uniform_random(400) < (prob)) {       \
    41
    622
                    return (retval);                        \
    42
    622
            }                                                \
    43
    108k
                                                            \
    44
    108k
            return (__real_##name param);                       \
    45
    108k
    }

    __wrap_EVP_PKEY_get_raw_public_key

    Line
    Count
    Source
    39
    6.38k
    type __wrap_##name args {                               \
    40
    6.38k
            if (prng_up && uniform_random(400) < (prob)) {       \
    41
    39
                    return (retval);                        \
    42
    39
            }                                                \
    43
    6.38k
                                                            \
    44
    6.38k
            return (__real_##name param);                       \
    45
    6.38k
    }

    __wrap_EVP_MD_CTX_new

    Line
    Count
    Source
    39
    7.92k
    type __wrap_##name args {                               \
    40
    7.92k
            if (prng_up && uniform_random(400) < (prob)) {       \
    41
    76
                    return (retval);                        \
    42
    76
            }                                                \
    43
    7.92k
                                                            \
    44
    7.92k
            return (__real_##name param);                       \
    45
    7.92k
    }

    __wrap_EVP_DigestVerifyInit

    Line
    Count
    Source
    39
    569
    type __wrap_##name args {                               \
    40
    569
            if (prng_up && uniform_random(400) < (prob)) {       \
    41
    14
                    return (retval);                        \
    42
    14
            }                                                \
    43
    569
                                                            \
    44
    569
            return (__real_##name param);                       \
    45
    569
    }

    __wrap_EVP_DigestInit_ex

    Line
    Count
    Source
    39
    7.27k
    type __wrap_##name args {                               \
    40
    7.27k
            if (prng_up && uniform_random(400) < (prob)) {       \
    41
    48
                    return (retval);                        \
    42
    48
            }                                                \
    43
    7.27k
                                                            \
    44
    7.27k
            return (__real_##name param);                       \
    45
    7.27k
    }

    __wrap_EVP_DigestUpdate

    Line
    Count
    Source
    39
    17.1k
    type __wrap_##name args {                               \
    40
    17.1k
            if (prng_up && uniform_random(400) < (prob)) {       \
    41
    120
                    return (retval);                        \
    42
    120
            }                                                \
    43
    17.1k
                                                            \
    44
    17.1k
            return (__real_##name param);                       \
    45
    17.1k
    }

    __wrap_EVP_DigestFinal_ex

    Line
    Count
    Source
    39
    7.11k
    type __wrap_##name args {                               \
    40
    7.11k
            if (prng_up && uniform_random(400) < (prob)) {       \
    41
    34
                    return (retval);                        \
    42
    34
            }                                                \
    43
    7.11k
                                                            \
    44
    7.11k
            return (__real_##name param);                       \
    45
    7.11k
    }

    __wrap_BN_bin2bn

    Line
    Count
    Source
    39
    211k
    type __wrap_##name args {                               \
    40
    211k
            if (prng_up && uniform_random(400) < (prob)) {       \
    41
    1.10k
                    return (retval);                        \
    42
    1.10k
            }                                                \
    43
    211k
                                                            \
    44
    211k
            return (__real_##name param);                       \
    45
    211k
    }

    __wrap_BN_bn2bin

    Line
    Count
    Source
    39
    314k
    type __wrap_##name args {                               \
    40
    314k
            if (prng_up && uniform_random(400) < (prob)) {       \
    41
    1.10k
                    return (retval);                        \
    42
    1.10k
            }                                                \
    43
    314k
                                                            \
    44
    314k
            return (__real_##name param);                       \
    45
    314k
    }

    __wrap_BN_CTX_get

    Line
    Count
    Source
    39
    308k
    type __wrap_##name args {                               \
    40
    308k
            if (prng_up && uniform_random(400) < (prob)) {       \
    41
    1.53k
                    return (retval);                        \
    42
    1.53k
            }                                                \
    43
    308k
                                                            \
    44
    308k
            return (__real_##name param);                       \
    45
    308k
    }

    __wrap_BN_CTX_new

    Line
    Count
    Source
    39
    166k
    type __wrap_##name args {                               \
    40
    166k
            if (prng_up && uniform_random(400) < (prob)) {       \
    41
    551
                    return (retval);                        \
    42
    551
            }                                                \
    43
    166k
                                                            \
    44
    166k
            return (__real_##name param);                       \
    45
    166k
    }

    __wrap_BN_new

    Line
    Count
    Source
    39
    7.28k
    type __wrap_##name args {                               \
    40
    7.28k
            if (prng_up && uniform_random(400) < (prob)) {       \
    41
    82
                    return (retval);                        \
    42
    82
            }                                                \
    43
    7.28k
                                                            \
    44
    7.28k
            return (__real_##name param);                       \
    45
    7.28k
    }

    __wrap_RSA_new

    Line
    Count
    Source
    39
    3.42k
    type __wrap_##name args {                               \
    40
    3.42k
            if (prng_up && uniform_random(400) < (prob)) {       \
    41
    33
                    return (retval);                        \
    42
    33
            }                                                \
    43
    3.42k
                                                            \
    44
    3.42k
            return (__real_##name param);                       \
    45
    3.42k
    }

    __wrap_RSA_set0_key

    Line
    Count
    Source
    39
    3.39k
    type __wrap_##name args {                               \
    40
    3.39k
            if (prng_up && uniform_random(400) < (prob)) {       \
    41
    45
                    return (retval);                        \
    42
    45
            }                                                \
    43
    3.39k
                                                            \
    44
    3.39k
            return (__real_##name param);                       \
    45
    3.39k
    }
    Unexecuted instantiation: __wrap_RSA_pkey_ctx_ctrl

    __wrap_EC_KEY_new_by_curve_name

    Line
    Count
    Source
    39
    166k
    type __wrap_##name args {                               \
    40
    166k
            if (prng_up && uniform_random(400) < (prob)) {       \
    41
    951
                    return (retval);                        \
    42
    951
            }                                                \
    43
    166k
                                                            \
    44
    166k
            return (__real_##name param);                       \
    45
    166k
    }

    __wrap_EC_KEY_get0_group

    Line
    Count
    Source
    39
    142k
    type __wrap_##name args {                               \
    40
    142k
            if (prng_up && uniform_random(400) < (prob)) {       \
    41
    436
                    return (retval);                        \
    42
    436
            }                                                \
    43
    142k
                                                            \
    44
    142k
            return (__real_##name param);                       \
    45
    142k
    }

    __wrap_EC_KEY_get0_private_key

    Line
    Count
    Source
    39
    107k
    type __wrap_##name args {                               \
    40
    107k
            if (prng_up && uniform_random(400) < (prob)) {       \
    41
    530
                    return (retval);                        \
    42
    530
            }                                                \
    43
    107k
                                                            \
    44
    107k
            return (__real_##name param);                       \
    45
    107k
    }

    __wrap_EC_POINT_new

    Line
    Count
    Source
    39
    141k
    type __wrap_##name args {                               \
    40
    141k
            if (prng_up && uniform_random(400) < (prob)) {       \
    41
    653
                    return (retval);                        \
    42
    653
            }                                                \
    43
    141k
                                                            \
    44
    141k
            return (__real_##name param);                       \
    45
    141k
    }

    __wrap_EC_POINT_get_affine_coordinates_GFp

    Line
    Count
    Source
    39
    104k
    type __wrap_##name args {                               \
    40
    104k
            if (prng_up && uniform_random(400) < (prob)) {       \
    41
    451
                    return (retval);                        \
    42
    451
            }                                                \
    43
    104k
                                                            \
    44
    104k
            return (__real_##name param);                       \
    45
    104k
    }

    __wrap_EVP_PKEY_new

    Line
    Count
    Source
    39
    51.4k
    type __wrap_##name args {                               \
    40
    51.4k
            if (prng_up && uniform_random(400) < (prob)) {       \
    41
    203
                    return (retval);                        \
    42
    203
            }                                                \
    43
    51.4k
                                                            \
    44
    51.4k
            return (__real_##name param);                       \
    45
    51.4k
    }

    __wrap_EVP_PKEY_assign

    Line
    Count
    Source
    39
    51.2k
    type __wrap_##name args {                               \
    40
    51.2k
            if (prng_up && uniform_random(400) < (prob)) {       \
    41
    259
                    return (retval);                        \
    42
    259
            }                                                \
    43
    51.2k
                                                            \
    44
    51.2k
            return (__real_##name param);                       \
    45
    51.2k
    }

    __wrap_EVP_PKEY_keygen_init

    Line
    Count
    Source
    39
    109k
    type __wrap_##name args {                               \
    40
    109k
            if (prng_up && uniform_random(400) < (prob)) {       \
    41
    478
                    return (retval);                        \
    42
    478
            }                                                \
    43
    109k
                                                            \
    44
    109k
            return (__real_##name param);                       \
    45
    109k
    }

    __wrap_EVP_PKEY_keygen

    Line
    Count
    Source
    39
    109k
    type __wrap_##name args {                               \
    40
    109k
            if (prng_up && uniform_random(400) < (prob)) {       \
    41
    597
                    return (retval);                        \
    42
    597
            }                                                \
    43
    109k
                                                            \
    44
    109k
            return (__real_##name param);                       \
    45
    109k
    }

    __wrap_EVP_PKEY_paramgen_init

    Line
    Count
    Source
    39
    110k
    type __wrap_##name args {                               \
    40
    110k
            if (prng_up && uniform_random(400) < (prob)) {       \
    41
    535
                    return (retval);                        \
    42
    535
            }                                                \
    43
    110k
                                                            \
    44
    110k
            return (__real_##name param);                       \
    45
    110k
    }

    __wrap_EVP_PKEY_paramgen

    Line
    Count
    Source
    39
    110k
    type __wrap_##name args {                               \
    40
    110k
            if (prng_up && uniform_random(400) < (prob)) {       \
    41
    420
                    return (retval);                        \
    42
    420
            }                                                \
    43
    110k
                                                            \
    44
    110k
            return (__real_##name param);                       \
    45
    110k
    }

    __wrap_EVP_PKEY_new_raw_public_key

    Line
    Count
    Source
    39
    4.31k
    type __wrap_##name args {                               \
    40
    4.31k
            if (prng_up && uniform_random(400) < (prob)) {       \
    41
    88
                    return (retval);                        \
    42
    88
            }                                                \
    43
    4.31k
                                                            \
    44
    4.31k
            return (__real_##name param);                       \
    45
    4.31k
    }

    __wrap_EVP_PKEY_CTX_new

    Line
    Count
    Source
    39
    136k
    type __wrap_##name args {                               \
    40
    136k
            if (prng_up && uniform_random(400) < (prob)) {       \
    41
    547
                    return (retval);                        \
    42
    547
            }                                                \
    43
    136k
                                                            \
    44
    136k
            return (__real_##name param);                       \
    45
    136k
    }

    __wrap_EVP_PKEY_CTX_new_id

    Line
    Count
    Source
    39
    118k
    type __wrap_##name args {                               \
    40
    118k
            if (prng_up && uniform_random(400) < (prob)) {       \
    41
    538
                    return (retval);                        \
    42
    538
            }                                                \
    43
    118k
                                                            \
    44
    118k
            return (__real_##name param);                       \
    45
    118k
    }

    __wrap_EVP_PKEY_derive

    Line
    Count
    Source
    39
    52.6k
    type __wrap_##name args {                               \
    40
    52.6k
            if (prng_up && uniform_random(400) < (prob)) {       \
    41
    309
                    return (retval);                        \
    42
    309
            }                                                \
    43
    52.6k
                                                            \
    44
    52.6k
            return (__real_##name param);                       \
    45
    52.6k
    }

    __wrap_EVP_PKEY_derive_init

    Line
    Count
    Source
    39
    30.2k
    type __wrap_##name args {                               \
    40
    30.2k
            if (prng_up && uniform_random(400) < (prob)) {       \
    41
    210
                    return (retval);                        \
    42
    210
            }                                                \
    43
    30.2k
                                                            \
    44
    30.2k
            return (__real_##name param);                       \
    45
    30.2k
    }

    __wrap_EVP_PKEY_derive_set_peer

    Line
    Count
    Source
    39
    23.1k
    type __wrap_##name args {                               \
    40
    23.1k
            if (prng_up && uniform_random(400) < (prob)) {       \
    41
    165
                    return (retval);                        \
    42
    165
            }                                                \
    43
    23.1k
                                                            \
    44
    23.1k
            return (__real_##name param);                       \
    45
    23.1k
    }

    __wrap_EVP_PKEY_verify_init

    Line
    Count
    Source
    39
    3.43k
    type __wrap_##name args {                               \
    40
    3.43k
            if (prng_up && uniform_random(400) < (prob)) {       \
    41
    69
                    return (retval);                        \
    42
    69
            }                                                \
    43
    3.43k
                                                            \
    44
    3.43k
            return (__real_##name param);                       \
    45
    3.43k
    }
    Unexecuted instantiation: __wrap_EVP_PKEY_CTX_ctrl

    __wrap_EVP_sha1

    Line
    Count
    Source
    39
    1.23k
    type __wrap_##name args {                               \
    40
    1.23k
            if (prng_up && uniform_random(400) < (prob)) {       \
    41
    8
                    return (retval);                        \
    42
    8
            }                                                \
    43
    1.23k
                                                            \
    44
    1.23k
            return (__real_##name param);                       \
    45
    1.23k
    }

    __wrap_EVP_sha256

    Line
    Count
    Source
    39
    27.8k
    type __wrap_##name args {                               \
    40
    27.8k
            if (prng_up && uniform_random(400) < (prob)) {       \
    41
    174
                    return (retval);                        \
    42
    174
            }                                                \
    43
    27.8k
                                                            \
    44
    27.8k
            return (__real_##name param);                       \
    45
    27.8k
    }

    __wrap_EVP_aes_256_cbc

    Line
    Count
    Source
    39
    34.8k
    type __wrap_##name args {                               \
    40
    34.8k
            if (prng_up && uniform_random(400) < (prob)) {       \
    41
    92
                    return (retval);                        \
    42
    92
            }                                                \
    43
    34.8k
                                                            \
    44
    34.8k
            return (__real_##name param);                       \
    45
    34.8k
    }

    __wrap_EVP_aes_256_gcm

    Line
    Count
    Source
    39
    13.7k
    type __wrap_##name args {                               \
    40
    13.7k
            if (prng_up && uniform_random(400) < (prob)) {       \
    41
    83
                    return (retval);                        \
    42
    83
            }                                                \
    43
    13.7k
                                                            \
    44
    13.7k
            return (__real_##name param);                       \
    45
    13.7k
    }

    __wrap_HMAC

    Line
    Count
    Source
    39
    15.6k
    type __wrap_##name args {                               \
    40
    15.6k
            if (prng_up && uniform_random(400) < (prob)) {       \
    41
    74
                    return (retval);                        \
    42
    74
            }                                                \
    43
    15.6k
                                                            \
    44
    15.6k
            return (__real_##name param);                       \
    45
    15.6k
    }

    __wrap_HMAC_CTX_new

    Line
    Count
    Source
    39
    130
    type __wrap_##name args {                               \
    40
    130
            if (prng_up && uniform_random(400) < (prob)) {       \
    41
    3
                    return (retval);                        \
    42
    3
            }                                                \
    43
    130
                                                            \
    44
    130
            return (__real_##name param);                       \
    45
    130
    }

    __wrap_HMAC_Init_ex

    Line
    Count
    Source
    39
    115
    type __wrap_##name args {                               \
    40
    115
            if (prng_up && uniform_random(400) < (prob)) {       \
    41
    4
                    return (retval);                        \
    42
    4
            }                                                \
    43
    115
                                                            \
    44
    115
            return (__real_##name param);                       \
    45
    115
    }

    __wrap_HMAC_Update

    Line
    Count
    Source
    39
    216
    type __wrap_##name args {                               \
    40
    216
            if (prng_up && uniform_random(400) < (prob)) {       \
    41
    9
                    return (retval);                        \
    42
    9
            }                                                \
    43
    216
                                                            \
    44
    216
            return (__real_##name param);                       \
    45
    216
    }

    __wrap_HMAC_Final

    Line
    Count
    Source
    39
    102
    type __wrap_##name args {                               \
    40
    102
            if (prng_up && uniform_random(400) < (prob)) {       \
    41
    5
                    return (retval);                        \
    42
    5
            }                                                \
    43
    102
                                                            \
    44
    102
            return (__real_##name param);                       \
    45
    102
    }

    __wrap_SHA1

    Line
    Count
    Source
    39
    710
    type __wrap_##name args {                               \
    40
    710
            if (prng_up && uniform_random(400) < (prob)) {       \
    41
    4
                    return (retval);                        \
    42
    4
            }                                                \
    43
    710
                                                            \
    44
    710
            return (__real_##name param);                       \
    45
    710
    }

    __wrap_SHA256

    Line
    Count
    Source
    39
    104k
    type __wrap_##name args {                               \
    40
    104k
            if (prng_up && uniform_random(400) < (prob)) {       \
    41
    370
                    return (retval);                        \
    42
    370
            }                                                \
    43
    104k
                                                            \
    44
    104k
            return (__real_##name param);                       \
    45
    104k
    }

    __wrap_cbor_build_string

    Line
    Count
    Source
    39
    1.01M
    type __wrap_##name args {                               \
    40
    1.01M
            if (prng_up && uniform_random(400) < (prob)) {       \
    41
    1.72k
                    return (retval);                        \
    42
    1.72k
            }                                                \
    43
    1.01M
                                                            \
    44
    1.01M
            return (__real_##name param);                       \
    45
    1.01M
    }

    __wrap_cbor_build_bytestring

    Line
    Count
    Source
    39
    331k
    type __wrap_##name args {                               \
    40
    331k
            if (prng_up && uniform_random(400) < (prob)) {       \
    41
    735
                    return (retval);                        \
    42
    735
            }                                                \
    43
    331k
                                                            \
    44
    331k
            return (__real_##name param);                       \
    45
    331k
    }

    __wrap_cbor_build_bool

    Line
    Count
    Source
    39
    23.5k
    type __wrap_##name args {                               \
    40
    23.5k
            if (prng_up && uniform_random(400) < (prob)) {       \
    41
    41
                    return (retval);                        \
    42
    41
            }                                                \
    43
    23.5k
                                                            \
    44
    23.5k
            return (__real_##name param);                       \
    45
    23.5k
    }

    __wrap_cbor_build_negint8

    Line
    Count
    Source
    39
    87.3k
    type __wrap_##name args {                               \
    40
    87.3k
            if (prng_up && uniform_random(400) < (prob)) {       \
    41
    282
                    return (retval);                        \
    42
    282
            }                                                \
    43
    87.3k
                                                            \
    44
    87.3k
            return (__real_##name param);                       \
    45
    87.3k
    }

    __wrap_cbor_build_negint16

    Line
    Count
    Source
    39
    1.06k
    type __wrap_##name args {                               \
    40
    1.06k
            if (prng_up && uniform_random(400) < (prob)) {       \
    41
    2
                    return (retval);                        \
    42
    2
            }                                                \
    43
    1.06k
                                                            \
    44
    1.06k
            return (__real_##name param);                       \
    45
    1.06k
    }

    __wrap_cbor_load

    Line
    Count
    Source
    39
    288k
    type __wrap_##name args {                               \
    40
    288k
            if (prng_up && uniform_random(400) < (prob)) {       \
    41
    1.11k
                    return (retval);                        \
    42
    1.11k
            }                                                \
    43
    288k
                                                            \
    44
    288k
            return (__real_##name param);                       \
    45
    288k
    }

    __wrap_cbor_build_uint8

    Line
    Count
    Source
    39
    1.01M
    type __wrap_##name args {                               \
    40
    1.01M
            if (prng_up && uniform_random(400) < (prob)) {       \
    41
    2.77k
                    return (retval);                        \
    42
    2.77k
            }                                                \
    43
    1.01M
                                                            \
    44
    1.01M
            return (__real_##name param);                       \
    45
    1.01M
    }

    __wrap_cbor_build_uint16

    Line
    Count
    Source
    39
    11.5k
    type __wrap_##name args {                               \
    40
    11.5k
            if (prng_up && uniform_random(400) < (prob)) {       \
    41
    19
                    return (retval);                        \
    42
    19
            }                                                \
    43
    11.5k
                                                            \
    44
    11.5k
            return (__real_##name param);                       \
    45
    11.5k
    }

    __wrap_cbor_build_uint32

    Line
    Count
    Source
    39
    2.95k
    type __wrap_##name args {                               \
    40
    2.95k
            if (prng_up && uniform_random(400) < (prob)) {       \
    41
    20
                    return (retval);                        \
    42
    20
            }                                                \
    43
    2.95k
                                                            \
    44
    2.95k
            return (__real_##name param);                       \
    45
    2.95k
    }
    Unexecuted instantiation: __wrap_cbor_build_uint64

    __wrap_cbor_map_handle

    Line
    Count
    Source
    39
    545k
    type __wrap_##name args {                               \
    40
    545k
            if (prng_up && uniform_random(400) < (prob)) {       \
    41
    1.25k
                    return (retval);                        \
    42
    1.25k
            }                                                \
    43
    545k
                                                            \
    44
    545k
            return (__real_##name param);                       \
    45
    545k
    }

    __wrap_cbor_array_handle

    Line
    Count
    Source
    39
    396k
    type __wrap_##name args {                               \
    40
    396k
            if (prng_up && uniform_random(400) < (prob)) {       \
    41
    142
                    return (retval);                        \
    42
    142
            }                                                \
    43
    396k
                                                            \
    44
    396k
            return (__real_##name param);                       \
    45
    396k
    }

    __wrap_cbor_array_push

    Line
    Count
    Source
    39
    515k
    type __wrap_##name args {                               \
    40
    515k
            if (prng_up && uniform_random(400) < (prob)) {       \
    41
    1.23k
                    return (retval);                        \
    42
    1.23k
            }                                                \
    43
    515k
                                                            \
    44
    515k
            return (__real_##name param);                       \
    45
    515k
    }

    __wrap_cbor_map_add

    Line
    Count
    Source
    39
    1.07M
    type __wrap_##name args {                               \
    40
    1.07M
            if (prng_up && uniform_random(400) < (prob)) {       \
    41
    1.70k
                    return (retval);                        \
    42
    1.70k
            }                                                \
    43
    1.07M
                                                            \
    44
    1.07M
            return (__real_##name param);                       \
    45
    1.07M
    }

    __wrap_cbor_new_definite_map

    Line
    Count
    Source
    39
    495k
    type __wrap_##name args {                               \
    40
    495k
            if (prng_up && uniform_random(400) < (prob)) {       \
    41
    646
                    return (retval);                        \
    42
    646
            }                                                \
    43
    495k
                                                            \
    44
    495k
            return (__real_##name param);                       \
    45
    495k
    }

    __wrap_cbor_new_definite_array

    Line
    Count
    Source
    39
    31.3k
    type __wrap_##name args {                               \
    40
    31.3k
            if (prng_up && uniform_random(400) < (prob)) {       \
    41
    79
                    return (retval);                        \
    42
    79
            }                                                \
    43
    31.3k
                                                            \
    44
    31.3k
            return (__real_##name param);                       \
    45
    31.3k
    }

    __wrap_cbor_new_definite_bytestring

    Line
    Count
    Source
    39
    570
    type __wrap_##name args {                               \
    40
    570
            if (prng_up && uniform_random(400) < (prob)) {       \
    41
    16
                    return (retval);                        \
    42
    16
            }                                                \
    43
    570
                                                            \
    44
    570
            return (__real_##name param);                       \
    45
    570
    }

    __wrap_cbor_serialize_alloc

    Line
    Count
    Source
    39
    243k
    type __wrap_##name args {                               \
    40
    243k
            if (prng_up && uniform_random(400) < (prob)) {       \
    41
    851
                    return (retval);                        \
    42
    851
            }                                                \
    43
    243k
                                                            \
    44
    243k
            return (__real_##name param);                       \
    45
    243k
    }

    __wrap_fido_tx

    Line
    Count
    Source
    39
    1.30M
    type __wrap_##name args {                               \
    40
    1.30M
            if (prng_up && uniform_random(400) < (prob)) {       \
    41
    2.87k
                    return (retval);                        \
    42
    2.87k
            }                                                \
    43
    1.30M
                                                            \
    44
    1.30M
            return (__real_##name param);                       \
    45
    1.30M
    }

    __wrap_bind

    Line
    Count
    Source
    39
    2.46M
    type __wrap_##name args {                               \
    40
    2.46M
            if (prng_up && uniform_random(400) < (prob)) {       \
    41
    6.43k
                    return (retval);                        \
    42
    6.43k
            }                                                \
    43
    2.46M
                                                            \
    44
    2.46M
            return (__real_##name param);                       \
    45
    2.46M
    }

    __wrap_deflateInit2_

    Line
    Count
    Source
    39
    10.8k
    type __wrap_##name args {                               \
    40
    10.8k
            if (prng_up && uniform_random(400) < (prob)) {       \
    41
    9
                    return (retval);                        \
    42
    9
            }                                                \
    43
    10.8k
                                                            \
    44
    10.8k
            return (__real_##name param);                       \
    45
    10.8k
    }
    46
    47
    WRAP(void *,
    48
            malloc,
    49
            (size_t size),
    50
            NULL,
    51
            (size),
    52
            1
    53
    )
    54
    55
    WRAP(void *,
    56
            calloc,
    57
            (size_t nmemb, size_t size),
    58
            NULL,
    59
            (nmemb, size),
    60
            1
    61
    )
    62
    63
    WRAP(void *,
    64
            realloc,
    65
            (void *ptr, size_t size),
    66
            NULL,
    67
            (ptr, size),
    68
            1
    69
    )
    70
    71
    WRAP(char *,
    72
            strdup,
    73
            (const char *s),
    74
            NULL,
    75
            (s),
    76
            1
    77
    )
    78
    79
    WRAP(ssize_t,
    80
            getrandom,
    81
            (void *buf, size_t buflen, unsigned int flags),
    82
            -1,
    83
            (buf, buflen, flags),
    84
            1
    85
    )
    86
    87
    WRAP(int,
    88
            EVP_Cipher,
    89
            (EVP_CIPHER_CTX *ctx, unsigned char *out, const unsigned char *in,
    90
                unsigned int inl),
    91
            -1,
    92
            (ctx, out, in, inl),
    93
            1
    94
    )
    95
    96
    WRAP(int,
    97
            EVP_CIPHER_CTX_ctrl,
    98
            (EVP_CIPHER_CTX *ctx, int type, int arg, void *ptr),
    99
            0,
    100
            (ctx, type, arg, ptr),
    101
            1
    102
    )
    103
    104
    WRAP(EVP_CIPHER_CTX *,
    105
            EVP_CIPHER_CTX_new,
    106
            (void),
    107
            NULL,
    108
            (),
    109
            1
    110
    )
    111
    112
    WRAP(int,
    113
            EVP_CipherInit,
    114
            (EVP_CIPHER_CTX *ctx, const EVP_CIPHER *cipher,
    115
                const unsigned char *key, const unsigned char *iv, int enc),
    116
            0,
    117
            (ctx, cipher, key, iv, enc),
    118
            1
    119
    )
    120
    121
    WRAP(RSA *,
    122
            EVP_PKEY_get0_RSA,
    123
            (EVP_PKEY *pkey),
    124
            NULL,
    125
            (pkey),
    126
            1
    127
    )
    128
    129
    WRAP(EC_KEY *,
    130
            EVP_PKEY_get0_EC_KEY,
    131
            (EVP_PKEY *pkey),
    132
            NULL,
    133
            (pkey),
    134
            1
    135
    )
    136
    137
    WRAP(int,
    138
            EVP_PKEY_get_raw_public_key,
    139
            (const EVP_PKEY *pkey, unsigned char *pub, size_t *len),
    140
            0,
    141
            (pkey, pub, len),
    142
            1
    143
    )
    144
    145
    WRAP(EVP_MD_CTX *,
    146
            EVP_MD_CTX_new,
    147
            (void),
    148
            NULL,
    149
            (),
    150
            1
    151
    )
    152
    153
    WRAP(int,
    154
            EVP_DigestVerifyInit,
    155
            (EVP_MD_CTX *ctx, EVP_PKEY_CTX **pctx, const EVP_MD *type, ENGINE *e,
    156
                EVP_PKEY *pkey),
    157
            0,
    158
            (ctx, pctx, type, e, pkey),
    159
            1
    160
    )
    161
    162
    WRAP(int,
    163
            EVP_DigestInit_ex,
    164
            (EVP_MD_CTX *ctx, const EVP_MD *type, ENGINE *impl),
    165
            0,
    166
            (ctx, type, impl),
    167
            1
    168
    )
    169
    170
    WRAP(int,
    171
            EVP_DigestUpdate,
    172
            (EVP_MD_CTX *ctx, const void *data, size_t count),
    173
            0,
    174
            (ctx, data, count),
    175
            1
    176
    )
    177
    178
    WRAP(int,
    179
            EVP_DigestFinal_ex,
    180
            (EVP_MD_CTX *ctx, unsigned char *md, unsigned int *isize),
    181
            0,
    182
            (ctx, md, isize),
    183
            1
    184
    )
    185
    186
    WRAP(BIGNUM *,
    187
            BN_bin2bn,
    188
            (const unsigned char *s, int len, BIGNUM *ret),
    189
            NULL,
    190
            (s, len, ret),
    191
            1
    192
    )
    193
    194
    WRAP(int,
    195
            BN_bn2bin,
    196
            (const BIGNUM *a, unsigned char *to),
    197
            -1,
    198
            (a, to),
    199
            1
    200
    )
    201
    202
    WRAP(BIGNUM *,
    203
            BN_CTX_get,
    204
            (BN_CTX *ctx),
    205
            NULL,
    206
            (ctx),
    207
            1
    208
    )
    209
    210
    WRAP(BN_CTX *,
    211
            BN_CTX_new,
    212
            (void),
    213
            NULL,
    214
            (),
    215
            1
    216
    )
    217
    218
    WRAP(BIGNUM *,
    219
            BN_new,
    220
            (void),
    221
            NULL,
    222
            (),
    223
            1
    224
    )
    225
    226
    WRAP(RSA *,
    227
            RSA_new,
    228
            (void),
    229
            NULL,
    230
            (),
    231
            1
    232
    )
    233
    234
    WRAP(int,
    235
            RSA_set0_key,
    236
            (RSA *r, BIGNUM *n, BIGNUM *e, BIGNUM *d),
    237
            0,
    238
            (r, n, e, d),
    239
            1
    240
    )
    241
    242
    WRAP(int,
    243
            RSA_pkey_ctx_ctrl,
    244
            (EVP_PKEY_CTX *ctx, int optype, int cmd, int p1, void *p2),
    245
            -1,
    246
            (ctx, optype, cmd, p1, p2),
    247
            1
    248
    )
    249
    250
    WRAP(EC_KEY *,
    251
            EC_KEY_new_by_curve_name,
    252
            (int nid),
    253
            NULL,
    254
            (nid),
    255
            1
    256
    )
    257
    258
    WRAP(const EC_GROUP *,
    259
            EC_KEY_get0_group,
    260
            (const EC_KEY *key),
    261
            NULL,
    262
            (key),
    263
            1
    264
    )
    265
    266
    WRAP(const BIGNUM *,
    267
            EC_KEY_get0_private_key,
    268
            (const EC_KEY *key),
    269
            NULL,
    270
            (key),
    271
            1
    272
    )
    273
    274
    WRAP(EC_POINT *,
    275
            EC_POINT_new,
    276
            (const EC_GROUP *group),
    277
            NULL,
    278
            (group),
    279
            1
    280
    )
    281
    282
    WRAP(int,
    283
            EC_POINT_get_affine_coordinates_GFp,
    284
            (const EC_GROUP *group, const EC_POINT *p, BIGNUM *x, BIGNUM *y, BN_CTX *ctx),
    285
            0,
    286
            (group, p, x, y, ctx),
    287
            1
    288
    )
    289
    290
    WRAP(EVP_PKEY *,
    291
            EVP_PKEY_new,
    292
            (void),
    293
            NULL,
    294
            (),
    295
            1
    296
    )
    297
    298
    WRAP(int,
    299
            EVP_PKEY_assign,
    300
            (EVP_PKEY *pkey, int type, void *key),
    301
            0,
    302
            (pkey, type, key),
    303
            1
    304
    )
    305
    306
    WRAP(int,
    307
            EVP_PKEY_keygen_init,
    308
            (EVP_PKEY_CTX *ctx),
    309
            0,
    310
            (ctx),
    311
            1
    312
    )
    313
    314
    WRAP(int,
    315
            EVP_PKEY_keygen,
    316
            (EVP_PKEY_CTX *ctx, EVP_PKEY **ppkey),
    317
            0,
    318
            (ctx, ppkey),
    319
            1
    320
    )
    321
    322
    WRAP(int,
    323
            EVP_PKEY_paramgen_init,
    324
            (EVP_PKEY_CTX *ctx),
    325
            0,
    326
            (ctx),
    327
            1
    328
    )
    329
    330
    WRAP(int,
    331
            EVP_PKEY_paramgen,
    332
            (EVP_PKEY_CTX *ctx, EVP_PKEY **ppkey),
    333
            0,
    334
            (ctx, ppkey),
    335
            1
    336
    )
    337
    338
    WRAP(EVP_PKEY *,
    339
            EVP_PKEY_new_raw_public_key,
    340
            (int type, ENGINE *e, const unsigned char *key, size_t keylen),
    341
            NULL,
    342
            (type, e, key, keylen),
    343
            1
    344
    )
    345
    346
    WRAP(EVP_PKEY_CTX *,
    347
            EVP_PKEY_CTX_new,
    348
            (EVP_PKEY *pkey, ENGINE *e),
    349
            NULL,
    350
            (pkey, e),
    351
            1
    352
    )
    353
    354
    WRAP(EVP_PKEY_CTX *,
    355
            EVP_PKEY_CTX_new_id,
    356
            (int id, ENGINE *e),
    357
            NULL,
    358
            (id, e),
    359
            1
    360
    )
    361
    362
    WRAP(int,
    363
            EVP_PKEY_derive,
    364
            (EVP_PKEY_CTX *ctx, unsigned char *key, size_t *pkeylen),
    365
            0,
    366
            (ctx, key, pkeylen),
    367
            1
    368
    )
    369
    370
    WRAP(int,
    371
            EVP_PKEY_derive_init,
    372
            (EVP_PKEY_CTX *ctx),
    373
            0,
    374
            (ctx),
    375
            1
    376
    )
    377
    378
    WRAP(int,
    379
            EVP_PKEY_derive_set_peer,
    380
            (EVP_PKEY_CTX *ctx, EVP_PKEY *peer),
    381
            0,
    382
            (ctx, peer),
    383
            1
    384
    )
    385
    386
    WRAP(int,
    387
            EVP_PKEY_verify_init,
    388
            (EVP_PKEY_CTX *ctx),
    389
            0,
    390
            (ctx),
    391
            1
    392
    )
    393
    394
    WRAP(int,
    395
            EVP_PKEY_CTX_ctrl,
    396
            (EVP_PKEY_CTX *ctx, int keytype, int optype, int cmd, int p1, void *p2),
    397
            -1,
    398
            (ctx, keytype, optype, cmd, p1, p2),
    399
            1
    400
    )
    401
    402
    WRAP(const EVP_MD *,
    403
            EVP_sha1,
    404
            (void),
    405
            NULL,
    406
            (),
    407
            1
    408
    )
    409
    410
    WRAP(const EVP_MD *,
    411
            EVP_sha256,
    412
            (void),
    413
            NULL,
    414
            (),
    415
            1
    416
    )
    417
    418
    WRAP(const EVP_CIPHER *,
    419
            EVP_aes_256_cbc,
    420
            (void),
    421
            NULL,
    422
            (),
    423
            1
    424
    )
    425
    426
    WRAP(const EVP_CIPHER *,
    427
            EVP_aes_256_gcm,
    428
            (void),
    429
            NULL,
    430
            (),
    431
            1
    432
    )
    433
    434
    WRAP(unsigned char *,
    435
            HMAC,
    436
            (const EVP_MD *evp_md, const void *key, int key_len,
    437
                const unsigned char *d, int n, unsigned char *md,
    438
                unsigned int *md_len),
    439
            NULL,
    440
            (evp_md, key, key_len, d, n, md, md_len),
    441
            1
    442
    )
    443
    444
    WRAP(HMAC_CTX *,
    445
            HMAC_CTX_new,
    446
            (void),
    447
            NULL,
    448
            (),
    449
            1
    450
    )
    451
    452
    WRAP(int,
    453
            HMAC_Init_ex,
    454
            (HMAC_CTX *ctx, const void *key, int key_len, const EVP_MD *md,
    455
                ENGINE *impl),
    456
            0,
    457
            (ctx, key, key_len, md, impl),
    458
            1
    459
    )
    460
    461
    WRAP(int,
    462
            HMAC_Update,
    463
            (HMAC_CTX *ctx, const unsigned char *data, int len),
    464
            0,
    465
            (ctx, data, len),
    466
            1
    467
    )
    468
    469
    WRAP(int,
    470
            HMAC_Final,
    471
            (HMAC_CTX *ctx, unsigned char *md, unsigned int *len),
    472
            0,
    473
            (ctx, md, len),
    474
            1
    475
    )
    476
    477
    WRAP(unsigned char *,
    478
            SHA1,
    479
            (const unsigned char *d, size_t n, unsigned char *md),
    480
            NULL,
    481
            (d, n, md),
    482
            1
    483
    )
    484
    485
    WRAP(unsigned char *,
    486
            SHA256,
    487
            (const unsigned char *d, size_t n, unsigned char *md),
    488
            NULL,
    489
            (d, n, md),
    490
            1
    491
    )
    492
    493
    WRAP(cbor_item_t *,
    494
            cbor_build_string,
    495
            (const char *val),
    496
            NULL,
    497
            (val),
    498
            1
    499
    )
    500
    501
    WRAP(cbor_item_t *,
    502
            cbor_build_bytestring,
    503
            (cbor_data handle, size_t length),
    504
            NULL,
    505
            (handle, length),
    506
            1
    507
    )
    508
    509
    WRAP(cbor_item_t *,
    510
            cbor_build_bool,
    511
            (bool value),
    512
            NULL,
    513
            (value),
    514
            1
    515
    )
    516
    517
    WRAP(cbor_item_t *,
    518
            cbor_build_negint8,
    519
            (uint8_t value),
    520
            NULL,
    521
            (value),
    522
            1
    523
    )
    524
    525
    WRAP(cbor_item_t *,
    526
            cbor_build_negint16,
    527
            (uint16_t value),
    528
            NULL,
    529
            (value),
    530
            1
    531
    )
    532
    533
    WRAP(cbor_item_t *,
    534
            cbor_load,
    535
            (cbor_data source, size_t source_size, struct cbor_load_result *result),
    536
            NULL,
    537
            (source, source_size, result),
    538
            1
    539
    )
    540
    541
    WRAP(cbor_item_t *,
    542
            cbor_build_uint8,
    543
            (uint8_t value),
    544
            NULL,
    545
            (value),
    546
            1
    547
    )
    548
    549
    WRAP(cbor_item_t *,
    550
            cbor_build_uint16,
    551
            (uint16_t value),
    552
            NULL,
    553
            (value),
    554
            1
    555
    )
    556
    557
    WRAP(cbor_item_t *,
    558
            cbor_build_uint32,
    559
            (uint32_t value),
    560
            NULL,
    561
            (value),
    562
            1
    563
    )
    564
    565
    WRAP(cbor_item_t *,
    566
            cbor_build_uint64,
    567
            (uint64_t value),
    568
            NULL,
    569
            (value),
    570
            1
    571
    )
    572
    573
    WRAP(struct cbor_pair *,
    574
            cbor_map_handle,
    575
            (const cbor_item_t *item),
    576
            NULL,
    577
            (item),
    578
            1
    579
    )
    580
    581
    WRAP(cbor_item_t **,
    582
            cbor_array_handle,
    583
            (const cbor_item_t *item),
    584
            NULL,
    585
            (item),
    586
            1
    587
    )
    588
    589
    WRAP(bool,
    590
            cbor_array_push,
    591
            (cbor_item_t *array, cbor_item_t *pushee),
    592
            false,
    593
            (array, pushee),
    594
            1
    595
    )
    596
    597
    WRAP(bool,
    598
            cbor_map_add,
    599
            (cbor_item_t *item, struct cbor_pair pair),
    600
            false,
    601
            (item, pair),
    602
            1
    603
    )
    604
    605
    WRAP(cbor_item_t *,
    606
            cbor_new_definite_map,
    607
            (size_t size),
    608
            NULL,
    609
            (size),
    610
            1
    611
    )
    612
    613
    WRAP(cbor_item_t *,
    614
            cbor_new_definite_array,
    615
            (size_t size),
    616
            NULL,
    617
            (size),
    618
            1
    619
    )
    620
    621
    WRAP(cbor_item_t *,
    622
            cbor_new_definite_bytestring,
    623
            (void),
    624
            NULL,
    625
            (),
    626
            1
    627
    )
    628
    629
    WRAP(size_t,
    630
            cbor_serialize_alloc,
    631
            (const cbor_item_t *item, cbor_mutable_data *buffer,
    632
                size_t *buffer_size),
    633
            0,
    634
            (item, buffer, buffer_size),
    635
            1
    636
    )
    637
    638
    WRAP(int,
    639
            fido_tx,
    640
            (fido_dev_t *d, uint8_t cmd, const void *buf, size_t count, int *ms),
    641
            -1,
    642
            (d, cmd, buf, count, ms),
    643
            1
    644
    )
    645
    646
    WRAP(int,
    647
            bind,
    648
            (int sockfd, const struct sockaddr *addr, socklen_t addrlen),
    649
            -1,
    650
            (sockfd, addr, addrlen),
    651
            1
    652
    )
    653
    654
    WRAP(int,
    655
            deflateInit2_,
    656
            (z_streamp strm, int level, int method, int windowBits, int memLevel,
    657
                int strategy, const char *version, int stream_size),
    658
            Z_STREAM_ERROR,
    659
            (strm, level, method, windowBits, memLevel, strategy, version,
    660
                stream_size),
    661
            1
    662
    )
    663
    664
    int __wrap_deflate(z_streamp, int);
    665
    int __real_deflate(z_streamp, int);
    666
    667
    int
    668
    __wrap_deflate(z_streamp strm, int flush)
    669
    10.8k
    {
    670
    10.8k
            if (prng_up && uniform_random(400) < 1) {
    671
    3
                    return Z_BUF_ERROR;
    672
    3
            }
    673
            /* should never happen, but we check for it */
    674
    10.8k
            if (prng_up && uniform_random(400) < 1) {
    675
    15
                    strm->avail_out = UINT_MAX;
    676
    15
                    return Z_STREAM_END;
    677
    15
            }
    678
    679
    10.8k
            return __real_deflate(strm, flush);
    680
    10.8k
    }
    681
    682
    int __wrap_asprintf(char **, const char *, ...);
    683
    684
    int
    685
    __wrap_asprintf(char **strp, const char *fmt, ...)
    686
    2.52M
    {
    687
    2.52M
            va_list ap;
    688
    2.52M
            int r;
    689
    690
    2.52M
            if (prng_up && uniform_random(400) < 1) {
    691
    6.57k
                    *strp = (void *)0xdeadbeef;
    692
    6.57k
                    return -1;
    693
    6.57k
            }
    694
    695
    2.52M
            va_start(ap, fmt);
    696
    2.51M
            r = vasprintf(strp, fmt, ap);
    697
    2.51M
            va_end(ap);
    698
    699
    2.51M
            return r;
    700
    2.52M
    }