On Sunday, February 25, 2018 at 8:57:53 AM UTC-5, Jan Mercl wrote: > > On Sun, Feb 25, 2018 at 2:29 PM <di...@veryhaha.com <javascript:>> wrote: > > > Why does the following program crash? > > Because the program attempts to write to the R/O text segment. Why is it > doing that? >
Yes. I will not do this in formal code. This is just to learn how to use unsafe mechanism. I think the unsafe rules allow this. I never expect it will crash, for I can't get any information about the write protection mechanism. > > -- > > -j > -- 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. For more options, visit https://groups.google.com/d/optout.