Skip to content

arity: short, int, or size_t #1337

@mgondan

Description

@mgondan

I encountered a runtime warning from a sanitizer for undefined behavior when I registered a foreign c function, complaining about a wrong type for the arity of my function. This seems to be inconsistent in the code (?)

pl-vmi.c, 4477: VMH_GOTO_AS_VMI(I_FEXITDET, (*f)(h0, DEF->functor->arity, &FNDET_CONTEXT));
pl-wrap.c, 258: size_t
pl-termhash.c, 525: int
foreign.doc: short

What is the correct type, size_t?

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