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 crash in fmpz_poly_sub_fmpz #2102

Merged
merged 1 commit into from
Oct 27, 2024

Conversation

fingolfin
Copy link
Collaborator

@fingolfin fingolfin commented Oct 27, 2024

If poly is a zero polynomial and c the value zero then
the fmpz_neg can crash (it definitely does in Nemo).

Discovered via extended ring conformance tests in Nemo. See also Nemocas/Nemo.jl#1930

If `poly` is a zero polynomial and `c` the value zero then
the `fmpz_neg` can crash (it definitely does in Nemo).

Discovered via extended ring conformance tests in Nemo.
@albinahlback
Copy link
Collaborator

Thanks. Indeed, if we have a zero polynomial we should never dereference coeffs.

We should probably get this tested as well, though, but perhaps on a broader level (macros etc.). I'll add an issue about this. In the meantime, let's have this merged.

@albinahlback albinahlback merged commit b197a2e into flintlib:main Oct 27, 2024
10 checks passed
@fingolfin fingolfin deleted the mh/fmpz_poly_sub_fmpz-crash branch October 30, 2024 22:53
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.

2 participants