tunables signed/unsigned bug & patch

Siddhesh Poyarekar siddhesh@gotplt.org
Thu Jan 19 18:37:00 GMT 2017


On Thursday 19 January 2017 11:52 PM, DJ Delorie wrote:
> The range check for size_t tunables was checking against
> (signed)(0xfff...fff), which is -1, so never passed (val>0 && val<-1).
> This means half the existing tunables would never work :-(
> 
> I couldn't think of a clean way to handle both signed and unsigned in
> the same function, so I split it into separate functions.
> 
> As an aside, tunables_strtoul() parses signed values but returns
> unsigned values.  Ideally that would be split out too, but that's a
> lot more code duplication.

That looks OK, but please add a ChangeLog next time.

Thanks,
Siddhesh



More information about the Libc-alpha mailing list