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 panic occuring from improper bitmap size #3023

Merged
merged 2 commits into from
Aug 15, 2017
Merged

Fix panic occuring from improper bitmap size #3023

merged 2 commits into from
Aug 15, 2017

Conversation

dadgar
Copy link
Contributor

@dadgar dadgar commented Aug 14, 2017

This PR fixes an allignment calculation when determining the bitmap
size.

Fixes #3008

This PR fixes an allignment calculation when determining the bitmap
size.

Fixes #3008
@@ -264,7 +264,7 @@ func newAllocNameIndex(job, taskGroup string, count int, in allocSet) *allocName

// bitmapFrom creates a bitmap from the given allocation set and a minimum size
// maybe given. The size of the bitmap is as the larger of the passed minimum
// and t the maximum alloc index of the passed input (byte aligned).
// and the maximum alloc index of the passed input (byte alligned).
Copy link
Member

Choose a reason for hiding this comment

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

You spelled aligned right the first time :)

if max < minSize {
max = minSize
} else if max > minSize && max%8 == 0 {
Copy link
Member

Choose a reason for hiding this comment

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

Why doesn't this apply when max == minSize?

@dadgar dadgar merged commit 47be9b5 into master Aug 15, 2017
@dadgar dadgar deleted the b-bitmap branch August 15, 2017 19:27
@github-actions
Copy link

I'm going to lock this pull request because it has been closed for 120 days ⏳. This helps our maintainers find and focus on the active contributions.
If you have found a problem that seems related to this change, please open a new issue and complete the issue template so we can capture all the details necessary to investigate further.

@github-actions github-actions bot locked as resolved and limited conversation to collaborators Mar 26, 2023
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Nomad 0.6.0 nomad crashes
2 participants