-
Notifications
You must be signed in to change notification settings - Fork 26
Feature/cord 2025q4 #105
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
base: develop
Are you sure you want to change the base?
Feature/cord 2025q4 #105
Changes from all commits
bc091d4
2011dda
ec4426f
e0b3fc2
40c402a
852b295
2c85db5
825bb0b
b3d875b
4c8365a
038d7db
7098b22
834fbd2
7c5522d
5afe9ca
fa309a5
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
| Original file line number | Diff line number | Diff line change | ||||||||||||||||||||||||||||||||||||
|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
|
|
@@ -678,7 +678,7 @@ BspTemplateBranchLoadBranchData | |||||||||||||||||||||||||||||||||||||
| if (!bSucc) | ||||||||||||||||||||||||||||||||||||||
| return FALSE; | ||||||||||||||||||||||||||||||||||||||
|
|
||||||||||||||||||||||||||||||||||||||
| pBrData->type = (BSP_TEMPLATE_BRANCH_TYPE)ucType; | ||||||||||||||||||||||||||||||||||||||
| pBrData->type = (BSP_TEMPLATE_OPERATOR)ucType; | ||||||||||||||||||||||||||||||||||||||
|
||||||||||||||||||||||||||||||||||||||
| pBrData->type = (BSP_TEMPLATE_OPERATOR)ucType; | |
| pBrData->type = (BSP_TEMPLATE_BRANCH_TYPE)ucType; |
Copilot
AI
Apr 16, 2026
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.
pBrData->type is declared as BSP_TEMPLATE_BRANCH_TYPE (see bspeng_co_interface.h), but it’s being assigned by casting to BSP_TEMPLATE_OPERATOR. This mixes two unrelated enums and can produce invalid type values, breaking the subsequent switch. Please cast ucType to BSP_TEMPLATE_BRANCH_TYPE (or validate the byte value before assignment).
| pBrData->type = (BSP_TEMPLATE_OPERATOR)ucType; | |
| switch (ucType) | |
| { | |
| case BspBranch_eBranch: | |
| case BspBranch_eString: | |
| case BspBranch_eNumber: | |
| case BspBranch_eReal: | |
| case BspBranch_eVar: | |
| case BspBranch_eArrayDim: | |
| case BspBranch_eEmpty: | |
| case BspBranch_eArrayItem: | |
| case BspBranch_eApiParams: | |
| pBrData->type = (BSP_TEMPLATE_BRANCH_TYPE)ucType; | |
| break; | |
| default: | |
| return FALSE; | |
| } |
| Original file line number | Diff line number | Diff line change | ||||||||||||||||||||
|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
|
|
@@ -253,9 +253,17 @@ AnscXmlDomNodeRemove | |||||||||||||||||||||
| { | ||||||||||||||||||||||
| AnscXmlWarning | ||||||||||||||||||||||
| ( | ||||||||||||||||||||||
| #ifdef _64BIT_ARCH_SUPPORT_ | ||||||||||||||||||||||
| "The child node queue of XML node '%s' is corrupted.cookie1= %p\n", | ||||||||||||||||||||||
| #else | ||||||||||||||||||||||
| "The child node queue of XML node '%s' is corrupted.cookie1= 0x%.8X\n", | ||||||||||||||||||||||
| #endif | ||||||||||||||||||||||
| (char *)pXmlNode->ChildNodeQueueLock, | ||||||||||||||||||||||
| #ifdef _64BIT_ARCH_SUPPORT_ | ||||||||||||||||||||||
| (void*)pNameAttr->StringData | ||||||||||||||||||||||
| #else | ||||||||||||||||||||||
| (unsigned int)pNameAttr->StringData | ||||||||||||||||||||||
|
Comment on lines
261
to
+265
|
||||||||||||||||||||||
| (char *)pXmlNode->ChildNodeQueueLock, | |
| #ifdef _64BIT_ARCH_SUPPORT_ | |
| (void*)pNameAttr->StringData | |
| #else | |
| (unsigned int)pNameAttr->StringData | |
| (char *)pNameAttr->StringData, | |
| #ifdef _64BIT_ARCH_SUPPORT_ | |
| (void*)pXmlNode->ChildNodeQueueLock | |
| #else | |
| (unsigned int)pXmlNode->ChildNodeQueueLock |
Copilot
AI
Apr 2, 2026
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.
Same argument ordering issue as above: the warning format expects %s for the node name and %p/hex for the cookie/lock value, but the call passes (char*)pXmlNode->AttributesListLock for %s and pNameAttr->StringData for the pointer/hex placeholder. Swap these to match the format string and use correct casts.
| (char *)pXmlNode->AttributesListLock, | |
| #ifdef _64BIT_ARCH_SUPPORT_ | |
| (void*)pNameAttr->StringData | |
| #else | |
| (unsigned int)pNameAttr->StringData | |
| (char *)pNameAttr->StringData, | |
| #ifdef _64BIT_ARCH_SUPPORT_ | |
| (void*)pXmlNode->AttributesListLock | |
| #else | |
| (unsigned int)pXmlNode->AttributesListLock |
Copilot
AI
Apr 16, 2026
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.
Same argument-order issue for the cookie2 warning: the %s placeholder should receive the node name (pNameAttr->StringData), but pXmlNode->AttributesListLock is currently passed as the string. This can lead to invalid memory reads/crashes in the warning path. Please fix the argument order and use a cookie format that matches the cookie’s type.
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.
CORD_ENABLED adds new references to cord_* APIs, but the build system here only appends -DCORD_ENABLED to CFLAGS; there’s no library detection/linking (e.g., AC_CHECK_LIB / pkg-config) and WITH_CORD_SUPPORT isn’t referenced elsewhere. As-is,
--enable-cordis likely to compile but fail to link (undefined references) or not propagate link flags to the relevant targets. Please add proper dependency checks and wire the conditional into Makefile.am to add the required include/lib flags.