First of all, if you look closely, in many of those cases it is
already checking for null. However, once you get the assertion popup, you
should be able to attach to the process with the debugger and figure out
the location of the problem from the stack trace.

Rick

On Sat, May 21, 2022 at 1:18 PM Rony G. Flatscher <rony.flatsc...@wu.ac.at>
wrote:

> While working on orexxole.cpp with debug versions of ooRexx, sometimes
> (very rarely) an assertion error popup was shown for "stricomp". It seems
> that sometimes one argument is not correct (probably NULL).
>
> Here the usages of stricmp():
>
>             if ( (pCurrBlock->memId == memId) && (pCurrBlock->invkind == 
> invKind) &&
>                  (pCurrBlock->FuncVt == funcVT) && (pCurrBlock->iParmCount == 
> iParmCount) &&
>                  (pCurrBlock->iOptParms == iOptParms) && (pszFuncName != 
> NULL) &&
>                  (stricmp(pCurrBlock->pszFuncName, pszFuncName) == 0) )
>             {
>
> ... cut ...
>                 if ( (pCurrBlock->memId == memId) && (pCurrBlock->invkind == 
> invKind) &&
>                      (pCurrBlock->FuncVt == funcVT) && 
> (pCurrBlock->iParmCount == iParmCount) &&
>                      (pCurrBlock->iOptParms == iOptParms) && (pszFuncName != 
> NULL) &&
>                      (stricmp(pCurrBlock->pszFuncName, pszFuncName) == 0) )
>                 {
> ... cut ...
>             if ( (pCurrBlock->memId == memId) && (pszConstName != NULL) &&
>                  (stricmp(pCurrBlock->pszConstName, pszConstName) == 0) )
>             {
> ... cut ...
>                 if ( (pCurrBlock->memId == memId) && (pszConstName != NULL) &&
>                      (stricmp(pCurrBlock->pszConstName, pszConstName) == 0) )
>                 {
> ... cut ...
>             if (stricmp(pFuncInfo->pszFuncName, pszFunction) == 0)
>             {
> ... cut ...
>         if (stricmp(pConstInfo->pszConstName, pszConstName) == 0)
>         {
> ... cut ...
>                                 if (!stricmp(pFuncInfo->pszFuncName,szBuffer))
>                                 {
> ... cut ...
>         ((stricmp(pszFunction, "AT") == 0) ||
>          (stricmp(pszFunction, "[]") == 0)) )
>     {
> ... cut ...
>     if (stricmp(classID, "ARRAY") == 0)
>     {
> ... cut ...
>
>
> The question is whether to ignore (only an error in assertions?) or fix it
> by prepending tests that check before stricmp() whether the "argument from
> the structure/from the variable !=NULL && stricmp(...)".
>
> ---rony
>
>
> _______________________________________________
> Oorexx-devel mailing list
> Oorexx-devel@lists.sourceforge.net
> https://lists.sourceforge.net/lists/listinfo/oorexx-devel
>
_______________________________________________
Oorexx-devel mailing list
Oorexx-devel@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/oorexx-devel

Reply via email to