Skip to content

Fix silent bad codegen for vectorized meow_element() above 4 GB - #3619

Merged
Stephan T. Lavavej (StephanTLavavej) merged 6 commits into
microsoft:mainfrom
StephanTLavavej:meow_element
Apr 7, 2023
Merged

Stephan T. Lavavej (StephanTLavavej) merged 6 commits into
microsoft:mainfrom
StephanTLavavej:meow_element

Conversation

@StephanTLavavej

@StephanTLavavej Stephan T. Lavavej (StephanTLavavej) commented Apr 3, 2023

Copy link
Copy Markdown
Member

Fixes #3617.

  • Fix truncation by adding static_cast<size_t>.
    • The bug was lurking in the expression _Base + _V_pos * 16 + _H_pos, where _Base was const char *, _V_pos was unsigned int, and _H_pos was unsigned long.
  • Pre-existing: test_various_containers as we disable instructions.
  • Extract test_min_max_element_support.hpp.
  • Add GH_003617_vectorized_meow_element.
    • This uses the fast_matrix.lst (one configuration, optimized) because it takes a while and consumes a ton of memory if the usual matrix is used. (I originally tried to fuse it into VSO_0000000_vector_algorithms but that was infeasible.)

@StephanTLavavej Stephan T. Lavavej (StephanTLavavej) added the bug Something isn't working label Apr 3, 2023
Comment thread stl/src/vector_algorithms.cpp
Co-authored-by: Alex Guteniev <gutenev@gmail.com>
Comment thread stl/src/vector_algorithms.cpp
@StephanTLavavej

Copy link
Copy Markdown
Member Author

I'm speculatively mirroring this to the MSVC-internal repo - please notify me if any further changes are pushed.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

bug Something isn't working

Projects

None yet

Development

Successfully merging this pull request may close these issues.

<algorithm>: Silent bad codegen for vectorized meow_element() above 4 GB

4 participants