<div dir="ltr"><br><div class="gmail_extra"><br><br><div class="gmail_quote">On Tue, Aug 12, 2014 at 3:52 PM, Paul Bone <span dir="ltr"><<a href="mailto:paul@bone.id.au" target="_blank">paul@bone.id.au</a>></span> wrote:<br>
<blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left-width:1px;border-left-color:rgb(204,204,204);border-left-style:solid;padding-left:1ex"><div class=""><div class="h5">On Tue, Aug 12, 2014 at 03:32:46PM +1000, Julien Fischer wrote:<br>
><br>
> On Tue, 12 Aug 2014, Julien Fischer wrote:<br>
><br>
>> On Tue, 12 Aug 2014, Peter Wang wrote:<br>
>><br>
>>> On Tue, 12 Aug 2014 11:19:25 +1000 (EST), Julien Fischer<br>
>>> <<a href="mailto:jfischer@opturion.com">jfischer@opturion.com</a>> wrote:<br>
>>>><br>
>>>> On Tue, 12 Aug 2014, Peter Wang wrote:<br>
>>>><br>
>>>>> I intend to apply this on the 14.01 branch. I think it should be fine,<br>
>>>>> but if someone could test it on an SMP OS X machine (e.g. bootcheck in<br>
>>>>> hlc.par.gc) then that would be better.<br>
>>>><br>
>>>> By "someone", do you mean me?<br>
>>><br>
>>> Yes :)<br>
>><br>
>> On OS X, I get the following failures when bootchecking in hlc.par.gc<br>
>><br>
>> hard_coded/spawn_native<br>
>> hard_coded/thread_barrier_test<br>
>> hard_coded/tl_backjump_test<br>
>> par_conj/spawn_many<br>
>> par_conj/thread_barrier<br>
>><br>
>> All are aborting due to segmentation faults. I'm not sure if this is<br>
>> a result of your patch or if it's happening anyway. (I'll try again<br>
>> without your patch.)<br>
><br>
> The above also occur without your patch; I'll look into them separately.<br>
><br>
<br>
</div></div>Peter pointed out that there are a number of problems in the RTS in general.<br>
I havn't yet found the time to look into these, hopefully soon. I also want<br>
to check all the test cases too.</blockquote><div><br></div><div>Was one such problem the following?</div><div><br></div><div><div>diff --git a/runtime/mercury_memory_zones.c b/runtime/mercury_memory_zones.c</div><div>index 91f9f89..df418b6 100644</div>
<div>--- a/runtime/mercury_memory_zones.c</div><div>+++ b/runtime/mercury_memory_zones.c</div><div>@@ -514,7 +514,7 @@ MR_next_offset(void)</div><div><br></div><div> old_counter = offset_counter;</div><div> new_counter = (old_counter + 1) % (CACHE_SLICES - 1);</div>
<div>-#if defined(MR_THREAD_SAFE)</div><div>+#if defined(MR_LL_PARALLEL_CONJ)</div><div> /*</div><div> ** The critical section here is really small, a CAS will work well.</div></div><div><br></div><div>The macros protecting MR_compare_and_swap_int and friends do</div>
<div>not appear to be consistent. The declarations are protected by MR_THREAD_SAFE</div><div>but the definitions by MR_LL_PARALLEL_CONJ. (And for reasons that mystify</div><div>me at the moment, the whole thing breaks when I attempt to build the runtime</div>
<div>in hlc.par.gc.ll_debug, but not in hlc.par.gc -- that's what the above patch works</div><div>around.)</div><div><br></div><div>Cheers,</div><div>Julien.</div><div> </div></div><br></div></div>