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

metall manager capacity limit SEGFAULT #328

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

metall manager capacity limit SEGFAULT #328

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

Comments

@liss-h
Copy link
Contributor

liss-h commented Sep 2, 2024

The following code causes a segfault:

std::string const path{std::format("/tmp/metall-test-capacity-{}", std::random_device{}())};

metall::manager manager{metall::create_only, path, 1};
std::vector<uint64_t, metall::manager::allocator_type<uint64_t>> vec{manager.get_allocator<uint64_t>()};

for (size_t cap = 0; cap < 100'000'000; cap += 1'000'000) {
    vec.resize(cap);
}

Whereas it throws bad_alloc (as expected) if you immediately .resize() to 100'000'000.

@KIwabuchi
Copy link
Member

Thanks for reporting the issue. I'll investigate why bad_alloc is not thrown.

@KIwabuchi
Copy link
Member

Unfortunately, I cannot reproduce the issue on my side. I also checked Metall code but couldn't find an issue.
I'll keep investigating and let you know once I find something.

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