Skip to content

Possible type mismatch for runtime functions #175

Description

@m-carrasco

Hi,

This is a follow-up of issue #83.

compiler/Runtime.cpp defines the signature of the runtime functions injected by the compiler. I've noticed that in many cases, such as_sym_push_path_constraint, a boolean-like parameter is defined in LLVM using a 1-bit integer (int1T):

  pushPathConstraint =
      import(M, "_sym_push_path_constraint", voidT, ptrT, int1T, intPtrType);

However, the actual C definitions are not defined using a 1-bit integer:

void _sym_push_path_constraint(SymExpr constraint, int taken,
                               uintptr_t site_id) 

I think this mismatch between the LLVM and the C version is causing the behavior explained in #83 . If that is the case, any other runtime function using a 1-bit integer could have the same issues. I just wanted to confirm this before working on a possible fix.

Best,
Manuel

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Fields

    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions