[erlang-bugs] erl_interface: erl_match() doesn't match ERL_U_INTEGER ETERMs

Tobias Schlager schlager@REDACTED
Fri Jul 11 14:44:09 CEST 2008


Hello,

I recently wondered why I'm getting incorrect return values when 
matching the same ETERM created with erl_mk_uint(). After looking in the 
OTP R12B-3 source code I found that ematch() in 
lib/erl_interface/src/legacy/erl_format.c is missing the case-clause for 
ERL_U_INTEGERs which leads to a result of false every time you try to 
match something with an unsigned integer ETERM as first argument.

I don't know if this really is a bug because matching two such big 
numbers may not be used very frequently but since it is possible to get 
unsigned integer values from an erlang node (imagine sending 
term_to_binary(16#EFFFFFFF) with a binary port_command), I would assume 
a correct behaviour just for convenience :)

Regards
Tobi

-- 

disy Informationssysteme GmbH
Dipl. Inform. Tobias Schlager
Erbprinzenstr. 4-12, 76133 Karlsruhe, Deutschland
Tel: +49 721 1 6006 607, E-Mail: schlager@REDACTED

Firmensitz: Erbprinzenstr. 4-12, 76133 Karlsruhe
Registergericht: Amtsgericht Mannheim, HRB 107964
Geschäftsführer: Sven Behrens, Dr. Ralf Nikolai, Claus Hofmann

http://www.disy.net/cadenza - Berichte und Auswertungen mit Raumbezug
http://www.disy.net/e-meetings - Telefon- und Web-Konferenzen

--------------------------------
dialog . daten . dimensionen
--------------------------------




More information about the erlang-bugs mailing list