[erlang-bugs] Bug in qlc

Hans Bolinder <>
Fri Dec 8 08:47:20 CET 2006


[Daniel Luna:]
> See code below.
> 
> qlc "A" works if you remove ", true".
> 
> Both work if you remove disc_only_copies.
> 
> This error occurs in R11B-2, but not in R11B-1.

Thanks for the bug report.

It seems that a modification in R11B-2 exposed a bug that has been
present for quite some time. The bug was triggered by the empty Dets
table, but could also show up when no object matches a given match
specification.

The following patch ensures that dets:match{_object}() and
dets:select() never return {[],Cont} which should solve the problem at
hand.

*** /usr/local/otp/releases/otp_beam_solaris8_r11b_patched/lib/stdlib-1.14.2/src/dets.erl	Thu Nov 16 17:40:35 2006
--- dets.erl	Wed Dec  6 12:43:19 2006
***************
*** 718,723 ****
--- 718,725 ----
                                  false ->
                                      badarg
                              end;
+                         [] ->
+                             chunk_match(NewState);
  			Terms ->
  			    {Terms, NewState}
  		    end;

The patch erl_898_otp_beam is available at the Licencees' Area
(http://www.erlang.se/lic_area/index.shtml).

Best regards,

Hans Bolinder, Erlang/OTP



More information about the erlang-bugs mailing list