Skip to content

lowlevel: do not expunge while the input handler is installed - #165

Open
pulchart wants to merge 1 commit into
ApolloTeam-dev:masterfrom
pulchart:wip/jpu/lowlevel-expunge
Open

pulchart wants to merge 1 commit into
ApolloTeam-dev:masterfrom
pulchart:wip/jpu/lowlevel-expunge

Conversation

@pulchart

Copy link
Copy Markdown

Init adds an input handler whose is_Data is the library base, and Expunge freed the base without removing the handler. After a low-memory flush, for example a program allocating most of the free RAM, the next key press ran LowLevelInputHandler on freed memory, walked whatever was there as ll_KBInterrupts and Cause()d a bogus node, which crashed in SoftIntDispatch.

Removing the handler needs a DoIO() to the input task, which an expunge under Forbid() must not do, so Expunge refuses while the handler is installed. Expunge also had no return value, it now returns TRUE after the cleanup.

Init adds an input handler whose is_Data is the library base, and Expunge freed the base without removing the handler. After a low-memory flush, for example a program allocating most of the free RAM, the next key press ran LowLevelInputHandler on freed memory, walked whatever was there as ll_KBInterrupts and Cause()d a bogus node, which crashed in SoftIntDispatch.

Removing the handler needs a DoIO() to the input task, which an expunge under Forbid() must not do, so Expunge refuses while the handler is installed. Expunge also had no return value, it now returns TRUE after the cleanup.

This branch has not been deployed

No deployments
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant