See
https://github.com/Ravenbrook/mps-temporary/pull/2 for background.
Reproduction:
1. Fresh Win7 build 7601 (On x86 or x64, same result. I'm using VMware.)
2. Run the setup for Pelles C 7.00
3. Run the setup for Git (with command line option to set path) from
http://git-scm.com/download/win4. Launch Pelles C command prompt from Start menu
5. git clone
https://github.com/waywardmonkeys/mps-temporary.git6. cd mps-temporary
7. git checkout remotes/origin/pellesc (for the record, the exact hash of this repro is 86cd97995641f4606b6d2930a79cf2331a02f7b6)
8. cd code
9. pocc /Ze /O2 mps.c
C:\Users\rb\Documents\mps-temporary\code>pocc /Ze /O2 mps.c
C:\Users\rb\Documents\mps-temporary\code\arenavm.c(496): warning #2154: Unreachable code.
C:\Users\rb\Documents\mps-temporary\code\global.c(379): warning #2154: Unreachable code.
C:\Users\rb\Documents\mps-temporary\code\tract.c(146): warning #2130: Result ofcomparison is constant.
C:\Users\rb\Documents\mps-temporary\code\trace.c(759): warning #2154: Unreachable code.
C:\Users\rb\Documents\mps-temporary\code\trace.c(1074): warning #2154: Unreachable code.
C:\Users\rb\Documents\mps-temporary\code\trace.c(1172): warning #2154: Unreachable code.
C:\Users\rb\Documents\mps-temporary\code\trace.c(1246): warning #2154: Unreachable code.
C:\Users\rb\Documents\mps-temporary\code\trace.c(1651): warning #2154: Unreachable code.
C:\Users\rb\Documents\mps-temporary\code\trace.c(1652): warning #2154: Unreachable code.
C:\Users\rb\Documents\mps-temporary\code\trace.c(1653): warning #2154: Unreachable code.
C:\Users\rb\Documents\mps-temporary\code\trace.c(1654): warning #2154: Unreachable code.
C:\Users\rb\Documents\mps-temporary\code\trace.c(1655): warning #2154: Unreachable code.
C:\Users\rb\Documents\mps-temporary\code\trace.c(1653): warning #2154: Unreachable code.
C:\Users\rb\Documents\mps-temporary\code\trace.c(1585): warning #2154: Unreachable code.
C:\Users\rb\Documents\mps-temporary\code\trace.c(1651): warning #2154: Unreachable code.
C:\Users\rb\Documents\mps-temporary\code\trace.c(1585): warning #2154: Unreachable code.
C:\Users\rb\Documents\mps-temporary\code\trace.c(1660): warning #2154: Unreachable code.
C:\Users\rb\Documents\mps-temporary\code\trace.c(1585): warning #2154: Unreachable code.
C:\Users\rb\Documents\mps-temporary\code\seg.c(511): warning #2114: Local 'args' is not referenced.
C:\Users\rb\Documents\mps-temporary\code\seg.c(1131): warning #2154: Unreachable code.
C:\Users\rb\Documents\mps-temporary\code\event.c(83): warning #2130: Result of comparison is constant.
C:\Users\rb\Documents\mps-temporary\code\event.c(174): fatal error: Internal error: 'Access violation' at 0x0047b319.
We believe this is a bug in the preprocessor. We do some fairly extensive macro expansion to process the EVENT_LIST macro. We have already tried breaking this macro down into smaller pieces. This works some of the time, for some people, but not others, suggesting that it's a somewhat random buffer overrun. It might even be sensitive to which VM you're running Windows under.