-
Notifications
You must be signed in to change notification settings - Fork 25
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
Access violation when returing object with specific layout on MSVC #172
Comments
I've check this code on every combination of g++ 13.2 /clang++ 17.0.6, -O2 / -O0, no sanitizer / address sanitizer / thread sanitizer on Linux platform without any problems. In every case "Done" is printed and no sanitizer warning are reported. |
Is there a chance that the error is actually in cobalt? Or maybe it's better to report the case to Microsoft? The problem occurs in our project and unfortunately the current workaround is to stop using cobalt, which we would really like not to do, because it is supposed to be a very helpful library, making it easier to solve many of the problems we face. And the specificity of the project means that the code must run on packages generated using MSVC and gcc... We cannot give up the Microsoft compiler. |
I had plenty of problems with MSVC and last time I checked they had issues with improper inlining (for which I added a workaround). I however don't like to say "it's their fault" as it might be mine. I didn't get around to checking the code yet - which is why I didn't respond, sorry. |
Thanks for the answer! |
It this related to this MSVC bug? |
It might be. I added commit increasing the align here. I don't know when I get my windows builds working again, so if you get around to test it let me know. |
I couldn't figure out how to build cobalt without bootstrap and b2, so I just applied the changes from the most recent commit from the branch you provided and they don't seem to work. Still got access violation. |
Is there a chance that the mentioned bug/workaround for the MSVC bug will be fixed in the near future? |
Code:
Built on Windows 10 64-bit using MSVC 17.9.5 (cl version 19.39.33523 for x64) with following command:
Error
Error doesn't seem to happen with debug configuration.
The text was updated successfully, but these errors were encountered: