-
Notifications
You must be signed in to change notification settings - Fork 130
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
Assert fails in llvm::BitcodeWriter::~BitcodeWriter() during some tests #514
Comments
Use the WriteBitcodeToFile() function rather than BitcodeWriter::writeMethod() method to prevent a debugging assertion. Issue facebookresearch#514.
Hi @sogartar, thanks for the report! Without being familiar with the code, I had a bit of a hard time understanding why this assert is thrown given the lack of comments: https://github.com/llvm/llvm-project/blob/d32170dbd5b0d54436537b6b75beaf44324e0c28/llvm/lib/Bitcode/Writer/BitcodeWriter.cpp#L4370 However it seems like the problem will go away if I just swap one API call for another. I'm going to post a PR, would you mind checking if this fixes the debug build? Cheers, |
Use the WriteBitcodeToFile() function rather than BitcodeWriter::writeMethod() method to prevent a debugging assertion. Issue facebookresearch#514.
Use the WriteBitcodeToFile() function rather than BitcodeWriter::writeMethod() method to prevent a debugging assertion. Issue facebookresearch#514.
I just ran the failing tests against the PR. Here is the log LastTest.log. I noticed that this assert does not fail. The The other tests are still failing. Namely,
Most likely the other errors are unrelated to All tests "generally" pass under release build.
|
Hi @sogartar, I'm just going back over some issues. Was this one fixed? I'm not sure why I closed it :) |
This is fixed. |
Ok thanks! |
🐛 Bug
When running some of the tests and LLVM is built in debug, an assert in fails
llvm::BitcodeWriter::~BitcodeWriter()
.I encountered this when doing the CMake build PR. There LLVM could be built in debug, wheres it seems the Bazel build uses a prebuilt release version, so the assert is suppressed.
It appears in tests related to SHA.
To Reproduce
Steps to reproduce the behavior:
-DCMAKE_BUILD_TYPE=debug
as an argument during configuration.One of the errors that appears:
LastTest.log
Expected behavior
No assert should be triggered.
It may be the case that there should be no assert in the LLVM code.
Environment
Please fill in this checklist:
The text was updated successfully, but these errors were encountered: