> On Sep 14, 2019, at 14:35, Abou Al Montacir <[email protected]> wrote:
> 
> On Sat, 2019-09-14 at 12:58 +0200, Geert Stappers wrote:
>> On Sat, Sep 14, 2019 at 10:55:11AM +0200, Abou Al Montacir wrote:
>>> Actually I'm very surprised that a user space program (compiler) running on 
>>> an
>>> unprevileged account (non root) can kill the system as it happens.
>>> Does anyone know how to sandbox the command so that It does not kill the 
>>> system?
>> 
>> Good question. Make the question better by telling what the command is.
>> It might get you an answer how to sandbox it.
> The command is kind of "cc -std=gnu11 -o file.o file.c”.

If that’s your command, it’s not the linker causing the problem as that line is 
not linking. ulimit should be sufficient to restrict the memory usage of cc, 
but your other replies imply RAM exhaustion is not occurring. If it was me, I 
would try stracing the compiler at this point to figure out what it’s doing 
immediately prior to the lock up.

Reply via email to