cpython/Lib
Devin Jeanpierre c5bace2bf7 bpo-29505: Add fuzz tests for float(str), int(str), unicode(str) (#2878)
Add basic fuzz tests for a few common builtin functions.

This is an easy place to start, and these functions are probably safe.
We'll want to add more fuzz tests later.  Lets bootstrap using these.

While the fuzz tests are included in CPython and compiled / tested on a
very basic level inside CPython itself, the actual fuzzing happens as
part of oss-fuzz (https://github.com/google/oss-fuzz). The reason to
include the tests in CPython is to make sure that they're maintained
as part of the CPython project, especially when (as some eventually
will) they use internal implementation details in the test.

(This will be necessary sometimes because e.g. the fuzz test should
never enter Python's interpreter loop, whereas some APIs only expose
themselves publicly as Python functions.)

This particular set of changes is part of testing Python's builtins,
tracked internally at Google by b/37562550.

The _xxtestfuzz module that this change adds need not be shipped with binary distributions of Python.
2017-09-06 11:15:35 -07:00
..
asyncio bpo-31350: Optimize get_event_loop and _get_running_loop (#3347) 2017-09-05 20:36:59 -04:00
collections bpo-30662: fixed OrderedDict.__init__ docstring re PEP 468 (#2179) 2017-09-05 16:23:49 -07:00
concurrent Fix a c.f.as_completed() refleak previously introduced in bpo-27144 (#3270) 2017-09-03 15:09:23 +02:00
ctypes Removed noop branch from ctypes code (#3234) 2017-08-30 13:43:14 +02:00
curses
dbm
distutils bpo-31340: Change to building with MSVC v141 (included with Visual Studio 2017) (#3311) 2017-09-06 10:01:38 -07:00
email bpo-30532: Fix whitespace folding in certain cases 2017-06-26 17:41:35 -04:00
encodings
ensurepip
html bpo-30629: Remove second call of str.lower() in html.parser.parse_endtag. (#2099) 2017-06-16 21:15:25 -04:00
http bpo-28707: Add the directory parameter to http.server.SimpleHTTPRequestHandler and http.server module (#1776) 2017-05-24 00:29:06 -07:00
idlelib bpo-31051: Rearrange IDLE condigdialog GenPage into Window, Editor, and Help sections. (#3239) 2017-08-30 00:59:11 -04:00
importlib bpo-31070: Fix a race condition in importlib _get_module_lock(). (#3033) 2017-08-09 14:29:12 +03:00
json Fix trivial typo in json module docstring (GH-2274) 2017-06-20 13:07:20 -07:00
lib2to3 bpo-29783: Replace codecs.open() with io.open() (#599) 2017-06-16 08:59:01 +02:00
logging bpo-31080: Allowed logging.config.fileConfig() to accept both args and kwargs. (GH-2979) 2017-08-02 21:44:28 +01:00
msilib
multiprocessing [Trivial] Remove now redundant assert (#3245) 2017-08-30 16:57:12 +02:00
pydoc_data
site-packages
sqlite3
test bpo-29505: Add fuzz tests for float(str), int(str), unicode(str) (#2878) 2017-09-06 11:15:35 -07:00
tkinter ttk: fix LabeledScale and OptionMenu destroy() method (#3025) 2017-08-08 19:41:21 +02:00
turtledemo bpo-30296 Remove unnecessary tuples, lists, sets, and dicts (#1489) 2017-05-18 07:35:54 -07:00
unittest Spelling fixes (#2902) 2017-08-03 09:00:59 +03:00
urllib remove a redundant lower in urllib.parse.urlsplit (#3008) 2017-09-02 21:51:39 -07:00
venv bpo-27425: Be more explicit in .gitattributes (GH-840) 2017-06-10 14:58:42 -05:00
wsgiref
xml bpo-30264: ExpatParser closes the source on error (#1451) 2017-05-05 09:46:47 +02:00
xmlrpc bpo-31247: xmlrpc.server: break reference cycle (#3166) 2017-08-21 18:12:58 +02:00
__future__.py
__phello__.foo.py
_bootlocale.py
_collections_abc.py
_compat_pickle.py
_compression.py
_dummy_thread.py
_markupbase.py
_osx_support.py
_pydecimal.py
_pyio.py Revert "bpo-17852: Maintain a list of BufferedWriter objects. Flush them on exit. (#1908)" (#3337) 2017-09-04 22:13:17 -07:00
_sitebuiltins.py
_strptime.py
_threading_local.py
_weakrefset.py bpo-30296 Remove unnecessary tuples, lists, sets, and dicts (#1489) 2017-05-18 07:35:54 -07:00
abc.py bpo-30463: Add an empty __slots__ to abc.ABC. 2017-06-06 22:34:57 +03:00
aifc.py
antigravity.py
argparse.py
ast.py
asynchat.py
asyncore.py bpo-30980: Fix double close in asyncore.file_wrapper (#2789) 2017-07-24 23:18:06 +02:00
base64.py
bdb.py bpo-30211: bdb: add docstrings (#1350) 2017-05-16 18:28:02 -04:00
binhex.py
bisect.py
bz2.py
cProfile.py
calendar.py bpo-30095: Make CSS classes used by calendar.HTMLCalendar customizable (GH-1439) 2017-06-06 11:35:59 +02:00
cgi.py bpo-29979: Rewrite cgi.parse_multipart to make it consistent with FieldStorage (#991) 2017-05-08 05:08:34 -07:00
cgitb.py
chunk.py
cmd.py
code.py
codecs.py bpo-29783: Replace codecs.open() with io.open() (#599) 2017-06-16 08:59:01 +02:00
codeop.py
colorsys.py
compileall.py
configparser.py bpo-23835: Restore legacy defaults= behavior for RawConfigParser (#3191) 2017-08-24 09:43:53 -07:00
contextlib.py bpo-30266: support "= None" pattern in AbstractContextManager (#1448) 2017-06-09 08:21:47 -07:00
copy.py
copyreg.py bpo-31107: Fix copyreg mangled slot names calculation. (#2989) 2017-08-04 11:45:00 +03:00
crypt.py
csv.py
datetime.py Closes issue bpo-5288: Allow tzinfo objects with sub-minute offsets. (#2896) 2017-07-31 10:26:50 -04:00
decimal.py
difflib.py
dis.py bpo-31183: `dis` now handles coroutines & async generators (GH-3077) 2017-08-18 12:29:21 +10:00
doctest.py
dummy_threading.py
enum.py Spelling fixes (#2902) 2017-08-03 09:00:59 +03:00
filecmp.py
fileinput.py bpo-31281: Fix pathlib.Path incompatibility in fileinput (gh-3208) 2017-09-04 13:37:24 -04:00
fnmatch.py
formatter.py
fractions.py
ftplib.py bpo-30119: fix ftplib.FTP.putline() to throw an error for a illegal command (#1214) 2017-07-22 19:20:22 +02:00
functools.py Conceptually, roots is a set. Also searching it as a set is a tiny bit faster (#3338) 2017-09-05 09:40:44 -07:00
genericpath.py
getopt.py
getpass.py
gettext.py bpo-29755: Fixed the lgettext() family of functions in the gettext module. (#2266) 2017-06-20 17:13:29 +03:00
glob.py
gzip.py
hashlib.py
heapq.py Improve clarity (and small speed-up) by using tuple unpacking (#3289) 2017-09-04 11:47:58 -07:00
hmac.py
imaplib.py bpo-30329: Catch Windows error 10022 on shutdown() (#1538) 2017-05-15 17:33:45 +02:00
imghdr.py
imp.py bpo-30645: don't append to an inner loop path in imp.load_package() (GH-2268) 2017-06-23 10:35:03 -07:00
inspect.py bpo-25532: Protect against infinite loops in inspect.unwrap() (#1717) 2017-05-23 13:27:52 +10:00
io.py
ipaddress.py
keyword.py
linecache.py
locale.py
lzma.py
macpath.py bpo-9850: Deprecate the macpath module (#1540) 2017-05-15 11:01:21 +02:00
mailbox.py
mailcap.py
mimetypes.py bpo-30824: Add mimetype for .json (#3048) 2017-08-14 14:39:45 -04:00
modulefinder.py
netrc.py
nntplib.py
ntpath.py
nturl2path.py
numbers.py
opcode.py
operator.py
optparse.py
os.py bpo-30441: Fix bug when modifying os.environ while iterating over it (#2409) 2017-07-01 20:34:45 +03:00
pathlib.py bpo-30897: Add is_mount() to pathlib.Path (#2669) 2017-08-01 15:35:45 -07:00
pdb.py
pickle.py
pickletools.py
pipes.py
pkgutil.py bpo-24744: Raises error in pkgutil.walk_packages if path is str (#1926) 2017-06-13 13:11:14 -04:00
platform.py
plistlib.py bpo-29196: Removed old-deprecated classes Plist, Dict and _InternalDict (#488) 2017-05-15 13:21:31 +03:00
poplib.py bpo-30329: Catch Windows error 10022 on shutdown() (#1538) 2017-05-15 17:33:45 +02:00
posixpath.py
pprint.py
profile.py
pstats.py bpo-30296 Remove unnecessary tuples, lists, sets, and dicts (#1489) 2017-05-18 07:35:54 -07:00
pty.py
py_compile.py
pyclbr.py bpo-6691: Pyclbr now reports nested classes and functions. (#2503) 2017-07-03 21:31:25 -04:00
pydoc.py bpo-31238: pydoc ServerThread.stop() now joins itself (#3151) 2017-08-21 23:24:40 +02:00
queue.py
quopri.py
random.py random_triangular: sqrt() is more accurate than **0.5 (#3317) 2017-09-04 16:51:06 -07:00
re.py
reprlib.py
rlcompleter.py
runpy.py
sched.py
secrets.py
selectors.py bpo-30624 remaining bare except (#2108) 2017-06-12 14:43:40 +02:00
shelve.py
shlex.py
shutil.py bpo-30218: support path-like objects in shutil.unpack_archive() (GH-1367) 2017-05-05 14:27:12 -07:00
signal.py
site.py bpo-30804: fix macOS build with framework enabled. (#2516) 2017-06-30 19:38:02 +02:00
smtpd.py
smtplib.py bpo-30394: Fix a socket leak in smtplib.SMTP.__init__() (#1700) 2017-05-24 13:14:50 +08:00
sndhdr.py
socket.py
socketserver.py bpo-31151: Add socketserver.ForkingMixIn.server_close() (#3057) 2017-08-10 15:28:16 +02:00
sre_compile.py bpo-30299: Display a bytecode when compile a regex in debug mode. (#1491) 2017-05-14 09:05:13 +03:00
sre_constants.py bpo-30398: Add a docstring for re.error. (#1647) 2017-05-27 16:12:48 +03:00
sre_parse.py bpo-30605: Fix compiling binary regexs with BytesWarnings enabled. (#2016) 2017-06-10 08:01:16 +03:00
ssl.py
stat.py
statistics.py
string.py bpo-1198569: Allow string.Template braced pattern to be different (#3288) 2017-09-04 16:32:10 -04:00
stringprep.py
struct.py
subprocess.py bpo-31178: Avoid concatenating bytes with str in subprocess error (#3066) 2017-09-05 23:41:30 -07:00
sunau.py
symbol.py
symtable.py bpo-30296 Remove unnecessary tuples, lists, sets, and dicts (#1489) 2017-05-18 07:35:54 -07:00
sysconfig.py remove IRIX support (closes bpo-31341) (#3310) 2017-09-04 16:36:05 -07:00
tabnanny.py
tarfile.py
telnetlib.py
tempfile.py
textwrap.py bpo-30620: Remove dead lines from textwrap.dedent (GH-2064) 2017-06-15 19:19:43 -07:00
this.py
threading.py bpo-18966: non-daemonic threads created by a multiprocessing.Process should be joined on exit (#3111) 2017-08-16 20:53:28 +02:00
timeit.py
token.py bpo-25324: copy tok_name before changing it (#1608) 2017-05-31 16:00:21 +02:00
tokenize.py bpo-25324: copy tok_name before changing it (#1608) 2017-05-31 16:00:21 +02:00
trace.py
traceback.py bpo-30296 Remove unnecessary tuples, lists, sets, and dicts (#1489) 2017-05-18 07:35:54 -07:00
tracemalloc.py
tty.py
turtle.py bpo-30296 Remove unnecessary tuples, lists, sets, and dicts (#1489) 2017-05-18 07:35:54 -07:00
types.py
typing.py bpo-28556: Updates to typing module (#2076) 2017-06-10 12:57:56 -07:00
uu.py
uuid.py remove IRIX support (closes bpo-31341) (#3310) 2017-09-04 16:36:05 -07:00
warnings.py Simplify code in warnings modules (#1935) 2017-06-04 11:34:16 -04:00
wave.py
weakref.py
webbrowser.py
xdrlib.py
zipapp.py bpo-31072: Rename the new filter argument for zipapp.create_archive. (#3049) 2017-08-26 18:04:12 +01:00
zipfile.py Revert bpo-26293 for zipfile breakage. See also bpo-29094. (#1484) 2017-05-06 14:46:01 +03:00