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

SIMD, TEST: Workaround for misaligned stack GCC BUG ABI on WIN64 #18795

Merged
merged 1 commit into from
Apr 17, 2021

Conversation

seiko2plus
Copy link
Member

related to #18330

This patch fixes the segfault error for GCC SIMD module builds on WIN64,
the problem occurs when GCC aligned load the AVX registers from stack pointer with 128-bit alignment.

Error log:

2021-04-15T22:12:46.9466187Z Fatal Python error: Segmentation fault
2021-04-15T22:12:46.9466732Z 
2021-04-15T22:12:46.9467298Z Current thread 0x0000000800000010 (most recent call first):
2021-04-15T22:12:46.9468593Z   File "/usr/lib/python3.7/site-packages/numpy/core/tests/test_simd.py", line 122 in _load_b
2021-04-15T22:12:46.9470318Z   File "/usr/lib/python3.7/site-packages/numpy/core/tests/test_simd.py", line 132 in test_operators_logical
2021-04-15T22:12:46.9472364Z   File "/usr/lib/python3.7/site-packages/_pytest/python.py", line 183 in pytest_pyfunc_call
2021-04-15T22:12:46.9474373Z   File "/usr/lib/python3.7/site-packages/pluggy/callers.py", line 187 in _multicall
2021-04-15T22:12:46.9475619Z   File "/usr/lib/python3.7/site-packages/pluggy/manager.py", line 87 in <lambda>
2021-04-15T22:12:46.9477491Z   File "/usr/lib/python3.7/site-packages/pluggy/manager.py", line 93 in _hookexec
2021-04-15T22:12:46.9478966Z   File "/usr/lib/python3.7/site-packages/pluggy/hooks.py", line 286 in __call__
2021-04-15T22:12:46.9480639Z   File "/usr/lib/python3.7/site-packages/_pytest/python.py", line 1641 in runtest
2021-04-15T22:12:46.9482799Z   File "/usr/lib/python3.7/site-packages/_pytest/runner.py", line 162 in pytest_runtest_call
2021-04-15T22:12:46.9484519Z   File "/usr/lib/python3.7/site-packages/pluggy/callers.py", line 187 in _multicall
2021-04-15T22:12:46.9486606Z   File "/usr/lib/python3.7/site-packages/pluggy/manager.py", line 87 in <lambda>
2021-04-15T22:12:46.9488076Z   File "/usr/lib/python3.7/site-packages/pluggy/manager.py", line 93 in _hookexec

  This patch fixes the segfault error for GCC SIMD module builds on WIN64,
  the problem occurs when GCC aligned load the AVX registers(256-bit) from stack
  pointer with 128-bit alignment.
@seiko2plus seiko2plus added 00 - Bug 05 - Testing component: SIMD Issues in SIMD (fast instruction sets) code or machinery labels Apr 16, 2021
@charris charris merged commit a1b8d3c into numpy:main Apr 17, 2021
@charris
Copy link
Member

charris commented Apr 17, 2021

Thanks Sayed.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
00 - Bug 05 - Testing component: SIMD Issues in SIMD (fast instruction sets) code or machinery
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants