Skip to content

Conversation

@wegank
Copy link
Contributor

@wegank wegank commented Dec 15, 2025

In the following code taken from compute_parametrizations_non_shape_position_case:

msolve/src/fglm/fglm_core.c

Lines 1281 to 1288 in 44fbc68

else{
nmod_poly_fit_length(param->coords[nvars-2-nc],
param->elim->length-1 );
param->coords[nvars-2-nc]->length = data_bms->BMS->R1->length ;
param->coords[nvars-2-nc]->coeffs[0] = 0;
param->coords[nvars-2-nc]->coeffs[1] = 0;
}

Line 1286 causes undefined behavior when param->elim->length is less than or equal to 2. This is in particular the case for cyclic5-16.ms when run with msolve -f cyclic5-16.ms -d 4 -P 2 -l 2 -t 1 -v 2: on one of my machines, this causes a segmentation fault.

This PR, as part of #214, fixes the issue.

@mohabsafey mohabsafey merged commit bfd2340 into algebraic-solving:master Dec 15, 2025
3 checks passed
@wegank wegank deleted the non-shape-pos-fix branch December 15, 2025 17:42
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