Why does tail call only unwind the current stack frame instead of resetting the current stack?

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



Hi,

The function check_max_stack_depth (https://elixir.bootlin.com/linux/latest/source/kernel/bpf/verifier.c#L3574) is used to ensure the stack size is no greater than 8KB.

The stack can only grow over 8KB because of tail calls as they only unwind the current stack frame. I wonder why not make tail call reset the stack since what was on the stack

will never be used again?


Thanks




[Index of Archives]     [Linux Samsung SoC]     [Linux Rockchip SoC]     [Linux Actions SoC]     [Linux for Synopsys ARC Processors]     [Linux NFS]     [Linux NILFS]     [Linux USB Devel]     [Video for Linux]     [Linux Audio Users]     [Yosemite News]     [Linux Kernel]     [Linux SCSI]


  Powered by Linux