René's URL Explorer Experiment


Title: new `TestUopsOptimization` test case failing an assert · Issue #117180 · python/cpython · GitHub

Open Graph Title: new `TestUopsOptimization` test case failing an assert · Issue #117180 · python/cpython

X Title: new `TestUopsOptimization` test case failing an assert · Issue #117180 · python/cpython

Description: Bug report Bug description: While writing test cases for #116168, I ran into a case that failed on main too. Here's the test as a diff. It's under test_opt.TestUopsOptimization: diff --git a/Lib/test/test_capi/test_opt.py b/Lib/test/test...

Open Graph Description: Bug report Bug description: While writing test cases for #116168, I ran into a case that failed on main too. Here's the test as a diff. It's under test_opt.TestUopsOptimization: diff --git a/Lib/te...

X Description: Bug report Bug description: While writing test cases for #116168, I ran into a case that failed on main too. Here's the test as a diff. It's under test_opt.TestUopsOptimization: diff --git ...

Opengraph URL: https://github.com/python/cpython/issues/117180

X: @github

direct link

Domain: github.com


Hey, it has json ld scripts:
{"@context":"https://schema.org","@type":"DiscussionForumPosting","headline":"new `TestUopsOptimization` test case failing an assert","articleBody":"# Bug report\n\n### Bug description:\n\nWhile writing test cases for #116168, I ran into a case that failed on `main` too. Here's the test as a diff. It's under `test_opt.TestUopsOptimization`:\n\n```diff\ndiff --git a/Lib/test/test_capi/test_opt.py b/Lib/test/test_capi/test_opt.py\nindex b0859a382d..269753e4c1 100644\n--- a/Lib/test/test_capi/test_opt.py\n+++ b/Lib/test/test_capi/test_opt.py\n@@ -955,6 +955,31 @@ def testfunc(n):\n         _, ex = self._run_with_optimizer(testfunc, 16)\n         self.assertIsNone(ex)\n\n+    def test_many_nested(self):\n+        # overflow the trace_stack\n+        def dummy_a(x):\n+            return x\n+        def dummy_b(x):\n+            return dummy_a(x)\n+        def dummy_c(x):\n+            return dummy_b(x)\n+        def dummy_d(x):\n+            return dummy_c(x)\n+        def dummy_e(x):\n+            return dummy_d(x)\n+        def dummy_f(x):\n+            return dummy_e(x)\n+        def dummy_g(x):\n+            return dummy_f(x)\n+        def dummy_h(x):\n+            return dummy_g(x)\n+        def testfunc(n):\n+            a = 0\n+            for _ in range(n):\n+                a += dummy_h(n)\n+            return a\n+\n+        self._run_with_optimizer(testfunc, 32)\n\n if __name__ == \"__main__\":\n     unittest.main()\n```\n\nI'm running this locally (source build of `main` `9967b568edd2e35b0415c14c7242f3ca2c0dc03d` on an M1 mac).\n\nCommand:\n\n```\n./python.exe -m test test.test_capi.test_opt\n```\n\nOutput:\n\n```\nUsing random seed: 1780919823\nRaised RLIMIT_NOFILE: 256 -\u003e 1024\n0:00:00 load avg: 2.88 Run 1 test sequentially\n0:00:00 load avg: 2.88 [1/1] test.test_capi.test_opt\nAssertion failed: ((this_instr + 2)-\u003eopcode == _PUSH_FRAME), function optimize_uops, file optimizer_cases.c.h, line 1600.\nFatal Python error: Aborted\n\nCurrent thread 0x000000020140a100 (most recent call first):\n  File \"/Users/peterlazorchak/repos/oss-clones/forks/cpython/Lib/test/test_capi/test_opt.py\", line 979 in testfunc\n  File \"/Users/peterlazorchak/repos/oss-clones/forks/cpython/Lib/test/test_capi/test_opt.py\", line 588 in _run_with_optimizer\n  File \"/Users/peterlazorchak/repos/oss-clones/forks/cpython/Lib/test/test_capi/test_opt.py\", line 982 in test_many_nested\n  File \"/Users/peterlazorchak/repos/oss-clones/forks/cpython/Lib/unittest/case.py\", line 589 in _callTestMethod\n....[truncated for brevity]....\n  File \"/Users/peterlazorchak/repos/oss-clones/forks/cpython/Lib/runpy.py\", line 88 in _run_code\n  File \"/Users/peterlazorchak/repos/oss-clones/forks/cpython/Lib/runpy.py\", line 198 in _run_module_as_main\n\nExtension modules: _testcapi, _testinternalcapi (total: 2)\nzsh: abort      ./python.exe -m test test.test_capi.test_opt\n```\n\nThis assertion is in the optimizer case for `_INIT_CALL_PY_EXACT_ARGS`. I haven't investigated any further beyond that.\n\n### CPython versions tested on:\n\nCPython main branch\n\n### Operating systems tested on:\n\nmacOS\n\n\u003c!-- gh-linked-prs --\u003e\n### Linked PRs\n* gh-117184\n\u003c!-- /gh-linked-prs --\u003e\n","author":{"url":"https://github.com/lazorchakp","@type":"Person","name":"lazorchakp"},"datePublished":"2024-03-23T13:26:34.000Z","interactionStatistic":{"@type":"InteractionCounter","interactionType":"https://schema.org/CommentAction","userInteractionCount":7},"url":"https://github.com/117180/cpython/issues/117180"}

