Skip to content
Snippets Groups Projects
  1. Apr 23, 2020
  2. Apr 20, 2020
  3. Apr 19, 2020
  4. Apr 18, 2020
  5. Apr 06, 2020
  6. Apr 03, 2020
  7. Apr 02, 2020
    • Eli Lindsey's avatar
      fix undefined behavior in resource.hpp · fc197b51
      Eli Lindsey authored
      Today, uvw triggers undefined behavior in resource.hpp:
        runtime error: downcast of address which does not point to an object of type 'uvw::FsEventHandle'
        note: object is of type 'uvw::BaseHandle'
      
      It looks like we're saving the current handle in the void* data member
      so it can be retrieved on the next callback run. This downcast to a
      derived class from its parents ctor as it's being constructed isn't
      valid.
      
      Since we're storing this as a void* anyways and all the callsites using
      it need to do their own cast on retrieval, we can instead persist the
      this pointer. For downcasting to work in all cases the Resource class
      tree needs to be leftmost in Handler's multiple inheritance.
      
      Tested by verifying that my unit tests no longer show ubsan errors and
      uvw's test suite still passes.
      fc197b51
  8. Apr 01, 2020
  9. Mar 31, 2020
  10. Mar 27, 2020
  11. Mar 25, 2020
  12. Mar 22, 2020
  13. Mar 21, 2020
  14. Mar 18, 2020
  15. Mar 16, 2020
  16. Mar 01, 2020
  17. Jan 17, 2020
Loading