[erlang-questions] hipe binary matching problem with R12B-1?

Kostis Sagonas kostis@REDACTED
Mon Mar 3 13:28:50 CET 2008

Steve Vinoski wrote:
> Just out of curiosity I've been going back through some Wide Finder
> code to see how it fares under R12B-1, given the improvements in
> binaries in this new release. Generally I'm seeing some pretty good
> performance improvements with no code changes. Unfortunately I think
> I'm also seeing a bug.
> Below find the results of compiling and running the example code at
> the bottom of this message. Using "c" to compile gives the right
> answer; using "hipe:c" gives the wrong answer.

Once again, thanks for reporting this.  The bug can be corrected by
applying the patch which appears below and re-making the libraries.
The same fix will be included in R12B-2.


Index: lib/hipe/icode/hipe_icode_primops.erl
--- lib/hipe/icode/hipe_icode_primops.erl       14 Nov 2007 23:53:42 
-0000      1.73
+++ lib/hipe/icode/hipe_icode_primops.erl       3 Mar 2008 12:00:42 
-0000       1.74
@@ -533,7 +533,7 @@
-         erl_types:t_inf(Type,erl_types:t_matchstate()),1));
+         erl_types:t_inf(Type,erl_types:t_matchstate()),0));
      {hipe_bs_primop, {bs_match_string,_,Bytes}} ->
        [MatchState] = Args,
        BinType = erl_types:t_matchstate_present(MatchState),

More information about the erlang-questions mailing list