route-pattern/_view_fragments/issues/show/:user_id/:repository/:id/issue_layout(.:format)
route-controllervoltron_issues_fragments
route-actionissue_layout
fetch-noncev2:86d7a298-8666-2a3b-7db1-28c092470d46
current-catalog-service-hash81bb79d38c15960b92d99bca9288a9108c7a47b18f2423d0f6438c5b7bcd2114
request-idC9A0:93150:5A33D90:7E4E9DA:6A572DBE
html-safe-noncedaca7c54a750a3e054ae4494b12fd14b1519a7cb58ac47b87952dd1247296f17
visitor-payloadeyJyZWZlcnJlciI6IiIsInJlcXVlc3RfaWQiOiJDOUEwOjkzMTUwOjVBMzNEOTA6N0U0RTlEQTo2QTU3MkRCRSIsInZpc2l0b3JfaWQiOiIxNzYyNzQ0MDIyNzU2NDM3NDM4IiwicmVnaW9uX2VkZ2UiOiJpYWQiLCJyZWdpb25fcmVuZGVyIjoiaWFkIn0=
visitor-hmacf7c1fe28963a13024a8107052fd3d361230ccb6f8ccfe001fe0d4e777c7d4c9d
hovercard-subject-tagissue:2203879536
github-keyboard-shortcutsrepository,issues,copilot
google-site-verificationApib7-x98H0j5cPqHWwSMm6dNU4GmODRoqxLiDzdx9I
octolytics-urlhttps://collector.github.com/github/collect
analytics-location///voltron/issues_fragments/issue_layout
fb:app_id1401488693436528
apple-itunes-appapp-id=1477376905, app-argument=https://github.com/_view_fragments/issues/show/python/cpython/117180/issue_layout
twitter:imagehttps://opengraph.githubassets.com/d7cf05f5d46a2c0dce5c5ce4220c756fdab71b44734d9ccff6b5f3638124bee0/python/cpython/issues/117180
twitter:cardsummary_large_image
og:imagehttps://opengraph.githubassets.com/d7cf05f5d46a2c0dce5c5ce4220c756fdab71b44734d9ccff6b5f3638124bee0/python/cpython/issues/117180
og:image:altBug report Bug description: While writing test cases for #116168, I ran into a case that failed on main too. Here's the test as a diff. It's under test_opt.TestUopsOptimization: diff --git a/Lib/te...
og:image:width1200
og:image:height600
og:site_nameGitHub
og:typeobject
og:author:usernamelazorchakp
hostnamegithub.com
expected-hostnamegithub.com
None4e7a7296a3830877cf21a6ad2a972c9e618a48915e03966cf0c53eb08e5aad98
turbo-cache-controlno-preview
go-importgithub.com/python/cpython git https://github.com/python/cpython.git
octolytics-dimension-user_id1525981
octolytics-dimension-user_loginpython
octolytics-dimension-repository_id81598961
octolytics-dimension-repository_nwopython/cpython
octolytics-dimension-repository_publictrue
octolytics-dimension-repository_is_forkfalse
octolytics-dimension-repository_network_root_id81598961
octolytics-dimension-repository_network_root_nwopython/cpython
turbo-body-classeslogged-out env-production page-responsive
disable-turbofalse
browser-stats-urlhttps://api.github.com/_private/browser/stats
browser-errors-urlhttps://api.github.com/_private/browser/errors
release2576d1f0198cf1588faf2edf27f1ed120903be10
ui-targetfull
theme-color#1e2327
color-schemelight dark

