Re: [golang-dev] Do slice element modification operations check whether or not the modified elements are allocated on immutable zones?

42 views
Skip to first unread message

T L

unread,
Jan 16, 2020, 9:49:31 AM1/16/20
to golang-nuts, golang-dev
Glad to know this. Thanks for the info.

On Thu, Jan 16, 2020 at 8:35 AM Ralph Corderoy <ra...@inputplus.co.uk> wrote:
Hi Tapir,

> Do slice element modification operations check whether or not the
> modified elements are allocated on immutable zones?
...
> //var Golang = strings.Join([]string{"Go", "lang"}, "") // not cause panicking
> var Golang = "Golang"                                   // causes panicking

Are you aware that memory pages may have permissions such as read-only,
and that some data may be allocated to those pages?  Look up the address
of the data in /proc/$pid/maps.

I think this topic belongs on golang-nuts; reply-to set.

--
Cheers, Ralph.
Reply all
Reply to author
Forward
0 new messages