circuitpython/tests/extmod
Jeff Epler 2fb5eb3b11 extmod/re1.5: Check and report byte overflow errors in _compilecode.
The generated regex code is limited in the range of jumps and counts, and
this commit checks all cases which can overflow given the right kind of
input regex, and returns an error in such a case.

This change assumes that the results that overflow an int8_t do not
overflow a platform int.

Closes: #7078

Signed-off-by: Jeff Epler <jepler@gmail.com>

# Conflicts:
#	extmod/re1.5/compilecode.c
2021-04-06 19:11:40 -05:00
..
btree1.py run code formatting script 2021-03-15 19:27:36 +05:30
btree1.py.exp tests/extmod/btree1: Checks for put, seq, string print and unsupported binary op. 2016-10-05 00:17:22 +11:00
framebuf1.py run code formatting script 2021-03-15 19:27:36 +05:30
framebuf1.py.exp extmod/modframebuf: Make monochrome bitmap formats start with MONO_. 2017-04-04 17:38:33 +10:00
framebuf2.py run code formatting script 2021-03-15 19:27:36 +05:30
framebuf2.py.exp extmod/modframebuf: Add 2-bit color format (GS2_HMSB). 2017-12-14 17:13:02 +11:00
framebuf4.py run code formatting script 2021-03-15 19:27:36 +05:30
framebuf4.py.exp tests/extmod/framebuf4: Add tests for GS4_HMSB framebuf format. 2017-01-25 23:20:19 +11:00
framebuf8.py run code formatting script 2021-03-15 19:27:36 +05:30
framebuf8.py.exp extmod/modframebuf: Add 8-bit greyscale format (GS8). 2017-12-14 17:36:13 +11:00
framebuf16.py run code formatting script 2021-03-15 19:27:36 +05:30
framebuf16.py.exp extmod/modframebuf: Make FrameBuffer handle 16bit depth. 2016-12-01 16:43:25 +11:00
framebuf_subclass.py run code formatting script 2021-03-15 19:27:36 +05:30
framebuf_subclass.py.exp tests/extmod: Add test which subclasses framebuf.FrameBuffer. 2017-12-12 16:48:09 +11:00
machine1.py tests: Convert remaining "sys.exit()" to "raise SystemExit". 2017-06-10 20:34:38 +03:00
machine1.py.exp modmachine: Implement physical memory access using /dev/mem (Linux, etc). 2015-07-08 11:37:23 +03:00
machine_pinbase.py run code formatting script 2021-03-15 19:27:36 +05:30
machine_pinbase.py.exp tests: Add a testcase for machine.PinBase class. 2016-06-19 19:45:29 +03:00
machine_pulse.py run code formatting script 2021-03-15 19:27:36 +05:30
machine_pulse.py.exp extmod/machine_pulse: Make time_pulse_us() not throw exceptions. 2017-02-05 14:20:17 +03:00
machine_signal.py run code formatting script 2021-03-15 19:27:36 +05:30
machine_signal.py.exp tests/extmod: Add test for machine.Signal class. 2017-03-02 16:09:16 +11:00
ticks_diff.py tests/extmod/ticks_diff: Test for new semantics of ticks_diff(). 2016-10-30 21:33:12 +03:00
ticks_diff.py.exp tests/extmod/ticks_diff: Test for new semantics of ticks_diff(). 2016-10-30 21:33:12 +03:00
time_ms_us.py run code formatting script 2021-03-15 19:27:36 +05:30
time_ms_us.py.exp tests/extmod/time_ms_us: Add test for calling ticks_cpu(). 2018-03-04 00:17:33 +11:00
ubinascii_a2b_base64.py run code formatting script 2021-03-15 19:27:36 +05:30
ubinascii_b2a_base64.py run code formatting script 2021-03-15 19:27:36 +05:30
ubinascii_crc32.py run code formatting script 2021-03-15 19:27:36 +05:30
ubinascii_hexlify.py run code formatting script 2021-03-15 19:27:36 +05:30
ubinascii_micropython.py run code formatting script 2021-03-15 19:27:36 +05:30
ubinascii_micropython.py.exp extmod/modubinascii: Add check for empty buffer passed to hexlify. 2017-07-03 14:52:00 +10:00
ubinascii_unhexlify.py run code formatting script 2021-03-15 19:27:36 +05:30
uctypes_32bit_intbig.py run code formatting script 2021-03-15 19:27:36 +05:30
uctypes_32bit_intbig.py.exp extmod/moductypes: Fix bigint handling for 32-bit ports. 2017-04-21 16:43:21 +03:00
uctypes_array_assign_le.py run code formatting script 2021-03-15 19:27:36 +05:30
uctypes_array_assign_le.py.exp tests/uctypes: Test item assignment for scalar arrays. 2016-01-03 20:32:51 +02:00
uctypes_array_assign_native_le.py run code formatting script 2021-03-15 19:27:36 +05:30
uctypes_array_assign_native_le.py.exp tests/uctypes_array_assign_native_le: Split off intbig part. 2017-03-07 08:40:03 +01:00
uctypes_array_assign_native_le_intbig.py run code formatting script 2021-03-15 19:27:36 +05:30
uctypes_array_assign_native_le_intbig.py.exp tests/uctypes_array_assign_native_le: Split off intbig part. 2017-03-07 08:40:03 +01:00
uctypes_bytearray.py tests/extmod: Add some uctypes tests to improve coverage of that module. 2017-12-19 16:48:41 +11:00
uctypes_bytearray.py.exp tests/extmod: Add some uctypes tests to improve coverage of that module. 2017-12-19 16:48:41 +11:00
uctypes_byteat.py run code formatting script 2021-03-15 19:27:36 +05:30
uctypes_byteat.py.exp tests/extmod: Add some uctypes tests to improve coverage of that module. 2017-12-19 16:48:41 +11:00
uctypes_error.py run code formatting script 2021-03-15 19:27:36 +05:30
uctypes_error.py.exp tests/extmod: Add some uctypes tests to improve coverage of that module. 2017-12-19 16:48:41 +11:00
uctypes_le.py run code formatting script 2021-03-15 19:27:36 +05:30
uctypes_le.py.exp tests/extmod: Improve moductypes test coverage. 2016-12-12 17:09:14 +11:00
uctypes_le_float.py run code formatting script 2021-03-15 19:27:36 +05:30
uctypes_le_float.py.exp extmod/uctypes: Finish support for FLOAT32 and FLOAT64 types. 2016-03-19 21:59:42 +00:00
uctypes_native_float.py run code formatting script 2021-03-15 19:27:36 +05:30
uctypes_native_float.py.exp extmod/uctypes: Finish support for FLOAT32 and FLOAT64 types. 2016-03-19 21:59:42 +00:00
uctypes_native_le.py run code formatting script 2021-03-15 19:27:36 +05:30
uctypes_native_le.py.exp tests/extmod: Improve moductypes test coverage. 2016-12-12 17:09:14 +11:00
uctypes_print.py run code formatting script 2021-03-15 19:27:36 +05:30
uctypes_print.py.exp tests/extmod: Improve moductypes test coverage. 2016-12-12 17:09:14 +11:00
uctypes_ptr_le.py run code formatting script 2021-03-15 19:27:36 +05:30
uctypes_ptr_le.py.exp moductypes: Foreign data interface module, roughly based on ctype ideas. 2014-07-09 19:28:24 +03:00
uctypes_ptr_native_le.py run code formatting script 2021-03-15 19:27:36 +05:30
uctypes_ptr_native_le.py.exp moductypes: Foreign data interface module, roughly based on ctype ideas. 2014-07-09 19:28:24 +03:00
uctypes_sizeof.py run code formatting script 2021-03-15 19:27:36 +05:30
uctypes_sizeof.py.exp tests/extmod: Add some uctypes tests to improve coverage of that module. 2017-12-19 16:48:41 +11:00
uctypes_sizeof_float.py run code formatting script 2021-03-15 19:27:36 +05:30
uctypes_sizeof_float.py.exp tests/extmod: Add some uctypes tests to improve coverage of that module. 2017-12-19 16:48:41 +11:00
uctypes_sizeof_native.py run code formatting script 2021-03-15 19:27:36 +05:30
uctypes_sizeof_native.py.exp moductypes: Foreign data interface module, roughly based on ctype ideas. 2014-07-09 19:28:24 +03:00
uhashlib_sha1.py run code formatting script 2021-03-15 19:27:36 +05:30
uhashlib_sha256.py run code formatting script 2021-03-15 19:27:36 +05:30
uheapq1.py run code formatting script 2021-03-15 19:27:36 +05:30
ujson_dump.py run code formatting script 2021-03-15 19:27:36 +05:30
ujson_dump_iobase.py run code formatting script 2021-03-15 19:27:36 +05:30
ujson_dumps.py run code formatting script 2021-03-15 19:27:36 +05:30
ujson_dumps_extra.py run code formatting script 2021-03-15 19:27:36 +05:30
ujson_dumps_extra.py.exp tests: Add tests to improve coverage of objstr.c. 2015-09-03 23:06:18 +01:00
ujson_dumps_float.py tests: Convert remaining "sys.exit()" to "raise SystemExit". 2017-06-10 20:34:38 +03:00
ujson_load.py run code formatting script 2021-03-15 19:27:36 +05:30
ujson_load_readinto.py run code formatting script 2021-03-15 19:27:36 +05:30
ujson_load_readinto.py.exp Fix stream version and add basic readinto test 2020-07-10 17:33:17 -07:00
ujson_loads.py run code formatting script 2021-03-15 19:27:36 +05:30
ujson_loads_float.py run code formatting script 2021-03-15 19:27:36 +05:30
umsgpack_pack.py run code formatting script 2021-03-15 19:27:36 +05:30
umsgpack_pack.py.ext add ExtType, update doc, add a test 2020-12-07 15:40:02 -08:00
urandom_basic.py run code formatting script 2021-03-15 19:27:36 +05:30
urandom_extra.py run code formatting script 2021-03-15 19:27:36 +05:30
ure1.py run code formatting script 2021-03-15 19:27:36 +05:30
ure_debug.py run code formatting script 2021-03-15 19:27:36 +05:30
ure_debug.py.exp tests/extmod: Add test for ure debug printing when compiling a regex. 2017-01-26 23:45:51 +11:00
ure_error.py run code formatting script 2021-03-15 19:27:36 +05:30
ure_group.py run code formatting script 2021-03-15 19:27:36 +05:30
ure_groups.py run code formatting script 2021-03-15 19:27:36 +05:30
ure_limit.py extmod/re1.5: Check and report byte overflow errors in _compilecode. 2021-04-06 19:11:40 -05:00
ure_limit.py.exp extmod/re1.5: Check and report byte overflow errors in _compilecode. 2021-04-06 19:11:40 -05:00
ure_namedclass.py run code formatting script 2021-03-15 19:27:36 +05:30
ure_span.py run code formatting script 2021-03-15 19:27:36 +05:30
ure_split.py extmod/modure: If input string is bytes, return bytes results too. 2017-07-01 01:25:45 +03:00
ure_split_empty.py tests: Convert remaining "sys.exit()" to "raise SystemExit". 2017-06-10 20:34:38 +03:00
ure_split_empty.py.exp tests/extmod: Move split-on-empty-match tests to a separate test file. 2016-04-26 10:19:04 +01:00
ure_split_notimpl.py run code formatting script 2021-03-15 19:27:36 +05:30
ure_split_notimpl.py.exp tests/extmod: Improve test coverage of ure module. 2017-01-17 17:42:37 +11:00
ure_stack_overflow.py tests/extmod: Add test for ure regexes leading to infinite recursion. 2017-10-03 00:24:32 +03:00
ure_stack_overflow.py.exp tests/extmod: Add test for ure regexes leading to infinite recursion. 2017-10-03 00:24:32 +03:00
ure_sub.py run code formatting script 2021-03-15 19:27:36 +05:30
ure_sub_unmatched.py run code formatting script 2021-03-15 19:27:36 +05:30
ure_sub_unmatched.py.exp extmod/modure: Add ure.sub() function and method, and tests. 2019-02-14 15:42:22 +01:00
ussl_basic.py run code formatting script 2021-03-15 19:27:36 +05:30
ussl_basic.py.exp extmod/modussl_axtls: Allow to close ssl stream multiple times. 2017-07-20 00:20:53 +03:00
utimeq1.py run code formatting script 2021-03-15 19:27:36 +05:30
utimeq1.py.exp tests/extmod: Add test for utimeq module. 2016-12-22 00:31:38 +03:00
utimeq_stable.py tests: Convert remaining "sys.exit()" to "raise SystemExit". 2017-06-10 20:34:38 +03:00
utimeq_stable.py.exp tests/utimeq_stable: Test for partial stability of utimeq queuing. 2016-12-24 00:25:15 +03:00
uzlib_decompio.py run code formatting script 2021-03-15 19:27:36 +05:30
uzlib_decompio.py.exp tests/extmod/uzlib_decompio: Add zlib bitstream testcases. 2016-09-04 14:45:27 +03:00
uzlib_decompio_gz.py run code formatting script 2021-03-15 19:27:36 +05:30
uzlib_decompio_gz.py.exp tests/extmod: Improve tinfgzip.c test coverage. 2017-03-14 22:13:36 +11:00
uzlib_decompress.py run code formatting script 2021-03-15 19:27:36 +05:30
vfs_basic.py run code formatting script 2021-03-15 19:27:36 +05:30
vfs_basic.py.exp tests/extmod/vfs_basic: Allow test to pass on embedded targets. 2017-06-11 22:56:27 +10:00
vfs_fat_fileio1.py run code formatting script 2021-03-15 19:27:36 +05:30
vfs_fat_fileio1.py.exp extmod/vfs_fat_file: Implement SEEK_CUR for non-zero offset. 2018-03-23 09:19:56 -05:00
vfs_fat_fileio2.py run code formatting script 2021-03-15 19:27:36 +05:30
vfs_fat_fileio2.py.exp extmod/vfs_fat: Add file size as 4th element of uos.ilistdir tuple. 2018-03-12 12:26:36 +11:00
vfs_fat_more.py run code formatting script 2021-03-15 19:27:36 +05:30
vfs_fat_more.py.exp tests/extmod: Add test for importing a script from a user VFS. 2018-06-06 14:28:23 +10:00
vfs_fat_oldproto.py run code formatting script 2021-03-15 19:27:36 +05:30
vfs_fat_oldproto.py.exp extmod/vfs_fat: Add file size as 4th element of uos.ilistdir tuple. 2018-03-12 12:26:36 +11:00
vfs_fat_ramdisk.py run code formatting script 2021-03-15 19:27:36 +05:30
vfs_fat_ramdisk.py.exp Fix os.stat() to use 1970 epoch 2018-08-25 20:43:02 +02:00
vfs_userfs.py run code formatting script 2021-03-15 19:27:36 +05:30
vfs_userfs.py.exp tests/extmod: Add test for VFS and user-defined filesystem and files. 2018-06-12 12:29:26 +10:00
websocket_basic.py run code formatting script 2021-03-15 19:27:36 +05:30
websocket_basic.py.exp tests/extmod: Rename websocket test to websocket_basic. 2017-03-10 15:05:08 +11:00