Skip to content

Empty reason for "Invalid User Input" error from --restrict-function-pointer #7135

@feliperodri

Description

@feliperodri

CBMC version: 5.65.1 (cbmc-5.58.1-391-gf3f0044f5d)
Operating system: macOS Monterey 12.5.1

#include<assert.h>

int foo()
{
  return 10;
}

int bar()
{
  return 5;
}

int main()
{

  int (*fun_ptr)() = nondet_bool() ? &foo : &bar;
  assert(fun_ptr() == 10);
}

Exact command line resulting in the issue: goto-cc example.c -o example.goto && goto-instrument --restrict-function-pointer fun_ptr.function_pointer_call.1/foo example.goto example-inst.goto
What behaviour did you expect: An explanation for the misused of --restrict-function-pointer.
What happened instead:

Reading GOTO program from 'example.goto'
Invalid User Input
Option: --restrict-function-pointer
Reason:

Metadata

Metadata

Assignees

No one assigned

    Labels

    awsBugs or features of importance to AWS CBMC usersbugpending merge

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions