Skip to content

Shared library globals cause unrelated functions to appear in value-flow due to common memory regions in MSSA #1799

@hadi81

Description

@hadi81

Hello,

I am analyzing value-flow using SVF’s MSSA/SVFG and I am observing some imprecision caused by shared memory regions created from library globals.

Scenario

Consider the following simplified case:
Glob1 -> Func1 Glob2 -> Func2

However, both Func1 and Func2 call a common library function that internally uses some shared global variables.

For example:

Glob1 → Func1 → LibraryFunc → LibGlobal Glob2 → Func2 → LibraryFunc → LibGlobal

Because the library uses global variables internally, the MSSA construction creates memory regions that include these library globals.

Observation

When I inspect the MSSA dump, I see that:

  • Func1 and Func2 share some memory regions
  • These regions correspond to globals used inside the library
  • As a result, both Func1 and Func2 appear in the value-flow of Glob1 through MR nodes, even though only Func1 actually affects Glob1.

I actually don't want Func2 to appear under Glob1 and Func1 to appear under Glob2.
Any suggestions?

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions