This bug was discovered by Claude Opus 5.5 and reproduced on Maxima Git commit c62924c (2026-09-26) with SBCL 2.2.9.
Where: src/plot.lisp, PLOT-OPTIONS-PARSER
PLOT-OPTIONS-PARSER checks xlabel, ylabel and zlabel with #'STRING, which converts instead of testing. A number signals a Lisp type error, and a symbol is accepted and later written as set ylabel $ABC.
src/plot.lisp as described under "Fix".tests/rtest_plotoptions.mac, at the end of the file.make check, or run_testsuite(share_tests=true); in ./maxima-local), and check that the change breaks no test. Failures that also occur without the change (a run on the unchanged build shows which) are pre-existing and can be ignored.* \#5484 [xlabel,5] gives a Lisp error and [ylabel,abc] writes invalid gnuplot to ChangeLog, under "Bug fixes for numbered bugs:".Fixed by commit [1a2b3c]., with the first six characters of the commit's SHA in the brackets (git rev-parse HEAD | cut -c1-6 prints them). SourceForge links this to the commit.set_plot_option([xlabel,5]); set_plot_option([ylabel,abc]);
Before the fix:
Maxima encountered a Lisp error: 5 is not a string designator; the second call is accepted
Correct result:
Wrong argument for plot option "xlabel" (and "ylabel"). Expecting a string
In src/plot.lisp (PLOT-OPTIONS-PARSER, clause "($xlabel (setf (getf options '$xlabel)"), replace
($xlabel (setf (getf options '$xlabel)
(check-option (cdr opt) #'string "a string" 1)))
with
($xlabel (setf (getf options '$xlabel)
(check-option (cdr opt) #'stringp "a string" 1)))
In src/plot.lisp (PLOT-OPTIONS-PARSER, clause "($ylabel (setf (getf options '$ylabel)"), replace
($ylabel (setf (getf options '$ylabel)
(check-option (cdr opt) #'string "a string" 1)))
with
($ylabel (setf (getf options '$ylabel)
(check-option (cdr opt) #'stringp "a string" 1)))
In src/plot.lisp (PLOT-OPTIONS-PARSER, clause "($zlabel (setf (getf options '$zlabel)"), replace
($zlabel (setf (getf options '$zlabel)
(check-option (cdr opt) #'string "a string" 1)))
with
($zlabel (setf (getf options '$zlabel)
(check-option (cdr opt) #'stringp "a string" 1)))
Add these lines to tests/rtest_plotoptions.mac, separated from the tests before them by two empty lines:
/* Bug #5484: "[xlabel,5] gives a Lisp error and [ylabel,abc] writes invalid gnuplot" */
block ([r],
reset_plot_options (),
r: [errcatch (set_plot_option ([xlabel, 5])),
errcatch (set_plot_option ([ylabel, abc])),
errcatch (set_plot_option ([zlabel, 1/2])),
(set_plot_option ([xlabel, "t"]), get_plot_option (xlabel))],
reset_plot_options (),
r);
[[], [], [], [xlabel, "t"]]$
plot.lisp: require strings for xlabel, ylabel and zlabel
PLOT-OPTIONS-PARSER checked xlabel, ylabel and zlabel with #'STRING,
which converts instead of testing, so [xlabel, 5] signaled a Lisp error
and [ylabel, abc] wrote invalid gnuplot commands. Check with #'STRINGP.
This fixes bug #5484.
Found and fixed by Claude Opus 5.5.
Diff: