GH-120982: Add stack check assertions to generated interpreter code (GH-120992)

This commit is contained in:
Mark Shannon 2024-06-25 16:42:29 +01:00 committed by GitHub
parent 42b2c9d78d
commit 8f5a01707f
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
8 changed files with 448 additions and 0 deletions

View file

@ -199,6 +199,7 @@ class Stack:
number = self.base_offset.to_c()
if number != "0":
out.emit(f"stack_pointer += {number};\n")
out.emit("assert(WITHIN_STACK_BOUNDS());\n")
self.variables = []
self.base_offset.clear()
self.top_offset.clear()