RFR: 8307160: [REDO] Enable the permissive- flag on the Microsoft Visual C compiler [v2]

David Holmes dholmes at openjdk.org
Mon Aug 7 06:42:44 UTC 2023


On Mon, 7 Aug 2023 06:37:21 GMT, Julian Waters <jwaters at openjdk.org> wrote:

>> We should set the -permissive- flag for the Microsoft Visual C compiler, as was requested by the now backed out [JDK-8241499](https://bugs.openjdk.org/browse/JDK-8241499). It can be done with some effort, given that the significantly stricter gcc can now compile an experimental Windows JDK as of 2023, and will serve to significantly cut down on monstrosities in ancient Windows code
>
> Julian Waters has updated the pull request with a new target base due to a merge or a rebase. The incremental webrev excludes the unrelated changes brought in by the merge/rebase. The pull request contains 22 additional commits since the last revision:
> 
>  - Mismatched declaration in D3DGlyphCache.cpp
>  - Fields in awt_TextComponent.cpp
>  - reinterpret_cast needed in AccessBridgeJavaEntryPoints.cpp
>  - Qualifiers in awt_PrintDialog.h should be removed
>  - Likewise for awt_DnDDT.cpp
>  - awt_ole.h include order issue in awt_DnDDS.cpp
>  - Revert awt_ole.h
>  - Earlier fix in awt_ole.h was not complete
>  - Merge branch 'openjdk:master' into patch-10
>  - Likewise for awt_Frame.cpp
>  - ... and 12 more: https://git.openjdk.org/jdk/compare/6432a4e7...51230f3d

src/hotspot/os/windows/symbolengine.cpp line 114:

> 112:       _capacity = (int)(sizeof(_fallback_buffer) / sizeof(T));
> 113:     }
> 114:     _p[0] = (T) '\0';

I find this use of `'\0'` quite suspicious in itself, but it is consistent with the use of `'X'` in `imprint_sentinel()`. I'm unclear what types are possible for `T` in this code.

src/hotspot/share/memory/allocation.cpp line 114:

> 112: //
> 113: 
> 114: void* AnyObj::operator new(size_t size, Arena *arena) {

Please remind us what the issue is with `throw()` as this is a change to shared code and it looks very inconsistent to remove it only for this one definition of `operator new`.

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

PR Review Comment: https://git.openjdk.org/jdk/pull/15096#discussion_r1280259660
PR Review Comment: https://git.openjdk.org/jdk/pull/15096#discussion_r1280260492



More information about the security-dev mailing list