micropython/py
David Lechner 6baeded322 py/runtime: Fix crash in star arg unpacking.
The reallocation trigger for unpacking star args with unknown length
did not take into account the number of fixed args remaining. So it was
possible that the unpacked iterators could take up exactly the memory
allocated then nothing would be left for fixed args after the star args.
This causes a segfault crash.

This is fixed by taking into account the remaining number of fixed args
in the check to decide whether to realloc yet or not.

Signed-off-by: David Lechner <david@pybricks.com>
2022-08-06 11:32:58 -05:00
..
argcheck.c
asmarm.c py/asmarm: Add asm_arm_ldrh_reg_reg_offset() helper func. 2022-05-23 14:21:16 +10:00
asmarm.h py/asm: Add ASM_LOAD16_REG_REG_OFFSET macro for load-u16 with offset. 2022-05-23 14:21:16 +10:00
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 py/asm: Add ASM_LOAD16_REG_REG_OFFSET macro for load-u16 with offset. 2022-05-23 14:21:16 +10:00
asmx86.c
asmx86.h py/asm: Add ASM_LOAD16_REG_REG_OFFSET macro for load-u16 with offset. 2022-05-23 14:21:16 +10:00
asmxtensa.c
asmxtensa.h py/asm: Add ASM_LOAD16_REG_REG_OFFSET macro for load-u16 with offset. 2022-05-23 14:21:16 +10:00
bc.c py/bc: Remove unused mp_opcode_format function. 2022-06-07 13:32:38 +10:00
bc.h py/bc: Remove unused mp_opcode_format function. 2022-06-07 13:32:38 +10:00
bc0.h
binary.c py/obj: Add static safety checks to mp_obj_is_type(). 2022-07-18 11:17:46 +10:00
binary.h
builtin.h py/builtin: Remove unnecessary module declarations. 2022-06-27 22:17:13 +10:00
builtinevex.c
builtinhelp.c py/builtinhelp: Don't show help for an MP_MODULE_ATTR_DELEGATION_ENTRY. 2022-06-28 16:35:01 +10:00
builtinimport.c py/builtinimport: Remove duplicate static function argument. 2022-07-27 11:38:47 +10:00
compile.c py/compile: Support large integers in inline-asm data directive. 2022-07-26 12:24:50 +10:00
compile.h
dynruntime.h py/dynruntime: Add macros to access more types and mp_const_empty_bytes. 2022-06-10 16:42:43 +10:00
dynruntime.mk py/dynruntime.mk: Add basic support for armv6m architecture. 2022-05-23 23:01:25 +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: Fix STORE_ATTR viper code-gen when value is not a pyobj. 2022-07-12 17:18:27 +10: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: Format all whole-number floats exactly. 2022-07-26 22:23:47 +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: Reduce code size when MICROPY_GC_SPLIT_HEAP is disabled. 2022-07-23 00:43:08 +10: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
malloc.c
map.c py/obj: Add static safety checks to mp_obj_is_type(). 2022-07-18 11:17:46 +10:00
misc.h py/misc: Fix msvc compilation with compressed error messages. 2022-07-18 23:25:12 +10:00
mkenv.mk py/mkenv.mk: Use micropython-lib from submodule by default. 2022-08-03 00:08:41 +10:00
mkrules.cmake py/mkenv.mk: Use micropython-lib from submodule by default. 2022-08-03 00:08:41 +10:00
mkrules.mk py/mkenv.mk: Use micropython-lib from submodule by default. 2022-08-03 00:08:41 +10:00
modarray.c all: Remove third argument to MP_REGISTER_MODULE. 2022-06-02 16:31:37 +10:00
modbuiltins.c all: Remove third argument to MP_REGISTER_MODULE. 2022-06-02 16:31:37 +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/modio: Remove FileIO and TextIOWrapper from io module. 2022-07-26 17:58:01 +10:00
modmath.c all: Remove third argument to MP_REGISTER_MODULE. 2022-06-02 16:31:37 +10:00
modmicropython.c all: Remove third argument to MP_REGISTER_MODULE. 2022-06-02 16:31:37 +10:00
modstruct.c all: Remove third argument to MP_REGISTER_MODULE. 2022-06-02 16:31:37 +10:00
modsys.c py/modsys: Use MP_REGISTER_ROOT_POINTER(). 2022-07-18 13:52:01 +10:00
modthread.c all: Remove third argument to MP_REGISTER_MODULE. 2022-06-02 16:31:37 +10:00
moduerrno.c all: Remove third argument to MP_REGISTER_MODULE. 2022-06-02 16:31:37 +10:00
mpconfig.h py/gc: Allow the GC heap to be split over multiple memory areas. 2022-07-23 00:42:54 +10:00
mperrno.h
mphal.h
mpprint.c
mpprint.h
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
nlraarch64.c
nlrpowerpc.c
nlrsetjmp.c
nlrthumb.c
nlrx64.c
nlrx86.c
nlrxtensa.c
obj.c py/obj: Make mp_obj_get_complex_maybe call mp_obj_get_float_maybe first. 2022-07-25 16:11:26 +10:00
obj.h py/make_root_pointers: Add MP_REGISTER_ROOT_POINTER parser/generator. 2022-07-18 13:48:23 +10:00
objarray.c
objarray.h
objattrtuple.c
objbool.c
objboundmeth.c
objcell.c py/objcell: Make cell get/set funcs static-inline to reduce code size. 2022-06-20 23:37:38 +10:00
objclosure.c py/objclosure: Forward function attributes for closures. 2022-06-24 23:46:59 +10:00
objcomplex.c py/obj: Make mp_obj_get_complex_maybe call mp_obj_get_float_maybe first. 2022-07-25 16:11:26 +10:00
objdeque.c
objdict.c
objenumerate.c
objexcept.c py/obj: Add static safety checks to mp_obj_is_type(). 2022-07-18 11:17:46 +10:00
objexcept.h
objfilter.c
objfloat.c py/parsenum: Optimise when building with complex disabled. 2022-06-23 11:46:47 +10:00
objfun.c py/obj: Add static safety checks to mp_obj_is_type(). 2022-07-18 11:17:46 +10:00
objfun.h
objgenerator.c
objgenerator.h
objgetitemiter.c
objint.c py/obj: Add static safety checks to mp_obj_is_type(). 2022-07-18 11:17:46 +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
objlist.h
objmap.c
objmodule.c py: Change makemoduledefs process so it uses output of qstr extraction. 2022-06-02 16:29:53 +10:00
objmodule.h
objnamedtuple.c py/objnamedtuple: Fix segfault with empty namedtuple. 2022-07-13 16:25:35 +10:00
objnamedtuple.h
objnone.c
objobject.c
objpolyiter.c
objproperty.c
objrange.c
objreversed.c
objset.c
objsingleton.c
objslice.c
objstr.c py/obj: Add static safety checks to mp_obj_is_type(). 2022-07-18 11:17:46 +10:00
objstr.h
objstringio.c
objstringio.h
objstrunicode.c
objtuple.c
objtuple.h
objtype.c py/obj: Add support for __float__ and __complex__ functions. 2022-07-25 14:23:34 +10:00
objtype.h
objzip.c
opmethods.c
pairheap.c
pairheap.h
parse.c py/parsenum: Optimise when building with complex disabled. 2022-06-23 11:46:47 +10:00
parse.h
parsenum.c py/parsenum: Optimise when building with complex disabled. 2022-06-23 11:46:47 +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/persistentcode: Use MP_REGISTER_ROOT_POINTER(). 2022-07-18 13:52:01 +10:00
persistentcode.h py/persistentcode: Select ARMV6M as maximum when __thumb2__ not defined. 2022-05-23 23:01:25 +10:00
profile.c
profile.h
py.cmake
py.mk py/make_root_pointers: Add MP_REGISTER_ROOT_POINTER parser/generator. 2022-07-18 13:48:23 +10:00
pystack.c
pystack.h
qstr.c
qstr.h py/qstr: Make mp_decompress_rom_string decl and def the same. 2022-07-18 23:27:28 +10:00
qstrdefs.h
reader.c
reader.h
repl.c
repl.h
ringbuf.c
ringbuf.h
runtime.c py/runtime: Fix crash in star arg unpacking. 2022-08-06 11:32:58 -05:00
runtime.h py/scheduler: De-inline and fix race with pending exception / scheduler. 2022-07-12 15:54:33 +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
stream.h
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