Memory bug in spim: CVE-2025-29364
It is an open source project. Feel free to fix it. spim maintenance is over after 25 years.
From 10 years ago? and nothing has been done.
Thanks for the quick fix.
use control h
This issue still exists I came across it as well and had to add the break statement manually.
Hello, unfortunately I still encounter this bug. I have this trivial program that prints $a0, which is supposed to be argc: .data .text main: li $v0, 1 syscall # print $a0 li $v0, 10 syscall If this code is in /tmp/test.s, and I run spim -file /tmp/test.s arg1 arg2 arg3, it should print "4", but it prints "1". In fact, no matter how many arguments you add, it always prints "1", and if you look into $a1 (argv), it's always an array with 1 element, a pointer to the last argument passed. I see revision...
In mac console user input does not display
Creating files with syscall 13 is accidentally platform specific
Mac packaging cleanups
Changelog
Fixing documentation.
Fix website
Cleanup for release.
Cannot build `spim`
Fixed. Didn't realize that clang-format sorted includes alphabetically and broke Makefiles....
Formatting with clang-format
Reformat code to modern standards (google) but do not sort include files.
Backout changes 755 and 756 because reformating broke make
Misc changes
Cannot build `spim`
Reformat with clang-format to bring to modern standard
Sorry about this problem. The text fields use the webengine for rendering so I need to find out accessibility is not enabled for that component. Next release.
Accessibility problem
You need to load a program into spim that has a function (its entry point) called "main" (as in C, Python, ....).
help me
QtSpim Freezes after loading a .f file on MacBook Air
No. That type of problem is difficult to diagnose. I'd try running the file on another machine. If that one hangs, send me the file. Otherwise, uninstall and reinstall spim.
QtSpim Freezes after loading a .f file on MacBook Air
Fix null dereference with partial load on non-instruction
Thanks! It is fixed in the next release.
Null memory reference when writing to memory location without instruction.
Fix null dereference with partial load on non-instruction
Yes, when I release the next version -- probably a while since the changes so far are pretty minor (e.g. version numbers) and it is a lot of work rebuilding the releases .
Thanks! Will you be updating the MSI that's out there with this updated change or will you be waiting for more changes to include it with?
Dear James Larus, thank you for the feedback. Best, Pablo.
PC-relative addressing mode
spim does not simulate the branching behavior of actual MIPS processors (with a delayed branch) because it was far too difficult for student to write assembly code by hand that way. However, if you use the -bare flag, you'll get a simulation of the actual processor, delayed branches and all. You can also use the -delayed-branch flag if that is all you want.
PC-relative addressing mode
Version incorrect on Windows MSI
Yup, sorry about that. Version numbers are scattered in far too many places....
Update version number
Version incorrect on Windows MSI
Simulator Continues After Close
Looks like a bug in Qt. quitOnLastWindowClosed (https://doc.qt.io/qt-5/qguiapplication.html#quitOnLastWindowClosed-prop) indicates that the application should quit when the last (ie main) window is closed.
Simulator Continues After Close
$ spim -f program.s arg1 Cannot open file (NULL) More details in https://stackoverflow.com/questions/72116237/how-do-you-enter-command-line-arguments-in-spim Thanks for taking the time
SPIM (CLI) command line args bug
Thanks, I've fixed this bug for the next release.
spim did not properly parse command line arguments
Can you provide an example how you caused this error? I can't see where a break would fix anything.
SPIM (CLI) command line args bug
QtSpim on Linux uses user locale to parse sources, breaking floating point constants parsing
Yes, that's silly that they documented it and didn't fix it.
Fix LOCALE on Linux
QtSpim on Linux uses user locale to parse sources, breaking floating point constants parsing
Help message for `-assemble` is incorrect
Yes, this was a mistake. Thanks for reporting it.
Error message for -assemble option was wrong.
Help message for `-assemble` is incorrect
Release 9.1.23
Changes to compile on Linux (bit rot)
Delete unnecessary files
Changes to build and install on Windows (bit rot)
Changes for 9.1.23 on MacOS
OK, I finally figured out how to display the version in the Finder (spacebar) there are 3 ways: • use the Get Info (Command-I) • use Column View • use QuickLook (Spacebar) depending on the method the display can be slightly different so its best of both CFBundleVersion and CFShortVersionString are correct to ensure a consistent output.
QtSpim 0.9.20 claims to be version 0.9.18 in macOS Finder
OK, I finally figured out how to display the version in the Finder (spacebar), and yes it is wrong. I'll fix it. Sorry about that; too much of MacOS is undocumented.
SYSCALL 12 is read_char, which reads one character from the input stream. ALL of the characters on the input are returned. Some programs need to see end-of-line characters such as \n. If you are not interested in white space characters, filter them out.
SYSCALL 12 read_char doesn't handle newline from line-buffered stdin correctly
Eliminate compiler warnings.
cli spim --quiet option
Fixed in spim (not QtSpim which has lots of other spew).
Surpress load file message with -quiet
I will provide sample code to reproduce once I am not on a phone.