jdiez17 / 0x42c

An operating system for DCPU-16

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

OS can overwrite itself in memory

DMBuce opened this issue · comments

An anonymous editor on the wiki raised this issue:

Somebody should tell this person that they use JSR, but then do SET PC, SOME_ADDRESS to continue execution, and as a result the "OS" will slowly overwrite itself in memory by continually pushing addresses which are never popped from the stack (using SET PC, POP)!

The edit where this issue was raised is here. I don't have the expertise to comment on any of this; I'm just passing along the info before I remove it from the wiki page, as it doesn't really belong there.

Oh, yeah, stupid me. Fixed in last commit, thanks for pointing it out!