New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
8275405: Linking error for classes with lambda template parameters and virtual functions #6030
Conversation
…d virtual functions
/label hotspot build |
|
@stefank The |
Webrevs
|
make/hotspot/lib/JvmMapfile.gmk
Outdated
# number of exported symbols below that limit. | ||
# | ||
# Some usages of C++ lambdas require the vftable symbol of classes that use | ||
# the lambda type as a template parameter. The usage of those classes wont |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
# the lambda type as a template parameter. The usage of those classes wont | |
# the lambda type as a template parameter. The usage of those classes won't |
@stefank This change now passes all automated pre-integration checks. After integration, the commit message for the final commit will be:
You can use pull request commands such as /summary, /contributor and /issue to adjust it as needed. At the time when this comment was updated there had been 5 new commits pushed to the
Please see this link for an up-to-date comparison between the source branch of this pull request and the
|
Thanks for reviewing! |
Going to push as commit 09f5235.
Your commit was automatically rebased without conflicts. |
We encountered the following linking error when trying to build Generational ZGC on Windows:
I narrowed this down to a simple reproducer, which doesn't link when built through the HotSpot build system:
I found that we have a line in our make files that filters out symbols that contain the string vftable (though it checks the mangled name, so a bit hard to find):
The following line prints the vftable symbol if it doesn't contain the string 'type_info':
if ($$7 ~ /??_7.*@@6b@/ && $$7 !~ /type_info/) print $$7;
The printed values are added to a list of symbols that get filtered out of the mapfile, which is then passed to the linker.
I can get the code to link if I add a second exception for vftable symbols containing the string 'lambda':
if ($$7 ~ /??_7.*@@6b@/ && $$7 !~ /type_info/ && $$7 !~ /lambda/) print $$7;
I did an additional experiment where I completely removed this filtering of vftable symbols. When I did that the linker complained that we used more than 64K symbols.
Progress
Issue
Reviewers
Reviewing
Using
git
Checkout this PR locally:
$ git fetch https://git.openjdk.java.net/jdk pull/6030/head:pull/6030
$ git checkout pull/6030
Update a local copy of the PR:
$ git checkout pull/6030
$ git pull https://git.openjdk.java.net/jdk pull/6030/head
Using Skara CLI tools
Checkout this PR locally:
$ git pr checkout 6030
View PR using the GUI difftool:
$ git pr show -t 6030
Using diff file
Download this PR as a diff file:
https://git.openjdk.java.net/jdk/pull/6030.diff