-
Notifications
You must be signed in to change notification settings - Fork 235
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
Changing linker order will cause tests to fail #42
Comments
Can you share what compiler/architecture/build type you are seeing this with? I tried a few configurations and the tests ran without issue. Also the errors that you do see, or a sampling of the errors, would be useful as well |
Just vanilla VS2017. I guess I should re-phrase the bug and say that the test executable actually crashes. I don't think any of the bat scripts currently look for the return code. Have you tried executing it manually?
|
The scripts check the return code, and I know that it works since I discovered an issue with running the tests on the CI machines by them failing because of it. But anyway I was invoking them manually and on top of having a post-mortem debugger set up, the tests also print out a summary when they complete, so they aren't crashing for me. Could you run the tests under a debugger to see where they crash? That'll likely give the most info. One obvious difference is that you're using VS 2017. I'll try setting up VS 2017 on a separate machine to see if I get the same behavior. Otherwise, the host OS may play a role (though I'd like to believe that the link order wouldn't have an impact there...) |
Okay, I can hit this now. Seems to be happening in |
Let me know! I am also curious. Thanks for having a look! |
Ahh, okay, I see now. This is a known possible ODR violation (and in this case is an ODR violation). More info below for those interested. The TL;DR is that this is in the process of being cleaned up, but until then, Basically the "old" - and I say old even though it's still technically current - way to inject your own exception translation logic in C++/WinRT was to define This is why C++/WinRT "2.0" now has a global function pointer - I suppose that if we were motivated to fix this all of the test files could be updated to conditionally include |
how does the header inclusion affects the linker? |
It's an ODR violation - you have two different implementations of a function with the same signature. E.g. in this case |
Thinking about it more, moving the C++/WinRT tests to be its own self-contained test (e.g. |
@dunhor, we have 21168025 tracking this. I assume that will fix this once and for all. |
Seems like it. The usage needs to be conditional right now, but I'm not entirely sure that's possible. Kenny is out today so I'll try and sync up with him tomorrow. I know that C++/WinRT has |
Change cpplatest source listing to:
compile and run tests. It will fail.
The text was updated successfully, but these errors were encountered: