Skip to content

Use flint_vsnprintf in FLINT error handling - #2317

Open
lgoettgens wants to merge 2 commits into
Nemocas:masterfrom
lgoettgens:lg/flint-error-handling
Open

Use flint_vsnprintf in FLINT error handling#2317
lgoettgens wants to merge 2 commits into
Nemocas:masterfrom
lgoettgens:lg/flint-error-handling

Conversation

@lgoettgens

Copy link
Copy Markdown
Member

instead of letting FLINT print to stdout and capturing that.

Unfortunately, we have to guess a maximum length to allocate the formatted message string. The classic approach of calling vsnprintf twice, once with a NULL buffer to obtain the length as the return value and then a second time with an allocated buffer to the exact size, does not work here, as it requires us to copy the va_list. And I don't really see a way to do that from julia.

@lgoettgens
lgoettgens requested a review from fingolfin June 15, 2026 08:37
@lgoettgens lgoettgens added the release notes: not needed PRs introducing changes that are wholly irrelevant to the release notes label Jun 15, 2026
@codecov

codecov Bot commented Jun 15, 2026

Copy link
Copy Markdown

Codecov Report

✅ All modified and coverable lines are covered by tests.
✅ Project coverage is 88.25%. Comparing base (3452249) to head (c02dfbc).
⚠️ Report is 7 commits behind head on master.

Additional details and impacted files
@@            Coverage Diff             @@
##           master    #2317      +/-   ##
==========================================
- Coverage   88.28%   88.25%   -0.03%     
==========================================
  Files         102      102              
  Lines       37842    37833       -9     
==========================================
- Hits        33408    33389      -19     
- Misses       4434     4444      +10     

☔ View full report in Codecov by Harness.
📢 Have feedback on the report? Share it here.

🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

release notes: not needed PRs introducing changes that are wholly irrelevant to the release notes

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant