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

Addresses test failures in release mode #75

Merged
merged 2 commits into from
May 26, 2020
Merged

Conversation

brawner
Copy link
Contributor

@brawner brawner commented May 22, 2020

These tests were behaving differently under release mode than debug mode, which is how they were originally tested and evaluated. I'm not entirely sure of the full cause of the issue or why it worked in debug mode but not release. As far as I can tell the functions defined in test_type_support.c and test_type_support.cpp were simple void functions, but after loading their libraries type_support_dispatch called those functions and assigned their result to a pointer which was then returned, and that always returned null on gcc release. Even stranger, printing out the address of sym with std::cout in type_support_dispatch allowed the test to pass. It seems likely to me that the original code was causing undefined behavior and gcc's optimizations caused a different result than debug mode.

  • Linux Build Status
  • Linux-aarch64 Build Status
  • macOS Build Status
  • Windows Build Status

Signed-off-by: Stephen Brawner stephenbrawner@verbsurgical.com

@brawner brawner requested a review from cottsay May 22, 2020 00:00
@brawner brawner self-assigned this May 22, 2020
@brawner
Copy link
Contributor Author

brawner commented May 22, 2020

@brawner
Copy link
Contributor Author

brawner commented May 22, 2020

CI on release mode:

  • Linux Build Status
  • Linux-aarch64 Build Status
  • macOS Build Status
  • Windows Build Status

Signed-off-by: Stephen Brawner <stephenbrawner@verbsurgical.com>
@brawner
Copy link
Contributor Author

brawner commented May 22, 2020

Force pushed fix for uncrustify:

Build Status

Signed-off-by: Stephen Brawner <stephenbrawner@verbsurgical.com>
@brawner brawner merged commit 6f81672 into master May 26, 2020
@delete-merged-branch delete-merged-branch bot deleted the brawner/fix-tests branch May 26, 2020 21:12
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

3 participants