Groups
Groups
Sign in
Groups
Groups
golang-nuts
Conversations
About
Send feedback
Help
issue with past-the-end pointer
110 views
Skip to first unread message
Vincent Blanchon
unread,
Mar 18, 2020, 12:33:13 PM
3/18/20
Reply to author
Sign in to reply to author
Forward
Sign in to forward
Delete
You do not have permission to delete messages in this group
Copy link
Report message
Show original message
Either email addresses are anonymous for this group or you need the view member email addresses permission to view the original message
to golang-nuts
Hi all,
In this proposal
https://github.com/golang/proposal/blob/master/design/24543-non-cooperative-preemption.md
, it is mentioned past-the-end pointer and the fact it should be avoided. My assumption is that it could lead to a bad memory tracking/cleaning since the write barriers keep track of the change in the pointers. Is that correct?
Thank you
Ian Lance Taylor
unread,
Mar 18, 2020, 3:20:15 PM
3/18/20
Reply to author
Sign in to reply to author
Forward
Sign in to forward
Delete
You do not have permission to delete messages in this group
Copy link
Report message
Show original message
Either email addresses are anonymous for this group or you need the view member email addresses permission to view the original message
to Vincent Blanchon, golang-nuts
On Wed, Mar 18, 2020 at 9:33 AM Vincent Blanchon
<
blanchon...@gmail.com
> wrote:
>
> In this proposal
https://github.com/golang/proposal/blob/master/design/24543-non-cooperative-preemption.md
, it is mentioned past-the-end pointer and the fact it should be avoided. My assumption is that it could lead to a bad memory tracking/cleaning since the write barriers keep track of the change in the pointers. Is that correct?
Pretty much, yes. A past-the-end pointer looks like a pointer to the
next object, and the write barrier can't tell the difference.
Ian
Vincent Blanchon
unread,
Mar 18, 2020, 10:40:39 PM
3/18/20
Reply to author
Sign in to reply to author
Forward
Sign in to forward
Delete
You do not have permission to delete messages in this group
Copy link
Report message
Show original message
Either email addresses are anonymous for this group or you need the view member email addresses permission to view the original message
to golang-nuts
Thank you Ian!
Reply all
Reply to author
Forward
0 new messages