From bc8361da52b7a8d876abcc163f59dad3eb07b005 Mon Sep 17 00:00:00 2001 From: Santiago Aboy Solanes Date: Mon, 5 Feb 2024 13:42:46 +0000 Subject: Make sure the frame size isn't unreasonably large when compiling This CLs adds a check that we don't have an unreasonably large frame size, and bails out from the compile if we detect it. We had a similar check on RISC-V but not in other archs. Bug: 323309447 Test: art/test/testrunner/testrunner.py --host --64 --optimizing -b Change-Id: I4619dbbbc12c6e22ce335a17d15d90af8878808e --- compiler/optimizing/code_generator.h | 4 ++++ 1 file changed, 4 insertions(+) (limited to 'compiler/optimizing/code_generator.h') diff --git a/compiler/optimizing/code_generator.h b/compiler/optimizing/code_generator.h index fbb4f9e21e..c54c96c40f 100644 --- a/compiler/optimizing/code_generator.h +++ b/compiler/optimizing/code_generator.h @@ -251,6 +251,10 @@ class CodeGenerator : public DeletableArenaObject { uint32_t GetFrameSize() const { return frame_size_; } void SetFrameSize(uint32_t size) { frame_size_ = size; } + uint32_t GetMaximumFrameSize() const { + return GetStackOverflowReservedBytes(GetInstructionSet()); + } + uint32_t GetCoreSpillMask() const { return core_spill_mask_; } uint32_t GetFpuSpillMask() const { return fpu_spill_mask_; } -- cgit v1.2.3-59-g8ed1b