Files
ben clayton f64f4f7837 [AutoRTFM] Prevent memory corruption with stack writes in non-scoped transactions
Assert if you attempt to perform a write to the transaction-stack while in non-scoped transaction (writes to a Closed() scope are permitted).

Code changes:

Introduce FStackRange to hold a stack pointer range.

Use FStackRange in FContext for storing the true stack range for the thread.

Add a FStackRange to each FTransaction, and use this to ensure that write records aren't added to a transaction if the address is within the transaction's stack.
By having a serparate stack per transaction we can prevent stack writes making their way to a parent transaction's write log, reducing the amount of memory that may need to be tracked and simplifying the Undo logic.

Ensuring that the write log does not contain stack writes is required for the open-memory validator.

#rb neil.henning

[CL 36005508 by ben clayton in ue5-main branch]
2024-09-04 09:09:31 -04:00

18 KiB