Hello everybody,
For a while I've maintained my own patches for pmars 0.9.2 to work around whatever bugs I've discovered. Today I was running unpatched pmars 0.9.4 with stock standard gcc and it segfaulted on "pmars -h". I finally decided to pick out the changes worth
uploading and share a patched pmars 0.9.4.
The full source is here:
https://github.com/base0x10/pmars-archive/tree/master/pmars-patched
And a standalone patch file is here:
https://gist.github.com/base0x10/b61e8d2fb6fe9a56519a1f2069b5e588
Is anyone interesting in eventually cutting a pmars 0.9.5 release? And if so, is John Metcalf the right person to chat with?
I've kept the changes very small.
* Buffer overflow in clparse. This is the one I found today.
* Out of bounds read in asm.c. This one is unlikely to cause a mis-compilation or crash but still worth fixing.
* Use int rather than short for scores. A short usually overflows when running with "-P -s 55440"
I also wrote a makefile for clang and had to rename the variable `round` to `round_num` since clang is a bit less permissive about redefining things.
Before upstreaming, I'd want to test it on a few more platforms and write a changelog. There's also approximately a million memory leaks but I think they're all in the initialization logic and parsing/assembly.
Joseph Espy
--- SoupGate-Win32 v1.05
* Origin: fsxNet Usenet Gateway (21:1/5)