Skip to content

Instantly share code, notes, and snippets.

@leepa
Last active August 29, 2015 13:56
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save leepa/9334087 to your computer and use it in GitHub Desktop.
Save leepa/9334087 to your computer and use it in GitHub Desktop.
[leepa@joolzbsd ~]$ pkg info python33
python33-3.3.3_3
Name : python33
Version : 3.3.3_3
Installed on : Mon Mar 3 19:59:34 UTC 2014
Origin : lang/python33
Architecture : freebsd:10:x86:64
Prefix : /usr/local
Categories : python lang ipv6
Licenses : PSFL
Maintainer : python@FreeBSD.org
WWW : http://www.python.org/
Comment : Interpreted object-oriented programming language
Options :
EXAMPLES : on
FPECTL : off
IPV6 : on
NLS : on
PYMALLOC : on
THREADS : on
Shared Libs required:
libpython3.3m.so
libintl.so.9
Flat size : 88.9MiB
Description :
Python is an interpreted object-oriented programming language, and is
often compared to Tcl, Perl or Scheme.
WWW: http://www.python.org/
[leepa@joolzbsd ~]$ cat testpy.py
import socket
r, w = socket.socketpair()
w.send(b'X' * 1024)
r.recvfrom_into(bytearray(), 1024)
[leepa@joolzbsd ~]$ python3.3 testpy.py
Assertion failed: (buf != 0 && buflen > 0), function sock_recvfrom_into, file /wrkdirs/usr/ports/lang/python33/work/Python-3.3.3/Modules/socketmodule.c, line 2927.
Abort trap (core dumped)
...
[leepa@joolzbsd ~]$ python3.3 testpy.py
Traceback (most recent call last):
File "testpy.py", line 4, in <module>
r.recvfrom_into(bytearray(1), 1024)
ValueError: nbytes is greater than the length of the buffer
[leepa@joolzbsd ~]$ cat testpy.py
import socket
r, w = socket.socketpair()
w.send(b'X' * 1024)
r.recvfrom_into(bytearray(1), 1024)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment