1. 18 Jun, 2019 1 commit
    • Kenton Varda's avatar
      CapabilityServerSet::getLocalServer() must wait for stream queue. · 4a4fe65c
      Kenton Varda authored
      Consider a capnp streaming type that wraps a kj::AsyncOutputStream.
      
      KJ streams require the caller to avoid doing multiple writes at once. Capnp streaming conveniently guarantees only one streaming call will be delivered at a time. This is great because it means the app does not have to do its own queuing of writes.
      
      However, the app may want to use a CapabilityServerSet to unwrap the capability and get at the underlying KJ stream to optimize by writing to it directly. However, before it can issue a direct write, it has to wait for all RPC writes to complete. These RPC writes were probably issued by the same caller, before it realized it was talking to a local cap. Unfortunately, it can't just wait for those calls it issued to complete, because streaming flow control may have made them appear to complete long ago, when they're actually still in the server's queue. How does the app make sure that the directly-issued writes don't overlap with RPC writes?
      
      We can solve this by making CapabilityServerSet::getLocalServer() delay until all in-flight stream calls are complete before unwrapping.
      
      Now, the app can simply make sure that any requests it issued over RPC in the past completed before it starts issuing direct requests.
      4a4fe65c
  2. 25 Aug, 2018 1 commit
  3. 18 Aug, 2018 1 commit
  4. 12 Aug, 2018 1 commit
  5. 30 Jun, 2018 1 commit
  6. 28 Dec, 2017 1 commit
  7. 23 Oct, 2017 1 commit
  8. 12 Oct, 2017 1 commit
    • Edward Catmur's avatar
      Avoid passing null to memcpy/memcmp/memset · dbc088d1
      Edward Catmur authored
      It is invalid to pass null as a pointer argument to memcpy/memcmp/memset, even if the count argument is zero:
      
      > Where an argument declared as size_t n specifies the length of the array for a
      function, n can have the value zero on a call to that function. Unless explicitly stated
      otherwise in the description of a particular function in this subclause, pointer arguments
      on such a call shall still have valid values [...]
      
      Detected by -fsanitize=nonnull-attribute.
      dbc088d1
  9. 03 Sep, 2017 1 commit
  10. 18 Jul, 2017 1 commit
  11. 07 Jul, 2017 1 commit
    • Edward Catmur's avatar
      Fix link errors with -fsanitize=vptr · 3713c573
      Edward Catmur authored
      [ 66%] Linking CXX executable capnpc-c++
      cd /home/edward.catmur/build/capnproto@master/c++/src/capnp && /usr/local/bin/cmake -E cmake_link_script CMakeFiles/capnpc_cpp.dir/link.txt --verbose=1
      /usr/lib64/icecc/bin/c++   -fsanitize=vptr   CMakeFiles/capnpc_cpp.dir/compiler/capnpc-c++.c++.o  -o capnpc-c++ -rdynamic libcapnp.a ../kj/libkj.a -lpthread
      libcapnp.a(layout.c++.o):(.data+0x38): undefined reference to `typeinfo for capnp::ClientHook'
      libcapnp.a(layout.c++.o):(.data+0x3b8): undefined reference to `typeinfo for capnp::ClientHook'
      collect2: error: ld returned 1 exit status
      
      $ g++ --version
      g++ (GCC) 5.4.0
      Copyright (C) 2015 Free Software Foundation, Inc.
      This is free software; see the source for copying conditions.  There is NO
      warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
      3713c573
  12. 26 Apr, 2017 1 commit
  13. 24 Apr, 2017 1 commit
  14. 21 Apr, 2017 1 commit
  15. 20 Apr, 2017 2 commits
  16. 19 Apr, 2017 2 commits
  17. 16 Apr, 2017 1 commit
  18. 11 Apr, 2017 1 commit
  19. 07 Apr, 2017 2 commits
  20. 30 Mar, 2017 4 commits
  21. 27 Mar, 2017 1 commit
  22. 24 Mar, 2017 1 commit
  23. 19 Mar, 2017 1 commit
  24. 11 Mar, 2017 1 commit
  25. 10 Mar, 2017 1 commit
  26. 09 Mar, 2017 2 commits
  27. 08 Mar, 2017 2 commits
  28. 07 Mar, 2017 2 commits
  29. 27 Feb, 2017 2 commits
  30. 26 Feb, 2017 1 commit