1. 14 Jun, 2016 6 commits
    • Eli Fidler's avatar
      fix undefined double to uint64_t cast · c52cec7e
      Eli Fidler authored
      note that std::numeric_limits<uint64_t>::max() and
      std::numeric_limits<int64_t>::max() aren't exactly representable in a
      double, so we need to be strictly less to be definitely lossless
      
      UBSAN gave during Value.IsLosslessDouble test:
      include/rapidjson/document.h:955:42: runtime error: value 1.84467e+19 is outside the range of representable values of type 'unsigned long'
      c52cec7e
    • Eli Fidler's avatar
      avoid shift out-of-range error · 05f0592b
      Eli Fidler authored
      UBSAN gave in Regex.Unicode test:
      include/rapidjson/encodings.h:157:28: runtime error: shift exponent 32 is too large for 32-bit type 'int'
      05f0592b
    • Eli Fidler's avatar
      avoid shift out-of-range error · 9dcf51c3
      Eli Fidler authored
      UBSAN gave during Reader.ParseNumber_FullPrecisionDouble test:
      include/rapidjson/internal/strtod.h:149:11: runtime error: shift exponent 46 is too large for 32-bit type 'int'
      9dcf51c3
    • Eli Fidler's avatar
      avoid division by zero, which is undefined behavior · df9b45a6
      Eli Fidler authored
      UBSAN gave:
      runtime error: division by zero
      df9b45a6
    • Eli Fidler's avatar
      avoid signed-integer underflow, which is undefined behavior · 760ea431
      Eli Fidler authored
      maybe these tests should just be deleted?
      
      UBSAN gave:
      runtime error: signed integer overflow: -9223372036854775808 - 1 cannot be represented in type 'long'
      runtime error: signed integer overflow: -9223372036854775808 - 2 cannot be represented in type 'long'
      760ea431
    • Eli Fidler's avatar
      avoid signed-integer overflow, which is undefined behavior · be1eedf8
      Eli Fidler authored
      UBSAN gave for test/unittest/itoatest.cpp:87:
      runtime error: signed integer overflow: 4611686018427387904 * 2 cannot be represented in type 'long'
      be1eedf8
  2. 13 Jun, 2016 11 commits
  3. 10 Jun, 2016 4 commits
  4. 08 Jun, 2016 1 commit
  5. 23 May, 2016 1 commit
  6. 20 May, 2016 1 commit
    • Michael Thon's avatar
      Allow options for writing and parsing NaN/Infinity · 135da7ab
      Michael Thon authored
      This adds kWriteNanAndInfFlag to Writer to allow writing of nan,
      inf and -inf doubles as "NaN", "Infinity" and "-Infinity",
      respectively, and kParseNanAndInfFlag to Reader to allow parsing
      of "NaN", "Inf", "Infinity", "-Inf" and "-Infinity". This is part
      of issue #36, adding optional support for relaxed JSON syntax.
      135da7ab
  7. 17 May, 2016 2 commits
  8. 11 May, 2016 4 commits
  9. 10 May, 2016 3 commits
  10. 09 May, 2016 5 commits
  11. 29 Apr, 2016 1 commit
  12. 27 Apr, 2016 1 commit