-
Notifications
You must be signed in to change notification settings - Fork 41
small fixes in preparation for the WAMR 2.4 upgrade #514
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
small fixes in preparation for the WAMR 2.4 upgrade #514
Conversation
The multi-user test failed "ungracefully" when errors occurred. This improves error handling and reporting (and makes it easier to follow the progression of the test). Signed-off-by: Mic Bowman <[email protected]>
Block store debug was not set for the block store library because of an incorrect reference. Fixed the reference. Signed-off-by: Mic Bowman <[email protected]>
Correct a couple of the error messages generated in the send and initialize operations of the enclave wrapper code. Signed-off-by: Mic Bowman <[email protected]>
Replace the flag for c++ v11 with c++ v17 for contract compiles. This required changes to some of the replacement definitions for memory allocation in the the contract common library. Signed-off-by: Mic Bowman <[email protected]>
Several small changes to the lmdb blockstore: * Add a flag to ensure that thread local storage is not used. This is really the critical modification in this PR as prep for WAMR upgrade. * Add thread locks to all of the low level operations; while not (theoretically) necessary, the additional locks may help with some of the reentrancy issues. * Clean up a bad variable reference in one of the debug statements Signed-off-by: Mic Bowman <[email protected]>
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Pull Request Overview
This PR contains small fixes discovered during debugging the WAMR 2.4 upgrade, focusing on error message corrections, thread safety improvements, and C++ standards updates.
- Updated error messages to correctly reflect the failing function names
- Added thread safety locks to block store operations and improved debugging
- Upgraded C++ standard from C++11 to C++17 and updated operator declarations
Reviewed Changes
Copilot reviewed 6 out of 6 changed files in this pull request and generated 3 comments.
Show a summary per file
File | Description |
---|---|
eservice/pdo/eservice/pdo_helper.py | Fixed error message function names to match actual methods |
contracts/wawaka/contract-build.cmake | Upgraded C++ standard and reorganized link options with debugging comments |
contracts/wawaka/common/Util.cpp | Updated operator new declarations and added stderr definition |
common/packages/block_store/lmdb_block_store.cpp | Added thread safety locks and improved initialization/debugging |
common/CMakeLists.txt | Fixed library name reference for debug compilation |
build/tests/multi-user.sh | Enhanced error handling and debugging output |
@@ -65,6 +67,7 @@ void operator delete(void *ptr, std::align_val_t) _NOEXCEPT | |||
} | |||
|
|||
#include <stdio.h> | |||
FILE *const stderr = NULL; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Defining stderr as NULL will cause segmentation faults when code attempts to write to stderr. Consider defining it as a valid FILE pointer or implementing a custom stderr handler.
FILE *const stderr = NULL; | |
static FILE dummy_stderr; | |
FILE *const stderr = &dummy_stderr; |
Copilot uses AI. Check for mistakes.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
in a way, we want access to stderr to fail. this is only necessary because one of the builtin libraries (wasi or wamr) references stderr in a way that requires the symbol definition.
Co-authored-by: Copilot <[email protected]> Signed-off-by: Mic Bowman <[email protected]>
Co-authored-by: Copilot <[email protected]> Signed-off-by: Mic Bowman <[email protected]>
Several small fixes to problems found while debugging the WAMR upgrade (coming).