Displaying 2 results from an estimated 2 matches for "red_zone_".
Did you mean:
red_zone
2020 Nov 12
2
LLVM X86 MachineBasicBlock inserting push and pop instructions causes segmentation fault
Hello,
I am working on a project where I need to insert some logic before each
machine basic block.
In particular, it involves setting some global variables and calling a
function. I'm able to add the instructions and verify they get added, but
when the compiled program runs, it stops with a segfault.
For brevity, I'm not sharing the whole code here but basically I have a X86
2020 Nov 12
0
LLVM X86 MachineBasicBlock inserting push and pop instructions causes segmentation fault
Best guess is that you're clobbering something in the red zone.
https://en.wikipedia.org/wiki/Red_zone_(computing). It's not guarantee
that the area of the stack above the stack pointer is unused. I think you
can check if the redzone is used by checking getUsesRedZone() in
X86MachineFunctionInfo. If the red zone is used, its not safe to insert a
push/pop. I think you can turn off the red zone by...