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

fix segfault when interpolating on failed solution #476

Merged
merged 2 commits into from
Aug 10, 2023

Conversation

oscardssmith
Copy link
Contributor

@oscardssmith oscardssmith commented Aug 10, 2023

Fixes #458
Previously the check for whether the interpolation was being asked to extrapolate outside the time range assumed that at least two steps were taken. (otherwise t[end]-t[1] == 0). This would then cause a segfault when you actually try to do the interpolation.

Copy link

@ai-maintainer ai-maintainer bot left a comment

Choose a reason for hiding this comment

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

AI-Maintainer Review for PR - Fix segfault when interpolating on failed solution

Title and Description 👍

The Title and description are clear, concise and helpful
The title and description of the pull request are clear and concise. They effectively communicate the purpose of the changes, which is to fix the segfault issue when interpolating on a failed solution. The description provides additional context by explaining the previous check for extrapolation and how it led to the segfault.

Scope of Changes 👍

The changes are narrowly focused
The changes in this pull request are narrowly focused on resolving the specific issue of segfaults when interpolating on a failed solution. There is no indication that the author is trying to resolve multiple issues simultaneously. The changes are targeted and address the specific problem at hand.

Testing ⚠️

Testing procedures are not described
The description does not describe how the author tested the changes. It primarily focuses on explaining the issue and the fix implemented to address it. There is no mention of specific testing methodologies or procedures used by the author to validate the changes. It would be beneficial to include a brief description of the testing procedures used to validate the changes.

Code Changes 👍

The code changes are appropriate and well-implemented
The code changes appear to be appropriate and well-implemented. The added error handling prevents a segfault from occurring when trying to interpolate from a single timepoint. The changes are consistent across multiple sections of the code, indicating a thorough approach to addressing the issue.

Recommendations

Please provide a brief description of the testing procedures used to validate these changes. This will help reviewers understand how the changes have been verified and can provide confidence in the robustness of the fix.

Thank you for your contribution!

Reviewed with AI Maintainer

@codecov
Copy link

codecov bot commented Aug 10, 2023

Codecov Report

Merging #476 (308e0a9) into master (f549934) will decrease coverage by 0.35%.
The diff coverage is 50.00%.

@@            Coverage Diff             @@
##           master     #476      +/-   ##
==========================================
- Coverage   56.62%   56.28%   -0.35%     
==========================================
  Files          47       47              
  Lines        3583     3587       +4     
==========================================
- Hits         2029     2019      -10     
- Misses       1554     1568      +14     
Files Changed Coverage Δ
src/interpolation.jl 33.20% <50.00%> (+0.25%) ⬆️

... and 13 files with indirect coverage changes

📣 We’re building smart automated test selection to slash your CI/CD build times. Learn more

@ChrisRackauckas ChrisRackauckas merged commit 0bffe3e into SciML:master Aug 10, 2023
53 of 61 checks passed
@oscardssmith oscardssmith deleted the fix-interpolation-bounds branch August 10, 2023 19:54
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.

Segfault from bad @inbounds in interpolation when solve fails
2 participants