`Fiddle::Pointer#to_value` is unsafe
還沒有人認領這個 Issue。
評估
研究方向
先閱讀 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
貢獻指南
這個儲存庫沒有索引到貢獻指南
從這裡開始
- 先讀完整個 Issue,再讀專案的貢獻指南。
- 在 Issue 下留言說明你要接手 —— 這能避免兩個人做同樣的事。
- Fork 儲存庫,在一個分支上完成修改。
- 送出 Pull Request,並在描述裡引用這個 Issue 編號。
ruby/fiddle 的其他 Issue
-
難度 3/5 1-2 天 新手友好度 52/100
-
難度 3/5 1-2 天 新手友好度 68/100
-
難度 2/5 1-3 小時 新手友好度 45/100
-
難度 2/5 1-3 小時 新手友好度 52/100
-
難度 4/5 3-5 天 新手友好度 25/100
相似的 Issue
-
難度 2/5 1-3 小時 新手友好度 70/100
-
bug
難度 1/5 1 小時以內 新手友好度 90/100
riscv/riscv-unified-db#2626 ·
-
Component: GLib
難度 2/5 1-3 小時 新手友好度 70/100
-
ds-drift
難度 2/5 1-3 小時 新手友好度 70/100
we-promise/sure#3693 ·
-
難度 2/5 1-3 小時 新手友好度 75/100
simp/pupmod-simp-simp#395 ·