Title: casting pointers to/from char * switches endianity · Issue #29 · crash-python/crash-python · GitHub
Open Graph Title: casting pointers to/from char * switches endianity · Issue #29 · crash-python/crash-python
X Title: casting pointers to/from char * switches endianity · Issue #29 · crash-python/crash-python
Description: This is most likely a gdb bug, we IIRC we agreed to collect all issues here. With the not-yet-commited ppc64 arch support from Jeff, on 11SP4 ppc64 kernel dump (thus big endian), with crash-python running on x86_64, I see the following p...
Open Graph Description: This is most likely a gdb bug, we IIRC we agreed to collect all issues here. With the not-yet-commited ppc64 arch support from Jeff, on 11SP4 ppc64 kernel dump (thus big endian), with crash-python ...
X Description: This is most likely a gdb bug, we IIRC we agreed to collect all issues here. With the not-yet-commited ppc64 arch support from Jeff, on 11SP4 ppc64 kernel dump (thus big endian), with crash-python ...
Opengraph URL: https://github.com/crash-python/crash-python/issues/29
X: @github
Domain: github.com
{"@context":"https://schema.org","@type":"DiscussionForumPosting","headline":"casting pointers to/from char * switches endianity","articleBody":"This is most likely a gdb bug, we IIRC we agreed to collect all issues here.\r\nWith the not-yet-commited ppc64 arch support from Jeff, on 11SP4 ppc64 kernel dump (thus big endian), with crash-python running on x86_64, I see the following problem:\r\n\r\n\u003e\u003e\u003e print(gdb.Value(0xc0000007ef86f5f0).cast(gdb.lookup_type('struct list_head').pointer()))\r\n0xc0000007ef86f5f0\r\n\r\nOK so far\r\n\r\n\u003e\u003e\u003e print(gdb.Value(0xc0000007ef86f5f0).cast(gdb.lookup_type('char').pointer()))\r\n0xc0000007ef86f5f0 \"\\300\"\r\n\r\nalso OK, but:\r\n\r\n\u003e\u003e\u003e print(gdb.Value(0xc0000007ef86f5f0).cast(gdb.lookup_type('struct list_head').pointer()).cast(gdb.lookup_type('char').pointer()))\r\n0xf0f586ef070000c0 \u003cerror: Cannot access memory at address 0xf0f586ef070000c0\u003e\r\n\r\nI.e. casting from one kind of pointer to char pointer switches endianity.\r\n\r\nOpposite direction as well:\r\n\r\n\u003e\u003e\u003e print(gdb.Value(0xc0000007ef86f5f0).cast(gdb.lookup_type('char').pointer()).cast(gdb.lookup_type('struct list_head').pointer()))\r\n0xf0f586ef070000c0\r\n\r\nInterestingly enough, when \"char *\" is not involved at all...\r\n\r\n\u003e\u003e\u003e print(gdb.Value(0xc0000007ef86f5f0).cast(gdb.lookup_type('struct page').pointer()).cast(gdb.lookup_type('struct list_head').pointer()))\r\n0xc0000007ef86f5f0\r\n\r\nThis breaks the current implementation of container_of(), I have modified it locally to cast to long instead of charp.","author":{"url":"https://github.com/tehcaster","@type":"Person","name":"tehcaster"},"datePublished":"2019-02-07T08:05:11.000Z","interactionStatistic":{"@type":"InteractionCounter","interactionType":"https://schema.org/CommentAction","userInteractionCount":0},"url":"https://github.com/29/crash-python/issues/29"}
| 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:f1739add-589f-e5a5-677a-afc9b841872d |
| current-catalog-service-hash | 81bb79d38c15960b92d99bca9288a9108c7a47b18f2423d0f6438c5b7bcd2114 |
| request-id | 99B8:19B134:181BE1:21D34A:6A62EC3F |
| html-safe-nonce | 0a53e1daa49a01151b9da5d4da23d210b0f787b17adb86475bb37463ac807e8d |
| visitor-payload | eyJyZWZlcnJlciI6IiIsInJlcXVlc3RfaWQiOiI5OUI4OjE5QjEzNDoxODFCRTE6MjFEMzRBOjZBNjJFQzNGIiwidmlzaXRvcl9pZCI6IjQ3MDI3NjY1OTk5Mjk3ODU0MDciLCJyZWdpb25fZWRnZSI6ImlhZCIsInJlZ2lvbl9yZW5kZXIiOiJpYWQifQ== |
| visitor-hmac | fdaaca2ebe50d17f670eb6860504b0dbd851243c84b2373f07687c585c32b90d |
| hovercard-subject-tag | issue:407580472 |
| 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/crash-python/crash-python/29/issue_layout |
| twitter:image | https://opengraph.githubassets.com/50652dc1a23fa1156f4aa104cf2e53ab5e6ce3173cafa121a5876eb15b6075c3/crash-python/crash-python/issues/29 |
| twitter:card | summary_large_image |
| og:image | https://opengraph.githubassets.com/50652dc1a23fa1156f4aa104cf2e53ab5e6ce3173cafa121a5876eb15b6075c3/crash-python/crash-python/issues/29 |
| og:image:alt | This is most likely a gdb bug, we IIRC we agreed to collect all issues here. With the not-yet-commited ppc64 arch support from Jeff, on 11SP4 ppc64 kernel dump (thus big endian), with crash-python ... |
| og:image:width | 1200 |
| og:image:height | 600 |
| og:site_name | GitHub |
| og:type | object |
| og:author:username | tehcaster |
| hostname | github.com |
| expected-hostname | github.com |
| None | df33b1b61ee7b9a0af988199bfc3503c9c1acafb1f1d40e1f140ea7c84f890dd |
| turbo-cache-control | no-preview |
| go-import | github.com/crash-python/crash-python git https://github.com/crash-python/crash-python.git |
| octolytics-dimension-user_id | 59613134 |
| octolytics-dimension-user_login | crash-python |
| octolytics-dimension-repository_id | 51460283 |
| octolytics-dimension-repository_nwo | crash-python/crash-python |
| octolytics-dimension-repository_public | true |
| octolytics-dimension-repository_is_fork | false |
| octolytics-dimension-repository_network_root_id | 51460283 |
| octolytics-dimension-repository_network_root_nwo | crash-python/crash-python |
| 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 | d41cd1bdb290013455c0ac430fa755621733f5eb |
| ui-target | full |
| theme-color | #1e2327 |
| color-scheme | light dark |
Links:
Viewport: width=device-width