Skip to content

OPENSSL_rdtsc inconsistently defined and used #3125

Closed

Description

@paulidale

The OPENSSL_rdtsc internal function is used inconsistently. It isn't declared by any header file, instead it is declared in various C files as returning unsigned long, unsigned long long and size_t:

File Declared Return Type
test/siphash_internal_test.c unsigned long long
test/modes_internal_test.c size_t
test/poly1305_internal_test.c unsigned long long
crypto/armcap.c unsigned long
crypto/sparcv9cap.c unsigned long
crypto/rand/md_rand.c unsigned long long

I've not looked at the assembly files that implement this function to see if there are any extra alternatives.

OPENSSL_rdtsc is also a rather x86/x64 flavoured name given the number of architectures this is function implemented for. OPENSSL_cycle_count perhaps?

Activity

  1. added a commit that references this issue on Nov 21, 2017
    0a789ba
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions