[LLVMdev] setrlimit vs ulimt

Greg Fitzgerald garious at gmail.com
Thu May 29 11:44:44 PDT 2014


> execv(argv[0]) is a canonical way to restart the
> process, it's sad that the emulator interferes with that.

We have the option to emulate the instruction set or emulate the OS.
The former is lighter weight and easy to configure.  The downside is
that system calls route to the host system.  That can be useful if,
for example, the executable invokes llvm-symbolizer.

While execv(argv[0]) may be the right way to restart, this process
doesn't need to be restarted.  It needs to be configured before the
first invocation.


> Propagating ulimit setting in %run wrapper sounds wrong.

In my opinion, propagating ulimit settings in the wrapper is
consistent with whitelisting environment variables.

-Greg

On Thu, May 29, 2014 at 2:34 AM, Evgeniy Stepanov <eugenis at google.com> wrote:
> execv(argv[0]) is a canonical way to restart the process, it's sad
> that the emulator interferes with that.
>
> ulimit does not work for me because it needs to run on the device, in
> the same shell as the test binary.
> Propagating ulimit setting in %run wrapper sounds wrong.
>
>
> On Wed, May 28, 2014 at 11:43 PM, Greg Fitzgerald <garious at gmail.com> wrote:
>> Hi Evgeniy,
>>
>> This fix causes me trouble in the emulator because of the execv(argv[0]):
>>
>> http://lists.cs.uiuc.edu/pipermail/llvm-commits/Week-of-Mon-20140217/205359.html
>>
>> Instead using setrlimit from within the C++ code, can you set the
>> stack limit using ulimit on the RUN lines?  Also, should this test be
>> moved to the Posix or Linux directory?
>>
>> Thanks,
>> Greg



More information about the llvm-dev mailing list