Skip to content

Add ASAN CI build workflow#2914

Open
Alex-PLACET wants to merge 22 commits into
xtensor-stack:masterfrom
Alex-PLACET:add_asan_ci_build
Open

Add ASAN CI build workflow#2914
Alex-PLACET wants to merge 22 commits into
xtensor-stack:masterfrom
Alex-PLACET:add_asan_ci_build

Conversation

@Alex-PLACET

@Alex-PLACET Alex-PLACET commented May 6, 2026

Copy link
Copy Markdown
Contributor

Description

Add ASAN tests and fix ASAN errors

@Alex-PLACET Alex-PLACET requested a review from JohanMabille May 7, 2026 08:28
@Alex-PLACET Alex-PLACET marked this pull request as ready for review May 7, 2026 08:28
@codspeed-hq

codspeed-hq Bot commented May 20, 2026

Copy link
Copy Markdown
Contributor

Merging this PR will not alter performance

⚠️ Different runtime environments detected

Some benchmarks with significant performance changes were compared across different runtime environments,
which may affect the accuracy of the results.

Open the report in CodSpeed to investigate

⚡ 1 improved benchmark
❌ 4 regressed benchmarks
✅ 250 untouched benchmarks

Warning

Please fix the performance issues or acknowledge them on CodSpeed.

Performance Changes

Mode Benchmark BASE HEAD Efficiency
Simulation xshape_initializer[std\:\:array<std\:\:size_t, 4>] 151.7 ns 180.8 ns -16.13%
Simulation xexpression_cube[256] 608.7 µs 709 µs -14.15%
Simulation xexpression_cube[64] 41.6 µs 48.1 µs -13.4%
Simulation xexpression_cube[32] 13.2 µs 15 µs -11.64%
Simulation xshape_access[std\:\:array<std\:\:size_t, 4>] 154.4 ns 125.3 ns +23.28%

Tip

Investigate this regression by commenting @codspeedbot fix this regression on this PR, or directly use the CodSpeed MCP with your agent.


Comparing Alex-PLACET:add_asan_ci_build (34032e5) with master (aa2b3ef)

Open in CodSpeed

@Alex-PLACET Alex-PLACET self-assigned this Jun 24, 2026
Comment thread include/xtensor/core/xiterator.hpp Outdated
static std::remove_reference_t<reference> sentinel{};
return sentinel;
}
}

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

I don't think we should add this check here, since it severely hurts performance. Besides, this class is a "private" tool used for implementing iterators, not a public API, so we can guarantee in out code that we never call this operator when m_it is null. Besides, this behavior is consistent with the implementation of standard iterators:

using vector_type = std::vector<int>;
vector_type::iterator it;
std::cout << *it << std::endl; // Segfault

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.

2 participants