Skip to content

tiledb_attr raises std::bad_alloc with variable length#830

Merged
johnkerl merged 4 commits into
mainfrom
kerl/two-bigs
Jun 9, 2025
Merged

tiledb_attr raises std::bad_alloc with variable length#830
johnkerl merged 4 commits into
mainfrom
kerl/two-bigs

Conversation

@johnkerl

@johnkerl johnkerl commented Jun 5, 2025

Copy link
Copy Markdown
Contributor

Fixes #828

@cgiachalis

Copy link
Copy Markdown
Contributor

It looks now that the sanitation is in two places.

@johnkerl
johnkerl requested a review from mojaveazure June 5, 2025 22:07
@cgiachalis

cgiachalis commented Jun 5, 2025

Copy link
Copy Markdown
Contributor

By removing this line fixes the issue:

attr->set_cell_val_num(static_cast<uint64_t>(ncells));

Then few lines down -> sanitises if need it and then assigns the cell value

TileDB-R/src/libtiledb.cpp

Lines 1562 to 1564 in 2e7e171

uint64_t num =
(ncells == R_NaInt) ? TILEDB_VAR_NUM : static_cast<uint64_t>(ncells);
attr->set_cell_val_num(num);

Comment thread NEWS.md Outdated
@johnkerl

johnkerl commented Jun 9, 2025

Copy link
Copy Markdown
Contributor Author

@mojaveazure ping 🙏

@johnkerl
johnkerl requested a review from cgiachalis June 9, 2025 13:24
@johnkerl
johnkerl merged commit f867249 into main Jun 9, 2025
13 checks passed
@johnkerl
johnkerl deleted the kerl/two-bigs branch June 9, 2025 14:47
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.

tiledb_attr raises std::bad_alloc with variable length

3 participants