Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Use local xorder instead of s->xorder #58

Merged
merged 3 commits into from
Mar 6, 2025

Conversation

jhunkeler
Copy link
Contributor

This addresses the >10 year old failure in test_geomap.

The local xorder variable is modified by a switch statement at the end of each yorder iteration, but the nested s->xorder loop never used xorder, so it would calculate a vindex that exceeded the upper bounds of the vzp array.

@jhunkeler jhunkeler requested a review from a team as a code owner March 6, 2025 17:14
Copy link

codecov bot commented Mar 6, 2025

Codecov Report

All modified and coverable lines are covered by tests ✅

Project coverage is 85.71%. Comparing base (05ae8ee) to head (589bba5).
Report is 5 commits behind head on master.

Additional details and impacted files
@@           Coverage Diff           @@
##           master      #58   +/-   ##
=======================================
  Coverage   85.71%   85.71%           
=======================================
  Files           1        1           
  Lines           7        7           
=======================================
  Hits            6        6           
  Misses          1        1           

☔ 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.

@mcara
Copy link
Member

mcara commented Mar 6, 2025

CC: @perrygreenfield - the only one who might know the IRAF code

@pllim
Copy link
Contributor

pllim commented Mar 6, 2025

@pllim
Copy link
Contributor

pllim commented Mar 6, 2025

Can we do a -vvv on the test log? I cannot see if the test really ran with just .....

Also makes me wonder about the remaining s->xorder usage all throughout that loop.

@jhunkeler jhunkeler mentioned this pull request Mar 6, 2025
@mcara
Copy link
Member

mcara commented Mar 6, 2025

Also makes me wonder about the remaining s->xorder usage all throughout that loop.

like where?

@pllim
Copy link
Contributor

pllim commented Mar 6, 2025

assert((bbxp - xbasis) + ncoord - 1 < ncoord * s->xorder);

if ((int) (ll + s->xorder) > maxorder) {

@pllim
Copy link
Contributor

pllim commented Mar 6, 2025

Yay!

test_c/test_c.py::test_runall[build/test_c/test_geomap] PASSED           [ 36%]

Copy link

@perrygreenfield perrygreenfield left a comment

Choose a reason for hiding this comment

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

LGTM

@jhunkeler
Copy link
Contributor Author

Thank you^^

@pllim
Copy link
Contributor

pllim commented Mar 6, 2025

:shipit:

(I cannot merge but I want to!)

@jhunkeler jhunkeler merged commit 21959be into spacetelescope:master Mar 6, 2025
19 checks passed
Copy link
Member

@mcara mcara left a comment

Choose a reason for hiding this comment

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

Risky but seems to work. Risky: because we still don't know what should be but it seems that not using xorder is causing buffer overruns

@mcara
Copy link
Member

mcara commented Mar 6, 2025

:shipit:

(I cannot merge but I want to!)

That is a safety feature

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants