Skip to content

atomic_init instead of memset in c_factors.c #9

@pdav

Description

@pdav

Hi,
in my understanding, initialization of tally in line 75 of c_factors.c is not C11-compliant:

  • if initialized with memset, length of area to set to 0 should be sizeof (_Atomic long int) and not sizeof (long int)
  • I bet that initializing an atomic variable with memset gives an undefined behaviour according to C11. I think you should individually initalize each array element with atomic_init

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions