Skip to content

[Question] Running CBMC on a C file with dynamic linking and/or shared libraries #8606

Open
@a-shokri

Description

@a-shokri

Dear CBMC developers,

I have started using CBMC (6.4.1) to analyze the possibility of reaching and triggering a specific assertion in a C program. When working with a C program that includes only standard libraries or in case of non-standard library, the source code of the library is available, I can easily add the necessary paths to the command line, and CBMC works as expected. However, when the program depends on non-standard libraries via dynamic linking or shared libraries, CBMC logs multiple "no body" errors/warnings, indicating that it cannot find the implementation of certain functions.

This is problematic because if CBMC cannot resolve these functions, it cannot fully explore execution paths from the entry point to potential vulnerabilities or assertions, making the results unreliable.

My question is: apart from standard libraries, does CBMC always require access to the source files of all dependencies for the entry-point function's program? In other words, is there a way to introduce shared or pre-compiled libraries to CBMC without providing the source code of the dependencies?

Thank you in advance.

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions