From jimenezrick@REDACTED Sat Feb 4 16:55:10 2012
From: jimenezrick@REDACTED (Ricardo Catalinas =?iso-8859-1?Q?Jim=E9nez?=)
Date: Sat, 4 Feb 2012 16:55:10 +0100
Subject: [erlang-patches] Fix port leaking after controlling_process(Port,
self())
Message-ID: <20120204155510.GA1431@viper.local>
I spotted the same issue that Max Lapshin reported in:
http://erlang.org/pipermail/erlang-questions/2011-April/057944.html
Add case to handle the situation when someone call
{gen_tcp,gen_udp}:controlling_process(Port, self()). Also improve spec
and doc from gen_udp and gen_sctp for controlling_process/2.
To reproduce the issue, open an UDP port:
4> {ok,Port} = gen_udp:open(9000, [binary]).
{ok,#Port<0.587>}
5> gen_udp:controlling_process(Port, self()).
ok
Simulate error:
6> 1=2.
** exception error: no match of right hand side value 2
Here is the leak:
7> inet:i().
Port Module Recv Sent Owner Local Address Foreign Address State
Type
581 inet_udp 0 0 <0.31.0> *:cslistener *:* BOUND
DGRAM
ok
Please fetch:
git fetch git://github.com/jimenezrick/otp.git fix-gen_udp_tcp-leak
Review here:
https://github.com/jimenezrick/otp/compare/erlang:maint...jimenezrick:fix-gen_udp_tcp-leak
https://github.com/jimenezrick/otp/compare/erlang:maint...jimenezrick:fix-gen_udp_tcp-leak.patch
Regards
--
Ricardo (http://r.untroubled.be/)
From jimenezrick@REDACTED Sat Feb 4 17:03:45 2012
From: jimenezrick@REDACTED (Ricardo Catalinas =?iso-8859-1?Q?Jim=E9nez?=)
Date: Sat, 4 Feb 2012 17:03:45 +0100
Subject: [erlang-patches] Fix typo in `compile' doc: unmatched parenthesis
Message-ID: <20120204160345.GB1431@viper.local>
Please fetch:
git fetch git://github.com/jimenezrick/otp.git fix-compile-doc-typo
Review here:
https://github.com/jimenezrick/otp/compare/erlang:maint...jimenezrick:fix-compile-doc-typo
https://github.com/jimenezrick/otp/compare/erlang:maint...jimenezrick:fix-compile-doc-typo.patch
By the way, could be also possible to add this another patch that I
already sent to erlang-patches?
Set `font-family: Courier, monospace' in OTP doc CSS
This should be much better for everybody, I left Courier as the primary
original font and also added monospace as secondary for people like me
which in Linux haven't it installed.
It should be more pleasant to read typespecs and code examples. Also
adds minor cosmetic changes to the CSS.
Please fetch:
git fetch git://github.com/jimenezrick/otp.git doc-monospace-css
Review here:
https://github.com/jimenezrick/otp/compare/erlang:maint...jimenezrick:doc-monospace-css
https://github.com/jimenezrick/otp/compare/erlang:maint...jimenezrick:doc-monospace-css.patch
Regards
--
Ricardo (http://r.untroubled.be/)
From jimenezrick@REDACTED Sun Feb 5 01:16:56 2012
From: jimenezrick@REDACTED (Ricardo Catalinas =?iso-8859-1?Q?Jim=E9nez?=)
Date: Sun, 5 Feb 2012 01:16:56 +0100
Subject: [erlang-patches] Fix the type spec from the doc of binary:part/3
Message-ID: <20120205001655.GA932@viper.local>
As the doc explains, the Len of part() can be negative.
Please fetch:
git fetch git://github.com/jimenezrick/otp.git fix-binary-doc-spec
Review here:
https://github.com/jimenezrick/otp/compare/erlang:maint...jimenezrick:fix-binary-doc-spec
https://github.com/jimenezrick/otp/compare/erlang:maint...jimenezrick:fix-binary-doc-spec.patch
Regards
--
Ricardo (http://r.untroubled.be/)
From carlsson.richard@REDACTED Sun Feb 5 22:15:43 2012
From: carlsson.richard@REDACTED (Richard Carlsson)
Date: Sun, 05 Feb 2012 22:15:43 +0100
Subject: [erlang-patches] add compiler checked atoms
Message-ID: <4F2EF17F.3020006@gmail.com>
Sorry, pressed send too soon in the last attempt. Here is the code:
git fetch git@REDACTED:richcarl/otp.git warn-unknown-atom
Here is a suggested patch to the compiler, that I'm throwing out there
as a request for comments. In any large code base, it can be hard to
maintain atom hygiene - you may have hidden errors due to misspelled
atoms, people may be adding atoms without much thought, and it can be
hard to track which atoms are being used where and for what (e.g., atoms
used for options, error indicators, message tags, callback module and
function names, etc. This allows you to declare your atoms like so:
-atoms([foo, bar]).
You can have any number of such declarations, and an atom may occur
multiple times and/or in different declarations - it's the union of
known atoms that matters. Note that this declaration is backwards
compatible; the current compiler will accept it as a generic attribute
with no particular meaning.
If you specify the compiler option `warn_unused_atom' when compiling a
module (you can put `-compile([warn_unused_atom]).' in the module if you
want to enable the checking in that module only), you will get a warning
for each atom that has not been explicitly declared. The compiler knows
about standard atoms such as `ok', `true', `false', `undefined' etc.,
and it does not check function and module names in calls, or record
names and fields of records, since these are checked in other ways already.
I don't think this addition warrants an EEP, since it doesn't change the
language as such; it only adds a backwards compatible feature to the
compiler. However, I'd like to get some initial feedback before I bother
to update the documentation and submit it as a full patch.
git@REDACTED:richcarl/otp.git
/Richard
From carlsson.richard@REDACTED Sun Feb 5 22:23:12 2012
From: carlsson.richard@REDACTED (Richard Carlsson)
Date: Sun, 05 Feb 2012 22:23:12 +0100
Subject: [erlang-patches] add compiler checked atoms
In-Reply-To: <4F2EF17F.3020006@gmail.com>
References: <4F2EF17F.3020006@gmail.com>
Message-ID: <4F2EF340.8000505@gmail.com>
On 02/05/2012 10:15 PM, Richard Carlsson wrote:
> If you specify the compiler option `warn_unused_atom' when compiling a
> module (you can put `-compile([warn_unused_atom]).' in the module if you
> want to enable the checking in that module only), you will get a warning
> for each atom that has not been explicitly declared.
I'm obviously too tired; that should be `warn_unknown_atom'.
/Richard
From mjtruog@REDACTED Sun Feb 5 22:34:45 2012
From: mjtruog@REDACTED (Michael Truog)
Date: Sun, 05 Feb 2012 13:34:45 -0800
Subject: [erlang-patches] add compiler checked atoms
In-Reply-To: <4F2EF17F.3020006@gmail.com>
References: <4F2EF17F.3020006@gmail.com>
Message-ID: <4F2EF5F5.10206@gmail.com>
This is very cool. It could help document complex code by making atom usage more transparent within the module, while also preventing errors. I mention the documentation part, since having the atom declaration gives the opportunity for comments specific to that atom declaration (so you could have atom declarations as logical groupings, similar to what is commonly done for export declarations). Do atoms used within the spec declarations need to be mentioned within the atom declaration when using this compiler flag? That might bring in a lot of external module atom dependencies, which might be counter-productive.
On 02/05/2012 01:15 PM, Richard Carlsson wrote:
> Sorry, pressed send too soon in the last attempt. Here is the code:
>
> git fetch git@REDACTED:richcarl/otp.git warn-unknown-atom
>
> Here is a suggested patch to the compiler, that I'm throwing out there as a request for comments. In any large code base, it can be hard to maintain atom hygiene - you may have hidden errors due to misspelled atoms, people may be adding atoms without much thought, and it can be hard to track which atoms are being used where and for what (e.g., atoms used for options, error indicators, message tags, callback module and function names, etc. This allows you to declare your atoms like so:
>
> -atoms([foo, bar]).
>
> You can have any number of such declarations, and an atom may occur multiple times and/or in different declarations - it's the union of known atoms that matters. Note that this declaration is backwards compatible; the current compiler will accept it as a generic attribute with no particular meaning.
>
> If you specify the compiler option `warn_unused_atom' when compiling a module (you can put `-compile([warn_unused_atom]).' in the module if you want to enable the checking in that module only), you will get a warning for each atom that has not been explicitly declared. The compiler knows about standard atoms such as `ok', `true', `false', `undefined' etc., and it does not check function and module names in calls, or record names and fields of records, since these are checked in other ways already.
>
> I don't think this addition warrants an EEP, since it doesn't change the language as such; it only adds a backwards compatible feature to the compiler. However, I'd like to get some initial feedback before I bother to update the documentation and submit it as a full patch.
>
> git@REDACTED:richcarl/otp.git
>
> /Richard
> _______________________________________________
> erlang-patches mailing list
> erlang-patches@REDACTED
> http://erlang.org/mailman/listinfo/erlang-patches
>
From carlsson.richard@REDACTED Sun Feb 5 22:57:19 2012
From: carlsson.richard@REDACTED (Richard Carlsson)
Date: Sun, 05 Feb 2012 22:57:19 +0100
Subject: [erlang-patches] add compiler checked atoms
In-Reply-To: <4F2EF5F5.10206@gmail.com>
References: <4F2EF17F.3020006@gmail.com> <4F2EF5F5.10206@gmail.com>
Message-ID: <4F2EFB3F.2040204@gmail.com>
On 02/05/2012 10:34 PM, Michael Truog wrote:
> This is very cool. It could help document complex code by making
> atom usage more transparent within the module, while also preventing
> errors. I mention the documentation part, since having the atom
> declaration gives the opportunity for comments specific to that atom
> declaration (so you could have atom declarations as logical
> groupings, similar to what is commonly done for export declarations).
> Do atoms used within the spec declarations need to be mentioned
> within the atom declaration when using this compiler flag? That
> might bring in a lot of external module atom dependencies, which
> might be counter-productive.
No, atoms occurring in -spec and -type declarations are not checked. As
you say, that could force you to declare a lot more atoms than you want.
You'll have to run Dialyzer to check the consistency of specs.
What you mention about groupings of atoms is exactly the sort of thing I
had in mind. Here are some examples from eunit, which I used as a test
bed for this feature:
%% used in options
-atoms([verbose, report, no_tty, event_log, enqueue, eunit_test_suffix,
eunit_generator_suffix, eunit_export_suffix]).
%% atoms used in test representations
-atoms([module, application, file, dir, generator, with, local, spawn,
local, remote, timeout, inorder, inparallel, setup, node,
foreach, foreachx]).
%% used by erlang:fun_info/2
-atoms([module, name, type, local, external, arity]).
%% used in I/O stream messages
-atoms([io_request, io_reply, put_chars, get_chars, get_line, get_until,
eof, getopts, setopts, get_geometry, columns, rows, enotsup,
requests, request]).
%% used in file_monitor server messages
-atoms([monitor, demonitor, automonitor, set_interval, get_interval,
stop, poll, enable_poll]).
Some of these, you'd put in some header file shared between several of
your modules, but atoms only used in one module should be declared in
that module, to keep the checking as tight as possible.
The explicit declaration and grouping of atoms makes it easy to find
which modules actually use a particular atom, and for what. This can
otherwise be very hard to figure out. If you've ever tried to use grep
to find all places in stdlib where the atom `gen' occurs in the gen_...
modules (it's hardcoded at various points as a callback module name),
you know the sort of pain I'm talking about.
/Richard
From jimenezrick@REDACTED Wed Feb 8 01:05:23 2012
From: jimenezrick@REDACTED (Ricardo Catalinas =?iso-8859-1?Q?Jim=E9nez?=)
Date: Wed, 8 Feb 2012 01:05:23 +0100
Subject: [erlang-patches] Fix typo in supervisor behaviour doc
Message-ID: <20120208000523.GB26832@viper.local>
Remove unnecessary > from a CDATA section.
Please fetch:
git fetch git://github.com/jimenezrick/otp.git fix-sup-doc-typo
Review here:
https://github.com/jimenezrick/otp/compare/erlang:maint...jimenezrick:fix-sup-doc-typo
https://github.com/jimenezrick/otp/compare/erlang:maint...jimenezrick:fix-sup-doc-typo.patch
Regards
--
Ricardo (http://r.untroubled.be/)
From mononcqc@REDACTED Thu Feb 9 04:24:14 2012
From: mononcqc@REDACTED (Fred Hebert)
Date: Wed, 8 Feb 2012 22:24:14 -0500
Subject: [erlang-patches] Shell History to Erlang
Message-ID:
Hi there,
I have made a hack named erlang-history available a few months ago and
since then I've kept maintaining it in a public repo on github (
https://github.com/ferd/erlang-history).
It's basically just a small modification to kernel/group.erl and a new
module called group_history.erl. I've used DETS tables at this point in
time, as it was (at first) easy to store stuff that way. The old requests
are injected into the shell when it first starts up (and it does so for all
instances of the shell on a given node). They're saved to disk when the
command stack/zipper gets saved after a new line.
The other reason for using DETS, aside for not reinventing stuff, is that
it's part of stdlib, which is always there anyway. The only downside is
that repairing DETS tables uses the group leader and when the group.erl
group leader calls it, it can get stuck in a loop -- that's accounted for
in the code.
Anyway, it also supports a full set of options, added to 'kernel': number
of lines saved, where to save them, terms to drop from history, etc.
They're described in the README of the repository.
To make a long story short, I'm wondering if this kind of material has any
chance of making it into OTP proper, rather than just being a hack/patch to
apply after installing Erlang.
I know there are no tests, but then, group.erl also has no tests and it's
difficult to test it all (which I figure could make the OTP team reluctant
to including it). I could add tests for the group_history.erl module itself
if required though, but some features would definitely be hard to properly
test (such as the group leader stuff above).
Regards,
Fred Hebert.
-------------- next part --------------
An HTML attachment was scrubbed...
URL:
From fritchie@REDACTED Fri Feb 10 08:02:24 2012
From: fritchie@REDACTED (Scott Lystig Fritchie)
Date: Fri, 10 Feb 2012 01:02:24 -0600
Subject: [erlang-patches] DTrace patch, review draft #3
In-Reply-To: Message of "Mon, 23 Jan 2012 11:22:26 +0100."
<4F1D34E2.5070709@erlang.org>
Message-ID: <201202100702.q1A72Oo0070694@snookles.snookles.com>
Henrik Nord wrote a while ago, while I was working on another project:
hn> Been a while sens we got any news for this.
hn> The last branch you submitted, this draft #3 I think it was, did not
hn> compile, and you where in contact with Bjrn and or Bjrn-Egil. Then
Hi, Henrik. That branch worked fine for me. :-)
hn> there was a release here and we did not really think about this for a
hn> while.
Ja, that branch didn't work so well on the R15B release. There were
a couple of not-so-nice conflicts, due to a late addition of an Opts
property list to file:read_file_info() and a couple other file.erl
functions.
hn> So now im looking at my branches and there are no Dtrace here.
Well, nothing new in a while. Sorry about that. I've been working on
other stuff for the past while....
hn> Do you need assistance from us with something? there was talk about
hn> loader support?
Last I heard, there was going to be some hackery done by the OTP team.
That hackery would load one of two versions of prim_file.beam, depending
on whether or not DTrace support was available.
I didn't hear anything about that hackery being done, or started, so I
figured y'all were busy working on other stuff. So I didn't spend much
time on fixing the merge conflict. To be honest, except for you, nobody
elseuntil today (09 Feb 2012) had asked me about an update for DTrace and
R15B. {sigh}
hn> Let me know what version of the branch you want us to test and how/if we
hn> may be of assistance so that we can add that to our plans.
So, I got blessed time from $DAYJOB to finish work on the DTrace stuff.
I've pushed two new branches to git://github.com/slfritchie/otp.git this
evening:
* dtrace-review4-OTP_R15B, which is DTrace work rebased & conflicts
fixed, based upon the "OTP_R15B" tag from the OTP team's GitHub
repo.
* dtrace-review4-upstream-maint, which is the same rebased & fixed
stuff, based upon the 09 Feb 2012 "maint" branch of the OTP repo.
I haven't run all of the test suite yet, only the "kernel" portion. And
only on OS X. Using code based on the "OTP_R15B" tag, I see 6 test
failures. Using the "dtrace-review4-upstream-maint" branch, I see 7 test
failures (code_SUITE, big_boot_embedded fails with a timeout).
So, I can do more testing on OS X, Linux, and Solaris boxes and letting
the whole test suite run overnight.
It'd be nice to know if/when y'all were thinking of doing the code loader
hacks. I also haven't been paying much attention to any rumors of if/when
R15B01 might be frozen.
-Scott
From fritchie@REDACTED Fri Feb 10 19:39:46 2012
From: fritchie@REDACTED (Scott Lystig Fritchie)
Date: Fri, 10 Feb 2012 12:39:46 -0600
Subject: [erlang-patches] DTrace patch, review draft #3
In-Reply-To: Message of "Fri, 10 Feb 2012 16:24:34 +0100."
Message-ID: <26253.1328899186@snookles.snookles.com>
Patrik Nyblom wrote:
pn> Ouch - guess I should have told you I was starting to work on this a
pn> few days ago - I (with the help of Bjorn-Egil) did the same rebase
pn> as You now have done and started figuring out how to make a hack for
pn> the io-stuff that will affect the non-dtrace version less. I'll take
pn> a look at your rebase and see what we'we missed!
Hej, that's alright. When I saw the merge conflict, I was afraid that
I'd also have to fix up the protocol junk between prim_file.erl and
efile_drv.c. That was a depressing thought, so I avoided it for weeks.
When I finally took a close look, the fear was unfounded, hooray.
So, I believe that all the changes between dtrace-review3 and the
dtrace-review4* branches can be seen on the dtrace-experiment+michal2
branch, between these commits:
adbfd650334d97e02c1290fe5ce6e433c75746e5
0d30b9356e56acacd144c758cfabacca60d0b110
The dtrace-experiment+michal2 branch is based on R14B, so there are
conflicts when applying them to R15B. There's also the possibility that
I missed something when applying to R15B. There request/requirement
that everything be squashed down to only 4 commits and that the 4
commits have no overlapping files ... has caused me headache and
occasional swearing at git.
pn> Anyway, except for the fact that I let you do a rebase work that was
pn> already in some parts done (*blush*), I'm glad to inform you that we
pn> are working on getting the dtrace support upstream for the next
pn> service release. Unless something horrible happens, I see no reason
pn> for this to fail.
That is very, very good news.
We (meaning Basho Technologies) have had the "dtrace-r14b04" branch
running in production on a customer's 60 node Solaris cluster for the
last several weeks. We are only very infrequently using the Erlang VM
USDT probes, so it's possible that a bug somethere could cause a crash
when the probe is enabled. But that cluster has been serving over 1
billion Riak requests per day, and that has given us a lot of confidence
that nothing is badly broken. ^_^
pn> I'm working on a solution where a mechanism similar to sequential
pn> tracing will make the dtrace user tag follow messages through the
pn> i/o-system. If I succeed, almost all changes to the erlang code that
pn> was there to manage the complexity of the i/o-system would
pn> disappear. I have great hopes for this :) I'll push a branch for you
pn> to look at as soon as I have something useful!
I look forward to seeing it!
-Scott
From tomas.abrahamsson@REDACTED Sat Feb 11 21:55:18 2012
From: tomas.abrahamsson@REDACTED (Tomas Abrahamsson)
Date: Sat, 11 Feb 2012 21:55:18 +0100
Subject: [erlang-patches] [PATCH] Fix indentation of record fields in Emacs
Message-ID: <1328993718-15704-1-git-send-email-tomas.abrahamsson@gmail.com>
In some situations, the indentation of record fields in Emacs was
strange. This example below shows how Emacs previously would indent
two similar pieces of code very differently:
some_function_with_a_very_long_name() ->
#'a-long-record-name-like-it-sometimes-is-with-asn.1-records'{
field1=a,
field2=b}.
x() ->
#some_record_name{
field1=a,
field2=b}.
This changes the indentation to be like below for both cases:
some_function() ->
#some_record{
field1=a,
field2=b}.
---
lib/tools/emacs/erlang.el | 58 +++++++++++++++++++++++++++++-------
lib/tools/emacs/test.erl.indented | 38 ++++++++++++++++++++++++
lib/tools/emacs/test.erl.orig | 38 ++++++++++++++++++++++++
3 files changed, 122 insertions(+), 12 deletions(-)
diff --git a/lib/tools/emacs/erlang.el b/lib/tools/emacs/erlang.el
index bc7a190..2f6c7f5 100644
--- a/lib/tools/emacs/erlang.el
+++ b/lib/tools/emacs/erlang.el
@@ -2986,18 +2986,52 @@ This assumes that the preceding expression is either simple
(forward-sexp (- arg))
(let ((col (current-column)))
(skip-chars-backward " \t")
- ;; Needed to match the colon in "'foo':'bar'".
- (if (not (memq (preceding-char) '(?# ?:)))
- col
- ;; Special hack to handle: (note line break)
- ;; [#myrecord{
- ;; foo = foo}]
- (or
- (ignore-errors
- (backward-char 1)
- (forward-sexp -1)
- (current-column))
- col)))))
+ ;; Special hack to handle: (note line break)
+ ;; [#myrecord{
+ ;; foo = foo}]
+ ;; where the call (forward-sexp -1) will fail when point is at the `#'.
+ (or
+ (ignore-errors
+ ;; Needed to match the colon in "'foo':'bar'".
+ (cond ((eq (preceding-char) ?:)
+ (backward-char 1)
+ (forward-sexp -1)
+ (current-column))
+ ((eq (preceding-char) ?#)
+ ;; We may now be at:
+ ;; - either a construction of a new record
+ ;; - or update of a record, in which case we want
+ ;; the column of the expression to be updated.
+ ;;
+ ;; To see which of the two cases we are at, we first
+ ;; move an expression backwards, check for keywords,
+ ;; then immediately an expression forwards. Moving
+ ;; backwards skips past tokens like `,' or `->', but
+ ;; when moving forwards again, we won't skip past such
+ ;; tokens. We use this: if, after having moved
+ ;; forwards, we're back where we started, then it was
+ ;; a record update.
+ ;; The check for keywords is to detect cases like:
+ ;; case Something of #record_construction{...}
+ (backward-char 1)
+ (let ((record-start (point))
+ (record-start-col (current-column)))
+ (forward-sexp -1)
+ (let ((preceding-expr-col (current-column))
+ ;; white space definition according to erl_scan
+ (white-space "\000-\040\200-\240"))
+ (if (erlang-at-keyword)
+ ;; The (forward-sexp -1) call moved past a keyword
+ (1+ record-start-col)
+ (forward-sexp 1)
+ (skip-chars-forward white-space record-start)
+ ;; Are we back where we started? If so, it was an update.
+ (if (= (point) record-start)
+ preceding-expr-col
+ (goto-char record-start)
+ (1+ (current-column)))))))
+ (t col)))
+ col))))
(defun erlang-indent-parenthesis (stack-position)
(let ((previous (erlang-indent-find-preceding-expr)))
diff --git a/lib/tools/emacs/test.erl.indented b/lib/tools/emacs/test.erl.indented
index 2948ccf..e0593c6 100644
--- a/lib/tools/emacs/test.erl.indented
+++ b/lib/tools/emacs/test.erl.indented
@@ -657,3 +657,41 @@ indent_comprehensions() ->
foo() ->
[#foo{
foo = foo}].
+
+%% Record indentation
+some_function_with_a_very_long_name() ->
+ #'a-long-record-name-like-it-sometimes-is-with-asn.1-records'{
+ field1=a,
+ field2=b},
+ case dummy_function_with_a_very_very_long_name(x) of
+ #'a-long-record-name-like-it-sometimes-is-with-asn.1-records'{
+ field1=a,
+ field2=b} ->
+ ok;
+ Var = #'a-long-record-name-like-it-sometimes-is-with-asn.1-records'{
+ field1=a,
+ field2=b} ->
+ Var#'a-long-record-name-like-it-sometimes-is-with-asn.1-records'{
+ field1=a,
+ field2=b};
+ #xyz{
+ a=1,
+ b=2} ->
+ ok
+ end.
+
+another_function_with_a_very_very_long_name() ->
+ #rec{
+ field1=1,
+ field2=1}.
+
+some_function_name_xyz(xyzzy, #some_record{
+ field1=Field1,
+ field2=Field2}) ->
+ SomeVariable = f(#'Some-long-record-name'{
+ field_a = 1,
+ 'inter-xyz-parameters' =
+ #'Some-other-very-long-record-name'{
+ field2 = Field1,
+ field2 = Field2}}),
+ {ok, SomeVariable}.
diff --git a/lib/tools/emacs/test.erl.orig b/lib/tools/emacs/test.erl.orig
index 1221c56..69356ac 100644
--- a/lib/tools/emacs/test.erl.orig
+++ b/lib/tools/emacs/test.erl.orig
@@ -657,3 +657,41 @@ ok.
foo() ->
[#foo{
foo = foo}].
+
+%% Record indentation
+some_function_with_a_very_long_name() ->
+ #'a-long-record-name-like-it-sometimes-is-with-asn.1-records'{
+ field1=a,
+ field2=b},
+ case dummy_function_with_a_very_very_long_name(x) of
+ #'a-long-record-name-like-it-sometimes-is-with-asn.1-records'{
+ field1=a,
+ field2=b} ->
+ ok;
+ Var = #'a-long-record-name-like-it-sometimes-is-with-asn.1-records'{
+ field1=a,
+ field2=b} ->
+ Var#'a-long-record-name-like-it-sometimes-is-with-asn.1-records'{
+ field1=a,
+ field2=b};
+ #xyz{
+ a=1,
+ b=2} ->
+ ok
+ end.
+
+another_function_with_a_very_very_long_name() ->
+ #rec{
+ field1=1,
+ field2=1}.
+
+some_function_name_xyz(xyzzy, #some_record{
+ field1=Field1,
+ field2=Field2}) ->
+ SomeVariable = f(#'Some-long-record-name'{
+ field_a = 1,
+ 'inter-xyz-parameters' =
+ #'Some-other-very-long-record-name'{
+ field2 = Field1,
+ field2 = Field2}}),
+ {ok, SomeVariable}.
--
1.7.5.4
From victorhge@REDACTED Sun Feb 12 16:41:17 2012
From: victorhge@REDACTED (Victor Ren)
Date: Sun, 12 Feb 2012 23:41:17 +0800
Subject: [erlang-patches] [patch]Option of if-case-receive indentation level
for Emacs Erlang-mode
Message-ID: <87ty2wvz36.fsf@gmail.com>
Hi,
I add a configurable option "erlang-icr-indent" to Emacs erlang-mode
to make it possible to customize the indentation of if/case/receive
patterns
Before the change, the indentaion is 4 steps and it cannot be changed alone.
Some people prefer other styles, for example, in the source code of
Erlang/OTP, the indentation is zero.
case a of
true ->
do_something();
false ->
do_something_else()
end.
This patch is here:
git fetch git@REDACTED:victorhge/otp.git emacs_icr_indentation
https://github.com/victorhge/otp/compare/emacs_icr_indentation
https://github.com/victorhge/otp/compare/emacs_icr_indentation.patch
Best Regards,
Victor Ren
From klas.johansson@REDACTED Sun Feb 12 18:51:16 2012
From: klas.johansson@REDACTED (Klas Johansson)
Date: Sun, 12 Feb 2012 18:51:16 +0100
Subject: [erlang-patches] [PATCH] eunit: Format stacktraces with location
information
Message-ID:
Hi,
I've noticed that eunit doesn't print stacktraces correctly since the
new format (with filenames and line numbers) was introduced in R15.
Here's a patch which addresses that.
eunit: Format stacktraces with location information
The format of stacktraces was changed in Erlang/OTP R15 (location
information was added), but eunit was not adapted which had the effect
that only the exception term was printed, but no stacktraces.
Eunit now recognizes the new stacktrace format and prints them.
Perhaps the eunit_lib code could in the future be rewritten to use
lib:format_exception which is used by the shell to pretty-print
stacktraces (then eunit would have supported the location information
automatically), but at least this patch will give us stacktraces (with
location).
Fetch from here:
git fetch git://github.com/klajo/otp.git eunit-stacktraces-with-location
More information here:
https://github.com/klajo/otp/compare/maint...eunit-stacktraces-with-location
https://github.com/klajo/otp/compare/maint...eunit-stacktraces-with-location.patch
BR,
Klas
From henrik@REDACTED Mon Feb 13 10:28:33 2012
From: henrik@REDACTED (Henrik Nord)
Date: Mon, 13 Feb 2012 10:28:33 +0100
Subject: [erlang-patches] Shell History to Erlang
In-Reply-To:
References:
Message-ID: <4F38D7C1.3080502@erlang.org>
Hello!
This will have to wait for a technical board meeting. I will let you
know as soon as the meeting has been held.
Thank you for the contribution!
On 02/09/2012 04:24 AM, Fred Hebert wrote:
> Hi there,
>
> I have made a hack named erlang-history available a few months ago and
> since then I've kept maintaining it in a public repo on github
> (https://github.com/ferd/erlang-history).
>
> It's basically just a small modification to kernel/group.erl and a new
> module called group_history.erl. I've used DETS tables at this point
> in time, as it was (at first) easy to store stuff that way. The old
> requests are injected into the shell when it first starts up (and it
> does so for all instances of the shell on a given node). They're saved
> to disk when the command stack/zipper gets saved after a new line.
>
> The other reason for using DETS, aside for not reinventing stuff, is
> that it's part of stdlib, which is always there anyway. The only
> downside is that repairing DETS tables uses the group leader and when
> the group.erl group leader calls it, it can get stuck in a loop --
> that's accounted for in the code.
>
> Anyway, it also supports a full set of options, added to 'kernel':
> number of lines saved, where to save them, terms to drop from history,
> etc. They're described in the README of the repository.
>
> To make a long story short, I'm wondering if this kind of material has
> any chance of making it into OTP proper, rather than just being a
> hack/patch to apply after installing Erlang.
>
> I know there are no tests, but then, group.erl also has no tests and
> it's difficult to test it all (which I figure could make the OTP team
> reluctant to including it). I could add tests for the
> group_history.erl module itself if required though, but some features
> would definitely be hard to properly test (such as the group leader
> stuff above).
>
> Regards,
> Fred Hebert.
>
>
>
>
> _______________________________________________
> erlang-patches mailing list
> erlang-patches@REDACTED
> http://erlang.org/mailman/listinfo/erlang-patches
--
/Henrik Nord Erlang/OTP
-------------- next part --------------
An HTML attachment was scrubbed...
URL:
From henrik@REDACTED Mon Feb 13 10:31:37 2012
From: henrik@REDACTED (Henrik Nord)
Date: Mon, 13 Feb 2012 10:31:37 +0100
Subject: [erlang-patches] Fix typo in `compile' doc: unmatched
parenthesis
In-Reply-To: <20120204160345.GB1431@viper.local>
References: <20120204160345.GB1431@viper.local>
Message-ID: <4F38D879.3070706@erlang.org>
Hi
This has been included in pu, and the monospace will be merged shortly
Thank you for the contribution.
On 02/04/2012 05:03 PM, Ricardo Catalinas Jim?nez wrote:
> Please fetch:
> git fetch git://github.com/jimenezrick/otp.git fix-compile-doc-typo
>
> Review here:
> https://github.com/jimenezrick/otp/compare/erlang:maint...jimenezrick:fix-compile-doc-typo
> https://github.com/jimenezrick/otp/compare/erlang:maint...jimenezrick:fix-compile-doc-typo.patch
>
>
> By the way, could be also possible to add this another patch that I
> already sent to erlang-patches?
>
> Set `font-family: Courier, monospace' in OTP doc CSS
>
> This should be much better for everybody, I left Courier as the primary
> original font and also added monospace as secondary for people like me
> which in Linux haven't it installed.
>
> It should be more pleasant to read typespecs and code examples. Also
> adds minor cosmetic changes to the CSS.
>
> Please fetch:
> git fetch git://github.com/jimenezrick/otp.git doc-monospace-css
>
> Review here:
> https://github.com/jimenezrick/otp/compare/erlang:maint...jimenezrick:doc-monospace-css
> https://github.com/jimenezrick/otp/compare/erlang:maint...jimenezrick:doc-monospace-css.patch
>
>
> Regards
--
/Henrik Nord Erlang/OTP
From carlsson.richard@REDACTED Mon Feb 13 10:43:46 2012
From: carlsson.richard@REDACTED (Richard Carlsson)
Date: Mon, 13 Feb 2012 10:43:46 +0100
Subject: [erlang-patches] [PATCH] eunit: Format stacktraces with
location information
In-Reply-To:
References:
Message-ID: <4F38DB52.4070003@gmail.com>
On 02/12/2012 06:51 PM, Klas Johansson wrote:
> Hi,
>
> I've noticed that eunit doesn't print stacktraces correctly since the
> new format (with filenames and line numbers) was introduced in R15.
> Here's a patch which addresses that.
Thanks. I modified the patch, because it needs to be backwards
compatible as well. I also found that the stack pruning code (which
removes internal eunit functions from the printed stack) had to be
updated to know about the new format. You can look at it here:
https://github.com/richcarl/eunit/commits/new-stack-traces
Unless you find any mistakes, I'll merge it to the EUnit master branch
and will bring it from there into OTP.
/Richard
From henrik@REDACTED Mon Feb 13 11:53:10 2012
From: henrik@REDACTED (Henrik Nord)
Date: Mon, 13 Feb 2012 11:53:10 +0100
Subject: [erlang-patches] Extended specs for built-in functions
In-Reply-To: <12F2115FD1CCEE4294943B2608A18FA3EAB27A@MAIL01.win.lbaum.eu>
References: <12F2115FD1CCEE4294943B2608A18FA3EAB1E4@MAIL01.win.lbaum.eu>
<12F2115FD1CCEE4294943B2608A18FA3EAB27A@MAIL01.win.lbaum.eu>
Message-ID: <4F38EB96.9030303@erlang.org>
Hi
We have done a major rework in this area. (Check the master branch on
github for specifics).
I will try to merge this into maint, as the other changes will (most
likely) not take effect until R16.
If there are tests failing and/or other complications this patch might
not make it to maint.
Thank you for the contribution!
On 01/16/2012 03:21 PM, Tobias Schlager wrote:
> This patch extends the specs for the following built-in functions:
> * process_flag/2,3
> * system_flag/2
> * system_info/1
> * spawn_opt/2,3,4
>
> The main intention for this patch was to make dialyzer recognize the process_flag option 'sensitive'. When fixing this issue I noticed some more missing specs and added what I could find in the latest documentation.
>
> Regards
> Tobias
>
>
> > From 2d57bd2fe55573e48c035cc0e1ecc94617263630 Mon Sep 17 00:00:00 2001
> From: Tobias Schlager
> Date: Mon, 16 Jan 2012 14:29:01 +0100
> Subject: [PATCH] extended specs for built-in functions
>
> ---
> lib/hipe/cerl/erl_bif_types.erl | 48 ++++++++++++++++++++++++++++++++++++--
> 1 files changed, 45 insertions(+), 3 deletions(-)
>
> diff --git a/lib/hipe/cerl/erl_bif_types.erl b/lib/hipe/cerl/erl_bif_types.erl
> index cee399e..88058ae 100644
> --- a/lib/hipe/cerl/erl_bif_types.erl
> +++ b/lib/hipe/cerl/erl_bif_types.erl
> @@ -1202,11 +1202,13 @@ type(erlang, process_flag, 2, Xs) ->
> case t_atom_vals(Flag) of
> ['error_handler'] -> t_atom();
> ['min_heap_size'] -> t_non_neg_integer();
> + ['min_bin_vheap_size'] -> t_non_neg_integer();
> ['scheduler'] -> t_non_neg_integer();
> ['monitor_nodes'] -> t_boolean();
> ['priority'] -> t_process_priority_level();
> ['save_calls'] -> t_non_neg_integer();
> ['trap_exit'] -> t_boolean();
> + ['sensitive'] -> t_boolean();
> List when is_list(List) ->
> T_process_flag_returns;
> unknown ->
> @@ -1503,6 +1505,8 @@ type(erlang, system_flag, 2, Xs) ->
> t_non_neg_fixnum();
> ['min_heap_size'] ->
> t_non_neg_fixnum();
> + ['min_bin_vheap_size'] ->
> + t_non_neg_fixnum();
> ['multi_scheduling'] ->
> t_system_multi_scheduling();
> ['schedulers_online'] ->
> @@ -1546,8 +1550,12 @@ type(erlang, system_info, 1, Xs) ->
> t_list(t_tuple([t_atom(),
> t_list(t_tuple([t_atom(),
> t_any()]))]))]);
> + ['build_type'] ->
> + t_system_build_type_return();
> ['break_ignored'] ->
> t_boolean();
> + ['c_compiler_used'] ->
> + t_tuple([t_atom(), t_any()]);
> ['cpu_topology'] ->
> t_system_cpu_topology();
> ['compat_rel'] ->
> @@ -1560,6 +1568,8 @@ type(erlang, system_info, 1, Xs) ->
> t_binary();
> ['dist_ctrl'] ->
> t_list(t_tuple([t_atom(), t_sup([t_pid(), t_port])]));
> + ['driver_version'] ->
> + t_string();
> %% elib_malloc is intentionally not included,
> %% because it scheduled for removal in R15.
> ['endian'] ->
> @@ -1573,7 +1583,9 @@ type(erlang, system_info, 1, Xs) ->
> ['heap_sizes'] ->
> t_list(t_integer());
> ['heap_type'] ->
> - t_sup([t_atom('private'), t_atom('hybrid')]);
> + t_sup([t_atom('private'),
> + t_atom('shared'),
> + t_atom('hybrid')]);
> ['hipe_architecture'] ->
> t_atoms(['amd64', 'arm', 'powerpc', 'ppc64',
> 'undefined', 'ultrasparc', 'x86']);
> @@ -1581,12 +1593,20 @@ type(erlang, system_info, 1, Xs) ->
> t_binary();
> ['internal_cpu_topology'] -> %% Undocumented internal feature
> t_internal_cpu_topology();
> + ['kernel_poll'] ->
> + t_boolean();
> ['loaded'] ->
> t_binary();
> ['logical_processors'] ->
> t_non_neg_fixnum();
> ['machine'] ->
> t_string();
> + ['min_heap_size'] ->
> + t_tuple([t_atom('min_heap_size'),
> + t_non_neg_integer()]);
> + ['min_bin_vheap_size'] ->
> + t_tuple([t_atom('min_bin_vheap_size'),
> + t_non_neg_integer()]);
> ['multi_scheduling'] ->
> t_system_multi_scheduling();
> ['multi_scheduling_blockers'] ->
> @@ -1601,6 +1621,8 @@ type(erlang, system_info, 1, Xs) ->
> t_non_neg_fixnum(),
> t_non_neg_fixnum()]),
> t_string());
> + ['otp_release'] ->
> + t_string();
> ['process_count'] ->
> t_non_neg_fixnum();
> ['process_limit'] ->
> @@ -1630,6 +1652,8 @@ type(erlang, system_info, 1, Xs) ->
> t_non_neg_fixnum();
> ['trace_control_word'] ->
> t_integer();
> + ['update_cpu_info'] ->
> + t_sup([t_atom('changed'), t_atom('unchanged')]);
> ['version'] ->
> t_string();
> ['wordsize'] ->
> @@ -3747,8 +3771,13 @@ arg_types(erlang, pre_loaded, 0) ->
> arg_types(erlang, process_display, 2) ->
> [t_pid(), t_atom('backtrace')];
> arg_types(erlang, process_flag, 2) ->
> - [t_sup([t_atom('trap_exit'), t_atom('error_handler'),
> - t_atom('min_heap_size'), t_atom('priority'), t_atom('save_calls'),
> + [t_sup([t_atom('trap_exit'),
> + t_atom('error_handler'),
> + t_atom('min_heap_size'),
> + t_atom('min_bin_vheap_size'),
> + t_atom('priority'),
> + t_atom('save_calls'),
> + t_atom('sensitive'),
> t_atom('scheduler'), % undocumented
> t_atom('monitor_nodes'), % undocumented
> t_tuple([t_atom('monitor_nodes'), t_list()])]), % undocumented
> @@ -3861,6 +3890,7 @@ arg_types(erlang, system_flag, 2) ->
> t_atom('display_items'), % undocumented
> t_atom('fullsweep_after'),
> t_atom('min_heap_size'),
> + t_atom('min_bin_vheap_size'),
> t_atom('multi_scheduling'),
> t_atom('schedulers_online'),
> t_atom('scheduler_bind_type'),
> @@ -4733,6 +4763,7 @@ t_spawn_options() ->
> t_atom('monitor'),
> t_tuple([t_atom('priority'), t_process_priority_level()]),
> t_tuple([t_atom('min_heap_size'), t_fixnum()]),
> + t_tuple([t_atom('min_bin_vheap_size'), t_fixnum()]),
> t_tuple([t_atom('fullsweep_after'), t_fixnum()])]).
>
> t_spawn_opt_return(List) ->
> @@ -4821,6 +4852,17 @@ t_system_profile_return() ->
> t_sup(t_atom('undefined'),
> t_tuple([t_sup(t_pid(), t_port()), t_system_profile_options()])).
>
> +t_system_build_type_return() ->
> + t_sup([t_atom('opt'),
> + t_atom('debug'),
> + t_atom('purify'),
> + t_atom('quantify'),
> + t_atom('purecov'),
> + t_atom('gcov'),
> + t_atom('valgrind'),
> + t_atom('gprof'),
> + t_atom('lcnt')]).
> +
> %% =====================================================================
> %% These are used for the built-in functions of 'ets'
> %% =====================================================================
> --
> 1.7.7.5
>
>
>
> _______________________________________________
> erlang-patches mailing list
> erlang-patches@REDACTED
> http://erlang.org/mailman/listinfo/erlang-patches
--
/Henrik Nord Erlang/OTP
-------------- next part --------------
An HTML attachment was scrubbed...
URL:
From henrik@REDACTED Mon Feb 13 12:01:36 2012
From: henrik@REDACTED (Henrik Nord)
Date: Mon, 13 Feb 2012 12:01:36 +0100
Subject: [erlang-patches] Fix port leaking after
controlling_process(Port, self())
In-Reply-To: <20120204155510.GA1431@viper.local>
References: <20120204155510.GA1431@viper.local>
Message-ID: <4F38ED90.2060007@erlang.org>
Hello
Your patch is included in 'pu'
Thank you for the contribution!
On 02/04/2012 04:55 PM, Ricardo Catalinas Jim?nez wrote:
> I spotted the same issue that Max Lapshin reported in:
>
> http://erlang.org/pipermail/erlang-questions/2011-April/057944.html
>
>
> Add case to handle the situation when someone call
> {gen_tcp,gen_udp}:controlling_process(Port, self()). Also improve spec
> and doc from gen_udp and gen_sctp for controlling_process/2.
>
> To reproduce the issue, open an UDP port:
>
> 4> {ok,Port} = gen_udp:open(9000, [binary]).
> {ok,#Port<0.587>}
> 5> gen_udp:controlling_process(Port, self()).
> ok
>
> Simulate error:
>
> 6> 1=2.
> ** exception error: no match of right hand side value 2
>
> Here is the leak:
>
> 7> inet:i().
> Port Module Recv Sent Owner Local Address Foreign Address State
> Type
> 581 inet_udp 0 0<0.31.0> *:cslistener *:* BOUND
> DGRAM
> ok
>
>
> Please fetch:
> git fetch git://github.com/jimenezrick/otp.git fix-gen_udp_tcp-leak
>
> Review here:
> https://github.com/jimenezrick/otp/compare/erlang:maint...jimenezrick:fix-gen_udp_tcp-leak
> https://github.com/jimenezrick/otp/compare/erlang:maint...jimenezrick:fix-gen_udp_tcp-leak.patch
>
>
> Regards
--
/Henrik Nord Erlang/OTP
From henrik@REDACTED Mon Feb 13 12:13:40 2012
From: henrik@REDACTED (Henrik Nord)
Date: Mon, 13 Feb 2012 12:13:40 +0100
Subject: [erlang-patches] Fix the type spec from the doc of binary:part/3
In-Reply-To: <20120205001655.GA932@viper.local>
References: <20120205001655.GA932@viper.local>
Message-ID: <4F38F064.8090607@erlang.org>
Thank you for the contribution!
On 02/05/2012 01:16 AM, Ricardo Catalinas Jim?nez wrote:
> As the doc explains, the Len of part() can be negative.
>
> Please fetch:
> git fetch git://github.com/jimenezrick/otp.git fix-binary-doc-spec
>
> Review here:
> https://github.com/jimenezrick/otp/compare/erlang:maint...jimenezrick:fix-binary-doc-spec
> https://github.com/jimenezrick/otp/compare/erlang:maint...jimenezrick:fix-binary-doc-spec.patch
>
>
> Regards
--
/Henrik Nord Erlang/OTP
From henrik@REDACTED Mon Feb 13 12:15:50 2012
From: henrik@REDACTED (Henrik Nord)
Date: Mon, 13 Feb 2012 12:15:50 +0100
Subject: [erlang-patches] Fix typo in supervisor behaviour doc
In-Reply-To: <20120208000523.GB26832@viper.local>
References: <20120208000523.GB26832@viper.local>
Message-ID: <4F38F0E6.6030004@erlang.org>
Thanks!
On 02/08/2012 01:05 AM, Ricardo Catalinas Jim?nez wrote:
> Remove unnecessary> from a CDATA section.
>
> Please fetch:
> git fetch git://github.com/jimenezrick/otp.git fix-sup-doc-typo
>
> Review here:
> https://github.com/jimenezrick/otp/compare/erlang:maint...jimenezrick:fix-sup-doc-typo
> https://github.com/jimenezrick/otp/compare/erlang:maint...jimenezrick:fix-sup-doc-typo.patch
>
>
> Regards
--
/Henrik Nord Erlang/OTP
From klas.johansson@REDACTED Mon Feb 13 17:36:57 2012
From: klas.johansson@REDACTED (Klas Johansson)
Date: Mon, 13 Feb 2012 17:36:57 +0100
Subject: [erlang-patches] [PATCH] eunit: Format stacktraces with
location information
In-Reply-To: <4F38DB52.4070003@gmail.com>
References:
<4F38DB52.4070003@gmail.com>
Message-ID:
On Mon, Feb 13, 2012 at 10:43 AM, Richard Carlsson
wrote:
> On 02/12/2012 06:51 PM, Klas Johansson wrote:
>>
>> Hi,
>>
>> I've noticed that eunit doesn't print stacktraces correctly since the
>> new format (with filenames and line numbers) was introduced in R15.
>> Here's a patch which addresses that.
Hi,
> Thanks. I modified the patch, because it needs to be backwards compatible as
> well.
I was thinking about that. For the otp repo it doesn't have to be,
right? As long as the patch isn't applied to older branches - which it
doesn't have to be. But for the separate eunit repo it's a different
story I assume, since it could be used both in R14 and in R15.
Supporting both formats at the same time should be safe I guess;
dialyzer can be an issue in those situations, but it should be safe
since it's an exported function -- dialyzer cannot complain too much
there can it.
> I also found that the stack pruning code (which removes internal eunit
> functions from the printed stack) had to be updated to know about the new
> format. You can look at it here:
>
> ?https://github.com/richcarl/eunit/commits/new-stack-traces
Ah, missed that.
> Unless you find any mistakes, I'll merge it to the EUnit master branch and
> will bring it from there into OTP.
Sure, go ahead! :-)
BR,
Klas
From kenneth.lundin@REDACTED Tue Feb 14 09:44:14 2012
From: kenneth.lundin@REDACTED (Kenneth Lundin)
Date: Tue, 14 Feb 2012 09:44:14 +0100
Subject: [erlang-patches] add compiler checked atoms
In-Reply-To: <4F2EF17F.3020006@gmail.com>
References: <4F2EF17F.3020006@gmail.com>
Message-ID:
Hi,
I don't think this is a good way to introduce declared atoms.
We already have the -type and -spec notation for definition of
types and function signatures which are then used by Dialyzer for type
checking.
I don't think we should introduce yet another notation that is not
harmonized with -type and -spec.
It is already possible to declare atoms in -type and -spec. Why not use
this already present notation and add
optional checking of atoms against declared atoms inside -type and -spec
instead.
With the suggested -atom declaration we will probably get the same atoms
declared 2 times with different notations and I think that
will clutter down the code with redundant information to an
unacceptable degree.
/Kenneth, Erlang/OTP Ericsson
On Sun, Feb 5, 2012 at 10:15 PM, Richard Carlsson <
carlsson.richard@REDACTED> wrote:
> Sorry, pressed send too soon in the last attempt. Here is the code:
>
> git fetch git@REDACTED:richcarl/otp.**git warn-unknown-atom
>
> Here is a suggested patch to the compiler, that I'm throwing out there as
> a request for comments. In any large code base, it can be hard to maintain
> atom hygiene - you may have hidden errors due to misspelled atoms, people
> may be adding atoms without much thought, and it can be hard to track which
> atoms are being used where and for what (e.g., atoms used for options,
> error indicators, message tags, callback module and function names, etc.
> This allows you to declare your atoms like so:
>
> -atoms([foo, bar]).
>
> You can have any number of such declarations, and an atom may occur
> multiple times and/or in different declarations - it's the union of known
> atoms that matters. Note that this declaration is backwards compatible; the
> current compiler will accept it as a generic attribute with no particular
> meaning.
>
> If you specify the compiler option `warn_unused_atom' when compiling a
> module (you can put `-compile([warn_unused_atom]).**' in the module if
> you want to enable the checking in that module only), you will get a
> warning for each atom that has not been explicitly declared. The compiler
> knows about standard atoms such as `ok', `true', `false', `undefined' etc.,
> and it does not check function and module names in calls, or record names
> and fields of records, since these are checked in other ways already.
>
> I don't think this addition warrants an EEP, since it doesn't change the
> language as such; it only adds a backwards compatible feature to the
> compiler. However, I'd like to get some initial feedback before I bother to
> update the documentation and submit it as a full patch.
>
> git@REDACTED:richcarl/otp.**git
>
> /Richard
> ______________________________**_________________
> erlang-patches mailing list
> erlang-patches@REDACTED
> http://erlang.org/mailman/**listinfo/erlang-patches
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL:
From carlsson.richard@REDACTED Tue Feb 14 10:47:01 2012
From: carlsson.richard@REDACTED (Richard Carlsson)
Date: Tue, 14 Feb 2012 10:47:01 +0100
Subject: [erlang-patches] add compiler checked atoms
In-Reply-To:
References: <4F2EF17F.3020006@gmail.com>
Message-ID: <4F3A2D95.8030305@gmail.com>
On 02/14/2012 09:44 AM, Kenneth Lundin wrote:
> Hi,
> I don't think this is a good way to introduce declared atoms.
> We already have the -type and -spec notation for definition of
> types and function signatures which are then used by Dialyzer for type
> checking.
> I don't think we should introduce yet another notation that is not
> harmonized with -type and -spec.
> It is already possible to declare atoms in -type and -spec. Why not use
> this already present notation and add
> optional checking of atoms against declared atoms inside -type and -spec
> instead.
> With the suggested -atom declaration we will probably get the same atoms
> declared 2 times with different notations and I think that
> will clutter down the code with redundant information to an
> unacceptable degree.
Yes, that is probably a better idea: that any atom occurring in a -type
and/or -spec declaration is implicitly said to be known, and others are
not. This would be an incentive for people to define types for things
like the set of messages to a server or the set of atoms allowed as
flags to a function (or error codes returned from a function).
The question is, should atoms occurring in -spec declarations be taken
as implicit "exists"-declarations, or should it only be those in -type?
If it's only -type that counts, you could get checking of the atoms in
-spec declarations as well, so you don't spell an atom wrong in the spec
for one of 3 versions of a function and suddenly that atom is also
implicitly allowed. I think -type only is the right way.
I'll see if I can change my patch to do this instead.
/Richard
From kenneth.lundin@REDACTED Tue Feb 14 12:24:41 2012
From: kenneth.lundin@REDACTED (Kenneth Lundin)
Date: Tue, 14 Feb 2012 12:24:41 +0100
Subject: [erlang-patches] add compiler checked atoms
In-Reply-To: <4F3A2D95.8030305@gmail.com>
References: <4F2EF17F.3020006@gmail.com>
<4F3A2D95.8030305@gmail.com>
Message-ID:
I think atoms introduced in both -type and -spec should be respected in
this feature. If you want to
guard yourself against a misspelled atom in one -spec you can use -type but
you are not forced to.
And if you introduce an atom in a -spec and never use it in the code then
you could maybe issue a warning for that too.
/Kenneth
On Tue, Feb 14, 2012 at 10:47 AM, Richard Carlsson <
carlsson.richard@REDACTED> wrote:
> On 02/14/2012 09:44 AM, Kenneth Lundin wrote:
>
>> Hi,
>> I don't think this is a good way to introduce declared atoms.
>> We already have the -type and -spec notation for definition of
>> types and function signatures which are then used by Dialyzer for type
>> checking.
>> I don't think we should introduce yet another notation that is not
>> harmonized with -type and -spec.
>> It is already possible to declare atoms in -type and -spec. Why not use
>> this already present notation and add
>> optional checking of atoms against declared atoms inside -type and -spec
>> instead.
>> With the suggested -atom declaration we will probably get the same atoms
>> declared 2 times with different notations and I think that
>> will clutter down the code with redundant information to an
>> unacceptable degree.
>>
>
> Yes, that is probably a better idea: that any atom occurring in a -type
> and/or -spec declaration is implicitly said to be known, and others are
> not. This would be an incentive for people to define types for things like
> the set of messages to a server or the set of atoms allowed as flags to a
> function (or error codes returned from a function).
>
> The question is, should atoms occurring in -spec declarations be taken as
> implicit "exists"-declarations, or should it only be those in -type? If
> it's only -type that counts, you could get checking of the atoms in -spec
> declarations as well, so you don't spell an atom wrong in the spec for one
> of 3 versions of a function and suddenly that atom is also implicitly
> allowed. I think -type only is the right way.
>
> I'll see if I can change my patch to do this instead.
>
> /Richard
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL:
From jimenezrick@REDACTED Tue Feb 14 15:23:05 2012
From: jimenezrick@REDACTED (Ricardo Catalinas =?iso-8859-1?Q?Jim=E9nez?=)
Date: Tue, 14 Feb 2012 15:23:05 +0100
Subject: [erlang-patches] Add missing white space in Special Process doc
Message-ID: <20120214142305.GA1311@viper.local>
Please fetch:
git fetch git://github.com/jimenezrick/otp.git add-space-spec_proc-doc
Review here:
https://github.com/jimenezrick/otp/compare/erlang:maint...jimenezrick:add-space-spec_proc-doc
https://github.com/jimenezrick/otp/compare/erlang:maint...jimenezrick:add-space-spec_proc-doc.patch
Regards
--
Ricardo (http://r.untroubled.be/)
From henrik@REDACTED Tue Feb 14 15:57:17 2012
From: henrik@REDACTED (Henrik Nord)
Date: Tue, 14 Feb 2012 15:57:17 +0100
Subject: [erlang-patches] Add missing white space in Special Process doc
In-Reply-To: <20120214142305.GA1311@viper.local>
References: <20120214142305.GA1311@viper.local>
Message-ID: <4F3A764D.3030908@erlang.org>
Thank you !
On 02/14/2012 03:23 PM, Ricardo Catalinas Jim?nez wrote:
> Please fetch:
> git fetch git://github.com/jimenezrick/otp.git add-space-spec_proc-doc
>
> Review here:
> https://github.com/jimenezrick/otp/compare/erlang:maint...jimenezrick:add-space-spec_proc-doc
> https://github.com/jimenezrick/otp/compare/erlang:maint...jimenezrick:add-space-spec_proc-doc.patch
>
>
> Regards
--
/Henrik Nord Erlang/OTP
From gleber.p@REDACTED Thu Feb 16 09:36:02 2012
From: gleber.p@REDACTED (Gleb Peregud)
Date: Thu, 16 Feb 2012 09:36:02 +0100
Subject: [erlang-patches] Make Erlang-mode ELPA-friendly
In-Reply-To:
References:
Message-ID:
Hello OTP team
I'm working on updating erlang-mode at Marmalade Emacs package
repository [1], which has a very-very-very old version of erlang-mode
currently.
This resulted in a minor fix to erlang-mode:
? ?Make erlang-mode more compatible with package.el
? ?Package.el ?and Emacs ?package ?repositories (like ?ELPA or ?Marmalade
? ?place some requirements onto packages which are uploaded to them. This
? ?commit does ?minor cosmetic ?changes which makes ?it easier ?to create
? ?appropriate package file for those repositories.
available from
git fetch git://github.com/gleber/otp.git make_erlang_mode_elpa_friendly
and viewable at:
https://github.com/gleber/otp/compare/maint...make_erlang_mode_elpa_friendly
https://github.com/gleber/otp/compare/maint...make_erlang_mode_elpa_friendly.patch
Since it's a minor fix it is based on maint branch.
If someone from OTP team would like to have administrative access to
erlang mode package at Marmalade, I'd be happy to add him/her as an
owner of the package there.
Best regards,
Gleb Peregud
1: http://marmalade-repo.org/packages/erlang
P.S. There is some bug in Marmalade mode, so erlang mode package can
not be properly uploaded, but the bug has been reported to Marmalade
maintainer and appropriate fix has been submitted there.
From peerst@REDACTED Thu Feb 16 14:24:18 2012
From: peerst@REDACTED (Peer Stritzinger)
Date: Thu, 16 Feb 2012 14:24:18 +0100
Subject: [erlang-patches] Add missing HAVE_IN6 && AF_INET6 ifdef
Message-ID:
Hi,
Please fetch:
? git fetch git@REDACTED:peerst/otp.git inet6_less_build_fix
Add missing HAVE_IN6 && AF_INET6 ifdef
This prevents building for operating systems that do not yet have IPv6
compatible socket API. Error can be reproduced by (cross)building for
a os that doesn't have these headers. This will abort with a error
about incomplete type 'struct in6_addr'. All other uses of IPv6 API in
inet_drv.c are conditionalized like in the patch.
https://github.com/peerst/otp/compare/inet6_less_build_fix
https://github.com/peerst/otp/compare/inet6_less_build_fix.patch
Cheers,
Peer Stritzinger
From henrik@REDACTED Thu Feb 16 16:40:59 2012
From: henrik@REDACTED (Henrik Nord)
Date: Thu, 16 Feb 2012 16:40:59 +0100
Subject: [erlang-patches] What's cooking in erlang/otp (2012-02-16)
Message-ID: <201202161540.q1GFesuZ018049@smaug.otp.ericsson.se>
------------------------------------------------------------
[Graduated]
* ahs/fix-gb_trees-doc (stdlib) (2011-12-14) 1 commit
+ Put gb_trees documentation into alphabetical order (fe6ea2f)
* av/maint-memsup (os_mon) (2011-11-08) 1 commit
+ Fix segmentation fault in memsup (a95ebdd)
* jz/error-logic-efile_sendfile (erts) (2011-11-29) 1 commit
+ erts: minor fix for unnecessary condition (6581e8b)
* jz/erts-remove-unused-var (erts) (2011-12-14) 1 commit
+ erts: Remove unused variable (bafa0e7)
* jz/reduce-smp-locking-time-range (erts) (2011-12-09) 1 commit
+ erts: reduce smp locking time range in erts_garbage_collect (481c7b9)
* jz/sendfile_chunk_size (erts) (2011-11-29) 1 commit
+ erts: change SENDFILE_CHUNK_SIZE from signed to unsigned (a94aded)
* pg/fix-ssl_tls_dist_proxy-setup-loop (ssl) (2012-01-29) 1 commit
+ Fix setup loop of SSL TLS dist proxy (b37d044)
* rc/spell-registered (erts, jinterface, ssl, stdlib) (2011-10-31) 1 commit
+ Correct spelling of "registered" in various places in the source code (bc330f6)
* rj/doc-monospace-css (erl_docgen) (2012-01-14) 1 commit
+ Set `font-family: Courier, monospace' in OTP doc CSS (ae32e94)
* rj/fix-binary-doc-spec (stdlib) (2012-02-05) 1 commit
+ Fix the type spec from the doc of binary:part/3 (b9f1047)
* rj/fix-compile-doc-typo (compiler) (2012-02-04) 1 commit
+ Fix typo in `compile' doc: unmatched parenthesis (62ca2e3)
* rj/fix-sup-doc-typo (otp) (2012-02-08) 1 commit
+ Fix typo in supervisor behaviour doc (425ccd6)
* rj/spaces-xmerl-doc (xmerl) (2012-01-12) 1 commit
+ Add missing spaces in xmerl doc (7f389de)
* ts/extend-specs-for-bifs (hipe) (2012-02-13) 1 commit
+ Make dialyzer recognize the process_flag option sensitive (62004e9)
* vd/java-string-bug (jinterface) (2011-11-13) 2 commits
+ add test for Java string bug (e01d6f3)
+ workaround for Java bug http://bugs.sun.com/bugdatabase/view_bug.do?bug_id=6242664 (a30445c)
* vd/jinterface-atom-message (jinterface) (2011-11-11) 1 commit
+ Improve error message when creating a too long OtpErlangAtom (334d636)
* ws/erl-xcomp-avr32 (otp) (2011-11-01) 1 commit
+ Update xcomp config for AVR32/buildroot-v3.0.0 (e89c2af)
* pg/ssl_dist-fixes (ssl) (2012-01-16) 1 commit
. Robustness and improvement to distribution over SSL (71e9aa2)
* sg/fix-snmp_note_store-timer (snmp) (2011-11-08) 2 commits
. snmp: add regression test for GC timer (597ce3c)
. snmp: fix GC timer in snmp_note_store (09816ca)
------------------------------------------------------------
[New topics]
* cv/update-localtime-configuration (erts) (2011-11-18) 1 commit
- erts: Fix localtime BIFs does not update system timezone configuration (c14ba7b)
* dc/dch-fix-win32-escript (erts) (2011-11-25) 1 commit
- add escript win32 alternative invocation (thanks Pierre Rouleau) (a50b285)
* jc/omit-undefined-start_phases (reltool) (2012-01-13) 1 commit
- Avoid creating an undefined start_phases entry when generating a release (700e7ee)
* ks/compile_info-fix (compiler, hipe) (2012-01-16) 1 commit
- Fix discrepancy in compile_info (4aee64a)
* mp/fix-assembler-comment-char-for-hipe-ppc (erts) (2012-01-17) 1 commit
- Fix assembler comment character for hipe on ppc (17ab3d9)
* mz/odbc-support-param_query (odbc) (2011-12-19) 1 commit
- Add support for NULL value in odbc:param_query (c6e01fe)
* pan/win32_testbuild (otp) (2012-01-31) 1 commit
- Set PATH correctly when building tests on win32 (4799b48)
* ph/fix_enfile (erts, kernel) (2012-01-04) 1 commit
- Fix returned error from gen_tcp:accept/1,2 when running out of ports (949ee23)
* rj/fix-gen_udp_tcp-leak (kernel) (2012-02-04) 1 commit
- Fix port leaking after controlling_process(Port, self()) (944a57a)
* ta/docs15 (common_test, erts, otp) (2012-01-07) 3 commits
- Fix typos in ct getting_started_chapter.xml (e3c347c)
- Fix typos in driver.xml and erl_driver.xml (4136021)
- Fix typos in INSTALL-WIN32.md (1392462)
* tab/fix-sctp-multihoming-IPv6 (erts, kernel) (2011-12-30) 1 commit
- Fix SCTP multihoming for IPv6 (05984ac)
* tp/supervisor-pass-on-errors (stdlib) (2012-01-15) 1 commit
- Have supervisor send errors up the chain (c546f89)
* ts/no_hipe_ceach (hipe) (2012-01-01) 1 commit
- Remove hipe_ceach from hipe.app.src to fix reltool-generated release startup (27d83b0)
* ud/fix-return-do_get_disc_copy2 (mnesia) (2011-09-16) 1 commit
- Fixes value returned by mnesia_loader:do_get_disc_copy2/4 (a85fe55)
------------------------------------------------------------
[Stalled]
* bw/efile_exists (erts) (2010-10-07) 1 commit
- prim_file:exists/{1,2} which is lightweight file existence check (2759905)
Action expected from: Topic author
------------------------------------------------------------
[Cooking]
* bg/temp-hipe-fixes (compiler, kernel) (2010-03-15) 5 commits
- Avoid crash by skipping compilation_SUITE:on_load/1 (497eae8)
- Inline less aggressively for native-code compilation (5a5fffe)
- seq_trace_SUITE: Don't native-compile (cac1991)
- Disable native code if on_load is used (7c3d056)
- andor_SUITE: Don't native-compile (8c513a4)
This branch contains temporary workarounds to avoid failing test
cases and is never intended to graduate.
* bm/ssl_npn (ssl) (2011-12-10) 2 commits
- Update SSL docs for SSL Next Protocol Support (4d2ba8b)
- Support for SSL Next Protocol Negotiation * http://technotes.googlecode.com/git/nextprotoneg.html (1173de0)
* hw/asn1rt_check-transform (asn1) (2011-10-15) 1 commit
- asn1rt_check: Fix transform_to_EXTERNAL1990 for binary input (6a69602)
* mh/create_cookie_error_msg (kernel) (2011-09-15) 1 commit
- Specify file name and error on create_cookie failure (9319587)
* mh/eunit_surefire-fixture-errors (eunit) (2011-03-10) 1 commit
- Include fixture setup and cleanup errors in Eunit Surefire report (7425075)
* mh/run_erl-exit-status (erts) (2011-11-29) 1 commit
- run_erl.c: propagate exit status from child process (bd15706)
* ta/prim_archive-reloading-mfa (erts, kernel, stdlib) (2011-10-19) 2 commits
- escript_SUITE: remove gratuitous space (3d89996)
- [erts,kernel,stdlib] fix escript/primary archive reloading (4ac74ce)
* uw/extending_gen (stdlib) (2011-01-17) 1 commit
- Add plugin support for alternative name lookup (b042673)
* wc/fix-eunit-print-stacktrace (eunit) (2011-11-02) 1 commit
- fix eunit to print stacktrace correctly if test cases throw any exception (73b94a9)
* slf/dtrace (Makefile
, dtrace, erts, kernel, otp) (2011-11-17) 4 commits
. Add DTrace support for OS X, Solaris, and Linux (via SystemTap), 4/4 (2913fb9)
. Add DTrace support for OS X, Solaris, and Linux (via SystemTap), 3/4 (ccf25b8)
. Add DTrace support for OS X, Solaris, and Linux (via SystemTap), 2/4 (6bf92ea)
. Add DTrace support for OS X, Solaris, and Linux (via SystemTap), 1/4 (538fee7)
------------------------------------------------------------
[Dropped]
* fm/posix-fallocate (erts, kernel) (2010-12-28) 1 commit
. Added file:allocate/2 (7b39f0f)
Temporary dropped due to massive merge conflicts
Needs rebase, and testfixes.
* ms/epmd-IPv6-node-reg (erts, kernel) (2011-06-03) 1 commit
. epmd: support IPv6 node registration (5523b21)
Crashing windows
* pg/add-os-pid-to-port-info (dialyzer, erts, hipe) (2010-08-19) 1 commit
. Extend erlang:port_info/1,2 to show the OS pid of a spawned process (336d1d1)
Master-pu
* rc/mnesia-lock-conflict-events (mnesia) (2011-11-28) 1 commit
. Generate mnesia events for conflicting locks (f4d94ae)
Can be added as a handler, Not included in OTP
From jose.valim@REDACTED Mon Feb 20 13:45:18 2012
From: jose.valim@REDACTED (=?ISO-8859-1?Q?Jos=E9_Valim?=)
Date: Mon, 20 Feb 2012 13:45:18 +0100
Subject: [erlang-patches] Update module attributes page
In-Reply-To: <4F196BC5.4070309@erlang.org>
References:
<4F196BC5.4070309@erlang.org>
Message-ID:
>
> The page on module attributes does not mention on_load and callback
> attributes:
>
> http://www.erlang.org/doc/reference_manual/modules.html
>
> Should I submit a patch to update those or they are not mentioned there
> on purpose?
>
>
Here we go. I have added on_load to the list and linked to
code_loading#on_load for more information. I have also fixed a small typo:
https://github.com/josevalim/otp/compare/on_load_docs
https://github.com/josevalim/otp/compare/on_load_docs.patch
I haven't added -callbacks to the list because I could not find any
detailed information on the subject. I can work on it later.
-------------- next part --------------
An HTML attachment was scrubbed...
URL:
From jose.valim@REDACTED Mon Feb 20 13:59:02 2012
From: jose.valim@REDACTED (=?ISO-8859-1?Q?Jos=E9_Valim?=)
Date: Mon, 20 Feb 2012 13:59:02 +0100
Subject: [erlang-patches] Update module attributes page
In-Reply-To:
References:
<4F196BC5.4070309@erlang.org>
Message-ID:
Realized the patch above was not from maint. So here we go again:
git fetch git://github.com/josevalim/otp.git on_load_docs_maint
https://github.com/josevalim/otp/compare/erlang:maint...josevalim:on_load_docs_maint
https://github.com/josevalim/otp/compare/erlang:maint...josevalim:on_load_docs_maint.patch
-------------- next part --------------
An HTML attachment was scrubbed...
URL:
From henrik@REDACTED Mon Feb 20 14:18:59 2012
From: henrik@REDACTED (Henrik Nord)
Date: Mon, 20 Feb 2012 14:18:59 +0100
Subject: [erlang-patches] Update module attributes page
In-Reply-To:
References:
<4F196BC5.4070309@erlang.org>
Message-ID: <4F424843.8040202@erlang.org>
Thank you for your contribution!
Patch included in 'pu'
On 02/20/2012 01:59 PM, Jos? Valim wrote:
> Realized the patch above was not from maint. So here we go again:
>
> git fetch git://github.com/josevalim/otp.git
> on_load_docs_maint
>
> https://github.com/josevalim/otp/compare/erlang:maint...josevalim:on_load_docs_maint
> https://github.com/josevalim/otp/compare/erlang:maint...josevalim:on_load_docs_maint.patch
>
>
> _______________________________________________
> erlang-patches mailing list
> erlang-patches@REDACTED
> http://erlang.org/mailman/listinfo/erlang-patches
--
/Henrik Nord Erlang/OTP
-------------- next part --------------
An HTML attachment was scrubbed...
URL:
From jose.valim@REDACTED Mon Feb 20 17:08:18 2012
From: jose.valim@REDACTED (=?ISO-8859-1?Q?Jos=E9_Valim?=)
Date: Mon, 20 Feb 2012 17:08:18 +0100
Subject: [erlang-patches] Information in the wiki page about Running Tests
probably out of date?
Message-ID:
Hello everyone,
In order to contribute to Erlang, I was trying to run tests.
The first issue I found was that the wiki page about Running tests was out
of date:
https://github.com/erlang/otp/wiki/Running-tests
With the help of #erlounge folks, I was able to update the command to use
the new ./otp_build:
ERL_LIBS=`pwd`/lib; ERL_TOP=`pwd`; ./otp_build all -a && ./otp_build tests
-a
I've updated the wiki page to use this new command. Could you please
validate the command above is the correct one?
In any case, after running the command above, I moved further to run tests
with:
cd release/tests/test_server
$ERL_TOP/bin/ct_run -suite ../compiler_test/andor_SUITE -case t_orelse
But then I got the following failure:
http://pastie.org/3421228
I was ultimately able to run tests related to my patch, but it would be
nice if we could make the instructions in the wiki page work out of the box
for other developers. I am running on Mac OS X, Snow Leopard.
*
Jos? Valim
www.plataformatec.com.br
Founder and Lead Developer
*
-------------- next part --------------
An HTML attachment was scrubbed...
URL:
From jose.valim@REDACTED Mon Feb 20 17:18:15 2012
From: jose.valim@REDACTED (=?ISO-8859-1?Q?Jos=E9_Valim?=)
Date: Mon, 20 Feb 2012 17:18:15 +0100
Subject: [erlang-patches] Support ** for recursion in filelib:wildcard
In-Reply-To:
References:
Message-ID:
So here is a patch that allows ** in filelib:wildcard() in order to support
recursion.
git fetch git://github.com/josevalim/otp.git double_star
https://github.com/josevalim/otp/compare/double_star
https://github.com/josevalim/otp/compare/double_star.patch
** now works similarly to bash, ruby, racf, etc. For example, running
filelib:wildcard("**/*.erl", Cwd) will find all files ending with .erl in
the Cwd recursively.
PS: I had some minor bumps in the road but in general I've found the
process of submitting patches to Erlang very well documented. So thanks to
those responsible for making this easy. :)
-------------- next part --------------
An HTML attachment was scrubbed...
URL:
From peerst@REDACTED Mon Feb 20 22:18:23 2012
From: peerst@REDACTED (Peer Stritzinger)
Date: Mon, 20 Feb 2012 22:18:23 +0100
Subject: [erlang-patches] Fwd: Add missing HAVE_IN6 && AF_INET6 ifdef
In-Reply-To:
References:
Message-ID:
Hi,
is something wrong with my fetch request? Didn't get any feedback on it.
Since this is my first patch, please let me know if I need to submit
it differently.
Cheers
-- Peer
---------- Forwarded message ----------
From: Peer Stritzinger
Date: Thu, Feb 16, 2012 at 2:24 PM
Subject: Add missing HAVE_IN6 && AF_INET6 ifdef
To: erlang-patches@REDACTED
Hi,
Please fetch:
? git fetch git@REDACTED:peerst/otp.git inet6_less_build_fix
Add missing HAVE_IN6 && AF_INET6 ifdef
This prevents building for operating systems that do not yet have IPv6
compatible socket API. Error can be reproduced by (cross)building for
a os that doesn't have these headers. This will abort with a error
about incomplete type 'struct in6_addr'. All other uses of IPv6 API in
inet_drv.c are conditionalized like in the patch.
https://github.com/peerst/otp/compare/inet6_less_build_fix
https://github.com/peerst/otp/compare/inet6_less_build_fix.patch
Cheers,
Peer Stritzinger
From henrik@REDACTED Tue Feb 21 12:16:55 2012
From: henrik@REDACTED (Henrik Nord)
Date: Tue, 21 Feb 2012 12:16:55 +0100
Subject: [erlang-patches] Information in the wiki page about Running
Tests probably out of date?
In-Reply-To:
References:
Message-ID: <4F437D27.9030308@erlang.org>
On 02/20/2012 05:08 PM, Jos? Valim wrote:
> Hello everyone,
>
> In order to contribute to Erlang, I was trying to run tests.
> The first issue I found was that the wiki page about Running tests was
> out of date:
>
> https://github.com/erlang/otp/wiki/Running-tests
>
> With the help of #erlounge folks, I was able to update the command to
> use the new ./otp_build:
>
> ERL_LIBS=`pwd`/lib; ERL_TOP=`pwd`; ./otp_build all -a &&
> ./otp_build tests -a
>
The ERL_LIBS should not be needed, and the -a for ./otp_build tests is
not needed
>
> I've updated the wiki page to use this new command. Could you please
> validate the command above is the correct one?
>
> In any case, after running the command above, I moved further to run
> tests with:
>
> cd release/tests/test_server
> $ERL_TOP/bin/ct_run -suite ../compiler_test/andor_SUITE -case t_orelse
>
>
> But then I got the following failure:
>
> http://pastie.org/3421228
Looks like you have not run ts:install(). check the wiki for details :D
>
> I was ultimately able to run tests related to my patch, but it would
> be nice if we could make the instructions in the wiki page work out of
> the box for other developers. I am running on Mac OS X, Snow Leopard.
The use of "./otp_build tests" , instead of "make release_tests" should
facilitate this, as it makes sure we use gmake/make
>
> *
> *Jos? Valim*
> www.plataformatec.com.br
> Founder and Lead Developer
> *
>
>
> _______________________________________________
> erlang-patches mailing list
> erlang-patches@REDACTED
> http://erlang.org/mailman/listinfo/erlang-patches
--
/Henrik Nord Erlang/OTP
-------------- next part --------------
An HTML attachment was scrubbed...
URL:
From jose.valim@REDACTED Tue Feb 21 12:46:57 2012
From: jose.valim@REDACTED (=?ISO-8859-1?Q?Jos=E9_Valim?=)
Date: Tue, 21 Feb 2012 12:46:57 +0100
Subject: [erlang-patches] Information in the wiki page about Running
Tests probably out of date?
In-Reply-To: <4F437D27.9030308@erlang.org>
References:
<4F437D27.9030308@erlang.org>
Message-ID:
>
> Looks like you have not run ts:install(). check the wiki for details :D
>
I thought I didn't have to run the install command if I was running from
the command line. I guess I was wrong!
Thanks, I have updated the wiki to make clear ts:install() is required.
Also removed -a from ./otp_build tests.
-------------- next part --------------
An HTML attachment was scrubbed...
URL:
From gustav@REDACTED Tue Feb 21 14:58:05 2012
From: gustav@REDACTED (Gustav Simonsson)
Date: Tue, 21 Feb 2012 14:58:05 +0100
Subject: [erlang-patches] Fwd: Add missing HAVE_IN6 && AF_INET6 ifdef
In-Reply-To:
References:
Message-ID: <4F43A2ED.1010709@erlang.org>
Hi Peer!
The branch was based on 'master'.
All bugfixes/corrections should be based on 'maint'.
Please see https://github.com/erlang/otp/wiki/Submitting-patches for
more information.
We rebased your branch and have included it in 'pu' for testing.
Thank you for the contribution!
Regards,
Gustav Simonsson
Erlang/OTP team
On 2012-02-20 22:18, Peer Stritzinger wrote:
> Hi,
>
> is something wrong with my fetch request? Didn't get any feedback on it.
>
> Since this is my first patch, please let me know if I need to submit
> it differently.
>
> Cheers
> -- Peer
>
>
> ---------- Forwarded message ----------
> From: Peer Stritzinger
> Date: Thu, Feb 16, 2012 at 2:24 PM
> Subject: Add missing HAVE_IN6&& AF_INET6 ifdef
> To: erlang-patches@REDACTED
>
>
> Hi,
>
> Please fetch:
>
> git fetch git@REDACTED:peerst/otp.git inet6_less_build_fix
>
> Add missing HAVE_IN6&& AF_INET6 ifdef
>
> This prevents building for operating systems that do not yet have IPv6
> compatible socket API. Error can be reproduced by (cross)building for
> a os that doesn't have these headers. This will abort with a error
> about incomplete type 'struct in6_addr'. All other uses of IPv6 API in
> inet_drv.c are conditionalized like in the patch.
>
> https://github.com/peerst/otp/compare/inet6_less_build_fix
> https://github.com/peerst/otp/compare/inet6_less_build_fix.patch
>
> Cheers,
> Peer Stritzinger
> _______________________________________________
> erlang-patches mailing list
> erlang-patches@REDACTED
> http://erlang.org/mailman/listinfo/erlang-patches
From aschultz@REDACTED Tue Feb 21 18:13:16 2012
From: aschultz@REDACTED (Andreas Schultz)
Date: Tue, 21 Feb 2012 18:13:16 +0100 (CET)
Subject: [erlang-patches] SSL: export some session key material and make the
TLS PRF accessible
In-Reply-To: <1676407923.353752.1329842961306.JavaMail.root@office>
Message-ID: <1031714169.354868.1329844396391.JavaMail.root@office>
Hi,
Please fetch:
git fetch git://github.com/RoadRunnr/otp.git tls-export-stuff
Export some session key material and make the TLS PRF accessible
Some protocols (e.g. EAP-PEAP, EAP-TLS, EAP-TTLS) that use TLS as
transport layer need to generate additional application specific
key material. One way to generate such material is to use the TLS
PRF and key material from the TLS session itself.
This change adds a function to access the required key material and
makes a TLS session PRF accessible.
https://github.com/RoadRunnr/otp/compare/tls-export-stuff
https://github.com/RoadRunnr/otp/compare/tls-export-stuff.patch
Regards
Andreas
--
--
Dipl. Inform.
Andreas Schultz
email: as@REDACTED
phone: +49-391-819099-224
mobil: +49-179-7654368
------------------ managed broadband access ------------------
Travelping GmbH phone: +49-391-8190990
Roentgenstr. 13 fax: +49-391-819099299
D-39108 Magdeburg email: info@REDACTED
GERMANY web: http://www.travelping.com
Company Registration: HRB21276 Handelsregistergericht Chemnitz
Geschaeftsfuehrer: Holger Winkelmann | VAT ID No.: DE236673780
--------------------------------------------------------------
From jimenezrick@REDACTED Wed Feb 22 11:18:41 2012
From: jimenezrick@REDACTED (Ricardo Catalinas =?iso-8859-1?Q?Jim=E9nez?=)
Date: Wed, 22 Feb 2012 11:18:41 +0100
Subject: [erlang-patches] Fix a code snippet and two typos in the doc
Message-ID: <20120222101841.GA2085@viper.local>
Please fetch:
git fetch git://github.com/jimenezrick/otp.git fix-misc-doc-typos
Review here:
https://github.com/jimenezrick/otp/compare/erlang:maint...jimenezrick:fix-misc-doc-typos
https://github.com/jimenezrick/otp/compare/erlang:maint...jimenezrick:fix-misc-doc-typos.patch
Regards
--
Ricardo (http://r.untroubled.be/)
From gustav@REDACTED Wed Feb 22 12:07:01 2012
From: gustav@REDACTED (Gustav Simonsson)
Date: Wed, 22 Feb 2012 12:07:01 +0100
Subject: [erlang-patches] Fix a code snippet and two typos in the doc
In-Reply-To: <20120222101841.GA2085@viper.local>
References: <20120222101841.GA2085@viper.local>
Message-ID: <4F44CC55.2070208@erlang.org>
Hi Ricardo!
Thank you for the patch! It will be included in the next release.
Regards,
Gustav Simonsson
Erlang/OTP team
On 2012-02-22 11:18, Ricardo Catalinas Jim?nez wrote:
> Please fetch:
> git fetch git://github.com/jimenezrick/otp.git fix-misc-doc-typos
>
> Review here:
> https://github.com/jimenezrick/otp/compare/erlang:maint...jimenezrick:fix-misc-doc-typos
> https://github.com/jimenezrick/otp/compare/erlang:maint...jimenezrick:fix-misc-doc-typos.patch
>
>
> Regards
From aronisstav@REDACTED Wed Feb 22 13:39:25 2012
From: aronisstav@REDACTED (Stavros Aronis)
Date: Wed, 22 Feb 2012 13:39:25 +0100
Subject: [erlang-patches] Dialyzer fixes
Message-ID:
Highlights:
- Support for alternative spelling of behaviours
- Fixes for the testsuite generation (./otp_build tests should now work
without need to cleanup the old directory)
Branch (based on current maint):
git fetch git://github.com/aronisstav/otp.git dialyzer-fixes
Useful note: After using "./otp_build tests" you may directly use "ct_run"
in dialyzer_tests directory without need of "ts:install()".
Stavros Aronis
-------------- next part --------------
An HTML attachment was scrubbed...
URL:
From ingela@REDACTED Thu Feb 23 12:32:59 2012
From: ingela@REDACTED (Ingela Anderton Andin)
Date: Thu, 23 Feb 2012 12:32:59 +0100
Subject: [erlang-patches] SSL: export some session key material and make
the TLS PRF accessible
In-Reply-To: <1031714169.354868.1329844396391.JavaMail.root@office>
References: <1031714169.354868.1329844396391.JavaMail.root@office>
Message-ID: <4F4623EB.8030200@erix.ericsson.se>
Hi!
I looked into this a bit and I would prefer not to have have a function
that exports security parameters as this is not really desirable and also
kind of unnecessary as you send them back to the SSL/TLS-gen-fsm process.
I think there should be a function prf
-type security_parm_name() :: master_secret | client_random | server_random
prf(tls_version(), Secret::binary() | security_param_name(), Label::binary(),
Seed:: [binary()| security_parm_name()], WantedLen::non_neg_integer()) -> {ok, binary()} | {error, reason()}
Then the erlang SSL/TLS-fsm process will replace all
security_param_name-instances with the value of the corresponding
security parameter
before calling the prf-function.
I think there is no need for an {'EXIT, term()} return if necessary to
catch something {error, Reason} is sufficient and the Reason can provide the
information it was a caught EXIT if that could be interesting in that
particular case, it is not always for example consider the following catch
connect(Host, Port, Socket, Options, User, CbInfo, Timeout) ->
try start_fsm(client, Host, Port, Socket, Options, User, CbInfo,
Timeout)
catch
exit:{noproc, _} ->
{error, ssl_not_started}
end.
Regards Ingela Erlang/OTP team Ericsson AB
Andreas Schultz wrote:
> Hi,
>
> Please fetch:
>
> git fetch git://github.com/RoadRunnr/otp.git tls-export-stuff
>
> Export some session key material and make the TLS PRF accessible
>
> Some protocols (e.g. EAP-PEAP, EAP-TLS, EAP-TTLS) that use TLS as
> transport layer need to generate additional application specific
> key material. One way to generate such material is to use the TLS
> PRF and key material from the TLS session itself.
>
> This change adds a function to access the required key material and
> makes a TLS session PRF accessible.
>
> https://github.com/RoadRunnr/otp/compare/tls-export-stuff
> https://github.com/RoadRunnr/otp/compare/tls-export-stuff.patch
>
> Regards
> Andreas
>
>
From aschultz@REDACTED Fri Feb 24 14:55:06 2012
From: aschultz@REDACTED (Andreas Schultz)
Date: Fri, 24 Feb 2012 14:55:06 +0100 (CET)
Subject: [erlang-patches] SSL: export some session key material and make
the TLS PRF accessible
In-Reply-To: <4F4623EB.8030200@erix.ericsson.se>
Message-ID: <66460430.428511.1330091706543.JavaMail.root@office>
Hi Ingela,
I have pushed a new version to the same location.
git fetch git://github.com/RoadRunnr/otp.git tls-export-stuff
https://github.com/RoadRunnr/otp/compare/tls-export-stuff
https://github.com/RoadRunnr/otp/compare/tls-export-stuff.patch
This version removes the access to the internal security_parameters
and adopts a scheme for the prf function that is close to what you
suggested. The prf function is now:
-type prf_random() :: client | server.
prf(#sslsocket{}, Secret::binary() | 'master_secret', Label::binary(),
Seed::[binary() | prf_random()], WantedLen::non_neg_integer()) ->
{ok, binary()} | {error, reason()}
It always works on an ssl socket and uses the TLS version negotiated for
the socket. Specifying the TLS version does not really makes sense as the
internal security_parameters are TLS version dependent and I can not see
a use case for using the PRF without an active TLS connection.
Allowing the client and server randoms for the secret without exporting
them is somewhat strange, so I don't allow that. The same goes for using
the master secret as seed.
Andreas
----- Original Message -----
> Hi!
>
> I looked into this a bit and I would prefer not to have have a
> function
> that exports security parameters as this is not really desirable and
> also
> kind of unnecessary as you send them back to the SSL/TLS-gen-fsm
> process.
>
> I think there should be a function prf
>
> -type security_parm_name() :: master_secret | client_random |
> server_random
>
> prf(tls_version(), Secret::binary() | security_param_name(),
> Label::binary(),
> Seed:: [binary()| security_parm_name()],
> WantedLen::non_neg_integer()) -> {ok, binary()} | {error,
> reason()}
>
>
> Then the erlang SSL/TLS-fsm process will replace all
> security_param_name-instances with the value of the corresponding
> security parameter
> before calling the prf-function.
>
> I think there is no need for an {'EXIT, term()} return if necessary
> to
> catch something {error, Reason} is sufficient and the Reason can
> provide the
> information it was a caught EXIT if that could be interesting in that
> particular case, it is not always for example consider the following
> catch
>
> connect(Host, Port, Socket, Options, User, CbInfo, Timeout) ->
> try start_fsm(client, Host, Port, Socket, Options, User, CbInfo,
> Timeout)
> catch
> exit:{noproc, _} ->
> {error, ssl_not_started}
> end.
>
> Regards Ingela Erlang/OTP team Ericsson AB
>
> Andreas Schultz wrote:
> > Hi,
> >
> > Please fetch:
> >
> > git fetch git://github.com/RoadRunnr/otp.git tls-export-stuff
> >
> > Export some session key material and make the TLS PRF accessible
> >
> > Some protocols (e.g. EAP-PEAP, EAP-TLS, EAP-TTLS) that use TLS as
> > transport layer need to generate additional application specific
> > key material. One way to generate such material is to use the TLS
> > PRF and key material from the TLS session itself.
> >
> > This change adds a function to access the required key material and
> > makes a TLS session PRF accessible.
> >
> > https://github.com/RoadRunnr/otp/compare/tls-export-stuff
> > https://github.com/RoadRunnr/otp/compare/tls-export-stuff.patch
> >
> > Regards
> > Andreas
> >
> >
>
>
--
--
Dipl. Inform.
Andreas Schultz
email: as@REDACTED
phone: +49-391-819099-224
mobil: +49-179-7654368
------------------ managed broadband access ------------------
Travelping GmbH phone: +49-391-8190990
Roentgenstr. 13 fax: +49-391-819099299
D-39108 Magdeburg email: info@REDACTED
GERMANY web: http://www.travelping.com
Company Registration: HRB21276 Handelsregistergericht Chemnitz
Geschaeftsfuehrer: Holger Winkelmann | VAT ID No.: DE236673780
--------------------------------------------------------------
From jimenezrick@REDACTED Fri Feb 24 15:10:04 2012
From: jimenezrick@REDACTED (Ricardo Catalinas =?iso-8859-1?Q?Jim=E9nez?=)
Date: Fri, 24 Feb 2012 15:10:04 +0100
Subject: [erlang-patches] Fix supervisor doc: Shutdown,
MaxR and MaxT type specs
Message-ID: <20120224141004.GB821@viper.local>
The next code snippets from supervisor.erl show that Shutdown from a
child specification must be greater than zero and the same applies to
MaxT.
--- supervisor.erl ----------------------------------------------------------
validShutdown(Shutdown, _)
when is_integer(Shutdown), Shutdown > 0 -> true;
validShutdown(infinity, _) -> true;
validShutdown(brutal_kill, _) -> true;
validShutdown(Shutdown, _) -> throw({invalid_shutdown, Shutdown}).
validIntensity(Max) when is_integer(Max),
Max >= 0 -> true;
validIntensity(What) -> throw({invalid_intensity, What}).
validPeriod(Period) when is_integer(Period),
Period > 0 -> true;
validPeriod(What) -> throw({invalid_period, What}).
-----------------------------------------------------------------------------
I fixed the supervisor doc and made minor cosmetic changes.
Please fetch:
git fetch git://github.com/jimenezrick/otp.git fix-supervisor-shutdown-doc
Review here:
https://github.com/jimenezrick/otp/compare/erlang:maint...fix-supervisor-shutdown-doc
https://github.com/jimenezrick/otp/compare/erlang:maint...fix-supervisor-shutdown-doc.patch
Regards
--
Ricardo (http://r.untroubled.be/)
From aschultz@REDACTED Fri Feb 24 18:08:14 2012
From: aschultz@REDACTED (Andreas Schultz)
Date: Fri, 24 Feb 2012 18:08:14 +0100 (CET)
Subject: [erlang-patches] TLS 1.2: Calculate handshake hash only when needed
In-Reply-To: <643320373.435252.1330103010581.JavaMail.root@office>
Message-ID: <1041077320.435273.1330103294191.JavaMail.root@office>
Hi,
Some time ago we discussed how to split the TLS 1.2 changes
for review. Here is the first part of that. It is possibly
the most intrusive part, but also the simplest to review.
git fetch git@REDACTED:RoadRunnr/otp.git tls12-to-upstream
https://github.com/RoadRunnr/otp/compare/tls12-to-upstream
https://github.com/RoadRunnr/otp/compare/tls12-to-upstream.patch
Calculate handshake hash only when needed
TLS/SSL version before 1.2 always used a MD5/SHA combination
for the handshake hashes. With TLS 1.2 the default hash is
SHA256 and it is possible to negotiate a different hash.
This change delays the calculation of the handshake
hashes until they are really needed. At that point the hash
to use should be known.
For now MD5/SHA is still hard coded.
Andreas
--
--
Dipl. Inform.
Andreas Schultz
email: as@REDACTED
phone: +49-391-819099-224
mobil: +49-179-7654368
------------------ managed broadband access ------------------
Travelping GmbH phone: +49-391-8190990
Roentgenstr. 13 fax: +49-391-819099299
D-39108 Magdeburg email: info@REDACTED
GERMANY web: http://www.travelping.com
Company Registration: HRB21276 Handelsregistergericht Chemnitz
Geschaeftsfuehrer: Holger Winkelmann | VAT ID No.: DE236673780
--------------------------------------------------------------
From ingela@REDACTED Tue Feb 28 10:53:37 2012
From: ingela@REDACTED (Ingela Anderton Andin)
Date: Tue, 28 Feb 2012 10:53:37 +0100
Subject: [erlang-patches] SSL: export some session key material and make
the TLS PRF accessible
In-Reply-To: <66460430.428511.1330091706543.JavaMail.root@office>
References: <66460430.428511.1330091706543.JavaMail.root@office>
Message-ID: <4F4CA421.9060205@erix.ericsson.se>
Hi Andreas!
I think it looks good :)
But there is a strange part in the documentation:
This sentence I think needs to be reformulated!
+ This function is menaing for for TLS connections, {error,
undefined}
+ is returned for SSLv3 connections.
No longer needed:
+ When using this functions with key and/or random material from the
TLS session,
+ special care needs to be take to not expose any sensitive crypto
state
+
Regards Ingela Erlang/OTP team - Ericsson AB
Andreas Schultz wrote:
> Hi Ingela,
>
> I have pushed a new version to the same location.
>
> git fetch git://github.com/RoadRunnr/otp.git tls-export-stuff
>
> https://github.com/RoadRunnr/otp/compare/tls-export-stuff
> https://github.com/RoadRunnr/otp/compare/tls-export-stuff.patch
>
> This version removes the access to the internal security_parameters
> and adopts a scheme for the prf function that is close to what you
> suggested. The prf function is now:
>
> -type prf_random() :: client | server.
>
> prf(#sslsocket{}, Secret::binary() | 'master_secret', Label::binary(),
> Seed::[binary() | prf_random()], WantedLen::non_neg_integer()) ->
> {ok, binary()} | {error, reason()}
>
> It always works on an ssl socket and uses the TLS version negotiated for
> the socket. Specifying the TLS version does not really makes sense as the
> internal security_parameters are TLS version dependent and I can not see
> a use case for using the PRF without an active TLS connection.
>
> Allowing the client and server randoms for the secret without exporting
> them is somewhat strange, so I don't allow that. The same goes for using
> the master secret as seed.
>
> Andreas
>
> ----- Original Message -----
>
>> Hi!
>>
>> I looked into this a bit and I would prefer not to have have a
>> function
>> that exports security parameters as this is not really desirable and
>> also
>> kind of unnecessary as you send them back to the SSL/TLS-gen-fsm
>> process.
>>
>> I think there should be a function prf
>>
>> -type security_parm_name() :: master_secret | client_random |
>> server_random
>>
>> prf(tls_version(), Secret::binary() | security_param_name(),
>> Label::binary(),
>> Seed:: [binary()| security_parm_name()],
>> WantedLen::non_neg_integer()) -> {ok, binary()} | {error,
>> reason()}
>>
>>
>> Then the erlang SSL/TLS-fsm process will replace all
>> security_param_name-instances with the value of the corresponding
>> security parameter
>> before calling the prf-function.
>>
>> I think there is no need for an {'EXIT, term()} return if necessary
>> to
>> catch something {error, Reason} is sufficient and the Reason can
>> provide the
>> information it was a caught EXIT if that could be interesting in that
>> particular case, it is not always for example consider the following
>> catch
>>
>> connect(Host, Port, Socket, Options, User, CbInfo, Timeout) ->
>> try start_fsm(client, Host, Port, Socket, Options, User, CbInfo,
>> Timeout)
>> catch
>> exit:{noproc, _} ->
>> {error, ssl_not_started}
>> end.
>>
>> Regards Ingela Erlang/OTP team Ericsson AB
>>
>> Andreas Schultz wrote:
>>
>>> Hi,
>>>
>>> Please fetch:
>>>
>>> git fetch git://github.com/RoadRunnr/otp.git tls-export-stuff
>>>
>>> Export some session key material and make the TLS PRF accessible
>>>
>>> Some protocols (e.g. EAP-PEAP, EAP-TLS, EAP-TTLS) that use TLS as
>>> transport layer need to generate additional application specific
>>> key material. One way to generate such material is to use the TLS
>>> PRF and key material from the TLS session itself.
>>>
>>> This change adds a function to access the required key material and
>>> makes a TLS session PRF accessible.
>>>
>>> https://github.com/RoadRunnr/otp/compare/tls-export-stuff
>>> https://github.com/RoadRunnr/otp/compare/tls-export-stuff.patch
>>>
>>> Regards
>>> Andreas
>>>
>>>
>>>
>>
>
>
From aschultz@REDACTED Tue Feb 28 12:18:42 2012
From: aschultz@REDACTED (Andreas Schultz)
Date: Tue, 28 Feb 2012 12:18:42 +0100 (CET)
Subject: [erlang-patches] SSL: export some session key material and make
the TLS PRF accessible
In-Reply-To: <4F4CA421.9060205@erix.ericsson.se>
Message-ID: <630714698.474606.1330427922471.JavaMail.root@office>
Hi Ingela,
Documentation is update in the same place.
The first sentence is now:
+ This function can only be used with TLS connections, {error, undefined}
+ is returned for SSLv3 connections.
I have also removed the warning.
Andreas
----- Original Message -----
> Hi Andreas!
>
> I think it looks good :)
>
> But there is a strange part in the documentation:
>
> This sentence I think needs to be reformulated!
>
> + This function is menaing for for TLS connections, {error,
> undefined}
> + is returned for SSLv3 connections.
>
> No longer needed:
>
> + When using this functions with key and/or random material from
> the
> TLS session,
> + special care needs to be take to not expose any sensitive crypto
> state
> +
>
> Regards Ingela Erlang/OTP team - Ericsson AB
>
> Andreas Schultz wrote:
> > Hi Ingela,
> >
> > I have pushed a new version to the same location.
> >
> > git fetch git://github.com/RoadRunnr/otp.git tls-export-stuff
> >
> > https://github.com/RoadRunnr/otp/compare/tls-export-stuff
> > https://github.com/RoadRunnr/otp/compare/tls-export-stuff.patch
> >
> > This version removes the access to the internal security_parameters
> > and adopts a scheme for the prf function that is close to what you
> > suggested. The prf function is now:
> >
> > -type prf_random() :: client | server.
> >
> > prf(#sslsocket{}, Secret::binary() | 'master_secret',
> > Label::binary(),
> > Seed::[binary() | prf_random()], WantedLen::non_neg_integer())
> > ->
> > {ok, binary()} | {error, reason()}
> >
> > It always works on an ssl socket and uses the TLS version
> > negotiated for
> > the socket. Specifying the TLS version does not really makes sense
> > as the
> > internal security_parameters are TLS version dependent and I can
> > not see
> > a use case for using the PRF without an active TLS connection.
> >
> > Allowing the client and server randoms for the secret without
> > exporting
> > them is somewhat strange, so I don't allow that. The same goes for
> > using
> > the master secret as seed.
> >
> > Andreas
> >
> > ----- Original Message -----
> >
> >> Hi!
> >>
> >> I looked into this a bit and I would prefer not to have have a
> >> function
> >> that exports security parameters as this is not really desirable
> >> and
> >> also
> >> kind of unnecessary as you send them back to the SSL/TLS-gen-fsm
> >> process.
> >>
> >> I think there should be a function prf
> >>
> >> -type security_parm_name() :: master_secret | client_random |
> >> server_random
> >>
> >> prf(tls_version(), Secret::binary() | security_param_name(),
> >> Label::binary(),
> >> Seed:: [binary()| security_parm_name()],
> >> WantedLen::non_neg_integer()) -> {ok, binary()} | {error,
> >> reason()}
> >>
> >>
> >> Then the erlang SSL/TLS-fsm process will replace all
> >> security_param_name-instances with the value of the corresponding
> >> security parameter
> >> before calling the prf-function.
> >>
> >> I think there is no need for an {'EXIT, term()} return if
> >> necessary
> >> to
> >> catch something {error, Reason} is sufficient and the Reason can
> >> provide the
> >> information it was a caught EXIT if that could be interesting in
> >> that
> >> particular case, it is not always for example consider the
> >> following
> >> catch
> >>
> >> connect(Host, Port, Socket, Options, User, CbInfo, Timeout) ->
> >> try start_fsm(client, Host, Port, Socket, Options, User,
> >> CbInfo,
> >> Timeout)
> >> catch
> >> exit:{noproc, _} ->
> >> {error, ssl_not_started}
> >> end.
> >>
> >> Regards Ingela Erlang/OTP team Ericsson AB
> >>
> >> Andreas Schultz wrote:
> >>
> >>> Hi,
> >>>
> >>> Please fetch:
> >>>
> >>> git fetch git://github.com/RoadRunnr/otp.git tls-export-stuff
> >>>
> >>> Export some session key material and make the TLS PRF accessible
> >>>
> >>> Some protocols (e.g. EAP-PEAP, EAP-TLS, EAP-TTLS) that use TLS as
> >>> transport layer need to generate additional application specific
> >>> key material. One way to generate such material is to use the TLS
> >>> PRF and key material from the TLS session itself.
> >>>
> >>> This change adds a function to access the required key material
> >>> and
> >>> makes a TLS session PRF accessible.
> >>>
> >>> https://github.com/RoadRunnr/otp/compare/tls-export-stuff
> >>> https://github.com/RoadRunnr/otp/compare/tls-export-stuff.patch
> >>>
> >>> Regards
> >>> Andreas
> >>>
> >>>
> >>>
> >>
> >
> >
>
>
--
--
Dipl. Inform.
Andreas Schultz
email: as@REDACTED
phone: +49-391-819099-224
mobil: +49-179-7654368
------------------ managed broadband access ------------------
Travelping GmbH phone: +49-391-8190990
Roentgenstr. 13 fax: +49-391-819099299
D-39108 Magdeburg email: info@REDACTED
GERMANY web: http://www.travelping.com
Company Registration: HRB21276 Handelsregistergericht Chemnitz
Geschaeftsfuehrer: Holger Winkelmann | VAT ID No.: DE236673780
--------------------------------------------------------------
From jimenezrick@REDACTED Tue Feb 28 18:18:36 2012
From: jimenezrick@REDACTED (Ricardo Catalinas =?iso-8859-1?Q?Jim=E9nez?=)
Date: Tue, 28 Feb 2012 18:18:36 +0100
Subject: [erlang-patches] Minor misc doc improvements
Message-ID: <20120228171836.GJ907@viper.local>
Please fetch:
git fetch git://github.com/jimenezrick/otp.git minor-doc-improvements
Review here:
https://github.com/jimenezrick/otp/compare/erlang:maint...minor-doc-improvements
https://github.com/jimenezrick/otp/compare/erlang:maint...minor-doc-improvements.patch
Regards
--
Ricardo (http://r.untroubled.be/)
From gustav@REDACTED Wed Feb 29 15:16:11 2012
From: gustav@REDACTED (Gustav Simonsson)
Date: Wed, 29 Feb 2012 15:16:11 +0100
Subject: [erlang-patches] SSL: export some session key material and make
the TLS PRF accessible
In-Reply-To: <630714698.474606.1330427922471.JavaMail.root@office>
References: <630714698.474606.1330427922471.JavaMail.root@office>
Message-ID: <4F4E332B.9060801@erlang.org>
This version looks good and will be added in the 'pu' branch for testing.
Regards,
Gustav Simonsson
Erlang/OTP team
On 2012-02-28 12:18, Andreas Schultz wrote:
> Hi Ingela,
>
> Documentation is update in the same place.
>
> The first sentence is now:
> +This function can only be used with TLS connections,{error, undefined}
> + is returned for SSLv3 connections.
>
> I have also removed the warning.
>
> Andreas
>
> ----- Original Message -----
>> Hi Andreas!
>>
>> I think it looks good :)
>>
>> But there is a strange part in the documentation:
>>
>> This sentence I think needs to be reformulated!
>>
>> + This function is menaing for for TLS connections,{error,
>> undefined}
>> + is returned for SSLv3 connections.
>>
>> No longer needed:
>>
>> +When using this functions with key and/or random material from
>> the
>> TLS session,
>> + special care needs to be take to not expose any sensitive crypto
>> state
>> +
>>
>> Regards Ingela Erlang/OTP team - Ericsson AB
>>
>> Andreas Schultz wrote:
>>> Hi Ingela,
>>>
>>> I have pushed a new version to the same location.
>>>
>>> git fetch git://github.com/RoadRunnr/otp.git tls-export-stuff
>>>
>>> https://github.com/RoadRunnr/otp/compare/tls-export-stuff
>>> https://github.com/RoadRunnr/otp/compare/tls-export-stuff.patch
>>>
>>> This version removes the access to the internal security_parameters
>>> and adopts a scheme for the prf function that is close to what you
>>> suggested. The prf function is now:
>>>
>>> -type prf_random() :: client | server.
>>>
>>> prf(#sslsocket{}, Secret::binary() | 'master_secret',
>>> Label::binary(),
>>> Seed::[binary() | prf_random()], WantedLen::non_neg_integer())
>>> ->
>>> {ok, binary()} | {error, reason()}
>>>
>>> It always works on an ssl socket and uses the TLS version
>>> negotiated for
>>> the socket. Specifying the TLS version does not really makes sense
>>> as the
>>> internal security_parameters are TLS version dependent and I can
>>> not see
>>> a use case for using the PRF without an active TLS connection.
>>>
>>> Allowing the client and server randoms for the secret without
>>> exporting
>>> them is somewhat strange, so I don't allow that. The same goes for
>>> using
>>> the master secret as seed.
>>>
>>> Andreas
>>>
>>> ----- Original Message -----
>>>
>>>> Hi!
>>>>
>>>> I looked into this a bit and I would prefer not to have have a
>>>> function
>>>> that exports security parameters as this is not really desirable
>>>> and
>>>> also
>>>> kind of unnecessary as you send them back to the SSL/TLS-gen-fsm
>>>> process.
>>>>
>>>> I think there should be a function prf
>>>>
>>>> -type security_parm_name() :: master_secret | client_random |
>>>> server_random
>>>>
>>>> prf(tls_version(), Secret::binary() | security_param_name(),
>>>> Label::binary(),
>>>> Seed:: [binary()| security_parm_name()],
>>>> WantedLen::non_neg_integer()) -> {ok, binary()} | {error,
>>>> reason()}
>>>>
>>>>
>>>> Then the erlang SSL/TLS-fsm process will replace all
>>>> security_param_name-instances with the value of the corresponding
>>>> security parameter
>>>> before calling the prf-function.
>>>>
>>>> I think there is no need for an {'EXIT, term()} return if
>>>> necessary
>>>> to
>>>> catch something {error, Reason} is sufficient and the Reason can
>>>> provide the
>>>> information it was a caught EXIT if that could be interesting in
>>>> that
>>>> particular case, it is not always for example consider the
>>>> following
>>>> catch
>>>>
>>>> connect(Host, Port, Socket, Options, User, CbInfo, Timeout) ->
>>>> try start_fsm(client, Host, Port, Socket, Options, User,
>>>> CbInfo,
>>>> Timeout)
>>>> catch
>>>> exit:{noproc, _} ->
>>>> {error, ssl_not_started}
>>>> end.
>>>>
>>>> Regards Ingela Erlang/OTP team Ericsson AB
>>>>
>>>> Andreas Schultz wrote:
>>>>
>>>>> Hi,
>>>>>
>>>>> Please fetch:
>>>>>
>>>>> git fetch git://github.com/RoadRunnr/otp.git tls-export-stuff
>>>>>
>>>>> Export some session key material and make the TLS PRF accessible
>>>>>
>>>>> Some protocols (e.g. EAP-PEAP, EAP-TLS, EAP-TTLS) that use TLS as
>>>>> transport layer need to generate additional application specific
>>>>> key material. One way to generate such material is to use the TLS
>>>>> PRF and key material from the TLS session itself.
>>>>>
>>>>> This change adds a function to access the required key material
>>>>> and
>>>>> makes a TLS session PRF accessible.
>>>>>
>>>>> https://github.com/RoadRunnr/otp/compare/tls-export-stuff
>>>>> https://github.com/RoadRunnr/otp/compare/tls-export-stuff.patch
>>>>>
>>>>> Regards
>>>>> Andreas
>>>>>
>>>>>
>>>>>
>>>>
>>>
>>
From gustav@REDACTED Wed Feb 29 16:39:23 2012
From: gustav@REDACTED (Gustav Simonsson)
Date: Wed, 29 Feb 2012 16:39:23 +0100
Subject: [erlang-patches] Minor misc doc improvements
In-Reply-To: <20120228171836.GJ907@viper.local>
References: <20120228171836.GJ907@viper.local>
Message-ID: <4F4E46AB.10302@erlang.org>
Hi Ricardo,
We will include a slightly modified version of this patch into the 'pu'
branch.
Thank you for the contribution.
Regards,
Gustav Simonsson
Erlang/OTP team
On 2012-02-28 18:18, Ricardo Catalinas Jim?nez wrote:
> Please fetch:
> git fetch git://github.com/jimenezrick/otp.git minor-doc-improvements
>
> Review here:
> https://github.com/jimenezrick/otp/compare/erlang:maint...minor-doc-improvements
> https://github.com/jimenezrick/otp/compare/erlang:maint...minor-doc-improvements.patch
>
>
> Regards