Uploaded image for project: 'Core Server'
  1. Core Server
  2. SERVER-21529

Sign of log severity values may get lost, depending on compiler

    XMLWordPrintable

    Details

      Description

      LogSeverity::Log().toInt() returns a possibly negative integer, which is cast into a char in several places, with the assumption that char's are signed by default. This assumption is not true for all platforms; GCC on ppc64 and s390x treats char's as unsigned by default. This causes the unit test server_options_test to fail on those platforms.

      The fix is to explicitly declare LogComponentSettings::_minimumLoggedSeverity as a signed char array.

        Attachments

          Issue Links

            Activity

              People

              Assignee:
              acm Andrew Morrow
              Reporter:
              bryanpkc Bryan Chan
              Participants:
              Votes:
              0 Vote for this issue
              Watchers:
              5 Start watching this issue

                Dates

                Created:
                Updated:
                Resolved: