Hacktoberfest 2026:維護者為十月標記出來的 issue,仍然開放、適合新手。 瀏覽 Hacktoberfest issue

`Fiddle::Pointer#to_value` is unsafe

未關閉
#175 5 則留言 0 個 reaction 已指派 0 人 在 GitHub 檢視

還沒有人認領這個 Issue。

評估

難度
5/5
預估耗時
一週以上
新手友好度
30/100
Issue 類型
缺陷
描述清晰度
需要釐清
活躍度
冷清
技術堆疊
ruby
領域
tooling

研究方向

先閱讀 Fiddle::Pointer#to_value 的實作和 Function 建構函式,接著檢查指標標記以及 Fiddle.dlunwrap 如何與 Ruby 的垃圾回收器互動。該 issue 提出了移除和型別限制兩種替代方案;完成此 issue 需要決定安全性設計、完成實作,並涵蓋受影響的行為。

由索引模型根據 Issue 內容生成。

描述

Well, it's pretty self-explanatory. It returns (VALUE)(data->ptr), and ptr is obviously not marked, so can be GCed. This method is either should be removed completely (it'll still e possible to hack around with Fiddle.dlunwrap, but this at least feels hacky) or to be allowed only for pointers marked to be in fact VALUEs (mark return value type in Function constructor), and they of course should gc_mark their ptrs. Btw, there is no way to create a pointer from Ruby object, either.

主要語言
Ruby
星號
195
分支
53
平均合併
23 小時 57 分鐘
30 天內合併 PR
1

貢獻指南

這個儲存庫沒有索引到貢獻指南

從這裡開始

  1. 先讀完整個 Issue,再讀專案的貢獻指南。
  2. 在 Issue 下留言說明你要接手 —— 這能避免兩個人做同樣的事。
  3. Fork 儲存庫,在一個分支上完成修改。
  4. 送出 Pull Request,並在描述裡引用這個 Issue 編號。

ruby/fiddle 的其他 Issue

查看 ruby/fiddle 的全部 Issue

相似的 Issue

更多 Ruby Issue

把新 issue 寄到你的電子郵件信箱

精選適合新手參與的 GitHub issue 摘要。