From alexey@REDACTED Wed Nov 10 15:38:55 2004 From: alexey@REDACTED (Alexey Shchepin) Date: Wed, 10 Nov 2004 16:38:55 +0200 Subject: Strange behaviour of inet_res:getbyname Message-ID: <87bre5epkw.fsf@ns.sevcom.net> Hi! There is strange behaviour of inet_res:getbyname/2 when it called from node with long name, short name, and without name. Without node name it immediately returns {error,timeout}: $ erl Erlang (BEAM) emulator version 5.4 [source] [hipe] [threads:0] Eshell V5.4 (abort with ^G) 1> inet_res:getbyname("_xmpp-server._tcp.jabber.ru", srv). {error,timeout} The same with sort node name: $ erl -sname test Erlang (BEAM) emulator version 5.4 [source] [hipe] [threads:0] Eshell V5.4 (abort with ^G) (test@REDACTED)1> inet_res:getbyname("_xmpp-server._tcp.jabber.ru", srv). {error,timeout} And it works as expected with long node name: $ erl -name test Erlang (BEAM) emulator version 5.4 [source] [hipe] [threads:0] Eshell V5.4 (abort with ^G) (test@REDACTED)1> inet_res:getbyname("_xmpp-server._tcp.jabber.ru", srv). {ok,{hostent,"_xmpp-server._tcp.jabber.ru",[],srv,1,[{0,0,5269,"jabber.ru"}]}} It seems this problem appeared in R10B. From mscandar@REDACTED Sun Nov 14 05:47:47 2004 From: mscandar@REDACTED (Mark Scandariato) Date: Sat, 13 Nov 2004 23:47:47 -0500 Subject: Compiler crash using abstract modules In-Reply-To: <4190E40C.6060508@csd.uu.se> References: <4190E40C.6060508@csd.uu.se> Message-ID: <4196E373.9060700@cisco.com> Compiling: -module(foo, [A]). -export([bar/1]). -record(s, {a}). bar(S) when S#s.a == 0 -> any_term. Produces: 4> c(foo). ./foo.erl:none: internal error in expand_module; crash reason: {function_clause,[{sys_expand_pmod, gexpr, [{call, 7, {remote, 7, {atom,7,erlang}, {atom,7,element}}, [{integer,7,2},{var,7,'S'}]}, {pmod, ['A'], [{bar,1}, {module_info,0}, {module_info,1}], [{bar,1}, {module_info,0}, {module_info,1}]}]}, {sys_expand_pmod,guard_test,2}, {sys_expand_pmod,guard0,2}, {sys_expand_pmod,guard,2}, {sys_expand_pmod,clause,2}, {sys_expand_pmod,clauses,2}, {sys_expand_pmod,function,4}, {sys_expand_pmod,form,2}, {sys_expand_pmod,forms,2}, {sys_expand_pmod,forms,4}]} error 5> The following don't crash: bar(#s{a=0}) -> any_term. bar(S) when S#s.a -> any_term. bar(S) when is_integer(S#s.a) -> whatever. Very interesting! Mark. From richardc@REDACTED Sun Nov 14 16:54:39 2004 From: richardc@REDACTED (Richard Carlsson) Date: Sun, 14 Nov 2004 16:54:39 +0100 Subject: Compiler crash using abstract modules In-Reply-To: <4196E373.9060700@cisco.com> References: <4190E40C.6060508@csd.uu.se> <4196E373.9060700@cisco.com> Message-ID: <41977FBF.5010703@csd.uu.se> Mark Scandariato wrote: > Compiling: > > -module(foo, [A]). > -export([bar/1]). > -record(s, {a}). > bar(S) when S#s.a == 0 -> any_term. > > Produces: > > 4> c(foo). > ./foo.erl:none: internal error in expand_module; > crash reason: {function_clause,[{sys_expand_pmod, There had been some code rot in the expansion module, due to changes in other parts of the compiler. The attached file (lib/compiler/src/sys_expand_pmod.erl) should fix this, as well as some other problems I found when going over the code. /Richard -------------- next part -------------- An embedded and charset-unspecified text was scrubbed... Name: sys_expand_pmod.erl URL: From richardc@REDACTED Mon Nov 15 07:52:50 2004 From: richardc@REDACTED (Richard Carlsson) Date: Mon, 15 Nov 2004 07:52:50 +0100 Subject: Compiler crash using abstract modules In-Reply-To: <4197BDA1.60504@cisco.com> References: <4190E40C.6060508@csd.uu.se> <4196E373.9060700@cisco.com> <41977FBF.5010703@csd.uu.se> <4197BDA1.60504@cisco.com> Message-ID: <41985242.2000502@csd.uu.se> Mark Scandariato wrote: > New problem: is_record(X, record) in a guard. > > bar(S) when is_record(S, s) -> any_term. Apply the attached patch to the previously posted sys_expand_pmod.erl. /Richard -------------- next part -------------- An embedded and charset-unspecified text was scrubbed... Name: diff URL: