Silence a misleading warning with some comprehensions

When compiling comprehensions with generators which are foldable to
'true', a misleading warning is emitted by sys_core_fold because a
clause resulting from the compilation of the comprehension to Core
Erlang is not marked as generated by the compiler.

An example of such a comprehension is [ true || true ].
Bootstrap
SNMP/VACM: bugfix for vacmViewTreeFamilyMask

Dear all,

it's almost a year since I sent the patch attached to this e-mail, and I
just found out that I have not yet gotten a response to it.

I would consider this patch important because it fixes an issue with the
interpretation of data that might be critical for SNMPv3 operation. I
confirmed at that time that erlangs interpretation of
vacmViewTreeFamilyMask is indeed not interoperable with other SNMP
stacks.

Kind regards,

> > > the implementation of SNMP-VIEW-BASED-ACM.mib assumes that the input for
> > > vacmViewTreeFamilyMask is an OID consisting of 1's and 0's only to form
> > > the mask. However, the MIB states that the input should be a bitstring.
> > >
> > > The OID representation of the mask is useful in the code as it speeds up
> > > time-critical code paths when checking access permissions for EACH SNMP
> > > access. Reading/writing the view mask objects is less time-critical.
> > >
> > > Therefore, to fix the issue, convert between OID representation and
> > > bitstring when the vacmViewTreeFamilyMask objects are accessed. This is
> > > done by the patch attached to this e-mail.
>
>
> I'm very sorry for the troubles that I am causing but it seems that the
> previous version of the patch did more than it should: the OID-bitstring
> conversion was also applied to other tables in the same MIB on
> get/get-next requests.
>
> The version of the patch that is attached to this e-mail restricts the
> OID-bitstring conversion to vacmViewTreeFamilyMask alone.

--
Dr. Stefan Zegenhagen

arcutronix GmbH
Garbsener Landstr. 10
30419 Hannover
Germany

Tel:   +49 511 277-2734
Fax:   +49 511 277-2709
Email: stefan.zegenhagen@arcutronix.com
Web:   www.arcutronix.com

*Synchronize the Ethernet*

General Managers: Dipl. Ing. Juergen Schroeder, Dr. Josef Gfrerer -
Legal Form: GmbH, Registered office: Hannover, HRB 202442, Amtsgericht
Hannover; Ust-Id: DE257551767.

Please consider the environment before printing this message.

>From aa2acfb8a0b5ae05fc5ba982d78ee5607384a2be Mon Sep 17 00:00:00 2001
From: Stefan Zegenhagen <stefan.zegenhagen@arcutronix.com>
Date: Wed, 1 Aug 2012 09:56:15 +0200
Subject: [PATCH] bugfix for vacmViewTreeFamilyMask

The vacmViewTreeFamilyMask is defined to be a bit string in the MIB, not
an OID. However, the MIB implementation assumed the latter, effectively
rendering all attempts to read/set masks via SNMP unsuccessful.

Since the mask is used in hot paths (e.g. access permission checks for
each SNMP operation, the OID representation of the mask has benefits
(e.g. faster processing). Therefore, convert the bitstring to/from its
OID representation when reading/setting any mask object.
Wrap eunit macros into begin ... end blocks

This makes typos such as missing commas between two assertions
(e.g. ?assert(true) ?assert(true)) syntax errors instead of silently
compiling and failing with a badfun error at runtime.

This won't break any existing code as parenthesed expressions and blocks
have the same precedence and none of these macros can be used as patterns.
Fix external term format BIFs on floating point middle-endian machines

This complements 933e701 (OTP-10209).

Simple error example:
1> <<131,70,63,240,0,0,0,0,0,0>> = term_to_binary(1.0, [{minor_version,1}]).
** exception error: no match of right hand side value <<131,70,0,0,0,0,63,240,0,0>>
2> 1.0 = binary_to_term(<<131,70,63,240,0,0,0,0,0,0>>).
** exception error: no match of right hand side value 5.299808824e-315

But roundtrip always works:
3> 1.0 = binary_to_term(term_to_binary(1.0, [{minor_version,1}])).
1.0
Fix erlang:phash2() on floating point middle-endian machines

This complements 933e701 (OTP-10209). Without this patch the test case
"hash_SUITE:test_phash2/1" fails.

Simple error example:
1> 77147068 = erlang:phash2(1.0).
** exception error: no match of right hand side value 50524433
Fix binary matching on floating point middle-endian machines

This complements 933e701 (OTP-10209). Without this patch the test case
"bs_match_misc_SUITE:t_float/1" fails.

Simple error example:
1> <<_,_,_,_,_,_,_,_>> = <<1.25/float>>.
<<63,244,0,0,0,0,0,0>>
2> <<1.25/float>> = <<63,244,0,0,0,0,0,0>>.
** exception error: no match of right hand side value <<63,244,0,0,0,0,0,0>>

The additional test case is added because in a former version of this
patch the ERTS_FP_ERROR_THOROUGH check for NaN/infinity was mistakenly
applied on the still word-switched double.
Fix binary construction on floating point middle-endian machines

This complements 933e701 (OTP-10209). Without this patch the test cases
"in_guard/1" and "coerce_to_float/1" in bs_construct_SUITE fail.

The added lines in bs_construct_SUITE cover all branches that were not
covered before (small and big numbers if BIT_OFFSET(erts_bin_offset) != 0).
Merge branch 'sze/fix-vacm' into bmk/snmp/agent/fix_vacm_mask/OTP-11177
Added a few input checks which prevent odbcserver crash if it's executed
and supplied incorrect data to stdin. A crash example:

echo -en "\x0\x0\x0\x1\x0" | ./odbcserver
Allow calls to ct:pal and ct:print even if CT is not running

Also make sure calls to ct:log and ct:pal don't cause crash
if test_server is not running (could happen during startup or
shutdown of CT).

OTP-11176
Add test

OTP-11176
Make the CT logger print to stdout if test_server is not running

OTP-11176
[snmp/agent] Local DB counter increment wrap error

The counter increment function in the local-db was incorrect.
It did not handle counter wrap correctly.

OTP-11192
Restrict inlining of local fun references

Local fun references look like plain old variables in the Core Erlang
AST but should not be treated as such. Inlining of such expressions is
now restricted to application contexts as a local fun reference should
never occur in a guard.

This is not perfect as it forbids inlining in some safe situations, but
that is still better than a compiler crash.
Added primary bootstrap
[snmp/agent] Cleanup, renaming, appup, proper version and release notes

Add utility functions for checking view masks.
Code cleanup, function renaming and comment fix (%% instead of %).
Also updated the mask check in the vacm config file check function.
Finally, release notes and some cosmetic changes to the agent
config-file(s) user guide chapter.
Merge branch 'bmk/snmp/agent/fix_vacm_mask/OTP-11177' into bmk/snmp/snmp4241_integration/r16
Merge branch 'bmk/snmp/agent/ldb_counter_wrap/OTP-11192' into bmk/snmp/snmp4241_integration/r16

Conflicts:
	lib/snmp/doc/src/notes.xml
	lib/snmp/src/app/snmp.appup.src
run_erl: Redirect standard streams to /dev/null

Like in epmd and erlexec. Otherwise "run_erl" fails on some platforms
when called with the "-daemon" option, printing this error:

  "Cannot dup"