• Patches for pmars

    From Joseph Espy@21:1/5 to All on Fri Mar 3 20:26:03 2023
    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)
  • From John Metcalf@21:1/5 to Joseph Espy on Sat Mar 4 09:04:40 2023
    On Fri, 03 Mar 2023 20:26:03 -0800, Joseph Espy wrote:

    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.

    Hi,

    Thanks for fixing these and posting a patch. I can definitely test the
    new version and upload a 0.9.5 source / binary to Koth and corewar.co.uk.
    The date and version number can be changed in global.h.

    Unfortunately, I haven't got access to upload to Sourceforge.

    Thanks,

    John

    --- SoupGate-Win32 v1.05
    * Origin: fsxNet Usenet Gateway (21:1/5)