summaryrefslogtreecommitdiff
path: root/compiler/optimizing/code_generator.h
diff options
context:
space:
mode:
author Santiago Aboy Solanes <solanes@google.com> 2024-02-05 13:42:46 +0000
committer Treehugger Robot <android-test-infra-autosubmit@system.gserviceaccount.com> 2024-02-05 14:47:29 +0000
commitbc8361da52b7a8d876abcc163f59dad3eb07b005 (patch)
tree4ef641d6de9ed3d360dcbd8fcb7cfe168b5b6439 /compiler/optimizing/code_generator.h
parentddd9953796c8ea316abd2034d12d2ba843af06fe (diff)
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
Diffstat (limited to 'compiler/optimizing/code_generator.h')
-rw-r--r--compiler/optimizing/code_generator.h4
1 files changed, 4 insertions, 0 deletions
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<kArenaAllocCodeGenerator> {
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_; }