Skip to content

Tile: tile-null-assert - #592

Merged
evaleev merged 1 commit into
masterfrom
azam/fix/tile-null-assert
Sep 24, 2026
Merged

evaleev merged 1 commit into
masterfrom
azam/fix/tile-null-assert

Conversation

@ABesharat

Copy link
Copy Markdown

Title: assert non-null in tensor()

Changes:

  • Add a TA_ASSERT in Tile::tensor() (for both overloads) to fail instead of silently dereferencing a null pimpl_. Previously this was undefined behavior on a default-constructed tile.
  • Add a test covering both overloads.

- Tile::tensor() (both overloads) now TA_ASSERTs that the Tile is not null
  instead of silently dereferencing a null pimpl_ (undefined behavior on a
  default-constructed or reset() Tile).
- Clarify Tile's null-state semantics and document tensor()'s return value
  and precondition.
- Add tests/tile.cpp (tile_suite) with a null_tile test that checks both
  tensor() overloads via BOOST_CHECK_TA_ASSERT.
@evaleev
evaleev force-pushed the azam/fix/tile-null-assert branch from f03d344 to 46cd3e5 Compare September 24, 2026 13:39
@evaleev
evaleev merged commit e15dd9e into master Sep 24, 2026
9 checks passed
@evaleev
evaleev deleted the azam/fix/tile-null-assert branch September 24, 2026 15:17
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