From kostis@REDACTED Tue Mar 8 00:15:04 2016 From: kostis@REDACTED (Kostis Sagonas) Date: Tue, 8 Mar 2016 00:15:04 +0100 Subject: [erlang-bugs] HiPe compiler FP inlining crashing In-Reply-To: <16231087-2669-4D41-A77E-5836FFE3A1C2@erlang-solutions.com> References: <16231087-2669-4D41-A77E-5836FFE3A1C2@erlang-solutions.com> Message-ID: <56DE0B78.2040002@cs.ntua.gr> On 11/25/2015 02:25 PM, Mattias Jansson wrote: > I am having a problem with a crashing HiPe compiler. > > It has been tested on Erlang OTP 18.1 (64-bit) on OSX 10.11.1, and also on Fedora Linux 22 with OTP versions 18.0 and 17.5 (64-bit). > It crashes on Linux as well as OSX, but it does not crash in OTP 17.5. This has only been seen in 18.* > > The following code has been shrunk to remain syntactically correct and still show the error when compiling > (you?d be surprised by how much of this code is actually necessary to reproduce this). > > > SNIP > > > The code compiles without problem if running the compiler without the +native flag. With the flag, the compiler will crash. > If compiling with the no_inline_fp flag enabled, the compiler does not crash. Thanks for the bug report. A pull request which fixes this particular problem has been submitted on github: https://github.com/erlang/otp/pull/984 Most likely, it will appear in the next Erlang/OTP release. Kostis From heinz@REDACTED Thu Mar 10 21:59:32 2016 From: heinz@REDACTED (Heinz Nikolaus Gies) Date: Thu, 10 Mar 2016 15:59:32 -0500 Subject: [erlang-bugs] Bug in random seed (definition?) and random:uniform_s/2 Message-ID: <3A896DE7-4144-4AF6-A0FB-6DEFE92D1222@licenser.net> This might not be critical any more since seed is deprecated but I encountered a problem with random today when passing in hand crafted seeds. The definition of a seed is: {integer(), integer(), integer()} The seed was generated by the method suggested in random:seed: {erlang:phash2([node()]), erlang:monotonic_time(), erlang:unique_integer()} This resulted in the seed: {128631525,-576302453291645741,-576460752303421854} That seed is valid based on the type specification of seed. Now entered random:uniform_s/2, by specification it returns a value 1 <= N <= (passed argument) BUT it doesn?t with this seed: random:uniform_s(10, {128631525,-576302453291645741,-576460752303421854}). {-1,{23048,-115,-29427}} Yes I know that constructing and passing a seed like this is evil, please don?t get hung on that, it is not my code it?s code I am debugging - I fully agree that it probably should be changed to rand and be done with it, still it looks is a bug. Cheers, Heinz -------------- next part -------------- An HTML attachment was scrubbed... URL: -------------- next part -------------- A non-text attachment was scrubbed... Name: signature.asc Type: application/pgp-signature Size: 801 bytes Desc: Message signed with OpenPGP using GPGMail URL: From mjtruog@REDACTED Mon Mar 14 01:26:32 2016 From: mjtruog@REDACTED (Michael Truog) Date: Sun, 13 Mar 2016 17:26:32 -0700 Subject: [erlang-bugs] Bug in random seed (definition?) and random:uniform_s/2 In-Reply-To: <3A896DE7-4144-4AF6-A0FB-6DEFE92D1222@licenser.net> References: <3A896DE7-4144-4AF6-A0FB-6DEFE92D1222@licenser.net> Message-ID: <56E60538.7080907@gmail.com> On 03/10/2016 12:59 PM, Heinz Nikolaus Gies wrote: > This might not be critical any more since seed is deprecated but I encountered a problem with random today when passing in hand crafted seeds. > > The definition of a seed is: {integer(), integer(), integer()} > > The seed was generated by the method suggested in random:seed: > {erlang:phash2([node()]), > erlang:monotonic_time(), > erlang:unique_integer()} > This resulted in the seed: > > {128631525,-576302453291645741,-576460752303421854} > > That seed is valid based on the type specification of seed. > > Now entered random:uniform_s/2, by specification it returns a value 1 <= N <= (passed argument) BUT it doesn?t with this seed: > > random:uniform_s(10, {128631525,-576302453291645741,-576460752303421854}). > {-1,{23048,-115,-29427}} > > > Yes I know that constructing and passing a seed like this is evil, please don?t get hung on that, it is not my code it?s code I am debugging - I fully agree that it probably should be changed to rand and be done with it, still it looks is a bug. > > Cheers, > Heinz > > > > _______________________________________________ > erlang-bugs mailing list > erlang-bugs@REDACTED > http://erlang.org/mailman/listinfo/erlang-bugs Since the random module is deprecated in Erlang/OTP 19 and is to be removed in Erlang/OTP 20 (based on https://www.youtube.com/watch?v=YlNrWxH56_E), I took some time to modify it in ways that have been pending for a long time at https://github.com/okeuday/quickrand/blob/master/src/random_wh82.erl to force it to use positive integers for seed values (you are never suppose to allow 0 and in the past abs/1 was used in some places but not others). The rand usage with exsplus appears to be roughly the same speed to provide a better period and no real downside, so it seems hard to argue for using the algorithm in the random module, unless something else required it. I plan on keeping the random_wh82 module (code from the random module, modified and put into the quickrand Erlang application) in case it is needed for compatibility reasons. So, you could avoid this problem by using quickrand or you could switch to using the newer rand module. Best Regards, Michael -------------- next part -------------- An HTML attachment was scrubbed... URL: From community-manager@REDACTED Thu Mar 31 11:05:28 2016 From: community-manager@REDACTED (Bruce Yinhe) Date: Thu, 31 Mar 2016 11:05:28 +0200 Subject: [erlang-bugs] [ANN] Contribution needed - bugs.erlang.org Message-ID: Hi Since the launch of bugs.erlang.org, many issues have been reported by the community. You might have noticed that some issues are labelled as *"Contribution Needed"*: http://bugs.erlang.org/issues/?jql=status%3D%22Contribution%20Needed%22 This means that the OTP team has looked at the issue and would like help from the community. You are encouraged to contribute to Erlang by joining the discussion and/or helping solving these issues. Contribute to Erlang/OTP: 1. Look for issues labelled as "Contribution Needed". 2. Discuss in the issue comment. 3. Agree on a solution/implementation. 4. Submit the contribution as a pull request on Github. 5. An OTP team member reviews the implementation and merges the change. You are also encouraged to contribute by joining the discussion on issues which are "Open". Best regards *Bruce Yinhe* Community Manager Industrial Erlang User Group +46 72 311 43 89 community-manager@REDACTED -- Visit our Erlang community site ErlangCentral.org | @ErlangCentral | Industrial Erlang User Group -------------- next part -------------- An HTML attachment was scrubbed... URL: From carlsson.richard@REDACTED Thu Mar 31 11:35:29 2016 From: carlsson.richard@REDACTED (Richard Carlsson) Date: Thu, 31 Mar 2016 11:35:29 +0200 Subject: [erlang-bugs] Eunit assert causes Dialyzer warning In-Reply-To: <841vcdr1ga.fsf@linux-b2a3.site> References: <841vcdr1ga.fsf@linux-b2a3.site> Message-ID: Better late than never! This issue was pointed out to me again, and this time I thought of a solution that makes Dialyzer shut up about these things. Pull request here: https://github.com/erlang/otp/pull/1002 Note that this will also make Dialyzer stop complaining about things like ?assert(true), which can happen if you have expressions that depend on conditional compilation. /Richard 2010-06-11 18:14 GMT+02:00 Magnus Henoch : > In R13B04 (and probably others), putting an Eunit ?assert in the code > will sometimes cause a Dialyzer warning, as below. This happens because > the definition of the assert macro in eunit.hrl does an extra check for > when the value is neither true nor false, but in this case Dialyzer can > infer that the value must be either true or false. > > It would be nice if either Eunit or Dialyzer could be changed to not > output this warning, so I don't get distracted from warnings that might > indicate actual problems. > > > $ cat > foo.erl > -module(foo). > > -include_lib("eunit/include/eunit.hrl"). > > -export([foo/1]). > > foo(X) -> > ?assert(is_list(X)), > X. > $ dialyzer --src foo.erl > Checking whether the PLT /home/magnus/.dialyzer_plt is up-to-date... yes > Proceeding with analysis... > foo.erl:8: The variable _ can never match since previous clauses > completely covered the type 'false' > done in 0m0.57s > done (warnings were emitted) > > > -- > Magnus Henoch, magnus@REDACTED > Erlang Solutions > http://www.erlang-solutions.com/ > --------------------------------------------------- > > --------------------------------------------------- > > WE'VE CHANGED NAMES! > > Since January 1st 2010 Erlang Training and Consulting Ltd. has become > ERLANG SOLUTIONS LTD. > > www.erlang-solutions.com > > > ________________________________________________________________ > erlang-bugs (at) erlang.org mailing list. > See http://www.erlang.org/faq.html > To unsubscribe; mailto:erlang-bugs-unsubscribe@REDACTED > > -------------- next part -------------- An HTML attachment was scrubbed... URL: From michael.santos@REDACTED Thu Mar 31 16:27:13 2016 From: michael.santos@REDACTED (Michael Santos) Date: Thu, 31 Mar 2016 10:27:13 -0400 Subject: [erlang-bugs] [ANN] Contribution needed - bugs.erlang.org In-Reply-To: References: Message-ID: <20160331142713.GA10502@brk> On Thu, Mar 31, 2016 at 11:05:28AM +0200, Bruce Yinhe wrote: > Hi > > Since the launch of bugs.erlang.org, many issues have been reported by the > community. You might have noticed that some issues are labelled as > *"Contribution > Needed"*: > > http://bugs.erlang.org/issues/?jql=status%3D%22Contribution%20Needed%22 > > > This means that the OTP team has looked at the issue and would like help > from the community. You are encouraged to contribute to Erlang by joining > the discussion and/or helping solving these issues. > > Contribute to Erlang/OTP: > > 1. Look for issues labelled as "Contribution Needed". > 2. Discuss in the issue comment. > 3. Agree on a solution/implementation. > 4. Submit the contribution as a pull request on Github. > 5. An OTP team member reviews the implementation and merges the change. > > > You are also encouraged to contribute by joining the discussion on issues > which are "Open". Why does logging in with your github account require full access (write access) to your github account personal details? Is there a way of monitoring for new issues? For example, could new issues be forwarded to the old erlang-bugs mail list? > > Best regards > > *Bruce Yinhe* > Community Manager > Industrial Erlang User Group > +46 72 311 43 89 > community-manager@REDACTED > > _______________________________________________ > erlang-bugs mailing list > erlang-bugs@REDACTED > http://erlang.org/mailman/listinfo/erlang-bugs