From mikpe@REDACTED Wed Sep 1 13:43:43 2010 From: mikpe@REDACTED (Mikael Pettersson) Date: Wed, 1 Sep 2010 13:43:43 +0200 Subject: [erlang-patches] Allow the pool of hipe constants to grow at runtime In-Reply-To: References: <1EA19045-208E-4020-87BE-D159CC8C60BE@kallisys.net> Message-ID: <19582.15471.954448.853541@pilspetsen.it.uu.se> On Tue, 31 Aug 2010 10:38:33 +0200, Bj?rn Gustavsson wrote: > 2010/8/30 Paul Guyot : > > > > Mikael, I understand that the OTP team prefers git fetch command lines, b= > ut you can see the patch in plain old diff format here: > > http://github.com/pguyot/otp/commit/2f00cf20e222dd1ad5c0c48b3808821640ff5= > 7a6.diff > > We do accept patches inlined in emails, provided > that they formatted in the same way as "git format-patch" does > and that they are not white-space damaged. Such > patches are easy to apply using "git am". Since it > can be tricky to avoid white-space damaging inlined > patches (depending on which email client you use), > we only recommend sending inlined patches if you > know how to do it properly. > > (Note: We don't accept attached patches or inlined > patches that don't have the commit message in the > subject line and email body.) > > The advantage of inlined patches are that they > can be easily reviewed on the mailing list by > just replying to the email and inserting the comments > after the lines they refer to. That is indeed the reason why I asked for an inline patch. Other mailing lists like gcc-patches and linux-kernel work that way: inline patches for review and testing, then git pulls. Having said that, the 2nd version of the patch is very different from the 1st, and almost all coding-style complaints I had are gone. One minor nit though: > --- a/erts/emulator/hipe/hipe_bif0.c > +++ b/erts/emulator/hipe/hipe_bif0.c > @@ -450,52 +450,13 @@ BIF_RETTYPE hipe_bifs_alloc_data_2(BIF_ALIST_2) > } > > /* > - * Memory area for constant Erlang terms. > - * > - * These constants must not be forwarded by the gc. > - * Therefore, the gc needs to be able to distinguish between > - * collectible objects and constants. Unfortunately, an Erlang > - * process' collectible objects are scattered around in two > - * heaps and a list of message buffers, so testing "is X a > - * collectible object?" can be expensive. > - * > - * Instead, constants are placed in a single contiguous area, > - * which allows for an inexpensive "is X a constant?" test. > - * > - * XXX: Allow this area to be grown. > + * Statistics on hipe constants: size of hipe constants, in words. In documentation and comments it's "HiPE" not "hipe". "hipe" should only be used in source code identifiers. Removing hipe_bifs:show_literals/0 is Ok. hipe_bifs:constants_size/0 must remain though as the HiPE test suite uses it. So ACK, if you do the hipe -> HiPE fix in the comment above. /Mikael From sg2342@REDACTED Wed Sep 1 22:18:24 2010 From: sg2342@REDACTED (Stefan Grundmann) Date: Wed, 1 Sep 2010 20:18:24 +0000 Subject: fix process leak in ssh_system_sup (dynamicaly created childs where not cleaned up) Message-ID: <201009012018.26428.sg2342@googlemail.com> The ssh_system_sup supervisor supervises one ssh_subsystem_sup process for every client connection. There was no functionality to free resources (terminate_child/ delete_child) when a client connection was closed. Which lead to one ssh_subsystem_sup and one ssh_channel_sup process left over. This commit adds ssh_system_sup:stop_subsystem/2 and code that calls it in ssh_connection_manager:terminate/2. git fetch git://github.com/sg2342/otp.git fix_ssh_system_sup_proc_leak best regards Stefan Grundmann From mclaughlin77@REDACTED Thu Sep 2 16:51:27 2010 From: mclaughlin77@REDACTED (Kelly McLaughlin) Date: Thu, 2 Sep 2010 08:51:27 -0600 Subject: Change pool module to attempt to attach to nodes that are already running Message-ID: The pool module prints out an error message and takes no further action for nodes that are already running. I think the behavior should be changed such that if the return from slave:start/3 is {already_running, Node} then an attempt to attach to the node is still made. This makes sense because the node has been specified by the user in the .hosts.erlang file indicating a wish for the node to be part of the pool and a manual attach can be successfully made after the pool is started. git fetch git://github.com/mclaughlin77/otp.git pool_connect_to_running_nodes Kelly From bgustavsson@REDACTED Thu Sep 2 17:07:22 2010 From: bgustavsson@REDACTED (=?UTF-8?Q?Bj=C3=B6rn_Gustavsson?=) Date: Thu, 2 Sep 2010 17:07:22 +0200 Subject: [erlang-patches] Change pool module to attempt to attach to nodes that are already running In-Reply-To: References: Message-ID: On Thu, Sep 2, 2010 at 4:51 PM, Kelly McLaughlin wrote: > The pool module prints out an error message and takes no further action for > nodes that are already running. I think the behavior should be changed such > that if the return from slave:start/3 is {already_running, Node} then an > attempt to attach to the node is still made. This makes sense because the > node has been specified by the user in the .hosts.erlang file indicating a > wish for the node to be part of the pool and a manual attach can be > successfully made after the pool is started. > > git fetch git://github.com/mclaughlin77/otp.git pool_connect_to_running_nodes Thanks! Will include in pu. -- Bj?rn Gustavsson, Erlang/OTP, Ericsson AB From nick@REDACTED Thu Sep 2 17:18:42 2010 From: nick@REDACTED (Niclas Eklund) Date: Thu, 2 Sep 2010 17:18:42 +0200 (CEST) Subject: [erlang-patches] fix process leak in ssh_system_sup (dynamicaly created childs where not cleaned up) In-Reply-To: <201009012018.26428.sg2342@googlemail.com> References: <201009012018.26428.sg2342@googlemail.com> Message-ID: Hello! Thanks for reporting this! I've added your patch and it will be included in R14B. I had to do some additional changes to avoid a race condition between some processes. Best regards, Niclas @ Erlang/OTP On Wed, 1 Sep 2010, Stefan Grundmann wrote: > The ssh_system_sup supervisor supervises one ssh_subsystem_sup process for > every client connection. There was no functionality to free resources > (terminate_child/ delete_child) when a client connection was closed. > Which lead to one ssh_subsystem_sup and one ssh_channel_sup process left over. > > This commit adds ssh_system_sup:stop_subsystem/2 and code that calls it > in ssh_connection_manager:terminate/2. > > git fetch git://github.com/sg2342/otp.git fix_ssh_system_sup_proc_leak > > best regards > > Stefan Grundmann > > ________________________________________________________________ > erlang-patches (at) erlang.org mailing list. > See http://www.erlang.org/faq.html > To unsubscribe; mailto:erlang-patches-unsubscribe@REDACTED > From tuncer.ayaz@REDACTED Thu Sep 2 23:26:42 2010 From: tuncer.ayaz@REDACTED (Tuncer Ayaz) Date: Thu, 2 Sep 2010 23:26:42 +0200 Subject: [PATCH] ssh: ensure ~/.ssh exists Message-ID: <1283462802-98683-1-git-send-email-tuncer.ayaz@gmail.com> Make sure that ~/.ssh exists before trying to open files like ~/.ssh/known_hosts. Reported-By: Daniel Goertzen --- lib/ssh/src/ssh_file.erl | 4 +++- 1 files changed, 3 insertions(+), 1 deletions(-) diff --git a/lib/ssh/src/ssh_file.erl b/lib/ssh/src/ssh_file.erl index 5572349..1e32ae9 100755 --- a/lib/ssh/src/ssh_file.erl +++ b/lib/ssh/src/ssh_file.erl @@ -527,4 +527,6 @@ file_name(Type, Name, Opts) -> default_user_dir()-> {ok,[[Home|_]]} = init:get_argument(home), - filename:join(Home, ".ssh"). + UserDir = filename:join(Home, ".ssh"), + ok = filelib:ensure_dir(filename:join(UserDir, "dummy")), + UserDir. From tuncer.ayaz@REDACTED Fri Sep 3 12:52:42 2010 From: tuncer.ayaz@REDACTED (Tuncer Ayaz) Date: Fri, 3 Sep 2010 12:52:42 +0200 Subject: [PATCH] ssh: ensure ~/.ssh exists In-Reply-To: <1283462802-98683-1-git-send-email-tuncer.ayaz@gmail.com> References: <1283462802-98683-1-git-send-email-tuncer.ayaz@gmail.com> Message-ID: <1283511162-8340-1-git-send-email-tuncer.ayaz@gmail.com> Make sure that ~/.ssh exists before trying to open files like ~/.ssh/known_hosts. Reported-By: Daniel Goertzen --- lib/ssh/src/ssh_file.erl | 18 ++++++++++++++++-- 1 files changed, 16 insertions(+), 2 deletions(-) diff --git a/lib/ssh/src/ssh_file.erl b/lib/ssh/src/ssh_file.erl index 5572349..963f0cf 100755 --- a/lib/ssh/src/ssh_file.erl +++ b/lib/ssh/src/ssh_file.erl @@ -27,6 +27,8 @@ -include("PKCS-1.hrl"). -include("DSS.hrl"). +-include_lib("kernel/include/file.hrl"). + -export([public_host_dsa_key/2,private_host_dsa_key/2, public_host_rsa_key/2,private_host_rsa_key/2, public_host_key/2,private_host_key/2, @@ -43,6 +45,9 @@ -define(DBG_PATHS, true). +-define(PERM_700, 8#00700). +-define(PERM_644, 8#00644). + %% API public_host_dsa_key(Type, Opts) -> File = file_name(Type, "ssh_host_dsa_key.pub", Opts), @@ -113,8 +118,10 @@ do_lookup_host_key(Host, Alg, Opts) -> add_host_key(Host, Key, Opts) -> Host1 = add_ip(replace_localhost(Host)), - case file:open(file_name(user, "known_hosts", Opts),[write,append]) of + KnownHosts = file_name(user, "known_hosts", Opts), + case file:open(KnownHosts, [write,append]) of {ok, Fd} -> + ok = chmod(KnownHosts, ?PERM_644), Res = add_key_fd(Fd, Host1, Key), file:close(Fd), Res; @@ -527,4 +534,11 @@ file_name(Type, Name, Opts) -> default_user_dir()-> {ok,[[Home|_]]} = init:get_argument(home), - filename:join(Home, ".ssh"). + UserDir = filename:join(Home, ".ssh"), + ok = filelib:ensure_dir(filename:join(UserDir, "dummy")), + ok = chmod(UserDir, ?PERM_700), + UserDir. + +chmod(Path, Perms) -> + {ok, FileInfo} = file:read_file_info(Path), + ok = file:write_file_info(Path, FileInfo#file_info{mode=Perms}). From tuncer.ayaz@REDACTED Fri Sep 3 13:05:46 2010 From: tuncer.ayaz@REDACTED (Tuncer Ayaz) Date: Fri, 3 Sep 2010 13:05:46 +0200 Subject: [PATCH] ssh: ensure ~/.ssh exists In-Reply-To: <1283511162-8340-1-git-send-email-tuncer.ayaz@gmail.com> References: <1283462802-98683-1-git-send-email-tuncer.ayaz@gmail.com> <1283511162-8340-1-git-send-email-tuncer.ayaz@gmail.com> Message-ID: On Fri, Sep 3, 2010 at 12:52 PM, Tuncer Ayaz wrote: > Make sure that ~/.ssh exists before trying to open files like > ~/.ssh/known_hosts. > > Reported-By: Daniel Goertzen > --- > lib/ssh/src/ssh_file.erl | 18 ++++++++++++++++-- > 1 files changed, 16 insertions(+), 2 deletions(-) [...] Please review this patch instead. This one makes sure that correct access permissions are set. Thanks to Hakan Mattson catching that. The rationale for the patch is that OpenSSH and friends do create ~/.ssh first before trying to write to ~/.ssh/known_hosts. This reminds me that we need variants of make_dir/1 and ensure_dir/1 which allow one to specify the access permissions. It's a common use case and given support from the underlying operating system one could try to make it an atomic operation. From tuncer.ayaz@REDACTED Fri Sep 3 13:18:53 2010 From: tuncer.ayaz@REDACTED (Tuncer Ayaz) Date: Fri, 3 Sep 2010 13:18:53 +0200 Subject: [PATCH] ssh: ensure ~/.ssh exists In-Reply-To: <1283511162-8340-1-git-send-email-tuncer.ayaz@gmail.com> References: <1283462802-98683-1-git-send-email-tuncer.ayaz@gmail.com> <1283511162-8340-1-git-send-email-tuncer.ayaz@gmail.com> Message-ID: On Fri, Sep 3, 2010 at 12:52 PM, Tuncer Ayaz wrote: > @@ -113,8 +118,10 @@ do_lookup_host_key(Host, Alg, Opts) -> > > ?add_host_key(Host, Key, Opts) -> > ? ? Host1 = add_ip(replace_localhost(Host)), > - ? ?case file:open(file_name(user, "known_hosts", Opts),[write,append]) of > + ? ?KnownHosts = file_name(user, "known_hosts", Opts), > + ? ?case file:open(KnownHosts, [write,append]) of > ? ? ? ?{ok, Fd} -> > + ? ? ? ? ? ok = chmod(KnownHosts, ?PERM_644), I'm not sure the above is really needed. Comments welcome. From bgustavsson@REDACTED Fri Sep 3 13:22:53 2010 From: bgustavsson@REDACTED (=?UTF-8?Q?Bj=C3=B6rn_Gustavsson?=) Date: Fri, 3 Sep 2010 13:22:53 +0200 Subject: [erlang-patches] [PATCH] ssh: ensure ~/.ssh exists In-Reply-To: <1283511162-8340-1-git-send-email-tuncer.ayaz@gmail.com> References: <1283462802-98683-1-git-send-email-tuncer.ayaz@gmail.com> <1283511162-8340-1-git-send-email-tuncer.ayaz@gmail.com> Message-ID: On Fri, Sep 3, 2010 at 12:52 PM, Tuncer Ayaz wrote: > Make sure that ~/.ssh exists before trying to open files like > ~/.ssh/known_hosts. > > Reported-By: Daniel Goertzen > --- Thanks! Will include in pu. -- Bj?rn Gustavsson, Erlang/OTP, Ericsson AB From bgustavsson@REDACTED Fri Sep 3 13:58:14 2010 From: bgustavsson@REDACTED (=?UTF-8?Q?Bj=C3=B6rn_Gustavsson?=) Date: Fri, 3 Sep 2010 13:58:14 +0200 Subject: What's cooking in erlang/otp (2010-09-03) Message-ID: R14B will be released September 15. We might include more topics that already are in 'pu' into the release. New topics received from now on are unlikely to be included in the release, unless they fix fairly serious bugs. ------------------------------------------------------------ [Graduated] * mp/fix-hipe-icode-exceptions (hipe) (2010-08-27) 1 commit + fix crash in hipe_icode_exceptions (4992955) * mp/fix-hipe-on_load_crash (erts) (2010-06-30) 1 commit + fix native code crash when calling unloaded module with on_load function (9010837) * mp/robustify-hipe_bifs_get_hrvtime (erts) (2010-08-26) 1 commit + robustify hipe_bifs:get_hrvtime/0 (789f950) * pan/local_univ_time_bsd/OTP-8580 (erts) (2010-06-10) 1 commit + Teach erl_time_sup to handle timezones w/o DST on FreeBSD as on other platforms (7e6fe78) * pg/fix-crypto-rc4_encrypt_with_state (crypto) (2010-08-20) 1 commit + Fix RC4 stream cipher binding (crypto:rc4_encrypt_with_state/2) (c1af26a) * pg/fix-hipe-load (hipe) (2010-07-11) 1 commit + Fix hipe:load/1 (7d6a804) * pg/fix-segfault-on-crash_dump-with-hipe (erts) (2010-07-06) 1 commit + Fix segmentation fault when dumping the crash log with hipe enabled and natively compiled modules (c042183) * rz/fix-httpc-docs (inets) (2010-07-10) 1 commit . Fix broken links in inets docs (7e417c3) * tl/ssl-fix-packet-line-mode-list (ssl) (2010-08-18) 2 commits . Correct behaviour if {packet, line} and mode list are given (06f147c) . Change packet_line_decode/1 to not only check binary mode (5e6972f) Included with corrections. ------------------------------------------------------------ [New topics] * km/pool_connect-to-running-nodes (stdlib) (2010-09-02) 1 commit - Change pool module to attempt to attach to nodes that are already running (0c89959) * ms/ei-overflow-fix (erl_interface) (2010-08-21) 1 commit - ei: prevent overflow in ei_connect_init/ei_xconnect (ada2e2f) * ms/ei_connect-doc-examples (erl_interface) (2010-08-21) 1 commit - ei_connect: correct man page examples (cdd39a4) * ms/fix-erl_call-overflow (erl_interface) (2010-08-22) 1 commit - erl_call: fix multiple buffer overflows (9d70687) * ph/auto_recognize_ipv6 (kernel) (2010-08-24) 1 commit - Let an 8-tuple given as ip_address() for gen_tcp/gen_udp/gen_sctp imply 'inet6' (a0f020b) * ta/asn1-test-compile-options (asn1) (2010-04-24) 1 commit - Fix asn1_SUITE test_compile_options:verbose/1 (da97a82) * ta/ensure-dot-ssh-exists (ssh) (2010-09-03) 1 commit - ssh: ensure ~/.ssh exists (5bc5325) ------------------------------------------------------------ [Stalled] * er/ei-decode_msg (erl_interface) (2010-03-11) 1 commit - Add function to decode distribution header (864091a) Needs documentation and test cases. Action expected from: Topic author * jn/gen_stream (stdlib) (2010-07-15) 2 commits - Track gen_stream processes directly for accurate test results (38a4083) - Patch dev to reproduce jn/gen_stream (7694a74) . Add new gen_stream behaviour for efficiently consuming serial streams (65f3db8) This topic branch has a failing test case: shell_SUITE:start_restricted_from_shell; We have now tested with and without this topic branch and when it is present that test case fails. We consider it proved to be guilty. The test case does not fail when run standalone so it seems to be tricky... Also, some of its own test cases fail sporadicly. Action expected from: Topic author. * jp/dependencies_makefile (compiler, erts) (2010-02-14) 3 commits - squash! eliminate dialyzer warning (434e2ca) - squash! fix snprintf for Windows (bf2708d) - Add dependencies Makefile generation to erlc(1) and compile(3) (7cbc437) Approved in principle by the OTP Technical Board; now awaits a closer review of the implementation. Action expected from: Bj?rn Gustavsson (the reviewer) * kr/gs-browser (gs) (2010-02-10) 1 commit - Change lib/gs/src/tool_utils.erl to select multiple browsers other than Netscape (802d159) This topic branch introduces a new call to the deprecated regexp module. Action expected from: Topic author or anyone else with an interest to advance the topic * sf/erts_de_busy_limit (erts) (2010-06-08) 1 commit - Add flag-based setting for 'erts_de_busy_limit' constant (67ed9ab) This topic branch has multiple issues described in this email: http://www.erlang.org/cgi-bin/ezmlm-cgi?3:mss:1303:201008:ldciadjdmjednikemjch Action expected from: Topic author. ------------------------------------------------------------ [Cooking] * bg/temp-hipe-fixes (compiler, hipe, kernel) (2010-03-15) 6 commits - Avoid crash by skipping compilation_SUITE:on_load/1 (290bb30) - Inline less aggressively for native-code compilation (d505c72) - Crudely fix return type for the lists:key{search,find,member}/3 (df0669e) - seq_trace_SUITE: Don't native-compile (9e3a3f0) - Disable native code if on_load is used (2446475) - andor_SUITE: Don't native-compile (eed30d2) This branch contains temporary workarounds to avoid failing test cases and is never intended to graduate. * gc/gen-format-status-improvements (stdlib) (2010-06-12) 1 commit - Fix format_status bug for unregistered gen_event processes (95ed86f) * jf/run_erl-disable-flow-control (erts) (2010-03-05) 1 commit - Teach run_erl RUN_ERL_DISABLE_FLOWCNTRL for disabling flow control (d0775cd) * mk/net-dragonfly-bsd-patches (asn1, common_test, erl_interface, erts, et, mnesia, reltool, runtime_tools, test_server, wx) (2010-06-23) 4 commits - Remove unused variables (88a04a1) - Use proper install method (6960062) - Add support for DragonFly BSD (2008472) - Add support for NetBSD (2fb2a1e) * ml/add-os-pid-to-port-info (erts) (2010-08-19) 1 commit - Extend erlang:port_info/1,2 to show the OS pid of a spawned process (b2d85bf) * ms/inet-bug-fixes (erts, kernel) (2010-07-21) 4 commits - inet: support retrieving MAC address on BSD (c8070ff) - inet: fix getservbyname buffer overflow (d61d41e) - inet: fix ifr_name buffer overflow (227d3f3) - inet: null terminate ifr_name buffer (cfcb962) * pg/honor-start-type-in-rel-files (sasl) (2010-06-06) 1 commit - Honor start type in .rel files when building relup files (7599900) * rt/solaris-pty-handling-fixes (erts) (2010-08-06) 2 commits - Add corrected support for Solaris PTYs to run_erl (2ba4818) - Fix a typo that leads to syntax errors with DEBUG defined in run_erl (edfe4b9) * sa/callback-attr (compiler, inets, kernel, otp, stdlib) (2010-06-08) 7 commits - Add callback specs into 'application' module in kernel (b12de0a) - Add callback specs to tftp module following internet documentation (2f27196) - Add callback specs to inets_service module following possibly deprecated comments (cc249ec) - Add '-callback' attributes in stdlib's behaviours (6df97f4) - Update primary bootstrap (c864c17) - Automatical generation of 'behaviour_info' function from '-callback' attributes (5b455e8) - Add '-callback' attribute to language syntax (2f6c340) * sb/make-files-like-erlc (tools) (2010-05-18) 1 commit - Change make:files to behave more like erlc (5e9d051) * sv/epmd-check-listen (erts) (2010-07-14) 1 commit - check return value of epmd server listen() call (c5c8baa) * ta/asn1-reporting (asn1) (2010-04-23) 1 commit - asn1ct: Make formatting of errors and warnings consistent (93face2) * ta/asn1ct-fix-whitespace (asn1) (2010-07-12) 1 commit - asn1ct: change unusual whitespace char from 0xA0 to 0x20 (c43d20b) * tj/ct-timestamp-granularity (common_test) (2010-07-13) 1 commit - Include milliseconds in timestamps in Common Test log entries (4d18f18) * uw/epmd-fullnames (kernel) (2010-05-07) 1 commit - Allow the erlang nodename host part to differ from the hostname (e0774be) ------------------------------------------------------------ [Dropped] * jp/ssl-foaf (ssl) (2010-08-12) 1 commit . Allow server to use verify_peer and have no cacert (9971792) This functionality will be implemented in a slightly different way, probably in R14B. * jr/cover-src-path (tools) (2010-04-23) 1 commit . Fix searching for source files in analyse_to_file/* (b9d5068) Some serious flaws were pointed out. * pg/hipe_crash_with_on_load (erts) (2010-06-27) 1 commit . Fix crash when calling a module with an on_load attribute from a native module (2862bd2) Replaced by mp/fix-hipe-on_load_crash. -- Bj?rn Gustavsson, Erlang/OTP, Ericsson AB From ingela@REDACTED Fri Sep 3 16:41:59 2010 From: ingela@REDACTED (Ingela Anderton Andin) Date: Fri, 03 Sep 2010 16:41:59 +0200 Subject: [erlang-patches] Allow server to use verify_peer and have no cacertfile In-Reply-To: <4C74CE70.2050108@erix.ericsson.se> References: <4C74CE70.2050108@erix.ericsson.se> Message-ID: <4C810937.8090409@erix.ericsson.se> Hi! After pondering how to solve this we have agreed that our original design of the verify-modes and extension verification (that was undocumented) was somewhat flawed. And we have now implemented a new solution using a new semantic for the verify_fun, that I actually think will work as Jonas hoped his patch would. The verify_fun option will take a {fun(), UserState :: term()} tuple. The verify fun will be called when path validation errors or unknow certificate extensions are encountered. A fun for accepting the unknown_ca error would for instance look like this. fun(_,{bad_cert, unknown_ca}, UserState) -> {valid, UserState}; (_,{bad_cert, _} = Reason, _) -> {fail, Reason}; (_,{extension, _}, UserState) -> {unknown, UserState} end, Backwards compatibility code is in place, even if the old style verify_fun option support will be discontinued. Code will be in github in the beging of next week. Regards Ingela Erlang/OTP team - Ericsson AB Ingela Anderton Andin wrote: > Hi! > > After discussing this with Jonas a bit I feel that the > what we probably want to do is to make it possible for > the server to send a certificate request in verify_none > mode as then the verify fun can be used in the way that > Jonas wants. It seems there is a bug in public_key that > under certain circumstances would make the path_validation > not return an error in verify_peer mode as intended. > > As I explained in an Erlang-questions thread: > > If verify_none all possible path validation errors will be passed > to the the verify fun and it will be up to the verify fun if the > connection should fail or succeed. At the moment this option is > only relevant for the client side as the server will never send a > certificate request in verify_none mode. ( It is possible that we > want this to be possible and we are looking in to that now). > > If verify_peer any path validation error should make the > connection fail we should never get to the branch using the > verify fun, the public_key path validation should return {error, > Reason}. > > So we are working on a solution I can not promise it will be > ready for R14B but I think it can make a maintenance release > i.e. I do not think you will have to wait for R15. > > Regards Ingela Erlang/OTP team - Ericsson AB > > jonas wrote: >> Hey *, >> I wanted to implement a server that can authenticate clients using the >> FOAF+SSL protocol (http://esw.w3.org/Foaf+ssl). This protocol uses the >> existing TLS infrastructure but does not use a cacert to authenticate >> the user. Providing no cacert was just an option for a client, since >> they can usually verify the certificate manually. If a server doesn't >> provide a cacertfile you get an error. This patch removes this >> restriction and allows a server to have no cacert, too. >> >> git fetch git://github.com/jonasp/otp.git foaf_ssl >> >> I didn't delete the testcase "Test server must have cacerts if it >> wants to verify client" yet. I can do so if you think that the patch >> is fine as it is. >> As far as documentation is concerned I am not exactly sure what would >> be reasonable to change since the FOAF+SSL usecase is still a bit too >> exotic to be referred to. (It is still in the process of being >> formally standardized.) And the Erlang man page for ssl just states >> that the cacertfile option can be omitted if you do not want to verify >> the peer but does not differentiate between client or server as it >> actually should at the moment. So I don't think any change is needed >> there. >> >> Best regards >> Jonas Pollok >> >> ________________________________________________________________ >> erlang-patches (at) erlang.org mailing list. >> See http://www.erlang.org/faq.html >> To unsubscribe; mailto:erlang-patches-unsubscribe@REDACTED >> >> > > > ________________________________________________________________ > erlang-patches (at) erlang.org mailing list. > See http://www.erlang.org/faq.html > To unsubscribe; mailto:erlang-patches-unsubscribe@REDACTED > From cristian@REDACTED Fri Sep 3 22:49:14 2010 From: cristian@REDACTED (Cristian Greco) Date: Fri, 3 Sep 2010 22:49:14 +0200 Subject: small fixes for documentation Message-ID: <20100903224914.0bda25ac@regolo> Hi, please merge some more docs fixes from my forked repository: git fetch git://github.com/cristiangreco/otp.git docs_fixes Thanks, -- Cristian Greco GPG key ID: 0xCF4D32E4 -------------- next part -------------- A non-text attachment was scrubbed... Name: signature.asc Type: application/pgp-signature Size: 836 bytes Desc: not available URL: From jay@REDACTED Sun Sep 5 11:40:31 2010 From: jay@REDACTED (jay@REDACTED) Date: Sun, 5 Sep 2010 02:40:31 -0700 (PDT) Subject: gen_stream updated to test worker process links Message-ID: <61406.64.81.32.114.1283679631.squirrel@duomark.com> A new version of gen_stream and gen_stream_SUITE tests is available. The test suite now relies on the internal processes being linked to the parent gen_stream, so it uses erlang:process_info(GenStreamPid, links) to enumerate and verify whether the number of processes matches the user's request and whether processes are linked. git fetch git://github.com/jaynel/otp.git gen_stream [Note: to aid in debugging the shell_SUITE interaction, I inserted statements in the test suite to trigger the shell_SUITE error after every gen_stream test in the hopes of isolating the faulty test case. These statements are all labeled %% DEBUG: in gen_stream_SUITE. As I cannot reproduce the problem, use M-x replace-string %% DEBUG: with nothing to turn on the functionality to trace shell_SUITE error appearance. As is, this code is commented out and the test suite should run fine. This is merely to expedite the back and forth communication. The lines can just as easily be eliminated by grep so that no commented out code is included in the baseline, once they have served their purpose in tracking down the shell_SUITE problem.] jay From bgustavsson@REDACTED Mon Sep 6 11:59:53 2010 From: bgustavsson@REDACTED (=?UTF-8?Q?Bj=C3=B6rn_Gustavsson?=) Date: Mon, 6 Sep 2010 11:59:53 +0200 Subject: [erlang-patches] small fixes for documentation In-Reply-To: <20100903224914.0bda25ac@regolo> References: <20100903224914.0bda25ac@regolo> Message-ID: Thanks! On Fri, Sep 3, 2010 at 10:49 PM, Cristian Greco wrote: > please merge some more docs fixes from my forked repository: > We don't merge untested changes directly to 'dev'; we first include them in them 'pu' and only merge them to 'dev' when they have been verified. To save time I have corrected your change to erl_id_trans.xml (instead of asking you to fix it). References between different applications must be written like this: diff --git a/lib/stdlib/doc/src/erl_id_trans.xml b/lib/stdlib/doc/src/erl_id_trans.xml index 7c821d2..54fa1d0 100644 --- a/lib/stdlib/doc/src/erl_id_trans.xml +++ b/lib/stdlib/doc/src/erl_id_trans.xml @@ -70,7 +70,8 @@
See Also -

erl_parse(3), compile(3).

+

erl_parse(3), + compiler:compile(3).

Also, for your next submission, please review our guidelines for how to write commit messages: http://wiki.github.com/erlang/otp/writing-good-commit-messages I have broken up your commit into two separate commits with the following commit messages: Linkify applications listed under "See Also" Fix minor typos in the documentation The updated commit will be included in 'pu' later today. -- Bj?rn Gustavsson, Erlang/OTP, Ericsson AB From bgustavsson@REDACTED Mon Sep 6 13:52:51 2010 From: bgustavsson@REDACTED (=?UTF-8?Q?Bj=C3=B6rn_Gustavsson?=) Date: Mon, 6 Sep 2010 13:52:51 +0200 Subject: [erlang-patches] gen_stream updated to test worker process links In-Reply-To: <61406.64.81.32.114.1283679631.squirrel@duomark.com> References: <61406.64.81.32.114.1283679631.squirrel@duomark.com> Message-ID: On Sun, Sep 5, 2010 at 11:40 AM, wrote: > A new version of gen_stream and gen_stream_SUITE tests is available. The > test suite now relies on the internal processes being linked to the parent > gen_stream, so it uses erlang:process_info(GenStreamPid, links) to > enumerate and verify whether the number of processes matches the user's > request and whether processes are linked. > > git fetch git://github.com/jaynel/otp.git gen_stream Thanks! I have cleaned up the branch and included it in 'pu'. Please don't merge the 'dev' branch into topic branches. If you really do need the latest changes from 'dev', use "git rebase" to rebase the branch on top of 'dev'. -- Bj?rn Gustavsson, Erlang/OTP, Ericsson AB From tuncer.ayaz@REDACTED Mon Sep 6 19:30:47 2010 From: tuncer.ayaz@REDACTED (Tuncer Ayaz) Date: Mon, 6 Sep 2010 19:30:47 +0200 Subject: [PATCH] Correct typo in erlang.xml Message-ID: semanticts -> semantics --- erts/doc/src/erlang.xml | 2 +- 1 files changed, 1 insertions(+), 1 deletions(-) diff --git a/erts/doc/src/erlang.xml b/erts/doc/src/erlang.xml index ce7fde0..5e4c742 100644 --- a/erts/doc/src/erlang.xml +++ b/erts/doc/src/erlang.xml @@ -2037,7 +2037,7 @@ os_prompt%

In releases older than OTP R14B, NIF's where an experimental feature. Versions of OTP older than R14B might - have different and possibly incompatible NIF semanticts and + have different and possibly incompatible NIF semantics and interfaces. For example, in R13B03 the return value on failure was {error,Reason,Text}.

