From bjorn@REDACTED Mon Aug 1 11:26:49 2005 From: bjorn@REDACTED (Bjorn Gustavsson) Date: 01 Aug 2005 11:26:49 +0200 Subject: Internal consistency check error (Wings Compile) In-Reply-To: <95CC3FB7-1505-4221-B253-056FE81AD6FB@pacbell.net> References: <95CC3FB7-1505-4221-B253-056FE81AD6FB@pacbell.net> Message-ID: This bug will be fixed in R10B-7. /Bj?rn Brent Fulgham writes: > I received an Internal consistency check error when attempting to > compile Wings 0.98.29b under OTP R10B-6 under Mac OS X (10.4.2 Tiger): > > Chaz:~/Desktop/wings-0.98.29b brent$ make > (cd src; make) > make TYPE=opt common > erlc -pa /ebin +warn_unused_vars -I/include -I ../e3d -W +debug_info > '-Dwings_version="0.98.29b"' -pa ../ebin -o../ebin wings_color.erl > wings_color: function internal_rgb_to_hsv/3+97: > Internal consistency check failed - please report this bug. > Instruction: {test,is_eq_exact,{f,80},[{x,0},{atom,error}]} > Error: {unsafe_instruction,{float_error_state,cleared}}: > > make[2]: *** [../ebin/wings_color.beam] Error 1 > make[1]: *** [opt] Error 2 > make: *** [all] Error 2 > > Chaz:~/Desktop/wings-0.98.29b brent$ uname -a > Darwin Chaz.local 8.2.0 Darwin Kernel Version 8.2.0: Fri Jun 24 > 17:46:54 PDT 2005; root:xnu-792.2.4.obj~3/RELEASE_PPC Power Macintosh > powerpc > Chaz:~/Desktop/wings-0.98.29b brent$ > > > > -- Bj?rn Gustavsson, Erlang/OTP, Ericsson AB From sean.hinde@REDACTED Wed Aug 3 00:09:30 2005 From: sean.hinde@REDACTED (Sean Hinde) Date: Tue, 2 Aug 2005 23:09:30 +0100 Subject: R10B-6 compiler bug Message-ID: <0B7DF8ED-840B-4262-81AA-09805742C904@gmail.com> Hi, Just came across this one: -module(compile_bug). -export([ test/1]). -record(a, {a,b,c}). test(As) -> case As of A when A#a.b == ""; A#a.b == undefined -> true; _ -> false end. 23> c(compile_bug). Function test/1 refers to undefined label 5 ./compile_bug.erl:none: internal error in beam_dead; crash reason: {{case_clause,{'EXIT',{undefined_label,5}}}, [{compile,'-select_passes/2-anonymous-2-',2}, {compile,'-internal_comp/4-anonymous-1-',2}, {compile,fold_comp,3}, {compile,internal_comp,4}, {compile,internal,3}]} error The error seems to occur in pass 'beam_bool' - skipping this pass avoids creating the error Another workaround is to use 'or' instead of ';' Sean From bjorn@REDACTED Wed Aug 3 12:28:45 2005 From: bjorn@REDACTED (Bjorn Gustavsson) Date: 03 Aug 2005 12:28:45 +0200 Subject: R10B-6 compiler bug In-Reply-To: <0B7DF8ED-840B-4262-81AA-09805742C904@gmail.com> References: <0B7DF8ED-840B-4262-81AA-09805742C904@gmail.com> Message-ID: Thanks! Corrected! (The correction will be included in R10B-7.) /Bj?rn Sean Hinde writes: > Hi, > > Just came across this one: > > -module(compile_bug). > -export([ test/1]). > > -record(a, {a,b,c}). > > test(As) -> > case As of > A when A#a.b == ""; A#a.b == undefined -> > true; > _ -> > false > end. > > 23> c(compile_bug). > Function test/1 refers to undefined label 5 > ./compile_bug.erl:none: internal error in beam_dead; > crash reason: {{case_clause,{'EXIT',{undefined_label,5}}}, > [{compile,'-select_passes/2-anonymous-2-',2}, > {compile,'-internal_comp/4-anonymous-1-',2}, > {compile,fold_comp,3}, > {compile,internal_comp,4}, > {compile,internal,3}]} > error > > The error seems to occur in pass 'beam_bool' - skipping this pass > avoids creating the error > > Another workaround is to use 'or' instead of ';' > > Sean > -- Bj?rn Gustavsson, Erlang/OTP, Ericsson AB From vlad_dumitrescu@REDACTED Mon Aug 22 21:25:29 2005 From: vlad_dumitrescu@REDACTED (Vlad Dumitrescu) Date: Mon, 22 Aug 2005 21:25:29 +0200 Subject: Bug in jinterface Message-ID: Hi, The OtpOutputStream implementation in jinterface is not conforming to the external distribution format: method write_string doesn't check if the length is >= 65536, when the sitring should be output with a listTag, not a stringTag. The patch is (sorry, but I have a modified version of the file and the line numbers don't match) - if (bytebuf.length == len && len < 65535) + if (bytebuf.length == len) regards, Vlad From raimo@REDACTED Tue Aug 23 12:16:25 2005 From: raimo@REDACTED (Raimo Niskanen) Date: 23 Aug 2005 12:16:25 +0200 Subject: Bug in jinterface References: Message-ID: This bug is fixed in R10B (jinterface-1.3) and later: public void write_string(String s) { int len = s.length(); switch(len) { case 0: this.write_nil(); break; default: byte[] bytebuf = s.getBytes(); /* switch to se if the length of the byte array is equal to the length of the list, or if the string is too long for the stream protocol */ if ((bytebuf.length == len) && (len <= 65535)) { /* Usual */ this.write1(OtpExternal.stringTag); this.write2BE(len); this.writeN(bytebuf); } else { /* Unicode */ char[] charbuf = s.toCharArray(); this.write_list_head(len); for(int i = 0; i Hi, > > The OtpOutputStream implementation in jinterface is not conforming to > the external distribution format: method write_string doesn't check if > the length is >= 65536, when the sitring should be output with a > listTag, not a stringTag. > > The patch is (sorry, but I have a modified version of the file and the > line numbers don't match) > > - if (bytebuf.length == len && len < 65535) > + if (bytebuf.length == len) > > regards, > Vlad > -- / Raimo Niskanen, Erlang/OTP, Ericsson AB From serge@REDACTED Tue Aug 23 22:47:24 2005 From: serge@REDACTED (Serge Aleynikov) Date: Tue, 23 Aug 2005 16:47:24 -0400 Subject: inets ftp bug Message-ID: <430B8B5C.2050209@hq.idt.net> OTP team: I found a bug in the inets' ftp.erl client that can be patched by applying the ftp.erl.patch file to the source. The bug is seen when you try to download more than one file in a row using ftp:recv/2 function. For some reason this bug doesn't occur when tracing is enabled (and/or debugger application is running). Use the following to reproduce the bug: ftp_test:test(Host, User, Password, RemoteDir, RemoteFile). ~/tmp/dirtest>erl -pa ~/Projects/DRP/lib/drpdb-1.0/ebin Erlang (BEAM) emulator version 5.4.8 [source] [hipe] [threads:0] Eshell V5.4.8 (abort with ^G) 1> ftp_test:test("localhost", "serge", "...", "/home/serge", "tt.txt"). "220 ProFTPD 1.2.6 Server (DevLinuxPro FTP) [devlinuxpro.mis.idt.net]" "331 Password required for serge." "230 User serge logged in." "250 CWD command successful." "500 EPSV not understood." "200 PORT command successful" "150 Opening ASCII mode data connection for tt.txt (7487 bytes)" "226 Transfer complete." "200 PORT command successful" ** exited: {{function_clause,[{inet,tcp_close,[{lsock,#Port<0.123>}]}, {ftp,do_termiante,2}, {gen_server,terminate,6}, {proc_lib,init_p,5}]}, {gen_server,call, [<0.42.0>, {recv,"tt.txt","tt.txt"}, infinity]}} ** Hope that it can make it in the next OTP release. Regards, Serge -- Serge Aleynikov R&D Telecom, IDT Corp. Tel: (973) 438-3436 Fax: (973) 438-1464 serge@REDACTED -------------- next part -------------- An embedded and charset-unspecified text was scrubbed... Name: ftp_test.erl URL: -------------- next part -------------- An embedded and charset-unspecified text was scrubbed... Name: ftp.erl.patch URL: From serge@REDACTED Tue Aug 23 23:19:12 2005 From: serge@REDACTED (Serge Aleynikov) Date: Tue, 23 Aug 2005 17:19:12 -0400 Subject: inets ftp bug In-Reply-To: <430B8B5C.2050209@hq.idt.net> References: <430B8B5C.2050209@hq.idt.net> Message-ID: <430B92D0.2070800@hq.idt.net> Actually, there seems to be one more (at least :-( ) issue with the ftp.erl. With the applied patch there is no more exception raised, but the second transfer of a file doesn't happen if you run the code outside of the debugger. When running with a debugger, I get: ~/tmp/dirtest>erl Erlang (BEAM) emulator version 5.4.8 [source] [hipe] [threads:0] Eshell V5.4.8 (abort with ^G) 1> i:ii(ftp). {module,ftp} 2> i:ib(ftp, activate_data_connection, 1). ok 3> debugger:start(). {ok,<0.36.0>} 4> ftp_test:test("localhost", "serge", "...", "/home/serge/tmp/data", "cust_group.txt"). "220 ProFTPD 1.2.6 Server (DevLinuxPro FTP) [devlinuxpro.mis.idt.net]" "331 Password required for serge." "230 User serge logged in." "250 CWD command successful." "500 EPSV not understood." "200 PORT command successful" "150 Opening ASCII mode data connection for cust_group.txt (7487 bytes)" "226 Transfer complete." "150 Opening ASCII mode data connection for cust_group.txt (7487 bytes)" ok This is good and expected. We can see that the file is transfered twice. Now the same call without debugger: ~/tmp/dirtest>erl Erlang (BEAM) emulator version 5.4.8 [source] [hipe] [threads:0] Eshell V5.4.8 (abort with ^G) 1> ftp_test:test("localhost", "serge", "...", "/home/serge/tmp/data", "cust_group.txt"). "220 ProFTPD 1.2.6 Server (DevLinuxPro FTP) [devlinuxpro.mis.idt.net]" "331 Password required for serge." "230 User serge logged in." "250 CWD command successful." "500 EPSV not understood." "200 PORT command successful" "150 Opening ASCII mode data connection for cust_group.txt (7487 bytes)" "226 Transfer complete." "200 PORT command successful" ok No transfer is happening after the successful PORT command... Serge Serge Aleynikov wrote: > OTP team: > > I found a bug in the inets' ftp.erl client that can be patched by > applying the ftp.erl.patch file to the source. > > The bug is seen when you try to download more than one file in a row > using ftp:recv/2 function. For some reason this bug doesn't occur when > tracing is enabled (and/or debugger application is running). > > Use the following to reproduce the bug: > > ftp_test:test(Host, User, Password, RemoteDir, RemoteFile). > > ~/tmp/dirtest>erl -pa ~/Projects/DRP/lib/drpdb-1.0/ebin > Erlang (BEAM) emulator version 5.4.8 [source] [hipe] [threads:0] > > Eshell V5.4.8 (abort with ^G) > 1> ftp_test:test("localhost", "serge", "...", "/home/serge", "tt.txt"). > "220 ProFTPD 1.2.6 Server (DevLinuxPro FTP) [devlinuxpro.mis.idt.net]" > "331 Password required for serge." > "230 User serge logged in." > "250 CWD command successful." > "500 EPSV not understood." > "200 PORT command successful" > "150 Opening ASCII mode data connection for tt.txt (7487 bytes)" > "226 Transfer complete." > "200 PORT command successful" > ** exited: {{function_clause,[{inet,tcp_close,[{lsock,#Port<0.123>}]}, > {ftp,do_termiante,2}, > {gen_server,terminate,6}, > {proc_lib,init_p,5}]}, > {gen_server,call, > [<0.42.0>, > {recv,"tt.txt","tt.txt"}, > infinity]}} ** > > Hope that it can make it in the next OTP release. > > Regards, > > Serge > > > ------------------------------------------------------------------------ > > -module(ftp_test). > > -export([test/5]). > > test(Host, User, Password, Dir, File) -> > application:start(inets), > {ok, Pid} = ftp:open(Host, [verbose]), > ok = ftp:user(Pid, User, Password), > ok = ftp:cd(Pid, Dir), > ok = ftp:recv(Pid, File), > ok = ftp:recv(Pid, File), > ftp:close(Pid). > > > ------------------------------------------------------------------------ > > --- /usr/local/lib/erlang/lib/inets-4.5/src/ftp.erl Tue Aug 23 13:28:08 2005 > +++ ftp.erl Tue Aug 23 16:39:43 2005 > @@ -790,11 +790,11 @@ > %% terminate/2 and code_change/3 > %%-------------------------------------------------------------------------- > terminate(normal, State) -> > - do_termiante({error, econn}, State); > + do_terminate({error, econn}, State); > terminate(Reason, State) -> > - do_termiante({error, Reason}, State). > + do_terminate({error, Reason}, State). > > -do_termiante(ErrorMsg, State) -> > +do_terminate(ErrorMsg, State) -> > close_data_connection(State), > close_ctrl_connection(State), > case State#state.client of > @@ -1313,6 +1313,8 @@ > > close_data_connection(#state{dsock = undefined}) -> > ok; > +close_data_connection(#state{dsock = {lsock, Socket}}) -> > + close_connection(Socket); > close_data_connection(#state{dsock = Socket}) -> > close_connection(Socket). From ingela@REDACTED Wed Aug 24 08:39:54 2005 From: ingela@REDACTED (Ingela Anderton) Date: Wed, 24 Aug 2005 08:39:54 +0200 Subject: inets ftp bug References: <430B8B5C.2050209@hq.idt.net> Message-ID: <17164.5690.439697.463734@gargle.gargle.HOWL> Actually this is an already known and fixed problem in inets-4.5.2 Realeasnotes says: [ftp, client] Calling ftp:recv/2 twice on the same connection failed due to that the last message on the ctrl channel was not appropriately taken care of. This could potentially cause a problem for any operation performed on the same connection where there had previously been an ftp:recv/2 call. Also, in some cases, when the process tries to close the data connection, it does not take into account that the data connection may actually not have been established. This will definitely be part of the next open source release. We are actually working on inets-4.5.3 at the moment that will fix some more bugs and add some new nice features to the inets components (not only ftp). The aim is that this version should be the one in the next open source release. Serge Aleynikov wrote: > OTP team: > > I found a bug in the inets' ftp.erl client that can be patched by > applying the ftp.erl.patch file to the source. > > The bug is seen when you try to download more than one file in a row > using ftp:recv/2 function. For some reason this bug doesn't occur when > tracing is enabled (and/or debugger application is running). > > Use the following to reproduce the bug: > > ftp_test:test(Host, User, Password, RemoteDir, RemoteFile). > > ~/tmp/dirtest>erl -pa ~/Projects/DRP/lib/drpdb-1.0/ebin > Erlang (BEAM) emulator version 5.4.8 [source] [hipe] [threads:0] > > Eshell V5.4.8 (abort with ^G) > 1> ftp_test:test("localhost", "serge", "...", "/home/serge", "tt.txt"). > "220 ProFTPD 1.2.6 Server (DevLinuxPro FTP) [devlinuxpro.mis.idt.net]" > "331 Password required for serge." > "230 User serge logged in." > "250 CWD command successful." > "500 EPSV not understood." > "200 PORT command successful" > "150 Opening ASCII mode data connection for tt.txt (7487 bytes)" > "226 Transfer complete." > "200 PORT command successful" > ** exited: {{function_clause,[{inet,tcp_close,[{lsock,#Port<0.123>}]}, > {ftp,do_termiante,2}, > {gen_server,terminate,6}, > {proc_lib,init_p,5}]}, > {gen_server,call, > [<0.42.0>, > {recv,"tt.txt","tt.txt"}, > infinity]}} ** > > Hope that it can make it in the next OTP release. > > Regards, > > Serge > > -- > Serge Aleynikov > R&D Telecom, IDT Corp. > Tel: (973) 438-3436 > Fax: (973) 438-1464 > serge@REDACTED > -module(ftp_test). > > -export([test/5]). > > test(Host, User, Password, Dir, File) -> > application:start(inets), > {ok, Pid} = ftp:open(Host, [verbose]), > ok = ftp:user(Pid, User, Password), > ok = ftp:cd(Pid, Dir), > ok = ftp:recv(Pid, File), > ok = ftp:recv(Pid, File), > ftp:close(Pid). > --- /usr/local/lib/erlang/lib/inets-4.5/src/ftp.erl Tue Aug 23 13:28:08 2005 > +++ ftp.erl Tue Aug 23 16:39:43 2005 > @@ -790,11 +790,11 @@ > %% terminate/2 and code_change/3 > %%-------------------------------------------------------------------------- > terminate(normal, State) -> > - do_termiante({error, econn}, State); > + do_terminate({error, econn}, State); > terminate(Reason, State) -> > - do_termiante({error, Reason}, State). > + do_terminate({error, Reason}, State). > > -do_termiante(ErrorMsg, State) -> > +do_terminate(ErrorMsg, State) -> > close_data_connection(State), > close_ctrl_connection(State), > case State#state.client of > @@ -1313,6 +1313,8 @@ > > close_data_connection(#state{dsock = undefined}) -> > ok; > +close_data_connection(#state{dsock = {lsock, Socket}}) -> > + close_connection(Socket); > close_data_connection(#state{dsock = Socket}) -> > close_connection(Socket). > -- /Ingela - OTP team From serge@REDACTED Wed Aug 24 00:43:54 2005 From: serge@REDACTED (Serge Aleynikov) Date: Tue, 23 Aug 2005 18:43:54 -0400 Subject: inets ftp bug In-Reply-To: <430B92D0.2070800@hq.idt.net> References: <430B8B5C.2050209@hq.idt.net> <430B92D0.2070800@hq.idt.net> Message-ID: <430BA6AA.5060302@hq.idt.net> OTP team: This is my second attempt to fix the issue with inets' ftp.erl, which seems to be more involved than I initially thought. In this version of ftp.erl ftp:recv/2 seems to be working correctly, however, I am not quite sure that this fix covered all errors in the implementation (which IMHO is quite messy), and would prefer if one of the authors would take a look at it. > ftp_test:test("localhost", "serge", "...", "/home/serge/tmp/data", "dial_code.txt"). "220 ProFTPD 1.2.6 Server (DevLinuxPro FTP) [devlinuxpro.mis.idt.net]" "331 Password required for serge." "230 User serge logged in." "250 CWD command successful." "500 EPSV not understood." "200 PORT command successful" "150 Opening ASCII mode data connection for dial_code.txt (5271838 bytes)" "226 Transfer complete." "200 PORT command successful" "150 Opening ASCII mode data connection for dial_code.txt (5271838 bytes)" "226 Transfer complete." ok Regards, Serge Serge Aleynikov wrote: > Actually, there seems to be one more (at least :-( ) issue with the > ftp.erl. With the applied patch there is no more exception raised, but > the second transfer of a file doesn't happen if you run the code outside > of the debugger. > > When running with a debugger, I get: > > ~/tmp/dirtest>erl > Erlang (BEAM) emulator version 5.4.8 [source] [hipe] [threads:0] > > Eshell V5.4.8 (abort with ^G) > 1> i:ii(ftp). > {module,ftp} > 2> i:ib(ftp, activate_data_connection, 1). > ok > 3> debugger:start(). > {ok,<0.36.0>} > 4> ftp_test:test("localhost", "serge", "...", "/home/serge/tmp/data", > "cust_group.txt"). > "220 ProFTPD 1.2.6 Server (DevLinuxPro FTP) [devlinuxpro.mis.idt.net]" > "331 Password required for serge." > "230 User serge logged in." > "250 CWD command successful." > "500 EPSV not understood." > "200 PORT command successful" > "150 Opening ASCII mode data connection for cust_group.txt (7487 bytes)" > "226 Transfer complete." > "150 Opening ASCII mode data connection for cust_group.txt (7487 bytes)" > ok > > This is good and expected. We can see that the file is transfered twice. > Now the same call without debugger: > > ~/tmp/dirtest>erl > Erlang (BEAM) emulator version 5.4.8 [source] [hipe] [threads:0] > > Eshell V5.4.8 (abort with ^G) > 1> ftp_test:test("localhost", "serge", "...", "/home/serge/tmp/data", > "cust_group.txt"). > "220 ProFTPD 1.2.6 Server (DevLinuxPro FTP) [devlinuxpro.mis.idt.net]" > "331 Password required for serge." > "230 User serge logged in." > "250 CWD command successful." > "500 EPSV not understood." > "200 PORT command successful" > "150 Opening ASCII mode data connection for cust_group.txt (7487 bytes)" > "226 Transfer complete." > "200 PORT command successful" > ok > > No transfer is happening after the successful PORT command... > > Serge > > > Serge Aleynikov wrote: > >> OTP team: >> >> I found a bug in the inets' ftp.erl client that can be patched by >> applying the ftp.erl.patch file to the source. >> >> The bug is seen when you try to download more than one file in a row >> using ftp:recv/2 function. For some reason this bug doesn't occur >> when tracing is enabled (and/or debugger application is running). >> >> Use the following to reproduce the bug: >> >> ftp_test:test(Host, User, Password, RemoteDir, RemoteFile). >> >> ~/tmp/dirtest>erl -pa ~/Projects/DRP/lib/drpdb-1.0/ebin >> Erlang (BEAM) emulator version 5.4.8 [source] [hipe] [threads:0] >> >> Eshell V5.4.8 (abort with ^G) >> 1> ftp_test:test("localhost", "serge", "...", "/home/serge", "tt.txt"). >> "220 ProFTPD 1.2.6 Server (DevLinuxPro FTP) [devlinuxpro.mis.idt.net]" >> "331 Password required for serge." >> "230 User serge logged in." >> "250 CWD command successful." >> "500 EPSV not understood." >> "200 PORT command successful" >> "150 Opening ASCII mode data connection for tt.txt (7487 bytes)" >> "226 Transfer complete." >> "200 PORT command successful" >> ** exited: {{function_clause,[{inet,tcp_close,[{lsock,#Port<0.123>}]}, >> {ftp,do_termiante,2}, >> {gen_server,terminate,6}, >> {proc_lib,init_p,5}]}, >> {gen_server,call, >> [<0.42.0>, >> {recv,"tt.txt","tt.txt"}, >> infinity]}} ** >> >> Hope that it can make it in the next OTP release. >> >> Regards, >> >> Serge >> >> >> ------------------------------------------------------------------------ >> >> -module(ftp_test). >> >> -export([test/5]). >> >> test(Host, User, Password, Dir, File) -> >> application:start(inets), >> {ok, Pid} = ftp:open(Host, [verbose]), >> ok = ftp:user(Pid, User, Password), >> ok = ftp:cd(Pid, Dir), >> ok = ftp:recv(Pid, File), >> ok = ftp:recv(Pid, File), >> ftp:close(Pid). >> >> >> ------------------------------------------------------------------------ >> >> --- /usr/local/lib/erlang/lib/inets-4.5/src/ftp.erl Tue Aug 23 >> 13:28:08 2005 >> +++ ftp.erl Tue Aug 23 16:39:43 2005 >> @@ -790,11 +790,11 @@ >> %% terminate/2 and code_change/3 >> %%-------------------------------------------------------------------------- >> >> terminate(normal, State) -> >> - do_termiante({error, econn}, State); >> + do_terminate({error, econn}, State); >> terminate(Reason, State) -> >> - do_termiante({error, Reason}, State). >> + do_terminate({error, Reason}, State). >> >> -do_termiante(ErrorMsg, State) -> >> +do_terminate(ErrorMsg, State) -> >> close_data_connection(State), >> close_ctrl_connection(State), >> case State#state.client of >> @@ -1313,6 +1313,8 @@ >> >> close_data_connection(#state{dsock = undefined}) -> >> ok; >> +close_data_connection(#state{dsock = {lsock, Socket}}) -> >> + close_connection(Socket); >> close_data_connection(#state{dsock = Socket}) -> >> close_connection(Socket). > > -- Serge Aleynikov R&D Telecom, IDT Corp. Tel: (973) 438-3436 Fax: (973) 438-1464 serge@REDACTED -------------- next part -------------- An embedded and charset-unspecified text was scrubbed... Name: ftp_test.erl URL: -------------- next part -------------- An embedded and charset-unspecified text was scrubbed... Name: ftp.erl URL: -------------- next part -------------- An embedded and charset-unspecified text was scrubbed... Name: ftp.erl.patch URL: From ulf.wiger@REDACTED Wed Aug 31 14:15:58 2005 From: ulf.wiger@REDACTED (Ulf Wiger (AL/EAB)) Date: Wed, 31 Aug 2005 14:15:58 +0200 Subject: arguments after -- Message-ID: Snipped from the 'erl' documentation: "-- Any arguments following -- will not be interpreted in any way. They can be retrieved by init:get_plain_arguments/0. The exception is arguments starting with a +, which will be interpreted as system flags (see below). " but some experimentation shows that it doesn't work as advertised: $ erl -boot start_clean -sname foo Erlang (BEAM) emulator version 5.4.7 [hipe] [threads:0] [kernel-poll] Eshell V5.4.7 (abort with ^G) (foo@REDACTED)1> application:get_env(kernel,net_ticktime). undefined (foo@REDACTED)2> BREAK: (a)bort (c)ontinue (p)roc info (i)nfo (l)oaded (v)ersion (k)ill (D)b-tables (d)istribution a $ erl -boot start_clean -sname foo -kernel net_ticktime 60 Erlang (BEAM) emulator version 5.4.7 [hipe] [threads:0] [kernel-poll] Eshell V5.4.7 (abort with ^G) (foo@REDACTED)1> application:get_env(kernel,net_ticktime). {ok,60} (foo@REDACTED)2> BREAK: (a)bort (c)ontinue (p)roc info (i)nfo (l)oaded (v)ersion (k)ill (D)b-tables (d)istribution a $ erl -boot start_clean -sname foo -- -kernel net_ticktime 60 Erlang (BEAM) emulator version 5.4.7 [hipe] [threads:0] [kernel-poll] Eshell V5.4.7 (abort with ^G) (foo@REDACTED)1> application:get_env(kernel,net_ticktime). {ok,60} (foo@REDACTED)2> init:get_plain_arguments(). [] (foo@REDACTED)3> My conclusion was that erlexec uses "--" to separate the automatically generated options from the user options. But all these options end up in init:get_arguments() anyway, so I'm unsure as to what it accomplishes. There is also an "-extra" option, which is supposed to do exactly the same thing as "--" is supposed to do. "-extra" _does_ work exactly as advertised. The included patches suggest a way to address the problem. First, change erlexec.c so that it doesn't overload "--": *** /home/etxuwig/OSE/tmp/otp_src_R10B-7/erts/etc/common/erlexec.c Tue Mar 22 15:09:54 2005 --- erlexec.c Wed Aug 31 14:04:11 2005 *************** *** 675,681 **** add_Eargs(rootdir); add_Eargs("-progname"); add_Eargs(progname); ! add_Eargs("--"); ensure_EargsSz(EargsCnt + argsCnt + 1); for (i = 0; i < argsCnt; i++) Eargsp[EargsCnt++] = argsp[i]; --- 675,681 ---- add_Eargs(rootdir); add_Eargs("-progname"); add_Eargs(progname); ! add_Eargs("-end"); ensure_EargsSz(EargsCnt + argsCnt + 1); for (i = 0; i < argsCnt; i++) Eargsp[EargsCnt++] = argsp[i]; Then, change init.erl, so that it recognizes "-end": ws12858> gdiff -c ~/OSE/tmp/otp_src_R10B-7/lib/kernel/src/init.erl init.erl *** /home/etxuwig/OSE/tmp/otp_src_R10B-7/lib/kernel/src/init.erl Tue May 10 17:08:13 2005 --- init.erl Wed Aug 31 14:06:46 2005 *************** *** 1055,1061 **** check(<<"-s">>) -> start_arg; check(<<"-run">>) -> start_arg2; check(<<"-eval">>) -> eval_arg; ! check(<<"--">>) -> end_args; check(X) when binary(X) -> case binary_to_list(X) of [$-|_Rest] -> flag; --- 1055,1062 ---- check(<<"-s">>) -> start_arg; check(<<"-run">>) -> start_arg2; check(<<"-eval">>) -> eval_arg; ! check(<<"-end">>) -> end_args; ! check(<<"--">>) -> start_extra_arg; check(X) when binary(X) -> case binary_to_list(X) of [$-|_Rest] -> flag; /Uffe