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

CI updates #1947

Merged
merged 7 commits into from Mar 27, 2024
Merged

CI updates #1947

merged 7 commits into from Mar 27, 2024

Commits on Mar 21, 2024

  1. Update CI platform selection

    - Windows 2022
    - GCC 13
    - macOS 13
    
    Signed-off-by: Erik Boasson <eb@ilities.com>
    eboasson committed Mar 21, 2024
    Copy the full SHA
    545a0da View commit details
    Browse the repository at this point in the history
  2. Fix false pos on null deref in serdata_from_ser

    Leaving out a lot of details in the actual code, this:
    
         serdata_x_from_ser (... const struct ddsi_rdata *fragchain ...)
         {
      (1)  assert (fragchain->min == 0);
      (2)  while (fragchain)
             fragchain = fragchain->nextfrag;
    
    triggered a warning from the gcc 13.1 static analyzer that fragchain was
    tested for a null pointer at (2) after having dereferenced it already
    at (1).  Clearly this is because the function is not annotated as
    required a non-null fragchain on input.
    
    This commit adds these non-null annotation (and some "warn unused
    result" ones) on the ddsi_serdata_... functions.  The cases where this
    resulted in new warnings have also been updated.
    
    Signed-off-by: Erik Boasson <eb@ilities.com>
    eboasson committed Mar 21, 2024
    Copy the full SHA
    b5fab5a View commit details
    Browse the repository at this point in the history
  3. Minor changes for gcc analyzer

    * We don't care about malloc failures in "dynsub", asserting the result is not a null
      pointer pacifies the analyzer
    
    * The roundtrip example had an "interesting" way of updating the statistics object that
      caused a false-positive leak warning from the analyzer. The warning disappears by
      simply eliminating the interesting bit
    
    * Some false positives on leaking file descriptors in TCP support code
    
    * Ouput buffer size in snprintf that was flagged as potentially too small (which it is
      true if the integer being printed can have any valid value, but it can't)
    
    * Some warnings related to possible malloc failures in ucunit
    
    Signed-off-by: Erik Boasson <eb@ilities.com>
    eboasson committed Mar 21, 2024
    Copy the full SHA
    804a067 View commit details
    Browse the repository at this point in the history
  4. GCC analyzer dislikes non-null arg as loop var

    This despite the variable getting reassigned by a potentially null pointer. Using a
    separete variable solves the problem and is arguably better style.
    
    Signed-off-by: Erik Boasson <eb@ilities.com>
    eboasson committed Mar 21, 2024
    Copy the full SHA
    999f532 View commit details
    Browse the repository at this point in the history
  5. Copy the full SHA
    91ebf87 View commit details
    Browse the repository at this point in the history
  6. Allow some warnings for gcc 13.0 and 13.1

    There are false positive warnings for
    
    - stringop-overflow
    - array-bounds
    
    that don't seem to be suppressible using Pragmas.  From what I can tell, they occur on gcc
    13.1 but not gcc 13.2.  Sadly, gcc 13.1 is the latest version of gcc that is available on
    Ubuntu 22.04, so this would imply being stuck on a really old gcc version in the CI where
    we use -Werror.
    
    This commit prevents these two warnings from being treated as errors, but only if it is
    gcc 13.0 or gcc 13.1.  That way the risk of not treating them as errors should be
    minimized.
    
    Signed-off-by: Erik Boasson <eb@ilities.com>
    eboasson committed Mar 21, 2024
    Copy the full SHA
    4d28bcb View commit details
    Browse the repository at this point in the history
  7. Copy the full SHA
    b91b1c1 View commit details
    Browse the repository at this point in the history