Title: Raise exec audit event for interpreter source helpers by youknowdot · Pull Request #9872 · RustPython/RustPython · GitHub
Open Graph Title: Raise exec audit event for interpreter source helpers by youknowdot · Pull Request #9872 · RustPython/RustPython
X Title: Raise exec audit event for interpreter source helpers by youknowdot · Pull Request #9872 · RustPython/RustPython
Description: Summary Raise the exec audit event before _testinternalcapi's simple-string interpreter helper evaluates its compiled code. A rejecting hook follows the existing exception printing / -1 return path, without executing the code. This follows CPython 3.15.2 PyRun_SimpleStringFlags -> run_mod behavior and the existing RustPython execution entry points. This is a narrow follow-up to #8954. It does not change signal-handler sharing or interpreter destruction semantics. Reproduction import sys import _interpreters import _testinternalcapi def hook(event, args): if event == "exec": raise RuntimeError("blocked by audit probe") sys.addaudithook(hook) result = _testinternalcapi.exec_interpreter( _interpreters.get_current()[0], "audit_marker = 42", main=False ) print(result, "audit_marker" in globals()) CPython 3.15.2 actual result: prints the rejection, returns -1, marker absent. The prior #8954 registry-candidate binary returned 0 and created the marker. Latest main 4045401e source retained that missing audit call. The historical candidate execution is not claimed as an exact latest-main binary test. Validation / WIP limits git diff --check: passed. rustfmt and normal commit hooks (merge-conflict, rustfmt, cspell): passed; Python/web-only hooks had no applicable files. Newly reconstructed candidate has not been compiled or executed yet. Workspace tests, C-API tests, Clippy, focused RustPython reproduction and CI remain pending. Existing runtime evidence was collected before the workspace reset; this draft preserves the narrow source fix while verification is restored. The separate signal-table issue requires ownership/GC and thread behavior validation. A destruction-race probe crashed CPython 3.15.2 itself, so this PR does not reinterpret that unsafe test-helper case as a confirmed compatibility bug.
Open Graph Description: Summary Raise the exec audit event before _testinternalcapi's simple-string interpreter helper evaluates its compiled code. A rejecting hook follows the existing exception printing / -1 return ...
X Description: Summary Raise the exec audit event before _testinternalcapi's simple-string interpreter helper evaluates its compiled code. A rejecting hook follows the existing exception printing / -1 ret...
Opengraph URL: https://github.com/RustPython/RustPython/pull/9872
X: @github
Domain: github.com
| react-profiling | 0 |
| react-import-map | react,react-dom,react-dom/client,react-dom/profiling,react-is,react/compiler-runtime,react/jsx-dev-runtime,react/jsx-runtime,scheduler@b8488ee2c322 |
| route-pattern | /:user_id/:repository/pull/:id/files(.:format) |
| route-controller | pull_requests |
| route-action | files |
| fetch-nonce | v2:885d7410-32bf-954b-3914-ff5000c08bcd |
| current-catalog-service-hash | ae870bc5e265a340912cde392f23dad3671a0a881730ffdadd82f2f57d81641b |
| request-id | E6E0:33D24F:325D2ED:40ADE21:6B01E3FC |
| html-safe-nonce | b79c57afd9045ec625b7acf113dec26441ee8e563a995dd53813de4663ba1935 |
| visitor-payload | eyJyZWZlcnJlciI6IiIsInJlcXVlc3RfaWQiOiJFNkUwOjMzRDI0RjozMjVEMkVEOjQwQURFMjE6NkIwMUUzRkMiLCJ2aXNpdG9yX2lkIjoiNjM2NDI0NTQ0OTY3MDUxNzc1NiIsInJlZ2lvbl9lZGdlIjoiaWFkIiwicmVnaW9uX3JlbmRlciI6ImlhZCJ9 |
| visitor-hmac | ac9271a720a2b7d3c61b20f3ebb12514cd17d908ccc1b58aefc3c30212da2231 |
| hovercard-subject-tag | pull_request:5337114091 |
| github-keyboard-shortcuts | repository,pull-request-list,pull-request-conversation,pull-request-files-changed,copilot |
| google-site-verification | Apib7-x98H0j5cPqHWwSMm6dNU4GmODRoqxLiDzdx9I |
| octolytics-url | https://collector.github.com/github/collect |
| analytics-location | / |
| fb:app_id | 1401488693436528 |
| apple-itunes-app | app-id=1477376905, app-argument=https://github.com/RustPython/RustPython/pull/9872/files |
| twitter:image | https://avatars.githubusercontent.com/u/336763669?s=400&v=4 |
| twitter:card | summary_large_image |
| og:image | https://avatars.githubusercontent.com/u/336763669?s=400&v=4 |
| og:image:alt | Summary Raise the exec audit event before _testinternalcapi's simple-string interpreter helper evaluates its compiled code. A rejecting hook follows the existing exception printing / -1 return ... |
| og:site_name | GitHub |
| og:type | object |
| hostname | github.com |
| expected-hostname | github.com |
| None | cc5dfdd32f62ebd3223cab3af3aa2b268d3605218237326a48a99d1efd89495c |
| turbo-cache-control | no-preview |
| diff-view | unified |
| go-import | github.com/RustPython/RustPython git https://github.com/RustPython/RustPython.git |
| octolytics-dimension-user_id | 39710557 |
| octolytics-dimension-user_login | RustPython |
| octolytics-dimension-repository_id | 135201145 |
| octolytics-dimension-repository_nwo | RustPython/RustPython |
| octolytics-dimension-repository_public | true |
| octolytics-dimension-repository_is_fork | false |
| octolytics-dimension-repository_network_root_id | 135201145 |
| octolytics-dimension-repository_network_root_nwo | RustPython/RustPython |
| turbo-body-classes | logged-out env-production page-responsive |
| disable-turbo | true |
| browser-stats-url | https://api.github.com/_private/browser/stats |
| browser-errors-url | https://api.github.com/_private/browser/errors |
| release | 8c77c9e8439031ad54c75a250694842892f693e1 |
| ui-target | full |
| theme-color | #1e2327 |
| color-scheme | light dark |
Links:
Viewport: width=device-width