For the record, it looks like a compiler bug. I found that on line 551 in erl_bif_re.c, the<div><div>'else if' branch is not taken, even though the 'ri' variable is initialized to the address of</div><div>the local 'defri' structure and the boolean condition should be true. Moving 'defri' to a static</div>
<div>module variable fixes the problem. I'm going to try rebuilding with a newer gcc (currently</div><div>using the 4.2.3 that comes with the distro).</div><div><br></div><div>dave</div><div><br><div class="gmail_quote">
2011/6/9 Dave Peticolas <span dir="ltr"><<a href="mailto:dave.peticolas@gmail.com">dave.peticolas@gmail.com</a>></span><br><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex;">
Fair enough. To the debugger!<div><div></div><div class="h5"><br><br><div class="gmail_quote">2011/6/9 Patrick Baggett <span dir="ltr"><<a href="mailto:baggett.patrick@gmail.com" target="_blank">baggett.patrick@gmail.com</a>></span><br>
<blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">
Well the point was to check if there might be a reason like compiler optimization that was causing it. Usually debug builds don't have extremely heavy optimization enabled and if that was the cause, it would automagically disappear. Since it isn't the problem, I don't really have good ideas other than debugging Erlang itself.<div>


<br></div><div><font color="#888888">Patrick</font><div><div></div><div><br><br><div class="gmail_quote">On Thu, Jun 9, 2011 at 10:19 PM, Dave Peticolas <span dir="ltr"><<a href="mailto:dave.peticolas@gmail.com" target="_blank">dave.peticolas@gmail.com</a>></span> wrote:<br>

<blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">
I built a debug emulator, but I'm not sure what I should do with it,<div>other than re-run that test which produces the same failing result.<div><div></div><div><br><br><div class="gmail_quote">2011/6/7 Dave Peticolas <span dir="ltr"><<a href="mailto:dave.peticolas@gmail.com" target="_blank">dave.peticolas@gmail.com</a>></span><br>



<blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">Thanks, I will give that a try.<div><div></div><div><br><br><div class="gmail_quote">2011/6/7 Patrick Baggett <span dir="ltr"><<a href="mailto:baggett.patrick@gmail.com" target="_blank">baggett.patrick@gmail.com</a>></span><br>



<blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">
Maybe it is compiler options / optimizations producing wrong code? I'd make 100% sure all *.o files are gone and then retry with a debug build. Other than that, I don't know what to tell you. :\<div><div></div><div>




<br><br><div class="gmail_quote">
On Tue, Jun 7, 2011 at 10:17 PM, Dave Peticolas <span dir="ltr"><<a href="mailto:dave.peticolas@gmail.com" target="_blank">dave.peticolas@gmail.com</a>></span> wrote:<br><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">





I should mention it works fine on my Linux desktop as well.<div>I'd say something was wrong with my netbook, except 01</div><div>works just fine.<div><div></div><div><br><br><div class="gmail_quote">2011/6/7 Patrick Baggett <span dir="ltr"><<a href="mailto:baggett.patrick@gmail.com" target="_blank">baggett.patrick@gmail.com</a>></span><br>






<blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">Not seeing it here (Win32 platform)<div><br></div><div><div>Erlang R14B03 (erts-5.8.4) [smp:4:4] [rq:4] [async-threads:0]</div>






<div><br></div><div>Eshell V5.8.4  (abort with ^G)</div><div><div>1> re:split("abc","b").</div>
<div>[<<"a">>,<<"c">>]</div><div>2> </div><div><br></div><div><br></div><br></div><div class="gmail_quote"><div><div></div><div>On Tue, Jun 7, 2011 at 10:00 PM, Dave Peticolas <span dir="ltr"><<a href="mailto:dave.peticolas@gmail.com" target="_blank">dave.peticolas@gmail.com</a>></span> wrote:<br>







</div></div><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"><div><div></div><div><div>Hello, I recently tried to build both R14B02 and 03 on my Dell Inspiron Mini (Intel Atom)</div>






<div>running Ubuntu 8.04. I already had R14B01 running fine. I found that re:split no longer</div>
<div>worked. I built all the versions from source. Here is an example of 01 output:</div>
<div><br></div><div>Erlang R14B01 (erts-5.8.2) [source] [smp:2:2] [rq:2] [async-threads:0] [hipe] [kernel-poll:false]</div><div><br></div><div>Eshell V5.8.2  (abort with ^G)</div><div>1> re:split("abc", "b").</div>








<div>[<<"a">>,<<"c">>]</div><div>2> q().</div><div>ok</div><div><br></div><div><br></div><div>And here is what I get on 02 (same as 03 except for the version numbers):</div>







<div>
<br></div><div>Erlang R14B02 (erts-5.8.3) [source] [smp:2:2] [rq:2] [async-threads:0] [hipe] [kernel-poll:false]</div><div><br></div><div>Eshell V5.8.3  (abort with ^G)</div><div>1> re:split("abc", "b").</div>








<div>** exception error: no case clause matching {match,["b"]}</div><div>     in function  re:run/3</div><div>        called as re:run(<<"abc">>,</div><div>                         {re_pattern,0,0,</div>








<div>                                     <<69,82,67,80,49,0,0,0,0,0,0,0,2,0,0,0,0,0,0,0,98,0,0,...>>},</div><div>                         [global])</div><div>     in call from re:split/3</div><div>2> </div>








<div><br></div><div>In case the existing build was somehow getting tangled with the new one,</div><div>I tried removing the 01 build completely and rebuilding 02 and got the same</div><div>results.</div><div><br></div><div>








thanks,</div><div>dave</div>
<br></div></div>_______________________________________________<br>
erlang-bugs mailing list<br>
<a href="mailto:erlang-bugs@erlang.org" target="_blank">erlang-bugs@erlang.org</a><br>
<a href="http://erlang.org/mailman/listinfo/erlang-bugs" target="_blank">http://erlang.org/mailman/listinfo/erlang-bugs</a><br>
<br></blockquote></div><br></div>
</blockquote></div><br></div></div></div>
</blockquote></div><br>
</div></div></blockquote></div><br>
</div></div></blockquote></div><br></div></div></div>
</blockquote></div><br></div></div></div>
</blockquote></div><br>
</div></div></blockquote></div><br></div></div>