Fix intermittent bus errors in portable pocketfft op on macOS#17378
Fix intermittent bus errors in portable pocketfft op on macOS#17378
Conversation
🔗 Helpful Links🧪 See artifacts and rendered test results at hud.pytorch.org/pr/pytorch/executorch/17378
Note: Links to docs will display an error until the docs builds have been completed. ❌ 2 New Failures, 1 Unrelated FailureAs of commit 84e941d with merge base 2a12f1f ( NEW FAILURES - The following jobs have failed:
BROKEN TRUNK - The following job failed but were present on the merge base:👉 Rebase onto the `viable/strict` branch to avoid these failures
This comment was automatically generated by Dr. CI and updates every 15 minutes. |
This PR needs a
|
| # portable aligned_alloc in pocketfft stores metadata at ptr[-1], which | ||
| # conflicts with ASAN's heap redzone and causes intermittent bus errors. This | ||
| # patch uses posix_memalign instead, which is ASAN-compatible. | ||
| set(POCKETFFT_DIR "${EXECUTORCH_ROOT}/third-party/pocketfft") |
There was a problem hiding this comment.
should we land this upstream instead of having this patch, changing code on the fly?
cc @mergennachin
There was a problem hiding this comment.
Yeah, let's try upstreaming to https://github.com/mreineck/pocketfft
There was a problem hiding this comment.
I've put up a PR here: mreineck/pocketfft#28, but should it not land in pocketfft for some reason, should we not patch in ET given we're distributing the buggy software?
This PR applies pocketfft patch for ASAN-compatible aligned_alloc on POSIX systems. The portable aligned_alloc in pocketfft stores metadata at ptr[-1], which conflicts with ASAN's heap redzone and causes intermittent bus errors. This patch uses posix_memalign instead, which is ASAN-compatible.