Links:

Skip to contenthttps://github.com/python/cpython/issues/117180#start-of-content
https://github.com/
Sign in https://github.com/login?return_to=https%3A%2F%2Fgithub.com%2Fpython%2Fcpython%2Fissues%2F117180
GitHub CopilotWrite better code with AIhttps://github.com/features/copilot
GitHub Copilot appDirect agents from issue to mergehttps://github.com/features/ai/github-app
MCP RegistryNewIntegrate external toolshttps://github.com/mcp
ActionsAutomate any workflowhttps://github.com/features/actions
CodespacesInstant dev environmentshttps://github.com/features/codespaces
IssuesPlan and track workhttps://github.com/features/issues
Code ReviewManage code changeshttps://github.com/features/code-review
GitHub Advanced SecurityFind and fix vulnerabilitieshttps://github.com/security/advanced-security
Code securitySecure your code as you buildhttps://github.com/security/advanced-security/code-security
Secret protectionStop leaks before they starthttps://github.com/security/advanced-security/secret-protection
Why GitHubhttps://github.com/why-github
Documentationhttps://docs.github.com
Bloghttps://github.blog
Changeloghttps://github.blog/changelog
Marketplacehttps://github.com/marketplace
View all featureshttps://github.com/features
Enterpriseshttps://github.com/enterprise
Small and medium teamshttps://github.com/team
Startupshttps://github.com/enterprise/startups
Nonprofitshttps://github.com/solutions/industry/nonprofits
App Modernizationhttps://github.com/solutions/use-case/app-modernization
DevSecOpshttps://github.com/solutions/use-case/devsecops
DevOpshttps://github.com/solutions/use-case/devops
CI/CDhttps://github.com/solutions/use-case/ci-cd
View all use caseshttps://github.com/solutions/use-case
Healthcarehttps://github.com/solutions/industry/healthcare
Financial serviceshttps://github.com/solutions/industry/financial-services
Manufacturinghttps://github.com/solutions/industry/manufacturing
Governmenthttps://github.com/solutions/industry/government
View all industrieshttps://github.com/solutions/industry
View all solutionshttps://github.com/solutions
AIhttps://github.com/resources/articles?topic=ai
Software Developmenthttps://github.com/resources/articles?topic=software-development
DevOpshttps://github.com/resources/articles?topic=devops
Securityhttps://github.com/resources/articles?topic=security
View all topicshttps://github.com/resources/articles
Customer storieshttps://github.com/customer-stories
Events & webinarshttps://github.com/resources/events
Ebooks & reportshttps://github.com/resources/whitepapers
Business insightshttps://github.com/solutions/executive-insights
GitHub Skillshttps://skills.github.com
Documentationhttps://docs.github.com
Customer supporthttps://support.github.com
Community forumhttps://github.com/orgs/community/discussions
Trust centerhttps://github.com/trust-center
Partnershttps://github.com/partners
View all resourceshttps://github.com/resources
GitHub SponsorsFund open source developershttps://github.com/open-source/sponsors
Security Labhttps://securitylab.github.com
Maintainer Communityhttps://maintainers.github.com
Acceleratorhttps://github.com/open-source/accelerator
GitHub Starshttps://stars.github.com
Archive Programhttps://archiveprogram.github.com
Topicshttps://github.com/topics
Trendinghttps://github.com/trending
Collectionshttps://github.com/collections
Enterprise platformAI-powered developer platformhttps://github.com/enterprise
GitHub Advanced SecurityEnterprise-grade security featureshttps://github.com/security/advanced-security
Copilot for BusinessEnterprise-grade AI featureshttps://github.com/features/copilot/copilot-business
Premium SupportEnterprise-grade 24/7 supporthttps://github.com/enterprise/premium-support
Pricinghttps://github.com/pricing
Search syntax tipshttps://docs.github.com/search-github/github-code-search/understanding-github-code-search-syntax
documentationhttps://docs.github.com/search-github/github-code-search/understanding-github-code-search-syntax
Sign in https://github.com/login?return_to=https%3A%2F%2Fgithub.com%2Fpython%2Fcpython%2Fissues%2F117180
Sign up https://github.com/signup?ref_cta=Sign+up&ref_loc=header+logged+out&ref_page=%2F%3Cuser-name%3E%2F%3Crepo-name%3E%2Fvoltron%2Fissues_fragments%2Fissue_layout&source=header-repo&source_repo=python%2Fcpython
Reloadhttps://github.com/python/cpython/issues/117180
Reloadhttps://github.com/python/cpython/issues/117180
Reloadhttps://github.com/python/cpython/issues/117180
Please reload this pagehttps://github.com/python/cpython/issues/117180
python https://github.com/python
cpythonhttps://github.com/python/cpython
Please reload this pagehttps://github.com/python/cpython/issues/117180
Notifications https://github.com/login?return_to=%2Fpython%2Fcpython
Fork 35k https://github.com/login?return_to=%2Fpython%2Fcpython
Star 73.8k https://github.com/login?return_to=%2Fpython%2Fcpython
Code https://github.com/python/cpython
Issues 5k+ https://github.com/python/cpython/issues
Pull requests 2.3k https://github.com/python/cpython/pulls
Actions https://github.com/python/cpython/actions
Projects https://github.com/python/cpython/projects
Security and quality 0 https://github.com/python/cpython/security
Insights https://github.com/python/cpython/pulse
Code https://github.com/python/cpython
Issues https://github.com/python/cpython/issues
Pull requests https://github.com/python/cpython/pulls
Actions https://github.com/python/cpython/actions
Projects https://github.com/python/cpython/projects
Security and quality https://github.com/python/cpython/security
Insights https://github.com/python/cpython/pulse
new TestUopsOptimization test case failing an asserthttps://github.com/python/cpython/issues/117180#top
https://github.com/gvanrossum
type-bugAn unexpected behavior, bug, or errorhttps://github.com/python/cpython/issues?q=state%3Aopen%20label%3A%22type-bug%22
https://github.com/lazorchakp
lazorchakphttps://github.com/lazorchakp
on Mar 23, 2024https://github.com/python/cpython/issues/117180#issue-2203879536
#116168https://github.com/python/cpython/issues/116168
gh-117180: Complete call sequence when trace stack overflow #117184https://github.com/python/cpython/pull/117184
gvanrossumhttps://github.com/gvanrossum
type-bugAn unexpected behavior, bug, or errorhttps://github.com/python/cpython/issues?q=state%3Aopen%20label%3A%22type-bug%22
https://github.com
Termshttps://docs.github.com/site-policy/github-terms/github-terms-of-service
Privacyhttps://docs.github.com/site-policy/privacy-policies/github-privacy-statement
Securityhttps://github.com/security
Statushttps://www.githubstatus.com/
Communityhttps://github.community/
Docshttps://docs.github.com/
Contacthttps://support.github.com?tags=dotcom-footer

Viewport: width=device-width


URLs of crawlers that visited me.