[LTP] tst_test: Add may_kmemleak flag and annotate tests

Cyril Hrubis chrubis@suse.cz
Wed Jun 24 13:08:51 CEST 2026


Hi!
> > tst_test: Add may_kmemleak flag and annotate tests
> 
> --- [PATCH 1/13] ---
> 
> > This information was so far recoded only in the comment in the cve
> 
> Typo: "recoded" should be "recorded".
> 
> --- [PATCH 8/13] ---
> 
> > lib: tst_test: Move the iterations to struct tst_test
> 
> > -		iterations = SAFE_STRTOL(optarg, 0, INT_MAX);
> > +		tst_test->iterations = SAFE_STRTOL(optarg, 0, UINT_MAX);
> 
> safe_strtol() takes `long min, long max` parameters. On 32-bit
> systems where sizeof(long) == 4, passing UINT_MAX (4294967295U) as
> a long overflows to -1, making the valid range [0, -1]. This causes
> the range check to reject all positive values, breaking the -i
> option on 32-bit.
> 
> Should this use INT_MAX (as before) or SAFE_STRTOUL?

Good catch, indeed this should be changed to SAFE_STRTOUL()

-- 
Cyril Hrubis
chrubis@suse.cz


More information about the ltp mailing list