-
Enhancement
-
Resolution: Fixed
-
P2
-
9
-
b20
-
generic
-
generic
A number of compiler and linker switches are available which enable compile and/or runtime checks of certain memory native operations. Some other switches render static data read-only so that errors which would cause overwrite can be detected. These switches can be enabled for debug builds
The rationale behind the implementation is as follows. For the initial phase of JDK 9 I would like to:
For release (aka product) enable compile time checks for builds. This was done inJDK-8030350
For fast debug builds we can enable linker protections (relro, now) and static compile time bounds checks (FORTIFY_SOURCE=1). Some or all of these might be moved to the release builds as well because they have zero or very minimal runtime or executable size cost.
For slow debug builds we can enable full runtime bounds checks and full stack protection (FORTIFY_SOURCE=2 -fprotect-stack).
Enabling the additional protections in debug builds will help us find bugs in our native code and we don't care *as much* about footprint and performance. (fastdebug is already 40% larger and 20% slower than release). Since many engineers already do their personal builds in fastdebug or slowdebug mode for testing this will provide good opportunity to shake out any problems with the options while not impacting release builds.
The rationale behind the implementation is as follows. For the initial phase of JDK 9 I would like to:
For release (aka product) enable compile time checks for builds. This was done in
For fast debug builds we can enable linker protections (relro, now) and static compile time bounds checks (FORTIFY_SOURCE=1). Some or all of these might be moved to the release builds as well because they have zero or very minimal runtime or executable size cost.
For slow debug builds we can enable full runtime bounds checks and full stack protection (FORTIFY_SOURCE=2 -fprotect-stack).
Enabling the additional protections in debug builds will help us find bugs in our native code and we don't care *as much* about footprint and performance. (fastdebug is already 40% larger and 20% slower than release). Since many engineers already do their personal builds in fastdebug or slowdebug mode for testing this will provide good opportunity to shake out any problems with the options while not impacting release builds.
- relates to
-
JDK-8047734 gcc/g++ -Og is harmful to the debugging experience.
-
- Resolved
-
-
JDK-8047321 Hotspot debug builds with clang are broken
-
- Resolved
-
-
JDK-8047952 hotspot fastdebug builds broken on fedora 19 after JDK-8047734
-
- Resolved
-
-
JDK-8050803 misuse of _FORTIFY_SOURCE
-
- Resolved
-
-
JDK-8145427 [aix] xlc: wrong flag used to switch off optimization
-
- Resolved
-
-
JDK-8130017 use _FORTIFY_SOURCE in gcc fastdebug builds
-
- Resolved
-
(1 relates to)