Skip to content

Fix std::move for std::unique_ptr with non-primitive payloads

Some template function definitions with r-value return types are not recognized in the analysis. It causes frama-clang to generate definitions with default assigns, that will often lead to invalid conditions and NON TERMINATING results.

I am currently investigating the issue in more detail and narrowed it down to the test added here. Affected functions match these preconditions:

  • function must be a template
  • function must be in a namespace
  • function must return an r-value reference a non-primitive type
  • function must be declared before the return type is defined

I am looking into frama-clang to figure out where the failure originates. All comments and feedback is welcome. Thanks!

Edited by Stefan Gränitz

Merge request reports