summaryrefslogtreecommitdiffstats
path: root/Python
Commit message (Collapse)AuthorAgeFilesLines
...
* ceval: Use _PyTuple_FromArraySteal in BUILD_TUPLE (GH-96516)Kevin Modzelewski2022-09-141-5/+2
|
* gh-87092: reduce redundancy and repetition in compiler's optimization stage ↵Irit Katriel2022-09-131-90/+63
| | | | (GH-96713)
* GH-96754: Check whether the interpreter frame is complete before creating ↵Mark Shannon2022-09-132-3/+8
| | | | frame object. (GH-96776)
* GH-96678: Fix undefined behavior in ceval.c (#96708)Mark Shannon2022-09-101-1/+7
|
* Replace ad-hoc labels with JUMP_TO_INSTRUCTION (GH-96634)Brandt Bucher2022-09-091-4/+4
|
* GH-90230: Fix warnings and failures with --enable-pystats (GH-96622)Brandt Bucher2022-09-091-0/+2
|
* Fix possible NULL pointer dereference in _PyThread_CurrentFrames (GH-96584)Kumar Aditya2022-09-091-1/+6
|
* GH-96636: Remove all uses of NOTRACE_DISPATCH (GH-96643)Mark Shannon2022-09-081-62/+59
| | | Co-authored-by: Brandt Bucher <brandtbucher@gmail.com>
* gh-96653: Remove duplicate CALL_STAT_INC(inlined_py_calls) in ↵Itamar Ostricher2022-09-081-1/+0
| | | | BINARY_SUBSCR_GETITEM (GH-96654)
* GH-90699: use statically allocated interned strings in typeobject's slotdefs ↵Kumar Aditya2022-09-071-5/+0
| | | | (GH-94706)
* gh-89545: Updates platform module to use new internal _wmi module on Windows ↵Steve Dower2022-09-071-30/+63
| | | | to directly query OS properties (GH-96289)
* gh-88057: in compile.c, assertion that stackdepth is alway >=0 is missing in ↵Irit Katriel2022-09-071-0/+1
| | | | one place (GH-96513)
* GH-91432: Remove the iterator_exhausted_no_error label (GH-96517)Brandt Bucher2022-09-071-16/+20
|
* GH-96572: fix use after free in trace refs build mode (#96618)Kumar Aditya2022-09-061-1/+1
|
* GH-96569: Add two NULL checks to avoid undefined behavior. (GH-96585)Mark Shannon2022-09-061-8/+5
|
* GH-93911: Fix `LOAD_ATTR_PROPERTY` caches (GH-96519)Brandt Bucher2022-09-061-5/+5
|
* ceval.c's GETITEM should have asserts, not set exceptions (GH-96518)Dennis Sweeney2022-09-041-2/+8
|
* gh-95778: CVE-2020-10735: Prevent DoS by very large int() (#96499)Gregory P. Smith2022-09-023-3/+186
| | | | | | | | | | | | | | | | Integer to and from text conversions via CPython's bignum `int` type is not safe against denial of service attacks due to malicious input. Very large input strings with hundred thousands of digits can consume several CPU seconds. This PR comes fresh from a pile of work done in our private PSRT security response team repo. Signed-off-by: Christian Heimes [Red Hat] <christian@python.org> Tons-of-polishing-up-by: Gregory P. Smith [Google] <greg@krypto.org> Reviews via the private PSRT repo via many others (see the NEWS entry in the PR). <!-- gh-issue-number: gh-95778 --> * Issue: gh-95778 <!-- /gh-issue-number --> I wrote up [a one pager for the release managers](https://docs.google.com/document/d/1KjuF_aXlzPUxTK4BMgezGJ2Pn7uevfX7g0_mvgHlL7Y/edit#). Much of that text wound up in the Issue. Backports PRs already exist. See the issue for links.
* gh-93554: Conditional jump opcodes only jump forward (GH-96318)Irit Katriel2022-09-014-220/+112
|
* gh-93678: apply remove_redundant_jumps in optimize_cfg (GH-96274)Irit Katriel2022-09-011-11/+33
|
* Remove the binary_subscr_dict_error label (GH-96443)Brandt Bucher2022-08-301-11/+4
|
* gh-96143: Allow Linux perf profiler to see Python calls (GH-96123)Pablo Galindo Salgado2022-08-304-1/+201
| | | | | | | :warning: :warning: Note for reviewers, hackers and fellow systems/low-level/compiler engineers :warning: :warning: If you have a lot of experience with this kind of shenanigans and want to improve the **first** version, **please make a PR against my branch** or **reach out by email** or **suggest code changes directly on GitHub**. If you have any **refinements or optimizations** please, wait until the first version is merged before starting hacking or proposing those so we can keep this PR productive.
* GH-96237: Allow non-functions as reference-holder in frames. (GH-96238)Mark Shannon2022-08-252-7/+11
|
* GH-93503: Add thread-specific APIs to set profiling and tracing functions in ↵Pablo Galindo Salgado2022-08-243-1/+131
| | | | | | | | | | | | | | | | | the C-API (#93504) * gh-93503: Add APIs to set profiling and tracing functions in all threads in the C-API * Use a separate API * Fix NEWS entry * Add locks around the loop * Document ignoring exceptions * Use the new APIs in the sys module * Update docs
* gh-87092: use basicblock_last_instr consistently in the compiler (GH-96243)Irit Katriel2022-08-241-29/+32
|
* GH-96177: Move GIL and eval breaker code out of ceval.c into ceval_gil.c. ↵Mark Shannon2022-08-243-974/+987
| | | | (GH-96204)
* gh-93678: add _testinternalcapi.optimize_cfg() and test utils for compiler ↵Irit Katriel2022-08-241-48/+210
| | | | optimization unit tests (GH-96007)
* GH-96071: fix deadlock in PyGILState_Ensure (GH-96124)Kumar Aditya2022-08-191-11/+16
| | | Alternative of #96107
* gh-96125: Fix sys.thread_info.name on pthread platforms (GH-96126)Christian Heimes2022-08-191-1/+1
| | | Automerge-Triggered-By: GH:tiran
* GH-90997: Wrap yield from/await in a virtual try/except StopIteration (GH-96010)Brandt Bucher2022-08-193-19/+49
|
* gh-96017: Fix some compiler warnings (GH-96018)Christian Heimes2022-08-191-0/+2
| | | | | - "comparison of integers of different signs" in typeobject.c - only define static_builtin_index_is_set in DEBUG builds - only define recreate_gil with ifdef HAVE_FORK
* Remove dead code in _PyDict_GetItemHint and rename to _PyDict_LookupIndex ↵Matthias Görgens2022-08-181-9/+6
| | | | (GH-95948)
* GH-93911: Specialize `LOAD_ATTR` for custom `__getattribute__` (GH-93988)Ken Jin2022-08-174-32/+158
|
* GH-95909: Make `_PyArg_Parser` initialization thread safe (GH-95958)Kumar Aditya2022-08-162-12/+44
|
* gh-95853: Add script to automate WASM build (GH-95828)Christian Heimes2022-08-131-3/+7
| | | | | | | | | | | | Automate WASM build with a new Python script. The script provides several build profiles with configure flags for Emscripten flavors and WASI. The script can detect and use Emscripten SDK and WASI SDK from default locations or env vars. ``configure`` now detects Node arguments and creates HOSTRUNNER arguments for Node 16. It also sets correct arguments for ``wasm64-emscripten``. Co-authored-by: Brett Cannon <brett@python.org>
* gh-90928: Improve static initialization of keywords tuple in AC (#95907)Erlend E. Aasland2022-08-136-261/+111
|
* gh-95922: compiler's eliminate_empty_basic_blocks ignores the last block of ↵Irit Katriel2022-08-121-8/+5
| | | | the compilation unit (GH-95924)
* gh-90928: Statically Initialize the Keywords Tuple in Clinic-Generated Code ↵Eric Snow2022-08-1110-104/+716
| | | | | | | | | | | | | | | | (gh-95860) We only statically initialize for core code and builtin modules. Extension modules still create the tuple at runtime. We'll solve that part of interpreter isolation separately. This change includes generated code. The non-generated changes are in: * Tools/clinic/clinic.py * Python/getargs.c * Include/cpython/modsupport.h * Makefile.pre.in (re-generate global strings after running clinic) * very minor tweaks to Modules/_codecsmodule.c and Python/Python-tokenize.c All other changes are generated code (clinic, global strings).
* gh-87092: compiler's codegen stage uses int jump target labels, and the ↵Irit Katriel2022-08-111-70/+52
| | | | target pointer is only calculated just before optimization stage (GH-95655)
* GH-95818: Skip incomplete frames in `PyThreadState_GetFrame` (GH-95886)Mark Shannon2022-08-111-2/+6
|
* Update _PyEval_AddPendingCall comment (#95817)zhanpon2022-08-111-2/+2
|
* gh-93243: Make smtpd private before porting its users (GH-93246)Oleg Iarygin2022-08-061-1/+0
| | | | | | | gh-93243 This PR is required to reduce diffs of the following porting (no need to either maintain documentation and tests consistent with each porting step, or try to port everything and remove smtpd in a single PR). Automerge-Triggered-By: GH:warsaw
* gh-87092: create a 'jump target label' abstraction so that the compiler's ↵Irit Katriel2022-08-041-354/+385
| | | | codegen stage does not work directly with basic blocks (GH-95398)
* GH-95245: Store object values and dict pointers in single tagged pointer. ↵Mark Shannon2022-08-012-15/+20
| | | | (GH-95278)
* bpo-45445: Revert "bpo-45445: Fail if an invalid X-option is provided in the ↵Pablo Galindo Salgado2022-07-311-48/+0
| | | | command line (GH-28823)" (#94745)
* GH-90081: Run python tracers at full speed (GH-95328)Mark Shannon2022-07-281-4/+7
|
* gh-94938: Fix errror detection of unexpected keyword arguments (GH-94999)Serhiy Storchaka2022-07-281-85/+57
| | | | | | | | | | When keyword argument name is an instance of a str subclass with overloaded methods __eq__ and __hash__, the former code could not find the name of an extraneous keyword argument to report an error, and _PyArg_UnpackKeywords() returned success without setting the corresponding cell in the linearized arguments array. But since the number of expected initialized cells is determined as the total number of passed arguments, this lead to reading NULL as a keyword parameter value, that caused SystemError or crash or other undesired behavior.
* gh-95174: Add pthread stubs for WASI (GH-95234)Christian Heimes2022-07-273-6/+201
| | | Co-authored-by: Brett Cannon <brett@python.org>
* gh-93678: extract 'struct cfg_builder' from the compiler so that the CFG can ↵Irit Katriel2022-07-261-120/+113
| | | | be manipulated directly (GH-95107)
* gh-95174: Handle missing dup() and constants in WASI (GH-95229)Christian Heimes2022-07-262-1/+11
| | | | | | | - check for ``dup()`` libc function - handle missing ``F_DUPFD`` in ``dup2()`` replacement function - add workaround for WASI libc bug in MSG_TRUNC - ESHUTDOWN is missing, use EPIPE instead - POLLPRI is missing, define as 0 (no-op)