Skip to content

empty class instance as method argument leads to user error

ID0001951: This issue was created automatically from Mantis Issue 1951. Further discussion may take place here.


Id Project Category View Due Date Updated
ID0001951 Frama-Clang Plug-in > Eva public 2014-11-03 2016-07-05
Reporter Jochen Assigned To virgile Resolution fixed
Priority normal Severity minor Reproducibility always
Platform frama-c-Neon-20140301+dev-stance OS - OS Version xubunto-cfe13.10
Product Version - Target Version - Fixed in Version Frama-C Aluminium

Description :

calling "frama-c -val 116.cpp" eventually leads to a user error:

[value] Done for function foo::Ctor 116.cpp:10:[value] user error: Function argument __fc_tmp_0 has unknown size. Aborting [kernel] Plug-in value aborted: invalid user input.

The error message disappears if either

  1. a variable (e.g. "int v;" after line 3) is declared inside class "foo",
  2. the call "f.cat(f);" is omitted in line 10, or
  3. the argument type of "cat" is changed to "int" in line 5 and "f" is replaced by "0" in line 10.

Apparently, the "f" in line 10 somehow causes an empty struct to be generated, which is not properly accepted.

Attachments

To upload designs, you'll need to enable LFS and have an admin enable hashed storage. More information