Skip to content
New issue

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

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

Already on GitHub? Sign in to your account

SEGFAULT through nullptr access in object_cache::priv_make_room_for_new_blocks #331

Open
liss-h opened this issue Sep 17, 2024 · 2 comments

Comments

@liss-h
Copy link
Contributor

liss-h commented Sep 17, 2024

In object_cache::priv_make_room_for_new_blocks there is an assertion that the oldest block must not be nullptr

assert(oldest_block);
.

However, this assertion is not always true which causes a segfault on one of the following lines when oldest_block is accessed.

I have not yet figured out what exactly causes this but maybe you have an idea. I will try to narrow the bug down further and comment on this issue if I find something new.

Stack trace:
grafik

@KIwabuchi
Copy link
Member

@liss-h Hmm, I'll look into that and get back to you.

@KIwabuchi
Copy link
Member

KIwabuchi commented Sep 19, 2024

Could you modify Metall's code as follows and run the program again for me?

Insert #define METALL_DISABLE_OBJECT_CACHE to

Insert the code below to

    if (!m_table[chunk_no].slot_occupancy.get(num_slots, slot_no)) {
      logger::out(logger::level::error, __FILE__, __LINE__,
                  "Duplicate deallocation.");
      return;
    }

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants