-
Notifications
You must be signed in to change notification settings - Fork 44
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
Align and size assertion failures #92
Comments
This is not related to the assertion, but this does not sounds correct, because CString::new() will allocate a copy of the string, and then it will go out of scope because the CString is just a temporary. You need to keep the CString alive. I don't know what is causing this assert because the arguments seems alright. |
Excellent point with the illegal borrow there. Maybe the compilation didn't fail because it was just checking the Result's movability and ignored the pointer it contains. I see these asserts fail for all three arguments. The integer arg should not be failing the asserts, correct? |
What's your compiler and platform ? |
Actually, the size assertion should in theory never be triggered because there is also a compile check just before. |
I am cross-compiling on windows for linux OS using the gcc-linaro-arm-linux-gnueabihf v4.7 toolchain. rustc: 1.48.0 |
Ah, cross-compilation ... That is probably the reason. I never tried that. |
For the string "Hello World!!!", I don't have to compile any c++ code. I am just dynamically linking the shared objects which I assume have been created using the same g++ compiler. |
I have the above code snippet, where I am simply trying to call C++'s setenv method. For each of the argument passed to the macro, I see the assertion failure messages (from cpp_macros-0.5.5/src/lib.rs) of the following format.
Can some light be please shown on:
The text was updated successfully, but these errors were encountered: