micropython/py
Andrew Leech 5c4153ea37 py/objarray: Raise error on out-of-bound memoryview slice start.
32-bit platforms only support a slice offset start of 24 bit max due to the
limited size of the mp_obj_array_t.free member.  Similarly on 64-bit
platforms the limit is 56 bits.

This commit adds an OverflowError if the user attempts to slice a
memoryview beyond this limit.

Signed-off-by: Damien George <damien@micropython.org>
2023-01-20 16:31:37 +11:00
..
argcheck.c py: Remove the word "yet" from exception messages. 2022-12-06 13:34:52 +11:00
asmarm.c
asmarm.h
asmbase.c py/emit: Suppress unreachable bytecode/native code that follows jump. 2022-06-20 22:28:18 +10:00
asmbase.h py/emit: Suppress unreachable bytecode/native code that follows jump. 2022-06-20 22:28:18 +10:00
asmthumb.c py/asmthumb: Provide implementations of clz/ctz for msvc. 2022-05-24 22:27:18 +10:00
asmthumb.h py/asmthumb: Make ARMv7-M instruction use dynamically selectable. 2022-05-23 23:01:12 +10:00
asmx64.c
asmx64.h
asmx86.c
asmx86.h
asmxtensa.c
asmxtensa.h
bc.c py/bc: Fix checking for duplicate **kwargs. 2022-11-28 11:23:22 +11:00
bc.h py: Pass in address to compiled module instead of returning it. 2022-12-08 12:27:23 +11:00
bc0.h
binary.c py: Clean up formatting of union definitions. 2022-08-23 13:09:57 +10:00
binary.h
builtin.h py/builtinimport: Allow overriding of mp_builtin___import__. 2022-08-23 13:34:06 +10:00
builtinevex.c py/obj: Convert make_new into a mp_obj_type_t slot. 2022-09-19 19:06:15 +10:00
builtinhelp.c py/obj: Add accessors for type slots and use everywhere. 2022-09-19 19:06:07 +10:00
builtinimport.c py: Pass in address to compiled module instead of returning it. 2022-12-08 12:27:23 +11:00
compile.c py: Pass in address to compiled module instead of returning it. 2022-12-08 12:27:23 +11:00
compile.h py: Pass in address to compiled module instead of returning it. 2022-12-08 12:27:23 +11:00
dynruntime.h py/obj: Convert make_new into a mp_obj_type_t slot. 2022-09-19 19:06:15 +10:00
dynruntime.mk py/dynruntime.mk: Allow building assembly source in natmods. 2022-08-11 14:00:13 +10:00
emit.h py/emit: Remove logic to detect last-emit-was-return-value. 2022-06-20 22:28:18 +10:00
emitbc.c py/emit: Suppress unreachable bytecode/native code that follows jump. 2022-06-20 22:28:18 +10:00
emitcommon.c
emitglue.c py/emitnative: Access qstr values using indirection table qstr_table. 2022-05-23 15:43:06 +10:00
emitglue.h py/emitnative: Access qstr values using indirection table qstr_table. 2022-05-23 15:43:06 +10:00
emitinlinethumb.c py/emitinlinethumb: Make float instruction use dynamically selectable. 2022-05-26 12:22:07 +10:00
emitinlinextensa.c
emitnarm.c py/emitnative: Access qstr values using indirection table qstr_table. 2022-05-23 15:43:06 +10:00
emitnative.c py/emitnative: Initialise locals as Python object type for native code. 2022-12-16 11:44:10 +11:00
emitnthumb.c py/emitnative: Access qstr values using indirection table qstr_table. 2022-05-23 15:43:06 +10:00
emitnx64.c py/emitnative: Access qstr values using indirection table qstr_table. 2022-05-23 15:43:06 +10:00
emitnx86.c py/emitnative: Access qstr values using indirection table qstr_table. 2022-05-23 15:43:06 +10:00
emitnxtensa.c py/emitnative: Access qstr values using indirection table qstr_table. 2022-05-23 15:43:06 +10:00
emitnxtensawin.c py/emitnative: Access qstr values using indirection table qstr_table. 2022-05-23 15:43:06 +10:00
formatfloat.c py/formatfloat: Use pow(10, e) instead of pos/neg_pow lookup tables. 2022-08-12 23:53:34 +10:00
formatfloat.h
frozenmod.c
frozenmod.h py/builtin: Clean up and simplify import_stat and builtin_open config. 2022-05-25 13:04:45 +10:00
gc.c py/gc: Increase the address length in gc_dump_alloc_table(). 2023-01-16 12:09:20 +11:00
gc.h py/gc: Allow the GC heap to be split over multiple memory areas. 2022-07-23 00:42:54 +10:00
grammar.h
lexer.c
lexer.h py/builtin: Clean up and simplify import_stat and builtin_open config. 2022-05-25 13:04:45 +10:00
make_root_pointers.py py/make_root_pointers: Add MP_REGISTER_ROOT_POINTER parser/generator. 2022-07-18 13:48:23 +10:00
makecompresseddata.py
makemoduledefs.py py/makemoduledefs.py: Emit useful error for legacy MP_REGISTER_MODULE. 2022-06-14 15:05:37 +01:00
makeqstrdata.py
makeqstrdefs.py py/make_root_pointers: Add MP_REGISTER_ROOT_POINTER parser/generator. 2022-07-18 13:48:23 +10:00
makeversionhdr.py py/makeversionhdr.py: Allow running outside of repo. 2022-11-22 14:36:21 +11:00
malloc.c
map.c py/map: Clear value when re-using slot with ordered dictionaries. 2023-01-13 14:21:32 +11:00
misc.h py/misc: Remove use of bitfield from vstr_t. 2022-10-12 00:33:09 +11:00
mkenv.mk py/mkenv.mk: Make CPP definition explicit for consistency. 2022-09-29 14:17:37 +02:00
mkrules.cmake rp2/Makefile: Add support for BOARD_VARIANTS. 2022-09-26 12:38:58 +10:00
mkrules.mk py/mkrules.mk: Add link to build troubleshooting on failure. 2022-09-15 12:22:18 +10:00
modarray.c all: Remove third argument to MP_REGISTER_MODULE. 2022-06-02 16:31:37 +10:00
modbuiltins.c py/obj: Convert make_new into a mp_obj_type_t slot. 2022-09-19 19:06:15 +10:00
modcmath.c all: Remove third argument to MP_REGISTER_MODULE. 2022-06-02 16:31:37 +10:00
modcollections.c all: Remove third argument to MP_REGISTER_MODULE. 2022-06-02 16:31:37 +10:00
modgc.c all: Remove third argument to MP_REGISTER_MODULE. 2022-06-02 16:31:37 +10:00
modio.c py/obj: Convert make_new into a mp_obj_type_t slot. 2022-09-19 19:06:15 +10:00
modmath.c all: Remove third argument to MP_REGISTER_MODULE. 2022-06-02 16:31:37 +10:00
modmicropython.c py/modmicropython: Make module optional. 2022-12-06 13:34:17 +11:00
modstruct.c py/objstr: Split mp_obj_str_from_vstr into bytes/str versions. 2022-08-26 16:43:55 +10:00
modsys.c py/modsys: Add support for sys.executable. 2022-10-11 18:10:26 +11:00
modthread.c py/obj: Convert make_new into a mp_obj_type_t slot. 2022-09-19 19:06:15 +10:00
moduerrno.c all: Remove third argument to MP_REGISTER_MODULE. 2022-06-02 16:31:37 +10:00
mpconfig.h py/gc: Avoid valgrind false positives. 2022-12-08 14:29:22 +11:00
mperrno.h
mphal.h
mpprint.c
mpprint.h py/mpprint: Fix formatting typo with mp_print_ext_t struct name. 2022-08-10 14:30:47 +10:00
mpstate.c
mpstate.h py/gc: Reduce code size when MICROPY_GC_SPLIT_HEAP is disabled. 2022-07-23 00:43:08 +10:00
mpthread.h
mpz.c
mpz.h
nativeglue.c
nativeglue.h
nlr.c
nlr.h py/nlrmips: Add native NLR support for MIPS architecture. 2022-11-15 17:09:49 +11:00
nlraarch64.c
nlrmips.c py/nlrmips: Add native NLR support for MIPS architecture. 2022-11-15 17:09:49 +11:00
nlrpowerpc.c py/nlrpowerpc: Fix generation of ppc64 code on ppc32 build. 2022-08-11 14:04:13 +10:00
nlrsetjmp.c
nlrthumb.c
nlrx64.c
nlrx86.c
nlrxtensa.c
obj.c py/obj: Merge getiter and iternext mp_obj_type_t slots. 2022-09-19 19:06:13 +10:00
obj.h py/obj: Remove unused MP_DEFINE_CONST_OBJ_FULL_TYPE macro. 2022-12-15 17:40:36 +11:00
objarray.c py/objarray: Raise error on out-of-bound memoryview slice start. 2023-01-20 16:31:37 +11:00
objarray.h py/objarray: Raise error on out-of-bound memoryview slice start. 2023-01-20 16:31:37 +11:00
objattrtuple.c py/obj: Convert make_new into a mp_obj_type_t slot. 2022-09-19 19:06:15 +10:00
objbool.c py/obj: Convert make_new into a mp_obj_type_t slot. 2022-09-19 19:06:15 +10:00
objboundmeth.c py/obj: Convert make_new into a mp_obj_type_t slot. 2022-09-19 19:06:15 +10:00
objcell.c py/obj: Convert make_new into a mp_obj_type_t slot. 2022-09-19 19:06:15 +10:00
objclosure.c py/obj: Convert make_new into a mp_obj_type_t slot. 2022-09-19 19:06:15 +10:00
objcomplex.c py/obj: Convert make_new into a mp_obj_type_t slot. 2022-09-19 19:06:15 +10:00
objdeque.c py/obj: Convert make_new into a mp_obj_type_t slot. 2022-09-19 19:06:15 +10:00
objdict.c py/objdict: Implement dictionary union (PEP 584). 2022-11-25 12:46:14 +11:00
objenumerate.c py/obj: Convert make_new into a mp_obj_type_t slot. 2022-09-19 19:06:15 +10:00
objexcept.c py/obj: Optimise code size and performance for make_new as a slot. 2022-09-19 19:06:16 +10:00
objexcept.h py/obj: Convert make_new into a mp_obj_type_t slot. 2022-09-19 19:06:15 +10:00
objfilter.c py/obj: Convert make_new into a mp_obj_type_t slot. 2022-09-19 19:06:15 +10:00
objfloat.c py/obj: Convert make_new into a mp_obj_type_t slot. 2022-09-19 19:06:15 +10:00
objfun.c py/obj: Convert make_new into a mp_obj_type_t slot. 2022-09-19 19:06:15 +10:00
objfun.h
objgenerator.c py/obj: Convert make_new into a mp_obj_type_t slot. 2022-09-19 19:06:15 +10:00
objgenerator.h
objgetitemiter.c py/obj: Convert make_new into a mp_obj_type_t slot. 2022-09-19 19:06:15 +10:00
objint.c py/obj: Convert make_new into a mp_obj_type_t slot. 2022-09-19 19:06:15 +10:00
objint.h
objint_longlong.c py/obj: Add static safety checks to mp_obj_is_type(). 2022-07-18 11:17:46 +10:00
objint_mpz.c py/obj: Add static safety checks to mp_obj_is_type(). 2022-07-18 11:17:46 +10:00
objlist.c py/obj: Convert make_new into a mp_obj_type_t slot. 2022-09-19 19:06:15 +10:00
objlist.h py/obj: Convert make_new into a mp_obj_type_t slot. 2022-09-19 19:06:15 +10:00
objmap.c py/obj: Convert make_new into a mp_obj_type_t slot. 2022-09-19 19:06:15 +10:00
objmodule.c py/objmodule: Add support for __dict__. 2022-09-19 23:22:46 +10:00
objmodule.h
objnamedtuple.c py/obj: Convert make_new into a mp_obj_type_t slot. 2022-09-19 19:06:15 +10:00
objnamedtuple.h py/obj: Convert make_new into a mp_obj_type_t slot. 2022-09-19 19:06:15 +10:00
objnone.c py/obj: Convert make_new into a mp_obj_type_t slot. 2022-09-19 19:06:15 +10:00
objobject.c py/obj: Convert make_new into a mp_obj_type_t slot. 2022-09-19 19:06:15 +10:00
objpolyiter.c py/obj: Convert make_new into a mp_obj_type_t slot. 2022-09-19 19:06:15 +10:00
objproperty.c py/obj: Convert make_new into a mp_obj_type_t slot. 2022-09-19 19:06:15 +10:00
objrange.c py/obj: Convert make_new into a mp_obj_type_t slot. 2022-09-19 19:06:15 +10:00
objreversed.c py/obj: Convert make_new into a mp_obj_type_t slot. 2022-09-19 19:06:15 +10:00
objset.c py/obj: Convert make_new into a mp_obj_type_t slot. 2022-09-19 19:06:15 +10:00
objsingleton.c py/obj: Convert make_new into a mp_obj_type_t slot. 2022-09-19 19:06:15 +10:00
objslice.c py/obj: Convert make_new into a mp_obj_type_t slot. 2022-09-19 19:06:15 +10:00
objstr.c py: Remove the word "yet" from exception messages. 2022-12-06 13:34:52 +11:00
objstr.h py/objstr: Add a helper to set mp_obj_str_t data. 2022-10-11 17:50:19 +11:00
objstringio.c py/obj: Convert make_new into a mp_obj_type_t slot. 2022-09-19 19:06:15 +10:00
objstringio.h
objstrunicode.c py/obj: Convert make_new into a mp_obj_type_t slot. 2022-09-19 19:06:15 +10:00
objtuple.c py/obj: Convert make_new into a mp_obj_type_t slot. 2022-09-19 19:06:15 +10:00
objtuple.h
objtype.c py/obj: Optimise code size and performance for make_new as a slot. 2022-09-19 19:06:16 +10:00
objtype.h py/obj: Optimise code size and performance for make_new as a slot. 2022-09-19 19:06:16 +10:00
objzip.c py/obj: Convert make_new into a mp_obj_type_t slot. 2022-09-19 19:06:15 +10:00
opmethods.c py/obj: Add accessors for type slots and use everywhere. 2022-09-19 19:06:07 +10:00
pairheap.c
pairheap.h
parse.c py/parse: Allow const types other than int to optimise as true/false. 2022-09-23 16:04:13 +10:00
parse.h
parsenum.c py/objstr: Optimise mp_obj_new_str_from_vstr for known-safe strings. 2022-08-26 16:44:35 +10:00
parsenum.h py/parsenum: Optimise when building with complex disabled. 2022-06-23 11:46:47 +10:00
parsenumbase.c
parsenumbase.h
persistentcode.c py: Pass in address to compiled module instead of returning it. 2022-12-08 12:27:23 +11:00
persistentcode.h py: Pass in address to compiled module instead of returning it. 2022-12-08 12:27:23 +11:00
profile.c py/obj: Convert make_new into a mp_obj_type_t slot. 2022-09-19 19:06:15 +10:00
profile.h
py.cmake py/nlrmips: Add native NLR support for MIPS architecture. 2022-11-15 17:09:49 +11:00
py.mk py/nlrmips: Add native NLR support for MIPS architecture. 2022-11-15 17:09:49 +11:00
pystack.c
pystack.h
qstr.c py/qstr: Change qstr hash type from mp_uint_t to size_t. 2022-08-11 23:18:02 +10:00
qstr.h py/qstr: Change qstr hash type from mp_uint_t to size_t. 2022-08-11 23:18:02 +10:00
qstrdefs.h
reader.c py: Include filename in errors from loading/saving files via "open". 2022-09-19 23:27:08 +10:00
reader.h
repl.c
repl.h
ringbuf.c
ringbuf.h
runtime.c py/runtime: Add mp_raise_OSError_with_filename helper function. 2022-09-19 23:25:26 +10:00
runtime.h py/runtime: Add mp_raise_OSError_with_filename helper function. 2022-09-19 23:25:26 +10:00
runtime0.h py/obj: Add support for __float__ and __complex__ functions. 2022-07-25 14:23:34 +10:00
runtime_utils.c
scheduler.c py/scheduler: Use MP_REGISTER_ROOT_POINTER(). 2022-07-18 13:52:01 +10:00
scope.c
scope.h
sequence.c
showbc.c
smallint.c
smallint.h
stackctrl.c
stackctrl.h
stream.c py/obj: Add accessors for type slots and use everywhere. 2022-09-19 19:06:07 +10:00
stream.h py/obj: Add accessors for type slots and use everywhere. 2022-09-19 19:06:07 +10:00
unicode.c
unicode.h
usermod.cmake
vm.c py/vm: Consistently indent #if guards to match the code they surround. 2022-07-12 22:48:55 +10:00
vmentrytable.h
vstr.c
warning.c