mirror of
https://github.com/corda/corda.git
synced 2025-06-18 07:08:15 +00:00
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:
@ -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
|
||||
|
Reference in New Issue
Block a user