Conversation
These options were introduced in early 2023 for an experimental mode that isolated real roots from precomputed (binary) parametrizations. That mode was removed from main() in 50b812e, but the options were kept. As a result, -F only set files->bin_file, which is never read, and left files->in_file NULL, so msolve segfaulted when reading the input file. -O, -I and -R were parsed but likewise had no effect. Drop these options, the bin_file and bin_out_file fields of files_gb, and the parametrization readers in iofiles.c that no longer have any callers. Fixes algebraic-solving#301. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Fixes #301.
Summary
The
-F,-O,-I/--isolateand-Roptions were added in early 2023 (adc7198,5c1b905,456ccf2) for an experimental mode that isolated real roots from precomputed parametrizations, read from binary (-F) or text files. That code path was removed frommain()in50b812e("several bug fixes (seg faults) + code cleaning"), but the options stayed:-F FILEonly setfiles->bin_file, which nothing reads. It also leftfiles->in_fileasNULL, soget_data_from_file(NULL, ...)crashed. For example,msolve -F input_files/bug-68.msexits with SIGSEGV.-O,-Iand-Rwere parsed into variables or fields that nothing used.-Iwas still listed in the help text.-Finput.This PR removes:
getoptionshandling, along with the unusedrefineandisolatevariables;bin_fileandbin_out_filefields offiles_gb;iofiles.cthat had no callers (get_params_from_file_bin,get_params_from_fileand their helpers).Since
-fis now the only way to give an input file, the input-file check inmain()just opensfiles->in_file.msolve -F ...now printsinvalid option -- Fand the usage text instead of crashing.isolate_real_roots_lparamanddisplay_arrays_of_real_rootsinmsolve.care also unused now, but they have external linkage, so I left them for a separate decision.Testing
make check: all 68 tests pass (macOS, LLVM clang).AI disclosure
I investigated this issue and wrote the changes with the help of Claude Code (generative AI). I reviewed and tested them.
Co-authored-by: Claude Opus 5.5 noreply@anthropic.com
🤖 Generated with Claude Code