Re: [PATCH] Add a check avoid segfault.

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

 



On 2013-01-11 01:39, majianpeng wrote:
> 
>> On 2013-01-10 12:36, majianpeng wrote:
>>> If new_size was zero or realloc failed, it would be segment fault.
>>> So add a check.
>>
>> It's a drop in the bucket, fio basically does not alloc failure
>> checking. It'd be nice to improve on that, but you'd need a lot more
>> than the below to get near fixing that.
>>
>> -- 
>> Jens Axboe
>>
> yes, why did i sent this patch?Because i set nrfiles=-1,fio would be segfault.
> I viewed the code about judging nrfiles, the code did not check this condition.
> Anthor case can cause this bug if nrfiles=0xffffffff.
> 
> There are many parameters like nrfiles.So they should do same check.
> Maybe add those check is better rather than check alloc fail or success?

OK, you should have mentioned that. Segfaults that are easily caused by
invalid parameters being specified should of course be fixed.

-- 
Jens Axboe

--
To unsubscribe from this list: send the line "unsubscribe fio" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at  http://vger.kernel.org/majordomo-info.html


[Index of Archives]     [Linux Kernel]     [Linux SCSI]     [Linux IDE]     [Linux USB Devel]     [Video for Linux]     [Linux Audio Users]     [Yosemite News]     [Linux SCSI]

  Powered by Linux