[LTP] [PATCH 2/2] syscalls/brk: limit the largest requesting memory to UINT_MAX

Li Zhijian lizhijian@cn.fujitsu.com
Tue Dec 12 03:56:43 CET 2017



On 12/11/2017 11:48 PM, Cyril Hrubis wrote:
> Hi!
>> sometimes(some platforms), sbrk(0) will return a huge address(e.g
>> Beg_brk_val=94392102215680), it will lead to the request a huge
>> memory by brk(size>1T) which beyonds most host memory size
> I think that the code in the setup that determines the Max_brk_byte_size
> does not make any sense to me, it seems to just multiply random value
> (the initial break addres) by 4 and uses that as a base for increment. I
> guess that it would be much better if we just choosen some multiple of
> page size for the test.

agree


>
> Also the test should be running several iterations but we run only one
> by default.
>
> All in all I think that it would be much better if we rewrote the test
> from scratch using the new test library instead of applying band aids
> to problems that are broken by design.
>
> In short, do you want to take on rewriting the test or should I do that?

it's great if you can help to rewrite it. :)

Thanks


>





More information about the ltp mailing list