Title: BOLT fails with `--enabled-shared` on LLVM 19 with "unable to get new address" · Issue #128472 · python/cpython · GitHub
Open Graph Title: BOLT fails with `--enabled-shared` on LLVM 19 with "unable to get new address" · Issue #128472 · python/cpython
X Title: BOLT fails with `--enabled-shared` on LLVM 19 with "unable to get new address" · Issue #128472 · python/cpython
Description: Bug report Bug description: As originally reported in astral-sh/python-build-standalone#463 LLVM 19.x has a hard error when handling PIC compiled functions containing computed gotos. It appears prior versions of LLVM could silently have ...
Open Graph Description: Bug report Bug description: As originally reported in astral-sh/python-build-standalone#463 LLVM 19.x has a hard error when handling PIC compiled functions containing computed gotos. It appears pri...
X Description: Bug report Bug description: As originally reported in astral-sh/python-build-standalone#463 LLVM 19.x has a hard error when handling PIC compiled functions containing computed gotos. It appears pri...
Opengraph URL: https://github.com/python/cpython/issues/128472
X: @github
Domain: github.com
{"@context":"https://schema.org","@type":"DiscussionForumPosting","headline":"BOLT fails with `--enabled-shared` on LLVM 19 with \"unable to get new address\"","articleBody":"# Bug report\r\n\r\n### Bug description:\r\n\r\nAs originally reported in https://github.com/astral-sh/python-build-standalone/pull/463\r\n\r\n\u003e LLVM 19.x has a hard error when handling PIC compiled functions containing computed gotos. It appears prior versions of LLVM could silently have buggy behavior in this scenario. We need to skip functions with computed gotos to allow LLVM 19.x to work with BOLT.\r\n\r\nThis results in an error like\r\n\r\n```\r\nBOLT-ERROR: unable to get new address corresponding to input address 0x1af0fa in function _PyEval_EvalFrameDefault.localalias/1(*3). Consider adding this function to --skip-funcs=...\r\n```\r\n\r\nReproduced with\r\n\r\n```\r\n./configure \\\r\n py_cv_module__openssl=n/a \\\r\n py_cv_module__hashlib=n/a \\\r\n py_cv_module__gdbm=n/a \\\r\n --without-ensurepip \\\r\n --enable-shared \\\r\n --enable-optimizations \\\r\n --enable-bolt\r\n```\r\n\r\nWithout `--enable-shared`, the failure doesn't occur.\r\n\r\nThere's an upstream fix in progress at https://github.com/llvm/llvm-project/pull/120267 — I'm not sure when it will be available. In the meantime, we should skip the functions. The patch fixing this will extend the common flags proposed in #128455, e.g., https://github.com/zanieb/cpython/commit/5448cd91c1cb65a7bd3ee3a0d70e63f6dba0db57\r\n\r\nSee also, commentary at https://github.com/python/cpython/issues/124948#issuecomment-2566703343\r\n\r\n\u003cdetails\u003e\r\n\u003csummary\u003eAdditional logs\u003c/summary\u003e\r\n\u003cpre\u003e\r\nBOLT-INFO: Target architecture: x86_64\r\nBOLT-INFO: BOLT version: 6a0964d75628b15bafd078342120888c0e6d126f\r\nBOLT-INFO: first alloc address is 0x400000\r\nBOLT-INFO: creating new program header table at address 0x600000, offset 0x200000\r\nBOLT-WARNING: debug info will be stripped from the binary. Use -update-debug-sections to keep it.\r\nBOLT-INFO: enabling relocation mode\r\nBOLT-INFO: forcing -jump-tables=move for instrumentation\r\nBOLT-INFO: enabling lite mode\r\nBOLT-INFO: 0 out of 6 functions in the binary (0.0%) have non-empty execution profile\r\nBOLT-INSTRUMENTER: Number of indirect call site descriptors: 2\r\nBOLT-INSTRUMENTER: Number of indirect call target descriptors: 4\r\nBOLT-INSTRUMENTER: Number of function descriptors: 4\r\nBOLT-INSTRUMENTER: Number of branch counters: 1\r\nBOLT-INSTRUMENTER: Number of ST leaf node counters: 4\r\nBOLT-INSTRUMENTER: Number of direct call counters: 0\r\nBOLT-INSTRUMENTER: Total number of counters: 5\r\nBOLT-INSTRUMENTER: Total size of counters: 40 bytes (static alloc memory)\r\nBOLT-INSTRUMENTER: Total size of string table emitted: 47 bytes in file\r\nBOLT-INSTRUMENTER: Total size of descriptors: 356 bytes in file\r\nBOLT-INSTRUMENTER: Profile will be saved to file /fast/workspace/cpython/python.bolt\r\nBOLT-INFO: padding code to 0xa00000 to accommodate hot text\r\nBOLT-INFO: output linked against instrumentation runtime library, lib entry point is 0xa06950\r\nBOLT-INFO: clear procedure is 0xa02390\r\nBOLT-INFO: patched build-id (flipped last bit)\r\nBOLT-INFO: setting _end to 0xa0a0bc\r\nBOLT-INFO: setting _end to 0xa0a0bc\r\nBOLT-INFO: setting __bolt_runtime_start to 0xa06900\r\nBOLT-INFO: setting __bolt_runtime_fini to 0xa06950\r\nBOLT-INFO: setting __hot_start to 0x800000\r\nBOLT-INFO: setting __hot_end to 0x80014c\r\nBOLT-INFO: shared object or position-independent executable detected\r\nBOLT-INFO: Target architecture: x86_64\r\nBOLT-INFO: BOLT version: 6a0964d75628b15bafd078342120888c0e6d126f\r\nBOLT-INFO: first alloc address is 0x0\r\nBOLT-INFO: creating new program header table at address 0x600000, offset 0x600000\r\nBOLT-WARNING: debug info will be stripped from the binary. Use -update-debug-sections to keep it.\r\nBOLT-INFO: enabling relocation mode\r\nBOLT-INFO: forcing -jump-tables=move for instrumentation\r\nBOLT-INFO: enabling lite mode\r\nBOLT-WARNING: Failed to analyze 1381 relocations\r\nBOLT-INFO: 0 out of 7363 functions in the binary (0.0%) have non-empty execution profile\r\nBOLT-INSTRUMENTER: Number of indirect call site descriptors: 1508\r\nBOLT-INSTRUMENTER: Number of indirect call target descriptors: 7281\r\nBOLT-INSTRUMENTER: Number of function descriptors: 7281\r\nBOLT-INSTRUMENTER: Number of branch counters: 82352\r\nBOLT-INSTRUMENTER: Number of ST leaf node counters: 43921\r\nBOLT-INSTRUMENTER: Number of direct call counters: 0\r\nBOLT-INSTRUMENTER: Total number of counters: 126273\r\nBOLT-INSTRUMENTER: Total size of counters: 1010184 bytes (static alloc memory)\r\nBOLT-INSTRUMENTER: Total size of string table emitted: 186842 bytes in file\r\nBOLT-INSTRUMENTER: Total size of descriptors: 8306748 bytes in file\r\nBOLT-INSTRUMENTER: Profile will be saved to file /fast/workspace/cpython/libpython3.14.so.1.0.bolt\r\nBOLT-INFO: 62323 instructions were shortened\r\nBOLT-INFO: removed 156 empty blocks\r\nBOLT-INFO: UCE removed 1608 blocks and 99444 bytes of code\r\nBOLT-INFO: padding code to 0x1000000 to accommodate hot text\r\nBOLT-INFO: output linked against instrumentation runtime library, lib entry point is 0x11be950\r\nBOLT-INFO: clear procedure is 0x11ba390\r\nBOLT-INFO: patched build-id (flipped last bit)\r\nBOLT-INFO: setting __bolt_runtime_start to 0x11be900\r\nBOLT-INFO: setting __bolt_runtime_fini to 0x11be950\r\nBOLT-INFO: setting __hot_start to 0x800000\r\nBOLT-INFO: setting __hot_end to 0xe1e116\r\nBOLT-ERROR: unable to get new address corresponding to input address 0x1af0fa in function _PyEval_EvalFrameDefault.localalias/1(*3). Consider adding this function to --skip-funcs=...\r\n\u003c/pre\u003e\r\n\u003c/details\u003e\r\n\r\n\r\n### CPython versions tested on:\r\n\r\nCPython main branch\r\n\r\n### Operating systems tested on:\r\n\r\nLinux\n\n\u003c!-- gh-linked-prs --\u003e\n### Linked PRs\n* gh-128511\n* gh-128572\n* gh-128573\n\u003c!-- /gh-linked-prs --\u003e\n","author":{"url":"https://github.com/zanieb","@type":"Person","name":"zanieb"},"datePublished":"2025-01-04T07:04:23.000Z","interactionStatistic":{"@type":"InteractionCounter","interactionType":"https://schema.org/CommentAction","userInteractionCount":1},"url":"https://github.com/128472/cpython/issues/128472"}
| route-pattern | /_view_fragments/issues/show/:user_id/:repository/:id/issue_layout(.:format) |
| route-controller | voltron_issues_fragments |
| route-action | issue_layout |
| fetch-nonce | v2:685fe6ea-39e1-b1b5-2c56-ef7baa9321bd |
| current-catalog-service-hash | 81bb79d38c15960b92d99bca9288a9108c7a47b18f2423d0f6438c5b7bcd2114 |
| request-id | 956A:3A35C6:439C38:5BD513:696AA8A0 |
| html-safe-nonce | ef8aaf60e40b0de148c942de1af5cf947d58b8e8ea1949b35bc66cd9edeff254 |
| visitor-payload | eyJyZWZlcnJlciI6IiIsInJlcXVlc3RfaWQiOiI5NTZBOjNBMzVDNjo0MzlDMzg6NUJENTEzOjY5NkFBOEEwIiwidmlzaXRvcl9pZCI6Ijg4MjQ1MTAyODQyNDg1NTc3MjgiLCJyZWdpb25fZWRnZSI6ImlhZCIsInJlZ2lvbl9yZW5kZXIiOiJpYWQifQ== |
| visitor-hmac | b3c5ca2fd4a32e0e00010007d3f933f9ca0167c47a0eec3204756ec4a3c9a7fe |
| hovercard-subject-tag | issue:2768550676 |
| github-keyboard-shortcuts | repository,issues,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/_view_fragments/issues/show/python/cpython/128472/issue_layout |
| twitter:image | https://opengraph.githubassets.com/6d01ad520fbbfa254e51c9713e87d3b1da1bacd6277d038a835a45bcee65e05b/python/cpython/issues/128472 |
| twitter:card | summary_large_image |
| og:image | https://opengraph.githubassets.com/6d01ad520fbbfa254e51c9713e87d3b1da1bacd6277d038a835a45bcee65e05b/python/cpython/issues/128472 |
| og:image:alt | Bug report Bug description: As originally reported in astral-sh/python-build-standalone#463 LLVM 19.x has a hard error when handling PIC compiled functions containing computed gotos. It appears pri... |
| og:image:width | 1200 |
| og:image:height | 600 |
| og:site_name | GitHub |
| og:type | object |
| og:author:username | zanieb |
| hostname | github.com |
| expected-hostname | github.com |
| None | 3eaf9b8cf1badcd7041a8ad480b9d9b28bea0ef1cc821ca9ff20f2cc7f4fe4b9 |
| turbo-cache-control | no-preview |
| go-import | github.com/python/cpython git https://github.com/python/cpython.git |
| octolytics-dimension-user_id | 1525981 |
| octolytics-dimension-user_login | python |
| octolytics-dimension-repository_id | 81598961 |
| octolytics-dimension-repository_nwo | python/cpython |
| octolytics-dimension-repository_public | true |
| octolytics-dimension-repository_is_fork | false |
| octolytics-dimension-repository_network_root_id | 81598961 |
| octolytics-dimension-repository_network_root_nwo | python/cpython |
| turbo-body-classes | logged-out env-production page-responsive |
| disable-turbo | false |
| browser-stats-url | https://api.github.com/_private/browser/stats |
| browser-errors-url | https://api.github.com/_private/browser/errors |
| release | dd9a979046e6382bd084e2bd873bf65f797125ff |
| ui-target | full |
| theme-color | #1e2327 |
| color-scheme | light dark |
Links:
Viewport: width=device-width