Skip to content
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

test: missing vtable in test when LTO is enabled #28053

Closed
wants to merge 1 commit into from

Conversation

AdamMajer
Copy link
Contributor

Issue: #28026

Checklist
  • make -j4 test (UNIX), or vcbuild test (Windows) passes
  • tests and/or benchmarks are included
  • documentation is changed or added
  • commit message follows commit guidelines

@nodejs-github-bot nodejs-github-bot added the test Issues and PRs related to the tests. label Jun 4, 2019
@addaleax
Copy link
Member

addaleax commented Jun 4, 2019

I’ll try to test it out later today, but maybe it would keep the test working if we don’t implicitly mark the virtual dtor as inline?

diff --git a/test/addons/uv-handle-leak/binding.cc b/test/addons/uv-handle-leak/binding.cc
index 221a12843231..4718ccc9f317 100644
--- a/test/addons/uv-handle-leak/binding.cc
+++ b/test/addons/uv-handle-leak/binding.cc
@@ -15,9 +15,11 @@ void CloseCallback(uv_handle_t* handle) {}
 
 class ExampleOwnerClass {
  public:
-  virtual ~ExampleOwnerClass() {}
+  virtual ~ExampleOwnerClass();
 };
 
+ExampleOwnerClass::~ExampleOwnerClass() {}
+
 ExampleOwnerClass example_instance;
 
 void LeakHandle(const FunctionCallbackInfo<Value>& args) {

@AdamMajer
Copy link
Contributor Author

@addaleax I'll try that now and will let you know.

@AdamMajer
Copy link
Contributor Author

Indeed, now it passes with GCC 9.1.1 and LTO. Can you add your change? I'll close this PR as unneeded.

@AdamMajer AdamMajer closed this Jun 4, 2019
@addaleax
Copy link
Member

addaleax commented Jun 4, 2019

@AdamMajer Done! #28057

@AdamMajer AdamMajer deleted the fix_lto_test branch June 5, 2019 08:25
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
test Issues and PRs related to the tests.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants