aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--bootstrap/bin/start.bootbin5306 -> 5312 bytes
-rw-r--r--bootstrap/bin/start_clean.bootbin5306 -> 5312 bytes
-rw-r--r--bootstrap/lib/compiler/ebin/beam_asm.beambin11640 -> 11572 bytes
-rw-r--r--bootstrap/lib/compiler/ebin/beam_block.beambin14388 -> 14388 bytes
-rw-r--r--bootstrap/lib/compiler/ebin/beam_bool.beambin16160 -> 16156 bytes
-rw-r--r--bootstrap/lib/compiler/ebin/beam_bsm.beambin13728 -> 13724 bytes
-rw-r--r--bootstrap/lib/compiler/ebin/beam_dead.beambin10180 -> 10180 bytes
-rw-r--r--bootstrap/lib/compiler/ebin/beam_disasm.beambin24968 -> 24968 bytes
-rw-r--r--bootstrap/lib/compiler/ebin/beam_except.beambin0 -> 3484 bytes
-rw-r--r--bootstrap/lib/compiler/ebin/beam_jump.beambin9516 -> 9516 bytes
-rw-r--r--bootstrap/lib/compiler/ebin/beam_receive.beambin5832 -> 5832 bytes
-rw-r--r--bootstrap/lib/compiler/ebin/beam_trim.beambin8568 -> 8568 bytes
-rw-r--r--bootstrap/lib/compiler/ebin/beam_type.beambin13852 -> 13852 bytes
-rw-r--r--bootstrap/lib/compiler/ebin/beam_utils.beambin14532 -> 14532 bytes
-rw-r--r--bootstrap/lib/compiler/ebin/beam_validator.beambin34480 -> 34476 bytes
-rw-r--r--bootstrap/lib/compiler/ebin/cerl.beambin30264 -> 30264 bytes
-rw-r--r--bootstrap/lib/compiler/ebin/cerl_clauses.beambin2876 -> 2876 bytes
-rw-r--r--bootstrap/lib/compiler/ebin/cerl_inline.beambin37300 -> 37300 bytes
-rw-r--r--bootstrap/lib/compiler/ebin/cerl_trees.beambin18960 -> 18952 bytes
-rw-r--r--bootstrap/lib/compiler/ebin/compile.beambin37084 -> 37112 bytes
-rw-r--r--bootstrap/lib/compiler/ebin/core_lib.beambin5468 -> 5468 bytes
-rw-r--r--bootstrap/lib/compiler/ebin/core_lint.beambin11632 -> 11632 bytes
-rw-r--r--bootstrap/lib/compiler/ebin/core_parse.beambin37644 -> 37696 bytes
-rw-r--r--bootstrap/lib/compiler/ebin/core_pp.beambin12124 -> 12124 bytes
-rw-r--r--bootstrap/lib/compiler/ebin/core_scan.beambin6628 -> 6628 bytes
-rw-r--r--bootstrap/lib/compiler/ebin/sys_core_fold.beambin47520 -> 47520 bytes
-rw-r--r--bootstrap/lib/compiler/ebin/sys_core_inline.beambin4212 -> 4208 bytes
-rw-r--r--bootstrap/lib/compiler/ebin/sys_expand_pmod.beambin8424 -> 8424 bytes
-rw-r--r--bootstrap/lib/compiler/ebin/sys_pre_attributes.beambin3360 -> 3356 bytes
-rw-r--r--bootstrap/lib/compiler/ebin/sys_pre_expand.beambin16188 -> 16188 bytes
-rw-r--r--bootstrap/lib/compiler/ebin/v3_codegen.beambin53752 -> 52144 bytes
-rw-r--r--bootstrap/lib/compiler/ebin/v3_core.beambin50988 -> 50992 bytes
-rw-r--r--bootstrap/lib/compiler/ebin/v3_kernel.beambin44604 -> 44724 bytes
-rw-r--r--bootstrap/lib/compiler/ebin/v3_life.beambin23528 -> 22260 bytes
-rw-r--r--bootstrap/lib/kernel/ebin/application_controller.beambin31000 -> 30996 bytes
-rw-r--r--bootstrap/lib/kernel/ebin/code_server.beambin26092 -> 26088 bytes
-rw-r--r--bootstrap/lib/kernel/ebin/disk_log.beambin37400 -> 37400 bytes
-rw-r--r--bootstrap/lib/kernel/ebin/disk_log_1.beambin24896 -> 24896 bytes
-rw-r--r--bootstrap/lib/kernel/ebin/disk_log_server.beambin6408 -> 6408 bytes
-rw-r--r--bootstrap/lib/kernel/ebin/dist_ac.beambin26708 -> 26708 bytes
-rw-r--r--bootstrap/lib/kernel/ebin/dist_util.beambin10508 -> 10508 bytes
-rw-r--r--bootstrap/lib/kernel/ebin/file.beambin14152 -> 14152 bytes
-rw-r--r--bootstrap/lib/kernel/ebin/file_io_server.beambin14196 -> 14132 bytes
-rw-r--r--bootstrap/lib/kernel/ebin/global.beambin32236 -> 32236 bytes
-rw-r--r--bootstrap/lib/kernel/ebin/global_group.beambin17728 -> 17728 bytes
-rw-r--r--bootstrap/lib/kernel/ebin/group.beambin11776 -> 11784 bytes
-rw-r--r--bootstrap/lib/kernel/ebin/hipe_unified_loader.beambin12496 -> 12496 bytes
-rw-r--r--bootstrap/lib/kernel/ebin/inet_dns.beambin19748 -> 19728 bytes
-rw-r--r--bootstrap/lib/kernel/ebin/inet_gethost_native.beambin10500 -> 10484 bytes
-rw-r--r--bootstrap/lib/kernel/ebin/net_kernel.beambin22720 -> 22720 bytes
-rw-r--r--bootstrap/lib/kernel/ebin/user.beambin12360 -> 12332 bytes
-rw-r--r--bootstrap/lib/stdlib/ebin/base64.beambin4540 -> 4532 bytes
-rw-r--r--bootstrap/lib/stdlib/ebin/beam_lib.beambin18220 -> 18060 bytes
-rw-r--r--bootstrap/lib/stdlib/ebin/dets.beambin53468 -> 53456 bytes
-rw-r--r--bootstrap/lib/stdlib/ebin/dets_server.beambin7020 -> 7020 bytes
-rw-r--r--bootstrap/lib/stdlib/ebin/dets_utils.beambin28864 -> 28864 bytes
-rw-r--r--bootstrap/lib/stdlib/ebin/dets_v8.beambin27520 -> 27516 bytes
-rw-r--r--bootstrap/lib/stdlib/ebin/dets_v9.beambin50104 -> 50072 bytes
-rw-r--r--bootstrap/lib/stdlib/ebin/epp.beambin24188 -> 24188 bytes
-rw-r--r--bootstrap/lib/stdlib/ebin/erl_compile.beambin5076 -> 5076 bytes
-rw-r--r--bootstrap/lib/stdlib/ebin/erl_eval.beambin23792 -> 23784 bytes
-rw-r--r--bootstrap/lib/stdlib/ebin/erl_expand_records.beambin21812 -> 21812 bytes
-rw-r--r--bootstrap/lib/stdlib/ebin/erl_lint.beambin84856 -> 84860 bytes
-rw-r--r--bootstrap/lib/stdlib/ebin/erl_parse.beambin71496 -> 71552 bytes
-rw-r--r--bootstrap/lib/stdlib/ebin/erl_scan.beambin31776 -> 31784 bytes
-rw-r--r--bootstrap/lib/stdlib/ebin/erl_tar.beambin15352 -> 15352 bytes
-rw-r--r--bootstrap/lib/stdlib/ebin/escript.beambin17044 -> 17032 bytes
-rw-r--r--bootstrap/lib/stdlib/ebin/ets.beambin20048 -> 20008 bytes
-rw-r--r--bootstrap/lib/stdlib/ebin/eval_bits.beambin6748 -> 6748 bytes
-rw-r--r--bootstrap/lib/stdlib/ebin/file_sorter.beambin30608 -> 30592 bytes
-rw-r--r--bootstrap/lib/stdlib/ebin/filename.beambin12456 -> 12412 bytes
-rw-r--r--bootstrap/lib/stdlib/ebin/gb_trees.beambin4992 -> 4992 bytes
-rw-r--r--bootstrap/lib/stdlib/ebin/gen.beambin3856 -> 3856 bytes
-rw-r--r--bootstrap/lib/stdlib/ebin/gen_fsm.beambin14940 -> 14940 bytes
-rw-r--r--bootstrap/lib/stdlib/ebin/gen_server.beambin16904 -> 16904 bytes
-rw-r--r--bootstrap/lib/stdlib/ebin/io_lib.beambin8900 -> 8896 bytes
-rw-r--r--bootstrap/lib/stdlib/ebin/io_lib_pretty.beambin12372 -> 12364 bytes
-rw-r--r--bootstrap/lib/stdlib/ebin/lib.beambin9072 -> 9060 bytes
-rw-r--r--bootstrap/lib/stdlib/ebin/ms_transform.beambin20224 -> 20224 bytes
-rw-r--r--bootstrap/lib/stdlib/ebin/pool.beambin3848 -> 3848 bytes
-rw-r--r--bootstrap/lib/stdlib/ebin/qlc.beambin69376 -> 69376 bytes
-rw-r--r--bootstrap/lib/stdlib/ebin/qlc_pt.beambin71592 -> 71584 bytes
-rw-r--r--bootstrap/lib/stdlib/ebin/queue.beambin5900 -> 5900 bytes
-rw-r--r--bootstrap/lib/stdlib/ebin/re.beambin12376 -> 12348 bytes
-rw-r--r--bootstrap/lib/stdlib/ebin/sofs.beambin41096 -> 41100 bytes
-rw-r--r--bootstrap/lib/stdlib/ebin/string.beambin4744 -> 4744 bytes
-rw-r--r--bootstrap/lib/stdlib/ebin/supervisor.beambin21220 -> 21368 bytes
-rw-r--r--bootstrap/lib/stdlib/ebin/unicode.beambin11552 -> 11412 bytes
-rw-r--r--bootstrap/lib/stdlib/ebin/zip.beambin26824 -> 26800 bytes
-rw-r--r--erts/doc/src/erlang.xml2
-rw-r--r--erts/doc/src/notes.xml29
-rw-r--r--erts/emulator/beam/erl_driver.h12
-rw-r--r--erts/emulator/beam/erl_port_task.c3
-rw-r--r--erts/emulator/beam/erl_trace.c25
-rw-r--r--erts/emulator/hipe/hipe_bif0.c31
-rw-r--r--erts/emulator/sys/common/erl_poll.c4
-rw-r--r--erts/emulator/test/Makefile1
-rw-r--r--erts/emulator/test/smoke_test_SUITE.erl139
-rw-r--r--erts/emulator/test/system_profile_SUITE.erl161
-rw-r--r--erts/etc/common/heart.c6
-rw-r--r--erts/etc/common/inet_gethost.c19
-rw-r--r--erts/etc/unix/to_erl.c7
-rw-r--r--erts/lib_src/pthread/ethread.c49
-rw-r--r--erts/test/erl_print_SUITE.erl2
-rw-r--r--erts/test/ethread_SUITE.erl65
-rw-r--r--erts/test/z_SUITE.erl4
-rw-r--r--lib/asn1/c_src/asn1_erl_nif.c5
-rw-r--r--lib/compiler/src/Makefile1
-rw-r--r--lib/compiler/src/beam_except.erl149
-rw-r--r--lib/compiler/src/compile.erl2
-rw-r--r--lib/compiler/src/compiler.app.src1
-rw-r--r--lib/compiler/src/v3_codegen.erl37
-rw-r--r--lib/compiler/src/v3_kernel.erl22
-rw-r--r--lib/compiler/src/v3_life.erl34
-rw-r--r--lib/compiler/test/Makefile2
-rw-r--r--lib/compiler/test/beam_expect_SUITE.erl67
-rw-r--r--lib/compiler/test/compilation_SUITE.erl16
-rw-r--r--lib/compiler/test/misc_SUITE.erl20
-rw-r--r--lib/erl_docgen/priv/xsl/db_html.xsl62
-rw-r--r--lib/erl_interface/src/misc/ei_format.c3
-rw-r--r--lib/hipe/flow/cfg.hrl5
-rw-r--r--lib/jinterface/java_src/com/ericsson/otp/erlang/OtpMbox.java2
-rw-r--r--lib/jinterface/java_src/com/ericsson/otp/erlang/OtpNode.java4
-rwxr-xr-xlib/kernel/test/inet_res_SUITE_data/run-named15
-rw-r--r--lib/orber/src/orber_tb.erl2
-rw-r--r--lib/orber/test/orber_acl_SUITE.erl2
-rw-r--r--lib/public_key/doc/src/public_key.xml2
-rw-r--r--lib/runtime_tools/c_src/trace_ip_drv.c22
-rw-r--r--lib/sasl/doc/src/appup.xml2
-rw-r--r--lib/stdlib/doc/src/io.xml2
-rw-r--r--lib/syntax_tools/src/erl_syntax.erl7
-rw-r--r--lib/tools/c_src/erl_memory.c7
-rw-r--r--lib/xmerl/src/xmerl_uri.erl2
133 files changed, 759 insertions, 295 deletions
diff --git a/bootstrap/bin/start.boot b/bootstrap/bin/start.boot
index d0ac42d595..bdaf605488 100644
--- a/bootstrap/bin/start.boot
+++ b/bootstrap/bin/start.boot
Binary files differ
diff --git a/bootstrap/bin/start_clean.boot b/bootstrap/bin/start_clean.boot
index d0ac42d595..bdaf605488 100644
--- a/bootstrap/bin/start_clean.boot
+++ b/bootstrap/bin/start_clean.boot
Binary files differ
diff --git a/bootstrap/lib/compiler/ebin/beam_asm.beam b/bootstrap/lib/compiler/ebin/beam_asm.beam
index 103ed82529..4da4c26d92 100644
--- a/bootstrap/lib/compiler/ebin/beam_asm.beam
+++ b/bootstrap/lib/compiler/ebin/beam_asm.beam
Binary files differ
diff --git a/bootstrap/lib/compiler/ebin/beam_block.beam b/bootstrap/lib/compiler/ebin/beam_block.beam
index a5699221fe..a7bb91adbb 100644
--- a/bootstrap/lib/compiler/ebin/beam_block.beam
+++ b/bootstrap/lib/compiler/ebin/beam_block.beam
Binary files differ
diff --git a/bootstrap/lib/compiler/ebin/beam_bool.beam b/bootstrap/lib/compiler/ebin/beam_bool.beam
index d8f91ec36d..252257b71d 100644
--- a/bootstrap/lib/compiler/ebin/beam_bool.beam
+++ b/bootstrap/lib/compiler/ebin/beam_bool.beam
Binary files differ
diff --git a/bootstrap/lib/compiler/ebin/beam_bsm.beam b/bootstrap/lib/compiler/ebin/beam_bsm.beam
index 02f82a9341..0c998c8e8c 100644
--- a/bootstrap/lib/compiler/ebin/beam_bsm.beam
+++ b/bootstrap/lib/compiler/ebin/beam_bsm.beam
Binary files differ
diff --git a/bootstrap/lib/compiler/ebin/beam_dead.beam b/bootstrap/lib/compiler/ebin/beam_dead.beam
index 2f0f423f16..17cced3c1a 100644
--- a/bootstrap/lib/compiler/ebin/beam_dead.beam
+++ b/bootstrap/lib/compiler/ebin/beam_dead.beam
Binary files differ
diff --git a/bootstrap/lib/compiler/ebin/beam_disasm.beam b/bootstrap/lib/compiler/ebin/beam_disasm.beam
index 377c738709..f90b5c9ae7 100644
--- a/bootstrap/lib/compiler/ebin/beam_disasm.beam
+++ b/bootstrap/lib/compiler/ebin/beam_disasm.beam
Binary files differ
diff --git a/bootstrap/lib/compiler/ebin/beam_except.beam b/bootstrap/lib/compiler/ebin/beam_except.beam
new file mode 100644
index 0000000000..5bd28a35d9
--- /dev/null
+++ b/bootstrap/lib/compiler/ebin/beam_except.beam
Binary files differ
diff --git a/bootstrap/lib/compiler/ebin/beam_jump.beam b/bootstrap/lib/compiler/ebin/beam_jump.beam
index f45b8d3124..4811360890 100644
--- a/bootstrap/lib/compiler/ebin/beam_jump.beam
+++ b/bootstrap/lib/compiler/ebin/beam_jump.beam
Binary files differ
diff --git a/bootstrap/lib/compiler/ebin/beam_receive.beam b/bootstrap/lib/compiler/ebin/beam_receive.beam
index ae873a1082..43f41f6535 100644
--- a/bootstrap/lib/compiler/ebin/beam_receive.beam
+++ b/bootstrap/lib/compiler/ebin/beam_receive.beam
Binary files differ
diff --git a/bootstrap/lib/compiler/ebin/beam_trim.beam b/bootstrap/lib/compiler/ebin/beam_trim.beam
index b1275f787a..86f5d027f4 100644
--- a/bootstrap/lib/compiler/ebin/beam_trim.beam
+++ b/bootstrap/lib/compiler/ebin/beam_trim.beam
Binary files differ
diff --git a/bootstrap/lib/compiler/ebin/beam_type.beam b/bootstrap/lib/compiler/ebin/beam_type.beam
index 6689135457..116da39f89 100644
--- a/bootstrap/lib/compiler/ebin/beam_type.beam
+++ b/bootstrap/lib/compiler/ebin/beam_type.beam
Binary files differ
diff --git a/bootstrap/lib/compiler/ebin/beam_utils.beam b/bootstrap/lib/compiler/ebin/beam_utils.beam
index b80810bfb2..12372309d9 100644
--- a/bootstrap/lib/compiler/ebin/beam_utils.beam
+++ b/bootstrap/lib/compiler/ebin/beam_utils.beam
Binary files differ
diff --git a/bootstrap/lib/compiler/ebin/beam_validator.beam b/bootstrap/lib/compiler/ebin/beam_validator.beam
index fd3aa7eee5..52643de79a 100644
--- a/bootstrap/lib/compiler/ebin/beam_validator.beam
+++ b/bootstrap/lib/compiler/ebin/beam_validator.beam
Binary files differ
diff --git a/bootstrap/lib/compiler/ebin/cerl.beam b/bootstrap/lib/compiler/ebin/cerl.beam
index 399aeb6442..dcebe13bc8 100644
--- a/bootstrap/lib/compiler/ebin/cerl.beam
+++ b/bootstrap/lib/compiler/ebin/cerl.beam
Binary files differ
diff --git a/bootstrap/lib/compiler/ebin/cerl_clauses.beam b/bootstrap/lib/compiler/ebin/cerl_clauses.beam
index e4db75d0e0..97e96c47bd 100644
--- a/bootstrap/lib/compiler/ebin/cerl_clauses.beam
+++ b/bootstrap/lib/compiler/ebin/cerl_clauses.beam
Binary files differ
diff --git a/bootstrap/lib/compiler/ebin/cerl_inline.beam b/bootstrap/lib/compiler/ebin/cerl_inline.beam
index 582604e3cc..b640e22ce6 100644
--- a/bootstrap/lib/compiler/ebin/cerl_inline.beam
+++ b/bootstrap/lib/compiler/ebin/cerl_inline.beam
Binary files differ
diff --git a/bootstrap/lib/compiler/ebin/cerl_trees.beam b/bootstrap/lib/compiler/ebin/cerl_trees.beam
index 673954eaac..df3f351c8d 100644
--- a/bootstrap/lib/compiler/ebin/cerl_trees.beam
+++ b/bootstrap/lib/compiler/ebin/cerl_trees.beam
Binary files differ
diff --git a/bootstrap/lib/compiler/ebin/compile.beam b/bootstrap/lib/compiler/ebin/compile.beam
index b228900c41..e2bd3c4ce0 100644
--- a/bootstrap/lib/compiler/ebin/compile.beam
+++ b/bootstrap/lib/compiler/ebin/compile.beam
Binary files differ
diff --git a/bootstrap/lib/compiler/ebin/core_lib.beam b/bootstrap/lib/compiler/ebin/core_lib.beam
index ddb5278d00..1a60454b42 100644
--- a/bootstrap/lib/compiler/ebin/core_lib.beam
+++ b/bootstrap/lib/compiler/ebin/core_lib.beam
Binary files differ
diff --git a/bootstrap/lib/compiler/ebin/core_lint.beam b/bootstrap/lib/compiler/ebin/core_lint.beam
index 225fa95aea..08fef1eb71 100644
--- a/bootstrap/lib/compiler/ebin/core_lint.beam
+++ b/bootstrap/lib/compiler/ebin/core_lint.beam
Binary files differ
diff --git a/bootstrap/lib/compiler/ebin/core_parse.beam b/bootstrap/lib/compiler/ebin/core_parse.beam
index 11926c4a16..4f555d8036 100644
--- a/bootstrap/lib/compiler/ebin/core_parse.beam
+++ b/bootstrap/lib/compiler/ebin/core_parse.beam
Binary files differ
diff --git a/bootstrap/lib/compiler/ebin/core_pp.beam b/bootstrap/lib/compiler/ebin/core_pp.beam
index f1841d810b..ef3504058a 100644
--- a/bootstrap/lib/compiler/ebin/core_pp.beam
+++ b/bootstrap/lib/compiler/ebin/core_pp.beam
Binary files differ
diff --git a/bootstrap/lib/compiler/ebin/core_scan.beam b/bootstrap/lib/compiler/ebin/core_scan.beam
index e0e4859095..245e59483d 100644
--- a/bootstrap/lib/compiler/ebin/core_scan.beam
+++ b/bootstrap/lib/compiler/ebin/core_scan.beam
Binary files differ
diff --git a/bootstrap/lib/compiler/ebin/sys_core_fold.beam b/bootstrap/lib/compiler/ebin/sys_core_fold.beam
index b07afc0938..046a358910 100644
--- a/bootstrap/lib/compiler/ebin/sys_core_fold.beam
+++ b/bootstrap/lib/compiler/ebin/sys_core_fold.beam
Binary files differ
diff --git a/bootstrap/lib/compiler/ebin/sys_core_inline.beam b/bootstrap/lib/compiler/ebin/sys_core_inline.beam
index 5b9e9d7c3e..907c9d53a5 100644
--- a/bootstrap/lib/compiler/ebin/sys_core_inline.beam
+++ b/bootstrap/lib/compiler/ebin/sys_core_inline.beam
Binary files differ
diff --git a/bootstrap/lib/compiler/ebin/sys_expand_pmod.beam b/bootstrap/lib/compiler/ebin/sys_expand_pmod.beam
index fbe8079575..1649b9f2ff 100644
--- a/bootstrap/lib/compiler/ebin/sys_expand_pmod.beam
+++ b/bootstrap/lib/compiler/ebin/sys_expand_pmod.beam
Binary files differ
diff --git a/bootstrap/lib/compiler/ebin/sys_pre_attributes.beam b/bootstrap/lib/compiler/ebin/sys_pre_attributes.beam
index 4b3e984ed4..a7ca15a033 100644
--- a/bootstrap/lib/compiler/ebin/sys_pre_attributes.beam
+++ b/bootstrap/lib/compiler/ebin/sys_pre_attributes.beam
Binary files differ
diff --git a/bootstrap/lib/compiler/ebin/sys_pre_expand.beam b/bootstrap/lib/compiler/ebin/sys_pre_expand.beam
index 12664c7270..d716583b97 100644
--- a/bootstrap/lib/compiler/ebin/sys_pre_expand.beam
+++ b/bootstrap/lib/compiler/ebin/sys_pre_expand.beam
Binary files differ
diff --git a/bootstrap/lib/compiler/ebin/v3_codegen.beam b/bootstrap/lib/compiler/ebin/v3_codegen.beam
index 3a8d68a611..a053c54295 100644
--- a/bootstrap/lib/compiler/ebin/v3_codegen.beam
+++ b/bootstrap/lib/compiler/ebin/v3_codegen.beam
Binary files differ
diff --git a/bootstrap/lib/compiler/ebin/v3_core.beam b/bootstrap/lib/compiler/ebin/v3_core.beam
index ff7144c2bc..ba92ff6fb0 100644
--- a/bootstrap/lib/compiler/ebin/v3_core.beam
+++ b/bootstrap/lib/compiler/ebin/v3_core.beam
Binary files differ
diff --git a/bootstrap/lib/compiler/ebin/v3_kernel.beam b/bootstrap/lib/compiler/ebin/v3_kernel.beam
index 48b89b374b..0c2e54032a 100644
--- a/bootstrap/lib/compiler/ebin/v3_kernel.beam
+++ b/bootstrap/lib/compiler/ebin/v3_kernel.beam
Binary files differ
diff --git a/bootstrap/lib/compiler/ebin/v3_life.beam b/bootstrap/lib/compiler/ebin/v3_life.beam
index b7996884f4..ec8fcda8ee 100644
--- a/bootstrap/lib/compiler/ebin/v3_life.beam
+++ b/bootstrap/lib/compiler/ebin/v3_life.beam
Binary files differ
diff --git a/bootstrap/lib/kernel/ebin/application_controller.beam b/bootstrap/lib/kernel/ebin/application_controller.beam
index 38614f1285..9c94dbd5c7 100644
--- a/bootstrap/lib/kernel/ebin/application_controller.beam
+++ b/bootstrap/lib/kernel/ebin/application_controller.beam
Binary files differ
diff --git a/bootstrap/lib/kernel/ebin/code_server.beam b/bootstrap/lib/kernel/ebin/code_server.beam
index 567dcf93df..09d86b80ad 100644
--- a/bootstrap/lib/kernel/ebin/code_server.beam
+++ b/bootstrap/lib/kernel/ebin/code_server.beam
Binary files differ
diff --git a/bootstrap/lib/kernel/ebin/disk_log.beam b/bootstrap/lib/kernel/ebin/disk_log.beam
index 3c5505ef45..8dbe895823 100644
--- a/bootstrap/lib/kernel/ebin/disk_log.beam
+++ b/bootstrap/lib/kernel/ebin/disk_log.beam
Binary files differ
diff --git a/bootstrap/lib/kernel/ebin/disk_log_1.beam b/bootstrap/lib/kernel/ebin/disk_log_1.beam
index a61ef2ad3f..5e286cdd48 100644
--- a/bootstrap/lib/kernel/ebin/disk_log_1.beam
+++ b/bootstrap/lib/kernel/ebin/disk_log_1.beam
Binary files differ
diff --git a/bootstrap/lib/kernel/ebin/disk_log_server.beam b/bootstrap/lib/kernel/ebin/disk_log_server.beam
index 39197f3995..d985f64937 100644
--- a/bootstrap/lib/kernel/ebin/disk_log_server.beam
+++ b/bootstrap/lib/kernel/ebin/disk_log_server.beam
Binary files differ
diff --git a/bootstrap/lib/kernel/ebin/dist_ac.beam b/bootstrap/lib/kernel/ebin/dist_ac.beam
index c86598a689..3eae6b82a7 100644
--- a/bootstrap/lib/kernel/ebin/dist_ac.beam
+++ b/bootstrap/lib/kernel/ebin/dist_ac.beam
Binary files differ
diff --git a/bootstrap/lib/kernel/ebin/dist_util.beam b/bootstrap/lib/kernel/ebin/dist_util.beam
index 094d909535..7fc3325da4 100644
--- a/bootstrap/lib/kernel/ebin/dist_util.beam
+++ b/bootstrap/lib/kernel/ebin/dist_util.beam
Binary files differ
diff --git a/bootstrap/lib/kernel/ebin/file.beam b/bootstrap/lib/kernel/ebin/file.beam
index 91d6524eb0..c3289ba11f 100644
--- a/bootstrap/lib/kernel/ebin/file.beam
+++ b/bootstrap/lib/kernel/ebin/file.beam
Binary files differ
diff --git a/bootstrap/lib/kernel/ebin/file_io_server.beam b/bootstrap/lib/kernel/ebin/file_io_server.beam
index 3783cd7b11..8193949718 100644
--- a/bootstrap/lib/kernel/ebin/file_io_server.beam
+++ b/bootstrap/lib/kernel/ebin/file_io_server.beam
Binary files differ
diff --git a/bootstrap/lib/kernel/ebin/global.beam b/bootstrap/lib/kernel/ebin/global.beam
index b4a6a5dc3e..96d7365006 100644
--- a/bootstrap/lib/kernel/ebin/global.beam
+++ b/bootstrap/lib/kernel/ebin/global.beam
Binary files differ
diff --git a/bootstrap/lib/kernel/ebin/global_group.beam b/bootstrap/lib/kernel/ebin/global_group.beam
index f1e6fa219e..dd7d0e429e 100644
--- a/bootstrap/lib/kernel/ebin/global_group.beam
+++ b/bootstrap/lib/kernel/ebin/global_group.beam
Binary files differ
diff --git a/bootstrap/lib/kernel/ebin/group.beam b/bootstrap/lib/kernel/ebin/group.beam
index 67f78948d4..8e813f6964 100644
--- a/bootstrap/lib/kernel/ebin/group.beam
+++ b/bootstrap/lib/kernel/ebin/group.beam
Binary files differ
diff --git a/bootstrap/lib/kernel/ebin/hipe_unified_loader.beam b/bootstrap/lib/kernel/ebin/hipe_unified_loader.beam
index 515fe47da6..9412148a16 100644
--- a/bootstrap/lib/kernel/ebin/hipe_unified_loader.beam
+++ b/bootstrap/lib/kernel/ebin/hipe_unified_loader.beam
Binary files differ
diff --git a/bootstrap/lib/kernel/ebin/inet_dns.beam b/bootstrap/lib/kernel/ebin/inet_dns.beam
index be1c7c4766..7f262cf20d 100644
--- a/bootstrap/lib/kernel/ebin/inet_dns.beam
+++ b/bootstrap/lib/kernel/ebin/inet_dns.beam
Binary files differ
diff --git a/bootstrap/lib/kernel/ebin/inet_gethost_native.beam b/bootstrap/lib/kernel/ebin/inet_gethost_native.beam
index 4bf616ad46..4e6ce0fc5e 100644
--- a/bootstrap/lib/kernel/ebin/inet_gethost_native.beam
+++ b/bootstrap/lib/kernel/ebin/inet_gethost_native.beam
Binary files differ
diff --git a/bootstrap/lib/kernel/ebin/net_kernel.beam b/bootstrap/lib/kernel/ebin/net_kernel.beam
index 451d054667..a81f3e47d5 100644
--- a/bootstrap/lib/kernel/ebin/net_kernel.beam
+++ b/bootstrap/lib/kernel/ebin/net_kernel.beam
Binary files differ
diff --git a/bootstrap/lib/kernel/ebin/user.beam b/bootstrap/lib/kernel/ebin/user.beam
index 6433bcf859..f3aae4a980 100644
--- a/bootstrap/lib/kernel/ebin/user.beam
+++ b/bootstrap/lib/kernel/ebin/user.beam
Binary files differ
diff --git a/bootstrap/lib/stdlib/ebin/base64.beam b/bootstrap/lib/stdlib/ebin/base64.beam
index 04a1388637..07877625dd 100644
--- a/bootstrap/lib/stdlib/ebin/base64.beam
+++ b/bootstrap/lib/stdlib/ebin/base64.beam
Binary files differ
diff --git a/bootstrap/lib/stdlib/ebin/beam_lib.beam b/bootstrap/lib/stdlib/ebin/beam_lib.beam
index 01fc86def0..afe3bcc466 100644
--- a/bootstrap/lib/stdlib/ebin/beam_lib.beam
+++ b/bootstrap/lib/stdlib/ebin/beam_lib.beam
Binary files differ
diff --git a/bootstrap/lib/stdlib/ebin/dets.beam b/bootstrap/lib/stdlib/ebin/dets.beam
index 73be548a89..4a33312cc0 100644
--- a/bootstrap/lib/stdlib/ebin/dets.beam
+++ b/bootstrap/lib/stdlib/ebin/dets.beam
Binary files differ
diff --git a/bootstrap/lib/stdlib/ebin/dets_server.beam b/bootstrap/lib/stdlib/ebin/dets_server.beam
index d71185c9dd..26de164bd9 100644
--- a/bootstrap/lib/stdlib/ebin/dets_server.beam
+++ b/bootstrap/lib/stdlib/ebin/dets_server.beam
Binary files differ
diff --git a/bootstrap/lib/stdlib/ebin/dets_utils.beam b/bootstrap/lib/stdlib/ebin/dets_utils.beam
index a372faf6ac..e4cd1e8b2e 100644
--- a/bootstrap/lib/stdlib/ebin/dets_utils.beam
+++ b/bootstrap/lib/stdlib/ebin/dets_utils.beam
Binary files differ
diff --git a/bootstrap/lib/stdlib/ebin/dets_v8.beam b/bootstrap/lib/stdlib/ebin/dets_v8.beam
index a20f0469ce..c8e1549256 100644
--- a/bootstrap/lib/stdlib/ebin/dets_v8.beam
+++ b/bootstrap/lib/stdlib/ebin/dets_v8.beam
Binary files differ
diff --git a/bootstrap/lib/stdlib/ebin/dets_v9.beam b/bootstrap/lib/stdlib/ebin/dets_v9.beam
index a52d126adf..8cfcb9f8f1 100644
--- a/bootstrap/lib/stdlib/ebin/dets_v9.beam
+++ b/bootstrap/lib/stdlib/ebin/dets_v9.beam
Binary files differ
diff --git a/bootstrap/lib/stdlib/ebin/epp.beam b/bootstrap/lib/stdlib/ebin/epp.beam
index 0cc31bcac9..55f5adc24d 100644
--- a/bootstrap/lib/stdlib/ebin/epp.beam
+++ b/bootstrap/lib/stdlib/ebin/epp.beam
Binary files differ
diff --git a/bootstrap/lib/stdlib/ebin/erl_compile.beam b/bootstrap/lib/stdlib/ebin/erl_compile.beam
index 1ce1d02ef0..6fd4e3373e 100644
--- a/bootstrap/lib/stdlib/ebin/erl_compile.beam
+++ b/bootstrap/lib/stdlib/ebin/erl_compile.beam
Binary files differ
diff --git a/bootstrap/lib/stdlib/ebin/erl_eval.beam b/bootstrap/lib/stdlib/ebin/erl_eval.beam
index 3be5213113..e646342e2b 100644
--- a/bootstrap/lib/stdlib/ebin/erl_eval.beam
+++ b/bootstrap/lib/stdlib/ebin/erl_eval.beam
Binary files differ
diff --git a/bootstrap/lib/stdlib/ebin/erl_expand_records.beam b/bootstrap/lib/stdlib/ebin/erl_expand_records.beam
index c5c1d71941..753a0a3fec 100644
--- a/bootstrap/lib/stdlib/ebin/erl_expand_records.beam
+++ b/bootstrap/lib/stdlib/ebin/erl_expand_records.beam
Binary files differ
diff --git a/bootstrap/lib/stdlib/ebin/erl_lint.beam b/bootstrap/lib/stdlib/ebin/erl_lint.beam
index 55ec220d55..cd7d936c99 100644
--- a/bootstrap/lib/stdlib/ebin/erl_lint.beam
+++ b/bootstrap/lib/stdlib/ebin/erl_lint.beam
Binary files differ
diff --git a/bootstrap/lib/stdlib/ebin/erl_parse.beam b/bootstrap/lib/stdlib/ebin/erl_parse.beam
index c026e8401f..85fa455908 100644
--- a/bootstrap/lib/stdlib/ebin/erl_parse.beam
+++ b/bootstrap/lib/stdlib/ebin/erl_parse.beam
Binary files differ
diff --git a/bootstrap/lib/stdlib/ebin/erl_scan.beam b/bootstrap/lib/stdlib/ebin/erl_scan.beam
index b5e7c1c24e..9e70ed846e 100644
--- a/bootstrap/lib/stdlib/ebin/erl_scan.beam
+++ b/bootstrap/lib/stdlib/ebin/erl_scan.beam
Binary files differ
diff --git a/bootstrap/lib/stdlib/ebin/erl_tar.beam b/bootstrap/lib/stdlib/ebin/erl_tar.beam
index 9de0e978e3..7eacf3272c 100644
--- a/bootstrap/lib/stdlib/ebin/erl_tar.beam
+++ b/bootstrap/lib/stdlib/ebin/erl_tar.beam
Binary files differ
diff --git a/bootstrap/lib/stdlib/ebin/escript.beam b/bootstrap/lib/stdlib/ebin/escript.beam
index 18066abf53..93c1109b41 100644
--- a/bootstrap/lib/stdlib/ebin/escript.beam
+++ b/bootstrap/lib/stdlib/ebin/escript.beam
Binary files differ
diff --git a/bootstrap/lib/stdlib/ebin/ets.beam b/bootstrap/lib/stdlib/ebin/ets.beam
index 8bc5103946..642689d749 100644
--- a/bootstrap/lib/stdlib/ebin/ets.beam
+++ b/bootstrap/lib/stdlib/ebin/ets.beam
Binary files differ
diff --git a/bootstrap/lib/stdlib/ebin/eval_bits.beam b/bootstrap/lib/stdlib/ebin/eval_bits.beam
index ac375672f6..73e20d9a8d 100644
--- a/bootstrap/lib/stdlib/ebin/eval_bits.beam
+++ b/bootstrap/lib/stdlib/ebin/eval_bits.beam
Binary files differ
diff --git a/bootstrap/lib/stdlib/ebin/file_sorter.beam b/bootstrap/lib/stdlib/ebin/file_sorter.beam
index 0c910821f6..633d8acd10 100644
--- a/bootstrap/lib/stdlib/ebin/file_sorter.beam
+++ b/bootstrap/lib/stdlib/ebin/file_sorter.beam
Binary files differ
diff --git a/bootstrap/lib/stdlib/ebin/filename.beam b/bootstrap/lib/stdlib/ebin/filename.beam
index 898ed0804f..e371f3f478 100644
--- a/bootstrap/lib/stdlib/ebin/filename.beam
+++ b/bootstrap/lib/stdlib/ebin/filename.beam
Binary files differ
diff --git a/bootstrap/lib/stdlib/ebin/gb_trees.beam b/bootstrap/lib/stdlib/ebin/gb_trees.beam
index bbe958dc66..edf1805440 100644
--- a/bootstrap/lib/stdlib/ebin/gb_trees.beam
+++ b/bootstrap/lib/stdlib/ebin/gb_trees.beam
Binary files differ
diff --git a/bootstrap/lib/stdlib/ebin/gen.beam b/bootstrap/lib/stdlib/ebin/gen.beam
index db59451d78..bd08292a87 100644
--- a/bootstrap/lib/stdlib/ebin/gen.beam
+++ b/bootstrap/lib/stdlib/ebin/gen.beam
Binary files differ
diff --git a/bootstrap/lib/stdlib/ebin/gen_fsm.beam b/bootstrap/lib/stdlib/ebin/gen_fsm.beam
index 03f40579cb..f763cab747 100644
--- a/bootstrap/lib/stdlib/ebin/gen_fsm.beam
+++ b/bootstrap/lib/stdlib/ebin/gen_fsm.beam
Binary files differ
diff --git a/bootstrap/lib/stdlib/ebin/gen_server.beam b/bootstrap/lib/stdlib/ebin/gen_server.beam
index 922c501ff2..fe4e109508 100644
--- a/bootstrap/lib/stdlib/ebin/gen_server.beam
+++ b/bootstrap/lib/stdlib/ebin/gen_server.beam
Binary files differ
diff --git a/bootstrap/lib/stdlib/ebin/io_lib.beam b/bootstrap/lib/stdlib/ebin/io_lib.beam
index 07cefba99e..b240aa157d 100644
--- a/bootstrap/lib/stdlib/ebin/io_lib.beam
+++ b/bootstrap/lib/stdlib/ebin/io_lib.beam
Binary files differ
diff --git a/bootstrap/lib/stdlib/ebin/io_lib_pretty.beam b/bootstrap/lib/stdlib/ebin/io_lib_pretty.beam
index f7a239e18c..be283307f3 100644
--- a/bootstrap/lib/stdlib/ebin/io_lib_pretty.beam
+++ b/bootstrap/lib/stdlib/ebin/io_lib_pretty.beam
Binary files differ
diff --git a/bootstrap/lib/stdlib/ebin/lib.beam b/bootstrap/lib/stdlib/ebin/lib.beam
index 5d44d3f8f1..4b67bbb774 100644
--- a/bootstrap/lib/stdlib/ebin/lib.beam
+++ b/bootstrap/lib/stdlib/ebin/lib.beam
Binary files differ
diff --git a/bootstrap/lib/stdlib/ebin/ms_transform.beam b/bootstrap/lib/stdlib/ebin/ms_transform.beam
index 1af64e9d63..f8689ddf72 100644
--- a/bootstrap/lib/stdlib/ebin/ms_transform.beam
+++ b/bootstrap/lib/stdlib/ebin/ms_transform.beam
Binary files differ
diff --git a/bootstrap/lib/stdlib/ebin/pool.beam b/bootstrap/lib/stdlib/ebin/pool.beam
index a16364e1d9..3b1dbc3524 100644
--- a/bootstrap/lib/stdlib/ebin/pool.beam
+++ b/bootstrap/lib/stdlib/ebin/pool.beam
Binary files differ
diff --git a/bootstrap/lib/stdlib/ebin/qlc.beam b/bootstrap/lib/stdlib/ebin/qlc.beam
index 1576557a09..716f28b661 100644
--- a/bootstrap/lib/stdlib/ebin/qlc.beam
+++ b/bootstrap/lib/stdlib/ebin/qlc.beam
Binary files differ
diff --git a/bootstrap/lib/stdlib/ebin/qlc_pt.beam b/bootstrap/lib/stdlib/ebin/qlc_pt.beam
index 805203b00e..f51bc3ccbd 100644
--- a/bootstrap/lib/stdlib/ebin/qlc_pt.beam
+++ b/bootstrap/lib/stdlib/ebin/qlc_pt.beam
Binary files differ
diff --git a/bootstrap/lib/stdlib/ebin/queue.beam b/bootstrap/lib/stdlib/ebin/queue.beam
index 663b1a49ff..5ebb0f9cc6 100644
--- a/bootstrap/lib/stdlib/ebin/queue.beam
+++ b/bootstrap/lib/stdlib/ebin/queue.beam
Binary files differ
diff --git a/bootstrap/lib/stdlib/ebin/re.beam b/bootstrap/lib/stdlib/ebin/re.beam
index 85125291e9..4b9cbb7cfc 100644
--- a/bootstrap/lib/stdlib/ebin/re.beam
+++ b/bootstrap/lib/stdlib/ebin/re.beam
Binary files differ
diff --git a/bootstrap/lib/stdlib/ebin/sofs.beam b/bootstrap/lib/stdlib/ebin/sofs.beam
index 5d9b1bd6c0..a0c8c58c03 100644
--- a/bootstrap/lib/stdlib/ebin/sofs.beam
+++ b/bootstrap/lib/stdlib/ebin/sofs.beam
Binary files differ
diff --git a/bootstrap/lib/stdlib/ebin/string.beam b/bootstrap/lib/stdlib/ebin/string.beam
index 5086591504..3ace8184d0 100644
--- a/bootstrap/lib/stdlib/ebin/string.beam
+++ b/bootstrap/lib/stdlib/ebin/string.beam
Binary files differ
diff --git a/bootstrap/lib/stdlib/ebin/supervisor.beam b/bootstrap/lib/stdlib/ebin/supervisor.beam
index 9d3b9ddd87..98c8f6d42e 100644
--- a/bootstrap/lib/stdlib/ebin/supervisor.beam
+++ b/bootstrap/lib/stdlib/ebin/supervisor.beam
Binary files differ
diff --git a/bootstrap/lib/stdlib/ebin/unicode.beam b/bootstrap/lib/stdlib/ebin/unicode.beam
index b560f13933..7dcf140730 100644
--- a/bootstrap/lib/stdlib/ebin/unicode.beam
+++ b/bootstrap/lib/stdlib/ebin/unicode.beam
Binary files differ
diff --git a/bootstrap/lib/stdlib/ebin/zip.beam b/bootstrap/lib/stdlib/ebin/zip.beam
index ca76a6fa3b..2907ee286b 100644
--- a/bootstrap/lib/stdlib/ebin/zip.beam
+++ b/bootstrap/lib/stdlib/ebin/zip.beam
Binary files differ
diff --git a/erts/doc/src/erlang.xml b/erts/doc/src/erlang.xml
index a603d5c2b8..8c01d77721 100644
--- a/erts/doc/src/erlang.xml
+++ b/erts/doc/src/erlang.xml
@@ -3909,7 +3909,7 @@ os_prompt%</pre>
<item>
<p>Return the current call stack back-trace (<em>stacktrace</em>)
of the process. The stack has the same format as returned by
- <seealso marker="#get_stacktrace/1">erlang:get_stacktrace/0</seealso>.
+ <seealso marker="#get_stacktrace/0">erlang:get_stacktrace/0</seealso>.
</p>
</item>
<tag><c>{dictionary, Dictionary}</c></tag>
diff --git a/erts/doc/src/notes.xml b/erts/doc/src/notes.xml
index cfee978bde..d7967212b1 100644
--- a/erts/doc/src/notes.xml
+++ b/erts/doc/src/notes.xml
@@ -30,6 +30,35 @@
</header>
<p>This document describes the changes made to the ERTS application.</p>
+<section><title>Erts 5.9.0.1</title>
+
+ <section><title>Fixed Bugs and Malfunctions</title>
+ <list>
+ <item>
+ <p>
+ A feature test for the <c>lwsync</c> instruction
+ performed on PowerPC hardware at runtime system startup
+ got into an eternal loop if the instruction was not
+ supported. This bug was introduced in erts-5.9/OTP-R15B.</p>
+ <p>
+ Own Id: OTP-9843</p>
+ </item>
+ <item>
+ <p>
+ I/O events could potentially be delayed for ever when
+ enabling kernel-poll on a non-SMP runtime system
+ executing on Solaris. When also combined with
+ async-threads the runtime system hung before completing
+ the boot phase. This bug was introduced in
+ erts-5.9/OTP-R15B.</p>
+ <p>
+ Own Id: OTP-9844</p>
+ </item>
+ </list>
+ </section>
+
+</section>
+
<section><title>Erts 5.9</title>
<section><title>Fixed Bugs and Malfunctions</title>
diff --git a/erts/emulator/beam/erl_driver.h b/erts/emulator/beam/erl_driver.h
index e80eae0b86..7510f6b724 100644
--- a/erts/emulator/beam/erl_driver.h
+++ b/erts/emulator/beam/erl_driver.h
@@ -371,11 +371,17 @@ typedef struct erl_drv_entry {
#ifndef ERL_DRIVER_TYPES_ONLY
#if defined(VXWORKS)
-# define DRIVER_INIT(DRIVER_NAME) ErlDrvEntry* DRIVER_NAME ## _init(void)
+# define DRIVER_INIT(DRIVER_NAME) \
+ ErlDrvEntry* DRIVER_NAME ## _init(void); \
+ ErlDrvEntry* DRIVER_NAME ## _init(void)
#elif defined(__WIN32__)
-# define DRIVER_INIT(DRIVER_NAME) __declspec(dllexport) ErlDrvEntry* driver_init(void)
+# define DRIVER_INIT(DRIVER_NAME) \
+ __declspec(dllexport) ErlDrvEntry* driver_init(void); \
+ __declspec(dllexport) ErlDrvEntry* driver_init(void)
#else
-# define DRIVER_INIT(DRIVER_NAME) ErlDrvEntry* driver_init(void)
+# define DRIVER_INIT(DRIVER_NAME) \
+ ErlDrvEntry* driver_init(void); \
+ ErlDrvEntry* driver_init(void)
#endif
/*
diff --git a/erts/emulator/beam/erl_port_task.c b/erts/emulator/beam/erl_port_task.c
index 2b5e65b11a..a2b08fcf56 100644
--- a/erts/emulator/beam/erl_port_task.c
+++ b/erts/emulator/beam/erl_port_task.c
@@ -731,7 +731,6 @@ erts_port_task_execute(ErtsRunQueue *runq, Port **curr_port_pp)
int reds = ERTS_PORT_REDS_EXECUTE;
erts_aint_t io_tasks_executed = 0;
int fpe_was_unmasked;
- ErtsPortTaskExeBlockData blk_data = {runq, NULL};
ERTS_SMP_LC_ASSERT(erts_smp_lc_runq_is_locked(runq));
@@ -965,8 +964,6 @@ erts_port_task_execute(ErtsRunQueue *runq, Port **curr_port_pp)
#endif
done:
- blk_data.resp = &res;
-
ERTS_SMP_LC_ASSERT(erts_smp_lc_runq_is_locked(runq));
ERTS_PORT_REDUCTIONS_EXECUTED(runq, reds);
diff --git a/erts/emulator/beam/erl_trace.c b/erts/emulator/beam/erl_trace.c
index b487dbf054..70c3e7612f 100644
--- a/erts/emulator/beam/erl_trace.c
+++ b/erts/emulator/beam/erl_trace.c
@@ -544,7 +544,7 @@ send_to_port(Process *c_p, Eterm message,
*/
static void
-profile_send(Eterm message) {
+profile_send(Eterm profiler, Eterm message) {
Uint sz = 0;
ErlHeapFragment *bp = NULL;
Uint *hp = NULL;
@@ -552,8 +552,6 @@ profile_send(Eterm message) {
Process *profile_p = NULL;
ErlOffHeap *off_heap = NULL;
- Eterm profiler = erts_get_system_profile();
-
if (is_internal_port(profiler)) {
Port *profiler_port = NULL;
@@ -2583,6 +2581,7 @@ profile_scheduler(Eterm scheduler_id, Eterm state) {
Uint Ms, s, us;
#ifndef ERTS_SMP
+ Eterm profiler;
#define LOCAL_HEAP_SIZE (4 + 7)
DeclareTmpHeapNoproc(local_heap,LOCAL_HEAP_SIZE);
UseTmpHeapNoproc(LOCAL_HEAP_SIZE);
@@ -2617,7 +2616,8 @@ profile_scheduler(Eterm scheduler_id, Eterm state) {
make_small(active_sched), timestamp); hp += 7;
#ifndef ERTS_SMP
- profile_send(msg);
+ profiler = erts_get_system_profile();
+ profile_send(profiler, msg);
UnUseTmpHeapNoproc(LOCAL_HEAP_SIZE);
#undef LOCAL_HEAP_SIZE
#else
@@ -2632,6 +2632,7 @@ profile_scheduler_q(Eterm scheduler_id, Eterm state, Eterm no_schedulers, Uint M
Eterm *hp, msg, timestamp;
#ifndef ERTS_SMP
+ Eterm profiler;
#define LOCAL_HEAP_SIZE (4 + 7)
DeclareTmpHeapNoproc(local_heap,LOCAL_HEAP_SIZE);
UseTmpHeapNoproc(LOCAL_HEAP_SIZE);
@@ -2652,7 +2653,8 @@ profile_scheduler_q(Eterm scheduler_id, Eterm state, Eterm no_schedulers, Uint M
timestamp = TUPLE3(hp, make_small(Ms), make_small(s), make_small(us)); hp += 4;
msg = TUPLE6(hp, am_profile, am_scheduler, scheduler_id, state, no_schedulers, timestamp); hp += 7;
#ifndef ERTS_SMP
- profile_send(msg);
+ profiler = erts_get_system_profile();
+ profile_send(profiler, msg);
UnUseTmpHeapNoproc(LOCAL_HEAP_SIZE);
#undef LOCAL_HEAP_SIZE
#else
@@ -2895,6 +2897,7 @@ profile_runnable_port(Port *p, Eterm status) {
Eterm count = make_small(0);
#ifndef ERTS_SMP
+ Eterm profiler;
#define LOCAL_HEAP_SIZE (4 + 6)
DeclareTmpHeapNoproc(local_heap,LOCAL_HEAP_SIZE);
@@ -2919,7 +2922,8 @@ profile_runnable_port(Port *p, Eterm status) {
msg = TUPLE5(hp, am_profile, p->id, status, count, timestamp); hp += 6;
#ifndef ERTS_SMP
- profile_send(msg);
+ profiler = erts_get_system_profile();
+ profile_send(profiler, msg);
UnUseTmpHeapNoproc(LOCAL_HEAP_SIZE);
#undef LOCAL_HEAP_SIZE
#else
@@ -2934,6 +2938,7 @@ profile_runnable_proc(Process *p, Eterm status){
Uint Ms, s, us;
Eterm *hp, msg, timestamp;
Eterm where = am_undefined;
+ Eterm profiler;
#ifndef ERTS_SMP
#define LOCAL_HEAP_SIZE (4 + 6 + 4)
@@ -2946,6 +2951,12 @@ profile_runnable_proc(Process *p, Eterm status){
ErlHeapFragment *bp;
Uint hsz = 4 + 6 + 4;
#endif
+ profiler = erts_get_system_profile();
+
+ /* Do not profile profiler pid */
+ if (profiler == p->id) {
+ return;
+ }
if (!p->current) {
p->current = find_function_from_pc(p->i);
@@ -2972,7 +2983,7 @@ profile_runnable_proc(Process *p, Eterm status){
timestamp = TUPLE3(hp, make_small(Ms), make_small(s), make_small(us)); hp += 4;
msg = TUPLE5(hp, am_profile, p->id, status, where, timestamp); hp += 6;
#ifndef ERTS_SMP
- profile_send(msg);
+ profile_send(profiler, msg);
UnUseTmpHeapNoproc(LOCAL_HEAP_SIZE);
#undef LOCAL_HEAP_SIZE
#else
diff --git a/erts/emulator/hipe/hipe_bif0.c b/erts/emulator/hipe/hipe_bif0.c
index cec22b3836..28e4382835 100644
--- a/erts/emulator/hipe/hipe_bif0.c
+++ b/erts/emulator/hipe/hipe_bif0.c
@@ -174,8 +174,13 @@ static inline unsigned char *bytearray_lvalue(Eterm bin, Eterm idx)
{
Sint i;
unsigned char *bytes;
+#ifndef DEBUG
+ ERTS_DECLARE_DUMMY(Uint bitoffs);
+ ERTS_DECLARE_DUMMY(Uint bitsize);
+#else
Uint bitoffs;
Uint bitsize;
+#endif
if (is_not_binary(bin) ||
is_not_small(idx) ||
@@ -235,9 +240,15 @@ BIF_RETTYPE hipe_bifs_bitarray_2(BIF_ALIST_2)
BIF_RETTYPE hipe_bifs_bitarray_update_3(BIF_ALIST_3)
{
unsigned char *bytes, bytemask;
- Uint bitoffs, bitsize;
Uint bitnr, bytenr;
int set;
+#ifndef DEBUG
+ ERTS_DECLARE_DUMMY(Uint bitoffs);
+ ERTS_DECLARE_DUMMY(Uint bitsize);
+#else
+ Uint bitoffs;
+ Uint bitsize;
+#endif
if (is_not_binary(BIF_ARG_1))
BIF_ERROR(BIF_P, BADARG);
@@ -267,8 +278,15 @@ BIF_RETTYPE hipe_bifs_bitarray_update_3(BIF_ALIST_3)
BIF_RETTYPE hipe_bifs_bitarray_sub_2(BIF_ALIST_2)
{
unsigned char *bytes, bytemask;
- Uint bitoffs, bitsize;
Uint bitnr, bytenr;
+#ifndef DEBUG
+ ERTS_DECLARE_DUMMY(Uint bitoffs);
+ ERTS_DECLARE_DUMMY(Uint bitsize);
+#else
+ Uint bitoffs;
+ Uint bitsize;
+#endif
+
if (is_not_binary(BIF_ARG_1))
BIF_ERROR(BIF_P, BADARG);
@@ -397,10 +415,15 @@ BIF_RETTYPE hipe_bifs_enter_code_2(BIF_ALIST_2)
Uint nrbytes;
void *bytes;
void *address;
- Uint bitoffs;
- Uint bitsize;
Eterm trampolines;
Eterm *hp;
+#ifndef DEBUG
+ ERTS_DECLARE_DUMMY(Uint bitoffs);
+ ERTS_DECLARE_DUMMY(Uint bitsize);
+#else
+ Uint bitoffs;
+ Uint bitsize;
+#endif
if (is_not_binary(BIF_ARG_1))
BIF_ERROR(BIF_P, BADARG);
diff --git a/erts/emulator/sys/common/erl_poll.c b/erts/emulator/sys/common/erl_poll.c
index b6cb271f17..3817b1e4d5 100644
--- a/erts/emulator/sys/common/erl_poll.c
+++ b/erts/emulator/sys/common/erl_poll.c
@@ -1949,7 +1949,7 @@ check_fd_events(ErtsPollSet ps, SysTimeval *tv, int max_res)
*/
struct dvpoll poll_res;
int nfds = (int) erts_smp_atomic_read_nob(&ps->no_of_user_fds);
-#ifdef ERTS_SMP
+#if ERTS_POLL_USE_WAKEUP_PIPE
nfds++; /* Wakeup pipe */
#endif
if (timeout > INT_MAX)
@@ -2487,7 +2487,7 @@ ERTS_POLL_EXPORT(erts_poll_info)(ErtsPollSet ps, ErtsPollInfo *pip)
pip->memory_size = size;
pip->poll_set_size = (int) erts_smp_atomic_read_nob(&ps->no_of_user_fds);
-#ifdef ERTS_SMP
+#if ERTS_POLL_USE_WAKEUP_PIPE
pip->poll_set_size++; /* Wakeup pipe */
#endif
diff --git a/erts/emulator/test/Makefile b/erts/emulator/test/Makefile
index 08d2066da3..a3dcbc4cf3 100644
--- a/erts/emulator/test/Makefile
+++ b/erts/emulator/test/Makefile
@@ -88,6 +88,7 @@ MODULES= \
send_term_SUITE \
sensitive_SUITE \
signal_SUITE \
+ smoke_test_SUITE \
statistics_SUITE \
system_info_SUITE \
system_profile_SUITE \
diff --git a/erts/emulator/test/smoke_test_SUITE.erl b/erts/emulator/test/smoke_test_SUITE.erl
new file mode 100644
index 0000000000..98f1cf1ad5
--- /dev/null
+++ b/erts/emulator/test/smoke_test_SUITE.erl
@@ -0,0 +1,139 @@
+%%
+%% %CopyrightBegin%
+%%
+%% Copyright Ericsson AB 2011. All Rights Reserved.
+%%
+%% The contents of this file are subject to the Erlang Public License,
+%% Version 1.1, (the "License"); you may not use this file except in
+%% compliance with the License. You should have received a copy of the
+%% Erlang Public License along with this software. If not, it can be
+%% retrieved online at http://www.erlang.org/.
+%%
+%% Software distributed under the License is distributed on an "AS IS"
+%% basis, WITHOUT WARRANTY OF ANY KIND, either express or implied. See
+%% the License for the specific language governing rights and limitations
+%% under the License.
+%%
+%% %CopyrightEnd%
+%%
+
+-module(smoke_test_SUITE).
+
+-include_lib("test_server/include/test_server.hrl").
+
+%-compile(export_all).
+-export([all/0, suite/0,groups/0,init_per_suite/1, end_per_suite/1,
+ init_per_group/2,end_per_group/2,
+ init_per_testcase/2, end_per_testcase/2]).
+
+-export([boot_combo/1]).
+
+-define(DEFAULT_TIMEOUT, ?t:minutes(2)).
+
+suite() -> [{ct_hooks,[ts_install_cth]}].
+
+all() ->
+ [boot_combo].
+
+groups() ->
+ [].
+
+init_per_suite(Config) ->
+ Config.
+
+end_per_suite(_Config) ->
+ ok.
+
+init_per_group(_GroupName, Config) ->
+ Config.
+
+end_per_group(_GroupName, Config) ->
+ Config.
+
+
+init_per_testcase(Case, Config) when is_list(Config) ->
+ Dog = ?t:timetrap(?DEFAULT_TIMEOUT),
+ [{testcase, Case},{watchdog, Dog}|Config].
+
+end_per_testcase(_Case, Config) when is_list(Config) ->
+ Dog = ?config(watchdog, Config),
+ ?t:timetrap_cancel(Dog),
+ ok.
+
+%%%
+%%% The test cases -------------------------------------------------------------
+%%%
+
+boot_combo(Config) when is_list(Config) ->
+ ZFlags = os:getenv("ERL_ZFLAGS"),
+ NOOP = fun () -> ok end,
+ A42 = fun () ->
+ case erlang:system_info(threads) of
+ true ->
+ 42 = erlang:system_info(thread_pool_size);
+ false ->
+ ok
+ end
+ end,
+ SMPDisable = fun () -> false = erlang:system_info(smp_support) end,
+ try
+ chk_boot(Config, "+Ktrue", NOOP),
+ chk_boot(Config, "+A42", A42),
+ chk_boot(Config, "-smp disable", SMPDisable),
+ chk_boot(Config, "+Ktrue +A42", A42),
+ chk_boot(Config, "-smp disable +A42",
+ fun () -> SMPDisable(), A42() end),
+ chk_boot(Config, "-smp disable +Ktrue", SMPDisable),
+ chk_boot(Config, "-smp disable +Ktrue +A42",
+ fun () -> SMPDisable(), A42() end),
+ %% A lot more combos could be implemented...
+ ok
+ after
+ os:putenv("ERL_ZFLAGS", case ZFlags of
+ false -> "";
+ _ -> ZFlags
+ end)
+ end.
+
+%%%
+%%% Aux functions --------------------------------------------------------------
+%%%
+
+chk_boot(Config, Args, Fun) ->
+ true = os:putenv("ERL_ZFLAGS", Args),
+ Success = make_ref(),
+ Parent = self(),
+ ?t:format("--- Testing ~s~n", [Args]),
+ {ok, Node} = start_node(Config),
+ Pid = spawn_link(Node, fun () ->
+ Fun(),
+ Parent ! {self(), Success}
+ end),
+ receive
+ {Pid, Success} ->
+ Node = node(Pid),
+ stop_node(Node),
+ ?t:format("--- Success!~n", []),
+ ok
+ end.
+
+start_node(Config) ->
+ start_node(Config, "").
+
+start_node(Config, Args) when is_list(Config) ->
+ ?line Pa = filename:dirname(code:which(?MODULE)),
+ ?line {A, B, C} = now(),
+ ?line Name = list_to_atom(atom_to_list(?MODULE)
+ ++ "-"
+ ++ atom_to_list(?config(testcase, Config))
+ ++ "-"
+ ++ integer_to_list(A)
+ ++ "-"
+ ++ integer_to_list(B)
+ ++ "-"
+ ++ integer_to_list(C)),
+ ?line ?t:start_node(Name, slave, [{args, "-pa "++Pa++" "++Args}]).
+
+stop_node(Node) ->
+ ?t:stop_node(Node).
+
diff --git a/erts/emulator/test/system_profile_SUITE.erl b/erts/emulator/test/system_profile_SUITE.erl
index 32089e8872..659e43f81d 100644
--- a/erts/emulator/test/system_profile_SUITE.erl
+++ b/erts/emulator/test/system_profile_SUITE.erl
@@ -27,6 +27,7 @@
system_profile_on_and_off/1,
runnable_procs/1,
runnable_ports/1,
+ dont_profile_profiler/1,
scheduler/1
]).
@@ -40,7 +41,7 @@
-define(default_timeout, ?t:minutes(1)).
init_per_testcase(_Case, Config) ->
- ?line Dog=?t:timetrap(?default_timeout),
+ Dog=?t:timetrap(?default_timeout),
[{watchdog, Dog}|Config].
end_per_testcase(_Case, Config) ->
Dog=?config(watchdog, Config),
@@ -51,7 +52,7 @@ suite() -> [{ct_hooks,[ts_install_cth]}].
all() ->
[system_profile_on_and_off, runnable_procs,
- runnable_ports, scheduler].
+ runnable_ports, scheduler, dont_profile_profiler].
groups() ->
[].
@@ -77,31 +78,31 @@ system_profile_on_and_off(suite) ->
system_profile_on_and_off(doc) ->
["Tests switching system_profiling on and off."];
system_profile_on_and_off(Config) when is_list(Config) ->
- ?line Pid = start_profiler_process(),
+ Pid = start_profiler_process(),
% Test runnable_ports on and off
- ?line undefined = erlang:system_profile(Pid, [runnable_ports]),
- ?line {Pid, [runnable_ports]} = erlang:system_profile(),
- ?line {Pid, [runnable_ports]} = erlang:system_profile(undefined, []),
+ undefined = erlang:system_profile(Pid, [runnable_ports]),
+ {Pid, [runnable_ports]} = erlang:system_profile(),
+ {Pid, [runnable_ports]} = erlang:system_profile(undefined, []),
% Test runnable_procs on and off
- ?line undefined = erlang:system_profile(Pid, [runnable_procs]),
- ?line {Pid, [runnable_procs]} = erlang:system_profile(),
- ?line {Pid, [runnable_procs]} = erlang:system_profile(undefined, []),
+ undefined = erlang:system_profile(Pid, [runnable_procs]),
+ {Pid, [runnable_procs]} = erlang:system_profile(),
+ {Pid, [runnable_procs]} = erlang:system_profile(undefined, []),
% Test scheduler on and off
- ?line undefined = erlang:system_profile(Pid, [scheduler]),
- ?line {Pid, [scheduler]} = erlang:system_profile(),
- ?line {Pid, [scheduler]} = erlang:system_profile(undefined, []),
+ undefined = erlang:system_profile(Pid, [scheduler]),
+ {Pid, [scheduler]} = erlang:system_profile(),
+ {Pid, [scheduler]} = erlang:system_profile(undefined, []),
% Test combined runnable_ports, runnable_procs, scheduler; on and off
- ?line undefined = erlang:system_profile(Pid, [scheduler, runnable_procs, runnable_ports]),
- ?line {Pid, [scheduler,runnable_procs,runnable_ports]} = erlang:system_profile(),
- ?line {Pid, [scheduler,runnable_procs,runnable_ports]} = erlang:system_profile(undefined, []),
+ undefined = erlang:system_profile(Pid, [scheduler, runnable_procs, runnable_ports]),
+ {Pid, [scheduler,runnable_procs,runnable_ports]} = erlang:system_profile(),
+ {Pid, [scheduler,runnable_procs,runnable_ports]} = erlang:system_profile(undefined, []),
% Test turned off and kill process
- ?line undefined = erlang:system_profile(),
- ?line exit(Pid,kill),
+ undefined = erlang:system_profile(),
+ exit(Pid,kill),
ok.
%% Test runnable_procs
@@ -111,25 +112,25 @@ runnable_procs(suite) ->
runnable_procs(doc) ->
["Tests system_profiling with runnable_procs."];
runnable_procs(Config) when is_list(Config) ->
- ?line Pid = start_profiler_process(),
+ Pid = start_profiler_process(),
% start a ring of processes
% FIXME: Set #laps and #nodes in config file
Nodes = 10,
Laps = 10,
- ?line Master = ring(Nodes),
- ?line undefined = erlang:system_profile(Pid, [runnable_procs]),
+ Master = ring(Nodes),
+ undefined = erlang:system_profile(Pid, [runnable_procs]),
% loop a message
- ?line ok = ring_message(Master, message, Laps),
- ?line Events = get_profiler_events(),
- ?line kill_em_all = kill_ring(Master),
- ?line erlang:system_profile(undefined, []),
+ ok = ring_message(Master, message, Laps),
+ Events = get_profiler_events(),
+ kill_em_all = kill_ring(Master),
+ erlang:system_profile(undefined, []),
put(master, Master),
put(laps, Laps),
- ?line true = has_runnable_event(Events),
+ true = has_runnable_event(Events),
Pids = sort_events_by_pid(Events),
- ?line ok = check_events(Pids),
+ ok = check_events(Pids),
erase(),
- ?line exit(Pid,kill),
+ exit(Pid,kill),
ok.
runnable_ports(suite) ->
@@ -137,21 +138,21 @@ runnable_ports(suite) ->
runnable_ports(doc) ->
["Tests system_profiling with runnable_port."];
runnable_ports(Config) when is_list(Config) ->
- ?line Pid = start_profiler_process(),
- ?line undefined = erlang:system_profile(Pid, [runnable_ports]),
- ?line EchoPid = echo(Config),
+ Pid = start_profiler_process(),
+ undefined = erlang:system_profile(Pid, [runnable_ports]),
+ EchoPid = echo(Config),
% FIXME: Set config to number_of_echos
Laps = 10,
put(laps, Laps),
- ?line ok = echo_message(EchoPid, Laps, message),
- ?line Events = get_profiler_events(),
- ?line kill_em_all = kill_echo(EchoPid),
- ?line erlang:system_profile(undefined, []),
- ?line true = has_runnable_event(Events),
+ ok = echo_message(EchoPid, Laps, message),
+ Events = get_profiler_events(),
+ kill_em_all = kill_echo(EchoPid),
+ erlang:system_profile(undefined, []),
+ true = has_runnable_event(Events),
Pids = sort_events_by_pid(Events),
- ?line ok = check_events(Pids),
+ ok = check_events(Pids),
erase(),
- ?line exit(Pid,kill),
+ exit(Pid,kill),
ok.
scheduler(suite) ->
@@ -160,46 +161,68 @@ scheduler(doc) ->
["Tests system_profiling with scheduler."];
scheduler(Config) when is_list(Config) ->
case {erlang:system_info(smp_support), erlang:system_info(schedulers_online)} of
- {false,_} -> ?line {skipped, "No need for scheduler test when smp support is disabled."};
- {_, 1} -> ?line {skipped, "No need for scheduler test when only one scheduler online."};
+ {false,_} -> {skipped, "No need for scheduler test when smp support is disabled."};
+ {_, 1} -> {skipped, "No need for scheduler test when only one scheduler online."};
_ ->
Nodes = 10,
- ?line ok = check_block_system(Nodes),
- ?line ok = check_multi_scheduling_block(Nodes),
- ok
+ ok = check_block_system(Nodes),
+ ok = check_multi_scheduling_block(Nodes)
end.
+% the profiler pid should not be profiled
+dont_profile_profiler(suite) ->
+ [];
+dont_profile_profiler(doc) ->
+ ["Ensure system profiler process is not profiled."];
+dont_profile_profiler(Config) when is_list(Config) ->
+ Pid = start_profiler_process(),
+
+ Nodes = 10,
+ Laps = 10,
+ Master = ring(Nodes),
+ undefined = erlang:system_profile(Pid, [runnable_procs]),
+ % loop a message
+ ok = ring_message(Master, message, Laps),
+ erlang:system_profile(undefined, []),
+ kill_em_all = kill_ring(Master),
+ Events = get_profiler_events(),
+ false = has_profiler_pid_event(Events, Pid),
+
+ exit(Pid,kill),
+ ok.
+
+
%%% Check scheduler profiling
check_multi_scheduling_block(Nodes) ->
- ?line Pid = start_profiler_process(),
- ?line undefined = erlang:system_profile(Pid, [scheduler]),
- ?line {ok, Supervisor} = start_load(Nodes),
- ?line erlang:system_flag(multi_scheduling, block),
- ?line erlang:system_flag(multi_scheduling, unblock),
- ?line {Pid, [scheduler]} = erlang:system_profile(undefined, []),
- ?line Events = get_profiler_events(),
- ?line true = has_scheduler_event(Events),
+ Pid = start_profiler_process(),
+ undefined = erlang:system_profile(Pid, [scheduler]),
+ {ok, Supervisor} = start_load(Nodes),
+ erlang:system_flag(multi_scheduling, block),
+ erlang:system_flag(multi_scheduling, unblock),
+ {Pid, [scheduler]} = erlang:system_profile(undefined, []),
+ Events = get_profiler_events(),
+ true = has_scheduler_event(Events),
stop_load(Supervisor),
- ?line exit(Pid,kill),
+ exit(Pid,kill),
erase(),
ok.
check_block_system(Nodes) ->
- ?line Dummy = spawn(?MODULE, profiler_process, [[]]),
- ?line Pid = start_profiler_process(),
- ?line undefined = erlang:system_profile(Pid, [scheduler]),
- ?line {ok, Supervisor} = start_load(Nodes),
+ Dummy = spawn(?MODULE, profiler_process, [[]]),
+ Pid = start_profiler_process(),
+ undefined = erlang:system_profile(Pid, [scheduler]),
+ {ok, Supervisor} = start_load(Nodes),
% FIXME: remove wait !!
wait(300),
- ?line undefined = erlang:system_monitor(Dummy, [busy_port]),
- ?line {Dummy, [busy_port]} = erlang:system_monitor(undefined, []),
- ?line {Pid, [scheduler]} = erlang:system_profile(undefined, []),
- ?line Events = get_profiler_events(),
- ?line true = has_scheduler_event(Events),
+ undefined = erlang:system_monitor(Dummy, [busy_port]),
+ {Dummy, [busy_port]} = erlang:system_monitor(undefined, []),
+ {Pid, [scheduler]} = erlang:system_profile(undefined, []),
+ Events = get_profiler_events(),
+ true = has_scheduler_event(Events),
stop_load(Supervisor),
- ?line exit(Pid,kill),
- ?line exit(Dummy,kill),
+ exit(Pid,kill),
+ exit(Dummy,kill),
erase(),
ok.
@@ -211,17 +234,17 @@ check_events([Pid | Pids]) ->
Laps = get(laps),
CheckPids = get(pids),
{Events, N} = get_pid_events(Pid),
- ?line ok = check_event_flow(Events),
- ?line ok = check_event_ts(Events),
+ ok = check_event_flow(Events),
+ ok = check_event_ts(Events),
IsMember = lists:member(Pid, CheckPids),
case Pid of
Master ->
io:format("Expected ~p and got ~p profile events from ~p: ok~n", [Laps*2+2, N, Pid]),
- ?line N = Laps*2 + 2,
+ N = Laps*2 + 2,
check_events(Pids);
Pid when IsMember == true ->
io:format("Expected ~p and got ~p profile events from ~p: ok~n", [Laps*2, N, Pid]),
- ?line N = Laps*2,
+ N = Laps*2,
check_events(Pids);
Pid ->
check_events(Pids)
@@ -448,6 +471,12 @@ has_runnable_event(Events) ->
end
end, Events).
+has_profiler_pid_event([], _) -> false;
+has_profiler_pid_event([{profile, Pid, _Activity, _MFA, _TS}|Events], Pid) -> true;
+has_profiler_pid_event([_|Events], Pid) ->
+ has_profiler_pid_event(Events, Pid).
+
+
wait(Time) -> receive after Time -> ok end.
%%%
diff --git a/erts/etc/common/heart.c b/erts/etc/common/heart.c
index 7a5746e630..fae4d870cc 100644
--- a/erts/etc/common/heart.c
+++ b/erts/etc/common/heart.c
@@ -685,14 +685,16 @@ do_terminate(reason)
print_error("Would reboot. Terminating.");
else {
kill_old_erlang();
- system(command);
+ /* suppress gcc warning with 'if' */
+ if(system(command));
print_error("Executed \"%s\". Terminating.",command);
}
free_env_val(command);
}
else {
kill_old_erlang();
- system((char*)&cmd[0]);
+ /* suppress gcc warning with 'if' */
+ if(system((char*)&cmd[0]));
print_error("Executed \"%s\". Terminating.",cmd);
}
}
diff --git a/erts/etc/common/inet_gethost.c b/erts/etc/common/inet_gethost.c
index 77bfd5e2bc..d25d2910b4 100644
--- a/erts/etc/common/inet_gethost.c
+++ b/erts/etc/common/inet_gethost.c
@@ -1141,14 +1141,12 @@ static Worker *pick_worker(void)
static Worker *pick_worker_greedy(AddrByte *domainbuff)
{
int i;
- int ql = 0;
int found = -1;
for (i=0; i < num_busy_workers; ++i) {
if (domaineq(busy_workers[i].domain, domainbuff)) {
if ((found < 0) || (busy_workers[i].que_size <
busy_workers[found].que_size)) {
found = i;
- ql = busy_workers[i].que_size;
}
}
}
@@ -1945,12 +1943,14 @@ static int worker_loop(void)
}
m = NULL;
#else
- write(1, reply, data_size); /* No signals expected */
+ /* expect no signals */
+ if (write(1, reply, data_size) < 0)
+ goto fail;
#endif
} /* for (;;) */
-#ifdef WIN32
fail:
+#ifdef WIN32
if (m != NULL) {
FREE(m);
}
@@ -1959,8 +1959,8 @@ static int worker_loop(void)
if (reply) {
FREE(reply);
}
- return 1;
#endif
+ return 1;
}
static int map_netdb_error(int netdb_code)
@@ -2561,7 +2561,8 @@ static void debugf(char *format, ...)
WriteFile(debug_console_allocated,buff,strlen(buff),&res,NULL);
}
#else
- write(2,buff,strlen(buff));
+ /* suppress warning with 'if' */
+ if(write(2,buff,strlen(buff)));
#endif
va_end(ap);
}
@@ -2583,7 +2584,8 @@ static void warning(char *format, ...)
WriteFile(GetStdHandle(STD_ERROR_HANDLE),buff,strlen(buff),&res,NULL);
}
#else
- write(2,buff,strlen(buff));
+ /* suppress warning with 'if' */
+ if(write(2,buff,strlen(buff)));
#endif
va_end(ap);
}
@@ -2605,7 +2607,8 @@ static void fatal(char *format, ...)
WriteFile(GetStdHandle(STD_ERROR_HANDLE),buff,strlen(buff),&res,NULL);
}
#else
- write(2,buff,strlen(buff));
+ /* suppress warning with 'if' */
+ if(write(2,buff,strlen(buff)));
#endif
va_end(ap);
#ifndef WIN32
diff --git a/erts/etc/unix/to_erl.c b/erts/etc/unix/to_erl.c
index 11fa3ff4cc..67274e67ed 100644
--- a/erts/etc/unix/to_erl.c
+++ b/erts/etc/unix/to_erl.c
@@ -352,7 +352,10 @@ int main(int argc, char **argv)
* to trigger the version handshaking between to_erl and run_erl
* at the start of every new to_erl-session.
*/
- write(wfd, "\022", 1);
+
+ if (write(wfd, "\022", 1) < 0) {
+ fprintf(stderr, "Error in writing ^R to FIFO.\n");
+ }
/*
* read and write
@@ -412,7 +415,7 @@ int main(int argc, char **argv)
if (len) {
#ifdef DEBUG
- write(1, buf, len);
+ if(write(1, buf, len));
#endif
if (write_all(wfd, buf, len) != len) {
fprintf(stderr, "Error in writing to FIFO.\n");
diff --git a/erts/lib_src/pthread/ethread.c b/erts/lib_src/pthread/ethread.c
index ad29249bac..fb7d135418 100644
--- a/erts/lib_src/pthread/ethread.c
+++ b/erts/lib_src/pthread/ethread.c
@@ -123,34 +123,53 @@ ethr_ts_event *ethr_get_tse__(void)
#if defined(ETHR_PPC_RUNTIME_CONF__)
-static volatile int lwsync_caused_sigill;
+#include <sys/wait.h>
static void
handle_lwsync_sigill(int signum)
{
- lwsync_caused_sigill = 1;
+ _exit(1);
}
static int
ppc_init__(void)
{
- struct sigaction act, oact;
- lwsync_caused_sigill = 0;
+ int pid;
- sigemptyset(&act.sa_mask);
- act.sa_flags = 0;
- act.sa_handler = handle_lwsync_sigill;
- if (sigaction(SIGILL, &act, &oact) != 0)
- return errno;
+ /* If anything what so ever failes we assume no lwsync for safety */
+ ethr_runtime__.conf.have_lwsync = 0;
+
+ /*
+ * We perform the lwsync test (which might cause an illegal
+ * instruction signal) in a separate process in order to be
+ * completely certain that we do not mess up our own state.
+ */
+ pid = fork();
+ if (pid == 0) {
+ struct sigaction act, oact;
- __asm__ __volatile__ ("lwsync\n\t" : : : "memory");
+ sigemptyset(&act.sa_mask);
+ act.sa_flags = SA_RESETHAND;
+ act.sa_handler = handle_lwsync_sigill;
+ if (sigaction(SIGILL, &act, &oact) != 0)
+ _exit(2);
- act.sa_flags = 0;
- act.sa_handler = SIG_DFL;
- if (sigaction(SIGILL, &act, &oact) != 0)
- return errno;
+ __asm__ __volatile__ ("lwsync\n\t" : : : "memory");
+
+ _exit(0);
+ }
- ethr_runtime__.conf.have_lwsync = (int) !lwsync_caused_sigill;
+ if (pid != -1) {
+ while (1) {
+ int status, res;
+ res = waitpid(pid, &status, 0);
+ if (res == pid) {
+ if (WIFEXITED(status) && WEXITSTATUS(status) == 0)
+ ethr_runtime__.conf.have_lwsync = 1;
+ break;
+ }
+ }
+ }
return 0;
}
diff --git a/erts/test/erl_print_SUITE.erl b/erts/test/erl_print_SUITE.erl
index ee1a200530..adc353bd51 100644
--- a/erts/test/erl_print_SUITE.erl
+++ b/erts/test/erl_print_SUITE.erl
@@ -303,7 +303,7 @@ read_case_data(Port, TestCase) ->
{Port, {data, {eol, [?PID_MARKER | PidStr]}}} ->
?line ?t:format("Port program pid: ~s~n", [PidStr]),
?line CaseProc = self(),
- ?line list_to_integer(PidStr), % Sanity check
+ ?line _ = list_to_integer(PidStr), % Sanity check
spawn_opt(fun () ->
port_prog_killer(CaseProc, PidStr)
end,
diff --git a/erts/test/ethread_SUITE.erl b/erts/test/ethread_SUITE.erl
index 80f988b0aa..5bb5aed3ed 100644
--- a/erts/test/ethread_SUITE.erl
+++ b/erts/test/ethread_SUITE.erl
@@ -68,9 +68,6 @@ tests() ->
atomic,
dw_atomic_massage].
-all(doc) -> [];
-all(suite) -> tests().
-
suite() -> [{ct_hooks,[ts_install_cth]}].
all() ->
@@ -125,35 +122,37 @@ try_lock_mutex(suite) ->
try_lock_mutex(Config) ->
run_case(Config, "try_lock_mutex", "").
-wd_dispatch(P) ->
- receive
- bye ->
- ?line true = port_command(P, "-1 "),
- ?line bye;
- L when is_list(L) ->
- ?line true = port_command(P, L),
- ?line wd_dispatch(P)
- end.
-
-watchdog(Port) ->
- ?line process_flag(priority, max),
- ?line receive after 500 -> ok end,
-
- ?line random:seed(),
- ?line true = port_command(Port, "0 "),
- ?line lists:foreach(fun (T) ->
- erlang:send_after(T,
- self(),
- integer_to_list(T)
- ++ " ")
- end,
- lists:usort(lists:map(fun (_) ->
- random:uniform(4500)+500
- end,
- lists:duplicate(50,0)))),
- ?line erlang:send_after(5100, self(), bye),
-
- wd_dispatch(Port).
+%% Remove dead code?
+
+% wd_dispatch(P) ->
+% receive
+% bye ->
+% ?line true = port_command(P, "-1 "),
+% ?line bye;
+% L when is_list(L) ->
+% ?line true = port_command(P, L),
+% ?line wd_dispatch(P)
+% end.
+%
+% watchdog(Port) ->
+% ?line process_flag(priority, max),
+% ?line receive after 500 -> ok end,
+%
+% ?line random:seed(),
+% ?line true = port_command(Port, "0 "),
+% ?line lists:foreach(fun (T) ->
+% erlang:send_after(T,
+% self(),
+% integer_to_list(T)
+% ++ " ")
+% end,
+% lists:usort(lists:map(fun (_) ->
+% random:uniform(4500)+500
+% end,
+% lists:duplicate(50,0)))),
+% ?line erlang:send_after(5100, self(), bye),
+%
+% wd_dispatch(Port).
cond_wait(doc) ->
["Tests ethr_cond_wait with ethr_cond_signal and ethr_cond_broadcast."];
@@ -307,7 +306,7 @@ read_case_data(Port, TestCase) ->
{Port, {data, {eol, [?PID_MARKER | PidStr]}}} ->
?line ?t:format("Port program pid: ~s~n", [PidStr]),
?line CaseProc = self(),
- ?line list_to_integer(PidStr), % Sanity check
+ ?line _ = list_to_integer(PidStr), % Sanity check
spawn_opt(fun () ->
port_prog_killer(CaseProc, PidStr)
end,
diff --git a/erts/test/z_SUITE.erl b/erts/test/z_SUITE.erl
index 482ecb8fba..28da923497 100644
--- a/erts/test/z_SUITE.erl
+++ b/erts/test/z_SUITE.erl
@@ -236,8 +236,8 @@ format_core(#core_search_conf{file = false}, Core, Ignore) ->
[Ignore, Core] ++ mod_time_list(Core));
format_core(#core_search_conf{file = File}, Core, Ignore) ->
FRes = str_strip(os:cmd(File ++ " " ++ Core)),
- case catch regexp:match(FRes, Core) of
- {match, _, _} ->
+ case catch re:run(FRes, Core, [caseless,{capture,none}]) of
+ match ->
io:format(" ~s~s " ++ time_fstr() ++ "~n",
[Ignore, FRes] ++ mod_time_list(Core));
_ ->
diff --git a/lib/asn1/c_src/asn1_erl_nif.c b/lib/asn1/c_src/asn1_erl_nif.c
index 9c9f83bc2a..accd368af1 100644
--- a/lib/asn1/c_src/asn1_erl_nif.c
+++ b/lib/asn1/c_src/asn1_erl_nif.c
@@ -580,7 +580,7 @@ int per_insert_bits_as_bits(int desired_no, int no_bytes,
unsigned char **input_ptr, unsigned char **output_ptr, int *unused) {
unsigned char *in_ptr = *input_ptr;
unsigned char val;
- int no_bits, ret, ret2;
+ int no_bits, ret;
if (desired_no == (no_bytes * 8)) {
if (per_insert_octets_unaligned(no_bytes, &in_ptr, output_ptr, *unused)
@@ -606,8 +606,7 @@ int per_insert_bits_as_bits(int desired_no, int no_bytes,
== ASN1_ERROR
)
return ASN1_ERROR;
- ret2 = per_pad_bits(desired_no - (no_bytes * 8), output_ptr, unused);
- /* printf("ret2 = %d\n\r",ret2); */
+ per_pad_bits(desired_no - (no_bytes * 8), output_ptr, unused);
ret = CEIL(desired_no,8);
/* printf("ret = %d\n\r",ret); */
}
diff --git a/lib/compiler/src/Makefile b/lib/compiler/src/Makefile
index 7a237608ad..3415517fff 100644
--- a/lib/compiler/src/Makefile
+++ b/lib/compiler/src/Makefile
@@ -53,6 +53,7 @@ MODULES = \
beam_dead \
beam_dict \
beam_disasm \
+ beam_except \
beam_flatten \
beam_jump \
beam_listing \
diff --git a/lib/compiler/src/beam_except.erl b/lib/compiler/src/beam_except.erl
new file mode 100644
index 0000000000..fb1a43cd9e
--- /dev/null
+++ b/lib/compiler/src/beam_except.erl
@@ -0,0 +1,149 @@
+%%
+%% %CopyrightBegin%
+%%
+%% Copyright Ericsson AB 2011. All Rights Reserved.
+%%
+%% The contents of this file are subject to the Erlang Public License,
+%% Version 1.1, (the "License"); you may not use this file except in
+%% compliance with the License. You should have received a copy of the
+%% Erlang Public License along with this software. If not, it can be
+%% retrieved online at http://www.erlang.org/.
+%%
+%% Software distributed under the License is distributed on an "AS IS"
+%% basis, WITHOUT WARRANTY OF ANY KIND, either express or implied. See
+%% the License for the specific language governing rights and limitations
+%% under the License.
+%%
+%% %CopyrightEnd%
+%%
+
+-module(beam_except).
+-export([module/2]).
+
+%%% Rewrite certain calls to erlang:error/{1,2} to specialized
+%%% instructions:
+%%%
+%%% erlang:error({badmatch,Value}) => badmatch Value
+%%% erlang:error({case_clause,Value}) => case_end Value
+%%% erlang:error({try_clause,Value}) => try_case_end Value
+%%% erlang:error(if_clause) => if_end
+%%% erlang:error(function_clause, Args) => jump FuncInfoLabel
+%%%
+
+-import(lists, [reverse/1]).
+
+module({Mod,Exp,Attr,Fs0,Lc}, _Opt) ->
+ Fs = [function(F) || F <- Fs0],
+ {ok,{Mod,Exp,Attr,Fs,Lc}}.
+
+function({function,Name,Arity,CLabel,Is0}) ->
+ try
+ Is = function_1(Is0),
+ {function,Name,Arity,CLabel,Is}
+ catch
+ Class:Error ->
+ Stack = erlang:get_stacktrace(),
+ io:fwrite("Function: ~w/~w\n", [Name,Arity]),
+ erlang:raise(Class, Error, Stack)
+ end.
+
+-record(st,
+ {lbl, %func_info label
+ loc %location for func_info
+ }).
+
+function_1(Is0) ->
+ case Is0 of
+ [{label,Lbl},{line,Loc}|_] ->
+ St = #st{lbl=Lbl,loc=Loc},
+ translate(Is0, St, []);
+ [{label,_}|_] ->
+ %% No line numbers. The source must be a .S file.
+ %% There is no need to do anything.
+ Is0
+ end.
+
+translate([{call_ext,Ar,{extfunc,erlang,error,Ar}}=I|Is], St, Acc) ->
+ translate_1(Ar, I, Is, St, Acc);
+translate([{call_ext_only,Ar,{extfunc,erlang,error,Ar}}=I|Is], St, Acc) ->
+ translate_1(Ar, I, Is, St, Acc);
+translate([{call_ext_last,Ar,{extfunc,erlang,error,Ar},_}=I|Is], St, Acc) ->
+ translate_1(Ar, I, Is, St, Acc);
+translate([I|Is], St, Acc) ->
+ translate(Is, St, [I|Acc]);
+translate([], _, Acc) ->
+ reverse(Acc).
+
+translate_1(Ar, I, Is, St, [{line,_}=Line|Acc1]=Acc0) ->
+ case dig_out(Ar, Acc1) of
+ no ->
+ translate(Is, St, [I|Acc0]);
+ {yes,function_clause,Acc2} ->
+ case {Line,St} of
+ {{line,Loc},#st{lbl=Fi,loc=Loc}} ->
+ Instr = {jump,{f,Fi}},
+ translate(Is, St, [Instr|Acc2]);
+ {_,_} ->
+ %% This must be "error(function_clause, Args)" in
+ %% the Erlang source code. Don't translate.
+ translate(Is, St, [I|Acc0])
+ end;
+ {yes,Instr,Acc2} ->
+ translate(Is, St, [Instr,Line|Acc2])
+ end.
+
+dig_out(Ar, [{kill,_}|Is]) ->
+ dig_out(Ar, Is);
+dig_out(1, [{block,Bl0}|Is]) ->
+ case dig_out_block(reverse(Bl0)) of
+ no -> no;
+ {yes,What,[]} ->
+ {yes,What,Is};
+ {yes,What,Bl} ->
+ {yes,What,[{block,Bl}|Is]}
+ end;
+dig_out(2, [{block,Bl}|Is]) ->
+ case dig_out_block_fc(Bl) of
+ no -> no;
+ {yes,What} -> {yes,What,Is}
+ end;
+dig_out(_, _) -> no.
+
+dig_out_block([{set,[{x,0}],[{atom,if_clause}],move}]) ->
+ {yes,if_end,[]};
+dig_out_block([{set,[{x,0}],[{literal,{Exc,Value}}],move}|Is]) ->
+ translate_exception(Exc, {literal,Value}, Is, 0);
+dig_out_block([{set,[{x,0}],[Tuple],move},
+ {set,[],[Value],put},
+ {set,[],[{atom,Exc}],put},
+ {set,[Tuple],[],{put_tuple,2}}|Is]) ->
+ translate_exception(Exc, Value, Is, 3);
+dig_out_block([{set,[],[Value],put},
+ {set,[],[{atom,Exc}],put},
+ {set,[{x,0}],[],{put_tuple,2}}|Is]) ->
+ translate_exception(Exc, Value, Is, 3);
+dig_out_block(_) -> no.
+
+translate_exception(badmatch, Val, Is, Words) ->
+ {yes,{badmatch,Val},fix_block(Is, Words)};
+translate_exception(case_clause, Val, Is, Words) ->
+ {yes,{case_end,Val},fix_block(Is, Words)};
+translate_exception(try_clause, Val, Is, Words) ->
+ {yes,{try_case_end,Val},fix_block(Is, Words)};
+translate_exception(_, _, _, _) -> no.
+
+fix_block(Is, 0) ->
+ reverse(Is);
+fix_block(Is0, Words) ->
+ [{set,[],[],{alloc,Live,{F1,F2,Needed,F3}}}|Is] = reverse(Is0),
+ [{set,[],[],{alloc,Live,{F1,F2,Needed-Words,F3}}}|Is].
+
+dig_out_block_fc([{set,[],[],{alloc,Live,_}}|Bl]) ->
+ dig_out_fc(Bl, Live-1, nil);
+dig_out_block_fc(_) -> no.
+
+dig_out_fc([{set,[Dst],[{x,Reg},Dst0],put_list}|Is], Reg, Dst0) ->
+ dig_out_fc(Is, Reg-1, Dst);
+dig_out_fc([{set,[{x,0}],[{atom,function_clause}],move}], -1, {x,1}) ->
+ {yes,function_clause};
+dig_out_fc(_, _, _) -> no.
diff --git a/lib/compiler/src/compile.erl b/lib/compiler/src/compile.erl
index a17a10046e..9b505ad15c 100644
--- a/lib/compiler/src/compile.erl
+++ b/lib/compiler/src/compile.erl
@@ -629,6 +629,8 @@ asm_passes() ->
[{unless,no_postopt,
[{pass,beam_block},
{iff,dblk,{listing,"block"}},
+ {unless,no_except,{pass,beam_except}},
+ {iff,dexcept,{listing,"except"}},
{unless,no_bopt,{pass,beam_bool}},
{iff,dbool,{listing,"bool"}},
{unless,no_topt,{pass,beam_type}},
diff --git a/lib/compiler/src/compiler.app.src b/lib/compiler/src/compiler.app.src
index fb06f2521c..1133882728 100644
--- a/lib/compiler/src/compiler.app.src
+++ b/lib/compiler/src/compiler.app.src
@@ -28,6 +28,7 @@
beam_dead,
beam_dict,
beam_disasm,
+ beam_except,
beam_flatten,
beam_jump,
beam_listing,
diff --git a/lib/compiler/src/v3_codegen.erl b/lib/compiler/src/v3_codegen.erl
index e7dae67085..6623485609 100644
--- a/lib/compiler/src/v3_codegen.erl
+++ b/lib/compiler/src/v3_codegen.erl
@@ -53,7 +53,6 @@
%% Main codegen structure.
-record(cg, {lcount=1, %Label counter
- finfo, %Function info label
bfail, %Fail label for BIFs
break, %Break label
recv, %Receive label
@@ -126,7 +125,6 @@ cg_fun(Les, Hvs, Vdb, AtomMod, NameArity, Anno, St0) ->
stk=[]}, 0, Vdb),
{B,_Aft,St} = cg_list(Les, 0, Vdb, Bef,
St3#cg{bfail=0,
- finfo=Fi,
ultimate_failure=UltimateMatchFail,
is_top_block=true}),
{Name,Arity} = NameArity,
@@ -147,8 +145,6 @@ cg({match,M,Rs}, Le, Vdb, Bef, St) ->
match_cg(M, Rs, Le, Vdb, Bef, St);
cg({guard_match,M,Rs}, Le, Vdb, Bef, St) ->
guard_match_cg(M, Rs, Le, Vdb, Bef, St);
-cg({match_fail,F}, Le, Vdb, Bef, St) ->
- match_fail_cg(F, Le, Vdb, Bef, St);
cg({call,Func,As,Rs}, Le, Vdb, Bef, St) ->
call_cg(Func, As, Rs, Le, Vdb, Bef, St);
cg({enter,Func,As}, Le, Vdb, Bef, St) ->
@@ -294,39 +290,6 @@ match_cg({block,Es}, Le, _Fail, Bef, St) ->
Int = clear_dead(Bef, Le#l.i, Le#l.vdb),
block_cg(Es, Le, Int, St).
-%% match_fail_cg(FailReason, Le, Vdb, StackReg, State) ->
-%% {[Ainstr],StackReg,State}.
-%% Generate code for the match_fail "call". N.B. there is no generic
-%% case for when the fail value has been created elsewhere.
-
-match_fail_cg({function_clause,As}, Le, Vdb, Bef, St) ->
- %% Must have the args in {x,0}, {x,1},...
- {Sis,Int} = cg_setup_call(As, Bef, Le#l.i, Vdb),
- {Sis ++ [{jump,{f,St#cg.finfo}}],
- Int#sr{reg=clear_regs(Int#sr.reg)},St};
-match_fail_cg({badmatch,Term}, Le, Vdb, Bef, St) ->
- R = cg_reg_arg(Term, Bef),
- Int0 = clear_dead(Bef, Le#l.i, Vdb),
- {Sis,Int} = adjust_stack(Int0, Le#l.i, Le#l.i+1, Vdb),
- {Sis ++ [line(Le),{badmatch,R}],
- Int#sr{reg=clear_regs(Int0#sr.reg)},St};
-match_fail_cg({case_clause,Reason}, Le, Vdb, Bef, St) ->
- R = cg_reg_arg(Reason, Bef),
- Int0 = clear_dead(Bef, Le#l.i, Vdb),
- {Sis,Int} = adjust_stack(Int0, Le#l.i, Le#l.i+1, Vdb),
- {Sis++[line(Le),{case_end,R}],
- Int#sr{reg=clear_regs(Bef#sr.reg)},St};
-match_fail_cg(if_clause, Le, Vdb, Bef, St) ->
- Int0 = clear_dead(Bef, Le#l.i, Vdb),
- {Sis,Int1} = adjust_stack(Int0, Le#l.i, Le#l.i+1, Vdb),
- {Sis++[line(Le),if_end],Int1#sr{reg=clear_regs(Int1#sr.reg)},St};
-match_fail_cg({try_clause,Reason}, Le, Vdb, Bef, St) ->
- R = cg_reg_arg(Reason, Bef),
- Int0 = clear_dead(Bef, Le#l.i, Vdb),
- {Sis,Int} = adjust_stack(Int0, Le#l.i, Le#l.i+1, Vdb),
- {Sis ++ [line(Le),{try_case_end,R}],
- Int#sr{reg=clear_regs(Int0#sr.reg)},St}.
-
%% bsm_rename_ctx([Clause], Var) -> [Clause]
%% We know from an annotation that the register for a binary can
%% be reused for the match context because the two are not truly
diff --git a/lib/compiler/src/v3_kernel.erl b/lib/compiler/src/v3_kernel.erl
index d76291f57f..f2eaa37617 100644
--- a/lib/compiler/src/v3_kernel.erl
+++ b/lib/compiler/src/v3_kernel.erl
@@ -83,6 +83,7 @@
-import(lists, [map/2,foldl/3,foldr/3,mapfoldl/3,splitwith/2,member/2,
keymember/3,keyfind/3]).
-import(ordsets, [add_element/2,del_element/2,union/2,union/1,subtract/2]).
+-import(cerl, [c_tuple/1]).
-include("core_parse.hrl").
-include("v3_kernel.hrl").
@@ -422,10 +423,11 @@ expr(#c_call{anno=A,module=M0,name=F0,args=Cargs}, Sub, St0) ->
end;
expr(#c_primop{anno=A,name=#c_literal{val=match_fail},args=Cargs0}, Sub, St0) ->
Cargs = translate_match_fail(Cargs0, Sub, A, St0),
- %% This special case will disappear.
{Kargs,Ap,St} = atomic_list(Cargs, Sub, St0),
Ar = length(Cargs),
- Call = #k_call{anno=A,op=#k_internal{name=match_fail,arity=Ar},args=Kargs},
+ Call = #k_call{anno=A,op=#k_remote{mod=#k_atom{val=erlang},
+ name=#k_atom{val=error},
+ arity=Ar},args=Kargs},
{Call,Ap,St};
expr(#c_primop{anno=A,name=#c_literal{val=N},args=Cargs}, Sub, St0) ->
{Kargs,Ap,St1} = atomic_list(Cargs, Sub, St0),
@@ -455,14 +457,14 @@ expr(#ireceive_accept{anno=A}, _Sub, St) -> {#k_receive_accept{anno=A},[],St}.
translate_match_fail(Args, Sub, Anno, St) ->
case Args of
[#c_tuple{es=[#c_literal{val=function_clause}|As]}] ->
- translate_match_fail_1(Anno, Args, As, Sub, St);
+ translate_match_fail_1(Anno, As, Sub, St);
[#c_literal{val=Tuple}] when is_tuple(Tuple) ->
%% The inliner may have created a literal out of
%% the original #c_tuple{}.
case tuple_to_list(Tuple) of
[function_clause|As0] ->
As = [#c_literal{val=E} || E <- As0],
- translate_match_fail_1(Anno, Args, As, Sub, St);
+ translate_match_fail_1(Anno, As, Sub, St);
_ ->
Args
end;
@@ -471,7 +473,7 @@ translate_match_fail(Args, Sub, Anno, St) ->
Args
end.
-translate_match_fail_1(Anno, Args, As, Sub, #kern{ff=FF}) ->
+translate_match_fail_1(Anno, As, Sub, #kern{ff=FF}) ->
AnnoFunc = case keyfind(function_name, 1, Anno) of
false ->
none; %Force rewrite.
@@ -481,10 +483,10 @@ translate_match_fail_1(Anno, Args, As, Sub, #kern{ff=FF}) ->
case {AnnoFunc,FF} of
{Same,Same} ->
%% Still in the correct function.
- Args;
+ translate_fc(As);
{{F,_},F} ->
%% Still in the correct function.
- Args;
+ translate_fc(As);
_ ->
%% Wrong function or no function_name annotation.
%%
@@ -493,9 +495,12 @@ translate_match_fail_1(Anno, Args, As, Sub, #kern{ff=FF}) ->
%% the current function). match_fail(function_clause) will
%% only work at the top level of the function it was originally
%% defined in, so we will need to rewrite it to a case_clause.
- [#c_tuple{es=[#c_literal{val=case_clause},#c_tuple{es=As}]}]
+ [c_tuple([#c_literal{val=case_clause},c_tuple(As)])]
end.
+translate_fc(Args) ->
+ [#c_literal{val=function_clause},make_list(Args)].
+
%% call_type(Module, Function, Arity) -> call | bif | apply | error.
%% Classify the call.
call_type(#c_literal{val=M}, #c_literal{val=F}, Ar) when is_atom(M), is_atom(F) ->
@@ -1494,7 +1499,6 @@ iletrec_funs_gen(Fs, FreeVs, St) ->
%% is_exit_expr(Kexpr) -> boolean().
%% Test whether Kexpr always exits and never returns.
-is_exit_expr(#k_call{op=#k_internal{name=match_fail,arity=1}}) -> true;
is_exit_expr(#k_receive_next{}) -> true;
is_exit_expr(_) -> false.
diff --git a/lib/compiler/src/v3_life.erl b/lib/compiler/src/v3_life.erl
index fac9a9843d..93f8034230 100644
--- a/lib/compiler/src/v3_life.erl
+++ b/lib/compiler/src/v3_life.erl
@@ -89,19 +89,8 @@ function(#k_fdef{anno=#k{a=Anno},func=F,arity=Ar,vars=Vs,body=Kb}) ->
end.
%% body(Kbody, I, Vdb) -> {[Expr],MaxI,Vdb}.
-%% Handle a body, need special cases for transforming match_fails.
-%% We KNOW that they only occur last in a body.
-
-body(#k_seq{arg=#k_put{anno=Pa,arg=Arg,ret=[R]},
- body=#k_enter{anno=Ea,op=#k_internal{name=match_fail,arity=1},
- args=[R]}},
- I, Vdb0) ->
- Vdb1 = use_vars(Pa#k.us, I, Vdb0), %All used here
- {[match_fail(Arg, I, Pa#k.a ++ Ea#k.a)],I,Vdb1};
-body(#k_enter{anno=Ea,op=#k_internal{name=match_fail,arity=1},args=[Arg]},
- I, Vdb0) ->
- Vdb1 = use_vars(Ea#k.us, I, Vdb0),
- {[match_fail(Arg, I, Ea#k.a)],I,Vdb1};
+%% Handle a body.
+
body(#k_seq{arg=Ke,body=Kb}, I, Vdb0) ->
%%ok = io:fwrite("life ~w:~p~n", [?LINE,{Ke,I,Vdb0}]),
A = get_kanno(Ke),
@@ -353,25 +342,6 @@ guard_clause(#k_guard_clause{anno=A,guard=Kg,body=Kb}, Ls, I, Ctxt, Vdb0) ->
i=I,vdb=use_vars((get_kanno(Kg))#k.us, I+2, Vdb1),
a=A#k.a}.
-%% match_fail(FailValue, I, Anno) -> Expr.
-%% Generate the correct match_fail instruction. N.B. there is no
-%% generic case for when the fail value has been created elsewhere.
-
-match_fail(#k_literal{anno=Anno,val={Atom,Val}}, I, A) when is_atom(Atom) ->
- match_fail(#k_tuple{anno=Anno,es=[#k_atom{val=Atom},#k_literal{val=Val}]}, I, A);
-match_fail(#k_literal{anno=Anno,val={Atom}}, I, A) when is_atom(Atom) ->
- match_fail(#k_tuple{anno=Anno,es=[#k_atom{val=Atom}]}, I, A);
-match_fail(#k_tuple{es=[#k_atom{val=function_clause}|As]}, I, A) ->
- #l{ke={match_fail,{function_clause,literal_list(As, [])}},i=I,a=A};
-match_fail(#k_tuple{es=[#k_atom{val=badmatch},Val]}, I, A) ->
- #l{ke={match_fail,{badmatch,literal(Val, [])}},i=I,a=A};
-match_fail(#k_tuple{es=[#k_atom{val=case_clause},Val]}, I, A) ->
- #l{ke={match_fail,{case_clause,literal(Val, [])}},i=I,a=A};
-match_fail(#k_atom{val=if_clause}, I, A) ->
- #l{ke={match_fail,if_clause},i=I,a=A};
-match_fail(#k_tuple{es=[#k_atom{val=try_clause},Val]}, I, A) ->
- #l{ke={match_fail,{try_clause,literal(Val, [])}},i=I,a=A}.
-
%% type(Ktype) -> Type.
type(k_literal) -> literal;
diff --git a/lib/compiler/test/Makefile b/lib/compiler/test/Makefile
index b90adaf917..2ea50b9112 100644
--- a/lib/compiler/test/Makefile
+++ b/lib/compiler/test/Makefile
@@ -10,6 +10,7 @@ MODULES= \
apply_SUITE \
beam_validator_SUITE \
beam_disasm_SUITE \
+ beam_expect_SUITE \
bs_bincomp_SUITE \
bs_bit_binaries_SUITE \
bs_construct_SUITE \
@@ -39,6 +40,7 @@ MODULES= \
NO_OPT= \
andor \
apply \
+ beam_expect \
bs_construct \
bs_match \
bs_utf \
diff --git a/lib/compiler/test/beam_expect_SUITE.erl b/lib/compiler/test/beam_expect_SUITE.erl
new file mode 100644
index 0000000000..6f216eac4f
--- /dev/null
+++ b/lib/compiler/test/beam_expect_SUITE.erl
@@ -0,0 +1,67 @@
+%%
+%% %CopyrightBegin%
+%%
+%% Copyright Ericsson AB 2011. All Rights Reserved.
+%%
+%% The contents of this file are subject to the Erlang Public License,
+%% Version 1.1, (the "License"); you may not use this file except in
+%% compliance with the License. You should have received a copy of the
+%% Erlang Public License along with this software. If not, it can be
+%% retrieved online at http://www.erlang.org/.
+%%
+%% Software distributed under the License is distributed on an "AS IS"
+%% basis, WITHOUT WARRANTY OF ANY KIND, either express or implied. See
+%% the License for the specific language governing rights and limitations
+%% under the License.
+%%
+%% %CopyrightEnd%
+%%
+-module(beam_expect_SUITE).
+
+-export([all/0, suite/0,groups/0,init_per_suite/1, end_per_suite/1,
+ init_per_group/2,end_per_group/2,
+ coverage/1]).
+
+suite() -> [{ct_hooks,[ts_install_cth]}].
+
+all() ->
+ [coverage].
+
+groups() ->
+ [].
+
+init_per_suite(Config) ->
+ Config.
+
+end_per_suite(_Config) ->
+ ok.
+
+init_per_group(_GroupName, Config) ->
+ Config.
+
+end_per_group(_GroupName, Config) ->
+ Config.
+
+coverage(_) ->
+ File = {file,"fake.erl"},
+ ok = fc(a),
+ {'EXIT',{function_clause,
+ [{?MODULE,fc,[[x]],[File,{line,2}]}|_]}} =
+ (catch fc([x])),
+ {'EXIT',{function_clause,
+ [{?MODULE,fc,[y],[File,{line,2}]}|_]}} =
+ (catch fc(y)),
+ {'EXIT',{function_clause,
+ [{?MODULE,fc,[[a,b,c]],[File,{line,6}]}|_]}} =
+ (catch fc([a,b,c])),
+
+ {'EXIT',{undef,[{erlang,error,[a,b,c],_}|_]}} =
+ (catch erlang:error(a, b, c)),
+ ok.
+
+-file("fake.erl", 1).
+fc(a) -> %Line 2
+ ok; %Line 3
+fc(L) when length(L) > 2 -> %Line 4
+ %% Not the same as a "real" function_clause error.
+ error(function_clause, [L]). %Line 6
diff --git a/lib/compiler/test/compilation_SUITE.erl b/lib/compiler/test/compilation_SUITE.erl
index 1343fbd1c9..1f17664b54 100644
--- a/lib/compiler/test/compilation_SUITE.erl
+++ b/lib/compiler/test/compilation_SUITE.erl
@@ -44,7 +44,7 @@ all() ->
trycatch_4, opt_crash, otp_5404, otp_5436, otp_5481,
otp_5553, otp_5632, otp_5714, otp_5872, otp_6121,
otp_6121a, otp_6121b, otp_7202, otp_7345, on_load,
- string_table,otp_8949_a,otp_8949_a].
+ string_table,otp_8949_a,otp_8949_a,split_cases].
groups() ->
[{vsn, [], [vsn_1, vsn_2, vsn_3]}].
@@ -657,5 +657,19 @@ otp_8949_b(A, B) ->
id(Var)
end.
+split_cases(_) ->
+ dummy1 = do_split_cases(x),
+ {'EXIT',{{badmatch,b},_}} = (catch do_split_cases(y)),
+ ok.
+
+do_split_cases(A) ->
+ case A of
+ x ->
+ Z = dummy1;
+ _ ->
+ Z = dummy2,
+ a=b
+ end,
+ Z.
id(I) -> I.
diff --git a/lib/compiler/test/misc_SUITE.erl b/lib/compiler/test/misc_SUITE.erl
index 9b414cade6..5e13a93c52 100644
--- a/lib/compiler/test/misc_SUITE.erl
+++ b/lib/compiler/test/misc_SUITE.erl
@@ -190,6 +190,15 @@ silly_coverage(Config) when is_list(Config) ->
{label,2}|non_proper_list]}],99},
?line expect_error(fun() -> beam_block:module(BlockInput, []) end),
+ %% beam_except
+ ExceptInput = {?MODULE,[{foo,0}],[],
+ [{function,foo,0,2,
+ [{label,1},
+ {line,loc},
+ {func_info,{atom,?MODULE},{atom,foo},0},
+ {label,2}|non_proper_list]}],99},
+ expect_error(fun() -> beam_except:module(ExceptInput, []) end),
+
%% beam_bool
BoolInput = {?MODULE,[{foo,0}],[],
[{function,foo,0,2,
@@ -253,8 +262,15 @@ expect_error(Fun) ->
io:format("~p", [Any]),
?t:fail(call_was_supposed_to_fail)
catch
- _:_ ->
- io:format("~p\n", [erlang:get_stacktrace()])
+ Class:Reason ->
+ Stk = erlang:get_stacktrace(),
+ io:format("~p:~p\n~p\n", [Class,Reason,Stk]),
+ case {Class,Reason} of
+ {error,undef} ->
+ ?t:fail(not_supposed_to_fail_with_undef);
+ {_,_} ->
+ ok
+ end
end.
confused_literals(Config) when is_list(Config) ->
diff --git a/lib/erl_docgen/priv/xsl/db_html.xsl b/lib/erl_docgen/priv/xsl/db_html.xsl
index bdef7bfd3d..3f662327e6 100644
--- a/lib/erl_docgen/priv/xsl/db_html.xsl
+++ b/lib/erl_docgen/priv/xsl/db_html.xsl
@@ -1854,18 +1854,24 @@
<xsl:choose>
<xsl:when test="string-length($filepart) > 0">
- <xsl:variable name="modulepart"><xsl:value-of select="substring-before($filepart, ':')"/></xsl:variable>
+ <!-- "Filepart#Linkpart" (or "Filepart#") -->
+ <xsl:variable name="app_part"><xsl:value-of select="substring-before($filepart, ':')"/></xsl:variable>
<xsl:choose>
- <xsl:when test="string-length($modulepart) > 0">
- <xsl:variable name="filepart1"><xsl:value-of select="substring-after($filepart, ':')"/></xsl:variable>
- <span class="bold_code"><a href="javascript:erlhref('{$topdocdir}/../','{$modulepart}','{$filepart1}.html#{$linkpart}');"><xsl:apply-templates/></a></span>
+ <xsl:when test="string-length($app_part) > 0">
+ <!-- "AppPart:ModPart#Linkpart" -->
+ <xsl:variable name="mod_part"><xsl:value-of select="substring-after($filepart, ':')"/></xsl:variable>
+ <span class="bold_code"><a href="javascript:erlhref('{$topdocdir}/../','{$app_part}','{$mod_part}.html#{$linkpart}');"><xsl:apply-templates/></a></span>
</xsl:when>
<xsl:otherwise>
+ <!-- "Filepart#Linkpart (there is no ':' in Filepart) -->
+ <xsl:variable name="minus_prefix"
+ select="substring-before($linkpart, '-')"/>
<xsl:choose>
- <!-- Dialyzer seealso (the application is unknown) -->
- <xsl:when test="string-length($specs_file) > 0
+ <xsl:when test="$minus_prefix = 'type'
+ and string-length($specs_file) > 0
and count($i/specs/module[@name=$filepart]) = 0">
- <!-- Deemed to slow; use key() instead
+ <!-- Dialyzer seealso (the application is unknown) -->
+ <!-- Following code deemed too slow; use key() instead
<xsl:variable name="app"
select="$m2a/mod2app/module[@name=$filepart]"/>
-->
@@ -1877,41 +1883,45 @@
<span class="bold_code"><a href="javascript:erlhref('{$topdocdir}/../','{$app}','{$filepart}.html#{$linkpart}');"><xsl:value-of select="$this"/></a></span>
</xsl:when>
<xsl:otherwise>
- <!-- Unknown application; no link -->
- <xsl:value-of select="$this"/>
+ <!-- Unknown application -->
+ <xsl:message terminate="yes">
+ Error <xsl:value-of select="$filepart"/>: cannot find module exporting type
+ </xsl:message>
</xsl:otherwise>
</xsl:choose>
</xsl:for-each>
</xsl:when>
<xsl:when test="string-length($linkpart) > 0">
+ <!-- Still Filepart#Linkpart (there is no ':' in Filepart -->
<span class="bold_code"><a href="{$filepart}.html#{$linkpart}"><xsl:apply-templates/></a></span>
</xsl:when>
<xsl:otherwise>
+ <!-- "Filepart#" (there is no ':' in Filepart -->
<span class="bold_code"><a href="{$filepart}.html"><xsl:apply-templates/></a></span>
</xsl:otherwise>
</xsl:choose>
</xsl:otherwise>
</xsl:choose>
+ </xsl:when> <!-- string-length($filepart) > 0 -->
+ <xsl:when test="string-length($linkpart) > 0">
+ <!-- "#Linkpart" -->
+ <span class="bold_code"><a href="#{$linkpart}"><xsl:apply-templates/></a></span>
</xsl:when>
<xsl:otherwise>
- <xsl:choose>
- <xsl:when test="string-length($linkpart) > 0">
- <span class="bold_code"><a href="#{$linkpart}"><xsl:apply-templates/></a></span>
- </xsl:when>
- <xsl:otherwise>
- <xsl:variable name="modulepart"><xsl:value-of select="substring-before(@marker, ':')"/></xsl:variable>
+ <!-- "AppPart:Mod" or "Mod" (there is no '#') -->
+ <xsl:variable name="app_part"><xsl:value-of select="substring-before(@marker, ':')"/></xsl:variable>
- <xsl:choose>
- <xsl:when test="string-length($modulepart) > 0">
- <xsl:variable name="filepart1"><xsl:value-of select="substring-after(@marker, ':')"/></xsl:variable>
- <span class="bold_code"><a href="javascript:erlhref('{$topdocdir}/../','{$modulepart}','{$filepart1}.html');"><xsl:apply-templates/></a></span>
- </xsl:when>
- <xsl:otherwise>
- <span class="bold_code"><a href="{@marker}.html"><xsl:apply-templates/></a></span>
- </xsl:otherwise>
- </xsl:choose>
- </xsl:otherwise>
- </xsl:choose>
+ <xsl:choose>
+ <xsl:when test="string-length($app_part) > 0">
+ <!-- "App:Mod" -->
+ <xsl:variable name="mod_part"><xsl:value-of select="substring-after(@marker, ':')"/></xsl:variable>
+ <span class="bold_code"><a href="javascript:erlhref('{$topdocdir}/../','{$app_part}','{$mod_part}.html');"><xsl:apply-templates/></a></span>
+ </xsl:when>
+ <xsl:otherwise>
+ <!-- "Mod" -->
+ <span class="bold_code"><a href="{@marker}.html"><xsl:apply-templates/></a></span>
+ </xsl:otherwise>
+ </xsl:choose>
</xsl:otherwise>
</xsl:choose>
diff --git a/lib/erl_interface/src/misc/ei_format.c b/lib/erl_interface/src/misc/ei_format.c
index cf50f12451..c1e5d998e4 100644
--- a/lib/erl_interface/src/misc/ei_format.c
+++ b/lib/erl_interface/src/misc/ei_format.c
@@ -149,7 +149,7 @@ static int pdigit(const char** fmt, ei_x_buff* x)
{
const char* start = *fmt;
char c;
- int len, dotp=0;
+ int dotp=0;
double d;
long l;
@@ -166,7 +166,6 @@ static int pdigit(const char** fmt, ei_x_buff* x)
break;
}
--(*fmt);
- len = *fmt - start;
if (dotp) {
sscanf(start, "%lf", &d);
return ei_x_encode_double(x, d);
diff --git a/lib/hipe/flow/cfg.hrl b/lib/hipe/flow/cfg.hrl
index 62f47a707a..79fe6162ad 100644
--- a/lib/hipe/flow/cfg.hrl
+++ b/lib/hipe/flow/cfg.hrl
@@ -36,8 +36,9 @@
is_closure :: boolean(),
closure_arity :: arity(),
is_leaf :: boolean(),
- params, % :: list()
- info = []}). %% this field seems not needed; take out??
+ params :: any(), %% any() since type information is missing?
+ info = [] :: list() %% this field seems not needed; take out??
+ }).
%%
%% Data is a triple with a dict of constants, a list of labels and an integer
diff --git a/lib/jinterface/java_src/com/ericsson/otp/erlang/OtpMbox.java b/lib/jinterface/java_src/com/ericsson/otp/erlang/OtpMbox.java
index 71a419497a..d6f319d378 100644
--- a/lib/jinterface/java_src/com/ericsson/otp/erlang/OtpMbox.java
+++ b/lib/jinterface/java_src/com/ericsson/otp/erlang/OtpMbox.java
@@ -31,7 +31,7 @@ package com.ericsson.otp.erlang;
* the recipient of the message. When sending messages to other mailboxes, the
* recipient can only respond if the sender includes the pid as part of the
* message contents. The sender can determine his own pid by calling
- * {@link #self self()}.
+ * {@link #self() self()}.
* </p>
*
* <p>
diff --git a/lib/jinterface/java_src/com/ericsson/otp/erlang/OtpNode.java b/lib/jinterface/java_src/com/ericsson/otp/erlang/OtpNode.java
index d499fae3fb..be7c8e5b1a 100644
--- a/lib/jinterface/java_src/com/ericsson/otp/erlang/OtpNode.java
+++ b/lib/jinterface/java_src/com/ericsson/otp/erlang/OtpNode.java
@@ -182,7 +182,7 @@ public class OtpNode extends OtpLocalNode {
* Create an unnamed {@link OtpMbox mailbox} that can be used to send and
* receive messages with other, similar mailboxes and with Erlang processes.
* Messages can be sent to this mailbox by using its associated
- * {@link OtpMbox#self pid}.
+ * {@link OtpMbox#self() pid}.
*
* @return a mailbox.
*/
@@ -248,7 +248,7 @@ public class OtpNode extends OtpLocalNode {
* Create an named mailbox that can be used to send and receive messages
* with other, similar mailboxes and with Erlang processes. Messages can be
* sent to this mailbox by using its registered name or the associated
- * {@link OtpMbox#self pid}.
+ * {@link OtpMbox#self() pid}.
*
* @param name
* a name to register for this mailbox. The name must be unique
diff --git a/lib/kernel/test/inet_res_SUITE_data/run-named b/lib/kernel/test/inet_res_SUITE_data/run-named
index eeca680ab5..619e456b3f 100755
--- a/lib/kernel/test/inet_res_SUITE_data/run-named
+++ b/lib/kernel/test/inet_res_SUITE_data/run-named
@@ -47,7 +47,6 @@ CONF_FILE=named.conf
INC_FILE=named_inc.conf
PID_FILE=named.pid
LOG_FILE=named.log
-EXIT_FILE=named.exit
error () {
r=$?
@@ -150,7 +149,6 @@ cat >>"$CONF_FILE" <<-CONF_FILE
( cd "$SRCDIR" && ls -1 ) | while read f; do
cp -fp "$SRCDIR/$f" .
done
-rm -f "$EXIT_FILE"
# Start nameserver
echo "Cwd: `pwd`"
@@ -158,19 +156,20 @@ echo "Nameserver: $NAMED_VER"
echo "Port: $2"
echo "ZoneDir: $3"
echo "Command: $NAMED $NAMED_FG -c $CONF_FILE"
-($NAMED $NAMED_FG -c "$CONF_FILE" >"$LOG_FILE" 2>&1 </dev/null; \
- echo "$?" >"$EXIT_FILE")&
+$NAMED $NAMED_FG -c "$CONF_FILE" >"$LOG_FILE" 2>&1 </dev/null &
NAMED_PID=$!
+echo "Pid: $NAMED_PID"
trap "kill -TERM $NAMED_PID >/dev/null 2>&1; wait $NAMED_PID >/dev/null 2>&1" \
0 1 2 3 15
+
sleep 5 # Give name server time to load its zone files
-if [ -f "$EXIT_FILE" ]; then
- ERROR="`cat "$EXIT_FILE"`"
- (exit "$ERROR")& error "$NAMED returned $ERROR on start"
-else
+
+if ps p $NAMED_PID; then
echo "Running: Enter \`\`quit'' to terminate nameserver[$NAMED_PID]..."
while read LINE; do
test :"$LINE" = :'quit' && break
done
+else
+ wait $NAMED_PID; error "$NAMED failed to start"
fi
echo "Closing: Terminating nameserver..."
diff --git a/lib/orber/src/orber_tb.erl b/lib/orber/src/orber_tb.erl
index eee67296d7..d3e3a8497d 100644
--- a/lib/orber/src/orber_tb.erl
+++ b/lib/orber/src/orber_tb.erl
@@ -209,7 +209,7 @@ check_illegal_tcp_options([binary |T], IllegalOpts) ->
check_illegal_tcp_options(T,[binary |IllegalOpts]);
check_illegal_tcp_options([{reuseaddr, V} |T], IllegalOpts) ->
check_illegal_tcp_options(T,[{reuseaddr, V} |IllegalOpts]);
-check_illegal_tcp_options([H|T], IllegalOpts) ->
+check_illegal_tcp_options([_H|T], IllegalOpts) ->
check_illegal_tcp_options(T, IllegalOpts).
%%----------------------------------------------------------------------
diff --git a/lib/orber/test/orber_acl_SUITE.erl b/lib/orber/test/orber_acl_SUITE.erl
index b43a00be19..49107cde84 100644
--- a/lib/orber/test/orber_acl_SUITE.erl
+++ b/lib/orber/test/orber_acl_SUITE.erl
@@ -80,7 +80,7 @@ end_per_group(_GroupName, Config) ->
%%-----------------------------------------------------------------
init_per_suite(Config) ->
if
- list(Config) ->
+ is_list(Config) ->
Config;
true ->
exit("Config not a list")
diff --git a/lib/public_key/doc/src/public_key.xml b/lib/public_key/doc/src/public_key.xml
index 821e7a2300..0b6673e826 100644
--- a/lib/public_key/doc/src/public_key.xml
+++ b/lib/public_key/doc/src/public_key.xml
@@ -453,7 +453,7 @@
<desc>
<p>Encodes a list of ssh file entries (public keys and attributes) to a binary. Possible
attributes depends on the file type, see <seealso
- marker="ssh_decode"> ssh_decode/2 </seealso></p>
+ marker="#ssh_decode-2"> ssh_decode/2 </seealso></p>
</desc>
</func>
diff --git a/lib/runtime_tools/c_src/trace_ip_drv.c b/lib/runtime_tools/c_src/trace_ip_drv.c
index 5396b8afa9..7ae6c1b329 100644
--- a/lib/runtime_tools/c_src/trace_ip_drv.c
+++ b/lib/runtime_tools/c_src/trace_ip_drv.c
@@ -212,11 +212,11 @@ static TraceIpData *lookup_data_by_port(int portno);
static int set_nonblocking(SOCKET sock);
static TraceIpMessage *make_buffer(int datasiz, unsigned char op,
unsigned number);
-static void enque_message(TraceIpData *data, unsigned char *buff, int bufflen,
+static void enque_message(TraceIpData *data, char *buff, int bufflen,
int byteswritten);
static void clean_que(TraceIpData *data);
static void close_client(TraceIpData *data);
-static int trywrite(TraceIpData *data, unsigned char *buff, int bufflen);
+static int trywrite(TraceIpData *data, char *buff, int bufflen);
static SOCKET my_accept(SOCKET sock);
static void close_unlink_port(TraceIpData *data);
enum MySelectOp { SELECT_ON, SELECT_OFF, SELECT_CLOSE };
@@ -518,7 +518,7 @@ static void trace_ip_ready_output(ErlDrvData handle, ErlDrvEvent fd)
tim = data->que[data->questart];
towrite = tim->siz - tim->written;
while((res = write_until_done(data->fd,
- tim->bin + tim->written, towrite))
+ (char *)tim->bin + tim->written, towrite))
== towrite) {
driver_free(tim);
data->que[data->questart] = NULL;
@@ -561,7 +561,7 @@ static ErlDrvSSizeT trace_ip_control(ErlDrvData handle,
TraceIpData *data = (TraceIpData *) handle;
ErlDrvBinary *b = my_alloc_binary(3);
b->orig_bytes[0] = '\0'; /* OK */
- put_be16(data->listen_portno, &(b->orig_bytes[1]));
+ put_be16(data->listen_portno, (unsigned char *)&(b->orig_bytes[1]));
*res = void_ptr = b;
return 0;
}
@@ -696,7 +696,7 @@ static TraceIpMessage *make_buffer(int datasiz, unsigned char op,
** Add message to que, discarding in a politically correct way...
** The FLAG_DROP_OLDEST is currently ingored...
*/
-static void enque_message(TraceIpData *data, unsigned char *buff, int bufflen,
+static void enque_message(TraceIpData *data, char *buff, int bufflen,
int byteswritten)
{
int diff = data->questop - data->questart;
@@ -763,13 +763,13 @@ static void close_client(TraceIpData *data)
** Try to write a message from erlang directly (only called when que is empty
** and client is connected)
*/
-static int trywrite(TraceIpData *data, unsigned char *buff, int bufflen)
+static int trywrite(TraceIpData *data, char *buff, int bufflen)
{
- unsigned char op[5];
+ char op[5];
int res;
op[0] = OP_BINARY;
- put_be32(bufflen, op + 1);
+ put_be32(bufflen, (unsigned char *)op + 1);
if ((res = write_until_done(data->fd, op, 5)) < 0) {
close_client(data);
@@ -793,7 +793,11 @@ static int trywrite(TraceIpData *data, unsigned char *buff, int bufflen)
static SOCKET my_accept(SOCKET sock)
{
struct sockaddr_in sin;
- int sin_size = sizeof(sin);
+#ifdef HAVE_SOCKLEN_T
+ socklen_t sin_size = sizeof(sin);
+#else
+ int sin_size = (int) sizeof(sin);
+#endif
return accept(sock, (struct sockaddr *) &sin, &sin_size);
}
diff --git a/lib/sasl/doc/src/appup.xml b/lib/sasl/doc/src/appup.xml
index 195f9fe1d3..770b7c2492 100644
--- a/lib/sasl/doc/src/appup.xml
+++ b/lib/sasl/doc/src/appup.xml
@@ -332,7 +332,7 @@ restart_new_emulator
<p>An info report will be written when the upgrade is
completed. To programatically find out if the upgrade is
complete,
- call <seealso marker="release_handler#which_release/0">
+ call <seealso marker="release_handler#which_releases/0">
release_handler:which_releases</seealso> and check if the
expected release has status <c>current</c>.</p>
<p>The new release must still be made permanent after the upgrade
diff --git a/lib/stdlib/doc/src/io.xml b/lib/stdlib/doc/src/io.xml
index 667d758e29..e6d262466c 100644
--- a/lib/stdlib/doc/src/io.xml
+++ b/lib/stdlib/doc/src/io.xml
@@ -70,7 +70,7 @@
<desc>
<p>Either <c>standard_io</c>, <c>standard_error</c>, a
registered name, or a pid handling IO protocols (returned from
- <seealso marker="file#open/2">file:open/2</seealso>).</p>
+ <seealso marker="kernel:file#open/2">file:open/2</seealso>).</p>
</desc>
</datatype>
<datatype>
diff --git a/lib/syntax_tools/src/erl_syntax.erl b/lib/syntax_tools/src/erl_syntax.erl
index 7f58fda519..4e2235d552 100644
--- a/lib/syntax_tools/src/erl_syntax.erl
+++ b/lib/syntax_tools/src/erl_syntax.erl
@@ -3523,7 +3523,10 @@ qualified_name_segments(Node) ->
%% @see is_form/1
%% @see rule/2
--record(function, {name, clauses}).
+-record(function, {
+ name :: atom(),
+ clauses :: list()
+ }).
%% XXX: This one is problematic because there is a tuple with the same
%% tag and size that comes from 'erl_parse'
%% -record(function, {name :: syntaxTree(), clauses :: [syntaxTree()]}).
@@ -6100,7 +6103,7 @@ implicit_fun_name(Node) ->
arity_qualifier(
set_pos(atom(Atom), Pos),
set_pos(integer(Arity), Pos)));
- {'fun', Pos, {function, Module, Atom, Arity}} ->
+ {'fun', _Pos, {function, Module, Atom, Arity}} ->
%% New in R15: fun M:F/A.
module_qualifier(Module, arity_qualifier(Atom, Arity));
Node1 ->
diff --git a/lib/tools/c_src/erl_memory.c b/lib/tools/c_src/erl_memory.c
index 872d55e789..5239176d03 100644
--- a/lib/tools/c_src/erl_memory.c
+++ b/lib/tools/c_src/erl_memory.c
@@ -1224,7 +1224,7 @@ print_main_footer(em_state *state)
switch (state->info.stop_reason) {
case EMTP_STOP:
- p += sprintf(p, stop_str);
+ p += sprintf(p, "%s", stop_str);
break;
case EMTP_EXIT:
p += sprintf(p, exit_str, state->info.exit_status);
@@ -2339,7 +2339,7 @@ usage(char *sw, char *error)
if (error)
exit(1);
else {
- char *help_str =
+ fprintf(filep,
"\n"
" [] - switch is allowed any number of times\n"
" {} - switch is allowed at most one time\n"
@@ -2370,8 +2370,7 @@ usage(char *sw, char *error)
" " SW_CHAR "o - display operation count values\n"
" " SW_CHAR "p <P> - set listen port to <P>\n"
" " SW_CHAR "t - display info about total values\n"
- " " SW_CHAR "v - verbose output\n";
- fprintf(filep, help_str);
+ " " SW_CHAR "v - verbose output\n");
exit(0);
}
diff --git a/lib/xmerl/src/xmerl_uri.erl b/lib/xmerl/src/xmerl_uri.erl
index a0c6f1c2a7..1864651491 100644
--- a/lib/xmerl/src/xmerl_uri.erl
+++ b/lib/xmerl/src/xmerl_uri.erl
@@ -358,7 +358,7 @@ scan_host(C0) ->
%% Hex3=<?HEX;
%% Hex4=<?HEX ->
%% {C1,lists:reverse(lists:append(IPv6address))};
- {C1,Hostname,[A|_HostF]} ->
+ {C1,Hostname,[_A|_HostF]} ->
{C1,lists:reverse(lists:append(Hostname))}
%% _ ->
%% {error,no_host}