RFR: JDK-8198243: Add build time check for global operator new/delete in object files
kim.barrett at oracle.com
Fri Mar 2 23:35:50 UTC 2018
> On Mar 2, 2018, at 4:18 PM, Erik Joelsson <erik.joelsson at oracle.com> wrote:
> Here is a new version of this patch, reworked in several ways. It now supports gcc, clang and solstudio. It uses nm instead of objdump, which is more readily available in all our current build environments. The check now uses mangled symbol names for all toolchain types which makes things considerably faster. I also added a check for only finding symbols classified as undefined. Otherwise we get false positives in operator_new.o in debug builds.
> I left the objdump addition to the devkit in there because it's a good thing to have anyway for compare.sh.
> Webrev: http://cr.openjdk.java.net/~erikj/8198243/webrev.02/
> I have run this patch against current jdk/jdk and jdk/hs in Mach5. In jdk/jdk the build fails as expected on Solaris, Linux and Mac and in jdk/hs, where the fixes we are detecting are present, all builds succeeds.
This looks good, with the same caveat as Coleen that I’m not a build expert. Thanks, Erik.
More information about the hotspot-runtime-dev