This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
==30814== Process terminating with default action of signal 2 (SIGINT) | |
==30814== at 0x4035143: __syscall6 (syscall_arch.h:59) | |
==30814== by 0x4035143: syscall (syscall.c:18) | |
==30814== by 0x52B4518: uv__epoll_wait (linux-syscalls.c:321) | |
==30814== by 0x52B2E1C: uv__io_poll (linux-core.c:271) | |
==30814== by 0x52A719A: uv_run (core.c:352) | |
==30814== by 0x11C1E5: ch_run (chirp.c:1060) | |
==30814== by 0x11BB8E: ch_chirp_run (chirp.c:872) | |
==30814== by 0x10DC9E: main (func_etest.c:336) |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Fuzzing my C networking library with valgrind memcheck and hypothesis takes long, but finds bugs. | |
Leaked allocations: | |
0x4f199e0 0x4f19ab0 | |
/outside/src/util.c:141: Assert failed: There is a memory leak | |
==5859== | |
==5859== HEAP SUMMARY: | |
==5859== in use at exit: 3,719 bytes in 11 blocks | |
==5859== total heap usage: 3,628 allocs, 3,621 frees, 345,682 bytes allocated | |
==5859== | |
==5859== 1,200 bytes in 1 blocks are indirectly lost in loss record 8 of 9 |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import pytest | |
from hypothesis import given | |
from hypothesis.strategies import text, lists | |
def func(x): | |
print(x) | |
class TestPerson(): |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
pkg/ | |
pkg/.control.pypy3-doc | |
pkg/.control.pypy3-doc/.metafiles | |
pkg/.control.pypy3-doc/.needs-so | |
pkg/.control.pypy3-doc/.PKGINFO | |
pkg/.control.pypy3-doc/.provides-so | |
pkg/.control.pypy3-doc/data.tar.gz | |
pkg/.control.pypy3-doc/control.tar.gz | |
pkg/pypy3 | |
pkg/pypy3/usr |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import inspect | |
import ast | |
def get_assign_names(): | |
names = [] | |
caller_frame = inspect.stack()[2] | |
call = ast.parse(caller_frame.code_context[0]) | |
assign = None | |
for stmt in call.body: |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
class PyNameEquals(gdb.Function): | |
def __init__(self): | |
gdb.Function.__init__ (self, | |
"pyname_equals") | |
def _get_pycurframe_attr(self, attr): | |
frame = Frame(gdb.selected_frame()) | |
if frame.is_evalframeex(): | |
pyframe = frame.get_pyop() |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
(rr) source /usr/share/doc/python3.5/examples/gdb/libpython.py | |
(rr) py-bt | |
Traceback (most recent call first): | |
File "py.py", line 1, in huhu | |
def huhu(a): | |
File "py.py", line 7, in <module> | |
print(huhu(3)) | |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
$> cat static-pie.c | |
#include <stdio.h> | |
int main(void) { | |
printf("%p\n", main); | |
} | |
$> gcc -static static-pie.c | |
$> ./a.out | |
0x7422f6eb35c5 | |
$> ./a.out |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
export PATH="$HOME/perl5/bin:$PATH" | |
export PERL5LIB="/home/ganwell/perl5/lib/perl5:$PERL5LIB" | |
export PERL_LOCAL_LIB_ROOT="/home/ganwell/perl5:$PERL_LOCAL_LIB_ROOT" | |
export PERL_MB_OPT="--install_base \"/home/ganwell/perl5\"" | |
export PERL_MM_OPT="INSTALL_BASE=/home/ganwell/perl5" |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#ifdef LIBRESSL_VERSION_NUMBER | |
# define CH_OPENSSL_10_API | |
# define CH_LIBRESSL | |
#else | |
# define CH_OPENSSL | |
# if (OPENSSL_VERSION_NUMBER <= 0x10100000L) | |
# define CH_OPENSSL_10_API | |
# endif | |
#endif |