Programs with a data race can do all kinds of things that seem incredibly
improbable to humans, because compilers assume that the program is
race-free and make optimizations that are unsafe in the presence of races.
See
https://software.intel.com/en-us/blogs/2013/01/06/benign-data-races-what-could-possibly-go-wrong
for a great writeup about this. It uses C++ for its examples, but the same
ideas apply to Go.

- Dave

On Sun, Dec 3, 2017 at 10:46 PM, <quans...@gmail.com> wrote:

> a program not using unsafe cannot set a pointer to -1, even if there is a
> race, right?
>
> - erik
>
>
> On Sunday, December 3, 2017 at 10:20:44 PM UTC-8, Jan Mercl wrote:
>>
>> On Mon, Dec 4, 2017 at 7:03 AM <quan...@gmail.com> wrote:
>>
>> > does anyone have any idea what's going on here, or some hints on
>> debugging this?
>>
>> What does the race detector say?
>>
>> --
>>
>> -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.
>

-- 
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.

Reply via email to