1. 01 Oct, 2019 3 commits
    • Nick Mathewson's avatar
      Fix a crash bug in max_u16_in_sl() · 2b825a1a
      Nick Mathewson authored
      The documentation for this function says that the smartlist can
      contain NULLs, but the code only handled NULLs if they were at the
      start of the list.
      
      We didn't notice this for a long time, because when Tor is run
      normally, the sequence of msg_id_t is densely packed, and so this
      list (mapping msg_id_t to channel_id_t) contains no NULL elements.
      We could only run into this bug:
        * when Tor was running in embedded mode, and starting more than once.
        * when Tor ran first with more pubsub messages enabled, and then
          later with fewer.
        * When the second run (the one with fewer enabled pubsub messages)
          had at least some messages enabled, and those messages were not
          the ones with numerically highest msg_id_t values.
      
      Fixes bug 31898; bugfix on 47de9c7b
      in 0.4.1.1-alpha.
      2b825a1a
    • Nick Mathewson's avatar
      Add a test for max_u16_in_sl(). · 34bbdaf5
      Nick Mathewson authored
      This test does not currently pass, because of bug 31898.
      34bbdaf5
    • Nick Mathewson's avatar
      Rename max_in_sl to max_in_u16_sl, and expose it as STATIC. · f17591b8
      Nick Mathewson authored
      Since we want to make this function slightly more visible for testing
      purposes, it needs a better name.
      f17591b8
  2. 19 Sep, 2019 1 commit
  3. 18 Sep, 2019 8 commits
  4. 17 Sep, 2019 9 commits
  5. 12 Sep, 2019 2 commits
  6. 11 Sep, 2019 1 commit
    • Nick Mathewson's avatar
      madvise: tolerate EINVAL and ENOSYS when minherit fails · 0891a31a
      Nick Mathewson authored
      These errors can occur if we are built on a system with support for
      madvise(MADV_NOFORK) but then we are run on a system whose kernel
      does not support that flag.
      
      If the error is something that we don't tolerate at all, we now log
      it before crashing.
      
      Fixes bug 31696.  I am calling this a bugfix on 0.4.1.1-alpha, where
      we actually started using the map_anon code.
      
      This is similar to, but not the same as, the fix for #31570.
      0891a31a
  7. 10 Sep, 2019 2 commits
    • Nick Mathewson's avatar
      pf: when extracting an IPv6 address, make sure we got an IPv6 address · 97f7efa9
      Nick Mathewson authored
      Our code assumes that when we're configured to get IPv6 addresses
      out of a TRANS_PF transparent proxy connection, we actually will.
      But we didn't check that, and so FreeBSD started warning us about a
      potential NULL pointer dereference.
      
      Fixes part of bug 31687; bugfix on 0.2.3.4-alpha when this code was
      added.
      97f7efa9
    • Nick Mathewson's avatar
      fp.c: Suppress float-conversion warnings on FreeBSD. · 51475aee
      Nick Mathewson authored
      We used to do this on Windows only, but it appears to affect
      multiple platforms when building with certain versions of GCC, and a
      common pattern for defining the floating-point classifier functions.
      
      Fixes part of 31687. I'm calling this a bugfux on 31687, when we
      started suppressing these warnings on Windows.
      51475aee
  8. 09 Sep, 2019 2 commits
  9. 06 Sep, 2019 1 commit
  10. 05 Sep, 2019 9 commits
  11. 04 Sep, 2019 1 commit
  12. 02 Sep, 2019 1 commit
    • Nick Mathewson's avatar
      madvise: tolerate EINVAL and ENOSYS · 52342327
      Nick Mathewson authored
      These errors can occur if we are built on a system with support for
      madvise(MADV_NOFORK) but then we are run on a system whose kernel
      does not support that flag.
      
      If the error is something that we don't tolerate at all, we now log
      it before crashing.
      
      Fixes bug 31570.  I am calling this a bugfix on 0.4.1.1-alpha, where
      we actually started using the map_anon code.
      52342327