From jay@REDACTED Mon Sep 6 19:50:07 2010 From: jay@REDACTED (jay@REDACTED) Date: Mon, 6 Sep 2010 10:50:07 -0700 (PDT) Subject: [erlang-patches] gen_stream updated to test worker process links In-Reply-To: References: <61406.64.81.32.114.1283679631.squirrel@duomark.com> Message-ID: <40523.74.1.186.35.1283795407.squirrel@duomark.com> > On Sun, Sep 5, 2010 at 11:40 AM, wrote: > I have cleaned up the branch and included it in 'pu'. > > Please don't merge the 'dev' branch into topic branches. > If you really do need the latest changes from 'dev', > use "git rebase" to rebase the branch on top of 'dev'. > Sorry, about that, was a mistake earlier when I was fumbling around with git. Let me know if the tests perform better on your environment. Hopefully, this will solve the intermittent failures on other platforms. jay From michael.santos@REDACTED Mon Sep 6 20:14:40 2010 From: michael.santos@REDACTED (Michael Santos) Date: Mon, 6 Sep 2010 14:14:40 -0400 Subject: [erlang-patches] [PATCH] Correct typo in erlang.xml In-Reply-To: References: Message-ID: <20100906181440.GA7343@ecn.lan> On Mon, Sep 06, 2010 at 07:30:47PM +0200, Tuncer Ayaz wrote: > semanticts -> semantics > --- > erts/doc/src/erlang.xml | 2 +- > 1 files changed, 1 insertions(+), 1 deletions(-) > > diff --git a/erts/doc/src/erlang.xml b/erts/doc/src/erlang.xml > index ce7fde0..5e4c742 100644 > --- a/erts/doc/src/erlang.xml > +++ b/erts/doc/src/erlang.xml > @@ -2037,7 +2037,7 @@ os_prompt% > >

In releases older than OTP R14B, NIF's where an One more typo: "where" should be "were" > experimental feature. Versions of OTP older than R14B might > - have different and possibly incompatible NIF semanticts and > + have different and possibly incompatible NIF semantics and > interfaces. For example, in R13B03 the return value on > failure was > {error,Reason,Text}.

From cristian@REDACTED Mon Sep 6 22:46:19 2010 From: cristian@REDACTED (Cristian Greco) Date: Mon, 6 Sep 2010 22:46:19 +0200 Subject: [erlang-patches] small fixes for documentation In-Reply-To: References: <20100903224914.0bda25ac@regolo> Message-ID: <20100906224619.5f733ad6@regolo> On Mon, 6 Sep 2010 11:59:53 +0200 Bj?rn Gustavsson wrote: > Thanks! Hi Bjorn! > On Fri, Sep 3, 2010 at 10:49 PM, Cristian Greco > wrote: > > please merge some more docs fixes from my forked repository: > > > > We don't merge untested changes directly to 'dev'; we > first include them in them 'pu' and only merge them to > 'dev' when they have been verified. Sorry, it was a poor choice of words. In effect, I know changes go through the 'pu' branch before landing into 'dev' (this is the second - small - patch I send to the list). > Also, for your next submission, please review our guidelines > for how to write commit messages: > > http://wiki.github.com/erlang/otp/writing-good-commit-messages > > I have broken up your commit into two separate commits > with the following commit messages: > > Linkify applications listed under "See Also" > > Fix minor typos in the documentation > > The updated commit will be included in 'pu' later today. Thanks for your patience and work! -- Cristian Greco GPG key ID: 0xCF4D32E4 -------------- next part -------------- A non-text attachment was scrubbed... Name: signature.asc Type: application/pgp-signature Size: 836 bytes Desc: not available URL: From tuncer.ayaz@REDACTED Mon Sep 6 23:38:30 2010 From: tuncer.ayaz@REDACTED (Tuncer Ayaz) Date: Mon, 6 Sep 2010 23:38:30 +0200 Subject: [erlang-patches] [PATCH] Correct typo in erlang.xml In-Reply-To: <20100906181440.GA7343@ecn.lan> References: <20100906181440.GA7343@ecn.lan> Message-ID: On Mon, Sep 6, 2010 at 8:14 PM, Michael Santos wrote: > On Mon, Sep 06, 2010 at 07:30:47PM +0200, Tuncer Ayaz wrote: >> semanticts -> semantics >> --- >> ?erts/doc/src/erlang.xml | ? ?2 +- >> ?1 files changed, 1 insertions(+), 1 deletions(-) >> >> diff --git a/erts/doc/src/erlang.xml b/erts/doc/src/erlang.xml >> index ce7fde0..5e4c742 100644 >> --- a/erts/doc/src/erlang.xml >> +++ b/erts/doc/src/erlang.xml >> @@ -2037,7 +2037,7 @@ os_prompt% >> ? ? ? ? ? >> ? ? ? ? ? ?

In releases older than OTP R14B, NIF's where an > > One more typo: "where" should be "were" Thanks, will be included in the following patch. From tuncer.ayaz@REDACTED Mon Sep 6 23:40:20 2010 From: tuncer.ayaz@REDACTED (Tuncer Ayaz) Date: Mon, 6 Sep 2010 23:40:20 +0200 Subject: [PATCH] Correct typos in erlang.xml Message-ID: semanticts -> semantics where -> were ddl -> dll --- erts/doc/src/erlang.xml | 6 +++--- 1 files changed, 3 insertions(+), 3 deletions(-) diff --git a/erts/doc/src/erlang.xml b/erts/doc/src/erlang.xml index ce7fde0..e5a85a8 100644 --- a/erts/doc/src/erlang.xml +++ b/erts/doc/src/erlang.xml @@ -2035,9 +2035,9 @@ os_prompt% -

In releases older than OTP R14B, NIF's where an +

In releases older than OTP R14B, NIF's were an experimental feature. Versions of OTP older than R14B might - have different and possibly incompatible NIF semanticts and + have different and possibly incompatible NIF semantics and interfaces. For example, in R13B03 the return value on failure was {error,Reason,Text}.

@@ -2045,7 +2045,7 @@ os_prompt%

