-
Notifications
You must be signed in to change notification settings - Fork 244
Silent error caused by implicit conversion of SmartPointer to integer #1834
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
Comments
Contributor priority is set |
The bug is not compiler-specific, nor specific to any "compilation issue". It is a silent bug in the original C++ code, caused by the implicit conversion of In porting the SDL source to C++11, implementing most of https://github.com/smartdevicelink/sdl_evolution/blob/master/proposals/0043-upgrade-c++-standard.md, and thus being able to use It is very trivial to fix, and I thought it should be pointed out. It has already been fixed at Xevo. You must have very high standards to rate Xevo that low of a contributor!!! To see the difference, compile this code:
As you can see, the In the buggy original implementation, the |
Fixed |
@leekillough When was this fixed? Your PR is still open, and the change hasn't been merged elsewhere. |
Fixed with the merge of #1828 |
Bug Report
A SmartPointer is implicitly converted to an integer, causing undefined behavior.
In message_helper.cc line 952, the first argument should be an integer App ID, but instead is the smart pointer itself implicitly converted to an integer:
Fix submitted: #1828
Cc: @madhuy @davidswi @fronneburg
The text was updated successfully, but these errors were encountered: