Remove low-signal FileDataLoader allocation-failure tests#20469
Conversation
Summary: D109072812 added two allocation-failure unit tests to `file_data_loader_test.cpp` -- `AllocationFailureDuringLoadReturnsError` and `AllocationFailureDuringFromReturnsError` -- driven by a strong global replacement of `operator new(size_t, std::align_val_t, const std::nothrow_t&)` that returns nullptr on demand. That override broke the fbcode build (see T276843331): fbcode test binaries link jemalloc, which provides its own strong definition of the same operator-new symbol, so the second strong definition produces an `ld.lld: error: duplicate symbol` link failure (it likewise clashes with the ASAN allocator runtime). The original diff only validated the xplat/Apple target, where libc++ provides the operator-new family as weak symbols, so the breakage was not caught. These tests are also low signal: they only exercise the pre-existing `nullptr -> Error::MemoryAllocationFailed` guard, and because they replace the allocator wholesale they never actually exercise the production fix from D109072812 (switching `et_aligned_alloc` to the nothrow `operator new`). Covering that trivial guard is not worth a permanent global-operator-new override and its cross-platform build fragility. This change removes both tests and the operator-new override, reverting only the test-file additions from D109072812. The production fix from that diff -- using the nothrow `operator new` in `et_aligned_alloc` -- is retained. Applied to both the fbcode and xplat mirror copies of `file_data_loader_test.cpp`. Differential Revision: D109506462
🔗 Helpful Links🧪 See artifacts and rendered test results at hud.pytorch.org/pr/pytorch/executorch/20469
Note: Links to docs will display an error until the docs builds have been completed. ❗ 1 Active SEVsThere are 1 currently active SEVs. If your PR is affected, please view them below: ❌ 3 New Failures, 3 Unrelated FailuresAs of commit 4619249 with merge base aada6d7 ( NEW FAILURES - The following jobs have failed:
BROKEN TRUNK - The following jobs 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. |
|
@metascroy has exported this pull request. If you are a Meta employee, you can view the originating Diff in D109506462. |
This PR needs a
|
Summary:
D109072812 added two allocation-failure unit tests to
file_data_loader_test.cpp--AllocationFailureDuringLoadReturnsErrorandAllocationFailureDuringFromReturnsError-- driven by a strong globalreplacement of
operator new(size_t, std::align_val_t, const std::nothrow_t&)that returns nullptr on demand.
That override broke the fbcode build (see T276843331): fbcode test binaries link
jemalloc, which provides its own strong definition of the same operator-new
symbol, so the second strong definition produces an
ld.lld: error: duplicate symbollink failure (it likewise clashes with the ASAN allocator runtime). Theoriginal diff only validated the xplat/Apple target, where libc++ provides the
operator-new family as weak symbols, so the breakage was not caught.
These tests are also low signal: they only exercise the pre-existing
nullptr -> Error::MemoryAllocationFailedguard, and because they replace theallocator wholesale they never actually exercise the production fix from
D109072812 (switching
et_aligned_allocto the nothrowoperator new).Covering that trivial guard is not worth a permanent global-operator-new
override and its cross-platform build fragility.
This change removes both tests and the operator-new override, reverting only the
test-file additions from D109072812. The production fix from that diff -- using
the nothrow
operator newinet_aligned_alloc-- is retained. Applied to boththe fbcode and xplat mirror copies of
file_data_loader_test.cpp.Differential Revision: D109506462