Title: Wrapping a Pointer where auto_dealloc is True with another Pointer will cause double free. · Issue #492 · Source-Python-Dev-Team/Source.Python · GitHub
Open Graph Title: Wrapping a Pointer where auto_dealloc is True with another Pointer will cause double free. · Issue #492 · Source-Python-Dev-Team/Source.Python
X Title: Wrapping a Pointer where auto_dealloc is True with another Pointer will cause double free. · Issue #492 · Source-Python-Dev-Team/Source.Python
Description: Code: from memory import Pointer from memory import alloc def test_pointer(): ptr = alloc(4) Pointer(ptr) test_pointer() Output: free(): double free detected in tcache 2 This also applies to CustomType. Code: from memory import alloc fro...
Open Graph Description: Code: from memory import Pointer from memory import alloc def test_pointer(): ptr = alloc(4) Pointer(ptr) test_pointer() Output: free(): double free detected in tcache 2 This also applies to Custom...
X Description: Code: from memory import Pointer from memory import alloc def test_pointer(): ptr = alloc(4) Pointer(ptr) test_pointer() Output: free(): double free detected in tcache 2 This also applies to Custom...
Opengraph URL: https://github.com/Source-Python-Dev-Team/Source.Python/issues/492
X: @github
Domain: patch-diff.githubusercontent.com
{"@context":"https://schema.org","@type":"DiscussionForumPosting","headline":"Wrapping a Pointer where auto_dealloc is True with another Pointer will cause double free.","articleBody":"Code:\r\n```python\r\nfrom memory import Pointer\r\nfrom memory import alloc\r\n\r\ndef test_pointer():\r\n ptr = alloc(4)\r\n Pointer(ptr)\r\n\r\ntest_pointer()\r\n```\r\nOutput:\r\n```\r\nfree(): double free detected in tcache 2\r\n```\r\n\r\nThis also applies to `CustomType`.\r\n\r\nCode:\r\n```python\r\nfrom memory import alloc\r\nfrom memory import make_object\r\nfrom memory.manager import CustomType\r\nfrom memory.manager import TypeManager\r\n\r\nmanager = TypeManager()\r\n\r\nclass Test(CustomType, metaclass=manager):\r\n _size = 4\r\n\r\ndef test_customtype():\r\n ptr = alloc(4)\r\n make_object(Test, ptr)\r\n\r\ntest_customtype()\r\n```\r\nOutput:\r\n```\r\nfree(): double free detected in tcache 2\r\n```","author":{"url":"https://github.com/CookStar","@type":"Person","name":"CookStar"},"datePublished":"2023-08-23T06:14:58.000Z","interactionStatistic":{"@type":"InteractionCounter","interactionType":"https://schema.org/CommentAction","userInteractionCount":0},"url":"https://github.com/492/Source.Python/issues/492"}
| 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:89b3c927-57a4-8d28-d460-3d2e01f36b37 |
| current-catalog-service-hash | 81bb79d38c15960b92d99bca9288a9108c7a47b18f2423d0f6438c5b7bcd2114 |
| request-id | 8B36:AA9C4:38797E6:4C68E34:69707E3E |
| html-safe-nonce | ae102ac0b968784fa7b5deec12f70d312b234fa873fc61cb4eb05e749cd28254 |
| visitor-payload | eyJyZWZlcnJlciI6IiIsInJlcXVlc3RfaWQiOiI4QjM2OkFBOUM0OjM4Nzk3RTY6NEM2OEUzNDo2OTcwN0UzRSIsInZpc2l0b3JfaWQiOiI3NjMxODc2NjE4NjcwMDc5NTUwIiwicmVnaW9uX2VkZ2UiOiJpYWQiLCJyZWdpb25fcmVuZGVyIjoiaWFkIn0= |
| visitor-hmac | 1141411a375b9b797f7f861d93fd50b83911544b34b14305a6570f413c293dfb |
| hovercard-subject-tag | issue:1862638272 |
| 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/Source-Python-Dev-Team/Source.Python/492/issue_layout |
| twitter:image | https://opengraph.githubassets.com/184d6a1d7c0022b265572d9be3f4760e5a6664457fcf64cf165d48a562f59f2b/Source-Python-Dev-Team/Source.Python/issues/492 |
| twitter:card | summary_large_image |
| og:image | https://opengraph.githubassets.com/184d6a1d7c0022b265572d9be3f4760e5a6664457fcf64cf165d48a562f59f2b/Source-Python-Dev-Team/Source.Python/issues/492 |
| og:image:alt | Code: from memory import Pointer from memory import alloc def test_pointer(): ptr = alloc(4) Pointer(ptr) test_pointer() Output: free(): double free detected in tcache 2 This also applies to Custom... |
| og:image:width | 1200 |
| og:image:height | 600 |
| og:site_name | GitHub |
| og:type | object |
| og:author:username | CookStar |
| hostname | github.com |
| expected-hostname | github.com |
| None | 9920a62ba22d06470388e2904804fb7e5ec51c9e35f81784e9191394c74b2bd2 |
| turbo-cache-control | no-preview |
| go-import | github.com/Source-Python-Dev-Team/Source.Python git https://github.com/Source-Python-Dev-Team/Source.Python.git |
| octolytics-dimension-user_id | 5440368 |
| octolytics-dimension-user_login | Source-Python-Dev-Team |
| octolytics-dimension-repository_id | 12771934 |
| octolytics-dimension-repository_nwo | Source-Python-Dev-Team/Source.Python |
| octolytics-dimension-repository_public | true |
| octolytics-dimension-repository_is_fork | false |
| octolytics-dimension-repository_network_root_id | 12771934 |
| octolytics-dimension-repository_network_root_nwo | Source-Python-Dev-Team/Source.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 | 7d6181066430cc06553c8396ca201e194ae33cb9 |
| ui-target | full |
| theme-color | #1e2327 |
| color-scheme | light dark |
Links:
Viewport: width=device-width