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

refactor placement-new to avoid gcc-9.4 __builtin_memset bug #335

Draft
wants to merge 7 commits into
base: develop
Choose a base branch
from

Conversation

wrtobin
Copy link
Contributor

@wrtobin wrtobin commented Oct 1, 2024

No description provided.

{
new ( ptr + i ) T( std::forward< ARGS >( args )... );
Copy link
Contributor Author

@wrtobin wrtobin Oct 1, 2024

Choose a reason for hiding this comment

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

ptr + i seems to be what was triggering it, switching to instead using a ptr of type T as the loop variable seems to avoid the bug

Copy link
Contributor Author

@wrtobin wrtobin Oct 1, 2024

Choose a reason for hiding this comment

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

I was wondering if in some circumstance with the constructor arguments known as compile-time constants, it was doing enough optimizations to do some calculations down here constexpr (effectively), but something used in the calculation was uninitialized. After looking around, nothing used in the calculation isn't initialized in the boolean constructor chain, soooo idunno.

@wrtobin wrtobin changed the title refactor placement-new to avoid gcc-9.5 __builtin_memset bug refactor placement-new to avoid gcc-9.4 __builtin_memset bug Oct 1, 2024
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.

3 participants