patch-tests_memdbg_py 1.0 KB

1234567891011121314151617181920212223242526272829303132333435
  1. $OpenBSD: patch-tests_memdbg_py,v 1.1 2017/01/30 11:28:54 sthen Exp $
  2. --- tests/memdbg.py.orig Fri Jan 27 14:12:10 2017
  3. +++ tests/memdbg.py Fri Jan 27 14:13:44 2017
  4. @@ -17,16 +17,11 @@ _ffi.cdef(
  5. void *realloc(void *ptr, size_t size);
  6. int CRYPTO_set_mem_functions(void *(*m)(size_t),void *(*r)(void *,size_t), void (*f)(void *));
  7. -
  8. - int backtrace(void **buffer, int size);
  9. - char **backtrace_symbols(void *const *buffer, int size);
  10. - void backtrace_symbols_fd(void *const *buffer, int size, int fd);
  11. """) # noqa
  12. _api = _ffi.verify(
  13. """
  14. #include <openssl/crypto.h>
  15. #include <stdlib.h>
  16. - #include <execinfo.h>
  17. """, libraries=["crypto"])
  18. C = _ffi.dlopen(None)
  19. @@ -39,12 +34,7 @@ def log(s):
  20. def _backtrace():
  21. - buf = _ffi.new("void*[]", 64)
  22. - result = _api.backtrace(buf, len(buf))
  23. - strings = _api.backtrace_symbols(buf, result)
  24. - stack = [_ffi.string(strings[i]) for i in range(result)]
  25. - C.free(strings)
  26. - return stack
  27. + return ""
  28. @_ffi.callback("void*(*)(size_t)")