Skip to content
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

Fix issues reported by Coverity and clear warnings #2467

Merged
merged 3 commits into from
Aug 17, 2023

Conversation

wenyongh
Copy link
Contributor

No description provided.

@@ -2642,10 +2649,6 @@ aot_resolve_stack_sizes(AOTCompContext *comp_ctx, AOTObjectData *obj_data)
goto fail;
}
}
if (addr > UINT32_MAX) {
Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Dead code, addr has been checked in L2624:

            if (strcmp(sec_name, aot_stack_sizes_section_name) || addr != 0) {
                aot_set_last_error(
                    "stack_sizes found at an unexpected location.");
                goto fail;
            }

So here addr must be 0.

@@ -275,7 +275,7 @@ os_socket_recv_from(bh_socket_t socket, void *buf, unsigned int len, int flags,
return -1;
}
}
else {
else if (src_addr) {
Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

src_addr is checked at L272, meaning it may be NULL here.

@wenyongh wenyongh merged commit e2f8721 into bytecodealliance:main Aug 17, 2023
368 checks passed
@wenyongh wenyongh deleted the fix_coverity_issues branch August 17, 2023 05:37
victoryang00 pushed a commit to victoryang00/wamr-aot-gc-checkpoint-restore that referenced this pull request May 27, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant