MMIX Bug Report printf |
||
Content
|
MMIXware Versionmmix-20110831Bug ReportedInitial: 9/2/2011AuthorAndreas Scherer and Martin RuckertDescriptionFormat-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. Proposed Patch@x if (command_buf[0]==' ') printf(command_buf); @y if (command_buf[0]==' ') 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