Restore <exception>
's inclusion of <malloc.h>
#4641
Merged
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
In #4626, I was a greedy kitty and added a one-line throughput improvement to make
<exception>
stop dragging in<malloc.h>
, which it totally doesn't need.Unfortunately, as
<exception>
is an ancient header, many projects have grown to assume this inclusion (over 15 found in our Real World Code test suite alone as reported by VSO-2048380; other codebases like Windows and Office are presumably similarly affected). That's too many for me to submit upstream fixes for, at least right now, and I didn't have a pressing need to make this change (unlike, say, increased deprecations where we're working towards removal). I did create chriskohlhoff/asio#1472 to fix Boost.Asio, though.I want to revert this drive-by cleanup before 17.11 Preview 2 branches for release, so that no customers will experience this theoretically righteous, logistically annoying change.
I've included a comment explaining why this unnecessary include has been retained, tagged with today's date as a subtle reminder that future maintainers/contributors could revisit the issue and attempt to do the tedious work of cleaning up the ecosystem. If anyone's eager enough to start working on that, here's the list of libraries that our RWC suite found were affected (I don't have exact files/line numbers for them, but searching for
_alloca
and related<malloc.h>
identifiers will turn up usage fairly easily):