MMIX Bug Report printf

Table of Content


MMIXware Version


Bug Reported

Initial: 9/2/2011


Andreas Scherer and Martin Ruckert


Format-less uses of printf() produces warnings by some C compilers. Two change files by Andreas Scherer fix this: and The originals are hosted in the local branch of

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.

Proposed Patch

      if (command_buf[0]==' ') printf(command_buf);
      if (command_buf[0]==' ') printf("%s",command_buf);


The 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 email