fix StackOverflowError stack walking in tails=true builds

The various Architecture::nextFrame implementations were not walking
the stack correctly when a StackOverflowError was thrown.  The
throwStackOverflow thunk is called before the frame of the most
recently called method has been fully created, and because tails=true
builds use a different calling convention, we need to treat this
situation carefully when building a stack trace or unwinding.
Otherwise, we will skip past all the java frames to the next native
frame, which is what was happening.
This commit is contained in:
Joel Dice
2014-03-14 09:59:04 -06:00
parent 73e60adeab
commit 918b7828f1
5 changed files with 33 additions and 13 deletions

View File

@ -88,7 +88,7 @@ virtual unsigned alignFrameSize(unsigned sizeInWords) = 0;
virtual void nextFrame(void* start, unsigned size, unsigned footprint,
void* link, bool mostRecent,
unsigned targetParameterFootprint, void** ip,
int targetParameterFootprint, void** ip,
void** stack) = 0;
virtual void* frameIp(void* stack) = 0;
virtual unsigned frameHeaderSize() = 0;
@ -138,4 +138,4 @@ virtual void release() = 0;
} // namespace codegen
} // namespace avian
#endif // AVIAN_CODEGEN_ARCHITECTURE_H
#endif // AVIAN_CODEGEN_ARCHITECTURE_H