Skip to content
New issue

Have a question about this project? # for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “#”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? # to your account

Redundancy in the make_extra.py script #6070

Open
grom72 opened this issue Mar 27, 2024 · 0 comments
Open

Redundancy in the make_extra.py script #6070

grom72 opened this issue Mar 27, 2024 · 0 comments
Labels
Priority: 2 high Type: Bug A previously unknown bug in PMDK

Comments

@grom72
Copy link
Contributor

grom72 commented Mar 27, 2024

ISSUE: Redundancy in the make_extra.py script

Please provide a reproduction of the bug:

It seems that cflow properly identifies inline functions but in some
situations it does not parse properly functions that are used inside inline
functions:

libpmem_init() <__attribute__ ((constructor)) void libpmem_init (void) at ./src/libpmem/libpmem.c:23>:
      common_init() <inline void common_init (const char *log_prefix, const char *log_level_var, const char *log_file_var, int major_version, int minor_version) at ./src/common/pmemcommon.h:19>:
              core_init() <inline void core_init (const char *log_prefix, const char *log_level_var, const char *log_file_var, int major_version, int minor_version) at ./src/core/pmemcore.h:24>:
                      util_init()
                      core_log_init()
                      out_init()
              util_mmap_init()

In the above example util_init(), core_log_init(), out_init() are not
parsed properly. This causes a "not called" error in make_call_stacks.py
script.
Acccording to a very brife analysis all calles listed on the right-hand side
shall be added to extra_entry_points.txt but they are not required in
extra_calls.json file.
It seems all callees of inline function (in the example above: util_init(),
core_log_init(), out_init()) are not further processed. This causes
the callees of these functions to be reported as not called (an error reported
by the make_call_stacks.py script).
Adding callees of inline functions as entry points allows forcing the cflow to
entry points.

cflow fails to continue:
function A -> inline function -> inline function's callee -> STOP

forced entry point:
inline function's callee -> ...

How often bug is revealed: (always, often, rare):

Actual behavior:

Expected behavior:

Details

Additional information about Priority and Help Requested:

Are you willing to submit a pull request with a proposed change? (Yes, No)

Requested priority: (Showstopper, High, Medium, Low)

@grom72 grom72 added Priority: 2 high Type: Bug A previously unknown bug in PMDK labels Mar 27, 2024
# for free to join this conversation on GitHub. Already have an account? # to comment
Labels
Priority: 2 high Type: Bug A previously unknown bug in PMDK
Projects
None yet
Development

No branches or pull requests

1 participant