Loads and links a dynamic library containing native implemented functions (NIFs) for a module. Path is a file path to the sharable object/dynamic library file minus - the OS-dependant file extension (.so for Unix and .ddl for + the OS-dependant file extension (.so for Unix and .dll for Windows). See erl_nif on how to implement a NIF library.

LoadInfo can be any term. It will be passed on to From mikpe@REDACTED Tue Sep 7 00:45:10 2010 From: mikpe@REDACTED (Mikael Pettersson) Date: Tue, 7 Sep 2010 00:45:10 +0200 Subject: [erlang-patches] [PATCH] Correct typos in erlang.xml In-Reply-To: References: Message-ID: <19589.28406.451290.639703@pilspetsen.it.uu.se> Tuncer Ayaz writes: > semanticts -> semantics > where -> were > ddl -> dll > --- > erts/doc/src/erlang.xml | 6 +++--- > 1 files changed, 3 insertions(+), 3 deletions(-) > > diff --git a/erts/doc/src/erlang.xml b/erts/doc/src/erlang.xml > index ce7fde0..e5a85a8 100644 > --- a/erts/doc/src/erlang.xml > +++ b/erts/doc/src/erlang.xml > @@ -2035,9 +2035,9 @@ os_prompt% > > > > -

In releases older than OTP R14B, NIF's where an > +

In releases older than OTP R14B, NIF's were an > experimental feature. Versions of OTP older than R14B might > - have different and possibly incompatible NIF semanticts and > + have different and possibly incompatible NIF semantics and > interfaces. For example, in R13B03 the return value on > failure was > {error,Reason,Text}.

Unfixed typo: the plural form of NIF is "NIFs" not "NIF's". > @@ -2045,7 +2045,7 @@ os_prompt% >

Loads and links a dynamic library containing native > implemented functions (NIFs) for a module. Path is a > file path to the sharable object/dynamic library file minus > - the OS-dependant file extension (.so for Unix and .ddl for > + the OS-dependant file extension (.so for Unix and .dll for > Windows). See erl_nif > on how to implement a NIF library.

>

LoadInfo can be any term. It will be passed on to > > ________________________________________________________________ > erlang-patches (at) erlang.org mailing list. > See http://www.erlang.org/faq.html > To unsubscribe; mailto:erlang-patches-unsubscribe@REDACTED > From tuncer.ayaz@REDACTED Tue Sep 7 01:18:39 2010 From: tuncer.ayaz@REDACTED (Tuncer Ayaz) Date: Tue, 7 Sep 2010 01:18:39 +0200 Subject: [erlang-patches] [PATCH] Correct typos in erlang.xml In-Reply-To: <19589.28406.451290.639703@pilspetsen.it.uu.se> References: <19589.28406.451290.639703@pilspetsen.it.uu.se> Message-ID: On Tue, Sep 7, 2010 at 12:45 AM, Mikael Pettersson wrote: > Tuncer Ayaz writes: > ?> semanticts -> semantics > ?> where -> were > ?> ddl -> dll > ?> --- > ?> ?erts/doc/src/erlang.xml | ? ?6 +++--- > ?> ?1 files changed, 3 insertions(+), 3 deletions(-) > ?> > ?> diff --git a/erts/doc/src/erlang.xml b/erts/doc/src/erlang.xml > ?> index ce7fde0..e5a85a8 100644 > ?> --- a/erts/doc/src/erlang.xml > ?> +++ b/erts/doc/src/erlang.xml > ?> @@ -2035,9 +2035,9 @@ os_prompt% > ?> ? ? ? ? > ?> ? ? ? ? > ?> ? ? ? ? ? > ?> - ? ? ? ? ?

In releases older than OTP R14B, NIF's where an > ?> + ? ? ? ? ?

In releases older than OTP R14B, NIF's were an > ?> ? ? ? ? ? ?experimental feature. Versions of OTP older than R14B might > ?> - ? ? ? ? ?have different and possibly incompatible NIF semanticts and > ?> + ? ? ? ? ?have different and possibly incompatible NIF semantics and > ?> ? ? ? ? ? ?interfaces. For example, in R13B03 the return value on > ?> ? ? ? ? ? ?failure was > ?> ? ? ? ? ? ?{error,Reason,Text}.

> > Unfixed typo: the plural form of NIF is "NIFs" not "NIF's". Thanks. Saw that too but must have forgotten during edit. From tuncer.ayaz@REDACTED Tue Sep 7 01:20:14 2010 From: tuncer.ayaz@REDACTED (Tuncer Ayaz) Date: Tue, 7 Sep 2010 01:20:14 +0200 Subject: [erlang-patches] [PATCH] Correct typos in erlang.xml In-Reply-To: <19589.28406.451290.639703@pilspetsen.it.uu.se> References: <19589.28406.451290.639703@pilspetsen.it.uu.se> Message-ID: semanticts -> semantics where -> were ddl -> dll NIF's -> NIFs --- erts/doc/src/erlang.xml | 6 +++--- 1 files changed, 3 insertions(+), 3 deletions(-) diff --git a/erts/doc/src/erlang.xml b/erts/doc/src/erlang.xml index ce7fde0..579c273 100644 --- a/erts/doc/src/erlang.xml +++ b/erts/doc/src/erlang.xml @@ -2035,9 +2035,9 @@ os_prompt% -

In releases older than OTP R14B, NIF's where an +

In releases older than OTP R14B, NIFs were an experimental feature. Versions of OTP older than R14B might - have different and possibly incompatible NIF semanticts and + have different and possibly incompatible NIF semantics and interfaces. For example, in R13B03 the return value on failure was {error,Reason,Text}.

@@ -2045,7 +2045,7 @@ os_prompt%

Loads and links a dynamic library containing native implemented functions (NIFs) for a module. Path is a file path to the sharable object/dynamic library file minus - the OS-dependant file extension (.so for Unix and .ddl for + the OS-dependant file extension (.so for Unix and .dll for Windows). See erl_nif on how to implement a NIF library.

LoadInfo can be any term. It will be passed on to From tuncer.ayaz@REDACTED Tue Sep 7 01:23:23 2010 From: tuncer.ayaz@REDACTED (Tuncer Ayaz) Date: Tue, 7 Sep 2010 01:23:23 +0200 Subject: [erlang-patches] [PATCH] Correct typos in erlang.xml In-Reply-To: <19589.28406.451290.639703@pilspetsen.it.uu.se> References: <19589.28406.451290.639703@pilspetsen.it.uu.se> Message-ID: > ?> @@ -2045,7 +2045,7 @@ os_prompt% > ?> ? ? ? ? ?

Loads and links a dynamic library containing native > ?> ? ? ? ? ?implemented functions (NIFs) for a module. Path is a > ?> ? ? ? ? ?file path to the sharable object/dynamic library file minus > ?> - ? ? ? ?the OS-dependant file extension (.so for Unix and .ddl for > ?> + ? ? ? ?the OS-dependant file extension (.so for Unix and .dll for Is it OS-dependant, OS-dependent or both? I think both are correct. From mikpe@REDACTED Tue Sep 7 01:59:08 2010 From: mikpe@REDACTED (Mikael Pettersson) Date: Tue, 7 Sep 2010 01:59:08 +0200 Subject: [erlang-patches] [PATCH] Correct typos in erlang.xml In-Reply-To: References: <19589.28406.451290.639703@pilspetsen.it.uu.se> Message-ID: <19589.32844.263748.601351@pilspetsen.it.uu.se> Tuncer Ayaz writes: > > ?> @@ -2045,7 +2045,7 @@ os_prompt% > > ?> ? ? ? ? ?

Loads and links a dynamic library containing native > > ?> ? ? ? ? ?implemented functions (NIFs) for a module. Path is a > > ?> ? ? ? ? ?file path to the sharable object/dynamic library file minus > > ?> - ? ? ? ?the OS-dependant file extension (.so for Unix and .ddl for > > ?> + ? ? ? ?the OS-dependant file extension (.so for Unix and .dll for > > Is it OS-dependant, OS-dependent or both? dependEnt > I think both are correct. Both are valid words, but with different meanings. In computing, it's always the "dependEnt" form that gets used. From tuncer.ayaz@REDACTED Tue Sep 7 03:00:03 2010 From: tuncer.ayaz@REDACTED (Tuncer Ayaz) Date: Tue, 7 Sep 2010 03:00:03 +0200 Subject: [erlang-patches] [PATCH] Correct typos in erlang.xml In-Reply-To: <19589.32844.263748.601351@pilspetsen.it.uu.se> References: <19589.28406.451290.639703@pilspetsen.it.uu.se> <19589.32844.263748.601351@pilspetsen.it.uu.se> Message-ID: On Tue, Sep 7, 2010 at 1:59 AM, Mikael Pettersson wrote: > Tuncer Ayaz writes: > ?> > ?> @@ -2045,7 +2045,7 @@ os_prompt% > ?> > ?> ? ? ? ? ?

Loads and links a dynamic library containing native > ?> > ?> ? ? ? ? ?implemented functions (NIFs) for a module. Path is a > ?> > ?> ? ? ? ? ?file path to the sharable object/dynamic library file minus > ?> > ?> - ? ? ? ?the OS-dependant file extension (.so for Unix and .ddl for > ?> > ?> + ? ? ? ?the OS-dependant file extension (.so for Unix and .dll for > ?> > ?> Is it OS-dependant, OS-dependent or both? > > dependEnt > > ?> I think both are correct. > > Both are valid words, but with different meanings. ?In computing, > it's always the "dependEnt" form that gets used. Thanks, I agree and now know why it looked odd to me. From tuncer.ayaz@REDACTED Tue Sep 7 03:00:43 2010 From: tuncer.ayaz@REDACTED (Tuncer Ayaz) Date: Tue, 7 Sep 2010 03:00:43 +0200 Subject: [erlang-patches] [PATCH] Correct typos in erlang.xml In-Reply-To: References: <19589.28406.451290.639703@pilspetsen.it.uu.se> Message-ID: semanticts -> semantics where -> were ddl -> dll NIF's -> NIFs OS-dependant -> OS-dependent --- erts/doc/src/erlang.xml | 6 +++--- 1 files changed, 3 insertions(+), 3 deletions(-) diff --git a/erts/doc/src/erlang.xml b/erts/doc/src/erlang.xml index ce7fde0..e197791 100644 --- a/erts/doc/src/erlang.xml +++ b/erts/doc/src/erlang.xml @@ -2035,9 +2035,9 @@ os_prompt% -

In releases older than OTP R14B, NIF's where an +

In releases older than OTP R14B, NIFs were an experimental feature. Versions of OTP older than R14B might - have different and possibly incompatible NIF semanticts and + have different and possibly incompatible NIF semantics and interfaces. For example, in R13B03 the return value on failure was {error,Reason,Text}.

@@ -2045,7 +2045,7 @@ os_prompt%

Loads and links a dynamic library containing native implemented functions (NIFs) for a module. Path is a file path to the sharable object/dynamic library file minus - the OS-dependant file extension (.so for Unix and .ddl for + the OS-dependent file extension (.so for Unix and .dll for Windows). See erl_nif on how to implement a NIF library.

LoadInfo can be any term. It will be passed on to From bgustavsson@REDACTED Tue Sep 7 11:21:07 2010 From: bgustavsson@REDACTED (=?UTF-8?Q?Bj=C3=B6rn_Gustavsson?=) Date: Tue, 7 Sep 2010 11:21:07 +0200 Subject: [erlang-patches] small fixes for documentation In-Reply-To: References: <20100903224914.0bda25ac@regolo> Message-ID: 2010/9/6 Bj?rn Gustavsson : >

> See Also > -

erl_parse(3), compile(3).

> +

erl_parse(3), > + compiler:compile(3).

I got it wrong. Obviously, the add "compiler:" prefix should go inside the marker value, not where I put it. It should look like this: diff --git a/lib/stdlib/doc/src/erl_id_trans.xml b/lib/stdlib/doc/src/erl_id_trans.xml index 7c821d2..cfb18ec 100644 --- a/lib/stdlib/doc/src/erl_id_trans.xml +++ b/lib/stdlib/doc/src/erl_id_trans.xml @@ -70,7 +70,8 @@
See Also -

erl_parse(3), compile(3).

+

erl_parse(3), + compile(3).

-- Bj?rn Gustavsson, Erlang/OTP, Ericsson AB From bgustavsson@REDACTED Tue Sep 7 11:33:58 2010 From: bgustavsson@REDACTED (=?UTF-8?Q?Bj=C3=B6rn_Gustavsson?=) Date: Tue, 7 Sep 2010 11:33:58 +0200 Subject: [erlang-patches] [PATCH] Correct typos in erlang.xml In-Reply-To: References: <19589.28406.451290.639703@pilspetsen.it.uu.se> Message-ID: On Tue, Sep 7, 2010 at 3:00 AM, Tuncer Ayaz wrote: > semanticts -> semantics > where -> were > ddl -> dll > NIF's -> NIFs > OS-dependant -> OS-dependent > --- > erts/doc/src/erlang.xml | 6 +++--- > 1 files changed, 3 insertions(+), 3 deletions(-) Thanks! Applied directly to 'dev'. -- Bj?rn Gustavsson, Erlang/OTP, Ericsson AB From bgustavsson@REDACTED Tue Sep 7 11:40:11 2010 From: bgustavsson@REDACTED (=?UTF-8?Q?Bj=C3=B6rn_Gustavsson?=) Date: Tue, 7 Sep 2010 11:40:11 +0200 Subject: [erlang-patches] gen_stream updated to test worker process links In-Reply-To: <40523.74.1.186.35.1283795407.squirrel@duomark.com> References: <61406.64.81.32.114.1283679631.squirrel@duomark.com> <40523.74.1.186.35.1283795407.squirrel@duomark.com> Message-ID: On Mon, Sep 6, 2010 at 7:50 PM, wrote: > Let me know if the tests perform better on your environment. > Hopefully, this will solve the intermittent failures on > other platforms. There were no failures in any of the gen_stream test cases tonight, but since the failures were intermittent we'll have to wait a few more days to be sure. The shell_SUITE:start_restricted_from_shell/1 test case, however, still fails. -- Bj?rn Gustavsson, Erlang/OTP, Ericsson AB From vinoski@REDACTED Sat Sep 11 08:13:43 2010 From: vinoski@REDACTED (Steve Vinoski) Date: Sat, 11 Sep 2010 02:13:43 -0400 Subject: fix for ei mishandling of writev iovec buffers Message-ID: This patch fixes a data corruption problem with ei where it mishandles iovec buffers on platforms that support writev. When writing to the socket blocks, ei tries to adjust its iovecs based on how much data it's already successfully written so it can pick up where it left off when the socket is write-ready again, but it forgets to adjust one particular pointer. The result is that the same data gets written multiple times, corrupting what the cnode sends. This only occurs when the message size is much greater than the amount of data ei can write to the socket without blocking. I detected the problem when sending large binaries from a cnode to a regular node. git fetch git://github.com/vinoski/otp.git ei-writev I hope it's not too late for inclusion into R14B, especially given that the fix is so simple and obvious. --steve From tuncer.ayaz@REDACTED Sun Sep 12 02:00:38 2010 From: tuncer.ayaz@REDACTED (Tuncer Ayaz) Date: Sun, 12 Sep 2010 02:00:38 +0200 Subject: sendfile() Message-ID: Originally suggested by Miguel Barreiro in the following thread http://www.erlang.org/pipermail/erlang-patches/2003-November/000068.html The code found in this patch is based on that and http://github.com/tuncer/sendfile which itself is based on the driver found in Yaws. Windows support could be emulated with TransmitFile() but is not implemented yet. Only Linux and Darwin support has been tested. FreeBSD and Solaris should also work. This is a draft patch and I've added inline code comments (prefixed as TODO items) where I saw potential for discussion. git fetch git://github.com/tuncer/otp.git sendfile From tuncer.ayaz@REDACTED Sun Sep 12 16:53:14 2010 From: tuncer.ayaz@REDACTED (Tuncer Ayaz) Date: Sun, 12 Sep 2010 16:53:14 +0200 Subject: [PATCH] Clean up bootstrap targets and documentation Message-ID: <1284303194-61922-1-git-send-email-tuncer.ayaz@gmail.com> Remove cleartool invocation and adapt docs to reflect git transition. --- README.bootstrap | 10 ++++------ erts/preloaded/src/Makefile | 22 ++-------------------- otp_build | 2 +- 3 files changed, 7 insertions(+), 27 deletions(-) diff --git a/README.bootstrap b/README.bootstrap index b0c8a1c..f42bc7a 100644 --- a/README.bootstrap +++ b/README.bootstrap @@ -45,13 +45,11 @@ preloaded files are to be updated, the source code is built using a special Makefile in the $ERL_TOP/preloaded/src directory, which creates beam files in the same directory. When they seem to compile successfully, they can be used in an emulator build by being copied -to the ebin directory (although, in Clearcase that requires checking -out the files in the ebin directory first). For developers using the -main Clearcase branch, otp_build {prepare,update,commit}_preloaded can -be used to ease the process (there are also similar targets in the +to the ebin directory. otp_build update_preloaded can be used to +ease the process (there are also similar targets in the $ERL_TOP/preloaded/src/Makefile). -In prebuilt open source distributions, these .beam files are also +In prebuilt open source distributions, these beam files are also present, but to update them one might need to change permission on the $ERL_TOP/preloaded/ebin directory, then build and then manually copy the beam files from the source directory to ../ebin. If patches are @@ -60,4 +58,4 @@ always note this specially as the preloaded/ebin directory needs updating, or provide the new derived files in the patch or as complete binaries. -/Patrik, OTP \ No newline at end of file +/Patrik, OTP diff --git a/erts/preloaded/src/Makefile b/erts/preloaded/src/Makefile index 785ad53..1456388 100644 --- a/erts/preloaded/src/Makefile +++ b/erts/preloaded/src/Makefile @@ -1,7 +1,7 @@ # # %CopyrightBegin% # -# Copyright Ericsson AB 2008-2009. All Rights Reserved. +# Copyright Ericsson AB 2008-2010. All Rights Reserved. # # The contents of this file are subject to the Erlang Public License, # Version 1.1, (the "License"); you may not use this file except in @@ -20,8 +20,7 @@ # be used when the preloaded modules actually are to be updated (i.e. the # beam files are to be recompiled, which is normally not done). # The beam files are placed in the current directory and should be copied -# to the ../ebin directory by using the commit target (only works in -# clearcase). +# to the ../ebin directory by using the copy target. include $(ERL_TOP)/make/target.mk include $(ERL_TOP)/make/$(TARGET)/otp.mk @@ -62,26 +61,9 @@ debug opt: $(TARGET_FILES) clean: rm -f $(TARGET_FILES) -prepare: - cleartool co -nc $(STATIC_EBIN)/* - cleartool co -nc $(STATIC_EBIN) - copy: - for x in *.beam; do\ - if test '!' -f $(STATIC_EBIN)/$$x; then\ - cleartool mkelem -nc $$x;\ - fi;\ - done cp *.beam $(STATIC_EBIN) -commit: - cleartool ci -ident -nc $(STATIC_EBIN)/*.beam - cleartool ci -ident -nc $(STATIC_EBIN) - -cancel: - -cleartool unco -rm $(STATIC_EBIN) - -cleartool unco -rm $(STATIC_EBIN)/*.beam - include $(ERL_TOP)/make/otp_release_targets.mk diff --git a/otp_build b/otp_build index 41bce4e..1172592 100755 --- a/otp_build +++ b/otp_build @@ -1178,7 +1178,7 @@ case "$1" in esac ;; primary) echo "Primary bootstrap is under version control since R13"; - echo "Use {prepare,update,commit}_primary if you really are"; + echo "Use update_primary if you really are"; echo "updating the primary bootstrap...";; boot) do_boot;; From tuncer.ayaz@REDACTED Sun Sep 12 17:55:22 2010 From: tuncer.ayaz@REDACTED (Tuncer Ayaz) Date: Sun, 12 Sep 2010 17:55:22 +0200 Subject: [PATCH 1/3] edoc: Do not auto-import error/1 Message-ID: <1284306924-70245-1-git-send-email-tuncer.ayaz@gmail.com> Resolve name clash with auto-imported BIF error/1. --- lib/edoc/src/edoc.erl | 2 ++ lib/edoc/src/edoc_run.erl | 2 ++ 2 files changed, 4 insertions(+), 0 deletions(-) diff --git a/lib/edoc/src/edoc.erl b/lib/edoc/src/edoc.erl index ec452a5..75b3bb4 100644 --- a/lib/edoc/src/edoc.erl +++ b/lib/edoc/src/edoc.erl @@ -58,6 +58,8 @@ read_comments/1, read_comments/2, read_source/1, read_source/2]). +-compile({no_auto_import,[error/1]}). + -import(edoc_report, [report/2, report/3, error/1, error/3]). -include("edoc.hrl"). diff --git a/lib/edoc/src/edoc_run.erl b/lib/edoc/src/edoc_run.erl index 37025d6..96e5ea4 100644 --- a/lib/edoc/src/edoc_run.erl +++ b/lib/edoc/src/edoc_run.erl @@ -42,6 +42,8 @@ -export([file/1, application/1, packages/1, files/1, toc/1]). +-compile({no_auto_import,[error/1]}). + -import(edoc_report, [report/2, error/1]). From tuncer.ayaz@REDACTED Sun Sep 12 17:55:23 2010 From: tuncer.ayaz@REDACTED (Tuncer Ayaz) Date: Sun, 12 Sep 2010 17:55:23 +0200 Subject: [PATCH 2/3] hipe: Do not auto-import min/2 and max/2 In-Reply-To: <1284306924-70245-1-git-send-email-tuncer.ayaz@gmail.com> References: <1284306924-70245-1-git-send-email-tuncer.ayaz@gmail.com> Message-ID: <1284306924-70245-2-git-send-email-tuncer.ayaz@gmail.com> Resolve name clash with auto-imported BIFs min/2 and max/2. --- lib/hipe/icode/hipe_icode_type.erl | 2 ++ 1 files changed, 2 insertions(+), 0 deletions(-) diff --git a/lib/hipe/icode/hipe_icode_type.erl b/lib/hipe/icode/hipe_icode_type.erl index 2819846..6726d62 100644 --- a/lib/hipe/icode/hipe_icode_type.erl +++ b/lib/hipe/icode/hipe_icode_type.erl @@ -39,6 +39,8 @@ update__info/2, new__info/1, return__info/1, return_none/0, return_none_args/2, return_any_args/2]). +-compile({no_auto_import,[min/2,max/2]}). + %%===================================================================== -include("../main/hipe.hrl"). From tuncer.ayaz@REDACTED Sun Sep 12 17:55:24 2010 From: tuncer.ayaz@REDACTED (Tuncer Ayaz) Date: Sun, 12 Sep 2010 17:55:24 +0200 Subject: [PATCH 3/3] mnesia: Do not auto-import error/2 In-Reply-To: <1284306924-70245-1-git-send-email-tuncer.ayaz@gmail.com> References: <1284306924-70245-1-git-send-email-tuncer.ayaz@gmail.com> Message-ID: <1284306924-70245-3-git-send-email-tuncer.ayaz@gmail.com> Resolve name clash with auto-imported BIF error/2. --- lib/mnesia/src/mnesia_controller.erl | 2 ++ lib/mnesia/src/mnesia_locker.erl | 2 ++ lib/mnesia/src/mnesia_log.erl | 2 ++ lib/mnesia/src/mnesia_monitor.erl | 2 ++ lib/mnesia/src/mnesia_recover.erl | 1 + lib/mnesia/src/mnesia_subscr.erl | 2 ++ 6 files changed, 11 insertions(+), 0 deletions(-) diff --git a/lib/mnesia/src/mnesia_controller.erl b/lib/mnesia/src/mnesia_controller.erl index 0298b38..021be8a 100644 --- a/lib/mnesia/src/mnesia_controller.erl +++ b/lib/mnesia/src/mnesia_controller.erl @@ -98,6 +98,8 @@ connect_nodes2/3 ]). +-compile({no_auto_import,[error/2]}). + -import(mnesia_lib, [set/2, add/2]). -import(mnesia_lib, [fatal/2, error/2, verbose/2, dbg_out/2]). diff --git a/lib/mnesia/src/mnesia_locker.erl b/lib/mnesia/src/mnesia_locker.erl index cfa3f17..6b5770d 100644 --- a/lib/mnesia/src/mnesia_locker.erl +++ b/lib/mnesia/src/mnesia_locker.erl @@ -49,6 +49,8 @@ system_code_change/4 ]). +-compile({no_auto_import,[error/2]}). + -include("mnesia.hrl"). -import(mnesia_lib, [dbg_out/2, error/2, verbose/2]). diff --git a/lib/mnesia/src/mnesia_log.erl b/lib/mnesia/src/mnesia_log.erl index 00ec474..11b7920 100644 --- a/lib/mnesia/src/mnesia_log.erl +++ b/lib/mnesia/src/mnesia_log.erl @@ -182,6 +182,8 @@ ]). +-compile({no_auto_import,[error/2]}). + -include("mnesia.hrl"). -import(mnesia_lib, [val/1, dir/1]). -import(mnesia_lib, [exists/1, fatal/2, error/2, dbg_out/2]). diff --git a/lib/mnesia/src/mnesia_monitor.erl b/lib/mnesia/src/mnesia_monitor.erl index 5bd93d6..b6eda9a 100644 --- a/lib/mnesia/src/mnesia_monitor.erl +++ b/lib/mnesia/src/mnesia_monitor.erl @@ -70,6 +70,8 @@ negotiate_protocol_impl/2 ]). +-compile({no_auto_import,[error/2]}). + -import(mnesia_lib, [dbg_out/2, verbose/2, error/2, fatal/2, set/2]). -include("mnesia.hrl"). diff --git a/lib/mnesia/src/mnesia_recover.erl b/lib/mnesia/src/mnesia_recover.erl index 0ca7bf3..7435b68 100644 --- a/lib/mnesia/src/mnesia_recover.erl +++ b/lib/mnesia/src/mnesia_recover.erl @@ -62,6 +62,7 @@ code_change/3 ]). +-compile({no_auto_import,[error/2]}). -include("mnesia.hrl"). -import(mnesia_lib, [set/2, verbose/2, error/2, fatal/2]). diff --git a/lib/mnesia/src/mnesia_subscr.erl b/lib/mnesia/src/mnesia_subscr.erl index 93d4a86..415c69d 100644 --- a/lib/mnesia/src/mnesia_subscr.erl +++ b/lib/mnesia/src/mnesia_subscr.erl @@ -43,6 +43,8 @@ code_change/3 ]). +-compile({no_auto_import,[error/2]}). + -include("mnesia.hrl"). -import(mnesia_lib, [error/2]). From mikpe@REDACTED Sun Sep 12 19:37:30 2010 From: mikpe@REDACTED (Mikael Pettersson) Date: Sun, 12 Sep 2010 19:37:30 +0200 Subject: [erlang-patches] [PATCH 2/3] hipe: Do not auto-import min/2 and max/2 In-Reply-To: <1284306924-70245-2-git-send-email-tuncer.ayaz@gmail.com> References: <1284306924-70245-1-git-send-email-tuncer.ayaz@gmail.com> <1284306924-70245-2-git-send-email-tuncer.ayaz@gmail.com> Message-ID: <19597.4058.734502.869815@pilspetsen.it.uu.se> Tuncer Ayaz writes: > Resolve name clash with auto-imported BIFs min/2 and max/2. > --- > lib/hipe/icode/hipe_icode_type.erl | 2 ++ > 1 files changed, 2 insertions(+), 0 deletions(-) > > diff --git a/lib/hipe/icode/hipe_icode_type.erl b/lib/hipe/icode/hipe_icode_type.erl > index 2819846..6726d62 100644 > --- a/lib/hipe/icode/hipe_icode_type.erl > +++ b/lib/hipe/icode/hipe_icode_type.erl > @@ -39,6 +39,8 @@ > update__info/2, new__info/1, return__info/1, > return_none/0, return_none_args/2, return_any_args/2]). > > +-compile({no_auto_import,[min/2,max/2]}). > + > %%===================================================================== > > -include("../main/hipe.hrl"). > What is the consequence of this name clash? Is it a recent problem? I've not heard anything about this causing build failures. Personally I'd rather rename the local min/max functions or, if they're compatible with the standard ones, just delete them. no_auto_import seems like a kludge... From tuncer.ayaz@REDACTED Sun Sep 12 22:05:00 2010 From: tuncer.ayaz@REDACTED (Tuncer Ayaz) Date: Sun, 12 Sep 2010 22:05:00 +0200 Subject: [erlang-patches] [PATCH 2/3] hipe: Do not auto-import min/2 and max/2 In-Reply-To: <19597.4058.734502.869815@pilspetsen.it.uu.se> References: <1284306924-70245-1-git-send-email-tuncer.ayaz@gmail.com> <1284306924-70245-2-git-send-email-tuncer.ayaz@gmail.com> <19597.4058.734502.869815@pilspetsen.it.uu.se> Message-ID: On Sun, Sep 12, 2010 at 7:37 PM, Mikael Pettersson wrote: > Tuncer Ayaz writes: > ?> Resolve name clash with auto-imported BIFs min/2 and max/2. [...] > What is the consequence of this name clash? ?Is it a recent problem? > > I've not heard anything about this causing build failures. This is a new warning generated since R14: ./hipe_icode_type.erl:81: Warning: import directive overrides auto-imported BIF max/2 - use "-compile({no_auto_import,[max/2]})." to resolve name clash ./hipe_icode_type.erl:81: Warning: import directive overrides auto-imported BIF min/2 - use "-compile({no_auto_import,[min/2]})." to resolve name clash lib/hipe/cerl/erl_types.erl exports [min/2,max/2] and has the same compiler directive already in place: -compile({no_auto_import,[min/2,max/2]}). > Personally I'd rather rename the local min/max functions or, > if they're compatible with the standard ones, just delete them. > no_auto_import seems like a kludge... Yes, a rename is better than telling the compiler what to ignore. What about a patch to replace the import with fully qualified calls? Or do you prefer a rename patch? From mikpe@REDACTED Sun Sep 12 23:20:29 2010 From: mikpe@REDACTED (Mikael Pettersson) Date: Sun, 12 Sep 2010 23:20:29 +0200 Subject: [erlang-patches] [PATCH 2/3] hipe: Do not auto-import min/2 and max/2 In-Reply-To: References: <1284306924-70245-1-git-send-email-tuncer.ayaz@gmail.com> <1284306924-70245-2-git-send-email-tuncer.ayaz@gmail.com> <19597.4058.734502.869815@pilspetsen.it.uu.se> Message-ID: <19597.17437.610351.22157@pilspetsen.it.uu.se> Tuncer Ayaz writes: > On Sun, Sep 12, 2010 at 7:37 PM, Mikael Pettersson wrote: > > Tuncer Ayaz writes: > > ?> Resolve name clash with auto-imported BIFs min/2 and max/2. > > [...] > > > What is the consequence of this name clash? ?Is it a recent problem? > > > > I've not heard anything about this causing build failures. > > This is a new warning generated since R14: > > ./hipe_icode_type.erl:81: Warning: import directive overrides > auto-imported BIF max/2 - use "-compile({no_auto_import,[max/2]})." to > resolve name clash > ./hipe_icode_type.erl:81: Warning: import directive overrides > auto-imported BIF min/2 - use "-compile({no_auto_import,[min/2]})." to > resolve name clash > > lib/hipe/cerl/erl_types.erl exports [min/2,max/2] and has the same > compiler directive already in place: > -compile({no_auto_import,[min/2,max/2]}). > > > Personally I'd rather rename the local min/max functions or, > > if they're compatible with the standard ones, just delete them. > > no_auto_import seems like a kludge... > > Yes, a rename is better than telling the compiler what to ignore. > What about a patch to replace the import with fully qualified calls? > Or do you prefer a rename patch? I initially thought that these min/max functions were local function similar to the erlang ones (they didn't use to be standard so we used to have to duplicate them), but the issue in hipe_icode_type is that it explicitly imports min/max from erl_types, and that explicit import triggers a warning due to the newish auto-import from erlang. Given that I think your initial no_auto_import patch is Ok. Sorry about the confusion. From egil@REDACTED Mon Sep 13 08:39:20 2010 From: egil@REDACTED (=?ISO-8859-1?Q?Bj=F6rn-Egil_Dahlberg?=) Date: Mon, 13 Sep 2010 08:39:20 +0200 Subject: [erlang-patches] fix for ei mishandling of writev iovec buffers In-Reply-To: References: Message-ID: <4C8DC718.5000204@erix.ericsson.se> Hi Steve, Looks like a good and valid patch. I'll try to sneak it past Bj?rn and into the release (the deadline was a week ago). Regards, Bj?rn-Egil Erlang/OTP On 2010-09-11 08:13, Steve Vinoski wrote: > This patch fixes a data corruption problem with ei where it mishandles > iovec buffers on platforms that support writev. When writing to the > socket blocks, ei tries to adjust its iovecs based on how much data > it's already successfully written so it can pick up where it left off > when the socket is write-ready again, but it forgets to adjust one > particular pointer. The result is that the same data gets written > multiple times, corrupting what the cnode sends. This only occurs when > the message size is much greater than the amount of data ei can write > to the socket without blocking. I detected the problem when sending > large binaries from a cnode to a regular node. > > git fetch git://github.com/vinoski/otp.git ei-writev > > I hope it's not too late for inclusion into R14B, especially given > that the fix is so simple and obvious. > > --steve > > ________________________________________________________________ > erlang-patches (at) erlang.org mailing list. > See http://www.erlang.org/faq.html > To unsubscribe; mailto:erlang-patches-unsubscribe@REDACTED > From tuncer.ayaz@REDACTED Mon Sep 13 15:12:29 2010 From: tuncer.ayaz@REDACTED (Tuncer Ayaz) Date: Mon, 13 Sep 2010 15:12:29 +0200 Subject: [erlang-patches] [PATCH 2/3] hipe: Do not auto-import min/2 and max/2 In-Reply-To: <19597.17437.610351.22157@pilspetsen.it.uu.se> References: <1284306924-70245-1-git-send-email-tuncer.ayaz@gmail.com> <1284306924-70245-2-git-send-email-tuncer.ayaz@gmail.com> <19597.4058.734502.869815@pilspetsen.it.uu.se> <19597.17437.610351.22157@pilspetsen.it.uu.se> Message-ID: On Sun, Sep 12, 2010 at 11:20 PM, Mikael Pettersson wrote: > > I initially thought that these min/max functions were local > function similar to the erlang ones (they didn't use to be > standard so we used to have to duplicate them), but the issue > in hipe_icode_type is that it explicitly imports min/max from > erl_types, and that explicit import triggers a warning due to > the newish auto-import from erlang. > > Given that I think your initial no_auto_import patch is Ok. Isn't changing min() to erl_types:min() a cleaner change? From kostis@REDACTED Mon Sep 13 17:20:22 2010 From: kostis@REDACTED (Kostis Sagonas) Date: Mon, 13 Sep 2010 18:20:22 +0300 Subject: [erlang-patches] [PATCH 2/3] hipe: Do not auto-import min/2 and max/2 In-Reply-To: References: <1284306924-70245-1-git-send-email-tuncer.ayaz@gmail.com> <1284306924-70245-2-git-send-email-tuncer.ayaz@gmail.com> <19597.4058.734502.869815@pilspetsen.it.uu.se> <19597.17437.610351.22157@pilspetsen.it.uu.se> Message-ID: <4C8E4136.6080302@cs.ntua.gr> Tuncer Ayaz wrote: > On Sun, Sep 12, 2010 at 11:20 PM, Mikael Pettersson wrote: >> I initially thought that these min/max functions were local >> function similar to the erlang ones (they didn't use to be >> standard so we used to have to duplicate them), but the issue >> in hipe_icode_type is that it explicitly imports min/max from >> erl_types, and that explicit import triggers a warning due to >> the newish auto-import from erlang. >> >> Given that I think your initial no_auto_import patch is Ok. > > Isn't changing min() to erl_types:min() a cleaner change? Absolutely. A patch for this already appears in the hipe-fixes branch of my otp repository on github (http://github.com/kostis/otp/commits/hipe-fixes). The relevant commit can be found at: http://github.com/kostis/otp/commit/c244767dd19295812de33a038552853263727cc4 Kostis From mikpe@REDACTED Mon Sep 13 17:47:14 2010 From: mikpe@REDACTED (Mikael Pettersson) Date: Mon, 13 Sep 2010 17:47:14 +0200 Subject: [erlang-patches] [PATCH 2/3] hipe: Do not auto-import min/2 and max/2 In-Reply-To: References: <1284306924-70245-1-git-send-email-tuncer.ayaz@gmail.com> <1284306924-70245-2-git-send-email-tuncer.ayaz@gmail.com> <19597.4058.734502.869815@pilspetsen.it.uu.se> <19597.17437.610351.22157@pilspetsen.it.uu.se> Message-ID: <19598.18306.923371.681163@pilspetsen.it.uu.se> Tuncer Ayaz writes: > On Sun, Sep 12, 2010 at 11:20 PM, Mikael Pettersson wrote: > > > > I initially thought that these min/max functions were local > > function similar to the erlang ones (they didn't use to be > > standard so we used to have to duplicate them), but the issue > > in hipe_icode_type is that it explicitly imports min/max from > > erl_types, and that explicit import triggers a warning due to > > the newish auto-import from erlang. > > > > Given that I think your initial no_auto_import patch is Ok. > > Isn't changing min() to erl_types:min() a cleaner change? No. The author of that code clearly wanted to use -import to get direct access to all relevant functions from erl_types. Un-importing a few of them because of Erlang stupidities makes the code inconsistent and therefore ugly. Just use the workaround. From bgustavsson@REDACTED Wed Sep 15 15:11:50 2010 From: bgustavsson@REDACTED (=?UTF-8?Q?Bj=C3=B6rn_Gustavsson?=) Date: Wed, 15 Sep 2010 15:11:50 +0200 Subject: What's cooking in erlang/otp (2010-09-15) Message-ID: The next release will be R14B01. The uw/epmd-fullnames branch has been taken out of 'pu' and has is now listed in the Stalled section of this email. ------------------------------------------------------------ [Graduated] * cg/docs-fixes (erts, stdlib, tools) (2010-09-06) 2 commits + Linkify applications listed under "See Also" (e51b9af) + Fix minor typos in the documentation (731b839) * mk/net-dragonfly-bsd-patches (asn1, common_test, erl_interface, erts, et, mnesia, reltool, runtime_tools, test_server, wx) (2010-06-23) 4 commits + Remove unused variables (88a04a1) + Use proper install method (6960062) + Add support for DragonFly BSD (2008472) + Add support for NetBSD (2fb2a1e) * ms/ei-overflow-fix (erl_interface) (2010-08-21) 1 commit + ei: prevent overflow in ei_connect_init/ei_xconnect (ada2e2f) * ms/ei_connect-doc-examples (erl_interface) (2010-08-21) 1 commit + ei_connect: correct man page examples (cdd39a4) * ms/fix-erl_call-overflow (erl_interface) (2010-08-22) 1 commit + erl_call: fix multiple buffer overflows (e4ee460) * ms/inet-bug-fixes (erts, kernel) (2010-07-21) 4 commits + inet: support retrieving MAC address on BSD (8393c5d) + inet: fix getservbyname buffer overflow (d61d41e) + inet: fix ifr_name buffer overflow (227d3f3) + inet: null terminate ifr_name buffer (cfcb962) * pg/fix-hipe-crash-in-gc_after_bif (erts) (2010-07-17) 1 commit + Fix call to erts_gc_after_bif_call in hipe glue (8bbcecd) * ph/auto_recognize_ipv6 (kernel) (2010-09-06) 2 commits + Add tests (296b3ae) + Let an 8-tuple given as ip_address() for gen_tcp/gen_udp/gen_sctp imply 'inet6' (8e415cb) * ta/asn1-test-compile-options (asn1) (2010-04-24) 1 commit + Fix asn1_SUITE test_compile_options:verbose/1 (da97a82) * ta/asn1ct-fix-whitespace (asn1) (2010-07-12) 1 commit + asn1ct: change unusual whitespace char from 0xA0 to 0x20 (c43d20b) ------------------------------------------------------------ [New topics] * ta/eliminate-warnings (edoc, hipe, mnesia) (2010-09-12) 3 commits - mnesia: Do not auto-import error/2 (4276689) - hipe: Do not auto-import min/2 and max/2 (41693be) - edoc: Do not auto-import error/1 (fa669f5) * ta/sendfile (erts, kernel) (2010-09-06) 1 commit - Implement file:sendfile/4 and file:sendfile/2 (0c0514e) ------------------------------------------------------------ [Stalled] * er/ei-decode_msg (erl_interface) (2010-03-11) 1 commit - Add function to decode distribution header (864091a) Needs documentation and test cases. Action expected from: Topic author * jn/gen_stream (stdlib) (2010-09-05) 5 commits - Use erlang:process_info(Pid, links) to determine if gen_stream managed worker processes are leaked (b2386df) - Move gen_stream internal process test to after termination of gen_stream parent (f1d8a97) - Add calls to code loader in every test to verify code loader still running (ac6cbba) - Track gen_stream processes directly for accurate test results (38a4083) - Patch dev to reproduce jn/gen_stream (7694a74) . Add new gen_stream behaviour for efficiently consuming serial streams (65f3db8) This topic branch has a failing test case: shell_SUITE:start_restricted_from_shell; We have now tested with and without this topic branch and when it is present that test case fails. We consider it proved to be guilty. The test case does not fail when run standalone so it seems to be tricky... Also, some of its own test cases fail sporadicly. Action expected from: Topic author. * jp/dependencies_makefile (compiler, erts) (2010-02-14) 3 commits - squash! eliminate dialyzer warning (434e2ca) - squash! fix snprintf for Windows (bf2708d) - Add dependencies Makefile generation to erlc(1) and compile(3) (7cbc437) Approved in principle by the OTP Technical Board; now awaits a closer review of the implementation. Action expected from: Bj?rn Gustavsson (the reviewer) * kr/gs-browser (gs) (2010-02-10) 1 commit - Change lib/gs/src/tool_utils.erl to select multiple browsers other than Netscape (802d159) This topic branch introduces a new call to the deprecated regexp module. Action expected from: Topic author or anyone else with an interest to advance the topic * sf/erts_de_busy_limit (erts) (2010-06-08) 1 commit - Add flag-based setting for 'erts_de_busy_limit' constant (67ed9ab) This topic branch has multiple issues described in this email: http://www.erlang.org/cgi-bin/ezmlm-cgi?3:mss:1303:201008:ldciadjdmjednikemjch Action expected from: Topic author. * uw/epmd-fullnames (kernel) (2010-05-07) 1 commit . Allow the erlang nodename host part to differ from the hostname (e0774be) This topic branch needs to be rebased and the conflicts resolved. This topic branch also needs documentation and test cases. We are likely to approve the branch for graduation if those issues are fixed. Action expected from: Topic author. ------------------------------------------------------------ [Cooking] * bg/temp-hipe-fixes (compiler, hipe, kernel) (2010-03-15) 6 commits - Avoid crash by skipping compilation_SUITE:on_load/1 (290bb30) - Inline less aggressively for native-code compilation (d505c72) - Crudely fix return type for the lists:key{search,find,member}/3 (df0669e) - seq_trace_SUITE: Don't native-compile (9e3a3f0) - Disable native code if on_load is used (2446475) - andor_SUITE: Don't native-compile (eed30d2) This branch contains temporary workarounds to avoid failing test cases and is never intended to graduate. * gc/gen-format-status-improvements (stdlib) (2010-06-12) 1 commit - Fix format_status bug for unregistered gen_event processes (95ed86f) * jf/run_erl-disable-flow-control (erts) (2010-03-05) 1 commit - Teach run_erl RUN_ERL_DISABLE_FLOWCNTRL for disabling flow control (d0775cd) * km/pool_connect-to-running-nodes (stdlib) (2010-09-02) 1 commit - Change pool module to attempt to attach to nodes that are already running (a9f4cbc) * ml/add-os-pid-to-port-info (erts) (2010-08-19) 1 commit - Extend erlang:port_info/1,2 to show the OS pid of a spawned process (b2d85bf) * pg/honor-start-type-in-rel-files (sasl) (2010-06-06) 1 commit - Honor start type in .rel files when building relup files (7599900) * rt/solaris-pty-handling-fixes (erts) (2010-08-06) 2 commits - Add corrected support for Solaris PTYs to run_erl (2ba4818) - Fix a typo that leads to syntax errors with DEBUG defined in run_erl (edfe4b9) * sa/callback-attr (compiler, inets, kernel, otp, stdlib) (2010-06-08) 7 commits - Add callback specs into 'application' module in kernel (eea750e) - Add callback specs to tftp module following internet documentation (d03554c) - Add callback specs to inets_service module following possibly deprecated comments (3d0bf65) - Add '-callback' attributes in stdlib's behaviours (b131583) - Update primary bootstrap (b64ffe6) - Automatical generation of 'behaviour_info' function from '-callback' attributes (879d6fc) - Add '-callback' attribute to language syntax (d63a448) * sb/make-files-like-erlc (tools) (2010-05-18) 1 commit - Change make:files to behave more like erlc (5e9d051) * sv/epmd-check-listen (erts) (2010-07-14) 1 commit - check return value of epmd server listen() call (c5c8baa) * ta/asn1-reporting (asn1) (2010-04-23) 1 commit - asn1ct: Make formatting of errors and warnings consistent (93face2) * ta/ensure-dot-ssh-exists (ssh) (2010-09-03) 1 commit - ssh: ensure ~/.ssh exists (5bc5325) -- Bj?rn Gustavsson, Erlang/OTP, Ericsson AB From bgustavsson@REDACTED Wed Sep 15 15:12:57 2010 From: bgustavsson@REDACTED (=?UTF-8?Q?Bj=C3=B6rn_Gustavsson?=) Date: Wed, 15 Sep 2010 15:12:57 +0200 Subject: [erlang-patches] [PATCH] Clean up bootstrap targets and documentation In-Reply-To: <1284303194-61922-1-git-send-email-tuncer.ayaz@gmail.com> References: <1284303194-61922-1-git-send-email-tuncer.ayaz@gmail.com> Message-ID: On Sun, Sep 12, 2010 at 4:53 PM, Tuncer Ayaz wrote: > Remove cleartool invocation and adapt docs to reflect git transition. Thanks! Applied directly to 'dev'. -- Bj?rn Gustavsson, Erlang/OTP, Ericsson AB From bgustavsson@REDACTED Wed Sep 15 15:13:33 2010 From: bgustavsson@REDACTED (=?UTF-8?Q?Bj=C3=B6rn_Gustavsson?=) Date: Wed, 15 Sep 2010 15:13:33 +0200 Subject: [erlang-patches] sendfile() In-Reply-To: References: Message-ID: On Sun, Sep 12, 2010 at 2:00 AM, Tuncer Ayaz wrote: > > git fetch git://github.com/tuncer/otp.git sendfile Thanks! Included in 'pu'. -- Bj?rn Gustavsson, Erlang/OTP, Ericsson AB From bgustavsson@REDACTED Wed Sep 15 15:14:15 2010 From: bgustavsson@REDACTED (=?UTF-8?Q?Bj=C3=B6rn_Gustavsson?=) Date: Wed, 15 Sep 2010 15:14:15 +0200 Subject: [erlang-patches] [PATCH 1/3] edoc: Do not auto-import error/1 In-Reply-To: <1284306924-70245-1-git-send-email-tuncer.ayaz@gmail.com> References: <1284306924-70245-1-git-send-email-tuncer.ayaz@gmail.com> Message-ID: On Sun, Sep 12, 2010 at 5:55 PM, Tuncer Ayaz wrote: > Resolve name clash with auto-imported BIF error/1. > --- > lib/edoc/src/edoc.erl | 2 ++ > lib/edoc/src/edoc_run.erl | 2 ++ > 2 files changed, 4 insertions(+), 0 deletions(-) Thanks! This and the following two patches are now included 'pu'. -- Bj?rn Gustavsson, Erlang/OTP, Ericsson AB From magnus@REDACTED Wed Sep 15 15:43:03 2010 From: magnus@REDACTED (Magnus Henoch) Date: Wed, 15 Sep 2010 14:43:03 +0100 Subject: Clarify shutdown timeout documentation Message-ID: <84aanjyvfc.fsf@linux-b2a3.site> I just noticed that the supervisor man page doesn't explicitly say that the shutdown timeout is given in milliseconds. Here is a patch for that. git fetch git://github.com/legoscia/otp.git shutdown_timeout_doc -- Magnus Henoch, magnus@REDACTED Erlang Solutions http://www.erlang-solutions.com/ From magnus@REDACTED Wed Sep 15 16:29:44 2010 From: magnus@REDACTED (Magnus Henoch) Date: Wed, 15 Sep 2010 15:29:44 +0100 Subject: Fix syntax highlighting of $ in Emacs Message-ID: <8462y7yt9j.fsf@linux-b2a3.site> This patch fixes Emacs syntax highlighting of the dollar sign in two cases, namely for strings ending with a dollar sign and an escaped double quote as a character constant: -vsn("$Revision: 42 $"). foo() -> $\". These combinations used to cause the syntax highlighter to believe that the following code is part of a string. git fetch git://github.com/legoscia/otp.git dollar_font_lock -- Magnus Henoch, magnus@REDACTED Erlang Solutions http://www.erlang-solutions.com/ From magnus@REDACTED Wed Sep 15 19:08:11 2010 From: magnus@REDACTED (Magnus Henoch) Date: Wed, 15 Sep 2010 18:08:11 +0100 Subject: Optionally display full path in Dialyzer warnings Message-ID: <841v8vylxg.fsf@linux-b2a3.site> Currently, Dialyzer warning messages only contain the base name of the file, e.g.: mysql_conn.erl:648: The created fun has no local return However, when running Dialyzer on a deep directory tree it is sometimes useful to have the full paths in the warning output. In particular, when viewing the output in Emacs, hitting RET on an entry to jump to the error will often yield a prompt for which directory the file is in; with full paths we would avoid that prompt. This change adds a --fullpath option to Dialyzer, which makes the warning messages contain the full path of the corresponding file. git fetch git://github.com/legoscia/otp.git dialyzer_full_path_option -- Magnus Henoch, magnus@REDACTED Erlang Solutions http://www.erlang-solutions.com/ From dizzyd@REDACTED Wed Sep 15 19:29:19 2010 From: dizzyd@REDACTED (Dave Smith) Date: Wed, 15 Sep 2010 11:29:19 -0600 Subject: rt/solaris-pty-handling-fixes and R14B Message-ID: Greetings, I noticed that a fix for Solaris, submitted in early August did not make it into the R14B release -- rt/solaris-pty-handling-fixes. It's currently listed as "cooking" in the most recent "What's cooking" update. Was there a deadline that it missed for getting merged or something? It seems, from the outside, that a patch of this minor magnitude submitted 1.5 months prior to release would make it in. It might be helpful, when approaching a release, to annotate which patches on the cooking list should expect to make it "in". Thanks, D. --- Details on the patch: * rt/solaris-pty-handling-fixes (erts) (2010-08-06) 2 commits - Add corrected support for Solaris PTYs to run erl (2ba4818) - Fix a typo that leads to syntax errors with DEBUG defined in run erl (edfe4b9) From jay@REDACTED Thu Sep 16 08:07:56 2010 From: jay@REDACTED (jay@REDACTED) Date: Wed, 15 Sep 2010 23:07:56 -0700 (PDT) Subject: [erlang-patches] gen_stream updated to test worker process links In-Reply-To: References: <61406.64.81.32.114.1283679631.squirrel@duomark.com> <40523.74.1.186.35.1283795407.squirrel@duomark.com> Message-ID: <54126.64.81.32.110.1284617276.squirrel@duomark.com> > On Mon, Sep 6, 2010 at 7:50 PM, wrote: > >> Let me know if the tests perform better on your environment. >> Hopefully, this will solve the intermittent failures on >> other platforms. > > There were no failures in any of the gen_stream test cases > tonight, but since the failures were intermittent we'll have to > wait a few more days to be sure. Have the tests continued to run without failure? > > The shell_SUITE:start_restricted_from_shell/1 test case, > however, still fails. > The current version of gen_stream contains %% DEBUG statements at the end of each gen_stream test case which invoke the equivalent failing shell_SUITE command. If you could remove the DEBUG comments and run the tests, hopefully, we can isolate the test case which is causing the shell_SUITE failure. Since I cannot reproduce the problem, I am dependent on any information you can provide about the test gen_stream_SUITE running on your environment. Thanks for your efforts, jay From raimo+erlang-patches@REDACTED Thu Sep 16 08:59:57 2010 From: raimo+erlang-patches@REDACTED (Raimo Niskanen) Date: Thu, 16 Sep 2010 08:59:57 +0200 Subject: [erlang-patches] gen_stream updated to test worker process links In-Reply-To: <54126.64.81.32.110.1284617276.squirrel@duomark.com> References: <61406.64.81.32.114.1283679631.squirrel@duomark.com> <40523.74.1.186.35.1283795407.squirrel@duomark.com> <54126.64.81.32.110.1284617276.squirrel@duomark.com> Message-ID: <20100916065957.GA31495@erix.ericsson.se> On Wed, Sep 15, 2010 at 11:07:56PM -0700, jay@REDACTED wrote: > > On Mon, Sep 6, 2010 at 7:50 PM, wrote: > > > >> Let me know if the tests perform better on your environment. > >> Hopefully, this will solve the intermittent failures on > >> other platforms. > > > > There were no failures in any of the gen_stream test cases > > tonight, but since the failures were intermittent we'll have to > > wait a few more days to be sure. > > Have the tests continued to run without failure? Yes. That looks fine. > > > > > The shell_SUITE:start_restricted_from_shell/1 test case, > > however, still fails. > > > > The current version of gen_stream contains %% DEBUG statements > at the end of each gen_stream test case which invoke the equivalent > failing shell_SUITE command. If you could remove the DEBUG > comments and run the tests, hopefully, we can isolate the test > case which is causing the shell_SUITE failure. Since I cannot > reproduce the problem, I am dependent on any information you > can provide about the test gen_stream_SUITE running on your > environment. Ok. We will try that any day... > > Thanks for your efforts, > jay > > > > ________________________________________________________________ > erlang-patches (at) erlang.org mailing list. > See http://www.erlang.org/faq.html > To unsubscribe; mailto:erlang-patches-unsubscribe@REDACTED -- / Raimo Niskanen, Erlang/OTP, Ericsson AB From raimo+erlang-patches@REDACTED Thu Sep 16 09:48:33 2010 From: raimo+erlang-patches@REDACTED (Raimo Niskanen) Date: Thu, 16 Sep 2010 09:48:33 +0200 Subject: [erlang-patches] gen_stream updated to test worker process links In-Reply-To: <20100916065957.GA31495@erix.ericsson.se> References: <61406.64.81.32.114.1283679631.squirrel@duomark.com> <40523.74.1.186.35.1283795407.squirrel@duomark.com> <54126.64.81.32.110.1284617276.squirrel@duomark.com> <20100916065957.GA31495@erix.ericsson.se> Message-ID: <20100916074833.GA28796@erix.ericsson.se> On Thu, Sep 16, 2010 at 08:59:57AM +0200, Raimo Niskanen wrote: > On Wed, Sep 15, 2010 at 11:07:56PM -0700, jay@REDACTED wrote: > > > On Mon, Sep 6, 2010 at 7:50 PM, wrote: > > > > > >> Let me know if the tests perform better on your environment. > > >> Hopefully, this will solve the intermittent failures on > > >> other platforms. > > > > > > There were no failures in any of the gen_stream test cases > > > tonight, but since the failures were intermittent we'll have to > > > wait a few more days to be sure. > > > > Have the tests continued to run without failure? > > Yes. That looks fine. > > > > > > > > > The shell_SUITE:start_restricted_from_shell/1 test case, > > > however, still fails. > > > > > > > The current version of gen_stream contains %% DEBUG statements > > at the end of each gen_stream test case which invoke the equivalent > > failing shell_SUITE command. If you could remove the DEBUG > > comments and run the tests, hopefully, we can isolate the test > > case which is causing the shell_SUITE failure. Since I cannot > > reproduce the problem, I am dependent on any information you > > can provide about the test gen_stream_SUITE running on your > > environment. > > Ok. We will try that any day... Removing "%DEBUG: " causes all tests to fail with (or similar): === Ended at 2010-09-16 09:21:36 === location {gen_stream_SUITE,75} === reason = no function clause matching erl_scan:tokens1(<0.59.0>, {erl_scan,#Fun,false, false,false}, 1,no_col,[],#Fun,[]) in function gen_stream_SUITE:scan/2 in call from gen_stream_SUITE:start_bin/1 in call from test_server:my_apply/3 in call from test_server:ts_tc/3 in call from test_server:run_test_case_eval1/6 in call from test_server:run_test_case_eval/8 It seems erl_scan:tokens gets called with ([], pid(), 1) from gen_stream_SUITE:scan/2 when the second argument according to the manual should be string()|eof, not pid(). > > > > > Thanks for your efforts, > > jay > > > > > > > > ________________________________________________________________ > > erlang-patches (at) erlang.org mailing list. > > See http://www.erlang.org/faq.html > > To unsubscribe; mailto:erlang-patches-unsubscribe@REDACTED > > -- > > / Raimo Niskanen, Erlang/OTP, Ericsson AB > > ________________________________________________________________ > erlang-patches (at) erlang.org mailing list. > See http://www.erlang.org/faq.html > To unsubscribe; mailto:erlang-patches-unsubscribe@REDACTED -- / Raimo Niskanen, Erlang/OTP, Ericsson AB From tobias.schlager@REDACTED Thu Sep 16 09:56:13 2010 From: tobias.schlager@REDACTED (Tobias Schlager) Date: Thu, 16 Sep 2010 09:56:13 +0200 Subject: [PATCH] allow user specified compiler options in cover.erl Message-ID: <4C91CD9D.5070408@lindenbaum.eu> I would like to propose a small patch of the cover.erl module. Motivation: In order to be able to test non-exported functions from another (test) module it is necessary to compile the specific module (at least during the test phase) with the export_all compiler option. This allows complete separation of testing and productive code. At the moment it is not possible to combine this with a test code coverage using the cover module. The problem is that when cover compiling a module using cover:compile_* the code is reloaded into the emulator omitting/filtering the passed user options. In my example above the export_all option would be removed and the non-exported functions cannot be called any more. Change: The below patch would * extend the filtering of compiler options in compile_module/2 to allow the user to pass the export_all option * pass the (filtered) user specified compiler options to compile:forms in order to have the options enabled when the cover compiled code is loaded into the emulator --- cover.erl.orig 2010-06-11 17:31:53.000000000 +0200 +++ cover.erl.new 2010-09-15 16:46:24.000000000 +0200 @@ -229,6 +229,7 @@ {i, Dir} when is_list(Dir) -> true; {d, _Macro} -> true; {d, _Macro, _Value} -> true; + export_all -> true; _ -> false end end, @@ -569,7 +570,7 @@ case get_beam_file(Module,BeamFile0,Compiled0) of {ok,BeamFile} -> {Reply,Compiled} = - case do_compile_beam(Module,BeamFile) of + case do_compile_beam(Module,BeamFile,[]) of {ok, Module} -> remote_load_compiled(State#main_state.nodes, [{Module,BeamFile}]), @@ -1227,13 +1228,13 @@ Options = [debug_info,binary,report_errors,report_warnings] ++ UserOptions, case compile:file(File, Options) of {ok, Module, Binary} -> - do_compile_beam(Module,Binary); + do_compile_beam(Module,Binary,UserOptions); error -> error end. %% Beam is a binary or a .beam file name -do_compile_beam(Module,Beam) -> +do_compile_beam(Module,Beam,UserOptions) -> %% Clear database do_clear(Module), @@ -1253,7 +1254,7 @@ %% Compile and load the result %% It's necessary to check the result of loading since it may %% fail, for example if Module resides in a sticky directory - {ok, Module, Binary} = compile:forms(Forms, []), + {ok, Module, Binary} = compile:forms(Forms, UserOptions), case code:load_binary(Module, ?TAG, Binary) of {module, Module} -> Regards Tobias Schlager From lemenkov@REDACTED Thu Sep 16 16:20:21 2010 From: lemenkov@REDACTED (Peter Lemenkov) Date: Thu, 16 Sep 2010 18:20:21 +0400 Subject: [PATCH 1/1] Fix installation of example file in lib/observer Message-ID: <1284646821-26199-1-git-send-email-lemenkov@gmail.com> Files (actually one file - multitrace.erl), marked as EXAMPLE_FILES are installed into $(RELSYSDIR)/src which is inconsistent with installation procedure for other example file in other modules. This file should be installed into $(RELSYSDIR)/examples directory. Signed-off-by: Peter Lemenkov --- lib/observer/src/Makefile | 3 ++- 1 files changed, 2 insertions(+), 1 deletions(-) diff --git a/lib/observer/src/Makefile b/lib/observer/src/Makefile index dde1ea1..b4eb518 100644 --- a/lib/observer/src/Makefile +++ b/lib/observer/src/Makefile @@ -111,7 +111,8 @@ release_spec: opt $(INSTALL_DIR) $(RELSYSDIR)/src $(INSTALL_DATA) $(ERL_FILES) $(RELSYSDIR)/src $(INSTALL_DATA) $(INTERNAL_HRL_FILES) $(RELSYSDIR)/src - $(INSTALL_DATA) $(EXAMPLE_FILES) $(RELSYSDIR)/src + $(INSTALL_DIR) $(RELSYSDIR)/examples + $(INSTALL_DATA) $(EXAMPLE_FILES) $(RELSYSDIR)/examples $(INSTALL_DIR) $(RELSYSDIR)/include $(INSTALL_DATA) $(HRL_FILES) $(RELSYSDIR)/include $(INSTALL_DIR) $(RELSYSDIR)/ebin -- 1.7.2.3 From lemenkov@REDACTED Thu Sep 16 16:21:13 2010 From: lemenkov@REDACTED (Peter Lemenkov) Date: Thu, 16 Sep 2010 18:21:13 +0400 Subject: [PATCH 1/1] Do not try to run 'make clean' in zlib directory Message-ID: <1284646873-26259-1-git-send-email-lemenkov@gmail.com> No need to run 'make clean' in erts/emulator/zlib directory if we building against shared library. This saves a little amount of CPU time. Signed-off-by: Peter Lemenkov --- erts/emulator/Makefile.in | 2 ++ 1 files changed, 2 insertions(+), 0 deletions(-) diff --git a/erts/emulator/Makefile.in b/erts/emulator/Makefile.in index 903abe6..f0ffe23 100644 --- a/erts/emulator/Makefile.in +++ b/erts/emulator/Makefile.in @@ -419,7 +419,9 @@ endif $(RM) -f $(BINDIR)/beam $(BINDIR)/beam.* $(RM) -rf $(BINDIR)/child_setup $(BINDIR)/child_setup.* $(RM) -f $(BINDIR)/hipe_mkliterals $(BINDIR)/hipe_mkliterals.* +ifndef Z_LIB @set -e ; cd zlib && $(MAKE) clean +endif @set -e ; cd pcre && $(MAKE) clean .PHONY: all zlib pcre clean -- 1.7.2.3 From kenneth.lundin@REDACTED Thu Sep 16 16:58:38 2010 From: kenneth.lundin@REDACTED (Kenneth Lundin) Date: Thu, 16 Sep 2010 16:58:38 +0200 Subject: [erlang-patches] rt/solaris-pty-handling-fixes and R14B In-Reply-To: References: Message-ID: Hi Dave, Even though a patch is of minor magnitude like this one we have to review each patch we take in. We handle the contributions as fast as we can and have the system divided into a number of functional areas with different developers responsible for each. Sometimes the review can be delayed because the responsible developer has to prioritize other work, is on vacation (as in this case) etc. /Regards Kenneth, Erlang/OTP Ericsson From bgustavsson@REDACTED Fri Sep 17 10:34:46 2010 From: bgustavsson@REDACTED (=?UTF-8?Q?Bj=C3=B6rn_Gustavsson?=) Date: Fri, 17 Sep 2010 10:34:46 +0200 Subject: [erlang-patches] sendfile() In-Reply-To: References: Message-ID: 2010/9/15 Bj?rn Gustavsson : > On Sun, Sep 12, 2010 at 2:00 AM, Tuncer Ayaz wrote: >> >> git fetch git://github.com/tuncer/otp.git sendfile > > Thanks! Included in 'pu'. We have not had time to review the patch, but here is some feedback about build problems on three platforms. Until the build problems are fixed, I will take the branch out of 'pu'. Windows: cc.sh -O2 -I/ldisk/daily_build/otp_norel_pu_win32_r14b01.2010-09-16_23/otp_src_R14B01/erts/win32 -DOTP_RELEASE -D_WIN32_WINNT=0x0500 -DWINVER=0x0500 -D_USE_32BIT_TIME_T -DERTS_MIXED_CYGWIN_VC -DSTATIC_ERLANG_DRIVER -DHAVE_CONFIG_H -DUSE_THREADS -DWIN32_THREADS -DLIBSCTP= -Iwin32/opt/plain -Ibeam -Isys/win32 -Isys/common -Iwin32 -Izlib -Ipcre -Ihipe -I../include -I../include/win32 -I../include/internal -I../include/internal/win32 -Idrivers/common -Idrivers/win32 -c drivers/common/efile_drv.c -o obj/win32/opt/plain/efile_drv.o drivers/common/efile_drv.c(1699) : error C2065: 'ENOTCONN' : undeclared identifier drivers/common/efile_drv.c(1699) : error C2051: case expression not constant drivers/common/efile_drv.c(1700) : error C2065: 'ENOTSOCK' : undeclared identifier drivers/common/efile_drv.c(1700) : error C2051: case expression not constant drivers/common/efile_drv.c(1701) : error C2065: 'EOPNOTSUPP' : undeclared identifier drivers/common/efile_drv.c(1701) : error C2051: case expression not constant make[3]: *** [obj/win32/opt/plain/efile_drv.o] Error 2 make[3]: Leaving directory `/ldisk/daily_build/otp_norel_pu_win32_r14b01.2010-09-16_23/otp_src_R14B01/erts/emulator' make[2]: *** [opt] Error 2 make[2]: Leaving directory `/ldisk/daily_build/otp_norel_pu_win32_r14b01.2010-09-16_23/otp_src_R14B01/erts/emulator' make[1]: *** [opt] Error 2 make[1]: Leaving directory `/ldisk/daily_build/otp_norel_pu_win32_r14b01.2010-09-16_23/otp_src_R14B01/erts' (Either move the switch into unix_efile.c or enclose each case in an #ifdef.) Solaris 10/Intel: gcc -g -O2 -I/ldisk/daily_build/otp_norel_pu_solaris10_r14b01.2010-09-16_23/otp_src_R14B01/erts/i386-pc-solaris2.10 -D_LARGEFILE_SOURCE -D_FILE_OFFSET_BITS=64 -DERTS_SMP -DHAVE_CONFIG_H -Wall -Wstrict-prototypes -Wmissing-prototypes -Wdeclaration-after-statement -DUSE_THREADS -D_THREAD_SAFE -D_REENTRANT -DPOSIX_THREADS -D_POSIX_PTHREAD_SEMANTICS -Ii386-pc-solaris2.10/opt/smp -Ibeam -Isys/unix -Isys/common -Ii386-pc-solaris2.10 -Izlib -Ipcre -Ihipe -I../include -I../include/i386-pc-solaris2.10 -I../include/internal -I../include/internal/i386-pc-solaris2.10 -Idrivers/common -Idrivers/unix -I../etc/unix -c drivers/unix/unix_efile.c -o obj/i386-pc-solaris2.10/opt/smp/unix_efile.o drivers/unix/unix_efile.c:1518: error: conflicting types for 'efile_sendfile' drivers/common/erl_efile.h:158: error: previous declaration of 'efile_sendfile' was here drivers/unix/unix_efile.c:1518: error: conflicting types for 'efile_sendfile' drivers/common/erl_efile.h:158: error: previous declaration of 'efile_sendfile' was here gmake[3]: *** [obj/i386-pc-solaris2.10/opt/smp/unix_efile.o] Error 1 gmake[3]: Leaving directory `/ldisk/daily_build/otp_norel_pu_solaris10_r14b01.2010-09-16_23/otp_src_R14B01/erts/emulator' gmake[2]: *** [opt] Error 2 gmake[2]: Leaving directory `/ldisk/daily_build/otp_norel_pu_solaris10_r14b01.2010-09-16_23/otp_src_R14B01/erts/emulator' gmake[1]: *** [smp] Error 2 gmake[1]: Leaving directory `/ldisk/daily_build/otp_norel_pu_solaris10_r14b01.2010-09-16_23/otp_src_R14B01/erts' gmake: *** [emulator] Error 2 Darwin 8.11.1 (Mac OS X Tiger, I think): gcc -mdynamic-no-pic -m32 -g -O2 -I/ldisk/daily_build/otp_norel_pu_macosx_r14b01.2010-09-16_23/otp_src_R14B01/erts/i386-apple-darwin8.11.1 -no-cpp-precomp -D_XOPEN_SOURCE -DERTS_SMP -DHAVE_CONFIG_H -Wall -Wstrict-prototypes -Wmissing-prototypes -Wdeclaration-after-statement -DUSE_THREADS -D_THREAD_SAFE -D_REENTRANT -DPOSIX_THREADS -Ii386-apple-darwin8.11.1/opt/smp -Ibeam -Isys/unix -Isys/common -Ii386-apple-darwin8.11.1 -Izlib -Ipcre -Ihipe -I../include -I../include/i386-apple-darwin8.11.1 -I../include/internal -I../include/internal/i386-apple-darwin8.11.1 -Idrivers/common -Idrivers/unix -I../etc/unix -c drivers/unix/unix_efile.c -o obj/i386-apple-darwin8.11.1/opt/smp/unix_efile.o drivers/unix/unix_efile.c:1518: error: conflicting types for 'efile_sendfile' drivers/common/erl_efile.h:158: error: previous declaration of 'efile_sendfile' was here make[3]: *** [obj/i386-apple-darwin8.11.1/opt/smp/unix_efile.o] Error 1 make[2]: *** [opt] Error 2 make[1]: *** [smp] Error 2 make: *** [emulator] Error 2 -- Bj?rn Gustavsson, Erlang/OTP, Ericsson AB From bgustavsson@REDACTED Fri Sep 17 10:45:00 2010 From: bgustavsson@REDACTED (=?UTF-8?Q?Bj=C3=B6rn_Gustavsson?=) Date: Fri, 17 Sep 2010 10:45:00 +0200 Subject: [erlang-patches] Clarify shutdown timeout documentation In-Reply-To: <84aanjyvfc.fsf@linux-b2a3.site> References: <84aanjyvfc.fsf@linux-b2a3.site> Message-ID: On Wed, Sep 15, 2010 at 3:43 PM, Magnus Henoch wrote: > I just noticed that the supervisor man page doesn't explicitly say that > the shutdown timeout is given in milliseconds. Here is a patch for > that. > > git fetch git://github.com/legoscia/otp.git shutdown_timeout_doc Thanks! I have directly included it in 'dev'. -- Bj?rn Gustavsson, Erlang/OTP, Ericsson AB From bgustavsson@REDACTED Fri Sep 17 10:46:41 2010 From: bgustavsson@REDACTED (=?UTF-8?Q?Bj=C3=B6rn_Gustavsson?=) Date: Fri, 17 Sep 2010 10:46:41 +0200 Subject: [erlang-patches] Fix syntax highlighting of $ in Emacs In-Reply-To: <8462y7yt9j.fsf@linux-b2a3.site> References: <8462y7yt9j.fsf@linux-b2a3.site> Message-ID: On Wed, Sep 15, 2010 at 4:29 PM, Magnus Henoch wrote: > This patch fixes Emacs syntax highlighting of the dollar sign in two > cases, namely for strings ending with a dollar sign and an escaped > double quote as a character constant: > > -vsn("$Revision: 42 $"). > > foo() -> > $\". > > These combinations used to cause the syntax highlighter to believe that > the following code is part of a string. > > git fetch git://github.com/legoscia/otp.git dollar_font_lock Thanks! Will include in 'pu'. -- Bj?rn Gustavsson, Erlang/OTP, Ericsson AB From bgustavsson@REDACTED Fri Sep 17 10:48:45 2010 From: bgustavsson@REDACTED (=?UTF-8?Q?Bj=C3=B6rn_Gustavsson?=) Date: Fri, 17 Sep 2010 10:48:45 +0200 Subject: [erlang-patches] Optionally display full path in Dialyzer warnings In-Reply-To: <841v8vylxg.fsf@linux-b2a3.site> References: <841v8vylxg.fsf@linux-b2a3.site> Message-ID: On Wed, Sep 15, 2010 at 7:08 PM, Magnus Henoch wrote: > Currently, Dialyzer warning messages only contain the base name of the > file, e.g.: > > mysql_conn.erl:648: The created fun has no local return > > However, when running Dialyzer on a deep directory tree it is > sometimes useful to have the full paths in the warning output. In > particular, when viewing the output in Emacs, hitting RET on an entry > to jump to the error will often yield a prompt for which directory the > file is in; with full paths we would avoid that prompt. > > This change adds a --fullpath option to Dialyzer, which makes the > warning messages contain the full path of the corresponding file. > > git fetch git://github.com/legoscia/otp.git dialyzer_full_path_option > Thanks! Will include in 'pu'. -- Bj?rn Gustavsson, Erlang/OTP, Ericsson AB From bgustavsson@REDACTED Fri Sep 17 11:01:12 2010 From: bgustavsson@REDACTED (=?UTF-8?Q?Bj=C3=B6rn_Gustavsson?=) Date: Fri, 17 Sep 2010 11:01:12 +0200 Subject: [erlang-patches] [PATCH] allow user specified compiler options in cover.erl In-Reply-To: <4C91CD9D.5070408@lindenbaum.eu> References: <4C91CD9D.5070408@lindenbaum.eu> Message-ID: On Thu, Sep 16, 2010 at 9:56 AM, Tobias Schlager wrote: > I would like to propose a small patch of the cover.erl module. Please see http://github.com/erlang/otp/wiki/Submitting-patches and specially "Sending the patch". We do allow in-line patches, provided that they are generated by "git format-patch" (or are formatted in the same way) and that they are not white-space damaged by your email program (allowing us to use "git am" to apply and commit them). -- Bj?rn Gustavsson, Erlang/OTP, Ericsson AB From bgustavsson@REDACTED Fri Sep 17 11:10:35 2010 From: bgustavsson@REDACTED (=?UTF-8?Q?Bj=C3=B6rn_Gustavsson?=) Date: Fri, 17 Sep 2010 11:10:35 +0200 Subject: [erlang-patches] [PATCH 1/1] Do not try to run 'make clean' in zlib directory In-Reply-To: <1284646873-26259-1-git-send-email-lemenkov@gmail.com> References: <1284646873-26259-1-git-send-email-lemenkov@gmail.com> Message-ID: On Thu, Sep 16, 2010 at 4:21 PM, Peter Lemenkov wrote: > No need to run 'make clean' in erts/emulator/zlib directory if we building > against shared library. This saves a little amount of CPU time. Is it really worth complicating the Makefile for such small saving of CPU time? -- Bj?rn Gustavsson, Erlang/OTP, Ericsson AB From bgustavsson@REDACTED Fri Sep 17 11:14:07 2010 From: bgustavsson@REDACTED (=?UTF-8?Q?Bj=C3=B6rn_Gustavsson?=) Date: Fri, 17 Sep 2010 11:14:07 +0200 Subject: [erlang-patches] [PATCH 1/1] Fix installation of example file in lib/observer In-Reply-To: <1284646821-26199-1-git-send-email-lemenkov@gmail.com> References: <1284646821-26199-1-git-send-email-lemenkov@gmail.com> Message-ID: On Thu, Sep 16, 2010 at 4:20 PM, Peter Lemenkov wrote: > Files (actually one file - multitrace.erl), marked as EXAMPLE_FILES are > installed into $(RELSYSDIR)/src which is inconsistent with installation > procedure for other example file in other modules. > > This file should be installed into $(RELSYSDIR)/examples directory. Thanks! Will include in 'pu'. -- Bj?rn Gustavsson, Erlang/OTP, Ericsson AB From dave@REDACTED Fri Sep 17 12:51:03 2010 From: dave@REDACTED (Dave Cottlehuber) Date: Fri, 17 Sep 2010 22:51:03 +1200 Subject: patch: updated windows build documentation Message-ID: This patch updates the Windows build docs, to note newer versions of dependencies that work, & also how to compile with the free Microsoft Visual Studio 2008 C++ Express compiler. - using latest VS2008 compiler & SDKs - converting wxWidgets to compile with newer MS tools and via command line instead of GUI - latest tested version of OpenSSL + wxWidgets # On branch improved_INSTALL-W32.md # Changes to be committed: # (use "git reset HEAD ..." to unstage) # # modified: INSTALL-WIN32.md git fetch git://github.com/dch/otp.git improved_INSTALL-W32.md cheers, Dave From tobias.schlager@REDACTED Fri Sep 17 15:22:15 2010 From: tobias.schlager@REDACTED (Tobias Schlager) Date: Fri, 17 Sep 2010 15:22:15 +0200 Subject: [PATCH] allow user specified compiler options in cover.erl In-Reply-To: References: <4C91CD9D.5070408@lindenbaum.eu> Message-ID: <4C936B87.7020405@lindenbaum.eu> Sorry for that, here's the patch from git format-patch From b09fe86d1e7eb1603b3c18e409361342a8d41548 Mon Sep 17 00:00:00 2001 From: Tobias Schlager Date: Fri, 17 Sep 2010 15:05:20 +0200 Subject: [PATCH] allow user specified compiler options in cover.erl --- lib/tools/src/cover.erl | 9 +++++---- 1 files changed, 5 insertions(+), 4 deletions(-) diff --git a/lib/tools/src/cover.erl b/lib/tools/src/cover.erl index c4d1bd1..b8884fe 100644 --- a/lib/tools/src/cover.erl +++ b/lib/tools/src/cover.erl @@ -229,6 +229,7 @@ compile_modules(Files,Options) -> {i, Dir} when is_list(Dir) -> true; {d, _Macro} -> true; {d, _Macro, _Value} -> true; + export_all -> true; _ -> false end end, @@ -569,7 +570,7 @@ main_process_loop(State) -> case get_beam_file(Module,BeamFile0,Compiled0) of {ok,BeamFile} -> {Reply,Compiled} = - case do_compile_beam(Module,BeamFile) of + case do_compile_beam(Module,BeamFile,[]) of {ok, Module} -> remote_load_compiled(State#main_state.nodes, [{Module,BeamFile}]), @@ -1227,13 +1228,13 @@ do_compile(File, UserOptions) -> Options = [debug_info,binary,report_errors,report_warnings] ++ UserOptions, case compile:file(File, Options) of {ok, Module, Binary} -> - do_compile_beam(Module,Binary); + do_compile_beam(Module,Binary,UserOptions); error -> error end. %% Beam is a binary or a .beam file name -do_compile_beam(Module,Beam) -> +do_compile_beam(Module,Beam,UserOptions) -> %% Clear database do_clear(Module), @@ -1253,7 +1254,7 @@ do_compile_beam(Module,Beam) -> %% Compile and load the result %% It's necessary to check the result of loading since it may %% fail, for example if Module resides in a sticky directory - {ok, Module, Binary} = compile:forms(Forms, []), + {ok, Module, Binary} = compile:forms(Forms, UserOptions), case code:load_binary(Module, ?TAG, Binary) of {module, Module} -> -- 1.7.0.4 Regards Tobias Schlager Am 17.09.2010 11:01, schrieb Bj?rn Gustavsson: > On Thu, Sep 16, 2010 at 9:56 AM, Tobias Schlager > wrote: >> I would like to propose a small patch of the cover.erl module. > > Please see > > http://github.com/erlang/otp/wiki/Submitting-patches > > and specially "Sending the patch". > > We do allow in-line patches, provided that they are generated > by "git format-patch" (or are formatted in the same way) and > that they are not white-space damaged by your email program > (allowing us to use "git am" to apply and commit them). > From tuncer.ayaz@REDACTED Fri Sep 17 16:16:33 2010 From: tuncer.ayaz@REDACTED (Tuncer Ayaz) Date: Fri, 17 Sep 2010 16:16:33 +0200 Subject: [erlang-patches] sendfile() In-Reply-To: References: Message-ID: 2010/9/17 Bj?rn Gustavsson: > 2010/9/15 Bj?rn Gustavsson: >> On Sun, Sep 12, 2010 at 2:00 AM, Tuncer Ayaz wrote: >>> >>> git fetch git://github.com/tuncer/otp.git sendfile >> >> Thanks! Included in 'pu'. > > We have not had time to review the patch, but here > is some feedback about build problems on three platforms. > Until the build problems are fixed, I will take the branch out of > 'pu'. Please refetch. From tuncer.ayaz@REDACTED Fri Sep 17 16:26:11 2010 From: tuncer.ayaz@REDACTED (Tuncer Ayaz) Date: Fri, 17 Sep 2010 16:26:11 +0200 Subject: [erlang-patches] patch: updated windows build documentation In-Reply-To: References: Message-ID: On Fri, Sep 17, 2010 at 12:51 PM, Dave Cottlehuber wrote: > This patch updates the Windows build docs, to note newer versions of > dependencies that work, & also how to compile with the free Microsoft > Visual Studio 2008 C++ Express compiler. > > - using latest VS2008 compiler & SDKs > - converting wxWidgets to compile with newer MS tools and via command > line instead of GUI > - latest tested version of OpenSSL + wxWidgets > > # On branch improved_INSTALL-W32.md > # Changes to be committed: > # (use "git reset HEAD ..." to unstage) > # > # modified: INSTALL-WIN32.md > > git fetch git://github.com/dch/otp.git improved_INSTALL-W32.md Did you forget to push the commit? From dizzyd@REDACTED Fri Sep 17 16:50:25 2010 From: dizzyd@REDACTED (Dave Smith) Date: Fri, 17 Sep 2010 08:50:25 -0600 Subject: [erlang-patches] rt/solaris-pty-handling-fixes and R14B In-Reply-To: References: Message-ID: Kenneth, On reflection, I think my confusion was around whether items accepted into pu would be included in the next release -- clearly, unless something has actually graduated the week before the release, it's unlikely to make it in. :) Anyways, thanks again for taking the time to answer. I appreciate the work and time you guys pour into reviewing patches and incrementally improving the VM. As I noted to one of my coworkers yesterday, only in the Erlang VM would I expect to see someone write their own RW locks, claim it's faster than pthread's and I would believe it. The dedication to quality and measurement is much appreciated. D. On Thu, Sep 16, 2010 at 8:58 AM, Kenneth Lundin wrote: > Hi Dave, > > Even though a patch is of minor magnitude like this one we have to review each > patch we take in. We handle the contributions as fast as we can and > have the system > divided into a number of functional areas with different > developers responsible for each. > Sometimes the review can be delayed because the responsible developer > has to prioritize other work, is on vacation (as in this case) etc. > > /Regards Kenneth, Erlang/OTP Ericsson > From dave@REDACTED Sat Sep 18 00:11:11 2010 From: dave@REDACTED (Dave Cottlehuber) Date: Sat, 18 Sep 2010 10:11:11 +1200 Subject: [erlang-patches] patch: updated windows build documentation In-Reply-To: References: Message-ID: On 18 September 2010 02:26, Tuncer Ayaz wrote: > On Fri, Sep 17, 2010 at 12:51 PM, Dave Cottlehuber wrote: >> This patch updates the Windows build docs, to note newer versions of >> dependencies that work, & also how to compile with the free Microsoft >> Visual Studio 2008 C++ Express compiler. >> >> - using latest VS2008 compiler & SDKs >> - converting wxWidgets to compile with newer MS tools and via command >> line instead of GUI >> - latest tested version of OpenSSL + wxWidgets >> >> # On branch improved_INSTALL-W32.md >> # Changes to be committed: >> # ? (use "git reset HEAD ..." to unstage) >> # >> # ? ? ? modified: ? INSTALL-WIN32.md >> >> git fetch git://github.com/dch/otp.git improved_INSTALL-W32.md > > Did you forget to push the commit? It's my first git & first commit so yes. Counting objects: 5, done. Delta compression using up to 2 threads. Compressing objects: 100% (3/3), done. Writing objects: 100% (3/3), 1.69 KiB, done. Total 3 (delta 2), reused 0 (delta 0) To git@REDACTED:dch/otp.git b915bb2..d509c68 improved_INSTALL-W32.md -> improved_INSTALL-W32.md hopefully this works now? cheers Dave From tuncer.ayaz@REDACTED Sat Sep 18 12:00:41 2010 From: tuncer.ayaz@REDACTED (Tuncer Ayaz) Date: Sat, 18 Sep 2010 12:00:41 +0200 Subject: [erlang-patches] patch: updated windows build documentation In-Reply-To: References: Message-ID: On Sat, Sep 18, 2010 at 12:11 AM, Dave Cottlehuber wrote: > On 18 September 2010 02:26, Tuncer Ayaz wrote: >> On Fri, Sep 17, 2010 at 12:51 PM, Dave Cottlehuber wrote: >>> This patch updates the Windows build docs, to note newer versions of >>> dependencies that work, & also how to compile with the free Microsoft >>> Visual Studio 2008 C++ Express compiler. >>> >>> - using latest VS2008 compiler & SDKs >>> - converting wxWidgets to compile with newer MS tools and via command >>> line instead of GUI >>> - latest tested version of OpenSSL + wxWidgets >>> >>> # On branch improved_INSTALL-W32.md >>> # Changes to be committed: >>> # (use "git reset HEAD ..." to unstage) >>> # >>> # modified: INSTALL-WIN32.md >>> >>> git fetch git://github.com/dch/otp.git improved_INSTALL-W32.md >> >> Did you forget to push the commit? > > It's my first git & first commit so yes. > > Counting objects: 5, done. > Delta compression using up to 2 threads. > Compressing objects: 100% (3/3), done. > Writing objects: 100% (3/3), 1.69 KiB, done. > Total 3 (delta 2), reused 0 (delta 0) > To git@REDACTED:dch/otp.git > b915bb2..d509c68 improved_INSTALL-W32.md -> improved_INSTALL-W32.md > > hopefully this works now? Yes it does. You should make sure to wrap/break the text at max 80 characters except maybe the long URLs. From dave@REDACTED Sun Sep 19 12:32:14 2010 From: dave@REDACTED (Dave Cottlehuber) Date: Sun, 19 Sep 2010 22:32:14 +1200 Subject: [erlang-patches] patch: updated windows build documentation In-Reply-To: References: Message-ID: This patch updates the Windows build docs, to note newer versions of dependencies that work, & also how to compile with the free Microsoft Visual Studio 2008 C++ Express compiler. - using latest free VS2008 compiler & SDK 7.0 - compiling wxWidgets to compile with newer MS tools via command line - latest tested versions of OpenSSL + wxWidgets git fetch git://github.com/dch/otp.git updated_INSTALL-WIN32.md I ended up scrapping the old branch both in remote & my repo, here's a new clean patch + 80 char wrapped. Thanks Tuncer for "gitting" it all sorted out. cheers Dave From steve@REDACTED Mon Sep 20 03:44:09 2010 From: steve@REDACTED (Steven Gravell) Date: Mon, 20 Sep 2010 02:44:09 +0100 Subject: [PATCH] fixes to release_handler with sync'd relup-ing on inet boot loaded slaves Message-ID: There are a number of places in release_handler.erl and release_handler_1.erl that assumed it's running on a locally booted (default -loader efile) system, so I've fixed those bits in the following linked changeset that you can fetch from the branch listed underneath. I have outlined the problem/fix in more detail at the bottom of this message along with some (hopefully) sensible steps to reproduce. http://github.com/mokele/otp/commit/2aed0fde939c828dd253f1d8582f98a124b38237 git fetch git://github.com/mokele/otp.git diskless_booted_relup_fix ======= FULL COMMIT MESSAGE ========= There were a couple of places in release_handler and release_handler_1 that assumed we had a disk to read from, which in the case of an erl_prim_loader Loader other than efile is not necessarily true. This change introduces three changes, one being the addition of check_paths/2 and the other two being the usage of get_vsn/1 and the adding of get_current_vsn/1 instead of doing beam_lib:version(code:which(Mod)). * check_paths/2 was added to do the equivalent of check_path/1 except for when we have some Masters and need to run it on one of them instead of the current node. * get_vsn is no longer sent a file path but instead is sent the Binary since beam_lib:version being given a string will check the local file system, which we can't do. * The change to not accessing the local filesystem lead to adding the loadedvsns field to eval_state that keeps track of the version that is currently loaded, which is in contrast to vsns and bins which may contain a different version from that which code:which(Mod) refers to. To check the equivalent of beam_lib:version(code:which(Mod)) - get_current_vsn(Mod) was introduced which checks loadedvsns and if it is not found will do the potentially arduous process of erl_prim_loader:get_file again to read the version (which load_vsn(Mod) does), I'm not entirely sure that this would ever happen, but added it for completeness ========= DESCRIPTION TO REPRODUCE ========= ** Master System (master@REDACTED) ** bin/ clients/slave1@REDACTED/bin/ clients/slave1@REDACTED/releases/1/ <- current permanent release clients/slave1@REDACTED/releases/2/ <- unpacked new release erts-5.7.5/ lib/myapp-1/ lib/myapp-2/ log/ releases/1/ <- current permanent release releases/2/ <- unpacked new release start with -name master@REDACTED -id master@REDACTED 1> erl_boot_server:start([{6,6,6,6}]). % with slave's ip here ** RELUP ** this line should appear in the relup file for release version "2" that is unpacked in both releases/2/ paths above. With the attached patch this will cause slave1 to hang, then you can set_unpacked (or just unpack if it isn't already) on the master which will successfully cause slave1 to finish the sync once it too reaches this point. {sync_nodes,boot_server,[master@REDACTED,slave1@REDACTED]} ** Slave System (slave1@REDACTED) ** boot from master by ip address with with flag -host and the following config [{sasl, [ {masters, [master@REDACTED]}, {client_directory, "/path/to/your/target_system/clients/slave1@REDACTED "}, {releases_dir, "/path/to/your/target_system/clients/slave1@REDACTED /releases/"} ]}]. The important thing to realise here is that slave *has* to be on a different machine *without* the directory structure listed above since these paths above refer to the boot system and *not* the local file system slave1 is on; it might not even have one. So the sys.config above is located on master at /path/to/your/target_system/clients/slave1@REDACTED/releases/1/sys.config and start the slave... Note the varying directory structure to bin/erl since we're again making sure we're on a different machine that definitely doesn't have the code for your new release on it, or else things will just go smoothly since it'll read the local files, which is not what we want. (where 9.9.9.9 is the ip of the master) $ /path/to/slave1/target_system/bin/erl \ -name slave1@REDACTED -id slave1@REDACTED \ -loader inet \ -hosts 9.9.9.9 -boot /path/to/your/target_system/clients/slave1@REDACTED/releases/1/ \ -config /path/to/your/target_system/clients/slave1@REDACTED/releases/1/ 1> RelFile = "/path/to/your/target_system/clients/slave1@REDACTED /releases/2/myrelease.rel". 2> AppDirs = [{myapp,"2", "/path/to/your/target_system/lib/"}]. 3> release_handler:set_unpacked(RelFile, AppDirs). *{error,{no_such_directory,"/path/to/your/target_system/lib/myapp-2"}}* this occurs due to check_path/1 not having a version that checks on the Masters list in release_handler.erl Secondly after fixing that we reach a different problem: 3> release_handler:set_unpacked(RelFile, AppDirs). {ok, "2"} 4> release_handler:install_release("2"). *{error,{'EXIT',{{badmatch,{error,beam_lib,{file_error,"/path/to/your/target_system/lib/myapp-2/ebin/myapp.beam", enoent}}}, ...* this occurs due to the beam_lib:version(File) call in get_vsn/1 in release_handler_1.erl due to File being a file path that does not exist locally on slave1 Well that's it. After all this writing and debugging I hope I'm not simply being naive and misunderstood something along the way O_O /Steven Gravell http://mokele.co.uk/ From steve@REDACTED Mon Sep 20 05:20:55 2010 From: steve@REDACTED (Steven Gravell) Date: Mon, 20 Sep 2010 04:20:55 +0100 Subject: [PATCH] fixes to release_handler with sync'd relup-ing on inet boot loaded slaves In-Reply-To: References: Message-ID: the slave starting part of the example should have been this $ /path/to/slave1/target_system/bin/erl \ -name slave1 ? hostname2 -id slave1 ? hostname2 \ -loader inet \ -hosts 9.9.9.9 \ -boot /path/to/your/target_system/clients/slave1 ? hostname2/releases/1/*start* \ -config /path/to/your/target_system/clients/slave1 ? hostname2/releases/1/*sys* From steve@REDACTED Mon Sep 20 12:05:22 2010 From: steve@REDACTED (Steven Gravell) Date: Mon, 20 Sep 2010 11:05:22 +0100 Subject: [PATCH] fixes to release_handler with sync'd relup-ing on inet boot loaded slaves In-Reply-To: References: Message-ID: On 20 September 2010 02:44, Steven Gravell wrote: > There are a number of places in release_handler.erl and > release_handler_1.erl that assumed it's running on a locally booted (default > -loader efile) system, so I've fixed those bits in the following linked > changeset that you can fetch from the branch listed underneath. > > I have outlined the problem/fix in more detail at the bottom of this > message along with some (hopefully) sensible steps to reproduce. > > > http://github.com/mokele/otp/commit/2aed0fde939c828dd253f1d8582f98a124b38237 > > git fetch git://github.com/mokele/otp.git diskless_booted_relup_fix > > > ======= FULL COMMIT MESSAGE ========= > > There were a couple of places in release_handler and release_handler_1 that > assumed we had a disk to read from, which in the case of an erl_prim_loader > Loader other than efile is not necessarily true. > > This change introduces three changes, one being the addition of > check_paths/2 and the other two being the usage of get_vsn/1 and the adding > of get_current_vsn/1 instead of doing beam_lib:version(code:which(Mod)). > > * check_paths/2 was added to do the equivalent of check_path/1 except for > when we have some Masters and need to run it on one of them instead of the > current node. > > * get_vsn is no longer sent a file path but instead is sent the Binary > since beam_lib:version being given a string will check the local file > system, which we can't do. > > * The change to not accessing the local filesystem lead to adding the > loadedvsns field to eval_state that keeps track of the version that is > currently loaded, which is in contrast to vsns and bins which may contain a > different version from that which code:which(Mod) refers to. To check the > equivalent of beam_lib:version(code:which(Mod)) - get_current_vsn(Mod) was > introduced which checks loadedvsns and if it is not found will do the > potentially arduous process of erl_prim_loader:get_file again to read the > version (which load_vsn(Mod) does), I'm not entirely sure that this would > ever happen, but added it for completeness > > > ========= DESCRIPTION TO REPRODUCE ========= > > ** Master System (master@REDACTED) ** > bin/ > clients/slave1@REDACTED/bin/ > clients/slave1@REDACTED/releases/1/ <- current permanent release > clients/slave1@REDACTED/releases/2/ <- unpacked new release > erts-5.7.5/ > lib/myapp-1/ > lib/myapp-2/ > log/ > releases/1/ <- current permanent release > releases/2/ <- unpacked new release > > start with -name master@REDACTED -id master@REDACTED > 1> erl_boot_server:start([{6,6,6,6}]). % with slave's ip here > > ** RELUP ** > this line should appear in the relup file for release version "2" that is > unpacked in both releases/2/ paths above. With the attached patch this will > cause slave1 to hang, then you can set_unpacked (or just unpack if it isn't > already) on the master which will successfully cause slave1 to finish the > sync once it too reaches this point. > {sync_nodes,boot_server,[master@REDACTED,slave1@REDACTED]} > > ** Slave System (slave1@REDACTED) ** > boot from master by ip address with with flag -host and the following > config > [{sasl, [ > {masters, [master@REDACTED]}, > {client_directory, > "/path/to/your/target_system/clients/slave1@REDACTED"}, > {releases_dir, "/path/to/your/target_system/clients/slave1@REDACTED > /releases/"} > ]}]. > The important thing to realise here is that slave *has* to be on a > different machine *without* the directory structure listed above since these > paths above refer to the boot system and *not* the local file system slave1 > is on; it might not even have one. So the sys.config above is located on > master at /path/to/your/target_system/clients/slave1@REDACTED > /releases/1/sys.config > > and start the slave... Note the varying directory structure to bin/erl > since we're again making sure we're on a different machine that definitely > doesn't have the code for your new release on it, or else things will just > go smoothly since it'll read the local files, which is not what we want. > (where 9.9.9.9 is the ip of the master) > $ /path/to/slave1/target_system/bin/erl \ > -name slave1@REDACTED -id slave1@REDACTED \ > -loader inet \ > -hosts 9.9.9.9 > -boot /path/to/your/target_system/clients/slave1@REDACTED/releases/1/ > \ > -config /path/to/your/target_system/clients/slave1@REDACTED > /releases/1/ > > 1> RelFile = "/path/to/your/target_system/clients/slave1@REDACTED > /releases/2/myrelease.rel". > 2> AppDirs = [{myapp,"2", "/path/to/your/target_system/lib/"}]. > 3> release_handler:set_unpacked(RelFile, AppDirs). > *{error,{no_such_directory,"/path/to/your/target_system/lib/myapp-2"}}* > > this occurs due to check_path/1 not having a version that checks on the > Masters list in release_handler.erl > > Secondly after fixing that we reach a different problem: > 3> release_handler:set_unpacked(RelFile, AppDirs). > {ok, "2"} > 4> release_handler:install_release("2"). > *{error,{'EXIT',{{badmatch,{error,beam_lib,{file_error,"/path/to/your/target_system/lib/myapp-2/ebin/myapp.beam", > enoent}}}, ...* > > this occurs due to the beam_lib:version(File) call in get_vsn/1 in > release_handler_1.erl due to File being a file path that does not exist > locally on slave1 > > > Well that's it. After all this writing and debugging I hope I'm not simply > being naive and misunderstood something along the way O_O > > > /Steven Gravell > http://mokele.co.uk/ > plus... after sleeping on it I realised I'd missed off the setcookie in the example above... but I guess that should have gone without saying /steve http://mokele.co.uk/ From vladdu55@REDACTED Mon Sep 20 15:00:17 2010 From: vladdu55@REDACTED (Vlad Dumitrescu) Date: Mon, 20 Sep 2010 15:00:17 +0200 Subject: [jinterface] added OtpMbox.hash() Message-ID: Hi, The OtpMbox class was missing the hash() method while overriding equals(). This can cause problems when when using jinterface in a larger Java application, for which there are currently no tests in OTP. The fix is straightforward, if a test is required please let me know. git fetch git://github.com/vladdu/otp.git otpmbox_hash best regards, Vlad From bgustavsson@REDACTED Mon Sep 20 15:29:31 2010 From: bgustavsson@REDACTED (=?UTF-8?Q?Bj=C3=B6rn_Gustavsson?=) Date: Mon, 20 Sep 2010 15:29:31 +0200 Subject: [erlang-patches] [PATCH] fixes to release_handler with sync'd relup-ing on inet boot loaded slaves In-Reply-To: References: Message-ID: On Mon, Sep 20, 2010 at 3:44 AM, Steven Gravell wrote: > There are a number of places in release_handler.erl and > release_handler_1.erl that assumed it's running on a locally booted (default > -loader efile) system, so I've fixed those bits in the following linked > changeset that you can fetch from the branch listed underneath. > > I have outlined the problem/fix in more detail at the bottom of this message > along with some (hopefully) sensible steps to reproduce. > > http://github.com/mokele/otp/commit/2aed0fde939c828dd253f1d8582f98a124b38237 > > git fetch git://github.com/mokele/otp.git diskless_booted_relup_fix > Thanks! The commit message is unreadable in both gitk and at github. Please read the guidelines for writing good commit messages: http://github.com/erlang/otp/wiki/Writing-good-commit-messages -- Bj?rn Gustavsson, Erlang/OTP, Ericsson AB From steve@REDACTED Mon Sep 20 15:46:13 2010 From: steve@REDACTED (Steven Gravell) Date: Mon, 20 Sep 2010 14:46:13 +0100 Subject: [erlang-patches] [PATCH] fixes to release_handler with sync'd relup-ing on inet boot loaded slaves In-Reply-To: References: Message-ID: 2010/9/20 Bj?rn Gustavsson > On Mon, Sep 20, 2010 at 3:44 AM, Steven Gravell > wrote: > > There are a number of places in release_handler.erl and > > release_handler_1.erl that assumed it's running on a locally booted > (default > > -loader efile) system, so I've fixed those bits in the following linked > > changeset that you can fetch from the branch listed underneath. > > > > I have outlined the problem/fix in more detail at the bottom of this > message > > along with some (hopefully) sensible steps to reproduce. > > > > > http://github.com/mokele/otp/commit/2aed0fde939c828dd253f1d8582f98a124b38237 > > > > git fetch git://github.com/mokele/otp.git diskless_booted_relup_fix > > > > Thanks! > > The commit message is unreadable in both gitk > and at github. Please read the guidelines for > writing good commit messages: > > http://github.com/erlang/otp/wiki/Writing-good-commit-messages > > -- > Bj?rn Gustavsson, Erlang/OTP, Ericsson AB > k, missed that page and the patch submit process was the only thing I needed to read. Will --amend it now and get back to you. /steve http://mokele.co.uk/ From bgustavsson@REDACTED Mon Sep 20 15:51:28 2010 From: bgustavsson@REDACTED (=?UTF-8?Q?Bj=C3=B6rn_Gustavsson?=) Date: Mon, 20 Sep 2010 15:51:28 +0200 Subject: [erlang-patches] [jinterface] added OtpMbox.hash() In-Reply-To: References: Message-ID: On Mon, Sep 20, 2010 at 3:00 PM, Vlad Dumitrescu wrote: > The OtpMbox class was missing the hash() method while overriding > equals(). This can cause problems when when using jinterface in a > larger Java application, for which there are currently no tests in > OTP. The motivation given above is much more useful if it is included in the commit message. See: http://github.com/erlang/otp/wiki/Writing-good-commit-messages > The fix is straightforward, if a test is required please let me > know. The reviewer will have to decide whether a test case is needed or not. Including a test with a bug fix will certainly increase the probability that we will include it. -- Bj?rn Gustavsson, Erlang/OTP, Ericsson AB From bgustavsson@REDACTED Mon Sep 20 16:00:38 2010 From: bgustavsson@REDACTED (=?UTF-8?Q?Bj=C3=B6rn_Gustavsson?=) Date: Mon, 20 Sep 2010 16:00:38 +0200 Subject: [erlang-patches] Re: [PATCH] allow user specified compiler options in cover.erl In-Reply-To: <4C936B87.7020405@lindenbaum.eu> References: <4C91CD9D.5070408@lindenbaum.eu> <4C936B87.7020405@lindenbaum.eu> Message-ID: On Fri, Sep 17, 2010 at 3:22 PM, Tobias Schlager wrote: > Sorry for that, here's the patch from git format-patch > Thanks, but I was unable to apply the patch. It seems to be white-spaced damaged. Therefore, I recommend that you push the branch to your public git repository so that I can pull it. Also, I recommend that you include the motivation part of your original email into the commit message. See: http://github.com/erlang/otp/wiki/Writing-good-commit-messages -- Bj?rn Gustavsson, Erlang/OTP, Ericsson AB From bgustavsson@REDACTED Mon Sep 20 16:04:27 2010 From: bgustavsson@REDACTED (=?UTF-8?Q?Bj=C3=B6rn_Gustavsson?=) Date: Mon, 20 Sep 2010 16:04:27 +0200 Subject: [erlang-patches] patch: updated windows build documentation In-Reply-To: References: Message-ID: On Sun, Sep 19, 2010 at 12:32 PM, Dave Cottlehuber wrote: > git fetch git://github.com/dch/otp.git updated_INSTALL-WIN32.md > Thanks! Will include in pu. -- Bj?rn Gustavsson, Erlang/OTP, Ericsson AB From vladdu55@REDACTED Mon Sep 20 16:10:58 2010 From: vladdu55@REDACTED (Vlad Dumitrescu) Date: Mon, 20 Sep 2010 16:10:58 +0200 Subject: [erlang-patches] [jinterface] added OtpMbox.hash() In-Reply-To: References: Message-ID: 2010/9/20 Bj?rn Gustavsson : > On Mon, Sep 20, 2010 at 3:00 PM, Vlad Dumitrescu wrote: >> The OtpMbox class was missing the hash() method while overriding >> equals(). This can cause problems when when using jinterface in a >> larger Java application, for which there are currently no tests in >> OTP. > > The motivation given above is much more useful > if it is included in the commit message. See: Fixed. sorry about that. >> The fix is straightforward, if a test is required please let me >> know. > > The reviewer will have to decide whether a test case is > needed or not. Including a test with a bug fix will certainly > increase the probability that we will include it. Yes, I know, but in this case one has to start a Java application from the OTP test suite, and handle that as a normal test case. I'm not sure how the setup would have to be configured so that it works -- for just this fix it's overkill, but if you think that testing jinterface from the Java side is something that you will want to do, then it is worth spending some effort on that. I am happily available to discuss details. Maybe this can be handled outside the Erlang suite, with a separate Java suite (the question is then if it's required to merge the results into a single report). regards, Vlad From steve@REDACTED Mon Sep 20 16:13:30 2010 From: steve@REDACTED (Steven Gravell) Date: Mon, 20 Sep 2010 15:13:30 +0100 Subject: [erlang-patches] [PATCH] fixes to release_handler with sync'd relup-ing on inet boot loaded slaves In-Reply-To: References: Message-ID: I hope this is better, cheers http://github.com/mokele/otp/commit/f73018ab6ccbec613aaeea5942146ca50d82702b /Steven Gravell http://mokele.co.uk/ 2010/9/20 Bj?rn Gustavsson > On Mon, Sep 20, 2010 at 3:44 AM, Steven Gravell > wrote: > > There are a number of places in release_handler.erl and > > release_handler_1.erl that assumed it's running on a locally booted > (default > > -loader efile) system, so I've fixed those bits in the following linked > > changeset that you can fetch from the branch listed underneath. > > > > I have outlined the problem/fix in more detail at the bottom of this > message > > along with some (hopefully) sensible steps to reproduce. > > > > > http://github.com/mokele/otp/commit/2aed0fde939c828dd253f1d8582f98a124b38237 > > > > git fetch git://github.com/mokele/otp.git diskless_booted_relup_fix > > > > Thanks! > > The commit message is unreadable in both gitk > and at github. Please read the guidelines for > writing good commit messages: > > http://github.com/erlang/otp/wiki/Writing-good-commit-messages > > -- > Bj?rn Gustavsson, Erlang/OTP, Ericsson AB > From bgustavsson@REDACTED Mon Sep 20 16:27:55 2010 From: bgustavsson@REDACTED (=?UTF-8?Q?Bj=C3=B6rn_Gustavsson?=) Date: Mon, 20 Sep 2010 16:27:55 +0200 Subject: [erlang-patches] [jinterface] added OtpMbox.hash() In-Reply-To: References: Message-ID: 2010/9/20 Vlad Dumitrescu : > 2010/9/20 Bj?rn Gustavsson : >> On Mon, Sep 20, 2010 at 3:00 PM, Vlad Dumitrescu wrote: >>> The OtpMbox class was missing the hash() method while overriding >>> equals(). This can cause problems when when using jinterface in a >>> larger Java application, for which there are currently no tests in >>> OTP. >> >> The motivation given above is much more useful >> if it is included in the commit message. See: > > Fixed. sorry about that. Thanks! Now included in 'pu'. > >>> The fix is straightforward, if a test is required please let me >>> know. >> >> The reviewer will have to decide whether a test case is >> needed or not. Including a test with a bug fix will certainly >> increase the probability that we will include it. > > Yes, I know, but in this case one has to start a Java application from > the OTP test suite, and handle that as a normal test case. I'm not > sure how the setup would have to be configured so that it works -- for > just this fix it's overkill, but if you think that testing jinterface > from the Java side is something that you will want to do, then it is > worth spending some effort on that. I am happily available to discuss > details. Maybe this can be handled outside the Erlang suite, with a > separate Java suite (the question is then if it's required to merge > the results into a single report). Yes, I agree that it might be overkill in this case, but I will let the reviewer decide. We sometimes do include bug fixes without a test case. It all depends on the difficulty in writing a test case, the seriousness of the bug and the probability of the bug fix being correct and not likely to easily stop working in the future. -- Bj?rn Gustavsson, Erlang/OTP, Ericsson AB From raimo+erlang-patches@REDACTED Mon Sep 20 17:10:58 2010 From: raimo+erlang-patches@REDACTED (Raimo Niskanen) Date: Mon, 20 Sep 2010 17:10:58 +0200 Subject: [erlang-patches] [jinterface] added OtpMbox.hash() In-Reply-To: References: Message-ID: <20100920151058.GA17412@erix.ericsson.se> On Mon, Sep 20, 2010 at 03:00:17PM +0200, Vlad Dumitrescu wrote: > Hi, > > The OtpMbox class was missing the hash() method while overriding > equals(). This can cause problems when when using jinterface in a > larger Java application, for which there are currently no tests in > OTP. The fix is straightforward, if a test is required please let me > know. > > git fetch git://github.com/vladdu/otp.git otpmbox_hash Excuse me for a maybe stupid question... Why is it necessary? Calling self.hashCode() from a class inheriting from Object should be done through inheritance without the patch. Is there some tool complaining if both are not overridden even if the result is correct (or is it not?), or have have the rules changed since the old days, or am I missing something?... > > best regards, > Vlad > > ________________________________________________________________ > erlang-patches (at) erlang.org mailing list. > See http://www.erlang.org/faq.html > To unsubscribe; mailto:erlang-patches-unsubscribe@REDACTED -- / Raimo Niskanen, Erlang/OTP, Ericsson AB From vladdu55@REDACTED Mon Sep 20 19:11:51 2010 From: vladdu55@REDACTED (Vlad Dumitrescu) Date: Mon, 20 Sep 2010 19:11:51 +0200 Subject: [erlang-patches] [jinterface] added OtpMbox.hash() In-Reply-To: <20100920151058.GA17412@erix.ericsson.se> References: <20100920151058.GA17412@erix.ericsson.se> Message-ID: On Mon, Sep 20, 2010 at 17:10, Raimo Niskanen wrote: > Excuse me for a maybe stupid question... > > Why is it necessary? > > Calling self.hashCode() from a class inheriting from Object > should be done through inheritance without the patch. > > Is there some tool complaining if both are not overridden > even if the result is correct (or is it not?), or have > have the rules changed since the old days, or am > I missing something?... Not a stupid question, but almost every static analysis tool complains about this. In any case, the patch calls self.hash(), not super.hash(). Whatever is compared in equals() should be included when computing the hash. best regards, Vlad From raimo+erlang-patches@REDACTED Tue Sep 21 11:51:20 2010 From: raimo+erlang-patches@REDACTED (Raimo Niskanen) Date: Tue, 21 Sep 2010 11:51:20 +0200 Subject: [erlang-patches] [jinterface] added OtpMbox.hash() In-Reply-To: References: <20100920151058.GA17412@erix.ericsson.se> Message-ID: <20100921095120.GA19221@erix.ericsson.se> On Mon, Sep 20, 2010 at 07:11:51PM +0200, Vlad Dumitrescu wrote: > On Mon, Sep 20, 2010 at 17:10, Raimo Niskanen > wrote: > > Excuse me for a maybe stupid question... > > > > Why is it necessary? > > > > Calling self.hashCode() from a class inheriting from Object > > should be done through inheritance without the patch. > > > > Is there some tool complaining if both are not overridden > > even if the result is correct (or is it not?), or have > > have the rules changed since the old days, or am > > I missing something?... > > Not a stupid question, but almost every static analysis tool complains > about this. > > In any case, the patch calls self.hash(), not super.hash(). Whatever > is compared in equals() should be included when computing the hash. Thank you, now I see the light! I have been programming Erlang too long and mistook 'self' with 'this'... So the current inherited hashCode() function is incorrect in calling super.hashCode(). We will take the patch as it is, a test case seems to be not worth the trouble. > > best regards, > Vlad > > ________________________________________________________________ > erlang-patches (at) erlang.org mailing list. > See http://www.erlang.org/faq.html > To unsubscribe; mailto:erlang-patches-unsubscribe@REDACTED -- / Raimo Niskanen, Erlang/OTP, Ericsson AB From bgustavsson@REDACTED Tue Sep 21 14:05:12 2010 From: bgustavsson@REDACTED (=?UTF-8?Q?Bj=C3=B6rn_Gustavsson?=) Date: Tue, 21 Sep 2010 14:05:12 +0200 Subject: [erlang-patches] [PATCH] fixes to release_handler with sync'd relup-ing on inet boot loaded slaves In-Reply-To: References: Message-ID: 2010/9/20 Steven Gravell : > I hope this is better, cheers Thanks! Included in pu. -- Bj?rn Gustavsson, Erlang/OTP, Ericsson AB From tuncer.ayaz@REDACTED Wed Sep 22 12:03:55 2010 From: tuncer.ayaz@REDACTED (Tuncer Ayaz) Date: Wed, 22 Sep 2010 12:03:55 +0200 Subject: [PATCH] ssh: ensure ~/.ssh exists In-Reply-To: References: Message-ID: <1285149835-14913-1-git-send-email-tuncer.ayaz@gmail.com> Make sure that ~/.ssh exists before trying to open files like ~/.ssh/known_hosts. Reported-By: Daniel Goertzen --- lib/ssh/src/ssh_file.erl | 18 ++++++++++++++++-- 1 files changed, 16 insertions(+), 2 deletions(-) diff --git a/lib/ssh/src/ssh_file.erl b/lib/ssh/src/ssh_file.erl index 5572349..8eb22e8 100755 --- a/lib/ssh/src/ssh_file.erl +++ b/lib/ssh/src/ssh_file.erl @@ -27,6 +27,8 @@ -include("PKCS-1.hrl"). -include("DSS.hrl"). +-include_lib("kernel/include/file.hrl"). + -export([public_host_dsa_key/2,private_host_dsa_key/2, public_host_rsa_key/2,private_host_rsa_key/2, public_host_key/2,private_host_key/2, @@ -43,6 +45,9 @@ -define(DBG_PATHS, true). +-define(PERM_700, 8#700). +-define(PERM_644, 8#644). + %% API public_host_dsa_key(Type, Opts) -> File = file_name(Type, "ssh_host_dsa_key.pub", Opts), @@ -113,8 +118,10 @@ do_lookup_host_key(Host, Alg, Opts) -> add_host_key(Host, Key, Opts) -> Host1 = add_ip(replace_localhost(Host)), - case file:open(file_name(user, "known_hosts", Opts),[write,append]) of + KnownHosts = file_name(user, "known_hosts", Opts), + case file:open(KnownHosts, [write,append]) of {ok, Fd} -> + ok = chmod(KnownHosts, ?PERM_644), Res = add_key_fd(Fd, Host1, Key), file:close(Fd), Res; @@ -527,4 +534,11 @@ file_name(Type, Name, Opts) -> default_user_dir()-> {ok,[[Home|_]]} = init:get_argument(home), - filename:join(Home, ".ssh"). + UserDir = filename:join(Home, ".ssh"), + ok = filelib:ensure_dir(filename:join(UserDir, "dummy")), + ok = chmod(UserDir, ?PERM_700), + UserDir. + +chmod(Path, Perms) -> + {ok, FileInfo} = file:read_file_info(Path), + ok = file:write_file_info(Path, FileInfo#file_info{mode=Perms}). From tuncer.ayaz@REDACTED Wed Sep 22 12:10:16 2010 From: tuncer.ayaz@REDACTED (Tuncer Ayaz) Date: Wed, 22 Sep 2010 12:10:16 +0200 Subject: [PATCH] ssh: ensure ~/.ssh exists In-Reply-To: <1285149835-14913-1-git-send-email-tuncer.ayaz@gmail.com> References: <1285149835-14913-1-git-send-email-tuncer.ayaz@gmail.com> Message-ID: On Wed, Sep 22, 2010 at 12:03 PM, Tuncer Ayaz wrote: > +-define(PERM_700, 8#700). > +-define(PERM_644, 8#644). Only change to previous patch is that I removed the zero-padding from the file modes. > ?%% API > ?public_host_dsa_key(Type, Opts) -> > ? ? File = file_name(Type, "ssh_host_dsa_key.pub", Opts), > @@ -113,8 +118,10 @@ do_lookup_host_key(Host, Alg, Opts) -> > > ?add_host_key(Host, Key, Opts) -> > ? ? Host1 = add_ip(replace_localhost(Host)), > - ? ?case file:open(file_name(user, "known_hosts", Opts),[write,append]) of > + ? ?KnownHosts = file_name(user, "known_hosts", Opts), > + ? ?case file:open(KnownHosts, [write,append]) of > ? ? ? ?{ok, Fd} -> > + ? ? ? ? ? ok = chmod(KnownHosts, ?PERM_644), Let's not forget that I'm not sure that explicitly setting ~/.ssh/known_hosts's file mode to 644 is needed at all. From tuncer.ayaz@REDACTED Wed Sep 22 12:14:55 2010 From: tuncer.ayaz@REDACTED (Tuncer Ayaz) Date: Wed, 22 Sep 2010 12:14:55 +0200 Subject: [PATCH] ssh: ensure ~/.ssh exists In-Reply-To: References: <1285149835-14913-1-git-send-email-tuncer.ayaz@gmail.com> Message-ID: The atch is also available via git fetch git://github.com/tuncer/otp.git ssh-ensure-userdir From dangud@REDACTED Wed Sep 22 15:09:05 2010 From: dangud@REDACTED (Dan Gudmundsson) Date: Wed, 22 Sep 2010 15:09:05 +0200 Subject: [erlang-patches] Fix syntax highlighting of $ in Emacs In-Reply-To: References: <8462y7yt9j.fsf@linux-b2a3.site> Message-ID: Hi I tested this, with test.erl included in the emacs directory. It looks much better, but after an Erlang/indent-buffer (from menu) it is broken, see color coding at line 213 and below. The original version doesn't behave that way, please fix. Tested with emacs version 23.2.1 /Dan 2010/9/17 Bj?rn Gustavsson : > On Wed, Sep 15, 2010 at 4:29 PM, Magnus Henoch > wrote: >> This patch fixes Emacs syntax highlighting of the dollar sign in two >> cases, namely for strings ending with a dollar sign and an escaped >> double quote as a character constant: >> >> -vsn("$Revision: 42 $"). >> >> foo() -> >> ? ?$\". >> >> These combinations used to cause the syntax highlighter to believe that >> the following code is part of a string. >> >> git fetch git://github.com/legoscia/otp.git dollar_font_lock > > Thanks! Will include in 'pu'. > > -- > Bj?rn Gustavsson, Erlang/OTP, Ericsson AB > > ________________________________________________________________ > erlang-patches (at) erlang.org mailing list. > See http://www.erlang.org/faq.html > To unsubscribe; mailto:erlang-patches-unsubscribe@REDACTED > > From pguyot@REDACTED Wed Sep 22 15:38:25 2010 From: pguyot@REDACTED (pguyot@REDACTED) Date: Wed, 22 Sep 2010 15:38:25 +0200 Subject: [PATCH] Fix hang when calling functions in a module with an on_load attribute from a native module Message-ID: <1285162705-5320-1-git-send-email-pguyot@kallisys.net> From: Paul Guyot The fix consists in adding a new opcode for hipe stub calls that is used to replace the call to error_handler:undefined_function/3. This stub directly calls the function: there is no need to go through error_handler:undefined_function/3 once we know the module is loaded, and, more importantly, when error_handler module itself was natively compiled (with native code loaded), the emulator did loop infinitely. The fix also comes with a non-regression test that will prevent this bug to reappear again. --- erts/emulator/beam/beam_bif_load.c | 9 ++++- erts/emulator/beam/beam_emu.c | 18 ++++++++++ erts/emulator/beam/beam_load.h | 1 + erts/emulator/beam/export.h | 7 ++-- erts/emulator/test/Makefile | 1 + erts/emulator/test/hipe_SUITE.erl | 35 ++++++++++++++++++++ erts/emulator/test/hipe_SUITE_data/beam_callee.erl | 10 ++++++ .../test/hipe_SUITE_data/native_caller.erl | 9 +++++ 8 files changed, 86 insertions(+), 4 deletions(-) create mode 100644 erts/emulator/test/hipe_SUITE.erl create mode 100644 erts/emulator/test/hipe_SUITE_data/beam_callee.erl create mode 100644 erts/emulator/test/hipe_SUITE_data/native_caller.erl diff --git a/erts/emulator/beam/beam_bif_load.c b/erts/emulator/beam/beam_bif_load.c index 6ae9736..72864dd 100644 --- a/erts/emulator/beam/beam_bif_load.c +++ b/erts/emulator/beam/beam_bif_load.c @@ -336,8 +336,15 @@ BIF_RETTYPE finish_after_on_load_2(BIF_ALIST_2) if (ep != NULL && ep->code[0] == BIF_ARG_1 && ep->code[4] != 0) { + /* the fixed address is in ep->code[4], see final_touch in beam_load */ ep->address = (void *) ep->code[4]; - ep->code[4] = 0; + /* any hipe stub to this function points to ep->code[3], which in turn + currently is em_call_error_handler -- to load the module through + error_handler:undefined_function/3. Since the function is + loaded, we can jump to it directly with em_call_from_hipe_stub, and + this would actually prevent any infinite loop if error_handler is + actually natively compiled. */ + ep->code[3] = em_call_from_hipe_stub; } } modp->code[MI_ON_LOAD_FUNCTION_PTR] = 0; diff --git a/erts/emulator/beam/beam_emu.c b/erts/emulator/beam/beam_emu.c index 8a0e12d..73b9ebb 100644 --- a/erts/emulator/beam/beam_emu.c +++ b/erts/emulator/beam/beam_emu.c @@ -221,6 +221,7 @@ BeamInstr beam_continue_exit[1]; BeamInstr* em_call_error_handler; BeamInstr* em_apply_bif; BeamInstr* em_call_traced_function; +BeamInstr* em_call_from_hipe_stub; /* NOTE These should be the only variables containing trace instructions. @@ -3043,6 +3044,22 @@ void process_main(void) goto post_error_handling; } + /* + * At this point, I points to the code[3] in the export entry for + * a loaded function with a hipe stub. + * + * code[0]: Module + * code[1]: Function + * code[2]: Arity + * code[3]: &&call_from_hipe_stub + * code[4]: Address of function. + */ + OpCase(call_from_hipe_stub): { + /* We might want to fix the stub (?) to earn few cycles */ + SET_I((BeamInstr *)Arg(0)); + Goto(*I); + } + OpCase(call_error_handler): /* * At this point, I points to the code[3] in the export entry for @@ -5034,6 +5051,7 @@ apply_bif_or_nif_epilogue: em_call_error_handler = OpCode(call_error_handler); em_call_traced_function = OpCode(call_traced_function); em_apply_bif = OpCode(apply_bif); + em_call_from_hipe_stub = OpCode(call_from_hipe_stub); beam_apply[0] = (BeamInstr) OpCode(i_apply); beam_apply[1] = (BeamInstr) OpCode(normal_exit); diff --git a/erts/emulator/beam/beam_load.h b/erts/emulator/beam/beam_load.h index 26e3054..373d242 100644 --- a/erts/emulator/beam/beam_load.h +++ b/erts/emulator/beam/beam_load.h @@ -48,6 +48,7 @@ extern BeamInstr beam_debug_apply[]; extern BeamInstr* em_call_error_handler; extern BeamInstr* em_apply_bif; extern BeamInstr* em_call_traced_function; +extern BeamInstr* em_call_from_hipe_stub; typedef struct { BeamInstr* start; /* Pointer to start of module. */ BeamInstr* end; /* Points one word beyond last function in module. */ diff --git a/erts/emulator/beam/export.h b/erts/emulator/beam/export.h index c604fdf..b472eb7 100644 --- a/erts/emulator/beam/export.h +++ b/erts/emulator/beam/export.h @@ -45,11 +45,12 @@ typedef struct export * code[3]: This entry is 0 unless the 'address' field points to it. * Threaded code instruction to load function * (em_call_error_handler), execute BIF (em_apply_bif, - * em_apply_apply), or call a traced function - * (em_call_traced_function). + * em_apply_apply), call a traced function + * (em_call_traced_function) or call a loaded function (for hipe stub + * of on_load modules). * code[4]: Function pointer to BIF function (for BIFs only) * or pointer to threaded code if the module has an - * on_load function that has not been run yet. + * on_load function. * Otherwise: 0. */ BeamInstr code[5]; diff --git a/erts/emulator/test/Makefile b/erts/emulator/test/Makefile index a4c02da..c52d0d5 100644 --- a/erts/emulator/test/Makefile +++ b/erts/emulator/test/Makefile @@ -66,6 +66,7 @@ MODULES= \ guard_SUITE \ hash_SUITE \ hibernate_SUITE \ + hipe_SUITE \ list_bif_SUITE \ match_spec_SUITE \ module_info_SUITE \ diff --git a/erts/emulator/test/hipe_SUITE.erl b/erts/emulator/test/hipe_SUITE.erl new file mode 100644 index 0000000..66e9c1c --- /dev/null +++ b/erts/emulator/test/hipe_SUITE.erl @@ -0,0 +1,35 @@ +-module(hipe_SUITE). + +-include("test_server.hrl"). + +-export([all/1,call_beam_module_with_on_load/1]). + +all(suite) -> + [call_beam_module_with_on_load]. + +call_beam_module_with_on_load(suite) -> + []; +call_beam_module_with_on_load(doc) -> + ["Test that we can call a non-native module with a on_load from a native module"]; +call_beam_module_with_on_load(Config) when is_list(Config) -> + ?line DataDir = ?config(data_dir, Config), + ?line CallerModule = filename:join(DataDir, "native_caller.erl"), + ?line CalleeModule = filename:join(DataDir, "beam_callee.erl"), + ?line PrivDir = ?config(priv_dir, Config), + test_call_with_on_load(PrivDir, CallerModule, CalleeModule). + +test_call_with_on_load(PrivDir, CallerModule, CalleeModule) -> + % Compile both modules. + ?line {ok, CallerModuleName} = compile:file(CallerModule, [{outdir, PrivDir}]), + ?line {ok, CalleeModuleName} = compile:file(CalleeModule, [{outdir, PrivDir}]), + % Add PrivDir to the path so we can load modules interactively. + AbsPrivDir = filename:absname(PrivDir), + ?line true = code:add_patha(AbsPrivDir), + % Call the function in caller module. + ?line ok = CallerModuleName:call(CalleeModuleName), + % Purge both modules now. + ?line true = code:soft_purge(CallerModuleName), + ?line true = code:soft_purge(CalleeModuleName), + % Remove PrivDir from the path. + ?line true = code:del_path(AbsPrivDir), + ok. diff --git a/erts/emulator/test/hipe_SUITE_data/beam_callee.erl b/erts/emulator/test/hipe_SUITE_data/beam_callee.erl new file mode 100644 index 0000000..14342fc --- /dev/null +++ b/erts/emulator/test/hipe_SUITE_data/beam_callee.erl @@ -0,0 +1,10 @@ +-module(beam_callee). +-on_load(on_load/0). +-export([f/0]). + +on_load() -> + ok. + +f() -> + false = code:is_module_native(?MODULE), + ok. diff --git a/erts/emulator/test/hipe_SUITE_data/native_caller.erl b/erts/emulator/test/hipe_SUITE_data/native_caller.erl new file mode 100644 index 0000000..9176c37 --- /dev/null +++ b/erts/emulator/test/hipe_SUITE_data/native_caller.erl @@ -0,0 +1,9 @@ +-module(native_caller). +-compile([native]). +-export([call/1]). + +call(CalleeModuleName) -> + true = code:is_module_native(?MODULE), + ok = CalleeModuleName:f(), + ok = CalleeModuleName:f(), + ok. -- 1.7.1.1 From pguyot@REDACTED Wed Sep 22 15:55:27 2010 From: pguyot@REDACTED (Paul Guyot) Date: Wed, 22 Sep 2010 15:55:27 +0200 Subject: [PATCH] Fix hang when calling functions in a module with an on_load attribute from a native module In-Reply-To: <1285162705-5320-1-git-send-email-pguyot@kallisys.net> References: <1285162705-5320-1-git-send-email-pguyot@kallisys.net> Message-ID: <6AB0F18D-BF25-40BF-A658-BBBDE024F246@kallisys.net> Hello, Since I don't know how to send the patch and a comment which is not the commit message with git send-email, I am commenting in a reply to my patch e-mail. There is a bug in R14B (and dev branch) with native modules having an on_load attribute OTP is configured with --enable-native-libs. This bug was reported here: http://www.erlang.org/cgi-bin/ezmlm-cgi?2:mss:1988:201009:nfbmkdhkkahljajmfaai And a simpler way to reproduce it is to configure R14B with --enable-native-libs and then to start a shell and invoke 'crypto:md5("").' This call will never return. The bug is actually a conjunction of the following two patches: * fix of crash in finish_after_on_load_2 http://github.com/erlang/otp/commit/90108371943ace300f1dcf1543545a40be035a4a and * load native code for modules loaded before the code server http://github.com/erlang/otp/commit/a8b8ec5e858da86531933b545f752f436e411b58 When Mikael proposed a simplified version of my fix for the crash in finish_after_on_load_2, the second patch was not yet graduated and therefore the native code of error_handler was not loaded. The fix in R14B eventually consists in letting the call to error_handler:undefined_function/3, and if this function is native (which is the case with the second patch), it yields an infinite loop. In fact, the infinite loop can be observed on a pristine OTP_R14A installation with 90108371943ace300f1dcf1543545a40be035a4a and the following code entered at the shell prompt: hipe:c(error_handler), crypto:md5(""). Since my original patch for the crash does change the function glue to avoid calling error_handler:undefined_function/3 when the module has been loaded and on_load succeeded, it also fixes the hang bug by avoiding the infinite loop. My original patch was here: http://github.com/pguyot/otp/commit/495804b097aea4015e218d7b5da8d1372395580c The submitted patch is simply a resolved merge of this original patch on dev branch, with an updated commit message and a comment slightly rephrased. It was just sent on this list and is also available on github: git fetch git://github.com/pguyot/otp.git pg/fix-hipe-on_load-hang http://github.com/pguyot/otp/commit/442599d7ed5464a0915a0f8ee3b822e2ccf8cd16 Mikael, if you want to provide a better patch that would fix the performance issue hinted here, I'm all for it. I would just like to argument in favor of including the non-regression test case, even if the HiPE team runs a separate, closed-source test suite. Indeed, this test case currently fails on R14B (without the fix) and from what I understand of the graduation policy, had this test case been included with Mikael's fix for the crash, the second patch would have been rejected and the bug would have been prevented in R14B. Regards, Paul -- Semiocast http://semiocast.com/ +33.175000290 - 62 bis rue Gay-Lussac, 75005 Paris From magnus@REDACTED Wed Sep 22 17:01:34 2010 From: magnus@REDACTED (Magnus Henoch) Date: Wed, 22 Sep 2010 16:01:34 +0100 Subject: Fix syntax highlighting of $ in Emacs In-Reply-To: (Dan Gudmundsson's message of "Wed, 22 Sep 2010 15:09:05 +0200") References: <8462y7yt9j.fsf@linux-b2a3.site> Message-ID: <84y6atkek1.fsf@linux-b2a3.site> Dan Gudmundsson writes: > Hi > I tested this, with test.erl included in the emacs directory. > > It looks much better, but after an Erlang/indent-buffer (from menu) it > is broken, > see color coding at line 213 and below. > > The original version doesn't behave that way, please fix. Right, the regexp wasn't anchored anywhere, so after a reindent or other suddent change the highlighter might believe that it's in the middle of a string... I pushed a new version, anchoring at the beginning of the line. This means that multi-line strings ending with a dollar sign will still be broken, but no more broken than before, e.g.: foo() -> "Multi-line string ending with a $". bar() -> this_gets_highlighted_as_a_string. git fetch git://github.com/legoscia/otp.git dollar_font_lock -- Magnus Henoch, magnus@REDACTED Erlang Solutions http://www.erlang-solutions.com/ From magnus@REDACTED Wed Sep 22 17:22:25 2010 From: magnus@REDACTED (Magnus Henoch) Date: Wed, 22 Sep 2010 16:22:25 +0100 Subject: Fix syntax highlighting of $ in Emacs In-Reply-To: <84y6atkek1.fsf@linux-b2a3.site> (Magnus Henoch's message of "Wed, 22 Sep 2010 16:01:34 +0100") References: <8462y7yt9j.fsf@linux-b2a3.site> <84y6atkek1.fsf@linux-b2a3.site> Message-ID: <84tylhkdla.fsf@linux-b2a3.site> Magnus Henoch writes: > git fetch git://github.com/legoscia/otp.git dollar_font_lock No wait, what I just pushed is horribly broken :( I'll let you know when it's ready. -- Magnus Henoch, magnus@REDACTED Erlang Solutions http://www.erlang-solutions.com/ From magnus@REDACTED Wed Sep 22 18:24:55 2010 From: magnus@REDACTED (Magnus Henoch) Date: Wed, 22 Sep 2010 17:24:55 +0100 Subject: Fix syntax highlighting of $ in Emacs In-Reply-To: <84tylhkdla.fsf@linux-b2a3.site> (Magnus Henoch's message of "Wed, 22 Sep 2010 16:22:25 +0100") References: <8462y7yt9j.fsf@linux-b2a3.site> <84y6atkek1.fsf@linux-b2a3.site> <84tylhkdla.fsf@linux-b2a3.site> Message-ID: <84pqw5kap4.fsf@linux-b2a3.site> Magnus Henoch writes: > No wait, what I just pushed is horribly broken :( I'll let you know > when it's ready. Now, then: git fetch git://github.com/legoscia/otp.git dollar_font_lock -- Magnus Henoch, magnus@REDACTED Erlang Solutions http://www.erlang-solutions.com/ From michael+erlang@REDACTED Wed Sep 22 19:38:45 2010 From: michael+erlang@REDACTED (Michael Stapelberg) Date: Wed, 22 Sep 2010 19:38:45 +0200 Subject: [PATCH] Detect arm/armel as ARCH=arm (to enable HiPE later on) Message-ID: <1285177107-sup-593@midna.zekjur.net> Hi, Attached you can find a patch which adds arm and armel as ARCH=arm in erts/configure.in. This makes enabling HiPE possible when compiling (for example) in the scratchbox cross compilation toolkit as provided by Nokia to develop for the maemo platform (used on the Nokia N900). In other words: This is necessary to get an Erlang version which supports HiPE on the Nokia N900. Please include this patch in the next release. Best regards, Michael -------------- next part -------------- A non-text attachment was scrubbed... Name: 0001-Detect-arm-armel-as-ARCH-arm-to-enable-HiPE-later-on.patch Type: application/octet-stream Size: 642 bytes Desc: not available URL: From mikpe@REDACTED Wed Sep 22 23:17:18 2010 From: mikpe@REDACTED (Mikael Pettersson) Date: Wed, 22 Sep 2010 23:17:18 +0200 Subject: [erlang-patches] [PATCH] Detect arm/armel as ARCH=arm (to enable HiPE later on) In-Reply-To: <1285177107-sup-593@midna.zekjur.net> References: <1285177107-sup-593@midna.zekjur.net> Message-ID: <19610.29278.980156.342957@pilspetsen.it.uu.se> Michael Stapelberg writes: > Hi, > > Attached you can find a patch which adds arm and armel as ARCH=arm in > erts/configure.in. This makes enabling HiPE possible when compiling (for > example) in the scratchbox cross compilation toolkit as provided by Nokia > to develop for the maemo platform (used on the Nokia N900). In other words: > This is necessary to get an Erlang version which supports HiPE on the Nokia > N900. > > Please include this patch in the next release. What is the output of `uname -a' on this platform? I must admit I've never seen Linux/ARM platforms omit the CPU ISA generation number before. Accepting just plain 'arm' risks us running on .e.g ARMv4 which I can't guarantee will work -- HiPE has been developed and tested of ARMv5TE only. (Not that I care about v4. But I get the blame if it built and then doesn't work at runtime.) Not to mention v3 or v2 which I emphatically cannot support. So why doesn't "maemo platform" say arm{v5,v6,v7} like real native Linux platforms do? From gliptak@REDACTED Wed Sep 22 23:19:51 2010 From: gliptak@REDACTED (=?ISO-8859-1?B?R+Fib3IgTGlwdOFr?=) Date: Wed, 22 Sep 2010 17:19:51 -0400 Subject: [erlang-patches] [jinterface] added OtpMbox.hash() In-Reply-To: <20100921095120.GA19221@erix.ericsson.se> References: <20100920151058.GA17412@erix.ericsson.se> <20100921095120.GA19221@erix.ericsson.se> Message-ID: OtpErlangPid currently does not implement hashCode() , so forwarding from OtpMbox to OtpErlangPid still might not define identity correctly. As OtpErlangPid overrides equals(), it should also have hashCode() implemented. Please see discussion on this at http://developer.java.sun.com/developer/Books/effectivejava/Chapter3.pdf On Tue, Sep 21, 2010 at 05:51, Raimo Niskanen wrote: > On Mon, Sep 20, 2010 at 07:11:51PM +0200, Vlad Dumitrescu wrote: >> On Mon, Sep 20, 2010 at 17:10, Raimo Niskanen >> wrote: >> > Excuse me for a maybe stupid question... >> > >> > Why is it necessary? >> > >> > Calling self.hashCode() from a class inheriting from Object >> > should be done through inheritance without the patch. >> > >> > Is there some tool complaining if both are not overridden >> > even if the result is correct (or is it not?), or have >> > have the rules changed since the old days, or am >> > I missing something?... >> >> Not a stupid question, but almost every static analysis tool complains >> about this. >> >> In any case, the patch calls self.hash(), not super.hash(). Whatever >> is compared in equals() should be included when computing the hash. > > Thank you, now I see the light! I have been programming Erlang too > long and mistook 'self' with 'this'... > > So the current inherited hashCode() function is incorrect > in calling super.hashCode(). We will take the patch as it is, > a test case seems to be not worth the trouble. From michael+erlang@REDACTED Wed Sep 22 23:26:53 2010 From: michael+erlang@REDACTED (Michael Stapelberg) Date: Wed, 22 Sep 2010 23:26:53 +0200 Subject: [erlang-patches] [PATCH] Detect arm/armel as ARCH=arm (to enable HiPE later on) In-Reply-To: <19610.29278.980156.342957@pilspetsen.it.uu.se> References: <1285177107-sup-593@midna.zekjur.net> <19610.29278.980156.342957@pilspetsen.it.uu.se> Message-ID: <1285190680-sup-8222@midna.zekjur.net> Hi Mikeal, Thanks for replying so fast. Excerpts from Mikael Pettersson's message of 2010-09-22 23:17:18 +0200: > What is the output of `uname -a' on this platform? [sbox-FREMANTLE_ARMEL: ~] > uname -a Linux maemo-desktop 2.6.27-16-generic #1 SMP Tue Dec 1 17:56:54 UTC 2009 arm GNU/Linux On the Nokia N900 itself (on the running device, NOT the SDK), I get: Nokia-N900:~# uname -a Linux Nokia-N900 2.6.28.10power40 #1 PREEMPT Tue Aug 10 09:30:52 EEST 2010 armv7l unknown > I must admit I've never seen Linux/ARM platforms omit the > CPU ISA generation number before. Accepting just plain 'arm' > risks us running on .e.g ARMv4 which I can't guarantee > will work -- HiPE has been developed and tested of ARMv5TE only. > (Not that I care about v4. But I get the blame if it > built and then doesn't work at runtime.) Ah, I see why you don?t have arm/armel in there now. > So why doesn't "maemo platform" say arm{v5,v6,v7} > like real native Linux platforms do? I have no idea. Maybe the best way to go is to include patches in the maemo package of erlang for this issue? Best regards, Michael From tuncer.ayaz@REDACTED Wed Sep 22 23:59:47 2010 From: tuncer.ayaz@REDACTED (Tuncer Ayaz) Date: Wed, 22 Sep 2010 23:59:47 +0200 Subject: [PATCH] Fix hang when calling functions in a module with an on_load attribute from a native module In-Reply-To: <6AB0F18D-BF25-40BF-A658-BBBDE024F246@kallisys.net> References: <1285162705-5320-1-git-send-email-pguyot@kallisys.net> <6AB0F18D-BF25-40BF-A658-BBBDE024F246@kallisys.net> Message-ID: On Wed, Sep 22, 2010 at 3:55 PM, Paul Guyot wrote: > Hello, > > Since I don't know how to send the patch and a comment which is not > the commit message with git send-email, I am commenting in a reply > to my patch e-mail. You might use 'send-email --compose' to write an introductory msg. > There is a bug in R14B (and dev branch) with native modules having > an on_load attribute OTP is configured with --enable-native-libs. I can confirm this patch fixes the issue. From mikpe@REDACTED Thu Sep 23 00:14:05 2010 From: mikpe@REDACTED (Mikael Pettersson) Date: Thu, 23 Sep 2010 00:14:05 +0200 Subject: [erlang-patches] [PATCH] Detect arm/armel as ARCH=arm (to enable HiPE later on) In-Reply-To: <1285190680-sup-8222@midna.zekjur.net> References: <1285177107-sup-593@midna.zekjur.net> <19610.29278.980156.342957@pilspetsen.it.uu.se> <1285190680-sup-8222@midna.zekjur.net> Message-ID: <19610.32685.342305.770531@pilspetsen.it.uu.se> Michael Stapelberg writes: > Hi Mikeal, > > Thanks for replying so fast. > > Excerpts from Mikael Pettersson's message of 2010-09-22 23:17:18 +0200: > > What is the output of `uname -a' on this platform? > [sbox-FREMANTLE_ARMEL: ~] > uname -a > Linux maemo-desktop 2.6.27-16-generic #1 SMP Tue Dec 1 17:56:54 UTC 2009 arm GNU/Linux This is broken. > On the Nokia N900 itself (on the running device, NOT the SDK), I get: > Nokia-N900:~# uname -a > Linux Nokia-N900 2.6.28.10power40 #1 PREEMPT Tue Aug 10 09:30:52 EEST 2010 armv7l unknown This is better, except it looks like it's missing several fields. Is that uname from a current coreutils or someone trying to emulate it. > > I must admit I've never seen Linux/ARM platforms omit the > > CPU ISA generation number before. Accepting just plain 'arm' > > risks us running on .e.g ARMv4 which I can't guarantee > > will work -- HiPE has been developed and tested of ARMv5TE only. > > (Not that I care about v4. But I get the blame if it > > built and then doesn't work at runtime.) > Ah, I see why you don???t have arm/armel in there now. > > > So why doesn't "maemo platform" say arm{v5,v6,v7} > > like real native Linux platforms do? > I have no idea. Maybe the best way to go is to include patches in the maemo > package of erlang for this issue? Either that or get the maemo people to fix their uname to be less broken. I cannot really accept maemo's plain "arm" as an alias for "I meant armv7" as that could create new failure modes on pre-v7 processors. What if some other SDK did the same, except _their_ "arm" meant "armv5te"? From michael+erlang@REDACTED Thu Sep 23 00:30:07 2010 From: michael+erlang@REDACTED (Michael Stapelberg) Date: Thu, 23 Sep 2010 00:30:07 +0200 Subject: [erlang-patches] [PATCH] Detect arm/armel as ARCH=arm (to enable HiPE later on) In-Reply-To: <19610.32685.342305.770531@pilspetsen.it.uu.se> References: <1285177107-sup-593@midna.zekjur.net> <19610.29278.980156.342957@pilspetsen.it.uu.se> <1285190680-sup-8222@midna.zekjur.net> <19610.32685.342305.770531@pilspetsen.it.uu.se> Message-ID: <1285194445-sup-2743@midna.zekjur.net> Hi Mikael, Excerpts from Mikael Pettersson's message of 2010-09-23 00:14:05 +0200: > This is better, except it looks like it's missing several fields. > Is that uname from a current coreutils or someone trying to emulate it. The output of an original gnu-coreutils version looks quite similar: Nokia-N900:~# /usr/bin/gnu/uname -a Linux Nokia-N900 2.6.28.10power40 #1 PREEMPT Tue Aug 10 09:30:52 EEST 2010 armv7l GNU/Linux Nokia-N900:~# uname -a Linux Nokia-N900 2.6.28.10power40 #1 PREEMPT Tue Aug 10 09:30:52 EEST 2010 armv7l unknown Are the missing fields you mentioned the following? Nokia-N900:~# /usr/bin/gnu/uname -p unknown Nokia-N900:~# /usr/bin/gnu/uname -i unknown > Either that or get the maemo people to fix their uname to > be less broken. I cannot really accept maemo's plain "arm" > as an alias for "I meant armv7" as that could create new > failure modes on pre-v7 processors. What if some other SDK > did the same, except _their_ "arm" meant "armv5te"? Sure thing. I?ll file a bug report at bugs.maemo.org and submit a patch for the erlang package there. Best regards, Michael From tuncer.ayaz@REDACTED Thu Sep 23 00:49:01 2010 From: tuncer.ayaz@REDACTED (Tuncer Ayaz) Date: Thu, 23 Sep 2010 00:49:01 +0200 Subject: [PATCH] emd2xml: Do not auto-import error/2 Message-ID: <1285195741-52343-1-git-send-email-tuncer.ayaz@gmail.com> Eliminate the following warning: Warning: ambiguous call of overridden auto-imported BIF error/2 --- make/emd2exml.in | 1 + 1 files changed, 1 insertions(+), 0 deletions(-) diff --git a/make/emd2exml.in b/make/emd2exml.in index 17cb0a0..ea1085c 100644 --- a/make/emd2exml.in +++ b/make/emd2exml.in @@ -44,6 +44,7 @@ -define(DELAYED_TOC_IX, 1). -define(DELAYED_START_IX, 2). +-compile({no_auto_import,[error/2]}). -mode(compile). -export([main/1]). From tuncer.ayaz@REDACTED Thu Sep 23 00:50:51 2010 From: tuncer.ayaz@REDACTED (Tuncer Ayaz) Date: Thu, 23 Sep 2010 00:50:51 +0200 Subject: [PATCH] emd2exml: Do not auto-import error/2 In-Reply-To: <1285195741-52343-1-git-send-email-tuncer.ayaz@gmail.com> References: <1285195741-52343-1-git-send-email-tuncer.ayaz@gmail.com> Message-ID: <1285195851-52391-1-git-send-email-tuncer.ayaz@gmail.com> Eliminate the following warning: Warning: ambiguous call of overridden auto-imported BIF error/2 --- make/emd2exml.in | 1 + 1 files changed, 1 insertions(+), 0 deletions(-) diff --git a/make/emd2exml.in b/make/emd2exml.in index 17cb0a0..ea1085c 100644 --- a/make/emd2exml.in +++ b/make/emd2exml.in @@ -44,6 +44,7 @@ -define(DELAYED_TOC_IX, 1). -define(DELAYED_START_IX, 2). +-compile({no_auto_import,[error/2]}). -mode(compile). -export([main/1]). From tuncer.ayaz@REDACTED Thu Sep 23 00:51:45 2010 From: tuncer.ayaz@REDACTED (Tuncer Ayaz) Date: Thu, 23 Sep 2010 00:51:45 +0200 Subject: [PATCH] emd2xml: Do not auto-import error/2 In-Reply-To: <1285195741-52343-1-git-send-email-tuncer.ayaz@gmail.com> References: <1285195741-52343-1-git-send-email-tuncer.ayaz@gmail.com> Message-ID: On Thu, Sep 23, 2010 at 12:49 AM, Tuncer Ayaz wrote: > Eliminate the following warning: > Warning: ambiguous call of overridden auto-imported BIF error/2 Please ignore this one. There was a typo in the subject. From mikpe@REDACTED Thu Sep 23 00:58:59 2010 From: mikpe@REDACTED (Mikael Pettersson) Date: Thu, 23 Sep 2010 00:58:59 +0200 Subject: [erlang-patches] [PATCH] Detect arm/armel as ARCH=arm (to enable HiPE later on) In-Reply-To: <1285194445-sup-2743@midna.zekjur.net> References: <1285177107-sup-593@midna.zekjur.net> <19610.29278.980156.342957@pilspetsen.it.uu.se> <1285190680-sup-8222@midna.zekjur.net> <19610.32685.342305.770531@pilspetsen.it.uu.se> <1285194445-sup-2743@midna.zekjur.net> Message-ID: <19610.35379.936592.169081@pilspetsen.it.uu.se> Michael Stapelberg writes: > Hi Mikael, > > Excerpts from Mikael Pettersson's message of 2010-09-23 00:14:05 +0200: > > This is better, except it looks like it's missing several fields. > > Is that uname from a current coreutils or someone trying to emulate it. > The output of an original gnu-coreutils version looks quite similar: > > Nokia-N900:~# /usr/bin/gnu/uname -a > Linux Nokia-N900 2.6.28.10power40 #1 PREEMPT Tue Aug 10 09:30:52 EEST 2010 armv7l GNU/Linux > Nokia-N900:~# uname -a > Linux Nokia-N900 2.6.28.10power40 #1 PREEMPT Tue Aug 10 09:30:52 EEST 2010 armv7l unknown Hmm, I would have expected it to output the arch string more than once: (coreutils-7.2-8.fc11 on an arm5tel box) Linux $hostname $kernelver $builddate armv5tel armv5tel armv5tel GNU/Linux I think it has to do with uname -m and -i and -p generating the same string. > Sure thing. I???ll file a bug report at bugs.maemo.org and submit a patch for the > erlang package there. Yeah, I think that's the best solution for now. From vladdu55@REDACTED Thu Sep 23 10:31:58 2010 From: vladdu55@REDACTED (Vlad Dumitrescu) Date: Thu, 23 Sep 2010 10:31:58 +0200 Subject: [erlang-patches] [jinterface] added OtpMbox.hash() In-Reply-To: References: <20100920151058.GA17412@erix.ericsson.se> <20100921095120.GA19221@erix.ericsson.se> Message-ID: Hi, On Wed, Sep 22, 2010 at 23:19, G?bor Lipt?k wrote: > OtpErlangPid currently does not implement hashCode() , so forwarding > from OtpMbox to OtpErlangPid still might not define identity > correctly. As OtpErlangPid overrides equals(), it should also have > hashCode() implemented. That's correct, I don't understand why some runs of the static analysis didn't return all the cases. All classes based on OtpErlangObject are affected, because OtpErlangObject.hashCode caches and does lazy initialization on the value which is really computed by doHashCode() which in its turn is overriden in the subclasses. This works, but I'd like to argue that it's not optimal because the static analysis can't give any warning when one really forgets to write hashCode(). My suggestion is that each hashCode() do their own caching and use a helper class or method to combine the required fields. I can provide an implementation of that, if needed. This way we can rely on the static analysis to point out if we do something wrong. The obvious argument to keeping the status quo is that it works now and there's not going to be any changes to the jinterface classes. For what it's worth, I do have in erlide a couple of classes extending the jinterface ones (for example, for representing patterns we need variables and cons cells). Also, we have to remember that having a hashCode() implementation doesn't guarantee that it's doing the right thing. Getting equals() and hashCode() and compareTo() (if implementing Complarable) consistent can be difficult. best regards, Vlad From klyr@REDACTED Thu Sep 23 13:46:56 2010 From: klyr@REDACTED (Julien Barbot) Date: Thu, 23 Sep 2010 13:46:56 +0200 Subject: erl_call can now use an IP address for remote node name Message-ID: <4C9B3E30.3070505@quicheaters.org> Hi, erl_call was not able to connect to a remote node when the specified node with -name contained an IP address. The previous inet_addr/htonl calls were not working with ip addresses. Here is the small patch: git fetch git://github.com/klyr/otp.git erl_call_get_hostent Regards, -- Julien Barbot From jay@REDACTED Fri Sep 24 06:25:13 2010 From: jay@REDACTED (jay@REDACTED) Date: Thu, 23 Sep 2010 21:25:13 -0700 (PDT) Subject: [erlang-patches] gen_stream updated to test worker process links In-Reply-To: <20100916074833.GA28796@erix.ericsson.se> References: <61406.64.81.32.114.1283679631.squirrel@duomark.com> <40523.74.1.186.35.1283795407.squirrel@duomark.com> <54126.64.81.32.110.1284617276.squirrel@duomark.com> <20100916065957.GA31495@erix.ericsson.se> <20100916074833.GA28796@erix.ericsson.se> Message-ID: <62941.64.81.32.110.1285302313.squirrel@duomark.com> > Removing "%DEBUG: " causes all tests to fail with (or similar): > > === Ended at 2010-09-16 09:21:36 > === location {gen_stream_SUITE,75} > === reason = no function clause matching Ok thanks. So much for my anticipation. Hopefully I will get a chance to look at this soon. jay From mchris@REDACTED Fri Sep 24 13:24:22 2010 From: mchris@REDACTED (Maria Christakis) Date: Fri, 24 Sep 2010 14:24:22 +0300 Subject: epp_dodge:tokens_to_string/1 crash Message-ID: <4C9C8A66.5010000@mail.ntua.gr> Hello, When run on the attached file (that contains a syntax error) the epp_dodge:quick_parse_file/1 function crashes. This happens because the epp_dodge:tokens_to_string/1 function does not have a clause for characters. I have fixed this bug in the following patch: git fetch git://github.com/kostis/otp.git tokens_to_string_crash Maria -------------- next part -------------- A non-text attachment was scrubbed... Name: bug.erl Type: text/x-erlang Size: 110 bytes Desc: not available URL: From tuncer.ayaz@REDACTED Fri Sep 24 13:50:29 2010 From: tuncer.ayaz@REDACTED (Tuncer Ayaz) Date: Fri, 24 Sep 2010 13:50:29 +0200 Subject: [erlang-patches] epp_dodge:tokens_to_string/1 crash In-Reply-To: <4C9C8A66.5010000@mail.ntua.gr> References: <4C9C8A66.5010000@mail.ntua.gr> Message-ID: On Fri, Sep 24, 2010 at 1:24 PM, Maria Christakis wrote: > Hello, > > When run on the attached file (that contains a syntax error) the > epp_dodge:quick_parse_file/1 function crashes. This happens because > the epp_dodge:tokens_to_string/1 function does not have a clause for > characters. I have fixed this bug in the following patch: > > git fetch git://github.com/kostis/otp.git tokens_to_string_crash Just a minor commit message nitpick following http://github.com/erlang/otp/wiki/Writing-good-commit-messages. Good rules are a 50 chars summary line without terminating dot and a 70 chars wrapped description. The blank line after the summary is only needed if you write a description. Before: -----8<----- Add a function clause in the epp_dodger:tokens_to_string/1 function to avoid a crash in case the argument is a character ----->8----- After: -----8<----- Fix crash in epp_dodger:tokens_to_string/1 Add a function clause in the epp_dodger:tokens_to_string/1 to avoid a crash in case the argument is a character. ----->8----- From bgustavsson@REDACTED Fri Sep 24 14:01:22 2010 From: bgustavsson@REDACTED (=?UTF-8?Q?Bj=C3=B6rn_Gustavsson?=) Date: Fri, 24 Sep 2010 14:01:22 +0200 Subject: [erlang-patches] Re: Fix syntax highlighting of $ in Emacs In-Reply-To: <84pqw5kap4.fsf@linux-b2a3.site> References: <8462y7yt9j.fsf@linux-b2a3.site> <84y6atkek1.fsf@linux-b2a3.site> <84tylhkdla.fsf@linux-b2a3.site> <84pqw5kap4.fsf@linux-b2a3.site> Message-ID: On Wed, Sep 22, 2010 at 6:24 PM, Magnus Henoch wrote: > Magnus Henoch writes: > >> No wait, what I just pushed is horribly broken :( I'll let you know >> when it's ready. > > Now, then: > > git fetch git://github.com/legoscia/otp.git dollar_font_lock Thanks! Will update. -- Bj?rn Gustavsson, Erlang/OTP, Ericsson AB From bgustavsson@REDACTED Fri Sep 24 14:09:54 2010 From: bgustavsson@REDACTED (=?UTF-8?Q?Bj=C3=B6rn_Gustavsson?=) Date: Fri, 24 Sep 2010 14:09:54 +0200 Subject: [erlang-patches] [PATCH] Fix hang when calling functions in a module with an on_load attribute from a native module In-Reply-To: <1285162705-5320-1-git-send-email-pguyot@kallisys.net> References: <1285162705-5320-1-git-send-email-pguyot@kallisys.net> Message-ID: On Wed, Sep 22, 2010 at 3:38 PM, wrote: > From: Paul Guyot > > The fix consists in adding a new opcode for hipe stub calls that > is used to replace the call to error_handler:undefined_function/3. This > stub directly calls the function: there is no need to go through > error_handler:undefined_function/3 once we know the module is loaded, > and, more importantly, when error_handler module itself was natively > compiled (with native code loaded), the emulator did loop infinitely. > > The fix also comes with a non-regression test that will prevent this > bug to reappear again. Thanks! Will include in 'pu'. -- Bj?rn Gustavsson, Erlang/OTP, Ericsson AB From kostis@REDACTED Fri Sep 24 14:09:45 2010 From: kostis@REDACTED (Kostis Sagonas) Date: Fri, 24 Sep 2010 15:09:45 +0300 Subject: HiPE cleanups Message-ID: <4C9C9509.4000109@cs.ntua.gr> Some HiPE cleanups: git fetch git://github.com/kostis/otp.git hipe-cleanups Kostis From bgustavsson@REDACTED Fri Sep 24 14:13:53 2010 From: bgustavsson@REDACTED (=?UTF-8?Q?Bj=C3=B6rn_Gustavsson?=) Date: Fri, 24 Sep 2010 14:13:53 +0200 Subject: [erlang-patches] [PATCH] emd2exml: Do not auto-import error/2 In-Reply-To: <1285195851-52391-1-git-send-email-tuncer.ayaz@gmail.com> References: <1285195741-52343-1-git-send-email-tuncer.ayaz@gmail.com> <1285195851-52391-1-git-send-email-tuncer.ayaz@gmail.com> Message-ID: On Thu, Sep 23, 2010 at 12:50 AM, Tuncer Ayaz wrote: > Eliminate the following warning: > Warning: ambiguous call of overridden auto-imported BIF error/2 > --- Thanks! Will include in 'pu'. -- Bj?rn Gustavsson, Erlang/OTP, Ericsson AB From bgustavsson@REDACTED Fri Sep 24 14:19:07 2010 From: bgustavsson@REDACTED (=?UTF-8?Q?Bj=C3=B6rn_Gustavsson?=) Date: Fri, 24 Sep 2010 14:19:07 +0200 Subject: [erlang-patches] erl_call can now use an IP address for remote node name In-Reply-To: <4C9B3E30.3070505@quicheaters.org> References: <4C9B3E30.3070505@quicheaters.org> Message-ID: On Thu, Sep 23, 2010 at 1:46 PM, Julien Barbot wrote: > Hi, > > erl_call was not able to connect to a remote node when the specified node > with -name contained an IP address. > > The previous inet_addr/htonl calls were not working with ip addresses. > > Here is the small patch: > > git fetch git://github.com/klyr/otp.git erl_call_get_hostent > Thanks! Will include in pu. -- Bj?rn Gustavsson, Erlang/OTP, Ericsson AB From mikpe@REDACTED Fri Sep 24 14:24:53 2010 From: mikpe@REDACTED (Mikael Pettersson) Date: Fri, 24 Sep 2010 14:24:53 +0200 Subject: [PATCH] Fix hang when calling functions in a module with an on_load attribute from a native module In-Reply-To: <6AB0F18D-BF25-40BF-A658-BBBDE024F246@kallisys.net> References: <1285162705-5320-1-git-send-email-pguyot@kallisys.net> <6AB0F18D-BF25-40BF-A658-BBBDE024F246@kallisys.net> Message-ID: <19612.39061.424713.26823@pilspetsen.it.uu.se> Paul Guyot writes: > Hello, > > Since I don't know how to send the patch and a comment which is not the commit message with git send-email, I am commenting in a reply to my patch e-mail. > > There is a bug in R14B (and dev branch) with native modules having an on_load attribute OTP is configured with --enable-native-libs. > > This bug was reported here: > http://www.erlang.org/cgi-bin/ezmlm-cgi?2:mss:1988:201009:nfbmkdhkkahljajmfaai > > And a simpler way to reproduce it is to configure R14B with --enable-native-libs and then to start a shell and invoke 'crypto:md5("").' This call will never return. I grabbed a pristine R14B tarball, unpacked it, did ./configure --enable-native-libs, make, started bin/erl, and evaluated crypto:md5(""). There was no hang. > The bug is actually a conjunction of the following two patches: > * fix of crash in finish_after_on_load_2 > http://github.com/erlang/otp/commit/90108371943ace300f1dcf1543545a40be035a4a > and > * load native code for modules loaded before the code server > http://github.com/erlang/otp/commit/a8b8ec5e858da86531933b545f752f436e411b58 > > When Mikael proposed a simplified version of my fix for the crash in finish_after_on_load_2, the second patch was not yet graduated and therefore the native code of error_handler was not loaded. The fix in R14B eventually consists in letting the call to error_handler:undefined_function/3, and if this function is native (which is the case with the second patch), it yields an infinite loop. > > In fact, the infinite loop can be observed on a pristine OTP_R14A installation with 90108371943ace300f1dcf1543545a40be035a4a and the following code entered at the shell prompt: > > hipe:c(error_handler), > crypto:md5(""). Tried this too in the R14B I built above. Still no hang. I agree there _may_ be a recursion between the native-traps-to-beam mechanism and the error_handler module. However, the real problem is that the chosen mechanism (point to target MFA's BEAM code) isn't flexible enough to handle newer features like on_load or (apparently) a native-mode error_handler. My planned fix is to make remote calls link to the target's Export* instead, just like BEAM does, which should solve the problems. This will however require HiPE to use different kinds of trap-to-beam stubs for remote and local calls, since local calls must not and often cannot go via Export entries. A simpler workaround for the error_handler issue (which I couldn't reproduce) is to just never compile error_handler to native code. It's not like there's a lot to gain by doing that. Please try the patch below. /Mikael --- otp_src_R14B/lib/kernel/src/error_handler.erl.~1~ 2010-09-13 19:00:22.000000000 +0200 +++ otp_src_R14B/lib/kernel/src/error_handler.erl 2010-09-24 13:44:09.000000000 +0200 @@ -17,6 +17,7 @@ %% %CopyrightEnd% %% -module(error_handler). +-compile(no_native). %% A simple error handler. From kostis@REDACTED Fri Sep 24 14:22:24 2010 From: kostis@REDACTED (Kostis Sagonas) Date: Fri, 24 Sep 2010 15:22:24 +0300 Subject: Stdlib specs Message-ID: <4C9C9800.7060305@cs.ntua.gr> Correct some erroneous specs and strengthen some other ones: git fetch git://github.com/kostis/otp.git stdlib-spec-fixes Kostis From bgustavsson@REDACTED Fri Sep 24 14:29:47 2010 From: bgustavsson@REDACTED (=?UTF-8?Q?Bj=C3=B6rn_Gustavsson?=) Date: Fri, 24 Sep 2010 14:29:47 +0200 Subject: [erlang-patches] epp_dodge:tokens_to_string/1 crash In-Reply-To: <4C9C8A66.5010000@mail.ntua.gr> References: <4C9C8A66.5010000@mail.ntua.gr> Message-ID: On Fri, Sep 24, 2010 at 1:24 PM, Maria Christakis wrote: > Hello, > > When run on the attached file (that contains a syntax error) the > epp_dodge:quick_parse_file/1 > function crashes. This happens because the epp_dodge:tokens_to_string/1 > function does not > have a clause for characters. I have fixed this bug in the following patch: > > git fetch git://github.com/kostis/otp.git tokens_to_string_crash > Thanks! I have included the patch directly in 'dev', with the commit message adjusted as Tuncer suggested to conform to our guidelines. -- Bj?rn Gustavsson, Erlang/OTP, Ericsson AB From bgustavsson@REDACTED Fri Sep 24 14:34:08 2010 From: bgustavsson@REDACTED (=?UTF-8?Q?Bj=C3=B6rn_Gustavsson?=) Date: Fri, 24 Sep 2010 14:34:08 +0200 Subject: [erlang-patches] HiPE cleanups In-Reply-To: <4C9C9509.4000109@cs.ntua.gr> References: <4C9C9509.4000109@cs.ntua.gr> Message-ID: 2010/9/24 Kostis Sagonas : > Some HiPE cleanups: > > git fetch git://github.com/kostis/otp.git hipe-cleanups > Thanks! Will include in 'pu'. -- Bj?rn Gustavsson, Erlang/OTP, Ericsson AB From kostis@REDACTED Fri Sep 24 14:34:20 2010 From: kostis@REDACTED (Kostis Sagonas) Date: Fri, 24 Sep 2010 15:34:20 +0300 Subject: Export opaque types Message-ID: <4C9C9ACC.90301@cs.ntua.gr> Export opaque types so as to be used by other modules. Opaque types do not really make as module-local only. git fetch git://github.com/kostis/otp.git export-types Kostis From bgustavsson@REDACTED Fri Sep 24 14:39:17 2010 From: bgustavsson@REDACTED (=?UTF-8?Q?Bj=C3=B6rn_Gustavsson?=) Date: Fri, 24 Sep 2010 14:39:17 +0200 Subject: [erlang-patches] Stdlib specs In-Reply-To: <4C9C9800.7060305@cs.ntua.gr> References: <4C9C9800.7060305@cs.ntua.gr> Message-ID: 2010/9/24 Kostis Sagonas : > Correct some erroneous specs and strengthen some other ones: > > git fetch git://github.com/kostis/otp.git stdlib-spec-fixes Thanks! Will include in 'pu'. -- Bj?rn Gustavsson, Erlang/OTP, Ericsson AB From bgustavsson@REDACTED Fri Sep 24 14:43:58 2010 From: bgustavsson@REDACTED (=?UTF-8?Q?Bj=C3=B6rn_Gustavsson?=) Date: Fri, 24 Sep 2010 14:43:58 +0200 Subject: [erlang-patches] Export opaque types In-Reply-To: <4C9C9ACC.90301@cs.ntua.gr> References: <4C9C9ACC.90301@cs.ntua.gr> Message-ID: 2010/9/24 Kostis Sagonas : > Export opaque types so as to be used by other modules. > > Opaque types do not really make as module-local only. > > git fetch git://github.com/kostis/otp.git export-types > Thanks! Will include in 'pu'. -- Bj?rn Gustavsson, Erlang/OTP, Ericsson AB From kostis@REDACTED Fri Sep 24 14:59:55 2010 From: kostis@REDACTED (Kostis Sagonas) Date: Fri, 24 Sep 2010 15:59:55 +0300 Subject: Dialyzer fixes Message-ID: <4C9CA0CB.4000203@cs.ntua.gr> Fix two problems reported by dialyzer users: git fetch git://github.com/kostis/otp.git dialyzer-fixes Kostis From pguyot@REDACTED Fri Sep 24 18:14:00 2010 From: pguyot@REDACTED (Paul Guyot) Date: Fri, 24 Sep 2010 18:14:00 +0200 Subject: [PATCH] Fix hang when calling functions in a module with an on_load attribute from a native module In-Reply-To: <19612.39061.424713.26823@pilspetsen.it.uu.se> References: <1285162705-5320-1-git-send-email-pguyot@kallisys.net> <6AB0F18D-BF25-40BF-A658-BBBDE024F246@kallisys.net> <19612.39061.424713.26823@pilspetsen.it.uu.se> Message-ID: <34BAA55F-87C6-4A91-AEE4-B007F30F45EE@kallisys.net> >> And a simpler way to reproduce it is to configure R14B with --enable-native-libs and then to start a shell and invoke 'crypto:md5("").' This call will never return. > > I grabbed a pristine R14B tarball, unpacked it, did ./configure --enable-native-libs, make, > started bin/erl, and evaluated crypto:md5(""). There was no hang. Mikael, Thank you for your prompt reply. While I used OTP_R14B tag from git, I believe the R14B tarball from erlang.org has pre-built beams which are not recompiled even if --enable-native-libs is passed to configure. In other words, --enable-native-libs has no effect unless the pre-built beams are removed. Could you please test if you can reproduce the hang after having removed the pre-built beams? (especially those that get natively recompiled with --enable-native-libs). I think you can remove them with ./otp_build remove_prebuilt_files Thanks. Paul -- Semiocast http://semiocast.com/ +33.175000290 - 62 bis rue Gay-Lussac, 75005 Paris From tuncer.ayaz@REDACTED Fri Sep 24 22:02:09 2010 From: tuncer.ayaz@REDACTED (Tuncer Ayaz) Date: Fri, 24 Sep 2010 22:02:09 +0200 Subject: [PATCH] Fix hang when calling functions in a module with an on_load attribute from a native module In-Reply-To: <19612.39061.424713.26823@pilspetsen.it.uu.se> References: <1285162705-5320-1-git-send-email-pguyot@kallisys.net> <6AB0F18D-BF25-40BF-A658-BBBDE024F246@kallisys.net> <19612.39061.424713.26823@pilspetsen.it.uu.se> Message-ID: On Fri, Sep 24, 2010 at 2:24 PM, Mikael Pettersson wrote: > A simpler workaround for the error_handler issue (which I couldn't > reproduce) is to just never compile error_handler to native code. > It's not like there's a lot to gain by doing that. Please try the > patch below. It's obvious but to be sure I've rebuilt and confirmed the workaround. From fdmanana@REDACTED Sun Sep 26 13:04:02 2010 From: fdmanana@REDACTED (Filipe David Manana) Date: Sun, 26 Sep 2010 12:04:02 +0100 Subject: [PATCH] httpc module - allow streaming of bodies for PUT and POST requests Message-ID: Hi, The following patch, as a github commit, allows for streaming of HTTP PUT and POST requests. http://github.com/fdmanana/otp/commit/2d0e66d9d41c813b6fb09179bdcd29910bf0d296 Usage example: -module(httpc_post_stream_test). -compile(export_all). -define(LEN, 1024 * 1024). prepare_data() -> {ok, Fd} = file:open("test_data.dat", [binary, write]), ok = file:write(Fd, lists:duplicate(?LEN, "1")), ok = file:close(Fd). test() -> inets:start(), ok = prepare_data(), {ok, Fd1} = file:open("test_data.dat", [binary, read]), BodyFun = fun(Fd) -> case file:read(Fd, 512) of eof -> eof; {ok, Data} -> {ok, Data, Fd} end end, {ok, {{_, 200, _}, _, _}} = httpc:request(post, {"http://localhost:8888 ", [{"content-length", integer_to_list(?LEN)}], "text/plain", {BodyFun, Fd1}}, [], []), ok = file:close(Fd1). This is specially useful when sending data to RESTful servers, like CouchDB for example. Let me know if the patch meets all the necessary requirements for acceptance. cheers -- Filipe David Manana, fdmanana@REDACTED, fdmanana@REDACTED "Reasonable men adapt themselves to the world. Unreasonable men adapt the world to themselves. That's why all progress depends on unreasonable men." From zerthurd@REDACTED Sun Sep 26 20:57:43 2010 From: zerthurd@REDACTED (Maxim Treskin) Date: Mon, 27 Sep 2010 01:57:43 +0700 Subject: [erlang-patces] SSH problem in R14B: using deprecated function with unexpected return value Message-ID: On 27 September 2010 01:15, Maxim Treskin wrote: > Is this bug will be fixed in otp mainline? > > > On 20 September 2010 21:16, Gene Diveglia wrote: > >> >> Thanks Niclas! That change resolved the problem. >> >> Kind regards, >> >> -Gene >> >> >> On Sep 20, 2010, at 9:52 AM, Niclas Eklund wrote: >> >> > >> > Hi! >> > >> > It seems like that the (deprecated) function public_key:pem_to_der/1 >> doesn't return the same thing as in R14A. As a temporary fix, you can change >> that function from: >> > >> > pem_to_der(CertSource) -> >> > {ok, Bin} = file:read_file(CertSource), >> > pubkey_pem:decode(Bin). >> > >> > to: >> > >> > pem_to_der(CertSource) -> >> > {ok, Bin} = file:read_file(CertSource), >> > {ok, pubkey_pem:decode(Bin)}. >> > >> > Then it should work. Or you can wait until a fix has been pushed. >> > >> > Best regards, >> > >> > Niclas @ Erlang/OTP >> > >> > On Thu, 16 Sep 2010, Maxim Treskin wrote: >> > >> >> Yes, have the same on Gentoo Linux amd64 >> >> >> >> On 16 September 2010 04:37, Gene Diveglia wrote: >> >> >> >>> >> >>> Hi, it appears something has broken with SSH key exchange in R14B. >> None of >> >>> my ssh based CLI are working in R14B, but were previously working in >> R14A >> >>> immediately prior to upgrading. I can replicate the problem easily >> using >> >>> [otp_src]/lib/ssh/examples/ssh_sample_cli.erl. This sample program >> works >> >>> with R14A under OS X 10.6.4 x86, but will fail if run under R14B. The >> ssh >> >>> client used in both cases was also on OS X 10.6.4 and was used with >> defaults >> >>> other than the port number. Standard ssh host key files which are >> >>> functional under the OS were used in both cases. I also tried a set >> of host >> >>> key files generated with a different version of ssh-keygen under >> linux. The >> >>> error report under R14B follows. >> >>> >> >>> Kind regards, >> >>> >> >>> -Gene >> >>> >> >>> =ERROR REPORT==== 15-Sep-2010::17:18:48 === >> >>> ** State machine <0.55.0> terminating >> >>> ** Last message in was {tcp,#Port<0.1003>, >> >>> >> >>> <<0,0,0,140,6,30,0,0,0,128,65,149,33,196,247,233, >> >>> >> 21,88,218,104,244,10,153,132,125,40,71,44,131, >> >>> >> >>> 253,22,245,12,59,92,79,134,177,95,51,154,41,176, >> >>> >> >>> 243,232,208,168,184,12,181,124,38,62,214,81,115, >> >>> >> >>> 50,11,63,233,1,35,154,219,53,185,15,122,237,207, >> >>> >> >>> 92,254,52,163,183,160,234,190,135,187,237,54,76, >> >>> >> 129,219,210,144,186,203,125,92,60,144,43,145, >> >>> >> >>> 252,215,173,236,140,234,156,165,21,133,116,117, >> >>> >> >>> 100,130,233,22,62,184,117,253,60,161,185,80,36, >> >>> >> 18,166,97,155,71,133,192,82,143,61,176,78,177, >> >>> 99,138,116,239,183,0,0,0,0,0,0>>} >> >>> ** When State == key_exchange >> >>> ** Data == {state,tcp,gen_tcp,tcp_closed, >> >>> {ssh,server, >> >>> {undefined,{{0,0,0,0,0,65535,32512,1},61612}}, >> >>> {2,0}, >> >>> {2,0}, >> >>> "SSH-2.0-OpenSSH_5.2","SSH-2.0-Erlang", >> >>> >> >>> <<20,12,57,149,244,18,127,223,192,251,128,85,91,196, >> >>> >> >>> 128,29,110,0,0,0,126,100,105,102,102,105,101,45,104, >> >>> >> 101,108,108,109,97,110,45,103,114,111,117,112,45, >> >>> >> >>> 101,120,99,104,97,110,103,101,45,115,104,97,50,53, >> >>> >> 54,44,100,105,102,102,105,101,45,104,101,108,108, >> >>> >> >>> 109,97,110,45,103,114,111,117,112,45,101,120,99,104, >> >>> >> >>> 97,110,103,101,45,115,104,97,49,44,100,105,102,102, >> >>> >> 105,101,45,104,101,108,108,109,97,110,45,103,114, >> >>> >> >>> 111,117,112,49,52,45,115,104,97,49,44,100,105,102, >> >>> >> 102,105,101,45,104,101,108,108,109,97,110,45,103, >> >>> >> 114,111,117,112,49,45,115,104,97,49,0,0,0,15,115, >> >>> >> >>> 115,104,45,114,115,97,44,115,115,104,45,100,115,115, >> >>> >> >>> 0,0,0,157,97,101,115,49,50,56,45,99,116,114,44,97, >> >>> >> >>> 101,115,49,57,50,45,99,116,114,44,97,101,115,50,53, >> >>> >> >>> 54,45,99,116,114,44,97,114,99,102,111,117,114,50,53, >> >>> >> >>> 54,44,97,114,99,102,111,117,114,49,50,56,44,97,101, >> >>> >> >>> 115,49,50,56,45,99,98,99,44,51,100,101,115,45,99,98, >> >>> >> >>> 99,44,98,108,111,119,102,105,115,104,45,99,98,99,44, >> >>> >> >>> 99,97,115,116,49,50,56,45,99,98,99,44,97,101,115,49, >> >>> >> >>> 57,50,45,99,98,99,44,97,101,115,50,53,54,45,99,98, >> >>> >> >>> 99,44,97,114,99,102,111,117,114,44,114,105,106,110, >> >>> >> 100,97,101,108,45,99,98,99,64,108,121,115,97,116, >> >>> >> >>> 111,114,46,108,105,117,46,115,101,0,0,0,157,97,101, >> >>> >> >>> 115,49,50,56,45,99,116,114,44,97,101,115,49,57,50, >> >>> >> >>> 45,99,116,114,44,97,101,115,50,53,54,45,99,116,114, >> >>> >> >>> 44,97,114,99,102,111,117,114,50,53,54,44,97,114,99, >> >>> >> >>> 102,111,117,114,49,50,56,44,97,101,115,49,50,56,45, >> >>> >> 99,98,99,44,51,100,101,115,45,99,98,99,44,98,108, >> >>> >> 111,119,102,105,115,104,45,99,98,99,44,99,97,115, >> >>> >> >>> 116,49,50,56,45,99,98,99,44,97,101,115,49,57,50,45, >> >>> >> >>> 99,98,99,44,97,101,115,50,53,54,45,99,98,99,44,97, >> >>> >> 114,99,102,111,117,114,44,114,105,106,110,100,97, >> >>> >> >>> 101,108,45,99,98,99,64,108,121,115,97,116,111,114, >> >>> >> >>> 46,108,105,117,46,115,101,0,0,0,105,104,109,97,99, >> >>> >> >>> 45,109,100,53,44,104,109,97,99,45,115,104,97,49,44, >> >>> >> >>> 117,109,97,99,45,54,52,64,111,112,101,110,115,115, >> >>> >> >>> 104,46,99,111,109,44,104,109,97,99,45,114,105,112, >> >>> >> 101,109,100,49,54,48,44,104,109,97,99,45,114,105, >> >>> >> >>> 112,101,109,100,49,54,48,64,111,112,101,110,115,115, >> >>> >> >>> 104,46,99,111,109,44,104,109,97,99,45,115,104,97,49, >> >>> >> >>> 45,57,54,44,104,109,97,99,45,109,100,53,45,57,54,0, >> >>> >> >>> 0,0,105,104,109,97,99,45,109,100,53,44,104,109,97, >> >>> >> 99,45,115,104,97,49,44,117,109,97,99,45,54,52,64, >> >>> >> 111,112,101,110,115,115,104,46,99,111,109,44,104, >> >>> >> 109,97,99,45,114,105,112,101,109,100,49,54,48,44, >> >>> >> >>> 104,109,97,99,45,114,105,112,101,109,100,49,54,48, >> >>> >> >>> 64,111,112,101,110,115,115,104,46,99,111,109,44,104, >> >>> >> >>> 109,97,99,45,115,104,97,49,45,57,54,44,104,109,97, >> >>> >> >>> 99,45,109,100,53,45,57,54,0,0,0,26,110,111,110,101, >> >>> >> >>> 44,122,108,105,98,64,111,112,101,110,115,115,104,46, >> >>> >> >>> 99,111,109,44,122,108,105,98,0,0,0,26,110,111,110, >> >>> >> 101,44,122,108,105,98,64,111,112,101,110,115,115, >> >>> >> >>> 104,46,99,111,109,44,122,108,105,98,0,0,0,0,0,0,0,0, >> >>> 0,0,0,0,0>>, >> >>> >> >>> <<20,38,144,242,6,169,190,51,74,102,5,149,16,239,7,65, >> >>> >> >>> 57,0,0,0,26,100,105,102,102,105,101,45,104,101,108, >> >>> >> >>> 108,109,97,110,45,103,114,111,117,112,49,45,115,104, >> >>> >> >>> 97,49,0,0,0,7,115,115,104,45,100,115,115,0,0,0,19, >> >>> >> >>> 97,101,115,49,50,56,45,99,98,99,44,51,100,101,115, >> >>> >> >>> 45,99,98,99,0,0,0,19,97,101,115,49,50,56,45,99,98, >> >>> >> >>> 99,44,51,100,101,115,45,99,98,99,0,0,0,9,104,109,97, >> >>> >> 99,45,115,104,97,49,0,0,0,9,104,109,97,99,45,115, >> >>> >> >>> 104,97,49,0,0,0,9,110,111,110,101,44,122,108,105,98, >> >>> >> >>> 0,0,0,9,110,111,110,101,44,122,108,105,98,0,0,0,0,0, >> >>> 0,0,0,0,0,0,0,0>>, >> >>> {alg,'diffie-hellman-group1-sha1','ssh-dss', >> >>> 'hmac-sha1','hmac-sha1','aes128-cbc', >> >>> 'aes128-cbc',none,none,none,none}, >> >>> >> >>> undefined,undefined,ssh_file,ssh_io,none,undefined,0, >> >>> >> none,undefined,0,none,undefined,8,undefined,none, >> >>> >> >>> undefined,8,undefined,none,undefined,none,undefined, >> >>> none,none,true,infinity,undefined,undefined, >> >>> undefined, >> >>> [{address,"ims"}, >> >>> {port,2223}, >> >>> {system_dir,"/Users/gene/erl_ssh"}, >> >>> {shell,#Fun}, >> >>> {role,server}], >> >>> 1,1,undefined,undefined,undefined,undefined, >> >>> >> >>> undefined,"publickey,keyboard_interactive,password", >> >>> undefined,undefined}, >> >>> #Port<0.1003>,<<>>,<<>>,undefined, >> >>> {ssh_msg_kexinit, >> >>> >> <<127,229,163,177,131,154,163,20,128,32,226,34,154, >> >>> 235,187,170>>, >> >>> ["diffie-hellman-group1-sha1"], >> >>> ["ssh-dss"], >> >>> ["aes128-cbc","3des-cbc"], >> >>> ["aes128-cbc","3des-cbc"], >> >>> ["hmac-sha1"], >> >>> ["hmac-sha1"], >> >>> ["none","zlib"], >> >>> ["none","zlib"], >> >>> [],[],false,0}, >> >>> false,<0.54.0>,undefined,undefined,undefined, >> >>> [{address,"ims"}, >> >>> {port,2223}, >> >>> {system_dir,"/Users/gene/erl_ssh"}, >> >>> {shell,#Fun}, >> >>> {role,server}]} >> >>> ** Reason for termination = >> >>> ** >> >>> >> {error,[{'DSAPrivateKey',<<48,130,1,186,2,1,0,2,129,129,0,170,223,146,206, >> >>> >> >>> 87,111,15,213,167,162,93,159,122,170,251,197,236, >> >>> >> 195,42,174,179,117,37,219,193,70,162,69,63,82, >> >>> >> >>> 132,149,99,206,90,198,153,34,211,176,14,89,142, >> >>> >> >>> 220,203,9,122,34,99,12,156,119,19,117,186,2,233, >> >>> >> >>> 151,22,31,96,153,210,219,121,225,207,231,39,246, >> >>> >> >>> 64,108,176,211,77,252,98,34,16,210,73,17,189,187, >> >>> >> >>> 193,111,191,143,115,49,60,159,218,245,67,241,2, >> >>> >> 130,232,145,217,10,236,86,139,125,238,252,102, >> >>> >> >>> 246,213,110,249,125,80,182,210,55,229,163,214,91, >> >>> >> >>> 112,60,117,209,220,205,2,21,0,159,83,129,175,245, >> >>> >> 131,186,139,165,18,35,133,43,148,124,202,31,9, >> >>> >> >>> 142,189,2,129,128,107,72,221,121,89,226,22,151, >> >>> >> >>> 35,105,202,173,197,168,100,60,58,6,23,223,9,121, >> >>> >> >>> 175,53,248,135,5,120,183,100,107,135,102,219,116, >> >>> >> >>> 63,213,17,149,118,142,19,143,204,168,236,49,165, >> >>> >> >>> 1,136,195,111,248,199,182,253,234,46,173,28,30, >> >>> >> >>> 114,240,8,77,176,107,184,41,108,183,172,165,202, >> >>> >> 3,90,166,69,76,202,187,58,133,192,38,1,38,110, >> >>> >> >>> 212,36,18,35,149,58,218,69,134,143,42,1,174,19, >> >>> >> >>> 233,236,61,165,187,157,254,168,163,243,248,227, >> >>> >> >>> 110,122,213,72,107,214,220,212,99,245,106,120,91, >> >>> >> >>> 131,2,129,128,113,214,224,173,14,157,34,113,59, >> >>> >> >>> 116,57,129,233,210,114,12,213,159,133,106,34,130, >> >>> >> >>> 102,199,157,241,226,84,186,245,237,230,106,6,231, >> >>> >> >>> 231,140,208,106,53,74,56,77,48,92,112,47,91,236, >> >>> >> 135,107,16,8,93,241,130,5,118,126,197,127,233, >> >>> >> >>> 238,199,226,7,79,225,193,139,174,87,11,168,190, >> >>> >> >>> 220,127,150,135,210,198,209,242,104,166,143,236, >> >>> >> >>> 18,125,22,64,26,53,139,45,219,45,144,236,245,193, >> >>> >> >>> 127,152,100,103,179,152,156,208,18,94,96,227,44, >> >>> >> >>> 151,136,194,77,114,12,70,223,143,194,196,204,101, >> >>> >> >>> 184,2,20,43,222,65,115,20,238,35,218,102,176,95, >> >>> 196,101,68,47,163,229,153,49,118>>, >> >>> not_encrypted}]} >> >>> >> >>> =ERROR REPORT==== 15-Sep-2010::17:18:48 === >> >>> ** Generic server <0.52.0> terminating >> >>> ** Last message in was {'EXIT',<0.55.0>, >> >>> {error, >> >>> [{'DSAPrivateKey', >> >>> >> >>> <<48,130,1,186,2,1,0,2,129,129,0,170,223, >> >>> >> >>> 146,206,87,111,15,213,167,162,93,159,122, >> >>> >> 170,251,197,236,195,42,174,179,117,37, >> >>> >> >>> 219,193,70,162,69,63,82,132,149,99,206, >> >>> >> >>> 90,198,153,34,211,176,14,89,142,220,203, >> >>> >> >>> 9,122,34,99,12,156,119,19,117,186,2,233, >> >>> >> >>> 151,22,31,96,153,210,219,121,225,207,231, >> >>> >> 39,246,64,108,176,211,77,252,98,34,16, >> >>> >> >>> 210,73,17,189,187,193,111,191,143,115,49, >> >>> >> >>> 60,159,218,245,67,241,2,130,232,145,217, >> >>> >> 10,236,86,139,125,238,252,102,246,213, >> >>> >> >>> 110,249,125,80,182,210,55,229,163,214,91, >> >>> >> >>> 112,60,117,209,220,205,2,21,0,159,83,129, >> >>> >> >>> 175,245,131,186,139,165,18,35,133,43,148, >> >>> >> 124,202,31,9,142,189,2,129,128,107,72, >> >>> >> >>> 221,121,89,226,22,151,35,105,202,173,197, >> >>> >> >>> 168,100,60,58,6,23,223,9,121,175,53,248, >> >>> >> >>> 135,5,120,183,100,107,135,102,219,116,63, >> >>> >> >>> 213,17,149,118,142,19,143,204,168,236,49, >> >>> >> >>> 165,1,136,195,111,248,199,182,253,234,46, >> >>> >> 173,28,30,114,240,8,77,176,107,184,41, >> >>> >> >>> 108,183,172,165,202,3,90,166,69,76,202, >> >>> >> >>> 187,58,133,192,38,1,38,110,212,36,18,35, >> >>> >> 149,58,218,69,134,143,42,1,174,19,233, >> >>> >> >>> 236,61,165,187,157,254,168,163,243,248, >> >>> >> 227,110,122,213,72,107,214,220,212,99, >> >>> >> >>> 245,106,120,91,131,2,129,128,113,214,224, >> >>> >> >>> 173,14,157,34,113,59,116,57,129,233,210, >> >>> >> 114,12,213,159,133,106,34,130,102,199, >> >>> >> >>> 157,241,226,84,186,245,237,230,106,6,231, >> >>> >> >>> 231,140,208,106,53,74,56,77,48,92,112,47, >> >>> >> >>> 91,236,135,107,16,8,93,241,130,5,118,126, >> >>> >> >>> 197,127,233,238,199,226,7,79,225,193,139, >> >>> >> 174,87,11,168,190,220,127,150,135,210, >> >>> >> >>> 198,209,242,104,166,143,236,18,125,22,64, >> >>> >> >>> 26,53,139,45,219,45,144,236,245,193,127, >> >>> >> >>> 152,100,103,179,152,156,208,18,94,96,227, >> >>> >> >>> 44,151,136,194,77,114,12,70,223,143,194, >> >>> >> 196,204,101,184,2,20,43,222,65,115,20, >> >>> >> >>> 238,35,218,102,176,95,196,101,68,47,163, >> >>> 229,153,49,118>>, >> >>> not_encrypted}]}} >> >>> ** When Server state == {state,server,<0.54.0>,<0.55.0>,undefined} >> >>> ** Reason for termination == >> >>> ** >> >>> >> {error,[{'DSAPrivateKey',<<48,130,1,186,2,1,0,2,129,129,0,170,223,146,206, >> >>> >> >>> 87,111,15,213,167,162,93,159,122,170,251,197,236, >> >>> >> 195,42,174,179,117,37,219,193,70,162,69,63,82, >> >>> >> >>> 132,149,99,206,90,198,153,34,211,176,14,89,142, >> >>> >> >>> 220,203,9,122,34,99,12,156,119,19,117,186,2,233, >> >>> >> >>> 151,22,31,96,153,210,219,121,225,207,231,39,246, >> >>> >> >>> 64,108,176,211,77,252,98,34,16,210,73,17,189,187, >> >>> >> >>> 193,111,191,143,115,49,60,159,218,245,67,241,2, >> >>> >> 130,232,145,217,10,236,86,139,125,238,252,102, >> >>> >> >>> 246,213,110,249,125,80,182,210,55,229,163,214,91, >> >>> >> >>> 112,60,117,209,220,205,2,21,0,159,83,129,175,245, >> >>> >> 131,186,139,165,18,35,133,43,148,124,202,31,9, >> >>> >> >>> 142,189,2,129,128,107,72,221,121,89,226,22,151, >> >>> >> >>> 35,105,202,173,197,168,100,60,58,6,23,223,9,121, >> >>> >> >>> 175,53,248,135,5,120,183,100,107,135,102,219,116, >> >>> >> >>> 63,213,17,149,118,142,19,143,204,168,236,49,165, >> >>> >> >>> 1,136,195,111,248,199,182,253,234,46,173,28,30, >> >>> >> >>> 114,240,8,77,176,107,184,41,108,183,172,165,202, >> >>> >> 3,90,166,69,76,202,187,58,133,192,38,1,38,110, >> >>> >> >>> 212,36,18,35,149,58,218,69,134,143,42,1,174,19, >> >>> >> >>> 233,236,61,165,187,157,254,168,163,243,248,227, >> >>> >> >>> 110,122,213,72,107,214,220,212,99,245,106,120,91, >> >>> >> >>> 131,2,129,128,113,214,224,173,14,157,34,113,59, >> >>> >> >>> 116,57,129,233,210,114,12,213,159,133,106,34,130, >> >>> >> >>> 102,199,157,241,226,84,186,245,237,230,106,6,231, >> >>> >> >>> 231,140,208,106,53,74,56,77,48,92,112,47,91,236, >> >>> >> 135,107,16,8,93,241,130,5,118,126,197,127,233, >> >>> >> >>> 238,199,226,7,79,225,193,139,174,87,11,168,190, >> >>> >> >>> 220,127,150,135,210,198,209,242,104,166,143,236, >> >>> >> >>> 18,125,22,64,26,53,139,45,219,45,144,236,245,193, >> >>> >> >>> 127,152,100,103,179,152,156,208,18,94,96,227,44, >> >>> >> >>> 151,136,194,77,114,12,70,223,143,194,196,204,101, >> >>> >> >>> 184,2,20,43,222,65,115,20,238,35,218,102,176,95, >> >>> 196,101,68,47,163,229,153,49,118>>, >> >>> not_encrypted}]} >> >>> >> >>> >> >>> ________________________________________________________________ >> >>> erlang-bugs (at) erlang.org mailing list. >> >>> See http://www.erlang.org/faq.html >> >>> To unsubscribe; mailto:erlang-bugs-unsubscribe@REDACTED >> >>> >> >>> >> >> >> >> >> >> -- >> >> Maxim Treskin >> >> >> > >> > >> > >> > ________________________________________________________________ >> > erlang-bugs (at) erlang.org mailing list. >> > See http://www.erlang.org/faq.html >> > To unsubscribe; mailto:erlang-bugs-unsubscribe@REDACTED >> > >> >> >> ________________________________________________________________ >> erlang-bugs (at) erlang.org mailing list. >> See http://www.erlang.org/faq.html >> To unsubscribe; mailto:erlang-bugs-unsubscribe@REDACTED >> >> > > > -- > Maxim Treskin > -- Maxim Treskin -------------- next part -------------- An HTML attachment was scrubbed... URL: -------------- next part -------------- A non-text attachment was scrubbed... Name: 0001-Do-not-use-deprecated-public_key-pem_to_der-2-with-u.patch Type: application/octet-stream Size: 1116 bytes Desc: not available URL: From attila.r.nohl@REDACTED Mon Sep 27 12:04:53 2010 From: attila.r.nohl@REDACTED (Attila Rajmund Nohl) Date: Mon, 27 Sep 2010 12:04:53 +0200 Subject: [erlang-patches] fix process leak in ssh_system_sup (dynamicaly created childs where not cleaned up) In-Reply-To: References: <201009012018.26428.sg2342@googlemail.com> Message-ID: Hello! The sub_subsystem function looks like this in the R14B sources: stop_subsystem(SystemSup, SubSys) -> case lists:keyfind(SubSys, 2, supervisor:which_children(SystemSup)) of false -> {error, not_found}; {Id, _, _, _} -> spawn(fun() -> supervisor:terminate_child(SystemSup, Id), supervisor:delete_child(SystemSup, Id) end), ok; {'EXIT', {noproc, _}} -> %% Already terminated; probably shutting down. ok; {'EXIT', {shutdown, _}} -> %% Already shutting down. ok end. I think a catch is missing from the case... 2010/9/2, Niclas Eklund : > > Hello! > > Thanks for reporting this! I've added your patch and it will be included > in R14B. I had to do some additional changes to avoid a race condition > between some processes. > > Best regards, > > Niclas @ Erlang/OTP > > On Wed, 1 Sep 2010, Stefan Grundmann wrote: > >> The ssh_system_sup supervisor supervises one ssh_subsystem_sup process for >> every client connection. There was no functionality to free resources >> (terminate_child/ delete_child) when a client connection was closed. >> Which lead to one ssh_subsystem_sup and one ssh_channel_sup process left >> over. >> >> This commit adds ssh_system_sup:stop_subsystem/2 and code that calls it >> in ssh_connection_manager:terminate/2. >> >> git fetch git://github.com/sg2342/otp.git fix_ssh_system_sup_proc_leak >> >> best regards >> >> Stefan Grundmann >> >> ________________________________________________________________ >> erlang-patches (at) erlang.org mailing list. >> See http://www.erlang.org/faq.html >> To unsubscribe; mailto:erlang-patches-unsubscribe@REDACTED >> > > > > ________________________________________________________________ > erlang-patches (at) erlang.org mailing list. > See http://www.erlang.org/faq.html > To unsubscribe; mailto:erlang-patches-unsubscribe@REDACTED > > From nick@REDACTED Mon Sep 27 15:17:28 2010 From: nick@REDACTED (Niclas Eklund) Date: Mon, 27 Sep 2010 15:17:28 +0200 (CEST) Subject: [erlang-patches] fix process leak in ssh_system_sup (dynamicaly created childs where not cleaned up) In-Reply-To: References: <201009012018.26428.sg2342@googlemail.com> Message-ID: Hello! Yes it is. I've already fixed this and it will be released as soon as possible. But thanks for pointing this out :-) Best regards, Niclas @ Erlang/OTP On Mon, 27 Sep 2010, Attila Rajmund Nohl wrote: > Hello! > > The sub_subsystem function looks like this in the R14B sources: > > stop_subsystem(SystemSup, SubSys) -> > case lists:keyfind(SubSys, 2, supervisor:which_children(SystemSup)) of > false -> > {error, not_found}; > {Id, _, _, _} -> > spawn(fun() -> supervisor:terminate_child(SystemSup, Id), > supervisor:delete_child(SystemSup, Id) end), > ok; > {'EXIT', {noproc, _}} -> > %% Already terminated; probably shutting down. > ok; > {'EXIT', {shutdown, _}} -> > %% Already shutting down. > ok > end. > > I think a catch is missing from the case... > > 2010/9/2, Niclas Eklund : >> >> Hello! >> >> Thanks for reporting this! I've added your patch and it will be included >> in R14B. I had to do some additional changes to avoid a race condition >> between some processes. >> >> Best regards, >> >> Niclas @ Erlang/OTP >> >> On Wed, 1 Sep 2010, Stefan Grundmann wrote: >> >>> The ssh_system_sup supervisor supervises one ssh_subsystem_sup process for >>> every client connection. There was no functionality to free resources >>> (terminate_child/ delete_child) when a client connection was closed. >>> Which lead to one ssh_subsystem_sup and one ssh_channel_sup process left >>> over. >>> >>> This commit adds ssh_system_sup:stop_subsystem/2 and code that calls it >>> in ssh_connection_manager:terminate/2. >>> >>> git fetch git://github.com/sg2342/otp.git fix_ssh_system_sup_proc_leak >>> >>> best regards >>> >>> Stefan Grundmann >>> >>> ________________________________________________________________ >>> erlang-patches (at) erlang.org mailing list. >>> See http://www.erlang.org/faq.html >>> To unsubscribe; mailto:erlang-patches-unsubscribe@REDACTED >>> >> >> >> >> ________________________________________________________________ >> erlang-patches (at) erlang.org mailing list. >> See http://www.erlang.org/faq.html >> To unsubscribe; mailto:erlang-patches-unsubscribe@REDACTED >> >> > From bgustavsson@REDACTED Mon Sep 27 15:30:41 2010 From: bgustavsson@REDACTED (=?UTF-8?Q?Bj=C3=B6rn_Gustavsson?=) Date: Mon, 27 Sep 2010 15:30:41 +0200 Subject: [erlang-patches] [PATCH] httpc module - allow streaming of bodies for PUT and POST requests In-Reply-To: References: Message-ID: On Sun, Sep 26, 2010 at 1:04 PM, Filipe David Manana wrote: > Hi, > > The following patch, as a github commit, allows for streaming of HTTP PUT > and POST requests. > > http://github.com/fdmanana/otp/commit/2d0e66d9d41c813b6fb09179bdcd29910bf0d296 Thanks! Will include in 'pu'. For your next submission, please provide the command needed to fetch your branch. For example: git fetch git://github.com/fdmanana/otp.git httpc_upload_body_streaming -- Bj?rn Gustavsson, Erlang/OTP, Ericsson AB From fdmanana@REDACTED Mon Sep 27 16:22:09 2010 From: fdmanana@REDACTED (Filipe David Manana) Date: Mon, 27 Sep 2010 15:22:09 +0100 Subject: [erlang-patches] [PATCH] httpc module - allow streaming of bodies for PUT and POST requests In-Reply-To: References: Message-ID: 2010/9/27 Bj?rn Gustavsson : > On Sun, Sep 26, 2010 at 1:04 PM, Filipe David Manana > wrote: >> Hi, >> >> The following patch, as a github commit, allows for streaming of HTTP PUT >> and POST requests. >> >> http://github.com/fdmanana/otp/commit/2d0e66d9d41c813b6fb09179bdcd29910bf0d296 > > Thanks! Will include in 'pu'. > > For your next submission, please provide the command needed to fetch > your branch. Actually it's not the first. I forgot the submission procedure since it's been a while since the last one. Sorry :) cheers > For example: > > git fetch git://github.com/fdmanana/otp.git httpc_upload_body_streaming > > -- > Bj?rn Gustavsson, Erlang/OTP, Ericsson AB > > ________________________________________________________________ > erlang-patches (at) erlang.org mailing list. > See http://www.erlang.org/faq.html > To unsubscribe; mailto:erlang-patches-unsubscribe@REDACTED > > -- Filipe David Manana, fdmanana@REDACTED, fdmanana@REDACTED "Reasonable men adapt themselves to the world. ?Unreasonable men adapt the world to themselves. ?That's why all progress depends on unreasonable men." From mikpe@REDACTED Mon Sep 27 19:21:51 2010 From: mikpe@REDACTED (Mikael Pettersson) Date: Mon, 27 Sep 2010 19:21:51 +0200 Subject: fix 64-bit writes to 32-bit struct field in HiPE runtime Message-ID: <19616.53935.668159.552549@pilspetsen.it.uu.se> In the HiPE part of the runtime system's Process struct there is a state field which is 32 bits wide even on 64-bit machines. There is a single instruction in the HiPE AMD64 runtime where this field is incorrectly written with a 64-bit store. Luckily the extraneous 32 bits are written as zeros to 4 bytes of tail-padding at the end of the struct, so nothing should have broken because of this. The same bug exists in the HiPE PowerPC64 runtime (in development), but on the big-endian PPC64 the effect is to write the actual value to the tail-padding and zero to the struct field, which potentially breaks TRAPs from BIFs (depending on BIF arities and how many parameter registers the runtime has been configured to use). Thanks to Paul Guyot for noticing the oversized write on AMD64. Fixed as follows: --- otp_src_R14B/erts/emulator/hipe/hipe_amd64_glue.S.~1~ 2010-09-13 19:00:22.000000000 +0200 +++ otp_src_R14B/erts/emulator/hipe/hipe_amd64_glue.S 2010-09-27 18:28:12.000000000 +0200 @@ -402,7 +402,7 @@ nbif_3_simple_exception: * - the native heap/stack/reds registers are saved in P */ .handle_trap: - movq %rax, P_NARITY(P) + movl %eax, P_NARITY(P) # Note: narity is a 32-bit field movl $HIPE_MODE_SWITCH_RES_TRAP, %eax jmp .nosave_exit --- otp_src_R14B/erts/emulator/hipe/hipe_ppc_glue.S.~1~ 2010-09-13 19:00:22.000000000 +0200 +++ otp_src_R14B/erts/emulator/hipe/hipe_ppc_glue.S 2010-09-27 18:28:12.000000000 +0200 @@ -541,7 +541,7 @@ CSYM(nbif_3_simple_exception): .handle_trap: li r3, HIPE_MODE_SWITCH_RES_TRAP STORE NSP, P_NSP(P) - STORE r4, P_NARITY(P) + stw r4, P_NARITY(P) /* Note: narity is a 32-bit field */ STORE TEMP_LR, P_NRA(P) b .nosave_exit From pguyot@REDACTED Tue Sep 28 11:40:05 2010 From: pguyot@REDACTED (Paul Guyot) Date: Tue, 28 Sep 2010 11:40:05 +0200 Subject: process_info(P,current_function) and HiPE (was Re: Bugs with hibernate/3 and HiPE) In-Reply-To: <509D06B0-008C-4AFE-B356-0FBBBDA71086@kallisys.net> References: <509D06B0-008C-4AFE-B356-0FBBBDA71086@kallisys.net> Message-ID: <94679BA9-92D1-4A8E-938D-E401C918C570@kallisys.net> > Hello, > > There are several bugs related to hibernate/3 BIF and HiPE: > > 1. erlang:hibernate/3 simply fails with badarg when called from HiPE. > 2. erlang:hibernate/3 simply fails with badarg when called dynamically, in a way that the compiler and the loader cannot replace with the i_hibernate beam instruction. > 3. There is a segfault in the garbage collector when calling erlang:hibernate/3 (from beam unless bug #1 is fixed) if the process went through HiPE. This is because erts_garbage_collect_hibernate would not clean up the hipe process state. > > These bugs are highly related: 1 and 2 are actually the same bug (hibernate/3 BIF isn't implemented, and apparently wasn't since it was introduced), and 3 causes segfaults with any reasonable test once bug #1 is fixed. > > The following patch fixes these issues: > http://github.com/pguyot/otp/commit/fcc005c8758d97d7f0c402bfffede0b22b8ab401 > git fetch git://github.com/pguyot/otp.git fix-hibernate-with-hipe Hello, I realize I sent the e-mail above to erlang-bugs@ instead of erlang-patches@REDACTED Besides, even with this fix to hibernate, gen_server_SUITE:hibernate/1 test does not pass when OTP is configured with --enable-native-libs. This is not because the process does not hibernate or does not wake up. Instead, the test heavily relies on process_info(P, current_function) which is not updated by HiPE, while beam updates it (on context switch, I guess). What is the policy for current_function? When started and when awoken after an hibernation, a simple gen_server with a non-native callback module with non-native gen_server and non-native proc_lib modules reports {current_function,{gen_server,loop,6}}. The same non-native callback module with native proc_lib and native gen_server reports {current_function,undefined} when started and {current_function,{erlang,hibernate,3}} when awoken after an hibernation (because erts_hibernate function sets current to the hibernate_3 BIF). Should we update HiPE to report some current_function, at least when switching mode? Or should we clear the current_function when waking up from hibernation? Regards, Paul -- Semiocast http://semiocast.com/ +33.175000290 - 62 bis rue Gay-Lussac, 75005 Paris From mikpe@REDACTED Tue Sep 28 15:27:53 2010 From: mikpe@REDACTED (Mikael Pettersson) Date: Tue, 28 Sep 2010 15:27:53 +0200 Subject: process_info(P,current_function) and HiPE (was Re: Bugs with hibernate/3 and HiPE) In-Reply-To: <94679BA9-92D1-4A8E-938D-E401C918C570@kallisys.net> References: <509D06B0-008C-4AFE-B356-0FBBBDA71086@kallisys.net> <94679BA9-92D1-4A8E-938D-E401C918C570@kallisys.net> Message-ID: <19617.60761.599137.961032@pilspetsen.it.uu.se> Paul Guyot writes: > > Hello, > > > > There are several bugs related to hibernate/3 BIF and HiPE: > > > > 1. erlang:hibernate/3 simply fails with badarg when called from HiPE. > > 2. erlang:hibernate/3 simply fails with badarg when called dynamically, in a way that the compiler and the loader cannot replace with the i_hibernate beam instruction. > > 3. There is a segfault in the garbage collector when calling erlang:hibernate/3 (from beam unless bug #1 is fixed) if the process went through HiPE. This is because erts_garbage_collect_hibernate would not clean up the hipe process state. > > > > These bugs are highly related: 1 and 2 are actually the same bug (hibernate/3 BIF isn't implemented, and apparently wasn't since it was introduced), and 3 causes segfaults with any reasonable test once bug #1 is fixed. > > > > The following patch fixes these issues: > > http://github.com/pguyot/otp/commit/fcc005c8758d97d7f0c402bfffede0b22b8ab401 > > git fetch git://github.com/pguyot/otp.git fix-hibernate-with-hipe > > > Hello, > > I realize I sent the e-mail above to erlang-bugs@ instead of erlang-patches@REDACTED > > Besides, even with this fix to hibernate, gen_server_SUITE:hibernate/1 test does not pass when OTP is configured with --enable-native-libs. This is not because the process does not hibernate or does not wake up. Instead, the test heavily relies on process_info(P, current_function) which is not updated by HiPE, while beam updates it (on context switch, I guess). > > What is the policy for current_function? As far as HiPE is concerned, process_info(P, current_function) is a BEAM-only introspection mechanism that should not be considered part of the Erlang language. It's unfortunate that the test case relies on it. > When started and when awoken after an hibernation, a simple gen_server with a non-native callback module with non-native gen_server and non-native proc_lib modules reports {current_function,{gen_server,loop,6}}. The same non-native callback module with native proc_lib and native gen_server reports {current_function,undefined} when started and {current_function,{erlang,hibernate,3}} when awoken after an hibernation (because erts_hibernate function sets current to the hibernate_3 BIF). Should we update HiPE to report some current_function, at least when switching mode? Or should we clear the current_function when waking up from hibernation? Please investigate: a) when and how BEAM updates current_function, and b) when you're allowed to call process_info(P, current_function) on a BEAM-mode function and what it returns; what if the target process is currently running? does it stop or does process_info then return stale data c) to what extent the hibernate test relies on the above Then maybe we can find a way to emulate the needed functionality without hurting performance. /Mikael From pguyot@REDACTED Tue Sep 28 16:21:47 2010 From: pguyot@REDACTED (Paul Guyot) Date: Tue, 28 Sep 2010 16:21:47 +0200 Subject: [erlang-bugs] Bugs with hibernate/3 and HiPE In-Reply-To: <19617.62310.999688.690826@pilspetsen.it.uu.se> References: <509D06B0-008C-4AFE-B356-0FBBBDA71086@kallisys.net> <19617.62310.999688.690826@pilspetsen.it.uu.se> Message-ID: <5E789996-F79E-48C8-8B04-EE4C4C91BCDC@kallisys.net> Le 28 sept. 2010 ? 15:53, Mikael Pettersson a ?crit : > Your "fix" for #3 is wrong I think. hibernate should empty the stack. > If you don't empty the native stack then yes, at the next GC, we'd > scan a dead stack, find dead pointers to stale data, and do bad things. > Your call to fullsweep_nstack() changes this so that in the next GC > we scan a dead stack, find dead pointers to tenured data, and don't > crash. > > The correct fix ought to be to simply empty the native stack. There's > no existing procedure for doing that, but something like > > void hipe_empty_nstack(Process *p) > { > p->hipe.nstgraylim = NULL; > #if defined(HIPE_NSTACK_GROWS_DOWN) > p->hipe.nsp = p->hipe.nstend; > #else > p->hipe.nsp = p->hipe.nstack; > #endif > } > > should be close to what's needed. hipe_native_bifs.c right after the > definitions of hipe_inc_nstack() seems like a reasonable place to put it. Mikael, Thank you for your e-mail and carefully reviewing this fix. I initially tried to empty the native stack but this crashed, as I definitely lacked the grasp of the native garbage collector for this fix. This function seems to work, at least the hibernate_native_SUITE tests pass. I committed your suggested change on top of the original commit here: git fetch git://github.com/pguyot/otp.git fix-hibernate-with-hipe http://github.com/pguyot/otp/commit/1d5234d5ef54f60e50b36d42083a8cd86429bcb4 Also, I guess you meant hipe_switch_mode.c instead of hipe_native_bifs.c. Regards, Paul -- Semiocast http://semiocast.com/ +33.175000290 - 62 bis rue Gay-Lussac, 75005 Paris From pguyot@REDACTED Thu Sep 30 10:28:49 2010 From: pguyot@REDACTED (Paul Guyot) Date: Thu, 30 Sep 2010 10:28:49 +0200 Subject: hibernate/3 and HiPE In-Reply-To: <19619.9805.31482.502922@pilspetsen.it.uu.se> References: <509D06B0-008C-4AFE-B356-0FBBBDA71086@kallisys.net> <94679BA9-92D1-4A8E-938D-E401C918C570@kallisys.net> <19617.60761.599137.961032@pilspetsen.it.uu.se> <6C940E94-C9AD-4441-84DE-B34201F6A791@kallisys.net> <19619.9805.31482.502922@pilspetsen.it.uu.se> Message-ID: <11B31815-6B3D-44C4-819B-7E9764406984@kallisys.net> Hello, The following branch contains fixes for hibernate/3 and HiPE: http://github.com/pguyot/otp/commits/fix-hibernate-with-hipe git fetch git://github.com/pguyot/otp.git fix-hibernate-with-hipe All the changes have been squashed into a single refined patch: http://github.com/pguyot/otp/commit/19934190bf8c4f1232aefd92bc581b58a8e38d75 This new version of the patch fixes some logic fault in stack emptying and when scheduling after a TRAP in HiPE. It also resets p->current when entering hipe_mode_switch as suggested by Mikael Pettersson, thus making all stdlib hibernate-related tests pass with --enable-native-libs. Regards, Paul -- Semiocast http://semiocast.com/ +33.175000290 - 62 bis rue Gay-Lussac, 75005 Paris From tuncer.ayaz@REDACTED Thu Sep 30 13:22:22 2010 From: tuncer.ayaz@REDACTED (Tuncer Ayaz) Date: Thu, 30 Sep 2010 13:22:22 +0200 Subject: [PATCH] Dialyzer: Fix dialyzer_plt:included_files/1 spec Message-ID: <1285845742-847-1-git-send-email-tuncer.ayaz@gmail.com> dialyzer_plt:included_files/1 calls get_record_from_file/1 and may therefore also return {error, not_valid}. --- lib/dialyzer/src/dialyzer_plt.erl | 2 +- 1 files changed, 1 insertions(+), 1 deletions(-) diff --git a/lib/dialyzer/src/dialyzer_plt.erl b/lib/dialyzer/src/dialyzer_plt.erl index 0f5be3b..afc315f 100644 --- a/lib/dialyzer/src/dialyzer_plt.erl +++ b/lib/dialyzer/src/dialyzer_plt.erl @@ -244,7 +244,7 @@ from_file(FileName, ReturnInfo) -> [FileName, Reason])) end. --type inc_file_err_rsn() :: 'no_such_file' | 'read_error'. +-type inc_file_err_rsn() :: 'not_valid' | 'no_such_file' | 'read_error'. -spec included_files(file:filename()) -> {'ok', [file:filename()]} | {'error', inc_file_err_rsn()}. From bgustavsson@REDACTED Thu Sep 30 14:14:52 2010 From: bgustavsson@REDACTED (=?UTF-8?Q?Bj=C3=B6rn_Gustavsson?=) Date: Thu, 30 Sep 2010 14:14:52 +0200 Subject: [erlang-patches] Re: process_info(P,current_function) and HiPE (was Re: Bugs with hibernate/3 and HiPE) In-Reply-To: <19617.60761.599137.961032@pilspetsen.it.uu.se> References: <509D06B0-008C-4AFE-B356-0FBBBDA71086@kallisys.net> <94679BA9-92D1-4A8E-938D-E401C918C570@kallisys.net> <19617.60761.599137.961032@pilspetsen.it.uu.se> Message-ID: On Tue, Sep 28, 2010 at 3:27 PM, Mikael Pettersson wrote: > b) when you're allowed to call process_info(P, current_function) on > a BEAM-mode function and what it returns; what if the target process > is currently running? does it stop or does process_info then return > stale data process_info(P, current_function) will not return stale data. It will wait (in an efficient way) for the target process to stop running before it reads out the current function. So the current function returned will always be the function that was current the last time the target process was scheduled out. Basically, current_function must be up-to-date when scheduling out the process or when process_info(self(), current_function) is called. BEAM calls process_info/{1,2} through apply_bif to make sure that c_p->current_function is up-to-date. -- Bj?rn Gustavsson, Erlang/OTP, Ericsson AB From bgustavsson@REDACTED Thu Sep 30 14:56:38 2010 From: bgustavsson@REDACTED (=?UTF-8?Q?Bj=C3=B6rn_Gustavsson?=) Date: Thu, 30 Sep 2010 14:56:38 +0200 Subject: [erlang-patches] Re: [erlang-bugs] Bugs with hibernate/3 and HiPE In-Reply-To: <5E789996-F79E-48C8-8B04-EE4C4C91BCDC@kallisys.net> References: <509D06B0-008C-4AFE-B356-0FBBBDA71086@kallisys.net> <19617.62310.999688.690826@pilspetsen.it.uu.se> <5E789996-F79E-48C8-8B04-EE4C4C91BCDC@kallisys.net> Message-ID: On Tue, Sep 28, 2010 at 4:21 PM, Paul Guyot wrote: > > git fetch git://github.com/pguyot/otp.git fix-hibernate-with-hipe > http://github.com/pguyot/otp/commit/1d5234d5ef54f60e50b36d42083a8cd86429bcb4 Thanks! Will include in pu. -- Bj?rn Gustavsson, Erlang/OTP, Ericsson AB From bgustavsson@REDACTED Thu Sep 30 15:00:19 2010 From: bgustavsson@REDACTED (=?UTF-8?Q?Bj=C3=B6rn_Gustavsson?=) Date: Thu, 30 Sep 2010 15:00:19 +0200 Subject: [erlang-patches] fix 64-bit writes to 32-bit struct field in HiPE runtime In-Reply-To: <19616.53935.668159.552549@pilspetsen.it.uu.se> References: <19616.53935.668159.552549@pilspetsen.it.uu.se> Message-ID: On Mon, Sep 27, 2010 at 7:21 PM, Mikael Pettersson wrote: > In the HiPE part of the runtime system's Process struct > there is a state field which is 32 bits wide even on 64-bit > machines. > > There is a single instruction in the HiPE AMD64 runtime > where this field is incorrectly written with a 64-bit store. > Luckily the extraneous 32 bits are written as zeros to 4 > bytes of tail-padding at the end of the struct, so nothing > should have broken because of this. > > The same bug exists in the HiPE PowerPC64 runtime (in > development), but on the big-endian PPC64 the effect is > to write the actual value to the tail-padding and zero > to the struct field, which potentially breaks TRAPs from > BIFs (depending on BIF arities and how many parameter > registers the runtime has been configured to use). > > Thanks to Paul Guyot for noticing the oversized write on AMD64. Thanks! Will include in pu. -- Bj?rn Gustavsson, Erlang/OTP, Ericsson AB From bgustavsson@REDACTED Thu Sep 30 15:03:50 2010 From: bgustavsson@REDACTED (=?UTF-8?Q?Bj=C3=B6rn_Gustavsson?=) Date: Thu, 30 Sep 2010 15:03:50 +0200 Subject: [erlang-patches] [PATCH] Dialyzer: Fix dialyzer_plt:included_files/1 spec In-Reply-To: <1285845742-847-1-git-send-email-tuncer.ayaz@gmail.com> References: <1285845742-847-1-git-send-email-tuncer.ayaz@gmail.com> Message-ID: On Thu, Sep 30, 2010 at 1:22 PM, Tuncer Ayaz wrote: > dialyzer_plt:included_files/1 calls get_record_from_file/1 and may > therefore also return {error, not_valid}. Thanks! Will include in pu. -- Bj?rn Gustavsson, Erlang/OTP, Ericsson AB From mikpe@REDACTED Thu Sep 30 20:57:05 2010 From: mikpe@REDACTED (Mikael Pettersson) Date: Thu, 30 Sep 2010 20:57:05 +0200 Subject: hibernate/3 and HiPE In-Reply-To: <11B31815-6B3D-44C4-819B-7E9764406984@kallisys.net> References: <509D06B0-008C-4AFE-B356-0FBBBDA71086@kallisys.net> <94679BA9-92D1-4A8E-938D-E401C918C570@kallisys.net> <19617.60761.599137.961032@pilspetsen.it.uu.se> <6C940E94-C9AD-4441-84DE-B34201F6A791@kallisys.net> <19619.9805.31482.502922@pilspetsen.it.uu.se> <11B31815-6B3D-44C4-819B-7E9764406984@kallisys.net> Message-ID: <19620.56705.858868.664710@pilspetsen.it.uu.se> Paul Guyot writes: > Hello, > > The following branch contains fixes for hibernate/3 and HiPE: > http://github.com/pguyot/otp/commits/fix-hibernate-with-hipe > git fetch git://github.com/pguyot/otp.git fix-hibernate-with-hipe > > All the changes have been squashed into a single refined patch: > http://github.com/pguyot/otp/commit/19934190bf8c4f1232aefd92bc581b58a8e38d75 > > This new version of the patch fixes some logic fault in stack emptying and when scheduling after a TRAP in HiPE. It also resets p->current when entering hipe_mode_switch as suggested by Mikael Pettersson, thus making all stdlib hibernate-related tests pass with --enable-native-libs. This one is Ok.