On Thu, 13 Nov 2025 05:58:25 GMT, Kim Barrett <[email protected]> wrote:

>> 8369187: Add wrapper for <new> that forbids use of global allocation and 
>> deallocation functions
>> 
>> Please review this change that adds `cppstdlib/new.hpp` as a wrapper for
>> including `<new>`. All existing inclusions of `<new>` are changed to include
>> the new wrapper.
>> 
>> In additional to including `<new>`, this wrapper also provides deprecation
>> declarations to prevent the use of some facilities by HotSpot code.
>> 
>> However, those deprecations need to be conditionalized to not apply to 
>> gtests,
>> so this change also adds a macro definition provided by the build system for
>> use in detecting that a header is being included by a gtest.
>> 
>> Testing: mach5 tier1
>
> Kim Barrett has updated the pull request with a new target base due to a 
> merge or a rebase. The pull request now contains three commits:
> 
>  - Merge branch 'master' into wrap-stdlib-new
>  - further conditionalize deprecation of hardare interference sizes
>  - add wrapper for <new>

I added to globalDefinitions.hpp deprecating declarations for some of the
implicitly declared allocation and deallocation functions. This provides
better coverage for the usage poisoning.

-------------

PR Comment: https://git.openjdk.org/jdk/pull/28250#issuecomment-3537249708

Reply via email to