MMIX Bug Report printf
Bug ReportedInitial: 9/2/2011
AuthorAndreas Scherer and Martin Ruckert
DescriptionFormat-less uses of printf() produces warnings by some C compilers. Two change files by Andreas Scherer fix this: mmix-sim.ch and mmix-pipe.ch. The originals are hosted in the local branch of https://github.com/ascherer/mmix/.
The warnings uncover a bug in mmix-sim.w on line 3099, where the command_buf is taken from an input file. If the input file contains substrings like "%s" or "%d", it can crash mmix or cause other unexpected behaviour.
@x if (command_buf==' ') printf(command_buf); @y if (command_buf==' ') printf("%s",command_buf); @z
DiscussionThe patch as given above is now part of the sources.
Please help to keep this site up to date! If you want to point out important material or projects that are not listed here, if you find errors or want to suggest improvements, please send email to