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 memory safety issue in LightEpoch class #3

Merged
merged 1 commit into from Aug 20, 2018
Merged

fix memory safety issue in LightEpoch class #3

merged 1 commit into from Aug 20, 2018

Conversation

zeebo
Copy link
Contributor

@zeebo zeebo commented Aug 18, 2018

The constant kTableSize is the same as Thread::kMaxNumThreads: https://github.com/Microsoft/FASTER/blob/9c9d3e4c86f8e83c505290cf9f0baed549d3943b/cc/src/core/light_epoch.h#L120

The constructor allows one to specify a size but defaults to kTableSize: https://github.com/Microsoft/FASTER/blob/9c9d3e4c86f8e83c505290cf9f0baed549d3943b/cc/src/core/light_epoch.h#L140-L146

In Initialize, we set the table_ to an allocation based on the size: https://github.com/Microsoft/FASTER/blob/9c9d3e4c86f8e83c505290cf9f0baed549d3943b/cc/src/core/light_epoch.h#L153-L158

These methods loop over the table_ based on Thread::kMaxNumThreads instead of the appropriate size: https://github.com/Microsoft/FASTER/blob/9c9d3e4c86f8e83c505290cf9f0baed549d3943b/cc/src/core/light_epoch.h#L296-L318

Copy link
Contributor

@jahunter-m jahunter-m left a comment

Choose a reason for hiding this comment

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

Good change; thanks.

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

Successfully merging this pull request may close these issues.

None yet

2 participants