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

fix modulo zero #46

Conversation

psychocoderHPC
Copy link
Member

Modulo zero is not allowed and results in an arithmetic error.

This is the first error I hit on my system with the example 1_resource. The dev branch is still not working on my laptop but this fixes one problem, other are under investigation.

…l/topic-chunkedlist-delete

fix memory leak
Copy link
Member

@michaelsippel michaelsippel left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

If n_workers is 0 , we shouldnt be able to create an Allocator since the default constructor shall give the allocator of the current worker. Now that worker_id is initialized with 0 even though n_workers is also zero will cause an invalid memory access whenever allocate is called because the vector containing the allocators ( in WorkerPool ) does not have 0 as a valid index

@psychocoderHPC psychocoderHPC mentioned this pull request Dec 12, 2023
@psychocoderHPC
Copy link
Member Author

The reason why I run into the issue I tried to fix with this PR is #47. The example was not implemented correctly.

@psychocoderHPC psychocoderHPC marked this pull request as draft December 12, 2023 11:07
@psychocoderHPC
Copy link
Member Author

I set this PR for now to draft maybe it is not required anymore.

@psychocoderHPC
Copy link
Member Author

not required it was solved with #47

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

Successfully merging this pull request may close these issues.

2 participants