VirtualBox

Changeset 66776 in vbox for trunk/src/bldprogs


Ignore:
Timestamp:
May 4, 2017 9:52:21 AM (8 years ago)
Author:
vboxsync
svn:sync-xref-src-repo-rev:
115188
Message:

gccplugin: crash fix attempt

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/src/bldprogs/VBoxCompilerPlugInsGcc.cpp

    r62537 r66776  
    603603                            State.fMaybeNull ? "_maybe_null" : "", State.iFmt, State.iArgs);
    604604
    605                     MyCheckFormatRecursive(&State, gimple_call_arg(hStmt, State.iFmt - 1));
     605                    unsigned cCallArgs = gimple_call_num_arg(hStmt)
     606                    if (cCallArgs > State.iFmt)
     607                        MyCheckFormatRecursive(&State, gimple_call_arg(hStmt, State.iFmt - 1));
     608                    else
     609                        error_at(gimple_location(hStmt),
     610                                 "Call has only %d arguments; %s() format string is argument #%u, thus missing\n",
     611                                 cCallArgs, DECL_NAME(hFnDecl) ? IDENTIFIER_POINTER(DECL_NAME(hFnDecl)) : "<unamed>",State.iFmt);
    606612                }
    607613            }
Note: See TracChangeset for help on using the changeset viewer.

© 2025 Oracle Support Privacy / Do Not Sell My Info Terms of Use Trademark Policy Automated Access Etiquette