Skip to content

avoid stackoverflow when passing two types that can not be promoted to a matching types in mean_hue#566

Merged
ViralBShah merged 1 commit intoJuliaGraphics:masterfrom
KristofferC:kc/stackoverflow
May 23, 2025
Merged

avoid stackoverflow when passing two types that can not be promoted to a matching types in mean_hue#566
ViralBShah merged 1 commit intoJuliaGraphics:masterfrom
KristofferC:kc/stackoverflow

Conversation

@KristofferC
Copy link
Copy Markdown
Member

The test at

@test_throws Exception mean_hue(RGB(0.1, 0.2, 0.3), RGB(0.4, 0.5, 0.6))
runs a function that stack overflows. Continuing the process after a stack overflow is not recommended and julia 1.12 prints:

Warning: detected a stack overflow; program state may be corrupted, so further execution might be unreliable.

Instead, catch if we have no match after the promote and throw a normal error.

@codecov
Copy link
Copy Markdown

codecov bot commented Feb 27, 2025

Codecov Report

All modified and coverable lines are covered by tests ✅

Project coverage is 96.75%. Comparing base (4664eb9) to head (68c8bcf).
Report is 18 commits behind head on master.

Additional details and impacted files
@@           Coverage Diff           @@
##           master     #566   +/-   ##
=======================================
  Coverage   96.75%   96.75%           
=======================================
  Files           9        9           
  Lines        1295     1296    +1     
=======================================
+ Hits         1253     1254    +1     
  Misses         42       42           

☔ View full report in Codecov by Sentry.
📢 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.

@ViralBShah
Copy link
Copy Markdown
Member

Merge?

@ViralBShah ViralBShah merged commit 4ae28bc into JuliaGraphics:master May 23, 2025
11 checks passed
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.

3 participants