Skip to content

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

Closed
AdamMajer wants to merge 1 commit into
nodejs:masterfrom
AdamMajer:fix_lto_test
Closed

test: missing vtable in test when LTO is enabled#28053
AdamMajer wants to merge 1 commit into
nodejs:masterfrom
AdamMajer:fix_lto_test

Conversation

@AdamMajer

Copy link
Copy Markdown
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

addaleax commented Jun 4, 2019

Copy link
Copy Markdown
Member

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
Copy Markdown
Contributor Author

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

@AdamMajer

Copy link
Copy Markdown
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

addaleax commented Jun 4, 2019

Copy link
Copy Markdown
Member

@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