I don't think this can be handled. unlike malloc where something like sbrk, a system call is used internally, this is no system call where you can check the return value, but upto the OS to decide a process can have a larger stack or not and can crash if the OS decides that this process cannot have more stack storage.
For further actions, you may consider blocking this person and/or reporting abuse
Does Zig will systematically panic in case of memory allocation failure ?
Or is there a way to handle the error ?
I don't think this can be handled. unlike
malloc
where something likesbrk
, a system call is used internally, this is no system call where you can check the return value, but upto the OS to decide a process can have a larger stack or not and can crash if the OS decides that this process cannot have more stack storage.