On Sun, Feb 28, 2021 at 1:06 AM Reto <reto@labrat.space> wrote:
>
> On Sat, Feb 27, 2021 at 06:56:04PM -0800, Ian Lance Taylor wrote:
> > Although rule 4 in the documentation of the unsafe package mentions
> > syscall.Syscall, the implementation isn't restricted to the syscall
> > package.  It applies to any function that is written in assembly: that
> > is, a function that is declared in Go without a body.
> > We should perhaps tweak the docs to make that the rule.
>
> I see, I was assuming that the assembly function of syscall.Syscall does some
> (even darker) dark magic than normal assembly to guarantee that.
> So a doc update would indeed be helpful.
>
> > Now that you point this out, I'm actually not sure that this is OK.  I
> > don't know what keeps v pinned during this call.
>
> > >> IoctlSetPointerInt clearly converts a unsafe.Pointer to a uintptr and 
> > >> *doesn't*
> > >> directly call syscall.Syscall.
> > >>
> > >> Why is this valid?
>
> > I'm not sure it is.
>
> Hm, do you want me to open up a bug on GitHub?

Sure.  Thanks.  We should probably resolve this one way or another.

Ian

-- 
You received this message because you are subscribed to the Google Groups 
"golang-nuts" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to golang-nuts+unsubscr...@googlegroups.com.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/golang-nuts/CAOyqgcVSEF%2Bh8zA%2Bio5uL90703npRaNdmHpBZSX7Ev5uWqP4mw%40mail.gmail.com.

Reply via email to