This is the mail archive of the
mailing list for the glibc project.
[Bug malloc/25194] malloc.c: do_set_mxfast incorrectly casts the mallopt value to an unsigned
- From: "carlos at redhat dot com" <sourceware-bugzilla at sourceware dot org>
- To: glibc-bugs at sourceware dot org
- Date: Sat, 16 Nov 2019 00:31:17 +0000
- Subject: [Bug malloc/25194] malloc.c: do_set_mxfast incorrectly casts the mallopt value to an unsigned
- Auto-submitted: auto-generated
- References: <firstname.lastname@example.org/bugzilla/>
--- Comment #5 from Carlos O'Donell <carlos at redhat dot com> ---
(In reply to Carlos O'Donell from comment #4)
> (In reply to Andreas Schwab from comment #3)
> > There is nothing wrong with the range checking, it's just that the first
> > condition is redundant.
> The original range check was in mallopt to detect a negative mxfast value
> and return 0 as a result (mallopt failure). We no longer do that range
> detection in mallopt, so negative mxfast values don't cause mallopt to fail
Not just negative, but out of range, and return a failure. Now mallopt always
succeeds. This is a change in semantics from the previous code and I didn't
notice it during review.
You are receiving this mail because:
You are on the CC list for the bug.