The loop for 'str2rlimit' iterates 'RLIM_NLIMITS' times where I assume 'RLIM_NLIMITS' is taken from '/usr/include/bits/resource.h' which is brought included in '/usr/include/sys/resource.h'. The value is '15':
__RLIMIT_NLIMITS = 15, __RLIM_NLIMITS = __RLIMIT_NLIMITS #define RLIMIT_NLIMITS __RLIMIT_NLIMITS #define RLIM_NLIMITS __RLIM_NLIMITS However that value doesn't match the value 16, which is defined in '< kernel source >/include/asm-generic/resource.h', which has the 'boot-time rlimit defaults for the init task'. The result is the comparison is never done for the last entry in the array (RLIMIT_RTTIME). I'm not sure which component/package needs fixing, 'libc6-dev' (which owns /usr/include/bits/resource.h) to match this patch, or this patch to match the kernel's definition of RLIM_NLIMITS. It seems from the raison d'etre of the patch that the latter should be done sooner.