aboutsummaryrefslogtreecommitdiffstats
path: root/lib
diff options
context:
space:
mode:
Diffstat (limited to 'lib')
-rw-r--r--lib/Makefile21
-rw-r--r--lib/asn1/Makefile2
-rw-r--r--lib/asn1/c_src/Makefile7
-rw-r--r--lib/asn1/c_src/asn1_erl_nif.c1
-rw-r--r--lib/asn1/doc/src/asn1_ug.xml928
-rw-r--r--lib/asn1/doc/src/asn1ct.xml32
-rw-r--r--lib/asn1/doc/src/asn1rt.xml30
-rw-r--r--lib/asn1/doc/src/notes.xml106
-rw-r--r--lib/asn1/src/asn1.app.src3
-rw-r--r--lib/asn1/src/asn1.appup.src30
-rw-r--r--lib/asn1/src/asn1ct.erl58
-rw-r--r--lib/asn1/src/asn1ct_check.erl331
-rw-r--r--lib/asn1/src/asn1ct_constructed_per.erl178
-rw-r--r--lib/asn1/src/asn1ct_func.erl2
-rw-r--r--lib/asn1/src/asn1ct_gen.erl52
-rw-r--r--lib/asn1/src/asn1ct_gen_ber_bin_v2.erl122
-rw-r--r--lib/asn1/src/asn1ct_gen_per.erl28
-rw-r--r--lib/asn1/src/asn1ct_imm.erl881
-rw-r--r--lib/asn1/src/asn1ct_table.erl34
-rw-r--r--lib/asn1/src/asn1ct_tok.erl2
-rw-r--r--lib/asn1/src/asn1ct_value.erl9
-rw-r--r--lib/asn1/src/asn1rt.erl3
-rw-r--r--lib/asn1/src/asn1rtt_ber.erl65
-rw-r--r--lib/asn1/src/asn1rtt_ext.erl2
-rw-r--r--lib/asn1/src/asn1rtt_per_common.erl37
-rw-r--r--lib/asn1/test/asn1_SUITE.erl54
-rw-r--r--lib/asn1/test/asn1_SUITE_data/EnumExt.asn12
-rw-r--r--lib/asn1/test/asn1_SUITE_data/INSTANCEOF.asn14
-rw-r--r--lib/asn1/test/asn1_SUITE_data/ImportsFrom.asn114
-rw-r--r--lib/asn1/test/asn1_SUITE_data/ImportsFrom2.asn17
-rw-r--r--lib/asn1/test/asn1_SUITE_data/ImportsFrom3.asn14
-rw-r--r--lib/asn1/test/asn1_SUITE_data/SeqPrim.asn17
-rw-r--r--lib/asn1/test/asn1_SUITE_data/TCAPPackage_msg.erl36
-rw-r--r--lib/asn1/test/asn1_SUITE_data/extensionAdditionGroup.erl4
-rw-r--r--lib/asn1/test/asn1_appup_test.erl359
-rw-r--r--lib/asn1/test/error_SUITE.erl108
-rw-r--r--lib/asn1/test/h323test.erl14
-rw-r--r--lib/asn1/test/testChoExtension.erl4
-rw-r--r--lib/asn1/test/testChoExternal.erl20
-rw-r--r--lib/asn1/test/testChoOptional.erl12
-rw-r--r--lib/asn1/test/testChoRecursive.erl4
-rw-r--r--lib/asn1/test/testChoTypeRefCho.erl2
-rw-r--r--lib/asn1/test/testChoTypeRefPrim.erl22
-rw-r--r--lib/asn1/test/testChoTypeRefSeq.erl27
-rw-r--r--lib/asn1/test/testChoTypeRefSet.erl27
-rw-r--r--lib/asn1/test/testConstraints.erl8
-rw-r--r--lib/asn1/test/testEnumExt.erl4
-rw-r--r--lib/asn1/test/testFragmented.erl4
-rw-r--r--lib/asn1/test/testInfObj.erl8
-rw-r--r--lib/asn1/test/testMergeCompile.erl44
-rw-r--r--lib/asn1/test/testParameterizedInfObj.erl78
-rw-r--r--lib/asn1/test/testPrimExternal.erl2
-rw-r--r--lib/asn1/test/testPrimStrings.erl319
-rw-r--r--lib/asn1/test/testSeqExtension.erl4
-rw-r--r--lib/asn1/test/testSeqExternal.erl18
-rw-r--r--lib/asn1/test/testSeqOf.erl26
-rw-r--r--lib/asn1/test/testSeqOfExternal.erl63
-rw-r--r--lib/asn1/test/testSeqOfTag.erl72
-rw-r--r--lib/asn1/test/testSeqPrim.erl4
-rw-r--r--lib/asn1/test/testSeqSetDefaultVal.erl15
-rw-r--r--lib/asn1/test/testSeqTag.erl36
-rw-r--r--lib/asn1/test/testSeqTypeRefCho.erl8
-rw-r--r--lib/asn1/test/testSeqTypeRefPrim.erl18
-rw-r--r--lib/asn1/test/testSeqTypeRefSeq.erl18
-rw-r--r--lib/asn1/test/testSeqTypeRefSet.erl18
-rw-r--r--lib/asn1/test/testSetExternal.erl18
-rw-r--r--lib/asn1/test/testSetOf.erl6
-rw-r--r--lib/asn1/test/testSetOfExternal.erl54
-rw-r--r--lib/asn1/test/testSetOfTag.erl72
-rw-r--r--lib/asn1/test/testSetTag.erl36
-rw-r--r--lib/asn1/test/testSetTypeRefCho.erl8
-rw-r--r--lib/asn1/test/testSetTypeRefPrim.erl18
-rw-r--r--lib/asn1/test/testSetTypeRefSeq.erl18
-rw-r--r--lib/asn1/test/testSetTypeRefSet.erl18
-rw-r--r--lib/asn1/test/testTimer.erl242
-rw-r--r--lib/asn1/test/testTypeValueNotation.erl2
-rw-r--r--lib/asn1/test/test_compile_options.erl2
-rw-r--r--lib/asn1/vsn.mk2
-rw-r--r--[-rwxr-xr-x]lib/common_test/configure.in0
-rw-r--r--lib/common_test/doc/src/ct_hooks.xml50
-rw-r--r--lib/common_test/doc/src/ct_run.xml3
-rw-r--r--lib/common_test/doc/src/event_handler_chapter.xml29
-rw-r--r--lib/common_test/doc/src/notes.xml178
-rw-r--r--lib/common_test/doc/src/run_test_chapter.xml20
-rw-r--r--[-rwxr-xr-x]lib/common_test/priv/run_test.in0
-rw-r--r--lib/common_test/src/common_test.app.src7
-rw-r--r--lib/common_test/src/common_test.appup.src22
-rw-r--r--lib/common_test/src/ct.erl5
-rw-r--r--lib/common_test/src/ct_conn_log_h.erl98
-rw-r--r--lib/common_test/src/ct_framework.erl85
-rw-r--r--lib/common_test/src/ct_gen_conn.erl26
-rw-r--r--lib/common_test/src/ct_hooks.erl38
-rw-r--r--lib/common_test/src/ct_logs.erl2
-rw-r--r--lib/common_test/src/ct_netconfc.erl54
-rw-r--r--lib/common_test/src/ct_run.erl65
-rw-r--r--lib/common_test/src/ct_telnet.erl727
-rw-r--r--lib/common_test/src/ct_telnet_client.erl137
-rw-r--r--lib/common_test/src/ct_testspec.erl7
-rw-r--r--lib/common_test/src/ct_util.erl45
-rw-r--r--lib/common_test/src/ct_util.hrl9
-rw-r--r--lib/common_test/src/cth_conn_log.erl80
-rw-r--r--lib/common_test/src/cth_surefire.erl4
-rw-r--r--lib/common_test/src/unix_telnet.erl82
-rw-r--r--lib/common_test/test/ct_config_info_SUITE.erl4
-rw-r--r--lib/common_test/test/ct_error_SUITE.erl113
-rw-r--r--lib/common_test/test/ct_error_SUITE_data/error/test/config_func_error_1_SUITE.erl138
-rw-r--r--lib/common_test/test/ct_group_info_SUITE.erl30
-rw-r--r--lib/common_test/test/ct_groups_spec_SUITE.erl75
-rw-r--r--lib/common_test/test/ct_hooks_SUITE.erl2
-rw-r--r--lib/common_test/test/ct_hooks_SUITE_data/cth/tests/empty_cth.erl14
-rw-r--r--lib/common_test/test/ct_master_SUITE.erl3
-rw-r--r--lib/common_test/test/ct_repeat_1_SUITE.erl35
-rw-r--r--lib/common_test/test/ct_repeat_testrun_SUITE.erl4
-rw-r--r--lib/common_test/test/ct_sequence_1_SUITE.erl19
-rw-r--r--lib/common_test/test/ct_skip_SUITE.erl118
-rw-r--r--lib/common_test/test/ct_surefire_SUITE.erl2
-rw-r--r--lib/common_test/test/ct_telnet_SUITE.erl166
-rw-r--r--lib/common_test/test/ct_telnet_SUITE_data/ct_telnet_basic_SUITE.erl105
-rw-r--r--lib/common_test/test/ct_telnet_SUITE_data/ct_telnet_own_server_SUITE.erl153
-rw-r--r--lib/common_test/test/ct_telnet_SUITE_data/ct_telnet_timetrap_SUITE.erl4
-rw-r--r--lib/common_test/test/ct_test_server_if_1_SUITE.erl8
-rw-r--r--lib/common_test/test/ct_test_support.erl52
-rw-r--r--lib/common_test/test/ct_testspec_1_SUITE.erl92
-rw-r--r--lib/common_test/test/telnet_server.erl111
-rw-r--r--lib/common_test/vsn.mk2
-rw-r--r--lib/compiler/doc/src/compile.xml15
-rw-r--r--lib/compiler/doc/src/notes.xml227
-rw-r--r--lib/compiler/src/beam_a.erl6
-rw-r--r--lib/compiler/src/beam_asm.erl2
-rw-r--r--lib/compiler/src/beam_block.erl12
-rw-r--r--lib/compiler/src/beam_bool.erl29
-rw-r--r--lib/compiler/src/beam_bsm.erl1
-rw-r--r--lib/compiler/src/beam_clean.erl30
-rw-r--r--lib/compiler/src/beam_dict.erl20
-rw-r--r--lib/compiler/src/beam_disasm.erl55
-rw-r--r--lib/compiler/src/beam_except.erl10
-rw-r--r--lib/compiler/src/beam_flatten.erl4
-rw-r--r--lib/compiler/src/beam_jump.erl6
-rw-r--r--lib/compiler/src/beam_split.erl7
-rw-r--r--lib/compiler/src/beam_utils.erl4
-rw-r--r--lib/compiler/src/beam_validator.erl100
-rw-r--r--lib/compiler/src/beam_z.erl16
-rw-r--r--lib/compiler/src/cerl.erl167
-rw-r--r--lib/compiler/src/cerl_clauses.erl23
-rw-r--r--lib/compiler/src/cerl_inline.erl65
-rw-r--r--lib/compiler/src/cerl_trees.erl48
-rw-r--r--lib/compiler/src/compile.erl98
-rw-r--r--lib/compiler/src/compiler.app.src4
-rw-r--r--lib/compiler/src/compiler.appup.src22
-rw-r--r--lib/compiler/src/core_lib.erl15
-rw-r--r--lib/compiler/src/core_lint.erl46
-rw-r--r--lib/compiler/src/core_parse.hrl11
-rw-r--r--lib/compiler/src/core_parse.yrl37
-rw-r--r--lib/compiler/src/core_pp.erl31
-rw-r--r--lib/compiler/src/core_scan.erl2
-rw-r--r--lib/compiler/src/erl_bifs.erl1
-rwxr-xr-xlib/compiler/src/genop.tab8
-rw-r--r--lib/compiler/src/rec_env.erl5
-rw-r--r--lib/compiler/src/sys_core_dsetel.erl12
-rw-r--r--lib/compiler/src/sys_core_fold.erl743
-rw-r--r--lib/compiler/src/sys_pre_expand.erl22
-rw-r--r--lib/compiler/src/v3_codegen.erl116
-rw-r--r--lib/compiler/src/v3_core.erl779
-rw-r--r--lib/compiler/src/v3_kernel.erl180
-rw-r--r--lib/compiler/src/v3_kernel.hrl2
-rw-r--r--lib/compiler/src/v3_kernel_pp.erl24
-rw-r--r--lib/compiler/src/v3_life.erl13
-rw-r--r--lib/compiler/test/Makefile3
-rw-r--r--lib/compiler/test/andor_SUITE.erl23
-rw-r--r--lib/compiler/test/beam_except_SUITE.erl10
-rw-r--r--lib/compiler/test/bs_match_SUITE.erl15
-rw-r--r--lib/compiler/test/compilation_SUITE.erl6
-rw-r--r--lib/compiler/test/compile_SUITE.erl115
-rw-r--r--lib/compiler/test/compile_SUITE_data/small.erl48
-rw-r--r--lib/compiler/test/compile_SUITE_data/small_maps.erl16
-rw-r--r--lib/compiler/test/core_SUITE.erl10
-rw-r--r--lib/compiler/test/core_SUITE_data/bad_boolean_guard.core32
-rw-r--r--lib/compiler/test/core_SUITE_data/eval_case.core34
-rw-r--r--lib/compiler/test/core_SUITE_data/map_core_test.core95
-rw-r--r--lib/compiler/test/core_fold_SUITE.erl62
-rw-r--r--lib/compiler/test/error_SUITE.erl43
-rw-r--r--lib/compiler/test/fun_SUITE.erl8
-rw-r--r--lib/compiler/test/guard_SUITE.erl12
-rw-r--r--lib/compiler/test/inline_SUITE.erl3
-rw-r--r--lib/compiler/test/inline_SUITE_data/maps_inline_test.erl70
-rw-r--r--lib/compiler/test/lc_SUITE.erl8
-rw-r--r--lib/compiler/test/map_SUITE.erl605
-rw-r--r--lib/compiler/test/receive_SUITE.erl1
-rw-r--r--lib/compiler/test/record_SUITE.erl8
-rw-r--r--lib/compiler/test/warnings_SUITE.erl126
-rw-r--r--lib/compiler/vsn.mk2
-rw-r--r--lib/cosEvent/doc/src/notes.xml18
-rw-r--r--lib/cosEvent/src/cosEvent.app.src3
-rw-r--r--lib/cosEvent/vsn.mk2
-rw-r--r--lib/cosEventDomain/doc/src/notes.xml18
-rw-r--r--lib/cosEventDomain/src/cosEventDomain.app.src4
-rw-r--r--lib/cosEventDomain/vsn.mk2
-rw-r--r--lib/cosFileTransfer/doc/src/notes.xml18
-rw-r--r--lib/cosFileTransfer/src/cosFileTransfer.app.src4
-rw-r--r--lib/cosFileTransfer/vsn.mk2
-rw-r--r--lib/cosNotification/doc/src/notes.xml18
-rw-r--r--lib/cosNotification/src/cosNotification.app.src4
-rw-r--r--lib/cosNotification/vsn.mk2
-rw-r--r--lib/cosProperty/doc/src/notes.xml18
-rw-r--r--lib/cosProperty/src/cosProperty.app.src4
-rw-r--r--lib/cosProperty/vsn.mk2
-rw-r--r--lib/cosTime/doc/src/notes.xml18
-rw-r--r--lib/cosTime/src/cosTime.app.src4
-rw-r--r--lib/cosTime/vsn.mk3
-rw-r--r--lib/cosTransactions/doc/src/notes.xml18
-rw-r--r--lib/cosTransactions/src/cosTransactions.app.src3
-rw-r--r--lib/cosTransactions/vsn.mk2
-rw-r--r--lib/crypto/Makefile4
-rw-r--r--lib/crypto/c_src/Makefile.in7
-rw-r--r--lib/crypto/c_src/crypto.c487
-rw-r--r--lib/crypto/c_src/crypto_callback.c22
-rw-r--r--lib/crypto/doc/src/crypto.xml96
-rw-r--r--lib/crypto/doc/src/crypto_app.xml4
-rw-r--r--lib/crypto/doc/src/notes.xml104
-rw-r--r--lib/crypto/src/Makefile6
-rw-r--r--lib/crypto/src/crypto.app.src12
-rw-r--r--lib/crypto/src/crypto.appup.src14
-rw-r--r--lib/crypto/src/crypto.erl48
-rw-r--r--lib/crypto/src/crypto_ec_curves.erl1215
-rw-r--r--lib/crypto/src/crypto_server.erl68
-rw-r--r--lib/crypto/src/crypto_sup.erl39
-rw-r--r--lib/crypto/test/crypto_SUITE.erl167
-rw-r--r--lib/crypto/vsn.mk2
-rw-r--r--lib/debugger/doc/src/notes.xml66
-rw-r--r--lib/debugger/priv/erlang_bug.pngbin2632 -> 4723 bytes
-rw-r--r--lib/debugger/src/dbg_ieval.erl122
-rw-r--r--lib/debugger/src/dbg_iload.erl83
-rw-r--r--lib/debugger/src/dbg_wx_filedialog_win.erl19
-rw-r--r--lib/debugger/src/dbg_wx_mon.erl4
-rw-r--r--lib/debugger/src/dbg_wx_mon_win.erl4
-rw-r--r--lib/debugger/src/dbg_wx_trace.erl4
-rw-r--r--lib/debugger/src/dbg_wx_view.erl4
-rw-r--r--lib/debugger/src/debugger.app.src4
-rw-r--r--lib/debugger/src/debugger.appup.src10
-rw-r--r--lib/debugger/src/debugger.erl6
-rw-r--r--lib/debugger/src/int.erl5
-rw-r--r--lib/debugger/test/Makefile1
-rw-r--r--lib/debugger/test/bs_construct_SUITE.erl40
-rw-r--r--lib/debugger/test/debugger_SUITE.erl7
-rw-r--r--lib/debugger/test/erl_eval_SUITE.erl1
-rw-r--r--lib/debugger/test/int_eval_SUITE.erl10
-rw-r--r--lib/debugger/test/int_eval_SUITE_data/my_int_eval_module.erl10
-rw-r--r--lib/debugger/test/map_SUITE.erl1003
-rw-r--r--lib/debugger/vsn.mk2
-rw-r--r--lib/dialyzer/doc/src/dialyzer.xml111
-rw-r--r--lib/dialyzer/doc/src/notes.xml167
-rw-r--r--lib/dialyzer/src/Makefile2
-rw-r--r--lib/dialyzer/src/dialyzer.app.src13
-rw-r--r--lib/dialyzer/src/dialyzer.appup.src11
-rw-r--r--lib/dialyzer/src/dialyzer.erl29
-rw-r--r--lib/dialyzer/src/dialyzer.hrl15
-rw-r--r--lib/dialyzer/src/dialyzer_analysis_callgraph.erl27
-rw-r--r--lib/dialyzer/src/dialyzer_behaviours.erl8
-rw-r--r--lib/dialyzer/src/dialyzer_callgraph.erl35
-rw-r--r--lib/dialyzer/src/dialyzer_cl.erl60
-rw-r--r--lib/dialyzer/src/dialyzer_cl_parse.erl13
-rw-r--r--lib/dialyzer/src/dialyzer_codeserver.erl41
-rw-r--r--lib/dialyzer/src/dialyzer_contracts.erl203
-rw-r--r--lib/dialyzer/src/dialyzer_dataflow.erl1197
-rw-r--r--lib/dialyzer/src/dialyzer_dep.erl53
-rw-r--r--lib/dialyzer/src/dialyzer_gui_wx.erl33
-rw-r--r--lib/dialyzer/src/dialyzer_options.erl7
-rw-r--r--lib/dialyzer/src/dialyzer_plt.erl36
-rw-r--r--lib/dialyzer/src/dialyzer_races.erl43
-rw-r--r--lib/dialyzer/src/dialyzer_succ_typings.erl86
-rw-r--r--lib/dialyzer/src/dialyzer_typesig.erl387
-rw-r--r--lib/dialyzer/src/dialyzer_utils.erl23
-rw-r--r--lib/dialyzer/test/Makefile2
-rw-r--r--lib/dialyzer/test/dialyzer.cover3
-rw-r--r--lib/dialyzer/test/dialyzer_SUITE.erl77
-rw-r--r--lib/dialyzer/test/file_utils.erl2
-rw-r--r--lib/dialyzer/test/opaque_SUITE_data/dialyzer_options2
-rw-r--r--lib/dialyzer/test/opaque_SUITE_data/results/array4
-rw-r--r--lib/dialyzer/test/opaque_SUITE_data/results/crash2
-rw-r--r--lib/dialyzer/test/opaque_SUITE_data/results/dict26
-rw-r--r--lib/dialyzer/test/opaque_SUITE_data/results/ets5
-rw-r--r--lib/dialyzer/test/opaque_SUITE_data/results/ewgi6
-rw-r--r--lib/dialyzer/test/opaque_SUITE_data/results/inf_loop12
-rw-r--r--lib/dialyzer/test/opaque_SUITE_data/results/inf_loop25
-rw-r--r--lib/dialyzer/test/opaque_SUITE_data/results/int4
-rw-r--r--lib/dialyzer/test/opaque_SUITE_data/results/mixed_opaque2
-rw-r--r--lib/dialyzer/test/opaque_SUITE_data/results/modules3
-rw-r--r--lib/dialyzer/test/opaque_SUITE_data/results/my_queue2
-rw-r--r--lib/dialyzer/test/opaque_SUITE_data/results/opaque1
-rw-r--r--lib/dialyzer/test/opaque_SUITE_data/results/para21
-rw-r--r--lib/dialyzer/test/opaque_SUITE_data/results/queue21
-rw-r--r--lib/dialyzer/test/opaque_SUITE_data/results/simple87
-rw-r--r--lib/dialyzer/test/opaque_SUITE_data/results/wings14
-rw-r--r--lib/dialyzer/test/opaque_SUITE_data/src/dict/dict_use.erl2
-rw-r--r--lib/dialyzer/test/opaque_SUITE_data/src/ets/ets_use.erl10
-rw-r--r--lib/dialyzer/test/opaque_SUITE_data/src/ewgi/ewgi.hrl2
-rw-r--r--lib/dialyzer/test/opaque_SUITE_data/src/ewgi2/ewgi.hrl2
-rw-r--r--lib/dialyzer/test/opaque_SUITE_data/src/gb_sets/gb_sets_rec.erl4
-rw-r--r--lib/dialyzer/test/opaque_SUITE_data/src/inf_loop1.erl4
-rw-r--r--lib/dialyzer/test/opaque_SUITE_data/src/inf_loop2.erl175
-rw-r--r--lib/dialyzer/test/opaque_SUITE_data/src/modules/opaque_digraph.erl655
-rw-r--r--lib/dialyzer/test/opaque_SUITE_data/src/modules/opaque_erl_scan.erl1300
-rw-r--r--lib/dialyzer/test/opaque_SUITE_data/src/multiple_wrong_opaques.erl2
-rw-r--r--lib/dialyzer/test/opaque_SUITE_data/src/opaque/opaque_adt.erl2
-rw-r--r--lib/dialyzer/test/opaque_SUITE_data/src/para/para1.erl93
-rw-r--r--lib/dialyzer/test/opaque_SUITE_data/src/para/para1_adt.erl36
-rw-r--r--lib/dialyzer/test/opaque_SUITE_data/src/para/para2.erl123
-rw-r--r--lib/dialyzer/test/opaque_SUITE_data/src/para/para2_adt.erl64
-rw-r--r--lib/dialyzer/test/opaque_SUITE_data/src/para/para3.erl77
-rw-r--r--lib/dialyzer/test/opaque_SUITE_data/src/para/para3_adt.erl27
-rw-r--r--lib/dialyzer/test/opaque_SUITE_data/src/simple/exact_adt.erl17
-rw-r--r--lib/dialyzer/test/opaque_SUITE_data/src/simple/exact_api.erl60
-rw-r--r--lib/dialyzer/test/opaque_SUITE_data/src/simple/is_rec.erl65
-rw-r--r--lib/dialyzer/test/opaque_SUITE_data/src/simple/rec_adt.erl28
-rw-r--r--lib/dialyzer/test/opaque_SUITE_data/src/simple/rec_api.erl77
-rw-r--r--lib/dialyzer/test/opaque_SUITE_data/src/simple/simple1_adt.erl138
-rw-r--r--lib/dialyzer/test/opaque_SUITE_data/src/simple/simple1_api.erl571
-rw-r--r--lib/dialyzer/test/opaque_SUITE_data/src/simple/simple2_api.erl125
-rw-r--r--lib/dialyzer/test/opaque_SUITE_data/src/union/union_adt.erl9
-rw-r--r--lib/dialyzer/test/opaque_SUITE_data/src/wings/wings_util.erl4
-rw-r--r--lib/dialyzer/test/opaque_SUITE_data/src/zoltan_adt.erl5
-rw-r--r--lib/dialyzer/test/opaque_SUITE_data/src/zoltan_kis2.erl2
-rw-r--r--lib/dialyzer/test/opaque_SUITE_data/src/zoltan_kis3.erl4
-rw-r--r--lib/dialyzer/test/options1_SUITE_data/dialyzer_options2
-rw-r--r--lib/dialyzer/test/r9c_SUITE_data/dialyzer_options2
-rw-r--r--lib/dialyzer/test/race_SUITE_data/dialyzer_options2
-rw-r--r--lib/dialyzer/test/race_SUITE_data/results/ets_insert_control_flow34
-rw-r--r--lib/dialyzer/test/race_SUITE_data/results/ets_insert_control_flow44
-rw-r--r--lib/dialyzer/test/race_SUITE_data/results/ets_insert_control_flow58
-rw-r--r--lib/dialyzer/test/race_SUITE_data/results/ets_insert_param8
-rw-r--r--lib/dialyzer/test/small_SUITE_data/dialyzer_options2
-rw-r--r--lib/dialyzer/test/small_SUITE_data/results/contracts_with_subtypes39
-rw-r--r--lib/dialyzer/test/small_SUITE_data/results/contracts_with_subtypes23
-rw-r--r--lib/dialyzer/test/small_SUITE_data/results/funs_from_outside7
-rw-r--r--lib/dialyzer/test/small_SUITE_data/results/invalid_spec_22
-rw-r--r--lib/dialyzer/test/small_SUITE_data/results/maps_difftype3
-rw-r--r--lib/dialyzer/test/small_SUITE_data/results/predef8
-rw-r--r--lib/dialyzer/test/small_SUITE_data/results/record_construct2
-rw-r--r--lib/dialyzer/test/small_SUITE_data/src/contracts_with_subtypes.erl47
-rw-r--r--lib/dialyzer/test/small_SUITE_data/src/contracts_with_subtypes2.erl40
-rw-r--r--lib/dialyzer/test/small_SUITE_data/src/ddfs_master/common_types.hrl6
-rw-r--r--lib/dialyzer/test/small_SUITE_data/src/ddfs_master/config.hrl148
-rw-r--r--lib/dialyzer/test/small_SUITE_data/src/ddfs_master/ddfs.hrl9
-rw-r--r--lib/dialyzer/test/small_SUITE_data/src/ddfs_master/ddfs_gc.hrl17
-rw-r--r--lib/dialyzer/test/small_SUITE_data/src/ddfs_master/ddfs_master.erl531
-rw-r--r--lib/dialyzer/test/small_SUITE_data/src/ddfs_master/ddfs_tag.hrl19
-rw-r--r--lib/dialyzer/test/small_SUITE_data/src/ddfs_master/gs_util.hrl16
-rw-r--r--lib/dialyzer/test/small_SUITE_data/src/funs_from_outside.erl83
-rw-r--r--lib/dialyzer/test/small_SUITE_data/src/invalid_spec_2/scala_data.erl5
-rw-r--r--lib/dialyzer/test/small_SUITE_data/src/invalid_spec_2/scala_user.erl8
-rw-r--r--lib/dialyzer/test/small_SUITE_data/src/maps1.erl41
-rw-r--r--lib/dialyzer/test/small_SUITE_data/src/maps_difftype.erl11
-rw-r--r--lib/dialyzer/test/small_SUITE_data/src/maps_redef.erl12
-rw-r--r--lib/dialyzer/test/small_SUITE_data/src/on_load.erl7
-rw-r--r--lib/dialyzer/test/small_SUITE_data/src/predef.erl67
-rw-r--r--lib/dialyzer/test/small_SUITE_data/src/predef2.erl56
-rw-r--r--lib/dialyzer/test/small_SUITE_data/src/record_construct.erl2
-rw-r--r--lib/dialyzer/test/small_SUITE_data/src/remote_field.erl11
-rw-r--r--lib/dialyzer/test/small_SUITE_data/src/remote_field2.erl17
-rw-r--r--lib/dialyzer/test/underspecs_SUITE_data/dialyzer_options2
-rw-r--r--lib/dialyzer/test/unmatched_returns_SUITE_data/dialyzer_options1
-rw-r--r--lib/dialyzer/test/unmatched_returns_SUITE_data/results/lc_warnings5
-rw-r--r--lib/dialyzer/test/unmatched_returns_SUITE_data/src/lc_warnings/lc_warnings.erl95
-rw-r--r--lib/dialyzer/test/unmatched_returns_SUITE_data/src/lc_warnings/opaque_atom_adt.erl9
-rw-r--r--lib/dialyzer/test/user_SUITE_data/dialyzer_options2
-rw-r--r--lib/dialyzer/vsn.mk2
-rwxr-xr-xlib/diameter/bin/diameterc4
-rw-r--r--lib/diameter/doc/src/diameter.xml9
-rw-r--r--lib/diameter/doc/src/diameter_make.xml20
-rw-r--r--lib/diameter/doc/src/diameter_sctp.xml36
-rw-r--r--lib/diameter/doc/src/notes.xml168
-rw-r--r--lib/diameter/doc/src/seealso.ent3
-rw-r--r--lib/diameter/examples/code/client.erl2
-rw-r--r--lib/diameter/examples/code/client_cb.erl14
-rw-r--r--lib/diameter/examples/code/redirect_cb.erl8
-rw-r--r--lib/diameter/examples/code/relay_cb.erl8
-rw-r--r--lib/diameter/examples/code/server_cb.erl53
-rw-r--r--lib/diameter/include/diameter.hrl11
-rw-r--r--lib/diameter/include/diameter_gen.hrl212
-rw-r--r--lib/diameter/src/Makefile24
-rw-r--r--lib/diameter/src/app.sed40
-rw-r--r--lib/diameter/src/base/diameter_codec.erl196
-rw-r--r--lib/diameter/src/base/diameter_config.erl4
-rw-r--r--lib/diameter/src/base/diameter_lib.erl56
-rw-r--r--lib/diameter/src/base/diameter_peer_fsm.erl168
-rw-r--r--lib/diameter/src/base/diameter_service.erl91
-rw-r--r--lib/diameter/src/base/diameter_stats.erl5
-rw-r--r--lib/diameter/src/base/diameter_traffic.erl229
-rw-r--r--lib/diameter/src/base/diameter_watchdog.erl110
-rw-r--r--lib/diameter/src/compiler/diameter_codegen.erl8
-rw-r--r--lib/diameter/src/compiler/diameter_dict_util.erl46
-rw-r--r--lib/diameter/src/compiler/diameter_forms.hrl6
-rw-r--r--lib/diameter/src/compiler/diameter_make.erl46
-rw-r--r--lib/diameter/src/diameter.app.src26
-rw-r--r--lib/diameter/src/diameter.appup.src107
-rw-r--r--lib/diameter/src/info/diameter_dbg.erl (renamed from lib/diameter/src/base/diameter_dbg.erl)163
-rw-r--r--lib/diameter/src/info/diameter_info.erl (renamed from lib/diameter/src/base/diameter_info.erl)14
-rw-r--r--lib/diameter/src/modules.mk12
-rw-r--r--lib/diameter/src/transport/diameter_sctp.erl52
-rw-r--r--lib/diameter/test/diameter_app_SUITE.erl66
-rw-r--r--lib/diameter/test/diameter_codec_test.erl3
-rw-r--r--lib/diameter/test/diameter_compiler_SUITE.erl34
-rw-r--r--lib/diameter/test/diameter_dpr_SUITE.erl8
-rw-r--r--lib/diameter/test/diameter_examples_SUITE.erl85
-rw-r--r--lib/diameter/test/diameter_failover_SUITE.erl8
-rw-r--r--lib/diameter/test/diameter_traffic_SUITE.erl85
-rw-r--r--lib/diameter/vsn.mk4
-rw-r--r--lib/edoc/doc/src/notes.xml29
-rw-r--r--lib/edoc/src/edoc.app.src4
-rw-r--r--lib/edoc/src/edoc.appup.src22
-rw-r--r--lib/edoc/src/edoc_doclet.erl2
-rw-r--r--lib/edoc/src/edoc_layout.erl10
-rw-r--r--lib/edoc/src/edoc_lib.erl2
-rw-r--r--lib/edoc/src/edoc_parser.yrl16
-rw-r--r--lib/edoc/src/edoc_scanner.erl2
-rw-r--r--lib/edoc/src/edoc_specs.erl19
-rw-r--r--lib/edoc/src/edoc_tags.erl4
-rw-r--r--lib/edoc/src/edoc_types.erl5
-rw-r--r--lib/edoc/src/edoc_types.hrl4
-rw-r--r--lib/edoc/test/edoc_SUITE.erl46
-rw-r--r--lib/edoc/test/edoc_SUITE_data/map_module.erl27
-rw-r--r--lib/edoc/vsn.mk2
-rw-r--r--lib/eldap/doc/src/eldap.xml3
-rw-r--r--lib/eldap/doc/src/notes.xml46
-rw-r--r--lib/eldap/src/Makefile2
-rw-r--r--lib/eldap/src/eldap.app.src4
-rw-r--r--lib/eldap/src/eldap.appup.src21
-rw-r--r--lib/eldap/src/eldap.erl25
-rw-r--r--lib/eldap/test/eldap_basic_SUITE.erl7
-rw-r--r--lib/eldap/test/eldap_misc_SUITE.erl51
-rw-r--r--lib/eldap/vsn.mk3
-rw-r--r--lib/erl_docgen/doc/src/notes.xml43
-rw-r--r--lib/erl_docgen/src/docgen_edoc_xml_cb.erl17
-rw-r--r--lib/erl_docgen/src/docgen_otp_specs.erl5
-rw-r--r--lib/erl_docgen/src/erl_docgen.app.src4
-rw-r--r--lib/erl_docgen/src/erl_docgen.appup.src22
-rw-r--r--lib/erl_docgen/test/Makefile65
-rw-r--r--lib/erl_docgen/test/erl_docgen.spec1
-rw-r--r--lib/erl_docgen/test/erl_docgen_SUITE.erl50
-rw-r--r--lib/erl_docgen/vsn.mk2
-rw-r--r--lib/erl_interface/aclocal.m450
-rw-r--r--lib/erl_interface/doc/src/ei.xml34
-rw-r--r--lib/erl_interface/doc/src/notes.xml16
-rw-r--r--lib/erl_interface/include/ei.h8
-rw-r--r--lib/erl_interface/src/connect/ei_connect.c10
-rw-r--r--lib/erl_interface/src/connect/ei_connect_int.h3
-rw-r--r--lib/erl_interface/src/connect/ei_resolve.c2
-rw-r--r--lib/erl_interface/src/decode/decode_skip.c10
-rw-r--r--lib/erl_interface/src/decode/decode_tuple_header.c23
-rw-r--r--lib/erl_interface/src/encode/encode_tuple_header.c19
-rw-r--r--lib/erl_interface/src/misc/ei_decode_term.c3
-rw-r--r--lib/erl_interface/src/misc/ei_x_encode.c12
-rw-r--r--lib/erl_interface/test/all_SUITE_data/ei_runner.c6
-rw-r--r--lib/erl_interface/test/all_SUITE_data/ei_runner.h3
-rw-r--r--lib/erl_interface/test/ei_decode_SUITE_data/ei_decode_test.c6
-rw-r--r--lib/erl_interface/test/ei_decode_encode_SUITE.erl11
-rw-r--r--lib/erl_interface/test/ei_decode_encode_SUITE_data/ei_decode_encode_test.c490
-rw-r--r--lib/erl_interface/vsn.mk3
-rw-r--r--lib/et/doc/src/notes.xml45
-rw-r--r--lib/et/src/et.app.src4
-rw-r--r--lib/et/src/et.appup.src10
-rw-r--r--lib/et/test/Makefile1
-rw-r--r--lib/et/test/et_SUITE.erl50
-rw-r--r--lib/et/vsn.mk2
-rw-r--r--lib/eunit/doc/src/notes.xml29
-rw-r--r--lib/eunit/src/eunit.app.src4
-rw-r--r--lib/eunit/src/eunit.appup.src22
-rw-r--r--lib/eunit/src/eunit_serial.erl6
-rw-r--r--lib/eunit/test/eunit_SUITE.erl10
-rw-r--r--lib/eunit/vsn.mk2
-rw-r--r--lib/gs/doc/src/gs.xml4
-rw-r--r--lib/gs/doc/src/notes.xml31
-rw-r--r--lib/gs/src/Makefile2
-rw-r--r--lib/gs/src/gs.app.src3
-rw-r--r--lib/gs/src/gs.appup.src22
-rw-r--r--lib/gs/src/gstk_generic.erl10
-rw-r--r--lib/gs/test/Makefile65
-rw-r--r--lib/gs/test/gs.spec1
-rw-r--r--lib/gs/test/gs_SUITE.erl50
-rw-r--r--lib/gs/vsn.mk2
-rw-r--r--lib/hipe/Makefile2
-rw-r--r--lib/hipe/arm/hipe_arm_assemble.erl48
-rw-r--r--lib/hipe/cerl/Makefile11
-rw-r--r--lib/hipe/cerl/cerl_closurean.erl8
-rw-r--r--lib/hipe/cerl/cerl_messagean.erl4
-rw-r--r--lib/hipe/cerl/cerl_prettypr.erl41
-rw-r--r--lib/hipe/cerl/cerl_to_icode.erl38
-rw-r--r--lib/hipe/cerl/cerl_typean.erl4
-rw-r--r--lib/hipe/cerl/erl_bif_types.erl1820
-rw-r--r--lib/hipe/cerl/erl_types.erl2401
-rw-r--r--lib/hipe/doc/src/notes.xml118
-rw-r--r--lib/hipe/flow/cfg.hrl6
-rw-r--r--lib/hipe/flow/cfg.inc4
-rw-r--r--lib/hipe/flow/hipe_dominators.erl6
-rw-r--r--lib/hipe/flow/liveness.inc6
-rw-r--r--lib/hipe/icode/hipe_beam_to_icode.erl143
-rw-r--r--lib/hipe/icode/hipe_icode.erl14
-rw-r--r--lib/hipe/icode/hipe_icode.hrl8
-rw-r--r--lib/hipe/icode/hipe_icode_callgraph.erl4
-rw-r--r--lib/hipe/icode/hipe_icode_cfg.erl6
-rw-r--r--lib/hipe/icode/hipe_icode_coordinator.erl8
-rw-r--r--lib/hipe/icode/hipe_icode_exceptions.erl8
-rw-r--r--lib/hipe/icode/hipe_icode_fp.erl8
-rw-r--r--lib/hipe/icode/hipe_icode_instruction_counter.erl5
-rw-r--r--lib/hipe/icode/hipe_icode_mulret.erl16
-rw-r--r--lib/hipe/icode/hipe_icode_range.erl10
-rw-r--r--lib/hipe/icode/hipe_icode_ssa.erl4
-rw-r--r--lib/hipe/icode/hipe_icode_ssa_struct_reuse.erl16
-rw-r--r--lib/hipe/icode/hipe_icode_type.erl53
-rw-r--r--lib/hipe/llvm/Makefile109
-rw-r--r--lib/hipe/llvm/elf32_format.hrl59
-rw-r--r--lib/hipe/llvm/elf64_format.hrl58
-rw-r--r--lib/hipe/llvm/elf_format.erl790
-rw-r--r--lib/hipe/llvm/elf_format.hrl488
-rw-r--r--lib/hipe/llvm/hipe_llvm.erl1131
-rw-r--r--lib/hipe/llvm/hipe_llvm_arch.hrl11
-rw-r--r--lib/hipe/llvm/hipe_llvm_liveness.erl112
-rw-r--r--lib/hipe/llvm/hipe_llvm_main.erl506
-rw-r--r--lib/hipe/llvm/hipe_llvm_merge.erl114
-rw-r--r--lib/hipe/llvm/hipe_rtl_to_llvm.erl1613
-rw-r--r--lib/hipe/main/hipe.app.src11
-rw-r--r--lib/hipe/main/hipe.appup.src7
-rw-r--r--lib/hipe/main/hipe.erl85
-rw-r--r--lib/hipe/main/hipe_main.erl42
-rw-r--r--lib/hipe/misc/hipe_consttab.erl8
-rw-r--r--lib/hipe/misc/hipe_consttab.hrl4
-rw-r--r--lib/hipe/misc/hipe_gensym.erl2
-rw-r--r--lib/hipe/misc/hipe_pack_constants.erl102
-rw-r--r--lib/hipe/misc/hipe_sdi.erl15
-rw-r--r--lib/hipe/ppc/hipe_ppc_assemble.erl48
-rw-r--r--lib/hipe/regalloc/hipe_ig_moves.erl4
-rw-r--r--lib/hipe/regalloc/hipe_ls_regalloc.erl4
-rw-r--r--lib/hipe/regalloc/hipe_optimistic_regalloc.erl4
-rw-r--r--lib/hipe/rtl/hipe_icode2rtl.erl4
-rw-r--r--lib/hipe/rtl/hipe_rtl.erl174
-rw-r--r--lib/hipe/rtl/hipe_rtl.hrl3
-rw-r--r--lib/hipe/rtl/hipe_rtl_liveness.erl3
-rw-r--r--lib/hipe/rtl/hipe_tagscheme.erl37
-rw-r--r--lib/hipe/sparc/hipe_sparc_assemble.erl48
-rw-r--r--lib/hipe/ssa/hipe_ssa_const_prop.inc10
-rw-r--r--lib/hipe/test/Makefile80
-rw-r--r--lib/hipe/test/bs_SUITE_data/bs_add.erl18
-rw-r--r--lib/hipe/test/bs_SUITE_data/bs_bincomp.erl79
-rw-r--r--lib/hipe/test/bs_SUITE_data/bs_bits.erl150
-rw-r--r--lib/hipe/test/bs_SUITE_data/bs_bitsize.erl23
-rw-r--r--lib/hipe/test/bs_SUITE_data/bs_bugs_R08.erl32
-rw-r--r--lib/hipe/test/bs_SUITE_data/bs_bugs_R09.erl35
-rw-r--r--lib/hipe/test/bs_SUITE_data/bs_bugs_R12.erl133
-rw-r--r--lib/hipe/test/bs_SUITE_data/bs_build.erl41
-rw-r--r--lib/hipe/test/bs_SUITE_data/bs_catch_bug.erl25
-rw-r--r--lib/hipe/test/bs_SUITE_data/bs_checksum.erl35
-rw-r--r--lib/hipe/test/bs_SUITE_data/bs_construct.erl128
-rw-r--r--lib/hipe/test/bs_SUITE_data/bs_decode.erl980
-rw-r--r--lib/hipe/test/bs_SUITE_data/bs_decode_extract.hrl91
-rw-r--r--lib/hipe/test/bs_SUITE_data/bs_des.erl734
-rw-r--r--lib/hipe/test/bs_SUITE_data/bs_extract.erl94
-rw-r--r--lib/hipe/test/bs_SUITE_data/bs_flatb.erl29
-rw-r--r--lib/hipe/test/bs_SUITE_data/bs_id3.erl75
-rw-r--r--lib/hipe/test/bs_SUITE_data/bs_match.erl175
-rw-r--r--lib/hipe/test/bs_SUITE_data/bs_native_float.erl22
-rw-r--r--lib/hipe/test/bs_SUITE_data/bs_orber.erl26
-rw-r--r--lib/hipe/test/bs_SUITE_data/bs_pmatch.erl269
-rw-r--r--lib/hipe/test/bs_SUITE_data/bs_pmatch_bugs.erl67
-rw-r--r--lib/hipe/test/bs_SUITE_data/bs_pmatch_in_guards.erl23
-rw-r--r--lib/hipe/test/bs_SUITE_data/bs_potpurri.erl200
-rw-r--r--lib/hipe/test/bs_SUITE_data/bs_remove3.erl104
-rw-r--r--lib/hipe/test/bs_SUITE_data/bs_save.erl21
-rw-r--r--lib/hipe/test/bs_SUITE_data/bs_shell_native.erl275
-rw-r--r--lib/hipe/test/bs_SUITE_data/bs_split.erl105
-rw-r--r--lib/hipe/test/bs_SUITE_data/bs_system_limit_32.erl26
-rw-r--r--lib/hipe/test/bs_SUITE_data/bs_utf.erl18
-rw-r--r--lib/hipe/test/bs_SUITE_data/bs_var_segs.erl76
-rw-r--r--lib/hipe/test/hipe.spec6
-rw-r--r--lib/hipe/test/hipe_SUITE.erl55
-rw-r--r--lib/hipe/test/hipe_testsuite_driver.erl201
-rw-r--r--lib/hipe/test/maps_SUITE_data/maps_build_and_match_aliasing.erl20
-rw-r--r--lib/hipe/test/maps_SUITE_data/maps_build_and_match_empty_val.erl17
-rw-r--r--lib/hipe/test/maps_SUITE_data/maps_build_and_match_literals.erl40
-rw-r--r--lib/hipe/test/maps_SUITE_data/maps_build_and_match_over_alloc.erl16
-rw-r--r--lib/hipe/test/maps_SUITE_data/maps_build_and_match_val.erl23
-rw-r--r--lib/hipe/test/maps_SUITE_data/maps_expand_map_update.erl7
-rw-r--r--lib/hipe/test/maps_SUITE_data/maps_export.erl11
-rw-r--r--lib/hipe/test/maps_SUITE_data/maps_get_map_elements.erl23
-rw-r--r--lib/hipe/test/maps_SUITE_data/maps_guard_bifs.erl31
-rw-r--r--lib/hipe/test/maps_SUITE_data/maps_guard_fun.erl36
-rw-r--r--lib/hipe/test/maps_SUITE_data/maps_guard_receive.erl54
-rw-r--r--lib/hipe/test/maps_SUITE_data/maps_guard_sequence.erl35
-rw-r--r--lib/hipe/test/maps_SUITE_data/maps_guard_update.erl14
-rw-r--r--lib/hipe/test/maps_SUITE_data/maps_has_map_fields.erl46
-rw-r--r--lib/hipe/test/maps_SUITE_data/maps_is_map.erl24
-rw-r--r--lib/hipe/test/maps_SUITE_data/maps_list_comprehension.erl6
-rw-r--r--lib/hipe/test/maps_SUITE_data/maps_map_size.erl29
-rw-r--r--lib/hipe/test/maps_SUITE_data/maps_map_sort_literals.erl41
-rw-r--r--lib/hipe/test/maps_SUITE_data/maps_match_and_update_literals.erl24
-rw-r--r--lib/hipe/test/maps_SUITE_data/maps_put_map_assoc.erl23
-rw-r--r--lib/hipe/test/maps_SUITE_data/maps_put_map_exact.erl28
-rw-r--r--lib/hipe/test/maps_SUITE_data/maps_update_assoc.erl22
-rw-r--r--lib/hipe/test/maps_SUITE_data/maps_update_exact.erl32
-rw-r--r--lib/hipe/test/maps_SUITE_data/maps_update_literals.erl13
-rw-r--r--lib/hipe/test/maps_SUITE_data/maps_update_map_expressions.erl32
-rw-r--r--lib/hipe/test/maps_SUITE_data/maps_update_values.erl28
-rw-r--r--lib/hipe/test/maps_SUITE_data/maps_warn_pair_key_overloaded.erl27
-rw-r--r--lib/hipe/test/maps_SUITE_data/maps_warn_useless_build.erl9
-rw-r--r--lib/hipe/util/hipe_digraph.erl8
-rw-r--r--lib/hipe/util/hipe_dot.erl6
-rw-r--r--lib/hipe/util/hipe_vectors.hrl4
-rw-r--r--lib/hipe/vsn.mk2
-rw-r--r--lib/hipe/x86/hipe_x86_assemble.erl51
-rw-r--r--lib/ic/doc/src/notes.xml18
-rw-r--r--lib/ic/src/ic.app.src3
-rw-r--r--lib/ic/src/ic.erl2
-rw-r--r--lib/ic/src/ic_codegen.erl3
-rw-r--r--lib/ic/src/ic_pp.erl8
-rw-r--r--lib/ic/test/java_client_erl_server_SUITE.erl2
-rw-r--r--lib/ic/vsn.mk2
-rw-r--r--lib/inets/doc/src/notes.xml141
-rw-r--r--lib/inets/src/ftp/ftp.erl142
-rw-r--r--lib/inets/src/http_client/httpc_cookie.erl3
-rw-r--r--lib/inets/src/http_client/httpc_handler.erl89
-rw-r--r--lib/inets/src/http_client/httpc_internal.hrl6
-rw-r--r--lib/inets/src/http_client/httpc_manager.erl46
-rw-r--r--lib/inets/src/http_lib/http_internal.hrl4
-rw-r--r--lib/inets/src/http_lib/http_request.erl5
-rw-r--r--lib/inets/src/http_server/Makefile3
-rw-r--r--lib/inets/src/http_server/httpd.erl228
-rw-r--r--lib/inets/src/http_server/httpd_acceptor.erl112
-rw-r--r--lib/inets/src/http_server/httpd_acceptor_sup.erl84
-rw-r--r--lib/inets/src/http_server/httpd_connection_sup.erl68
-rw-r--r--lib/inets/src/http_server/httpd_example.erl4
-rw-r--r--lib/inets/src/http_server/httpd_instance_sup.erl30
-rw-r--r--lib/inets/src/http_server/httpd_manager.erl723
-rw-r--r--lib/inets/src/http_server/httpd_request.erl204
-rw-r--r--lib/inets/src/http_server/httpd_request_handler.erl126
-rw-r--r--lib/inets/src/http_server/httpd_util.erl9
-rw-r--r--lib/inets/src/inets_app/inets.app.src7
-rw-r--r--lib/inets/src/inets_app/inets.appup.src25
-rw-r--r--lib/inets/test/Makefile6
-rw-r--r--lib/inets/test/ftp_suite_lib.erl20
-rw-r--r--lib/inets/test/http_format_SUITE.erl15
-rw-r--r--lib/inets/test/httpc_SUITE.erl112
-rw-r--r--lib/inets/test/httpd_1_0.erl38
-rw-r--r--lib/inets/test/httpd_1_1.erl121
-rw-r--r--lib/inets/test/httpd_SUITE.erl3662
-rw-r--r--lib/inets/test/httpd_all.erl240
-rw-r--r--lib/inets/test/httpd_basic_SUITE.erl322
-rw-r--r--lib/inets/test/httpd_block.erl59
-rw-r--r--lib/inets/test/httpd_mod_SUITE.erl76
-rw-r--r--lib/inets/test/httpd_test_lib.erl135
-rw-r--r--lib/inets/test/inets_appup_test.erl298
-rw-r--r--lib/inets/test/inets_sup_SUITE.erl152
-rw-r--r--lib/inets/test/inets_sup_SUITE_data/mime.types3
-rw-r--r--lib/inets/test/inets_sup_SUITE_data/simple.conf6
-rw-r--r--lib/inets/test/inets_test_lib.erl10
-rw-r--r--lib/inets/test/old_httpd_SUITE.erl2485
-rw-r--r--lib/inets/test/old_httpd_SUITE_data/Makefile.src14
-rw-r--r--lib/inets/test/old_httpd_SUITE_data/cgi_echo.c97
-rw-r--r--lib/inets/test/old_httpd_SUITE_data/server_root/Makefile (renamed from lib/inets/test/httpd_SUITE_data/server_root/Makefile)0
-rw-r--r--lib/inets/test/old_httpd_SUITE_data/server_root/auth/group3
-rw-r--r--lib/inets/test/old_httpd_SUITE_data/server_root/auth/passwd4
-rw-r--r--lib/inets/test/old_httpd_SUITE_data/server_root/cgi-bin/printenv.bat9
-rwxr-xr-xlib/inets/test/old_httpd_SUITE_data/server_root/cgi-bin/printenv.sh6
-rw-r--r--lib/inets/test/old_httpd_SUITE_data/server_root/conf/8080.conf (renamed from lib/inets/test/httpd_SUITE_data/server_root/conf/8080.conf)0
-rw-r--r--lib/inets/test/old_httpd_SUITE_data/server_root/conf/8888.conf (renamed from lib/inets/test/httpd_SUITE_data/server_root/conf/8888.conf)0
-rw-r--r--lib/inets/test/old_httpd_SUITE_data/server_root/conf/httpd.conf (renamed from lib/inets/test/httpd_SUITE_data/server_root/conf/httpd.conf)0
-rw-r--r--lib/inets/test/old_httpd_SUITE_data/server_root/conf/mime.types (renamed from lib/inets/test/httpd_SUITE_data/server_root/conf/mime.types)0
-rw-r--r--lib/inets/test/old_httpd_SUITE_data/server_root/conf/ssl.conf (renamed from lib/inets/test/httpd_SUITE_data/server_root/conf/ssl.conf)0
-rw-r--r--lib/inets/test/old_httpd_SUITE_data/server_root/htdocs/config.shtml70
-rw-r--r--lib/inets/test/old_httpd_SUITE_data/server_root/htdocs/dets_open/dummy.html10
-rw-r--r--lib/inets/test/old_httpd_SUITE_data/server_root/htdocs/dets_secret/dummy.html10
-rw-r--r--lib/inets/test/old_httpd_SUITE_data/server_root/htdocs/dets_secret/top_secret/index.html9
-rw-r--r--lib/inets/test/old_httpd_SUITE_data/server_root/htdocs/echo.shtml35
-rw-r--r--lib/inets/test/old_httpd_SUITE_data/server_root/htdocs/exec.shtml30
-rw-r--r--lib/inets/test/old_httpd_SUITE_data/server_root/htdocs/flastmod.shtml29
-rw-r--r--lib/inets/test/old_httpd_SUITE_data/server_root/htdocs/fsize.shtml29
-rw-r--r--lib/inets/test/old_httpd_SUITE_data/server_root/htdocs/include.shtml33
-rw-r--r--lib/inets/test/old_httpd_SUITE_data/server_root/htdocs/index.html25
-rw-r--r--lib/inets/test/old_httpd_SUITE_data/server_root/htdocs/last_modified.html22
-rw-r--r--lib/inets/test/old_httpd_SUITE_data/server_root/htdocs/misc/friedrich.html7
-rw-r--r--lib/inets/test/old_httpd_SUITE_data/server_root/htdocs/misc/oech.html4
-rw-r--r--lib/inets/test/old_httpd_SUITE_data/server_root/htdocs/misc/welcome.html1
-rw-r--r--lib/inets/test/old_httpd_SUITE_data/server_root/htdocs/mnesia_open/dummy.html10
-rw-r--r--lib/inets/test/old_httpd_SUITE_data/server_root/htdocs/mnesia_secret/dummy.html10
-rw-r--r--lib/inets/test/old_httpd_SUITE_data/server_root/htdocs/mnesia_secret/top_secret/index.html9
-rw-r--r--lib/inets/test/old_httpd_SUITE_data/server_root/htdocs/open/dummy.html10
-rw-r--r--lib/inets/test/old_httpd_SUITE_data/server_root/htdocs/secret/dummy.html10
-rw-r--r--lib/inets/test/old_httpd_SUITE_data/server_root/htdocs/secret/top_secret/index.html9
-rw-r--r--lib/inets/test/old_httpd_SUITE_data/server_root/icons/README (renamed from lib/inets/test/httpd_SUITE_data/server_root/icons/README)0
-rw-r--r--lib/inets/test/old_httpd_SUITE_data/server_root/icons/a.gifbin0 -> 246 bytes
-rw-r--r--lib/inets/test/old_httpd_SUITE_data/server_root/icons/alert.black.gifbin0 -> 242 bytes
-rw-r--r--lib/inets/test/old_httpd_SUITE_data/server_root/icons/alert.red.gifbin0 -> 247 bytes
-rw-r--r--lib/inets/test/old_httpd_SUITE_data/server_root/icons/apache_pb.gifbin0 -> 2326 bytes
-rw-r--r--lib/inets/test/old_httpd_SUITE_data/server_root/icons/back.gifbin0 -> 216 bytes
-rw-r--r--lib/inets/test/old_httpd_SUITE_data/server_root/icons/ball.gray.gifbin0 -> 233 bytes
-rw-r--r--lib/inets/test/old_httpd_SUITE_data/server_root/icons/ball.red.gifbin0 -> 205 bytes
-rw-r--r--lib/inets/test/old_httpd_SUITE_data/server_root/icons/binary.gifbin0 -> 246 bytes
-rw-r--r--lib/inets/test/old_httpd_SUITE_data/server_root/icons/binhex.gifbin0 -> 246 bytes
-rw-r--r--lib/inets/test/old_httpd_SUITE_data/server_root/icons/blank.gifbin0 -> 148 bytes
-rw-r--r--lib/inets/test/old_httpd_SUITE_data/server_root/icons/bomb.gifbin0 -> 308 bytes
-rw-r--r--lib/inets/test/old_httpd_SUITE_data/server_root/icons/box1.gifbin0 -> 251 bytes
-rw-r--r--lib/inets/test/old_httpd_SUITE_data/server_root/icons/box2.gifbin0 -> 268 bytes
-rw-r--r--lib/inets/test/old_httpd_SUITE_data/server_root/icons/broken.gifbin0 -> 247 bytes
-rw-r--r--lib/inets/test/old_httpd_SUITE_data/server_root/icons/burst.gifbin0 -> 235 bytes
-rw-r--r--lib/inets/test/old_httpd_SUITE_data/server_root/icons/button1.gifbin0 -> 755 bytes
-rw-r--r--lib/inets/test/old_httpd_SUITE_data/server_root/icons/button10.gifbin0 -> 781 bytes
-rw-r--r--lib/inets/test/old_httpd_SUITE_data/server_root/icons/button2.gifbin0 -> 785 bytes
-rw-r--r--lib/inets/test/old_httpd_SUITE_data/server_root/icons/button3.gifbin0 -> 745 bytes
-rw-r--r--lib/inets/test/old_httpd_SUITE_data/server_root/icons/button4.gifbin0 -> 786 bytes
-rw-r--r--lib/inets/test/old_httpd_SUITE_data/server_root/icons/button5.gifbin0 -> 780 bytes
-rw-r--r--lib/inets/test/old_httpd_SUITE_data/server_root/icons/button6.gifbin0 -> 791 bytes
-rw-r--r--lib/inets/test/old_httpd_SUITE_data/server_root/icons/button7.gifbin0 -> 796 bytes
-rw-r--r--lib/inets/test/old_httpd_SUITE_data/server_root/icons/button8.gifbin0 -> 784 bytes
-rw-r--r--lib/inets/test/old_httpd_SUITE_data/server_root/icons/button9.gifbin0 -> 784 bytes
-rw-r--r--lib/inets/test/old_httpd_SUITE_data/server_root/icons/buttonl.gifbin0 -> 587 bytes
-rw-r--r--lib/inets/test/old_httpd_SUITE_data/server_root/icons/buttonr.gifbin0 -> 576 bytes
-rw-r--r--lib/inets/test/old_httpd_SUITE_data/server_root/icons/c.gifbin0 -> 242 bytes
-rw-r--r--lib/inets/test/old_httpd_SUITE_data/server_root/icons/comp.blue.gifbin0 -> 251 bytes
-rw-r--r--lib/inets/test/old_httpd_SUITE_data/server_root/icons/comp.gray.gifbin0 -> 246 bytes
-rw-r--r--lib/inets/test/old_httpd_SUITE_data/server_root/icons/compressed.gifbin0 -> 1038 bytes
-rw-r--r--lib/inets/test/old_httpd_SUITE_data/server_root/icons/continued.gifbin0 -> 214 bytes
-rw-r--r--lib/inets/test/old_httpd_SUITE_data/server_root/icons/dir.gifbin0 -> 225 bytes
-rw-r--r--lib/inets/test/old_httpd_SUITE_data/server_root/icons/down.gifbin0 -> 163 bytes
-rw-r--r--lib/inets/test/old_httpd_SUITE_data/server_root/icons/dvi.gifbin0 -> 238 bytes
-rw-r--r--lib/inets/test/old_httpd_SUITE_data/server_root/icons/f.gifbin0 -> 236 bytes
-rw-r--r--lib/inets/test/old_httpd_SUITE_data/server_root/icons/folder.gifbin0 -> 225 bytes
-rw-r--r--lib/inets/test/old_httpd_SUITE_data/server_root/icons/folder.open.gifbin0 -> 242 bytes
-rw-r--r--lib/inets/test/old_httpd_SUITE_data/server_root/icons/folder.sec.gifbin0 -> 243 bytes
-rw-r--r--lib/inets/test/old_httpd_SUITE_data/server_root/icons/forward.gifbin0 -> 219 bytes
-rw-r--r--lib/inets/test/old_httpd_SUITE_data/server_root/icons/generic.gifbin0 -> 221 bytes
-rw-r--r--lib/inets/test/old_httpd_SUITE_data/server_root/icons/generic.red.gifbin0 -> 220 bytes
-rw-r--r--lib/inets/test/old_httpd_SUITE_data/server_root/icons/generic.sec.gifbin0 -> 249 bytes
-rw-r--r--lib/inets/test/old_httpd_SUITE_data/server_root/icons/hand.right.gifbin0 -> 217 bytes
-rw-r--r--lib/inets/test/old_httpd_SUITE_data/server_root/icons/hand.up.gifbin0 -> 223 bytes
-rw-r--r--lib/inets/test/old_httpd_SUITE_data/server_root/icons/htdig.gifbin0 -> 1822 bytes
-rw-r--r--lib/inets/test/old_httpd_SUITE_data/server_root/icons/icon.sheet.gifbin0 -> 11977 bytes
-rw-r--r--lib/inets/test/old_httpd_SUITE_data/server_root/icons/image1.gifbin0 -> 274 bytes
-rw-r--r--lib/inets/test/old_httpd_SUITE_data/server_root/icons/image2.gifbin0 -> 309 bytes
-rw-r--r--lib/inets/test/old_httpd_SUITE_data/server_root/icons/image3.gifbin0 -> 286 bytes
-rw-r--r--lib/inets/test/old_httpd_SUITE_data/server_root/icons/index.gifbin0 -> 268 bytes
-rw-r--r--lib/inets/test/old_httpd_SUITE_data/server_root/icons/layout.gifbin0 -> 276 bytes
-rw-r--r--lib/inets/test/old_httpd_SUITE_data/server_root/icons/left.gifbin0 -> 172 bytes
-rw-r--r--lib/inets/test/old_httpd_SUITE_data/server_root/icons/link.gifbin0 -> 249 bytes
-rw-r--r--lib/inets/test/old_httpd_SUITE_data/server_root/icons/movie.gifbin0 -> 243 bytes
-rw-r--r--lib/inets/test/old_httpd_SUITE_data/server_root/icons/p.gifbin0 -> 237 bytes
-rw-r--r--lib/inets/test/old_httpd_SUITE_data/server_root/icons/patch.gifbin0 -> 251 bytes
-rw-r--r--lib/inets/test/old_httpd_SUITE_data/server_root/icons/pdf.gifbin0 -> 249 bytes
-rw-r--r--lib/inets/test/old_httpd_SUITE_data/server_root/icons/pie0.gifbin0 -> 188 bytes
-rw-r--r--lib/inets/test/old_httpd_SUITE_data/server_root/icons/pie1.gifbin0 -> 198 bytes
-rw-r--r--lib/inets/test/old_httpd_SUITE_data/server_root/icons/pie2.gifbin0 -> 198 bytes
-rw-r--r--lib/inets/test/old_httpd_SUITE_data/server_root/icons/pie3.gifbin0 -> 191 bytes
-rw-r--r--lib/inets/test/old_httpd_SUITE_data/server_root/icons/pie4.gifbin0 -> 193 bytes
-rw-r--r--lib/inets/test/old_httpd_SUITE_data/server_root/icons/pie5.gifbin0 -> 189 bytes
-rw-r--r--lib/inets/test/old_httpd_SUITE_data/server_root/icons/pie6.gifbin0 -> 186 bytes
-rw-r--r--lib/inets/test/old_httpd_SUITE_data/server_root/icons/pie7.gifbin0 -> 185 bytes
-rw-r--r--lib/inets/test/old_httpd_SUITE_data/server_root/icons/pie8.gifbin0 -> 173 bytes
-rw-r--r--lib/inets/test/old_httpd_SUITE_data/server_root/icons/portal.gifbin0 -> 254 bytes
-rw-r--r--lib/inets/test/old_httpd_SUITE_data/server_root/icons/poweredby.gifbin0 -> 2748 bytes
-rw-r--r--lib/inets/test/old_httpd_SUITE_data/server_root/icons/ps.gifbin0 -> 244 bytes
-rw-r--r--lib/inets/test/old_httpd_SUITE_data/server_root/icons/quill.gifbin0 -> 267 bytes
-rw-r--r--lib/inets/test/old_httpd_SUITE_data/server_root/icons/right.gifbin0 -> 172 bytes
-rw-r--r--lib/inets/test/old_httpd_SUITE_data/server_root/icons/screw1.gifbin0 -> 258 bytes
-rw-r--r--lib/inets/test/old_httpd_SUITE_data/server_root/icons/screw2.gifbin0 -> 263 bytes
-rw-r--r--lib/inets/test/old_httpd_SUITE_data/server_root/icons/script.gifbin0 -> 242 bytes
-rw-r--r--lib/inets/test/old_httpd_SUITE_data/server_root/icons/sound1.gifbin0 -> 248 bytes
-rw-r--r--lib/inets/test/old_httpd_SUITE_data/server_root/icons/sound2.gifbin0 -> 221 bytes
-rw-r--r--lib/inets/test/old_httpd_SUITE_data/server_root/icons/sphere1.gifbin0 -> 285 bytes
-rw-r--r--lib/inets/test/old_httpd_SUITE_data/server_root/icons/sphere2.gifbin0 -> 264 bytes
-rw-r--r--lib/inets/test/old_httpd_SUITE_data/server_root/icons/star.gifbin0 -> 89 bytes
-rw-r--r--lib/inets/test/old_httpd_SUITE_data/server_root/icons/star_blank.gifbin0 -> 53 bytes
-rw-r--r--lib/inets/test/old_httpd_SUITE_data/server_root/icons/tar.gifbin0 -> 243 bytes
-rw-r--r--lib/inets/test/old_httpd_SUITE_data/server_root/icons/tex.gifbin0 -> 251 bytes
-rw-r--r--lib/inets/test/old_httpd_SUITE_data/server_root/icons/text.gifbin0 -> 229 bytes
-rw-r--r--lib/inets/test/old_httpd_SUITE_data/server_root/icons/transfer.gifbin0 -> 242 bytes
-rw-r--r--lib/inets/test/old_httpd_SUITE_data/server_root/icons/unknown.gifbin0 -> 245 bytes
-rw-r--r--lib/inets/test/old_httpd_SUITE_data/server_root/icons/up.gifbin0 -> 164 bytes
-rw-r--r--lib/inets/test/old_httpd_SUITE_data/server_root/icons/uu.gifbin0 -> 236 bytes
-rw-r--r--lib/inets/test/old_httpd_SUITE_data/server_root/icons/uuencoded.gifbin0 -> 236 bytes
-rw-r--r--lib/inets/test/old_httpd_SUITE_data/server_root/icons/world1.gifbin0 -> 228 bytes
-rw-r--r--lib/inets/test/old_httpd_SUITE_data/server_root/icons/world2.gifbin0 -> 261 bytes
-rw-r--r--lib/inets/test/old_httpd_SUITE_data/server_root/logs/Dummy_File_Needed_By_WinZip (renamed from lib/inets/test/httpd_SUITE_data/server_root/logs/Dummy_File_Needed_By_WinZip)0
-rw-r--r--lib/inets/test/old_httpd_SUITE_data/server_root/ssl/ssl_client.pem (renamed from lib/inets/test/httpd_SUITE_data/server_root/ssl/ssl_client.pem)0
-rw-r--r--lib/inets/test/old_httpd_SUITE_data/server_root/ssl/ssl_server.pem (renamed from lib/inets/test/httpd_SUITE_data/server_root/ssl/ssl_server.pem)0
-rw-r--r--lib/inets/vsn.mk5
-rw-r--r--lib/jinterface/doc/src/jinterface_users_guide.xml4
-rw-r--r--lib/jinterface/doc/src/notes.xml19
-rw-r--r--lib/jinterface/java_src/com/ericsson/otp/erlang/AbstractNode.java5
-rw-r--r--lib/jinterface/java_src/com/ericsson/otp/erlang/OtpErlangMap.java289
-rw-r--r--lib/jinterface/java_src/com/ericsson/otp/erlang/OtpExternal.java3
-rw-r--r--lib/jinterface/java_src/com/ericsson/otp/erlang/OtpInputStream.java20
-rw-r--r--lib/jinterface/java_src/com/ericsson/otp/erlang/OtpOutputStream.java5
-rw-r--r--lib/jinterface/java_src/com/ericsson/otp/erlang/java_files1
-rw-r--r--lib/jinterface/test/jinterface_SUITE.erl18
-rw-r--r--lib/jinterface/test/jinterface_SUITE_data/Makefile.src3
-rw-r--r--lib/jinterface/test/jinterface_SUITE_data/Maps.java108
-rw-r--r--lib/jinterface/test/jitu.erl4
-rw-r--r--lib/jinterface/vsn.mk2
-rw-r--r--lib/kernel/doc/src/Makefile4
-rw-r--r--lib/kernel/doc/src/app.xml36
-rw-r--r--lib/kernel/doc/src/application.xml22
-rw-r--r--lib/kernel/doc/src/file.xml134
-rw-r--r--lib/kernel/doc/src/inet.xml2
-rw-r--r--lib/kernel/doc/src/kernel_app.xml43
-rw-r--r--lib/kernel/doc/src/notes.xml197
-rw-r--r--lib/kernel/doc/src/ref_man.xml5
-rw-r--r--lib/kernel/doc/src/ref_man.xml.src67
-rw-r--r--lib/kernel/include/dist.hrl3
-rw-r--r--lib/kernel/src/application.erl29
-rw-r--r--lib/kernel/src/application_controller.erl77
-rw-r--r--lib/kernel/src/application_master.erl38
-rw-r--r--lib/kernel/src/code_server.erl18
-rw-r--r--lib/kernel/src/disk_log_server.erl12
-rw-r--r--lib/kernel/src/dist_util.erl5
-rw-r--r--lib/kernel/src/erts_debug.erl21
-rw-r--r--lib/kernel/src/file.erl18
-rw-r--r--lib/kernel/src/global.erl22
-rw-r--r--lib/kernel/src/hipe_unified_loader.erl35
-rw-r--r--lib/kernel/src/inet.erl5
-rw-r--r--lib/kernel/src/inet_config.erl3
-rw-r--r--lib/kernel/src/kernel.app.src3
-rw-r--r--lib/kernel/src/kernel.appup.src12
-rw-r--r--lib/kernel/src/os.erl13
-rw-r--r--lib/kernel/src/rpc.erl4
-rw-r--r--lib/kernel/test/application_SUITE.erl114
-rw-r--r--lib/kernel/test/application_SUITE_data/deadlock/deadlock.app2
-rw-r--r--lib/kernel/test/application_SUITE_data/deadlock/deadlock.erl12
-rw-r--r--lib/kernel/test/application_SUITE_data/t4.config1
-rw-r--r--lib/kernel/test/code_SUITE.erl81
-rw-r--r--lib/kernel/test/file_SUITE.erl161
-rw-r--r--lib/kernel/test/gen_tcp_misc_SUITE.erl33
-rw-r--r--lib/kernel/test/heart_SUITE.erl8
-rw-r--r--lib/kernel/test/kernel_SUITE.erl116
-rw-r--r--lib/kernel/test/prim_file_SUITE.erl175
-rw-r--r--lib/kernel/test/sendfile_SUITE.erl95
-rw-r--r--lib/kernel/test/zlib_SUITE.erl3
-rw-r--r--lib/megaco/aclocal.m450
-rw-r--r--lib/megaco/doc/src/notes.xml63
-rw-r--r--lib/megaco/src/app/megaco.app.src5
-rw-r--r--lib/megaco/src/app/megaco.appup.src13
-rw-r--r--lib/megaco/src/binary/depend.mk2
-rw-r--r--lib/megaco/src/binary/megaco_binary_encoder_lib.erl8
-rw-r--r--lib/megaco/vsn.mk4
-rw-r--r--lib/mnesia/doc/src/mnesia.xml26
-rw-r--r--lib/mnesia/doc/src/notes.xml64
-rw-r--r--lib/mnesia/src/mnesia.app.src3
-rw-r--r--lib/mnesia/src/mnesia.erl10
-rw-r--r--lib/mnesia/src/mnesia.hrl4
-rw-r--r--lib/mnesia/src/mnesia_controller.erl27
-rw-r--r--lib/mnesia/src/mnesia_dumper.erl29
-rw-r--r--lib/mnesia/src/mnesia_event.erl4
-rw-r--r--lib/mnesia/src/mnesia_index.erl14
-rw-r--r--lib/mnesia/src/mnesia_lib.erl72
-rw-r--r--lib/mnesia/src/mnesia_locker.erl17
-rw-r--r--lib/mnesia/src/mnesia_log.erl14
-rw-r--r--lib/mnesia/src/mnesia_monitor.erl15
-rw-r--r--lib/mnesia/src/mnesia_recover.erl8
-rw-r--r--lib/mnesia/src/mnesia_snmp_hook.erl8
-rw-r--r--lib/mnesia/src/mnesia_tm.erl5
-rw-r--r--lib/mnesia/test/mnesia_SUITE.erl15
-rw-r--r--lib/mnesia/test/mnesia_config_test.erl7
-rw-r--r--lib/mnesia/test/mnesia_durability_test.erl30
-rw-r--r--lib/mnesia/test/mnesia_evil_coverage_test.erl11
-rw-r--r--lib/mnesia/test/mnesia_frag_test.erl4
-rw-r--r--lib/mnesia/test/mnesia_nice_coverage_test.erl3
-rw-r--r--lib/mnesia/test/mnesia_qlc_test.erl2
-rw-r--r--lib/mnesia/test/mnesia_schema_recovery_test.erl143
-rw-r--r--lib/mnesia/test/mnesia_test_lib.hrl35
-rw-r--r--lib/mnesia/test/mnesia_trans_access_test.erl7
-rw-r--r--lib/mnesia/vsn.mk2
-rw-r--r--lib/observer/doc/src/Makefile13
-rw-r--r--lib/observer/doc/src/cdv.xml60
-rw-r--r--lib/observer/doc/src/crashdump.xml23
-rw-r--r--lib/observer/doc/src/crashdump_help.html307
-rw-r--r--lib/observer/doc/src/crashdump_ug.xml427
-rw-r--r--lib/observer/doc/src/notes.xml62
-rw-r--r--lib/observer/doc/src/ref_man.xml1
-rw-r--r--lib/observer/priv/erlang_observer.pngbin2679 -> 3698 bytes
-rw-r--r--lib/observer/src/Makefile24
-rw-r--r--lib/observer/src/cdv_atom_cb.erl48
-rw-r--r--lib/observer/src/cdv_bin_cb.erl82
-rw-r--r--lib/observer/src/cdv_detail_wx.erl158
-rw-r--r--lib/observer/src/cdv_dist_cb.erl97
-rw-r--r--lib/observer/src/cdv_ets_cb.erl67
-rw-r--r--lib/observer/src/cdv_fun_cb.erl58
-rw-r--r--lib/observer/src/cdv_gen_cb.erl45
-rw-r--r--lib/observer/src/cdv_html_wx.erl136
-rw-r--r--lib/observer/src/cdv_info_wx.erl128
-rw-r--r--lib/observer/src/cdv_int_tab_cb.erl86
-rw-r--r--lib/observer/src/cdv_mem_cb.erl84
-rw-r--r--lib/observer/src/cdv_mod_cb.erl102
-rw-r--r--lib/observer/src/cdv_multi_wx.erl188
-rw-r--r--lib/observer/src/cdv_port_cb.erl103
-rw-r--r--lib/observer/src/cdv_proc_cb.erl156
-rw-r--r--lib/observer/src/cdv_table_wx.erl106
-rw-r--r--lib/observer/src/cdv_term_cb.erl76
-rw-r--r--lib/observer/src/cdv_timer_cb.erl54
-rw-r--r--lib/observer/src/cdv_virtual_list_wx.erl419
-rw-r--r--lib/observer/src/cdv_wx.erl462
-rw-r--r--lib/observer/src/crashdump_viewer.erl2169
-rw-r--r--lib/observer/src/crashdump_viewer.hrl169
-rw-r--r--lib/observer/src/crashdump_viewer_html.erl1440
-rw-r--r--lib/observer/src/etop_tr.erl38
-rw-r--r--lib/observer/src/observer.app.src27
-rw-r--r--lib/observer/src/observer.appup.src10
-rw-r--r--lib/observer/src/observer.erl7
-rw-r--r--lib/observer/src/observer_app_wx.erl27
-rw-r--r--lib/observer/src/observer_defs.hrl11
-rw-r--r--lib/observer/src/observer_html_lib.erl407
-rw-r--r--lib/observer/src/observer_lib.erl403
-rw-r--r--lib/observer/src/observer_perf_wx.erl29
-rw-r--r--lib/observer/src/observer_pro_wx.erl107
-rw-r--r--lib/observer/src/observer_procinfo.erl242
-rw-r--r--lib/observer/src/observer_sys_wx.erl24
-rw-r--r--lib/observer/src/observer_trace_wx.erl7
-rw-r--r--lib/observer/src/observer_tv_table.erl123
-rw-r--r--lib/observer/src/observer_tv_wx.erl6
-rw-r--r--lib/observer/src/observer_wx.erl65
-rw-r--r--lib/observer/test/crashdump_helper.erl66
-rw-r--r--lib/observer/test/crashdump_viewer_SUITE.erl825
-rw-r--r--lib/observer/test/crashdump_viewer_SUITE_data/r10b_dump.trunc.100atoms13135
-rw-r--r--lib/observer/test/crashdump_viewer_SUITE_data/r10b_dump.trunc.250atoms13285
-rw-r--r--lib/observer/test/crashdump_viewer_SUITE_data/r10b_dump.trunc.50atoms13085
-rw-r--r--lib/observer/test/crashdump_viewer_SUITE_data/r10b_dump.trunc.noatoms13035
-rw-r--r--lib/observer/test/observer_SUITE.erl252
-rw-r--r--lib/observer/vsn.mk2
-rw-r--r--lib/odbc/aclocal.m450
-rw-r--r--lib/odbc/c_src/odbcserver.c1
-rw-r--r--lib/odbc/configure.in11
-rw-r--r--lib/odbc/doc/src/notes.xml68
-rw-r--r--lib/odbc/src/odbc.app.src3
-rw-r--r--lib/odbc/src/odbc.appup.src20
-rw-r--r--lib/odbc/test/odbc_start_SUITE.erl12
-rw-r--r--lib/odbc/vsn.mk2
-rw-r--r--lib/orber/doc/src/notes.xml21
-rw-r--r--lib/orber/src/Makefile3
-rw-r--r--lib/orber/src/orber.app.src4
-rw-r--r--lib/orber/src/orber_interceptors.erl11
-rw-r--r--lib/orber/vsn.mk2
-rw-r--r--lib/os_mon/c_src/memsup.c8
-rw-r--r--lib/os_mon/doc/src/notes.xml42
-rw-r--r--lib/os_mon/src/os_mon.app.src5
-rw-r--r--lib/os_mon/src/os_mon.appup.src27
-rw-r--r--lib/os_mon/test/cpu_sup_SUITE.erl6
-rw-r--r--lib/os_mon/test/disksup_SUITE.erl17
-rw-r--r--lib/os_mon/test/os_mon_SUITE.erl9
-rw-r--r--lib/os_mon/vsn.mk2
-rw-r--r--lib/ose/Makefile36
-rw-r--r--lib/ose/doc/html/.gitignore0
-rw-r--r--lib/ose/doc/man3/.gitignore0
-rw-r--r--lib/ose/doc/man6/.gitignore0
-rw-r--r--lib/ose/doc/pdf/.gitignore0
-rw-r--r--lib/ose/doc/src/.gitignore1
-rw-r--r--lib/ose/doc/src/Makefile132
-rw-r--r--lib/ose/doc/src/book.xml48
-rw-r--r--lib/ose/doc/src/notes.xml33
-rw-r--r--lib/ose/doc/src/ose_app.xml37
-rw-r--r--lib/ose/doc/src/ose_erl_driver.xml110
-rw-r--r--lib/ose/doc/src/ose_intro.xml153
-rw-r--r--lib/ose/doc/src/ose_signals_chapter.xml239
-rw-r--r--lib/ose/doc/src/part.xml38
-rw-r--r--lib/ose/doc/src/ref_man.xml39
-rw-r--r--lib/ose/ebin/.gitignore0
-rw-r--r--lib/ose/include/.gitignore0
-rw-r--r--lib/ose/info2
-rw-r--r--lib/ose/src/Makefile106
-rw-r--r--lib/ose/src/ose.app.src (renamed from lib/crypto/src/crypto_app.erl)40
-rw-r--r--lib/ose/src/ose.appup.src (renamed from lib/kernel/test/code_SUITE_data/calendar.erl)23
-rw-r--r--lib/ose/src/ose.erl452
-rw-r--r--lib/ose/test/Makefile67
-rw-r--r--lib/ose/test/ose.cover2
-rw-r--r--lib/ose/test/ose.spec1
-rw-r--r--lib/ose/test/ose_SUITE.erl765
-rw-r--r--lib/ose/vsn.mk1
-rw-r--r--lib/otp_mibs/doc/src/notes.xml49
-rw-r--r--lib/otp_mibs/src/otp_mibs.app.src4
-rw-r--r--lib/otp_mibs/src/otp_mibs.appup.src11
-rw-r--r--lib/otp_mibs/test/otp_mibs_SUITE.erl15
-rw-r--r--lib/otp_mibs/vsn.mk2
-rw-r--r--lib/parsetools/doc/src/notes.xml36
-rw-r--r--lib/parsetools/doc/src/yecc.xml8
-rw-r--r--lib/parsetools/src/parsetools.app.src3
-rw-r--r--lib/parsetools/src/parsetools.appup.src22
-rw-r--r--lib/parsetools/src/yecc.erl4
-rw-r--r--lib/parsetools/test/Makefile1
-rw-r--r--lib/parsetools/test/app_SUITE.erl50
-rw-r--r--lib/parsetools/vsn.mk2
-rw-r--r--lib/percept/doc/src/notes.xml29
-rw-r--r--lib/percept/src/percept.app.src4
-rw-r--r--lib/percept/src/percept.appup.src12
-rw-r--r--lib/percept/test/percept_SUITE.erl12
-rw-r--r--lib/percept/vsn.mk2
-rw-r--r--lib/public_key/asn1/Makefile5
-rw-r--r--lib/public_key/asn1/OTP-PUB-KEY.set.asn1
-rw-r--r--lib/public_key/asn1/RFC5639.asn127
-rw-r--r--lib/public_key/doc/src/cert_records.xml4
-rw-r--r--lib/public_key/doc/src/notes.xml64
-rw-r--r--lib/public_key/doc/src/part.xml4
-rw-r--r--lib/public_key/doc/src/public_key.xml90
-rw-r--r--lib/public_key/include/public_key.hrl21
-rw-r--r--lib/public_key/src/pubkey_cert.erl17
-rw-r--r--lib/public_key/src/pubkey_cert_records.erl34
-rw-r--r--lib/public_key/src/pubkey_crl.erl36
-rw-r--r--lib/public_key/src/pubkey_pem.erl8
-rw-r--r--lib/public_key/src/pubkey_ssh.erl7
-rw-r--r--lib/public_key/src/public_key.app.src4
-rw-r--r--lib/public_key/src/public_key.appup.src25
-rw-r--r--lib/public_key/src/public_key.erl23
-rw-r--r--lib/public_key/test/public_key_SUITE.erl9
-rw-r--r--lib/public_key/vsn.mk2
-rw-r--r--lib/reltool/doc/src/notes.xml48
-rw-r--r--lib/reltool/src/reltool.app.src4
-rw-r--r--lib/reltool/src/reltool.appup.src9
-rw-r--r--lib/reltool/src/reltool.hrl3
-rw-r--r--lib/reltool/src/reltool_server.erl3
-rw-r--r--lib/reltool/src/reltool_utils.erl2
-rw-r--r--lib/reltool/test/reltool_app_SUITE.erl9
-rw-r--r--lib/reltool/test/reltool_server_SUITE.erl18
-rw-r--r--lib/reltool/test/reltool_test_lib.erl60
-rw-r--r--lib/reltool/vsn.mk2
-rw-r--r--lib/runtime_tools/c_src/Makefile.in33
-rw-r--r--lib/runtime_tools/c_src/dyntrace.c3
-rw-r--r--lib/runtime_tools/doc/specs/.gitignore1
-rw-r--r--lib/runtime_tools/doc/src/Makefile10
-rw-r--r--lib/runtime_tools/doc/src/dbg.xml4
-rw-r--r--lib/runtime_tools/doc/src/notes.xml89
-rw-r--r--lib/runtime_tools/doc/src/ref_man.xml1
-rw-r--r--lib/runtime_tools/doc/src/specs.xml4
-rw-r--r--lib/runtime_tools/doc/src/system_information.xml98
-rw-r--r--lib/runtime_tools/src/dbg.erl4
-rw-r--r--lib/runtime_tools/src/erts_alloc_config.erl169
-rw-r--r--lib/runtime_tools/src/observer_backend.erl43
-rw-r--r--lib/runtime_tools/src/runtime_tools.app.src4
-rw-r--r--lib/runtime_tools/src/runtime_tools.appup.src10
-rw-r--r--lib/runtime_tools/src/system_information.erl288
-rw-r--r--lib/runtime_tools/test/runtime_tools_SUITE.erl6
-rw-r--r--lib/runtime_tools/test/system_information_SUITE.erl10
-rw-r--r--lib/runtime_tools/test/system_information_SUITE_data/information_test_report.dat3
-rw-r--r--lib/runtime_tools/vsn.mk2
-rw-r--r--lib/sasl/doc/src/appup.xml23
-rw-r--r--lib/sasl/doc/src/notes.xml58
-rw-r--r--lib/sasl/examples/src/target_system.erl16
-rw-r--r--lib/sasl/src/sasl.app.src4
-rw-r--r--lib/sasl/src/sasl.appup.src12
-rw-r--r--lib/sasl/src/systools_make.erl2
-rw-r--r--lib/sasl/src/systools_rc.erl14
-rw-r--r--lib/sasl/test/release_handler_SUITE.erl101
-rw-r--r--lib/sasl/test/sasl_SUITE.erl126
-rw-r--r--lib/sasl/test/systools_SUITE.erl58
-rw-r--r--lib/sasl/test/systools_SUITE_data/d_duplicate_modules/lib/app1-1.0/ebin/app1.app7
-rw-r--r--lib/sasl/test/systools_SUITE_data/d_duplicate_modules/lib/app1-1.0/src/myapp.erl2
-rw-r--r--lib/sasl/test/systools_SUITE_data/d_duplicate_modules/lib/app2-1.0/ebin/app2.app7
-rw-r--r--lib/sasl/test/systools_SUITE_data/d_duplicate_modules/lib/app2-1.0/src/myapp.erl2
-rw-r--r--lib/sasl/test/systools_rc_SUITE.erl168
-rw-r--r--lib/sasl/test/test_lib.hrl4
-rw-r--r--lib/snmp/doc/src/notes.xml105
-rw-r--r--lib/snmp/doc/src/snmpa_mib_data.xml4
-rw-r--r--lib/snmp/doc/src/snmpa_mib_storage.xml4
-rw-r--r--lib/snmp/src/app/snmp.app.src4
-rw-r--r--lib/snmp/src/app/snmp.appup.src12
-rw-r--r--lib/snmp/test/Makefile4
-rw-r--r--lib/snmp/test/modules.mk3
-rw-r--r--lib/snmp/test/snmp_agent_test.erl310
-rw-r--r--lib/snmp/test/snmp_agent_test_lib.erl22
-rw-r--r--lib/snmp/test/snmp_appup_test.erl491
-rw-r--r--lib/snmp/test/snmp_manager_test.erl337
-rw-r--r--lib/snmp/test/snmp_test_manager.erl6
-rw-r--r--lib/snmp/test/snmp_test_mgr.erl3
-rw-r--r--lib/snmp/test/snmp_test_mgr_counter_server.erl152
-rw-r--r--lib/snmp/vsn.mk4
-rw-r--r--lib/ssh/doc/src/notes.xml172
-rw-r--r--lib/ssh/doc/src/ssh.xml37
-rw-r--r--lib/ssh/doc/src/using_ssh.xml4
-rw-r--r--lib/ssh/src/ssh.app.src4
-rw-r--r--lib/ssh/src/ssh.appup.src16
-rw-r--r--lib/ssh/src/ssh.erl31
-rw-r--r--lib/ssh/src/ssh.hrl1
-rw-r--r--lib/ssh/src/ssh_acceptor.erl44
-rw-r--r--lib/ssh/src/ssh_auth.erl11
-rw-r--r--lib/ssh/src/ssh_bits.erl4
-rw-r--r--lib/ssh/src/ssh_cli.erl17
-rw-r--r--lib/ssh/src/ssh_connection.erl28
-rw-r--r--lib/ssh/src/ssh_connection_handler.erl19
-rw-r--r--lib/ssh/src/ssh_file.erl26
-rw-r--r--lib/ssh/src/ssh_io.erl2
-rw-r--r--lib/ssh/src/ssh_message.erl34
-rw-r--r--lib/ssh/src/ssh_sftp.erl7
-rw-r--r--lib/ssh/src/ssh_sftpd.erl20
-rw-r--r--lib/ssh/src/ssh_xfer.erl57
-rw-r--r--lib/ssh/test/ssh_basic_SUITE.erl146
-rw-r--r--lib/ssh/test/ssh_test_lib.erl16
-rw-r--r--lib/ssh/test/ssh_unicode_SUITE.erl587
-rw-r--r--lib/ssh/test/ssh_unicode_SUITE_data/sftp.txt1
-rw-r--r--lib/ssh/test/ssh_unicode_SUITE_data/sftp瑞点.txt1
-rw-r--r--lib/ssh/test/ssh_unicode_SUITE_data/ssh_host_dsa_key13
-rw-r--r--lib/ssh/test/ssh_unicode_SUITE_data/ssh_host_dsa_key.pub11
-rw-r--r--lib/ssh/vsn.mk2
-rw-r--r--lib/ssl/doc/src/notes.xml193
-rw-r--r--lib/ssl/doc/src/ssl.xml101
-rw-r--r--lib/ssl/internal_doc/ssl-implementation.txt52
-rw-r--r--lib/ssl/src/Makefile3
-rw-r--r--lib/ssl/src/dtls.erl46
-rw-r--r--lib/ssl/src/dtls_connection.erl725
-rw-r--r--lib/ssl/src/dtls_connection.hrl21
-rw-r--r--lib/ssl/src/dtls_connection_sup.erl12
-rw-r--r--lib/ssl/src/dtls_handshake.erl402
-rw-r--r--lib/ssl/src/dtls_handshake.hrl4
-rw-r--r--lib/ssl/src/dtls_record.erl57
-rw-r--r--lib/ssl/src/dtls_record.hrl13
-rw-r--r--lib/ssl/src/dtls_v1.erl4
-rw-r--r--lib/ssl/src/ssl.app.src5
-rw-r--r--lib/ssl/src/ssl.appup.src23
-rw-r--r--lib/ssl/src/ssl.erl533
-rw-r--r--lib/ssl/src/ssl_alert.erl47
-rw-r--r--lib/ssl/src/ssl_alert.hrl18
-rw-r--r--lib/ssl/src/ssl_api.hrl33
-rw-r--r--lib/ssl/src/ssl_cipher.erl40
-rw-r--r--lib/ssl/src/ssl_cipher.hrl12
-rw-r--r--lib/ssl/src/ssl_connection.erl230
-rw-r--r--lib/ssl/src/ssl_connection.hrl17
-rw-r--r--lib/ssl/src/ssl_dist_sup.erl16
-rw-r--r--lib/ssl/src/ssl_handshake.erl191
-rw-r--r--lib/ssl/src/ssl_handshake.hrl16
-rw-r--r--lib/ssl/src/ssl_internal.hrl38
-rw-r--r--lib/ssl/src/ssl_listen_tracker_sup.erl71
-rw-r--r--lib/ssl/src/ssl_manager.erl54
-rw-r--r--lib/ssl/src/ssl_pkix_db.erl4
-rw-r--r--lib/ssl/src/ssl_record.erl19
-rw-r--r--lib/ssl/src/ssl_record.hrl6
-rw-r--r--lib/ssl/src/ssl_socket.erl209
-rw-r--r--lib/ssl/src/ssl_sup.erl29
-rw-r--r--lib/ssl/src/ssl_v3.erl4
-rw-r--r--lib/ssl/src/tls.erl45
-rw-r--r--lib/ssl/src/tls_connection.erl154
-rw-r--r--lib/ssl/src/tls_connection_sup.erl4
-rw-r--r--lib/ssl/src/tls_handshake.erl42
-rw-r--r--lib/ssl/src/tls_handshake.hrl4
-rw-r--r--lib/ssl/src/tls_record.erl44
-rw-r--r--lib/ssl/src/tls_v1.erl90
-rw-r--r--lib/ssl/test/Makefile1
-rw-r--r--lib/ssl/test/make_certs.erl315
-rw-r--r--lib/ssl/test/ssl_basic_SUITE.erl501
-rw-r--r--lib/ssl/test/ssl_crl_SUITE.erl542
-rw-r--r--lib/ssl/test/ssl_dist_SUITE.erl2
-rw-r--r--lib/ssl/test/ssl_handshake_SUITE.erl26
-rw-r--r--lib/ssl/test/ssl_test_lib.erl262
-rw-r--r--lib/ssl/test/ssl_to_openssl_SUITE.erl67
-rw-r--r--lib/ssl/vsn.mk2
-rw-r--r--lib/stdlib/doc/src/Makefile1
-rw-r--r--lib/stdlib/doc/src/array.xml16
-rw-r--r--lib/stdlib/doc/src/dict.xml10
-rw-r--r--lib/stdlib/doc/src/digraph.xml4
-rw-r--r--lib/stdlib/doc/src/epp.xml64
-rw-r--r--lib/stdlib/doc/src/erl_parse.xml10
-rw-r--r--lib/stdlib/doc/src/erl_tar.xml27
-rw-r--r--lib/stdlib/doc/src/ets.xml6
-rw-r--r--lib/stdlib/doc/src/gb_sets.xml90
-rw-r--r--lib/stdlib/doc/src/gb_trees.xml46
-rw-r--r--lib/stdlib/doc/src/lists.xml8
-rw-r--r--lib/stdlib/doc/src/maps.xml338
-rw-r--r--lib/stdlib/doc/src/notes.xml384
-rw-r--r--lib/stdlib/doc/src/pg.xml5
-rw-r--r--lib/stdlib/doc/src/queue.xml10
-rw-r--r--lib/stdlib/doc/src/ref_man.xml1
-rw-r--r--lib/stdlib/doc/src/sets.xml10
-rw-r--r--lib/stdlib/doc/src/specs.xml1
-rw-r--r--lib/stdlib/doc/src/supervisor.xml6
-rw-r--r--lib/stdlib/doc/src/sys.xml73
-rw-r--r--lib/stdlib/doc/src/unicode_usage.xml75
-rw-r--r--lib/stdlib/doc/src/zip.xml13
-rw-r--r--lib/stdlib/examples/erl_id_trans.erl35
-rw-r--r--lib/stdlib/src/Makefile1
-rw-r--r--lib/stdlib/src/array.erl102
-rw-r--r--lib/stdlib/src/c.erl11
-rw-r--r--lib/stdlib/src/dets.erl12
-rw-r--r--lib/stdlib/src/dict.erl123
-rw-r--r--lib/stdlib/src/digraph.erl98
-rw-r--r--lib/stdlib/src/digraph_utils.erl44
-rw-r--r--lib/stdlib/src/edlin_expand.erl8
-rw-r--r--lib/stdlib/src/epp.erl181
-rw-r--r--lib/stdlib/src/erl_compile.erl18
-rw-r--r--lib/stdlib/src/erl_eval.erl72
-rw-r--r--lib/stdlib/src/erl_expand_records.erl22
-rw-r--r--lib/stdlib/src/erl_internal.erl5
-rw-r--r--lib/stdlib/src/erl_lint.erl391
-rw-r--r--lib/stdlib/src/erl_parse.yrl130
-rw-r--r--lib/stdlib/src/erl_pp.erl32
-rw-r--r--lib/stdlib/src/erl_scan.erl7
-rw-r--r--lib/stdlib/src/erl_tar.erl38
-rw-r--r--lib/stdlib/src/escript.erl15
-rw-r--r--lib/stdlib/src/ets.erl4
-rw-r--r--lib/stdlib/src/filelib.erl2
-rw-r--r--lib/stdlib/src/filename.erl6
-rw-r--r--lib/stdlib/src/gb_sets.erl167
-rw-r--r--lib/stdlib/src/gb_trees.erl139
-rw-r--r--lib/stdlib/src/gen.erl6
-rw-r--r--lib/stdlib/src/gen_event.erl37
-rw-r--r--lib/stdlib/src/gen_fsm.erl20
-rw-r--r--lib/stdlib/src/gen_server.erl16
-rw-r--r--lib/stdlib/src/io.erl10
-rw-r--r--lib/stdlib/src/io_lib.erl16
-rw-r--r--lib/stdlib/src/io_lib_pretty.erl53
-rw-r--r--lib/stdlib/src/lists.erl15
-rw-r--r--lib/stdlib/src/maps.erl203
-rw-r--r--lib/stdlib/src/ms_transform.erl2
-rw-r--r--lib/stdlib/src/orddict.erl8
-rw-r--r--lib/stdlib/src/otp_internal.erl69
-rw-r--r--lib/stdlib/src/pg.erl3
-rw-r--r--lib/stdlib/src/qlc_pt.erl11
-rw-r--r--lib/stdlib/src/queue.erl75
-rw-r--r--lib/stdlib/src/re.erl3
-rw-r--r--lib/stdlib/src/sets.erl115
-rw-r--r--lib/stdlib/src/slave.erl23
-rw-r--r--lib/stdlib/src/sofs.erl10
-rw-r--r--lib/stdlib/src/stdlib.app.src6
-rw-r--r--lib/stdlib/src/stdlib.appup.src12
-rw-r--r--lib/stdlib/src/supervisor.erl52
-rw-r--r--lib/stdlib/src/supervisor_bridge.erl11
-rw-r--r--lib/stdlib/src/sys.erl65
-rw-r--r--lib/stdlib/src/zip.erl37
-rw-r--r--lib/stdlib/test/Makefile5
-rw-r--r--lib/stdlib/test/binary_module_SUITE.erl4
-rw-r--r--lib/stdlib/test/dets_SUITE.erl116
-rw-r--r--lib/stdlib/test/edlin_expand_SUITE.erl165
-rw-r--r--lib/stdlib/test/epp_SUITE.erl106
-rw-r--r--lib/stdlib/test/erl_eval_SUITE.erl46
-rw-r--r--lib/stdlib/test/erl_expand_records_SUITE.erl21
-rw-r--r--lib/stdlib/test/erl_lint_SUITE.erl302
-rw-r--r--lib/stdlib/test/erl_lint_SUITE_data/predef.erl67
-rw-r--r--lib/stdlib/test/erl_lint_SUITE_data/predef2.erl56
-rw-r--r--lib/stdlib/test/erl_pp_SUITE.erl33
-rw-r--r--lib/stdlib/test/erl_scan_SUITE.erl30
-rw-r--r--lib/stdlib/test/ets_SUITE.erl18
-rw-r--r--lib/stdlib/test/expand_test.erl6
-rw-r--r--lib/stdlib/test/expand_test1.erl4
-rw-r--r--lib/stdlib/test/filelib_SUITE.erl40
-rw-r--r--lib/stdlib/test/filename_SUITE.erl53
-rw-r--r--lib/stdlib/test/gen_event_SUITE.erl11
-rw-r--r--lib/stdlib/test/gen_fsm_SUITE.erl20
-rw-r--r--lib/stdlib/test/gen_server_SUITE.erl15
-rw-r--r--lib/stdlib/test/lists_SUITE.erl12
-rw-r--r--lib/stdlib/test/maps_SUITE.erl69
-rw-r--r--lib/stdlib/test/qlc_SUITE.erl19
-rw-r--r--lib/stdlib/test/shell_SUITE.erl20
-rw-r--r--lib/stdlib/test/stdlib_SUITE.erl117
-rw-r--r--lib/stdlib/test/supervisor_SUITE.erl57
-rw-r--r--lib/stdlib/test/sys_SUITE.erl84
-rw-r--r--lib/stdlib/test/sys_sp1.erl114
-rw-r--r--lib/stdlib/test/sys_sp2.erl107
-rw-r--r--lib/stdlib/test/tar_SUITE.erl66
-rw-r--r--lib/stdlib/test/unicode_SUITE.erl12
-rw-r--r--lib/syntax_tools/doc/src/notes.xml82
-rw-r--r--lib/syntax_tools/src/erl_prettypr.erl34
-rw-r--r--lib/syntax_tools/src/erl_syntax.erl279
-rw-r--r--lib/syntax_tools/src/erl_syntax_lib.erl10
-rw-r--r--lib/syntax_tools/src/erl_tidy.erl37
-rw-r--r--lib/syntax_tools/src/igor.erl20
-rw-r--r--lib/syntax_tools/src/syntax_tools.app.src3
-rw-r--r--lib/syntax_tools/src/syntax_tools.appup.src22
-rw-r--r--lib/syntax_tools/test/syntax_tools_SUITE.erl46
-rw-r--r--lib/syntax_tools/vsn.mk2
-rw-r--r--lib/test_server/doc/src/notes.xml42
-rw-r--r--lib/test_server/doc/src/test_server.xml25
-rw-r--r--lib/test_server/doc/src/test_server_ctrl.xml11
-rw-r--r--lib/test_server/src/configure.in84
-rw-r--r--lib/test_server/src/test_server.app.src5
-rw-r--r--lib/test_server/src/test_server.appup.src22
-rw-r--r--lib/test_server/src/test_server.erl60
-rw-r--r--lib/test_server/src/test_server_ctrl.erl337
-rw-r--r--lib/test_server/src/test_server_node.erl10
-rw-r--r--lib/test_server/src/test_server_sup.erl313
-rw-r--r--lib/test_server/src/ts.erl104
-rw-r--r--lib/test_server/src/ts.unix.config2
-rw-r--r--lib/test_server/src/ts_install.erl14
-rw-r--r--lib/test_server/src/ts_lib.erl2
-rw-r--r--lib/test_server/src/ts_make.erl6
-rw-r--r--lib/test_server/src/ts_run.erl11
-rw-r--r--lib/test_server/test/test_server_SUITE_data/test_server_parallel01_SUITE.erl16
-rw-r--r--lib/test_server/vsn.mk2
-rw-r--r--lib/tools/c_src/Makefile.in8
-rw-r--r--lib/tools/doc/src/notes.xml76
-rw-r--r--lib/tools/emacs/erlang-skels.el24
-rw-r--r--lib/tools/emacs/erlang.el43
-rw-r--r--lib/tools/emacs/test.erl.indented16
-rw-r--r--lib/tools/emacs/test.erl.orig16
-rw-r--r--lib/tools/src/cover.erl186
-rw-r--r--lib/tools/src/tools.app.src22
-rw-r--r--lib/tools/src/tools.appup.src40
-rw-r--r--lib/tools/src/xref_compiler.erl4
-rw-r--r--lib/tools/src/xref_utils.erl4
-rw-r--r--lib/tools/test/cover_SUITE.erl125
-rw-r--r--lib/tools/test/cover_SUITE_data/f.erl7
-rw-r--r--lib/tools/test/eprof_SUITE.erl18
-rw-r--r--lib/tools/test/tools_SUITE.erl8
-rw-r--r--lib/tools/test/xref_SUITE.erl2
-rw-r--r--lib/tools/vsn.mk2
-rw-r--r--lib/typer/Makefile2
-rw-r--r--lib/typer/doc/Makefile39
-rw-r--r--lib/typer/doc/html/.gitignore0
-rw-r--r--lib/typer/doc/pdf/.gitignore0
-rw-r--r--lib/typer/doc/src/Makefile117
-rw-r--r--lib/typer/doc/src/book.xml41
-rw-r--r--lib/typer/doc/src/fascicules.xml12
-rw-r--r--lib/typer/doc/src/notes.xml51
-rw-r--r--lib/typer/doc/src/part_notes.xml35
-rw-r--r--lib/typer/doc/src/ref_man.xml35
-rw-r--r--lib/typer/doc/src/typer_app.xml43
-rw-r--r--lib/typer/info2
-rw-r--r--lib/typer/src/Makefile2
-rw-r--r--lib/typer/src/typer.app.src4
-rw-r--r--lib/typer/src/typer.appup.src22
-rw-r--r--lib/typer/src/typer.erl30
-rw-r--r--lib/typer/test/Makefile65
-rw-r--r--lib/typer/test/typer.spec1
-rw-r--r--lib/typer/test/typer_SUITE.erl56
-rw-r--r--lib/typer/vsn.mk2
-rw-r--r--lib/webtool/doc/src/notes.xml29
-rw-r--r--lib/webtool/src/Makefile2
-rw-r--r--lib/webtool/src/webtool.app.src4
-rw-r--r--lib/webtool/src/webtool.appup.src10
-rw-r--r--lib/webtool/test/Makefile65
-rw-r--r--lib/webtool/test/webtool.spec1
-rw-r--r--lib/webtool/test/webtool_SUITE.erl50
-rw-r--r--lib/webtool/vsn.mk2
-rw-r--r--lib/wx/aclocal.m450
-rw-r--r--lib/wx/api_gen/Makefile4
-rw-r--r--lib/wx/api_gen/gen_util.erl10
-rw-r--r--lib/wx/api_gen/wx_doxygen.conf3
-rw-r--r--lib/wx/api_gen/wx_extra/wxEvtHandler.c_src36
-rw-r--r--lib/wx/api_gen/wx_extra/wxEvtHandler.erl46
-rw-r--r--lib/wx/api_gen/wx_extra/wxListCtrl.c_src4
-rw-r--r--lib/wx/api_gen/wx_gen.erl22
-rw-r--r--lib/wx/api_gen/wx_gen_cpp.erl78
-rw-r--r--lib/wx/api_gen/wx_gen_erl.erl54
-rw-r--r--lib/wx/api_gen/wxapi.conf23
-rw-r--r--lib/wx/c_src/Makefile.in17
-rw-r--r--lib/wx/c_src/gen/wxe_derived_dest.h14
-rw-r--r--lib/wx/c_src/gen/wxe_events.cpp160
-rw-r--r--lib/wx/c_src/gen/wxe_funcs.cpp307
-rw-r--r--lib/wx/c_src/gen/wxe_macros.h1217
-rw-r--r--lib/wx/c_src/wxe_callback_impl.cpp (renamed from lib/wx/c_src/wxePrintout.cpp)82
-rw-r--r--lib/wx/c_src/wxe_callback_impl.h100
-rw-r--r--lib/wx/c_src/wxe_driver.c4
-rw-r--r--lib/wx/c_src/wxe_driver.h3
-rw-r--r--lib/wx/c_src/wxe_events.h45
-rw-r--r--lib/wx/c_src/wxe_gl.cpp17
-rw-r--r--lib/wx/c_src/wxe_gl.h25
-rw-r--r--lib/wx/c_src/wxe_helpers.cpp95
-rw-r--r--lib/wx/c_src/wxe_helpers.h122
-rw-r--r--lib/wx/c_src/wxe_impl.cpp490
-rw-r--r--lib/wx/c_src/wxe_impl.h231
-rw-r--r--lib/wx/c_src/wxe_main.cpp163
-rw-r--r--lib/wx/c_src/wxe_memory.h61
-rw-r--r--[-rwxr-xr-x]lib/wx/configure.in30
-rw-r--r--lib/wx/doc/src/notes.xml69
-rw-r--r--lib/wx/include/wx.hrl255
-rw-r--r--lib/wx/priv/erlang-logo128.pngbin0 -> 6268 bytes
-rw-r--r--lib/wx/priv/erlang-logo32.pngbin1608 -> 1291 bytes
-rw-r--r--lib/wx/priv/erlang-logo64.pngbin4149 -> 2647 bytes
-rw-r--r--lib/wx/src/gen/wxBufferedDC.erl4
-rw-r--r--lib/wx/src/gen/wxBufferedPaintDC.erl4
-rw-r--r--lib/wx/src/gen/wxClientDC.erl4
-rw-r--r--lib/wx/src/gen/wxEvtHandler.erl48
-rw-r--r--lib/wx/src/gen/wxGridCellBoolEditor.erl4
-rw-r--r--lib/wx/src/gen/wxGridCellChoiceEditor.erl4
-rw-r--r--lib/wx/src/gen/wxGridCellFloatEditor.erl4
-rw-r--r--lib/wx/src/gen/wxGridCellNumberEditor.erl4
-rw-r--r--lib/wx/src/gen/wxGridCellTextEditor.erl4
-rw-r--r--lib/wx/src/gen/wxInitDialogEvent.erl64
-rw-r--r--lib/wx/src/gen/wxLocale.erl278
-rw-r--r--lib/wx/src/gen/wxMemoryDC.erl4
-rw-r--r--lib/wx/src/gen/wxMirrorDC.erl4
-rw-r--r--lib/wx/src/gen/wxPaintDC.erl4
-rw-r--r--lib/wx/src/gen/wxPostScriptDC.erl4
-rw-r--r--lib/wx/src/gen/wxScreenDC.erl4
-rw-r--r--lib/wx/src/gen/wxWindowDC.erl4
-rw-r--r--lib/wx/src/gen/wx_misc.erl18
-rw-r--r--lib/wx/src/gen/wxe_debug.hrl1217
-rw-r--r--lib/wx/src/gen/wxe_funcs.hrl1217
-rw-r--r--lib/wx/src/wx.app.src3
-rw-r--r--lib/wx/src/wx.appup.src10
-rw-r--r--lib/wx/src/wxe.hrl5
-rw-r--r--lib/wx/src/wxe_master.erl18
-rw-r--r--lib/wx/src/wxe_server.erl205
-rw-r--r--lib/wx/src/wxe_util.erl33
-rw-r--r--lib/wx/test/wx_app_SUITE.erl9
-rw-r--r--lib/wx/test/wx_basic_SUITE.erl63
-rw-r--r--lib/wx/test/wx_class_SUITE.erl17
-rw-r--r--lib/wx/test/wx_event_SUITE.erl85
-rw-r--r--lib/wx/test/wx_obj_test.erl72
-rw-r--r--lib/wx/vsn.mk2
-rw-r--r--lib/xmerl/doc/src/notes.xml58
-rw-r--r--lib/xmerl/src/xmerl.app.src3
-rw-r--r--lib/xmerl/src/xmerl.appup.src31
-rw-r--r--lib/xmerl/src/xmerl_sax_parser.erl32
-rw-r--r--lib/xmerl/src/xmerl_sax_parser.hrl10
-rw-r--r--lib/xmerl/src/xmerl_sax_parser_base.erlsrc65
-rw-r--r--lib/xmerl/test/xmerl_appup_test.erl339
-rw-r--r--lib/xmerl/test/xmerl_sax_SUITE.erl35
-rw-r--r--lib/xmerl/test/xmerl_sax_std_SUITE.erl12
-rw-r--r--lib/xmerl/test/xmerl_xsd_MS2002-01-16_SUITE.erl7
-rw-r--r--lib/xmerl/test/xmerl_xsd_MS2002-01-16_SUITE_data/msx_failed_cases.log2
-rw-r--r--lib/xmerl/vsn.mk2
1400 files changed, 70673 insertions, 78080 deletions
diff --git a/lib/Makefile b/lib/Makefile
index 5128241563..95170d8a56 100644
--- a/lib/Makefile
+++ b/lib/Makefile
@@ -25,16 +25,17 @@ ERTS_APPLICATIONS = stdlib sasl kernel compiler
# Then these have to be build
ERLANG_APPLICATIONS = tools test_server common_test runtime_tools \
- inets xmerl edoc erl_docgen
+ inets parsetools
# These are only build if -a is given to otp_build or make is used directly
-ALL_ERLANG_APPLICATIONS = snmp otp_mibs erl_interface asn1 jinterface \
+ALL_ERLANG_APPLICATIONS = xmerl edoc erl_docgen snmp otp_mibs erl_interface \
+ asn1 jinterface \
wx debugger reltool gs \
- ic mnesia crypto orber os_mon parsetools syntax_tools \
+ ic mnesia crypto orber os_mon syntax_tools \
public_key ssl observer odbc diameter \
cosTransactions cosEvent cosTime cosNotification \
cosProperty cosFileTransfer cosEventDomain et megaco webtool \
- eunit ssh typer percept eldap dialyzer hipe
+ eunit ssh typer percept eldap dialyzer hipe ose
ifdef BUILD_ALL
ERLANG_APPLICATIONS += $(ALL_ERLANG_APPLICATIONS)
@@ -59,10 +60,14 @@ else
else
ifdef TERTIARY_BOOTSTRAP
SUB_DIRECTORIES = snmp sasl jinterface ic syntax_tools wx
- else # Not bootstrap build
- SUB_DIRECTORIES = $(ERTS_APPLICATIONS) \
- $(ERLANG_APPLICATIONS) \
- $(EXTRA_APPLICATIONS)
+ else
+ ifdef DOC_BOOTSTRAP
+ SUB_DIRECTORIES = xmerl edoc erl_docgen
+ else # Not bootstrap build
+ SUB_DIRECTORIES = $(ERTS_APPLICATIONS) \
+ $(ERLANG_APPLICATIONS) \
+ $(EXTRA_APPLICATIONS)
+ endif
endif
endif
endif
diff --git a/lib/asn1/Makefile b/lib/asn1/Makefile
index 1bc303b73c..18e95a2471 100644
--- a/lib/asn1/Makefile
+++ b/lib/asn1/Makefile
@@ -25,6 +25,7 @@ include $(ERL_TOP)/make/$(TARGET)/otp.mk
#
SUB_DIRECTORIES = src doc/src c_src
+
static_lib: SUB_DIRECTORIES = c_src
@@ -62,7 +63,6 @@ info:
version:
@echo "$(VSN)"
-
# ----------------------------------------------------
# Application (source) release targets
# ----------------------------------------------------
diff --git a/lib/asn1/c_src/Makefile b/lib/asn1/c_src/Makefile
index ded4b73d1b..a7cd03f516 100644
--- a/lib/asn1/c_src/Makefile
+++ b/lib/asn1/c_src/Makefile
@@ -96,7 +96,12 @@ endif
_create_dirs := $(shell mkdir -p $(OBJDIR) $(LIBDIR))
+ifneq ($(findstring ose,$(TARGET)),ose)
opt: $(NIF_SHARED_OBJ_FILE)
+else
+# Do not build dynamic files on OSE
+opt:
+endif
debug: opt
@@ -134,7 +139,9 @@ include $(ERL_TOP)/make/otp_release_targets.mk
release_spec: opt
$(INSTALL_DIR) "$(RELSYSDIR)/priv/lib"
+ifneq ($(findstring ose,$(TARGET)),ose)
$(INSTALL_PROGRAM) $(NIF_SHARED_OBJ_FILE) "$(RELSYSDIR)/priv/lib"
+endif
$(INSTALL_DIR) "$(RELSYSDIR)/c_src"
$(INSTALL_DATA) *.c "$(RELSYSDIR)/c_src"
diff --git a/lib/asn1/c_src/asn1_erl_nif.c b/lib/asn1/c_src/asn1_erl_nif.c
index 0930010fda..8a0e4b1cf0 100644
--- a/lib/asn1/c_src/asn1_erl_nif.c
+++ b/lib/asn1/c_src/asn1_erl_nif.c
@@ -1320,6 +1320,7 @@ static void unload(ErlNifEnv* env, void* priv_data) {
}
+
static ErlNifFunc nif_funcs[] = {
{ "encode_per_complete", 1, encode_per_complete },
{ "decode_ber_tlv_raw", 1, decode_ber_tlv_raw },
diff --git a/lib/asn1/doc/src/asn1_ug.xml b/lib/asn1/doc/src/asn1_ug.xml
index 74c4aa9948..020e58c615 100644
--- a/lib/asn1/doc/src/asn1_ug.xml
+++ b/lib/asn1/doc/src/asn1_ug.xml
@@ -34,23 +34,25 @@
<section>
<title>Features</title>
- <p>The Asn1 application provides:
- </p>
+ <p>The Asn1 application provides:</p>
<list type="bulleted">
<item>An ASN.1 compiler for Erlang, which generates encode and
decode functions to be used by Erlang programs sending and
receiving ASN.1 specified data.</item>
<item>Run-time functions used by the generated code.</item>
- <item>The supported encoding rules are:
+ <item>Support for the following encoding rules:
<list>
<item>
Basic Encoding Rules (<em>BER</em>)
</item>
<item>
- Distinguished Encoding Rules (<em>DER</em>), a specialized form of BER that is used in security-conscious applications.
+ Distinguished Encoding Rules (<em>DER</em>), a specialized
+ form of BER that is used in security-conscious
+ applications.
</item>
<item>
- Packed Encoding Rules (<em>PER</em>) both the aligned and unaligned variant.
+ Packed Encoding Rules (<em>PER</em>); both the aligned and
+ unaligned variant.
</item>
</list>
</item>
@@ -59,71 +61,41 @@
<section>
<title>Overview</title>
- <p>ASN.1 (Abstract Syntax Notation 1) is a formal language for describing data structures to be exchanged between distributed computer systems.
- The purpose of ASN.1 is to have
- a platform and programming language independent notation to express
- types using a
- standardized set of rules for the transformation of values of
- a defined type, into a stream of bytes. This stream of bytes
- can then be sent on a communication channel set up by the
- lower layers in the stack of communication protocols e.g.
- TCP/IP or encapsulated within UDP packets. This way, two
- different applications written in two completely different
- programming languages running on different computers with
- different internal representation of data can exchange
- instances of structured data types (instead of exchanging
- bytes or bits). This makes programming faster and easier since no code
- has to be written to process the transport format of the
- data.
- </p>
- <p>To write a network application which processes ASN.1 encoded
- messages, it is prudent and sometimes essential to have a set
- of off-line development tools such as an ASN.1 compiler which
- can generate the encode and decode logic for the specific ASN.1
- data types. It is also necessary to combine this with some
- general language-specific runtime support for ASN.1 encoding and
- decoding.
- </p>
- <p>The ASN.1 compiler must be directed towards a target language
- or a set of closely related languages. This manual describes a
- compiler which is directed towards the functional language
- Erlang. In order to use this compiler, familiarity with the
- language Erlang is essential. Therefore, the runtime support for ASN.1 is
- also closely related to the language Erlang and
- consist of a number of functions, which the
- compiler uses. The types in ASN.1 and how to represent
- values of those types in Erlang are described in this manual.
- </p>
- <p>The following document is structured so that the first part describes
- how to use ASN.1 compiler, and then there are descriptions of all
- the primitive and constructed ASN.1 types and their representation
- in Erlang,
- </p>
+ <p>ASN.1 (Abstract Syntax Notation One) is a formal language for
+ describing data structures to be exchanged between distributed
+ computer systems. The purpose of ASN.1 is to have a platform
+ and programming language independent notation to express types
+ using a standardized set of rules for the transformation of
+ values of a defined type into a stream of bytes. This stream of
+ bytes can then be sent on any type of communication
+ channel. This way, two applications written in different
+ programming languages running on different computers with
+ different internal representation of data can exchange instances
+ of structured data types.</p>
</section>
<section>
<title>Prerequisites</title>
- <p>It is assumed that the reader is familiar with the ASN.1 notation
- as documented in the standard definition [<cite id="X.680"></cite>] which is
- the primary text. It may also be helpful, but not necessary,
- to read the standard definitions
- [<cite id="X.681"></cite>] [<cite id="X.682"></cite>] [<cite id="X.683"></cite>]
- [<cite id="X.690"></cite>] [<cite id="X.691"></cite>]. </p>
- <p>A very good book explaining those reference texts is
- [<cite id="DUBUISSON"></cite>], free to download at
- <url href="http://www.oss.com/asn1/dubuisson.html">http://www.oss.com/asn1/dubuisson.html </url>.
+ <p>It is assumed that the reader is familiar with the ASN.1
+ notation as documented in the standard definition [<cite
+ id="X.680"></cite>] which is the primary text. It may also be
+ helpful, but not necessary, to read the standard definitions
+ [<cite id="X.681"></cite>] [<cite id="X.682"></cite>] [<cite
+ id="X.683"></cite>] [<cite id="X.690"></cite>] [<cite
+ id="X.691"></cite>]. </p>
+ <p>A good book explaining those reference texts is
+ [<cite id="DUBUISSON"></cite>], which is free to download at
+ <url href="http://www.oss.com/asn1/dubuisson.html">http://www.oss.com/asn1/dubuisson.html</url>.
</p>
</section>
<section>
- <title>Capability</title>
+ <title>Capabilities</title>
<p>This application covers all features of ASN.1 up to the 1997
- edition of the specification. In the 2002 edition of ASN.1 a number of
- new features where introduced of which some are supported while
- others are not. For example the
- ECN (Encoding Control Notation) and XML notation are still
- unsupported. Though, the other features of the 2002 edition are
- fully or partly supported as shown below:</p>
+ edition of the specification. In the 2002 edition of ASN.1 a
+ number of new features were introduced. The following features
+ of the 2002 edition are fully or partly supported as shown
+ below:</p>
<list type="bulleted">
<item>
<p>Decimal notation (e.g., "1.5e3") for REAL values. The
@@ -131,7 +103,7 @@
supported.</p>
</item>
<item>
- <p>The RELATIVE-OID type for relative object identifiers are
+ <p>The RELATIVE-OID type for relative object identifiers is
fully supported.</p>
</item>
<item>
@@ -141,16 +113,16 @@
constraint is not a PER-visible constraint.</p>
</item>
<item>
- <p>The subtype constraint by regular expressions (PATTERN) for character string types is parsed when compiling, but no further action is taken. This constraint is not a PER-visible constraint.</p>
+ <p>The subtype constraint by regular expressions (PATTERN)
+ for character string types is parsed when compiling, but no
+ further action is taken. This constraint is not a
+ PER-visible constraint.</p>
</item>
<item>
<p>Multiple-line comments as in C, <c>/* ... */</c>, are
supported.</p>
</item>
</list>
- <p>It should also be added here that the encoding formats
- supported are <em>BER</em>, <em>DER</em>, <em>PER aligned
- basic</em> variant and <em>PER unaligned basic</em> variant.</p>
</section>
</section>
@@ -162,19 +134,17 @@
<title>A First Example</title>
<p>The following example demonstrates the basic functionality used to run
the Erlang ASN.1 compiler.</p>
- <p>First, create a file called <c>People.asn</c> containing the following:</p>
+ <p>Create a file called <c>People.asn</c> containing the following:</p>
<pre>
-People DEFINITIONS IMPLICIT TAGS ::=
-
+People DEFINITIONS AUTOMATIC TAGS ::=
BEGIN
-EXPORTS Person;
-
-Person ::= [PRIVATE 19] SEQUENCE {
- name PrintableString,
- location INTEGER {home(0),field(1),roving(2)},
- age INTEGER OPTIONAL }
+ Person ::= SEQUENCE {
+ name PrintableString,
+ location INTEGER {home(0),field(1),roving(2)},
+ age INTEGER OPTIONAL
+ }
END </pre>
- <p>This file (<c>people.asn</c>) must be compiled before it can be
+ <p>This file (<c>People.asn</c>) must be compiled before it can be
used.
The ASN.1 compiler checks that the syntax is correct and that the
text represents proper ASN.1 code before generating an abstract
@@ -186,14 +156,14 @@ END </pre>
The following shows how the compiler
can be called from the Erlang shell:</p>
<pre>
-1><input>asn1ct:compile("People", [ber]).</input>
+1><input> asn1ct:compile("People", [ber]).</input>
ok
2> </pre>
<p>The <c>verbose</c> option can be given to have information
about the generated files printed:</p>
<pre>
-2><input>asn1ct:compile("People", [ber,verbose]).</input>
+2><input> asn1ct:compile("People", [ber,verbose]).</input>
Erlang ASN.1 compiling "People.asn"
--{generated,"People.asn1db"}--
--{generated,"People.hrl"}--
@@ -201,20 +171,17 @@ Erlang ASN.1 compiling "People.asn"
ok
3> </pre>
- <p>The ASN.1 module People is now accepted and the abstract syntax tree
- is saved in the <c>People.asn1db</c> file, the
- generated Erlang code is compiled using the Erlang compiler and
- loaded into the Erlang runtime system. Now there is a user interface
- of encode/2 and decode/2 in the module People, which is invoked by:
- <br></br>
-<c><![CDATA['People':encode(<Type name>,<Value>),]]></c> <br></br>
-
+ <p>The ASN.1 module <c>People</c> is now accepted and the
+ abstract syntax tree is saved in the <c>People.asn1db</c> file;
+ the generated Erlang code is compiled using the Erlang compiler
+ and loaded into the Erlang run-time system. Now there is an API
+ for <c>encode/2</c> and <c>decode/2</c> in the module
+ <c>People</c>, which is invoked by: <br></br>
+ <c><![CDATA['People':encode(<Type name>, <Value>)]]></c>
+ <br></br>
or <br></br>
-<c><![CDATA['People':decode(<Type name>,<Value>),]]></c> <br></br>
+<c><![CDATA['People':decode(<Type name>, <Value>)]]></c></p>
- Alternatively one can use the <c><![CDATA[asn1rt:encode(<Module name> ,<Type name>,<Value>)]]></c> and <c><![CDATA[asn1rt:decode(< Module name>,<Type name>,<Value>)]]></c> calls.
- However, they are not as efficient as the previous methods since they
- result in an additional <c>apply/3</c> call.</p>
<p>Assume there is a network
application which receives instances of the ASN.1 defined
type Person, modifies and sends them back again:</p>
@@ -237,33 +204,30 @@ receive
constructed and encoded using
<c>'People':encode('Person',Answer)</c> which takes an
instance of a defined ASN.1 type and transforms it to a
- binary according to the BER or PER
- encoding-rules.
+ binary according to the BER or PER encoding rules.
<br></br>
The encoder and the decoder can also be run from
- the shell. The following dialogue with the shell illustrates
- how the functions
- <c>asn1rt:encode/3</c> and <c>asn1rt:decode/3</c> are used.</p>
+ the shell.</p>
<pre>
2> <input>Rockstar = {'Person',"Some Name",roving,50}.</input>
{'Person',"Some Name",roving,50}
-3> <input>{ok,Bin} = asn1rt:encode('People','Person',Rockstar).</input>
+3> <input>{ok,Bin} = 'People':encode('Person',Rockstar).</input>
{ok,&lt;&lt;243,17,19,9,83,111,109,101,32,78,97,109,101,2,1,2,
2,1,50&gt;&gt;}
-4> <input>{ok,Person} = asn1rt:decode('People','Person',Bin).</input>
+4> <input>{ok,Person} = 'People':decode('Person',Bin).</input>
{ok,{'Person',"Some Name",roving,50}}
5> </pre>
</section>
<section>
<title>Module dependencies</title>
- <p>It is common that asn1 modules import defined types, values and
- other entities from another asn1 module.</p>
- <p>Earlier versions of the asn1 compiler required that modules that
+ <p>It is common that ASN.1 modules import defined types, values and
+ other entities from another ASN.1 module.</p>
+ <p>Earlier versions of the ASN.1 compiler required that modules that
were imported from had to be compiled before the module that
- imported. This caused problems when asn1 modules had circular
+ imported. This caused problems when ASN.1 modules had circular
dependencies.</p>
- <p>Now are referenced modules parsed when the compiler finds an
+ <p>Referenced modules are now parsed when the compiler finds an
entity that is imported. There will not be any code generated for
the referenced module. However, the compiled module rely on
that the referenced modules also will be compiled.</p>
@@ -279,11 +243,8 @@ The encoder and the decoder can also be run from
(including the compiler).</p>
</item>
<item>
- <p>The module <c>asn1rt</c> which provides the run-time functions.
- However, it is preferable to use the generated <c>encode/2</c> and
- <c>decode/2</c> functions in each module, ie.
- Module:encode(Type,Value), in favor of the <c>asn1rt</c>
- interface.</p>
+ <p>The module <c>asn1rt_nif</c> which provides the run-time functions
+ for the ASN.1 decoder for the BER back-end.</p>
</item>
</list>
<p>The reason for the division of the interface into compile-time
@@ -318,7 +279,7 @@ erlc -o ../asnfiles -I ../asnfiles -I /usr/local/standards/asn1 Person.asn
</item>
<tag><c>-I IncludeDir</c></tag>
<item>
- <p>Where to search for <c>.asn1db</c> files and asn1
+ <p>Where to search for <c>.asn1db</c> files and ASN.1
source specs in order to resolve references to other
modules. This option can be repeated many times if there
are several places to search in. The compiler will always
@@ -330,26 +291,26 @@ erlc -o ../asnfiles -I ../asnfiles -I /usr/local/standards/asn1 Person.asn
</item>
<tag><c>+asn1config</c></tag>
<item>
- <p>This functionality works together with the flags
- <c>ber</c>. It enables the
+ <p>This functionality works together with the
+ <c>ber</c> option. It enables the
specialized decodes, see the <seealso marker="asn1_spec">Specialized Decode</seealso> chapter.
</p>
</item>
<tag><c>+undec_rest</c></tag>
<item>
- <p>A buffer that holds a message, being decoded may
- also have some following bytes. Now it is possible to get
- those following bytes returned together with the decoded
- value. If an asn1 spec is compiled with this option a tuple
- <c>{ok,Value,Rest}</c> is returned. <c>Rest</c> may be a
- list or a binary. Earlier versions of the compiler ignored
- those following bytes.</p>
+ <p>A buffer that holds a message being decoded may also have
+ trailing bytes. If those trailing bytes are important they
+ can be returned along with the decoded value by compiling
+ the ASN.1 specification with the <c>+undec_rest</c> option.
+ The return value from the decoder will be
+ <c>{ok,Value,Rest}</c> where <c>Rest</c> is a binary
+ containing the trailing bytes.</p>
</item>
<tag><c>+'Any Erlc Option'</c></tag>
<item>
<p>You may add any option to the Erlang compiler when
compiling the generated Erlang files. Any option
- unrecognised by the asn1 compiler will be passed to the
+ unrecognized by the ASN.1 compiler will be passed to the
Erlang compiler.</p>
</item>
</taglist>
@@ -374,35 +335,15 @@ asn1ct:compile("H323-MESSAGES.asn1",[ber]). </pre>
asn1ct:compile("H323-MESSAGES.asn1",[per]). </pre>
<p>The generic encode and decode functions can be invoked like this:</p>
<pre>
-asn1ct:encode('H323-MESSAGES','SomeChoiceType',{call,"octetstring"}).
-asn1ct:decode('H323-MESSAGES','SomeChoiceType',Bytes). </pre>
- <p>Or, preferable like:</p>
- <pre>
'H323-MESSAGES':encode('SomeChoiceType',{call,"octetstring"}).
'H323-MESSAGES':decode('SomeChoiceType',Bytes). </pre>
</section>
<section>
<title>Run-time Functions</title>
- <p>A brief description of the major functions is given here. For a
- complete description of each function see
- <seealso marker="asn1rt"> the Asn1 Reference Manual</seealso>, the <c>asn1rt</c> module.</p>
- <p>The generic run-time encode and decode functions can be invoked as below:</p>
- <pre>
-asn1rt:encode('H323-MESSAGES','SomeChoiceType',{call,"octetstring"}).
-asn1rt:decode('H323-MESSAGES','SomeChoiceType',Bytes). </pre>
- <p>Or, preferable like:</p>
- <pre>
-'H323-MESSAGES':encode('SomeChoiceType',{call,"octetstring"}).
-'H323-MESSAGES':decode('SomeChoiceType',Bytes). </pre>
- <p>The asn1 nif is enabled in two occasions: encoding of
- asn1 values when the asn1 spec is compiled with <c>per</c> and
- or decode of encoded asn1 values when the asn1 spec is
- compiled with <c>ber</c>. In
- those cases the nif will be loaded automatically at the first call
- to <c>encode</c>/<c>decode</c>. If one doesn't want the performance
- overhead of the nif being loaded at the first call it is possible
- to load the nif separately by loading the <c>asn1rt_nif</c> module.</p>
+ <p>When an ASN.1 specification is compiled with the <c>ber</c>
+ option, the module <c>asn1rt_nif</c> module and the NIF library in
+ <c>asn1/priv_dir</c> will be needed at run-time.</p>
<p>By invoking the function <c>info/0</c> in a generated module, one
gets information about which compiler options were used.</p>
</section>
@@ -413,9 +354,9 @@ asn1rt:decode('H323-MESSAGES','SomeChoiceType',Bytes). </pre>
compile time appear on the screen together with
a line number indicating where in the source file the error
was detected. If no errors are found, an Erlang ASN.1 module will
- be created as default.</p>
- <p>The run-time encoders and decoders (in the <c>asn1rt</c> module) do
- execute within a catch and returns <c>{ok, Data}</c> or
+ be created.</p>
+ <p>The run-time encoders and decoders execute within a catch and
+ returns <c>{ok, Data}</c> or
<c>{error, {asn1, Description}}</c> where
<c>Description</c> is
an Erlang term describing the error. </p>
@@ -424,18 +365,18 @@ asn1rt:decode('H323-MESSAGES','SomeChoiceType',Bytes). </pre>
<section>
<marker id="inlineExamples"></marker>
- <title>Multi File Compilation</title>
- <p>There are various reasons for using a multi file compilation:</p>
+ <title>Multi-file Compilation</title>
+ <p>There are various reasons for using multi-file compilation:</p>
<list type="bulleted">
- <item>You want to choose name for the generated module by
- any reason. Maybe you need to compile the same specs for
- different encoding/decoding standards.</item>
+ <item>You want to choose the name for the generated module,
+ perhaps because you need to compile the same specs for
+ different encoding rules.</item>
<item>You want only one resulting module.</item>
</list>
- <p>You need to specify which asn1 specs you will
+ <p>You need to specify which ASN.1 specs you will
compile in a module that must have the extension
<c>.set.asn</c>. You chose name of the module and provide the
- names of the asn1 specs. For instance, if you have the specs
+ names of the ASN.1 specs. For instance, if you have the specs
<c>File1.asn</c>, <c>File2.asn</c> and <c>File3.asn</c> your
module <c>MyModule.set.asn</c> will look like:</p>
<pre>
@@ -446,11 +387,45 @@ File3.asn </pre>
<code type="none">
~> erlc MyModule.set.asn </code>
<p>the result will be one merged module <c>MyModule.erl</c> with
- the generated code from the three asn1 specs.
+ the generated code from the three ASN.1 specs.
</p>
</section>
<section>
+ <title>A quick note about tags</title>
+
+ <p>Tags used to be important for all users of ASN.1, because it
+ was necessary to manually add tags to certain constructs in order
+ for the ASN.1 specification to be valid. Here is an example of
+ an old-style specification:</p>
+
+ <pre>
+Tags DEFINITIONS ::=
+BEGIN
+ Afters ::= CHOICE { cheese [0] IA5String,
+ dessert [1] IA5String }
+END </pre>
+
+ <p>Without the tags (the numbers in square brackets) the ASN.1
+ compiler would refuse to compile the file.</p>
+
+ <p>In 1994 the global tagging mode AUTOMATIC TAGS was introduced.
+ By putting AUTOMATIC TAGS in the module header, the ASN.1 compiler
+ will automatically add tags when needed. Here is the same
+ specification in AUTOMATIC TAGS mode:</p>
+
+ <pre>
+Tags DEFINITIONS AUTOMATIC TAGS ::=
+BEGIN
+ Afters ::= CHOICE { cheese IA5String,
+ dessert IA5String }
+END
+</pre>
+
+ <p>Tags will not be mentioned any more in this manual.</p>
+ </section>
+
+ <section>
<marker id="ASN1Types"></marker>
<title>The ASN.1 Types</title>
<p>This section describes the ASN.1 types including their
@@ -521,7 +496,7 @@ Operational ::= BOOLEAN --ASN.1 definition </pre>
<p>In Erlang code it may look like:</p>
<pre>
Val = true,
-{ok,Bytes}=asn1rt:encode(MyModule,'Operational',Val), </pre>
+{ok,Bytes} = MyModule:encode('Operational', Val), </pre>
<p>Below follows a description of how
values of each type can be represented in Erlang.
</p>
@@ -587,20 +562,18 @@ T6value3 = white
<section>
<marker id="REAL"></marker>
<title>REAL</title>
- <p>In this version reals are not implemented. When they are,
- the following
- ASN.1 type is used:</p>
+ <p>The following ASN.1 type is used for real numbers:</p>
<pre>
R1 ::= REAL
</pre>
- <p>Can be assigned a value in Erlang as:</p>
+ <p>It can be assigned a value in Erlang as:</p>
<pre>
-R1value1 = 2.14,
+R1value1 = "2.14",
R1value2 = {256,10,-2},
</pre>
<p>In the last line note that the tuple {256,10,-2} is the real number
2.56 in a special notation, which will encode faster than simply
- stating the number as 2.56. The arity three tuple is
+ stating the number as <c>"2.56"</c>. The arity three tuple is
<c>{Mantissa,Base,Exponent}</c> i.e. Mantissa * Base^Exponent.</p>
</section>
@@ -653,7 +626,7 @@ Day1 = saturday,
Bits1 ::= BIT STRING
Bits2 ::= BIT STRING {foo(0),bar(1),gnu(2),gnome(3),punk(14)}
</pre>
- <p>There are five different notations available for representation of
+ <p>There are two notations available for representation of
BIT STRING values in Erlang and as input to the encode functions.</p>
<list type="ordered">
<item>A bitstring. By default, a BIT STRING with no
@@ -661,43 +634,10 @@ Bits2 ::= BIT STRING {foo(0),bar(1),gnu(2),gnome(3),punk(14)}
<item>A list of atoms corresponding to atoms in the <c>NamedBitList</c>
in the BIT STRING definition. A BIT STRING with symbolic
names will always be decoded to this format.</item>
- <item>A list of binary digits (0 or 1). This format is always
- accepted as input to the encode functions. A BIT STRING will
- be decoded to this format if <em>legacy_bit_string</em> option
- has been given. <em>This format may be withdrawn in a future
- release.</em>
- </item>
- <item>As <c>{Unused,Binary}</c> where <c>Unused</c> denotes how
- many trailing zero-bits 0 to 7 that are unused in the least
- significant byte in <c>Binary</c>. This format is always
- accepted as input to the encode functions. A BIT STRING will
- be decoded to this format if <em>compact_bit_string</em> has
- been given. <em>This format may be withdrawn in a future
- release.</em>
- </item>
- <item>A hexadecimal number (or an integer). This format should be
- avoided, since it is easy to misinterpret a <c>BIT STRING</c>
- value in this format. <em>This format may be withdrawn in a future
- release.</em>
- </item>
</list>
- <note>
- <p>It is recommended to either use the bitstring format (for
- BIT STRINGs with no symbolic names) or a list of symbolic
- names (for BIT STRINGs with symbolic names). The other formats
- should be avoided since they may be withdrawn in a future
- release.
- </p>
- </note>
+ <p>Example:</p>
<pre>
Bits1Val1 = &lt;&lt;0:1,1:1,0:1,1:1,1:1&gt;&gt;,
-Bits1Val2 = 16#1A,
-Bits1Val3 = {3,&lt;&lt;0:1,1:1,0:1,1:1,1:1,0:3&gt;&gt;},
-Bits1Val4 = [0,1,0,1,1]
- </pre>
- <p>Note that <c>Bits1Val1</c>, <c>Bits1Val2</c>, <c>Bits1Val3</c>,
- and <c>Bits1Val1</c> denote the same value.</p>
- <pre>
Bits2Val1 = [gnu,punk],
Bits2Val2 = &lt;&lt;2#1110:4&gt;&gt;,
Bits2Val3 = [bar,gnu,gnome],
@@ -708,37 +648,60 @@ Bits2Val3 = [bar,gnu,gnome],
2 and 14 are set to 1 and the rest set to 0. The symbolic values
appear as a list of values. If a named value appears, which is not
specified in the type definition, a run-time error will occur.</p>
- <p>The compact notation equivalent to the empty BIT STRING is
- <c><![CDATA[{0,<<>>}]]></c>, which in the other notations is
- <c><![CDATA[<<>>]]></c>, <c>[]</c>, or
- <c>0</c>.</p>
<p>BIT STRINGS may also be sub-typed with, for example, a SIZE
specification:</p>
<pre>
Bits3 ::= BIT STRING (SIZE(0..31)) </pre>
<p>This means that no bit higher than 31 can ever be set.</p>
+
+ <section>
+ <title>Deprecated representations for BIT STRING</title>
+ <p>In addition to the representations described above, the
+ following deprecated representations are available if the
+ specification has been compiled with the
+ <c>legacy_erlang_types</c> option:</p>
+ <list type="ordered">
+ <item>A list of binary digits (0 or 1). This format is
+ accepted as input to the encode functions, and a BIT STRING
+ will be decoded to this format if the
+ <em>legacy_bit_string</em> option has been given.
+ </item>
+ <item>As <c>{Unused,Binary}</c> where <c>Unused</c> denotes
+ how many trailing zero-bits 0 to 7 that are unused in the
+ least significant byte in <c>Binary</c>. This format is
+ accepted as input to the encode functions, and a <c>BIT
+ STRING</c> will be decoded to this format if
+ <em>compact_bit_string</em> has been given.
+ </item>
+ <item>A hexadecimal number (or an integer). This format
+ should be avoided, since it is easy to misinterpret a BIT
+ STRING value in this format.
+ </item>
+ </list>
+ </section>
</section>
<section>
<marker id="OCTET STRING"></marker>
<title>OCTET STRING</title>
- <p>The OCTET STRING is the simplest of all ASN.1 types The OCTET STRING
- only moves or transfers e.g. binary files or other unstructured
- information complying to two rules.
- Firstly, the bytes consist of octets and secondly, encoding is
- not required.</p>
+ <p>The OCTET STRING is the simplest of all ASN.1 types. The
+ OCTET STRING only moves or transfers e.g. binary files or other
+ unstructured information complying to two rules. Firstly, the
+ bytes consist of octets and secondly, encoding is not
+ required.</p>
<p>It is possible to have the following ASN.1 type definitions:</p>
<pre>
O1 ::= OCTET STRING
O2 ::= OCTET STRING (SIZE(28)) </pre>
<p>With the following example assignments in Erlang:</p>
<pre>
-O1Val = [17,13,19,20,0,0,255,254],
-O2Val = "must be exactly 28 chars....", </pre>
- <p>Observe that <c>O1Val</c> is assigned a series of numbers between 0
- and 255 i.e. octets.
- <c>O2Val</c> is assigned using the string notation.
- </p>
+O1Val = &lt;&lt;17,13,19,20,0,0,255,254&gt;&gt;,
+O2Val = &lt;&lt;"must be exactly 28 chars...."&gt;&gt;,</pre>
+ <p>By default, an OCTET STRING is always represented as
+ an Erlang binary. If the specification has been compiled with
+ the <c>legacy_erlang_types</c> option, the encode functions
+ will accept both lists and binaries, and the decode functions
+ will decode an OCTET STRING to a list.</p>
</section>
<section>
@@ -770,13 +733,11 @@ O2Val = "must be exactly 28 chars....", </pre>
specified for a type are especially important for PER, where
they affect the encoding.
</p>
- <p>Please note that <em>all</em> the Character strings are
- supported and it is possible to use the following ASN.1 type
- definitions:</p>
+ <p>Here are some examples:</p>
<pre>
Digs ::= NumericString (SIZE(1..3))
TextFile ::= IA5String (SIZE(0..64000)) </pre>
- <p>and the following Erlang assignments:</p>
+ <p>with corresponding Erlang assignments:</p>
<pre>
DigsVal1 = "456",
DigsVal2 = "123",
@@ -789,70 +750,86 @@ TextFileVal2 = [88,76,55,44,99,121 .......... a lot of characters here ....]
characters are all represented by quadruples beginning with
three zeros like {0,0,0,65} for the 'A' character. When
decoding a value for these strings the result is a list of
- quadruples, or integers when the value is an ASCII character.
- The following example shows how it works:</p>
- <p>In a file <c>PrimStrings.asn1</c> the type <c>BMP</c> is defined as
- <br></br>
-<c>BMP ::= BMPString</c> then using BER encoding (<c>ber</c>
- option)the input/output format will be:</p>
+ quadruples, or integers when the value is an ASCII character.</p>
+
+ <p>The following example shows how it works. We have the following
+ specification in the file <c>PrimStrings.asn1</c>.</p>
+ <pre>
+PrimStrings DEFINITIONS AUTOMATIC TAGS ::=
+BEGIN
+ BMP ::= BMPString
+END
+ </pre>
+
+ <p>Encoding and decoding some strings:</p>
+
<pre>
-1> <input>{ok,Bytes1} = asn1rt:encode('PrimStrings','BMP',[{0,0,53,53},{0,0,45,56}]).</input>
-{ok,[30,4,"55-8"]}
-2> <input>asn1rt:decode('PrimStrings','BMP',list_to_binary(Bytes1)).</input>
+1> <input>asn1ct:compile('PrimStrings', [ber]).</input>
+ok
+2> <input>{ok,Bytes1} = 'PrimStrings':encode('BMP', [{0,0,53,53},{0,0,45,56}]).</input>
+{ok,&lt;&lt;30,4,53,54,45,56>>}
+3> <input>'PrimStrings':decode('BMP', Bytes1).</input>
{ok,[{0,0,53,53},{0,0,45,56}]}
-3> <input>{ok,Bytes2} = asn1rt:encode('PrimStrings','BMP',[{0,0,53,53},{0,0,0,65}]).</input>
-{ok,[30,4,[53,53,0,65]]}
-4> <input>asn1rt:decode('PrimStrings','BMP',list_to_binary(Bytes2)).</input>
+4> <input>{ok,Bytes2} = 'PrimStrings':encode('BMP', [{0,0,53,53},{0,0,0,65}]).</input>
+{ok,&lt;&lt;30,4,53,53,0,65>>}
+5> <input>'PrimStrings':decode('BMP', Bytes2).</input>
{ok,[{0,0,53,53},65]}
-5> <input>{ok,Bytes3} = asn1rt:encode('PrimStrings','BMP',"BMP string").</input>
-{ok,[30,20,[0,66,0,77,0,80,0,32,0,115,0,116,0,114,0,105,0,110,0,103]]}
-6> <input>asn1rt:decode('PrimStrings','BMP',list_to_binary(Bytes3)).</input>
+6> <input>{ok,Bytes3} = 'PrimStrings':encode('BMP', "BMP string").</input>
+{ok,&lt;&lt;30,20,0,66,0,77,0,80,0,32,0,115,0,116,0,114,0,105,0,110,0,103>>}
+7> <input>'PrimStrings':decode('BMP', Bytes3).</input>
{ok,"BMP string"} </pre>
- <p>The UTF8String is represented in Erlang as a list of integers,
- where each integer represents the unicode value of one
- character. When a value shall be encoded one first has to
- transform it to a UTF8 encoded binary, then it can be encoded by
- asn1. When decoding the result is a UTF8 encoded binary, which
- may be transformed to an integer list. The transformation
- functions, <c>utf8_binary_to_list</c> and
- <c>utf8_list_to_binary</c>, are in the <c>asn1rt</c> module. In
- the example below we assume an asn1 definition <c>UTF ::= UTF8String</c> in a module <c>UTF.asn</c>:</p>
+
+ <p>The UTF8String type is represented as a UTF-8 encoded binary in
+ Erlang. Such binaries can be created directly using the binary syntax
+ or by converting from a list of Unicode code points using the
+ <c>unicode:characters_to_binary/1</c> function.</p>
+
+ <p>Here are some examples showing how UTF-8 encoded binaries can
+ be created and manipulated:</p>
+
+ <pre>
+1> <input>Gs = "Мой маленький Гном".</input>
+[1052,1086,1081,32,1084,1072,1083,1077,1085,1100,1082,1080,
+ 1081,32,1043,1085,1086,1084]
+2> <input>Gbin = unicode:characters_to_binary(Gs).</input>
+&lt;&lt;208,156,208,190,208,185,32,208,188,208,176,208,187,208,
+ 181,208,189,209,140,208,186,208,184,208,185,32,208,147,
+ 208,...>>
+3> <input>Gbin = &lt;&lt;"Мой маленький Гном"/utf8>>.</input>
+&lt;&lt;208,156,208,190,208,185,32,208,188,208,176,208,187,208,
+ 181,208,189,209,140,208,186,208,184,208,185,32,208,147,
+ 208,...>>
+4> <input>Gs = unicode:characters_to_list(Gbin).</input>
+[1052,1086,1081,32,1084,1072,1083,1077,1085,1100,1082,1080,
+ 1081,32,1043,1085,1086,1084]
+ </pre>
+
+ <p>See the <seealso marker="stdlib:unicode">unicode</seealso> module
+ for more details.</p>
+
+ <p>In the following example we will use this ASN.1 specification:</p>
+ <pre>
+UTF DEFINITIONS AUTOMATIC TAGS ::=
+BEGIN
+ UTF ::= UTF8String
+END
+ </pre>
+
+ <p>Encoding and decoding a string with Unicode characters:</p>
+
<pre>
-1> <input>asn1ct:compile('UTF',[ber]).</input>
-Erlang ASN.1 version "1.4.3.3" compiling "UTF.asn"
-Compiler Options: [ber]
---{generated,"UTF.asn1db"}--
---{generated,"UTF.erl"}--
+5> <input>asn1ct:compile('UTF', [ber]).</input>
ok
-2> <input>UTF8Val1 = "hello".</input>
-"hello"
-3> <input>{ok,UTF8bin1} = asn1rt:utf8_list_to_binary(UTF8Val1).</input>
-{ok,&lt;&lt;104,101,108,108,111&gt;&gt;}
-4> <input>{ok,B}='UTF':encode('UTF',UTF8bin1).</input>
-{ok,[12,
- 5,
- &lt;&lt;104,101,108,108,111&gt;&gt;]}
-5> <input>Bin = list_to_binary(B).</input>
-&lt;&lt;12,5,104,101,108,108,111&gt;&gt;
-6> <input>{ok,UTF8bin1}='UTF':decode('UTF',Bin).</input>
-{ok,&lt;&lt;104,101,108,108,111&gt;&gt;}
-7> <input>asn1rt:utf8_binary_to_list(UTF8bin1).</input>
-{ok,"hello"}
-8> <input>UTF8Val2 = [16#00,16#100,16#ffff,16#ffffff].</input>
-[0,256,65535,16777215]
-9> <input>{ok,UTF8bin2} = asn1rt:utf8_list_to_binary(UTF8Val2).</input>
-{ok,&lt;&lt;0,196,128,239,191,191,248,191,191,191,191&gt;&gt;}
-10> <input>{ok,B2} = 'UTF':encode('UTF',UTF8bin2).</input>
-{ok,[12,
- 11,
- &lt;&lt;0,196,128,239,191,191,248,191,191,191,191&gt;&gt;]}
-11> <input>Bin2 = list_to_binary(B2).</input>
-&lt;&lt;12,11,0,196,128,239,191,191,248,191,191,191,191&gt;&gt;
-12> <input>{ok,UTF8bin2} = 'UTF':decode('UTF',Bin2).</input>
-{ok,&lt;&lt;0,196,128,239,191,191,248,191,191,191,191&gt;&gt;}
-13> <input>asn1rt:utf8_binary_to_list(UTF8bin2).</input>
-{ok,[0,256,65535,16777215]}
-14> </pre>
+6> <input>{ok,Bytes1} = 'UTF':encode('UTF', &lt;&lt;"Гном"/utf8>>).</input>
+{ok,&lt;&lt;12,8,208,147,208,189,208,190,208,188>>}
+7> <input>{ok,Bin1} = 'UTF':decode('UTF', Bytes1).</input>
+{ok,&lt;&lt;208,147,208,189,208,190,208,188>>}
+8> <input>io:format("~ts\n", [Bin1]).</input>
+Гном
+ok
+9> <input>unicode:characters_to_list(Bin1).</input>
+[1043,1085,1086,1084]
+ </pre>
</section>
<section>
@@ -887,9 +864,11 @@ OidVal1 = {1,2,55},
<section>
<marker id="Object Descriptor"></marker>
<title>Object Descriptor</title>
- <p>Values of this type can be assigned a value as an ordinary string i.e. <br></br>
+ <p>Values of this type can be assigned a value as an ordinary string
+ like this:</p>
- "This is the value of an Object descriptor"</p>
+ <pre>
+ "This is the value of an Object descriptor"</pre>
</section>
<section>
@@ -932,19 +911,31 @@ Pdu ::= SEQUENCE {
<pre>
MyPdu = #'Pdu'{a=22,b=77.99,c={0,1,2,3,4},d='NULL'}. </pre>
<p>The decode functions will return a record as result when decoding
- a <c>SEQUENCE</c> or a <c>SET</c>.
- <marker id="DEFAULT"></marker>
-</p>
- <p>A <c>SEQUENCE</c> and a <c>SET</c> may contain a component with a
- <c>DEFAULT</c> key word followed by the actual value that is the
- default value. In case of BER encoding it is optional to encode the
- value if it equals the default value. If the application uses the
- atom asn1_DEFAULT as value or if the value is a primitive value
- that equals the default value the encoding omits the bytes for
- this value, which is more efficient and it results in fever
- bytes to send to the receiving application.</p>
- <p>For instance, if the following types exists in a file "File.asn":</p>
+ a <c>SEQUENCE</c> or a <c>SET</c>.</p>
+
+ <p>A <c>SEQUENCE</c> and a <c>SET</c> may contain a component
+ with a <c>DEFAULT</c> key word followed by the actual value that
+ is the default value. The <c>DEFAULT</c> keyword means that the
+ application doing the encoding can omit encoding of the value,
+ thus resulting in fewer bytes to send to the receiving
+ application.</p>
+
+ <p>An application can use the atom <c>asn1_DEFAULT</c> to indicate
+ that the encoding should be omitted for that position in
+ the SEQUENCE.</p>
+
+ <p>Depending on the encoding rules, the encoder may also compare
+ the given value to the default value and automatically omit the
+ encoding if they are equal. How much effort the encoder makes to
+ to compare the values depends on the encoding rules. The DER
+ encoding rules forbids encoding a value equal to the default value,
+ so it has a more thorough and time-consuming comparison than the
+ encoders for the other encoding rules.</p>
+
+ <p>In the following example we will use this ASN.1 specification:</p>
<pre>
+File DEFINITIONS AUTOMATIC TAGS ::=
+BEGIN
Seq1 ::= SEQUENCE {
a INTEGER DEFAULT 1,
b Seq2 DEFAULT {aa TRUE, bb 15}
@@ -954,131 +945,50 @@ Seq2 ::= SEQUENCE {
aa BOOLEAN,
bb INTEGER
}
- </pre>
- <p>Some values and the corresponding encoding in an Erlang terminal
- is shown below:</p>
+
+Seq3 ::= SEQUENCE {
+ bs BIT STRING {a(0), b(1), c(2)} DEFAULT {a, c}
+}
+END </pre>
+ <p>Here is an example where the BER encoder is able to omit encoding
+ of the default values:</p>
<pre>
-1> <input>asn1ct:compile('File').</input>
-Erlang ASN.1 version "1.3.2" compiling "File.asn1"
-Compiler Options: []
---{generated,"File.asn1db"}--
---{generated,"File.hrl"}--
---{generated,"File.erl"}--
+1> <input>asn1ct:compile('File', [ber]).</input>
ok
-2> <input>'File':encode('Seq1',{'Seq1',asn1_DEFAULT,asn1_DEFAULT}).</input>
-{ok,["0",[0],[[],[]]]}
-3> <input>lists:flatten(["0",[0],[[],[]]]).</input>
-[48,0]
-4> <input>'File':encode('Seq1',{'Seq1',1,{'Seq2',true,15}}).</input>
-{ok,["0","\\b",[[],["\\241",[6],[[[128],[1],"\\377"],[[129],[1],[15]]]]]]}
-5> <input>lists:flatten(["0","\\b",[[],["\\241",[6],[[[128],[1],"\\377"],[[129],[1],[15]]]]]]).</input>
-[48,8,161,6,128,1,255,129,1,15]
-6> </pre>
- <p>The result after command line 3, in the example above,shows that the
- encoder omits the encoding of default values when they are specific
- by asn1_DEFAULT. Line 5 shows that even primitive values that equals
- the default value are detected and not encoded. But the constructed
- value of component <c>b</c> in <c>Seq1</c> is not recognized as the
- default value. Checking of default values in <c>BER</c> is not done
- in case of complex values, because it would be to expensive.
- <marker id="DEFAULT DER"></marker>
-</p>
- <p>But, the DER encoding format has stronger requirements regarding
- default values both for SET and SEQUENCE. A more elaborate and time
- expensive check of default values will take place. The following is
- an example with the same types and values as above but with der
- encoding format.</p>
- <pre>
-1> <input>asn1ct:compile('File',[der]).</input>
-Erlang ASN.1 version "1.3.2" compiling "File.asn1"
-Compiler Options: [der]
---{generated,"File.asn1db"}--
---{generated,"File.hrl"}--
---{generated,"File.erl"}--
+2> <input>'File':encode('Seq1', {'Seq1',asn1_DEFAULT,asn1_DEFAULT}).</input>
+{ok,&lt;&lt;48,0>>}
+3> <input>'File':encode('Seq1', {'Seq1',1,{'Seq2',true,15}}).</input>
+{ok,&lt;&lt;48,0>>} </pre>
+
+ <p>And here is an example with a named BIT STRING where the BER
+ encoder will not omit the encoding:</p>
+ <pre>
+4> <input>'File':encode('Seq3', {'Seq3',asn1_DEFAULT).</input>
+{ok,&lt;&lt;48,0>>}
+5> <input>'File':encode('Seq3', {'Seq3',&lt;&lt;16#101:3>>).</input>
+{ok,&lt;&lt;48,4,128,2,5,160>>} </pre>
+
+ <p>The DER encoder will omit the encoding for the same BIT STRING:</p>
+ <pre>
+6> <input>asn1ct:compile('File', [ber,der]).</input>
ok
-2> <input>'File':encode('Seq1',{'Seq1',asn1_DEFAULT,asn1_DEFAULT}).</input>
-{ok,["0",[0],[[],[]]]}
-3> <input>lists:flatten(["0",[0],[[],[]]]).</input>
-[48,0]
-4> <input>'File':encode('Seq1',{'Seq1',1,{'Seq2',true,15}}).</input>
-{ok,["0",[0],[[],[]]]}
-5> <input>lists:flatten(["0",[0],[[],[]]]).</input>
-[48,0]
-6>
- </pre>
- <p>Line 5 shows that even values of constructed types is checked and if
- it equals the default value it will not be encoded.</p>
+7> <input>'File':encode('Seq3', {'Seq3',asn1_DEFAULT).</input>
+{ok,&lt;&lt;48,0>>}
+8> <input>'File':encode('Seq3', {'Seq3',&lt;&lt;16#101:3>>).</input>
+{ok,&lt;&lt;48,0>>} </pre>
</section>
<section>
<marker id="SET"></marker>
<title>SET</title>
- <p>The SET type is an unusual construct and normally the SEQUENCE
- type is more appropriate to use. Set is also inefficient compared with SEQUENCE, as the components can be in any order. Hence, it must be possible
- to distinguish every component in 'SET', both when
- encoding and decoding a value of a type defined to be a SET.
- The tags of all components must be different from each other
- in order to be easily recognizable.</p>
- <p>A SET may be defined as:</p>
- <pre>
-Pdu2 ::= SET {
- a INTEGER,
- b BOOLEAN,
- c ENUMERATED {on(0),off(1)} } </pre>
- <p>A SET is represented as an Erlang record.
- For each SEQUENCE and <c>SET</c> in
- an ASN.1 module an Erlang record declaration is generated. For
- <c>Pdu2</c> above a record is defined like this:</p>
- <pre>
--record('Pdu2',{a, b, c}). </pre>
- <p>The record declarations for a module <c>M</c> are placed in a
- separate <c>M.hrl</c> file.</p>
- <p>Values can be assigned in Erlang as demonstrated below:</p>
- <pre>
-V = #'Pdu2'{a=44,b=false,c=off}. </pre>
- <p>The decode functions will return a record as result when decoding
- a SET.
- </p>
- <p>The difference between SET and SEQUENCE is that the order of
- the components (in the BER encoded format) is undefined for SET
- and defined as the lexical order from the ASN.1 definition for
- SEQUENCE. The ASN.1 compiler for Erlang will always encode a
- SET in the lexical order. The decode routines can handle SET
- components encoded in any order but will always return the
- result as a record. Since all components of the SET must be
- distinguishable both in the encoding phase as well as the
- decoding phase the following type is not allowed in a module
- with EXPLICIT or IMPLICIT as tag-default :</p>
- <p></p>
- <pre>
-Bad ::= SET {i INTEGER,
- j INTEGER } </pre>
- <p>The ASN.1 to Erlang compiler rejects the above type. We
- shall not explain the concept of tag further here, we refer to
- [<cite id="X.680"></cite>].
- </p>
- <p>Encoding of a SET with components with DEFAULT values behaves
- similar as a SEQUENCE, <seealso marker="#DEFAULT">see above</seealso>. The DER encoding format restrictions on DEFAULT
- values is the same for SET as for SEQUENCE, and is supported by
- the compiler, <seealso marker="#DEFAULT DER">see above</seealso>.</p>
- <p>Moreover, in DER the elements of a SET will be sorted. If a
- component is an un-tagged choice the sorting have to take place
- in run-time. This fact emphasizes the following recommendation
- if DER encoding format is used.</p>
- <p>The concept of SET is an unusual
- construct and one cannot think of one single application
- where the set type is essential. (Imagine if someone
- "invented'' the shuffled array in 'C') People tend to think
- that 'SET' sounds nicer and more mathematical than 'SEQUENCE'
- and hence use it when 'SEQUENCE' would have been more
- appropriate. It is also most inefficient, since every correct
- implementation of SET must always be prepared to accept the
- components in any order. So, if possible use SEQUENCE instead
- of SET.</p>
+ <p>In Erlang, the SET type is used exactly as SEQUENCE. Note
+ that if the BER or DER encoding rules are used, decoding a
+ SET is slower than decoding a SEQUENCE because the components
+ must be sorted.</p>
</section>
<section>
- <title>Notes about Extend-ability for SEQUENCE and SET</title>
+ <title>Notes about extensibility for SEQUENCE and SET</title>
<p>When a SEQUENCE or SET contains an extension marker and
extension components like this:</p>
<pre>
@@ -1105,51 +1015,28 @@ SExt ::= SEQUENCE {
<marker id="CHOICE"></marker>
<title>CHOICE</title>
<p>The CHOICE type is a space saver and is similar to the concept of a
- 'union' in the C-language. As with the previous SET-type, the
- tags of all components of a CHOICE need to be distinct. If
- AUTOMATIC TAGS are defined for the module (which is
- preferable) the tags can be omitted completely in the ASN.1
- specification of a CHOICE.
- </p>
+ 'union' in the C language.</p>
<p>Assume:</p>
<pre>
+SomeModuleName DEFINITIONS AUTOMATIC TAGS ::=
+BEGIN
T ::= CHOICE {
- x [0] REAL,
- y [1] INTEGER,
- z [2] OBJECT IDENTIFIER }
- </pre>
+ x REAL,
+ y INTEGER,
+ z OBJECT IDENTIFIER }
+END </pre>
<p>It is then possible to assign values:</p>
<pre>
TVal1 = {y,17},
TVal2 = {z,{0,1,2}},
</pre>
- <p>A CHOICE value is always represented as the tuple
+ <p>A CHOICE value is always represented as the tuple
<c>{ChoiceAlternative, Val}</c> where <c>ChoiceAlternative</c>
- is an atom denoting the selected choice
- alternative.
- </p>
- <p>It is also allowed to have a CHOICE type tagged as follow:</p>
- <p></p>
- <pre>
-C ::= [PRIVATE 111] CHOICE {
- C1,
- C2 }
-
-C1 ::= CHOICE {
- a [0] INTEGER,
- b [1] BOOLEAN }
-
-C2 ::= CHOICE {
- c [2] INTEGER,
- d [3] OCTET STRING } </pre>
- <p>In this case, the top type C appears to have no tags at all in
- its components, however, both C1 and C2 are also defined as
- CHOICE types and they have distinct tags among themselves.
- Hence, the above type C is both legal and allowed.
+ is an atom denoting the selected choice alternative.
</p>
<section>
- <title>Extendable CHOICE</title>
+ <title>Extensible CHOICE</title>
<p>When a CHOICE contains an extension marker and the decoder detects
an unknown alternative of the CHOICE the value is represented as:</p>
<pre>
@@ -1226,26 +1113,29 @@ Arr2Val = ["abc",[14,34,54],"Octets"], </pre>
Where <c>Value</c> may be a value of yet another type T2.</p>
<p>For example:</p>
<pre>
+EmbeddedExample DEFINITIONS AUTOMATIC TAGS ::=
+BEGIN
B ::= SEQUENCE {
a Arr1,
- b [0] T }
+ b T }
Arr1 ::= SET SIZE (5) OF INTEGER (4..9)
T ::= CHOICE {
- x [0] REAL,
- y [1] INTEGER,
- z [2] OBJECT IDENTIFIER } </pre>
- <p>The above example can be assigned like this in Erlang:</p>
+ x REAL,
+ y INTEGER,
+ z OBJECT IDENTIFIER }
+ END </pre>
+ <p>The SEQUENCE b can be encoded like this in Erlang:</p>
<pre>
-V2 = #'B'{a=[4,5,6,7,8], b={x,7.77}}.
- </pre>
+1> 'EmbeddedExample':encode('B', {'B',[4,5,6,7,8],{x,"7.77"}}).
+{ok,&lt;&lt;5,56,0,8,3,55,55,55,46,69,45,50>>} </pre>
</section>
</section>
<section>
<title>Naming of Records in .hrl Files</title>
- <p>When an asn1 specification is compiled all defined types of
+ <p>When an ASN.1 specification is compiled all defined types of
type SET or SEQUENCE will result in a corresponding record in the
generated hrl file. This is because the values for SET/SEQUENCE
as mentioned in sections above are represented as records.</p>
@@ -1261,8 +1151,8 @@ V2 = #'B'{a=[4,5,6,7,8], b={x,7.77}}.
Emb ::= SEQUENCE {
a SEQUENCE OF OCTET STRING,
b SET {
- a [0] INTEGER,
- b [1] INTEGER DEFAULT 66},
+ a INTEGER,
+ b INTEGER DEFAULT 66},
c CHOICE {
a INTEGER,
b FooType } }
@@ -1333,7 +1223,7 @@ PType{T} ::= SEQUENCE{
<p>Types may refer to themselves. Suppose:</p>
<pre>
Rec ::= CHOICE {
- nothing [0] NULL,
+ nothing NULL,
something SEQUENCE {
a INTEGER,
b OCTET STRING,
@@ -1365,7 +1255,7 @@ tt TT ::= {a 77,b {"kalle","kula"}} </pre>
Firstly, it could be used as the value in some DEFAULT component:</p>
<pre>
SS ::= SET {
- s [0] OBJECT IDENTIFIER,
+ s OBJECT IDENTIFIER,
val TT DEFAULT tt } </pre>
<p>It could also be used from inside an Erlang program. If the above ASN.1
code was defined in ASN.1 module <c>Values</c>, then the ASN.1 value
@@ -1399,8 +1289,8 @@ SS ::= SET {
<marker id="Information Object"></marker>
<title>ASN.1 Information Objects (X.681)</title>
<p>Information Object Classes, Information Objects and Information
- Object Sets, (in the following called classes, objects and
- object sets respectively), are defined in the standard
+ Object Sets (in the following called classes, objects and
+ object sets respectively) are defined in the standard
definition [<cite id="X.681"></cite>]. In the following only a brief
explanation is given. </p>
<p>These constructs makes it possible to define open types,
@@ -1469,9 +1359,26 @@ StartMessage ::= SEQUENCE {
<p><c>StartMessage</c> can in the <c>content</c> field be
encoded with a value of any type that an object in the
<c>GENERAL-PROCEDURES</c> object set has in its <c>NEW MESSAGE</c> field. This field refers to a type field
- <c><![CDATA[&amp;Message]]></c> in the class. The <c>msgId</c> field is always
+ <c>&amp;Message</c> in the class. The <c>msgId</c> field is always
encoded as a PrintableString, since the field refers to a fixed type
in the class.</p>
+ <p>In practice, object sets are usually declared to be extensible so
+ so that more objects can be added to the set later. Extensibility is
+ indicated like this:</p>
+ <pre>
+GENERAL-PROCEDURES GENERAL-PROCEDURE ::= {
+ object1 | object2, ...} </pre>
+ <p>When decoding a type that uses an extensible set constraint,
+ there is always the possibility that the value in the UNIQUE
+ field is unknown (i.e. the type has been encoded with a later
+ version of the ASN.1 specification). When that happens, the
+ unencoded data will be returned wrapped in a tuple like this:</p>
+
+ <pre>
+{asn1_OPENTYPE,Binary}</pre>
+ <p>where <c>Binary</c> is an Erlang binary that contains the encoded
+ data. (If the option <c>legacy_erlang_types</c> has been given,
+ just the binary will be returned.)</p>
</section>
<section>
@@ -1500,132 +1407,11 @@ T1 ::= General{PrintableString}
T2 ::= General{BIT STRING}
</pre>
<p>An example of a value that can be encoded as type T1 is {12,"hello"}.</p>
- <p>Observe that the compiler not generates encode/decode functions for
- parameterized types, only for the instances of the parameterized
- types. So, if a file contains the types General{}, T1 and T2 above,
+ <p>Note that the compiler does not generate encode/decode functions for
+ parameterized types, but only for the instances of the parameterized
+ types. Therefore, if a file contains the types General{}, T1 and T2 above,
encode/decode functions will only be generated for T1 and T2.
</p>
</section>
-
- <section>
- <title>Tags</title>
- <p>Every built-in ASN.1 type, except CHOICE and ANY have a universal tag.
- This is a unique number that clearly identifies the type. <br></br>
-
- It is essential for all users of ASN.1 to
- understand all the details about tags.</p>
- <p>Tags are implicitly encoded in the BER encoding as shown below, but
- are hardly not accounted for in the PER encoding. In PER tags are
- used for instance to sort the components of a SET.</p>
- <p>There are four different types of tags.</p>
- <taglist>
- <tag><em>universal</em></tag>
- <item>
- <p>For types whose meaning is the same in all
- applications. Such as integers, sequences and so on; that is, all the built in
- types.</p>
- </item>
- <tag><em>application</em></tag>
- <item>
- <p>For application specific types for example, the types in
- X.400 Message handling service have this sort of tag.</p>
- </item>
- <tag><em>private</em></tag>
- <item>
- <p>For your own private types.</p>
- </item>
- <tag><em>context</em></tag>
- <item>
- <p>This is used to distinguish otherwise indistinguishable
- types in a specific context. For example, if we have two
- components of a
- CHOICE type that are both <c>INTEGER</c> values, there is no
- way for the decoder to
- decipher which component was actually chosen, since both
- components will be
- tagged as <c>INTEGER</c>. When this or similar situations occur,
- one or both of the components should be given a context specific
- to resolve the ambiguity.</p>
- </item>
- </taglist>
- <p>The tag in the case of the 'Apdu' type [PRIVATE 1] is encoded to a
- sequence of bytes making it possible for a
- decoder to look at the (initial) bytes that arrive and determine
- whether the rest of the bytes must be of the type associated
- with that particular sequence of bytes. This means that each
- tag must be uniquely associated with <em>only</em> one ASN.1
- type.
- </p>
- <p>Immediately following the tag is a sequence of bytes
- informing the decoder of the length of the instance. This is
- sometimes referred to as TLV (Tag length value) encoding.
- Hence, the structure of a BER encoded series of bytes is as shown in the table below.</p>
- <p></p>
- <table>
- <row>
- <cell align="left" valign="middle">Tag</cell>
- <cell align="left" valign="middle">Len</cell>
- <cell align="left" valign="middle">Value</cell>
- </row>
- <tcaption>Structure of a BER encoded series of bytes</tcaption>
- </table>
- </section>
-
- <section>
- <title>Encoding Rules</title>
- <p>When the first recommendation on ASN.1 was released 1988 it was
- accompanied with the Basic Encoding Rules, BER, as the only
- alternative for encoding.
- BER is a somewhat verbose protocol. It adopts a so-called TLV (type,
- length, value) approach to encoding in which every element of the
- encoding carries some type information, some length information and
- then the value of that element. Where the element is itself
- structured, then the Value part of the element is itself a series of
- embedded TLV components, to whatever depth is necessary. In summary,
- BER is not a compact encoding but is relatively fast and easy to
- produce.</p>
- <p>The DER (Distinguished Encoding Rule) encoding format was included in
- the standard in 1994. It is a specialized form of BER, which gives
- the encoder the option to encode some entities differently. For
- instance, is the value for TRUE any octet with any bit set to one. But,
- DER does not leave any such choices. The value for TRUE in the DER
- case is encoded as the octet <c>11111111</c>. So, the same value
- encoded by two different DER encoders must result in the same bit
- stream.</p>
- <p>A more compact encoding is achieved with the Packed Encoding
- Rules PER which was introduced together with the revised
- recommendation in 1994. PER takes a rather different approach from
- that taken by BER. The first difference is that the tag part in
- the TLV is omitted from the encodings, and any tags in the
- notation are not encoded. The potential ambiguities are resolved
- as follows:</p>
- <list type="bulleted">
- <item>
- <p>A CHOICE is encoded by first encoding a choice index which
- identifies the chosen
- alternative by its position in the notation.</p>
- </item>
- <item>
- <p>The elements of a SEQUENCE are transmitted in textual
- order. OPTIONAL or DEFAULT elements are preceded by a bit map
- to identify which elements are present. After sorting the
- elements of a SET in the "canonical tag order" as defined in
- X.680 8.6 they are treated as a SEQUENCE regarding OPTIONAL
- and DEFAULT elements. A SET is transferred in the sorted
- order.</p>
- </item>
- </list>
- <p>A second difference is that PER takes full account of the sub-typing
- information in that the encoded bytes are affected by the constraints.
- The BER encoded bytes are unaffected by the constraints.
- PER uses the sub-typing information to for example omit length fields
- whenever possible. </p>
- <p>The run-time functions, sometimes take the constraints into account
- both for BER and PER. For instance are SIZE constrained strings checked.</p>
- <p>There are two variants of PER, <em>aligned</em> and <em>unaligned</em>.
- In summary, PER results in compact encodings which require much more
- computation to produce than BER.
- </p>
- </section>
</chapter>
diff --git a/lib/asn1/doc/src/asn1ct.xml b/lib/asn1/doc/src/asn1ct.xml
index ada2aace87..32ff2d52cf 100644
--- a/lib/asn1/doc/src/asn1ct.xml
+++ b/lib/asn1/doc/src/asn1ct.xml
@@ -42,6 +42,18 @@
can be used in during development of applications which handles ASN.1
data (encoded as BER or PER).</p>
<note>
+ <p>By default in OTP 17, the representation of the BIT STRING
+ and OCTET STRING types as Erlang terms have changed. BIT
+ STRING values are now Erlang bitstrings and OCTET STRING values
+ are binaries. Also, an undecoded open type will now be wrapped in
+ a <c>asn1_OPENTYPE</c> tuple. For details see <seealso
+ marker="asn1_ug#BIT STRING">BIT STRING</seealso>, <seealso
+ marker="asn1_ug#OCTET STRING">OCTET STRING</seealso>, and
+ <seealso marker="asn1_ug#Information%20Object">ASN.1 Information Objects</seealso> in User's Guide.</p>
+ <p>To revert to the old representation of the types, use the
+ <c>legacy_erlang_types</c> option.</p>
+ </note>
+ <note>
<p>In R16, the options have been simplified. The back-end is chosen
using one of the options <c>ber</c>, <c>per</c>, or <c>uper</c>.
The options <c>optimize</c>, <c>nif</c>, and <c>driver</c> options
@@ -50,7 +62,7 @@
and <c>uper_bin</c> options will still work, but will print a warning.
</p>
<p>Another change in R16 is that the generated <c>encode/2</c>
- function (and <c>asn1rt:encode/3</c>) always returns a binary.
+ function always returns a binary.
The <c>encode/2</c> function for the BER back-end used to return
an iolist.</p>
</note>
@@ -64,7 +76,7 @@
<v>Asn1module = atom() | string()</v>
<v>Options = [Option| OldOption]</v>
<v>Option = ber | per | uper | der | compact_bit_string |
- legacy_bit_string |
+ legacy_bit_string | legacy_erlang_types |
noobj | {n2n, EnumTypeName} |{outdir, Dir} | {i, IncludeDir} |
asn1config | undec_rest | no_ok_wrapper |
{macro_name_prefix, Prefix} | {record_name_prefix, Prefix} | verbose | warnings_as_errors</v>
@@ -163,6 +175,7 @@ File3.asn </pre>
BIT STRING type section in the Users Guide
</seealso>.
</p>
+ <p>This option implies the <c>legacy_erlang_types</c> option.</p>
</item>
<tag><c>legacy_bit_string</c></tag>
<item>
@@ -175,8 +188,19 @@ File3.asn </pre>
<seealso marker="asn1_ug#BIT STRING">
BIT STRING type section in the Users Guide
</seealso>.
+ <p>This option implies the <c>legacy_erlang_types</c> option.</p>
</p>
</item>
+ <tag><c>legacy_erlang_types</c></tag>
+ <item>
+ <p>Use the same Erlang types to represent BIT STRING and
+ OCTET STRING as in R16. For details see <seealso
+ marker="asn1_ug#BIT STRING">BIT STRING</seealso> and
+ <seealso marker="asn1_ug#OCTET STRING">OCTET
+ STRING</seealso> in User's Guide.</p>
+ <p><em>This option is not recommended for
+ new code.</em></p>
+ </item>
<tag><c>{n2n, EnumTypeName}</c></tag>
<item>
<p>
@@ -303,6 +327,8 @@ File3.asn </pre>
not always checked. Returns <c>{ok, Bytes}</c> if successful or
<c>{error, Reason}</c> if an error occurred.
</p>
+ <p>This function is deprecated.
+ Use <c>Module:encode(Type, Value)</c> instead.</p>
</desc>
</func>
<func>
@@ -316,6 +342,8 @@ File3.asn </pre>
<desc>
<p>Decodes <c>Type</c> from <c>Module</c> from the binary
<c>Bytes</c>. Returns <c>{ok, Value}</c> if successful.</p>
+ <p>This function is deprecated.
+ Use <c>Module:decode(Type, Bytes)</c> instead.</p>
</desc>
</func>
<func>
diff --git a/lib/asn1/doc/src/asn1rt.xml b/lib/asn1/doc/src/asn1rt.xml
index 6e22e45d93..3cf56b01ca 100644
--- a/lib/asn1/doc/src/asn1rt.xml
+++ b/lib/asn1/doc/src/asn1rt.xml
@@ -34,9 +34,12 @@
<module>asn1rt</module>
<modulesummary>ASN.1 runtime support functions</modulesummary>
<description>
- <p>This module is the interface module for the ASN.1 runtime support functions.
- To encode and decode ASN.1 types in runtime the functions in this module
- should be used.</p>
+ <warning>
+ <p>
+ All functions in this module are deprecated and will be
+ removed in a future release.
+ </p>
+ </warning>
</description>
<funcs>
@@ -52,6 +55,7 @@
<desc>
<p>Decodes <c>Type</c> from <c>Module</c> from the binary <c>Bytes</c>.
Returns <c>{ok,Value}</c> if successful.</p>
+ <p>Use <c>Module:decode(Type, Bytes)</c> instead of this function.</p>
</desc>
</func>
@@ -65,16 +69,13 @@
<v>Reason = term()</v>
</type>
<desc>
- <p>Encodes <c>Value</c> of <c>Type</c> defined in the ASN.1 module
- <c>Module</c>. Returns a possibly nested list of bytes and or binaries
- if successful. To get as fast execution as possible the
- encode function only performs rudimentary tests that the input
- <c>Value</c>
- is a correct instance of <c>Type</c>. The length of strings is for example
- not always checked. </p>
- <note>
- <p>Starting in R16, <c>Bytes</c> is always a binary.</p>
- </note>
+ <p>Encodes <c>Value</c> of <c>Type</c> defined in the ASN.1
+ module <c>Module</c>. Returns a binary if successful. To get
+ as fast execution as possible the encode function only
+ performs rudimentary tests that the input <c>Value</c> is a
+ correct instance of <c>Type</c>. The length of strings is, for
+ example, not always checked. </p>
+ <p>Use <c>Module:encode(Type, Value)</c> instead of this function.</p>
</desc>
</func>
@@ -90,6 +91,7 @@
<p><c>info/1</c> returns the version of the asn1 compiler that was
used to compile the module. It also returns the compiler options
that was used.</p>
+ <p>Use <c>Module:info()</c> instead of this function.</p>
</desc>
</func>
@@ -106,6 +108,7 @@
to a list of integers, where each integer represents one
character as its unicode value. The function fails if the binary
is not a properly encoded UTF8 string.</p>
+ <p>Use <seealso marker="stdlib:unicode#characters_to_list-1">unicode:characters_to_list/1</seealso> instead of this function.</p>
</desc>
</func>
@@ -121,6 +124,7 @@
<p><c>utf8_list_to_binary/1</c> Transforms a list of integers,
where each integer represents one character as its unicode
value, to a UTF8 encoded binary.</p>
+ <p>Use <seealso marker="stdlib:unicode#characters_to_binary-1">unicode:characters_to_binary/1</seealso> instead of this function.</p>
</desc>
</func>
diff --git a/lib/asn1/doc/src/notes.xml b/lib/asn1/doc/src/notes.xml
index ff7962edd9..cb89bb298b 100644
--- a/lib/asn1/doc/src/notes.xml
+++ b/lib/asn1/doc/src/notes.xml
@@ -31,6 +31,112 @@
<p>This document describes the changes made to the asn1 application.</p>
+<section><title>Asn1 3.0</title>
+
+ <section><title>Fixed Bugs and Malfunctions</title>
+ <list>
+ <item>
+ <p>
+ Subtyping an extensible ENUMERATED would cause an
+ compilation error. (Thanks to Morten Nygaard Åsnes for
+ reporting this bug.)</p>
+ <p>
+ Own Id: OTP-11700</p>
+ </item>
+ <item>
+ <p>When specifying the value for an OCTET STRING in a
+ specification, the ASN.1 standard clearly states that the
+ value must be either a bstring or an hstring, but NOT a
+ cstring. The ASN.1 compiler will now generate a
+ compilation error if the value of an OCTET STRING is
+ given as a character string.</p>
+ <p>That is, the following example is now illegal:</p>
+ <p><c>string OCTET STRING ::= "Now illegal"</c></p>
+ <p>
+ *** POTENTIAL INCOMPATIBILITY ***</p>
+ <p>
+ Own Id: OTP-11727</p>
+ </item>
+ <item>
+ <p>
+ Application upgrade (appup) files are corrected for the
+ following applications: </p>
+ <p>
+ <c>asn1, common_test, compiler, crypto, debugger,
+ dialyzer, edoc, eldap, erl_docgen, et, eunit, gs, hipe,
+ inets, observer, odbc, os_mon, otp_mibs, parsetools,
+ percept, public_key, reltool, runtime_tools, ssh,
+ syntax_tools, test_server, tools, typer, webtool, wx,
+ xmerl</c></p>
+ <p>
+ A new test utility for testing appup files is added to
+ test_server. This is now used by most applications in
+ OTP.</p>
+ <p>
+ (Thanks to Tobias Schlager)</p>
+ <p>
+ Own Id: OTP-11744</p>
+ </item>
+ </list>
+ </section>
+
+
+ <section><title>Improvements and New Features</title>
+ <list>
+ <item>
+ <p>
+ By giving --enable-static-{nifs,drivers} to configure it
+ is now possible to statically linking of nifs and drivers
+ to the main Erlang VM binary. At the moment only the asn1
+ and crypto nifs of the Erlang/OTP nifs and drivers have
+ been prepared to be statically linked. For more details
+ see the Installation Guide in the System documentation.</p>
+ <p>
+ Own Id: OTP-11258</p>
+ </item>
+ <item>
+ <p>Code generation for the <c>per</c> and <c>uper</c>
+ backends has been somewhat improved.</p>
+ <p>
+ Own Id: OTP-11573</p>
+ </item>
+ <item>
+ <p>The OCTET STRING and BIT STRING types now have a more
+ natural mapping to Erlang types (binary and bitstring,
+ respectively), which is more efficient and will avoid
+ useless conversions between lists and
+ binaries/bitstrings.</p>
+ <p>This is an incompatible change. To revert to the old
+ mapping to support existing applications, use the
+ <c>legacy_erlang_types</c> option.</p>
+ <p>Impact: There is a potential for better performance,
+ as it is now possible to avoid conversions between lists
+ and binaries both in the generated ASN.1 encode/decode
+ code and in the application itself.</p>
+ <p>
+ *** POTENTIAL INCOMPATIBILITY ***</p>
+ <p>
+ Own Id: OTP-11594</p>
+ </item>
+ <item>
+ <p>All functions in the <c>asn1rt</c> module, as well as
+ <c>asn1ct:decode/3</c> and <c>asn1ct:encode/3</c>, are
+ now deprecated.</p>
+ <p>
+ Own Id: OTP-11731</p>
+ </item>
+ <item>
+ <p>
+ Generated .hrl files are now protected from being
+ included more than once.</p>
+ <p>
+ Own Id: OTP-11804</p>
+ </item>
+ </list>
+ </section>
+
+</section>
+
<section><title>Asn1 2.0.4</title>
<section><title>Fixed Bugs and Malfunctions</title>
diff --git a/lib/asn1/src/asn1.app.src b/lib/asn1/src/asn1.app.src
index f2ee8deb75..02cbba0f10 100644
--- a/lib/asn1/src/asn1.app.src
+++ b/lib/asn1/src/asn1.app.src
@@ -10,5 +10,6 @@
asn1db
]},
{env, []},
- {applications, [kernel, stdlib]}
+ {applications, [kernel, stdlib]},
+ {runtime_dependencies, ["stdlib-2.0","kernel-3.0","erts-6.0"]}
]}.
diff --git a/lib/asn1/src/asn1.appup.src b/lib/asn1/src/asn1.appup.src
index 2d11eddfbf..e4b3508cc4 100644
--- a/lib/asn1/src/asn1.appup.src
+++ b/lib/asn1/src/asn1.appup.src
@@ -1,11 +1,21 @@
+%% -*- erlang -*-
+%% %CopyrightBegin%
+%%
+%% Copyright Ericsson AB 2014. 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%
{"%VSN%",
-% This version does not change anything of the runtime modules
-% Only changes in compile time modules and thus no need for upgrade on target
-[
- ],
- [
- ]}.
-
-
-
-
+ [{<<".*">>,[{restart_application, asn1}]}],
+ [{<<".*">>,[{restart_application, asn1}]}]
+}.
diff --git a/lib/asn1/src/asn1ct.erl b/lib/asn1/src/asn1ct.erl
index f2ccf5f212..8470e5a1b4 100644
--- a/lib/asn1/src/asn1ct.erl
+++ b/lib/asn1/src/asn1ct.erl
@@ -19,6 +19,10 @@
%%
%%
-module(asn1ct).
+-deprecated([decode/3,encode/3]).
+-compile([{nowarn_deprecated_function,{asn1rt,decode,3}},
+ {nowarn_deprecated_function,{asn1rt,encode,2}},
+ {nowarn_deprecated_function,{asn1rt,encode,3}}]).
%% Compile Time functions for ASN.1 (e.g ASN.1 compiler).
@@ -40,7 +44,7 @@
maybe_rename_function/3,current_sindex/0,
set_current_sindex/1,maybe_saved_sindex/2,
parse_and_save/2,verbose/3,warning/3,warning/4,error/3]).
--export([get_bit_string_format/0]).
+-export([get_bit_string_format/0,use_legacy_types/0]).
-include("asn1_records.hrl").
-include_lib("stdlib/include/erl_compile.hrl").
@@ -333,8 +337,7 @@ print_structured_errors([_|_]=Errors) ->
print_structured_errors(_) -> ok.
compile1(File, #st{opts=Opts}=St0) ->
- verbose("Erlang ASN.1 version ~p, compiling ~p~n", [?vsn,File], Opts),
- verbose("Compiler Options: ~p~n", [Opts], Opts),
+ compiler_verbose(File, Opts),
Passes = single_passes(),
Base = filename:rootname(filename:basename(File)),
OutFile = outfile(Base, "", Opts),
@@ -349,8 +352,7 @@ compile1(File, #st{opts=Opts}=St0) ->
%% compile_set/3 merges and compiles a number of asn1 modules
%% specified in a .set.asn file to one .erl file.
compile_set(SetBase, Files, #st{opts=Opts}=St0) ->
- verbose("Erlang ASN.1 version ~p compiling ~p ~n", [?vsn,Files], Opts),
- verbose("Compiler Options: ~p~n",[Opts], Opts),
+ compiler_verbose(Files, Opts),
OutFile = outfile(SetBase, "", Opts),
DbFile = outfile(SetBase, "asn1db", Opts),
InputModules = [begin
@@ -363,6 +365,11 @@ compile_set(SetBase, Files, #st{opts=Opts}=St0) ->
Passes = set_passes(),
run_passes(Passes, St).
+compiler_verbose(What, Opts) ->
+ verbose("Erlang ASN.1 compiler ~s\n", [?vsn], Opts),
+ verbose("Compiling: ~p\n", [What], Opts),
+ verbose("Options: ~p\n", [Opts], Opts).
+
%% merge_modules/2 -> returns a module record where the typeorval lists are merged,
%% the exports lists are merged, the imports lists are merged when the
%% elements come from other modules than the merge set, the tagdefault
@@ -559,6 +566,8 @@ get_pos_of_def(#pobjectdef{pos=Pos}) ->
Pos;
get_pos_of_def(#pobjectsetdef{pos=Pos}) ->
Pos;
+get_pos_of_def(#'Externaltypereference'{pos=Pos}) ->
+ Pos;
get_pos_of_def(#'Externalvaluereference'{pos=Pos}) ->
Pos;
get_pos_of_def(_) ->
@@ -838,6 +847,7 @@ delete_double_of_symbol1([],Acc) ->
generate({M,GenTOrV}, OutFile, EncodingRule, Options) ->
debug_on(Options),
setup_bit_string_format(Options),
+ setup_legacy_erlang_types(Options),
put(encoding_options,Options),
asn1ct_table:new(check_functions),
@@ -866,6 +876,31 @@ generate({M,GenTOrV}, OutFile, EncodingRule, Options) ->
asn1ct_table:delete(check_functions),
Result.
+setup_legacy_erlang_types(Opts) ->
+ F = case lists:member(legacy_erlang_types, Opts) of
+ false ->
+ case get_bit_string_format() of
+ bitstring ->
+ false;
+ compact ->
+ legacy_forced_info(compact_bit_string),
+ true;
+ legacy ->
+ legacy_forced_info(legacy_bit_string),
+ true
+ end;
+ true ->
+ true
+ end,
+ put(use_legacy_erlang_types, F).
+
+legacy_forced_info(Opt) ->
+ io:format("Info: The option 'legacy_erlang_types' "
+ "is implied by the '~s' option.\n", [Opt]).
+
+use_legacy_types() ->
+ get(use_legacy_erlang_types).
+
setup_bit_string_format(Opts) ->
Format = case {lists:member(compact_bit_string, Opts),
lists:member(legacy_bit_string, Opts)} of
@@ -1011,7 +1046,7 @@ get_file_list1(Stream,Dir,Includes,Acc) ->
Ret = io:get_line(Stream,''),
case Ret of
eof ->
- file:close(Stream),
+ ok = file:close(Stream),
lists:reverse(Acc);
FileName ->
SuffixedNameList =
@@ -1072,6 +1107,7 @@ remove_asn_flags(Options) ->
X /= optimize,
X /= compact_bit_string,
X /= legacy_bit_string,
+ X /= legacy_erlang_types,
X /= debug,
X /= asn1config,
X /= record_name_prefix].
@@ -1896,8 +1932,9 @@ read_config_file(ModuleName) ->
Includes = [I || {i,I} <- Options],
read_config_file1(ModuleName,Includes);
{error,Reason} ->
- file:format_error(Reason),
- throw({error,{"error reading asn1 config file",Reason}})
+ Error = "error reading asn1 config file: " ++
+ file:format_error(Reason),
+ throw({error,Error})
end.
read_config_file1(ModuleName,[]) ->
case filename:extension(ModuleName) of
@@ -1915,8 +1952,9 @@ read_config_file1(ModuleName,[H|T]) ->
{error,enoent} ->
read_config_file1(ModuleName,T);
{error,Reason} ->
- file:format_error(Reason),
- throw({error,{"error reading asn1 config file",Reason}})
+ Error = "error reading asn1 config file: " ++
+ file:format_error(Reason),
+ throw({error,Error})
end.
get_config_info(CfgList,InfoType) ->
diff --git a/lib/asn1/src/asn1ct_check.erl b/lib/asn1/src/asn1ct_check.erl
index 0a13801e08..e788aa5c6c 100644
--- a/lib/asn1/src/asn1ct_check.erl
+++ b/lib/asn1/src/asn1ct_check.erl
@@ -270,46 +270,30 @@ check_exports(S,Module = #module{}) ->
end
end.
-check_imports(S,Module = #module{ }) ->
- case Module#module.imports of
- {imports,[]} ->
- [];
- {imports,ImportList} when is_list(ImportList) ->
- check_imports2(S,ImportList,[]);
- _ ->
- []
- end.
-check_imports2(_S,[],Acc) ->
+check_imports(S, #module{imports={imports,Imports}}) ->
+ check_imports_1(S, Imports, []).
+
+check_imports_1(_S, [], Acc) ->
Acc;
-check_imports2(S,[#'SymbolsFromModule'{symbols=Imports,module=ModuleRef}|SFMs],Acc) ->
- NameOfDef =
- fun(#'Externaltypereference'{type=N}) -> N;
- (#'Externalvaluereference'{value=N}) -> N
- end,
- Module = NameOfDef(ModuleRef),
- Refs = [{M,R}||{{M,_},R} <- [{catch get_referenced_type(S,Ref),Ref}||Ref <- Imports]],
- {Illegal,Other} = lists:splitwith(fun({error,_}) -> true;(_) -> false end,
- Refs),
- ChainedRefs = [R||{M,R} <- Other, M =/= Module],
- IllegalRefs = [R||{error,R} <- Illegal] ++
- [R||{M,R} <- ChainedRefs,
- ok =/= chained_import(S,Module,M,NameOfDef(R))],
- ReportError =
- fun(Ref) ->
- NewS=S#state{type=Ref,tname=NameOfDef(Ref)},
- error({import,"imported undefined entity",NewS})
- end,
- check_imports2(S,SFMs,[ReportError(Err)||Err <- IllegalRefs]++Acc).
+check_imports_1(S, [#'SymbolsFromModule'{symbols=Imports,module=ModuleRef}|SFMs], Acc0) ->
+ Module = name_of_def(ModuleRef),
+ Refs0 = [{catch get_referenced_type(S, Ref),Ref} || Ref <- Imports],
+ Refs = [{M,R} || {{M,_},R} <- Refs0],
+ {Illegal,Other} = lists:splitwith(fun({error,_}) -> true;
+ (_) -> false
+ end, Refs),
+ ChainedRefs = [R || {M,R} <- Other, M =/= Module],
+ IllegalRefs = [R || {error,R} <- Illegal] ++
+ [R || {M,R} <- ChainedRefs,
+ ok =/= chained_import(S, Module, M, name_of_def(R))],
+ Acc = [return_asn1_error(S, Ref, {undefined_import,name_of_def(Ref),Module}) ||
+ Ref <- IllegalRefs] ++ Acc0,
+ check_imports_1(S, SFMs, Acc).
chained_import(S,ImpMod,DefMod,Name) ->
%% Name is a referenced structure that is not defined in ImpMod,
%% but must be present in the Imports list of ImpMod. The chain of
%% imports of Name must end in DefMod.
- NameOfDef =
- fun(#'Externaltypereference'{type=N}) -> N;
- (#'Externalvaluereference'{value=N}) -> N;
- (Other) -> Other
- end,
GetImports =
fun(_M_) ->
case asn1_db:dbget(_M_,'MODULE') of
@@ -321,9 +305,9 @@ chained_import(S,ImpMod,DefMod,Name) ->
FindNameInImports =
fun([],N,_) -> {no_mod,N};
([#'SymbolsFromModule'{symbols=Imports,module=ModuleRef}|SFMs],N,F) ->
- case [NameOfDef(X)||X <- Imports, NameOfDef(X) =:= N] of
+ case [name_of_def(X) || X <- Imports, name_of_def(X) =:= N] of
[] -> F(SFMs,N,F);
- [N] -> {NameOfDef(ModuleRef),N}
+ [N] -> {name_of_def(ModuleRef),N}
end
end,
case GetImports(ImpMod) of
@@ -1567,13 +1551,13 @@ check_defaultfields(S, Fields, ClassFields) ->
[] ->
ok;
[_|_]=Invalid ->
- throw(asn1_error(S, T, {invalid_fields,Invalid,Obj}))
+ asn1_error(S, T, {invalid_fields,Invalid,Obj})
end,
case ordsets:subtract(Mandatory, Present) of
[] ->
check_defaultfields_1(S, Fields, ClassFields, []);
[_|_]=Missing ->
- throw(asn1_error(S, T, {missing_mandatory_fields,Missing,Obj}))
+ asn1_error(S, T, {missing_mandatory_fields,Missing,Obj})
end.
check_defaultfields_1(_S, [], _ClassFields, Acc) ->
@@ -2464,7 +2448,7 @@ normalize_value(S0, Type, {'DEFAULT',Value}, NameList) ->
{'BIT STRING',CType,_} ->
normalize_bitstring(S,Value,CType);
{'OCTET STRING',CType,_} ->
- normalize_octetstring(S,Value,CType);
+ normalize_octetstring(S0, Value, CType);
{'NULL',_CType,_} ->
%%normalize_null(Value);
'NULL';
@@ -2574,6 +2558,18 @@ normalize_bitstring(S, Value, Type)->
Bs
end.
+hstring_to_binary(L) ->
+ byte_align(hstring_to_bitstring(L)).
+
+bstring_to_binary(L) ->
+ byte_align(bstring_to_bitstring(L)).
+
+byte_align(Bs) ->
+ case bit_size(Bs) rem 8 of
+ 0 -> Bs;
+ N -> <<Bs/bitstring,0:(8-N)>>
+ end.
+
hstring_to_bitstring(L) ->
<< <<(hex_to_int(D)):4>> || D <- L >>.
@@ -2592,59 +2588,19 @@ hex_to_int(D) when $A =< D, D =< $F -> D - ($A - 10).
normalize_octetstring(S,Value,CType) ->
case Value of
{bstring,String} ->
- bstring_to_octetlist(String);
+ bstring_to_binary(String);
{hstring,String} ->
- hstring_to_octetlist(String);
+ hstring_to_binary(String);
Rec when is_record(Rec,'Externalvaluereference') ->
get_normalized_value(S,Value,CType,
fun normalize_octetstring/3,[]);
{Name,String} when is_atom(Name) ->
normalize_octetstring(S,String,CType);
- List when is_list(List) ->
- %% check if list elements are valid octet values
- lists:map(fun([])-> ok;
- (H)when H > 255->
- asn1ct:warning("not legal octet value ~p in OCTET STRING, ~p~n",
- [H,List],S,
- "not legal octet value ~p in OCTET STRING");
- (_)-> ok
- end, List),
- List;
- Other ->
- asn1ct:warning("unknown default value ~p~n",[Other],S,
- "unknown default value"),
- Value
+ _ ->
+ Item = S#state.value,
+ asn1_error(S, Item, illegal_octet_string_value)
end.
-
-bstring_to_octetlist([]) ->
- [];
-bstring_to_octetlist([H|T]) when H == $0 ; H == $1 ->
- bstring_to_octetlist(T,6,[(H - $0) bsl 7]).
-bstring_to_octetlist([H|T],0,[Hacc|Tacc]) when H == $0; H == $1 ->
- bstring_to_octetlist(T, 7, [0,Hacc + (H -$0)| Tacc]);
-bstring_to_octetlist([H|T],BSL,[Hacc|Tacc]) when H == $0; H == $1 ->
- bstring_to_octetlist(T, BSL-1, [Hacc + ((H - $0) bsl BSL)| Tacc]);
-bstring_to_octetlist([],7,[0|Acc]) ->
- lists:reverse(Acc);
-bstring_to_octetlist([],_,Acc) ->
- lists:reverse(Acc).
-
-hstring_to_octetlist([]) ->
- [];
-hstring_to_octetlist(L) ->
- hstring_to_octetlist(L,4,[]).
-hstring_to_octetlist([H|T],0,[Hacc|Tacc]) when H >= $A, H =< $F ->
- hstring_to_octetlist(T,4,[Hacc + (H - $A + 10)|Tacc]);
-hstring_to_octetlist([H|T],BSL,Acc) when H >= $A, H =< $F ->
- hstring_to_octetlist(T,0,[(H - $A + 10) bsl BSL|Acc]);
-hstring_to_octetlist([H|T],0,[Hacc|Tacc]) when H >= $0; H =< $9 ->
- hstring_to_octetlist(T,4,[Hacc + (H - $0)|Tacc]);
-hstring_to_octetlist([H|T],BSL,Acc) when H >= $0; H =< $9 ->
- hstring_to_octetlist(T,0,[(H - $0) bsl BSL|Acc]);
-hstring_to_octetlist([],_,Acc) ->
- lists:reverse(Acc).
-
normalize_objectidentifier(S, Value) ->
{ok,Val} = validate_objectidentifier(S, o_id, Value, []),
Val.
@@ -2659,18 +2615,21 @@ normalize_objectdescriptor(Value) ->
normalize_real(Value) ->
Value.
-normalize_enumerated(S, Id, {Base,Ext}) ->
+normalize_enumerated(S, Id0, NNL) ->
+ {Id,_} = lookup_enum_value(S, Id0, NNL),
+ Id.
+
+lookup_enum_value(S, Id, {Base,Ext}) ->
%% Extensible ENUMERATED.
- normalize_enumerated(S, Id, Base++Ext);
-normalize_enumerated(S, #'Externalvaluereference'{value=Id},
- NamedNumberList) ->
- normalize_enumerated(S, Id, NamedNumberList);
-normalize_enumerated(S, Id, NamedNumberList) when is_atom(Id) ->
- case lists:keymember(Id, 1, NamedNumberList) of
- true ->
- Id;
+ lookup_enum_value(S, Id, Base++Ext);
+lookup_enum_value(S, #'Externalvaluereference'{value=Id}, NNL) ->
+ lookup_enum_value(S, Id, NNL);
+lookup_enum_value(S, Id, NNL) when is_atom(Id) ->
+ case lists:keyfind(Id, 1, NNL) of
+ {_,_}=Ret ->
+ Ret;
false ->
- throw(asn1_error(S, S#state.value, {undefined,Id}))
+ asn1_error(S, S#state.value, {undefined,Id})
end.
normalize_choice(S,{'CHOICE',{C,V}},CType,NameList) when is_atom(C) ->
@@ -3105,12 +3064,11 @@ check_type(S=#state{recordtopname=TopName},Type,Ts) when is_record(Ts,type) ->
Ct=maybe_illicit_implicit_tag(open_type,Tag),
TempNewDef#newt{type='ASN1_OPEN_TYPE',tag=Ct};
'INTEGER' ->
- check_integer(S,[],Constr),
TempNewDef#newt{tag=
merge_tags(Tag,?TAG_PRIMITIVE(?N_INTEGER))};
{'INTEGER',NamedNumberList} ->
- TempNewDef#newt{type={'INTEGER',check_integer(S,NamedNumberList,Constr)},
+ TempNewDef#newt{type={'INTEGER',check_integer(S,NamedNumberList)},
tag=
merge_tags(Tag,?TAG_PRIMITIVE(?N_INTEGER))};
'REAL' ->
@@ -3118,8 +3076,7 @@ check_type(S=#state{recordtopname=TopName},Type,Ts) when is_record(Ts,type) ->
TempNewDef#newt{tag=merge_tags(Tag,?TAG_PRIMITIVE(?N_REAL))};
{'BIT STRING',NamedNumberList} ->
- NewL = check_bitstring(S,NamedNumberList,Constr),
-%% erlang:display({asn1ct_check,NamedNumberList,NewL}),
+ NewL = check_bitstring(S, NamedNumberList),
TempNewDef#newt{type={'BIT STRING',NewL},
tag=
merge_tags(Tag,?TAG_PRIMITIVE(?N_BIT_STRING))};
@@ -3803,8 +3760,9 @@ resolv_value(S,Val) ->
resolv_value1(S,Id).
resolv_value1(S, ERef = #'Externalvaluereference'{value=Name}) ->
- case catch resolve_namednumber(S,S#state.type,Name) of
- V when is_integer(V) -> V;
+ case catch resolve_namednumber(S, S#state.type, Name) of
+ V when is_integer(V) ->
+ V;
_ ->
case get_referenced_type(S,ERef) of
{Err,_Reason} when Err == error; Err == 'EXIT' ->
@@ -3857,21 +3815,20 @@ resolve_value_from_object(S,Object,FieldName) ->
end.
-
resolve_namednumber(S,#typedef{typespec=Type},Name) ->
case Type#type.def of
{'ENUMERATED',NameList} ->
- NamedNumberList=check_enumerated(S,NameList,Type#type.constraint),
- N = normalize_enumerated(S,Name,NamedNumberList),
- {value,{_,V}} = lists:keysearch(N,1,NamedNumberList),
- V;
+ resolve_namednumber_1(S, Name, NameList, Type);
{'INTEGER',NameList} ->
- NamedNumberList = check_enumerated(S,NameList,Type#type.constraint),
- {value,{_,V}} = lists:keysearch(Name,1,NamedNumberList),
- V;
+ resolve_namednumber_1(S, Name, NameList, Type);
_ ->
not_enumerated
end.
+
+resolve_namednumber_1(S, Name, NameList, Type) ->
+ NamedNumberList = check_enumerated(S, NameList, Type#type.constraint),
+ {_,N} = lookup_enum_value(S, Name, NamedNumberList),
+ N.
check_constraints(S,[{'ContainedSubtype',Type} | Rest], Acc) ->
{RefMod,CTDef} = get_referenced_type(S,Type#type.def),
@@ -3952,9 +3909,9 @@ check_constraint(S,{simpletable,Type}) ->
#'Externaltypereference'{} ->
ERef = check_externaltypereference(S,C),
{simpletable,ERef#'Externaltypereference'.type};
- #type{def=#'Externaltypereference'{type=T}} ->
- check_externaltypereference(S,C#type.def),
- {simpletable,T};
+ #type{def=#'Externaltypereference'{}=ExtTypeRef} ->
+ ERef = check_externaltypereference(S, ExtTypeRef),
+ {simpletable,ERef#'Externaltypereference'.type};
{valueset,#type{def=ERef=#'Externaltypereference'{}}} -> % this is an object set
{_,TDef} = get_referenced_type(S,ERef),
case TDef#typedef.typespec of
@@ -4936,73 +4893,46 @@ imported1(Name,
end;
imported1(_Name,[]) ->
false.
-
-check_integer(_S,[],_C) ->
+%% Check the named number list for an INTEGER or a BIT STRING.
+check_named_number_list(_S, []) ->
[];
-check_integer(S,NamedNumberList,_C) ->
- case [X || X <- NamedNumberList, tuple_size(X) =:= 2] of
- NamedNumberList ->
- %% An already checked integer with NamedNumberList
- NamedNumberList;
- _ ->
- case check_unique(NamedNumberList,2) of
- [] ->
- check_int(S,NamedNumberList,[]);
- L when is_list(L) ->
- error({type,{duplicates,L},S}),
- unchanged
- end
+check_named_number_list(_S, [{_,_}|_]=NNL) ->
+ %% The named number list has already been checked.
+ NNL;
+check_named_number_list(S, NNL0) ->
+ %% Check that the names are unique.
+ T = S#state.type,
+ case check_unique(NNL0, 2) of
+ [] ->
+ NNL1 = [{Id,resolve_valueref(S, Val)} || {'NamedNumber',Id,Val} <- NNL0],
+ NNL = lists:keysort(2, NNL1),
+ case check_unique(NNL, 2) of
+ [] ->
+ NNL;
+ [Val|_] ->
+ asn1_error(S, T, {value_reused,Val})
+ end;
+ [H|_] ->
+ asn1_error(S, T, {namelist_redefinition,H})
end.
-
-check_int(S,[{'NamedNumber',Id,Num}|T],Acc) when is_integer(Num) ->
- check_int(S,T,[{Id,Num}|Acc]);
-check_int(S,[{'NamedNumber',Id,{identifier,_,Name}}|T],Acc) ->
- Val = dbget_ex(S,S#state.mname,Name),
- check_int(S,[{'NamedNumber',Id,Val#valuedef.value}|T],Acc);
-check_int(S,[{'NamedNumber',Id,{'Externalvaluereference',_,Mod,Name}}|T],Acc) ->
- Val = dbget_ex(S,Mod,Name),
- check_int(S,[{'NamedNumber',Id,Val#valuedef.value}|T],Acc);
-check_int(_S,[],Acc) ->
- lists:keysort(2,Acc).
+resolve_valueref(S, #'Externalvaluereference'{module=Mod,value=Name}) ->
+ dbget_ex(S, Mod, Name);
+resolve_valueref(_, Val) when is_integer(Val) ->
+ Val.
-check_real(_S,_Constr) ->
- ok.
+check_integer(S, NNL) ->
+ check_named_number_list(S, NNL).
-check_bitstring(_S,[],_Constr) ->
- [];
-check_bitstring(S,NamedNumberList,_Constr) ->
- case check_unique(NamedNumberList,2) of
- [] ->
- check_bitstr(S,NamedNumberList,[]);
- L when is_list(L) ->
- error({type,{duplicates,L},S}),
- unchanged
- end.
+check_bitstring(S, NNL0) ->
+ NNL = check_named_number_list(S, NNL0),
+ _ = [asn1_error(S, S#state.type, {invalid_bit_number,Bit}) ||
+ {_,Bit} <- NNL, Bit < 0],
+ NNL.
-check_bitstr(S,[{'NamedNumber',Id,Num}|T],Acc)when is_integer(Num) ->
- check_bitstr(S,T,[{Id,Num}|Acc]);
-check_bitstr(S,[{'NamedNumber',Id,Name}|T],Acc) when is_atom(Name) ->
-%%check_bitstr(S,[{'NamedNumber',Id,{identifier,_,Name}}|T],Acc) ->
-%% io:format("asn1ct_check:check_bitstr/3 hej hop ~w~n",[Name]),
- Val = dbget_ex(S,S#state.mname,Name),
-%% io:format("asn1ct_check:check_bitstr/3: ~w~n",[Val]),
- check_bitstr(S,[{'NamedNumber',Id,Val#valuedef.value}|T],Acc);
-check_bitstr(S,[],Acc) ->
- case check_unique(Acc,2) of
- [] ->
- lists:keysort(2,Acc);
- L when is_list(L) ->
- error({type,{duplicate_values,L},S}),
- unchanged
- end;
-%% When a BIT STRING already is checked, for instance a COMPONENTS OF S
-%% where S is a sequence that has a component that is a checked BS, the
-%% NamedNumber list is a list of {atom(),integer()} elements.
-check_bitstr(S,[El={Id,Num}|Rest],Acc) when is_atom(Id),is_integer(Num) ->
- check_bitstr(S,Rest,[El|Acc]).
-
+check_real(_S,_Constr) ->
+ ok.
%% Check INSTANCE OF
%% check that DefinedObjectClass is of TYPE-IDENTIFIER class
@@ -5013,20 +4943,16 @@ check_instance_of(S,DefinedObjectClass,Constraint) ->
check_type_identifier(S,DefinedObjectClass),
iof_associated_type(S,Constraint).
-
-check_type_identifier(_S,'TYPE-IDENTIFIER') ->
- ok;
-check_type_identifier(S,Eref=#'Externaltypereference'{}) ->
- case get_referenced_type(S,Eref) of
- {_,#classdef{name='TYPE-IDENTIFIER'}} -> ok;
- {_,#classdef{typespec=NextEref}}
- when is_record(NextEref,'Externaltypereference') ->
- check_type_identifier(S,NextEref);
+check_type_identifier(S, Eref=#'Externaltypereference'{type=Class}) ->
+ case get_referenced_type(S, Eref) of
+ {_,#classdef{name='TYPE-IDENTIFIER'}} ->
+ ok;
+ {_,#classdef{typespec=#'Externaltypereference'{}=NextEref}} ->
+ check_type_identifier(S, NextEref);
{_,TD=#typedef{typespec=#type{def=#'Externaltypereference'{}}}} ->
- check_type_identifier(S,(TD#typedef.typespec)#type.def);
- Err ->
- error({type,{"object set in type INSTANCE OF "
- "not of class TYPE-IDENTIFIER",Eref,Err},S})
+ check_type_identifier(S, (TD#typedef.typespec)#type.def);
+ _ ->
+ asn1_error(S, S#state.type, {illegal_instance_of,Class})
end.
iof_associated_type(S,[]) ->
@@ -5156,9 +5082,6 @@ check_enumerated(S,NamedNumberList,_Constr) ->
%% the latter is returned if the ENUMERATION contains EXTENSIONMARK
check_enum(S,[{'NamedNumber',Id,Num}|T],Acc1,Acc2,Root) when is_integer(Num) ->
check_enum(S,T,[{Id,Num}|Acc1],Acc2,Root);
-check_enum(S,[{'NamedNumber',Id,{identifier,_,Name}}|T],Acc1,Acc2,Root) ->
- Val = dbget_ex(S,S#state.mname,Name),
- check_enum(S,[{'NamedNumber',Id,Val#valuedef.value}|T],Acc1,Acc2,Root);
check_enum(S,['EXTENSIONMARK'|T],Acc1,Acc2,_Root) ->
NewAcc2 = lists:keysort(2,Acc1),
NewList = enum_number(lists:reverse(Acc2),NewAcc2,0,[],[]),
@@ -6774,7 +6697,7 @@ storeindb(#state{mname=Module}=S, [H|T], Errors) ->
storeindb(S, T, Errors);
Prev ->
PrevLine = asn1ct:get_pos_of_def(Prev),
- {error,Error} = asn1_error(S, H, {already_defined,Name,PrevLine}),
+ Error = return_asn1_error(S, H, {already_defined,Name,PrevLine}),
storeindb(S, T, [Error|Errors])
end;
storeindb(_, [], []) ->
@@ -6821,20 +6744,37 @@ findtypes_and_values([],Tacc,Vacc,Pacc,Cacc,Oacc,OSacc) ->
{lists:reverse(Tacc),lists:reverse(Vacc),lists:reverse(Pacc),
lists:reverse(Cacc),lists:reverse(Oacc),lists:reverse(OSacc)}.
-asn1_error(#state{mname=Where}, Item, Error) ->
+return_asn1_error(#state{mname=Where}, Item, Error) ->
Pos = asn1ct:get_pos_of_def(Item),
- {error,{structured_error,{Where,Pos},?MODULE,Error}}.
+ {structured_error,{Where,Pos},?MODULE,Error}.
+
+asn1_error(S, Item, Error) ->
+ throw({error,return_asn1_error(S, Item, Error)}).
format_error({already_defined,Name,PrevLine}) ->
io_lib:format("the name ~p has already been defined at line ~p",
[Name,PrevLine]);
+format_error({illegal_instance_of,Class}) ->
+ io_lib:format("using INSTANCE OF on class '~s' is illegal, "
+ "because INSTANCE OF may only be used on the class TYPE-IDENTFIER",
+ [Class]);
+format_error(illegal_octet_string_value) ->
+ "expecting a bstring or an hstring as value for an OCTET STRING";
format_error({invalid_fields,Fields,Obj}) ->
io_lib:format("invalid ~s in ~p", [format_fields(Fields),Obj]);
+format_error({invalid_bit_number,Bit}) ->
+ io_lib:format("the bit number '~p' is invalid", [Bit]);
format_error({missing_mandatory_fields,Fields,Obj}) ->
io_lib:format("missing mandatory ~s in ~p",
[format_fields(Fields),Obj]);
+format_error({namelist_redefinition,Name}) ->
+ io_lib:format("the name '~s' can not be redefined", [Name]);
format_error({undefined,Name}) ->
io_lib:format("'~s' is referenced, but is not defined", [Name]);
+format_error({undefined_import,Ref,Module}) ->
+ io_lib:format("'~s' is not exported from ~s", [Ref,Module]);
+format_error({value_reused,Val}) ->
+ io_lib:format("the value '~p' is used more than once", [Val]);
format_error(Other) ->
io_lib:format("~p", [Other]).
@@ -6850,14 +6790,6 @@ error({export,Msg,#state{mname=Mname,type=Ref,tname=Typename}}) ->
Pos = Ref#'Externaltypereference'.pos,
io:format("asn1error:~p:~p:~p~n~p~n",[Pos,Mname,Typename,Msg]),
{error,{export,Pos,Mname,Typename,Msg}};
-error({import,Msg,#state{mname=Mname,type=Ref,tname=Typename}}) ->
- PosOfDef =
- fun(#'Externaltypereference'{pos=P}) -> P;
- (#'Externalvaluereference'{pos=P}) -> P
- end,
- Pos = PosOfDef(Ref),
- io:format("asn1error:~p:~p:~p~n~p~n",[Pos,Mname,Typename,Msg]),
- {error,{import,Pos,Mname,Typename,Msg}};
% error({type,{Msg1,Msg2},#state{mname=Mname,type=Type,tname=Typename}})
% when is_record(Type,typedef) ->
% io:format("asn1error:~p:~p:~p ~p~n",
@@ -7158,3 +7090,6 @@ check_fold(S, [H|T], Check) ->
[Error|check_fold(S, T, Check)]
end;
check_fold(_, [], Check) when is_function(Check, 3) -> [].
+
+name_of_def(#'Externaltypereference'{type=N}) -> N;
+name_of_def(#'Externalvaluereference'{value=N}) -> N.
diff --git a/lib/asn1/src/asn1ct_constructed_per.erl b/lib/asn1/src/asn1ct_constructed_per.erl
index 4672f7edd3..ed3f6f886e 100644
--- a/lib/asn1/src/asn1ct_constructed_per.erl
+++ b/lib/asn1/src/asn1ct_constructed_per.erl
@@ -79,7 +79,7 @@ gen_encode_constructed_imm(Erule, Typename, #type{}=D) ->
[]
end,
Aligned = is_aligned(Erule),
- Value0 = asn1ct_gen:mk_var(asn1ct_name:curr(val)),
+ Value0 = make_var(val),
Optionals = optionals(to_textual_order(CompList)),
ImmOptionals = [asn1ct_imm:per_enc_optional(Value0, Opt, Aligned) ||
Opt <- Optionals],
@@ -87,7 +87,7 @@ gen_encode_constructed_imm(Erule, Typename, #type{}=D) ->
ExtImm = case Ext of
{ext,ExtPos,NumExt} when NumExt > 0 ->
gen_encode_extaddgroup(CompList),
- Value = asn1ct_gen:mk_var(asn1ct_name:curr(val)),
+ Value = make_var(val),
asn1ct_imm:per_enc_extensions(Value, ExtPos,
NumExt, Aligned);
_ ->
@@ -106,19 +106,17 @@ gen_encode_constructed_imm(Erule, Typename, #type{}=D) ->
c_index=N,
usedclassfield=UniqueFieldName,
uniqueclassfield=UniqueFieldName,
- valueindex=ValueIndex
+ valueindex=ValueIndex0
} -> %% N is index of attribute that determines constraint
{Module,ObjSetName} = ObjectSet,
#typedef{typespec=#'ObjectSet'{gen=Gen}} =
asn1_db:dbget(Module, ObjSetName),
case Gen of
true ->
- ObjectEncode =
- asn1ct_gen:un_hyphen_var(lists:concat(['Obj',AttrN])),
- El = make_element(N+1, asn1ct_gen:mk_var(asn1ct_name:curr(val))),
- ValueMatch = value_match(ValueIndex, El),
- ObjSetImm0 = [{assign,{var,ObjectEncode},ValueMatch}],
- {{AttrN,ObjectEncode},ObjSetImm0};
+ ValueIndex = ValueIndex0 ++ [{N+1,top}],
+ Val = make_var(val),
+ {ObjSetImm0,Dst} = enc_dig_out_value(ValueIndex, Val),
+ {{AttrN,Dst},ObjSetImm0};
false ->
{false,[]}
end;
@@ -128,7 +126,7 @@ gen_encode_constructed_imm(Erule, Typename, #type{}=D) ->
%% when the simpletableattributes was at an outer
%% level and the objfun has been passed through the
%% function call
- {{"got objfun through args","ObjFun"},[]};
+ {{"got objfun through args",{var,"ObjFun"}},[]};
_ ->
{false,[]}
end
@@ -136,7 +134,7 @@ gen_encode_constructed_imm(Erule, Typename, #type{}=D) ->
ImmSetExt =
case Ext of
{ext,_Pos,NumExt2} when NumExt2 > 0 ->
- asn1ct_imm:per_enc_extension_bit('Extensions', Aligned);
+ asn1ct_imm:per_enc_extension_bit({var,"Extensions"}, Aligned);
{ext,_Pos,_} ->
asn1ct_imm:per_enc_extension_bit([], Aligned);
_ ->
@@ -452,8 +450,13 @@ dec_objset_default(N, C, LeadingAttr, false) ->
"{value,Bytes},"
"{unique_name_and_value,",{asis,LeadingAttr},",Id}}}).",nl,nl]);
dec_objset_default(N, _, _, true) ->
- emit([{asis,N},"(Bytes, Id) ->",nl,
- "Bytes.",nl,nl]).
+ emit([{asis,N},"(Bytes, Id) ->",nl|
+ case asn1ct:use_legacy_types() of
+ false ->
+ ["{asn1_OPENTYPE,Bytes}.",nl,nl];
+ true ->
+ ["Bytes.",nl,nl]
+ end]).
dec_objset_1(Erule, N, {Id,Obj}, RestFields, Typename) ->
emit([{asis,N},"(Bytes, ",{asis,Id},") ->",nl]),
@@ -540,7 +543,7 @@ gen_encode_choice_imm(Erule, TopType, #type{def={'CHOICE',CompList}}) ->
Aligned = is_aligned(Erule),
Cs = gen_enc_choice(Erule, TopType, CompList, Ext),
[{assign,{expr,"{ChoiceTag,ChoiceVal}"},"Val"}|
- asn1ct_imm:per_enc_choice('ChoiceTag', Cs, Aligned)].
+ asn1ct_imm:per_enc_choice({var,"ChoiceTag"}, Cs, Aligned)].
gen_decode_choice(Erules,Typename,D) when is_record(D,type) ->
asn1ct_name:start(),
@@ -562,14 +565,14 @@ gen_encode_sof(Erule, Typename, SeqOrSetOf, D) ->
gen_encode_sof_imm(Erule, Typename, SeqOrSetOf, #type{}=D) ->
{_SeqOrSetOf,ComponentType} = D#type.def,
Aligned = is_aligned(Erule),
- Constructed_Suffix =
- asn1ct_gen:constructed_suffix(SeqOrSetOf,
- ComponentType#type.def),
- Conttype = asn1ct_gen:get_inner(ComponentType#type.def),
+ CompType = ComponentType#type.def,
+ Constructed_Suffix = asn1ct_gen:constructed_suffix(SeqOrSetOf, CompType),
+ Conttype = asn1ct_gen:get_inner(CompType),
Currmod = get(currmod),
Imm0 = case asn1ct_gen:type(Conttype) of
{primitive,bif} ->
- asn1ct_gen_per:gen_encode_prim_imm('Comp', ComponentType, Aligned);
+ asn1ct_gen_per:gen_encode_prim_imm({var,"Comp"},
+ ComponentType, Aligned);
{constructed,bif} ->
TypeName = [Constructed_Suffix|Typename],
Enc = enc_func(asn1ct_gen:list2name(TypeName)),
@@ -577,17 +580,19 @@ gen_encode_sof_imm(Erule, Typename, SeqOrSetOf, #type{}=D) ->
[{objfun,_}|_] -> [{var,"ObjFun"}];
_ -> []
end,
- [{apply,Enc,[{var,"Comp"}|ObjArg]}];
+ [{apply,{local,Enc,CompType},
+ [{var,"Comp"}|ObjArg]}];
#'Externaltypereference'{module=Currmod,type=Ename} ->
- [{apply,enc_func(Ename),[{var,"Comp"}]}];
+ [{apply,{local,enc_func(Ename),CompType},[{var,"Comp"}]}];
#'Externaltypereference'{module=EMod,type=Ename} ->
- [{apply,{EMod,enc_func(Ename)},[{var,"Comp"}]}];
+ [{apply,{EMod,enc_func(Ename),CompType},[{var,"Comp"}]}];
'ASN1_OPEN_TYPE' ->
- asn1ct_gen_per:gen_encode_prim_imm('Comp',
+ asn1ct_gen_per:gen_encode_prim_imm({var,"Comp"},
#type{def='ASN1_OPEN_TYPE'},
Aligned)
end,
- asn1ct_imm:per_enc_sof('Val', D#type.constraint, 'Comp', Imm0, Aligned).
+ asn1ct_imm:per_enc_sof({var,"Val"}, D#type.constraint, 'Comp',
+ Imm0, Aligned).
gen_decode_sof(Erules, Typename, SeqOrSetOf, #type{}=D) ->
asn1ct_name:start(),
@@ -871,8 +876,8 @@ gen_enc_components_call1(Erule,TopType,
CanonicalNum ->
CanonicalNum
end,
- Element0 = make_element(TermNo+1, asn1ct_gen:mk_var(asn1ct_name:curr(val))),
- {Imm0,Element} = asn1ct_imm:enc_bind_var(Element0),
+ Val = make_var(val),
+ {Imm0,Element} = asn1ct_imm:enc_element(TermNo+1, Val),
Imm1 = gen_enc_line_imm(Erule, TopType, Cname, Type, Element, DynamicEnc, Ext),
Category = case {Prop,Ext} of
{'OPTIONAL',_} ->
@@ -906,26 +911,36 @@ def_values(#type{def=#'Externaltypereference'{module=Mod,type=Type}}, Def) ->
#typedef{typespec=T} = asn1_db:dbget(Mod, Type),
def_values(T, Def);
def_values(#type{def={'BIT STRING',[]}}, Bs) when is_bitstring(Bs) ->
- ListBs = [B || <<B:1>> <= Bs],
- IntBs = lists:foldl(fun(B, A) ->
- (A bsl 1) bor B
- end, 0, lists:reverse(ListBs)),
- Sz = bit_size(Bs),
- Compact = case 8 - Sz rem 8 of
- 8 ->
- {0,Bs};
- Unused ->
- {Unused,<<Bs:Sz/bits,0:Unused>>}
- end,
- [asn1_DEFAULT,Bs,Compact,ListBs,IntBs];
+ case asn1ct:use_legacy_types() of
+ false ->
+ [asn1_DEFAULT,Bs];
+ true ->
+ ListBs = [B || <<B:1>> <= Bs],
+ IntBs = lists:foldl(fun(B, A) ->
+ (A bsl 1) bor B
+ end, 0, lists:reverse(ListBs)),
+ Sz = bit_size(Bs),
+ Compact = case 8 - Sz rem 8 of
+ 8 ->
+ {0,Bs};
+ Unused ->
+ {Unused,<<Bs:Sz/bits,0:Unused>>}
+ end,
+ [asn1_DEFAULT,Bs,Compact,ListBs,IntBs]
+ end;
def_values(#type{def={'BIT STRING',[_|_]=Ns}}, List) when is_list(List) ->
Bs = asn1ct_gen:named_bitstring_value(List, Ns),
- ListBs = [B || <<B:1>> <= Bs],
- IntBs = lists:foldl(fun(B, A) ->
- (A bsl 1) bor B
- end, 0, lists:reverse(ListBs)),
- Args = [List,Bs,ListBs,IntBs],
- {call,per_common,is_default_bitstring,Args};
+ As = case asn1ct:use_legacy_types() of
+ false ->
+ [List,Bs];
+ true ->
+ ListBs = [B || <<B:1>> <= Bs],
+ IntBs = lists:foldl(fun(B, A) ->
+ (A bsl 1) bor B
+ end, 0, lists:reverse(ListBs)),
+ [List,Bs,ListBs,IntBs]
+ end,
+ {call,per_common,is_default_bitstring,As};
def_values(#type{def={'INTEGER',Ns}}, Def) ->
[asn1_DEFAULT,Def|case lists:keyfind(Def, 2, Ns) of
false -> [];
@@ -967,9 +982,9 @@ gen_enc_line_imm_1(Erule, TopType, Cname, Type, Element, DynamicEnc) ->
CurrMod = get(currmod),
case asn1ct_gen:type(Atype) of
#'Externaltypereference'{module=CurrMod,type=EType} ->
- [{apply,enc_func(EType),[{expr,Element}]}];
+ [{apply,{local,enc_func(EType),Atype},[Element]}];
#'Externaltypereference'{module=Mod,type=EType} ->
- [{apply,{Mod,enc_func(EType)},[{expr,Element}]}];
+ [{apply,{Mod,enc_func(EType),Atype},[Element]}];
{primitive,bif} ->
asn1ct_gen_per:gen_encode_prim_imm(Element, Type, Aligned);
'ASN1_OPEN_TYPE' ->
@@ -988,9 +1003,9 @@ gen_enc_line_imm_1(Erule, TopType, Cname, Type, Element, DynamicEnc) ->
Enc = enc_func(asn1ct_gen:list2name(NewTypename)),
case {Type#type.tablecinf,DynamicEnc} of
{[{objfun,_}|_R],{_,EncFun}} ->
- [{apply,Enc,[{expr,Element},{var,EncFun}]}];
+ [{apply,{local,Enc,Type},[Element,EncFun]}];
_ ->
- [{apply,Enc,[{expr,Element}]}]
+ [{apply,{local,Enc,Type},[Element]}]
end
end
end.
@@ -1014,13 +1029,16 @@ enc_var_type_call(Erule, Name, RestFieldNames,
{_,Key,Code} <- ObjSet1],
ObjSet = lists:sort([P || {_,B}=P <- ObjSet2, B =/= none]),
Key = erlang:md5(term_to_binary({encode,ObjSet,RestFieldNames,Extensible})),
+ Imm = enc_objset_imm(Erule, Name, ObjSet, RestFieldNames, Extensible),
+ Lambda = {lambda,[{var,"Val"},{var,"Id"}],Imm},
Gen = fun(_Fd, N) ->
- enc_objset(Erule, Name, N, ObjSet,
- RestFieldNames, Extensible)
+ Aligned = is_aligned(Erule),
+ emit([{asis,N},"(Val, Id) ->",nl]),
+ asn1ct_imm:enc_cg(Imm, Aligned),
+ emit([".",nl])
end,
Prefix = lists:concat(["enc_os_",Name]),
- F = asn1ct_func:call_gen(Prefix, Key, Gen),
- [{apply,F,[{var,atom_to_list(Val)},{var,Fun}]}].
+ [{call_gen,Prefix,Key,Gen,Lambda,[Val,Fun]}].
fix_object_code(Name, [{Name,B}|_], _ClassFields) ->
B;
@@ -1042,9 +1060,7 @@ fix_object_code(Name, [], ClassFields) ->
end
end.
-
-enc_objset(Erule, Component, Name, ObjSet, RestFieldNames, Extensible) ->
- asn1ct_name:start(),
+enc_objset_imm(Erule, Component, ObjSet, RestFieldNames, Extensible) ->
Aligned = is_aligned(Erule),
E = {error,
fun() ->
@@ -1053,22 +1069,28 @@ enc_objset(Erule, Component, Name, ObjSet, RestFieldNames, Extensible) ->
"{value,Val},"
"{unique_name_and_value,'_'}})",nl])
end},
- Imm = [{'cond',
- [[{eq,{var,"Id"},Key}|
- enc_obj(Erule, Obj, RestFieldNames, Aligned)] ||
- {Key,Obj} <- ObjSet] ++
- [['_',case Extensible of
- false -> E;
- true -> {put_bits,{var,"Val"},binary,[1]}
- end]]}],
- emit([{asis,Name},"(Val, Id) ->",nl]),
- asn1ct_imm:enc_cg(Imm, Aligned),
- emit([".",nl]).
+ [{'cond',
+ [[{eq,{var,"Id"},Key}|
+ enc_obj(Erule, Obj, RestFieldNames, Aligned)] ||
+ {Key,Obj} <- ObjSet] ++
+ [['_',case Extensible of
+ false ->
+ E;
+ true ->
+ case asn1ct:use_legacy_types() of
+ false ->
+ {call,per_common,open_type_to_binary,
+ [{var,"Val"}]};
+ true ->
+ {call,per_common,legacy_open_type_to_binary,
+ [{var,"Val"}]}
+ end
+ end]]}].
enc_obj(Erule, Obj, RestFieldNames0, Aligned) ->
case Obj of
#typedef{name={primitive,bif},typespec=Def} ->
- asn1ct_gen_per:gen_encode_prim_imm('Val', Def, Aligned);
+ asn1ct_gen_per:gen_encode_prim_imm({var,"Val"}, Def, Aligned);
#typedef{name={constructed,bif},typespec=Def} ->
InnerType = asn1ct_gen:get_inner(Def#type.def),
case InnerType of
@@ -1084,7 +1106,7 @@ enc_obj(Erule, Obj, RestFieldNames0, Aligned) ->
gen_encode_sof_imm(Erule, name, InnerType, Def)
end;
#typedef{name=Type} ->
- [{apply,enc_func(Type),[{var,"Val"}]}];
+ [{apply,{local,enc_func(Type),Type},[{var,"Val"}]}];
#'Externalvaluereference'{module=Mod,value=Value} ->
case asn1_db:dbget(Mod, Value) of
#typedef{typespec=#'Object'{def=Def}} ->
@@ -1097,9 +1119,9 @@ enc_obj(Erule, Obj, RestFieldNames0, Aligned) ->
Func = enc_func(Type),
case get(currmod) of
Mod ->
- [{apply,Func,[{var,"Val"}]}];
+ [{apply,{local,Func,Obj},[{var,"Val"}]}];
_ ->
- [{apply,{Mod,Func},[{var,"Val"}]}]
+ [{apply,{Mod,Func,Obj},[{var,"Val"}]}]
end
end.
@@ -1540,12 +1562,12 @@ gen_enc_choices([H|T], Erule, TopType, Pos, Constr, Ext) ->
no ->
case Type#type.tablecinf of
[{objfun,_}|_] ->
- {"got objfun through args","ObjFun"};
+ {"got objfun through args",{var,"ObjFun"}};
_ ->
false
end;
_ ->
- {no_attr,"ObjFun"}
+ {no_attr,{var,"ObjFun"}}
end,
DoExt = case Constr of
ext -> Ext;
@@ -1561,7 +1583,7 @@ gen_enc_choices([H|T], Erule, TopType, Pos, Constr, Ext) ->
[{put_bits,0,1,[1]}|
asn1ct_imm:per_enc_integer(Pos, Constr, Aligned)]
end,
- Body = gen_enc_line_imm(Erule, TopType, Cname, Type, 'ChoiceVal',
+ Body = gen_enc_line_imm(Erule, TopType, Cname, Type, {var,"ChoiceVal"},
EncObj, DoExt),
Imm = Tag ++ Body,
[{Cname,Imm}|gen_enc_choices(T, Erule, TopType, Pos+1, Constr, Ext)];
@@ -1778,3 +1800,13 @@ value_match1(Value,[],Acc,Depth) ->
Acc ++ Value ++ lists:concat(lists:duplicate(Depth,")"));
value_match1(Value,[{VI,_}|VIs],Acc,Depth) ->
value_match1(Value,VIs,Acc++lists:concat(["element(",VI,","]),Depth+1).
+
+enc_dig_out_value([], Value) ->
+ {[],Value};
+enc_dig_out_value([{N,_}|T], Value) ->
+ {Imm0,Dst0} = enc_dig_out_value(T, Value),
+ {Imm,Dst} = asn1ct_imm:enc_element(N, Dst0),
+ {Imm0++Imm,Dst}.
+
+make_var(Base) ->
+ {var,atom_to_list(asn1ct_gen:mk_var(asn1ct_name:curr(Base)))}.
diff --git a/lib/asn1/src/asn1ct_func.erl b/lib/asn1/src/asn1ct_func.erl
index dbadedb683..33f998722a 100644
--- a/lib/asn1/src/asn1ct_func.erl
+++ b/lib/asn1/src/asn1ct_func.erl
@@ -48,7 +48,7 @@ need(MFA) ->
call_gen(Prefix, Key, Gen, Args) when is_function(Gen, 2) ->
F = req({gen_func,Prefix,Key,Gen}),
- asn1ct_gen:emit([F,"(",call_args(Args, ""),")"]).
+ asn1ct_gen:emit([{asis,F},"(",call_args(Args, ""),")"]).
call_gen(Prefix, Key, Gen) when is_function(Gen, 2) ->
req({gen_func,Prefix,Key,Gen}).
diff --git a/lib/asn1/src/asn1ct_gen.erl b/lib/asn1/src/asn1ct_gen.erl
index 30d337635b..44b050e59d 100644
--- a/lib/asn1/src/asn1ct_gen.erl
+++ b/lib/asn1/src/asn1ct_gen.erl
@@ -23,6 +23,7 @@
-export([demit/1,
emit/1,
+ open_output_file/1,close_output_file/0,
get_inner/1,type/1,def_to_tag/1,prim_bif/1,
list2name/1,
list2rname/1,
@@ -70,8 +71,7 @@ pgen_module(OutFile,Erules,Module,
HrlGenerated = pgen_hrl(Erules,Module,TypeOrVal,Options,Indent),
asn1ct_name:start(),
ErlFile = lists:concat([OutFile,".erl"]),
- Fid = fopen(ErlFile),
- put(gen_file_out,Fid),
+ _ = open_output_file(ErlFile),
asn1ct_func:start_link(),
gen_head(Erules,Module,HrlGenerated),
pgen_exports(Erules,Module,TypeOrVal),
@@ -85,9 +85,9 @@ pgen_module(OutFile,Erules,Module,
"%%%",nl,
"%%% Run-time functions.",nl,
"%%%",nl]),
- asn1ct_func:generate(Fid),
- file:close(Fid),
- _ = erase(gen_file_out),
+ Fd = get(gen_file_out),
+ asn1ct_func:generate(Fd),
+ close_output_file(),
_ = erase(outfile),
asn1ct:verbose("--~p--~n",[{generated,ErlFile}],Options).
@@ -190,7 +190,7 @@ pgen_check_defaultval(Erules,Module) ->
"********~n~n",[X])
end,
lists:foreach(Fun,CheckObjects),
- file:close(IoDevice);
+ ok = file:close(IoDevice);
_ -> ok
end,
gen_check_defaultval(Erules,Module,CheckObjects).
@@ -790,7 +790,8 @@ gen_decode_constructed(Erules,Typename,InnerType,D) when is_record(D,typedef) ->
pgen_exports(Erules,_Module,{Types,Values,_,_,Objects,ObjectSets}) ->
- emit(["-export([encoding_rule/0,bit_string_format/0]).",nl]),
+ emit(["-export([encoding_rule/0,bit_string_format/0,"
+ " legacy_erlang_types/0]).",nl]),
case Types of
[] -> ok;
_ ->
@@ -1022,7 +1023,9 @@ gen_info_functions(Erules) ->
emit(["encoding_rule() -> ",
{asis,Erules},".",nl,nl,
"bit_string_format() -> ",
- {asis,asn1ct:get_bit_string_format()},".",nl,nl]).
+ {asis,asn1ct:get_bit_string_format()},".",nl,nl,
+ "legacy_erlang_types() -> ",
+ {asis,asn1ct:use_legacy_types()},".",nl,nl]).
gen_decode_partial_incomplete(ber) ->
case {asn1ct:read_config_data(partial_incomplete_decode),
@@ -1121,9 +1124,23 @@ pgen_info() ->
open_hrl(OutFile,Module) ->
File = lists:concat([OutFile,".hrl"]),
- Fid = fopen(File),
- put(gen_file_out,Fid),
- gen_hrlhead(Module).
+ _ = open_output_file(File),
+ gen_hrlhead(Module),
+ Protector = hrl_protector(OutFile),
+ emit(["-ifndef(",Protector,").\n",
+ "-define(",Protector,", true).\n"
+ "\n"]).
+
+hrl_protector(OutFile) ->
+ BaseName = filename:basename(OutFile),
+ P = "_" ++ string:to_upper(BaseName) ++ "_HRL_",
+ [if
+ $A =< C, C =< $Z -> C;
+ $a =< C, C =< $a -> C;
+ $0 =< C, C =< $9 -> C;
+ true -> $_
+ end || C <- P].
+
%% EMIT functions ************************
%% ***************************************
@@ -1195,15 +1212,19 @@ call_args([A|As], Sep) ->
[Sep,do_emit(A)|call_args(As, ", ")];
call_args([], _) -> [].
-fopen(F) ->
+open_output_file(F) ->
case file:open(F, [write,raw,delayed_write]) of
- {ok, Fd} ->
+ {ok,Fd} ->
+ put(gen_file_out, Fd),
Fd;
{error, Reason} ->
io:format("** Can't open file ~p ~n", [F]),
exit({error,Reason})
end.
+close_output_file() ->
+ ok = file:close(erase(gen_file_out)).
+
pgen_hrl(Erules,Module,TypeOrVal,Options,_Indent) ->
put(currmod,Module),
{Types,Values,Ptypes,_,_,_} = TypeOrVal,
@@ -1226,8 +1247,9 @@ pgen_hrl(Erules,Module,TypeOrVal,Options,_Indent) ->
0 ->
0;
Y ->
- Fid = get(gen_file_out),
- file:close(Fid),
+ Protector = hrl_protector(get(outfile)),
+ emit(["-endif. %% ",Protector,"\n"]),
+ close_output_file(),
asn1ct:verbose("--~p--~n",
[{generated,lists:concat([get(outfile),".hrl"])}],
Options),
diff --git a/lib/asn1/src/asn1ct_gen_ber_bin_v2.erl b/lib/asn1/src/asn1ct_gen_ber_bin_v2.erl
index de81259fcb..bea0ec8968 100644
--- a/lib/asn1/src/asn1ct_gen_ber_bin_v2.erl
+++ b/lib/asn1/src/asn1ct_gen_ber_bin_v2.erl
@@ -206,10 +206,32 @@ gen_encode_prim(_Erules, #type{}=D, DoTag, Value) ->
{call,ber,encode_tags,
[DoTag,{curr,realval},{curr,realsize}]},nl,
"end"]);
+ {'BIT STRING',[]} ->
+ case asn1ct:use_legacy_types() of
+ false when BitStringConstraint =:= [] ->
+ call(encode_unnamed_bit_string, [Value,DoTag]);
+ false ->
+ call(encode_unnamed_bit_string,
+ [{asis,BitStringConstraint},Value,DoTag]);
+ true ->
+ call(encode_bit_string,
+ [{asis,BitStringConstraint},Value,
+ {asis,[]},DoTag])
+ end;
{'BIT STRING',NamedNumberList} ->
- call(encode_bit_string,
- [{asis,BitStringConstraint},Value,
- {asis,NamedNumberList},DoTag]);
+ case asn1ct:use_legacy_types() of
+ false when BitStringConstraint =:= [] ->
+ call(encode_named_bit_string,
+ [Value,{asis,NamedNumberList},DoTag]);
+ false ->
+ call(encode_named_bit_string,
+ [{asis,BitStringConstraint},Value,
+ {asis,NamedNumberList},DoTag]);
+ true ->
+ call(encode_bit_string,
+ [{asis,BitStringConstraint},Value,
+ {asis,NamedNumberList},DoTag])
+ end;
'NULL' ->
call(encode_null, [Value,DoTag]);
'OBJECT IDENTIFIER' ->
@@ -471,7 +493,6 @@ gen_dec_prim(_Erules, Att, BytesVar, DoTag, _TagIn, _Form, _OptOrMand) ->
_ -> ""
end,
NewTypeName = case Typename of
- 'OCTET STRING' -> restricted_string;
'NumericString' -> restricted_string;
'TeletexString' -> restricted_string;
'T61String' -> restricted_string;
@@ -529,6 +550,19 @@ gen_dec_prim(_Erules, Att, BytesVar, DoTag, _TagIn, _Form, _OptOrMand) ->
'RELATIVE-OID' ->
emit(["decode_relative_oid(",BytesVar,","]),
need(decode_relative_oid, 2);
+ 'OCTET STRING' ->
+ F = case asn1ct:use_legacy_types() of
+ false -> decode_octet_string;
+ true -> decode_restricted_string
+ end,
+ emit([{asis,F},"(",BytesVar,","]),
+ case Constraint of
+ [] ->
+ need(F, 2);
+ _ ->
+ emit([{asis,Constraint},","]),
+ need(F, 3)
+ end;
restricted_string ->
emit(["decode_restricted_string",AsBin,"(",BytesVar,","]),
case Constraint of
@@ -1090,13 +1124,11 @@ gen_objset_enc(Erules, ObjSetName, UniqueName,
%% See X.681 Annex E for the following case
gen_objset_enc(_,ObjSetName,_UniqueName,['EXTENSIONMARK'],_ClName,
_ClFields,_NthObj,Acc) ->
- emit(["'getenc_",ObjSetName,"'(_) ->",nl]),
- emit({indent(3),"fun(_, Val, _RestPrimFieldName) ->",nl}),
- emit({indent(6),"Len = case Val of",nl,indent(9),
- "Bin when is_binary(Bin) -> byte_size(Bin);",nl,indent(9),
- "_ -> length(Val)",nl,indent(6),"end,"}),
- emit({indent(6),"{Val,Len}",nl}),
- emit({indent(3),"end.",nl,nl}),
+ emit(["'getenc_",ObjSetName,"'(_) ->",nl,
+ indent(2),"fun(_, Val, _RestPrimFieldName) ->",nl]),
+ emit_enc_open_type(4),
+ emit([nl,
+ indent(2),"end.",nl,nl]),
Acc;
gen_objset_enc(_, ObjSetName, UniqueName, [], _, _, _, Acc) ->
emit_default_getenc(ObjSetName, UniqueName),
@@ -1158,13 +1190,8 @@ gen_inlined_enc_funs1(Fields, [{typefield,Name,_}|Rest], ObjSetName,
%% were no type in the table and we therefore generate
%% code that returns the input for application
%% treatment.
- emit([indent(9),{asis,Name}," ->",nl,
- indent(12),"Len = case Val of",nl,
- indent(15),"Bin when is_binary(Bin) -> "
- "byte_size(Bin);",nl,
- indent(15),"_ -> length(Val)",nl,
- indent(12),"end,",nl,
- indent(12),"{Val,Len}"]),
+ emit([indent(9),{asis,Name}," ->",nl]),
+ emit_enc_open_type(11),
{Acc0,0}
end,
gen_inlined_enc_funs1(Fields, Rest, ObjSetName, Sep, NthObj+NAdd, Acc);
@@ -1175,6 +1202,25 @@ gen_inlined_enc_funs1(_, [], _, _, NthObj, Acc) ->
indent(3),"end"]),
{Acc,NthObj}.
+emit_enc_open_type(I) ->
+ Indent = indent(I),
+ S = [Indent, "case Val of",nl,
+ Indent,indent(2),"{asn1_OPENTYPE,Bin} when is_binary(Bin) ->",nl,
+ Indent,indent(4),"{Bin,byte_size(Bin)}"|
+ case asn1ct:use_legacy_types() of
+ false ->
+ [nl,
+ Indent,"end"];
+ true ->
+ [";",nl,
+ Indent,indent(2),"Bin when is_binary(Bin) ->",nl,
+ Indent,indent(4),"{Bin,byte_size(Bin)};",nl,
+ Indent,indent(2),"_ ->",nl,
+ Indent,indent(4),"{Val,length(Val)}",nl,
+ Indent, "end"]
+ end],
+ emit(S).
+
emit_inner_of_fun(TDef=#typedef{name={ExtMod,Name},typespec=Type},
InternalDefFunName) ->
OTag = Type#type.tag,
@@ -1258,14 +1304,9 @@ gen_objset_dec(_,ObjSetName,_UniqueName,['EXTENSIONMARK'],_ClName,
_ClFields,_NthObj) ->
emit(["'getdec_",ObjSetName,"'(_) ->",nl]),
emit([indent(2),"fun(_,Bytes, _RestPrimFieldName) ->",nl]),
-
- emit([indent(4),"case Bytes of",nl,
- indent(6),"Bin when is_binary(Bin) -> ",nl,
- indent(8),"Bin;",nl,
- indent(6),"_ ->",nl,
- indent(8),{call,ber,ber_encode,["Bytes"]},nl,
- indent(4),"end",nl]),
- emit([indent(2),"end.",nl,nl]),
+ emit_dec_open_type(4),
+ emit([nl,
+ indent(2),"end.",nl,nl]),
ok;
gen_objset_dec(_, ObjSetName, UniqueName, [], _, _, _) ->
emit_default_getdec(ObjSetName, UniqueName),
@@ -1312,12 +1353,8 @@ gen_inlined_dec_funs1(Fields, [{typefield,Name,Prop}|Rest],
end,
0;
false ->
- emit([indent(9),{asis,Name}," ->",nl,
- indent(12),"Len = case Bytes of",nl,
- indent(15),"B when is_binary(B) -> byte_size(B);",nl,
- indent(15),"_ -> length(Bytes)",nl,
- indent(12),"end,",nl,
- indent(12),"{Bytes,[],Len}"]),
+ emit([indent(9),{asis,Name}," ->",nl]),
+ emit_dec_open_type(11),
0
end,
gen_inlined_dec_funs1(Fields, Rest, ObjSetName, Sep, NthObj+N);
@@ -1328,6 +1365,27 @@ gen_inlined_dec_funs1(_, [], _, _, NthObj) ->
indent(3),"end"]),
NthObj.
+emit_dec_open_type(I) ->
+ Indent = indent(I),
+ S = case asn1ct:use_legacy_types() of
+ false ->
+ [Indent, "case Bytes of",nl,
+ Indent,indent(2),"Bin when is_binary(Bin) -> ",nl,
+ Indent,indent(4),"{asn1_OPENTYPE,Bin};",nl,
+ Indent,indent(2),"_ ->",nl,
+ Indent,indent(4),"{asn1_OPENTYPE,",
+ {call,ber,ber_encode,["Bytes"]},"}",nl,
+ Indent, "end"];
+ true ->
+ [Indent, "case Bytes of",nl,
+ Indent,indent(2),"Bin when is_binary(Bin) -> ",nl,
+ Indent,indent(4),"Bin;",nl,
+ Indent,indent(2),"_ ->",nl,
+ Indent,indent(4),{call,ber,ber_encode,["Bytes"]},nl,
+ Indent, "end"]
+ end,
+ emit(S).
+
emit_inner_of_decfun(#typedef{name={ExtName,Name},typespec=Type},Prop,
InternalDefFunName) ->
OTag = Type#type.tag,
diff --git a/lib/asn1/src/asn1ct_gen_per.erl b/lib/asn1/src/asn1ct_gen_per.erl
index 8b999ddbf0..519ce9f054 100644
--- a/lib/asn1/src/asn1ct_gen_per.erl
+++ b/lib/asn1/src/asn1ct_gen_per.erl
@@ -99,7 +99,7 @@ gen_encode_user(Erules,D) when is_record(D,typedef) ->
gen_encode_prim(Erules, D) ->
- Value = asn1ct_gen:mk_var(asn1ct_name:curr(val)),
+ Value = {var,atom_to_list(asn1ct_gen:mk_var(asn1ct_name:curr(val)))},
gen_encode_prim(Erules, D, Value).
gen_encode_prim(Erules, #type{}=D, Value) ->
@@ -132,7 +132,14 @@ gen_encode_prim_imm(Val, #type{def=Type0,constraint=Constraint}, Aligned) ->
ToBinary = {real_common,encode_real},
asn1ct_imm:per_enc_restricted_string(Val, ToBinary, Aligned);
{'BIT STRING',NNL} ->
- asn1ct_imm:per_enc_bit_string(Val, NNL, Constraint, Aligned);
+ case asn1ct:use_legacy_types() of
+ false ->
+ asn1ct_imm:per_enc_bit_string(Val, NNL,
+ Constraint, Aligned);
+ true ->
+ asn1ct_imm:per_enc_legacy_bit_string(Val, NNL,
+ Constraint, Aligned)
+ end;
'NULL' ->
asn1ct_imm:per_enc_null(Val, Aligned);
'OBJECT IDENTIFIER' ->
@@ -144,15 +151,21 @@ gen_encode_prim_imm(Val, #type{def=Type0,constraint=Constraint}, Aligned) ->
'BOOLEAN' ->
asn1ct_imm:per_enc_boolean(Val, Aligned);
'OCTET STRING' ->
- asn1ct_imm:per_enc_octet_string(Val, Constraint, Aligned);
+ case asn1ct:use_legacy_types() of
+ false ->
+ asn1ct_imm:per_enc_octet_string(Val, Constraint, Aligned);
+ true ->
+ asn1ct_imm:per_enc_legacy_octet_string(Val, Constraint,
+ Aligned)
+ end;
'ASN1_OPEN_TYPE' ->
case Constraint of
[#'Externaltypereference'{type=Tname}] ->
EncFunc = enc_func(Tname),
- Imm = [{apply,EncFunc,[{expr,Val}]}],
+ Imm = [{apply,{local,EncFunc,[]},[Val]}],
asn1ct_imm:per_enc_open_type(Imm, Aligned);
[] ->
- Imm = [{call,erlang,iolist_to_binary,[{expr,Val}]}],
+ Imm = [{call,erlang,iolist_to_binary,[Val]}],
asn1ct_imm:per_enc_open_type(Imm, Aligned)
end
end.
@@ -325,7 +338,10 @@ gen_dec_imm_1('GeneralizedTime', Constraint, Aligned) ->
gen_dec_imm_1('OCTET STRING', Constraint, Aligned) ->
SzConstr = asn1ct_imm:effective_constraint(bitstring, Constraint),
Imm = asn1ct_imm:per_dec_octet_string(SzConstr, Aligned),
- {convert,binary_to_list,Imm};
+ case asn1ct:use_legacy_types() of
+ false -> {convert,{binary,copy},Imm};
+ true -> {convert,binary_to_list,Imm}
+ end;
gen_dec_imm_1('TeletexString', _Constraint, Aligned) ->
gen_dec_restricted_string(Aligned);
gen_dec_imm_1('T61String', _Constraint, Aligned) ->
diff --git a/lib/asn1/src/asn1ct_imm.erl b/lib/asn1/src/asn1ct_imm.erl
index 047156fc10..fde39c674e 100644
--- a/lib/asn1/src/asn1ct_imm.erl
+++ b/lib/asn1/src/asn1ct_imm.erl
@@ -26,17 +26,19 @@
per_dec_octet_string/2,per_dec_open_type/1,per_dec_real/1,
per_dec_restricted_string/1]).
-export([per_dec_constrained/3,per_dec_normally_small_number/1]).
--export([per_enc_bit_string/4,per_enc_boolean/2,
+-export([per_enc_bit_string/4,per_enc_legacy_bit_string/4,
+ per_enc_boolean/2,
per_enc_choice/3,per_enc_enumerated/3,
per_enc_integer/3,per_enc_integer/4,
per_enc_null/2,
per_enc_k_m_string/4,per_enc_octet_string/3,
+ per_enc_legacy_octet_string/3,
per_enc_open_type/2,
per_enc_restricted_string/3,
per_enc_small_number/2]).
-export([per_enc_extension_bit/2,per_enc_extensions/4,per_enc_optional/3]).
-export([per_enc_sof/5]).
--export([enc_absent/3,enc_append/1,enc_bind_var/1]).
+-export([enc_absent/3,enc_append/1,enc_element/2]).
-export([enc_cg/2]).
-export([optimize_alignment/1,optimize_alignment/2,
dec_slim_cg/2,dec_code_gen/2]).
@@ -157,7 +159,35 @@ per_dec_restricted_string(Aligned) ->
%%% Encoding.
%%%
-per_enc_bit_string(Val0, [], Constraint0, Aligned) ->
+per_enc_bit_string(Val, [], Constraint0, Aligned) ->
+ {B,[[],Bits]} = mk_vars([], [bits]),
+ Constraint = effective_constraint(bitstring, Constraint0),
+ B ++ [{call,erlang,bit_size,[Val],Bits}|
+ per_enc_length(Val, 1, Bits, Constraint, Aligned, 'BIT STRING')];
+per_enc_bit_string(Val0, NNL0, Constraint0, Aligned) ->
+ {B,[Val,Bs,Bits,Positions]} = mk_vars(Val0, [bs,bits,positions]),
+ NNL = lists:keysort(2, NNL0),
+ Constraint = effective_constraint(bitstring, Constraint0),
+ ExtraArgs = case constr_min_size(Constraint) of
+ no -> [];
+ Lb -> [Lb]
+ end,
+ ToBs = case ExtraArgs of
+ [] ->
+ {call,per_common,bs_drop_trailing_zeroes,[Val]};
+ [Lower] ->
+ {call,per_common,adjust_trailing_zeroes,[Val,Lower]}
+ end,
+ B ++ [{'try',
+ [bit_string_name2pos_fun(NNL, Val)],
+ {Positions,
+ [{call,per_common,bitstring_from_positions,
+ [Positions|ExtraArgs]}]},
+ [ToBs],Bs},
+ {call,erlang,bit_size,[Bs],Bits}|
+ per_enc_length(Bs, 1, Bits, Constraint, Aligned, 'BIT STRING')].
+
+per_enc_legacy_bit_string(Val0, [], Constraint0, Aligned) ->
{B,[Val,Bs,Bits]} = mk_vars(Val0, [bs,bits]),
Constraint = effective_constraint(bitstring, Constraint0),
ExtraArgs = case constr_min_size(Constraint) of
@@ -167,7 +197,7 @@ per_enc_bit_string(Val0, [], Constraint0, Aligned) ->
B ++ [{call,per_common,to_bitstring,[Val|ExtraArgs],Bs},
{call,erlang,bit_size,[Bs],Bits}|
per_enc_length(Bs, 1, Bits, Constraint, Aligned, 'BIT STRING')];
-per_enc_bit_string(Val0, NNL0, Constraint0, Aligned) ->
+per_enc_legacy_bit_string(Val0, NNL0, Constraint0, Aligned) ->
{B,[Val,Bs,Bits,Positions]} = mk_vars(Val0, [bs,bits,positions]),
NNL = lists:keysort(2, NNL0),
Constraint = effective_constraint(bitstring, Constraint0),
@@ -256,35 +286,33 @@ per_enc_k_m_string(Val0, StringType, Constraint, Aligned) ->
B ++ [{call,erlang,length,[Val],Len},Enc]
end ++ per_enc_length(Bin, Unit, Len, SzConstraint, Aligned, k_m_string).
-per_enc_open_type([], Aligned) ->
- [{put_bits,1,8,unit(1, Aligned)},{put_bits,0,8,[1]}];
-per_enc_open_type([{'cond',
- [['_',
- {put_bits,0,0,_},
- {call,per_common,encode_unconstrained_number,_}=Call]]}],
- Aligned) ->
- %% We KNOW that encode_unconstrained_number/1 will return an IO list;
- %% therefore the call to complete/1 can be replaced with a cheaper
- %% call to iolist_to_binary/1.
- {Dst,Imm} = per_enc_open_type_output([Call], []),
- ToBin = {erlang,iolist_to_binary},
- Imm ++ per_enc_open_type(Dst, ToBin, Aligned);
-per_enc_open_type([{call,erlang,iolist_to_binary,Args}], Aligned) ->
- {_,[_,Bin,Len]} = mk_vars('dummy', [bin,len]),
- [{call,erlang,iolist_to_binary,Args,Bin},
- {call,erlang,byte_size,[Bin],Len}|per_enc_length(Bin, 8, Len, Aligned)];
per_enc_open_type(Imm0, Aligned) ->
- try
- {Prefix,Imm1} = split_off_nonbuilding(Imm0),
- Prefix ++ enc_open_type(Imm1, Aligned)
- catch
- throw:impossible ->
- {Dst,Imm} = per_enc_open_type_output(Imm0, []),
- ToBin = {enc_mod(Aligned),complete},
- Imm ++ per_enc_open_type(Dst, ToBin, Aligned)
- end.
+ Imm = case Aligned of
+ true ->
+ %% Temporarily make the implicit 'align' done by
+ %% complete/1 explicit to facilitate later
+ %% optimizations: the absence of 'align' can be used
+ %% as an indication that complete/1 can be replaced
+ %% with a cheaper operation such as
+ %% iolist_to_binary/1. The redundant 'align' will be
+ %% optimized away later.
+ Imm0 ++ [{put_bits,0,0,[1,align]}];
+ false ->
+ Imm0
+ end,
+ {[],[[],Val,Len,Bin]} = mk_vars([], [output,len,bin]),
+ [{list,Imm,Val},
+ {call,enc_mod(Aligned),complete,[Val],Bin},
+ {call,erlang,byte_size,[Bin],Len}|
+ per_enc_length(Bin, 8, Len, Aligned)].
+
+per_enc_octet_string(Bin, Constraint0, Aligned) ->
+ {B,[[],Len]} = mk_vars([], [len]),
+ Constraint = effective_constraint(bitstring, Constraint0),
+ B ++ [{call,erlang,byte_size,[Bin],Len}|
+ per_enc_length(Bin, 8, Len, Constraint, Aligned, 'OCTET STRING')].
-per_enc_octet_string(Val0, Constraint0, Aligned) ->
+per_enc_legacy_octet_string(Val0, Constraint0, Aligned) ->
{B,[Val,Bin,Len]} = mk_vars(Val0, [bin,len]),
Constraint = effective_constraint(bitstring, Constraint0),
B ++ [{call,erlang,iolist_to_binary,[Val],Bin},
@@ -316,28 +344,27 @@ per_enc_extensions(Val0, Pos0, NumBits, Aligned) when NumBits > 0 ->
_ -> [{put_bits,Bitmap,NumBits,[1]}]
end,
B++[{call,per_common,extension_bitmap,[Val,Pos,Pos+NumBits],Bitmap},
- {'cond',[[{eq,Bitmap,0}],
- ['_'|Length ++ PutBits]],{var,"Extensions"}}].
+ {list,[{'cond',[[{eq,Bitmap,0}],
+ ['_'|Length ++ PutBits]]}],
+ {var,"Extensions"}}].
per_enc_optional(Val0, {Pos,DefVals}, _Aligned) when is_integer(Pos),
is_list(DefVals) ->
- Val1 = lists:concat(["element(",Pos,", ",Val0,")"]),
- {B,[Val]} = mk_vars(Val1, []),
+ {B,Val} = enc_element(Pos, Val0),
Zero = {put_bits,0,1,[1]},
One = {put_bits,1,1,[1]},
B++[{'cond',
[[{eq,Val,DefVal},Zero] || DefVal <- DefVals] ++ [['_',One]]}];
per_enc_optional(Val0, {Pos,{call,M,F,A}}, _Aligned) when is_integer(Pos) ->
- Val1 = lists:concat(["element(",Pos,", ",Val0,")"]),
- {B,[Val,Tmp]} = mk_vars(Val1, [tmp]),
+ {B,Val} = enc_element(Pos, Val0),
+ {[],[[],Tmp]} = mk_vars([], [tmp]),
Zero = {put_bits,0,1,[1]},
One = {put_bits,1,1,[1]},
B++[{call,M,F,[Val|A],Tmp},
{'cond',
[[{eq,Tmp,true},Zero],['_',One]]}];
per_enc_optional(Val0, Pos, _Aligned) when is_integer(Pos) ->
- Val1 = lists:concat(["element(",Pos,", ",Val0,")"]),
- {B,[Val]} = mk_vars(Val1, []),
+ {B,Val} = enc_element(Pos, Val0),
Zero = {put_bits,0,1,[1]},
One = {put_bits,1,1,[1]},
B++[{'cond',[[{eq,Val,asn1_NOVALUE},Zero],
@@ -391,20 +418,22 @@ enc_append([H|T]) ->
[{block,H}|enc_append(T)];
enc_append([]) -> [].
-enc_bind_var(Val) ->
- {B,[{var,Var}]} = mk_vars(Val, []),
- {B,list_to_atom(Var)}.
+enc_element(N, Val0) ->
+ {[],[Val,Dst]} = mk_vars(Val0, [element]),
+ {[{call,erlang,element,[N,Val],Dst}],Dst}.
enc_cg(Imm0, false) ->
Imm1 = enc_cse(Imm0),
- Imm = enc_pre_cg(Imm1),
+ Imm2 = enc_pre_cg(Imm1),
+ Imm = enc_opt(Imm2),
enc_cg(Imm);
enc_cg(Imm0, true) ->
Imm1 = enc_cse(Imm0),
Imm2 = enc_hoist_align(Imm1),
Imm3 = enc_opt_al(Imm2),
Imm4 = per_fixup(Imm3),
- Imm = enc_pre_cg(Imm4),
+ Imm5 = enc_pre_cg(Imm4),
+ Imm = enc_opt(Imm5),
enc_cg(Imm).
%%%
@@ -881,6 +910,9 @@ dcg_list_outside([{call,Fun,{V,Buf},{Dst,DstBuf}}|T]) ->
emit(["{",Dst,",",DstBuf,"} = "]),
Fun(V, Buf),
iter_dcg_list_outside(T);
+dcg_list_outside([{convert,{M,F},V,Dst}|T]) ->
+ emit([Dst," = ",{asis,M},":",{asis,F},"(",V,")"]),
+ iter_dcg_list_outside(T);
dcg_list_outside([{convert,Op,V,Dst}|T]) ->
emit([Dst," = ",Op,"(",V,")"]),
iter_dcg_list_outside(T);
@@ -972,11 +1004,11 @@ mk_dest(S) -> S.
split_off_nonbuilding(Imm) ->
lists:splitwith(fun is_nonbuilding/1, Imm).
-is_nonbuilding({apply,_,_,_}) -> true;
is_nonbuilding({assign,_,_}) -> true;
is_nonbuilding({call,_,_,_,_}) -> true;
-is_nonbuilding({'cond',_,_}) -> true;
is_nonbuilding({lc,_,_,_,_}) -> true;
+is_nonbuilding({set,_,_}) -> true;
+is_nonbuilding({list,_,_}) -> true;
is_nonbuilding({sub,_,_,_}) -> true;
is_nonbuilding({'try',_,_,_,_}) -> true;
is_nonbuilding(_) -> false.
@@ -986,17 +1018,13 @@ mk_vars(Input0, Temps) ->
Curr = asn1ct_name:curr(enc),
[H|T] = atom_to_list(Curr),
Base = [H - ($a - $A)|T ++ "@"],
- if
- is_atom(Input0) ->
- Input = {var,atom_to_list(Input0)},
- {[],[Input|mk_vars_1(Base, Temps)]};
- is_integer(Input0) ->
+ case Input0 of
+ {var,Name} when is_list(Name) ->
{[],[Input0|mk_vars_1(Base, Temps)]};
- Input0 =:= [] ->
+ [] ->
{[],[Input0|mk_vars_1(Base, Temps)]};
- true ->
- Input = mk_var(Base, input),
- {[{assign,Input,Input0}],[Input|mk_vars_1(Base, Temps)]}
+ _ when is_integer(Input0) ->
+ {[],[Input0|mk_vars_1(Base, Temps)]}
end.
mk_vars_1(Base, Vars) ->
@@ -1143,8 +1171,15 @@ per_enc_length(Bin, Unit, Len, {Lb,Ub}, Aligned, Type)
U = unit(Unit, Aligned, Type, Lb*Unit, Ub*Unit),
PutBits = [{put_bits,Bin,binary,U}],
build_length_cond(Prefix, [[Check|PutLen++PutBits]]);
-per_enc_length(Bin, Unit, Len, Sv, Aligned, Type) when is_integer(Sv) ->
- NumBits = Sv*Unit,
+per_enc_length(Bin, Unit0, Len, Sv, Aligned, Type) when is_integer(Sv) ->
+ NumBits = Sv*Unit0,
+ Unit = case NumBits rem 8 of
+ 0 ->
+ %% Help out the alignment optimizer.
+ 8;
+ _ ->
+ Unit0
+ end,
U = unit(Unit, Aligned, Type, NumBits, NumBits),
Pb = {put_bits,Bin,binary,U},
[{'cond',[[{eq,Len,Sv},Pb]]}].
@@ -1358,58 +1393,6 @@ opt_choice_2([_|_], _) ->
throw(impossible);
opt_choice_2([], _) -> [].
-
-%%%
-%%% Helper functions for code generation of open types.
-%%%
-
-per_enc_open_type(Val0, {ToBinMod,ToBinFunc}, Aligned) ->
- {B,[Val,Len,Bin]} = mk_vars(Val0, [len,bin]),
- B ++ [{call,ToBinMod,ToBinFunc,[Val],Bin},
- {call,erlang,byte_size,[Bin],Len}|
- per_enc_length(Bin, 8, Len, Aligned)].
-
-enc_open_type([{'cond',Cs}], Aligned) ->
- [{'cond',[[C|enc_open_type_1(Act, Aligned)] || [C|Act] <- Cs]}];
-enc_open_type(_, _) ->
- throw(impossible).
-
-enc_open_type_1([{error,_}]=Imm, _) ->
- Imm;
-enc_open_type_1(Imm, Aligned) ->
- NumBits = num_bits(Imm, 0),
- Pad = case 8 - (NumBits rem 8) of
- 8 -> [];
- Pad0 -> [{put_bits,0,Pad0,[1]}]
- end,
- NumBytes = (NumBits+7) div 8,
- enc_length(NumBytes, no, Aligned) ++ Imm ++ Pad.
-
-num_bits([{put_bits,_,N,[U|_]}|T], Sum) when is_integer(N) ->
- num_bits(T, Sum+N*U);
-num_bits([_|_], _) ->
- throw(impossible);
-num_bits([], Sum) -> Sum.
-
-per_enc_open_type_output([{apply,F,A}], Acc) ->
- Dst = output_var(),
- {Dst,lists:reverse(Acc, [{apply,F,A,{var,atom_to_list(Dst)}}])};
-per_enc_open_type_output([{call,M,F,A}], Acc) ->
- Dst = output_var(),
- {Dst,lists:reverse(Acc, [{call,M,F,A,{var,atom_to_list(Dst)}}])};
-per_enc_open_type_output([{'cond',Cs}], Acc) ->
- Dst = output_var(),
- {Dst,lists:reverse(Acc, [{'cond',Cs,{var,atom_to_list(Dst)}}])};
-per_enc_open_type_output([H|T], Acc) ->
- per_enc_open_type_output(T, [H|Acc]).
-
-output_var() ->
- asn1ct_name:new(enc),
- Curr = asn1ct_name:curr(enc),
- [H|T] = atom_to_list(Curr),
- list_to_atom([H - ($a - $A)|T ++ "@output"]).
-
-
%%%
%%% Optimize list comprehensions (SEQUENCE OF/SET OF).
%%%
@@ -1587,16 +1570,16 @@ collect_put_bits(Imm) ->
%%% the same element twice.
%%%
-enc_cse([{assign,{var,V},E}=H|T]) ->
- [H|enc_cse_1(T, E, V)];
+enc_cse([{call,erlang,element,Args,V}=H|T]) ->
+ [H|enc_cse_1(T, Args, V)];
enc_cse(Imm) -> Imm.
-enc_cse_1([{assign,Dst,E}|T], E, V) ->
- [{assign,Dst,V}|enc_cse_1(T, E, V)];
-enc_cse_1([{block,Bl}|T], E, V) ->
- [{block,enc_cse_1(Bl, E, V)}|enc_cse_1(T, E, V)];
-enc_cse_1([H|T], E, V) ->
- [H|enc_cse_1(T, E, V)];
+enc_cse_1([{call,erlang,element,Args,Dst}|T], Args, V) ->
+ [{set,V,Dst}|enc_cse_1(T, Args, V)];
+enc_cse_1([{block,Bl}|T], Args, V) ->
+ [{block,enc_cse_1(Bl, Args, V)}|enc_cse_1(T, Args, V)];
+enc_cse_1([H|T], Args, V) ->
+ [H|enc_cse_1(T, Args, V)];
enc_cse_1([], _, _) -> [].
@@ -1637,7 +1620,7 @@ enc_pre_cg_2({block,Bl0}, StL, StB) ->
enc_pre_cg_1(Bl0, StL, StB);
enc_pre_cg_2({call,_,_,_}=Imm, _, _) ->
Imm;
-enc_pre_cg_2({call_gen,_,_,_,_}=Imm, _, _) ->
+enc_pre_cg_2({call_gen,_,_,_,_,_}=Imm, _, _) ->
Imm;
enc_pre_cg_2({'cond',Cs0}, StL, _StB) ->
Cs = [{C,enc_pre_cg_1(Act, StL, outside_seq)} || [C|Act] <- Cs0],
@@ -1662,18 +1645,22 @@ enc_pre_cg_2({var,_}=Imm, _, _) -> Imm.
enc_make_cons({binary,H}, {binary,T}) ->
{binary,H++T};
enc_make_cons({binary,H0}, {cons,{binary,H1},T}) ->
- {cons,{binary,H0++H1},T};
+ enc_make_cons({binary,H0++H1}, T);
+enc_make_cons({binary,H}, {cons,{integer,Int},T}) ->
+ enc_make_cons({binary,H++[{put_bits,Int,8,[1]}]}, T);
enc_make_cons({integer,Int}, {binary,T}) ->
{binary,[{put_bits,Int,8,[1]}|T]};
+enc_make_cons({integer,Int}, {cons,{binary,H},T}) ->
+ enc_make_cons({binary,[{put_bits,Int,8,[1]}|H]}, T);
enc_make_cons(H, T) ->
{cons,H,T}.
-enc_pre_cg_nonbuilding({'cond',Cs0,Dst}, StL) ->
- Cs = [{C,enc_pre_cg_1(Act, StL, outside_seq)} || [C|Act] <- Cs0],
- {'cond',Cs,Dst};
enc_pre_cg_nonbuilding({lc,B0,Var,List,Dst}, StL) ->
B = enc_pre_cg_1(B0, StL, outside_seq),
{lc,B,Var,List,Dst};
+enc_pre_cg_nonbuilding({list,List0,Dst}, _StL) ->
+ List = enc_pre_cg_1(List0, outside_list, outside_seq),
+ {list,List,Dst};
enc_pre_cg_nonbuilding({'try',Try0,{P,Succ0},Else0,Dst}, StL) ->
Try = enc_pre_cg_1(Try0, StL, outside_seq),
Succ = enc_pre_cg_1(Succ0, StL, outside_seq),
@@ -1681,6 +1668,562 @@ enc_pre_cg_nonbuilding({'try',Try0,{P,Succ0},Else0,Dst}, StL) ->
{'try',Try,{P,Succ},Else,Dst};
enc_pre_cg_nonbuilding(Imm, _) -> Imm.
+%%%
+%%% Optimize calls to complete/1 and surrounding code. There are
+%%% several opportunities for optimizations.
+%%%
+%%% It may be possible to replace the call to complete/1 with
+%%% something cheaper (most important for the PER back-end which has
+%%% an expensive complete/1 implementation). If we can be sure that
+%%% complete/1 will be called with an iolist (no 'align' atoms or
+%%% bitstrings in the list), we can call iolist_to_binary/1
+%%% instead. If the list may include bitstrings, we can can call
+%%% list_to_bitstring/1 (note that list_to_bitstring/1 does not accept
+%%% a binary or bitstring, so we MUST be sure that we only pass it a
+%%% list). If complete/1 is called with a binary, we can omit the
+%%% call altogether.
+%%%
+%%% A call to byte_size/1 that follows complete/1 can be eliminated
+%%% if the size of the binary produced by complete/1 can be determined
+%%% and is constant.
+%%%
+%%% The code that encodes the length descriptor (a 'cond' instruction)
+%%% for a binary produced by complete/1 can be simplified if the lower
+%%% and upper bounds for the size of the binary are known.
+%%%
+
+-record(ost,
+ {sym,
+ t
+ }).
+
+enc_opt(Imm0) ->
+ {Imm,_} = enc_opt(Imm0, #ost{sym=gb_trees:empty()}),
+ Imm.
+
+enc_opt(align, St) ->
+ {align,St#ost{t=t_align({0,7})}};
+enc_opt({apply,What,As}, St) ->
+ {{apply,What,subst_list(As, St)},St#ost{t=t_any()}};
+enc_opt({assign,_,_}=Imm, St) ->
+ {Imm,St};
+enc_opt({binary,PutBits0}, St) ->
+ PutBits = [{put_bits,subst(V, St),Sz,F} ||
+ {put_bits,V,Sz,F} <- PutBits0],
+ NumBits = lists:foldl(fun({put_bits,_,Bits,_}, Sum) ->
+ Sum+Bits
+ end, 0, PutBits),
+ {{binary,PutBits},St#ost{t=t_bitstring(NumBits)}};
+enc_opt({block,Bl0}, St0) ->
+ {Bl,St} = enc_opt(Bl0, St0),
+ {{block,Bl},St};
+enc_opt({call,binary,encode_unsigned,[Int],Bin}=Imm, St0) ->
+ Type = get_type(Int, St0),
+ St = case t_range(Type) of
+ any ->
+ set_type(Bin, t_binary(), St0);
+ {Lb0,Ub0} ->
+ Lb = bit_size(binary:encode_unsigned(Lb0)),
+ Ub = bit_size(binary:encode_unsigned(Ub0)),
+ set_type(Bin, t_binary({Lb,Ub}), St0)
+ end,
+ {Imm,St};
+enc_opt({call,erlang,bit_size,[Bin],Dst}=Imm0, St0) ->
+ Type = get_type(Bin, St0),
+ case t_range(Type) of
+ any ->
+ St1 = set_type(Bin, t_bitstring(), St0),
+ St = propagate(Dst,
+ fun(T, S) ->
+ bit_size_propagate(Bin, T, S)
+ end, St1),
+ {Imm0,St};
+ {Lb,Ub}=Range ->
+ St = set_type(Dst, t_integer(Range), St0),
+ Imm = case Lb of
+ Ub -> none;
+ _ -> Imm0
+ end,
+ {Imm,St}
+ end;
+enc_opt({call,erlang,byte_size,[Bin],Dst}=Imm0, St0) ->
+ Type = get_type(Bin, St0),
+ case t_range(Type) of
+ any ->
+ St1 = set_type(Bin, t_binary(), St0),
+ St = propagate(Dst,
+ fun(T, S) ->
+ byte_size_propagate(Bin, T, S)
+ end, St1),
+ {Imm0,St};
+ {Lb0,Ub0} ->
+ Lb = (Lb0+7) div 8,
+ Ub = (Ub0+7) div 8,
+ St = set_type(Dst, t_integer({Lb,Ub}), St0),
+ Imm = case Lb of
+ Ub -> none;
+ _ -> Imm0
+ end,
+ {Imm,St}
+ end;
+enc_opt({call,erlang,iolist_to_binary,_}=Imm, St) ->
+ {Imm,St#ost{t=t_binary()}};
+enc_opt({call,erlang,length,[List],Dst}=Imm0, St0) ->
+ St1 = propagate(Dst,
+ fun(T, S) ->
+ length_propagate(List, T, S)
+ end, St0),
+ {Imm0,St1};
+enc_opt({call,per,complete,[Data],Dst}, St0) ->
+ Type = get_type(Data, St0),
+ St = set_type(Dst, t_binary(t_range(Type)), St0),
+ case t_type(Type) of
+ binary ->
+ {{set,Data,Dst},St};
+ bitlist ->
+ %% We KNOW that list_to_bitstring/1 will construct
+ %% a binary (the number of bits is divisible by 8)
+ %% because per_enc_open_type/2 added an 'align' atom
+ %% at the end. If that 'align' atom had not been
+ %% optimized away, the type would have been 'align'
+ %% instead of 'bitlist'.
+ {{call,erlang,list_to_bitstring,[Data],Dst},St};
+ iolist ->
+ {{call,erlang,iolist_to_binary,[Data],Dst},St};
+ nil ->
+ Imm = {list,{binary,[{put_bits,0,8,[1]}]},Dst},
+ enc_opt(Imm, St0);
+ _ ->
+ {{call,per,complete,[Data],Dst},St}
+ end;
+enc_opt({call,uper,complete,[Data],Dst}, St0) ->
+ Type = get_type(Data, St0),
+ St = set_type(Dst, t_binary(t_range(Type)), St0),
+ case t_type(Type) of
+ binary ->
+ {{set,Data,Dst},St0};
+ iolist ->
+ {{call,erlang,iolist_to_binary,[Data],Dst},St};
+ nil ->
+ Imm = {list,{binary,[{put_bits,0,8,[1]}]},Dst},
+ enc_opt(Imm, St0);
+ _ ->
+ %% 'bitlist' or 'any'.
+ {{call,uper,complete,[Data],Dst},St}
+ end;
+enc_opt({call,per_common,encode_chars,[List,NumBits|_],Dst}=Imm, St0) ->
+ %% Note: Never used when NumBits =:= 8 (list_to_binary/1 will
+ %% be used instead).
+ St1 = set_type(Dst, t_bitstring(), St0),
+ St = propagate(List,
+ fun(T, S) ->
+ char_propagate(Dst, T, NumBits, S)
+ end, St1),
+ {Imm,St};
+enc_opt({call,per_common,encode_chars_16bit,[List],Dst}=Imm, St0) ->
+ St1 = set_type(Dst, t_binary(), St0),
+ St = propagate(List,
+ fun(T, S) ->
+ char_propagate(Dst, T, 16, S)
+ end, St1),
+ {Imm,St};
+enc_opt({call,per_common,encode_big_chars,[List],Dst}=Imm, St0) ->
+ St1 = set_type(Dst, t_binary(), St0),
+ St = propagate(List,
+ fun(T, S) ->
+ char_propagate(Dst, T, 32, S)
+ end, St1),
+ {Imm,St};
+enc_opt({call,per_common,encode_fragmented,[_,Unit]}=Imm, St) ->
+ T = case Unit rem 8 of
+ 0 -> t_iolist();
+ _ -> t_bitlist()
+ end,
+ {Imm,St#ost{t=T}};
+enc_opt({call,per_common,encode_unconstrained_number,_}=Imm, St) ->
+ {Imm,St#ost{t=t_iolist()}};
+enc_opt({call,per_common,bitstring_from_positions,_}=Imm, St) ->
+ {Imm,St#ost{t=t_bitstring()}};
+enc_opt({call,per_common,to_named_bitstring,_}=Imm, St) ->
+ {Imm,St#ost{t=t_bitstring()}};
+enc_opt({call,_,_,_}=Imm, St) ->
+ {Imm,St#ost{t=t_any()}};
+enc_opt({call,_,_,_,_}=Imm, St) ->
+ {Imm,St#ost{t=undefined}};
+enc_opt({call_gen,N,K,F,L,As}, St) ->
+ {{call_gen,N,K,F,L,subst(As, St)},St#ost{t=t_any()}};
+enc_opt({'cond',Cs0}, St0) ->
+ case enc_opt_cs(Cs0, St0) of
+ [{'_',Imm,Type}] ->
+ {Imm,St0#ost{t=Type}};
+ [{Cond,Imm,Type0}|Cs1] ->
+ {Cs,Type} = enc_opt_cond_1(Cs1, Type0, [{Cond,Imm}]),
+ {{'cond',Cs},St0#ost{t=Type}}
+ end;
+enc_opt({cons,H0,T0}, St0) ->
+ {H,#ost{t=TypeH}=St1} = enc_opt(H0, St0),
+ {T,#ost{t=TypeT}=St} = enc_opt(T0, St1),
+ {{cons,H,T},St#ost{t=t_cons(TypeH, TypeT)}};
+enc_opt({error,_}=Imm, St) ->
+ {Imm,St#ost{t=t_any()}};
+enc_opt({integer,V}, St) ->
+ {{integer,subst(V, St)},St#ost{t=t_integer()}};
+enc_opt({lc,E0,B,C}, St) ->
+ {E,_} = enc_opt(E0, St),
+ {{lc,E,B,C},St#ost{t=t_any()}};
+enc_opt({lc,E0,B,C,Dst}, St) ->
+ {E,_} = enc_opt(E0, St),
+ {{lc,E,B,C,Dst},St#ost{t=undefined}};
+enc_opt({list,Imm0,Dst}, St0) ->
+ {Imm,#ost{t=Type}=St1} = enc_opt(Imm0, St0),
+ St = set_type(Dst, Type, St1),
+ {{list,Imm,Dst},St#ost{t=undefined}};
+enc_opt(nil, St) ->
+ {nil,St#ost{t=t_nil()}};
+enc_opt({seq,H0,T0}, St0) ->
+ {H,St1} = enc_opt(H0, St0),
+ {T,St} = enc_opt(T0, St1),
+ case {H,T} of
+ {none,_} ->
+ {T,St};
+ {{list,Imm,Data},
+ {seq,{call,per,complete,[Data],_},_}} ->
+ %% Get rid of any explicit 'align' added by per_enc_open_type/2.
+ {{seq,{list,remove_trailing_align(Imm),Data},T},St};
+ {_,_} ->
+ {{seq,H,T},St}
+ end;
+enc_opt({set,_,_}=Imm, St) ->
+ {Imm,St#ost{t=undefined}};
+enc_opt({sub,Src0,Int,Dst}, St0) ->
+ Src = subst(Src0, St0),
+ Type = get_type(Src, St0),
+ St = case t_range(Type) of
+ any ->
+ propagate(Dst,
+ fun(T, S) ->
+ set_type(Src, t_add(T, Int), S)
+ end,
+ St0);
+ {Lb,Ub} ->
+ set_type(Dst, t_integer({Lb-Int,Ub-Int}), St0)
+ end,
+ {{sub,Src,Int,Dst},St#ost{t=undefined}};
+enc_opt({'try',Try0,{P,Succ0},Else0,Dst}, St0) ->
+ {Try,_} = enc_opt(Try0, St0),
+ {Succ,_} = enc_opt(Succ0, St0),
+ {Else,_} = enc_opt(Else0, St0),
+ {{'try',Try,{P,Succ},Else,Dst},St0#ost{t=undefined}};
+enc_opt({var,_}=Imm, St) ->
+ Type = get_type(Imm, St),
+ {subst(Imm, St),St#ost{t=Type}}.
+
+remove_trailing_align({block,Bl}) ->
+ {block,remove_trailing_align(Bl)};
+remove_trailing_align({cons,H,{cons,align,nil}}) ->
+ H;
+remove_trailing_align({seq,H,T}) ->
+ {seq,H,remove_trailing_align(T)};
+remove_trailing_align(Imm) -> Imm.
+
+bit_size_propagate(Bin, Type, St) ->
+ case t_range(Type) of
+ any ->
+ St;
+ {Lb,Ub} ->
+ set_type(Bin, t_bitstring({Lb,Ub}), St)
+ end.
+
+byte_size_propagate(Bin, Type, St) ->
+ case t_range(Type) of
+ any ->
+ St;
+ {Lb,Ub} ->
+ set_type(Bin, t_binary({Lb*8,Ub*8}), St)
+ end.
+
+char_propagate(Dst, T, NumBits, St) ->
+ case t_range(T) of
+ any ->
+ St;
+ {Sz,Sz} when Sz*NumBits rem 8 =:= 0 ->
+ Bits = Sz*NumBits,
+ set_type(Dst, t_binary({Bits,Bits}), St);
+ {Lb,Ub} ->
+ Range = {Lb*NumBits,Ub*NumBits},
+ case NumBits rem 8 of
+ 0 ->
+ set_type(Dst, t_binary(Range), St);
+ _ ->
+ set_type(Dst, t_bitstring(Range), St)
+ end
+ end.
+
+length_propagate(List, Type, St) ->
+ set_type(List, t_list(t_range(Type)), St).
+
+enc_opt_cond_1([{Cond,{error,_}=Imm,_}|T], St, Acc) ->
+ enc_opt_cond_1(T, St, [{Cond,Imm}|Acc]);
+enc_opt_cond_1([{Cond,Imm,Curr0}|T], Curr1, Acc) ->
+ Curr = t_join(Curr0, Curr1),
+ enc_opt_cond_1(T, Curr, [{Cond,Imm}|Acc]);
+enc_opt_cond_1([], St, Acc) ->
+ {lists:reverse(Acc),St}.
+
+enc_opt_cs([{Cond,Imm0}|T], St0) ->
+ case eo_eval_cond(Cond, St0) of
+ false ->
+ enc_opt_cs(T, St0);
+ true ->
+ {Imm,#ost{t=Type}} = enc_opt(Imm0, St0),
+ [{'_',Imm,Type}];
+ maybe ->
+ St = update_type_info(Cond, St0),
+ {Imm,#ost{t=Type}} = enc_opt(Imm0, St),
+ [{Cond,Imm,Type}|enc_opt_cs(T, St0)]
+ end;
+enc_opt_cs([], _) -> [].
+
+eo_eval_cond('_', _) ->
+ true;
+eo_eval_cond({Op,{var,_}=Var,Val}, St) ->
+ Type = get_type(Var, St),
+ case t_range(Type) of
+ any -> maybe;
+ {_,_}=Range -> eval_cond_range(Op, Range, Val)
+ end;
+eo_eval_cond({_Op,{expr,_},_Val}, _St) -> maybe.
+
+eval_cond_range(lt, {Lb,Ub}, Val) ->
+ if
+ Ub < Val -> true;
+ Val =< Lb -> false;
+ true -> maybe
+ end;
+eval_cond_range(_Op, _Range, _Val) -> maybe.
+
+update_type_info({ult,{var,_}=Var,Val}, St) ->
+ Int = t_integer({0,Val-1}),
+ Type = t_meet(get_type(Var, St), Int),
+ set_type(Var, Type, St);
+update_type_info({lt,{var,_}=Var,Val}, St) ->
+ Int = t_integer({0,Val-1}),
+ Type = t_meet(get_type(Var, St), Int),
+ set_type(Var, Type, St);
+update_type_info({eq,{var,_}=Var,Val}, St) when is_integer(Val) ->
+ Int = t_integer(Val),
+ Type = t_meet(get_type(Var, St), Int),
+ set_type(Var, Type, St);
+update_type_info({eq,_,_}, St) ->
+ St;
+update_type_info({ge,_,_}, St) -> St.
+
+subst_list(As, St) ->
+ [subst(A, St) || A <- As].
+
+subst({var,_}=Var, St) ->
+ Type = get_type(Var, St),
+ case t_type(Type) of
+ integer ->
+ case t_range(Type) of
+ any -> Var;
+ {Val,Val} -> Val;
+ {_,_} -> Var
+ end;
+ _ ->
+ Var
+ end;
+subst(V, _St) -> V.
+
+set_type({var,Var}, {_,_}=Type, #ost{sym=Sym0}=St0) ->
+ Sym1 = gb_trees:enter(Var, Type, Sym0),
+ case gb_trees:lookup({propagate,Var}, Sym1) of
+ none ->
+ St0#ost{sym=Sym1};
+ {value,Propagate} ->
+ Sym = gb_trees:delete({propagate,Var}, Sym1),
+ St = St0#ost{sym=Sym},
+ Propagate(Type, St)
+ end.
+
+get_type({var,V}, #ost{sym=Sym}) ->
+ case gb_trees:lookup(V, Sym) of
+ none -> t_any();
+ {value,T} -> T
+ end.
+
+propagate({var,Var}, Propagate, #ost{sym=Sym0}=St) when is_function(Propagate, 2) ->
+ Sym = gb_trees:enter({propagate,Var}, Propagate, Sym0),
+ St#ost{sym=Sym}.
+
+%%%
+%%% A simple type system.
+%%%
+%%% Each type descriptions is a tuple {Type,Range}.
+%%% Type is one of the following atoms:
+%%%
+%%% Type name Description
+%%% --------- -----------
+%%% any Anything.
+%%%
+%%% align Basically iodata, but the list may contain bitstrings
+%%% and the the atom 'align'. Can be passed to complete/1
+%%% to construct a binary. Only used for aligned PER (per).
+%%%
+%%% bitstring An Erlang bitstring.
+%%%
+%%% bitlist A list that may be passed to list_to_bitstring/1 to
+%%% construct a bitstring.
+%%% NOTE: When analysing aligned PER (per), the number
+%%% of bits in the bitlist is always divisible by 8 (if
+%%% not, the type will be 'align' instead).
+%%%
+%%% binary An Erlang binary (the number of bits is divisible by 8).
+%%%
+%%% iolist An Erlang iolist.
+%%%
+%%% nil []
+%%%
+%%% integer An integer.
+%%%
+%%%
+%%% Range is one of:
+%%%
+%%% any
+%%% {LowerBound,UpperBound}
+%%%
+%%%
+
+t_align(Range) ->
+ {align,t__range(Range)}.
+
+t_any() ->
+ {any,any}.
+
+t_binary() ->
+ {binary,any}.
+
+t_binary(Range) ->
+ {binary,t__range(Range)}.
+
+t_bitlist() ->
+ {bitlist,any}.
+
+t_bitstring() ->
+ {bitstring,any}.
+
+t_bitstring(Range0) ->
+ case t__range(Range0) of
+ {Bits,Bits}=Range when Bits rem 8 =:= 0 ->
+ {binary,Range};
+ Range ->
+ {bitstring,Range}
+ end.
+
+t_add({integer,{Lb,Ub}}, N) ->
+ {integer,{Lb+N,Ub+N}}.
+
+t_cons({_,_}=T1, {_,_}=T2) ->
+ T = case {t__cons_type(T1),t__cons_type(T2)} of
+ {_,any} -> any;
+ {any,_} -> any;
+ {align,_} -> align;
+ {_,align} -> align;
+ {binary,binary} -> iolist;
+ {binary,bitstring} -> bitlist;
+ {bitstring,binary} -> bitlist;
+ {bitstring,bitstring} -> bitlist
+ end,
+ {T,t__cons_ranges(t__cons_range(T1), t__cons_range(T2))}.
+
+t_integer() ->
+ {integer,any}.
+
+t_integer(Range) ->
+ {integer,t__range(Range)}.
+
+t_iolist() ->
+ {iolist,any}.
+
+t_list(Range) ->
+ {list,t__range(Range)}.
+
+t_nil() ->
+ {nil,{0,0}}.
+
+t_meet({T1,Range1}, {T2,Range2}) ->
+ {t_meet_types(T1, T2),t_meet_ranges(Range1, Range2)}.
+
+t_meet_types(integer, integer) -> integer;
+t_meet_types(any, integer) -> integer.
+
+t_meet_ranges(any, Range) ->
+ Range;
+t_meet_ranges({Lb1,Ub1}, {Lb2,Ub2}) ->
+ if
+ Lb1 =< Ub2, Lb2 =< Ub1 ->
+ {max(Lb1, Lb2),Ub1};
+ Lb2 =< Ub1, Lb1 =< Ub2 ->
+ {max(Lb1, Lb2),Ub2}
+ end.
+
+t_join({T1,Range1}, {T2,Range2}) ->
+ T = t_join_types(lists:sort([T1,T2])),
+ Range = t_join_ranges(Range1, Range2),
+ {T,Range}.
+
+t_join_ranges({Lb1,Ub1}, {Lb2,Ub2}) ->
+ {min(Lb1, Lb2),max(Ub1, Ub2)};
+t_join_ranges(any, _) -> any;
+t_join_ranges(_, any) -> any.
+
+t_join_types([T,T]) -> T;
+t_join_types([align,any]) -> any;
+t_join_types([align,_]) -> align;
+t_join_types([any,_]) -> any;
+t_join_types([bitlist,bitstring]) -> any;
+t_join_types([bitlist,integer]) -> any;
+t_join_types([bitlist,iolist]) -> bitlist;
+t_join_types([bitlist,nil]) -> bitlist;
+t_join_types([binary,bitlist]) -> bitlist;
+t_join_types([binary,bitstring]) -> bitstring;
+t_join_types([binary,integer]) -> binary;
+t_join_types([binary,iolist]) -> iolist;
+t_join_types([binary,nil]) -> iolist;
+t_join_types([bitstring,integer]) -> any;
+t_join_types([bitstring,iolist]) -> any;
+t_join_types([bitstring,nil]) -> any;
+t_join_types([integer,_]) -> any;
+t_join_types([iolist,nil]) -> iolist.
+
+t_type({T,_}) -> T.
+
+t_range({_,Range}) -> Range.
+
+t__cons_type({align,_}) -> align;
+t__cons_type({any,_}) -> any;
+t__cons_type({binary,_}) -> binary;
+t__cons_type({bitstring,_}) -> bitstring;
+t__cons_type({bitlist,_}) -> bitstring;
+t__cons_type({integer,_}) -> binary;
+t__cons_type({iolist,_}) -> binary;
+t__cons_type({nil,_}) -> binary.
+
+t__cons_range({integer,_}) -> {8,8};
+t__cons_range({_,Range}) -> Range.
+
+t__cons_ranges({Lb1,Ub1}, {Lb2,Ub2}) ->
+ {Lb1+Lb2,Ub1+Ub2};
+t__cons_ranges(any, _) -> any;
+t__cons_ranges(_, any) -> any.
+
+t__range({Lb,Ub}=Range) when is_integer(Lb), is_integer(Ub) ->
+ Range;
+t__range(any) ->
+ any;
+t__range(Val) when is_integer(Val) ->
+ {Val,Val}.
+
%%%
%%% Code generation for encoding.
@@ -1702,19 +2245,10 @@ enc_cg(align) ->
enc_cg({apply,F0,As0}) ->
As = enc_call_args(As0, ""),
case F0 of
- {M,F} ->
- emit([{asis,M},":",{asis,F},"(",As,")"]);
- F when is_atom(F) ->
- emit([{asis,F},"(",As,")"])
- end;
-enc_cg({apply,F0,As0,Dst}) ->
- As = enc_call_args(As0, ""),
- emit([mk_val(Dst)," = "]),
- case F0 of
- {M,F} ->
- emit([{asis,M},":",{asis,F},"(",As,")"]);
- F when is_atom(F) ->
- emit([{asis,F},"(",As,")"])
+ {local,F,_} when is_atom(F) ->
+ emit([{asis,F},"(",As,")"]);
+ {M,F,_} ->
+ emit([{asis,M},":",{asis,F},"(",As,")"])
end;
enc_cg({assign,Dst0,Expr}) ->
Dst = mk_val(Dst0),
@@ -1728,15 +2262,11 @@ enc_cg({call,M,F,As0,Dst}) ->
As = [mk_val(A) || A <- As0],
emit([mk_val(Dst)," = "]),
asn1ct_func:call(M, F, As);
-enc_cg({call_gen,Prefix,Key,Gen,As0}) ->
+enc_cg({call_gen,Prefix,Key,Gen,_,As0}) ->
As = [mk_val(A) || A <- As0],
asn1ct_func:call_gen(Prefix, Key, Gen, As);
enc_cg({'cond',Cs}) ->
enc_cg_cond(Cs);
-enc_cg({'cond',Cs,Dst0}) ->
- Dst = mk_val(Dst0),
- emit([Dst," = "]),
- enc_cg_cond(Cs);
enc_cg({error,Error}) when is_function(Error, 0) ->
Error();
enc_cg({error,Var0}) ->
@@ -1752,12 +2282,17 @@ enc_cg({lc,Body,Var,List,Dst}) ->
emit([mk_val(Dst)," = ["]),
enc_cg(Body),
emit([" || ",mk_val(Var)," <- ",mk_val(List),"]"]);
+enc_cg({list,List,Dst}) ->
+ emit([mk_val(Dst)," = "]),
+ enc_cg(List);
enc_cg(nil) ->
emit("[]");
enc_cg({sub,Src0,Int,Dst0}) ->
Src = mk_val(Src0),
Dst = mk_val(Dst0),
emit([Dst," = ",Src," - ",Int]);
+enc_cg({set,{var,Src},{var,Dst}}) ->
+ emit([Dst," = ",Src]);
enc_cg({'try',Try,{P,Succ},Else,Dst}) ->
emit([mk_val(Dst)," = try "]),
enc_cg(Try),
@@ -1792,8 +2327,6 @@ enc_call_args([A|As], Sep) ->
[Sep,mk_val(A)|enc_call_args(As, ", ")];
enc_call_args([], _) -> [].
-enc_cg_cond([{'_',Action}]) ->
- enc_cg(Action);
enc_cg_cond(Cs) ->
emit("if "),
enc_cg_cond(Cs, ""),
@@ -1849,7 +2382,7 @@ mk_val(Other) -> {asis,Other}.
bit_string_name2pos_fun(NNL, Src) ->
{call_gen,"bit_string_name2pos_",NNL,
- fun(Fd, Name) -> gen_name2pos(Fd, Name, NNL) end,[Src]}.
+ fun(Fd, Name) -> gen_name2pos(Fd, Name, NNL) end,[],[Src]}.
gen_name2pos(Fd, Name, Names) ->
Cs0 = gen_name2pos_cs(Names, Name),
@@ -1978,19 +2511,12 @@ enc_opt_al(Imm0) ->
{Imm,_} = enc_opt_al_1(Imm0, unknown),
Imm.
-enc_opt_al_1([{'cond',Cs0,Dst},{call,per,complete,[Dst],Bin}|T0], Al0) ->
- {Cs1,{M,F}} = enc_opt_al_prepare_cond(Cs0),
- {Cs,_} = enc_opt_al_cond(Cs1, 0),
- {T,Al} = enc_opt_al_1([{call,M,F,[Dst],Bin}|T0], Al0),
- {[{'cond',Cs,Dst}|T],Al};
enc_opt_al_1([H0|T0], Al0) ->
{H,Al1} = enc_opt_al(H0, Al0),
{T,Al} = enc_opt_al_1(T0, Al1),
{H++T,Al};
enc_opt_al_1([], Al) -> {[],Al}.
-enc_opt_al({apply,_,_,_}=Imm, Al) ->
- {[Imm],Al};
enc_opt_al({assign,_,_}=Imm, Al) ->
{[Imm],Al};
enc_opt_al({block,Bl0}, Al0) ->
@@ -2012,6 +2538,10 @@ enc_opt_al({'cond',Cs0}, Al0) ->
{[{'cond',Cs}],Al};
enc_opt_al({error,_}=Imm, Al) ->
{[Imm],Al};
+enc_opt_al({list,Imm0,Dst}, Al) ->
+ Imm1 = enc_opt_hoist_align(Imm0),
+ {Imm,_} = enc_opt_al_1(Imm1, 0),
+ {[{list,Imm,Dst}],Al};
enc_opt_al({put_bits,V,N,[U,align]}, Al0) when Al0 rem 8 =:= 0 ->
Al = if
is_integer(N) -> N*U;
@@ -2038,8 +2568,12 @@ enc_opt_al({put_bits,_,N,[U]}=PutBits, Al) when is_integer(N), is_integer(Al) ->
{[PutBits],Al+N*U};
enc_opt_al({put_bits,_,binary,[U]}=PutBits, Al) when U rem 8 =:= 0 ->
{[PutBits],Al};
+enc_opt_al({set,_,_}=Imm, Al) ->
+ {[Imm],Al};
enc_opt_al({sub,_,_,_}=Imm, Al) ->
{[Imm],Al};
+enc_opt_al({'try',_,_,_,_}=Imm, Al) ->
+ {[Imm],Al};
enc_opt_al(Imm, _) ->
{[Imm],unknown}.
@@ -2063,29 +2597,25 @@ enc_opt_al_cond_1([], _, CAcc, AAcc) ->
end,
{lists:reverse(CAcc),Al}.
-enc_opt_al_prepare_cond(Cs0) ->
- try enc_opt_al_prepare_cond_1(Cs0) of
- Cs ->
- {Cs,{erlang,iolist_to_binary}}
+enc_opt_hoist_align([{'cond',Cs0},{put_bits,0,0,[1,align]}]=Imm) ->
+ try
+ Cs = [insert_align_last(C) || C <- Cs0],
+ [{'cond',Cs}]
catch
throw:impossible ->
- {Cs0,{per,complete}}
- end.
-
-enc_opt_al_prepare_cond_1(Cs) ->
- [[C|enc_opt_al_prepare_cond_2(Act)] || [C|Act] <- Cs].
-
-enc_opt_al_prepare_cond_2([{put_bits,_,binary,[U|_]}|_]) when U rem 8 =/= 0 ->
- throw(impossible);
-enc_opt_al_prepare_cond_2([{put_bits,_,_,_}=H|T]) ->
- [H|enc_opt_al_prepare_cond_2(T)];
-enc_opt_al_prepare_cond_2([{call,per_common,encode_fragmented,_}=H|T]) ->
- [H|enc_opt_al_prepare_cond_2(T)];
-enc_opt_al_prepare_cond_2([_|_]) ->
- throw(impossible);
-enc_opt_al_prepare_cond_2([]) ->
- [{put_bits,0,0,[1,align]}].
+ Imm
+ end;
+enc_opt_hoist_align(Imm) -> Imm.
+insert_align_last([_,{error,_}]=C) ->
+ C;
+insert_align_last([H|T]) ->
+ case lists:last(T) of
+ {put_bits,_,_,_} ->
+ [H|T ++ [{put_bits,0,0,[1,align]}]];
+ _ ->
+ throw(impossible)
+ end.
%%%
%%% For the aligned PER format, fix up the intermediate format
@@ -2095,8 +2625,6 @@ enc_opt_al_prepare_cond_2([]) ->
per_fixup([{apply,_,_}=H|T]) ->
[H|per_fixup(T)];
-per_fixup([{apply,_,_,_}=H|T]) ->
- [H|per_fixup(T)];
per_fixup([{block,Block}|T]) ->
[{block,per_fixup(Block)}|per_fixup(T)];
per_fixup([{'assign',_,_}=H|T]) ->
@@ -2104,14 +2632,11 @@ per_fixup([{'assign',_,_}=H|T]) ->
per_fixup([{'cond',Cs0}|T]) ->
Cs = [[C|per_fixup(Act)] || [C|Act] <- Cs0],
[{'cond',Cs}|per_fixup(T)];
-per_fixup([{'cond',Cs0,Dst}|T]) ->
- Cs = [[C|per_fixup(Act)] || [C|Act] <- Cs0],
- [{'cond',Cs,Dst}|per_fixup(T)];
per_fixup([{call,_,_,_}=H|T]) ->
[H|per_fixup(T)];
per_fixup([{call,_,_,_,_}=H|T]) ->
[H|per_fixup(T)];
-per_fixup([{call_gen,_,_,_,_}=H|T]) ->
+per_fixup([{call_gen,_,_,_,_,_}=H|T]) ->
[H|per_fixup(T)];
per_fixup([{error,_}=H|T]) ->
[H|per_fixup(T)];
@@ -2119,6 +2644,10 @@ per_fixup([{lc,B,V,L}|T]) ->
[{lc,per_fixup(B),V,L}|per_fixup(T)];
per_fixup([{lc,B,V,L,Dst}|T]) ->
[{lc,per_fixup(B),V,L,Dst}|per_fixup(T)];
+per_fixup([{list,Imm,Dst}|T]) ->
+ [{list,per_fixup(Imm),Dst}|per_fixup(T)];
+per_fixup([{set,_,_}=H|T]) ->
+ [H|per_fixup(T)];
per_fixup([{sub,_,_,_}=H|T]) ->
[H|per_fixup(T)];
per_fixup([{'try',Try0,{P,Succ0},Else0,Dst}|T]) ->
diff --git a/lib/asn1/src/asn1ct_table.erl b/lib/asn1/src/asn1ct_table.erl
index a5eb6d0413..2eca80eda3 100644
--- a/lib/asn1/src/asn1ct_table.erl
+++ b/lib/asn1/src/asn1ct_table.erl
@@ -22,34 +22,25 @@
%% Table abstraction module for ASN.1 compiler
-export([new/1]).
--export([new/2]).
-export([new_reuse/1]).
--export([new_reuse/2]).
-export([exists/1]).
-export([size/1]).
-export([insert/2]).
-export([lookup/2]).
-export([match/2]).
-export([to_list/1]).
--export([delete/1]). % TODO: Remove (since we run in a separate process)
+-export([delete/1]).
-%% Always creates a new table
-new(Table) -> new(Table, []).
-new(Table, Options) ->
- TableId = case get(Table) of
- undefined ->
- ets:new(Table, Options);
- _ ->
- delete(Table),
- ets:new(Table, Options)
- end,
+%% Always create a new table.
+new(Table) ->
+ undefined = get(Table), %Assertion.
+ TableId = ets:new(Table, []),
put(Table, TableId).
-%% Only create it if it doesn't exist yet
-new_reuse(Table) -> new_reuse(Table, []).
-new_reuse(Table, Options) ->
- not exists(Table) andalso new(Table, Options).
+%% Only create it if it doesn't exist yet.
+new_reuse(Table) ->
+ not exists(Table) andalso new(Table).
exists(Table) -> get(Table) =/= undefined.
@@ -63,14 +54,17 @@ match(Table, MatchSpec) -> ets:match(get(Table), MatchSpec).
to_list(Table) -> ets:tab2list(get(Table)).
+%% Deleting tables is no longer strictly necessary since each compilation
+%% runs in separate process, but it will reduce memory consumption
+%% especially when many compilations are run in parallel.
+
delete(Tables) when is_list(Tables) ->
[delete(T) || T <- Tables],
true;
delete(Table) when is_atom(Table) ->
- case get(Table) of
+ case erase(Table) of
undefined ->
true;
TableId ->
- ets:delete(TableId),
- erase(Table)
+ ets:delete(TableId)
end.
diff --git a/lib/asn1/src/asn1ct_tok.erl b/lib/asn1/src/asn1ct_tok.erl
index 85199c65ec..33f4379173 100644
--- a/lib/asn1/src/asn1ct_tok.erl
+++ b/lib/asn1/src/asn1ct_tok.erl
@@ -36,7 +36,7 @@ process(Stream,Lno,R) ->
process(io:get_line(Stream, ''), Stream,Lno+1,R).
process(eof, Stream,Lno,R) ->
- file:close(Stream),
+ ok = file:close(Stream),
lists:flatten(lists:reverse([{'$end',Lno}|R]));
diff --git a/lib/asn1/src/asn1ct_value.erl b/lib/asn1/src/asn1ct_value.erl
index 862b3c4ea5..221cd991a7 100644
--- a/lib/asn1/src/asn1ct_value.erl
+++ b/lib/asn1/src/asn1ct_value.erl
@@ -18,6 +18,7 @@
%%
%%
-module(asn1ct_value).
+-compile([{nowarn_deprecated_function,{asn1rt,utf8_list_to_binary,1}}]).
%% Generate Erlang values for ASN.1 types.
%% The value is randomized within it's constraints
@@ -260,7 +261,11 @@ from_type_prim(M, D) ->
'BOOLEAN' ->
true;
'OCTET STRING' ->
- adjust_list(size_random(C),c_string(C,"OCTET STRING"));
+ S0 = adjust_list(size_random(C), c_string(C, "OCTET STRING")),
+ case M:legacy_erlang_types() of
+ false -> list_to_binary(S0);
+ true -> S0
+ end;
'NumericString' ->
adjust_list(size_random(C),c_string(C,"0123456789"));
'TeletexString' ->
@@ -348,7 +353,7 @@ random_unnamed_bit_string(M, C) ->
random(Upper) ->
{A1,A2,A3} = erlang:now(),
- random:seed(A1,A2,A3),
+ _ = random:seed(A1, A2, A3),
random:uniform(Upper).
size_random(C) ->
diff --git a/lib/asn1/src/asn1rt.erl b/lib/asn1/src/asn1rt.erl
index d18f81346a..ad8b879c38 100644
--- a/lib/asn1/src/asn1rt.erl
+++ b/lib/asn1/src/asn1rt.erl
@@ -18,14 +18,13 @@
%%
%%
-module(asn1rt).
+-deprecated(module).
%% Runtime functions for ASN.1 (i.e encode, decode)
-export([encode/2,encode/3,decode/3,load_driver/0,unload_driver/0,info/1]).
-export([utf8_binary_to_list/1,utf8_list_to_binary/1]).
-
--deprecated([load_driver/0,unload_driver/0]).
encode(Module,{Type,Term}) ->
encode(Module,Type,Term).
diff --git a/lib/asn1/src/asn1rtt_ber.erl b/lib/asn1/src/asn1rtt_ber.erl
index 583ff790b7..4bd814769f 100644
--- a/lib/asn1/src/asn1rtt_ber.erl
+++ b/lib/asn1/src/asn1rtt_ber.erl
@@ -29,6 +29,8 @@
decode_integer/2,decode_integer/3,
decode_named_integer/3,decode_named_integer/4,
encode_enumerated/2,decode_enumerated/3,
+ encode_unnamed_bit_string/2,encode_unnamed_bit_string/3,
+ encode_named_bit_string/3,encode_named_bit_string/4,
encode_bit_string/4,
decode_named_bit_string/3,
decode_compact_bit_string/3,
@@ -38,6 +40,7 @@
encode_relative_oid/2,decode_relative_oid/2,
encode_object_identifier/2,decode_object_identifier/2,
encode_restricted_string/2,
+ decode_octet_string/2,decode_octet_string/3,
decode_restricted_string/2,decode_restricted_string/3,
encode_universal_string/2,decode_universal_string/3,
encode_UTF8_string/2,decode_UTF8_string/2,
@@ -780,6 +783,55 @@ decode_enumerated1(Val, NamedNumberList) ->
{asn1_enum,Val}
end.
+%%============================================================================
+%% Bitstring value, ITU_T X.690 Chapter 8.6
+%%
+%% encode bitstring value
+%%============================================================================
+
+encode_unnamed_bit_string(Bits, TagIn) ->
+ Unused = (8 - (bit_size(Bits) band 7)) band 7,
+ Bin = <<Unused,Bits/bitstring,0:Unused>>,
+ encode_tags(TagIn, Bin, byte_size(Bin)).
+
+encode_unnamed_bit_string(C, Bits, TagIn) ->
+ NumBits = bit_size(Bits),
+ Unused = (8 - (NumBits band 7)) band 7,
+ Bin = <<Unused,Bits/bitstring,0:Unused>>,
+ case C of
+ {_Min,Max} ->
+ if
+ NumBits > Max ->
+ exit({error,{asn1,
+ {bitstring_length,
+ {{was,NumBits},{maximum,Max}}}}});
+ true ->
+ ok
+ end;
+ Size ->
+ if NumBits =< Size ->
+ ok;
+ true ->
+ exit({error,{asn1,
+ {bitstring_length,
+ {{was,NumBits},{should_be,Size}}}}})
+ end
+ end,
+ encode_tags(TagIn, Bin, byte_size(Bin)).
+
+encode_named_bit_string([H|_]=Bits, NamedBitList, TagIn) when is_atom(H) ->
+ encode_bit_string_named([], Bits, NamedBitList, TagIn);
+encode_named_bit_string([{bit,_}|_]=Bits, NamedBitList, TagIn) ->
+ encode_bit_string_named([], Bits, NamedBitList, TagIn);
+encode_named_bit_string(Bits, _NamedBitList, TagIn) when is_bitstring(Bits) ->
+ encode_unnamed_bit_string(Bits, TagIn).
+
+encode_named_bit_string(C, [H|_]=Bits, NamedBitList, TagIn) when is_atom(H) ->
+ encode_bit_string_named(C, Bits, NamedBitList, TagIn);
+encode_named_bit_string(C, [{bit,_}|_]=Bits, NamedBitList, TagIn) ->
+ encode_bit_string_named(C, Bits, NamedBitList, TagIn);
+encode_named_bit_string(C, Bits, _NamedBitList, TagIn) when is_bitstring(Bits) ->
+ encode_unnamed_bit_string(C, Bits, TagIn).
%%============================================================================
%% Bitstring value, ITU_T X.690 Chapter 8.6
@@ -1251,6 +1303,19 @@ encode_restricted_string(OctetList, TagIn) when is_list(OctetList) ->
encode_tags(TagIn, OctetList, length(OctetList)).
%%============================================================================
+%% decode OCTET STRING to binary
+%%============================================================================
+
+decode_octet_string(Tlv, TagsIn) ->
+ Bin = match_and_collect(Tlv, TagsIn),
+ binary:copy(Bin).
+
+decode_octet_string(Tlv, Range, TagsIn) ->
+ Bin0 = match_and_collect(Tlv, TagsIn),
+ Bin = binary:copy(Bin0),
+ check_restricted_string(Bin, byte_size(Bin), Range).
+
+%%============================================================================
%% decode Numeric Printable Teletex Videotex Visible IA5 Graphic General strings
%%============================================================================
diff --git a/lib/asn1/src/asn1rtt_ext.erl b/lib/asn1/src/asn1rtt_ext.erl
index 46adb2007d..f3eee1cdd5 100644
--- a/lib/asn1/src/asn1rtt_ext.erl
+++ b/lib/asn1/src/asn1rtt_ext.erl
@@ -38,7 +38,7 @@ transform_to_EXTERNAL1990([{'context-negotiation',Context_negot}|Rest], Acc) ->
transform_to_EXTERNAL1990([asn1_NOVALUE|Rest], Acc) ->
transform_to_EXTERNAL1990(Rest, [asn1_NOVALUE|Acc]);
transform_to_EXTERNAL1990([Data_val_desc,Data_value], Acc)
- when is_list(Data_value)->
+ when is_list(Data_value); is_binary(Data_value) ->
list_to_tuple(lists:reverse([{'octet-aligned',Data_value},
Data_val_desc|Acc]));
transform_to_EXTERNAL1990([Data_val_desc,Data_value], Acc)
diff --git a/lib/asn1/src/asn1rtt_per_common.erl b/lib/asn1/src/asn1rtt_per_common.erl
index 3309e6a4ca..71fec411a0 100644
--- a/lib/asn1/src/asn1rtt_per_common.erl
+++ b/lib/asn1/src/asn1rtt_per_common.erl
@@ -37,8 +37,10 @@
bitstring_from_positions/1,bitstring_from_positions/2,
to_bitstring/1,to_bitstring/2,
to_named_bitstring/1,to_named_bitstring/2,
- is_default_bitstring/5,
- extension_bitmap/3]).
+ bs_drop_trailing_zeroes/1,adjust_trailing_zeroes/2,
+ is_default_bitstring/3,is_default_bitstring/5,
+ extension_bitmap/3,
+ open_type_to_binary/1,legacy_open_type_to_binary/1]).
-define('16K',16384).
@@ -272,6 +274,25 @@ to_named_bitstring(Val, Lb) ->
%% for correctness, not speed.
adjust_trailing_zeroes(to_bitstring(Val), Lb).
+is_default_bitstring(asn1_DEFAULT, _, _) ->
+ true;
+is_default_bitstring(Named, Named, _) ->
+ true;
+is_default_bitstring(Bs, _, Bs) ->
+ true;
+is_default_bitstring(Val, _, Def) when is_bitstring(Val) ->
+ Sz = bit_size(Def),
+ case Val of
+ <<Def:Sz/bitstring,T/bitstring>> ->
+ NumZeroes = bit_size(T),
+ case T of
+ <<0:NumZeroes>> -> true;
+ _ -> false
+ end;
+ _ ->
+ false
+ end.
+
is_default_bitstring(asn1_DEFAULT, _, _, _, _) ->
true;
is_default_bitstring({Unused,Bin}, V0, V1, V2, V3) when is_integer(Unused) ->
@@ -306,6 +327,16 @@ is_default_bitstring(_, _, _, _, _) -> false.
extension_bitmap(Val, Pos, Limit) ->
extension_bitmap(Val, Pos, Limit, 0).
+open_type_to_binary({asn1_OPENTYPE,Bin}) when is_binary(Bin) ->
+ Bin.
+
+legacy_open_type_to_binary({asn1_OPENTYPE,Bin}) when is_binary(Bin) ->
+ Bin;
+legacy_open_type_to_binary(Bin) when is_binary(Bin) ->
+ Bin;
+legacy_open_type_to_binary(List) when is_list(List) ->
+ List.
+
%%%
%%% Internal functions.
%%%
@@ -438,6 +469,8 @@ adjust_trailing_zeroes(Bs0, Lb) ->
bs_drop_trailing_zeroes(Bs) ->
bs_drop_trailing_zeroes(Bs, bit_size(Bs)).
+bs_drop_trailing_zeroes(Bs, 0) ->
+ Bs;
bs_drop_trailing_zeroes(Bs0, Sz0) when Sz0 < 8 ->
<<Byte:Sz0>> = Bs0,
Sz = Sz0 - ntz(Byte),
diff --git a/lib/asn1/test/asn1_SUITE.erl b/lib/asn1/test/asn1_SUITE.erl
index 83bd66a631..782217ed2d 100644
--- a/lib/asn1/test/asn1_SUITE.erl
+++ b/lib/asn1/test/asn1_SUITE.erl
@@ -328,6 +328,10 @@ testCompactBitString(Config, Rule, Opts) ->
testPrimStrings(Config) ->
test(Config, fun testPrimStrings/3, [ber,{ber,[der]},per,uper]).
testPrimStrings(Config, Rule, Opts) ->
+ LegacyOpts = [legacy_erlang_types|Opts],
+ asn1_test_lib:compile_all(["PrimStrings", "BitStr"], Config,
+ [Rule|LegacyOpts]),
+ testPrimStrings_cases(Rule, LegacyOpts),
asn1_test_lib:compile_all(["PrimStrings", "BitStr"], Config, [Rule|Opts]),
testPrimStrings_cases(Rule, Opts),
asn1_test_lib:compile_all(["PrimStrings", "BitStr"], Config,
@@ -432,7 +436,8 @@ testDef(Config, Rule, Opts) ->
testDEFAULT(Config) ->
test(Config, fun testDEFAULT/3, [ber,{ber,[der]},per,uper]).
testDEFAULT(Config, Rule, Opts) ->
- asn1_test_lib:compile_all(["Def","Default"], Config, [Rule|Opts]),
+ asn1_test_lib:compile_all(["Def","Default"], Config,
+ [legacy_erlang_types,Rule|Opts]),
testDef:main(Rule),
testSeqSetDefaultVal:main(Rule, Opts).
@@ -766,7 +771,10 @@ testParameterizedInfObj(Config) ->
testParameterizedInfObj(Config, Rule, Opts) ->
Files = ["Param","Param2"],
asn1_test_lib:compile_all(Files, Config, [Rule|Opts]),
- testParameterizedInfObj:main(Config, Rule).
+ testParameterizedInfObj:main(Config, Rule),
+ asn1_test_lib:compile("Param", Config,
+ [legacy_erlang_types,Rule|Opts]),
+ testParameterizedInfObj:param(Rule).
testFragmented(Config) ->
test(Config, fun testFragmented/3).
@@ -784,7 +792,8 @@ testMergeCompile(Config, Rule, Opts) ->
testobj(Config) -> test(Config, fun testobj/3).
testobj(Config, Rule, Opts) ->
- asn1_test_lib:compile("RANAP", Config, [Rule|Opts]),
+ asn1_test_lib:compile("RANAP", Config, [legacy_erlang_types,
+ Rule|Opts]),
asn1_test_lib:compile_erlang("testobj", Config, []),
ok = testobj:run(),
ok = testParameterizedInfObj:ranap(Rule).
@@ -804,14 +813,15 @@ testExport(Config) ->
testImport(Config) ->
test(Config, fun testImport/3).
testImport(Config, Rule, Opts) ->
- {error, _} = asn1ct:compile(filename:join(?config(data_dir, Config),
- "ImportsFrom"),
- [Rule, {outdir, ?config(priv_dir, Config)}
- |Opts]).
+ Files = ["ImportsFrom","ImportsFrom2","ImportsFrom3"],
+ asn1_test_lib:compile_all(Files, Config, [Rule|Opts]),
+ 42 = 'ImportsFrom':i(),
+ ok.
testMegaco(Config) -> test(Config, fun testMegaco/3).
testMegaco(Config, Rule, Opts) ->
- {ok, Module1, Module2} = testMegaco:compile(Config, Rule, Opts),
+ {ok, Module1, Module2} = testMegaco:compile(Config, Rule,
+ [legacy_erlang_types|Opts]),
ok = testMegaco:main(Module1, Config),
ok = testMegaco:main(Module2, Config).
@@ -850,7 +860,7 @@ duplicate_tags(Config) ->
rtUI(Config) -> test(Config, fun rtUI/3).
rtUI(Config, Rule, Opts) ->
asn1_test_lib:compile("Prim", Config, [Rule|Opts]),
- {ok, _} = asn1rt:info('Prim'),
+ _ = 'Prim':info(),
Rule = 'Prim':encoding_rule(),
io:format("Default BIT STRING format: ~p\n",
['Prim':bit_string_format()]).
@@ -892,7 +902,8 @@ specialized_decodes(Config, Rule, Opts) ->
"PartialDecMyHTTP.asn",
"MEDIA-GATEWAY-CONTROL.asn",
"P-Record"],
- Config, [Rule, asn1config|Opts]),
+ Config,
+ [Rule,legacy_erlang_types,asn1config|Opts]),
test_partial_incomplete_decode:test(Config),
test_selective_decode:test().
@@ -1022,7 +1033,8 @@ test_x691(Config, Rule, Opts) ->
test_x691:cases(Rule),
%% OTP-7708.
- asn1_test_lib:compile("EUTRA-extract-55", Config, [Rule|Opts]),
+ asn1_test_lib:compile("EUTRA-extract-55", Config,
+ [legacy_erlang_types,Rule|Opts]),
%% OTP-7763.
Val = {'Seq',15,lists:duplicate(8, 0),[0],lists:duplicate(28, 0),15,true},
@@ -1128,21 +1140,21 @@ END
ok = asn1ct:compile(File, [{outdir, PrivDir}]).
-timer_compile(Config, Rule, Opts) ->
+timer_compile(Config, Rule) ->
asn1_test_lib:compile_all(["H235-SECURITY-MESSAGES", "H323-MESSAGES"],
- Config, [Rule|Opts]).
+ Config, [no_ok_wrapper,Rule]).
testTimer_ber(Config) ->
- timer_compile(Config,ber,[]),
- testTimer:go(Config,ber).
+ timer_compile(Config, ber),
+ testTimer:go().
testTimer_per(Config) ->
- timer_compile(Config,per,[]),
- testTimer:go(Config,per).
+ timer_compile(Config, per),
+ testTimer:go().
testTimer_uper(Config) ->
- timer_compile(Config,uper,[]),
- {comment,_} = testTimer:go(Config,uper).
+ timer_compile(Config, uper),
+ testTimer:go().
%% Test of multiple-line comment, OTP-8043
testComment(suite) -> [];
@@ -1200,8 +1212,8 @@ ticket_7407_code(FinalPadding) ->
eutra1(msg) ->
{'BCCH-BCH-Message',
- {'MasterInformationBlock',[0,1,0,1],[1,0,1,0],
- {'PHICH-Configuration',short,ffs},[1,0,1,0,0,0,0,0]}}.
+ {'MasterInformationBlock',<<2#0101:4>>,<<2#1010:4>>,
+ {'PHICH-Configuration',short,ffs},<<2#10100000>>}}.
eutra1(result, true) ->
<<90,80,0>>;
diff --git a/lib/asn1/test/asn1_SUITE_data/EnumExt.asn1 b/lib/asn1/test/asn1_SUITE_data/EnumExt.asn1
index 8dc5f3d7e1..74fa97e7aa 100644
--- a/lib/asn1/test/asn1_SUITE_data/EnumExt.asn1
+++ b/lib/asn1/test/asn1_SUITE_data/EnumExt.asn1
@@ -18,6 +18,8 @@ Ext1 ::= ENUMERATED {
magenta(9)
}
+SubExt1 ::= Ext1 ( blue | orange | black )
+
Noext ::= ENUMERATED {
blue(0),
red(1),
diff --git a/lib/asn1/test/asn1_SUITE_data/INSTANCEOF.asn1 b/lib/asn1/test/asn1_SUITE_data/INSTANCEOF.asn1
index 8c4f3a8f7e..b4ea943040 100644
--- a/lib/asn1/test/asn1_SUITE_data/INSTANCEOF.asn1
+++ b/lib/asn1/test/asn1_SUITE_data/INSTANCEOF.asn1
@@ -16,7 +16,9 @@ Names ::= SEQUENCE {
thirdName [2] INSTANCE OF OTHER-NAME ({TI})
}
-OTHER-NAME ::= TYPE-IDENTIFIER
+OTHER-NAME ::= YET-ANOTHER-NAME
+
+YET-ANOTHER-NAME ::= TYPE-IDENTIFIER
TI OTHER-NAME ::= {{INTEGER IDENTIFIED BY {2 4}} |
{Seq IDENTIFIED BY {2 3 4}} |
diff --git a/lib/asn1/test/asn1_SUITE_data/ImportsFrom.asn1 b/lib/asn1/test/asn1_SUITE_data/ImportsFrom.asn1
index 896a35d627..32b8f75dde 100644
--- a/lib/asn1/test/asn1_SUITE_data/ImportsFrom.asn1
+++ b/lib/asn1/test/asn1_SUITE_data/ImportsFrom.asn1
@@ -1,16 +1,8 @@
-ImportsFrom DEFINITIONS ::=
-
+ImportsFrom DEFINITIONS AUTOMATIC TAGS ::=
BEGIN
-IMPORTS
-Type1, Type2, Type3
-FROM RemoteFile1 objid
-val1, val2, val3
-FROM RemoteFile2;
-
-objid OBJECT IDENTIFIER ::= {joint-iso-ccitt(2) remote-operations(4) notation(0)}
-
-LocalType ::= INTEGER
+IMPORTS Int FROM ImportsFrom2;
+i Int ::= 42
END
diff --git a/lib/asn1/test/asn1_SUITE_data/ImportsFrom2.asn1 b/lib/asn1/test/asn1_SUITE_data/ImportsFrom2.asn1
new file mode 100644
index 0000000000..b0c29d24ae
--- /dev/null
+++ b/lib/asn1/test/asn1_SUITE_data/ImportsFrom2.asn1
@@ -0,0 +1,7 @@
+ImportsFrom2 DEFINITIONS AUTOMATIC TAGS ::=
+BEGIN
+IMPORTS Int FROM ImportsFrom3;
+
+LocalDef ::= OCTET STRING
+
+END
diff --git a/lib/asn1/test/asn1_SUITE_data/ImportsFrom3.asn1 b/lib/asn1/test/asn1_SUITE_data/ImportsFrom3.asn1
new file mode 100644
index 0000000000..ca27b20697
--- /dev/null
+++ b/lib/asn1/test/asn1_SUITE_data/ImportsFrom3.asn1
@@ -0,0 +1,4 @@
+ImportsFrom3 DEFINITIONS AUTOMATIC TAGS ::=
+BEGIN
+ Int ::= INTEGER (0..63)
+END
diff --git a/lib/asn1/test/asn1_SUITE_data/SeqPrim.asn1 b/lib/asn1/test/asn1_SUITE_data/SeqPrim.asn1
index 20c4126c0b..7068674647 100644
--- a/lib/asn1/test/asn1_SUITE_data/SeqPrim.asn1
+++ b/lib/asn1/test/asn1_SUITE_data/SeqPrim.asn1
@@ -16,4 +16,11 @@ Seq ::= SEQUENCE
Empty ::= SEQUENCE {}
+Big ::= SEQUENCE {
+ ...,
+ os1 [1] OCTET STRING (SIZE (120..130)) OPTIONAL,
+ os2 [2] OCTET STRING (SIZE (128..256)) OPTIONAL,
+ os3 [3] OCTET STRING (SIZE (17000..30000)) OPTIONAL
+}
+
END
diff --git a/lib/asn1/test/asn1_SUITE_data/TCAPPackage_msg.erl b/lib/asn1/test/asn1_SUITE_data/TCAPPackage_msg.erl
index 06eba8b6eb..0bf4425263 100644
--- a/lib/asn1/test/asn1_SUITE_data/TCAPPackage_msg.erl
+++ b/lib/asn1/test/asn1_SUITE_data/TCAPPackage_msg.erl
@@ -47,7 +47,7 @@ val('TransactionPDU') ->
dialoguePortion=val('DialoguePortion'),
componentPortion=val('ComponentSequence')};
val('TransactionID') ->
- "OCTET STRING";
+ <<"OCTET STRING">>;
val('DialoguePortion') ->
#'DialoguePortion'{version=val('ProtocolVersion'),
applicationContext={integerApplicationId,12},
@@ -57,23 +57,23 @@ val('DialoguePortion') ->
val('Confidentiality') ->
#'Confidentiality'{confidentialityId={integerConfidentialityId,14}};
val('ProtocolVersion') ->
- "K";
+ <<"K">>;
val('UserInformation') ->
[val('EXTERNAL'),val('EXTERNAL')];
val('EXTERNAL') ->
#'EXTERNAL'{'direct-reference'={0,1,2},
- encoding={'single-ASN1-type',[1,2,3,4]}};
+ encoding={'single-ASN1-type',<<1,2,3,4>>}};
val('ComponentSequence') ->
[val('ComponentPDU',1),val('ComponentPDU',2),val('ComponentPDU',3)];
val('Invoke') ->
- #'Invoke'{componentIDs="AB",
+ #'Invoke'{componentIDs = <<"AB">>,
opcode={local,-2},
parameter=running};
val('ReturnResult') ->
- #'ReturnResult'{componentID="C",
+ #'ReturnResult'{componentID = <<"C">>,
parameter=[1,2,3,4]};
val('ReturnError') ->
- #'ReturnError'{componentID="D",
+ #'ReturnError'{componentID = <<"D">>,
errorCode={local,21},
parameter=true};
val('Abort') ->
@@ -87,8 +87,8 @@ val(Type) ->
check_result('PackageType',unidirectional,Res) ->
{unidirectional,
{'UniTransactionPDU',
- "OCTET STRING",
- {'DialoguePortion',"K",
+ <<"OCTET STRING">>,
+ {'DialoguePortion',<<"K">>,
{integerApplicationId,12},
[_,%{'EXTERNAL',{syntax,{0,1,2}},asn1_NOVALUE,OTVal},
_],%{'EXTERNAL',{syntax,{0,1,2}},asn1_NOVALUE,OTVal}],
@@ -96,14 +96,14 @@ check_result('PackageType',unidirectional,Res) ->
{'Confidentiality',
{integerConfidentialityId,14}}},
[{invokeLast,
- {_,"AB",{local,-2},running}},
- {returnResultLast,{_,"C",_}},
- {returnError,{_,"D",{local,21},true}}]}} = Res,
+ {_,<<"AB">>,{local,-2},running}},
+ {returnResultLast,{_,<<"C">>,_}},
+ {returnError,{_,<<"D">>,{local,21},true}}]}} = Res,
ok;
%% check_OT_val(OTVal);
check_result('PackageType',abort,Res)->
- {abort,{'Abort',"OCTET STRING",
- {'DialoguePortion',"K",
+ {abort,{'Abort',<<"OCTET STRING">>,
+ {'DialoguePortion',<<"K">>,
{integerApplicationId,12},
[_,%{'EXTERNAL',{syntax,{0,1,2}},asn1_NOVALUE,OTVal},
_],%{'EXTERNAL',{syntax,{0,1,2}},asn1_NOVALUE,OTVal}],
@@ -114,9 +114,9 @@ check_result('PackageType',abort,Res)->
ok;
%% check_OT_val(OTVal);
check_result('PackageType',response,Res) ->
- {response,{'TransactionPDU',"OCTET STRING",
+ {response,{'TransactionPDU',<<"OCTET STRING">>,
{'DialoguePortion',
- "K",
+ <<"K">>,
{integerApplicationId,12},
[_,%{'EXTERNAL',{syntax,{0,1,2}},asn1_NOVALUE,OTVal},
_],%{'EXTERNAL',{syntax,{0,1,2}},asn1_NOVALUE,OTVal}],
@@ -124,11 +124,11 @@ check_result('PackageType',response,Res) ->
{'Confidentiality',
{integerConfidentialityId,14}}},
[{invokeLast,
- {_,"AB",{local,-2},running}},
+ {_,<<"AB">>,{local,-2},running}},
{returnResultLast,
- {_,"C",_}},
+ {_,<<"C">>,_}},
{returnError,
- {_,"D",{local,21},true}}]}} = Res,
+ {_,<<"D">>,{local,21},true}}]}} = Res,
ok.
%% check_OT_val(OTVal).
diff --git a/lib/asn1/test/asn1_SUITE_data/extensionAdditionGroup.erl b/lib/asn1/test/asn1_SUITE_data/extensionAdditionGroup.erl
index 8e21e6ca84..a1e563f6be 100644
--- a/lib/asn1/test/asn1_SUITE_data/extensionAdditionGroup.erl
+++ b/lib/asn1/test/asn1_SUITE_data/extensionAdditionGroup.erl
@@ -67,8 +67,8 @@ run3(Erule) ->
asn1_NOVALUE,asn1_NOVALUE,asn1_NOVALUE,asn1_NOVALUE,asn1_NOVALUE,
asn1_NOVALUE,asn1_NOVALUE},
asn1_NOVALUE,
- [[80,66,0,5,10,0,5,0,24,11,7,84,54,33,0,1,1,0,0,0,1,39,5,66,127,0,0,1],
- []],
+ [<<80,66,0,5,10,0,5,0,24,11,7,84,54,33,0,1,1,0,0,0,1,39,5,66,127,0,0,1>>,
+ <<>>],
{'RRC-RadioResourceConfigDedicated',
[{'RRC-SRB-ToAddMod',1,
{explicitValue,
diff --git a/lib/asn1/test/asn1_appup_test.erl b/lib/asn1/test/asn1_appup_test.erl
index a2c1423eda..7391959645 100644
--- a/lib/asn1/test/asn1_appup_test.erl
+++ b/lib/asn1/test/asn1_appup_test.erl
@@ -21,8 +21,8 @@
%% Purpose: Verify the application specifics of the asn1 application
%%----------------------------------------------------------------------
-module(asn1_appup_test).
--compile({no_auto_import,[error/1]}).
-compile(export_all).
+-include_lib("common_test/include/ct.hrl").
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
@@ -44,16 +44,9 @@ end_per_group(_GroupName, Config) ->
init_per_suite(suite) -> [];
init_per_suite(doc) -> [];
init_per_suite(Config) when is_list(Config) ->
- AppFile = file_name(asn1, ".app"),
- AppupFile = file_name(asn1, ".appup"),
- [{app_file, AppFile}, {appup_file, AppupFile}|Config].
+ Config.
-file_name(App, Ext) ->
- LibDir = code:lib_dir(App),
- filename:join([LibDir, "ebin", atom_to_list(App) ++ Ext]).
-
-
end_per_suite(suite) -> [];
end_per_suite(doc) -> [];
end_per_suite(Config) when is_list(Config) ->
@@ -62,349 +55,7 @@ end_per_suite(Config) when is_list(Config) ->
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
-appup(suite) ->
- [];
-appup(doc) ->
- "perform a simple check of the appup file";
+appup() ->
+ [{doc, "perform a simple check of the asn1 appup file"}].
appup(Config) when is_list(Config) ->
- AppupFile = key1search(appup_file, Config),
- AppFile = key1search(app_file, Config),
- Modules = modules(AppFile),
- check_appup(AppupFile, Modules).
-
-modules(File) ->
- case file:consult(File) of
- {ok, [{application,asn1,Info}]} ->
- case lists:keysearch(modules,1,Info) of
- {value, {modules, Modules}} ->
- Modules;
- false ->
- fail({bad_appinfo, Info})
- end;
- Error ->
- fail({bad_appfile, Error})
- end.
-
-
-check_appup(AppupFile, Modules) ->
- case file:consult(AppupFile) of
- {ok, [{V, UpFrom, DownTo}]} ->
- io:format("V= ~p, UpFrom= ~p, DownTo= ~p, Modules= ~p~n",
- [V, UpFrom, DownTo, Modules]),
- check_appup(V, UpFrom, DownTo, Modules);
- Else ->
- fail({bad_appupfile, Else})
- end.
-
-
-check_appup(V, UpFrom, DownTo, Modules) ->
- check_version(V),
- check_depends(up, UpFrom, Modules),
- check_depends(down, DownTo, Modules),
- ok.
-
-
-check_depends(_, [], _) ->
- ok;
-check_depends(UpDown, [Dep|Deps], Modules) ->
- check_depend(UpDown, Dep, Modules),
- check_depends(UpDown, Deps, Modules).
-
-
-check_depend(up,I={add_application,_App},Modules) ->
- d("check_instructions(~w) -> entry with"
- "~n Instruction: ~p"
- "~n Modules: ~p", [up,I , Modules]),
- ok;
-check_depend(down,I={remove_application,_App},Modules) ->
- d("check_instructions(~w) -> entry with"
- "~n Instruction: ~p"
- "~n Modules: ~p", [down,I , Modules]),
- ok;
-check_depend(UpDown, {V, Instructions}, Modules) ->
- d("check_instructions(~w) -> entry with"
- "~n V: ~p"
- "~n Modules: ~p", [UpDown, V, Modules]),
- check_version(V),
- case check_instructions(UpDown,
- Instructions, Instructions, [], [], Modules) of
- {_Good, []} ->
- ok;
- {_, Bad} ->
- fail({bad_instructions, Bad, UpDown})
- end.
-
-
-check_instructions(_, [], _, Good, Bad, _) ->
- {lists:reverse(Good), lists:reverse(Bad)};
-check_instructions(UpDown, [Instr|Instrs], AllInstr, Good, Bad, Modules) ->
- d("check_instructions(~w) -> entry with"
- "~n Instr: ~p", [UpDown,Instr]),
- case (catch check_instruction(UpDown, Instr, AllInstr, Modules)) of
- ok ->
- check_instructions(UpDown, Instrs, AllInstr,
- [Instr|Good], Bad, Modules);
- {error, Reason} ->
- d("check_instructions(~w) -> bad instruction: "
- "~n Reason: ~p", [UpDown,Reason]),
- check_instructions(UpDown, Instrs, AllInstr, Good,
- [{Instr, Reason}|Bad], Modules)
- end.
-
-%% A new module is added
-check_instruction(up, {add_module, Module}, _, Modules)
- when is_atom(Module) ->
- d("check_instruction -> entry when up-add_module instruction with"
- "~n Module: ~p", [Module]),
- check_module(Module, Modules);
-
-%% An old module is re-added
-check_instruction(down, {add_module, Module}, _, Modules)
- when is_atom(Module) ->
- d("check_instruction -> entry when down-add_module instruction with"
- "~n Module: ~p", [Module]),
- case (catch check_module(Module, Modules)) of
- {error, {unknown_module, Module, Modules}} ->
- ok;
- ok ->
- error({existing_readded_module, Module})
- end;
-
-%% Removing a module on upgrade:
-%% - the module has been removed from the app-file.
-%% - check that no module depends on this (removed) module
-check_instruction(up, {remove, {Module, Pre, Post}}, _, Modules)
- when is_atom(Module), is_atom(Pre), is_atom(Post) ->
- d("check_instruction -> entry when up-remove instruction with"
- "~n Module: ~p"
- "~n Pre: ~p"
- "~n Post: ~p", [Module, Pre, Post]),
- case (catch check_module(Module, Modules)) of
- {error, {unknown_module, Module, Modules}} ->
- check_purge(Pre),
- check_purge(Post);
- ok ->
- error({existing_removed_module, Module})
- end;
-
-%% Removing a module on downgrade: the module exist
-%% in the app-file.
-check_instruction(down, {remove, {Module, Pre, Post}}, AllInstr, Modules)
- when is_atom(Module), is_atom(Pre), is_atom(Post) ->
- d("check_instruction -> entry when down-remove instruction with"
- "~n Module: ~p"
- "~n Pre: ~p"
- "~n Post: ~p", [Module, Pre, Post]),
- case (catch check_module(Module, Modules)) of
- ok ->
- check_purge(Pre),
- check_purge(Post),
- check_no_remove_depends(Module, AllInstr);
- {error, {unknown_module, Module, Modules}} ->
- error({nonexisting_removed_module, Module})
- end;
-
-check_instruction(_, {load_module, Module, Pre, Post, Depend},
- AllInstr, Modules)
- when is_atom(Module), is_atom(Pre), is_atom(Post), is_list(Depend) ->
- d("check_instruction -> entry when load_module instruction with"
- "~n Module: ~p"
- "~n Pre: ~p"
- "~n Post: ~p"
- "~n Depend: ~p", [Module, Pre, Post, Depend]),
- check_module(Module, Modules),
- check_module_depend(Module, Depend, Modules),
- check_module_depend(Module, Depend, updated_modules(AllInstr, [])),
- check_purge(Pre),
- check_purge(Post);
-
-check_instruction(_, {update, Module, Change, Pre, Post, Depend},
- AllInstr, Modules)
- when is_atom(Module), is_atom(Pre), is_atom(Post), is_list(Depend) ->
- d("check_instruction -> entry when update instruction with"
- "~n Module: ~p"
- "~n Change: ~p"
- "~n Pre: ~p"
- "~n Post: ~p"
- "~n Depend: ~p", [Module, Change, Pre, Post, Depend]),
- check_module(Module, Modules),
- check_module_depend(Module, Depend, Modules),
- check_module_depend(Module, Depend, updated_modules(AllInstr, [])),
- check_change(Change),
- check_purge(Pre),
- check_purge(Post);
-
-check_instruction(_, {apply, {Module, Function, Args}},
- _AllInstr, Modules)
- when is_atom(Module), is_atom(Function), is_list(Args) ->
- d("check_instruction -> entry when apply instruction with"
- "~n Module: ~p"
- "~n Function: ~p"
- "~n Args: ~p", [Module, Function, Args]),
- check_module(Module, Modules),
- check_apply(Module,Function,Args);
-
-check_instruction(_, Instr, _AllInstr, _Modules) ->
- d("check_instruction -> entry when unknown instruction with"
- "~n Instr: ~p", [Instr]),
- error({error, {unknown_instruction, Instr}}).
-
-
-%% If Module X depends on Module Y, then module Y must have an update
-%% instruction of some sort (otherwise the depend is faulty).
-updated_modules([], Modules) ->
- d("update_modules -> entry when done with"
- "~n Modules: ~p", [Modules]),
- Modules;
-updated_modules([Instr|Instrs], Modules) ->
- d("update_modules -> entry with"
- "~n Instr: ~p"
- "~n Modules: ~p", [Instr,Modules]),
- Module = instruction_module(Instr),
- d("update_modules -> Module: ~p", [Module]),
- updated_modules(Instrs, [Module|Modules]).
-
-instruction_module({add_module, Module}) ->
- Module;
-instruction_module({remove, {Module, _, _}}) ->
- Module;
-instruction_module({load_module, Module, _, _, _}) ->
- Module;
-instruction_module({update, Module, _, _, _, _}) ->
- Module;
-instruction_module({apply, {Module, _, _}}) ->
- Module;
-instruction_module(Instr) ->
- d("instruction_module -> entry when unknown instruction with"
- "~n Instr: ~p", [Instr]),
- error({error, {unknown_instruction, Instr}}).
-
-%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
-
-check_version(V) when is_list(V) ->
- ok;
-check_version(V) ->
- error({bad_version, V}).
-
-
-check_module(M, Modules) when is_atom(M) ->
- case lists:member(M,Modules) of
- true ->
- ok;
- false ->
- error({unknown_module, M, Modules})
- end;
-check_module(M, _) ->
- error({bad_module, M}).
-
-check_apply(Module,Function,Args) ->
- case (catch Module:module_info()) of
- Info when is_list(Info) ->
- check_exported(Function,Args,Info);
- {'EXIT',{undef,_}} ->
- error({not_existing_module,Module})
- end.
-
-check_exported(Function,Args,Info) ->
- case lists:keysearch(exports,1,Info) of
- {value,{exports,FunList}} ->
- case lists:keysearch(Function,1,FunList) of
- {value,{_,Arity}} when Arity==length(Args) ->
- ok;
- _ ->
- error({not_exported_function,Function,length(Args)})
- end;
- _ ->
- error({bad_export,Info})
- end.
-
-check_module_depend(M, [], _) when is_atom(M) ->
- d("check_module_depend -> entry with"
- "~n M: ~p", [M]),
- ok;
-check_module_depend(M, Deps, Modules) when is_atom(M), is_list(Deps) ->
- d("check_module_depend -> entry with"
- "~n M: ~p"
- "~n Deps: ~p"
- "~n Modules: ~p", [M, Deps, Modules]),
- case [Dep || Dep <- Deps, lists:member(Dep, Modules) == false] of
- [] ->
- ok;
- Unknown ->
- error({unknown_depend_modules, Unknown})
- end;
-check_module_depend(_M, D, _Modules) ->
- d("check_module_depend -> entry when bad depend with"
- "~n D: ~p", [D]),
- error({bad_depend, D}).
-
-
-check_no_remove_depends(_Module, []) ->
- ok;
-check_no_remove_depends(Module, [Instr|Instrs]) ->
- check_no_remove_depend(Module, Instr),
- check_no_remove_depends(Module, Instrs).
-
-check_no_remove_depend(Module, {load_module, Mod, _Pre, _Post, Depend}) ->
- case lists:member(Module, Depend) of
- true ->
- error({removed_module_in_depend, load_module, Mod, Module});
- false ->
- ok
- end;
-check_no_remove_depend(Module, {update, Mod, _Change, _Pre, _Post, Depend}) ->
- case lists:member(Module, Depend) of
- true ->
- error({removed_module_in_depend, update, Mod, Module});
- false ->
- ok
- end;
-check_no_remove_depend(_, _) ->
- ok.
-
-
-check_change(soft) ->
- ok;
-check_change({advanced, _Something}) ->
- ok;
-check_change(Change) ->
- error({bad_change, Change}).
-
-
-check_purge(soft_purge) ->
- ok;
-check_purge(brutal_purge) ->
- ok;
-check_purge(Purge) ->
- error({bad_purge, Purge}).
-
-
-
-%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
-
-error(Reason) ->
- throw({error, Reason}).
-
-fail(Reason) ->
- exit({suite_failed, Reason}).
-
-key1search(Key, L) ->
- case lists:keysearch(Key, 1, L) of
- undefined ->
- fail({not_found, Key, L});
- {value, {Key, Value}} ->
- Value
- end.
-
-
-%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
-
-d(F, A) ->
- d(false, F, A).
-
-d(true, F, A) ->
- io:format(F ++ "~n", A);
-d(_, _, _) ->
- ok.
-
-
+ ok = ?t:appup_test(asn1).
diff --git a/lib/asn1/test/error_SUITE.erl b/lib/asn1/test/error_SUITE.erl
index 6451f81c01..8a0414708d 100644
--- a/lib/asn1/test/error_SUITE.erl
+++ b/lib/asn1/test/error_SUITE.erl
@@ -19,7 +19,8 @@
-module(error_SUITE).
-export([suite/0,all/0,groups/0,
- already_defined/1,enumerated/1,objects/1]).
+ already_defined/1,bitstrings/1,enumerated/1,
+ imports/1,instance_of/1,integers/1,objects/1,values/1]).
-include_lib("test_server/include/test_server.hrl").
@@ -29,9 +30,15 @@ all() ->
[{group,p}].
groups() ->
- [{p,parallel(),[already_defined,
- enumerated,
- objects]}].
+ [{p,parallel(),
+ [already_defined,
+ bitstrings,
+ enumerated,
+ imports,
+ instance_of,
+ integers,
+ objects,
+ values]}].
parallel() ->
case erlang:system_info(schedulers) > 1 of
@@ -68,6 +75,23 @@ already_defined(Config) ->
} = run(P, Config),
ok.
+bitstrings(Config) ->
+ M = 'Bitstrings',
+ P = {M,
+ <<"Bitstrings DEFINITIONS AUTOMATIC TAGS ::= BEGIN\n"
+ " Bs1 ::= BIT STRING {a(1), a(1)}\n"
+ " Bs2 ::= BIT STRING {a(1), b(2), a(3)}\n"
+ " Bs3 ::= BIT STRING {x(1), y(1)}\n"
+ " Bs4 ::= BIT STRING {x(-1), y(0)}\n"
+ "END\n">>},
+ {error,
+ [{structured_error,{M,2},asn1ct_check,{namelist_redefinition,a}},
+ {structured_error,{M,3},asn1ct_check,{namelist_redefinition,a}},
+ {structured_error,{M,4},asn1ct_check,{value_reused,1}},
+ {structured_error,{M,5},asn1ct_check,{invalid_bit_number,-1}}
+ ]} = run(P, Config),
+ ok.
+
enumerated(Config) ->
M = 'Enumerated',
P = {M,
@@ -96,6 +120,63 @@ enumerated(Config) ->
} = run(P, Config),
ok.
+imports(Config) ->
+ Ext = 'ExternalModule',
+ ExtP = {Ext,
+ <<"ExternalModule DEFINITIONS AUTOMATIC TAGS ::= BEGIN\n"
+ "END\n">>},
+ ok = run(ExtP, Config),
+
+ M = 'Imports',
+ P = {M,
+ <<"Imports DEFINITIONS AUTOMATIC TAGS ::= BEGIN\n"
+ "IMPORTS NotDefined FROM ExternalModule\n"
+ "X FROM UndefinedModule objid\n"
+ "Y, Z FROM UndefinedModule2;\n"
+ "objid OBJECT IDENTIFIER ::= {joint-iso-ccitt(2) remote-operations(4)\n"
+ " notation(0)}\n"
+ "END\n">>},
+ {error,[{structured_error,{M,2},asn1ct_check,
+ {undefined_import,'NotDefined','ExternalModule'}},
+ {structured_error,{M,3},asn1ct_check,{undefined_import,'X','UndefinedModule'}},
+ {structured_error,{M,4},asn1ct_check,{undefined_import,'Y','UndefinedModule2'}},
+ {structured_error,{M,4},asn1ct_check,{undefined_import,'Z','UndefinedModule2'}}
+ ]} = run(P, Config),
+ ok.
+
+instance_of(Config) ->
+ M = 'InstanceOf',
+ P = {M,
+ <<"InstanceOf DEFINITIONS AUTOMATIC TAGS ::= BEGIN\n"
+ "XX ::= INSTANCE OF CL ({TI})\n"
+ "CL ::= CLASS {\n"
+ "&id INTEGER,\n"
+ "&Type\n"
+ "}\n"
+ "o1 CL ::= {&id 1, &Type OCTET STRING}\n"
+ "TI CL ::= { o1 }\n"
+ "END\n">>},
+ {error,
+ [{structured_error,{M,2},asn1ct_check,{illegal_instance_of,'CL'}}
+ ]} = run(P, Config),
+ ok.
+
+integers(Config) ->
+ M = 'Integers',
+ P = {M,
+ <<"Integers DEFINITIONS AUTOMATIC TAGS ::= BEGIN\n"
+ " Int1 ::= INTEGER {a(1), a(1)}\n"
+ " Int2 ::= INTEGER {a(1), b(2), a(3)}\n"
+ " Int3 ::= INTEGER {x(1), y(1)}\n"
+ "END\n">>},
+ {error,
+ [{structured_error,{M,2},asn1ct_check,{namelist_redefinition,a}},
+ {structured_error,{M,3},asn1ct_check,{namelist_redefinition,a}},
+ {structured_error,{M,4},asn1ct_check,{value_reused,1}}
+ ]} = run(P, Config),
+ ok.
+
+
objects(Config) ->
M = 'Objects',
P = {M,
@@ -138,6 +219,25 @@ objects(Config) ->
} = run(P, Config),
ok.
+values(Config) ->
+ M = 'Values',
+ P = {M,
+ <<"Values DEFINITIONS AUTOMATIC TAGS ::= BEGIN\n"
+ " os1 OCTET STRING ::= \"abc\"\n"
+ " os2 OCTET STRING ::= 42\n"
+ " os3 OCTET STRING ::= { 1, 3 }\n"
+ "END\n">>},
+ {error,
+ [
+ {structured_error,{M,2},asn1ct_check,
+ illegal_octet_string_value},
+ {structured_error,{M,3},asn1ct_check,
+ illegal_octet_string_value},
+ {structured_error,{M,4},asn1ct_check,
+ illegal_octet_string_value}
+ ]
+ } = run(P, Config),
+ ok.
run({Mod,Spec}, Config) ->
diff --git a/lib/asn1/test/h323test.erl b/lib/asn1/test/h323test.erl
index 3baaa994ea..7577928493 100644
--- a/lib/asn1/test/h323test.erl
+++ b/lib/asn1/test/h323test.erl
@@ -42,7 +42,7 @@ alerting_val() ->
{'TerminalInfo',asn1_NOVALUE},
false,false},
asn1_NOVALUE,
- {'CallIdentifier',[0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0]},
+ {'CallIdentifier',<<0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0>>},
asn1_NOVALUE,asn1_NOVALUE,asn1_NOVALUE,asn1_NOVALUE}},
asn1_NOVALUE,asn1_NOVALUE,asn1_NOVALUE,asn1_NOVALUE,asn1_NOVALUE},
asn1_NOVALUE}.
@@ -57,18 +57,18 @@ connect_val() ->
{'Connect-UUIE',
{0,0,8,2250,0,2},
{ipAddress,
- {'TransportAddress_ipAddress',[136,225,41,58],1187}},
+ {'TransportAddress_ipAddress',<<136,225,41,58>>,1187}},
{'EndpointType',asn1_NOVALUE,
{'VendorIdentifier',
{'H221NonStandard',181,0,21324},
- [77,105,99,114,111,115,111,102,116,174,32,78,101,116,
- 77,101,100,116,105,110,103,174,0],
- [51,46,48,0]},
+ <<77,105,99,114,111,115,111,102,116,174,32,78,101,116,
+ 77,101,100,116,105,110,103,174,0>>,
+ <<51,46,48,0>>},
asn1_NOVALUE,asn1_NOVALUE,asn1_NOVALUE,
{'TerminalInfo',asn1_NOVALUE},
false,false},
- [22,137,237,197,191,35,211,17,140,45,0,192,79,75,28,208],
- {'CallIdentifier',[0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0]},
+ <<22,137,237,197,191,35,211,17,140,45,0,192,79,75,28,208>>,
+ {'CallIdentifier',<<0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0>>},
asn1_NOVALUE,asn1_NOVALUE,asn1_NOVALUE,asn1_NOVALUE}},
asn1_NOVALUE,asn1_NOVALUE,asn1_NOVALUE,asn1_NOVALUE,asn1_NOVALUE},
asn1_NOVALUE}.
diff --git a/lib/asn1/test/testChoExtension.erl b/lib/asn1/test/testChoExtension.erl
index e54cbe825b..09e19ceebb 100644
--- a/lib/asn1/test/testChoExtension.erl
+++ b/lib/asn1/test/testChoExtension.erl
@@ -31,13 +31,13 @@ extension(_Rules) ->
%% A trick to encode with another compatible CHOICE type to test reception
%% extension alternative
- roundtrip('ChoExt1x', {str,"abc"}),
+ roundtrip('ChoExt1x', {str,<<"abc">>}),
roundtrip('ChoExt2', {bool,true}),
roundtrip('ChoExt2', {int,33}),
roundtrip('ChoExt3', {bool,true}),
roundtrip('ChoExt3', {int,33}),
- roundtrip('ChoExt4', {str,"abc"}),
+ roundtrip('ChoExt4', {str,<<"abc">>}),
roundtrip('ChoEmptyRoot', {bool,false}),
roundtrip('ChoEmptyRoot', {bool,true}),
diff --git a/lib/asn1/test/testChoExternal.erl b/lib/asn1/test/testChoExternal.erl
index 12abdbb2bc..0914d54f33 100644
--- a/lib/asn1/test/testChoExternal.erl
+++ b/lib/asn1/test/testChoExternal.erl
@@ -31,16 +31,16 @@ external(_Rules) ->
roundtrip('ChoXBool', {xboolImp,true}),
roundtrip('ChoXBool', {xboolExp,true}),
- roundtrip('NT', {os,"kalle"}),
- roundtrip('Exp', {os,"kalle"}),
- roundtrip('NTNT', {os,"kalle"}),
- roundtrip('NTExp', {os,"kalle"}),
- roundtrip('ExpNT', {os,"kalle"}),
- roundtrip('ExpExp', {os,"kalle"}),
- roundtrip('XNTNT', {os,"kalle"}),
- roundtrip('XNTExp', {os,"kalle"}),
- roundtrip('XExpNT', {os,"kalle"}),
- roundtrip('XExpExp', {os,"kalle"}),
+ roundtrip('NT', {os,<<"kalle">>}),
+ roundtrip('Exp', {os,<<"kalle">>}),
+ roundtrip('NTNT', {os,<<"kalle">>}),
+ roundtrip('NTExp', {os,<<"kalle">>}),
+ roundtrip('ExpNT', {os,<<"kalle">>}),
+ roundtrip('ExpExp', {os,<<"kalle">>}),
+ roundtrip('XNTNT', {os,<<"kalle">>}),
+ roundtrip('XNTExp', {os,<<"kalle">>}),
+ roundtrip('XExpNT', {os,<<"kalle">>}),
+ roundtrip('XExpExp', {os,<<"kalle">>}),
ok.
diff --git a/lib/asn1/test/testChoOptional.erl b/lib/asn1/test/testChoOptional.erl
index f5e77cb721..71a7346e3f 100644
--- a/lib/asn1/test/testChoOptional.erl
+++ b/lib/asn1/test/testChoOptional.erl
@@ -27,16 +27,20 @@
run() ->
roundtrip('Seq1', #'Seq1'{bool=true,int=asn1_NOVALUE,cho=asn1_NOVALUE}),
roundtrip('Seq1', #'Seq1'{bool=true,int=233,cho=asn1_NOVALUE}),
- roundtrip('Seq1', #'Seq1'{bool=true,int=asn1_NOVALUE,cho={vsCho,"Vs Str"}}),
- roundtrip('Seq1', #'Seq1'{bool=true,int=asn1_NOVALUE,cho={ocStrCho,"Oct Str"}}),
+ roundtrip('Seq1', #'Seq1'{bool=true,int=asn1_NOVALUE,
+ cho={vsCho,"Vs Str"}}),
+ roundtrip('Seq1', #'Seq1'{bool=true,int=asn1_NOVALUE,
+ cho={ocStrCho,<<"Oct Str">>}}),
roundtrip('Seq2', #'Seq2'{int=asn1_NOVALUE,cho=asn1_NOVALUE,bool=true}),
roundtrip('Seq2', #'Seq2'{int=233,cho=asn1_NOVALUE,bool=true}),
roundtrip('Seq2', #'Seq2'{int=asn1_NOVALUE,cho={vsCho,"Vs Str"},bool=true}),
- roundtrip('Seq2', #'Seq2'{int=asn1_NOVALUE,cho={ocStrCho,"Oct Str"},bool=true}),
+ roundtrip('Seq2', #'Seq2'{int=asn1_NOVALUE,cho={ocStrCho,<<"Oct Str">>},
+ bool=true}),
roundtrip('Seq3', #'Seq3'{cho=asn1_NOVALUE,int=asn1_NOVALUE,bool=true}),
roundtrip('Seq3', #'Seq3'{cho=asn1_NOVALUE,int=233,bool=true}),
roundtrip('Seq3', #'Seq3'{cho={vsCho,"Vs Str"},int=asn1_NOVALUE,bool=true}),
- roundtrip('Seq3', #'Seq3'{cho={ocStrCho,"Oct Str"},int=asn1_NOVALUE,bool=true}),
+ roundtrip('Seq3', #'Seq3'{cho={ocStrCho,<<"Oct Str">>},
+ int=asn1_NOVALUE,bool=true}),
ok.
roundtrip(Type, Value) ->
diff --git a/lib/asn1/test/testChoRecursive.erl b/lib/asn1/test/testChoRecursive.erl
index 593b845949..ccd60c2897 100644
--- a/lib/asn1/test/testChoRecursive.erl
+++ b/lib/asn1/test/testChoRecursive.erl
@@ -31,13 +31,13 @@ recursive(_Rules) ->
roundtrip('ChoRec',
{something,
#'ChoRec_something'{a = 77,
- b = "some octets here",
+ b = <<"some octets here">>,
c = {nothing,'NULL'}}}),
roundtrip('ChoRec', {nothing,'NULL'}),
roundtrip('ChoRec2',
{something,
#'ChoRec2_something'{a = 77,
- b = "some octets here",
+ b = <<"some octets here">>,
c = {nothing,'NULL'}}}),
roundtrip('ChoRec2', {nothing,'NULL'}),
ok.
diff --git a/lib/asn1/test/testChoTypeRefCho.erl b/lib/asn1/test/testChoTypeRefCho.erl
index cd2672add0..636c301403 100644
--- a/lib/asn1/test/testChoTypeRefCho.erl
+++ b/lib/asn1/test/testChoTypeRefCho.erl
@@ -30,7 +30,7 @@ choice(_Rules) ->
roundtrip('ChoTRcho', {'choChoE-E',{choInt,88}}),
roundtrip('ChoChoInline', {bool1,true}),
roundtrip('ChoChoInline', {choCho,{bool,true}}),
- roundtrip('ChoChoInline', {choCho,{octStr,"kk"}}),
+ roundtrip('ChoChoInline', {choCho,{octStr,<<"kk">>}}),
roundtrip('ChoChoInline', {choCho,{int,55}}),
ok.
diff --git a/lib/asn1/test/testChoTypeRefPrim.erl b/lib/asn1/test/testChoTypeRefPrim.erl
index 8a2bc7bd8e..747baeddd8 100644
--- a/lib/asn1/test/testChoTypeRefPrim.erl
+++ b/lib/asn1/test/testChoTypeRefPrim.erl
@@ -25,18 +25,18 @@
prim(_Rules) ->
roundtrip('ChoTR', {bool,true}),
- roundtrip('ChoTR', {octStr,[11,12,13,14,15,16,17]}),
+ roundtrip('ChoTR', {octStr,<<11,12,13,14,15,16,17>>}),
roundtrip('ChoTR', {int,233}),
- roundtrip('ChoTR', {octStr,"Stringing in the rain"}),
- roundtrip('ChoTR2', {octStr,"A string"}),
- roundtrip('ChoTR2', {octStrI,"A string"}),
- roundtrip('ChoTR2', {octStrE,"A string"}),
- roundtrip('ChoTR2', {'octStr-I',"A string"}),
- roundtrip('ChoTR2', {'octStrI-I',"A string"}),
- roundtrip('ChoTR2', {'octStrE-I',"A string"}),
- roundtrip('ChoTR2', {'octStr-E',"A string"}),
- roundtrip('ChoTR2', {'octStrI-E',"A string"}),
- roundtrip('ChoTR2', {'octStrE-E',"A string"}),
+ roundtrip('ChoTR', {octStr,<<"Stringing in the rain">>}),
+ roundtrip('ChoTR2', {octStr,<<"A string">>}),
+ roundtrip('ChoTR2', {octStrI,<<"A string">>}),
+ roundtrip('ChoTR2', {octStrE,<<"A string">>}),
+ roundtrip('ChoTR2', {'octStr-I',<<"A string">>}),
+ roundtrip('ChoTR2', {'octStrI-I',<<"A string">>}),
+ roundtrip('ChoTR2', {'octStrE-I',<<"A string">>}),
+ roundtrip('ChoTR2', {'octStr-E',<<"A string">>}),
+ roundtrip('ChoTR2', {'octStrI-E',<<"A string">>}),
+ roundtrip('ChoTR2', {'octStrE-E',<<"A string">>}),
ok.
roundtrip(Type, Value) ->
diff --git a/lib/asn1/test/testChoTypeRefSeq.erl b/lib/asn1/test/testChoTypeRefSeq.erl
index 86c22619aa..91d0b45e89 100644
--- a/lib/asn1/test/testChoTypeRefSeq.erl
+++ b/lib/asn1/test/testChoTypeRefSeq.erl
@@ -28,15 +28,24 @@
-record('ChoSeqExp', {seqInt, seqOs}).
seq(_Rules) ->
- roundtrip('ChoTRseq', {choSeq,#'ChoSeq'{seqInt=88,seqOs="A string"}}),
- roundtrip('ChoTRseq', {choSeqI,#'ChoSeq'{seqInt=88,seqOs="A string"}}),
- roundtrip('ChoTRseq', {choSeqE,#'ChoSeq'{seqInt=88,seqOs="A string"}}),
- roundtrip('ChoTRseq', {'choSeq-I',#'ChoSeqImp'{seqInt=88,seqOs="A string"}}),
- roundtrip('ChoTRseq', {'choSeqI-I',#'ChoSeqImp'{seqInt=88,seqOs="A string"}}),
- roundtrip('ChoTRseq', {'choSeqE-I',#'ChoSeqImp'{seqInt=88,seqOs="A string"}}),
- roundtrip('ChoTRseq', {'choSeq-E',#'ChoSeqExp'{seqInt=88,seqOs="A string"}}),
- roundtrip('ChoTRseq', {'choSeqI-E',#'ChoSeqExp'{seqInt=88,seqOs="A string"}}),
- roundtrip('ChoTRseq', {'choSeqE-E',#'ChoSeqExp'{seqInt=88,seqOs="A string"}}),
+ roundtrip('ChoTRseq', {choSeq,#'ChoSeq'{seqInt=88,
+ seqOs = <<"A string">>}}),
+ roundtrip('ChoTRseq', {choSeqI,#'ChoSeq'{seqInt=88,
+ seqOs = <<"A string">>}}),
+ roundtrip('ChoTRseq', {choSeqE,#'ChoSeq'{seqInt=88,
+ seqOs = <<"A string">>}}),
+ roundtrip('ChoTRseq', {'choSeq-I',#'ChoSeqImp'{seqInt=88,
+ seqOs = <<"A string">>}}),
+ roundtrip('ChoTRseq', {'choSeqI-I',#'ChoSeqImp'{seqInt=88,
+ seqOs = <<"A string">>}}),
+ roundtrip('ChoTRseq', {'choSeqE-I',#'ChoSeqImp'{seqInt=88,
+ seqOs = <<"A string">>}}),
+ roundtrip('ChoTRseq', {'choSeq-E',#'ChoSeqExp'{seqInt=88,
+ seqOs = <<"A string">>}}),
+ roundtrip('ChoTRseq', {'choSeqI-E',#'ChoSeqExp'{seqInt=88,
+ seqOs = <<"A string">>}}),
+ roundtrip('ChoTRseq', {'choSeqE-E',#'ChoSeqExp'{seqInt=88,
+ seqOs = <<"A string">>}}),
ok.
roundtrip(Type, Value) ->
diff --git a/lib/asn1/test/testChoTypeRefSet.erl b/lib/asn1/test/testChoTypeRefSet.erl
index fd3d75cbcb..bd9068b53e 100644
--- a/lib/asn1/test/testChoTypeRefSet.erl
+++ b/lib/asn1/test/testChoTypeRefSet.erl
@@ -28,15 +28,24 @@
-record('ChoSetExp', {setInt, setOs}).
set(_Rules) ->
- roundtrip('ChoTRset', {choSet,#'ChoSet'{setInt=88,setOs="A string"}}),
- roundtrip('ChoTRset', {choSetI,#'ChoSet'{setInt=88,setOs="A string"}}),
- roundtrip('ChoTRset', {choSetE,#'ChoSet'{setInt=88,setOs="A string"}}),
- roundtrip('ChoTRset', {'choSet-I',#'ChoSetImp'{setInt=88,setOs="A string"}}),
- roundtrip('ChoTRset', {'choSetI-I',#'ChoSetImp'{setInt=88,setOs="A string"}}),
- roundtrip('ChoTRset', {'choSetE-I',#'ChoSetImp'{setInt=88,setOs="A string"}}),
- roundtrip('ChoTRset', {'choSet-E',#'ChoSetExp'{setInt=88,setOs="A string"}}),
- roundtrip('ChoTRset', {'choSetI-E',#'ChoSetExp'{setInt=88,setOs="A string"}}),
- roundtrip('ChoTRset', {'choSetE-E',#'ChoSetExp'{setInt=88,setOs="A string"}}),
+ roundtrip('ChoTRset', {choSet,#'ChoSet'{setInt=88,
+ setOs = <<"A string">>}}),
+ roundtrip('ChoTRset', {choSetI,#'ChoSet'{setInt=88,
+ setOs = <<"A string">>}}),
+ roundtrip('ChoTRset', {choSetE,#'ChoSet'{setInt=88,
+ setOs = <<"A string">>}}),
+ roundtrip('ChoTRset', {'choSet-I',#'ChoSetImp'{setInt=88,
+ setOs = <<"A string">>}}),
+ roundtrip('ChoTRset', {'choSetI-I',#'ChoSetImp'{setInt=88,
+ setOs = <<"A string">>}}),
+ roundtrip('ChoTRset', {'choSetE-I',#'ChoSetImp'{setInt=88,
+ setOs = <<"A string">>}}),
+ roundtrip('ChoTRset', {'choSet-E',#'ChoSetExp'{setInt=88,
+ setOs = <<"A string">>}}),
+ roundtrip('ChoTRset', {'choSetI-E',#'ChoSetExp'{setInt=88,
+ setOs = <<"A string">>}}),
+ roundtrip('ChoTRset', {'choSetE-E',#'ChoSetExp'{setInt=88,
+ setOs = <<"A string">>}}),
ok.
roundtrip(Type, Value) ->
diff --git a/lib/asn1/test/testConstraints.erl b/lib/asn1/test/testConstraints.erl
index 54ba748519..3ccf883bd6 100644
--- a/lib/asn1/test/testConstraints.erl
+++ b/lib/asn1/test/testConstraints.erl
@@ -208,14 +208,14 @@ int_constraints(Rules) ->
%% More SIZE Constraints
%%==========================================================
- roundtrip('FixedSize', "0123456789"),
- roundtrip('FixedSize2', "0123456789"),
- roundtrip('FixedSize2', "0123456789abcdefghij"),
+ roundtrip('FixedSize', <<"0123456789">>),
+ roundtrip('FixedSize2', <<"0123456789">>),
+ roundtrip('FixedSize2', <<"0123456789abcdefghij">>),
range_error(Rules, 'FixedSize', "short"),
range_error(Rules, 'FixedSize2', "short"),
- [roundtrip('VariableSize', lists:seq($A, $A+L-1)) ||
+ [roundtrip('VariableSize', list_to_binary(lists:seq($A, $A+L-1))) ||
L <- lists:seq(1, 10)],
roundtrip_enc('ShorterExt', "a", shorter_ext(Rules, "a")),
diff --git a/lib/asn1/test/testEnumExt.erl b/lib/asn1/test/testEnumExt.erl
index c66adaf949..878518be11 100644
--- a/lib/asn1/test/testEnumExt.erl
+++ b/lib/asn1/test/testEnumExt.erl
@@ -59,6 +59,10 @@ main(ber) ->
common(ber).
common(Erule) ->
+ roundtrip('SubExt1', blue),
+ roundtrip('SubExt1', orange),
+ roundtrip('SubExt1', black),
+
roundtrip('Seq', {'Seq',blue,42}),
roundtrip('Seq', {'Seq',red,42}),
roundtrip('Seq', {'Seq',green,42}),
diff --git a/lib/asn1/test/testFragmented.erl b/lib/asn1/test/testFragmented.erl
index 8d5fa07a5b..35b21f90a9 100644
--- a/lib/asn1/test/testFragmented.erl
+++ b/lib/asn1/test/testFragmented.erl
@@ -22,10 +22,10 @@
-export([main/1]).
main(_Erule) ->
- roundtrip('PDU', {'PDU',1,false,["abc","def"]}),
+ roundtrip('PDU', {'PDU',1,false,[<<"abc">>,<<"def">>]}),
B256 = lists:seq(0, 255),
K1 = lists:duplicate(4, B256),
- K8 = binary_to_list(iolist_to_binary(lists:duplicate(8, K1))),
+ K8 = iolist_to_binary(lists:duplicate(8, K1)),
roundtrip('PDU', {'PDU',1,false,[K8,K8]}),
roundtrip('PDU', {'PDU',1,false,[K8,K8,K8,K8]}),
roundtrip('PDU', {'PDU',1,false,[K8,K8,K8,K8,K8,K8]}),
diff --git a/lib/asn1/test/testInfObj.erl b/lib/asn1/test/testInfObj.erl
index cd335e1023..311595cfda 100644
--- a/lib/asn1/test/testInfObj.erl
+++ b/lib/asn1/test/testInfObj.erl
@@ -49,7 +49,7 @@ main(_Erule) ->
roundtrip('RANAPextract1', 'InitiatingMessage2', Val3),
roundtrip('InfObj', 'MyPdu', {'MyPdu',42,12,false,"string"}),
- roundtrip('InfObj', 'MyPdu', {'MyPdu',{'Seq',1023,"hello"},
+ roundtrip('InfObj', 'MyPdu', {'MyPdu',{'Seq',1023,<<"hello">>},
42,true,"longer string"}),
roundtrip('InfObj', 'MyPdu', {'MyPdu',"75712346",43,true,"string"}),
@@ -110,11 +110,11 @@ main(_Erule) ->
enc_dec('InfObj', 'DefaultInSeq', {'DefaultInSeq',3,asn1_DEFAULT}),
roundtrip('InfObj', 'Multiple-Optionals',
- {'Multiple-Optionals',1,42,true,"abc"}),
+ {'Multiple-Optionals',1,42,true,<<"abc">>}),
roundtrip('InfObj', 'Multiple-Optionals',
- {'Multiple-Optionals',1,asn1_NOVALUE,true,"abc"}),
+ {'Multiple-Optionals',1,asn1_NOVALUE,true,<<"abc">>}),
roundtrip('InfObj', 'Multiple-Optionals',
- {'Multiple-Optionals',1,42,asn1_NOVALUE,"abc"}),
+ {'Multiple-Optionals',1,42,asn1_NOVALUE,<<"abc">>}),
roundtrip('InfObj', 'Multiple-Optionals',
{'Multiple-Optionals',1,42,true,asn1_NOVALUE}),
roundtrip('InfObj', 'Multiple-Optionals',
diff --git a/lib/asn1/test/testMergeCompile.erl b/lib/asn1/test/testMergeCompile.erl
index 7cda71c441..b21897cfc2 100644
--- a/lib/asn1/test/testMergeCompile.erl
+++ b/lib/asn1/test/testMergeCompile.erl
@@ -30,12 +30,12 @@
main(Erule) ->
%% test of module MS.set.asn that tests OTP-4492: different tagdefault in
%% modules and types with same name in modules
- MSVal = {'Type4M2',8,true,three,"OCTET STRING"},
+ MSVal = {'Type4M2',8,true,three,<<"OCTET STRING">>},
asn1_test_lib:roundtrip('MS', 'Type4M2', MSVal),
%% test of RANAP.set.asn1
PIEVal2 = [{'ProtocolIE-Field',4,ignore,{radioNetwork,'rab-pre-empted'}}],
- EncVal =
+ EncVal0 =
case Erule of
per ->
<<1,100>>;
@@ -44,6 +44,7 @@ main(Erule) ->
ber ->
<<2,1,1>>
end,
+ EncVal = {asn1_OPENTYPE,EncVal0},
PEVal2 = [{'ProtocolExtensionField',1,ignore,EncVal},
{'ProtocolExtensionField',2,reject,EncVal}],
Val2 =
@@ -142,7 +143,40 @@ test('InsertSubscriberDataArg') ->
ok.
test(mvrasn6,'InsertSubscriberDataArg') ->
- Val = {'InsertSubscriberDataArg',"IMSI","Address","C",serviceGranted,["abc","cde"],["tele","serv","ice"],asn1_NOVALUE,asn1_NOVALUE,asn1_NOVALUE,asn1_NOVALUE,asn1_NOVALUE,asn1_NOVALUE,asn1_NOVALUE,asn1_NOVALUE,{'NAEA-PreferredCI',"NCC",asn1_NOVALUE},{'GPRSSubscriptionData','NULL',[{'PDP-Context',49,"PT","PDP-Address","QoS",'NULL',"APN",asn1_NOVALUE,asn1_NOVALUE,asn1_NOVALUE}],asn1_NOVALUE},'NULL',onlyMSC,{'LSAInformation','NULL',accessOutsideLSAsAllowed,[{'LSAData',"LSA","L",'NULL',asn1_NOVALUE},{'LSAData',"LSA","L",'NULL',asn1_NOVALUE}],asn1_NOVALUE},'NULL',{'LCSInformation',["Addr","ess","string"],[{'LCS-PrivacyClass',"S","ExtSS",notifyLocationAllowed,[{'ExternalClient',{'LCSClientExternalID',"Addr",asn1_NOVALUE},asn1_NOVALUE,asn1_NOVALUE,asn1_NOVALUE}],[broadcastService,anonymousLocation,targetMSsubscribedService],asn1_NOVALUE}],asn1_NOVALUE},100,"age",{'MC-SS-Info',"S","ExtSS",5,4,asn1_NOVALUE},"C",{'SGSN-CAMEL-SubscriptionInfo',{'GPRS-CSI',[{'GPRS-CamelTDPData',attach,13,"Addr",continueTransaction,asn1_NOVALUE}],11,asn1_NOVALUE,'NULL','NULL'},{'SMS-CSI',[{'SMS-CAMEL-TDP-DataList','sms-CollectedInfo',13,"Addr",continueTransaction,asn1_NOVALUE}],11,asn1_NOVALUE,'NULL','NULL'},asn1_NOVALUE},"ON"},
- {ok,Bytes} = 'Mvrasn6':encode('InsertSubscriberDataArg', Val),
- {ok,_} = 'Mvrasn6':decode('InsertSubscriberDataArg', Bytes),
+ Val = {'InsertSubscriberDataArg',<<"IMSI">>,<<"Address">>,<<"C">>,
+ serviceGranted,[<<"abc">>,<<"cde">>],
+ [<<"tele">>,<<"serv">>,<<"ice">>],
+ asn1_NOVALUE,asn1_NOVALUE,asn1_NOVALUE,asn1_NOVALUE,
+ asn1_NOVALUE,asn1_NOVALUE,asn1_NOVALUE,asn1_NOVALUE,
+ {'NAEA-PreferredCI',<<"NCC">>,asn1_NOVALUE},
+ {'GPRSSubscriptionData','NULL',
+ [{'PDP-Context',49,<<"PT">>,<<"PDP-Address">>,<<"QoS">>,
+ 'NULL',<<"APN">>,asn1_NOVALUE,asn1_NOVALUE,asn1_NOVALUE}],
+ asn1_NOVALUE},'NULL',onlyMSC,
+ {'LSAInformation','NULL',accessOutsideLSAsAllowed,
+ [{'LSAData',<<"LSA">>,<<"L">>,'NULL',asn1_NOVALUE},
+ {'LSAData',<<"LSA">>,<<"L">>,'NULL',asn1_NOVALUE}],
+ asn1_NOVALUE},'NULL',
+ {'LCSInformation',[<<"Addr">>,<<"ess">>,<<"string">>],
+ [{'LCS-PrivacyClass',<<"S">>,<<"ExtSS">>,notifyLocationAllowed,
+ [{'ExternalClient',
+ {'LCSClientExternalID',<<"Addr">>,asn1_NOVALUE},
+ asn1_NOVALUE,asn1_NOVALUE,asn1_NOVALUE}],
+ [broadcastService,anonymousLocation,targetMSsubscribedService],
+ asn1_NOVALUE}],asn1_NOVALUE},
+ 100,<<"age">>,
+ {'MC-SS-Info',<<"S">>,<<"ExtSS">>,5,4,asn1_NOVALUE},
+ <<"C">>,
+ {'SGSN-CAMEL-SubscriptionInfo',
+ {'GPRS-CSI',
+ [{'GPRS-CamelTDPData',attach,13,<<"Addr">>,
+ continueTransaction,asn1_NOVALUE}],
+ 11,asn1_NOVALUE,'NULL','NULL'},
+ {'SMS-CSI',
+ [{'SMS-CAMEL-TDP-Data','sms-CollectedInfo',
+ 13,<<"Addr">>,continueTransaction,asn1_NOVALUE}],
+ 11,asn1_NOVALUE,'NULL','NULL'},
+ asn1_NOVALUE},
+ <<"ON">>},
+ asn1_test_lib:roundtrip('Mvrasn6', 'InsertSubscriberDataArg', Val),
ok.
diff --git a/lib/asn1/test/testParameterizedInfObj.erl b/lib/asn1/test/testParameterizedInfObj.erl
index f3b4f9b170..2fe900792d 100644
--- a/lib/asn1/test/testParameterizedInfObj.erl
+++ b/lib/asn1/test/testParameterizedInfObj.erl
@@ -20,7 +20,7 @@
-module(testParameterizedInfObj).
--export([main/2,ranap/1]).
+-export([main/2,param/1,ranap/1]).
-include_lib("test_server/include/test_server.hrl").
@@ -36,31 +36,29 @@ main(Config, Erule) ->
param2(Config, Erule).
param(Erule) ->
- PERVal = #'AllocationOrRetentionPriority'
- {priorityLevel = true,
- iE_Extensions =
- [#'ProtocolExtensionField'{id=14,
- criticality=reject,
- extensionValue= <<0>>},
- #'ProtocolExtensionField'{id=2,
- criticality=ignore,
- extensionValue= <<1>>}]},
- BERVal = #'AllocationOrRetentionPriority'
- {priorityLevel = true,
- iE_Extensions =
- [#'ProtocolExtensionField'{id=14,
- criticality=reject,
- extensionValue= <<2,1,0>>},
- #'ProtocolExtensionField'{id=2,
- criticality=ignore,
- extensionValue= <<2,1,1>>}]},
- case Erule of
- ber ->
- roundtrip('AllocationOrRetentionPriority', BERVal);
- per ->
- roundtrip('AllocationOrRetentionPriority', PERVal);
- uper ->
- roundtrip('AllocationOrRetentionPriority', PERVal)
+ Exts0 = case Erule of
+ ber ->
+ %% As implemented, the open type must contain
+ %% valid BER-encoded data.
+ [{14,<<2,1,0>>},{2,<<2,1,0>>}];
+ _ ->
+ %% The PER decoder will not look inside the open type.
+ [{14,<<0>>},{2,<<"anything goes">>}]
+ end,
+ case 'Param':legacy_erlang_types() of
+ false ->
+ Exts = [#'ProtocolExtensionField'{id=Id,
+ criticality=reject,
+ extensionValue={asn1_OPENTYPE,
+ Eval}} ||
+ {Id,Eval} <- Exts0],
+ aor_roundtrip(Exts);
+ true ->
+ Exts = [#'ProtocolExtensionField'{id=Id,
+ criticality=reject,
+ extensionValue=Eval} ||
+ {Id,Eval} <- Exts0],
+ aor_roundtrip(Exts)
end,
%% test code for OTP-4242, ValueFromObject
@@ -72,8 +70,13 @@ param(Erule) ->
{error,_Reason2} = 'Param':decode('OS2',[4,4,1,2,3,4]),
{ok,_Val4} = 'Param':decode('OS1',[4,2,1,2]);
_ -> %per/uper
- roundtrip('OS1', [1,2]),
- {error,_Reason3} = 'Param':encode('OS1', [1,2,3,4])
+ case 'Param':legacy_erlang_types() of
+ false ->
+ roundtrip('OS1', <<1,2>>),
+ {error,_Reason3} = 'Param':encode('OS1', <<1,2,3,4>>);
+ true ->
+ ok
+ end
end,
roundtrip('Scl', {'Scl',42,{a,9738654}}),
@@ -82,6 +85,11 @@ param(Erule) ->
ok.
+aor_roundtrip(Exts) ->
+ Val = #'AllocationOrRetentionPriority'{priorityLevel = true,
+ iE_Extensions = Exts},
+ roundtrip('AllocationOrRetentionPriority', Val).
+
roundtrip(T, V) ->
asn1_test_lib:roundtrip('Param', T, V).
@@ -102,11 +110,11 @@ ranap(_Erule) ->
param2(Config, Erule) ->
roundtrip2('HandoverRequired',
{'HandoverRequired',
- [{'ProtocolIE-Field',1,"ABC"},
+ [{'ProtocolIE-Field',1,<<"ABC">>},
{'ProtocolIE-Field',2,577799}]}),
Enc = roundtrip2('HandoverRequired',
{'HandoverRequired',
- [{'ProtocolIE-Field',1,"ABC"},
+ [{'ProtocolIE-Field',1,<<"ABC">>},
{'ProtocolIE-Field',2,-42},
{'ProtocolIE-Field',100,533},
{'ProtocolIE-Field',101,true}]}),
@@ -127,17 +135,19 @@ param2(Config, Erule) ->
[{i,DataDir},{outdir,CaseDir},Erule]),
%% Decompile extended data.
- {ok,{'HandoverRequired',[{'ProtocolIE-Field',1,"ABC"},
+ {ok,{'HandoverRequired',[{'ProtocolIE-Field',1,<<"ABC">>},
{'ProtocolIE-Field',2,-42},
- {'ProtocolIE-Field',100,Open100},
- {'ProtocolIE-Field',101,Open101}]}} =
+ {'ProtocolIE-Field',100,
+ {asn1_OPENTYPE,Open100}},
+ {'ProtocolIE-Field',101,
+ {asn1_OPENTYPE,Open101}}]}} =
'Param2':decode('HandoverRequired', Enc),
true = is_binary(Open100),
true = is_binary(Open101),
%% Test single root.
roundtrip2('SingleRoot',
- {'SingleRoot',[{'ProtocolIE-Field',1,"ABC"},
+ {'SingleRoot',[{'ProtocolIE-Field',1,<<"ABC">>},
{'ProtocolIE-Field',2,9999}]}),
ok.
diff --git a/lib/asn1/test/testPrimExternal.erl b/lib/asn1/test/testPrimExternal.erl
index 07a1de931f..a03760976d 100644
--- a/lib/asn1/test/testPrimExternal.erl
+++ b/lib/asn1/test/testPrimExternal.erl
@@ -45,6 +45,6 @@ external(_Rules) ->
'XExpNT',
'XExpImp',
'XExpExp'],
- _ = [asn1_test_lib:roundtrip('PrimExternal', T, "kalle") ||
+ _ = [asn1_test_lib:roundtrip('PrimExternal', T, <<"kalle">>) ||
T <- Types],
ok.
diff --git a/lib/asn1/test/testPrimStrings.erl b/lib/asn1/test/testPrimStrings.erl
index 2fe0780701..155d6f6ff5 100644
--- a/lib/asn1/test/testPrimStrings.erl
+++ b/lib/asn1/test/testPrimStrings.erl
@@ -18,6 +18,8 @@
%%
%%
-module(testPrimStrings).
+-compile([{nowarn_deprecated_function,{asn1rt,utf8_list_to_binary,1}},
+ {nowarn_deprecated_function,{asn1rt,utf8_binary_to_list,1}}]).
-export([bit_string/2]).
-export([octet_string/1]).
@@ -34,14 +36,11 @@
fragmented(Rules) ->
Lens = fragmented_lengths(),
- fragmented_octet_string(Rules, Lens),
- case Rules of
- per ->
- %% NYI.
- ok;
- _ ->
- fragmented_strings(Lens)
- end.
+ case 'PrimStrings':legacy_erlang_types() of
+ false -> fragmented_octet_string(Rules, Lens);
+ true -> ok
+ end,
+ fragmented_strings(Lens).
fragmented_strings(Lens) ->
Types = ['Ns','Ps','Ps11','Vis','IA5'],
@@ -74,33 +73,37 @@ bit_string(Rules, Opts) ->
%% Bs1 ::= BIT STRING
%%==========================================================
- bs_roundtrip('Bs1', 0, <<>>),
- bs_roundtrip('Bs1', 4, <<1:3>>),
- bs_roundtrip('Bs1', 15, <<15:4>>),
- bs_roundtrip('Bs1', 255, <<255:8>>),
-
- bs_roundtrip('Bs1', 256, [0,0,0,0,0,0,0,0,1]),
- bs_roundtrip('Bs1', 257, [1,0,0,0,0,0,0,0,1]),
- bs_roundtrip('Bs1', 444, [0,0,1,1,1,1,0,1,1]),
-
- {ok,Enc1} = 'PrimStrings':encode('Bs1', 12345678901234567890),
- {ok,_} = 'PrimStrings':decode('Bs1', Enc1),
+ bs_roundtrip('Bs1', <<>>),
+ bs_roundtrip('Bs1', <<1:3>>),
+ bs_roundtrip('Bs1', <<15:4>>),
+ bs_roundtrip('Bs1', <<2#010010:6>>),
+ bs_roundtrip('Bs1', <<2#11111111:8>>),
+ bs_roundtrip('Bs1', <<2#100000000:9>>),
+ bs_roundtrip('Bs1', <<2#100000001:9>>),
+ bs_roundtrip('Bs1', <<2#001111011:9>>),
+ bs_roundtrip('Bs1', <<2#0100101111100010011:19>>),
- bs_roundtrip('Bs1', [1,1,1,1,1,1,1,1]),
- bs_roundtrip('Bs1', [0,1,0,0,1,0]),
- bs_roundtrip('Bs1', [1,0,0,0,0,0,0,0,0]),
- bs_roundtrip('Bs1', [0,1,0,0,1,0,1,1,1,1,1,0,0,0,1,0,0,1,1]),
+ case 'PrimStrings':legacy_erlang_types() of
+ false ->
+ ok;
+ true ->
+ {ok,Enc1} = 'PrimStrings':encode('Bs1', 12345678901234567890),
+ {ok,_} = 'PrimStrings':decode('Bs1', Enc1)
+ end,
case {Rules,Opts} of
- {ber,[]} ->
+ {ber,[legacy_erlang_types]} ->
bs_decode('Bs1', <<35,8,3,2,0,73,3,2,4,32>>,
[0,1,0,0,1,0,0,1,0,0,1,0]),
bs_decode('Bs1', <<35,9,3,2,0,234,3,3,7,156,0>>,
[1,1,1,0,1,0,1,0,1,0,0,1,1,1,0,0,0]),
bs_decode('Bs1', <<35,128,3,2,0,234,3,3,7,156,0,0,0>>,
[1,1,1,0,1,0,1,0,1,0,0,1,1,1,0,0,0]);
- _ ->
+ {ber,[]} ->
+ %% XXX
+ ok;
+ {_,_} ->
%% DER, PER, UPER
consistent_def_enc('BsDef1',
[2#111101,
@@ -120,30 +123,39 @@ bit_string(Rules, Opts) ->
%%==========================================================
roundtrip('Bs2', [mo,tu,fr]),
- roundtrip('Bs2', [0,1,1,0,0,1,0], [mo,tu,fr]),
+ bs_roundtrip('Bs2', <<2#0110010:7>>, [mo,tu,fr]),
+ bs_roundtrip('Bs2', <<2#0110011:7>>, [mo,tu,fr,sa]),
%%==========================================================
%% Bs3 ::= BIT STRING {su(0), mo(1), tu(2), we(3), th(4), fr(5), sa(6) } (SIZE (1..7))
%%==========================================================
roundtrip('Bs3', [mo,tu,fr]),
- bs_roundtrip('Bs3', [0,1,1,0,0,1,0], [mo,tu,fr]),
+ bs_roundtrip('Bs3', <<2#0110010:7>>, [mo,tu,fr]),
+ bs_roundtrip('Bs3', <<2#0110010:7>>, [mo,tu,fr]),
+ bs_roundtrip('Bs2', <<2#0110011:7>>, [mo,tu,fr,sa]),
+ bs_roundtrip('Bs3', <<2#011001:6>>, [mo,tu,fr]),
+ bs_roundtrip('Bs3', <<2#11:2>>, [su,mo]),
%%==========================================================
%% Bs7 ::= BIT STRING (SIZE (24))
%%==========================================================
- bs_roundtrip('Bs7', 53245,
- [1,0,1,1,1,1,1,1,1,1,1,1,0,0,1,1,0,0,0,0,0,0,0,0]),
- bs_roundtrip('Bs7', [1,0,1,0],
- [1,0,1,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0]),
+ bs_roundtrip('Bs7', <<23563:24>>),
+ case 'PrimStrings':legacy_erlang_types() of
+ false ->
+%% {error,_} = 'PrimStrings':encode('Bs7', <<2#1010:4>>);
+ ok;
+ true ->
+ ok
+ end,
%%==========================================================
%% BsPri ::= [PRIVATE 61] BIT STRING
%%==========================================================
- bs_roundtrip('BsPri', 45, [1,0,1,1,0,1]),
- bs_roundtrip('BsPri', 211, [1,1,0,0,1,0,1,1]),
+ bs_roundtrip('BsPri', <<2#101101:6>>),
+ bs_roundtrip('BsPri', <<2#11001011:8>>),
case Rules of
ber ->
@@ -164,8 +176,8 @@ bit_string(Rules, Opts) ->
%% BsExpPri ::= [PRIVATE 61] EXPLICIT BIT STRING
%%==========================================================
- bs_roundtrip('BsExpPri', 45, [1,0,1,1,0,1]),
- bs_roundtrip('BsExpPri', 211, [1,1,0,0,1,0,1,1]),
+ bs_roundtrip('BsExpPri', <<2#101101:6>>),
+ bs_roundtrip('BsExpPri', <<2#11001011:8>>),
case Rules of
ber ->
@@ -186,14 +198,14 @@ bit_string(Rules, Opts) ->
%% veteran(2), collegeGraduate(3)}, test case for OTP-5710
%%==========================================================
- {ok,Bytes54} = 'BitStr':encode('PersonalStatus', []),
+ {ok,Bytes54} = 'BitStr':encode('PersonalStatus', <<>>),
{ok,[]} = 'BitStr':decode('PersonalStatus', Bytes54),
%%==========================================================
%% BS5932 ::= BIT STRING (SIZE (5..MAX))
%% test case for OTP-5932
%%==========================================================
- bs_roundtrip('BSMAX', [1,0,1,0,1]),
+ bs_roundtrip('BSMAX', <<2#10101:5>>),
case Rules of
ber ->
{error,_} = 'PrimStrings':encode('BSMAX', [1,0,1]);
@@ -207,28 +219,35 @@ bit_string(Rules, Opts) ->
%% BS1024 ::= BIT STRING (SIZE (1024))
%% test case for OTP-7602
%%==========================================================
- BSmaker =
- fun(_F,S,S,_,Acc) ->
- Acc;
- (F,Ix,S,{A,B},Acc) ->
- F(F,Ix+1,S,{B,A},[A|Acc])
- end,
-
- BSList255 = BSmaker(BSmaker,0,255,{1,0},[]),
- bs_roundtrip('BS255', BSList255),
- BSList256 = BSmaker(BSmaker,0,256,{1,0},[]),
- bs_roundtrip('BS256', BSList256),
- BSList1024 = BSmaker(BSmaker,0,1024,{1,0},[]),
- bs_roundtrip('BS1024', BSList1024),
- bs_roundtrip('TransportLayerAddress', [0,1,1,0]),
+ bs_roundtrip('BS255', random_bits(255)),
+ bs_roundtrip('BS256', random_bits(256)),
+ bs_roundtrip('BS1024', random_bits(1024)),
+
+ bs_roundtrip('TransportLayerAddress', <<2#0110:4>>),
case Rules of
ber -> ok;
_ -> per_bs_strings()
end.
-consistent_def_enc(Type, Vs) ->
+random_bits(N) ->
+ Seed = integer_to_list(erlang:phash2(erlang:now())),
+ random_bits(<<>>, N, Seed).
+
+random_bits(Bin, N, Seed) ->
+ RandomBits = erlang:md5(Seed),
+ Bits = bit_size(RandomBits),
+ if
+ Bits < N ->
+ random_bits(<<Bin/bitstring,RandomBits/bitstring>>,
+ N-Bits, RandomBits);
+ true ->
+ <<LastBits:N/bitstring,_/bitstring>> = RandomBits,
+ <<Bin/bitstring,LastBits/bitstring>>
+ end.
+
+consistent_def_enc(Type, Vs0) ->
M = 'PrimStrings',
{ok,Enc} = M:encode(Type, {Type,asn1_DEFAULT}),
{ok,Val} = M:decode(Type, Enc),
@@ -241,6 +260,13 @@ consistent_def_enc(Type, Vs) ->
{legacy,{_,Bs}} when is_list(Bs) -> ok
end,
+ %% If this is not the legacy format, only bitstrings are
+ %% allowed.
+ Vs = case M:legacy_erlang_types() of
+ false -> [V || V <- Vs0, is_bitstring(V)];
+ true -> Vs0
+ end,
+
%% All values should be recognized and encoded as the
%% the default value (i.e. not encoded at all).
_ = [{ok,Enc} = M:encode(Type, {Type,V}) || V <- Vs],
@@ -252,18 +278,9 @@ consistent_def_enc(Type, Vs) ->
%% a SIZE constraint).
per_bs_strings() ->
- bs_roundtrip('Bs3', [0,0,1,0,0,0,0], [tu]),
bs_roundtrip('Bs3', <<2#0010000:7>>, [tu]),
- bs_roundtrip('Bs3', {1,<<2#00100000:8>>}, [tu]),
-
- bs_roundtrip('Bs4', [0,1,1,0,0,1,0], [mo,tu,fr]),
bs_roundtrip('Bs4', <<2#0110010:7>>, [mo,tu,fr]),
- bs_roundtrip('Bs4', {1,<<2#01100100:8>>}, [mo,tu,fr]),
-
- bs_roundtrip('Bs4', [0,1,1,0,0,0,0], [mo,tu]),
bs_roundtrip('Bs4', <<2#011:3,0:32>>, [mo,tu]),
- bs_roundtrip('Bs4', {5,<<2#011:3,0:32,0:5>>}, [mo,tu]),
-
[per_trailing_zeroes(B) || B <- lists:seq(0, 255)],
ok.
@@ -279,10 +296,6 @@ per_trailing_zeroes(Byte) ->
{bit,LastBitPos} -> LastBitPos+1
end,
- %% List of zeroes and ones.
- named_roundtrip(L, Pos, ExpectedSz),
- named_roundtrip(L++[0,0,0,0,0], Pos, ExpectedSz),
-
%% Bitstrings.
Bs = << <<B:1>> || B <- L >>,
Sz = bit_size(Bs),
@@ -290,14 +303,22 @@ per_trailing_zeroes(Byte) ->
Bin = <<Bs:Sz/bits,0:16,0:7>>,
named_roundtrip(Bin, Pos, ExpectedSz),
- %% Compact bitstring.
- named_roundtrip({7,Bin}, Pos, ExpectedSz),
+ case 'PrimStrings':legacy_erlang_types() of
+ false ->
+ ok;
+ true ->
+ %% List of zeroes and ones.
+ named_roundtrip(L, Pos, ExpectedSz),
+ named_roundtrip(L++[0,0,0,0,0], Pos, ExpectedSz),
- %% Integer bitstring (obsolete).
- IntBs = intlist_to_integer(L, 0, 0),
- named_roundtrip(IntBs, Pos, ExpectedSz),
+ %% Compact bitstring.
+ named_roundtrip({7,Bin}, Pos, ExpectedSz),
- ok.
+ %% Integer bitstring (obsolete).
+ IntBs = intlist_to_integer(L, 0, 0),
+ named_roundtrip(IntBs, Pos, ExpectedSz),
+ ok
+ end.
make_bit_list(0) -> [];
make_bit_list(B) -> [B band 1|make_bit_list(B bsr 1)].
@@ -331,61 +352,62 @@ octet_string(Rules) ->
%% Os ::= OCTET STRING
%%==========================================================
+ Legacy = 'PrimStrings':legacy_erlang_types(),
case Rules of
- ber ->
- {ok,"Jones"} =
+ ber when not Legacy ->
+ {ok,<<"Jones">>} =
'PrimStrings':decode('Os', <<4,5,16#4A,16#6F,16#6E,16#65,16#73>>),
- {ok,"Jones"} =
+ {ok,<<"Jones">>} =
'PrimStrings':decode('Os', <<36,9,4,3,16#4A,16#6F,16#6E,4,2,16#65,16#73>>),
- {ok,"Jones"} =
+ {ok,<<"Jones">>} =
'PrimStrings':decode('Os', <<36,128,4,3,16#4A,16#6F,16#6E,4,2,16#65,16#73,0,0>>),
ok;
_ ->
ok
end,
- roundtrip('Os', [47,23,99,255,1]),
- roundtrip('OsCon', [47,23,99,255,1]),
- roundtrip('OsPri', [47,23,99,255,1]),
- roundtrip('OsApp', [47,23,99,255,1]),
+ os_roundtrip('Os', <<47,23,99,255,1>>),
+ os_roundtrip('OsCon', <<47,23,99,255,1>>),
+ os_roundtrip('OsPri', <<47,23,99,255,1>>),
+ os_roundtrip('OsApp', <<47,23,99,255,1>>),
- roundtrip('OsExpCon', [47,23,99,255,1]),
- roundtrip('OsExpPri', [47,23,99,255,1]),
- roundtrip('OsExpApp', [47,23,99,255,1]),
+ os_roundtrip('OsExpCon', <<47,23,99,255,1>>),
+ os_roundtrip('OsExpPri', <<47,23,99,255,1>>),
+ os_roundtrip('OsExpApp', <<47,23,99,255,1>>),
- roundtrip('Os', []),
- roundtrip('OsApp', []),
- roundtrip('OsExpApp',[]),
+ os_roundtrip('Os', <<>>),
+ os_roundtrip('OsApp', <<>>),
+ os_roundtrip('OsExpApp', <<>>),
- OsR = "12345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890",
+ OsR = <<"12345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890">>,
- roundtrip('Os', OsR),
- roundtrip('OsCon', OsR),
- roundtrip('OsExpApp', OsR),
+ os_roundtrip('Os', OsR),
+ os_roundtrip('OsCon', OsR),
+ os_roundtrip('OsExpApp', OsR),
case Rules of
- ber ->
- {ok,"Jones"} = 'PrimStrings':decode('OsExpApp', <<127,62,7,4,5,16#4A,16#6F,16#6E,16#65,16#73>>),
- {ok,"Jones"} = 'PrimStrings':decode('OsExpApp', <<127,62,11,36,9,4,3,16#4A,16#6F,16#6E,4,2,16#65,16#73>>),
- {ok,"Jones"} = 'PrimStrings':decode('OsExpApp', <<127,62,13,36,128,4,3,16#4A,16#6F,16#6E,4,2,16#65,16#73,0,0>>),
- {ok,"Jones"} = 'PrimStrings':decode('OsExpApp', <<127,62,128,36,128,4,3,16#4A,16#6F,16#6E,4,2,16#65,16#73,0,0,0,0>>),
- {ok,"JonesJones"} = 'PrimStrings':decode('OsExpApp', <<127,62,128,36,128,4,3,16#4A,16#6F,16#6E,4,2,16#65,16#73,0,0,36,128,4,3,16#4A,16#6F,16#6E,4,2,16#65,16#73,0,0,0,0>>),
+ ber when not Legacy ->
+ {ok,<<"Jones">>} = 'PrimStrings':decode('OsExpApp', <<127,62,7,4,5,16#4A,16#6F,16#6E,16#65,16#73>>),
+ {ok,<<"Jones">>} = 'PrimStrings':decode('OsExpApp', <<127,62,11,36,9,4,3,16#4A,16#6F,16#6E,4,2,16#65,16#73>>),
+ {ok,<<"Jones">>} = 'PrimStrings':decode('OsExpApp', <<127,62,13,36,128,4,3,16#4A,16#6F,16#6E,4,2,16#65,16#73,0,0>>),
+ {ok,<<"Jones">>} = 'PrimStrings':decode('OsExpApp', <<127,62,128,36,128,4,3,16#4A,16#6F,16#6E,4,2,16#65,16#73,0,0,0,0>>),
+ {ok,<<"JonesJones">>} = 'PrimStrings':decode('OsExpApp', <<127,62,128,36,128,4,3,16#4A,16#6F,16#6E,4,2,16#65,16#73,0,0,36,128,4,3,16#4A,16#6F,16#6E,4,2,16#65,16#73,0,0,0,0>>),
ok;
-
- _->
+ _ ->
ok
end,
S255 = lists:seq(1, 255),
- Strings = {type,true,"","1","12","345",true,
- S255,[$a|S255],[$a,$b|S255],397},
- p_roundtrip('OsFixedStrings', Strings),
- p_roundtrip('OsFixedStringsExt', Strings),
- p_roundtrip('OsVarStringsExt', Strings),
+ Strings = {type,true,<<"">>,<<"1">>,<<"12">>,<<"345">>,true,
+ list_to_binary(S255),list_to_binary([$a|S255]),
+ list_to_binary([$a,$b|S255]),397},
+ p_os_roundtrip('OsFixedStrings', Strings),
+ p_os_roundtrip('OsFixedStringsExt', Strings),
+ p_os_roundtrip('OsVarStringsExt', Strings),
ShortenedStrings = shorten_by_two(Strings),
- p_roundtrip('OsFixedStringsExt', ShortenedStrings),
- p_roundtrip('OsVarStringsExt', ShortenedStrings),
+ p_os_roundtrip('OsFixedStringsExt', ShortenedStrings),
+ p_os_roundtrip('OsVarStringsExt', ShortenedStrings),
ok.
fragmented_octet_string(Erules, Lens) ->
@@ -414,13 +436,14 @@ fragmented_octet_string(Erules, Types, L) ->
ok.
enc_frag(Erules, Type, Value) ->
- {ok,Encoded} = 'PrimStrings':encode(Type, Value),
+ M = 'PrimStrings',
+ {ok,Encoded} = M:encode(Type, Value),
case Erules of
ber ->
Encoded;
_ ->
%% Validate encoding with our own encoder.
- Encoded = enc_frag_1(<<>>, list_to_binary(Value))
+ Encoded = enc_frag_1(<<>>, Value)
end.
enc_frag_1(Res, Bin0) ->
@@ -439,12 +462,12 @@ enc_frag_1(Res, Bin0) ->
end.
make_value(L) ->
- make_value(L, 0, []).
+ make_value(L, 0, <<>>).
make_value(0, _, Acc) ->
Acc;
make_value(N, Byte, Acc) when Byte =< 255 ->
- make_value(N-1, Byte+7, [Byte|Acc]);
+ make_value(N-1, Byte+7, <<Acc/binary,Byte:8>>);
make_value(N, Byte, Acc) ->
make_value(N, Byte band 16#FF, Acc).
@@ -742,10 +765,32 @@ utf8_string(_Rules) ->
shorten_by_two(Tuple) ->
L = [case E of
[_,_|T] -> T;
+ <<_:16,T/binary>> -> T;
_ -> E
end || E <- tuple_to_list(Tuple)],
list_to_tuple(L).
+p_os_roundtrip(Type, Value0) ->
+ Value = setelement(1, Value0, Type),
+ p_os_roundtrip_1(Type, Value).
+
+p_os_roundtrip_1(Type, Value) ->
+ M = 'PrimStrings',
+ case M:legacy_erlang_types() of
+ false ->
+ asn1_test_lib:roundtrip(M, Type, Value);
+ true ->
+ {ok,Encoded} = M:encode(Type, Value),
+ Es0 = tuple_to_list(Value),
+ Es1 = [if
+ is_binary(E) -> binary_to_list(E);
+ true -> E
+ end || E <- Es0],
+ ListValue = list_to_tuple(Es1),
+ {ok,Encoded} = M:encode(Type, ListValue),
+ {ok,ListValue} = M:decode(Type, Encoded)
+ end.
+
p_roundtrip(Type, Value0) ->
Value = setelement(1, Value0, Type),
roundtrip(Type, Value).
@@ -759,15 +804,57 @@ roundtrip(Type, Value, Expected) ->
bs_roundtrip(Type, Value) ->
bs_roundtrip(Type, Value, Value).
-bs_roundtrip(Type, Value, Expected) ->
+os_roundtrip(Type, Bin) when is_binary(Bin) ->
M = 'PrimStrings',
- {ok,Encoded} = M:encode(Type, Value),
- {ok,Encoded} = M:encode(Type, Expected),
- case M:decode(Type, Encoded) of
- {ok,Expected} ->
- ok;
- {ok,Other} ->
- Expected = convert(Other, Expected)
+ case M:legacy_erlang_types() of
+ false ->
+ asn1_test_lib:roundtrip(M, Type, Bin);
+ true ->
+ {ok,Encoded} = M:encode(Type, Bin),
+ List = binary_to_list(Bin),
+ {ok,Encoded} = M:encode(Type, List),
+ {ok,List} = M:decode(Type, Encoded)
+ end.
+
+bs_roundtrip(Type, Value, Expected) when is_bitstring(Value) ->
+ M = 'PrimStrings',
+ case M:legacy_erlang_types() of
+ false ->
+ asn1_test_lib:roundtrip(M, Type, Value, Expected);
+ true ->
+ {ok,Encoded} = M:encode(Type, Value),
+ BitList = [B || <<B:1>> <= Value],
+ {ok,Encoded} = M:encode(Type, BitList),
+ case BitList of
+ [] ->
+ {ok,Encoded} = M:encode(Type, 0);
+ [_|_] ->
+ case lists:last(BitList) of
+ 1 ->
+ Int = lists:foldr(fun(B, A) ->
+ (A bsl 1) bor B
+ end, 0, BitList),
+ {ok,Encoded} = M:encode(Type, Int);
+ 0 ->
+ %% This BIT STRING cannot be represented
+ %% as an integer.
+ ok
+ end
+ end,
+ Compact = case bit_size(Value) of
+ Bits when Bits rem 8 =:= 0 ->
+ {0,Value};
+ Bits ->
+ Unused = 8 - Bits rem 8,
+ {Unused,<<Value:Bits/bitstring,0:Unused>>}
+ end,
+ {ok,Encoded} = M:encode(Type, Compact),
+ case M:decode(Type, Encoded) of
+ {ok,Expected} ->
+ ok;
+ {ok,Other} ->
+ Expected = convert(Other, Expected)
+ end
end.
bs_decode(Type, Encoded, Expected) ->
diff --git a/lib/asn1/test/testSeqExtension.erl b/lib/asn1/test/testSeqExtension.erl
index 8473459c36..c16e9fcd4c 100644
--- a/lib/asn1/test/testSeqExtension.erl
+++ b/lib/asn1/test/testSeqExtension.erl
@@ -44,7 +44,7 @@ main(Erule, DataDir, Opts) ->
roundtrip('SeqExt4', #'SeqExt4'{bool=true,int=12345}),
roundtrip('SeqExt4', #'SeqExt4'{bool=false,int=123456}),
- roundtrip('SeqExt5', #'SeqExt5'{name="Arne",shoesize=47}),
+ roundtrip('SeqExt5', #'SeqExt5'{name = <<"Arne">>,shoesize=47}),
%% Encode a value with this version of the specification.
BigInt = 128638468966,
@@ -52,7 +52,7 @@ main(Erule, DataDir, Opts) ->
s2=#'SeqExt2'{bool=true,int=2345},
s3=#'SeqExt3'{bool=false,int=17},
s4=#'SeqExt4'{bool=true,int=38739739},
- s5=#'SeqExt5'{name="Arne",shoesize=47},
+ s5=#'SeqExt5'{name = <<"Arne">>,shoesize=47},
s6=#'SeqExt6'{i1=531,i2=601,i3=999,
i4=777,i5=11953,
i6=13553,i7=77777},
diff --git a/lib/asn1/test/testSeqExternal.erl b/lib/asn1/test/testSeqExternal.erl
index a8e0902244..0b1d305054 100644
--- a/lib/asn1/test/testSeqExternal.erl
+++ b/lib/asn1/test/testSeqExternal.erl
@@ -29,15 +29,15 @@
-record('SeqXSet3',{bool, int, set}).
main(_Rules) ->
- roundtrip('XNTNT', #'XSeqNT'{os="kalle",bool=true}),
- roundtrip('XImpNT', #'XSeqNT'{os="kalle",bool=true}),
- roundtrip('XExpNT', #'XSeqNT'{os="kalle",bool=true}),
- roundtrip('XNTImp', #'XSeqImp'{os="kalle",bool=true}),
- roundtrip('XImpImp', #'XSeqImp'{os="kalle",bool=true}),
- roundtrip('XExpImp', #'XSeqImp'{os="kalle",bool=true}),
- roundtrip('XNTExp', #'XSeqExp'{os="kalle",bool=true}),
- roundtrip('XImpExp', #'XSeqExp'{os="kalle",bool=true}),
- roundtrip('XExpExp', #'XSeqExp'{os="kalle",bool=true}),
+ roundtrip('XNTNT', #'XSeqNT'{os = <<"kalle">>,bool=true}),
+ roundtrip('XImpNT', #'XSeqNT'{os = <<"kalle">>,bool=true}),
+ roundtrip('XExpNT', #'XSeqNT'{os = <<"kalle">>,bool=true}),
+ roundtrip('XNTImp', #'XSeqImp'{os = <<"kalle">>,bool=true}),
+ roundtrip('XImpImp', #'XSeqImp'{os = <<"kalle">>,bool=true}),
+ roundtrip('XExpImp', #'XSeqImp'{os = <<"kalle">>,bool=true}),
+ roundtrip('XNTExp', #'XSeqExp'{os = <<"kalle">>,bool=true}),
+ roundtrip('XImpExp', #'XSeqExp'{os = <<"kalle">>,bool=true}),
+ roundtrip('XExpExp', #'XSeqExp'{os = <<"kalle">>,bool=true}),
roundtrip('SeqXSet1',
#'SeqXSet1'{set=#'XSet1'{bool1=true,int1=77,
set1=#'XSetIn'{boolIn=false,intIn=88}},
diff --git a/lib/asn1/test/testSeqOf.erl b/lib/asn1/test/testSeqOf.erl
index 7f8f4079b4..25059d6052 100644
--- a/lib/asn1/test/testSeqOf.erl
+++ b/lib/asn1/test/testSeqOf.erl
@@ -85,10 +85,10 @@ main(_Rules) ->
seq43=SeqIn3}),
roundtrip('Seq5', {'Seq5',true,[],77}),
- roundtrip('Seq5', {'Seq5',true,[""],77}),
- roundtrip('Seq5', {'Seq5',true,["a"],77}),
- roundtrip('Seq5', {'Seq5',true,["ab"],77}),
- roundtrip('Seq5', {'Seq5',true,["abc"],77}),
+ roundtrip('Seq5', {'Seq5',true,[<<"">>],77}),
+ roundtrip('Seq5', {'Seq5',true,[<<"a">>],77}),
+ roundtrip('Seq5', {'Seq5',true,[<<"ab">>],77}),
+ roundtrip('Seq5', {'Seq5',true,[<<"abc">>],77}),
roundtrip('Seq6', {'Seq6',[],[],101}),
roundtrip('Seq6', {'Seq6',[],[7],101}),
@@ -100,15 +100,15 @@ main(_Rules) ->
roundtrip('Seq8', {'Seq8',[],37}),
roundtrip('Seq9', {'Seq9',true,[],97}),
- roundtrip('Seq9', {'Seq9',true,[""],97}),
- roundtrip('Seq9', {'Seq9',true,["x"],97}),
- roundtrip('Seq9', {'Seq9',true,["xy"],97}),
- roundtrip('Seq9', {'Seq9',true,["xyz"],97}),
-
- roundtrip('Seq10', {'Seq10',true,[""],97}),
- roundtrip('Seq10', {'Seq10',true,["a"],97}),
- roundtrip('Seq10', {'Seq10',true,["a","b"],97}),
- roundtrip('Seq10', {'Seq10',true,["a","b","c"],97}),
+ roundtrip('Seq9', {'Seq9',true,[<<"">>],97}),
+ roundtrip('Seq9', {'Seq9',true,[<<"x">>],97}),
+ roundtrip('Seq9', {'Seq9',true,[<<"xy">>],97}),
+ roundtrip('Seq9', {'Seq9',true,[<<"xyz">>],97}),
+
+ roundtrip('Seq10', {'Seq10',true,[<<"">>],97}),
+ roundtrip('Seq10', {'Seq10',true,[<<"a">>],97}),
+ roundtrip('Seq10', {'Seq10',true,[<<"a">>,<<"b">>],97}),
+ roundtrip('Seq10', {'Seq10',true,[<<"a">>,<<"b">>,<<"c">>],97}),
roundtrip('SeqEmp', #'SeqEmp'{seq1=[#'Empty'{}]}),
diff --git a/lib/asn1/test/testSeqOfExternal.erl b/lib/asn1/test/testSeqOfExternal.erl
index 2e60f441c1..38b9f0ce7c 100644
--- a/lib/asn1/test/testSeqOfExternal.erl
+++ b/lib/asn1/test/testSeqOfExternal.erl
@@ -29,50 +29,59 @@
main(_Rules) ->
roundtrip('NTNT',
- [#'NT'{os="kalle",bool=true},#'NT'{os="kalle",bool=true}]),
+ [#'NT'{os = <<"kalle">>,bool=true},
+ #'NT'{os = <<"kalle">>,bool=true}]),
roundtrip('ImpNT',
- [#'NT'{os="kalle",bool=true},#'NT'{os="kalle",bool=true}]),
+ [#'NT'{os = <<"kalle">>,bool=true},
+ #'NT'{os = <<"kalle">>,bool=true}]),
roundtrip('ExpNT',
- [#'NT'{os="kalle",bool=true},#'NT'{os="kalle",bool=true}]),
+ [#'NT'{os = <<"kalle">>,bool=true},
+ #'NT'{os = <<"kalle">>,bool=true}]),
roundtrip('NTImp',
- [#'Imp'{os="kalle",bool=true},#'Imp'{os="kalle",bool=true}]),
+ [#'Imp'{os = <<"kalle">>,bool=true},
+ #'Imp'{os = <<"kalle">>,bool=true}]),
roundtrip('ImpImp',
- [#'Imp'{os="kalle",bool=true},#'Imp'{os="kalle",bool=true}]),
+ [#'Imp'{os = <<"kalle">>,bool=true},
+ #'Imp'{os = <<"kalle">>,bool=true}]),
roundtrip('ExpImp',
- [#'Imp'{os="kalle",bool=true},#'Imp'{os="kalle",bool=true}]),
+ [#'Imp'{os = <<"kalle">>,bool=true},
+ #'Imp'{os = <<"kalle">>,bool=true}]),
roundtrip('NTExp',
- [#'Exp'{os="kalle",bool=true},#'Exp'{os="kalle",bool=true}]),
+ [#'Exp'{os = <<"kalle">>,bool=true},
+ #'Exp'{os = <<"kalle">>,bool=true}]),
roundtrip('ImpExp',
- [#'Exp'{os="kalle",bool=true},#'Exp'{os="kalle",bool=true}]),
+ [#'Exp'{os = <<"kalle">>,bool=true},
+ #'Exp'{os = <<"kalle">>,bool=true}]),
roundtrip('ExpExp',
- [#'Exp'{os="kalle",bool=true},#'Exp'{os="kalle",bool=true}]),
+ [#'Exp'{os = <<"kalle">>,bool=true},
+ #'Exp'{os = <<"kalle">>,bool=true}]),
roundtrip('XNTNT',
- [#'XSeqNT'{os="kalle",bool=true},
- #'XSeqNT'{os="kalle",bool=true}]),
+ [#'XSeqNT'{os = <<"kalle">>,bool=true},
+ #'XSeqNT'{os = <<"kalle">>,bool=true}]),
roundtrip('XImpNT',
- [#'XSeqNT'{os="kalle",bool=true},
- #'XSeqNT'{os="kalle",bool=true}]),
+ [#'XSeqNT'{os = <<"kalle">>,bool=true},
+ #'XSeqNT'{os = <<"kalle">>,bool=true}]),
roundtrip('XExpNT',
- [#'XSeqNT'{os="kalle",bool=true},
- #'XSeqNT'{os="kalle",bool=true}]),
+ [#'XSeqNT'{os = <<"kalle">>,bool=true},
+ #'XSeqNT'{os = <<"kalle">>,bool=true}]),
roundtrip('XNTImp',
- [#'XSeqImp'{os="kalle",bool=true},
- #'XSeqImp'{os="kalle",bool=true}]),
+ [#'XSeqImp'{os = <<"kalle">>,bool=true},
+ #'XSeqImp'{os = <<"kalle">>,bool=true}]),
roundtrip('XImpImp',
- [#'XSeqImp'{os="kalle",bool=true},
- #'XSeqImp'{os="kalle",bool=true}]),
+ [#'XSeqImp'{os = <<"kalle">>,bool=true},
+ #'XSeqImp'{os = <<"kalle">>,bool=true}]),
roundtrip('XExpImp',
- [#'XSeqImp'{os="kalle",bool=true},
- #'XSeqImp'{os="kalle",bool=true}]),
+ [#'XSeqImp'{os = <<"kalle">>,bool=true},
+ #'XSeqImp'{os = <<"kalle">>,bool=true}]),
roundtrip('XNTExp',
- [#'XSeqExp'{os="kalle",bool=true},
- #'XSeqExp'{os="kalle",bool=true}]),
+ [#'XSeqExp'{os = <<"kalle">>,bool=true},
+ #'XSeqExp'{os = <<"kalle">>,bool=true}]),
roundtrip('XImpExp',
- [#'XSeqExp'{os="kalle",bool=true},
- #'XSeqExp'{os="kalle",bool=true}]),
+ [#'XSeqExp'{os = <<"kalle">>,bool=true},
+ #'XSeqExp'{os = <<"kalle">>,bool=true}]),
roundtrip('XExpExp',
- [#'XSeqExp'{os="kalle",bool=true},
- #'XSeqExp'{os="kalle",bool=true}]),
+ [#'XSeqExp'{os = <<"kalle">>,bool=true},
+ #'XSeqExp'{os = <<"kalle">>,bool=true}]),
ok.
roundtrip(T, V) ->
diff --git a/lib/asn1/test/testSeqOfTag.erl b/lib/asn1/test/testSeqOfTag.erl
index 38c1dcb90f..f66e29e91d 100644
--- a/lib/asn1/test/testSeqOfTag.erl
+++ b/lib/asn1/test/testSeqOfTag.erl
@@ -44,47 +44,47 @@
-record('Exp',{os, bool}).
main(_Rules) ->
- roundtrip('SeqTagNt', #'SeqTagNt'{nt=[#'NT'{os="kalle",bool=true},
- #'NT'{os="kalle",bool=true}]}),
- roundtrip('SeqTagNtI', #'SeqTagNtI'{imp=[#'Imp'{os="kalle",bool=true},
- #'Imp'{os="kalle",bool=true}]}),
- roundtrip('SeqTagNtE', #'SeqTagNtE'{exp=[#'Exp'{os="kalle",bool=true},
- #'Exp'{os="kalle",bool=true}]}),
- roundtrip('SeqTagI', #'SeqTagI'{nt=[#'NT'{os="kalle",bool=true},
- #'NT'{os="kalle",bool=true}]}),
- roundtrip('SeqTagII', #'SeqTagII'{imp=[#'Imp'{os="kalle",bool=true},
- #'Imp'{os="kalle",bool=true}]}),
- roundtrip('SeqTagIE', #'SeqTagIE'{exp=[#'Exp'{os="kalle",bool=true},
- #'Exp'{os="kalle",bool=true}]}),
- roundtrip('SeqTagE', #'SeqTagE'{nt=[#'NT'{os="kalle",bool=true},
- #'NT'{os="kalle",bool=true}]}),
- roundtrip('SeqTagEI', #'SeqTagEI'{imp=[#'Imp'{os="kalle",bool=true},
- #'Imp'{os="kalle",bool=true}]}),
- roundtrip('SeqTagEE', #'SeqTagEE'{exp=[#'Exp'{os="kalle",bool=true},
- #'Exp'{os="kalle",bool=true}]}),
+ roundtrip('SeqTagNt', #'SeqTagNt'{nt=[#'NT'{os = <<"kalle">>,bool=true},
+ #'NT'{os = <<"kalle">>,bool=true}]}),
+ roundtrip('SeqTagNtI', #'SeqTagNtI'{imp=[#'Imp'{os = <<"kalle">>,bool=true},
+ #'Imp'{os = <<"kalle">>,bool=true}]}),
+ roundtrip('SeqTagNtE', #'SeqTagNtE'{exp=[#'Exp'{os = <<"kalle">>,bool=true},
+ #'Exp'{os = <<"kalle">>,bool=true}]}),
+ roundtrip('SeqTagI', #'SeqTagI'{nt=[#'NT'{os = <<"kalle">>,bool=true},
+ #'NT'{os = <<"kalle">>,bool=true}]}),
+ roundtrip('SeqTagII', #'SeqTagII'{imp=[#'Imp'{os = <<"kalle">>,bool=true},
+ #'Imp'{os = <<"kalle">>,bool=true}]}),
+ roundtrip('SeqTagIE', #'SeqTagIE'{exp=[#'Exp'{os = <<"kalle">>,bool=true},
+ #'Exp'{os = <<"kalle">>,bool=true}]}),
+ roundtrip('SeqTagE', #'SeqTagE'{nt=[#'NT'{os = <<"kalle">>,bool=true},
+ #'NT'{os = <<"kalle">>,bool=true}]}),
+ roundtrip('SeqTagEI', #'SeqTagEI'{imp=[#'Imp'{os = <<"kalle">>,bool=true},
+ #'Imp'{os = <<"kalle">>,bool=true}]}),
+ roundtrip('SeqTagEE', #'SeqTagEE'{exp=[#'Exp'{os = <<"kalle">>,bool=true},
+ #'Exp'{os = <<"kalle">>,bool=true}]}),
roundtrip('SeqTagXNt',
- #'SeqTagXNt'{xnt=[#'XSeqNT'{os="kalle",bool=true},
- #'XSeqNT'{os="kalle",bool=true}]}),
+ #'SeqTagXNt'{xnt=[#'XSeqNT'{os = <<"kalle">>,bool=true},
+ #'XSeqNT'{os = <<"kalle">>,bool=true}]}),
roundtrip('SeqTagXI',
- #'SeqTagXI'{ximp=[#'XSeqImp'{os="kalle",bool=true},
- #'XSeqImp'{os="kalle",bool=true}]}),
+ #'SeqTagXI'{ximp=[#'XSeqImp'{os = <<"kalle">>,bool=true},
+ #'XSeqImp'{os = <<"kalle">>,bool=true}]}),
roundtrip('SeqTagXE',
- #'SeqTagXE'{xexp=[#'XSeqExp'{os="kalle",bool=true},
- #'XSeqExp'{os="kalle",bool=true}]}),
+ #'SeqTagXE'{xexp=[#'XSeqExp'{os = <<"kalle">>,bool=true},
+ #'XSeqExp'{os = <<"kalle">>,bool=true}]}),
roundtrip('SeqTagImpX',
- #'SeqTagImpX'{xnt=[#'XSeqNT'{os="kalle",bool=true},
- #'XSeqNT'{os="kalle",bool=true}],
- ximp=[#'XSeqImp'{os="kalle",bool=true},
- #'XSeqImp'{os="kalle",bool=true}],
- xexp=[#'XSeqExp'{os="kalle",bool=true},
- #'XSeqExp'{os="kalle",bool=true}]}),
+ #'SeqTagImpX'{xnt=[#'XSeqNT'{os = <<"kalle">>,bool=true},
+ #'XSeqNT'{os = <<"kalle">>,bool=true}],
+ ximp=[#'XSeqImp'{os = <<"kalle">>,bool=true},
+ #'XSeqImp'{os = <<"kalle">>,bool=true}],
+ xexp=[#'XSeqExp'{os = <<"kalle">>,bool=true},
+ #'XSeqExp'{os = <<"kalle">>,bool=true}]}),
roundtrip('SeqTagExpX',
- #'SeqTagExpX'{xnt=[#'XSeqNT'{os="kalle",bool=true},
- #'XSeqNT'{os="kalle",bool=true}],
- ximp=[#'XSeqImp'{os="kalle",bool=true},
- #'XSeqImp'{os="kalle",bool=true}],
- xexp=[#'XSeqExp'{os="kalle",bool=true},
- #'XSeqExp'{os="kalle",bool=true}]}),
+ #'SeqTagExpX'{xnt=[#'XSeqNT'{os = <<"kalle">>,bool=true},
+ #'XSeqNT'{os = <<"kalle">>,bool=true}],
+ ximp=[#'XSeqImp'{os = <<"kalle">>,bool=true},
+ #'XSeqImp'{os = <<"kalle">>,bool=true}],
+ xexp=[#'XSeqExp'{os = <<"kalle">>,bool=true},
+ #'XSeqExp'{os = <<"kalle">>,bool=true}]}),
ok.
roundtrip(T, V) ->
diff --git a/lib/asn1/test/testSeqPrim.erl b/lib/asn1/test/testSeqPrim.erl
index eb21d50a37..7f3ef86ac5 100644
--- a/lib/asn1/test/testSeqPrim.erl
+++ b/lib/asn1/test/testSeqPrim.erl
@@ -25,6 +25,7 @@
-record('Seq',{bool, boolCon, boolPri, boolApp, boolExpCon, boolExpPri, boolExpApp}).
-record('Empty',{}).
+-record('Big', {os1,os2,os3}).
main(_Rules) ->
roundtrip('Seq', #'Seq'{bool=true,boolCon=true,boolPri=true,boolApp=true,
@@ -35,6 +36,9 @@ main(_Rules) ->
roundtrip('Seq', #'Seq'{bool=false,boolCon=true,boolPri=false,boolApp=true,
boolExpCon=false,boolExpPri=true,boolExpApp=false}),
roundtrip('Empty', #'Empty'{}),
+ roundtrip('Big', #'Big'{os1=list_to_binary(lists:duplicate(120, 16#A5)),
+ os2=list_to_binary(lists:duplicate(128, 16#A7)),
+ os3=list_to_binary(lists:duplicate(17777, 16#F5))}),
ok.
roundtrip(Type, Value) ->
diff --git a/lib/asn1/test/testSeqSetDefaultVal.erl b/lib/asn1/test/testSeqSetDefaultVal.erl
index 044099199f..79992a0a94 100644
--- a/lib/asn1/test/testSeqSetDefaultVal.erl
+++ b/lib/asn1/test/testSeqSetDefaultVal.erl
@@ -162,7 +162,7 @@ main(Rule, Opts) ->
{#'SeqOS'{},
[{#'SeqOS'.a,
[asn1_DEFAULT,
- [172]]}]},
+ <<172>>]}]},
{#'SeqOI'{},
[{#'SeqOI'.a,
@@ -314,17 +314,10 @@ der() ->
c=[second], d = <<>>}),
roundtrip(<<48,0>>, 'SeqOS',
- #'SeqOS'{a=[172],b=[16#A8,16#A0],c='NULL'}),
- roundtrip(<<48,0>>,
- 'SeqOS',
- #'SeqOS'{a=172,b=43168,c='NULL'},
- #'SeqOS'{a=[172],b=[16#A8,16#A0],c='NULL'}),
+ #'SeqOS'{a = <<172>>,b = <<16#A8,16#A0>>,c='NULL'}),
- roundtrip(<<49,0>>, 'SetOS', #'SetOS'{a=[172],b=[16#A8,16#A0],c='NULL'}),
- roundtrip(<<49,0>>,
- 'SetOS',
- #'SetOS'{a=172,b=43168,c='NULL'},
- #'SetOS'{a=[172],b=[16#A8,16#A0],c='NULL'}),
+ roundtrip(<<49,0>>, 'SetOS',
+ #'SetOS'{a = <<172>>,b = <<16#A8,16#A0>>,c='NULL'}),
roundtrip(<<48,0>>,
'SeqOI',
diff --git a/lib/asn1/test/testSeqTag.erl b/lib/asn1/test/testSeqTag.erl
index 2f127b3e97..6bacca6808 100644
--- a/lib/asn1/test/testSeqTag.erl
+++ b/lib/asn1/test/testSeqTag.erl
@@ -35,24 +35,24 @@
-record('Exp',{os, bool}).
main(_Rules) ->
- roundtrip('SeqTag', #'SeqTag'{nt=#'NT'{os="kalle",bool=true},
- imp=#'Imp'{os="kalle",bool=true},
- exp=#'Exp'{os="kalle",bool=true}}),
- roundtrip('SeqTagImp', #'SeqTagImp'{nt=#'NT'{os="kalle",bool=true},
- imp=#'Imp'{os="kalle",bool=true},
- exp=#'Exp'{os="kalle",bool=true}}),
- roundtrip('SeqTagExp', #'SeqTagExp'{nt=#'NT'{os="kalle",bool=true},
- imp=#'Imp'{os="kalle",bool=true},
- exp=#'Exp'{os="kalle",bool=true}}),
- roundtrip('SeqTagX', #'SeqTagX'{xnt=#'XSeqNT'{os="kalle",bool=true},
- ximp=#'XSeqImp'{os="kalle",bool=true},
- xexp=#'XSeqExp'{os="kalle",bool=true}}),
- roundtrip('SeqTagImpX', #'SeqTagImpX'{xnt=#'XSeqNT'{os="kalle",bool=true},
- ximp=#'XSeqImp'{os="kalle",bool=true},
- xexp=#'XSeqExp'{os="kalle",bool=true}}),
- roundtrip('SeqTagExpX', #'SeqTagExpX'{xnt=#'XSeqNT'{os="kalle",bool=true},
- ximp=#'XSeqImp'{os="kalle",bool=true},
- xexp=#'XSeqExp'{os="kalle",bool=true}}),
+ roundtrip('SeqTag', #'SeqTag'{nt=#'NT'{os = <<"kalle">>,bool=true},
+ imp=#'Imp'{os = <<"kalle">>,bool=true},
+ exp=#'Exp'{os = <<"kalle">>,bool=true}}),
+ roundtrip('SeqTagImp', #'SeqTagImp'{nt=#'NT'{os = <<"kalle">>,bool=true},
+ imp=#'Imp'{os = <<"kalle">>,bool=true},
+ exp=#'Exp'{os = <<"kalle">>,bool=true}}),
+ roundtrip('SeqTagExp', #'SeqTagExp'{nt=#'NT'{os = <<"kalle">>,bool=true},
+ imp=#'Imp'{os = <<"kalle">>,bool=true},
+ exp=#'Exp'{os = <<"kalle">>,bool=true}}),
+ roundtrip('SeqTagX', #'SeqTagX'{xnt=#'XSeqNT'{os = <<"kalle">>,bool=true},
+ ximp=#'XSeqImp'{os = <<"kalle">>,bool=true},
+ xexp=#'XSeqExp'{os = <<"kalle">>,bool=true}}),
+ roundtrip('SeqTagImpX', #'SeqTagImpX'{xnt=#'XSeqNT'{os = <<"kalle">>,bool=true},
+ ximp=#'XSeqImp'{os = <<"kalle">>,bool=true},
+ xexp=#'XSeqExp'{os = <<"kalle">>,bool=true}}),
+ roundtrip('SeqTagExpX', #'SeqTagExpX'{xnt=#'XSeqNT'{os = <<"kalle">>,bool=true},
+ ximp=#'XSeqImp'{os = <<"kalle">>,bool=true},
+ xexp=#'XSeqExp'{os = <<"kalle">>,bool=true}}),
ok.
roundtrip(T, V) ->
diff --git a/lib/asn1/test/testSeqTypeRefCho.erl b/lib/asn1/test/testSeqTypeRefCho.erl
index b008bc46b8..1a921c6f38 100644
--- a/lib/asn1/test/testSeqTypeRefCho.erl
+++ b/lib/asn1/test/testSeqTypeRefCho.erl
@@ -28,10 +28,10 @@
main(_Rules) ->
roundtrip('SeqTRcho',
- #'SeqTRcho'{'seqCho' = {choOs,"A string 1"},
- 'seqChoE' = {choOs,"A string 3"},
- 'seqCho-E' = {choOs,"A string 7"},
- 'seqChoE-E' = {choOs,"A string 9"}}),
+ #'SeqTRcho'{'seqCho' = {choOs,<<"A string 1">>},
+ 'seqChoE' = {choOs,<<"A string 3">>},
+ 'seqCho-E' = {choOs,<<"A string 7">>},
+ 'seqChoE-E' = {choOs,<<"A string 9">>}}),
ok.
roundtrip(T, V) ->
diff --git a/lib/asn1/test/testSeqTypeRefPrim.erl b/lib/asn1/test/testSeqTypeRefPrim.erl
index b63882ae99..d66d1ebcfe 100644
--- a/lib/asn1/test/testSeqTypeRefPrim.erl
+++ b/lib/asn1/test/testSeqTypeRefPrim.erl
@@ -26,15 +26,15 @@
main(_Rules) ->
roundtrip('SeqTR',
- #'SeqTR'{'octStr' = "A string 1",
- 'octStrI' = "A string 2",
- 'octStrE' = "A string 3",
- 'octStr-I' = "A string 4",
- 'octStrI-I' = "A string 5",
- 'octStrE-I' = "A string 6",
- 'octStr-E' = "A string 7",
- 'octStrI-E' = "A string 8",
- 'octStrE-E' = "A string 9"}),
+ #'SeqTR'{'octStr' = <<"A string 1">>,
+ 'octStrI' = <<"A string 2">>,
+ 'octStrE' = <<"A string 3">>,
+ 'octStr-I' = <<"A string 4">>,
+ 'octStrI-I' = <<"A string 5">>,
+ 'octStrE-I' = <<"A string 6">>,
+ 'octStr-E' = <<"A string 7">>,
+ 'octStrI-E' = <<"A string 8">>,
+ 'octStrE-E' = <<"A string 9">>}),
ok.
roundtrip(T, V) ->
diff --git a/lib/asn1/test/testSeqTypeRefSeq.erl b/lib/asn1/test/testSeqTypeRefSeq.erl
index fc2e0a67c9..3288511f0a 100644
--- a/lib/asn1/test/testSeqTypeRefSeq.erl
+++ b/lib/asn1/test/testSeqTypeRefSeq.erl
@@ -71,15 +71,15 @@ main(_Rules) ->
seqS2=#'SeqSTag_seqS2'{b2=true,i2=22},
seqS3=#'SeqSTag_seqS3'{b3=true,i3=33}}),
roundtrip('SeqTRseq',
- #'SeqTRseq'{seqSeq=#'SeqSeq'{seqInt=2,seqOs="A1"},
- seqSeqI=#'SeqSeq'{seqInt=2,seqOs="A2"},
- seqSeqE=#'SeqSeq'{seqInt=2,seqOs="A3"},
- 'seqSeq-I'=#'SeqSeqImp'{seqInt=2,seqOs="A4"},
- 'seqSeqI-I'=#'SeqSeqImp'{seqInt=2,seqOs="A5"},
- 'seqSeqE-I'=#'SeqSeqImp'{seqInt=2,seqOs="A6"},
- 'seqSeq-E'=#'SeqSeqExp'{seqInt=2,seqOs="A7"},
- 'seqSeqI-E'=#'SeqSeqExp'{seqInt=2,seqOs="A8"},
- 'seqSeqE-E'=#'SeqSeqExp'{seqInt=2,seqOs="A9"}}),
+ #'SeqTRseq'{seqSeq=#'SeqSeq'{seqInt=2,seqOs = <<"A1">>},
+ seqSeqI=#'SeqSeq'{seqInt=2,seqOs = <<"A2">>},
+ seqSeqE=#'SeqSeq'{seqInt=2,seqOs = <<"A3">>},
+ 'seqSeq-I'=#'SeqSeqImp'{seqInt=2,seqOs = <<"A4">>},
+ 'seqSeqI-I'=#'SeqSeqImp'{seqInt=2,seqOs = <<"A5">>},
+ 'seqSeqE-I'=#'SeqSeqImp'{seqInt=2,seqOs = <<"A6">>},
+ 'seqSeq-E'=#'SeqSeqExp'{seqInt=2,seqOs = <<"A7">>},
+ 'seqSeqI-E'=#'SeqSeqExp'{seqInt=2,seqOs = <<"A8">>},
+ 'seqSeqE-E'=#'SeqSeqExp'{seqInt=2,seqOs = <<"A9">>}}),
ok.
roundtrip(T, V) ->
diff --git a/lib/asn1/test/testSeqTypeRefSet.erl b/lib/asn1/test/testSeqTypeRefSet.erl
index 911a4b7a47..d73423284b 100644
--- a/lib/asn1/test/testSeqTypeRefSet.erl
+++ b/lib/asn1/test/testSeqTypeRefSet.erl
@@ -32,15 +32,15 @@
main(_Rules) ->
roundtrip('SeqTRset',
- #'SeqTRset'{seqSet=#'SeqSet'{setInt=2,setOs="A1"},
- seqSetI=#'SeqSet'{setInt=2,setOs="A2"},
- seqSetE=#'SeqSet'{setInt=2,setOs="A3"},
- 'seqSet-I'=#'SeqSetImp'{setInt=2,setOs="A4"},
- 'seqSetI-I'=#'SeqSetImp'{setInt=2,setOs="A5"},
- 'seqSetE-I'=#'SeqSetImp'{setInt=2,setOs="A6"},
- 'seqSet-E'=#'SeqSetExp'{setInt=2,setOs="A7"},
- 'seqSetI-E'=#'SeqSetExp'{setInt=2,setOs="A8"},
- 'seqSetE-E'=#'SeqSetExp'{setInt=2,setOs="A9"}}),
+ #'SeqTRset'{seqSet=#'SeqSet'{setInt=2,setOs = <<"A1">>},
+ seqSetI=#'SeqSet'{setInt=2,setOs = <<"A2">>},
+ seqSetE=#'SeqSet'{setInt=2,setOs = <<"A3">>},
+ 'seqSet-I'=#'SeqSetImp'{setInt=2,setOs = <<"A4">>},
+ 'seqSetI-I'=#'SeqSetImp'{setInt=2,setOs = <<"A5">>},
+ 'seqSetE-I'=#'SeqSetImp'{setInt=2,setOs = <<"A6">>},
+ 'seqSet-E'=#'SeqSetExp'{setInt=2,setOs = <<"A7">>},
+ 'seqSetI-E'=#'SeqSetExp'{setInt=2,setOs = <<"A8">>},
+ 'seqSetE-E'=#'SeqSetExp'{setInt=2,setOs = <<"A9">>}}),
ok.
roundtrip(T, V) ->
diff --git a/lib/asn1/test/testSetExternal.erl b/lib/asn1/test/testSetExternal.erl
index e17d7053aa..626adc5822 100644
--- a/lib/asn1/test/testSetExternal.erl
+++ b/lib/asn1/test/testSetExternal.erl
@@ -28,15 +28,15 @@
-record('SetXSeq3',{bool, int, seq}).
main(_Rules) ->
- roundtrip('XNTNT', #'XSetNT'{os="kalle",bool=true}),
- roundtrip('XImpNT', #'XSetNT'{os="kalle",bool=true}),
- roundtrip('XExpNT', #'XSetNT'{os="kalle",bool=true}),
- roundtrip('XNTImp', #'XSetImp'{os="kalle",bool=true}),
- roundtrip('XImpImp', #'XSetImp'{os="kalle",bool=true}),
- roundtrip('XExpImp', #'XSetImp'{os="kalle",bool=true}),
- roundtrip('XNTExp', #'XSetExp'{os="kalle",bool=true}),
- roundtrip('XImpExp', #'XSetExp'{os="kalle",bool=true}),
- roundtrip('XExpExp', #'XSetExp'{os="kalle",bool=true}),
+ roundtrip('XNTNT', #'XSetNT'{os = <<"kalle">>,bool=true}),
+ roundtrip('XImpNT', #'XSetNT'{os = <<"kalle">>,bool=true}),
+ roundtrip('XExpNT', #'XSetNT'{os = <<"kalle">>,bool=true}),
+ roundtrip('XNTImp', #'XSetImp'{os = <<"kalle">>,bool=true}),
+ roundtrip('XImpImp', #'XSetImp'{os = <<"kalle">>,bool=true}),
+ roundtrip('XExpImp', #'XSetImp'{os = <<"kalle">>,bool=true}),
+ roundtrip('XNTExp', #'XSetExp'{os = <<"kalle">>,bool=true}),
+ roundtrip('XImpExp', #'XSetExp'{os = <<"kalle">>,bool=true}),
+ roundtrip('XExpExp', #'XSetExp'{os = <<"kalle">>,bool=true}),
roundtrip('SetXSeq1', #'SetXSeq1'{seq=#'XSeq1'{bool1=true,int1=77,
seq1=#'XSeqIn'{boolIn=false,intIn=88}},
bool=true,int=66}),
diff --git a/lib/asn1/test/testSetOf.erl b/lib/asn1/test/testSetOf.erl
index 54c42c1f21..0f82a14625 100644
--- a/lib/asn1/test/testSetOf.erl
+++ b/lib/asn1/test/testSetOf.erl
@@ -121,9 +121,9 @@ main(_Rules) ->
#'SetIn'{boolIn=false,intIn=125},
#'SetIn'{boolIn=false,intIn=225}]}),
- roundtrip('SetOs', ["First","Second","Third"]),
- roundtrip('SetOsImp', ["First","Second","Third"]),
- roundtrip('SetOsExp', ["First","Second","Third"]),
+ roundtrip('SetOs', [<<"First">>,<<"Second">>,<<"Third">>]),
+ roundtrip('SetOsImp', [<<"First">>,<<"Second">>,<<"Third">>]),
+ roundtrip('SetOsExp', [<<"First">>,<<"Second">>,<<"Third">>]),
roundtrip('SetEmp', #'SetEmp'{set1=[#'Empty'{}]}),
ok.
diff --git a/lib/asn1/test/testSetOfExternal.erl b/lib/asn1/test/testSetOfExternal.erl
index a380ba5ac1..cc5fe10710 100644
--- a/lib/asn1/test/testSetOfExternal.erl
+++ b/lib/asn1/test/testSetOfExternal.erl
@@ -28,24 +28,42 @@
-record('Exp',{os, bool}).
main(_Rules) ->
- roundtrip('NTNT', [#'NT'{os="kalle",bool=true},#'NT'{os="kalle",bool=true}]),
- roundtrip('ImpNT', [#'NT'{os="kalle",bool=true},#'NT'{os="kalle",bool=true}]),
- roundtrip('ExpNT', [#'NT'{os="kalle",bool=true},#'NT'{os="kalle",bool=true}]),
- roundtrip('NTImp', [#'Imp'{os="kalle",bool=true},#'Imp'{os="kalle",bool=true}]),
- roundtrip('ImpImp', [#'Imp'{os="kalle",bool=true},#'Imp'{os="kalle",bool=true}]),
- roundtrip('ExpImp', [#'Imp'{os="kalle",bool=true},#'Imp'{os="kalle",bool=true}]),
- roundtrip('NTExp', [#'Exp'{os="kalle",bool=true},#'Exp'{os="kalle",bool=true}]),
- roundtrip('ImpExp', [#'Exp'{os="kalle",bool=true},#'Exp'{os="kalle",bool=true}]),
- roundtrip('ExpExp', [#'Exp'{os="kalle",bool=true},#'Exp'{os="kalle",bool=true}]),
- roundtrip('XNTNT', [#'XSetNT'{os="kalle",bool=true},#'XSetNT'{os="kalle",bool=true}]),
- roundtrip('XImpNT', [#'XSetNT'{os="kalle",bool=true},#'XSetNT'{os="kalle",bool=true}]),
- roundtrip('XExpNT', [#'XSetNT'{os="kalle",bool=true},#'XSetNT'{os="kalle",bool=true}]),
- roundtrip('XNTImp', [#'XSetImp'{os="kalle",bool=true},#'XSetImp'{os="kalle",bool=true}]),
- roundtrip('XImpImp', [#'XSetImp'{os="kalle",bool=true},#'XSetImp'{os="kalle",bool=true}]),
- roundtrip('XExpImp', [#'XSetImp'{os="kalle",bool=true},#'XSetImp'{os="kalle",bool=true}]),
- roundtrip('XNTExp', [#'XSetExp'{os="kalle",bool=true},#'XSetExp'{os="kalle",bool=true}]),
- roundtrip('XImpExp', [#'XSetExp'{os="kalle",bool=true},#'XSetExp'{os="kalle",bool=true}]),
- roundtrip('XExpExp', [#'XSetExp'{os="kalle",bool=true},#'XSetExp'{os="kalle",bool=true}]),
+ roundtrip('NTNT', [#'NT'{os = <<"kalle">>,bool=true},
+ #'NT'{os = <<"kalle">>,bool=true}]),
+ roundtrip('ImpNT', [#'NT'{os = <<"kalle">>,bool=true},
+ #'NT'{os = <<"kalle">>,bool=true}]),
+ roundtrip('ExpNT', [#'NT'{os = <<"kalle">>,bool=true},
+ #'NT'{os = <<"kalle">>,bool=true}]),
+ roundtrip('NTImp', [#'Imp'{os = <<"kalle">>,bool=true},
+ #'Imp'{os = <<"kalle">>,bool=true}]),
+ roundtrip('ImpImp', [#'Imp'{os = <<"kalle">>,bool=true},
+ #'Imp'{os = <<"kalle">>,bool=true}]),
+ roundtrip('ExpImp', [#'Imp'{os = <<"kalle">>,bool=true},
+ #'Imp'{os = <<"kalle">>,bool=true}]),
+ roundtrip('NTExp', [#'Exp'{os = <<"kalle">>,bool=true},
+ #'Exp'{os = <<"kalle">>,bool=true}]),
+ roundtrip('ImpExp', [#'Exp'{os = <<"kalle">>,bool=true},
+ #'Exp'{os = <<"kalle">>,bool=true}]),
+ roundtrip('ExpExp', [#'Exp'{os = <<"kalle">>,bool=true},
+ #'Exp'{os = <<"kalle">>,bool=true}]),
+ roundtrip('XNTNT', [#'XSetNT'{os = <<"kalle">>,bool=true},
+ #'XSetNT'{os = <<"kalle">>,bool=true}]),
+ roundtrip('XImpNT', [#'XSetNT'{os = <<"kalle">>,bool=true},
+ #'XSetNT'{os = <<"kalle">>,bool=true}]),
+ roundtrip('XExpNT', [#'XSetNT'{os = <<"kalle">>,bool=true},
+ #'XSetNT'{os = <<"kalle">>,bool=true}]),
+ roundtrip('XNTImp', [#'XSetImp'{os = <<"kalle">>,bool=true},
+ #'XSetImp'{os = <<"kalle">>,bool=true}]),
+ roundtrip('XImpImp', [#'XSetImp'{os = <<"kalle">>,bool=true},
+ #'XSetImp'{os = <<"kalle">>,bool=true}]),
+ roundtrip('XExpImp', [#'XSetImp'{os = <<"kalle">>,bool=true},
+ #'XSetImp'{os = <<"kalle">>,bool=true}]),
+ roundtrip('XNTExp', [#'XSetExp'{os = <<"kalle">>,bool=true},
+ #'XSetExp'{os = <<"kalle">>,bool=true}]),
+ roundtrip('XImpExp', [#'XSetExp'{os = <<"kalle">>,bool=true},
+ #'XSetExp'{os = <<"kalle">>,bool=true}]),
+ roundtrip('XExpExp', [#'XSetExp'{os = <<"kalle">>,bool=true},
+ #'XSetExp'{os = <<"kalle">>,bool=true}]),
ok.
roundtrip(T, V) ->
diff --git a/lib/asn1/test/testSetOfTag.erl b/lib/asn1/test/testSetOfTag.erl
index 81bc467abb..0d656f05a6 100644
--- a/lib/asn1/test/testSetOfTag.erl
+++ b/lib/asn1/test/testSetOfTag.erl
@@ -42,42 +42,42 @@
-record('Exp',{os, bool}).
main(_Rules) ->
- roundtrip('SetTagNt', #'SetTagNt'{nt=[#'NT'{os="kalle",bool=true},
- #'NT'{os="kalle",bool=true}]}),
- roundtrip('SetTagNtI', #'SetTagNtI'{imp=[#'Imp'{os="kalle",bool=true},
- #'Imp'{os="kalle",bool=true}]}),
- roundtrip('SetTagNtE', #'SetTagNtE'{exp=[#'Exp'{os="kalle",bool=true},
- #'Exp'{os="kalle",bool=true}]}),
- roundtrip('SetTagI', #'SetTagI'{nt=[#'NT'{os="kalle",bool=true},
- #'NT'{os="kalle",bool=true}]}),
- roundtrip('SetTagII', #'SetTagII'{imp=[#'Imp'{os="kalle",bool=true},
- #'Imp'{os="kalle",bool=true}]}),
- roundtrip('SetTagIE', #'SetTagIE'{exp=[#'Exp'{os="kalle",bool=true},
- #'Exp'{os="kalle",bool=true}]}),
- roundtrip('SetTagE', #'SetTagE'{nt=[#'NT'{os="kalle",bool=true},
- #'NT'{os="kalle",bool=true}]}),
- roundtrip('SetTagEI', #'SetTagEI'{imp=[#'Imp'{os="kalle",bool=true},
- #'Imp'{os="kalle",bool=true}]}),
- roundtrip('SetTagEE', #'SetTagEE'{exp=[#'Exp'{os="kalle",bool=true},
- #'Exp'{os="kalle",bool=true}]}),
- roundtrip('SetTagXNt', #'SetTagXNt'{xnt=[#'XSetNT'{os="kalle",bool=true},
- #'XSetNT'{os="kalle",bool=true}]}),
- roundtrip('SetTagXI', #'SetTagXI'{ximp=[#'XSetImp'{os="kalle",bool=true},
- #'XSetImp'{os="kalle",bool=true}]}),
- roundtrip('SetTagXE', #'SetTagXE'{xexp=[#'XSetExp'{os="kalle",bool=true},
- #'XSetExp'{os="kalle",bool=true}]}),
- roundtrip('SetTagImpX', #'SetTagImpX'{xnt=[#'XSetNT'{os="kalle",bool=true},
- #'XSetNT'{os="kalle",bool=true}],
- ximp=[#'XSetImp'{os="kalle",bool=true},
- #'XSetImp'{os="kalle",bool=true}],
- xexp=[#'XSetExp'{os="kalle",bool=true},
- #'XSetExp'{os="kalle",bool=true}]}),
- roundtrip('SetTagExpX', #'SetTagExpX'{xnt=[#'XSetNT'{os="kalle",bool=true},
- #'XSetNT'{os="kalle",bool=true}],
- ximp=[#'XSetImp'{os="kalle",bool=true},
- #'XSetImp'{os="kalle",bool=true}],
- xexp=[#'XSetExp'{os="kalle",bool=true},
- #'XSetExp'{os="kalle",bool=true}]}),
+ roundtrip('SetTagNt', #'SetTagNt'{nt=[#'NT'{os = <<"kalle">>,bool=true},
+ #'NT'{os = <<"kalle">>,bool=true}]}),
+ roundtrip('SetTagNtI', #'SetTagNtI'{imp=[#'Imp'{os = <<"kalle">>,bool=true},
+ #'Imp'{os = <<"kalle">>,bool=true}]}),
+ roundtrip('SetTagNtE', #'SetTagNtE'{exp=[#'Exp'{os = <<"kalle">>,bool=true},
+ #'Exp'{os = <<"kalle">>,bool=true}]}),
+ roundtrip('SetTagI', #'SetTagI'{nt=[#'NT'{os = <<"kalle">>,bool=true},
+ #'NT'{os = <<"kalle">>,bool=true}]}),
+ roundtrip('SetTagII', #'SetTagII'{imp=[#'Imp'{os = <<"kalle">>,bool=true},
+ #'Imp'{os = <<"kalle">>,bool=true}]}),
+ roundtrip('SetTagIE', #'SetTagIE'{exp=[#'Exp'{os = <<"kalle">>,bool=true},
+ #'Exp'{os = <<"kalle">>,bool=true}]}),
+ roundtrip('SetTagE', #'SetTagE'{nt=[#'NT'{os = <<"kalle">>,bool=true},
+ #'NT'{os = <<"kalle">>,bool=true}]}),
+ roundtrip('SetTagEI', #'SetTagEI'{imp=[#'Imp'{os = <<"kalle">>,bool=true},
+ #'Imp'{os = <<"kalle">>,bool=true}]}),
+ roundtrip('SetTagEE', #'SetTagEE'{exp=[#'Exp'{os = <<"kalle">>,bool=true},
+ #'Exp'{os = <<"kalle">>,bool=true}]}),
+ roundtrip('SetTagXNt', #'SetTagXNt'{xnt=[#'XSetNT'{os = <<"kalle">>,bool=true},
+ #'XSetNT'{os = <<"kalle">>,bool=true}]}),
+ roundtrip('SetTagXI', #'SetTagXI'{ximp=[#'XSetImp'{os = <<"kalle">>,bool=true},
+ #'XSetImp'{os = <<"kalle">>,bool=true}]}),
+ roundtrip('SetTagXE', #'SetTagXE'{xexp=[#'XSetExp'{os = <<"kalle">>,bool=true},
+ #'XSetExp'{os = <<"kalle">>,bool=true}]}),
+ roundtrip('SetTagImpX', #'SetTagImpX'{xnt=[#'XSetNT'{os = <<"kalle">>,bool=true},
+ #'XSetNT'{os = <<"kalle">>,bool=true}],
+ ximp=[#'XSetImp'{os = <<"kalle">>,bool=true},
+ #'XSetImp'{os = <<"kalle">>,bool=true}],
+ xexp=[#'XSetExp'{os = <<"kalle">>,bool=true},
+ #'XSetExp'{os = <<"kalle">>,bool=true}]}),
+ roundtrip('SetTagExpX', #'SetTagExpX'{xnt=[#'XSetNT'{os = <<"kalle">>,bool=true},
+ #'XSetNT'{os = <<"kalle">>,bool=true}],
+ ximp=[#'XSetImp'{os = <<"kalle">>,bool=true},
+ #'XSetImp'{os = <<"kalle">>,bool=true}],
+ xexp=[#'XSetExp'{os = <<"kalle">>,bool=true},
+ #'XSetExp'{os = <<"kalle">>,bool=true}]}),
ok.
roundtrip(T, V) ->
diff --git a/lib/asn1/test/testSetTag.erl b/lib/asn1/test/testSetTag.erl
index 5863a149b9..fa1d84f50d 100644
--- a/lib/asn1/test/testSetTag.erl
+++ b/lib/asn1/test/testSetTag.erl
@@ -34,24 +34,24 @@
-record('Exp',{os, bool}).
main(_Rules) ->
- roundtrip('SetTag', #'SetTag'{nt=#'NT'{os="kalle",bool=true},
- imp=#'Imp'{os="kalle",bool=true},
- exp=#'Exp'{os="kalle",bool=true}}),
- roundtrip('SetTagImp', #'SetTagImp'{nt=#'NT'{os="kalle",bool=true},
- imp=#'Imp'{os="kalle",bool=true},
- exp=#'Exp'{os="kalle",bool=true}}),
- roundtrip('SetTagExp', #'SetTagExp'{nt=#'NT'{os="kalle",bool=true},
- imp=#'Imp'{os="kalle",bool=true},
- exp=#'Exp'{os="kalle",bool=true}}),
- roundtrip('SetTagX', #'SetTagX'{xnt=#'XSetNT'{os="kalle",bool=true},
- ximp=#'XSetImp'{os="kalle",bool=true},
- xexp=#'XSetExp'{os="kalle",bool=true}}),
- roundtrip('SetTagImpX', #'SetTagImpX'{xnt=#'XSetNT'{os="kalle",bool=true},
- ximp=#'XSetImp'{os="kalle",bool=true},
- xexp=#'XSetExp'{os="kalle",bool=true}}),
- roundtrip('SetTagExpX', #'SetTagExpX'{xnt=#'XSetNT'{os="kalle",bool=true},
- ximp=#'XSetImp'{os="kalle",bool=true},
- xexp=#'XSetExp'{os="kalle",bool=true}}),
+ roundtrip('SetTag', #'SetTag'{nt=#'NT'{os = <<"kalle">>,bool=true},
+ imp=#'Imp'{os = <<"kalle">>,bool=true},
+ exp=#'Exp'{os = <<"kalle">>,bool=true}}),
+ roundtrip('SetTagImp', #'SetTagImp'{nt=#'NT'{os = <<"kalle">>,bool=true},
+ imp=#'Imp'{os = <<"kalle">>,bool=true},
+ exp=#'Exp'{os = <<"kalle">>,bool=true}}),
+ roundtrip('SetTagExp', #'SetTagExp'{nt=#'NT'{os = <<"kalle">>,bool=true},
+ imp=#'Imp'{os = <<"kalle">>,bool=true},
+ exp=#'Exp'{os = <<"kalle">>,bool=true}}),
+ roundtrip('SetTagX', #'SetTagX'{xnt=#'XSetNT'{os = <<"kalle">>,bool=true},
+ ximp=#'XSetImp'{os = <<"kalle">>,bool=true},
+ xexp=#'XSetExp'{os = <<"kalle">>,bool=true}}),
+ roundtrip('SetTagImpX', #'SetTagImpX'{xnt=#'XSetNT'{os = <<"kalle">>,bool=true},
+ ximp=#'XSetImp'{os = <<"kalle">>,bool=true},
+ xexp=#'XSetExp'{os = <<"kalle">>,bool=true}}),
+ roundtrip('SetTagExpX', #'SetTagExpX'{xnt=#'XSetNT'{os = <<"kalle">>,bool=true},
+ ximp=#'XSetImp'{os = <<"kalle">>,bool=true},
+ xexp=#'XSetExp'{os = <<"kalle">>,bool=true}}),
ok.
roundtrip(T, V) ->
diff --git a/lib/asn1/test/testSetTypeRefCho.erl b/lib/asn1/test/testSetTypeRefCho.erl
index 8d62f45bfa..97bbd557e0 100644
--- a/lib/asn1/test/testSetTypeRefCho.erl
+++ b/lib/asn1/test/testSetTypeRefCho.erl
@@ -29,10 +29,10 @@
main(_Rules) ->
roundtrip('SetTRcho',
- #'SetTRcho'{'setCho' = {choOs,"A string 1"},
- 'setChoE' = {choOs,"A string 3"},
- 'setCho-E' = {choOs,"A string 7"},
- 'setChoE-E' = {choOs,"A string 9"}}),
+ #'SetTRcho'{'setCho' = {choOs,<<"A string 1">>},
+ 'setChoE' = {choOs,<<"A string 3">>},
+ 'setCho-E' = {choOs,<<"A string 7">>},
+ 'setChoE-E' = {choOs,<<"A string 9">>}}),
ok.
roundtrip(T, V) ->
diff --git a/lib/asn1/test/testSetTypeRefPrim.erl b/lib/asn1/test/testSetTypeRefPrim.erl
index cc2e157e68..d441fb789d 100644
--- a/lib/asn1/test/testSetTypeRefPrim.erl
+++ b/lib/asn1/test/testSetTypeRefPrim.erl
@@ -28,15 +28,15 @@
main(_Rules) ->
roundtrip('SetTR',
- #'SetTR'{'octStr' = "A string 1",
- 'octStrI' = "A string 2",
- 'octStrE' = "A string 3",
- 'octStr-I' = "A string 4",
- 'octStrI-I' = "A string 5",
- 'octStrE-I' = "A string 6",
- 'octStr-E' = "A string 7",
- 'octStrI-E' = "A string 8",
- 'octStrE-E' = "A string 9"}),
+ #'SetTR'{'octStr' = <<"A string 1">>,
+ 'octStrI' = <<"A string 2">>,
+ 'octStrE' = <<"A string 3">>,
+ 'octStr-I' = <<"A string 4">>,
+ 'octStrI-I' = <<"A string 5">>,
+ 'octStrE-I' = <<"A string 6">>,
+ 'octStr-E' = <<"A string 7">>,
+ 'octStrI-E' = <<"A string 8">>,
+ 'octStrE-E' = <<"A string 9">>}),
ok.
roundtrip(T, V) ->
diff --git a/lib/asn1/test/testSetTypeRefSeq.erl b/lib/asn1/test/testSetTypeRefSeq.erl
index 17af5c2922..a2b5f5745e 100644
--- a/lib/asn1/test/testSetTypeRefSeq.erl
+++ b/lib/asn1/test/testSetTypeRefSeq.erl
@@ -30,23 +30,23 @@
main(_Rules) ->
roundtrip('SetTRseq',
- #'SetTRseq'{'setSeq' = #'SetSeq'{seqOs = "A1",
+ #'SetTRseq'{'setSeq' = #'SetSeq'{seqOs = <<"A1">>,
seqInt = 2},
- 'setSeqI' = #'SetSeq'{seqOs = "A2",
+ 'setSeqI' = #'SetSeq'{seqOs = <<"A2">>,
seqInt = 2},
- 'setSeqE' = #'SetSeq'{seqOs = "A3",
+ 'setSeqE' = #'SetSeq'{seqOs = <<"A3">>,
seqInt = 2},
- 'setSeq-I' = #'SetSeqImp'{seqOs = "A4",
+ 'setSeq-I' = #'SetSeqImp'{seqOs = <<"A4">>,
seqInt = 2},
- 'setSeqI-I' = #'SetSeqImp'{seqOs = "A5",
+ 'setSeqI-I' = #'SetSeqImp'{seqOs = <<"A5">>,
seqInt = 2},
- 'setSeqE-I' = #'SetSeqImp'{seqOs = "A6",
+ 'setSeqE-I' = #'SetSeqImp'{seqOs = <<"A6">>,
seqInt = 2},
- 'setSeq-E' = #'SetSeqExp'{seqOs = "A7",
+ 'setSeq-E' = #'SetSeqExp'{seqOs = <<"A7">>,
seqInt = 2},
- 'setSeqI-E' = #'SetSeqExp'{seqOs = "A8",
+ 'setSeqI-E' = #'SetSeqExp'{seqOs = <<"A8">>,
seqInt = 2},
- 'setSeqE-E' = #'SetSeqExp'{seqOs = "A9",
+ 'setSeqE-E' = #'SetSeqExp'{seqOs = <<"A9">>,
seqInt = 2}}),
ok.
diff --git a/lib/asn1/test/testSetTypeRefSet.erl b/lib/asn1/test/testSetTypeRefSet.erl
index 8786e0fb4d..80a6be58c9 100644
--- a/lib/asn1/test/testSetTypeRefSet.erl
+++ b/lib/asn1/test/testSetTypeRefSet.erl
@@ -71,15 +71,15 @@ main(_Rules) ->
setS2=#'SetSTag_setS2'{b2=true,i2=22},
setS3=#'SetSTag_setS3'{b3=true,i3=33}}),
roundtrip('SetTRset',
- #'SetTRset'{setSet=#'SetSet'{setInt=2,setOs="A1"},
- setSetI=#'SetSet'{setInt=2,setOs="A2"},
- setSetE=#'SetSet'{setInt=2,setOs="A3"},
- 'setSet-I'=#'SetSetImp'{setInt=2,setOs="A4"},
- 'setSetI-I'=#'SetSetImp'{setInt=2,setOs="A5"},
- 'setSetE-I'=#'SetSetImp'{setInt=2,setOs="A6"},
- 'setSet-E'=#'SetSetExp'{setInt=2,setOs="A7"},
- 'setSetI-E'=#'SetSetExp'{setInt=2,setOs="A8"},
- 'setSetE-E'=#'SetSetExp'{setInt=2,setOs="A9"}}),
+ #'SetTRset'{setSet=#'SetSet'{setInt=2,setOs = <<"A1">>},
+ setSetI=#'SetSet'{setInt=2,setOs = <<"A2">>},
+ setSetE=#'SetSet'{setInt=2,setOs = <<"A3">>},
+ 'setSet-I'=#'SetSetImp'{setInt=2,setOs = <<"A4">>},
+ 'setSetI-I'=#'SetSetImp'{setInt=2,setOs = <<"A5">>},
+ 'setSetE-I'=#'SetSetImp'{setInt=2,setOs = <<"A6">>},
+ 'setSet-E'=#'SetSetExp'{setInt=2,setOs = <<"A7">>},
+ 'setSetI-E'=#'SetSetExp'{setInt=2,setOs = <<"A8">>},
+ 'setSetE-E'=#'SetSetExp'{setInt=2,setOs = <<"A9">>}}),
ok.
diff --git a/lib/asn1/test/testTimer.erl b/lib/asn1/test/testTimer.erl
index 0f02bab6e0..89bc2b463d 100644
--- a/lib/asn1/test/testTimer.erl
+++ b/lib/asn1/test/testTimer.erl
@@ -18,163 +18,141 @@
%%
%%
-module(testTimer).
--export([go/2]).
+-export([go/0]).
-include_lib("test_server/include/test_server.hrl").
-define(times, 5000).
val() ->
- _Value = {'H323-UserInformation',{'H323-UU-PDU',
- {callProceeding,
- {'CallProceeding-UUIE',
- {0,8,222},
- {'EndpointType',
- {'NonStandardParameter',
- {object,{0,9,237}},
- "O"},
- {'VendorIdentifier',
- {'H221NonStandard',62,63,16282},
- "OC",
- "OC"},
- {'GatekeeperInfo',
- {'NonStandardParameter',
- {object,{0,10,260}},
- "O"}},
- {'GatewayInfo',
- [{h320,
- {'H320Caps',
- {'NonStandardParameter',
- {object,{0,11,282}},
- "O"},
- [{'DataRate',
- {'NonStandardParameter',
- {object,
- {0,11,295}},
- "O"},
- 1290470518,
- 78}],
- [{'SupportedPrefix',
- {'NonStandardParameter',
- {object,
- {0,12,312}},
- "O"},
- {'h323-ID',"BM"}}]}}],
- {'NonStandardParameter',
- {object,{0,13,326}},
- "O"}},
- {'McuInfo',
- {'NonStandardParameter',
- {object,{1,13,340,340}},
- "OC"}},
- {'TerminalInfo',
- {'NonStandardParameter',
- {object,{1,14,353,354}},
- "OC"}},
- true,
- true},
- {ipxAddress,
- {'TransportAddress_ipxAddress',
- "OCTET ",
- "OCTE",
- "OC"}},
- {'CallIdentifier',"OCTET STRINGOCTE"},
- {noSecurity,'NULL'},
- [{'ClearToken',
- 1667517741,
- "BM",
- {'DHset',[1],[1],[1]},
- "OCTET STR",
- -26430296,
- {'TypedCertificate',
- {1,16,405,406},
- "OC"},
- "BMP",
- {'NonStandardParameter',
- {1,16,414,415},
- "OC"}},
- {'ClearToken',
- 1817656756,
- "BMP",
- {'DHset',[1],[1],[1]},
- "OCTET STRI",
- -16356110,
- {'TypedCertificate',
- {1,17,442,443},
- "OC"},
- "BMP",
- {'NonStandardParameter',
- {1,18,452,452},
- "OC"}}],
- [{cryptoGKPwdEncr,
- {'CryptoH323Token_cryptoGKPwdEncr',
- {1,18,467,467},
- {'Params',-7477016,"OCTET ST"},
- "OC"}},
- {cryptoGKPwdEncr,
- {'CryptoH323Token_cryptoGKPwdEncr',
- {1,19,486,486},
- {'Params',-2404513,"OCTET ST"},
- []}}],
- []}},
- {'NonStandardParameter',{object,{0,3,84}},[]},
- [],
- true,
- [],
- []},
- {'H323-UserInformation_user-data',24,"O"}}.
+ {'H323-UserInformation',{'H323-UU-PDU',
+ {callProceeding,
+ {'CallProceeding-UUIE',
+ {0,8,222},
+ {'EndpointType',
+ {'NonStandardParameter',
+ {object,{0,9,237}},
+ <<"O">>},
+ {'VendorIdentifier',
+ {'H221NonStandard',62,63,16282},
+ <<"OC">>,
+ <<"OC">>},
+ {'GatekeeperInfo',
+ {'NonStandardParameter',
+ {object,{0,10,260}},
+ <<"O">>}},
+ {'GatewayInfo',
+ [{h320,
+ {'H320Caps',
+ {'NonStandardParameter',
+ {object,{0,11,282}},
+ <<"O">>},
+ [{'DataRate',
+ {'NonStandardParameter',
+ {object,
+ {0,11,295}},
+ <<"O">>},
+ 1290470518,
+ 78}],
+ [{'SupportedPrefix',
+ {'NonStandardParameter',
+ {object,
+ {0,12,312}},
+ <<"O">>},
+ {'h323-ID',"BM"}}]}}],
+ {'NonStandardParameter',
+ {object,{0,13,326}},
+ <<"O">>}},
+ {'McuInfo',
+ {'NonStandardParameter',
+ {object,{1,13,340,340}},
+ <<"OC">>}},
+ {'TerminalInfo',
+ {'NonStandardParameter',
+ {object,{1,14,353,354}},
+ <<"OC">>}},
+ true,
+ true},
+ {ipxAddress,
+ {'TransportAddress_ipxAddress',
+ <<"OCTET ">>,
+ <<"OCTE">>,
+ <<"OC">>}},
+ {'CallIdentifier',<<"OCTET STRINGOCTE">>},
+ {noSecurity,'NULL'},
+ [{'ClearToken',
+ 1667517741,
+ "BM",
+ {'DHset',<<1:1>>,<<1:1>>,<<1:1>>},
+ <<"OCTET STR">>,
+ -26430296,
+ {'TypedCertificate',
+ {1,16,405,406},
+ <<"OC">>},
+ "BMP",
+ {'NonStandardParameter',
+ {1,16,414,415},
+ <<"OC">>}},
+ {'ClearToken',
+ 1817656756,
+ "BMP",
+ {'DHset',<<1:1>>,<<1:1>>,<<1:1>>},
+ <<"OCTET STRI">>,
+ -16356110,
+ {'TypedCertificate',
+ {1,17,442,443},
+ <<"OC">>},
+ "BMP",
+ {'NonStandardParameter',
+ {1,18,452,452},
+ <<"OC">>}}],
+ [{cryptoGKPwdEncr,
+ {'CryptoH323Token_cryptoGKPwdEncr',
+ {1,18,467,467},
+ {'Params',-7477016,<<"OCTET ST">>},
+ <<"OC">>}},
+ {cryptoGKPwdEncr,
+ {'CryptoH323Token_cryptoGKPwdEncr',
+ {1,19,486,486},
+ {'Params',-2404513,<<"OCTET ST">>},
+ <<>>}}],
+ []}},
+ {'NonStandardParameter',{object,{0,3,84}},<<>>},
+ [],
+ true,
+ [],
+ []},
+ {'H323-UserInformation_user-data',24,<<"O">>}}.
-go(Config, _Enc) ->
- ?line true = code:add_patha(?config(priv_dir,Config)),
-
+go() ->
Module = 'H323-MESSAGES',
Type = 'H323-UserInformation',
Value = val(),
- {ok,Bytes} = asn1rt:encode(Module,Type,Value),
+ Bytes = Module:encode(Type, Value),
+ Value = Module:decode(Type, Bytes),
- CompileOptions = compile_options(),
-
{ValWr,done} = timer:tc(fun() -> encode(?times, Module, Type, Value) end),
- ?line io:format("ASN1 encode ~p: ~p micro~n", [CompileOptions, ValWr / ?times]),
+ io:format("ASN.1 encoding: ~p micro~n", [ValWr / ?times]),
done = decode(2, Module, Type, Bytes),
{ValRead,done} = timer:tc(fun() -> decode(?times, Module, Type, Bytes) end),
- ?line io:format("ASN1 decode ~p: ~p micro~n", [CompileOptions, ValRead /?times]),
-
+ io:format("ASN.1 decoding: ~p micro~n", [ValRead /?times]),
- ?line Comment = "encode: "++integer_to_list(round(ValWr/?times))++
- " micro, decode: "++integer_to_list(round(ValRead /?times))++
- " micro. " ++ CompileOptions,
+ Comment = "encode: "++integer_to_list(round(ValWr/?times)) ++
+ " micro, decode: "++integer_to_list(round(ValRead /?times)) ++
+ " micro. [" ++ atom_to_list(Module:encoding_rule()) ++ "]",
{comment,Comment}.
encode(0, _Module,_Type,_Value) ->
done;
encode(N, Module,Type,Value) ->
- ?line {ok,B} = asn1rt:encode(Module,Type,Value),
- _B2 = if
- is_list(B) -> list_to_binary(B);
- true -> B
- end,
- encode(N-1, Module,Type,Value).
+ Module:encode(Type, Value),
+ encode(N-1, Module, Type, Value).
decode(0, _Module, _Type, _Value) ->
done;
decode(N, Module, Type, Value) ->
- {ok,_B} = asn1rt:decode(Module, Type, Value),
+ Module:decode(Type, Value),
decode(N-1, Module, Type, Value).
-
-compile_options() ->
- {ok,Info} = asn1rt:info('H323-MESSAGES'),
- case lists:keyfind(options, 1, Info) of
- {_,Opts0} ->
- Opts1 = [X || X <- Opts0,
- (X =:= ber orelse
- X =:= per orelse
- X =:= uper)],
- lists:flatten(io_lib:format("~p", [Opts1]));
- _ ->
- "[]"
- end.
-
diff --git a/lib/asn1/test/testTypeValueNotation.erl b/lib/asn1/test/testTypeValueNotation.erl
index b46d7177f5..2b5f3f74c1 100644
--- a/lib/asn1/test/testTypeValueNotation.erl
+++ b/lib/asn1/test/testTypeValueNotation.erl
@@ -24,7 +24,7 @@
-record('Seq', {octstr, int, bool, enum, bitstr, null, oid, vstr}).
main(_Rule, _Option) ->
- Value = #'Seq'{octstr = [1, 2, 3, 4],
+ Value = #'Seq'{octstr = <<1,2,3,4>>,
int = 12,
bool = true,
enum = a,
diff --git a/lib/asn1/test/test_compile_options.erl b/lib/asn1/test/test_compile_options.erl
index 179299c78d..7f358e863c 100644
--- a/lib/asn1/test/test_compile_options.erl
+++ b/lib/asn1/test/test_compile_options.erl
@@ -123,7 +123,7 @@ verbose(Config) when is_list(Config) ->
?line ok = asn1ct:compile(Asn1File, [{i,DataDir},{outdir,OutDir},noobj,verbose]),
?line test_server:capture_stop(),
?line [Line0|_] = test_server:capture_get(),
- ?line true = lists:prefix("Erlang ASN.1 version", Line0),
+ ?line true = lists:prefix("Erlang ASN.1 compiler", Line0),
%% Test non-verbose compile
?line test_server:capture_start(),
diff --git a/lib/asn1/vsn.mk b/lib/asn1/vsn.mk
index 153c64ebdd..1f16f31f6b 100644
--- a/lib/asn1/vsn.mk
+++ b/lib/asn1/vsn.mk
@@ -1,2 +1,2 @@
#next version number to use is 2.0
-ASN1_VSN = 2.0.4
+ASN1_VSN = 3.0
diff --git a/lib/common_test/configure.in b/lib/common_test/configure.in
index b2e6ad997a..b2e6ad997a 100755..100644
--- a/lib/common_test/configure.in
+++ b/lib/common_test/configure.in
diff --git a/lib/common_test/doc/src/ct_hooks.xml b/lib/common_test/doc/src/ct_hooks.xml
index 859ff9df14..cab6dfea51 100644
--- a/lib/common_test/doc/src/ct_hooks.xml
+++ b/lib/common_test/doc/src/ct_hooks.xml
@@ -450,12 +450,15 @@
</func>
<func>
- <name>Module:on_tc_fail(TestcaseName, Reason, CTHState) -&gt;
+ <name>Module:on_tc_fail(TestName, Reason, CTHState) -&gt;
NewCTHState</name>
<fsummary>Called after the CTH scope ends</fsummary>
<type>
- <v>TestcaseName = init_per_suite | end_per_suite |
- init_per_group | end_per_group | atom()</v>
+ <v>TestName = init_per_suite | end_per_suite |
+ {init_per_group,GroupName} | {end_per_group,GroupName} |
+ {FuncName,GroupName} | FuncName</v>
+ <v>FuncName = atom()</v>
+ <v>GroupName = atom()</v>
<v>Reason = term()</v>
<v>CTHState = NewCTHState = term()</v>
</type>
@@ -463,14 +466,16 @@
<desc>
<p> OPTIONAL </p>
- <p>This function is called whenever a testcase fails.
- It is called after the post function has been called for
- the testcase which failed. i.e.
- if init_per_suite fails this function is called after
+ <p>This function is called whenever a test case (or config function)
+ fails. It is called after the post function has been called for
+ the failed test case. I.e. if init_per_suite fails, this function
+ is called after
<seealso marker="#Module:post_init_per_suite-4">
- post_init_per_suite</seealso>, and if a testcase fails it is called
+ post_init_per_suite</seealso>, and if a test case fails, it is called
after <seealso marker="#Module:post_end_per_testcase-4">
- post_end_per_testcase</seealso>.</p>
+ post_end_per_testcase</seealso>. If the failed test case belongs
+ to a test case group, the first argument is a tuple
+ <c>{FuncName,GroupName}</c>, otherwise simply the function name.</p>
<p>The data which comes with the Reason follows the same format as the
<seealso marker="event_handler_chapter#failreason">FailReason
@@ -481,12 +486,14 @@
</func>
<func>
- <name>Module:on_tc_skip(TestcaseName, Reason, CTHState) -&gt;
+ <name>Module:on_tc_skip(TestName, Reason, CTHState) -&gt;
NewCTHState</name>
<fsummary>Called after the CTH scope ends</fsummary>
<type>
- <v>TestcaseName = end_per_suite | {init_per_group,GroupName} |
- {end_per_group,GroupName} | atom()</v>
+ <v>TestName = init_per_suite | end_per_suite |
+ {init_per_group,GroupName} | {end_per_group,GroupName} |
+ {FuncName,GroupName} | FuncName</v>
+ <v>FuncName = atom()</v>
<v>GroupName = atom()</v>
<v>Reason = {tc_auto_skip | tc_user_skip, term()}</v>
<v>CTHState = NewCTHState = term()</v>
@@ -495,14 +502,17 @@
<desc>
<p> OPTIONAL </p>
- <p>This function is called whenever a testcase is skipped.
- It is called after the post function has been called for the
- testcase which was skipped.
- i.e. if init_per_group is skipped this function is called after
- <seealso marker="#Module:post_init_per_suite-4">post_init_per_group
- </seealso>, and if a testcase is skipped it is called after
- <seealso marker="#Module:post_end_per_testcase-4">post_end_per_testcase
- </seealso>.</p>
+ <p>This function is called whenever a test case (or config function)
+ is skipped. It is called after the post function has been called
+ for the skipped test case. I.e. if init_per_group is skipped, this
+ function is called after
+ <seealso marker="#Module:post_init_per_group-4">
+ post_init_per_group</seealso>, and if a test case is skipped,
+ it is called after
+ <seealso marker="#Module:post_end_per_testcase-4">
+ post_end_per_testcase</seealso>. If the skipped test case belongs to a
+ test case group, the first argument is a tuple <c>{FuncName,GroupName}</c>,
+ otherwise simply the function name.</p>
<p>The data which comes with the Reason follows the same format as
<seealso marker="event_handler_chapter#tc_auto_skip">tc_auto_skip
diff --git a/lib/common_test/doc/src/ct_run.xml b/lib/common_test/doc/src/ct_run.xml
index 39259b092a..d8e79ca80e 100644
--- a/lib/common_test/doc/src/ct_run.xml
+++ b/lib/common_test/doc/src/ct_run.xml
@@ -108,6 +108,7 @@
EvHandler2 InitArg2 and .. EvHandlerN InitArgN]
[-include InclDir1 InclDir2 .. InclDirN]
[-no_auto_compile]
+ [-abort_if_missing_suites]
[-muliply_timetraps Multiplier]
[-scale_timetraps]
[-create_priv_dir auto_per_run | auto_per_tc | manual_per_tc]
@@ -144,6 +145,7 @@
EvHandler2 InitArg2 and .. EvHandlerN InitArgN]
[-include InclDir1 InclDir2 .. InclDirN]
[-no_auto_compile]
+ [-abort_if_missing_suites]
[-muliply_timetraps Multiplier]
[-scale_timetraps]
[-create_priv_dir auto_per_run | auto_per_tc | manual_per_tc]
@@ -171,6 +173,7 @@
[-decrypt_key Key] | [-decrypt_file KeyFile]
[-include InclDir1 InclDir2 .. InclDirN]
[-no_auto_compile]
+ [-abort_if_missing_suites]
[-muliply_timetraps Multiplier]
[-scale_timetraps]
[-create_priv_dir auto_per_run | auto_per_tc | manual_per_tc]
diff --git a/lib/common_test/doc/src/event_handler_chapter.xml b/lib/common_test/doc/src/event_handler_chapter.xml
index 47d0ba59fb..45f01c12ec 100644
--- a/lib/common_test/doc/src/event_handler_chapter.xml
+++ b/lib/common_test/doc/src/event_handler_chapter.xml
@@ -227,11 +227,13 @@
<item>
<marker id="tc_auto_skip"></marker>
- <c>#event{name = tc_auto_skip, data = {Suite,Func,Reason}}</c>
+ <c>#event{name = tc_auto_skip, data = {Suite,TestName,Reason}}</c>
<p><c>Suite = atom()</c>, the name of the suite.</p>
- <p><c>Func = atom() | {end_per_group,GroupName}</c>, the name of the test case
- or configuration function.</p>
- <p><c>GroupName = atom()</c>, name of the group.</p>
+ <p><c>TestName = init_per_suite | end_per_suite |
+ {init_per_group,GroupName} | {end_per_group,GroupName} |
+ {FuncName,GroupName} | FuncName</c></p>
+ <p><c>FuncName = atom()</c>, the name of the test case or configuration function.</p>
+ <p><c>GroupName = atom()</c>, the name of the test case group.</p>
<p><c>Reason = {failed,FailReason} |
{require_failed_in_suite0,RequireInfo}</c>,
reason for auto skipping <c>Func</c>.</p>
@@ -252,21 +254,26 @@
<c>init_per_group</c>, a failed <c>require</c> in <c>suite/0</c>, or a failed test case
in a sequence. Note that this event is never received as a result of a test case getting
skipped because of <c>init_per_testcase</c> failing, since that information is carried with
- the <c>tc_done</c> event.
+ the <c>tc_done</c> event. If a failed test case belongs to a test case group, the second
+ data element is a tuple <c>{FuncName,GroupName}</c>, otherwise simply the function name.
</p></item>
-
+
<item>
<marker id="tc_user_skip"></marker>
- <c>#event{name = tc_user_skip, data = {Suite,Func,Comment}}</c>
+ <c>#event{name = tc_user_skip, data = {Suite,TestName,Comment}}</c>
<p><c>Suite = atom()</c>, the name of the suite.</p>
- <p><c>Func = atom() | {end_per_group,GroupName}</c>, the name of the test case
- or configuration function.</p>
- <p><c>GroupName = atom()</c>, name of the group.</p>
+ <p><c>TestName = init_per_suite | end_per_suite |
+ {init_per_group,GroupName} | {end_per_group,GroupName} |
+ {FuncName,GroupName} | FuncName</c></p>
+ <p><c>FuncName = atom()</c>, the name of the test case or configuration function.</p>
+ <p><c>GroupName = atom()</c>, the name of the test case group.</p>
<p><c>Comment = string()</c>, reason for skipping the test case.</p>
<p>This event specifies that a test case has been skipped by the user.
It is only ever received if the skip was declared in a test specification.
Otherwise, user skip information is received as a <c>{skipped,SkipReason}</c>
- result in the <c>tc_done</c> event for the test case.
+ result in the <c>tc_done</c> event for the test case. If a skipped test case belongs
+ to a test case group, the second data element is a tuple <c>{FuncName,GroupName}</c>,
+ otherwise simply the function name.
</p></item>
<item><c>#event{name = test_stats, data = {Ok,Failed,Skipped}}</c>
diff --git a/lib/common_test/doc/src/notes.xml b/lib/common_test/doc/src/notes.xml
index f10d5f85bf..ddfeb0964b 100644
--- a/lib/common_test/doc/src/notes.xml
+++ b/lib/common_test/doc/src/notes.xml
@@ -32,6 +32,184 @@
<file>notes.xml</file>
</header>
+<section><title>Common_Test 1.8</title>
+
+ <section><title>Fixed Bugs and Malfunctions</title>
+ <list>
+ <item>
+ <p>
+ The error generated if a test case process received an
+ exit from a linked process while executing
+ init_per_testcase/2, was handled incorrectly by Common
+ Test. The problem has been solved, and Common Test now
+ reports this type of error correctly, with proper error
+ reason and exit location as well.</p>
+ <p>
+ Own Id: OTP-11643</p>
+ </item>
+ <item>
+ <p>
+ Running a parallel test case group with two or more
+ instances of the same test case would result in identical
+ log file names, and one test case instance would
+ overwrite the log file of another. This problem has been
+ solved.</p>
+ <p>
+ Own Id: OTP-11644</p>
+ </item>
+ <item>
+ <p>
+ Application upgrade (appup) files are corrected for the
+ following applications: </p>
+ <p>
+ <c>asn1, common_test, compiler, crypto, debugger,
+ dialyzer, edoc, eldap, erl_docgen, et, eunit, gs, hipe,
+ inets, observer, odbc, os_mon, otp_mibs, parsetools,
+ percept, public_key, reltool, runtime_tools, ssh,
+ syntax_tools, test_server, tools, typer, webtool, wx,
+ xmerl</c></p>
+ <p>
+ A new test utility for testing appup files is added to
+ test_server. This is now used by most applications in
+ OTP.</p>
+ <p>
+ (Thanks to Tobias Schlager)</p>
+ <p>
+ Own Id: OTP-11744</p>
+ </item>
+ <item>
+ <p>
+ The <c>cth_surefire</c> hook would crash in
+ <c>pre_init_per_suite/3</c> if a previous hook returned
+ <c>{skip,Reason}</c> or <c>{fail,Reason}</c> instead of a
+ <c>Config</c> list. This error has been corrected, and
+ <c>cth_surefire</c> will now simply propagate the
+ received <c>InitData</c> value instead.</p>
+ <p>
+ Own Id: OTP-11811</p>
+ </item>
+ <item>
+ <p>
+ Specs of return values are corrected for
+ <c>ct_netconfc:get/2,3</c>,
+ <c>ct_netconfc:get_config/3,4</c>,
+ <c>ct_netconfc:action/2,3</c>,
+ <c>ct_netconfc:send_rpc/2,3</c> and
+ <c>ct_netconfc:send/2,3</c>.</p>
+ <p>
+ Own Id: OTP-11834 Aux Id: seq12574 </p>
+ </item>
+ </list>
+ </section>
+
+
+ <section><title>Improvements and New Features</title>
+ <list>
+ <item>
+ <p>
+ ct_telnet can now log all communication taking place
+ during a telnet session. Previously, only information
+ about ct_telnet operations and commands, as well as
+ explicitly requested data from the server, was logged.</p>
+ <p>
+ Furthermore, a logging mechanism based on an Error Logger
+ event handler and a dedicated Common Test hook,
+ <c>cth_conn_log</c>, now makes it possible to print data
+ for individual connections to separate log files. Please
+ see the <c>ct_telnet</c> reference manual for more
+ information and examples.</p>
+ <p>
+ Important note: A new argument, <c>ConnName</c> has been
+ added to the <c>unix_telnet:connect/5</c> callback
+ function. This forces users that use private ct_telnet
+ callback modules to update their code according to
+ <c>unix_telnet:connect/6</c>. Please see the
+ <c>unix_telnet</c> reference manual and source code
+ module for details.</p>
+ <p>
+ Own Id: OTP-11440 Aux Id: seq12457 </p>
+ </item>
+ <item>
+ <p>
+ A new timeout option has been introduced for the
+ <c>ct_telnet:expect/3</c> function. With
+ <c>{total_timeout,Time}</c> it's possible to set a time
+ limit for the complete expect operation. After
+ <c>Time</c> milliseconds, <c>expect/3</c> returns
+ <c>{error,timeout}</c>. The default value used if
+ <c>total_timeout</c> is not specified, is infinity (i.e.
+ no time limit). Please see the <c>ct_telnet</c> reference
+ manual for more information.</p>
+ <p>
+ Own Id: OTP-11689</p>
+ </item>
+ <item>
+ <p>
+ Some function specs are corrected or moved and some edoc
+ comments are corrected in order to allow use of edoc.
+ (Thanks to Pierre Fenoll)</p>
+ <p>
+ Own Id: OTP-11702</p>
+ </item>
+ <item>
+ <p>
+ Test case group name information has been added to the
+ data sent with <c>tc_user_skip</c> and
+ <c>tc_auto_skip</c> event messages, as well as the data
+ passed in calls to the CT Hook functions
+ <c>on_tc_skip/3</c> and <c>on_tc_fail/3</c>. The
+ modification only affects the function name
+ element/argument. This value remains an atom if the test
+ case in question does not belong to a test case group.
+ Otherwise a tuple <c>{FuncName,GroupName}</c>
+ (<c>{atom(),atom()}</c>) is passed instead.</p>
+ <p>
+ Note that this change may (depending on the patterns used
+ for matching) require modifications of user event
+ handlers and hook modules. Please see the Event Handling
+ chapter in the Common Test User's Guide, and the
+ reference manual for <c>ct_hooks</c>, for details.</p>
+ <p>
+ Note also that the Test Server framework callback
+ function <c>report/2</c> has been modified. This change
+ only affects users with test frameworks interfacing Test
+ Server rather than Common Test. See the
+ <c>test_server_ctrl</c> reference manual for details.</p>
+ <p>
+ *** POTENTIAL INCOMPATIBILITY ***</p>
+ <p>
+ Own Id: OTP-11732 Aux Id: seq12541 </p>
+ </item>
+ <item>
+ <p>
+ If Common Test can't prompt the user to abort or continue
+ the test run when one or more test suites fail to
+ compile, a new option,
+ <c>{abort_if_missing_suites,Bool}</c>, can be used to
+ specify whether it should proceed with the test run, or
+ stop execution. The default value of <c>Bool</c> is
+ <c>false</c> (i.e. to proceed even if suites are
+ missing).</p>
+ <p>
+ Own Id: OTP-11769</p>
+ </item>
+ </list>
+ </section>
+
+
+ <section><title>Known Bugs and Problems</title>
+ <list>
+ <item>
+ <p>
+ common_test: Fix problems reported by Dialyzer.</p>
+ <p>
+ Own Id: OTP-11525</p>
+ </item>
+ </list>
+ </section>
+
+</section>
+
<section><title>Common_Test 1.7.4</title>
<section><title>Fixed Bugs and Malfunctions</title>
diff --git a/lib/common_test/doc/src/run_test_chapter.xml b/lib/common_test/doc/src/run_test_chapter.xml
index 44fe73d24f..864f82cb63 100644
--- a/lib/common_test/doc/src/run_test_chapter.xml
+++ b/lib/common_test/doc/src/run_test_chapter.xml
@@ -59,7 +59,15 @@
<p>If compilation should fail for one or more suites, the compilation errors
are printed to tty and the operator is asked if the test run should proceed
without the missing suites, or be aborted. If the operator chooses to proceed,
- it is noted in the HTML log which tests have missing suites.</p>
+ it is noted in the HTML log which tests have missing suites. If Common Test is
+ unable to prompt the user after compilation failure (if Common Test doesn't
+ control stdin), the test run will proceed automatically without the missing
+ suites. This behaviour can however be modified with the
+ <c><![CDATA[ct_run]]></c> flag <c><![CDATA[-abort_if_missing_suites]]></c>,
+ or the <c><![CDATA[ct:run_test/1]]></c> option
+ <c><![CDATA[{abort_if_missing_suites,TrueOrFalse}]]></c>. If
+ <c><![CDATA[abort_if_missing_suites]]></c> is set (to true), the test run
+ will stop immediately if some suites fail to compile.</p>
<p>Any help module (i.e. regular Erlang module with name not ending with
"_SUITE") that resides in the same test object directory as a suite
@@ -167,6 +175,7 @@
<seealso marker="ct_hooks_chapter#builtin_cths">Built-in Common Test Hooks</seealso>. Default is <c>true</c>.</item>
<item><c><![CDATA[-include]]></c>, specifies include directories (see above).</item>
<item><c><![CDATA[-no_auto_compile]]></c>, disables the automatic test suite compilation feature (see above).</item>
+ <item><c><![CDATA[-abort_if_missing_suites]]></c>, aborts the test run if one or more suites fail to compile (see above).</item>
<item><c><![CDATA[-multiply_timetraps <n>]]></c>, extends <seealso marker="write_test_chapter#timetraps">timetrap
timeout</seealso> values.</item>
<item><c><![CDATA[-scale_timetraps <bool>]]></c>, enables automatic <seealso marker="write_test_chapter#timetraps">timetrap
@@ -215,7 +224,7 @@
<pre>-exit_status ignore_config</pre>
<p>For more information about the <c>ct_run</c> program, see the
- <seealso marker="ct_run#top">Reference Manual</seealso> and the
+ <seealso marker="ct_run">Reference Manual</seealso> and the
<seealso marker="install_chapter#general">Installation</seealso> chapter.
</p>
</section>
@@ -589,8 +598,8 @@
Common Test will either execute one test run per specification file, or
join the files and perform all tests within one single test run. The first
behaviour is the default one. The latter requires that the start
- flag/option <c>join_suites</c> is provided, e.g.
- <c>run_test -spec ./my_tests1.ts ./my_tests2.ts -join_suites</c>.</p>
+ flag/option <c>join_specs</c> is provided, e.g.
+ <c>run_test -spec ./my_tests1.ts ./my_tests2.ts -join_specs</c>.</p>
<p>Joining a number of specifications, or running them separately, can
also be accomplished with (and may be combined with) test specification
@@ -744,6 +753,9 @@
{auto_compile, Bool},
{auto_compile, NodeRefs, Bool},
+ {abort_if_missing_suites, Bool},
+ {abort_if_missing_suites, NodeRefs, Bool},
+
{config, ConfigFiles}.
{config, ConfigDir, ConfigBaseNames}.
{config, NodeRefs, ConfigFiles}.
diff --git a/lib/common_test/priv/run_test.in b/lib/common_test/priv/run_test.in
index 1508751e4f..1508751e4f 100755..100644
--- a/lib/common_test/priv/run_test.in
+++ b/lib/common_test/priv/run_test.in
diff --git a/lib/common_test/src/common_test.app.src b/lib/common_test/src/common_test.app.src
index 18c1dec784..e28751fb59 100644
--- a/lib/common_test/src/common_test.app.src
+++ b/lib/common_test/src/common_test.app.src
@@ -62,5 +62,10 @@
ct_master,
ct_master_logs]},
{applications, [kernel,stdlib]},
- {env, []}]}.
+ {env, []},
+ {runtime_dependencies,["xmerl-1.3.7","webtool-0.8.10","tools-2.6.14",
+ "test_server-3.7","stdlib-2.0","ssh-3.0.1",
+ "snmp-4.25.1","sasl-2.4","runtime_tools-1.8.14",
+ "kernel-3.0","inets-5.10","erts-6.0",
+ "debugger-4.0","crypto-3.3","compiler-5.0"]}]}.
diff --git a/lib/common_test/src/common_test.appup.src b/lib/common_test/src/common_test.appup.src
index 0fbe5f23f7..4dfd9f1b0d 100644
--- a/lib/common_test/src/common_test.appup.src
+++ b/lib/common_test/src/common_test.appup.src
@@ -1 +1,21 @@
-{"%VSN%",[],[]}. \ No newline at end of file
+%% -*- erlang -*-
+%% %CopyrightBegin%
+%%
+%% Copyright Ericsson AB 2014. 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%
+{"%VSN%",
+ [{<<".*">>,[{restart_application, common_test}]}],
+ [{<<".*">>,[{restart_application, common_test}]}]
+}.
diff --git a/lib/common_test/src/ct.erl b/lib/common_test/src/ct.erl
index e6732f7fc7..85afdc7834 100644
--- a/lib/common_test/src/ct.erl
+++ b/lib/common_test/src/ct.erl
@@ -150,7 +150,8 @@ run(TestDirs) ->
%%% {silent_connections,Conns} | {stylesheet,CSSFile} |
%%% {cover,CoverSpecFile} | {cover_stop,Bool} | {step,StepOpts} |
%%% {event_handler,EventHandlers} | {include,InclDirs} |
-%%% {auto_compile,Bool} | {create_priv_dir,CreatePrivDir} |
+%%% {auto_compile,Bool} | {abort_if_missing_suites,Bool} |
+%%% {create_priv_dir,CreatePrivDir} |
%%% {multiply_timetraps,M} | {scale_timetraps,Bool} |
%%% {repeat,N} | {duration,DurTime} | {until,StopTime} |
%%% {force_stop,ForceStop} | {decrypt,DecryptKeyOrFile} |
@@ -772,7 +773,7 @@ comment(Format, Args) when is_list(Format), is_list(Args) ->
send_html_comment(Comment) ->
Html = "<font color=\"green\">" ++ Comment ++ "</font>",
- ct_util:set_testdata({comment,Html}),
+ ct_util:set_testdata({{comment,group_leader()},Html}),
test_server:comment(Html).
%%%-----------------------------------------------------------------
diff --git a/lib/common_test/src/ct_conn_log_h.erl b/lib/common_test/src/ct_conn_log_h.erl
index ac08a3e0ad..cff02a46d9 100644
--- a/lib/common_test/src/ct_conn_log_h.erl
+++ b/lib/common_test/src/ct_conn_log_h.erl
@@ -30,80 +30,88 @@
handle_event/2, handle_call/2, handle_info/2,
terminate/2]).
--record(state, {group_leader,logs=[]}).
+-record(state, {logs=[], default_gl}).
-define(WIDTH,80).
%%%-----------------------------------------------------------------
%%% Callbacks
-init({GL,Logs}) ->
- open_files(Logs,#state{group_leader=GL}).
+init({GL,ConnLogs}) ->
+ open_files(GL,ConnLogs,#state{default_gl=GL}).
-open_files([{ConnMod,{LogType,Logs}}|T],State) ->
- case do_open_files(Logs,[]) of
+open_files(GL,[{ConnMod,{LogType,LogFiles}}|T],State=#state{logs=Logs}) ->
+ case do_open_files(LogFiles,[]) of
{ok,Fds} ->
- open_files(T,State#state{logs=[{ConnMod,{LogType,Fds}} |
- State#state.logs]});
+ ConnInfo = proplists:get_value(GL,Logs,[]),
+ Logs1 = [{GL,[{ConnMod,{LogType,Fds}}|ConnInfo]} |
+ proplists:delete(GL,Logs)],
+ open_files(GL,T,State#state{logs=Logs1});
Error ->
Error
end;
-open_files([],State) ->
+open_files(_GL,[],State) ->
{ok,State}.
-
-do_open_files([{Tag,File}|Logs],Acc) ->
- case file:open(File, [write,{encoding,utf8}]) of
+do_open_files([{Tag,File}|LogFiles],Acc) ->
+ case file:open(File, [write,append,{encoding,utf8}]) of
{ok,Fd} ->
- do_open_files(Logs,[{Tag,Fd}|Acc]);
+ do_open_files(LogFiles,[{Tag,Fd}|Acc]);
{error,Reason} ->
{error,{could_not_open_log,File,Reason}}
end;
do_open_files([],Acc) ->
{ok,lists:reverse(Acc)}.
+handle_event({info_report,_,{From,update,{GL,ConnLogs}}},
+ State) when node(GL) == node() ->
+ Result = open_files(GL,ConnLogs,State),
+ From ! {updated,GL},
+ Result;
handle_event({_Type, GL, _Msg}, State) when node(GL) /= node() ->
{ok, State};
-handle_event({_Type,_GL,{Pid,{ct_connection,Action,ConnName},Report}},State) ->
- %% NOTE: if the format of this event is changed
- %% ({ct_connection,Action,ConnName}) then remember to change
- %% test_server_h:report_receiver as well!!!
- Info = conn_info(Pid,#conn_log{name=ConnName,action=Action}),
- write_report(now(),Info,Report,State),
+handle_event({_Type,GL,{Pid,{ct_connection,Mod,Action,ConnName},Report}},
+ State) ->
+ Info = conn_info(Pid,#conn_log{name=ConnName,action=Action,module=Mod}),
+ write_report(now(),Info,Report,GL,State),
{ok, State};
-handle_event({_Type,_GL,{Pid,Info=#conn_log{},Report}},State) ->
- %% NOTE: if the format of this event is changed
- %% (Info=#conn_log{}) then remember to change
- %% test_server_h:report_receiver as well!!!
- write_report(now(),conn_info(Pid,Info),Report,State),
+handle_event({_Type,GL,{Pid,Info=#conn_log{},Report}}, State) ->
+ write_report(now(),conn_info(Pid,Info),Report,GL,State),
{ok, State};
-handle_event({error_report,_,{Pid,_,[{ct_connection,ConnName}|R]}},State) ->
+handle_event({error_report,GL,{Pid,_,[{ct_connection,ConnName}|R]}}, State) ->
%% Error reports from connection
- write_error(now(),conn_info(Pid,#conn_log{name=ConnName}),R,State),
+ write_error(now(),conn_info(Pid,#conn_log{name=ConnName}),R,GL,State),
{ok, State};
-handle_event(_, State) ->
+handle_event(_What, State) ->
{ok, State}.
-handle_info(_, State) ->
+handle_info(_What, State) ->
{ok, State}.
handle_call(_Query, State) ->
{ok, {error, bad_query}, State}.
terminate(_,#state{logs=Logs}) ->
- [file:close(Fd) || {_,{_,Fds}} <- Logs, {_,Fd} <- Fds],
+ lists:foreach(
+ fun({_GL,ConnLogs}) ->
+ [file:close(Fd) || {_,{_,Fds}} <- ConnLogs, {_,Fd} <- Fds]
+ end, Logs),
ok.
%%%-----------------------------------------------------------------
%%% Writing reports
-write_report(Time,#conn_log{module=ConnMod}=Info,Data,State) ->
- {LogType,Fd} = get_log(Info,State),
+write_report(_Time,#conn_log{header=false,module=ConnMod}=Info,Data,GL,State) ->
+ {LogType,Fd} = get_log(Info,GL,State),
+ io:format(Fd,"~n~ts",[format_data(ConnMod,LogType,Data)]);
+
+write_report(Time,#conn_log{module=ConnMod}=Info,Data,GL,State) ->
+ {LogType,Fd} = get_log(Info,GL,State),
io:format(Fd,"~n~ts~ts~ts",[format_head(ConnMod,LogType,Time),
format_title(LogType,Info),
format_data(ConnMod,LogType,Data)]).
-write_error(Time,#conn_log{module=ConnMod}=Info,Report,State) ->
- case get_log(Info,State) of
+write_error(Time,#conn_log{module=ConnMod}=Info,Report,GL,State) ->
+ case get_log(Info,GL,State) of
{html,_} ->
%% The error will anyway be written in the html log by the
%% sasl error handler, so don't write it again.
@@ -115,14 +123,19 @@ write_error(Time,#conn_log{module=ConnMod}=Info,Report,State) ->
format_error(LogType,Report)])
end.
-get_log(Info,State) ->
- case proplists:get_value(Info#conn_log.module,State#state.logs) of
- {html,_} ->
- {html,State#state.group_leader};
- {LogType,Fds} ->
- {LogType,get_fd(Info,Fds)};
+get_log(Info,GL,State) ->
+ case proplists:get_value(GL,State#state.logs) of
undefined ->
- {html,State#state.group_leader}
+ {html,State#state.default_gl};
+ ConnLogs ->
+ case proplists:get_value(Info#conn_log.module,ConnLogs) of
+ {html,_} ->
+ {html,GL};
+ {LogType,Fds} ->
+ {LogType,get_fd(Info,Fds)};
+ undefined ->
+ {html,GL}
+ end
end.
get_fd(#conn_log{name=undefined},Fds) ->
@@ -191,17 +204,22 @@ pretty_head({{{Y,Mo,D},{H,Mi,S}},MicroS},ConnMod,Text0) ->
micro2milli(MicroS)]).
pretty_title(#conn_log{client=Client}=Info) ->
- io_lib:format("= Client ~w ~s Server ~ts ",
+ io_lib:format("= Client ~w ~s ~ts ",
[Client,actionstr(Info),serverstr(Info)]).
actionstr(#conn_log{action=send}) -> "----->";
+actionstr(#conn_log{action=cmd}) -> "----->";
actionstr(#conn_log{action=recv}) -> "<-----";
actionstr(#conn_log{action=open}) -> "opened session to";
actionstr(#conn_log{action=close}) -> "closed session to";
actionstr(_) -> "<---->".
+serverstr(#conn_log{name=undefined,address={undefined,_}}) ->
+ io_lib:format("server",[]);
serverstr(#conn_log{name=undefined,address=Address}) ->
io_lib:format("~p",[Address]);
+serverstr(#conn_log{name=Alias,address={undefined,_}}) ->
+ io_lib:format("~w",[Alias]);
serverstr(#conn_log{name=Alias,address=Address}) ->
io_lib:format("~w(~p)",[Alias,Address]).
diff --git a/lib/common_test/src/ct_framework.erl b/lib/common_test/src/ct_framework.erl
index e81b69a1b5..20903607dc 100644
--- a/lib/common_test/src/ct_framework.erl
+++ b/lib/common_test/src/ct_framework.erl
@@ -249,8 +249,8 @@ init_tc2(Mod,Suite,Func,SuiteInfo,MergeResult,Config) ->
end
end.
-ct_suite_init(Suite, Func, PostInitHook, Config) when is_list(Config) ->
- case ct_hooks:init_tc(Suite, Func, Config) of
+ct_suite_init(Suite, FuncSpec, PostInitHook, Config) when is_list(Config) ->
+ case ct_hooks:init_tc(Suite, FuncSpec, Config) of
NewConfig when is_list(NewConfig) ->
PostInitHookResult = do_post_init_hook(PostInitHook, NewConfig),
{ok, [PostInitHookResult ++ NewConfig]};
@@ -657,13 +657,21 @@ end_tc(Mod,Func,TCPid,Result,Args,Return) ->
_ ->
ok
end,
- ct_util:delete_testdata(comment),
+ if Func == end_per_group; Func == end_per_suite ->
+ %% clean up any saved comments
+ ct_util:match_delete_testdata({comment,'_'});
+ true ->
+ %% attemp to delete any saved comment for this TC
+ case process_info(TCPid, group_leader) of
+ {group_leader,TCGL} ->
+ ct_util:delete_testdata({comment,TCGL});
+ _ ->
+ ok
+ end
+ end,
ct_util:delete_suite_data(last_saved_config),
- FuncSpec = case group_or_func(Func,Args) of
- {_,_GroupName,_} = Group -> Group;
- _ -> Func
- end,
+ FuncSpec = group_or_func(Func,Args),
{Result1,FinalNotify} =
case ct_hooks:end_tc(
@@ -730,9 +738,14 @@ end_tc(Mod,Func,TCPid,Result,Args,Return) ->
(undefined) ->
undefined;
(Unexpected) ->
- exit({error,{reset_curr_tc,{Mod,Func},Unexpected}})
+ {error,{reset_curr_tc,{Mod,Func},Unexpected}}
end,
- ct_util:update_testdata(curr_tc, ClearCurrTC),
+ case ct_util:update_testdata(curr_tc, ClearCurrTC) of
+ {error,_} = ClearError ->
+ exit(ClearError);
+ _ ->
+ ok
+ end,
case FinalResult of
{auto_skip,{sequence_failed,_,_}} ->
@@ -848,7 +861,7 @@ error_notification(Mod,Func,_Args,{Error,Loc}) ->
_ ->
%% this notification comes from the test case process, so
%% we can add error info to comment with test_server:comment/1
- case ct_util:get_testdata(comment) of
+ case ct_util:get_testdata({comment,group_leader()}) of
undefined ->
test_server:comment(ErrorHtml);
Comment ->
@@ -1272,28 +1285,35 @@ report(What,Data) ->
ct_util:set_testdata({What,Data}),
ok;
tc_start ->
- %% Data = {{Suite,Func},LogFileName}
+ %% Data = {{Suite,{Func,GroupName}},LogFileName}
+ Data1 = case Data of
+ {{Suite,{Func,undefined}},LFN} -> {{Suite,Func},LFN};
+ _ -> Data
+ end,
ct_event:sync_notify(#event{name=tc_logfile,
node=node(),
- data=Data}),
+ data=Data1}),
ok;
tc_done ->
- {_Suite,Case,Result} = Data,
+ {Suite,{Func,GrName},Result} = Data,
+ Data1 = if GrName == undefined -> {Suite,Func,Result};
+ true -> Data
+ end,
case Result of
{failed, _} ->
- ct_hooks:on_tc_fail(What, Data);
+ ct_hooks:on_tc_fail(What, Data1);
{skipped,{failed,{_,init_per_testcase,_}}} ->
- ct_hooks:on_tc_skip(tc_auto_skip, Data);
+ ct_hooks:on_tc_skip(tc_auto_skip, Data1);
{skipped,{require_failed,_}} ->
- ct_hooks:on_tc_skip(tc_auto_skip, Data);
+ ct_hooks:on_tc_skip(tc_auto_skip, Data1);
{skipped,_} ->
- ct_hooks:on_tc_skip(tc_user_skip, Data);
+ ct_hooks:on_tc_skip(tc_user_skip, Data1);
{auto_skipped,_} ->
- ct_hooks:on_tc_skip(tc_auto_skip, Data);
+ ct_hooks:on_tc_skip(tc_auto_skip, Data1);
_Else ->
ok
end,
- case {Case,Result} of
+ case {Func,Result} of
{init_per_suite,_} ->
ok;
{end_per_suite,_} ->
@@ -1322,20 +1342,17 @@ report(What,Data) ->
tc_user_skip ->
%% test case or config function specified as skipped in testspec,
%% or init config func for suite/group has returned {skip,Reason}
- %% Data = {Suite,Case,Comment} |
- %% {Suite,{GroupConfigFunc,GroupName},Comment}
+ %% Data = {Suite,{Func,GroupName},Comment}
{Func,Data1} = case Data of
- {Suite,{ConfigFunc,undefined},Cmt} ->
- {ConfigFunc,{Suite,ConfigFunc,Cmt}};
- {_,{ConfigFunc,_},_} -> {ConfigFunc,Data};
- {_,Case,_} -> {Case,Data}
+ {Suite,{F,undefined},Comment} ->
+ {F,{Suite,F,Comment}};
+ D = {_,{F,_},_} ->
+ {F,D}
end,
-
ct_event:sync_notify(#event{name=tc_user_skip,
node=node(),
data=Data1}),
ct_hooks:on_tc_skip(What, Data1),
-
if Func /= init_per_suite, Func /= init_per_group,
Func /= end_per_suite, Func /= end_per_group ->
add_to_stats(user_skipped);
@@ -1345,13 +1362,12 @@ report(What,Data) ->
tc_auto_skip ->
%% test case skipped because of error in config function, or
%% config function skipped because of error in info function
- %% Data = {Suite,Case,Comment} |
- %% {Suite,{GroupConfigFunc,GroupName},Comment}
+ %% Data = {Suite,{Func,GroupName},Comment}
{Func,Data1} = case Data of
- {Suite,{ConfigFunc,undefined},Cmt} ->
- {ConfigFunc,{Suite,ConfigFunc,Cmt}};
- {_,{ConfigFunc,_},_} -> {ConfigFunc,Data};
- {_,Case,_} -> {Case,Data}
+ {Suite,{F,undefined},Comment} ->
+ {F,{Suite,F,Comment}};
+ D = {_,{F,_},_} ->
+ {F,D}
end,
%% this test case does not have a log, so printouts
%% from event handlers should end up in the main log
@@ -1359,7 +1375,6 @@ report(What,Data) ->
node=node(),
data=Data1}),
ct_hooks:on_tc_skip(What, Data1),
-
if Func /= end_per_suite,
Func /= end_per_group ->
add_to_stats(auto_skipped);
@@ -1412,7 +1427,7 @@ warn(_What) ->
true.
%%%-----------------------------------------------------------------
-%%% @spec add_data_dir(File0) -> File1
+%%% @spec add_data_dir(File0, Config) -> File1
add_data_dir(File,Config) when is_atom(File) ->
add_data_dir(atom_to_list(File),Config);
diff --git a/lib/common_test/src/ct_gen_conn.erl b/lib/common_test/src/ct_gen_conn.erl
index a5b736136f..56082086f6 100644
--- a/lib/common_test/src/ct_gen_conn.erl
+++ b/lib/common_test/src/ct_gen_conn.erl
@@ -1,7 +1,7 @@
%%
%% %CopyrightBegin%
%%
-%% Copyright Ericsson AB 2003-2013. All Rights Reserved.
+%% Copyright Ericsson AB 2003-2014. 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
@@ -29,6 +29,13 @@
-export([start/4, stop/1, get_conn_pid/1]).
-export([call/2, call/3, return/2, do_within_time/2]).
+%%----------------------------------------------------------------------
+%% Exported types
+%%----------------------------------------------------------------------
+-export_type([server_id/0,
+ target_name/0,
+ key_or_name/0]).
+
-ifdef(debug).
-define(dbg,true).
-else.
@@ -47,6 +54,18 @@
cb_state,
ct_util_server}).
+%%------------------------------------------------------------------
+%% Type declarations
+%%------------------------------------------------------------------
+-type server_id() :: atom().
+%% A `ServerId' which exists in a configuration file.
+-type target_name() :: atom().
+%% A name which is associated to a `server_id()' via a
+%% `require' statement or a call to {@link ct:require/2} in the
+%% test suite.
+-type key_or_name() :: server_id() | target_name().
+
+
%%%-----------------------------------------------------------------
%%% @spec start(Address,InitData,CallbackMod,Opts) ->
%%% {ok,Handle} | {error,Reason}
@@ -288,7 +307,8 @@ call(Pid, Msg, Timeout) ->
end.
return({To,Ref},Result) ->
- To ! {Ref, Result}.
+ To ! {Ref, Result},
+ ok.
init_gen(Parent,Opts) ->
process_flag(trap_exit,true),
@@ -325,7 +345,7 @@ loop(Opts) ->
link(NewPid),
put(conn_pid,NewPid),
loop(Opts#gen_opts{conn_pid=NewPid,
- cb_state=NewState});
+ cb_state=NewState});
Error ->
ct_util:unregister_connection(self()),
log("Reconnect failed. Giving up!",
diff --git a/lib/common_test/src/ct_hooks.erl b/lib/common_test/src/ct_hooks.erl
index e845e9e908..df4c98d9d1 100644
--- a/lib/common_test/src/ct_hooks.erl
+++ b/lib/common_test/src/ct_hooks.erl
@@ -64,11 +64,16 @@ terminate(Hooks) ->
%% @doc Called as each test case is started. This includes all configuration
%% tests.
--spec init_tc(Mod :: atom(), Func :: atom(), Args :: list()) ->
+-spec init_tc(Mod :: atom(),
+ FuncSpec :: atom() |
+ {ConfigFunc :: init_per_group | end_per_group,
+ GroupName :: atom(),
+ Properties :: list()},
+ Args :: list()) ->
NewConfig :: proplists:proplist() |
- {skip, Reason :: term()} |
- {auto_skip, Reason :: term()} |
- {fail, Reason :: term()}.
+ {skip, Reason :: term()} |
+ {auto_skip, Reason :: term()} |
+ {fail, Reason :: term()}.
init_tc(Mod, init_per_suite, Config) ->
Info = try proplists:get_value(ct_hooks, Mod:suite(),[]) of
@@ -82,8 +87,8 @@ init_tc(Mod, init_per_suite, Config) ->
call(fun call_generic/3, Config ++ Info, [pre_init_per_suite, Mod]);
init_tc(Mod, end_per_suite, Config) ->
call(fun call_generic/3, Config, [pre_end_per_suite, Mod]);
-init_tc(Mod, {init_per_group, GroupName, Opts}, Config) ->
- maybe_start_locker(Mod, GroupName, Opts),
+init_tc(Mod, {init_per_group, GroupName, Properties}, Config) ->
+ maybe_start_locker(Mod, GroupName, Properties),
call(fun call_generic/3, Config, [pre_init_per_group, GroupName]);
init_tc(_Mod, {end_per_group, GroupName, _}, Config) ->
call(fun call_generic/3, Config, [pre_end_per_group, GroupName]);
@@ -93,15 +98,18 @@ init_tc(_Mod, TC, Config) ->
%% @doc Called as each test case is completed. This includes all configuration
%% tests.
-spec end_tc(Mod :: atom(),
- Func :: atom(),
+ FuncSpec :: atom() |
+ {ConfigFunc :: init_per_group | end_per_group,
+ GroupName :: atom(),
+ Properties :: list()},
Args :: list(),
Result :: term(),
- Resturn :: term()) ->
+ Return :: term()) ->
NewConfig :: proplists:proplist() |
- {skip, Reason :: term()} |
- {auto_skip, Reason :: term()} |
- {fail, Reason :: term()} |
- ok | '$ct_no_change'.
+ {skip, Reason :: term()} |
+ {auto_skip, Reason :: term()} |
+ {fail, Reason :: term()} |
+ ok | '$ct_no_change'.
end_tc(Mod, init_per_suite, Config, _Result, Return) ->
call(fun call_generic/3, Return, [post_init_per_suite, Mod, Config],
@@ -112,18 +120,20 @@ end_tc(Mod, end_per_suite, Config, Result, _Return) ->
end_tc(_Mod, {init_per_group, GroupName, _}, Config, _Result, Return) ->
call(fun call_generic/3, Return, [post_init_per_group, GroupName, Config],
'$ct_no_change');
-end_tc(Mod, {end_per_group, GroupName, Opts}, Config, Result, _Return) ->
+end_tc(Mod, {end_per_group, GroupName, Properties}, Config, Result, _Return) ->
Res = call(fun call_generic/3, Result,
[post_end_per_group, GroupName, Config], '$ct_no_change'),
- maybe_stop_locker(Mod, GroupName,Opts),
+ maybe_stop_locker(Mod, GroupName, Properties),
Res;
end_tc(_Mod, TC, Config, Result, _Return) ->
call(fun call_generic/3, Result, [post_end_per_testcase, TC, Config],
'$ct_no_change').
+%% Case = TestCase | {TestCase,GroupName}
on_tc_skip(How, {Suite, Case, Reason}) ->
call(fun call_cleanup/3, {How, Reason}, [on_tc_skip, Suite, Case]).
+%% Case = TestCase | {TestCase,GroupName}
on_tc_fail(_How, {Suite, Case, Reason}) ->
call(fun call_cleanup/3, Reason, [on_tc_fail, Suite, Case]).
diff --git a/lib/common_test/src/ct_logs.erl b/lib/common_test/src/ct_logs.erl
index a7fb45a4e4..a4ad65c0a4 100644
--- a/lib/common_test/src/ct_logs.erl
+++ b/lib/common_test/src/ct_logs.erl
@@ -76,7 +76,7 @@
tests = []}).
%%%-----------------------------------------------------------------
-%%% @spec init(Mode) -> Result
+%%% @spec init(Mode, Verbosity) -> Result
%%% Mode = normal | interactive
%%% Result = {StartTime,LogDir}
%%% StartTime = term()
diff --git a/lib/common_test/src/ct_netconfc.erl b/lib/common_test/src/ct_netconfc.erl
index 64fe8b4bb0..a3861dc745 100644
--- a/lib/common_test/src/ct_netconfc.erl
+++ b/lib/common_test/src/ct_netconfc.erl
@@ -1,7 +1,7 @@
%%----------------------------------------------------------------------
%% %CopyrightBegin%
%%
-%% Copyright Ericsson AB 2012-2013. All Rights Reserved.
+%% Copyright Ericsson AB 2012-2014. 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
@@ -212,11 +212,7 @@
%%----------------------------------------------------------------------
%% Exported types
%%----------------------------------------------------------------------
--export_type([hook_options/0,
- conn_mod/0,
- log_type/0,
- key_or_name/0,
- notification/0]).
+-export_type([notification/0]).
%%----------------------------------------------------------------------
%% Internal exports
@@ -292,19 +288,11 @@
%%----------------------------------------------------------------------
%% Type declarations
%%----------------------------------------------------------------------
--type client() :: handle() | server_id() | target_name().
+-type client() :: handle() | ct_gen_conn:server_id() | ct_gen_conn:target_name().
-type handle() :: term().
%% An opaque reference for a connection (netconf session). See {@link
%% ct} for more information.
--type server_id() :: atom().
-%% A `ServerId' which exists in a configuration file.
--type target_name() :: atom().
-%% A name which is associated to a `server_id()' via a
-%% `require' statement or a call to {@link ct:require/2} in the
-%% test suite.
--type key_or_name() :: server_id() | target_name().
-
-type options() :: [option()].
%% Options used for setting up ssh connection to a netconf server.
@@ -326,14 +314,7 @@
%% See XML Schema for Event Notifications found in RFC5277 for further
%% detail about the data format for the string values.
--type hook_options() :: [hook_option()].
-%% Options that can be given to `cth_conn_log' in the `ct_hook' statement.
--type hook_option() :: {log_type,log_type()} |
- {hosts,[key_or_name()]}.
--type log_type() :: raw | pretty | html | silent.
%-type error_handler() :: module().
--type conn_mod() :: ct_netconfc.
-
-type error_reason() :: term().
-type simple_xml() :: {xml_tag(), xml_attributes(), xml_content()} |
@@ -384,7 +365,7 @@ open(Options) ->
%%----------------------------------------------------------------------
-spec open(KeyOrName, ExtraOptions) -> Result when
- KeyOrName :: key_or_name(),
+ KeyOrName :: ct_gen_conn:key_or_name(),
ExtraOptions :: options(),
Result :: {ok,handle()} | {error,error_reason()}.
%% @doc Open a named netconf session and exchange `hello' messages.
@@ -461,7 +442,7 @@ only_open(Options) ->
%%----------------------------------------------------------------------
-spec only_open(KeyOrName,ExtraOptions) -> Result when
- KeyOrName :: key_or_name(),
+ KeyOrName :: ct_gen_conn:key_or_name(),
ExtraOptions :: options(),
Result :: {ok,handle()} | {error,error_reason()}.
%% @doc Open a name netconf session, but don't send `hello'.
@@ -555,7 +536,7 @@ send(Client, SimpleXml) ->
Client :: client(),
SimpleXml :: simple_xml(),
Timeout :: timeout(),
- Result :: ok | {error,error_reason()}.
+ Result :: simple_xml() | {error,error_reason()}.
%% @doc Send an XML document to the server.
%%
%% The given XML document is sent as is to the server. This function
@@ -575,7 +556,7 @@ send_rpc(Client, SimpleXml) ->
Client :: client(),
SimpleXml :: simple_xml(),
Timeout :: timeout(),
- Result :: ok | {error,error_reason()}.
+ Result :: [simple_xml()] | {error,error_reason()}.
%% @doc Send a Netconf <code>rpc</code> request to the server.
%%
%% The given XML document is wrapped in a valid Netconf
@@ -654,7 +635,7 @@ get(Client, Filter) ->
Client :: client(),
Filter :: simple_xml() | xpath(),
Timeout :: timeout(),
- Result :: {ok,simple_xml()} | {error,error_reason()}.
+ Result :: {ok,[simple_xml()]} | {error,error_reason()}.
%% @doc Get data.
%%
%% This operation returns both configuration and state data from the
@@ -680,7 +661,7 @@ get_config(Client, Source, Filter) ->
Source :: netconf_db(),
Filter :: simple_xml() | xpath(),
Timeout :: timeout(),
- Result :: {ok,simple_xml()} | {error,error_reason()}.
+ Result :: {ok,[simple_xml()]} | {error,error_reason()}.
%% @doc Get configuration data.
%%
%% To be able to access another source than `running', the server
@@ -778,7 +759,7 @@ action(Client,Action) ->
Client :: client(),
Action :: simple_xml(),
Timeout :: timeout(),
- Result :: {ok,simple_xml()} | {error,error_reason()}.
+ Result :: {ok,[simple_xml()]} | {error,error_reason()}.
%% @doc Execute an action.
%%
%% @end
@@ -1353,7 +1334,7 @@ handle_data(NewData,#state{connection=Connection,buff=Buff} = State) ->
%% first answer
P=#pending{tref=TRef,caller=Caller} =
lists:last(Pending),
- timer:cancel(TRef),
+ _ = timer:cancel(TRef),
Reason1 = {failed_to_parse_received_data,Reason},
ct_gen_conn:return(Caller,{error,Reason1}),
lists:delete(P,Pending)
@@ -1473,7 +1454,7 @@ decode({Tag,Attrs,_}=E, #state{connection=Connection,pending=Pending}=State) ->
{noreply,State#state{hello_status = {error,Reason}}}
end;
#pending{tref=TRef,caller=Caller} ->
- timer:cancel(TRef),
+ _ = timer:cancel(TRef),
case decode_hello(E) of
{ok,SessionId,Capabilities} ->
ct_gen_conn:return(Caller,ok),
@@ -1501,7 +1482,7 @@ decode({Tag,Attrs,_}=E, #state{connection=Connection,pending=Pending}=State) ->
case [P || P = #pending{msg_id=undefined,op=undefined} <- Pending] of
[#pending{tref=TRef,
caller=Caller}] ->
- timer:cancel(TRef),
+ _ = timer:cancel(TRef),
ct_gen_conn:return(Caller,E),
{noreply,State#state{pending=[]}};
_ ->
@@ -1523,7 +1504,7 @@ get_msg_id(Attrs) ->
decode_rpc_reply(MsgId,{_,Attrs,Content0}=E,#state{pending=Pending} = State) ->
case lists:keytake(MsgId,#pending.msg_id,Pending) of
{value, #pending{tref=TRef,op=Op,caller=Caller}, Pending1} ->
- timer:cancel(TRef),
+ _ = timer:cancel(TRef),
Content = forward_xmlns_attr(Attrs,Content0),
{CallerReply,{ServerReply,State2}} =
do_decode_rpc_reply(Op,Content,State#state{pending=Pending1}),
@@ -1538,7 +1519,7 @@ decode_rpc_reply(MsgId,{_,Attrs,Content0}=E,#state{pending=Pending} = State) ->
msg_id=undefined,
op=undefined,
caller=Caller}] ->
- timer:cancel(TRef),
+ _ = timer:cancel(TRef),
ct_gen_conn:return(Caller,E),
{noreply,State#state{pending=[]}};
_ ->
@@ -1881,10 +1862,7 @@ ssh_open(#options{host=Host,timeout=Timeout,port=Port,ssh=SshOpts,name=Name}) ->
end;
{error, Reason} ->
ssh:close(CM),
- {error,{ssh,could_not_open_channel,Reason}};
- Other ->
- %% Bug in ssh?? got {closed,0} here once...
- {error,{ssh,unexpected_from_session_channel,Other}}
+ {error,{ssh,could_not_open_channel,Reason}}
end;
{error,Reason} ->
{error,{ssh,could_not_connect_to_server,Reason}}
diff --git a/lib/common_test/src/ct_run.erl b/lib/common_test/src/ct_run.erl
index 7c797be03e..03cf06abed 100644
--- a/lib/common_test/src/ct_run.erl
+++ b/lib/common_test/src/ct_run.erl
@@ -71,6 +71,7 @@
enable_builtin_hooks,
include = [],
auto_compile,
+ abort_if_missing_suites,
silent_connections = [],
stylesheet,
multiply_timetraps = 1,
@@ -246,9 +247,11 @@ script_start1(Parent, Args) ->
Vts = get_start_opt(vts, true, Args),
Shell = get_start_opt(shell, true, Args),
Cover = get_start_opt(cover, fun([CoverFile]) -> ?abs(CoverFile) end, Args),
- CoverStop = get_start_opt(cover_stop, fun([CS]) -> list_to_atom(CS) end, Args),
+ CoverStop = get_start_opt(cover_stop,
+ fun([CS]) -> list_to_atom(CS) end, Args),
LogDir = get_start_opt(logdir, fun([LogD]) -> LogD end, Args),
- LogOpts = get_start_opt(logopts, fun(Os) -> [list_to_atom(O) || O <- Os] end,
+ LogOpts = get_start_opt(logopts,
+ fun(Os) -> [list_to_atom(O) || O <- Os] end,
[], Args),
Verbosity = verbosity_args2opts(Args),
MultTT = get_start_opt(multiply_timetraps,
@@ -311,6 +314,12 @@ script_start1(Parent, Args) ->
application:set_env(common_test, auto_compile, false),
{false,[]}
end,
+
+ %% abort test run if some suites can't be compiled
+ AbortIfMissing = get_start_opt(abort_if_missing_suites,
+ fun([]) -> true;
+ ([Bool]) -> list_to_atom(Bool)
+ end, false, Args),
%% silent connections
SilentConns =
get_start_opt(silent_connections,
@@ -347,6 +356,7 @@ script_start1(Parent, Args) ->
ct_hooks = CTHooks,
enable_builtin_hooks = EnableBuiltinHooks,
auto_compile = AutoCompile,
+ abort_if_missing_suites = AbortIfMissing,
include = IncludeDirs,
silent_connections = SilentConns,
stylesheet = Stylesheet,
@@ -551,6 +561,9 @@ combine_test_opts(TS, Specs, Opts) ->
ACBool
end,
+ AbortIfMissing = choose_val(Opts#opts.abort_if_missing_suites,
+ TSOpts#opts.abort_if_missing_suites),
+
BasicHtml =
case choose_val(Opts#opts.basic_html,
TSOpts#opts.basic_html) of
@@ -578,6 +591,7 @@ combine_test_opts(TS, Specs, Opts) ->
enable_builtin_hooks = EnableBuiltinHooks,
stylesheet = Stylesheet,
auto_compile = AutoCompile,
+ abort_if_missing_suites = AbortIfMissing,
include = AllInclude,
multiply_timetraps = MultTT,
scale_timetraps = ScaleTT,
@@ -753,6 +767,7 @@ script_usage() ->
"\n\t[-verbosity GenVLvl | [CategoryVLvl1 .. CategoryVLvlN]]"
"\n\t[-include InclDir1 InclDir2 .. InclDirN]"
"\n\t[-no_auto_compile]"
+ "\n\t[-abort_if_missing_suites]"
"\n\t[-multiply_timetraps N]"
"\n\t[-scale_timetraps]"
"\n\t[-create_priv_dir auto_per_run | auto_per_tc | manual_per_tc]"
@@ -775,6 +790,7 @@ script_usage() ->
"\n\t[-ct_hooks CTHook1 CTHook2 .. CTHookN]"
"\n\t[-include InclDir1 InclDir2 .. InclDirN]"
"\n\t[-no_auto_compile]"
+ "\n\t[-abort_if_missing_suites]"
"\n\t[-multiply_timetraps N]"
"\n\t[-scale_timetraps]"
"\n\t[-create_priv_dir auto_per_run | auto_per_tc | manual_per_tc]"
@@ -799,6 +815,7 @@ script_usage() ->
"\n\t[-ct_hooks CTHook1 CTHook2 .. CTHookN]"
"\n\t[-include InclDir1 InclDir2 .. InclDirN]"
"\n\t[-no_auto_compile]"
+ "\n\t[-abort_if_missing_suites]"
"\n\t[-multiply_timetraps N]"
"\n\t[-scale_timetraps]"
"\n\t[-create_priv_dir auto_per_run | auto_per_tc | manual_per_tc]"
@@ -1026,6 +1043,10 @@ run_test2(StartOpts) ->
{ACBool,[]}
end,
+ %% abort test run if some suites can't be compiled
+ AbortIfMissing = get_start_opt(abort_if_missing_suites, value, false,
+ StartOpts),
+
%% decrypt config file
case proplists:get_value(decrypt, StartOpts) of
undefined ->
@@ -1067,6 +1088,7 @@ run_test2(StartOpts) ->
ct_hooks = CTHooks,
enable_builtin_hooks = EnableBuiltinHooks,
auto_compile = AutoCompile,
+ abort_if_missing_suites = AbortIfMissing,
include = Include,
silent_connections = SilentConns,
stylesheet = Stylesheet,
@@ -1401,6 +1423,7 @@ get_data_for_node(#testspec{label = Labels,
ct_hooks = CTHooks,
enable_builtin_hooks = EnableBuiltinHooks,
auto_compile = ACs,
+ abort_if_missing_suites = AiMSs,
include = Incl,
multiply_timetraps = MTs,
scale_timetraps = STs,
@@ -1435,6 +1458,7 @@ get_data_for_node(#testspec{label = Labels,
EvHandlers = [{H,A} || {N,H,A} <- EvHs, N==Node],
FiltCTHooks = [Hook || {N,Hook} <- CTHooks, N==Node],
AutoCompile = proplists:get_value(Node, ACs),
+ AbortIfMissing = proplists:get_value(Node, AiMSs),
Include = [I || {N,I} <- Incl, N==Node],
#opts{label = Label,
profile = Profile,
@@ -1451,6 +1475,7 @@ get_data_for_node(#testspec{label = Labels,
ct_hooks = FiltCTHooks,
enable_builtin_hooks = EnableBuiltinHooks,
auto_compile = AutoCompile,
+ abort_if_missing_suites = AbortIfMissing,
include = Include,
multiply_timetraps = MT,
scale_timetraps = ST,
@@ -1722,8 +1747,8 @@ compile_and_run(Tests, Skip, Opts, Args) ->
{SuiteErrs,HelpErrs} = auto_compile(TestSuites),
{TestSuites,SuiteErrs,SuiteErrs++HelpErrs}
end,
-
- case continue(AllMakeErrors) of
+
+ case continue(AllMakeErrors, Opts#opts.abort_if_missing_suites) of
true ->
SavedErrors = save_make_errors(SuiteMakeErrors),
ct_repeat:log_loop_info(Args),
@@ -2047,9 +2072,9 @@ final_skip([Skip|Skips], Final) ->
final_skip([], Final) ->
lists:reverse(Final).
-continue([]) ->
+continue([], _) ->
true;
-continue(_MakeErrors) ->
+continue(_MakeErrors, AbortIfMissingSuites) ->
io:nl(),
OldGl = group_leader(),
case set_group_leader_same_as_shell() of
@@ -2077,26 +2102,26 @@ continue(_MakeErrors) ->
true
end;
false -> % no shell process to use
- true
+ not AbortIfMissingSuites
end.
set_group_leader_same_as_shell() ->
%%! Locate the shell process... UGLY!!!
GS2or3 = fun(P) ->
- case process_info(P,initial_call) of
- {initial_call,{group,server,X}} when X == 2 ; X == 3 ->
- true;
- _ ->
- false
- end
- end,
+ case process_info(P,initial_call) of
+ {initial_call,{group,server,X}} when X == 2 ; X == 3 ->
+ true;
+ _ ->
+ false
+ end
+ end,
case [P || P <- processes(), GS2or3(P),
- true == lists:keymember(shell,1,
- element(2,process_info(P,dictionary)))] of
- [GL|_] ->
- group_leader(GL, self());
- [] ->
- false
+ true == lists:keymember(shell,1,
+ element(2,process_info(P,dictionary)))] of
+ [GL|_] ->
+ group_leader(GL, self());
+ [] ->
+ false
end.
check_and_add([{TestDir0,M,_} | Tests], Added, PA) ->
diff --git a/lib/common_test/src/ct_telnet.erl b/lib/common_test/src/ct_telnet.erl
index 4092d33bc0..3b2652d06c 100644
--- a/lib/common_test/src/ct_telnet.erl
+++ b/lib/common_test/src/ct_telnet.erl
@@ -17,51 +17,127 @@
%% %CopyrightEnd%
%%
-%%% @doc Common Test specific layer on top of telnet client ct_telnet_client.erl
-%%%
-%%% <p>Use this module to set up telnet connections, send commands and
-%%% perform string matching on the result.
-%%% See the <c>unix_telnet</c> manual page for information about how to use
-%%% ct_telnet, and configure connections, specifically for unix hosts.</p>
-%%% <p>The following default values are defined in ct_telnet:</p>
-%%% <pre>
-%%% Connection timeout = 10 sec (time to wait for connection)
-%%% Command timeout = 10 sec (time to wait for a command to return)
-%%% Max no of reconnection attempts = 3
-%%% Reconnection interval = 5 sek (time to wait in between reconnection attempts)
-%%% Keep alive = true (will send NOP to the server every 10 sec if connection is idle)</pre>
-%%% <p>These parameters can be altered by the user with the following
-%%% configuration term:</p>
-%%% <pre>
-%%% {telnet_settings, [{connect_timeout,Millisec},
-%%% {command_timeout,Millisec},
-%%% {reconnection_attempts,N},
-%%% {reconnection_interval,Millisec},
-%%% {keep_alive,Bool}]}.</pre>
-%%% <p><code>Millisec = integer(), N = integer()</code></p>
-%%% <p>Enter the <code>telnet_settings</code> term in a configuration
-%%% file included in the test and ct_telnet will retrieve the information
-%%% automatically. Note that <c>keep_alive</c> may be specified per connection if
-%%% required. See <c>unix_telnet</c> for details.</p></doc>
-
-%%% @type connection_type() = telnet | ts1 | ts2
-
-%%% @type connection() = handle() |
-%%% {ct:target_name(),connection_type()} | ct:target_name()
-
-%%% @type handle() = ct_gen_conn:handle(). Handle for a
-%%% specific telnet connection.
-
-%%% @type prompt_regexp() = string(). A regular expression which
-%%% matches all possible prompts for a specific type of target. The
-%%% regexp must not have any groups i.e. when matching, re:run/3 shall
-%%% return a list with one single element.
-%%%
-%%% @see unix_telnet
+%% @doc Common Test specific layer on top of telnet client `ct_telnet_client.erl'
+%%
+%% <p>Use this module to set up telnet connections, send commands and
+%% perform string matching on the result.
+%% See the `unix_telnet' manual page for information about how to use
+%% `ct_telnet', and configure connections, specifically for unix hosts.</p>
+%% <p>The following default values are defined in `ct_telnet':</p>
+%% <pre>
+%% Connection timeout = 10 sec (time to wait for connection)
+%% Command timeout = 10 sec (time to wait for a command to return)
+%% Max no of reconnection attempts = 3
+%% Reconnection interval = 5 sek (time to wait in between reconnection attempts)
+%% Keep alive = true (will send NOP to the server every 10 sec if connection is idle)</pre>
+%% <p>These parameters can be altered by the user with the following
+%% configuration term:</p>
+%% <pre>
+%% {telnet_settings, [{connect_timeout,Millisec},
+%% {command_timeout,Millisec},
+%% {reconnection_attempts,N},
+%% {reconnection_interval,Millisec},
+%% {keep_alive,Bool}]}.</pre>
+%% <p><code>Millisec = integer(), N = integer()</code></p>
+%% <p>Enter the <code>telnet_settings</code> term in a configuration
+%% file included in the test and ct_telnet will retrieve the information
+%% automatically. Note that `keep_alive' may be specified per connection if
+%% required. See `unix_telnet' for details.</p>
+%%
+%% == Logging ==
+%%
+%% The default logging behaviour of `ct_telnet' is to print information
+%% to the test case HTML log about performed operations and commands
+%% and their corresponding results. What won't be printed to the HTML log
+%% are text strings sent from the telnet server that are not explicitly
+%% received by means of a `ct_telnet' function such as `expect/3'.
+%% `ct_telnet' may however be configured to use a special purpose event handler,
+%% implemented in `ct_conn_log_h', for logging <b>all</b> telnet traffic.
+%% To use this handler, you need to install a Common Test hook named
+%% `cth_conn_log'. Example (using the test suite info function):
+%%
+%% ```
+%% suite() ->
+%% [{ct_hooks, [{cth_conn_log, [{conn_mod(),hook_options()}]}]}].
+%% '''
+%%
+%% `conn_mod()' is the name of the common_test module implementing
+%% the connection protocol, i.e. `ct_telnet'.
+%%
+%% The `cth_conn_log' hook performs unformatted logging of telnet data to
+%% a separate text file. All telnet communication is captured and printed,
+%% including arbitrary data sent from the server. The link to this text file
+%% can be found on the top of the test case HTML log.
+%%
+%% By default, data for all telnet connections is logged in one common
+%% file (named `default'), which might get messy e.g. if multiple telnet
+%% sessions are running in parallel. It is therefore possible to create a
+%% separate log file for each connection. To configure this, use the hook
+%% option `hosts' and list the names of the servers/connections that will be
+%% used in the suite. Note that the connections must be named for this to work
+%% (see the `open' function below).
+%%
+%% The hook option named `log_type' may be used to change the `cth_conn_log'
+%% behaviour. The default value of this option is `raw', which results in the
+%% behaviour described above. If the value is set to `html', all telnet
+%% communication is printed to the test case HTML log instead.
+%%
+%% All `cth_conn_log' hook options described above can also be specified in
+%% a configuration file with the configuration variable `ct_conn_log'. Example:
+%%
+%% ```
+%% {ct_conn_log, [{ct_telnet,[{log_type,raw},
+%% {hosts,[key_or_name()]}]}]}
+%% '''
+%%
+%% <b>Note</b> that hook options specified in a configuration file
+%% will overwrite any hardcoded hook options in the test suite!
+%%
+%% === Logging example ===
+%%
+%% The following `ct_hooks' statement will cause printing of telnet traffic
+%% to separate logs for the connections named `server1' and `server2'.
+%% Traffic for any other connections will be logged in the default telnet log.
+%%
+%% ```
+%% suite() ->
+%% [{ct_hooks,
+%% [{cth_conn_log, [{ct_telnet,[{hosts,[server1,server2]}]}]}]}].
+%%'''
+%%
+%% As previously explained, the above specification could also be provided
+%% by means of an entry like this in a configuration file:
+%%
+%% ```
+%% {ct_conn_log, [{ct_telnet,[{hosts,[server1,server2]}]}]}.
+%% '''
+%%
+%% in which case the `ct_hooks' statement in the test suite may simply look
+%% like this:
+%%
+%% ```
+%% suite() ->
+%% [{ct_hooks, [{cth_conn_log, []}]}].
+%% '''
+%%
+%% @end
--module(ct_telnet).
+%% @type connection_type() = telnet | ts1 | ts2
--compile(export_all).
+%% @type connection() = handle() |
+%% {ct:target_name(),connection_type()} | ct:target_name()
+
+%% @type handle() = ct_gen_conn:handle(). Handle for a
+%% specific telnet connection.
+
+%% @type prompt_regexp() = string(). A regular expression which
+%% matches all possible prompts for a specific type of target. The
+%% regexp must not have any groups i.e. when matching, re:run/3 shall
+%% return a list with one single element.
+%%
+%% @see unix_telnet
+
+-module(ct_telnet).
-export([open/1, open/2, open/3, open/4, close/1]).
-export([cmd/2, cmd/3, cmdf/3, cmdf/4, get_data/1,
@@ -71,10 +147,9 @@
-export([init/3,handle_msg/2,reconnect/2,terminate/2]).
%% Tool internals
--export([silent_teln_expect/5, teln_receive_until_prompt/3,
- start_log/1, log/3, cont_log/2, end_log/0,
- try_start_log/1, try_log/3, try_cont_log/2, try_end_log/0]).
-
+-export([silent_teln_expect/6, teln_receive_until_prompt/3,
+ format_data/2]).
+-export([start_gen_log/1, end_gen_log/0, log/3, log/4]).
-define(RECONNS,3).
-define(RECONN_TIMEOUT,5000).
@@ -83,12 +158,14 @@
-include("ct_util.hrl").
--record(state,{teln_pid,
+-record(state,{host,
+ port,
+ teln_pid,
prx,
- type,
buffer=[],
prompt=false,
name,
+ type,
target_mod,
keep_alive,
extra,
@@ -108,6 +185,7 @@ open(Name) ->
%%% Name = target_name()
%%% ConnType = ct_telnet:connection_type()
%%% Handle = ct_telnet:handle()
+%%% Reason = term()
%%%
%%% @doc Open a telnet connection to the specified target host.
open(Name,ConnType) ->
@@ -137,6 +215,7 @@ open(KeyOrName,ConnType,TargetMod) ->
%%% TargetMod = atom()
%%% Extra = term()
%%% Handle = handle()
+%%% Reason = term()
%%%
%%% @doc Open a telnet connection to the specified target host.
%%%
@@ -160,8 +239,7 @@ open(KeyOrName,ConnType,TargetMod) ->
open(KeyOrName,ConnType,TargetMod,Extra) ->
case ct:get_config({KeyOrName,ConnType}) of
undefined ->
- log(heading(open,{KeyOrName,ConnType}),"Failed: ~p",
- [{not_available,KeyOrName}]),
+ log(undefined,open,"Failed: ~p",[{not_available,KeyOrName}]),
{error,{not_available,KeyOrName,ConnType}};
Addr ->
Addr1 =
@@ -183,15 +261,24 @@ open(KeyOrName,ConnType,TargetMod,Extra) ->
end;
Bool -> Bool
end,
- log(heading(open,{KeyOrName,ConnType}),
- "Opening connection to: ~p",[Addr1]),
- ct_gen_conn:start(KeyOrName,full_addr(Addr1,ConnType),
- {TargetMod,KeepAlive,Extra},?MODULE)
+ log(undefined,open,"Connecting to ~p(~p)",
+ [KeyOrName,Addr1]),
+ Reconnect =
+ case ct:get_config({telnet_settings,reconnection_attempts}) of
+ 0 -> false;
+ _ -> true
+ end,
+ ct_gen_conn:start(full_addr(Addr1,ConnType),
+ {TargetMod,KeepAlive,Extra},
+ ?MODULE, [{name,KeyOrName},
+ {reconnect,Reconnect},
+ {old,true}])
end.
%%%-----------------------------------------------------------------
%%% @spec close(Connection) -> ok | {error,Reason}
-%%% Connection = ct_telnet:connection()
+%%% Connection = ct_telnet:connection()
+%%% Reason = term()
%%%
%%% @doc Close the telnet connection and stop the process managing it.
%%%
@@ -202,9 +289,9 @@ open(KeyOrName,ConnType,TargetMod,Extra) ->
close(Connection) ->
case get_handle(Connection) of
{ok,Pid} ->
- log("ct_telnet:close","Handle: ~w",[Pid]),
+ log(undefined,close,"Connection closed, handle: ~w",[Pid]),
case ct_gen_conn:stop(Pid) of
- {error,{process_down,Pid,noproc}} ->
+ {error,{process_down,Pid,_}} ->
{error,already_closed};
Result ->
Result
@@ -226,6 +313,7 @@ cmd(Connection,Cmd) ->
%%% Cmd = string()
%%% Timeout = integer()
%%% Data = [string()]
+%%% Reason = term()
%%% @doc Send a command via telnet and wait for prompt.
cmd(Connection,Cmd,Timeout) ->
case get_handle(Connection) of
@@ -246,6 +334,7 @@ cmdf(Connection,CmdFormat,Args) ->
%%% Args = list()
%%% Timeout = integer()
%%% Data = [string()]
+%%% Reason = term()
%%% @doc Send a telnet command and wait for prompt
%%% (uses a format string and list of arguments to build the command).
cmdf(Connection,CmdFormat,Args,Timeout) when is_list(Args) ->
@@ -256,6 +345,7 @@ cmdf(Connection,CmdFormat,Args,Timeout) when is_list(Args) ->
%%% @spec get_data(Connection) -> {ok,Data} | {error,Reason}
%%% Connection = ct_telnet:connection()
%%% Data = [string()]
+%%% Reason = term()
%%% @doc Get all data which has been received by the telnet client
%%% since last command was sent.
get_data(Connection) ->
@@ -270,6 +360,7 @@ get_data(Connection) ->
%%% @spec send(Connection,Cmd) -> ok | {error,Reason}
%%% Connection = ct_telnet:connection()
%%% Cmd = string()
+%%% Reason = term()
%%% @doc Send a telnet command and return immediately.
%%%
%%% <p>The resulting output from the command can be read with
@@ -287,6 +378,7 @@ send(Connection,Cmd) ->
%%% Connection = ct_telnet:connection()
%%% CmdFormat = string()
%%% Args = list()
+%%% Reason = term()
%%% @doc Send a telnet command and return immediately (uses a format
%%% string and a list of arguments to build the command).
sendf(Connection,CmdFormat,Args) when is_list(Args) ->
@@ -309,9 +401,11 @@ expect(Connection,Patterns) ->
%%% Prompt = string()
%%% Tag = term()
%%% Opts = [Opt]
-%%% Opt = {timeout,Timeout} | repeat | {repeat,N} | sequence |
-%%% {halt,HaltPatterns} | ignore_prompt | no_prompt_check
-%%% Timeout = integer()
+%%% Opt = {idle_timeout,IdleTimeout} | {total_timeout,TotalTimeout} |
+%%% repeat | {repeat,N} | sequence | {halt,HaltPatterns} |
+%%% ignore_prompt | no_prompt_check
+%%% IdleTimeout = infinity | integer()
+%%% TotalTimeout = infinity | integer()
%%% N = integer()
%%% HaltPatterns = Patterns
%%% MatchList = [Match]
@@ -337,11 +431,16 @@ expect(Connection,Patterns) ->
%%% will also include the matched <code>Tag</code>. Else, only
%%% <code>RxMatch</code> is returned.</p>
%%%
-%%% <p>The <code>timeout</code> option indicates that the function
+%%% <p>The <code>idle_timeout</code> option indicates that the function
%%% shall return if the telnet client is idle (i.e. if no data is
-%%% received) for more than <code>Timeout</code> milliseconds. Default
+%%% received) for more than <code>IdleTimeout</code> milliseconds. Default
%%% timeout is 10 seconds.</p>
%%%
+%%% <p>The <code>total_timeout</code> option sets a time limit for
+%%% the complete expect operation. After <code>TotalTimeout</code>
+%%% milliseconds, <code>{error,timeout}</code> is returned. The default
+%%% value is <code>infinity</code> (i.e. no time limit).</p>
+%%%
%%% <p>The function will always return when a prompt is found, unless
%%% any of the <code>ignore_prompt</code> or
%%% <code>no_prompt_check</code> options are used, in which case it
@@ -408,9 +507,20 @@ init(Name,{Ip,Port,Type},{TargetMod,KeepAlive,Extra}) ->
Settings ->
set_telnet_defaults(Settings,#state{})
end,
- case catch TargetMod:connect(Ip,Port,S0#state.conn_to,KeepAlive,Extra) of
+ case catch TargetMod:connect(Name,Ip,Port,S0#state.conn_to,
+ KeepAlive,Extra) of
{ok,TelnPid} ->
- log(heading(init,{Name,Type}),
+ put({ct_telnet_pid2name,TelnPid},Name),
+ S1 = S0#state{host=Ip,
+ port=Port,
+ teln_pid=TelnPid,
+ name=Name,
+ type=type(Type),
+ target_mod=TargetMod,
+ keep_alive=KeepAlive,
+ extra=Extra,
+ prx=TargetMod:get_prompt_regexp()},
+ log(S1,open,
"Opened telnet connection\n"
"IP: ~p\n"
"Port: ~p\n"
@@ -419,15 +529,9 @@ init(Name,{Ip,Port,Type},{TargetMod,KeepAlive,Extra}) ->
"Reconnection interval: ~p\n"
"Connection timeout: ~p\n"
"Keep alive: ~w",
- [Ip,Port,S0#state.com_to,S0#state.reconns,
- S0#state.reconn_int,S0#state.conn_to,KeepAlive]),
- {ok,TelnPid,S0#state{teln_pid=TelnPid,
- type=type(Type),
- name={Name,Type},
- target_mod=TargetMod,
- keep_alive=KeepAlive,
- extra=Extra,
- prx=TargetMod:get_prompt_regexp()}};
+ [Ip,Port,S1#state.com_to,S1#state.reconns,
+ S1#state.reconn_int,S1#state.conn_to,KeepAlive]),
+ {ok,TelnPid,S1};
{'EXIT',Reason} ->
{error,Reason};
Error ->
@@ -448,31 +552,35 @@ set_telnet_defaults([{reconnection_interval,RInt}|Ss],S) ->
set_telnet_defaults([{keep_alive,_}|Ss],S) ->
set_telnet_defaults(Ss,S);
set_telnet_defaults([Unknown|Ss],S) ->
- log(heading(set_telnet_defaults,{telnet_settings,Unknown}),
- "Bad element in telnet_settings: ~p",[Unknown]),
+ force_log(S,error,
+ "Bad element in telnet_settings: ~p",[Unknown]),
set_telnet_defaults(Ss,S);
set_telnet_defaults([],S) ->
S.
%% @hidden
handle_msg({cmd,Cmd,Timeout},State) ->
- try_start_log(heading(cmd,State#state.name)),
- try_cont_log("Cmd: ~p", [Cmd]),
- debug_cont_log("Throwing Buffer:",[]),
+ start_gen_log(heading(cmd,State#state.name)),
+ log(State,cmd,"Cmd: ~p",[Cmd]),
+
+ debug_cont_gen_log("Throwing Buffer:",[]),
debug_log_lines(State#state.buffer),
+
case {State#state.type,State#state.prompt} of
{ts,_} ->
- silent_teln_expect(State#state.teln_pid,
+ silent_teln_expect(State#state.name,
+ State#state.teln_pid,
State#state.buffer,
prompt,
State#state.prx,
- [{timeout,2000}]);
+ [{idle_timeout,2000}]);
{ip,false} ->
- silent_teln_expect(State#state.teln_pid,
+ silent_teln_expect(State#state.name,
+ State#state.teln_pid,
State#state.buffer,
prompt,
State#state.prx,
- [{timeout,200}]);
+ [{idle_timeout,200}]);
{ip,true} ->
ok
end,
@@ -482,52 +590,63 @@ handle_msg({cmd,Cmd,Timeout},State) ->
{Return,NewBuffer,Prompt} =
case teln_cmd(State#state.teln_pid, Cmd, State#state.prx, TO) of
{ok,Data,_PromptType,Rest} ->
- try_cont_log("Return: ~p", [{ok,Data}]),
+ log(State,recv,"Return: ~p",[{ok,Data}]),
{{ok,Data},Rest,true};
Error ->
- Retry = {retry,{Error,State#state.name,State#state.teln_pid,
+ Retry = {retry,{Error,
+ {State#state.name,
+ State#state.type},
+ State#state.teln_pid,
{cmd,Cmd,TO}}},
- try_cont_log("Return: ~p", [Error]),
+ log(State,recv,"Return: ~p",[Error]),
{Retry,[],false}
end,
- try_end_log(),
+ end_gen_log(),
{Return,State#state{buffer=NewBuffer,prompt=Prompt}};
handle_msg({send,Cmd},State) ->
- try_log(heading(send,State#state.name),"Cmd: ~p",[Cmd]),
- debug_cont_log("Throwing Buffer:",[]),
+ start_gen_log(heading(send,State#state.name)),
+ log(State,send,"Sending: ~p",[Cmd]),
+
+ debug_cont_gen_log("Throwing Buffer:",[]),
debug_log_lines(State#state.buffer),
+
case {State#state.type,State#state.prompt} of
{ts,_} ->
- silent_teln_expect(State#state.teln_pid,
+ silent_teln_expect(State#state.name,
+ State#state.teln_pid,
State#state.buffer,
prompt,
State#state.prx,
- [{timeout,2000}]);
+ [{idle_timeout,2000}]);
{ip,false} ->
- silent_teln_expect(State#state.teln_pid,
+ silent_teln_expect(State#state.name,
+ State#state.teln_pid,
State#state.buffer,
prompt,
State#state.prx,
- [{timeout,200}]);
+ [{idle_timeout,200}]);
{ip,true} ->
ok
end,
ct_telnet_client:send_data(State#state.teln_pid,Cmd),
+ end_gen_log(),
{ok,State#state{buffer=[],prompt=false}};
handle_msg(get_data,State) ->
- try_start_log(heading(get_data,State#state.name)),
+ start_gen_log(heading(get_data,State#state.name)),
+ log(State,cmd,"Reading data...",[]),
{ok,Data,Buffer} = teln_get_all_data(State#state.teln_pid,
State#state.prx,
State#state.buffer,
[],[]),
- try_cont_log("Return: ~p",[{ok,Data}]),
- try_end_log(),
+ log(State,recv,"Return: ~p",[{ok,Data}]),
+ end_gen_log(),
{{ok,Data},State#state{buffer=Buffer}};
handle_msg({expect,Pattern,Opts},State) ->
- try_start_log(heading(expect,State#state.name)),
- try_cont_log("Expect: ~p\nOpts=~p\n",[Pattern,Opts]),
+ start_gen_log(heading(expect,State#state.name)),
+ log(State,expect,"Expect: ~p\nOpts = ~p\n",[Pattern,Opts]),
{Return,NewBuffer,Prompt} =
- case teln_expect(State#state.teln_pid,
+ case teln_expect(State#state.name,
+ State#state.teln_pid,
State#state.buffer,
Pattern,
State#state.prx,
@@ -536,22 +655,23 @@ handle_msg({expect,Pattern,Opts},State) ->
P = check_if_prompt_was_reached(Data,[]),
{{ok,Data},Rest,P};
{ok,Data,HaltReason,Rest} ->
- force_cont_log("HaltReason: ~p",
- [HaltReason]),
+ force_log(State,expect,"HaltReason: ~p",[HaltReason]),
P = check_if_prompt_was_reached(Data,HaltReason),
{{ok,Data,HaltReason},Rest,P};
{error,Reason,Rest} ->
- force_cont_log("Expect failed\n~p",[{error,Reason}]),
+ force_log(State,expect,"Expect failed\n~p",[{error,Reason}]),
P = check_if_prompt_was_reached([],Reason),
{{error,Reason},Rest,P};
{error,Reason} ->
- force_cont_log("Expect failed\n~p",[{error,Reason}]),
+ force_log(State,expect,"Expect failed\n~p",[{error,Reason}]),
P = check_if_prompt_was_reached([],Reason),
{{error,Reason},[],P}
end,
- try_end_log(),
+ end_gen_log(),
Return1 = case Return of
- {error,_} -> {retry,{Return,State#state.name,
+ {error,_} -> {retry,{Return,
+ {State#state.name,
+ State#state.type},
State#state.teln_pid,
{expect,Pattern,Opts}}};
_ -> Return
@@ -562,18 +682,20 @@ handle_msg({expect,Pattern,Opts},State) ->
%% @hidden
reconnect({Ip,Port,_Type},State) ->
reconnect(Ip,Port,State#state.reconns,State).
-reconnect(Ip,Port,N,State=#state{target_mod=TargetMod,
+reconnect(Ip,Port,N,State=#state{name=Name,
+ target_mod=TargetMod,
keep_alive=KeepAlive,
extra=Extra,
conn_to=ConnTo,
reconn_int=ReconnInt}) ->
- case TargetMod:connect(Ip,Port,ConnTo,KeepAlive,Extra) of
- {ok, NewPid} ->
+ case TargetMod:connect(Name,Ip,Port,ConnTo,KeepAlive,Extra) of
+ {ok,NewPid} ->
+ put({ct_telnet_pid2name,NewPid},Name),
{ok, NewPid, State#state{teln_pid=NewPid}};
Error when N==0 ->
Error;
_Error ->
- log("Reconnect failed!","Retries left: ~w",[N]),
+ log(State,reconnect,"Reconnect failed!","Retries left: ~w",[N]),
timer:sleep(ReconnInt),
reconnect(Ip,Port,N-1,State)
end.
@@ -581,11 +703,9 @@ reconnect(Ip,Port,N,State=#state{target_mod=TargetMod,
%% @hidden
terminate(TelnPid,State) ->
- log(heading(terminate,State#state.name),
- "Closing telnet connection.\nId: ~w",
- [TelnPid]),
- ct_telnet_client:close(TelnPid).
-
+ Result = ct_telnet_client:close(TelnPid),
+ log(State,close,"Telnet connection for ~w closed.",[TelnPid]),
+ Result.
%%%=================================================================
%%% Internal function
@@ -637,79 +757,114 @@ check_if_prompt_was_reached(Data,_) when is_list(Data) ->
check_if_prompt_was_reached(_,_) ->
false.
-%tc(Fun) ->
-% Before = erlang:now(),
-% Val = Fun(),
-% After = erlang:now(),
-% {now_diff(After, Before), Val}.
-%now_diff({A2, B2, C2}, {A1, B1, C1}) ->
-% ((A2-A1)*1000000 + B2-B1)*1000000 + C2-C1.
+%%%-----------------------------------------------------------------
+%%% Functions for logging ct_telnet reports and telnet data
-heading(Function,Name) ->
- io_lib:format("~w:~w ~p",[?MODULE,Function,Name]).
+heading(Action,undefined) ->
+ io_lib:format("~w ~w",[?MODULE,Action]);
+heading(Action,Name) ->
+ io_lib:format("~w ~w for ~p",[?MODULE,Action,Name]).
-%%% @hidden
-%% Functions for regular (unconditional) logging, to be
-%% used during connect, reconnect, disconnect etc.
-log(Heading,Str,Args) ->
- ct_gen_conn:log(Heading,Str,Args).
-%%% @hidden
-start_log(Heading) ->
- ct_gen_conn:start_log(Heading).
-cont_log(Str,Args) ->
- ct_gen_conn:cont_log(Str,Args).
-end_log() ->
- ct_gen_conn:end_log().
+force_log(State,Action,String,Args) ->
+ log(State,Action,String,Args,true).
+%%%-----------------------------------------------------------------
%%% @hidden
-%% Functions for conditional logging, to be used by
-%% cmd, send, receive, expect etc (this output may be
-%% silenced by user).
-try_start_log(Heading) ->
- do_try_log(start_log,[Heading]).
-%%% @hidden
-try_end_log() ->
- do_try_log(end_log,[]).
+log(State,Action,String,Args) when is_record(State, state) ->
+ log(State,Action,String,Args,false);
+log(Name,Action,String,Args) when is_atom(Name) ->
+ log(#state{name=Name},Action,String,Args,false);
+log(TelnPid,Action,String,Args) when is_pid(TelnPid) ->
+ log(#state{teln_pid=TelnPid},Action,String,Args,false).
+%%%-----------------------------------------------------------------
%%% @hidden
-try_log(Heading,Str,Args) ->
- do_try_log(log,[Heading,Str,Args]).
+log(undefined,String,Args) ->
+ log(#state{},undefined,String,Args,false);
+log(Name,String,Args) when is_atom(Name) ->
+ log(#state{name=Name},undefined,String,Args,false);
+log(TelnPid,String,Args) when is_pid(TelnPid) ->
+ log(#state{teln_pid=TelnPid},undefined,String,Args).
+%%%-----------------------------------------------------------------
%%% @hidden
-try_cont_log(Str,Args) ->
- do_try_log(cont_log,[Str,Args]).
+log(#state{name=Name,teln_pid=TelnPid,host=Host,port=Port},
+ Action,String,Args,ForcePrint) ->
+ Name1 = if Name == undefined -> get({ct_telnet_pid2name,TelnPid});
+ true -> Name
+ end,
+ Silent = get(silent),
+
+ if Action == general_io ->
+ case ct_util:get_testdata({cth_conn_log,?MODULE}) of
+ HookMode when HookMode /= undefined, HookMode /= silent,
+ Silent /= true ->
+ error_logger:info_report(#conn_log{header=false,
+ client=self(),
+ conn_pid=TelnPid,
+ address={Host,Port},
+ name=Name1,
+ action=Action,
+ module=?MODULE},
+ {String,Args});
+ _ -> %% hook inactive or silence requested
+ ok
+ end;
+
+ true ->
+ if Action == open; Action == close; Action == reconnect;
+ Action == info; Action == error ->
+ ct_gen_conn:log(heading(Action,Name1),String,Args);
+
+ ForcePrint == false ->
+ case ct_util:is_silenced(telnet) of
+ true ->
+ ok;
+ false ->
+ ct_gen_conn:cont_log(String,Args)
+ end;
+
+ ForcePrint == true ->
+ case ct_util:is_silenced(telnet) of
+ true ->
+ %% call log/3 now instead of cont_log/2 since
+ %% start_gen_log/1 will not have been previously
+ %% called
+ ct_gen_conn:log(heading(Action,Name1),String,Args);
+ false ->
+ ct_gen_conn:cont_log(String,Args)
+ end
+ end
+ end.
+%%%-----------------------------------------------------------------
%%% @hidden
-do_try_log(Func,Args) ->
+start_gen_log(Heading) ->
%% check if output is suppressed
case ct_util:is_silenced(telnet) of
- true ->
- ok;
- false ->
- apply(ct_gen_conn,Func,Args)
+ true -> ok;
+ false -> ct_gen_conn:start_log(Heading)
end.
+%%%-----------------------------------------------------------------
%%% @hidden
-%% Functions that will force printout even if ct_telnet
-%% output has been silenced, to be used for error printouts.
-force_cont_log(Str,Args) ->
+end_gen_log() ->
+ %% check if output is suppressed
case ct_util:is_silenced(telnet) of
- true ->
- %% call log/3 now instead of cont_log/2 since
- %% start_log/1 will not have been previously called
- log("ct_telnet info",Str,Args);
- false ->
- cont_log(Str,Args)
+ true -> ok;
+ false -> ct_gen_conn:end_log()
end.
%%% @hidden
%% Debug printouts.
-debug_cont_log(Str,Args) ->
+debug_cont_gen_log(Str,Args) ->
Old = put(silent,true),
- cont_log(Str,Args),
+ ct_gen_conn:cont_log(Str,Args),
put(silent,Old).
-
+%% Log callback - called from the error handler process
+format_data(_How,{String,Args}) ->
+ io_lib:format(String,Args).
%%%=================================================================
%%% Abstraction layer on top of ct_telnet_client.erl
@@ -717,16 +872,14 @@ teln_cmd(Pid,Cmd,Prx,Timeout) ->
ct_telnet_client:send_data(Pid,Cmd),
teln_receive_until_prompt(Pid,Prx,Timeout).
-
teln_get_all_data(Pid,Prx,Data,Acc,LastLine) ->
- case check_for_prompt(Prx,lists:reverse(LastLine) ++ Data) of
+ case check_for_prompt(Prx,LastLine++Data) of
{prompt,Lines,_PromptType,Rest} ->
teln_get_all_data(Pid,Prx,Rest,[Lines|Acc],[]);
{noprompt,Lines,LastLine1} ->
case ct_telnet_client:get_data(Pid) of
{ok,[]} ->
- {ok,lists:reverse(lists:append([Lines|Acc])),
- lists:reverse(LastLine1)};
+ {ok,lists:reverse(lists:append([Lines|Acc])),LastLine1};
{ok,Data1} ->
teln_get_all_data(Pid,Prx,Data1,[Lines|Acc],LastLine1)
end
@@ -735,7 +888,8 @@ teln_get_all_data(Pid,Prx,Data,Acc,LastLine) ->
%% Expect options record
-record(eo,{teln_pid,
prx,
- timeout,
+ idle_timeout,
+ total_timeout,
haltpatterns=[],
seq=false,
repeat=false,
@@ -746,11 +900,9 @@ teln_get_all_data(Pid,Prx,Data,Acc,LastLine) ->
%% @doc Externally the silent_teln_expect function shall only be used
%% by the TargetModule, i.e. the target specific module which
%% implements connect/2 and get_prompt_regexp/0.
-silent_teln_expect(Pid,Data,Pattern,Prx,Opts) ->
+silent_teln_expect(Name,Pid,Data,Pattern,Prx,Opts) ->
Old = put(silent,true),
- try_cont_log("silent_teln_expect/5, Pattern = ~p",[Pattern]),
- Result = teln_expect(Pid,Data,Pattern,Prx,Opts),
- try_cont_log("silent_teln_expect -> ~p\n",[Result]),
+ Result = teln_expect(Name,Pid,Data,Pattern,Prx,Opts),
put(silent,Old),
Result.
@@ -766,7 +918,7 @@ silent_teln_expect(Pid,Data,Pattern,Prx,Opts) ->
%% condition is fullfilled.
%% 3b) Repeat (sequence): 2) is repeated either N times or until a
%% halt condition is fullfilled.
-teln_expect(Pid,Data,Pattern0,Prx,Opts) ->
+teln_expect(Name,Pid,Data,Pattern0,Prx,Opts) ->
HaltPatterns =
case get_ignore_prompt(Opts) of
true ->
@@ -779,18 +931,19 @@ teln_expect(Pid,Data,Pattern0,Prx,Opts) ->
Seq = get_seq(Opts),
Pattern = convert_pattern(Pattern0,Seq),
- Timeout = get_timeout(Opts),
+ {IdleTimeout,TotalTimeout} = get_timeouts(Opts),
EO = #eo{teln_pid=Pid,
prx=Prx,
- timeout=Timeout,
+ idle_timeout=IdleTimeout,
+ total_timeout=TotalTimeout,
seq=Seq,
haltpatterns=HaltPatterns,
prompt_check=PromptCheck},
case get_repeat(Opts) of
false ->
- case teln_expect1(Data,Pattern,[],EO) of
+ case teln_expect1(Name,Pid,Data,Pattern,[],EO) of
{ok,Matched,Rest} ->
{ok,Matched,Rest};
{halt,Why,Rest} ->
@@ -800,7 +953,7 @@ teln_expect(Pid,Data,Pattern0,Prx,Opts) ->
end;
N ->
EO1 = EO#eo{repeat=N},
- repeat_expect(Data,Pattern,[],EO1)
+ repeat_expect(Name,Pid,Data,Pattern,[],EO1)
end.
convert_pattern(Pattern,Seq)
@@ -822,11 +975,22 @@ rm_dupl([P|Ps],Acc) ->
rm_dupl([],Acc) ->
lists:reverse(Acc).
-get_timeout(Opts) ->
- case lists:keysearch(timeout,1,Opts) of
- {value,{timeout,T}} -> T;
- false -> ?DEFAULT_TIMEOUT
- end.
+get_timeouts(Opts) ->
+ {case lists:keysearch(idle_timeout,1,Opts) of
+ {value,{_,T}} ->
+ T;
+ false ->
+ %% this check is for backwards compatibility (pre CT v1.8)
+ case lists:keysearch(timeout,1,Opts) of
+ {value,{_,T}} -> T;
+ false -> ?DEFAULT_TIMEOUT
+ end
+ end,
+ case lists:keysearch(total_timeout,1,Opts) of
+ {value,{_,T}} -> T;
+ false -> infinity
+ end}.
+
get_repeat(Opts) ->
case lists:keysearch(repeat,1,Opts) of
{value,{repeat,N}} when is_integer(N) ->
@@ -855,23 +1019,28 @@ get_prompt_check(Opts) ->
%% Repeat either single or sequence. All match results are accumulated
%% and returned when a halt condition is fulllfilled.
-repeat_expect(Rest,_Pattern,Acc,#eo{repeat=0}) ->
+repeat_expect(_Name,_Pid,Rest,_Pattern,Acc,#eo{repeat=0}) ->
{ok,lists:reverse(Acc),done,Rest};
-repeat_expect(Data,Pattern,Acc,EO) ->
- case teln_expect1(Data,Pattern,[],EO) of
+repeat_expect(Name,Pid,Data,Pattern,Acc,EO) ->
+ case teln_expect1(Name,Pid,Data,Pattern,[],EO) of
{ok,Matched,Rest} ->
EO1 = EO#eo{repeat=EO#eo.repeat-1},
- repeat_expect(Rest,Pattern,[Matched|Acc],EO1);
+ repeat_expect(Name,Pid,Rest,Pattern,[Matched|Acc],EO1);
{halt,Why,Rest} ->
{ok,lists:reverse(Acc),Why,Rest};
{error,Reason} ->
{error,Reason}
end.
-teln_expect1(Data,Pattern,Acc,EO) ->
+teln_expect1(Name,Pid,Data,Pattern,Acc,EO=#eo{idle_timeout=IdleTO,
+ total_timeout=TotalTO}) ->
ExpectFun = case EO#eo.seq of
- true -> fun() -> seq_expect(Data,Pattern,Acc,EO) end;
- false -> fun() -> one_expect(Data,Pattern,EO) end
+ true -> fun() ->
+ seq_expect(Name,Pid,Data,Pattern,Acc,EO)
+ end;
+ false -> fun() ->
+ one_expect(Name,Pid,Data,Pattern,EO)
+ end
end,
case ExpectFun() of
{match,Match,Rest} ->
@@ -881,19 +1050,34 @@ teln_expect1(Data,Pattern,Acc,EO) ->
NotFinished ->
%% Get more data
Fun = fun() -> get_data1(EO#eo.teln_pid) end,
- case ct_gen_conn:do_within_time(Fun, EO#eo.timeout) of
- {error,Reason} ->
+ case timer:tc(ct_gen_conn, do_within_time, [Fun, IdleTO]) of
+ {_,{error,Reason}} ->
%% A timeout will occur when the telnet connection
- %% is idle for EO#eo.timeout milliseconds.
+ %% is idle for EO#eo.idle_timeout milliseconds.
{error,Reason};
- {ok,Data1} ->
+ {_,{ok,Data1}} when TotalTO == infinity ->
case NotFinished of
{nomatch,Rest} ->
%% One expect
- teln_expect1(Rest++Data1,Pattern,[],EO);
+ teln_expect1(Name,Pid,Rest++Data1,Pattern,[],EO);
{continue,Patterns1,Acc1,Rest} ->
%% Sequence
- teln_expect1(Rest++Data1,Patterns1,Acc1,EO)
+ teln_expect1(Name,Pid,Rest++Data1,Patterns1,Acc1,EO)
+ end;
+ {Elapsed,{ok,Data1}} ->
+ TVal = trunc(TotalTO - (Elapsed/1000)),
+ if TVal =< 0 ->
+ {error,timeout};
+ true ->
+ EO1 = EO#eo{total_timeout = TVal},
+ case NotFinished of
+ {nomatch,Rest} ->
+ %% One expect
+ teln_expect1(Name,Pid,Rest++Data1,Pattern,[],EO1);
+ {continue,Patterns1,Acc1,Rest} ->
+ %% Sequence
+ teln_expect1(Name,Pid,Rest++Data1,Patterns1,Acc1,EO1)
+ end
end
end
end.
@@ -913,47 +1097,45 @@ get_data1(Pid) ->
%% lines and each line is matched against each pattern.
%% one_expect: split data chunk at prompts
-one_expect(Data,Pattern,EO) when EO#eo.prompt_check==false ->
+one_expect(Name,Pid,Data,Pattern,EO) when EO#eo.prompt_check==false ->
% io:format("Raw Data ~p Pattern ~p EO ~p ",[Data,Pattern,EO]),
- one_expect1(Data,Pattern,[],EO#eo{found_prompt=false});
-one_expect(Data,Pattern,EO) ->
+ one_expect1(Name,Pid,Data,Pattern,[],EO#eo{found_prompt=false});
+one_expect(Name,Pid,Data,Pattern,EO) ->
case match_prompt(Data,EO#eo.prx) of
{prompt,UptoPrompt,PromptType,Rest} ->
case Pattern of
[Prompt] when Prompt==prompt; Prompt=={prompt,PromptType} ->
%% Only searching for prompt
- log_lines(UptoPrompt),
- try_cont_log("<b>PROMPT:</b> ~ts", [PromptType]),
+ log_lines(Name,Pid,UptoPrompt),
+ log(name_or_pid(Name,Pid),"PROMPT: ~ts",[PromptType]),
{match,{prompt,PromptType},Rest};
[{prompt,_OtherPromptType}] ->
%% Only searching for one specific prompt, not thisone
- log_lines(UptoPrompt),
+ log_lines(Name,Pid,UptoPrompt),
{nomatch,Rest};
_ ->
- one_expect1(UptoPrompt,Pattern,Rest,
+ one_expect1(Name,Pid,UptoPrompt,Pattern,Rest,
EO#eo{found_prompt=PromptType})
end;
noprompt ->
case Pattern of
[Prompt] when Prompt==prompt; element(1,Prompt)==prompt ->
%% Only searching for prompt
- LastLine = log_lines_not_last(Data),
+ LastLine = log_lines_not_last(Name,Pid,Data),
{nomatch,LastLine};
_ ->
- one_expect1(Data,Pattern,[],EO#eo{found_prompt=false})
+ one_expect1(Name,Pid,Data,Pattern,[],
+ EO#eo{found_prompt=false})
end
end.
-remove_zero(List) ->
- [Ch || Ch <- List, Ch=/=0, Ch=/=13].
-
%% one_expect1: split data chunk at lines
-one_expect1(Data,Pattern,Rest,EO) ->
- case match_lines(Data,Pattern,EO) of
+one_expect1(Name,Pid,Data,Pattern,Rest,EO) ->
+ case match_lines(Name,Pid,Data,Pattern,EO) of
{match,Match,MatchRest} ->
{match,Match,MatchRest++Rest};
{nomatch,prompt} ->
- one_expect(Rest,Pattern,EO);
+ one_expect(Name,Pid,Rest,Pattern,EO);
{nomatch,NoMatchRest} ->
{nomatch,NoMatchRest++Rest};
{halt,Why,HaltRest} ->
@@ -970,77 +1152,77 @@ one_expect1(Data,Pattern,Rest,EO) ->
%% searching for the next pattern in the list.
%% seq_expect: Split data chunk at prompts
-seq_expect(Data,[],Acc,_EO) ->
+seq_expect(_Name,_Pid,Data,[],Acc,_EO) ->
{match,lists:reverse(Acc),Data};
-seq_expect([],Patterns,Acc,_EO) ->
+seq_expect(_Name,_Pid,[],Patterns,Acc,_EO) ->
{continue,Patterns,lists:reverse(Acc),[]};
-seq_expect(Data,Patterns,Acc,EO) when EO#eo.prompt_check==false ->
- seq_expect1(Data,Patterns,Acc,[],EO#eo{found_prompt=false});
-seq_expect(Data,Patterns,Acc,EO) ->
+seq_expect(Name,Pid,Data,Patterns,Acc,EO) when EO#eo.prompt_check==false ->
+ seq_expect1(Name,Pid,Data,Patterns,Acc,[],EO#eo{found_prompt=false});
+seq_expect(Name,Pid,Data,Patterns,Acc,EO) ->
case match_prompt(Data,EO#eo.prx) of
{prompt,UptoPrompt,PromptType,Rest} ->
- seq_expect1(UptoPrompt,Patterns,Acc,Rest,
+ seq_expect1(Name,Pid,UptoPrompt,Patterns,Acc,Rest,
EO#eo{found_prompt=PromptType});
noprompt ->
- seq_expect1(Data,Patterns,Acc,[],EO#eo{found_prompt=false})
+ seq_expect1(Name,Pid,Data,Patterns,Acc,[],EO#eo{found_prompt=false})
end.
%% seq_expect1: For one prompt-chunk, match each pattern - line by
%% line if it is other than the prompt we are seaching for.
-seq_expect1(Data,[prompt|Patterns],Acc,Rest,EO) ->
+seq_expect1(Name,Pid,Data,[prompt|Patterns],Acc,Rest,EO) ->
case EO#eo.found_prompt of
false ->
- LastLine = log_lines_not_last(Data),
+ LastLine = log_lines_not_last(Name,Pid,Data),
%% Rest==[] because no prompt is found
{continue,[prompt|Patterns],Acc,LastLine};
PromptType ->
- log_lines(Data),
- try_cont_log("<b>PROMPT:</b> ~ts", [PromptType]),
- seq_expect(Rest,Patterns,[{prompt,PromptType}|Acc],EO)
+ log_lines(Name,Pid,Data),
+ log(name_or_pid(Name,Pid),"PROMPT: ~ts",[PromptType]),
+ seq_expect(Name,Pid,Rest,Patterns,[{prompt,PromptType}|Acc],EO)
end;
-seq_expect1(Data,[{prompt,PromptType}|Patterns],Acc,Rest,EO) ->
+seq_expect1(Name,Pid,Data,[{prompt,PromptType}|Patterns],Acc,Rest,EO) ->
case EO#eo.found_prompt of
false ->
- LastLine = log_lines_not_last(Data),
+ LastLine = log_lines_not_last(Name,Pid,Data),
%% Rest==[] because no prompt is found
{continue,[{prompt,PromptType}|Patterns],Acc,LastLine};
PromptType ->
- log_lines(Data),
- try_cont_log("<b>PROMPT:</b> ~ts", [PromptType]),
- seq_expect(Rest,Patterns,[{prompt,PromptType}|Acc],EO);
+ log_lines(Name,Pid,Data),
+ log(name_or_pid(Name,Pid),"PROMPT: ~ts", [PromptType]),
+ seq_expect(Name,Pid,Rest,Patterns,[{prompt,PromptType}|Acc],EO);
_OtherPromptType ->
- log_lines(Data),
- seq_expect(Rest,[{prompt,PromptType}|Patterns],Acc,EO)
+ log_lines(Name,Pid,Data),
+ seq_expect(Name,Pid,Rest,[{prompt,PromptType}|Patterns],Acc,EO)
end;
-seq_expect1(Data,[Pattern|Patterns],Acc,Rest,EO) ->
- case match_lines(Data,[Pattern],EO) of
+seq_expect1(Name,Pid,Data,[Pattern|Patterns],Acc,Rest,EO) ->
+ case match_lines(Name,Pid,Data,[Pattern],EO) of
{match,Match,MatchRest} ->
- seq_expect1(MatchRest,Patterns,[Match|Acc],Rest,EO);
+ seq_expect1(Name,Pid,MatchRest,Patterns,[Match|Acc],Rest,EO);
{nomatch,prompt} ->
- seq_expect(Rest,[Pattern|Patterns],Acc,EO);
+ seq_expect(Name,Pid,Rest,[Pattern|Patterns],Acc,EO);
{nomatch,NoMatchRest} when Rest==[] ->
%% The data did not end with a prompt
{continue,[Pattern|Patterns],Acc,NoMatchRest};
{halt,Why,HaltRest} ->
{halt,Why,HaltRest++Rest}
end;
-seq_expect1(Data,[],Acc,Rest,_EO) ->
+seq_expect1(_Name,_Pid,Data,[],Acc,Rest,_EO) ->
{match,lists:reverse(Acc),Data++Rest}.
%% Split prompt-chunk at lines
-match_lines(Data,Patterns,EO) ->
+match_lines(Name,Pid,Data,Patterns,EO) ->
FoundPrompt = EO#eo.found_prompt,
case one_line(Data,[]) of
{noline,Rest} when FoundPrompt=/=false ->
%% This is the line including the prompt
- case match_line(Rest,Patterns,FoundPrompt,EO) of
+ case match_line(Name,Pid,Rest,Patterns,FoundPrompt,EO) of
nomatch ->
{nomatch,prompt};
{Tag,Match} ->
{Tag,Match,[]}
end;
{noline,Rest} when EO#eo.prompt_check==false ->
- case match_line(Rest,Patterns,false,EO) of
+ case match_line(Name,Pid,Rest,Patterns,false,EO) of
nomatch ->
{nomatch,Rest};
{Tag,Match} ->
@@ -1049,9 +1231,9 @@ match_lines(Data,Patterns,EO) ->
{noline,Rest} ->
{nomatch,Rest};
{Line,Rest} ->
- case match_line(Line,Patterns,false,EO) of
+ case match_line(Name,Pid,Line,Patterns,false,EO) of
nomatch ->
- match_lines(Rest,Patterns,EO);
+ match_lines(Name,Pid,Rest,Patterns,EO);
{Tag,Match} ->
{Tag,Match,Rest}
end
@@ -1059,43 +1241,43 @@ match_lines(Data,Patterns,EO) ->
%% For one line, match each pattern
-match_line(Line,Patterns,FoundPrompt,EO) ->
- match_line(Line,Patterns,FoundPrompt,EO,match).
-
-match_line(Line,[prompt|Patterns],false,EO,RetTag) ->
- match_line(Line,Patterns,false,EO,RetTag);
-match_line(Line,[prompt|_Patterns],FoundPrompt,_EO,RetTag) ->
- try_cont_log(" ~ts", [Line]),
- try_cont_log("<b>PROMPT:</b> ~ts", [FoundPrompt]),
+match_line(Name,Pid,Line,Patterns,FoundPrompt,EO) ->
+ match_line(Name,Pid,Line,Patterns,FoundPrompt,EO,match).
+
+match_line(Name,Pid,Line,[prompt|Patterns],false,EO,RetTag) ->
+ match_line(Name,Pid,Line,Patterns,false,EO,RetTag);
+match_line(Name,Pid,Line,[prompt|_Patterns],FoundPrompt,_EO,RetTag) ->
+ log(name_or_pid(Name,Pid)," ~ts",[Line]),
+ log(name_or_pid(Name,Pid),"PROMPT: ~ts",[FoundPrompt]),
{RetTag,{prompt,FoundPrompt}};
-match_line(Line,[{prompt,PromptType}|_Patterns],FoundPrompt,_EO,RetTag)
+match_line(Name,Pid,Line,[{prompt,PromptType}|_Patterns],FoundPrompt,_EO,RetTag)
when PromptType==FoundPrompt ->
- try_cont_log(" ~ts", [Line]),
- try_cont_log("<b>PROMPT:</b> ~ts", [FoundPrompt]),
+ log(name_or_pid(Name,Pid)," ~ts",[Line]),
+ log(name_or_pid(Name,Pid),"PROMPT: ~ts",[FoundPrompt]),
{RetTag,{prompt,FoundPrompt}};
-match_line(Line,[{prompt,PromptType}|Patterns],FoundPrompt,EO,RetTag)
+match_line(Name,Pid,Line,[{prompt,PromptType}|Patterns],FoundPrompt,EO,RetTag)
when PromptType=/=FoundPrompt ->
- match_line(Line,Patterns,FoundPrompt,EO,RetTag);
-match_line(Line,[{Tag,Pattern}|Patterns],FoundPrompt,EO,RetTag) ->
+ match_line(Name,Pid,Line,Patterns,FoundPrompt,EO,RetTag);
+match_line(Name,Pid,Line,[{Tag,Pattern}|Patterns],FoundPrompt,EO,RetTag) ->
case re:run(Line,Pattern,[{capture,all,list}]) of
nomatch ->
- match_line(Line,Patterns,FoundPrompt,EO,RetTag);
+ match_line(Name,Pid,Line,Patterns,FoundPrompt,EO,RetTag);
{match,Match} ->
- try_cont_log("<b>MATCH:</b> ~ts", [Line]),
+ log(name_or_pid(Name,Pid),"MATCH: ~ts",[Line]),
{RetTag,{Tag,Match}}
end;
-match_line(Line,[Pattern|Patterns],FoundPrompt,EO,RetTag) ->
+match_line(Name,Pid,Line,[Pattern|Patterns],FoundPrompt,EO,RetTag) ->
case re:run(Line,Pattern,[{capture,all,list}]) of
nomatch ->
- match_line(Line,Patterns,FoundPrompt,EO,RetTag);
+ match_line(Name,Pid,Line,Patterns,FoundPrompt,EO,RetTag);
{match,Match} ->
- try_cont_log("<b>MATCH:</b> ~ts", [Line]),
+ log(name_or_pid(Name,Pid),"MATCH: ~ts",[Line]),
{RetTag,Match}
end;
-match_line(Line,[],FoundPrompt,EO,match) ->
- match_line(Line,EO#eo.haltpatterns,FoundPrompt,EO,halt);
-match_line(Line,[],_FoundPrompt,_EO,halt) ->
- try_cont_log(" ~ts", [Line]),
+match_line(Name,Pid,Line,[],FoundPrompt,EO,match) ->
+ match_line(Name,Pid,Line,EO#eo.haltpatterns,FoundPrompt,EO,halt);
+match_line(Name,Pid,Line,[],_FoundPrompt,_EO,halt) ->
+ log(name_or_pid(Name,Pid)," ~ts",[Line]),
nomatch.
one_line([$\n|Rest],Line) ->
@@ -1111,26 +1293,29 @@ one_line([],Line) ->
debug_log_lines(String) ->
Old = put(silent,true),
- log_lines(String),
+ log_lines(undefined,undefined,String),
put(silent,Old).
-log_lines(String) ->
- case log_lines_not_last(String) of
+log_lines(Name,Pid,String) ->
+ case log_lines_not_last(Name,Pid,String) of
[] ->
ok;
LastLine ->
- try_cont_log(" ~ts", [LastLine])
+ log(name_or_pid(Name,Pid)," ~ts",[LastLine])
end.
-log_lines_not_last(String) ->
+log_lines_not_last(Name,Pid,String) ->
case add_tabs(String,[],[]) of
{[],LastLine} ->
LastLine;
{String1,LastLine} ->
- try_cont_log("~ts",[String1]),
+ log(name_or_pid(Name,Pid),"~ts",[String1]),
LastLine
end.
+name_or_pid(undefined,Pid) -> Pid;
+name_or_pid(Name,_) -> Name.
+
add_tabs([0|Rest],Acc,LastLine) ->
add_tabs(Rest,Acc,LastLine);
add_tabs([$\r|Rest],Acc,LastLine) ->
@@ -1145,8 +1330,6 @@ add_tabs([],[],LastLine) ->
{[],lists:reverse(LastLine)}.
-
-
%%% @hidden
teln_receive_until_prompt(Pid,Prx,Timeout) ->
Fun = fun() -> teln_receive_until_prompt(Pid,Prx,[],[]) end,
@@ -1154,7 +1337,7 @@ teln_receive_until_prompt(Pid,Prx,Timeout) ->
teln_receive_until_prompt(Pid,Prx,Acc,LastLine) ->
{ok,Data} = ct_telnet_client:get_data(Pid),
- case check_for_prompt(Prx,LastLine ++ Data) of
+ case check_for_prompt(Prx,LastLine++Data) of
{prompt,Lines,PromptType,Rest} ->
Return = lists:reverse(lists:append([Lines|Acc])),
{ok,Return,PromptType,Rest};
diff --git a/lib/common_test/src/ct_telnet_client.erl b/lib/common_test/src/ct_telnet_client.erl
index 2cbcba9c77..ce30dcb74b 100644
--- a/lib/common_test/src/ct_telnet_client.erl
+++ b/lib/common_test/src/ct_telnet_client.erl
@@ -32,7 +32,9 @@
-module(ct_telnet_client).
--export([open/1, open/2, open/3, open/4, close/1]).
+%% -define(debug, true).
+
+-export([open/2, open/3, open/4, open/5, close/1]).
-export([send_data/2, get_data/1]).
-define(TELNET_PORT, 23).
@@ -64,20 +66,23 @@
-define(TERMINAL_TYPE, 24).
-define(WINDOW_SIZE, 31).
--record(state,{get_data, keep_alive=true}).
+-record(state,{conn_name, get_data, keep_alive=true, log_pos=1}).
-open(Server) ->
- open(Server, ?TELNET_PORT, ?OPEN_TIMEOUT, true).
+open(Server, ConnName) ->
+ open(Server, ?TELNET_PORT, ?OPEN_TIMEOUT, true, ConnName).
-open(Server, Port) ->
- open(Server, Port, ?OPEN_TIMEOUT, true).
+open(Server, Port, ConnName) ->
+ open(Server, Port, ?OPEN_TIMEOUT, true, ConnName).
-open(Server, Port, Timeout) ->
- open(Server, Port, Timeout, true).
+open(Server, Port, Timeout, ConnName) ->
+ open(Server, Port, Timeout, true, ConnName).
-open(Server, Port, Timeout, KeepAlive) ->
+open(Server, Port, Timeout, KeepAlive, ConnName) ->
Self = self(),
- Pid = spawn(fun() -> init(Self, Server, Port, Timeout, KeepAlive) end),
+ Pid = spawn(fun() ->
+ init(Self, Server, Port, Timeout,
+ KeepAlive, ConnName)
+ end),
receive
{open,Pid} ->
{ok,Pid};
@@ -86,29 +91,34 @@ open(Server, Port, Timeout, KeepAlive) ->
end.
close(Pid) ->
- Pid ! close.
+ Pid ! {close,self()},
+ receive closed -> ok
+ after 5000 -> ok
+ end.
send_data(Pid, Data) ->
Pid ! {send_data, Data++"\n"},
ok.
get_data(Pid) ->
- Pid ! {get_data, self()},
+ Pid ! {get_data,self()},
receive
{data,Data} ->
- {ok, Data}
+ {ok,Data}
end.
%%%-----------------------------------------------------------------
%%% Internal functions
-init(Parent, Server, Port, Timeout, KeepAlive) ->
+init(Parent, Server, Port, Timeout, KeepAlive, ConnName) ->
case gen_tcp:connect(Server, Port, [list,{packet,0}], Timeout) of
{ok,Sock} ->
- dbg("Connected to: ~p (port: ~w, keep_alive: ~w)\n", [Server,Port,KeepAlive]),
- send([?IAC,?DO,?SUPPRESS_GO_AHEAD], Sock),
+ dbg("~p connected to: ~p (port: ~w, keep_alive: ~w)\n",
+ [ConnName,Server,Port,KeepAlive]),
+ send([?IAC,?DO,?SUPPRESS_GO_AHEAD], Sock, ConnName),
Parent ! {open,self()},
- loop(#state{get_data=10, keep_alive=KeepAlive}, Sock, []),
+ loop(#state{conn_name=ConnName, get_data=10, keep_alive=KeepAlive},
+ Sock, []),
gen_tcp:close(Sock);
Error ->
Parent ! {Error,self()}
@@ -118,6 +128,13 @@ loop(State, Sock, Acc) ->
receive
{tcp_closed,_} ->
dbg("Connection closed\n", []),
+ Data = lists:reverse(lists:append(Acc)),
+ dbg("Printing queued messages: ~tp",[Data]),
+ ct_telnet:log(State#state.conn_name,
+ general_io, "~ts",
+ [lists:sublist(Data,
+ State#state.log_pos,
+ length(Data))]),
receive
{get_data,Pid} ->
Pid ! closed
@@ -125,11 +142,11 @@ loop(State, Sock, Acc) ->
ok
end;
{tcp,_,Msg0} ->
- dbg("tcp msg: ~p~n",[Msg0]),
+ dbg("tcp msg: ~tp~n",[Msg0]),
Msg = check_msg(Sock,Msg0,[]),
loop(State, Sock, [Msg | Acc]);
{send_data,Data} ->
- send(Data, Sock),
+ send(Data, Sock, State#state.conn_name),
loop(State, Sock, Acc);
{get_data,Pid} ->
NewState =
@@ -144,54 +161,100 @@ loop(State, Sock, Acc) ->
end;
_ ->
Data = lists:reverse(lists:append(Acc)),
- dbg("get_data ~p\n",[Data]),
+ Len = length(Data),
+ dbg("get_data ~tp\n",[Data]),
+ ct_telnet:log(State#state.conn_name,
+ general_io, "~ts",
+ [lists:sublist(Data,
+ State#state.log_pos,
+ Len)]),
Pid ! {data,Data},
- State
+ State#state{log_pos = 1}
end,
loop(NewState, Sock, []);
{get_data_delayed,Pid} ->
NewState =
case State of
#state{keep_alive = true, get_data = 0} ->
- if Acc == [] -> send([?IAC,?NOP], Sock);
+ if Acc == [] -> send([?IAC,?NOP], Sock,
+ State#state.conn_name);
true -> ok
end,
State#state{get_data=10};
_ ->
State
end,
- NewAcc =
+ {NewAcc,Pos} =
case erlang:is_process_alive(Pid) of
- true ->
+ true when Acc /= [] ->
Data = lists:reverse(lists:append(Acc)),
- dbg("get_data_delayed ~p\n",[Data]),
+ Len = length(Data),
+ dbg("get_data_delayed ~tp\n",[Data]),
+ ct_telnet:log(State#state.conn_name,
+ general_io, "~ts",
+ [lists:sublist(Data,
+ State#state.log_pos,
+ Len)]),
Pid ! {data,Data},
- [];
+ {[],1};
+ true when Acc == [] ->
+ dbg("get_data_delayed nodata\n",[]),
+ Pid ! {data,[]},
+ {[],1};
false ->
- Acc
+ {Acc,NewState#state.log_pos}
end,
- loop(NewState, Sock, NewAcc);
- close ->
+ loop(NewState#state{log_pos=Pos}, Sock, NewAcc);
+ {close,Pid} ->
dbg("Closing connection\n", []),
+ if Acc == [] ->
+ ok;
+ true ->
+ Data = lists:reverse(lists:append(Acc)),
+ dbg("Printing queued messages: ~tp",[Data]),
+ ct_telnet:log(State#state.conn_name,
+ general_io, "~ts",
+ [lists:sublist(Data,
+ State#state.log_pos,
+ length(Data))])
+ end,
gen_tcp:close(Sock),
- ok
+ Pid ! closed
after wait(State#state.keep_alive,?IDLE_TIMEOUT) ->
- if
- Acc == [] -> send([?IAC,?NOP], Sock);
- true -> ok
- end,
- loop(State, Sock, Acc)
+ Data = lists:reverse(lists:append(Acc)),
+ case Data of
+ [] ->
+ send([?IAC,?NOP], Sock, State#state.conn_name),
+ loop(State, Sock, Acc);
+ _ when State#state.log_pos == length(Data)+1 ->
+ loop(State, Sock, Acc);
+ _ ->
+ dbg("Idle timeout, printing ~tp\n",[Data]),
+ Len = length(Data),
+ ct_telnet:log(State#state.conn_name,
+ general_io, "~ts",
+ [lists:sublist(Data,
+ State#state.log_pos,
+ Len)]),
+ loop(State#state{log_pos = Len+1}, Sock, Acc)
+ end
end.
wait(true, Time) -> Time;
wait(false, _) -> infinity.
-send(Data, Sock) ->
+send(Data, Sock, ConnName) ->
case Data of
[?IAC|_] = Cmd ->
cmd_dbg(Cmd);
_ ->
- dbg("Sending: ~p\n", [Data])
+ dbg("Sending: ~tp\n", [Data]),
+ try io_lib:format("[~w] ~ts", [?MODULE,Data]) of
+ Str ->
+ ct_telnet:log(ConnName, general_io, Str, [])
+ catch
+ _:_ -> ok
+ end
end,
gen_tcp:send(Sock, Data),
ok.
diff --git a/lib/common_test/src/ct_testspec.erl b/lib/common_test/src/ct_testspec.erl
index c07ea323e6..10a9bdac67 100644
--- a/lib/common_test/src/ct_testspec.erl
+++ b/lib/common_test/src/ct_testspec.erl
@@ -1120,8 +1120,9 @@ should_be_added(Tag,Node,_Data,Spec) ->
%% list terms *without* possible duplicates here
Tag == logdir; Tag == logopts;
Tag == basic_html; Tag == label;
- Tag == auto_compile; Tag == stylesheet;
- Tag == verbosity; Tag == silent_connections ->
+ Tag == auto_compile; Tag == abort_if_missing_suites;
+ Tag == stylesheet; Tag == verbosity;
+ Tag == silent_connections ->
lists:keymember(ref2node(Node,Spec#testspec.nodes),1,
read_field(Spec,Tag)) == false;
%% for terms *with* possible duplicates
@@ -1496,6 +1497,8 @@ valid_terms() ->
{include,3},
{auto_compile,2},
{auto_compile,3},
+ {abort_if_missing_suites,2},
+ {abort_if_missing_suites,3},
{stylesheet,2},
{stylesheet,3},
{suites,3},
diff --git a/lib/common_test/src/ct_util.erl b/lib/common_test/src/ct_util.erl
index bcc4caa62e..56027586d1 100644
--- a/lib/common_test/src/ct_util.erl
+++ b/lib/common_test/src/ct_util.erl
@@ -37,7 +37,7 @@
save_suite_data_async/3, save_suite_data_async/2,
read_suite_data/1,
delete_suite_data/0, delete_suite_data/1, match_delete_suite_data/1,
- delete_testdata/0, delete_testdata/1,
+ delete_testdata/0, delete_testdata/1, match_delete_testdata/1,
set_testdata/1, get_testdata/1, get_testdata/2,
set_testdata_async/1, update_testdata/2, update_testdata/3,
set_verbosity/1, get_verbosity/1]).
@@ -77,6 +77,8 @@
-record(suite_data, {key,name,value}).
%%%-----------------------------------------------------------------
+start() ->
+ start(normal, ".", ?default_verbosity).
%%% @spec start(Mode) -> Pid | exit(Error)
%%% Mode = normal | interactive
%%% Pid = pid()
@@ -91,9 +93,6 @@
%%% <code>ct_util_server</code>.</p>
%%%
%%% @see ct
-start() ->
- start(normal, ".", ?default_verbosity).
-
start(LogDir) when is_list(LogDir) ->
start(normal, LogDir, ?default_verbosity);
start(Mode) ->
@@ -271,6 +270,9 @@ delete_testdata() ->
delete_testdata(Key) ->
call({delete_testdata, Key}).
+match_delete_testdata(KeyPat) ->
+ call({match_delete_testdata, KeyPat}).
+
update_testdata(Key, Fun) ->
update_testdata(Key, Fun, []).
@@ -362,7 +364,25 @@ loop(Mode,TestData,StartDir) ->
{{delete_testdata,Key},From} ->
TestData1 = lists:keydelete(Key,1,TestData),
return(From,ok),
- loop(From,TestData1,StartDir);
+ loop(From,TestData1,StartDir);
+ {{match_delete_testdata,{Key1,Key2}},From} ->
+ %% handles keys with 2 elements
+ TestData1 =
+ lists:filter(fun({Key,_}) when not is_tuple(Key) ->
+ true;
+ ({Key,_}) when tuple_size(Key) =/= 2 ->
+ true;
+ ({{_,KeyB},_}) when Key1 == '_' ->
+ KeyB =/= Key2;
+ ({{KeyA,_},_}) when Key2 == '_' ->
+ KeyA =/= Key1;
+ (_) when Key1 == '_' ; Key2 == '_' ->
+ false;
+ (_) ->
+ true
+ end, TestData),
+ return(From,ok),
+ loop(From,TestData1,StartDir);
{{set_testdata,New = {Key,_Val}},From} ->
TestData1 = lists:keydelete(Key,1,TestData),
return(From,ok),
@@ -382,9 +402,18 @@ loop(Mode,TestData,StartDir) ->
TestData1 =
case lists:keysearch(Key,1,TestData) of
{value,{Key,Val}} ->
- NewVal = Fun(Val),
- return(From,NewVal),
- [{Key,NewVal}|lists:keydelete(Key,1,TestData)];
+ try Fun(Val) of
+ '$delete' ->
+ return(From,deleted),
+ lists:keydelete(Key,1,TestData);
+ NewVal ->
+ return(From,NewVal),
+ [{Key,NewVal}|lists:keydelete(Key,1,TestData)]
+ catch
+ _:Error ->
+ return(From,{error,Error}),
+ TestData
+ end;
_ ->
case lists:member(create,Opts) of
true ->
diff --git a/lib/common_test/src/ct_util.hrl b/lib/common_test/src/ct_util.hrl
index 7c01e17c36..845bb55486 100644
--- a/lib/common_test/src/ct_util.hrl
+++ b/lib/common_test/src/ct_util.hrl
@@ -48,6 +48,7 @@
release_shell=false,
include=[],
auto_compile=[],
+ abort_if_missing_suites=[],
stylesheet=[],
multiply_timetraps=[],
scale_timetraps=[],
@@ -79,4 +80,10 @@
-define(tablesorter_script, "jquery.tablesorter.min.js").
%% Logging information for error handler
--record(conn_log, {client, name, address, action, module}).
+-record(conn_log, {header=true,
+ client,
+ name,
+ address,
+ conn_pid,
+ action,
+ module}).
diff --git a/lib/common_test/src/cth_conn_log.erl b/lib/common_test/src/cth_conn_log.erl
index 644594e34d..1e60f2751e 100644
--- a/lib/common_test/src/cth_conn_log.erl
+++ b/lib/common_test/src/cth_conn_log.erl
@@ -56,11 +56,29 @@
pre_init_per_testcase/3,
post_end_per_testcase/4]).
+%%----------------------------------------------------------------------
+%% Exported types
+%%----------------------------------------------------------------------
+-export_type([hook_options/0,
+ log_type/0,
+ conn_mod/0]).
+
+%%----------------------------------------------------------------------
+%% Type declarations
+%%----------------------------------------------------------------------
+-type hook_options() :: [hook_option()].
+%% Options that can be given to `cth_conn_log' in the `ct_hook' statement.
+-type hook_option() :: {log_type,log_type()} |
+ {hosts,[ct_gen_conn:key_or_name()]}.
+-type log_type() :: raw | pretty | html | silent.
+-type conn_mod() :: ct_netconfc | ct_telnet.
+%%----------------------------------------------------------------------
+
-spec init(Id, HookOpts) -> Result when
Id :: term(),
- HookOpts :: ct_netconfc:hook_options(),
- Result :: {ok,[{ct_netconfc:conn_mod(),
- {ct_netconfc:log_type(),[ct_netconfc:key_or_name()]}}]}.
+ HookOpts :: hook_options(),
+ Result :: {ok,[{conn_mod(),
+ {log_type(),[ct_gen_conn:key_or_name()]}}]}.
init(_Id, HookOpts) ->
ConfOpts = ct:get_config(ct_conn_log,[]),
{ok,merge_log_info(ConfOpts,HookOpts)}.
@@ -73,20 +91,23 @@ merge_log_info([{Mod,ConfOpts}|ConfList],HookList) ->
{value,{_,HookOpts},HL1} ->
{ConfOpts ++ HookOpts, HL1} % ConfOpts overwrites HookOpts!
end,
- [{Mod,get_log_opts(Opts)} | merge_log_info(ConfList,HookList1)];
+ [{Mod,get_log_opts(Mod,Opts)} | merge_log_info(ConfList,HookList1)];
merge_log_info([],HookList) ->
- [{Mod,get_log_opts(Opts)} || {Mod,Opts} <- HookList].
+ [{Mod,get_log_opts(Mod,Opts)} || {Mod,Opts} <- HookList].
-get_log_opts(Opts) ->
- LogType = proplists:get_value(log_type,Opts,html),
+get_log_opts(Mod,Opts) ->
+ DefaultLogType = if Mod == ct_telnet -> raw;
+ true -> html
+ end,
+ LogType = proplists:get_value(log_type,Opts,DefaultLogType),
Hosts = proplists:get_value(hosts,Opts,[]),
{LogType,Hosts}.
-
pre_init_per_testcase(TestCase,Config,CthState) ->
Logs =
lists:map(
- fun({ConnMod,{LogType,Hosts}}) ->
+ fun({ConnMod,{LogType,Hosts}}) ->
+ ct_util:set_testdata({{?MODULE,ConnMod},LogType}),
case LogType of
LogType when LogType==raw; LogType==pretty ->
Dir = ?config(priv_dir,Config),
@@ -117,9 +138,44 @@ pre_init_per_testcase(TestCase,Config,CthState) ->
end
end,
CthState),
- error_logger:add_report_handler(ct_conn_log_h,{group_leader(),Logs}),
+
+ GL = group_leader(),
+ Update =
+ fun(Init) when Init == undefined; Init == [] ->
+ error_logger:add_report_handler(ct_conn_log_h,{GL,Logs}),
+ [TestCase];
+ (PrevUsers) ->
+ error_logger:info_report(update,{GL,Logs}),
+ receive
+ {updated,GL} ->
+ [TestCase|PrevUsers]
+ after
+ 5000 ->
+ {error,no_response}
+ end
+ end,
+ ct_util:update_testdata(?MODULE, Update, [create]),
{Config,CthState}.
-post_end_per_testcase(_TestCase,_Config,Return,CthState) ->
- error_logger:delete_report_handler(ct_conn_log_h),
+post_end_per_testcase(TestCase,_Config,Return,CthState) ->
+ Update =
+ fun(PrevUsers) ->
+ case lists:delete(TestCase, PrevUsers) of
+ [] ->
+ '$delete';
+ PrevUsers1 ->
+ PrevUsers1
+ end
+ end,
+ case ct_util:update_testdata(?MODULE, Update) of
+ deleted ->
+ [ct_util:delete_testdata({?MODULE,ConnMod}) ||
+ {ConnMod,_} <- CthState],
+ error_logger:delete_report_handler(ct_conn_log_h);
+ {error,no_response} ->
+ exit({?MODULE,no_response_from_logger});
+ _PrevUsers ->
+ ok
+ end,
{Return,CthState}.
+
diff --git a/lib/common_test/src/cth_surefire.erl b/lib/common_test/src/cth_surefire.erl
index 7ed2018bdf..bb12171ea7 100644
--- a/lib/common_test/src/cth_surefire.erl
+++ b/lib/common_test/src/cth_surefire.erl
@@ -79,6 +79,10 @@ init(Path, Opts) ->
url_base = proplists:get_value(url_base,Opts),
timer = now() }.
+pre_init_per_suite(Suite,SkipOrFail,State) when is_tuple(SkipOrFail) ->
+ {SkipOrFail, init_tc(State#state{curr_suite = Suite,
+ curr_suite_ts = now()},
+ SkipOrFail) };
pre_init_per_suite(Suite,Config,#state{ test_cases = [] } = State) ->
TcLog = proplists:get_value(tc_logfile,Config),
CurrLogDir = filename:dirname(TcLog),
diff --git a/lib/common_test/src/unix_telnet.erl b/lib/common_test/src/unix_telnet.erl
index 88199b07d0..10666b979d 100644
--- a/lib/common_test/src/unix_telnet.erl
+++ b/lib/common_test/src/unix_telnet.erl
@@ -17,8 +17,8 @@
%% %CopyrightEnd%
%%
-%%% @doc Callback module for ct_telnet for talking telnet
-%%% to a unix host.
+%%% @doc Callback module for ct_telnet, for connecting to a telnet
+%%% server on a unix host.
%%%
%%% <p>It requires the following entry in the config file:</p>
%%% <pre>
@@ -28,15 +28,15 @@
%%% {password,Password},
%%% {keep_alive,Bool}]}. % optional</pre>
%%%
-%%% <p>To talk telnet to the host specified by
+%%% <p>To communicate via telnet to the host specified by
%%% <code>HostNameOrIpAddress</code>, use the interface functions in
-%%% <code>ct</code>, e.g. <code>open(Name), cmd(Name,Cmd), ...</code>.</p>
+%%% <code>ct_telnet</code>, e.g. <code>open(Name), cmd(Name,Cmd), ...</code>.</p>
%%%
%%% <p><code>Name</code> is the name you allocated to the unix host in
%%% your <code>require</code> statement. E.g.</p>
-%%% <pre> suite() -> [{require,Name,{unix,[telnet,username,password]}}].</pre>
+%%% <pre> suite() -> [{require,Name,{unix,[telnet]}}].</pre>
%%% <p>or</p>
-%%% <pre> ct:require(Name,{unix,[telnet,username,password]}).</pre>
+%%% <pre> ct:require(Name,{unix,[telnet]}).</pre>
%%%
%%% <p>The "keep alive" activity (i.e. that Common Test sends NOP to the server
%%% every 10 seconds if the connection is idle) may be enabled or disabled for one
@@ -54,94 +54,106 @@
-compile(export_all).
%% Callbacks for ct_telnet.erl
--export([connect/5,get_prompt_regexp/0]).
--import(ct_telnet,[start_log/1,cont_log/2,end_log/0]).
+-export([connect/6,get_prompt_regexp/0]).
+-import(ct_telnet,[start_gen_log/1,log/4,end_gen_log/0]).
-define(username,"login: ").
-define(password,"Password: ").
-define(prx,"login: |Password: |\\\$ |> ").
%%%-----------------------------------------------------------------
-%%% @hidden
%%% @spec get_prompt_regexp() -> PromptRegexp
%%% PromptRegexp = ct_telnet:prompt_regexp()
%%%
%%% @doc Callback for ct_telnet.erl.
%%%
-%%% <p>Return the prompt regexp for telnet connections to the
-%%% interwatch instrument.</p>
+%%% <p>Return a suitable regexp string that will match common
+%%% prompts for users on unix hosts.</p>
get_prompt_regexp() ->
?prx.
%%%-----------------------------------------------------------------
-%%% @hidden
-%%% @spec connect(Ip,Port,Timeout,KeepAlive,Extra) -> {ok,Handle} | {error,Reason}
+%%% @spec connect(ConnName,Ip,Port,Timeout,KeepAlive,Extra) ->
+%%% {ok,Handle} | {error,Reason}
+%%% ConnName = ct:target_name()
%%% Ip = string() | {integer(),integer(),integer(),integer()}
%%% Port = integer()
%%% Timeout = integer()
%%% KeepAlive = bool()
-%%% Extra = {Username,Password}
+%%% Extra = ct:target_name() | {Username,Password}
%%% Username = string()
%%% Password = string()
%%% Handle = ct_telnet:handle()
+%%% Reason = term()
%%%
%%% @doc Callback for ct_telnet.erl.
%%%
-%%% <p>Setup telnet connection to a UNIX host.</p>
-connect(Ip,Port,Timeout,KeepAlive,Extra) ->
+%%% <p>Setup telnet connection to a unix host.</p>
+connect(ConnName,Ip,Port,Timeout,KeepAlive,Extra) ->
case Extra of
{Username,Password} ->
- connect1(Ip,Port,Timeout,KeepAlive,Username,Password);
- Name ->
- case get_username_and_password(Name) of
+ connect1(ConnName,Ip,Port,Timeout,KeepAlive,
+ Username,Password);
+ KeyOrName ->
+ case get_username_and_password(KeyOrName) of
{ok,{Username,Password}} ->
- connect1(Ip,Port,Timeout,KeepAlive,Username,Password);
+ connect1(ConnName,Ip,Port,Timeout,KeepAlive,
+ Username,Password);
Error ->
Error
end
end.
-connect1(Ip,Port,Timeout,KeepAlive,Username,Password) ->
- start_log("unix_telnet:connect"),
+connect1(Name,Ip,Port,Timeout,KeepAlive,Username,Password) ->
+ start_gen_log("unix_telnet connect"),
Result =
- case ct_telnet_client:open(Ip,Port,Timeout,KeepAlive) of
+ case ct_telnet_client:open(Ip,Port,Timeout,KeepAlive,Name) of
{ok,Pid} ->
- case ct_telnet:silent_teln_expect(Pid,[],[prompt],?prx,[]) of
+ case ct_telnet:silent_teln_expect(Name,Pid,[],
+ [prompt],?prx,[]) of
{ok,{prompt,?username},_} ->
+ log(Name,send,"Logging in to ~p:~p", [Ip,Port]),
ok = ct_telnet_client:send_data(Pid,Username),
- cont_log("Username: ~ts",[Username]),
- case ct_telnet:silent_teln_expect(Pid,[],prompt,?prx,[]) of
+ log(Name,send,"Username: ~ts",[Username]),
+ case ct_telnet:silent_teln_expect(Name,Pid,[],
+ prompt,?prx,[]) of
{ok,{prompt,?password},_} ->
ok = ct_telnet_client:send_data(Pid,Password),
Stars = lists:duplicate(length(Password),$*),
- cont_log("Password: ~s",[Stars]),
+ log(Name,send,"Password: ~s",[Stars]),
ok = ct_telnet_client:send_data(Pid,""),
- case ct_telnet:silent_teln_expect(Pid,[],prompt,
+ case ct_telnet:silent_teln_expect(Name,Pid,[],
+ prompt,
?prx,[]) of
{ok,{prompt,Prompt},_}
- when Prompt=/=?username, Prompt=/=?password ->
+ when Prompt=/=?username,
+ Prompt=/=?password ->
{ok,Pid};
Error ->
- cont_log("Password failed\n~p\n",
- [Error]),
+ log(Name,recv,"Password failed\n~p\n",
+ [Error]),
{error,Error}
end;
Error ->
- cont_log("Login failed\n~p\n",[Error]),
+ log(Name,recv,"Login to ~p:~p failed\n~p\n",[Ip,Port,Error]),
{error,Error}
end;
{ok,[{prompt,_OtherPrompt1},{prompt,_OtherPrompt2}],_} ->
{ok,Pid};
Error ->
- cont_log("Did not get expected prompt\n~p\n",[Error]),
+ log(Name,conn_error,
+ "Did not get expected prompt from ~p:~p\n~p\n",
+ [Ip,Port,Error]),
{error,Error}
end;
Error ->
- cont_log("Could not open telnet connection\n~p\n",[Error]),
+ log(Name,conn_error,
+ "Could not open telnet connection to ~p:~p\n~p\n",
+ [Ip,Port,Error]),
Error
end,
- end_log(),
+ end_gen_log(),
Result.
get_username_and_password(Name) ->
diff --git a/lib/common_test/test/ct_config_info_SUITE.erl b/lib/common_test/test/ct_config_info_SUITE.erl
index 8f2f0eb75f..9c242a41df 100644
--- a/lib/common_test/test/ct_config_info_SUITE.erl
+++ b/lib/common_test/test/ct_config_info_SUITE.erl
@@ -125,7 +125,7 @@ test_events(config_info) ->
[{?eh,tc_start,{config_info_1_SUITE,{init_per_group,g1,[]}}},
{?eh,tc_done,{config_info_1_SUITE,{init_per_group,g1,[]},
{failed,{timetrap_timeout,350}}}},
- {?eh,tc_auto_skip,{config_info_1_SUITE,t11,
+ {?eh,tc_auto_skip,{config_info_1_SUITE,{t11,g1},
{failed,{config_info_1_SUITE,init_per_group,{timetrap_timeout,350}}}}},
{?eh,tc_auto_skip,{config_info_1_SUITE,{end_per_group,g1},
{failed,{config_info_1_SUITE,init_per_group,
@@ -142,7 +142,7 @@ test_events(config_info) ->
[{?eh,tc_start,{config_info_1_SUITE,{init_per_group,g4,[]}}},
{?eh,tc_done,{config_info_1_SUITE,{init_per_group,g4,[]},
{failed,{timetrap_timeout,400}}}},
- {?eh,tc_auto_skip,{config_info_1_SUITE,t41,
+ {?eh,tc_auto_skip,{config_info_1_SUITE,{t41,g4},
{failed,{config_info_1_SUITE,init_per_group,
{timetrap_timeout,400}}}}},
{?eh,tc_auto_skip,{config_info_1_SUITE,{end_per_group,g4},
diff --git a/lib/common_test/test/ct_error_SUITE.erl b/lib/common_test/test/ct_error_SUITE.erl
index 28f0494d20..ecf231529a 100644
--- a/lib/common_test/test/ct_error_SUITE.erl
+++ b/lib/common_test/test/ct_error_SUITE.erl
@@ -66,7 +66,7 @@ all() ->
[cfg_error, lib_error, no_compile, timetrap_end_conf,
timetrap_normal, timetrap_extended, timetrap_parallel,
timetrap_fun, timetrap_fun_group, misc_errors,
- config_restored].
+ config_restored, config_func_errors].
groups() ->
[].
@@ -310,6 +310,25 @@ config_restored(Config) when is_list(Config) ->
ok = ct_test_support:verify_events(TestEvents, Events, Config).
%%%-----------------------------------------------------------------
+%%%
+config_func_errors(Config) when is_list(Config) ->
+ DataDir = ?config(data_dir, Config),
+ Suite = filename:join(DataDir, "error/test/config_func_error_1_SUITE"),
+ {Opts,ERPid} = setup([{suite,Suite}],
+ Config),
+ ok = ct_test_support:run(Opts, Config),
+ Events = ct_test_support:get_events(ERPid, Config),
+
+ ct_test_support:log_events(config_func_errors,
+ reformat(Events, ?eh),
+ ?config(priv_dir, Config),
+ Opts),
+
+ TestEvents = events_to_check(config_func_errors),
+ ok = ct_test_support:verify_events(TestEvents, Events, Config).
+
+
+%%%-----------------------------------------------------------------
%%% HELP FUNCTIONS
%%%-----------------------------------------------------------------
@@ -323,8 +342,6 @@ setup(Test, Config) ->
reformat(Events, EH) ->
ct_test_support:reformat(Events, EH).
- %reformat(Events, _EH) ->
- % Events.
%%%-----------------------------------------------------------------
%%% TEST EVENTS
@@ -352,8 +369,8 @@ test_events(cfg_error) ->
{'EXIT',init_per_suite_fails}}}}},
{?eh,test_stats,{0,0,{0,1}}},
{?eh,tc_auto_skip,
- {cfg_error_1_SUITE,tc2,{failed,{cfg_error_1_SUITE,init_per_suite,
- {'EXIT',init_per_suite_fails}}}}},
+ {cfg_error_1_SUITE,{tc2,g1},{failed,{cfg_error_1_SUITE,init_per_suite,
+ {'EXIT',init_per_suite_fails}}}}},
{?eh,test_stats,{0,0,{0,2}}},
{?eh,tc_auto_skip,
{cfg_error_1_SUITE,end_per_suite,{failed,{cfg_error_1_SUITE,init_per_suite,
@@ -369,7 +386,7 @@ test_events(cfg_error) ->
{'EXIT',{{badmatch,[1,2]},'_'}}}}}},
{?eh,test_stats,{0,0,{0,3}}},
{?eh,tc_auto_skip,
- {cfg_error_2_SUITE,tc2,
+ {cfg_error_2_SUITE,{tc2,g1},
{failed,{cfg_error_2_SUITE,init_per_suite,
{'EXIT',{{badmatch,[1,2]},'_'}}}}}},
{?eh,test_stats,{0,0,{0,4}}},
@@ -386,7 +403,7 @@ test_events(cfg_error) ->
{failed,{cfg_error_3_SUITE,init_per_suite,{timetrap_timeout,2000}}}}},
{?eh,test_stats,{0,0,{0,5}}},
{?eh,tc_auto_skip,
- {cfg_error_3_SUITE,tc2,
+ {cfg_error_3_SUITE,{tc2,g1},
{failed,{cfg_error_3_SUITE,init_per_suite,{timetrap_timeout,2000}}}}},
{?eh,test_stats,{0,0,{0,6}}},
{?eh,tc_auto_skip,
@@ -400,7 +417,7 @@ test_events(cfg_error) ->
{failed,{cfg_error_4_SUITE,init_per_suite,bad_return}}}},
{?eh,test_stats,{0,0,{0,7}}},
{?eh,tc_auto_skip,
- {cfg_error_4_SUITE,tc2,
+ {cfg_error_4_SUITE,{tc2,g1},
{failed,{cfg_error_4_SUITE,init_per_suite,bad_return}}}},
{?eh,test_stats,{0,0,{0,8}}},
{?eh,tc_auto_skip,
@@ -414,7 +431,7 @@ test_events(cfg_error) ->
{failed,{cfg_error_5_SUITE,init_per_suite,bad_return}}}},
{?eh,test_stats,{0,0,{0,9}}},
{?eh,tc_auto_skip,
- {cfg_error_5_SUITE,tc2,
+ {cfg_error_5_SUITE,{tc2,g1},
{failed,{cfg_error_5_SUITE,init_per_suite,bad_return}}}},
{?eh,test_stats,{0,0,{0,10}}},
{?eh,tc_auto_skip,
@@ -460,7 +477,7 @@ test_events(cfg_error) ->
{cfg_error_8_SUITE,{init_per_group,g1,[]},
{failed,{error,{init_per_group_fails,g1}}}}},
{?eh,tc_auto_skip,
- {cfg_error_8_SUITE,tc1,
+ {cfg_error_8_SUITE,{tc1,g1},
{failed,{cfg_error_8_SUITE,init_per_group,
{'EXIT',{init_per_group_fails,g1}}}}}},
{?eh,test_stats,{4,0,{0,11}}},
@@ -472,7 +489,7 @@ test_events(cfg_error) ->
[{?eh,tc_start,{cfg_error_8_SUITE,{init_per_group,g2,[]}}},
{?eh,tc_done,{cfg_error_8_SUITE,{init_per_group,g2,[]},
{failed,{timetrap_timeout,2000}}}},
- {?eh,tc_auto_skip,{cfg_error_8_SUITE,tc1,
+ {?eh,tc_auto_skip,{cfg_error_8_SUITE,{tc1,g2},
{failed,{cfg_error_8_SUITE,init_per_group,
{timetrap_timeout,2000}}}}},
{?eh,test_stats,{4,0,{0,12}}},
@@ -485,7 +502,7 @@ test_events(cfg_error) ->
{cfg_error_8_SUITE,{init_per_group,g3,[]},
{failed,{error,{{badmatch,42},'_'}}}}},
{?eh,tc_auto_skip,
- {cfg_error_8_SUITE,tc1,
+ {cfg_error_8_SUITE,{tc1,g3},
{failed,{cfg_error_8_SUITE,init_per_group,
{'EXIT',{{badmatch,42},'_'}}}}}},
{?eh,test_stats,{4,0,{0,13}}},
@@ -511,7 +528,7 @@ test_events(cfg_error) ->
{?eh,tc_done,{cfg_error_8_SUITE,{init_per_group,g6,[]},
{failed,{error,{sub_group_failed,g6}}}}},
{?eh,tc_auto_skip,
- {cfg_error_8_SUITE,tc2,
+ {cfg_error_8_SUITE,{tc2,g6},
{failed,{cfg_error_8_SUITE,init_per_group,
{'EXIT',{sub_group_failed,g6}}}}}},
{?eh,test_stats,{6,0,{0,14}}},
@@ -1094,11 +1111,11 @@ test_events(timetrap_fun_group) ->
[{?eh,tc_start,{timetrap_8_SUITE,{init_per_group,g4,[]}}},
{?eh,tc_done,{timetrap_8_SUITE,{init_per_group,g4,[]},
{user_timetrap_error,{kaboom,'_'}}}},
- {?eh,tc_auto_skip,{timetrap_8_SUITE,tc0,
+ {?eh,tc_auto_skip,{timetrap_8_SUITE,{tc0,g4},
{failed,{timetrap_8_SUITE,init_per_group,
{user_timetrap_error,{kaboom,'_'}}}}}},
{?eh,test_stats,{0,11,{0,1}}},
- {?eh,tc_auto_skip,{timetrap_8_SUITE,tc2,
+ {?eh,tc_auto_skip,{timetrap_8_SUITE,{tc2,g4},
{failed,{timetrap_8_SUITE,init_per_group,
{user_timetrap_error,{kaboom,'_'}}}}}},
{?eh,test_stats,{0,11,{0,2}}},
@@ -1109,11 +1126,11 @@ test_events(timetrap_fun_group) ->
[{?eh,tc_start,{timetrap_8_SUITE,{init_per_group,g5,[]}}},
{?eh,tc_done,{timetrap_8_SUITE,{init_per_group,g5,[]},
{user_timetrap_error,{kaboom,'_'}}}},
- {?eh,tc_auto_skip,{timetrap_8_SUITE,tc0,
+ {?eh,tc_auto_skip,{timetrap_8_SUITE,{tc0,g5},
{failed,{timetrap_8_SUITE,init_per_group,
{user_timetrap_error,{kaboom,'_'}}}}}},
{?eh,test_stats,{0,11,{0,3}}},
- {?eh,tc_auto_skip,{timetrap_8_SUITE,tc2,
+ {?eh,tc_auto_skip,{timetrap_8_SUITE,{tc2,g5},
{failed,{timetrap_8_SUITE,init_per_group,
{user_timetrap_error,{kaboom,'_'}}}}}},
{?eh,test_stats,{0,11,{0,4}}},
@@ -1124,11 +1141,11 @@ test_events(timetrap_fun_group) ->
[{?eh,tc_start,{timetrap_8_SUITE,{init_per_group,g6,[]}}},
{?eh,tc_done,{timetrap_8_SUITE,{init_per_group,g6,[]},
{failed,{timetrap_timeout,{'$approx',500}}}}},
- {?eh,tc_auto_skip,{timetrap_8_SUITE,tc0,
+ {?eh,tc_auto_skip,{timetrap_8_SUITE,{tc0,g6},
{failed,{timetrap_8_SUITE,init_per_group,
{timetrap_timeout,'_'}}}}},
{?eh,test_stats,{0,11,{0,5}}},
- {?eh,tc_auto_skip,{timetrap_8_SUITE,tc2,
+ {?eh,tc_auto_skip,{timetrap_8_SUITE,{tc2,g6},
{failed,{timetrap_8_SUITE,init_per_group,
{timetrap_timeout,'_'}}}}},
{?eh,test_stats,{0,11,{0,6}}},
@@ -1277,11 +1294,11 @@ test_events(timetrap_fun_group) ->
[{?eh,tc_start,{timetrap_8_SUITE,{init_per_group,pg4,[parallel]}}},
{?eh,tc_done,{timetrap_8_SUITE,{init_per_group,pg4,[parallel]},
{user_timetrap_error,{kaboom,'_'}}}},
- {?eh,tc_auto_skip,{timetrap_8_SUITE,tc0,
+ {?eh,tc_auto_skip,{timetrap_8_SUITE,{tc0,pg4},
{failed,{timetrap_8_SUITE,init_per_group,
{user_timetrap_error,{kaboom,'_'}}}}}},
{?eh,test_stats,{4,26,{0,7}}},
- {?eh,tc_auto_skip,{timetrap_8_SUITE,tc2,
+ {?eh,tc_auto_skip,{timetrap_8_SUITE,{tc2,pg4},
{failed,{timetrap_8_SUITE,init_per_group,
{user_timetrap_error,{kaboom,'_'}}}}}},
{?eh,test_stats,{4,26,{0,8}}},
@@ -1293,11 +1310,11 @@ test_events(timetrap_fun_group) ->
[{?eh,tc_start,{timetrap_8_SUITE,{init_per_group,pg5,[parallel]}}},
{?eh,tc_done,{timetrap_8_SUITE,{init_per_group,pg5,[parallel]},
{user_timetrap_error,{kaboom,'_'}}}},
- {?eh,tc_auto_skip,{timetrap_8_SUITE,tc0,
+ {?eh,tc_auto_skip,{timetrap_8_SUITE,{tc0,pg5},
{failed,{timetrap_8_SUITE,init_per_group,
{user_timetrap_error,{kaboom,'_'}}}}}},
{?eh,test_stats,{4,26,{0,9}}},
- {?eh,tc_auto_skip,{timetrap_8_SUITE,tc2,
+ {?eh,tc_auto_skip,{timetrap_8_SUITE,{tc2,pg5},
{failed,{timetrap_8_SUITE,init_per_group,
{user_timetrap_error,{kaboom,'_'}}}}}},
{?eh,test_stats,{4,26,{0,10}}},
@@ -1309,11 +1326,11 @@ test_events(timetrap_fun_group) ->
[{?eh,tc_start,{timetrap_8_SUITE,{init_per_group,pg6,[parallel]}}},
{?eh,tc_done,{timetrap_8_SUITE,{init_per_group,pg6,[parallel]},
{failed,{timetrap_timeout,{'$approx',500}}}}},
- {?eh,tc_auto_skip,{timetrap_8_SUITE,tc0,
+ {?eh,tc_auto_skip,{timetrap_8_SUITE,{tc0,pg6},
{failed,{timetrap_8_SUITE,init_per_group,
{timetrap_timeout,'_'}}}}},
{?eh,test_stats,{4,26,{0,11}}},
- {?eh,tc_auto_skip,{timetrap_8_SUITE,tc2,
+ {?eh,tc_auto_skip,{timetrap_8_SUITE,{tc2,pg6},
{failed,{timetrap_8_SUITE,init_per_group,
{timetrap_timeout,'_'}}}}},
{?eh,test_stats,{4,26,{0,12}}},
@@ -1390,10 +1407,10 @@ test_events(timetrap_fun_group) ->
{?eh,tc_done,{timetrap_8_SUITE,tc0,
{user_timetrap_error,{kaboom,'_'}}}},
{?eh,test_stats,{9,31,{0,12}}},
- {?eh,tc_auto_skip,{timetrap_8_SUITE,tc1,
+ {?eh,tc_auto_skip,{timetrap_8_SUITE,{tc1,sg1},
{failed,{timetrap_8_SUITE,tc0}}}},
{?eh,test_stats,{9,31,{0,13}}},
- {?eh,tc_auto_skip,{timetrap_8_SUITE,tc2,
+ {?eh,tc_auto_skip,{timetrap_8_SUITE,{tc2,sg1},
{failed,{timetrap_8_SUITE,tc0}}}},
{?eh,test_stats,{9,31,{0,14}}},
{?eh,tc_start,{timetrap_8_SUITE,{end_per_group,sg1,[sequence]}}},
@@ -1408,10 +1425,10 @@ test_events(timetrap_fun_group) ->
{?eh,tc_done,{timetrap_8_SUITE,tc0,
{failed,{timetrap_timeout,{'$approx',1000}}}}},
{?eh,test_stats,{10,32,{0,14}}},
- {?eh,tc_auto_skip,{timetrap_8_SUITE,tc1,
+ {?eh,tc_auto_skip,{timetrap_8_SUITE,{tc1,sg2},
{failed,{timetrap_8_SUITE,tc0}}}},
{?eh,test_stats,{10,32,{0,15}}},
- {?eh,tc_auto_skip,{timetrap_8_SUITE,tc2,
+ {?eh,tc_auto_skip,{timetrap_8_SUITE,{tc2,sg2},
{failed,{timetrap_8_SUITE,tc0}}}},
{?eh,test_stats,{10,32,{0,16}}},
{?eh,tc_start,{timetrap_8_SUITE,{end_per_group,sg2,[sequence]}}},
@@ -1498,4 +1515,42 @@ test_events(config_restored) ->
{?eh,tc_done,{config_restored_SUITE,end_per_suite,ok}},
{?eh,test_done,{'DEF','STOP_TIME'}},
{?eh,stop_logging,[]}
+ ];
+
+test_events(config_func_errors) ->
+ [
+ {?eh,start_logging,{'DEF','RUNDIR'}},
+ {?eh,test_start,{'DEF',{'START_TIME','LOGDIR'}}},
+ {?eh,start_info,{1,1,4}},
+ {?eh,tc_start,{config_func_error_1_SUITE,init_per_suite}},
+ {?eh,tc_done,{config_func_error_1_SUITE,init_per_suite,ok}},
+
+ {?eh,tc_start,{config_func_error_1_SUITE,exit_in_iptc}},
+ {?eh,tc_done,{config_func_error_1_SUITE,exit_in_iptc,'_'}},
+ {?eh,test_stats,{0,1,{0,0}}},
+
+ {?eh,tc_start,{config_func_error_1_SUITE,exit_in_eptc}},
+ {?eh,tc_done,{config_func_error_1_SUITE,exit_in_eptc,'_'}},
+ {?eh,test_stats,{0,2,{0,0}}},
+
+ [{?eh,tc_start,{config_func_error_1_SUITE,{init_per_group,g1,[]}}},
+ {?eh,tc_done,{config_func_error_1_SUITE,{init_per_group,g1,[]},ok}},
+ {?eh,tc_start,{config_func_error_1_SUITE,exit_in_iptc}},
+ {?eh,tc_done,{config_func_error_1_SUITE,exit_in_iptc,'_'}},
+ {?eh,test_stats,{0,3,{0,0}}},
+ {?eh,tc_start,{config_func_error_1_SUITE,{end_per_group,g1,[]}}},
+ {?eh,tc_done,{config_func_error_1_SUITE,{end_per_group,g1,[]},ok}}],
+
+ [{?eh,tc_start,{config_func_error_1_SUITE,{init_per_group,g2,[]}}},
+ {?eh,tc_done,{config_func_error_1_SUITE,{init_per_group,g2,[]},ok}},
+ {?eh,tc_start,{config_func_error_1_SUITE,exit_in_eptc}},
+ {?eh,tc_done,{config_func_error_1_SUITE,exit_in_eptc,'_'}},
+ {?eh,test_stats,{0,4,{0,0}}},
+ {?eh,tc_start,{config_func_error_1_SUITE,{end_per_group,g2,[]}}},
+ {?eh,tc_done,{config_func_error_1_SUITE,{end_per_group,g2,[]},ok}}],
+
+ {?eh,tc_start,{config_func_error_1_SUITE,end_per_suite}},
+ {?eh,tc_done,{config_func_error_1_SUITE,end_per_suite,ok}},
+ {?eh,test_done,{'DEF','STOP_TIME'}},
+ {?eh,stop_logging,[]}
].
diff --git a/lib/common_test/test/ct_error_SUITE_data/error/test/config_func_error_1_SUITE.erl b/lib/common_test/test/ct_error_SUITE_data/error/test/config_func_error_1_SUITE.erl
new file mode 100644
index 0000000000..f1025213dc
--- /dev/null
+++ b/lib/common_test/test/ct_error_SUITE_data/error/test/config_func_error_1_SUITE.erl
@@ -0,0 +1,138 @@
+%%
+%% %CopyrightBegin%
+%%
+%% Copyright Ericsson AB 2009-2012. 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(config_func_error_1_SUITE).
+
+-compile(export_all).
+
+-include_lib("common_test/include/ct.hrl").
+
+%%--------------------------------------------------------------------
+%% Function: suite() -> Info
+%% Info = [tuple()]
+%%--------------------------------------------------------------------
+suite() ->
+ [{timetrap,{seconds,5}}].
+
+%%--------------------------------------------------------------------
+%% Function: init_per_suite(Config0) ->
+%% Config1 | {skip,Reason} | {skip_and_save,Reason,Config1}
+%% Config0 = Config1 = [tuple()]
+%% Reason = term()
+%%--------------------------------------------------------------------
+init_per_suite(Config) ->
+ Config.
+
+%%--------------------------------------------------------------------
+%% Function: end_per_suite(Config0) -> void() | {save_config,Config1}
+%% Config0 = Config1 = [tuple()]
+%%--------------------------------------------------------------------
+end_per_suite(_Config) ->
+ ok.
+
+%%--------------------------------------------------------------------
+%% Function: init_per_group(GroupName, Config0) ->
+%% Config1 | {skip,Reason} | {skip_and_save,Reason,Config1}
+%% GroupName = atom()
+%% Config0 = Config1 = [tuple()]
+%% Reason = term()
+%%--------------------------------------------------------------------
+init_per_group(_GroupName, Config) ->
+ Config.
+
+%%--------------------------------------------------------------------
+%% Function: end_per_group(GroupName, Config0) ->
+%% void() | {save_config,Config1}
+%% GroupName = atom()
+%% Config0 = Config1 = [tuple()]
+%%--------------------------------------------------------------------
+end_per_group(_GroupName, _Config) ->
+ ok.
+
+%%--------------------------------------------------------------------
+%% Function: init_per_testcase(TestCase, Config0) ->
+%% Config1 | {skip,Reason} | {skip_and_save,Reason,Config1}
+%% TestCase = atom()
+%% Config0 = Config1 = [tuple()]
+%% Reason = term()
+%%--------------------------------------------------------------------
+bad_proc(Config) ->
+ ct:pal("Bye bye from ~p", [self()]),
+ %% this call will either generate an exit immediately
+ %% or return a fun to be executed here
+ ErrorFun = ct_test_support:random_error(Config),
+ ct:log("Calling error fun now...", []),
+ ErrorFun(),
+ ct:sleep(10000),
+ ok.
+
+init_per_testcase(exit_in_iptc, Config) ->
+ spawn_link(?MODULE, bad_proc, [Config]),
+ ct:sleep(10000),
+ Config;
+init_per_testcase(_, Config) ->
+ Config.
+
+%%--------------------------------------------------------------------
+%% Function: end_per_testcase(TestCase, Config0) ->
+%% void() | {save_config,Config1}
+%% TestCase = atom()
+%% Config0 = Config1 = [tuple()]
+%%--------------------------------------------------------------------
+end_per_testcase(exit_in_eptc, Config) ->
+ spawn_link(?MODULE, bad_proc, [Config]),
+ ct:sleep(10000),
+ ok;
+end_per_testcase(_TestCase, _Config) ->
+ ok.
+
+%%--------------------------------------------------------------------
+%% Function: groups() -> [Group]
+%% Group = {GroupName,Properties,GroupsAndTestCases}
+%% GroupName = atom()
+%% Properties = [parallel | sequence | Shuffle | {RepeatType,N}]
+%% GroupsAndTestCases = [Group | {group,GroupName} | TestCase]
+%% TestCase = atom()
+%% Shuffle = shuffle | {shuffle,{integer(),integer(),integer()}}
+%% RepeatType = repeat | repeat_until_all_ok | repeat_until_all_fail |
+%% repeat_until_any_ok | repeat_until_any_fail
+%% N = integer() | forever
+%%--------------------------------------------------------------------
+groups() ->
+ [{g1, [], [exit_in_iptc]},
+ {g2, [], [exit_in_eptc]}].
+
+%%--------------------------------------------------------------------
+%% Function: all() -> GroupsAndTestCases | {skip,Reason}
+%% GroupsAndTestCases = [{group,GroupName} | TestCase]
+%% GroupName = atom()
+%% TestCase = atom()
+%% Reason = term()
+%%--------------------------------------------------------------------
+all() ->
+ [exit_in_iptc,
+ exit_in_eptc,
+ {group, g1},
+ {group, g2}].
+
+exit_in_iptc(_) ->
+ ok.
+
+exit_in_eptc(_) ->
+ ok.
+
diff --git a/lib/common_test/test/ct_group_info_SUITE.erl b/lib/common_test/test/ct_group_info_SUITE.erl
index e7bc5baaa1..83ac7dbbcf 100644
--- a/lib/common_test/test/ct_group_info_SUITE.erl
+++ b/lib/common_test/test/ct_group_info_SUITE.erl
@@ -273,7 +273,7 @@ test_events(timetrap_all) ->
{init_per_group,g11,[]},
{auto_skipped,{group0_failed,bad_return_value}}}},
{?eh,tc_auto_skip,
- {group_timetrap_1_SUITE,t111,{group0_failed,bad_return_value}}},
+ {group_timetrap_1_SUITE,{t111,g11},{group0_failed,bad_return_value}}},
{?eh,test_stats,{0,13,{0,1}}},
{?eh,tc_auto_skip,{group_timetrap_1_SUITE,
{end_per_group,g11},
@@ -431,7 +431,7 @@ test_events(timetrap_all_no_ips) ->
{?eh,tc_done,{group_timetrap_2_SUITE,
{init_per_group,g11,[]},
{auto_skipped,{group0_failed,bad_return_value}}}},
- {?eh,tc_auto_skip,{group_timetrap_2_SUITE,t111,
+ {?eh,tc_auto_skip,{group_timetrap_2_SUITE,{t111,g11},
{group0_failed,bad_return_value}}},
{?eh,test_stats,{0,13,{0,1}}},
{?eh,tc_auto_skip,{group_timetrap_2_SUITE,
@@ -512,7 +512,7 @@ test_events(timetrap_all_no_ipg) ->
{?eh,tc_done,{ct_framework,
{init_per_group,g11,[{suite,group_timetrap_3_SUITE}]},
{auto_skipped,{group0_failed,bad_return_value}}}},
- {?eh,tc_auto_skip,{group_timetrap_3_SUITE,t111,{group0_failed,bad_return_value}}},
+ {?eh,tc_auto_skip,{group_timetrap_3_SUITE,{t111,g11},{group0_failed,bad_return_value}}},
{?eh,test_stats,{0,13,{0,1}}},
{?eh,tc_auto_skip,{ct_framework,{end_per_group,g11},
{group0_failed,bad_return_value}}}],
@@ -551,7 +551,7 @@ test_events(require) ->
{?eh,tc_done,{group_require_1_SUITE,{init_per_group,g4,[]},
{auto_skipped,{require_failed,
{name_in_use,common2_alias,common2}}}}},
- {?eh,tc_auto_skip,{group_require_1_SUITE,t41,
+ {?eh,tc_auto_skip,{group_require_1_SUITE,{t41,g4},
{require_failed,
{name_in_use,common2_alias,common2}}}},
{?eh,test_stats,{4,0,{0,1}}},
@@ -580,7 +580,7 @@ test_events(require) ->
{init_per_group,g8,[]},
{auto_skipped,{require_failed,
{not_available,non_existing}}}}},
- {?eh,tc_auto_skip,{group_require_1_SUITE,t81,
+ {?eh,tc_auto_skip,{group_require_1_SUITE,{t81,g8},
{require_failed,{not_available,non_existing}}}},
{?eh,test_stats,{8,0,{0,2}}},
{?eh,tc_auto_skip,{group_require_1_SUITE,{end_per_group,g8},
@@ -604,7 +604,7 @@ test_events(require) ->
{?eh,tc_done,{group_require_1_SUITE,
{init_per_group,g11,[]},
{auto_skipped,{group0_failed,bad_return_value}}}},
- {?eh,tc_auto_skip,{group_require_1_SUITE,t111,
+ {?eh,tc_auto_skip,{group_require_1_SUITE,{t111,g11},
{group0_failed,bad_return_value}}},
{?eh,test_stats,{9,0,{0,4}}},
{?eh,tc_auto_skip,{group_require_1_SUITE,
@@ -646,7 +646,7 @@ test_events(require_default) ->
{?eh,tc_done,{group_require_1_SUITE,
{init_per_group,g4,[]},
{auto_skipped,{require_failed,{not_available,common3}}}}},
- {?eh,tc_auto_skip,{group_require_1_SUITE,t41,
+ {?eh,tc_auto_skip,{group_require_1_SUITE,{t41,g4},
{require_failed,{not_available,common3}}}},
{?eh,test_stats,{4,0,{0,1}}},
{?eh,tc_auto_skip,{group_require_1_SUITE,{end_per_group,g4},
@@ -674,7 +674,7 @@ test_events(require_default) ->
{init_per_group,g8,[]},
{auto_skipped,{require_failed,
{not_available,non_existing}}}}},
- {?eh,tc_auto_skip,{group_require_1_SUITE,t81,
+ {?eh,tc_auto_skip,{group_require_1_SUITE,{t81,g8},
{require_failed,{not_available,non_existing}}}},
{?eh,test_stats,{8,0,{0,2}}},
{?eh,tc_auto_skip,{group_require_1_SUITE,{end_per_group,g8},
@@ -699,7 +699,7 @@ test_events(require_default) ->
{?eh,tc_done,{group_require_1_SUITE,
{init_per_group,g11,[]},
{auto_skipped,{group0_failed,bad_return_value}}}},
- {?eh,tc_auto_skip,{group_require_1_SUITE,t111,
+ {?eh,tc_auto_skip,{group_require_1_SUITE,{t111,g11},
{group0_failed,bad_return_value}}},
{?eh,test_stats,{9,0,{0,4}}},
{?eh,tc_auto_skip,{group_require_1_SUITE,
@@ -740,7 +740,7 @@ test_events(require_no_ips) ->
{?eh,tc_done,{group_require_2_SUITE,{init_per_group,g4,[]},
{auto_skipped,{require_failed,
{name_in_use,common2_alias,common2}}}}},
- {?eh,tc_auto_skip,{group_require_2_SUITE,t41,
+ {?eh,tc_auto_skip,{group_require_2_SUITE,{t41,g4},
{require_failed,{name_in_use,common2_alias,common2}}}},
{?eh,test_stats,{4,0,{0,1}}},
{?eh,tc_auto_skip,{group_require_2_SUITE,{end_per_group,g4},
@@ -768,7 +768,7 @@ test_events(require_no_ips) ->
{init_per_group,g8,[]},
{auto_skipped,{require_failed,
{not_available,non_existing}}}}},
- {?eh,tc_auto_skip,{group_require_2_SUITE,t81,
+ {?eh,tc_auto_skip,{group_require_2_SUITE,{t81,g8},
{require_failed,{not_available,non_existing}}}},
{?eh,test_stats,{8,0,{0,2}}},
{?eh,tc_auto_skip,{group_require_2_SUITE,{end_per_group,g8},
@@ -792,7 +792,7 @@ test_events(require_no_ips) ->
{?eh,tc_done,{group_require_2_SUITE,
{init_per_group,g11,[]},
{auto_skipped,{group0_failed,bad_return_value}}}},
- {?eh,tc_auto_skip,{group_require_2_SUITE,t111,
+ {?eh,tc_auto_skip,{group_require_2_SUITE,{t111,g11},
{group0_failed,bad_return_value}}},
{?eh,test_stats,{9,0,{0,4}}},
{?eh,tc_auto_skip,{group_require_2_SUITE,
@@ -831,7 +831,7 @@ test_events(require_no_ipg) ->
[{?eh,tc_start,{ct_framework,{init_per_group,g4,[{suite,group_require_3_SUITE}]}}},
{?eh,tc_done,{ct_framework,{init_per_group,g4,[{suite,group_require_3_SUITE}]},
{auto_skipped,{require_failed,{name_in_use,common2_alias,common2}}}}},
- {?eh,tc_auto_skip,{group_require_3_SUITE,t41,
+ {?eh,tc_auto_skip,{group_require_3_SUITE,{t41,g4},
{require_failed,{name_in_use,common2_alias,common2}}}},
{?eh,test_stats,{4,0,{0,1}}},
{?eh,tc_auto_skip,{ct_framework,{end_per_group,g4},
@@ -857,7 +857,7 @@ test_events(require_no_ipg) ->
[{?eh,tc_start,{ct_framework,{init_per_group,g8,[{suite,group_require_3_SUITE}]}}},
{?eh,tc_done,{ct_framework,{init_per_group,g8,[{suite,group_require_3_SUITE}]},
{auto_skipped,{require_failed,{not_available,non_existing}}}}},
- {?eh,tc_auto_skip,{group_require_3_SUITE,t81,
+ {?eh,tc_auto_skip,{group_require_3_SUITE,{t81,g8},
{require_failed,{not_available,non_existing}}}},
{?eh,test_stats,{8,0,{0,2}}},
{?eh,tc_auto_skip,{ct_framework,{end_per_group,g8},
@@ -879,7 +879,7 @@ test_events(require_no_ipg) ->
[{?eh,tc_start,{ct_framework,{init_per_group,g11,[{suite,group_require_3_SUITE}]}}},
{?eh,tc_done,{ct_framework,{init_per_group,g11,[{suite,group_require_3_SUITE}]},
{auto_skipped,{group0_failed,bad_return_value}}}},
- {?eh,tc_auto_skip,{group_require_3_SUITE,t111,{group0_failed,bad_return_value}}},
+ {?eh,tc_auto_skip,{group_require_3_SUITE,{t111,g11},{group0_failed,bad_return_value}}},
{?eh,test_stats,{9,0,{0,4}}},
{?eh,tc_auto_skip,{ct_framework,{end_per_group,g11},
{group0_failed,bad_return_value}}}],
diff --git a/lib/common_test/test/ct_groups_spec_SUITE.erl b/lib/common_test/test/ct_groups_spec_SUITE.erl
index 5a6d5ac0ac..de4ab77229 100644
--- a/lib/common_test/test/ct_groups_spec_SUITE.erl
+++ b/lib/common_test/test/ct_groups_spec_SUITE.erl
@@ -246,7 +246,8 @@ test_events(override_with_all) ->
{?eh,tc_done,{groups_spec_1_SUITE,{init_per_group,g1,[sequence]},ok}},
{?eh,tc_done,{groups_spec_1_SUITE,t11,ok}},
{?eh,tc_done,{groups_spec_1_SUITE,t12,{failed,{error,crashes}}}},
- {?eh,tc_auto_skip,{groups_spec_1_SUITE,t13,{failed,{groups_spec_1_SUITE,t12}}}},
+ {?eh,tc_auto_skip,{groups_spec_1_SUITE,{t13,g1},
+ {failed,{groups_spec_1_SUITE,t12}}}},
{?eh,test_stats,{3,2,{0,1}}},
{?eh,tc_start,{groups_spec_1_SUITE,{end_per_group,g1,[sequence]}}},
{?eh,tc_done,{groups_spec_1_SUITE,{end_per_group,g1,[sequence]},ok}}],
@@ -327,19 +328,27 @@ test_events(override_with_all) ->
{?eh,tc_done,{groups_spec_1_SUITE,{init_per_group,g3,[sequence]},ok}},
{?eh,tc_done,{groups_spec_1_SUITE,t31,ok}},
{?eh,tc_done,{groups_spec_1_SUITE,t32,{failed,{error,crashes}}}},
- {?eh,tc_auto_skip,{groups_spec_1_SUITE,t33,{failed,{groups_spec_1_SUITE,t32}}}},
+ {?eh,tc_auto_skip,{groups_spec_1_SUITE,{t33,g3},
+ {failed,{groups_spec_1_SUITE,t32}}}},
{?eh,test_stats,{14,9,{0,2}}},
{?eh,tc_start,{groups_spec_1_SUITE,{end_per_group,g3,[sequence]}}},
{?eh,tc_done,{groups_spec_1_SUITE,{end_per_group,g3,[sequence]},ok}}],
{?eh,tc_done,{groups_spec_1_SUITE,t22,{failed,{error,crashes}}}},
- {?eh,tc_auto_skip,{groups_spec_1_SUITE,t41,{failed,{groups_spec_1_SUITE,t22}}}},
- {?eh,tc_auto_skip,{groups_spec_1_SUITE,t51,{failed,{groups_spec_1_SUITE,t22}}}},
- {?eh,tc_auto_skip,{groups_spec_1_SUITE,t52,{failed,{groups_spec_1_SUITE,t22}}}},
- {?eh,tc_auto_skip,{groups_spec_1_SUITE,t53,{failed,{groups_spec_1_SUITE,t22}}}},
- {?eh,tc_auto_skip,{groups_spec_1_SUITE,t54,{failed,{groups_spec_1_SUITE,t22}}}},
- {?eh,tc_auto_skip,{groups_spec_1_SUITE,t42,{failed,{groups_spec_1_SUITE,t22}}}},
- {?eh,tc_auto_skip,{groups_spec_1_SUITE,t23,{failed,{groups_spec_1_SUITE,t22}}}},
+ {?eh,tc_auto_skip,{groups_spec_1_SUITE,{t41,g4},
+ {failed,{groups_spec_1_SUITE,t22}}}},
+ {?eh,tc_auto_skip,{groups_spec_1_SUITE,{t51,g5},
+ {failed,{groups_spec_1_SUITE,t22}}}},
+ {?eh,tc_auto_skip,{groups_spec_1_SUITE,{t52,g5},
+ {failed,{groups_spec_1_SUITE,t22}}}},
+ {?eh,tc_auto_skip,{groups_spec_1_SUITE,{t53,g5},
+ {failed,{groups_spec_1_SUITE,t22}}}},
+ {?eh,tc_auto_skip,{groups_spec_1_SUITE,{t54,g5},
+ {failed,{groups_spec_1_SUITE,t22}}}},
+ {?eh,tc_auto_skip,{groups_spec_1_SUITE,{t42,g4},
+ {failed,{groups_spec_1_SUITE,t22}}}},
+ {?eh,tc_auto_skip,{groups_spec_1_SUITE,{t23,g2},
+ {failed,{groups_spec_1_SUITE,t22}}}},
{?eh,test_stats,{14,10,{0,9}}},
{?eh,tc_start,{groups_spec_1_SUITE,{end_per_group,g2,[sequence]}}},
@@ -355,7 +364,8 @@ test_events(override_with_all) ->
{?eh,tc_done,{groups_spec_1_SUITE,{init_per_group,g3,[sequence]},ok}},
{?eh,tc_done,{groups_spec_1_SUITE,t31,ok}},
{?eh,tc_done,{groups_spec_1_SUITE,t32,{failed,{error,crashes}}}},
- {?eh,tc_auto_skip,{groups_spec_1_SUITE,t33,{failed,{groups_spec_1_SUITE,t32}}}},
+ {?eh,tc_auto_skip,{groups_spec_1_SUITE,{t33,g3},
+ {failed,{groups_spec_1_SUITE,t32}}}},
{?eh,test_stats,{16,11,{0,10}}},
{?eh,tc_start,{groups_spec_1_SUITE,{end_per_group,g3,[sequence]}}},
{?eh,tc_done,{groups_spec_1_SUITE,{end_per_group,g3,[sequence]},ok}}],
@@ -372,8 +382,10 @@ test_events(override_with_all) ->
{?eh,tc_done,{groups_spec_1_SUITE,{init_per_group,g5,[sequence]},ok}},
{?eh,tc_done,{groups_spec_1_SUITE,t51,ok}},
{?eh,tc_done,{groups_spec_1_SUITE,t52,{failed,{timetrap_timeout,2000}}}},
- {?eh,tc_auto_skip,{groups_spec_1_SUITE,t53,{failed,{groups_spec_1_SUITE,t52}}}},
- {?eh,tc_auto_skip,{groups_spec_1_SUITE,t54,{failed,{groups_spec_1_SUITE,t52}}}},
+ {?eh,tc_auto_skip,{groups_spec_1_SUITE,{t53,g5},
+ {failed,{groups_spec_1_SUITE,t52}}}},
+ {?eh,tc_auto_skip,{groups_spec_1_SUITE,{t54,g5},
+ {failed,{groups_spec_1_SUITE,t52}}}},
{?eh,test_stats,{18,13,{0,12}}},
{?eh,tc_start,{groups_spec_1_SUITE,{end_per_group,g5,[sequence]}}},
{?eh,tc_done,{groups_spec_1_SUITE,{end_per_group,g5,[sequence]},ok}}],
@@ -417,7 +429,8 @@ test_events(override_with_spec) ->
{?eh,tc_done,{groups_spec_1_SUITE,{init_per_group,g1,[sequence]},ok}},
{?eh,tc_done,{groups_spec_1_SUITE,t11,ok}},
{?eh,tc_done,{groups_spec_1_SUITE,t12,{failed,{error,crashes}}}},
- {?eh,tc_auto_skip,{groups_spec_1_SUITE,t13,{failed,{groups_spec_1_SUITE,t12}}}},
+ {?eh,tc_auto_skip,{groups_spec_1_SUITE,{t13,g1},
+ {failed,{groups_spec_1_SUITE,t12}}}},
{?eh,test_stats,{3,2,{0,1}}},
{?eh,tc_start,{groups_spec_1_SUITE,{end_per_group,g1,[sequence]}}},
{?eh,tc_done,{groups_spec_1_SUITE,{end_per_group,g1,[sequence]},ok}}],
@@ -493,18 +506,26 @@ test_events(override_with_spec) ->
{?eh,tc_done,{groups_spec_1_SUITE,{init_per_group,g3,[sequence]},ok}},
{?eh,tc_done,{groups_spec_1_SUITE,t31,ok}},
{?eh,tc_done,{groups_spec_1_SUITE,t32,{failed,{error,crashes}}}},
- {?eh,tc_auto_skip,{groups_spec_1_SUITE,t33,{failed,{groups_spec_1_SUITE,t32}}}},
+ {?eh,tc_auto_skip,{groups_spec_1_SUITE,{t33,g3},
+ {failed,{groups_spec_1_SUITE,t32}}}},
{?eh,test_stats,{14,9,{0,2}}},
{?eh,tc_start,{groups_spec_1_SUITE,{end_per_group,g3,[sequence]}}},
{?eh,tc_done,{groups_spec_1_SUITE,{end_per_group,g3,[sequence]},ok}}],
{?eh,tc_done,{groups_spec_1_SUITE,t22,{failed,{error,crashes}}}},
- {?eh,tc_auto_skip,{groups_spec_1_SUITE,t41,{failed,{groups_spec_1_SUITE,t22}}}},
- {?eh,tc_auto_skip,{groups_spec_1_SUITE,t51,{failed,{groups_spec_1_SUITE,t22}}}},
- {?eh,tc_auto_skip,{groups_spec_1_SUITE,t52,{failed,{groups_spec_1_SUITE,t22}}}},
- {?eh,tc_auto_skip,{groups_spec_1_SUITE,t53,{failed,{groups_spec_1_SUITE,t22}}}},
- {?eh,tc_auto_skip,{groups_spec_1_SUITE,t54,{failed,{groups_spec_1_SUITE,t22}}}},
- {?eh,tc_auto_skip,{groups_spec_1_SUITE,t42,{failed,{groups_spec_1_SUITE,t22}}}},
- {?eh,tc_auto_skip,{groups_spec_1_SUITE,t23,{failed,{groups_spec_1_SUITE,t22}}}},
+ {?eh,tc_auto_skip,{groups_spec_1_SUITE,{t41,g4},
+ {failed,{groups_spec_1_SUITE,t22}}}},
+ {?eh,tc_auto_skip,{groups_spec_1_SUITE,{t51,g5},
+ {failed,{groups_spec_1_SUITE,t22}}}},
+ {?eh,tc_auto_skip,{groups_spec_1_SUITE,{t52,g5},
+ {failed,{groups_spec_1_SUITE,t22}}}},
+ {?eh,tc_auto_skip,{groups_spec_1_SUITE,{t53,g5},
+ {failed,{groups_spec_1_SUITE,t22}}}},
+ {?eh,tc_auto_skip,{groups_spec_1_SUITE,{t54,g5},
+ {failed,{groups_spec_1_SUITE,t22}}}},
+ {?eh,tc_auto_skip,{groups_spec_1_SUITE,{t42,g4},
+ {failed,{groups_spec_1_SUITE,t22}}}},
+ {?eh,tc_auto_skip,{groups_spec_1_SUITE,{t23,g2},
+ {failed,{groups_spec_1_SUITE,t22}}}},
{?eh,test_stats,{14,10,{0,9}}},
{?eh,tc_start,{groups_spec_1_SUITE,{end_per_group,g2,[sequence]}}},
{?eh,tc_done,{groups_spec_1_SUITE,{end_per_group,g2,[sequence]},ok}}],
@@ -521,7 +542,8 @@ test_events(override_with_spec) ->
{?eh,tc_done,{groups_spec_1_SUITE,{init_per_group,g3,[sequence]},ok}},
{?eh,tc_done,{groups_spec_1_SUITE,t31,ok}},
{?eh,tc_done,{groups_spec_1_SUITE,t32,{failed,{error,crashes}}}},
- {?eh,tc_auto_skip,{groups_spec_1_SUITE,t33,{failed,{groups_spec_1_SUITE,t32}}}},
+ {?eh,tc_auto_skip,{groups_spec_1_SUITE,{t33,g3},
+ {failed,{groups_spec_1_SUITE,t32}}}},
{?eh,test_stats,{16,11,{0,10}}},
{?eh,tc_start,{groups_spec_1_SUITE,{end_per_group,g3,[sequence]}}},
{?eh,tc_done,{groups_spec_1_SUITE,{end_per_group,g3,[sequence]},ok}}],
@@ -535,8 +557,10 @@ test_events(override_with_spec) ->
{?eh,tc_done,{groups_spec_1_SUITE,{init_per_group,g5,[sequence]},ok}},
{?eh,tc_done,{groups_spec_1_SUITE,t51,ok}},
{?eh,tc_done,{groups_spec_1_SUITE,t52,{failed,{timetrap_timeout,2000}}}},
- {?eh,tc_auto_skip,{groups_spec_1_SUITE,t53,{failed,{groups_spec_1_SUITE,t52}}}},
- {?eh,tc_auto_skip,{groups_spec_1_SUITE,t54,{failed,{groups_spec_1_SUITE,t52}}}},
+ {?eh,tc_auto_skip,{groups_spec_1_SUITE,{t53,g5},
+ {failed,{groups_spec_1_SUITE,t52}}}},
+ {?eh,tc_auto_skip,{groups_spec_1_SUITE,{t54,g5},
+ {failed,{groups_spec_1_SUITE,t52}}}},
{?eh,test_stats,{18,13,{0,12}}},
{?eh,tc_start,{groups_spec_1_SUITE,{end_per_group,g5,[sequence]}}},
{?eh,tc_done,{groups_spec_1_SUITE,{end_per_group,g5,[sequence]},ok}}],
@@ -555,7 +579,8 @@ test_events(override_with_spec) ->
[{?eh,tc_start,{groups_spec_1_SUITE,{init_per_group,g1,[sequence]}}},
{?eh,tc_done,{groups_spec_1_SUITE,{init_per_group,g1,[sequence]},ok}},
{?eh,tc_done,{groups_spec_1_SUITE,t12,{failed,{error,crashes}}}},
- {?eh,tc_auto_skip,{groups_spec_1_SUITE,t13,{failed,{groups_spec_1_SUITE,t12}}}},
+ {?eh,tc_auto_skip,{groups_spec_1_SUITE,{t13,g1},
+ {failed,{groups_spec_1_SUITE,t12}}}},
{?eh,test_stats,{19,15,{0,13}}},
{?eh,tc_start,{groups_spec_1_SUITE,{end_per_group,g1,[sequence]}}},
{?eh,tc_done,{groups_spec_1_SUITE,{end_per_group,g1,[sequence]},ok}}],
diff --git a/lib/common_test/test/ct_hooks_SUITE.erl b/lib/common_test/test/ct_hooks_SUITE.erl
index b5855da9df..c8fc4bd59b 100644
--- a/lib/common_test/test/ct_hooks_SUITE.erl
+++ b/lib/common_test/test/ct_hooks_SUITE.erl
@@ -786,7 +786,7 @@ test_events(skip_pre_end_cth) ->
{?eh,cth,{'_',post_end_per_group,[group1,'$proplist','_',[]]}},
{?eh,tc_done,{ct_scope_per_group_cth_SUITE,{end_per_group,group1,[]},
{skipped,"Test skip"}}}],
- {?eh,cth,{'_',on_tc_skip,[end_per_group,
+ {?eh,cth,{'_',on_tc_skip,[{end_per_group,group1},
{tc_user_skip,{skipped,"Test skip"}},
[]]}},
{?eh,tc_start,{ct_scope_per_group_cth_SUITE,end_per_suite}},
diff --git a/lib/common_test/test/ct_hooks_SUITE_data/cth/tests/empty_cth.erl b/lib/common_test/test/ct_hooks_SUITE_data/cth/tests/empty_cth.erl
index 9ee2a90896..6caac7e447 100644
--- a/lib/common_test/test/ct_hooks_SUITE_data/cth/tests/empty_cth.erl
+++ b/lib/common_test/test/ct_hooks_SUITE_data/cth/tests/empty_cth.erl
@@ -229,9 +229,9 @@ post_end_per_testcase(TC,Config,Return,State) ->
%% This function should be used for extra cleanup which might be needed.
%% It is not possible to modify the config or the status of the test run.
-spec on_tc_fail(TC :: init_per_suite | end_per_suite |
- init_per_group | end_per_group | atom(),
- Reason :: term(), State :: #state{}) ->
- NewState :: #state{}.
+ init_per_group | end_per_group | atom() |
+ {Function :: atom(), GroupName :: atom()},
+ Reason :: term(), State :: #state{}) -> NewState :: #state{}.
on_tc_fail(TC, Reason, State) ->
gen_event:notify(
?CT_EVMGR_REF, #event{ name = cth, node = node(),
@@ -243,11 +243,11 @@ on_tc_fail(TC, Reason, State) ->
%% or due to an init function failing. Test case can be
%% end_per_suite, init_per_group, end_per_group and the actual test cases.
-spec on_tc_skip(TC :: end_per_suite |
- init_per_group | end_per_group | atom(),
+ init_per_group | end_per_group | atom() |
+ {Function :: atom(), GroupName :: atom()},
{tc_auto_skip, {failed, {Mod :: atom(), Function :: atom(), Reason :: term()}}} |
- {tc_user_skip, {skipped, Reason :: term()}},
- State :: #state{}) ->
- NewState :: #state{}.
+ {tc_user_skip, {skipped, Reason :: term()}},
+ State :: #state{}) -> NewState :: #state{}.
on_tc_skip(TC, Reason, State) ->
gen_event:notify(
?CT_EVMGR_REF, #event{ name = cth, node = node(),
diff --git a/lib/common_test/test/ct_master_SUITE.erl b/lib/common_test/test/ct_master_SUITE.erl
index 7408cbe376..e90513f888 100644
--- a/lib/common_test/test/ct_master_SUITE.erl
+++ b/lib/common_test/test/ct_master_SUITE.erl
@@ -81,7 +81,8 @@ end_per_testcase(TestCase, Config) ->
ct_test_support:end_per_testcase(TestCase, Config).
-suite() -> [{ct_hooks,[ts_install_cth]}].
+suite() -> [{timetrap,{seconds,60}},
+ {ct_hooks,[ts_install_cth]}].
all() ->
[ct_master_test].
diff --git a/lib/common_test/test/ct_repeat_1_SUITE.erl b/lib/common_test/test/ct_repeat_1_SUITE.erl
index 98eaa28763..e37aeb196c 100644
--- a/lib/common_test/test/ct_repeat_1_SUITE.erl
+++ b/lib/common_test/test/ct_repeat_1_SUITE.erl
@@ -225,7 +225,7 @@ test_events(repeat_cs_and_grs) ->
{?eh,test_stats,{3,1,{0,0}}},
[{?eh,tc_done,{repeat_1_SUITE,{init_per_group,gr_fail_init,[]},
{failed,{error,fails_on_purpose}}}},
- {?eh,tc_auto_skip,{repeat_1_SUITE,tc_ok_1,
+ {?eh,tc_auto_skip,{repeat_1_SUITE,{tc_ok_1,gr_fail_init},
{failed,{repeat_1_SUITE,init_per_group,
{'EXIT',fails_on_purpose}}}}},
{?eh,test_stats,{3,1,{0,1}}},
@@ -247,7 +247,7 @@ test_events(repeat_cs_and_grs) ->
{?eh,test_stats,{7,2,{0,1}}},
[{?eh,tc_done,{repeat_1_SUITE,{init_per_group,gr_fail_init,[]},
{failed,{error,fails_on_purpose}}}},
- {?eh,tc_auto_skip,{repeat_1_SUITE,tc_ok_1,
+ {?eh,tc_auto_skip,{repeat_1_SUITE,{tc_ok_1,gr_fail_init},
{failed,{repeat_1_SUITE,init_per_group,
{'EXIT',fails_on_purpose}}}}},
{?eh,test_stats,{7,2,{0,2}}},
@@ -269,7 +269,7 @@ test_events(repeat_seq) ->
ok}},
{?eh,test_stats,{1,0,{0,0}}},
{?eh,test_stats,{1,1,{0,0}}},
- {?eh,tc_auto_skip,{repeat_1_SUITE,tc_ok_2,
+ {?eh,tc_auto_skip,{repeat_1_SUITE,{tc_ok_2,repeat_seq_1},
{failed,{repeat_1_SUITE,tc_fail_1}}}},
{?eh,test_stats,{1,1,{0,1}}},
{?eh,tc_done,{repeat_1_SUITE,
@@ -291,7 +291,7 @@ test_events(repeat_seq) ->
{?eh,tc_done,{repeat_1_SUITE,
{end_per_group,gr_fail_result,[]},
{return_group_result,failed}}}],
- {?eh,tc_auto_skip,{repeat_1_SUITE,tc_ok_2,
+ {?eh,tc_auto_skip,{repeat_1_SUITE,{tc_ok_2,repeat_seq_2},
{group_result,gr_fail_result,failed}}},
{?eh,test_stats,{4,2,{0,3}}},
{?eh,tc_done,{repeat_1_SUITE,
@@ -315,7 +315,7 @@ test_events(repeat_seq) ->
{failed,
{repeat_1_SUITE,init_per_group,
{'EXIT',fails_on_purpose}}}}}],
- {?eh,tc_auto_skip,{repeat_1_SUITE,tc_ok_2,
+ {?eh,tc_auto_skip,{repeat_1_SUITE,{tc_ok_2,repeat_seq_3},
{group_result,gr_fail_init,failed}}},
{?eh,test_stats,{7,2,{0,6}}},
{?eh,tc_done,{repeat_1_SUITE,
@@ -329,12 +329,13 @@ test_events(repeat_seq) ->
[{?eh,tc_done,{repeat_1_SUITE,
{init_per_group,repeat_seq_4,[sequence,{repeat,2}]},
ok}},
+ {?eh,tc_done,{repeat_1_SUITE,tc_fail_1,'_'}},
{?eh,test_stats,{8,3,{0,8}}},
- {?eh,tc_auto_skip,{repeat_1_SUITE,
- tc_ok_1,{failed,{repeat_1_SUITE,tc_fail_1}}}},
+ {?eh,tc_auto_skip,{repeat_1_SUITE,{tc_ok_1,gr_ok_1},
+ {failed,{repeat_1_SUITE,tc_fail_1}}}},
{?eh,test_stats,{8,3,{0,9}}},
- {?eh,tc_auto_skip,{repeat_1_SUITE,
- tc_ok_1,{failed,{repeat_1_SUITE,tc_fail_1}}}},
+ {?eh,tc_auto_skip,{repeat_1_SUITE,{tc_ok_1,repeat_seq_4},
+ {failed,{repeat_1_SUITE,tc_fail_1}}}},
{?eh,test_stats,{8,3,{0,10}}},
{?eh,tc_done,{repeat_1_SUITE,
{end_per_group,repeat_seq_4,[sequence,{repeat,2}]},
@@ -764,7 +765,7 @@ test_events(repeat_gr_until_any_fail) ->
{init_per_group,gr_ok_then_fail_init,[]},
{failed,{error,failing_this_time}}}},
{?eh,tc_auto_skip,
- {repeat_1_SUITE,tc_ok_1,
+ {repeat_1_SUITE,{tc_ok_1,gr_ok_then_fail_init},
{failed,
{repeat_1_SUITE,init_per_group,
{'EXIT',failing_this_time}}}}},
@@ -963,7 +964,7 @@ test_events(repeat_gr_until_all_ok) ->
[{?eh,tc_done,{repeat_1_SUITE,
{init_per_group,gr_fail_init_then_ok,[]},
{failed,{error,failing_this_time}}}},
- {?eh,tc_auto_skip,{repeat_1_SUITE,tc_ok_1,
+ {?eh,tc_auto_skip,{repeat_1_SUITE,{tc_ok_1,gr_fail_init_then_ok},
{failed,{repeat_1_SUITE,init_per_group,
{'EXIT',failing_this_time}}}}},
{?eh,test_stats,{7,1,{0,1}}},
@@ -1237,10 +1238,10 @@ test_events(repeat_seq_until_any_fail) ->
{?eh,tc_done,{repeat_1_SUITE,tc_ok_then_fail_1,
{failed,{error,failing_this_time}}}},
{?eh,test_stats,{15,1,{0,0}}},
- {?eh,tc_auto_skip,{repeat_1_SUITE,tc_ok_2,
+ {?eh,tc_auto_skip,{repeat_1_SUITE,{tc_ok_2,repeat_seq_until_any_fail_3},
{failed,{repeat_1_SUITE,tc_ok_then_fail_1}}}},
{?eh,test_stats,{15,1,{0,1}}},
- {?eh,tc_auto_skip,{repeat_1_SUITE,tc_ok_1,
+ {?eh,tc_auto_skip,{repeat_1_SUITE,{tc_ok_1,gr_ok_1},
{failed,{repeat_1_SUITE,tc_ok_then_fail_1}}}},
{?eh,test_stats,{15,1,{0,2}}},
{?eh,tc_done,{repeat_1_SUITE,
@@ -1264,10 +1265,10 @@ test_events(repeat_seq_until_any_fail) ->
[{?eh,tc_done,{repeat_1_SUITE,
{end_per_group,gr_ok_then_fail_result,[]},
{return_group_result,failed}}}],
- {?eh,tc_auto_skip,{repeat_1_SUITE,tc_ok_1,
+ {?eh,tc_auto_skip,{repeat_1_SUITE,{tc_ok_1,gr_ok_1},
{group_result,gr_ok_then_fail_result,failed}}},
{?eh,test_stats,{19,1,{0,3}}},
- {?eh,tc_auto_skip,{repeat_1_SUITE,tc_ok_1,
+ {?eh,tc_auto_skip,{repeat_1_SUITE,{tc_ok_1,repeat_seq_until_any_fail_4},
{group_result,gr_ok_then_fail_result,failed}}},
{?eh,test_stats,{19,1,{0,4}}},
{?eh,tc_done,{repeat_1_SUITE,
@@ -1296,10 +1297,10 @@ test_events(repeat_seq_until_any_fail) ->
{?eh,tc_auto_skip,{repeat_1_SUITE,{end_per_group,gr_ok_then_fail_init},
{failed,{repeat_1_SUITE,init_per_group,
{'EXIT',failing_this_time}}}}}],
- {?eh,tc_auto_skip,{repeat_1_SUITE,tc_ok_1,
+ {?eh,tc_auto_skip,{repeat_1_SUITE,{tc_ok_1,gr_ok_2},
{group_result,gr_ok_then_fail_init,failed}}},
{?eh,test_stats,{24,1,{0,6}}},
- {?eh,tc_auto_skip,{repeat_1_SUITE,tc_ok_1,
+ {?eh,tc_auto_skip,{repeat_1_SUITE,{tc_ok_1,repeat_seq_until_any_fail_5},
{group_result,gr_ok_then_fail_init,failed}}},
{?eh,test_stats,{24,1,{0,7}}},
{?eh,tc_done,{repeat_1_SUITE,
diff --git a/lib/common_test/test/ct_repeat_testrun_SUITE.erl b/lib/common_test/test/ct_repeat_testrun_SUITE.erl
index bb2aba2c5a..b6f285322d 100644
--- a/lib/common_test/test/ct_repeat_testrun_SUITE.erl
+++ b/lib/common_test/test/ct_repeat_testrun_SUITE.erl
@@ -343,9 +343,9 @@ skip_first_tc1(Suite) ->
{?eh,tc_done,{Suite,tc2,?skipped}},
{?eh,test_stats,{'_',0,{0,1}}},
{?eh,tc_done,{Suite,{init_per_group,g,[]},?skipped}},
- {?eh,tc_auto_skip,{Suite,tc1,?skip_reason}},
+ {?eh,tc_auto_skip,{Suite,{tc1,g},?skip_reason}},
{?eh,test_stats,{'_',0,{0,2}}},
- {?eh,tc_auto_skip,{Suite,tc2,?skip_reason}},
+ {?eh,tc_auto_skip,{Suite,{tc2,g},?skip_reason}},
{?eh,test_stats,{'_',0,{0,3}}},
{?eh,tc_auto_skip,{Suite,{end_per_group,g},?skip_reason}},
{?eh,tc_done,{Suite,tc2,?skipped}},
diff --git a/lib/common_test/test/ct_sequence_1_SUITE.erl b/lib/common_test/test/ct_sequence_1_SUITE.erl
index 8c87236838..5a775a1117 100644
--- a/lib/common_test/test/ct_sequence_1_SUITE.erl
+++ b/lib/common_test/test/ct_sequence_1_SUITE.erl
@@ -185,7 +185,8 @@ test_events(subgroup_return_fail) ->
{?eh,tc_done,{subgroups_1_SUITE,{end_per_group,return_fail,[]},
{return_group_result,failed}}}],
{?eh,tc_auto_skip,
- {subgroups_1_SUITE,ok_tc,{group_result,return_fail,failed}}},
+ {subgroups_1_SUITE,{ok_tc,ok_group},
+ {group_result,return_fail,failed}}},
{?eh,test_stats,{0,1,{0,1}}},
{?eh,tc_start,
{subgroups_1_SUITE,{end_per_group,subgroup_return_fail,[sequence]}}},
@@ -208,14 +209,15 @@ test_events(subgroup_init_fail) ->
[{?eh,tc_start,{subgroups_1_SUITE,{init_per_group,fail_init,[]}}},
{?eh,tc_done,{subgroups_1_SUITE,{init_per_group,fail_init,[]},
{failed,{error,init_per_group_fails_on_purpose}}}},
- {?eh,tc_auto_skip,{subgroups_1_SUITE,ok_tc,
+ {?eh,tc_auto_skip,{subgroups_1_SUITE,{ok_tc,fail_init},
{failed,{subgroups_1_SUITE,init_per_group,
{'EXIT',init_per_group_fails_on_purpose}}}}},
{?eh,test_stats,{0,0,{0,1}}},
{?eh,tc_auto_skip,{subgroups_1_SUITE,{end_per_group,fail_init},
{failed,{subgroups_1_SUITE,init_per_group,
{'EXIT',init_per_group_fails_on_purpose}}}}}],
- {?eh,tc_auto_skip,{subgroups_1_SUITE,ok_tc,{group_result,fail_init,failed}}},
+ {?eh,tc_auto_skip,{subgroups_1_SUITE,{ok_tc,ok_group},
+ {group_result,fail_init,failed}}},
{?eh,test_stats,{0,0,{0,2}}},
{?eh,tc_start,{subgroups_1_SUITE,{end_per_group,subgroup_init_fail,[sequence]}}},
{?eh,tc_done,{subgroups_1_SUITE,
@@ -237,7 +239,8 @@ test_events(subgroup_after_failed_case) ->
{?eh,tc_start,{subgroups_1_SUITE,failing_tc}},
{?eh,tc_done,{subgroups_1_SUITE,failing_tc,{failed,{error,{{badmatch,3},'_'}}}}},
{?eh,test_stats,{0,1,{0,0}}},
- {?eh,tc_auto_skip,{subgroups_1_SUITE,ok_tc,{failed,{subgroups_1_SUITE,failing_tc}}}},
+ {?eh,tc_auto_skip,{subgroups_1_SUITE,{ok_tc,ok_group},
+ {failed,{subgroups_1_SUITE,failing_tc}}}},
{?eh,test_stats,{0,1,{0,1}}},
{?eh,tc_start,{subgroups_1_SUITE,
{end_per_group,subgroup_after_failed_case,[sequence]}}},
@@ -265,7 +268,8 @@ test_events(case_after_subgroup_return_fail) ->
{?eh,tc_start,{subgroups_1_SUITE,{end_per_group,return_fail,[]}}},
{?eh,tc_done,{subgroups_1_SUITE,{end_per_group,return_fail,[]},
{return_group_result,failed}}}],
- {?eh,tc_auto_skip,{subgroups_1_SUITE,ok_tc,{group_result,return_fail,failed}}},
+ {?eh,tc_auto_skip,{subgroups_1_SUITE,{ok_tc,case_after_subgroup_return_fail},
+ {group_result,return_fail,failed}}},
{?eh,test_stats,{0,1,{0,1}}},
{?eh,tc_start,{subgroups_1_SUITE,
{end_per_group,case_after_subgroup_return_fail,[sequence]}}},
@@ -289,7 +293,7 @@ test_events(case_after_subgroup_fail_init) ->
{?eh,tc_done,{subgroups_1_SUITE,
{init_per_group,fail_init,[]},
{failed,{error,init_per_group_fails_on_purpose}}}},
- {?eh,tc_auto_skip,{subgroups_1_SUITE,ok_tc,
+ {?eh,tc_auto_skip,{subgroups_1_SUITE,{ok_tc,fail_init},
{failed,
{subgroups_1_SUITE,init_per_group,
{'EXIT',init_per_group_fails_on_purpose}}}}},
@@ -300,7 +304,8 @@ test_events(case_after_subgroup_fail_init) ->
{'EXIT',init_per_group_fails_on_purpose}}}}}],
{?eh,tc_auto_skip,
- {subgroups_1_SUITE,ok_tc,{group_result,fail_init,failed}}},
+ {subgroups_1_SUITE,{ok_tc,case_after_subgroup_fail_init},
+ {group_result,fail_init,failed}}},
{?eh,test_stats,{0,0,{0,2}}},
{?eh,tc_start,{subgroups_1_SUITE,
{end_per_group,case_after_subgroup_fail_init,[sequence]}}},
diff --git a/lib/common_test/test/ct_skip_SUITE.erl b/lib/common_test/test/ct_skip_SUITE.erl
index b0a6c839a2..6fb803b928 100644
--- a/lib/common_test/test/ct_skip_SUITE.erl
+++ b/lib/common_test/test/ct_skip_SUITE.erl
@@ -153,10 +153,10 @@ testspec_skip(Config) when is_list(Config) ->
{skip_groups, TestDir, user_skip_6_SUITE, psub1, "SKIPPED"}],
{Opts,ERPid} = setup_testspec([{ts1,TestSpec1},
- {ts2,TestSpec2},
- {ts3,TestSpec3},
- {ts4,TestSpec4},
- {ts5,TestSpec5}], Config),
+ {ts2,TestSpec2},
+ {ts3,TestSpec3},
+ {ts4,TestSpec4},
+ {ts5,TestSpec5}], Config),
ok = ct_test_support:run(Opts, Config),
@@ -234,8 +234,8 @@ test_events(auto_skip) ->
{?eh,tc_done,
{auto_skip_2_SUITE,init_per_suite,{failed,{error,init_per_suite_failed}}}},
{?eh,tc_auto_skip,
- {auto_skip_2_SUITE,tc1,{failed,{auto_skip_2_SUITE,init_per_suite,
- {'EXIT',init_per_suite_failed}}}}},
+ {auto_skip_2_SUITE,{tc1,g1},{failed,{auto_skip_2_SUITE,init_per_suite,
+ {'EXIT',init_per_suite_failed}}}}},
{?eh,test_stats,{0,0,{0,3}}},
{?eh,tc_auto_skip,
{auto_skip_2_SUITE,end_per_suite,{failed,{auto_skip_2_SUITE,init_per_suite,
@@ -274,12 +274,12 @@ test_events(auto_skip) ->
{?eh,tc_done,
{auto_skip_5_SUITE,{init_per_group,g1,[]},{failed,{error,{group,g1,failed}}}}},
{?eh,tc_auto_skip,
- {auto_skip_5_SUITE,tc1,{failed,{auto_skip_5_SUITE,init_per_group,
- {'EXIT',{group,g1,failed}}}}}},
+ {auto_skip_5_SUITE,{tc1,g1},{failed,{auto_skip_5_SUITE,init_per_group,
+ {'EXIT',{group,g1,failed}}}}}},
{?eh,test_stats,{2,0,{0,6}}},
{?eh,tc_auto_skip,
- {auto_skip_5_SUITE,tc2,{failed,{auto_skip_5_SUITE,init_per_group,
- {'EXIT',{group,g1,failed}}}}}},
+ {auto_skip_5_SUITE,{tc2,g1},{failed,{auto_skip_5_SUITE,init_per_group,
+ {'EXIT',{group,g1,failed}}}}}},
{?eh,test_stats,{2,0,{0,7}}},
{?eh,tc_auto_skip,
{auto_skip_5_SUITE,{end_per_group,g1},
@@ -295,20 +295,20 @@ test_events(auto_skip) ->
{?eh,tc_done,
{auto_skip_6_SUITE,{init_per_group,g1,[]},{failed,{error,{group,g1,failed}}}}},
{?eh,tc_auto_skip,
- {auto_skip_6_SUITE,tc1,{failed,{auto_skip_6_SUITE,init_per_group,
- {'EXIT',{group,g1,failed}}}}}},
+ {auto_skip_6_SUITE,{tc1,g1},{failed,{auto_skip_6_SUITE,init_per_group,
+ {'EXIT',{group,g1,failed}}}}}},
{?eh,test_stats,{2,0,{0,8}}},
{?eh,tc_auto_skip,
- {auto_skip_6_SUITE,tc3,{failed,{auto_skip_6_SUITE,init_per_group,
- {'EXIT',{group,g1,failed}}}}}},
+ {auto_skip_6_SUITE,{tc3,g2},{failed,{auto_skip_6_SUITE,init_per_group,
+ {'EXIT',{group,g1,failed}}}}}},
{?eh,test_stats,{2,0,{0,9}}},
{?eh,tc_auto_skip,
- {auto_skip_6_SUITE,tc4,{failed,{auto_skip_6_SUITE,init_per_group,
- {'EXIT',{group,g1,failed}}}}}},
+ {auto_skip_6_SUITE,{tc4,g2},{failed,{auto_skip_6_SUITE,init_per_group,
+ {'EXIT',{group,g1,failed}}}}}},
{?eh,test_stats,{2,0,{0,10}}},
{?eh,tc_auto_skip,
- {auto_skip_6_SUITE,tc2,{failed,{auto_skip_6_SUITE,init_per_group,
- {'EXIT',{group,g1,failed}}}}}},
+ {auto_skip_6_SUITE,{tc2,g1},{failed,{auto_skip_6_SUITE,init_per_group,
+ {'EXIT',{group,g1,failed}}}}}},
{?eh,test_stats,{2,0,{0,11}}},
{?eh,tc_auto_skip,
{auto_skip_6_SUITE,{end_per_group,g1},
@@ -324,12 +324,12 @@ test_events(auto_skip) ->
{?eh,tc_done,{auto_skip_6_SUITE,{init_per_group,g4,[]},
{failed,{error,{group,g4,failed}}}}},
{?eh,tc_auto_skip,
- {auto_skip_6_SUITE,tc3,{failed,{auto_skip_6_SUITE,init_per_group,
- {'EXIT',{group,g4,failed}}}}}},
+ {auto_skip_6_SUITE,{tc3,g4},{failed,{auto_skip_6_SUITE,init_per_group,
+ {'EXIT',{group,g4,failed}}}}}},
{?eh,test_stats,{3,0,{0,12}}},
{?eh,tc_auto_skip,
- {auto_skip_6_SUITE,tc4,{failed,{auto_skip_6_SUITE,init_per_group,
- {'EXIT',{group,g4,failed}}}}}},
+ {auto_skip_6_SUITE,{tc4,g4},{failed,{auto_skip_6_SUITE,init_per_group,
+ {'EXIT',{group,g4,failed}}}}}},
{?eh,test_stats,{3,0,{0,13}}},
{?eh,tc_auto_skip,
{auto_skip_6_SUITE,{end_per_group,g4},
@@ -498,13 +498,13 @@ test_events(auto_skip) ->
[{suite,auto_skip_12_SUITE}]},
{auto_skipped,
{require_failed,{not_available,unknown_variable_g1}}}}},
- {?eh,tc_auto_skip,{auto_skip_12_SUITE,tc1,
+ {?eh,tc_auto_skip,{auto_skip_12_SUITE,{tc1,g1},
{require_failed,{not_available,unknown_variable_g1}}}},
{?eh,test_stats,{10,0,{0,25}}},
- {?eh,tc_auto_skip,{auto_skip_12_SUITE,tc2,
+ {?eh,tc_auto_skip,{auto_skip_12_SUITE,{tc2,g1},
{require_failed,{not_available,unknown_variable_g1}}}},
{?eh,test_stats,{10,0,{0,26}}},
- {?eh,tc_auto_skip,{auto_skip_12_SUITE,tc3,
+ {?eh,tc_auto_skip,{auto_skip_12_SUITE,{tc3,g2},
{require_failed,{not_available,unknown_variable_g1}}}},
{?eh,test_stats,{10,0,{0,27}}},
{?eh,tc_auto_skip,{ct_framework,{end_per_group,g1},
@@ -516,13 +516,13 @@ test_events(auto_skip) ->
[{suite,auto_skip_12_SUITE}]},
{auto_skipped,
{require_failed,{not_available,unknown_variable_g1}}}}},
- {?eh,tc_auto_skip,{auto_skip_12_SUITE,tc1,
+ {?eh,tc_auto_skip,{auto_skip_12_SUITE,{tc1,g1},
{require_failed,{not_available,unknown_variable_g1}}}},
{?eh,test_stats,{10,0,{0,28}}},
- {?eh,tc_auto_skip,{auto_skip_12_SUITE,tc2,
+ {?eh,tc_auto_skip,{auto_skip_12_SUITE,{tc2,g1},
{require_failed,{not_available,unknown_variable_g1}}}},
{?eh,test_stats,{10,0,{0,29}}},
- {?eh,tc_auto_skip,{auto_skip_12_SUITE,tc3,
+ {?eh,tc_auto_skip,{auto_skip_12_SUITE,{tc3,g2},
{require_failed,{not_available,unknown_variable_g1}}}},
{?eh,test_stats,{10,0,{0,30}}},
{?eh,tc_auto_skip,{ct_framework,{end_per_group,g1},
@@ -544,7 +544,7 @@ test_events(auto_skip) ->
[{suite,auto_skip_12_SUITE}]},
{auto_skipped,
{require_failed,{not_available,unknown_variable_g4}}}}},
- {?eh,tc_auto_skip,{auto_skip_12_SUITE,tc3,
+ {?eh,tc_auto_skip,{auto_skip_12_SUITE,{tc3,g4},
{require_failed,{not_available,unknown_variable_g4}}}},
{?eh,test_stats,{12,0,{0,31}}},
{?eh,tc_auto_skip,{ct_framework,{end_per_group,g4},
@@ -574,10 +574,10 @@ test_events(user_skip) ->
{user_skip_1_SUITE,tc1,"Whole suite skipped"}},
{?eh,test_stats,{0,0,{1,0}}},
{?eh,tc_user_skip,
- {user_skip_1_SUITE,tc2,"Whole suite skipped"}},
+ {user_skip_1_SUITE,{tc2,g1},"Whole suite skipped"}},
{?eh,test_stats,{0,0,{2,0}}},
{?eh,tc_user_skip,
- {user_skip_1_SUITE,tc3,"Whole suite skipped"}},
+ {user_skip_1_SUITE,{tc3,g1},"Whole suite skipped"}},
{?eh,test_stats,{0,0,{3,0}}},
{?eh,tc_user_skip,
{user_skip_1_SUITE,tc4,"Whole suite skipped"}},
@@ -638,9 +638,9 @@ test_events(user_skip) ->
[{?eh,tc_start,{user_skip_4_SUITE,{init_per_group,g1,[]}}},
{?eh,tc_done,{user_skip_4_SUITE,{init_per_group,g1,[]},{skipped,"Group skipped"}}},
- {?eh,tc_user_skip,{user_skip_4_SUITE,tc1,"Group skipped"}},
+ {?eh,tc_user_skip,{user_skip_4_SUITE,{tc1,g1},"Group skipped"}},
{?eh,test_stats,{3,0,{10,0}}},
- {?eh,tc_user_skip,{user_skip_4_SUITE,tc2,"Group skipped"}},
+ {?eh,tc_user_skip,{user_skip_4_SUITE,{tc2,g1},"Group skipped"}},
{?eh,test_stats,{3,0,{11,0}}},
{?eh,tc_user_skip,{user_skip_4_SUITE,{end_per_group,g1},"Group skipped"}}],
@@ -657,10 +657,10 @@ test_events(user_skip) ->
[{?eh,tc_start,{user_skip_4_SUITE,{init_per_group,g3,[]}}},
{?eh,tc_done,{user_skip_4_SUITE,{init_per_group,g3,[]},{skipped,"Group skipped"}}},
- {?eh,tc_user_skip,{user_skip_4_SUITE,tc5,"Group skipped"}},
- {?eh,tc_user_skip,{user_skip_4_SUITE,tc6,"Group skipped"}},
- {?eh,tc_user_skip,{user_skip_4_SUITE,tc7,"Group skipped"}},
- {?eh,tc_user_skip,{user_skip_4_SUITE,tc8,"Group skipped"}},
+ {?eh,tc_user_skip,{user_skip_4_SUITE,{tc5,g3},"Group skipped"}},
+ {?eh,tc_user_skip,{user_skip_4_SUITE,{tc6,g4},"Group skipped"}},
+ {?eh,tc_user_skip,{user_skip_4_SUITE,{tc7,g4},"Group skipped"}},
+ {?eh,tc_user_skip,{user_skip_4_SUITE,{tc8,g3},"Group skipped"}},
{?eh,test_stats,{5,0,{15,0}}},
{?eh,tc_user_skip,{user_skip_4_SUITE,{end_per_group,g3},"Group skipped"}}],
@@ -671,9 +671,9 @@ test_events(user_skip) ->
{?eh,test_stats,{6,0,{15,0}}},
[{?eh,tc_start,{user_skip_4_SUITE,{init_per_group,g6,[]}}},
{?eh,tc_done,{user_skip_4_SUITE,{init_per_group,g6,[]},{skipped,"Group skipped"}}},
- {?eh,tc_user_skip,{user_skip_4_SUITE,tc10,"Group skipped"}},
+ {?eh,tc_user_skip,{user_skip_4_SUITE,{tc10,g6},"Group skipped"}},
{?eh,test_stats,{6,0,{16,0}}},
- {?eh,tc_user_skip,{user_skip_4_SUITE,tc11,"Group skipped"}},
+ {?eh,tc_user_skip,{user_skip_4_SUITE,{tc11,g6},"Group skipped"}},
{?eh,test_stats,{6,0,{17,0}}},
{?eh,tc_user_skip,{user_skip_4_SUITE,{end_per_group,g6},"Group skipped"}}],
{?eh,tc_start,{user_skip_4_SUITE,{end_per_group,g5,[]}}},
@@ -687,9 +687,9 @@ test_events(user_skip) ->
{skipped,{bad,'Whole suite skipped'}}}},
{?eh,tc_user_skip,{user_skip_5_SUITE,tc1,{bad,'Whole suite skipped'}}},
{?eh,test_stats,{6,0,{18,0}}},
- {?eh,tc_user_skip,{user_skip_5_SUITE,tc2,{bad,'Whole suite skipped'}}},
+ {?eh,tc_user_skip,{user_skip_5_SUITE,{tc2,g1},{bad,'Whole suite skipped'}}},
{?eh,test_stats,{6,0,{19,0}}},
- {?eh,tc_user_skip,{user_skip_5_SUITE,tc3,{bad,'Whole suite skipped'}}},
+ {?eh,tc_user_skip,{user_skip_5_SUITE,{tc3,g1},{bad,'Whole suite skipped'}}},
{?eh,test_stats,{6,0,{20,0}}},
{?eh,tc_user_skip,{user_skip_5_SUITE,tc4,{bad,'Whole suite skipped'}}},
{?eh,test_stats,{6,0,{21,0}}},
@@ -700,10 +700,10 @@ test_events(user_skip) ->
{?eh,tc_done,{user_skip_6_SUITE,
{init_per_group,ptop1,[parallel]},
{skipped,"Top group skipped"}}},
- {?eh,tc_user_skip,{user_skip_6_SUITE,tc1,"Top group skipped"}},
- {?eh,tc_user_skip,{user_skip_6_SUITE,tc3,"Top group skipped"}},
- {?eh,tc_user_skip,{user_skip_6_SUITE,tc4,"Top group skipped"}},
- {?eh,tc_user_skip,{user_skip_6_SUITE,tc2,"Top group skipped"}},
+ {?eh,tc_user_skip,{user_skip_6_SUITE,{tc1,ptop1},"Top group skipped"}},
+ {?eh,tc_user_skip,{user_skip_6_SUITE,{tc3,psub1},"Top group skipped"}},
+ {?eh,tc_user_skip,{user_skip_6_SUITE,{tc4,psub1},"Top group skipped"}},
+ {?eh,tc_user_skip,{user_skip_6_SUITE,{tc2,ptop1},"Top group skipped"}},
{?eh,tc_user_skip,{user_skip_6_SUITE,{end_per_group,ptop1},
"Top group skipped"}}]},
@@ -718,8 +718,8 @@ test_events(user_skip) ->
{?eh,tc_done,{user_skip_6_SUITE,
{init_per_group,psub2,[parallel]},
{skipped,"Sub group skipped"}}},
- {?eh,tc_user_skip,{user_skip_6_SUITE,tc3,"Sub group skipped"}},
- {?eh,tc_user_skip,{user_skip_6_SUITE,tc4,"Sub group skipped"}},
+ {?eh,tc_user_skip,{user_skip_6_SUITE,{tc3,psub2},"Sub group skipped"}},
+ {?eh,tc_user_skip,{user_skip_6_SUITE,{tc4,psub2},"Sub group skipped"}},
{?eh,tc_user_skip,{user_skip_6_SUITE,{end_per_group,psub2},
"Sub group skipped"}}]},
@@ -745,14 +745,14 @@ test_events(testspec_skip) ->
{user_skip_7_SUITE,{init_per_group,ptop1,[parallel]}}},
{?eh,tc_done,
{user_skip_7_SUITE,{init_per_group,ptop1,[parallel]},ok}},
- {?eh,tc_user_skip,{user_skip_7_SUITE,tc1,"SKIPPED"}},
+ {?eh,tc_user_skip,{user_skip_7_SUITE,{tc1,ptop1},"SKIPPED"}},
{?eh,test_stats,{0,0,{1,0}}},
{parallel,
[{?eh,tc_start,
{user_skip_7_SUITE,{init_per_group,psub1,[parallel]}}},
{?eh,tc_done,
{user_skip_7_SUITE,{init_per_group,psub1,[parallel]},ok}},
- {?eh,tc_user_skip,{user_skip_7_SUITE,tc3,"SKIPPED"}},
+ {?eh,tc_user_skip,{user_skip_7_SUITE,{tc3,psub1},"SKIPPED"}},
{?eh,tc_start,{user_skip_7_SUITE,tc4}},
{?eh,tc_done,{user_skip_7_SUITE,tc4,ok}},
{?eh,test_stats,{1,0,{2,0}}},
@@ -778,13 +778,13 @@ test_events(testspec_skip) ->
{?eh,tc_start,{ct_framework,init_per_suite}},
{?eh,tc_done,{ct_framework,init_per_suite,ok}},
{?eh,tc_user_skip,{user_skip_7_SUITE,{init_per_group,ptop1},"SKIPPED"}},
- {?eh,tc_user_skip,{user_skip_7_SUITE,tc1,"SKIPPED"}},
+ {?eh,tc_user_skip,{user_skip_7_SUITE,{tc1,ptop1},"SKIPPED"}},
{?eh,test_stats,{0,0,{1,0}}},
- {?eh,tc_user_skip,{user_skip_7_SUITE,tc3,"SKIPPED"}},
+ {?eh,tc_user_skip,{user_skip_7_SUITE,{tc3,psub1},"SKIPPED"}},
{?eh,test_stats,{0,0,{2,0}}},
- {?eh,tc_user_skip,{user_skip_7_SUITE,tc4,"SKIPPED"}},
+ {?eh,tc_user_skip,{user_skip_7_SUITE,{tc4,psub1},"SKIPPED"}},
{?eh,test_stats,{0,0,{3,0}}},
- {?eh,tc_user_skip,{user_skip_7_SUITE,tc2,"SKIPPED"}},
+ {?eh,tc_user_skip,{user_skip_7_SUITE,{tc2,ptop1},"SKIPPED"}},
{?eh,test_stats,{0,0,{4,0}}},
{?eh,tc_user_skip,{user_skip_7_SUITE,{end_per_group,ptop1},"SKIPPED"}},
{?eh,tc_start,{ct_framework,end_per_suite}},
@@ -804,8 +804,8 @@ test_events(testspec_skip) ->
{user_skip_7_SUITE,{init_per_group,ptop1,[parallel]},ok}},
{?eh,tc_user_skip,
{user_skip_7_SUITE,{init_per_group,psub1},"SKIPPED"}},
- {?eh,tc_user_skip,{user_skip_7_SUITE,tc3,"SKIPPED"}},
- {?eh,tc_user_skip,{user_skip_7_SUITE,tc4,"SKIPPED"}},
+ {?eh,tc_user_skip,{user_skip_7_SUITE,{tc3,psub1},"SKIPPED"}},
+ {?eh,tc_user_skip,{user_skip_7_SUITE,{tc4,psub1},"SKIPPED"}},
{?eh,test_stats,{0,0,{2,0}}},
{?eh,tc_user_skip,{user_skip_7_SUITE,{end_per_group,psub1},"SKIPPED"}},
{?eh,tc_start,{user_skip_7_SUITE,tc1}},
@@ -837,13 +837,13 @@ test_events(testspec_skip) ->
{?eh,tc_done,{user_skip_6_SUITE,
{init_per_group,ptop1,[parallel]},
{skipped,"Top group skipped"}}},
- {?eh,tc_user_skip,{user_skip_6_SUITE,tc1,"Top group skipped"}},
+ {?eh,tc_user_skip,{user_skip_6_SUITE,{tc1,ptop1},"Top group skipped"}},
{?eh,test_stats,{0,0,{1,0}}},
- {?eh,tc_user_skip,{user_skip_6_SUITE,tc3,"SKIPPED"}},
+ {?eh,tc_user_skip,{user_skip_6_SUITE,{tc3,psub1},"SKIPPED"}},
{?eh,test_stats,{0,0,{2,0}}},
- {?eh,tc_user_skip,{user_skip_6_SUITE,tc4,"SKIPPED"}},
+ {?eh,tc_user_skip,{user_skip_6_SUITE,{tc4,psub1},"SKIPPED"}},
{?eh,test_stats,{0,0,{3,0}}},
- {?eh,tc_user_skip,{user_skip_6_SUITE,tc2,"Top group skipped"}},
+ {?eh,tc_user_skip,{user_skip_6_SUITE,{tc2,ptop1},"Top group skipped"}},
{?eh,test_stats,{0,0,{4,0}}},
{?eh,tc_user_skip,
{user_skip_6_SUITE,{end_per_group,ptop1},"Top group skipped"}}]},
diff --git a/lib/common_test/test/ct_surefire_SUITE.erl b/lib/common_test/test/ct_surefire_SUITE.erl
index c5e44682b0..db7a0be915 100644
--- a/lib/common_test/test/ct_surefire_SUITE.erl
+++ b/lib/common_test/test/ct_surefire_SUITE.erl
@@ -205,7 +205,7 @@ test_events(_) ->
[{?eh,tc_start,{surefire_SUITE,{init_per_group,g_fail,[]}}},
{?eh,tc_done,{surefire_SUITE,{init_per_group,g_fail,[]},
{failed,{error,all_cases_should_be_skipped}}}},
- {?eh,tc_auto_skip,{surefire_SUITE,tc_ok,
+ {?eh,tc_auto_skip,{surefire_SUITE,{tc_ok,g_fail},
{failed,
{surefire_SUITE,init_per_group,
{'EXIT',all_cases_should_be_skipped}}}}},
diff --git a/lib/common_test/test/ct_telnet_SUITE.erl b/lib/common_test/test/ct_telnet_SUITE.erl
index e2ee207754..84e69c2b54 100644
--- a/lib/common_test/test/ct_telnet_SUITE.erl
+++ b/lib/common_test/test/ct_telnet_SUITE.erl
@@ -46,35 +46,60 @@
%% instance, the tests need to be performed on a separate node (or
%% there will be clashes with logging processes etc).
%%--------------------------------------------------------------------
+suite() -> [{ct_hooks,[ts_install_cth]}].
+
+groups() ->
+ [{legacy, [], [unix_telnet,own_server,timetrap]},
+ {raw, [], [unix_telnet,own_server,timetrap]},
+ {html, [], [unix_telnet,own_server]},
+ {silent, [], [unix_telnet,own_server]}].
+
+all() ->
+ [
+ {group,legacy},
+ {group,raw},
+ {group,html},
+ {group,silent}
+ ].
+
+%%--------------------------------------------------------------------
+%% CONFIG FUNCTIONS
+%%--------------------------------------------------------------------
+
init_per_suite(Config) ->
ct_test_support:init_per_suite(Config).
end_per_suite(Config) ->
ct_test_support:end_per_suite(Config).
-init_per_testcase(TestCase, Config) when TestCase=/=unix_telnet->
+init_per_testcase(TestCase, Config) when TestCase /= unix_telnet ->
+ ct:pal("Testcase ~p starting!", [TestCase]),
TS = telnet_server:start([{port,?erl_telnet_server_port},
{users,[{?erl_telnet_server_user,
?erl_telnet_server_pwd}]}]),
ct_test_support:init_per_testcase(TestCase, [{telnet_server,TS}|Config]);
init_per_testcase(TestCase, Config) ->
- ct_test_support:init_per_testcase(TestCase, Config).
+ ct:pal("Testcase ~p starting. Checking connection to telnet server...",
+ [TestCase]),
+ ct:require(testconn, {unix,[telnet]}),
+ case {os:type(),ct_telnet:open(testconn)} of
+ {_,{ok,Handle}} ->
+ ok = ct_telnet:close(Handle),
+ ct:pal("Connection ok, starting tests!", []),
+ ct_test_support:init_per_testcase(TestCase, Config);
+ {{unix,_},{error,Reason}} ->
+ ct:fail("No connection to telnet server! Reason: ~tp", [Reason]);
+ {_,{error,Reason}} ->
+ {skip,{no_access_to_telnet_server,Reason}}
+ end.
+end_per_testcase(TestCase, Config) when TestCase /= unix_telnet ->
+ ct:pal("Stopping the telnet_server now!", []),
+ telnet_server:stop(?config(telnet_server,Config)),
+ ct_test_support:end_per_testcase(TestCase, Config);
end_per_testcase(TestCase, Config) ->
- case ?config(telnet_server,Config) of
- undefined -> ok;
- TS -> telnet_server:stop(TS)
- end,
ct_test_support:end_per_testcase(TestCase, Config).
-suite() -> [{ct_hooks,[ts_install_cth]}].
-
-all() ->
- [
- unix_telnet,
- own_server,
- timetrap
- ].
%%--------------------------------------------------------------------
%% TEST CASES
@@ -82,27 +107,43 @@ all() ->
%%%-----------------------------------------------------------------
%%%
-unix_telnet(Config) when is_list(Config) ->
- all_tests_in_suite(unix_telnet,"ct_telnet_basic_SUITE","telnet.cfg",Config).
+unix_telnet(Config) ->
+ CfgFile = "telnet.unix_telnet." ++
+ atom_to_list(groupname(Config)) ++ ".cfg",
+ all_tests_in_suite(unix_telnet,"ct_telnet_basic_SUITE",CfgFile,Config).
own_server(Config) ->
+ CfgFile = "telnet.own_server." ++
+ atom_to_list(groupname(Config)) ++ ".cfg",
all_tests_in_suite(own_server,"ct_telnet_own_server_SUITE",
- "telnet2.cfg",Config).
+ CfgFile,Config).
timetrap(Config) ->
+ CfgFile = "telnet.timetrap." ++
+ atom_to_list(groupname(Config)) ++ ".cfg",
all_tests_in_suite(timetrap,"ct_telnet_timetrap_SUITE",
- "telnet3.cfg",Config).
+ CfgFile,Config).
%%%-----------------------------------------------------------------
%%% HELP FUNCTIONS
%%%-----------------------------------------------------------------
+groupname(Config) ->
+ case proplists:get_value(tc_group_properties, Config) of
+ undefined ->
+ undefined;
+ TGP ->
+ proplists:get_value(name, TGP)
+ end.
+
all_tests_in_suite(TestCase, SuiteName, CfgFileName, Config) ->
+ PrivDir = ?config(priv_dir, Config),
DataDir = ?config(data_dir, Config),
Suite = filename:join(DataDir, SuiteName),
- CfgFile = filename:join(DataDir, CfgFileName),
- Cfg = telnet_config(TestCase),
- ok = file:write_file(CfgFile, io_lib:write(Cfg) ++ "."),
+ CfgFile = filename:join(PrivDir, CfgFileName),
+ Cfg = telnet_config(TestCase, groupname(Config)),
+ Txt = lists:flatten([lists:flatten(io_lib:write(C))++".\n" || C <- Cfg]),
+ ok = file:write_file(CfgFile, Txt),
{Opts,ERPid} = setup([{suite,Suite},
{label,TestCase},
{config,CfgFile}],
@@ -132,15 +173,47 @@ execute(Name, Opts, ERPid, Config) ->
reformat(Events, EH) ->
ct_test_support:reformat(Events, EH).
-
-telnet_config(unix_telnet) ->
- {unix, ct:get_config(unix)};
-telnet_config(_) ->
- {unix,[{telnet,"localhost"},
- {port, ?erl_telnet_server_port},
- {username,?erl_telnet_server_user},
- {password,?erl_telnet_server_pwd},
- {keep_alive,true}]}.
+telnet_config(_, undefined) ->
+ [];
+telnet_config(unix_telnet, legacy) ->
+ [{unix, ct:get_config(unix)},
+ {ct_conn_log,[]}];
+%% LogType same as GroupName
+telnet_config(unix_telnet, LogType) ->
+ LogTypeTerm = if LogType == raw -> [];
+ true -> [{log_type,LogType}]
+ end,
+ [{unix, ct:get_config(unix)},
+ {ct_conn_log,
+ [{ct_telnet, LogTypeTerm ++
+ [{hosts,[telnet_server_conn1,
+ telnet_server_conn2,
+ telnet_server_conn3,
+ telnet_server_conn4]}]}]}];
+telnet_config(_, LogType) ->
+ LogTypeTerm = if LogType == raw -> [];
+ true -> [{log_type,LogType}]
+ end,
+ [{unix,[{telnet,"localhost"},
+ {port, ?erl_telnet_server_port},
+ {username,?erl_telnet_server_user},
+ {password,?erl_telnet_server_pwd},
+ {keep_alive,true}]},
+ {telnet_settings, [{connect_timeout,10000},
+ {command_timeout,10000},
+ {reconnection_attempts,0},
+ {reconnection_interval,0},
+ {keep_alive,true}]} |
+ if LogType == legacy ->
+ [{ct_conn_log,[]}];
+ true ->
+ [{ct_conn_log,
+ [{ct_telnet, LogTypeTerm ++
+ [{hosts,[telnet_server_conn1,
+ telnet_server_conn2,
+ telnet_server_conn3,
+ telnet_server_conn4]}]}]}]
+ end].
%%%-----------------------------------------------------------------
%%% TEST EVENTS
@@ -159,14 +232,39 @@ events_to_check(timetrap,_Config) ->
all_cases(Suite,Config) ->
{module,_} = code:load_abs(filename:join(?config(data_dir,Config),
Suite)),
- TCs = Suite:all(),
+ GroupsAndTCs = Suite:all(),
+
+ Terms =
+ lists:flatmap(
+ fun({group,G}) ->
+ {value,{G,Props,GTCs}} =
+ lists:keysearch(G,1,Suite:groups()),
+ GTCs1 = [[{?eh,tc_start,{Suite,GTC}},
+ {?eh,tc_done,{Suite,GTC,ok}}] ||
+ GTC <- GTCs],
+ GEvs = [{?eh,tc_start,{Suite,{init_per_group,G,Props}}},
+ {?eh,tc_done,{Suite,{init_per_group,G,Props},ok}} |
+ GTCs1] ++
+ [{?eh,tc_start,{Suite,{end_per_group,G,Props}}},
+ {?eh,tc_done,{Suite,{end_per_group,G,Props},ok}}],
+ case lists:member(parallel, Props) of
+ true -> [{parallel,GEvs}];
+ false -> GEvs
+ end;
+ (TC) ->
+ [{?eh,tc_done,{Suite,TC,ok}}]
+ end, GroupsAndTCs),
+
code:purge(Suite),
code:delete(Suite),
+ FlatTerms = lists:flatten(Terms),
+
+ ct:log("Verifying with terms:~n~p", [FlatTerms]),
+
OneTest =
- [{?eh,start_logging,{'DEF','RUNDIR'}}] ++
- [{?eh,tc_done,{Suite,TC,ok}} || TC <- TCs] ++
- [{?eh,stop_logging,[]}],
+ [{?eh,start_logging,{'DEF','RUNDIR'}} |
+ FlatTerms] ++ [{?eh,stop_logging,[]}],
%% 2 tests (ct:run_test + script_start) is default
OneTest ++ OneTest.
diff --git a/lib/common_test/test/ct_telnet_SUITE_data/ct_telnet_basic_SUITE.erl b/lib/common_test/test/ct_telnet_SUITE_data/ct_telnet_basic_SUITE.erl
index 914b95f9cf..80616af064 100644
--- a/lib/common_test/test/ct_telnet_SUITE_data/ct_telnet_basic_SUITE.erl
+++ b/lib/common_test/test/ct_telnet_SUITE_data/ct_telnet_basic_SUITE.erl
@@ -5,45 +5,101 @@
-include_lib("common_test/include/ct.hrl").
+-define(no_of_sessions, 4).
+-define(conn_name(N), (list_to_atom("telnet_server_conn"++integer_to_list(N)))).
+-define(get_n(Cfg), (proplists:get_value(n, Cfg))).
+
%%--------------------------------------------------------------------
%% TEST SERVER CALLBACK FUNCTIONS
%%--------------------------------------------------------------------
+suite() -> [
+ {require,ct_conn_log},
+ {ct_hooks, [{cth_conn_log,[]}]}
+ ].
+
+operations() ->
+ [start_stop, send_and_get, expect, already_closed,
+ cmd, sendf, close_wrong_type].
+
+mult_case(_Case, 0) ->
+ [];
+mult_case(Case, N) ->
+ [list_to_atom(atom_to_list(Case)++integer_to_list(N)) |
+ mult_case(Case, N-1)].
+
+groups() ->
+ [{single_connection,[],operations()},
+ {multiple_connections,[parallel],
+ lists:reverse(mult_case(sessions,?no_of_sessions))}].
+
+all() ->
+ [{group,single_connection},
+ {group,multiple_connections}].
+
init_per_suite(Config) ->
+ ct:pal("Will use these log hook options: ~p",
+ [ct:get_config(ct_conn_log,[])]),
Config.
end_per_suite(_Config) ->
ok.
+init_per_group(Group, Config) ->
+ if Group == single_connection ->
+ ct:require(?conn_name(1),{unix,[telnet]});
+ true ->
+ ok
+ end,
+ [{n,1} | Config].
-suite() -> [{require,telnet_temp,{unix,[telnet]}}].
+end_per_group(_GroupName, Config) ->
+ Config.
-all() ->
- [start_stop, send_and_get, expect, already_closed,
- cmd, sendf, close_wrong_type].
+init_per_testcase(Case, Config) when (Case == sessions1) or
+ (Case == sessions2) or
+ (Case == sessions3) or
+ (Case == sessions4) ->
+ N = lists:last(atom_to_list(Case))-48,
+ ct:log("Using connection ~w for session ~w on ~w",
+ [?conn_name(N),N,self()]),
+ ct:require(?conn_name(N),{unix,[telnet]}),
+ [{n,N} | proplists:delete(n,Config)];
+init_per_testcase(Case, Config) ->
+ ct:log("Testcase ~w using connection ~w",
+ [Case,?conn_name(?get_n(Config))]),
+ Config.
-groups() ->
- [].
+end_per_testcase(_Case, _) ->
+ ok.
-init_per_group(_GroupName, Config) ->
- Config.
+%%%-----------------------------------------------------------------
+%%% TEST CASES
-end_per_group(_GroupName, Config) ->
- Config.
+sessions(Config) ->
+ [apply(?MODULE,Op,[Config]) || Op <- operations()],
+ ok.
+
+sessions1(Config) -> sessions(Config).
+sessions2(Config) -> sessions(Config).
+sessions3(Config) -> sessions(Config).
+sessions4(Config) -> sessions(Config).
-start_stop(_Config) ->
- {ok, Handle} = ct_telnet:open(telnet_temp),
+start_stop(Config) ->
+ ct:log("Opening ~w...", [?conn_name(?get_n(Config))]),
+ {ok, Handle} = ct_telnet:open(?conn_name(?get_n(Config))),
ok = ct_telnet:close(Handle),
ok.
-send_and_get(_) ->
- {ok, Handle} = ct_telnet:open(telnet_temp),
+
+send_and_get(Config) ->
+ {ok, Handle} = ct_telnet:open(?conn_name(?get_n(Config))),
ok = ct_telnet:send(Handle, "ayt"),
{ok, _Data} = ct_telnet:get_data(Handle),
ok = ct_telnet:close(Handle),
ok.
-expect(_) ->
- {ok, Handle} = ct_telnet:open(telnet_temp),
+expect(Config) ->
+ {ok, Handle} = ct_telnet:open(?conn_name(?get_n(Config))),
ok = ct_telnet:send(Handle, "echo ayt"),
ok = case ct_telnet:expect(Handle, ["ayt"]) of
{ok, _} ->
@@ -54,21 +110,21 @@ expect(_) ->
ok = ct_telnet:close(Handle),
ok.
-already_closed(_) ->
- {ok, Handle} = ct_telnet:open(telnet_temp),
+already_closed(Config) ->
+ {ok, Handle} = ct_telnet:open(?conn_name(?get_n(Config))),
ok = ct_telnet:close(Handle),
{error, already_closed} = ct_telnet:close(Handle),
ok.
-cmd(_) ->
- {ok, Handle} = ct_telnet:open(telnet_temp),
+cmd(Config) ->
+ {ok, Handle} = ct_telnet:open(?conn_name(?get_n(Config))),
{ok, _} = ct_telnet:cmd(Handle, "display"),
{ok, _} = ct_telnet:cmdf(Handle, "~s ~s", ["set", "bsasdel"]),
ok = ct_telnet:close(Handle),
ok.
-sendf(_) ->
- {ok, Handle} = ct_telnet:open(telnet_temp),
+sendf(Config) ->
+ {ok, Handle} = ct_telnet:open(?conn_name(?get_n(Config))),
ok = ct_telnet:sendf(Handle, "~s", ["ayt"]),
ok = ct_telnet:close(Handle),
ok.
@@ -76,3 +132,8 @@ sendf(_) ->
close_wrong_type(_) ->
{error, _} = ct_telnet:close(whatever),
ok.
+
+%%%-----------------------------------------------------------------
+%%% HELP FUNCS
+
+
diff --git a/lib/common_test/test/ct_telnet_SUITE_data/ct_telnet_own_server_SUITE.erl b/lib/common_test/test/ct_telnet_SUITE_data/ct_telnet_own_server_SUITE.erl
index 3f7c0d68bf..c0f79d0f10 100644
--- a/lib/common_test/test/ct_telnet_SUITE_data/ct_telnet_own_server_SUITE.erl
+++ b/lib/common_test/test/ct_telnet_SUITE_data/ct_telnet_own_server_SUITE.erl
@@ -8,21 +8,22 @@
%% TEST SERVER CALLBACK FUNCTIONS
%%--------------------------------------------------------------------
-init_per_suite(Config) ->
- Config.
-
-end_per_suite(_Config) ->
- ok.
-
-
-suite() -> [{require,erl_telnet_server,{unix,[telnet]}}].
+suite() ->
+ [
+ {require,telnet_server_conn1,{unix,[telnet]}},
+ {require,ct_conn_log},
+ {ct_hooks, [{cth_conn_log,[]}]}
+ ].
all() ->
- [expect,
+ [
+ expect,
expect_repeat,
expect_sequence,
expect_error_prompt,
- expect_error_timeout,
+ expect_error_timeout1,
+ expect_error_timeout2,
+ expect_error_timeout3,
no_prompt_check,
no_prompt_check_repeat,
no_prompt_check_sequence,
@@ -30,11 +31,23 @@ all() ->
ignore_prompt,
ignore_prompt_repeat,
ignore_prompt_sequence,
- ignore_prompt_timeout].
+ ignore_prompt_timeout,
+ large_string,
+ server_speaks,
+ server_disconnects
+ ].
groups() ->
[].
+init_per_suite(Config) ->
+ ct:pal("Will use these log hook options: ~p",
+ [ct:get_config(ct_conn_log,[])]),
+ Config.
+
+end_per_suite(_Config) ->
+ ok.
+
init_per_group(_GroupName, Config) ->
Config.
@@ -43,7 +56,7 @@ end_per_group(_GroupName, Config) ->
%% Simple expect
expect(_) ->
- {ok, Handle} = ct_telnet:open(erl_telnet_server),
+ {ok, Handle} = ct_telnet:open(telnet_server_conn1),
ok = ct_telnet:send(Handle, "echo ayt"),
{ok,["ayt"]} = ct_telnet:expect(Handle, ["ayt"]),
ok = ct_telnet:close(Handle),
@@ -51,7 +64,7 @@ expect(_) ->
%% Expect with repeat option
expect_repeat(_) ->
- {ok, Handle} = ct_telnet:open(erl_telnet_server),
+ {ok, Handle} = ct_telnet:open(telnet_server_conn1),
ok = ct_telnet:send(Handle, "echo_ml xy xy"),
{ok,[["xy"],["xy"]],done} = ct_telnet:expect(Handle, ["xy"],[{repeat,2}]),
ok = ct_telnet:close(Handle),
@@ -59,7 +72,7 @@ expect_repeat(_) ->
%% Expect with sequence option
expect_sequence(_) ->
- {ok, Handle} = ct_telnet:open(erl_telnet_server),
+ {ok, Handle} = ct_telnet:open(telnet_server_conn1),
ok = ct_telnet:send(Handle, "echo_ml ab cd ef"),
{ok,[["ab"],["cd"],["ef"]]} = ct_telnet:expect(Handle,
[["ab"],["cd"],["ef"]],
@@ -70,7 +83,7 @@ expect_sequence(_) ->
%% Check that expect returns when a prompt is found, even if pattern
%% is not matched.
expect_error_prompt(_) ->
- {ok, Handle} = ct_telnet:open(erl_telnet_server),
+ {ok, Handle} = ct_telnet:open(telnet_server_conn1),
ok = ct_telnet:send(Handle, "echo xxx> yyy"),
{error,{prompt,"> "}} = ct_telnet:expect(Handle, ["yyy"]),
ok = ct_telnet:close(Handle),
@@ -79,17 +92,38 @@ expect_error_prompt(_) ->
%% Check that expect returns after idle timeout, and even if the
%% expected pattern is received - as long as not newline or prompt is
%% received it will not match.
-expect_error_timeout(_) ->
- {ok, Handle} = ct_telnet:open(erl_telnet_server),
+expect_error_timeout1(_) ->
+ {ok, Handle} = ct_telnet:open(telnet_server_conn1),
ok = ct_telnet:send(Handle, "echo_no_prompt xxx"),
{error,timeout} = ct_telnet:expect(Handle, ["xxx"], [{timeout,1000}]),
ok = ct_telnet:close(Handle),
ok.
+expect_error_timeout2(_) ->
+ {ok, Handle} = ct_telnet:open(telnet_server_conn1),
+ ok = ct_telnet:send(Handle, "echo_no_prompt xxx"),
+ {error,timeout} = ct_telnet:expect(Handle, ["xxx"], [{idle_timeout,1000},
+ {total_timeout,infinity}]),
+ ok = ct_telnet:close(Handle),
+ ok.
+
+%% Check that if server loops and pattern not matching, the operation
+%% can be aborted
+expect_error_timeout3(_) ->
+ {ok, Handle} = ct_telnet:open(telnet_server_conn1),
+ ok = ct_telnet:send(Handle, "echo_loop 5000 xxx"),
+ {error,timeout} = ct_telnet:expect(Handle, ["yyy"],
+ [{idle_timeout,infinity},
+ {total_timeout,3000}]),
+ ok = ct_telnet:send(Handle, "echo ayt"),
+ {ok,["ayt"]} = ct_telnet:expect(Handle, ["ayt"]),
+ ok = ct_telnet:close(Handle),
+ ok.
+
%% expect with ignore_prompt option should not return even if a prompt
%% is found. The pattern after the prompt (here "> ") can be matched.
ignore_prompt(_) ->
- {ok, Handle} = ct_telnet:open(erl_telnet_server),
+ {ok, Handle} = ct_telnet:open(telnet_server_conn1),
ok = ct_telnet:send(Handle, "echo xxx> yyy"),
{ok,["yyy"]} = ct_telnet:expect(Handle, ["yyy"], [ignore_prompt]),
ok = ct_telnet:close(Handle),
@@ -97,7 +131,7 @@ ignore_prompt(_) ->
%% expect with ignore_prompt and repeat options.
ignore_prompt_repeat(_) ->
- {ok, Handle} = ct_telnet:open(erl_telnet_server),
+ {ok, Handle} = ct_telnet:open(telnet_server_conn1),
ok = ct_telnet:send(Handle, "echo_ml yyy> yyy>"),
{ok,[["yyy"],["yyy"]],done} = ct_telnet:expect(Handle, ["yyy"],
[{repeat,2},
@@ -107,7 +141,7 @@ ignore_prompt_repeat(_) ->
%% expect with ignore_prompt and sequence options.
ignore_prompt_sequence(_) ->
- {ok, Handle} = ct_telnet:open(erl_telnet_server),
+ {ok, Handle} = ct_telnet:open(telnet_server_conn1),
ok = ct_telnet:send(Handle, "echo_ml xxx> yyy> zzz> "),
{ok,[["xxx"],["yyy"],["zzz"]]} = ct_telnet:expect(Handle,
[["xxx"],["yyy"],["zzz"]],
@@ -121,7 +155,7 @@ ignore_prompt_sequence(_) ->
%% As for expect without the ignore_prompt option, it a newline or a
%% prompt is required in order for the pattern to match.
ignore_prompt_timeout(_) ->
- {ok, Handle} = ct_telnet:open(erl_telnet_server),
+ {ok, Handle} = ct_telnet:open(telnet_server_conn1),
ok = ct_telnet:send(Handle, "echo xxx"),
{error,timeout} = ct_telnet:expect(Handle, ["yyy"], [ignore_prompt,
{timeout,1000}]),
@@ -140,7 +174,7 @@ ignore_prompt_timeout(_) ->
%% no_prompt_check option shall match pattern both when prompt is sent
%% and when it is not.
no_prompt_check(_) ->
- {ok, Handle} = ct_telnet:open(erl_telnet_server),
+ {ok, Handle} = ct_telnet:open(telnet_server_conn1),
ok = ct_telnet:send(Handle, "echo xxx"),
{ok,["xxx"]} = ct_telnet:expect(Handle, ["xxx"], [no_prompt_check]),
ok = ct_telnet:send(Handle, "echo_no_prompt yyy"),
@@ -150,7 +184,7 @@ no_prompt_check(_) ->
%% no_prompt_check and repeat options
no_prompt_check_repeat(_) ->
- {ok, Handle} = ct_telnet:open(erl_telnet_server),
+ {ok, Handle} = ct_telnet:open(telnet_server_conn1),
ok = ct_telnet:send(Handle, "echo_ml xxx xxx"),
{ok,[["xxx"],["xxx"]],done} = ct_telnet:expect(Handle,["xxx"],
[{repeat,2},
@@ -164,7 +198,7 @@ no_prompt_check_repeat(_) ->
%% no_prompt_check and sequence options
no_prompt_check_sequence(_) ->
- {ok, Handle} = ct_telnet:open(erl_telnet_server),
+ {ok, Handle} = ct_telnet:open(telnet_server_conn1),
ok = ct_telnet:send(Handle, "echo_ml_no_prompt ab cd ef"),
{ok,[["ab"],["cd"],["ef"]]} = ct_telnet:expect(Handle,
[["ab"],["cd"],["ef"]],
@@ -176,9 +210,78 @@ no_prompt_check_sequence(_) ->
%% Check that expect returns after idle timeout when no_prompt_check
%% option is used.
no_prompt_check_timeout(_) ->
- {ok, Handle} = ct_telnet:open(erl_telnet_server),
+ {ok, Handle} = ct_telnet:open(telnet_server_conn1),
ok = ct_telnet:send(Handle, "echo xxx"),
{error,timeout} = ct_telnet:expect(Handle, ["yyy"], [no_prompt_check,
{timeout,1000}]),
ok = ct_telnet:close(Handle),
ok.
+
+%% Check that it's possible to receive multiple chunks of data sent from
+%% the server with one get_data call
+large_string(_) ->
+ {ok, Handle} = ct_telnet:open(telnet_server_conn1),
+ String = "abcd efgh ijkl mnop qrst uvwx yz ",
+ BigString = lists:flatmap(fun(S) -> S end,
+ [String || _ <- lists:seq(1,10)]),
+ VerifyStr = [C || C <- BigString, C/=$ ],
+
+ {ok,Data} = ct_telnet:cmd(Handle, "echo_sep "++BigString),
+ ct:log("[CMD] Received ~w chars: ~s", [length(lists:flatten(Data)),Data]),
+ VerifyStr = [C || C <- lists:flatten(Data), C/=$ , C/=$\r, C/=$\n, C/=$>],
+
+ %% Test #1: With a long sleep value, all data gets gets buffered and
+ %% ct_telnet can receive it with one single request to ct_telnet_client.
+ %% Test #2: With a short sleep value, ct_telnet needs multiple calls to
+ %% ct_telnet_client to collect the data. This iterative operation should
+ %% yield the same result as the single request case.
+
+ ok = ct_telnet:send(Handle, "echo_sep "++BigString),
+ timer:sleep(1000),
+ {ok,Data1} = ct_telnet:get_data(Handle),
+ ct:log("[GET DATA #1] Received ~w chars: ~s",
+ [length(lists:flatten(Data1)),Data1]),
+ VerifyStr = [C || C <- lists:flatten(Data1), C/=$ , C/=$\r, C/=$\n, C/=$>],
+
+ ok = ct_telnet:send(Handle, "echo_sep "++BigString),
+ timer:sleep(50),
+ {ok,Data2} = ct_telnet:get_data(Handle),
+ ct:log("[GET DATA #2] Received ~w chars: ~s", [length(lists:flatten(Data2)),Data2]),
+ VerifyStr = [C || C <- lists:flatten(Data2), C/=$ , C/=$\r, C/=$\n, C/=$>],
+
+ ok = ct_telnet:close(Handle),
+ ok.
+
+%% The server says things. Manually check that it gets printed correctly
+%% in the general IO log.
+server_speaks(_) ->
+ {ok, Handle} = ct_telnet:open(telnet_server_conn1),
+ ok = ct_telnet:send(Handle, "echo_no_prompt This is the first message\r\n"),
+ ok = ct_telnet:send(Handle, "echo_no_prompt This is the second message\r\n"),
+ %% let ct_telnet_client get an idle timeout
+ timer:sleep(15000),
+ ok = ct_telnet:send(Handle, "echo_no_prompt This is the third message\r\n"),
+ {ok,_} = ct_telnet:expect(Handle, ["the"], [no_prompt_check]),
+ {error,timeout} = ct_telnet:expect(Handle, ["the"], [no_prompt_check,
+ {timeout,1000}]),
+ ok = ct_telnet:send(Handle, "echo_no_prompt This is the fourth message\r\n"),
+ %% give the server time to respond
+ timer:sleep(2000),
+ %% closing the connection should print last message in log
+ ok = ct_telnet:close(Handle),
+ ok.
+
+%% Let the server close the connection. Make sure buffered data gets printed
+%% to the general IO log.
+server_disconnects(_) ->
+ {ok, Handle} = ct_telnet:open(telnet_server_conn1),
+ ok = ct_telnet:send(Handle, "disconnect_after 1500"),
+ %% wait until the get_data operation (triggered by send/2) times out
+ %% before sending the msg
+ timer:sleep(500),
+ ok = ct_telnet:send(Handle, "echo_no_prompt This is the message\r\n"),
+ %% when the server closes the connection, the last message should be
+ %% printed in the log
+ timer:sleep(3000),
+ _ = ct_telnet:close(Handle),
+ ok.
diff --git a/lib/common_test/test/ct_telnet_SUITE_data/ct_telnet_timetrap_SUITE.erl b/lib/common_test/test/ct_telnet_SUITE_data/ct_telnet_timetrap_SUITE.erl
index f274fb9112..c45a4f0984 100644
--- a/lib/common_test/test/ct_telnet_SUITE_data/ct_telnet_timetrap_SUITE.erl
+++ b/lib/common_test/test/ct_telnet_SUITE_data/ct_telnet_timetrap_SUITE.erl
@@ -4,7 +4,7 @@
-include_lib("common_test/include/ct.hrl").
--define(name,erl_telnet_server).
+-define(name, telnet_server_conn1).
%%--------------------------------------------------------------------
%% TEST SERVER CALLBACK FUNCTIONS
@@ -17,6 +17,8 @@ end_per_suite(_Config) ->
ok.
suite() -> [{require,?name,{unix,[telnet]}},
+ {require,ct_conn_log},
+ {ct_hooks, [{cth_conn_log,[]}]},
{timetrap,{seconds,7}}].
all() ->
diff --git a/lib/common_test/test/ct_test_server_if_1_SUITE.erl b/lib/common_test/test/ct_test_server_if_1_SUITE.erl
index 9882fa980c..b6ef3062d4 100644
--- a/lib/common_test/test/ct_test_server_if_1_SUITE.erl
+++ b/lib/common_test/test/ct_test_server_if_1_SUITE.erl
@@ -168,7 +168,7 @@ test_events(ts_if_1) ->
{?eh,tc_start,{ts_if_1_SUITE,tc4}},
{?eh,tc_done,{ts_if_1_SUITE,tc4,{failed,{error,failed_on_purpose}}}},
{?eh,test_stats,{1,3,{0,2}}},
- {?eh,tc_auto_skip,{ts_if_1_SUITE,tc5,{failed,{ts_if_1_SUITE,tc4}}}},
+ {?eh,tc_auto_skip,{ts_if_1_SUITE,{tc5,seq2},{failed,{ts_if_1_SUITE,tc4}}}},
{?eh,test_stats,{1,3,{0,3}}},
{?eh,tc_start,{ts_if_1_SUITE,{end_per_group,seq2,[sequence]}}},
{?eh,tc_done,{ts_if_1_SUITE,{end_per_group,seq2,[sequence]},ok}}],
@@ -199,7 +199,7 @@ test_events(ts_if_1) ->
[{?eh,tc_start,{ts_if_1_SUITE,{init_per_group,g1,[]}}},
{?eh,tc_done,{ts_if_1_SUITE,{init_per_group,g1,[]},
{skipped,g1_got_skipped}}},
- {?eh,tc_user_skip,{ts_if_1_SUITE,gtc1,g1_got_skipped}},
+ {?eh,tc_user_skip,{ts_if_1_SUITE,{gtc1,g1},g1_got_skipped}},
{?eh,test_stats,{1,4,{3,6}}},
{?eh,tc_user_skip,{ts_if_1_SUITE,{end_per_group,g1},g1_got_skipped}}],
@@ -208,7 +208,7 @@ test_events(ts_if_1) ->
{?eh,tc_done,{ts_if_1_SUITE,{init_per_group,g2,[parallel]},ok}},
[{?eh,tc_start,{ts_if_1_SUITE,{init_per_group,g3,[]}}},
{?eh,tc_done,{ts_if_1_SUITE,{init_per_group,g3,[]},{skipped,g3_got_skipped}}},
- {?eh,tc_user_skip,{ts_if_1_SUITE,gtc2,g3_got_skipped}},
+ {?eh,tc_user_skip,{ts_if_1_SUITE,{gtc2,g3},g3_got_skipped}},
{?eh,test_stats,{1,4,{4,6}}},
{?eh,tc_user_skip,{ts_if_1_SUITE,{end_per_group,g3},g3_got_skipped}}],
{?eh,tc_start,{ts_if_1_SUITE,{end_per_group,g2,[parallel]}}},
@@ -279,7 +279,7 @@ test_events(ts_if_1) ->
{init_per_group,g1,[]},
{auto_skipped,{group0_failed,bad_return_value}}}},
{?eh,tc_auto_skip,
- {ts_if_7_SUITE,tc2,{group0_failed,bad_return_value}}},
+ {ts_if_7_SUITE,{tc2,g1},{group0_failed,bad_return_value}}},
{?eh,test_stats,{2,7,{4,11}}},
{?eh,tc_auto_skip,
{ts_if_7_SUITE,{end_per_group,g1},{group0_failed,bad_return_value}}},
diff --git a/lib/common_test/test/ct_test_support.erl b/lib/common_test/test/ct_test_support.erl
index 772274ce7e..2e2b45d59f 100644
--- a/lib/common_test/test/ct_test_support.erl
+++ b/lib/common_test/test/ct_test_support.erl
@@ -40,6 +40,8 @@
-export([ct_test_halt/1, ct_rpc/2]).
+-export([random_error/1]).
+
-include_lib("kernel/include/file.hrl").
%%%-----------------------------------------------------------------
@@ -110,7 +112,6 @@ start_slave(NodeName, Config, Level) ->
_ ->
ok
end,
-
TraceFile = filename:join(DataDir, "ct.trace"),
case file:read_file_info(TraceFile) of
{ok,_} ->
@@ -395,6 +396,55 @@ ct_rpc({M,F,A}, Config) ->
%%%-----------------------------------------------------------------
+%%% random_error/1
+random_error(Config) when is_list(Config) ->
+ random:seed(now()),
+ Gen = fun(0,_) -> ok; (N,Fun) -> Fun(N-1, Fun) end,
+ Gen(random:uniform(100), Gen),
+
+ ErrorTypes = ['BADMATCH','BADARG','CASE_CLAUSE','FUNCTION_CLAUSE',
+ 'EXIT','THROW','UNDEF'],
+ Type = lists:nth(random:uniform(length(ErrorTypes)), ErrorTypes),
+ Where = case random:uniform(2) of
+ 1 ->
+ io:format("ct_test_support *returning* error of type ~w",
+ [Type]),
+ tc;
+ 2 ->
+ io:format("ct_test_support *generating* error of type ~w",
+ [Type]),
+ lib
+ end,
+ ErrorFun =
+ fun() ->
+ case Type of
+ 'BADMATCH' ->
+ ok = proplists:get_value(undefined, Config);
+ 'BADARG' ->
+ size(proplists:get_value(priv_dir, Config));
+ 'FUNCTION_CLAUSE' ->
+ random_error(x);
+ 'EXIT' ->
+ spawn_link(fun() ->
+ undef_proc ! hello,
+ ok
+ end);
+ 'THROW' ->
+ PrivDir = proplists:get_value(priv_dir, Config),
+ if is_list(PrivDir) -> throw(generated_throw) end;
+ 'UNDEF' ->
+ apply(?MODULE, random_error, [])
+ end
+ end,
+ %% either call the fun here or return it to the caller (to be
+ %% executed in a test case instead)
+ case Where of
+ tc -> ErrorFun;
+ lib -> ErrorFun()
+ end.
+
+
+%%%-----------------------------------------------------------------
%%% EVENT HANDLING
handle_event(EH, Event) ->
diff --git a/lib/common_test/test/ct_testspec_1_SUITE.erl b/lib/common_test/test/ct_testspec_1_SUITE.erl
index 187b5e6d3a..c2670316b6 100644
--- a/lib/common_test/test/ct_testspec_1_SUITE.erl
+++ b/lib/common_test/test/ct_testspec_1_SUITE.erl
@@ -763,35 +763,35 @@ test_events(skip_all_groups) ->
{?eh,start_info,{1,1,12}},
{?eh,tc_start,{groups_11_SUITE,init_per_suite}},
{?eh,tc_user_skip,{groups_11_SUITE,{init_per_group,test_group_1a},"SKIPPED!"}},
- {?eh,tc_user_skip,{groups_11_SUITE,testcase_1a,"SKIPPED!"}},
+ {?eh,tc_user_skip,{groups_11_SUITE,{testcase_1a,test_group_1a},"SKIPPED!"}},
{?eh,test_stats,{0,0,{1,0}}},
- {?eh,tc_user_skip,{groups_11_SUITE,testcase_1b,"SKIPPED!"}},
+ {?eh,tc_user_skip,{groups_11_SUITE,{testcase_1b,test_group_1a},"SKIPPED!"}},
{?eh,test_stats,{0,0,{2,0}}},
{?eh,tc_user_skip,{groups_11_SUITE,{end_per_group,test_group_1a},"SKIPPED!"}},
{?eh,tc_user_skip,{groups_11_SUITE,{init_per_group,test_group_1b},"SKIPPED!"}},
- {?eh,tc_user_skip,{groups_11_SUITE,testcase_1a,"SKIPPED!"}},
+ {?eh,tc_user_skip,{groups_11_SUITE,{testcase_1a,test_group_1b},"SKIPPED!"}},
{?eh,test_stats,{0,0,{3,0}}},
- {?eh,tc_user_skip,{groups_11_SUITE,testcase_1b,"SKIPPED!"}},
+ {?eh,tc_user_skip,{groups_11_SUITE,{testcase_1b,test_group_1b},"SKIPPED!"}},
{?eh,test_stats,{0,0,{4,0}}},
{?eh,tc_user_skip,{groups_11_SUITE,{end_per_group,test_group_1b},"SKIPPED!"}},
{?eh,tc_user_skip,{groups_11_SUITE,{init_per_group,test_group_2},"SKIPPED!"}},
- {?eh,tc_user_skip,{groups_11_SUITE,testcase_2a,"SKIPPED!"}},
+ {?eh,tc_user_skip,{groups_11_SUITE,{testcase_2a,test_group_2},"SKIPPED!"}},
{?eh,test_stats,{0,0,{5,0}}},
- {?eh,tc_user_skip,{groups_11_SUITE,testcase_3a,"SKIPPED!"}},
+ {?eh,tc_user_skip,{groups_11_SUITE,{testcase_3a,test_group_3},"SKIPPED!"}},
{?eh,test_stats,{0,0,{6,0}}},
- {?eh,tc_user_skip,{groups_11_SUITE,testcase_3b,"SKIPPED!"}},
+ {?eh,tc_user_skip,{groups_11_SUITE,{testcase_3b,test_group_3},"SKIPPED!"}},
{?eh,test_stats,{0,0,{7,0}}},
- {?eh,tc_user_skip,{groups_11_SUITE,testcase_2b,"SKIPPED!"}},
+ {?eh,tc_user_skip,{groups_11_SUITE,{testcase_2b,test_group_2},"SKIPPED!"}},
{?eh,test_stats,{0,0,{8,0}}},
{?eh,tc_user_skip,{groups_11_SUITE,{end_per_group,test_group_2},"SKIPPED!"}},
{?eh,tc_user_skip,{groups_11_SUITE,{init_per_group,test_group_4},"SKIPPED!"}},
- {?eh,tc_user_skip,{groups_11_SUITE,testcase_5a,"SKIPPED!"}},
+ {?eh,tc_user_skip,{groups_11_SUITE,{testcase_5a,test_group_5},"SKIPPED!"}},
{?eh,test_stats,{0,0,{9,0}}},
- {?eh,tc_user_skip,{groups_11_SUITE,testcase_7a,"SKIPPED!"}},
+ {?eh,tc_user_skip,{groups_11_SUITE,{testcase_7a,test_group_7},"SKIPPED!"}},
{?eh,test_stats,{0,0,{10,0}}},
- {?eh,tc_user_skip,{groups_11_SUITE,testcase_7b,"SKIPPED!"}},
+ {?eh,tc_user_skip,{groups_11_SUITE,{testcase_7b,test_group_7},"SKIPPED!"}},
{?eh,test_stats,{0,0,{11,0}}},
- {?eh,tc_user_skip,{groups_11_SUITE,testcase_5b,"SKIPPED!"}},
+ {?eh,tc_user_skip,{groups_11_SUITE,{testcase_5b,test_group_5},"SKIPPED!"}},
{?eh,test_stats,{0,0,{12,0}}},
{?eh,tc_user_skip,{groups_11_SUITE,{end_per_group,test_group_4},"SKIPPED!"}},
{?eh,tc_start,{groups_11_SUITE,end_per_suite}},
@@ -826,17 +826,17 @@ test_events(skip_group) ->
{?eh,tc_done,{groups_11_SUITE,{end_per_group,test_group_1a,[]},ok}}],
{?eh,tc_user_skip,{groups_11_SUITE,{init_per_group,test_group_1b},
"SKIPPED!"}},
- {?eh,tc_user_skip,{groups_11_SUITE,testcase_1a,"SKIPPED!"}},
- {?eh,tc_user_skip,{groups_11_SUITE,testcase_1b,"SKIPPED!"}},
+ {?eh,tc_user_skip,{groups_11_SUITE,{testcase_1a,test_group_1b},"SKIPPED!"}},
+ {?eh,tc_user_skip,{groups_11_SUITE,{testcase_1b,test_group_1b},"SKIPPED!"}},
{?eh,test_stats,{2,0,{2,0}}},
{?eh,tc_user_skip,{groups_11_SUITE,{end_per_group,test_group_1b},
"SKIPPED!"}},
{?eh,tc_user_skip,{groups_11_SUITE,{init_per_group,test_group_2},
"SKIPPED!"}},
- {?eh,tc_user_skip,{groups_11_SUITE,testcase_2a,"SKIPPED!"}},
- {?eh,tc_user_skip,{groups_11_SUITE,testcase_3a,"SKIPPED!"}},
- {?eh,tc_user_skip,{groups_11_SUITE,testcase_3b,"SKIPPED!"}},
- {?eh,tc_user_skip,{groups_11_SUITE,testcase_2b,"SKIPPED!"}},
+ {?eh,tc_user_skip,{groups_11_SUITE,{testcase_2a,test_group_2},"SKIPPED!"}},
+ {?eh,tc_user_skip,{groups_11_SUITE,{testcase_3a,test_group_3},"SKIPPED!"}},
+ {?eh,tc_user_skip,{groups_11_SUITE,{testcase_3b,test_group_3},"SKIPPED!"}},
+ {?eh,tc_user_skip,{groups_11_SUITE,{testcase_2b,test_group_2},"SKIPPED!"}},
{?eh,test_stats,{2,0,{6,0}}},
{?eh,tc_user_skip,{groups_11_SUITE,{end_per_group,test_group_2},
"SKIPPED!"}},
@@ -864,15 +864,15 @@ test_events(skip_group_all_testcases) ->
{?eh,tc_start,{groups_11_SUITE,init_per_suite}},
{?eh,tc_user_skip,{groups_11_SUITE,{init_per_group,test_group_1a},
"SKIPPED!"}},
- {?eh,tc_user_skip,{groups_11_SUITE,testcase_1a,"SKIPPED!"}},
- {?eh,tc_user_skip,{groups_11_SUITE,testcase_1b,"SKIPPED!"}},
+ {?eh,tc_user_skip,{groups_11_SUITE,{testcase_1a,test_group_1a},"SKIPPED!"}},
+ {?eh,tc_user_skip,{groups_11_SUITE,{testcase_1b,test_group_1a},"SKIPPED!"}},
{?eh,test_stats,{0,0,{2,0}}},
{?eh,tc_user_skip,{groups_11_SUITE,{end_per_group,test_group_1a},
"SKIPPED!"}},
{?eh,tc_user_skip,{groups_11_SUITE,{init_per_group,test_group_1b},
"SKIPPED!"}},
- {?eh,tc_user_skip,{groups_11_SUITE,testcase_1a,"SKIPPED!"}},
- {?eh,tc_user_skip,{groups_11_SUITE,testcase_1b,"SKIPPED!"}},
+ {?eh,tc_user_skip,{groups_11_SUITE,{testcase_1a,test_group_1b},"SKIPPED!"}},
+ {?eh,tc_user_skip,{groups_11_SUITE,{testcase_1b,test_group_1b},"SKIPPED!"}},
{?eh,test_stats,{0,0,{4,0}}},
{?eh,tc_user_skip,{groups_11_SUITE,{end_per_group,test_group_1b},
"SKIPPED!"}},
@@ -901,13 +901,13 @@ test_events(skip_group_testcase) ->
{?eh,tc_start,{groups_11_SUITE,{init_per_group,test_group_1a,[]}}},
{?eh,tc_start,{groups_11_SUITE,testcase_1a}},
- {?eh,tc_user_skip,{groups_11_SUITE,testcase_1b,"SKIPPED!"}},
+ {?eh,tc_user_skip,{groups_11_SUITE,{testcase_1b,test_group_1a},"SKIPPED!"}},
{?eh,test_stats,{1,0,{1,0}}},
{?eh,tc_done,{groups_11_SUITE,{end_per_group,test_group_1a,[]},'_'}},
{?eh,tc_start,{groups_11_SUITE,{init_per_group,test_group_1b,[]}}},
{?eh,tc_start,{groups_11_SUITE,testcase_1b}},
- {?eh,tc_user_skip,{groups_11_SUITE,testcase_1a,"SKIPPED!"}},
+ {?eh,tc_user_skip,{groups_11_SUITE,{testcase_1a,test_group_1b},"SKIPPED!"}},
{?eh,test_stats,{2,0,{2,0}}},
{?eh,tc_done,{groups_11_SUITE,{end_per_group,test_group_1b,[]},'_'}},
@@ -1045,8 +1045,8 @@ test_events(skip_subgroup) ->
{?eh,tc_user_skip,{groups_12_SUITE,
{init_per_group,test_group_8},"SKIPPED!"}},
- {?eh,tc_user_skip,{groups_12_SUITE,testcase_8a,"SKIPPED!"}},
- {?eh,tc_user_skip,{groups_12_SUITE,testcase_8b,"SKIPPED!"}},
+ {?eh,tc_user_skip,{groups_12_SUITE,{testcase_8a,test_group_8},"SKIPPED!"}},
+ {?eh,tc_user_skip,{groups_12_SUITE,{testcase_8b,test_group_8},"SKIPPED!"}},
{?eh,tc_user_skip,{groups_12_SUITE,
{end_per_group,test_group_8},"SKIPPED!"}},
@@ -1146,12 +1146,12 @@ test_events(skip_subgroup_all_testcases) ->
{?eh,tc_done,{groups_12_SUITE,{init_per_group,test_group_4,[]},ok}},
{?eh,tc_user_skip,{groups_12_SUITE,
{init_per_group,test_group_5},"SKIPPED!"}},
- {?eh,tc_user_skip,{groups_12_SUITE,testcase_5a,"SKIPPED!"}},
- {?eh,tc_user_skip,{groups_12_SUITE,testcase_7a,"SKIPPED!"}},
- {?eh,tc_user_skip,{groups_12_SUITE,testcase_7b,"SKIPPED!"}},
- {?eh,tc_user_skip,{groups_12_SUITE,testcase_8a,"SKIPPED!"}},
- {?eh,tc_user_skip,{groups_12_SUITE,testcase_8b,"SKIPPED!"}},
- {?eh,tc_user_skip,{groups_12_SUITE,testcase_5b,"SKIPPED!"}},
+ {?eh,tc_user_skip,{groups_12_SUITE,{testcase_5a,test_group_5},"SKIPPED!"}},
+ {?eh,tc_user_skip,{groups_12_SUITE,{testcase_7a,test_group_7},"SKIPPED!"}},
+ {?eh,tc_user_skip,{groups_12_SUITE,{testcase_7b,test_group_7},"SKIPPED!"}},
+ {?eh,tc_user_skip,{groups_12_SUITE,{testcase_8a,test_group_8},"SKIPPED!"}},
+ {?eh,tc_user_skip,{groups_12_SUITE,{testcase_8b,test_group_8},"SKIPPED!"}},
+ {?eh,tc_user_skip,{groups_12_SUITE,{testcase_5b,test_group_5},"SKIPPED!"}},
{?eh,test_stats,{0,0,{6,0}}},
{?eh,tc_user_skip,{groups_12_SUITE,
{end_per_group,test_group_5},"SKIPPED!"}},
@@ -1240,9 +1240,9 @@ test_events(skip_subgroup_testcase) ->
{?eh,tc_done,
{groups_12_SUITE,{init_per_group,test_group_6,[parallel]},ok}},
[{?eh,tc_start,{groups_12_SUITE,{init_per_group,test_group_7,'_'}}},
- {?eh,tc_user_skip, {groups_12_SUITE,testcase_7a,"SKIPPED!"}},
+ {?eh,tc_user_skip,{groups_12_SUITE,{testcase_7a,test_group_7},"SKIPPED!"}},
{?eh,test_stats,{1,0,{1,0}}},
- {?eh,tc_user_skip, {groups_12_SUITE,testcase_7b,"SKIPPED!"}},
+ {?eh,tc_user_skip, {groups_12_SUITE,{testcase_7b,test_group_7},"SKIPPED!"}},
{?eh,test_stats,{1,0,{2,0}}},
{?eh,tc_start,{groups_12_SUITE,{end_per_group,test_group_7,'_'}}}],
{shuffle,
@@ -1281,22 +1281,22 @@ test_events(sub_skipped_by_top) ->
{?eh,tc_start,{groups_12_SUITE,init_per_suite}},
{?eh,tc_user_skip,{groups_12_SUITE,{init_per_group,test_group_4},
"SKIPPED!"}},
- {?eh,tc_user_skip,{groups_12_SUITE,testcase_5a,"SKIPPED!"}},
- {?eh,tc_user_skip,{groups_12_SUITE,testcase_7a,"SKIPPED!"}},
- {?eh,tc_user_skip,{groups_12_SUITE,testcase_7b,"SKIPPED!"}},
- {?eh,tc_user_skip,{groups_12_SUITE,testcase_8a,"SKIPPED!"}},
- {?eh,tc_user_skip,{groups_12_SUITE,testcase_8b,"SKIPPED!"}},
- {?eh,tc_user_skip,{groups_12_SUITE,testcase_5b,"SKIPPED!"}},
+ {?eh,tc_user_skip,{groups_12_SUITE,{testcase_5a,test_group_5},"SKIPPED!"}},
+ {?eh,tc_user_skip,{groups_12_SUITE,{testcase_7a,test_group_7},"SKIPPED!"}},
+ {?eh,tc_user_skip,{groups_12_SUITE,{testcase_7b,test_group_7},"SKIPPED!"}},
+ {?eh,tc_user_skip,{groups_12_SUITE,{testcase_8a,test_group_8},"SKIPPED!"}},
+ {?eh,tc_user_skip,{groups_12_SUITE,{testcase_8b,test_group_8},"SKIPPED!"}},
+ {?eh,tc_user_skip,{groups_12_SUITE,{testcase_5b,test_group_5},"SKIPPED!"}},
{?eh,tc_user_skip,{groups_12_SUITE,
{end_per_group,test_group_4},"SKIPPED!"}},
{?eh,tc_user_skip,{groups_12_SUITE,
{init_per_group,test_group_4},"SKIPPED!"}},
- {?eh,tc_user_skip,{groups_12_SUITE,testcase_5a,"SKIPPED!"}},
- {?eh,tc_user_skip,{groups_12_SUITE,testcase_7a,"SKIPPED!"}},
- {?eh,tc_user_skip,{groups_12_SUITE,testcase_7b,"SKIPPED!"}},
- {?eh,tc_user_skip,{groups_12_SUITE,testcase_8a,"SKIPPED!"}},
- {?eh,tc_user_skip,{groups_12_SUITE,testcase_8b,"SKIPPED!"}},
- {?eh,tc_user_skip,{groups_12_SUITE,testcase_5b,"SKIPPED!"}},
+ {?eh,tc_user_skip,{groups_12_SUITE,{testcase_5a,test_group_5},"SKIPPED!"}},
+ {?eh,tc_user_skip,{groups_12_SUITE,{testcase_7a,test_group_7},"SKIPPED!"}},
+ {?eh,tc_user_skip,{groups_12_SUITE,{testcase_7b,test_group_7},"SKIPPED!"}},
+ {?eh,tc_user_skip,{groups_12_SUITE,{testcase_8a,test_group_8},"SKIPPED!"}},
+ {?eh,tc_user_skip,{groups_12_SUITE,{testcase_8b,test_group_8},"SKIPPED!"}},
+ {?eh,tc_user_skip,{groups_12_SUITE,{testcase_5b,test_group_5},"SKIPPED!"}},
{?eh,test_stats,{0,0,{12,0}}},
{?eh,tc_user_skip,{groups_12_SUITE,
{end_per_group,test_group_4},"SKIPPED!"}},
diff --git a/lib/common_test/test/telnet_server.erl b/lib/common_test/test/telnet_server.erl
index 31884aa182..1d341d6106 100644
--- a/lib/common_test/test/telnet_server.erl
+++ b/lib/common_test/test/telnet_server.erl
@@ -51,31 +51,51 @@ stop(Pid) ->
init(Opts) ->
Port = proplists:get_value(port,Opts),
Users = proplists:get_value(users,Opts,[]),
- {ok, LSock} = gen_tcp:listen(Port, [list, {packet, 0},
- {active, true}]),
+ {ok, LSock} = listen(5, Port, [list, {packet, 0},
+ {active, true},
+ {reuseaddr,true}]),
State = #state{listen=LSock,users=Users},
accept(State),
- ok = gen_tcp:close(LSock).
+ ok = gen_tcp:close(LSock),
+ dbg("telnet_server closed the listen socket ~p\n", [LSock]),
+ timer:sleep(1000),
+ ok.
+
+listen(0, _Port, _Opts) ->
+ {error,eaddrinuse};
+listen(Retries, Port, Opts) ->
+ case gen_tcp:listen(Port, Opts) of
+ {error,eaddrinuse} ->
+ dbg("Listen port not released, trying again..."),
+ timer:sleep(5000),
+ listen(Retries-1, Port, Opts);
+ Ok = {ok,_LSock} ->
+ Ok;
+ Error ->
+ exit(Error)
+ end.
accept(#state{listen=LSock}=State) ->
Server = self(),
Acceptor = spawn_link(fun() -> do_accept(LSock,Server) end),
receive
{Acceptor,Sock} when is_port(Sock) ->
+ dbg("Connected to client on socket ~p\n", [Sock]),
case init_client(State#state{client=Sock}) of
stopped ->
- io:format("telnet_server stopped\n"),
+ dbg("telnet_server stopped\n"),
ok;
R ->
- io:format("connection to client closed with reason ~p~n",[R]),
+ dbg("Connection to client "
+ "closed with reason ~p~n",[R]),
accept(State)
end;
{Acceptor,closed} ->
- io:format("listen socket closed unexpectedly, "
- "terminating telnet_server\n"),
+ dbg("Listen socket closed unexpectedly, "
+ "terminating telnet_server\n"),
ok;
stop ->
- io:format("telnet_server stopped\n"),
+ dbg("telnet_server stopped\n"),
ok
end.
@@ -96,19 +116,21 @@ init_client(#state{client=Sock}=State) ->
dbg("Server sending: ~p~n",["login: "]),
R = case gen_tcp:send(Sock,"login: ") of
ok ->
- loop(State);
+ loop(State, 1);
Error ->
Error
end,
_ = gen_tcp:close(Sock),
R.
-loop(State) ->
+loop(State, N) ->
receive
{tcp,_,Data} ->
try handle_data(Data,State) of
{ok,State1} ->
- loop(State1)
+ loop(State1, N);
+ closed ->
+ closed
catch
throw:Error ->
Error
@@ -117,6 +139,11 @@ loop(State) ->
closed;
{tcp_error,_,Error} ->
{error,tcp,Error};
+ disconnect ->
+ Sock = State#state.client,
+ dbg("Server closing connection on socket ~p~n", [Sock]),
+ ok = gen_tcp:close(Sock),
+ closed;
stop ->
stopped
end.
@@ -129,10 +156,16 @@ handle_data(Data,State) ->
case get_line(Data,[]) of
{Line,Rest} ->
WholeLine = lists:flatten(lists:reverse(State#state.buffer,Line)),
- {ok,State1} = do_handle_data(WholeLine,State),
- case Rest of
- [] -> {ok,State1};
- _ -> handle_data(Rest,State1)
+ case do_handle_data(WholeLine,State) of
+ {ok,State1} ->
+ case Rest of
+ [] -> {ok,State1};
+ _ -> handle_data(Rest,State1)
+ end;
+ {close,State1} ->
+ dbg("Server closing connection~n",[]),
+ gen_tcp:close(State1#state.client),
+ closed
end;
false ->
{ok,State#state{buffer=[Data|State#state.buffer]}}
@@ -162,22 +195,42 @@ do_handle_data(Data,#state{authorized=false}=State) ->
check_user(Data,State);
do_handle_data(Data,#state{authorized={user,_}}=State) ->
check_pwd(Data,State);
-do_handle_data("echo "++ Data,State) ->
+do_handle_data("echo " ++ Data,State) ->
send(Data++"\r\n> ",State),
{ok,State};
-do_handle_data("echo_no_prompt "++ Data,State) ->
+do_handle_data("echo_sep " ++ Data,State) ->
+ Msgs = string:tokens(Data," "),
+ lists:foreach(fun(Msg) ->
+ send(Msg,State),
+ timer:sleep(10)
+ end, Msgs),
+ send("\r\n> ",State),
+ {ok,State};
+do_handle_data("echo_no_prompt " ++ Data,State) ->
send(Data,State),
{ok,State};
-do_handle_data("echo_ml "++ Data,State) ->
+do_handle_data("echo_ml " ++ Data,State) ->
Lines = string:tokens(Data," "),
ReturnData = string:join(Lines,"\n"),
send(ReturnData++"\r\n> ",State),
{ok,State};
-do_handle_data("echo_ml_no_prompt "++ Data,State) ->
+do_handle_data("echo_ml_no_prompt " ++ Data,State) ->
Lines = string:tokens(Data," "),
ReturnData = string:join(Lines,"\n"),
send(ReturnData,State),
{ok,State};
+do_handle_data("echo_loop " ++ Data,State) ->
+ [TStr|Lines] = string:tokens(Data," "),
+ ReturnData = string:join(Lines,"\n"),
+ send_loop(list_to_integer(TStr),ReturnData,State),
+ {ok,State};
+do_handle_data("disconnect_after " ++WaitStr,State) ->
+ Wait = list_to_integer(string:strip(WaitStr,right,$\n)),
+ dbg("Server will close connection in ~w ms...", [Wait]),
+ erlang:send_after(Wait,self(),disconnect),
+ {ok,State};
+do_handle_data("disconnect" ++_,State) ->
+ {close,State};
do_handle_data([],State) ->
send("> ",State),
{ok,State};
@@ -188,7 +241,7 @@ do_handle_data(_Data,State) ->
check_user(User,State) ->
case lists:keyfind(User,1,State#state.users) of
{User,Pwd} ->
- dbg("user ok\n"),
+ dbg("user ok\n"),
send("Password: ",State),
{ok,State#state{authorized={user,Pwd}}};
false ->
@@ -211,6 +264,20 @@ send(Data,State) ->
throw({error,send,Error})
end.
+send_loop(T,Data,State) ->
+ dbg("Server sending ~p in loop for ~w ms...~n",[Data,T]),
+ send_loop(now(),T,Data,State).
+
+send_loop(T0,T,Data,State) ->
+ ElapsedMS = trunc(timer:now_diff(now(),T0)/1000),
+ if ElapsedMS >= T ->
+ ok;
+ true ->
+ send(Data,State),
+ timer:sleep(500),
+ send_loop(T0,T,Data,State)
+ end.
+
get_line([$\r,$\n|Rest],Acc) ->
{lists:reverse(Acc),Rest};
get_line([$\r,0|Rest],Acc) ->
@@ -223,6 +290,6 @@ get_line([],_) ->
false.
dbg(_F) ->
- io:format(_F).
+ dbg(_F,[]).
dbg(_F,_A) ->
- io:format(_F,_A).
+ io:format("[telnet_server] " ++ _F,_A).
diff --git a/lib/common_test/vsn.mk b/lib/common_test/vsn.mk
index 568405b110..f8a5aab686 100644
--- a/lib/common_test/vsn.mk
+++ b/lib/common_test/vsn.mk
@@ -1 +1 @@
-COMMON_TEST_VSN = 1.7.4
+COMMON_TEST_VSN = 1.8
diff --git a/lib/compiler/doc/src/compile.xml b/lib/compiler/doc/src/compile.xml
index 1459f696a0..5fccdcdcb5 100644
--- a/lib/compiler/doc/src/compile.xml
+++ b/lib/compiler/doc/src/compile.xml
@@ -4,7 +4,7 @@
<erlref>
<header>
<copyright>
- <year>1996</year><year>2013</year>
+ <year>1996</year><year>2014</year>
<holder>Ericsson AB. All Rights Reserved.</holder>
</copyright>
<legalnotice>
@@ -408,6 +408,11 @@ module.beam: module.erl \
<code>-compile({no_auto_import,[error/1]}).</code>
</item>
+ <tag><c>no_auto_import</c></tag>
+ <item>
+ <p>Do not auto import any functions from the module <c>erlang</c>.</p>
+ </item>
+
<tag><c>no_line_info</c></tag>
<item>
@@ -546,6 +551,14 @@ module.beam: module.erl \
<c>{Module,Name,Arity}</c> or a list of such tuples.</p>
</item>
+ <tag><c>nowarn_deprecated_type</c></tag>
+ <item>
+ <p>Turns off warnings for uses of deprecated types. By
+ default (<c>warn_deprecated_type</c>), warnings are
+ emitted for every use of a type known by the compiler
+ to be deprecated.</p>
+ </item>
+
<tag><c>warn_obsolete_guard</c></tag>
<item>
<p>Causes warnings to be emitted for calls to old type
diff --git a/lib/compiler/doc/src/notes.xml b/lib/compiler/doc/src/notes.xml
index cb39b28d3d..a0f2e617cb 100644
--- a/lib/compiler/doc/src/notes.xml
+++ b/lib/compiler/doc/src/notes.xml
@@ -31,6 +31,233 @@
<p>This document describes the changes made to the Compiler
application.</p>
+<section><title>Compiler 5.0</title>
+
+ <section><title>Fixed Bugs and Malfunctions</title>
+ <list>
+ <item>
+ <p>
+ Line numbers would not be correct when a binary
+ construction such as
+ '<c>&lt;&lt;Bin/binary,...&gt;&gt;</c>' fails. (Thanks to
+ Stanislav Seletskiy for reporting this bug.)</p>
+ <p>
+ Own Id: OTP-11572</p>
+ </item>
+ <item>
+ <p>
+ The compiler now properly annotates the code in value in
+ the '<c>after</c>' clause for a '<c>try</c>' so that
+ Dialyzer no longer generates a false warning for an
+ unmatched return.</p>
+ <p>
+ Own Id: OTP-11580</p>
+ </item>
+ <item>
+ <p>
+ Some case statements where no clause would match could
+ cause an internal error in the compiler. (Thanks to Erik
+ Soe Sorensen for reporting this bug.)</p>
+ <p>
+ Own Id: OTP-11610</p>
+ </item>
+ <item>
+ <p>
+ With <c>--Wunmatched_returns</c>, dialyzer will no longer
+ warn when the value of a list comprehension is ignored,
+ provided that the each value in the list would be an
+ atomic value (such as integer or atoms, as opposed to
+ tuples and lists). Example: ignoring '<c>[io:format(...)
+ || ...]</c>' will not cause a warning, while ignoring
+ '<c>[file:close(Fd) || ...]</c>' will.</p>
+ <p>
+ Own Id: OTP-11626</p>
+ </item>
+ <item>
+ <p>
+ Matching out a binary and applying the binary as if it
+ were a fun would crash the run-time system. (Thanks to
+ Loïc Hoguin.)</p>
+ <p>
+ Own Id: OTP-11672</p>
+ </item>
+ <item>
+ <p>
+ Some local implementations of removing the last element
+ from a list are replaced by <c>lists:droplast/1</c>. Note
+ that this requires at least <c>stdlib-2.0</c>, which is
+ the stdlib version delivered in OTP 17.0. (Thanks to Hans
+ Svensson)</p>
+ <p>
+ Own Id: OTP-11678</p>
+ </item>
+ <item>
+ <p>
+ Allow all auto imports to be suppressed at once.
+ Introducing the no_auto_import attribute:
+ -compile(no_auto_import). Useful for code generation
+ tools that always use the qualified function names and
+ want to avoid the auto imported functions clashing with
+ local ones. (Thanks to José Valim.)</p>
+ <p>
+ Own Id: OTP-11682</p>
+ </item>
+ <item>
+ <p>
+ Application upgrade (appup) files are corrected for the
+ following applications: </p>
+ <p>
+ <c>asn1, common_test, compiler, crypto, debugger,
+ dialyzer, edoc, eldap, erl_docgen, et, eunit, gs, hipe,
+ inets, observer, odbc, os_mon, otp_mibs, parsetools,
+ percept, public_key, reltool, runtime_tools, ssh,
+ syntax_tools, test_server, tools, typer, webtool, wx,
+ xmerl</c></p>
+ <p>
+ A new test utility for testing appup files is added to
+ test_server. This is now used by most applications in
+ OTP.</p>
+ <p>
+ (Thanks to Tobias Schlager)</p>
+ <p>
+ Own Id: OTP-11744</p>
+ </item>
+ <item>
+ <p>
+ Adapt 'asm' deprecation message to new version scheme.
+ (Thanks to Tuncer Ayaz)</p>
+ <p>
+ Own Id: OTP-11751</p>
+ </item>
+ <item>
+ <p>
+ A number of compiler errors where unusual or nonsensical
+ code would crash the compiler have been reported by Ulf
+ Norell and corrected by Anthony Ramine.</p>
+ <p>
+ Own Id: OTP-11770</p>
+ </item>
+ </list>
+ </section>
+
+
+ <section><title>Improvements and New Features</title>
+ <list>
+ <item>
+ <p>
+ Compilation times for modules with a huge number for
+ record accesses using the dot operator has been improved.</p>
+ <p>
+ Own Id: OTP-10652</p>
+ </item>
+ <item>
+ <p>
+ The compiler can generate somewhat better code by moving
+ let expressions into sequences. (Thanks to Anthony
+ Ramine.)</p>
+ <p>
+ Own Id: OTP-11056</p>
+ </item>
+ <item>
+ <p>
+ Forbid unsized fields in patterns of binary generators
+ and simplified v3_core's translation of bit string
+ generators. (Thanks to Anthony Ramine.)</p>
+ <p>
+ Own Id: OTP-11186</p>
+ </item>
+ <item>
+ <p>
+ Funs can now be a given a name. Thanks to to Richard
+ O'Keefe for the idea (EEP37) and to Anthony Ramine for
+ the implementation.</p>
+ <p>
+ Own Id: OTP-11537</p>
+ </item>
+ <item>
+ <p>
+ Using the <c>from_asm</c> option to produce a BEAM file
+ starting from BEAM assembly code would often fail because
+ early optimization passes would not understand
+ instructions that later optimization passes would
+ introduce. (Thanks to Anthony Ramine.)</p>
+ <p>
+ Own Id: OTP-11544</p>
+ </item>
+ <item>
+ <p>
+ The <c>.core</c> and <c>.S</c> extensions are now
+ documented in the <c>erlc</c> documentation, and the
+ '<c>from_core</c>' and '<c>from_asm</c>' options are now
+ documented in the compiler documentation. (Thanks to
+ Tuncer Ayaz.)</p>
+ <p>
+ Own Id: OTP-11547</p>
+ </item>
+ <item>
+ <p>Optimization of case expressions that build tuples or
+ lists have been improved.</p>
+ <p>
+ Own Id: OTP-11584</p>
+ </item>
+ <item>
+ <p>
+ EEP43: New data type - Maps</p>
+ <p>
+ With Maps you may for instance: <taglist> <item><c>M0 =
+ #{ a =&gt; 1, b =&gt; 2}, % create
+ associations</c></item> <item><c>M1 = M0#{ a := 10 }, %
+ update values</c></item> <item><c>M2 = M1#{ "hi" =&gt;
+ "hello"}, % add new associations</c></item> <item><c>#{
+ "hi" := V1, a := V2, b := V3} = M2. % match keys with
+ values</c></item> </taglist></p>
+ <p>
+ For information on how to use Maps please see the
+ <seealso marker="doc/reference_manual:maps">Reference
+ Manual</seealso>.</p>
+ <p>
+ The current implementation is without the following
+ features: <taglist> <item>No variable keys</item>
+ <item>No single value access</item> <item>No map
+ comprehensions</item> </taglist></p>
+ <p>
+ Note that Maps is <em>experimental</em> during OTP 17.0.</p>
+ <p>
+ Own Id: OTP-11616</p>
+ </item>
+ <item>
+ <p>
+ Some function specs are corrected or moved and some edoc
+ comments are corrected in order to allow use of edoc.
+ (Thanks to Pierre Fenoll)</p>
+ <p>
+ Own Id: OTP-11702</p>
+ </item>
+ <item>
+ <p>
+ Thanks to Anthony Ramine for several improvements to the
+ optimizations in the BEAM compiler and for cleaning up
+ the code the code that transforms list and binary
+ comprehensions to Core Erlang.</p>
+ <p>
+ Own Id: OTP-11720</p>
+ </item>
+ <item>
+ <p>
+ The default encoding for Erlang source files is now
+ UTF-8. As a temporary measure to ease the transition from
+ the old default of latin-1, if the compiler encounters
+ byte sequences that are not valid UTF-8 sequences, the
+ compiler will re-try the compilation in latin-1 mode.
+ This workaround will be removed in a future release.</p>
+ <p>
+ Own Id: OTP-11791</p>
+ </item>
+ </list>
+ </section>
+
+</section>
+
<section><title>Compiler 4.9.4</title>
<section><title>Fixed Bugs and Malfunctions</title>
diff --git a/lib/compiler/src/beam_a.erl b/lib/compiler/src/beam_a.erl
index c590c5e35b..fe4f473846 100644
--- a/lib/compiler/src/beam_a.erl
+++ b/lib/compiler/src/beam_a.erl
@@ -88,6 +88,12 @@ rename_instr({bs_private_append=I,F,Sz,U,Src,Flags,Dst}) ->
{bs_init,F,{I,U,Flags},none,[Sz,Src],Dst};
rename_instr(bs_init_writable=I) ->
{bs_init,{f,0},I,1,[{x,0}],{x,0}};
+rename_instr({put_map_assoc,Fail,S,D,R,L}) ->
+ {put_map,Fail,assoc,S,D,R,L};
+rename_instr({put_map_exact,Fail,S,D,R,L}) ->
+ {put_map,Fail,exact,S,D,R,L};
+rename_instr({test,has_map_fields,Fail,Src,{list,List}}) ->
+ {test,has_map_fields,Fail,[Src|List]};
rename_instr({select_val=I,Reg,Fail,{list,List}}) ->
{select,I,Reg,Fail,List};
rename_instr({select_tuple_arity=I,Reg,Fail,{list,List}}) ->
diff --git a/lib/compiler/src/beam_asm.erl b/lib/compiler/src/beam_asm.erl
index 112b087f3c..f8cf178d2e 100644
--- a/lib/compiler/src/beam_asm.erl
+++ b/lib/compiler/src/beam_asm.erl
@@ -324,6 +324,8 @@ make_op({gc_bif,Bif,Fail,Live,Args,Dest}, Dict) ->
encode_op(BifOp, [Fail,Live,{extfunc,erlang,Bif,Arity}|Args++[Dest]],Dict);
make_op({bs_add=Op,Fail,[Src1,Src2,Unit],Dest}, Dict) ->
encode_op(Op, [Fail,Src1,Src2,Unit,Dest], Dict);
+make_op({test,Cond,Fail,Src,{list,_}=Ops}, Dict) ->
+ encode_op(Cond, [Fail,Src,Ops], Dict);
make_op({test,Cond,Fail,Ops}, Dict) when is_list(Ops) ->
encode_op(Cond, [Fail|Ops], Dict);
make_op({test,Cond,Fail,Live,[Op|Ops],Dst}, Dict) when is_list(Ops) ->
diff --git a/lib/compiler/src/beam_block.erl b/lib/compiler/src/beam_block.erl
index 402fbe2e2e..7a30c68593 100644
--- a/lib/compiler/src/beam_block.erl
+++ b/lib/compiler/src/beam_block.erl
@@ -152,6 +152,10 @@ collect({get_tuple_element,S,I,D}) -> {set,[D],[S],{get_tuple_element,I}};
collect({set_tuple_element,S,D,I}) -> {set,[],[S,D],{set_tuple_element,I}};
collect({get_list,S,D1,D2}) -> {set,[D1,D2],[S],get_list};
collect(remove_message) -> {set,[],[],remove_message};
+collect({put_map,F,Op,S,D,R,{list,Puts}}) ->
+ {set,[D],[S|Puts],{alloc,R,{put_map,Op,F}}};
+collect({get_map_elements,F,S,{list,Gets}}) ->
+ {set,Gets,[S],{get_map_elements,F}};
collect({'catch',R,L}) -> {set,[R],[],{'catch',L}};
collect(fclearerror) -> {set,[],[],fclearerror};
collect({fcheckerror,{f,0}}) -> {set,[],[],fcheckerror};
@@ -236,6 +240,7 @@ move_allocates_2(Alloc, [], Acc) ->
alloc_may_pass({set,_,_,{alloc,_,_}}) -> false;
alloc_may_pass({set,_,_,{set_tuple_element,_}}) -> false;
+alloc_may_pass({set,_,_,{get_map_elements,_}}) -> false;
alloc_may_pass({set,_,_,put_list}) -> false;
alloc_may_pass({set,_,_,put}) -> false;
alloc_may_pass({set,_,_,_}) -> true.
@@ -286,7 +291,11 @@ opt_moves([X0,Y0], Is0) ->
not_possible -> {[X,Y0],Is2};
{X,_} -> {[X,Y0],Is2};
{Y,Is} -> {[X,Y],Is}
- end.
+ end;
+opt_moves(Ds, Is) ->
+ %% multiple destinations -> pass through
+ {Ds,Is}.
+
%% opt_move(Dest, [Instruction]) -> {UpdatedDest,[Instruction]} | not_possible
%% If there is a {move,Dest,FinalDest} instruction
@@ -383,6 +392,7 @@ gen_init(Fs, Regs, Y, Acc) ->
init_yreg([{set,_,_,{bif,_,_}}|_], Reg) -> Reg;
init_yreg([{set,_,_,{alloc,_,{gc_bif,_,_}}}|_], Reg) -> Reg;
+init_yreg([{set,_,_,{alloc,_,{put_map,_,_}}}|_], Reg) -> Reg;
init_yreg([{set,Ds,_,_}|Is], Reg) -> init_yreg(Is, add_yregs(Ds, Reg));
init_yreg(_Is, Reg) -> Reg.
diff --git a/lib/compiler/src/beam_bool.erl b/lib/compiler/src/beam_bool.erl
index 124abd13c1..5a4621dc37 100644
--- a/lib/compiler/src/beam_bool.erl
+++ b/lib/compiler/src/beam_bool.erl
@@ -318,6 +318,8 @@ split_block_label_used([{set,[_],_,{bif,_,{f,Fail}}}|_], Fail) ->
true;
split_block_label_used([{set,[_],_,{alloc,_,{gc_bif,_,{f,Fail}}}}|_], Fail) ->
true;
+split_block_label_used([{set,[_],_,{alloc,_,{put_map,_,{f,Fail}}}}|_], Fail) ->
+ true;
split_block_label_used([_|Is], Fail) ->
split_block_label_used(Is, Fail);
split_block_label_used([], _) -> false.
@@ -391,10 +393,14 @@ bopt_tree([{set,_,_,{bif,'xor',_}}|_], _, _) ->
throw('xor');
bopt_tree([{protected,[Dst],Code,_}|Is], Forest0, Pre) ->
ProtForest0 = gb_trees:from_orddict([P || {_,any}=P <- gb_trees:to_list(Forest0)]),
- {ProtPre,[{_,ProtTree}]} = bopt_tree(Code, ProtForest0, []),
- Prot = {prot,ProtPre,ProtTree},
- Forest = gb_trees:enter(Dst, Prot, Forest0),
- bopt_tree(Is, Forest, Pre);
+ case bopt_tree(Code, ProtForest0, []) of
+ {ProtPre,[{_,ProtTree}]} ->
+ Prot = {prot,ProtPre,ProtTree},
+ Forest = gb_trees:enter(Dst, Prot, Forest0),
+ bopt_tree(Is, Forest, Pre);
+ _Res ->
+ throw(not_boolean_expr)
+ end;
bopt_tree([{set,[Dst],[Src],move}=Move|Is], Forest, Pre) ->
case {Src,Dst} of
{{tmp,_},_} -> throw(move);
@@ -432,9 +438,10 @@ bopt_bool_args(As, Forest) ->
mapfoldl(fun bopt_bool_arg/2, Forest, As).
bopt_bool_arg({T,_}=R, Forest) when T =:= x; T =:= y; T =:= tmp ->
- Val = case gb_trees:get(R, Forest) of
- any -> {test,is_eq_exact,fail,[R,{atom,true}]};
- Val0 -> Val0
+ Val = case gb_trees:lookup(R, Forest) of
+ {value,any} -> {test,is_eq_exact,fail,[R,{atom,true}]};
+ {value,Val0} -> Val0;
+ none -> throw(mixed)
end,
{Val,gb_trees:delete(R, Forest)};
bopt_bool_arg(Term, Forest) ->
@@ -525,7 +532,9 @@ bopt_cg({prot,Pre0,Tree}, Fail, Rs0, Acc, St0) ->
bopt_cg({atom,true}, _Fail, _Rs, Acc, St) ->
{Acc,St};
bopt_cg({atom,false}, Fail, _Rs, Acc, St) ->
- {[{jump,{f,Fail}}|Acc],St}.
+ {[{jump,{f,Fail}}|Acc],St};
+bopt_cg(_, _, _, _, _) ->
+ throw(not_boolean_expr).
bopt_cg_not({'and',As0}) ->
As = [bopt_cg_not(A) || A <- As0],
@@ -538,7 +547,9 @@ bopt_cg_not({'not',Arg}) ->
bopt_cg_not({test,Test,Fail,As}) ->
{inverted_test,Test,Fail,As};
bopt_cg_not({atom,Bool}) when is_boolean(Bool) ->
- {atom,not Bool}.
+ {atom,not Bool};
+bopt_cg_not(_) ->
+ throw(not_boolean_expr).
bopt_cg_not_not({'and',As}) ->
{'and',[bopt_cg_not_not(A) || A <- As]};
diff --git a/lib/compiler/src/beam_bsm.erl b/lib/compiler/src/beam_bsm.erl
index fdfcb08125..d54c2a9fde 100644
--- a/lib/compiler/src/beam_bsm.erl
+++ b/lib/compiler/src/beam_bsm.erl
@@ -209,6 +209,7 @@ btb_reaches_match_2([{call,Arity,{f,Lbl}}|Is], Regs, D) ->
btb_reaches_match_2([{apply,Arity}|Is], Regs, D) ->
btb_call(Arity+2, apply, Regs, Is, D);
btb_reaches_match_2([{call_fun,Live}=I|Is], Regs, D) ->
+ btb_ensure_not_used([{x,Live}], I, Regs),
btb_call(Live, I, Regs, Is, D);
btb_reaches_match_2([{make_fun2,_,_,_,Live}|Is], Regs, D) ->
btb_call(Live, make_fun2, Regs, Is, D);
diff --git a/lib/compiler/src/beam_clean.erl b/lib/compiler/src/beam_clean.erl
index 9d89e21a4e..b653998252 100644
--- a/lib/compiler/src/beam_clean.erl
+++ b/lib/compiler/src/beam_clean.erl
@@ -234,6 +234,36 @@ replace([{bs_init,{f,Lbl},Info,Live,Ss,Dst}|Is], Acc, D) when Lbl =/= 0 ->
replace(Is, [{bs_init,{f,label(Lbl, D)},Info,Live,Ss,Dst}|Acc], D);
replace([{bs_put,{f,Lbl},Info,Ss}|Is], Acc, D) when Lbl =/= 0 ->
replace(Is, [{bs_put,{f,label(Lbl, D)},Info,Ss}|Acc], D);
+replace([{bs_init2,{f,Lbl},Sz,Words,R,F,Dst}|Is], Acc, D) when Lbl =/= 0 ->
+ replace(Is, [{bs_init2,{f,label(Lbl, D)},Sz,Words,R,F,Dst}|Acc], D);
+replace([{bs_init_bits,{f,Lbl},Sz,Words,R,F,Dst}|Is], Acc, D) when Lbl =/= 0 ->
+ replace(Is, [{bs_init_bits,{f,label(Lbl, D)},Sz,Words,R,F,Dst}|Acc], D);
+replace([{bs_put_integer,{f,Lbl},Bits,Unit,Fl,Val}|Is], Acc, D) when Lbl =/= 0 ->
+ replace(Is, [{bs_put_integer,{f,label(Lbl, D)},Bits,Unit,Fl,Val}|Acc], D);
+replace([{bs_put_utf8=I,{f,Lbl},Fl,Val}|Is], Acc, D) when Lbl =/= 0 ->
+ replace(Is, [{I,{f,label(Lbl, D)},Fl,Val}|Acc], D);
+replace([{bs_put_utf16=I,{f,Lbl},Fl,Val}|Is], Acc, D) when Lbl =/= 0 ->
+ replace(Is, [{I,{f,label(Lbl, D)},Fl,Val}|Acc], D);
+replace([{bs_put_utf32=I,{f,Lbl},Fl,Val}|Is], Acc, D) when Lbl =/= 0 ->
+ replace(Is, [{I,{f,label(Lbl, D)},Fl,Val}|Acc], D);
+replace([{bs_put_binary,{f,Lbl},Bits,Unit,Fl,Val}|Is], Acc, D) when Lbl =/= 0 ->
+ replace(Is, [{bs_put_binary,{f,label(Lbl, D)},Bits,Unit,Fl,Val}|Acc], D);
+replace([{bs_put_float,{f,Lbl},Bits,Unit,Fl,Val}|Is], Acc, D) when Lbl =/= 0 ->
+ replace(Is, [{bs_put_float,{f,label(Lbl, D)},Bits,Unit,Fl,Val}|Acc], D);
+replace([{bs_add,{f,Lbl},Src,Dst}|Is], Acc, D) when Lbl =/= 0 ->
+ replace(Is, [{bs_add,{f,label(Lbl, D)},Src,Dst}|Acc], D);
+replace([{bs_append,{f,Lbl},_,_,_,_,_,_,_}=I0|Is], Acc, D) when Lbl =/= 0 ->
+ I = setelement(2, I0, {f,label(Lbl, D)}),
+ replace(Is, [I|Acc], D);
+replace([{bs_utf8_size=I,{f,Lbl},Src,Dst}|Is], Acc, D) when Lbl =/= 0 ->
+ replace(Is, [{I,{f,label(Lbl, D)},Src,Dst}|Acc], D);
+replace([{bs_utf16_size=I,{f,Lbl},Src,Dst}|Is], Acc, D) when Lbl =/= 0 ->
+ replace(Is, [{I,{f,label(Lbl, D)},Src,Dst}|Acc], D);
+replace([{put_map=I,{f,Lbl},Op,Src,Dst,Live,List}|Is], Acc, D)
+ when Lbl =/= 0 ->
+ replace(Is, [{I,{f,label(Lbl, D)},Op,Src,Dst,Live,List}|Acc], D);
+replace([{get_map_elements=I,{f,Lbl},Src,List}|Is], Acc, D) when Lbl =/= 0 ->
+ replace(Is, [{I,{f,label(Lbl, D)},Src,List}|Acc], D);
replace([I|Is], Acc, D) ->
replace(Is, [I|Acc], D);
replace([], Acc, _) -> Acc.
diff --git a/lib/compiler/src/beam_dict.erl b/lib/compiler/src/beam_dict.erl
index 212b9fb03a..ea51673fa3 100644
--- a/lib/compiler/src/beam_dict.erl
+++ b/lib/compiler/src/beam_dict.erl
@@ -1,7 +1,7 @@
%%
%% %CopyrightBegin%
%%
-%% Copyright Ericsson AB 1998-2013. All Rights Reserved.
+%% Copyright Ericsson AB 1998-2014. 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
@@ -29,16 +29,24 @@
-type label() :: non_neg_integer().
+-type index() :: non_neg_integer().
+
+-type atom_tab() :: gb_trees:tree(atom(), index()).
+-type import_tab() :: gb_trees:tree(mfa(), index()).
+-type fname_tab() :: gb_trees:tree(Name :: term(), index()).
+-type line_tab() :: gb_trees:tree({Fname :: index(), Line :: term()}, index()).
+-type literal_tab() :: dict:dict(Literal :: term(), index()).
+
-record(asm,
- {atoms = gb_trees:empty() :: gb_tree(), %{Atom,Index}
+ {atoms = gb_trees:empty() :: atom_tab(),
exports = [] :: [{label(), arity(), label()}],
locals = [] :: [{label(), arity(), label()}],
- imports = gb_trees:empty() :: gb_tree(), %{{M,F,A},Index}
+ imports = gb_trees:empty() :: import_tab(),
strings = <<>> :: binary(), %String pool
lambdas = [], %[{...}]
- literals = dict:new() :: dict(), %Format: {Literal,Number}
- fnames = gb_trees:empty() :: gb_tree(), %{Name,Index}
- lines = gb_trees:empty() :: gb_tree(), %{{Fname,Line},Index}
+ literals = dict:new() :: literal_tab(),
+ fnames = gb_trees:empty() :: fname_tab(),
+ lines = gb_trees:empty() :: line_tab(),
num_lines = 0 :: non_neg_integer(), %Number of line instructions
next_import = 0 :: non_neg_integer(),
string_offset = 0 :: non_neg_integer(),
diff --git a/lib/compiler/src/beam_disasm.erl b/lib/compiler/src/beam_disasm.erl
index 1a8bbcee22..c45596f236 100644
--- a/lib/compiler/src/beam_disasm.erl
+++ b/lib/compiler/src/beam_disasm.erl
@@ -1,7 +1,7 @@
%%
%% %CopyrightBegin%
%%
-%% Copyright Ericsson AB 2000-2013. All Rights Reserved.
+%% Copyright Ericsson AB 2000-2014. 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
@@ -37,7 +37,8 @@
%%-----------------------------------------------------------------------
--type literals() :: 'none' | gb_tree().
+-type index() :: non_neg_integer().
+-type literals() :: 'none' | gb_trees:tree(index(), term()).
-type symbolic_tag() :: 'a' | 'f' | 'h' | 'i' | 'u' | 'x' | 'y' | 'z'.
-type disasm_tag() :: symbolic_tag() | 'fr' | 'atom' | 'float' | 'literal'.
-type disasm_term() :: 'nil' | {disasm_tag(), _}.
@@ -216,7 +217,8 @@ optional_chunk(F, ChunkTag) ->
%%-----------------------------------------------------------------------
-type l_info() :: {non_neg_integer(), {_,_,_,_,_,_}}.
--spec beam_disasm_lambdas('none' | binary(), gb_tree()) -> 'none' | [l_info()].
+-spec beam_disasm_lambdas('none' | binary(), gb_trees:tree(index(), _)) ->
+ 'none' | [l_info()].
beam_disasm_lambdas(none, _) -> none;
beam_disasm_lambdas(<<_:32,Tab/binary>>, Atoms) ->
@@ -365,6 +367,14 @@ disasm_instr(B, Bs, Atoms, Literals) ->
disasm_select_inst(select_val, Bs, Atoms, Literals);
select_tuple_arity ->
disasm_select_inst(select_tuple_arity, Bs, Atoms, Literals);
+ put_map_assoc ->
+ disasm_map_inst(put_map_assoc, Arity, Bs, Atoms, Literals);
+ put_map_exact ->
+ disasm_map_inst(put_map_exact, Arity, Bs, Atoms, Literals);
+ get_map_elements ->
+ disasm_map_inst(get_map_elements, Arity, Bs, Atoms, Literals);
+ has_map_fields ->
+ disasm_map_inst(has_map_fields, Arity, Bs, Atoms, Literals);
_ ->
try decode_n_args(Arity, Bs, Atoms, Literals) of
{Args, RestBs} ->
@@ -395,6 +405,16 @@ disasm_select_inst(Inst, Bs, Atoms, Literals) ->
{List, RestBs} = decode_n_args(Len, Bs4, Atoms, Literals),
{{Inst, [X,F,{Z,U,List}]}, RestBs}.
+disasm_map_inst(Inst, Arity, Bs0, Atoms, Literals) ->
+ {Args0,Bs1} = decode_n_args(Arity, Bs0, Atoms, Literals),
+ %% no droplast ..
+ [Z|Args1] = lists:reverse(Args0),
+ Args = lists:reverse(Args1),
+ {U, Bs2} = decode_arg(Bs1, Atoms, Literals),
+ {u, Len} = U,
+ {List, RestBs} = decode_n_args(Len, Bs2, Atoms, Literals),
+ {{Inst, Args ++ [{Z,U,List}]}, RestBs}.
+
%%-----------------------------------------------------------------------
%% decode_arg([Byte]) -> {Arg, [Byte]}
%%
@@ -417,11 +437,12 @@ decode_arg([B|Bs]) ->
decode_int(Tag, B, Bs)
end.
--spec decode_arg([byte(),...], gb_tree(), literals()) -> {disasm_term(), [byte()]}.
+-spec decode_arg([byte(),...], gb_trees:tree(index(), _), literals()) ->
+ {disasm_term(), [byte()]}.
decode_arg([B|Bs0], Atoms, Literals) ->
Tag = decode_tag(B band 2#111),
- ?NO_DEBUG('Tag = ~p, B = ~p, Bs = ~p~n', [Tag, B, Bs]),
+ ?NO_DEBUG('Tag = ~p, B = ~p, Bs = ~p~n', [Tag, B, Bs0]),
case Tag of
z ->
decode_z_tagged(Tag, B, Bs0, Literals);
@@ -1009,6 +1030,7 @@ resolve_inst({gc_bif2,Args},Imports,_,_) ->
[F,Live,Bif,A1,A2,Reg] = resolve_args(Args),
{extfunc,_Mod,BifName,_Arity} = lookup(Bif+1,Imports),
{gc_bif,BifName,F,Live,[A1,A2],Reg};
+
%%
%% New instruction in R14, gc_bif with 3 arguments
%%
@@ -1119,6 +1141,29 @@ resolve_inst({line,[Index]},_,_,_) ->
{line,resolve_arg(Index)};
%%
+%% 17.0
+%%
+resolve_inst({put_map_assoc,Args},_,_,_) ->
+ [FLbl,Src,Dst,{u,N},{{z,1},{u,_Len},List0}] = Args,
+ List = resolve_args(List0),
+ {put_map_assoc,FLbl,Src,Dst,N,{list,List}};
+resolve_inst({put_map_exact,Args},_,_,_) ->
+ [FLbl,Src,Dst,{u,N},{{z,1},{u,_Len},List0}] = Args,
+ List = resolve_args(List0),
+ {put_map_exact,FLbl,Src,Dst,N,{list,List}};
+resolve_inst({is_map=I,Args0},_,_,_) ->
+ [FLbl|Args] = resolve_args(Args0),
+ {test,I,FLbl,Args};
+resolve_inst({has_map_fields,Args0},_,_,_) ->
+ [FLbl,Src,{{z,1},{u,_Len},List0}] = Args0,
+ List = resolve_args(List0),
+ {test,has_map_fields,FLbl,Src,{list,List}};
+resolve_inst({get_map_elements,Args0},_,_,_) ->
+ [FLbl,Src,{{z,1},{u,_Len},List0}] = Args0,
+ List = resolve_args(List0),
+ {get_map_elements,FLbl,Src,{list,List}};
+
+%%
%% Catches instructions that are not yet handled.
%%
resolve_inst(X,_,_,_) -> ?exit({resolve_inst,X}).
diff --git a/lib/compiler/src/beam_except.erl b/lib/compiler/src/beam_except.erl
index e5ec1bd904..d261809765 100644
--- a/lib/compiler/src/beam_except.erl
+++ b/lib/compiler/src/beam_except.erl
@@ -131,9 +131,13 @@ 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].
+fix_block(Is, Words) ->
+ fix_block_1(reverse(Is), Words).
+
+fix_block_1([{set,[],[],{alloc,Live,{F1,F2,Needed,F3}}}|Is], Words) ->
+ [{set,[],[],{alloc,Live,{F1,F2,Needed-Words,F3}}}|Is];
+fix_block_1([I|Is], Words) ->
+ [I|fix_block_1(Is, Words)].
dig_out_block_fc([{set,[],[],{alloc,Live,_}}|Bl]) ->
case dig_out_fc(Bl, Live-1, nil) of
diff --git a/lib/compiler/src/beam_flatten.erl b/lib/compiler/src/beam_flatten.erl
index 5603a677e8..46835bece1 100644
--- a/lib/compiler/src/beam_flatten.erl
+++ b/lib/compiler/src/beam_flatten.erl
@@ -61,6 +61,10 @@ norm({set,[],[S],put}) -> {put,S};
norm({set,[D],[S],{get_tuple_element,I}}) -> {get_tuple_element,S,I,D};
norm({set,[],[S,D],{set_tuple_element,I}}) -> {set_tuple_element,S,D,I};
norm({set,[D1,D2],[S],get_list}) -> {get_list,S,D1,D2};
+norm({set,[D],[S|Puts],{alloc,R,{put_map,Op,F}}}) ->
+ {put_map,F,Op,S,D,R,{list,Puts}};
+norm({set,Gets,[S],{get_map_elements,F}}) ->
+ {get_map_elements,F,S,{list,Gets}};
norm({set,[],[],remove_message}) -> remove_message;
norm({set,[],[],fclearerror}) -> fclearerror;
norm({set,[],[],fcheckerror}) -> {fcheckerror,{f,0}}.
diff --git a/lib/compiler/src/beam_jump.erl b/lib/compiler/src/beam_jump.erl
index d57fb80ac2..b952139f2c 100644
--- a/lib/compiler/src/beam_jump.erl
+++ b/lib/compiler/src/beam_jump.erl
@@ -446,11 +446,13 @@ is_label_used_in_2({set,_,_,Info}, Lbl) ->
case Info of
{bif,_,{f,F}} -> F =:= Lbl;
{alloc,_,{gc_bif,_,{f,F}}} -> F =:= Lbl;
+ {alloc,_,{put_map,_,{f,F}}} -> F =:= Lbl;
{'catch',{f,F}} -> F =:= Lbl;
{alloc,_,_} -> false;
{put_tuple,_} -> false;
{get_tuple_element,_} -> false;
{set_tuple_element,_} -> false;
+ {get_map_elements,{f,F}} -> F =:= Lbl;
{line,_} -> false;
_ when is_atom(Info) -> false
end.
@@ -527,6 +529,10 @@ ulbl({bs_init,Lbl,_,_,_,_}, Used) ->
mark_used(Lbl, Used);
ulbl({bs_put,Lbl,_,_}, Used) ->
mark_used(Lbl, Used);
+ulbl({put_map,Lbl,_Op,_Src,_Dst,_Live,_List}, Used) ->
+ mark_used(Lbl, Used);
+ulbl({get_map_elements,Lbl,_Src,_List}, Used) ->
+ mark_used(Lbl, Used);
ulbl(_, Used) -> Used.
mark_used({f,0}, Used) -> Used;
diff --git a/lib/compiler/src/beam_split.erl b/lib/compiler/src/beam_split.erl
index cacaaebffe..688bba9a94 100644
--- a/lib/compiler/src/beam_split.erl
+++ b/lib/compiler/src/beam_split.erl
@@ -49,6 +49,13 @@ split_block([{set,[R],As,{bif,N,{f,Lbl}=Fail}}|Is], Bl, Acc) when Lbl =/= 0 ->
split_block([{set,[R],As,{alloc,Live,{gc_bif,N,{f,Lbl}=Fail}}}|Is], Bl, Acc)
when Lbl =/= 0 ->
split_block(Is, [], [{gc_bif,N,Fail,Live,As,R}|make_block(Bl, Acc)]);
+split_block([{set,[D],[S|Puts],{alloc,R,{put_map,Op,{f,Lbl}=Fail}}}|Is],
+ Bl, Acc) when Lbl =/= 0 ->
+ split_block(Is, [], [{put_map,Fail,Op,S,D,R,{list,Puts}}|
+ make_block(Bl, Acc)]);
+split_block([{set,Gets,[S],{get_map_elements,{f,Lbl}=Fail}}|Is], Bl, Acc)
+ when Lbl =/= 0 ->
+ split_block(Is, [], [{get_map_elements,Fail,S,{list,Gets}}|make_block(Bl, Acc)]);
split_block([{set,[R],[],{'catch',L}}|Is], Bl, Acc) ->
split_block(Is, [], [{'catch',R,L}|make_block(Bl, Acc)]);
split_block([{set,[],[],{line,_}=Line}|Is], Bl, Acc) ->
diff --git a/lib/compiler/src/beam_utils.erl b/lib/compiler/src/beam_utils.erl
index 36f3200d11..8ca368c167 100644
--- a/lib/compiler/src/beam_utils.erl
+++ b/lib/compiler/src/beam_utils.erl
@@ -152,6 +152,7 @@ bif_to_test(is_function, [_]=Ops, Fail) -> {test,is_function,Fail,Ops};
bif_to_test(is_function, [_,_]=Ops, Fail) -> {test,is_function2,Fail,Ops};
bif_to_test(is_integer, [_]=Ops, Fail) -> {test,is_integer,Fail,Ops};
bif_to_test(is_list, [_]=Ops, Fail) -> {test,is_list,Fail,Ops};
+bif_to_test(is_map, [_]=Ops, Fail) -> {test,is_map,Fail,Ops};
bif_to_test(is_number, [_]=Ops, Fail) -> {test,is_number,Fail,Ops};
bif_to_test(is_pid, [_]=Ops, Fail) -> {test,is_pid,Fail,Ops};
bif_to_test(is_port, [_]=Ops, Fail) -> {test,is_port,Fail,Ops};
@@ -184,6 +185,7 @@ is_pure_test({test,is_lt,_,[_,_]}) -> true;
is_pure_test({test,is_nil,_,[_]}) -> true;
is_pure_test({test,is_nonempty_list,_,[_]}) -> true;
is_pure_test({test,test_arity,_,[_,_]}) -> true;
+is_pure_test({test,has_map_fields,_,[_,{list,_}]}) -> true;
is_pure_test({test,Op,_,Ops}) ->
erl_internal:new_type_test(Op, length(Ops)).
@@ -746,6 +748,8 @@ live_opt([{try_end,_}=I|Is], Regs, D, Acc) ->
live_opt(Is, Regs, D, [I|Acc]);
live_opt([{loop_rec_end,_}=I|Is], Regs, D, Acc) ->
live_opt(Is, Regs, D, [I|Acc]);
+live_opt([{wait_timeout,_,nil}=I|Is], Regs, D, Acc) ->
+ live_opt(Is, Regs, D, [I|Acc]);
live_opt([{wait_timeout,_,{Tag,_}}=I|Is], Regs, D, Acc) when Tag =/= x ->
live_opt(Is, Regs, D, [I|Acc]);
live_opt([{line,_}=I|Is], Regs, D, Acc) ->
diff --git a/lib/compiler/src/beam_validator.erl b/lib/compiler/src/beam_validator.erl
index 48f5135aca..9d5563d13b 100644
--- a/lib/compiler/src/beam_validator.erl
+++ b/lib/compiler/src/beam_validator.erl
@@ -1,7 +1,7 @@
%%
%% %CopyrightBegin%
%%
-%% Copyright Ericsson AB 2004-2013. All Rights Reserved.
+%% Copyright Ericsson AB 2004-2014. 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
@@ -213,9 +213,12 @@ validate_error_1(Error, Module, Name, Ar) ->
{{Module,Name,Ar},
{internal_error,'_',{Error,erlang:get_stacktrace()}}}.
+-type index() :: non_neg_integer().
+-type reg_tab() :: gb_trees:tree(index(), 'none' | {'value', _}).
+
-record(st, %Emulation state
- {x=init_regs(0, term) :: gb_tree(), %x register info.
- y=init_regs(0, initialized) :: gb_tree(), %y register info.
+ {x=init_regs(0, term) :: reg_tab(),%x register info.
+ y=init_regs(0, initialized) :: reg_tab(),%y register info.
f=init_fregs(), %
numy=none, %Number of y registers.
h=0, %Available heap size.
@@ -227,11 +230,16 @@ validate_error_1(Error, Module, Name, Ar) ->
setelem=false %Previous instruction was setelement/3.
}).
+-type label() :: integer().
+-type label_set() :: gb_sets:set(label()).
+-type branched_tab() :: gb_trees:tree(label(), #st{}).
+-type ft_tab() :: gb_trees:tree().
+
-record(vst, %Validator state
{current=none :: #st{} | 'none', %Current state
- branched=gb_trees:empty() :: gb_tree(), %States at jumps
- labels=gb_sets:empty() :: gb_set(), %All defined labels
- ft=gb_trees:empty() :: gb_tree() %Some other functions
+ branched=gb_trees:empty() :: branched_tab(), %States at jumps
+ labels=gb_sets:empty() :: label_set(), %All defined labels
+ ft=gb_trees:empty() :: ft_tab() %Some other functions
% in the module (those that start with bs_start_match2).
}).
@@ -574,6 +582,7 @@ valfun_4({apply,Live}, Vst) ->
valfun_4({apply_last,Live,_}, Vst) ->
tail_call(apply, Live+2, Vst);
valfun_4({call_fun,Live}, Vst) ->
+ validate_src([{x,Live}], Vst),
call('fun', Live+1, Vst);
valfun_4({call,Live,Func}, Vst) ->
call(Func, Live, Vst);
@@ -769,6 +778,10 @@ valfun_4({test,is_nonempty_list,{f,Lbl},[Cons]}, Vst) ->
valfun_4({test,test_arity,{f,Lbl},[Tuple,Sz]}, Vst) when is_integer(Sz) ->
assert_type(tuple, Tuple, Vst),
set_type_reg({tuple,Sz}, Tuple, branch_state(Lbl, Vst));
+valfun_4({test,has_map_fields,{f,Lbl},Src,{list,List}}, Vst) ->
+ validate_src([Src], Vst),
+ assert_strict_literal_termorder(List),
+ branch_state(Lbl, Vst);
valfun_4({test,_Op,{f,Lbl},Src}, Vst) ->
validate_src(Src, Vst),
branch_state(Lbl, Vst);
@@ -865,9 +878,38 @@ valfun_4({bs_final,{f,Fail},Dst}, Vst0) ->
valfun_4({bs_final2,Src,Dst}, Vst0) ->
assert_term(Src, Vst0),
set_type_reg(binary, Dst, Vst0);
+%% Map instructions.
+valfun_4({put_map_assoc,{f,Fail},Src,Dst,Live,{list,List}}, Vst) ->
+ verify_put_map(Fail, Src, Dst, Live, List, Vst);
+valfun_4({put_map_exact,{f,Fail},Src,Dst,Live,{list,List}}, Vst) ->
+ verify_put_map(Fail, Src, Dst, Live, List, Vst);
+valfun_4({get_map_elements,{f,Fail},Src,{list,List}}, Vst) ->
+ verify_get_map(Fail, Src, List, Vst);
valfun_4(_, _) ->
error(unknown_instruction).
+verify_get_map(Fail, Src, List, Vst0) ->
+ assert_term(Src, Vst0),
+ Vst1 = branch_state(Fail, Vst0),
+ Lits = mmap(fun(L,_R) -> [L] end, List),
+ assert_strict_literal_termorder(Lits),
+ verify_get_map_pair(List,Vst0,Vst1).
+
+verify_get_map_pair([],_,Vst) -> Vst;
+verify_get_map_pair([Src,Dst|Vs],Vst0,Vsti) ->
+ assert_term(Src, Vst0),
+ verify_get_map_pair(Vs,Vst0,set_type_reg(term,Dst,Vsti)).
+
+verify_put_map(Fail, Src, Dst, Live, List, Vst0) ->
+ verify_live(Live, Vst0),
+ verify_y_init(Vst0),
+ foreach(fun (Term) -> assert_term(Term, Vst0) end, List),
+ assert_term(Src, Vst0),
+ Vst1 = heap_alloc(0, Vst0),
+ Vst2 = branch_state(Fail, Vst1),
+ Vst = prune_x_regs(Live, Vst2),
+ set_type_reg(term, Dst, Vst).
+
%%
%% Common code for validating bs_get* instructions.
%%
@@ -888,7 +930,7 @@ validate_bs_skip_utf(Fail, Ctx, Live, Vst0) ->
branch_state(Fail, Vst).
%%
-%% Special state handling for setelement/3 and the set_tuple_element/3 instruction.
+%% Special state handling for setelement/3 and set_tuple_element/3 instructions.
%% A possibility for garbage collection must not occur between setelement/3 and
%% set_tuple_element/3.
%%
@@ -1078,6 +1120,39 @@ assert_freg_set({fr,Fr}=Freg, #vst{current=#st{f=Fregs}})
end;
assert_freg_set(Fr, _) -> error({bad_source,Fr}).
+%%% Maps
+
+%% ensure that a list of literals has a strict
+%% ascending term order (also meaning unique literals)
+assert_strict_literal_termorder(Ls) ->
+ Vs = lists:map(fun (L) -> get_literal(L) end, Ls),
+ case check_strict_value_termorder(Vs) of
+ true -> ok;
+ false -> error({not_strict_order, Ls})
+ end.
+
+%% usage:
+%% mmap(fun(A,B) -> [{A,B}] end, [1,2,3,4]),
+%% [{1,2},{3,4}]
+
+mmap(F,List) ->
+ {arity,Ar} = erlang:fun_info(F,arity),
+ mmap(F,Ar,List).
+mmap(_F,_,[]) -> [];
+mmap(F,Ar,List) ->
+ {Hd,Tl} = lists:split(Ar,List),
+ apply(F,Hd) ++ mmap(F,Ar,Tl).
+
+check_strict_value_termorder([]) -> true;
+check_strict_value_termorder([_]) -> true;
+check_strict_value_termorder([V1,V2]) ->
+ erts_internal:cmp_term(V1,V2) < 0;
+check_strict_value_termorder([V1,V2|Vs]) ->
+ case erts_internal:cmp_term(V1,V2) < 0 of
+ true -> check_strict_value_termorder([V2|Vs]);
+ false -> false
+ end.
+
%%%
%%% Binary matching.
%%%
@@ -1313,6 +1388,7 @@ assert_term(Src, Vst) ->
%% number Integer or Float of unknown value
%%
+
assert_type(WantedType, Term, Vst) ->
assert_type(WantedType, get_term_type(Term, Vst)).
@@ -1328,7 +1404,6 @@ assert_type({tuple_element,I}, {tuple,Sz})
assert_type(Needed, Actual) ->
error({bad_type,{needed,Needed},{actual,Actual}}).
-
%% upgrade_tuple_type(NewTupleType, OldType) -> TupleType.
%% upgrade_tuple_type/2 is used when linear code finds out more and
%% more information about a tuple type, so that the type gets more
@@ -1409,6 +1484,15 @@ get_term_type_1({y,Y}=Reg, #vst{current=#st{y=Ys}}) when is_integer(Y) ->
get_term_type_1(Src, _) -> error({bad_source,Src}).
+%% get_literal(Src) -> literal_value().
+get_literal(nil) -> [];
+get_literal({atom,A}) when is_atom(A) -> A;
+get_literal({float,F}) when is_float(F) -> F;
+get_literal({integer,I}) when is_integer(I) -> I;
+get_literal({literal,L}) -> L;
+get_literal(T) -> error({not_literal,T}).
+
+
branch_arities([], _, #vst{}=Vst) -> Vst;
branch_arities([Sz,{f,L}|T], Tuple, #vst{current=St}=Vst0)
when is_integer(Sz) ->
diff --git a/lib/compiler/src/beam_z.erl b/lib/compiler/src/beam_z.erl
index 8c6b0c916d..c2a6ef604e 100644
--- a/lib/compiler/src/beam_z.erl
+++ b/lib/compiler/src/beam_z.erl
@@ -74,6 +74,22 @@ undo_rename({bs_init,F,{I,Extra,U,Flags},Live,[Sz,Src],Dst}) ->
{I,F,Sz,Extra,Live,U,Src,Flags,Dst};
undo_rename({bs_init,_,bs_init_writable=I,_,_,_}) ->
I;
+undo_rename({put_map,Fail,assoc,S,D,R,L}) ->
+ {put_map_assoc,Fail,S,D,R,L};
+undo_rename({put_map,Fail,exact,S,D,R,L}) ->
+ {put_map_exact,Fail,S,D,R,L};
+undo_rename({test,has_map_fields,Fail,[Src|List]}) ->
+ {test,has_map_fields,Fail,Src,{list,[to_typed_literal(V)||V<-List]}};
+undo_rename({get_map_elements,Fail,Src,{list, List}}) ->
+ {get_map_elements,Fail,Src,{list,[to_typed_literal(V)||V<-List]}};
undo_rename({select,I,Reg,Fail,List}) ->
{I,Reg,Fail,{list,List}};
undo_rename(I) -> I.
+
+%% to_typed_literal(Arg)
+%% transform Arg to specific literal i.e. float | integer | atom if applicable
+to_typed_literal({literal, V}) when is_float(V) -> {float, V};
+to_typed_literal({literal, V}) when is_atom(V) -> {atom, V};
+to_typed_literal({literal, V}) when is_integer(V) -> {integer, V};
+to_typed_literal({literal, []}) -> nil;
+to_typed_literal(V) -> V.
diff --git a/lib/compiler/src/cerl.erl b/lib/compiler/src/cerl.erl
index 4b74d60e9f..9d6768b157 100644
--- a/lib/compiler/src/cerl.erl
+++ b/lib/compiler/src/cerl.erl
@@ -120,15 +120,23 @@
update_c_bitstr/5, update_c_bitstr/6, ann_c_bitstr/5,
ann_c_bitstr/6, is_c_bitstr/1, bitstr_val/1, bitstr_size/1,
bitstr_bitsize/1, bitstr_unit/1, bitstr_type/1,
- bitstr_flags/1]).
-
--export_type([c_binary/0, c_call/0, c_clause/0, c_cons/0, c_fun/0, c_literal/0,
- c_module/0, c_tuple/0, c_values/0, c_var/0, cerl/0, var_name/0]).
-
-%%
-%% needed by the include file below -- do not move
-%%
--type var_name() :: integer() | atom() | {atom(), integer()}.
+ bitstr_flags/1,
+
+ %% keep map exports here for now
+ map_es/1,
+ map_arg/1,
+ update_c_map/3,
+ c_map/1, is_c_map_empty/1,
+ ann_c_map/2, ann_c_map/3,
+ map_pair_op/1,map_pair_key/1,map_pair_val/1,
+ update_c_map_pair/4,
+ c_map_pair/2,
+ ann_c_map_pair/4
+ ]).
+
+-export_type([c_binary/0, c_bitstr/0, c_call/0, c_clause/0, c_cons/0, c_fun/0,
+ c_literal/0, c_map/0, c_map_pair/0, c_module/0, c_tuple/0,
+ c_values/0, c_var/0, cerl/0, var_name/0]).
-include("core_parse.hrl").
@@ -145,6 +153,8 @@
-type c_let() :: #c_let{}.
-type c_letrec() :: #c_letrec{}.
-type c_literal() :: #c_literal{}.
+-type c_map() :: #c_map{}.
+-type c_map_pair() :: #c_map_pair{}.
-type c_module() :: #c_module{}.
-type c_primop() :: #c_primop{}.
-type c_receive() :: #c_receive{}.
@@ -155,11 +165,14 @@
-type c_var() :: #c_var{}.
-type cerl() :: c_alias() | c_apply() | c_binary() | c_bitstr()
- | c_call() | c_case() | c_catch() | c_clause() | c_cons()
+ | c_call() | c_case() | c_catch() | c_clause() | c_cons()
| c_fun() | c_let() | c_letrec() | c_literal()
- | c_module() | c_primop() | c_receive() | c_seq()
+ | c_map() | c_map_pair()
+ | c_module() | c_primop() | c_receive() | c_seq()
| c_try() | c_tuple() | c_values() | c_var().
+-type var_name() :: integer() | atom() | {atom(), integer()}.
+
%% =====================================================================
%% Representation (general)
%%
@@ -191,13 +204,15 @@
%% <td>call</td>
%% <td>case</td>
%% <td>catch</td>
-%% </tr><tr>
%% <td>clause</td>
+%% </tr><tr>
%% <td>cons</td>
%% <td>fun</td>
%% <td>let</td>
%% <td>letrec</td>
%% <td>literal</td>
+%% <td>map</td>
+%% <td>map_pair</td>
%% <td>module</td>
%% </tr><tr>
%% <td>primop</td>
@@ -248,10 +263,10 @@
%% @see subtrees/1
%% @see meta/1
--type ctype() :: 'alias' | 'apply' | 'binary' | 'bitrst' | 'call' | 'case'
- | 'catch' | 'clause' | 'cons' | 'fun' | 'let' | 'letrec'
- | 'literal' | 'module' | 'primop' | 'receive' | 'seq' | 'try'
- | 'tuple' | 'values' | 'var'.
+-type ctype() :: 'alias' | 'apply' | 'binary' | 'bitrst' | 'call' | 'case'
+ | 'catch' | 'clause' | 'cons' | 'fun' | 'let' | 'letrec'
+ | 'literal' | 'map' | 'map_pair' | 'module' | 'primop'
+ | 'receive' | 'seq' | 'try' | 'tuple' | 'values' | 'var'.
-spec type(cerl()) -> ctype().
@@ -268,6 +283,8 @@ type(#c_fun{}) -> 'fun';
type(#c_let{}) -> 'let';
type(#c_letrec{}) -> letrec;
type(#c_literal{}) -> literal;
+type(#c_map{}) -> map;
+type(#c_map_pair{}) -> map_pair;
type(#c_module{}) -> module;
type(#c_primop{}) -> primop;
type(#c_receive{}) -> 'receive';
@@ -1558,6 +1575,104 @@ ann_make_list(_, [], Node) ->
%% ---------------------------------------------------------------------
+%% maps
+
+-spec map_es(c_map()) -> [c_map_pair()].
+
+map_es(#c_map{es = Es}) ->
+ Es.
+
+-spec map_arg(c_map()) -> c_map() | c_literal().
+
+map_arg(#c_map{arg=M}) ->
+ M.
+
+-spec c_map([c_map_pair()]) -> c_map().
+
+c_map(Pairs) ->
+ #c_map{es=Pairs}.
+
+-spec is_c_map_empty(c_map() | c_literal()) -> boolean().
+
+is_c_map_empty(#c_map{ es=[] }) -> true;
+is_c_map_empty(#c_literal{val=M}) when is_map(M),map_size(M) =:= 0 -> true;
+is_c_map_empty(_) -> false.
+
+-spec ann_c_map([term()], [cerl()]) -> c_map() | c_literal().
+
+ann_c_map(As,Es) ->
+ ann_c_map(As, #c_literal{val=#{}}, Es).
+
+-spec ann_c_map([term()], c_map() | c_literal(), [c_map_pair()]) -> c_map() | c_literal().
+
+ann_c_map(As,#c_literal{val=Mval}=M,Es) when is_map(Mval), map_size(Mval) =:= 0 ->
+ Pairs = [[Ck,Cv]||#c_map_pair{key=Ck,val=Cv}<-Es],
+ IsLit = lists:foldl(fun(Pair,Res) ->
+ Res andalso is_lit_list(Pair)
+ end, true, Pairs),
+ Fun = fun(Pair) -> [K,V] = lit_list_vals(Pair), {K,V} end,
+ case IsLit of
+ false ->
+ #c_map{arg=M, es=Es, anno=As };
+ true ->
+ #c_literal{anno=As, val=maps:from_list(lists:map(Fun, Pairs))}
+ end;
+ann_c_map(As,#c_literal{val=M},Es) when is_map(M) ->
+ fold_map_pairs(As,Es,M);
+ann_c_map(As,M,Es) ->
+ #c_map{arg=M, es=Es, anno=As }.
+
+fold_map_pairs(As,[],M) -> #c_literal{anno=As,val=M};
+%% M#{ K => V}
+fold_map_pairs(As,[#c_map_pair{op=#c_literal{val=assoc},key=Ck,val=Cv}=E|Es],M) ->
+ case is_lit_list([Ck,Cv]) of
+ true ->
+ [K,V] = lit_list_vals([Ck,Cv]),
+ fold_map_pairs(As,Es,maps:put(K,V,M));
+ false ->
+ #c_map{arg=#c_literal{val=M,anno=As}, es=[E|Es], anno=As }
+ end;
+%% M#{ K := V}
+fold_map_pairs(As,[#c_map_pair{op=#c_literal{val=exact},key=Ck,val=Cv}=E|Es],M) ->
+ case is_lit_list([Ck,Cv]) of
+ true ->
+ [K,V] = lit_list_vals([Ck,Cv]),
+ case maps:is_key(K,M) of
+ true -> fold_map_pairs(As,Es,maps:put(K,V,M));
+ false ->
+ #c_map{arg=#c_literal{val=M,anno=As}, es=[E|Es], anno=As }
+ end;
+ false ->
+ #c_map{arg=#c_literal{val=M,anno=As}, es=[E|Es], anno=As }
+ end;
+fold_map_pairs(As,Es,M) ->
+ #c_map{arg=#c_literal{val=M,anno=As}, es=Es, anno=As }.
+
+%-spec update_c_map(c_map() | c_literal(), [c_map_pair()]) -> c_map() | c_literal().
+
+update_c_map(Old,M,Es) ->
+ #c_map{arg=M, es = Es, anno = get_ann(Old)}.
+
+map_pair_key(#c_map_pair{key=K}) -> K.
+map_pair_val(#c_map_pair{val=V}) -> V.
+map_pair_op(#c_map_pair{op=Op}) -> Op.
+
+-spec c_map_pair(cerl(), cerl()) -> c_map_pair().
+
+c_map_pair(Key,Val) ->
+ #c_map_pair{op=#c_literal{val=assoc},key=Key,val=Val}.
+
+-spec ann_c_map_pair([term()], cerl(), cerl(), cerl()) ->
+ c_map_pair().
+
+ann_c_map_pair(As,Op,K,V) ->
+ #c_map_pair{op=Op, key = K, val=V, anno = As}.
+
+update_c_map_pair(Old,Op,K,V) ->
+ #c_map_pair{op=Op, key=K, val=V, anno = get_ann(Old)}.
+
+
+%% ---------------------------------------------------------------------
%% @spec c_tuple(Elements::[cerl()]) -> cerl()
%%
@@ -2945,6 +3060,10 @@ pat_vars(Node, Vs) ->
pat_vars(cons_hd(Node), pat_vars(cons_tl(Node), Vs));
tuple ->
pat_list_vars(tuple_es(Node), Vs);
+ map ->
+ pat_list_vars(map_es(Node), Vs);
+ map_pair ->
+ pat_list_vars([map_pair_op(Node),map_pair_key(Node),map_pair_val(Node)],Vs);
binary ->
pat_list_vars(binary_segments(Node), Vs);
bitstr ->
@@ -3803,7 +3922,6 @@ data_type(#c_cons{}) ->
data_type(#c_tuple{}) ->
tuple.
-
%% @spec data_es(Node::cerl()) -> [cerl()]
%%
%% @doc Returns the list of subtrees of a data constructor node. If
@@ -3835,7 +3953,6 @@ data_es(#c_cons{hd = H, tl = T}) ->
data_es(#c_tuple{es = Es}) ->
Es.
-
%% @spec data_arity(Node::cerl()) -> integer()
%%
%% @doc Returns the number of subtrees of a data constructor
@@ -3892,7 +4009,6 @@ ann_make_data(As, {atomic, V}, []) -> #c_literal{val = V, anno = As};
ann_make_data(As, cons, [H, T]) -> ann_c_cons(As, H, T);
ann_make_data(As, tuple, Es) -> ann_c_tuple(As, Es).
-
%% @spec update_data(Old::cerl(), Type::dtype(),
%% Elements::[cerl()]) -> cerl()
%% @see make_data/2
@@ -4022,6 +4138,10 @@ subtrees(T) ->
[[cons_hd(T)], [cons_tl(T)]];
tuple ->
[tuple_es(T)];
+ map ->
+ [map_es(T)];
+ map_pair ->
+ [[map_pair_op(T)],[map_pair_key(T)],[map_pair_val(T)]];
'let' ->
[let_vars(T), [let_arg(T)], [let_body(T)]];
seq ->
@@ -4143,6 +4263,9 @@ ann_make_tree(As, bitstr, [[V],[S],[U],[T],[Fs]]) ->
ann_c_bitstr(As, V, S, U, T, Fs);
ann_make_tree(As, cons, [[H], [T]]) -> ann_c_cons(As, H, T);
ann_make_tree(As, tuple, [Es]) -> ann_c_tuple(As, Es);
+ann_make_tree(As, map, [Es]) -> ann_c_map(As, Es);
+ann_make_tree(As, map, [[A], Es]) -> ann_c_map(As, A, Es);
+ann_make_tree(As, map_pair, [[Op], [K], [V]]) -> ann_c_map_pair(As, Op, K, V);
ann_make_tree(As, 'let', [Vs, [A], [B]]) -> ann_c_let(As, Vs, A, B);
ann_make_tree(As, seq, [[A], [B]]) -> ann_c_seq(As, A, B);
ann_make_tree(As, apply, [[Op], Es]) -> ann_c_apply(As, Op, Es);
@@ -4272,12 +4395,8 @@ meta_1(cons, Node) ->
%% we get exactly one element, we generate a 'c_cons' call
%% instead of 'make_list' to reconstruct the node.
case split_list(Node) of
- {[H], none} ->
- meta_call(c_cons, [meta(H), meta(c_nil())]);
{[H], Node1} ->
meta_call(c_cons, [meta(H), meta(Node1)]);
- {L, none} ->
- meta_call(make_list, [make_list(meta_list(L))]);
{L, Node1} ->
meta_call(make_list,
[make_list(meta_list(L)), meta(Node1)])
@@ -4364,8 +4483,6 @@ split_list(Node, L) ->
case type(Node) of
cons when A =:= [] ->
split_list(cons_tl(Node), [cons_hd(Node) | L]);
- nil when A =:= [] ->
- {lists:reverse(L), none};
_ ->
{lists:reverse(L), Node}
end.
diff --git a/lib/compiler/src/cerl_clauses.erl b/lib/compiler/src/cerl_clauses.erl
index 99fa8dd9d5..87bd47c08b 100644
--- a/lib/compiler/src/cerl_clauses.erl
+++ b/lib/compiler/src/cerl_clauses.erl
@@ -354,6 +354,29 @@ match(P, E, Bs) ->
{false, Bs}
end
end;
+ map ->
+ %% The most we can do is to say "definitely no match" if a
+ %% map pattern is matched against non-map data.
+ case E of
+ any ->
+ {false, Bs};
+ _ ->
+ case type(E) of
+ literal ->
+ case is_map(concrete(E)) of
+ false ->
+ none;
+ true ->
+ {false, Bs}
+ end;
+ cons ->
+ none;
+ tuple ->
+ none;
+ _ ->
+ {false, Bs}
+ end
+ end;
_ ->
match_1(P, E, Bs)
end.
diff --git a/lib/compiler/src/cerl_inline.erl b/lib/compiler/src/cerl_inline.erl
index c6de63c69f..75740e8b9d 100644
--- a/lib/compiler/src/cerl_inline.erl
+++ b/lib/compiler/src/cerl_inline.erl
@@ -42,7 +42,7 @@
bitstr_flags/1, binary_segments/1, update_c_alias/3,
update_c_apply/3, update_c_binary/2, update_c_bitstr/6,
update_c_call/4, update_c_case/3, update_c_catch/2,
- update_c_clause/4, c_fun/2, c_int/1, c_let/3,
+ update_c_clause/4, c_fun/2, c_int/1, c_let/3, ann_c_let/4,
update_c_let/4, update_c_letrec/3, update_c_module/5,
update_c_primop/3, update_c_receive/4, update_c_seq/3,
c_seq/2, update_c_try/6, c_tuple/1, update_c_values/2,
@@ -51,7 +51,7 @@
catch_body/1, clause_body/1, clause_guard/1,
clause_pats/1, clause_vars/1, concrete/1, cons_hd/1,
cons_tl/1, data_arity/1, data_es/1, data_type/1,
- fun_body/1, fun_vars/1, get_ann/1, int_val/1,
+ fname_arity/1, fun_body/1, fun_vars/1, get_ann/1, int_val/1,
is_c_atom/1, is_c_cons/1, is_c_fname/1, is_c_int/1,
is_c_list/1, is_c_seq/1, is_c_tuple/1, is_c_var/1,
is_data/1, is_literal/1, is_literal_term/1, let_arg/1,
@@ -63,7 +63,11 @@
receive_clauses/1, receive_timeout/1, seq_arg/1,
seq_body/1, set_ann/2, try_arg/1, try_body/1, try_vars/1,
try_evars/1, try_handler/1, tuple_es/1, tuple_arity/1,
- type/1, values_es/1, var_name/1]).
+ type/1, values_es/1, var_name/1,
+ map_arg/1, map_es/1, update_c_map/3,
+ update_c_map_pair/4,
+ map_pair_op/1, map_pair_key/1, map_pair_val/1
+ ]).
-import(lists, [foldl/3, foldr/3, mapfoldl/3, reverse/1]).
@@ -128,6 +132,8 @@ weight(call) -> 3; % Assume remote-calls as efficient as `apply'.
weight(primop) -> 2; % Assume more efficient than `apply'.
weight(binary) -> 4; % Initialisation base cost.
weight(bitstr) -> 3; % Coding/decoding a value; like a primop.
+weight(map) -> 4; % Initialisation base cost.
+weight(map_pair) -> 3; % Coding/decoding a value; like a primop.
weight(module) -> 1. % Like a letrec with a constant body
%% These "reference" structures are used for variables and function
@@ -333,6 +339,8 @@ i(E, Ctxt, Ren, Env, S0) ->
i_catch(E, Ctxt, Ren, Env, S);
binary ->
i_binary(E, Ren, Env, S);
+ map ->
+ i_map(E, Ctxt, Ren, Env, S);
module ->
i_module(E, Ctxt, Ren, Env, S)
end
@@ -1022,8 +1030,17 @@ i_apply(E, Ctxt, Ren, Env, S) ->
visit_and_count_size(Opnd, S)
end,
S3, Opnds),
- N = apply_size(length(Es)),
- {update_c_apply(E, E1, Es), count_size(N, S4)}
+ Arity = length(Es),
+ E2 = case is_c_fname(E1) andalso length(Es) =/= fname_arity(E1) of
+ true ->
+ V = new_var(Env),
+ ann_c_let(get_ann(E), [V], E1,
+ update_c_apply(E, V, Es));
+ false ->
+ update_c_apply(E, E1, Es)
+ end,
+ N = apply_size(Arity),
+ {E2, count_size(N, S4)}
end.
apply_size(A) ->
@@ -1324,6 +1341,25 @@ i_bitstr(E, Ren, Env, S) ->
S3 = count_size(weight(bitstr), S2),
{update_c_bitstr(E, Val, Size, Unit, Type, Flags), S3}.
+i_map(E, Ctx, Ren, Env, S) ->
+ %% Visit the segments for value.
+ {M1, S1} = i(map_arg(E), value, Ren, Env, S),
+ {Es, S2} = mapfoldl(fun (E, S) ->
+ i_map_pair(E, Ctx, Ren, Env, S)
+ end, S1, map_es(E)),
+ S3 = count_size(weight(map), S2),
+ {update_c_map(E, M1,Es), S3}.
+
+i_map_pair(E, Ctx, Ren, Env, S) ->
+ %% It is not necessary to visit the Op and Key fields,
+ %% since these are always literals.
+ {Val, S1} = i(map_pair_val(E), Ctx, Ren, Env, S),
+ Op = map_pair_op(E),
+ Key = map_pair_key(E),
+ S2 = count_size(weight(map_pair), S1),
+ {update_c_map_pair(E, Op, Key, Val), S2}.
+
+
%% This is a simplified version of `i_pattern', for lists of parameter
%% variables only. It does not modify the state.
@@ -1383,6 +1419,16 @@ i_pattern(E, Ren, Env, Ren0, Env0, S) ->
S, binary_segments(E)),
S2 = count_size(weight(binary), S1),
{update_c_binary(E, Es), S2};
+ map ->
+ %% map patterns should not have args
+ M = map_arg(E),
+
+ {Es, S1} = mapfoldl(fun (E, S) ->
+ i_map_pair_pattern(E, Ren, Env, Ren0, Env0, S)
+ end,
+ S, map_es(E)),
+ S2 = count_size(weight(map), S1),
+ {update_c_map(E, M, Es), S2};
_ ->
case is_literal(E) of
true ->
@@ -1416,6 +1462,15 @@ i_bitstr_pattern(E, Ren, Env, Ren0, Env0, S) ->
S3 = count_size(weight(bitstr), S2),
{update_c_bitstr(E, Val, Size, Unit, Type, Flags), S3}.
+i_map_pair_pattern(E, Ren, Env, Ren0, Env0, S) ->
+ %% It is not necessary to visit the Op it is always a literal.
+ %% Same goes for Key
+ {Val, S1} = i_pattern(map_pair_val(E), Ren, Env, Ren0, Env0, S),
+ Op = map_pair_op(E), %% should be 'exact' literal
+ Key = map_pair_key(E),
+ S2 = count_size(weight(map_pair), S1),
+ {update_c_map_pair(E, Op, Key, Val), S2}.
+
%% ---------------------------------------------------------------------
%% Other central inlining functions
diff --git a/lib/compiler/src/cerl_trees.erl b/lib/compiler/src/cerl_trees.erl
index 1e3755025f..e53bdd4efb 100644
--- a/lib/compiler/src/cerl_trees.erl
+++ b/lib/compiler/src/cerl_trees.erl
@@ -55,7 +55,15 @@
update_c_let/4, update_c_letrec/3, update_c_module/5,
update_c_primop/3, update_c_receive/4, update_c_seq/3,
update_c_try/6, update_c_tuple/2, update_c_tuple_skel/2,
- update_c_values/2, values_es/1, var_name/1]).
+ update_c_values/2, values_es/1, var_name/1,
+
+ map_arg/1, map_es/1,
+ ann_c_map/3,
+ update_c_map/3,
+ map_pair_key/1,map_pair_val/1,map_pair_op/1,
+ ann_c_map_pair/4,
+ update_c_map_pair/4
+ ]).
%% ---------------------------------------------------------------------
@@ -129,6 +137,12 @@ map_1(F, T) ->
map(F, cons_tl(T)));
tuple ->
update_c_tuple_skel(T, map_list(F, tuple_es(T)));
+ map ->
+ update_c_map(T, map(F, map_arg(T)), map_list(F, map_es(T)));
+ map_pair ->
+ update_c_map_pair(T, map(F, map_pair_op(T)),
+ map(F, map_pair_key(T)),
+ map(F, map_pair_val(T)));
'let' ->
update_c_let(T, map_list(F, let_vars(T)),
map(F, let_arg(T)),
@@ -235,6 +249,14 @@ fold_1(F, S, T) ->
fold(F, fold(F, S, cons_hd(T)), cons_tl(T));
tuple ->
fold_list(F, S, tuple_es(T));
+ map ->
+ fold_list(F, S, map_es(T));
+ map_pair ->
+ fold(F,
+ fold(F,
+ fold(F, S, map_pair_op(T)),
+ map_pair_key(T)),
+ map_pair_val(T));
'let' ->
fold(F, fold(F, fold_list(F, S, let_vars(T)),
let_arg(T)),
@@ -349,6 +371,15 @@ mapfold(F, S0, T) ->
tuple ->
{Ts, S1} = mapfold_list(F, S0, tuple_es(T)),
F(update_c_tuple_skel(T, Ts), S1);
+ map ->
+ {M , S1} = mapfold(F, S0, map_arg(T)),
+ {Ts, S2} = mapfold_list(F, S1, map_es(T)),
+ F(update_c_map(T, M, Ts), S2);
+ map_pair ->
+ {Op, S1} = mapfold(F, S0, map_pair_op(T)),
+ {Key, S2} = mapfold(F, S1, map_pair_key(T)),
+ {Val, S3} = mapfold(F, S2, map_pair_val(T)),
+ F(update_c_map_pair(T,Op,Key,Val), S3);
'let' ->
{Vs, S1} = mapfold_list(F, S0, let_vars(T)),
{A, S2} = mapfold(F, S1, let_arg(T)),
@@ -488,6 +519,10 @@ variables(T, S) ->
variables(cons_tl(T), S));
tuple ->
vars_in_list(tuple_es(T), S);
+ map ->
+ vars_in_list(map_es(T), S);
+ map_pair ->
+ vars_in_list([map_pair_op(T),map_pair_key(T), map_pair_val(T)], S);
'let' ->
Vs = variables(let_body(T), S),
Vs1 = var_list_names(let_vars(T)),
@@ -688,6 +723,17 @@ label(T, N, Env) ->
{Ts, N1} = label_list(tuple_es(T), N, Env),
{As, N2} = label_ann(T, N1),
{ann_c_tuple_skel(As, Ts), N2};
+ map ->
+ {M, N1} = label(map_arg(T), N, Env),
+ {Ts, N2} = label_list(map_es(T), N1, Env),
+ {As, N3} = label_ann(T, N2),
+ {ann_c_map(As, M, Ts), N3};
+ map_pair ->
+ {Op, N1} = label(map_pair_op(T), N, Env),
+ {Val, N2} = label(map_pair_key(T), N1, Env),
+ {Key, N3} = label(map_pair_val(T), N2, Env),
+ {As, N4} = label_ann(T, N3),
+ {ann_c_map_pair(As,Op,Key,Val), N4};
'let' ->
{A, N1} = label(let_arg(T), N, Env),
{Vs, N2, Env1} = label_vars(let_vars(T), N1, Env),
diff --git a/lib/compiler/src/compile.erl b/lib/compiler/src/compile.erl
index 38a733751a..c7d91070f6 100644
--- a/lib/compiler/src/compile.erl
+++ b/lib/compiler/src/compile.erl
@@ -230,12 +230,27 @@ format_error({undef_parse_transform,M}) ->
format_error({core_transform,M,R}) ->
io_lib:format("error in core transform '~s': ~tp", [M, R]);
format_error({crash,Pass,Reason}) ->
- io_lib:format("internal error in ~p;\ncrash reason: ~tp", [Pass,Reason]);
+ io_lib:format("internal error in ~p;\ncrash reason: ~ts", [Pass,format_error_reason(Reason)]);
format_error({bad_return,Pass,Reason}) ->
- io_lib:format("internal error in ~p;\nbad return value: ~tp", [Pass,Reason]);
+ io_lib:format("internal error in ~p;\nbad return value: ~ts", [Pass,format_error_reason(Reason)]);
format_error({module_name,Mod,Filename}) ->
- io_lib:format("Module name '~s' does not match file name '~ts'",
- [Mod,Filename]).
+ io_lib:format("Module name '~s' does not match file name '~ts'", [Mod,Filename]);
+format_error(reparsing_invalid_unicode) ->
+ "Non-UTF-8 character(s) detected, but no encoding declared. Encode the file in UTF-8 or add \"%% coding: latin-1\" at the beginning of the file. Retrying with latin-1 encoding.".
+
+format_error_reason({Reason, Stack}) when is_list(Stack) ->
+ StackFun = fun
+ (escript, run, 2) -> true;
+ (escript, start, 1) -> true;
+ (init, start_it, 1) -> true;
+ (init, start_em, 1) -> true;
+ (_Mod, _Fun, _Arity) -> false
+ end,
+ FormatFun = fun (Term, _) -> io_lib:format("~tp", [Term]) end,
+ [io_lib:format("~tp", [Reason]),"\n\n",
+ lib:format_stacktrace(1, Stack, StackFun, FormatFun)];
+format_error_reason(Reason) ->
+ io_lib:format("~tp", [Reason]).
%% The compile state record.
-record(compile, {filename="" :: file:filename(),
@@ -417,10 +432,9 @@ pass(from_core) ->
pass(from_asm) ->
{".S",[?pass(beam_consult_asm)|asm_passes()]};
pass(asm) ->
- %% TODO: remove 'asm' in R18
- io:format("compile:file/2 option 'asm' has been deprecated and will be "
- "removed in R18.~n"
- "Use 'from_asm' instead.~n"),
+ %% TODO: remove 'asm' in 18.0
+ io:format("compile:file/2 option 'asm' has been deprecated and will be~n"
+ "removed in the 18.0 release. Use 'from_asm' instead.~n"),
pass(from_asm);
pass(from_beam) ->
{".beam",[?pass(read_beam_file)|binary_passes()]};
@@ -610,9 +624,11 @@ core_passes() ->
[{core_old_inliner,fun test_old_inliner/1,fun core_old_inliner/1},
{iff,doldinline,{listing,"oldinline"}},
?pass(core_fold_module),
+ {iff,dcorefold,{listing,"corefold"}},
{core_inline_module,fun test_core_inliner/1,fun core_inline_module/1},
{iff,dinline,{listing,"inline"}},
- {core_fold_after_inline,fun test_core_inliner/1,fun core_fold_module/1},
+ {core_fold_after_inlining,fun test_any_inliner/1,
+ fun core_fold_module_after_inlining/1},
?pass(core_transforms)]},
{iff,dcopt,{listing,"copt"}},
{iff,'to_core',{done,"core"}}]}
@@ -778,20 +794,59 @@ no_native_compilation(BeamFile, #compile{options=Opts0}) ->
_ -> false
end.
-parse_module(St) ->
- Opts = St#compile.options,
- Cwd = ".",
- IncludePath = [Cwd, St#compile.dir|inc_paths(Opts)],
- R = epp:parse_file(St#compile.ifile, IncludePath, pre_defs(Opts)),
+parse_module(St0) ->
+ case do_parse_module(utf8, St0) of
+ {ok,_}=Ret ->
+ Ret;
+ {error,_}=Ret ->
+ Ret;
+ {invalid_unicode,File,Line} ->
+ case do_parse_module(latin1, St0) of
+ {ok,St} ->
+ Es = [{File,[{Line,?MODULE,reparsing_invalid_unicode}]}],
+ {ok,St#compile{warnings=Es++St#compile.warnings}};
+ {error,St} ->
+ Es = [{File,[{Line,?MODULE,reparsing_invalid_unicode}]}],
+ {error,St#compile{errors=Es++St#compile.errors}}
+ end
+ end.
+
+do_parse_module(DefEncoding, #compile{ifile=File,options=Opts,dir=Dir}=St) ->
+ R = epp:parse_file(File,
+ [{includes,[".",Dir|inc_paths(Opts)]},
+ {macros,pre_defs(Opts)},
+ {default_encoding,DefEncoding},
+ extra]),
case R of
- {ok,Forms} ->
- Encoding = epp:read_encoding(St#compile.ifile),
- {ok,St#compile{code=Forms,encoding=Encoding}};
+ {ok,Forms,Extra} ->
+ Encoding = proplists:get_value(encoding, Extra),
+ case find_invalid_unicode(Forms, File) of
+ none ->
+ {ok,St#compile{code=Forms,encoding=Encoding}};
+ {invalid_unicode,_,_}=Ret ->
+ case Encoding of
+ none ->
+ Ret;
+ _ ->
+ {ok,St#compile{code=Forms,encoding=Encoding}}
+ end
+ end;
{error,E} ->
Es = [{St#compile.ifile,[{none,?MODULE,{epp,E}}]}],
{error,St#compile{errors=St#compile.errors ++ Es}}
end.
+find_invalid_unicode([H|T], File0) ->
+ case H of
+ {attribute,_,file,{File,_}} ->
+ find_invalid_unicode(T, File);
+ {error,{Line,file_io_server,invalid_unicode}} ->
+ {invalid_unicode,File0,Line};
+ _Other ->
+ find_invalid_unicode(T, File0)
+ end;
+find_invalid_unicode([], _) -> none.
+
parse_core(St) ->
case file:read_file(St#compile.ifile) of
{ok,Bin} ->
@@ -1134,6 +1189,12 @@ core_fold_module(#compile{code=Code0,options=Opts,warnings=Warns}=St) ->
{ok,Code,Ws} = sys_core_fold:module(Code0, Opts),
{ok,St#compile{code=Code,warnings=Warns ++ Ws}}.
+core_fold_module_after_inlining(#compile{code=Code0,options=Opts}=St) ->
+ %% Inlining may produce code that generates spurious warnings.
+ %% Ignore all warnings.
+ {ok,Code,_Ws} = sys_core_fold:module(Code0, Opts),
+ {ok,St#compile{code=Code}}.
+
test_old_inliner(#compile{options=Opts}) ->
%% The point of this test is to avoid loading the old inliner
%% if we know that it will not be used.
@@ -1152,6 +1213,9 @@ test_core_inliner(#compile{options=Opts}) ->
end, Opts)
end.
+test_any_inliner(St) ->
+ test_old_inliner(St) orelse test_core_inliner(St).
+
core_old_inliner(#compile{code=Code0,options=Opts}=St) ->
{ok,Code} = sys_core_inline:module(Code0, Opts),
{ok,St#compile{code=Code}}.
diff --git a/lib/compiler/src/compiler.app.src b/lib/compiler/src/compiler.app.src
index 8775c84698..8f68915f8e 100644
--- a/lib/compiler/src/compiler.app.src
+++ b/lib/compiler/src/compiler.app.src
@@ -67,4 +67,6 @@
]},
{registered, []},
{applications, [kernel, stdlib]},
- {env, []}]}.
+ {env, []},
+ {runtime_dependencies, ["stdlib-2.0","kernel-3.0","hipe-3.10.3","erts-6.0",
+ "crypto-3.3"]}]}.
diff --git a/lib/compiler/src/compiler.appup.src b/lib/compiler/src/compiler.appup.src
index 54a63833e6..fe273b269c 100644
--- a/lib/compiler/src/compiler.appup.src
+++ b/lib/compiler/src/compiler.appup.src
@@ -1 +1,21 @@
-{"%VSN%",[],[]}.
+%% -*- erlang -*-
+%% %CopyrightBegin%
+%%
+%% Copyright Ericsson AB 2014. 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%
+{"%VSN%",
+ [{<<".*">>,[{restart_application, compiler}]}],
+ [{<<".*">>,[{restart_application, compiler}]}]
+}.
diff --git a/lib/compiler/src/core_lib.erl b/lib/compiler/src/core_lib.erl
index 824be9ff7f..2792fd8fa5 100644
--- a/lib/compiler/src/core_lib.erl
+++ b/lib/compiler/src/core_lib.erl
@@ -59,7 +59,7 @@ is_lit_bin(Es) ->
%% Return the value of LitExpr.
-spec literal_value(cerl:c_literal() | cerl:c_binary() |
- cerl:c_cons() | cerl:c_tuple()) -> term().
+ cerl:c_map() | cerl:c_cons() | cerl:c_tuple()) -> term().
literal_value(#c_literal{val=V}) -> V;
literal_value(#c_binary{segments=Es}) ->
@@ -67,7 +67,14 @@ literal_value(#c_binary{segments=Es}) ->
literal_value(#c_cons{hd=H,tl=T}) ->
[literal_value(H)|literal_value(T)];
literal_value(#c_tuple{es=Es}) ->
- list_to_tuple(literal_value_list(Es)).
+ list_to_tuple(literal_value_list(Es));
+literal_value(#c_map{arg=Cm,es=Cmps}) ->
+ M = literal_value(Cm),
+ lists:foldl(fun(#c_map_pair{ key=Ck, val=Cv },Mi) ->
+ K = literal_value(Ck),
+ V = literal_value(Cv),
+ maps:put(K,V,Mi)
+ end, M, Cmps).
literal_value_list(Vals) -> [literal_value(V) || V <- Vals].
@@ -105,6 +112,10 @@ vu_expr(V, #c_cons{hd=H,tl=T}) ->
vu_expr(V, H) orelse vu_expr(V, T);
vu_expr(V, #c_tuple{es=Es}) ->
vu_expr_list(V, Es);
+vu_expr(V, #c_map{arg=M,es=Es}) ->
+ vu_expr(V, M) orelse vu_expr_list(V, Es);
+vu_expr(V, #c_map_pair{key=Key,val=Val}) ->
+ vu_expr_list(V, [Key,Val]);
vu_expr(V, #c_binary{segments=Ss}) ->
vu_seg_list(V, Ss);
vu_expr(V, #c_fun{vars=Vs,body=B}) ->
diff --git a/lib/compiler/src/core_lint.erl b/lib/compiler/src/core_lint.erl
index 67d37ff1fc..25df33a287 100644
--- a/lib/compiler/src/core_lint.erl
+++ b/lib/compiler/src/core_lint.erl
@@ -254,6 +254,10 @@ gexpr(#c_cons{hd=H,tl=T}, Def, _Rt, St) ->
gexpr_list([H,T], Def, St);
gexpr(#c_tuple{es=Es}, Def, _Rt, St) ->
gexpr_list(Es, Def, St);
+gexpr(#c_map{es=Es}, Def, _Rt, St) ->
+ gexpr_list(Es, Def, St);
+gexpr(#c_map_pair{key=K,val=V}, Def, _Rt, St) ->
+ gexpr_list([K,V], Def, St);
gexpr(#c_binary{segments=Ss}, Def, _Rt, St) ->
gbitstr_list(Ss, Def, St);
gexpr(#c_seq{arg=Arg,body=B}, Def, Rt, St0) ->
@@ -263,10 +267,21 @@ gexpr(#c_let{vars=Vs,arg=Arg,body=B}, Def, Rt, St0) ->
St1 = gbody(Arg, Def, let_varcount(Vs), St0), %This is a guard body
{Lvs,St2} = variable_list(Vs, St1),
gbody(B, union(Lvs, Def), Rt, St2);
-gexpr(#c_call{module=#c_literal{val=erlang},
- name=#c_literal{},
- args=As}, Def, 1, St) ->
- gexpr_list(As, Def, St);
+gexpr(#c_call{module=#c_literal{val=erlang},name=#c_literal{val=is_record},
+ args=[Arg,#c_literal{val=Tag},#c_literal{val=Size}]},
+ Def, 1, St) when is_atom(Tag), is_integer(Size) ->
+ gexpr(Arg, Def, 1, St);
+gexpr(#c_call{module=#c_literal{val=erlang},name=#c_literal{val=is_record}},
+ _Def, 1, St) ->
+ add_error({illegal_guard,St#lint.func}, St);
+gexpr(#c_call{module=#c_literal{val=erlang},name=#c_literal{val=Name},args=As},
+ Def, 1, St) when is_atom(Name) ->
+ case is_guard_bif(Name, length(As)) of
+ true ->
+ gexpr_list(As, Def, St);
+ false ->
+ add_error({illegal_guard,St#lint.func}, St)
+ end;
gexpr(#c_primop{name=#c_literal{val=A},args=As}, Def, _Rt, St0) when is_atom(A) ->
gexpr_list(As, Def, St0);
gexpr(#c_try{arg=E,vars=[#c_var{name=X}],body=#c_var{name=X},
@@ -278,6 +293,7 @@ gexpr(#c_case{arg=Arg,clauses=Cs}, Def, Rt, St0) ->
St1 = gbody(Arg, Def, PatCount, St0),
clauses(Cs, Def, PatCount, Rt, St1);
gexpr(_Core, _, _, St) ->
+ %%io:fwrite("clint gexpr: ~p~n", [_Core]),
add_error({illegal_guard,St#lint.func}, St).
%% gexpr_list([Expr], Defined, State) -> State.
@@ -293,6 +309,14 @@ gbitstr_list(Es, Def, St0) ->
gbitstr(#c_bitstr{val=V,size=S}, Def, St) ->
gexpr_list([V,S], Def, St).
+%% is_guard_bif(Name, Arity) -> Boolean.
+
+is_guard_bif(Name, Arity) ->
+ erl_internal:guard_bif(Name, Arity)
+ orelse erl_internal:arith_op(Name, Arity)
+ orelse erl_internal:bool_op(Name, Arity)
+ orelse erl_internal:comp_op(Name, Arity).
+
%% expr(Expr, Defined, RetCount, State) -> State.
expr(#c_var{name={_,_}=FA}, Def, _Rt, St) ->
@@ -303,6 +327,10 @@ expr(#c_cons{hd=H,tl=T}, Def, _Rt, St) ->
expr_list([H,T], Def, St);
expr(#c_tuple{es=Es}, Def, _Rt, St) ->
expr_list(Es, Def, St);
+expr(#c_map{es=Es}, Def, _Rt, St) ->
+ expr_list(Es, Def, St);
+expr(#c_map_pair{key=K,val=V},Def,_Rt,St) ->
+ expr_list([K,V],Def,St);
expr(#c_binary{segments=Ss}, Def, _Rt, St) ->
bitstr_list(Ss, Def, St);
expr(#c_fun{vars=Vs,body=B}, Def, Rt, St0) ->
@@ -355,7 +383,7 @@ expr(#c_try{arg=A,vars=Vs,body=B,evars=Evs,handler=H}, Def, Rt, St0) ->
{Ens,St5} = variable_list(Evs, St4),
body(H, union(Ens, Def), Rt, St5);
expr(_Other, _, _, St) ->
- %%io:fwrite("clint: ~p~n", [_Other]),
+ %%io:fwrite("clint expr: ~p~n", [_Other]),
add_error({illegal_expr,St#lint.func}, St).
%% expr_list([Expr], Defined, State) -> State.
@@ -454,13 +482,19 @@ pattern(#c_cons{hd=H,tl=T}, Def, Ps, St) ->
pattern_list([H,T], Def, Ps, St);
pattern(#c_tuple{es=Es}, Def, Ps, St) ->
pattern_list(Es, Def, Ps, St);
+pattern(#c_map{es=Es}, Def, Ps, St) ->
+ pattern_list(Es, Def, Ps, St);
+pattern(#c_map_pair{op=#c_literal{val=exact},key=K,val=V},Def,Ps,St) ->
+ pattern_list([K,V],Def,Ps,St);
pattern(#c_binary{segments=Ss}, Def, Ps, St0) ->
St = pat_bin_tail_check(Ss, St0),
pat_bin(Ss, Def, Ps, St);
pattern(#c_alias{var=V,pat=P}, Def, Ps, St0) ->
{Vvs,St1} = variable(V, Ps, St0),
pattern(P, Def, union(Vvs, Ps), St1);
-pattern(_, _, Ps, St) -> {Ps,add_error({not_pattern,St#lint.func}, St)}.
+pattern(_Other, _, Ps, St) ->
+ %%io:fwrite("clint pattern: ~p~n", [_Other]),
+ {Ps,add_error({not_pattern,St#lint.func}, St)}.
pat_var(N, _Def, Ps, St) ->
case is_element(N, Ps) of
diff --git a/lib/compiler/src/core_parse.hrl b/lib/compiler/src/core_parse.hrl
index 0b8f4d8895..4a00535360 100644
--- a/lib/compiler/src/core_parse.hrl
+++ b/lib/compiler/src/core_parse.hrl
@@ -34,7 +34,7 @@
-record(c_apply, {anno=[], op, % op :: Tree,
args}). % args :: [Tree]
--record(c_binary, {anno=[], segments}). % segments :: [#c_bitstr{}]
+-record(c_binary, {anno=[], segments :: [cerl:c_bitstr()]}).
-record(c_bitstr, {anno=[], val, % val :: Tree,
size, % size :: Tree,
@@ -70,6 +70,15 @@
-record(c_literal, {anno=[], val}). % val :: literal()
+-record(c_map, {anno=[],
+ arg=#c_literal{val=#{}} :: cerl:c_var() | cerl:c_literal(),
+ es :: [cerl:c_map_pair()]}).
+
+-record(c_map_pair, {anno=[],
+ op :: #c_literal{val::'assoc'} | #c_literal{val::'exact'},
+ key,
+ val}).
+
-record(c_module, {anno=[], name, % name :: Tree,
exports, % exports :: [Tree],
attrs, % attrs :: [#c_def{}],
diff --git a/lib/compiler/src/core_parse.yrl b/lib/compiler/src/core_parse.yrl
index 4e98a8c2da..a66ad4235f 100644
--- a/lib/compiler/src/core_parse.yrl
+++ b/lib/compiler/src/core_parse.yrl
@@ -21,6 +21,8 @@
%% Have explicit productions for annotated phrases named anno_XXX.
%% This just does an XXX and adds the annotation.
+Expect 0.
+
Nonterminals
module_definition module_export module_attribute module_defs
@@ -44,6 +46,9 @@ receive_expr timeout try_expr
sequence catch_expr
variable clause clause_pattern
+map_expr map_pairs map_pair map_pair_assoc map_pair_exact
+map_pattern map_pair_patterns map_pair_pattern
+
annotation anno_fun anno_expression anno_expressions
anno_variable anno_variables anno_pattern anno_patterns
anno_function_name
@@ -53,7 +58,7 @@ Terminals
%% Separators
-'(' ')' '{' '}' '[' ']' '|' ',' '->' '=' '/' '<' '>' ':' '-|' '#'
+'(' ')' '{' '}' '[' ']' '|' ',' '->' '=' '/' '<' '>' ':' '-|' '#' '~' '::'
%% Keywords (atoms are assumed to always be single-quoted).
@@ -166,6 +171,7 @@ anno_patterns -> anno_pattern : ['$1'].
other_pattern -> atomic_pattern : '$1'.
other_pattern -> tuple_pattern : '$1'.
+other_pattern -> map_pattern : '$1'.
other_pattern -> cons_pattern : '$1'.
other_pattern -> binary_pattern : '$1'.
other_pattern -> anno_variable '=' anno_pattern :
@@ -176,6 +182,16 @@ atomic_pattern -> atomic_literal : '$1'.
tuple_pattern -> '{' '}' : c_tuple([]).
tuple_pattern -> '{' anno_patterns '}' : c_tuple('$2').
+map_pattern -> '~' '{' '}' '~' : #c_map{es=[]}.
+map_pattern -> '~' '{' map_pair_patterns '}' '~' :
+ #c_map{es=lists:sort('$3')}.
+
+map_pair_patterns -> map_pair_pattern : ['$1'].
+map_pair_patterns -> map_pair_pattern ',' map_pair_patterns : ['$1' | '$3'].
+
+map_pair_pattern -> '~' '<' anno_pattern ',' anno_pattern '>' :
+ #c_map_pair{op=#c_literal{val=exact},key='$3',val='$5'}.
+
cons_pattern -> '[' anno_pattern tail_pattern :
#c_cons{hd='$2',tl='$3'}.
@@ -240,6 +256,7 @@ single_expression -> primop_expr : '$1'.
single_expression -> try_expr : '$1'.
single_expression -> sequence : '$1'.
single_expression -> catch_expr : '$1'.
+single_expression -> map_expr : '$1'.
literal -> atomic_literal : '$1'.
literal -> tuple_literal : '$1'.
@@ -267,6 +284,22 @@ tail_literal -> ',' literal tail_literal : #c_cons{hd='$2',tl='$3'}.
tuple -> '{' '}' : c_tuple([]).
tuple -> '{' anno_expressions '}' : c_tuple('$2').
+map_expr -> '~' '{' '}' '~' : #c_map{es=[]}.
+map_expr -> '~' '{' map_pairs '}' '~' : #c_map{es='$3'}.
+map_expr -> '~' '{' map_pairs '|' variable '}' '~' : #c_map{arg='$5',es='$3'}.
+map_expr -> '~' '{' map_pairs '|' map_expr '}' '~' : #c_map{arg='$5',es='$3'}.
+
+map_pairs -> map_pair : ['$1'].
+map_pairs -> map_pair ',' map_pairs : ['$1' | '$3'].
+
+map_pair -> map_pair_assoc : '$1'.
+map_pair -> map_pair_exact : '$1'.
+
+map_pair_assoc -> '::' '<' anno_expression ',' anno_expression'>' :
+ #c_map_pair{op=#c_literal{val=assoc},key='$3',val='$5'}.
+map_pair_exact -> '~' '<' anno_expression ',' anno_expression'>' :
+ #c_map_pair{op=#c_literal{val=exact},key='$3',val='$5'}.
+
cons -> '[' anno_expression tail : c_cons('$2', '$3').
tail -> ']' : #c_literal{val=[]}.
@@ -381,3 +414,5 @@ Erlang code.
tok_val(T) -> element(3, T).
tok_line(T) -> element(2, T).
+
+%% vim: syntax=erlang
diff --git a/lib/compiler/src/core_pp.erl b/lib/compiler/src/core_pp.erl
index 1f91a52be3..83412ecdd7 100644
--- a/lib/compiler/src/core_pp.erl
+++ b/lib/compiler/src/core_pp.erl
@@ -118,6 +118,16 @@ format_1(#c_literal{val=Tuple}, Ctxt) when is_tuple(Tuple) ->
format_1(#c_literal{anno=A,val=Bitstring}, Ctxt) when is_bitstring(Bitstring) ->
Segs = segs_from_bitstring(Bitstring),
format_1(#c_binary{anno=A,segments=Segs}, Ctxt);
+format_1(#c_literal{anno=A,val=M},Ctxt) when is_map(M) ->
+ Pairs = maps:to_list(M),
+ Op = case Ctxt of
+ #ctxt{ class = clause } -> exact;
+ _ -> assoc
+ end,
+ Cpairs = [#c_map_pair{op=#c_literal{val=Op},
+ key=#c_literal{val=V},
+ val=#c_literal{val=K}} || {K,V} <- Pairs],
+ format_1(#c_map{anno=A,arg=#c_literal{val=#{}},es=Cpairs},Ctxt);
format_1(#c_var{name={I,A}}, _) ->
[core_atom(I),$/,integer_to_list(A)];
format_1(#c_var{name=V}, _) ->
@@ -161,6 +171,27 @@ format_1(#c_tuple{es=Es}, Ctxt) ->
format_hseq(Es, ",", add_indent(Ctxt, 1), fun format/2),
$}
];
+format_1(#c_map{arg=#c_literal{val=M},es=Es}, Ctxt) when is_map(M),map_size(M)=:=0 ->
+ ["~{",
+ format_hseq(Es, ",", add_indent(Ctxt, 1), fun format/2),
+ "}~"
+ ];
+format_1(#c_map{arg=Var,es=Es}, Ctxt) ->
+ ["~{",
+ format_hseq(Es, ",", add_indent(Ctxt, 1), fun format/2),
+ "|",format(Var, add_indent(Ctxt, 1)),
+ "}~"
+ ];
+format_1(#c_map_pair{op=#c_literal{val=assoc},key=K,val=V}, Ctxt) ->
+ ["::<",
+ format_hseq([K,V], ",", add_indent(Ctxt, 1), fun format/2),
+ ">"
+ ];
+format_1(#c_map_pair{op=#c_literal{val=exact},key=K,val=V}, Ctxt) ->
+ ["~<",
+ format_hseq([K,V], ",", add_indent(Ctxt, 1), fun format/2),
+ ">"
+ ];
format_1(#c_cons{hd=H,tl=T}, Ctxt) ->
Txt = ["["|format(H, add_indent(Ctxt, 1))],
[Txt|format_list_tail(T, add_indent(Ctxt, width(Txt, Ctxt)))];
diff --git a/lib/compiler/src/core_scan.erl b/lib/compiler/src/core_scan.erl
index a4fe920258..b7799b373a 100644
--- a/lib/compiler/src/core_scan.erl
+++ b/lib/compiler/src/core_scan.erl
@@ -271,6 +271,8 @@ scan1("->" ++ Cs, Toks, Pos) ->
scan1(Cs, [{'->',Pos}|Toks], Pos);
scan1("-|" ++ Cs, Toks, Pos) ->
scan1(Cs, [{'-|',Pos}|Toks], Pos);
+scan1("::" ++ Cs, Toks, Pos) ->
+ scan1(Cs, [{'::',Pos}|Toks], Pos);
scan1([C|Cs], Toks, Pos) -> %Punctuation character
P = list_to_atom([C]),
scan1(Cs, [{P,Pos}|Toks], Pos);
diff --git a/lib/compiler/src/erl_bifs.erl b/lib/compiler/src/erl_bifs.erl
index 3ad3c8c690..6c75538194 100644
--- a/lib/compiler/src/erl_bifs.erl
+++ b/lib/compiler/src/erl_bifs.erl
@@ -91,6 +91,7 @@ is_pure(erlang, is_float, 1) -> true;
is_pure(erlang, is_function, 1) -> true;
is_pure(erlang, is_integer, 1) -> true;
is_pure(erlang, is_list, 1) -> true;
+is_pure(erlang, is_map, 1) -> true;
is_pure(erlang, is_number, 1) -> true;
is_pure(erlang, is_pid, 1) -> true;
is_pure(erlang, is_port, 1) -> true;
diff --git a/lib/compiler/src/genop.tab b/lib/compiler/src/genop.tab
index ebc9b1c85b..7d6bf56ccb 100755
--- a/lib/compiler/src/genop.tab
+++ b/lib/compiler/src/genop.tab
@@ -528,3 +528,11 @@ BEAM_FORMAT_NUMBER=0
# R15A
153: line/1
+
+# R17
+
+154: put_map_assoc/5
+155: put_map_exact/5
+156: is_map/2
+157: has_map_fields/3
+158: get_map_elements/3
diff --git a/lib/compiler/src/rec_env.erl b/lib/compiler/src/rec_env.erl
index 31a1f8b0b7..555a331bd7 100644
--- a/lib/compiler/src/rec_env.erl
+++ b/lib/compiler/src/rec_env.erl
@@ -1,7 +1,7 @@
%%
%% %CopyrightBegin%
%%
-%% Copyright Ericsson AB 2001-2010. All Rights Reserved.
+%% Copyright Ericsson AB 2001-2014. 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
@@ -72,6 +72,7 @@ test_1({custom, F} = Type, N, Env) when is_integer(N), N > 0 ->
test_1(_,0, Env) ->
Env.
-endif.
+%%@clear
%% Representation:
@@ -95,7 +96,7 @@ test_1(_,0, Env) ->
%% =====================================================================
%% @type environment(). An abstract environment.
--type mapping() :: {'map', dict()} | {'rec', dict(), dict()}.
+-type mapping() :: {'map', dict:dict()} | {'rec', dict:dict(), dict:dict()}.
-type environment() :: [mapping(),...].
%% =====================================================================
diff --git a/lib/compiler/src/sys_core_dsetel.erl b/lib/compiler/src/sys_core_dsetel.erl
index f6696992b9..60d83763f8 100644
--- a/lib/compiler/src/sys_core_dsetel.erl
+++ b/lib/compiler/src/sys_core_dsetel.erl
@@ -102,6 +102,13 @@ visit(Env, #c_literal{}=R) ->
visit(Env0, #c_tuple{es=Es0}=R) ->
{Es1,Env1} = visit_list(Env0, Es0),
{R#c_tuple{es=Es1}, Env1};
+visit(Env0, #c_map{es=Es0}=R) ->
+ {Es1,Env1} = visit_list(Env0, Es0),
+ {R#c_map{es=Es1}, Env1};
+visit(Env0, #c_map_pair{key=K0,val=V0}=R) ->
+ {K,Env1} = visit(Env0, K0),
+ {V,Env2} = visit(Env1, V0),
+ {R#c_map_pair{key=K,val=V}, Env2};
visit(Env0, #c_cons{hd=H0,tl=T0}=R) ->
{H1,Env1} = visit(Env0, H0),
{T1,Env2} = visit(Env1, T0),
@@ -212,6 +219,11 @@ visit_pat(Env0, #c_var{name=V}, Vs) ->
{[V|Vs], dict:store(V, 0, Env0)};
visit_pat(Env0, #c_tuple{es=Es}, Vs) ->
visit_pats(Es, Env0, Vs);
+visit_pat(Env0, #c_map{es=Es}, Vs) ->
+ visit_pats(Es, Env0, Vs);
+visit_pat(Env0, #c_map_pair{op=#c_literal{val=exact},key=V,val=K}, Vs0) ->
+ {Vs1, Env1} = visit_pat(Env0, V, Vs0),
+ visit_pat(Env1, K, Vs1);
visit_pat(Env0, #c_cons{hd=H,tl=T}, Vs0) ->
{Vs1, Env1} = visit_pat(Env0, H, Vs0),
visit_pat(Env1, T, Vs1);
diff --git a/lib/compiler/src/sys_core_fold.erl b/lib/compiler/src/sys_core_fold.erl
index 6b0ae87172..ce40213bad 100644
--- a/lib/compiler/src/sys_core_fold.erl
+++ b/lib/compiler/src/sys_core_fold.erl
@@ -70,9 +70,9 @@
-export([module/2,format_error/1]).
-import(lists, [map/2,foldl/3,foldr/3,mapfoldl/3,all/2,any/2,
- reverse/1,reverse/2,member/2,nth/2,flatten/1]).
+ reverse/1,reverse/2,member/2,nth/2,flatten/1,unzip/1]).
--import(cerl, [ann_c_cons/3,ann_c_tuple/2]).
+-import(cerl, [ann_c_cons/3,ann_c_map/3,ann_c_tuple/2]).
-include("core_parse.hrl").
@@ -246,6 +246,16 @@ expr(#c_tuple{anno=Anno,es=Es0}=Tuple, Ctxt, Sub) ->
value ->
ann_c_tuple(Anno, Es)
end;
+expr(#c_map{anno=Anno,arg=V0,es=Es0}=Map, Ctxt, Sub) ->
+ Es = pair_list(Es0, Ctxt, Sub),
+ case Ctxt of
+ effect ->
+ add_warning(Map, useless_building),
+ expr(make_effect_seq(Es, Sub), Ctxt, Sub);
+ value ->
+ V = expr(V0, Ctxt, Sub),
+ ann_c_map(Anno,V,Es)
+ end;
expr(#c_binary{segments=Ss}=Bin0, Ctxt, Sub) ->
%% Warn for useless building, but always build the binary
%% anyway to preserve a possible exception.
@@ -295,6 +305,10 @@ expr(#c_let{}=Let, Ctxt, Sub) ->
%% Now recursively re-process the new expression.
expr(Expr, Ctxt, sub_new_preserve_types(Sub))
end;
+expr(#c_letrec{body=#c_var{}}=Letrec, effect, _Sub) ->
+ %% This is named fun in an 'effect' context. Warn and ignore.
+ add_warning(Letrec, useless_building),
+ void();
expr(#c_letrec{defs=Fs0,body=B0}=Letrec, Ctxt, Sub) ->
Fs1 = map(fun ({Name,Fb}) ->
{Name,expr(Fb, {letrec,Ctxt}, Sub)}
@@ -302,18 +316,54 @@ expr(#c_letrec{defs=Fs0,body=B0}=Letrec, Ctxt, Sub) ->
B1 = body(B0, value, Sub),
Letrec#c_letrec{defs=Fs1,body=B1};
expr(#c_case{}=Case0, Ctxt, Sub) ->
+ %% Ideally, the compiler should only emit warnings when there is
+ %% a real mistake in the code being compiled. We use the follow
+ %% heuristics in an attempt to approach that ideal:
+ %%
+ %% * If the guard for a clause always fails, we will emit a
+ %% warning.
+ %%
+ %% * If a case expression is a literal, we will emit no warnings
+ %% for clauses that will not match or for clauses that are
+ %% shadowed after a clause that will always match. That means
+ %% that code such as:
+ %%
+ %% case ?DEBUG of
+ %% false -> ok;
+ %% true -> ...
+ %% end
+ %%
+ %% (where ?DEBUG expands to either 'true' or 'false') will not
+ %% produce any warnings.
+ %%
+ %% * If the case expression is not literal, warnings will be
+ %% emitted for every clause that don't match and for all
+ %% clauses following a clause that will always match.
+ %%
+ %% * If no clause will ever match, there will be a warning
+ %% (in addition to any warnings that may have been emitted
+ %% according to the rules above).
+ %%
case opt_bool_case(Case0) of
#c_case{arg=Arg0,clauses=Cs0}=Case1 ->
Arg1 = body(Arg0, value, Sub),
- {Arg2,Cs1} = case_opt(Arg1, Cs0),
- Cs2 = clauses(Arg2, Cs1, Case1, Ctxt, Sub),
- Case = eval_case(Case1#c_case{arg=Arg2,clauses=Cs2}, Sub),
- bsm_an(Case);
+ LitExpr = cerl:is_literal(Arg1),
+ {Arg2,Cs1} = case_opt(Arg1, Cs0, Sub),
+ Cs2 = clauses(Arg2, Cs1, Ctxt, Sub, LitExpr),
+ Case = Case1#c_case{arg=Arg2,clauses=Cs2},
+ warn_no_clause_match(Case1, Case),
+ Expr = eval_case(Case, Sub),
+ case move_case_into_arg(Case, Sub) of
+ impossible ->
+ bsm_an(Expr);
+ Other ->
+ expr(Other, Ctxt, sub_new_preserve_types(Sub))
+ end;
Other ->
expr(Other, Ctxt, Sub)
end;
expr(#c_receive{clauses=Cs0,timeout=T0,action=A0}=Recv, Ctxt, Sub) ->
- Cs1 = clauses(#c_var{name='_'}, Cs0, Recv, Ctxt, Sub), %This is all we know
+ Cs1 = clauses(#c_var{name='_'}, Cs0, Ctxt, Sub, false),
T1 = expr(T0, value, Sub),
A1 = body(A0, Ctxt, Sub),
Recv#c_receive{clauses=Cs1,timeout=T1,action=A1};
@@ -377,6 +427,16 @@ expr(#c_try{anno=A,arg=E0,vars=Vs0,body=B0,evars=Evs0,handler=H0}=Try, _, Sub0)
expr_list(Es, Ctxt, Sub) ->
[expr(E, Ctxt, Sub) || E <- Es].
+pair_list(Es, Ctxt, Sub) ->
+ [pair(E, Ctxt, Sub) || E <- Es].
+
+pair(#c_map_pair{key=K,val=V}, effect, Sub) ->
+ make_effect_seq([K,V], Sub);
+pair(#c_map_pair{key=K0,val=V0}=Pair, value=Ctxt, Sub) ->
+ K = expr(K0, Ctxt, Sub),
+ V = expr(V0, Ctxt, Sub),
+ Pair#c_map_pair{key=K,val=V}.
+
bitstr_list(Es, Sub) ->
[bitstr(E, Sub) || E <- Es].
@@ -547,6 +607,14 @@ eval_binary_1([#c_bitstr{val=#c_literal{val=Val},size=#c_literal{val=Sz},
error:_ ->
throw(impossible)
end;
+eval_binary_1([#c_bitstr{val=#c_literal{},size=#c_literal{},
+ unit=#c_literal{},type=#c_literal{},
+ flags=#c_cons{}=Flags}=Bitstr|Ss], Acc0) ->
+ case cerl:fold_literal(Flags) of
+ #c_literal{} = Flags1 ->
+ eval_binary_1([Bitstr#c_bitstr{flags=Flags1}|Ss], Acc0);
+ _ -> throw(impossible)
+ end;
eval_binary_1([], Acc) -> Acc;
eval_binary_1(_, _) -> throw(impossible).
@@ -646,7 +714,7 @@ useless_call(effect, #c_call{anno=Anno,
useless_call(_, _) -> no.
%% make_effect_seq([Expr], Sub) -> #c_seq{}|void()
-%% Convert a list of epressions evaluated in effect context to a chain of
+%% Convert a list of expressions evaluated in effect context to a chain of
%% #c_seq{}. The body in the innermost #c_seq{} will be void().
%% Anything that will not have any effect will be thrown away.
@@ -1310,6 +1378,7 @@ eval_is_record(Call, _, _, _, _) -> Call.
is_not_integer(#c_literal{val=Val}) when not is_integer(Val) -> true;
is_not_integer(#c_tuple{}) -> true;
is_not_integer(#c_cons{}) -> true;
+is_not_integer(#c_map{}) -> true;
is_not_integer(_) -> false.
%% is_not_tuple(Core) -> true | false.
@@ -1317,6 +1386,7 @@ is_not_integer(_) -> false.
is_not_tuple(#c_literal{val=Val}) when not is_tuple(Val) -> true;
is_not_tuple(#c_cons{}) -> true;
+is_not_tuple(#c_map{}) -> true;
is_not_tuple(_) -> false.
%% eval_setelement(Call, Pos, Tuple, NewVal) -> Core.
@@ -1452,14 +1522,14 @@ let_subst_list([], [], _) -> {[],[],[]}.
%%pattern(Pat, Sub) -> pattern(Pat, Sub, Sub).
-pattern(#c_var{name=V0}=Pat, Isub, Osub) ->
+pattern(#c_var{}=Pat, Isub, Osub) ->
case sub_is_val(Pat, Isub) of
true ->
V1 = make_var_name(),
Pat1 = #c_var{name=V1},
{Pat1,sub_set_var(Pat, Pat1, scope_add([V1], Osub))};
false ->
- {Pat,sub_del_var(Pat, scope_add([V0], Osub))}
+ {Pat,sub_del_var(Pat, Osub)}
end;
pattern(#c_literal{}=Pat, _, Osub) -> {Pat,Osub};
pattern(#c_cons{anno=Anno,hd=H0,tl=T0}, Isub, Osub0) ->
@@ -1469,6 +1539,9 @@ pattern(#c_cons{anno=Anno,hd=H0,tl=T0}, Isub, Osub0) ->
pattern(#c_tuple{anno=Anno,es=Es0}, Isub, Osub0) ->
{Es1,Osub1} = pattern_list(Es0, Isub, Osub0),
{ann_c_tuple(Anno, Es1),Osub1};
+pattern(#c_map{anno=Anno,es=Es0}=Map, Isub, Osub0) ->
+ {Es1,Osub1} = map_pair_pattern_list(Es0, Isub, Osub0),
+ {Map#c_map{anno=Anno,es=Es1},Osub1};
pattern(#c_binary{segments=V0}=Pat, Isub, Osub0) ->
{V1,Osub1} = bin_pattern_list(V0, Isub, Osub0),
{Pat#c_binary{segments=V1},Osub1};
@@ -1478,6 +1551,15 @@ pattern(#c_alias{var=V0,pat=P0}=Pat, Isub, Osub0) ->
Osub = update_types(V1, [P1], Osub2),
{Pat#c_alias{var=V1,pat=P1},Osub}.
+map_pair_pattern_list(Ps0, Isub, Osub0) ->
+ {Ps,{_,Osub}} = mapfoldl(fun map_pair_pattern/2, {Isub,Osub0}, Ps0),
+ {Ps,Osub}.
+
+map_pair_pattern(#c_map_pair{op=#c_literal{val=exact},key=K0,val=V0}=Pair,{Isub,Osub0}) ->
+ K = expr(K0, Isub),
+ {V,Osub} = pattern(V0,Isub,Osub0),
+ {Pair#c_map_pair{key=K,val=V},{Isub,Osub}}.
+
bin_pattern_list(Ps0, Isub, Osub0) ->
{Ps,{_,Osub}} = mapfoldl(fun bin_pattern/2, {Isub,Osub0}, Ps0),
{Ps,Osub}.
@@ -1522,6 +1604,9 @@ is_subst(_) -> false.
%% chains so we never have to search more than once. Use orddict so
%% we know the format.
%%
+%% In addition to the list of substitutions, we also keep track of
+%% all variable currently live (the scope).
+%%
%% sub_subst_scope/1 adds dummy substitutions for all variables
%% in the scope in order to force renaming if variables in the
%% scope occurs as pattern variables.
@@ -1548,8 +1633,17 @@ sub_set_name(V, Val, #sub{v=S,s=Scope,t=Tdb0}=Sub) ->
Tdb = copy_type(V, Val, Tdb1),
Sub#sub{v=orddict:store(V, Val, S),s=gb_sets:add(V, Scope),t=Tdb}.
-sub_del_var(#c_var{name=V}, #sub{v=S,t=Tdb}=Sub) ->
- Sub#sub{v=orddict:erase(V, S),t=kill_types(V, Tdb)}.
+sub_del_var(#c_var{name=V}, #sub{v=S,s=Scope,t=Tdb}=Sub) ->
+ %% Profiling shows that for programs with many record operations,
+ %% sub_del_var/2 is a bottleneck. Since the scope contains all
+ %% variables that are live, we know that V cannot be present in S
+ %% if it is not in the scope.
+ case gb_sets:is_member(V, Scope) of
+ false ->
+ Sub#sub{s=gb_sets:insert(V, Scope)};
+ true ->
+ Sub#sub{v=orddict:erase(V, S),t=kill_types(V, Tdb)}
+ end.
sub_subst_var(#c_var{name=V}, Val, #sub{v=S0}) ->
%% Fold chained substitutions.
@@ -1559,47 +1653,50 @@ sub_subst_scope(#sub{v=S0,s=Scope}=Sub) ->
S = [{-1,#c_var{name=Sv}} || Sv <- gb_sets:to_list(Scope)]++S0,
Sub#sub{v=S}.
-sub_is_val(#c_var{name=V}, #sub{v=S}) ->
- v_is_value(V, S).
-
-v_is_value(Var, Sub) ->
- any(fun ({_,#c_var{name=Val}}) when Val =:= Var -> true;
- (_) -> false
- end, Sub).
-
-%% clauses(E, [Clause], TopLevel, Context, Sub) -> [Clause].
-%% Trim the clauses by removing all clauses AFTER the first one which
-%% is guaranteed to match. Also remove all trivially false clauses.
-
-clauses(E, Cs0, TopLevel, Ctxt, Sub) ->
- Cs = clauses_1(E, Cs0, Ctxt, Sub),
-
- %% Here we want to warn if no clauses whatsoever will ever
- %% match, because that is probably a mistake.
- case all(fun is_compiler_generated/1, Cs) andalso
- any(fun(C) -> not is_compiler_generated(C) end, Cs0) of
+sub_is_val(#c_var{name=V}, #sub{v=S,s=Scope}) ->
+ %% When the bottleneck in sub_del_var/2 was eliminated, this
+ %% became the new bottleneck. Since the scope contains all
+ %% live variables, a variable V can only be the target for
+ %% a substitution if it is in the scope.
+ gb_sets:is_member(V, Scope) andalso v_is_value(V, S).
+
+v_is_value(Var, [{_,#c_var{name=Var}}|_]) -> true;
+v_is_value(Var, [_|T]) -> v_is_value(Var, T);
+v_is_value(_, []) -> false.
+
+%% warn_no_clause_match(CaseOrig, CaseOpt) -> ok
+%% Generate a warning if none of the user-specified clauses
+%% will match.
+
+warn_no_clause_match(CaseOrig, CaseOpt) ->
+ OrigCs = cerl:case_clauses(CaseOrig),
+ OptCs = cerl:case_clauses(CaseOpt),
+ case any(fun(C) -> not is_compiler_generated(C) end, OrigCs) andalso
+ all(fun is_compiler_generated/1, OptCs) of
true ->
%% The original list of clauses did contain at least one
%% user-specified clause, but none of them will match.
%% That is probably a mistake.
- add_warning(TopLevel, no_clause_match);
+ add_warning(CaseOrig, no_clause_match);
false ->
%% Either there were user-specified clauses left in
%% the transformed clauses, or else none of the original
%% clauses were user-specified to begin with (as in 'andalso').
ok
- end,
+ end.
- Cs.
+%% clauses(E, [Clause], TopLevel, Context, Sub) -> [Clause].
+%% Trim the clauses by removing all clauses AFTER the first one which
+%% is guaranteed to match. Also remove all trivially false clauses.
-clauses_1(E, [C0|Cs], Ctxt, Sub) ->
+clauses(E, [C0|Cs], Ctxt, Sub, LitExpr) ->
#c_clause{pats=Ps,guard=G} = C1 = clause(C0, E, Ctxt, Sub),
%%ok = io:fwrite("~w: ~p~n", [?LINE,{E,Ps}]),
case {will_match(E, Ps),will_succeed(G)} of
{yes,yes} ->
- Line = get_line(core_lib:get_anno(C1)),
- case core_lib:is_literal(E) of
+ case LitExpr of
false ->
+ Line = get_line(core_lib:get_anno(C1)),
shadow_warning(Cs, Line);
true ->
%% If the case expression is a literal,
@@ -1608,15 +1705,13 @@ clauses_1(E, [C0|Cs], Ctxt, Sub) ->
ok
end,
[C1]; %Skip the rest
- {no,_Suc} ->
- clauses_1(E, Cs, Ctxt, Sub); %Skip this clause
- {_Mat,no} ->
+ {_Mat,no} -> %Guard fails.
add_warning(C1, nomatch_guard),
- clauses_1(E, Cs, Ctxt, Sub); %Skip this clause
+ clauses(E, Cs, Ctxt, Sub, LitExpr); %Skip this clause
{_Mat,_Suc} ->
- [C1|clauses_1(E, Cs, Ctxt, Sub)]
+ [C1|clauses(E, Cs, Ctxt, Sub, LitExpr)]
end;
-clauses_1(_, [], _, _) -> [].
+clauses(_, [], _, _, _) -> [].
shadow_warning([C|Cs], none) ->
add_warning(C, nomatch_shadow),
@@ -1634,69 +1729,18 @@ will_succeed(#c_literal{val=true}) -> yes;
will_succeed(#c_literal{val=false}) -> no;
will_succeed(_Guard) -> maybe.
-%% will_match(Expr, [Pattern]) -> yes | maybe | no.
-%% Test if we know whether a match will succeed/fail or just don't
-%% know. Be conservative.
+%% will_match(Expr, [Pattern]) -> yes | maybe.
+%% We KNOW that this function is only used after optimizations
+%% in case_opt/4. Therefore clauses that can definitely not match
+%% have already been pruned.
will_match(#c_values{es=Es}, Ps) ->
- will_match_list(Es, Ps, yes);
+ will_match_1(cerl_clauses:match_list(Ps, Es));
will_match(E, [P]) ->
- will_match_1(E, P).
-
-will_match_1(_E, #c_var{}) -> yes; %Will always match
-will_match_1(E, #c_alias{pat=P}) -> %Pattern decides
- will_match_1(E, P);
-will_match_1(#c_var{}, _P) -> maybe;
-will_match_1(#c_tuple{es=Es}, #c_tuple{es=Ps}) ->
- will_match_list(Es, Ps, yes);
-will_match_1(#c_literal{val=Lit}, P) ->
- will_match_lit(Lit, P);
-will_match_1(_, _) -> maybe.
-
-will_match_list([E|Es], [P|Ps], M) ->
- case will_match_1(E, P) of
- yes -> will_match_list(Es, Ps, M);
- maybe -> will_match_list(Es, Ps, maybe);
- no -> no
- end;
-will_match_list([], [], M) -> M.
-
-will_match_lit(Cons, #c_cons{hd=Hp,tl=Tp}) ->
- case Cons of
- [H|T] ->
- case will_match_lit(H, Hp) of
- yes -> will_match_lit(T, Tp);
- Other -> Other
- end;
- _ ->
- no
- end;
-will_match_lit(Tuple, #c_tuple{es=Es}) ->
- case is_tuple(Tuple) andalso tuple_size(Tuple) =:= length(Es) of
- true -> will_match_lit_list(tuple_to_list(Tuple), Es);
- false -> no
- end;
-will_match_lit(Bin, #c_binary{}) ->
- case is_bitstring(Bin) of
- true -> maybe;
- false -> no
- end;
-will_match_lit(_, #c_var{}) ->
- yes;
-will_match_lit(Lit, #c_alias{pat=P}) ->
- will_match_lit(Lit, P);
-will_match_lit(Lit1, #c_literal{val=Lit2}) ->
- case Lit1 =:= Lit2 of
- true -> yes;
- false -> no
- end.
+ will_match_1(cerl_clauses:match(P, E)).
-will_match_lit_list([H|T], [P|Ps]) ->
- case will_match_lit(H, P) of
- yes -> will_match_lit_list(T, Ps);
- Other -> Other
- end;
-will_match_lit_list([], []) -> yes.
+will_match_1({false,_}) -> maybe;
+will_match_1({true,_}) -> yes.
%% opt_bool_case(CoreExpr) - CoreExpr'.
%% Do various optimizations to case statement that has a
@@ -1760,9 +1804,14 @@ opt_bool_clauses([#c_clause{pats=[#c_literal{val=Lit}],
true ->
%% This clause will match.
C = C0#c_clause{body=opt_bool_case(B)},
- case Lit of
- false -> [C|opt_bool_clauses(Cs, SeenT, true)];
- true -> [C|opt_bool_clauses(Cs, true, SeenF)]
+ case {Lit,SeenT,SeenF} of
+ {false,_,false} ->
+ [C|opt_bool_clauses(Cs, SeenT, true)];
+ {true,false,_} ->
+ [C|opt_bool_clauses(Cs, true, SeenF)];
+ _ ->
+ add_warning(C, nomatch_shadow),
+ opt_bool_clauses(Cs, SeenT, SeenF)
end
end;
opt_bool_clauses([#c_clause{pats=Ps,guard=#c_literal{val=true}}=C|Cs], SeenT, SeenF) ->
@@ -1895,166 +1944,283 @@ opt_bool_case_guard(Arg, [#c_clause{pats=[#c_literal{val=false}]}=Fc,Tc]) ->
%% last clause is guaranteed to match so if there is only one clause
%% with a pattern containing only variables then rewrite to a let.
-eval_case(#c_case{arg=#c_var{name=V},
- clauses=[#c_clause{pats=[P],guard=G,body=B}|_]}=Case,
- #sub{t=Tdb}=Sub) ->
- case orddict:find(V, Tdb) of
- {ok,Type} ->
- case {will_match_type(P, Type),will_succeed(G)} of
- {yes,yes} ->
- {Ps,Es} = remove_non_vars(P, Type),
- expr(#c_let{vars=Ps,arg=#c_values{es=Es},body=B},
- sub_new(Sub));
- {_,_} ->
- eval_case_1(Case, Sub)
- end;
- error -> eval_case_1(Case, Sub)
- end;
-eval_case(Case, Sub) -> eval_case_1(Case, Sub).
-
-eval_case_1(#c_case{arg=E,clauses=[#c_clause{pats=Ps,body=B}]}=Case, Sub) ->
- case is_var_pat(Ps) of
- true -> expr(#c_let{vars=Ps,arg=E,body=B}, sub_new(Sub));
- false -> eval_case_2(E, Ps, B, Case)
- end;
-eval_case_1(Case, _) -> Case.
-
-eval_case_2(E, [P], B, Case) ->
- %% Recall that there is only one clause and that it is guaranteed to match.
- %% If E and P are literals, they must be the same literal and the body
- %% can be used directly as there are no variables that need to be bound.
- %% Otherwise, P could be an alias meaning that two or more variables
- %% would be bound to E. We don't bother to optimize that case as it
- %% is rather uncommon.
- case core_lib:is_literal(E) andalso core_lib:is_literal(P) of
- false -> Case;
- true -> B
- end;
-eval_case_2(_, _, _, Case) -> Case.
-
-is_var_pat(Ps) ->
- all(fun (#c_var{}) -> true;
- (_Pat) -> false
- end, Ps).
-
-will_match_type(#c_tuple{es=Es}, #c_tuple{es=Ps}) ->
- will_match_list_type(Es, Ps);
-will_match_type(#c_literal{val=Atom}, #c_literal{val=Atom}) -> yes;
-will_match_type(#c_var{}, #c_var{}) -> yes;
-will_match_type(#c_var{}, #c_alias{}) -> yes;
-will_match_type(_, _) -> no.
-
-will_match_list_type([E|Es], [P|Ps]) ->
- case will_match_type(E, P) of
- yes -> will_match_list_type(Es, Ps);
- no -> no
- end;
-will_match_list_type([], []) -> yes;
-will_match_list_type(_, _) -> no. %Different length
-
-remove_non_vars(Ps0, Es0) ->
- {Ps,Es} = remove_non_vars(Ps0, Es0, [], []),
- {reverse(Ps),reverse(Es)}.
-
-remove_non_vars(#c_tuple{es=Ps}, #c_tuple{es=Es}, Pacc, Eacc) ->
- remove_non_vars_list(Ps, Es, Pacc, Eacc);
-remove_non_vars(#c_var{}=Var, #c_alias{var=Evar}, Pacc, Eacc) ->
- {[Var|Pacc],[Evar|Eacc]};
-remove_non_vars(#c_var{}=Var, #c_var{}=Evar, Pacc, Eacc) ->
- {[Var|Pacc],[Evar|Eacc]};
-remove_non_vars(P, E, Pacc, Eacc) ->
- true = core_lib:is_literal(P) andalso core_lib:is_literal(E), %Assertion.
- {Pacc,Eacc}.
-
-remove_non_vars_list([P|Ps], [E|Es], Pacc0, Eacc0) ->
- {Pacc,Eacc} = remove_non_vars(P, E, Pacc0, Eacc0),
- remove_non_vars_list(Ps, Es, Pacc, Eacc);
-remove_non_vars_list([], [], Pacc, Eacc) ->
- {Pacc,Eacc}.
+eval_case(#c_case{arg=E,clauses=[#c_clause{pats=Ps0,
+ guard=#c_literal{val=true},
+ body=B}]}=Case, Sub) ->
+ Es = case cerl:is_c_values(E) of
+ true -> cerl:values_es(E);
+ false -> [E]
+ end,
+ %% Consider:
+ %%
+ %% case SomeSideEffect() of
+ %% X=Y -> ...
+ %% end
+ %%
+ %% We must not rewrite it to:
+ %%
+ %% let <X,Y> = <SomeSideEffect(),SomeSideEffect()> in ...
+ %%
+ %% because SomeSideEffect() would be evaluated twice.
+ %%
+ %% Instead we must evaluate the case expression in an outer let
+ %% like this:
+ %%
+ %% let NewVar = SomeSideEffect() in
+ %% let <X,Y> = <NewVar,NewVar> in ...
+ %%
+ Vs = make_vars([], length(Es)),
+ case cerl_clauses:match_list(Ps0, Vs) of
+ {false,_} ->
+ %% This can only happen if the Core Erlang code is
+ %% handwritten or generated by another code generator
+ %% than v3_core. Assuming that the Core Erlang program
+ %% is correct, the clause will always match at run-time.
+ Case;
+ {true,Bs} ->
+ {Ps,As} = unzip(Bs),
+ InnerLet = cerl:c_let(Ps, core_lib:make_values(As), B),
+ Let = cerl:c_let(Vs, E, InnerLet),
+ expr(Let, sub_new(Sub))
+ end;
+eval_case(Case, _) -> Case.
%% case_opt(CaseArg, [Clause]) -> {CaseArg,[Clause]}.
-%% Try and optimise case by avoid building a tuple in
-%% the case expression. Instead of building a tuple
-%% in the case expression, combine the elements into
-%% multiple "values". If a clause refers to the tuple
-%% in the case expression (that was not built), introduce
-%% a let into the guard and/or body to build the tuple.
+%% Try and optimise a case by avoid building tuples or lists
+%% in the case expression. Instead combine the variable parts
+%% of the case expression to multiple "values". If a clause
+%% refers to the constructed term in the case expression (which
+%% was not built), introduce a let into the guard and/or body to
+%% build the term.
%%
-%% case {Expr1,Expr2} of case <Expr1,Expr2> of
-%% {P1,P2} -> ... <P1,P2> -> ...
+%% case {ok,[Expr1,Expr2]} of case <Expr1,Expr2> of
+%% {ok,[P1,P2]} -> ... <P1,P2> -> ...
%% . ==> .
%% . .
%% . .
-%% Var -> <Var1,Var2> ->
-%% ... Var ... let <Var> = {Var1,Var2}
-%% in ... Var ...
+%% Var -> <Var1,Var2> ->
+%% ... Var ... let <Var> = {ok,[Var1,Var2]}
+%% in ... Var ...
%% . .
%% . .
%% . .
-%% end. end.
+%% end. end.
%%
-case_opt(#c_tuple{anno=A,es=Es}, Cs0) ->
- Cs1 = case_opt_cs(Cs0, length(Es)),
- {core_lib:set_anno(core_lib:make_values(Es), A),Cs1};
-case_opt(Arg, Cs) -> {Arg,Cs}.
-
-case_opt_cs([#c_clause{pats=Ps0,guard=G,body=B}=C|Cs], Arity) ->
- case case_tuple_pat(Ps0, Arity) of
- {ok,Ps1,Avs} ->
- Flet = fun ({V,Pat}, Body) -> letify(V, Pat, Body) end,
- [C#c_clause{pats=Ps1,
- guard=foldl(Flet, G, Avs),
- body=foldl(Flet, B, Avs)}|case_opt_cs(Cs, Arity)];
- error -> %Can't match
- add_warning(C, nomatch_clause_type),
- case_opt_cs(Cs, Arity)
+case_opt(Arg, Cs0, Sub) ->
+ Cs1 = [{cerl:clause_pats(C),C,[],[]} || C <- Cs0],
+ Args0 = case cerl:is_c_values(Arg) of
+ false -> [Arg];
+ true -> cerl:values_es(Arg)
+ end,
+ LitExpr = cerl:is_literal(Arg),
+ {Args,Cs2} = case_opt_args(Args0, Cs1, Sub, LitExpr, []),
+ Cs = [cerl:update_c_clause(C,
+ reverse(Ps),
+ letify(Bs, cerl:clause_guard(C)),
+ letify(Bs, cerl:clause_body(C))) ||
+ {[],C,Ps,Bs} <- Cs2],
+ {core_lib:make_values(Args),Cs}.
+
+case_opt_args([A0|As0], Cs0, Sub, LitExpr, Acc) ->
+ case case_opt_arg(A0, Sub, Cs0, LitExpr) of
+ {error,Cs1} ->
+ %% Nothing to be done. Move on to the next argument.
+ Cs = [{Ps,C,[P|PsAcc],Bs} || {[P|Ps],C,PsAcc,Bs} <- Cs1],
+ case_opt_args(As0, Cs, Sub, LitExpr, [A0|Acc]);
+ {ok,As1,Cs} ->
+ %% The argument was either expanded (from tuple/list) or
+ %% removed (literal).
+ case_opt_args(As1++As0, Cs, Sub, LitExpr, Acc)
+ end;
+case_opt_args([], Cs, _Sub, _LitExpr, Acc) ->
+ {reverse(Acc),Cs}.
+
+%% case_opt_arg(Expr, Sub, Clauses0, LitExpr) ->
+%% {ok,Args,Clauses} | error
+%% Try to expand one argument to several arguments (if tuple/list)
+%% or to remove a literal argument.
+%%
+case_opt_arg(E0, Sub, Cs, LitExpr) ->
+ E = maybe_replace_var(E0, Sub),
+ case cerl:is_data(E) of
+ false ->
+ {error,Cs};
+ true ->
+ case cerl:data_type(E) of
+ {atomic,_} ->
+ case_opt_lit(E, Cs, LitExpr);
+ _ ->
+ case_opt_data(E, Cs, LitExpr)
+ end
+ end.
+
+%% maybe_replace_var(Expr0, Sub) -> Expr
+%% If Expr0 is a variable that has been previously matched and
+%% is known to be a tuple, return the tuple instead. Otherwise
+%% return Expr0 unchanged.
+%%
+maybe_replace_var(E, Sub) ->
+ case cerl:is_c_var(E) of
+ false -> E;
+ true -> maybe_replace_var_1(E, Sub)
+ end.
+
+maybe_replace_var_1(E, #sub{t=Tdb}) ->
+ case orddict:find(cerl:var_name(E), Tdb) of
+ {ok,T0} ->
+ case cerl:is_c_tuple(T0) of
+ false ->
+ E;
+ true ->
+ cerl_trees:map(fun(C) ->
+ case cerl:is_c_alias(C) of
+ false -> C;
+ true -> cerl:alias_pat(C)
+ end
+ end, T0)
+ end;
+ error ->
+ E
+ end.
+
+%% case_opt_lit(Literal, Clauses0, LitExpr) ->
+%% {ok,[],Clauses} | error
+%% The current part of the case expression is a literal. That
+%% means that we will know at compile-time whether a clause
+%% will match, and we can remove the corresponding pattern from
+%% each clause.
+%%
+%% The only complication is if the literal is a binary. Binary
+%% pattern matching is tricky, so we will give up in that case.
+
+case_opt_lit(Lit, Cs0, LitExpr) ->
+ Cs1 = case_opt_lit_1(Lit, Cs0, LitExpr),
+ try case_opt_lit_2(Lit, Cs1) of
+ Cs ->
+ {ok,[],Cs}
+ catch
+ throw:impossible ->
+ {error,Cs1}
+ end.
+
+case_opt_lit_1(E, [{[P|_],C,_,_}=Current|Cs], LitExpr) ->
+ case cerl_clauses:match(P, E) of
+ none ->
+ %% The pattern will not match the literal. Remove the clause.
+ %% Unless the entire case expression is a literal, also
+ %% emit a warning.
+ case LitExpr of
+ false -> add_warning(C, nomatch_clause_type);
+ true -> ok
+ end,
+ case_opt_lit_1(E, Cs, LitExpr);
+ _ ->
+ [Current|case_opt_lit_1(E, Cs, LitExpr)]
+ end;
+case_opt_lit_1(_, [], _) -> [].
+
+case_opt_lit_2(E, [{[P|Ps],C,PsAcc,Bs0}|Cs]) ->
+ %% Non-matching clauses have already been removed in case_opt_lit_1/3.
+ case cerl_clauses:match(P, E) of
+ {true,Bs} ->
+ %% The pattern matches the literal. Remove the pattern
+ %% and update the bindings.
+ [{Ps,C,PsAcc,Bs++Bs0}|case_opt_lit_2(E, Cs)];
+ {false,_} ->
+ %% Binary literal and pattern. We are not sure whether
+ %% the pattern will match.
+ throw(impossible)
+ end;
+case_opt_lit_2(_, []) -> [].
+
+%% case_opt_data(Expr, Clauses0, LitExpr) -> {ok,Exprs,Clauses}
+
+case_opt_data(E, Cs0, LitExpr) ->
+ Es = cerl:data_es(E),
+ Cs = case_opt_data_1(Cs0, Es,
+ {cerl:data_type(E),cerl:data_arity(E)},
+ LitExpr),
+ {ok,Es,Cs}.
+
+case_opt_data_1([{[P|Ps0],C,PsAcc,Bs0}|Cs], Es, TypeSig, LitExpr) ->
+ case case_data_pat(P, TypeSig) of
+ {ok,Ps1,Bs1} ->
+ [{Ps1++Ps0,C,PsAcc,Bs1++Bs0}|
+ case_opt_data_1(Cs, Es, TypeSig,LitExpr)];
+ error ->
+ case LitExpr of
+ false -> add_warning(C, nomatch_clause_type);
+ true -> ok
+ end,
+ case_opt_data_1(Cs, Es, TypeSig, LitExpr)
end;
-case_opt_cs([], _) -> [].
+case_opt_data_1([], _, _, _) -> [].
+
+%% case_data_pat(Pattern, Type, Arity) -> {ok,[Pattern],[{AliasVar,Pat}]} | error.
-%% case_tuple_pat([Pattern], Arity) -> {ok,[Pattern],[{AliasVar,Pat}]} | error.
+case_data_pat(P, TypeSig) ->
+ case cerl:is_data(P) of
+ false ->
+ case_data_pat_var(P, TypeSig);
+ true ->
+ case {cerl:data_type(P),cerl:data_arity(P)} of
+ TypeSig ->
+ {ok,cerl:data_es(P),[]};
+ {_,_} ->
+ error
+ end
+ end.
-case_tuple_pat([#c_tuple{es=Ps}], Arity) when length(Ps) =:= Arity ->
- {ok,Ps,[]};
-case_tuple_pat([#c_literal{val=T}], Arity) when tuple_size(T) =:= Arity ->
- Ps = [#c_literal{val=E} || E <- tuple_to_list(T)],
- {ok,Ps,[]};
-case_tuple_pat([#c_var{anno=Anno0}=V], Arity) ->
- Vars = make_vars(Anno0, 1, Arity),
+%% case_data_pat_var(Pattern, {DataType,ArityType}) ->
+%% {ok,[Pattern],[{AliasVar,Pat}]}
+case_data_pat_var(P, {Type,Arity}=TypeSig) ->
%% If the entire case statement is evaluated in an effect
%% context (e.g. "case {A,B} of ... end, ok"), there will
%% be a warning that a term is constructed but never used.
- %% To avoid that warning, we must annotate the tuple as
- %% compiler generated.
-
- Anno = [compiler_generated|Anno0],
- {ok,Vars,[{V,#c_tuple{anno=Anno,es=Vars}}]};
-case_tuple_pat([#c_alias{var=V,pat=P}], Arity) ->
- case case_tuple_pat([P], Arity) of
- {ok,Ps,Avs} ->
- Anno0 = core_lib:get_anno(P),
- Anno = [compiler_generated|Anno0],
- {ok,Ps,[{V,#c_tuple{anno=Anno,es=unalias_pat_list(Ps)}}|Avs]};
- error ->
+ %% To avoid that warning, we must annotate the data
+ %% constructor as compiler generated.
+ Ann = [compiler_generated|cerl:get_ann(P)],
+ case cerl:type(P) of
+ var ->
+ Vars = make_vars(cerl:get_ann(P), Arity),
+ {ok,Vars,[{P,cerl:ann_make_data(Ann, Type, Vars)}]};
+ alias ->
+ V = cerl:alias_var(P),
+ Apat = cerl:alias_pat(P),
+ case case_data_pat(Apat, TypeSig) of
+ {ok,Ps,Bs} ->
+ {ok,Ps,[{V,cerl:ann_make_data(Ann, Type, unalias_pat_list(Ps))}|Bs]};
+ error ->
+ error
+ end;
+ _ ->
error
- end;
-case_tuple_pat(_, _) -> error.
+ end.
%% unalias_pat(Pattern) -> Pattern.
%% Remove all the aliases in a pattern but using the alias variables
%% instead of the values. We KNOW they will be bound.
-unalias_pat(#c_alias{var=V}) -> V;
-unalias_pat(#c_cons{anno=Anno,hd=H0,tl=T0}) ->
- H1 = unalias_pat(H0),
- T1 = unalias_pat(T0),
- ann_c_cons(Anno, H1, T1);
-unalias_pat(#c_tuple{anno=Anno,es=Ps}) ->
- ann_c_tuple(Anno, unalias_pat_list(Ps));
-unalias_pat(Atomic) -> Atomic.
+unalias_pat(P) ->
+ case cerl:is_c_alias(P) of
+ true ->
+ cerl:alias_var(P);
+ false ->
+ case cerl:is_data(P) of
+ false ->
+ P;
+ true ->
+ Es = unalias_pat_list(cerl:data_es(P)),
+ cerl:update_data(P, cerl:data_type(P), Es)
+ end
+ end.
unalias_pat_list(Ps) -> [unalias_pat(P) || P <- Ps].
+make_vars(A, Max) ->
+ make_vars(A, 1, Max).
+
make_vars(A, I, Max) when I =< Max ->
[make_var(A)|make_vars(A, I+1, Max)];
make_vars(_, _, _) -> [].
@@ -2067,6 +2233,11 @@ make_var_name() ->
put(new_var_num, N+1),
list_to_atom("fol"++integer_to_list(N)).
+letify(Bs, Body) ->
+ foldr(fun({V,Val}, B) ->
+ letify(V, Val, B)
+ end, Body, Bs).
+
letify(#c_var{name=Vname}=Var, Val, Body) ->
case core_lib:is_var_used(Vname, Body) of
true ->
@@ -2087,7 +2258,7 @@ opt_case_in_let_0([#c_var{name=V}], Arg,
case is_simple_case_arg(Arg) andalso
not core_lib:is_var_used(V, Case#c_case{arg=#c_literal{val=nil}}) of
true ->
- opt_bool_case(Case#c_case{arg=Arg});
+ expr(opt_bool_case(Case#c_case{arg=Arg,clauses=Cs}), sub_new());
false ->
Let
end;
@@ -2183,16 +2354,31 @@ is_safe_bool_expr(Core, Sub) ->
is_safe_bool_expr_1(Core, Sub, gb_sets:empty()).
is_safe_bool_expr_1(#c_call{module=#c_literal{val=erlang},
- name=#c_literal{val=is_record},
- args=[_,_]},
- _Sub, _BoolVars) ->
+ name=#c_literal{val=is_record},
+ args=[A,#c_literal{val=Tag},#c_literal{val=Size}]},
+ Sub, _BoolVars) when is_atom(Tag), is_integer(Size) ->
+ is_safe_simple(A, Sub);
+is_safe_bool_expr_1(#c_call{module=#c_literal{val=erlang},
+ name=#c_literal{val=is_record}},
+ _Sub, _BoolVars) ->
%% The is_record/2 BIF is NOT allowed in guards.
+ %% The is_record/3 BIF where its second argument is not an atom or its third
+ %% is not an integer is NOT allowed in guards.
%%
%% NOTE: Calls like is_record(Expr, LiteralTag), where LiteralTag
%% is a literal atom referring to a defined record, have already
%% been rewritten to is_record(Expr, LiteralTag, TupleSize).
false;
is_safe_bool_expr_1(#c_call{module=#c_literal{val=erlang},
+ name=#c_literal{val=is_function},
+ args=[A,#c_literal{val=Arity}]},
+ Sub, _BoolVars) when is_integer(Arity), Arity >= 0 ->
+ is_safe_simple(A, Sub);
+is_safe_bool_expr_1(#c_call{module=#c_literal{val=erlang},
+ name=#c_literal{val=is_function}},
+ _Sub, _BoolVars) ->
+ false;
+is_safe_bool_expr_1(#c_call{module=#c_literal{val=erlang},
name=#c_literal{val=Name},args=Args},
Sub, BoolVars) ->
NumArgs = length(Args),
@@ -2448,6 +2634,77 @@ opt_simple_let_2(Let, Vs0, Arg0, Body, value, Sub) ->
value, Sub)
end.
+move_case_into_arg(#c_case{arg=#c_let{vars=OuterVars0,arg=OuterArg,
+ body=InnerArg0}=Outer,
+ clauses=InnerClauses}=Inner, Sub) ->
+ %%
+ %% case let <OuterVars> = <OuterArg> in <InnerArg> of
+ %% <InnerClauses>
+ %% end
+ %%
+ %% ==>
+ %%
+ %% let <OuterVars> = <OuterArg>
+ %% in case <InnerArg> of <InnerClauses> end
+ %%
+ ScopeSub0 = sub_subst_scope(Sub#sub{t=[]}),
+ {OuterVars,ScopeSub} = pattern_list(OuterVars0, ScopeSub0),
+ InnerArg = body(InnerArg0, ScopeSub),
+ Outer#c_let{vars=OuterVars,arg=OuterArg,
+ body=Inner#c_case{arg=InnerArg,clauses=InnerClauses}};
+move_case_into_arg(#c_case{arg=#c_case{arg=OuterArg,
+ clauses=[OuterCa0,OuterCb]}=Outer,
+ clauses=InnerClauses}=Inner0, Sub) ->
+ case is_failing_clause(OuterCb) of
+ true ->
+ #c_clause{pats=OuterPats0,guard=OuterGuard0,
+ body=InnerArg0} = OuterCa0,
+ %%
+ %% case case <OuterArg> of
+ %% <OuterPats> when <OuterGuard> -> <InnerArg>
+ %% <OuterCb>
+ %% ...
+ %% end of
+ %% <InnerClauses>
+ %% end
+ %%
+ %% ==>
+ %%
+ %% case <OuterArg> of
+ %% <OuterPats> when <OuterGuard> ->
+ %% case <InnerArg> of <InnerClauses> end
+ %% <OuterCb>
+ %% end
+ %%
+ ScopeSub0 = sub_subst_scope(Sub#sub{t=[]}),
+ {OuterPats,ScopeSub} = pattern_list(OuterPats0, ScopeSub0),
+ OuterGuard = guard(OuterGuard0, ScopeSub),
+ InnerArg = body(InnerArg0, ScopeSub),
+ Inner = Inner0#c_case{arg=InnerArg,clauses=InnerClauses},
+ OuterCa = OuterCa0#c_clause{pats=OuterPats,guard=OuterGuard,
+ body=Inner},
+ Outer#c_case{arg=OuterArg,
+ clauses=[OuterCa,OuterCb]};
+ false ->
+ impossible
+ end;
+move_case_into_arg(#c_case{arg=#c_seq{arg=OuterArg,body=InnerArg}=Outer,
+ clauses=InnerClauses}=Inner, _Sub) ->
+ %%
+ %% case do <OuterArg> <InnerArg> of
+ %% <InnerClauses>
+ %% end
+ %%
+ %% ==>
+ %%
+ %% do <OuterArg>
+ %% case <InnerArg> of <InerClauses> end
+ %%
+ Outer#c_seq{arg=OuterArg,
+ body=Inner#c_case{arg=InnerArg,clauses=InnerClauses}};
+move_case_into_arg(_, _) ->
+ impossible.
+
%% In guards only, rewrite a case in a let argument like
%%
%% let <Var> = case <> of
diff --git a/lib/compiler/src/sys_pre_expand.erl b/lib/compiler/src/sys_pre_expand.erl
index 48d9c16718..761ae8409c 100644
--- a/lib/compiler/src/sys_pre_expand.erl
+++ b/lib/compiler/src/sys_pre_expand.erl
@@ -228,6 +228,13 @@ pattern({cons,Line,H,T}, St0) ->
pattern({tuple,Line,Ps}, St0) ->
{TPs,St1} = pattern_list(Ps, St0),
{{tuple,Line,TPs},St1};
+pattern({map,Line,Ps}, St0) ->
+ {TPs,St1} = pattern_list(Ps, St0),
+ {{map,Line,TPs},St1};
+pattern({map_field_exact,Line,K0,V0}, St0) ->
+ {K,St1} = expr(K0, St0),
+ {V,St2} = pattern(V0, St1),
+ {{map_field_exact,Line,K,V},St2};
%%pattern({struct,Line,Tag,Ps}, St0) ->
%% {TPs,TPsvs,St1} = pattern_list(Ps, St0),
%% {{tuple,Line,[{atom,Line,Tag}|TPs]},TPsvs,St1};
@@ -321,6 +328,21 @@ expr({tuple,Line,Es0}, St0) ->
%%expr({struct,Line,Tag,Es0}, Vs, St0) ->
%% {Es1,Esvs,Esus,St1} = expr_list(Es0, Vs, St0),
%% {{tuple,Line,[{atom,Line,Tag}|Es1]},Esvs,Esus,St1};
+expr({map,Line,Es0}, St0) ->
+ {Es1,St1} = expr_list(Es0, St0),
+ {{map,Line,Es1},St1};
+expr({map,Line,E0,Es0}, St0) ->
+ {E1,St1} = expr(E0, St0),
+ {Es1,St2} = expr_list(Es0, St1),
+ {{map,Line,E1,Es1},St2};
+expr({map_field_assoc,Line,K0,V0}, St0) ->
+ {K,St1} = expr(K0, St0),
+ {V,St2} = expr(V0, St1),
+ {{map_field_assoc,Line,K,V},St2};
+expr({map_field_exact,Line,K0,V0}, St0) ->
+ {K,St1} = expr(K0, St0),
+ {V,St2} = expr(V0, St1),
+ {{map_field_exact,Line,K,V},St2};
expr({bin,Line,Es0}, St0) ->
{Es1,St1} = expr_bin(Es0, St0),
{{bin,Line,Es1},St1};
diff --git a/lib/compiler/src/v3_codegen.erl b/lib/compiler/src/v3_codegen.erl
index 6a13495523..47a357c23d 100644
--- a/lib/compiler/src/v3_codegen.erl
+++ b/lib/compiler/src/v3_codegen.erl
@@ -210,6 +210,8 @@ need_heap_0([], H, Acc) ->
need_heap_1(#l{ke={set,_,{binary,_}},i=I}, H) ->
{need_heap_need(I, H),0};
+need_heap_1(#l{ke={set,_,{map,_,_}},i=I}, H) ->
+ {need_heap_need(I, H),0};
need_heap_1(#l{ke={set,_,Val}}, H) ->
%% Just pass through adding to needed heap.
{[],H + case Val of
@@ -453,8 +455,11 @@ basic_block([Le|Les], Acc) ->
end;
no_block -> {reverse(Acc, [Le]),Les}
end.
+
+%% sets that may garbage collect are not allowed in basic blocks.
collect_block({set,_,{binary,_}}) -> no_block;
+collect_block({set,_,{map,_,_,_}}) -> no_block;
collect_block({set,_,_}) -> include;
collect_block({call,{var,_}=Var,As,_Rs}) -> {block_end,As++[Var]};
collect_block({call,Func,As,_Rs}) -> {block_end,As++func_vars(Func)};
@@ -594,14 +599,13 @@ top_level_block(Keis, Bef, MaxRegs, _St) ->
%% number to the outer catch, which is wrong.
turn_yregs(0, Tp, _) -> Tp;
-turn_yregs(El, Tp, MaxY) when element(1, element(El, Tp)) =:= yy ->
- turn_yregs(El-1, setelement(El, Tp, {y,MaxY-element(2, element(El, Tp))}), MaxY);
-turn_yregs(El, Tp, MaxY) when is_list(element(El, Tp)) ->
- New = map(fun ({yy,YY}) -> {y,MaxY-YY};
- (Other) -> Other end, element(El, Tp)),
- turn_yregs(El-1, setelement(El, Tp, New), MaxY);
turn_yregs(El, Tp, MaxY) ->
- turn_yregs(El-1, Tp, MaxY).
+ turn_yregs(El-1,setelement(El,Tp,turn_yreg(element(El,Tp),MaxY)),MaxY).
+
+turn_yreg({yy,YY},MaxY) -> {y,MaxY-YY};
+turn_yreg({list,Ls},MaxY) -> {list, turn_yreg(Ls,MaxY)};
+turn_yreg(Ts,MaxY) when is_list(Ts) -> [turn_yreg(T,MaxY)||T<-Ts];
+turn_yreg(Other,_MaxY) -> Other.
%% select_cg(Sclause, V, TypeFail, ValueFail, StackReg, State) ->
%% {Is,StackReg,State}.
@@ -623,6 +627,8 @@ select_cg(#l{ke={type_clause,bin_int,S}}, {var,V}, Tf, _Vf, Bef, St) ->
select_bin_segs(S, V, Tf, Bef, St);
select_cg(#l{ke={type_clause,bin_end,[S]}}, {var,V}, Tf, _Vf, Bef, St) ->
select_bin_end(S, V, Tf, Bef, St);
+select_cg(#l{ke={type_clause,map,S}}, {var,V}, Tf, Vf, Bef, St) ->
+ select_map(S, V, Tf, Vf, Bef, St);
select_cg(#l{ke={type_clause,Type,Scs}}, {var,V}, Tf, Vf, Bef, St0) ->
{Vis,{Aft,St1}} =
mapfoldl(fun (S, {Int,Sta}) ->
@@ -637,6 +643,10 @@ select_val_cg(tuple, R, [Arity,{f,Lbl}], Tf, Vf, [{label,Lbl}|Sis]) ->
[{test,is_tuple,{f,Tf},[R]},{test,test_arity,{f,Vf},[R,Arity]}|Sis];
select_val_cg(tuple, R, Vls, Tf, Vf, Sis) ->
[{test,is_tuple,{f,Tf},[R]},{select_tuple_arity,R,{f,Vf},{list,Vls}}|Sis];
+select_val_cg(map, R, [_Val,{f,Lbl}], Fail, Fail, [{label,Lbl}|Sis]) ->
+ [{test,is_map,{f,Fail},[R]}|Sis];
+select_val_cg(map, R, [_Val,{f,Lbl}|_], Tf, _Vf, [{label,Lbl}|Sis]) ->
+ [{test,is_map,{f,Tf},[R]}|Sis];
select_val_cg(Type, R, [Val, {f,Lbl}], Fail, Fail, [{label,Lbl}|Sis]) ->
[{test,is_eq_exact,{f,Fail},[R,{Type,Val}]}|Sis];
select_val_cg(Type, R, [Val, {f,Lbl}], Tf, Vf, [{label,Lbl}|Sis]) ->
@@ -915,6 +925,52 @@ select_extract_tuple(Src, Vs, I, Vdb, Bef, St) ->
{Es,{Aft,_}} = flatmapfoldl(F, {Bef,0}, Vs),
{Es,Aft,St}.
+select_map(Scs, V, Tf, Vf, Bef, St0) ->
+ Reg = fetch_var(V, Bef),
+ {Is,Aft,St1} =
+ match_fmf(fun(#l{ke={val_clause,{map,_,Es},B},i=I,vdb=Vdb}, Fail, St1) ->
+ select_map_val(V, Es, B, Fail, I, Vdb, Bef, St1)
+ end, Vf, St0, Scs),
+ {[{test,is_map,{f,Tf},[Reg]}|Is],Aft,St1}.
+
+select_map_val(V, Es, B, Fail, I, Vdb, Bef, St0) ->
+ {Eis,Int,St1} = select_extract_map(V, Es, Fail, I, Vdb, Bef, St0),
+ {Bis,Aft,St2} = match_cg(B, Fail, Int, St1),
+ {Eis++Bis,Aft,St2}.
+
+select_extract_map(_, [], _, _, _, Bef, St) -> {[],Bef,St};
+select_extract_map(Src, Vs, Fail, I, Vdb, Bef, St) ->
+ %% First split the instruction flow
+ %% We want one set of each
+ %% 1) has_map_fields (no target registers)
+ %% 2) get_map_elements (with target registers)
+ %% Assume keys are term-sorted
+ Rsrc = fetch_var(Src, Bef),
+
+ {{HasKs,GetVs},Aft} = lists:foldr(fun
+ ({map_pair,Key,{var,V}},{{HasKsi,GetVsi},Int0}) ->
+ case vdb_find(V, Vdb) of
+ {V,_,L} when L =< I ->
+ {{[Key|HasKsi],GetVsi},Int0};
+ _Other ->
+ Reg1 = put_reg(V, Int0#sr.reg),
+ Int1 = Int0#sr{reg=Reg1},
+ {{HasKsi,[Key,fetch_reg(V, Reg1)|GetVsi]},Int1}
+ end
+ end, {{[],[]},Bef}, Vs),
+
+ Code = case {HasKs,GetVs} of
+ {HasKs,[]} ->
+ [{test,has_map_fields,{f,Fail},Rsrc,{list,HasKs}}];
+ {[],GetVs} ->
+ [{get_map_elements, {f,Fail},Rsrc,{list,GetVs}}];
+ {HasKs,GetVs} ->
+ [{test,has_map_fields,{f,Fail},Rsrc,{list,HasKs}},
+ {get_map_elements, {f,Fail},Rsrc,{list,GetVs}}]
+ end,
+ {Code, Aft, St}.
+
+
select_extract_cons(Src, [{var,Hd}, {var,Tl}], I, Vdb, Bef, St) ->
{Es,Aft} = case {vdb_find(Hd, Vdb), vdb_find(Tl, Vdb)} of
{{_,_,Lhd}, {_,_,Ltl}} when Lhd =< I, Ltl =< I ->
@@ -1408,7 +1464,7 @@ catch_cg(C, {var,R}, Le, Vdb, Bef, St0) ->
%% annotation must reflect this and make sure that the return
%% variable is allocated first.
%%
-%% put_list for constructing a cons is an atomic instruction
+%% put_list and put_map are atomic instructions, both of
%% which can safely resuse one of the source registers as target.
set_cg([{var,R}], {cons,Es}, Le, Vdb, Bef, St) ->
@@ -1448,6 +1504,35 @@ set_cg([{var,R}], {binary,Segs}, Le, Vdb, Bef,
%% Now generate the complete code for constructing the binary.
Code = cg_binary(PutCode, Target, Temp, Fail, MaxRegs, Le#l.a),
{Sis++Code,Aft,St};
+set_cg([{var,R}], {map,Op,Map,Es}, Le, Vdb, Bef,
+ #cg{in_catch=InCatch,bfail=Bfail}=St) ->
+
+ Fail = {f,Bfail},
+ {Sis,Int0} =
+ case InCatch of
+ true -> adjust_stack(Bef, Le#l.i, Le#l.i+1, Vdb);
+ false -> {[],Bef}
+ end,
+ SrcReg = cg_reg_arg(Map,Int0),
+ Line = line(Le#l.a),
+
+ %% The instruction needs to store keys in term sorted order
+ %% All keys has to be unique here
+ Pairs = map_pair_strip_and_termsort(Es),
+
+ %% fetch registers for values to be put into the map
+ List = flatmap(fun({K,V}) -> [K,cg_reg_arg(V,Int0)] end, Pairs),
+
+ Live = max_reg(Bef#sr.reg),
+ Int1 = Int0#sr{reg=put_reg(R, Int0#sr.reg)},
+ Aft = clear_dead(Int1, Le#l.i, Vdb),
+ Target = fetch_reg(R, Int1#sr.reg),
+
+ I = case Op of
+ assoc -> put_map_assoc;
+ exact -> put_map_exact
+ end,
+ {Sis++[Line]++[{I,Fail,SrcReg,Target,Live,{list,List}}],Aft,St};
set_cg([{var,R}], Con, Le, Vdb, Bef, St) ->
%% Find a place for the return register first.
Int = Bef#sr{reg=put_reg(R, Bef#sr.reg)},
@@ -1460,16 +1545,27 @@ set_cg([{var,R}], Con, Le, Vdb, Bef, St) ->
end,
{Ais,clear_dead(Int, Le#l.i, Vdb),St}.
+map_pair_strip_and_termsort(Es) ->
+ %% format in
+ %% [{map_pair,K,V}]
+ %% where K is for example {integer, 1} and we want to sort on 1.
+ Ls = [{K,V}||{_,K,V}<-Es],
+ lists:sort(fun ({{_,A},_}, {{_,B},_}) -> erts_internal:cmp_term(A,B) =< 0;
+ ({nil,_}, {{_,B},_}) -> [] =< B;
+ ({{_,A},_}, {nil,_}) -> A =< []
+ end, Ls).
+
%%%
%%% Code generation for constructing binaries.
%%%
cg_binary([{bs_put_binary,Fail,{atom,all},U,_Flags,Src}|PutCode],
Target, Temp, Fail, MaxRegs, Anno) ->
+ Line = line(Anno),
Live = cg_live(Target, MaxRegs),
SzCode = cg_bitstr_size(PutCode, Target, Temp, Fail, Live),
BinFlags = {field_flags,[]},
- Code = SzCode ++
+ Code = [Line|SzCode] ++
[case member(single_use, Anno) of
true ->
{bs_private_append,Fail,Target,U,Src,BinFlags,Target};
@@ -1930,7 +2026,7 @@ load_vars(Vs, Regs) ->
foldl(fun ({var,V}, Rs) -> put_reg(V, Rs) end, Regs, Vs).
%% put_reg(Val, Regs) -> Regs.
-%% find_reg(Val, Regs) -> ok{r{R}} | error.
+%% find_reg(Val, Regs) -> {ok,r{R}} | error.
%% fetch_reg(Val, Regs) -> r{R}.
%% Functions to interface the registers.
diff --git a/lib/compiler/src/v3_core.erl b/lib/compiler/src/v3_core.erl
index 321cf7af1c..8c18f6a9f7 100644
--- a/lib/compiler/src/v3_core.erl
+++ b/lib/compiler/src/v3_core.erl
@@ -74,10 +74,11 @@
-export([module/2,format_error/1]).
-import(lists, [reverse/1,reverse/2,map/2,member/2,foldl/3,foldr/3,mapfoldl/3,
- splitwith/2,keyfind/3,sort/1,foreach/2]).
+ splitwith/2,keyfind/3,sort/1,foreach/2,droplast/1,last/1]).
-import(ordsets, [add_element/2,del_element/2,is_element/2,
union/1,union/2,intersection/2,subtract/2]).
--import(cerl, [ann_c_cons/3,ann_c_cons_skel/3,ann_c_tuple/2,c_tuple/1]).
+-import(cerl, [ann_c_cons/3,ann_c_cons_skel/3,ann_c_tuple/2,c_tuple/1,
+ ann_c_map/2, ann_c_map/3]).
-include("core_parse.hrl").
@@ -101,6 +102,8 @@
-record(ireceive2, {anno=#a{},clauses,timeout,action}).
-record(iset, {anno=#a{},var,arg}).
-record(itry, {anno=#a{},args,vars,body,evars,handler}).
+-record(ifilter, {anno=#a{},arg}).
+-record(igen, {anno=#a{},acc_pat,acc_guard,skip_pat,tail,tail_pat,arg}).
-type iapply() :: #iapply{}.
-type ibinary() :: #ibinary{}.
@@ -117,10 +120,13 @@
-type ireceive2() :: #ireceive2{}.
-type iset() :: #iset{}.
-type itry() :: #itry{}.
+-type ifilter() :: #ifilter{}.
+-type igen() :: #igen{}.
-type i() :: iapply() | ibinary() | icall() | icase() | icatch()
| iclause() | ifun() | iletrec() | imatch() | iprimop()
- | iprotect() | ireceive1() | ireceive2() | iset() | itry().
+ | iprotect() | ireceive1() | ireceive2() | iset() | itry()
+ | ifilter() | igen().
-type warning() :: {file:filename(), [{integer(), module(), term()}]}.
@@ -226,13 +232,13 @@ guard(Gs0, St0) ->
Gt1 = guard_tests(Gt0),
L = element(2, Gt1),
{op,L,'or',Gt1,Rhs}
- end, guard_tests(last(Gs0)), first(Gs0)),
+ end, guard_tests(last(Gs0)), droplast(Gs0)),
{Gs,St} = gexpr_top(Gs1, St0#core{in_guard=true}),
{Gs,St#core{in_guard=false}}.
guard_tests(Gs) ->
L = element(2, hd(Gs)),
- {protect,L,foldr(fun (G, Rhs) -> {op,L,'and',G,Rhs} end, last(Gs), first(Gs))}.
+ {protect,L,foldr(fun (G, Rhs) -> {op,L,'and',G,Rhs} end, last(Gs), droplast(Gs))}.
%% gexpr_top(Expr, State) -> {Cexpr,State}.
%% Generate an internal core expression of a guard test. Explicitly
@@ -269,51 +275,67 @@ gexpr({op,L,'orelse',E1,E2}, Bools, St0) ->
True = {atom,L,true},
E = make_bool_switch_guard(L, E1, V, True, E2),
gexpr(E, Bools, St);
-gexpr({op,Line,Op,L,R}=Call, Bools0, St0) ->
+gexpr({op,Line,Op,L,R}=E, Bools, St) ->
case erl_internal:bool_op(Op, 2) of
- true ->
- {Le,Lps,Bools1,St1} = gexpr(L, Bools0, St0),
- {Ll,Llps,St2} = force_safe(Le, St1),
- {Re,Rps,Bools,St3} = gexpr(R, Bools1, St2),
- {Rl,Rlps,St4} = force_safe(Re, St3),
- Anno = lineno_anno(Line, St4),
- {#icall{anno=#a{anno=Anno}, %Must have an #a{}
- module=#c_literal{anno=Anno,val=erlang},
- name=#c_literal{anno=Anno,val=Op},
- args=[Ll,Rl]},Lps ++ Llps ++ Rps ++ Rlps,Bools,St4};
- false ->
- gexpr_test(Call, Bools0, St0)
+ true ->
+ gexpr_bool(Op, L, R, Bools, St, Line);
+ false ->
+ gexpr_test(E, Bools, St)
end;
-gexpr({op,Line,Op,A}=Call, Bools0, St0) ->
- case Op of
- 'not' ->
- {Ae0,Aps,Bools,St1} = gexpr(A, Bools0, St0),
- case Ae0 of
- #icall{module=#c_literal{val=erlang},
- name=#c_literal{val='=:='},
- args=[E,#c_literal{val=true}]}=EqCall ->
- %%
- %% Doing the following transformation
- %% not(Expr =:= true) ==> Expr =:= false
- %% will help eliminating redundant is_boolean/1 tests.
- %%
- Ae = EqCall#icall{args=[E,#c_literal{val=false}]},
- {Al,Alps,St2} = force_safe(Ae, St1),
- {Al,Aps ++ Alps,Bools,St2};
- Ae ->
- {Al,Alps,St2} = force_safe(Ae, St1),
- Anno = lineno_anno(Line, St2),
- {#icall{anno=#a{anno=Anno}, %Must have an #a{}
- module=#c_literal{anno=Anno,val=erlang},
- name=#c_literal{anno=Anno,val=Op},
- args=[Al]},Aps ++ Alps,Bools,St2}
- end;
- _ ->
- gexpr_test(Call, Bools0, St0)
+gexpr({call,Line,{remote,_,{atom,_,erlang},{atom,_,Op}},[L,R]}=E, Bools, St) ->
+ case erl_internal:bool_op(Op, 2) of
+ true ->
+ gexpr_bool(Op, L, R, Bools, St, Line);
+ false ->
+ gexpr_test(E, Bools, St)
end;
+gexpr({op,Line,'not',A}, Bools, St) ->
+ gexpr_not(A, Bools, St, Line);
+gexpr({call,Line,{remote,_,{atom,_,erlang},{atom,_,'not'}},[A]}, Bools, St) ->
+ gexpr_not(A, Bools, St, Line);
gexpr(E0, Bools, St0) ->
gexpr_test(E0, Bools, St0).
+%% gexpr_not(L, R, Bools, State) -> {Cexpr,[PreExp],Bools,State}.
+%% Generate a guard for boolean operators
+
+gexpr_bool(Op, L, R, Bools0, St0, Line) ->
+ {Le,Lps,Bools1,St1} = gexpr(L, Bools0, St0),
+ {Ll,Llps,St2} = force_safe(Le, St1),
+ {Re,Rps,Bools,St3} = gexpr(R, Bools1, St2),
+ {Rl,Rlps,St4} = force_safe(Re, St3),
+ Anno = lineno_anno(Line, St4),
+ {#icall{anno=#a{anno=Anno}, %Must have an #a{}
+ module=#c_literal{anno=Anno,val=erlang},
+ name=#c_literal{anno=Anno,val=Op},
+ args=[Ll,Rl]},Lps ++ Llps ++ Rps ++ Rlps,Bools,St4}.
+
+%% gexpr_not(Expr, Bools, State) -> {Cexpr,[PreExp],Bools,State}.
+%% Generate an erlang:'not'/1 guard test.
+
+gexpr_not(A, Bools0, St0, Line) ->
+ {Ae0,Aps,Bools,St1} = gexpr(A, Bools0, St0),
+ case Ae0 of
+ #icall{module=#c_literal{val=erlang},
+ name=#c_literal{val='=:='},
+ args=[E,#c_literal{val=true}]}=EqCall ->
+ %%
+ %% Doing the following transformation
+ %% not(Expr =:= true) ==> Expr =:= false
+ %% will help eliminating redundant is_boolean/1 tests.
+ %%
+ Ae = EqCall#icall{args=[E,#c_literal{val=false}]},
+ {Al,Alps,St2} = force_safe(Ae, St1),
+ {Al,Aps ++ Alps,Bools,St2};
+ Ae ->
+ {Al,Alps,St2} = force_safe(Ae, St1),
+ Anno = lineno_anno(Line, St2),
+ {#icall{anno=#a{anno=Anno}, %Must have an #a{}
+ module=#c_literal{anno=Anno,val=erlang},
+ name=#c_literal{anno=Anno,val='not'},
+ args=[Al]},Aps ++ Alps,Bools,St2}
+ end.
+
%% gexpr_test(Expr, Bools, State) -> {Cexpr,[PreExp],Bools,State}.
%% Generate a guard test. At this stage we must be sure that we have
%% a proper boolean value here so wrap things with an true test if we
@@ -330,7 +352,8 @@ gexpr_test(E0, Bools0, St0) ->
#icall{anno=Anno,module=#c_literal{val=erlang},name=#c_literal{val=N},args=As} ->
Ar = length(As),
case erl_internal:type_test(N, Ar) orelse
- erl_internal:comp_op(N, Ar) of
+ erl_internal:comp_op(N, Ar) orelse
+ erl_internal:bool_op(N, Ar) of
true -> {E1,Eps0,Bools0,St1};
false ->
Lanno = Anno#a.anno,
@@ -479,14 +502,45 @@ expr({cons,L,H0,T0}, St0) ->
{T1,Tps,St2} = safe(T0, St1),
A = lineno_anno(L, St2),
{ann_c_cons(A, H1, T1),Hps ++ Tps,St2};
-expr({lc,L,E,Qs}, St) ->
- lc_tq(L, E, Qs, #c_literal{anno=lineno_anno(L, St),val=[]}, St);
+expr({lc,L,E,Qs0}, St0) ->
+ {Qs1,St1} = preprocess_quals(L, Qs0, St0),
+ lc_tq(L, E, Qs1, #c_literal{anno=lineno_anno(L, St1),val=[]}, St1);
expr({bc,L,E,Qs}, St) ->
bc_tq(L, E, Qs, {nil,L}, St);
expr({tuple,L,Es0}, St0) ->
{Es1,Eps,St1} = safe_list(Es0, St0),
A = lineno_anno(L, St1),
{ann_c_tuple(A, Es1),Eps,St1};
+expr({map,L,Es0}, St0) ->
+ % erl_lint should make sure only #{ K => V } are allowed
+ % in map construction.
+ try map_pair_list(Es0, St0) of
+ {Es1,Eps,St1} ->
+ A = lineno_anno(L, St1),
+ {ann_c_map(A,Es1),Eps,St1}
+ catch
+ throw:{bad_map,Warning} ->
+ St = add_warning(L, Warning, St0),
+ LineAnno = lineno_anno(L, St),
+ As = [#c_literal{anno=LineAnno,val=badarg}],
+ {#icall{anno=#a{anno=LineAnno}, %Must have an #a{}
+ module=#c_literal{anno=LineAnno,val=erlang},
+ name=#c_literal{anno=LineAnno,val=error},
+ args=As},[],St}
+ end;
+expr({map,L,M0,Es0}, St0) ->
+ try expr_map(M0,Es0,lineno_anno(L, St0),St0) of
+ {_,_,_}=Res -> Res
+ catch
+ throw:{bad_map,Warning} ->
+ St = add_warning(L, Warning, St0),
+ LineAnno = lineno_anno(L, St),
+ As = [#c_literal{anno=LineAnno,val=badarg}],
+ {#icall{anno=#a{anno=LineAnno}, %Must have an #a{}
+ module=#c_literal{anno=LineAnno,val=erlang},
+ name=#c_literal{anno=LineAnno,val=error},
+ args=As},[],St}
+ end;
expr({bin,L,Es0}, St0) ->
try expr_bin(Es0, lineno_anno(L, St0), St0) of
{_,_,_}=Res -> Res
@@ -502,7 +556,7 @@ expr({bin,L,Es0}, St0) ->
end;
expr({block,_,Es0}, St0) ->
%% Inline the block directly.
- {Es1,St1} = exprs(first(Es0), St0),
+ {Es1,St1} = exprs(droplast(Es0), St0),
{E1,Eps,St2} = expr(last(Es0), St1),
{E1,Es1 ++ Eps,St2};
expr({'if',L,Cs0}, St0) ->
@@ -563,7 +617,8 @@ expr({'try',L,Es0,[],[],As0}, St0) ->
guard=[#c_literal{val=true}],
body=As1}],
fc=Fc},
- App = #iapply{anno=Lanno,op=#c_var{anno=LA,name={Name,0}},args=[]},
+ App = #iapply{anno=#a{anno=[compiler_generated|LA]},
+ op=#c_var{anno=LA,name={Name,0}},args=[]},
{Evs,Hs,St5} = try_after([App], St4),
Try = #itry{anno=Lanno,args=Es1,vars=[V],body=[App,V],evars=Evs,handler=Hs},
Letrec = #iletrec{anno=Lanno,defs=[{{Name,0},Fun}],
@@ -605,7 +660,7 @@ expr({call,Lc,{atom,Lf,F},As0}, St0) ->
Op = #c_var{anno=lineno_anno(Lf, St1),name={F,length(As1)}},
{#iapply{anno=#a{anno=lineno_anno(Lc, St1)},op=Op,args=As1},Aps,St1};
expr({call,L,FunExp,As0}, St0) ->
- {Fun,Fps,St1} = safe(FunExp, St0),
+ {Fun,Fps,St1} = safe_fun(length(As0), FunExp, St0),
{As1,Aps,St2} = safe_list(As0, St1),
Lanno = lineno_anno(L, St2),
{#iapply{anno=#a{anno=Lanno},op=Fun,args=As1},Fps ++ Aps,St2};
@@ -635,7 +690,7 @@ expr({match,L,P0,E0}, St0) ->
Other when not is_atom(Other) ->
{#imatch{anno=#a{anno=Lanno},pat=P2,arg=E2,fc=Fc},Eps,St4}
end;
-expr({op,_,'++',{lc,Llc,E,Qs},More}, St0) ->
+expr({op,_,'++',{lc,Llc,E,Qs0},More}, St0) ->
%% Optimise '++' here because of the list comprehension algorithm.
%%
%% To avoid achieving quadratic complexity if there is a chain of
@@ -643,7 +698,8 @@ expr({op,_,'++',{lc,Llc,E,Qs},More}, St0) ->
%% evaluation of More now. Evaluating More here could also reduce the
%% number variables in the environment for letrec.
{Mc,Mps,St1} = safe(More, St0),
- {Y,Yps,St} = lc_tq(Llc, E, Qs, Mc, St1),
+ {Qs,St2} = preprocess_quals(Llc, Qs0, St1),
+ {Y,Yps,St} = lc_tq(Llc, E, Qs, Mc, St2),
{Y,Mps++Yps,St};
expr({op,L,'andalso',E1,E2}, St0) ->
{#c_var{name=V0},St} = new_var(L, St0),
@@ -694,6 +750,57 @@ make_bool_switch_guard(L, E, V, T, F) ->
{clause,NegL,[V],[],[V]}
]}.
+expr_map(M0,Es0,A,St0) ->
+ {M1,Mps,St1} = safe(M0, St0),
+ case is_valid_map_src(M1) of
+ true ->
+ case {M1,Es0} of
+ {#c_var{}, []} ->
+ %% transform M#{} to is_map(M)
+ {Vpat,St2} = new_var(St1),
+ {Fpat,St3} = new_var(St2),
+ Cs = [#iclause{
+ anno=A,
+ pats=[Vpat],
+ guard=[#icall{anno=#a{anno=A},
+ module=#c_literal{anno=A,val=erlang},
+ name=#c_literal{anno=A,val=is_map},
+ args=[Vpat]}],
+ body=[Vpat]}],
+ Fc = fail_clause([Fpat], A, #c_literal{val=badarg}),
+ {#icase{anno=#a{anno=A},args=[M1],clauses=Cs,fc=Fc},Mps,St3};
+ {_,_} ->
+ {Es1,Eps,St2} = map_pair_list(Es0, St1),
+ {ann_c_map(A,M1,Es1),Mps++Eps,St2}
+ end;
+ false -> throw({bad_map,bad_map})
+ end.
+
+is_valid_map_src(#c_literal{val = M}) when is_map(M) -> true;
+is_valid_map_src(#c_map{}) -> true;
+is_valid_map_src(#c_var{}) -> true;
+is_valid_map_src(_) -> false.
+
+map_pair_list(Es, St) ->
+ foldr(fun
+ ({map_field_assoc,L,K0,V0}, {Ces,Esp,St0}) ->
+ {K,Ep0,St1} = safe(K0, St0),
+ ok = ensure_valid_map_key(K),
+ {V,Ep1,St2} = safe(V0, St1),
+ A = lineno_anno(L, St2),
+ Pair = #c_map_pair{op=#c_literal{val=assoc},anno=A,key=K,val=V},
+ {[Pair|Ces],Ep0 ++ Ep1 ++ Esp,St2};
+ ({map_field_exact,L,K0,V0}, {Ces,Esp,St0}) ->
+ {K,Ep0,St1} = safe(K0, St0),
+ ok = ensure_valid_map_key(K),
+ {V,Ep1,St2} = safe(V0, St1),
+ A = lineno_anno(L, St2),
+ Pair = #c_map_pair{op=#c_literal{val=exact},anno=A,key=K,val=V},
+ {[Pair|Ces],Ep0 ++ Ep1 ++ Esp,St2}
+ end, {[],[],St}, Es).
+
+ensure_valid_map_key(#c_literal{}) -> ok;
+ensure_valid_map_key(_) -> throw({bad_map,bad_map_key}).
%% try_exception([ExcpClause], St) -> {[ExcpVar],Handler,St}.
@@ -862,133 +969,45 @@ fun_tq({_,_,Name}=Id, Cs0, L, St0, NameInfo) ->
%% lc_tq(Line, Exp, [Qualifier], Mc, State) -> {LetRec,[PreExp],State}.
%% This TQ from Simon PJ pp 127-138.
-%% This gets a bit messy as we must transform all directly here. We
-%% recognise guard tests and try to fold them together and join to a
-%% preceding generators, this should give us better and more compact
-%% code.
-lc_tq(Line, E, [{generate,Lg,P,G}|Qs0], Mc, St0) ->
- {Gs,Qs1} = splitwith(fun is_guard_test/1, Qs0),
+lc_tq(Line, E, [#igen{anno=GAnno,acc_pat=AccPat,acc_guard=AccGuard,
+ skip_pat=SkipPat,tail=Tail,tail_pat=TailPat,
+ arg={Pre,Arg}}|Qs], Mc, St0) ->
{Name,St1} = new_fun_name("lc", St0),
- {Head,St2} = new_var(St1),
- {Tname,St3} = new_var_name(St2),
- LA = lineno_anno(Line, St3),
- LAnno = #a{anno=LA},
- Tail = #c_var{anno=LA,name=Tname},
- {Arg,St4} = new_var(St3),
- {Nc,[],St5} = expr({call,Lg,{atom,Lg,Name},[{var,Lg,Tname}]}, St4),
- {Guardc,St6} = lc_guard_tests(Gs, St5), %These are always flat!
- {Lc,Lps,St7} = lc_tq(Line, E, Qs1, Nc, St6),
- {Pc,St8} = list_gen_pattern(P, Line, St7),
- {Gc,Gps,St9} = safe(G, St8), %Will be a function argument!
- Fc = function_clause([Arg], LA, {Name,1}),
-
- %% Avoid constructing a default clause if the list comprehension
- %% only has a variable as generator and there are no guard
- %% tests. In other words, if the comprehension is equivalent to
- %% lists:map/2.
- Cs0 = case {Guardc, Pc} of
- {[], #c_var{}} ->
- [#iclause{anno=LAnno,
- pats=[#c_literal{anno=LA,val=[]}],guard=[],
- body=[Mc]}];
- _ ->
- [#iclause{anno=#a{anno=[compiler_generated|LA]},
- pats=[ann_c_cons(LA, Head, Tail)],
- guard=[],
- body=[Nc]},
- #iclause{anno=LAnno,
- pats=[#c_literal{anno=LA,val=[]}],guard=[],
- body=[Mc]}]
- end,
- Cs = case Pc of
- nomatch -> Cs0;
- _ ->
- [#iclause{anno=LAnno,
- pats=[ann_c_cons(LA, Pc, Tail)],
- guard=Guardc,
- body=Lps ++ [Lc]}|Cs0]
- end,
- Fun = #ifun{anno=LAnno,id=[],vars=[Arg],clauses=Cs,fc=Fc},
- {#iletrec{anno=LAnno,defs=[{{Name,1},Fun}],
- body=Gps ++ [#iapply{anno=LAnno,
- op=#c_var{anno=LA,name={Name,1}},
- args=[Gc]}]},
- [],St9};
-lc_tq(Line, E, [{b_generate,Lg,P,G}|Qs0], Mc, St0) ->
- {Gs,Qs1} = splitwith(fun is_guard_test/1, Qs0),
- {Name,St1} = new_fun_name("blc", St0),
LA = lineno_anno(Line, St1),
LAnno = #a{anno=LA},
- HeadBinPattern = pattern(P, St1),
- #c_binary{segments=Ps0} = HeadBinPattern,
- {Ps,Tail,St2} = append_tail_segment(Ps0, St1),
- {EPs,St3} = emasculate_segments(Ps, St2),
- Pattern = HeadBinPattern#c_binary{segments=Ps},
- EPattern = HeadBinPattern#c_binary{segments=EPs},
- {Arg,St4} = new_var(St3),
- {Guardc,St5} = lc_guard_tests(Gs, St4), %These are always flat!
- Tname = Tail#c_var.name,
- {Nc,[],St6} = expr({call,Lg,{atom,Lg,Name},[{var,Lg,Tname}]}, St5),
- {Bc,Bps,St7} = lc_tq(Line, E, Qs1, Nc, St6),
- {Gc,Gps,St10} = safe(G, St7), %Will be a function argument!
- Fc = function_clause([Arg], LA, {Name,1}),
- {TailSegList,_,St} = append_tail_segment([], St10),
- Cs = [#iclause{anno=#a{anno=[compiler_generated|LA]},
- pats=[Pattern],
- guard=Guardc,
- body=Bps ++ [Bc]},
- #iclause{anno=#a{anno=[compiler_generated|LA]},
- pats=[EPattern],
- guard=[],
- body=[#iapply{anno=LAnno,
- op=#c_var{anno=LA,name={Name,1}},
- args=[Tail]}]},
- #iclause{anno=LAnno,
- pats=[#c_binary{anno=LA,segments=TailSegList}],guard=[],
- body=[Mc]}],
- Fun = #ifun{anno=LAnno,id=[],vars=[Arg],clauses=Cs,fc=Fc},
- {#iletrec{anno=LAnno,defs=[{{Name,1},Fun}],
- body=Gps ++ [#iapply{anno=LAnno,
- op=#c_var{anno=LA,name={Name,1}},
- args=[Gc]}]},
- [],St};
-lc_tq(Line, E, [Fil0|Qs0], Mc, St0) ->
- %% Special case sequences guard tests.
- LA = lineno_anno(element(2, Fil0), St0),
- LAnno = #a{anno=LA},
- case is_guard_test(Fil0) of
- true ->
- {Gs0,Qs1} = splitwith(fun is_guard_test/1, Qs0),
- {Lc,Lps,St1} = lc_tq(Line, E, Qs1, Mc, St0),
- {Gs,St2} = lc_guard_tests([Fil0|Gs0], St1), %These are always flat!
- {#icase{anno=LAnno,
- args=[],
- clauses=[#iclause{anno=LAnno,pats=[],
- guard=Gs,body=Lps ++ [Lc]}],
- fc=#iclause{anno=LAnno#a{anno=[compiler_generated|LA]},
- pats=[],guard=[],body=[Mc]}},
- [],St2};
- false ->
- {Lc,Lps,St1} = lc_tq(Line, E, Qs0, Mc, St0),
- {Fpat,St2} = new_var(St1),
- Fc = fail_clause([Fpat], LA,
- c_tuple([#c_literal{val=case_clause},Fpat])),
- %% Do a novars little optimisation here.
- {Filc,Fps,St3} = novars(Fil0, St2),
- {#icase{anno=LAnno,
- args=[Filc],
- clauses=[#iclause{anno=LAnno,
- pats=[#c_literal{anno=LA,val=true}],
- guard=[],
- body=Lps ++ [Lc]},
- #iclause{anno=LAnno#a{anno=[compiler_generated|LA]},
- pats=[#c_literal{anno=LA,val=false}],
- guard=[],
- body=[Mc]}],
- fc=Fc},
- Fps,St3}
- end;
+ F = #c_var{anno=LA,name={Name,1}},
+ Nc = #iapply{anno=GAnno,op=F,args=[Tail]},
+ {Var,St2} = new_var(St1),
+ Fc = function_clause([Var], LA, {Name,1}),
+ TailClause = #iclause{anno=LAnno,pats=[TailPat],guard=[],body=[Mc]},
+ Cs0 = case {AccPat,AccGuard} of
+ {SkipPat,[]} ->
+ %% Skip and accumulator patterns are the same and there is
+ %% no guard, no need to generate a skip clause.
+ [TailClause];
+ _ ->
+ [#iclause{anno=#a{anno=[compiler_generated|LA]},
+ pats=[SkipPat],guard=[],body=[Nc]},
+ TailClause]
+ end,
+ {Cs,St4} = case AccPat of
+ nomatch ->
+ %% The accumulator pattern never matches, no need
+ %% for an accumulator clause.
+ {Cs0,St2};
+ _ ->
+ {Lc,Lps,St3} = lc_tq(Line, E, Qs, Nc, St2),
+ {[#iclause{anno=LAnno,pats=[AccPat],guard=AccGuard,
+ body=Lps ++ [Lc]}|Cs0],
+ St3}
+ end,
+ Fun = #ifun{anno=LAnno,id=[],vars=[Var],clauses=Cs,fc=Fc},
+ {#iletrec{anno=LAnno#a{anno=[list_comprehension|LA]},defs=[{{Name,1},Fun}],
+ body=Pre ++ [#iapply{anno=LAnno,op=F,args=[Arg]}]},
+ [],St4};
+lc_tq(Line, E, [#ifilter{}=Filter|Qs], Mc, St) ->
+ filter_tq(Line, E, Filter, Mc, St, Qs, fun lc_tq/5);
lc_tq(Line, E0, [], Mc0, St0) ->
{H1,Hps,St1} = safe(E0, St0),
{T1,Tps,St} = force_safe(Mc0, St1),
@@ -998,143 +1017,60 @@ lc_tq(Line, E0, [], Mc0, St0) ->
%% bc_tq(Line, Exp, [Qualifier], More, State) -> {LetRec,[PreExp],State}.
%% This TQ from Gustafsson ERLANG'05.
-%% This gets a bit messy as we must transform all directly here. We
-%% recognise guard tests and try to fold them together and join to a
-%% preceding generators, this should give us better and more compact
-%% code.
%% More could be transformed before calling bc_tq.
-bc_tq(Line, Exp, Qualifiers, _, St0) ->
+bc_tq(Line, Exp, Qs0, _, St0) ->
{BinVar,St1} = new_var(St0),
- {Sz,SzPre,St2} = bc_initial_size(Exp, Qualifiers, St1),
- {E,BcPre,St} = bc_tq1(Line, Exp, Qualifiers, BinVar, St2),
+ {Sz,SzPre,St2} = bc_initial_size(Exp, Qs0, St1),
+ {Qs,St3} = preprocess_quals(Line, Qs0, St2),
+ {E,BcPre,St} = bc_tq1(Line, Exp, Qs, BinVar, St3),
Pre = SzPre ++
[#iset{var=BinVar,
arg=#iprimop{name=#c_literal{val=bs_init_writable},
args=[Sz]}}] ++ BcPre,
{E,Pre,St}.
-bc_tq1(Line, E, [{generate,Lg,P,G}|Qs0], AccExpr, St0) ->
- {Gs,Qs1} = splitwith(fun is_guard_test/1, Qs0),
- {Name,St1} = new_fun_name("lbc", St0),
- LA = lineno_anno(Line, St1),
- {[Head,Tail,AccVar],St2} = new_vars(LA, 3, St1),
- LAnno = #a{anno=LA},
- {Arg,St3} = new_var(St2),
- NewMore = {call,Lg,{atom,Lg,Name},[{var,Lg,Tail#c_var.name},
- {var,Lg,AccVar#c_var.name}]},
- {Guardc,St4} = lc_guard_tests(Gs, St3), %These are always flat!
- {Lc,Lps,St5} = bc_tq1(Line, E, Qs1, AccVar, St4),
- {Nc,Nps,St6} = expr(NewMore, St5),
- {Pc,St7} = list_gen_pattern(P, Line, St6),
- {Gc,Gps,St8} = safe(G, St7), %Will be a function argument!
- Fc = function_clause([Arg,AccVar], LA, {Name,2}),
- Cs0 = case {Guardc, Pc} of
- {[], #c_var{}} ->
- [#iclause{anno=LAnno,
- pats=[#c_literal{anno=LA,val=[]},AccVar],guard=[],
- body=[AccVar]}];
- _ ->
- [#iclause{anno=#a{anno=[compiler_generated|LA]},
- pats=[ann_c_cons(LA, Head, Tail),AccVar],
- guard=[],
- body=Nps ++ [Nc]},
- #iclause{anno=LAnno,
- pats=[#c_literal{anno=LA,val=[]},AccVar],guard=[],
- body=[AccVar]}]
- end,
- Cs = case Pc of
- nomatch -> Cs0;
- _ ->
- Body = Lps ++ Nps ++ [#iset{var=AccVar,arg=Lc},Nc],
- [#iclause{anno=LAnno,
- pats=[ann_c_cons(LA,Pc,Tail),AccVar],
- guard=Guardc,
- body=Body}|Cs0]
- end,
- Fun = #ifun{anno=LAnno,id=[],vars=[Arg,AccVar],clauses=Cs,fc=Fc},
- {#iletrec{anno=LAnno,defs=[{{Name,2},Fun}],
- body=Gps ++ [#iapply{anno=LAnno,
- op=#c_var{anno=LA,name={Name,2}},
- args=[Gc,AccExpr]}]},
- [],St8};
-bc_tq1(Line, E, [{b_generate,Lg,P,G}|Qs0], AccExpr, St0) ->
- {Gs,Qs1} = splitwith(fun is_guard_test/1, Qs0),
+bc_tq1(Line, E, [#igen{anno=GAnno,acc_pat=AccPat,acc_guard=AccGuard,
+ skip_pat=SkipPat,tail=Tail,tail_pat=TailPat,
+ arg={Pre,Arg}}|Qs], Mc, St0) ->
{Name,St1} = new_fun_name("lbc", St0),
LA = lineno_anno(Line, St1),
- {AccVar,St2} = new_var(LA, St1),
LAnno = #a{anno=LA},
- HeadBinPattern = pattern(P, St2),
- #c_binary{segments=Ps0} = HeadBinPattern,
- {Ps,Tail,St3} = append_tail_segment(Ps0, St2),
- {EPs,St4} = emasculate_segments(Ps, St3),
- Pattern = HeadBinPattern#c_binary{segments=Ps},
- EPattern = HeadBinPattern#c_binary{segments=EPs},
- {Arg,St5} = new_var(St4),
- NewMore = {call,Lg,{atom,Lg,Name},[{var,Lg,Tail#c_var.name},
- {var,Lg,AccVar#c_var.name}]},
- {Guardc,St6} = lc_guard_tests(Gs, St5), %These are always flat!
- {Bc,Bps,St7} = bc_tq1(Line, E, Qs1, AccVar, St6),
- {Nc,Nps,St8} = expr(NewMore, St7),
- {Gc,Gps,St9} = safe(G, St8), %Will be a function argument!
- Fc = function_clause([Arg,AccVar], LA, {Name,2}),
- Body = Bps ++ Nps ++ [#iset{var=AccVar,arg=Bc},Nc],
- {TailSegList,_,St} = append_tail_segment([], St9),
- Cs = [#iclause{anno=LAnno,
- pats=[Pattern,AccVar],
- guard=Guardc,
- body=Body},
- #iclause{anno=#a{anno=[compiler_generated|LA]},
- pats=[EPattern,AccVar],
- guard=[],
- body=Nps ++ [Nc]},
- #iclause{anno=LAnno,
- pats=[#c_binary{anno=LA,segments=TailSegList},AccVar],
- guard=[],
- body=[AccVar]}],
- Fun = #ifun{anno=LAnno,id=[],vars=[Arg,AccVar],clauses=Cs,fc=Fc},
- {#iletrec{anno=LAnno,defs=[{{Name,2},Fun}],
- body=Gps ++ [#iapply{anno=LAnno,
- op=#c_var{anno=LA,name={Name,2}},
- args=[Gc,AccExpr]}]},
- [],St};
-bc_tq1(Line, E, [Fil0|Qs0], AccVar, St0) ->
- %% Special case sequences guard tests.
- LA = lineno_anno(element(2, Fil0), St0),
- LAnno = #a{anno=LA},
- case is_guard_test(Fil0) of
- true ->
- {Gs0,Qs1} = splitwith(fun is_guard_test/1, Qs0),
- {Bc,Bps,St1} = bc_tq1(Line, E, Qs1, AccVar, St0),
- {Gs,St} = lc_guard_tests([Fil0|Gs0], St1), %These are always flat!
- {#icase{anno=LAnno,
- args=[],
- clauses=[#iclause{anno=LAnno,
- pats=[],
- guard=Gs,body=Bps ++ [Bc]}],
- fc=#iclause{anno=LAnno#a{anno=[compiler_generated|LA]},
- pats=[],guard=[],body=[AccVar]}},
- [],St};
- false ->
- {Bc,Bps,St1} = bc_tq1(Line, E, Qs0, AccVar, St0),
- {Fpat,St2} = new_var(St1),
- Fc = fail_clause([Fpat], LA,
- c_tuple([#c_literal{val=case_clause},Fpat])),
- %% Do a novars little optimisation here.
- {Filc,Fps,St} = novars(Fil0, St2),
- {#icase{anno=LAnno,
- args=[Filc],
- clauses=[#iclause{anno=LAnno,
- pats=[#c_literal{anno=LA,val=true}],
- guard=[],
- body=Bps ++ [Bc]},
- #iclause{anno=LAnno#a{anno=[compiler_generated|LA]},
- pats=[#c_literal{anno=LA,val=false}],
- guard=[],
- body=[AccVar]}],
- fc=Fc},
- Fps,St}
- end;
+ {Vars=[_,AccVar],St2} = new_vars(LA, 2, St1),
+ F = #c_var{anno=LA,name={Name,2}},
+ Nc = #iapply{anno=GAnno,op=F,args=[Tail,AccVar]},
+ Fc = function_clause(Vars, LA, {Name,2}),
+ TailClause = #iclause{anno=LAnno,pats=[TailPat,AccVar],guard=[],
+ body=[AccVar]},
+ Cs0 = case {AccPat,AccGuard} of
+ {SkipPat,[]} ->
+ %% Skip and accumulator patterns are the same and there is
+ %% no guard, no need to generate a skip clause.
+ [TailClause];
+ _ ->
+ [#iclause{anno=#a{anno=[compiler_generated|LA]},
+ pats=[SkipPat,AccVar],guard=[],body=[Nc]},
+ TailClause]
+ end,
+ {Cs,St4} = case AccPat of
+ nomatch ->
+ %% The accumulator pattern never matches, no need
+ %% for an accumulator clause.
+ {Cs0,St2};
+ _ ->
+ {Bc,Bps,St3} = bc_tq1(Line, E, Qs, AccVar, St2),
+ Body = Bps ++ [#iset{var=AccVar,arg=Bc},Nc],
+ {[#iclause{anno=LAnno,
+ pats=[AccPat,AccVar],guard=AccGuard,
+ body=Body}|Cs0],
+ St3}
+ end,
+ Fun = #ifun{anno=LAnno,id=[],vars=Vars,clauses=Cs,fc=Fc},
+ {#iletrec{anno=LAnno#a{anno=[list_comprehension|LA]},defs=[{{Name,2},Fun}],
+ body=Pre ++ [#iapply{anno=LAnno,op=F,args=[Arg,Mc]}]},
+ [],St4};
+bc_tq1(Line, E, [#ifilter{}=Filter|Qs], Mc, St) ->
+ filter_tq(Line, E, Filter, Mc, St, Qs, fun bc_tq1/5);
bc_tq1(_, {bin,Bl,Elements}, [], AccVar, St0) ->
{E,Pre,St} = expr({bin,Bl,[{bin_element,Bl,
{var,Bl,AccVar#c_var.name},
@@ -1142,16 +1078,154 @@ bc_tq1(_, {bin,Bl,Elements}, [], AccVar, St0) ->
[binary,{unit,1}]}|Elements]}, St0),
#a{anno=A} = Anno0 = get_anno(E),
Anno = Anno0#a{anno=[compiler_generated,single_use|A]},
- %%Anno = Anno0#a{anno=[compiler_generated|A]},
{set_anno(E, Anno),Pre,St}.
+%% filter_tq(Line, Expr, Filter, Mc, State, [Qualifier], TqFun) ->
+%% {Case,[PreExpr],State}.
+%% Transform an intermediate comprehension filter to its intermediate case
+%% representation.
+
+filter_tq(Line, E, #ifilter{anno=#a{anno=LA}=LAnno,arg={Pre,Arg}},
+ Mc, St0, Qs, TqFun) ->
+ %% The filter is an expression, it is compiled to a case of degree 1 with
+ %% 3 clauses, one accumulating, one skipping and the final one throwing
+ %% {case_clause,Value} where Value is the result of the filter and is not a
+ %% boolean.
+ {Lc,Lps,St1} = TqFun(Line, E, Qs, Mc, St0),
+ {FailPat,St2} = new_var(St1),
+ Fc = fail_clause([FailPat], LA,
+ c_tuple([#c_literal{val=case_clause},FailPat])),
+ {#icase{anno=LAnno#a{anno=[list_comprehension|LA]},args=[Arg],
+ clauses=[#iclause{anno=LAnno,
+ pats=[#c_literal{val=true}],guard=[],
+ body=Lps ++ [Lc]},
+ #iclause{anno=LAnno#a{anno=[compiler_generated|LA]},
+ pats=[#c_literal{val=false}],guard=[],
+ body=[Mc]}],
+ fc=Fc},
+ Pre,St2};
+filter_tq(Line, E, #ifilter{anno=#a{anno=LA}=LAnno,arg=Guard},
+ Mc, St0, Qs, TqFun) when is_list(Guard) ->
+ %% Otherwise it is a guard, compiled to a case of degree 0 with 2 clauses,
+ %% the first matches if the guard succeeds and the comprehension continues
+ %% or the second one is selected and the current element is skipped.
+ {Lc,Lps,St1} = TqFun(Line, E, Qs, Mc, St0),
+ {#icase{anno=LAnno#a{anno=[list_comprehension|LA]},args=[],
+ clauses=[#iclause{anno=LAnno,pats=[],guard=Guard,body=Lps ++ [Lc]}],
+ fc=#iclause{anno=LAnno#a{anno=[compiler_generated|LA]},
+ pats=[],guard=[],body=[Mc]}},
+ [],St1}.
+
+%% preprocess_quals(Line, [Qualifier], State) -> {[Qualifier'],State}.
+%% Preprocess a list of Erlang qualifiers into its intermediate representation,
+%% represented as a list of #igen{} and #ifilter{} records. We recognise guard
+%% tests and try to fold them together and join to a preceding generators, this
+%% should give us better and more compact code.
+
+preprocess_quals(Line, Qs, St) ->
+ preprocess_quals(Line, Qs, St, []).
+
+preprocess_quals(Line, [Q|Qs0], St0, Acc) ->
+ case is_generator(Q) of
+ true ->
+ {Gs,Qs} = splitwith(fun is_guard_test/1, Qs0),
+ {Gen,St} = generator(Line, Q, Gs, St0),
+ preprocess_quals(Line, Qs, St, [Gen|Acc]);
+ false ->
+ LAnno = #a{anno=lineno_anno(get_anno(Q), St0)},
+ case is_guard_test(Q) of
+ true ->
+ %% When a filter is a guard test, its argument in the
+ %% #ifilter{} record is a list as returned by
+ %% lc_guard_tests/2.
+ {Gs,Qs} = splitwith(fun is_guard_test/1, Qs0),
+ {Cg,St} = lc_guard_tests([Q|Gs], St0),
+ Filter = #ifilter{anno=LAnno,arg=Cg},
+ preprocess_quals(Line, Qs, St, [Filter|Acc]);
+ false ->
+ %% Otherwise, it is a pair {Pre,Arg} as in a generator
+ %% input.
+ {Ce,Pre,St} = novars(Q, St0),
+ Filter = #ifilter{anno=LAnno,arg={Pre,Ce}},
+ preprocess_quals(Line, Qs0, St, [Filter|Acc])
+ end
+ end;
+preprocess_quals(_, [], St, Acc) ->
+ {reverse(Acc),St}.
+
+is_generator({generate,_,_,_}) -> true;
+is_generator({b_generate,_,_,_}) -> true;
+is_generator(_) -> false.
+
+%%
+%% Generators are abstracted as sextuplets:
+%% - acc_pat is the accumulator pattern, e.g. [Pat|Tail] for Pat <- Expr.
+%% - acc_guard is the list of guards immediately following the current
+%% generator in the qualifier list input.
+%% - skip_pat is the skip pattern, e.g. <<X,_:X,Tail/bitstring>> for
+%% <<X,1:X>> <= Expr.
+%% - tail is the variable used in AccPat and SkipPat bound to the rest of the
+%% generator input.
+%% - tail_pat is the tail pattern, respectively [] and <<_/bitstring>> for list
+%% and bit string generators.
+%% - arg is a pair {Pre,Arg} where Pre is the list of expressions to be
+%% inserted before the comprehension function and Arg is the expression
+%% that it should be passed.
+%%
+
+%% generator(Line, Generator, Guard, State) -> {Generator',State}.
+%% Transform a given generator into its #igen{} representation.
+
+generator(Line, {generate,Lg,P0,E}, Gs, St0) ->
+ LA = lineno_anno(Line, St0),
+ GA = lineno_anno(Lg, St0),
+ {Head,St1} = list_gen_pattern(P0, Line, St0),
+ {[Tail,Skip],St2} = new_vars(2, St1),
+ {Cg,St3} = lc_guard_tests(Gs, St2),
+ {AccPat,SkipPat} = case Head of
+ #c_var{} ->
+ %% If the generator pattern is a variable, the
+ %% pattern from the accumulator clause can be
+ %% reused in the skip one. lc_tq and bc_tq1 takes
+ %% care of dismissing the latter in that case.
+ Cons = ann_c_cons(LA, Head, Tail),
+ {Cons,Cons};
+ nomatch ->
+ %% If it never matches, there is no need for
+ %% an accumulator clause.
+ {nomatch,ann_c_cons(LA, Skip, Tail)};
+ _ ->
+ {ann_c_cons(LA, Head, Tail),
+ ann_c_cons(LA, Skip, Tail)}
+ end,
+ {Ce,Pre,St4} = safe(E, St3),
+ Gen = #igen{anno=#a{anno=GA},acc_pat=AccPat,acc_guard=Cg,skip_pat=SkipPat,
+ tail=Tail,tail_pat=#c_literal{anno=LA,val=[]},arg={Pre,Ce}},
+ {Gen,St4};
+generator(Line, {b_generate,Lg,P,E}, Gs, St0) ->
+ LA = lineno_anno(Line, St0),
+ GA = lineno_anno(Lg, St0),
+ Cp = #c_binary{segments=Segs} = pattern(P, St0),
+ %% The function append_tail_segment/2 keeps variable patterns as-is, making
+ %% it possible to have the same skip clause removal as with list generators.
+ {AccSegs,Tail,TailSeg,St1} = append_tail_segment(Segs, St0),
+ AccPat = Cp#c_binary{segments=AccSegs},
+ {Cg,St2} = lc_guard_tests(Gs, St1),
+ {SkipSegs,St3} = emasculate_segments(AccSegs, St2),
+ SkipPat = Cp#c_binary{segments=SkipSegs},
+ {Ce,Pre,St4} = safe(E, St3),
+ Gen = #igen{anno=#a{anno=GA},acc_pat=AccPat,acc_guard=Cg,skip_pat=SkipPat,
+ tail=Tail,tail_pat=#c_binary{anno=LA,segments=[TailSeg]},
+ arg={Pre,Ce}},
+ {Gen,St4}.
+
append_tail_segment(Segs, St0) ->
{Var,St} = new_var(St0),
Tail = #c_bitstr{val=Var,size=#c_literal{val=all},
unit=#c_literal{val=1},
type=#c_literal{val=binary},
flags=#c_literal{val=[unsigned,big]}},
- {Segs++[Tail],Var,St}.
+ {Segs++[Tail],Var,Tail,St}.
emasculate_segments(Segs, St) ->
emasculate_segments(Segs, St, []).
@@ -1162,7 +1236,7 @@ emasculate_segments([B|Rest], St0, Acc) ->
{Var,St1} = new_var(St0),
emasculate_segments(Rest, St1, [B#c_bitstr{val=Var}|Acc]);
emasculate_segments([], St, Acc) ->
- {lists:reverse(Acc),St}.
+ {reverse(Acc),St}.
lc_guard_tests([], St) -> {[],St};
lc_guard_tests(Gs0, St0) ->
@@ -1407,6 +1481,15 @@ safe(E0, St0) ->
{Se,Sps,St2} = force_safe(E1, St1),
{Se,Eps ++ Sps,St2}.
+safe_fun(A0, E0, St0) ->
+ case safe(E0, St0) of
+ {#c_var{name={_,A1}}=E1,Eps,St1} when A1 =/= A0 ->
+ {V,St2} = new_var(St1),
+ {V,Eps ++ [#iset{var=V,arg=E1}],St2};
+ Result ->
+ Result
+ end.
+
safe_list(Es, St) ->
foldr(fun (E, {Ces,Esp,St0}) ->
{Ce,Ep,St1} = safe(E, St0),
@@ -1477,6 +1560,8 @@ pattern({cons,L,H,T}, St) ->
ann_c_cons(lineno_anno(L, St), pattern(H, St), pattern(T, St));
pattern({tuple,L,Ps}, St) ->
ann_c_tuple(lineno_anno(L, St), pattern_list(Ps, St));
+pattern({map,L,Ps}, St) ->
+ #c_map{anno=lineno_anno(L, St), es=pattern_map_pairs(Ps, St)};
pattern({bin,L,Ps}, St) ->
%% We don't create a #ibinary record here, since there is
%% no need to hold any used/new annotations in a pattern.
@@ -1484,6 +1569,54 @@ pattern({bin,L,Ps}, St) ->
pattern({match,_,P1,P2}, St) ->
pat_alias(pattern(P1, St), pattern(P2, St)).
+%% pattern_map_pairs([MapFieldExact],State) -> [#c_map_pairs{}]
+pattern_map_pairs(Ps, St) ->
+ %% check literal key uniqueness (dict is needed)
+ %% pattern all pairs
+ {CMapPairs, Kdb} = lists:mapfoldl(fun
+ (P,Kdbi) ->
+ #c_map_pair{key=Ck,val=Cv} = CMapPair = pattern_map_pair(P,St),
+ K = core_lib:literal_value(Ck),
+ case dict:find(K,Kdbi) of
+ {ok, Vs} ->
+ {CMapPair, dict:store(K,[Cv|Vs],Kdbi)};
+ _ ->
+ {CMapPair, dict:store(K,[Cv],Kdbi)}
+ end
+ end, dict:new(), Ps),
+ pattern_alias_map_pairs(CMapPairs,Kdb,dict:new(),St).
+
+pattern_alias_map_pairs([],_,_,_) -> [];
+pattern_alias_map_pairs([#c_map_pair{key=Ck}=Pair|Pairs],Kdb,Kset,St) ->
+ %% alias same keys if needed
+ K = core_lib:literal_value(Ck),
+ case dict:find(K,Kset) of
+ {ok,processed} ->
+ pattern_alias_map_pairs(Pairs,Kdb,Kset,St);
+ _ ->
+ Cvs = dict:fetch(K,Kdb),
+ Cv = pattern_alias_map_pair_patterns(Cvs),
+ Kset1 = dict:store(K, processed, Kset),
+ [Pair#c_map_pair{val=Cv}|pattern_alias_map_pairs(Pairs,Kdb,Kset1,St)]
+ end.
+
+pattern_alias_map_pair_patterns([Cv]) -> Cv;
+pattern_alias_map_pair_patterns([Cv1,Cv2|Cvs]) ->
+ pattern_alias_map_pair_patterns([pat_alias(Cv1,Cv2)|Cvs]).
+
+pattern_map_pair({map_field_exact,L,K,V}, St) ->
+ case expr(K,St) of
+ {#c_literal{}=Key,_,_} ->
+ #c_map_pair{anno=lineno_anno(L, St),
+ op=#c_literal{val=exact},
+ key=Key,
+ val=pattern(V, St)};
+ _ ->
+ %% this will throw a cryptic error message
+ %% but it is better than nothing
+ throw(nomatch)
+ end.
+
%% pat_bin([BinElement], State) -> [BinSeg].
pat_bin(Ps, St) -> [pat_segment(P, St) || P <- Ps].
@@ -1541,15 +1674,6 @@ pat_alias_list(_, _) -> throw(nomatch).
pattern_list(Ps, St) -> [pattern(P, St) || P <- Ps].
-%% first([A]) -> [A].
-%% last([A]) -> A.
-
-first([_]) -> [];
-first([H|T]) -> [H|first(T)].
-
-last([L]) -> L;
-last([_|T]) -> last(T).
-
%% make_vars([Name]) -> [{Var,Name}].
make_vars(Vs) -> [ #c_var{name=V} || V <- Vs ].
@@ -1632,13 +1756,13 @@ uclause(#iclause{anno=Anno,pats=Ps0,guard=G0,body=B0}, Pks, Ks0, St0) ->
uguard([], [], _, St) -> {[],St};
uguard(Pg, [], Ks, St) ->
%% No guard, so fold together equality tests.
- uguard(first(Pg), [last(Pg)], Ks, St);
+ uguard(droplast(Pg), [last(Pg)], Ks, St);
uguard(Pg, Gs0, Ks, St0) ->
%% Gs0 must contain at least one element here.
{Gs3,St5} = foldr(fun (T, {Gs1,St1}) ->
{L,St2} = new_var(St1),
{R,St3} = new_var(St2),
- {[#iset{var=L,arg=T}] ++ first(Gs1) ++
+ {[#iset{var=L,arg=T}] ++ droplast(Gs1) ++
[#iset{var=R,arg=last(Gs1)},
#icall{anno=#a{}, %Must have an #a{}
module=#c_literal{val=erlang},
@@ -1707,13 +1831,16 @@ uexpr(#iletrec{anno=A,defs=Fs0,body=B0}, Ks, St0) ->
{B1,St2} = uexprs(B0, Ks, St1),
Used = used_in_any(map(fun ({_,F}) -> F end, Fs1) ++ B1),
{#iletrec{anno=A#a{us=Used,ns=[]},defs=Fs1,body=B1},St2};
-uexpr(#icase{anno=A,args=As0,clauses=Cs0,fc=Fc0}, Ks, St0) ->
+uexpr(#icase{anno=#a{anno=Anno}=A,args=As0,clauses=Cs0,fc=Fc0}, Ks, St0) ->
%% As0 will never generate new variables.
{As1,St1} = uexpr_list(As0, Ks, St0),
{Cs1,St2} = uclauses(Cs0, Ks, St1),
{Fc1,St3} = uclause(Fc0, Ks, St2),
Used = union(used_in_any(As1), used_in_any(Cs1)),
- New = new_in_all(Cs1),
+ New = case member(list_comprehension, Anno) of
+ true -> [];
+ false -> new_in_all(Cs1)
+ end,
{#icase{anno=A#a{us=Used,ns=New},args=As1,clauses=Cs1,fc=Fc1},St3};
uexpr(#ifun{anno=A0,id=Id,vars=As,clauses=Cs0,fc=Fc0,name=Name}, Ks0, St0) ->
Avs = lit_list_vars(As),
@@ -1822,6 +1949,12 @@ upattern(#c_cons{hd=H0,tl=T0}=Cons, Ks, St0) ->
upattern(#c_tuple{es=Es0}=Tuple, Ks, St0) ->
{Es1,Esg,Esv,Eus,St1} = upattern_list(Es0, Ks, St0),
{Tuple#c_tuple{es=Es1},Esg,Esv,Eus,St1};
+upattern(#c_map{es=Es0}=Map, Ks, St0) ->
+ {Es1,Esg,Esv,Eus,St1} = upattern_list(Es0, Ks, St0),
+ {Map#c_map{es=Es1},Esg,Esv,Eus,St1};
+upattern(#c_map_pair{op=#c_literal{val=exact},val=V0}=MapPair, Ks, St0) ->
+ {V,Vg,Vv,Vu,St1} = upattern(V0, Ks, St0),
+ {MapPair#c_map_pair{val=V},Vg,Vv,Vu,St1};
upattern(#c_binary{segments=Es0}=Bin, Ks, St0) ->
{Es1,Esg,Esv,Eus,St1} = upat_bin(Es0, Ks, St0),
{Bin#c_binary{segments=Es1},Esg,Esv,Eus,St1};
@@ -2035,7 +2168,8 @@ cexpr(#ifun{anno=#a{us=Us0}=A0,name={named,Name},fc=#iclause{pats=Ps}}=Fun0,
RecVar = #c_var{name={Name,length(Ps)}},
Let = #c_let{vars=[#c_var{name=Name}],arg=RecVar,body=Body},
CFun1 = CFun0#c_fun{body=Let},
- Letrec = #c_letrec{defs=[{RecVar,CFun1}],
+ Letrec = #c_letrec{anno=A0#a.anno,
+ defs=[{RecVar,CFun1}],
body=RecVar},
{Letrec,[],Us1,St1}
end;
@@ -2081,6 +2215,8 @@ lit_vars(Lit) -> lit_vars(Lit, []).
lit_vars(#c_cons{hd=H,tl=T}, Vs) -> lit_vars(H, lit_vars(T, Vs));
lit_vars(#c_tuple{es=Es}, Vs) -> lit_list_vars(Es, Vs);
+lit_vars(#c_map{arg=V,es=Es}, Vs) -> lit_vars(V, lit_list_vars(Es, Vs));
+lit_vars(#c_map_pair{key=K,val=V}, Vs) -> lit_vars(K, lit_vars(V, Vs));
lit_vars(#c_var{name=V}, Vs) -> add_element(V, Vs);
lit_vars(_, Vs) -> Vs. %These are atomic
@@ -2151,6 +2287,9 @@ is_simple(#c_literal{}) -> true;
is_simple(#c_cons{hd=H,tl=T}) ->
is_simple(H) andalso is_simple(T);
is_simple(#c_tuple{es=Es}) -> is_simple_list(Es);
+is_simple(#c_map{es=Es}) -> is_simple_list(Es);
+is_simple(#c_map_pair{key=K,val=V}) ->
+ is_simple(K) andalso is_simple(V);
is_simple(_) -> false.
-spec is_simple_list([cerl:cerl()]) -> boolean().
@@ -2168,7 +2307,11 @@ is_simple_list(Es) -> lists:all(fun is_simple/1, Es).
format_error(nomatch) ->
"pattern cannot possibly match";
format_error(bad_binary) ->
- "binary construction will fail because of a type mismatch".
+ "binary construction will fail because of a type mismatch";
+format_error(bad_map_key) ->
+ "map construction will fail because of none literal key (large binaries are not literals)";
+format_error(bad_map) ->
+ "map construction will fail because of a type mismatch".
add_warning(Line, Term, #core{ws=Ws,file=[{file,File}]}=St) when Line >= 0 ->
St#core{ws=[{File,[{location(Line),?MODULE,Term}]}|Ws]};
diff --git a/lib/compiler/src/v3_kernel.erl b/lib/compiler/src/v3_kernel.erl
index 65f1251099..40d2f72b4c 100644
--- a/lib/compiler/src/v3_kernel.erl
+++ b/lib/compiler/src/v3_kernel.erl
@@ -81,7 +81,7 @@
-export([module/2,format_error/1]).
-import(lists, [map/2,foldl/3,foldr/3,mapfoldl/3,splitwith/2,member/2,
- keymember/3,keyfind/3,partition/2]).
+ keymember/3,keyfind/3,partition/2,droplast/1,last/1]).
-import(ordsets, [add_element/2,del_element/2,union/2,union/1,subtract/2]).
-import(cerl, [c_tuple/1]).
@@ -272,6 +272,18 @@ expr(#c_cons{anno=A,hd=Ch,tl=Ct}, Sub, St0) ->
expr(#c_tuple{anno=A,es=Ces}, Sub, St0) ->
{Kes,Ep,St1} = atomic_list(Ces, Sub, St0),
{#k_tuple{anno=A,es=Kes},Ep,St1};
+expr(#c_map{anno=A,arg=Var,es=Ces}, Sub, St0) ->
+ try expr_map(A,Var,Ces,Sub,St0) of
+ {_,_,_}=Res -> Res
+ catch
+ throw:bad_map ->
+ St1 = add_warning(get_line(A), bad_map, A, St0),
+ Erl = #c_literal{val=erlang},
+ Name = #c_literal{val=error},
+ Args = [#c_literal{val=badarg}],
+ Error = #c_call{anno=A,module=Erl,name=Name,args=Args},
+ expr(Error, Sub, St1)
+ end;
expr(#c_binary{anno=A,segments=Cv}, Sub, St0) ->
try atomic_bin(Cv, Sub, St0) of
{Kv,Ep,St1} ->
@@ -347,7 +359,7 @@ expr(#c_case{arg=Ca,clauses=Ccs}, Sub, St0) ->
{Kvs,Pv,St2} = match_vars(Ka, St1), %Must have variables here!
{Km,St3} = kmatch(Kvs, Ccs, Sub, St2),
Match = flatten_seq(build_match(Kvs, Km)),
- {last(Match),Pa ++ Pv ++ first(Match),St3};
+ {last(Match),Pa ++ Pv ++ droplast(Match),St3};
expr(#c_receive{anno=A,clauses=Ccs0,timeout=Ce,action=Ca}, Sub, St0) ->
{Ke,Pe,St1} = atomic(Ce, Sub, St0), %Force this to be atomic!
{Rvar,St2} = new_var(St1),
@@ -493,6 +505,85 @@ translate_match_fail_1(Anno, As, Sub, #kern{ff=FF}) ->
translate_fc(Args) ->
[#c_literal{val=function_clause},make_list(Args)].
+expr_map(A,Var0,Ces,Sub,St0) ->
+ %% An extra pass of validation of Map src because of inlining
+ {Var,Mps,St1} = expr(Var0, Sub, St0),
+ case is_valid_map_src(Var) of
+ true ->
+ {Km,Eps,St2} = map_split_pairs(A, Var, Ces, Sub, St1),
+ {Km,Eps++Mps,St2};
+ false -> throw(bad_map)
+ end.
+
+is_valid_map_src(#k_map{}) -> true;
+is_valid_map_src(#k_literal{val=M}) when is_map(M) -> true;
+is_valid_map_src(#k_var{}) -> true;
+is_valid_map_src(_) -> false.
+
+map_split_pairs(A, Var, Ces, Sub, St0) ->
+ %% two steps
+ %% 1. force variables
+ %% 2. remove multiples
+ Pairs0 = [{Op,K,V} || #c_map_pair{op=#c_literal{val=Op},key=K,val=V} <- Ces],
+ {Pairs,Esp,St1} = foldr(fun
+ ({Op,K0,V0}, {Ops,Espi,Sti0}) when Op =:= assoc; Op =:= exact ->
+ {K,[],Sti1} = expr(K0, Sub, Sti0),
+ {V,Ep,Sti2} = atomic(V0, Sub, Sti1),
+ {[{Op,K,V}|Ops],Ep ++ Espi,Sti2}
+ end, {[],[],St0}, Pairs0),
+
+ case map_group_pairs(Pairs) of
+ {Assoc,[]} ->
+ Kes = [#k_map_pair{key=K,val=V}||{_,{assoc,K,V}} <- Assoc],
+ {#k_map{anno=A,op=assoc,var=Var,es=Kes},Esp,St1};
+ {[],Exact} ->
+ Kes = [#k_map_pair{key=K,val=V}||{_,{exact,K,V}} <- Exact],
+ {#k_map{anno=A,op=exact,var=Var,es=Kes},Esp,St1};
+ {Assoc,Exact} ->
+ Kes1 = [#k_map_pair{key=K,val=V}||{_,{assoc,K,V}} <- Assoc],
+ {Mvar,Em,St2} = force_atomic(#k_map{anno=A,op=assoc,var=Var,es=Kes1},St1),
+ Kes2 = [#k_map_pair{key=K,val=V}||{_,{exact,K,V}} <- Exact],
+ {#k_map{anno=A,op=exact,var=Mvar,es=Kes2},Esp ++ Em,St2}
+
+ end.
+
+%% Group map by Assoc operations and Exact operations
+
+map_group_pairs(Es) ->
+ Groups = dict:to_list(map_group_pairs(Es,dict:new())),
+ partition(fun({_,{Op,_,_}}) -> Op =:= assoc end, Groups).
+
+map_group_pairs([{assoc,K,V}|Es0],Used0) ->
+ Used1 = case map_key_is_used(K,Used0) of
+ {ok, {assoc,_,_}} -> map_key_set_used(K,{assoc,K,V},Used0);
+ {ok, {exact,_,_}} -> map_key_set_used(K,{exact,K,V},Used0);
+ _ -> map_key_set_used(K,{assoc,K,V},Used0)
+ end,
+ map_group_pairs(Es0,Used1);
+map_group_pairs([{exact,K,V}|Es0],Used0) ->
+ Used1 = case map_key_is_used(K,Used0) of
+ {ok, {assoc,_,_}} -> map_key_set_used(K,{assoc,K,V},Used0);
+ {ok, {exact,_,_}} -> map_key_set_used(K,{exact,K,V},Used0);
+ _ -> map_key_set_used(K,{exact,K,V},Used0)
+ end,
+ map_group_pairs(Es0,Used1);
+map_group_pairs([],Used) ->
+ Used.
+
+map_key_set_used(K,How,Used) ->
+ dict:store(map_key_clean(K),How,Used).
+
+map_key_is_used(K,Used) ->
+ dict:find(map_key_clean(K),Used).
+
+%% Be explicit instead of using set_kanno(K,[])
+map_key_clean(#k_literal{val=V}) -> {k_literal,V};
+map_key_clean(#k_int{val=V}) -> {k_int,V};
+map_key_clean(#k_float{val=V}) -> {k_float,V};
+map_key_clean(#k_atom{val=V}) -> {k_atom,V};
+map_key_clean(#k_nil{}) -> k_nil.
+
+
%% 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) ->
@@ -648,6 +739,9 @@ pattern(#c_cons{anno=A,hd=Ch,tl=Ct}, Isub, Osub0, St0) ->
pattern(#c_tuple{anno=A,es=Ces}, Isub, Osub0, St0) ->
{Kes,Osub1,St1} = pattern_list(Ces, Isub, Osub0, St0),
{#k_tuple{anno=A,es=Kes},Osub1,St1};
+pattern(#c_map{anno=A,es=Ces}, Isub, Osub0, St0) ->
+ {Kes,Osub1,St1} = pattern_map_pairs(Ces, Isub, Osub0, St0),
+ {#k_map{anno=A,op=exact,es=Kes},Osub1,St1};
pattern(#c_binary{anno=A,segments=Cv}, Isub, Osub0, St0) ->
{Kv,Osub1,St1} = pattern_bin(Cv, Isub, Osub0, St0),
{#k_binary{anno=A,segs=Kv},Osub1,St1};
@@ -662,6 +756,25 @@ flatten_alias(#c_alias{var=V,pat=P}) ->
{[V|Vs],Pat};
flatten_alias(Pat) -> {[],Pat}.
+pattern_map_pairs(Ces0, Isub, Osub0, St0) ->
+ %% It is assumed that all core keys are literals
+ %% It is later assumed that these keys are term sorted
+ %% so we need to sort them here
+ Ces1 = lists:sort(fun
+ (#c_map_pair{key=CkA},#c_map_pair{key=CkB}) ->
+ A = core_lib:literal_value(CkA),
+ B = core_lib:literal_value(CkB),
+ erts_internal:cmp_term(A,B) < 0
+ end, Ces0),
+ %% pattern the pair keys and values as normal
+ {Kes,{Osub1,St1}} = lists:mapfoldl(fun
+ (#c_map_pair{anno=A,key=Ck,val=Cv},{Osubi0,Sti0}) ->
+ {Kk,Osubi1,Sti1} = pattern(Ck, Isub, Osubi0, Sti0),
+ {Kv,Osubi2,Sti2} = pattern(Cv, Isub, Osubi1, Sti1),
+ {#k_map_pair{anno=A,key=Kk,val=Kv},{Osubi2,Sti2}}
+ end, {Osub0, St0}, Ces1),
+ {Kes,Osub1,St1}.
+
pattern_bin(Es, Isub, Osub0, St0) ->
{Kbin,{_,Osub},St} = pattern_bin_1(Es, Isub, Osub0, St0),
{Kbin,Osub,St}.
@@ -826,15 +939,6 @@ foldr2(Fun, Acc0, [E1|L1], [E2|L2]) ->
foldr2(Fun, Acc1, L1, L2);
foldr2(_, Acc, [], []) -> Acc.
-%% first([A]) -> [A].
-%% last([A]) -> A.
-
-last([L]) -> L;
-last([_|T]) -> last(T).
-
-first([_]) -> [];
-first([H|T]) -> [H|first(T)].
-
%% This code implements the algorithm for an optimizing compiler for
%% pattern matching given "The Implementation of Functional
%% Programming Languages" by Simon Peyton Jones. The code is much
@@ -1015,7 +1119,8 @@ match_con_1([U|_Us] = L, Cs, Def, St0) ->
%% Extract clauses for different constructors (types).
%%ok = io:format("match_con ~p~n", [Cs]),
Ttcs = select_types([k_binary], Cs) ++ select_bin_con(Cs) ++
- select_types([k_cons,k_tuple,k_atom,k_float,k_int,k_nil,k_literal], Cs),
+ select_types([k_cons,k_tuple,k_map,k_atom,k_float,k_int,
+ k_nil,k_literal], Cs),
%%ok = io:format("ttcs = ~p~n", [Ttcs]),
{Scs,St1} =
mapfoldl(fun ({T,Tcs}, St) ->
@@ -1251,10 +1356,9 @@ group_value(k_cons, Cs) -> [Cs]; %These are single valued
group_value(k_nil, Cs) -> [Cs];
group_value(k_binary, Cs) -> [Cs];
group_value(k_bin_end, Cs) -> [Cs];
-group_value(k_bin_seg, Cs) ->
- group_bin_seg(Cs);
-group_value(k_bin_int, Cs) ->
- [Cs];
+group_value(k_bin_seg, Cs) -> group_bin_seg(Cs);
+group_value(k_bin_int, Cs) -> [Cs];
+group_value(k_map, Cs) -> group_map(Cs);
group_value(_, Cs) ->
%% group_value(Cs).
Cd = foldl(fun (C, Gcs0) -> dict:append(clause_val(C), C, Gcs0) end,
@@ -1267,6 +1371,12 @@ group_bin_seg([C1|Cs]) ->
[[C1|More]|group_bin_seg(Rest)];
group_bin_seg([]) -> [].
+group_map([C1|Cs]) ->
+ V1 = clause_val(C1),
+ {More,Rest} = splitwith(fun (C) -> clause_val(C) =:= V1 end, Cs),
+ [[C1|More]|group_map(Rest)];
+group_map([]) -> [].
+
%% Profiling shows that this quadratic implementation account for a big amount
%% of the execution time if there are many values.
% group_value([C|Cs]) ->
@@ -1315,6 +1425,13 @@ get_match(#k_bin_int{}=BinInt, St0) ->
get_match(#k_tuple{es=Es}, St0) ->
{Mes,St1} = new_vars(length(Es), St0),
{#k_tuple{es=Mes},Mes,St1};
+get_match(#k_map{op=exact,es=Es0}, St0) ->
+ {Mes,St1} = new_vars(length(Es0), St0),
+ {Es,_} = mapfoldl(fun
+ (#k_map_pair{}=Pair, [V|Vs]) ->
+ {Pair#k_map_pair{val=V},Vs}
+ end, Mes, Es0),
+ {#k_map{op=exact,es=Es},Mes,St1};
get_match(M, St) ->
{M,[],St}.
@@ -1331,7 +1448,11 @@ new_clauses(Cs0, U, St) ->
[S,N|As];
#k_bin_int{next=N} ->
[N|As];
- _Other -> As
+ #k_map{op=exact,es=Es} ->
+ Vals = [V || #k_map_pair{val=V} <- Es],
+ Vals ++ As;
+ _Other ->
+ As
end,
Vs = arg_alias(Arg),
Osub1 = foldl(fun (#k_var{name=V}, Acc) ->
@@ -1406,6 +1527,7 @@ arg_con(Arg) ->
#k_nil{} -> k_nil;
#k_cons{} -> k_cons;
#k_tuple{} -> k_tuple;
+ #k_map{} -> k_map;
#k_binary{} -> k_binary;
#k_bin_end{} -> k_bin_end;
#k_bin_seg{} -> k_bin_seg;
@@ -1426,7 +1548,15 @@ arg_val(Arg, C) ->
{#k_var{name=get_vsub(V, Isub)},U,T,Fs};
_ ->
{set_kanno(S, []),U,T,Fs}
- end
+ end;
+ #k_map{op=exact,es=Es} ->
+ Keys = [begin
+ #k_map_pair{key=#k_literal{val=Key}} = Pair,
+ Key
+ end || Pair <- Es],
+ %% multiple keys may have the same name
+ %% do not use ordsets
+ lists:sort(fun(A,B) -> erts_internal:cmp_term(A,B) < 0 end, Keys)
end.
%% ubody_used_vars(Expr, State) -> [UsedVar]
@@ -1795,6 +1925,10 @@ lit_vars(#k_atom{}) -> [];
lit_vars(#k_nil{}) -> [];
lit_vars(#k_cons{hd=H,tl=T}) ->
union(lit_vars(H), lit_vars(T));
+lit_vars(#k_map{var=Var,es=Es}) ->
+ lit_list_vars([Var|Es]);
+lit_vars(#k_map_pair{key=K,val=V}) ->
+ union(lit_vars(K), lit_vars(V));
lit_vars(#k_binary{segs=V}) -> lit_vars(V);
lit_vars(#k_bin_end{}) -> [];
lit_vars(#k_bin_seg{size=Size,seg=S,next=N}) ->
@@ -1830,7 +1964,11 @@ pat_vars(#k_bin_int{size=Size}) ->
{U,[]};
pat_vars(#k_bin_end{}) -> {[],[]};
pat_vars(#k_tuple{es=Es}) ->
- pat_list_vars(Es).
+ pat_list_vars(Es);
+pat_vars(#k_map{es=Es}) ->
+ pat_list_vars(Es);
+pat_vars(#k_map_pair{val=V}) ->
+ pat_vars(V).
pat_list_vars(Ps) ->
foldl(fun (P, {Used0,New0}) ->
@@ -1871,7 +2009,9 @@ format_error(nomatch_shadow) ->
format_error(bad_call) ->
"invalid module and/or function name; this call will always fail";
format_error(bad_segment_size) ->
- "binary construction will fail because of a type mismatch".
+ "binary construction will fail because of a type mismatch";
+format_error(bad_map) ->
+ "map construction will fail because of a type mismatch".
add_warning(none, Term, Anno, #kern{ws=Ws}=St) ->
File = get_file(Anno),
diff --git a/lib/compiler/src/v3_kernel.hrl b/lib/compiler/src/v3_kernel.hrl
index fb8baf398b..ab66445f73 100644
--- a/lib/compiler/src/v3_kernel.hrl
+++ b/lib/compiler/src/v3_kernel.hrl
@@ -38,6 +38,8 @@
-record(k_nil, {anno=[]}).
-record(k_tuple, {anno=[],es}).
+-record(k_map, {anno=[],var,op,es}).
+-record(k_map_pair, {anno=[],key,val}).
-record(k_cons, {anno=[],hd,tl}).
-record(k_binary, {anno=[],segs}).
-record(k_bin_seg, {anno=[],size,unit,type,flags,seg,next}).
diff --git a/lib/compiler/src/v3_kernel_pp.erl b/lib/compiler/src/v3_kernel_pp.erl
index e363a5387a..b33eba50eb 100644
--- a/lib/compiler/src/v3_kernel_pp.erl
+++ b/lib/compiler/src/v3_kernel_pp.erl
@@ -104,6 +104,30 @@ format_1(#k_tuple{es=Es}, Ctxt) ->
format_hseq(Es, ",", ctxt_bump_indent(Ctxt, 1), fun format/2),
$}
];
+format_1(#k_map{var=#k_literal{val=M},op=assoc,es=Es}, Ctxt) when is_map(M), map_size(M) =:= 0 ->
+ ["~{",
+ format_hseq(Es, ",", ctxt_bump_indent(Ctxt, 1), fun format/2),
+ "}~"
+ ];
+format_1(#k_map{var=#k_literal{val=M},op=exact,es=Es}, Ctxt) when is_map(M), map_size(M) =:= 0 ->
+ ["::{",
+ format_hseq(Es, ",", ctxt_bump_indent(Ctxt, 1), fun format/2),
+ "}::"
+ ];
+format_1(#k_map{var=Var,op=assoc,es=Es}, Ctxt) ->
+ ["~{",
+ format_hseq(Es, ",", ctxt_bump_indent(Ctxt, 1), fun format/2),
+ " | ",format_1(Var, Ctxt),
+ "}~"
+ ];
+format_1(#k_map{var=Var,op=exact,es=Es}, Ctxt) ->
+ ["::{",
+ format_hseq(Es, ",", ctxt_bump_indent(Ctxt, 1), fun format/2),
+ " | ",format_1(Var, Ctxt),
+ "}::"
+ ];
+format_1(#k_map_pair{key=K,val=V}, Ctxt) ->
+ ["<",format(K, Ctxt),",",format(V, Ctxt),">"];
format_1(#k_binary{segs=S}, Ctxt) ->
["#<",format(S, ctxt_bump_indent(Ctxt, 2)),">#"];
format_1(#k_bin_seg{next=Next}=S, Ctxt) ->
diff --git a/lib/compiler/src/v3_life.erl b/lib/compiler/src/v3_life.erl
index 2cc3493570..cd4b5fd674 100644
--- a/lib/compiler/src/v3_life.erl
+++ b/lib/compiler/src/v3_life.erl
@@ -323,7 +323,8 @@ type(k_tuple) -> tuple;
type(k_binary) -> binary;
type(k_bin_seg) -> bin_seg;
type(k_bin_int) -> bin_int;
-type(k_bin_end) -> bin_end.
+type(k_bin_end) -> bin_end;
+type(k_map) -> map.
%% variable(Klit) -> Lit.
%% var_list([Klit]) -> [Lit].
@@ -365,6 +366,10 @@ literal(#k_bin_end{}, Ctxt) ->
{bin_end,Ctxt};
literal(#k_tuple{es=Es}, Ctxt) ->
{tuple,literal_list(Es, Ctxt)};
+literal(#k_map{op=Op,var=Var,es=Es}, Ctxt) ->
+ {map,Op,literal(Var, Ctxt),literal_list(Es, Ctxt)};
+literal(#k_map_pair{key=K,val=V}, Ctxt) ->
+ {map_pair,literal(K, Ctxt),literal(V, Ctxt)};
literal(#k_literal{val=V}, _Ctxt) ->
{literal,V}.
@@ -393,7 +398,11 @@ literal2(#k_bin_int{size=S,unit=U,flags=Fs,val=Int,next=N}, Ctxt) ->
literal2(#k_bin_end{}, Ctxt) ->
{bin_end,Ctxt};
literal2(#k_tuple{es=Es}, Ctxt) ->
- {tuple,literal_list2(Es, Ctxt)}.
+ {tuple,literal_list2(Es, Ctxt)};
+literal2(#k_map{op=Op,es=Es}, Ctxt) ->
+ {map,Op,literal_list2(Es, Ctxt)};
+literal2(#k_map_pair{key=K,val=V}, Ctxt) ->
+ {map_pair,literal2(K, Ctxt),literal2(V, Ctxt)}.
literal_list2(Ks, Ctxt) ->
[literal2(K, Ctxt) || K <- Ks].
diff --git a/lib/compiler/test/Makefile b/lib/compiler/test/Makefile
index 51b3064589..0b56a49cd6 100644
--- a/lib/compiler/test/Makefile
+++ b/lib/compiler/test/Makefile
@@ -26,6 +26,7 @@ MODULES= \
guard_SUITE \
inline_SUITE \
lc_SUITE \
+ map_SUITE \
match_SUITE \
misc_SUITE \
num_bif_SUITE \
@@ -47,6 +48,7 @@ NO_OPT= \
fun \
guard \
lc \
+ map \
match \
misc \
num_bif \
@@ -67,6 +69,7 @@ INLINE= \
fun \
guard \
lc \
+ map \
match \
misc \
num_bif \
diff --git a/lib/compiler/test/andor_SUITE.erl b/lib/compiler/test/andor_SUITE.erl
index 4ffbe07e32..b5408ecd8f 100644
--- a/lib/compiler/test/andor_SUITE.erl
+++ b/lib/compiler/test/andor_SUITE.erl
@@ -129,6 +129,10 @@ t_case_y(X, Y, Z) ->
Y =:= 100
end.
+-define(GUARD(E), if E -> true;
+ true -> false
+ end).
+
t_and_or(Config) when is_list(Config) ->
?line true = true and true,
?line false = true and false,
@@ -160,11 +164,16 @@ t_and_or(Config) when is_list(Config) ->
?line true = false or id(true),
?line false = false or id(false),
- ok.
+ True = id(true),
--define(GUARD(E), if E -> true;
- true -> false
- end).
+ false = ?GUARD(erlang:'and'(bar, True)),
+ false = ?GUARD(erlang:'or'(bar, True)),
+ false = ?GUARD(erlang:'not'(erlang:'and'(bar, True))),
+ false = ?GUARD(erlang:'not'(erlang:'not'(erlang:'and'(bar, True)))),
+
+ true = (fun (X = true) when X or true or X -> true end)(True),
+
+ ok.
t_andalso(Config) when is_list(Config) ->
Bs = [true,false],
@@ -194,6 +203,9 @@ t_andalso(Config) when is_list(Config) ->
?line false = id(false) andalso not id(glurf),
?line false = false andalso not id(glurf),
+ true = begin (X1 = true) andalso X1, X1 end,
+ false = false = begin (X2 = false) andalso X2, X2 end,
+
ok.
t_orelse(Config) when is_list(Config) ->
@@ -224,6 +236,9 @@ t_orelse(Config) when is_list(Config) ->
?line true = id(true) orelse not id(glurf),
?line true = true orelse not id(glurf),
+ true = begin (X1 = true) orelse X1, X1 end,
+ false = begin (X2 = false) orelse X2, X2 end,
+
ok.
t_andalso_1({X,Y}) ->
diff --git a/lib/compiler/test/beam_except_SUITE.erl b/lib/compiler/test/beam_except_SUITE.erl
index bf67eedd5f..d088863c5c 100644
--- a/lib/compiler/test/beam_except_SUITE.erl
+++ b/lib/compiler/test/beam_except_SUITE.erl
@@ -57,6 +57,11 @@ coverage(_) ->
{'EXIT',{undef,[{erlang,error,[a,b,c],_}|_]}} =
(catch erlang:error(a, b, c)),
+
+ {'EXIT',{badarith,[{?MODULE,bar,1,[File,{line,9}]}|_]}} =
+ (catch bar(x)),
+ {'EXIT',{{case_clause,{1}},[{?MODULE,bar,1,[File,{line,9}]}|_]}} =
+ (catch bar(0)),
ok.
-file("fake.erl", 1).
@@ -65,3 +70,8 @@ fc(a) -> %Line 2
fc(L) when length(L) > 2 -> %Line 4
%% Not the same as a "real" function_clause error.
error(function_clause, [L]). %Line 6
+%% Would crash the compiler.
+bar(X) -> %Line 8
+ case {X+1} of %Line 9
+ 1 -> ok %Line 10
+ end. %Line 11
diff --git a/lib/compiler/test/bs_match_SUITE.erl b/lib/compiler/test/bs_match_SUITE.erl
index 9f15845d33..149b9bbb8f 100644
--- a/lib/compiler/test/bs_match_SUITE.erl
+++ b/lib/compiler/test/bs_match_SUITE.erl
@@ -34,7 +34,7 @@
otp_7188/1,otp_7233/1,otp_7240/1,otp_7498/1,
match_string/1,zero_width/1,bad_size/1,haystack/1,
cover_beam_bool/1,matched_out_size/1,follow_fail_branch/1,
- no_partition/1]).
+ no_partition/1,calling_a_binary/1]).
-export([coverage_id/1,coverage_external_ignore/2]).
@@ -59,7 +59,7 @@ groups() ->
matching_and_andalso,otp_7188,otp_7233,otp_7240,
otp_7498,match_string,zero_width,bad_size,haystack,
cover_beam_bool,matched_out_size,follow_fail_branch,
- no_partition]}].
+ no_partition,calling_a_binary]}].
init_per_suite(Config) ->
@@ -1178,6 +1178,17 @@ no_partition_2([], a5) ->
no_partition_2(42.0, a6) ->
six.
+calling_a_binary(Config) when is_list(Config) ->
+ [] = call_binary(<<>>, []),
+ {'EXIT',{badarg,_}} = (catch call_binary(<<1>>, [])),
+ {'EXIT',{badarg,_}} = (catch call_binary(<<1,2,3>>, [])),
+ ok.
+
+call_binary(<<>>, Acc) ->
+ Acc;
+call_binary(<<H,T/bits>>, Acc) ->
+ T(<<Acc/binary,H>>).
+
check(F, R) ->
R = F().
diff --git a/lib/compiler/test/compilation_SUITE.erl b/lib/compiler/test/compilation_SUITE.erl
index 93b2fb4ea5..f7b1dbdddf 100644
--- a/lib/compiler/test/compilation_SUITE.erl
+++ b/lib/compiler/test/compilation_SUITE.erl
@@ -196,7 +196,7 @@ redundant_case_1(_) -> d.
failure(Module, Conf) ->
?line Src = filename:join(?config(data_dir, Conf), atom_to_list(Module)),
?line Out = ?config(priv_dir,Conf),
- ?line io:format("Compiling: ~s\n", [Src]),
+ ?line io:format("Compiling: ~ts\n", [Src]),
?line CompRc = compile:file(Src, [{outdir,Out},return,time]),
?line io:format("Result: ~p\n",[CompRc]),
?line case CompRc of
@@ -476,8 +476,8 @@ self_compile_node(CompilerDir, OutDir, Version, Opts) ->
ok.
compile_compiler(Files, OutDir, Version, InlineOpts) ->
- io:format("~s", [code:which(compile)]),
- io:format("Compiling ~s into ~s", [Version,OutDir]),
+ io:format("~ts", [code:which(compile)]),
+ io:format("Compiling ~s into ~ts", [Version,OutDir]),
Opts = [report,
bin_opt_info,
{outdir,OutDir},
diff --git a/lib/compiler/test/compile_SUITE.erl b/lib/compiler/test/compile_SUITE.erl
index 4ec75d015e..8cb7d1b55b 100644
--- a/lib/compiler/test/compile_SUITE.erl
+++ b/lib/compiler/test/compile_SUITE.erl
@@ -24,7 +24,7 @@
-export([all/0, suite/0,groups/0,init_per_suite/1, end_per_suite/1,
init_per_group/2,end_per_group/2,
- app_test/1,
+ app_test/1,appup_test/1,
file_1/1, forms_2/1, module_mismatch/1, big_file/1, outdir/1,
binary/1, makedep/1, cond_and_ifdef/1, listings/1, listings_big/1,
other_output/1, encrypted_abstr/1,
@@ -42,7 +42,7 @@ suite() -> [{ct_hooks,[ts_install_cth]}].
all() ->
test_lib:recompile(?MODULE),
- [app_test, file_1, forms_2, module_mismatch, big_file, outdir,
+ [app_test, appup_test, file_1, forms_2, module_mismatch, big_file, outdir,
binary, makedep, cond_and_ifdef, listings, listings_big,
other_output, encrypted_abstr,
{group, bad_record_use}, strict_record,
@@ -71,6 +71,10 @@ end_per_group(_GroupName, Config) ->
app_test(Config) when is_list(Config) ->
?line ?t:app_test(compiler).
+%% Test that the Application upgrade file has no `basic' errors.";
+appup_test(Config) when is_list(Config) ->
+ ok = ?t:appup_test(compiler).
+
%% Tests that we can compile and run a simple Erlang program,
%% using compile:file/1.
@@ -286,57 +290,67 @@ cond_and_ifdef(Config) when is_list(Config) ->
ok.
listings(Config) when is_list(Config) ->
- ?line Dog = test_server:timetrap(test_server:minutes(8)),
- ?line DataDir = ?config(data_dir, Config),
- ?line PrivDir = ?config(priv_dir, Config),
- ?line Simple = filename:join(DataDir, simple),
- ?line TargetDir = filename:join(PrivDir, listings),
- ?line ok = file:make_dir(TargetDir),
+ Dog = test_server:timetrap(test_server:minutes(8)),
+ DataDir = ?config(data_dir, Config),
+ PrivDir = ?config(priv_dir, Config),
+ ok = do_file_listings(DataDir, PrivDir, [
+ "simple",
+ "small",
+ "small_maps"
+ ]),
+ test_server:timetrap_cancel(Dog),
+ ok.
+
+do_file_listings(_, _, []) -> ok;
+do_file_listings(DataDir, PrivDir, [File|Files]) ->
+ Simple = filename:join(DataDir, File),
+ TargetDir = filename:join(PrivDir, listings),
+ ok = file:make_dir(TargetDir),
%% Test all dedicated listing options.
- ?line do_listing(Simple, TargetDir, 'S'),
- ?line do_listing(Simple, TargetDir, 'E'),
- ?line do_listing(Simple, TargetDir, 'P'),
- ?line do_listing(Simple, TargetDir, dpp, ".pp"),
- ?line do_listing(Simple, TargetDir, dabstr, ".abstr"),
- ?line do_listing(Simple, TargetDir, dexp, ".expand"),
- ?line do_listing(Simple, TargetDir, dcore, ".core"),
- ?line do_listing(Simple, TargetDir, doldinline, ".oldinline"),
- ?line do_listing(Simple, TargetDir, dinline, ".inline"),
- ?line do_listing(Simple, TargetDir, dcore, ".core"),
- ?line do_listing(Simple, TargetDir, dcopt, ".copt"),
- ?line do_listing(Simple, TargetDir, dsetel, ".dsetel"),
- ?line do_listing(Simple, TargetDir, dkern, ".kernel"),
- ?line do_listing(Simple, TargetDir, dlife, ".life"),
- ?line do_listing(Simple, TargetDir, dcg, ".codegen"),
- ?line do_listing(Simple, TargetDir, dblk, ".block"),
- ?line do_listing(Simple, TargetDir, dbool, ".bool"),
- ?line do_listing(Simple, TargetDir, dtype, ".type"),
- ?line do_listing(Simple, TargetDir, ddead, ".dead"),
- ?line do_listing(Simple, TargetDir, djmp, ".jump"),
- ?line do_listing(Simple, TargetDir, dclean, ".clean"),
- ?line do_listing(Simple, TargetDir, dpeep, ".peep"),
- ?line do_listing(Simple, TargetDir, dopt, ".optimize"),
+ do_listing(Simple, TargetDir, 'S'),
+ do_listing(Simple, TargetDir, 'E'),
+ do_listing(Simple, TargetDir, 'P'),
+ do_listing(Simple, TargetDir, dpp, ".pp"),
+ do_listing(Simple, TargetDir, dabstr, ".abstr"),
+ do_listing(Simple, TargetDir, dexp, ".expand"),
+ do_listing(Simple, TargetDir, dcore, ".core"),
+ do_listing(Simple, TargetDir, doldinline, ".oldinline"),
+ do_listing(Simple, TargetDir, dinline, ".inline"),
+ do_listing(Simple, TargetDir, dcore, ".core"),
+ do_listing(Simple, TargetDir, dcopt, ".copt"),
+ do_listing(Simple, TargetDir, dsetel, ".dsetel"),
+ do_listing(Simple, TargetDir, dkern, ".kernel"),
+ do_listing(Simple, TargetDir, dlife, ".life"),
+ do_listing(Simple, TargetDir, dcg, ".codegen"),
+ do_listing(Simple, TargetDir, dblk, ".block"),
+ do_listing(Simple, TargetDir, dbool, ".bool"),
+ do_listing(Simple, TargetDir, dtype, ".type"),
+ do_listing(Simple, TargetDir, ddead, ".dead"),
+ do_listing(Simple, TargetDir, djmp, ".jump"),
+ do_listing(Simple, TargetDir, dclean, ".clean"),
+ do_listing(Simple, TargetDir, dpeep, ".peep"),
+ do_listing(Simple, TargetDir, dopt, ".optimize"),
%% First clean up.
- ?line Listings = filename:join(PrivDir, listings),
- ?line lists:foreach(fun(F) -> ok = file:delete(F) end,
- filelib:wildcard(filename:join(Listings, "*"))),
+ Listings = filename:join(PrivDir, listings),
+ lists:foreach(fun(F) -> ok = file:delete(F) end,
+ filelib:wildcard(filename:join(Listings, "*"))),
%% Test options that produce a listing file if 'binary' is not given.
- ?line do_listing(Simple, TargetDir, to_pp, ".P"),
- ?line do_listing(Simple, TargetDir, to_exp, ".E"),
- ?line do_listing(Simple, TargetDir, to_core0, ".core"),
- ?line ok = file:delete(filename:join(Listings, "simple.core")),
- ?line do_listing(Simple, TargetDir, to_core, ".core"),
- ?line do_listing(Simple, TargetDir, to_kernel, ".kernel"),
+ do_listing(Simple, TargetDir, to_pp, ".P"),
+ do_listing(Simple, TargetDir, to_exp, ".E"),
+ do_listing(Simple, TargetDir, to_core0, ".core"),
+ ok = file:delete(filename:join(Listings, File ++ ".core")),
+ do_listing(Simple, TargetDir, to_core, ".core"),
+ do_listing(Simple, TargetDir, to_kernel, ".kernel"),
%% Final clean up.
- ?line lists:foreach(fun(F) -> ok = file:delete(F) end,
- filelib:wildcard(filename:join(Listings, "*"))),
- ?line ok = file:del_dir(Listings),
- ?line test_server:timetrap_cancel(Dog),
- ok.
+ lists:foreach(fun(F) -> ok = file:delete(F) end,
+ filelib:wildcard(filename:join(Listings, "*"))),
+ ok = file:del_dir(Listings),
+
+ do_file_listings(DataDir,PrivDir,Files).
listings_big(Config) when is_list(Config) ->
?line Dog = test_server:timetrap(test_server:minutes(10)),
@@ -415,11 +429,11 @@ encrypted_abstr(Config) when is_list(Config) ->
?line {Simple,Target} = files(Config, "encrypted_abstr"),
Res = case has_crypto() of
- no ->
+ false ->
%% No crypto.
?line encrypted_abstr_no_crypto(Simple, Target),
{comment,"The crypto application is missing or broken"};
- yes ->
+ true ->
%% Simulate not having crypto by removing
%% the crypto application from the path.
?line OldPath = code:get_path(),
@@ -511,6 +525,7 @@ write_crypt_file(Contents0) ->
ok = file:write_file(".erlang.crypt", Contents).
encrypted_abstr_no_crypto(Simple, Target) ->
+ io:format("simpe: ~p~n", [Simple]),
?line TargetDir = filename:dirname(Target),
?line Key = "ablurf123BX#$;3",
?line error = compile:file(Simple,
@@ -525,11 +540,11 @@ verify_abstract(Target) ->
has_crypto() ->
try
crypto:start(),
- crypto:info(),
+ <<_,_,_,_,_>> = crypto:rand_bytes(5),
crypto:stop(),
- yes
+ true
catch
- error:_ -> no
+ error:_ -> false
end.
install_crypto_key(Key) ->
diff --git a/lib/compiler/test/compile_SUITE_data/small.erl b/lib/compiler/test/compile_SUITE_data/small.erl
new file mode 100644
index 0000000000..37cd270e50
--- /dev/null
+++ b/lib/compiler/test/compile_SUITE_data/small.erl
@@ -0,0 +1,48 @@
+-module(small).
+
+-export([go/0,go/2]).
+
+
+-small_attribute({value,3}).
+
+go() -> go(3, 3.0).
+go(A,B) ->
+ V1 = A + B,
+ V2 = A * B,
+ V3 = V1 / V2,
+ V4 = V3 / 0.3,
+ V5 = V1 + V2 + V3 + V4,
+ try
+ R = call(<<"wazzup">>, A),
+ {A,B,V5,R,t(),recv()}
+ catch
+ C:E ->
+ {error, C, E}
+ end.
+
+-spec call(binary(), term()) -> binary().
+
+call(<<"wa", B/binary>>,V) when is_integer(V) -> B;
+call(B,_) -> B.
+
+t() ->
+ <<23:32, V:14, _:2, B/binary>> = id(<<"wazzup world">>),
+ {V,B}.
+
+recv() ->
+ F = fun() ->
+ receive
+ 1 -> ok;
+ 2 -> ok;
+ 3 -> ok;
+ a -> ok;
+ _ -> none
+ after 0 -> tmo
+ end
+ end,
+ tmo = F(),
+ ok.
+
+
+id(I) -> I.
+
diff --git a/lib/compiler/test/compile_SUITE_data/small_maps.erl b/lib/compiler/test/compile_SUITE_data/small_maps.erl
new file mode 100644
index 0000000000..a17a136a7d
--- /dev/null
+++ b/lib/compiler/test/compile_SUITE_data/small_maps.erl
@@ -0,0 +1,16 @@
+-module(small_maps).
+
+-export([go/0,go/1]).
+
+go() ->
+ go(1337).
+
+go(V0) ->
+ M0 = #{ a => 1, val => V0},
+ V1 = get_val(M0),
+ M1 = M0#{ val := [V0,V1] },
+ {some_val,[1337,{some_val,1337}]} = get_val(M1),
+ ok.
+
+get_val(#{ "wazzup" := _, val := V}) -> V;
+get_val(#{ val := V }) -> {some_val, V}.
diff --git a/lib/compiler/test/core_SUITE.erl b/lib/compiler/test/core_SUITE.erl
index a40dc32d59..428ad65364 100644
--- a/lib/compiler/test/core_SUITE.erl
+++ b/lib/compiler/test/core_SUITE.erl
@@ -23,7 +23,8 @@
init_per_testcase/2,end_per_testcase/2,
dehydrated_itracer/1,nested_tries/1,
seq_in_guard/1,make_effect_seq/1,eval_is_boolean/1,
- unsafe_case/1,nomatch_shadow/1,reversed_annos/1]).
+ unsafe_case/1,nomatch_shadow/1,reversed_annos/1,
+ map_core_test/1,eval_case/1,bad_boolean_guard/1]).
-include_lib("test_server/include/test_server.hrl").
@@ -48,7 +49,9 @@ all() ->
groups() ->
[{p,test_lib:parallel(),
[dehydrated_itracer,nested_tries,seq_in_guard,make_effect_seq,
- eval_is_boolean,unsafe_case,nomatch_shadow,reversed_annos]}].
+ eval_is_boolean,unsafe_case,nomatch_shadow,reversed_annos,
+ map_core_test,eval_case,bad_boolean_guard
+ ]}].
init_per_suite(Config) ->
@@ -72,6 +75,9 @@ end_per_group(_GroupName, Config) ->
?comp(unsafe_case).
?comp(nomatch_shadow).
?comp(reversed_annos).
+?comp(map_core_test).
+?comp(eval_case).
+?comp(bad_boolean_guard).
try_it(Mod, Conf) ->
Src = filename:join(?config(data_dir, Conf), atom_to_list(Mod)),
diff --git a/lib/compiler/test/core_SUITE_data/bad_boolean_guard.core b/lib/compiler/test/core_SUITE_data/bad_boolean_guard.core
new file mode 100644
index 0000000000..318f8e3dc7
--- /dev/null
+++ b/lib/compiler/test/core_SUITE_data/bad_boolean_guard.core
@@ -0,0 +1,32 @@
+module 'bad_boolean_guard' ['bad_boolean_guard'/0,
+ 'module_info'/0,
+ 'module_info'/1]
+ attributes []
+'bad_boolean_guard'/0 =
+ fun () ->
+ apply 'f'/1
+ ('true')
+'f'/1 =
+ fun (_X_cor0) ->
+ case _X_cor0 of
+ <X>
+ when try
+ call 'erlang':'and'
+ ('bad', _X_cor0)
+ of <Try> ->
+ Try
+ catch <T,R> ->
+ 'false' ->
+ 'not_ok'
+ <_X_cor3> when 'true' ->
+ 'ok'
+ end
+'module_info'/0 =
+ fun () ->
+ call 'erlang':'get_module_info'
+ ('bad_boolean_guard')
+'module_info'/1 =
+ fun (_X_cor0) ->
+ call 'erlang':'get_module_info'
+ ('bad_boolean_guard', _X_cor0)
+end \ No newline at end of file
diff --git a/lib/compiler/test/core_SUITE_data/eval_case.core b/lib/compiler/test/core_SUITE_data/eval_case.core
new file mode 100644
index 0000000000..f2776e2b1f
--- /dev/null
+++ b/lib/compiler/test/core_SUITE_data/eval_case.core
@@ -0,0 +1,34 @@
+module 'eval_case' ['eval_case'/0]
+ attributes []
+'eval_case'/0 =
+ fun () ->
+ case <> of
+ <> when 'true' ->
+ case apply 'do_case'/0() of
+ <'ok'> when 'true' ->
+ 'ok'
+ ( <_cor0> when 'true' ->
+ primop 'match_fail'
+ ({'badmatch',_cor0})
+ -| ['compiler_generated'] )
+ end
+ ( <> when 'true' ->
+ ( primop 'match_fail'
+ ({'function_clause'})
+ -| [{'function_name',{'eval_case',0}}] )
+ -| ['compiler_generated'] )
+ end
+'do_case'/0 =
+ fun () ->
+ case let <_cor0> =
+ apply 'id'/1(42)
+ in let <_cor1> =
+ call 'erlang':'+'
+ (_cor0, 7)
+ in {'x',_cor1} of
+ <{'x',49}> when 'true' ->
+ 'ok'
+ end
+'id'/1 =
+ fun (_cor0) -> _cor0
+end
diff --git a/lib/compiler/test/core_SUITE_data/map_core_test.core b/lib/compiler/test/core_SUITE_data/map_core_test.core
new file mode 100644
index 0000000000..2aa853d450
--- /dev/null
+++ b/lib/compiler/test/core_SUITE_data/map_core_test.core
@@ -0,0 +1,95 @@
+module 'map_core_test' ['map_core_test'/0,
+ 'module_info'/0,
+ 'module_info'/1]
+ attributes []
+'map_core_test'/0 =
+ %% Line 14
+ fun () ->
+ let <_cor0> =
+ %% Line 15
+ ~{::<'check','ok'>,::<1337,#{#<104>(8,1,'integer',['unsigned'|['big']]),
+ #<101>(8,1,'integer',['unsigned'|['big']]),
+ #<108>(8,1,'integer',['unsigned'|['big']]),
+ #<108>(8,1,'integer',['unsigned'|['big']]),
+ #<111>(8,1,'integer',['unsigned'|['big']])}#>,::<'val',0>}~
+ in let <M> =
+ %% Line 15
+ apply 'id'/1
+ (_cor0)
+ in let <_cor2> =
+ %% Line 16
+ apply 'id'/1
+ ([1|[2|[3|[4|[5|[6]]]]]])
+ in %% Line 16
+ case apply 'call'/2
+ (M, _cor2) of
+ <~{~<1337,#{#<104>(8,1,'integer',['unsigned'|['big']]),
+ #<101>(8,1,'integer',['unsigned'|['big']]),
+ #<108>(8,1,'integer',['unsigned'|['big']]),
+ #<108>(8,1,'integer',['unsigned'|['big']]),
+ #<111>(8,1,'integer',['unsigned'|['big']]),
+ #<32>(8,1,'integer',['unsigned'|['big']]),
+ #<49>(8,1,'integer',['unsigned'|['big']]),
+ #<32>(8,1,'integer',['unsigned'|['big']]),
+ #<50>(8,1,'integer',['unsigned'|['big']]),
+ #<32>(8,1,'integer',['unsigned'|['big']]),
+ #<51>(8,1,'integer',['unsigned'|['big']]),
+ #<32>(8,1,'integer',['unsigned'|['big']]),
+ #<52>(8,1,'integer',['unsigned'|['big']]),
+ #<32>(8,1,'integer',['unsigned'|['big']]),
+ #<53>(8,1,'integer',['unsigned'|['big']]),
+ #<32>(8,1,'integer',['unsigned'|['big']]),
+ #<54>(8,1,'integer',['unsigned'|['big']])}#>,~<'check','ok'>,~<'val',21>}~> when 'true' ->
+ %% Line 17
+ 'ok'
+ ( <_cor3> when 'true' ->
+ primop 'match_fail'
+ ({'badmatch',_cor3})
+ -| ['compiler_generated'] )
+ end
+'call'/2 =
+ %% Line 20
+ fun (_cor1,_cor0) ->
+ case <_cor1,_cor0> of
+ <M = ~{~<1337,Bin>,~<'check',_cor8>,~<'val',Val>}~,[V|Vs]> when 'true' ->
+ let <_cor3> =
+ %% Line 21
+ call 'erlang':'+'
+ (V, 48)
+ in let <_cor4> =
+ %% Line 21
+ #{#<Bin>('all',8,'binary',['unsigned'|['big']]),
+ #<32>(8,1,'integer',['unsigned'|['big']]),
+ #<_cor3>(8,1,'integer',['unsigned'|['big']])}#
+ in let <_cor2> =
+ %% Line 21
+ call 'erlang':'+'
+ (Val, V)
+ in let <_cor5> =
+ %% Line 21
+ ~{~<1337,_cor4>,~<'val',_cor2>|M}~
+ in %% Line 21
+ apply 'call'/2
+ (_cor5, Vs)
+ %% Line 22
+ <M,[]> when 'true' ->
+ M
+ ( <_cor7,_cor6> when 'true' ->
+ ( primop 'match_fail'
+ ({'function_clause',_cor7,_cor6})
+ -| [{'function_name',{'call',2}}] )
+ -| ['compiler_generated'] )
+ end
+'id'/1 =
+ %% Line 24
+ fun (_cor0) ->
+ _cor0
+'module_info'/0 =
+ fun () ->
+ call 'erlang':'get_module_info'
+ ('map_core_test')
+'module_info'/1 =
+ fun (_cor0) ->
+ call 'erlang':'get_module_info'
+ ('map_core_test', _cor0)
+end
diff --git a/lib/compiler/test/core_fold_SUITE.erl b/lib/compiler/test/core_fold_SUITE.erl
index a5a4e62a42..6a7036d728 100644
--- a/lib/compiler/test/core_fold_SUITE.erl
+++ b/lib/compiler/test/core_fold_SUITE.erl
@@ -22,7 +22,8 @@
init_per_group/2,end_per_group/2,
t_element/1,setelement/1,t_length/1,append/1,t_apply/1,bifs/1,
eq/1,nested_call_in_case/1,guard_try_catch/1,coverage/1,
- unused_multiple_values_error/1,unused_multiple_values/1]).
+ unused_multiple_values_error/1,unused_multiple_values/1,
+ multiple_aliases/1,redundant_boolean_clauses/1,mixed_matching_clauses/1]).
-export([foo/0,foo/1,foo/2,foo/3]).
@@ -38,7 +39,8 @@ groups() ->
[{p,test_lib:parallel(),
[t_element,setelement,t_length,append,t_apply,bifs,
eq,nested_call_in_case,guard_try_catch,coverage,
- unused_multiple_values_error,unused_multiple_values]}].
+ unused_multiple_values_error,unused_multiple_values,
+ multiple_aliases,redundant_boolean_clauses,mixed_matching_clauses]}].
init_per_suite(Config) ->
@@ -249,6 +251,12 @@ coverage(Config) when is_list(Config) ->
case list_to_pid("<0.42.0>") of
Pid when is_pid(Pid) -> ok
end,
+
+ %% Cover the non-variable case in bsm_do_an/4.
+ ok = bsm_an_inlined(<<1>>, Config),
+ error = bsm_an_inlined(<<1,2,3>>, Config),
+ error = bsm_an_inlined([], Config),
+
ok.
cover_will_match_list_type(A) ->
@@ -290,7 +298,8 @@ cover_is_safe_bool_expr(X) ->
false
end.
-id(I) -> I.
+bsm_an_inlined(<<_:8>>, _) -> ok;
+bsm_an_inlined(_, _) -> error.
unused_multiple_values_error(Config) when is_list(Config) ->
PrivDir = ?config(priv_dir, Config),
@@ -329,3 +338,50 @@ do_something(I) ->
put(unused_multiple_values,
[I|get(unused_multiple_values)]),
I.
+
+
+%% Make sure that multiple aliases does not cause
+%% the case expression to be evaluated twice.
+multiple_aliases(Config) when is_list(Config) ->
+ do_ma(fun() ->
+ X = Y = run_once(),
+ {X,Y}
+ end, {ok,ok}),
+ do_ma(fun() ->
+ case {true,run_once()} of
+ {true=A=B,ok=X=Y} ->
+ {A,B,X,Y}
+ end
+ end, {true,true,ok,ok}),
+ ok.
+
+do_ma(Fun, Expected) when is_function(Fun, 0) ->
+ Expected = Fun(),
+ ran_once = erase(run_once),
+ ok.
+
+run_once() ->
+ undefined = put(run_once, ran_once),
+ ok.
+
+
+redundant_boolean_clauses(Config) when is_list(Config) ->
+ X = id(0),
+ yes = case X == 0 of
+ false -> no;
+ false -> no;
+ true -> yes
+ end.
+
+mixed_matching_clauses(Config) when is_list(Config) ->
+ 0 = case #{} of
+ #{} -> 0;
+ a -> 1
+ end,
+ 0 = case <<>> of
+ <<>> -> 0;
+ a -> 1
+ end,
+ ok.
+
+id(I) -> I.
diff --git a/lib/compiler/test/error_SUITE.erl b/lib/compiler/test/error_SUITE.erl
index 859c4571ea..bd877bb528 100644
--- a/lib/compiler/test/error_SUITE.erl
+++ b/lib/compiler/test/error_SUITE.erl
@@ -23,7 +23,7 @@
-export([all/0, suite/0,groups/0,init_per_suite/1, end_per_suite/1,
init_per_group/2,end_per_group/2,
head_mismatch_line/1,warnings_as_errors/1, bif_clashes/1,
- transforms/1]).
+ transforms/1,forbidden_maps/1,bad_utf8/1]).
%% Used by transforms/1 test case.
-export([parse_transform/2]).
@@ -36,7 +36,8 @@ all() ->
groups() ->
[{p,test_lib:parallel(),
- [head_mismatch_line,warnings_as_errors,bif_clashes,transforms]}].
+ [head_mismatch_line,warnings_as_errors,bif_clashes,
+ transforms,forbidden_maps,bad_utf8]}].
init_per_suite(Config) ->
Config.
@@ -240,6 +241,38 @@ parse_transform(_, _) ->
error(too_bad).
+forbidden_maps(Config) when is_list(Config) ->
+ Ts1 = [{map_illegal_use_of_pattern,
+ <<"
+ -export([t/0]).
+ t() ->
+ V = 32,
+ #{<<\"hi\",V,\"all\">> := 1} = id(#{<<\"hi all\">> => 1}).
+ id(I) -> I.
+ ">>,
+ [return],
+ {error,[{5,erl_lint,{illegal_map_key_variable,'V'}}], []}}],
+ [] = run2(Config, Ts1),
+ ok.
+
+bad_utf8(Config) ->
+ Ts = [{bad_utf8,
+ %% If coding is specified explicitly as utf-8, there should be
+ %% a compilation error; we must not fallback to parsing the
+ %% file in latin-1 mode.
+ <<"%% coding: utf-8
+ %% Bj",246,"rn
+ t() -> \"",246,"\".
+ ">>,
+ [],
+ {error,[{2,epp,cannot_parse},
+ {2,file_io_server,invalid_unicode}],
+ []}
+ }],
+ [] = run2(Config, Ts),
+ ok.
+
+
run(Config, Tests) ->
?line File = test_filename(Config),
run(Tests, File, dont_write_beam).
@@ -303,6 +336,7 @@ run_test(Test0, File, Warnings, WriteBeam) ->
?line compile:file(File, [binary,report|Warnings]),
%% Test result of compilation.
+ io:format("~p\n", [Opts]),
?line Res = case compile:file(File, Opts) of
{ok,Mod,_,[{_File,Ws}]} ->
%io:format("compile:file(~s,~p) ->~n~p~n",
@@ -320,6 +354,11 @@ run_test(Test0, File, Warnings, WriteBeam) ->
%io:format("compile:file(~s,~p) ->~n~p~n",
% [File,Opts,_ZZ]),
{error,Es,Ws};
+ {error,[{XFile,Es1},{XFile,Es2}],Ws} = _ZZ
+ when is_list(XFile) ->
+ %io:format("compile:file(~s,~p) ->~n~p~n",
+ % [File,Opts,_ZZ]),
+ {error,Es1++Es2,Ws};
{error,Es,[{_File,Ws}]} = _ZZ->
%io:format("compile:file(~s,~p) ->~n~p~n",
% [File,Opts,_ZZ]),
diff --git a/lib/compiler/test/fun_SUITE.erl b/lib/compiler/test/fun_SUITE.erl
index e35692efd1..25b7f677b5 100644
--- a/lib/compiler/test/fun_SUITE.erl
+++ b/lib/compiler/test/fun_SUITE.erl
@@ -21,7 +21,7 @@
-export([all/0, suite/0,groups/0,init_per_suite/1, end_per_suite/1,
init_per_group/2,end_per_group/2,
test1/1,overwritten_fun/1,otp_7202/1,bif_fun/1,
- external/1,eep37/1]).
+ external/1,eep37/1,badarity/1]).
%% Internal export.
-export([call_me/1]).
@@ -32,7 +32,7 @@ suite() -> [{ct_hooks,[ts_install_cth]}].
all() ->
test_lib:recompile(?MODULE),
- [test1,overwritten_fun,otp_7202,bif_fun,external,eep37].
+ [test1,overwritten_fun,otp_7202,bif_fun,external,eep37,badarity].
groups() ->
[].
@@ -206,5 +206,9 @@ eep37(Config) when is_list(Config) ->
50 = UnusedName(8),
ok.
+badarity(Config) when is_list(Config) ->
+ {'EXIT',{{badarity,{_,[]}},_}} = (catch (fun badarity/1)()),
+ ok.
+
id(I) ->
I.
diff --git a/lib/compiler/test/guard_SUITE.erl b/lib/compiler/test/guard_SUITE.erl
index a0a9bb7ddd..eb205d09a7 100644
--- a/lib/compiler/test/guard_SUITE.erl
+++ b/lib/compiler/test/guard_SUITE.erl
@@ -33,7 +33,7 @@
tricky/1,rel_ops/1,literal_type_tests/1,
basic_andalso_orelse/1,traverse_dcd/1,
check_qlc_hrl/1,andalso_semi/1,t_tuple_size/1,binary_part/1,
- bad_constants/1]).
+ bad_constants/1,bad_guards/1]).
suite() -> [{ct_hooks,[ts_install_cth]}].
@@ -50,7 +50,7 @@ groups() ->
t_is_boolean,is_function_2,tricky,rel_ops,
literal_type_tests,basic_andalso_orelse,traverse_dcd,
check_qlc_hrl,andalso_semi,t_tuple_size,binary_part,
- bad_constants]}].
+ bad_constants,bad_guards]}].
init_per_suite(Config) ->
Config.
@@ -1023,6 +1023,10 @@ is_function_2(Config) when is_list(Config) ->
true = is_function(id(fun() -> ok end), 0),
false = is_function(id(fun ?MODULE:all/1), 0),
false = is_function(id(fun() -> ok end), 1),
+ {'EXIT',{badarg,_}} =
+ (catch is_function(id(fun() -> ok end), -1) orelse error),
+ {'EXIT',{badarg,_}} =
+ (catch is_function(id(fun() -> ok end), '') orelse error),
F = fun(_) -> ok end,
if
@@ -1550,6 +1554,10 @@ bad_constants(Config) when is_list(Config) ->
?line ?FAILING(3.14),
ok.
+bad_guards(Config) when is_list(Config) ->
+ if erlang:float(self()); true -> ok end,
+ ok.
+
%% Call this function to turn off constant propagation.
id(I) -> I.
diff --git a/lib/compiler/test/inline_SUITE.erl b/lib/compiler/test/inline_SUITE.erl
index e5c2d4f73a..47851e680b 100644
--- a/lib/compiler/test/inline_SUITE.erl
+++ b/lib/compiler/test/inline_SUITE.erl
@@ -37,7 +37,7 @@ all() ->
groups() ->
[{p,test_lib:parallel(),
[attribute,bsdecode,bsdes,barnes2,decode1,smith,fname,
- itracer,pseudoknot,comma_splitter,lists,really_inlined,otp_7223,
+ itracer,pseudoknot,maps_inline_test,comma_splitter,lists,really_inlined,otp_7223,
coverage]}].
init_per_suite(Config) ->
@@ -85,6 +85,7 @@ attribute(Config) when is_list(Config) ->
?comp(pseudoknot).
?comp(comma_splitter).
?comp(fname).
+?comp(maps_inline_test).
try_inline(Mod, Config) ->
Node = ?config(testing_node, Config),
diff --git a/lib/compiler/test/inline_SUITE_data/maps_inline_test.erl b/lib/compiler/test/inline_SUITE_data/maps_inline_test.erl
new file mode 100644
index 0000000000..d9762e2647
--- /dev/null
+++ b/lib/compiler/test/inline_SUITE_data/maps_inline_test.erl
@@ -0,0 +1,70 @@
+%%
+%% %CopyrightBegin%
+%%
+%% Copyright Ericsson AB 2013. 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(maps_inline_test).
+
+-export([?MODULE/0]).
+
+?MODULE() ->
+ 21 = mval(#{val => 1}) +
+ mval(#{val => 2}) +
+ mval(#{val => 3}) +
+ mval(#{val => 4}) +
+ mval(#{val => 5}) +
+ mval(#{val => 6}),
+
+ 21 = gval(#{id => 1}) +
+ gval(#{id => 2}) +
+ gval(#{id => 3}) +
+ gval(#{id => 4}) +
+ gval(#{id => 5}) +
+ gval(#{id => 6}),
+
+ 21 = sval(#{id => 1}) +
+ sval(#{id => 2}) +
+ sval(#{id => 3}) +
+ sval(#{id => 4}) +
+ sval(#{id => 5}) +
+ sval(#{id => 6}),
+
+ M = #{v => 1, m => #{v => 21, m => #{v => 7, m => 13}}},
+
+ 42 = decompose(M).
+
+% switch key orders
+decompose(#{ m := M, v := V}) when is_map(M) ->
+ V + decompose(M);
+decompose(#{ v := V, m := M}) -> V + M.
+
+
+mval(#{val := V}) -> V.
+
+sval(#{id := 1}) -> 6;
+sval(#{id := 2}) -> 5;
+sval(#{id := 3}) -> 4;
+sval(#{id := 4}) -> 3;
+sval(#{id := 5}) -> 2;
+sval(#{id := 6}) -> 1.
+
+gval(M) when is_map(M) andalso M =:= #{ id => 1} -> 1;
+gval(M) when is_map(M) andalso M =:= #{ id => 2} -> 4;
+gval(M) when is_map(M) andalso M =:= #{ id => 3} -> 2;
+gval(M) when is_map(M) andalso M =:= #{ id => 4} -> 5;
+gval(M) when is_map(M) andalso M =:= #{ id => 5} -> 3;
+gval(M) when is_map(M) andalso M =:= #{ id => 6} -> 6.
diff --git a/lib/compiler/test/lc_SUITE.erl b/lib/compiler/test/lc_SUITE.erl
index f5948504b3..398398a397 100644
--- a/lib/compiler/test/lc_SUITE.erl
+++ b/lib/compiler/test/lc_SUITE.erl
@@ -23,7 +23,7 @@
init_per_group/2,end_per_group/2,
init_per_testcase/2,end_per_testcase/2,
basic/1,deeply_nested/1,no_generator/1,
- empty_generator/1]).
+ empty_generator/1,no_export/1]).
-include_lib("test_server/include/test_server.hrl").
@@ -31,7 +31,7 @@ suite() -> [{ct_hooks,[ts_install_cth]}].
all() ->
test_lib:recompile(?MODULE),
- [basic, deeply_nested, no_generator, empty_generator].
+ [basic, deeply_nested, no_generator, empty_generator, no_export].
groups() ->
[].
@@ -177,6 +177,10 @@ empty_generator(Config) when is_list(Config) ->
?line [] = [X || {X} <- [], (false or (X/0 > 3))],
ok.
+no_export(Config) when is_list(Config) ->
+ [] = [ _X = a || false ] ++ [ _X = a || false ],
+ ok.
+
id(I) -> I.
fc(Args, {'EXIT',{function_clause,[{?MODULE,_,Args,_}|_]}}) -> ok;
diff --git a/lib/compiler/test/map_SUITE.erl b/lib/compiler/test/map_SUITE.erl
new file mode 100644
index 0000000000..403b7e8405
--- /dev/null
+++ b/lib/compiler/test/map_SUITE.erl
@@ -0,0 +1,605 @@
+%% %CopyrightBegin%
+%%
+%% Copyright Ericsson AB 2013. 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(map_SUITE).
+-export([all/0, suite/0,groups/0,init_per_suite/1, end_per_suite/1,
+ init_per_group/2,end_per_group/2
+ ]).
+
+-export([
+ t_build_and_match_literals/1,
+ t_update_literals/1,t_match_and_update_literals/1,
+ t_update_map_expressions/1,
+ t_update_assoc/1,t_update_exact/1,
+ t_guard_bifs/1, t_guard_sequence/1, t_guard_update/1,
+ t_guard_receive/1, t_guard_fun/1,
+ t_list_comprehension/1,
+ t_map_sort_literals/1,
+ t_map_size/1,
+ t_build_and_match_aliasing/1,
+
+ %% warnings
+ t_warn_useless_build/1,
+ t_warn_pair_key_overloaded/1,
+
+ %% not covered in 17.0-rc1
+ t_build_and_match_over_alloc/1,
+ t_build_and_match_empty_val/1,
+ t_build_and_match_val/1,
+ t_build_and_match_nil/1,
+ t_build_and_match_structure/1,
+
+ %% errors in 17.0-rc1
+ t_update_values/1,
+ t_expand_map_update/1,
+ t_export/1
+ ]).
+
+suite() -> [].
+
+all() -> [
+ t_build_and_match_literals,
+ t_update_literals, t_match_and_update_literals,
+ t_update_map_expressions,
+ t_update_assoc,t_update_exact,
+ t_guard_bifs, t_guard_sequence, t_guard_update,
+ t_guard_receive,t_guard_fun, t_list_comprehension,
+ t_map_sort_literals,
+ t_map_size,
+ t_build_and_match_aliasing,
+
+ %% warnings
+ t_warn_useless_build,
+ t_warn_pair_key_overloaded,
+
+ %% not covered in 17.0-rc1
+ t_build_and_match_over_alloc,
+ t_build_and_match_empty_val,
+ t_build_and_match_val,
+ t_build_and_match_nil,
+ t_build_and_match_structure,
+
+ %% errors in 17.0-rc1
+ t_update_values,
+ t_expand_map_update,
+ t_export
+ ].
+
+groups() -> [].
+
+init_per_suite(Config) -> Config.
+end_per_suite(_Config) -> ok.
+
+init_per_group(_GroupName, Config) -> Config.
+end_per_group(_GroupName, Config) -> Config.
+
+%% tests
+
+t_build_and_match_literals(Config) when is_list(Config) ->
+ #{} = id(#{}),
+ #{1:=a} = id(#{1=>a}),
+ #{1:=a,2:=b} = id(#{1=>a,2=>b}),
+ #{1:=a,2:=b,3:="c"} = id(#{1=>a,2=>b,3=>"c"}),
+ #{1:=a,2:=b,3:="c","4":="d"} = id(#{1=>a,2=>b,3=>"c","4"=>"d"}),
+ #{1:=a,2:=b,3:="c","4":="d",<<"5">>:=<<"e">>} =
+ id(#{1=>a,2=>b,3=>"c","4"=>"d",<<"5">>=><<"e">>}),
+ #{1:=a,2:=b,3:="c","4":="d",<<"5">>:=<<"e">>,{"6",7}:="f"} =
+ id(#{1=>a,2=>b,3=>"c","4"=>"d",<<"5">>=><<"e">>,{"6",7}=>"f"}),
+ #{1:=a,2:=b,3:="c","4":="d",<<"5">>:=<<"e">>,{"6",7}:="f",8:=g} =
+ id(#{1=>a,2=>b,3=>"c","4"=>"d",<<"5">>=><<"e">>,{"6",7}=>"f",8=>g}),
+
+ #{<<"hi all">> := 1} = id(#{<<"hi",32,"all">> => 1}),
+
+ #{a:=X,a:=X=3,b:=4} = id(#{a=>3,b=>4}), % weird but ok =)
+
+ #{ a:=#{ b:=#{c := third, b:=second}}, b:=first} =
+ id(#{ b=>first, a=>#{ b=>#{c => third, b=> second}}}),
+
+ M = #{ map_1=>#{ map_2=>#{value_3 => third}, value_2=> second}, value_1=>first},
+ M = #{ map_1:=#{ map_2:=#{value_3 := third}, value_2:= second}, value_1:=first} =
+ id(#{ map_1=>#{ map_2=>#{value_3 => third}, value_2=> second}, value_1=>first}),
+
+ %% map key
+ #{ #{} := 42 } = id(#{ #{} => 42 }),
+ #{ #{ "a" => 3 } := 42 } = id(#{ #{ "a" => 3} => 42 }),
+
+ %% nil key
+ #{[]:=ok,1:=2} = id(#{[]=>ok,1=>2}),
+
+ %% error case
+ {'EXIT',{{badmatch,_},_}} = (catch (#{x:=3,x:=2} = id(#{x=>3}))),
+ {'EXIT',{{badmatch,_},_}} = (catch (#{x:=2} = id(#{x=>3}))),
+ {'EXIT',{{badmatch,_},_}} = (catch (#{x:=3} = id({a,b,c}))),
+ {'EXIT',{{badmatch,_},_}} = (catch (#{x:=3} = id(#{y=>3}))),
+ {'EXIT',{{badmatch,_},_}} = (catch (#{x:=3} = id(#{x=>"three"}))),
+ {'EXIT',{badarg,_}} = (catch id(#{<<0:258>> =>"three"})),
+ {'EXIT',{{badmatch,_},_}} = (catch (#{#{"a"=>42} := 3}=id(#{#{"a"=>3}=>42}))),
+ ok.
+
+t_build_and_match_aliasing(Config) when is_list(Config) ->
+ M1 = id(#{a=>1,b=>2,c=>3,d=>4}),
+ #{c:=C1=_=_=C2} = M1,
+ true = C1 =:= C2,
+ #{a:=A,a:=A,a:=A,b:=B,b:=B} = M1,
+ #{a:=A,a:=A,a:=A,b:=B,b:=B,b:=2} = M1,
+ #{a:=A=1,a:=A,a:=A,b:=B=2,b:=B,b:=2} = M1,
+ #{c:=C1, c:=_, c:=3, c:=_, c:=C2} = M1,
+ #{c:=C=_=3=_=C} = M1,
+
+ M2 = id(#{"a"=>1,"b"=>2,"c"=>3,"d"=>4}),
+ #{"a":=A2,"a":=A2,"a":=A2,"b":=B2,"b":=B2,"b":=2} = M2,
+ #{"a":=_,"a":=_,"a":=_,"b":=_,"b":=_,"b":=2} = M2,
+ ok.
+
+t_map_size(Config) when is_list(Config) ->
+ 0 = map_size(id(#{})),
+ 1 = map_size(id(#{a=>1})),
+ 1 = map_size(id(#{a=>"wat"})),
+ 2 = map_size(id(#{a=>1, b=>2})),
+ 3 = map_size(id(#{a=>1, b=>2, b=>"3","33"=><<"n">>})),
+
+ true = map_is_size(#{a=>1}, 1),
+ true = map_is_size(#{a=>1, a=>2}, 1),
+ M = #{ "a" => 1, "b" => 2},
+ true = map_is_size(M, 2),
+ false = map_is_size(M, 3),
+ true = map_is_size(M#{ "a" => 2}, 2),
+ false = map_is_size(M#{ "c" => 2}, 2),
+
+ %% Error cases.
+ {'EXIT',{badarg,_}} = (catch map_size([])),
+ {'EXIT',{badarg,_}} = (catch map_size(<<1,2,3>>)),
+ {'EXIT',{badarg,_}} = (catch map_size(1)),
+ ok.
+
+map_is_size(M,N) when map_size(M) =:= N -> true;
+map_is_size(_,_) -> false.
+
+% test map updates without matching
+t_update_literals(Config) when is_list(Config) ->
+ Map = #{x=>1,y=>2,z=>3,q=>4},
+ #{x:="d",q:="4"} = loop_update_literals_x_q(Map, [
+ {"a","1"},{"b","2"},{"c","3"},{"d","4"}
+ ]),
+ ok.
+
+loop_update_literals_x_q(Map, []) -> Map;
+loop_update_literals_x_q(Map, [{X,Q}|Vs]) ->
+ loop_update_literals_x_q(Map#{q=>Q,x=>X},Vs).
+
+% test map updates with matching
+t_match_and_update_literals(Config) when is_list(Config) ->
+ Map = #{x=>0,y=>"untouched",z=>"also untouched",q=>1},
+ #{x:=16,q:=21,y:="untouched",z:="also untouched"} = loop_match_and_update_literals_x_q(Map, [
+ {1,2},{3,4},{5,6},{7,8}
+ ]),
+ M0 = id(#{ "hi" => "hello", int => 3, <<"key">> => <<"value">>,
+ 4 => number, 18446744073709551629 => wat}),
+ M1 = id(#{}),
+ M2 = M1#{ "hi" => "hello", int => 3, <<"key">> => <<"value">>,
+ 4 => number, 18446744073709551629 => wat},
+ M0 = M2,
+
+ #{ 4 := another_number, int := 3 } = M2#{ 4 => another_number },
+ ok.
+
+loop_match_and_update_literals_x_q(Map, []) -> Map;
+loop_match_and_update_literals_x_q(#{q:=Q0,x:=X0} = Map, [{X,Q}|Vs]) ->
+ loop_match_and_update_literals_x_q(Map#{q=>Q0+Q,x=>X0+X},Vs).
+
+
+t_update_map_expressions(Config) when is_list(Config) ->
+ M = maps:new(),
+ X = id(fondue),
+ M1 = #{ a := 1 } = M#{a => 1},
+ #{ b := {X} } = M1#{ a := 1, b => {X} },
+
+ #{ b := 2 } = (maps:new())#{ b => 2 },
+
+ #{ a :=42, b:=42, c:=42 } = (maps:from_list([{a,1},{b,2},{c,3}]))#{ a := 42, b := 42, c := 42 },
+ #{ "a" :=1, "b":=42, "c":=42 } = (maps:from_list([{"a",1},{"b",2}]))#{ "b" := 42, "c" => 42 },
+
+ %% Test need to be in a fun.
+ %% This tests that let expr optimisation in sys_core_fold
+ %% covers maps correctly.
+ F = fun() ->
+ M0 = id(#{ "a" => [1,2,3] }),
+ #{ "a" := _ } = M0,
+ M0#{ "a" := b }
+ end,
+
+ #{ "a" := b } = F(),
+
+ %% Error cases, FIXME: should be 'badmap'?
+ {'EXIT',{badarg,_}} = (catch (id(<<>>))#{ a := 42, b => 2 }),
+ {'EXIT',{badarg,_}} = (catch (id([]))#{ a := 42, b => 2 }),
+ ok.
+
+
+t_update_assoc(Config) when is_list(Config) ->
+ M0 = id(#{1=>a,2=>b,3.0=>c,4=>d,5=>e}),
+
+ M1 = M0#{1=>42,2=>100,4=>[a,b,c]},
+ #{1:=42,2:=100,3.0:=c,4:=[a,b,c],5:=e} = M1,
+ #{1:=42,2:=b,4:=d,5:=e,2.0:=100,3.0:=c,4.0:=[a,b,c]} = M0#{1.0=>float,1:=42,2.0=>wrong,2.0=>100,4.0=>[a,b,c]},
+
+ M2 = M0#{3.0=>new},
+ #{1:=a,2:=b,3.0:=new,4:=d,5:=e} = M2,
+ M2 = M0#{3.0:=wrong,3.0=>new},
+
+ %% Errors cases.
+ BadMap = id(badmap),
+ {'EXIT',{badarg,_}} = (catch BadMap#{nonexisting=>val}),
+ {'EXIT',{badarg,_}} = (catch <<>>#{nonexisting=>val}),
+ {'EXIT',{badarg,_}} = (catch M0#{<<0:257>> => val}), %% limitation
+ ok.
+
+t_update_exact(Config) when is_list(Config) ->
+ M0 = id(#{1=>a,2=>b,3.0=>c,4=>d,5=>e}),
+
+ M1 = M0#{1:=42,2:=100,4:=[a,b,c]},
+ #{1:=42,2:=100,3.0:=c,4:=[a,b,c],5:=e} = M1,
+ M1 = M0#{1:=wrong,1=>42,2=>wrong,2:=100,4:=[a,b,c]},
+
+ M2 = M0#{3.0:=new},
+ #{1:=a,2:=b,3.0:=new,4:=d,5:=e} = M2,
+ M2 = M0#{3.0=>wrong,3.0:=new},
+ true = M2 =/= M0#{3=>right,3.0:=new},
+ #{ 3 := right, 3.0 := new } = M0#{3=>right,3.0:=new},
+
+ M3 = id(#{ 1 => val}),
+ #{1 := update2,1.0 := new_val4} = M3#{
+ 1.0 => new_val1, 1 := update, 1=> update3,
+ 1 := update2, 1.0 := new_val2, 1.0 => new_val3,
+ 1.0 => new_val4 },
+
+ %% Errors cases.
+ {'EXIT',{badarg,_}} = (catch ((id(nil))#{ a := b })),
+ {'EXIT',{badarg,_}} = (catch M0#{nonexisting:=val}),
+ {'EXIT',{badarg,_}} = (catch M0#{1.0:=v,1.0=>v2}),
+ {'EXIT',{badarg,_}} = (catch M0#{42.0:=v,42:=v2}),
+ {'EXIT',{badarg,_}} = (catch M0#{42=>v1,42.0:=v2,42:=v3}),
+ {'EXIT',{badarg,_}} = (catch <<>>#{nonexisting:=val}),
+ {'EXIT',{badarg,_}} = (catch M0#{<<0:257>> := val}), %% limitation
+ ok.
+
+t_update_values(Config) when is_list(Config) ->
+ V0 = id(1337),
+ M0 = #{ a => 1, val => V0},
+ V1 = get_val(M0),
+ M1 = M0#{ val := [V0,V1], "wazzup" => 42 },
+ [1337, {some_val, 1337}] = get_val(M1),
+
+ N = 110,
+ List = [{[I,1,2,3,I],{1,2,3,"wat",I}}|| I <- lists:seq(1,N)],
+
+ {_,_,#{val2 := {1,2,3,"wat",N}, val1 := [N,1,2,3,N]}} = lists:foldl(fun
+ ({V2,V3},{Old2,Old3,Mi}) ->
+ ok = check_val(Mi,Old2,Old3),
+ #{ val1 := Old2, val2 := Old3 } = Mi,
+ {V2,V3, Mi#{ val1 := id(V2), val2 := V1, val2 => id(V3)}}
+ end, {none, none, #{val1=>none,val2=>none}},List),
+ ok.
+
+t_expand_map_update(Config) when is_list(Config) ->
+ M = #{<<"hello">> => <<"world">>}#{<<"hello">> := <<"les gens">>},
+ #{<<"hello">> := <<"les gens">>} = M,
+ ok.
+
+t_export(Config) when is_list(Config) ->
+ Raclette = id(#{}),
+ case brie of brie -> Fromage = Raclette end,
+ Raclette = Fromage#{},
+ ok.
+
+check_val(#{val1:=V1, val2:=V2},V1,V2) -> ok.
+
+get_val(#{ "wazzup" := _, val := V}) -> V;
+get_val(#{ val := V }) -> {some_val, V}.
+
+t_guard_bifs(Config) when is_list(Config) ->
+ true = map_guard_empty(),
+ true = map_guard_empty_2(),
+ true = map_guard_head(#{a=>1}),
+ false = map_guard_head([]),
+ true = map_guard_body(#{a=>1}),
+ false = map_guard_body({}),
+ true = map_guard_pattern(#{a=>1, <<"hi">> => "hi" }),
+ false = map_guard_pattern("list"),
+ true = map_guard_tautology(),
+ true = map_guard_ill_map_size(),
+ ok.
+
+map_guard_empty() when is_map(#{}); false -> true.
+
+map_guard_empty_2() when true; #{} andalso false -> true.
+
+map_guard_head(M) when is_map(M) -> true;
+map_guard_head(_) -> false.
+
+map_guard_body(M) -> is_map(M).
+
+map_guard_pattern(#{}) -> true;
+map_guard_pattern(_) -> false.
+
+map_guard_tautology() when #{} =:= #{}; true -> true.
+
+map_guard_ill_map_size() when true; map_size(0) -> true.
+
+t_guard_sequence(Config) when is_list(Config) ->
+ {1, "a"} = map_guard_sequence_1(#{seq=>1,val=>id("a")}),
+ {2, "b"} = map_guard_sequence_1(#{seq=>2,val=>id("b")}),
+ {3, "c"} = map_guard_sequence_1(#{seq=>3,val=>id("c")}),
+ {4, "d"} = map_guard_sequence_1(#{seq=>4,val=>id("d")}),
+ {5, "e"} = map_guard_sequence_1(#{seq=>5,val=>id("e")}),
+
+ {1,M1} = map_guard_sequence_2(M1 = id(#{a=>3})),
+ {2,M2} = map_guard_sequence_2(M2 = id(#{a=>4, b=>4})),
+ {3,gg,M3} = map_guard_sequence_2(M3 = id(#{a=>gg, b=>4})),
+ {4,sc,sc,M4} = map_guard_sequence_2(M4 = id(#{a=>sc, b=>3, c=>sc2})),
+ {5,kk,kk,M5} = map_guard_sequence_2(M5 = id(#{a=>kk, b=>other, c=>sc2})),
+
+ %% error case
+ {'EXIT',{function_clause,_}} = (catch map_guard_sequence_1(#{seq=>6,val=>id("e")})),
+ {'EXIT',{function_clause,_}} = (catch map_guard_sequence_2(#{b=>5})),
+ ok.
+
+map_guard_sequence_1(#{seq:=1=Seq, val:=Val}) -> {Seq,Val};
+map_guard_sequence_1(#{seq:=2=Seq, val:=Val}) -> {Seq,Val};
+map_guard_sequence_1(#{seq:=3=Seq, val:=Val}) -> {Seq,Val};
+map_guard_sequence_1(#{seq:=4=Seq, val:=Val}) -> {Seq,Val};
+map_guard_sequence_1(#{seq:=5=Seq, val:=Val}) -> {Seq,Val}.
+
+map_guard_sequence_2(#{ a:=3 }=M) -> {1, M};
+map_guard_sequence_2(#{ a:=4 }=M) -> {2, M};
+map_guard_sequence_2(#{ a:=X, a:=X, b:=4 }=M) -> {3,X,M};
+map_guard_sequence_2(#{ a:=X, a:=Y, b:=3 }=M) when X =:= Y -> {4,X,Y,M};
+map_guard_sequence_2(#{ a:=X, a:=Y }=M) when X =:= Y -> {5,X,Y,M}.
+
+
+t_guard_update(Config) when is_list(Config) ->
+ error = map_guard_update(#{},#{}),
+ first = map_guard_update(#{}, #{x=>first}),
+ second = map_guard_update(#{y=>old}, #{x=>second,y=>old}),
+ third = map_guard_update(#{x=>old,y=>old}, #{x=>third,y=>old}),
+ ok.
+
+map_guard_update(M1, M2) when M1#{x=>first} =:= M2 -> first;
+map_guard_update(M1, M2) when M1#{x=>second} =:= M2 -> second;
+map_guard_update(M1, M2) when M1#{x:=third} =:= M2 -> third;
+map_guard_update(_, _) -> error.
+
+t_guard_receive(Config) when is_list(Config) ->
+ M0 = #{ id => 0 },
+ Pid = spawn_link(fun() -> guard_receive_loop() end),
+ Big = 36893488147419103229,
+ B1 = <<"some text">>,
+ B2 = <<"was appended">>,
+ B3 = <<B1/binary, B2/binary>>,
+
+ #{id:=1, res:=Big} = M1 = call(Pid, M0#{op=>sub,in=>{1 bsl 65, 3}}),
+ #{id:=2, res:=26} = M2 = call(Pid, M1#{op=>idiv,in=>{53,2}}),
+ #{id:=3, res:=832} = M3 = call(Pid, M2#{op=>imul,in=>{26,32}}),
+ #{id:=4, res:=4} = M4 = call(Pid, M3#{op=>add,in=>{1,3}}),
+ #{id:=5, res:=Big} = M5 = call(Pid, M4#{op=>sub,in=>{1 bsl 65, 3}}),
+ #{id:=6, res:=B3} = M6 = call(Pid, M5#{op=>"append",in=>{B1,B2}}),
+ #{id:=7, res:=4} = _ = call(Pid, M6#{op=>add,in=>{1,3}}),
+
+
+ %% update old maps and check id update
+ #{id:=2, res:=B3} = call(Pid, M1#{op=>"append",in=>{B1,B2}}),
+ #{id:=5, res:=99} = call(Pid, M4#{op=>add,in=>{33, 66}}),
+
+ %% cleanup
+ done = call(Pid, done),
+ ok.
+
+call(Pid, M) ->
+ Pid ! {self(), M}, receive {Pid, Res} -> Res end.
+
+guard_receive_loop() ->
+ receive
+ {Pid, #{ id:=Id, op:="append", in:={X,Y}}=M} when is_binary(X), is_binary(Y) ->
+ Pid ! {self(), M#{ id=>Id+1, res=><<X/binary,Y/binary>>}},
+ guard_receive_loop();
+ {Pid, #{ id:=Id, op:=add, in:={X,Y}}} ->
+ Pid ! {self(), #{ id=>Id+1, res=>X+Y}},
+ guard_receive_loop();
+ {Pid, #{ id:=Id, op:=sub, in:={X,Y}}=M} ->
+ Pid ! {self(), M#{ id=>Id+1, res=>X-Y}},
+ guard_receive_loop();
+ {Pid, #{ id:=Id, op:=idiv, in:={X,Y}}=M} ->
+ Pid ! {self(), M#{ id=>Id+1, res=>X div Y}},
+ guard_receive_loop();
+ {Pid, #{ id:=Id, op:=imul, in:={X,Y}}=M} ->
+ Pid ! {self(), M#{ id=>Id+1, res=>X * Y}},
+ guard_receive_loop();
+ {Pid, done} ->
+ Pid ! {self(), done};
+ {Pid, Other} ->
+ Pid ! {error, Other},
+ guard_receive_loop()
+ end.
+
+
+t_list_comprehension(Config) when is_list(Config) ->
+ [#{k:=1},#{k:=2},#{k:=3}] = [#{k=>I} || I <- [1,2,3]],
+ ok.
+
+t_guard_fun(Config) when is_list(Config) ->
+ F1 = fun
+ (#{s:=v,v:=V}) -> {v,V};
+ (#{s:=t,v:={V,V}}) -> {t,V};
+ (#{s:=l,v:=[V,V]}) -> {l,V}
+ end,
+
+ F2 = fun
+ (#{s:=T,v:={V,V}}) -> {T,V};
+ (#{s:=T,v:=[V,V]}) -> {T,V};
+ (#{s:=T,v:=V}) -> {T,V}
+ end,
+ V = <<"hi">>,
+
+ {v,V} = F1(#{s=>v,v=>V}),
+ {t,V} = F1(#{s=>t,v=>{V,V}}),
+ {l,V} = F1(#{s=>l,v=>[V,V]}),
+
+ {v,V} = F2(#{s=>v,v=>V}),
+ {t,V} = F2(#{s=>t,v=>{V,V}}),
+ {l,V} = F2(#{s=>l,v=>[V,V]}),
+
+ %% error case
+ case (catch F1(#{s=>none,v=>none})) of
+ {'EXIT', {function_clause,[{?MODULE,_,[#{s:=none,v:=none}],_}|_]}} -> ok;
+ {'EXIT', {{case_clause,_},_}} -> {comment,inlined};
+ Other ->
+ test_server:fail({no_match, Other})
+ end.
+
+
+t_map_sort_literals(Config) when is_list(Config) ->
+ % test relation
+
+ %% size order
+ true = #{ a => 1, b => 2} < id(#{ a => 1, b => 1, c => 1}),
+ true = #{ b => 1, a => 1} < id(#{ c => 1, a => 1, b => 1}),
+ false = #{ c => 1, b => 1, a => 1} < id(#{ c => 1, a => 1}),
+
+ %% key order
+ true = id(#{ a => 1 }) < id(#{ b => 1}),
+ false = id(#{ b => 1 }) < id(#{ a => 1}),
+ true = id(#{ a => 1, b => 1, c => 1 }) < id(#{ b => 1, c => 1, d => 1}),
+ true = id(#{ b => 1, c => 1, d => 1 }) > id(#{ a => 1, b => 1, c => 1}),
+ true = id(#{ c => 1, b => 1, a => 1 }) < id(#{ b => 1, c => 1, d => 1}),
+ true = id(#{ "a" => 1 }) < id(#{ <<"a">> => 1}),
+ false = id(#{ <<"a">> => 1 }) < id(#{ "a" => 1}),
+ false = id(#{ 1 => 1 }) < id(#{ 1.0 => 1}),
+ false = id(#{ 1.0 => 1 }) < id(#{ 1 => 1}),
+
+ %% value order
+ true = id(#{ a => 1 }) < id(#{ a => 2}),
+ false = id(#{ a => 2 }) < id(#{ a => 1}),
+ false = id(#{ a => 2, b => 1 }) < id(#{ a => 1, b => 3}),
+ true = id(#{ a => 1, b => 1 }) < id(#{ a => 1, b => 3}),
+
+ true = id(#{ "a" => "hi", b => 134 }) == id(#{ b => 134,"a" => "hi"}),
+
+ %% lists:sort
+
+ SortVs = [#{"a"=>1},#{a=>2},#{1=>3},#{<<"a">>=>4}],
+ [#{1:=ok},#{a:=ok},#{"a":=ok},#{<<"a">>:=ok}] = lists:sort([#{"a"=>ok},#{a=>ok},#{1=>ok},#{<<"a">>=>ok}]),
+ [#{1:=3},#{a:=2},#{"a":=1},#{<<"a">>:=4}] = lists:sort(SortVs),
+ [#{1:=3},#{a:=2},#{"a":=1},#{<<"a">>:=4}] = lists:sort(lists:reverse(SortVs)),
+
+ ok.
+
+t_warn_pair_key_overloaded(Config) when is_list(Config) ->
+ #{ "hi1" := 42 } = id(#{ "hi1" => 1, "hi1" => 42 }),
+
+ #{ "hi1" := 1337, "hi2" := [2], "hi3" := 3 } = id(#{
+ "hi1" => erlang:atom_to_binary(?MODULE,utf8),
+ "hi1" => erlang:binary_to_atom(<<"wazzup">>,utf8),
+ "hi1" => erlang:binary_to_float(<<"3.1416">>),
+ "hi1" => erlang:float_to_binary(3.1416),
+ "hi2" => erlang:pid_to_list(self()),
+ "hi3" => erlang:float_to_binary(3.1416),
+ "hi2" => lists:subtract([1,2],[1]),
+ "hi3" => +3,
+ "hi1" => erlang:min(1,2),
+ "hi1" => erlang:hash({1,2},35),
+ "hi1" => erlang:phash({1,2},33),
+ "hi1" => erlang:phash2({1,2},34),
+ "hi1" => erlang:integer_to_binary(1337),
+ "hi1" => erlang:binary_to_integer(<<"1337">>),
+ "hi4" => erlang:float_to_binary(3.1416)
+ }),
+ ok.
+
+t_warn_useless_build(Config) when is_list(Config) ->
+ [#{ a => id(I)} || I <- [1,2,3]],
+ ok.
+
+t_build_and_match_over_alloc(Config) when is_list(Config) ->
+ Ls = id([1,2,3]),
+ V0 = [a|Ls],
+ M0 = id(#{ "a" => V0 }),
+ #{ "a" := V1 } = M0,
+ V2 = id([c|Ls]),
+ M2 = id(#{ "a" => V2 }),
+ #{ "a" := V3 } = M2,
+ {[a,1,2,3],[c,1,2,3]} = id({V1,V3}),
+ ok.
+
+t_build_and_match_empty_val(Config) when is_list(Config) ->
+ F = fun(#{ "hi":=_,{1,2}:=_,1337:=_}) -> ok end,
+ ok = F(id(#{"hi"=>ok,{1,2}=>ok,1337=>ok})),
+
+ %% error case
+ case (catch (F(id(#{"hi"=>ok})))) of
+ {'EXIT',{function_clause,_}} -> ok;
+ {'EXIT', {{case_clause,_},_}} -> {comment,inlined};
+ Other ->
+ test_server:fail({no_match, Other})
+ end.
+
+t_build_and_match_val(Config) when is_list(Config) ->
+ F = fun
+ (#{ "hi" := first, v := V}) -> {1,V};
+ (#{ "hi" := second, v := V}) -> {2,V}
+ end,
+
+
+ {1,"hello"} = F(id(#{"hi"=>first,v=>"hello"})),
+ {2,"second"} = F(id(#{"hi"=>second,v=>"second"})),
+
+ %% error case
+ case (catch (F(id(#{"hi"=>ok})))) of
+ {'EXIT',{function_clause,_}} -> ok;
+ {'EXIT', {{case_clause,_},_}} -> {comment,inlined};
+ Other ->
+ test_server:fail({no_match, Other})
+ end.
+
+t_build_and_match_nil(Config) when is_list(Config) ->
+ %% literals removed the coverage
+ V1 = id(cookie),
+ V2 = id(cake),
+ V3 = id(crisps),
+
+ #{ [] := V1, "treat" := V2, {your,treat} := V3 } = id(#{
+ {your,treat} => V3,
+ "treat" => V2,
+ [] => V1 }),
+ #{ [] := V3, [] := V3 } = id(#{ [] => V1, [] => V3 }),
+ ok.
+
+t_build_and_match_structure(Config) when is_list(Config) ->
+ V2 = id("it"),
+ S = id([42,{"hi", "=)", #{ "a" => 42, any => any, val => "get_" ++ V2}}]),
+
+ %% match deep map values
+ V2 = case S of
+ [42,{"hi",_, #{ "a" := 42, val := "get_" ++ V1, any := _ }}] -> V1
+ end,
+ %% match deep map
+ ok = case S of
+ [42,{"hi",_, #{ }}] -> ok
+ end,
+ ok.
+
+%% Use this function to avoid compile-time evaluation of an expression.
+id(I) -> I.
diff --git a/lib/compiler/test/receive_SUITE.erl b/lib/compiler/test/receive_SUITE.erl
index ec49267ded..00a6e900d4 100644
--- a/lib/compiler/test/receive_SUITE.erl
+++ b/lib/compiler/test/receive_SUITE.erl
@@ -257,6 +257,7 @@ wait(Config) when is_list(Config) ->
self() ! <<42>>,
<<42>> = wait_1(r, 1, 2),
{1,2,3} = wait_1(1, 2, 3),
+ {'EXIT',{timeout_value,_}} = (catch receive after [] -> timeout end),
ok.
wait_1(r, _, _) ->
diff --git a/lib/compiler/test/record_SUITE.erl b/lib/compiler/test/record_SUITE.erl
index c9f5a2053e..f736e14bf6 100644
--- a/lib/compiler/test/record_SUITE.erl
+++ b/lib/compiler/test/record_SUITE.erl
@@ -369,6 +369,14 @@ record_test_3(Config) when is_list(Config) ->
?line false = is_record(id(#barf{}), id(barf), id(42)),
?line false = is_record(id(#barf{}), id(foo), id(6)),
+ Rec = id(#barf{}),
+ Good = id(barf),
+ Bad = id(foo),
+ Size = id(6),
+
+ true = is_record(Rec, Good, Size) orelse error,
+ error = is_record(Rec, Bad, Size) orelse error,
+
ok.
record_access_in_guards(Config) when is_list(Config) ->
diff --git a/lib/compiler/test/warnings_SUITE.erl b/lib/compiler/test/warnings_SUITE.erl
index 810b2b48c9..ad4ad91f74 100644
--- a/lib/compiler/test/warnings_SUITE.erl
+++ b/lib/compiler/test/warnings_SUITE.erl
@@ -37,7 +37,9 @@
-export([pattern/1,pattern2/1,pattern3/1,pattern4/1,
guard/1,bad_arith/1,bool_cases/1,bad_apply/1,
- files/1,effect/1,bin_opt_info/1,bin_construction/1, comprehensions/1]).
+ files/1,effect/1,bin_opt_info/1,bin_construction/1,
+ comprehensions/1,maps/1,redundant_boolean_clauses/1,
+ latin1_fallback/1]).
% Default timetrap timeout (set in init_per_testcase).
-define(default_timeout, ?t:minutes(2)).
@@ -61,7 +63,8 @@ groups() ->
[{p,test_lib:parallel(),
[pattern,pattern2,pattern3,pattern4,guard,
bad_arith,bool_cases,bad_apply,files,effect,
- bin_opt_info,bin_construction,comprehensions]}].
+ bin_opt_info,bin_construction,comprehensions,maps,
+ redundant_boolean_clauses,latin1_fallback]}].
init_per_suite(Config) ->
Config.
@@ -117,6 +120,7 @@ pattern2(Config) when is_list(Config) ->
Source,
[nowarn_unused_vars],
{warnings,[{2,sys_core_fold,{nomatch_shadow,1}},
+ {4,sys_core_fold,no_clause_match},
{5,sys_core_fold,nomatch_clause_type},
{6,sys_core_fold,nomatch_clause_type}]}}],
?line [] = run(Config, Ts),
@@ -199,6 +203,8 @@ pattern4(Config) when is_list(Config) ->
[nowarn_unused_vars],
{warnings,
[{9,sys_core_fold,no_clause_match},
+ {11,sys_core_fold,nomatch_shadow},
+ {15,sys_core_fold,nomatch_shadow},
{18,sys_core_fold,no_clause_match},
{23,sys_core_fold,no_clause_match},
{33,sys_core_fold,no_clause_match}
@@ -389,6 +395,10 @@ effect(Config) when is_list(Config) ->
<<X:8>>;
unused_fun ->
fun() -> {ok,X} end;
+ unused_named_fun ->
+ fun F(0) -> 1;
+ F(N) -> N*F(N-1)
+ end;
unused_atom ->
ignore; %no warning
unused_nil ->
@@ -483,8 +493,9 @@ effect(Config) when is_list(Config) ->
{22,sys_core_fold,{no_effect,{erlang,is_integer,1}}},
{24,sys_core_fold,useless_building},
{26,sys_core_fold,useless_building},
- {32,sys_core_fold,{no_effect,{erlang,'=:=',2}}},
- {34,sys_core_fold,{no_effect,{erlang,get_cookie,0}}}]}}],
+ {28,sys_core_fold,useless_building},
+ {36,sys_core_fold,{no_effect,{erlang,'=:=',2}}},
+ {38,sys_core_fold,{no_effect,{erlang,get_cookie,0}}}]}}],
?line [] = run(Config, Ts),
ok.
@@ -546,6 +557,113 @@ comprehensions(Config) when is_list(Config) ->
run(Config, Ts),
ok.
+maps(Config) when is_list(Config) ->
+ Ts = [{bad_map,
+ <<"
+ t() ->
+ case maybe_map of
+ #{} -> ok;
+ not_map -> error
+ end.
+ x() ->
+ case true of
+ #{} -> error;
+ true -> ok
+ end.
+ ">>,
+ [],
+ {warnings,[{3,sys_core_fold,no_clause_match},
+ {9,sys_core_fold,nomatch_clause_type}]}},
+ {bad_map_src1,
+ <<"
+ t() ->
+ M = {a,[]},
+ {'EXIT',{badarg,_}} = (catch(M#{ a => 1})),
+ ok.
+ ">>,
+ [],
+ {warnings,[{4,v3_kernel,bad_map}]}},
+ {bad_map_src2,
+ <<"
+ t() ->
+ M = id({a,[]}),
+ {'EXIT',{badarg,_}} = (catch(M#{ a => 1})),
+ ok.
+ id(I) -> I.
+ ">>,
+ [inline],
+ {warnings,[{4,v3_kernel,bad_map}]}},
+ {bad_map_src3,
+ <<"
+ t() ->
+ {'EXIT',{badarg,_}} = (catch <<>>#{ a := 1}),
+ ok.
+ ">>,
+ [],
+ {warnings,[{3,v3_core,bad_map}]}},
+ {bad_map_literal_key,
+ <<"
+ t() ->
+ V = id(1),
+ M = id(#{ <<$h,$i>> => V }),
+ V = case M of
+ #{ <<0:257>> := Val } -> Val;
+ #{ <<$h,$i>> := Val } -> Val
+ end,
+ ok.
+ id(I) -> I.
+ ">>,
+ [],
+ {warnings,[{6,v3_core,nomatch}]}}],
+ run(Config, Ts),
+ ok.
+
+redundant_boolean_clauses(Config) when is_list(Config) ->
+ Ts = [{redundant_boolean_clauses,
+ <<"
+ t(X) ->
+ case X == 0 of
+ false -> no;
+ false -> no;
+ true -> yes
+ end.
+ ">>,
+ [],
+ {warnings,[{5,sys_core_fold,nomatch_shadow}]}}],
+ run(Config, Ts),
+ ok.
+
+latin1_fallback(Conf) when is_list(Conf) ->
+ DataDir = ?privdir,
+ IncFile = filename:join(DataDir, "include_me.hrl"),
+ file:write_file(IncFile, <<"%% ",246," in include file\n">>),
+ Ts1 = [{latin1_fallback1,
+ %% Test that the compiler fall backs to latin-1 with
+ %% a warning if a file has no encoding and does not
+ %% contain correct UTF-8 sequences.
+ <<"%% Bj",246,"rn
+ t(_) -> \"",246,"\";
+ t(x) -> ok.
+ ">>,
+ [],
+ {warnings,[{1,compile,reparsing_invalid_unicode},
+ {3,sys_core_fold,{nomatch_shadow,2}}]}}],
+ [] = run(Conf, Ts1),
+
+ Ts2 = [{latin1_fallback2,
+ %% Test that the compiler fall backs to latin-1 with
+ %% a warning if a file has no encoding and does not
+ %% contain correct UTF-8 sequences.
+ <<"
+
+ -include(\"include_me.hrl\").
+ ">>,
+ [],
+ {warnings,[{1,compile,reparsing_invalid_unicode}]}
+ }],
+ [] = run(Conf, Ts2),
+ ok.
+
%%%
%%% End of test cases.
%%%
diff --git a/lib/compiler/vsn.mk b/lib/compiler/vsn.mk
index cbdf57f177..c0c3d56472 100644
--- a/lib/compiler/vsn.mk
+++ b/lib/compiler/vsn.mk
@@ -1 +1 @@
-COMPILER_VSN = 4.9.4
+COMPILER_VSN = 5.0
diff --git a/lib/cosEvent/doc/src/notes.xml b/lib/cosEvent/doc/src/notes.xml
index df05f5634e..8f519447fc 100644
--- a/lib/cosEvent/doc/src/notes.xml
+++ b/lib/cosEvent/doc/src/notes.xml
@@ -32,7 +32,23 @@
<file>notes.xml</file>
</header>
- <section><title>cosEvent 2.1.14</title>
+ <section><title>cosEvent 2.1.15</title>
+
+ <section><title>Improvements and New Features</title>
+ <list>
+ <item>
+ <p> The default encoding of Erlang files has been changed
+ from ISO-8859-1 to UTF-8. </p> <p> The encoding of XML
+ files has also been changed to UTF-8. </p>
+ <p>
+ Own Id: OTP-10907</p>
+ </item>
+ </list>
+ </section>
+
+</section>
+
+<section><title>cosEvent 2.1.14</title>
<section><title>Improvements and New Features</title>
<list>
diff --git a/lib/cosEvent/src/cosEvent.app.src b/lib/cosEvent/src/cosEvent.app.src
index c1cb9e0cc9..66b0d2e168 100644
--- a/lib/cosEvent/src/cosEvent.app.src
+++ b/lib/cosEvent/src/cosEvent.app.src
@@ -38,7 +38,8 @@
{registered, []},
{applications, [orber, stdlib, kernel]},
{env, []},
- {mod, {cosEventApp, []}}
+ {mod, {cosEventApp, []}},
+ {runtime_dependencies, ["stdlib-2.0","orber-3.6.27","kernel-3.0","erts-6.0"]}
]}.
diff --git a/lib/cosEvent/vsn.mk b/lib/cosEvent/vsn.mk
index 6745bee079..40bf1ba49d 100644
--- a/lib/cosEvent/vsn.mk
+++ b/lib/cosEvent/vsn.mk
@@ -1,3 +1,3 @@
-COSEVENT_VSN = 2.1.14
+COSEVENT_VSN = 2.1.15
diff --git a/lib/cosEventDomain/doc/src/notes.xml b/lib/cosEventDomain/doc/src/notes.xml
index f88d101a69..2c3bf16411 100644
--- a/lib/cosEventDomain/doc/src/notes.xml
+++ b/lib/cosEventDomain/doc/src/notes.xml
@@ -31,7 +31,23 @@
<file>notes.xml</file>
</header>
- <section><title>cosEventDomain 1.1.13</title>
+ <section><title>cosEventDomain 1.1.14</title>
+
+ <section><title>Improvements and New Features</title>
+ <list>
+ <item>
+ <p> The default encoding of Erlang files has been changed
+ from ISO-8859-1 to UTF-8. </p> <p> The encoding of XML
+ files has also been changed to UTF-8. </p>
+ <p>
+ Own Id: OTP-10907</p>
+ </item>
+ </list>
+ </section>
+
+</section>
+
+<section><title>cosEventDomain 1.1.13</title>
<section><title>Improvements and New Features</title>
<list>
diff --git a/lib/cosEventDomain/src/cosEventDomain.app.src b/lib/cosEventDomain/src/cosEventDomain.app.src
index e4307e1f99..60114b6a91 100644
--- a/lib/cosEventDomain/src/cosEventDomain.app.src
+++ b/lib/cosEventDomain/src/cosEventDomain.app.src
@@ -27,5 +27,7 @@
{registered, []},
{applications, [orber, stdlib, kernel]},
{env, []},
- {mod, {cosEventDomainApp, []}}
+ {mod, {cosEventDomainApp, []}},
+ {runtime_dependencies, ["stdlib-2.0","orber-3.6.27","kernel-3.0","erts-6.0",
+ "cosNotification-1.1.21"]}
]}.
diff --git a/lib/cosEventDomain/vsn.mk b/lib/cosEventDomain/vsn.mk
index e9cf92395a..6317ed3c22 100644
--- a/lib/cosEventDomain/vsn.mk
+++ b/lib/cosEventDomain/vsn.mk
@@ -1,3 +1,3 @@
-COSEVENTDOMAIN_VSN = 1.1.13
+COSEVENTDOMAIN_VSN = 1.1.14
diff --git a/lib/cosFileTransfer/doc/src/notes.xml b/lib/cosFileTransfer/doc/src/notes.xml
index 5cca5e307b..1d0c826d40 100644
--- a/lib/cosFileTransfer/doc/src/notes.xml
+++ b/lib/cosFileTransfer/doc/src/notes.xml
@@ -30,7 +30,23 @@
<file>notes.xml</file>
</header>
- <section><title>cosFileTransfer 1.1.15</title>
+ <section><title>cosFileTransfer 1.1.16</title>
+
+ <section><title>Improvements and New Features</title>
+ <list>
+ <item>
+ <p> The default encoding of Erlang files has been changed
+ from ISO-8859-1 to UTF-8. </p> <p> The encoding of XML
+ files has also been changed to UTF-8. </p>
+ <p>
+ Own Id: OTP-10907</p>
+ </item>
+ </list>
+ </section>
+
+</section>
+
+<section><title>cosFileTransfer 1.1.15</title>
<section><title>Improvements and New Features</title>
<list>
diff --git a/lib/cosFileTransfer/src/cosFileTransfer.app.src b/lib/cosFileTransfer/src/cosFileTransfer.app.src
index 31d94b6f0d..21226b0c6b 100644
--- a/lib/cosFileTransfer/src/cosFileTransfer.app.src
+++ b/lib/cosFileTransfer/src/cosFileTransfer.app.src
@@ -36,6 +36,8 @@
{registered, []},
{applications, [orber, stdlib, kernel]},
{env, []},
- {mod, {cosFileTransferApp, []}}
+ {mod, {cosFileTransferApp, []}},
+ {runtime_dependencies, ["stdlib-2.0","ssl-5.3.4","orber-3.6.27","kernel-3.0",
+ "inets-5.10","erts-6.0","cosProperty-1.1.17"]}
]}.
diff --git a/lib/cosFileTransfer/vsn.mk b/lib/cosFileTransfer/vsn.mk
index cf33926334..f52a1bd800 100644
--- a/lib/cosFileTransfer/vsn.mk
+++ b/lib/cosFileTransfer/vsn.mk
@@ -1 +1 @@
-COSFILETRANSFER_VSN = 1.1.15
+COSFILETRANSFER_VSN = 1.1.16
diff --git a/lib/cosNotification/doc/src/notes.xml b/lib/cosNotification/doc/src/notes.xml
index b700e0984c..2e4f922142 100644
--- a/lib/cosNotification/doc/src/notes.xml
+++ b/lib/cosNotification/doc/src/notes.xml
@@ -31,7 +31,23 @@
<file>notes.xml</file>
</header>
- <section><title>cosNotification 1.1.20</title>
+ <section><title>cosNotification 1.1.21</title>
+
+ <section><title>Improvements and New Features</title>
+ <list>
+ <item>
+ <p> The default encoding of Erlang files has been changed
+ from ISO-8859-1 to UTF-8. </p> <p> The encoding of XML
+ files has also been changed to UTF-8. </p>
+ <p>
+ Own Id: OTP-10907</p>
+ </item>
+ </list>
+ </section>
+
+</section>
+
+<section><title>cosNotification 1.1.20</title>
<section><title>Improvements and New Features</title>
<list>
diff --git a/lib/cosNotification/src/cosNotification.app.src b/lib/cosNotification/src/cosNotification.app.src
index 04beac36e8..ad02eb4421 100644
--- a/lib/cosNotification/src/cosNotification.app.src
+++ b/lib/cosNotification/src/cosNotification.app.src
@@ -116,5 +116,7 @@
{registered, [cosNotificationSup, oe_cosNotificationFactory]},
{applications, [orber, stdlib, kernel]},
{env, []},
- {mod, {cosNotificationApp, []}}
+ {mod, {cosNotificationApp, []}},
+ {runtime_dependencies, ["stdlib-2.0","orber-3.6.27","kernel-3.0","erts-6.0",
+ "cosTime-1.1.14","cosEvent-2.1.15"]}
]}.
diff --git a/lib/cosNotification/vsn.mk b/lib/cosNotification/vsn.mk
index ea59800164..28d6ec71bf 100644
--- a/lib/cosNotification/vsn.mk
+++ b/lib/cosNotification/vsn.mk
@@ -1,2 +1,2 @@
-COSNOTIFICATION_VSN = 1.1.20
+COSNOTIFICATION_VSN = 1.1.21
diff --git a/lib/cosProperty/doc/src/notes.xml b/lib/cosProperty/doc/src/notes.xml
index 22b1a73d29..739f41617f 100644
--- a/lib/cosProperty/doc/src/notes.xml
+++ b/lib/cosProperty/doc/src/notes.xml
@@ -31,7 +31,23 @@
<file>notes.xml</file>
</header>
- <section><title>cosProperty 1.1.16</title>
+ <section><title>cosProperty 1.1.17</title>
+
+ <section><title>Improvements and New Features</title>
+ <list>
+ <item>
+ <p> The default encoding of Erlang files has been changed
+ from ISO-8859-1 to UTF-8. </p> <p> The encoding of XML
+ files has also been changed to UTF-8. </p>
+ <p>
+ Own Id: OTP-10907</p>
+ </item>
+ </list>
+ </section>
+
+</section>
+
+<section><title>cosProperty 1.1.16</title>
<section><title>Improvements and New Features</title>
<list>
diff --git a/lib/cosProperty/src/cosProperty.app.src b/lib/cosProperty/src/cosProperty.app.src
index 3099e904f7..b977bb5984 100644
--- a/lib/cosProperty/src/cosProperty.app.src
+++ b/lib/cosProperty/src/cosProperty.app.src
@@ -41,5 +41,7 @@
{registered, [oe_cosPropertySup]},
{applications, [orber, stdlib, kernel]},
{env, []},
- {mod, {cosProperty, []}}
+ {mod, {cosProperty, []}},
+ {runtime_dependencies, ["stdlib-2.0","orber-3.6.27","mnesia-4.12",
+ "kernel-3.0","erts-6.0"]}
]}.
diff --git a/lib/cosProperty/vsn.mk b/lib/cosProperty/vsn.mk
index ac7820216e..0f546a2da8 100644
--- a/lib/cosProperty/vsn.mk
+++ b/lib/cosProperty/vsn.mk
@@ -1,2 +1,2 @@
-COSPROPERTY_VSN = 1.1.16
+COSPROPERTY_VSN = 1.1.17
diff --git a/lib/cosTime/doc/src/notes.xml b/lib/cosTime/doc/src/notes.xml
index c1d000a5ff..f218f19a6b 100644
--- a/lib/cosTime/doc/src/notes.xml
+++ b/lib/cosTime/doc/src/notes.xml
@@ -32,7 +32,23 @@
<file>notes.xml</file>
</header>
- <section><title>cosTime 1.1.13</title>
+ <section><title>cosTime 1.1.14</title>
+
+ <section><title>Improvements and New Features</title>
+ <list>
+ <item>
+ <p> The default encoding of Erlang files has been changed
+ from ISO-8859-1 to UTF-8. </p> <p> The encoding of XML
+ files has also been changed to UTF-8. </p>
+ <p>
+ Own Id: OTP-10907</p>
+ </item>
+ </list>
+ </section>
+
+</section>
+
+<section><title>cosTime 1.1.13</title>
<section><title>Improvements and New Features</title>
<list>
diff --git a/lib/cosTime/src/cosTime.app.src b/lib/cosTime/src/cosTime.app.src
index 191ee5f3db..cd01de35cb 100644
--- a/lib/cosTime/src/cosTime.app.src
+++ b/lib/cosTime/src/cosTime.app.src
@@ -26,5 +26,7 @@
{registered, [oe_cosTimeSup, oe_cosTimerEventService]},
{applications, [orber, stdlib, kernel]},
{env, []},
- {mod, {cosTime, []}}
+ {mod, {cosTime, []}},
+ {runtime_dependencies, ["stdlib-2.0","orber-3.6.27","kernel-3.0","erts-6.0",
+ "cosEvent-2.1.15"]}
]}.
diff --git a/lib/cosTime/vsn.mk b/lib/cosTime/vsn.mk
index 02cd669222..9e9e5c0250 100644
--- a/lib/cosTime/vsn.mk
+++ b/lib/cosTime/vsn.mk
@@ -1,2 +1,3 @@
-COSTIME_VSN = 1.1.13
+COSTIME_VSN = 1.1.14
+
diff --git a/lib/cosTransactions/doc/src/notes.xml b/lib/cosTransactions/doc/src/notes.xml
index eab402aee8..4b20f23efb 100644
--- a/lib/cosTransactions/doc/src/notes.xml
+++ b/lib/cosTransactions/doc/src/notes.xml
@@ -32,7 +32,23 @@
<file>notes.xml</file>
</header>
- <section><title>cosTransactions 1.2.13</title>
+ <section><title>cosTransactions 1.2.14</title>
+
+ <section><title>Improvements and New Features</title>
+ <list>
+ <item>
+ <p> The default encoding of Erlang files has been changed
+ from ISO-8859-1 to UTF-8. </p> <p> The encoding of XML
+ files has also been changed to UTF-8. </p>
+ <p>
+ Own Id: OTP-10907</p>
+ </item>
+ </list>
+ </section>
+
+</section>
+
+<section><title>cosTransactions 1.2.13</title>
<section><title>Improvements and New Features</title>
<list>
diff --git a/lib/cosTransactions/src/cosTransactions.app.src b/lib/cosTransactions/src/cosTransactions.app.src
index 52769b1711..6b99915ad6 100644
--- a/lib/cosTransactions/src/cosTransactions.app.src
+++ b/lib/cosTransactions/src/cosTransactions.app.src
@@ -39,5 +39,6 @@
{registered, [cosTransactions_sup, oe_cosTransactionsFactory]},
{applications, [orber, stdlib, kernel]},
{env, []},
- {mod, {cosTransactions, []}}
+ {mod, {cosTransactions, []}},
+ {runtime_dependencies, ["stdlib-2.0","orber-3.6.27","kernel-3.0","erts-6.0"]}
]}.
diff --git a/lib/cosTransactions/vsn.mk b/lib/cosTransactions/vsn.mk
index 5414270a3d..7aed212523 100644
--- a/lib/cosTransactions/vsn.mk
+++ b/lib/cosTransactions/vsn.mk
@@ -1 +1 @@
-COSTRANSACTIONS_VSN = 1.2.13
+COSTRANSACTIONS_VSN = 1.2.14
diff --git a/lib/crypto/Makefile b/lib/crypto/Makefile
index 2adcfd7f31..e893c914e6 100644
--- a/lib/crypto/Makefile
+++ b/lib/crypto/Makefile
@@ -23,7 +23,11 @@ include $(ERL_TOP)/make/$(TARGET)/otp.mk
# Macros
#
+ifneq ($(findstring ose,$(TARGET)),ose)
SUB_DIRECTORIES = src c_src doc/src
+else
+SUB_DIRECTORIES = src doc/src
+endif
static_lib: SUB_DIRECTORIES = c_src
include vsn.mk
diff --git a/lib/crypto/c_src/Makefile.in b/lib/crypto/c_src/Makefile.in
index 124d088056..8c92b5ba1b 100644
--- a/lib/crypto/c_src/Makefile.in
+++ b/lib/crypto/c_src/Makefile.in
@@ -126,7 +126,12 @@ ALL_STATIC_CFLAGS = $(DED_STATIC_CFLAGS) $(INCLUDES)
_create_dirs := $(shell mkdir -p $(OBJDIR) $(LIBDIR))
+ifneq ($(findstring ose,$(TARGET)),ose)
debug opt valgrind: $(NIF_LIB) $(CALLBACK_LIB)
+else
+# Do not build dynamic files on OSE
+debug opt valgrind:
+endif
static_lib: $(NIF_ARCHIVE)
@@ -197,12 +202,14 @@ release_spec: opt
$(INSTALL_DIR) "$(RELSYSDIR)/priv/obj"
$(INSTALL_DIR) "$(RELSYSDIR)/priv/lib"
$(INSTALL_DATA) $(NIF_MAKEFILE) "$(RELSYSDIR)/priv/obj"
+ifneq ($(findstring ose,$(TARGET)),ose)
$(INSTALL_PROGRAM) $(CRYPTO_OBJS) "$(RELSYSDIR)/priv/obj"
$(INSTALL_PROGRAM) $(NIF_LIB) "$(RELSYSDIR)/priv/lib"
ifeq ($(DYNAMIC_CRYPTO_LIB),yes)
$(INSTALL_PROGRAM) $(CALLBACK_OBJS) "$(RELSYSDIR)/priv/obj"
$(INSTALL_PROGRAM) $(CALLBACK_LIB) "$(RELSYSDIR)/priv/lib"
endif
+endif
release_docs_spec:
diff --git a/lib/crypto/c_src/crypto.c b/lib/crypto/c_src/crypto.c
index 7567a08894..6642183cb8 100644
--- a/lib/crypto/c_src/crypto.c
+++ b/lib/crypto/c_src/crypto.c
@@ -1,7 +1,7 @@
/*
* %CopyrightBegin%
*
- * Copyright Ericsson AB 2010-2013. All Rights Reserved.
+ * Copyright Ericsson AB 2010-2014. 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
@@ -215,6 +215,7 @@ static ERL_NIF_TERM des_cfb_crypt(ErlNifEnv* env, int argc, const ERL_NIF_TERM a
static ERL_NIF_TERM des_ecb_crypt(ErlNifEnv* env, int argc, const ERL_NIF_TERM argv[]);
static ERL_NIF_TERM des_ede3_cbc_crypt(ErlNifEnv* env, int argc, const ERL_NIF_TERM argv[]);
static ERL_NIF_TERM des_ede3_cfb_crypt_nif(ErlNifEnv* env, int argc, const ERL_NIF_TERM argv[]);
+static ERL_NIF_TERM aes_cfb_8_crypt(ErlNifEnv* env, int argc, const ERL_NIF_TERM argv[]);
static ERL_NIF_TERM aes_cfb_128_crypt(ErlNifEnv* env, int argc, const ERL_NIF_TERM argv[]);
static ERL_NIF_TERM aes_ctr_encrypt(ErlNifEnv* env, int argc, const ERL_NIF_TERM argv[]);
static ERL_NIF_TERM aes_ctr_stream_encrypt(ErlNifEnv* env, int argc, const ERL_NIF_TERM argv[]);
@@ -254,6 +255,8 @@ static ERL_NIF_TERM ecdsa_sign_nif(ErlNifEnv* env, int argc, const ERL_NIF_TERM
static ERL_NIF_TERM ecdsa_verify_nif(ErlNifEnv* env, int argc, const ERL_NIF_TERM argv[]);
static ERL_NIF_TERM ecdh_compute_key_nif(ErlNifEnv* env, int argc, const ERL_NIF_TERM argv[]);
+static ERL_NIF_TERM rand_seed_nif(ErlNifEnv* env, int argc, const ERL_NIF_TERM argv[]);
+
/* helpers */
static void init_algorithms_types(ErlNifEnv*);
@@ -342,6 +345,7 @@ static ErlNifFunc nif_funcs[] = {
{"des_ecb_crypt", 3, des_ecb_crypt},
{"des_ede3_cbc_crypt", 6, des_ede3_cbc_crypt},
{"des_ede3_cfb_crypt_nif", 6, des_ede3_cfb_crypt_nif},
+ {"aes_cfb_8_crypt", 4, aes_cfb_8_crypt},
{"aes_cfb_128_crypt", 4, aes_cfb_128_crypt},
{"aes_ctr_encrypt", 3, aes_ctr_encrypt},
{"aes_ctr_decrypt", 3, aes_ctr_encrypt},
@@ -381,103 +385,11 @@ static ErlNifFunc nif_funcs[] = {
{"ec_key_generate", 1, ec_key_generate},
{"ecdsa_sign_nif", 4, ecdsa_sign_nif},
{"ecdsa_verify_nif", 5, ecdsa_verify_nif},
- {"ecdh_compute_key_nif", 3, ecdh_compute_key_nif}
-};
-
-#if defined(HAVE_EC)
-struct nid_map {
- char *name;
- int nid;
- ERL_NIF_TERM atom;
-};
+ {"ecdh_compute_key_nif", 3, ecdh_compute_key_nif},
-static struct nid_map ec_curves[] = {
- /* prime field curves */
- /* secg curves */
- { "secp112r1", NID_secp112r1 },
- { "secp112r2", NID_secp112r2 },
- { "secp128r1", NID_secp128r1 },
- { "secp128r2", NID_secp128r2 },
- { "secp160k1", NID_secp160k1 },
- { "secp160r1", NID_secp160r1 },
- { "secp160r2", NID_secp160r2 },
- /* SECG secp192r1 is the same as X9.62 prime192v1 */
- { "secp192r1", NID_X9_62_prime192v1 },
- { "secp192k1", NID_secp192k1 },
- { "secp224k1", NID_secp224k1 },
- { "secp224r1", NID_secp224r1 },
- { "secp256k1", NID_secp256k1 },
- /* SECG secp256r1 is the same as X9.62 prime256v1 */
- { "secp256r1", NID_X9_62_prime256v1 },
- { "secp384r1", NID_secp384r1 },
- { "secp521r1", NID_secp521r1 },
- /* X9.62 curves */
- { "prime192v1", NID_X9_62_prime192v1 },
- { "prime192v2", NID_X9_62_prime192v2 },
- { "prime192v3", NID_X9_62_prime192v3 },
- { "prime239v1", NID_X9_62_prime239v1 },
- { "prime239v2", NID_X9_62_prime239v2 },
- { "prime239v3", NID_X9_62_prime239v3 },
- { "prime256v1", NID_X9_62_prime256v1 },
- /* characteristic two field curves */
- /* NIST/SECG curves */
- { "sect113r1", NID_sect113r1 },
- { "sect113r2", NID_sect113r2 },
- { "sect131r1", NID_sect131r1 },
- { "sect131r2", NID_sect131r2 },
- { "sect163k1", NID_sect163k1 },
- { "sect163r1", NID_sect163r1 },
- { "sect163r2", NID_sect163r2 },
- { "sect193r1", NID_sect193r1 },
- { "sect193r2", NID_sect193r2 },
- { "sect233k1", NID_sect233k1 },
- { "sect233r1", NID_sect233r1 },
- { "sect239k1", NID_sect239k1 },
- { "sect283k1", NID_sect283k1 },
- { "sect283r1", NID_sect283r1 },
- { "sect409k1", NID_sect409k1 },
- { "sect409r1", NID_sect409r1 },
- { "sect571k1", NID_sect571k1 },
- { "sect571r1", NID_sect571r1 },
- /* X9.62 curves */
- { "c2pnb163v1", NID_X9_62_c2pnb163v1 },
- { "c2pnb163v2", NID_X9_62_c2pnb163v2 },
- { "c2pnb163v3", NID_X9_62_c2pnb163v3 },
- { "c2pnb176v1", NID_X9_62_c2pnb176v1 },
- { "c2tnb191v1", NID_X9_62_c2tnb191v1 },
- { "c2tnb191v2", NID_X9_62_c2tnb191v2 },
- { "c2tnb191v3", NID_X9_62_c2tnb191v3 },
- { "c2pnb208w1", NID_X9_62_c2pnb208w1 },
- { "c2tnb239v1", NID_X9_62_c2tnb239v1 },
- { "c2tnb239v2", NID_X9_62_c2tnb239v2 },
- { "c2tnb239v3", NID_X9_62_c2tnb239v3 },
- { "c2pnb272w1", NID_X9_62_c2pnb272w1 },
- { "c2pnb304w1", NID_X9_62_c2pnb304w1 },
- { "c2tnb359v1", NID_X9_62_c2tnb359v1 },
- { "c2pnb368w1", NID_X9_62_c2pnb368w1 },
- { "c2tnb431r1", NID_X9_62_c2tnb431r1 },
- /* the WAP/WTLS curves
- * [unlike SECG, spec has its own OIDs for curves from X9.62] */
- { "wtls1", NID_wap_wsg_idm_ecid_wtls1 },
- { "wtls3", NID_wap_wsg_idm_ecid_wtls3 },
- { "wtls4", NID_wap_wsg_idm_ecid_wtls4 },
- { "wtls5", NID_wap_wsg_idm_ecid_wtls5 },
- { "wtls6", NID_wap_wsg_idm_ecid_wtls6 },
- { "wtls7", NID_wap_wsg_idm_ecid_wtls7 },
- { "wtls8", NID_wap_wsg_idm_ecid_wtls8 },
- { "wtls9", NID_wap_wsg_idm_ecid_wtls9 },
- { "wtls10", NID_wap_wsg_idm_ecid_wtls10 },
- { "wtls11", NID_wap_wsg_idm_ecid_wtls11 },
- { "wtls12", NID_wap_wsg_idm_ecid_wtls12 },
- /* IPSec curves */
- { "ipsec3", NID_ipsec3 },
- { "ipsec4", NID_ipsec4 }
+ {"rand_seed_nif", 1, rand_seed_nif}
};
-#define EC_CURVES_CNT (sizeof(ec_curves)/sizeof(struct nid_map))
-
-#endif /* HAVE_EC */
-
ERL_NIF_INIT(crypto,nif_funcs,load,NULL,upgrade,unload)
@@ -538,6 +450,15 @@ static ERL_NIF_TERM atom_ppbasis;
static ERL_NIF_TERM atom_onbasis;
#endif
+static ErlNifResourceType* hmac_context_rtype;
+struct hmac_context
+{
+ ErlNifMutex* mtx;
+ int alive;
+ HMAC_CTX ctx;
+};
+static void hmac_context_dtor(ErlNifEnv* env, struct hmac_context*);
+
/*
#define PRINTF_ERR0(FMT) enif_fprintf(stderr, FMT "\n")
#define PRINTF_ERR1(FMT, A1) enif_fprintf(stderr, FMT "\n", A1)
@@ -545,6 +466,46 @@ static ERL_NIF_TERM atom_onbasis;
#define PRINTF_ERR0(FMT)
#define PRINTF_ERR1(FMT,A1)
+#ifdef __OSE__
+
+/* For crypto on OSE we have to initialize the crypto library on each
+ process that uses it. So since we do not know which scheduler is going
+ to execute the nif we have to check before each nif call that we have
+ initialized crypto in that process. */
+
+#include "ose.h"
+#include "openssl/osessl.h"
+
+static ErlNifTSDKey crypto_init_key;
+static int check_ose_crypto(void);
+static int init_ose_crypto(void);
+
+static int check_ose_crypto() {
+ int key = (int)enif_tsd_get(crypto_init_key);
+ if (!key) {
+ if (!CRYPTO_OSE5_init()) {
+ PRINTF_ERR0("CRYPTO: Call to CRYPTO_OSE5_init failed");
+ return 0;
+ }
+ enif_tsd_set(crypto_init_key,1);
+ }
+ return 1;
+}
+
+static int init_ose_crypto() {
+ /* Crypto nif upgrade does not work on OSE so no need to
+ destroy this key */
+ enif_tsd_key_create("crypto_init_key", &crypto_init_key);
+ return check_ose_crypto();
+}
+
+#define INIT_OSE_CRYPTO() init_ose_crypto()
+#define CHECK_OSE_CRYPTO() check_ose_crypto()
+#else
+#define INIT_OSE_CRYPTO() 1
+#define CHECK_OSE_CRYPTO()
+#endif
+
#ifdef HAVE_DYNAMIC_CRYPTO_LIB
static int change_basename(ErlNifBinary* bin, char* buf, int bufsz, const char* newfile)
{
@@ -581,6 +542,9 @@ static int init(ErlNifEnv* env, ERL_NIF_TERM load_info)
ErlNifBinary lib_bin;
char lib_buf[1000];
+ if (!INIT_OSE_CRYPTO())
+ return 0;
+
/* load_info: {301, <<"/full/path/of/this/library">>} */
if (!enif_get_tuple(env, load_info, &tpl_arity, &tpl_array)
|| tpl_arity != 2
@@ -592,6 +556,15 @@ static int init(ErlNifEnv* env, ERL_NIF_TERM load_info)
return 0;
}
+ hmac_context_rtype = enif_open_resource_type(env, NULL, "hmac_context",
+ (ErlNifResourceDtor*) hmac_context_dtor,
+ ERL_NIF_RT_CREATE|ERL_NIF_RT_TAKEOVER,
+ NULL);
+ if (!hmac_context_rtype) {
+ PRINTF_ERR0("CRYPTO: Could not open resource type 'hmac_context'");
+ return 0;
+ }
+
if (library_refc > 0) {
/* Repeated loading of this library (module upgrade).
* Atoms and callbacks are already set, we are done.
@@ -632,12 +605,6 @@ static int init(ErlNifEnv* env, ERL_NIF_TERM load_info)
atom_tpbasis = enif_make_atom(env,"tpbasis");
atom_ppbasis = enif_make_atom(env,"ppbasis");
atom_onbasis = enif_make_atom(env,"onbasis");
-
- {
- int i;
- for (i = 0; i < EC_CURVES_CNT; i++)
- ec_curves[i].atom = enif_make_atom(env,ec_curves[i].name);
- }
#endif
init_digest_types(env);
@@ -725,7 +692,7 @@ static void unload(ErlNifEnv* env, void* priv_data)
static int algo_hash_cnt;
static ERL_NIF_TERM algo_hash[8]; /* increase when extending the list */
static int algo_pubkey_cnt;
-static ERL_NIF_TERM algo_pubkey[2]; /* increase when extending the list */
+static ERL_NIF_TERM algo_pubkey[3]; /* increase when extending the list */
static int algo_cipher_cnt;
static ERL_NIF_TERM algo_cipher[2]; /* increase when extending the list */
@@ -751,6 +718,9 @@ static void init_algorithms_types(ErlNifEnv* env)
algo_pubkey_cnt = 0;
#if defined(HAVE_EC)
+#if !defined(OPENSSL_NO_EC2M)
+ algo_pubkey[algo_pubkey_cnt++] = enif_make_atom(env,"ec_gf2m");
+#endif
algo_pubkey[algo_pubkey_cnt++] = enif_make_atom(env,"ecdsa");
algo_pubkey[algo_pubkey_cnt++] = enif_make_atom(env,"ecdh");
#endif
@@ -807,7 +777,7 @@ static ERL_NIF_TERM md5(ErlNifEnv* env, int argc, const ERL_NIF_TERM argv[])
{/* (Data) */
ErlNifBinary ibin;
ERL_NIF_TERM ret;
-
+ CHECK_OSE_CRYPTO();
if (!enif_inspect_iolist_as_binary(env, argv[0], &ibin)) {
return enif_make_badarg(env);
}
@@ -819,6 +789,7 @@ static ERL_NIF_TERM md5(ErlNifEnv* env, int argc, const ERL_NIF_TERM argv[])
static ERL_NIF_TERM md5_init(ErlNifEnv* env, int argc, const ERL_NIF_TERM argv[])
{/* () */
ERL_NIF_TERM ret;
+ CHECK_OSE_CRYPTO();
MD5_Init((MD5_CTX *) enif_make_new_binary(env, MD5_CTX_LEN, &ret));
return ret;
}
@@ -827,6 +798,7 @@ static ERL_NIF_TERM md5_update(ErlNifEnv* env, int argc, const ERL_NIF_TERM argv
MD5_CTX* new_ctx;
ErlNifBinary ctx_bin, data_bin;
ERL_NIF_TERM ret;
+ CHECK_OSE_CRYPTO();
if (!enif_inspect_binary(env, argv[0], &ctx_bin)
|| ctx_bin.size != MD5_CTX_LEN
|| !enif_inspect_iolist_as_binary(env, argv[1], &data_bin)) {
@@ -843,6 +815,7 @@ static ERL_NIF_TERM md5_final(ErlNifEnv* env, int argc, const ERL_NIF_TERM argv[
ErlNifBinary ctx_bin;
MD5_CTX ctx_clone;
ERL_NIF_TERM ret;
+ CHECK_OSE_CRYPTO();
if (!enif_inspect_binary(env, argv[0], &ctx_bin) || ctx_bin.size != MD5_CTX_LEN) {
return enif_make_badarg(env);
}
@@ -855,7 +828,7 @@ static ERL_NIF_TERM ripemd160(ErlNifEnv* env, int argc, const ERL_NIF_TERM argv[
{/* (Data) */
ErlNifBinary ibin;
ERL_NIF_TERM ret;
-
+ CHECK_OSE_CRYPTO();
if (!enif_inspect_iolist_as_binary(env, argv[0], &ibin)) {
return enif_make_badarg(env);
}
@@ -867,6 +840,7 @@ static ERL_NIF_TERM ripemd160(ErlNifEnv* env, int argc, const ERL_NIF_TERM argv[
static ERL_NIF_TERM ripemd160_init(ErlNifEnv* env, int argc, const ERL_NIF_TERM argv[])
{/* () */
ERL_NIF_TERM ret;
+ CHECK_OSE_CRYPTO();
RIPEMD160_Init((RIPEMD160_CTX *) enif_make_new_binary(env, RIPEMD160_CTX_LEN, &ret));
return ret;
}
@@ -875,6 +849,7 @@ static ERL_NIF_TERM ripemd160_update(ErlNifEnv* env, int argc, const ERL_NIF_TER
RIPEMD160_CTX* new_ctx;
ErlNifBinary ctx_bin, data_bin;
ERL_NIF_TERM ret;
+ CHECK_OSE_CRYPTO();
if (!enif_inspect_binary(env, argv[0], &ctx_bin)
|| ctx_bin.size != RIPEMD160_CTX_LEN
|| !enif_inspect_iolist_as_binary(env, argv[1], &data_bin)) {
@@ -891,6 +866,7 @@ static ERL_NIF_TERM ripemd160_final(ErlNifEnv* env, int argc, const ERL_NIF_TERM
ErlNifBinary ctx_bin;
RIPEMD160_CTX ctx_clone;
ERL_NIF_TERM ret;
+ CHECK_OSE_CRYPTO();
if (!enif_inspect_binary(env, argv[0], &ctx_bin) || ctx_bin.size != RIPEMD160_CTX_LEN) {
return enif_make_badarg(env);
}
@@ -904,7 +880,7 @@ static ERL_NIF_TERM sha(ErlNifEnv* env, int argc, const ERL_NIF_TERM argv[])
{/* (Data) */
ErlNifBinary ibin;
ERL_NIF_TERM ret;
-
+ CHECK_OSE_CRYPTO();
if (!enif_inspect_iolist_as_binary(env, argv[0], &ibin)) {
return enif_make_badarg(env);
}
@@ -916,6 +892,7 @@ static ERL_NIF_TERM sha(ErlNifEnv* env, int argc, const ERL_NIF_TERM argv[])
static ERL_NIF_TERM sha_init(ErlNifEnv* env, int argc, const ERL_NIF_TERM argv[])
{/* () */
ERL_NIF_TERM ret;
+ CHECK_OSE_CRYPTO();
SHA1_Init((SHA_CTX *) enif_make_new_binary(env, SHA_CTX_LEN, &ret));
return ret;
}
@@ -924,6 +901,7 @@ static ERL_NIF_TERM sha_update(ErlNifEnv* env, int argc, const ERL_NIF_TERM argv
SHA_CTX* new_ctx;
ErlNifBinary ctx_bin, data_bin;
ERL_NIF_TERM ret;
+ CHECK_OSE_CRYPTO();
if (!enif_inspect_binary(env, argv[0], &ctx_bin) || ctx_bin.size != SHA_CTX_LEN
|| !enif_inspect_iolist_as_binary(env, argv[1], &data_bin)) {
return enif_make_badarg(env);
@@ -939,6 +917,7 @@ static ERL_NIF_TERM sha_final(ErlNifEnv* env, int argc, const ERL_NIF_TERM argv[
ErlNifBinary ctx_bin;
SHA_CTX ctx_clone;
ERL_NIF_TERM ret;
+ CHECK_OSE_CRYPTO();
if (!enif_inspect_binary(env, argv[0], &ctx_bin) || ctx_bin.size != SHA_CTX_LEN) {
return enif_make_badarg(env);
}
@@ -952,7 +931,7 @@ static ERL_NIF_TERM sha224_nif(ErlNifEnv* env, int argc, const ERL_NIF_TERM argv
#ifdef HAVE_SHA224
ErlNifBinary ibin;
ERL_NIF_TERM ret;
-
+ CHECK_OSE_CRYPTO();
if (!enif_inspect_iolist_as_binary(env, argv[0], &ibin)) {
return enif_make_badarg(env);
}
@@ -968,6 +947,7 @@ static ERL_NIF_TERM sha224_init_nif(ErlNifEnv* env, int argc, const ERL_NIF_TERM
{/* () */
#ifdef HAVE_SHA224
ERL_NIF_TERM ret;
+ CHECK_OSE_CRYPTO();
SHA224_Init((SHA256_CTX *) enif_make_new_binary(env, sizeof(SHA256_CTX), &ret));
return ret;
#else
@@ -980,6 +960,7 @@ static ERL_NIF_TERM sha224_update_nif(ErlNifEnv* env, int argc, const ERL_NIF_TE
SHA256_CTX* new_ctx;
ErlNifBinary ctx_bin, data_bin;
ERL_NIF_TERM ret;
+ CHECK_OSE_CRYPTO();
if (!enif_inspect_binary(env, argv[0], &ctx_bin) || ctx_bin.size != sizeof(SHA256_CTX)
|| !enif_inspect_iolist_as_binary(env, argv[1], &data_bin)) {
return enif_make_badarg(env);
@@ -999,6 +980,7 @@ static ERL_NIF_TERM sha224_final_nif(ErlNifEnv* env, int argc, const ERL_NIF_TER
ErlNifBinary ctx_bin;
SHA256_CTX ctx_clone;
ERL_NIF_TERM ret;
+ CHECK_OSE_CRYPTO();
if (!enif_inspect_binary(env, argv[0], &ctx_bin) || ctx_bin.size != sizeof(SHA256_CTX)) {
return enif_make_badarg(env);
}
@@ -1015,7 +997,7 @@ static ERL_NIF_TERM sha256_nif(ErlNifEnv* env, int argc, const ERL_NIF_TERM argv
#ifdef HAVE_SHA256
ErlNifBinary ibin;
ERL_NIF_TERM ret;
-
+ CHECK_OSE_CRYPTO();
if (!enif_inspect_iolist_as_binary(env, argv[0], &ibin)) {
return enif_make_badarg(env);
}
@@ -1031,6 +1013,7 @@ static ERL_NIF_TERM sha256_init_nif(ErlNifEnv* env, int argc, const ERL_NIF_TERM
{/* () */
#ifdef HAVE_SHA256
ERL_NIF_TERM ret;
+ CHECK_OSE_CRYPTO();
SHA256_Init((SHA256_CTX *) enif_make_new_binary(env, sizeof(SHA256_CTX), &ret));
return ret;
#else
@@ -1043,6 +1026,7 @@ static ERL_NIF_TERM sha256_update_nif(ErlNifEnv* env, int argc, const ERL_NIF_TE
SHA256_CTX* new_ctx;
ErlNifBinary ctx_bin, data_bin;
ERL_NIF_TERM ret;
+ CHECK_OSE_CRYPTO();
if (!enif_inspect_binary(env, argv[0], &ctx_bin) || ctx_bin.size != sizeof(SHA256_CTX)
|| !enif_inspect_iolist_as_binary(env, argv[1], &data_bin)) {
return enif_make_badarg(env);
@@ -1062,6 +1046,7 @@ static ERL_NIF_TERM sha256_final_nif(ErlNifEnv* env, int argc, const ERL_NIF_TER
ErlNifBinary ctx_bin;
SHA256_CTX ctx_clone;
ERL_NIF_TERM ret;
+ CHECK_OSE_CRYPTO();
if (!enif_inspect_binary(env, argv[0], &ctx_bin) || ctx_bin.size != sizeof(SHA256_CTX)) {
return enif_make_badarg(env);
}
@@ -1078,7 +1063,7 @@ static ERL_NIF_TERM sha384_nif(ErlNifEnv* env, int argc, const ERL_NIF_TERM argv
#ifdef HAVE_SHA384
ErlNifBinary ibin;
ERL_NIF_TERM ret;
-
+ CHECK_OSE_CRYPTO();
if (!enif_inspect_iolist_as_binary(env, argv[0], &ibin)) {
return enif_make_badarg(env);
}
@@ -1094,6 +1079,7 @@ static ERL_NIF_TERM sha384_init_nif(ErlNifEnv* env, int argc, const ERL_NIF_TERM
{/* () */
#ifdef HAVE_SHA384
ERL_NIF_TERM ret;
+ CHECK_OSE_CRYPTO();
SHA384_Init((SHA512_CTX *) enif_make_new_binary(env, sizeof(SHA512_CTX), &ret));
return ret;
#else
@@ -1106,6 +1092,7 @@ static ERL_NIF_TERM sha384_update_nif(ErlNifEnv* env, int argc, const ERL_NIF_TE
SHA512_CTX* new_ctx;
ErlNifBinary ctx_bin, data_bin;
ERL_NIF_TERM ret;
+ CHECK_OSE_CRYPTO();
if (!enif_inspect_binary(env, argv[0], &ctx_bin) || ctx_bin.size != sizeof(SHA512_CTX)
|| !enif_inspect_iolist_as_binary(env, argv[1], &data_bin)) {
return enif_make_badarg(env);
@@ -1125,6 +1112,7 @@ static ERL_NIF_TERM sha384_final_nif(ErlNifEnv* env, int argc, const ERL_NIF_TER
ErlNifBinary ctx_bin;
SHA512_CTX ctx_clone;
ERL_NIF_TERM ret;
+ CHECK_OSE_CRYPTO();
if (!enif_inspect_binary(env, argv[0], &ctx_bin) || ctx_bin.size != sizeof(SHA512_CTX)) {
return enif_make_badarg(env);
}
@@ -1141,7 +1129,7 @@ static ERL_NIF_TERM sha512_nif(ErlNifEnv* env, int argc, const ERL_NIF_TERM argv
#ifdef HAVE_SHA512
ErlNifBinary ibin;
ERL_NIF_TERM ret;
-
+ CHECK_OSE_CRYPTO();
if (!enif_inspect_iolist_as_binary(env, argv[0], &ibin)) {
return enif_make_badarg(env);
}
@@ -1169,6 +1157,7 @@ static ERL_NIF_TERM sha512_update_nif(ErlNifEnv* env, int argc, const ERL_NIF_TE
SHA512_CTX* new_ctx;
ErlNifBinary ctx_bin, data_bin;
ERL_NIF_TERM ret;
+ CHECK_OSE_CRYPTO();
if (!enif_inspect_binary(env, argv[0], &ctx_bin) || ctx_bin.size != sizeof(SHA512_CTX)
|| !enif_inspect_iolist_as_binary(env, argv[1], &data_bin)) {
return enif_make_badarg(env);
@@ -1188,6 +1177,7 @@ static ERL_NIF_TERM sha512_final_nif(ErlNifEnv* env, int argc, const ERL_NIF_TER
ErlNifBinary ctx_bin;
SHA512_CTX ctx_clone;
ERL_NIF_TERM ret;
+ CHECK_OSE_CRYPTO();
if (!enif_inspect_binary(env, argv[0], &ctx_bin) || ctx_bin.size != sizeof(SHA512_CTX)) {
return enif_make_badarg(env);
}
@@ -1204,7 +1194,7 @@ static ERL_NIF_TERM md4(ErlNifEnv* env, int argc, const ERL_NIF_TERM argv[])
{/* (Data) */
ErlNifBinary ibin;
ERL_NIF_TERM ret;
-
+ CHECK_OSE_CRYPTO();
if (!enif_inspect_iolist_as_binary(env, argv[0], &ibin)) {
return enif_make_badarg(env);
}
@@ -1216,6 +1206,7 @@ static ERL_NIF_TERM md4(ErlNifEnv* env, int argc, const ERL_NIF_TERM argv[])
static ERL_NIF_TERM md4_init(ErlNifEnv* env, int argc, const ERL_NIF_TERM argv[])
{/* () */
ERL_NIF_TERM ret;
+ CHECK_OSE_CRYPTO();
MD4_Init((MD4_CTX *) enif_make_new_binary(env, MD4_CTX_LEN, &ret));
return ret;
}
@@ -1224,6 +1215,7 @@ static ERL_NIF_TERM md4_update(ErlNifEnv* env, int argc, const ERL_NIF_TERM argv
MD4_CTX* new_ctx;
ErlNifBinary ctx_bin, data_bin;
ERL_NIF_TERM ret;
+ CHECK_OSE_CRYPTO();
if (!enif_inspect_binary(env, argv[0], &ctx_bin) || ctx_bin.size != MD4_CTX_LEN
|| !enif_inspect_iolist_as_binary(env, argv[1], &data_bin)) {
return enif_make_badarg(env);
@@ -1239,6 +1231,7 @@ static ERL_NIF_TERM md4_final(ErlNifEnv* env, int argc, const ERL_NIF_TERM argv[
ErlNifBinary ctx_bin;
MD4_CTX ctx_clone;
ERL_NIF_TERM ret;
+ CHECK_OSE_CRYPTO();
if (!enif_inspect_binary(env, argv[0], &ctx_bin) || ctx_bin.size != MD4_CTX_LEN) {
return enif_make_badarg(env);
}
@@ -1253,7 +1246,7 @@ static ERL_NIF_TERM md5_mac_n(ErlNifEnv* env, int argc, const ERL_NIF_TERM argv[
ErlNifBinary key, data;
unsigned mac_sz;
ERL_NIF_TERM ret;
-
+ CHECK_OSE_CRYPTO();
if (!enif_inspect_iolist_as_binary(env, argv[0], &key)
|| !enif_inspect_iolist_as_binary(env, argv[1], &data)
|| !enif_get_uint(env,argv[2],&mac_sz) || mac_sz > MD5_LEN) {
@@ -1271,7 +1264,7 @@ static ERL_NIF_TERM sha_mac_n(ErlNifEnv* env, int argc, const ERL_NIF_TERM argv[
ErlNifBinary key, data;
unsigned mac_sz;
ERL_NIF_TERM ret;
-
+ CHECK_OSE_CRYPTO();
if (!enif_inspect_iolist_as_binary(env, argv[0], &key)
|| !enif_inspect_iolist_as_binary(env, argv[1], &data)
|| !enif_get_uint(env,argv[2],&mac_sz) || mac_sz > SHA_LEN) {
@@ -1291,7 +1284,7 @@ static ERL_NIF_TERM sha224_mac_nif(ErlNifEnv* env, int argc, const ERL_NIF_TERM
ErlNifBinary key, data;
unsigned mac_sz;
ERL_NIF_TERM ret;
-
+ CHECK_OSE_CRYPTO();
if (!enif_inspect_iolist_as_binary(env, argv[0], &key)
|| !enif_inspect_iolist_as_binary(env, argv[1], &data)
|| !enif_get_uint(env,argv[2],&mac_sz) || mac_sz > SHA224_DIGEST_LENGTH) {
@@ -1314,7 +1307,7 @@ static ERL_NIF_TERM sha256_mac_nif(ErlNifEnv* env, int argc, const ERL_NIF_TERM
ErlNifBinary key, data;
unsigned mac_sz;
ERL_NIF_TERM ret;
-
+ CHECK_OSE_CRYPTO();
if (!enif_inspect_iolist_as_binary(env, argv[0], &key)
|| !enif_inspect_iolist_as_binary(env, argv[1], &data)
|| !enif_get_uint(env,argv[2],&mac_sz) || mac_sz > SHA256_DIGEST_LENGTH) {
@@ -1337,7 +1330,7 @@ static ERL_NIF_TERM sha384_mac_nif(ErlNifEnv* env, int argc, const ERL_NIF_TERM
ErlNifBinary key, data;
unsigned mac_sz;
ERL_NIF_TERM ret;
-
+ CHECK_OSE_CRYPTO();
if (!enif_inspect_iolist_as_binary(env, argv[0], &key)
|| !enif_inspect_iolist_as_binary(env, argv[1], &data)
|| !enif_get_uint(env,argv[2],&mac_sz) || mac_sz > SHA384_DIGEST_LENGTH) {
@@ -1361,7 +1354,7 @@ static ERL_NIF_TERM sha512_mac_nif(ErlNifEnv* env, int argc, const ERL_NIF_TERM
ErlNifBinary key, data;
unsigned mac_sz;
ERL_NIF_TERM ret;
-
+ CHECK_OSE_CRYPTO();
if (!enif_inspect_iolist_as_binary(env, argv[0], &key)
|| !enif_inspect_iolist_as_binary(env, argv[1], &data)
|| !enif_get_uint(env,argv[2],&mac_sz) || mac_sz > SHA512_DIGEST_LENGTH) {
@@ -1377,13 +1370,24 @@ static ERL_NIF_TERM sha512_mac_nif(ErlNifEnv* env, int argc, const ERL_NIF_TERM
#endif
}
+static void hmac_context_dtor(ErlNifEnv* env, struct hmac_context *obj)
+{
+ if (obj->alive) {
+ HMAC_CTX_cleanup(&obj->ctx);
+ obj->alive = 0;
+ }
+ enif_mutex_destroy(obj->mtx);
+}
+
static ERL_NIF_TERM hmac_init(ErlNifEnv* env, int argc, const ERL_NIF_TERM argv[])
{/* (Type, Key) */
ErlNifBinary key;
- ERL_NIF_TERM ret;
- unsigned char * ctx_buf;
+ struct hmac_context* obj;
const EVP_MD *md;
+ ERL_NIF_TERM ret;
+ CHECK_OSE_CRYPTO();
+
if (argv[0] == atom_sha) md = EVP_sha1();
#ifdef HAVE_SHA224
else if (argv[0] == atom_sha224) md = EVP_sha224();
@@ -1406,57 +1410,66 @@ static ERL_NIF_TERM hmac_init(ErlNifEnv* env, int argc, const ERL_NIF_TERM argv[
return enif_make_badarg(env);
}
- ctx_buf = enif_make_new_binary(env, sizeof(HMAC_CTX), &ret);
- HMAC_CTX_init((HMAC_CTX *) ctx_buf);
- HMAC_Init((HMAC_CTX *) ctx_buf, key.data, key.size, md);
+ obj = enif_alloc_resource(hmac_context_rtype, sizeof(struct hmac_context));
+ obj->mtx = enif_mutex_create("crypto.hmac");
+ obj->alive = 1;
+ HMAC_CTX_init(&obj->ctx);
+ HMAC_Init(&obj->ctx, key.data, key.size, md);
+ ret = enif_make_resource(env, obj);
+ enif_release_resource(obj);
return ret;
}
static ERL_NIF_TERM hmac_update(ErlNifEnv* env, int argc, const ERL_NIF_TERM argv[])
{/* (Context, Data) */
- ErlNifBinary context, data;
- ERL_NIF_TERM ret;
- unsigned char * ctx_buf;
+ ErlNifBinary data;
+ struct hmac_context* obj;
- if (!enif_inspect_binary(env, argv[0], &context)
- || !enif_inspect_iolist_as_binary(env, argv[1], &data)
- || context.size != sizeof(HMAC_CTX)) {
+ CHECK_OSE_CRYPTO();
+
+ if (!enif_get_resource(env, argv[0], hmac_context_rtype, (void**)&obj)
+ || !enif_inspect_iolist_as_binary(env, argv[1], &data)) {
+ return enif_make_badarg(env);
+ }
+ enif_mutex_lock(obj->mtx);
+ if (!obj->alive) {
+ enif_mutex_unlock(obj->mtx);
return enif_make_badarg(env);
}
+ HMAC_Update(&obj->ctx, data.data, data.size);
+ enif_mutex_unlock(obj->mtx);
- ctx_buf = enif_make_new_binary(env, sizeof(HMAC_CTX), &ret);
- memcpy(ctx_buf, context.data, context.size);
- HMAC_Update((HMAC_CTX *)ctx_buf, data.data, data.size);
CONSUME_REDS(env,data);
-
- return ret;
+ return argv[0];
}
static ERL_NIF_TERM hmac_final(ErlNifEnv* env, int argc, const ERL_NIF_TERM argv[])
{/* (Context) or (Context, HashLen) */
- ErlNifBinary context;
ERL_NIF_TERM ret;
- HMAC_CTX ctx;
+ struct hmac_context* obj;
unsigned char mac_buf[EVP_MAX_MD_SIZE];
unsigned char * mac_bin;
unsigned int req_len = 0;
unsigned int mac_len;
+
+ CHECK_OSE_CRYPTO();
- if (!enif_inspect_binary(env, argv[0], &context)) {
- return enif_make_badarg(env);
- }
- if (argc == 2 && !enif_get_uint(env, argv[1], &req_len)) {
+ if (!enif_get_resource(env,argv[0],hmac_context_rtype, (void**)&obj)
+ || (argc == 2 && !enif_get_uint(env, argv[1], &req_len))) {
return enif_make_badarg(env);
}
- if (context.size != sizeof(ctx)) {
- return enif_make_badarg(env);
+ enif_mutex_lock(obj->mtx);
+ if (!obj->alive) {
+ enif_mutex_unlock(obj->mtx);
+ return enif_make_badarg(env);
}
- memcpy(&ctx, context.data, context.size);
- HMAC_Final(&ctx, mac_buf, &mac_len);
- HMAC_CTX_cleanup(&ctx);
+ HMAC_Final(&obj->ctx, mac_buf, &mac_len);
+ HMAC_CTX_cleanup(&obj->ctx);
+ obj->alive = 0;
+ enif_mutex_unlock(obj->mtx);
if (argc == 2 && req_len < mac_len) {
/* Only truncate to req_len bytes if asked. */
@@ -1475,6 +1488,8 @@ static ERL_NIF_TERM des_cbc_crypt(ErlNifEnv* env, int argc, const ERL_NIF_TERM a
DES_cblock ivec_clone; /* writable copy */
ERL_NIF_TERM ret;
+ CHECK_OSE_CRYPTO();
+
if (!enif_inspect_iolist_as_binary(env, argv[0], &key) || key.size != 8
|| !enif_inspect_binary(env, argv[1], &ivec) || ivec.size != 8
|| !enif_inspect_iolist_as_binary(env, argv[2], &text)
@@ -1496,6 +1511,8 @@ static ERL_NIF_TERM des_cfb_crypt(ErlNifEnv* env, int argc, const ERL_NIF_TERM a
DES_cblock ivec_clone; /* writable copy */
ERL_NIF_TERM ret;
+ CHECK_OSE_CRYPTO();
+
if (!enif_inspect_iolist_as_binary(env, argv[0], &key) || key.size != 8
|| !enif_inspect_binary(env, argv[1], &ivec) || ivec.size != 8
|| !enif_inspect_iolist_as_binary(env, argv[2], &text)) {
@@ -1514,6 +1531,7 @@ static ERL_NIF_TERM des_ecb_crypt(ErlNifEnv* env, int argc, const ERL_NIF_TERM a
ErlNifBinary key, text;
DES_key_schedule schedule;
ERL_NIF_TERM ret;
+ CHECK_OSE_CRYPTO();
if (!enif_inspect_iolist_as_binary(env, argv[0], &key) || key.size != 8 ||
!enif_inspect_iolist_as_binary(env, argv[1], &text) || text.size != 8) {
return enif_make_badarg(env);
@@ -1533,6 +1551,8 @@ static ERL_NIF_TERM des_ede3_cbc_crypt(ErlNifEnv* env, int argc, const ERL_NIF_T
DES_cblock ivec_clone; /* writable copy */
ERL_NIF_TERM ret;
+ CHECK_OSE_CRYPTO();
+
if (!enif_inspect_iolist_as_binary(env, argv[0], &key1) || key1.size != 8
|| !enif_inspect_iolist_as_binary(env, argv[1], &key2) || key2.size != 8
|| !enif_inspect_iolist_as_binary(env, argv[2], &key3) || key3.size != 8
@@ -1561,6 +1581,8 @@ static ERL_NIF_TERM des_ede3_cfb_crypt_nif(ErlNifEnv* env, int argc, const ERL_N
DES_cblock ivec_clone; /* writable copy */
ERL_NIF_TERM ret;
+ CHECK_OSE_CRYPTO();
+
if (!enif_inspect_iolist_as_binary(env, argv[0], &key1) || key1.size != 8
|| !enif_inspect_iolist_as_binary(env, argv[1], &key2) || key2.size != 8
|| !enif_inspect_iolist_as_binary(env, argv[2], &key3) || key3.size != 8
@@ -1583,6 +1605,30 @@ static ERL_NIF_TERM des_ede3_cfb_crypt_nif(ErlNifEnv* env, int argc, const ERL_N
#endif
}
+static ERL_NIF_TERM aes_cfb_8_crypt(ErlNifEnv* env, int argc, const ERL_NIF_TERM argv[])
+{/* (Key, IVec, Data, IsEncrypt) */
+ ErlNifBinary key, ivec, text;
+ AES_KEY aes_key;
+ unsigned char ivec_clone[16]; /* writable copy */
+ int new_ivlen = 0;
+ ERL_NIF_TERM ret;
+
+ if (!enif_inspect_iolist_as_binary(env, argv[0], &key) || key.size != 16
+ || !enif_inspect_binary(env, argv[1], &ivec) || ivec.size != 16
+ || !enif_inspect_iolist_as_binary(env, argv[2], &text)) {
+ return enif_make_badarg(env);
+ }
+
+ memcpy(ivec_clone, ivec.data, 16);
+ AES_set_encrypt_key(key.data, 128, &aes_key);
+ AES_cfb8_encrypt((unsigned char *) text.data,
+ enif_make_new_binary(env, text.size, &ret),
+ text.size, &aes_key, ivec_clone, &new_ivlen,
+ (argv[3] == atom_true));
+ CONSUME_REDS(env,text);
+ return ret;
+}
+
static ERL_NIF_TERM aes_cfb_128_crypt(ErlNifEnv* env, int argc, const ERL_NIF_TERM argv[])
{/* (Key, IVec, Data, IsEncrypt) */
ErlNifBinary key, ivec, text;
@@ -1591,6 +1637,8 @@ static ERL_NIF_TERM aes_cfb_128_crypt(ErlNifEnv* env, int argc, const ERL_NIF_TE
int new_ivlen = 0;
ERL_NIF_TERM ret;
+ CHECK_OSE_CRYPTO();
+
if (!enif_inspect_iolist_as_binary(env, argv[0], &key) || key.size != 16
|| !enif_inspect_binary(env, argv[1], &ivec) || ivec.size != 16
|| !enif_inspect_iolist_as_binary(env, argv[2], &text)) {
@@ -1618,6 +1666,8 @@ static ERL_NIF_TERM aes_ctr_encrypt(ErlNifEnv* env, int argc, const ERL_NIF_TERM
unsigned int num = 0;
ERL_NIF_TERM ret;
+ CHECK_OSE_CRYPTO();
+
if (!enif_inspect_iolist_as_binary(env, argv[0], &key)
|| AES_set_encrypt_key(key.data, key.size*8, &aes_key) != 0
|| !enif_inspect_binary(env, argv[1], &ivec) || ivec.size != 16
@@ -1649,6 +1699,8 @@ static ERL_NIF_TERM aes_ctr_stream_encrypt(ErlNifEnv* env, int argc, const ERL_N
unsigned char * ivec2_buf;
unsigned char * ecount2_buf;
+ CHECK_OSE_CRYPTO();
+
if (!enif_get_tuple(env, argv[0], &state_arity, &state_term)
|| state_arity != 4
|| !enif_inspect_iolist_as_binary(env, state_term[0], &key_bin)
@@ -1682,6 +1734,7 @@ static ERL_NIF_TERM rand_bytes_1(ErlNifEnv* env, int argc, const ERL_NIF_TERM ar
unsigned bytes;
unsigned char* data;
ERL_NIF_TERM ret;
+ CHECK_OSE_CRYPTO();
if (!enif_get_uint(env, argv[0], &bytes)) {
return enif_make_badarg(env);
}
@@ -1695,6 +1748,7 @@ static ERL_NIF_TERM strong_rand_bytes_nif(ErlNifEnv* env, int argc, const ERL_NI
unsigned bytes;
unsigned char* data;
ERL_NIF_TERM ret;
+ CHECK_OSE_CRYPTO();
if (!enif_get_uint(env, argv[0], &bytes)) {
return enif_make_badarg(env);
}
@@ -1712,6 +1766,7 @@ static ERL_NIF_TERM rand_bytes_3(ErlNifEnv* env, int argc, const ERL_NIF_TERM ar
unsigned char* data;
unsigned top_mask, bot_mask;
ERL_NIF_TERM ret;
+ CHECK_OSE_CRYPTO();
if (!enif_get_uint(env, argv[0], &bytes)
|| !enif_get_uint(env, argv[1], &top_mask)
|| !enif_get_uint(env, argv[2], &bot_mask)) {
@@ -1734,6 +1789,9 @@ static ERL_NIF_TERM strong_rand_mpint_nif(ErlNifEnv* env, int argc, const ERL_NI
unsigned char* data;
unsigned dlen;
ERL_NIF_TERM ret;
+
+ CHECK_OSE_CRYPTO();
+
if (!enif_get_uint(env, argv[0], &bits)
|| !enif_get_int(env, argv[1], &top)
|| !enif_get_int(env, argv[2], &bottom)) {
@@ -1801,6 +1859,9 @@ static ERL_NIF_TERM rand_uniform_nif(ErlNifEnv* env, int argc, const ERL_NIF_TER
unsigned char* data;
unsigned dlen;
ERL_NIF_TERM ret;
+
+ CHECK_OSE_CRYPTO();
+
if (!get_bn_from_mpint(env, argv[0], &bn_from)
|| !get_bn_from_mpint(env, argv[1], &bn_rand)) {
if (bn_from) BN_free(bn_from);
@@ -1824,7 +1885,7 @@ static ERL_NIF_TERM rand_uniform_nif(ErlNifEnv* env, int argc, const ERL_NIF_TER
static ERL_NIF_TERM mod_exp_nif(ErlNifEnv* env, int argc, const ERL_NIF_TERM argv[])
{/* (Base,Exponent,Modulo,bin_hdr) */
- BIGNUM *bn_base=NULL, *bn_exponent=NULL, *bn_modulo, *bn_result;
+ BIGNUM *bn_base=NULL, *bn_exponent=NULL, *bn_modulo=NULL, *bn_result;
BN_CTX *bn_ctx;
unsigned char* ptr;
unsigned dlen;
@@ -1832,6 +1893,8 @@ static ERL_NIF_TERM mod_exp_nif(ErlNifEnv* env, int argc, const ERL_NIF_TERM arg
unsigned extra_byte;
ERL_NIF_TERM ret;
+ CHECK_OSE_CRYPTO();
+
if (!get_bn_from_bin(env, argv[0], &bn_base)
|| !get_bn_from_bin(env, argv[1], &bn_exponent)
|| !get_bn_from_bin(env, argv[2], &bn_modulo)
@@ -1839,6 +1902,7 @@ static ERL_NIF_TERM mod_exp_nif(ErlNifEnv* env, int argc, const ERL_NIF_TERM arg
if (bn_base) BN_free(bn_base);
if (bn_exponent) BN_free(bn_exponent);
+ if (bn_modulo) BN_free(bn_modulo);
return enif_make_badarg(env);
}
bn_result = BN_new();
@@ -1873,6 +1937,8 @@ static ERL_NIF_TERM dss_verify_nif(ErlNifEnv* env, int argc, const ERL_NIF_TERM
DSA *dsa;
int i;
+ CHECK_OSE_CRYPTO();
+
if (argv[0] == atom_sha) {
if (enif_get_tuple(env, argv[1], &tpl_arity, &tpl_terms)) {
if (tpl_arity != 2 || tpl_terms[0] != atom_digest
@@ -2040,6 +2106,8 @@ static ERL_NIF_TERM rsa_verify_nif(ErlNifEnv* env, int argc, const ERL_NIF_TERM
struct digest_type_t* digp = NULL;
unsigned char* digest = NULL;
+ CHECK_OSE_CRYPTO();
+
digp = get_digest_type(type);
if (!digp) {
return enif_make_badarg(env);
@@ -2099,6 +2167,8 @@ static ERL_NIF_TERM aes_cbc_crypt(ErlNifEnv* env, int argc, const ERL_NIF_TERM a
unsigned char* ret_ptr;
ERL_NIF_TERM ret;
+ CHECK_OSE_CRYPTO();
+
if (!enif_inspect_iolist_as_binary(env, argv[0], &key_bin)
|| (key_bin.size != 16 && key_bin.size != 32)
|| !enif_inspect_binary(env, argv[1], &ivec_bin)
@@ -2135,6 +2205,8 @@ static ERL_NIF_TERM aes_ige_crypt_nif(ErlNifEnv* env, int argc, const ERL_NIF_TE
unsigned char* ret_ptr;
ERL_NIF_TERM ret;
+ CHECK_OSE_CRYPTO();
+
if (!enif_inspect_iolist_as_binary(env, argv[0], &key_bin)
|| (key_bin.size != 16 && key_bin.size != 32)
|| !enif_inspect_binary(env, argv[1], &ivec_bin)
@@ -2171,6 +2243,8 @@ static ERL_NIF_TERM do_exor(ErlNifEnv* env, int argc, const ERL_NIF_TERM argv[])
int i;
ERL_NIF_TERM ret;
+ CHECK_OSE_CRYPTO();
+
if (!enif_inspect_iolist_as_binary(env,argv[0], &d1)
|| !enif_inspect_iolist_as_binary(env,argv[1], &d2)
|| d1.size != d2.size) {
@@ -2191,6 +2265,8 @@ static ERL_NIF_TERM rc4_encrypt(ErlNifEnv* env, int argc, const ERL_NIF_TERM arg
RC4_KEY rc4_key;
ERL_NIF_TERM ret;
+ CHECK_OSE_CRYPTO();
+
if (!enif_inspect_iolist_as_binary(env,argv[0], &key)
|| !enif_inspect_iolist_as_binary(env,argv[1], &data)) {
return enif_make_badarg(env);
@@ -2207,6 +2283,8 @@ static ERL_NIF_TERM rc4_set_key(ErlNifEnv* env, int argc, const ERL_NIF_TERM arg
ErlNifBinary key;
ERL_NIF_TERM ret;
+ CHECK_OSE_CRYPTO();
+
if (!enif_inspect_iolist_as_binary(env,argv[0], &key)) {
return enif_make_badarg(env);
}
@@ -2222,6 +2300,8 @@ static ERL_NIF_TERM rc4_encrypt_with_state(ErlNifEnv* env, int argc, const ERL_N
RC4_KEY* rc4_key;
ERL_NIF_TERM new_state, new_data;
+ CHECK_OSE_CRYPTO();
+
if (!enif_inspect_iolist_as_binary(env,argv[0], &state)
|| state.size != sizeof(RC4_KEY)
|| !enif_inspect_iolist_as_binary(env,argv[1], &data)) {
@@ -2241,6 +2321,8 @@ static ERL_NIF_TERM rc2_cbc_crypt(ErlNifEnv* env, int argc, const ERL_NIF_TERM a
RC2_KEY rc2_key;
ERL_NIF_TERM ret;
unsigned char iv_copy[8];
+
+ CHECK_OSE_CRYPTO();
if (!enif_inspect_iolist_as_binary(env, argv[0], &key_bin)
|| (key_bin.size != 5 && key_bin.size != 8 && key_bin.size != 16)
@@ -2302,6 +2384,8 @@ static ERL_NIF_TERM rsa_sign_nif(ErlNifEnv* env, int argc, const ERL_NIF_TERM ar
struct digest_type_t *digp;
unsigned char* digest;
+ CHECK_OSE_CRYPTO();
+
digp = get_digest_type(argv[0]);
if (!digp) {
return enif_make_badarg(env);
@@ -2368,6 +2452,8 @@ static ERL_NIF_TERM dss_sign_nif(ErlNifEnv* env, int argc, const ERL_NIF_TERM ar
DSA* dsa;
int i;
+ CHECK_OSE_CRYPTO();
+
if (argv[0] == atom_sha) {
if (enif_get_tuple(env, argv[1], &tpl_arity, &tpl_terms)) {
if (tpl_arity != 2 || tpl_terms[0] != atom_digest
@@ -2423,6 +2509,7 @@ static ERL_NIF_TERM dss_sign_nif(ErlNifEnv* env, int argc, const ERL_NIF_TERM ar
return enif_make_binary(env, &ret_bin);
}
else {
+ enif_release_binary(&ret_bin);
return atom_error;
}
}
@@ -2450,7 +2537,11 @@ static ERL_NIF_TERM rsa_public_crypt(ErlNifEnv* env, int argc, const ERL_NIF_TER
ErlNifBinary data_bin, ret_bin;
ERL_NIF_TERM head, tail;
int padding, i;
- RSA* rsa = RSA_new();
+ RSA* rsa;
+
+ CHECK_OSE_CRYPTO();
+
+ rsa = RSA_new();
if (!enif_inspect_binary(env, argv[0], &data_bin)
|| !enif_get_list_cell(env, argv[1], &head, &tail)
@@ -2496,7 +2587,11 @@ static ERL_NIF_TERM rsa_private_crypt(ErlNifEnv* env, int argc, const ERL_NIF_TE
{/* (Data, Key=[E,N,D]|[E,N,D,P1,P2,E1,E2,C], Padding, IsEncrypt) */
ErlNifBinary data_bin, ret_bin;
int padding, i;
- RSA* rsa = RSA_new();
+ RSA* rsa;
+
+ CHECK_OSE_CRYPTO();
+
+ rsa = RSA_new();
if (!enif_inspect_binary(env, argv[0], &data_bin)
|| !get_rsa_private_key(env, argv[1], rsa)
@@ -2542,6 +2637,8 @@ static ERL_NIF_TERM dh_generate_parameters_nif(ErlNifEnv* env, int argc, const E
unsigned char *p_ptr, *g_ptr;
ERL_NIF_TERM ret_p, ret_g;
+ CHECK_OSE_CRYPTO();
+
if (!enif_get_int(env, argv[0], &prime_len)
|| !enif_get_int(env, argv[1], &generator)) {
@@ -2565,10 +2662,14 @@ static ERL_NIF_TERM dh_generate_parameters_nif(ErlNifEnv* env, int argc, const E
static ERL_NIF_TERM dh_check(ErlNifEnv* env, int argc, const ERL_NIF_TERM argv[])
{/* ([PrimeLen, Generator]) */
- DH* dh_params = DH_new();
+ DH* dh_params;
int i;
ERL_NIF_TERM ret, head, tail;
+ CHECK_OSE_CRYPTO();
+
+ dh_params = DH_new();
+
if (!enif_get_list_cell(env, argv[0], &head, &tail)
|| !get_bn_from_bin(env, head, &dh_params->p)
|| !enif_get_list_cell(env, tail, &head, &tail)
@@ -2595,12 +2696,16 @@ static ERL_NIF_TERM dh_check(ErlNifEnv* env, int argc, const ERL_NIF_TERM argv[]
static ERL_NIF_TERM dh_generate_key_nif(ErlNifEnv* env, int argc, const ERL_NIF_TERM argv[])
{/* (PrivKey, DHParams=[P,G], Mpint) */
- DH* dh_params = DH_new();
+ DH* dh_params;
int pub_len, prv_len;
unsigned char *pub_ptr, *prv_ptr;
ERL_NIF_TERM ret, ret_pub, ret_prv, head, tail;
int mpint; /* 0 or 4 */
+ CHECK_OSE_CRYPTO();
+
+ dh_params = DH_new();
+
if (!(get_bn_from_bin(env, argv[0], &dh_params->priv_key)
|| argv[0] == atom_undefined)
|| !enif_get_list_cell(env, argv[1], &head, &tail)
@@ -2637,12 +2742,16 @@ static ERL_NIF_TERM dh_generate_key_nif(ErlNifEnv* env, int argc, const ERL_NIF_
static ERL_NIF_TERM dh_compute_key_nif(ErlNifEnv* env, int argc, const ERL_NIF_TERM argv[])
{/* (OthersPublicKey, MyPrivateKey, DHParams=[P,G]) */
- DH* dh_params = DH_new();
+ DH* dh_params;
BIGNUM* pubkey = NULL;
int i;
ErlNifBinary ret_bin;
ERL_NIF_TERM ret, head, tail;
+ CHECK_OSE_CRYPTO();
+
+ dh_params = DH_new();
+
if (!get_bn_from_bin(env, argv[0], &pubkey)
|| !get_bn_from_bin(env, argv[1], &dh_params->priv_key)
|| !enif_get_list_cell(env, argv[2], &head, &tail)
@@ -2663,6 +2772,7 @@ static ERL_NIF_TERM dh_compute_key_nif(ErlNifEnv* env, int argc, const ERL_NIF_T
ret = enif_make_binary(env, &ret_bin);
}
else {
+ enif_release_binary(&ret_bin);
ret = atom_error;
}
}
@@ -2674,12 +2784,14 @@ static ERL_NIF_TERM dh_compute_key_nif(ErlNifEnv* env, int argc, const ERL_NIF_T
static ERL_NIF_TERM srp_value_B_nif(ErlNifEnv* env, int argc, const ERL_NIF_TERM argv[])
{/* (Multiplier, Verifier, Generator, Exponent, Prime) */
BIGNUM *bn_verifier = NULL;
- BIGNUM *bn_exponent, *bn_generator, *bn_prime, *bn_multiplier, *bn_result;
+ BIGNUM *bn_exponent = NULL, *bn_generator = NULL, *bn_prime = NULL, *bn_multiplier = NULL, *bn_result;
BN_CTX *bn_ctx;
unsigned char* ptr;
unsigned dlen;
ERL_NIF_TERM ret;
+ CHECK_OSE_CRYPTO();
+
if (!get_bn_from_bin(env, argv[0], &bn_multiplier)
|| !get_bn_from_bin(env, argv[1], &bn_verifier)
|| !get_bn_from_bin(env, argv[2], &bn_generator)
@@ -2687,9 +2799,9 @@ static ERL_NIF_TERM srp_value_B_nif(ErlNifEnv* env, int argc, const ERL_NIF_TERM
|| !get_bn_from_bin(env, argv[4], &bn_prime)) {
if (bn_multiplier) BN_free(bn_multiplier);
if (bn_verifier) BN_free(bn_verifier);
- if (bn_verifier) BN_free(bn_generator);
- if (bn_verifier) BN_free(bn_exponent);
- if (bn_verifier) BN_free(bn_prime);
+ if (bn_generator) BN_free(bn_generator);
+ if (bn_exponent) BN_free(bn_exponent);
+ if (bn_prime) BN_free(bn_prime);
return enif_make_badarg(env);
}
@@ -2740,6 +2852,8 @@ static ERL_NIF_TERM srp_user_secret_nif(ErlNifEnv* env, int argc, const ERL_NIF_
unsigned dlen;
ERL_NIF_TERM ret;
+ CHECK_OSE_CRYPTO();
+
if (!get_bn_from_bin(env, argv[0], &bn_a)
|| !get_bn_from_bin(env, argv[1], &bn_u)
|| !get_bn_from_bin(env, argv[2], &bn_B)
@@ -2783,8 +2897,8 @@ static ERL_NIF_TERM srp_user_secret_nif(ErlNifEnv* env, int argc, const ERL_NIF_
/* a + (u * x) */
bn_exp2 = BN_new();
- BN_mod_mul(bn_result, bn_u, bn_exponent, bn_prime, bn_ctx);
- BN_mod_add(bn_exp2, bn_a, bn_result, bn_prime, bn_ctx);
+ BN_mul(bn_result, bn_u, bn_exponent, bn_ctx);
+ BN_add(bn_exp2, bn_a, bn_result);
/* (B - (k * g^x)) ^ (a + (u * x)) % N */
BN_mod_exp(bn_result, bn_base, bn_exp2, bn_prime, bn_ctx);
@@ -2813,12 +2927,14 @@ static ERL_NIF_TERM srp_host_secret_nif(ErlNifEnv* env, int argc, const ERL_NIF_
<premaster secret> = (A * v^u) ^ b % N
*/
BIGNUM *bn_b = NULL, *bn_verifier = NULL;
- BIGNUM *bn_prime, *bn_A, *bn_u, *bn_base, *bn_result;
+ BIGNUM *bn_prime = NULL, *bn_A = NULL, *bn_u = NULL, *bn_base, *bn_result;
BN_CTX *bn_ctx;
unsigned char* ptr;
unsigned dlen;
ERL_NIF_TERM ret;
+ CHECK_OSE_CRYPTO();
+
if (!get_bn_from_bin(env, argv[0], &bn_verifier)
|| !get_bn_from_bin(env, argv[1], &bn_b)
|| !get_bn_from_bin(env, argv[2], &bn_u)
@@ -2879,6 +2995,8 @@ static ERL_NIF_TERM bf_cfb64_crypt(ErlNifEnv* env, int argc, const ERL_NIF_TERM
int bf_n = 0; /* blowfish ivec pos */
ERL_NIF_TERM ret;
+ CHECK_OSE_CRYPTO();
+
if (!enif_inspect_iolist_as_binary(env, argv[0], &key_bin)
|| !enif_inspect_binary(env, argv[1], &ivec_bin)
|| ivec_bin.size != 8
@@ -2902,6 +3020,8 @@ static ERL_NIF_TERM bf_cbc_crypt(ErlNifEnv* env, int argc, const ERL_NIF_TERM ar
unsigned char bf_tkey[8]; /* blowfish ivec */
ERL_NIF_TERM ret;
+ CHECK_OSE_CRYPTO();
+
if (!enif_inspect_iolist_as_binary(env, argv[0], &key_bin)
|| !enif_inspect_binary(env, argv[1], &ivec_bin)
|| ivec_bin.size != 8
@@ -2925,6 +3045,8 @@ static ERL_NIF_TERM bf_ecb_crypt(ErlNifEnv* env, int argc, const ERL_NIF_TERM ar
BF_KEY bf_key; /* blowfish key 8 */
ERL_NIF_TERM ret;
+ CHECK_OSE_CRYPTO();
+
if (!enif_inspect_iolist_as_binary(env, argv[0], &key_bin)
|| !enif_inspect_iolist_as_binary(env, argv[1], &data_bin)
|| data_bin.size < 8) {
@@ -2945,6 +3067,8 @@ static ERL_NIF_TERM blowfish_ofb64_encrypt(ErlNifEnv* env, int argc, const ERL_N
int bf_n = 0; /* blowfish ivec pos */
ERL_NIF_TERM ret;
+ CHECK_OSE_CRYPTO();
+
if (!enif_inspect_iolist_as_binary(env, argv[0], &key_bin)
|| !enif_inspect_binary(env, argv[1], &ivec_bin)
|| ivec_bin.size != 8
@@ -2961,21 +3085,9 @@ static ERL_NIF_TERM blowfish_ofb64_encrypt(ErlNifEnv* env, int argc, const ERL_N
}
#if defined(HAVE_EC)
-static int term2curve_id(ERL_NIF_TERM nid)
-{
- int i;
-
- for (i = 0; i < EC_CURVES_CNT; i++)
- if (ec_curves[i].atom == nid)
- return ec_curves[i].nid;
-
- return 0;
-}
-
static EC_KEY* ec_key_new(ErlNifEnv* env, ERL_NIF_TERM curve_arg)
{
EC_KEY *key = NULL;
- int nid = 0;
int c_arity = -1;
const ERL_NIF_TERM* curve;
ErlNifBinary seed;
@@ -2987,18 +3099,12 @@ static EC_KEY* ec_key_new(ErlNifEnv* env, ERL_NIF_TERM curve_arg)
EC_GROUP *group = NULL;
EC_POINT *point = NULL;
- if (enif_is_atom(env, curve_arg)) {
- nid = term2curve_id(curve_arg);
- if (nid == 0)
- return NULL;
- key = EC_KEY_new_by_curve_name(nid);
- }
- else if (enif_is_tuple(env, curve_arg)
- && enif_get_tuple(env,curve_arg,&c_arity,&curve)
- && c_arity == 5
- && get_bn_from_bin(env, curve[3], &bn_order)
- && (curve[4] != atom_none && get_bn_from_bin(env, curve[4], &cofactor))) {
- /* {Field, Prime, Point, Order, CoFactor} = Curve */
+ /* {Field, Prime, Point, Order, CoFactor} = Curve */
+ if (enif_is_tuple(env, curve_arg)
+ && enif_get_tuple(env,curve_arg,&c_arity,&curve)
+ && c_arity == 5
+ && get_bn_from_bin(env, curve[3], &bn_order)
+ && (curve[4] != atom_none && get_bn_from_bin(env, curve[4], &cofactor))) {
int f_arity = -1;
const ERL_NIF_TERM* field;
@@ -3032,6 +3138,8 @@ static EC_KEY* ec_key_new(ErlNifEnv* env, ERL_NIF_TERM curve_arg)
/* create the EC_GROUP structure */
group = EC_GROUP_new_curve_GFp(p, a, b, NULL);
+#if !defined(OPENSSL_NO_EC2M)
+
} else if (f_arity == 3 && field[0] == atom_characteristic_two_field) {
/* {characteristic_two_field, M, Basis} */
@@ -3090,6 +3198,7 @@ static EC_KEY* ec_key_new(ErlNifEnv* env, ERL_NIF_TERM curve_arg)
goto out_err;
group = EC_GROUP_new_curve_GF2m(p, a, b, NULL);
+#endif
} else
goto out_err;
@@ -3278,6 +3387,8 @@ static ERL_NIF_TERM ec_key_generate(ErlNifEnv* env, int argc, const ERL_NIF_TERM
#if defined(HAVE_EC)
EC_KEY *key = ec_key_new(env, argv[0]);
+ CHECK_OSE_CRYPTO();
+
if (key && EC_KEY_generate_key(key)) {
const EC_GROUP *group;
const EC_POINT *public_key;
@@ -3315,6 +3426,8 @@ static ERL_NIF_TERM ecdsa_sign_nif(ErlNifEnv* env, int argc, const ERL_NIF_TERM
struct digest_type_t *digp;
unsigned char* digest;
+ CHECK_OSE_CRYPTO();
+
digp = get_digest_type(argv[0]);
if (!digp) {
return enif_make_badarg(env);
@@ -3382,6 +3495,8 @@ static ERL_NIF_TERM ecdsa_verify_nif(ErlNifEnv* env, int argc, const ERL_NIF_TER
struct digest_type_t* digp = NULL;
unsigned char* digest = NULL;
+ CHECK_OSE_CRYPTO();
+
digp = get_digest_type(type);
if (!digp) {
return enif_make_badarg(env);
@@ -3445,6 +3560,8 @@ static ERL_NIF_TERM ecdh_compute_key_nif(ErlNifEnv* env, int argc, const ERL_NIF
EC_POINT *my_ecpoint;
EC_KEY *other_ecdh = NULL;
+ CHECK_OSE_CRYPTO();
+
if (!get_ec_key(env, argv[1], argv[2], atom_undefined, &key))
return enif_make_badarg(env);
@@ -3485,6 +3602,16 @@ out_err:
#endif
}
+static ERL_NIF_TERM rand_seed_nif(ErlNifEnv* env, int argc, const ERL_NIF_TERM argv[])
+{
+ ErlNifBinary seed_bin;
+ CHECK_OSE_CRYPTO();
+ if (!enif_inspect_binary(env, argv[0], &seed_bin))
+ return enif_make_badarg(env);
+ RAND_seed(seed_bin.data,seed_bin.size);
+ return atom_ok;
+}
+
/* HMAC */
diff --git a/lib/crypto/c_src/crypto_callback.c b/lib/crypto/c_src/crypto_callback.c
index 81106b4cc2..a08dcec463 100644
--- a/lib/crypto/c_src/crypto_callback.c
+++ b/lib/crypto/c_src/crypto_callback.c
@@ -1,7 +1,7 @@
/*
* %CopyrightBegin%
*
- * Copyright Ericsson AB 2012. All Rights Reserved.
+ * Copyright Ericsson AB 2014. 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
@@ -17,6 +17,7 @@
* %CopyrightEnd%
*/
+#include <stdio.h>
#include <string.h>
#include <openssl/opensslconf.h>
@@ -51,13 +52,28 @@ DLLEXPORT struct crypto_callbacks* get_crypto_callbacks(int nlocks);
static ErlNifRWLock** lock_vec = NULL; /* Static locks used by openssl */
+static void nomem(size_t size, const char* op)
+{
+ fprintf(stderr, "Out of memory abort. Crypto failed to %s %zu bytes.\r\n",
+ op, size);
+ abort();
+}
+
static void* crypto_alloc(size_t size)
{
- return enif_alloc(size);
+ void *ret = enif_alloc(size);
+
+ if (!ret && size)
+ nomem(size, "allocate");
+ return ret;
}
static void* crypto_realloc(void* ptr, size_t size)
{
- return enif_realloc(ptr, size);
+ void* ret = enif_realloc(ptr, size);
+
+ if (!ret && size)
+ nomem(size, "reallocate");
+ return ret;
}
static void crypto_free(void* ptr)
{
diff --git a/lib/crypto/doc/src/crypto.xml b/lib/crypto/doc/src/crypto.xml
index 406fd5e59a..7712173ed8 100644
--- a/lib/crypto/doc/src/crypto.xml
+++ b/lib/crypto/doc/src/crypto.xml
@@ -4,7 +4,7 @@
<erlref>
<header>
<copyright>
- <year>1999</year><year>2013</year>
+ <year>1999</year><year>2014</year>
<holder>Ericsson AB. All Rights Reserved.</holder>
</copyright>
<legalnotice>
@@ -99,7 +99,9 @@
<p><code>ecdh_private() = key_value() </code></p>
- <p><code>ecdh_params() = ec_named_curve() |
+ <p><code>ecdh_params() = ec_named_curve() | ec_explicit_curve()</code></p>
+
+ <p><code>ec_explicit_curve() =
{ec_field(), Prime :: key_value(), Point :: key_value(), Order :: integer(), CoFactor :: none | integer()} </code></p>
<p><code>ec_field() = {prime_field, Prime :: integer()} |
@@ -114,11 +116,19 @@
secp192k1| secp160r2| secp128r2| secp128r1| sect233r1| sect233k1| sect193r2| sect193r1|
sect131r2| sect131r1| sect283r1| sect283k1| sect163r2| secp256k1| secp160k1| secp160r1|
secp112r2| secp112r1| sect113r2| sect113r1| sect239k1| sect163r1| sect163k1| secp256r1|
- secp192r1 </code></p>
+ secp192r1|
+ brainpoolP160r1| brainpoolP160t1| brainpoolP192r1| brainpoolP192t1| brainpoolP224r1|
+ brainpoolP224t1| brainpoolP256r1| brainpoolP256t1| brainpoolP320r1| brainpoolP320t1|
+ brainpoolP384r1| brainpoolP384t1| brainpoolP512r1| brainpoolP512t1
+ </code>
+ Note that the <em>sect</em> curves are GF2m (characteristic two) curves and are only supported if the
+ underlying OpenSSL has support for them.
+ See also <seealso marker="#supports-0">crypto:supports/0</seealso>
+ </p>
<p><code>stream_cipher() = rc4 | aes_ctr </code></p>
- <p><code>block_cipher() = aes_cbc128 | aes_cfb128 | aes_ige256 | blowfish_cbc |
+ <p><code>block_cipher() = aes_cbc128 | aes_cfb8 | aes_cfb128 | aes_ige256 | blowfish_cbc |
blowfish_cfb64 | des_cbc | des_cfb | des3_cbc | des3_cbf
| des_ede3 | rc2_cbc </code></p>
@@ -142,9 +152,12 @@
Note that both md4 and md5 are recommended only for compatibility with existing applications.
</p>
<p><code> cipher_algorithms() = des_cbc | des_cfb | des3_cbc | des3_cbf | des_ede3 |
- blowfish_cbc | blowfish_cfb64 | aes_cbc128 | aes_cfb128| aes_cbc256 | aes_ige256 | rc2_cbc | aes_ctr| rc4 </code> </p>
- <p><code> public_key_algorithms() = rsa |dss | ecdsa | dh | ecdh </code> </p>
-
+ blowfish_cbc | blowfish_cfb64 | aes_cbc128 | aes_cfb8 | aes_cfb128| aes_cbc256 | aes_ige256 | rc2_cbc | aes_ctr| rc4 </code> </p>
+ <p><code> public_key_algorithms() = rsa |dss | ecdsa | dh | ecdh | ec_gf2m</code>
+ Note that ec_gf2m is not strictly a public key algorithm, but a restriction on what curves are supported
+ with ecdsa and ecdh.
+ </p>
+
</section>
<funcs>
@@ -353,7 +366,11 @@
or to one of the functions <seealso marker="#hmac_final-1">hmac_final</seealso> and
<seealso marker="#hmac_final_n-2">hmac_final_n</seealso>
</p>
-
+ <warning><p>Do not use a <c>Context</c> as argument in more than one
+ call to hmac_update or hmac_final. The semantics of reusing old contexts
+ in any way is undefined and could even crash the VM in earlier releases.
+ The reason for this limitation is a lack of support in the underlying
+ OpenSSL API.</p></warning>
</desc>
</func>
@@ -439,17 +456,17 @@
</func>
<func>
- <name>private_decrypt(Type, ChipherText, PrivateKey, Padding) -> PlainText</name>
- <fsummary>Decrypts ChipherText using the private Key.</fsummary>
+ <name>private_decrypt(Type, CipherText, PrivateKey, Padding) -> PlainText</name>
+ <fsummary>Decrypts CipherText using the private Key.</fsummary>
<type>
<v>Type = rsa</v>
- <v>ChipherText = binary()</v>
+ <v>CipherText = binary()</v>
<v>PrivateKey = rsa_private()</v>
<v>Padding = rsa_pkcs1_padding | rsa_pkcs1_oaep_padding | rsa_no_padding</v>
<v>PlainText = binary()</v>
</type>
<desc>
- <p>Decrypts the <c>ChipherText</c>, encrypted with
+ <p>Decrypts the <c>CipherText</c>, encrypted with
<seealso marker="#public_encrypt-4">public_encrypt/4</seealso> (or equivalent function)
using the <c>PrivateKey</c>, and returns the
plaintext (message digest). This is a low level signature verification operation
@@ -460,7 +477,7 @@
</func>
<func>
- <name>private_encrypt(Type, PlainText, PrivateKey, Padding) -> ChipherText</name>
+ <name>private_encrypt(Type, PlainText, PrivateKey, Padding) -> CipherText</name>
<fsummary>Encrypts PlainText using the private Key.</fsummary>
<type>
<v>Type = rsa</v>
@@ -471,7 +488,7 @@
used, where N is public modulus of the RSA key.</d>
<v>PrivateKey = rsa_private()</v>
<v>Padding = rsa_pkcs1_padding | rsa_no_padding</v>
- <v>ChipherText = binary()</v>
+ <v>CipherText = binary()</v>
</type>
<desc>
<p>Encrypts the <c>PlainText</c> using the <c>PrivateKey</c>
@@ -483,17 +500,17 @@
</desc>
</func>
<func>
- <name>public_decrypt(Type, ChipherText, PublicKey, Padding) -> PlainText</name>
- <fsummary>Decrypts ChipherText using the public Key.</fsummary>
+ <name>public_decrypt(Type, CipherText, PublicKey, Padding) -> PlainText</name>
+ <fsummary>Decrypts CipherText using the public Key.</fsummary>
<type>
<v>Type = rsa</v>
- <v>ChipherText = binary()</v>
+ <v>CipherText = binary()</v>
<v>PublicKey = rsa_public() </v>
<v>Padding = rsa_pkcs1_padding | rsa_no_padding</v>
<v>PlainText = binary()</v>
</type>
<desc>
- <p>Decrypts the <c>ChipherText</c>, encrypted with
+ <p>Decrypts the <c>CipherText</c>, encrypted with
<seealso marker="#private_encrypt-4">private_encrypt/4</seealso>(or equivalent function)
using the <c>PrivateKey</c>, and returns the
plaintext (message digest). This is a low level signature verification operation
@@ -504,7 +521,7 @@
</func>
<func>
- <name>public_encrypt(Type, PlainText, PublicKey, Padding) -> ChipherText</name>
+ <name>public_encrypt(Type, PlainText, PublicKey, Padding) -> CipherText</name>
<fsummary>Encrypts PlainText using the public Key.</fsummary>
<type>
<v>Type = rsa</v>
@@ -515,7 +532,7 @@
used, where N is public modulus of the RSA key.</d>
<v>PublicKey = rsa_public()</v>
<v>Padding = rsa_pkcs1_padding | rsa_pkcs1_oaep_padding | rsa_no_padding</v>
- <v>ChipherText = binary()</v>
+ <v>CipherText = binary()</v>
</type>
<desc>
<p>Encrypts the <c>PlainText</c> (message digest) using the <c>PublicKey</c>
@@ -539,6 +556,21 @@
</desc>
</func>
+ <func>
+ <name>rand_seed(Seed) -> ok</name>
+ <fsummary>Set the seed for random bytes generation</fsummary>
+ <type>
+ <v>Seed = binary()</v>
+ </type>
+ <desc>
+ <p>Set the seed for PRNG to the given binary. This calls the
+ RAND_seed function from openssl. Only use this if the system
+ you are running on does not have enough "randomness" built in.
+ Normally this is when <seealso marker="#strong_rand_bytes/1">
+ stong_rand_bytes/1</seealso> returns <c>low_entropy</c></p>
+ </desc>
+ </func>
+
<func>
<name>rand_uniform(Lo, Hi) -> N</name>
<fsummary>Generate a random number</fsummary>
@@ -680,7 +712,29 @@
</desc>
</func>
-
+ <func>
+ <name>ec_curves() -> EllipticCurveList </name>
+ <fsummary>Provide a list of available named elliptic curves.</fsummary>
+ <type>
+ <v>EllipticCurveList = [ec_named_curve()]</v>
+ </type>
+ <desc>
+ <p>Can be used to determine which named elliptic curves are supported.</p>
+ </desc>
+ </func>
+
+ <func>
+ <name>ec_curve(NamedCurve) -> EllipticCurve </name>
+ <fsummary>Get the defining parameters of a elliptic curve.</fsummary>
+ <type>
+ <v>NamedCurve = ec_named_curve()</v>
+ <v>EllipticCurve = ec_explicit_curve()</v>
+ </type>
+ <desc>
+ <p>Return the defining parameters of a elliptic curve.</p>
+ </desc>
+ </func>
+
<func>
<name>verify(Algorithm, DigestType, Msg, Signature, Key) -> boolean()</name>
<fsummary>Verifies a digital signature.</fsummary>
diff --git a/lib/crypto/doc/src/crypto_app.xml b/lib/crypto/doc/src/crypto_app.xml
index 6d26076c04..1d10773401 100644
--- a/lib/crypto/doc/src/crypto_app.xml
+++ b/lib/crypto/doc/src/crypto_app.xml
@@ -1,11 +1,11 @@
-<?xml version="1.0" encoding="iso-8859-1" ?>
+<?xml version="1.0" encoding="utf-8" ?>
<!DOCTYPE appref SYSTEM "appref.dtd">
<appref>
<header>
<copyright>
<year>1999</year>
- <year>2013</year>
+ <year>2014</year>
<holder>Ericsson AB, All Rights Reserved</holder>
</copyright>
<legalnotice>
diff --git a/lib/crypto/doc/src/notes.xml b/lib/crypto/doc/src/notes.xml
index 53249479f1..34f2e3c469 100644
--- a/lib/crypto/doc/src/notes.xml
+++ b/lib/crypto/doc/src/notes.xml
@@ -30,6 +30,110 @@
</header>
<p>This document describes the changes made to the Crypto application.</p>
+<section><title>Crypto 3.3</title>
+
+ <section><title>Fixed Bugs and Malfunctions</title>
+ <list>
+ <item>
+ <p>
+ Fix memory leaks and invalid deallocations in
+ <c>mod_pow</c>, <c>mod_exp</c> and
+ <c>generate_key(srp,...)</c> when bad arguments are
+ passed. (Thanks to Florian Zumbiehi)</p>
+ <p>
+ Own Id: OTP-11550</p>
+ </item>
+ <item>
+ <p>
+ Correction of the word 'ChipherText' throughout the
+ documentation (Thanks to Andrew Tunnell-Jones)</p>
+ <p>
+ Own Id: OTP-11609</p>
+ </item>
+ <item>
+ <p>
+ Fix fatal bug when using a hmac context variable in more
+ than one call to <c>hmac_update</c> or <c>hmac_final</c>.
+ The reuse of hmac contexts has never worked as the
+ underlying OpenSSL implementation does not support it. It
+ is now documented as having undefined behaviour, but it
+ does not crash or corrupt the VM anymore.</p>
+ <p>
+ Own Id: OTP-11724</p>
+ </item>
+ <item>
+ <p>
+ Crypto handles out-of-memory with a controlled abort
+ instead of crash/corruption. (Thanks to Florian Zumbiehi)</p>
+ <p>
+ Own Id: OTP-11725</p>
+ </item>
+ <item>
+ <p>
+ Application upgrade (appup) files are corrected for the
+ following applications: </p>
+ <p>
+ <c>asn1, common_test, compiler, crypto, debugger,
+ dialyzer, edoc, eldap, erl_docgen, et, eunit, gs, hipe,
+ inets, observer, odbc, os_mon, otp_mibs, parsetools,
+ percept, public_key, reltool, runtime_tools, ssh,
+ syntax_tools, test_server, tools, typer, webtool, wx,
+ xmerl</c></p>
+ <p>
+ A new test utility for testing appup files is added to
+ test_server. This is now used by most applications in
+ OTP.</p>
+ <p>
+ (Thanks to Tobias Schlager)</p>
+ <p>
+ Own Id: OTP-11744</p>
+ </item>
+ </list>
+ </section>
+
+
+ <section><title>Improvements and New Features</title>
+ <list>
+ <item>
+ <p>
+ By giving --enable-static-{nifs,drivers} to configure it
+ is now possible to statically linking of nifs and drivers
+ to the main Erlang VM binary. At the moment only the asn1
+ and crypto nifs of the Erlang/OTP nifs and drivers have
+ been prepared to be statically linked. For more details
+ see the Installation Guide in the System documentation.</p>
+ <p>
+ Own Id: OTP-11258</p>
+ </item>
+ <item>
+ <p>
+ Add IGE mode for AES cipher in crypto (Thanks to Yura
+ Beznos).</p>
+ <p>
+ Own Id: OTP-11522</p>
+ </item>
+ <item>
+ <p>
+ Moved elliptic curve definition from the crypto
+ NIF/OpenSSL into Erlang code, adds the RFC-5639 brainpool
+ curves and makes TLS use them (RFC-7027).</p>
+ <p>
+ Thanks to Andreas Schultz</p>
+ <p>
+ Own Id: OTP-11578</p>
+ </item>
+ <item>
+ <p>
+ Remove all obsolete application processes from crypto and
+ make it into a pure library application.</p>
+ <p>
+ Own Id: OTP-11619</p>
+ </item>
+ </list>
+ </section>
+
+</section>
+
<section><title>Crypto 3.2</title>
<section><title>Fixed Bugs and Malfunctions</title>
diff --git a/lib/crypto/src/Makefile b/lib/crypto/src/Makefile
index 574c2076f2..c185c159e5 100644
--- a/lib/crypto/src/Makefile
+++ b/lib/crypto/src/Makefile
@@ -1,7 +1,7 @@
#
# %CopyrightBegin%
#
-# Copyright Ericsson AB 1999-2013. All Rights Reserved.
+# Copyright Ericsson AB 1999-2014. 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
@@ -35,10 +35,8 @@ RELSYSDIR = $(RELEASE_PATH)/lib/crypto-$(VSN)
# ----------------------------------------------------
MODULES= \
- crypto_app \
crypto \
- crypto_server \
- crypto_sup
+ crypto_ec_curves
HRL_FILES=
diff --git a/lib/crypto/src/crypto.app.src b/lib/crypto/src/crypto.app.src
index 5548b6a1b5..823a27ee39 100644
--- a/lib/crypto/src/crypto.app.src
+++ b/lib/crypto/src/crypto.app.src
@@ -1,7 +1,7 @@
%%
%% %CopyrightBegin%
%%
-%% Copyright Ericsson AB 1999-2010. All Rights Reserved.
+%% Copyright Ericsson AB 1999-2014. 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
@@ -17,15 +17,13 @@
%% %CopyrightEnd%
%%
{application, crypto,
- [{description, "CRYPTO version 2"},
+ [{description, "CRYPTO"},
{vsn, "%VSN%"},
{modules, [crypto,
- crypto_app,
- crypto_sup,
- crypto_server]},
- {registered, [crypto_sup, crypto_server]},
+ crypto_ec_curves]},
+ {registered, []},
{applications, [kernel, stdlib]},
{env, []},
- {mod, {crypto_app, []}}]}.
+ {runtime_dependencies, ["erts-6.0","stdlib-2.0","kernel-3.0"]}]}.
diff --git a/lib/crypto/src/crypto.appup.src b/lib/crypto/src/crypto.appup.src
index 5b4ce5acee..42816773c1 100644
--- a/lib/crypto/src/crypto.appup.src
+++ b/lib/crypto/src/crypto.appup.src
@@ -2,7 +2,7 @@
%%
%% %CopyrightBegin%
%%
-%% Copyright Ericsson AB 1999-2013. All Rights Reserved.
+%% Copyright Ericsson AB 1999-2014. 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
@@ -16,13 +16,7 @@
%% under the License.
%%
%% %CopyrightEnd%
-%%
{"%VSN%",
- [
- {<<"2\\.*">>, [{restart_application, crypto}]}
- {<<"1\\.*">>, [{restart_application, crypto}]}
- ],
- [
- {<<"2\\.*">>, [{restart_application, crypto}]}
- {<<"1\\.*">>, [{restart_application, crypto}]}
- ]}.
+ [{<<".*">>,[{restart_application, crypto}]}],
+ [{<<".*">>,[{restart_application, crypto}]}]
+}.
diff --git a/lib/crypto/src/crypto.erl b/lib/crypto/src/crypto.erl
index 12ff060bf9..e1fbbf9ab8 100644
--- a/lib/crypto/src/crypto.erl
+++ b/lib/crypto/src/crypto.erl
@@ -34,6 +34,8 @@
-export([public_encrypt/4, private_decrypt/4]).
-export([private_encrypt/4, public_decrypt/4]).
-export([dh_generate_parameters/2, dh_check/1]). %% Testing see
+-export([ec_curve/1, ec_curves/0]).
+-export([rand_seed/1]).
%% DEPRECATED
%% Replaced by hash_*
@@ -208,7 +210,7 @@ supports()->
[{hashs, Hashs},
{ciphers, [des_cbc, des_cfb, des3_cbc, des_ede3, blowfish_cbc,
- blowfish_cfb64, blowfish_ofb64, blowfish_ecb, aes_cbc128, aes_cfb128,
+ blowfish_cfb64, blowfish_ofb64, blowfish_ecb, aes_cbc128, aes_cfb8, aes_cfb128,
aes_cbc256, rc2_cbc, aes_ctr, rc4] ++ Ciphers},
{public_keys, [rsa, dss, dh, srp] ++ PubKeys}
].
@@ -279,7 +281,7 @@ hmac_final_n(_Context, _HashLen) -> ? nif_stub.
%% Ecrypt/decrypt %%%
-spec block_encrypt(des_cbc | des_cfb | des3_cbc | des3_cbf | des_ede3 | blowfish_cbc |
- blowfish_cfb64 | aes_cbc128 | aes_cfb128 | aes_cbc256 | rc2_cbc,
+ blowfish_cfb64 | aes_cbc128 | aes_cfb8 | aes_cfb128 | aes_cbc256 | rc2_cbc,
Key::iodata(), Ivec::binary(), Data::iodata()) -> binary().
block_encrypt(des_cbc, Key, Ivec, Data) ->
@@ -304,6 +306,8 @@ block_encrypt(aes_cbc256, Key, Ivec, Data) ->
aes_cbc_256_encrypt(Key, Ivec, Data);
block_encrypt(aes_ige256, Key, Ivec, Data) ->
aes_ige_256_encrypt(Key, Ivec, Data);
+block_encrypt(aes_cfb8, Key, Ivec, Data) ->
+ aes_cfb_8_encrypt(Key, Ivec, Data);
block_encrypt(aes_cfb128, Key, Ivec, Data) ->
aes_cfb_128_encrypt(Key, Ivec, Data);
block_encrypt(rc2_cbc, Key, Ivec, Data) ->
@@ -311,7 +315,7 @@ block_encrypt(rc2_cbc, Key, Ivec, Data) ->
-spec block_decrypt(des_cbc | des_cfb | des3_cbc | des3_cbf | des_ede3 | blowfish_cbc |
blowfish_cfb64 | blowfish_ofb64 | aes_cbc128 | aes_cbc256 | aes_ige256 |
- aes_cfb128 | rc2_cbc,
+ aes_cfb8 | aes_cfb128 | rc2_cbc,
Key::iodata(), Ivec::binary(), Data::iodata()) -> binary().
block_decrypt(des_cbc, Key, Ivec, Data) ->
@@ -336,6 +340,8 @@ block_decrypt(aes_cbc256, Key, Ivec, Data) ->
aes_cbc_256_decrypt(Key, Ivec, Data);
block_decrypt(aes_ige256, Key, Ivec, Data) ->
aes_ige_256_decrypt(Key, Ivec, Data);
+block_decrypt(aes_cfb8, Key, Ivec, Data) ->
+ aes_cfb_8_decrypt(Key, Ivec, Data);
block_decrypt(aes_cfb128, Key, Ivec, Data) ->
aes_cfb_128_decrypt(Key, Ivec, Data);
block_decrypt(rc2_cbc, Key, Ivec, Data) ->
@@ -436,6 +442,11 @@ rand_uniform_pos(_,_) ->
rand_uniform_nif(_From,_To) -> ?nif_stub.
+-spec rand_seed(binary()) -> ok.
+rand_seed(Seed) ->
+ rand_seed_nif(Seed).
+
+rand_seed_nif(_Seed) -> ?nif_stub.
-spec mod_pow(binary()|integer(), binary()|integer(), binary()|integer()) -> binary() | error.
mod_pow(Base, Exponent, Prime) ->
@@ -557,7 +568,7 @@ generate_key(srp, {user, [Generator, Prime, Version]}, PrivateArg)
user_srp_gen_key(Private, Generator, Prime);
generate_key(ecdh, Curve, undefined) ->
- ec_key_generate(Curve).
+ ec_key_generate(nif_curve_params(Curve)).
compute_key(dh, OthersPublicKey, MyPrivateKey, DHParameters) ->
@@ -1152,7 +1163,21 @@ blowfish_ofb64_encrypt(_Key, _IVec, _Data) -> ?nif_stub.
%%
-%% AES in cipher feedback mode (CFB)
+%% AES in cipher feedback mode (CFB) - 8 bit shift
+%%
+-spec aes_cfb_8_encrypt(iodata(), binary(), iodata()) -> binary().
+-spec aes_cfb_8_decrypt(iodata(), binary(), iodata()) -> binary().
+
+aes_cfb_8_encrypt(Key, IVec, Data) ->
+ aes_cfb_8_crypt(Key, IVec, Data, true).
+
+aes_cfb_8_decrypt(Key, IVec, Data) ->
+ aes_cfb_8_crypt(Key, IVec, Data, false).
+
+aes_cfb_8_crypt(_Key, _IVec, _Data, _IsEncrypt) -> ?nif_stub.
+
+%%
+%% AES in cipher feedback mode (CFB) - 128 bit shift
%%
-spec aes_cfb_128_encrypt(iodata(), binary(), iodata()) -> binary().
-spec aes_cfb_128_decrypt(iodata(), binary(), iodata()) -> binary().
@@ -1502,21 +1527,27 @@ ec_key_generate(_Key) -> ?nif_stub.
ecdh_compute_key_nif(_Others, _Curve, _My) -> ?nif_stub.
+ec_curves() ->
+ crypto_ec_curves:curves().
+
+ec_curve(X) ->
+ crypto_ec_curves:curve(X).
+
%%
%% EC
%%
term_to_nif_prime({prime_field, Prime}) ->
- {prime_field, int_to_bin(Prime)};
+ {prime_field, ensure_int_as_bin(Prime)};
term_to_nif_prime(PrimeField) ->
PrimeField.
term_to_nif_curve({A, B, Seed}) ->
{ensure_int_as_bin(A), ensure_int_as_bin(B), Seed}.
nif_curve_params({PrimeField, Curve, BasePoint, Order, CoFactor}) ->
- {term_to_nif_prime(PrimeField), term_to_nif_curve(Curve), ensure_int_as_bin(BasePoint), int_to_bin(Order), int_to_bin(CoFactor)};
+ {term_to_nif_prime(PrimeField), term_to_nif_curve(Curve), ensure_int_as_bin(BasePoint), ensure_int_as_bin(Order), ensure_int_as_bin(CoFactor)};
nif_curve_params(Curve) when is_atom(Curve) ->
%% named curve
- Curve.
+ crypto_ec_curves:curve(Curve).
%% MISC --------------------------------------------------------------------
@@ -1767,6 +1798,7 @@ mod_exp_nif(_Base,_Exp,_Mod,_bin_hdr) -> ?nif_stub.
rand_bytes,
strong_rand_bytes,
rand_uniform,
+ rand_seed,
mod_pow,
exor,
%% deprecated
diff --git a/lib/crypto/src/crypto_ec_curves.erl b/lib/crypto/src/crypto_ec_curves.erl
new file mode 100644
index 0000000000..fe17643d96
--- /dev/null
+++ b/lib/crypto/src/crypto_ec_curves.erl
@@ -0,0 +1,1215 @@
+-module(crypto_ec_curves).
+
+-export([curve/1, curves/0]).
+
+curves() ->
+ CryptoSupport = crypto:supports(),
+ HasGF2m = proplists:get_bool(ec_gf2m, proplists:get_value(public_keys, CryptoSupport)),
+ prime_curves() ++ characteristic_two_curves(HasGF2m).
+
+
+prime_curves() ->
+ [secp112r1,secp112r2,secp128r1,secp128r2,secp160k1,secp160r1,secp160r2,
+ secp192r1,secp192k1,secp224k1,secp224r1,secp256k1,secp256r1,secp384r1,
+ secp521r1,prime192v1,prime192v2,prime192v3,prime239v1,prime239v2,prime239v3,
+ prime256v1,wtls6,wtls7,wtls8,wtls9,wtls12,
+ brainpoolP160r1,brainpoolP160t1,brainpoolP192r1,brainpoolP192t1,
+ brainpoolP224r1,brainpoolP224t1,brainpoolP256r1,brainpoolP256t1,
+ brainpoolP320r1,brainpoolP320t1,brainpoolP384r1,brainpoolP384t1,
+ brainpoolP512r1,brainpoolP512t1].
+
+characteristic_two_curves(true) ->
+ [sect113r1,sect113r2,sect131r1,sect131r2,sect163k1,sect163r1,
+ sect163r2,sect193r1,sect193r2,sect233k1,sect233r1,sect239k1,sect283k1,
+ sect283r1,sect409k1,sect409r1,sect571k1,sect571r1,c2pnb163v1,c2pnb163v2,
+ c2pnb163v3,c2pnb176v1,c2tnb191v1,c2tnb191v2,c2tnb191v3,c2pnb208w1,c2tnb239v1,
+ c2tnb239v2,c2tnb239v3,c2pnb272w1,c2pnb304w1,c2tnb359v1,c2pnb368w1,c2tnb431r1,
+ wtls1,wtls3,wtls4,wtls5,wtls10,wtls11,ipsec3,ipsec4];
+characteristic_two_curves(_) ->
+ [].
+
+curve(secp112r1) ->
+ {
+ {prime_field, <<16#DB7C2ABF62E35E668076BEAD208B:112>>}, %% Prime
+ {<<16#DB7C2ABF62E35E668076BEAD2088:112>>, %% A
+ <<16#659EF8BA043916EEDE8911702B22:112>>, %% B
+ <<16#00F50B028E4D696E676875615175290472783FB1:160>>}, %% Seed
+ <<16#04:8,
+ 16#09487239995A5EE76B55F9C2F098:112, %% X(p0)
+ 16#A89CE5AF8724C0A23E0E0FF77500:112>>, %% Y(p0)
+ <<16#DB7C2ABF62E35E7628DFAC6561C5:112>>, %% Order
+ <<16#01:8>> %% CoFactor
+ };
+
+curve(secp112r2) ->
+ {
+ {prime_field, <<16#DB7C2ABF62E35E668076BEAD208B:112>>}, %% Prime
+ {<<16#6127C24C05F38A0AAAF65C0EF02C:112>>, %% A
+ <<16#51DEF1815DB5ED74FCC34C85D709:112>>, %% B
+ <<16#002757A1114D696E6768756151755316C05E0BD4:160>>}, %% Seed
+ <<16#04:8,
+ 16#4BA30AB5E892B4E1649DD0928643:112, %% X(p0)
+ 16#ADCD46F5882E3747DEF36E956E97:112>>, %% Y(p0)
+ <<16#36DF0AAFD8B8D7597CA10520D04B:112>>, %% Order
+ <<16#04:8>> %% CoFactor
+ };
+
+curve(secp128r1) ->
+ {
+ {prime_field, <<16#FFFFFFFDFFFFFFFFFFFFFFFFFFFFFFFF:128>>}, %% Prime
+ {<<16#FFFFFFFDFFFFFFFFFFFFFFFFFFFFFFFC:128>>, %% A
+ <<16#E87579C11079F43DD824993C2CEE5ED3:128>>, %% B
+ <<16#000E0D4D696E6768756151750CC03A4473D03679:160>>}, %% Seed
+ <<16#04:8,
+ 16#161FF7528B899B2D0C28607CA52C5B86:128, %% X(p0)
+ 16#CF5AC8395BAFEB13C02DA292DDED7A83:128>>, %% Y(p0)
+ <<16#FFFFFFFE0000000075A30D1B9038A115:128>>, %% Order
+ <<16#01:8>> %% CoFactor
+ };
+
+curve(secp128r2) ->
+ {
+ {prime_field, <<16#FFFFFFFDFFFFFFFFFFFFFFFFFFFFFFFF:128>>}, %% Prime
+ {<<16#D6031998D1B3BBFEBF59CC9BBFF9AEE1:128>>, %% A
+ <<16#5EEEFCA380D02919DC2C6558BB6D8A5D:128>>, %% B
+ <<16#004D696E67687561517512D8F03431FCE63B88F4:160>>}, %% Seed
+ <<16#04:8,
+ 16#7B6AA5D85E572983E6FB32A7CDEBC140:128, %% X(p0)
+ 16#27B6916A894D3AEE7106FE805FC34B44:128>>, %% Y(p0)
+ <<16#3FFFFFFF7FFFFFFFBE0024720613B5A3:128>>, %% Order
+ <<16#04:8>> %% CoFactor
+ };
+
+curve(secp160k1) ->
+ {
+ {prime_field, <<16#FFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFEFFFFAC73:160>>}, %% Prime
+ {<<16#00:8>>, %% A
+ <<16#07:8>>, %% B
+ none}, %% Seed
+ <<16#04:8,
+ 16#3B4C382CE37AA192A4019E763036F4F5DD4D7EBB:160, %% X(p0)
+ 16#938CF935318FDCED6BC28286531733C3F03C4FEE:160>>, %% Y(p0)
+ <<16#0100000000000000000001B8FA16DFAB9ACA16B6B3:168>>, %% Order
+ <<16#01:8>> %% CoFactor
+ };
+
+curve(secp160r1) ->
+ {
+ {prime_field, <<16#FFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFF7FFFFFFF:160>>}, %% Prime
+ {<<16#FFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFF7FFFFFFC:160>>, %% A
+ <<16#1C97BEFC54BD7A8B65ACF89F81D4D4ADC565FA45:160>>, %% B
+ <<16#1053CDE42C14D696E67687561517533BF3F83345:160>>}, %% Seed
+ <<16#04:8,
+ 16#4A96B5688EF573284664698968C38BB913CBFC82:160, %% X(p0)
+ 16#23A628553168947D59DCC912042351377AC5FB32:160>>, %% Y(p0)
+ <<16#0100000000000000000001F4C8F927AED3CA752257:168>>, %% Order
+ <<16#01:8>> %% CoFactor
+ };
+
+curve(secp160r2) ->
+ {
+ {prime_field, <<16#FFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFEFFFFAC73:160>>}, %% Prime
+ {<<16#FFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFEFFFFAC70:160>>, %% A
+ <<16#B4E134D3FB59EB8BAB57274904664D5AF50388BA:160>>, %% B
+ <<16#B99B99B099B323E02709A4D696E6768756151751:160>>}, %% Seed
+ <<16#04:8,
+ 16#52DCB034293A117E1F4FF11B30F7199D3144CE6D:160, %% X(p0)
+ 16#FEAFFEF2E331F296E071FA0DF9982CFEA7D43F2E:160>>, %% Y(p0)
+ <<16#0100000000000000000000351EE786A818F3A1A16B:168>>, %% Order
+ <<16#01:8>> %% CoFactor
+ };
+
+curve(secp192r1) ->
+ {
+ {prime_field, <<16#FFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFEFFFFFFFFFFFFFFFF:192>>}, %% Prime
+ {<<16#FFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFEFFFFFFFFFFFFFFFC:192>>, %% A
+ <<16#64210519E59C80E70FA7E9AB72243049FEB8DEECC146B9B1:192>>, %% B
+ <<16#3045AE6FC8422F64ED579528D38120EAE12196D5:160>>}, %% Seed
+ <<16#04:8,
+ 16#188DA80EB03090F67CBF20EB43A18800F4FF0AFD82FF1012:192, %% X(p0)
+ 16#07192B95FFC8DA78631011ED6B24CDD573F977A11E794811:192>>, %% Y(p0)
+ <<16#FFFFFFFFFFFFFFFFFFFFFFFF99DEF836146BC9B1B4D22831:192>>, %% Order
+ <<16#01:8>> %% CoFactor
+ };
+
+curve(secp192k1) ->
+ {
+ {prime_field, <<16#FFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFEFFFFEE37:192>>}, %% Prime
+ {<<16#00:8>>, %% A
+ <<16#03:8>>, %% B
+ none}, %% Seed
+ <<16#04:8,
+ 16#DB4FF10EC057E9AE26B07D0280B7F4341DA5D1B1EAE06C7D:192, %% X(p0)
+ 16#9B2F2F6D9C5628A7844163D015BE86344082AA88D95E2F9D:192>>, %% Y(p0)
+ <<16#FFFFFFFFFFFFFFFFFFFFFFFE26F2FC170F69466A74DEFD8D:192>>, %% Order
+ <<16#01:8>> %% CoFactor
+ };
+
+curve(secp224k1) ->
+ {
+ {prime_field, <<16#FFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFEFFFFE56D:224>>}, %% Prime
+ {<<16#00:8>>, %% A
+ <<16#05:8>>, %% B
+ none}, %% Seed
+ <<16#04:8,
+ 16#A1455B334DF099DF30FC28A169A467E9E47075A90F7E650EB6B7A45C:224, %% X(p0)
+ 16#7E089FED7FBA344282CAFBD6F7E319F7C0B0BD59E2CA4BDB556D61A5:224>>, %% Y(p0)
+ <<16#010000000000000000000000000001DCE8D2EC6184CAF0A971769FB1F7:232>>, %% Order
+ <<16#01:8>> %% CoFactor
+ };
+
+curve(secp224r1) ->
+ {
+ {prime_field, <<16#FFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFF000000000000000000000001:224>>}, %% Prime
+ {<<16#FFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFEFFFFFFFFFFFFFFFFFFFFFFFE:224>>, %% A
+ <<16#B4050A850C04B3ABF54132565044B0B7D7BFD8BA270B39432355FFB4:224>>, %% B
+ <<16#BD71344799D5C7FCDC45B59FA3B9AB8F6A948BC5:160>>}, %% Seed
+ <<16#04:8,
+ 16#B70E0CBD6BB4BF7F321390B94A03C1D356C21122343280D6115C1D21:224, %% X(p0)
+ 16#BD376388B5F723FB4C22DFE6CD4375A05A07476444D5819985007E34:224>>, %% Y(p0)
+ <<16#FFFFFFFFFFFFFFFFFFFFFFFFFFFF16A2E0B8F03E13DD29455C5C2A3D:224>>, %% Order
+ <<16#01:8>> %% CoFactor
+ };
+
+curve(secp256k1) ->
+ {
+ {prime_field, <<16#FFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFEFFFFFC2F:256>>}, %% Prime
+ {<<16#00:8>>, %% A
+ <<16#07:8>>, %% B
+ none}, %% Seed
+ <<16#04:8,
+ 16#79BE667EF9DCBBAC55A06295CE870B07029BFCDB2DCE28D959F2815B16F81798:256, %% X(p0)
+ 16#483ADA7726A3C4655DA4FBFC0E1108A8FD17B448A68554199C47D08FFB10D4B8:256>>, %% Y(p0)
+ <<16#FFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFEBAAEDCE6AF48A03BBFD25E8CD0364141:256>>, %% Order
+ <<16#01:8>> %% CoFactor
+ };
+
+curve(secp256r1) ->
+ {
+ {prime_field, <<16#FFFFFFFF00000001000000000000000000000000FFFFFFFFFFFFFFFFFFFFFFFF:256>>}, %% Prime
+ {<<16#FFFFFFFF00000001000000000000000000000000FFFFFFFFFFFFFFFFFFFFFFFC:256>>, %% A
+ <<16#5AC635D8AA3A93E7B3EBBD55769886BC651D06B0CC53B0F63BCE3C3E27D2604B:256>>, %% B
+ <<16#C49D360886E704936A6678E1139D26B7819F7E90:160>>}, %% Seed
+ <<16#04:8,
+ 16#6B17D1F2E12C4247F8BCE6E563A440F277037D812DEB33A0F4A13945D898C296:256, %% X(p0)
+ 16#4FE342E2FE1A7F9B8EE7EB4A7C0F9E162BCE33576B315ECECBB6406837BF51F5:256>>, %% Y(p0)
+ <<16#FFFFFFFF00000000FFFFFFFFFFFFFFFFBCE6FAADA7179E84F3B9CAC2FC632551:256>>, %% Order
+ <<16#01:8>> %% CoFactor
+ };
+
+curve(secp384r1) ->
+ {
+ {prime_field, <<16#FFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFE:256, %% Prime
+ 16#FFFFFFFF0000000000000000FFFFFFFF:128>>},
+ {<<16#FFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFE:256, %% A
+ 16#FFFFFFFF0000000000000000FFFFFFFC:128>>,
+ <<16#B3312FA7E23EE7E4988E056BE3F82D19181D9C6EFE8141120314088F5013875A:256, %% B
+ 16#C656398D8A2ED19D2A85C8EDD3EC2AEF:128>>,
+ <<16#A335926AA319A27A1D00896A6773A4827ACDAC73:160>>}, %% Seed
+ <<16#04:8,
+ 16#AA87CA22BE8B05378EB1C71EF320AD746E1D3B628BA79B9859F741E082542A38:256, %% X(p0)
+ 16#5502F25DBF55296C3A545E3872760AB7:128,
+ 16#3617DE4A96262C6F5D9E98BF9292DC29F8F41DBD289A147CE9DA3113B5F0B8C0:256, %% Y(p0)
+ 16#0A60B1CE1D7E819D7A431D7C90EA0E5F:128>>,
+ <<16#FFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFC7634D81F4372DDF:256, %% Order
+ 16#581A0DB248B0A77AECEC196ACCC52973:128>>,
+ <<16#01:8>> %% CoFactor
+ };
+
+curve(secp521r1) ->
+ {
+ {prime_field, <<16#01FFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFF:256, %% Prime
+ 16#FFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFF:256,
+ 16#FFFF:16>>},
+ {<<16#01FFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFF:256, %% A
+ 16#FFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFF:256,
+ 16#FFFC:16>>,
+ <<16#51953EB9618E1C9A1F929A21A0B68540EEA2DA725B99B315F3B8B489918EF109:256, %% B
+ 16#E156193951EC7E937B1652C0BD3BB1BF073573DF883D2C34F1EF451FD46B503F:256,
+ 16#00:8>>,
+ <<16#D09E8800291CB85396CC6717393284AAA0DA64BA:160>>}, %% Seed
+ <<16#04:8,
+ 16#00C6858E06B70404E9CD9E3ECB662395B4429C648139053FB521F828AF606B4D:256, %% X(p0)
+ 16#3DBAA14B5E77EFE75928FE1DC127A2FFA8DE3348B3C1856A429BF97E7E31C2E5:256,
+ 16#BD66:16,
+ 16#011839296A789A3BC0045C8A5FB42C7D1BD998F54449579B446817AFBD17273E:256, %% Y(p0)
+ 16#662C97EE72995EF42640C550B9013FAD0761353C7086A272C24088BE94769FD1:256,
+ 16#6650:16>>,
+ <<16#01FFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFF:256, %% Order
+ 16#FFFA51868783BF2F966B7FCC0148F709A5D03BB5C9B8899C47AEBB6FB71E9138:256,
+ 16#6409:16>>,
+ <<16#01:8>> %% CoFactor
+ };
+
+curve(prime192v1) ->
+ {
+ {prime_field, <<16#FFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFEFFFFFFFFFFFFFFFF:192>>}, %% Prime
+ {<<16#FFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFEFFFFFFFFFFFFFFFC:192>>, %% A
+ <<16#64210519E59C80E70FA7E9AB72243049FEB8DEECC146B9B1:192>>, %% B
+ <<16#3045AE6FC8422F64ED579528D38120EAE12196D5:160>>}, %% Seed
+ <<16#04:8,
+ 16#188DA80EB03090F67CBF20EB43A18800F4FF0AFD82FF1012:192, %% X(p0)
+ 16#07192B95FFC8DA78631011ED6B24CDD573F977A11E794811:192>>, %% Y(p0)
+ <<16#FFFFFFFFFFFFFFFFFFFFFFFF99DEF836146BC9B1B4D22831:192>>, %% Order
+ <<16#01:8>> %% CoFactor
+ };
+
+curve(prime192v2) ->
+ {
+ {prime_field, <<16#FFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFEFFFFFFFFFFFFFFFF:192>>}, %% Prime
+ {<<16#FFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFEFFFFFFFFFFFFFFFC:192>>, %% A
+ <<16#CC22D6DFB95C6B25E49C0D6364A4E5980C393AA21668D953:192>>, %% B
+ <<16#31A92EE2029FD10D901B113E990710F0D21AC6B6:160>>}, %% Seed
+ <<16#04:8,
+ 16#EEA2BAE7E1497842F2DE7769CFE9C989C072AD696F48034A:192, %% X(p0)
+ 16#6574D11D69B6EC7A672BB82A083DF2F2B0847DE970B2DE15:192>>, %% Y(p0)
+ <<16#FFFFFFFFFFFFFFFFFFFFFFFE5FB1A724DC80418648D8DD31:192>>, %% Order
+ <<16#01:8>> %% CoFactor
+ };
+
+curve(prime192v3) ->
+ {
+ {prime_field, <<16#FFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFEFFFFFFFFFFFFFFFF:192>>}, %% Prime
+ {<<16#FFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFEFFFFFFFFFFFFFFFC:192>>, %% A
+ <<16#22123DC2395A05CAA7423DAECCC94760A7D462256BD56916:192>>, %% B
+ <<16#C469684435DEB378C4B65CA9591E2A5763059A2E:160>>}, %% Seed
+ <<16#04:8,
+ 16#7D29778100C65A1DA1783716588DCE2B8B4AEE8E228F1896:192, %% X(p0)
+ 16#38A90F22637337334B49DCB66A6DC8F9978ACA7648A943B0:192>>, %% Y(p0)
+ <<16#FFFFFFFFFFFFFFFFFFFFFFFF7A62D031C83F4294F640EC13:192>>, %% Order
+ <<16#01:8>> %% CoFactor
+ };
+
+curve(prime239v1) ->
+ {
+ {prime_field, <<16#7FFFFFFFFFFFFFFFFFFFFFFF7FFFFFFFFFFF8000000000007FFFFFFFFFFF:240>>}, %% Prime
+ {<<16#7FFFFFFFFFFFFFFFFFFFFFFF7FFFFFFFFFFF8000000000007FFFFFFFFFFC:240>>, %% A
+ <<16#6B016C3BDCF18941D0D654921475CA71A9DB2FB27D1D37796185C2942C0A:240>>, %% B
+ <<16#E43BB460F0B80CC0C0B075798E948060F8321B7D:160>>}, %% Seed
+ <<16#04:8,
+ 16#0FFA963CDCA8816CCC33B8642BEDF905C3D358573D3F27FBBD3B3CB9AAAF:240, %% X(p0)
+ 16#7DEBE8E4E90A5DAE6E4054CA530BA04654B36818CE226B39FCCB7B02F1AE:240>>, %% Y(p0)
+ <<16#7FFFFFFFFFFFFFFFFFFFFFFF7FFFFF9E5E9A9F5D9071FBD1522688909D0B:240>>, %% Order
+ <<16#01:8>> %% CoFactor
+ };
+
+curve(prime239v2) ->
+ {
+ {prime_field, <<16#7FFFFFFFFFFFFFFFFFFFFFFF7FFFFFFFFFFF8000000000007FFFFFFFFFFF:240>>}, %% Prime
+ {<<16#7FFFFFFFFFFFFFFFFFFFFFFF7FFFFFFFFFFF8000000000007FFFFFFFFFFC:240>>, %% A
+ <<16#617FAB6832576CBBFED50D99F0249C3FEE58B94BA0038C7AE84C8C832F2C:240>>, %% B
+ <<16#E8B4011604095303CA3B8099982BE09FCB9AE616:160>>}, %% Seed
+ <<16#04:8,
+ 16#38AF09D98727705120C921BB5E9E26296A3CDCF2F35757A0EAFD87B830E7:240, %% X(p0)
+ 16#5B0125E4DBEA0EC7206DA0FC01D9B081329FB555DE6EF460237DFF8BE4BA:240>>, %% Y(p0)
+ <<16#7FFFFFFFFFFFFFFFFFFFFFFF800000CFA7E8594377D414C03821BC582063:240>>, %% Order
+ <<16#01:8>> %% CoFactor
+ };
+
+curve(prime239v3) ->
+ {
+ {prime_field, <<16#7FFFFFFFFFFFFFFFFFFFFFFF7FFFFFFFFFFF8000000000007FFFFFFFFFFF:240>>}, %% Prime
+ {<<16#7FFFFFFFFFFFFFFFFFFFFFFF7FFFFFFFFFFF8000000000007FFFFFFFFFFC:240>>, %% A
+ <<16#255705FA2A306654B1F4CB03D6A750A30C250102D4988717D9BA15AB6D3E:240>>, %% B
+ <<16#7D7374168FFE3471B60A857686A19475D3BFA2FF:160>>}, %% Seed
+ <<16#04:8,
+ 16#6768AE8E18BB92CFCF005C949AA2C6D94853D0E660BBF854B1C9505FE95A:240, %% X(p0)
+ 16#1607E6898F390C06BC1D552BAD226F3B6FCFE48B6E818499AF18E3ED6CF3:240>>, %% Y(p0)
+ <<16#7FFFFFFFFFFFFFFFFFFFFFFF7FFFFF975DEB41B3A6057C3C432146526551:240>>, %% Order
+ <<16#01:8>> %% CoFactor
+ };
+
+curve(prime256v1) ->
+ {
+ {prime_field, <<16#FFFFFFFF00000001000000000000000000000000FFFFFFFFFFFFFFFFFFFFFFFF:256>>}, %% Prime
+ {<<16#FFFFFFFF00000001000000000000000000000000FFFFFFFFFFFFFFFFFFFFFFFC:256>>, %% A
+ <<16#5AC635D8AA3A93E7B3EBBD55769886BC651D06B0CC53B0F63BCE3C3E27D2604B:256>>, %% B
+ <<16#C49D360886E704936A6678E1139D26B7819F7E90:160>>}, %% Seed
+ <<16#04:8,
+ 16#6B17D1F2E12C4247F8BCE6E563A440F277037D812DEB33A0F4A13945D898C296:256, %% X(p0)
+ 16#4FE342E2FE1A7F9B8EE7EB4A7C0F9E162BCE33576B315ECECBB6406837BF51F5:256>>, %% Y(p0)
+ <<16#FFFFFFFF00000000FFFFFFFFFFFFFFFFBCE6FAADA7179E84F3B9CAC2FC632551:256>>, %% Order
+ <<16#01:8>> %% CoFactor
+ };
+
+curve(sect113r1) ->
+ {
+ {characteristic_two_field, 113, {tpbasis,9}},
+ {<<16#3088250CA6E7C7FE649CE85820F7:112>>, %% A
+ <<16#E8BEE4D3E2260744188BE0E9C723:112>>, %% B
+ <<16#10E723AB14D696E6768756151756FEBF8FCB49A9:160>>}, %% Seed
+ <<16#04:8,
+ 16#009D73616F35F4AB1407D73562C10F:120, %% X(p0)
+ 16#00A52830277958EE84D1315ED31886:120>>, %% Y(p0)
+ <<16#0100000000000000D9CCEC8A39E56F:120>>, %% Order
+ <<16#02:8>> %% CoFactor
+ };
+
+curve(sect113r2) ->
+ {
+ {characteristic_two_field, 113, {tpbasis,9}},
+ {<<16#689918DBEC7E5A0DD6DFC0AA55C7:112>>, %% A
+ <<16#95E9A9EC9B297BD4BF36E059184F:112>>, %% B
+ <<16#10C0FB15760860DEF1EEF4D696E676875615175D:160>>}, %% Seed
+ <<16#04:8,
+ 16#01A57A6A7B26CA5EF52FCDB8164797:120, %% X(p0)
+ 16#00B3ADC94ED1FE674C06E695BABA1D:120>>, %% Y(p0)
+ <<16#010000000000000108789B2496AF93:120>>, %% Order
+ <<16#02:8>> %% CoFactor
+ };
+
+curve(sect131r1) ->
+ {
+ {characteristic_two_field, 131, {ppbasis,2,3,8}},
+ {<<16#07A11B09A76B562144418FF3FF8C2570B8:136>>, %% A
+ <<16#0217C05610884B63B9C6C7291678F9D341:136>>, %% B
+ <<16#4D696E676875615175985BD3ADBADA21B43A97E2:160>>}, %% Seed
+ <<16#04:8,
+ 16#0081BAF91FDF9833C40F9C181343638399:136, %% X(p0)
+ 16#078C6E7EA38C001F73C8134B1B4EF9E150:136>>, %% Y(p0)
+ <<16#0400000000000000023123953A9464B54D:136>>, %% Order
+ <<16#02:8>> %% CoFactor
+ };
+
+curve(sect131r2) ->
+ {
+ {characteristic_two_field, 131, {ppbasis,2,3,8}},
+ {<<16#03E5A88919D7CAFCBF415F07C2176573B2:136>>, %% A
+ <<16#04B8266A46C55657AC734CE38F018F2192:136>>, %% B
+ <<16#985BD3ADBAD4D696E676875615175A21B43A97E3:160>>}, %% Seed
+ <<16#04:8,
+ 16#0356DCD8F2F95031AD652D23951BB366A8:136, %% X(p0)
+ 16#0648F06D867940A5366D9E265DE9EB240F:136>>, %% Y(p0)
+ <<16#0400000000000000016954A233049BA98F:136>>, %% Order
+ <<16#02:8>> %% CoFactor
+ };
+
+curve(sect163k1) ->
+ {
+ {characteristic_two_field, 163, {ppbasis,3,6,7}},
+ {<<16#01:8>>, %% A
+ <<16#01:8>>, %% B
+ none}, %% Seed
+ <<16#04:8,
+ 16#02FE13C0537BBC11ACAA07D793DE4E6D5E5C94EEE8:168, %% X(p0)
+ 16#0289070FB05D38FF58321F2E800536D538CCDAA3D9:168>>, %% Y(p0)
+ <<16#04000000000000000000020108A2E0CC0D99F8A5EF:168>>, %% Order
+ <<16#02:8>> %% CoFactor
+ };
+
+curve(sect163r1) ->
+ {
+ {characteristic_two_field, 163, {ppbasis,3,6,7}},
+ {<<16#07B6882CAAEFA84F9554FF8428BD88E246D2782AE2:168>>, %% A
+ <<16#0713612DCDDCB40AAB946BDA29CA91F73AF958AFD9:168>>, %% B
+ none}, %% Seed
+ <<16#04:8,
+ 16#0369979697AB43897789566789567F787A7876A654:168, %% X(p0)
+ 16#00435EDB42EFAFB2989D51FEFCE3C80988F41FF883:168>>, %% Y(p0)
+ <<16#03FFFFFFFFFFFFFFFFFFFF48AAB689C29CA710279B:168>>, %% Order
+ <<16#02:8>> %% CoFactor
+ };
+
+curve(sect163r2) ->
+ {
+ {characteristic_two_field, 163, {ppbasis,3,6,7}},
+ {<<16#01:8>>, %% A
+ <<16#020A601907B8C953CA1481EB10512F78744A3205FD:168>>, %% B
+ none}, %% Seed
+ <<16#04:8,
+ 16#03F0EBA16286A2D57EA0991168D4994637E8343E36:168, %% X(p0)
+ 16#00D51FBC6C71A0094FA2CDD545B11C5C0C797324F1:168>>, %% Y(p0)
+ <<16#040000000000000000000292FE77E70C12A4234C33:168>>, %% Order
+ <<16#02:8>> %% CoFactor
+ };
+
+curve(sect193r1) ->
+ {
+ {characteristic_two_field, 193, {tpbasis,15}},
+ {<<16#17858FEB7A98975169E171F77B4087DE098AC8A911DF7B01:192>>, %% A
+ <<16#FDFB49BFE6C3A89FACADAA7A1E5BBC7CC1C2E5D831478814:192>>, %% B
+ <<16#103FAEC74D696E676875615175777FC5B191EF30:160>>}, %% Seed
+ <<16#04:8,
+ 16#01F481BC5F0FF84A74AD6CDF6FDEF4BF6179625372D8C0C5E1:200, %% X(p0)
+ 16#0025E399F2903712CCF3EA9E3A1AD17FB0B3201B6AF7CE1B05:200>>, %% Y(p0)
+ <<16#01000000000000000000000000C7F34A778F443ACC920EBA49:200>>, %% Order
+ <<16#02:8>> %% CoFactor
+ };
+
+curve(sect193r2) ->
+ {
+ {characteristic_two_field, 193, {tpbasis,15}},
+ {<<16#0163F35A5137C2CE3EA6ED8667190B0BC43ECD69977702709B:200>>, %% A
+ <<16#C9BB9E8927D4D64C377E2AB2856A5B16E3EFB7F61D4316AE:192>>, %% B
+ <<16#10B7B4D696E676875615175137C8A16FD0DA2211:160>>}, %% Seed
+ <<16#04:8,
+ 16#00D9B67D192E0367C803F39E1A7E82CA14A651350AAE617E8F:200, %% X(p0)
+ 16#01CE94335607C304AC29E7DEFBD9CA01F596F927224CDECF6C:200>>, %% Y(p0)
+ <<16#010000000000000000000000015AAB561B005413CCD4EE99D5:200>>, %% Order
+ <<16#02:8>> %% CoFactor
+ };
+
+curve(sect233k1) ->
+ {
+ {characteristic_two_field, 233, {tpbasis,74}},
+ {<<16#00:8>>, %% A
+ <<16#01:8>>, %% B
+ none}, %% Seed
+ <<16#04:8,
+ 16#017232BA853A7E731AF129F22FF4149563A419C26BF50A4C9D6EEFAD6126:240, %% X(p0)
+ 16#01DB537DECE819B7F70F555A67C427A8CD9BF18AEB9B56E0C11056FAE6A3:240>>, %% Y(p0)
+ <<16#8000000000000000000000000000069D5BB915BCD46EFB1AD5F173ABDF:232>>, %% Order
+ <<16#04:8>> %% CoFactor
+ };
+
+curve(sect233r1) ->
+ {
+ {characteristic_two_field, 233, {tpbasis,74}},
+ {<<16#01:8>>, %% A
+ <<16#66647EDE6C332C7F8C0923BB58213B333B20E9CE4281FE115F7D8F90AD:232>>, %% B
+ <<16#74D59FF07F6B413D0EA14B344B20A2DB049B50C3:160>>}, %% Seed
+ <<16#04:8,
+ 16#00FAC9DFCBAC8313BB2139F1BB755FEF65BC391F8B36F8F8EB7371FD558B:240, %% X(p0)
+ 16#01006A08A41903350678E58528BEBF8A0BEFF867A7CA36716F7E01F81052:240>>, %% Y(p0)
+ <<16#01000000000000000000000000000013E974E72F8A6922031D2603CFE0D7:240>>, %% Order
+ <<16#02:8>> %% CoFactor
+ };
+
+curve(sect239k1) ->
+ {
+ {characteristic_two_field, 239, {tpbasis,158}},
+ {<<16#00:8>>, %% A
+ <<16#01:8>>, %% B
+ none}, %% Seed
+ <<16#04:8,
+ 16#29A0B6A887A983E9730988A68727A8B2D126C44CC2CC7B2A6555193035DC:240, %% X(p0)
+ 16#76310804F12E549BDB011C103089E73510ACB275FC312A5DC6B76553F0CA:240>>, %% Y(p0)
+ <<16#2000000000000000000000000000005A79FEC67CB6E91F1C1DA800E478A5:240>>, %% Order
+ <<16#04:8>> %% CoFactor
+ };
+
+curve(sect283k1) ->
+ {
+ {characteristic_two_field, 283, {ppbasis,5,7,12}},
+ {<<16#00:8>>, %% A
+ <<16#01:8>>, %% B
+ none}, %% Seed
+ <<16#04:8,
+ 16#0503213F78CA44883F1A3B8162F188E553CD265F23C1567A16876913B0C2AC24:256, %% X(p0)
+ 16#58492836:32,
+ 16#01CCDA380F1C9E318D90F95D07E5426FE87E45C0E8184698E45962364E341161:256, %% Y(p0)
+ 16#77DD2259:32>>,
+ <<16#01FFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFE9AE2ED07577265DFF7F94451E06:256, %% Order
+ 16#1E163C61:32>>,
+ <<16#04:8>> %% CoFactor
+ };
+
+curve(sect283r1) ->
+ {
+ {characteristic_two_field, 283, {ppbasis,5,7,12}},
+ {<<16#01:8>>, %% A
+ <<16#027B680AC8B8596DA5A4AF8A19A0303FCA97FD7645309FA2A581485AF6263E31:256, %% B
+ 16#3B79A2F5:32>>,
+ <<16#77E2B07370EB0F832A6DD5B62DFC88CD06BB84BE:160>>}, %% Seed
+ <<16#04:8,
+ 16#05F939258DB7DD90E1934F8C70B0DFEC2EED25B8557EAC9C80E2E198F8CDBECD:256, %% X(p0)
+ 16#86B12053:32,
+ 16#03676854FE24141CB98FE6D4B20D02B4516FF702350EDDB0826779C813F0DF45:256, %% Y(p0)
+ 16#BE8112F4:32>>,
+ <<16#03FFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFEF90399660FC938A90165B042A7C:256, %% Order
+ 16#EFADB307:32>>,
+ <<16#02:8>> %% CoFactor
+ };
+
+curve(sect409k1) ->
+ {
+ {characteristic_two_field, 409, {tpbasis,87}},
+ {<<16#00:8>>, %% A
+ <<16#01:8>>, %% B
+ none}, %% Seed
+ <<16#04:8,
+ 16#0060F05F658F49C1AD3AB1890F7184210EFD0987E307C84C27ACCFB8F9F67CC2:256, %% X(p0)
+ 16#C460189EB5AAAA62EE222EB1B35540CFE9023746:160,
+ 16#01E369050B7C4E42ACBA1DACBF04299C3460782F918EA427E6325165E9EA10E3:256, %% Y(p0)
+ 16#DA5F6C42E9C55215AA9CA27A5863EC48D8E0286B:160>>,
+ <<16#7FFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFE5F83B2D4EA20:256, %% Order
+ 16#400EC4557D5ED3E3E7CA5B4B5C83B8E01E5FCF:152>>,
+ <<16#04:8>> %% CoFactor
+ };
+
+curve(sect409r1) ->
+ {
+ {characteristic_two_field, 409, {tpbasis,87}},
+ {<<16#01:8>>, %% A
+ <<16#21A5C2C8EE9FEB5C4B9A753B7B476B7FD6422EF1F3DD674761FA99D6AC27C8A9:256, %% B
+ 16#A197B272822F6CD57A55AA4F50AE317B13545F:152>>,
+ <<16#4099B5A457F9D69F79213D094C4BCD4D4262210B:160>>}, %% Seed
+ <<16#04:8,
+ 16#015D4860D088DDB3496B0C6064756260441CDE4AF1771D4DB01FFE5B34E59703:256, %% X(p0)
+ 16#DC255A868A1180515603AEAB60794E54BB7996A7:160,
+ 16#0061B1CFAB6BE5F32BBFA78324ED106A7636B9C5A7BD198D0158AA4F5488D08F:256, %% Y(p0)
+ 16#38514F1FDF4B4F40D2181B3681C364BA0273C706:160>>,
+ <<16#010000000000000000000000000000000000000000000000000001E2AAD6A612:256, %% Order
+ 16#F33307BE5FA47C3C9E052F838164CD37D9A21173:160>>,
+ <<16#02:8>> %% CoFactor
+ };
+
+curve(sect571k1) ->
+ {
+ {characteristic_two_field, 571, {ppbasis,2,5,10}},
+ {<<16#00:8>>, %% A
+ <<16#01:8>>, %% B
+ none}, %% Seed
+ <<16#04:8,
+ 16#026EB7A859923FBC82189631F8103FE4AC9CA2970012D5D46024804801841CA4:256, %% X(p0)
+ 16#4370958493B205E647DA304DB4CEB08CBBD1BA39494776FB988B47174DCA88C7:256,
+ 16#E2945283A01C8972:64,
+ 16#0349DC807F4FBF374F4AEADE3BCA95314DD58CEC9F307A54FFC61EFC006D8A2C:256, %% Y(p0)
+ 16#9D4979C0AC44AEA74FBEBBB9F772AEDCB620B01A7BA7AF1B320430C8591984F6:256,
+ 16#01CD4C143EF1C7A3:64>>,
+ <<16#0200000000000000000000000000000000000000000000000000000000000000:256, %% Order
+ 16#00000000131850E1F19A63E4B391A8DB917F4138B630D84BE5D639381E91DEB4:256,
+ 16#5CFE778F637C1001:64>>,
+ <<16#04:8>> %% CoFactor
+ };
+
+curve(sect571r1) ->
+ {
+ {characteristic_two_field, 571, {ppbasis,2,5,10}},
+ {<<16#01:8>>, %% A
+ <<16#02F40E7E2221F295DE297117B7F3D62F5C6A97FFCB8CEFF1CD6BA8CE4A9A18AD:256, %% B
+ 16#84FFABBD8EFA59332BE7AD6756A66E294AFD185A78FF12AA520E4DE739BACA0C:256,
+ 16#7FFEFF7F2955727A:64>>,
+ <<16#2AA058F73A0E33AB486B0F610410C53A7F132310:160>>}, %% Seed
+ <<16#04:8,
+ 16#0303001D34B856296C16C0D40D3CD7750A93D1D2955FA80AA5F40FC8DB7B2ABD:256, %% X(p0)
+ 16#BDE53950F4C0D293CDD711A35B67FB1499AE60038614F1394ABFA3B4C850D927:256,
+ 16#E1E7769C8EEC2D19:64,
+ 16#037BF27342DA639B6DCCFFFEB73D69D78C6C27A6009CBBCA1980F8533921E8A6:256, %% Y(p0)
+ 16#84423E43BAB08A576291AF8F461BB2A8B3531D2F0485C19B16E2F1516E23DD3C:256,
+ 16#1A4827AF1B8AC15B:64>>,
+ <<16#03FFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFF:256, %% Order
+ 16#FFFFFFFFE661CE18FF55987308059B186823851EC7DD9CA1161DE93D5174D66E:256,
+ 16#8382E9BB2FE84E47:64>>,
+ <<16#02:8>> %% CoFactor
+ };
+
+curve(c2pnb163v1) ->
+ {
+ {characteristic_two_field, 163, {ppbasis,1,2,8}},
+ {<<16#072546B5435234A422E0789675F432C89435DE5242:168>>, %% A
+ <<16#C9517D06D5240D3CFF38C74B20B6CD4D6F9DD4D9:160>>, %% B
+ <<16#D2C0FB15760860DEF1EEF4D696E6768756151754:160>>}, %% Seed
+ <<16#04:8,
+ 16#07AF69989546103D79329FCC3D74880F33BBE803CB:168, %% X(p0)
+ 16#01EC23211B5966ADEA1D3F87F7EA5848AEF0B7CA9F:168>>, %% Y(p0)
+ <<16#0400000000000000000001E60FC8821CC74DAEAFC1:168>>, %% Order
+ <<16#02:8>> %% CoFactor
+ };
+
+curve(c2pnb163v2) ->
+ {
+ {characteristic_two_field, 163, {ppbasis,1,2,8}},
+ {<<16#0108B39E77C4B108BED981ED0E890E117C511CF072:168>>, %% A
+ <<16#0667ACEB38AF4E488C407433FFAE4F1C811638DF20:168>>, %% B
+ <<16#53814C050D44D696E67687561517580CA4E29FFD:160>>}, %% Seed
+ <<16#04:8,
+ 16#0024266E4EB5106D0A964D92C4860E2671DB9B6CC5:168, %% X(p0)
+ 16#079F684DDF6684C5CD258B3890021B2386DFD19FC5:168>>, %% Y(p0)
+ <<16#03FFFFFFFFFFFFFFFFFFFDF64DE1151ADBB78F10A7:168>>, %% Order
+ <<16#02:8>> %% CoFactor
+ };
+
+curve(c2pnb163v3) ->
+ {
+ {characteristic_two_field, 163, {ppbasis,1,2,8}},
+ {<<16#07A526C63D3E25A256A007699F5447E32AE456B50E:168>>, %% A
+ <<16#03F7061798EB99E238FD6F1BF95B48FEEB4854252B:168>>, %% B
+ <<16#50CBF1D95CA94D696E676875615175F16A36A3B8:160>>}, %% Seed
+ <<16#04:8,
+ 16#02F9F87B7C574D0BDECF8A22E6524775F98CDEBDCB:168, %% X(p0)
+ 16#05B935590C155E17EA48EB3FF3718B893DF59A05D0:168>>, %% Y(p0)
+ <<16#03FFFFFFFFFFFFFFFFFFFE1AEE140F110AFF961309:168>>, %% Order
+ <<16#02:8>> %% CoFactor
+ };
+
+curve(c2pnb176v1) ->
+ {
+ {characteristic_two_field, 176, {ppbasis,1,2,43}},
+ {<<16#E4E6DB2995065C407D9D39B8D0967B96704BA8E9C90B:176>>, %% A
+ <<16#5DDA470ABE6414DE8EC133AE28E9BBD7FCEC0AE0FFF2:176>>, %% B
+ none}, %% Seed
+ <<16#04:8,
+ 16#8D16C2866798B600F9F08BB4A8E860F3298CE04A5798:176, %% X(p0)
+ 16#6FA4539C2DADDDD6BAB5167D61B436E1D92BB16A562C:176>>, %% Y(p0)
+ <<16#010092537397ECA4F6145799D62B0A19CE06FE26AD:168>>, %% Order
+ <<16#FF6E:16>> %% CoFactor
+ };
+
+curve(c2tnb191v1) ->
+ {
+ {characteristic_two_field, 191, {tpbasis,9}},
+ {<<16#2866537B676752636A68F56554E12640276B649EF7526267:192>>, %% A
+ <<16#2E45EF571F00786F67B0081B9495A3D95462F5DE0AA185EC:192>>, %% B
+ <<16#4E13CA542744D696E67687561517552F279A8C84:160>>}, %% Seed
+ <<16#04:8,
+ 16#36B3DAF8A23206F9C4F299D7B21A9C369137F2C84AE1AA0D:192, %% X(p0)
+ 16#765BE73433B3F95E332932E70EA245CA2418EA0EF98018FB:192>>, %% Y(p0)
+ <<16#40000000000000000000000004A20E90C39067C893BBB9A5:192>>, %% Order
+ <<16#02:8>> %% CoFactor
+ };
+
+curve(c2tnb191v2) ->
+ {
+ {characteristic_two_field, 191, {tpbasis,9}},
+ {<<16#401028774D7777C7B7666D1366EA432071274F89FF01E718:192>>, %% A
+ <<16#0620048D28BCBD03B6249C99182B7C8CD19700C362C46A01:192>>, %% B
+ <<16#0871EF2FEF24D696E6768756151758BEE0D95C15:160>>}, %% Seed
+ <<16#04:8,
+ 16#3809B2B7CC1B28CC5A87926AAD83FD28789E81E2C9E3BF10:192, %% X(p0)
+ 16#17434386626D14F3DBF01760D9213A3E1CF37AEC437D668A:192>>, %% Y(p0)
+ <<16#20000000000000000000000050508CB89F652824E06B8173:192>>, %% Order
+ <<16#04:8>> %% CoFactor
+ };
+
+curve(c2tnb191v3) ->
+ {
+ {characteristic_two_field, 191, {tpbasis,9}},
+ {<<16#6C01074756099122221056911C77D77E77A777E7E7E77FCB:192>>, %% A
+ <<16#71FE1AF926CF847989EFEF8DB459F66394D90F32AD3F15E8:192>>, %% B
+ <<16#E053512DC684D696E676875615175067AE786D1F:160>>}, %% Seed
+ <<16#04:8,
+ 16#375D4CE24FDE434489DE8746E71786015009E66E38A926DD:192, %% X(p0)
+ 16#545A39176196575D985999366E6AD34CE0A77CD7127B06BE:192>>, %% Y(p0)
+ <<16#155555555555555555555555610C0B196812BFB6288A3EA3:192>>, %% Order
+ <<16#06:8>> %% CoFactor
+ };
+
+curve(c2pnb208w1) ->
+ {
+ {characteristic_two_field, 208, {ppbasis,1,2,83}},
+ {<<16#00:8>>, %% A
+ <<16#C8619ED45A62E6212E1160349E2BFA844439FAFC2A3FD1638F9E:208>>, %% B
+ none}, %% Seed
+ <<16#04:8,
+ 16#89FDFBE4ABE193DF9559ECF07AC0CE78554E2784EB8C1ED1A57A:208, %% X(p0)
+ 16#0F55B51A06E78E9AC38A035FF520D8B01781BEB1A6BB08617DE3:208>>, %% Y(p0)
+ <<16#0101BAF95C9723C57B6C21DA2EFF2D5ED588BDD5717E212F9D:200>>, %% Order
+ <<16#FE48:16>> %% CoFactor
+ };
+
+curve(c2tnb239v1) ->
+ {
+ {characteristic_two_field, 239, {tpbasis,36}},
+ {<<16#32010857077C5431123A46B808906756F543423E8D27877578125778AC76:240>>, %% A
+ <<16#790408F2EEDAF392B012EDEFB3392F30F4327C0CA3F31FC383C422AA8C16:240>>, %% B
+ <<16#D34B9A4D696E676875615175CA71B920BFEFB05D:160>>}, %% Seed
+ <<16#04:8,
+ 16#57927098FA932E7C0A96D3FD5B706EF7E5F5C156E16B7E7C86038552E91D:240, %% X(p0)
+ 16#61D8EE5077C33FECF6F1A16B268DE469C3C7744EA9A971649FC7A9616305:240>>, %% Y(p0)
+ <<16#2000000000000000000000000000000F4D42FFE1492A4993F1CAD666E447:240>>, %% Order
+ <<16#04:8>> %% CoFactor
+ };
+
+curve(c2tnb239v2) ->
+ {
+ {characteristic_two_field, 239, {tpbasis,36}},
+ {<<16#4230017757A767FAE42398569B746325D45313AF0766266479B75654E65F:240>>, %% A
+ <<16#5037EA654196CFF0CD82B2C14A2FCF2E3FF8775285B545722F03EACDB74B:240>>, %% B
+ <<16#2AA6982FDFA4D696E676875615175D266727277D:160>>}, %% Seed
+ <<16#04:8,
+ 16#28F9D04E900069C8DC47A08534FE76D2B900B7D7EF31F5709F200C4CA205:240, %% X(p0)
+ 16#5667334C45AFF3B5A03BAD9DD75E2C71A99362567D5453F7FA6E227EC833:240>>, %% Y(p0)
+ <<16#1555555555555555555555555555553C6F2885259C31E3FCDF154624522D:240>>, %% Order
+ <<16#06:8>> %% CoFactor
+ };
+
+curve(c2tnb239v3) ->
+ {
+ {characteristic_two_field, 239, {tpbasis,36}},
+ {<<16#01238774666A67766D6676F778E676B66999176666E687666D8766C66A9F:240>>, %% A
+ <<16#6A941977BA9F6A435199ACFC51067ED587F519C5ECB541B8E44111DE1D40:240>>, %% B
+ <<16#9E076F4D696E676875615175E11E9FDD77F92041:160>>}, %% Seed
+ <<16#04:8,
+ 16#70F6E9D04D289C4E89913CE3530BFDE903977D42B146D539BF1BDE4E9C92:240, %% X(p0)
+ 16#2E5A0EAF6E5E1305B9004DCE5C0ED7FE59A35608F33837C816D80B79F461:240>>, %% Y(p0)
+ <<16#0CCCCCCCCCCCCCCCCCCCCCCCCCCCCCAC4912D2D9DF903EF9888B8A0E4CFF:240>>, %% Order
+ <<16#0A:8>> %% CoFactor
+ };
+
+curve(c2pnb272w1) ->
+ {
+ {characteristic_two_field, 272, {ppbasis,1,3,56}},
+ {<<16#91A091F03B5FBA4AB2CCF49C4EDD220FB028712D42BE752B2C40094DBACDB586:256, %% A
+ 16#FB20:16>>,
+ <<16#7167EFC92BB2E3CE7C8AAAFF34E12A9C557003D7C73A6FAF003F99F6CC8482E5:256, %% B
+ 16#40F7:16>>,
+ none}, %% Seed
+ <<16#04:8,
+ 16#6108BABB2CEEBCF787058A056CBE0CFE622D7723A289E08A07AE13EF0D10D171:256, %% X(p0)
+ 16#DD8D:16,
+ 16#10C7695716851EEF6BA7F6872E6142FBD241B830FF5EFCACECCAB05E02005DDE:256, %% Y(p0)
+ 16#9D23:16>>,
+ <<16#0100FAF51354E0E39E4892DF6E319C72C8161603FA45AA7B998A167B8F1E6295:256, %% Order
+ 16#21:8>>,
+ <<16#FF06:16>> %% CoFactor
+ };
+
+curve(c2pnb304w1) ->
+ {
+ {characteristic_two_field, 304, {ppbasis,1,2,11}},
+ {<<16#FD0D693149A118F651E6DCE6802085377E5F882D1B510B44160074C128807836:256, %% A
+ 16#5A0396C8E681:48>>,
+ <<16#BDDB97E555A50A908E43B01C798EA5DAA6788F1EA2794EFCF57166B8C1403960:256, %% B
+ 16#1E55827340BE:48>>,
+ none}, %% Seed
+ <<16#04:8,
+ 16#197B07845E9BE2D96ADB0F5F3C7F2CFFBD7A3EB8B6FEC35C7FD67F26DDF6285A:256, %% X(p0)
+ 16#644F740A2614:48,
+ 16#E19FBEB76E0DA171517ECF401B50289BF014103288527A9B416A105E80260B54:256, %% Y(p0)
+ 16#9FDC1B92C03B:48>>,
+ <<16#0101D556572AABAC800101D556572AABAC8001022D5C91DD173F8FB561DA6899:256, %% Order
+ 16#164443051D:40>>,
+ <<16#FE2E:16>> %% CoFactor
+ };
+
+curve(c2tnb359v1) ->
+ {
+ {characteristic_two_field, 359, {tpbasis,68}},
+ {<<16#5667676A654B20754F356EA92017D946567C46675556F19556A04616B567D223:256, %% A
+ 16#A5E05656FB549016A96656A557:104>>,
+ <<16#2472E2D0197C49363F1FE7F5B6DB075D52B6947D135D8CA445805D39BC345626:256, %% B
+ 16#089687742B6329E70680231988:104>>,
+ <<16#2B354920B724D696E67687561517585BA1332DC6:160>>}, %% Seed
+ <<16#04:8,
+ 16#3C258EF3047767E7EDE0F1FDAA79DAEE3841366A132E163ACED4ED2401DF9C6B:256, %% X(p0)
+ 16#DCDE98E8E707C07A2239B1B097:104,
+ 16#53D7E08529547048121E9C95F3791DD804963948F34FAE7BF44EA82365DC7868:256, %% Y(p0)
+ 16#FE57E4AE2DE211305A407104BD:104>>,
+ <<16#01AF286BCA1AF286BCA1AF286BCA1AF286BCA1AF286BC9FB8F6B85C556892C20:256, %% Order
+ 16#A7EB964FE7719E74F490758D3B:104>>,
+ <<16#4C:8>> %% CoFactor
+ };
+
+curve(c2pnb368w1) ->
+ {
+ {characteristic_two_field, 368, {ppbasis,1,2,85}},
+ {<<16#E0D2EE25095206F5E2A4F9ED229F1F256E79A0E2B455970D8D0D865BD94778C5:256, %% A
+ 16#76D62F0AB7519CCD2A1A906AE30D:112>>,
+ <<16#FC1217D4320A90452C760A58EDCD30C8DD069B3C34453837A34ED50CB54917E1:256, %% B
+ 16#C2112D84D164F444F8F74786046A:112>>,
+ none}, %% Seed
+ <<16#04:8,
+ 16#1085E2755381DCCCE3C1557AFA10C2F0C0C2825646C5B34A394CBCFA8BC16B22:256, %% X(p0)
+ 16#E7E789E927BE216F02E1FB136A5F:112,
+ 16#7B3EB1BDDCBA62D5D8B2059B525797FC73822C59059C623A45FF3843CEE8F87C:256, %% Y(p0)
+ 16#D1855ADAA81E2A0750B80FDA2310:112>>,
+ <<16#010090512DA9AF72B08349D98A5DD4C7B0532ECA51CE03E2D10F3B7AC579BD87:256, %% Order
+ 16#E909AE40A6F131E9CFCE5BD967:104>>,
+ <<16#FF70:16>> %% CoFactor
+ };
+
+curve(c2tnb431r1) ->
+ {
+ {characteristic_two_field, 431, {tpbasis,120}},
+ {<<16#1A827EF00DD6FC0E234CAF046C6A5D8A85395B236CC4AD2CF32A0CADBDC9DDF6:256, %% A
+ 16#20B0EB9906D0957F6C6FEACD615468DF104DE296CD8F:176>>,
+ <<16#10D9B4A3D9047D8B154359ABFB1B7F5485B04CEB868237DDC9DEDA982A679A5A:256, %% B
+ 16#919B626D4E50A8DD731B107A9962381FB5D807BF2618:176>>,
+ none}, %% Seed
+ <<16#04:8,
+ 16#120FC05D3C67A99DE161D2F4092622FECA701BE4F50F4758714E8A87BBF2A658:256, %% X(p0)
+ 16#EF8C21E7C5EFE965361F6C2999C0C247B0DBD70CE6B7:176,
+ 16#20D0AF8903A96F8D5FA2C255745D3C451B302C9346D9B7E485E7BCE41F6B591F:256, %% Y(p0)
+ 16#3E8F6ADDCBB0BC4C2F947A7DE1A89B625D6A598B3760:176>>,
+ <<16#0340340340340340340340340340340340340340340340340340340323C313FA:256, %% Order
+ 16#B50589703B5EC68D3587FEC60D161CC149C1AD4A91:168>>,
+ <<16#2760:16>> %% CoFactor
+ };
+
+curve(wtls1) ->
+ {
+ {characteristic_two_field, 113, {tpbasis,9}},
+ {<<16#01:8>>, %% A
+ <<16#01:8>>, %% B
+ none}, %% Seed
+ <<16#04:8,
+ 16#01667979A40BA497E5D5C270780617:120, %% X(p0)
+ 16#00F44B4AF1ECC2630E08785CEBCC15:120>>, %% Y(p0)
+ <<16#FFFFFFFFFFFFFFFDBF91AF6DEA73:112>>, %% Order
+ <<16#02:8>> %% CoFactor
+ };
+
+curve(wtls3) ->
+ {
+ {characteristic_two_field, 163, {ppbasis,3,6,7}},
+ {<<16#01:8>>, %% A
+ <<16#01:8>>, %% B
+ none}, %% Seed
+ <<16#04:8,
+ 16#02FE13C0537BBC11ACAA07D793DE4E6D5E5C94EEE8:168, %% X(p0)
+ 16#0289070FB05D38FF58321F2E800536D538CCDAA3D9:168>>, %% Y(p0)
+ <<16#04000000000000000000020108A2E0CC0D99F8A5EF:168>>, %% Order
+ <<16#02:8>> %% CoFactor
+ };
+
+curve(wtls4) ->
+ {
+ {characteristic_two_field, 113, {tpbasis,9}},
+ {<<16#3088250CA6E7C7FE649CE85820F7:112>>, %% A
+ <<16#E8BEE4D3E2260744188BE0E9C723:112>>, %% B
+ <<16#10E723AB14D696E6768756151756FEBF8FCB49A9:160>>}, %% Seed
+ <<16#04:8,
+ 16#009D73616F35F4AB1407D73562C10F:120, %% X(p0)
+ 16#00A52830277958EE84D1315ED31886:120>>, %% Y(p0)
+ <<16#0100000000000000D9CCEC8A39E56F:120>>, %% Order
+ <<16#02:8>> %% CoFactor
+ };
+
+curve(wtls5) ->
+ {
+ {characteristic_two_field, 163, {ppbasis,1,2,8}},
+ {<<16#072546B5435234A422E0789675F432C89435DE5242:168>>, %% A
+ <<16#C9517D06D5240D3CFF38C74B20B6CD4D6F9DD4D9:160>>, %% B
+ <<16#D2C0FB15760860DEF1EEF4D696E6768756151754:160>>}, %% Seed
+ <<16#04:8,
+ 16#07AF69989546103D79329FCC3D74880F33BBE803CB:168, %% X(p0)
+ 16#01EC23211B5966ADEA1D3F87F7EA5848AEF0B7CA9F:168>>, %% Y(p0)
+ <<16#0400000000000000000001E60FC8821CC74DAEAFC1:168>>, %% Order
+ <<16#02:8>> %% CoFactor
+ };
+
+curve(wtls6) ->
+ {
+ {prime_field, <<16#DB7C2ABF62E35E668076BEAD208B:112>>}, %% Prime
+ {<<16#DB7C2ABF62E35E668076BEAD2088:112>>, %% A
+ <<16#659EF8BA043916EEDE8911702B22:112>>, %% B
+ <<16#00F50B028E4D696E676875615175290472783FB1:160>>}, %% Seed
+ <<16#04:8,
+ 16#09487239995A5EE76B55F9C2F098:112, %% X(p0)
+ 16#A89CE5AF8724C0A23E0E0FF77500:112>>, %% Y(p0)
+ <<16#DB7C2ABF62E35E7628DFAC6561C5:112>>, %% Order
+ <<16#01:8>> %% CoFactor
+ };
+
+curve(wtls7) ->
+ {
+ {prime_field, <<16#FFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFEFFFFAC73:160>>}, %% Prime
+ {<<16#FFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFEFFFFAC70:160>>, %% A
+ <<16#B4E134D3FB59EB8BAB57274904664D5AF50388BA:160>>, %% B
+ <<16#B99B99B099B323E02709A4D696E6768756151751:160>>}, %% Seed
+ <<16#04:8,
+ 16#52DCB034293A117E1F4FF11B30F7199D3144CE6D:160, %% X(p0)
+ 16#FEAFFEF2E331F296E071FA0DF9982CFEA7D43F2E:160>>, %% Y(p0)
+ <<16#0100000000000000000000351EE786A818F3A1A16B:168>>, %% Order
+ <<16#01:8>> %% CoFactor
+ };
+
+curve(wtls8) ->
+ {
+ {prime_field, <<16#FFFFFFFFFFFFFFFFFFFFFFFFFDE7:112>>}, %% Prime
+ {<<16#00:8>>, %% A
+ <<16#03:8>>, %% B
+ none}, %% Seed
+ <<16#04:8,
+ 16#0000000000000000000000000001:112, %% X(p0)
+ 16#0000000000000000000000000002:112>>, %% Y(p0)
+ <<16#0100000000000001ECEA551AD837E9:120>>, %% Order
+ <<16#01:8>> %% CoFactor
+ };
+
+curve(wtls9) ->
+ {
+ {prime_field, <<16#FFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFC808F:160>>}, %% Prime
+ {<<16#00:8>>, %% A
+ <<16#03:8>>, %% B
+ none}, %% Seed
+ <<16#04:8,
+ 16#0000000000000000000000000000000000000001:160, %% X(p0)
+ 16#0000000000000000000000000000000000000002:160>>, %% Y(p0)
+ <<16#0100000000000000000001CDC98AE0E2DE574ABF33:168>>, %% Order
+ <<16#01:8>> %% CoFactor
+ };
+
+curve(wtls10) ->
+ {
+ {characteristic_two_field, 233, {tpbasis,74}},
+ {<<16#00:8>>, %% A
+ <<16#01:8>>, %% B
+ none}, %% Seed
+ <<16#04:8,
+ 16#017232BA853A7E731AF129F22FF4149563A419C26BF50A4C9D6EEFAD6126:240, %% X(p0)
+ 16#01DB537DECE819B7F70F555A67C427A8CD9BF18AEB9B56E0C11056FAE6A3:240>>, %% Y(p0)
+ <<16#8000000000000000000000000000069D5BB915BCD46EFB1AD5F173ABDF:232>>, %% Order
+ <<16#04:8>> %% CoFactor
+ };
+
+curve(wtls11) ->
+ {
+ {characteristic_two_field, 233, {tpbasis,74}},
+ {<<16#01:8>>, %% A
+ <<16#66647EDE6C332C7F8C0923BB58213B333B20E9CE4281FE115F7D8F90AD:232>>, %% B
+ <<16#74D59FF07F6B413D0EA14B344B20A2DB049B50C3:160>>}, %% Seed
+ <<16#04:8,
+ 16#00FAC9DFCBAC8313BB2139F1BB755FEF65BC391F8B36F8F8EB7371FD558B:240, %% X(p0)
+ 16#01006A08A41903350678E58528BEBF8A0BEFF867A7CA36716F7E01F81052:240>>, %% Y(p0)
+ <<16#01000000000000000000000000000013E974E72F8A6922031D2603CFE0D7:240>>, %% Order
+ <<16#02:8>> %% CoFactor
+ };
+
+curve(wtls12) ->
+ {
+ {prime_field, <<16#FFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFF000000000000000000000001:224>>}, %% Prime
+ {<<16#FFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFEFFFFFFFFFFFFFFFFFFFFFFFE:224>>, %% A
+ <<16#B4050A850C04B3ABF54132565044B0B7D7BFD8BA270B39432355FFB4:224>>, %% B
+ none}, %% Seed
+ <<16#04:8,
+ 16#B70E0CBD6BB4BF7F321390B94A03C1D356C21122343280D6115C1D21:224, %% X(p0)
+ 16#BD376388B5F723FB4C22DFE6CD4375A05A07476444D5819985007E34:224>>, %% Y(p0)
+ <<16#FFFFFFFFFFFFFFFFFFFFFFFFFFFF16A2E0B8F03E13DD29455C5C2A3D:224>>, %% Order
+ <<16#01:8>> %% CoFactor
+ };
+
+curve(ipsec3) ->
+ {
+ {characteristic_two_field, 155, {tpbasis,62}},
+ {<<16#00:8>>, %% A
+ <<16#07338F:24>>, %% B
+ none}, %% Seed
+ <<16#04:8,
+ 16#000000000000000000000000000000000000007B:160, %% X(p0)
+ 16#00000000000000000000000000000000000001C8:160>>, %% Y(p0)
+ <<16#02AAAAAAAAAAAAAAAAAAC7F3C7881BD0868FA86C:160>>, %% Order
+ <<16#03:8>> %% CoFactor
+ };
+
+curve(ipsec4) ->
+ {
+ {characteristic_two_field, 185, {tpbasis,69}},
+ {<<16#00:8>>, %% A
+ <<16#1EE9:16>>, %% B
+ none}, %% Seed
+ <<16#04:8,
+ 16#000000000000000000000000000000000000000000000018:192, %% X(p0)
+ 16#00000000000000000000000000000000000000000000000D:192>>, %% Y(p0)
+ <<16#FFFFFFFFFFFFFFFFFFFFFFEDF97C44DB9F2420BAFCA75E:184>>, %% Order
+ <<16#02:8>> %% CoFactor
+ };
+
+curve(brainpoolP160r1) ->
+ {
+ {prime_field, <<16#E95E4A5F737059DC60DFC7AD95B3D8139515620F:160>>}, %% Prime
+ {<<16#340E7BE2A280EB74E2BE61BADA745D97E8F7C300:160>>, %% A
+ <<16#1E589A8595423412134FAA2DBDEC95C8D8675E58:160>>, %% B
+ none}, %% Seed
+ <<16#04:8,
+ 16#BED5AF16EA3F6A4F62938C4631EB5AF7BDBCDBC3:160, %% X(p0)
+ 16#1667CB477A1A8EC338F94741669C976316DA6321:160>>, %% Y(p0)
+ <<16#E95E4A5F737059DC60DF5991D45029409E60FC09:160>>, %% Order
+ <<16#01:8>> %% CoFactor
+ };
+
+curve(brainpoolP160t1) ->
+ {
+ {prime_field, <<16#E95E4A5F737059DC60DFC7AD95B3D8139515620F:160>>}, %% Prime
+ {<<16#E95E4A5F737059DC60DFC7AD95B3D8139515620C:160>>, %% A
+ <<16#7A556B6DAE535B7B51ED2C4D7DAA7A0B5C55F380:160>>, %% B
+ none}, %% Seed
+ <<16#04:8,
+ 16#B199B13B9B34EFC1397E64BAEB05ACC265FF2378:160, %% X(p0)
+ 16#ADD6718B7C7C1961F0991B842443772152C9E0AD:160>>, %% Y(p0)
+ <<16#E95E4A5F737059DC60DF5991D45029409E60FC09:160>>, %% Order
+ <<16#01:8>> %% CoFactor
+ };
+
+curve(brainpoolP192r1) ->
+ {
+ {prime_field, <<16#C302F41D932A36CDA7A3463093D18DB78FCE476DE1A86297:192>>}, %% Prime
+ {<<16#6A91174076B1E0E19C39C031FE8685C1CAE040E5C69A28EF:192>>, %% A
+ <<16#469A28EF7C28CCA3DC721D044F4496BCCA7EF4146FBF25C9:192>>, %% B
+ none}, %% Seed
+ <<16#04:8,
+ 16#C0A0647EAAB6A48753B033C56CB0F0900A2F5C4853375FD6:192, %% X(p0)
+ 16#14B690866ABD5BB88B5F4828C1490002E6773FA2FA299B8F:192>>, %% Y(p0)
+ <<16#C302F41D932A36CDA7A3462F9E9E916B5BE8F1029AC4ACC1:192>>, %% Order
+ <<16#01:8>> %% CoFactor
+ };
+
+curve(brainpoolP192t1) ->
+ {
+ {prime_field, <<16#C302F41D932A36CDA7A3463093D18DB78FCE476DE1A86297:192>>}, %% Prime
+ {<<16#C302F41D932A36CDA7A3463093D18DB78FCE476DE1A86294:192>>, %% A
+ <<16#13D56FFAEC78681E68F9DEB43B35BEC2FB68542E27897B79:192>>, %% B
+ none}, %% Seed
+ <<16#04:8,
+ 16#3AE9E58C82F63C30282E1FE7BBF43FA72C446AF6F4618129:192, %% X(p0)
+ 16#097E2C5667C2223A902AB5CA449D0084B7E5B3DE7CCC01C9:192>>, %% Y(p0)
+ <<16#C302F41D932A36CDA7A3462F9E9E916B5BE8F1029AC4ACC1:192>>, %% Order
+ <<16#01:8>> %% CoFactor
+ };
+
+curve(brainpoolP224r1) ->
+ {
+ {prime_field, <<16#D7C134AA264366862A18302575D1D787B09F075797DA89F57EC8C0FF:224>>}, %% Prime
+ {<<16#68A5E62CA9CE6C1C299803A6C1530B514E182AD8B0042A59CAD29F43:224>>, %% A
+ <<16#2580F63CCFE44138870713B1A92369E33E2135D266DBB372386C400B:224>>, %% B
+ none}, %% Seed
+ <<16#04:8,
+ 16#0D9029AD2C7E5CF4340823B2A87DC68C9E4CE3174C1E6EFDEE12C07D:224, %% X(p0)
+ 16#58AA56F772C0726F24C6B89E4ECDAC24354B9E99CAA3F6D3761402CD:224>>, %% Y(p0)
+ <<16#D7C134AA264366862A18302575D0FB98D116BC4B6DDEBCA3A5A7939F:224>>, %% Order
+ <<16#01:8>> %% CoFactor
+ };
+
+curve(brainpoolP224t1) ->
+ {
+ {prime_field, <<16#D7C134AA264366862A18302575D1D787B09F075797DA89F57EC8C0FF:224>>}, %% Prime
+ {<<16#D7C134AA264366862A18302575D1D787B09F075797DA89F57EC8C0FC:224>>, %% A
+ <<16#4B337D934104CD7BEF271BF60CED1ED20DA14C08B3BB64F18A60888D:224>>, %% B
+ none}, %% Seed
+ <<16#04:8,
+ 16#6AB1E344CE25FF3896424E7FFE14762ECB49F8928AC0C76029B4D580:224, %% X(p0)
+ 16#0374E9F5143E568CD23F3F4D7C0D4B1E41C8CC0D1C6ABD5F1A46DB4C:224>>, %% Y(p0)
+ <<16#D7C134AA264366862A18302575D0FB98D116BC4B6DDEBCA3A5A7939F:224>>, %% Order
+ <<16#01:8>> %% CoFactor
+ };
+
+curve(brainpoolP256r1) ->
+ {
+ {prime_field, <<16#A9FB57DBA1EEA9BC3E660A909D838D726E3BF623D52620282013481D1F6E5377:256>>}, %% Prime
+ {<<16#7D5A0975FC2C3057EEF67530417AFFE7FB8055C126DC5C6CE94A4B44F330B5D9:256>>, %% A
+ <<16#26DC5C6CE94A4B44F330B5D9BBD77CBF958416295CF7E1CE6BCCDC18FF8C07B6:256>>, %% B
+ none}, %% Seed
+ <<16#04:8,
+ 16#8BD2AEB9CB7E57CB2C4B482FFC81B7AFB9DE27E1E3BD23C23A4453BD9ACE3262:256, %% X(p0)
+ 16#547EF835C3DAC4FD97F8461A14611DC9C27745132DED8E545C1D54C72F046997:256>>, %% Y(p0)
+ <<16#A9FB57DBA1EEA9BC3E660A909D838D718C397AA3B561A6F7901E0E82974856A7:256>>, %% Order
+ <<16#01:8>> %% CoFactor
+ };
+
+curve(brainpoolP256t1) ->
+ {
+ {prime_field, <<16#A9FB57DBA1EEA9BC3E660A909D838D726E3BF623D52620282013481D1F6E5377:256>>}, %% Prime
+ {<<16#A9FB57DBA1EEA9BC3E660A909D838D726E3BF623D52620282013481D1F6E5374:256>>, %% A
+ <<16#662C61C430D84EA4FE66A7733D0B76B7BF93EBC4AF2F49256AE58101FEE92B04:256>>, %% B
+ none}, %% Seed
+ <<16#04:8,
+ 16#A3E8EB3CC1CFE7B7732213B23A656149AFA142C47AAFBC2B79A191562E1305F4:256, %% X(p0)
+ 16#2D996C823439C56D7F7B22E14644417E69BCB6DE39D027001DABE8F35B25C9BE:256>>, %% Y(p0)
+ <<16#A9FB57DBA1EEA9BC3E660A909D838D718C397AA3B561A6F7901E0E82974856A7:256>>, %% Order
+ <<16#01:8>> %% CoFactor
+ };
+
+curve(brainpoolP320r1) ->
+ {
+ {prime_field, <<16#D35E472036BC4FB7E13C785ED201E065F98FCFA6F6F40DEF4F92B9EC7893EC28:256, %% Prime
+ 16#FCD412B1F1B32E27:64>>},
+ {<<16#3EE30B568FBAB0F883CCEBD46D3F3BB8A2A73513F5EB79DA66190EB085FFA9F4:256, %% A
+ 16#92F375A97D860EB4:64>>,
+ <<16#520883949DFDBC42D3AD198640688A6FE13F41349554B49ACC31DCCD88453981:256, %% B
+ 16#6F5EB4AC8FB1F1A6:64>>,
+ none}, %% Seed
+ <<16#04:8,
+ 16#43BD7E9AFB53D8B85289BCC48EE5BFE6F20137D10A087EB6E7871E2A10A599C7:256, %% X(p0)
+ 16#10AF8D0D39E20611:64,
+ 16#14FDD05545EC1CC8AB4093247F77275E0743FFED117182EAA9C77877AAAC6AC7:256, %% Y(p0)
+ 16#D35245D1692E8EE1:64>>,
+ <<16#D35E472036BC4FB7E13C785ED201E065F98FCFA5B68F12A32D482EC7EE8658E9:256, %% Order
+ 16#8691555B44C59311:64>>,
+ <<16#01:8>> %% CoFactor
+ };
+
+curve(brainpoolP320t1) ->
+ {
+ {prime_field, <<16#D35E472036BC4FB7E13C785ED201E065F98FCFA6F6F40DEF4F92B9EC7893EC28:256, %% Prime
+ 16#FCD412B1F1B32E27:64>>},
+ {<<16#D35E472036BC4FB7E13C785ED201E065F98FCFA6F6F40DEF4F92B9EC7893EC28:256, %% A
+ 16#FCD412B1F1B32E24:64>>,
+ <<16#A7F561E038EB1ED560B3D147DB782013064C19F27ED27C6780AAF77FB8A547CE:256, %% B
+ 16#B5B4FEF422340353:64>>,
+ none}, %% Seed
+ <<16#04:8,
+ 16#925BE9FB01AFC6FB4D3E7D4990010F813408AB106C4F09CB7EE07868CC136FFF:256, %% X(p0)
+ 16#3357F624A21BED52:64,
+ 16#63BA3A7A27483EBF6671DBEF7ABB30EBEE084E58A0B077AD42A5A0989D1EE71B:256, %% Y(p0)
+ 16#1B9BC0455FB0D2C3:64>>,
+ <<16#D35E472036BC4FB7E13C785ED201E065F98FCFA5B68F12A32D482EC7EE8658E9:256, %% Order
+ 16#8691555B44C59311:64>>,
+ <<16#01:8>> %% CoFactor
+ };
+
+curve(brainpoolP384r1) ->
+ {
+ {prime_field, <<16#8CB91E82A3386D280F5D6F7E50E641DF152F7109ED5456B412B1DA197FB71123:256, %% Prime
+ 16#ACD3A729901D1A71874700133107EC53:128>>},
+ {<<16#7BC382C63D8C150C3C72080ACE05AFA0C2BEA28E4FB22787139165EFBA91F90F:256, %% A
+ 16#8AA5814A503AD4EB04A8C7DD22CE2826:128>>,
+ <<16#04A8C7DD22CE28268B39B55416F0447C2FB77DE107DCD2A62E880EA53EEB62D5:256, %% B
+ 16#7CB4390295DBC9943AB78696FA504C11:128>>,
+ none}, %% Seed
+ <<16#04:8,
+ 16#1D1C64F068CF45FFA2A63A81B7C13F6B8847A3E77EF14FE3DB7FCAFE0CBD10E8:256, %% X(p0)
+ 16#E826E03436D646AAEF87B2E247D4AF1E:128,
+ 16#8ABE1D7520F9C2A45CB1EB8E95CFD55262B70B29FEEC5864E19C054FF9912928:256, %% Y(p0)
+ 16#0E4646217791811142820341263C5315:128>>,
+ <<16#8CB91E82A3386D280F5D6F7E50E641DF152F7109ED5456B31F166E6CAC0425A7:256, %% Order
+ 16#CF3AB6AF6B7FC3103B883202E9046565:128>>,
+ <<16#01:8>> %% CoFactor
+ };
+
+curve(brainpoolP384t1) ->
+ {
+ {prime_field, <<16#8CB91E82A3386D280F5D6F7E50E641DF152F7109ED5456B412B1DA197FB71123:256, %% Prime
+ 16#ACD3A729901D1A71874700133107EC53:128>>},
+ {<<16#8CB91E82A3386D280F5D6F7E50E641DF152F7109ED5456B412B1DA197FB71123:256, %% A
+ 16#ACD3A729901D1A71874700133107EC50:128>>,
+ <<16#7F519EADA7BDA81BD826DBA647910F8C4B9346ED8CCDC64E4B1ABD11756DCE1D:256, %% B
+ 16#2074AA263B88805CED70355A33B471EE:128>>,
+ none}, %% Seed
+ <<16#04:8,
+ 16#18DE98B02DB9A306F2AFCD7235F72A819B80AB12EBD653172476FECD462AABFF:256, %% X(p0)
+ 16#C4FF191B946A5F54D8D0AA2F418808CC:128,
+ 16#25AB056962D30651A114AFD2755AD336747F93475B7A1FCA3B88F2B6A208CCFE:256, %% Y(p0)
+ 16#469408584DC2B2912675BF5B9E582928:128>>,
+ <<16#8CB91E82A3386D280F5D6F7E50E641DF152F7109ED5456B31F166E6CAC0425A7:256, %% Order
+ 16#CF3AB6AF6B7FC3103B883202E9046565:128>>,
+ <<16#01:8>> %% CoFactor
+ };
+
+curve(brainpoolP512r1) ->
+ {
+ {prime_field, <<16#AADD9DB8DBE9C48B3FD4E6AE33C9FC07CB308DB3B3C9D20ED6639CCA70330871:256, %% Prime
+ 16#7D4D9B009BC66842AECDA12AE6A380E62881FF2F2D82C68528AA6056583A48F3:256>>},
+ {<<16#7830A3318B603B89E2327145AC234CC594CBDD8D3DF91610A83441CAEA9863BC:256, %% A
+ 16#2DED5D5AA8253AA10A2EF1C98B9AC8B57F1117A72BF2C7B9E7C1AC4D77FC94CA:256>>,
+ <<16#3DF91610A83441CAEA9863BC2DED5D5AA8253AA10A2EF1C98B9AC8B57F1117A7:256, %% B
+ 16#2BF2C7B9E7C1AC4D77FC94CADC083E67984050B75EBAE5DD2809BD638016F723:256>>,
+ none}, %% Seed
+ <<16#04:8,
+ 16#81AEE4BDD82ED9645A21322E9C4C6A9385ED9F70B5D916C1B43B62EEF4D0098E:256, %% X(p0)
+ 16#FF3B1F78E2D0D48D50D1687B93B97D5F7C6D5047406A5E688B352209BCB9F822:256,
+ 16#7DDE385D566332ECC0EABFA9CF7822FDF209F70024A57B1AA000C55B881F8111:256, %% Y(p0)
+ 16#B2DCDE494A5F485E5BCA4BD88A2763AED1CA2B2FA8F0540678CD1E0F3AD80892:256>>,
+ <<16#AADD9DB8DBE9C48B3FD4E6AE33C9FC07CB308DB3B3C9D20ED6639CCA70330870:256, %% Order
+ 16#553E5C414CA92619418661197FAC10471DB1D381085DDADDB58796829CA90069:256>>,
+ <<16#01:8>> %% CoFactor
+ };
+
+curve(brainpoolP512t1) ->
+ {
+ {prime_field, <<16#AADD9DB8DBE9C48B3FD4E6AE33C9FC07CB308DB3B3C9D20ED6639CCA70330871:256, %% Prime
+ 16#7D4D9B009BC66842AECDA12AE6A380E62881FF2F2D82C68528AA6056583A48F3:256>>},
+ {<<16#AADD9DB8DBE9C48B3FD4E6AE33C9FC07CB308DB3B3C9D20ED6639CCA70330871:256, %% A
+ 16#7D4D9B009BC66842AECDA12AE6A380E62881FF2F2D82C68528AA6056583A48F0:256>>,
+ <<16#7CBBBCF9441CFAB76E1890E46884EAE321F70C0BCB4981527897504BEC3E36A6:256, %% B
+ 16#2BCDFA2304976540F6450085F2DAE145C22553B465763689180EA2571867423E:256>>,
+ none}, %% Seed
+ <<16#04:8,
+ 16#640ECE5C12788717B9C1BA06CBC2A6FEBA85842458C56DDE9DB1758D39C0313D:256, %% X(p0)
+ 16#82BA51735CDB3EA499AA77A7D6943A64F7A3F25FE26F06B51BAA2696FA9035DA:256,
+ 16#5B534BD595F5AF0FA2C892376C84ACE1BB4E3019B71634C01131159CAE03CEE9:256, %% Y(p0)
+ 16#D9932184BEEF216BD71DF2DADF86A627306ECFF96DBB8BACE198B61E00F8B332:256>>,
+ <<16#AADD9DB8DBE9C48B3FD4E6AE33C9FC07CB308DB3B3C9D20ED6639CCA70330870:256, %% Order
+ 16#553E5C414CA92619418661197FAC10471DB1D381085DDADDB58796829CA90069:256>>,
+ <<16#01:8>> %% CoFactor
+ }.
diff --git a/lib/crypto/src/crypto_server.erl b/lib/crypto/src/crypto_server.erl
deleted file mode 100644
index 89650a9f06..0000000000
--- a/lib/crypto/src/crypto_server.erl
+++ /dev/null
@@ -1,68 +0,0 @@
-%%
-%% %CopyrightBegin%
-%%
-%% Copyright Ericsson AB 1999-2010. All Rights Reserved.
-%%
-%% The contents of this file are subject to the Erlang Public License,
-%% Version 1.1, (the "License"); you may not use this file except in
-%% 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%
-%%
-
-%% Purpose: Provide cryptographic algorithms.
-
--module(crypto_server).
-
--behaviour(gen_server).
-
--export([start_link/0]).
-
-%% Internal exports, call-back functions.
--export([init/1,handle_call/3,handle_cast/2,handle_info/2,code_change/3,
- terminate/2]).
-
-
-%%% --------------------------------------------------------
-%%% Interface Functions.
-%%% --------------------------------------------------------
-
-start_link() ->
- gen_server:start_link({local, crypto_server}, crypto_server, [], []).
-
-init([]) ->
- {ok,[]}.
-
-
-
-%%% --------------------------------------------------------
-%%% The call-back functions.
-%%% --------------------------------------------------------
-
-handle_call(_, _, State) ->
- {noreply, State}.
-
-handle_cast(_, State) ->
- {noreply, State}.
-
-handle_info(_, State) ->
- {noreply, State}.
-
-code_change(_OldVsn, State, _Extra) ->
- {ok, State}.
-
-terminate(_Reason, _State) ->
- [].
-
-
-
-
-
-
diff --git a/lib/crypto/src/crypto_sup.erl b/lib/crypto/src/crypto_sup.erl
deleted file mode 100644
index 8ef58777ab..0000000000
--- a/lib/crypto/src/crypto_sup.erl
+++ /dev/null
@@ -1,39 +0,0 @@
-%%
-%% %CopyrightBegin%
-%%
-%% Copyright Ericsson AB 1999-2009. 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%
-%%
-
-%% Purpose: Main supervisor in CRYPTO application.
-
--module(crypto_sup).
-
--behaviour(supervisor).
-
--export([start_link/0, init/1]).
-
-start_link() ->
- supervisor:start_link({local, crypto_sup}, crypto_sup, []).
-
-
-%% init([])
-%% Returns: {ok, {SupFlags, [ChildSpec]}}
-%%
-init([]) ->
- Child = {crypto_server, {crypto_server, start_link, []},
- permanent, 2000, worker, [crypto_server]},
- {ok, {{one_for_all, 10, 3600}, [Child]}}.
-
diff --git a/lib/crypto/test/crypto_SUITE.erl b/lib/crypto/test/crypto_SUITE.erl
index 42e200fcf0..03aa3964a5 100644
--- a/lib/crypto/test/crypto_SUITE.erl
+++ b/lib/crypto/test/crypto_SUITE.erl
@@ -30,6 +30,7 @@ suite() -> [{ct_hooks,[ts_install_cth]}].
all() ->
[app,
+ appup,
{group, md4},
{group, md5},
{group, ripemd160},
@@ -54,6 +55,7 @@ all() ->
{group, blowfish_cfb64},
{group, blowfish_ofb64},
{group, aes_cbc128},
+ {group, aes_cfb8},
{group, aes_cfb128},
{group, aes_cbc256},
{group, aes_ige256},
@@ -89,6 +91,7 @@ groups() ->
{des3_cbf,[], [block]},
{rc2_cbc,[], [block]},
{aes_cbc128,[], [block]},
+ {aes_cfb8,[], [block]},
{aes_cfb128,[], [block]},
{aes_cbc256,[], [block]},
{aes_ige256,[], [block]},
@@ -104,7 +107,21 @@ groups() ->
init_per_suite(Config) ->
try crypto:start() of
ok ->
- Config
+ try crypto:strong_rand_bytes(1) of
+ _ ->
+ Config
+ catch error:low_entropy ->
+ %% Make sure we are on OSE, otherwise we want to crash
+ {ose,_} = os:type(),
+
+ %% This is NOT how you want to seed this, it is just here
+ %% to make the tests pass. Check your OS manual for how you
+ %% really want to seed.
+ {H,M,L} = erlang:now(),
+ Bin = <<H:24,M:20,L:20>>,
+ crypto:rand_seed(<< <<Bin/binary>> || _ <- lists:seq(1,16) >>),
+ Config
+ end
catch _:_ ->
{skip, "Crypto did not start"}
end.
@@ -142,6 +159,11 @@ app() ->
app(Config) when is_list(Config) ->
ok = ?t:app_test(crypto).
%%--------------------------------------------------------------------
+appup() ->
+ [{doc, "Test that the crypto appup file is ok"}].
+appup(Config) when is_list(Config) ->
+ ok = ?t:appup_test(crypto).
+%%--------------------------------------------------------------------
hash() ->
[{doc, "Test all different hash functions"}].
hash(Config) when is_list(Config) ->
@@ -437,7 +459,7 @@ do_generate_compute({dh, P, G}) ->
SharedSecret = crypto:compute_key(dh, UserPub, HostPriv, [P, G]).
do_compute({ecdh = Type, Pub, Priv, Curve, SharedSecret}) ->
- Secret = crypto:bytes_to_integer(crypto:compute_key(Type, Pub, Priv, Curve)),
+ Secret = crypto:compute_key(Type, Pub, Priv, Curve),
case Secret of
SharedSecret ->
ok;
@@ -445,6 +467,9 @@ do_compute({ecdh = Type, Pub, Priv, Curve, SharedSecret}) ->
ct:fail({{crypto, compute_key, [Type, Pub, Priv, Curve]}, {expected, SharedSecret}, {got, Other}})
end.
+hexstr2point(X, Y) ->
+ <<4:8, (hexstr2bin(X))/binary, (hexstr2bin(Y))/binary>>.
+
hexstr2bin(S) ->
list_to_binary(hexstr2list(S)).
@@ -665,10 +690,10 @@ group_config(ecdsa = Type, Config) ->
SignVerify = [{Type, sha, Public, Private, Msg}],
[{sign_verify, SignVerify} | Config];
group_config(srp, Config) ->
- GenerateCompute = [srp3(), srp6(), srp6a()],
+ GenerateCompute = [srp3(), srp6(), srp6a(), srp6a_smaller_prime()],
[{generate_compute, GenerateCompute} | Config];
group_config(ecdh, Config) ->
- Compute = [ecdh()],
+ Compute = ecdh(),
[{compute, Compute} | Config];
group_config(dh, Config) ->
GenerateCompute = [dh()],
@@ -700,6 +725,9 @@ group_config(aes_cbc256, Config) ->
group_config(aes_ige256, Config) ->
Block = aes_ige256(),
[{block, Block} | Config];
+group_config(aes_cfb8, Config) ->
+ Block = aes_cfb8(),
+ [{block, Block} | Config];
group_config(aes_cfb128, Config) ->
Block = aes_cfb128(),
[{block, Block} | Config];
@@ -1141,6 +1169,25 @@ aes_ige256() ->
hexstr2bin("f69f2445df4f9b17ad2b417be66c3710")}
].
+aes_cfb8() ->
+ [{aes_cfb8,
+ hexstr2bin("2b7e151628aed2a6abf7158809cf4f3c"),
+ hexstr2bin("000102030405060708090a0b0c0d0e0f"),
+ hexstr2bin("6bc1bee22e409f96e93d7e117393172a")},
+ {aes_cfb8,
+ hexstr2bin("2b7e151628aed2a6abf7158809cf4f3c"),
+ hexstr2bin("3B3FD92EB72DAD20333449F8E83CFB4A"),
+ hexstr2bin("ae2d8a571e03ac9c9eb76fac45af8e51")},
+ {aes_cfb8,
+ hexstr2bin("2b7e151628aed2a6abf7158809cf4f3c"),
+ hexstr2bin("C8A64537A0B3A93FCDE3CDAD9F1CE58B"),
+ hexstr2bin("30c81c46a35ce411e5fbc1191a0a52ef")},
+ {aes_cfb8,
+ hexstr2bin("2b7e151628aed2a6abf7158809cf4f3c"),
+ hexstr2bin("26751F67A3CBB140B1808CF187A4F4DF"),
+ hexstr2bin("f69f2445df4f9b17ad2b417be66c3710")}
+ ].
+
aes_cfb128() ->
[{aes_cfb128,
hexstr2bin("2b7e151628aed2a6abf7158809cf4f3c"),
@@ -1449,6 +1496,32 @@ srp6() ->
ClientPublic = crypto:mod_pow(Generator, ClientPrivate, Prime),
srp(ClientPrivate, Generator, Prime, Version, Verifier, ServerPublic, ServerPrivate, UserPassHash, Scrambler, SessionKey).
+
+srp6a_smaller_prime() ->
+ Username = <<"alice">>,
+ Password = <<"password123">>,
+ Salt = <<"mystrongsalt">>,
+ Prime = hexstr2bin("894B645E89E1535BBDAD5B8B290650530801B18EBFBF5E8FAB3C82872A3E9BB7"),
+ Generator = <<7>>,
+ Version = '6a',
+ Scrambler = hexstr2bin("18DE4A002AD05EF464B19AE2B6929F9B1319C7AA"),
+ Verifier = hexstr2bin("867401D5DE10964768184EAF246B322760C847604075FA66A4423907"
+ "8428BCA5"),
+ ClientPrivate = hexstr2bin("C49F832EE8D67ECF9E7F2785EB0622D8B3FE2344C00F96E1AEF4103C"
+ "A44D51F9"),
+ ServerPrivate = hexstr2bin("6C78CCEAAEC15E69068A87795B2A20ED7B45CFC5A254EBE2F17F144A"
+ "4D99DB18"),
+ ClientPublic = hexstr2bin("2452A57166BBBF690DB77539BAF9C57CD1ED99D5AA15ED925AD9B5C3"
+ "64BBEDFF"),
+ ServerPublic = hexstr2bin("2C0464DE84B91E4963A3546CAC0EFE55F31F49208C3F0AD7EE55F444"
+ "8F38BA7F"),
+
+ SessionKey = hexstr2bin("65581B2302580BD26F522A5A421CF969B9CCBCE4051196B034A2A9D22065D848"),
+ UserPassHash = crypto:hash(sha, [Salt, crypto:hash(sha, [Username, <<$:>>, Password])]),
+ Verifier = crypto:mod_pow(Generator, UserPassHash, Prime),
+ ClientPublic = crypto:mod_pow(Generator, ClientPrivate, Prime),
+ srp(ClientPrivate, Generator, Prime, Version, Verifier, ServerPublic, ServerPrivate, UserPassHash, Scrambler, SessionKey).
+
srp6a() ->
Username = <<"alice">>,
Password = <<"password123">>,
@@ -1498,9 +1571,89 @@ srp(ClientPrivate, Generator, Prime, Version, Verifier, ServerPublic, ServerPriv
{host, [Verifier, Prime, Version, Scrambler]},
SessionKey}.
ecdh() ->
- {ecdh, 10053111454769593468622878414300213417816614162107065345116848162553478019161427871683337786549966,
- 1373339791687564785573162818422814591820885704654,
- secp160r1, 990333295438215762119481641129490894973766052278}.
+ %% http://csrc.nist.gov/groups/STM/cavp/
+ [{ecdh, hexstr2point("42ea6dd9969dd2a61fea1aac7f8e98edcc896c6e55857cc0", "dfbe5d7c61fac88b11811bde328e8a0d12bf01a9d204b523"),
+ hexstr2bin("f17d3fea367b74d340851ca4270dcb24c271f445bed9d527"),
+ secp192r1,
+ hexstr2bin("803d8ab2e5b6e6fca715737c3a82f7ce3c783124f6d51cd0")},
+ {ecdh, hexstr2point("deb5712fa027ac8d2f22c455ccb73a91e17b6512b5e030e7", "7e2690a02cc9b28708431a29fb54b87b1f0c14e011ac2125"),
+ hexstr2bin("56e853349d96fe4c442448dacb7cf92bb7a95dcf574a9bd5"),
+ secp192r1,
+ hexstr2bin("c208847568b98835d7312cef1f97f7aa298283152313c29d")},
+ {ecdh, hexstr2point("af33cd0629bc7e996320a3f40368f74de8704fa37b8fab69abaae280", "882092ccbba7930f419a8a4f9bb16978bbc3838729992559a6f2e2d7"),
+ hexstr2bin("8346a60fc6f293ca5a0d2af68ba71d1dd389e5e40837942df3e43cbd"),
+ secp224r1,
+ hexstr2bin("7d96f9a3bd3c05cf5cc37feb8b9d5209d5c2597464dec3e9983743e8")},
+ {ecdh, hexstr2point("13bfcd4f8e9442393cab8fb46b9f0566c226b22b37076976f0617a46", "eeb2427529b288c63c2f8963c1e473df2fca6caa90d52e2f8db56dd4"),
+ hexstr2bin("043cb216f4b72cdf7629d63720a54aee0c99eb32d74477dac0c2f73d"),
+ secp224r1,
+ hexstr2bin("ee93ce06b89ff72009e858c68eb708e7bc79ee0300f73bed69bbca09")},
+ {ecdh, hexstr2point("700c48f77f56584c5cc632ca65640db91b6bacce3a4df6b42ce7cc838833d287", "db71e509e3fd9b060ddb20ba5c51dcc5948d46fbf640dfe0441782cab85fa4ac"),
+ hexstr2bin("7d7dc5f71eb29ddaf80d6214632eeae03d9058af1fb6d22ed80badb62bc1a534"),
+ secp256r1,
+ hexstr2bin("46fc62106420ff012e54a434fbdd2d25ccc5852060561e68040dd7778997bd7b")},
+ {ecdh, hexstr2point("809f04289c64348c01515eb03d5ce7ac1a8cb9498f5caa50197e58d43a86a7ae", "b29d84e811197f25eba8f5194092cb6ff440e26d4421011372461f579271cda3"),
+ hexstr2bin("38f65d6dce47676044d58ce5139582d568f64bb16098d179dbab07741dd5caf5"),
+ secp256r1,
+ hexstr2bin("057d636096cb80b67a8c038c890e887d1adfa4195e9b3ce241c8a778c59cda67")},
+ {ecdh, hexstr2point("a7c76b970c3b5fe8b05d2838ae04ab47697b9eaf52e764592efda27fe7513272734466b400091adbf2d68c58e0c50066", "ac68f19f2e1cb879aed43a9969b91a0839c4c38a49749b661efedf243451915ed0905a32b060992b468c64766fc8437a"),
+ hexstr2bin("3cc3122a68f0d95027ad38c067916ba0eb8c38894d22e1b15618b6818a661774ad463b205da88cf699ab4d43c9cf98a1"),
+ secp384r1,
+ hexstr2bin("5f9d29dc5e31a163060356213669c8ce132e22f57c9a04f40ba7fcead493b457e5621e766c40a2e3d4d6a04b25e533f1")},
+ {ecdh, hexstr2point("30f43fcf2b6b00de53f624f1543090681839717d53c7c955d1d69efaf0349b7363acb447240101cbb3af6641ce4b88e0", "25e46c0c54f0162a77efcc27b6ea792002ae2ba82714299c860857a68153ab62e525ec0530d81b5aa15897981e858757"),
+ hexstr2bin("92860c21bde06165f8e900c687f8ef0a05d14f290b3f07d8b3a8cc6404366e5d5119cd6d03fb12dc58e89f13df9cd783"),
+ secp384r1,
+ hexstr2bin("a23742a2c267d7425fda94b93f93bbcc24791ac51cd8fd501a238d40812f4cbfc59aac9520d758cf789c76300c69d2ff")},
+ {ecdh, hexstr2point("00685a48e86c79f0f0875f7bc18d25eb5fc8c0b07e5da4f4370f3a9490340854334b1e1b87fa395464c60626124a4e70d0f785601d37c09870ebf176666877a2046d", "01ba52c56fc8776d9e8f5db4f0cc27636d0b741bbe05400697942e80b739884a83bde99e0f6716939e632bc8986fa18dccd443a348b6c3e522497955a4f3c302f676"),
+ hexstr2bin("017eecc07ab4b329068fba65e56a1f8890aa935e57134ae0ffcce802735151f4eac6564f6ee9974c5e6887a1fefee5743ae2241bfeb95d5ce31ddcb6f9edb4d6fc47"),
+ secp521r1,
+ hexstr2bin("005fc70477c3e63bc3954bd0df3ea0d1f41ee21746ed95fc5e1fdf90930d5e136672d72cc770742d1711c3c3a4c334a0ad9759436a4d3c5bf6e74b9578fac148c831")},
+ {ecdh, hexstr2point("01df277c152108349bc34d539ee0cf06b24f5d3500677b4445453ccc21409453aafb8a72a0be9ebe54d12270aa51b3ab7f316aa5e74a951c5e53f74cd95fc29aee7a", "013d52f33a9f3c14384d1587fa8abe7aed74bc33749ad9c570b471776422c7d4505d9b0a96b3bfac041e4c6a6990ae7f700e5b4a6640229112deafa0cd8bb0d089b0"),
+ hexstr2bin("00816f19c1fb10ef94d4a1d81c156ec3d1de08b66761f03f06ee4bb9dcebbbfe1eaa1ed49a6a990838d8ed318c14d74cc872f95d05d07ad50f621ceb620cd905cfb8"),
+ secp521r1,
+ hexstr2bin("000b3920ac830ade812c8f96805da2236e002acbbf13596a9ab254d44d0e91b6255ebf1229f366fb5a05c5884ef46032c26d42189273ca4efa4c3db6bd12a6853759")},
+
+ %% RFC-6954, Appendix A
+ {ecdh, hexstr2point("A9C21A569759DA95E0387041184261440327AFE33141CA04B82DC92E",
+ "98A0F75FBBF61D8E58AE5511B2BCDBE8E549B31E37069A2825F590C1"),
+ hexstr2bin("6060552303899E2140715816C45B57D9B42204FB6A5BF5BEAC10DB00"),
+ brainpoolP224r1,
+ hexstr2bin("1A4BFE705445120C8E3E026699054104510D119757B74D5FE2462C66")},
+ {ecdh, hexstr2point("034A56C550FF88056144E6DD56070F54B0135976B5BF77827313F36B",
+ "75165AD99347DC86CAAB1CBB579E198EAF88DC35F927B358AA683681"),
+ hexstr2bin("39F155483CEE191FBECFE9C81D8AB1A03CDA6790E7184ACE44BCA161"),
+ brainpoolP224r1,
+ hexstr2bin("1A4BFE705445120C8E3E026699054104510D119757B74D5FE2462C66")},
+ {ecdh, hexstr2point("44106E913F92BC02A1705D9953A8414DB95E1AAA49E81D9E85F929A8E3100BE5",
+ "8AB4846F11CACCB73CE49CBDD120F5A900A69FD32C272223F789EF10EB089BDC"),
+ hexstr2bin("55E40BC41E37E3E2AD25C3C6654511FFA8474A91A0032087593852D3E7D76BD3"),
+ brainpoolP256r1,
+ hexstr2bin("89AFC39D41D3B327814B80940B042590F96556EC91E6AE7939BCE31F3A18BF2B")},
+ {ecdh, hexstr2point("8D2D688C6CF93E1160AD04CC4429117DC2C41825E1E9FCA0ADDD34E6F1B39F7B",
+ "990C57520812BE512641E47034832106BC7D3E8DD0E4C7F1136D7006547CEC6A"),
+ hexstr2bin("81DB1EE100150FF2EA338D708271BE38300CB54241D79950F77B063039804F1D"),
+ brainpoolP256r1,
+ hexstr2bin("89AFC39D41D3B327814B80940B042590F96556EC91E6AE7939BCE31F3A18BF2B")},
+ {ecdh, hexstr2point("68B665DD91C195800650CDD363C625F4E742E8134667B767B1B476793588F885AB698C852D4A6E77A252D6380FCAF068",
+ "55BC91A39C9EC01DEE36017B7D673A931236D2F1F5C83942D049E3FA20607493E0D038FF2FD30C2AB67D15C85F7FAA59"),
+ hexstr2bin("032640BC6003C59260F7250C3DB58CE647F98E1260ACCE4ACDA3DD869F74E01F8BA5E0324309DB6A9831497ABAC96670"),
+ brainpoolP384r1,
+ hexstr2bin("0BD9D3A7EA0B3D519D09D8E48D0785FB744A6B355E6304BC51C229FBBCE239BBADF6403715C35D4FB2A5444F575D4F42")},
+ {ecdh, hexstr2point("4D44326F269A597A5B58BBA565DA5556ED7FD9A8A9EB76C25F46DB69D19DC8CE6AD18E404B15738B2086DF37E71D1EB4",
+ "62D692136DE56CBE93BF5FA3188EF58BC8A3A0EC6C1E151A21038A42E9185329B5B275903D192F8D4E1F32FE9CC78C48"),
+ hexstr2bin("1E20F5E048A5886F1F157C74E91BDE2B98C8B52D58E5003D57053FC4B0BD65D6F15EB5D1EE1610DF870795143627D042"),
+ brainpoolP384r1,
+ hexstr2bin("0BD9D3A7EA0B3D519D09D8E48D0785FB744A6B355E6304BC51C229FBBCE239BBADF6403715C35D4FB2A5444F575D4F42")},
+ {ecdh, hexstr2point("0A420517E406AAC0ACDCE90FCD71487718D3B953EFD7FBEC5F7F27E28C6149999397E91E029E06457DB2D3E640668B392C2A7E737A7F0BF04436D11640FD09FD",
+ "72E6882E8DB28AAD36237CD25D580DB23783961C8DC52DFA2EC138AD472A0FCEF3887CF62B623B2A87DE5C588301EA3E5FC269B373B60724F5E82A6AD147FDE7"),
+ hexstr2bin("230E18E1BCC88A362FA54E4EA3902009292F7F8033624FD471B5D8ACE49D12CFABBC19963DAB8E2F1EBA00BFFB29E4D72D13F2224562F405CB80503666B25429"),
+ brainpoolP512r1,
+ hexstr2bin("A7927098655F1F9976FA50A9D566865DC530331846381C87256BAF3226244B76D36403C024D7BBF0AA0803EAFF405D3D24F11A9B5C0BEF679FE1454B21C4CD1F")},
+ {ecdh, hexstr2point("9D45F66DE5D67E2E6DB6E93A59CE0BB48106097FF78A081DE781CDB31FCE8CCBAAEA8DD4320C4119F1E9CD437A2EAB3731FA9668AB268D871DEDA55A5473199F",
+ "2FDC313095BCDD5FB3A91636F07A959C8E86B5636A1E930E8396049CB481961D365CC11453A06C719835475B12CB52FC3C383BCE35E27EF194512B71876285FA"),
+ hexstr2bin("16302FF0DBBB5A8D733DAB7141C1B45ACBC8715939677F6A56850A38BD87BD59B09E80279609FF333EB9D4C061231FB26F92EEB04982A5F1D1764CAD57665422"),
+ brainpoolP512r1,
+ hexstr2bin("A7927098655F1F9976FA50A9D566865DC530331846381C87256BAF3226244B76D36403C024D7BBF0AA0803EAFF405D3D24F11A9B5C0BEF679FE1454B21C4CD1F")}].
dh() ->
{dh, 0087761979513264537414556992123116644042638206717762626089877284926656954974893442000747478454809111207351620687968672207938731607963470779396984752680274820156266685080223616226905101126463253150237669547023934604953898814222890239130021414026118792251620881355456432549881723310342870016961804255746630219, 2}.
diff --git a/lib/crypto/vsn.mk b/lib/crypto/vsn.mk
index 98c071cf87..a2bd6f851a 100644
--- a/lib/crypto/vsn.mk
+++ b/lib/crypto/vsn.mk
@@ -1 +1 @@
-CRYPTO_VSN = 3.2
+CRYPTO_VSN = 3.3
diff --git a/lib/debugger/doc/src/notes.xml b/lib/debugger/doc/src/notes.xml
index a3543a1e11..8832f99fc3 100644
--- a/lib/debugger/doc/src/notes.xml
+++ b/lib/debugger/doc/src/notes.xml
@@ -32,6 +32,72 @@
<p>This document describes the changes made to the Debugger
application.</p>
+<section><title>Debugger 4.0</title>
+
+ <section><title>Fixed Bugs and Malfunctions</title>
+ <list>
+ <item>
+ <p>
+ The debugger now correctly evaluates code such as '<c>X =
+ true andalso X</c>'. (Thanks to Anthony Ramine.)</p>
+ <p>
+ Own Id: OTP-11553</p>
+ </item>
+ <item>
+ <p>
+ A few subtle bugs in the evaluation of code in the
+ debugger has been corrected. (Thanks to Anthony Ramine.)</p>
+ <p>
+ Own Id: OTP-11676</p>
+ </item>
+ <item>
+ <p>
+ Application upgrade (appup) files are corrected for the
+ following applications: </p>
+ <p>
+ <c>asn1, common_test, compiler, crypto, debugger,
+ dialyzer, edoc, eldap, erl_docgen, et, eunit, gs, hipe,
+ inets, observer, odbc, os_mon, otp_mibs, parsetools,
+ percept, public_key, reltool, runtime_tools, ssh,
+ syntax_tools, test_server, tools, typer, webtool, wx,
+ xmerl</c></p>
+ <p>
+ A new test utility for testing appup files is added to
+ test_server. This is now used by most applications in
+ OTP.</p>
+ <p>
+ (Thanks to Tobias Schlager)</p>
+ <p>
+ Own Id: OTP-11744</p>
+ </item>
+ </list>
+ </section>
+
+
+ <section><title>Improvements and New Features</title>
+ <list>
+ <item>
+ <p>
+ Removed gs based applications and gs based backends. The
+ <c>observer</c> application replaces the removed
+ applications.</p>
+ <p>
+ *** POTENTIAL INCOMPATIBILITY ***</p>
+ <p>
+ Own Id: OTP-10915</p>
+ </item>
+ <item>
+ <p>
+ Support Maps syntax in debugger (Thanks to Anthony
+ Ramine).</p>
+ <p>
+ Own Id: OTP-11673</p>
+ </item>
+ </list>
+ </section>
+
+</section>
+
<section><title>Debugger 3.2.12</title>
<section><title>Improvements and New Features</title>
diff --git a/lib/debugger/priv/erlang_bug.png b/lib/debugger/priv/erlang_bug.png
index 87c8279654..200f531484 100644
--- a/lib/debugger/priv/erlang_bug.png
+++ b/lib/debugger/priv/erlang_bug.png
Binary files differ
diff --git a/lib/debugger/src/dbg_ieval.erl b/lib/debugger/src/dbg_ieval.erl
index 6ce3262ed2..77297de0f3 100644
--- a/lib/debugger/src/dbg_ieval.erl
+++ b/lib/debugger/src/dbg_ieval.erl
@@ -505,12 +505,12 @@ lambda(Fun, As) when is_function(Fun) ->
%% ... and the fun was defined in interpreted code
{module, ?MODULE} ->
- {Mod,Name,Bs} =
+ {Mod,Name,Bs, Cs} =
case erlang:fun_info(Fun, env) of
- {env,[{{M,F},Bs0,Cs}]} ->
- {M,F,Bs0};
- {env,[{{M,F},Bs0,Cs,FName}]} ->
- {M,F,add_binding(FName, Fun, Bs0)}
+ {env,[{{M,F},Bs0,Cs0}]} ->
+ {M,F,Bs0, Cs0};
+ {env,[{{M,F},Bs0,Cs0,FName}]} ->
+ {M,F,add_binding(FName, Fun, Bs0), Cs0}
end,
{arity, Arity} = erlang:fun_info(Fun, arity),
if
@@ -654,6 +654,25 @@ expr({tuple,Line,Es0}, Bs0, Ieval) ->
{Vs,Bs} = eval_list(Es0, Bs0, Ieval#ieval{line=Line}),
{value,list_to_tuple(Vs),Bs};
+%% Map
+expr({map,Line,Fs0}, Bs0, Ieval) ->
+ {Fs,Bs} = eval_map_fields(Fs0, Bs0, Ieval#ieval{line=Line,top=false}),
+ Value = lists:foldl(fun ({map_assoc,K,V}, Mi) -> maps:put(K,V,Mi) end,
+ #{}, Fs),
+ {value,Value,Bs};
+expr({map,Line,E0,Fs0}, Bs0, Ieval0) ->
+ Ieval = Ieval0#ieval{line=Line,top=false},
+ {value,E,Bs1} = expr(E0, Bs0, Ieval),
+ case E of
+ #{} ->
+ {Fs,Bs2} = eval_map_fields(Fs0, Bs0, Ieval),
+ Value = lists:foldl(fun ({map_assoc,K,V}, Mi) -> maps:put(K,V,Mi);
+ ({map_exact,K,V}, Mi) -> maps:update(K,V,Mi)
+ end, E, Fs),
+ {value,Value,merge_bindings(Bs2, Bs1, Ieval)};
+ _ ->
+ exception(error, {badarg,E}, Bs1, Ieval)
+ end;
%% A block of statements
expr({block,Line,Es},Bs,Ieval) ->
seq(Es, Bs, Ieval#ieval{line=Line});
@@ -712,23 +731,25 @@ expr({'if',Line,Cs}, Bs, Ieval) ->
if_clauses(Cs, Bs, Ieval#ieval{line=Line});
%% Andalso/orelse
-expr({'andalso',Line,E1,E2}, Bs, Ieval) ->
- case expr(E1, Bs, Ieval#ieval{line=Line, top=false}) of
- {value,false,_}=Res ->
- Res;
- {value,true,_} ->
- expr(E2, Bs, Ieval#ieval{line=Line, top=false});
- {value,Val,Bs} ->
- exception(error, {badarg,Val}, Bs, Ieval)
+expr({'andalso',Line,E1,E2}, Bs0, Ieval) ->
+ case expr(E1, Bs0, Ieval#ieval{line=Line, top=false}) of
+ {value,false,_}=Res ->
+ Res;
+ {value,true,Bs} ->
+ {value,Val,_} = expr(E2, Bs, Ieval#ieval{line=Line, top=false}),
+ {value,Val,Bs};
+ {value,Val,Bs} ->
+ exception(error, {badarg,Val}, Bs, Ieval)
end;
-expr({'orelse',Line,E1,E2}, Bs, Ieval) ->
- case expr(E1, Bs, Ieval#ieval{line=Line, top=false}) of
- {value,true,_}=Res ->
- Res;
- {value,false,_} ->
- expr(E2, Bs, Ieval#ieval{line=Line, top=false});
- {value,Val,_} ->
- exception(error, {badarg,Val}, Bs, Ieval)
+expr({'orelse',Line,E1,E2}, Bs0, Ieval) ->
+ case expr(E1, Bs0, Ieval#ieval{line=Line, top=false}) of
+ {value,true,_}=Res ->
+ Res;
+ {value,false,Bs} ->
+ {value,Val,_} = expr(E2, Bs, Ieval#ieval{line=Line, top=false}),
+ {value,Val,Bs};
+ {value,Val,Bs} ->
+ exception(error, {badarg,Val}, Bs, Ieval)
end;
%% Matching expression
@@ -1125,7 +1146,7 @@ eval_generate([V|Rest], P, Bs0, CompFun, Ieval) ->
case catch match1(P, V, erl_eval:new_bindings(), Bs0) of
{match,Bsn} ->
Bs2 = add_bindings(Bsn, Bs0),
- CompFun(Bs2) ++ eval_generate(Rest, P, Bs2, CompFun, Ieval);
+ CompFun(Bs2) ++ eval_generate(Rest, P, Bs0, CompFun, Ieval);
nomatch ->
eval_generate(Rest, P, Bs0, CompFun, Ieval)
end;
@@ -1466,6 +1487,19 @@ guard_expr({cons,_,H0,T0}, Bs) ->
guard_expr({tuple,_,Es0}, Bs) ->
{values,Es} = guard_exprs(Es0, Bs),
{value,list_to_tuple(Es)};
+guard_expr({map,_,Fs0}, Bs) ->
+ Fs = eval_map_fields_guard(Fs0, Bs),
+ Value = lists:foldl(fun ({map_assoc,K,V}, Mi) -> maps:put(K,V,Mi) end,
+ #{}, Fs),
+ {value,Value};
+guard_expr({map,_,E0,Fs0}, Bs) ->
+ {value,E} = guard_expr(E0, Bs),
+ Fs = eval_map_fields_guard(Fs0, Bs),
+ Value = lists:foldl(fun ({map_assoc,K,V}, Mi) -> maps:put(K,V,Mi);
+ ({map_exact,K,V}, Mi) -> maps:update(K,V,Mi) end,
+ E, Fs),
+ io:format("~p~n", [{E,Value}]),
+ {value,Value};
guard_expr({bin,_,Flds}, Bs) ->
{value,V,_Bs} =
eval_bits:expr_grp(Flds, Bs,
@@ -1475,6 +1509,37 @@ guard_expr({bin,_,Flds}, Bs) ->
end, [], false),
{value,V}.
+
+%% eval_map_fields([Field], Bindings, IEvalState) ->
+%% {[{map_assoc | map_exact,Key,Value}],Bindings}
+
+eval_map_fields(Fs, Bs, Ieval) ->
+ eval_map_fields(Fs, Bs, Ieval, fun expr/3).
+
+eval_map_fields_guard(Fs0, Bs) ->
+ {Fs,_} = eval_map_fields(Fs0, Bs, #ieval{},
+ fun (G0, Bs0, _) ->
+ {value,G} = guard_expr(G0, Bs0),
+ {value,G,Bs0}
+ end),
+ Fs.
+
+eval_map_fields(Fs, Bs, Ieval, F) ->
+ eval_map_fields(Fs, Bs, Ieval, F, []).
+
+eval_map_fields([{map_field_assoc,Line,K0,V0}|Fs], Bs0, Ieval0, F, Acc) ->
+ Ieval = Ieval0#ieval{line=Line},
+ {value,K,Bs1} = F(K0, Bs0, Ieval),
+ {value,V,Bs2} = F(V0, Bs1, Ieval),
+ eval_map_fields(Fs, Bs2, Ieval0, F, [{map_assoc,K,V}|Acc]);
+eval_map_fields([{map_field_exact,Line,K0,V0}|Fs], Bs0, Ieval0, F, Acc) ->
+ Ieval = Ieval0#ieval{line=Line},
+ {value,K,Bs1} = F(K0, Bs0, Ieval),
+ {value,V,Bs2} = F(V0, Bs1, Ieval),
+ eval_map_fields(Fs, Bs2, Ieval0, F, [{map_exact,K,V}|Acc]);
+eval_map_fields([], Bs, _Ieval, _F, Acc) ->
+ {lists:reverse(Acc),Bs}.
+
%% match(Pattern,Term,Bs) -> {match,Bs} | nomatch
match(Pat, Term, Bs) ->
try match1(Pat, Term, Bs, Bs)
@@ -1504,6 +1569,8 @@ match1({cons,_,H,T}, [H1|T1], Bs0, BBs) ->
match1({tuple,_,Elts}, Tuple, Bs, BBs)
when length(Elts) =:= tuple_size(Tuple) ->
match_tuple(Elts, Tuple, 1, Bs, BBs);
+match1({map,_,Fields}, Map, Bs, BBs) when is_map(Map) ->
+ match_map(Fields, Map, Bs, BBs);
match1({bin,_,Fs}, B, Bs0, BBs) when is_bitstring(B) ->
try eval_bits:match_bits(Fs, B, Bs0, BBs,
match_fun(BBs),
@@ -1527,6 +1594,17 @@ match_tuple([E|Es], Tuple, I, Bs0, BBs) ->
match_tuple([], _, _, Bs, _BBs) ->
{match,Bs}.
+match_map([{map_field_exact,_,K0,Pat}|Fs], Map, Bs0, BBs) ->
+ {value,K,BBs} = expr(K0, BBs, #ieval{}),
+ case maps:find(K, Map) of
+ {ok,Value} ->
+ {match,Bs} = match1(Pat, Value, Bs0, BBs),
+ match_map(Fs, Map, Bs, BBs);
+ error -> throw(nomatch)
+ end;
+match_map([], _, Bs, _BBs) ->
+ {match,Bs}.
+
head_match([Par|Pars], [Arg|Args], Bs0, BBs) ->
try match1(Par, Arg, Bs0, BBs) of
{match,Bs} -> head_match(Pars, Args, Bs, BBs)
diff --git a/lib/debugger/src/dbg_iload.erl b/lib/debugger/src/dbg_iload.erl
index 9806692afc..ad05a7c529 100644
--- a/lib/debugger/src/dbg_iload.erl
+++ b/lib/debugger/src/dbg_iload.erl
@@ -1,7 +1,7 @@
%%
%% %CopyrightBegin%
%%
-%% Copyright Ericsson AB 1998-2010. All Rights Reserved.
+%% Copyright Ericsson AB 1998-2014. 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
@@ -42,18 +42,21 @@
load_mod(Mod, File, Binary, Db) ->
Flag = process_flag(trap_exit, true),
- Pid = spawn_link(fun () -> load_mod1(Mod, File, Binary, Db) end),
+ Pid = spawn_link(load_mod1(Mod, File, Binary, Db)),
receive
{'EXIT', Pid, What} ->
process_flag(trap_exit, Flag),
What
end.
--spec load_mod1(atom(), file:filename(), binary(), ets:tid()) -> no_return().
+-spec load_mod1(atom(), file:filename(), binary(), ets:tid()) ->
+ fun(() -> no_return()).
load_mod1(Mod, File, Binary, Db) ->
- store_module(Mod, File, Binary, Db),
- exit({ok, Mod}).
+ fun() ->
+ store_module(Mod, File, Binary, Db),
+ exit({ok, Mod})
+ end.
%%====================================================================
%% Internal functions
@@ -194,6 +197,11 @@ pattern({cons,Line,H0,T0}) ->
pattern({tuple,Line,Ps0}) ->
Ps1 = pattern_list(Ps0),
{tuple,Line,Ps1};
+pattern({map,Line,Fs0}) ->
+ Fs1 = lists:map(fun ({map_field_exact,L,K,V}) ->
+ {map_field_exact,L,expr(K, false),pattern(V)}
+ end, Fs0),
+ {map,Line,Fs1};
pattern({op,_,'-',{integer,Line,I}}) ->
{value,Line,-I};
pattern({op,_,'+',{integer,Line,I}}) ->
@@ -262,6 +270,8 @@ guard_test({string,Line,_}) -> {value,Line,false};
guard_test({nil,Line}) -> {value,Line,false};
guard_test({cons,Line,_,_}) -> {value,Line,false};
guard_test({tuple,Line,_}) -> {value,Line,false};
+guard_test({map,Line,_}) -> {value,Line,false};
+guard_test({map,Line,_,_}) -> {value,Line,false};
guard_test({bin,Line,_}) -> {value,Line,false}.
gexpr({var,Line,V}) -> {var,Line,V};
@@ -279,6 +289,13 @@ gexpr({cons,Line,H0,T0}) ->
gexpr({tuple,Line,Es0}) ->
Es1 = gexpr_list(Es0),
{tuple,Line,Es1};
+gexpr({map,Line,Fs0}) ->
+ Fs1 = map_fields(Fs0, fun gexpr/1),
+ {map,Line,Fs1};
+gexpr({map,Line,E0,Fs0}) ->
+ E1 = gexpr(E0),
+ Fs1 = map_fields(Fs0, fun gexpr/1),
+ {map,Line,E1,Fs1};
gexpr({bin,Line,Flds0}) ->
Flds = gexpr_list(Flds0),
{bin,Line,Flds};
@@ -341,6 +358,13 @@ expr({cons,Line,H0,T0}, _Lc) ->
expr({tuple,Line,Es0}, _Lc) ->
Es1 = expr_list(Es0),
{tuple,Line,Es1};
+expr({map,Line,Fs0}, _Lc) ->
+ Fs1 = map_fields(Fs0),
+ {map,Line,Fs1};
+expr({map,Line,E0,Fs0}, _Lc) ->
+ E1 = expr(E0, false),
+ Fs1 = map_fields(Fs0),
+ {map,Line,E1,Fs1};
expr({block,Line,Es0}, Lc) ->
%% Unfold block into a sequence.
Es1 = exprs(Es0, Lc),
@@ -436,7 +460,7 @@ expr({lc,Line,E0,Gs0}, _Lc) -> %R8.
({b_generate,L,P0,Qs}) -> %R12.
{b_generate,L,expr(P0, false),expr(Qs, false)};
(Expr) ->
- case is_guard(Expr) of
+ case erl_lint:is_guard_test(Expr) of
true -> {guard,guard([[Expr]])};
false -> expr(Expr, false)
end
@@ -448,7 +472,7 @@ expr({bc,Line,E0,Gs0}, _Lc) -> %R12.
({b_generate,L,P0,Qs}) -> %R12.
{b_generate,L,expr(P0, false),expr(Qs, false)};
(Expr) ->
- case is_guard(Expr) of
+ case erl_lint:is_guard_test(Expr) of
true -> {guard,guard([[Expr]])};
false -> expr(Expr, false)
end
@@ -491,42 +515,6 @@ expr({bin_element,Line,Expr,Size,Type}, _Lc) ->
expr(Other, _Lc) ->
exit({?MODULE,{unknown_expr,Other}}).
-%% is_guard(Expression) -> true | false.
-%% Test if a general expression is a guard test or guard BIF.
-%% Cannot use erl_lint here as sys_pre_expand has transformed source.
-
-is_guard({op,_,Op,L,R}) ->
- erl_internal:comp_op(Op, 2) andalso is_gexpr_list([L,R]);
-is_guard({call,_,{remote,_,{atom,_,erlang},{atom,_,Test}},As}) ->
- Arity = length(As),
- (erl_internal:guard_bif(Test, Arity) orelse
- erl_internal:old_type_test(Test, Arity)) andalso is_gexpr_list(As);
-is_guard({atom,_,true}) -> true;
-is_guard(_) -> false.
-
-is_gexpr({var,_,_}) -> true;
-is_gexpr({atom,_,_}) -> true;
-is_gexpr({integer,_,_}) -> true;
-is_gexpr({char,_,_}) -> true;
-is_gexpr({float,_,_}) -> true;
-is_gexpr({string,_,_}) -> true;
-is_gexpr({nil,_}) -> true;
-is_gexpr({cons,_,H,T}) -> is_gexpr_list([H,T]);
-is_gexpr({tuple,_,Es}) -> is_gexpr_list(Es);
-is_gexpr({call,_,{remote,_,{atom,_,erlang},{atom,_,F}},As}) ->
- Ar = length(As),
- case erl_internal:guard_bif(F, Ar) of
- true -> is_gexpr_list(As);
- false -> erl_internal:arith_op(F, Ar) andalso is_gexpr_list(As)
- end;
-is_gexpr({op,_,Op,A}) ->
- erl_internal:arith_op(Op, 1) andalso is_gexpr(A);
-is_gexpr({op,_,Op,A1,A2}) ->
- erl_internal:arith_op(Op, 2) andalso is_gexpr_list([A1,A2]);
-is_gexpr(_) -> false.
-
-is_gexpr_list(Es) -> lists:all(fun (E) -> is_gexpr(E) end, Es).
-
consify([A|As]) ->
{cons,0,A,consify(As)};
consify([]) -> {value,0,[]}.
@@ -550,6 +538,15 @@ fun_clauses([{clause,L,H,G,B}|Cs]) ->
[{clause,L,head(H),guard(G),exprs(B, true)}|fun_clauses(Cs)];
fun_clauses([]) -> [].
+map_fields(Fs) ->
+ map_fields(Fs, fun (E) -> expr(E, false) end).
+
+map_fields([{map_field_assoc,L,N,V}|Fs], F) ->
+ [{map_field_assoc,L,F(N),F(V)}|map_fields(Fs)];
+map_fields([{map_field_exact,L,N,V}|Fs], F) ->
+ [{map_field_exact,L,F(N),F(V)}|map_fields(Fs)];
+map_fields([], _) -> [].
+
%% new_var_name() -> VarName.
new_var_name() ->
diff --git a/lib/debugger/src/dbg_wx_filedialog_win.erl b/lib/debugger/src/dbg_wx_filedialog_win.erl
index c8ecb7b5d4..ea34295067 100644
--- a/lib/debugger/src/dbg_wx_filedialog_win.erl
+++ b/lib/debugger/src/dbg_wx_filedialog_win.erl
@@ -1,7 +1,7 @@
%%
%% %CopyrightBegin%
%%
-%% Copyright Ericsson AB 2009-2012. All Rights Reserved.
+%% Copyright Ericsson AB 2009-2014. 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
@@ -242,16 +242,13 @@ handle_event(#wx{event=#wxList{itemIndex=Index}},
{noreply, State0}
end;
-handle_event(#wx{event=#wxCommand{type=command_text_updated, cmdString=Wanted}},
+handle_event(#wx{event=#wxCommand{type=command_text_updated, cmdString=Wanted}},
State = #state{ptext=Previous, completion=Comp}) ->
case Previous =:= undefined orelse lists:prefix(Wanted, Previous) of
- true ->
- case Comp of
- {Temp,_} -> wxWindow:destroy(Temp);
- undefined -> ok
- end,
+ true ->
+ destroy_completion(Comp),
{noreply, State#state{ptext=Wanted,completion=undefined}};
- false ->
+ false ->
{noreply, show_completion(Wanted, State)}
end;
@@ -310,8 +307,7 @@ handle_event(#wx{event=#wxSize{size={Width,_}}}, State = #state{list=LC}) ->
end),
{noreply, State};
-handle_event(Event,State) ->
- io:format("~p Got ~p ~n",[self(), Event]),
+handle_event(_Event,State) ->
{noreply, State}.
handle_info(_Msg, State) ->
@@ -419,8 +415,9 @@ show_completion(Wanted, State = #state{text=TC, win=Win, list=LC, completion=Com
end.
destroy_completion(undefined) -> ok;
-destroy_completion({Window, _}) ->
+destroy_completion({Window, _LB}) ->
Parent = wxWindow:getParent(Window),
+ wxWindow:hide(Window),
wxWindow:destroy(Window),
wxWindow:refresh(Parent).
diff --git a/lib/debugger/src/dbg_wx_mon.erl b/lib/debugger/src/dbg_wx_mon.erl
index 4a01492cf5..4ab03985d3 100644
--- a/lib/debugger/src/dbg_wx_mon.erl
+++ b/lib/debugger/src/dbg_wx_mon.erl
@@ -1,7 +1,7 @@
%%
%% %CopyrightBegin%
%%
-%% Copyright Ericsson AB 2008-2013. All Rights Reserved.
+%% Copyright Ericsson AB 2008-2014. 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
@@ -148,7 +148,7 @@ init2(CallingPid, Mode, SFile, GS) ->
win = Win,
focus = undefined,
- coords = {20,20},
+ coords = {-1,-1},
intdir = element(2, file:get_cwd()),
pinfos = [],
diff --git a/lib/debugger/src/dbg_wx_mon_win.erl b/lib/debugger/src/dbg_wx_mon_win.erl
index 0071b27027..d94eb14937 100644
--- a/lib/debugger/src/dbg_wx_mon_win.erl
+++ b/lib/debugger/src/dbg_wx_mon_win.erl
@@ -1,7 +1,7 @@
%%
%% %CopyrightBegin%
%%
-%% Copyright Ericsson AB 2008-2013. All Rights Reserved.
+%% Copyright Ericsson AB 2008-2014. 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
@@ -617,8 +617,6 @@ handle_event(#wx{userData=Data,
_WinInfo) ->
Data;
handle_event(_Event, _WinInfo) ->
-%% FIXME
- io:format("Ev: ~p~n",[_Event]),
ignore.
%%====================================================================
diff --git a/lib/debugger/src/dbg_wx_trace.erl b/lib/debugger/src/dbg_wx_trace.erl
index 1ac796bb4c..4438466bb0 100644
--- a/lib/debugger/src/dbg_wx_trace.erl
+++ b/lib/debugger/src/dbg_wx_trace.erl
@@ -1,7 +1,7 @@
%%
%% %CopyrightBegin%
%%
-%% Copyright Ericsson AB 2008-2013. All Rights Reserved.
+%% Copyright Ericsson AB 2008-2014. 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
@@ -125,7 +125,7 @@ init(Pid, Parent, Meta, TraceWin, BackTrace, Strings) ->
dbg_wx_winman:insert(Title, Window),
%% Initial process state
- State1 = #state{win=Win, coords={0,0}, pid=Pid, meta=Meta,
+ State1 = #state{win=Win, coords={-1,-1}, pid=Pid, meta=Meta,
status={idle,null,null},
stack={1,1}, strings=[str_on]},
diff --git a/lib/debugger/src/dbg_wx_view.erl b/lib/debugger/src/dbg_wx_view.erl
index 6242b9d0e0..fc7ffc0d56 100644
--- a/lib/debugger/src/dbg_wx_view.erl
+++ b/lib/debugger/src/dbg_wx_view.erl
@@ -1,7 +1,7 @@
%%
%% %CopyrightBegin%
%%
-%% Copyright Ericsson AB 2008-2011. All Rights Reserved.
+%% Copyright Ericsson AB 2008-2014. 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
@@ -72,7 +72,7 @@ init(GS, Env, Mod, Title) ->
Win2,
int:all_breaks(Mod)),
- try loop(#state{gs=GS, win=Win3, coords={0,0}, mod=Mod})
+ try loop(#state{gs=GS, win=Win3, coords={-1,-1}, mod=Mod})
catch _E:normal ->
exit(normal);
_E:_R ->
diff --git a/lib/debugger/src/debugger.app.src b/lib/debugger/src/debugger.app.src
index 84fb98c94e..f102385d39 100644
--- a/lib/debugger/src/debugger.app.src
+++ b/lib/debugger/src/debugger.app.src
@@ -46,4 +46,6 @@
int
]},
{registered, [dbg_iserver, dbg_wx_mon, dbg_wx_winman]},
- {applications, [kernel, stdlib]}]}.
+ {applications, [kernel, stdlib]},
+ {runtime_dependencies, ["wx-1.2","stdlib-2.0","kernel-3.0","erts-6.0",
+ "compiler-5.0"]}]}.
diff --git a/lib/debugger/src/debugger.appup.src b/lib/debugger/src/debugger.appup.src
index 7a435e9b22..81d2fab05a 100644
--- a/lib/debugger/src/debugger.appup.src
+++ b/lib/debugger/src/debugger.appup.src
@@ -1,7 +1,7 @@
-%%
+%% -*- erlang -*-
%% %CopyrightBegin%
%%
-%% Copyright Ericsson AB 2001-2009. All Rights Reserved.
+%% Copyright Ericsson AB 2001-2014. 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
@@ -15,5 +15,7 @@
%% under the License.
%%
%% %CopyrightEnd%
-%%
-{"%VSN%",[],[]}.
+{"%VSN%",
+ [{<<".*">>,[{restart_application, debugger}]}],
+ [{<<".*">>,[{restart_application, debugger}]}]
+}.
diff --git a/lib/debugger/src/debugger.erl b/lib/debugger/src/debugger.erl
index 8a2ac28df5..77fd0acb70 100644
--- a/lib/debugger/src/debugger.erl
+++ b/lib/debugger/src/debugger.erl
@@ -51,12 +51,6 @@
%% ------------------------------
%% Help window for creating new breakpoints.
%%
-%% dbg_wx_edit, dbg_wx_edit_win
-%% --------------------------------------
-%% Help window for editing terms, used for setting backtrace size
-%% (i.e. how many stack frames to display in the attach process window)
-%% and changing variable values.
-%%
%% dbg_wx_interpret, dbg_wx_filedialog_win
%% --------------------------------------
%% Help window for selecting modules to interpret.
diff --git a/lib/debugger/src/int.erl b/lib/debugger/src/int.erl
index bdd671cff1..2755db64b8 100644
--- a/lib/debugger/src/int.erl
+++ b/lib/debugger/src/int.erl
@@ -630,14 +630,13 @@ find_beam(Mod, Src) ->
File = filename:join(SrcDir, BeamFile),
case is_file(File) of
true -> File;
- false -> find_beam_1(Mod, BeamFile, SrcDir)
+ false -> find_beam_1(BeamFile, SrcDir)
end.
-find_beam_1(Mod, BeamFile, SrcDir) ->
+find_beam_1(BeamFile, SrcDir) ->
RootDir = filename:dirname(SrcDir),
EbinDir = filename:join(RootDir, "ebin"),
CodePath = [EbinDir | code:get_path()],
- BeamFile = atom_to_list(Mod) ++ code:objfile_extension(),
lists:foldl(fun(_, Beam) when is_list(Beam) -> Beam;
(Dir, error) ->
File = filename:join(Dir, BeamFile),
diff --git a/lib/debugger/test/Makefile b/lib/debugger/test/Makefile
index 5aa290c61b..9a0ce14ecd 100644
--- a/lib/debugger/test/Makefile
+++ b/lib/debugger/test/Makefile
@@ -44,6 +44,7 @@ MODULES= \
fun_SUITE \
lc_SUITE \
line_number_SUITE \
+ map_SUITE \
record_SUITE \
trycatch_SUITE \
test_lib \
diff --git a/lib/debugger/test/bs_construct_SUITE.erl b/lib/debugger/test/bs_construct_SUITE.erl
index 4870c87d74..8a6798c6ad 100644
--- a/lib/debugger/test/bs_construct_SUITE.erl
+++ b/lib/debugger/test/bs_construct_SUITE.erl
@@ -647,19 +647,27 @@ make_sub_bin(Bin0) ->
%% give the same result.
dynamic(Config) when is_list(Config) ->
- ?line dynamic_1(fun dynamic_big/5),
- ?line dynamic_1(fun dynamic_little/5),
+ Ps = [spawn_monitor(fun() ->
+ dynamic_1(Fun)
+ end) || Fun <- [fun dynamic_big/5,
+ fun dynamic_little/5]],
+ [receive
+ {'DOWN',Ref,process,Pid,normal} ->
+ ok;
+ {'DOWN',Ref,process,Pid,Exit} ->
+ ?t:fail({Pid,Exit})
+ end || {Pid,Ref} <- Ps],
ok.
dynamic_1(Dynamic) ->
- <<Lpad:128>> = erlang:md5([0]),
- <<Rpad:128>> = erlang:md5([1]),
- <<Int:128>> = erlang:md5([2]),
- 8385 = dynamic_2(0, {Int,Lpad,Rpad,Dynamic}, 0).
+ <<Lpad:64,_/binary>> = erlang:md5([0]),
+ <<Rpad:64,_/binary>> = erlang:md5([1]),
+ <<Int:64,_/binary>> = erlang:md5([2]),
+ 2145 = dynamic_2(0, {Int,Lpad,Rpad,Dynamic}, 0).
-dynamic_2(129, _, Count) -> Count;
+dynamic_2(64+1, _, Count) -> Count;
dynamic_2(Bef, Data, Count0) ->
- Count = dynamic_3(Bef, 128-Bef, Data, Count0),
+ Count = dynamic_3(Bef, 64-Bef, Data, Count0),
dynamic_2(Bef+1, Data, Count).
dynamic_3(_, -1, _, Count) -> Count;
@@ -680,13 +688,13 @@ dynamic_big(Bef, N, Int, Lpad, Rpad) ->
<<MaskedInt:N>> = NumBin,
%% Construct the binary in two different ways.
- Bin = id(<<Lpad:Bef,NumBin/bitstring,Rpad:(128-Bef-N)>>),
- Bin = <<Lpad:Bef,Int:N,Rpad:(128-Bef-N)>>,
+ Bin = id(<<Lpad:Bef,NumBin/bitstring,Rpad:(64-Bef-N)>>),
+ Bin = <<Lpad:Bef,Int:N,Rpad:(64-Bef-N)>>,
%% Further verify the result by matching.
LpadMasked = Lpad band ((1 bsl Bef) - 1),
- RpadMasked = Rpad band ((1 bsl (128-Bef-N)) - 1),
- Rbits = (128-Bef-N),
+ RpadMasked = Rpad band ((1 bsl (64-Bef-N)) - 1),
+ Rbits = (64-Bef-N),
<<LpadMasked:Bef,MaskedInt:N,RpadMasked:Rbits>> = id(Bin),
ok.
@@ -696,13 +704,13 @@ dynamic_little(Bef, N, Int, Lpad, Rpad) ->
<<MaskedInt:N/little>> = NumBin,
%% Construct the binary in two different ways.
- Bin = id(<<Lpad:Bef/little,NumBin/bitstring,Rpad:(128-Bef-N)/little>>),
- Bin = <<Lpad:Bef/little,Int:N/little,Rpad:(128-Bef-N)/little>>,
+ Bin = id(<<Lpad:Bef/little,NumBin/bitstring,Rpad:(64-Bef-N)/little>>),
+ Bin = <<Lpad:Bef/little,Int:N/little,Rpad:(64-Bef-N)/little>>,
%% Further verify the result by matching.
LpadMasked = Lpad band ((1 bsl Bef) - 1),
- RpadMasked = Rpad band ((1 bsl (128-Bef-N)) - 1),
- Rbits = (128-Bef-N),
+ RpadMasked = Rpad band ((1 bsl (64-Bef-N)) - 1),
+ Rbits = (64-Bef-N),
<<LpadMasked:Bef/little,MaskedInt:N/little,RpadMasked:Rbits/little>> = id(Bin),
ok.
diff --git a/lib/debugger/test/debugger_SUITE.erl b/lib/debugger/test/debugger_SUITE.erl
index 6f5442e97d..c74550be86 100644
--- a/lib/debugger/test/debugger_SUITE.erl
+++ b/lib/debugger/test/debugger_SUITE.erl
@@ -27,13 +27,13 @@
-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,
- app_test/1,erts_debug/1,encrypted_debug_info/1,
+ app_test/1,appup_test/1,erts_debug/1,encrypted_debug_info/1,
no_abstract_code/1]).
suite() -> [{ct_hooks,[ts_install_cth]}].
all() ->
- [app_test, erts_debug, no_abstract_code,
+ [app_test, appup_test, erts_debug, no_abstract_code,
encrypted_debug_info].
groups() ->
@@ -64,6 +64,9 @@ app_test(Config) when is_list(Config) ->
?line ?t:app_test(debugger),
ok.
+appup_test(Config) when is_list(Config) ->
+ ok = ?t:appup_test(debugger).
+
erts_debug(Config) when is_list(Config) ->
c:l(erts_debug),
ok.
diff --git a/lib/debugger/test/erl_eval_SUITE.erl b/lib/debugger/test/erl_eval_SUITE.erl
index be9312b68f..ba60ed6fb3 100644
--- a/lib/debugger/test/erl_eval_SUITE.erl
+++ b/lib/debugger/test/erl_eval_SUITE.erl
@@ -64,6 +64,7 @@ config(priv_dir,_) ->
% Default timetrap timeout (set in init_per_testcase).
-define(default_timeout, ?t:minutes(1)).
init_per_testcase(_Case, Config) ->
+ test_lib:interpret(?MODULE),
?line Dog = ?t:timetrap(?default_timeout),
[{watchdog, Dog} | Config].
end_per_testcase(_Case, Config) ->
diff --git a/lib/debugger/test/int_eval_SUITE.erl b/lib/debugger/test/int_eval_SUITE.erl
index 4ffcf7888e..9d7ef238e3 100644
--- a/lib/debugger/test/int_eval_SUITE.erl
+++ b/lib/debugger/test/int_eval_SUITE.erl
@@ -28,7 +28,7 @@
bifs_outside_erlang/1, spawning/1, applying/1,
catch_and_throw/1, external_call/1, test_module_info/1,
apply_interpreted_fun/1, apply_uninterpreted_fun/1,
- interpreted_exit/1, otp_8310/1, stacktrace/1]).
+ interpreted_exit/1, otp_8310/1, stacktrace/1, maps/1]).
%% Helpers.
-export([applier/3]).
@@ -44,7 +44,7 @@ all() ->
[bifs_outside_erlang, spawning, applying,
catch_and_throw, external_call, test_module_info,
apply_interpreted_fun, apply_uninterpreted_fun,
- interpreted_exit, otp_8310, stacktrace].
+ interpreted_exit, otp_8310, stacktrace, maps].
groups() ->
[].
@@ -291,6 +291,12 @@ stacktrace(Config) when is_list(Config) ->
end,
ok.
+maps(Config) when is_list(Config) ->
+ Fun = fun () -> ?IM:empty_map_update([camembert]) end,
+ {'EXIT',{{badarg,[camembert]},_}} = spawn_eval(Fun),
+ [#{hello := 0, price := 0}] = spawn_eval(fun () -> ?IM:update_in_fun() end),
+ ok.
+
do_eval(Config, Mod) ->
?line DataDir = ?config(data_dir, Config),
diff --git a/lib/debugger/test/int_eval_SUITE_data/my_int_eval_module.erl b/lib/debugger/test/int_eval_SUITE_data/my_int_eval_module.erl
index c5c6a56363..7f55360f48 100644
--- a/lib/debugger/test/int_eval_SUITE_data/my_int_eval_module.erl
+++ b/lib/debugger/test/int_eval_SUITE_data/my_int_eval_module.erl
@@ -29,6 +29,7 @@
-export([more_catch/1,more_nocatch/1,exit_me/0]).
-export([f/1, f_try/1, f_catch/1]).
-export([otp_5837/1, otp_8310/0]).
+-export([empty_map_update/1, update_in_fun/0]).
%% Internal exports.
-export([echo/2,my_subtract/2,catch_a_ball/0,throw_a_ball/0]).
@@ -236,4 +237,13 @@ otp_8310() ->
(catch {a, [X || X <- a]}),
{'EXIT',{{bad_generator,b},_}} =
(catch {a, << <<X>> || << X >> <= b >>}),
+ true = begin (X1 = true) andalso X1, X1 end,
+ false = begin (X2 = false) andalso X2, X2 end,
+ true = begin (X3 = true) orelse X3, X3 end,
+ false = begin (X4 = false) orelse X4, X4 end,
ok.
+
+empty_map_update(Map) -> Map#{}.
+
+update_in_fun() ->
+ lists:map(fun (X) -> X#{price := 0} end, [#{hello => 0, price => nil}]).
diff --git a/lib/debugger/test/map_SUITE.erl b/lib/debugger/test/map_SUITE.erl
new file mode 100644
index 0000000000..0076193725
--- /dev/null
+++ b/lib/debugger/test/map_SUITE.erl
@@ -0,0 +1,1003 @@
+%% %CopyrightBegin%
+%%
+%% Copyright Ericsson AB 2013. 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(map_SUITE).
+
+%% Copied from map_SUITE in erts.
+
+-export([all/0, suite/0,groups/0,init_per_suite/1, end_per_suite/1,
+ init_per_group/2,end_per_group/2
+ ]).
+
+-export([
+ t_build_and_match_literals/1,
+ t_update_literals/1,t_match_and_update_literals/1,
+ t_update_map_expressions/1,
+ t_update_assoc/1,t_update_exact/1,
+ t_guard_bifs/1, t_guard_sequence/1, t_guard_update/1,
+ t_guard_receive/1, t_guard_fun/1,
+ t_list_comprehension/1,
+ t_map_sort_literals/1,
+ %t_size/1,
+ t_map_size/1,
+
+ %% Specific Map BIFs
+ t_bif_map_get/1,
+ t_bif_map_find/1,
+ t_bif_map_is_key/1,
+ t_bif_map_keys/1,
+ t_bif_map_merge/1,
+ t_bif_map_new/1,
+ t_bif_map_put/1,
+ t_bif_map_remove/1,
+ t_bif_map_update/1,
+ t_bif_map_values/1,
+ t_bif_map_to_list/1,
+ t_bif_map_from_list/1,
+
+ %% erlang
+ t_erlang_hash/1,
+ t_map_encode_decode/1,
+
+ %% maps module not bifs
+ t_maps_fold/1,
+ t_maps_map/1,
+ t_maps_size/1,
+ t_maps_without/1,
+
+ %% misc
+ t_pdict/1,
+ t_ets/1,
+ t_dets/1
+ ]).
+
+-include_lib("stdlib/include/ms_transform.hrl").
+
+suite() -> [].
+
+all() -> [
+ t_build_and_match_literals,
+ t_update_literals, t_match_and_update_literals,
+ t_update_map_expressions,
+ t_update_assoc,t_update_exact,
+ t_guard_bifs, t_guard_sequence, t_guard_update,
+ t_guard_receive,t_guard_fun, t_list_comprehension,
+ t_map_sort_literals,
+
+ %% Specific Map BIFs
+ t_bif_map_get,t_bif_map_find,t_bif_map_is_key,
+ t_bif_map_keys, t_bif_map_merge, t_bif_map_new,
+ t_bif_map_put,
+ t_bif_map_remove, t_bif_map_update,
+ t_bif_map_values,
+ t_bif_map_to_list, t_bif_map_from_list,
+
+ %% erlang
+ t_erlang_hash, t_map_encode_decode,
+ t_map_size,
+
+ %% maps module
+ t_maps_fold, t_maps_map,
+ t_maps_size, t_maps_without,
+
+
+ %% Other functions
+ t_pdict,
+ t_ets
+ ].
+
+groups() -> [].
+
+init_per_suite(Config) ->
+ test_lib:interpret(?MODULE),
+ Config.
+
+end_per_suite(_Config) -> ok.
+
+init_per_group(_GroupName, Config) -> Config.
+end_per_group(_GroupName, Config) -> Config.
+
+%% tests
+
+t_build_and_match_literals(Config) when is_list(Config) ->
+ #{} = id(#{}),
+ #{1:=a} = id(#{1=>a}),
+ #{1:=a,2:=b} = id(#{1=>a,2=>b}),
+ #{1:=a,2:=b,3:="c"} = id(#{1=>a,2=>b,3=>"c"}),
+ #{1:=a,2:=b,3:="c","4":="d"} = id(#{1=>a,2=>b,3=>"c","4"=>"d"}),
+ #{1:=a,2:=b,3:="c","4":="d",<<"5">>:=<<"e">>} =
+ id(#{1=>a,2=>b,3=>"c","4"=>"d",<<"5">>=><<"e">>}),
+ #{1:=a,2:=b,3:="c","4":="d",<<"5">>:=<<"e">>,{"6",7}:="f"} =
+ id(#{1=>a,2=>b,3=>"c","4"=>"d",<<"5">>=><<"e">>,{"6",7}=>"f"}),
+ #{1:=a,2:=b,3:="c","4":="d",<<"5">>:=<<"e">>,{"6",7}:="f",8:=g} =
+ id(#{1=>a,2=>b,3=>"c","4"=>"d",<<"5">>=><<"e">>,{"6",7}=>"f",8=>g}),
+
+ #{<<"hi all">> := 1} = id(#{<<"hi",32,"all">> => 1}),
+
+ #{a:=X,a:=X=3,b:=4} = id(#{a=>3,b=>4}), % weird but ok =)
+
+ #{ a:=#{ b:=#{c := third, b:=second}}, b:=first} =
+ id(#{ b=>first, a=>#{ b=>#{c => third, b=> second}}}),
+
+ M = #{ map_1=>#{ map_2=>#{value_3 => third}, value_2=> second}, value_1=>first},
+ M = #{ map_1:=#{ map_2:=#{value_3 := third}, value_2:= second}, value_1:=first} =
+ id(#{ map_1=>#{ map_2=>#{value_3 => third}, value_2=> second}, value_1=>first}),
+
+ %% error case
+ %V = 32,
+ %{'EXIT',{{badmatch,_},_}} = (catch (#{<<"hi all">> => 1} = id(#{<<"hi",V,"all">> => 1}))),
+ {'EXIT',{{badmatch,_},_}} = (catch (#{x:=3,x:=2} = id(#{x=>3}))),
+ {'EXIT',{{badmatch,_},_}} = (catch (#{x:=2} = id(#{x=>3}))),
+ {'EXIT',{{badmatch,_},_}} = (catch (#{x:=3} = id({a,b,c}))),
+ {'EXIT',{{badmatch,_},_}} = (catch (#{x:=3} = id(#{y=>3}))),
+ {'EXIT',{{badmatch,_},_}} = (catch (#{x:=3} = id(#{x=>"three"}))),
+ ok.
+
+
+%% Tests size(Map).
+%% not implemented, perhaps it shouldn't be either
+
+%t_size(Config) when is_list(Config) ->
+% 0 = size(#{}),
+% 1 = size(#{a=>1}),
+% 1 = size(#{a=>#{a=>1}}),
+% 2 = size(#{a=>1, b=>2}),
+% 3 = size(#{a=>1, b=>2, b=>"3"}),
+% ok.
+
+t_map_size(Config) when is_list(Config) ->
+ 0 = map_size(id(#{})),
+ 1 = map_size(id(#{a=>1})),
+ 1 = map_size(id(#{a=>"wat"})),
+ 2 = map_size(id(#{a=>1, b=>2})),
+ 3 = map_size(id(#{a=>1, b=>2, b=>"3","33"=><<"n">>})),
+
+ true = map_is_size(#{a=>1}, 1),
+ true = map_is_size(#{a=>1, a=>2}, 1),
+ M = #{ "a" => 1, "b" => 2},
+ true = map_is_size(M, 2),
+ false = map_is_size(M, 3),
+ true = map_is_size(M#{ "a" => 2}, 2),
+ false = map_is_size(M#{ "c" => 2}, 2),
+
+ %% Error cases.
+ {'EXIT',{badarg,_}} = (catch map_size([])),
+ {'EXIT',{badarg,_}} = (catch map_size(<<1,2,3>>)),
+ {'EXIT',{badarg,_}} = (catch map_size(1)),
+ ok.
+
+map_is_size(M,N) when map_size(M) =:= N -> true;
+map_is_size(_,_) -> false.
+
+% test map updates without matching
+t_update_literals(Config) when is_list(Config) ->
+ Map = #{x=>1,y=>2,z=>3,q=>4},
+ #{x:="d",q:="4"} = loop_update_literals_x_q(Map, [
+ {"a","1"},{"b","2"},{"c","3"},{"d","4"}
+ ]),
+ ok.
+
+loop_update_literals_x_q(Map, []) -> Map;
+loop_update_literals_x_q(Map, [{X,Q}|Vs]) ->
+ loop_update_literals_x_q(Map#{q=>Q,x=>X},Vs).
+
+% test map updates with matching
+t_match_and_update_literals(Config) when is_list(Config) ->
+ Map = #{x=>0,y=>"untouched",z=>"also untouched",q=>1},
+ #{x:=16,q:=21,y:="untouched",z:="also untouched"} = loop_match_and_update_literals_x_q(Map, [
+ {1,2},{3,4},{5,6},{7,8}
+ ]),
+ M0 = id(#{ "hi" => "hello", int => 3, <<"key">> => <<"value">>,
+ 4 => number, 18446744073709551629 => wat}),
+ M1 = id(#{}),
+ M2 = M1#{ "hi" => "hello", int => 3, <<"key">> => <<"value">>,
+ 4 => number, 18446744073709551629 => wat},
+ M0 = M2,
+
+ #{ 4 := another_number, int := 3 } = M2#{ 4 => another_number },
+ ok.
+
+loop_match_and_update_literals_x_q(Map, []) -> Map;
+loop_match_and_update_literals_x_q(#{q:=Q0,x:=X0} = Map, [{X,Q}|Vs]) ->
+ loop_match_and_update_literals_x_q(Map#{q=>Q0+Q,x=>X0+X},Vs).
+
+
+t_update_map_expressions(Config) when is_list(Config) ->
+ M = maps:new(),
+ #{ a := 1 } = M#{a => 1},
+
+ #{ b := 2 } = (maps:new())#{ b => 2 },
+
+ #{ a :=42, b:=42, c:=42 } = (maps:from_list([{a,1},{b,2},{c,3}]))#{ a := 42, b := 42, c := 42 },
+ #{ "a" :=1, "b":=42, "c":=42 } = (maps:from_list([{"a",1},{"b",2}]))#{ "b" := 42, "c" => 42 },
+
+ %% Error cases, FIXME: should be 'badmap'?
+ {'EXIT',{{badarg,<<>>},_}} = (catch (id(<<>>))#{ a := 42, b => 2 }),
+ {'EXIT',{{badarg,[]},_}} = (catch (id([]))#{ a := 42, b => 2 }),
+ ok.
+
+
+t_update_assoc(Config) when is_list(Config) ->
+ M0 = id(#{1=>a,2=>b,3.0=>c,4=>d,5=>e}),
+
+ M1 = M0#{1=>42,2=>100,4=>[a,b,c]},
+ #{1:=42,2:=100,3.0:=c,4:=[a,b,c],5:=e} = M1,
+ #{1:=42,2:=b,4:=d,5:=e,2.0:=100,3.0:=c,4.0:=[a,b,c]} = M0#{1.0=>float,1:=42,2.0=>wrong,2.0=>100,4.0=>[a,b,c]},
+
+ M2 = M0#{3.0=>new},
+ #{1:=a,2:=b,3.0:=new,4:=d,5:=e} = M2,
+ M2 = M0#{3.0:=wrong,3.0=>new},
+
+ %% Errors cases.
+ BadMap = id(badmap),
+ {'EXIT',{{badarg,BadMap},_}} = (catch BadMap#{nonexisting=>val}),
+
+ ok.
+
+t_update_exact(Config) when is_list(Config) ->
+ M0 = id(#{1=>a,2=>b,3.0=>c,4=>d,5=>e}),
+
+ M1 = M0#{1:=42,2:=100,4:=[a,b,c]},
+ #{1:=42,2:=100,3.0:=c,4:=[a,b,c],5:=e} = M1,
+ M1 = M0#{1:=wrong,1=>42,2=>wrong,2:=100,4:=[a,b,c]},
+
+ M2 = M0#{3.0:=new},
+ #{1:=a,2:=b,3.0:=new,4:=d,5:=e} = M2,
+ M2 = M0#{3.0=>wrong,3.0:=new},
+ %% M2 = M0#{3=>wrong,3.0:=new}, %% FIXME
+
+ %% Errors cases.
+ {'EXIT',{badarg,_}} = (catch M0#{nonexisting:=val}),
+ {'EXIT',{badarg,_}} = (catch M0#{1.0:=v,1.0=>v2}),
+ {'EXIT',{badarg,_}} = (catch M0#{42.0:=v,42:=v2}),
+ {'EXIT',{badarg,_}} = (catch M0#{42=>v1,42.0:=v2,42:=v3}),
+
+ ok.
+
+t_guard_bifs(Config) when is_list(Config) ->
+ true = map_guard_head(#{a=>1}),
+ false = map_guard_head([]),
+ true = map_guard_body(#{a=>1}),
+ false = map_guard_body({}),
+ true = map_guard_pattern(#{a=>1, <<"hi">> => "hi" }),
+ false = map_guard_pattern("list"),
+ ok.
+
+map_guard_head(M) when is_map(M) -> true;
+map_guard_head(_) -> false.
+
+map_guard_body(M) -> is_map(M).
+
+map_guard_pattern(#{}) -> true;
+map_guard_pattern(_) -> false.
+
+t_guard_sequence(Config) when is_list(Config) ->
+ {1, "a"} = map_guard_sequence_1(#{seq=>1,val=>id("a")}),
+ {2, "b"} = map_guard_sequence_1(#{seq=>2,val=>id("b")}),
+ {3, "c"} = map_guard_sequence_1(#{seq=>3,val=>id("c")}),
+ {4, "d"} = map_guard_sequence_1(#{seq=>4,val=>id("d")}),
+ {5, "e"} = map_guard_sequence_1(#{seq=>5,val=>id("e")}),
+
+ {1,M1} = map_guard_sequence_2(M1 = id(#{a=>3})),
+ {2,M2} = map_guard_sequence_2(M2 = id(#{a=>4, b=>4})),
+ {3,gg,M3} = map_guard_sequence_2(M3 = id(#{a=>gg, b=>4})),
+ {4,sc,sc,M4} = map_guard_sequence_2(M4 = id(#{a=>sc, b=>3, c=>sc2})),
+ {5,kk,kk,M5} = map_guard_sequence_2(M5 = id(#{a=>kk, b=>other, c=>sc2})),
+
+ %% error case
+ {'EXIT',{function_clause,_}} = (catch map_guard_sequence_1(#{seq=>6,val=>id("e")})),
+ {'EXIT',{function_clause,_}} = (catch map_guard_sequence_2(#{b=>5})),
+ ok.
+
+map_guard_sequence_1(#{seq:=1=Seq, val:=Val}) -> {Seq,Val};
+map_guard_sequence_1(#{seq:=2=Seq, val:=Val}) -> {Seq,Val};
+map_guard_sequence_1(#{seq:=3=Seq, val:=Val}) -> {Seq,Val};
+map_guard_sequence_1(#{seq:=4=Seq, val:=Val}) -> {Seq,Val};
+map_guard_sequence_1(#{seq:=5=Seq, val:=Val}) -> {Seq,Val}.
+
+map_guard_sequence_2(#{ a:=3 }=M) -> {1, M};
+map_guard_sequence_2(#{ a:=4 }=M) -> {2, M};
+map_guard_sequence_2(#{ a:=X, a:=X, b:=4 }=M) -> {3,X,M};
+map_guard_sequence_2(#{ a:=X, a:=Y, b:=3 }=M) when X =:= Y -> {4,X,Y,M};
+map_guard_sequence_2(#{ a:=X, a:=Y }=M) when X =:= Y -> {5,X,Y,M}.
+
+
+t_guard_update(Config) when is_list(Config) ->
+ error = map_guard_update(#{},#{}),
+ first = map_guard_update(#{}, #{x=>first}),
+ second = map_guard_update(#{y=>old}, #{x=>second,y=>old}),
+ ok.
+
+map_guard_update(M1, M2) when M1#{x=>first} =:= M2 -> first;
+map_guard_update(M1, M2) when M1#{x=>second} =:= M2 -> second;
+map_guard_update(_, _) -> error.
+
+t_guard_receive(Config) when is_list(Config) ->
+ M0 = #{ id => 0 },
+ Pid = spawn_link(fun() -> guard_receive_loop() end),
+ Big = 36893488147419103229,
+ B1 = <<"some text">>,
+ B2 = <<"was appended">>,
+ B3 = <<B1/binary, B2/binary>>,
+
+ #{id:=1, res:=Big} = M1 = call(Pid, M0#{op=>sub,in=>{1 bsl 65, 3}}),
+ #{id:=2, res:=26} = M2 = call(Pid, M1#{op=>idiv,in=>{53,2}}),
+ #{id:=3, res:=832} = M3 = call(Pid, M2#{op=>imul,in=>{26,32}}),
+ #{id:=4, res:=4} = M4 = call(Pid, M3#{op=>add,in=>{1,3}}),
+ #{id:=5, res:=Big} = M5 = call(Pid, M4#{op=>sub,in=>{1 bsl 65, 3}}),
+ #{id:=6, res:=B3} = M6 = call(Pid, M5#{op=>"append",in=>{B1,B2}}),
+ #{id:=7, res:=4} = _ = call(Pid, M6#{op=>add,in=>{1,3}}),
+
+
+ %% update old maps and check id update
+ #{id:=2, res:=B3} = call(Pid, M1#{op=>"append",in=>{B1,B2}}),
+ #{id:=5, res:=99} = call(Pid, M4#{op=>add,in=>{33, 66}}),
+
+ %% cleanup
+ done = call(Pid, done),
+ ok.
+
+call(Pid, M) ->
+ Pid ! {self(), M}, receive {Pid, Res} -> Res end.
+
+guard_receive_loop() ->
+ receive
+ {Pid, #{ id:=Id, op:="append", in:={X,Y}}=M} when is_binary(X), is_binary(Y) ->
+ Pid ! {self(), M#{ id=>Id+1, res=><<X/binary,Y/binary>>}},
+ guard_receive_loop();
+ {Pid, #{ id:=Id, op:=add, in:={X,Y}}} ->
+ Pid ! {self(), #{ id=>Id+1, res=>X+Y}},
+ guard_receive_loop();
+ {Pid, #{ id:=Id, op:=sub, in:={X,Y}}=M} ->
+ Pid ! {self(), M#{ id=>Id+1, res=>X-Y}},
+ guard_receive_loop();
+ {Pid, #{ id:=Id, op:=idiv, in:={X,Y}}=M} ->
+ Pid ! {self(), M#{ id=>Id+1, res=>X div Y}},
+ guard_receive_loop();
+ {Pid, #{ id:=Id, op:=imul, in:={X,Y}}=M} ->
+ Pid ! {self(), M#{ id=>Id+1, res=>X * Y}},
+ guard_receive_loop();
+ {Pid, done} ->
+ Pid ! {self(), done};
+ {Pid, Other} ->
+ Pid ! {error, Other},
+ guard_receive_loop()
+ end.
+
+
+t_list_comprehension(Config) when is_list(Config) ->
+ [#{k:=1},#{k:=2},#{k:=3}] = [#{k=>I} || I <- [1,2,3]],
+ ok.
+
+t_guard_fun(Config) when is_list(Config) ->
+ F1 = fun
+ (#{s:=v,v:=V}) -> {v,V};
+ (#{s:=t,v:={V,V}}) -> {t,V};
+ (#{s:=l,v:=[V,V]}) -> {l,V}
+ end,
+
+ F2 = fun
+ (#{s:=T,v:={V,V}}) -> {T,V};
+ (#{s:=T,v:=[V,V]}) -> {T,V};
+ (#{s:=T,v:=V}) -> {T,V}
+ end,
+ V = <<"hi">>,
+
+ {v,V} = F1(#{s=>v,v=>V}),
+ {t,V} = F1(#{s=>t,v=>{V,V}}),
+ {l,V} = F1(#{s=>l,v=>[V,V]}),
+
+ {v,V} = F2(#{s=>v,v=>V}),
+ {t,V} = F2(#{s=>t,v=>{V,V}}),
+ {l,V} = F2(#{s=>l,v=>[V,V]}),
+
+ %% error case
+ {'EXIT', {function_clause,[{?MODULE,_,[#{s:=none,v:=none}],_}|_]}} = (catch F1(#{s=>none,v=>none})),
+ ok.
+
+
+t_map_sort_literals(Config) when is_list(Config) ->
+ % test relation
+
+ %% size order
+ true = #{ a => 1, b => 2} < id(#{ a => 1, b => 1, c => 1}),
+ true = #{ b => 1, a => 1} < id(#{ c => 1, a => 1, b => 1}),
+ false = #{ c => 1, b => 1, a => 1} < id(#{ c => 1, a => 1}),
+
+ %% key order
+ true = #{ a => 1 } < id(#{ b => 1}),
+ false = #{ b => 1 } < id(#{ a => 1}),
+ true = #{ a => 1, b => 1, c => 1 } < id(#{ b => 1, c => 1, d => 1}),
+ true = #{ b => 1, c => 1, d => 1 } > id(#{ a => 1, b => 1, c => 1}),
+ true = #{ c => 1, b => 1, a => 1 } < id(#{ b => 1, c => 1, d => 1}),
+ true = #{ "a" => 1 } < id(#{ <<"a">> => 1}),
+ false = #{ <<"a">> => 1 } < id(#{ "a" => 1}),
+ false = #{ 1 => 1 } < id(#{ 1.0 => 1}),
+ false = #{ 1.0 => 1 } < id(#{ 1 => 1}),
+
+ %% value order
+ true = #{ a => 1 } < id(#{ a => 2}),
+ false = #{ a => 2 } < id(#{ a => 1}),
+ false = #{ a => 2, b => 1 } < id(#{ a => 1, b => 3}),
+ true = #{ a => 1, b => 1 } < id(#{ a => 1, b => 3}),
+
+ true = #{ "a" => "hi", b => 134 } == id(#{ b => 134,"a" => "hi"}),
+
+ %% lists:sort
+
+ SortVs = [#{"a"=>1},#{a=>2},#{1=>3},#{<<"a">>=>4}],
+ [#{1:=ok},#{a:=ok},#{"a":=ok},#{<<"a">>:=ok}] = lists:sort([#{"a"=>ok},#{a=>ok},#{1=>ok},#{<<"a">>=>ok}]),
+ [#{1:=3},#{a:=2},#{"a":=1},#{<<"a">>:=4}] = lists:sort(SortVs),
+ [#{1:=3},#{a:=2},#{"a":=1},#{<<"a">>:=4}] = lists:sort(lists:reverse(SortVs)),
+
+ ok.
+
+%% BIFs
+t_bif_map_get(Config) when is_list(Config) ->
+
+ 1 = maps:get(a, #{ a=> 1}),
+ 2 = maps:get(b, #{ a=> 1, b => 2}),
+ "hi" = maps:get("hello", #{ a=>1, "hello" => "hi"}),
+ "tuple hi" = maps:get({1,1.0}, #{ a=>a, {1,1.0} => "tuple hi"}),
+
+ M = id(#{ k1=>"v1", <<"k2">> => <<"v3">> }),
+ "v4" = maps:get(<<"k2">>, M#{ <<"k2">> => "v4" }),
+
+ %% error case
+ {'EXIT',{badarg, [{maps,get,_,_}|_]}} = (catch maps:get(a,[])),
+ {'EXIT',{badarg, [{maps,get,_,_}|_]}} = (catch maps:get(a,<<>>)),
+ {'EXIT',{bad_key,[{maps,get,_,_}|_]}} = (catch maps:get({1,1}, #{{1,1.0} => "tuple"})),
+ {'EXIT',{bad_key,[{maps,get,_,_}|_]}} = (catch maps:get(a,#{})),
+ {'EXIT',{bad_key,[{maps,get,_,_}|_]}} = (catch maps:get(a,#{ b=>1, c=>2})),
+ ok.
+
+t_bif_map_find(Config) when is_list(Config) ->
+
+ {ok, 1} = maps:find(a, #{ a=> 1}),
+ {ok, 2} = maps:find(b, #{ a=> 1, b => 2}),
+ {ok, "int"} = maps:find(1, #{ 1 => "int"}),
+ {ok, "float"} = maps:find(1.0, #{ 1.0=> "float"}),
+
+ {ok, "hi"} = maps:find("hello", #{ a=>1, "hello" => "hi"}),
+ {ok, "tuple hi"} = maps:find({1,1.0}, #{ a=>a, {1,1.0} => "tuple hi"}),
+
+ M = id(#{ k1=>"v1", <<"k2">> => <<"v3">> }),
+ {ok, "v4"} = maps:find(<<"k2">>, M#{ <<"k2">> => "v4" }),
+
+ %% error case
+ error = maps:find(a,#{}),
+ error = maps:find(a,#{b=>1, c=>2}),
+ error = maps:find(1.0, #{ 1 => "int"}),
+ error = maps:find(1, #{ 1.0 => "float"}),
+ error = maps:find({1.0,1}, #{ a=>a, {1,1.0} => "tuple hi"}), % reverse types in tuple key
+
+
+ {'EXIT',{badarg,[{maps,find,_,_}|_]}} = (catch maps:find(a,id([]))),
+ {'EXIT',{badarg,[{maps,find,_,_}|_]}} = (catch maps:find(a,id(<<>>))),
+ ok.
+
+
+t_bif_map_is_key(Config) when is_list(Config) ->
+ M1 = #{ "hi" => "hello", int => 3, <<"key">> => <<"value">>, 4 => number},
+
+ true = maps:is_key("hi", M1),
+ true = maps:is_key(int, M1),
+ true = maps:is_key(<<"key">>, M1),
+ true = maps:is_key(4, M1),
+
+ false = maps:is_key(5, M1),
+ false = maps:is_key(<<"key2">>, M1),
+ false = maps:is_key("h", M1),
+ false = maps:is_key("hello", M1),
+ false = maps:is_key(atom, M1),
+ false = maps:is_key(any, id(#{})),
+
+ false = maps:is_key("hi", maps:remove("hi", M1)),
+ true = maps:is_key("hi", M1),
+ true = maps:is_key(1, maps:put(1, "number", M1)),
+ false = maps:is_key(1.0, maps:put(1, "number", M1)),
+
+ %% error case
+ {'EXIT',{badarg,[{maps,is_key,_,_}|_]}} = (catch maps:is_key(a,id([]))),
+ {'EXIT',{badarg,[{maps,is_key,_,_}|_]}} = (catch maps:is_key(a,id(<<>>))),
+ ok.
+
+t_bif_map_keys(Config) when is_list(Config) ->
+ [] = maps:keys(#{}),
+
+ [1,2,3,4,5] = maps:keys(#{ 1 => a, 2 => b, 3 => c, 4 => d, 5 => e}),
+ [1,2,3,4,5] = maps:keys(#{ 4 => d, 5 => e, 1 => a, 2 => b, 3 => c}),
+
+ % values in key order: [4,int,"hi",<<"key">>]
+ M1 = #{ "hi" => "hello", int => 3, <<"key">> => <<"value">>, 4 => number},
+ [4,int,"hi",<<"key">>] = maps:keys(M1),
+
+ %% error case
+ {'EXIT',{badarg,[{maps,keys,_,_}|_]}} = (catch maps:keys(1 bsl 65 + 3)),
+ {'EXIT',{badarg,[{maps,keys,_,_}|_]}} = (catch maps:keys(154)),
+ {'EXIT',{badarg,[{maps,keys,_,_}|_]}} = (catch maps:keys(atom)),
+ {'EXIT',{badarg,[{maps,keys,_,_}|_]}} = (catch maps:keys([])),
+ {'EXIT',{badarg,[{maps,keys,_,_}|_]}} = (catch maps:keys(<<>>)),
+ ok.
+
+t_bif_map_new(Config) when is_list(Config) ->
+ #{} = maps:new(),
+ 0 = erlang:map_size(maps:new()),
+ ok.
+
+t_bif_map_merge(Config) when is_list(Config) ->
+ 0 = erlang:map_size(maps:merge(#{},#{})),
+
+ M0 = #{ "hi" => "hello", int => 3, <<"key">> => <<"value">>,
+ 4 => number, 18446744073709551629 => wat},
+
+ #{ "hi" := "hello", int := 3, <<"key">> := <<"value">>,
+ 4 := number, 18446744073709551629 := wat} = maps:merge(#{}, M0),
+
+ #{ "hi" := "hello", int := 3, <<"key">> := <<"value">>,
+ 4 := number, 18446744073709551629 := wat} = maps:merge(M0, #{}),
+
+ M1 = #{ "hi" => "hello again", float => 3.3, {1,2} => "tuple", 4 => integer },
+
+ #{4 := number, 18446744073709551629 := wat, float := 3.3, int := 3,
+ {1,2} := "tuple", "hi" := "hello", <<"key">> := <<"value">>} = maps:merge(M1,M0),
+
+ #{4 := integer, 18446744073709551629 := wat, float := 3.3, int := 3,
+ {1,2} := "tuple", "hi" := "hello again", <<"key">> := <<"value">>} = maps:merge(M0,M1),
+
+ %% error case
+ {'EXIT',{badarg,[{maps,merge,_,_}|_]}} = (catch maps:merge((1 bsl 65 + 3), <<>>)),
+ {'EXIT',{badarg,[{maps,merge,_,_}|_]}} = (catch maps:merge(<<>>, id(#{ a => 1}))),
+ {'EXIT',{badarg,[{maps,merge,_,_}|_]}} = (catch maps:merge(id(#{ a => 2}), <<>> )),
+
+ ok.
+
+
+t_bif_map_put(Config) when is_list(Config) ->
+ M0 = #{ "hi" => "hello", int => 3, <<"key">> => <<"value">>,
+ 4 => number, 18446744073709551629 => wat},
+
+ M1 = #{ "hi" := "hello"} = maps:put("hi", "hello", #{}),
+
+ ["hi"] = maps:keys(M1),
+ ["hello"] = maps:values(M1),
+
+ M2 = #{ int := 3 } = maps:put(int, 3, M1),
+
+ [int,"hi"] = maps:keys(M2),
+ [3,"hello"] = maps:values(M2),
+
+ M3 = #{ <<"key">> := <<"value">> } = maps:put(<<"key">>, <<"value">>, M2),
+
+ [int,"hi",<<"key">>] = maps:keys(M3),
+ [3,"hello",<<"value">>] = maps:values(M3),
+
+ M4 = #{ 18446744073709551629 := wat } = maps:put(18446744073709551629, wat, M3),
+
+ [18446744073709551629,int,"hi",<<"key">>] = maps:keys(M4),
+ [wat,3,"hello",<<"value">>] = maps:values(M4),
+
+ M0 = #{ 4 := number } = M5 = maps:put(4, number, M4),
+
+ [4,18446744073709551629,int,"hi",<<"key">>] = maps:keys(M5),
+ [number,wat,3,"hello",<<"value">>] = maps:values(M5),
+
+ M6 = #{ <<"key">> := <<"other value">> } = maps:put(<<"key">>, <<"other value">>, M5),
+
+ [4,18446744073709551629,int,"hi",<<"key">>] = maps:keys(M6),
+ [number,wat,3,"hello",<<"other value">>] = maps:values(M6),
+
+ %% error case
+ {'EXIT',{badarg,[{maps,put,_,_}|_]}} = (catch maps:put(1,a,1 bsl 65 + 3)),
+ {'EXIT',{badarg,[{maps,put,_,_}|_]}} = (catch maps:put(1,a,154)),
+ {'EXIT',{badarg,[{maps,put,_,_}|_]}} = (catch maps:put(1,a,atom)),
+ {'EXIT',{badarg,[{maps,put,_,_}|_]}} = (catch maps:put(1,a,[])),
+ {'EXIT',{badarg,[{maps,put,_,_}|_]}} = (catch maps:put(1,a,<<>>)),
+ ok.
+
+t_bif_map_remove(Config) when is_list(Config) ->
+ 0 = erlang:map_size(maps:remove(some_key, #{})),
+
+ M0 = #{ "hi" => "hello", int => 3, <<"key">> => <<"value">>,
+ 4 => number, 18446744073709551629 => wat},
+
+ M1 = maps:remove("hi", M0),
+ [4,18446744073709551629,int,<<"key">>] = maps:keys(M1),
+ [number,wat,3,<<"value">>] = maps:values(M1),
+
+ M2 = maps:remove(int, M1),
+ [4,18446744073709551629,<<"key">>] = maps:keys(M2),
+ [number,wat,<<"value">>] = maps:values(M2),
+
+ M3 = maps:remove(<<"key">>, M2),
+ [4,18446744073709551629] = maps:keys(M3),
+ [number,wat] = maps:values(M3),
+
+ M4 = maps:remove(18446744073709551629, M3),
+ [4] = maps:keys(M4),
+ [number] = maps:values(M4),
+
+ M5 = maps:remove(4, M4),
+ [] = maps:keys(M5),
+ [] = maps:values(M5),
+
+ M0 = maps:remove(5,M0),
+ M0 = maps:remove("hi there",M0),
+
+ #{ "hi" := "hello", int := 3, 4 := number} = maps:remove(18446744073709551629,maps:remove(<<"key">>,M0)),
+
+ %% error case
+ {'EXIT',{badarg,[{maps,remove,_,_}|_]}} = (catch maps:remove(a,1 bsl 65 + 3)),
+ {'EXIT',{badarg,[{maps,remove,_,_}|_]}} = (catch maps:remove(1,154)),
+ {'EXIT',{badarg,[{maps,remove,_,_}|_]}} = (catch maps:remove(a,atom)),
+ {'EXIT',{badarg,[{maps,remove,_,_}|_]}} = (catch maps:remove(1,[])),
+ {'EXIT',{badarg,[{maps,remove,_,_}|_]}} = (catch maps:remove(a,<<>>)),
+ ok.
+
+t_bif_map_update(Config) when is_list(Config) ->
+ M0 = #{ "hi" => "hello", int => 3, <<"key">> => <<"value">>,
+ 4 => number, 18446744073709551629 => wat},
+
+ #{ "hi" := "hello again", int := 3, <<"key">> := <<"value">>,
+ 4 := number, 18446744073709551629 := wat} = maps:update("hi", "hello again", M0),
+
+ #{ "hi" := "hello", int := 1337, <<"key">> := <<"value">>,
+ 4 := number, 18446744073709551629 := wat} = maps:update(int, 1337, M0),
+
+ #{ "hi" := "hello", int := 3, <<"key">> := <<"new value">>,
+ 4 := number, 18446744073709551629 := wat} = maps:update(<<"key">>, <<"new value">>, M0),
+
+ #{ "hi" := "hello", int := 3, <<"key">> := <<"value">>,
+ 4 := integer, 18446744073709551629 := wat} = maps:update(4, integer, M0),
+
+ #{ "hi" := "hello", int := 3, <<"key">> := <<"value">>,
+ 4 := number, 18446744073709551629 := wazzup} = maps:update(18446744073709551629, wazzup, M0),
+
+ %% error case
+ {'EXIT',{badarg,[{maps,update,_,_}|_]}} = (catch maps:update(1,none,{})),
+ {'EXIT',{badarg,[{maps,update,_,_}|_]}} = (catch maps:update(1,none,<<"value">>)),
+ {'EXIT',{badarg,[{maps,update,_,_}|_]}} = (catch maps:update(5,none,M0)),
+
+ ok.
+
+
+
+t_bif_map_values(Config) when is_list(Config) ->
+
+ [] = maps:values(#{}),
+
+ [a,b,c,d,e] = maps:values(#{ 1 => a, 2 => b, 3 => c, 4 => d, 5 => e}),
+ [a,b,c,d,e] = maps:values(#{ 4 => d, 5 => e, 1 => a, 2 => b, 3 => c}),
+
+ % values in key order: [4,int,"hi",<<"key">>]
+ M1 = #{ "hi" => "hello", int => 3, <<"key">> => <<"value">>, 4 => number},
+ M2 = M1#{ "hi" => "hello2", <<"key">> => <<"value2">> },
+ [number,3,"hello2",<<"value2">>] = maps:values(M2),
+ [number,3,"hello",<<"value">>] = maps:values(M1),
+
+ %% error case
+ {'EXIT',{badarg,[{maps,values,_,_}|_]}} = (catch maps:values(1 bsl 65 + 3)),
+ {'EXIT',{badarg,[{maps,values,_,_}|_]}} = (catch maps:values(atom)),
+ {'EXIT',{badarg,[{maps,values,_,_}|_]}} = (catch maps:values([])),
+ {'EXIT',{badarg,[{maps,values,_,_}|_]}} = (catch maps:values(<<>>)),
+ ok.
+
+t_erlang_hash(Config) when is_list(Config) ->
+
+ ok = t_bif_erlang_phash2(),
+ ok = t_bif_erlang_phash(),
+ ok = t_bif_erlang_hash(),
+
+ ok.
+
+t_bif_erlang_phash2() ->
+
+ 39679005 = erlang:phash2(#{}),
+ 78942764 = erlang:phash2(#{ a => 1, "a" => 2, <<"a">> => 3, {a,b} => 4 }),
+ 37338230 = erlang:phash2(#{ 1 => a, 2 => "a", 3 => <<"a">>, 4 => {a,b} }),
+ 14363616 = erlang:phash2(#{ 1 => a }),
+ 51612236 = erlang:phash2(#{ a => 1 }),
+
+ 37468437 = erlang:phash2(#{{} => <<>>}),
+ 44049159 = erlang:phash2(#{<<>> => {}}),
+
+ M0 = #{ a => 1, "key" => <<"value">> },
+ M1 = maps:remove("key",M0),
+ M2 = M1#{ "key" => <<"value">> },
+
+ 118679416 = erlang:phash2(M0),
+ 51612236 = erlang:phash2(M1),
+ 118679416 = erlang:phash2(M2),
+ ok.
+
+t_bif_erlang_phash() ->
+ Sz = 1 bsl 32,
+ 268440612 = erlang:phash(#{},Sz),
+ 1196461908 = erlang:phash(#{ a => 1, "a" => 2, <<"a">> => 3, {a,b} => 4 },Sz),
+ 3944426064 = erlang:phash(#{ 1 => a, 2 => "a", 3 => <<"a">>, 4 => {a,b} },Sz),
+ 1394238263 = erlang:phash(#{ 1 => a },Sz),
+ 4066388227 = erlang:phash(#{ a => 1 },Sz),
+
+ 1578050717 = erlang:phash(#{{} => <<>>},Sz),
+ 1578050717 = erlang:phash(#{<<>> => {}},Sz), % yep, broken
+
+ M0 = #{ a => 1, "key" => <<"value">> },
+ M1 = maps:remove("key",M0),
+ M2 = M1#{ "key" => <<"value">> },
+
+ 3590546636 = erlang:phash(M0,Sz),
+ 4066388227 = erlang:phash(M1,Sz),
+ 3590546636 = erlang:phash(M2,Sz),
+ ok.
+
+t_bif_erlang_hash() ->
+ Sz = 1 bsl 27 - 1,
+ 5158 = erlang:hash(#{},Sz),
+ 71555838 = erlang:hash(#{ a => 1, "a" => 2, <<"a">> => 3, {a,b} => 4 },Sz),
+ 5497225 = erlang:hash(#{ 1 => a, 2 => "a", 3 => <<"a">>, 4 => {a,b} },Sz),
+ 126071654 = erlang:hash(#{ 1 => a },Sz),
+ 126426236 = erlang:hash(#{ a => 1 },Sz),
+
+ 101655720 = erlang:hash(#{{} => <<>>},Sz),
+ 101655720 = erlang:hash(#{<<>> => {}},Sz), % yep, broken
+
+ M0 = #{ a => 1, "key" => <<"value">> },
+ M1 = maps:remove("key",M0),
+ M2 = M1#{ "key" => <<"value">> },
+
+ 38260486 = erlang:hash(M0,Sz),
+ 126426236 = erlang:hash(M1,Sz),
+ 38260486 = erlang:hash(M2,Sz),
+ ok.
+
+
+t_map_encode_decode(Config) when is_list(Config) ->
+ <<131,116,0,0,0,0>> = erlang:term_to_binary(#{}),
+ Pairs = [
+ {a,b},{"key","values"},{<<"key">>,<<"value">>},
+ {1,b},{[atom,1],{<<"wat">>,1,2,3}},
+ {aa,"values"},
+ {1 bsl 64 + (1 bsl 50 - 1), sc1},
+ {99, sc2},
+ {1 bsl 65 + (1 bsl 51 - 1), sc3},
+ {88, sc4},
+ {1 bsl 66 + (1 bsl 52 - 1), sc5},
+ {77, sc6},
+ {1 bsl 67 + (1 bsl 53 - 1), sc3},
+ {75, sc6}, {-10,sc8},
+ {<<>>, sc9}, {3.14158, sc10},
+ {[3.14158], sc11}, {more_atoms, sc12},
+ {{more_tuples}, sc13}, {self(), sc14},
+ {{},{}},{[],[]}
+ ],
+ ok = map_encode_decode_and_match(Pairs,[],#{}),
+
+ %% check sorting
+
+ %% literally #{ b=>2, a=>1 } in the internal order
+ #{ a:=1, b:=2 } =
+ erlang:binary_to_term(<<131,116,0,0,0,2,100,0,1,98,97,2,100,0,1,97,97,1>>),
+
+
+ %% literally #{ "hi" => "value", a=>33, b=>55 } in the internal order
+ #{ a:=33, b:=55, "hi" := "value"} = erlang:binary_to_term(<<131,116,0,0,0,3,
+ 107,0,2,104,105, % "hi" :: list()
+ 107,0,5,118,97,108,117,101, % "value" :: list()
+ 100,0,1,97, % a :: atom()
+ 97,33, % 33 :: integer()
+ 100,0,1,98, % b :: atom()
+ 97,55 % 55 :: integer()
+ >>),
+
+
+ %% error cases
+ %% template: <<131,116,0,0,0,2,100,0,1,97,100,0,1,98,97,1,97,1>>
+ %% which is: #{ a=>1, b=>1 }
+
+ %% uniqueness violation
+ %% literally #{ a=>1, "hi"=>"value", a=>2 }
+ {'EXIT',{badarg,[{_,_,_,_}|_]}} = (catch
+ erlang:binary_to_term(<<131,116,0,0,0,3,100,0,1,97,107,0,2,104,105,100,0,1,97,97,1,107,0,5,118,97,108,117,101,97,2>>)),
+
+ %% bad size (too large)
+ {'EXIT',{badarg,[{_,_,_,_}|_]}} = (catch
+ erlang:binary_to_term(<<131,116,0,0,0,12,100,0,1,97,100,0,1,98,97,1,97,1>>)),
+
+ %% bad size (too small) .. should fail just truncate it .. weird.
+ %% possibly change external format so truncated will be #{a:=1}
+ #{ a:=b } =
+ erlang:binary_to_term(<<131,116,0,0,0,1,100,0,1,97,100,0,1,98,97,1,97,1>>),
+
+ ok.
+
+map_encode_decode_and_match([{K,V}|Pairs], EncodedPairs, M0) ->
+ M1 = maps:put(K,V,M0),
+ B0 = erlang:term_to_binary(M1),
+ Ls = lists:sort(fun(A,B) -> erts_internal:cmp_term(A,B) < 0 end, [{K, erlang:term_to_binary(K), erlang:term_to_binary(V)}|EncodedPairs]),
+ %% sort Ks and Vs according to term spec, then match it
+ KVbins = lists:foldr(fun({_,Kbin,Vbin}, Acc) -> [Kbin,Vbin | Acc] end, [], Ls),
+ ok = match_encoded_map(B0, length(Ls), KVbins),
+ %% decode and match it
+ M1 = erlang:binary_to_term(B0),
+ map_encode_decode_and_match(Pairs,Ls,M1);
+map_encode_decode_and_match([],_,_) -> ok.
+
+match_encoded_map(<<131,116,Size:32,Encoded/binary>>,Size,Items) ->
+ match_encoded_map(Encoded,Items);
+match_encoded_map(_,_,_) -> no_match_size.
+
+match_encoded_map(<<>>,[]) -> ok;
+match_encoded_map(Bin,[<<131,Item/binary>>|Items]) ->
+ Size = erlang:byte_size(Item),
+ <<EncodedTerm:Size/binary, Bin1/binary>> = Bin,
+ EncodedTerm = Item, %% Asssert
+ match_encoded_map(Bin1,Items).
+
+
+t_bif_map_to_list(Config) when is_list(Config) ->
+ [] = maps:to_list(#{}),
+ [{a,1},{b,2}] = maps:to_list(#{a=>1,b=>2}),
+ [{a,1},{b,2},{c,3}] = maps:to_list(#{c=>3,a=>1,b=>2}),
+ [{a,1},{b,2},{g,3}] = maps:to_list(#{g=>3,a=>1,b=>2}),
+ [{a,1},{b,2},{g,3},{"c",4}] = maps:to_list(#{g=>3,a=>1,b=>2,"c"=>4}),
+ [{3,v2},{hi,v4},{{hi,3},v5},{"hi",v3},{<<"hi">>,v1}] = maps:to_list(#{
+ <<"hi">>=>v1,3=>v2,"hi"=>v3,hi=>v4,{hi,3}=>v5}),
+
+ [{3,v7},{hi,v9},{{hi,3},v10},{"hi",v8},{<<"hi">>,v6}] = maps:to_list(#{
+ <<"hi">>=>v1,3=>v2,"hi"=>v3,hi=>v4,{hi,3}=>v5,
+ <<"hi">>=>v6,3=>v7,"hi"=>v8,hi=>v9,{hi,3}=>v10}),
+
+ %% error cases
+ {'EXIT', {badarg,_}} = (catch maps:to_list(id(a))),
+ {'EXIT', {badarg,_}} = (catch maps:to_list(id(42))),
+ ok.
+
+
+t_bif_map_from_list(Config) when is_list(Config) ->
+ #{} = maps:from_list([]),
+ A = maps:from_list([]),
+ 0 = erlang:map_size(A),
+
+ #{a:=1,b:=2} = maps:from_list([{a,1},{b,2}]),
+ #{c:=3,a:=1,b:=2} = maps:from_list([{a,1},{b,2},{c,3}]),
+ #{g:=3,a:=1,b:=2} = maps:from_list([{a,1},{b,2},{g,3}]),
+
+ #{a:=2} = maps:from_list([{a,1},{a,3},{a,2}]),
+
+ #{ <<"hi">>:=v1,3:=v3,"hi":=v6,hi:=v4,{hi,3}:=v5} =
+ maps:from_list([{3,v3},{"hi",v6},{hi,v4},{{hi,3},v5},{<<"hi">>,v1}]),
+
+ #{<<"hi">>:=v6,3:=v8,"hi":=v11,hi:=v9,{hi,3}:=v10} =
+ maps:from_list([ {{hi,3},v3}, {"hi",v0},{3,v1}, {<<"hi">>,v4}, {hi,v2},
+ {<<"hi">>,v6}, {{hi,3},v10},{"hi",v11}, {hi,v9}, {3,v8}]),
+
+ %% error cases
+ {'EXIT', {badarg,_}} = (catch maps:from_list(id([{a,b},b]))),
+ {'EXIT', {badarg,_}} = (catch maps:from_list(id([{a,b},{b,b,3}]))),
+ {'EXIT', {badarg,_}} = (catch maps:from_list(id([{a,b},<<>>]))),
+ {'EXIT', {badarg,_}} = (catch maps:from_list(id([{a,b}|{b,a}]))),
+ {'EXIT', {badarg,_}} = (catch maps:from_list(id(a))),
+ {'EXIT', {badarg,_}} = (catch maps:from_list(id(42))),
+ ok.
+
+%% Maps module, not BIFs
+t_maps_fold(_Config) ->
+ Vs = lists:seq(1,100),
+ M = maps:from_list([{{k,I},{v,I}}||I<-Vs]),
+
+ %% fold
+ 5050 = maps:fold(fun({k,_},{v,V},A) -> V + A end, 0, M),
+
+ ok.
+
+t_maps_map(_Config) ->
+ Vs = lists:seq(1,100),
+ M1 = maps:from_list([{I,I}||I<-Vs]),
+ M2 = maps:from_list([{I,{token,I}}||I<-Vs]),
+
+ M2 = maps:map(fun(_K,V) -> {token,V} end, M1),
+ ok.
+
+t_maps_size(_Config) ->
+ Vs = lists:seq(1,100),
+ lists:foldl(fun(I,M) ->
+ M1 = maps:put(I,I,M),
+ I = maps:size(M1),
+ M1
+ end, #{}, Vs),
+ ok.
+
+
+t_maps_without(_Config) ->
+ Ki = [11,22,33,44,55,66,77,88,99],
+ M0 = maps:from_list([{{k,I},{v,I}}||I<-lists:seq(1,100)]),
+ M1 = maps:from_list([{{k,I},{v,I}}||I<-lists:seq(1,100) -- Ki]),
+ M1 = maps:without([{k,I}||I <- Ki],M0),
+ ok.
+
+
+%% MISC
+t_pdict(_Config) ->
+
+ put(#{ a => b, b => a},#{ c => d}),
+ put(get(#{ a => b, b => a}),1),
+ 1 = get(#{ c => d}),
+ #{ c := d } = get(#{ a => b, b => a}).
+
+t_ets(_Config) ->
+
+ Tid = ets:new(map_table,[]),
+
+ [ets:insert(Tid,{maps:from_list([{I,-I}]),I}) || I <- lists:seq(1,100)],
+
+
+ [{#{ 2 := -2},2}] = ets:lookup(Tid,#{ 2 => -2 }),
+
+ %% Test equal
+ [3,4] = lists:sort(
+ ets:select(Tid,[{{'$1','$2'},
+ [{'or',{'==','$1',#{ 3 => -3 }},
+ {'==','$1',#{ 4 => -4 }}}],
+ ['$2']}])),
+ %% Test match
+ [30,50] = lists:sort(
+ ets:select(Tid,
+ [{{#{ 30 => -30}, '$1'},[],['$1']},
+ {{#{ 50 => -50}, '$1'},[],['$1']}]
+ )),
+
+ ets:insert(Tid,{#{ a => b, b => c, c => a},transitivity}),
+
+ %% Test equal with map of different size
+ [] = ets:select(Tid,[{{'$1','_'},[{'==','$1',#{ b => c }}],['$_']}]),
+
+ %% Test match with map of different size
+ %[{#{ a := b },_}] = ets:select(Tid,[{{#{ b => c },'_'},[],['$_']}]),
+
+ %%% Test match with don't care value
+ %[{#{ a := b },_}] = ets:select(Tid,[{{#{ b => '_' },'_'},[],['$_']}]),
+
+ %% Test is_map bif
+ 101 = length(ets:select(Tid,[{'$1',[{is_map,{element,1,'$1'}}],['$1']}])),
+ ets:insert(Tid,{not_a_map,2}),
+ 101 = length(ets:select(Tid,[{'$1',[{is_map,{element,1,'$1'}}],['$1']}])),
+ ets:insert(Tid,{{nope,a,tuple},2}),
+ 101 = length(ets:select(Tid,[{'$1',[{is_map,{element,1,'$1'}}],['$1']}])),
+
+ %% Test map_size bif
+ [3] = ets:select(Tid,[{{'$1','_'},[{'==',{map_size,'$1'},3}],
+ [{map_size,'$1'}]}]),
+
+ true = ets:delete(Tid,#{50 => -50}),
+ [] = ets:lookup(Tid,#{50 => -50}),
+
+ ets:delete(Tid),
+ ok.
+
+t_dets(_Config) ->
+ ok.
+
+getmsg(_Tracer) ->
+ receive V -> V after 100 -> timeout end.
+
+trace_collector(Msg,Parent) ->
+ io:format("~p~n",[Msg]),
+ Parent ! Msg,
+ Parent.
+
+%% Use this function to avoid compile-time evaluation of an expression.
+id(I) -> I.
diff --git a/lib/debugger/vsn.mk b/lib/debugger/vsn.mk
index a245e26a55..cd107599e9 100644
--- a/lib/debugger/vsn.mk
+++ b/lib/debugger/vsn.mk
@@ -1 +1 @@
-DEBUGGER_VSN = 3.2.12
+DEBUGGER_VSN = 4.0
diff --git a/lib/dialyzer/doc/src/dialyzer.xml b/lib/dialyzer/doc/src/dialyzer.xml
index 2a631c3010..3de60b2f7a 100644
--- a/lib/dialyzer/doc/src/dialyzer.xml
+++ b/lib/dialyzer/doc/src/dialyzer.xml
@@ -4,7 +4,7 @@
<erlref>
<header>
<copyright>
- <year>2006</year><year>2013</year>
+ <year>2006</year><year>2014</year>
<holder>Ericsson AB. All Rights Reserved.</holder>
</copyright>
<legalnotice>
@@ -50,33 +50,31 @@
<p>Dialyzer also has a command line version for automated use. Below is a
brief description of the list of its options. The same information can
be obtained by writing</p>
- <code type="none"><![CDATA[
- dialyzer --help
- ]]></code>
+ <code type="none">
+ dialyzer --help</code>
<p>in a shell. Please refer to the GUI description for more details on
the operation of Dialyzer.</p>
<p>The exit status of the command line version is:</p>
- <code type="none"><![CDATA[
+ <code type="none">
0 - No problems were encountered during the analysis and no
warnings were emitted.
1 - Problems were encountered during the analysis.
- 2 - No problems were encountered, but warnings were emitted.
- ]]></code>
+ 2 - No problems were encountered, but warnings were emitted.</code>
<p>Usage:</p>
- <code type="none"><![CDATA[
+ <code type="none">
dialyzer [--help] [--version] [--shell] [--quiet] [--verbose]
[-pa dir]* [--plt plt] [--plts plt*] [-Ddefine]*
- [-I include_dir]* [--output_plt file] [-Wwarn]*
+ [-I include_dir]* [--output_plt file] [-Wwarn]* [--raw]
[--src] [--gui] [files_or_dirs] [-r dirs]
[--apps applications] [-o outfile]
[--build_plt] [--add_to_plt] [--remove_from_plt]
[--check_plt] [--no_check_plt] [--plt_info] [--get_warnings]
- [--no_native] [--fullpath]
- ]]></code>
+ [--dump_callgraph file] [--no_native] [--fullpath]
+ [--statistics]</code>
<p>Options:</p>
<taglist>
<tag><c><![CDATA[files_or_dirs]]></c> (for backwards compatibility also
- as: <c><![CDATA[-c files_or_dirs]]></c></tag>
+ as: <c><![CDATA[-c files_or_dirs]]></c>)</tag>
<item>Use Dialyzer from the command line to detect defects in the
specified files or directories containing <c><![CDATA[.erl]]></c> or
<c><![CDATA[.beam]]></c> files, depending on the type of the
@@ -88,16 +86,14 @@
analysis.</item>
<tag><c><![CDATA[--apps applications]]></c></tag>
<item>Option typically used when building or modifying a plt as in:
- <code type="none"><![CDATA[
- dialyzer --build_plt --apps erts kernel stdlib mnesia ...
- ]]></code>
+ <code type="none">
+ dialyzer --build_plt --apps erts kernel stdlib mnesia ...</code>
to conveniently refer to library applications corresponding to the
Erlang/OTP installation. However, the option is general and can also
be used during analysis in order to refer to Erlang/OTP applications.
In addition, file or directory names can also be included, as in:
- <code type="none"><![CDATA[
- dialyzer --apps inets ssl ./ebin ../other_lib/ebin/my_module.beam
- ]]></code></item>
+ <code type="none">
+ dialyzer --apps inets ssl ./ebin ../other_lib/ebin/my_module.beam</code></item>
<tag><c><![CDATA[-o outfile]]></c> (or
<c><![CDATA[--output outfile]]></c>)</tag>
<item>When using Dialyzer from the command line, send the analysis
@@ -129,24 +125,26 @@
that the plts are disjoint (i.e., do not have any module
appearing in more than one plt).
The plts are created in the usual way:
- <code type="none"><![CDATA[
+ <code type="none">
dialyzer --build_plt --output_plt plt_1 files_to_include
...
- dialyzer --build_plt --output_plt plt_n files_to_include
- ]]></code>
+ dialyzer --build_plt --output_plt plt_n files_to_include</code>
and then can be used in either of the following ways:
- <code type="none"><![CDATA[
- dialyzer files_to_analyze --plts plt_1 ... plt_n
- ]]></code>
+ <code type="none">
+ dialyzer files_to_analyze --plts plt_1 ... plt_n</code>
or:
- <code type="none"><![CDATA[
- dialyzer --plts plt_1 ... plt_n -- files_to_analyze
- ]]></code>
+ <code type="none">
+ dialyzer --plts plt_1 ... plt_n -- files_to_analyze</code>
(Note the -- delimiter in the second case)</item>
<tag><c><![CDATA[-Wwarn]]></c></tag>
<item>A family of options which selectively turn on/off warnings
(for help on the names of warnings use
- <c><![CDATA[dialyzer -Whelp]]></c>).</item>
+ <c><![CDATA[dialyzer -Whelp]]></c>).
+ Note that the options can also be given in the file with a
+ <c>-dialyzer({nowarn_tag, WarningTags})</c> attribute.
+ See <seealso
+ marker="doc/reference_manual:typespec#suppression">Erlang Reference
+ Manual</seealso> for details.</item>
<tag><c><![CDATA[--shell]]></c></tag>
<item>Do not disable the Erlang shell while running the GUI.</item>
<tag><c><![CDATA[--version]]></c> (or <c><![CDATA[-v]]></c>)</tag>
@@ -220,8 +218,6 @@
<item>Suppress warnings for unused functions.</item>
<tag><c><![CDATA[-Wno_improper_lists]]></c></tag>
<item>Suppress warnings for construction of improper lists.</item>
- <tag><c><![CDATA[-Wno_tuple_as_fun]]></c></tag>
- <item>Suppress warnings for using tuples instead of funs.</item>
<tag><c><![CDATA[-Wno_fun_app]]></c></tag>
<item>Suppress warnings for fun applications that will fail.</item>
<tag><c><![CDATA[-Wno_match]]></c></tag>
@@ -229,9 +225,16 @@
match.</item>
<tag><c><![CDATA[-Wno_opaque]]></c></tag>
<item>Suppress warnings for violations of opaqueness of data types.</item>
- <tag><c><![CDATA[-Wno_behaviours]]></c>***</tag>
+ <tag><c><![CDATA[-Wno_fail_call]]></c></tag>
+ <item>Suppress warnings for failing calls.</item>
+ <tag><c><![CDATA[-Wno_contracts]]></c></tag>
+ <item>Suppress warnings about invalid contracts.</item>
+ <tag><c><![CDATA[-Wno_behaviours]]></c></tag>
<item>Suppress warnings about behaviour callbacks which drift from the
published recommended interfaces.</item>
+ <tag><c><![CDATA[-Wno_undefined_callbacks]]></c></tag>
+ <item>Suppress warnings about behaviours that have no
+ <c>-callback</c> attributes for their callbacks.</item>
<tag><c><![CDATA[-Wunmatched_returns]]></c>***</tag>
<item>Include warnings for function calls which ignore a structured return
value or do not match against one of many possible return
@@ -278,13 +281,13 @@
</type>
<desc>
<p>Dialyzer GUI version.</p>
- <code type="none"><![CDATA[
+ <code type="none">
OptList :: [Option]
Option :: {files, [Filename :: string()]}
| {files_rec, [DirName :: string()]}
| {defines, [{Macro: atom(), Value : term()}]}
- | {from, src_code | byte_code} %% Defaults to byte_code
- | {init_plt, FileName :: string()} %% If changed from default
+ | {from, src_code | byte_code} %% Defaults to byte_code
+ | {init_plt, FileName :: string()} %% If changed from default
| {plts, [FileName :: string()]} %% If changed from default
| {include_dirs, [DirName :: string()]}
| {output_file, FileName :: string()}
@@ -304,14 +307,15 @@ WarnOpts :: no_return
| no_match
| no_opaque
| no_fail_call
+ | no_contracts
+ | no_behaviours
+ | no_undefined_callbacks
+ | unmatched_returns
| error_handling
| race_conditions
- | behaviours
- | unmatched_returns
| overspecs
| underspecs
- | specdiffs
- ]]></code>
+ | specdiffs</code>
</desc>
</func>
<func>
@@ -323,17 +327,30 @@ WarnOpts :: no_return
</type>
<desc>
<p>Dialyzer command line version.</p>
- <code type="none"><![CDATA[
+ <code type="none">
Warnings :: [{Tag, Id, Msg}]
-Tag :: 'warn_return_no_exit' | 'warn_return_only_exit'
- | 'warn_not_called' | 'warn_non_proper_list'
- | 'warn_fun_app' | 'warn_matching'
- | 'warn_failing_call' | 'warn_contract_types'
- | 'warn_contract_syntax' | 'warn_contract_not_equal'
- | 'warn_contract_subtype' | 'warn_contract_supertype'
+Tag :: 'warn_behaviour'
+ | 'warn_bin_construction'
+ | 'warn_callgraph'
+ | 'warn_contract_not_equal'
+ | 'warn_contract_range'
+ | 'warn_contract_subtype'
+ | 'warn_contract_supertype'
+ | 'warn_contract_syntax'
+ | 'warn_contract_types'
+ | 'warn_failing_call'
+ | 'warn_fun_app'
+ | 'warn_matching'
+ | 'warn_non_proper_list'
+ | 'warn_not_called'
+ | 'warn_opaque'
+ | 'warn_race_condition'
+ | 'warn_return_no_exit'
+ | 'warn_return_only_exit'
+ | 'warn_umatched_return'
+ | 'warn_undefined_callbacks'
Id = {File :: string(), Line :: integer()}
-Msg = msg() -- Undefined
-]]></code>
+Msg = msg() -- Undefined</code>
</desc>
</func>
<func>
diff --git a/lib/dialyzer/doc/src/notes.xml b/lib/dialyzer/doc/src/notes.xml
index b61b1af1b0..05baa93557 100644
--- a/lib/dialyzer/doc/src/notes.xml
+++ b/lib/dialyzer/doc/src/notes.xml
@@ -31,6 +31,173 @@
<p>This document describes the changes made to the Dialyzer
application.</p>
+<section><title>Dialyzer 2.7</title>
+
+ <section><title>Fixed Bugs and Malfunctions</title>
+ <list>
+ <item>
+ <p> Dialyzer will no longer emit warnings when inspecting
+ or modifying opaque types within the scope of a module.
+ </p> <p> Hitherto the shape of terms (tuple, list, etc.)
+ has been used to determine the opaque terms, but now the
+ contracts are used for decorating types with opaqueness.
+ </p>
+ <p>
+ Own Id: OTP-10397</p>
+ </item>
+ <item>
+ <p>
+ With <c>--Wunmatched_returns</c>, dialyzer will no longer
+ warn when the value of a list comprehension is ignored,
+ provided that the each value in the list would be an
+ atomic value (such as integer or atoms, as opposed to
+ tuples and lists). Example: ignoring '<c>[io:format(...)
+ || ...]</c>' will not cause a warning, while ignoring
+ '<c>[file:close(Fd) || ...]</c>' will.</p>
+ <p>
+ Own Id: OTP-11626</p>
+ </item>
+ <item>
+ <p>
+ The man page for dialyzer now contains correct
+ information regarding -Wno_behaviours. (Thanks to Steve
+ Vinosky.)</p>
+ <p>
+ Own Id: OTP-11706</p>
+ </item>
+ <item>
+ <p> Fix handling of 'on_load' attribute. (Thanks to
+ Kostis Sagonas.) </p>
+ <p>
+ Own Id: OTP-11743</p>
+ </item>
+ <item>
+ <p>
+ Application upgrade (appup) files are corrected for the
+ following applications: </p>
+ <p>
+ <c>asn1, common_test, compiler, crypto, debugger,
+ dialyzer, edoc, eldap, erl_docgen, et, eunit, gs, hipe,
+ inets, observer, odbc, os_mon, otp_mibs, parsetools,
+ percept, public_key, reltool, runtime_tools, ssh,
+ syntax_tools, test_server, tools, typer, webtool, wx,
+ xmerl</c></p>
+ <p>
+ A new test utility for testing appup files is added to
+ test_server. This is now used by most applications in
+ OTP.</p>
+ <p>
+ (Thanks to Tobias Schlager)</p>
+ <p>
+ Own Id: OTP-11744</p>
+ </item>
+ <item>
+ <p> The generalization of guard constraints has been
+ modified. </p>
+ <p>
+ Own Id: OTP-11798 Aux Id: seq12547 </p>
+ </item>
+ <item>
+ <p> Dialyzer now plays nicely with funs that come as
+ "external" arguments. (Thanks to Stavros Aronis for
+ fixing the bug.) </p>
+ <p>
+ Own Id: OTP-11826</p>
+ </item>
+ </list>
+ </section>
+
+
+ <section><title>Improvements and New Features</title>
+ <list>
+ <item>
+ <p> The pre-defined types <c>array/0</c>, <c>dict/0</c>,
+ <c>digraph/0</c>, <c>gb_set/0</c>, <c>gb_tree/0</c>,
+ <c>queue/0</c>, <c>set/0</c>, and <c>tid/0</c> have been
+ deprecated. They will be removed in Erlang/OTP 18.0. </p>
+ <p> Instead the types <c>array:array/0</c>,
+ <c>dict:dict/0</c>, <c>digraph:graph/0</c>,
+ <c>gb_set:set/0</c>, <c>gb_tree:tree/0</c>,
+ <c>queue:queue/0</c>, <c>sets:set/0</c>, and
+ <c>ets:tid/0</c> can be used. (Note: it has always been
+ necessary to use <c>ets:tid/0</c>.) </p> <p> It is
+ allowed in Erlang/OTP 17.0 to locally re-define the types
+ <c>array/0</c>, <c>dict/0</c>, and so on. </p> <p> New
+ types <c>array:array/1</c>, <c>dict:dict/2</c>,
+ <c>gb_sets:set/1</c>, <c>gb_trees:tree/2</c>,
+ <c>queue:queue/1</c>, and <c>sets:set/1</c> have been
+ added. </p> <p> A compiler option,
+ <c>nowarn_deprecated_type</c>, has been introduced. By
+ including the attribute </p> <c>
+ -compile(nowarn_deprecated_type).</c> <p> in an Erlang
+ source file, warnings about deprecated types can be
+ avoided in Erlang/OTP 17.0. </p> <p> The option can also
+ be given as a compiler flag: </p> <c> erlc
+ +nowarn_deprecated_type file.erl</c>
+ <p>
+ Own Id: OTP-10342</p>
+ </item>
+ <item>
+ <p>
+ Removed gs based applications and gs based backends. The
+ <c>observer</c> application replaces the removed
+ applications.</p>
+ <p>
+ *** POTENTIAL INCOMPATIBILITY ***</p>
+ <p>
+ Own Id: OTP-10915</p>
+ </item>
+ <item>
+ <p>
+ Forbid unsized fields in patterns of binary generators
+ and simplified v3_core's translation of bit string
+ generators. (Thanks to Anthony Ramine.)</p>
+ <p>
+ Own Id: OTP-11186</p>
+ </item>
+ <item>
+ <p>
+ EEP43: New data type - Maps</p>
+ <p>
+ With Maps you may for instance: <taglist> <item><c>M0 =
+ #{ a =&gt; 1, b =&gt; 2}, % create
+ associations</c></item> <item><c>M1 = M0#{ a := 10 }, %
+ update values</c></item> <item><c>M2 = M1#{ "hi" =&gt;
+ "hello"}, % add new associations</c></item> <item><c>#{
+ "hi" := V1, a := V2, b := V3} = M2. % match keys with
+ values</c></item> </taglist></p>
+ <p>
+ For information on how to use Maps please see the
+ <seealso marker="doc/reference_manual:maps">Reference
+ Manual</seealso>.</p>
+ <p>
+ The current implementation is without the following
+ features: <taglist> <item>No variable keys</item>
+ <item>No single value access</item> <item>No map
+ comprehensions</item> </taglist></p>
+ <p>
+ Note that Maps is <em>experimental</em> during OTP 17.0.</p>
+ <p>
+ Own Id: OTP-11616</p>
+ </item>
+ <item>
+ <p> Parameterized opaque types have been introduced. </p>
+ <p>
+ Own Id: OTP-11625</p>
+ </item>
+ <item>
+ <p>
+ Some function specs are corrected or moved and some edoc
+ comments are corrected in order to allow use of edoc.
+ (Thanks to Pierre Fenoll)</p>
+ <p>
+ Own Id: OTP-11702</p>
+ </item>
+ </list>
+ </section>
+
+</section>
+
<section><title>Dialyzer 2.6.1</title>
<section><title>Fixed Bugs and Malfunctions</title>
diff --git a/lib/dialyzer/src/Makefile b/lib/dialyzer/src/Makefile
index d7265ba31a..91fbdca5bd 100644
--- a/lib/dialyzer/src/Makefile
+++ b/lib/dialyzer/src/Makefile
@@ -88,7 +88,7 @@ APPUP_TARGET= $(EBIN)/$(APPUP_FILE)
ifeq ($(NATIVE_LIBS_ENABLED),yes)
ERL_COMPILE_FLAGS += +native
endif
-ERL_COMPILE_FLAGS += +warn_exported_vars +warn_unused_import +warn_untyped_record +warn_missing_spec +warnings_as_errors
+ERL_COMPILE_FLAGS += +warn_export_vars +warn_unused_import +warn_untyped_record +warn_missing_spec +warnings_as_errors
# ----------------------------------------------------
# Targets
diff --git a/lib/dialyzer/src/dialyzer.app.src b/lib/dialyzer/src/dialyzer.app.src
index 9222a28a77..1756800c4f 100644
--- a/lib/dialyzer/src/dialyzer.app.src
+++ b/lib/dialyzer/src/dialyzer.app.src
@@ -2,7 +2,7 @@
%%
%% %CopyrightBegin%
%%
-%% Copyright Ericsson AB 2006-2010. All Rights Reserved.
+%% Copyright Ericsson AB 2006-2014. 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
@@ -29,17 +29,22 @@
dialyzer_cl_parse,
dialyzer_codeserver,
dialyzer_contracts,
+ dialyzer_coordinator,
dialyzer_dataflow,
dialyzer_dep,
dialyzer_explanation,
- dialyzer_gui,
dialyzer_gui_wx,
dialyzer_options,
dialyzer_plt,
dialyzer_races,
dialyzer_succ_typings,
dialyzer_typesig,
- dialyzer_utils]},
+ dialyzer_utils,
+ dialyzer_timing,
+ dialyzer_worker]},
{registered, []},
{applications, [compiler, gs, hipe, kernel, stdlib, wx]},
- {env, []}]}.
+ {env, []},
+ {runtime_dependencies, ["wx-1.2","syntax_tools-1.6.14","stdlib-2.0",
+ "kernel-3.0","hipe-3.10.3","erts-6.0",
+ "compiler-5.0"]}]}.
diff --git a/lib/dialyzer/src/dialyzer.appup.src b/lib/dialyzer/src/dialyzer.appup.src
index 26d14ee8f4..1e293e407a 100644
--- a/lib/dialyzer/src/dialyzer.appup.src
+++ b/lib/dialyzer/src/dialyzer.appup.src
@@ -1,7 +1,7 @@
-%%
+%% -*- erlang -*-
%% %CopyrightBegin%
%%
-%% Copyright Ericsson AB 2006-2009. All Rights Reserved.
+%% Copyright Ericsson AB 2006-2014. 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
@@ -15,6 +15,7 @@
%% under the License.
%%
%% %CopyrightEnd%
-%%
-
-{"%VSN%",[],[]}.
+{"%VSN%",
+ [{<<".*">>,[{restart_application, dialyzer}]}],
+ [{<<".*">>,[{restart_application, dialyzer}]}]
+}.
diff --git a/lib/dialyzer/src/dialyzer.erl b/lib/dialyzer/src/dialyzer.erl
index 35156afff2..cec94a49fd 100644
--- a/lib/dialyzer/src/dialyzer.erl
+++ b/lib/dialyzer/src/dialyzer.erl
@@ -2,7 +2,7 @@
%%-----------------------------------------------------------------------
%% %CopyrightBegin%
%%
-%% Copyright Ericsson AB 2006-2013. All Rights Reserved.
+%% Copyright Ericsson AB 2006-2014. 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
@@ -172,7 +172,7 @@ run(Opts) ->
end,
case dialyzer_cl:start(OptsRecord) of
{?RET_DISCREPANCIES, Warnings} -> Warnings;
- {?RET_NOTHING_SUSPICIOUS, []} -> []
+ {?RET_NOTHING_SUSPICIOUS, _} -> []
end
catch
throw:{dialyzer_error, ErrorMsg} ->
@@ -423,6 +423,9 @@ message_to_string({call_without_opaque, [M, F, Args, ExpectedTriples]}) ->
message_to_string({opaque_eq, [Type, _Op, OpaqueType]}) ->
io_lib:format("Attempt to test for equality between a term of type ~s"
" and a term of opaque type ~s\n", [Type, OpaqueType]);
+message_to_string({opaque_guard, [Arg1, Infix, Arg2, ArgNs]}) ->
+ io_lib:format("Guard test ~s ~s ~s contains ~s\n",
+ [Arg1, Infix, Arg2, form_positions(ArgNs)]);
message_to_string({opaque_guard, [Guard, Args]}) ->
io_lib:format("Guard test ~w~s breaks the opaqueness of its argument\n",
[Guard, Args]);
@@ -435,8 +438,15 @@ message_to_string({opaque_match, [Pat, OpaqueType, OpaqueTerm]}) ->
message_to_string({opaque_neq, [Type, _Op, OpaqueType]}) ->
io_lib:format("Attempt to test for inequality between a term of type ~s"
" and a term of opaque type ~s\n", [Type, OpaqueType]);
-message_to_string({opaque_type_test, [Fun, Opaque]}) ->
- io_lib:format("The type test ~s(~s) breaks the opaqueness of the term ~s\n", [Fun, Opaque, Opaque]);
+message_to_string({opaque_type_test, [Fun, Args, Arg, ArgType]}) ->
+ io_lib:format("The type test ~s~s breaks the opaqueness of the term ~s~s\n",
+ [Fun, Args, Arg, ArgType]);
+message_to_string({opaque_size, [SizeType, Size]}) ->
+ io_lib:format("The size ~s breaks the opaqueness of ~s\n",
+ [SizeType, Size]);
+message_to_string({opaque_call, [M, F, Args, Culprit, OpaqueType]}) ->
+ io_lib:format("The call ~s:~s~s breaks the opaqueness of the term ~s :: ~s\n",
+ [M, F, Args, Culprit, OpaqueType]);
%%----- Warnings for concurrency errors --------------------
message_to_string({race_condition, [M, F, Args, Reason]}) ->
io_lib:format("The call ~w:~w~s ~s\n", [M, F, Args, Reason]);
@@ -463,7 +473,14 @@ message_to_string({callback_missing, [B, F, A]}) ->
io_lib:format("Undefined callback function ~w/~w (behaviour '~w')\n",
[F, A, B]);
message_to_string({callback_info_missing, [B]}) ->
- io_lib:format("Callback info about the ~w behaviour is not available\n", [B]).
+ io_lib:format("Callback info about the ~w behaviour is not available\n", [B]);
+%%----- Warnings for unknown functions, types, and behaviours -------------
+message_to_string({unknown_type, {M, F, A}}) ->
+ io_lib:format("Unknown type ~w:~w/~w", [M, F, A]);
+message_to_string({unknown_function, {M, F, A}}) ->
+ io_lib:format("Unknown function ~w:~w/~w", [M, F, A]);
+message_to_string({unknown_behaviour, B}) ->
+ io_lib:format("Unknown behaviour ~w", [B]).
%%-----------------------------------------------------------------------------
%% Auxiliary functions below
@@ -546,4 +563,4 @@ form_position_string(ArgNs) ->
ordinal(1) -> "1st";
ordinal(2) -> "2nd";
ordinal(3) -> "3rd";
-ordinal(N) when is_integer(N) -> io_lib:format("~wth",[N]).
+ordinal(N) when is_integer(N) -> io_lib:format("~wth", [N]).
diff --git a/lib/dialyzer/src/dialyzer.hrl b/lib/dialyzer/src/dialyzer.hrl
index 105a174e31..9a25f86512 100644
--- a/lib/dialyzer/src/dialyzer.hrl
+++ b/lib/dialyzer/src/dialyzer.hrl
@@ -2,7 +2,7 @@
%%%
%%% %CopyrightBegin%
%%%
-%%% Copyright Ericsson AB 2006-2012. All Rights Reserved.
+%%% Copyright Ericsson AB 2006-2014. 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
@@ -58,6 +58,7 @@
-define(WARN_RACE_CONDITION, warn_race_condition).
-define(WARN_BEHAVIOUR, warn_behaviour).
-define(WARN_UNDEFINED_CALLBACK, warn_undefined_callbacks).
+-define(WARN_UNKNOWN, warn_unknown).
%%
%% The following type has double role:
@@ -73,7 +74,7 @@
| ?WARN_CONTRACT_SUPERTYPE | ?WARN_CALLGRAPH
| ?WARN_UNMATCHED_RETURN | ?WARN_RACE_CONDITION
| ?WARN_BEHAVIOUR | ?WARN_CONTRACT_RANGE
- | ?WARN_UNDEFINED_CALLBACK.
+ | ?WARN_UNDEFINED_CALLBACK | ?WARN_UNKNOWN.
%%
%% This is the representation of each warning as they will be returned
@@ -88,12 +89,6 @@
-type dial_error() :: any(). %% XXX: underspecified
%%--------------------------------------------------------------------
-%% THIS TYPE SHOULD ONE DAY DISAPPEAR -- IT DOES NOT BELONG HERE
-%%--------------------------------------------------------------------
-
--type ordset(T) :: [T] . %% XXX: temporarily
-
-%%--------------------------------------------------------------------
%% Basic types used either in the record definitions below or in other
%% parts of the application
%%--------------------------------------------------------------------
@@ -143,7 +138,7 @@
init_plts = [] :: [file:filename()],
include_dirs = [] :: [file:filename()],
output_plt = none :: 'none' | file:filename(),
- legal_warnings = ordsets:new() :: ordset(dial_warn_tag()),
+ legal_warnings = ordsets:new() :: ordsets:ordset(dial_warn_tag()),
report_mode = normal :: rep_mode(),
erlang_mode = false :: boolean(),
use_contracts = true :: boolean(),
@@ -167,4 +162,4 @@
dialyzer_timing:end_stamp(Server),
Var
end).
--define(timing(Server, Msg, Expr),?timing(Server, Msg, _T, Expr)).
+-define(timing(Server, Msg, Expr), ?timing(Server, Msg, _T, Expr)).
diff --git a/lib/dialyzer/src/dialyzer_analysis_callgraph.erl b/lib/dialyzer/src/dialyzer_analysis_callgraph.erl
index 0fbaf1d47c..6a33a2acb3 100644
--- a/lib/dialyzer/src/dialyzer_analysis_callgraph.erl
+++ b/lib/dialyzer/src/dialyzer_analysis_callgraph.erl
@@ -2,7 +2,7 @@
%%--------------------------------------------------------------------
%% %CopyrightBegin%
%%
-%% Copyright Ericsson AB 2006-2013. All Rights Reserved.
+%% Copyright Ericsson AB 2006-2014. 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
@@ -39,6 +39,8 @@
one_file_result/0,
compile_result/0]).
+-export_type([no_warn_unused/0]).
+
-include("dialyzer.hrl").
-record(analysis_state,
@@ -48,7 +50,7 @@
defines = [] :: [dial_define()],
doc_plt :: dialyzer_plt:plt(),
include_dirs = [] :: [file:filename()],
- no_warn_unused :: set(),
+ no_warn_unused :: no_warn_unused(),
parent :: pid(),
plt :: dialyzer_plt:plt(),
start_from = byte_code :: start_from(),
@@ -59,6 +61,8 @@
-record(server_state, {parent :: pid(), legal_warnings :: [dial_warn_tag()]}).
+-type no_warn_unused() :: sets:set(mfa()).
+
%%--------------------------------------------------------------------
%% Main
%%--------------------------------------------------------------------
@@ -168,7 +172,7 @@ analysis_start(Parent, Analysis) ->
throw:{error, _ErrorMsg} = Error -> exit(Error)
end,
NewPlt0 = dialyzer_plt:insert_types(Plt, dialyzer_codeserver:get_records(NewCServer)),
- ExpTypes = dialyzer_codeserver:get_exported_types(NewCServer),
+ ExpTypes = dialyzer_codeserver:get_exported_types(NewCServer),
NewPlt1 = dialyzer_plt:insert_exported_types(NewPlt0, ExpTypes),
State0 = State#analysis_state{plt = NewPlt1},
dump_callgraph(Callgraph, State0, Analysis),
@@ -245,7 +249,7 @@ compile_and_store(Files, #analysis_state{codeserver = CServer,
timing_server = Timing,
parent = Parent} = State) ->
send_log(Parent, "Reading files and computing callgraph... "),
- {T1, _} = statistics(runtime),
+ {T1, _} = statistics(wall_clock),
Callgraph = dialyzer_callgraph:new(),
CompileInit = make_compile_init(State, Callgraph),
{{Failed, NoWarn, Modules}, NextLabel} =
@@ -268,13 +272,13 @@ compile_and_store(Files, #analysis_state{codeserver = CServer,
[[Reason || {_Filename, Reason} <- Failed]]),
exit({error, Msg})
end,
- {T2, _} = statistics(runtime),
+ {T2, _} = statistics(wall_clock),
Msg1 = io_lib:format("done in ~.2f secs\nRemoving edges... ", [(T2-T1)/1000]),
send_log(Parent, Msg1),
Callgraph =
?timing(Timing, "clean", _C2,
cleanup_callgraph(State, CServer2, Callgraph, Modules)),
- {T3, _} = statistics(runtime),
+ {T3, _} = statistics(wall_clock),
Msg2 = io_lib:format("done in ~.2f secs\n", [(T3-T2)/1000]),
send_log(Parent, Msg2),
{Callgraph, sets:from_list(NoWarn), CServer2}.
@@ -423,11 +427,8 @@ abs_get_nowarn(Abs, M) ->
false ->
[{M, F, A} || {function, _, F, A, _} <- Abs]; % all functions
true ->
- OnLoad =
- lists:flatten([{M, F, A} || {attribute, _, on_load, {F, A}} <- Abs]),
- OnLoad ++ [{M, F, A} ||
- {nowarn_unused_function, FAs} <- Opts,
- {F, A} <- lists:flatten([FAs])]
+ [{M, F, A} || {nowarn_unused_function, FAs} <- Opts,
+ {F, A} <- lists:flatten([FAs])]
end.
get_exported_types_from_core(Core) ->
@@ -619,9 +620,9 @@ dump_callgraph(CallGraph, State, #analysis{callgraph_file = File} = Analysis) ->
Extension = filename:extension(File),
Start_Msg = io_lib:format("Dumping the callgraph... ", []),
send_log(State#analysis_state.parent, Start_Msg),
- {T1, _} = statistics(runtime),
+ {T1, _} = statistics(wall_clock),
dump_callgraph(CallGraph, State, Analysis, Extension),
- {T2, _} = statistics(runtime),
+ {T2, _} = statistics(wall_clock),
Finish_Msg = io_lib:format("done in ~2f secs\n", [(T2-T1)/1000]),
send_log(State#analysis_state.parent, Finish_Msg),
ok.
diff --git a/lib/dialyzer/src/dialyzer_behaviours.erl b/lib/dialyzer/src/dialyzer_behaviours.erl
index 2b9a69ce77..1d458b49fc 100644
--- a/lib/dialyzer/src/dialyzer_behaviours.erl
+++ b/lib/dialyzer/src/dialyzer_behaviours.erl
@@ -2,7 +2,7 @@
%%-----------------------------------------------------------------------
%% %CopyrightBegin%
%%
-%% Copyright Ericsson AB 2010-2013. All Rights Reserved.
+%% Copyright Ericsson AB 2010-2014. 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
@@ -40,15 +40,17 @@
-type behaviour() :: atom().
+-type rectab() :: erl_types:type_table().
+
-record(state, {plt :: dialyzer_plt:plt(),
codeserver :: dialyzer_codeserver:codeserver(),
filename :: file:filename(),
behlines :: [{behaviour(), non_neg_integer()}],
- records :: dict()}).
+ records :: rectab()}).
%%--------------------------------------------------------------------
--spec check_callbacks(module(), [{cerl:cerl(), cerl:cerl()}], dict(),
+-spec check_callbacks(module(), [{cerl:cerl(), cerl:cerl()}], rectab(),
dialyzer_plt:plt(),
dialyzer_codeserver:codeserver()) -> [dial_warning()].
diff --git a/lib/dialyzer/src/dialyzer_callgraph.erl b/lib/dialyzer/src/dialyzer_callgraph.erl
index bc32110751..00b01fbd36 100644
--- a/lib/dialyzer/src/dialyzer_callgraph.erl
+++ b/lib/dialyzer/src/dialyzer_callgraph.erl
@@ -2,7 +2,7 @@
%%-----------------------------------------------------------------------
%% %CopyrightBegin%
%%
-%% Copyright Ericsson AB 2006-2013. All Rights Reserved.
+%% Copyright Ericsson AB 2006-2014. 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
@@ -64,14 +64,16 @@
put_named_tables/2, put_public_tables/2, put_behaviour_api_calls/2,
get_behaviour_api_calls/1, dispose_race_server/1, duplicate/1]).
--export_type([callgraph/0, mfa_or_funlbl/0, callgraph_edge/0]).
+-export_type([callgraph/0, mfa_or_funlbl/0, callgraph_edge/0, mod_deps/0]).
-include("dialyzer.hrl").
%%----------------------------------------------------------------------
-type scc() :: [mfa_or_funlbl()].
--type mfa_calls() :: [{mfa_or_funlbl(), mfa_or_funlbl()}].
+-type mfa_call() :: {mfa_or_funlbl(), mfa_or_funlbl()}.
+-type mfa_calls() :: [mfa_call()].
+-type mod_deps() :: dict:dict(module(), [module()]).
%%-----------------------------------------------------------------------------
%% A callgraph is a directed graph where the nodes are functions and a
@@ -93,7 +95,7 @@
%% whenever applicable.
%%-----------------------------------------------------------------------------
--record(callgraph, {digraph = digraph:new() :: digraph(),
+-record(callgraph, {digraph = digraph:new() :: digraph:graph(),
active_digraph :: active_digraph(),
esc :: ets:tid(),
letrec_map :: ets:tid(),
@@ -105,7 +107,7 @@
race_detection = false :: boolean(),
race_data_server = new_race_data_server() :: pid()}).
--record(race_data_state, {race_code = dict:new() :: dict(),
+-record(race_data_state, {race_code = dict:new() :: dict:dict(),
public_tables = [] :: [label()],
named_tables = [] :: [string()],
beh_api_calls = [] :: [{mfa(), mfa()}]}).
@@ -114,7 +116,7 @@
-type callgraph() :: #callgraph{}.
--type active_digraph() :: {'d', digraph()} | {'e', ets:tid(), ets:tid()}.
+-type active_digraph() :: {'d', digraph:graph()} | {'e', ets:tid(), ets:tid()}.
%%----------------------------------------------------------------------
@@ -222,7 +224,10 @@ non_local_calls(#callgraph{digraph = DG}) ->
Edges = digraph_edges(DG),
find_non_local_calls(Edges, sets:new()).
--spec find_non_local_calls([{mfa_or_funlbl(), mfa_or_funlbl()}], set()) -> mfa_calls().
+-type call_tab() :: sets:set(mfa_call()).
+
+-spec find_non_local_calls([{mfa_or_funlbl(), mfa_or_funlbl()}], call_tab()) ->
+ mfa_calls().
find_non_local_calls([{{M,_,_}, {M,_,_}}|Left], Set) ->
find_non_local_calls(Left, Set);
@@ -267,7 +272,7 @@ get_required_by(SCC, #callgraph{active_digraph = {'d', DG}}) ->
modules(#callgraph{digraph = DG}) ->
ordsets:from_list([M || {M,_F,_A} <- digraph_vertices(DG)]).
--spec module_postorder(callgraph()) -> {[module()], {'d', digraph()}}.
+-spec module_postorder(callgraph()) -> {[module()], {'d', digraph:graph()}}.
module_postorder(#callgraph{digraph = DG}) ->
Edges = lists:foldl(fun edge_fold/2, sets:new(), digraph_edges(DG)),
@@ -287,7 +292,7 @@ edge_fold(_, Set) -> Set.
%% The module deps of a module are modules that depend on the module
--spec module_deps(callgraph()) -> dict().
+-spec module_deps(callgraph()) -> mod_deps().
module_deps(#callgraph{digraph = DG}) ->
Edges = lists:foldl(fun edge_fold/2, sets:new(), digraph_edges(DG)),
@@ -301,7 +306,7 @@ module_deps(#callgraph{digraph = DG}) ->
digraph_delete(MDG),
dict:from_list(Deps).
--spec strip_module_deps(dict(), set()) -> dict().
+-spec strip_module_deps(mod_deps(), sets:set(module())) -> mod_deps().
strip_module_deps(ModDeps, StripSet) ->
FilterFun1 = fun(Val) -> not sets:is_element(Val, StripSet) end,
@@ -575,7 +580,7 @@ digraph_reaching_subgraph(Funs, DG) ->
%% Races
%%----------------------------------------------------------------------
--spec renew_race_info(callgraph(), dict(), [label()], [string()]) ->
+-spec renew_race_info(callgraph(), dict:dict(), [label()], [string()]) ->
callgraph().
renew_race_info(#callgraph{race_data_server = RaceDataServer} = CG,
@@ -641,7 +646,7 @@ duplicate(#callgraph{race_data_server = RaceDataServer} = Callgraph) ->
dispose_race_server(#callgraph{race_data_server = RaceDataServer}) ->
race_data_server_cast(stop, RaceDataServer).
--spec get_digraph(callgraph()) -> digraph().
+-spec get_digraph(callgraph()) -> digraph:graph().
get_digraph(#callgraph{digraph = Digraph}) ->
Digraph.
@@ -656,7 +661,7 @@ get_named_tables(#callgraph{race_data_server = RaceDataServer}) ->
get_public_tables(#callgraph{race_data_server = RaceDataServer}) ->
race_data_server_call(get_public_tables, RaceDataServer).
--spec get_race_code(callgraph()) -> dict().
+-spec get_race_code(callgraph()) -> dict:dict().
get_race_code(#callgraph{race_data_server = RaceDataServer}) ->
race_data_server_call(get_race_code, RaceDataServer).
@@ -677,12 +682,12 @@ race_code_new(#callgraph{race_data_server = RaceDataServer} = CG) ->
ok = race_data_server_cast(race_code_new, RaceDataServer),
CG.
--spec put_digraph(digraph(), callgraph()) -> callgraph().
+-spec put_digraph(digraph:graph(), callgraph()) -> callgraph().
put_digraph(Digraph, Callgraph) ->
Callgraph#callgraph{digraph = Digraph}.
--spec put_race_code(dict(), callgraph()) -> callgraph().
+-spec put_race_code(dict:dict(), callgraph()) -> callgraph().
put_race_code(RaceCode, #callgraph{race_data_server = RaceDataServer} = CG) ->
ok = race_data_server_cast({put_race_code, RaceCode}, RaceDataServer),
diff --git a/lib/dialyzer/src/dialyzer_cl.erl b/lib/dialyzer/src/dialyzer_cl.erl
index 365c0b36d4..3e7d9dfa99 100644
--- a/lib/dialyzer/src/dialyzer_cl.erl
+++ b/lib/dialyzer/src/dialyzer_cl.erl
@@ -2,7 +2,7 @@
%%-------------------------------------------------------------------
%% %CopyrightBegin%
%%
-%% Copyright Ericsson AB 2006-2013. All Rights Reserved.
+%% Copyright Ericsson AB 2006-2014. 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
@@ -40,7 +40,7 @@
external_calls = [] :: [mfa()],
external_types = [] :: [mfa()],
legal_warnings = ordsets:new() :: [dial_warn_tag()],
- mod_deps = dict:new() :: dict(),
+ mod_deps = dict:new() :: dialyzer_callgraph:mod_deps(),
output = standard_io :: io:device(),
output_format = formatted :: format(),
filename_opt = basename :: fopt(),
@@ -504,7 +504,7 @@ hipe_compile(Files, #options{erlang_mode = ErlangMode} = Options) ->
_ ->
Mods = [lists, dict, digraph, digraph_utils, ets,
gb_sets, gb_trees, ordsets, sets, sofs,
- cerl, cerl_trees, erl_types, erl_bif_types,
+ cerl, erl_types, cerl_trees, erl_bif_types,
dialyzer_analysis_callgraph, dialyzer, dialyzer_behaviours,
dialyzer_codeserver, dialyzer_contracts,
dialyzer_coordinator, dialyzer_dataflow, dialyzer_dep,
@@ -533,7 +533,7 @@ hc(Mod) ->
case code:is_module_native(Mod) of
true -> ok;
false ->
- %% io:format(" ~s", [Mod]),
+ %% io:format(" ~w", [Mod]),
{ok, Mod} = hipe:c(Mod),
ok
end.
@@ -603,7 +603,7 @@ cl_loop(State, LogCache) ->
Msg = failed_anal_msg(Reason, LogCache),
cl_error(State, Msg);
{'EXIT', BackendPid, Reason} when Reason =/= 'normal' ->
- Msg = failed_anal_msg(io_lib:format("~P", [Reason, 12]), LogCache),
+ Msg = failed_anal_msg(io_lib:format("~p", [Reason]), LogCache),
cl_error(State, Msg);
_Other ->
%% io:format("Received ~p\n", [_Other]),
@@ -613,7 +613,7 @@ cl_loop(State, LogCache) ->
-spec failed_anal_msg(string(), [_]) -> nonempty_string().
failed_anal_msg(Reason, LogCache) ->
- Msg = "Analysis failed with error:\n" ++ Reason ++ "\n",
+ Msg = "Analysis failed with error:\n" ++ lists:flatten(Reason) ++ "\n",
case LogCache =:= [] of
true -> Msg;
false ->
@@ -640,7 +640,7 @@ store_unknown_behaviours(#cl_state{unknown_behaviours = Behs} = St, Beh) ->
-spec cl_error(string()) -> no_return().
cl_error(Msg) ->
- throw({dialyzer_error, Msg}).
+ throw({dialyzer_error, lists:flatten(Msg)}).
-spec cl_error(#cl_state{}, string()) -> no_return().
@@ -650,13 +650,14 @@ cl_error(State, Msg) ->
Outfile -> io:format(Outfile, "\n~s\n", [Msg])
end,
maybe_close_output_file(State),
- throw({dialyzer_error, Msg}).
+ throw({dialyzer_error, lists:flatten(Msg)}).
return_value(State = #cl_state{erlang_mode = ErlangMode,
mod_deps = ModDeps,
output_plt = OutputPlt,
plt_info = PltInfo,
- stored_warnings = StoredWarnings},
+ stored_warnings = StoredWarnings,
+ legal_warnings = LegalWarnings},
Plt) ->
case OutputPlt =:= none of
true -> ok;
@@ -676,16 +677,33 @@ return_value(State = #cl_state{erlang_mode = ErlangMode,
maybe_close_output_file(State),
{RetValue, []};
true ->
- {RetValue, process_warnings(StoredWarnings)}
+ Unknown =
+ case ordsets:is_element(?WARN_UNKNOWN, LegalWarnings) of
+ true ->
+ unknown_functions(State) ++
+ unknown_types(State) ++
+ unknown_behaviours(State);
+ false -> []
+ end,
+ UnknownWarnings =
+ [{?WARN_UNKNOWN, {_Filename = "", _Line = 0}, W} || W <- Unknown],
+ AllWarnings =
+ UnknownWarnings ++ process_warnings(StoredWarnings),
+ {RetValue, AllWarnings}
end.
+unknown_functions(#cl_state{external_calls = Calls}) ->
+ [{unknown_function, MFA} || MFA <- Calls].
+
print_ext_calls(#cl_state{report_mode = quiet}) ->
ok;
print_ext_calls(#cl_state{output = Output,
external_calls = Calls,
stored_warnings = Warnings,
- output_format = Format}) ->
- case Calls =:= [] of
+ output_format = Format,
+ legal_warnings = LegalWarnings}) ->
+ case not ordsets:is_element(?WARN_UNKNOWN, LegalWarnings)
+ orelse Calls =:= [] of
true -> ok;
false ->
case Warnings =:= [] of
@@ -708,14 +726,19 @@ do_print_ext_calls(Output, [{M,F,A}|T], Before) ->
do_print_ext_calls(_, [], _) ->
ok.
+unknown_types(#cl_state{external_types = Types}) ->
+ [{unknown_type, MFA} || MFA <- Types].
+
print_ext_types(#cl_state{report_mode = quiet}) ->
ok;
print_ext_types(#cl_state{output = Output,
external_calls = Calls,
external_types = Types,
stored_warnings = Warnings,
- output_format = Format}) ->
- case Types =:= [] of
+ output_format = Format,
+ legal_warnings = LegalWarnings}) ->
+ case not ordsets:is_element(?WARN_UNKNOWN, LegalWarnings)
+ orelse Types =:= [] of
true -> ok;
false ->
case Warnings =:= [] andalso Calls =:= [] of
@@ -738,6 +761,15 @@ do_print_ext_types(Output, [{M,F,A}|T], Before) ->
do_print_ext_types(_, [], _) ->
ok.
+unknown_behaviours(#cl_state{unknown_behaviours = DupBehaviours,
+ legal_warnings = LegalWarnings}) ->
+ case ordsets:is_element(?WARN_BEHAVIOUR, LegalWarnings) of
+ false -> [];
+ true ->
+ Behaviours = lists:usort(DupBehaviours),
+ [{unknown_behaviour, B} || B <- Behaviours]
+ end.
+
%%print_unknown_behaviours(#cl_state{report_mode = quiet}) ->
%% ok;
print_unknown_behaviours(#cl_state{output = Output,
diff --git a/lib/dialyzer/src/dialyzer_cl_parse.erl b/lib/dialyzer/src/dialyzer_cl_parse.erl
index db27b2037d..04ce0e8bc3 100644
--- a/lib/dialyzer/src/dialyzer_cl_parse.erl
+++ b/lib/dialyzer/src/dialyzer_cl_parse.erl
@@ -2,7 +2,7 @@
%%-----------------------------------------------------------------------
%% %CopyrightBegin%
%%
-%% Copyright Ericsson AB 2006-2013. All Rights Reserved.
+%% Copyright Ericsson AB 2006-2014. 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
@@ -357,12 +357,13 @@ help_warnings() ->
help_message() ->
S = "Usage: dialyzer [--help] [--version] [--shell] [--quiet] [--verbose]
[-pa dir]* [--plt plt] [--plts plt*] [-Ddefine]*
- [-I include_dir]* [--output_plt file] [-Wwarn]*
+ [-I include_dir]* [--output_plt file] [-Wwarn]* [--raw]
[--src] [--gui] [files_or_dirs] [-r dirs]
[--apps applications] [-o outfile]
[--build_plt] [--add_to_plt] [--remove_from_plt]
[--check_plt] [--no_check_plt] [--plt_info] [--get_warnings]
- [--no_native] [--fullpath] [--statistics]
+ [--dump_callgraph file] [--no_native] [--fullpath]
+ [--statistics]
Options:
files_or_dirs (for backwards compatibility also as: -c files_or_dirs)
Use Dialyzer from the command line to detect defects in the
@@ -495,14 +496,16 @@ warning_options_msg() ->
Suppress warnings for unused functions.
-Wno_improper_lists
Suppress warnings for construction of improper lists.
- -Wno_tuple_as_fun
- Suppress warnings for using tuples instead of funs.
-Wno_fun_app
Suppress warnings for fun applications that will fail.
-Wno_match
Suppress warnings for patterns that are unused or cannot match.
-Wno_opaque
Suppress warnings for violations of opaqueness of data types.
+ -Wno_fail_call
+ Suppress warnings for failing calls.
+ -Wno_contracts
+ Suppress warnings about invalid contracts.
-Wno_behaviours
Suppress warnings about behaviour callbacks which drift from the published
recommended interfaces.
diff --git a/lib/dialyzer/src/dialyzer_codeserver.erl b/lib/dialyzer/src/dialyzer_codeserver.erl
index 216e06219c..aab3d6add6 100644
--- a/lib/dialyzer/src/dialyzer_codeserver.erl
+++ b/lib/dialyzer/src/dialyzer_codeserver.erl
@@ -2,7 +2,7 @@
%%-----------------------------------------------------------------------
%% %CopyrightBegin%
%%
-%% Copyright Ericsson AB 2006-2013. All Rights Reserved.
+%% Copyright Ericsson AB 2006-2014. 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
@@ -64,6 +64,12 @@
-type dict_ets() :: ets:tid().
-type set_ets() :: ets:tid().
+-type types() :: erl_types:type_table().
+-type mod_records() :: dict:dict(module(), types()).
+
+-type contracts() :: dict:dict(mfa(),dialyzer_contracts:file_contract()).
+-type mod_contracts() :: dict:dict(module(), contracts()).
+
-record(codeserver, {next_core_label = 0 :: label(),
code :: dict_ets(),
exported_types :: set_ets(), % set(mfa())
@@ -160,12 +166,12 @@ insert(Mod, ModCode, CS) ->
true = ets:insert(CS#codeserver.code, [ModEntry|Funs]),
CS.
--spec get_temp_exported_types(codeserver()) -> set().
+-spec get_temp_exported_types(codeserver()) -> sets:set(mfa()).
get_temp_exported_types(#codeserver{temp_exported_types = TempExpTypes}) ->
ets_set_to_set(TempExpTypes).
--spec insert_temp_exported_types(set(), codeserver()) -> codeserver().
+-spec insert_temp_exported_types(sets:set(mfa()), codeserver()) -> codeserver().
insert_temp_exported_types(Set, CS) ->
TempExportedTypes = CS#codeserver.temp_exported_types,
@@ -183,17 +189,17 @@ insert_exports(List, #codeserver{exports = Exports} = CS) ->
is_exported(MFA, #codeserver{exports = Exports}) ->
ets_set_is_element(MFA, Exports).
--spec get_exported_types(codeserver()) -> set(). % set(mfa())
+-spec get_exported_types(codeserver()) -> sets:set(mfa()).
get_exported_types(#codeserver{exported_types = ExpTypes}) ->
ets_set_to_set(ExpTypes).
--spec get_exports(codeserver()) -> set(). % set(mfa())
+-spec get_exports(codeserver()) -> sets:set(mfa()).
get_exports(#codeserver{exports = Exports}) ->
ets_set_to_set(Exports).
--spec finalize_exported_types(set(), codeserver()) -> codeserver().
+-spec finalize_exported_types(sets:set(mfa()), codeserver()) -> codeserver().
finalize_exported_types(Set, CS) ->
ExportedTypes = ets_read_concurrent_table(dialyzer_codeserver_exported_types),
@@ -222,7 +228,7 @@ get_next_core_label(#codeserver{next_core_label = NCL}) ->
set_next_core_label(NCL, CS) ->
CS#codeserver{next_core_label = NCL}.
--spec lookup_mod_records(atom(), codeserver()) -> dict().
+-spec lookup_mod_records(atom(), codeserver()) -> types().
lookup_mod_records(Mod, #codeserver{records = RecDict}) when is_atom(Mod) ->
case ets_dict_find(Mod, RecDict) of
@@ -230,12 +236,12 @@ lookup_mod_records(Mod, #codeserver{records = RecDict}) when is_atom(Mod) ->
{ok, Dict} -> Dict
end.
--spec get_records(codeserver()) -> dict().
+-spec get_records(codeserver()) -> mod_records().
get_records(#codeserver{records = RecDict}) ->
ets_dict_to_dict(RecDict).
--spec store_temp_records(atom(), dict(), codeserver()) -> codeserver().
+-spec store_temp_records(module(), types(), codeserver()) -> codeserver().
store_temp_records(Mod, Dict, #codeserver{temp_records = TempRecDict} = CS)
when is_atom(Mod) ->
@@ -244,12 +250,12 @@ store_temp_records(Mod, Dict, #codeserver{temp_records = TempRecDict} = CS)
false -> CS#codeserver{temp_records = ets_dict_store(Mod, Dict, TempRecDict)}
end.
--spec get_temp_records(codeserver()) -> dict().
+-spec get_temp_records(codeserver()) -> mod_records().
get_temp_records(#codeserver{temp_records = TempRecDict}) ->
ets_dict_to_dict(TempRecDict).
--spec set_temp_records(dict(), codeserver()) -> codeserver().
+-spec set_temp_records(mod_records(), codeserver()) -> codeserver().
set_temp_records(Dict, CS) ->
true = ets:delete(CS#codeserver.temp_records),
@@ -257,7 +263,7 @@ set_temp_records(Dict, CS) ->
true = ets_dict_store_dict(Dict, TempRecords),
CS#codeserver{temp_records = TempRecords}.
--spec finalize_records(dict(), codeserver()) -> codeserver().
+-spec finalize_records(mod_records(), codeserver()) -> codeserver().
finalize_records(Dict, CS) ->
true = ets:delete(CS#codeserver.temp_records),
@@ -265,7 +271,7 @@ finalize_records(Dict, CS) ->
true = ets_dict_store_dict(Dict, Records),
CS#codeserver{records = Records, temp_records = clean}.
--spec lookup_mod_contracts(atom(), codeserver()) -> dict().
+-spec lookup_mod_contracts(atom(), codeserver()) -> contracts().
lookup_mod_contracts(Mod, #codeserver{contracts = ContDict})
when is_atom(Mod) ->
@@ -284,7 +290,7 @@ get_contract_pair(Key, ContDict) ->
lookup_mfa_contract(MFA, #codeserver{contracts = ContDict}) ->
ets_dict_find(MFA, ContDict).
--spec get_contracts(codeserver()) -> dict().
+-spec get_contracts(codeserver()) -> mod_contracts().
get_contracts(#codeserver{contracts = ContDict}) ->
ets_dict_to_dict(ContDict).
@@ -294,7 +300,7 @@ get_contracts(#codeserver{contracts = ContDict}) ->
get_callbacks(#codeserver{callbacks = CallbDict}) ->
ets:tab2list(CallbDict).
--spec store_temp_contracts(atom(), dict(), dict(), codeserver()) ->
+-spec store_temp_contracts(module(), contracts(), contracts(), codeserver()) ->
codeserver().
store_temp_contracts(Mod, SpecDict, CallbackDict,
@@ -313,13 +319,14 @@ store_temp_contracts(Mod, SpecDict, CallbackDict,
CS1#codeserver{temp_callbacks = ets_dict_store(Mod, CallbackDict, Cb)}
end.
--spec get_temp_contracts(codeserver()) -> {dict(), dict()}.
+-spec get_temp_contracts(codeserver()) -> {mod_contracts(), mod_contracts()}.
get_temp_contracts(#codeserver{temp_contracts = TempContDict,
temp_callbacks = TempCallDict}) ->
{ets_dict_to_dict(TempContDict), ets_dict_to_dict(TempCallDict)}.
--spec finalize_contracts(dict(), dict(), codeserver()) -> codeserver().
+-spec finalize_contracts(mod_contracts(), mod_contracts(), codeserver()) ->
+ codeserver().
finalize_contracts(SpecDict, CallbackDict, CS) ->
Contracts = ets_read_concurrent_table(dialyzer_codeserver_contracts),
diff --git a/lib/dialyzer/src/dialyzer_contracts.erl b/lib/dialyzer/src/dialyzer_contracts.erl
index 332a326b0d..1d2dfc7b2d 100644
--- a/lib/dialyzer/src/dialyzer_contracts.erl
+++ b/lib/dialyzer/src/dialyzer_contracts.erl
@@ -2,7 +2,7 @@
%%-----------------------------------------------------------------------
%% %CopyrightBegin%
%%
-%% Copyright Ericsson AB 2007-2013. All Rights Reserved.
+%% Copyright Ericsson AB 2007-2014. All Rights Reserved.
%%
%% The contents of this file are subject to the Erlang Public License,
%% Version 1.1, (the "License"); you may not use this file except in
@@ -20,11 +20,13 @@
-module(dialyzer_contracts).
+-compile(export_all).
+
-export([check_contract/2,
- check_contracts/3,
+ check_contracts/4,
contracts_without_fun/3,
contract_to_string/1,
- get_invalid_contract_warnings/3,
+ get_invalid_contract_warnings/4,
get_contract_args/1,
get_contract_return/1,
get_contract_return/2,
@@ -52,7 +54,7 @@
%% to expand records and/or remote types that they might contain.
%%-----------------------------------------------------------------------
--type tmp_contract_fun() :: fun((set(), dict()) -> contract_pair()).
+-type tmp_contract_fun() :: fun((sets:set(mfa()), types()) -> contract_pair()).
-record(tmp_contract, {contract_funs = [] :: [tmp_contract_fun()],
forms = [] :: [{_, _}]}).
@@ -160,17 +162,24 @@ process_contract_remote_types(CodeServer) ->
dialyzer_codeserver:finalize_contracts(NewContractDict, NewCallbackDict,
CodeServer).
+-type opaques() :: [erl_types:erl_type()] | 'universe'.
+-type opaques_fun() :: fun((module()) -> opaques()).
+
+-type fun_types() :: dict:dict(label(), erl_types:type_table()).
+
-spec check_contracts([{mfa(), file_contract()}],
- dialyzer_callgraph:callgraph(), dict()) -> plt_contracts().
+ dialyzer_callgraph:callgraph(), fun_types(),
+ opaques_fun()) -> plt_contracts().
-check_contracts(Contracts, Callgraph, FunTypes) ->
+check_contracts(Contracts, Callgraph, FunTypes, FindOpaques) ->
FoldFun =
fun(Label, Type, NewContracts) ->
case dialyzer_callgraph:lookup_name(Label, Callgraph) of
{ok, {M,F,A} = MFA} ->
case orddict:find(MFA, Contracts) of
{ok, {_FileLine, Contract}} ->
- case check_contract(Contract, Type) of
+ Opaques = FindOpaques(M),
+ case check_contract(Contract, Type, Opaques) of
ok ->
case erl_bif_types:is_known(M, F, A) of
true ->
@@ -192,7 +201,10 @@ check_contracts(Contracts, Callgraph, FunTypes) ->
%% Checks all components of a contract
-spec check_contract(#contract{}, erl_types:erl_type()) -> 'ok' | {'error', term()}.
-check_contract(#contract{contracts = Contracts}, SuccType) ->
+check_contract(Contract, SuccType) ->
+ check_contract(Contract, SuccType, 'universe').
+
+check_contract(#contract{contracts = Contracts}, SuccType, Opaques) ->
try
Contracts1 = [{Contract, insert_constraints(Constraints, dict:new())}
|| {Contract, Constraints} <- Contracts],
@@ -203,9 +215,9 @@ check_contract(#contract{contracts = Contracts}, SuccType) ->
error ->
{error, {overlapping_contract, []}};
ok ->
- InfList = [erl_types:t_inf(Contract, SuccType, opaque)
+ InfList = [erl_types:t_inf(Contract, SuccType, Opaques)
|| Contract <- Contracts2],
- case check_contract_inf_list(InfList, SuccType) of
+ case check_contract_inf_list(InfList, SuccType, Opaques) of
{error, _} = Invalid -> Invalid;
ok -> check_extraneous(Contracts2, SuccType)
end
@@ -217,7 +229,7 @@ check_contract(#contract{contracts = Contracts}, SuccType) ->
check_domains([_]) -> ok;
check_domains([Dom|Doms]) ->
Fun = fun(D) ->
- erl_types:any_none_or_unit(erl_types:t_inf_lists(Dom, D, opaque))
+ erl_types:any_none_or_unit(erl_types:t_inf_lists(Dom, D))
end,
case lists:all(Fun, Doms) of
true -> check_domains(Doms);
@@ -227,23 +239,23 @@ check_domains([Dom|Doms]) ->
%% Allow a contract if one of the overloaded contracts is possible.
%% We used to be more strict, e.g., all overloaded contracts had to be
%% possible.
-check_contract_inf_list([FunType|Left], SuccType) ->
+check_contract_inf_list([FunType|Left], SuccType, Opaques) ->
FunArgs = erl_types:t_fun_args(FunType),
case lists:any(fun erl_types:t_is_none_or_unit/1, FunArgs) of
- true -> check_contract_inf_list(Left, SuccType);
+ true -> check_contract_inf_list(Left, SuccType, Opaques);
false ->
STRange = erl_types:t_fun_range(SuccType),
case erl_types:t_is_none_or_unit(STRange) of
true -> ok;
false ->
Range = erl_types:t_fun_range(FunType),
- case erl_types:t_is_none(erl_types:t_inf(STRange, Range, opaque)) of
- true -> check_contract_inf_list(Left, SuccType);
+ case erl_types:t_is_none(erl_types:t_inf(STRange, Range)) of
+ true -> check_contract_inf_list(Left, SuccType, Opaques);
false -> ok
end
end
end;
-check_contract_inf_list([], _SuccType) ->
+check_contract_inf_list([], _SuccType, _Opaques) ->
{error, invalid_contract}.
check_extraneous([], _SuccType) -> ok;
@@ -259,7 +271,7 @@ check_extraneous_1(Contract, SuccType) ->
STRng = erl_types:t_fun_range(SuccType),
?debug("CR = ~p\nSR = ~p\n", [CRngs, STRng]),
case [CR || CR <- CRngs,
- erl_types:t_is_none(erl_types:t_inf(CR, STRng, opaque))] of
+ erl_types:t_is_none(erl_types:t_inf(CR, STRng))] of
[] ->
CRngList = list_part(CRng),
STRngList = list_part(STRng),
@@ -268,7 +280,7 @@ check_extraneous_1(Contract, SuccType) ->
true ->
CRngElements = erl_types:t_list_elements(CRngList),
STRngElements = erl_types:t_list_elements(STRngList),
- Inf = erl_types:t_inf(CRngElements, STRngElements, opaque),
+ Inf = erl_types:t_inf(CRngElements, STRngElements),
case erl_types:t_is_none(Inf) of
true -> {error, invalid_contract};
false -> ok
@@ -278,13 +290,14 @@ check_extraneous_1(Contract, SuccType) ->
end.
list_part(Type) ->
- erl_types:t_inf(erl_types:t_list(), Type, opaque).
+ erl_types:t_inf(erl_types:t_list(), Type).
is_not_nil_list(Type) ->
erl_types:t_is_list(Type) andalso not erl_types:t_is_nil(Type).
%% This is the heart of the "range function"
--spec process_contracts([contract_pair()], [erl_types:erl_type()]) -> erl_types:erl_type().
+-spec process_contracts([contract_pair()], [erl_types:erl_type()]) ->
+ erl_types:erl_type().
process_contracts(OverContracts, Args) ->
process_contracts(OverContracts, Args, erl_types:t_none()).
@@ -299,7 +312,8 @@ process_contracts([OverContract|Left], Args, AccRange) ->
process_contracts([], _Args, AccRange) ->
AccRange.
--spec process_contract(contract_pair(), [erl_types:erl_type()]) -> 'error' | {'ok', erl_types:erl_type()}.
+-spec process_contract(contract_pair(), [erl_types:erl_type()]) ->
+ 'error' | {'ok', erl_types:erl_type()}.
process_contract({Contract, Constraints}, CallTypes0) ->
CallTypesFun = erl_types:t_fun(CallTypes0, erl_types:t_any()),
@@ -335,8 +349,11 @@ solve_constraints(Contract, Call, Constraints) ->
%% ?debug("Inf: ~s\n", [erl_types:t_to_string(Inf)]),
%% erl_types:t_assign_variables_to_subtype(Contract, Inf).
+-type contracts() :: dict:dict(mfa(),dialyzer_contracts:file_contract()).
+
%% Checks the contracts for functions that are not implemented
--spec contracts_without_fun(dict(), [_], dialyzer_callgraph:callgraph()) -> [dial_warning()].
+-spec contracts_without_fun(contracts(), [_], dialyzer_callgraph:callgraph()) ->
+ [dial_warning()].
contracts_without_fun(Contracts, AllFuns0, Callgraph) ->
AllFuns1 = [{dialyzer_callgraph:lookup_name(Label, Callgraph), Arity}
@@ -369,12 +386,15 @@ insert_constraints([{subtype, Type1, Type2}|Left], Dict) ->
end;
insert_constraints([], Dict) -> Dict.
--spec store_tmp_contract(mfa(), file_line(), [_], dict(), dict()) -> dict().
+-type types() :: erl_types:type_table().
+
+-spec store_tmp_contract(mfa(), file_line(), [_], contracts(), types()) ->
+ contracts().
store_tmp_contract(MFA, FileLine, TypeSpec, SpecDict, RecordsDict) ->
%% io:format("contract from form: ~p\n", [TypeSpec]),
TmpContract = contract_from_form(TypeSpec, RecordsDict, FileLine),
- %% io:format("contract: ~p\n", [Contract]),
+ %% io:format("contract: ~p\n", [TmpContract]),
dict:store(MFA, {FileLine, TmpContract}, SpecDict).
contract_from_form(Forms, RecDict, FileLine) ->
@@ -396,7 +416,8 @@ contract_from_form([{type, _, 'fun', [_, _]} = Form | Left], RecDict,
throw({error, NewMsg})
end,
NewType = erl_types:t_solve_remote(Type, ExpTypes, AllRecords),
- {NewType, []}
+ NewTypeNoVars = erl_types:subst_all_vars_to_any(NewType),
+ {NewTypeNoVars, []}
end,
NewTypeAcc = [TypeFun | TypeAcc],
NewFormAcc = [{Form, []} | FormAcc],
@@ -410,7 +431,8 @@ contract_from_form([{type, _L1, bounded_fun,
process_constraints(Constr, RecDict, ExpTypes, AllRecords),
Type = erl_types:t_from_form(Form, RecDict, VarDict),
NewType = erl_types:t_solve_remote(Type, ExpTypes, AllRecords),
- {NewType, Constr1}
+ NewTypeNoVars = erl_types:subst_all_vars_to_any(NewType),
+ {NewTypeNoVars, Constr1}
end,
NewTypeAcc = [TypeFun | TypeAcc],
NewFormAcc = [{Form, Constr} | FormAcc],
@@ -419,7 +441,8 @@ contract_from_form([], _RecDict, _FileLine, TypeAcc, FormAcc) ->
{lists:reverse(TypeAcc), lists:reverse(FormAcc)}.
process_constraints(Constrs, RecDict, ExpTypes, AllRecords) ->
- Init = initialize_constraints(Constrs, RecDict, ExpTypes, AllRecords),
+ Init0 = initialize_constraints(Constrs, RecDict, ExpTypes, AllRecords),
+ Init = remove_cycles(Init0),
constraints_fixpoint(Init, RecDict, ExpTypes, AllRecords).
initialize_constraints(Constrs, RecDict, ExpTypes, AllRecords) ->
@@ -459,12 +482,9 @@ constraints_fixpoint(OldVarDict, Constrs, RecDict, ExpTypes, AllRecords) ->
constraints_fixpoint(NewVarDict, Constrs, RecDict, ExpTypes, AllRecords)
end.
--define(TYPE_LIMIT, 4).
-
final_form(Form, RecDict, ExpTypes, AllRecords, VarDict) ->
T1 = erl_types:t_from_form(Form, RecDict, VarDict),
- T2 = erl_types:t_solve_remote(T1, ExpTypes, AllRecords),
- erl_types:t_limit(T2, ?TYPE_LIMIT).
+ erl_types:t_solve_remote(T1, ExpTypes, AllRecords).
constraints_to_dict(Constrs, RecDict, ExpTypes, AllRecords, VarDict) ->
Subtypes =
@@ -479,6 +499,74 @@ constraints_to_subs([C|Rest], RecDict, ExpTypes, AllRecords, VarDict, Acc) ->
NewAcc = [{subtype, T1, T2}|Acc],
constraints_to_subs(Rest, RecDict, ExpTypes, AllRecords, VarDict, NewAcc).
+%% Replaces variables with '_' when necessary to break up cycles among
+%% the constraints.
+
+remove_cycles(Constrs0) ->
+ Uses = find_uses(Constrs0),
+ G = digraph:new(),
+ Vs0 = [V || {V, _} <- Uses] ++ [V || {_, V} <- Uses],
+ Vs = lists:usort(Vs0),
+ lists:foreach(fun(V) -> _ = digraph:add_vertex(G, V) end, Vs),
+ lists:foreach(fun({From, To}) ->
+ _ = digraph:add_edge(G, {From, To}, From, To, [])
+ end, Uses),
+ ok = remove_cycles(G, Vs),
+ ToRemove = ordsets:subtract(ordsets:from_list(Uses),
+ ordsets:from_list(digraph:edges(G))),
+ Constrs = remove_uses(ToRemove, Constrs0),
+ digraph:delete(G),
+ Constrs.
+
+find_uses([{Var, Form}|Constrs]) ->
+ UsedVars = form_vars(Form, []),
+ VarName = erl_types:t_var_name(Var),
+ [{VarName, UsedVar} || UsedVar <- UsedVars] ++ find_uses(Constrs);
+find_uses([]) ->
+ [].
+
+form_vars({var, _, '_'}, Vs) -> Vs;
+form_vars({var, _, V}, Vs) -> [V|Vs];
+form_vars(T, Vs) when is_tuple(T) ->
+ form_vars(tuple_to_list(T), Vs);
+form_vars([E|Es], Vs) ->
+ form_vars(Es, form_vars(E, Vs));
+form_vars(_, Vs) -> Vs.
+
+remove_cycles(G, Vs) ->
+ NumberOfEdges = digraph:no_edges(G),
+ lists:foreach(fun(V) ->
+ case digraph:get_cycle(G, V) of
+ false -> true;
+ [V] -> digraph:del_edge(G, {V, V});
+ [V, V1|_] -> digraph:del_edge(G, {V, V1})
+ end
+ end, Vs),
+ case digraph:no_edges(G) =:= NumberOfEdges of
+ true -> ok;
+ false -> remove_cycles(G, Vs)
+ end.
+
+remove_uses([], Constrs) -> Constrs;
+remove_uses([{Var, Use}|ToRemove], Constrs0) ->
+ Constrs = remove_uses(Var, Use, Constrs0),
+ remove_uses(ToRemove, Constrs).
+
+remove_uses(_Var, _Use, []) -> [];
+remove_uses(Var, Use, [Constr|Constrs]) ->
+ {V, Form} = Constr,
+ case erl_types:t_var_name(V) =:= Var of
+ true -> [{V, remove_use(Form, Use)}|Constrs];
+ false -> [Constr|remove_uses(Var, Use, Constrs)]
+ end.
+
+remove_use({var, L, V}, V) -> {var, L, '_'};
+remove_use(T, V) when is_tuple(T) ->
+ list_to_tuple(remove_use(tuple_to_list(T), V));
+remove_use([E|Es], V) ->
+ [remove_use(E, V)|remove_use(Es, V)];
+remove_use(T, _V) -> T.
+
%% Gets the most general domain of a list of domains of all
%% the overloaded contracts
@@ -494,30 +582,35 @@ general_domain([], AccSig) ->
AccSig1 = erl_types:subst_all_vars_to_any(AccSig),
erl_types:t_fun_args(AccSig1).
--spec get_invalid_contract_warnings([module()], dialyzer_codeserver:codeserver(), dialyzer_plt:plt()) -> [dial_warning()].
+-spec get_invalid_contract_warnings([module()],
+ dialyzer_codeserver:codeserver(),
+ dialyzer_plt:plt(),
+ opaques_fun()) -> [dial_warning()].
-get_invalid_contract_warnings(Modules, CodeServer, Plt) ->
- get_invalid_contract_warnings_modules(Modules, CodeServer, Plt, []).
+get_invalid_contract_warnings(Modules, CodeServer, Plt, FindOpaques) ->
+ get_invalid_contract_warnings_modules(Modules, CodeServer, Plt, FindOpaques, []).
-get_invalid_contract_warnings_modules([Mod|Mods], CodeServer, Plt, Acc) ->
+get_invalid_contract_warnings_modules([Mod|Mods], CodeServer, Plt, FindOpaques, Acc) ->
Contracts1 = dialyzer_codeserver:lookup_mod_contracts(Mod, CodeServer),
Contracts2 = dict:to_list(Contracts1),
Records = dialyzer_codeserver:lookup_mod_records(Mod, CodeServer),
- NewAcc = get_invalid_contract_warnings_funs(Contracts2, Plt, Records, Acc),
- get_invalid_contract_warnings_modules(Mods, CodeServer, Plt, NewAcc);
-get_invalid_contract_warnings_modules([], _CodeServer, _Plt, Acc) ->
+ NewAcc = get_invalid_contract_warnings_funs(Contracts2, Plt, Records, FindOpaques, Acc),
+ get_invalid_contract_warnings_modules(Mods, CodeServer, Plt, FindOpaques, NewAcc);
+get_invalid_contract_warnings_modules([], _CodeServer, _Plt, _FindOpaques, Acc) ->
Acc.
get_invalid_contract_warnings_funs([{MFA, {FileLine, Contract}}|Left],
- Plt, RecDict, Acc) ->
+ Plt, RecDict, FindOpaques, Acc) ->
case dialyzer_plt:lookup(Plt, MFA) of
none ->
%% This must be a contract for a non-available function. Just accept it.
- get_invalid_contract_warnings_funs(Left, Plt, RecDict, Acc);
+ get_invalid_contract_warnings_funs(Left, Plt, RecDict, FindOpaques, Acc);
{value, {Ret, Args}} ->
Sig = erl_types:t_fun(Args, Ret),
+ {M, _F, _A} = MFA,
+ Opaques = FindOpaques(M),
NewAcc =
- case check_contract(Contract, Sig) of
+ case check_contract(Contract, Sig, Opaques) of
{error, invalid_contract} ->
[invalid_contract_warning(MFA, FileLine, Sig, RecDict)|Acc];
{error, {overlapping_contract, []}} ->
@@ -551,7 +644,7 @@ get_invalid_contract_warnings_funs([{MFA, {FileLine, Contract}}|Left],
BifArgs = erl_bif_types:arg_types(M, F, A),
BifRet = erl_bif_types:type(M, F, A),
BifSig = erl_types:t_fun(BifArgs, BifRet),
- case check_contract(Contract, BifSig) of
+ case check_contract(Contract, BifSig, Opaques) of
{error, _} ->
[invalid_contract_warning(MFA, FileLine, BifSig, RecDict)
|Acc];
@@ -564,9 +657,9 @@ get_invalid_contract_warnings_funs([{MFA, {FileLine, Contract}}|Left],
RecDict, Acc)
end
end,
- get_invalid_contract_warnings_funs(Left, Plt, RecDict, NewAcc)
+ get_invalid_contract_warnings_funs(Left, Plt, RecDict, FindOpaques, NewAcc)
end;
-get_invalid_contract_warnings_funs([], _Plt, _RecDict, Acc) ->
+get_invalid_contract_warnings_funs([], _Plt, _RecDict, _FindOpaques, Acc) ->
Acc.
invalid_contract_warning({M, F, A}, FileLine, SuccType, RecDict) ->
@@ -601,16 +694,23 @@ picky_contract_check(CSig0, Sig0, MFA, FileLine, Contract, RecDict, Acc) ->
end.
extra_contract_warning({M, F, A}, FileLine, Contract, CSig, Sig, RecDict) ->
- SigString = lists:flatten(dialyzer_utils:format_sig(Sig, RecDict)),
- ContractString0 = lists:flatten(dialyzer_utils:format_sig(CSig, RecDict)),
+ %% We do not want to depend upon erl_types:t_to_string() possibly
+ %% hiding the contents of opaque types.
+ SigUnopaque = erl_types:t_unopaque(Sig),
+ CSigUnopaque = erl_types:t_unopaque(CSig),
+ SigString0 =
+ lists:flatten(dialyzer_utils:format_sig(SigUnopaque, RecDict)),
+ ContractString0 =
+ lists:flatten(dialyzer_utils:format_sig(CSigUnopaque, RecDict)),
%% The only difference is in record fields containing 'undefined' or not.
- IsUndefRecordFieldsRelated = SigString =:= ContractString0,
+ IsUndefRecordFieldsRelated = SigString0 =:= ContractString0,
{IsRemoteTypesRelated, SubtypeRelation} =
is_remote_types_related(Contract, CSig, Sig, RecDict),
case IsUndefRecordFieldsRelated orelse IsRemoteTypesRelated of
true ->
no_warning;
false ->
+ SigString = lists:flatten(dialyzer_utils:format_sig(Sig, RecDict)),
ContractString = contract_to_string(Contract),
{Tag, Msg} =
case SubtypeRelation of
@@ -652,14 +752,7 @@ is_remote_types_related(Contract, CSig, Sig, RecDict) ->
t_from_forms_without_remote([{FType, []}], RecDict) ->
Type0 = erl_types:t_from_form(FType, RecDict),
- Map =
- fun(Type) ->
- case erl_types:t_is_remote(Type) of
- true -> erl_types:t_none();
- false -> Type
- end
- end,
- {ok, erl_types:t_map(Map, Type0)};
+ {ok, erl_types:subst_all_remote(Type0, erl_types:t_none())};
t_from_forms_without_remote([{_FType, _Constrs}], _RecDict) ->
%% 'When' constraints
unsupported;
diff --git a/lib/dialyzer/src/dialyzer_dataflow.erl b/lib/dialyzer/src/dialyzer_dataflow.erl
index 922ccad599..e0873b17f8 100644
--- a/lib/dialyzer/src/dialyzer_dataflow.erl
+++ b/lib/dialyzer/src/dialyzer_dataflow.erl
@@ -2,7 +2,7 @@
%%--------------------------------------------------------------------
%% %CopyrightBegin%
%%
-%% Copyright Ericsson AB 2006-2012. All Rights Reserved.
+%% Copyright Ericsson AB 2006-2014. 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
@@ -41,27 +41,37 @@
-include("dialyzer.hrl").
+%%-import(helper, %% 'helper' could be any module doing sanity checks...
-import(erl_types,
- [any_none/1, t_any/0, t_atom/0, t_atom/1, t_atom_vals/1,
+ [t_inf/2, t_inf/3, t_inf_lists/2, t_inf_lists/3,
+ t_inf_lists/3, t_is_equal/2, t_is_subtype/2, t_subtract/2,
+ t_sup/1, t_sup/2]).
+
+-import(erl_types,
+ [any_none/1, t_any/0, t_atom/0, t_atom/1, t_atom_vals/1, t_atom_vals/2,
t_binary/0, t_boolean/0,
t_bitstr/0, t_bitstr/2, t_bitstr_concat/1, t_bitstr_match/2,
- t_cons/0, t_cons/2, t_cons_hd/1, t_cons_tl/1, t_contains_opaque/1,
+ t_cons/0, t_cons/2, t_cons_hd/2, t_cons_tl/2,
+ t_contains_opaque/2,
t_find_opaque_mismatch/2, t_float/0, t_from_range/2, t_from_term/1,
- t_fun/0, t_fun/2, t_fun_args/1, t_fun_range/1,
- t_inf/2, t_inf/3, t_inf_lists/2, t_inf_lists/3, t_inf_lists_masked/3,
- t_integer/0, t_integers/1,
- t_is_any/1, t_is_atom/1, t_is_atom/2, t_is_boolean/1, t_is_equal/2,
- t_is_integer/1, t_is_nil/1, t_is_none/1, t_is_none_or_unit/1,
- t_is_number/1, t_is_reference/1, t_is_pid/1, t_is_port/1,
- t_is_subtype/2, t_is_unit/1,
- t_limit/2, t_list/0, t_maybe_improper_list/0, t_module/0,
- t_none/0, t_non_neg_integer/0, t_number/0, t_number_vals/1,
- t_opaque_match_atom/2, t_opaque_match_record/2,
- t_opaque_matching_structure/2,
+ t_fun/0, t_fun/2, t_fun_args/1, t_fun_args/2, t_fun_range/1,
+ t_fun_range/2, t_integer/0, t_integers/1,
+ t_is_any/1, t_is_atom/1, t_is_atom/2, t_is_any_atom/3,
+ t_is_boolean/2,
+ t_is_integer/2, t_is_list/1,
+ t_is_nil/2, t_is_none/1, t_is_none_or_unit/1,
+ t_is_number/2, t_is_reference/2, t_is_pid/2, t_is_port/2,
+ t_is_unit/1,
+ t_limit/2, t_list/0, t_list_elements/2,
+ t_maybe_improper_list/0, t_module/0,
+ t_none/0, t_non_neg_integer/0, t_number/0, t_number_vals/2,
t_pid/0, t_port/0, t_product/1, t_reference/0,
- t_sup/1, t_sup/2, t_subtract/2, t_to_string/2, t_to_tlist/1,
- t_tuple/0, t_tuple/1, t_tuple_args/1, t_tuple_subtypes/1,
- t_unit/0, t_unopaque/1]).
+ t_to_string/2, t_to_tlist/1,
+ t_tuple/0, t_tuple/1, t_tuple_args/1, t_tuple_args/2,
+ t_tuple_subtypes/2,
+ t_unit/0, t_unopaque/2,
+ t_map/1
+ ]).
%%-define(DEBUG, true).
%%-define(DEBUG_PP, true).
@@ -76,39 +86,53 @@
%%--------------------------------------------------------------------
+-type type() :: erl_types:erl_type().
+-type types() :: erl_types:type_table().
+
-define(no_arg, no_arg).
-define(TYPE_LIMIT, 3).
-record(state, {callgraph :: dialyzer_callgraph:callgraph(),
- envs :: dict(),
- fun_tab :: dict(),
+ envs :: env_tab(),
+ fun_tab :: fun_tab(),
plt :: dialyzer_plt:plt(),
- opaques :: [erl_types:erl_type()],
+ opaques :: [type()],
races = dialyzer_races:new() :: dialyzer_races:races(),
- records = dict:new() :: dict(),
- tree_map :: dict(),
+ records = dict:new() :: types(),
+ tree_map :: dict:dict(label(), cerl:cerl()),
warning_mode = false :: boolean(),
warnings = [] :: [dial_warning()],
- work :: {[_], [_], set()},
+ work :: {[_], [_], sets:set()},
module :: module()
}).
--record(map, {dict = dict:new() :: dict(),
- subst = dict:new() :: dict(),
+-record(map, {dict = dict:new() :: type_tab(),
+ subst = dict:new() :: subst_tab(),
modified = [] :: [Key :: term()],
modified_stack = [] :: [{[Key :: term()],reference()}],
ref = undefined :: reference() | undefined}).
+-type nowarn() :: dialyzer_analysis_callgraph:no_warn_unused().
+-type env_tab() :: dict:dict(label(), #map{}).
+-type fun_entry() :: {Args :: [type()], RetType :: type()}.
+-type fun_tab() :: dict:dict('top' | label(),
+ {'not_handled', fun_entry()} | fun_entry()).
+-type key() :: label() | cerl:cerl().
+-type type_tab() :: dict:dict(key(), type()).
+-type subst_tab() :: dict:dict(key(), cerl:cerl()).
+
%% Exported Types
-opaque state() :: #state{}.
%%--------------------------------------------------------------------
+-type fun_types() :: dict:dict(label(), type()).
+
-spec get_warnings(cerl:c_module(), dialyzer_plt:plt(),
- dialyzer_callgraph:callgraph(), dict(), set()) ->
- {[dial_warning()], dict()}.
+ dialyzer_callgraph:callgraph(), types(), nowarn()) ->
+ {[dial_warning()], fun_types()}.
get_warnings(Tree, Plt, Callgraph, Records, NoWarnUnused) ->
State1 = analyze_module(Tree, Plt, Callgraph, Records, true),
@@ -119,7 +143,8 @@ get_warnings(Tree, Plt, Callgraph, Records, NoWarnUnused) ->
{State4#state.warnings, state__all_fun_types(State4)}.
-spec get_fun_types(cerl:c_module(), dialyzer_plt:plt(),
- dialyzer_callgraph:callgraph(), dict()) -> dict().
+ dialyzer_callgraph:callgraph(),
+ types()) -> fun_types().
get_fun_types(Tree, Plt, Callgraph, Records) ->
State = analyze_module(Tree, Plt, Callgraph, Records, false),
@@ -204,7 +229,7 @@ analyze_loop(State) ->
traverse(Tree, Map, State) ->
?debug("Handling ~p\n", [cerl:type(Tree)]),
- %%debug_pp_map(Map),
+ %% debug_pp_map(Map),
case cerl:type(Tree) of
alias ->
%% This only happens when checking for illegal record patterns
@@ -256,12 +281,7 @@ traverse(Tree, Map, State) ->
case cerl:unfold_literal(Tree) of
Tree ->
Type = literal_type(Tree),
- NewType =
- case erl_types:t_opaque_match_atom(Type, State#state.opaques) of
- [Opaque] -> Opaque;
- _ -> Type
- end,
- {State, Map, NewType};
+ {State, Map, Type};
NewTree -> traverse(NewTree, Map, State)
end;
module ->
@@ -286,8 +306,12 @@ traverse(Tree, Map, State) ->
SMA;
false ->
State2 =
- case (t_is_any(ArgType) orelse t_is_simple(ArgType)
- orelse is_call_to_send(Arg)) of
+ case
+ t_is_any(ArgType)
+ orelse t_is_simple(ArgType, State)
+ orelse is_call_to_send(Arg)
+ orelse is_lc_simple_list(Arg, ArgType, State)
+ of
true -> % do not warn in these cases
State1;
false ->
@@ -301,6 +325,10 @@ traverse(Tree, Map, State) ->
handle_try(Tree, Map, State);
tuple ->
handle_tuple(Tree, Map, State);
+ map ->
+ handle_map(Tree, Map, State);
+ map_pair ->
+ handle_map_pair(Tree, Map, State);
values ->
Elements = cerl:values_es(Tree),
{State1, Map1, EsType} = traverse_list(Elements, Map, State),
@@ -311,15 +339,7 @@ traverse(Tree, Map, State) ->
case state__lookup_type_for_letrec(Tree, State) of
error ->
LType = lookup_type(Tree, Map),
- Opaques = State#state.opaques,
- case t_opaque_match_record(LType, Opaques) of
- [Opaque] -> {State, Map, Opaque};
- _ ->
- case t_opaque_match_atom(LType, Opaques) of
- [Opaque] -> {State, Map, Opaque};
- _ -> {State, Map, LType}
- end
- end;
+ {State, Map, LType};
{ok, Type} -> {State, Map, Type}
end;
Other ->
@@ -343,20 +363,24 @@ traverse_list([], Map, State, Acc) ->
handle_apply(Tree, Map, State) ->
Args = cerl:apply_args(Tree),
Op = cerl:apply_op(Tree),
- {State1, Map1, ArgTypes} = traverse_list(Args, Map, State),
- {State2, Map2, OpType} = traverse(Op, Map1, State1),
+ {State0, Map1, ArgTypes} = traverse_list(Args, Map, State),
+ {State1, Map2, OpType} = traverse(Op, Map1, State0),
case any_none(ArgTypes) of
true ->
- {State2, Map2, t_none()};
+ {State1, Map2, t_none()};
false ->
- {CallSitesKnown, FunList} =
- case state__lookup_call_site(Tree, State2) of
- error -> {false, []};
- {ok, [external]} -> {false, []};
- {ok, List} -> {true, List}
+ FunList =
+ case state__lookup_call_site(Tree, State) of
+ error -> [external]; %% so that we go directly in the fallback
+ {ok, List} -> List
end,
- case CallSitesKnown of
- false ->
+ FunInfoList = [{local, state__fun_info(Fun, State)} || Fun <- FunList],
+ case
+ handle_apply_or_call(FunInfoList, Args, ArgTypes, Map2, Tree, State1)
+ of
+ {had_external, State2} ->
+ %% Fallback: use whatever info we collected from traversing the op
+ %% instead of the result that has been generalized to t_any().
Arity = length(Args),
OpType1 = t_inf(OpType, t_fun(Arity, t_any())),
case t_is_none(OpType1) of
@@ -367,7 +391,8 @@ handle_apply(Tree, Map, State) ->
Tree, Msg),
{State3, Map2, t_none()};
false ->
- NewArgs = t_inf_lists(ArgTypes, t_fun_args(OpType1)),
+ NewArgs = t_inf_lists(ArgTypes,
+ t_fun_args(OpType1, 'universe')),
case any_none(NewArgs) of
true ->
Msg = {fun_app_args,
@@ -378,7 +403,7 @@ handle_apply(Tree, Map, State) ->
{State3, enter_type(Op, OpType1, Map2), t_none()};
false ->
Map3 = enter_type_lists(Args, NewArgs, Map2),
- Range0 = t_fun_range(OpType1),
+ Range0 = t_fun_range(OpType1, 'universe'),
Range =
case t_is_unit(Range0) of
true -> t_none();
@@ -387,25 +412,23 @@ handle_apply(Tree, Map, State) ->
{State2, enter_type(Op, OpType1, Map3), Range}
end
end;
- true ->
- FunInfoList = [{local, state__fun_info(Fun, State)}
- || Fun <- FunList],
- handle_apply_or_call(FunInfoList, Args, ArgTypes, Map2, Tree, State1)
+ Normal -> Normal
end
end.
handle_apply_or_call(FunInfoList, Args, ArgTypes, Map, Tree, State) ->
None = t_none(),
handle_apply_or_call(FunInfoList, Args, ArgTypes, Map, Tree, State,
- [None || _ <- ArgTypes], None).
+ [None || _ <- ArgTypes], None, false).
handle_apply_or_call([{local, external}|Left], Args, ArgTypes, Map, Tree, State,
- _AccArgTypes, _AccRet) ->
+ _AccArgTypes, _AccRet, _HadExternal) ->
handle_apply_or_call(Left, Args, ArgTypes, Map, Tree, State,
- ArgTypes, t_any());
+ ArgTypes, t_any(), true);
handle_apply_or_call([{TypeOfApply, {Fun, Sig, Contr, LocalRet}}|Left],
Args, ArgTypes, Map, Tree,
- #state{opaques = Opaques} = State, AccArgTypes, AccRet) ->
+ #state{opaques = Opaques} = State,
+ AccArgTypes, AccRet, HadExternal) ->
Any = t_any(),
AnyArgs = [Any || _ <- Args],
GenSig = {AnyArgs, fun(_) -> t_any() end},
@@ -423,83 +446,55 @@ handle_apply_or_call([{TypeOfApply, {Fun, Sig, Contr, LocalRet}}|Left],
{M, F, A} = Fun,
case erl_bif_types:is_known(M, F, A) of
true ->
- IsBIF = true,
BArgs = erl_bif_types:arg_types(M, F, A),
BRange =
fun(FunArgs) ->
- ArgPos = erl_bif_types:structure_inspecting_args(M, F, A),
- NewFunArgs =
- case ArgPos =:= [] of
- true -> FunArgs;
- false -> % some positions need to be un-opaqued
- N = length(FunArgs),
- PFs = lists:zip(lists:seq(1, N), FunArgs),
- [case ordsets:is_element(P, ArgPos) of
- true -> erl_types:t_unopaque(FArg, Opaques);
- false -> FArg
- end || {P, FArg} <- PFs]
- end,
- erl_bif_types:type(M, F, A, NewFunArgs)
+ erl_bif_types:type(M, F, A, FunArgs, Opaques)
end,
{BArgs, BRange};
- false -> IsBIF = false, GenSig
+ false ->
+ GenSig
end;
- local -> IsBIF = false, GenSig
+ local -> GenSig
end,
{SigArgs, SigRange} =
- %% if there is hard-coded or contract information with opaque types,
- %% the checking for possible type violations needs to take place w.r.t.
- %% this information and not w.r.t. the structure-based success typing.
- case prefer_opaque_types(CArgs, BifArgs) of
- true -> {AnyArgs, t_any()}; % effectively forgets the success typing
- false ->
- case Sig of
- {value, {SR, SA}} -> {SA, SR};
- none -> {AnyArgs, t_any()}
- end
- end,
- ArgModeMask = [case lists:member(Arg, Opaques) of
- true -> opaque;
- false -> structured
- end || Arg <- ArgTypes],
- NewArgsSig = t_inf_lists_masked(SigArgs, ArgTypes, ArgModeMask),
- NewArgsContract = t_inf_lists_masked(CArgs, ArgTypes, ArgModeMask),
- NewArgsBif = t_inf_lists_masked(BifArgs, ArgTypes, ArgModeMask),
- NewArgTypes0 = t_inf_lists_masked(NewArgsSig, NewArgsContract, ArgModeMask),
- NewArgTypes = t_inf_lists_masked(NewArgTypes0, NewArgsBif, ArgModeMask),
- BifRet = BifRange(NewArgTypes),
- {TmpArgTypes, TmpArgsContract} =
- case (TypeOfApply =:= remote) andalso (not IsBIF) of
- true ->
- List1 = lists:zip(CArgs, NewArgTypes),
- List2 = lists:zip(CArgs, NewArgsContract),
- {[erl_types:t_unopaque_on_mismatch(T1, T2, Opaques)
- || {T1, T2} <- List1],
- [erl_types:t_unopaque_on_mismatch(T1, T2, Opaques)
- || {T1, T2} <- List2]};
- false -> {NewArgTypes, NewArgsContract}
+ case Sig of
+ {value, {SR, SA}} -> {SA, SR};
+ none -> {AnyArgs, t_any()}
end,
- ContrRet = CRange(TmpArgTypes),
- RetMode =
- case t_contains_opaque(ContrRet) orelse t_contains_opaque(BifRet) of
- true -> opaque;
- false -> structured
- end,
- RetWithoutContr = t_inf(SigRange, BifRet, RetMode),
- RetWithoutLocal = t_inf(ContrRet, RetWithoutContr, RetMode),
+
?debug("--------------------------------------------------------\n", []),
- ?debug("Fun: ~p\n", [Fun]),
- ?debug("Args: ~s\n", [erl_types:t_to_string(t_product(ArgTypes))]),
+ ?debug("Fun: ~p\n", [state__lookup_name(Fun, State)]),
+ ?debug("Module ~p\n", [State#state.module]),
+ ?debug("CArgs ~s\n", [erl_types:t_to_string(t_product(CArgs))]),
+ ?debug("ArgTypes ~s\n", [erl_types:t_to_string(t_product(ArgTypes))]),
+ ?debug("BifArgs ~p\n", [erl_types:t_to_string(t_product(BifArgs))]),
+
+ NewArgsSig = t_inf_lists(SigArgs, ArgTypes, Opaques),
+ ?debug("SigArgs ~s\n", [erl_types:t_to_string(t_product(SigArgs))]),
?debug("NewArgsSig: ~s\n", [erl_types:t_to_string(t_product(NewArgsSig))]),
+ NewArgsContract = t_inf_lists(CArgs, ArgTypes, Opaques),
?debug("NewArgsContract: ~s\n",
[erl_types:t_to_string(t_product(NewArgsContract))]),
+ NewArgsBif = t_inf_lists(BifArgs, ArgTypes, Opaques),
?debug("NewArgsBif: ~s\n", [erl_types:t_to_string(t_product(NewArgsBif))]),
- ?debug("NewArgTypes: ~s\n", [erl_types:t_to_string(t_product(NewArgTypes))]),
+ NewArgTypes0 = t_inf_lists(NewArgsSig, NewArgsContract),
+ NewArgTypes = t_inf_lists(NewArgTypes0, NewArgsBif, Opaques),
+ ?debug("NewArgTypes ~s\n", [erl_types:t_to_string(t_product(NewArgTypes))]),
+ ?debug("\n", []),
+
+ BifRet = BifRange(NewArgTypes),
+ ContrRet = CRange(NewArgTypes),
+ RetWithoutContr = t_inf(SigRange, BifRet),
+ RetWithoutLocal = t_inf(ContrRet, RetWithoutContr),
+
?debug("RetWithoutContr: ~s\n",[erl_types:t_to_string(RetWithoutContr)]),
?debug("RetWithoutLocal: ~s\n", [erl_types:t_to_string(RetWithoutLocal)]),
?debug("BifRet: ~s\n", [erl_types:t_to_string(BifRange(NewArgTypes))]),
- ?debug("ContrRet: ~s\n", [erl_types:t_to_string(CRange(TmpArgTypes))]),
- ?debug("SigRet: ~s\n", [erl_types:t_to_string(SigRange)]),
+ ?debug("SigRange: ~s\n", [erl_types:t_to_string(SigRange)]),
+ ?debug("ContrRet: ~s\n", [erl_types:t_to_string(CRange(NewArgTypes))]),
+ ?debug("LocalRet: ~s\n", [erl_types:t_to_string(LocalRet)]),
+
State1 =
case is_race_analysis_enabled(State) of
true ->
@@ -513,6 +508,9 @@ handle_apply_or_call([{TypeOfApply, {Fun, Sig, Contr, LocalRet}}|Left],
FailedConj = any_none([RetWithoutLocal|NewArgTypes]),
IsFailBif = t_is_none(BifRange(BifArgs)),
IsFailSig = t_is_none(SigRange),
+ ?debug("FailedConj: ~p~n", [FailedConj]),
+ ?debug("IsFailBif: ~p~n", [IsFailBif]),
+ ?debug("IsFailSig: ~p~n", [IsFailSig]),
State2 =
case FailedConj andalso not (IsFailBif orelse IsFailSig) of
true ->
@@ -532,14 +530,14 @@ handle_apply_or_call([{TypeOfApply, {Fun, Sig, Contr, LocalRet}}|Left],
false ->
FailedSig = any_none(NewArgsSig),
FailedContract =
- any_none([CRange(TmpArgsContract)|NewArgsContract]),
+ any_none([CRange(NewArgsContract)|NewArgsContract]),
FailedBif = any_none([BifRange(NewArgsBif)|NewArgsBif]),
InfSig = t_inf(t_fun(SigArgs, SigRange),
- t_fun(BifArgs, BifRange(BifArgs))),
+ t_fun(BifArgs, BifRange(BifArgs))),
FailReason =
apply_fail_reason(FailedSig, FailedBif, FailedContract),
Msg = get_apply_fail_msg(Fun, Args, ArgTypes, NewArgTypes, InfSig,
- Contr, CArgs, State1, FailReason),
+ Contr, CArgs, State1, FailReason, Opaques),
WarnType = case Msg of
{call, _} -> ?WARN_FAILING_CALL;
{apply, _} -> ?WARN_FAILING_CALL;
@@ -547,7 +545,8 @@ handle_apply_or_call([{TypeOfApply, {Fun, Sig, Contr, LocalRet}}|Left],
{call_without_opaque, _} -> ?WARN_OPAQUE;
{opaque_type_test, _} -> ?WARN_OPAQUE
end,
- state__add_warning(State1, WarnType, Tree, Msg)
+ Frc = {erlang, is_record, 3} =:= state__lookup_name(Fun, State),
+ state__add_warning(State1, WarnType, Tree, Msg, Frc)
end;
false -> State1
end,
@@ -571,16 +570,21 @@ handle_apply_or_call([{TypeOfApply, {Fun, Sig, Contr, LocalRet}}|Left],
TotalRet =
case t_is_none(LocalRet) andalso t_is_unit(RetWithoutLocal) of
true -> RetWithoutLocal;
- false -> t_inf(RetWithoutLocal, LocalRet, opaque)
+ false -> t_inf(RetWithoutLocal, LocalRet)
end,
NewAccRet = t_sup(AccRet, TotalRet),
?debug("NewAccRet: ~s\n", [t_to_string(NewAccRet)]),
handle_apply_or_call(Left, Args, ArgTypes, Map, Tree,
- State3, NewAccArgTypes, NewAccRet);
+ State3, NewAccArgTypes, NewAccRet, HadExternal);
handle_apply_or_call([], Args, _ArgTypes, Map, _Tree, State,
- AccArgTypes, AccRet) ->
- NewMap = enter_type_lists(Args, AccArgTypes, Map),
- {State, NewMap, AccRet}.
+ AccArgTypes, AccRet, HadExternal) ->
+ case HadExternal of
+ false ->
+ NewMap = enter_type_lists(Args, AccArgTypes, Map),
+ {State, NewMap, AccRet};
+ true ->
+ {had_external, State}
+ end.
apply_fail_reason(FailedSig, FailedBif, FailedContract) ->
if
@@ -590,7 +594,7 @@ apply_fail_reason(FailedSig, FailedBif, FailedContract) ->
end.
get_apply_fail_msg(Fun, Args, ArgTypes, NewArgTypes,
- Sig, Contract, ContrArgs, State, FailReason) ->
+ Sig, Contract, ContrArgs, State, FailReason, Opaques) ->
ArgStrings = format_args(Args, ArgTypes, State),
ContractInfo =
case Contract of
@@ -599,44 +603,52 @@ get_apply_fail_msg(Fun, Args, ArgTypes, NewArgTypes,
dialyzer_contracts:contract_to_string(C)};
none -> {false, none}
end,
- EnumArgTypes =
- case NewArgTypes of
- [] -> [];
- _ -> lists:zip(lists:seq(1, length(NewArgTypes)), NewArgTypes)
- end,
+ EnumArgTypes = lists:zip(lists:seq(1, length(NewArgTypes)), NewArgTypes),
ArgNs = [Arg || {Arg, Type} <- EnumArgTypes, t_is_none(Type)],
case state__lookup_name(Fun, State) of
- {M, F, _A} ->
- case is_opaque_type_test_problem(Fun, NewArgTypes, State) of
- true ->
- [Opaque] = NewArgTypes,
- {opaque_type_test, [atom_to_list(F), erl_types:t_to_string(Opaque)]};
- false ->
+ {M, F, A} ->
+ case is_opaque_type_test_problem(Fun, Args, NewArgTypes, State) of
+ {yes, Arg, ArgType} ->
+ {opaque_type_test, [atom_to_list(F), ArgStrings,
+ format_arg(Arg), format_type(ArgType, State)]};
+ no ->
SigArgs = t_fun_args(Sig),
- case is_opaque_related_problem(ArgNs, ArgTypes) of
- true -> %% an opaque term is used where a structured term is expected
- ExpectedArgs =
- case FailReason of
- only_sig -> SigArgs;
- _ -> ContrArgs
- end,
- {call_with_opaque, [M, F, ArgStrings, ArgNs, ExpectedArgs]};
- false ->
- case is_opaque_related_problem(ArgNs, SigArgs) orelse
- is_opaque_related_problem(ArgNs, ContrArgs) of
- true -> %% a structured term is used where an opaque is expected
- ExpectedTriples =
- case FailReason of
- only_sig -> expected_arg_triples(ArgNs, SigArgs, State);
- _ -> expected_arg_triples(ArgNs, ContrArgs, State)
- end,
- {call_without_opaque, [M, F, ArgStrings, ExpectedTriples]};
- false -> %% there is a structured term clash in some argument
- {call, [M, F, ArgStrings,
- ArgNs, FailReason,
- format_sig_args(Sig, State),
- format_type(t_fun_range(Sig), State),
- ContractInfo]}
+ BadOpaque =
+ opaque_problems([SigArgs, ContrArgs], ArgTypes, Opaques, ArgNs),
+ %% In fact *both* 'call_with_opaque' and
+ %% 'call_without_opaque' are possible.
+ case lists:keyfind(decl, 1, BadOpaque) of
+ {decl, BadArgs} ->
+ %% a structured term is used where an opaque is expected
+ ExpectedTriples =
+ case FailReason of
+ only_sig -> expected_arg_triples(BadArgs, SigArgs, State);
+ _ -> expected_arg_triples(BadArgs, ContrArgs, State)
+ end,
+ {call_without_opaque, [M, F, ArgStrings, ExpectedTriples]};
+ false ->
+ case lists:keyfind(use, 1, BadOpaque) of
+ {use, BadArgs} ->
+ %% an opaque term is used where a structured term is expected
+ ExpectedArgs =
+ case FailReason of
+ only_sig -> SigArgs;
+ _ -> ContrArgs
+ end,
+ {call_with_opaque, [M, F, ArgStrings, BadArgs, ExpectedArgs]};
+ false ->
+ case
+ erl_bif_types:opaque_args(M, F, A, ArgTypes, Opaques)
+ of
+ [] -> %% there is a structured term clash in some argument
+ {call, [M, F, ArgStrings,
+ ArgNs, FailReason,
+ format_sig_args(Sig, State),
+ format_type(t_fun_range(Sig), State),
+ ContractInfo]};
+ Ns ->
+ {call_with_opaque, [M, F, ArgStrings, Ns, ContrArgs]}
+ end
end
end
end;
@@ -648,31 +660,48 @@ get_apply_fail_msg(Fun, Args, ArgTypes, NewArgTypes,
ContractInfo]}
end.
-%% returns 'true' if we are running with opaque on (not checked yet),
-%% and there is either a contract or hard-coded type information with
-%% opaque types
-%% TODO: check that we are running with opaque types
-%% TODO: check the return type also
-prefer_opaque_types(CArgs, BifArgs) ->
- t_contains_opaque(t_product(CArgs))
- orelse t_contains_opaque(t_product(BifArgs)).
-
-is_opaque_related_problem(ArgNs, ArgTypes) ->
- Fun = fun (N) -> erl_types:t_contains_opaque(lists:nth(N, ArgTypes)) end,
- ArgNs =/= [] andalso lists:all(Fun, ArgNs).
-
-is_opaque_type_test_problem(Fun, ArgTypes, State) ->
+%% -> [{ElementI, [ArgN]}] where [ArgN] is a non-empty list of
+%% arguments containing unknown opaque types and Element is 1 or 2.
+opaque_problems(ContractOrSigList, ArgTypes, Opaques, ArgNs) ->
+ ArgElementList = find_unknown(ContractOrSigList, ArgTypes, Opaques, ArgNs),
+ F = fun(1) -> decl; (2) -> use end,
+ [{F(ElementI), lists:usort([ArgN || {ArgN, EI} <- ArgElementList,
+ EI =:= ElementI])} ||
+ ElementI <- lists:usort([EI || {_, EI} <- ArgElementList])].
+
+%% -> [{ArgN, ElementI}] where ElementI = 1 means there is an unknown
+%% opaque type in argument ArgN of the the contract/signature,
+%% and ElementI = 2 means that there is an unknown opaque type in
+%% argument ArgN of the the (current) argument types.
+find_unknown(ContractOrSigList, ArgTypes, Opaques, NoneArgNs) ->
+ ArgNs = lists:seq(1, length(ArgTypes)),
+ [{ArgN, ElementI} ||
+ ContractOrSig <- ContractOrSigList,
+ {E1, E2, ArgN} <- lists:zip3(ContractOrSig, ArgTypes, ArgNs),
+ lists:member(ArgN, NoneArgNs),
+ ElementI <- erl_types:t_find_unknown_opaque(E1, E2, Opaques)].
+
+is_opaque_type_test_problem(Fun, Args, ArgTypes, State) ->
case Fun of
{erlang, FN, 1} when FN =:= is_atom; FN =:= is_boolean;
FN =:= is_binary; FN =:= is_bitstring;
FN =:= is_float; FN =:= is_function;
FN =:= is_integer; FN =:= is_list;
FN =:= is_number; FN =:= is_pid; FN =:= is_port;
- FN =:= is_reference; FN =:= is_tuple ->
- [Type] = ArgTypes,
- erl_types:t_is_opaque(Type) andalso
- not lists:member(Type, State#state.opaques);
- _ -> false
+ FN =:= is_reference; FN =:= is_tuple;
+ FN =:= is_map ->
+ type_test_opaque_arg(Args, ArgTypes, State#state.opaques);
+ {erlang, FN, 2} when FN =:= is_function ->
+ type_test_opaque_arg(Args, ArgTypes, State#state.opaques);
+ _ -> no
+ end.
+
+type_test_opaque_arg([], [], _Opaques) ->
+ no;
+type_test_opaque_arg([Arg|Args], [ArgType|ArgTypes], Opaques) ->
+ case erl_types:t_has_opaque_subtype(ArgType, Opaques) of
+ true -> {yes, Arg, ArgType};
+ false -> type_test_opaque_arg(Args, ArgTypes, Opaques)
end.
expected_arg_triples(ArgNs, ArgTypes, State) ->
@@ -683,47 +712,56 @@ expected_arg_triples(ArgNs, ArgTypes, State) ->
add_bif_warnings({erlang, Op, 2}, [T1, T2] = Ts, Tree, State)
when Op =:= '=:='; Op =:= '==' ->
- Type1 = erl_types:t_unopaque(T1, State#state.opaques),
- Type2 = erl_types:t_unopaque(T2, State#state.opaques),
- Inf = t_inf(T1, T2),
- Inf1 = t_inf(Type1, Type2),
- case t_is_none(Inf) andalso t_is_none(Inf1) andalso(not any_none(Ts))
- andalso (not is_int_float_eq_comp(T1, Op, T2)) of
+ Opaques = State#state.opaques,
+ Inf = t_inf(T1, T2, Opaques),
+ case
+ t_is_none(Inf) andalso (not any_none(Ts))
+ andalso (not is_int_float_eq_comp(T1, Op, T2, Opaques))
+ of
true ->
- Args = case erl_types:t_is_opaque(T1) of
- true -> [format_type(T2, State), Op, format_type(T1, State)];
- false -> [format_type(T1, State), Op, format_type(T2, State)]
- end,
- case any_opaque(Ts) of
- true ->
- state__add_warning(State, ?WARN_OPAQUE, Tree, {opaque_eq, Args});
- false ->
- state__add_warning(State, ?WARN_MATCHING, Tree, {exact_eq, Args})
+ %% Give priority to opaque warning (as usual).
+ case erl_types:t_find_unknown_opaque(T1, T2, Opaques) of
+ [] ->
+ Args = comp_format_args([], T1, Op, T2, State),
+ state__add_warning(State, ?WARN_MATCHING, Tree, {exact_eq, Args});
+ Ns ->
+ Args = comp_format_args(Ns, T1, Op, T2, State),
+ state__add_warning(State, ?WARN_OPAQUE, Tree, {opaque_eq, Args})
end;
false ->
State
end;
add_bif_warnings({erlang, Op, 2}, [T1, T2] = Ts, Tree, State)
when Op =:= '=/='; Op =:= '/=' ->
- Inf = t_inf(T1, T2),
- case t_is_none(Inf) andalso (not any_none(Ts))
- andalso (not is_int_float_eq_comp(T1, Op, T2)) andalso any_opaque(Ts) of
+ Opaques = State#state.opaques,
+ case
+ (not any_none(Ts))
+ andalso (not is_int_float_eq_comp(T1, Op, T2, Opaques))
+ of
true ->
- Args = case erl_types:t_is_opaque(T1) of
- true -> [format_type(T2, State), Op, format_type(T1, State)];
- false -> [format_type(T1, State), Op, format_type(T2, State)]
- end,
- state__add_warning(State, ?WARN_OPAQUE, Tree, {opaque_neq, Args});
+ case erl_types:t_find_unknown_opaque(T1, T2, Opaques) of
+ [] -> State;
+ Ns ->
+ Args = comp_format_args(Ns, T1, Op, T2, State),
+ state__add_warning(State, ?WARN_OPAQUE, Tree, {opaque_neq, Args})
+ end;
false ->
State
end;
add_bif_warnings(_, _, _, State) ->
State.
-is_int_float_eq_comp(T1, Op, T2) ->
+is_int_float_eq_comp(T1, Op, T2, Opaques) ->
(Op =:= '==' orelse Op =:= '/=') andalso
- ((erl_types:t_is_float(T1) andalso erl_types:t_is_integer(T2)) orelse
- (erl_types:t_is_integer(T1) andalso erl_types:t_is_float(T2))).
+ ((erl_types:t_is_float(T1, Opaques)
+ andalso t_is_integer(T2, Opaques)) orelse
+ (t_is_integer(T1, Opaques)
+ andalso erl_types:t_is_float(T2, Opaques))).
+
+comp_format_args([1|_], T1, Op, T2, State) ->
+ [format_type(T2, State), Op, format_type(T1, State)];
+comp_format_args(_, T1, Op, T2, State) ->
+ [format_type(T1, State), Op, format_type(T2, State)].
%%----------------------------------------
@@ -784,16 +822,27 @@ handle_bitstr(Tree, Map, State) ->
{State3, Map2, t_none()};
false ->
UnitVal = cerl:concrete(cerl:bitstr_unit(Tree)),
- Type =
- case t_number_vals(SizeType) of
- [OneSize] -> t_bitstr(0, OneSize * UnitVal);
- _ ->
- MinSize = erl_types:number_min(SizeType),
- t_bitstr(UnitVal, UnitVal * MinSize)
- end,
+ Opaques = State2#state.opaques,
+ NumberVals = t_number_vals(SizeType, Opaques),
+ {State3, Type} =
+ case t_contains_opaque(SizeType, Opaques) of
+ true ->
+ Msg = {opaque_size, [format_type(SizeType, State2),
+ format_cerl(Size)]},
+ {state__add_warning(State2, ?WARN_OPAQUE, Size, Msg),
+ t_none()};
+ false ->
+ case NumberVals of
+ [OneSize] -> {State2, t_bitstr(0, OneSize * UnitVal)};
+ unknown -> {State2, t_bitstr()};
+ _ ->
+ MinSize = erl_types:number_min(SizeType, Opaques),
+ {State2, t_bitstr(UnitVal, UnitVal * MinSize)}
+ end
+ end,
Map3 = enter_type_lists([Val, Size, Tree],
[ValType, SizeType, Type], Map2),
- {State2, Map3, Type}
+ {State3, Map3, Type}
end
end.
@@ -805,34 +854,47 @@ handle_call(Tree, Map, State) ->
Args = cerl:call_args(Tree),
MFAList = [M, F|Args],
{State1, Map1, [MType0, FType0|As]} = traverse_list(MFAList, Map, State),
- %% Module and function names should be treated as *structured terms*
- %% even if they happen to be identical to an atom (or tuple) which
- %% is also involved in the definition of an opaque data type.
- MType = t_inf(t_module(), t_unopaque(MType0)),
- FType = t_inf(t_atom(), t_unopaque(FType0)),
+ Opaques = State#state.opaques,
+ MType = t_inf(t_module(), MType0, Opaques),
+ FType = t_inf(t_atom(), FType0, Opaques),
Map2 = enter_type_lists([M, F], [MType, FType], Map1),
+ MOpaque = t_is_none(MType) andalso (not t_is_none(MType0)),
+ FOpaque = t_is_none(FType) andalso (not t_is_none(FType0)),
case any_none([MType, FType|As]) of
true ->
State2 =
- case t_is_none(MType) andalso (not t_is_none(MType0)) of
- true -> % This is a problem we just detected; not a known one
- MS = format_cerl(M),
- Msg = {app_call, [MS, format_cerl(F),
- format_args(Args, As, State1),
- MS, format_type(t_module(), State1),
- format_type(MType0, State1)]},
- state__add_warning(State1, ?WARN_FAILING_CALL, Tree, Msg);
- false ->
- case t_is_none(FType) andalso (not t_is_none(FType0)) of
- true ->
- FS = format_cerl(F),
- Msg = {app_call, [format_cerl(M), FS,
- format_args(Args, As, State1),
- FS, format_type(t_atom(), State1),
- format_type(FType0, State1)]},
- state__add_warning(State1, ?WARN_FAILING_CALL, Tree, Msg);
- false -> State1
- end
+ if
+ MOpaque -> % This is a problem we just detected; not a known one
+ MS = format_cerl(M),
+ case t_is_none(t_inf(t_module(), MType0)) of
+ true ->
+ Msg = {app_call, [MS, format_cerl(F),
+ format_args(Args, As, State1),
+ MS, format_type(t_module(), State1),
+ format_type(MType0, State1)]},
+ state__add_warning(State1, ?WARN_FAILING_CALL, Tree, Msg);
+ false ->
+ Msg = {opaque_call, [MS, format_cerl(F),
+ format_args(Args, As, State1),
+ MS, format_type(MType0, State1)]},
+ state__add_warning(State1, ?WARN_FAILING_CALL, Tree, Msg)
+ end;
+ FOpaque ->
+ FS = format_cerl(F),
+ case t_is_none(t_inf(t_atom(), FType0)) of
+ true ->
+ Msg = {app_call, [format_cerl(M), FS,
+ format_args(Args, As, State1),
+ FS, format_type(t_atom(), State1),
+ format_type(FType0, State1)]},
+ state__add_warning(State1, ?WARN_FAILING_CALL, Tree, Msg);
+ false ->
+ Msg = {opaque_call, [format_cerl(M), FS,
+ format_args(Args, As, State1),
+ FS, format_type(FType0, State1)]},
+ state__add_warning(State1, ?WARN_FAILING_CALL, Tree, Msg)
+ end;
+ true -> State1
end,
{State2, Map2, t_none()};
false ->
@@ -874,7 +936,7 @@ handle_case(Tree, Map, State) ->
handle_clauses(Clauses, Arg, ArgType, ArgType, State2,
[], Map2, [], []),
Map3 = join_maps_end(MapList, Map2),
- debug_pp_map(Map2),
+ debug_pp_map(Map3),
{State3, Map3, Type}
end.
@@ -886,7 +948,7 @@ handle_cons(Tree, Map, State) ->
{State1, Map1, HdType} = traverse(Hd, Map, State),
{State2, Map2, TlType} = traverse(Tl, Map1, State1),
State3 =
- case t_is_none(t_inf(TlType, t_list())) of
+ case t_is_none(t_inf(TlType, t_list(), State2#state.opaques)) of
true ->
Msg = {improper_list_constr, [format_type(TlType, State2)]},
state__add_warning(State2, ?WARN_NON_PROPER_LIST, Tree, Msg);
@@ -979,8 +1041,9 @@ handle_receive(Tree, Map, State) ->
[], []),
Map1 = join_maps(MapList, Map),
{State3, Map2, TimeoutType} = traverse(Timeout, Map1, State2),
- case (t_is_atom(TimeoutType) andalso
- (t_atom_vals(TimeoutType) =:= ['infinity'])) of
+ Opaques = State3#state.opaques,
+ case (t_is_atom(TimeoutType, Opaques) andalso
+ (t_atom_vals(TimeoutType, Opaques) =:= ['infinity'])) of
true ->
{State3, Map2, ReceiveType};
false ->
@@ -1023,6 +1086,19 @@ handle_try(Tree, Map, State) ->
%%----------------------------------------
+handle_map(Tree,Map,State) ->
+ Pairs = cerl:map_es(Tree),
+ {State1, Map1, TypePairs} = traverse_list(Pairs,Map,State),
+ {State1, Map1, t_map(TypePairs)}.
+
+handle_map_pair(Tree,Map,State) ->
+ Key = cerl:map_pair_key(Tree),
+ Val = cerl:map_pair_val(Tree),
+ {State1, Map1, [K,V]} = traverse_list([Key,Val],Map,State),
+ {State1, Map1, {K,V}}.
+
+%%----------------------------------------
+
handle_tuple(Tree, Map, State) ->
Elements = cerl:tuple_es(Tree),
{State1, Map1, EsType} = traverse_list(Elements, Map, State),
@@ -1031,55 +1107,46 @@ handle_tuple(Tree, Map, State) ->
true ->
{State1, Map1, t_none()};
false ->
- %% Let's find out if this is a record or opaque construction.
+ %% Let's find out if this is a record
case Elements of
[Tag|Left] ->
case cerl:is_c_atom(Tag) of
true ->
TagVal = cerl:atom_val(Tag),
- case t_opaque_match_record(TupleType, State1#state.opaques) of
- [Opaque] ->
- RecStruct = t_opaque_matching_structure(TupleType, Opaque),
- RecFields = t_tuple_args(RecStruct),
- case bind_pat_vars(Elements, RecFields, [], Map1, State1) of
- {error, _, ErrorPat, ErrorType, _} ->
- Msg = {record_constr,
- [TagVal, format_patterns(ErrorPat),
- format_type(ErrorType, State1)]},
- State2 = state__add_warning(State1, ?WARN_MATCHING,
- Tree, Msg),
- {State2, Map1, t_none()};
- {Map2, _ETypes} ->
- {State1, Map2, Opaque}
- end;
- _ ->
- case state__lookup_record(TagVal, length(Left), State1) of
- error -> {State1, Map1, TupleType};
- {ok, RecType} ->
- InfTupleType = t_inf(RecType, TupleType),
- case t_is_none(InfTupleType) of
- true ->
- RecC = format_type(TupleType, State1),
- FieldDiffs = format_field_diffs(TupleType, State1),
- Msg = {record_constr, [RecC, FieldDiffs]},
- State2 = state__add_warning(State1, ?WARN_MATCHING,
- Tree, Msg),
- {State2, Map1, t_none()};
- false ->
- case bind_pat_vars(Elements, t_tuple_args(RecType),
- [], Map1, State1) of
- {error, bind, ErrorPat, ErrorType, _} ->
- Msg = {record_constr,
- [TagVal, format_patterns(ErrorPat),
- format_type(ErrorType, State1)]},
- State2 = state__add_warning(State1, ?WARN_MATCHING,
- Tree, Msg),
- {State2, Map1, t_none()};
- {Map2, ETypes} ->
- {State1, Map2, t_tuple(ETypes)}
- end
- end
- end
+ case state__lookup_record(TagVal, length(Left), State1) of
+ error -> {State1, Map1, TupleType};
+ {ok, RecType} ->
+ InfTupleType = t_inf(RecType, TupleType),
+ case t_is_none(InfTupleType) of
+ true ->
+ RecC = format_type(TupleType, State1),
+ FieldDiffs = format_field_diffs(TupleType, State1),
+ Msg = {record_constr, [RecC, FieldDiffs]},
+ State2 = state__add_warning(State1, ?WARN_MATCHING,
+ Tree, Msg),
+ {State2, Map1, t_none()};
+ false ->
+ case bind_pat_vars(Elements, t_tuple_args(RecType),
+ [], Map1, State1) of
+ {error, bind, ErrorPat, ErrorType, _} ->
+ Msg = {record_constr,
+ [TagVal, format_patterns(ErrorPat),
+ format_type(ErrorType, State1)]},
+ State2 = state__add_warning(State1, ?WARN_MATCHING,
+ Tree, Msg),
+ {State2, Map1, t_none()};
+ {error, opaque, ErrorPat, ErrorType, OpaqueType} ->
+ Msg = {opaque_match,
+ [format_patterns(ErrorPat),
+ format_type(ErrorType, State1),
+ format_type(OpaqueType, State1)]},
+ State2 = state__add_warning(State1, ?WARN_OPAQUE,
+ Tree, Msg),
+ {State2, Map1, t_none()};
+ {Map2, ETypes} ->
+ {State1, Map2, t_tuple(ETypes)}
+ end
+ end
end;
false ->
{State1, Map1, t_tuple(EsType)}
@@ -1356,7 +1423,9 @@ bind_pat_vars_reverse(Pats, Types, Acc, Map, State) ->
end.
bind_pat_vars([Pat|PatLeft], [Type|TypeLeft], Acc, Map, State, Rev) ->
- ?debug("Binding pat: ~w to ~s\n", [cerl:type(Pat), format_type(Type, State)]),
+ ?debug("Binding pat: ~w to ~s\n", [cerl:type(Pat), format_type(Type, State)]
+),
+ Opaques = State#state.opaques,
{NewMap, TypeOut} =
case cerl:type(Pat) of
alias ->
@@ -1372,9 +1441,15 @@ bind_pat_vars([Pat|PatLeft], [Type|TypeLeft], Acc, Map, State, Rev) ->
case Rev of
true -> {Map, t_bitstr()};
false ->
- BinType = t_inf(t_bitstr(), Type),
+ BinType = t_inf(t_bitstr(), Type, Opaques),
case t_is_none(BinType) of
- true -> bind_error([Pat], Type, t_none(), bind);
+ true ->
+ case t_find_opaque_mismatch(t_bitstr(), Type) of
+ {ok, T1, T2} ->
+ bind_error([Pat], T1, T2, opaque);
+ error ->
+ bind_error([Pat], Type, t_none(), bind)
+ end;
false ->
Segs = cerl:binary_segments(Pat),
{Map1, SegTypes} = bind_bin_segs(Segs, BinType, Map, State),
@@ -1382,29 +1457,27 @@ bind_pat_vars([Pat|PatLeft], [Type|TypeLeft], Acc, Map, State, Rev) ->
end
end;
cons ->
- Cons = t_inf(Type, t_cons()),
+ Cons = t_inf(Type, t_cons(), Opaques),
case t_is_none(Cons) of
true ->
bind_opaque_pats(t_cons(), Type, Pat, Map, State, Rev);
false ->
{Map1, [HdType, TlType]} =
bind_pat_vars([cerl:cons_hd(Pat), cerl:cons_tl(Pat)],
- [t_cons_hd(Cons), t_cons_tl(Cons)],
+ [t_cons_hd(Cons, Opaques),
+ t_cons_tl(Cons, Opaques)],
[], Map, State, Rev),
{Map1, t_cons(HdType, TlType)}
end;
literal ->
Literal = literal_type(Pat),
- LiteralOrOpaque =
- case t_opaque_match_atom(Literal, State#state.opaques) of
- [Opaque] -> Opaque;
- _ -> Literal
- end,
- case t_is_none(t_inf(LiteralOrOpaque, Type)) of
+ case t_is_none(t_inf(Literal, Type, Opaques)) of
true ->
bind_opaque_pats(Literal, Type, Pat, Map, State, Rev);
- false -> {Map, LiteralOrOpaque}
+ false -> {Map, Literal}
end;
+ map ->
+ {Map, t_map([])};
tuple ->
Es = cerl:tuple_es(Pat),
{TypedRecord, Prototype} =
@@ -1419,27 +1492,28 @@ bind_pat_vars([Pat|PatLeft], [Type|TypeLeft], Acc, Map, State, Rev) ->
{ok, Record} ->
[_Head|AnyTail] = [t_any() || _ <- Es],
UntypedRecord = t_tuple([t_atom(TagAtom)|AnyTail]),
- {not erl_types:t_is_equal(Record, UntypedRecord), Record}
+ {not t_is_equal(Record, UntypedRecord), Record}
end;
false -> {false, t_tuple(length(Es))}
end
end,
- Tuple = t_inf(Prototype, Type),
+ Tuple = t_inf(Prototype, Type, Opaques),
case t_is_none(Tuple) of
true ->
bind_opaque_pats(Prototype, Type, Pat, Map, State, Rev);
false ->
- SubTuples = t_tuple_subtypes(Tuple),
+ SubTuples = t_tuple_subtypes(Tuple, Opaques),
%% Need to call the top function to get the try-catch wrapper
MapJ = join_maps_begin(Map),
Results =
case Rev of
true ->
- [bind_pat_vars_reverse(Es, t_tuple_args(SubTuple), [],
- MapJ, State)
+ [bind_pat_vars_reverse(Es, t_tuple_args(SubTuple, Opaques),
+ [], MapJ, State)
|| SubTuple <- SubTuples];
false ->
- [bind_pat_vars(Es, t_tuple_args(SubTuple), [], MapJ, State)
+ [bind_pat_vars(Es, t_tuple_args(SubTuple, Opaques), [],
+ MapJ, State)
|| SubTuple <- SubTuples]
end,
case lists:keyfind(opaque, 2, Results) of
@@ -1466,37 +1540,14 @@ bind_pat_vars([Pat|PatLeft], [Type|TypeLeft], Acc, Map, State, Rev) ->
bind_pat_vars(Es, t_to_tlist(Type), [], Map, State, Rev),
{Map1, t_product(EsTypes)};
var ->
- Opaques = State#state.opaques,
VarType1 =
case state__lookup_type_for_letrec(Pat, State) of
- error ->
- LType = lookup_type(Pat, Map),
- case t_opaque_match_record(LType, Opaques) of
- [Opaque] -> Opaque;
- _ ->
- case t_opaque_match_atom(LType, Opaques) of
- [Opaque] -> Opaque;
- _ -> LType
- end
- end;
+ error -> lookup_type(Pat, Map);
{ok, RecType} -> RecType
end,
%% Must do inf when binding args to pats. Vars in pats are fresh.
- VarType2 = t_inf(VarType1, Type),
- VarType3 =
- case Opaques =/= [] of
- true ->
- case t_opaque_match_record(VarType2, Opaques) of
- [OpaqueRec] -> OpaqueRec;
- _ ->
- case t_opaque_match_atom(VarType2, Opaques) of
- [OpaqueAtom] -> OpaqueAtom;
- _ -> VarType2
- end
- end;
- false -> VarType2
- end,
- case t_is_none(VarType3) of
+ VarType2 = t_inf(VarType1, Type, Opaques),
+ case t_is_none(VarType2) of
true ->
case t_find_opaque_mismatch(VarType1, Type) of
{ok, T1, T2} ->
@@ -1505,8 +1556,8 @@ bind_pat_vars([Pat|PatLeft], [Type|TypeLeft], Acc, Map, State, Rev) ->
bind_error([Pat], Type, t_none(), bind)
end;
false ->
- Map1 = enter_type(Pat, VarType3, Map),
- {Map1, VarType3}
+ Map1 = enter_type(Pat, VarType2, Map),
+ {Map1, VarType2}
end;
_Other ->
%% Catch all is needed when binding args to pats
@@ -1529,7 +1580,8 @@ bind_bin_segs([Seg|Segs], BinType, Acc, Map, State) ->
binary = SegType, [] = Segs, %% just an assert
T = t_inf(t_bitstr(UnitVal, 0), BinType),
{Map1, [Type]} = bind_pat_vars([Val], [T], [], Map, State, false),
- bind_bin_segs(Segs, t_bitstr(0, 0), [Type|Acc], Map1, State);
+ Type1 = remove_local_opaque_types(Type, State#state.opaques),
+ bind_bin_segs(Segs, t_bitstr(0, 0), [Type1|Acc], Map1, State);
utf -> % XXX: possibly can be strengthened
true = lists:member(SegType, [utf8, utf16, utf32]),
{Map1, [_]} = bind_pat_vars([Val], [t_integer()], [], Map, State, false),
@@ -1539,11 +1591,17 @@ bind_bin_segs([Seg|Segs], BinType, Acc, Map, State) ->
Size = cerl:bitstr_size(Seg),
{Map1, [SizeType]} =
bind_pat_vars([Size], [t_non_neg_integer()], [], Map, State, false),
+ Opaques = State#state.opaques,
+ NumberVals = t_number_vals(SizeType, Opaques),
+ case t_contains_opaque(SizeType, Opaques) of
+ true -> bind_error([Seg], SizeType, t_none(), opaque);
+ false -> ok
+ end,
Type =
- case t_number_vals(SizeType) of
+ case NumberVals of
[OneSize] -> t_bitstr(0, UnitVal * OneSize);
- _ ->
- MinSize = erl_types:number_min(SizeType),
+ _ -> % 'unknown' too
+ MinSize = erl_types:number_min(SizeType, Opaques),
t_bitstr(UnitVal, UnitVal * MinSize)
end,
ValConstr =
@@ -1551,7 +1609,7 @@ bind_bin_segs([Seg|Segs], BinType, Acc, Map, State) ->
binary -> Type; %% The same constraints as for the whole bitstr
float -> t_float();
integer ->
- case t_number_vals(SizeType) of
+ case NumberVals of
unknown -> t_integer();
List ->
SizeVal = lists:max(List),
@@ -1579,7 +1637,7 @@ bind_error(Pats, Type, OpaqueType, Error) ->
bind_opaque_pats(GenType, Type, Pat, Map, State, Rev) ->
case t_find_opaque_mismatch(GenType, Type) of
{ok, T1, T2} ->
- case lists:member(T2, State#state.opaques) of
+ case erl_types:is_opaque_type(T2, State#state.opaques) of
true ->
NewType = erl_types:t_struct_from_opaque(Type, [T2]),
{Map1, _} =
@@ -1630,6 +1688,8 @@ bind_guard(Guard, Map, Env, Eval, State) ->
Es0 = cerl:tuple_es(Guard),
{Map1, Es} = bind_guard_list(Es0, Map, Env, dont_know, State),
{Map1, t_tuple(Es)};
+ map ->
+ {Map, t_map([])};
'let' ->
Arg = cerl:let_arg(Guard),
[Var] = cerl:let_vars(Guard),
@@ -1700,19 +1760,9 @@ handle_guard_call(Guard, Map, Env, Eval, State) ->
handle_guard_gen_fun({M, F, A}, Guard, Map, Env, Eval, State) ->
Args = cerl:call_args(Guard),
- {Map1, As0} = bind_guard_list(Args, Map, Env, dont_know, State),
- MapFun = fun(Type) ->
- case lists:member(Type, State#state.opaques) of
- true -> erl_types:t_opaque_structure(Type);
- false -> Type
- end
- end,
- As = lists:map(MapFun, As0),
- Mode = case As =:= As0 of
- true -> structured;
- false -> opaque
- end,
- BifRet = erl_bif_types:type(M, F, A, As),
+ {Map1, As} = bind_guard_list(Args, Map, Env, dont_know, State),
+ Opaques = State#state.opaques,
+ BifRet = erl_bif_types:type(M, F, A, As, Opaques),
case t_is_none(BifRet) of
true ->
%% Is this an error-bif?
@@ -1721,11 +1771,8 @@ handle_guard_gen_fun({M, F, A}, Guard, Map, Env, Eval, State) ->
false -> signal_guard_fatal_fail(Eval, Guard, As, State)
end;
false ->
- BifArgs = case erl_bif_types:arg_types(M, F, A) of
- unknown -> lists:duplicate(A, t_any());
- List -> List
- end,
- Map2 = enter_type_lists(Args, t_inf_lists(BifArgs, As0, Mode), Map1),
+ BifArgs = bif_args(M, F, A),
+ Map2 = enter_type_lists(Args, t_inf_lists(BifArgs, As, Opaques), Map1),
Ret =
case Eval of
pos -> t_inf(t_atom(true), BifRet);
@@ -1771,29 +1818,19 @@ bind_type_test(Eval, TypeTest, ArgType, State) ->
is_reference -> t_reference();
is_tuple -> t_tuple()
end,
- Mode = determine_mode(ArgType, State#state.opaques),
case Eval of
pos ->
- Inf = t_inf(Type, ArgType, Mode),
+ Inf = t_inf(Type, ArgType, State#state.opaques),
case t_is_none(Inf) of
true -> error;
false -> {ok, Inf, t_atom(true)}
end;
neg ->
- case Mode of
- opaque ->
- Struct = erl_types:t_opaque_structure(ArgType),
- case t_is_none(t_subtract(Struct, Type)) of
- true -> error;
- false -> {ok, ArgType, t_atom(false)}
- end;
- structured ->
- Sub = t_subtract(ArgType, Type),
- case t_is_none(Sub) of
- true -> error;
- false -> {ok, Sub, t_atom(false)}
- end
- end;
+ Sub = t_subtract(ArgType, Type),
+ case t_is_none(Sub) of
+ true -> error;
+ false -> {ok, Sub, t_atom(false)}
+ end;
dont_know ->
{ok, ArgType, t_boolean()}
end.
@@ -1802,9 +1839,10 @@ handle_guard_comp(Guard, Comp, Map, Env, Eval, State) ->
Args = cerl:call_args(Guard),
[Arg1, Arg2] = Args,
{Map1, ArgTypes} = bind_guard_list(Args, Map, Env, dont_know, State),
+ Opaques = State#state.opaques,
[Type1, Type2] = ArgTypes,
- IsInt1 = t_is_integer(Type1),
- IsInt2 = t_is_integer(Type2),
+ IsInt1 = t_is_integer(Type1, Opaques),
+ IsInt2 = t_is_integer(Type2, Opaques),
case {cerl:type(Arg1), cerl:type(Arg2)} of
{literal, literal} ->
case erlang:Comp(cerl:concrete(Arg1), cerl:concrete(Arg2)) of
@@ -1817,12 +1855,13 @@ handle_guard_comp(Guard, Comp, Map, Env, Eval, State) ->
false when Eval =:= neg -> {Map, t_atom(false)}
end;
{literal, var} when IsInt1 andalso IsInt2 andalso (Eval =:= pos) ->
- case bind_comp_literal_var(Arg1, Arg2, Type2, Comp, Map1) of
+ case bind_comp_literal_var(Arg1, Arg2, Type2, Comp, Map1, Opaques) of
error -> signal_guard_fail(Eval, Guard, ArgTypes, State);
{ok, NewMap} -> {NewMap, t_atom(true)}
end;
{var, literal} when IsInt1 andalso IsInt2 andalso (Eval =:= pos) ->
- case bind_comp_literal_var(Arg2, Arg1, Type1, invert_comp(Comp), Map1) of
+ case bind_comp_literal_var(Arg2, Arg1, Type1, invert_comp(Comp),
+ Map1, Opaques) of
error -> signal_guard_fail(Eval, Guard, ArgTypes, State);
{ok, NewMap} -> {NewMap, t_atom(true)}
end;
@@ -1835,10 +1874,10 @@ invert_comp('<') -> '>';
invert_comp('>=') -> '=<';
invert_comp('>') -> '<'.
-bind_comp_literal_var(Lit, Var, VarType, CompOp, Map) ->
+bind_comp_literal_var(Lit, Var, VarType, CompOp, Map, Opaques) ->
LitVal = cerl:concrete(Lit),
NewVarType =
- case t_number_vals(VarType) of
+ case t_number_vals(VarType, Opaques) of
unknown ->
Range =
case CompOp of
@@ -1847,7 +1886,7 @@ bind_comp_literal_var(Lit, Var, VarType, CompOp, Map) ->
'>=' -> t_from_range(neg_inf, LitVal);
'>' -> t_from_range(neg_inf, LitVal - 1)
end,
- t_inf(Range, VarType);
+ t_inf(Range, VarType, Opaques);
NumberVals ->
NewNumberVals = [X || X <- NumberVals, erlang:CompOp(LitVal, X)],
t_integers(NewNumberVals)
@@ -1861,17 +1900,18 @@ handle_guard_is_function(Guard, Map, Env, Eval, State) ->
Args = cerl:call_args(Guard),
{Map1, ArgTypes0} = bind_guard_list(Args, Map, Env, dont_know, State),
[FunType0, ArityType0] = ArgTypes0,
- ArityType = t_inf(ArityType0, t_integer()),
+ Opaques = State#state.opaques,
+ ArityType = t_inf(ArityType0, t_integer(), Opaques),
case t_is_none(ArityType) of
true -> signal_guard_fail(Eval, Guard, ArgTypes0, State);
false ->
FunTypeConstr =
- case t_number_vals(ArityType) of
+ case t_number_vals(ArityType, State#state.opaques) of
unknown -> t_fun();
Vals ->
t_sup([t_fun(lists:duplicate(X, t_any()), t_any()) || X <- Vals])
end,
- FunType = t_inf(FunType0, FunTypeConstr),
+ FunType = t_inf(FunType0, FunTypeConstr, Opaques),
case t_is_none(FunType) of
true ->
case Eval of
@@ -1896,33 +1936,45 @@ handle_guard_is_record(Guard, Map, Env, Eval, State) ->
Arity = cerl:int_val(Arity0),
{Map1, RecType} = bind_guard(Rec, Map, Env, dont_know, State),
ArityMin1 = Arity - 1,
- TupleType =
- case state__lookup_record(Tag, ArityMin1, State) of
- error -> t_tuple([t_atom(Tag)|lists:duplicate(ArityMin1, t_any())]);
- {ok, Prototype} -> Prototype
- end,
- Mode = determine_mode(RecType, State#state.opaques),
- NewTupleType =
- case t_opaque_match_record(TupleType, State#state.opaques) of
- [Opaque] -> Opaque;
- _ -> TupleType
- end,
- Type = t_inf(NewTupleType, RecType, Mode),
- case t_is_none(Type) of
+ Opaques = State#state.opaques,
+ Tuple = t_tuple([t_atom(Tag)|lists:duplicate(ArityMin1, t_any())]),
+ case t_is_none(t_inf(Tuple, RecType, Opaques)) of
true ->
- case Eval of
- pos -> signal_guard_fail(Eval, Guard,
- [RecType, t_from_term(Tag),
- t_from_term(Arity)],
- State);
- neg -> {Map1, t_atom(false)};
- dont_know -> {Map1, t_atom(false)}
+ case erl_types:t_has_opaque_subtype(RecType, Opaques) of
+ true ->
+ signal_guard_fail(Eval, Guard,
+ [RecType, t_from_term(Tag),
+ t_from_term(Arity)],
+ State);
+ false ->
+ case Eval of
+ pos -> signal_guard_fail(Eval, Guard,
+ [RecType, t_from_term(Tag),
+ t_from_term(Arity)],
+ State);
+ neg -> {Map1, t_atom(false)};
+ dont_know -> {Map1, t_atom(false)}
+ end
end;
false ->
- case Eval of
- pos -> {enter_type(Rec, Type, Map1), t_atom(true)};
- neg -> {Map1, t_atom(false)};
- dont_know -> {Map1, t_boolean()}
+ TupleType =
+ case state__lookup_record(Tag, ArityMin1, State) of
+ error -> Tuple;
+ {ok, Prototype} -> Prototype
+ end,
+ Type = t_inf(TupleType, RecType, State#state.opaques),
+ case t_is_none(Type) of
+ true ->
+ %% No special handling of opaque errors.
+ FArgs = "record " ++ format_type(RecType, State),
+ Msg = {record_matching, [FArgs, Tag]},
+ throw({fail, {Guard, Msg}});
+ false ->
+ case Eval of
+ pos -> {enter_type(Rec, Type, Map1), t_atom(true)};
+ neg -> {Map1, t_atom(false)};
+ dont_know -> {Map1, t_boolean()}
+ end
end
end.
@@ -1975,14 +2027,24 @@ handle_guard_eq(Guard, Map, Env, Eval, State) ->
bind_eq_guard(Guard, Arg1, Arg2, Map, Env, Eval, State) ->
{Map1, Type1} = bind_guard(Arg1, Map, Env, dont_know, State),
{Map2, Type2} = bind_guard(Arg2, Map1, Env, dont_know, State),
- case (t_is_nil(Type1) orelse t_is_nil(Type2) orelse
- t_is_atom(Type1) orelse t_is_atom(Type2)) of
+ Opaques = State#state.opaques,
+ case
+ t_is_nil(Type1, Opaques) orelse t_is_nil(Type2, Opaques)
+ orelse t_is_atom(Type1, Opaques) orelse t_is_atom(Type2, Opaques)
+ of
true -> bind_eqeq_guard(Guard, Arg1, Arg2, Map, Env, Eval, State);
false ->
- case Eval of
- pos -> {Map2, t_atom(true)};
- neg -> {Map2, t_atom(false)};
- dont_know -> {Map2, t_boolean()}
+ %% XXX. Is this test OK?
+ OpArgs = erl_types:t_find_unknown_opaque(Type1, Type2, Opaques),
+ case OpArgs =:= [] of
+ true ->
+ case Eval of
+ pos -> {Map2, t_atom(true)};
+ neg -> {Map2, t_atom(false)};
+ dont_know -> {Map2, t_boolean()}
+ end;
+ false ->
+ signal_guard_fail(Eval, Guard, [Type1, Type2], State)
end
end.
@@ -2021,44 +2083,52 @@ bind_eqeq_guard(Guard, Arg1, Arg2, Map, Env, Eval, State) ->
{Map2, Type2} = bind_guard(Arg2, Map1, Env, dont_know, State),
?debug("Types are:~s =:= ~s\n", [t_to_string(Type1),
t_to_string(Type2)]),
- Inf = t_inf(Type1, Type2),
+ Opaques = State#state.opaques,
+ Inf = t_inf(Type1, Type2, Opaques),
case t_is_none(Inf) of
true ->
- case Eval of
- neg -> {Map2, t_atom(false)};
- dont_know -> {Map2, t_atom(false)};
- pos -> signal_guard_fail(Eval, Guard, [Type1, Type2], State)
+ OpArgs = erl_types:t_find_unknown_opaque(Type1, Type2, Opaques),
+ case OpArgs =:= [] of
+ true ->
+ case Eval of
+ neg -> {Map2, t_atom(false)};
+ dont_know -> {Map2, t_atom(false)};
+ pos -> signal_guard_fail(Eval, Guard, [Type1, Type2], State)
+ end;
+ false ->
+ signal_guard_fail(Eval, Guard, [Type1, Type2], State)
end;
false ->
case Eval of
- pos ->
- case {cerl:type(Arg1), cerl:type(Arg2)} of
- {var, var} ->
- Map3 = enter_subst(Arg1, Arg2, Map2),
- Map4 = enter_type(Arg2, Inf, Map3),
- {Map4, t_atom(true)};
- {var, _} ->
- Map3 = enter_type(Arg1, Inf, Map2),
- {Map3, t_atom(true)};
- {_, var} ->
- Map3 = enter_type(Arg2, Inf, Map2),
- {Map3, t_atom(true)};
- {_, _} ->
- {Map2, t_atom(true)}
- end;
- neg ->
- {Map2, t_atom(false)};
- dont_know ->
- {Map2, t_boolean()}
+ pos ->
+ case {cerl:type(Arg1), cerl:type(Arg2)} of
+ {var, var} ->
+ Map3 = enter_subst(Arg1, Arg2, Map2),
+ Map4 = enter_type(Arg2, Inf, Map3),
+ {Map4, t_atom(true)};
+ {var, _} ->
+ Map3 = enter_type(Arg1, Inf, Map2),
+ {Map3, t_atom(true)};
+ {_, var} ->
+ Map3 = enter_type(Arg2, Inf, Map2),
+ {Map3, t_atom(true)};
+ {_, _} ->
+ {Map2, t_atom(true)}
+ end;
+ neg ->
+ {Map2, t_atom(false)};
+ dont_know ->
+ {Map2, t_boolean()}
end
end.
bind_eqeq_guard_lit_other(Guard, Arg1, Arg2, Map, Env, State) ->
Eval = dont_know,
+ Opaques = State#state.opaques,
case cerl:concrete(Arg1) of
true ->
{_, Type} = MT = bind_guard(Arg2, Map, Env, pos, State),
- case t_is_atom(true, Type) of
+ case t_is_any_atom(true, Type, Opaques) of
true -> MT;
false ->
{_, Type0} = bind_guard(Arg2, Map, Env, Eval, State),
@@ -2066,7 +2136,7 @@ bind_eqeq_guard_lit_other(Guard, Arg1, Arg2, Map, Env, State) ->
end;
false ->
{Map1, Type} = bind_guard(Arg2, Map, Env, neg, State),
- case t_is_atom(false, Type) of
+ case t_is_any_atom(false, Type, Opaques) of
true -> {Map1, t_atom(true)};
false ->
{_, Type0} = bind_guard(Arg2, Map, Env, Eval, State),
@@ -2087,14 +2157,15 @@ bind_eqeq_guard_lit_other(Guard, Arg1, Arg2, Map, Env, State) ->
handle_guard_and(Guard, Map, Env, Eval, State) ->
[Arg1, Arg2] = cerl:call_args(Guard),
+ Opaques = State#state.opaques,
case Eval of
pos ->
{Map1, Type1} = bind_guard(Arg1, Map, Env, Eval, State),
- case t_is_atom(true, Type1) of
+ case t_is_any_atom(true, Type1, Opaques) of
false -> signal_guard_fail(Eval, Guard, [Type1, t_any()], State);
true ->
{Map2, Type2} = bind_guard(Arg2, Map1, Env, Eval, State),
- case t_is_atom(true, Type2) of
+ case t_is_any_atom(true, Type2, Opaques) of
false -> signal_guard_fail(Eval, Guard, [Type1, Type2], State);
true -> {Map2, t_atom(true)}
end
@@ -2109,7 +2180,10 @@ handle_guard_and(Guard, Map, Env, Eval, State) ->
try bind_guard(Arg2, MapJ, Env, neg, State)
catch throw:{fail, _} -> bind_guard(Arg1, MapJ, Env, pos, State)
end,
- case t_is_atom(false, Type1) orelse t_is_atom(false, Type2) of
+ case
+ t_is_any_atom(false, Type1, Opaques)
+ orelse t_is_any_atom(false, Type2, Opaques)
+ of
true -> {join_maps_end([Map1, Map2], MapJ), t_atom(false)};
false -> signal_guard_fail(Eval, Guard, [Type1, Type2], State)
end;
@@ -2124,11 +2198,16 @@ handle_guard_and(Guard, Map, Env, Eval, State) ->
false ->
NewMap = join_maps_end([Map1, Map2], MapJ),
NewType =
- case {t_atom_vals(Bool1), t_atom_vals(Bool2)} of
+ case {t_atom_vals(Bool1, Opaques), t_atom_vals(Bool2, Opaques)} of
{['true'] , ['true'] } -> t_atom(true);
{['false'], _ } -> t_atom(false);
{_ , ['false']} -> t_atom(false);
+ {unknown , _ } ->
+ signal_guard_fail(Eval, Guard, [Type1, Type2], State);
+ {_ , unknown } ->
+ signal_guard_fail(Eval, Guard, [Type1, Type2], State);
{_ , _ } -> t_boolean()
+
end,
{NewMap, NewType}
end
@@ -2136,6 +2215,7 @@ handle_guard_and(Guard, Map, Env, Eval, State) ->
handle_guard_or(Guard, Map, Env, Eval, State) ->
[Arg1, Arg2] = cerl:call_args(Guard),
+ Opaques = State#state.opaques,
case Eval of
pos ->
MapJ = join_maps_begin(Map),
@@ -2149,19 +2229,23 @@ handle_guard_or(Guard, Map, Env, Eval, State) ->
catch
throw:{fail,_} -> bind_guard(Arg2, MapJ, Env, dont_know, State)
end,
- case ((t_is_atom(true, Bool1) andalso t_is_boolean(Bool2))
- orelse
- (t_is_atom(true, Bool2) andalso t_is_boolean(Bool1))) of
+ case
+ ((t_is_any_atom(true, Bool1, Opaques)
+ andalso t_is_boolean(Bool2, Opaques))
+ orelse
+ (t_is_any_atom(true, Bool2, Opaques)
+ andalso t_is_boolean(Bool1, Opaques)))
+ of
true -> {join_maps_end([Map1, Map2], MapJ), t_atom(true)};
false -> signal_guard_fail(Eval, Guard, [Bool1, Bool2], State)
end;
neg ->
{Map1, Type1} = bind_guard(Arg1, Map, Env, neg, State),
- case t_is_atom(false, Type1) of
+ case t_is_any_atom(false, Type1, Opaques) of
false -> signal_guard_fail(Eval, Guard, [Type1, t_any()], State);
true ->
{Map2, Type2} = bind_guard(Arg2, Map1, Env, neg, State),
- case t_is_atom(false, Type2) of
+ case t_is_any_atom(false, Type2, Opaques) of
false -> signal_guard_fail(Eval, Guard, [Type1, Type2], State);
true -> {Map2, t_atom(false)}
end
@@ -2177,10 +2261,14 @@ handle_guard_or(Guard, Map, Env, Eval, State) ->
false ->
NewMap = join_maps_end([Map1, Map2], MapJ),
NewType =
- case {t_atom_vals(Bool1), t_atom_vals(Bool2)} of
+ case {t_atom_vals(Bool1, Opaques), t_atom_vals(Bool2, Opaques)} of
{['false'], ['false']} -> t_atom(false);
{['true'] , _ } -> t_atom(true);
{_ , ['true'] } -> t_atom(true);
+ {unknown , _ } ->
+ signal_guard_fail(Eval, Guard, [Type1, Type2], State);
+ {_ , unknown } ->
+ signal_guard_fail(Eval, Guard, [Type1, Type2], State);
{_ , _ } -> t_boolean()
end,
{NewMap, NewType}
@@ -2189,10 +2277,11 @@ handle_guard_or(Guard, Map, Env, Eval, State) ->
handle_guard_not(Guard, Map, Env, Eval, State) ->
[Arg] = cerl:call_args(Guard),
+ Opaques = State#state.opaques,
case Eval of
neg ->
{Map1, Type} = bind_guard(Arg, Map, Env, pos, State),
- case t_is_atom(true, Type) of
+ case t_is_any_atom(true, Type, Opaques) of
true -> {Map1, t_atom(false)};
false ->
{_, Type0} = bind_guard(Arg, Map, Env, Eval, State),
@@ -2200,7 +2289,7 @@ handle_guard_not(Guard, Map, Env, Eval, State) ->
end;
pos ->
{Map1, Type} = bind_guard(Arg, Map, Env, neg, State),
- case t_is_atom(false, Type) of
+ case t_is_any_atom(false, Type, Opaques) of
true -> {Map1, t_atom(true)};
false ->
{_, Type0} = bind_guard(Arg, Map, Env, Eval, State),
@@ -2212,10 +2301,11 @@ handle_guard_not(Guard, Map, Env, Eval, State) ->
case t_is_none(Bool) of
true -> throw({fatal_fail, none});
false ->
- case t_atom_vals(Bool) of
+ case t_atom_vals(Bool, Opaques) of
['true'] -> {Map1, t_atom(false)};
['false'] -> {Map1, t_atom(true)};
- [_, _] -> {Map1, Bool}
+ [_, _] -> {Map1, Bool};
+ unknown -> signal_guard_fail(Eval, Guard, [Type], State)
end
end
end.
@@ -2231,31 +2321,47 @@ bind_guard_list([], Map, _Env, _Eval, _State, Acc) ->
-type eval() :: 'pos' | 'neg' | 'dont_know'.
--spec signal_guard_fail(eval(), cerl:c_call(), [erl_types:erl_type()],
+-spec signal_guard_fail(eval(), cerl:c_call(), [type()],
state()) -> no_return().
signal_guard_fail(Eval, Guard, ArgTypes, State) ->
+ signal_guard_failure(Eval, Guard, ArgTypes, fail, State).
+
+-spec signal_guard_fatal_fail(eval(), cerl:c_call(), [erl_types:erl_type()],
+ state()) -> no_return().
+
+signal_guard_fatal_fail(Eval, Guard, ArgTypes, State) ->
+ signal_guard_failure(Eval, Guard, ArgTypes, fatal_fail, State).
+
+signal_guard_failure(Eval, Guard, ArgTypes, Tag, State) ->
Args = cerl:call_args(Guard),
F = cerl:atom_val(cerl:call_name(Guard)),
- MFA = {cerl:atom_val(cerl:call_module(Guard)), F, length(Args)},
- Msg =
+ {M, F, A} = MFA = {cerl:atom_val(cerl:call_module(Guard)), F, length(Args)},
+ Opaques = State#state.opaques,
+ {Kind, XInfo} =
+ case erl_bif_types:opaque_args(M, F, A, ArgTypes, Opaques) of
+ [] ->
+ {case Eval of
+ neg -> neg_guard_fail;
+ pos -> guard_fail;
+ dont_know -> guard_fail
+ end,
+ []};
+ Ns -> {opaque_guard, [Ns]}
+ end,
+ FArgs =
case is_infix_op(MFA) of
true ->
[ArgType1, ArgType2] = ArgTypes,
[Arg1, Arg2] = Args,
- Kind =
- case Eval of
- neg -> neg_guard_fail;
- pos -> guard_fail;
- dont_know -> guard_fail
- end,
- {Kind, [format_args_1([Arg1], [ArgType1], State),
- atom_to_list(F),
- format_args_1([Arg2], [ArgType2], State)]};
+ [format_args_1([Arg1], [ArgType1], State),
+ atom_to_list(F),
+ format_args_1([Arg2], [ArgType2], State)] ++ XInfo;
false ->
- mk_guard_msg(Eval, F, Args, ArgTypes, State)
+ [F, format_args(Args, ArgTypes, State)]
end,
- throw({fail, {Guard, Msg}}).
+ Msg = {Kind, FArgs},
+ throw({Tag, {Guard, Msg}}).
is_infix_op({erlang, '=:=', 2}) -> true;
is_infix_op({erlang, '==', 2}) -> true;
@@ -2268,25 +2374,10 @@ is_infix_op({erlang, '>=', 2}) -> true;
is_infix_op({M, F, A}) when is_atom(M), is_atom(F),
is_integer(A), 0 =< A, A =< 255 -> false.
--spec signal_guard_fatal_fail(eval(), cerl:c_call(), [erl_types:erl_type()],
- state()) -> no_return().
-
-signal_guard_fatal_fail(Eval, Guard, ArgTypes, State) ->
- Args = cerl:call_args(Guard),
- F = cerl:atom_val(cerl:call_name(Guard)),
- Msg = mk_guard_msg(Eval, F, Args, ArgTypes, State),
- throw({fatal_fail, {Guard, Msg}}).
-
-mk_guard_msg(Eval, F, Args, ArgTypes, State) ->
- FArgs = [F, format_args(Args, ArgTypes, State)],
- case any_has_opaque_subtype(ArgTypes) of
- true -> {opaque_guard, FArgs};
- false ->
- case Eval of
- neg -> {neg_guard_fail, FArgs};
- pos -> {guard_fail, FArgs};
- dont_know -> {guard_fail, FArgs}
- end
+bif_args(M, F, A) ->
+ case erl_bif_types:arg_types(M, F, A) of
+ unknown -> lists:duplicate(A, t_any());
+ List -> List
end.
bind_guard_case_clauses(Arg, Clauses, Map0, Env, Eval, State) ->
@@ -2366,14 +2457,15 @@ bind_guard_case_clauses(GenArgType, GenMap, ArgExpr, [Clause|Left],
end,
{NewMap3, CType} = bind_guard(cerl:clause_body(Clause), NewMap2,
Env, Eval, State),
+ Opaques = State#state.opaques,
case Eval of
pos ->
- case t_is_atom(true, CType) of
+ case t_is_any_atom(true, CType, Opaques) of
true -> ok;
false -> throw({fail, none})
end;
neg ->
- case t_is_atom(false, CType) of
+ case t_is_any_atom(false, CType, Opaques) of
true -> ok;
false -> throw({fail, none})
end;
@@ -2501,8 +2593,11 @@ enter_type(Key, Val, MS) ->
error ->
?debug("Entering ~p :: ~s\n", [KeyLabel, t_to_string(Val)]),
case dict:find(KeyLabel, Dict) of
- {ok, Val} -> MS;
- {ok, _OldVal} -> store_map(KeyLabel, Val, MS);
+ {ok, Value} ->
+ case erl_types:t_is_equal(Val, Value) of
+ true -> MS;
+ false -> store_map(KeyLabel, Val, MS)
+ end;
error -> store_map(KeyLabel, Val, MS)
end
end
@@ -2611,10 +2706,15 @@ get_label(L) when is_integer(L) ->
get_label(T) ->
cerl_trees:get_label(T).
-t_is_simple(ArgType) ->
- t_is_atom(ArgType) orelse t_is_number(ArgType) orelse t_is_port(ArgType)
- orelse t_is_pid(ArgType) orelse t_is_reference(ArgType)
- orelse t_is_nil(ArgType).
+t_is_simple(ArgType, State) ->
+ Opaques = State#state.opaques,
+ t_is_atom(ArgType, Opaques) orelse t_is_number(ArgType, Opaques)
+ orelse t_is_port(ArgType, Opaques)
+ orelse t_is_pid(ArgType, Opaques) orelse t_is_reference(ArgType, Opaques)
+ orelse t_is_nil(ArgType, Opaques).
+
+remove_local_opaque_types(Type, Opaques) ->
+ t_unopaque(Type, Opaques).
%% t_is_structured(ArgType) ->
%% case t_is_nil(ArgType) of
@@ -2638,11 +2738,12 @@ is_call_to_send(Tree) ->
andalso (Arity =:= 2)
end.
-any_opaque(Ts) ->
- lists:any(fun erl_types:t_is_opaque/1, Ts).
-
-any_has_opaque_subtype(Ts) ->
- lists:any(fun erl_types:t_has_opaque_subtype/1, Ts).
+is_lc_simple_list(Tree, TreeType, State) ->
+ Opaques = State#state.opaques,
+ Ann = cerl:get_ann(Tree),
+ lists:member(list_comprehension, Ann)
+ andalso t_is_list(TreeType)
+ andalso t_is_simple(t_list_elements(TreeType, Opaques), State).
filter_match_fail([Clause] = Cls) ->
Body = cerl:clause_body(Clause),
@@ -2662,12 +2763,6 @@ filter_match_fail([]) ->
%% receive after 1 -> ok end
[].
-determine_mode(Type, Opaques) ->
- case lists:member(Type, Opaques) of
- true -> opaque;
- false -> structured
- end.
-
%%% ===========================================================================
%%%
%%% The State.
@@ -2679,7 +2774,7 @@ state__new(Callgraph, Tree, Plt, Module, Records) ->
erl_types:t_opaque_from_records(Records),
TreeMap = build_tree_map(Tree),
Funs = dict:fetch_keys(TreeMap),
- FunTab = init_fun_tab(Funs, dict:new(), TreeMap, Callgraph, Plt, Opaques),
+ FunTab = init_fun_tab(Funs, dict:new(), TreeMap, Callgraph, Plt),
ExportedFuns =
[Fun || Fun <- Funs--[top], dialyzer_callgraph:is_escaping(Fun, Callgraph)],
Work = init_work(ExportedFuns),
@@ -2740,12 +2835,14 @@ state__add_warning(#state{warnings = Warnings, warning_mode = true} = State,
case Force of
true ->
Warn = {Tag, {get_file(Ann), abs(get_line(Ann))}, Msg},
+ ?debug("MSG ~s\n", [dialyzer:format_warning(Warn)]),
State#state{warnings = [Warn|Warnings]};
false ->
case is_compiler_generated(Ann) of
true -> State;
false ->
Warn = {Tag, {get_file(Ann), get_line(Ann)}, Msg},
+ ?debug("MSG ~s\n", [dialyzer:format_warning(Warn)]),
State#state{warnings = [Warn|Warnings]}
end
end.
@@ -2875,10 +2972,10 @@ build_tree_map(Tree) ->
end,
cerl_trees:fold(Fun, dict:new(), Tree).
-init_fun_tab([top|Left], Dict, TreeMap, Callgraph, Plt, Opaques) ->
+init_fun_tab([top|Left], Dict, TreeMap, Callgraph, Plt) ->
NewDict = dict:store(top, {[], t_none()}, Dict),
- init_fun_tab(Left, NewDict, TreeMap, Callgraph, Plt, Opaques);
-init_fun_tab([Fun|Left], Dict, TreeMap, Callgraph, Plt, Opaques) ->
+ init_fun_tab(Left, NewDict, TreeMap, Callgraph, Plt);
+init_fun_tab([Fun|Left], Dict, TreeMap, Callgraph, Plt) ->
Arity = cerl:fun_arity(dict:fetch(Fun, TreeMap)),
FunEntry =
case dialyzer_callgraph:is_escaping(Fun, Callgraph) of
@@ -2895,8 +2992,8 @@ init_fun_tab([Fun|Left], Dict, TreeMap, Callgraph, Plt, Opaques) ->
false -> {not_handled, {lists:duplicate(Arity, t_none()), t_unit()}}
end,
NewDict = dict:store(Fun, FunEntry, Dict),
- init_fun_tab(Left, NewDict, TreeMap, Callgraph, Plt, Opaques);
-init_fun_tab([], Dict, _TreeMap, _Callgraph, _Plt, _Opaques) ->
+ init_fun_tab(Left, NewDict, TreeMap, Callgraph, Plt);
+init_fun_tab([], Dict, _TreeMap, _Callgraph, _Plt) ->
?debug("DICT:~p\n",[dict:to_list(Dict)]),
Dict.
@@ -2945,34 +3042,27 @@ state__update_fun_entry(Tree, ArgTypes, Out0,
if Fun =:= top -> Out0;
true ->
case lookup_fun_sig(Fun, CG, Plt) of
- {value, {SigRet, _}} -> t_inf(SigRet, Out0, opaque);
+ {value, {SigRet, _}} -> t_inf(SigRet, Out0);
none -> Out0
end
end,
Out = t_limit(Out1, ?TYPE_LIMIT),
- case dict:find(Fun, FunTab) of
- {ok, {ArgTypes, OldOut}} ->
- case t_is_equal(OldOut, Out) of
- true ->
- ?debug("Fixpoint for ~w: ~s\n",
- [state__lookup_name(Fun, State),
- t_to_string(t_fun(ArgTypes, Out))]),
- State;
- false ->
- NewEntry = {ArgTypes, Out},
- ?debug("New Entry for ~w: ~s\n",
- [state__lookup_name(Fun, State),
- t_to_string(t_fun(ArgTypes, Out))]),
- NewFunTab = dict:store(Fun, NewEntry, FunTab),
- State1 = State#state{fun_tab = NewFunTab},
- state__add_work_from_fun(Tree, State1)
- end;
- {ok, {NewArgTypes, _OldOut}} ->
- %% Can only happen in self-recursive functions. Only update the out type.
- NewEntry = {NewArgTypes, Out},
+ {ok, {OldArgTypes, OldOut}} = dict:find(Fun, FunTab),
+ SameArgs = lists:all(fun({A, B}) -> erl_types:t_is_equal(A, B)
+ end, lists:zip(OldArgTypes, ArgTypes)),
+ SameOut = t_is_equal(OldOut, Out),
+ if
+ SameArgs, SameOut ->
+ ?debug("Fixpoint for ~w: ~s\n",
+ [state__lookup_name(Fun, State),
+ t_to_string(t_fun(ArgTypes, Out))]),
+ State;
+ true ->
+ %% Can only happen in self-recursive functions.
+ NewEntry = {OldArgTypes, Out},
?debug("New Entry for ~w: ~s\n",
[state__lookup_name(Fun, State),
- t_to_string(t_fun(NewArgTypes, Out))]),
+ t_to_string(t_fun(OldArgTypes, Out))]),
NewFunTab = dict:store(Fun, NewEntry, FunTab),
State1 = State#state{fun_tab = NewFunTab},
state__add_work_from_fun(Tree, State1)
@@ -2993,7 +3083,7 @@ state__add_work_from_fun(Tree, #state{callgraph = Callgraph,
%% Must filter the result for results in this module.
FilteredList = [L || {ok, L} <- LabelList, dict:is_key(L, TreeMap)],
?debug("~w: Will try to add:~w\n",
- [state__lookup_name(get_label(Tree), State), MFAList]),
+ [state__lookup_name(Label, State), MFAList]),
lists:foldl(fun(L, AccState) ->
state__add_work(L, AccState)
end, State, FilteredList)
@@ -3054,7 +3144,8 @@ forward_args(Fun, ArgTypes, #state{work = Work, fun_tab = FunTab} = State) ->
case Fixpoint of
true -> State;
false ->
- NewArgTypes = [t_sup(X, Y) || {X, Y} <- lists:zip(ArgTypes, OldArgTypes)],
+ NewArgTypes = [t_sup(X, Y) ||
+ {X, Y} <- lists:zip(ArgTypes, OldArgTypes)],
NewWork = add_work(Fun, Work),
?debug("~w: forwarding args ~s\n",
[state__lookup_name(Fun, State),
@@ -3092,7 +3183,7 @@ state__get_callgraph(#state{callgraph = Callgraph}) ->
state__get_races(#state{races = Races}) ->
Races.
--spec state__get_records(state()) -> dict().
+-spec state__get_records(state()) -> types().
state__get_records(#state{records = Records}) ->
Records.
@@ -3191,7 +3282,7 @@ get_file([_|Tail]) -> get_file(Tail).
is_compiler_generated(Ann) ->
lists:member(compiler_generated, Ann) orelse (get_line(Ann) < 1).
--spec format_args([cerl:cerl()], [erl_types:erl_type()], state()) ->
+-spec format_args([cerl:cerl()], [type()], state()) ->
nonempty_string().
format_args([], [], _State) ->
@@ -3226,25 +3317,25 @@ format_arg(Arg) ->
Default
end.
--spec format_type(erl_types:erl_type(), state()) -> string().
+-spec format_type(type(), state()) -> string().
format_type(Type, #state{records = R}) ->
t_to_string(Type, R).
--spec format_field_diffs(erl_types:erl_type(), state()) -> string().
+-spec format_field_diffs(type(), state()) -> string().
format_field_diffs(RecConstruction, #state{records = R}) ->
erl_types:record_field_diffs_to_string(RecConstruction, R).
--spec format_sig_args(erl_types:erl_type(), state()) -> string().
+-spec format_sig_args(type(), state()) -> string().
-format_sig_args(Type, #state{records = R}) ->
- SigArgs = t_fun_args(Type),
+format_sig_args(Type, #state{opaques = Opaques} = State) ->
+ SigArgs = t_fun_args(Type, Opaques),
case SigArgs of
[] -> "()";
[SArg|SArgs] ->
- lists:flatten("(" ++ t_to_string(SArg, R)
- ++ ["," ++ t_to_string(T, R) || T <- SArgs] ++ ")")
+ lists:flatten("(" ++ format_type(SArg, State)
+ ++ ["," ++ format_type(T, State) || T <- SArgs] ++ ")")
end.
format_cerl(Tree) ->
diff --git a/lib/dialyzer/src/dialyzer_dep.erl b/lib/dialyzer/src/dialyzer_dep.erl
index 1a477f4388..572e60278d 100644
--- a/lib/dialyzer/src/dialyzer_dep.erl
+++ b/lib/dialyzer/src/dialyzer_dep.erl
@@ -2,7 +2,7 @@
%%-----------------------------------------------------------------------
%% %CopyrightBegin%
%%
-%% Copyright Ericsson AB 2006-2010. All Rights Reserved.
+%% Copyright Ericsson AB 2006-2014. 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
@@ -55,16 +55,17 @@
%%
%% Letrecs = a dict mapping var labels to their recursive definition.
%% top-level letrecs are not included as they are handled
-%% separatedly.
+%% separately.
%%
--spec analyze(cerl:c_module()) -> {dict(), ordset('external' | label()), dict()}.
+-spec analyze(cerl:c_module()) ->
+ {dict:dict(), ordsets:ordset('external' | label()), dict:dict(), dict:dict()}.
analyze(Tree) ->
%% io:format("Handling ~w\n", [cerl:atom_val(cerl:module_name(Tree))]),
{_, State} = traverse(Tree, map__new(), state__new(Tree), top),
Esc = state__esc(State),
- %% Add dependency from 'external' to all escaping function
+ %% Add dependency from 'external' to all escaping functions
State1 = state__add_deps(external, output(Esc), State),
Deps = state__deps(State1),
Calls = state__calls(State1),
@@ -123,8 +124,10 @@ traverse(Tree, Out, State, CurrentFun) ->
TmpState = state__add_deps(Label, O1, State),
state__add_deps(CurrentFun, O2,TmpState)
end,
- {BodyFuns, State2} = traverse(Body, Out, State1,
- cerl_trees:get_label(Tree)),
+ Vars = cerl:fun_vars(Tree),
+ Out1 = bind_single(Vars, output(set__singleton(external)), Out),
+ {BodyFuns, State2} =
+ traverse(Body, Out1, State1, cerl_trees:get_label(Tree)),
{output(set__singleton(Label)), state__add_esc(BodyFuns, State2)};
'let' ->
Vars = cerl:let_vars(Tree),
@@ -181,6 +184,15 @@ traverse(Tree, Out, State, CurrentFun) ->
Args = cerl:tuple_es(Tree),
{List, State1} = traverse_list(Args, Out, State, CurrentFun),
{merge_outs(List), State1};
+ map ->
+ Args = cerl:map_es(Tree),
+ {List, State1} = traverse_list(Args, Out, State, CurrentFun),
+ {merge_outs(List), State1};
+ map_pair ->
+ Key = cerl:map_pair_key(Tree),
+ Val = cerl:map_pair_val(Tree),
+ {List, State1} = traverse_list([Key,Val], Out, State, CurrentFun),
+ {merge_outs(List), State1};
values ->
traverse_list(cerl:values_es(Tree), Out, State, CurrentFun);
var ->
@@ -299,7 +311,7 @@ primop(Tree, ArgFuns, State) ->
%% Set
%%
--record(set, {set :: set()}).
+-record(set, {set :: sets:set()}).
set__singleton(Val) ->
#set{set = sets:add_element(Val, sets:new())}.
@@ -468,19 +480,30 @@ all_vars(Tree, AccIn) ->
-type local_set() :: 'none' | #set{}.
--record(state, {deps :: dict(),
+-record(state, {deps :: dict:dict(),
esc :: local_set(),
- call :: dict(),
- arities :: dict(),
- letrecs :: dict()}).
+ call :: dict:dict(),
+ arities :: dict:dict(),
+ letrecs :: dict:dict()}).
state__new(Tree) ->
Exports = set__from_list([X || X <- cerl:module_exports(Tree)]),
- InitEsc = set__from_list([cerl_trees:get_label(Fun)
- || {Var, Fun} <- cerl:module_defs(Tree),
- set__is_element(Var, Exports)]),
+ %% get the labels of all exported functions
+ ExpLs = [cerl_trees:get_label(Fun) || {Var, Fun} <- cerl:module_defs(Tree),
+ set__is_element(Var, Exports)],
+ %% make sure to also initiate an analysis from all functions called
+ %% from on_load attributes; in Core these exist as a list of {F,A} pairs
+ OnLoadFAs = lists:flatten([cerl:atom_val(Args)
+ || {Attr, Args} <- cerl:module_attrs(Tree),
+ cerl:atom_val(Attr) =:= on_load]),
+ OnLoadLs = [cerl_trees:get_label(Fun)
+ || {Var, Fun} <- cerl:module_defs(Tree),
+ lists:member(cerl:var_name(Var), OnLoadFAs)],
+ %% init the escaping function labels to exported + called from on_load
+ InitEsc = set__from_list(OnLoadLs ++ ExpLs),
Arities = cerl_trees:fold(fun find_arities/2, dict:new(), Tree),
- #state{deps = map__new(), esc = InitEsc, call = map__new(), arities = Arities, letrecs = map__new()}.
+ #state{deps = map__new(), esc = InitEsc, call = map__new(),
+ arities = Arities, letrecs = map__new()}.
find_arities(Tree, AccMap) ->
case cerl:is_c_fun(Tree) of
diff --git a/lib/dialyzer/src/dialyzer_gui_wx.erl b/lib/dialyzer/src/dialyzer_gui_wx.erl
index 08f31c1e13..868857d675 100644
--- a/lib/dialyzer/src/dialyzer_gui_wx.erl
+++ b/lib/dialyzer/src/dialyzer_gui_wx.erl
@@ -61,7 +61,7 @@
init_plt :: dialyzer_plt:plt(),
dir_entry :: wx:wx_object(),
file_box :: wx:wx_object(),
- files_to_analyze :: ordset(string()),
+ files_to_analyze :: ordsets:ordset(string()),
gui :: wx:wx_object(),
log :: wx:wx_object(),
menu :: menu(),
@@ -699,8 +699,7 @@ handle_add_files(#gui_state{chosen_box = ChosenBox, file_box = FileBox,
end.
handle_add_dir(#gui_state{chosen_box = ChosenBox, dir_entry = DirBox,
- files_to_analyze = FileList,
- mode = Mode} = State) ->
+ files_to_analyze = FileList, mode = Mode} = State) ->
case wxDirPickerCtrl:getPath(DirBox) of
"" ->
State;
@@ -714,8 +713,8 @@ handle_add_dir(#gui_state{chosen_box = ChosenBox, dir_entry = DirBox,
State#gui_state{files_to_analyze = add_files(filter_mods(NewDir1,Ext), FileList, ChosenBox, Ext)}
end.
-handle_add_rec(#gui_state{chosen_box = ChosenBox, dir_entry = DirBox, files_to_analyze = FileList,
- mode = Mode} = State) ->
+handle_add_rec(#gui_state{chosen_box = ChosenBox, dir_entry = DirBox,
+ files_to_analyze = FileList, mode = Mode} = State) ->
case wxDirPickerCtrl:getPath(DirBox) of
"" ->
State;
@@ -723,11 +722,11 @@ handle_add_rec(#gui_state{chosen_box = ChosenBox, dir_entry = DirBox, files_to_a
NewDir = ordsets:new(),
NewDir1 = ordsets:add_element(Dir,NewDir),
TargetDirs = ordsets:union(NewDir1, all_subdirs(NewDir1)),
- case wxRadioBox:getSelection(Mode) of
- 0 -> Ext = ".beam";
- 1-> Ext = ".erl"
- end,
- State#gui_state{files_to_analyze = add_files(filter_mods(TargetDirs,Ext), FileList, ChosenBox, Ext)}
+ Ext = case wxRadioBox:getSelection(Mode) of
+ 0 -> ".beam";
+ 1 -> ".erl"
+ end,
+ State#gui_state{files_to_analyze = add_files(filter_mods(TargetDirs, Ext), FileList, ChosenBox, Ext)}
end.
handle_file_delete(#gui_state{chosen_box = ChosenBox,
@@ -886,13 +885,10 @@ config_gui_start(State) ->
wxRadioBox:disable(State#gui_state.mode).
save_file(#gui_state{frame = Frame, warnings_box = WBox, log = Log} = State, Type) ->
- case Type of
- warnings ->
- Message = "Save Warnings",
- Box = WBox;
- log -> Message = "Save Log",
- Box = Log
- end,
+ {Message, Box} = case Type of
+ warnings -> {"Save Warnings", WBox};
+ log -> {"Save Log", Log}
+ end,
case wxTextCtrl:getValue(Box) of
"" -> error_sms(State,"There is nothing to save...\n");
_ ->
@@ -936,8 +932,7 @@ include_dialog(#gui_state{gui = Wx, frame = Frame, options = Options}) ->
wxButton:connect(DeleteAllButton, command_button_clicked),
wxButton:connect(Ok, command_button_clicked),
wxButton:connect(Cancel, command_button_clicked),
- Dirs = [io_lib:format("~s", [X])
- || X <- Options#options.include_dirs],
+ Dirs = [io_lib:format("~s", [X]) || X <- Options#options.include_dirs],
wxListBox:set(Box, Dirs),
Layout = wxBoxSizer:new(?wxVERTICAL),
Buttons = wxBoxSizer:new(?wxHORIZONTAL),
diff --git a/lib/dialyzer/src/dialyzer_options.erl b/lib/dialyzer/src/dialyzer_options.erl
index 06672e595f..a92b8b1958 100644
--- a/lib/dialyzer/src/dialyzer_options.erl
+++ b/lib/dialyzer/src/dialyzer_options.erl
@@ -2,7 +2,7 @@
%%-----------------------------------------------------------------------
%% %CopyrightBegin%
%%
-%% Copyright Ericsson AB 2006-2012. All Rights Reserved.
+%% Copyright Ericsson AB 2006-2014. 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
@@ -51,7 +51,8 @@ build(Opts) ->
?WARN_CONTRACT_TYPES,
?WARN_CONTRACT_SYNTAX,
?WARN_BEHAVIOUR,
- ?WARN_UNDEFINED_CALLBACK],
+ ?WARN_UNDEFINED_CALLBACK,
+ ?WARN_UNKNOWN],
DefaultWarns1 = ordsets:from_list(DefaultWarns),
InitPlt = dialyzer_plt:get_default_plt(),
DefaultOpts = #options{},
@@ -310,6 +311,8 @@ build_warnings([Opt|Opts], Warnings) ->
ordsets:add_element(?WARN_CONTRACT_SUBTYPE, Warnings);
underspecs ->
ordsets:add_element(?WARN_CONTRACT_SUPERTYPE, Warnings);
+ no_unknown ->
+ ordsets:del_element(?WARN_UNKNOWN, Warnings);
OtherAtom ->
bad_option("Unknown dialyzer warning option", OtherAtom)
end,
diff --git a/lib/dialyzer/src/dialyzer_plt.erl b/lib/dialyzer/src/dialyzer_plt.erl
index 5f64099210..63798f44b1 100644
--- a/lib/dialyzer/src/dialyzer_plt.erl
+++ b/lib/dialyzer/src/dialyzer_plt.erl
@@ -2,7 +2,7 @@
%%----------------------------------------------------------------------
%% %CopyrightBegin%
%%
-%% Copyright Ericsson AB 2006-2012. All Rights Reserved.
+%% Copyright Ericsson AB 2006-2014. 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
@@ -67,7 +67,7 @@
%%----------------------------------------------------------------------
--type mod_deps() :: dict().
+-type mod_deps() :: dialyzer_callgraph:mod_deps().
-type deep_string() :: string() | [deep_string()].
@@ -80,11 +80,11 @@
%%----------------------------------------------------------------------
--record(plt, {info = table_new() :: dict(),
- types = table_new() :: dict(),
- contracts = table_new() :: dict(),
- callbacks = table_new() :: dict(),
- exported_types = sets:new() :: set()}).
+-record(plt, {info = table_new() :: dict:dict(),
+ types = table_new() :: dict:dict(),
+ contracts = table_new() :: dict:dict(),
+ callbacks = table_new() :: dict:dict(),
+ exported_types = sets:new() :: sets:set()}).
-record(mini_plt, {info :: ets:tid(),
contracts :: ets:tid(),
@@ -96,15 +96,15 @@
-include("dialyzer.hrl").
-type file_md5() :: {file:filename(), binary()}.
--type plt_info() :: {[file_md5()], dict()}.
+-type plt_info() :: {[file_md5()], dict:dict()}.
-record(file_plt, {version = "" :: string(),
file_md5_list = [] :: [file_md5()],
- info = dict:new() :: dict(),
- contracts = dict:new() :: dict(),
- callbacks = dict:new() :: dict(),
- types = dict:new() :: dict(),
- exported_types = sets:new() :: set(),
+ info = dict:new() :: dict:dict(),
+ contracts = dict:new() :: dict:dict(),
+ callbacks = dict:new() :: dict:dict(),
+ types = dict:new() :: dict:dict(),
+ exported_types = sets:new() :: sets:set(),
mod_deps :: mod_deps(),
implementation_md5 = [] :: [file_md5()]}).
@@ -184,22 +184,22 @@ lookup(Plt, Label) when is_integer(Label) ->
lookup_1(#mini_plt{info = Info}, MFAorLabel) ->
ets_table_lookup(Info, MFAorLabel).
--spec insert_types(plt(), dict()) -> plt().
+-spec insert_types(plt(), dict:dict()) -> plt().
insert_types(PLT, Rec) ->
PLT#plt{types = Rec}.
--spec insert_exported_types(plt(), set()) -> plt().
+-spec insert_exported_types(plt(), sets:set()) -> plt().
insert_exported_types(PLT, Set) ->
PLT#plt{exported_types = Set}.
--spec get_types(plt()) -> dict().
+-spec get_types(plt()) -> dict:dict().
get_types(#plt{types = Types}) ->
Types.
--spec get_exported_types(plt()) -> set().
+-spec get_exported_types(plt()) -> sets:set().
get_exported_types(#plt{exported_types = ExpTypes}) ->
ExpTypes.
@@ -211,7 +211,7 @@ get_exported_types(#plt{exported_types = ExpTypes}) ->
lookup_module(#plt{info = Info}, M) when is_atom(M) ->
table_lookup_module(Info, M).
--spec all_modules(plt()) -> set().
+-spec all_modules(plt()) -> sets:set().
all_modules(#plt{info = Info, contracts = Cs}) ->
sets:union(table_all_modules(Info), table_all_modules(Cs)).
diff --git a/lib/dialyzer/src/dialyzer_races.erl b/lib/dialyzer/src/dialyzer_races.erl
index 2aa8343bce..28c2ad2c0b 100644
--- a/lib/dialyzer/src/dialyzer_races.erl
+++ b/lib/dialyzer/src/dialyzer_races.erl
@@ -2,7 +2,7 @@
%%-----------------------------------------------------------------------
%% %CopyrightBegin%
%%
-%% Copyright Ericsson AB 2008-2012. All Rights Reserved.
+%% Copyright Ericsson AB 2008-2014. 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
@@ -85,6 +85,12 @@
-type race_tag() :: 'whereis_register' | 'whereis_unregister'
| 'ets_lookup_insert' | 'mnesia_dirty_read_write'.
+%% The following type is similar to the dial_warning() type but has a
+%% tag which is local to this module and is not propagated to outside
+-type dial_race_warning() :: {race_warn_tag(), file_line(), {atom(), [term()]}}.
+-type race_warn_tag() :: ?WARN_WHEREIS_REGISTER | ?WARN_WHEREIS_UNREGISTER
+ | ?WARN_ETS_LOOKUP_INSERT | ?WARN_MNESIA_DIRTY_READ_WRITE.
+
-record(beg_clause, {arg :: var_to_map1(),
pats :: var_to_map1(),
guard :: cerl:cerl()}).
@@ -98,14 +104,14 @@
def_vars :: [core_vars()],
arg_types :: [erl_types:erl_type()],
call_vars :: [core_vars()],
- var_map :: dict()}).
+ var_map :: dict:dict()}).
-record(dep_call, {call_name :: dep_calls(),
args :: args(),
arg_types :: [erl_types:erl_type()],
vars :: [core_vars()],
- state :: _, %% XXX: recursive
+ state :: dialyzer_dataflow:state(),
file_line :: file_line(),
- var_map :: dict()}).
+ var_map :: dict:dict()}).
-record(fun_call, {caller :: dialyzer_callgraph:mfa_or_funlbl(),
callee :: dialyzer_callgraph:mfa_or_funlbl(),
arg_types :: [erl_types:erl_type()],
@@ -114,7 +120,7 @@
arg :: var_to_map1()}).
-record(warn_call, {call_name :: warn_calls(),
args :: args(),
- var_map :: dict()}).
+ var_map :: dict:dict()}).
-type case_tags() :: 'beg_case' | #beg_clause{} | #end_clause{} | #end_case{}.
-type code() :: [#dep_call{} | #fun_call{} | #warn_call{} |
@@ -141,7 +147,7 @@
race_tags = [] :: [#race_fun{}],
%% true for fun types and warning mode
race_analysis = false :: boolean(),
- race_warnings = [] :: [dial_warning()]}).
+ race_warnings = [] :: [dial_race_warning()]}).
%%% ===========================================================================
%%%
@@ -984,8 +990,7 @@ fixup_race_forward_helper(CurrFun, CurrFunLabel, Fun, FunLabel,
NewRaceVarMap, Args, NewFunArgs, NewFunTypes, NestingLevel};
{CurrFun, Fun} ->
NewCallsToAnalyze = lists:delete(Head, CallsToAnalyze),
- NewRaceVarMap =
- race_var_map(Args, NewFunArgs, RaceVarMap, bind),
+ NewRaceVarMap = race_var_map(Args, NewFunArgs, RaceVarMap, bind),
RetC =
case Fun of
InitFun ->
@@ -1012,8 +1017,7 @@ fixup_race_forward_helper(CurrFun, CurrFunLabel, Fun, FunLabel,
label = FunLabel, var_map = NewRaceVarMap,
def_vars = Args, call_vars = NewFunArgs,
arg_types = NewFunTypes}|
- lists:reverse(StateRaceList)] ++
- RetC;
+ lists:reverse(StateRaceList)] ++ RetC;
_ ->
[#curr_fun{status = in, mfa = Fun,
label = FunLabel, var_map = NewRaceVarMap,
@@ -1048,13 +1052,9 @@ fixup_race_backward(CurrFun, Calls, CallsToAnalyze, Parents, Height) ->
false -> [CurrFun|Parents]
end;
[Head|Tail] ->
- MorePaths =
- case Head of
- {Parent, CurrFun} -> true;
- {Parent, _TupleB} -> false
- end,
- case MorePaths of
- true ->
+ {Parent, TupleB} = Head,
+ case TupleB =:= CurrFun of
+ true -> % more paths are needed
NewCallsToAnalyze = lists:delete(Head, CallsToAnalyze),
NewParents =
fixup_race_backward(Parent, NewCallsToAnalyze,
@@ -1565,7 +1565,7 @@ any_args(StrList) ->
end
end.
--spec bind_dict_vars(label(), label(), dict()) -> dict().
+-spec bind_dict_vars(label(), label(), dict:dict()) -> dict:dict().
bind_dict_vars(Key, Label, RaceVarMap) ->
case Key =:= Label of
@@ -1751,7 +1751,7 @@ compare_vars(Var1, Var2, RaceVarMap) when is_integer(Var1), is_integer(Var2) ->
compare_vars(_Var1, _Var2, _RaceVarMap) ->
false.
--spec compare_var_list(label_type(), [label_type()], dict()) -> boolean().
+-spec compare_var_list(label_type(), [label_type()], dict:dict()) -> boolean().
compare_var_list(Var, VarList, RaceVarMap) ->
lists:any(fun (V) -> compare_vars(Var, V, RaceVarMap) end, VarList).
@@ -1763,7 +1763,7 @@ ets_list_args(MaybeList) ->
catch _:_ -> [?no_label]
end;
false -> [ets_tuple_args(MaybeList)]
- end.
+ end.
ets_list_argtypes(ListStr) ->
ListStr1 = string:strip(ListStr, left, $[),
@@ -1956,7 +1956,8 @@ mnesia_tuple_argtypes(TupleStr) ->
[TupleStr2|_T] = string:tokens(TupleStr1, " ,"),
lists:flatten(string:tokens(TupleStr2, " |")).
--spec race_var_map(var_to_map1(), var_to_map2(), dict(), op()) -> dict().
+-spec race_var_map(var_to_map1(), var_to_map2(), dict:dict(), op()) ->
+ dict:dict().
race_var_map(Vars1, Vars2, RaceVarMap, Op) ->
case Vars1 =:= ?no_arg orelse Vars1 =:= ?bypassed
diff --git a/lib/dialyzer/src/dialyzer_succ_typings.erl b/lib/dialyzer/src/dialyzer_succ_typings.erl
index 84379642bf..ef9b00e203 100644
--- a/lib/dialyzer/src/dialyzer_succ_typings.erl
+++ b/lib/dialyzer/src/dialyzer_succ_typings.erl
@@ -2,7 +2,7 @@
%%-----------------------------------------------------------------------
%% %CopyrightBegin%
%%
-%% Copyright Ericsson AB 2006-2012. All Rights Reserved.
+%% Copyright Ericsson AB 2006-2014. 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
@@ -72,7 +72,7 @@
-record(st, {callgraph :: dialyzer_callgraph:callgraph(),
codeserver :: dialyzer_codeserver:codeserver(),
- no_warn_unused :: set(),
+ no_warn_unused :: sets:set(mfa()),
parent = none :: parent(),
timing_server :: dialyzer_timing:timing_server(),
solvers :: [solver()],
@@ -137,7 +137,7 @@ get_refined_success_typings(SCCs, #st{callgraph = Callgraph,
-type doc_plt() :: 'undefined' | dialyzer_plt:plt().
-spec get_warnings(dialyzer_callgraph:callgraph(), dialyzer_plt:plt(),
- doc_plt(), dialyzer_codeserver:codeserver(), set(),
+ doc_plt(), dialyzer_codeserver:codeserver(), sets:set(mfa()),
dialyzer_timing:timing_server(), [solver()], pid()) ->
{[dial_warning()], dialyzer_plt:plt(), doc_plt()}.
@@ -149,8 +149,10 @@ get_warnings(Callgraph, Plt, DocPlt, Codeserver,
NewState = InitState#st{no_warn_unused = NoWarnUnused},
Mods = dialyzer_callgraph:modules(NewState#st.callgraph),
MiniPlt = NewState#st.plt,
+ FindOpaques = lookup_and_find_opaques_fun(Codeserver),
CWarns =
- dialyzer_contracts:get_invalid_contract_warnings(Mods, Codeserver, MiniPlt),
+ dialyzer_contracts:get_invalid_contract_warnings(Mods, Codeserver,
+ MiniPlt, FindOpaques),
MiniDocPlt = dialyzer_plt:get_mini_plt(DocPlt),
ModWarns =
?timing(TimingServer, "warning",
@@ -261,7 +263,16 @@ refine_one_module(M, {CodeServer, Callgraph, Plt, _Solvers}) ->
FunTypes = get_fun_types_from_plt(AllFuns, Callgraph, Plt),
NewFunTypes =
dialyzer_dataflow:get_fun_types(ModCode, Plt, Callgraph, Records),
- case reached_fixpoint(FunTypes, NewFunTypes) of
+ Contracts1 = dialyzer_codeserver:lookup_mod_contracts(M, CodeServer),
+ Contracts = orddict:from_list(dict:to_list(Contracts1)),
+ FindOpaques = find_opaques_fun(Records),
+ DecoratedFunTypes =
+ decorate_succ_typings(Contracts, Callgraph, NewFunTypes, FindOpaques),
+ %% ?debug("NewFunTypes ~p\n ~n", [dict:to_list(NewFunTypes)]),
+ %% ?debug("refine DecoratedFunTypes ~p\n ~n", [dict:to_list(DecoratedFunTypes)]),
+ debug_pp_functions("Refine", NewFunTypes, DecoratedFunTypes, Callgraph),
+
+ case reached_fixpoint(FunTypes, DecoratedFunTypes) of
true -> [];
{false, NotFixpoint} ->
?debug("Not fixpoint\n", []),
@@ -357,9 +368,16 @@ find_succ_types_for_scc(SCC, {Codeserver, Callgraph, Plt, Solvers}) ->
AllFunSet = sets:from_list([X || {X, _} <- AllFuns]),
FilteredFunTypes =
dict:filter(fun(X, _) -> sets:is_element(X, AllFunSet) end, FunTypes),
+ FindOpaques = lookup_and_find_opaques_fun(Codeserver),
+ DecoratedFunTypes =
+ decorate_succ_typings(Contracts3, Callgraph, FilteredFunTypes, FindOpaques),
%% Check contracts
PltContracts =
- dialyzer_contracts:check_contracts(Contracts3, Callgraph, FilteredFunTypes),
+ dialyzer_contracts:check_contracts(Contracts3, Callgraph,
+ DecoratedFunTypes, FindOpaques),
+ %% ?debug("FilteredFunTypes ~p\n ~n", [dict:to_list(FilteredFunTypes)]),
+ %% ?debug("SCC DecoratedFunTypes ~p\n ~n", [dict:to_list(DecoratedFunTypes)]),
+ debug_pp_functions("SCC", FilteredFunTypes, DecoratedFunTypes, Callgraph),
ContractFixpoint =
lists:all(fun({MFA, _C}) ->
%% Check the non-deleted PLT
@@ -368,16 +386,47 @@ find_succ_types_for_scc(SCC, {Codeserver, Callgraph, Plt, Solvers}) ->
{value, _} -> true
end
end, PltContracts),
- Plt = insert_into_plt(FilteredFunTypes, Callgraph, Plt),
+ Plt = insert_into_plt(DecoratedFunTypes, Callgraph, Plt),
Plt = dialyzer_plt:insert_contract_list(Plt, PltContracts),
case (ContractFixpoint andalso
- reached_fixpoint_strict(PropTypes, FilteredFunTypes)) of
+ reached_fixpoint_strict(PropTypes, DecoratedFunTypes)) of
true -> [];
false ->
?debug("Not fixpoint for: ~w\n", [AllFuns]),
[Fun || {Fun, _Arity} <- AllFuns]
end.
+decorate_succ_typings(Contracts, Callgraph, FunTypes, FindOpaques) ->
+ F = fun(Label, Type) ->
+ case dialyzer_callgraph:lookup_name(Label, Callgraph) of
+ {ok, MFA} ->
+ case orddict:find(MFA, Contracts) of
+ {ok, {_FileLine, Contract}} ->
+ Args = dialyzer_contracts:get_contract_args(Contract),
+ Ret = dialyzer_contracts:get_contract_return(Contract),
+ C = erl_types:t_fun(Args, Ret),
+ {M, _, _} = MFA,
+ Opaques = FindOpaques(M),
+ erl_types:t_decorate_with_opaque(Type, C, Opaques);
+ error -> Type
+ end;
+ error -> Type
+ end
+ end,
+ dict:map(F, FunTypes).
+
+lookup_and_find_opaques_fun(Codeserver) ->
+ fun(Module) ->
+ Records = dialyzer_codeserver:lookup_mod_records(Module, Codeserver),
+ (find_opaques_fun(Records))(Module)
+ end.
+
+find_opaques_fun(Records) ->
+ fun(Module) ->
+ erl_types:module_builtin_opaques(Module) ++
+ erl_types:t_opaque_from_records(Records)
+ end.
+
get_fun_types_from_plt(FunList, Callgraph, Plt) ->
get_fun_types_from_plt(FunList, Callgraph, Plt, dict:new()).
@@ -443,9 +492,30 @@ debug_pp_succ_typings(SuccTypes) ->
|| {MFA, {contract, RetFun, ArgT}} <- SuccTypes],
?debug("\n", []),
ok.
+
+debug_pp_functions(Header, FunTypes, DecoratedFunTypes, Callgraph) ->
+ ?debug("FunTypes (~s)\n", [Header]),
+ FTypes = lists:keysort(1, dict:to_list(FunTypes)),
+ DTypes = lists:keysort(1, dict:to_list(DecoratedFunTypes)),
+ Fun = fun({{Label, Type},{Label, DecoratedType}}) ->
+ Name = lookup_name(Label, Callgraph),
+ ?debug("~w (~w): ~s\n",
+ [Name, Label, erl_types:t_to_string(Type)]),
+ case erl_types:t_is_equal(Type, DecoratedType) of
+ true -> ok;
+ false ->
+ ?debug(" With opaque types: ~s\n",
+ [erl_types:t_to_string(DecoratedType)])
+ end
+ end,
+ lists:foreach(Fun, lists:zip(FTypes, DTypes)),
+ ?debug("\n", []).
-else.
debug_pp_succ_typings(_) ->
ok.
+
+debug_pp_functions(_, _, _, _) ->
+ ok.
-endif.
lookup_name(F, CG) ->
diff --git a/lib/dialyzer/src/dialyzer_typesig.erl b/lib/dialyzer/src/dialyzer_typesig.erl
index a418a11e65..31ceaf5ac5 100644
--- a/lib/dialyzer/src/dialyzer_typesig.erl
+++ b/lib/dialyzer/src/dialyzer_typesig.erl
@@ -2,7 +2,7 @@
%%-----------------------------------------------------------------------
%% %CopyrightBegin%
%%
-%% Copyright Ericsson AB 2006-2013. All Rights Reserved.
+%% Copyright Ericsson AB 2006-2014. 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
@@ -31,29 +31,33 @@
-export([analyze_scc/6]).
-export([get_safe_underapprox/2]).
+%%-import(helper, %% 'helper' could be any module doing sanity checks...
+-import(erl_types,
+ [t_has_var/1, t_inf/2, t_is_equal/2, t_is_subtype/2,
+ t_subtract/2, t_subtract_list/2, t_sup/1, t_sup/2,t_unify/2]).
+
-import(erl_types,
[t_any/0, t_atom/0, t_atom_vals/1,
t_binary/0, t_bitstr/0, t_bitstr/2, t_bitstr_concat/1, t_boolean/0,
t_collect_vars/1, t_cons/2, t_cons_hd/1, t_cons_tl/1,
t_float/0, t_from_range/2, t_from_term/1,
t_fun/0, t_fun/2, t_fun_args/1, t_fun_range/1,
- t_has_var/1,
- t_inf/2, t_inf/3, t_integer/0,
- t_is_any/1, t_is_atom/1, t_is_atom/2, t_is_cons/1, t_is_equal/2,
+ t_integer/0,
+ t_is_any/1, t_is_atom/1, t_is_any_atom/2, t_is_cons/1,
t_is_float/1, t_is_fun/1,
t_is_integer/1, t_non_neg_integer/0,
t_is_list/1, t_is_nil/1, t_is_none/1, t_is_number/1,
- t_is_subtype/2, t_limit/2, t_list/0, t_list/1,
+ t_limit/2, t_list/0, t_list/1,
t_list_elements/1, t_nonempty_list/1, t_maybe_improper_list/0,
t_module/0, t_number/0, t_number_vals/1,
- t_opaque_match_record/2, t_opaque_matching_structure/2,
- t_opaque_from_records/1,
t_pid/0, t_port/0, t_product/1, t_reference/0,
- t_subst/2, t_subtract/2, t_subtract_list/2, t_sup/1, t_sup/2,
+ t_subst/2,
t_timeout/0, t_tuple/0, t_tuple/1,
- t_unify/3, t_var/1, t_var_name/1,
- t_none/0, t_unit/0]).
+ t_var/1, t_var_name/1,
+ t_none/0, t_unit/0,
+ t_map/1
+ ]).
-include("dialyzer.hrl").
@@ -79,7 +83,7 @@
list :: [constr()],
deps :: [dep()],
masks :: [{dep(),[non_neg_integer()]}] |
- {'d',dict()},
+ {'d',dict:dict(dep(), [non_neg_integer()])},
id :: {'list', dep()}}).
-type constraint_list() :: #constraint_list{}.
@@ -90,26 +94,30 @@
-type constr() :: constraint() | constraint_list() | constraint_ref().
--type typesig_scc() :: [{mfa(), {cerl:c_var(), cerl:c_fun()}, dict()}].
+-type types() :: erl_types:type_table().
+
+-type typesig_scc() :: [{mfa(), {cerl:c_var(), cerl:c_fun()}, types()}].
-type typesig_funmap() :: [{type_var(), type_var()}]. %% Orddict
--type dict_or_ets() :: {'d', dict()} | {'e', ets:tid()}.
+-type prop_types() :: dict:dict(label(), types()).
+
+-type dict_or_ets() :: {'d', prop_types()} | {'e', ets:tid()}.
-record(state, {callgraph :: dialyzer_callgraph:callgraph(),
cs = [] :: [constr()],
cmap = {'d', dict:new()} :: dict_or_ets(),
fun_map = [] :: typesig_funmap(),
- fun_arities = dict:new() :: dict(),
+ fun_arities = dict:new() :: dict:dict(type_var(), arity()),
in_match = false :: boolean(),
in_guard = false :: boolean(),
module :: module(),
- name_map = dict:new() :: dict(),
+ name_map = dict:new() :: dict:dict(mfa(),
+ cerl:c_fun()),
next_label = 0 :: label(),
- self_rec :: erl_types:erl_type(),
+ self_rec :: 'false' | erl_types:erl_type(),
plt :: dialyzer_plt:plt(),
prop_types = {'d', dict:new()} :: dict_or_ets(),
- records = dict:new() :: dict(),
- opaques = [] :: [erl_types:erl_type()],
+ records = dict:new() :: types(),
scc = [] :: [type_var()],
mfas :: [tuple()],
solvers = [] :: [solver()]
@@ -164,7 +172,7 @@
-spec analyze_scc(typesig_scc(), label(),
dialyzer_callgraph:callgraph(),
- dialyzer_plt:plt(), dict(), [solver()]) -> dict().
+ dialyzer_plt:plt(), prop_types(), [solver()]) -> prop_types().
analyze_scc(SCC, NextLabel, CallGraph, Plt, PropTypes, Solvers0) ->
Solvers = solvers(Solvers0),
@@ -192,11 +200,10 @@ solvers(Solvers) -> Solvers.
%%
%% ============================================================================
-traverse_scc([{MFA, Def, Rec}|Left], DefSet, AccState) ->
+traverse_scc([{_MFA, Def, Rec}|Left], DefSet, AccState) ->
TmpState1 = state__set_rec_dict(AccState, Rec),
- TmpState2 = state__set_opaques(TmpState1, MFA),
DummyLetrec = cerl:c_letrec([Def], cerl:c_atom(foo)),
- {NewAccState, _} = traverse(DummyLetrec, DefSet, TmpState2),
+ {NewAccState, _} = traverse(DummyLetrec, DefSet, TmpState1),
traverse_scc(Left, DefSet, NewAccState);
traverse_scc([], _DefSet, AccState) ->
AccState.
@@ -386,12 +393,7 @@ traverse(Tree, DefinedVars, State) ->
case cerl:unfold_literal(Tree) of
Tree ->
Type = t_from_term(cerl:concrete(Tree)),
- NewType =
- case erl_types:t_opaque_match_atom(Type, State#state.opaques) of
- [Opaque] -> Opaque;
- _ -> Type
- end,
- {State, NewType};
+ {State, Type};
NewTree -> traverse(NewTree, DefinedVars, State)
end;
module ->
@@ -462,27 +464,21 @@ traverse(Tree, DefinedVars, State) ->
[Tag|Fields] ->
case cerl:is_c_atom(Tag) of
true ->
- %% Check if an opaque term is constructed.
- case t_opaque_match_record(TupleType, State#state.opaques) of
- [Opaque] ->
- OpStruct = t_opaque_matching_structure(TupleType, Opaque),
- State3 = state__store_conj(TupleType, sub, OpStruct, State2),
- {State3, Opaque};
- %% Check if a record is constructed.
- _ ->
- Arity = length(Fields),
- Records = State2#state.records,
- case lookup_record(Records, cerl:atom_val(Tag), Arity) of
- error -> {State2, TupleType};
- {ok, RecType} ->
- State3 = state__store_conj(TupleType, sub, RecType, State2),
- {State3, TupleType}
- end
- end;
+ %% Check if a record is constructed.
+ Arity = length(Fields),
+ Records = State2#state.records,
+ case lookup_record(Records, cerl:atom_val(Tag), Arity) of
+ error -> {State2, TupleType};
+ {ok, RecType} ->
+ State3 = state__store_conj(TupleType, sub, RecType, State2),
+ {State3, TupleType}
+ end;
false -> {State2, TupleType}
- end;
+ end;
[] -> {State2, TupleType}
end;
+ map ->
+ {State, t_map([])};
values ->
%% We can get into trouble when unifying products that have the
%% same element appearing several times. Handle these cases by
@@ -591,9 +587,13 @@ handle_try(Tree, DefinedVars, State) ->
case state__is_in_guard(State) of
true ->
Conj1 = mk_conj_constraint_list([ArgBodyCs,
- mk_constraint(BodyVar, eq, TreeVar)]),
+ mk_constraint(BodyVar,
+ eq,
+ TreeVar)]),
Disj = mk_disj_constraint_list([Conj1,
- mk_constraint(HandlerVar, eq, TreeVar)]),
+ mk_constraint(HandlerVar,
+ eq,
+ TreeVar)]),
NewState1 = state__new_constraint_context(HandlerState),
Conj2 = mk_conj_constraint_list([OldCs, Disj]),
NewState2 = state__store_conj(Conj2, NewState1),
@@ -604,19 +604,27 @@ handle_try(Tree, DefinedVars, State) ->
{false, false} ->
Conj1 =
mk_conj_constraint_list([ArgBodyCs,
- mk_constraint(TreeVar, eq, BodyVar)]),
+ mk_constraint(TreeVar,
+ eq,
+ BodyVar)]),
Conj2 =
mk_conj_constraint_list([HandlerCs,
- mk_constraint(TreeVar, eq, HandlerVar)]),
+ mk_constraint(TreeVar,
+ eq,
+ HandlerVar)]),
Disj = mk_disj_constraint_list([Conj1, Conj2]),
{Disj, TreeVar};
{false, true} ->
{mk_conj_constraint_list([ArgBodyCs,
- mk_constraint(TreeVar, eq, BodyVar)]),
+ mk_constraint(TreeVar,
+ eq,
+ BodyVar)]),
BodyVar};
{true, false} ->
{mk_conj_constraint_list([HandlerCs,
- mk_constraint(TreeVar, eq, HandlerVar)]),
+ mk_constraint(TreeVar,
+ eq,
+ HandlerVar)]),
HandlerVar};
{true, true} ->
?debug("Throw failed\n", []),
@@ -668,10 +676,7 @@ handle_call(Call, DefinedVars, State) ->
get_plt_constr(MFA, Dst, ArgVars, State) ->
Plt = state__plt(State),
PltRes = dialyzer_plt:lookup(Plt, MFA),
- Opaques = State#state.opaques,
- Module = State#state.module,
SCCMFAs = State#state.mfas,
- {FunModule, _, _} = MFA,
Contract =
case lists:member(MFA, SCCMFAs) of
true -> none;
@@ -691,28 +696,24 @@ get_plt_constr(MFA, Dst, ArgVars, State) ->
none ->
{?mk_fun_var(fun(Map) ->
ArgTypes = lookup_type_list(ArgVars, Map),
- dialyzer_contracts:get_contract_return(C, ArgTypes)
+ get_contract_return(C, ArgTypes)
end, ArgVars), GenArgs};
{value, {PltRetType, PltArgTypes}} ->
%% Need to combine the contract with the success typing.
{?mk_fun_var(
fun(Map) ->
- ArgTypes0 = lookup_type_list(ArgVars, Map),
- ArgTypes = case FunModule =:= Module of
- false ->
- List = lists:zip(PltArgTypes, ArgTypes0),
- [erl_types:t_unopaque_on_mismatch(T1, T2, Opaques)
- || {T1, T2} <- List];
- true -> ArgTypes0
- end,
- CRet = dialyzer_contracts:get_contract_return(C, ArgTypes),
- t_inf(CRet, PltRetType, opaque)
+ ArgTypes = lookup_type_list(ArgVars, Map),
+ CRet = get_contract_return(C, ArgTypes),
+ t_inf(CRet, PltRetType)
end, ArgVars),
- [t_inf(X, Y, opaque) || {X, Y} <- lists:zip(GenArgs, PltArgTypes)]}
+ [t_inf(X, Y) || {X, Y} <- lists:zip(GenArgs, PltArgTypes)]}
end,
state__store_conj_lists([Dst|ArgVars], sub, [RetType|ArgCs], State)
end.
+get_contract_return(C, ArgTypes) ->
+ dialyzer_contracts:get_contract_return(C, ArgTypes).
+
filter_match_fail([Clause] = Cls) ->
Body = cerl:clause_body(Clause),
case cerl:type(Body) of
@@ -1045,6 +1046,9 @@ get_safe_underapprox_1([Pat|Left], Acc, Map) ->
{Ts, Map1} = get_safe_underapprox_1(Es, [], Map),
Type = t_tuple(Ts),
get_safe_underapprox_1(Left, [Type|Acc], Map1);
+ map ->
+ %% TODO: Can maybe do something here
+ throw(dont_know);
values ->
Es = cerl:values_es(Pat),
{Ts, Map1} = get_safe_underapprox_1(Es, [], Map),
@@ -1086,7 +1090,7 @@ get_bif_constr({erlang, Op, 2}, Dst, Args = [Arg1, Arg2], _State)
when Op =:= '+'; Op =:= '-'; Op =:= '*' ->
ReturnType = ?mk_fun_var(fun(Map) ->
TmpArgTypes = lookup_type_list(Args, Map),
- erl_bif_types:type(erlang, Op, 2, TmpArgTypes)
+ bif_return(erlang, Op, 2, TmpArgTypes)
end, Args),
ArgFun =
fun(A, Pos) ->
@@ -1128,8 +1132,8 @@ get_bif_constr({erlang, Op, 2}, Dst, [Arg1, Arg2] = Args, _State)
fun(LocalArg1, LocalArg2, LocalOp) ->
fun(Map) ->
DstType = lookup_type(Dst, Map),
- IsTrue = t_is_atom(true, DstType),
- IsFalse = t_is_atom(false, DstType),
+ IsTrue = t_is_any_atom(true, DstType),
+ IsFalse = t_is_any_atom(false, DstType),
case IsTrue orelse IsFalse of
true ->
Arg1Type = lookup_type(LocalArg1, Map),
@@ -1176,7 +1180,7 @@ get_bif_constr({erlang, Op, 2}, Dst, [Arg1, Arg2] = Args, _State)
Arg2Var = ?mk_fun_var(Arg2Fun, DstArgs),
DstVar = ?mk_fun_var(fun(Map) ->
TmpArgTypes = lookup_type_list(Args, Map),
- erl_bif_types:type(erlang, Op, 2, TmpArgTypes)
+ bif_return(erlang, Op, 2, TmpArgTypes)
end, Args),
mk_conj_constraint_list([mk_constraint(Dst, sub, DstVar),
mk_constraint(Arg1, sub, Arg1Var),
@@ -1218,7 +1222,7 @@ get_bif_constr({erlang, '++', 2}, Dst, [Hd, Tl] = Args, _State) ->
ArgTypes = erl_bif_types:arg_types(erlang, '++', 2),
ReturnType = ?mk_fun_var(fun(Map) ->
TmpArgTypes = lookup_type_list(Args, Map),
- erl_bif_types:type(erlang, '++', 2, TmpArgTypes)
+ bif_return(erlang, '++', 2, TmpArgTypes)
end, Args),
Cs = mk_constraints(Args, sub, ArgTypes),
mk_conj_constraint_list([mk_constraint(Dst, sub, ReturnType),
@@ -1240,7 +1244,7 @@ get_bif_constr({erlang, is_function, 1}, Dst, [Arg], State) ->
get_bif_constr({erlang, is_function, 2}, Dst, [Fun, Arity], _State) ->
ArgFun = fun(Map) ->
DstType = lookup_type(Dst, Map),
- case t_is_atom(true, DstType) of
+ case t_is_any_atom(true, DstType) of
true ->
ArityType = lookup_type(Arity, Map),
case t_number_vals(ArityType) of
@@ -1268,7 +1272,7 @@ get_bif_constr({erlang, is_reference, 1}, Dst, [Arg], State) ->
get_bif_test_constr(Dst, Arg, t_reference(), State);
get_bif_constr({erlang, is_record, 2}, Dst, [Var, Tag] = Args, _State) ->
ArgFun = fun(Map) ->
- case t_is_atom(true, lookup_type(Dst, Map)) of
+ case t_is_any_atom(true, lookup_type(Dst, Map)) of
true -> t_tuple();
false -> t_any()
end
@@ -1276,7 +1280,7 @@ get_bif_constr({erlang, is_record, 2}, Dst, [Var, Tag] = Args, _State) ->
ArgV = ?mk_fun_var(ArgFun, [Dst]),
DstFun = fun(Map) ->
TmpArgTypes = lookup_type_list(Args, Map),
- erl_bif_types:type(erlang, is_record, 2, TmpArgTypes)
+ bif_return(erlang, is_record, 2, TmpArgTypes)
end,
DstV = ?mk_fun_var(DstFun, Args),
mk_conj_constraint_list([mk_constraint(Dst, sub, DstV),
@@ -1285,10 +1289,9 @@ get_bif_constr({erlang, is_record, 2}, Dst, [Var, Tag] = Args, _State) ->
get_bif_constr({erlang, is_record, 3}, Dst, [Var, Tag, Arity] = Args, State) ->
%% TODO: Revise this to make it precise for Tag and Arity.
Records = State#state.records,
- AllOpaques = State#state.opaques,
ArgFun =
fun(Map) ->
- case t_is_atom(true, lookup_type(Dst, Map)) of
+ case t_is_any_atom(true, lookup_type(Dst, Map)) of
true ->
ArityType = lookup_type(Arity, Map),
case t_is_integer(ArityType) of
@@ -1304,10 +1307,7 @@ get_bif_constr({erlang, is_record, 3}, Dst, [Var, Tag, Arity] = Args, State) ->
[TagVal] ->
case lookup_record(Records, TagVal, ArityVal - 1) of
{ok, Type} ->
- case t_opaque_match_record(Type, AllOpaques) of
- [Opaque] -> Opaque;
- _ -> Type
- end;
+ Type;
error -> GenRecord
end;
_ -> GenRecord
@@ -1323,38 +1323,9 @@ get_bif_constr({erlang, is_record, 3}, Dst, [Var, Tag, Arity] = Args, State) ->
end,
ArgV = ?mk_fun_var(ArgFun, [Tag, Arity, Dst]),
DstFun = fun(Map) ->
- [TmpVar, TmpTag, TmpArity] = TmpArgTypes = lookup_type_list(Args, Map),
- TmpArgTypes2 =
- case lists:member(TmpVar, AllOpaques) of
- true ->
- case t_is_integer(TmpArity) of
- true ->
- case t_number_vals(TmpArity) of
- [TmpArityVal] ->
- case t_is_atom(TmpTag) of
- true ->
- case t_atom_vals(TmpTag) of
- [TmpTagVal] ->
- case lookup_record(Records, TmpTagVal,
- TmpArityVal - 1) of
- {ok, TmpType} ->
- case t_is_none(t_inf(TmpType, TmpVar, opaque)) of
- true -> TmpArgTypes;
- false -> [TmpType, TmpTag, TmpArity]
- end;
- error -> TmpArgTypes
- end;
- _ -> TmpArgTypes
- end;
- false -> TmpArgTypes
- end;
- _ -> TmpArgTypes
- end;
- false -> TmpArgTypes
- end;
- false -> TmpArgTypes
- end,
- erl_bif_types:type(erlang, is_record, 3, TmpArgTypes2)
+ [TmpVar, TmpTag, TmpArity] = lookup_type_list(Args, Map),
+ TmpArgTypes = [TmpVar,TmpTag,TmpArity],
+ bif_return(erlang, is_record, 3, TmpArgTypes)
end,
DstV = ?mk_fun_var(DstFun, Args),
mk_conj_constraint_list([mk_constraint(Dst, sub, DstV),
@@ -1369,12 +1340,14 @@ get_bif_constr({erlang, 'and', 2}, Dst, [Arg1, Arg2] = Args, _State) ->
ArgFun = fun(Var) ->
fun(Map) ->
DstType = lookup_type(Dst, Map),
- case t_is_atom(true, DstType) of
+ case t_is_any_atom(true, DstType) of
true -> True;
false ->
- case t_is_atom(false, DstType) of
+ case t_is_any_atom(false, DstType) of
true ->
- case t_is_atom(true, lookup_type(Var, Map)) of
+ case
+ t_is_any_atom(true, lookup_type(Var, Map))
+ of
true -> False;
false -> t_boolean()
end;
@@ -1386,15 +1359,15 @@ get_bif_constr({erlang, 'and', 2}, Dst, [Arg1, Arg2] = Args, _State) ->
end,
DstFun = fun(Map) ->
Arg1Type = lookup_type(Arg1, Map),
- case t_is_atom(false, Arg1Type) of
+ case t_is_any_atom(false, Arg1Type) of
true -> False;
false ->
Arg2Type = lookup_type(Arg2, Map),
- case t_is_atom(false, Arg2Type) of
+ case t_is_any_atom(false, Arg2Type) of
true -> False;
false ->
- case (t_is_atom(true, Arg1Type)
- andalso t_is_atom(true, Arg2Type)) of
+ case (t_is_any_atom(true, Arg1Type)
+ andalso t_is_any_atom(true, Arg2Type)) of
true -> True;
false -> t_boolean()
end
@@ -1413,12 +1386,14 @@ get_bif_constr({erlang, 'or', 2}, Dst, [Arg1, Arg2] = Args, _State) ->
ArgFun = fun(Var) ->
fun(Map) ->
DstType = lookup_type(Dst, Map),
- case t_is_atom(false, DstType) of
+ case t_is_any_atom(false, DstType) of
true -> False;
false ->
- case t_is_atom(true, DstType) of
+ case t_is_any_atom(true, DstType) of
true ->
- case t_is_atom(false, lookup_type(Var, Map)) of
+ case
+ t_is_any_atom(false, lookup_type(Var, Map))
+ of
true -> True;
false -> t_boolean()
end;
@@ -1430,15 +1405,15 @@ get_bif_constr({erlang, 'or', 2}, Dst, [Arg1, Arg2] = Args, _State) ->
end,
DstFun = fun(Map) ->
Arg1Type = lookup_type(Arg1, Map),
- case t_is_atom(true, Arg1Type) of
+ case t_is_any_atom(true, Arg1Type) of
true -> True;
false ->
Arg2Type = lookup_type(Arg2, Map),
- case t_is_atom(true, Arg2Type) of
+ case t_is_any_atom(true, Arg2Type) of
true -> True;
false ->
- case (t_is_atom(false, Arg1Type)
- andalso t_is_atom(false, Arg2Type)) of
+ case (t_is_any_atom(false, Arg1Type)
+ andalso t_is_any_atom(false, Arg2Type)) of
true -> False;
false -> t_boolean()
end
@@ -1465,10 +1440,10 @@ get_bif_constr({erlang, 'not', 1}, Dst, [Arg] = Args, _State) ->
Fun = fun(Var) ->
fun(Map) ->
Type = lookup_type(Var, Map),
- case t_is_atom(true, Type) of
+ case t_is_any_atom(true, Type) of
true -> False;
false ->
- case t_is_atom(false, Type) of
+ case t_is_any_atom(false, Type) of
true -> True;
false -> t_boolean()
end
@@ -1485,10 +1460,10 @@ get_bif_constr({erlang, '=:=', 2}, Dst, [Arg1, Arg2] = Args, _State) ->
fun(Map) ->
DstType = lookup_type(Dst, Map),
OtherVarType = lookup_type(OtherVar, Map),
- case t_is_atom(true, DstType) of
+ case t_is_any_atom(true, DstType) of
true -> OtherVarType;
false ->
- case t_is_atom(false, DstType) of
+ case t_is_any_atom(false, DstType) of
true ->
case is_singleton_type(OtherVarType) of
true -> t_subtract(lookup_type(Self, Map), OtherVarType);
@@ -1518,7 +1493,7 @@ get_bif_constr({erlang, '=:=', 2}, Dst, [Arg1, Arg2] = Args, _State) ->
get_bif_constr({erlang, '==', 2}, Dst, [Arg1, Arg2] = Args, _State) ->
DstFun = fun(Map) ->
TmpArgTypes = lookup_type_list(Args, Map),
- erl_bif_types:type(erlang, '==', 2, TmpArgTypes)
+ bif_return(erlang, '==', 2, TmpArgTypes)
end,
ArgFun =
fun(Var, Self) ->
@@ -1527,16 +1502,16 @@ get_bif_constr({erlang, '==', 2}, Dst, [Arg1, Arg2] = Args, _State) ->
DstType = lookup_type(Dst, Map),
case is_singleton_non_number_type(VarType) of
true ->
- case t_is_atom(true, DstType) of
+ case t_is_any_atom(true, DstType) of
true -> VarType;
false ->
- case t_is_atom(false, DstType) of
+ case t_is_any_atom(false, DstType) of
true -> t_subtract(lookup_type(Self, Map), VarType);
false -> t_any()
end
end;
false ->
- case t_is_atom(true, DstType) of
+ case t_is_any_atom(true, DstType) of
true ->
case t_is_number(VarType) of
true -> t_number();
@@ -1560,18 +1535,14 @@ get_bif_constr({erlang, '==', 2}, Dst, [Arg1, Arg2] = Args, _State) ->
mk_constraint(Arg1, sub, ArgV1),
mk_constraint(Arg2, sub, ArgV2)]);
get_bif_constr({erlang, element, 2} = _BIF, Dst, Args,
- #state{cs = Constrs, opaques = Opaques}) ->
+ #state{cs = Constrs}) ->
GenType = erl_bif_types:type(erlang, element, 2),
case t_is_none(GenType) of
true -> ?debug("Bif: ~w failed\n", [_BIF]), throw(error);
false ->
Fun = fun(Map) ->
- [I, T] = ATs = lookup_type_list(Args, Map),
- ATs2 = case lists:member(T, Opaques) of
- true -> [I, erl_types:t_opaque_structure(T)];
- false -> ATs
- end,
- erl_bif_types:type(erlang, element, 2, ATs2)
+ ATs2 = lookup_type_list(Args, Map),
+ bif_return(erlang, element, 2, ATs2)
end,
ReturnType = ?mk_fun_var(Fun, Args),
ArgTypes = erl_bif_types:arg_types(erlang, element, 2),
@@ -1583,22 +1554,14 @@ get_bif_constr({erlang, element, 2} = _BIF, Dst, Args,
end,
mk_conj_constraint_list([mk_constraint(Dst, sub, ReturnType)|NewCs])
end;
-get_bif_constr({M, F, A} = _BIF, Dst, Args, State) ->
+get_bif_constr({M, F, A} = _BIF, Dst, Args, _State) ->
GenType = erl_bif_types:type(M, F, A),
- Opaques = State#state.opaques,
case t_is_none(GenType) of
true -> ?debug("Bif: ~w failed\n", [_BIF]), throw(error);
false ->
- UnopaqueFun =
- fun(T) -> case lists:member(T, Opaques) of
- true -> erl_types:t_unopaque(T, [T]);
- false -> T
- end
- end,
ReturnType = ?mk_fun_var(fun(Map) ->
- TmpArgTypes0 = lookup_type_list(Args, Map),
- TmpArgTypes = [UnopaqueFun(T) || T<- TmpArgTypes0],
- erl_bif_types:type(M, F, A, TmpArgTypes)
+ TmpArgTypes = lookup_type_list(Args, Map),
+ bif_return(M, F, A, TmpArgTypes)
end, Args),
case erl_bif_types:is_known(M, F, A) of
false ->
@@ -1616,12 +1579,12 @@ get_bif_constr({M, F, A} = _BIF, Dst, Args, State) ->
end.
eval_inv_arith('+', _Pos, Dst, Arg) ->
- erl_bif_types:type(erlang, '-', 2, [Dst, Arg]);
+ bif_return(erlang, '-', 2, [Dst, Arg]);
eval_inv_arith('*', _Pos, Dst, Arg) ->
case t_number_vals(Arg) of
[0] -> t_integer();
_ ->
- TmpRet = erl_bif_types:type(erlang, 'div', 2, [Dst, Arg]),
+ TmpRet = bif_return(erlang, 'div', 2, [Dst, Arg]),
Zero = t_from_term(0),
%% If 0 is not part of the result, it cannot be part of the argument.
case t_is_subtype(Zero, Dst) of
@@ -1630,9 +1593,9 @@ eval_inv_arith('*', _Pos, Dst, Arg) ->
end
end;
eval_inv_arith('-', 1, Dst, Arg) ->
- erl_bif_types:type(erlang, '-', 2, [Arg, Dst]);
+ bif_return(erlang, '-', 2, [Arg, Dst]);
eval_inv_arith('-', 2, Dst, Arg) ->
- erl_bif_types:type(erlang, '+', 2, [Arg, Dst]).
+ bif_return(erlang, '+', 2, [Arg, Dst]).
range_inc(neg_inf) -> neg_inf;
range_inc(pos_inf) -> pos_inf;
@@ -1642,33 +1605,20 @@ range_dec(neg_inf) -> neg_inf;
range_dec(pos_inf) -> pos_inf;
range_dec(Int) when is_integer(Int) -> Int - 1.
-get_bif_test_constr(Dst, Arg, Type, State) ->
+get_bif_test_constr(Dst, Arg, Type, _State) ->
ArgFun = fun(Map) ->
DstType = lookup_type(Dst, Map),
- case t_is_atom(true, DstType) of
+ case t_is_any_atom(true, DstType) of
true -> Type;
false -> t_any()
end
end,
ArgV = ?mk_fun_var(ArgFun, [Dst]),
- Opaques = State#state.opaques,
DstFun = fun(Map) ->
ArgType = lookup_type(Arg, Map),
case t_is_none(t_inf(ArgType, Type)) of
true ->
- case lists:member(ArgType, Opaques) of
- true ->
- OpaqueStruct = erl_types:t_opaque_structure(ArgType),
- case t_is_none(t_inf(OpaqueStruct, Type)) of
- true -> t_from_term(false);
- false ->
- case t_is_subtype(ArgType, Type) of
- true -> t_from_term(true);
- false -> t_boolean()
- end
- end;
- false -> t_from_term(false)
- end;
+ t_from_term(false);
false ->
case t_is_subtype(ArgType, Type) of
true -> t_from_term(true);
@@ -1784,7 +1734,6 @@ minimize_state(#state{
fun_arities = FunArities,
self_rec = SelfRec,
prop_types = {d, PropTypes},
- opaques = Opaques,
solvers = Solvers
}) ->
Opts = [{read_concurrency, true}],
@@ -1798,7 +1747,6 @@ minimize_state(#state{
fun_arities = FunArities,
self_rec = SelfRec,
prop_types = {e, ETSPropTypes},
- opaques = Opaques,
solvers = Solvers
}.
@@ -1947,7 +1895,7 @@ sane_maps(Map1, Map2, Keys, _S1, _S2) ->
%% Solver v2
--record(v2_state, {constr_data = dict:new() :: dict(),
+-record(v2_state, {constr_data = dict:new() :: dict:dict(),
state :: #state{}}).
v2_solve_ref(Fun, Map, State) ->
@@ -1956,8 +1904,7 @@ v2_solve_ref(Fun, Map, State) ->
{ok, NewMap}.
v2_solve(#constraint{}=C, Map, V2State) ->
- State = V2State#v2_state.state,
- case solve_one_c(C, Map, State#state.opaques) of
+ case solve_one_c(C, Map) of
error ->
report_failed_constraint(C, Map),
{error, V2State};
@@ -2031,7 +1978,7 @@ v2_solve_self_recursive(Cs, Map, Id, RecType0, V2State0) ->
{ok, NewMap, V2State, U} ->
pp_map("recursive finished", NewMap),
NewRecType = unsafe_lookup_type(Id, NewMap),
- case t_is_equal(NewRecType, RecType0) of
+ case is_equal(NewRecType, RecType0) of
true ->
{NewMap2, U1} = enter_var_type(RecVar, NewRecType, NewMap),
{ok, NewMap2, V2State, lists:umerge(U, U1)};
@@ -2397,7 +2344,7 @@ solve_self_recursive(Cs, Map, MapDict, Id, RecType0, State) ->
{ok, NewMapDict, NewMap} ->
pp_map("NewMap", NewMap),
NewRecType = unsafe_lookup_type(Id, NewMap),
- case t_is_equal(NewRecType, RecType0) of
+ case is_equal(NewRecType, RecType0) of
true ->
{ok, NewMapDict, enter_type(RecVar, NewRecType, NewMap)};
false ->
@@ -2447,7 +2394,7 @@ solve_cs([#constraint_list{} = C|Tail], Map, MapDict, State) ->
{error, _NewMapDict} = Error -> Error
end;
solve_cs([#constraint{} = C|Tail], Map, MapDict, State) ->
- case solve_one_c(C, Map, State#state.opaques) of
+ case solve_one_c(C, Map) of
error ->
report_failed_constraint(C, Map),
{error, MapDict};
@@ -2457,10 +2404,10 @@ solve_cs([#constraint{} = C|Tail], Map, MapDict, State) ->
solve_cs([], Map, MapDict, _State) ->
{ok, MapDict, Map}.
-solve_one_c(#constraint{lhs = Lhs, rhs = Rhs, op = Op}, Map, Opaques) ->
+solve_one_c(#constraint{lhs = Lhs, rhs = Rhs, op = Op}, Map) ->
LhsType = lookup_type(Lhs, Map),
RhsType = lookup_type(Rhs, Map),
- Inf = t_inf(LhsType, RhsType, opaque),
+ Inf = t_inf(LhsType, RhsType),
?debug("Solving: ~s :: ~s ~w ~s :: ~s\n\tInf: ~s\n",
[format_type(Lhs), format_type(LhsType), Op,
format_type(Rhs), format_type(RhsType), format_type(Inf)]),
@@ -2468,12 +2415,12 @@ solve_one_c(#constraint{lhs = Lhs, rhs = Rhs, op = Op}, Map, Opaques) ->
true -> error;
false ->
case Op of
- sub -> solve_subtype(Lhs, Inf, Map, Opaques);
+ sub -> solve_subtype(Lhs, Inf, Map);
eq ->
- case solve_subtype(Lhs, Inf, Map, Opaques) of
+ case solve_subtype(Lhs, Inf, Map) of
error -> error;
{ok, {Map1, U1}} ->
- case solve_subtype(Rhs, Inf, Map1, Opaques) of
+ case solve_subtype(Rhs, Inf, Map1) of
error -> error;
{ok, {Map2, U2}} -> {ok, {Map2, lists:umerge(U1, U2)}}
end
@@ -2481,7 +2428,7 @@ solve_one_c(#constraint{lhs = Lhs, rhs = Rhs, op = Op}, Map, Opaques) ->
end
end.
-solve_subtype(Type, Inf, Map, Opaques) ->
+solve_subtype(Type, Inf, Map) ->
%% case cerl:is_literal(Type) of
%% true ->
%% case t_is_subtype(t_from_term(cerl:concrete(Type)), Inf) of
@@ -2489,7 +2436,7 @@ solve_subtype(Type, Inf, Map, Opaques) ->
%% false -> error
%% end;
%% false ->
- try t_unify(Type, Inf, Opaques) of
+ try t_unify(Type, Inf) of
{_, List} -> {ok, enter_type_list(List, Map)}
catch
throw:{mismatch, _T1, _T2} ->
@@ -2540,7 +2487,7 @@ join_one_key(Key, [Map|Maps], Type) ->
true -> Type;
false ->
NewType = lookup_type(Key, Map),
- case t_is_equal(NewType, Type) of
+ case is_equal(NewType, Type) of
true -> join_one_key(Key, Maps, Type);
false -> join_one_key(Key, Maps, t_sup(NewType, Type))
end
@@ -2555,7 +2502,7 @@ maps_are_equal(Map1, Map2, Deps) ->
maps_are_equal_1(Map1, Map2, [H|Tail]) ->
T1 = lookup_type(H, Map1),
T2 = lookup_type(H, Map2),
- case t_is_equal(T1, T2) of
+ case is_equal(T1, T2) of
true -> maps_are_equal_1(Map1, Map2, Tail);
false ->
?debug("~w: ~s =/= ~s\n", [H, format_type(T1), format_type(T2)]),
@@ -2587,14 +2534,22 @@ prune_keys(Map1, Map2, Deps) ->
enter_type(Key, Val, Map) when is_integer(Key) ->
?debug("Entering ~s :: ~s\n", [format_type(t_var(Key)), format_type(Val)]),
- case t_is_any(Val) of
+ %% Keep any() in the map if it is opaque:
+ case is_equal(Val, t_any()) of
true ->
erase_type(Key, Map);
false ->
LimitedVal = t_limit(Val, ?INTERNAL_TYPE_LIMIT),
+ case is_equal(LimitedVal, Val) of
+ true -> ok;
+ false -> ?debug("LimitedVal ~s\n", [format_type(LimitedVal)])
+ end,
case dict:find(Key, Map) of
- {ok, LimitedVal} -> Map;
- {ok, _} -> map_store(Key, LimitedVal, Map);
+ {ok, Value} ->
+ case is_equal(Value, LimitedVal) of
+ true -> Map;
+ false -> map_store(Key, LimitedVal, Map)
+ end;
error -> map_store(Key, LimitedVal, Map)
end
end;
@@ -2681,7 +2636,10 @@ updated_vars_only(U, OldMap, NewMap) ->
[V || V <- U, not is_same(V, OldMap, NewMap)].
is_same(Key, Map1, Map2) ->
- t_is_equal(lookup_type(Key, Map1), lookup_type(Key, Map2)).
+ is_equal(lookup_type(Key, Map1), lookup_type(Key, Map2)).
+
+is_equal(Type1, Type2) ->
+ t_is_equal(Type1, Type2).
pp_map(_S, _Map) ->
?debug("\t~s: ~p\n",
@@ -2716,11 +2674,6 @@ new_state(SCC0, NextLabel, CallGraph, Plt, PropTypes, Solvers) ->
state__set_rec_dict(State, RecDict) ->
State#state{records = RecDict}.
-state__set_opaques(#state{records = RecDict} = State, {M, _F, _A}) ->
- Opaques =
- erl_types:module_builtin_opaques(M) ++ t_opaque_from_records(RecDict),
- State#state{opaques = Opaques, module = M}.
-
state__set_in_match(State, Bool) ->
State#state{in_match = Bool}.
@@ -2760,7 +2713,8 @@ state__lookup_undef_var(Tree, #state{callgraph = CG, plt = Plt}) ->
{ok, MFA} ->
case dialyzer_plt:lookup(Plt, MFA) of
none -> error;
- {value, {RetType, ArgTypes}} -> {ok, t_fun(ArgTypes, RetType)}
+ {value, {RetType, ArgTypes}} ->
+ {ok, t_fun(ArgTypes, RetType)}
end
end.
@@ -2897,7 +2851,7 @@ state__get_cs(Var, #state{cmap = {d, Dict}}) ->
dict:fetch(Var, Dict).
state__is_self_rec(Fun, #state{self_rec = SelfRec}) ->
- Fun =:= SelfRec.
+ not (SelfRec =:= 'false') andalso is_equal(Fun, SelfRec).
state__store_funs(Vars0, Funs0, #state{fun_map = Map} = State) ->
debug_make_name_map(Vars0, Funs0),
@@ -2923,7 +2877,9 @@ state__finalize(State) ->
%%
%% ============================================================================
--spec mk_constraint(erl_types:erl_type(), constr_op(), fvar_or_type()) -> #constraint{}.
+-spec mk_constraint(erl_types:erl_type(),
+ constr_op(),
+ fvar_or_type()) -> #constraint{}.
mk_constraint(Lhs, Op, Rhs) ->
case t_is_any(Lhs) orelse constraint_opnd_is_any(Rhs) of
@@ -2934,9 +2890,9 @@ mk_constraint(Lhs, Op, Rhs) ->
case Deps =:= [] of
true ->
%% This constraint is constant. Solve it immediately.
- case solve_one_c(C, map_new(), []) of
+ case solve_one_c(C, map_new()) of
error -> throw(error);
- _ ->
+ _R ->
%% This is always true, keep it anyway for logistic reasons
C
end;
@@ -2944,10 +2900,13 @@ mk_constraint(Lhs, Op, Rhs) ->
C
end;
true ->
- C = mk_constraint_1(t_any(), Op, t_any()),
- C#constraint{deps = []}
+ mk_constraint_any(Op)
end.
+mk_constraint_any(Op) ->
+ C = mk_constraint_1(t_any(), Op, t_any()),
+ C#constraint{deps = []}.
+
%% the following function is used so that we do not call
%% erl_types:t_is_any/1 with a term other than an erl_type()
-spec constraint_opnd_is_any(fvar_or_type()) -> boolean().
@@ -3002,7 +2961,8 @@ mk_constraint_1(Lhs, Op, Rhs) ->
#constraint{lhs = Lhs, op = Op, rhs = Rhs}.
mk_constraints([Lhs|LhsTail], Op, [Rhs|RhsTail]) ->
- [mk_constraint(Lhs, Op, Rhs)|mk_constraints(LhsTail, Op, RhsTail)];
+ [mk_constraint(Lhs, Op, Rhs) |
+ mk_constraints(LhsTail, Op, RhsTail)];
mk_constraints([], _Op, []) ->
[].
@@ -3017,7 +2977,7 @@ mk_constraint_list(Type, List) ->
Deps = calculate_deps(List2),
case Deps =:= [] of
true -> #constraint_list{type = conj,
- list = [mk_constraint(t_any(), eq, t_any())],
+ list = [mk_constraint_any(eq)],
deps = []};
false -> #constraint_list{type = Type, list = List2, deps = Deps}
end.
@@ -3236,6 +3196,9 @@ calculate_masks([], _I, L) ->
%%
%% ============================================================================
+bif_return(M, F, A, Xs) ->
+ erl_bif_types:type(M, F, A, Xs).
+
is_singleton_non_number_type(Type) ->
case t_is_number(Type) of
true -> false;
@@ -3265,7 +3228,7 @@ is_singleton_type(Type) ->
find_element(Args, Cs) ->
[Pos, Tuple] = Args,
- case erl_types:t_is_number(Pos) of
+ case t_is_number(Pos) of
true ->
case erl_types:t_number_vals(Pos) of
'unknown' -> 'unknown';
@@ -3301,8 +3264,10 @@ find_constraint(Tuple, [_|Cs]) ->
lookup_record(Records, Tag, Arity) ->
case erl_types:lookup_record(Tag, Arity, Records) of
{ok, Fields} ->
- {ok, t_tuple([t_from_term(Tag)|
- [FieldType || {_FieldName, FieldType} <- Fields]])};
+ RecType =
+ t_tuple([t_from_term(Tag)|
+ [FieldType || {_FieldName, FieldType} <- Fields]]),
+ {ok, RecType};
error ->
error
end.
diff --git a/lib/dialyzer/src/dialyzer_utils.erl b/lib/dialyzer/src/dialyzer_utils.erl
index a4c4d37a0f..21183e3459 100644
--- a/lib/dialyzer/src/dialyzer_utils.erl
+++ b/lib/dialyzer/src/dialyzer_utils.erl
@@ -2,7 +2,7 @@
%%-----------------------------------------------------------------------
%% %CopyrightBegin%
%%
-%% Copyright Ericsson AB 2006-2013. All Rights Reserved.
+%% Copyright Ericsson AB 2006-2014. 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
@@ -164,14 +164,14 @@ get_core_from_abstract_code(AbstrCode, Opts) ->
%% ============================================================================
-spec get_record_and_type_info(abstract_code()) ->
- {'ok', dict()} | {'error', string()}.
+ {'ok', dict:dict()} | {'error', string()}.
get_record_and_type_info(AbstractCode) ->
Module = get_module(AbstractCode),
get_record_and_type_info(AbstractCode, Module, dict:new()).
--spec get_record_and_type_info(abstract_code(), module(), dict()) ->
- {'ok', dict()} | {'error', string()}.
+-spec get_record_and_type_info(abstract_code(), module(), dict:dict()) ->
+ {'ok', dict:dict()} | {'error', string()}.
get_record_and_type_info(AbstractCode, Module, RecDict) ->
get_record_and_type_info(AbstractCode, Module, [], RecDict).
@@ -304,7 +304,7 @@ process_record_remote_types(CServer) ->
CServer1 = dialyzer_codeserver:finalize_records(NewRecords, CServer),
dialyzer_codeserver:finalize_exported_types(TempExpTypes, CServer1).
--spec merge_records(dict(), dict()) -> dict().
+-spec merge_records(dict:dict(), dict:dict()) -> dict:dict().
merge_records(NewRecords, OldRecords) ->
dict:merge(fun(_Key, NewVal, _OldVal) -> NewVal end, NewRecords, OldRecords).
@@ -315,10 +315,10 @@ merge_records(NewRecords, OldRecords) ->
%%
%% ============================================================================
--type spec_dict() :: dict().
--type callback_dict() :: dict().
+-type spec_dict() :: dict:dict().
+-type callback_dict() :: dict:dict().
--spec get_spec_info(atom(), abstract_code(), dict()) ->
+-spec get_spec_info(atom(), abstract_code(), dict:dict()) ->
{'ok', spec_dict(), callback_dict()} | {'error', string()}.
get_spec_info(ModName, AbstractCode, RecordsDict) ->
@@ -383,7 +383,7 @@ get_spec_info([], SpecDict, CallbackDict, _RecordsDict, _ModName, _File) ->
%%
%% ============================================================================
--spec sets_filter([module()], set()) -> set().
+-spec sets_filter([module()], sets:set()) -> sets:set().
sets_filter([], ExpTypes) ->
ExpTypes;
@@ -434,7 +434,7 @@ format_errors([]) ->
format_sig(Type) ->
format_sig(Type, dict:new()).
--spec format_sig(erl_types:erl_type(), dict()) -> string().
+-spec format_sig(erl_types:erl_type(), dict:dict()) -> string().
format_sig(Type, RecDict) ->
"fun(" ++ Sig = lists:flatten(erl_types:t_to_string(Type, RecDict)),
@@ -450,11 +450,10 @@ flat_format(Fmt, Lst) ->
%% Created : 5 March 2007
%%-------------------------------------------------------------------
+-spec pp_hook() -> fun((cerl:cerl(), _, _) -> term()).
pp_hook() ->
fun pp_hook/3.
--spec pp_hook() -> fun((cerl:cerl(), _, _) -> term()).
-
pp_hook(Node, Ctxt, Cont) ->
case cerl:type(Node) of
binary ->
diff --git a/lib/dialyzer/test/Makefile b/lib/dialyzer/test/Makefile
index 9f8a3f1194..f43e04dd59 100644
--- a/lib/dialyzer/test/Makefile
+++ b/lib/dialyzer/test/Makefile
@@ -7,9 +7,11 @@ include $(ERL_TOP)/make/$(TARGET)/otp.mk
AUXILIARY_FILES=\
dialyzer.spec\
+ dialyzer.cover\
dialyzer_test_constants.hrl\
dialyzer_common.erl\
file_utils.erl\
+ dialyzer_SUITE.erl\
plt_SUITE.erl
# ----------------------------------------------------
diff --git a/lib/dialyzer/test/dialyzer.cover b/lib/dialyzer/test/dialyzer.cover
new file mode 100644
index 0000000000..cc61ea1901
--- /dev/null
+++ b/lib/dialyzer/test/dialyzer.cover
@@ -0,0 +1,3 @@
+%% -*- erlang -*-
+{incl_app,dialyzer,details}.
+%{incl_mods,dialyzer,[erl_types,erl_bif_types]}.
diff --git a/lib/dialyzer/test/dialyzer_SUITE.erl b/lib/dialyzer/test/dialyzer_SUITE.erl
new file mode 100644
index 0000000000..1b62291a00
--- /dev/null
+++ b/lib/dialyzer/test/dialyzer_SUITE.erl
@@ -0,0 +1,77 @@
+%%
+%% %CopyrightBegin%
+%%
+%% Copyright Ericsson AB 2014. 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(dialyzer_SUITE).
+
+-include_lib("test_server/include/test_server.hrl").
+
+%% Default timetrap timeout (set in init_per_testcase).
+-define(default_timeout, ?t:minutes(1)).
+-define(application, dialyzer).
+
+%% Test server specific exports
+-export([all/0, suite/0,groups/0,init_per_suite/1, end_per_suite/1,
+ init_per_group/2,end_per_group/2]).
+-export([init_per_testcase/2, end_per_testcase/2]).
+
+%% Test cases must be exported.
+-export([app_test/1, appup_test/1]).
+
+suite() -> [{ct_hooks,[ts_install_cth]}].
+
+all() ->
+ [app_test, appup_test].
+
+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) ->
+ ?line Dog=test_server:timetrap(?default_timeout),
+ [{watchdog, Dog}|Config].
+end_per_testcase(_Case, Config) ->
+ Dog=?config(watchdog, Config),
+ test_server:timetrap_cancel(Dog),
+ ok.
+
+%%%
+%%% Test cases starts here.
+%%%
+
+app_test(doc) ->
+ ["Test that the .app file does not contain any `basic' errors"];
+app_test(suite) ->
+ [];
+app_test(Config) when is_list(Config) ->
+ ?line ?t:app_test(dialyzer).
+
+%% Test that the .appup file does not contain any `basic' errors
+appup_test(Config) when is_list(Config) ->
+ ok = ?t:appup_test(dialyzer).
diff --git a/lib/dialyzer/test/file_utils.erl b/lib/dialyzer/test/file_utils.erl
index 36b368760c..e1314ec8de 100644
--- a/lib/dialyzer/test/file_utils.erl
+++ b/lib/dialyzer/test/file_utils.erl
@@ -106,7 +106,7 @@ lcs_fast(S1, S2) ->
-spec lcs_fast([string()], [string()],
pos_integer(), pos_integer(),
- non_neg_integer(), array()) -> {[string()], array()}.
+ non_neg_integer(), array:array()) -> {[string()], array:array()}.
lcs_fast([], _, _, _, _, Acc) ->
{[], Acc};
diff --git a/lib/dialyzer/test/opaque_SUITE_data/dialyzer_options b/lib/dialyzer/test/opaque_SUITE_data/dialyzer_options
index 3ff26b87db..44a65f6e90 100644
--- a/lib/dialyzer/test/opaque_SUITE_data/dialyzer_options
+++ b/lib/dialyzer/test/opaque_SUITE_data/dialyzer_options
@@ -1 +1 @@
-{dialyzer_options, [{warnings, [no_unused, no_return]}]}.
+{dialyzer_options, [{warnings, [no_unused, no_return, no_unknown]}]}.
diff --git a/lib/dialyzer/test/opaque_SUITE_data/results/array b/lib/dialyzer/test/opaque_SUITE_data/results/array
index b05d088a03..9921b61669 100644
--- a/lib/dialyzer/test/opaque_SUITE_data/results/array
+++ b/lib/dialyzer/test/opaque_SUITE_data/results/array
@@ -1,3 +1,3 @@
-array_use.erl:12: The type test is_tuple(array()) breaks the opaqueness of the term array()
-array_use.erl:9: The attempt to match a term of type array() against the pattern {'array', _, _, 'undefined', _} breaks the opaqueness of the term
+array_use.erl:12: The type test is_tuple(array:array(_)) breaks the opaqueness of the term array:array(_)
+array_use.erl:9: The attempt to match a term of type array:array(_) against the pattern {'array', _, _, 'undefined', _} breaks the opaqueness of the term
diff --git a/lib/dialyzer/test/opaque_SUITE_data/results/crash b/lib/dialyzer/test/opaque_SUITE_data/results/crash
index 1ddae5149f..69bdc00257 100644
--- a/lib/dialyzer/test/opaque_SUITE_data/results/crash
+++ b/lib/dialyzer/test/opaque_SUITE_data/results/crash
@@ -1,6 +1,6 @@
crash_1.erl:45: Record construction #targetlist{list::[]} violates the declared type of field list::'undefined' | crash_1:target()
-crash_1.erl:48: The call crash_1:get_using_branch2(Branch::maybe_improper_list(),L::'undefined' | crash_1:target()) contains an opaque term as 2nd argument when terms of different types are expected in these positions
+crash_1.erl:48: The call crash_1:get_using_branch2(Branch::maybe_improper_list(),L::'undefined' | crash_1:target()) will never return since it differs in the 2nd argument from the success typing arguments: (any(),maybe_improper_list())
crash_1.erl:50: The pattern <_Branch, []> can never match the type <maybe_improper_list(),'undefined' | crash_1:target()>
crash_1.erl:52: The pattern <Branch, [H = {'target', _, _} | _T]> can never match the type <maybe_improper_list(),'undefined' | crash_1:target()>
crash_1.erl:54: The pattern <Branch, [{'target', _, _} | T]> can never match the type <maybe_improper_list(),'undefined' | crash_1:target()>
diff --git a/lib/dialyzer/test/opaque_SUITE_data/results/dict b/lib/dialyzer/test/opaque_SUITE_data/results/dict
index 5c6bf6a927..42f6663191 100644
--- a/lib/dialyzer/test/opaque_SUITE_data/results/dict
+++ b/lib/dialyzer/test/opaque_SUITE_data/results/dict
@@ -1,15 +1,15 @@
-dict_use.erl:41: The attempt to match a term of type dict() against the pattern 'gazonk' breaks the opaqueness of the term
-dict_use.erl:45: The attempt to match a term of type dict() against the pattern [] breaks the opaqueness of the term
-dict_use.erl:46: The attempt to match a term of type dict() against the pattern 42 breaks the opaqueness of the term
-dict_use.erl:51: The attempt to match a term of type dict() against the pattern [] breaks the opaqueness of the term
-dict_use.erl:52: The attempt to match a term of type dict() against the pattern 42 breaks the opaqueness of the term
-dict_use.erl:58: Attempt to test for equality between a term of type maybe_improper_list() and a term of opaque type dict()
-dict_use.erl:60: Attempt to test for inequality between a term of type atom() and a term of opaque type dict()
-dict_use.erl:64: Guard test length(D::dict()) breaks the opaqueness of its argument
-dict_use.erl:65: Guard test is_atom(D::dict()) breaks the opaqueness of its argument
-dict_use.erl:66: Guard test is_list(D::dict()) breaks the opaqueness of its argument
-dict_use.erl:70: The type test is_list(dict()) breaks the opaqueness of the term dict()
-dict_use.erl:73: The call dict:fetch('foo',[1 | 2 | 3,...]) does not have an opaque term of type dict() as 2nd argument
+dict_use.erl:41: The attempt to match a term of type dict:dict(_,_) against the pattern 'gazonk' breaks the opaqueness of the term
+dict_use.erl:45: The attempt to match a term of type dict:dict(_,_) against the pattern [] breaks the opaqueness of the term
+dict_use.erl:46: The attempt to match a term of type dict:dict(_,_) against the pattern 42 breaks the opaqueness of the term
+dict_use.erl:51: The attempt to match a term of type dict:dict(_,_) against the pattern [] breaks the opaqueness of the term
+dict_use.erl:52: The attempt to match a term of type dict:dict(_,_) against the pattern 42 breaks the opaqueness of the term
+dict_use.erl:58: Attempt to test for equality between a term of type maybe_improper_list() and a term of opaque type dict:dict(_,_)
+dict_use.erl:60: Attempt to test for inequality between a term of type atom() and a term of opaque type dict:dict(_,_)
+dict_use.erl:64: Guard test length(D::dict:dict(_,_)) breaks the opaqueness of its argument
+dict_use.erl:65: Guard test is_atom(D::dict:dict(_,_)) breaks the opaqueness of its argument
+dict_use.erl:66: Guard test is_list(D::dict:dict(_,_)) breaks the opaqueness of its argument
+dict_use.erl:70: The type test is_list(dict:dict(_,_)) breaks the opaqueness of the term dict:dict(_,_)
+dict_use.erl:73: The call dict:fetch('foo',[1 | 2 | 3,...]) does not have an opaque term of type dict:dict(_,_) as 2nd argument
dict_use.erl:76: The call dict:merge(Fun::any(),42,[1 | 2,...]) does not have opaque terms as 2nd and 3rd arguments
-dict_use.erl:79: The call dict:store(42,'elli',{'dict',0,16,16,8,80,48,{[],[],[],[],[],[],[],[],[],[],[],[],[],[],[],[]},{{[],[],[],[],[],[],[],[],[],[],[],[],[],[],[],[]}}}) does not have an opaque term of type dict() as 3rd argument
+dict_use.erl:79: The call dict:store(42,'elli',{'dict',0,16,16,8,80,48,{[],[],[],[],[],[],[],[],[],[],[],[],[],[],[],[]},{{[],[],[],[],[],[],[],[],[],[],[],[],[],[],[],[]}}}) does not have an opaque term of type dict:dict(_,_) as 3rd argument
diff --git a/lib/dialyzer/test/opaque_SUITE_data/results/ets b/lib/dialyzer/test/opaque_SUITE_data/results/ets
index 5498ba1538..e11c7a8352 100644
--- a/lib/dialyzer/test/opaque_SUITE_data/results/ets
+++ b/lib/dialyzer/test/opaque_SUITE_data/results/ets
@@ -1,3 +1,4 @@
-ets_use.erl:12: Guard test is_integer(T::atom() | tid()) breaks the opaqueness of its argument
-ets_use.erl:7: Guard test is_integer(T::tid()) breaks the opaqueness of its argument
+ets_use.erl:12: Guard test is_integer(T::atom() | ets:tid()) breaks the opaqueness of its argument
+ets_use.erl:20: The type test is_integer(atom() | ets:tid()) breaks the opaqueness of the term atom() | ets:tid()
+ets_use.erl:7: Guard test is_integer(T::ets:tid()) breaks the opaqueness of its argument
diff --git a/lib/dialyzer/test/opaque_SUITE_data/results/ewgi b/lib/dialyzer/test/opaque_SUITE_data/results/ewgi
index 3c8cfb59f8..209f27b2f2 100644
--- a/lib/dialyzer/test/opaque_SUITE_data/results/ewgi
+++ b/lib/dialyzer/test/opaque_SUITE_data/results/ewgi
@@ -1,4 +1,4 @@
-ewgi_api.erl:55: The call gb_trees:to_list({non_neg_integer(),'nil' | {_,_,_,_}}) does not have an opaque term of type gb_tree() as 1st argument
-ewgi_testapp.erl:35: The call ewgi_testapp:htmlise_data("request_data",{non_neg_integer(),'nil' | {_,_,_,_}}) will never return since it differs in the 2nd argument from the success typing arguments: ([95 | 97 | 100 | 101 | 104 | 112 | 113 | 114 | 115 | 116 | 117,...],[{_,_}])
-ewgi_testapp.erl:43: The call gb_trees:to_list(T::{non_neg_integer(),'nil' | {_,_,_,_}}) does not have an opaque term of type gb_tree() as 1st argument
+ewgi_api.erl:55: The call gb_trees:to_list({non_neg_integer(),'nil' | {_,_,_,_}}) does not have an opaque term of type gb_trees:tree(_,_) as 1st argument
+ewgi_testapp.erl:35: The call ewgi_testapp:htmlise_data("request_data",{non_neg_integer(),'nil' | {_,_,_,_}}) does not have a term of type [{_,_}] | gb_trees:tree(_,_) (with opaque subterms) as 2nd argument
+ewgi_testapp.erl:43: The call gb_trees:to_list(T::{non_neg_integer(),'nil' | {_,_,_,_}}) does not have an opaque term of type gb_trees:tree(_,_) as 1st argument
diff --git a/lib/dialyzer/test/opaque_SUITE_data/results/inf_loop1 b/lib/dialyzer/test/opaque_SUITE_data/results/inf_loop1
index eb8f304905..ac5ef14041 100644
--- a/lib/dialyzer/test/opaque_SUITE_data/results/inf_loop1
+++ b/lib/dialyzer/test/opaque_SUITE_data/results/inf_loop1
@@ -2,4 +2,4 @@
inf_loop1.erl:119: The pattern [{_, LNorms}] can never match the type []
inf_loop1.erl:121: The pattern [{LinksA, LNormA}, {LinksB, LNormB}] can never match the type []
inf_loop1.erl:129: The pattern [{_, Norm} | _] can never match the type []
-inf_loop1.erl:71: The call gb_trees:get(Edge::any(),Etab::array()) contains an opaque term as 2nd argument when terms of different types are expected in these positions
+inf_loop1.erl:71: The call gb_trees:get(Edge::any(),Etab::array:array(_)) does not have an opaque term of type gb_trees:tree(_,_) as 2nd argument
diff --git a/lib/dialyzer/test/opaque_SUITE_data/results/inf_loop2 b/lib/dialyzer/test/opaque_SUITE_data/results/inf_loop2
new file mode 100644
index 0000000000..8cd2abe8cd
--- /dev/null
+++ b/lib/dialyzer/test/opaque_SUITE_data/results/inf_loop2
@@ -0,0 +1,5 @@
+
+inf_loop2.erl:122: The pattern [{_, LNorms}] can never match the type []
+inf_loop2.erl:124: The pattern [{LinksA, LNormA}, {LinksB, LNormB}] can never match the type []
+inf_loop2.erl:132: The pattern [{_, Norm} | _] can never match the type []
+inf_loop2.erl:74: The call gb_trees:get(Edge::any(),Etab::array:array(_)) does not have an opaque term of type gb_trees:tree(_,_) as 2nd argument
diff --git a/lib/dialyzer/test/opaque_SUITE_data/results/int b/lib/dialyzer/test/opaque_SUITE_data/results/int
index 3ee4def34b..dc806fa12c 100644
--- a/lib/dialyzer/test/opaque_SUITE_data/results/int
+++ b/lib/dialyzer/test/opaque_SUITE_data/results/int
@@ -1,3 +1,3 @@
-int_adt.erl:28: Invalid type specification for function int_adt:add_f/2. The success typing is (number(),float()) -> number()
-int_adt.erl:32: Invalid type specification for function int_adt:div_f/2. The success typing is (number(),number()) -> float()
+int_adt.erl:28: Invalid type specification for function int_adt:add_f/2. The success typing is (number() | int_adt:int(),float()) -> number() | int_adt:int()
+int_adt.erl:32: Invalid type specification for function int_adt:div_f/2. The success typing is (number() | int_adt:int(),number() | int_adt:int()) -> float()
diff --git a/lib/dialyzer/test/opaque_SUITE_data/results/mixed_opaque b/lib/dialyzer/test/opaque_SUITE_data/results/mixed_opaque
index ab850b613e..0363be544d 100644
--- a/lib/dialyzer/test/opaque_SUITE_data/results/mixed_opaque
+++ b/lib/dialyzer/test/opaque_SUITE_data/results/mixed_opaque
@@ -1,2 +1,2 @@
-mixed_opaque_use.erl:31: The call mixed_opaque_rec_adt:get_a(Q::mixed_opaque_queue_adt:my_queue()) contains an opaque term as 1st argument when an opaque term of type mixed_opaque_rec_adt:rec() is expected
+mixed_opaque_use.erl:31: The call mixed_opaque_rec_adt:get_a(Q::mixed_opaque_queue_adt:my_queue()) does not have an opaque term of type mixed_opaque_rec_adt:rec() as 1st argument
diff --git a/lib/dialyzer/test/opaque_SUITE_data/results/modules b/lib/dialyzer/test/opaque_SUITE_data/results/modules
new file mode 100644
index 0000000000..f71334b9de
--- /dev/null
+++ b/lib/dialyzer/test/opaque_SUITE_data/results/modules
@@ -0,0 +1,3 @@
+
+opaque_digraph.erl:353: Cons will produce an improper list since its 2nd argument is number()
+opaque_digraph.erl:365: Cons will produce an improper list since its 2nd argument is number()
diff --git a/lib/dialyzer/test/opaque_SUITE_data/results/my_queue b/lib/dialyzer/test/opaque_SUITE_data/results/my_queue
index 2860b91084..1f25a6f9c3 100644
--- a/lib/dialyzer/test/opaque_SUITE_data/results/my_queue
+++ b/lib/dialyzer/test/opaque_SUITE_data/results/my_queue
@@ -4,4 +4,4 @@ my_queue_use.erl:19: The call my_queue_adt:add(42,Q0::[]) does not have an opaqu
my_queue_use.erl:24: The attempt to match a term of type my_queue_adt:my_queue() against the pattern [42 | Q2] breaks the opaqueness of the term
my_queue_use.erl:30: Attempt to test for equality between a term of type [] and a term of opaque type my_queue_adt:my_queue()
my_queue_use.erl:34: Cons will produce an improper list since its 2nd argument is my_queue_adt:my_queue()
-my_queue_use.erl:34: The call my_queue_adt:dequeue(nonempty_improper_list(42,my_queue_adt:my_queue())) does not have an opaque term of type my_queue_adt:my_queue() as 1st argument
+my_queue_use.erl:34: The call my_queue_adt:dequeue(nonempty_maybe_improper_list(42,my_queue_adt:my_queue())) does not have an opaque term of type my_queue_adt:my_queue() as 1st argument
diff --git a/lib/dialyzer/test/opaque_SUITE_data/results/opaque b/lib/dialyzer/test/opaque_SUITE_data/results/opaque
index ca76f57b54..5747f9061f 100644
--- a/lib/dialyzer/test/opaque_SUITE_data/results/opaque
+++ b/lib/dialyzer/test/opaque_SUITE_data/results/opaque
@@ -1,2 +1,3 @@
+opaque_bug3.erl:19: The pattern 'a' can never match the type #c{}
opaque_bug4.erl:20: The attempt to match a term of type opaque_adt:abc() against the pattern 'a' breaks the opaqueness of the term
diff --git a/lib/dialyzer/test/opaque_SUITE_data/results/para b/lib/dialyzer/test/opaque_SUITE_data/results/para
new file mode 100644
index 0000000000..3aaa238de6
--- /dev/null
+++ b/lib/dialyzer/test/opaque_SUITE_data/results/para
@@ -0,0 +1,21 @@
+
+para1.erl:18: The test para1:t(atom()) =:= para1:t(integer()) can never evaluate to 'true'
+para1.erl:23: The test para1:t(atom()) =:= para1:t() can never evaluate to 'true'
+para1.erl:28: The test para1:t() =:= para1:t(integer()) can never evaluate to 'true'
+para1.erl:33: The test {3,2} =:= {'a','b'} can never evaluate to 'true'
+para1.erl:38: Attempt to test for equality between a term of type para1_adt:t(integer()) and a term of opaque type para1_adt:t(atom())
+para1.erl:43: Attempt to test for equality between a term of type para1_adt:t() and a term of opaque type para1_adt:t(atom())
+para1.erl:48: Attempt to test for equality between a term of type para1_adt:t(integer()) and a term of opaque type para1_adt:t()
+para1.erl:53: The test {3,2} =:= {'a','b'} can never evaluate to 'true'
+para2.erl:103: Attempt to test for equality between a term of type para2_adt:circ({{integer(),integer()},{integer(),integer()}},{{integer(),integer()},{integer(),integer()}}) and a term of opaque type para2_adt:circ({{integer(),integer()},{integer(),integer()}})
+para2.erl:117: Attempt to test for equality between a term of type para2_adt:un(atom(),integer()) and a term of opaque type para2_adt:un(integer(),atom())
+para2.erl:31: The test 'a' =:= 'b' can never evaluate to 'true'
+para2.erl:61: Attempt to test for equality between a term of type para2_adt:c2() and a term of opaque type para2_adt:c1()
+para2.erl:66: The test 'a' =:= 'b' can never evaluate to 'true'
+para2.erl:88: The test para2:circ({{integer(),integer()},{integer(),integer()}}) =:= para2:circ({{integer(),integer()},{integer(),integer()}},{{integer(),integer()},{integer(),integer()}}) can never evaluate to 'true'
+para3.erl:28: Invalid type specification for function para3:ot2/0. The success typing is () -> 'foo'
+para3.erl:36: The pattern {{{17}}} can never match the type {{{{{{_,_,_,_,_}}}}}}
+para3.erl:55: Invalid type specification for function para3:t2/0. The success typing is () -> 'foo'
+para3.erl:65: The attempt to match a term of type {{{{{para3_adt:ot1(_,_,_,_,_)}}}}} against the pattern {{{{{17}}}}} breaks the opaqueness of para3_adt:ot1(_,_,_,_,_)
+para3.erl:68: The pattern {{{{17}}}} can never match the type {{{{{para3_adt:ot1(_,_,_,_,_)}}}}}
+para3.erl:74: Invalid type specification for function para3:exp_adt/0. The success typing is () -> 3
diff --git a/lib/dialyzer/test/opaque_SUITE_data/results/queue b/lib/dialyzer/test/opaque_SUITE_data/results/queue
index c3f04ea64d..5b3813c418 100644
--- a/lib/dialyzer/test/opaque_SUITE_data/results/queue
+++ b/lib/dialyzer/test/opaque_SUITE_data/results/queue
@@ -1,12 +1,11 @@
-queue_use.erl:18: The call queue:is_empty({[],[]}) does not have an opaque term of type queue() as 1st argument
-queue_use.erl:22: The call queue:in(42,Q0::{[],[]}) does not have an opaque term of type queue() as 2nd argument
-queue_use.erl:27: The attempt to match a term of type queue() against the pattern {"*", Q2} breaks the opaqueness of the term
-queue_use.erl:33: Attempt to test for equality between a term of type {[42,...],[]} and a term of opaque type queue()
-queue_use.erl:36: The attempt to match a term of type queue() against the pattern {F, _R} breaks the opaqueness of the term
-queue_use.erl:40: The call queue:out({[42,...],[]}) does not have an opaque term of type queue() as 1st argument
-queue_use.erl:48: The call queue_use:add_unique(42,#db{p::[],q::queue()}) contains an opaque term as 2nd argument when terms of different types are expected in these positions
-queue_use.erl:51: The call queue_use:is_in_queue(E::42,DB::#db{p::[],q::queue()}) contains an opaque term as 2nd argument when terms of different types are expected in these positions
-queue_use.erl:56: The attempt to match a term of type #db{p::[],q::queue()} against the pattern {'db', _, {L1, L2}} breaks the opaqueness of queue()
-queue_use.erl:62: The call queue_use:tuple_queue({42,'gazonk'}) does not have a term of type {_,queue()} (with opaque subterms) as 1st argument
-queue_use.erl:65: The call queue:in(F::42,Q::'gazonk') does not have an opaque term of type queue() as 2nd argument
+queue_use.erl:18: The call queue:is_empty({[],[]}) does not have an opaque term of type queue:queue(_) as 1st argument
+queue_use.erl:22: The call queue:in(42,Q0::{[],[]}) does not have an opaque term of type queue:queue(_) as 2nd argument
+queue_use.erl:27: The attempt to match a term of type queue:queue(_) against the pattern {"*", Q2} breaks the opaqueness of the term
+queue_use.erl:33: Attempt to test for equality between a term of type {[42,...],[]} and a term of opaque type queue:queue(_)
+queue_use.erl:36: The attempt to match a term of type queue:queue(_) against the pattern {F, _R} breaks the opaqueness of the term
+queue_use.erl:40: The call queue:out({[42,...],[]}) does not have an opaque term of type queue:queue(_) as 1st argument
+queue_use.erl:51: The call queue_use:is_in_queue(E::42,DB::#db{p::[],q::queue:queue(_)}) contains an opaque term as 2nd argument when terms of different types are expected in these positions
+queue_use.erl:56: The attempt to match a term of type #db{p::[],q::queue:queue(_)} against the pattern {'db', _, {L1, L2}} breaks the opaqueness of queue:queue(_)
+queue_use.erl:62: The call queue_use:tuple_queue({42,'gazonk'}) does not have a term of type {_,queue:queue(_)} (with opaque subterms) as 1st argument
+queue_use.erl:65: The call queue:in(F::42,Q::'gazonk') does not have an opaque term of type queue:queue(_) as 2nd argument
diff --git a/lib/dialyzer/test/opaque_SUITE_data/results/simple b/lib/dialyzer/test/opaque_SUITE_data/results/simple
new file mode 100644
index 0000000000..072ac9be8f
--- /dev/null
+++ b/lib/dialyzer/test/opaque_SUITE_data/results/simple
@@ -0,0 +1,87 @@
+
+exact_api.erl:17: The call exact_api:set_type(A::#digraph{vtab::'notable',etab::'notable',ntab::'notable',cyclic::'true'}) does not have an opaque term of type digraph:graph() as 1st argument
+exact_api.erl:23: The call digraph:delete(G::#digraph{vtab::'notable',etab::'notable',ntab::'notable',cyclic::'true'}) does not have an opaque term of type digraph:graph() as 1st argument
+exact_api.erl:55: The attempt to match a term of type exact_adt:exact_adt() against the pattern {'exact_adt'} breaks the opaqueness of the term
+exact_api.erl:59: The call exact_adt:exact_adt_set_type2(A::#exact_adt{}) does not have an opaque term of type exact_adt:exact_adt() as 1st argument
+is_rec.erl:10: The call erlang:is_record(simple1_adt:d1(),'r',2) contains an opaque term as 1st argument when terms of different types are expected in these positions
+is_rec.erl:15: The call erlang:is_record(A::simple1_adt:d1(),'r',I::1 | 2 | 3) contains an opaque term as 1st argument when terms of different types are expected in these positions
+is_rec.erl:19: Guard test is_record(A::simple1_adt:d1(),'r',2) breaks the opaqueness of its argument
+is_rec.erl:23: Guard test is_record({simple1_adt:d1(),1},'r',2) breaks the opaqueness of its argument
+is_rec.erl:41: The call erlang:is_record(A::simple1_adt:d1(),R::'a') contains an opaque term as 1st argument when terms of different types are expected in these positions
+is_rec.erl:45: The call erlang:is_record(A::simple1_adt:d1(),A::simple1_adt:d1(),1) contains an opaque term as 2nd argument when terms of different types are expected in these positions
+is_rec.erl:49: The call erlang:is_record(A::simple1_adt:d1(),any(),1) contains an opaque term as 1st argument when terms of different types are expected in these positions
+is_rec.erl:53: The call erlang:is_record(A::simple1_adt:d1(),A::simple1_adt:d1(),any()) contains an opaque term as 2nd argument when terms of different types are expected in these positions
+is_rec.erl:57: Guard test is_record(A::simple1_adt:d1(),'r',2) breaks the opaqueness of its argument
+is_rec.erl:61: The record #r{f1::simple1_adt:d1()} violates the declared type for #r{}
+is_rec.erl:65: The call erlang:is_record({simple1_adt:d1(),1},'r',2) contains an opaque term as 1st argument when terms of different types are expected in these positions
+rec_api.erl:22: Record construction #r1{f1::10} violates the declared type of field f1::'undefined' | rec_api:a()
+rec_api.erl:23: The pattern {'r1', 10} violates the declared type for #r1{}
+rec_api.erl:27: The attempt to match a term of type rec_adt:r1() against the pattern {'r1', 'a'} breaks the opaqueness of the term
+rec_api.erl:29: Invalid type specification for function rec_api:adt_t1/1. The success typing is (#r1{f1::'a'}) -> #r1{f1::'a'}
+rec_api.erl:34: Invalid type specification for function rec_api:adt_r1/0. The success typing is () -> #r1{f1::'a'}
+rec_api.erl:77: The attempt to match a term of type rec_api:f() against the variable _ breaks the opaqueness of the term
+simple1_api.erl:113: The test simple1_api:d1() =:= simple1_api:d2() can never evaluate to 'true'
+simple1_api.erl:118: Guard test simple1_api:d2() =:= A::simple1_api:d1() can never succeed
+simple1_api.erl:142: Attempt to test for equality between a term of type simple1_adt:o2() and a term of opaque type simple1_adt:o1()
+simple1_api.erl:148: Guard test simple1_adt:o2() =:= A::simple1_adt:o1() contains an opaque term as 1st argument
+simple1_api.erl:154: Attempt to test for inequality between a term of type simple1_adt:o2() and a term of opaque type simple1_adt:o1()
+simple1_api.erl:160: Attempt to test for inequality between a term of type simple1_adt:o2() and a term of opaque type simple1_adt:o1()
+simple1_api.erl:165: Attempt to test for equality between a term of type simple1_adt:c2() and a term of opaque type simple1_adt:c1()
+simple1_api.erl:181: Guard test A::simple1_adt:d1() =< B::simple1_adt:d2() contains an opaque term as 1st argument
+simple1_api.erl:185: Guard test 'a' =< B::simple1_adt:d2() contains an opaque term as 2nd argument
+simple1_api.erl:189: Guard test A::simple1_adt:d1() =< 'd' contains an opaque term as 1st argument
+simple1_api.erl:197: The type test is_integer(A::simple1_adt:d1()) breaks the opaqueness of the term A::simple1_adt:d1()
+simple1_api.erl:221: Guard test A::simple1_api:i1() > 3 can never succeed
+simple1_api.erl:225: Guard test A::simple1_adt:i1() > 3 contains an opaque term as 1st argument
+simple1_api.erl:233: Guard test A::simple1_adt:i1() < 3 contains an opaque term as 1st argument
+simple1_api.erl:239: Guard test A::1 > 3 can never succeed
+simple1_api.erl:243: Guard test A::1 > 3 can never succeed
+simple1_api.erl:257: Guard test is_function(T::simple1_api:o1()) can never succeed
+simple1_api.erl:265: Guard test is_function(T::simple1_adt:o1()) breaks the opaqueness of its argument
+simple1_api.erl:269: The type test is_function(T::simple1_adt:o1()) breaks the opaqueness of the term T::simple1_adt:o1()
+simple1_api.erl:274: Guard test is_function(T::simple1_api:o1(),A::simple1_api:i1()) can never succeed
+simple1_api.erl:284: Guard test is_function(T::simple1_adt:o1(),A::simple1_adt:i1()) breaks the opaqueness of its argument
+simple1_api.erl:289: The type test is_function(T::simple1_adt:o1(),A::simple1_adt:i1()) breaks the opaqueness of the term T::simple1_adt:o1()
+simple1_api.erl:294: The call erlang:is_function(T::simple1_api:o1(),A::simple1_adt:i1()) contains an opaque term as 2nd argument when terms of different types are expected in these positions
+simple1_api.erl:300: The type test is_function(T::simple1_adt:o1(),A::simple1_api:i1()) breaks the opaqueness of the term T::simple1_adt:o1()
+simple1_api.erl:306: Guard test B::simple1_api:b2() =:= 'true' can never succeed
+simple1_api.erl:315: Guard test A::simple1_api:b1() =:= 'false' can never succeed
+simple1_api.erl:319: Guard test not('and'('true','true')) can never succeed
+simple1_api.erl:337: Clause guard cannot succeed.
+simple1_api.erl:342: Guard test B::simple1_adt:b2() =:= 'true' contains an opaque term as 1st argument
+simple1_api.erl:347: Guard test A::simple1_adt:b1() =:= 'true' contains an opaque term as 1st argument
+simple1_api.erl:355: Invalid type specification for function simple1_api:bool_adt_t6/1. The success typing is ('true') -> 1
+simple1_api.erl:365: Clause guard cannot succeed.
+simple1_api.erl:368: Invalid type specification for function simple1_api:bool_adt_t8/2. The success typing is (boolean(),boolean()) -> 1
+simple1_api.erl:378: Clause guard cannot succeed.
+simple1_api.erl:381: Invalid type specification for function simple1_api:bool_adt_t9/2. The success typing is ('false','false') -> 1
+simple1_api.erl:407: The size simple1_adt:i1() breaks the opaqueness of A
+simple1_api.erl:418: The attempt to match a term of type non_neg_integer() against the variable A breaks the opaqueness of simple1_adt:i1()
+simple1_api.erl:425: The attempt to match a term of type non_neg_integer() against the variable B breaks the opaqueness of simple1_adt:i1()
+simple1_api.erl:432: The attempt to match a term of type non_neg_integer() against the variable B breaks the opaqueness of simple1_api:o1()
+simple1_api.erl:448: The attempt to match a term of type non_neg_integer() against the variable Sz breaks the opaqueness of simple1_adt:i1()
+simple1_api.erl:460: The attempt to match a term of type simple1_adt:bit1() against the pattern <<_/binary-unit:8>> breaks the opaqueness of the term
+simple1_api.erl:478: The call 'foo':A(A::simple1_adt:a()) breaks the opaqueness of the term A :: simple1_adt:a()
+simple1_api.erl:486: The call A:'foo'(A::simple1_adt:a()) breaks the opaqueness of the term A :: simple1_adt:a()
+simple1_api.erl:499: The call 'foo':A(A::simple1_api:i()) requires that A is of type atom() not simple1_api:i()
+simple1_api.erl:503: The call 'foo':A(A::simple1_adt:i()) requires that A is of type atom() not simple1_adt:i()
+simple1_api.erl:507: The call A:'foo'(A::simple1_api:i()) requires that A is of type atom() | tuple() not simple1_api:i()
+simple1_api.erl:511: The call A:'foo'(A::simple1_adt:i()) requires that A is of type atom() | tuple() not simple1_adt:i()
+simple1_api.erl:519: Guard test A::simple1_adt:d2() == B::simple1_adt:d1() contains an opaque term as 1st argument
+simple1_api.erl:534: Guard test A::simple1_adt:d1() >= 3 contains an opaque term as 1st argument
+simple1_api.erl:536: Guard test A::simple1_adt:d1() == 3 contains an opaque term as 1st argument
+simple1_api.erl:538: Guard test A::simple1_adt:d1() =:= 3 contains an opaque term as 1st argument
+simple1_api.erl:548: The call erlang:'<'(A::simple1_adt:d1(),3) contains an opaque term as 1st argument when terms of different types are expected in these positions
+simple1_api.erl:558: The call erlang:'=<'(A::simple1_adt:d1(),B::simple1_adt:d2()) contains an opaque term as 1st argument when terms of different types are expected in these positions
+simple1_api.erl:565: Guard test {digraph:graph(),3} > {digraph:graph(),atom() | ets:tid()} contains an opaque term as 2nd argument
+simple1_api.erl:91: Invalid type specification for function simple1_api:tup/0. The success typing is () -> {'a','b'}
+simple2_api.erl:100: The call lists:flatten(A::simple1_adt:tuple1()) contains an opaque term as 1st argument when a structured term of type [any()] is expected
+simple2_api.erl:116: The call lists:flatten({simple1_adt:tuple1()}) will never return since it differs in the 1st argument from the success typing arguments: ([any()])
+simple2_api.erl:121: Guard test {simple1_adt:d1(),3} > {simple1_adt:d1(),simple1_adt:tuple1()} contains an opaque term as 2nd argument
+simple2_api.erl:125: The call erlang:tuple_to_list(B::simple1_adt:tuple1()) contains an opaque term as 1st argument when a structured term of type tuple() is expected
+simple2_api.erl:31: The call erlang:'!'(A::simple1_adt:d1(),'foo') contains an opaque term as 1st argument when terms of different types are expected in these positions
+simple2_api.erl:35: The call erlang:send(A::simple1_adt:d1(),'foo') contains an opaque term as 1st argument when terms of different types are expected in these positions
+simple2_api.erl:51: The call erlang:'<'(A::simple1_adt:d1(),3) contains an opaque term as 1st argument when terms of different types are expected in these positions
+simple2_api.erl:59: The call lists:keysearch(1,A::simple1_adt:d1(),[]) contains an opaque term as 2nd argument when terms of different types are expected in these positions
+simple2_api.erl:67: The call lists:keysearch('key',1,A::simple1_adt:tuple1()) contains an opaque term as 3rd argument when terms of different types are expected in these positions
+simple2_api.erl:96: The call lists:keyreplace('a',1,[{1, 2}],A::simple1_adt:tuple1()) contains an opaque term as 4th argument when terms of different types are expected in these positions
diff --git a/lib/dialyzer/test/opaque_SUITE_data/results/wings b/lib/dialyzer/test/opaque_SUITE_data/results/wings
index a9571441f8..511263b70a 100644
--- a/lib/dialyzer/test/opaque_SUITE_data/results/wings
+++ b/lib/dialyzer/test/opaque_SUITE_data/results/wings
@@ -1,11 +1,11 @@
-wings_dissolve.erl:103: Guard test is_list(List::gb_set()) breaks the opaqueness of its argument
-wings_dissolve.erl:19: Guard test is_list(Faces::gb_set()) breaks the opaqueness of its argument
-wings_dissolve.erl:272: Guard test is_list(Faces::gb_set()) breaks the opaqueness of its argument
-wings_dissolve.erl:31: The call gb_sets:is_empty(Faces::[any(),...]) does not have an opaque term of type gb_set() as 1st argument
+wings_dissolve.erl:103: Guard test is_list(List::gb_sets:set(_)) breaks the opaqueness of its argument
+wings_dissolve.erl:19: Guard test is_list(Faces::gb_sets:set(_)) breaks the opaqueness of its argument
+wings_dissolve.erl:272: Guard test is_list(Faces::gb_sets:set(_)) breaks the opaqueness of its argument
+wings_dissolve.erl:31: The call gb_sets:is_empty(Faces::[any(),...]) does not have an opaque term of type gb_sets:set(_) as 1st argument
wings_edge.erl:205: The pattern <Edge, 'hard', Htab> can never match the type <_,'soft',_>
-wings_edge_cmd.erl:30: The call gb_trees:size(P::gb_set()) contains an opaque term as 1st argument when an opaque term of type gb_tree() is expected
+wings_edge_cmd.erl:30: The call gb_trees:size(P::gb_sets:set(_)) does not have an opaque term of type gb_trees:tree(_,_) as 1st argument
wings_edge_cmd.erl:32: The pattern [_ | Parts] can never match the type []
wings_edge_cmd.erl:32: The pattern [{_, P} | _] can never match the type []
-wings_io.erl:30: The attempt to match a term of type {'empty',queue()} against the pattern {'empty', {In, Out}} breaks the opaqueness of queue()
-wings_we.erl:155: The call wings_util:gb_trees_largest_key(Etab::gb_tree()) contains an opaque term as 1st argument when a structured term of type {_,{_,_,_,'nil' | {_,_,_,'nil' | {_,_,_,_}}}} is expected
+wings_io.erl:30: The attempt to match a term of type {'empty',queue:queue(_)} against the pattern {'empty', {In, Out}} breaks the opaqueness of queue:queue(_)
+wings_we.erl:155: The call wings_util:gb_trees_largest_key(Etab::gb_trees:tree(_,_)) contains an opaque term as 1st argument when a structured term of type {_,{_,_,_,'nil' | {_,_,_,'nil' | {_,_,_,_}}}} is expected
diff --git a/lib/dialyzer/test/opaque_SUITE_data/src/dict/dict_use.erl b/lib/dialyzer/test/opaque_SUITE_data/src/dict/dict_use.erl
index 8a2cd86f43..a4cec065ab 100644
--- a/lib/dialyzer/test/opaque_SUITE_data/src/dict/dict_use.erl
+++ b/lib/dialyzer/test/opaque_SUITE_data/src/dict/dict_use.erl
@@ -24,7 +24,7 @@ ok3() ->
ok4() ->
dict:fetch(foo, dict:new()).
-ok5() -> % this is OK since some_mod:new/0 might be returning a dict()
+ok5() -> % this is OK since some_mod:new/0 might be returning a dict:dict()
dict:fetch(foo, some_mod:new()).
ok6() ->
diff --git a/lib/dialyzer/test/opaque_SUITE_data/src/ets/ets_use.erl b/lib/dialyzer/test/opaque_SUITE_data/src/ets/ets_use.erl
index d65af0af4e..593d9a669d 100644
--- a/lib/dialyzer/test/opaque_SUITE_data/src/ets/ets_use.erl
+++ b/lib/dialyzer/test/opaque_SUITE_data/src/ets/ets_use.erl
@@ -1,5 +1,5 @@
-module(ets_use).
--export([t1/0, t2/0]).
+-export([t1/0, t2/0, t3/0, t4/0]).
t1() ->
case n() of
@@ -13,4 +13,10 @@ t2() ->
T when is_atom(T) -> atm
end.
-n() -> ets:new(n, [named_table]).
+t3() ->
+ is_atom(n()). % no warning since atom() is possible
+
+t4() ->
+ is_integer(n()). % opaque warning since ets:tid() is opaque
+
+n() -> ets:new(n, [named_table]). % -> atom() | ets:tid()
diff --git a/lib/dialyzer/test/opaque_SUITE_data/src/ewgi/ewgi.hrl b/lib/dialyzer/test/opaque_SUITE_data/src/ewgi/ewgi.hrl
index 0b98f550f1..5cbc79f948 100644
--- a/lib/dialyzer/test/opaque_SUITE_data/src/ewgi/ewgi.hrl
+++ b/lib/dialyzer/test/opaque_SUITE_data/src/ewgi/ewgi.hrl
@@ -28,7 +28,7 @@
%% @type bag() = gb_tree()
-ifdef(HAS_GB_TREE_SPEC).
--type bag() :: gb_tree().
+-type bag() :: gb_trees:tree().
-else.
-type bag() :: {non_neg_integer(), {any(), any(), any(), any()} | 'nil'}.
-endif.
diff --git a/lib/dialyzer/test/opaque_SUITE_data/src/ewgi2/ewgi.hrl b/lib/dialyzer/test/opaque_SUITE_data/src/ewgi2/ewgi.hrl
index 5da8ff0ecf..d8e15cb081 100644
--- a/lib/dialyzer/test/opaque_SUITE_data/src/ewgi2/ewgi.hrl
+++ b/lib/dialyzer/test/opaque_SUITE_data/src/ewgi2/ewgi.hrl
@@ -29,7 +29,7 @@
%% @type bag() = gb_tree()
-ifdef(HAS_GB_TREE_SPEC).
--type bag() :: gb_tree().
+-type bag() :: gb_trees:tree().
-else.
-type bag() :: {non_neg_integer(), {any(), any(), any(), any()} | 'nil'}.
-endif.
diff --git a/lib/dialyzer/test/opaque_SUITE_data/src/gb_sets/gb_sets_rec.erl b/lib/dialyzer/test/opaque_SUITE_data/src/gb_sets/gb_sets_rec.erl
index 008b0a486a..7c34b01c2d 100644
--- a/lib/dialyzer/test/opaque_SUITE_data/src/gb_sets/gb_sets_rec.erl
+++ b/lib/dialyzer/test/opaque_SUITE_data/src/gb_sets/gb_sets_rec.erl
@@ -12,12 +12,12 @@
-export([new/0, get_g/1]).
--record(rec, {g :: gb_set()}).
+-record(rec, {g :: gb_sets:set()}).
-spec new() -> #rec{}.
new() ->
#rec{g = gb_sets:empty()}.
--spec get_g(#rec{}) -> gb_set().
+-spec get_g(#rec{}) -> gb_sets:set().
get_g(R) ->
R#rec.g.
diff --git a/lib/dialyzer/test/opaque_SUITE_data/src/inf_loop1.erl b/lib/dialyzer/test/opaque_SUITE_data/src/inf_loop1.erl
index 0dff16cf14..3275736e75 100644
--- a/lib/dialyzer/test/opaque_SUITE_data/src/inf_loop1.erl
+++ b/lib/dialyzer/test/opaque_SUITE_data/src/inf_loop1.erl
@@ -1,7 +1,7 @@
%% -*- erlang-indent-level: 2 -*-
%%----------------------------------------------------------------------------
%% Non-sensical (i.e., stripped-down) program that sends the analysis
-%% into an infinite loop. The #we.es field was originally a gb_tree()
+%% into an infinite loop. The #we.es field was originally a gb_trees:tree()
%% but the programmer declared it as an array in order to change it to
%% that data type instead. In the file, there are two calls to function
%% gb_trees:get/2 which seem to be the ones responsible for sending the
@@ -14,7 +14,7 @@
-export([command/1]).
-record(we, {id,
- es = array:new() :: array(),
+ es = array:new() :: array:array(),
vp,
mirror = none}).
-record(edge, {vs,ve,a = none,b = none,lf,rf,ltpr,ltsu,rtpr,rtsu}).
diff --git a/lib/dialyzer/test/opaque_SUITE_data/src/inf_loop2.erl b/lib/dialyzer/test/opaque_SUITE_data/src/inf_loop2.erl
new file mode 100644
index 0000000000..3787fc6750
--- /dev/null
+++ b/lib/dialyzer/test/opaque_SUITE_data/src/inf_loop2.erl
@@ -0,0 +1,175 @@
+%% -*- erlang-indent-level: 2 -*-
+%%----------------------------------------------------------------------------
+%% Copy of inf_loop1.erl, where the calls mentioned below have been
+%% restored.
+
+%% Non-sensical (i.e., stripped-down) program that sends the analysis
+%% into an infinite loop. The #we.es field was originally a gb_trees:tree()
+%% but the programmer declared it as an array in order to change it to
+%% that data type instead. In the file, there are two calls to function
+%% gb_trees:get/2 which seem to be the ones responsible for sending the
+%% analysis into an infinite loop. Currently, these calls are marked and
+%% have been changed to gbee_trees:get/2 in order to be able to see that
+%% the analysis works if these two calls are taken out of the picture.
+%%----------------------------------------------------------------------------
+-module(inf_loop2).
+
+-export([command/1]).
+
+-record(we, {id,
+ es = array:new() :: array:array(),
+ vp,
+ mirror = none}).
+-record(edge, {vs,ve,a = none,b = none,lf,rf,ltpr,ltsu,rtpr,rtsu}).
+
+command(St) ->
+ State = drag_mode(offset_region),
+ SetupSt = wings_sel_conv:more(St),
+ Tvs = wings_sel:fold(fun(Faces, #we{id = Id} = We, Acc) ->
+ FaceRegions = wings_sel:face_regions(Faces, We),
+ {AllVs0,VsData} =
+ collect_offset_regions_data(FaceRegions, We, [], []),
+ AllVs = ordsets:from_list(AllVs0),
+ [{Id,{AllVs,offset_regions_fun(VsData, State)}}|Acc]
+ end,
+ [],
+ SetupSt),
+ wings_drag:setup(Tvs, 42, [], St).
+
+drag_mode(Type) ->
+ {Mode,Norm} = wings_pref:get_value(Type, {average,loop}),
+ {Type,Mode,Norm}.
+
+collect_offset_regions_data([Faces|Regions], We, AllVs, VsData) ->
+ {FaceNormTab,OuterEdges,RegVs} =
+ some_fake_module:faces_data_0(Faces, We, [], [], []),
+ {LoopNorm,LoopVsData,LoopVs} =
+ offset_regions_loop_data(OuterEdges, Faces, We, FaceNormTab),
+ Vs = RegVs -- LoopVs,
+ RegVsData = vertex_normals(Vs, FaceNormTab, We, LoopVsData),
+ collect_offset_regions_data(Regions, We, RegVs ++ AllVs,
+ [{LoopNorm,RegVsData}|VsData]);
+collect_offset_regions_data([], _, AllVs, VsData) ->
+ {AllVs,VsData}.
+
+offset_regions_loop_data(Edges, Faces, We, FNtab) ->
+ EdgeSet = gb_sets:from_list(Edges),
+ offset_loop_data_0(EdgeSet, Faces, We, FNtab, [], [], []).
+
+offset_loop_data_0(EdgeSet0, Faces, We, FNtab, LNorms, VData0, Vs0) ->
+ case gb_sets:is_empty(EdgeSet0) of
+ false ->
+ {Edge,EdgeSet1} = gb_sets:take_smallest(EdgeSet0),
+ {EdgeSet,VData,Links,LoopNorm,Vs} =
+ offset_loop_data_1(Edge, EdgeSet1, Faces, We, FNtab, VData0, Vs0),
+ offset_loop_data_0(EdgeSet, Faces, We, FNtab,
+ [{Links,LoopNorm}|LNorms], VData, Vs);
+ true ->
+ AvgLoopNorm = average_loop_norm(LNorms),
+ {AvgLoopNorm,VData0,Vs0}
+ end.
+
+offset_loop_data_1(Edge, EdgeSet, _Faces,
+ #we{es = Etab, vp = Vtab} = We, FNtab, VData, Vs) ->
+ #edge{vs = Va, ve = Vb, lf = Lf, ltsu = NextLeft} = gb_trees:get(Edge, Etab),
+ VposA = gb_trees:get(Va, Vtab),
+ VposB = gb_trees:get(Vb, Vtab),
+ VDir = e3d_vec:sub(VposB, VposA),
+ FNorm = wings_face:normal(Lf, We),
+ EdgeData = gb_trees:get(NextLeft, Etab),
+ offset_loop_data_2(NextLeft, EdgeData, Va, VposA, Lf, Edge, We, FNtab,
+ EdgeSet, VDir, [], [FNorm], VData, [], Vs, 0).
+
+offset_loop_data_2(CurE, #edge{vs = Va, ve = Vb, lf = PrevFace,
+ rtsu = NextEdge, ltsu = IfCurIsMember},
+ Vb, VposB, PrevFace, LastE,
+ #we{mirror = M} = We,
+ FNtab, EdgeSet0, VDir, EDir0, VNorms0, VData0, VPs0, Vs0,
+ Links) ->
+ Mirror = M == PrevFace,
+ offset_loop_is_member(Mirror, Vb, Va, VposB, CurE, IfCurIsMember, VNorms0,
+ NextEdge, EdgeSet0, VDir, EDir0, FNtab, PrevFace,
+ LastE, We, VData0, VPs0, Vs0, Links).
+
+offset_loop_is_member(Mirror, V1, V2, Vpos1, CurE, NextE, VNorms0, NEdge,
+ EdgeSet0, VDir, EDir0, FNtab, PFace, LastE, We,
+ VData0, VPs0, Vs0, Links) ->
+ #we{es = Etab, vp = Vtab} = We,
+ Vpos2 = gb_trees:get(V2, Vtab),
+ Dir = e3d_vec:sub(Vpos2, Vpos1),
+ NextVDir = e3d_vec:neg(Dir),
+ EdgeSet = gb_sets:delete(CurE, EdgeSet0),
+ EdgeData = gb_trees:get(NextE, Etab), %% HERE
+ [FNorm|_] = VNorms0,
+ VData = offset_loop_data_3(Mirror, V1, Vpos1, VNorms0, NEdge, VDir,
+ Dir, EDir0, FNtab, We, VData0),
+ VPs = [Vpos1|VPs0],
+ Vs = [V1|Vs0],
+ offset_loop_data_2(NextE, EdgeData, V2, Vpos2, PFace, LastE, We, FNtab,
+ EdgeSet, NextVDir, [], [FNorm], VData, VPs, Vs, Links + 1).
+
+offset_loop_data_3(false, V, Vpos, VNorms0, NextEdge,
+ VDir, Dir, EDir0, FNtab, We, VData0) ->
+ #we{es = Etab} = We,
+ VNorm = e3d_vec:norm(e3d_vec:add(VNorms0)),
+ NV = wings_vertex:other(V, gb_trees:get(NextEdge, Etab)), %% HERE
+ ANorm = vertex_normal(NV, FNtab, We),
+ EDir = some_fake_module:average_edge_dir(VNorm, VDir, Dir, EDir0),
+ AvgDir = some_fake_module:evaluate_vdata(VDir, Dir, VNorm),
+ ScaledDir = some_fake_module:along_edge_scale_factor(VDir, Dir, EDir, ANorm),
+ [{V,{Vpos,AvgDir,EDir,ScaledDir}}|VData0].
+
+average_loop_norm([{_,LNorms}]) ->
+ e3d_vec:norm(LNorms);
+average_loop_norm([{LinksA,LNormA},{LinksB,LNormB}]) ->
+ case LinksA < LinksB of
+ true ->
+ e3d_vec:norm(e3d_vec:add(e3d_vec:neg(LNormA), LNormB));
+ false ->
+ e3d_vec:norm(e3d_vec:add(e3d_vec:neg(LNormB), LNormA))
+ end;
+average_loop_norm(LNorms) ->
+ LoopNorms = [Norm || {_,Norm} <- LNorms],
+ e3d_vec:norm(e3d_vec:neg(e3d_vec:add(LoopNorms))).
+
+vertex_normals([V|Vs], FaceNormTab, #we{vp = Vtab, mirror = M} = We, Acc) ->
+ FaceNorms =
+ wings_vertex:fold(fun(_, Face, _, A) when Face == M ->
+ [e3d_vec:neg(wings_face:normal(M, We))|A];
+ (_, Face, _, A) ->
+ [gb_trees:get(Face, FaceNormTab)|A]
+ end, [], V, We),
+ VNorm = e3d_vec:norm(e3d_vec:add(FaceNorms)),
+ Vpos = gb_trees:get(V, Vtab),
+ vertex_normals(Vs, FaceNormTab, We, [{V,{Vpos,VNorm}}|Acc]);
+vertex_normals([], _, _, Acc) ->
+ Acc.
+
+vertex_normal(V, FaceNormTab, #we{mirror = M} = We) ->
+ wings_vertex:fold(fun(_, Face, _, A) when Face == M ->
+ [e3d_vec:neg(wings_face:normal(Face, We))|A];
+ (_, Face, _, A) ->
+ N = gb_trees:get(Face, FaceNormTab),
+ case e3d_vec:is_zero(N) of
+ true -> A;
+ false -> [N|A]
+ end
+ end, [], V, We).
+
+offset_regions_fun(OffsetData, {_,Solution,_} = State) ->
+ fun(new_mode_data, {NewState,_}) ->
+ offset_regions_fun(OffsetData, NewState);
+ ([Dist,_,_,Bump|_], A) ->
+ lists:foldl(fun({LoopNormal,VsData}, VsAcc0) ->
+ lists:foldl(fun({V,{Vpos0,VNorm}}, VsAcc) ->
+ [{V,Vpos0}|VsAcc];
+ ({V,{Vpos0,Dir,EDir,ScaledEDir}}, VsAcc) ->
+ Vec = case Solution of
+ average -> Dir;
+ along_edges -> EDir;
+ scaled -> ScaledEDir
+ end,
+ [{V,Vpos0}|VsAcc]
+ end, VsAcc0, VsData)
+ end, A, OffsetData)
+ end.
diff --git a/lib/dialyzer/test/opaque_SUITE_data/src/modules/opaque_digraph.erl b/lib/dialyzer/test/opaque_SUITE_data/src/modules/opaque_digraph.erl
new file mode 100644
index 0000000000..09d4229e28
--- /dev/null
+++ b/lib/dialyzer/test/opaque_SUITE_data/src/modules/opaque_digraph.erl
@@ -0,0 +1,655 @@
+%%
+%% %CopyrightBegin%
+%%
+%% Copyright Ericsson AB 1996-2014. 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%
+%%
+
+
+%%% The Erlang scanner. All types are opaque, which puts some stress
+%%% on Dialyzer.
+
+-module(opaque_digraph).
+
+-export([new/0, new/1, delete/1, info/1]).
+
+-export([add_vertex/1, add_vertex/2, add_vertex/3]).
+-export([del_vertex/2, del_vertices/2]).
+-export([vertex/2, no_vertices/1, vertices/1]).
+-export([source_vertices/1, sink_vertices/1]).
+
+-export([add_edge/3, add_edge/4, add_edge/5]).
+-export([del_edge/2, del_edges/2, del_path/3]).
+-export([edge/2, no_edges/1, edges/1]).
+
+-export([out_neighbours/2, in_neighbours/2]).
+-export([out_edges/2, in_edges/2, edges/2]).
+-export([out_degree/2, in_degree/2]).
+-export([get_path/3, get_cycle/2]).
+
+-export([get_short_path/3, get_short_cycle/2]).
+
+-export_type([local_digraph/0, d_type/0, vertex/0]).
+
+-record(digraph, {vtab = notable :: ets:tab(),
+ etab = notable :: ets:tab(),
+ ntab = notable :: ets:tab(),
+ cyclic = true :: boolean()}).
+
+-opaque local_digraph() :: #digraph{}.
+
+-export_type([edge/0, label/0, add_edge_err_rsn/0,
+ d_protection/0, d_cyclicity/0]).
+
+-opaque edge() :: term().
+-opaque label() :: term().
+-opaque vertex() :: term().
+
+-opaque add_edge_err_rsn() :: {'bad_edge', Path :: [vertex()]}
+ | {'bad_vertex', V :: vertex()}.
+
+%%
+%% Type is a list of
+%% protected | private
+%% acyclic | cyclic
+%%
+%% default is [cyclic,protected]
+%%
+-opaque d_protection() :: 'private' | 'protected'.
+-opaque d_cyclicity() :: 'acyclic' | 'cyclic'.
+-opaque d_type() :: d_cyclicity() | d_protection().
+
+-spec new() -> local_digraph().
+
+new() -> new([]).
+
+-spec new(Type) -> local_digraph() when
+ Type :: [d_type()].
+
+new(Type) ->
+ case check_type(Type, protected, []) of
+ {Access, Ts} ->
+ V = ets:new(vertices, [set, Access]),
+ E = ets:new(edges, [set, Access]),
+ N = ets:new(neighbours, [bag, Access]),
+ ets:insert(N, [{'$vid', 0}, {'$eid', 0}]),
+ set_type(Ts, #digraph{vtab=V, etab=E, ntab=N});
+ error ->
+ erlang:error(badarg)
+ end.
+
+%%
+%% Check type of graph
+%%
+%-spec check_type([d_type()], d_protection(), [{'cyclic', boolean()}]) ->
+% {d_protection(), [{'cyclic', boolean()}]}.
+
+check_type([acyclic|Ts], A, L) ->
+ check_type(Ts, A,[{cyclic,false} | L]);
+check_type([cyclic | Ts], A, L) ->
+ check_type(Ts, A, [{cyclic,true} | L]);
+check_type([protected | Ts], _, L) ->
+ check_type(Ts, protected, L);
+check_type([private | Ts], _, L) ->
+ check_type(Ts, private, L);
+check_type([], A, L) -> {A, L};
+check_type(_, _, _) -> error.
+
+%%
+%% Set graph type
+%%
+-spec set_type([{'cyclic', boolean()}], local_digraph()) -> local_digraph().
+
+set_type([{cyclic,V} | Ks], G) ->
+ set_type(Ks, G#digraph{cyclic = V});
+set_type([], G) -> G.
+
+
+%% Data access functions
+
+-spec delete(G) -> 'true' when
+ G :: local_digraph().
+
+delete(G) ->
+ ets:delete(G#digraph.vtab),
+ ets:delete(G#digraph.etab),
+ ets:delete(G#digraph.ntab).
+
+-spec info(G) -> InfoList when
+ G :: local_digraph(),
+ InfoList :: [{'cyclicity', Cyclicity :: d_cyclicity()} |
+ {'memory', NoWords :: non_neg_integer()} |
+ {'protection', Protection :: d_protection()}].
+
+info(G) ->
+ VT = G#digraph.vtab,
+ ET = G#digraph.etab,
+ NT = G#digraph.ntab,
+ Cyclicity = case G#digraph.cyclic of
+ true -> cyclic;
+ false -> acyclic
+ end,
+ Protection = ets:info(VT, protection),
+ Memory = ets:info(VT, memory) + ets:info(ET, memory) + ets:info(NT, memory),
+ [{cyclicity, Cyclicity}, {memory, Memory}, {protection, Protection}].
+
+-spec add_vertex(G) -> vertex() when
+ G :: local_digraph().
+
+add_vertex(G) ->
+ do_add_vertex({new_vertex_id(G), []}, G).
+
+-spec add_vertex(G, V) -> vertex() when
+ G :: local_digraph(),
+ V :: vertex().
+
+add_vertex(G, V) ->
+ do_add_vertex({V, []}, G).
+
+-spec add_vertex(G, V, Label) -> vertex() when
+ G :: local_digraph(),
+ V :: vertex(),
+ Label :: label().
+
+add_vertex(G, V, D) ->
+ do_add_vertex({V, D}, G).
+
+-spec del_vertex(G, V) -> 'true' when
+ G :: local_digraph(),
+ V :: vertex().
+
+del_vertex(G, V) ->
+ do_del_vertex(V, G).
+
+-spec del_vertices(G, Vertices) -> 'true' when
+ G :: local_digraph(),
+ Vertices :: [vertex()].
+
+del_vertices(G, Vs) ->
+ do_del_vertices(Vs, G).
+
+-spec vertex(G, V) -> {V, Label} | 'false' when
+ G :: local_digraph(),
+ V :: vertex(),
+ Label :: label().
+
+vertex(G, V) ->
+ case ets:lookup(G#digraph.vtab, V) of
+ [] -> false;
+ [Vertex] -> Vertex
+ end.
+
+-spec no_vertices(G) -> non_neg_integer() when
+ G :: local_digraph().
+
+no_vertices(G) ->
+ ets:info(G#digraph.vtab, size).
+
+-spec vertices(G) -> Vertices when
+ G :: local_digraph(),
+ Vertices :: [vertex()].
+
+vertices(G) ->
+ ets:select(G#digraph.vtab, [{{'$1', '_'}, [], ['$1']}]).
+
+-spec source_vertices(local_digraph()) -> [vertex()].
+
+source_vertices(G) ->
+ collect_vertices(G, in).
+
+-spec sink_vertices(local_digraph()) -> [vertex()].
+
+sink_vertices(G) ->
+ collect_vertices(G, out).
+
+-spec in_degree(G, V) -> non_neg_integer() when
+ G :: local_digraph(),
+ V :: vertex().
+
+in_degree(G, V) ->
+ length(ets:lookup(G#digraph.ntab, {in, V})).
+
+-spec in_neighbours(G, V) -> Vertex when
+ G :: local_digraph(),
+ V :: vertex(),
+ Vertex :: [vertex()].
+
+in_neighbours(G, V) ->
+ ET = G#digraph.etab,
+ NT = G#digraph.ntab,
+ collect_elems(ets:lookup(NT, {in, V}), ET, 2).
+
+-spec in_edges(G, V) -> Edges when
+ G :: local_digraph(),
+ V :: vertex(),
+ Edges :: [edge()].
+
+in_edges(G, V) ->
+ ets:select(G#digraph.ntab, [{{{in, V}, '$1'}, [], ['$1']}]).
+
+-spec out_degree(G, V) -> non_neg_integer() when
+ G :: local_digraph(),
+ V :: vertex().
+
+out_degree(G, V) ->
+ length(ets:lookup(G#digraph.ntab, {out, V})).
+
+-spec out_neighbours(G, V) -> Vertices when
+ G :: local_digraph(),
+ V :: vertex(),
+ Vertices :: [vertex()].
+
+out_neighbours(G, V) ->
+ ET = G#digraph.etab,
+ NT = G#digraph.ntab,
+ collect_elems(ets:lookup(NT, {out, V}), ET, 3).
+
+-spec out_edges(G, V) -> Edges when
+ G :: local_digraph(),
+ V :: vertex(),
+ Edges :: [edge()].
+
+out_edges(G, V) ->
+ ets:select(G#digraph.ntab, [{{{out, V}, '$1'}, [], ['$1']}]).
+
+-spec add_edge(G, V1, V2) -> edge() | {'error', add_edge_err_rsn()} when
+ G :: local_digraph(),
+ V1 :: vertex(),
+ V2 :: vertex().
+
+add_edge(G, V1, V2) ->
+ do_add_edge({new_edge_id(G), V1, V2, []}, G).
+
+-spec add_edge(G, V1, V2, Label) -> edge() | {'error', add_edge_err_rsn()} when
+ G :: local_digraph(),
+ V1 :: vertex(),
+ V2 :: vertex(),
+ Label :: label().
+
+add_edge(G, V1, V2, D) ->
+ do_add_edge({new_edge_id(G), V1, V2, D}, G).
+
+-spec add_edge(G, E, V1, V2, Label) -> edge() | {'error', add_edge_err_rsn()} when
+ G :: local_digraph(),
+ E :: edge(),
+ V1 :: vertex(),
+ V2 :: vertex(),
+ Label :: label().
+
+add_edge(G, E, V1, V2, D) ->
+ do_add_edge({E, V1, V2, D}, G).
+
+-spec del_edge(G, E) -> 'true' when
+ G :: local_digraph(),
+ E :: edge().
+
+del_edge(G, E) ->
+ do_del_edges([E], G).
+
+-spec del_edges(G, Edges) -> 'true' when
+ G :: local_digraph(),
+ Edges :: [edge()].
+
+del_edges(G, Es) ->
+ do_del_edges(Es, G).
+
+-spec no_edges(G) -> non_neg_integer() when
+ G :: local_digraph().
+
+no_edges(G) ->
+ ets:info(G#digraph.etab, size).
+
+-spec edges(G) -> Edges when
+ G :: local_digraph(),
+ Edges :: [edge()].
+
+edges(G) ->
+ ets:select(G#digraph.etab, [{{'$1', '_', '_', '_'}, [], ['$1']}]).
+
+-spec edges(G, V) -> Edges when
+ G :: local_digraph(),
+ V :: vertex(),
+ Edges :: [edge()].
+
+edges(G, V) ->
+ ets:select(G#digraph.ntab, [{{{out, V},'$1'}, [], ['$1']},
+ {{{in, V}, '$1'}, [], ['$1']}]).
+
+-spec edge(G, E) -> {E, V1, V2, Label} | 'false' when
+ G :: local_digraph(),
+ E :: edge(),
+ V1 :: vertex(),
+ V2 :: vertex(),
+ Label :: label().
+
+edge(G, E) ->
+ case ets:lookup(G#digraph.etab,E) of
+ [] -> false;
+ [Edge] -> Edge
+ end.
+
+%%
+%% Generate a "unique" edge identifier (relative to this graph)
+%%
+-spec new_edge_id(local_digraph()) -> edge().
+
+new_edge_id(G) ->
+ NT = G#digraph.ntab,
+ [{'$eid', K}] = ets:lookup(NT, '$eid'),
+ true = ets:delete(NT, '$eid'),
+ true = ets:insert(NT, {'$eid', K+1}),
+ ['$e' | K].
+
+%%
+%% Generate a "unique" vertex identifier (relative to this graph)
+%%
+-spec new_vertex_id(local_digraph()) -> vertex().
+
+new_vertex_id(G) ->
+ NT = G#digraph.ntab,
+ [{'$vid', K}] = ets:lookup(NT, '$vid'),
+ true = ets:delete(NT, '$vid'),
+ true = ets:insert(NT, {'$vid', K+1}),
+ ['$v' | K].
+
+%%
+%% Collect elements for a index in a tuple
+%%
+collect_elems(Keys, Table, Index) ->
+ collect_elems(Keys, Table, Index, []).
+
+collect_elems([{_,Key}|Keys], Table, Index, Acc) ->
+ collect_elems(Keys, Table, Index,
+ [ets:lookup_element(Table, Key, Index)|Acc]);
+collect_elems([], _, _, Acc) -> Acc.
+
+-spec do_add_vertex({vertex(), label()}, local_digraph()) -> vertex().
+
+do_add_vertex({V, _Label} = VL, G) ->
+ ets:insert(G#digraph.vtab, VL),
+ V.
+
+%%
+%% Collect either source or sink vertices.
+%%
+collect_vertices(G, Type) ->
+ Vs = vertices(G),
+ lists:foldl(fun(V, A) ->
+ case ets:member(G#digraph.ntab, {Type, V}) of
+ true -> A;
+ false -> [V|A]
+ end
+ end, [], Vs).
+
+%%
+%% Delete vertices
+%%
+do_del_vertices([V | Vs], G) ->
+ do_del_vertex(V, G),
+ do_del_vertices(Vs, G);
+do_del_vertices([], #digraph{}) -> true.
+
+do_del_vertex(V, G) ->
+ do_del_nedges(ets:lookup(G#digraph.ntab, {in, V}), G),
+ do_del_nedges(ets:lookup(G#digraph.ntab, {out, V}), G),
+ ets:delete(G#digraph.vtab, V).
+
+do_del_nedges([{_, E}|Ns], G) ->
+ case ets:lookup(G#digraph.etab, E) of
+ [{E, V1, V2, _}] ->
+ do_del_edge(E, V1, V2, G),
+ do_del_nedges(Ns, G);
+ [] -> % cannot happen
+ do_del_nedges(Ns, G)
+ end;
+do_del_nedges([], #digraph{}) -> true.
+
+%%
+%% Delete edges
+%%
+do_del_edges([E|Es], G) ->
+ case ets:lookup(G#digraph.etab, E) of
+ [{E,V1,V2,_}] ->
+ do_del_edge(E,V1,V2,G),
+ do_del_edges(Es, G);
+ [] ->
+ do_del_edges(Es, G)
+ end;
+do_del_edges([], #digraph{}) -> true.
+
+do_del_edge(E, V1, V2, G) ->
+ ets:select_delete(G#digraph.ntab, [{{{in, V2}, E}, [], [true]},
+ {{{out,V1}, E}, [], [true]}]),
+ ets:delete(G#digraph.etab, E).
+
+-spec rm_edges([vertex(),...], local_digraph()) -> 'true'.
+
+rm_edges([V1, V2|Vs], G) ->
+ rm_edge(V1, V2, G),
+ rm_edges([V2|Vs], G);
+rm_edges(_, _) -> true.
+
+-spec rm_edge(vertex(), vertex(), local_digraph()) -> 'ok'.
+
+rm_edge(V1, V2, G) ->
+ Es = out_edges(G, V1),
+ rm_edge_0(Es, V1, V2, G).
+
+rm_edge_0([E|Es], V1, V2, G) ->
+ case ets:lookup(G#digraph.etab, E) of
+ [{E, V1, V2, _}] ->
+ do_del_edge(E, V1, V2, G),
+ rm_edge_0(Es, V1, V2, G);
+ _ ->
+ rm_edge_0(Es, V1, V2, G)
+ end;
+rm_edge_0([], _, _, #digraph{}) -> ok.
+
+%%
+%% Check that endpoints exist
+%%
+-spec do_add_edge({edge(), vertex(), vertex(), label()}, local_digraph()) ->
+ edge() | {'error', add_edge_err_rsn()}.
+
+do_add_edge({E, V1, V2, Label}, G) ->
+ case ets:member(G#digraph.vtab, V1) of
+ false -> {error, {bad_vertex, V1}};
+ true ->
+ case ets:member(G#digraph.vtab, V2) of
+ false -> {error, {bad_vertex, V2}};
+ true ->
+ case other_edge_exists(G, E, V1, V2) of
+ true -> {error, {bad_edge, [V1, V2]}};
+ false when G#digraph.cyclic =:= false ->
+ acyclic_add_edge(E, V1, V2, Label, G);
+ false ->
+ do_insert_edge(E, V1, V2, Label, G)
+ end
+ end
+ end.
+
+other_edge_exists(#digraph{etab = ET}, E, V1, V2) ->
+ case ets:lookup(ET, E) of
+ [{E, Vert1, Vert2, _}] when Vert1 =/= V1; Vert2 =/= V2 ->
+ true;
+ _ ->
+ false
+ end.
+
+-spec do_insert_edge(edge(), vertex(), vertex(), label(), local_digraph()) -> edge().
+
+do_insert_edge(E, V1, V2, Label, #digraph{ntab=NT, etab=ET}) ->
+ ets:insert(NT, [{{out, V1}, E}, {{in, V2}, E}]),
+ ets:insert(ET, {E, V1, V2, Label}),
+ E.
+
+-spec acyclic_add_edge(edge(), vertex(), vertex(), label(), local_digraph()) ->
+ edge() | {'error', {'bad_edge', [vertex()]}}.
+
+acyclic_add_edge(_E, V1, V2, _L, _G) when V1 =:= V2 ->
+ {error, {bad_edge, [V1, V2]}};
+acyclic_add_edge(E, V1, V2, Label, G) ->
+ case get_path(G, V2, V1) of
+ false -> do_insert_edge(E, V1, V2, Label, G);
+ Path -> {error, {bad_edge, Path}}
+ end.
+
+%%
+%% Delete all paths from vertex V1 to vertex V2
+%%
+
+-spec del_path(G, V1, V2) -> 'true' when
+ G :: local_digraph(),
+ V1 :: vertex(),
+ V2 :: vertex().
+
+del_path(G, V1, V2) ->
+ case get_path(G, V1, V2) of
+ false -> true;
+ Path ->
+ rm_edges(Path, G),
+ del_path(G, V1, V2)
+ end.
+
+%%
+%% Find a cycle through V
+%% return the cycle as list of vertices [V ... V]
+%% if no cycle exists false is returned
+%% if only a cycle of length one exists it will be
+%% returned as [V] but only after longer cycles have
+%% been searched.
+%%
+
+-spec get_cycle(G, V) -> Vertices | 'false' when
+ G :: local_digraph(),
+ V :: vertex(),
+ Vertices :: [vertex(),...].
+
+get_cycle(G, V) ->
+ case one_path(out_neighbours(G, V), V, [], [V], [V], 2, G, 1) of
+ false ->
+ case lists:member(V, out_neighbours(G, V)) of
+ true -> [V];
+ false -> false
+ end;
+ Vs -> Vs
+ end.
+
+%%
+%% Find a path from V1 to V2
+%% return the path as list of vertices [V1 ... V2]
+%% if no path exists false is returned
+%%
+
+-spec get_path(G, V1, V2) -> Vertices | 'false' when
+ G :: local_digraph(),
+ V1 :: vertex(),
+ V2 :: vertex(),
+ Vertices :: [vertex(),...].
+
+get_path(G, V1, V2) ->
+ one_path(out_neighbours(G, V1), V2, [], [V1], [V1], 1, G, 1).
+
+%%
+%% prune_short_path (evaluate conditions on path)
+%% short : if path is too short
+%% ok : if path is ok
+%%
+prune_short_path(Counter, Min) when Counter < Min ->
+ short;
+prune_short_path(_Counter, _Min) ->
+ ok.
+
+one_path([W|Ws], W, Cont, Xs, Ps, Prune, G, Counter) ->
+ case prune_short_path(Counter, Prune) of
+ short -> one_path(Ws, W, Cont, Xs, Ps, Prune, G, Counter);
+ ok -> lists:reverse([W|Ps])
+ end;
+one_path([V|Vs], W, Cont, Xs, Ps, Prune, G, Counter) ->
+ case lists:member(V, Xs) of
+ true -> one_path(Vs, W, Cont, Xs, Ps, Prune, G, Counter);
+ false -> one_path(out_neighbours(G, V), W,
+ [{Vs,Ps} | Cont], [V|Xs], [V|Ps],
+ Prune, G, Counter+1)
+ end;
+one_path([], W, [{Vs,Ps}|Cont], Xs, _, Prune, G, Counter) ->
+ one_path(Vs, W, Cont, Xs, Ps, Prune, G, Counter-1);
+one_path([], _, [], _, _, _, _, _Counter) -> false.
+
+%%
+%% Like get_cycle/2, but a cycle of length one is preferred.
+%%
+
+-spec get_short_cycle(G, V) -> Vertices | 'false' when
+ G :: local_digraph(),
+ V :: vertex(),
+ Vertices :: [vertex(),...].
+
+get_short_cycle(G, V) ->
+ get_short_path(G, V, V).
+
+%%
+%% Like get_path/3, but using a breadth-first search makes it possible
+%% to find a short path.
+%%
+
+-spec get_short_path(G, V1, V2) -> Vertices | 'false' when
+ G :: local_digraph(),
+ V1 :: vertex(),
+ V2 :: vertex(),
+ Vertices :: [vertex(),...].
+
+get_short_path(G, V1, V2) ->
+ T = new(),
+ add_vertex(T, V1),
+ Q = queue:new(),
+ Q1 = queue_out_neighbours(V1, G, Q),
+ L = spath(Q1, G, V2, T),
+ delete(T),
+ L.
+
+spath(Q, G, Sink, T) ->
+ case queue:out(Q) of
+ {{value, E}, Q1} ->
+ {_E, V1, V2, _Label} = edge(G, E),
+ if
+ Sink =:= V2 ->
+ follow_path(V1, T, [V2]);
+ true ->
+ case vertex(T, V2) of
+ false ->
+ add_vertex(T, V2),
+ add_edge(T, V2, V1),
+ NQ = queue_out_neighbours(V2, G, Q1),
+ spath(NQ, G, Sink, T);
+ _V ->
+ spath(Q1, G, Sink, T)
+ end
+ end;
+ {empty, _Q1} ->
+ false
+ end.
+
+follow_path(V, T, P) ->
+ P1 = [V | P],
+ case out_neighbours(T, V) of
+ [N] ->
+ follow_path(N, T, P1);
+ [] ->
+ P1
+ end.
+
+queue_out_neighbours(V, G, Q0) ->
+ lists:foldl(fun(E, Q) -> queue:in(E, Q) end, Q0, out_edges(G, V)).
diff --git a/lib/dialyzer/test/opaque_SUITE_data/src/modules/opaque_erl_scan.erl b/lib/dialyzer/test/opaque_SUITE_data/src/modules/opaque_erl_scan.erl
new file mode 100644
index 0000000000..24d0793a7c
--- /dev/null
+++ b/lib/dialyzer/test/opaque_SUITE_data/src/modules/opaque_erl_scan.erl
@@ -0,0 +1,1300 @@
+%%
+%%
+%% %CopyrightBegin%
+%%
+%% Copyright Ericsson AB 1996-2014. 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%
+%%
+
+
+%%% The Erlang scanner. All types are opaque, which puts some stress
+%%% on Dialyzer.
+
+-module(opaque_erl_scan).
+
+%%% External exports
+
+-export([string/1,string/2,string/3,tokens/3,tokens/4,
+ format_error/1,reserved_word/1,
+ token_info/1,token_info/2,
+ attributes_info/1,attributes_info/2,set_attribute/3]).
+
+%%% Private
+-export([continuation_location/1]).
+
+-export_type([error_info/0,
+ line/0,
+ location/0,
+ options/0,
+ return_cont/0,
+ token/0,
+ tokens_result/0]).
+
+%%%
+%%% Defines and type definitions
+%%%
+
+-define(COLUMN(C), (is_integer(C) andalso C >= 1)).
+%% Line numbers less than zero have always been allowed:
+-define(ALINE(L), is_integer(L)).
+-define(STRING(S), is_list(S)).
+-define(RESWORDFUN(F), is_function(F, 1)).
+-define(SETATTRFUN(F), is_function(F, 1)).
+
+-export_type([category/0, column/0, resword_fun/0, option/0, symbol/0,
+ info_line/0, attributes_data/0, attributes/0, tokens/0,
+ error_description/0, char_spec/0, cont_fun/0,
+ attribute_item/0, info_location/0, attribute_info/0,
+ token_item/0, token_info/0]).
+
+-opaque category() :: atom().
+-opaque column() :: pos_integer().
+-opaque line() :: integer().
+-opaque location() :: line() | {line(),column()}.
+-opaque resword_fun() :: fun((atom()) -> boolean()).
+-opaque option() :: 'return' | 'return_white_spaces' | 'return_comments'
+ | 'text' | {'reserved_word_fun', resword_fun()}.
+-opaque options() :: option() | [option()].
+-opaque symbol() :: atom() | float() | integer() | string().
+-opaque info_line() :: integer() | term().
+-opaque attributes_data()
+ :: [{'column', column()} | {'line', info_line()} | {'text', string()}]
+ | {line(), column()}.
+%% The fact that {line(),column()} is a possible attributes() type
+%% is hidden.
+-opaque attributes() :: line() | attributes_data().
+-opaque token() :: {category(), attributes(), symbol()}
+ | {category(), attributes()}.
+-opaque tokens() :: [token()].
+-opaque error_description() :: term().
+-opaque error_info() :: {location(), module(), error_description()}.
+
+%%% Local record.
+-record(erl_scan,
+ {resword_fun = fun reserved_word/1 :: resword_fun(),
+ ws = false :: boolean(),
+ comment = false :: boolean(),
+ text = false :: boolean()}).
+
+%%----------------------------------------------------------------------------
+
+-spec format_error(ErrorDescriptor) -> string() when
+ ErrorDescriptor :: error_description().
+format_error({string,Quote,Head}) ->
+ lists:flatten(["unterminated " ++ string_thing(Quote) ++
+ " starting with " ++
+ io_lib:write_string(Head, Quote)]);
+format_error({illegal,Type}) ->
+ lists:flatten(io_lib:fwrite("illegal ~w", [Type]));
+format_error(char) -> "unterminated character";
+format_error({base,Base}) ->
+ lists:flatten(io_lib:fwrite("illegal base '~w'", [Base]));
+format_error(Other) ->
+ lists:flatten(io_lib:write(Other)).
+
+-spec string(String) -> Return when
+ String :: string(),
+ Return :: {'ok', Tokens :: tokens(), EndLocation}
+ | {'error', ErrorInfo :: error_info(), ErrorLocation},
+ EndLocation :: location(),
+ ErrorLocation :: location().
+string(String) ->
+ string(String, 1, []).
+
+-spec string(String, StartLocation) -> Return when
+ String :: string(),
+ Return :: {'ok', Tokens :: tokens(), EndLocation}
+ | {'error', ErrorInfo :: error_info(), ErrorLocation},
+ StartLocation :: location(),
+ EndLocation :: location(),
+ ErrorLocation :: location().
+string(String, StartLocation) ->
+ string(String, StartLocation, []).
+
+-spec string(String, StartLocation, Options) -> Return when
+ String :: string(),
+ Options :: options(),
+ Return :: {'ok', Tokens :: tokens(), EndLocation}
+ | {'error', ErrorInfo :: error_info(), ErrorLocation},
+ StartLocation :: location(),
+ EndLocation :: location(),
+ ErrorLocation :: location().
+string(String, Line, Options) when ?STRING(String), ?ALINE(Line) ->
+ string1(String, options(Options), Line, no_col, []);
+string(String, {Line,Column}, Options) when ?STRING(String),
+ ?ALINE(Line),
+ ?COLUMN(Column) ->
+ string1(String, options(Options), Line, Column, []).
+
+-opaque char_spec() :: string() | 'eof'.
+-opaque cont_fun() :: fun((char_spec(), #erl_scan{}, line(), column(),
+ tokens(), any()) -> any()).
+-opaque return_cont() :: {erl_scan_continuation,
+ string(), column(), tokens(), line(),
+ #erl_scan{}, any(), cont_fun()}.
+-opaque tokens_result() :: {'ok', Tokens :: tokens(), EndLocation :: location()}
+ | {'eof', EndLocation :: location()}
+ | {'error', ErrorInfo :: error_info(),
+ EndLocation :: location()}.
+
+-spec tokens(Continuation, CharSpec, StartLocation) -> Return when
+ Continuation :: return_cont() | [],
+ CharSpec :: char_spec(),
+ StartLocation :: location(),
+ Return :: {'done',Result :: tokens_result(),LeftOverChars :: char_spec()}
+ | {'more', Continuation1 :: return_cont()}.
+tokens(Cont, CharSpec, StartLocation) ->
+ tokens(Cont, CharSpec, StartLocation, []).
+
+-spec tokens(Continuation, CharSpec, StartLocation, Options) -> Return when
+ Continuation :: return_cont() | [],
+ CharSpec :: char_spec(),
+ StartLocation :: location(),
+ Options :: options(),
+ Return :: {'done',Result :: tokens_result(),LeftOverChars :: char_spec()}
+ | {'more', Continuation1 :: return_cont()}.
+tokens([], CharSpec, Line, Options) when ?ALINE(Line) ->
+ tokens1(CharSpec, options(Options), Line, no_col, [], fun scan/6, []);
+tokens([], CharSpec, {Line,Column}, Options) when ?ALINE(Line),
+ ?COLUMN(Column) ->
+ tokens1(CharSpec, options(Options), Line, Column, [], fun scan/6, []);
+tokens({erl_scan_continuation,Cs,Col,Toks,Line,St,Any,Fun},
+ CharSpec, _Loc, _Opts) ->
+ tokens1(Cs++CharSpec, St, Line, Col, Toks, Fun, Any).
+
+continuation_location({erl_scan_continuation,_,no_col,_,Line,_,_,_}) ->
+ Line;
+continuation_location({erl_scan_continuation,_,Col,_,Line,_,_,_}) ->
+ {Line,Col}.
+
+-opaque attribute_item() :: 'column' | 'length' | 'line'
+ | 'location' | 'text'.
+-opaque info_location() :: location() | term().
+-opaque attribute_info() :: {'column', column()}| {'length', pos_integer()}
+ | {'line', info_line()}
+ | {'location', info_location()}
+ | {'text', string()}.
+-opaque token_item() :: 'category' | 'symbol' | attribute_item().
+-opaque token_info() :: {'category', category()} | {'symbol', symbol()}
+ | attribute_info().
+
+-spec token_info(Token) -> TokenInfo when
+ Token :: token(),
+ TokenInfo :: [TokenInfoTuple :: token_info()].
+token_info(Token) ->
+ Items = [category,column,length,line,symbol,text], % undefined order
+ token_info(Token, Items).
+
+-spec token_info(Token, TokenItem) -> TokenInfoTuple | 'undefined' when
+ Token :: token(),
+ TokenItem :: token_item(),
+ TokenInfoTuple :: token_info();
+ (Token, TokenItems) -> TokenInfo when
+ Token :: token(),
+ TokenItems :: [TokenItem :: token_item()],
+ TokenInfo :: [TokenInfoTuple :: token_info()].
+token_info(_Token, []) ->
+ [];
+token_info(Token, [Item|Items]) when is_atom(Item) ->
+ case token_info(Token, Item) of
+ undefined ->
+ token_info(Token, Items);
+ TokenInfo when is_tuple(TokenInfo) ->
+ [TokenInfo|token_info(Token, Items)]
+ end;
+token_info({Category,_Attrs}, category=Item) ->
+ {Item,Category};
+token_info({Category,_Attrs,_Symbol}, category=Item) ->
+ {Item,Category};
+token_info({Category,_Attrs}, symbol=Item) ->
+ {Item,Category};
+token_info({_Category,_Attrs,Symbol}, symbol=Item) ->
+ {Item,Symbol};
+token_info({_Category,Attrs}, Item) ->
+ attributes_info(Attrs, Item);
+token_info({_Category,Attrs,_Symbol}, Item) ->
+ attributes_info(Attrs, Item).
+
+-spec attributes_info(Attributes) -> AttributesInfo when
+ Attributes :: attributes(),
+ AttributesInfo :: [AttributeInfoTuple :: attribute_info()].
+attributes_info(Attributes) ->
+ Items = [column,length,line,text], % undefined order
+ attributes_info(Attributes, Items).
+
+-spec attributes_info
+ (Attributes, AttributeItem) -> AttributeInfoTuple | 'undefined' when
+ Attributes :: attributes(),
+ AttributeItem :: attribute_item(),
+ AttributeInfoTuple :: attribute_info();
+ (Attributes, AttributeItems) -> AttributeInfo when
+ Attributes :: attributes(),
+ AttributeItems :: [AttributeItem :: attribute_item()],
+ AttributeInfo :: [AttributeInfoTuple :: attribute_info()].
+attributes_info(_Attrs, []) ->
+ [];
+attributes_info(Attrs, [A|As]) when is_atom(A) ->
+ case attributes_info(Attrs, A) of
+ undefined ->
+ attributes_info(Attrs, As);
+ AttributeInfo when is_tuple(AttributeInfo) ->
+ [AttributeInfo|attributes_info(Attrs, As)]
+ end;
+attributes_info({Line,Column}, column=Item) when ?ALINE(Line),
+ ?COLUMN(Column) ->
+ {Item,Column};
+attributes_info(Line, column) when ?ALINE(Line) ->
+ undefined;
+attributes_info(Attrs, column=Item) ->
+ attr_info(Attrs, Item);
+attributes_info(Attrs, length=Item) ->
+ case attributes_info(Attrs, text) of
+ undefined ->
+ undefined;
+ {text,Text} ->
+ {Item,length(Text)}
+ end;
+attributes_info(Line, line=Item) when ?ALINE(Line) ->
+ {Item,Line};
+attributes_info({Line,Column}, line=Item) when ?ALINE(Line),
+ ?COLUMN(Column) ->
+ {Item,Line};
+attributes_info(Attrs, line=Item) ->
+ attr_info(Attrs, Item);
+attributes_info({Line,Column}=Location, location=Item) when ?ALINE(Line),
+ ?COLUMN(Column) ->
+ {Item,Location};
+attributes_info(Line, location=Item) when ?ALINE(Line) ->
+ {Item,Line};
+attributes_info(Attrs, location=Item) ->
+ {line,Line} = attributes_info(Attrs, line), % assume line is present
+ case attributes_info(Attrs, column) of
+ undefined ->
+ %% If set_attribute() has assigned a term such as {17,42}
+ %% to 'line', then Line will look like {Line,Column}. One
+ %% should not use 'location' but 'line' and 'column' in
+ %% such special cases.
+ {Item,Line};
+ {column,Column} ->
+ {Item,{Line,Column}}
+ end;
+attributes_info({Line,Column}, text) when ?ALINE(Line), ?COLUMN(Column) ->
+ undefined;
+attributes_info(Line, text) when ?ALINE(Line) ->
+ undefined;
+attributes_info(Attrs, text=Item) ->
+ attr_info(Attrs, Item);
+attributes_info(T1, T2) ->
+ erlang:error(badarg, [T1,T2]).
+
+-spec set_attribute(AttributeItem, Attributes, SetAttributeFun) -> Attributes when
+ AttributeItem :: 'line',
+ Attributes :: attributes(),
+ SetAttributeFun :: fun((info_line()) -> info_line()).
+set_attribute(Tag, Attributes, Fun) when ?SETATTRFUN(Fun) ->
+ set_attr(Tag, Attributes, Fun).
+
+%%%
+%%% Local functions
+%%%
+
+string_thing($') -> "atom"; %' Stupid Emacs
+string_thing(_) -> "string".
+
+-define(WHITE_SPACE(C),
+ is_integer(C) andalso
+ (C >= $\000 andalso C =< $\s orelse C >= $\200 andalso C =< $\240)).
+-define(DIGIT(C), C >= $0, C =< $9).
+-define(CHAR(C), is_integer(C), C >= 0).
+-define(UNICODE(C),
+ is_integer(C) andalso
+ (C >= 0 andalso C < 16#D800 orelse
+ C > 16#DFFF andalso C < 16#FFFE orelse
+ C > 16#FFFF andalso C =< 16#10FFFF)).
+
+-define(UNI255(C), C >= 0, C =< 16#ff).
+
+options(Opts0) when is_list(Opts0) ->
+ Opts = lists:foldr(fun expand_opt/2, [], Opts0),
+ [RW_fun] =
+ case opts(Opts, [reserved_word_fun], []) of
+ badarg ->
+ erlang:error(badarg, [Opts0]);
+ R ->
+ R
+ end,
+ Comment = proplists:get_bool(return_comments, Opts),
+ WS = proplists:get_bool(return_white_spaces, Opts),
+ Txt = proplists:get_bool(text, Opts),
+ #erl_scan{resword_fun = RW_fun,
+ comment = Comment,
+ ws = WS,
+ text = Txt};
+options(Opt) ->
+ options([Opt]).
+
+opts(Options, [Key|Keys], L) ->
+ V = case lists:keyfind(Key, 1, Options) of
+ {reserved_word_fun,F} when ?RESWORDFUN(F) ->
+ {ok,F};
+ {Key,_} ->
+ badarg;
+ false ->
+ {ok,default_option(Key)}
+ end,
+ case V of
+ badarg ->
+ badarg;
+ {ok,Value} ->
+ opts(Options, Keys, [Value|L])
+ end;
+opts(_Options, [], L) ->
+ lists:reverse(L).
+
+default_option(reserved_word_fun) ->
+ fun reserved_word/1.
+
+expand_opt(return, Os) ->
+ [return_comments,return_white_spaces|Os];
+expand_opt(O, Os) ->
+ [O|Os].
+
+attr_info(Attrs, Item) ->
+ try lists:keyfind(Item, 1, Attrs) of
+ {_Item, _Value} = T ->
+ T;
+ false ->
+ undefined
+ catch
+ _:_ ->
+ erlang:error(badarg, [Attrs, Item])
+ end.
+
+-spec set_attr('line', attributes(), fun((line()) -> line())) -> attributes().
+
+set_attr(line, Line, Fun) when ?ALINE(Line) ->
+ Ln = Fun(Line),
+ if
+ ?ALINE(Ln) ->
+ Ln;
+ true ->
+ [{line,Ln}]
+ end;
+set_attr(line, {Line,Column}, Fun) when ?ALINE(Line), ?COLUMN(Column) ->
+ Ln = Fun(Line),
+ if
+ ?ALINE(Ln) ->
+ {Ln,Column};
+ true ->
+ [{line,Ln},{column,Column}]
+ end;
+set_attr(line=Tag, Attrs, Fun) when is_list(Attrs) ->
+ {line,Line} = lists:keyfind(Tag, 1, Attrs),
+ case lists:keyreplace(Tag, 1, Attrs, {line,Fun(Line)}) of
+ [{line,Ln}] when ?ALINE(Ln) ->
+ Ln;
+ As ->
+ As
+ end;
+set_attr(T1, T2, T3) ->
+ erlang:error(badarg, [T1,T2,T3]).
+
+tokens1(Cs, St, Line, Col, Toks, Fun, Any) when ?STRING(Cs); Cs =:= eof ->
+ case Fun(Cs, St, Line, Col, Toks, Any) of
+ {more,{Cs0,Ncol,Ntoks,Nline,Nany,Nfun}} ->
+ {more,{erl_scan_continuation,Cs0,Ncol,Ntoks,Nline,St,Nany,Nfun}};
+ {ok,Toks0,eof,Nline,Ncol} ->
+ Res = case Toks0 of
+ [] ->
+ {eof,location(Nline, Ncol)};
+ _ ->
+ {ok,lists:reverse(Toks0),location(Nline,Ncol)}
+ end,
+ {done,Res,eof};
+ {ok,Toks0,Rest,Nline,Ncol} ->
+ {done,{ok,lists:reverse(Toks0),location(Nline, Ncol)},Rest};
+ {{error,_,_}=Error,Rest} ->
+ {done,Error,Rest}
+ end.
+
+string1(Cs, St, Line, Col, Toks) ->
+ case scan1(Cs, St, Line, Col, Toks) of
+ {more,{Cs0,Ncol,Ntoks,Nline,Any,Fun}} ->
+ case Fun(Cs0++eof, St, Nline, Ncol, Ntoks, Any) of
+ {ok,Toks1,_Rest,Line2,Col2} ->
+ {ok,lists:reverse(Toks1),location(Line2, Col2)};
+ {{error,_,_}=Error,_Rest} ->
+ Error
+ end;
+ {ok,Ntoks,[_|_]=Rest,Nline,Ncol} ->
+ string1(Rest, St, Nline, Ncol, Ntoks);
+ {ok,Ntoks,_,Nline,Ncol} ->
+ {ok,lists:reverse(Ntoks),location(Nline, Ncol)};
+ {{error,_,_}=Error,_Rest} ->
+ Error
+ end.
+
+scan(Cs, St, Line, Col, Toks, _) ->
+ scan1(Cs, St, Line, Col, Toks).
+
+scan1([$\s|Cs], St, Line, Col, Toks) when St#erl_scan.ws ->
+ scan_spcs(Cs, St, Line, Col, Toks, 1);
+scan1([$\s|Cs], St, Line, Col, Toks) ->
+ skip_white_space(Cs, St, Line, Col, Toks, 1);
+scan1([$\n|Cs], St, Line, Col, Toks) when St#erl_scan.ws ->
+ scan_newline(Cs, St, Line, Col, Toks);
+scan1([$\n|Cs], St, Line, Col, Toks) ->
+ skip_white_space(Cs, St, Line+1, new_column(Col, 1), Toks, 0);
+scan1([C|Cs], St, Line, Col, Toks) when C >= $A, C =< $Z ->
+ scan_variable(Cs, St, Line, Col, Toks, [C]);
+scan1([C|Cs], St, Line, Col, Toks) when C >= $a, C =< $z ->
+ scan_atom(Cs, St, Line, Col, Toks, [C]);
+%% Optimization: some very common punctuation characters:
+scan1([$,|Cs], St, Line, Col, Toks) ->
+ tok2(Cs, St, Line, Col, Toks, ",", ',', 1);
+scan1([$(|Cs], St, Line, Col, Toks) ->
+ tok2(Cs, St, Line, Col, Toks, "(", '(', 1);
+scan1([$)|Cs], St, Line, Col, Toks) ->
+ tok2(Cs, St, Line, Col, Toks, ")", ')', 1);
+scan1([${|Cs], St, Line, Col, Toks) ->
+ tok2(Cs, St, Line, Col, Toks, "{", '{', 1);
+scan1([$}|Cs], St, Line, Col, Toks) ->
+ tok2(Cs, St, Line, Col, Toks, "}", '}', 1);
+scan1([$[|Cs], St, Line, Col, Toks) ->
+ tok2(Cs, St, Line, Col, Toks, "[", '[', 1);
+scan1([$]|Cs], St, Line, Col, Toks) ->
+ tok2(Cs, St, Line, Col, Toks, "]", ']', 1);
+scan1([$;|Cs], St, Line, Col, Toks) ->
+ tok2(Cs, St, Line, Col, Toks, ";", ';', 1);
+scan1([$_=C|Cs], St, Line, Col, Toks) ->
+ scan_variable(Cs, St, Line, Col, Toks, [C]);
+%% More punctuation characters below.
+scan1([$\%|Cs], St, Line, Col, Toks) when not St#erl_scan.comment ->
+ skip_comment(Cs, St, Line, Col, Toks, 1);
+scan1([$\%=C|Cs], St, Line, Col, Toks) ->
+ scan_comment(Cs, St, Line, Col, Toks, [C]);
+scan1([C|Cs], St, Line, Col, Toks) when ?DIGIT(C) ->
+ scan_number(Cs, St, Line, Col, Toks, [C]);
+scan1("..."++Cs, St, Line, Col, Toks) ->
+ tok2(Cs, St, Line, Col, Toks, "...", '...', 3);
+scan1(".."=Cs, _St, Line, Col, Toks) ->
+ {more,{Cs,Col,Toks,Line,[],fun scan/6}};
+scan1(".."++Cs, St, Line, Col, Toks) ->
+ tok2(Cs, St, Line, Col, Toks, "..", '..', 2);
+scan1("."=Cs, _St, Line, Col, Toks) ->
+ {more,{Cs,Col,Toks,Line,[],fun scan/6}};
+scan1([$.=C|Cs], St, Line, Col, Toks) ->
+ scan_dot(Cs, St, Line, Col, Toks, [C]);
+scan1([$"|Cs], St, Line, Col, Toks) -> %" Emacs
+ State0 = {[],[],Line,Col},
+ scan_string(Cs, St, Line, incr_column(Col, 1), Toks, State0);
+scan1([$'|Cs], St, Line, Col, Toks) -> %' Emacs
+ State0 = {[],[],Line,Col},
+ scan_qatom(Cs, St, Line, incr_column(Col, 1), Toks, State0);
+scan1([$$|Cs], St, Line, Col, Toks) ->
+ scan_char(Cs, St, Line, Col, Toks);
+scan1([$\r|Cs], St, Line, Col, Toks) when St#erl_scan.ws ->
+ white_space_end(Cs, St, Line, Col, Toks, 1, "\r");
+scan1([C|Cs], St, Line, Col, Toks) when C >= $ß, C =< $ÿ, C =/= $÷ ->
+ scan_atom(Cs, St, Line, Col, Toks, [C]);
+scan1([C|Cs], St, Line, Col, Toks) when C >= $À, C =< $Þ, C /= $× ->
+ scan_variable(Cs, St, Line, Col, Toks, [C]);
+scan1([$\t|Cs], St, Line, Col, Toks) when St#erl_scan.ws ->
+ scan_tabs(Cs, St, Line, Col, Toks, 1);
+scan1([$\t|Cs], St, Line, Col, Toks) ->
+ skip_white_space(Cs, St, Line, Col, Toks, 1);
+scan1([C|Cs], St, Line, Col, Toks) when ?WHITE_SPACE(C) ->
+ case St#erl_scan.ws of
+ true ->
+ scan_white_space(Cs, St, Line, Col, Toks, [C]);
+ false ->
+ skip_white_space(Cs, St, Line, Col, Toks, 1)
+ end;
+%% Punctuation characters and operators, first recognise multiples.
+%% << <- <=
+scan1("<<"++Cs, St, Line, Col, Toks) ->
+ tok2(Cs, St, Line, Col, Toks, "<<", '<<', 2);
+scan1("<-"++Cs, St, Line, Col, Toks) ->
+ tok2(Cs, St, Line, Col, Toks, "<-", '<-', 2);
+scan1("<="++Cs, St, Line, Col, Toks) ->
+ tok2(Cs, St, Line, Col, Toks, "<=", '<=', 2);
+scan1("<"=Cs, _St, Line, Col, Toks) ->
+ {more,{Cs,Col,Toks,Line,[],fun scan/6}};
+%% >> >=
+scan1(">>"++Cs, St, Line, Col, Toks) ->
+ tok2(Cs, St, Line, Col, Toks, ">>", '>>', 2);
+scan1(">="++Cs, St, Line, Col, Toks) ->
+ tok2(Cs, St, Line, Col, Toks, ">=", '>=', 2);
+scan1(">"=Cs, _St, Line, Col, Toks) ->
+ {more,{Cs,Col,Toks,Line,[],fun scan/6}};
+%% -> --
+scan1("->"++Cs, St, Line, Col, Toks) ->
+ tok2(Cs, St, Line, Col, Toks, "->", '->', 2);
+scan1("--"++Cs, St, Line, Col, Toks) ->
+ tok2(Cs, St, Line, Col, Toks, "--", '--', 2);
+scan1("-"=Cs, _St, Line, Col, Toks) ->
+ {more,{Cs,Col,Toks,Line,[],fun scan/6}};
+%% ++
+scan1("++"++Cs, St, Line, Col, Toks) ->
+ tok2(Cs, St, Line, Col, Toks, "++", '++', 2);
+scan1("+"=Cs, _St, Line, Col, Toks) ->
+ {more,{Cs,Col,Toks,Line,[],fun scan/6}};
+%% =:= =/= =< ==
+scan1("=:="++Cs, St, Line, Col, Toks) ->
+ tok2(Cs, St, Line, Col, Toks, "=:=", '=:=', 3);
+scan1("=:"=Cs, _St, Line, Col, Toks) ->
+ {more,{Cs,Col,Toks,Line,[],fun scan/6}};
+scan1("=/="++Cs, St, Line, Col, Toks) ->
+ tok2(Cs, St, Line, Col, Toks, "=/=", '=/=', 3);
+scan1("=/"=Cs, _St, Line, Col, Toks) ->
+ {more,{Cs,Col,Toks,Line,[],fun scan/6}};
+scan1("=<"++Cs, St, Line, Col, Toks) ->
+ tok2(Cs, St, Line, Col, Toks, "=<", '=<', 2);
+scan1("=="++Cs, St, Line, Col, Toks) ->
+ tok2(Cs, St, Line, Col, Toks, "==", '==', 2);
+scan1("="=Cs, _St, Line, Col, Toks) ->
+ {more,{Cs,Col,Toks,Line,[],fun scan/6}};
+%% /=
+scan1("/="++Cs, St, Line, Col, Toks) ->
+ tok2(Cs, St, Line, Col, Toks, "/=", '/=', 2);
+scan1("/"=Cs, _St, Line, Col, Toks) ->
+ {more,{Cs,Col,Toks,Line,[],fun scan/6}};
+%% ||
+scan1("||"++Cs, St, Line, Col, Toks) ->
+ tok2(Cs, St, Line, Col, Toks, "||", '||', 2);
+scan1("|"=Cs, _St, Line, Col, Toks) ->
+ {more,{Cs,Col,Toks,Line,[],fun scan/6}};
+%% :-
+scan1(":-"++Cs, St, Line, Col, Toks) ->
+ tok2(Cs, St, Line, Col, Toks, ":-", ':-', 2);
+%% :: for typed records
+scan1("::"++Cs, St, Line, Col, Toks) ->
+ tok2(Cs, St, Line, Col, Toks, "::", '::', 2);
+scan1(":"=Cs, _St, Line, Col, Toks) ->
+ {more,{Cs,Col,Toks,Line,[],fun scan/6}};
+%% Optimization: punctuation characters less than 127:
+scan1([$=|Cs], St, Line, Col, Toks) ->
+ tok2(Cs, St, Line, Col, Toks, "=", '=', 1);
+scan1([$:|Cs], St, Line, Col, Toks) ->
+ tok2(Cs, St, Line, Col, Toks, ":", ':', 1);
+scan1([$||Cs], St, Line, Col, Toks) ->
+ tok2(Cs, St, Line, Col, Toks, "|", '|', 1);
+scan1([$#|Cs], St, Line, Col, Toks) ->
+ tok2(Cs, St, Line, Col, Toks, "#", '#', 1);
+scan1([$/|Cs], St, Line, Col, Toks) ->
+ tok2(Cs, St, Line, Col, Toks, "/", '/', 1);
+scan1([$?|Cs], St, Line, Col, Toks) ->
+ tok2(Cs, St, Line, Col, Toks, "?", '?', 1);
+scan1([$-|Cs], St, Line, Col, Toks) ->
+ tok2(Cs, St, Line, Col, Toks, "-", '-', 1);
+scan1([$+|Cs], St, Line, Col, Toks) ->
+ tok2(Cs, St, Line, Col, Toks, "+", '+', 1);
+scan1([$*|Cs], St, Line, Col, Toks) ->
+ tok2(Cs, St, Line, Col, Toks, "*", '*', 1);
+scan1([$<|Cs], St, Line, Col, Toks) ->
+ tok2(Cs, St, Line, Col, Toks, "<", '<', 1);
+scan1([$>|Cs], St, Line, Col, Toks) ->
+ tok2(Cs, St, Line, Col, Toks, ">", '>', 1);
+scan1([$!|Cs], St, Line, Col, Toks) ->
+ tok2(Cs, St, Line, Col, Toks, "!", '!', 1);
+scan1([$@|Cs], St, Line, Col, Toks) ->
+ tok2(Cs, St, Line, Col, Toks, "@", '@', 1);
+scan1([$\\|Cs], St, Line, Col, Toks) ->
+ tok2(Cs, St, Line, Col, Toks, "\\", '\\', 1);
+scan1([$^|Cs], St, Line, Col, Toks) ->
+ tok2(Cs, St, Line, Col, Toks, "^", '^', 1);
+scan1([$`|Cs], St, Line, Col, Toks) ->
+ tok2(Cs, St, Line, Col, Toks, "`", '`', 1);
+scan1([$~|Cs], St, Line, Col, Toks) ->
+ tok2(Cs, St, Line, Col, Toks, "~", '~', 1);
+scan1([$&|Cs], St, Line, Col, Toks) ->
+ tok2(Cs, St, Line, Col, Toks, "&", '&', 1);
+%% End of optimization.
+scan1([C|Cs], St, Line, Col, Toks) when ?UNI255(C) ->
+ Str = [C],
+ tok2(Cs, St, Line, Col, Toks, Str, list_to_atom(Str), 1);
+scan1([C|Cs], _St, Line, Col, _Toks) when ?CHAR(C) ->
+ Ncol = incr_column(Col, 1),
+ scan_error({illegal,character}, Line, Col, Line, Ncol, Cs);
+scan1([]=Cs, _St, Line, Col, Toks) ->
+ {more,{Cs,Col,Toks,Line,[],fun scan/6}};
+scan1(eof=Cs, _St, Line, Col, Toks) ->
+ {ok,Toks,Cs,Line,Col}.
+
+scan_atom(Cs0, St, Line, Col, Toks, Ncs0) ->
+ case scan_name(Cs0, Ncs0) of
+ {more,Ncs} ->
+ {more,{[],Col,Toks,Line,Ncs,fun scan_atom/6}};
+ {Wcs,Cs} ->
+ case catch list_to_atom(Wcs) of
+ Name when is_atom(Name) ->
+ case (St#erl_scan.resword_fun)(Name) of
+ true ->
+ tok2(Cs, St, Line, Col, Toks, Wcs, Name);
+ false ->
+ tok3(Cs, St, Line, Col, Toks, atom, Wcs, Name)
+ end;
+ _Error ->
+ Ncol = incr_column(Col, length(Wcs)),
+ scan_error({illegal,atom}, Line, Col, Line, Ncol, Cs)
+ end
+ end.
+
+scan_variable(Cs0, St, Line, Col, Toks, Ncs0) ->
+ case scan_name(Cs0, Ncs0) of
+ {more,Ncs} ->
+ {more,{[],Col,Toks,Line,Ncs,fun scan_variable/6}};
+ {Wcs,Cs} ->
+ case catch list_to_atom(Wcs) of
+ Name when is_atom(Name) ->
+ tok3(Cs, St, Line, Col, Toks, var, Wcs, Name);
+ _Error ->
+ Ncol = incr_column(Col, length(Wcs)),
+ scan_error({illegal,var}, Line, Col, Line, Ncol, Cs)
+ end
+ end.
+
+scan_name([C|Cs], Ncs) when C >= $a, C =< $z ->
+ scan_name(Cs, [C|Ncs]);
+scan_name([C|Cs], Ncs) when C >= $A, C =< $Z ->
+ scan_name(Cs, [C|Ncs]);
+scan_name([$_=C|Cs], Ncs) ->
+ scan_name(Cs, [C|Ncs]);
+scan_name([C|Cs], Ncs) when ?DIGIT(C) ->
+ scan_name(Cs, [C|Ncs]);
+scan_name([$@=C|Cs], Ncs) ->
+ scan_name(Cs, [C|Ncs]);
+scan_name([C|Cs], Ncs) when C >= $ß, C =< $ÿ, C =/= $÷ ->
+ scan_name(Cs, [C|Ncs]);
+scan_name([C|Cs], Ncs) when C >= $À, C =< $Þ, C =/= $× ->
+ scan_name(Cs, [C|Ncs]);
+scan_name([], Ncs) ->
+ {more,Ncs};
+scan_name(Cs, Ncs) ->
+ {lists:reverse(Ncs),Cs}.
+
+-define(STR(St, S), if St#erl_scan.text -> S; true -> [] end).
+
+scan_dot([$%|_]=Cs, St, Line, Col, Toks, Ncs) ->
+ Attrs = attributes(Line, Col, St, Ncs),
+ {ok,[{dot,Attrs}|Toks],Cs,Line,incr_column(Col, 1)};
+scan_dot([$\n=C|Cs], St, Line, Col, Toks, Ncs) ->
+ Attrs = attributes(Line, Col, St, ?STR(St, Ncs++[C])),
+ {ok,[{dot,Attrs}|Toks],Cs,Line+1,new_column(Col, 1)};
+scan_dot([C|Cs], St, Line, Col, Toks, Ncs) when ?WHITE_SPACE(C) ->
+ Attrs = attributes(Line, Col, St, ?STR(St, Ncs++[C])),
+ {ok,[{dot,Attrs}|Toks],Cs,Line,incr_column(Col, 2)};
+scan_dot(eof=Cs, St, Line, Col, Toks, Ncs) ->
+ Attrs = attributes(Line, Col, St, Ncs),
+ {ok,[{dot,Attrs}|Toks],Cs,Line,incr_column(Col, 1)};
+scan_dot(Cs, St, Line, Col, Toks, Ncs) ->
+ tok2(Cs, St, Line, Col, Toks, Ncs, '.', 1).
+
+%%% White space characters are very common, so it is worthwhile to
+%%% scan them fast and store them compactly. (The words "whitespace"
+%%% and "white space" usually mean the same thing. The Erlang
+%%% specification denotes the characters with ASCII code in the
+%%% interval 0 to 32 as "white space".)
+%%%
+%%% Convention: if there is a white newline ($\n) it will always be
+%%% the first character in the text string. As a consequence, there
+%%% cannot be more than one newline in a white_space token string.
+%%%
+%%% Some common combinations are recognized, some are not. Examples
+%%% of the latter are tab(s) followed by space(s), like "\t ".
+%%% (They will be represented by two (or more) tokens.)
+%%%
+%%% Note: the character sequence "\r\n" is *not* recognized since it
+%%% would violate the property that $\n will always be the first
+%%% character. (But since "\r\n\r\n" is common, it pays off to
+%%% recognize "\n\r".)
+
+scan_newline([$\s|Cs], St, Line, Col, Toks) ->
+ scan_nl_spcs(Cs, St, Line, Col, Toks, 2);
+scan_newline([$\t|Cs], St, Line, Col, Toks) ->
+ scan_nl_tabs(Cs, St, Line, Col, Toks, 2);
+scan_newline([$\r|Cs], St, Line, Col, Toks) ->
+ newline_end(Cs, St, Line, Col, Toks, 2, "\n\r");
+scan_newline([$\f|Cs], St, Line, Col, Toks) ->
+ newline_end(Cs, St, Line, Col, Toks, 2, "\n\f");
+scan_newline([], _St, Line, Col, Toks) ->
+ {more,{[$\n],Col,Toks,Line,[],fun scan/6}};
+scan_newline(Cs, St, Line, Col, Toks) ->
+ scan_nl_white_space(Cs, St, Line, Col, Toks, "\n").
+
+scan_nl_spcs([$\s|Cs], St, Line, Col, Toks, N) when N < 17 ->
+ scan_nl_spcs(Cs, St, Line, Col, Toks, N+1);
+scan_nl_spcs([]=Cs, _St, Line, Col, Toks, N) ->
+ {more,{Cs,Col,Toks,Line,N,fun scan_nl_spcs/6}};
+scan_nl_spcs(Cs, St, Line, Col, Toks, N) ->
+ newline_end(Cs, St, Line, Col, Toks, N, nl_spcs(N)).
+
+scan_nl_tabs([$\t|Cs], St, Line, Col, Toks, N) when N < 11 ->
+ scan_nl_tabs(Cs, St, Line, Col, Toks, N+1);
+scan_nl_tabs([]=Cs, _St, Line, Col, Toks, N) ->
+ {more,{Cs,Col,Toks,Line,N,fun scan_nl_tabs/6}};
+scan_nl_tabs(Cs, St, Line, Col, Toks, N) ->
+ newline_end(Cs, St, Line, Col, Toks, N, nl_tabs(N)).
+
+%% Note: returning {more,Cont} is meaningless here; one could just as
+%% well return several tokens. But since tokens() scans up to a full
+%% stop anyway, nothing is gained by not collecting all white spaces.
+scan_nl_white_space([$\n|Cs], #erl_scan{text = false}=St, Line, no_col=Col,
+ Toks0, Ncs) ->
+ Toks = [{white_space,Line,lists:reverse(Ncs)}|Toks0],
+ scan_newline(Cs, St, Line+1, Col, Toks);
+scan_nl_white_space([$\n|Cs], St, Line, Col, Toks, Ncs0) ->
+ Ncs = lists:reverse(Ncs0),
+ Attrs = attributes(Line, Col, St, Ncs),
+ Token = {white_space,Attrs,Ncs},
+ scan_newline(Cs, St, Line+1, new_column(Col, length(Ncs)), [Token|Toks]);
+scan_nl_white_space([C|Cs], St, Line, Col, Toks, Ncs) when ?WHITE_SPACE(C) ->
+ scan_nl_white_space(Cs, St, Line, Col, Toks, [C|Ncs]);
+scan_nl_white_space([]=Cs, _St, Line, Col, Toks, Ncs) ->
+ {more,{Cs,Col,Toks,Line,Ncs,fun scan_nl_white_space/6}};
+scan_nl_white_space(Cs, #erl_scan{text = false}=St, Line, no_col=Col,
+ Toks, Ncs) ->
+ scan1(Cs, St, Line+1, Col, [{white_space,Line,lists:reverse(Ncs)}|Toks]);
+scan_nl_white_space(Cs, St, Line, Col, Toks, Ncs0) ->
+ Ncs = lists:reverse(Ncs0),
+ Attrs = attributes(Line, Col, St, Ncs),
+ Token = {white_space,Attrs,Ncs},
+ scan1(Cs, St, Line+1, new_column(Col, length(Ncs)), [Token|Toks]).
+
+newline_end(Cs, #erl_scan{text = false}=St, Line, no_col=Col,
+ Toks, _N, Ncs) ->
+ scan1(Cs, St, Line+1, Col, [{white_space,Line,Ncs}|Toks]);
+newline_end(Cs, St, Line, Col, Toks, N, Ncs) ->
+ Attrs = attributes(Line, Col, St, Ncs),
+ scan1(Cs, St, Line+1, new_column(Col, N), [{white_space,Attrs,Ncs}|Toks]).
+
+scan_spcs([$\s|Cs], St, Line, Col, Toks, N) when N < 16 ->
+ scan_spcs(Cs, St, Line, Col, Toks, N+1);
+scan_spcs([]=Cs, _St, Line, Col, Toks, N) ->
+ {more,{Cs,Col,Toks,Line,N,fun scan_spcs/6}};
+scan_spcs(Cs, St, Line, Col, Toks, N) ->
+ white_space_end(Cs, St, Line, Col, Toks, N, spcs(N)).
+
+scan_tabs([$\t|Cs], St, Line, Col, Toks, N) when N < 10 ->
+ scan_tabs(Cs, St, Line, Col, Toks, N+1);
+scan_tabs([]=Cs, _St, Line, Col, Toks, N) ->
+ {more,{Cs,Col,Toks,Line,N,fun scan_tabs/6}};
+scan_tabs(Cs, St, Line, Col, Toks, N) ->
+ white_space_end(Cs, St, Line, Col, Toks, N, tabs(N)).
+
+skip_white_space([$\n|Cs], St, Line, Col, Toks, _N) ->
+ skip_white_space(Cs, St, Line+1, new_column(Col, 1), Toks, 0);
+skip_white_space([C|Cs], St, Line, Col, Toks, N) when ?WHITE_SPACE(C) ->
+ skip_white_space(Cs, St, Line, Col, Toks, N+1);
+skip_white_space([]=Cs, _St, Line, Col, Toks, N) ->
+ {more,{Cs,Col,Toks,Line,N,fun skip_white_space/6}};
+skip_white_space(Cs, St, Line, Col, Toks, N) ->
+ scan1(Cs, St, Line, incr_column(Col, N), Toks).
+
+%% Maybe \t and \s should break the loop.
+scan_white_space([$\n|_]=Cs, St, Line, Col, Toks, Ncs) ->
+ white_space_end(Cs, St, Line, Col, Toks, length(Ncs), lists:reverse(Ncs));
+scan_white_space([C|Cs], St, Line, Col, Toks, Ncs) when ?WHITE_SPACE(C) ->
+ scan_white_space(Cs, St, Line, Col, Toks, [C|Ncs]);
+scan_white_space([]=Cs, _St, Line, Col, Toks, Ncs) ->
+ {more,{Cs,Col,Toks,Line,Ncs,fun scan_white_space/6}};
+scan_white_space(Cs, St, Line, Col, Toks, Ncs) ->
+ white_space_end(Cs, St, Line, Col, Toks, length(Ncs), lists:reverse(Ncs)).
+
+-compile({inline,[white_space_end/7]}).
+
+white_space_end(Cs, St, Line, Col, Toks, N, Ncs) ->
+ tok3(Cs, St, Line, Col, Toks, white_space, Ncs, Ncs, N).
+
+scan_char([$\\|Cs]=Cs0, St, Line, Col, Toks) ->
+ case scan_escape(Cs, incr_column(Col, 2)) of
+ more ->
+ {more,{[$$|Cs0],Col,Toks,Line,[],fun scan/6}};
+ {error,Ncs,Error,Ncol} ->
+ scan_error(Error, Line, Col, Line, Ncol, Ncs);
+ {eof,Ncol} ->
+ scan_error(char, Line, Col, Line, Ncol, eof);
+ {nl,Val,Str,Ncs,Ncol} ->
+ Attrs = attributes(Line, Col, St, ?STR(St, "$\\"++Str)), %"
+ Ntoks = [{char,Attrs,Val}|Toks],
+ scan1(Ncs, St, Line+1, Ncol, Ntoks);
+ {Val,Str,Ncs,Ncol} ->
+ Attrs = attributes(Line, Col, St, ?STR(St, "$\\"++Str)), %"
+ Ntoks = [{char,Attrs,Val}|Toks],
+ scan1(Ncs, St, Line, Ncol, Ntoks)
+ end;
+scan_char([$\n=C|Cs], St, Line, Col, Toks) ->
+ Attrs = attributes(Line, Col, St, ?STR(St, [$$,C])),
+ scan1(Cs, St, Line+1, new_column(Col, 1), [{char,Attrs,C}|Toks]);
+scan_char([C|Cs], St, Line, Col, Toks) when ?UNICODE(C) ->
+ Attrs = attributes(Line, Col, St, ?STR(St, [$$,C])),
+ scan1(Cs, St, Line, incr_column(Col, 2), [{char,Attrs,C}|Toks]);
+scan_char([C|_Cs], _St, Line, Col, _Toks) when ?CHAR(C) ->
+ scan_error({illegal,character}, Line, Col, Line, incr_column(Col, 1), eof);
+scan_char([], _St, Line, Col, Toks) ->
+ {more,{[$$],Col,Toks,Line,[],fun scan/6}};
+scan_char(eof, _St, Line, Col, _Toks) ->
+ scan_error(char, Line, Col, Line, incr_column(Col, 1), eof).
+
+scan_string(Cs, St, Line, Col, Toks, {Wcs,Str,Line0,Col0}) ->
+ case scan_string0(Cs, St, Line, Col, $\", Str, Wcs) of %"
+ {more,Ncs,Nline,Ncol,Nstr,Nwcs} ->
+ State = {Nwcs,Nstr,Line0,Col0},
+ {more,{Ncs,Ncol,Toks,Nline,State,fun scan_string/6}};
+ {char_error,Ncs,Error,Nline,Ncol,EndCol} ->
+ scan_error(Error, Nline, Ncol, Nline, EndCol, Ncs);
+ {error,Nline,Ncol,Nwcs,Ncs} ->
+ Estr = string:substr(Nwcs, 1, 16), % Expanded escape chars.
+ scan_error({string,$\",Estr}, Line0, Col0, Nline, Ncol, Ncs); %"
+ {Ncs,Nline,Ncol,Nstr,Nwcs} ->
+ Attrs = attributes(Line0, Col0, St, Nstr),
+ scan1(Ncs, St, Nline, Ncol, [{string,Attrs,Nwcs}|Toks])
+ end.
+
+scan_qatom(Cs, St, Line, Col, Toks, {Wcs,Str,Line0,Col0}) ->
+ case scan_string0(Cs, St, Line, Col, $\', Str, Wcs) of %'
+ {more,Ncs,Nline,Ncol,Nstr,Nwcs} ->
+ State = {Nwcs,Nstr,Line0,Col0},
+ {more,{Ncs,Ncol,Toks,Nline,State,fun scan_qatom/6}};
+ {char_error,Ncs,Error,Nline,Ncol,EndCol} ->
+ scan_error(Error, Nline, Ncol, Nline, EndCol, Ncs);
+ {error,Nline,Ncol,Nwcs,Ncs} ->
+ Estr = string:substr(Nwcs, 1, 16), % Expanded escape chars.
+ scan_error({string,$\',Estr}, Line0, Col0, Nline, Ncol, Ncs); %'
+ {Ncs,Nline,Ncol,Nstr,Nwcs} ->
+ case catch list_to_atom(Nwcs) of
+ A when is_atom(A) ->
+ Attrs = attributes(Line0, Col0, St, Nstr),
+ scan1(Ncs, St, Nline, Ncol, [{atom,Attrs,A}|Toks]);
+ _ ->
+ scan_error({illegal,atom}, Line0, Col0, Nline, Ncol, Ncs)
+ end
+ end.
+
+scan_string0(Cs, #erl_scan{text=false}, Line, no_col=Col, Q, [], Wcs) ->
+ scan_string_no_col(Cs, Line, Col, Q, Wcs);
+scan_string0(Cs, #erl_scan{text=true}, Line, no_col=Col, Q, Str, Wcs) ->
+ scan_string1(Cs, Line, Col, Q, Str, Wcs);
+scan_string0(Cs, St, Line, Col, Q, [], Wcs) ->
+ scan_string_col(Cs, St, Line, Col, Q, Wcs);
+scan_string0(Cs, _St, Line, Col, Q, Str, Wcs) ->
+ scan_string1(Cs, Line, Col, Q, Str, Wcs).
+
+%% Optimization. Col =:= no_col.
+scan_string_no_col([Q|Cs], Line, Col, Q, Wcs) ->
+ {Cs,Line,Col,_DontCare=[],lists:reverse(Wcs)};
+scan_string_no_col([$\n=C|Cs], Line, Col, Q, Wcs) ->
+ scan_string_no_col(Cs, Line+1, Col, Q, [C|Wcs]);
+scan_string_no_col([C|Cs], Line, Col, Q, Wcs) when C =/= $\\, ?UNICODE(C) ->
+ scan_string_no_col(Cs, Line, Col, Q, [C|Wcs]);
+scan_string_no_col(Cs, Line, Col, Q, Wcs) ->
+ scan_string1(Cs, Line, Col, Q, Wcs, Wcs).
+
+%% Optimization. Col =/= no_col.
+scan_string_col([Q|Cs], St, Line, Col, Q, Wcs0) ->
+ Wcs = lists:reverse(Wcs0),
+ Str = ?STR(St, [Q|Wcs++[Q]]),
+ {Cs,Line,Col+1,Str,Wcs};
+scan_string_col([$\n=C|Cs], St, Line, _xCol, Q, Wcs) ->
+ scan_string_col(Cs, St, Line+1, 1, Q, [C|Wcs]);
+scan_string_col([C|Cs], St, Line, Col, Q, Wcs) when C =/= $\\, ?UNICODE(C) ->
+ scan_string_col(Cs, St, Line, Col+1, Q, [C|Wcs]);
+scan_string_col(Cs, _St, Line, Col, Q, Wcs) ->
+ scan_string1(Cs, Line, Col, Q, Wcs, Wcs).
+
+%% Note: in those cases when a 'char_error' tuple is returned below it
+%% is tempting to skip over characters up to the first Q character,
+%% but then the end location of the error tuple would not correspond
+%% to the start location of the returned Rest string. (Maybe the end
+%% location could be modified, but that too is ugly.)
+scan_string1([Q|Cs], Line, Col, Q, Str0, Wcs0) ->
+ Wcs = lists:reverse(Wcs0),
+ Str = [Q|lists:reverse(Str0, [Q])],
+ {Cs,Line,incr_column(Col, 1),Str,Wcs};
+scan_string1([$\n=C|Cs], Line, Col, Q, Str, Wcs) ->
+ Ncol = new_column(Col, 1),
+ scan_string1(Cs, Line+1, Ncol, Q, [C|Str], [C|Wcs]);
+scan_string1([$\\|Cs]=Cs0, Line, Col, Q, Str, Wcs) ->
+ case scan_escape(Cs, Col) of
+ more ->
+ {more,Cs0,Line,Col,Str,Wcs};
+ {error,Ncs,Error,Ncol} ->
+ {char_error,Ncs,Error,Line,Col,incr_column(Ncol, 1)};
+ {eof,Ncol} ->
+ {error,Line,incr_column(Ncol, 1),lists:reverse(Wcs),eof};
+ {nl,Val,ValStr,Ncs,Ncol} ->
+ Nstr = lists:reverse(ValStr, [$\\|Str]),
+ Nwcs = [Val|Wcs],
+ scan_string1(Ncs, Line+1, Ncol, Q, Nstr, Nwcs);
+ {Val,ValStr,Ncs,Ncol} ->
+ Nstr = lists:reverse(ValStr, [$\\|Str]),
+ Nwcs = [Val|Wcs],
+ scan_string1(Ncs, Line, incr_column(Ncol, 1), Q, Nstr, Nwcs)
+ end;
+scan_string1([C|Cs], Line, no_col=Col, Q, Str, Wcs) when ?UNICODE(C) ->
+ scan_string1(Cs, Line, Col, Q, [C|Str], [C|Wcs]);
+scan_string1([C|Cs], Line, Col, Q, Str, Wcs) when ?UNICODE(C) ->
+ scan_string1(Cs, Line, Col+1, Q, [C|Str], [C|Wcs]);
+scan_string1([C|Cs], Line, Col, _Q, _Str, _Wcs) when ?CHAR(C) ->
+ {char_error,Cs,{illegal,character},Line,Col,incr_column(Col, 1)};
+scan_string1([]=Cs, Line, Col, _Q, Str, Wcs) ->
+ {more,Cs,Line,Col,Str,Wcs};
+scan_string1(eof, Line, Col, _Q, _Str, Wcs) ->
+ {error,Line,Col,lists:reverse(Wcs),eof}.
+
+-define(OCT(C), C >= $0, C =< $7).
+-define(HEX(C), C >= $0 andalso C =< $9 orelse
+ C >= $A andalso C =< $F orelse
+ C >= $a andalso C =< $f).
+
+%% \<1-3> octal digits
+scan_escape([O1,O2,O3|Cs], Col) when ?OCT(O1), ?OCT(O2), ?OCT(O3) ->
+ Val = (O1*8 + O2)*8 + O3 - 73*$0,
+ {Val,[O1,O2,O3],Cs,incr_column(Col, 3)};
+scan_escape([O1,O2], _Col) when ?OCT(O1), ?OCT(O2) ->
+ more;
+scan_escape([O1,O2|Cs], Col) when ?OCT(O1), ?OCT(O2) ->
+ Val = (O1*8 + O2) - 9*$0,
+ {Val,[O1,O2],Cs,incr_column(Col, 2)};
+scan_escape([O1], _Col) when ?OCT(O1) ->
+ more;
+scan_escape([O1|Cs], Col) when ?OCT(O1) ->
+ {O1 - $0,[O1],Cs,incr_column(Col, 1)};
+%% \x{<hex digits>}
+scan_escape([$x,${|Cs], Col) ->
+ scan_hex(Cs, incr_column(Col, 2), []);
+scan_escape([$x], _Col) ->
+ more;
+scan_escape([$x|eof], Col) ->
+ {eof,incr_column(Col, 1)};
+%% \x<2> hexadecimal digits
+scan_escape([$x,H1,H2|Cs], Col) when ?HEX(H1), ?HEX(H2) ->
+ Val = erlang:list_to_integer([H1,H2], 16),
+ {Val,[$x,H1,H2],Cs,incr_column(Col, 3)};
+scan_escape([$x,H1], _Col) when ?HEX(H1) ->
+ more;
+scan_escape([$x|Cs], Col) ->
+ {error,Cs,{illegal,character},incr_column(Col, 1)};
+%% \^X -> CTL-X
+scan_escape([$^=C0,$\n=C|Cs], Col) ->
+ {nl,C,[C0,C],Cs,new_column(Col, 1)};
+scan_escape([$^=C0,C|Cs], Col) when ?CHAR(C) ->
+ Val = C band 31,
+ {Val,[C0,C],Cs,incr_column(Col, 2)};
+scan_escape([$^], _Col) ->
+ more;
+scan_escape([$^|eof], Col) ->
+ {eof,incr_column(Col, 1)};
+scan_escape([$\n=C|Cs], Col) ->
+ {nl,C,[C],Cs,new_column(Col, 1)};
+scan_escape([C0|Cs], Col) when ?UNICODE(C0) ->
+ C = escape_char(C0),
+ {C,[C0],Cs,incr_column(Col, 1)};
+scan_escape([C|Cs], Col) when ?CHAR(C) ->
+ {error,Cs,{illegal,character},incr_column(Col, 1)};
+scan_escape([], _Col) ->
+ more;
+scan_escape(eof, Col) ->
+ {eof,Col}.
+
+scan_hex([C|Cs], no_col=Col, Wcs) when ?HEX(C) ->
+ scan_hex(Cs, Col, [C|Wcs]);
+scan_hex([C|Cs], Col, Wcs) when ?HEX(C) ->
+ scan_hex(Cs, Col+1, [C|Wcs]);
+scan_hex(Cs, Col, Wcs) ->
+ scan_esc_end(Cs, Col, Wcs, 16, "x{").
+
+scan_esc_end([$}|Cs], Col, Wcs0, B, Str0) ->
+ Wcs = lists:reverse(Wcs0),
+ case catch erlang:list_to_integer(Wcs, B) of
+ Val when ?UNICODE(Val) ->
+ {Val,Str0++Wcs++[$}],Cs,incr_column(Col, 1)};
+ _ ->
+ {error,Cs,{illegal,character},incr_column(Col, 1)}
+ end;
+scan_esc_end([], _Col, _Wcs, _B, _Str0) ->
+ more;
+scan_esc_end(eof, Col, _Wcs, _B, _Str0) ->
+ {eof,Col};
+scan_esc_end(Cs, Col, _Wcs, _B, _Str0) ->
+ {error,Cs,{illegal,character},Col}.
+
+escape_char($n) -> $\n; % \n = LF
+escape_char($r) -> $\r; % \r = CR
+escape_char($t) -> $\t; % \t = TAB
+escape_char($v) -> $\v; % \v = VT
+escape_char($b) -> $\b; % \b = BS
+escape_char($f) -> $\f; % \f = FF
+escape_char($e) -> $\e; % \e = ESC
+escape_char($s) -> $\s; % \s = SPC
+escape_char($d) -> $\d; % \d = DEL
+escape_char(C) -> C.
+
+scan_number([C|Cs], St, Line, Col, Toks, Ncs) when ?DIGIT(C) ->
+ scan_number(Cs, St, Line, Col, Toks, [C|Ncs]);
+scan_number([$.,C|Cs], St, Line, Col, Toks, Ncs) when ?DIGIT(C) ->
+ scan_fraction(Cs, St, Line, Col, Toks, [C,$.|Ncs]);
+scan_number([$.]=Cs, _St, Line, Col, Toks, Ncs) ->
+ {more,{Cs,Col,Toks,Line,Ncs,fun scan_number/6}};
+scan_number([$#|Cs]=Cs0, St, Line, Col, Toks, Ncs0) ->
+ Ncs = lists:reverse(Ncs0),
+ case catch list_to_integer(Ncs) of
+ B when B >= 2, B =< 1+$Z-$A+10 ->
+ Bcs = ?STR(St, Ncs++[$#]),
+ scan_based_int(Cs, St, Line, Col, Toks, {B,[],Bcs});
+ B ->
+ Len = length(Ncs),
+ scan_error({base,B}, Line, Col, Line, incr_column(Col, Len), Cs0)
+ end;
+scan_number([]=Cs, _St, Line, Col, Toks, Ncs) ->
+ {more,{Cs,Col,Toks,Line,Ncs,fun scan_number/6}};
+scan_number(Cs, St, Line, Col, Toks, Ncs0) ->
+ Ncs = lists:reverse(Ncs0),
+ case catch list_to_integer(Ncs) of
+ N when is_integer(N) ->
+ tok3(Cs, St, Line, Col, Toks, integer, Ncs, N);
+ _ ->
+ Ncol = incr_column(Col, length(Ncs)),
+ scan_error({illegal,integer}, Line, Col, Line, Ncol, Cs)
+ end.
+
+scan_based_int([C|Cs], St, Line, Col, Toks, {B,Ncs,Bcs})
+ when ?DIGIT(C), C < $0+B ->
+ scan_based_int(Cs, St, Line, Col, Toks, {B,[C|Ncs],Bcs});
+scan_based_int([C|Cs], St, Line, Col, Toks, {B,Ncs,Bcs})
+ when C >= $A, B > 10, C < $A+B-10 ->
+ scan_based_int(Cs, St, Line, Col, Toks, {B,[C|Ncs],Bcs});
+scan_based_int([C|Cs], St, Line, Col, Toks, {B,Ncs,Bcs})
+ when C >= $a, B > 10, C < $a+B-10 ->
+ scan_based_int(Cs, St, Line, Col, Toks, {B,[C|Ncs],Bcs});
+scan_based_int([]=Cs, _St, Line, Col, Toks, State) ->
+ {more,{Cs,Col,Toks,Line,State,fun scan_based_int/6}};
+scan_based_int(Cs, St, Line, Col, Toks, {B,Ncs0,Bcs}) ->
+ Ncs = lists:reverse(Ncs0),
+ case catch erlang:list_to_integer(Ncs, B) of
+ N when is_integer(N) ->
+ tok3(Cs, St, Line, Col, Toks, integer, ?STR(St, Bcs++Ncs), N);
+ _ ->
+ Len = length(Bcs)+length(Ncs),
+ Ncol = incr_column(Col, Len),
+ scan_error({illegal,integer}, Line, Col, Line, Ncol, Cs)
+ end.
+
+scan_fraction([C|Cs], St, Line, Col, Toks, Ncs) when ?DIGIT(C) ->
+ scan_fraction(Cs, St, Line, Col, Toks, [C|Ncs]);
+scan_fraction([E|Cs], St, Line, Col, Toks, Ncs) when E =:= $e; E =:= $E ->
+ scan_exponent_sign(Cs, St, Line, Col, Toks, [E|Ncs]);
+scan_fraction([]=Cs, _St, Line, Col, Toks, Ncs) ->
+ {more,{Cs,Col,Toks,Line,Ncs,fun scan_fraction/6}};
+scan_fraction(Cs, St, Line, Col, Toks, Ncs) ->
+ float_end(Cs, St, Line, Col, Toks, Ncs).
+
+scan_exponent_sign([C|Cs], St, Line, Col, Toks, Ncs) when C =:= $+; C =:= $- ->
+ scan_exponent(Cs, St, Line, Col, Toks, [C|Ncs]);
+scan_exponent_sign([]=Cs, _St, Line, Col, Toks, Ncs) ->
+ {more,{Cs,Col,Toks,Line,Ncs,fun scan_exponent_sign/6}};
+scan_exponent_sign(Cs, St, Line, Col, Toks, Ncs) ->
+ scan_exponent(Cs, St, Line, Col, Toks, Ncs).
+
+scan_exponent([C|Cs], St, Line, Col, Toks, Ncs) when ?DIGIT(C) ->
+ scan_exponent(Cs, St, Line, Col, Toks, [C|Ncs]);
+scan_exponent([]=Cs, _St, Line, Col, Toks, Ncs) ->
+ {more,{Cs,Col,Toks,Line,Ncs,fun scan_exponent/6}};
+scan_exponent(Cs, St, Line, Col, Toks, Ncs) ->
+ float_end(Cs, St, Line, Col, Toks, Ncs).
+
+float_end(Cs, St, Line, Col, Toks, Ncs0) ->
+ Ncs = lists:reverse(Ncs0),
+ case catch list_to_float(Ncs) of
+ F when is_float(F) ->
+ tok3(Cs, St, Line, Col, Toks, float, Ncs, F);
+ _ ->
+ Ncol = incr_column(Col, length(Ncs)),
+ scan_error({illegal,float}, Line, Col, Line, Ncol, Cs)
+ end.
+
+skip_comment([C|Cs], St, Line, Col, Toks, N) when C =/= $\n, ?CHAR(C) ->
+ case ?UNICODE(C) of
+ true ->
+ skip_comment(Cs, St, Line, Col, Toks, N+1);
+ false ->
+ Ncol = incr_column(Col, N+1),
+ scan_error({illegal,character}, Line, Col, Line, Ncol, Cs)
+ end;
+skip_comment([]=Cs, _St, Line, Col, Toks, N) ->
+ {more,{Cs,Col,Toks,Line,N,fun skip_comment/6}};
+skip_comment(Cs, St, Line, Col, Toks, N) ->
+ scan1(Cs, St, Line, incr_column(Col, N), Toks).
+
+scan_comment([C|Cs], St, Line, Col, Toks, Ncs) when C =/= $\n, ?CHAR(C) ->
+ case ?UNICODE(C) of
+ true ->
+ scan_comment(Cs, St, Line, Col, Toks, [C|Ncs]);
+ false ->
+ Ncol = incr_column(Col, length(Ncs)+1),
+ scan_error({illegal,character}, Line, Col, Line, Ncol, Cs)
+ end;
+scan_comment([]=Cs, _St, Line, Col, Toks, Ncs) ->
+ {more,{Cs,Col,Toks,Line,Ncs,fun scan_comment/6}};
+scan_comment(Cs, St, Line, Col, Toks, Ncs0) ->
+ Ncs = lists:reverse(Ncs0),
+ tok3(Cs, St, Line, Col, Toks, comment, Ncs, Ncs).
+
+tok2(Cs, #erl_scan{text = false}=St, Line, no_col=Col, Toks, _Wcs, P) ->
+ scan1(Cs, St, Line, Col, [{P,Line}|Toks]);
+tok2(Cs, St, Line, Col, Toks, Wcs, P) ->
+ Attrs = attributes(Line, Col, St, Wcs),
+ scan1(Cs, St, Line, incr_column(Col, length(Wcs)), [{P,Attrs}|Toks]).
+
+tok2(Cs, #erl_scan{text = false}=St, Line, no_col=Col, Toks, _Wcs, P, _N) ->
+ scan1(Cs, St, Line, Col, [{P,Line}|Toks]);
+tok2(Cs, St, Line, Col, Toks, Wcs, P, N) ->
+ Attrs = attributes(Line, Col, St, Wcs),
+ scan1(Cs, St, Line, incr_column(Col, N), [{P,Attrs}|Toks]).
+
+tok3(Cs, #erl_scan{text = false}=St, Line, no_col=Col, Toks, Item, _S, Sym) ->
+ scan1(Cs, St, Line, Col, [{Item,Line,Sym}|Toks]);
+tok3(Cs, St, Line, Col, Toks, Item, String, Sym) ->
+ Token = {Item,attributes(Line, Col, St, String),Sym},
+ scan1(Cs, St, Line, incr_column(Col, length(String)), [Token|Toks]).
+
+tok3(Cs, #erl_scan{text = false}=St, Line, no_col=Col, Toks, Item,
+ _String, Sym, _Length) ->
+ scan1(Cs, St, Line, Col, [{Item,Line,Sym}|Toks]);
+tok3(Cs, St, Line, Col, Toks, Item, String, Sym, Length) ->
+ Token = {Item,attributes(Line, Col, St, String),Sym},
+ scan1(Cs, St, Line, incr_column(Col, Length), [Token|Toks]).
+
+scan_error(Error, Line, Col, EndLine, EndCol, Rest) ->
+ Loc = location(Line, Col),
+ EndLoc = location(EndLine, EndCol),
+ scan_error(Error, Loc, EndLoc, Rest).
+
+scan_error(Error, ErrorLoc, EndLoc, Rest) ->
+ {{error,{ErrorLoc,?MODULE,Error},EndLoc},Rest}.
+
+-compile({inline,[attributes/4]}).
+
+attributes(Line, no_col, #erl_scan{text = false}, _String) ->
+ Line;
+attributes(Line, no_col, #erl_scan{text = true}, String) ->
+ [{line,Line},{text,String}];
+attributes(Line, Col, #erl_scan{text = false}, _String) ->
+ {Line,Col};
+attributes(Line, Col, #erl_scan{text = true}, String) ->
+ [{line,Line},{column,Col},{text,String}].
+
+location(Line, no_col) ->
+ Line;
+location(Line, Col) when is_integer(Col) ->
+ {Line,Col}.
+
+-compile({inline,[incr_column/2,new_column/2]}).
+
+incr_column(no_col=Col, _N) ->
+ Col;
+incr_column(Col, N) when is_integer(Col) ->
+ Col + N.
+
+new_column(no_col=Col, _Ncol) ->
+ Col;
+new_column(Col, Ncol) when is_integer(Col) ->
+ Ncol.
+
+nl_spcs(2) -> "\n ";
+nl_spcs(3) -> "\n ";
+nl_spcs(4) -> "\n ";
+nl_spcs(5) -> "\n ";
+nl_spcs(6) -> "\n ";
+nl_spcs(7) -> "\n ";
+nl_spcs(8) -> "\n ";
+nl_spcs(9) -> "\n ";
+nl_spcs(10) -> "\n ";
+nl_spcs(11) -> "\n ";
+nl_spcs(12) -> "\n ";
+nl_spcs(13) -> "\n ";
+nl_spcs(14) -> "\n ";
+nl_spcs(15) -> "\n ";
+nl_spcs(16) -> "\n ";
+nl_spcs(17) -> "\n ".
+
+spcs(1) -> " ";
+spcs(2) -> " ";
+spcs(3) -> " ";
+spcs(4) -> " ";
+spcs(5) -> " ";
+spcs(6) -> " ";
+spcs(7) -> " ";
+spcs(8) -> " ";
+spcs(9) -> " ";
+spcs(10) -> " ";
+spcs(11) -> " ";
+spcs(12) -> " ";
+spcs(13) -> " ";
+spcs(14) -> " ";
+spcs(15) -> " ";
+spcs(16) -> " ".
+
+nl_tabs(2) -> "\n\t";
+nl_tabs(3) -> "\n\t\t";
+nl_tabs(4) -> "\n\t\t\t";
+nl_tabs(5) -> "\n\t\t\t\t";
+nl_tabs(6) -> "\n\t\t\t\t\t";
+nl_tabs(7) -> "\n\t\t\t\t\t\t";
+nl_tabs(8) -> "\n\t\t\t\t\t\t\t";
+nl_tabs(9) -> "\n\t\t\t\t\t\t\t\t";
+nl_tabs(10) -> "\n\t\t\t\t\t\t\t\t\t";
+nl_tabs(11) -> "\n\t\t\t\t\t\t\t\t\t\t".
+
+tabs(1) -> "\t";
+tabs(2) -> "\t\t";
+tabs(3) -> "\t\t\t";
+tabs(4) -> "\t\t\t\t";
+tabs(5) -> "\t\t\t\t\t";
+tabs(6) -> "\t\t\t\t\t\t";
+tabs(7) -> "\t\t\t\t\t\t\t";
+tabs(8) -> "\t\t\t\t\t\t\t\t";
+tabs(9) -> "\t\t\t\t\t\t\t\t\t";
+tabs(10) -> "\t\t\t\t\t\t\t\t\t\t".
+
+-spec reserved_word(Atom :: atom()) -> boolean().
+reserved_word('after') -> true;
+reserved_word('begin') -> true;
+reserved_word('case') -> true;
+reserved_word('try') -> true;
+reserved_word('cond') -> true;
+reserved_word('catch') -> true;
+reserved_word('andalso') -> true;
+reserved_word('orelse') -> true;
+reserved_word('end') -> true;
+reserved_word('fun') -> true;
+reserved_word('if') -> true;
+reserved_word('let') -> true;
+reserved_word('of') -> true;
+reserved_word('receive') -> true;
+reserved_word('when') -> true;
+reserved_word('bnot') -> true;
+reserved_word('not') -> true;
+reserved_word('div') -> true;
+reserved_word('rem') -> true;
+reserved_word('band') -> true;
+reserved_word('and') -> true;
+reserved_word('bor') -> true;
+reserved_word('bxor') -> true;
+reserved_word('bsl') -> true;
+reserved_word('bsr') -> true;
+reserved_word('or') -> true;
+reserved_word('xor') -> true;
+reserved_word(_) -> false.
diff --git a/lib/dialyzer/test/opaque_SUITE_data/src/multiple_wrong_opaques.erl b/lib/dialyzer/test/opaque_SUITE_data/src/multiple_wrong_opaques.erl
index 9e695cec1d..e9f7ad825b 100644
--- a/lib/dialyzer/test/opaque_SUITE_data/src/multiple_wrong_opaques.erl
+++ b/lib/dialyzer/test/opaque_SUITE_data/src/multiple_wrong_opaques.erl
@@ -2,7 +2,7 @@
-export([weird/1]).
--spec weird(dict() | gb_tree()) -> 42.
+-spec weird(dict:dict() | gb_trees:tree()) -> 42.
weird(gazonk) -> 42.
diff --git a/lib/dialyzer/test/opaque_SUITE_data/src/opaque/opaque_adt.erl b/lib/dialyzer/test/opaque_SUITE_data/src/opaque/opaque_adt.erl
index 3456f0e9c6..cdcaa5f9e8 100644
--- a/lib/dialyzer/test/opaque_SUITE_data/src/opaque/opaque_adt.erl
+++ b/lib/dialyzer/test/opaque_SUITE_data/src/opaque/opaque_adt.erl
@@ -3,6 +3,8 @@
-opaque abc() :: 'a' | 'b' | 'c'.
+-spec atom_or_list(_) -> abc() | list().
+
atom_or_list(1) -> a;
atom_or_list(2) -> b;
atom_or_list(3) -> c;
diff --git a/lib/dialyzer/test/opaque_SUITE_data/src/para/para1.erl b/lib/dialyzer/test/opaque_SUITE_data/src/para/para1.erl
new file mode 100644
index 0000000000..68e2c60368
--- /dev/null
+++ b/lib/dialyzer/test/opaque_SUITE_data/src/para/para1.erl
@@ -0,0 +1,93 @@
+-module(para1).
+
+-compile(export_all).
+
+%% Parameterized opaque types
+
+-export_type([t/0, t/1]).
+
+-opaque t() :: {integer(), integer()}.
+
+-opaque t(A) :: {A, A}.
+
+-type y(A) :: {A, A}.
+
+tt1() ->
+ I = t1(),
+ A = t2(),
+ A =:= I. % never 'true'
+
+tt2() ->
+ I = t0(),
+ A = t2(),
+ A =:= I. % never 'true'
+
+tt3() ->
+ I1 = t0(),
+ I2 = t1(),
+ I1 =:= I2. % never true
+
+tt4() ->
+ I1 = y1(),
+ I2 = y2(),
+ I1 =:= I2. % cannot evaluate to true
+
+adt_tt1() ->
+ I = adt_t1(),
+ A = adt_t2(),
+ A =:= I. % opaque attempt
+
+adt_tt2() ->
+ I = adt_t0(),
+ A = adt_t2(),
+ A =:= I. % opaque attempt
+
+adt_tt3() ->
+ I1 = adt_t0(),
+ I2 = adt_t1(),
+ I1 =:= I2. % opaque attempt
+
+adt_tt4() ->
+ I1 = adt_y1(),
+ I2 = adt_y2(),
+ I1 =:= I2. % cannot evaluate to true
+
+-spec t0() -> t().
+
+t0() ->
+ {3, 2}.
+
+-spec t1() -> t(integer()).
+
+t1() ->
+ {3, 3}.
+
+-spec t2() -> t(atom()).
+
+t2() ->
+ {a, b}.
+
+-spec y1() -> y(integer()).
+
+y1() ->
+ {3, 2}.
+
+-spec y2() -> y(atom()).
+
+y2() ->
+ {a, b}.
+
+adt_t0() ->
+ para1_adt:t0().
+
+adt_t1() ->
+ para1_adt:t1().
+
+adt_t2() ->
+ para1_adt:t2().
+
+adt_y1() ->
+ para1_adt:y1().
+
+adt_y2() ->
+ para1_adt:y2().
diff --git a/lib/dialyzer/test/opaque_SUITE_data/src/para/para1_adt.erl b/lib/dialyzer/test/opaque_SUITE_data/src/para/para1_adt.erl
new file mode 100644
index 0000000000..95ac6b7982
--- /dev/null
+++ b/lib/dialyzer/test/opaque_SUITE_data/src/para/para1_adt.erl
@@ -0,0 +1,36 @@
+-module(para1_adt).
+
+-export([t0/0, t1/0, t2/0, y1/0, y2/0]).
+
+-export_type([t/0, t/1, y/1]).
+
+-opaque t() :: {integer(), integer()}.
+
+-opaque t(A) :: {A, A}.
+
+-type y(A) :: {A, A}.
+
+-spec t0() -> t().
+
+t0() ->
+ {3, 2}.
+
+-spec t1() -> t(integer()).
+
+t1() ->
+ {3, 3}.
+
+-spec t2() -> t(atom()).
+
+t2() ->
+ {a, b}.
+
+-spec y1() -> y(integer()).
+
+y1() ->
+ {3, 2}.
+
+-spec y2() -> y(atom()).
+
+y2() ->
+ {a, b}.
diff --git a/lib/dialyzer/test/opaque_SUITE_data/src/para/para2.erl b/lib/dialyzer/test/opaque_SUITE_data/src/para/para2.erl
new file mode 100644
index 0000000000..09b2235fa5
--- /dev/null
+++ b/lib/dialyzer/test/opaque_SUITE_data/src/para/para2.erl
@@ -0,0 +1,123 @@
+-module(para2).
+
+-compile(export_all).
+
+%% More parameterized opaque types
+
+-export_type([strange/1]).
+
+-export_type([c1/0, c2/0]).
+
+-export_type([circ/1, circ/2]).
+
+-opaque strange(A) :: {B, B, A}.
+
+-spec t(strange(integer())) -> strange(atom()).
+
+t({3, 4, 5}) ->
+ {a, b, c}.
+
+-opaque c1() :: c2().
+-opaque c2() :: c1().
+
+c() ->
+ A = c1(),
+ B = c2(),
+ A =:= B.
+
+t() ->
+ A = ct1(),
+ B = ct2(),
+ A =:= B. % can never evaluate to 'true'
+
+-spec c1() -> c1().
+
+c1() ->
+ a.
+
+-spec c2() -> c2().
+
+c2() ->
+ a.
+
+-type ct1() :: ct2().
+-type ct2() :: ct1().
+
+-spec ct1() -> ct1().
+
+ct1() ->
+ a.
+
+-spec ct2() -> ct2().
+
+ct2() ->
+ b.
+
+%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
+
+c_adt() ->
+ A = c1_adt(),
+ B = c2_adt(),
+ A =:= B. % opaque attempt
+
+t_adt() ->
+ A = ct1_adt(),
+ B = ct2_adt(),
+ A =:= B. % can never evaluate to true
+
+c1_adt() ->
+ para2_adt:c1().
+
+c2_adt() ->
+ para2_adt:c2().
+
+ct1_adt() ->
+ para2_adt:ct1().
+
+ct2_adt() ->
+ para2_adt:ct2().
+
+%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
+
+-opaque circ(A) :: circ(A, A).
+-opaque circ(A, B) :: circ({A, B}).
+
+tcirc() ->
+ A = circ1(),
+ B = circ2(),
+ A =:= B. % can never evaluate to 'true' (but the types are not OK, or?)
+
+-spec circ1() -> circ(integer()).
+
+circ1() ->
+ 3.
+
+-spec circ2() -> circ(integer(), integer()).
+
+circ2() ->
+ {3, 3}.
+
+tcirc_adt() ->
+ A = circ1_adt(),
+ B = circ2_adt(),
+ A =:= B. % opaque attempt (one would expect them to be the same...)
+
+circ1_adt() ->
+ para2_adt:circ1().
+
+circ2_adt() ->
+ para2_adt:circ2().
+
+%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
+
+u_adt() ->
+ A = u1_adt(),
+ B = u2_adt(),
+ %% The resulting types are equal, but not the parameters:
+ A =:= B. % opaque attempt
+
+u1_adt() ->
+ para2_adt:u1().
+
+u2_adt() ->
+ para2_adt:u2().
diff --git a/lib/dialyzer/test/opaque_SUITE_data/src/para/para2_adt.erl b/lib/dialyzer/test/opaque_SUITE_data/src/para/para2_adt.erl
new file mode 100644
index 0000000000..96df437c67
--- /dev/null
+++ b/lib/dialyzer/test/opaque_SUITE_data/src/para/para2_adt.erl
@@ -0,0 +1,64 @@
+-module(para2_adt).
+
+%% More parameterized opaque types
+
+-export_type([c1/0, c2/0]).
+
+-export_type([ct1/0, ct2/0]).
+
+-export_type([circ/1, circ/2]).
+
+-export_type([un/2]).
+
+-export([c1/0, c2/0, ct1/0, ct2/0, circ1/0, circ2/0, u1/0, u2/0]).
+
+-opaque c1() :: c2().
+-opaque c2() :: c1().
+
+-spec c1() -> c1().
+
+c1() ->
+ a.
+
+-spec c2() -> c2().
+
+c2() ->
+ a.
+
+-type ct1() :: ct2().
+-type ct2() :: ct1().
+
+-spec ct1() -> ct1().
+
+ct1() ->
+ a.
+
+-spec ct2() -> ct2().
+
+ct2() ->
+ b.
+
+-opaque circ(A) :: circ(A, A).
+-opaque circ(A, B) :: circ({A, B}).
+
+-spec circ1() -> circ(integer()).
+
+circ1() ->
+ 3.
+
+-spec circ2() -> circ(integer(), integer()).
+
+circ2() ->
+ {3, 3}.
+
+-opaque un(A, B) :: A | B.
+
+-spec u1() -> un(integer(), atom()).
+
+u1() ->
+ 3.
+
+-spec u2() -> un(atom(), integer()).
+
+u2() ->
+ 3.
diff --git a/lib/dialyzer/test/opaque_SUITE_data/src/para/para3.erl b/lib/dialyzer/test/opaque_SUITE_data/src/para/para3.erl
new file mode 100644
index 0000000000..792ae40d39
--- /dev/null
+++ b/lib/dialyzer/test/opaque_SUITE_data/src/para/para3.erl
@@ -0,0 +1,77 @@
+-module(para3).
+
+-export([t/0, t1/1, t2/0, ot1/1, ot2/0, t1_adt/0, t2_adt/0]).
+
+-export([exp_adt/0]).
+
+%% More opaque tests.
+
+-export_type([ot1/0, ot1/1, ot1/2, ot1/3, ot1/4, ot1/5]).
+
+-opaque ot1() :: {ot1(_)}.
+
+-opaque ot1(A) :: {ot1(A, A)}.
+
+-opaque ot1(A, B) :: {ot1(A, B, A)}.
+
+-opaque ot1(A, B, C) :: {ot1(A, B, C, A)}.
+
+-opaque ot1(A, B, C, D) :: {ot1(A, B, C, D, A)}.
+
+-opaque ot1(A, B, C, D, E) :: {A, B, C, D, E}.
+
+-spec ot1(_) -> ot1().
+
+ot1(A) ->
+ {{{{{A, A, A, A, A}}}}}.
+
+-spec ot2() -> ot1(). % invalid type spec
+
+ot2() ->
+ foo.
+
+%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
+
+t() ->
+ {{{17}}} = t1(3). %% pattern can never match
+
+-type t1() :: {t1(_)}.
+
+-type t1(A) :: {t1(A, A)}.
+
+-type t1(A, B) :: {t1(A, B, A)}.
+
+-type t1(A, B, C) :: {t1(A, B, C, A)}.
+
+-type t1(A, B, C, D) :: {t1(A, B, C, D, A)}.
+
+-type t1(A, B, C, D, E) :: {A, B, C, D, E}.
+
+-spec t1(_) -> t1().
+
+t1(A) ->
+ {{{{{A, A, A, A, A}}}}}.
+
+-spec t2() -> t1(). % invalid type spec
+
+t2() ->
+ foo.
+
+%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
+
+%% Shows that the list TypeNames in t_from_form must include ArgsLen.
+
+t1_adt() ->
+ {{{{{17}}}}} = para3_adt:t1(3). % breaks the opaqueness
+
+t2_adt() ->
+ {{{{17}}}} = para3_adt:t1(3). % can never match
+
+%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
+
+-type exp() :: para3_adt:exp1(para3_adt:exp2()).
+
+-spec exp_adt() -> exp().
+
+exp_adt() ->
+ 3.
diff --git a/lib/dialyzer/test/opaque_SUITE_data/src/para/para3_adt.erl b/lib/dialyzer/test/opaque_SUITE_data/src/para/para3_adt.erl
new file mode 100644
index 0000000000..3919b846e6
--- /dev/null
+++ b/lib/dialyzer/test/opaque_SUITE_data/src/para/para3_adt.erl
@@ -0,0 +1,27 @@
+-module(para3_adt).
+
+-export([t1/1]).
+
+-export_type([t1/0, t1/1, t1/2, t1/3, t1/4, ot1/5]).
+
+-export_type([exp1/1, exp2/0]).
+
+-type t1() :: {t1(_)}.
+
+-type t1(A) :: {t1(A, A)}.
+
+-type t1(A, B) :: {t1(A, B, A)}.
+
+-type t1(A, B, C) :: {t1(A, B, C, A)}.
+
+-type t1(A, B, C, D) :: {ot1(A, B, C, D, A)}.
+
+-opaque ot1(A, B, C, D, E) :: {A, B, C, D, E}.
+
+-spec t1(_) -> t1().
+
+t1(A) ->
+ {{{{{A, A, A, A, A}}}}}.
+
+-opaque exp1(T) :: T.
+-opaque exp2() :: integer().
diff --git a/lib/dialyzer/test/opaque_SUITE_data/src/simple/exact_adt.erl b/lib/dialyzer/test/opaque_SUITE_data/src/simple/exact_adt.erl
new file mode 100644
index 0000000000..7103847ae7
--- /dev/null
+++ b/lib/dialyzer/test/opaque_SUITE_data/src/simple/exact_adt.erl
@@ -0,0 +1,17 @@
+-module(exact_adt).
+
+-export([exact_adt_set_type/1, exact_adt_set_type2/1]).
+
+-export_type([exact_adt/0]).
+
+-record(exact_adt, {}).
+
+-opaque exact_adt() :: #exact_adt{}.
+
+-spec exact_adt_set_type(_) -> exact_adt().
+
+exact_adt_set_type(G) -> G.
+
+-spec exact_adt_set_type2(exact_adt()) -> exact_adt().
+
+exact_adt_set_type2(G) -> G.
diff --git a/lib/dialyzer/test/opaque_SUITE_data/src/simple/exact_api.erl b/lib/dialyzer/test/opaque_SUITE_data/src/simple/exact_api.erl
new file mode 100644
index 0000000000..c19330eb30
--- /dev/null
+++ b/lib/dialyzer/test/opaque_SUITE_data/src/simple/exact_api.erl
@@ -0,0 +1,60 @@
+-module(exact_api).
+
+-export([new/0, exact_api_test/1, exact_api_new/1,
+ exact_adt_test/1, exact_adt_new/1]).
+
+-export_type([exact_api/0]).
+
+-record(digraph, {vtab = notable :: ets:tab(),
+ etab = notable :: ets:tab(),
+ ntab = notable :: ets:tab(),
+ cyclic = true :: boolean()}).
+
+-spec new() -> digraph:graph().
+
+new() ->
+ A = #digraph{},
+ set_type(A), % does not have an opaque term as 1st argument
+ A.
+
+-spec set_type(digraph:graph()) -> true.
+
+set_type(G) ->
+ digraph:delete(G).
+
+%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
+
+%%% The derived spec of exact_api_new() is
+%%% -spec exact_api_new(exact_api:exact_api()) -> exact_api:exact_api().
+%%% This won't happen unless dialyzer_typesig uses
+%%% t_is_exactly_equal() rather than t_is_equal().
+%%% [As of R17B the latter considers two types equal if nothing but
+%%% their ?opaque tags differ.]
+
+-record(exact_api, {}).
+
+-opaque exact_api() :: #exact_api{}.
+
+exact_api_test(X) ->
+ #exact_api{} = exact_api_set_type(X). % OK
+
+exact_api_new(A) ->
+ A = #exact_api{},
+ _ = exact_api_set_type(A), % OK (the opaque type is local)
+ A.
+
+-spec exact_api_set_type(exact_api()) -> exact_api().
+
+exact_api_set_type(#exact_api{}=E) -> E.
+
+%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
+
+-record(exact_adt, {}).
+
+exact_adt_test(X) ->
+ #exact_adt{} = exact_adt:exact_adt_set_type(X). % breaks the opaqueness
+
+exact_adt_new(A) ->
+ A = #exact_adt{},
+ _ = exact_adt:exact_adt_set_type2(A), % does not have an opaque term as 1st argument
+ A.
diff --git a/lib/dialyzer/test/opaque_SUITE_data/src/simple/is_rec.erl b/lib/dialyzer/test/opaque_SUITE_data/src/simple/is_rec.erl
new file mode 100644
index 0000000000..2b157483bc
--- /dev/null
+++ b/lib/dialyzer/test/opaque_SUITE_data/src/simple/is_rec.erl
@@ -0,0 +1,65 @@
+-module(is_rec).
+
+-export([ri1/0, ri11/0, ri13/0, ri14/0, ri2/0, ri3/0, ri4/0, ri5/0,
+ ri6/0, ri7/0, ri8/0]).
+
+-record(r, {f1 :: integer()}).
+
+ri1() ->
+ A = simple1_adt:d1(),
+ is_record(A, r). % opaque term 1
+
+ri11() ->
+ A = simple1_adt:d1(),
+ I = '1-3'(),
+ is_record(A, r, I). % opaque term 1
+
+ri13() ->
+ A = simple1_adt:d1(),
+ if is_record(A, r) -> true end. % breaks the opaqueness
+
+ri14() ->
+ A = simple1_adt:d1(),
+ if is_record({A, 1}, r) -> true end. % breaks the opaqueness
+
+-type '1-3-t'() :: 1..3.
+
+-spec '1-3'() -> '1-3-t'().
+
+'1-3'() ->
+ random:uniform(3).
+
+
+-spec 'Atom'() -> atom().
+
+'Atom'() ->
+ a.
+
+ri2() ->
+ A = simple1_adt:d1(),
+ R = 'Atom'(),
+ is_record(A, R). % opaque term 1
+
+ri3() ->
+ A = simple1_adt:d1(),
+ is_record(A, A, 1). % opaque term 2
+
+ri4() ->
+ A = simple1_adt:d1(),
+ is_record(A, hipp:hopp(), 1). % opaque term 1
+
+ri5() ->
+ A = simple1_adt:d1(),
+ is_record(A, A, hipp:hopp()). % opaque term 2
+
+ri6() ->
+ A = simple1_adt:d1(),
+ if is_record(A, r) -> true end. % breaks opaqueness
+
+ri7() ->
+ A = simple1_adt:d1(),
+ if is_record({r, A}, r) -> true end. % A violates #r{}
+
+ri8() ->
+ A = simple1_adt:d1(),
+ is_record({A, 1}, r). % opaque term 1
diff --git a/lib/dialyzer/test/opaque_SUITE_data/src/simple/rec_adt.erl b/lib/dialyzer/test/opaque_SUITE_data/src/simple/rec_adt.erl
new file mode 100644
index 0000000000..ff80d6e99b
--- /dev/null
+++ b/lib/dialyzer/test/opaque_SUITE_data/src/simple/rec_adt.erl
@@ -0,0 +1,28 @@
+-module(rec_adt).
+
+-export([f/0, r1/0]).
+
+-export_type([r1/0]).
+
+-export_type([f/0, op_t/0, a/0]).
+
+-opaque a() :: a | b.
+
+-record(r1,
+ {f1 :: a()}).
+
+-opaque r1() :: #r1{}.
+
+-opaque f() :: fun((_) -> _).
+
+-opaque op_t() :: integer().
+
+-spec f() -> f().
+
+f() ->
+ fun(_) -> 3 end.
+
+-spec r1() -> r1().
+
+r1() ->
+ #r1{f1 = a}.
diff --git a/lib/dialyzer/test/opaque_SUITE_data/src/simple/rec_api.erl b/lib/dialyzer/test/opaque_SUITE_data/src/simple/rec_api.erl
new file mode 100644
index 0000000000..d9b1d59f0c
--- /dev/null
+++ b/lib/dialyzer/test/opaque_SUITE_data/src/simple/rec_api.erl
@@ -0,0 +1,77 @@
+-module(rec_api).
+
+-export([t1/0, t2/0, adt_t1/0, adt_t1/1, adt_r1/0,
+ t/1, t_adt/0, r/0, r_adt/0]).
+
+-export_type([{a,0},{r1,0}]).
+
+-export_type([f/0, op_t/0, r/0, tup/0]).
+
+-opaque a() :: a | b.
+
+-record(r1,
+ {f1 :: a()}).
+
+-opaque r1() :: #r1{}.
+
+t1() ->
+ A = #r1{f1 = a},
+ {r1, a} = A.
+
+t2() ->
+ A = {r1, 10}, % violates the type of #r1{}
+ {r1, 10} = A. % violates the type of #r1{}
+
+adt_t1() ->
+ R = rec_adt:r1(),
+ {r1, a} = R. % breaks the opaqueness
+
+-spec adt_t1(rec_adt:r1()) -> rec_adt:r1(). % invalid type spec
+
+adt_t1(R) ->
+ {r1, a} = R.
+
+-spec adt_r1() -> rec_adt:r1(). % invalid type spec
+
+adt_r1() ->
+ #r1{f1 = a}.
+
+-opaque f() :: fun((_) -> _).
+
+-opaque op_t() :: integer().
+
+-spec t(f()) -> _.
+
+t(A) ->
+ T = term(),
+ %% 3(T), % cannot test this: dialyzer_dep deliberately crashes
+ A(T).
+
+-spec term() -> op_t().
+
+term() ->
+ 3.
+
+t_adt() ->
+ A = rec_adt:f(),
+ T = term(),
+ A(T).
+
+-record(r, {f = fun(_) -> 3 end :: f(), o = 1 :: op_t()}).
+
+-opaque r() :: #r{}.
+
+-opaque tup() :: {'r', f(), op_t()}.
+
+-spec r() -> _.
+
+r() ->
+ {r, f(), 2}. % OK, f() is a local opaque type
+
+-spec f() -> f().
+
+f() ->
+ fun(_) -> 3 end.
+
+r_adt() ->
+ {r, rec_adt:f(), 2}. % breaks the opaqueness
diff --git a/lib/dialyzer/test/opaque_SUITE_data/src/simple/simple1_adt.erl b/lib/dialyzer/test/opaque_SUITE_data/src/simple/simple1_adt.erl
new file mode 100644
index 0000000000..21a277c1e9
--- /dev/null
+++ b/lib/dialyzer/test/opaque_SUITE_data/src/simple/simple1_adt.erl
@@ -0,0 +1,138 @@
+-module(simple1_adt).
+
+-export([d1/0, d2/0, i/0, n1/0, n2/0, o1/0, o2/0,
+ c1/0, c2/0, bit1/0, a/0, i1/0, tuple/0,
+ b1/0, b2/0, ty_i1/0]).
+
+-export_type([o1/0, o2/0, d1/0, d2/0]).
+
+-export_type([i1/0, i2/0, di1/0, di2/0]).
+
+-export_type([ty_i1/0, c1/0, c2/0]).
+
+-export_type([b1/0, b2/0]).
+
+-export_type([bit1/0]).
+
+-export_type([tuple1/0, a/0, i/0]).
+
+%% Equal:
+
+-opaque o1() :: a | b | c.
+
+-opaque o2() :: a | b | c.
+
+%% Disjoint:
+
+-opaque d1() :: a | b | c.
+
+-opaque d2() :: d | e | f.
+
+%% One common element:
+
+-opaque c1() :: a | b | c.
+
+-opaque c2() :: c | e | f.
+
+%% Equal integer range:
+
+-opaque i1() :: 1 | 2.
+
+-opaque i2() :: 1 | 2.
+
+%% Disjoint integer range:
+
+-opaque di1() :: 1 | 2.
+
+-opaque di2() :: 3 | 4.
+
+
+-type ty_i1() :: 1 | 2.
+
+%% Boolean types
+
+-opaque b1() :: boolean().
+
+-opaque b2() :: boolean().
+
+%% Binary types
+
+-opaque bit1() :: binary().
+
+%% Tuple types
+
+-opaque tuple1() :: tuple().
+
+%% Atom type
+
+-opaque a() :: atom().
+
+-opaque i() :: integer().
+
+-spec d1() -> d1().
+
+d1() -> a.
+
+-spec d2() -> d2().
+
+d2() -> d.
+
+-spec i() -> i().
+
+i() ->
+ 1.
+
+-spec n1() -> o1().
+
+n1() -> a.
+
+-spec n2() -> o2().
+
+n2() -> a.
+
+-spec o1() -> o1().
+
+o1() -> a.
+
+-spec o2() -> o2().
+
+o2() -> a.
+
+-spec c1() -> c1().
+
+c1() -> a.
+
+-spec c2() -> c2().
+
+c2() -> e.
+
+-spec bit1() -> bit1().
+
+bit1() ->
+ <<"hej">>.
+
+-spec a() -> a().
+
+a() ->
+ e.
+
+-spec i1() -> i1().
+
+i1() -> 1.
+
+-spec tuple() -> tuple1().
+
+tuple() -> {1,2}.
+
+-spec b1() -> b1().
+
+b1() -> true.
+
+-spec b2() -> b2().
+
+b2() -> false.
+
+-spec ty_i1() -> ty_i1().
+
+ty_i1() ->
+ 1.
diff --git a/lib/dialyzer/test/opaque_SUITE_data/src/simple/simple1_api.erl b/lib/dialyzer/test/opaque_SUITE_data/src/simple/simple1_api.erl
new file mode 100644
index 0000000000..5135eb8e59
--- /dev/null
+++ b/lib/dialyzer/test/opaque_SUITE_data/src/simple/simple1_api.erl
@@ -0,0 +1,571 @@
+-module(simple1_api).
+
+-export([t1/1, adt_t1/1, t2/1, adt_t2/1, tup/0, t3/0, t4/0, t5/0, t6/0, t7/0,
+ t8/0, adt_t3/0, adt_t4/0, adt_t7/0, adt_t8/0, adt_t5/0,
+ c1/2, c2/2, c2/0, c3/0, c4/0, tt1/0, tt2/0,
+ cmp1/0, cmp2/0, cmp3/0, cmp4/0,
+ ty_cmp1/0, ty_cmp2/0, ty_cmp3/0, ty_cmp4/0,
+ f1/0, f2/0, adt_f1/0, adt_f2/0, f3/0, f4/0, adt_f3/0, adt_f4/0,
+ adt_f4_a/0, adt_f4_b/0,
+ bool_t1/0, bool_t2/0, bool_t3/0, bool_t4/0, bool_t5/1, bool_t6/1,
+ bool_t7/0, bool_adt_t1/0, bool_adt_t2/0, bool_adt_t5/1,
+ bool_adt_t6/1, bool_t8/0, bool_adt_t8/2, bool_t9/0, bool_adt_t9/2,
+ bit_t1/0, bit_adt_t1/0, bit_t3/1, bit_adt_t2/0, bit_adt_t3/1,
+ bit_t5/1, bit_t4/1, bit_adt_t4/1, bit_t5/0, bit_adt_t5/0,
+ call_f/1, call_f_adt/1, call_m_adt/1, call_m/1, call_f_i/1,
+ call_m_i/1, call_m_adt_i/1, call_f_adt_i/1,
+ eq1/0, eq2/0, c5/0, c6/2, c7/2, c8/0]).
+
+%%% Equal opaque types
+
+-export_type([o1/0, o2/0]).
+
+-export_type([d1/0, d2/0]).
+
+-opaque o1() :: a | b | c.
+
+-opaque o2() :: a | b | c.
+
+-export_type([i1/0, i2/0, di1/0, di2/0]).
+
+-export_type([b1/0, b2/0]).
+
+-export_type([bit1/0]).
+
+-export_type([a/0, i/0]).
+
+%% The derived spec is
+%% -spec t1('a' | 'b') -> simple1_api:o1('a') | simple1_api:o2('a').
+%% but that is not tested...
+
+t1(a) ->
+ o1();
+t1(b) ->
+ o2().
+
+-spec o1() -> o1().
+
+o1() -> a.
+
+-spec o2() -> o2().
+
+o2() -> a.
+
+%% The derived spec is
+%% -spec adt_t1('a' | 'b') -> simple1_adt:o1('a') | simple1_adt:o2('a').
+%% but that is not tested...
+
+adt_t1(a) ->
+ simple1_adt:o1();
+adt_t1(b) ->
+ simple1_adt:o2().
+
+%%% Disjunct opaque types
+
+-opaque d1() :: a | b | c.
+
+-opaque d2() :: d | e | f.
+
+%% -spec t2('a' | 'b') -> simple1_api:d1('a') | simple1_api:d2('d').
+
+t2(a) ->
+ d1();
+t2(b) ->
+ d2().
+
+-spec d1() -> d1().
+
+d1() -> a.
+
+-spec d2() -> d2().
+
+d2() -> d.
+
+%% -spec adt_t2('a' | 'b') -> simple1_adt:d1('a') | simple1_adt:d2('d').
+
+adt_t2(a) ->
+ simple1_adt:d1();
+adt_t2(b) ->
+ simple1_adt:d2().
+
+-spec tup() -> simple1_adt:tuple1(). % invalid type spec
+
+tup() ->
+ {a, b}.
+
+%%% Matching equal opaque types with different names
+
+t3() ->
+ A = n1(),
+ B = n2(),
+ A = A, % OK, of course
+ A = B. % OK since o1() and o2() are local opaque types
+
+t4() ->
+ A = n1(),
+ B = n2(),
+ true = A =:= A, % OK, of course
+ A =:= B. % OK since o1() and o2() are local opaque types
+
+t5() ->
+ A = d1(),
+ B = d2(),
+ A =:= B. % can never evaluate to true
+
+t6() ->
+ A = d1(),
+ B = d2(),
+ A = B. % can never succeed
+
+t7() ->
+ A = d1(),
+ B = d2(),
+ A =/= B. % OK (always true?)
+
+t8() ->
+ A = d1(),
+ B = d2(),
+ A /= B. % OK (always true?)
+
+-spec n1() -> o1().
+
+n1() -> a.
+
+-spec n2() -> o2().
+
+n2() -> a.
+
+adt_t3() ->
+ A = simple1_adt:n1(),
+ B = simple1_adt:n2(),
+ true = A =:= A, % OK.
+ A =:= B. % opaque test, not OK
+
+adt_t4() ->
+ A = simple1_adt:n1(),
+ B = simple1_adt:n2(),
+ A = A, % OK
+ A = B. % opaque term
+
+adt_t7() ->
+ A = simple1_adt:n1(),
+ B = simple1_adt:n2(),
+ false = A =/= A, % OK
+ A =/= B. % opaque test, not OK
+
+adt_t8() ->
+ A = simple1_adt:n1(),
+ B = simple1_adt:n2(),
+ false = A /= A, % OK
+ A /= B. % opaque test, not OK
+
+adt_t5() ->
+ A = simple1_adt:c1(),
+ B = simple1_adt:c2(),
+ A =:= B. % opaque test, not OK
+
+%% Comparison in guard
+
+-spec c1(simple1_adt:d1(), simple1_adt:d2()) -> boolean().
+
+c1(A, B) when A =< B -> true. % succ type of A and B is any() (type spec is OK)
+
+-spec c2(simple1_adt:d1(), simple1_adt:d2()) -> boolean().
+
+c2(A, B) ->
+ if A =< B -> true end. % succ type of A and B is any() (type spec is OK)
+
+c2() ->
+ A = simple1_adt:d1(),
+ B = simple1_adt:d2(),
+ if A =< B -> ok end. % opaque term
+
+c3() ->
+ B = simple1_adt:d2(),
+ if a =< B -> ok end. % opaque term
+
+c4() ->
+ A = simple1_adt:d1(),
+ if A =< d -> ok end. % opaque term
+
+tt1() ->
+ A = o1(),
+ is_integer(A). % OK
+
+tt2() ->
+ A = simple1_adt:d1(),
+ is_integer(A). % breaks the opaqueness
+
+%% Comparison with integers
+
+-opaque i1() :: 1 | 2.
+
+-opaque i2() :: 1 | 2.
+
+-opaque di1() :: 1 | 2.
+
+-opaque di2() :: 3 | 4.
+
+-spec i1() -> i1().
+
+i1() -> 1.
+
+-type ty_i1() :: 1 | 2.
+
+-spec ty_i1() -> ty_i1().
+
+ty_i1() -> 1.
+
+cmp1() ->
+ A = i1(),
+ if A > 3 -> ok end. % can never succeed
+
+cmp2() ->
+ A = simple1_adt:i1(),
+ if A > 3 -> ok end. % opaque term
+
+cmp3() ->
+ A = i1(),
+ if A < 3 -> ok end.
+
+cmp4() ->
+ A = simple1_adt:i1(),
+ if A < 3 -> ok end. % opaque term
+
+%% -type
+
+ty_cmp1() ->
+ A = ty_i1(),
+ if A > 3 -> ok end. % can never succeed
+
+ty_cmp2() ->
+ A = simple1_adt:ty_i1(),
+ if A > 3 -> ok end. % can never succeed
+
+ty_cmp3() ->
+ A = ty_i1(),
+ if A < 3 -> ok end.
+
+ty_cmp4() ->
+ A = simple1_adt:ty_i1(),
+ if A < 3 -> ok end.
+
+%% is_function
+
+f1() ->
+ T = n1(),
+ if is_function(T) -> ok end. % can never succeed
+
+f2() ->
+ T = n1(),
+ is_function(T). % ok
+
+adt_f1() ->
+ T = simple1_adt:n1(),
+ if is_function(T) -> ok end. % breaks the opaqueness
+
+adt_f2() ->
+ T = simple1_adt:n1(),
+ is_function(T). % breaks the opaqueness
+
+f3() ->
+ A = i1(),
+ T = n1(),
+ if is_function(T, A) -> ok end. % can never succeed
+
+f4() ->
+ A = i1(),
+ T = n1(),
+ is_function(T, A). % ok
+
+adt_f3() ->
+ A = simple1_adt:i1(),
+ T = simple1_adt:n1(),
+ if is_function(T, A) -> ok end. % breaks the opaqueness
+
+adt_f4() ->
+ A = simple1_adt:i1(),
+ T = simple1_adt:n1(),
+ is_function(T, A). % breaks the opaqueness
+
+adt_f4_a() ->
+ A = simple1_adt:i1(),
+ T = n1(),
+ is_function(T, A). % opaque term
+
+
+adt_f4_b() ->
+ A = i1(),
+ T = simple1_adt:n1(),
+ is_function(T, A). % breaks the opaqueness
+
+%% A few Boolean examples
+
+bool_t1() ->
+ B = b2(),
+ if B -> ok end. % B =:= true can never succeed
+
+bool_t2() ->
+ A = b1(),
+ B = b2(),
+ if A and not B -> ok end.
+
+bool_t3() ->
+ A = b1(),
+ if not A -> ok end. % can never succeed
+
+bool_t4() ->
+ A = n1(),
+ if not ((A >= 1) and not (A < 1)) -> ok end. % can never succeed
+
+-spec bool_t5(i1()) -> integer().
+
+bool_t5(A) ->
+ if [not (A > 1)] =:=
+ [false]-> 1 end.
+
+-spec bool_t6(b1()) -> integer().
+
+bool_t6(A) ->
+ if [not A] =:=
+ [false]-> 1 end.
+
+-spec bool_t7() -> integer().
+
+bool_t7() ->
+ A = i1(),
+ if [not A] =:= % cannot succeed
+ [false]-> 1 end.
+
+bool_adt_t1() ->
+ B = simple1_adt:b2(),
+ if B -> ok end. % opaque term
+
+bool_adt_t2() ->
+ A = simple1_adt:b1(),
+ B = simple1_adt:b2(),
+ if A and not B -> ok end. % opaque term
+
+-spec bool_adt_t5(simple1_adt:i1()) -> integer().
+
+bool_adt_t5(A) ->
+ if [not (A > 1)] =:= % succ type of A is any() (type spec is OK)
+ [false]-> 1 end.
+
+-spec bool_adt_t6(simple1_adt:b1()) -> integer(). % invalid type spec
+
+bool_adt_t6(A) ->
+ if [not A] =:= % succ type of A is 'true'
+ [false]-> 1 end.
+
+-spec bool_t8() -> integer().
+
+bool_t8() ->
+ A = i1(),
+ if [A and A] =:= % cannot succeed
+ [false]-> 1 end.
+
+-spec bool_adt_t8(simple1_adt:b1(), simple1_adt:b2()) -> integer(). % invalid
+
+bool_adt_t8(A, B) ->
+ if [A and B] =:=
+ [false]-> 1 end.
+
+-spec bool_t9() -> integer().
+
+bool_t9() ->
+ A = i1(),
+ if [A or A] =:= % cannot succeed
+ [false]-> 1 end.
+
+-spec bool_adt_t9(simple1_adt:b1(), simple1_adt:b2()) -> integer(). % invalid
+
+bool_adt_t9(A, B) ->
+ if [A or B] =:=
+ [false]-> 1 end.
+
+-opaque b1() :: boolean().
+
+-opaque b2() :: boolean().
+
+-spec b1() -> b1().
+
+b1() -> true.
+
+-spec b2() -> b2().
+
+b2() -> false.
+
+%% Few (very few...) examples with bit syntax
+
+bit_t1() ->
+ A = i1(),
+ <<100:(A)>>.
+
+bit_adt_t1() ->
+ A = simple1_adt:i1(),
+ <<100:(A)>>. % breaks the opaqueness
+
+bit_t3(A) ->
+ B = i1(),
+ case none:none() of
+ <<A:B>> -> 1
+ end.
+
+bit_adt_t2() ->
+ A = simple1_adt:i1(),
+ case <<"hej">> of
+ <<_:A>> -> ok % breaks the opaqueness (but the message is strange)
+ end.
+
+
+bit_adt_t3(A) ->
+ B = simple1_adt:i1(),
+ case none:none() of
+ <<A: % breaks the opaqueness (the message is less than perfect)
+ B>> -> 1
+ end.
+
+bit_t5(A) ->
+ B = o1(),
+ case none:none() of
+ <<A:B>> -> 1 % breaks the opaqueness
+ end.
+
+-spec bit_t4(<<_:1>>) -> integer().
+
+bit_t4(A) ->
+ Sz = i1(),
+ case A of
+ <<_:Sz>> -> 1
+ end.
+
+-spec bit_adt_t4(<<_:1>>) -> integer().
+
+bit_adt_t4(A) ->
+ Sz = simple1_adt:i1(),
+ case A of
+ <<_:Sz>> -> 1 % breaks the opaqueness
+ end.
+
+bit_t5() ->
+ A = bit1(),
+ case A of
+ <<_/binary>> -> 1
+ end.
+
+bit_adt_t5() ->
+ A = simple1_adt:bit1(),
+ case A of
+ <<_/binary>> -> 1 % breaks the opaqueness
+ end.
+
+-opaque bit1() :: binary().
+
+-spec bit1() -> bit1().
+
+bit1() ->
+ <<"hej">>.
+
+%% Calls with variable module or function
+
+call_f(A) ->
+ A = a(),
+ foo:A(A).
+
+call_f_adt(A) ->
+ A = simple1_adt:a(),
+ foo:A(A). % breaks the opaqueness
+
+call_m(A) ->
+ A = a(),
+ A:foo(A).
+
+call_m_adt(A) ->
+ A = simple1_adt:a(),
+ A:foo(A). % breaks the opaqueness
+
+-opaque a() :: atom().
+
+-opaque i() :: integer().
+
+-spec a() -> a().
+
+a() ->
+ e.
+
+call_f_i(A) ->
+ A = i(),
+ foo:A(A). % A is not atom() but i()
+
+call_f_adt_i(A) ->
+ A = simple1_adt:i(),
+ foo:A(A). % A is not atom() but simple1_adt:i()
+
+call_m_i(A) ->
+ A = i(),
+ A:foo(A). % A is not atom() but i()
+
+call_m_adt_i(A) ->
+ A = simple1_adt:i(),
+ A:foo(A). % A is not atom() but simple1_adt:i()
+
+-spec eq1() -> integer().
+
+eq1() ->
+ A = simple1_adt:d2(),
+ B = simple1_adt:d1(),
+ if
+ A == B -> % opaque term
+ 0;
+ A == A ->
+ 1;
+ A =:= A -> % compiler finds this one cannot match
+ 2;
+ true -> % compiler finds this one cannot match
+ 3
+ end.
+
+eq2() ->
+ A = simple1_adt:d1(),
+ if
+ {A} >= {A} ->
+ 1;
+ A >= 3 -> % opaque term
+ 2;
+ A == 3 -> % opaque term
+ 3;
+ A =:= 3 -> % opaque term
+ 4;
+ A == A ->
+ 5;
+ A =:= A -> % compiler finds this one cannot match
+ 6
+ end.
+
+c5() ->
+ A = simple1_adt:d1(),
+ A < 3. % opaque term
+
+c6(A, B) ->
+ A = simple1_adt:d1(),
+ B = simple1_adt:d1(),
+ A =< B. % same type - no warning
+
+c7(A, B) ->
+ A = simple1_adt:d1(),
+ B = simple1_adt:d2(),
+ A =< B. % opaque term
+
+c8() ->
+ D = digraph:new(),
+ E = ets:new(foo, []),
+ if {D, a} > {D, E} -> true; % OK
+ {1.0, 2} > {{D}, {E}} -> true; % OK
+ {D, 3} > {D, E} -> true % opaque term 2
+ end.
+
+-spec i() -> i().
+
+i() ->
+ 1.
diff --git a/lib/dialyzer/test/opaque_SUITE_data/src/simple/simple2_api.erl b/lib/dialyzer/test/opaque_SUITE_data/src/simple/simple2_api.erl
new file mode 100644
index 0000000000..c86f6fd0b5
--- /dev/null
+++ b/lib/dialyzer/test/opaque_SUITE_data/src/simple/simple2_api.erl
@@ -0,0 +1,125 @@
+-module(simple2_api).
+
+-export([c1/2, c2/0, c3/0, c4/1, c5/1, c6/0, c6_b/0, c7/0, c7_b/0,
+ c7_c/0, c8/0, c9/0, c10/0, c11/0, c12/0, c13/0, c14/0, c15/0,
+ c16/0, c17/0, c18/0, c19/0, c20/0, c21/0, c22/0, c23/0,
+ c24/0, c25/0, c26/0]).
+
+-spec c1(simple1_adt:d1(), simple1_adt:d2()) -> boolean().
+
+c1(A, B) ->
+ {A} =< {B}. % succ type of A and B is any()
+
+c2() ->
+ A = simple1_adt:d1(),
+ erlang:make_tuple(1, A). % ok
+
+c3() ->
+ A = simple1_adt:d1(),
+ setelement(1, {A}, A). % ok
+
+c4(_) ->
+ A = simple1_adt:d1(),
+ halt(A). % ok (BIF fails...)
+
+c5(_) ->
+ A = simple1_adt:d1(),
+ [A] -- [A]. % ok
+
+c6() ->
+ A = simple1_adt:d1(),
+ A ! foo. % opaque term
+
+c6_b() ->
+ A = simple1_adt:d1(),
+ erlang:send(A, foo). % opaque term
+
+c7() ->
+ A = simple1_adt:d1(),
+ foo ! A. % ok
+
+c7_b() ->
+ A = simple1_adt:d1(),
+ erlang:send(foo, A). % ok
+
+c7_c() ->
+ A = simple1_adt:d1(),
+ erlang:send(foo, A, []). % ok
+
+c8() ->
+ A = simple1_adt:d1(),
+ A < 3. % opaque term
+
+c9() ->
+ A = simple1_adt:d1(),
+ lists:keysearch(A, 1, []). % ok
+
+c10() ->
+ A = simple1_adt:d1(),
+ lists:keysearch(1, A, []). % opaque term 2
+
+c11() ->
+ A = simple1_adt:tuple(),
+ lists:keysearch(key, 1, [A]). % ok
+
+c12() ->
+ A = simple1_adt:tuple(),
+ lists:keysearch(key, 1, A). % opaque term 3
+
+c13() ->
+ A = simple1_adt:tuple(),
+ lists:keysearch(key, 1, [{A,2}]). % ok
+
+c14() ->
+ A = simple1_adt:tuple(),
+ lists:keysearch(key, 1, [{2,A}]). % ok
+
+c15() ->
+ A = simple1_adt:d1(),
+ lists:keysearch(key, 1, [A]). % ok
+
+c16() ->
+ A = simple1_adt:tuple(),
+ erlang:send(foo, A). % ok
+
+c17() ->
+ A = simple1_adt:tuple(),
+ lists:reverse([A]). % ok
+
+c18() ->
+ A = simple1_adt:tuple(),
+ lists:keyreplace(a, 1, [A], {1,2}). % ok
+
+c19() ->
+ A = simple1_adt:tuple(),
+ %% Problem. The spec says argument 4 is a tuple(). Fix that!
+ lists:keyreplace(a, 1, [{1,2}], A). % opaque term 4
+
+c20() ->
+ A = simple1_adt:tuple(),
+ lists:flatten(A). % opaque term 1
+
+c21() ->
+ A = simple1_adt:tuple(),
+ lists:flatten([[{A}]]). % ok
+
+c22() ->
+ A = simple1_adt:tuple(),
+ lists:flatten([[A]]). % ok
+
+c23() ->
+ A = simple1_adt:tuple(),
+ lists:flatten([A]). % ok
+
+c24() ->
+ A = simple1_adt:tuple(),
+ lists:flatten({A}). % will never return
+
+c25() ->
+ A = simple1_adt:d1(),
+ B = simple1_adt:tuple(),
+ if {A,3} > {A,B} -> true end. % opaque 2nd argument
+
+c26() ->
+ B = simple1_adt:tuple(),
+ tuple_to_list(B). % opaque term 1
diff --git a/lib/dialyzer/test/opaque_SUITE_data/src/union/union_adt.erl b/lib/dialyzer/test/opaque_SUITE_data/src/union/union_adt.erl
index 5ca3202bba..d88f238190 100644
--- a/lib/dialyzer/test/opaque_SUITE_data/src/union/union_adt.erl
+++ b/lib/dialyzer/test/opaque_SUITE_data/src/union/union_adt.erl
@@ -1,10 +1,15 @@
-module(union_adt).
-export([new/1, new_a/1, new_rec/1]).
+%% Now (R17) that opaque types are no longer recognized by their shape
+%% this test case is rather meaningless.
+
-record(rec, {x = 42 :: integer()}).
-opaque u() :: 'aaa' | 'bbb' | #rec{}.
+-spec new(_) -> u().
+
new(a) -> aaa;
new(b) -> bbb;
new(X) when is_integer(X) ->
@@ -13,7 +18,11 @@ new(X) when is_integer(X) ->
%% the following two functions (and their uses in union_use.erl) test
%% that the return type is the opaque one and not just a subtype of it
+-spec new_a(_) -> u().
+
new_a(a) -> aaa.
+-spec new_rec(_) -> u().
+
new_rec(X) when is_integer(X) ->
#rec{x = X}.
diff --git a/lib/dialyzer/test/opaque_SUITE_data/src/wings/wings_util.erl b/lib/dialyzer/test/opaque_SUITE_data/src/wings/wings_util.erl
index 8f0da1f5dc..ca6bc0ab4a 100644
--- a/lib/dialyzer/test/opaque_SUITE_data/src/wings/wings_util.erl
+++ b/lib/dialyzer/test/opaque_SUITE_data/src/wings/wings_util.erl
@@ -14,12 +14,12 @@
rel2fam(Rel) ->
sofs:to_external(sofs:relation_to_family(sofs:relation(Rel))).
-%% a definition that does not violate the opaqueness of gb_tree()
+%% a definition that does not violate the opaqueness of gb_trees:tree()
gb_trees_smallest_key(Tree) ->
{Key, _V} = gb_trees:smallest(Tree),
Key.
-%% a definition that violates the opaqueness of gb_tree()
+%% a definition that violates the opaqueness of gb_trees:tree()
gb_trees_largest_key({_, Tree}) ->
largest_key1(Tree).
diff --git a/lib/dialyzer/test/opaque_SUITE_data/src/zoltan_adt.erl b/lib/dialyzer/test/opaque_SUITE_data/src/zoltan_adt.erl
new file mode 100644
index 0000000000..c742990c6a
--- /dev/null
+++ b/lib/dialyzer/test/opaque_SUITE_data/src/zoltan_adt.erl
@@ -0,0 +1,5 @@
+-module(zoltan_adt).
+
+-export_type([id/0]).
+
+-opaque id() :: string().
diff --git a/lib/dialyzer/test/opaque_SUITE_data/src/zoltan_kis2.erl b/lib/dialyzer/test/opaque_SUITE_data/src/zoltan_kis2.erl
index 38c6051c58..e094d1982b 100644
--- a/lib/dialyzer/test/opaque_SUITE_data/src/zoltan_kis2.erl
+++ b/lib/dialyzer/test/opaque_SUITE_data/src/zoltan_kis2.erl
@@ -2,7 +2,7 @@
-export([get/2]).
--opaque data() :: gb_tree().
+-opaque data() :: gb_trees:tree().
-spec get(term(), data()) -> term().
diff --git a/lib/dialyzer/test/opaque_SUITE_data/src/zoltan_kis3.erl b/lib/dialyzer/test/opaque_SUITE_data/src/zoltan_kis3.erl
index b62b9de576..07c9f0a270 100644
--- a/lib/dialyzer/test/opaque_SUITE_data/src/zoltan_kis3.erl
+++ b/lib/dialyzer/test/opaque_SUITE_data/src/zoltan_kis3.erl
@@ -2,13 +2,13 @@
-export([f/0, gen/0]).
--opaque id() :: string().
+%-opaque id() :: string().
-spec f() -> char().
%% List pattern matching issue
f() -> [H|_T] = gen(), H.
--spec gen() -> id().
+-spec gen() -> zoltan_adt:id().
gen() -> "Dummy".
diff --git a/lib/dialyzer/test/options1_SUITE_data/dialyzer_options b/lib/dialyzer/test/options1_SUITE_data/dialyzer_options
index c612e77d3e..65d233ac0d 100644
--- a/lib/dialyzer/test/options1_SUITE_data/dialyzer_options
+++ b/lib/dialyzer/test/options1_SUITE_data/dialyzer_options
@@ -1,2 +1,2 @@
-{dialyzer_options, [{include_dirs, ["my_include"]}, {defines, [{'COMPILER_VSN', 42}]}, {warnings, [no_improper_lists]}]}.
+{dialyzer_options, [{include_dirs, ["my_include"]}, {defines, [{'COMPILER_VSN', 42}]}, {warnings, [no_improper_lists, no_unknown]}]}.
{time_limit, 30}.
diff --git a/lib/dialyzer/test/r9c_SUITE_data/dialyzer_options b/lib/dialyzer/test/r9c_SUITE_data/dialyzer_options
index e00e23bb66..ba0e6b1ad7 100644
--- a/lib/dialyzer/test/r9c_SUITE_data/dialyzer_options
+++ b/lib/dialyzer/test/r9c_SUITE_data/dialyzer_options
@@ -1,2 +1,2 @@
-{dialyzer_options, [{defines, [{vsn, 42}]}]}.
+{dialyzer_options, [{defines, [{vsn, 42}]}, {warnings, [no_unknown]}]}.
{time_limit, 20}.
diff --git a/lib/dialyzer/test/race_SUITE_data/dialyzer_options b/lib/dialyzer/test/race_SUITE_data/dialyzer_options
index 44e1720715..6992fc6c40 100644
--- a/lib/dialyzer/test/race_SUITE_data/dialyzer_options
+++ b/lib/dialyzer/test/race_SUITE_data/dialyzer_options
@@ -1 +1 @@
-{dialyzer_options, [{warnings, [race_conditions]}]}.
+{dialyzer_options, [{warnings, [race_conditions, no_unknown]}]}.
diff --git a/lib/dialyzer/test/race_SUITE_data/results/ets_insert_control_flow3 b/lib/dialyzer/test/race_SUITE_data/results/ets_insert_control_flow3
index d640f564cd..0382627cfc 100644
--- a/lib/dialyzer/test/race_SUITE_data/results/ets_insert_control_flow3
+++ b/lib/dialyzer/test/race_SUITE_data/results/ets_insert_control_flow3
@@ -1,3 +1,3 @@
-ets_insert_control_flow3.erl:21: The call ets:insert(Table::atom() | tid(),{'root',[pos_integer()]}) might have an unintended effect due to a possible race condition caused by its combination with the ets:lookup(Table::atom() | tid(),'root') call in ets_insert_control_flow3.erl on line 12
-ets_insert_control_flow3.erl:23: The call ets:insert(Table::atom() | tid(),{'user',[pos_integer()]}) might have an unintended effect due to a possible race condition caused by its combination with the ets:lookup(Table::atom() | tid(),'user') call in ets_insert_control_flow3.erl on line 13
+ets_insert_control_flow3.erl:21: The call ets:insert(Table::atom() | ets:tid(),{'root',[pos_integer()]}) might have an unintended effect due to a possible race condition caused by its combination with the ets:lookup(Table::atom() | ets:tid(),'root') call in ets_insert_control_flow3.erl on line 12
+ets_insert_control_flow3.erl:23: The call ets:insert(Table::atom() | ets:tid(),{'user',[pos_integer()]}) might have an unintended effect due to a possible race condition caused by its combination with the ets:lookup(Table::atom() | ets:tid(),'user') call in ets_insert_control_flow3.erl on line 13
diff --git a/lib/dialyzer/test/race_SUITE_data/results/ets_insert_control_flow4 b/lib/dialyzer/test/race_SUITE_data/results/ets_insert_control_flow4
index 6f34e75902..22944fd066 100644
--- a/lib/dialyzer/test/race_SUITE_data/results/ets_insert_control_flow4
+++ b/lib/dialyzer/test/race_SUITE_data/results/ets_insert_control_flow4
@@ -1,3 +1,3 @@
-ets_insert_control_flow4.erl:21: The call ets:insert(Table::atom() | tid(),{'pass',[pos_integer()]}) might have an unintended effect due to a possible race condition caused by its combination with the ets:lookup(Table::atom() | tid(),'pass') call in ets_insert_control_flow4.erl on line 12, the ets:lookup(Table::atom() | tid(),'pass') call in ets_insert_control_flow4.erl on line 13
-ets_insert_control_flow4.erl:23: The call ets:insert(Table::atom() | tid(),{'pass',[pos_integer()]}) might have an unintended effect due to a possible race condition caused by its combination with the ets:lookup(Table::atom() | tid(),'pass') call in ets_insert_control_flow4.erl on line 12, the ets:lookup(Table::atom() | tid(),'pass') call in ets_insert_control_flow4.erl on line 13
+ets_insert_control_flow4.erl:21: The call ets:insert(Table::atom() | ets:tid(),{'pass',[pos_integer()]}) might have an unintended effect due to a possible race condition caused by its combination with the ets:lookup(Table::atom() | ets:tid(),'pass') call in ets_insert_control_flow4.erl on line 12, the ets:lookup(Table::atom() | ets:tid(),'pass') call in ets_insert_control_flow4.erl on line 13
+ets_insert_control_flow4.erl:23: The call ets:insert(Table::atom() | ets:tid(),{'pass',[pos_integer()]}) might have an unintended effect due to a possible race condition caused by its combination with the ets:lookup(Table::atom() | ets:tid(),'pass') call in ets_insert_control_flow4.erl on line 12, the ets:lookup(Table::atom() | ets:tid(),'pass') call in ets_insert_control_flow4.erl on line 13
diff --git a/lib/dialyzer/test/race_SUITE_data/results/ets_insert_control_flow5 b/lib/dialyzer/test/race_SUITE_data/results/ets_insert_control_flow5
index 5af592f43f..e172887f34 100644
--- a/lib/dialyzer/test/race_SUITE_data/results/ets_insert_control_flow5
+++ b/lib/dialyzer/test/race_SUITE_data/results/ets_insert_control_flow5
@@ -1,5 +1,5 @@
-ets_insert_control_flow5.erl:22: The call ets:insert(Table::atom() | tid(),{'welcome_msg',[any(),...]}) might have an unintended effect due to a possible race condition caused by its combination with the ets:lookup(Table::atom() | tid(),'welcome_msg') call in ets_insert_control_flow5.erl on line 16
-ets_insert_control_flow5.erl:23: The call ets:insert(Table::atom() | tid(),{'pass',[pos_integer()]}) might have an unintended effect due to a possible race condition caused by its combination with the ets:lookup(Table::atom() | tid(),'pass') call in ets_insert_control_flow5.erl on line 12, the ets:lookup(Table::atom() | tid(),'pass') call in ets_insert_control_flow5.erl on line 13
-ets_insert_control_flow5.erl:25: The call ets:insert(Table::atom() | tid(),{'welcome_msg',[any(),...]}) might have an unintended effect due to a possible race condition caused by its combination with the ets:lookup(Table::atom() | tid(),'welcome_msg') call in ets_insert_control_flow5.erl on line 16
-ets_insert_control_flow5.erl:26: The call ets:insert(Table::atom() | tid(),{'pass',[pos_integer()]}) might have an unintended effect due to a possible race condition caused by its combination with the ets:lookup(Table::atom() | tid(),'pass') call in ets_insert_control_flow5.erl on line 12, the ets:lookup(Table::atom() | tid(),'pass') call in ets_insert_control_flow5.erl on line 13
+ets_insert_control_flow5.erl:22: The call ets:insert(Table::atom() | ets:tid(),{'welcome_msg',[any(),...]}) might have an unintended effect due to a possible race condition caused by its combination with the ets:lookup(Table::atom() | ets:tid(),'welcome_msg') call in ets_insert_control_flow5.erl on line 16
+ets_insert_control_flow5.erl:23: The call ets:insert(Table::atom() | ets:tid(),{'pass',[pos_integer()]}) might have an unintended effect due to a possible race condition caused by its combination with the ets:lookup(Table::atom() | ets:tid(),'pass') call in ets_insert_control_flow5.erl on line 12, the ets:lookup(Table::atom() | ets:tid(),'pass') call in ets_insert_control_flow5.erl on line 13
+ets_insert_control_flow5.erl:25: The call ets:insert(Table::atom() | ets:tid(),{'welcome_msg',[any(),...]}) might have an unintended effect due to a possible race condition caused by its combination with the ets:lookup(Table::atom() | ets:tid(),'welcome_msg') call in ets_insert_control_flow5.erl on line 16
+ets_insert_control_flow5.erl:26: The call ets:insert(Table::atom() | ets:tid(),{'pass',[pos_integer()]}) might have an unintended effect due to a possible race condition caused by its combination with the ets:lookup(Table::atom() | ets:tid(),'pass') call in ets_insert_control_flow5.erl on line 12, the ets:lookup(Table::atom() | ets:tid(),'pass') call in ets_insert_control_flow5.erl on line 13
diff --git a/lib/dialyzer/test/race_SUITE_data/results/ets_insert_param b/lib/dialyzer/test/race_SUITE_data/results/ets_insert_param
index 58f934a190..6a34337a2c 100644
--- a/lib/dialyzer/test/race_SUITE_data/results/ets_insert_param
+++ b/lib/dialyzer/test/race_SUITE_data/results/ets_insert_param
@@ -1,5 +1,5 @@
-ets_insert_param.erl:13: The call ets:insert(Table::atom() | tid(),{'welcome_msg',[any(),...]}) might have an unintended effect due to a possible race condition caused by its combination with the ets:lookup(Table::atom() | tid(),'welcome_msg') call in ets_insert_param.erl on line 10
-ets_insert_param.erl:14: The call ets:insert(Table::atom() | tid(),{'pass',[pos_integer()]}) might have an unintended effect due to a possible race condition caused by its combination with the ets:lookup(Table::atom() | tid(),'pass') call in ets_insert_param.erl on line 14, the ets:lookup(Table::atom() | tid(),'pass') call in ets_insert_param.erl on line 15
-ets_insert_param.erl:17: The call ets:insert(Table::atom() | tid(),{'welcome_msg',[any(),...]}) might have an unintended effect due to a possible race condition caused by its combination with the ets:lookup(Table::atom() | tid(),'welcome_msg') call in ets_insert_param.erl on line 10
-ets_insert_param.erl:18: The call ets:insert(Table::atom() | tid(),{'pass',[pos_integer()]}) might have an unintended effect due to a possible race condition caused by its combination with the ets:lookup(Table::atom() | tid(),'pass') call in ets_insert_param.erl on line 18
+ets_insert_param.erl:13: The call ets:insert(Table::atom() | ets:tid(),{'welcome_msg',[any(),...]}) might have an unintended effect due to a possible race condition caused by its combination with the ets:lookup(Table::atom() | ets:tid(),'welcome_msg') call in ets_insert_param.erl on line 10
+ets_insert_param.erl:14: The call ets:insert(Table::atom() | ets:tid(),{'pass',[pos_integer()]}) might have an unintended effect due to a possible race condition caused by its combination with the ets:lookup(Table::atom() | ets:tid(),'pass') call in ets_insert_param.erl on line 14, the ets:lookup(Table::atom() | ets:tid(),'pass') call in ets_insert_param.erl on line 15
+ets_insert_param.erl:17: The call ets:insert(Table::atom() | ets:tid(),{'welcome_msg',[any(),...]}) might have an unintended effect due to a possible race condition caused by its combination with the ets:lookup(Table::atom() | ets:tid(),'welcome_msg') call in ets_insert_param.erl on line 10
+ets_insert_param.erl:18: The call ets:insert(Table::atom() | ets:tid(),{'pass',[pos_integer()]}) might have an unintended effect due to a possible race condition caused by its combination with the ets:lookup(Table::atom() | ets:tid(),'pass') call in ets_insert_param.erl on line 18
diff --git a/lib/dialyzer/test/small_SUITE_data/dialyzer_options b/lib/dialyzer/test/small_SUITE_data/dialyzer_options
index 50991c9bc5..0d91699e4d 100644
--- a/lib/dialyzer/test/small_SUITE_data/dialyzer_options
+++ b/lib/dialyzer/test/small_SUITE_data/dialyzer_options
@@ -1 +1 @@
-{dialyzer_options, []}.
+{dialyzer_options, [{warnings, [no_unknown]}]}.
diff --git a/lib/dialyzer/test/small_SUITE_data/results/contracts_with_subtypes b/lib/dialyzer/test/small_SUITE_data/results/contracts_with_subtypes
index 173ff3a9f1..fbdd182358 100644
--- a/lib/dialyzer/test/small_SUITE_data/results/contracts_with_subtypes
+++ b/lib/dialyzer/test/small_SUITE_data/results/contracts_with_subtypes
@@ -1,27 +1,28 @@
contracts_with_subtypes.erl:106: The call contracts_with_subtypes:rec_arg({'a','b'}) breaks the contract (Arg) -> 'ok' when is_subtype(Arg,{'a',A} | {'b',B}), is_subtype(A,'a' | {'b',B}), is_subtype(B,'b' | {'a',A})
contracts_with_subtypes.erl:107: The call contracts_with_subtypes:rec_arg({'b','a'}) breaks the contract (Arg) -> 'ok' when is_subtype(Arg,{'a',A} | {'b',B}), is_subtype(A,'a' | {'b',B}), is_subtype(B,'b' | {'a',A})
-contracts_with_subtypes.erl:108: The call contracts_with_subtypes:rec_arg({'a',{'b','a'}}) breaks the contract (Arg) -> 'ok' when is_subtype(Arg,{'a',A} | {'b',B}), is_subtype(A,'a' | {'b',B}), is_subtype(B,'b' | {'a',A})
contracts_with_subtypes.erl:109: The call contracts_with_subtypes:rec_arg({'b',{'a','b'}}) breaks the contract (Arg) -> 'ok' when is_subtype(Arg,{'a',A} | {'b',B}), is_subtype(A,'a' | {'b',B}), is_subtype(B,'b' | {'a',A})
-contracts_with_subtypes.erl:110: The call contracts_with_subtypes:rec_arg({'a',{'b',{'a','b'}}}) breaks the contract (Arg) -> 'ok' when is_subtype(Arg,{'a',A} | {'b',B}), is_subtype(A,'a' | {'b',B}), is_subtype(B,'b' | {'a',A})
-contracts_with_subtypes.erl:111: The call contracts_with_subtypes:rec_arg({'b',{'a',{'b','a'}}}) breaks the contract (Arg) -> 'ok' when is_subtype(Arg,{'a',A} | {'b',B}), is_subtype(A,'a' | {'b',B}), is_subtype(B,'b' | {'a',A})
-contracts_with_subtypes.erl:142: The pattern 1 can never match the type string()
-contracts_with_subtypes.erl:145: The pattern 'alpha' can never match the type {'ok',_} | {'ok',_,string()}
-contracts_with_subtypes.erl:147: The pattern 42 can never match the type {'ok',_} | {'ok',_,string()}
-contracts_with_subtypes.erl:163: The pattern 'alpha' can never match the type {'ok',X}
-contracts_with_subtypes.erl:165: The pattern 42 can never match the type {'ok',X}
-contracts_with_subtypes.erl:183: The pattern 'alpha' can never match the type {'ok',X}
-contracts_with_subtypes.erl:185: The pattern 42 can never match the type {'ok',X}
-contracts_with_subtypes.erl:202: The pattern 1 can never match the type string()
-contracts_with_subtypes.erl:205: The pattern {'ok', _} can never match the type {'ok',X,string()}
-contracts_with_subtypes.erl:206: The pattern 'alpha' can never match the type {'ok',X,string()}
-contracts_with_subtypes.erl:207: The pattern {'ok', 42} can never match the type {'ok',X,string()}
-contracts_with_subtypes.erl:208: The pattern 42 can never match the type {'ok',X,string()}
-contracts_with_subtypes.erl:234: Function flat_ets_new_t/0 has no local return
-contracts_with_subtypes.erl:235: The call contracts_with_subtypes:flat_ets_new(12,[]) breaks the contract (Name,Options) -> atom() when is_subtype(Name,atom()), is_subtype(Options,[Option]), is_subtype(Option,'set' | 'ordered_set' | 'bag' | 'duplicate_bag' | 'public' | 'protected' | 'private' | 'named_table' | {'keypos',integer()} | {'heir',pid(),term()} | {'heir','none'} | {'write_concurrency',boolean()} | {'read_concurrency',boolean()} | 'compressed')
+contracts_with_subtypes.erl:135: The call contracts_with_subtypes:rec2({'a','b'}) breaks the contract (Arg) -> 'ok' when is_subtype(Arg,ab())
+contracts_with_subtypes.erl:136: The call contracts_with_subtypes:rec2({'b','a'}) breaks the contract (Arg) -> 'ok' when is_subtype(Arg,ab())
+contracts_with_subtypes.erl:137: The call contracts_with_subtypes:rec2({'a',{'b','a'}}) breaks the contract (Arg) -> 'ok' when is_subtype(Arg,ab())
+contracts_with_subtypes.erl:138: The call contracts_with_subtypes:rec2({'b',{'a','b'}}) breaks the contract (Arg) -> 'ok' when is_subtype(Arg,ab())
+contracts_with_subtypes.erl:171: The pattern 1 can never match the type string()
+contracts_with_subtypes.erl:174: The pattern 'alpha' can never match the type {'ok',_} | {'ok',_,string()}
+contracts_with_subtypes.erl:176: The pattern 42 can never match the type {'ok',_} | {'ok',_,string()}
+contracts_with_subtypes.erl:192: The pattern 'alpha' can never match the type {'ok',_}
+contracts_with_subtypes.erl:194: The pattern 42 can never match the type {'ok',_}
+contracts_with_subtypes.erl:212: The pattern 'alpha' can never match the type {'ok',_}
+contracts_with_subtypes.erl:214: The pattern 42 can never match the type {'ok',_}
+contracts_with_subtypes.erl:231: The pattern 1 can never match the type string()
+contracts_with_subtypes.erl:234: The pattern {'ok', _} can never match the type {'ok',_,string()}
+contracts_with_subtypes.erl:235: The pattern 'alpha' can never match the type {'ok',_,string()}
+contracts_with_subtypes.erl:236: The pattern {'ok', 42} can never match the type {'ok',_,string()}
+contracts_with_subtypes.erl:237: The pattern 42 can never match the type {'ok',_,string()}
contracts_with_subtypes.erl:23: Invalid type specification for function contracts_with_subtypes:extract2/0. The success typing is () -> 'something'
-contracts_with_subtypes.erl:261: Function factored_ets_new_t/0 has no local return
-contracts_with_subtypes.erl:262: The call contracts_with_subtypes:factored_ets_new(12,[]) breaks the contract (Name,Options) -> atom() when is_subtype(Name,atom()), is_subtype(Options,[Option]), is_subtype(Option,Type | Access | 'named_table' | {'keypos',Pos} | {'heir',Pid::pid(),HeirData} | {'heir','none'} | Tweaks), is_subtype(Type,type()), is_subtype(Access,access()), is_subtype(Tweaks,{'write_concurrency',boolean()} | {'read_concurrency',boolean()} | 'compressed'), is_subtype(Pos,pos_integer()), is_subtype(HeirData,term())
+contracts_with_subtypes.erl:263: Function flat_ets_new_t/0 has no local return
+contracts_with_subtypes.erl:264: The call contracts_with_subtypes:flat_ets_new(12,[]) breaks the contract (Name,Options) -> atom() when is_subtype(Name,atom()), is_subtype(Options,[Option]), is_subtype(Option,'set' | 'ordered_set' | 'bag' | 'duplicate_bag' | 'public' | 'protected' | 'private' | 'named_table' | {'keypos',integer()} | {'heir',pid(),term()} | {'heir','none'} | {'write_concurrency',boolean()} | {'read_concurrency',boolean()} | 'compressed')
+contracts_with_subtypes.erl:290: Function factored_ets_new_t/0 has no local return
+contracts_with_subtypes.erl:291: The call contracts_with_subtypes:factored_ets_new(12,[]) breaks the contract (Name,Options) -> atom() when is_subtype(Name,atom()), is_subtype(Options,[Option]), is_subtype(Option,Type | Access | 'named_table' | {'keypos',Pos} | {'heir',Pid::pid(),HeirData} | {'heir','none'} | Tweaks), is_subtype(Type,type()), is_subtype(Access,access()), is_subtype(Tweaks,{'write_concurrency',boolean()} | {'read_concurrency',boolean()} | 'compressed'), is_subtype(Pos,pos_integer()), is_subtype(HeirData,term())
contracts_with_subtypes.erl:77: The call contracts_with_subtypes:foo1(5) breaks the contract (Arg1) -> Res when is_subtype(Arg1,atom()), is_subtype(Res,atom())
contracts_with_subtypes.erl:78: The call contracts_with_subtypes:foo2(5) breaks the contract (Arg1) -> Res when is_subtype(Arg1,Arg2), is_subtype(Arg2,atom()), is_subtype(Res,atom())
contracts_with_subtypes.erl:79: The call contracts_with_subtypes:foo3(5) breaks the contract (Arg1) -> Res when is_subtype(Arg2,atom()), is_subtype(Arg1,Arg2), is_subtype(Res,atom())
diff --git a/lib/dialyzer/test/small_SUITE_data/results/contracts_with_subtypes2 b/lib/dialyzer/test/small_SUITE_data/results/contracts_with_subtypes2
new file mode 100644
index 0000000000..9f5433a13d
--- /dev/null
+++ b/lib/dialyzer/test/small_SUITE_data/results/contracts_with_subtypes2
@@ -0,0 +1,3 @@
+
+contracts_with_subtypes2.erl:18: Function t/0 has no local return
+contracts_with_subtypes2.erl:19: The call contracts_with_subtypes2:t({'a',{'b',{'c',{'d',{'e',{'g',3}}}}}}) breaks the contract (Arg) -> 'ok' when is_subtype(Arg,{'a',A}), is_subtype(A,{'b',B}), is_subtype(B,{'c',C}), is_subtype(C,{'d',D}), is_subtype(D,{'e',E}), is_subtype(E,{'f',_})
diff --git a/lib/dialyzer/test/small_SUITE_data/results/funs_from_outside b/lib/dialyzer/test/small_SUITE_data/results/funs_from_outside
new file mode 100644
index 0000000000..3e597ef1bc
--- /dev/null
+++ b/lib/dialyzer/test/small_SUITE_data/results/funs_from_outside
@@ -0,0 +1,7 @@
+
+funs_from_outside.erl:18: The pattern 'error' can never match the type {'ok','nothing' | 'something'}
+funs_from_outside.erl:32: Function run2/2 has no local return
+funs_from_outside.erl:35: Function testb/3 has no local return
+funs_from_outside.erl:41: The pattern 'error' can never match the type {'ok','nothing' | 'something'}
+funs_from_outside.erl:78: Function test2/1 has no local return
+funs_from_outside.erl:83: The pattern 'error' can never match the type 'ok'
diff --git a/lib/dialyzer/test/small_SUITE_data/results/invalid_spec_2 b/lib/dialyzer/test/small_SUITE_data/results/invalid_spec_2
new file mode 100644
index 0000000000..4565112ea0
--- /dev/null
+++ b/lib/dialyzer/test/small_SUITE_data/results/invalid_spec_2
@@ -0,0 +1,2 @@
+
+scala_user.erl:5: Invalid type specification for function scala_user:is_list/2. The success typing is (maybe_improper_list() | tuple(),_) -> boolean()
diff --git a/lib/dialyzer/test/small_SUITE_data/results/maps_difftype b/lib/dialyzer/test/small_SUITE_data/results/maps_difftype
new file mode 100644
index 0000000000..8980321135
--- /dev/null
+++ b/lib/dialyzer/test/small_SUITE_data/results/maps_difftype
@@ -0,0 +1,3 @@
+
+maps_difftype.erl:10: Function empty_mismatch/1 has no local return
+maps_difftype.erl:11: The pattern ~{}~ can never match the type tuple()
diff --git a/lib/dialyzer/test/small_SUITE_data/results/predef b/lib/dialyzer/test/small_SUITE_data/results/predef
new file mode 100644
index 0000000000..85e210d6e4
--- /dev/null
+++ b/lib/dialyzer/test/small_SUITE_data/results/predef
@@ -0,0 +1,8 @@
+
+predef.erl:19: Invalid type specification for function predef:array/1. The success typing is (array:array(_)) -> array:array(_)
+predef.erl:24: Invalid type specification for function predef:dict/1. The success typing is (dict:dict(_,_)) -> dict:dict(_,_)
+predef.erl:29: Invalid type specification for function predef:digraph/1. The success typing is (digraph:graph()) -> [any()]
+predef.erl:39: Invalid type specification for function predef:gb_set/1. The success typing is (gb_sets:set(_)) -> gb_sets:set(_)
+predef.erl:44: Invalid type specification for function predef:gb_tree/1. The success typing is (gb_trees:tree(_,_)) -> gb_trees:tree(_,_)
+predef.erl:49: Invalid type specification for function predef:queue/1. The success typing is (queue:queue(_)) -> queue:queue(_)
+predef.erl:54: Invalid type specification for function predef:set/1. The success typing is (sets:set(_)) -> sets:set(_)
diff --git a/lib/dialyzer/test/small_SUITE_data/results/record_construct b/lib/dialyzer/test/small_SUITE_data/results/record_construct
index c0110b144f..4c40fec298 100644
--- a/lib/dialyzer/test/small_SUITE_data/results/record_construct
+++ b/lib/dialyzer/test/small_SUITE_data/results/record_construct
@@ -1,6 +1,6 @@
record_construct.erl:15: Function t_opa/0 has no local return
-record_construct.erl:16: Record construction #r_opa{b::gb_set(),c::42,e::'false'} violates the declared type of field c::boolean()
+record_construct.erl:16: Record construction #r_opa{b::gb_sets:set(_),c::42,e::'false'} violates the declared type of field c::boolean()
record_construct.erl:20: Function t_rem/0 has no local return
record_construct.erl:21: Record construction #r_rem{a::'gazonk'} violates the declared type of field a::string()
record_construct.erl:6: Function t_loc/0 has no local return
diff --git a/lib/dialyzer/test/small_SUITE_data/src/contracts_with_subtypes.erl b/lib/dialyzer/test/small_SUITE_data/src/contracts_with_subtypes.erl
index d72138d509..d7dfd9752e 100644
--- a/lib/dialyzer/test/small_SUITE_data/src/contracts_with_subtypes.erl
+++ b/lib/dialyzer/test/small_SUITE_data/src/contracts_with_subtypes.erl
@@ -103,15 +103,44 @@ c(babb) -> rec_arg({b, {a, {b, b}}});
c(ababb) -> rec_arg({a, {b, {a, {b, b}}}});
c(babaa) -> rec_arg({b, {a, {b, {a, a}}}}).
-w(ab) -> rec_arg({a, b});
-w(ba) -> rec_arg({b, a});
-w(aba) -> rec_arg({a, {b, a}});
-w(bab) -> rec_arg({b, {a, b}});
-w(abab) -> rec_arg({a, {b, {a, b}}});
-w(baba) -> rec_arg({b, {a, {b, a}}});
+w(ab) -> rec_arg({a, b}); % breaks the contract
+w(ba) -> rec_arg({b, a}); % breaks the contract
+w(aba) -> rec_arg({a, {b, a}}); % no longer breaks the contract
+w(bab) -> rec_arg({b, {a, b}}); % breaks the contract
+w(abab) -> rec_arg({a, {b, {a, b}}}); % no longer breaks the contract
+w(baba) -> rec_arg({b, {a, {b, a}}}); % no longer breaks the contract
w(ababa) -> rec_arg({a, {b, {a, {b, a}}}});
w(babab) -> rec_arg({b, {a, {b, {a, b}}}}).
+%% For comparison: the same thing with types
+
+-type ab() :: {a, a()} | {b, b()}.
+-type a() :: a | {b, b()}.
+-type b() :: b | {a, a()}.
+
+-spec rec2(Arg) -> ok when
+ Arg :: ab().
+
+rec2(X) -> get(X).
+
+d(aa) -> rec2({a, a});
+d(bb) -> rec2({b, b});
+d(abb) -> rec2({a, {b, b}});
+d(baa) -> rec2({b, {a, a}});
+d(abaa) -> rec2({a, {b, {a, a}}});
+d(babb) -> rec2({b, {a, {b, b}}});
+d(ababb) -> rec2({a, {b, {a, {b, b}}}});
+d(babaa) -> rec2({b, {a, {b, {a, a}}}}).
+
+q(ab) -> rec2({a, b}); % breaks the contract
+q(ba) -> rec2({b, a}); % breaks the contract
+q(aba) -> rec2({a, {b, a}}); % breaks the contract
+q(bab) -> rec2({b, {a, b}}); % breaks the contract
+q(abab) -> rec2({a, {b, {a, b}}});
+q(baba) -> rec2({b, {a, {b, a}}});
+q(ababa) -> rec2({a, {b, {a, {b, a}}}});
+q(babab) -> rec2({b, {a, {b, {a, b}}}}).
+
%===============================================================================
-type dublo(X) :: {X, X}.
@@ -143,7 +172,7 @@ st(X) when is_atom(X) ->
_Other -> ok
end;
alpha -> bad;
- {ok, 42} -> bad;
+ {ok, 42} -> ok;
42 -> bad
end.
@@ -161,7 +190,7 @@ dt(X) when is_atom(X) ->
err2 -> ok;
{ok, X} -> ok;
alpha -> bad;
- {ok, 42} -> bad;
+ {ok, 42} -> ok;
42 -> bad
end.
@@ -181,7 +210,7 @@ dt2(X) when is_atom(X) ->
err2 -> ok;
{ok, X} -> ok;
alpha -> bad;
- {ok, 42} -> bad;
+ {ok, 42} -> ok;
42 -> bad
end.
diff --git a/lib/dialyzer/test/small_SUITE_data/src/contracts_with_subtypes2.erl b/lib/dialyzer/test/small_SUITE_data/src/contracts_with_subtypes2.erl
new file mode 100644
index 0000000000..d2f945b284
--- /dev/null
+++ b/lib/dialyzer/test/small_SUITE_data/src/contracts_with_subtypes2.erl
@@ -0,0 +1,40 @@
+-module(contracts_with_subtypes2).
+
+-compile(export_all).
+
+-behaviour(supervisor).
+
+-spec t(Arg) -> ok when
+ Arg :: {a, A},
+ A :: {b, B},
+ B :: {c, C},
+ C :: {d, D},
+ D :: {e, E},
+ E :: {f, _}.
+
+t(X) ->
+ get(X).
+
+t() ->
+ t({a, {b, {c, {d, {e, {g, 3}}}}}}). % breaks the contract
+
+%% This one should possibly result in warnings about unused variables.
+-spec l() -> ok when
+ X :: Y,
+ Y :: X.
+
+l() ->
+ ok.
+
+%% This is the example from seq12547 (ticket OTP-11798).
+%% There used to be a warning.
+
+-spec init(term()) -> Result when
+ Result :: {ok, {{supervisor:strategy(),
+ non_neg_integer(),
+ pos_integer()},
+ [supervisor:child_spec()]}}
+ | ignore.
+
+init(_) ->
+ foo:bar().
diff --git a/lib/dialyzer/test/small_SUITE_data/src/ddfs_master/common_types.hrl b/lib/dialyzer/test/small_SUITE_data/src/ddfs_master/common_types.hrl
new file mode 100644
index 0000000000..f362a06bca
--- /dev/null
+++ b/lib/dialyzer/test/small_SUITE_data/src/ddfs_master/common_types.hrl
@@ -0,0 +1,6 @@
+-type host() :: nonempty_string().
+-type path() :: nonempty_string().
+-type url() :: binary().
+
+% The host portion of a url, if available.
+-type url_host() :: host() | none.
diff --git a/lib/dialyzer/test/small_SUITE_data/src/ddfs_master/config.hrl b/lib/dialyzer/test/small_SUITE_data/src/ddfs_master/config.hrl
new file mode 100644
index 0000000000..8cab65fc9c
--- /dev/null
+++ b/lib/dialyzer/test/small_SUITE_data/src/ddfs_master/config.hrl
@@ -0,0 +1,148 @@
+
+-define(SECOND, 1000).
+-define(MINUTE, (60 * ?SECOND)).
+-define(HOUR, (60 * ?MINUTE)).
+-define(DAY, (24 * ?HOUR)).
+-define(MB, (1024 * 1024)).
+
+% Maximum length of tag/blob prefix
+-define(NAME_MAX, 511).
+
+% How long ddfs node startup can take. The most time-consuming part
+% is the scanning of the tag objects in the node's DDFS volumes.
+-define(NODE_STARTUP, (1 * ?MINUTE)).
+
+% How long to wait on the master for replies from nodes.
+-define(NODE_TIMEOUT, (10 * ?SECOND)).
+
+% How long to wait for a reply from an operation coordinated by the
+% master that accesses nodes. This value should be larger than
+% NODE_TIMEOUT.
+-define(NODEOP_TIMEOUT, (1 * ?MINUTE)).
+
+% The minimum amount of free space a node must have, to be considered
+% a primary candidate host for a new blob.
+-define(MIN_FREE_SPACE, (1024 * ?MB)).
+
+% The maximum number of active HTTP connections on a system (this
+% applies separately for GET and PUT operations).
+-define(HTTP_MAX_ACTIVE, 3).
+
+% The maximum number of waiting HTTP connections to queue up on a busy system.
+-define(HTTP_QUEUE_LENGTH, 100).
+
+% The maximum number of simultaneous HTTP connections. Note that
+% HTTP_MAX_CONNS * 2 * 2 + 32 < Maximum number of file descriptors, where
+% 2 = Get and put, 2 = two FDs required for each connection (connection
+% itself + a file it accesses), 32 = a guess how many extra fds is needed.
+-define(HTTP_MAX_CONNS, 128).
+
+% How long to keep a PUT request in queue if the system is busy.
+-define(PUT_WAIT_TIMEOUT, (1 * ?MINUTE)).
+
+% How long to keep a GET request in queue if the system is busy.
+-define(GET_WAIT_TIMEOUT, (1 * ?MINUTE)).
+
+% An unused loaded tag expires in TAG_EXPIRES milliseconds. Note that
+% if TAG_EXPIRES is not smaller than GC_INTERVAL, tags will never
+% expire from the memory cache and will always take up memory.
+-define(TAG_EXPIRES, (10 * ?HOUR)).
+
+% How often the master's cache of all known tag names is refreshed.
+% This refresh is only needed to purge deleted tags eventually from
+% the tag cache. It doesn't harm to have a long interval.
+-define(TAG_CACHE_INTERVAL, (10 * ?MINUTE)).
+
+% How soon a tag object initialized in memory expires if it's content
+% cannot be fetched from the cluster.
+-define(TAG_EXPIRES_ONERROR, (1 * ?SECOND)).
+
+% How often a DDFS node should refresh its tag cache from disk.
+-define(FIND_TAGS_INTERVAL, ?DAY).
+
+% How often buffered (delayed) updates to a tag need to be
+% flushed. Tradeoff: The longer the interval, the more updates are
+% bundled in a single commit. On the other hand, in the worst case
+% the requester has to wait for the full interval before getting a
+% reply. A long interval also increases the likelihood that the server
+% crashes before the commit has finished successfully, making requests
+% more unreliable.
+-define(DELAYED_FLUSH_INTERVAL, (1 * ?SECOND)).
+
+% How long to wait between garbage collection runs.
+-define(GC_INTERVAL, ?DAY).
+
+% Max duration for a GC run. This should be smaller than
+% min(ORPHANED_{BLOB,TAG}_EXPIRES).
+-define(GC_MAX_DURATION, (3 * ?DAY)).
+
+% How long to wait after startup for cluster to stabilize before
+% starting the first GC run.
+-define(GC_DEFAULT_INITIAL_WAIT, (5 * ?MINUTE)).
+
+% The longest potential interval between messages in the GC protocol;
+% used to ensure GC makes forward progress. This can be set to the
+% estimated time to traverse all the volumes on a DDFS node.
+-define(GC_PROGRESS_INTERVAL, (30 * ?MINUTE)).
+
+% Number of extra replicas (i.e. lost replicas recovered during GC) to
+% allow before deleting extra replicas.
+-define(NUM_EXTRA_REPLICAS, 1).
+
+% Permissions for files backing blobs and tags.
+-define(FILE_MODE, 8#00400).
+
+% How often to check available disk space in ddfs_node.
+-define(DISKSPACE_INTERVAL, (10 * ?SECOND)).
+
+% The maximum size of payloads of HTTP requests to the /ddfs/tag/
+% prefix.
+-define(MAX_TAG_BODY_SIZE, (512 * ?MB)).
+
+% Tag attribute names and values have a limited size, and there
+% can be only a limited number of them.
+-define(MAX_TAG_ATTRIB_NAME_SIZE, 1024).
+-define(MAX_TAG_ATTRIB_VALUE_SIZE, 1024).
+-define(MAX_NUM_TAG_ATTRIBS, 1000).
+
+% How long HTTP requests that perform tag updates should wait to
+% finish (a long time).
+-define(TAG_UPDATE_TIMEOUT, ?DAY).
+
+% Timeout for re-replicating a single blob over HTTP PUT. This
+% depends on the largest blobs hosted by DDFS, and the speed of the
+% cluster network.
+-define(GC_PUT_TIMEOUT, (180 * ?MINUTE)).
+
+% Delete !partial files after this many milliseconds.
+-define(PARTIAL_EXPIRES, ?DAY).
+
+% When orphaned blob can be deleted. This should be large enough that
+% you can upload all the new blobs of a tag and perform the tag update
+% within this time.
+-define(ORPHANED_BLOB_EXPIRES, (5 * ?DAY)).
+
+% When orphaned tag can be deleted.
+-define(ORPHANED_TAG_EXPIRES, (5 * ?DAY)).
+
+% How long a tag has to stay on the deleted list before
+% we can permanently forget it, after all known instances
+% of the tag object have been removed. This quarantine period
+% ensures that a node that was temporarily unavailable
+% and reactivates can't resurrect deleted tags. You
+% must ensure that all temporarily inactive nodes
+% are reactivated (or cleaned) within the ?DELETED_TAG_EXPIRES
+% time frame.
+%
+% This value _must_ be larger than the other time-related DDFS
+% parameters listed in this file. In particular, it must be larger
+% than ORPHANED_TAG_EXPIRES.
+-define(DELETED_TAG_EXPIRES, (30 * ?DAY)).
+
+% How many times a tag operation should be retried before aborting.
+-define(MAX_TAG_OP_RETRIES, 3).
+
+% How long to wait before timing out a tag retrieval. This should be
+% large enough to read a large tag object off the disk and send it
+% over the network.
+-define(GET_TAG_TIMEOUT, (5 * ?MINUTE)).
diff --git a/lib/dialyzer/test/small_SUITE_data/src/ddfs_master/ddfs.hrl b/lib/dialyzer/test/small_SUITE_data/src/ddfs_master/ddfs.hrl
new file mode 100644
index 0000000000..e43ec23fe1
--- /dev/null
+++ b/lib/dialyzer/test/small_SUITE_data/src/ddfs_master/ddfs.hrl
@@ -0,0 +1,9 @@
+-type volume_name() :: nonempty_string().
+
+% Diskinfo is {FreeSpace, UsedSpace}.
+-type diskinfo() :: {non_neg_integer(), non_neg_integer()}.
+-type volume() :: {diskinfo(), volume_name()}.
+
+-type object_type() :: 'blob' | 'tag'.
+-type object_name() :: binary().
+-type taginfo() :: {erlang:timestamp(), volume_name()}.
diff --git a/lib/dialyzer/test/small_SUITE_data/src/ddfs_master/ddfs_gc.hrl b/lib/dialyzer/test/small_SUITE_data/src/ddfs_master/ddfs_gc.hrl
new file mode 100644
index 0000000000..dc43f7586b
--- /dev/null
+++ b/lib/dialyzer/test/small_SUITE_data/src/ddfs_master/ddfs_gc.hrl
@@ -0,0 +1,17 @@
+-type local_object() :: {object_name(), node()}.
+-type phase() :: 'start' | 'build_map' | 'map_wait' | 'gc'
+ | 'rr_blobs' | 'rr_blobs_wait' | 'rr_tags'.
+-type protocol_msg() :: {'check_blob', object_name()} | 'start_gc' | 'end_rr'.
+
+-type blob_update() :: {object_name(), 'filter' | [url()]}.
+
+-type check_blob_result() :: 'false' | {'true', volume_name()}.
+
+% GC statistics
+
+% {Files, Bytes}
+-type gc_stat() :: {non_neg_integer(), non_neg_integer()}.
+% {Kept, Deleted}
+-type obj_stats() :: {gc_stat(), gc_stat()}.
+% {Tags, Blobs}.
+-type gc_run_stats() :: {obj_stats(), obj_stats()}.
diff --git a/lib/dialyzer/test/small_SUITE_data/src/ddfs_master/ddfs_master.erl b/lib/dialyzer/test/small_SUITE_data/src/ddfs_master/ddfs_master.erl
new file mode 100644
index 0000000000..2be2773dc5
--- /dev/null
+++ b/lib/dialyzer/test/small_SUITE_data/src/ddfs_master/ddfs_master.erl
@@ -0,0 +1,531 @@
+-module(ddfs_master).
+-behaviour(gen_server).
+
+-export([start_link/0]).
+-export([get_tags/1, get_tags/3,
+ get_nodeinfo/1,
+ get_read_nodes/0,
+ get_hosted_tags/1,
+ gc_blacklist/0, gc_blacklist/1,
+ gc_stats/0,
+ choose_write_nodes/3,
+ new_blob/4, new_blob/5,
+ safe_gc_blacklist/0, safe_gc_blacklist/1,
+ refresh_tag_cache/0,
+ tag_notify/2,
+ tag_operation/2, tag_operation/3,
+ update_gc_stats/1,
+ update_nodes/1
+ ]).
+-export([init/1,
+ handle_call/3,
+ handle_cast/2,
+ handle_info/2,
+ terminate/2,
+ code_change/3]).
+
+-define(WEB_PORT, 8011).
+
+-compile(nowarn_deprecated_type).
+
+-include("common_types.hrl").
+-include("gs_util.hrl").
+-include("config.hrl").
+-include("ddfs.hrl").
+-include("ddfs_tag.hrl").
+-include("ddfs_gc.hrl").
+
+-type node_info() :: {node(), {non_neg_integer(), non_neg_integer()}}.
+-type gc_stats() :: none | gc_run_stats().
+
+-record(state, {tags = gb_trees:empty() :: gb_trees:tree(),
+ tag_cache = false :: false | gb_sets:set(),
+ cache_refresher :: pid(),
+
+ nodes = [] :: [node_info()],
+ write_blacklist = [] :: [node()],
+ read_blacklist = [] :: [node()],
+ gc_blacklist = [] :: [node()],
+ safe_gc_blacklist = gb_sets:empty() :: gb_sets:set(),
+ gc_stats = none :: none | {gc_stats(), erlang:timestamp()}}).
+-type state() :: #state{}.
+-type replyto() :: {pid(), reference()}.
+
+-export_type([gc_stats/0, node_info/0]).
+
+%% ===================================================================
+%% API functions
+
+-spec start_link() -> {ok, pid()}.
+start_link() ->
+ lager:info("DDFS master starts"),
+ case gen_server:start_link({local, ?MODULE}, ?MODULE, [], []) of
+ {ok, Server} -> {ok, Server};
+ {error, {already_started, Server}} -> {ok, Server}
+ end.
+
+-spec tag_operation(term(), tagname()) -> term().
+tag_operation(Op, Tag) ->
+ gen_server:call(?MODULE, {tag, Op, Tag}).
+-spec tag_operation(term(), tagname(), non_neg_integer() | infinity) ->
+ term().
+tag_operation(Op, Tag, Timeout) ->
+ gen_server:call(?MODULE, {tag, Op, Tag}, Timeout).
+
+-spec tag_notify(term(), tagname()) -> ok.
+tag_notify(Op, Tag) ->
+ gen_server:cast(?MODULE, {tag_notify, Op, Tag}).
+
+-spec get_nodeinfo(all) -> {ok, [node_info()]}.
+get_nodeinfo(all) ->
+ gen_server:call(?MODULE, {get_nodeinfo, all}).
+
+-spec get_read_nodes() -> {ok, [node()], non_neg_integer()} | {error, term()}.
+get_read_nodes() ->
+ gen_server:call(?MODULE, get_read_nodes, infinity).
+
+-spec gc_blacklist() -> {ok, [node()]}.
+gc_blacklist() ->
+ gen_server:call(?MODULE, gc_blacklist).
+
+-spec gc_blacklist([node()]) -> ok.
+gc_blacklist(Nodes) ->
+ gen_server:cast(?MODULE, {gc_blacklist, Nodes}).
+
+-spec gc_stats() -> {ok, none | {gc_stats(), erlang:timestamp()}} | {error, term()}.
+gc_stats() ->
+ gen_server:call(?MODULE, gc_stats).
+
+-spec get_hosted_tags(host()) -> {ok, [tagname()]} | {error, term()}.
+get_hosted_tags(Host) ->
+ gen_server:call(?MODULE, {get_hosted_tags, Host}).
+
+-spec choose_write_nodes(non_neg_integer(), [node()], [node()]) -> {ok, [node()]}.
+choose_write_nodes(K, Include, Exclude) ->
+ gen_server:call(?MODULE, {choose_write_nodes, K, Include, Exclude}).
+
+-spec get_tags(gc) -> {ok, [tagname()], [node()]} | too_many_failed_nodes;
+ (safe) -> {ok, [binary()]} | too_many_failed_nodes.
+get_tags(Mode) ->
+ get_tags(?MODULE, Mode, ?GET_TAG_TIMEOUT).
+
+-spec get_tags(server(), gc, non_neg_integer()) ->
+ {ok, [tagname()], [node()]} | too_many_failed_nodes;
+ (server(), safe, non_neg_integer()) ->
+ {ok, [binary()]} | too_many_failed_nodes.
+get_tags(Server, Mode, Timeout) ->
+ disco_profile:timed_run(
+ fun() -> gen_server:call(Server, {get_tags, Mode}, Timeout) end,
+ get_tags).
+
+-spec new_blob(string()|object_name(), non_neg_integer(), [node()], [node()]) ->
+ too_many_replicas | {ok, [nonempty_string()]}.
+new_blob(Obj, K, Include, Exclude) ->
+ gen_server:call(?MODULE, {new_blob, Obj, K, Include, Exclude}, infinity).
+
+-spec new_blob(server(), string()|object_name(), non_neg_integer(), [node()], [node()]) ->
+ too_many_replicas | {ok, [nonempty_string()]}.
+new_blob(Master, Obj, K, Include, Exclude) ->
+ gen_server:call(Master, {new_blob, Obj, K, Include, Exclude}, infinity).
+
+-spec safe_gc_blacklist() -> {ok, [node()]} | {error, term()}.
+safe_gc_blacklist() ->
+ gen_server:call(?MODULE, safe_gc_blacklist).
+
+-spec safe_gc_blacklist(gb_sets:set()) -> ok.
+safe_gc_blacklist(SafeGCBlacklist) ->
+ gen_server:cast(?MODULE, {safe_gc_blacklist, SafeGCBlacklist}).
+
+-spec update_gc_stats(gc_run_stats()) -> ok.
+update_gc_stats(Stats) ->
+ gen_server:cast(?MODULE, {update_gc_stats, Stats}).
+
+-type nodes_update() :: [{node(), boolean(), boolean()}].
+-spec update_nodes(nodes_update()) -> ok.
+update_nodes(DDFSNodes) ->
+ gen_server:cast(?MODULE, {update_nodes, DDFSNodes}).
+
+-spec update_nodestats(gb_trees:tree()) -> ok.
+update_nodestats(NewNodes) ->
+ gen_server:cast(?MODULE, {update_nodestats, NewNodes}).
+
+-spec update_tag_cache(gb_sets:set()) -> ok.
+update_tag_cache(TagCache) ->
+ gen_server:cast(?MODULE, {update_tag_cache, TagCache}).
+
+-spec refresh_tag_cache() -> ok.
+refresh_tag_cache() ->
+ gen_server:cast(?MODULE, refresh_tag_cache).
+
+%% ===================================================================
+%% gen_server callbacks
+
+-spec init(_) -> gs_init().
+init(_Args) ->
+ _ = [disco_profile:new_histogram(Name)
+ || Name <- [get_tags, do_get_tags_all, do_get_tags_filter,
+ do_get_tags_safe, do_get_tags_gc]],
+ spawn_link(fun() -> monitor_diskspace() end),
+ spawn_link(fun() -> ddfs_gc:start_gc(disco:get_setting("DDFS_DATA")) end),
+ Refresher = spawn_link(fun() -> refresh_tag_cache_proc() end),
+ put(put_port, disco:get_setting("DDFS_PUT_PORT")),
+ {ok, #state{cache_refresher = Refresher}}.
+
+-type choose_write_nodes_msg() :: {choose_write_nodes, non_neg_integer(), [node()], [node()]}.
+-type new_blob_msg() :: {new_blob, string() | object_name(), non_neg_integer(), [node()]}.
+-type tag_msg() :: {tag, ddfs_tag:call_msg(), tagname()}.
+-spec handle_call(dbg_state_msg(), from(), state()) ->
+ gs_reply(state());
+ ({get_nodeinfo, all}, from(), state()) ->
+ gs_reply({ok, [node_info()]});
+ (get_read_nodes, from(), state()) ->
+ gs_reply({ok, [node()], non_neg_integer});
+ (gc_blacklist, from(), state()) ->
+ gs_reply({ok, [node()]});
+ (gc_stats, from(), state()) ->
+ gs_reply({ok, gc_stats(), erlang:timestamp()});
+ (choose_write_nodes_msg(), from(), state()) ->
+ gs_reply({ok, [node()]});
+ (new_blob_msg(), from(), state()) ->
+ gs_reply(new_blob_result());
+ (tag_msg(), from(), state()) ->
+ gs_reply({error, nonodes}) | gs_noreply();
+ ({get_tags, gc | safe}, from(), state()) ->
+ gs_noreply();
+ ({get_hosted_tags, host()}, from(), state()) ->
+ gs_noreply();
+ (safe_gc_blacklist, from(), state()) ->
+ gs_reply({ok, [node()]}).
+handle_call(dbg_get_state, _, S) ->
+ {reply, S, S};
+
+handle_call({get_nodeinfo, all}, _From, #state{nodes = Nodes} = S) ->
+ {reply, {ok, Nodes}, S};
+
+handle_call(get_read_nodes, _F, #state{nodes = Nodes, read_blacklist = RB} = S) ->
+ {reply, do_get_readable_nodes(Nodes, RB), S};
+
+handle_call(gc_blacklist, _F, #state{gc_blacklist = Nodes} = S) ->
+ {reply, {ok, Nodes}, S};
+
+handle_call(gc_stats, _F, #state{gc_stats = Stats} = S) ->
+ {reply, {ok, Stats}, S};
+
+handle_call({choose_write_nodes, K, Include, Exclude}, _,
+ #state{nodes = N, write_blacklist = WBL, gc_blacklist = GBL} = S) ->
+ BL = lists:umerge(WBL, GBL),
+ {reply, do_choose_write_nodes(N, K, Include, Exclude, BL), S};
+
+handle_call({new_blob, Obj, K, Include, Exclude}, _,
+ #state{nodes = N, gc_blacklist = GBL, write_blacklist = WBL} = S) ->
+ BL = lists:umerge(WBL, GBL),
+ {reply, do_new_blob(Obj, K, Include, Exclude, BL, N), S};
+
+handle_call({tag, _M, _Tag}, _From, #state{nodes = []} = S) ->
+ {reply, {error, no_nodes}, S};
+
+handle_call({tag, M, Tag}, From, S) ->
+ {noreply, do_tag_request(M, Tag, From, S)};
+
+handle_call({get_tags, Mode}, From, #state{nodes = Nodes} = S) ->
+ spawn(fun() ->
+ gen_server:reply(From, do_get_tags(Mode, [N || {N, _} <- Nodes]))
+ end),
+ {noreply, S};
+
+handle_call({get_hosted_tags, Host}, From, S) ->
+ spawn(fun() -> gen_server:reply(From, ddfs_gc:hosted_tags(Host)) end),
+ {noreply, S};
+
+handle_call(safe_gc_blacklist, _From, #state{safe_gc_blacklist = SBL} = S) ->
+ {reply, {ok, gb_sets:to_list(SBL)}, S}.
+
+-spec handle_cast({tag_notify, ddfs_tag:cast_msg(), tagname()}
+ | {gc_blacklist, [node()]}
+ | {safe_gc_blacklist, gb_sets:set()}
+ | {update_gc_stats, gc_stats()}
+ | {update_tag_cache, gb_sets:set()}
+ | refresh_tag_cache
+ | {update_nodes, nodes_update()}
+ | {update_nodestats, gb_trees:tree()},
+ state()) -> gs_noreply().
+handle_cast({tag_notify, M, Tag}, S) ->
+ {noreply, do_tag_notify(M, Tag, S)};
+
+handle_cast({gc_blacklist, Nodes}, #state{safe_gc_blacklist = SBL} = S) ->
+ BLSet = gb_sets:from_list(Nodes),
+ NewSBL = gb_sets:intersection(BLSet, SBL),
+ {noreply, S#state{gc_blacklist = gb_sets:to_list(BLSet),
+ safe_gc_blacklist = NewSBL}};
+
+handle_cast({safe_gc_blacklist, SafeBlacklist}, #state{gc_blacklist = BL} = S) ->
+ SBL = gb_sets:intersection(SafeBlacklist, gb_sets:from_list(BL)),
+ {noreply, S#state{safe_gc_blacklist = SBL}};
+
+handle_cast({update_gc_stats, Stats}, S) ->
+ {noreply, S#state{gc_stats = {Stats, now()}}};
+
+handle_cast({update_tag_cache, TagCache}, S) ->
+ {noreply, S#state{tag_cache = TagCache}};
+
+handle_cast(refresh_tag_cache, #state{cache_refresher = Refresher} = S) ->
+ Refresher ! refresh,
+ {noreply, S};
+
+handle_cast({update_nodes, NewNodes}, S) ->
+ {noreply, do_update_nodes(NewNodes, S)};
+
+handle_cast({update_nodestats, NewNodes}, S) ->
+ {noreply, do_update_nodestats(NewNodes, S)}.
+
+-spec handle_info({'DOWN', _, _, pid(), _}, state()) -> gs_noreply().
+handle_info({'DOWN', _, _, Pid, _}, S) ->
+ {noreply, do_tag_exit(Pid, S)}.
+
+%% ===================================================================
+%% gen_server callback stubs
+
+-spec terminate(term(), state()) -> ok.
+terminate(Reason, _State) ->
+ lager:warning("DDFS master died: ~p", [Reason]).
+
+-spec code_change(term(), state(), term()) -> {ok, state()}.
+code_change(_OldVsn, State, _Extra) -> {ok, State}.
+
+%% ===================================================================
+%% internal functions
+
+-spec do_get_readable_nodes([node_info()], [node()]) ->
+ {ok, [node()], non_neg_integer()}.
+do_get_readable_nodes(Nodes, ReadBlacklist) ->
+ NodeSet = gb_sets:from_ordset(lists:sort([Node || {Node, _} <- Nodes])),
+ BlackSet = gb_sets:from_ordset(ReadBlacklist),
+ ReadableNodeSet = gb_sets:subtract(NodeSet, BlackSet),
+ {ok, gb_sets:to_list(ReadableNodeSet), gb_sets:size(BlackSet)}.
+
+-spec do_choose_write_nodes([node_info()], non_neg_integer(), [node()], [node()], [node()]) ->
+ {ok, [node()]}.
+do_choose_write_nodes(Nodes, K, Include, Exclude, BlackList) ->
+ % Include is the list of nodes that must be included
+ %
+ % Node selection algorithm:
+ % 1. try to choose K nodes randomly from all the nodes which have
+ % more than ?MIN_FREE_SPACE bytes free space available and which
+ % are not excluded or blacklisted.
+ % 2. if K nodes cannot be found this way, choose the K emptiest
+ % nodes which are not excluded or blacklisted.
+ Primary = ([N || {N, {Free, _Total}} <- Nodes, Free > ?MIN_FREE_SPACE / 1024]
+ -- (Exclude ++ BlackList)),
+ if length(Primary) >= K ->
+ {ok, Include ++ disco_util:choose_random(Primary -- Include , K - length(Include))};
+ true ->
+ Preferred = [N || {N, _} <- lists:reverse(lists:keysort(2, Nodes))],
+ Secondary = Include ++ lists:sublist(Preferred -- (Include ++ Exclude ++ BlackList),
+ K - length(Include)),
+ {ok, Secondary}
+ end.
+
+-type new_blob_result() :: too_many_replicas | {ok, [nonempty_string()]}.
+-spec do_new_blob(string()|object_name(), non_neg_integer(), [node()], [node()], [node()], [node_info()]) ->
+ new_blob_result().
+do_new_blob(_Obj, K, _Include, _Exclude, _BlackList, Nodes) when K > length(Nodes) ->
+ too_many_replicas;
+do_new_blob(Obj, K, Include, Exclude, BlackList, Nodes) ->
+ {ok, WriteNodes} = do_choose_write_nodes(Nodes, K, Include, Exclude, BlackList),
+ Urls = [["http://", disco:host(N), ":", get(put_port), "/ddfs/", Obj]
+ || N <- WriteNodes],
+ {ok, Urls}.
+
+% Tag request: Start a new tag server if one doesn't exist already. Forward
+% the request to the tag server.
+
+-spec get_tag_pid(tagname(), gb_trees:tree(), false | gb_sets:set()) ->
+ {pid(), gb_trees:tree()}.
+get_tag_pid(Tag, Tags, Cache) ->
+ case gb_trees:lookup(Tag, Tags) of
+ none ->
+ NotFound = (Cache =/= false
+ andalso not gb_sets:is_element(Tag, Cache)),
+ {ok, Server} = ddfs_tag:start(Tag, NotFound),
+ erlang:monitor(process, Server),
+ {Server, gb_trees:insert(Tag, Server, Tags)};
+ {value, P} ->
+ {P, Tags}
+ end.
+
+-spec do_tag_request(term(), tagname(), replyto(), state()) ->
+ state().
+do_tag_request(M, Tag, From, #state{tags = Tags, tag_cache = Cache} = S) ->
+ {Pid, TagsN} = get_tag_pid(Tag, Tags, Cache),
+ gen_server:cast(Pid, {M, From}),
+ S#state{tags = TagsN,
+ tag_cache = Cache =/= false andalso gb_sets:add(Tag, Cache)}.
+
+-spec do_tag_notify(term(), tagname(), state()) -> state().
+do_tag_notify(M, Tag, #state{tags = Tags, tag_cache = Cache} = S) ->
+ {Pid, TagsN} = get_tag_pid(Tag, Tags, Cache),
+ gen_server:cast(Pid, {notify, M}),
+ S#state{tags = TagsN,
+ tag_cache = Cache =/= false andalso gb_sets:add(Tag, Cache)}.
+
+-spec do_update_nodes(nodes_update(), state()) -> state().
+do_update_nodes(NewNodes, #state{nodes = Nodes, tags = Tags} = S) ->
+ WriteBlacklist = lists:sort([Node || {Node, false, _} <- NewNodes]),
+ ReadBlacklist = lists:sort([Node || {Node, _, false} <- NewNodes]),
+ OldNodes = gb_trees:from_orddict(Nodes),
+ UpdatedNodes = lists:keysort(1, [case gb_trees:lookup(Node, OldNodes) of
+ none ->
+ {Node, {0, 0}};
+ {value, OldStats} ->
+ {Node, OldStats}
+ end || {Node, _WB, _RB} <- NewNodes]),
+ if
+ UpdatedNodes =/= Nodes ->
+ _ = [gen_server:cast(Pid, {die, none}) || Pid <- gb_trees:values(Tags)],
+ spawn(fun() ->
+ {ok, ReadableNodes, RBSize} =
+ do_get_readable_nodes(UpdatedNodes, ReadBlacklist),
+ refresh_tag_cache(ReadableNodes, RBSize)
+ end),
+ S#state{nodes = UpdatedNodes,
+ write_blacklist = WriteBlacklist,
+ read_blacklist = ReadBlacklist,
+ tag_cache = false,
+ tags = gb_trees:empty()};
+ true ->
+ S#state{write_blacklist = WriteBlacklist,
+ read_blacklist = ReadBlacklist}
+ end.
+
+-spec do_update_nodestats(gb_trees:tree(), state()) -> state().
+do_update_nodestats(NewNodes, #state{nodes = Nodes} = S) ->
+ UpdatedNodes = [case gb_trees:lookup(Node, NewNodes) of
+ none ->
+ {Node, Stats};
+ {value, NewStats} ->
+ {Node, NewStats}
+ end || {Node, Stats} <- Nodes],
+ S#state{nodes = UpdatedNodes}.
+
+-spec do_tag_exit(pid(), state()) -> state().
+do_tag_exit(Pid, S) ->
+ NewTags = [X || {_, V} = X <- gb_trees:to_list(S#state.tags), V =/= Pid],
+ S#state{tags = gb_trees:from_orddict(NewTags)}.
+
+-spec do_get_tags(all | filter, [node()]) -> {[node()], [node()], [binary()]};
+ (safe, [node()]) -> {ok, [binary()]} | too_many_failed_nodes;
+ (gc, [node()]) -> {ok, [binary()], [node()]} | too_many_failed_nodes.
+do_get_tags(all, Nodes) ->
+ disco_profile:timed_run(
+ fun() ->
+ {Replies, Failed} =
+ gen_server:multi_call(Nodes, ddfs_node, get_tags, ?NODE_TIMEOUT),
+ {OkNodes, Tags} = lists:unzip(Replies),
+ {OkNodes, Failed, lists:usort(lists:flatten(Tags))}
+ end, do_get_tags_all);
+
+do_get_tags(filter, Nodes) ->
+ disco_profile:timed_run(
+ fun() ->
+ {OkNodes, Failed, Tags} = do_get_tags(all, Nodes),
+ case tag_operation(get_tagnames, <<"+deleted">>, ?NODEOP_TIMEOUT) of
+ {ok, Deleted} ->
+ TagSet = gb_sets:from_ordset(Tags),
+ DelSet = gb_sets:insert(<<"+deleted">>, Deleted),
+ NotDeleted = gb_sets:to_list(gb_sets:subtract(TagSet, DelSet)),
+ {OkNodes, Failed, NotDeleted};
+ E ->
+ E
+ end
+ end, do_get_tags_filter);
+
+do_get_tags(safe, Nodes) ->
+ disco_profile:timed_run(
+ fun() ->
+ TagMinK = list_to_integer(disco:get_setting("DDFS_TAG_MIN_REPLICAS")),
+ case do_get_tags(filter, Nodes) of
+ {_OkNodes, Failed, Tags} when length(Failed) < TagMinK ->
+ {ok, Tags};
+ _ ->
+ too_many_failed_nodes
+ end
+ end, do_get_tags_safe);
+
+% The returned tag list may include +deleted.
+do_get_tags(gc, Nodes) ->
+ disco_profile:timed_run(
+ fun() ->
+ {OkNodes, Failed, Tags} = do_get_tags(all, Nodes),
+ TagMinK = list_to_integer(disco:get_setting("DDFS_TAG_MIN_REPLICAS")),
+ case length(Failed) < TagMinK of
+ false ->
+ too_many_failed_nodes;
+ true ->
+ case tag_operation(get_tagnames, <<"+deleted">>, ?NODEOP_TIMEOUT) of
+ {ok, Deleted} ->
+ TagSet = gb_sets:from_ordset(Tags),
+ NotDeleted = gb_sets:subtract(TagSet, Deleted),
+ {ok, gb_sets:to_list(NotDeleted), OkNodes};
+ E ->
+ E
+ end
+ end
+ end, do_get_tags_gc).
+
+% Timeouts in this call by the below processes can cause ddfs_master
+% itself to crash, since the processes are linked to it.
+-spec safe_get_read_nodes() -> {ok, [node()], non_neg_integer()} | error.
+safe_get_read_nodes() ->
+ try get_read_nodes() of
+ {ok, _ReadableNodes, _RBSize} = RN ->
+ RN;
+ E ->
+ lager:error("unexpected response retrieving readable nodes: ~p", [E]),
+ error
+ catch
+ K:E ->
+ lager:error("error retrieving readable nodes: ~p:~p", [K, E]),
+ error
+ end.
+
+-spec monitor_diskspace() -> no_return().
+monitor_diskspace() ->
+ case safe_get_read_nodes() of
+ {ok, ReadableNodes, _RBSize} ->
+ {Space, _F} = gen_server:multi_call(ReadableNodes,
+ ddfs_node,
+ get_diskspace,
+ ?NODE_TIMEOUT),
+ update_nodestats(gb_trees:from_orddict(lists:keysort(1, Space)));
+ error ->
+ ok
+ end,
+ timer:sleep(?DISKSPACE_INTERVAL),
+ monitor_diskspace().
+
+-spec refresh_tag_cache_proc() -> no_return().
+refresh_tag_cache_proc() ->
+ case safe_get_read_nodes() of
+ {ok, ReadableNodes, RBSize} ->
+ refresh_tag_cache(ReadableNodes, RBSize);
+ error ->
+ ok
+ end,
+ receive
+ refresh ->
+ ok
+ after ?TAG_CACHE_INTERVAL ->
+ ok
+ end,
+ refresh_tag_cache_proc().
+
+-spec refresh_tag_cache([node()], non_neg_integer()) -> ok.
+refresh_tag_cache(Nodes, BLSize) ->
+ TagMinK = list_to_integer(disco:get_setting("DDFS_TAG_MIN_REPLICAS")),
+ {Replies, Failed} =
+ gen_server:multi_call(Nodes, ddfs_node, get_tags, ?NODE_TIMEOUT),
+ if Nodes =/= [], length(Failed) + BLSize < TagMinK ->
+ {_OkNodes, Tags} = lists:unzip(Replies),
+ update_tag_cache(gb_sets:from_list(lists:flatten(Tags)));
+ true -> ok
+ end.
diff --git a/lib/dialyzer/test/small_SUITE_data/src/ddfs_master/ddfs_tag.hrl b/lib/dialyzer/test/small_SUITE_data/src/ddfs_master/ddfs_tag.hrl
new file mode 100644
index 0000000000..2920b67fc5
--- /dev/null
+++ b/lib/dialyzer/test/small_SUITE_data/src/ddfs_master/ddfs_tag.hrl
@@ -0,0 +1,19 @@
+
+-type tokentype() :: 'read' | 'write'.
+-type user_attr() :: [{binary(), binary()}].
+% An 'internal' token is also used by internal consumers, but never stored.
+-type token() :: 'null' | binary().
+
+-type tagname() :: binary().
+-type tagid() :: binary().
+
+-type attrib() :: 'urls' | 'read_token' | 'write_token' | {'user', binary()}.
+
+-record(tagcontent, {id :: tagid(),
+ last_modified :: binary(),
+ read_token = null :: token(),
+ write_token = null :: token(),
+ urls = [] :: [[binary()]],
+ user = [] :: user_attr()}).
+
+-type tagcontent() :: #tagcontent{}.
diff --git a/lib/dialyzer/test/small_SUITE_data/src/ddfs_master/gs_util.hrl b/lib/dialyzer/test/small_SUITE_data/src/ddfs_master/gs_util.hrl
new file mode 100644
index 0000000000..d579e9a7d7
--- /dev/null
+++ b/lib/dialyzer/test/small_SUITE_data/src/ddfs_master/gs_util.hrl
@@ -0,0 +1,16 @@
+% This is a set of type utilities to be used when spec-cing the
+% callbacks of a gen_server implementation. It should be included in
+% the impl module, which needs to define the state() type.
+
+-type gs_init() :: {ok, state()}.
+-type gs_reply(T) :: {reply, (T), state()}.
+-type gs_noreply() :: {noreply, state()}.
+-type gs_noreply_t() :: {noreply, state(), non_neg_integer()}.
+-type gs_stop(T) :: {stop, (T), state()}.
+
+% Generic utilities.
+
+-type server() :: pid() | atom() | {atom(), node()}.
+-type from() :: {pid(), term()}.
+
+-type dbg_state_msg() :: dbg_get_state.
diff --git a/lib/dialyzer/test/small_SUITE_data/src/funs_from_outside.erl b/lib/dialyzer/test/small_SUITE_data/src/funs_from_outside.erl
new file mode 100644
index 0000000000..f4cbf31160
--- /dev/null
+++ b/lib/dialyzer/test/small_SUITE_data/src/funs_from_outside.erl
@@ -0,0 +1,83 @@
+-module(funs_from_outside).
+
+-export([run1/2, run2/2, run3/2]).
+-export([test1/1, test2/1]).
+
+%%------------------------------------------------------------------------------
+
+run1(X, Y) ->
+ testa(fun do_something/1, X, Y).
+
+testa(Fun, X, Y) ->
+ F = case even(X) of
+ true -> Fun;
+ false -> fun do_nothing/1
+ end,
+ case F(Y) of
+ {ok, _} -> ok;
+ error -> error
+ end.
+
+do_nothing(_) -> {ok, nothing}.
+
+do_something(_) -> {ok, something}.
+
+even(X) ->
+ X rem 2 =:= 0.
+
+%%------------------------------------------------------------------------------
+
+%% Duplicating code since we are monovariant...
+
+run2(X, Y) ->
+ testb(fun do_something/1, X, Y).
+
+testb(Fun, X, Y) ->
+ F = case even(X) of
+ true -> Fun;
+ false -> fun do_nothing/1
+ end,
+ case F(Y) of
+ error -> error
+ end.
+
+%%------------------------------------------------------------------------------
+
+%% Duplicating code since we are monovariant...
+
+run3(X, Y) ->
+ testc(fun do_something_2/1, X, Y).
+
+testc(Fun, X, Y) ->
+ F = case even(X) of
+ true -> Fun;
+ false -> fun do_nothing/1
+ end,
+ case F(Y) of
+ {ok, _} -> ok;
+ %% This pattern can match.
+ error -> error
+ end.
+
+do_something_2(foo) -> {ok, something};
+do_something_2(_) -> error.
+
+%%------------------------------------------------------------------------------
+
+test1(Fun) ->
+ F = case get(test1) of
+ test1_t -> Fun;
+ test1_f -> fun fok/0
+ end,
+ error = F().
+
+fok() -> ok.
+
+%%------------------------------------------------------------------------------
+
+test2(Fun) ->
+ F = case get(test1) of
+ test1_t -> fun fok/0;
+ test1_f -> fun fok/0
+ end,
+ error = F().
diff --git a/lib/dialyzer/test/small_SUITE_data/src/invalid_spec_2/scala_data.erl b/lib/dialyzer/test/small_SUITE_data/src/invalid_spec_2/scala_data.erl
new file mode 100644
index 0000000000..c26787fe24
--- /dev/null
+++ b/lib/dialyzer/test/small_SUITE_data/src/invalid_spec_2/scala_data.erl
@@ -0,0 +1,5 @@
+-module(scala_data).
+
+-export_type([data/0]).
+
+-opaque data() :: {'data', term()}.
diff --git a/lib/dialyzer/test/small_SUITE_data/src/invalid_spec_2/scala_user.erl b/lib/dialyzer/test/small_SUITE_data/src/invalid_spec_2/scala_user.erl
new file mode 100644
index 0000000000..4e981f3b74
--- /dev/null
+++ b/lib/dialyzer/test/small_SUITE_data/src/invalid_spec_2/scala_user.erl
@@ -0,0 +1,8 @@
+-module(scala_user).
+
+-export([is_list/2]).
+
+-spec is_list(atom(), scala_data:data()) -> boolean().
+
+is_list( List,Data) when is_list(List) -> true;
+is_list(Tuple,Data) when is_tuple(Tuple) -> false.
diff --git a/lib/dialyzer/test/small_SUITE_data/src/maps1.erl b/lib/dialyzer/test/small_SUITE_data/src/maps1.erl
new file mode 100644
index 0000000000..06ced5b69e
--- /dev/null
+++ b/lib/dialyzer/test/small_SUITE_data/src/maps1.erl
@@ -0,0 +1,41 @@
+%%
+%% File: maps1.erl
+%% Author: Björn-Egil Dahlberg
+%% Created: 2014-01-17
+%%
+
+-module(maps1).
+
+-compile([export_all]).
+
+
+-export([recv/3, decode/1]).
+
+%-record(can_pkt, {id, data :: binary(), timestamp}).
+
+-type can_pkt() :: #{ id => term(), data => binary(), timestamp => term() }.
+-type channel() :: atom() | pid() | {atom(),_}.
+
+-spec recv(<<_:64,_:_*8>>, fun((can_pkt()) -> R), channel()) -> R.
+recv(Packet, Fun, Chan) ->
+ #{id := Can_id, data := Can_data} = P = decode(Packet),
+ Fun(P).
+
+-spec decode(<<_:64,_:_*8>>) -> #{id => <<_:11>>,timestamp => char()}.
+decode(<<_:12, Len:4, Timestamp:16, 0:3, Id:11/bitstring, 0:18,
+ Data:Len/binary, _/binary>>) ->
+ #{id => Id, data => Data, timestamp => Timestamp}.
+
+
+
+t1() ->
+ #{bar=>fun t2/0}.
+
+t2() -> ok.
+
+-type map_state() :: #{ id => integer(), val => term() }.
+
+-spec update(map_state(), term()) -> map_state().
+
+update(#{ id := Id, val := Val } = M, X) when is_integer(Id) ->
+ M#{ val := [Val,X] }.
diff --git a/lib/dialyzer/test/small_SUITE_data/src/maps_difftype.erl b/lib/dialyzer/test/small_SUITE_data/src/maps_difftype.erl
new file mode 100644
index 0000000000..19e61a7944
--- /dev/null
+++ b/lib/dialyzer/test/small_SUITE_data/src/maps_difftype.erl
@@ -0,0 +1,11 @@
+%%
+%% File: maps_difftype.erl
+%% Author: Björn-Egil Dahlberg
+%% Created: 2014-04-29
+%%
+-module(maps_difftype).
+
+-export([empty_mismatch/1]).
+
+empty_mismatch(Tuple) when is_tuple(Tuple) ->
+ case Tuple of #{} -> ok end.
diff --git a/lib/dialyzer/test/small_SUITE_data/src/maps_redef.erl b/lib/dialyzer/test/small_SUITE_data/src/maps_redef.erl
new file mode 100644
index 0000000000..70059f73b6
--- /dev/null
+++ b/lib/dialyzer/test/small_SUITE_data/src/maps_redef.erl
@@ -0,0 +1,12 @@
+-module(maps_redef).
+
+-export([t/0]).
+
+%% OK in Erlang/OTP 17, at least.
+
+-type map() :: atom(). % redefine built-in type
+
+-spec t() -> map().
+
+t() ->
+ a. % OK
diff --git a/lib/dialyzer/test/small_SUITE_data/src/on_load.erl b/lib/dialyzer/test/small_SUITE_data/src/on_load.erl
index 16533a9caa..7242ac2016 100644
--- a/lib/dialyzer/test/small_SUITE_data/src/on_load.erl
+++ b/lib/dialyzer/test/small_SUITE_data/src/on_load.erl
@@ -1,4 +1,6 @@
%%% This is to ensure that "on_load" functions are never reported as unused.
+%%% In addition, all functions called by a function in an on_load attribute
+%%% should be considered as called by an entry point of the module.
-module(on_load).
@@ -8,4 +10,7 @@
foo() -> ok.
-bar() -> ok.
+bar() -> gazonk(17).
+
+gazonk(N) when N < 42 -> gazonk(N+1);
+gazonk(42) -> ok.
diff --git a/lib/dialyzer/test/small_SUITE_data/src/predef.erl b/lib/dialyzer/test/small_SUITE_data/src/predef.erl
new file mode 100644
index 0000000000..ee9073aa67
--- /dev/null
+++ b/lib/dialyzer/test/small_SUITE_data/src/predef.erl
@@ -0,0 +1,67 @@
+-module(predef).
+
+-export([array/1, dict/1, digraph/1, digraph2/1, gb_set/1, gb_tree/1,
+ queue/1, set/1, tid/0, tid2/0]).
+
+-export_type([array/0, digraph/0, gb_set/0]).
+
+%% Before Erlang/OTP 17.0 local re-definitions of pre-defined opaque
+%% types were ignored but did not generate any warning.
+-opaque array() :: atom().
+-opaque digraph() :: atom().
+-opaque gb_set() :: atom().
+-type dict() :: atom().
+-type gb_tree() :: atom().
+-type queue() :: atom().
+-type set() :: atom().
+-type tid() :: atom().
+
+-spec array(array()) -> array:array().
+
+array(A) ->
+ array:relax(A).
+
+-spec dict(dict()) -> dict:dict().
+
+dict(D) ->
+ dict:store(1, a, D).
+
+-spec digraph(digraph()) -> [digraph:edge()].
+
+digraph(G) ->
+ digraph:edges(G).
+
+-spec digraph2(digraph:graph()) -> [digraph:edge()].
+
+digraph2(G) ->
+ digraph:edges(G).
+
+-spec gb_set(gb_set()) -> gb_sets:set().
+
+gb_set(S) ->
+ gb_sets:balance(S).
+
+-spec gb_tree(gb_tree()) -> gb_trees:tree().
+
+gb_tree(S) ->
+ gb_trees:balance(S).
+
+-spec queue(queue()) -> queue:queue().
+
+queue(Q) ->
+ queue:reverse(Q).
+
+-spec set(set()) -> sets:set().
+
+set(S) ->
+ sets:union([S]).
+
+-spec tid() -> tid().
+
+tid() ->
+ ets:new(tid, []).
+
+-spec tid2() -> ets:tid().
+
+tid2() ->
+ ets:new(tid, []).
diff --git a/lib/dialyzer/test/small_SUITE_data/src/predef2.erl b/lib/dialyzer/test/small_SUITE_data/src/predef2.erl
new file mode 100644
index 0000000000..b1d941a49a
--- /dev/null
+++ b/lib/dialyzer/test/small_SUITE_data/src/predef2.erl
@@ -0,0 +1,56 @@
+-module(predef2).
+
+-export([array/1, dict/1, digraph/1, digraph2/1, gb_set/1, gb_tree/1,
+ queue/1, set/1, tid/0, tid2/0]).
+
+-export_type([array/0, digraph/0, gb_set/0]).
+
+-spec array(array()) -> array:array().
+
+array(A) ->
+ array:relax(A).
+
+-spec dict(dict()) -> dict:dict().
+
+dict(D) ->
+ dict:store(1, a, D).
+
+-spec digraph(digraph()) -> [digraph:edge()].
+
+digraph(G) ->
+ digraph:edges(G).
+
+-spec digraph2(digraph:graph()) -> [digraph:edge()].
+
+digraph2(G) ->
+ digraph:edges(G).
+
+-spec gb_set(gb_set()) -> gb_sets:set().
+
+gb_set(S) ->
+ gb_sets:balance(S).
+
+-spec gb_tree(gb_tree()) -> gb_trees:tree().
+
+gb_tree(S) ->
+ gb_trees:balance(S).
+
+-spec queue(queue()) -> queue:queue().
+
+queue(Q) ->
+ queue:reverse(Q).
+
+-spec set(set()) -> sets:set().
+
+set(S) ->
+ sets:union([S]).
+
+-spec tid() -> tid().
+
+tid() ->
+ ets:new(tid, []).
+
+-spec tid2() -> ets:tid().
+
+tid2() ->
+ ets:new(tid, []).
diff --git a/lib/dialyzer/test/small_SUITE_data/src/record_construct.erl b/lib/dialyzer/test/small_SUITE_data/src/record_construct.erl
index 54cc2601bd..b250c6ee65 100644
--- a/lib/dialyzer/test/small_SUITE_data/src/record_construct.erl
+++ b/lib/dialyzer/test/small_SUITE_data/src/record_construct.erl
@@ -7,7 +7,7 @@ t_loc() ->
#r_loc{}.
-record(r_opa, {a :: atom(),
- b = gb_sets:new() :: gb_set(),
+ b = gb_sets:new() :: gb_sets:set(),
c = 42 :: boolean(),
d, % untyped on purpose
e = false :: boolean()}).
diff --git a/lib/dialyzer/test/small_SUITE_data/src/remote_field.erl b/lib/dialyzer/test/small_SUITE_data/src/remote_field.erl
new file mode 100644
index 0000000000..c34fa1b9dd
--- /dev/null
+++ b/lib/dialyzer/test/small_SUITE_data/src/remote_field.erl
@@ -0,0 +1,11 @@
+-module(remote_field).
+
+-type f(T) :: {ssl:sslsocket(), T}.
+
+-record(r1, { f1 :: f(_) }).
+-type r1(T) :: #r1{ f1 :: fun((ssl:sslsocket(), T) -> any()) }.
+
+-record(state, {
+ r :: r1(T),
+ arg :: T
+ }).
diff --git a/lib/dialyzer/test/small_SUITE_data/src/remote_field2.erl b/lib/dialyzer/test/small_SUITE_data/src/remote_field2.erl
new file mode 100644
index 0000000000..35687e22ec
--- /dev/null
+++ b/lib/dialyzer/test/small_SUITE_data/src/remote_field2.erl
@@ -0,0 +1,17 @@
+-module(remote_field2).
+
+-export([handle_cast/2]).
+
+-record(state, {tcp_socket :: inet:socket()}).
+
+-spec handle_cast(_,_) ->
+ {noreply,_} |
+ {stop,{shutdown,connection_closed},
+ #state{tcp_socket :: port()}}.
+handle_cast({send, Message}, #state{tcp_socket = TCPSocket} = State) ->
+ case gen_tcp:send(TCPSocket, Message) of
+ ok ->
+ {noreply, State};
+ {error, closed} ->
+ {stop, {shutdown, connection_closed}, State}
+ end.
diff --git a/lib/dialyzer/test/underspecs_SUITE_data/dialyzer_options b/lib/dialyzer/test/underspecs_SUITE_data/dialyzer_options
index f7197ac30f..6843119b9d 100644
--- a/lib/dialyzer/test/underspecs_SUITE_data/dialyzer_options
+++ b/lib/dialyzer/test/underspecs_SUITE_data/dialyzer_options
@@ -1 +1 @@
-{dialyzer_options, [{warnings, [underspecs]}]}.
+{dialyzer_options, [{warnings, [underspecs, no_unknown]}]}.
diff --git a/lib/dialyzer/test/unmatched_returns_SUITE_data/dialyzer_options b/lib/dialyzer/test/unmatched_returns_SUITE_data/dialyzer_options
new file mode 100644
index 0000000000..49ac917f61
--- /dev/null
+++ b/lib/dialyzer/test/unmatched_returns_SUITE_data/dialyzer_options
@@ -0,0 +1 @@
+{dialyzer_options, [{warnings, [unmatched_returns]}]}.
diff --git a/lib/dialyzer/test/unmatched_returns_SUITE_data/results/lc_warnings b/lib/dialyzer/test/unmatched_returns_SUITE_data/results/lc_warnings
new file mode 100644
index 0000000000..24b44c1b5c
--- /dev/null
+++ b/lib/dialyzer/test/unmatched_returns_SUITE_data/results/lc_warnings
@@ -0,0 +1,5 @@
+
+lc_warnings.erl:32: Expression produces a value of type [opaque_atom_adt:opaque_atom()], but this value is unmatched
+lc_warnings.erl:43: Expression produces a value of type [array:array(_)], but this value is unmatched
+lc_warnings.erl:65: Expression produces a value of type [lc_warnings:opaque_tuple()], but this value is unmatched
+lc_warnings.erl:7: Expression produces a value of type ['ok' | {'error',atom()}], but this value is unmatched
diff --git a/lib/dialyzer/test/unmatched_returns_SUITE_data/src/lc_warnings/lc_warnings.erl b/lib/dialyzer/test/unmatched_returns_SUITE_data/src/lc_warnings/lc_warnings.erl
new file mode 100644
index 0000000000..cb01a8fde3
--- /dev/null
+++ b/lib/dialyzer/test/unmatched_returns_SUITE_data/src/lc_warnings/lc_warnings.erl
@@ -0,0 +1,95 @@
+-module(lc_warnings).
+-compile([export_all]).
+
+close(Fs) ->
+ %% There should be a warning since we ignore a potential
+ %% {error,Error} return from file:close/1.
+ [file:close(F) || F <- Fs],
+
+ %% No warning because the type of unmatched return will be ['ok']
+ %% (which is a list of a simple type).
+ [ok = file:close(F) || F <- Fs],
+
+ %% Suppressed.
+ _ = [file:close(F) || F <- Fs],
+ ok.
+
+format(X) ->
+ %% No warning since the result of the list comprehension is
+ %% a list of simple.
+ [io:format("~p\n", [E]) || E <- X],
+
+ %% Warning explicitly suppressed.
+ _ = [io:format("~p\n", [E]) || E <- X],
+ ok.
+
+opaque1() ->
+ List = gen_atom(),
+ %% This is a list of an externally defined opaque type. Since
+ %% we are not allowed to peek inside opaque types, there should
+ %% be a warning (even though the type in this case happens to be
+ %% an atom).
+ [E || E <- List],
+
+ %% Suppressed.
+ _ = [E || E <- List],
+ ok.
+
+opaque2() ->
+ List = gen_array(),
+ %% This is an list of an externally defined opaque type. Since
+ %% we are not allowed to peek inside opaque types, there should
+ %% be a warning.
+ [E || E <- List],
+
+ %% Suppressed.
+ _ = [E || E <- List],
+ ok.
+
+opaque3() ->
+ List = gen_int(),
+
+ %% No warning, since we are allowed to look into the type and can
+ %% see that it is a simple type.
+ [E || E <- List],
+
+ %% Suppressed.
+ _ = [E || E <- List],
+ ok.
+
+opaque4() ->
+ List = gen_tuple(),
+
+ %% There should be a warning, since we are allowed to look inside
+ %% the opaque type and see that it is a tuple (non-simple).
+ [E || E <- List],
+
+ %% Suppressed.
+ _ = [E || E <- List],
+ ok.
+
+gen_atom() ->
+ [opaque_atom_adt:atom(ok)].
+
+gen_array() ->
+ [array:new()].
+
+
+gen_int() ->
+ [opaque_int(42)].
+
+gen_tuple() ->
+ [opaque_tuple(x, 25)].
+
+-opaque opaque_int() :: integer().
+
+-spec opaque_int(integer()) -> opaque_int().
+
+opaque_int(Int) -> Int.
+
+-opaque opaque_tuple() :: {any(),any()}.
+
+-spec opaque_tuple(any(), any()) -> opaque_tuple().
+
+opaque_tuple(X, Y) ->
+ {X,Y}.
diff --git a/lib/dialyzer/test/unmatched_returns_SUITE_data/src/lc_warnings/opaque_atom_adt.erl b/lib/dialyzer/test/unmatched_returns_SUITE_data/src/lc_warnings/opaque_atom_adt.erl
new file mode 100644
index 0000000000..b5b51fe75b
--- /dev/null
+++ b/lib/dialyzer/test/unmatched_returns_SUITE_data/src/lc_warnings/opaque_atom_adt.erl
@@ -0,0 +1,9 @@
+-module(opaque_atom_adt).
+-export([atom/1]).
+
+-opaque opaque_atom() :: atom().
+
+-spec atom(atom()) -> opaque_atom().
+
+atom(Atom) ->
+ Atom.
diff --git a/lib/dialyzer/test/user_SUITE_data/dialyzer_options b/lib/dialyzer/test/user_SUITE_data/dialyzer_options
index 513ed7752b..d20ecd389f 100644
--- a/lib/dialyzer/test/user_SUITE_data/dialyzer_options
+++ b/lib/dialyzer/test/user_SUITE_data/dialyzer_options
@@ -1,2 +1,2 @@
-{dialyzer_options, []}.
+{dialyzer_options, [{warnings, [no_unknown]}]}.
{time_limit, 3}. \ No newline at end of file
diff --git a/lib/dialyzer/vsn.mk b/lib/dialyzer/vsn.mk
index af32c5b901..95d2464e1d 100644
--- a/lib/dialyzer/vsn.mk
+++ b/lib/dialyzer/vsn.mk
@@ -1 +1 @@
-DIALYZER_VSN = 2.6.1
+DIALYZER_VSN = 2.7
diff --git a/lib/diameter/bin/diameterc b/lib/diameter/bin/diameterc
index d31f341c36..2c9a8f555c 100755
--- a/lib/diameter/bin/diameterc
+++ b/lib/diameter/bin/diameterc
@@ -4,7 +4,7 @@
%%
%% %CopyrightBegin%
%%
-%% Copyright Ericsson AB 2010-2013. All Rights Reserved.
+%% Copyright Ericsson AB 2010-2014. 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
@@ -74,7 +74,7 @@ compile(#argv{file = File, options = Opts, output = Out}) ->
ok ->
0;
{error, Reason} ->
- error_msg(Reason, []),
+ error_msg(diameter_make:format_error(Reason), []),
1
catch
error: Reason ->
diff --git a/lib/diameter/doc/src/diameter.xml b/lib/diameter/doc/src/diameter.xml
index 4804b07b30..ab9ad25a3a 100644
--- a/lib/diameter/doc/src/diameter.xml
+++ b/lib/diameter/doc/src/diameter.xml
@@ -20,7 +20,8 @@
<header>
<copyright>
-<year>2011</year><year>2013</year>
+<year>2011</year>
+<year>2014</year>
<holder>Ericsson AB. All Rights Reserved.</holder>
</copyright>
<legalnotice>
@@ -226,7 +227,7 @@ question is as if a callback had taken place and returned
<c>{error, failure}</c>.</p>
<p>
-Defaults to <c>report</c> if unspecified.</p>
+Defaults to <c>discard</c> if unspecified.</p>
</item>
<tag><c>{request_errors, answer_3xxx|answer|callback}</c></tag>
@@ -355,8 +356,8 @@ question communicates an address list as described in
<tag><c>{'Origin-State-Id', &dict_Unsigned32;}</c></tag>
<item>
<p>
-Origin-State-Id is optional but will be included in outgoing messages
-sent by diameter itself: CER/CEA, DWR/DWA and DPR/DPA.
+Origin-State-Id is optional but, if configured, will be included in
+outgoing CER/CEA and DWR/DWA messages.
Setting a value of <c>0</c> (zero) is equivalent to not setting a
value, as documented in &the_rfc;.
The function &origin_state_id;
diff --git a/lib/diameter/doc/src/diameter_make.xml b/lib/diameter/doc/src/diameter_make.xml
index e1673378df..0c7e6b794d 100644
--- a/lib/diameter/doc/src/diameter_make.xml
+++ b/lib/diameter/doc/src/diameter_make.xml
@@ -16,7 +16,7 @@
<header>
<copyright>
<year>2012</year>
-<year>2013</year>
+<year>2014</year>
<holder>Ericsson AB. All Rights Reserved.</holder>
</copyright>
<legalnotice>
@@ -52,7 +52,7 @@ under the License.
<p>
The function &codec; is used to compile a diameter
&dictionary; into Erlang source.
-The resulting source implements the interface diameter required
+The resulting source implements the interface diameter requires
to encode and decode the dictionary's messages and AVPs.</p>
<p>
@@ -175,6 +175,10 @@ Note that a dictionary's <c>&dict_name;</c>, together with the
The <c>&dict_name;</c> of a literal input dictionary defaults to
<c>dictionary</c>.</p>
+<p>
+A returned error reason can be converted into a readable string using
+&format_error;.</p>
+
</desc>
</func>
@@ -206,6 +210,18 @@ The return value is also a parsed dictionary.</p>
</desc>
</func>
+<!-- ===================================================================== -->
+
+<func>
+<name>format_error(Reason) -> string()</name>
+<fsummary>Turn an error reason into a readable string.</fsummary>
+<desc>
+
+<p>
+Turn an error reason returned by &codec; into a readable string.</p>
+</desc>
+</func>
+
</funcs>
<!-- ===================================================================== -->
diff --git a/lib/diameter/doc/src/diameter_sctp.xml b/lib/diameter/doc/src/diameter_sctp.xml
index fb7075f2cd..6302cb1435 100644
--- a/lib/diameter/doc/src/diameter_sctp.xml
+++ b/lib/diameter/doc/src/diameter_sctp.xml
@@ -15,7 +15,8 @@
<erlref>
<header>
<copyright>
-<year>2011</year><year>2013</year>
+<year>2011</year>
+<year>2014</year>
<holder>Ericsson AB. All Rights Reserved.</holder>
</copyright>
<legalnotice>
@@ -113,7 +114,7 @@ and port respectively.</p>
<p>
Multiple <c>ip</c> options can be specified for a multihomed peer.
If none are specified then the values of <c>Host-IP-Address</c>
-in the <c>#diameter_service{}</c> record are used.
+in the <c>diameter_service</c> record are used.
(In particular, one of these must be specified.)
Option <c>port</c> defaults to 3868 for a listening transport and 0 for a
connecting transport.</p>
@@ -131,25 +132,18 @@ the buffer size.</p>
</warning>
<p>
-diameter_sctp uses the <c>transport_data</c> field of
-the <c>#diameter_packet{}</c> record to communicate the stream on which an
-inbound message has been received, or on which an outbound message
-should be sent: the value will be of the form <c>{stream, Id}</c>
-on an inbound message passed to a &app_handle_request; or
-&app_handle_answer; callback.
-For an outbound message, either <c>undefined</c> (explicitly or
-by receiving the outbound message as a <c>binary()</c>) or a tuple
-should be set in the return value of &app_handle_request;
-(typically by retaining the value passed into this function)
-or &app_prepare_request;.
-The value <c>undefined</c> uses a "next outbound stream" id and
-increments this modulo the total number outbound streams.
-That is, successive values of <c>undefined</c> cycle through all
-outbound streams.</p>
-
-<!-- TODO: Some way of getting at the number of available outbound -->
-<!-- streams. -->
-
+The <c>transport_data</c> field of record <c>diameter_packet</c>
+is used to communicate the stream on which an inbound message
+has been received, or on which an outbound message should be sent.
+The value will be of the form <c>{stream, Id}</c> for an inbound
+message passed to a &app_handle_request; or &app_handle_answer;
+callback.
+For an outbound message, <c>{outstream, Id}</c> in the return value of
+&app_handle_request; or &app_prepare_retransmit; sets the outbound
+stream, the stream id being interpreted modulo the number of outbound
+streams.
+Any other value, or not setting a value, causes successive such sends
+to cycle though all outbound streams.</p>
</desc>
</func>
diff --git a/lib/diameter/doc/src/notes.xml b/lib/diameter/doc/src/notes.xml
index cd14195e78..68e69dbfeb 100644
--- a/lib/diameter/doc/src/notes.xml
+++ b/lib/diameter/doc/src/notes.xml
@@ -11,7 +11,7 @@
<header>
<copyright>
<year>2011</year>
-<year>2013</year>
+<year>2014</year>
<holder>Ericsson AB. All Rights Reserved.</holder>
</copyright>
<legalnotice>
@@ -42,6 +42,164 @@ first.</p>
<!-- ===================================================================== -->
+<section><title>diameter 1.6</title>
+
+ <section><title>Fixed Bugs and Malfunctions</title>
+ <list>
+ <item>
+ <p>
+ Add missing check at dictionary compilation.</p>
+ <p>
+ In particular, that an AVP defined as having type Grouped
+ in an @avp_types section has a corresponding definition
+ in a @grouped section.</p>
+ <p>
+ Own Id: OTP-11561</p>
+ </item>
+ <item>
+ <p>
+ Correct documentation on the setting of Origin-State-Id</p>
+ <p>
+ It was incorrectly stated that the AVP would be set in an
+ outgoing DPR/DPA.</p>
+ <p>
+ Own Id: OTP-11583</p>
+ </item>
+ <item>
+ <p>
+ Change interface for communicating outbound stream id to
+ diameter_sctp</p>
+ <p>
+ The module uses the transport_data field of record
+ diameter_packet to communicate the stream on which the an
+ incoming message is received and on which an outgoing
+ message should be sent, the previous interface being that
+ both are communicated as a tuple of the form {stream,
+ Id}. However, since diameter retains the value of an
+ incoming request's transport_data unless the
+ corresponding answer message specifies otherwise, the
+ behaviour in this case is to send an answer on the
+ outbound stream with the same identifier as the that of
+ the inbound stream on which the request was received. If
+ the inbound stream id is greater than or equal to the
+ number of outbound streams then this is guaranteed to
+ fail, causing the transport process in question to
+ terminate. There is no relationship between inbound and
+ outbound stream identifiers so diameter_sctp's imposition
+ of one is simply wrong.</p>
+ <p>
+ Outbound stream ids are now communicated with a different
+ tuple: {outstream, Id}, interpreted modulo the number of
+ outbound streams. Thus, retention of an inbound request's
+ transport_data has no effect on the selection of an
+ outbound stream.</p>
+ <p>
+ The change in interface is not strictly backwards
+ compatible because of the new atom for the outbound
+ stream. However, as there is currently no documented way
+ of obtaining the available number of outbound streams for
+ a peer connection, there is no way for a client to have
+ known the range of ids from which it could reliably have
+ chosen with the previous interface, so any setting of the
+ outbound stream has probably been unintentional. Not
+ explicitly specifying an outbound stream now results in a
+ round-robin selection.</p>
+ <p>
+ Thanks to Sharmila Pillai for reporting the problem.</p>
+ <p>
+ *** POTENTIAL INCOMPATIBILITY ***</p>
+ <p>
+ Own Id: OTP-11593</p>
+ </item>
+ <item>
+ <p>
+ Fix unicode path failure in diameter_make:codec/2.</p>
+ <p>
+ A dictionary path containing a unicode codepoint > 255
+ caused the function to fail.</p>
+ <p>
+ Own Id: OTP-11655</p>
+ </item>
+ <item>
+ <p>
+ Fix 'accept' config to diameter_sctp.</p>
+ <p>
+ OTP-10893 added support for {accept, Match} tuples to
+ specify addresses or regexps that should be matched
+ against peer addresses to decide whether or not a newly
+ established association should be retained, but this
+ hasn't been functional in the SCTP case because of
+ missing support in inet(3).</p>
+ <p>
+ The display of both local and peer addresses in
+ diameter:service_info/2 output has also been corrected.</p>
+ <p>
+ Own Id: OTP-11661 Aux Id: OTP-10229 </p>
+ </item>
+ <item>
+ <p>
+ Be lenient with the M-bit in Grouped AVPs.</p>
+ <p>
+ RFC 6733 says this, in 4.4:</p>
+ <p>
+ <taglist><item><p><c>Receivers of a Grouped AVP that does
+ not have the 'M' (mandatory) bit set and one or more of
+ the encapsulated AVPs within the group has the 'M'
+ (mandatory) bit set MAY simply be ignored if the Grouped
+ AVP itself is unrecognized. The rule applies even if the
+ encapsulated AVP with its 'M' (mandatory) bit set is
+ further encapsulated within other sub-groups, i.e., other
+ Grouped AVPs embedded within the Grouped
+ AVP.</c></p></item></taglist></p>
+ <p>
+ The first sentence is mangled but take it to mean this:</p>
+ <p>
+ <taglist><item><p><c>An unrecognized AVP of type Grouped
+ that does not set the 'M' bit MAY be ignored even if one
+ of its encapsulated AVPs sets the 'M'
+ bit.</c></p></item></taglist></p>
+ <p>
+ This is a bit of a non-statement since if the AVP is
+ unrecognized then its type is unknown. We therefore don't
+ know that its data bytes contain encapsulated AVPs, so
+ can't but ignore any of those that set the M-bit. Doing
+ anything else when the type *is* known would be
+ inconsistent.</p>
+ <p>
+ OTP-11087 (R16B03) caused the M-bit on any unrecognized
+ AVP to be regarded as an error, unrecognized being taken
+ to mean "not explicitly defined as a member of its
+ container". (That is, an AVP that can't be packed into a
+ dedicated record field, which is slightly stronger than
+ "not defined".) This fixed the original intention for
+ top-level AVPs but broke the required leniency for
+ Grouped AVPs whose type is known. This leniency is now
+ restored.</p>
+ <p>
+ Note that dictionary files need to be recompiled for the
+ change to have effect.</p>
+ <p>
+ Thanks to Rory McKeown for reporting the problem.</p>
+ <p>
+ Own Id: OTP-11675 Aux Id: OTP-11087 </p>
+ </item>
+ <item>
+ <p>
+ Fix pick_peer case clause failure.</p>
+ <p>
+ In the case of {call_mutates_state, true} configuration
+ on the service in question, any peer selection that
+ failed to select a peer resulted in a case clause
+ failure. This was noticed in the case of a peer failover
+ in which an alternate peer wasn't available.</p>
+ <p>
+ Own Id: OTP-11789</p>
+ </item>
+ </list>
+ </section>
+
+</section>
+
<section><title>diameter 1.5</title>
<section><title>Improvements and New Features</title>
@@ -73,12 +231,6 @@ first.</p>
<p>
Own Id: OTP-11361</p>
</item>
- <item>
- <p>
- Fix silent make rules (Thanks to Anthony Ramine)</p>
- <p>
- Own Id: OTP-11514</p>
- </item>
</list>
</section>
@@ -86,7 +238,7 @@ first.</p>
<section><title>diameter 1.4.4</title>
- <section><title>Known Bugs and Problems</title>
+ <section><title>Fixed Bugs and Malfunctions</title>
<list>
<item>
<p>
diff --git a/lib/diameter/doc/src/seealso.ent b/lib/diameter/doc/src/seealso.ent
index 7bf7460351..44541afb9b 100644
--- a/lib/diameter/doc/src/seealso.ent
+++ b/lib/diameter/doc/src/seealso.ent
@@ -4,7 +4,7 @@
%CopyrightBegin%
-Copyright Ericsson AB 2012-2013. All Rights Reserved.
+Copyright Ericsson AB 2012-2014. 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
@@ -117,6 +117,7 @@ significant.
<!ENTITY make_codec '<seealso marker="diameter_make#codec-2">diameter_make:codec/2</seealso>'>
<!ENTITY make_format '<seealso marker="diameter_make#format-1">diameter_make:format/1</seealso>'>
<!ENTITY make_flatten '<seealso marker="diameter_make#flatten-1">diameter_make:flatten/1</seealso>'>
+<!ENTITY make_format_error '<seealso marker="diameter_make#format_error-1">diameter_make:format_error/1</seealso>'>
<!-- diameter_transport -->
diff --git a/lib/diameter/examples/code/client.erl b/lib/diameter/examples/code/client.erl
index bfe71b0e56..46eb4a55db 100644
--- a/lib/diameter/examples/code/client.erl
+++ b/lib/diameter/examples/code/client.erl
@@ -1,7 +1,7 @@
%%
%% %CopyrightBegin%
%%
-%% Copyright Ericsson AB 2010-2012. All Rights Reserved.
+%% Copyright Ericsson AB 2010-2014. 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
diff --git a/lib/diameter/examples/code/client_cb.erl b/lib/diameter/examples/code/client_cb.erl
index ee3dcb2fec..843cdd9262 100644
--- a/lib/diameter/examples/code/client_cb.erl
+++ b/lib/diameter/examples/code/client_cb.erl
@@ -1,7 +1,7 @@
%%
%% %CopyrightBegin%
%%
-%% Copyright Ericsson AB 2010-2012. All Rights Reserved.
+%% Copyright Ericsson AB 2010-2014. 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
@@ -77,23 +77,11 @@ prepare_retransmit(Packet, SvcName, Peer) ->
%% handle_answer/4
-%% Since client.erl has detached the call when using the list
-%% encoding and not otherwise, output to the terminal in the
-%% the former case, return in the latter.
-
-handle_answer(#diameter_packet{msg = Msg}, Request, _SvcName, _Peer)
- when is_list(Request) ->
- io:format("answer: ~p~n", [Msg]);
-
handle_answer(#diameter_packet{msg = Msg}, _Request, _SvcName, _Peer) ->
{ok, Msg}.
%% handle_error/4
-handle_error(Reason, Request, _SvcName, _Peer)
- when is_list(Request) ->
- io:format("error: ~p~n", [Reason]);
-
handle_error(Reason, _Request, _SvcName, _Peer) ->
{error, Reason}.
diff --git a/lib/diameter/examples/code/redirect_cb.erl b/lib/diameter/examples/code/redirect_cb.erl
index 69836774a1..8d98b0d2df 100644
--- a/lib/diameter/examples/code/redirect_cb.erl
+++ b/lib/diameter/examples/code/redirect_cb.erl
@@ -1,7 +1,7 @@
%%
%% %CopyrightBegin%
%%
-%% Copyright Ericsson AB 2010-2013. All Rights Reserved.
+%% Copyright Ericsson AB 2010-2014. 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
@@ -34,12 +34,10 @@
-define(UNEXPECTED, erlang:error({unexpected, ?MODULE, ?LINE})).
-peer_up(_SvcName, {PeerRef, _}, State) ->
- io:format("up: ~p~n", [PeerRef]),
+peer_up(_SvcName, _Peer, State) ->
State.
-peer_down(_SvcName, {PeerRef, _}, State) ->
- io:format("down: ~p~n", [PeerRef]),
+peer_down(_SvcName, _Peer, State) ->
State.
pick_peer(_, _, _SvcName, _State) ->
diff --git a/lib/diameter/examples/code/relay_cb.erl b/lib/diameter/examples/code/relay_cb.erl
index 9f9cd8d5ae..68798014e6 100644
--- a/lib/diameter/examples/code/relay_cb.erl
+++ b/lib/diameter/examples/code/relay_cb.erl
@@ -1,7 +1,7 @@
%%
%% %CopyrightBegin%
%%
-%% Copyright Ericsson AB 2010-2012. All Rights Reserved.
+%% Copyright Ericsson AB 2010-2014. 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
@@ -32,12 +32,10 @@
handle_error/5,
handle_request/3]).
-peer_up(_SvcName, {PeerRef, _}, State) ->
- io:format("up: ~p~n", [PeerRef]),
+peer_up(_SvcName, _Peer, State) ->
State.
-peer_down(_SvcName, {PeerRef, _}, State) ->
- io:format("down: ~p~n", [PeerRef]),
+peer_down(_SvcName, _Peer, State) ->
State.
%% Returning 'relay' from handle_request causes diameter to resend the
diff --git a/lib/diameter/examples/code/server_cb.erl b/lib/diameter/examples/code/server_cb.erl
index 0f6eb32ed6..9d8d395d06 100644
--- a/lib/diameter/examples/code/server_cb.erl
+++ b/lib/diameter/examples/code/server_cb.erl
@@ -1,7 +1,7 @@
%%
%% %CopyrightBegin%
%%
-%% Copyright Ericsson AB 2010-2012. All Rights Reserved.
+%% Copyright Ericsson AB 2010-2014. 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
@@ -38,12 +38,10 @@
-define(UNEXPECTED, erlang:error({unexpected, ?MODULE, ?LINE})).
-peer_up(_SvcName, {PeerRef, _}, State) ->
- io:format("up: ~p~n", [PeerRef]),
+peer_up(_SvcName, _Peer, State) ->
State.
-peer_down(_SvcName, {PeerRef, _}, State) ->
- io:format("down: ~p~n", [PeerRef]),
+peer_down(_SvcName, _Peer, State) ->
State.
pick_peer(_, _, _SvcName, _State) ->
@@ -68,10 +66,13 @@ handle_request(#diameter_packet{msg = Req, errors = []}, _SvcName, {_, Caps})
origin_realm = {OR,_}}
= Caps,
#diameter_base_RAR{'Session-Id' = Id,
- 'Re-Auth-Request-Type' = RT}
+ 'Re-Auth-Request-Type' = Type}
= Req,
- {reply, answer(RT, Id, OH, OR)};
+ {reply, #diameter_base_RAA{'Result-Code' = rc(Type),
+ 'Origin-Host' = OH,
+ 'Origin-Realm' = OR,
+ 'Session-Id' = Id}};
%% ... or one that wasn't. 3xxx errors are answered by diameter itself
%% but these are 5xxx errors for which we must contruct a reply.
@@ -84,32 +85,18 @@ handle_request(#diameter_packet{msg = Req}, _SvcName, {_, Caps})
#diameter_base_RAR{'Session-Id' = Id}
= Req,
- Ans = #diameter_base_RAA{'Origin-Host' = OH,
- 'Origin-Realm' = OR,
- 'Session-Id' = Id},
+ {reply, #diameter_base_RAA{'Origin-Host' = OH,
+ 'Origin-Realm' = OR,
+ 'Session-Id' = Id}};
- {reply, Ans};
+%% Answer that any other message is unsupported.
+handle_request(#diameter_packet{}, _SvcName, _) ->
+ {answer_message, 3001}. %% DIAMETER_COMMAND_UNSUPPORTED
-%% Should really reply to other base messages that we don't support
-%% but simply discard them instead.
-handle_request(#diameter_packet{}, _SvcName, {_,_}) ->
- discard.
+%% Map Re-Auth-Request-Type to Result-Code just for the purpose of
+%% generating different answers.
-%% ---------------------------------------------------------------------------
-
-%% Answer using the record or list encoding depending on
-%% Re-Auth-Request-Type. This is just as an example. You would
-%% typically just choose one, and this has nothing to do with the how
-%% client.erl sends.
-
-answer(0, Id, OH, OR) ->
- #diameter_base_RAA{'Result-Code' = 2001, %% DIAMETER_SUCCESS
- 'Origin-Host' = OH,
- 'Origin-Realm' = OR,
- 'Session-Id' = Id};
-
-answer(_, Id, OH, OR) ->
- ['RAA', {'Result-Code', 5012}, %% DIAMETER_UNABLE_TO_COMPLY
- {'Origin-Host', OH},
- {'Origin-Realm', OR},
- {'Session-Id', Id}].
+rc(0) ->
+ 2001; %% DIAMETER_SUCCESS
+rc(_) ->
+ 5012. %% DIAMETER_UNABLE_TO_COMPLY
diff --git a/lib/diameter/include/diameter.hrl b/lib/diameter/include/diameter.hrl
index 79c4dce541..c2c271a9a3 100644
--- a/lib/diameter/include/diameter.hrl
+++ b/lib/diameter/include/diameter.hrl
@@ -1,7 +1,7 @@
%%
%% %CopyrightBegin%
%%
-%% Copyright Ericsson AB 2010-2013. All Rights Reserved.
+%% Copyright Ericsson AB 2010-2014. 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
@@ -58,8 +58,8 @@
-record(diameter_header,
{version, %% 8-bit unsigned
length, %% 24-bit unsigned
- cmd_code, %% 8-bit unsigned
- application_id, %% 24-bit unsigned
+ cmd_code, %% 24-bit unsigned
+ application_id, %% 32-bit unsigned
hop_by_hop_id, %% 32-bit unsigned
end_to_end_id, %% 32-bit unsigned
is_request, %% boolean() R flag
@@ -126,7 +126,7 @@
default,
extra = []}).
-%% The diameter service and diameter_apps records are only passed
+%% The diameter service and diameter_app records are only passed
%% through the transport interface when starting a transport process,
%% although typically a transport implementation will (and probably
%% should) only be interested host_ip_address.
@@ -143,6 +143,7 @@
init_state, %% option 'state', initial callback state
id, %% 32-bit unsigned application identifier = Dict:id()
mutable = false, %% boolean(), do traffic callbacks modify state?
- options = [{answer_errors, report}, %% | callback | discard
+ options = [{answer_errors, discard}, %% | callback | report
{request_errors, answer_3xxx}]}). %% | callback | answer
+
-endif. %% -ifdef(diameter_hrl).
diff --git a/lib/diameter/include/diameter_gen.hrl b/lib/diameter/include/diameter_gen.hrl
index 55aae3a243..7e91ce375f 100644
--- a/lib/diameter/include/diameter_gen.hrl
+++ b/lib/diameter/include/diameter_gen.hrl
@@ -1,7 +1,7 @@
%%
%% %CopyrightBegin%
%%
-%% Copyright Ericsson AB 2010-2013. All Rights Reserved.
+%% Copyright Ericsson AB 2010-2014. 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
@@ -25,6 +25,15 @@
-define(THROW(T), throw({?MODULE, T})).
+%% Key to a value in the process dictionary that determines whether or
+%% not an unrecognized AVP setting the M-bit should be regarded as an
+%% error or not. See is_strict/0.
+-define(STRICT_KEY, strict).
+
+%% Key that says whether or not we should do a best-effort decode
+%% within Failed-AVP.
+-define(FAILED_KEY, failed).
+
-type parent_name() :: atom(). %% parent = Message or AVP
-type parent_record() :: tuple(). %%
-type avp_name() :: atom().
@@ -35,6 +44,18 @@
-type grouped_avp() :: nonempty_improper_list(#diameter_avp{}, [avp()]).
-type avp() :: non_grouped_avp() | grouped_avp().
+%% Use a (hopefully) unique key when manipulating the process
+%% dictionary.
+
+putr(K,V) ->
+ put({?MODULE, K}, V).
+
+getr(K) ->
+ get({?MODULE, K}).
+
+eraser(K) ->
+ erase({?MODULE, K}).
+
%% ---------------------------------------------------------------------------
%% # encode_avps/2
%% ---------------------------------------------------------------------------
@@ -212,46 +233,151 @@ decode(Name, #diameter_avp{code = Code, vendor_id = Vid} = Avp, Acc) ->
%% decode/4
+%% AVP is defined in the dictionary ...
decode(Name, {AvpName, Type}, Avp, Acc) ->
d(Name, Avp#diameter_avp{name = AvpName, type = Type}, Acc);
+%% ... or not.
decode(Name, 'AVP', Avp, Acc) ->
decode_AVP(Name, Avp, Acc).
-%% d/3
+%% 6733, 4.4:
+%%
+%% Receivers of a Grouped AVP that does not have the 'M' (mandatory)
+%% bit set and one or more of the encapsulated AVPs within the group
+%% has the 'M' (mandatory) bit set MAY simply be ignored if the
+%% Grouped AVP itself is unrecognized. The rule applies even if the
+%% encapsulated AVP with its 'M' (mandatory) bit set is further
+%% encapsulated within other sub-groups, i.e., other Grouped AVPs
+%% embedded within the Grouped AVP.
+%%
+%% The first sentence is slightly mangled, but take it to mean this:
+%%
+%% An unrecognized AVP of type Grouped that does not set the 'M' bit
+%% MAY be ignored even if one of its encapsulated AVPs sets the 'M'
+%% bit.
+%%
+%% The text above is a change from RFC 3588, which instead says this:
+%%
+%% Further, if any of the AVPs encapsulated within a Grouped AVP has
+%% the 'M' (mandatory) bit set, the Grouped AVP itself MUST also
+%% include the 'M' bit set.
+%%
+%% Both of these texts have problems. If the AVP is unknown then its
+%% type is unknown since the type isn't sent over the wire, so the
+%% 6733 text becomes a non-statement: don't know that the AVP not
+%% setting the M-bit is of type Grouped, therefore can't know that its
+%% data consists of encapsulated AVPs, therefore can't but ignore that
+%% one of these might set the M-bit. It should be no worse if we know
+%% the AVP to have type Grouped.
+%%
+%% Similarly, for the 3588 text: if we receive an AVP that doesn't set
+%% the M-bit and don't know that the AVP has type Grouped then we
+%% can't realize that its data contains an AVP that sets the M-bit, so
+%% can't regard the AVP as erroneous on this account. Again, it should
+%% be no worse if the type is known to be Grouped, but in this case
+%% the RFC forces us to regard the AVP as erroneous. This is
+%% inconsistent, and the 3588 text has never been enforced.
+%%
+%% So, if an AVP doesn't set the M-bit then we're free to ignore it,
+%% regardless of the AVP's type. If we know the type to be Grouped
+%% then we must ignore the M-bit on an encapsulated AVP. That means
+%% packing such an encapsulated AVP into an 'AVP' field if need be,
+%% not regarding the lack of a specific field as an error as is
+%% otherwise the case. (The lack of an AVP-specific field being how we
+%% defined the RFC's "unrecognized", which is slightly stronger than
+%% "not defined".)
-%% Don't try to decode the value of a Failed-AVP component since it
-%% probably won't. Note that matching on 'Failed-AVP' assumes that
-%% this is the RFC AVP, with code 279. Strictly, this doesn't need to
-%% be the case, so we're assuming no one defines another Failed-AVP.
-d('Failed-AVP' = Name, Avp, Acc) ->
- decode_AVP(Name, Avp, Acc);
+%% d/3
-%% Or try to decode.
-d(Name, Avp, {Avps, Acc}) ->
+d(Name, Avp, Acc) ->
#diameter_avp{name = AvpName,
- data = Data}
+ data = Data,
+ type = Type,
+ is_mandatory = M}
= Avp,
+ %% Use the process dictionary is to keep track of whether or not
+ %% to ignore an M-bit on an encapsulated AVP. Not ideal, but the
+ %% alternative requires widespread changes to be able to pass the
+ %% value around through the entire decode. The solution here is
+ %% simple in comparison, both to implement and to understand.
+
+ Strict = relax(Type, M),
+
+ %% Use the process dictionary again to keep track of whether we're
+ %% decoding within Failed-AVP and should ignore decode errors
+ %% altogether.
+
+ Failed = relax(Name), %% Not AvpName or else a failed Failed-AVP
+ %% decode is packed into 'AVP'.
try avp(decode, Data, AvpName) of
V ->
+ {Avps, T} = Acc,
{H, A} = ungroup(V, Avp),
- {[H | Avps], pack_avp(Name, A, Acc)}
+ {[H | Avps], pack_avp(Name, A, T)}
catch
error: Reason ->
- %% Failures here won't be visible since they're a "normal"
- %% occurrence if the peer sends a faulty AVP that we need to
- %% respond sensibly to. Log the occurence for traceability,
- %% but the peer will also receive info in the resulting
- %% answer-message.
- diameter_lib:log({decode, failure},
- ?MODULE,
- ?LINE,
- {Reason, Avp, erlang:get_stacktrace()}),
- {Rec, Failed} = Acc,
- {[Avp|Avps], {Rec, [rc(Reason, Avp) | Failed]}}
+ d(undefined == Failed orelse is_failed(), Reason, Name, Avp, Acc)
+ after
+ reset(?STRICT_KEY, Strict),
+ reset(?FAILED_KEY, Failed)
end.
+%% Ignore a decode error within Failed-AVP ...
+d(true, _, Name, Avp, Acc) ->
+ decode_AVP(Name, Avp, Acc);
+
+%% ... or not. Failures here won't be visible since they're a "normal"
+%% occurrence if the peer sends a faulty AVP that we need to respond
+%% sensibly to. Log the occurence for traceability, but the peer will
+%% also receive info in the resulting answer message.
+d(false, Reason, Name, Avp, {Avps, Acc}) ->
+ Stack = diameter_lib:get_stacktrace(),
+ diameter_lib:log(decode_error,
+ ?MODULE,
+ ?LINE,
+ {Reason, Name, Avp#diameter_avp.name, Stack}),
+ {Rec, Failed} = Acc,
+ {[Avp|Avps], {Rec, [rc(Reason, Avp) | Failed]}}.
+
+%% Set false in the process dictionary as soon as we see a Grouped AVP
+%% that doesn't set the M-bit, so that is_strict() can say whether or
+%% not to ignore the M-bit on an encapsulated AVP.
+relax('Grouped', M) ->
+ case getr(?STRICT_KEY) of
+ undefined when not M ->
+ putr(?STRICT_KEY, M);
+ _ ->
+ false
+ end;
+relax(_, _) ->
+ false.
+
+is_strict() ->
+ false /= getr(?STRICT_KEY).
+
+%% Set true in the process dictionary as soon as we see Failed-AVP.
+%% Matching on 'Failed-AVP' assumes that this is the RFC AVP.
+%% Strictly, this doesn't need to be the case.
+relax('Failed-AVP') ->
+ case getr(?FAILED_KEY) of
+ undefined ->
+ putr(?FAILED_KEY, true);
+ true = Yes ->
+ Yes
+ end;
+relax(_) ->
+ is_failed().
+
+is_failed() ->
+ true == getr(?FAILED_KEY).
+
+reset(Key, undefined) ->
+ eraser(Key);
+reset(_, _) ->
+ ok.
+
%% decode_AVP/3
%%
%% Don't know this AVP: see if it can be packed in an 'AVP' field
@@ -310,15 +436,25 @@ pack_avp(_, Arity, Avp, Acc) ->
%% pack_AVP/3
-%% Give Failed-AVP special treatment since it'll contain any
-%% unrecognized mandatory AVP's.
-pack_AVP(Name, #diameter_avp{is_mandatory = true} = Avp, Acc)
- when Name /= 'Failed-AVP' ->
+%% Length failure was induced because of a header/payload length
+%% mismatch. The AVP Length is reset to match the received data if
+%% this AVP is encoded in an answer message, since the length is
+%% computed.
+%%
+%% Data is a truncated header if command_code = undefined, otherwise
+%% payload bytes. The former is padded to the length of a header if
+%% the AVP reaches an outgoing encode in diameter_codec.
+%%
+%% RFC 6733 says that an AVP returned with 5014 can contain a minimal
+%% payload for the AVP's type, but in this case we don't know the
+%% type.
+
+pack_AVP(_, #diameter_avp{data = <<0:1, Data/binary>>} = Avp, Acc) ->
{Rec, Failed} = Acc,
- {Rec, [{5001, Avp} | Failed]};
+ {Rec, [{5014, Avp#diameter_avp{data = Data}} | Failed]};
pack_AVP(Name, #diameter_avp{is_mandatory = M} = Avp, Acc) ->
- case avp_arity(Name, 'AVP') of
+ case pack_arity(Name, M) of
0 ->
{Rec, Failed} = Acc,
{Rec, [{if M -> 5001; true -> 5008 end, Avp} | Failed]};
@@ -326,6 +462,24 @@ pack_AVP(Name, #diameter_avp{is_mandatory = M} = Avp, Acc) ->
pack(Arity, 'AVP', Avp, Acc)
end.
+%% Give Failed-AVP special treatment since it'll contain any
+%% unrecognized mandatory AVP's.
+pack_arity(Name, M) ->
+ NF = Name /= 'Failed-AVP' andalso not is_failed(),
+ %% Not testing just Name /= 'Failed-AVP' means we're changing the
+ %% packing of AVPs nested within Failed-AVP, but the point of
+ %% ignoring errors within Failed-AVP is to decode as much as
+ %% possible, and failing because a mandatory AVP couldn't be
+ %% packed into a dedicated field defeats that point. Note that we
+ %% can't just test not is_failed() since this will be 'true' when
+ %% packing an unknown AVP directly within Failed-AVP.
+ case NF andalso M andalso is_strict() of
+ true ->
+ 0;
+ false ->
+ avp_arity(Name, 'AVP')
+ end.
+
%% 3588:
%%
%% DIAMETER_AVP_UNSUPPORTED 5001
diff --git a/lib/diameter/src/Makefile b/lib/diameter/src/Makefile
index 578bbaee2e..9afccf298c 100644
--- a/lib/diameter/src/Makefile
+++ b/lib/diameter/src/Makefile
@@ -1,7 +1,7 @@
#
# %CopyrightBegin%
#
-# Copyright Ericsson AB 2010-2013. All Rights Reserved.
+# Copyright Ericsson AB 2010-2014. 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
@@ -41,7 +41,7 @@ INCDIR = ../include
ABS_EBIN := $(shell cd $(EBIN) && pwd)
# Where make should look for dependencies.
-VPATH = .:base:compiler:transport:gen
+VPATH = .:base:compiler:transport:gen:info
# ----------------------------------------------------
# Target specs
@@ -55,13 +55,13 @@ DICT_ERLS = $(DICT_MODULES:%=%.erl)
DICT_HRLS = $(DICT_MODULES:%=%.hrl)
# Modules to build before compiling dictionaries.
-COMPILER_MODULES = $(notdir $(filter compiler/%, $(CT_MODULES))) \
- $(DICT_YRL)
+COMPILER_MODULES = $(notdir $(CT_MODULES)) $(DICT_YRL)
# All handwritten modules from which a depend.mk is generated.
MODULES = \
$(RT_MODULES) \
- $(CT_MODULES)
+ $(CT_MODULES) \
+ $(INFO_MODULES)
# Modules whose names are inserted into the app file.
APP_MODULES = \
@@ -72,6 +72,7 @@ APP_MODULES = \
TARGET_MODULES = \
$(APP_MODULES) \
$(CT_MODULES) \
+ $(INFO_MODULES) \
$(DICT_YRL:%=gen/%)
# What to build for the 'opt' target.
@@ -147,14 +148,19 @@ gen/$(DICT_YRL).erl: compiler/$(DICT_YRL).yrl
$(ERLC) -Werror -o $(@D) $<
# Generate the app file.
-$(APP_TARGET): $(APP_SRC) ../vsn.mk modules.mk
+$(APP_TARGET): $(APP_SRC) ../vsn.mk modules.mk app.sed
$(gen_verbose) \
M=`echo $(notdir $(APP_MODULES)) | tr ' ' ,`; \
+ C=`echo $(COMPILER_MODULES) | tr ' ' ,`; \
+ I=`echo $(notdir $(INFO_MODULES)) | tr ' ' ,`; \
R=`echo $(REGISTERED) | tr ' ' ,`; \
sed -e 's;%VSN%;$(VSN);' \
-e "s;%MODULES%;$$M;" \
+ -e "s;%COMPILER%;$$C;" \
+ -e "s;%INFO%;$$I;" \
-e "s;%REGISTERED%;$$R;" \
- $< > $@
+ $< \
+ | sed -f app.sed > $@
$(APPUP_TARGET): $(APPUP_SRC) ../vsn.mk
$(vsn_verbose) \
@@ -177,6 +183,8 @@ info:
@echo
@$(call list,CT_MODULES)
@echo
+ @$(call list,INFO_MODULES)
+ @echo
@$(call list,TARGET_MODULES)
@echo
@$(call list,TARGET_DIRS)
@@ -216,7 +224,7 @@ dialyze: opt $(PLT)
-Wno_improper_lists \
$(EBIN)/diameter_gen_base_rfc3588.$(EMULATOR) \
$(patsubst %, $(EBIN)/%.$(EMULATOR), \
- $(notdir $(RT_MODULES) $(CT_MODULES)))
+ $(notdir $(RT_MODULES) $(CT_MODULES) $(INFO_MODULES)))
# Omit all but the common dictionary module since these
# (diameter_gen_relay in particular) generate warning depending on how
# much of the included diameter_gen.hrl they use.
diff --git a/lib/diameter/src/app.sed b/lib/diameter/src/app.sed
new file mode 100644
index 0000000000..7916f65002
--- /dev/null
+++ b/lib/diameter/src/app.sed
@@ -0,0 +1,40 @@
+#
+# %CopyrightBegin%
+#
+# Copyright Ericsson AB 2014. 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%
+
+#
+# Generate runtime_dependencies from applications to avoid having to
+# specify the same application more than once.
+#
+
+/{runtime_dependencies,/b v
+/{[-a-z]*, "[0-9.]*"}/!b
+/{vsn,/b
+
+/%%/!H
+s/{\([^,]*\)[^}]*}/\1/g
+s/%%/%,/
+b
+
+:v
+
+p
+x
+s/\n//
+s/%//g
+s/\n */ /g
+s/{\([^,]*\), "\([^"]*"\)}/"\1-\2/g
diff --git a/lib/diameter/src/base/diameter_codec.erl b/lib/diameter/src/base/diameter_codec.erl
index 0de4d53973..06a4f5de64 100644
--- a/lib/diameter/src/base/diameter_codec.erl
+++ b/lib/diameter/src/base/diameter_codec.erl
@@ -1,7 +1,7 @@
%%
%% %CopyrightBegin%
%%
-%% Copyright Ericsson AB 2010-2013. All Rights Reserved.
+%% Copyright Ericsson AB 2010-2014. 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
@@ -70,12 +70,15 @@ encode(Mod, #diameter_packet{} = Pkt) ->
try
e(Mod, Pkt)
catch
+ exit: {Reason, Stack, #diameter_header{} = H} = T ->
+ %% Exit with a header in the reason to let the caller
+ %% count encode errors.
+ ?LOG(encode_error, {Reason, Stack, H}),
+ exit({?MODULE, encode, T});
error: Reason ->
- %% Be verbose since a crash report may be truncated and
- %% encode errors are self-inflicted.
- X = {?MODULE, encode, {Reason, ?STACK}},
- diameter_lib:error_report(X, {?MODULE, encode, [Mod, Pkt]}),
- exit(X)
+ T = {Reason, diameter_lib:get_stacktrace()},
+ ?LOG(encode_error, T),
+ exit({?MODULE, encode, T})
end;
encode(Mod, Msg) ->
@@ -87,53 +90,62 @@ encode(Mod, Msg) ->
msg = Msg}).
e(_, #diameter_packet{msg = [#diameter_header{} = Hdr | As]} = Pkt) ->
- Avps = encode_avps(As),
- Length = size(Avps) + 20,
-
- #diameter_header{version = Vsn,
- cmd_code = Code,
- application_id = Aid,
- hop_by_hop_id = Hid,
- end_to_end_id = Eid}
- = Hdr,
-
- Flags = make_flags(0, Hdr),
-
- Pkt#diameter_packet{header = Hdr,
- bin = <<Vsn:8, Length:24,
- Flags:8, Code:24,
- Aid:32,
- Hid:32,
- Eid:32,
- Avps/binary>>};
+ try encode_avps(As) of
+ Avps ->
+ Length = size(Avps) + 20,
+
+ #diameter_header{version = Vsn,
+ cmd_code = Code,
+ application_id = Aid,
+ hop_by_hop_id = Hid,
+ end_to_end_id = Eid}
+ = Hdr,
+
+ Flags = make_flags(0, Hdr),
+
+ Pkt#diameter_packet{header = Hdr,
+ bin = <<Vsn:8, Length:24,
+ Flags:8, Code:24,
+ Aid:32,
+ Hid:32,
+ Eid:32,
+ Avps/binary>>}
+ catch
+ error: Reason ->
+ exit({Reason, diameter_lib:get_stacktrace(), Hdr})
+ end;
-e(Mod, #diameter_packet{header = Hdr, msg = Msg} = Pkt) ->
+e(Mod, #diameter_packet{header = Hdr0, msg = Msg} = Pkt) ->
#diameter_header{version = Vsn,
hop_by_hop_id = Hid,
end_to_end_id = Eid}
- = Hdr,
+ = Hdr0,
MsgName = rec2msg(Mod, Msg),
- {Code, Flags0, Aid} = msg_header(Mod, MsgName, Hdr),
- Flags = make_flags(Flags0, Hdr),
-
- Avps = encode_avps(Mod, MsgName, values(Msg)),
- Length = size(Avps) + 20,
-
- Pkt#diameter_packet{header = Hdr#diameter_header
- {length = Length,
- cmd_code = Code,
- application_id = Aid,
- is_request = 0 /= ?MASK(7, Flags),
- is_proxiable = 0 /= ?MASK(6, Flags),
- is_error = 0 /= ?MASK(5, Flags),
- is_retransmitted = 0 /= ?MASK(4, Flags)},
- bin = <<Vsn:8, Length:24,
- Flags:8, Code:24,
- Aid:32,
- Hid:32,
- Eid:32,
- Avps/binary>>}.
+ {Code, Flags0, Aid} = msg_header(Mod, MsgName, Hdr0),
+ Flags = make_flags(Flags0, Hdr0),
+ Hdr = Hdr0#diameter_header{cmd_code = Code,
+ application_id = Aid,
+ is_request = 0 /= ?MASK(7, Flags),
+ is_proxiable = 0 /= ?MASK(6, Flags),
+ is_error = 0 /= ?MASK(5, Flags),
+ is_retransmitted = 0 /= ?MASK(4, Flags)},
+ Values = values(Msg),
+
+ try encode_avps(Mod, MsgName, Values) of
+ Avps ->
+ Length = size(Avps) + 20,
+ Pkt#diameter_packet{header = Hdr#diameter_header{length = Length},
+ bin = <<Vsn:8, Length:24,
+ Flags:8, Code:24,
+ Aid:32,
+ Hid:32,
+ Eid:32,
+ Avps/binary>>}
+ catch
+ error: Reason ->
+ exit({Reason, diameter_lib:get_stacktrace(), Hdr})
+ end.
%% make_flags/2
@@ -225,7 +237,7 @@ rec2msg(Mod, Rec) ->
%% Unsuccessfully decoded AVPs will be placed in #diameter_packet.errors.
--spec decode(module(), #diameter_packet{} | bitstring())
+-spec decode(module(), #diameter_packet{} | binary())
-> #diameter_packet{}.
decode(Mod, Pkt) ->
@@ -259,34 +271,34 @@ decode(_, Mod, #diameter_packet{header = Hdr} = Pkt) ->
decode_avps(MsgName, Mod, Pkt, collect_avps(Pkt));
decode(Id, Mod, Bin)
- when is_bitstring(Bin) ->
+ when is_binary(Bin) ->
decode(Id, Mod, #diameter_packet{header = decode_header(Bin), bin = Bin}).
decode_avps(MsgName, Mod, Pkt, {E, Avps}) ->
- ?LOG(invalid, Pkt#diameter_packet.bin),
+ ?LOG(invalid_avp_length, Pkt#diameter_packet.header),
#diameter_packet{errors = Failed}
= P
= decode_avps(MsgName, Mod, Pkt, Avps),
P#diameter_packet{errors = [E | Failed]};
-decode_avps('', Mod, Pkt, Avps) -> %% unknown message ...
- ?LOG(unknown, {Mod, Pkt#diameter_packet.header}),
+decode_avps('', _, Pkt, Avps) -> %% unknown message ...
+ ?LOG(unknown_message, Pkt#diameter_packet.header),
Pkt#diameter_packet{avps = lists:reverse(Avps),
errors = [3001]}; %% DIAMETER_COMMAND_UNSUPPORTED
%% msg = undefined identifies this case.
decode_avps(MsgName, Mod, Pkt, Avps) -> %% ... or not
- {Rec, As, Failed} = Mod:decode_avps(MsgName, Avps),
- ?LOGC([] /= Failed, failed, {Mod, Failed}),
+ {Rec, As, Errors} = Mod:decode_avps(MsgName, Avps),
+ ?LOGC([] /= Errors, decode_errors, Pkt#diameter_packet.header),
Pkt#diameter_packet{msg = Rec,
- errors = Failed,
+ errors = Errors,
avps = As}.
%%% ---------------------------------------------------------------------------
%%% # decode_header/1
%%% ---------------------------------------------------------------------------
--spec decode_header(bitstring())
+-spec decode_header(binary())
-> #diameter_header{}
| false.
@@ -297,7 +309,7 @@ decode_header(<<Version:8,
ApplicationId:32,
HopByHopId:32,
EndToEndId:32,
- _/bitstring>>) ->
+ _/binary>>) ->
<<R:1, P:1, E:1, T:1, _:4>>
= CmdFlags,
%% 3588 (ch 3) says that reserved bits MUST be set to 0 and ignored
@@ -410,7 +422,7 @@ msg_id(#diameter_header{application_id = A,
is_request = R}) ->
{A, C, if R -> 1; true -> 0 end};
-msg_id(<<_:32, Rbit:1, _:7, CmdCode:24, ApplId:32, _/bitstring>>) ->
+msg_id(<<_:32, Rbit:1, _:7, CmdCode:24, ApplId:32, _/binary>>) ->
{ApplId, CmdCode, Rbit}.
%%% ---------------------------------------------------------------------------
@@ -421,17 +433,18 @@ msg_id(<<_:32, Rbit:1, _:7, CmdCode:24, ApplId:32, _/bitstring>>) ->
%% order in the binary. Note also that grouped avp's aren't unraveled,
%% only those at the top level.
--spec collect_avps(#diameter_packet{} | bitstring())
+-spec collect_avps(#diameter_packet{} | binary())
-> [Avp]
| {Error, [Avp]}
when Avp :: #diameter_avp{},
Error :: {5014, #diameter_avp{}}.
collect_avps(#diameter_packet{bin = Bin}) ->
- <<_:20/binary, Avps/bitstring>> = Bin,
+ <<_:20/binary, Avps/binary>> = Bin,
collect_avps(Avps);
-collect_avps(Bin) ->
+collect_avps(Bin)
+ when is_binary(Bin) ->
collect_avps(Bin, 0, []).
collect_avps(<<>>, _, Acc) ->
@@ -461,7 +474,9 @@ collect_avps(Bin, N, Acc) ->
split_avp(Bin) ->
{Code, V, M, P, Len, HdrLen} = split_head(Bin),
- {Data, B} = split_data(Bin, HdrLen, Len - HdrLen),
+
+ <<_:HdrLen/binary, Rest/binary>> = Bin,
+ {Data, B} = split_data(Rest, Len - HdrLen),
{B, #diameter_avp{code = Code,
vendor_id = V,
@@ -471,17 +486,15 @@ split_avp(Bin) ->
%% split_head/1
-split_head(<<Code:32, 1:1, M:1, P:1, _:5, Len:24, V:32, _/bitstring>>) ->
+split_head(<<Code:32, 1:1, M:1, P:1, _:5, Len:24, V:32, _/binary>>) ->
{Code, V, M, P, Len, 12};
-split_head(<<Code:32, 0:1, M:1, P:1, _:5, Len:24, _/bitstring>>) ->
+split_head(<<Code:32, 0:1, M:1, P:1, _:5, Len:24, _/binary>>) ->
{Code, undefined, M, P, Len, 8};
-%% Header is truncated: pack_avp/1 will pad to the minimum header
-%% length.
-split_head(B)
- when is_bitstring(B) ->
- ?THROW({5014, #diameter_avp{data = B}}).
+%% Header is truncated.
+split_head(Bin) ->
+ ?THROW({5014, #diameter_avp{data = Bin}}).
%% 3588:
%%
@@ -516,34 +529,27 @@ split_head(B)
%% split_data/3
-split_data(Bin, HdrLen, Len)
- when 0 =< Len ->
- split_data(Bin, HdrLen, Len, (4 - (Len rem 4)) rem 4);
+split_data(Bin, Len) ->
+ Pad = (4 - (Len rem 4)) rem 4,
-split_data(_, _, _) ->
- invalid_avp_length().
+ %% Len might be negative here, but that ensures the failure of the
+ %% binary match.
-%% split_data/4
-
-split_data(Bin, HdrLen, Len, Pad) ->
case Bin of
- <<_:HdrLen/binary, Data:Len/binary, _:Pad/binary, Rest/bitstring>> ->
+ <<Data:Len/binary, _:Pad/binary, Rest/binary>> ->
{Data, Rest};
_ ->
- invalid_avp_length()
+ %% Header length points past the end of the message. As
+ %% stated in the 6733 text above, it's sufficient to
+ %% return a zero-filled minimal payload if this is a
+ %% request. Do this (in cases that we know the type) by
+ %% inducing a decode failure and letting the dictionary's
+ %% decode (in diameter_gen) deal with it. Here we don't
+ %% know type. If the type isn't known, then the decode
+ %% just strips the extra bit.
+ {<<0:1, Bin/binary>>, <<>>}
end.
-%% invalid_avp_length/0
-%%
-%% AVP Length doesn't mesh with payload. Induce a decode error by
-%% returning a payload that no valid Diameter type can have. This is
-%% so that a known AVP will result in 5014 error with a zero'd
-%% payload. Here we simply don't know how to construct this payload.
-%% (Yes, this solution is an afterthought.)
-
-invalid_avp_length() ->
- {<<0:1>>, <<>>}.
-
%%% ---------------------------------------------------------------------------
%%% # pack_avp/1
%%% ---------------------------------------------------------------------------
@@ -575,17 +581,23 @@ pack_avp(#diameter_avp{data = {Dict, Name, Value}} = A) ->
{Name, Type} = Dict:avp_name(Code, Vid),
pack_avp(A#diameter_avp{data = {Hdr, {Type, Value}}});
+%% ... with a truncated header ...
pack_avp(#diameter_avp{code = undefined, data = B})
- when is_bitstring(B) ->
+ when is_binary(B) ->
%% Reset the AVP Length of an AVP Header resulting from a 5014
%% error. The RFC doesn't explicitly say to do this but the
%% receiver can't correctly extract this and following AVP's
%% without a correct length. On the downside, the header doesn't
%% reveal if the received header has been padded.
Pad = 8*header_length(B) - bit_size(B),
- Len = size(<<H:5/binary, _:24, T/binary>> = <<B/bitstring, 0:Pad>>),
+ Len = size(<<H:5/binary, _:24, T/binary>> = <<B/binary, 0:Pad>>),
<<H/binary, Len:24, T/binary>>;
+%% ... from a dictionary compiled against old code in diameter_gen ...
+%% ... when ignoring errors in Failed-AVP ...
+pack_avp(#diameter_avp{data = <<0:1, B/binary>>} = A) ->
+ pack_avp(A#diameter_avp{data = B});
+
%% ... or as an iolist.
pack_avp(#diameter_avp{code = Code,
vendor_id = V,
diff --git a/lib/diameter/src/base/diameter_config.erl b/lib/diameter/src/base/diameter_config.erl
index f5ea459fd0..dd1c9b73bb 100644
--- a/lib/diameter/src/base/diameter_config.erl
+++ b/lib/diameter/src/base/diameter_config.erl
@@ -1,7 +1,7 @@
%%
%% %CopyrightBegin%
%%
-%% Copyright Ericsson AB 2010-2013. All Rights Reserved.
+%% Copyright Ericsson AB 2010-2014. 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
@@ -753,7 +753,7 @@ app_acc({application, Opts} = T, Acc) ->
Alias = get_opt(alias, Opts, Dict),
ModS = get_opt(state, Opts, Alias),
M = get_opt(call_mutates_state, Opts, false, [true]),
- A = get_opt(answer_errors, Opts, report, [callback, discard]),
+ A = get_opt(answer_errors, Opts, discard, [callback, report]),
P = get_opt(request_errors, Opts, answer_3xxx, [answer, callback]),
[#diameter_app{alias = Alias,
dictionary = Dict,
diff --git a/lib/diameter/src/base/diameter_lib.erl b/lib/diameter/src/base/diameter_lib.erl
index 44d81e2778..5b3a2063f8 100644
--- a/lib/diameter/src/base/diameter_lib.erl
+++ b/lib/diameter/src/base/diameter_lib.erl
@@ -1,7 +1,7 @@
%%
%% %CopyrightBegin%
%%
-%% Copyright Ericsson AB 2010-2013. All Rights Reserved.
+%% Copyright Ericsson AB 2010-2014. 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
@@ -25,6 +25,8 @@
now_diff/1,
time/1,
eval/1,
+ eval_name/1,
+ get_stacktrace/0,
ipaddr/1,
spawn_opts/2,
wait/1,
@@ -32,6 +34,22 @@
log/4]).
%% ---------------------------------------------------------------------------
+%% # get_stacktrace/0
+%% ---------------------------------------------------------------------------
+
+%% Return a stacktrace with a leading, potentially large, argument
+%% list replaced by an arity. Trace on stacktrace/0 to see the
+%% original.
+
+get_stacktrace() ->
+ stacktrace(erlang:get_stacktrace()).
+
+stacktrace([{M,F,A,L} | T]) when is_list(A) ->
+ [{M, F, length(A), L} | T];
+stacktrace(L) ->
+ L.
+
+%% ---------------------------------------------------------------------------
%% # info_report/2
%% ---------------------------------------------------------------------------
@@ -60,9 +78,17 @@ warning_report(Reason, T) ->
report(fun error_logger:warning_report/1, Reason, T).
report(Fun, Reason, T) ->
- Fun([{why, Reason}, {who, self()}, {what, T}]),
+ Fun(io_lib:format("diameter: ~" ++ fmt(Reason) ++ "~n ~p~n",
+ [Reason, T])),
false.
+fmt(T) ->
+ if is_list(T) ->
+ "s";
+ true ->
+ "p"
+ end.
+
%% ---------------------------------------------------------------------------
%% # now_diff/1
%% ---------------------------------------------------------------------------
@@ -129,8 +155,8 @@ eval({M,F,A}) ->
eval([{M,F,A} | X]) ->
apply(M, F, X ++ A);
-eval([[F|A] | X]) ->
- eval([F | X ++ A]);
+eval([[F|X] | A]) ->
+ eval([F | A ++ X]);
eval([F|A]) ->
apply(F,A);
@@ -142,6 +168,28 @@ eval(F) ->
F().
%% ---------------------------------------------------------------------------
+%% eval_name/1
+%% ---------------------------------------------------------------------------
+
+eval_name({M,F,A}) ->
+ {M, F, length(A)};
+
+eval_name([{M,F,A} | X]) ->
+ {M, F, length(A) + length(X)};
+
+eval_name([[F|A] | X]) ->
+ eval_name([F | X ++ A]);
+
+eval_name([F|_]) ->
+ F;
+
+eval_name({F}) ->
+ eval_name(F);
+
+eval_name(F) ->
+ F.
+
+%% ---------------------------------------------------------------------------
%% # ipaddr/1
%%
%% Parse an IP address.
diff --git a/lib/diameter/src/base/diameter_peer_fsm.erl b/lib/diameter/src/base/diameter_peer_fsm.erl
index 282276827f..31e570ae20 100644
--- a/lib/diameter/src/base/diameter_peer_fsm.erl
+++ b/lib/diameter/src/base/diameter_peer_fsm.erl
@@ -1,7 +1,7 @@
%%
%% %CopyrightBegin%
%%
-%% Copyright Ericsson AB 2010-2013. All Rights Reserved.
+%% Copyright Ericsson AB 2010-2014. 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
@@ -189,11 +189,7 @@ i({Ack, WPid, {M, Ref} = T, Opts, {Mask, Nodes, Dict0, Svc}}) ->
putr(?RESTRICT_KEY, Nodes),
Tmo = proplists:get_value(capx_timeout, Opts, ?EVENT_TIMEOUT),
- ?IS_TIMEOUT(Tmo) orelse ?ERROR({invalid, {capx_timeout, Tmo}}),
OnLengthErr = proplists:get_value(length_errors, Opts, exit),
- lists:member(OnLengthErr, [exit, handle, discard])
- orelse ?ERROR({invalid, {length_errors, OnLengthErr}}),
- %% Error checking is for configuration added in old code.
{TPid, Addrs} = start_transport(T, Rest, Svc),
@@ -287,7 +283,7 @@ handle_info(T, #state{} = State) ->
ok ->
{noreply, State};
#state{state = X} = S ->
- ?LOGC(X =/= State#state.state, transition, X),
+ ?LOGC(X /= State#state.state, transition, X),
{noreply, S};
{stop, Reason} ->
?LOG(stop, Reason),
@@ -296,15 +292,12 @@ handle_info(T, #state{} = State) ->
?LOG(stop, T),
{stop, {shutdown, T}, State}
catch
- exit: {diameter_codec, encode, _} = Reason ->
+ exit: {diameter_codec, encode, T} = Reason ->
+ incr_error(send, T, State#state.dictionary),
?LOG(stop, Reason),
- %% diameter_codec:encode/2 emits an error report. Only
- %% indicate the probable reason here.
- diameter_lib:info_report(probable_configuration_error,
- insufficient_capabilities),
{stop, {shutdown, Reason}, State};
{?MODULE, Tag, Reason} ->
- ?LOG(Tag, {Reason, T}),
+ ?LOG(stop, Tag),
{stop, {shutdown, Reason}, State}
end.
%% The form of the throw caught here is historical. It's
@@ -480,12 +473,12 @@ send_CER(#state{state = {'Wait-Conn-Ack', Tmo},
orelse
close({already_connected, Remote, LCaps}),
CER = build_CER(S),
- ?LOG(send, 'CER'),
#diameter_packet{header = #diameter_header{end_to_end_id = Eid,
hop_by_hop_id = Hid}}
= Pkt
= encode(CER, Dict),
send(TPid, Pkt),
+ ?LOG(send, 'CER'),
start_timer(Tmo, S#state{state = {'Wait-CEA', Hid, Eid}}).
%% Register ourselves as connecting to the remote endpoint in
@@ -530,7 +523,6 @@ recv(#diameter_packet{header = #diameter_header{} = Hdr}
= S) ->
Name = diameter_codec:msg_name(Dict0, Hdr),
Pid ! {recv, self(), Name, Pkt},
- diameter_stats:incr({msg_id(Name, Hdr), recv}), %% count received
rcv(Name, Pkt, S);
recv(#diameter_packet{header = undefined,
@@ -557,42 +549,30 @@ recv(#diameter_header{length = Len}
recv(#diameter_header{}
= H,
#diameter_packet{bin = Bin},
- #state{length_errors = E}
- = S) ->
- invalid(E,
- invalid_message_length,
- recv,
- [size(Bin), bit_size(Bin) rem 8, H, S]);
+ #state{length_errors = E}) ->
+ T = {size(Bin), bit_size(Bin) rem 8, H},
+ invalid(E, message_length_mismatch, T);
-recv(false, Pkt, #state{length_errors = E} = S) ->
- invalid(E, truncated_header, recv, [Pkt, S]).
+recv(false, #diameter_packet{bin = Bin}, #state{length_errors = E}) ->
+ invalid(E, truncated_header, Bin).
%% Note that counters here only count discarded messages.
-invalid(E, Reason, F, A) ->
+invalid(E, Reason, T) ->
diameter_stats:incr(Reason),
- abort(E, Reason, F, A).
-
-abort(exit, Reason, F, A) ->
- diameter_lib:warning_report(Reason, {?MODULE, F, A}),
- throw({?MODULE, abort, Reason});
-
-abort(_, _, _, _) ->
+ E == exit andalso close({Reason, T}),
+ ?LOG(Reason, T),
ok.
-msg_id({_,_,_} = T, _) ->
- T;
-msg_id(_, Hdr) ->
- {_,_,_} = diameter_codec:msg_id(Hdr).
-
%% rcv/3
%% Incoming CEA.
-rcv('CEA',
+rcv('CEA' = N,
#diameter_packet{header = #diameter_header{end_to_end_id = Eid,
hop_by_hop_id = Hid}}
= Pkt,
#state{state = {'Wait-CEA', Hid, Eid}}
= S) ->
+ ?LOG(recv, N),
handle_CEA(Pkt, S);
%% Incoming CER
@@ -613,34 +593,71 @@ rcv('DPR' = N, Pkt, S) ->
%% DPA in response to DPR and with the expected identifiers.
rcv('DPA' = N,
#diameter_packet{header = #diameter_header{end_to_end_id = Eid,
- hop_by_hop_id = Hid}},
- #state{transport = TPid,
+ hop_by_hop_id = Hid}
+ = H}
+ = Pkt,
+ #state{dictionary = Dict0,
+ transport = TPid,
dpr = {Hid, Eid}}) ->
+ ?LOG(recv, N),
+ incr(recv, H, Dict0),
+ incr_rc(recv, diameter_codec:decode(Dict0, Pkt), Dict0),
diameter_peer:close(TPid),
{stop, N};
%% Ignore anything else, an unsolicited DPA in particular.
+rcv(N, #diameter_packet{header = H}, _)
+ when N == 'CER';
+ N == 'CEA';
+ N == 'DPR';
+ N == 'DPA' ->
+ ?LOG(ignored, N),
+ %% Note that these aren't counted in the normal recv counter.
+ diameter_stats:incr({diameter_codec:msg_id(H), recv, ignored}),
+ ok;
+
rcv(_, _, _) ->
ok.
+%% incr/3
+
+incr(Dir, Hdr, Dict0) ->
+ diameter_traffic:incr(Dir, Hdr, self(), Dict0).
+
+%% incr_rc/3
+
+incr_rc(Dir, Pkt, Dict0) ->
+ diameter_traffic:incr_rc(Dir, Pkt, self(), Dict0).
+
+%% incr_error/3
+
+incr_error(Dir, Pkt, Dict0) ->
+ diameter_traffic:incr_error(Dir, Pkt, self(), Dict0).
+
%% send/2
%% Msg here could be a #diameter_packet or a binary depending on who's
%% sending. In particular, the watchdog will send DWR as a binary
%% while messages coming from clients will be in a #diameter_packet.
send(Pid, Msg) ->
- diameter_stats:incr({diameter_codec:msg_id(Msg), send}),
diameter_peer:send(Pid, Msg).
%% handle_request/3
+%%
+%% Incoming CER or DPR.
-handle_request(Type, #diameter_packet{} = Pkt, #state{dictionary = D} = S) ->
- ?LOG(recv, Type),
- send_answer(Type, diameter_codec:decode(D, Pkt), S).
+handle_request(Name,
+ #diameter_packet{header = H} = Pkt,
+ #state{dictionary = Dict0} = S) ->
+ ?LOG(recv, Name),
+ incr(recv, H, Dict0),
+ send_answer(Name, diameter_codec:decode(Dict0, Pkt), S).
%% send_answer/3
send_answer(Type, ReqPkt, #state{transport = TPid, dictionary = Dict} = S) ->
+ incr_error(recv, ReqPkt, Dict),
+
#diameter_packet{header = H,
transport_data = TD}
= ReqPkt,
@@ -657,13 +674,19 @@ send_answer(Type, ReqPkt, #state{transport = TPid, dictionary = Dict} = S) ->
msg = Msg,
transport_data = TD},
- send(TPid, diameter_codec:encode(Dict, Pkt)),
+ AnsPkt = diameter_codec:encode(Dict, Pkt),
+
+ incr(send, AnsPkt, Dict),
+ incr_rc(send, AnsPkt, Dict),
+ send(TPid, AnsPkt),
+ ?LOG(send, ans(Type)),
eval(PostF, S).
+ans('CER') -> 'CEA';
+ans('DPR') -> 'DPA'.
+
eval([F|A], S) ->
apply(F, A ++ [S]);
-eval(ok, S) ->
- S;
eval(T, _) ->
close(T).
@@ -727,8 +750,8 @@ cea(CEA, RC, Dict0) ->
post('CER' = T, RC, Pkt, S) ->
{T, caps(S), {RC, Pkt}};
-post('DPR', _, _, _) ->
- ok.
+post('DPR' = T, _, _, #state{parent = Pid}) ->
+ [fun(S) -> Pid ! {T, self()}, S end].
rejected({capabilities_cb, _F, Reason}, T, S) ->
rejected(Reason, T, S);
@@ -738,7 +761,7 @@ rejected(discard, T, _) ->
rejected({N, Es}, T, S) ->
{answer('CER', N, failed_avp(N, Es), S), T};
rejected(N, T, S) ->
- rejected({N, []}, T, S).
+ {answer('CER', N, [], S), T}.
failed_avp(RC, [{RC, Avp} | _]) ->
[{'Failed-AVP', [[{'AVP', [Avp]}]]}];
@@ -782,10 +805,6 @@ set([_|_] = Ans, FailedAvp) ->
result_code(#diameter_header{is_error = true}, _) ->
{3008, []}; %% DIAMETER_INVALID_HDR_BITS
-result_code(_, [Bs|_])
- when is_bitstring(Bs) -> %% from old code
- {3009, []}; %% DIAMETER_INVALID_HDR_BITS
-
result_code(#diameter_header{version = ?DIAMETER_VERSION}, Es) ->
rc(Es);
@@ -856,28 +875,27 @@ recv_CER(CER, #state{service = Svc, dictionary = Dict}) ->
close({'CER', CER, Svc, Dict, Reason})
end.
-%% handle_CEA/1
+%% handle_CEA/2
-handle_CEA(#diameter_packet{bin = Bin}
+handle_CEA(#diameter_packet{header = H}
= Pkt,
#state{dictionary = Dict0,
service = #diameter_service{capabilities = LCaps}}
- = S)
- when is_binary(Bin) ->
- ?LOG(recv, 'CEA'),
+ = S) ->
+ incr(recv, H, Dict0),
- #diameter_packet{msg = CEA}
+ #diameter_packet{}
= DPkt
= diameter_codec:decode(Dict0, Pkt),
+ RC = result_code(incr_rc(recv, DPkt, Dict0)),
+
{SApps, IS, RCaps} = recv_CEA(DPkt, S),
#diameter_caps{origin_host = {OH, DH}}
= Caps
= capz(LCaps, RCaps),
- RC = Dict0:'#get-'('Result-Code', CEA),
-
%% Ensure that we don't already have a connection to the peer in
%% question. This isn't the peer election of 3588 except in the
%% sense that, since we don't know who we're talking to until we
@@ -885,7 +903,7 @@ handle_CEA(#diameter_packet{bin = Bin}
%% connection with the peer.
try
- ?IS_SUCCESS(RC)
+ is_integer(RC) andalso ?IS_SUCCESS(RC)
orelse ?THROW(RC),
[] == SApps
andalso ?THROW(no_common_application),
@@ -905,6 +923,11 @@ handle_CEA(#diameter_packet{bin = Bin}
%% capabilities exchange could send DIAMETER_LIMITED_SUCCESS = 2002,
%% even if this isn't required by RFC 3588.
+result_code({'Result-Code', N}) ->
+ N;
+result_code(_) ->
+ undefined.
+
%% recv_CEA/2
recv_CEA(#diameter_packet{header = #diameter_header{version
@@ -996,19 +1019,13 @@ capz(#diameter_caps{} = L, #diameter_caps{} = R) ->
tl(tuple_to_list(R)))]).
%% close/1
+%%
+%% A good function to trace on in case of problems with capabilities
+%% exchange.
close(Reason) ->
- report(Reason),
throw({?MODULE, close, Reason}).
-%% Could possibly log more here.
-report({M, _, _, _, _} = T)
- when M == 'CER';
- M == 'CEA' ->
- diameter_lib:error_report(failure, T);
-report(_) ->
- ok.
-
%% dpr/2
%%
%% The RFC isn't clear on whether DPR should be send in a non-Open
@@ -1042,7 +1059,7 @@ dpr(_Reason, _S) ->
%% process and contact it. (eg. diameter:service_info/2)
dpr([CB|Rest], [Reason | _] = Args, S) ->
- try diameter_lib:eval([CB | Args]) of
+ case diameter_lib:eval([CB | Args]) of
{dpr, Opts} when is_list(Opts) ->
send_dpr(Reason, Opts, S);
dpr ->
@@ -1052,14 +1069,7 @@ dpr([CB|Rest], [Reason | _] = Args, S) ->
ignore ->
dpr(Rest, Args, S);
T ->
- No = {disconnect_cb, T},
- diameter_lib:error_report(invalid, No),
- {stop, No}
- catch
- E:R ->
- No = {disconnect_cb, E, R, ?STACK},
- diameter_lib:error_report(failure, No),
- {stop, No}
+ ?ERROR({disconnect_cb, CB, Args, T})
end;
dpr([], [Reason | _], S) ->
diff --git a/lib/diameter/src/base/diameter_service.erl b/lib/diameter/src/base/diameter_service.erl
index 70e66537ed..b7cd311e02 100644
--- a/lib/diameter/src/base/diameter_service.erl
+++ b/lib/diameter/src/base/diameter_service.erl
@@ -1,7 +1,7 @@
%%
%% %CopyrightBegin%
%%
-%% Copyright Ericsson AB 2010-2013. All Rights Reserved.
+%% Copyright Ericsson AB 2010-2014. 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
@@ -499,9 +499,21 @@ transition(Req, S) ->
%% # terminate/2
%% ---------------------------------------------------------------------------
-terminate(Reason, #state{service_name = Name} = S) ->
+terminate(Reason, #state{service_name = Name, peerT = PeerT} = S) ->
send_event(Name, stop),
ets:delete(?STATE_TABLE, Name),
+
+ %% Communicate pending loss of any peers that connection_down/3
+ %% won't. This is needed when stopping a service since we don't
+ %% wait for watchdog state changes to take care of if. That this
+ %% takes place after deleting the state entry ensures that the
+ %% resulting failover by request processes accomplishes nothing.
+ ets:foldl(fun(#peer{pid = TPid}, _) ->
+ diameter_traffic:peer_down(TPid)
+ end,
+ ok,
+ PeerT),
+
shutdown == Reason %% application shutdown
andalso shutdown(application, S).
@@ -701,8 +713,7 @@ notify(Share, SvcName, T) ->
Nodes = remotes(Share),
[] /= Nodes andalso diameter_peer:notify(Nodes, SvcName, T).
%% Test for the empty list for upgrade reasons: there's no
-%% diameter_peer:notify/3 in old code so no call means no load order
-%% requirement.
+%% diameter_peer:notify/3 in old code.
remotes(false) ->
[];
@@ -720,14 +731,27 @@ remotes(F) ->
L when is_list(L) ->
L;
T ->
- diameter_lib:error_report({invalid_return, T}, F),
+ ?LOG(invalid_return, {F,T}),
+ error_report(invalid_return, share_peers, F),
[]
catch
E:R ->
- diameter_lib:error_report({failure, {E, R, ?STACK}}, F),
+ ?LOG(failure, {E, R, F, diameter_lib:get_stacktrace()}),
+ error_report(failure, share_peers, F),
[]
end.
+%% error_report/3
+
+error_report(T, What, F) ->
+ Reason = io_lib:format("~s from ~p callback", [reason(T), What]),
+ diameter_lib:error_report(Reason, diameter_lib:eval_name(F)).
+
+reason(invalid_return) ->
+ "invalid return";
+reason(failure) ->
+ "failure".
+
%% ---------------------------------------------------------------------------
%% # start/3
%% ---------------------------------------------------------------------------
@@ -870,7 +894,7 @@ watchdog(TPid, [], ?WD_OKAY, ?WD_SUSPECT = To, Wd, State) ->
%% Watchdog has lost its connection.
watchdog(TPid, [], _, ?WD_DOWN = To, Wd, #state{peerT = PeerT} = S) ->
- close(Wd, S),
+ close(Wd),
watchdog_down(Wd, To, S),
ets:delete(PeerT, TPid);
@@ -1027,8 +1051,11 @@ peer_cb(App, F, A) ->
true
catch
E:R ->
- diameter_lib:error_report({failure, {E, R, ?STACK}},
- {App, F, A}),
+ %% Don't include arguments since a #diameter_caps{} strings
+ %% from the peer, which could be anything (especially, large).
+ [Mod|X] = App#diameter_app.module,
+ ?LOG(failure, {E, R, Mod, F, diameter_lib:get_stacktrace()}),
+ error_report(failure, F, {Mod, F, A ++ X}),
false
end.
@@ -1188,26 +1215,16 @@ tc(false = No, _, _) -> %% removed
%% another watchdog to be able to detect that it should transition
%% from initial into reopen rather than okay. That someone is either
%% the accepting watchdog upon reception of a CER from the previously
-%% connected peer, or us after connect_timer timeout.
+%% connected peer, or us after connect_timer timeout or immediately.
-close(#watchdog{type = connect}, _) ->
+close(#watchdog{type = connect}) ->
ok;
+
close(#watchdog{type = accept,
pid = Pid,
- ref = Ref,
- options = Opts},
- #state{service_name = SvcName}) ->
- c(Pid, diameter_config:have_transport(SvcName, Ref), Opts).
-
-%% Tell watchdog to (maybe) die later ...
-c(Pid, true, Opts) ->
+ options = Opts}) ->
Tc = connect_timer(Opts, 2*?DEFAULT_TC),
- erlang:send_after(Tc, Pid, close);
-
-%% ... or now.
-c(Pid, false, _Opts) ->
- Pid ! close.
-
+ erlang:send_after(Tc, Pid, close).
%% The RFC's only document the behaviour of Tc, our connect_timer,
%% for the establishment of connections but we also give
%% connect_timer semantics for a listener, being the time within
@@ -1261,13 +1278,14 @@ cm([#diameter_app{alias = Alias} = App], Req, From, Svc) ->
mod_state(Alias, ModS),
{T, RC};
T ->
- diameter_lib:error_report({invalid, T},
- {App, handle_call, Args}),
+ ModX = App#diameter_app.module,
+ ?LOG(invalid_return, {ModX, handle_call, Args, T}),
invalid
catch
E: Reason ->
- diameter_lib:error_report({failure, {E, Reason, ?STACK}},
- {App, handle_call, Args}),
+ ModX = App#diameter_app.module,
+ Stack = diameter_lib:get_stacktrace(),
+ ?LOG(failure, {E, Reason, ModX, handle_call, Stack}),
failure
end;
@@ -1390,6 +1408,8 @@ pick_peer(Local, Remote, Pid, _SvcName, #diameter_app{mutable = true} = App)
case call_service(Pid, {pick_peer, Local, Remote, App}) of
{TPid, _} = T when is_pid(TPid) ->
T;
+ false = No ->
+ No;
{error, _} ->
false
end;
@@ -1423,13 +1443,16 @@ pick_peer(Local,
T; %% Accept returned state in the immutable
{false = No, S} -> %% case as long it isn't changed.
No;
- T ->
- diameter_lib:error_report({invalid, T, App},
- {App, pick_peer, Args})
+ T when M ->
+ ModX = App#diameter_app.module,
+ ?LOG(invalid_return, {ModX, pick_peer, T}),
+ false
catch
- E: Reason ->
- diameter_lib:error_report({failure, {E, Reason, ?STACK}},
- {App, pick_peer, Args})
+ E: Reason when M ->
+ ModX = App#diameter_app.module,
+ Stack = diameter_lib:get_stacktrace(),
+ ?LOG(failure, {E, Reason, ModX, pick_peer, Stack}),
+ false
end.
%% peers/4
diff --git a/lib/diameter/src/base/diameter_stats.erl b/lib/diameter/src/base/diameter_stats.erl
index b68d4af11f..8353613d32 100644
--- a/lib/diameter/src/base/diameter_stats.erl
+++ b/lib/diameter/src/base/diameter_stats.erl
@@ -1,7 +1,7 @@
%%
%% %CopyrightBegin%
%%
-%% Copyright Ericsson AB 2010-2013. All Rights Reserved.
+%% Copyright Ericsson AB 2010-2014. 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
@@ -245,9 +245,6 @@ handle_call({read, Refs, Del}, _From, State) ->
handle_call({read, Refs}, _, State) ->
{reply, read_refs(Refs), State};
-handle_call({flush, Refs}, _From, State) -> %% from old code
- {reply, to_refdict(read(Refs, true)), State};
-
handle_call(Req, From, State) ->
?UNEXPECTED([Req, From]),
{reply, nok, State}.
diff --git a/lib/diameter/src/base/diameter_traffic.erl b/lib/diameter/src/base/diameter_traffic.erl
index 8b6f026b34..5fac61f416 100644
--- a/lib/diameter/src/base/diameter_traffic.erl
+++ b/lib/diameter/src/base/diameter_traffic.erl
@@ -1,7 +1,7 @@
%%
%% %CopyrightBegin%
%%
-%% Copyright Ericsson AB 2013. All Rights Reserved.
+%% Copyright Ericsson AB 2013-2014. 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
@@ -31,6 +31,11 @@
%% towards diameter_watchdog
-export([receive_message/4]).
+%% towards diameter_peer_fsm and diameter_watchdog
+-export([incr/4,
+ incr_error/4,
+ incr_rc/4]).
+
%% towards diameter_service
-export([make_recvdata/1,
peer_up/1,
@@ -44,6 +49,8 @@
-include_lib("diameter/include/diameter.hrl").
-include("diameter_internal.hrl").
+-define(LOGX(Reason, T), begin ?LOG(Reason, T), x({Reason, T}) end).
+
-define(RELAY, ?DIAMETER_DICT_RELAY).
-define(BASE, ?DIAMETER_DICT_COMMON). %% Note: the RFC 3588 dictionary
@@ -90,9 +97,6 @@ make_recvdata([SvcName, PeerT, Apps, Mask | _]) ->
peerT = PeerT,
apps = Apps,
sequence = Mask}.
-%% Take a list so that the caller (diameter_service) can be upgraded
-%% first if new members are added. Note that receive_message/4 might
-%% still get an old term from any watchdog started in old code.
%% ---------------------------------------------------------------------------
%% peer_up/1
@@ -112,6 +116,67 @@ peer_down(TPid) ->
failover(TPid).
%% ---------------------------------------------------------------------------
+%% incr/4
+%% ---------------------------------------------------------------------------
+
+incr(Dir, #diameter_packet{header = H}, TPid, Dict) ->
+ incr(Dir, H, TPid, Dict);
+
+incr(Dir, #diameter_header{} = H, TPid, Dict) ->
+ incr(TPid, {msg_id(H, Dict), Dir}).
+
+%% ---------------------------------------------------------------------------
+%% incr_error/4
+%% ---------------------------------------------------------------------------
+
+%% Decoded message without errors.
+incr_error(recv, #diameter_packet{errors = []}, _, _) ->
+ ok;
+
+incr_error(recv = D, #diameter_packet{header = H}, TPid, Dict) ->
+ incr_error(D, H, TPid, Dict);
+
+%% Encoded message with errors and an identifiable header ...
+incr_error(send = D, {_, _, #diameter_header{} = H}, TPid, Dict) ->
+ incr_error(D, H, TPid, Dict);
+
+%% ... or not.
+incr_error(send = D, {_,_}, TPid, _) ->
+ incr_error(D, unknown, TPid);
+
+incr_error(Dir, #diameter_header{} = H, TPid, Dict) ->
+ incr_error(Dir, msg_id(H, Dict), TPid);
+
+incr_error(Dir, Id, TPid, _) ->
+ incr_error(Dir, Id, TPid).
+
+incr_error(Dir, Id, TPid) ->
+ incr(TPid, {Id, Dir, error}).
+
+%% ---------------------------------------------------------------------------
+%% incr_rc/4
+%% ---------------------------------------------------------------------------
+
+-spec incr_rc(send|recv, Pkt, TPid, Dict0)
+ -> {Counter, non_neg_integer()}
+ | Reason
+ when Pkt :: #diameter_packet{},
+ TPid :: pid(),
+ Dict0 :: module(),
+ Counter :: {'Result-Code', integer()}
+ | {'Experimental-Result', integer(), integer()},
+ Reason :: atom().
+
+incr_rc(Dir, Pkt, TPid, Dict0) ->
+ try
+ incr_rc(Dir, Pkt, Dict0, TPid, Dict0)
+ catch
+ exit: {E,_} when E == no_result_code;
+ E == invalid_error_bit ->
+ E
+ end.
+
+%% ---------------------------------------------------------------------------
%% pending/1
%% ---------------------------------------------------------------------------
@@ -185,7 +250,7 @@ spawn_request(TPid, Pkt, Dict0, Opts, RecvData) ->
spawn_opt(fun() -> recv_request(TPid, Pkt, Dict0, RecvData) end, Opts)
catch
error: system_limit = E -> %% discard
- ?LOG({error, E}, now())
+ ?LOG(error, E)
end.
%% ---------------------------------------------------------------------------
@@ -214,7 +279,9 @@ recv_R({#diameter_app{id = Id, dictionary = Dict} = App, Caps},
Pkt0,
Dict0,
RecvData) ->
+ incr(recv, Pkt0, TPid, Dict),
Pkt = errors(Id, diameter_codec:decode(Id, Dict, Pkt0)),
+ incr_error(recv, Pkt, TPid, Dict),
{Caps, Pkt, App, recv_R(App, TPid, Dict0, Caps, RecvData, Pkt)};
%% Note that the decode is different depending on whether or not Id is
%% ?APP_ID_RELAY.
@@ -286,45 +353,39 @@ rc(N) ->
%% This error is returned when a request is received with an invalid
%% message length.
-errors(_, #diameter_packet{header = #diameter_header{length = Len},
+errors(_, #diameter_packet{header = #diameter_header{length = Len} = H,
bin = Bin,
errors = Es}
= Pkt)
when Len < 20;
0 /= Len rem 4;
8*Len /= bit_size(Bin) ->
+ ?LOG(invalid_message_length, {H, bit_size(Bin)}),
Pkt#diameter_packet{errors = [5015 | Es]};
%% DIAMETER_UNSUPPORTED_VERSION 5011
%% This error is returned when a request was received, whose version
%% number is unsupported.
-errors(_, #diameter_packet{header = #diameter_header{version = V},
+errors(_, #diameter_packet{header = #diameter_header{version = V} = H,
errors = Es}
= Pkt)
when V /= ?DIAMETER_VERSION ->
+ ?LOG(unsupported_version, H),
Pkt#diameter_packet{errors = [5011 | Es]};
-%% DIAMETER_INVALID_AVP_BITS 3009
-%% A request was received that included an AVP whose flag bits are
-%% set to an unrecognized value, or that is inconsistent with the
-%% AVP's definition.
-
-errors(_, #diameter_packet{errors = [Bs | Es]} = Pkt)
- when is_bitstring(Bs) -> %% from old code
- Pkt#diameter_packet{errors = [3009 | Es]};
-
%% DIAMETER_COMMAND_UNSUPPORTED 3001
%% The Request contained a Command-Code that the receiver did not
%% recognize or support. This MUST be used when a Diameter node
%% receives an experimental command that it does not understand.
-errors(Id, #diameter_packet{header = #diameter_header{is_proxiable = P},
+errors(Id, #diameter_packet{header = #diameter_header{is_proxiable = P} = H,
msg = M,
errors = Es}
= Pkt)
when ?APP_ID_RELAY /= Id, undefined == M; %% don't know the command
?APP_ID_RELAY == Id, not P -> %% command isn't proxiable
+ ?LOG(command_unsupported, H),
Pkt#diameter_packet{errors = [3001 | Es]};
%% DIAMETER_INVALID_HDR_BITS 3008
@@ -333,9 +394,11 @@ errors(Id, #diameter_packet{header = #diameter_header{is_proxiable = P},
%% inconsistent with the command code's definition.
errors(_, #diameter_packet{header = #diameter_header{is_request = true,
- is_error = true},
+ is_error = true}
+ = H,
errors = Es}
= Pkt) ->
+ ?LOG(invalid_hdr_bits, H),
Pkt#diameter_packet{errors = [3008 | Es]};
%% Green.
@@ -491,7 +554,6 @@ answer_message(RC,
origin_realm = {OR,_}},
Dict0,
Pkt) ->
- ?LOG({error, RC}, Pkt),
{Dict0, answer_message(OH, OR, RC, Dict0, Pkt)}.
%% resend/7
@@ -607,9 +669,11 @@ reply([Msg], Dict, TPid, Dict0, Fs, ReqPkt)
reply(Msg, Dict, TPid, Dict0, Fs, ReqPkt) ->
Pkt = encode(Dict,
+ TPid,
reset(make_answer_packet(Msg, ReqPkt), Dict, Dict0),
Fs),
- incr(send, Pkt, Dict, TPid, Dict0), %% count outgoing result codes
+ incr(send, Pkt, TPid, Dict),
+ incr_rc(send, Pkt, Dict, TPid, Dict0), %% count outgoing
send(TPid, Pkt).
%% reset/3
@@ -974,35 +1038,48 @@ find(Pred, [H|T]) ->
%% code, the missing vendor id, and a zero filled payload of the minimum
%% required length for the omitted AVP will be added.
-%% incr/4
+%% incr_rc/5
%%
%% Increment a stats counter for result codes in incoming and outgoing
%% answers.
%% Outgoing message as binary: don't count. (Sending binaries is only
%% partially supported.)
-incr(_, #diameter_packet{msg = undefined}, _, _, _) ->
- ok;
-
-%% Incoming with decode errors.
-incr(recv = D, #diameter_packet{header = H, errors = [_|_]}, _, TPid, _) ->
- incr(TPid, {diameter_codec:msg_id(H), D, error});
+incr_rc(_, #diameter_packet{msg = undefined = No}, _, _, _) ->
+ No;
-%% Incoming without errors or outgoing. Outgoing with encode errors
-%% never gets here since encode fails.
-incr(Dir, Pkt, Dict, TPid, Dict0) ->
+%% Incoming or outgoing. Outgoing with encode errors never gets here
+%% since encode fails.
+incr_rc(Dir, Pkt, Dict, TPid, Dict0) ->
#diameter_packet{header = #diameter_header{is_error = E}
= Hdr,
- msg = Rec}
+ msg = Msg,
+ errors = Es}
= Pkt,
- RC = int(get_avp_value(Dict, 'Result-Code', Rec)),
+ Id = msg_id(Hdr, Dict),
- %% Exit on an improper Result-Code.
+ %% Count incoming decode errors.
+ recv /= Dir orelse [] == Es orelse incr_error(Dir, Id, TPid, Dict),
+
+ %% Exit on a missing result code.
+ T = rc_counter(Dict, Msg),
+ T == false andalso ?LOGX(no_result_code, {Dict, Dir, Hdr}),
+ {Ctr, RC} = T,
+
+ %% Or on an inappropriate value.
is_result(RC, E, Dict0)
- orelse x({invalid_error_bit, RC}, answer, [Dir, Pkt]),
+ orelse ?LOGX(invalid_error_bit, {Dict, Dir, Hdr, RC}),
+
+ incr(TPid, {Id, Dir, Ctr}),
+ Ctr.
- irc(TPid, Hdr, Dir, rc_counter(Dict, Rec, RC)).
+%% Only count on known keeps so as not to be vulnerable to attack:
+%% there are 2^32 (application ids) * 2^24 (command codes) * 2 (R-bits)
+%% = 2^57 Ids for an attacker to choose from.
+msg_id(Hdr, Dict) ->
+ {_ApplId, Code, R} = Id = diameter_codec:msg_id(Hdr),
+ choose('' == Dict:msg_name(Code, 0 == R), unknown, Id).
%% No E-bit: can't be 3xxx.
is_result(RC, false, _Dict0) ->
@@ -1018,12 +1095,6 @@ is_result(RC, true, _) ->
orelse
5000 =< RC andalso RC < 6000.
-irc(_, _, _, undefined) ->
- false;
-
-irc(TPid, Hdr, Dir, Ctr) ->
- incr(TPid, {diameter_codec:msg_id(Hdr), Dir, Ctr}).
-
%% incr/2
incr(TPid, Counter) ->
@@ -1036,14 +1107,16 @@ incr(TPid, Counter) ->
%% All Diameter answer messages defined in vendor-specific
%% applications MUST include either one Result-Code AVP or one
%% Experimental-Result AVP.
-%%
-%% Maintain statistics assuming one or the other, not both, which is
-%% surely the intent of the RFC.
-rc_counter(Dict, Rec, undefined) ->
- rcc(get_avp_value(Dict, 'Experimental-Result', Rec));
-rc_counter(_, _, RC) ->
- {'Result-Code', RC}.
+rc_counter(Dict, Msg) ->
+ rcc(Dict, Msg, int(get_avp_value(Dict, 'Result-Code', Msg))).
+
+rcc(Dict, Msg, undefined) ->
+ rcc(get_avp_value(Dict, 'Experimental-Result', Msg));
+
+rcc(_, _, N)
+ when is_integer(N) ->
+ {{'Result-Code', N}, N}.
%% Outgoing answers may be in any of the forms messages can be sent
%% in. Incoming messages will be records. We're assuming here that the
@@ -1051,12 +1124,12 @@ rc_counter(_, _, RC) ->
rcc([{_,_,N} = T | _])
when is_integer(N) ->
- T;
+ {T,N};
rcc({_,_,N} = T)
when is_integer(N) ->
- T;
+ {T,N};
rcc(_) ->
- undefined.
+ false.
%% Extract the first good looking integer. There's no guarantee
%% that what we're looking for has arity 1.
@@ -1069,13 +1142,6 @@ int(N)
int(_) ->
undefined.
--spec x(any(), atom(), list()) -> no_return().
-
-%% Warn and exit request process on errors in an incoming answer.
-x(Reason, F, A) ->
- diameter_lib:warning_report(Reason, {?MODULE, F, A}),
- x(Reason).
-
x(T) ->
exit(T).
@@ -1317,7 +1383,7 @@ send_R(Pkt0,
{Pid, Ref},
SvcName,
Fs) ->
- Pkt = encode(Dict, Pkt0, Fs),
+ Pkt = encode(Dict, TPid, Pkt0, Fs),
#options{timeout = Timeout}
= Opts,
@@ -1382,11 +1448,19 @@ handle_answer(SvcName,
%% want to examine the answer?
handle_A(Pkt, SvcName, Dict, Dict0, App, #request{transport = TPid} = Req) ->
+ incr(recv, Pkt, TPid, Dict),
+
try
- incr(recv, Pkt, Dict, TPid, Dict0) %% count incoming result codes
+ incr_rc(recv, Pkt, Dict, TPid, Dict0) %% count incoming
of
_ -> answer(Pkt, SvcName, App, Req)
catch
+ exit: {no_result_code, _} ->
+ %% RFC 6733 requires one of Result-Code or
+ %% Experimental-Result, but the decode will have detected
+ %% a missing AVP. If both are optional in the dictionary
+ %% then this isn't a decode error: just continue on.
+ answer(Pkt, SvcName, App, Req);
exit: {invalid_error_bit, RC} ->
#diameter_packet{errors = Es}
= Pkt,
@@ -1413,11 +1487,16 @@ a(#diameter_packet{errors = Es}
callback == AE ->
cb(ModX, handle_answer, [Pkt, msg(P), SvcName, {TPid, Caps}]);
-a(Pkt, SvcName, _, report, Req) ->
- x(errors, handle_answer, [SvcName, Req, Pkt]);
+a(Pkt, SvcName, _, AE, _) ->
+ a(Pkt#diameter_packet.header, SvcName, AE).
+
+a(Hdr, SvcName, report) ->
+ MFA = {?MODULE, handle_answer, [SvcName, Hdr]},
+ diameter_lib:warning_report(errors, MFA),
+ a(Hdr, SvcName, discard);
-a(Pkt, SvcName, _, discard, Req) ->
- x({errors, handle_answer, [SvcName, Req, Pkt]}).
+a(Hdr, SvcName, discard) ->
+ x({answer_errors, {SvcName, Hdr}}).
%% Note that we don't check that the application id in the answer's
%% header is what we expect. (TODO: Does the rfc says anything about
@@ -1475,10 +1554,10 @@ msg(#diameter_packet{msg = undefined, bin = Bin}) ->
msg(#diameter_packet{msg = Msg}) ->
Msg.
-%% encode/3
+%% encode/4
-encode(Dict, Pkt, Fs) ->
- P = encode(Dict, Pkt),
+encode(Dict, TPid, Pkt, Fs) ->
+ P = encode(Dict, TPid, Pkt),
eval_packet(P, Fs),
P.
@@ -1490,11 +1569,17 @@ encode(Dict, Pkt, Fs) ->
%% support retransmission but is useful for test.
%% A message to be encoded.
-encode(Dict, #diameter_packet{bin = undefined} = Pkt) ->
- diameter_codec:encode(Dict, Pkt);
+encode(Dict, TPid, #diameter_packet{bin = undefined} = Pkt) ->
+ try
+ diameter_codec:encode(Dict, Pkt)
+ catch
+ exit: {diameter_codec, encode, T} = Reason ->
+ incr_error(send, T, TPid, Dict),
+ exit(Reason)
+ end;
%% An encoded binary: just send.
-encode(_, #diameter_packet{} = Pkt) ->
+encode(_, _, #diameter_packet{} = Pkt) ->
Pkt.
%% send_request/5
@@ -1591,13 +1676,13 @@ resend_request(Pkt0,
SvcName,
Tmo,
Fs) ->
- Pkt = encode(Dict, Pkt0, Fs),
+ Pkt = encode(Dict, TPid, Pkt0, Fs),
Req = Req0#request{transport = TPid,
packet = Pkt0,
caps = Caps},
- ?LOG(retransmission, Req),
+ ?LOG(retransmission, Pkt#diameter_packet.header),
TRef = send_request(TPid, Pkt, Req, SvcName, Tmo),
{TRef, Req}.
diff --git a/lib/diameter/src/base/diameter_watchdog.erl b/lib/diameter/src/base/diameter_watchdog.erl
index 9a1c8b6585..eff5096745 100644
--- a/lib/diameter/src/base/diameter_watchdog.erl
+++ b/lib/diameter/src/base/diameter_watchdog.erl
@@ -1,7 +1,7 @@
%%
%% %CopyrightBegin%
%%
-%% Copyright Ericsson AB 2010-2013. All Rights Reserved.
+%% Copyright Ericsson AB 2010-2014. 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
@@ -49,8 +49,6 @@
-define(IS_NATURAL(N), (is_integer(N) andalso 0 =< N)).
--define(CHOOSE(B,T,F), if (B) -> T; true -> F end).
-
-record(config,
{suspect = 1 :: non_neg_integer(), %% OKAY -> SUSPECT
okay = 3 :: non_neg_integer()}). %% REOPEN -> OKAY
@@ -157,8 +155,7 @@ wait(Ref, Pid) ->
config(Opts) ->
Config = proplists:get_value(watchdog_config, Opts, []),
- is_list(Config) orelse config_error({watchdog_config, Config}),
- lists:foldl(fun config/2, #config{}, Config). %% ^ added in old code
+ lists:foldl(fun config/2, #config{}, Config).
config({suspect, N}, Rec)
when ?IS_NATURAL(N) ->
@@ -166,10 +163,7 @@ config({suspect, N}, Rec)
config({okay, N}, Rec)
when ?IS_NATURAL(N) ->
- Rec#config{okay = N};
-
-config(T, _) -> %% added in old code
- config_error(T).
+ Rec#config{okay = N}.
%% start/5
@@ -225,7 +219,6 @@ dict0(_, _, Acc) ->
Acc.
config_error(T) ->
- diameter_lib:error_report(configuration_error, T),
exit({shutdown, {configuration_error, T}}).
%% handle_call/3
@@ -252,17 +245,6 @@ handle_info(T, #watchdog{} = State) ->
?LOG(stop, T),
event(T, State, State#watchdog{status = down}),
{stop, {shutdown, T}, State}
- end;
-
-handle_info(T, State) -> %% started in old code
- handle_info(T, upgrade(State)).
-
-upgrade(State) ->
- case erlang:append_element(State, #config{}) of
- #watchdog{status = okay, config = #config{suspect = OS}} = S ->
- S#watchdog{num_dwa = OS};
- #watchdog{} = S ->
- S
end.
close({'DOWN', _, process, TPid, {shutdown, Reason}},
@@ -285,7 +267,7 @@ event(Msg,
TPid = tpid(F,T),
E = {[TPid | data(Msg, TPid, From, To)], From, To},
send(Pid, {watchdog, self(), E}),
- ?LOG(transition, {self(), E}).
+ ?LOG(transition, {From, To}).
data(Msg, TPid, reopen, okay) ->
{recv, TPid, 'DWA', _Pkt} = Msg, %% assert
@@ -328,14 +310,13 @@ code_change(_, State, _) ->
%% The state transitions documented here are extracted from RFC 3539,
%% the commentary is ours.
-%% Service or watchdog is telling the watchdog of an accepting
-%% transport to die after connect_timer expiry or reestablished
-%% connection (in another transport process) respectively.
-transition(close, #watchdog{status = down}) ->
+%% Service is telling the watchdog of an accepting transport to die
+%% following transport death in state INITIAL, or after connect_timer
+%% expiry; or another watchdog is saying the same after reestablishing
+%% a connection previously had by this one.
+transition(close, #watchdog{}) ->
{{accept, _}, _, _} = getr(restart), %% assert
stop;
-transition(close, #watchdog{}) ->
- ok;
%% Service is asking for the peer to be taken down gracefully.
transition({shutdown, Pid, _}, #watchdog{parent = Pid,
@@ -347,6 +328,11 @@ transition({shutdown = T, Pid, Reason}, #watchdog{parent = Pid,
send(TPid, {T, self(), Reason}),
S#watchdog{shutdown = true};
+%% Transport is telling us that DPA has been sent in response to DPR:
+%% its death should lead to ours.
+transition({'DPR', TPid}, #watchdog{transport = TPid} = S) ->
+ S#watchdog{shutdown = true};
+
%% Parent process has died,
transition({'DOWN', _, process, Pid, _Reason},
#watchdog{parent = Pid}) ->
@@ -418,18 +404,39 @@ transition({open = Key, TPid, _Hosts, T},
%% REOPEN Connection down CloseConnection()
%% SetWatchdog() DOWN
+%% Transport has died after DPA or service requested termination ...
transition({'DOWN', _, process, TPid, _Reason},
#watchdog{transport = TPid,
shutdown = true}) ->
stop;
+%% ... or not.
transition({'DOWN', _, process, TPid, _Reason},
#watchdog{transport = TPid,
- status = T}
- = S) ->
- set_watchdog(S#watchdog{status = ?CHOOSE(initial == T, T, down),
- pending = false,
- transport = undefined});
+ status = T,
+ restrict = {_,R}}
+ = S0) ->
+ S = S0#watchdog{pending = false,
+ transport = undefined},
+ {{M,_}, _, _} = getr(restart),
+
+ %% Close an accepting watchdog immediately if there's no
+ %% restriction on the number of connections to the same peer: the
+ %% state machine never enters state REOPEN in this case. The
+ %% 'close' message (instead of stop) is so as not to bypass the
+ %% sending of messages to the service process in handle_info/2.
+
+ if T /= initial, M == accept, not R ->
+ send(self(), close),
+ S#watchdog{status = down};
+ T /= initial ->
+ set_watchdog(S#watchdog{status = down});
+ M == connect ->
+ set_watchdog(S);
+ M == accept ->
+ send(self(), close),
+ S
+ end;
%% Incoming message.
transition({recv, TPid, Name, Pkt}, #watchdog{transport = TPid} = S) ->
@@ -469,9 +476,7 @@ encode(dwr = M, Dict0, Mask) ->
hop_by_hop_id = Seq},
Pkt = #diameter_packet{header = Hdr,
msg = Msg},
- #diameter_packet{bin = Bin} = diameter_codec:encode(Dict0, Pkt),
- Bin;
-
+ diameter_codec:encode(Dict0, Pkt);
encode(dwa, Dict0, #diameter_packet{header = H, transport_data = TD}
= ReqPkt) ->
@@ -540,10 +545,14 @@ send_watchdog(#watchdog{pending = false,
dictionary = Dict0,
sequence = Mask}
= S) ->
- send(TPid, {send, encode(dwr, Dict0, Mask)}),
+ #diameter_packet{bin = Bin} = EPkt = encode(dwr, Dict0, Mask),
+ diameter_traffic:incr(send, EPkt, TPid, Dict0),
+ send(TPid, {send, Bin}),
?LOG(send, 'DWR'),
S#watchdog{pending = true}.
+%% Dont' count encode errors since we don't expect any on DWR/DWA.
+
%% recv/3
recv(Name, Pkt, S) ->
@@ -560,13 +569,29 @@ recv(Name, Pkt, S) ->
rcv('DWR', Pkt, #watchdog{transport = TPid,
dictionary = Dict0}) ->
- send(TPid, {send, encode(dwa, Dict0, Pkt)}),
+ ?LOG(recv, 'DWR'),
+ DPkt = diameter_codec:decode(Dict0, Pkt),
+ diameter_traffic:incr(recv, DPkt, TPid, Dict0),
+ diameter_traffic:incr_error(recv, DPkt, TPid, Dict0),
+ EPkt = encode(dwa, Dict0, Pkt),
+ diameter_traffic:incr(send, EPkt, TPid, Dict0),
+ diameter_traffic:incr_rc(send, EPkt, TPid, Dict0),
+
+ send(TPid, {send, EPkt}),
?LOG(send, 'DWA');
+rcv('DWA', Pkt, #watchdog{transport = TPid,
+ dictionary = Dict0}) ->
+ ?LOG(recv, 'DWA'),
+ diameter_traffic:incr(recv, Pkt, TPid, Dict0),
+ diameter_traffic:incr_rc(recv,
+ diameter_codec:decode(Dict0, Pkt),
+ TPid,
+ Dict0);
+
rcv(N, _, _)
when N == 'CER';
N == 'CEA';
- N == 'DWA';
N == 'DPR';
N == 'DPA' ->
false;
@@ -755,7 +780,7 @@ timeout(#watchdog{status = T} = S)
restart(#watchdog{transport = undefined} = S) ->
restart(getr(restart), S);
-restart(S) ->
+restart(S) -> %% reconnect has won race with timeout
S.
%% restart/2
@@ -785,9 +810,10 @@ restart({{connect, _} = T, Opts, Svc},
%% die. Note that a state machine never enters state REOPEN in this
%% case.
restart({{accept, _}, _, _}, #watchdog{restrict = {_, false}}) ->
- stop;
+ stop; %% 'DOWN' was in old code: 'close' was not sent
-%% Otherwise hang around until told to die.
+%% Otherwise hang around until told to die, either by the service or
+%% by another watchdog.
restart({{accept, _}, _, _}, S) ->
S.
diff --git a/lib/diameter/src/compiler/diameter_codegen.erl b/lib/diameter/src/compiler/diameter_codegen.erl
index 22422f2ef2..5a068c1a25 100644
--- a/lib/diameter/src/compiler/diameter_codegen.erl
+++ b/lib/diameter/src/compiler/diameter_codegen.erl
@@ -1,7 +1,7 @@
%%
%% %CopyrightBegin%
%%
-%% Copyright Ericsson AB 2010-2013. All Rights Reserved.
+%% Copyright Ericsson AB 2010-2014. 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
@@ -31,7 +31,8 @@
%% on the beam file of another dictionary.
%%
--export([from_dict/4]).
+-export([from_dict/4,
+ is_printable_ascii/1]). %% used by ?TERM/1 in diameter_forms.hrl
-include("diameter_forms.hrl").
-include("diameter_vsn.hrl").
@@ -121,6 +122,9 @@ eraser(Key) ->
%% ===========================================================================
%% ===========================================================================
+is_printable_ascii(C) ->
+ 16#20 =< C andalso C =< 16#7F.
+
get_value(Key, Plist) ->
proplists:get_value(Key, Plist, []).
diff --git a/lib/diameter/src/compiler/diameter_dict_util.erl b/lib/diameter/src/compiler/diameter_dict_util.erl
index 3941f30e03..cf4741e563 100644
--- a/lib/diameter/src/compiler/diameter_dict_util.erl
+++ b/lib/diameter/src/compiler/diameter_dict_util.erl
@@ -1,7 +1,7 @@
%%
%% %CopyrightBegin%
%%
-%% Copyright Ericsson AB 2010-2013. All Rights Reserved.
+%% Copyright Ericsson AB 2010-2014. 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
@@ -155,6 +155,8 @@ fmt(grouped_avp_has_wrong_type) ->
"Grouped AVP ~s at line ~p defined with type ~s at line ~p";
fmt(grouped_avp_not_defined) ->
"Grouped AVP ~s on line ~p not defined in @avp_types";
+fmt(grouped_avp_not_grouped) ->
+ "Grouped AVP ~s on line ~p not defined in @grouped";
fmt(grouped_vendor_id_without_flag) ->
"Grouped AVP ~s at line ~p has vendor id "
"but definition at line ~p does not specify V flag";
@@ -401,9 +403,9 @@ read(File) ->
{ok, iolist_to_binary([File])}.
make_dict(Parse, Opts) ->
- make_orddict(pass4(pass3(pass2(pass1(reset(make_dict(Parse),
- Opts))),
- Opts))).
+ Dict = pass3(pass2(pass1(reset(make_dict(Parse), Opts))), Opts),
+ ok = examine(Dict),
+ make_orddict(Dict).
%% make_orddict/1
@@ -729,8 +731,8 @@ no_messages_without_id(Dict) ->
%% explode/4
%%
-%% {avp_vendor_id, AvpName} -> [Lineno, Id::integer()]
-%% {custom_types|codecs|inherits, AvpName} -> [Lineno, Mod::string()]
+%% {avp_vendor_id, AvpName} -> [Lineno, Id::integer()]
+%% {custom|inherits, AvpName} -> [Lineno, Mod::string()]
explode({_, Line, AvpName}, Dict, {_, _, X} = T, K) ->
true = K /= avp_vendor_id orelse is_uint32(T, [K]),
@@ -1092,7 +1094,7 @@ explode_avps([{_, Line, Name} | Toks], Dict) ->
Vid = avp_vendor_id(Flags, Name, Line, Dict),
%% An AVP is uniquely defined by its AVP code and vendor id (if any).
- %% Ensure there are no duplicate.
+ %% Ensure there are no duplicates.
store_new({avp_types, {Code, Vid}},
[Line, Name],
Dict,
@@ -1168,7 +1170,7 @@ import_avps(Dict, Opts) ->
Import = inherit(Dict, Opts),
report(imported, Import),
- %% pass4/1 tests that all referenced AVP's are either defined
+ %% examine/1 tests that all referenced AVP's are either defined
%% or imported.
dict:store(import_avps,
@@ -1276,21 +1278,21 @@ dict(Mod) ->
end.
%% ===========================================================================
-%% pass4/1
+%% examine/1
%%
%% Sanity checks.
-pass4(Dict) ->
- dict:fold(fun(K, V, _) -> p4(K, V, Dict) end, ok, Dict),
- Dict.
+examine(Dict) ->
+ dict:fold(fun(K, V, _) -> x(K, V, Dict) end, ok, Dict),
+ ok.
%% Ensure enum AVP's have type Enumerated.
-p4({enum, Name}, [Line | _], Dict)
+x({enum, Name}, [Line | _], Dict)
when is_list(Name) ->
true = is_enumerated_avp(Name, Dict, Line);
%% Ensure all referenced AVP's are either defined locally or imported.
-p4({K, {Name, AvpName}}, [Line | _], Dict)
+x({K, {Name, AvpName}}, [Line | _], Dict)
when (K == grouped orelse K == messages),
is_list(Name),
is_list(AvpName),
@@ -1298,13 +1300,21 @@ p4({K, {Name, AvpName}}, [Line | _], Dict)
true = avp_is_defined(AvpName, Dict, Line);
%% Ditto.
-p4({K, AvpName}, [Line | _], Dict)
+x({K, AvpName}, [Line | _], Dict)
when K == avp_vendor_id;
- K == custom_types;
- K == codecs ->
+ K == custom ->
true = avp_is_defined(AvpName, Dict, Line);
-p4(_, _, _) ->
+%% Ensure that all local AVP's of type Grouped are also present in @grouped.
+x({avp_types, Name}, [Line | Toks], Dict)
+ when 0 < Line, is_list(Name) ->
+ [{number, _, _Code}, {word, _, Type}, {word, _, _Flags}] = Toks,
+ "Grouped" == Type
+ andalso error == dict:find({grouped, Name}, Dict)
+ andalso ?RETURN(grouped_avp_not_grouped, [Name, Line]),
+ ok;
+
+x(_, _, _) ->
ok.
%% has_enumerated_type/3
diff --git a/lib/diameter/src/compiler/diameter_forms.hrl b/lib/diameter/src/compiler/diameter_forms.hrl
index 9b14c1715a..dd03401b9e 100644
--- a/lib/diameter/src/compiler/diameter_forms.hrl
+++ b/lib/diameter/src/compiler/diameter_forms.hrl
@@ -1,7 +1,7 @@
%%
%% %CopyrightBegin%
%%
-%% Copyright Ericsson AB 2010-2013. All Rights Reserved.
+%% Copyright Ericsson AB 2010-2014. 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
@@ -57,4 +57,6 @@
-define(FIELDS(Fs), [{?record_field, ?ATOM(F), V} || {F,V} <- Fs]).
%% Literal term.
--define(TERM(T), erl_parse:abstract(T, ?LINE)).
+-define(TERM(T), erl_parse:abstract(T, [
+ {line, ?LINE},
+ {encoding, fun diameter_codegen:is_printable_ascii/1}])).
diff --git a/lib/diameter/src/compiler/diameter_make.erl b/lib/diameter/src/compiler/diameter_make.erl
index 2f314b7e57..72f5d36da4 100644
--- a/lib/diameter/src/compiler/diameter_make.erl
+++ b/lib/diameter/src/compiler/diameter_make.erl
@@ -1,7 +1,7 @@
%%
%% %CopyrightBegin%
%%
-%% Copyright Ericsson AB 2010-2013. All Rights Reserved.
+%% Copyright Ericsson AB 2010-2014. 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
@@ -33,7 +33,8 @@
-export([codec/2,
codec/1,
format/1,
- flatten/1]).
+ flatten/1,
+ format_error/1]).
-export_type([opt/0]).
@@ -81,8 +82,8 @@ codec(File, Opts) ->
case parse(Dict, Opts) of
{ok, ParseD} ->
make(Path, default(Opts), ParseD);
- {error = E, Reason} ->
- {E, diameter_dict_util:format_error(Reason)}
+ {error, _} = E ->
+ E
end.
codec(File) ->
@@ -115,6 +116,11 @@ flatten([?VERSION = V | Dict]) ->
[grouped, import_groups],
[enum, import_enums]])].
+%% format_error/1
+
+format_error(T) ->
+ diameter_dict_util:format_error(T).
+
%% ===========================================================================
%% flatten/2
@@ -226,21 +232,29 @@ identify([Vsn | [T|_] = ParseD])
identify({path, File} = T) ->
{T, File};
identify(File) ->
- Bin = iolist_to_binary([File]),
- case is_path(Bin) of
+ case is_path([File]) of
true -> {{path, File}, File};
- false -> {Bin, ?DEFAULT_DICT_FILE}
+ false -> {File, ?DEFAULT_DICT_FILE}
end.
-%% Interpret anything containing \n or \r as a literal dictionary,
-%% otherwise a path. (Which might be the wrong guess in the worst case.)
-is_path(Bin) ->
- try
- [throw(C) || <<C>> <= Bin, $\n == C orelse $\r == C],
- true
- catch
- throw:_ -> false
- end.
+%% Interpret anything containing \n or \r as a literal dictionary.
+
+is_path([<<C,B/binary>> | T]) ->
+ is_path([C, B | T]);
+
+is_path([[C|L] | T]) ->
+ is_path([C, L | T]);
+
+is_path([C|_])
+ when $\n == C;
+ $\r == C ->
+ false;
+
+is_path([_|T]) ->
+ is_path(T);
+
+is_path([]) ->
+ true.
make(File, Opts, Dict) ->
ok(lists:foldl(fun(M,A) -> [make(File, Opts, Dict, M) | A] end,
diff --git a/lib/diameter/src/diameter.app.src b/lib/diameter/src/diameter.app.src
index ceefb9b398..ac1d847753 100644
--- a/lib/diameter/src/diameter.app.src
+++ b/lib/diameter/src/diameter.app.src
@@ -1,7 +1,7 @@
%%
%% %CopyrightBegin%
%%
-%% Copyright Ericsson AB 2010-2013. All Rights Reserved.
+%% Copyright Ericsson AB 2010-2014. All Rights Reserved.
%%
%% The contents of this file are subject to the Erlang Public License,
%% Version 1.1, (the "License"); you may not use this file except in
@@ -20,9 +20,27 @@
{application, diameter,
[{description, "Diameter protocol"},
{vsn, "%VSN%"},
- {modules, [%MODULES%]},
+ {modules, [
+ %MODULES%
+ %,%COMPILER%
+ %,%INFO%
+ ]},
{registered, [%REGISTERED%]},
- {applications, [stdlib, kernel]},
+ {applications, [
+ {stdlib, "2.0"}, {kernel, "3.0"}%, {erts, "6.0"}
+ %% {syntax-tools, "1.6.14"}
+ %% {runtime-tools, "1.8.14"}
+ %, {ssl, "5.3.4"}
+ ]},
{env, []},
- {mod, {diameter_app, []}}
+ {mod, {diameter_app, []}},
+ {runtime_dependencies, [
+ ]}
+ %%
+ %% Note that ssl is only required if configured on TCP transports,
+ %% and syntax-tools and runtime-tools are only required if the
+ %% dictionary compiler and debug modules (respectively) are
+ %% needed/wanted at runtime, which they typically aren't. These
+ %% modules are the two commented lines in the 'modules' tuple.
+ %%
]}.
diff --git a/lib/diameter/src/diameter.appup.src b/lib/diameter/src/diameter.appup.src
index c7ae8a2828..b7b9662383 100644
--- a/lib/diameter/src/diameter.appup.src
+++ b/lib/diameter/src/diameter.appup.src
@@ -2,7 +2,7 @@
%%
%% %CopyrightBegin%
%%
-%% Copyright Ericsson AB 2010-2013. All Rights Reserved.
+%% Copyright Ericsson AB 2010-2014. All Rights Reserved.
%%
%% The contents of this file are subject to the Erlang Public License,
%% Version 1.1, (the "License"); you may not use this file except in
@@ -20,62 +20,61 @@
{"%VSN%",
[
- {"0.9", [{restart_application, diameter}]}, %% R14B03
- {"0.10", [{restart_application, diameter}]}, %% R14B04
- {"1.0", [{restart_application, diameter}]}, %% R15B
- {"1.1", [{restart_application, diameter}]}, %% R15B01
- {"1.2", [{restart_application, diameter}]}, %% R15B02
- {"1.2.1", [{restart_application, diameter}]},
- {"1.3", [{restart_application, diameter}]}, %% R15B03
- {"1.3.1", [{restart_application, diameter}]},
- {"1.4", [{restart_application, diameter}]}, %% R16A
- {"1.4.1", [{restart_application, diameter}]}, %% R16B
+ {"0.9", [{restart_application, diameter}]}, %% R14B03
+ {"0.10", [{restart_application, diameter}]}, %% R14B04
+ {"1.0", [{restart_application, diameter}]}, %% R15B
+ {"1.1", [{restart_application, diameter}]}, %% R15B01
+ {"1.2", [{restart_application, diameter}]}, %% R15B02
+ {"1.2.1", [{restart_application, diameter}]},
+ {"1.3", [{restart_application, diameter}]}, %% R15B03
+ {"1.3.1", [{restart_application, diameter}]},
+ {"1.4", [{restart_application, diameter}]}, %% R16A
+ {"1.4.1", [{restart_application, diameter}]}, %% R16B
{"1.4.1.1", [{restart_application, diameter}]},
- {"1.4.2", [{load_module, diameter_codec}, %% R16B01
- {load_module, diameter_types},
- {load_module, diameter_config},
- {load_module, diameter_capx},
- {load_module, diameter_service},
- {load_module, diameter_peer_fsm},
- {load_module, diameter_watchdog},
- {load_module, diameter}]},
- {"1.4.3", [{load_module, diameter_capx}, %% R16B02
- {load_module, diameter_service},
- {load_module, diameter_watchdog},
- {load_module, diameter_codec},
- {load_module, diameter_types},
- {load_module, diameter_config},
- {load_module, diameter}]},
- {"1.4.4", [{load_module, diameter_capx},
- {load_module, diameter_service},
- {load_module, diameter_watchdog},
- {load_module, diameter_config},
- {load_module, diameter}]}
+ {"1.4.2", [{restart_application, diameter}]}, %% R16B01
+ {"1.4.3", [{restart_application, diameter}]}, %% R16B02
+ {"1.4.4", [{restart_application, diameter}]},
+ {"1.5", [{restart_application, diameter}]}, %% R16B03
+ {"1.6", [{load_module, diameter_lib}, %% 17.0
+ {load_module, diameter_traffic},
+ {load_module, diameter_watchdog},
+ {load_module, diameter_peer_fsm},
+ {load_module, diameter_service},
+ {load_module, diameter_gen_base_rfc6733},
+ {load_module, diameter_gen_acct_rfc6733},
+ {load_module, diameter_gen_base_rfc3588},
+ {load_module, diameter_gen_accounting},
+ {load_module, diameter_gen_relay},
+ {load_module, diameter_codec},
+ {load_module, diameter_sctp}]}
],
[
- {"0.9", [{restart_application, diameter}]},
- {"0.10", [{restart_application, diameter}]},
- {"1.0", [{restart_application, diameter}]},
- {"1.1", [{restart_application, diameter}]},
- {"1.2", [{restart_application, diameter}]},
- {"1.2.1", [{restart_application, diameter}]},
- {"1.3", [{restart_application, diameter}]},
- {"1.3.1", [{restart_application, diameter}]},
- {"1.4", [{restart_application, diameter}]},
- {"1.4.1", [{restart_application, diameter}]},
+ {"0.9", [{restart_application, diameter}]},
+ {"0.10", [{restart_application, diameter}]},
+ {"1.0", [{restart_application, diameter}]},
+ {"1.1", [{restart_application, diameter}]},
+ {"1.2", [{restart_application, diameter}]},
+ {"1.2.1", [{restart_application, diameter}]},
+ {"1.3", [{restart_application, diameter}]},
+ {"1.3.1", [{restart_application, diameter}]},
+ {"1.4", [{restart_application, diameter}]},
+ {"1.4.1", [{restart_application, diameter}]},
{"1.4.1.1", [{restart_application, diameter}]},
- {"1.4.2", [{restart_application, diameter}]},
- {"1.4.3", [{load_module, diameter_types},
- {load_module, diameter_config},
- {load_module, diameter_codec},
- {load_module, diameter_service},
- {load_module, diameter_watchdog},
- {load_module, diameter_capx},
- {load_module, diameter}]},
- {"1.4.4", [{load_module, diameter_capx},
- {load_module, diameter_config},
- {load_module, diameter_service},
- {load_module, diameter_watchdog},
- {load_module, diameter}]}
+ {"1.4.2", [{restart_application, diameter}]},
+ {"1.4.3", [{restart_application, diameter}]},
+ {"1.4.4", [{restart_application, diameter}]},
+ {"1.5", [{restart_application, diameter}]},
+ {"1.6", [{load_module, diameter_sctp},
+ {load_module, diameter_codec},
+ {load_module, diameter_gen_relay},
+ {load_module, diameter_gen_accounting},
+ {load_module, diameter_gen_base_rfc3588},
+ {load_module, diameter_gen_acct_rfc6733},
+ {load_module, diameter_gen_base_rfc6733},
+ {load_module, diameter_service},
+ {load_module, diameter_peer_fsm},
+ {load_module, diameter_watchdog},
+ {load_module, diameter_traffic},
+ {load_module, diameter_lib}]}
]
}.
diff --git a/lib/diameter/src/base/diameter_dbg.erl b/lib/diameter/src/info/diameter_dbg.erl
index 5b0ac3a3b6..b5b3983afa 100644
--- a/lib/diameter/src/base/diameter_dbg.erl
+++ b/lib/diameter/src/info/diameter_dbg.erl
@@ -1,7 +1,7 @@
%%
%% %CopyrightBegin%
%%
-%% Copyright Ericsson AB 2010-2011. All Rights Reserved.
+%% Copyright Ericsson AB 2010-2014. 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
@@ -17,20 +17,22 @@
%% %CopyrightEnd%
%%
+%%
+%% Information and debug functions.
+%%
+
-module(diameter_dbg).
-export([table/1,
tables/0,
fields/1,
- help/0,
modules/0,
versions/0,
version_info/0,
compiled/0,
procs/0,
latest/0,
- nl/0,
- log/4]).
+ nl/0]).
-export([diameter_config/0,
diameter_peer/0,
@@ -52,11 +54,9 @@
tp/1]).
-include_lib("diameter/include/diameter.hrl").
--include("diameter_internal.hrl").
-
--define(INFO, diameter_info).
--define(SEP(), ?INFO:sep()).
+-define(APP, diameter).
+-define(I, diameter_info).
-define(LOCAL, [diameter_config,
diameter_peer,
@@ -68,27 +68,16 @@
-define(VALUES(Rec), tl(tuple_to_list(Rec))).
-log(_Slogan, _Mod, _Line, _Details) ->
- ok.
-
-%%% ----------------------------------------------------------
-%%% # help()
-%%% ----------------------------------------------------------
-
-help() ->
- not_yet_implemented.
-
-%%% ----------------------------------------------------------
-%%% # table(TableName)
-%%%
-%%% Input: TableName = diameter table containing record entries.
-%%%
-%%% Output: Count | undefined
-%%% ----------------------------------------------------------
+%% ----------------------------------------------------------
+%% # table(TableName)
+%%
+%% Pretty-print a diameter table. Returns the number of records
+%% printed, or undefined.
+%% ----------------------------------------------------------
table(T)
when (T == diameter_peer) orelse (T == diameter_reg) ->
- ?INFO:format(collect(T), fields(T), fun ?INFO:split/2);
+ ?I:format(collect(T), fields(T), fun ?I:split/2);
table(Table)
when is_atom(Table) ->
@@ -96,7 +85,7 @@ table(Table)
undefined = No ->
No;
Fields ->
- ?INFO:format(Table, Fields, fun split/2)
+ ?I:format(Table, Fields, fun split/2)
end.
split([started, name | Fs], [S, N | Vs]) ->
@@ -107,9 +96,9 @@ split([[F|FT]|Fs], [Rec|Vs]) ->
split([F|Fs], [V|Vs]) ->
{F, Fs, V, Vs}.
-%%% ----------------------------------------------------------
-%%% # TableName()
-%%% ----------------------------------------------------------
+%% ----------------------------------------------------------
+%% # TableName()
+%% ----------------------------------------------------------
-define(TABLE(Name), Name() -> table(Name)).
@@ -121,16 +110,15 @@ split([F|Fs], [V|Vs]) ->
?TABLE(diameter_service).
?TABLE(diameter_stats).
-%%% ----------------------------------------------------------
-%%% # tables()
-%%%
-%%% Output: Number of records output.
-%%%
-%%% Description: Pretty-print records in diameter tables from all nodes.
-%%% ----------------------------------------------------------
+%% ----------------------------------------------------------
+%% # tables()
+%%
+%% Pretty-print diameter tables from all nodes. Returns the number of
+%% records printed.
+%% ----------------------------------------------------------
tables() ->
- ?INFO:format(field(?LOCAL), fun split/3, fun collect/1).
+ ?I:format(field(?LOCAL), fun split/3, fun collect/1).
field(Tables) ->
lists:map(fun(T) -> {T, fields(T)} end, lists:sort(Tables)).
@@ -138,66 +126,66 @@ field(Tables) ->
split(_, Fs, Vs) ->
split(Fs, Vs).
-%%% ----------------------------------------------------------
-%%% # modules()
-%%% ----------------------------------------------------------
+%% ----------------------------------------------------------
+%% # modules()
+%% ----------------------------------------------------------
modules() ->
- Path = filename:join([appdir(), atom_to_list(?APPLICATION) ++ ".app"]),
- {ok, [{application, ?APPLICATION, Attrs}]} = file:consult(Path),
+ Path = filename:join([appdir(), atom_to_list(?APP) ++ ".app"]),
+ {ok, [{application, ?APP, Attrs}]} = file:consult(Path),
{modules, Mods} = lists:keyfind(modules, 1, Attrs),
Mods.
appdir() ->
- [_|_] = code:lib_dir(?APPLICATION, ebin).
+ [_|_] = code:lib_dir(?APP, ebin).
-%%% ----------------------------------------------------------
-%%% # versions()
-%%% ----------------------------------------------------------
+%% ----------------------------------------------------------
+%% # versions()
+%% ----------------------------------------------------------
versions() ->
- ?INFO:versions(modules()).
+ ?I:versions(modules()).
-%%% ----------------------------------------------------------
-%%% # versions()
-%%% ----------------------------------------------------------
+%% ----------------------------------------------------------
+%% # versions()
+%% ----------------------------------------------------------
version_info() ->
- ?INFO:version_info(modules()).
+ ?I:version_info(modules()).
-%%% ----------------------------------------------------------
-%%% # compiled()
-%%% ----------------------------------------------------------
+%% ----------------------------------------------------------
+%% # compiled()
+%% ----------------------------------------------------------
compiled() ->
- ?INFO:compiled(modules()).
+ ?I:compiled(modules()).
-%%% ----------------------------------------------------------
-%%% procs()
-%%% ----------------------------------------------------------
+%% ----------------------------------------------------------
+%% procs()
+%% ----------------------------------------------------------
procs() ->
- ?INFO:procs(?APPLICATION).
+ ?I:procs(?APP).
-%%% ----------------------------------------------------------
-%%% # latest()
-%%% ----------------------------------------------------------
+%% ----------------------------------------------------------
+%% # latest()
+%% ----------------------------------------------------------
latest() ->
- ?INFO:latest(modules()).
+ ?I:latest(modules()).
-%%% ----------------------------------------------------------
-%%% # nl()
-%%% ----------------------------------------------------------
+%% ----------------------------------------------------------
+%% # nl()
+%% ----------------------------------------------------------
nl() ->
lists:foreach(fun(M) -> abcast = c:nl(M) end, modules()).
-%%% ----------------------------------------------------------
-%%% # pp(Bin)
-%%%
-%%% Description: Pretty-print a message binary.
-%%% ----------------------------------------------------------
+%% ----------------------------------------------------------
+%% # pp(Bin)
+%%
+%% Description: Pretty-print a message binary.
+%% ----------------------------------------------------------
%% Network byte order = big endian.
@@ -207,7 +195,7 @@ pp(<<Version:8, MsgLength:24,
HbHid:32,
E2Eid:32,
AVPs/binary>>) ->
- ?SEP(),
+ ?I:sep(),
ppp(["Version",
"Message length",
"[Actual length]",
@@ -227,7 +215,7 @@ pp(<<Version:8, MsgLength:24,
HbHid,
E2Eid]),
N = avp_loop({AVPs, MsgLength - 20}, 0),
- ?SEP(),
+ ?I:sep(),
N;
pp(<<_Version:8, MsgLength:24, _/binary>> = Bin) ->
@@ -328,23 +316,23 @@ ppp(Fields, Values) ->
ppp({Field, Value}) ->
io:format(": ~-22s : ~p~n", [Field, Value]).
-%%% ----------------------------------------------------------
-%%% # subscriptions()
-%%%
-%%% Output: list of {SvcName, Pid}
-%%% ----------------------------------------------------------
+%% ----------------------------------------------------------
+%% # subscriptions()
+%%
+%% Returns a list of {SvcName, Pid}.
+%% ----------------------------------------------------------
subscriptions() ->
diameter_service:subscriptions().
-%%% ----------------------------------------------------------
-%%% # children()
-%%% ----------------------------------------------------------
+%% ----------------------------------------------------------
+%% # children()
+%% ----------------------------------------------------------
children() ->
diameter_sup:tree().
-%%% ----------------------------------------------------------
+%% ----------------------------------------------------------
%% tracer/[12]
@@ -430,7 +418,7 @@ peers(Name, Ts) ->
mk_peers(Name, [_, {type, connect} | _] = Ts) ->
[[Name | mk_peer(Ts)]];
-mk_peers(Name, [R, {type, listen}, O, {accept = A, As}]) ->
+mk_peers(Name, [R, {type, listen}, O, {accept = A, As} | _]) ->
[[Name | mk_peer([R, {type, A}, O | Ts])] || Ts <- As].
%% This is a bit lame: service_info works to build this list and out
%% of something like what we want here and then we take it apart.
@@ -485,13 +473,12 @@ fields(diameter_service) ->
[started,
name,
record_info(fields, diameter_service),
+ watchdogT,
peerT,
- connT,
- share_peers,
- use_shared_peers,
shared_peers,
local_peers,
- monitor];
+ monitor,
+ options];
?FIELDS(diameter_event);
?FIELDS(diameter_uri);
diff --git a/lib/diameter/src/base/diameter_info.erl b/lib/diameter/src/info/diameter_info.erl
index 39d32d07cd..10972f3231 100644
--- a/lib/diameter/src/base/diameter_info.erl
+++ b/lib/diameter/src/info/diameter_info.erl
@@ -1,7 +1,7 @@
%%
%% %CopyrightBegin%
%%
-%% Copyright Ericsson AB 2010-2011. All Rights Reserved.
+%% Copyright Ericsson AB 2010-2014. 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
@@ -17,6 +17,11 @@
%% %CopyrightEnd%
%%
+%%
+%% Generic functions for formatting table listings and more. Used by
+%% diameter_dbg.
+%%
+
-module(diameter_info).
-export([usage/1,
@@ -573,12 +578,7 @@ sys_info() ->
{A,V}.
os_info() ->
- {os:version(), case os:type() of
- {_Fam, _Name} = T ->
- T;
- Fam ->
- {Fam, ""}
- end}.
+ {os:version(), os:type()}.
chomp(S) ->
string:strip(S, right, $\n).
diff --git a/lib/diameter/src/modules.mk b/lib/diameter/src/modules.mk
index f8d3cf1d6f..a2a7a51892 100644
--- a/lib/diameter/src/modules.mk
+++ b/lib/diameter/src/modules.mk
@@ -1,8 +1,7 @@
-#-*-makefile-*- ; force emacs to enter makefile-mode
# %CopyrightBegin%
#
-# Copyright Ericsson AB 2010-2013. All Rights Reserved.
+# Copyright Ericsson AB 2010-2014. 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
@@ -64,16 +63,19 @@ RT_MODULES = \
transport/diameter_transport \
transport/diameter_transport_sup
-# Handwritten (compile time) modules not included in the app file.
+# Handwritten compiler modules not included in the app file.
CT_MODULES = \
- base/diameter_dbg \
- base/diameter_info \
compiler/diameter_codegen \
compiler/diameter_exprecs \
compiler/diameter_dict_scanner \
compiler/diameter_dict_util \
compiler/diameter_make
+# Info/debug modules, also not included in the app file.
+INFO_MODULES = \
+ info/diameter_dbg \
+ info/diameter_info
+
# Released hrl files in ../include intended for public consumption.
EXTERNAL_HRLS = \
diameter.hrl \
diff --git a/lib/diameter/src/transport/diameter_sctp.erl b/lib/diameter/src/transport/diameter_sctp.erl
index 49a530b4eb..32e7aaca39 100644
--- a/lib/diameter/src/transport/diameter_sctp.erl
+++ b/lib/diameter/src/transport/diameter_sctp.erl
@@ -1,7 +1,7 @@
%%
%% %CopyrightBegin%
%%
-%% Copyright Ericsson AB 2010-2013. All Rights Reserved.
+%% Copyright Ericsson AB 2010-2014. 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
@@ -70,14 +70,14 @@
-type connect_option() :: {raddr, inet:ip_address()}
| {rport, inet:port_number()}
- | gen_sctp:open_option().
+ | term(). %% gen_sctp:open_option().
-type match() :: inet:ip_address()
| string()
| [match()].
-type listen_option() :: {accept, match()}
- | gen_sctp:open_option().
+ | term(). %% gen_sctp:open_option().
-type uint() :: non_neg_integer().
@@ -171,18 +171,33 @@ start_link(T) ->
info({gen_sctp, Sock}) ->
lists:flatmap(fun(K) -> info(K, Sock) end,
- [{socket, sockname},
- {peer, peername},
+ [{socket, socknames},
+ {peer, peernames},
{statistics, getstat}]).
info({K,F}, Sock) ->
case inet:F(Sock) of
{ok, V} ->
- [{K,V}];
+ [{K, map(F,V)}];
_ ->
[]
end.
+%% inet:{sock,peer}names/1 returns [{Addr, Port}] but the port number
+%% should be the same in each tuple. Map to a {[Addr], Port} tuple if
+%% so.
+map(K, [{_, Port} | _] = APs)
+ when K == socknames;
+ K == peernames ->
+ try [A || {A,P} <- APs, P == Port orelse throw(?MODULE)] of
+ As -> {As, Port}
+ catch
+ ?MODULE -> APs
+ end;
+
+map(_, V) ->
+ V.
+
%% ---------------------------------------------------------------------------
%% # init/1
%% ---------------------------------------------------------------------------
@@ -338,9 +353,6 @@ handle_call({{accept, Ref}, Pid}, _, #listener{ref = Ref,
{TPid, NewS} = accept(Ref, Pid, S),
{reply, {ok, TPid}, NewS#listener{count = N+1}};
-handle_call(T, From, {listener,_,_,_,_,_,_} = S) -> % started in old code
- handle_call(T, From, upgrade(S));
-
handle_call(_, _, State) ->
{reply, nok, State}.
@@ -359,10 +371,7 @@ handle_info(T, #transport{} = S) ->
{noreply, #transport{} = t(T,S)};
handle_info(T, #listener{} = S) ->
- {noreply, #listener{} = l(T,S)};
-
-handle_info(T, {listener,_,_,_,_,_,_} = S) -> % started in old code
- handle_info(T, upgrade(S)).
+ {noreply, #listener{} = l(T,S)}.
%% ---------------------------------------------------------------------------
%% # code_change/3
@@ -396,9 +405,6 @@ terminate(_, #listener{socket = Sock}) ->
%% ---------------------------------------------------------------------------
-upgrade(S) ->
- #listener{} = erlang:append_element(S, ?DEFAULT_ACCEPT).
-
putr(Key, Val) ->
put({?MODULE, Key}, Val).
@@ -502,8 +508,6 @@ transition({peeloff, Sock, {sctp, LSock, _RA, _RP, _Data} = Msg, Matches},
= S) ->
ok = accept_peer(Sock, Matches),
transition(Msg, S#transport{socket = Sock});
-transition({peeloff = T, _Sock, _Msg} = T, #transport{} = S) ->% from old code
- transition(erlang:append_element(T, ?DEFAULT_ACCEPT), S);
%% Incoming message.
transition({sctp, _Sock, _RA, _RP, Data}, #transport{socket = Sock} = S) ->
@@ -560,7 +564,7 @@ accept_peer(_, []) ->
ok;
accept_peer(Sock, Matches) ->
- {RAddrs, _} = ok(inet:peername(Sock)),
+ RAddrs = [A || {A,_} <- ok(inet:peernames(Sock))],
diameter_peer:match(RAddrs, Matches)
orelse x({accept, RAddrs, Matches}),
ok.
@@ -605,11 +609,15 @@ accept(_, Pid, #listener{ref = Ref, pending = {N,Q}} = S) ->
%% send/2
%% Outbound Diameter message on a specified stream ...
-send(#diameter_packet{bin = Bin, transport_data = {stream, SId}}, S) ->
- send(SId, Bin, S),
+send(#diameter_packet{bin = Bin, transport_data = {outstream, SId}},
+ #transport{streams = {_, OS}}
+ = S) ->
+ send(SId rem OS, Bin, S),
S;
-%% ... or not: rotate through all steams.
+%% ... or not: rotate through all streams.
+send(#diameter_packet{bin = Bin}, S) ->
+ send(Bin, S);
send(Bin, #transport{streams = {_, OS},
os = N}
= S)
diff --git a/lib/diameter/test/diameter_app_SUITE.erl b/lib/diameter/test/diameter_app_SUITE.erl
index 1e262895a6..f68a18b5c2 100644
--- a/lib/diameter/test/diameter_app_SUITE.erl
+++ b/lib/diameter/test/diameter_app_SUITE.erl
@@ -1,7 +1,7 @@
%%
%% %CopyrightBegin%
%%
-%% Copyright Ericsson AB 2010-2013. All Rights Reserved.
+%% Copyright Ericsson AB 2010-2014. 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
@@ -50,7 +50,7 @@
diameter_exprecs,
diameter_make]).
--define(HELP_MODULES, [diameter_dbg,
+-define(INFO_MODULES, [diameter_dbg,
diameter_info]).
%% ===========================================================================
@@ -99,13 +99,13 @@ vsn(Config) ->
%% # modules/1
%%
%% Ensure that the app file modules and installed modules differ by
-%% compiler/help modules.
+%% compiler/info modules.
%% ===========================================================================
modules(Config) ->
Mods = fetch(modules, fetch(app, Config)),
Installed = code_mods(),
- Help = lists:sort(?HELP_MODULES ++ ?COMPILER_MODULES),
+ Help = lists:sort(?INFO_MODULES ++ ?COMPILER_MODULES),
{[], Help} = {Mods -- Installed, lists:sort(Installed -- Mods)}.
@@ -158,12 +158,15 @@ appvsn(Name) ->
%% # xref/1
%%
%% Ensure that no function in our application calls an undefined function
-%% or one in an application we haven't specified as a dependency. (Almost.)
+%% or one in an application we haven't declared as a dependency. (Almost.)
%% ===========================================================================
xref(Config) ->
App = fetch(app, Config),
- Mods = fetch(modules, App),
+ Mods = fetch(modules, App), %% modules listed in the app file
+
+ %% List of application names extracted from runtime_dependencies.
+ Deps = lists:map(fun unversion/1, fetch(runtime_dependencies, App)),
{ok, XRef} = xref:start(make_name(xref_test_name)),
ok = xref:set_default(XRef, [{verbose, false}, {warnings, false}]),
@@ -178,7 +181,9 @@ xref(Config) ->
[?APP, erts | fetch(applications, App)]),
{ok, Undefs} = xref:analyze(XRef, undefined_function_calls),
- {ok, Called} = xref:analyze(XRef, {module_call, ?COMPILER_MODULES}),
+ {ok, RTmods} = xref:analyze(XRef, {module_use, Mods}),
+ {ok, CTmods} = xref:analyze(XRef, {module_use, ?COMPILER_MODULES}),
+ {ok, RTdeps} = xref:analyze(XRef, {module_call, Mods}),
xref:stop(XRef),
@@ -190,18 +195,41 @@ xref(Config) ->
Undefs),
%% diameter_tcp does call ssl despite the latter not being listed
%% as a dependency in the app file since ssl is only required for
- %% TLS security: it's up to a client who wants TLS it to start
- %% ssl.
-
- [] = lists:filter(fun is_bad_dependency/1, Called).
-
-%% It's not strictly necessary that diameter compiler modules not
-%% depend on other diameter modules but it's a simple source of build
-%% errors if not encoded in the makefile (hence the test) so guard
-%% against it.
-is_bad_dependency(Mod) ->
- lists:prefix("diameter", atom_to_list(Mod))
- andalso not lists:member(Mod, ?COMPILER_MODULES).
+ %% TLS security: it's up to a client who wants TLS to start ssl.
+
+ %% Ensure that only runtime or info modules call runtime modules.
+ %% It's not strictly necessary that diameter compiler modules not
+ %% depend on other diameter modules but it's a simple source of
+ %% build errors if not properly encoded in the makefile so guard
+ %% against it.
+ [] = (RTmods -- Mods) -- ?INFO_MODULES,
+
+ %% Ensure that runtime modules don't call compiler modules.
+ CTmods = CTmods -- Mods,
+
+ %% Ensure that runtime modules only call other runtime modules, or
+ %% applications declared as in runtime_dependencies in the app
+ %% file. Note that the declared application versions are ignored
+ %% since we only know what we can see now.
+ [] = lists:filter(fun(M) -> not lists:member(app(M), Deps) end,
+ RTdeps -- Mods).
+
+unversion(App) ->
+ T = lists:dropwhile(fun is_vsn_ch/1, lists:reverse(App)),
+ lists:reverse(case T of [$-|TT] -> TT; _ -> T end).
+
+is_vsn_ch(C) ->
+ $0 =< C andalso C =< $9 orelse $. == C.
+
+app('$M_EXPR') -> %% could be anything but assume it's ok
+ "erts";
+app(Mod) ->
+ case code:which(Mod) of
+ preloaded ->
+ "erts";
+ Path ->
+ unversion(lists:nth(3, lists:reverse(filename:split(Path))))
+ end.
add_application(XRef, App) ->
add_application(XRef, App, code:lib_dir(App)).
diff --git a/lib/diameter/test/diameter_codec_test.erl b/lib/diameter/test/diameter_codec_test.erl
index 0b4568a9e5..90536dcf2b 100644
--- a/lib/diameter/test/diameter_codec_test.erl
+++ b/lib/diameter/test/diameter_codec_test.erl
@@ -1,8 +1,7 @@
-%% coding: utf-8
%%
%% %CopyrightBegin%
%%
-%% Copyright Ericsson AB 2010-2013. All Rights Reserved.
+%% Copyright Ericsson AB 2010-2014. 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
diff --git a/lib/diameter/test/diameter_compiler_SUITE.erl b/lib/diameter/test/diameter_compiler_SUITE.erl
index ed369e8af3..20c9275808 100644
--- a/lib/diameter/test/diameter_compiler_SUITE.erl
+++ b/lib/diameter/test/diameter_compiler_SUITE.erl
@@ -1,7 +1,7 @@
%%
%% %CopyrightBegin%
%%
-%% Copyright Ericsson AB 2010-2013. All Rights Reserved.
+%% Copyright Ericsson AB 2010-2014. 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
@@ -120,6 +120,16 @@
{avp_has_duplicate_flag,
" -",
" MM"},
+ {ok,
+ "@vendor 0",
+ "@vendor 10415"},
+ {ok,
+ [{"@vendor 0", "@vendor 10415"},
+ {"Proxy-Info .*M$", "&V"},
+ {"Proxy-Info ::= [^>]*", "& 10415 "}]},
+ {grouped_vendor_id_without_flag,
+ [{"@vendor 0", "@vendor 10415"},
+ {"Proxy-Info ::= [^>]*", "& 10415 "}]},
{avp_has_vendor_id,
"@avp_types",
"@avp_vendor_id 667 Class\n&"},
@@ -138,6 +148,9 @@
{grouped_avp_not_defined,
"Failed-AVP *.*",
""},
+ {grouped_avp_not_grouped,
+ "Failed-AVP ::=.*\n.*}",
+ ""},
{grouped_vendor_id_without_flag,
"(Failed-AVP .*)>",
"\\1 668>"},
@@ -304,6 +317,21 @@
{avp_not_defined,
"CEA ::=",
"<XXX> &"},
+ {ok,
+ "@avp_types",
+ "@codecs tmod Session-Id &"},
+ {ok,
+ "@avp_types",
+ "@custom_types tmod Session-Id &"},
+ {avp_not_defined,
+ "@avp_types",
+ "@codecs tmod OctetString &"},
+ {avp_not_defined,
+ "@avp_types",
+ "@custom_types tmod OctetString &"},
+ {avp_already_defined,
+ "@avp_types",
+ "@codecs tmod Session-Id @custom_types tmod Session-Id &"},
{not_loaded,
[{"@avp_types", "@inherits nomod XXX &"},
{"CEA ::=", "<XXX> &"}]},
@@ -397,8 +425,8 @@ replace({E, Mods}, Bin) ->
case {E, parse(B, [{include, here()}]), Mods} of
{ok, {ok, Dict}, _} ->
Dict;
- {_, {error, S}, _} ->
- S
+ {_, {error, {E,_} = T}, _} when E /= ok ->
+ diameter_make:format_error(T)
end.
re({RE, Repl}, Bin) ->
diff --git a/lib/diameter/test/diameter_dpr_SUITE.erl b/lib/diameter/test/diameter_dpr_SUITE.erl
index 9252650bf7..f3f16b06e0 100644
--- a/lib/diameter/test/diameter_dpr_SUITE.erl
+++ b/lib/diameter/test/diameter_dpr_SUITE.erl
@@ -1,7 +1,7 @@
%%
%% %CopyrightBegin%
%%
-%% Copyright Ericsson AB 2012. All Rights Reserved.
+%% Copyright Ericsson AB 2012-2014. 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
@@ -73,7 +73,7 @@
%% Valid values for Disconnect-Cause.
-define(CAUSES, [0, rebooting, 1, busy, 2, goaway]).
-%% Establish one client connection for element of this list,
+%% Establish one client connection for each element of this list,
%% configured with disconnect/5 as disconnect_cb and returning the
%% specified value.
-define(RETURNS,
@@ -129,8 +129,8 @@ stop_service(Config) ->
service == group(Config)
andalso (ok = diameter:stop_service(?CLIENT)).
-%% Check for callbacks and stop the service. (Not the other way around
-%% for the timing reason explained below.)
+%% Check for callbacks before diameter:stop/0, not the other way around
+%% for the timing reason explained below.
check(Config) ->
Grp = group(Config),
[Pid | Refs] = ?util:read_priv(Config, config),
diff --git a/lib/diameter/test/diameter_examples_SUITE.erl b/lib/diameter/test/diameter_examples_SUITE.erl
index 02c8d34361..aef4bc35ef 100644
--- a/lib/diameter/test/diameter_examples_SUITE.erl
+++ b/lib/diameter/test/diameter_examples_SUITE.erl
@@ -1,7 +1,7 @@
%%
%% %CopyrightBegin%
%%
-%% Copyright Ericsson AB 2013. All Rights Reserved.
+%% Copyright Ericsson AB 2013-2014. 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
@@ -24,7 +24,10 @@
-module(diameter_examples_SUITE).
-export([suite/0,
- all/0]).
+ all/0,
+ groups/0,
+ init_per_group/2,
+ end_per_group/2]).
%% testcases
-export([dict/1, dict/0,
@@ -46,7 +49,7 @@
%% The order here is significant and causes the server to listen
%% before the clients connect.
--define(NODES, [compile, server, client]).
+-define(NODES, [server, client]).
%% Options to ct_slave:start/2.
-define(TIMEOUTS, [{T, 15000} || T <- [boot_timeout,
@@ -63,6 +66,9 @@
%% Common dictionaries to inherit from examples.
-define(DICT0, [rfc3588_base, rfc6733_base]).
+%% Transport protocols over which the example Diameter nodes are run.
+-define(PROTS, [tcp, sctp]).
+
%% ===========================================================================
suite() ->
@@ -71,7 +77,34 @@ suite() ->
all() ->
[dict,
code,
- slave,
+ {group, all}].
+
+groups() ->
+ Tc = tc(),
+ [{all, [parallel], [{group, P} || P <- ?PROTS]}
+ | [{P, [], Tc} || P <- ?PROTS]].
+
+init_per_group(all, Config) ->
+ Config;
+
+init_per_group(tcp = N, Config) ->
+ [{group, N} | Config];
+
+init_per_group(sctp = N, Config) ->
+ case gen_sctp:open() of
+ {ok, Sock} ->
+ gen_sctp:close(Sock),
+ [{group, N} | Config];
+ {error, E} when E == eprotonosupport;
+ E == esocktnosupport -> %% fail on any other reason
+ {skip, no_sctp}
+ end.
+
+end_per_group(_, _) ->
+ ok.
+
+tc() ->
+ [slave,
enslave,
start,
traffic,
@@ -88,7 +121,7 @@ dict() ->
dict(_Config) ->
Dirs = [filename:join(H ++ ["examples", "dict"])
|| H <- [[code:lib_dir(diameter)], [here(), ".."]]],
- [] = [{F,D,RC} || {_,F} <- sort(find_files(Dirs, ".*\\.dia")),
+ [] = [{F,D,RC} || {_,F} <- sort(find_files(Dirs, ".*\\.dia$")),
D <- ?DICT0,
RC <- [make(F,D)],
RC /= ok].
@@ -184,17 +217,18 @@ make_name(Dict) ->
%% Compile example code under examples/code.
code(Config) ->
- Node = slave(hd(?NODES), here()),
+ Node = slave(compile, here()),
[] = rpc:call(Node,
?MODULE,
install,
- [proplists:get_value(priv_dir, Config)]).
+ [proplists:get_value(priv_dir, Config)]),
+ {ok, Node} = ct_slave:stop(compile).
%% Compile on another node since the code path may be modified.
install(PrivDir) ->
Top = install(here(), PrivDir),
Src = filename:join([Top, "examples", "code"]),
- Files = find_files([Src], ".*\\.erl"),
+ Files = find_files([Src], ".*\\.erl$"),
[] = [{F,E} || {_,F} <- Files,
{error, _, _} = E <- [compile:file(F, [warnings_as_errors,
return_errors])]].
@@ -226,7 +260,7 @@ install(Dir, PrivDir) ->
Inc = filename:join([Top, "include"]),
Gen = filename:join([Top, "src", "gen"]),
- Files = find_files([Inc, Gen], ".*\\.hrl"),
+ Files = find_files([Inc, Gen], ".*\\.hrl$"),
[] = [{F,E} || {_,F} <- Files,
B <- [filename:basename(F)],
D <- [filename:join([TmpInc, B])],
@@ -280,9 +314,10 @@ now_diff(_) ->
%% Start two nodes: one for the server, one for the client.
enslave(Config) ->
+ Prot = proplists:get_value(group, Config),
Dir = here(),
- Nodes = [{N, slave(N, Dir)} || N <- tl(?NODES)],
- ?util:write_priv(Config, nodes, Nodes).
+ Nodes = [{S, slave(N, Dir)} || S <- ?NODES, N <- [concat(Prot, S)]],
+ ?util:write_priv(Config, Prot, Nodes).
slave(Name, Dir) ->
{ok, Node} = ct_slave:start(Name, ?TIMEOUTS),
@@ -292,6 +327,9 @@ slave(Name, Dir) ->
[[Dir, filename:join([Dir, "..", "ebin"])]]),
Node.
+concat(Prot, Svc) ->
+ list_to_atom(atom_to_list(Prot) ++ atom_to_list(Svc)).
+
here() ->
filename:dirname(code:which(?MODULE)).
@@ -304,24 +342,25 @@ top(Dir, LibDir) ->
%% start/1
-start(server) ->
+start({server, Prot}) ->
ok = diameter:start(),
ok = server:start(),
- {ok, Ref} = server:listen(tcp),
- [_] = ?util:lport(tcp, Ref),
+ {ok, Ref} = server:listen(Prot),
+ [_] = ?util:lport(Prot, Ref),
ok;
-start(client) ->
+start({client = Svc, Prot}) ->
ok = diameter:start(),
- true = diameter:subscribe(client),
+ true = diameter:subscribe(Svc),
ok = client:start(),
- {ok, Ref} = client:connect(tcp),
+ {ok, Ref} = client:connect(Prot),
receive #diameter_event{info = {up, Ref, _, _, _}} -> ok end;
start(Config) ->
- Nodes = ?util:read_priv(Config, nodes),
+ Prot = proplists:get_value(group, Config),
+ Nodes = ?util:read_priv(Config, Prot),
[] = [RC || {T,N} <- Nodes,
- RC <- [rpc:call(N, ?MODULE, start, [T])],
+ RC <- [rpc:call(N, ?MODULE, start, [{T, Prot}])],
RC /= ok].
%% traffic/1
@@ -336,7 +375,8 @@ traffic(client) ->
receive {'DOWN', MRef, process, _, Reason} -> Reason end;
traffic(Config) ->
- Nodes = ?util:read_priv(Config, nodes),
+ Prot = proplists:get_value(group, Config),
+ Nodes = ?util:read_priv(Config, Prot),
[] = [RC || {T,N} <- Nodes,
RC <- [rpc:call(N, ?MODULE, traffic, [T])],
RC /= ok].
@@ -355,5 +395,6 @@ stop(Name)
{ok, _Node} = ct_slave:stop(Name),
ok;
-stop(_Config) ->
- [] = [RC || N <- ?NODES, RC <- [stop(N)], RC /= ok].
+stop(Config) ->
+ Prot = proplists:get_value(group, Config),
+ [] = [RC || N <- ?NODES, RC <- [stop(concat(Prot, N))], RC /= ok].
diff --git a/lib/diameter/test/diameter_failover_SUITE.erl b/lib/diameter/test/diameter_failover_SUITE.erl
index dfd3253827..c1494dcdb1 100644
--- a/lib/diameter/test/diameter_failover_SUITE.erl
+++ b/lib/diameter/test/diameter_failover_SUITE.erl
@@ -1,7 +1,7 @@
%%
%% %CopyrightBegin%
%%
-%% Copyright Ericsson AB 2010-2013. All Rights Reserved.
+%% Copyright Ericsson AB 2010-2014. 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
@@ -47,6 +47,7 @@
send_discard_1/1,
send_discard_2/1,
stop_services/1,
+ empty/1,
stop/1]).
%% diameter callbacks
@@ -121,6 +122,7 @@ all() ->
send_discard_1,
send_discard_2,
stop_services,
+ empty,
stop].
%% ===========================================================================
@@ -147,6 +149,10 @@ stop_services(_Config) ->
T <- [diameter:stop_service(H)],
T /= ok].
+%% Ensure transports have been removed from request table.
+empty(_Config) ->
+ [] = ets:tab2list(diameter_request).
+
stop(_Config) ->
ok = diameter:stop().
diff --git a/lib/diameter/test/diameter_traffic_SUITE.erl b/lib/diameter/test/diameter_traffic_SUITE.erl
index a97c54fc04..4b67372016 100644
--- a/lib/diameter/test/diameter_traffic_SUITE.erl
+++ b/lib/diameter/test/diameter_traffic_SUITE.erl
@@ -1,7 +1,7 @@
%%
%% %CopyrightBegin%
%%
-%% Copyright Ericsson AB 2010-2013. All Rights Reserved.
+%% Copyright Ericsson AB 2010-2014. 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
@@ -43,7 +43,9 @@
send_protocol_error/1,
send_arbitrary/1,
send_unknown/1,
+ send_unknown_short/1,
send_unknown_mandatory/1,
+ send_unknown_short_mandatory/1,
send_noreply/1,
send_unsupported/1,
send_unsupported_app/1,
@@ -54,7 +56,8 @@
send_zero_avp_length/1,
send_invalid_avp_length/1,
send_invalid_reject/1,
- send_unrecognized_mandatory/1,
+ send_unexpected_mandatory_decode/1,
+ send_unexpected_mandatory/1,
send_long/1,
send_nopeer/1,
send_noapp/1,
@@ -266,7 +269,9 @@ tc() ->
send_protocol_error,
send_arbitrary,
send_unknown,
+ send_unknown_short,
send_unknown_mandatory,
+ send_unknown_short_mandatory,
send_noreply,
send_unsupported,
send_unsupported_app,
@@ -277,7 +282,8 @@ tc() ->
send_zero_avp_length,
send_invalid_avp_length,
send_invalid_reject,
- send_unrecognized_mandatory,
+ send_unexpected_mandatory_decode,
+ send_unexpected_mandatory,
send_long,
send_nopeer,
send_noapp,
@@ -447,6 +453,24 @@ send_unknown(Config) ->
data = <<17>>}]}
= lists:last(Avps).
+%% Ditto, and point the AVP length past the end of the message. Expect
+%% 5014.
+send_unknown_short(Config) ->
+ send_unknown_short(Config, false, ?INVALID_AVP_LENGTH).
+
+send_unknown_short(Config, M, RC) ->
+ Req = ['ASR', {'AVP', [#diameter_avp{code = 999,
+ is_mandatory = M,
+ data = <<17>>}]}],
+ ['ASA', _SessionId, {'Result-Code', RC} | Avps]
+ = call(Config, Req),
+ [#'diameter_base_Failed-AVP'{'AVP' = As}]
+ = proplists:get_value('Failed-AVP', Avps),
+ [#diameter_avp{code = 999,
+ is_mandatory = M,
+ data = <<17, _/binary>>}] %% extra bits from padding
+ = As.
+
%% Ditto but set the M flag.
send_unknown_mandatory(Config) ->
Req = ['ASR', {'AVP', [#diameter_avp{code = 999,
@@ -461,6 +485,27 @@ send_unknown_mandatory(Config) ->
data = <<17>>}]
= As.
+%% Ditto, and point the AVP length past the end of the message. Expect
+%% 5014 instead of 5001.
+send_unknown_short_mandatory(Config) ->
+ send_unknown_short(Config, true, ?INVALID_AVP_LENGTH).
+
+%% Send an ACR containing an unexpected mandatory Session-Timeout.
+%% Expect 5001, and check that the value in Failed-AVP was decoded.
+send_unexpected_mandatory_decode(Config) ->
+ Req = ['ASR', {'AVP', [#diameter_avp{code = 27, %% Session-Timeout
+ is_mandatory = true,
+ data = <<12:32>>}]}],
+ ['ASA', _SessionId, {'Result-Code', ?AVP_UNSUPPORTED} | Avps]
+ = call(Config, Req),
+ [#'diameter_base_Failed-AVP'{'AVP' = As}]
+ = proplists:get_value('Failed-AVP', Avps),
+ [#diameter_avp{code = 27,
+ is_mandatory = true,
+ value = 12,
+ data = <<12:32>>}]
+ = As.
+
%% Send an STR that the server ignores.
send_noreply(Config) ->
Req = ['STR', {'Termination-Cause', ?BAD_ANSWER}],
@@ -527,9 +572,9 @@ send_invalid_reject(Config) ->
?answer_message(?TOO_BUSY)
= call(Config, Req).
-%% Send an STR containing a known AVP, but one that's not allowed and
-%% sets the M-bit.
-send_unrecognized_mandatory(Config) ->
+%% Send an STR containing a known AVP, but one that's not expected and
+%% that sets the M-bit.
+send_unexpected_mandatory(Config) ->
Req = ['STR', {'Termination-Cause', ?LOGOUT}],
['STA', _SessionId, {'Result-Code', ?AVP_UNSUPPORTED} | _]
@@ -836,6 +881,26 @@ log(#diameter_packet{bin = Bin} = P, T)
%% prepare/4
prepare(Pkt, Caps, N, #group{client_dict0 = Dict0} = Group)
+ when N == send_unknown_short_mandatory;
+ N == send_unknown_short ->
+ Req = prepare(Pkt, Caps, Group),
+
+ #diameter_packet{header = #diameter_header{length = L},
+ bin = Bin}
+ = E
+ = diameter_codec:encode(Dict0, Pkt#diameter_packet{msg = Req}),
+
+ %% Find the unknown AVP data at the end of the message and alter
+ %% its length header.
+
+ {Padding, [17|_]} = lists:splitwith(fun(C) -> C == 0 end,
+ lists:reverse(binary_to_list(Bin))),
+
+ Offset = L - length(Padding) - 4,
+ <<H:Offset/binary, Len:24, T/binary>> = Bin,
+ E#diameter_packet{bin = <<H/binary, (Len+9):24, T/binary>>};
+
+prepare(Pkt, Caps, N, #group{client_dict0 = Dict0} = Group)
when N == send_long_avp_length;
N == send_short_avp_length;
N == send_zero_avp_length ->
@@ -876,8 +941,8 @@ prepare(Pkt, Caps, N, #group{client_dict0 = Dict0} = Group)
<<V, L:24, H/binary>> = H0, %% assert
E#diameter_packet{bin = <<V, (L+4):24, H/binary, 16:24, 0:32, T/binary>>};
-prepare(Pkt, Caps, send_unrecognized_mandatory, #group{client_dict0 = Dict0}
- = Group) ->
+prepare(Pkt, Caps, send_unexpected_mandatory, #group{client_dict0 = Dict0}
+ = Group) ->
Req = prepare(Pkt, Caps, Group),
#diameter_packet{bin = <<V, Len:24, T/binary>>}
= E
@@ -997,7 +1062,9 @@ answer(Rec, [_|_], N)
N == send_short_avp_length;
N == send_zero_avp_length;
N == send_invalid_avp_length;
- N == send_invalid_reject ->
+ N == send_invalid_reject;
+ N == send_unknown_short_mandatory;
+ N == send_unexpected_mandatory_decode ->
Rec;
answer(Rec, [], _) ->
Rec.
diff --git a/lib/diameter/vsn.mk b/lib/diameter/vsn.mk
index 9fda067f2b..560c2aed50 100644
--- a/lib/diameter/vsn.mk
+++ b/lib/diameter/vsn.mk
@@ -2,7 +2,7 @@
# %CopyrightBegin%
#
-# Copyright Ericsson AB 2010-2013. All Rights Reserved.
+# Copyright Ericsson AB 2010-2014. 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
@@ -18,5 +18,5 @@
# %CopyrightEnd%
APPLICATION = diameter
-DIAMETER_VSN = 1.5
+DIAMETER_VSN = 1.7
APP_VSN = $(APPLICATION)-$(DIAMETER_VSN)$(PRE_VSN)
diff --git a/lib/edoc/doc/src/notes.xml b/lib/edoc/doc/src/notes.xml
index 394e7af09c..d7cbfa1fdc 100644
--- a/lib/edoc/doc/src/notes.xml
+++ b/lib/edoc/doc/src/notes.xml
@@ -31,6 +31,35 @@
<p>This document describes the changes made to the EDoc
application.</p>
+<section><title>Edoc 0.7.13</title>
+
+ <section><title>Fixed Bugs and Malfunctions</title>
+ <list>
+ <item>
+ <p>
+ Application upgrade (appup) files are corrected for the
+ following applications: </p>
+ <p>
+ <c>asn1, common_test, compiler, crypto, debugger,
+ dialyzer, edoc, eldap, erl_docgen, et, eunit, gs, hipe,
+ inets, observer, odbc, os_mon, otp_mibs, parsetools,
+ percept, public_key, reltool, runtime_tools, ssh,
+ syntax_tools, test_server, tools, typer, webtool, wx,
+ xmerl</c></p>
+ <p>
+ A new test utility for testing appup files is added to
+ test_server. This is now used by most applications in
+ OTP.</p>
+ <p>
+ (Thanks to Tobias Schlager)</p>
+ <p>
+ Own Id: OTP-11744</p>
+ </item>
+ </list>
+ </section>
+
+</section>
+
<section><title>Edoc 0.7.12.1</title>
<section><title>Improvements and New Features</title>
diff --git a/lib/edoc/src/edoc.app.src b/lib/edoc/src/edoc.app.src
index 0c8d5b85f8..9e1155d3e8 100644
--- a/lib/edoc/src/edoc.app.src
+++ b/lib/edoc/src/edoc.app.src
@@ -22,4 +22,6 @@
otpsgml_layout]},
{registered,[]},
{applications, [compiler,kernel,stdlib,syntax_tools]},
- {env, []}]}.
+ {env, []},
+ {runtime_dependencies, ["xmerl-1.3.7","syntax_tools-1.6.14","stdlib-2.0",
+ "kernel-3.0","inets-5.10","erts-6.0"]}]}.
diff --git a/lib/edoc/src/edoc.appup.src b/lib/edoc/src/edoc.appup.src
index 54a63833e6..45b4046ed8 100644
--- a/lib/edoc/src/edoc.appup.src
+++ b/lib/edoc/src/edoc.appup.src
@@ -1 +1,21 @@
-{"%VSN%",[],[]}.
+%% -*- erlang -*-
+%% %CopyrightBegin%
+%%
+%% Copyright Ericsson AB 2014. 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%
+{"%VSN%",
+ [{<<".*">>,[{restart_application, edoc}]}],
+ [{<<".*">>,[{restart_application, edoc}]}]
+}.
diff --git a/lib/edoc/src/edoc_doclet.erl b/lib/edoc/src/edoc_doclet.erl
index ce1e94a26a..5653b5894b 100644
--- a/lib/edoc/src/edoc_doclet.erl
+++ b/lib/edoc/src/edoc_doclet.erl
@@ -200,7 +200,7 @@ source({M, P, Name, Path}, Dir, Suffix, Env, Set, Private, Hidden,
{Set, Error}
end;
R ->
- report("skipping source file '~ts': ~W.", [File, R, 15]),
+ report("skipping source file '~ts': ~P.", [File, R, 15]),
{Set, true}
end.
diff --git a/lib/edoc/src/edoc_layout.erl b/lib/edoc/src/edoc_layout.erl
index 7bd0615f5c..e164ff060f 100644
--- a/lib/edoc/src/edoc_layout.erl
+++ b/lib/edoc/src/edoc_layout.erl
@@ -829,6 +829,10 @@ t_type([#xmlElement{name = list, content = Es}]) ->
t_list(Es);
t_type([#xmlElement{name = nonempty_list, content = Es}]) ->
t_nonempty_list(Es);
+t_type([#xmlElement{name = map, content = Es}]) ->
+ t_map(Es);
+t_type([#xmlElement{name = map_field, content=Es}]) ->
+ t_map_field(Es);
t_type([#xmlElement{name = tuple, content = Es}]) ->
t_tuple(Es);
t_type([#xmlElement{name = 'fun', content = Es}]) ->
@@ -877,6 +881,12 @@ t_fun(Es) ->
["("] ++ seq(fun t_utype_elem/1, get_content(argtypes, Es),
[") -> "] ++ t_utype(get_elem(type, Es))).
+t_map(Es) ->
+ ["#{"] ++ seq(fun t_utype_elem/1, Es, ["}"]).
+
+t_map_field([K,V]) ->
+ [t_utype_elem(K) ++ " => " ++ t_utype_elem(V)].
+
t_record(E, Es) ->
Name = ["#"] ++ t_type(get_elem(atom, Es)),
case get_elem(field, Es) of
diff --git a/lib/edoc/src/edoc_lib.erl b/lib/edoc/src/edoc_lib.erl
index ca9df2b632..c46338a2e1 100644
--- a/lib/edoc/src/edoc_lib.erl
+++ b/lib/edoc/src/edoc_lib.erl
@@ -1032,7 +1032,7 @@ run_plugin(Name, Key, Default, Fun, Opts) when is_atom(Name) ->
{ok, Value} ->
Value;
R ->
- report("error in ~ts '~w': ~W.", [Name, Module, R, 20]),
+ report("error in ~ts '~w': ~P.", [Name, Module, R, 20]),
exit(error)
end.
diff --git a/lib/edoc/src/edoc_parser.yrl b/lib/edoc/src/edoc_parser.yrl
index 7762f2da7d..c6f8a04775 100644
--- a/lib/edoc/src/edoc_parser.yrl
+++ b/lib/edoc/src/edoc_parser.yrl
@@ -29,13 +29,14 @@ Nonterminals
start spec func_type utype_list utype_tuple utypes utype ptypes ptype
nutype function_name where_defs defs defs2 def typedef etype
throws qname ref aref mref lref pref var_list vars fields field
+utype_map utype_map_fields utype_map_field
futype_list bin_base_type bin_unit_type.
Terminals
atom float integer var an_var string start_spec start_typedef start_throws
start_ref
-'(' ')' ',' '.' '->' '{' '}' '[' ']' '|' '+' ':' '::' '=' '/' '//' '*'
+'(' ')' ',' '.' '=>' '->' '{' '}' '[' ']' '|' '+' ':' '::' '=' '/' '//' '*'
'#' 'where' '<<' '>>' '..' '...'.
Rootsymbol start.
@@ -69,6 +70,14 @@ utype_list -> '(' utypes ')' : {lists:reverse('$2'), tok_line('$1')}.
futype_list -> utype_list : '$1'.
futype_list -> '(' '...' ')' : {[#t_var{name = '...'}], tok_line('$1')}.
+utype_map -> '#' '{' utype_map_fields '}' : lists:reverse('$3').
+
+utype_map_fields -> '$empty' : [].
+utype_map_fields -> utype_map_field : ['$1'].
+utype_map_fields -> utype_map_fields ',' utype_map_field : ['$3' | '$1'].
+
+utype_map_field -> utype '=>' utype : #t_map_field{ k_type = '$1', v_type = '$3'}.
+
utype_tuple -> '{' utypes '}' : lists:reverse('$2').
%% Produced in reverse order.
@@ -91,9 +100,10 @@ ptype -> var : #t_var{name = tok_val('$1')}.
ptype -> atom : #t_atom{val = tok_val('$1')}.
ptype -> integer: #t_integer{val = tok_val('$1')}.
ptype -> integer '..' integer: #t_integer_range{from = tok_val('$1'),
- to = tok_val('$3')}.
+ to = tok_val('$3')}.
ptype -> float: #t_float{val = tok_val('$1')}.
ptype -> utype_tuple : #t_tuple{types = '$1'}.
+ptype -> utype_map : #t_map{types = '$1'}.
ptype -> '[' ']' : #t_nil{}.
ptype -> '[' utype ']' : #t_list{type = '$2'}.
ptype -> '[' utype ',' '...' ']' : #t_nonempty_list{type = '$2'}.
@@ -462,3 +472,5 @@ throw_error(parse_param, L) ->
throw({error, L, "missing parameter name"});
throw_error({Where, E}, L) when is_list(Where) ->
throw({error,L,{"unknown error parsing ~ts: ~P.",[Where,E,15]}}).
+
+%% vim: ft=erlang
diff --git a/lib/edoc/src/edoc_scanner.erl b/lib/edoc/src/edoc_scanner.erl
index 754fcef643..6ff97a134c 100644
--- a/lib/edoc/src/edoc_scanner.erl
+++ b/lib/edoc/src/edoc_scanner.erl
@@ -137,6 +137,8 @@ scan1([$"|Cs0], Toks, Pos) -> % String
scan_error({illegal, string}, Pos)
end;
%% Punctuation characters and operators, first recognise multiples.
+scan1([$=,$>|Cs], Toks, Pos) ->
+ scan1(Cs, [{'=>',Pos}|Toks], Pos);
scan1([$<,$<|Cs], Toks, Pos) ->
scan1(Cs, [{'<<',Pos}|Toks], Pos);
scan1([$>,$>|Cs], Toks, Pos) ->
diff --git a/lib/edoc/src/edoc_specs.erl b/lib/edoc/src/edoc_specs.erl
index 5acf8ac0d5..211a354c74 100644
--- a/lib/edoc/src/edoc_specs.erl
+++ b/lib/edoc/src/edoc_specs.erl
@@ -1,7 +1,7 @@
%%
%% %CopyrightBegin%
%%
-%% Copyright Ericsson AB 1996-2011. All Rights Reserved.
+%% Copyright Ericsson AB 1996-2014. 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
@@ -35,7 +35,7 @@
%% Exported functions
%%
--spec type(Form::syntaxTree(), TypeDocs::dict()) -> #tag{}.
+-spec type(Form::syntaxTree(), TypeDocs::dict:dict()) -> #tag{}.
%% @doc Convert an Erlang type to EDoc representation.
%% TypeDocs is a dict of {Name, Doc}.
@@ -88,7 +88,7 @@ dummy_spec(Form) ->
-spec docs(Forms::[syntaxTree()],
CommentFun :: fun( ([syntaxTree()], Line :: term()) -> #tag{} ))
- -> dict().
+ -> dict:dict().
%% @doc Find comments after -type/-opaque declarations.
%% Postcomments "inside" the type are skipped.
@@ -358,6 +358,14 @@ d2e({type,_,tuple,any}) ->
d2e({type,_,binary,[Base,Unit]}) ->
#t_binary{base_size = element(3, Base),
unit_size = element(3, Unit)};
+d2e({type,_,map,any}) ->
+ #t_map{ types = []};
+d2e({type,_,map,Es}) ->
+ #t_map{ types = d2e(Es) };
+d2e({type,_,map_field_assoc,K,V}) ->
+ #t_map_field{ k_type = d2e(K), v_type=d2e(V) };
+d2e({type,_,map_field_exact,K,V}) ->
+ #t_map_field{ k_type = d2e(K), v_type=d2e(V) };
d2e({type,_,tuple,Ts0}) ->
Ts = d2e(Ts0),
typevar_anno(#t_tuple{types = Ts}, Ts);
@@ -476,6 +484,11 @@ xrecs(#t_fun{args = Args0, range = Range0}=T, P) ->
Args = xrecs(Args0, P),
Range = xrecs(Range0, P),
T#t_fun{args = Args, range = Range};
+xrecs(#t_map{ types = Ts0 }=T,P) ->
+ Ts = xrecs(Ts0, P),
+ T#t_map{ types = Ts };
+xrecs(#t_map_field{ k_type=Kt, v_type=Vt}=T, P) ->
+ T#t_map_field{ k_type=xrecs(Kt,P), v_type=xrecs(Vt,P)};
xrecs(#t_tuple{types = Types0}=T, P) ->
Types = xrecs(Types0, P),
T#t_tuple{types = Types};
diff --git a/lib/edoc/src/edoc_tags.erl b/lib/edoc/src/edoc_tags.erl
index eb41f1922a..264a533a52 100644
--- a/lib/edoc/src/edoc_tags.erl
+++ b/lib/edoc/src/edoc_tags.erl
@@ -454,12 +454,14 @@ check_type(#tag{line = L, data = Data}, P0, Ls, Ts) ->
check_type(#t_def{type = Type}, P, Ls, Ts) ->
check_type(Type, P, Ls, Ts);
check_type(#t_type{name = Name, args = Args}, P, Ls, Ts) ->
- check_used_type(Name, Args, P, Ls),
+ _ = check_used_type(Name, Args, P, Ls),
check_types3(Args++Ts, P, Ls);
check_type(#t_var{}, P, Ls, Ts) ->
check_types3(Ts, P, Ls);
check_type(#t_fun{args = Args, range = Range}, P, Ls, Ts) ->
check_type(Range, P, Ls, Args++Ts);
+check_type(#t_map{}, P, Ls, Ts) ->
+ check_types3(Ts, P, Ls);
check_type(#t_tuple{types = Types}, P, Ls, Ts) ->
check_types3(Types ++Ts, P, Ls);
check_type(#t_list{type = Type}, P, Ls, Ts) ->
diff --git a/lib/edoc/src/edoc_types.erl b/lib/edoc/src/edoc_types.erl
index 60c6cecb97..d4e00d3ecd 100644
--- a/lib/edoc/src/edoc_types.erl
+++ b/lib/edoc/src/edoc_types.erl
@@ -66,6 +66,7 @@ is_new_predefined(boolean, 0) -> true;
is_new_predefined(byte, 0) -> true;
is_new_predefined(iodata, 0) -> true;
is_new_predefined(iolist, 0) -> true;
+is_new_predefined(map, 0) -> true;
is_new_predefined(maybe_improper_list, 0) -> true;
is_new_predefined(maybe_improper_list, 2) -> true;
is_new_predefined(mfa, 0) -> true;
@@ -141,6 +142,10 @@ to_xml(#t_type{name = N, args = As}, Env) ->
to_xml(#t_fun{args = As, range = T}, Env) ->
{'fun', [{argtypes, map(fun wrap_utype/2, As, Env)},
wrap_utype(T, Env)]};
+to_xml(#t_map{ types = Ts}, Env) ->
+ {map, map(fun wrap_utype/2, Ts, Env)};
+to_xml(#t_map_field{ k_type=K, v_type=V}, Env) ->
+ {map_field, [wrap_utype(K,Env), wrap_utype(V, Env)]};
to_xml(#t_tuple{types = Ts}, Env) ->
{tuple, map(fun wrap_utype/2, Ts, Env)};
to_xml(#t_list{type = T}, Env) ->
diff --git a/lib/edoc/src/edoc_types.hrl b/lib/edoc/src/edoc_types.hrl
index 05c61d70ff..7fec10d936 100644
--- a/lib/edoc/src/edoc_types.hrl
+++ b/lib/edoc/src/edoc_types.hrl
@@ -155,3 +155,7 @@
%% @type t_paren() = #t_paren{a = list(), type = type()}
-record(t_paren, {a=[], type}). % parentheses
+
+-record(t_map, {a=[], types=[]}).
+-record(t_map_field, {a=[], k_type, v_type}).
+
diff --git a/lib/edoc/test/edoc_SUITE.erl b/lib/edoc/test/edoc_SUITE.erl
index 5b95c35756..c9c7811afb 100644
--- a/lib/edoc/test/edoc_SUITE.erl
+++ b/lib/edoc/test/edoc_SUITE.erl
@@ -22,12 +22,12 @@
init_per_group/2,end_per_group/2]).
%% Test cases
--export([build_std/1]).
+-export([app/1,appup/1,build_std/1,build_map_module/1]).
suite() -> [{ct_hooks,[ts_install_cth]}].
all() ->
- [build_std].
+ [app,appup,build_std,build_map_module].
groups() ->
[].
@@ -44,26 +44,36 @@ init_per_group(_GroupName, Config) ->
end_per_group(_GroupName, Config) ->
Config.
+%% Test that the .app file does not contain any `basic' errors
+app(Config) when is_list(Config) ->
+ ok = ?t:app_test(edoc).
-build_std(suite) ->
- [];
-build_std(doc) ->
- ["Build some documentation using standard EDoc layout"];
-build_std(Config) when is_list(Config) ->
+%% Test that the .appup file does not contain any `basic' errors
+appup(Config) when is_list(Config) ->
+ ok = ?t:appup_test(edoc).
- ?line DataDir = ?config(data_dir, Config),
- ?line Overview1 = filename:join(DataDir, "overview.edoc"),
- ?line Overview2 = filename:join(DataDir, "overview.syntax_tools"),
- ?line PrivDir = ?config(priv_dir, Config),
+build_std(suite) -> [];
+build_std(doc) -> ["Build some documentation using standard EDoc layout"];
+build_std(Config) when is_list(Config) ->
+ DataDir = ?config(data_dir, Config),
+ Overview1 = filename:join(DataDir, "overview.edoc"),
+ Overview2 = filename:join(DataDir, "overview.syntax_tools"),
+ PrivDir = ?config(priv_dir, Config),
- ?line ok = edoc:application(edoc, [{overview, Overview1},
- {def, {vsn,"TEST"}},
- {dir, PrivDir}]),
+ ok = edoc:application(edoc, [{overview, Overview1},
+ {def, {vsn,"TEST"}},
+ {dir, PrivDir}]),
- ?line ok = edoc:application(syntax_tools, [{overview, Overview2},
- {def, {vsn,"TEST"}},
- {dir, PrivDir}]),
+ ok = edoc:application(syntax_tools, [{overview, Overview2},
+ {def, {vsn,"TEST"}},
+ {dir, PrivDir}]),
- ?line ok = edoc:application(xmerl, [{dir, PrivDir}]),
+ ok = edoc:application(xmerl, [{dir, PrivDir}]),
+ ok.
+build_map_module(Config) when is_list(Config) ->
+ DataDir = ?config(data_dir, Config),
+ PrivDir = ?config(priv_dir, Config),
+ Filename = filename:join(DataDir, "map_module.erl"),
+ ok = edoc:file(Filename, [{dir, PrivDir}]),
ok.
diff --git a/lib/edoc/test/edoc_SUITE_data/map_module.erl b/lib/edoc/test/edoc_SUITE_data/map_module.erl
new file mode 100644
index 0000000000..94ee7e6f26
--- /dev/null
+++ b/lib/edoc/test/edoc_SUITE_data/map_module.erl
@@ -0,0 +1,27 @@
+-module(map_module).
+
+-export([foo1/1,foo2/3]).
+
+%% @type wazzup() = integer()
+%% @type some_type() = map()
+%% @type some_other_type() = {a, #{ list() => term()}}
+
+-type some_type() :: map().
+-type some_other_type() :: {'a', #{ list() => term()} }.
+-type wazzup() :: integer().
+
+-spec foo1(Map :: #{ 'a' => integer(), 'b' => term()}) -> term().
+
+%% @doc Gets value from map.
+
+foo1(#{ a:= 1, b := V}) -> V.
+
+%% @spec foo2(some_type(), Type2 :: some_other_type(), map()) -> Value
+%% @doc Gets value from map.
+
+-spec foo2(
+ Type1 :: some_type(),
+ Type2 :: some_other_type(),
+ Map :: #{ get => 'value', 'value' => binary()}) -> binary().
+
+foo2(Type1, {a,#{ "a" := _}}, #{get := value, value := B}) when is_map(Type1) -> B.
diff --git a/lib/edoc/vsn.mk b/lib/edoc/vsn.mk
index 2fcc97e406..0172aac48b 100644
--- a/lib/edoc/vsn.mk
+++ b/lib/edoc/vsn.mk
@@ -1 +1 @@
-EDOC_VSN = 0.7.12.1
+EDOC_VSN = 0.7.13
diff --git a/lib/eldap/doc/src/eldap.xml b/lib/eldap/doc/src/eldap.xml
index 228d3b34c3..8009a8d6a3 100644
--- a/lib/eldap/doc/src/eldap.xml
+++ b/lib/eldap/doc/src/eldap.xml
@@ -69,12 +69,13 @@ filter() See present/1, substrings/2,
<fsummary>Open a connection to an LDAP server.</fsummary>
<type>
<v>Handle = handle()</v>
- <v>Option = {port, integer()} | {log, function()} | {timeout, integer()} | {ssl, boolean()} | {sslopts, list()}</v>
+ <v>Option = {port, integer()} | {log, function()} | {timeout, integer()} | {ssl, boolean()} | {sslopts, list()} | {tcpopts, list()}</v>
</type>
<desc>
<p>Setup a connection to an LDAP server, the <c>HOST</c>'s are tried in order.</p>
<p>The log function takes three arguments, <c>fun(Level, FormatString, [FormatArg]) end</c>.</p>
<p>Timeout set the maximum time in milliseconds that each server request may take.</p>
+ <p>Currently, the only TCP socket option accepted is <c>inet6</c>. Default is <c>inet</c>.</p>
</desc>
</func>
<func>
diff --git a/lib/eldap/doc/src/notes.xml b/lib/eldap/doc/src/notes.xml
index e7a3e20202..089bb731d4 100644
--- a/lib/eldap/doc/src/notes.xml
+++ b/lib/eldap/doc/src/notes.xml
@@ -30,7 +30,51 @@
</header>
<p>This document describes the changes made to the Eldap application.</p>
- <section><title>Eldap 1.0.2</title>
+ <section><title>Eldap 1.0.3</title>
+
+ <section><title>Fixed Bugs and Malfunctions</title>
+ <list>
+ <item>
+ <p>
+ Application upgrade (appup) files are corrected for the
+ following applications: </p>
+ <p>
+ <c>asn1, common_test, compiler, crypto, debugger,
+ dialyzer, edoc, eldap, erl_docgen, et, eunit, gs, hipe,
+ inets, observer, odbc, os_mon, otp_mibs, parsetools,
+ percept, public_key, reltool, runtime_tools, ssh,
+ syntax_tools, test_server, tools, typer, webtool, wx,
+ xmerl</c></p>
+ <p>
+ A new test utility for testing appup files is added to
+ test_server. This is now used by most applications in
+ OTP.</p>
+ <p>
+ (Thanks to Tobias Schlager)</p>
+ <p>
+ Own Id: OTP-11744</p>
+ </item>
+ <item>
+ <p>
+ Add support for IPv6 connections, By including the
+ [inet6] option in eldap:open/2. Default value is still
+ [inet] (Thanks to Edwin Fine)</p>
+ <p>
+ Own Id: OTP-11753</p>
+ </item>
+ <item>
+ <p>
+ Fixed bug where eldap:search returned binaries instead of
+ strings. (Thanks Simon MacMullen for the report)</p>
+ <p>
+ Own Id: OTP-11768</p>
+ </item>
+ </list>
+ </section>
+
+</section>
+
+<section><title>Eldap 1.0.2</title>
<section><title>Fixed Bugs and Malfunctions</title>
<list>
diff --git a/lib/eldap/src/Makefile b/lib/eldap/src/Makefile
index ebb7967e11..2e1110ec2c 100644
--- a/lib/eldap/src/Makefile
+++ b/lib/eldap/src/Makefile
@@ -88,7 +88,7 @@ $(TARGET_FILES): $(HRL_FILES)
# Special Build Targets
# ----------------------------------------------------
$(ASN1_HRL): ../asn1/$(ASN1_FILES)
- $(asn_verbose)$(ERLC) -o $(EBIN) -bber $(ERL_COMPILE_FLAGS) ../asn1/ELDAPv3.asn1
+ $(asn_verbose)$(ERLC) -o $(EBIN) +legacy_erlang_types -bber $(ERL_COMPILE_FLAGS) ../asn1/ELDAPv3.asn1
# ----------------------------------------------------
# Release Target
diff --git a/lib/eldap/src/eldap.app.src b/lib/eldap/src/eldap.app.src
index 8215328910..03a7d7c562 100644
--- a/lib/eldap/src/eldap.app.src
+++ b/lib/eldap/src/eldap.app.src
@@ -4,5 +4,7 @@
{modules, [eldap, 'ELDAPv3']},
{registered, []},
{applications, [kernel, stdlib]},
- {env, []}
+ {env, []},
+ {runtime_dependencies, ["stdlib-2.0","ssl-5.3.4","kernel-3.0","erts-6.0",
+ "asn1-3.0"]}
]}.
diff --git a/lib/eldap/src/eldap.appup.src b/lib/eldap/src/eldap.appup.src
index 8d33482f11..9d77faf740 100644
--- a/lib/eldap/src/eldap.appup.src
+++ b/lib/eldap/src/eldap.appup.src
@@ -1,6 +1,25 @@
%% -*- erlang -*-
+%% %CopyrightBegin%
+%%
+%% Copyright Ericsson AB 2014. 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%
{"%VSN%",
[
+ {<<".*">>,[{restart_application, eldap}]}
],
[
- ]}.
+ {<<".*">>,[{restart_application, eldap}]}
+ ]
+}.
diff --git a/lib/eldap/src/eldap.erl b/lib/eldap/src/eldap.erl
index af5bf94c97..1cd328cde3 100644
--- a/lib/eldap/src/eldap.erl
+++ b/lib/eldap/src/eldap.erl
@@ -45,9 +45,10 @@
log, % User provided log function
timeout = infinity, % Request timeout
anon_auth = false, % Allow anonymous authentication
- ldaps = false, % LDAP/LDAPS
+ ldaps = false, % LDAP/LDAPS
using_tls = false, % true if LDAPS or START_TLS executed
- tls_opts = [] % ssl:ssloption()
+ tls_opts = [], % ssl:ssloption()
+ tcp_opts = [] % inet6 support
}).
%%% For debug purposes
@@ -372,6 +373,8 @@ parse_args([{sslopts, Opts}|T], Cpid, Data) when is_list(Opts) ->
parse_args(T, Cpid, Data#eldap{ldaps = true, using_tls=true, tls_opts = Opts ++ Data#eldap.tls_opts});
parse_args([{sslopts, _}|T], Cpid, Data) ->
parse_args(T, Cpid, Data);
+parse_args([{tcpopts, Opts}|T], Cpid, Data) when is_list(Opts) ->
+ parse_args(T, Cpid, Data#eldap{tcp_opts = inet6_opt(Opts) ++ Data#eldap.tcp_opts});
parse_args([{log, F}|T], Cpid, Data) when is_function(F) ->
parse_args(T, Cpid, Data#eldap{log = F});
parse_args([{log, _}|T], Cpid, Data) ->
@@ -382,6 +385,14 @@ parse_args([H|_], Cpid, _) ->
parse_args([], _, Data) ->
Data.
+inet6_opt(Opts) ->
+ case proplists:get_value(inet6, Opts) of
+ true ->
+ [inet6];
+ _ ->
+ []
+ end.
+
%%% Try to connect to the hosts in the listed order,
%%% and stop with the first one to which a successful
%%% connection is made.
@@ -401,9 +412,11 @@ try_connect([],_) ->
{error,"connect failed"}.
do_connect(Host, Data, Opts) when Data#eldap.ldaps == false ->
- gen_tcp:connect(Host, Data#eldap.port, Opts, Data#eldap.timeout);
+ gen_tcp:connect(Host, Data#eldap.port, Opts ++ Data#eldap.tcp_opts,
+ Data#eldap.timeout);
do_connect(Host, Data, Opts) when Data#eldap.ldaps == true ->
- ssl:connect(Host, Data#eldap.port, Opts++Data#eldap.tls_opts).
+ ssl:connect(Host, Data#eldap.port,
+ Opts ++ Data#eldap.tls_opts ++ Data#eldap.tcp_opts).
loop(Cpid, Data) ->
receive
@@ -743,7 +756,7 @@ request(S, Data, ID, Request) ->
send_request(S, Data, ID, Request) ->
Message = #'LDAPMessage'{messageID = ID,
protocolOp = Request},
- {ok,Bytes} = asn1rt:encode('ELDAPv3', 'LDAPMessage', Message),
+ {ok,Bytes} = 'ELDAPv3':encode('LDAPMessage', Message),
case do_send(S, Data, Bytes) of
{error,Reason} -> throw({gen_tcp_error,Reason});
Else -> Else
@@ -762,7 +775,7 @@ do_recv(S, #eldap{using_tls=true, timeout=Timeout}, Len) ->
recv_response(S, Data) ->
case do_recv(S, Data, 0) of
{ok, Packet} ->
- case asn1rt:decode('ELDAPv3', 'LDAPMessage', Packet) of
+ case 'ELDAPv3':decode('LDAPMessage', Packet) of
{ok,Resp} -> {ok,Resp};
Error -> throw(Error)
end;
diff --git a/lib/eldap/test/eldap_basic_SUITE.erl b/lib/eldap/test/eldap_basic_SUITE.erl
index bf5fa83c3c..6c3d303da0 100644
--- a/lib/eldap/test/eldap_basic_SUITE.erl
+++ b/lib/eldap/test/eldap_basic_SUITE.erl
@@ -84,6 +84,7 @@ end_per_testcase(_TestCase, Config) ->
all() ->
[app,
+ appup,
api,
ssl_api,
start_tls,
@@ -95,7 +96,11 @@ all() ->
app(doc) -> "Test that the eldap app file is ok";
app(suite) -> [];
app(Config) when is_list(Config) ->
- ok = test_server:app_test(public_key).
+ ok = test_server:app_test(eldap).
+
+%% Test that the eldap appup file is ok
+appup(Config) when is_list(Config) ->
+ ok = test_server:appup_test(eldap).
api(doc) -> "Basic test that all api functions works as expected";
api(suite) -> [];
diff --git a/lib/eldap/test/eldap_misc_SUITE.erl b/lib/eldap/test/eldap_misc_SUITE.erl
new file mode 100644
index 0000000000..ca810ee33c
--- /dev/null
+++ b/lib/eldap/test/eldap_misc_SUITE.erl
@@ -0,0 +1,51 @@
+%%
+%% %CopyrightBegin%
+%%
+%% Copyright Ericsson AB 2012-2014. 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(eldap_misc_SUITE).
+
+-compile(export_all). %% Use this only in test suites...
+
+-include_lib("common_test/include/ct.hrl").
+-include_lib("eldap/include/eldap.hrl").
+-include_lib("eldap/ebin/ELDAPv3.hrl").
+
+all() ->
+ [
+ encode,
+ decode
+ ].
+
+
+encode(_Config) ->
+ {ok,Bin} = 'ELDAPv3':encode('AddRequest', #'AddRequest'{entry="hejHopp" ,attributes=[]} ),
+ Expected = <<104,11,4,7,104,101,106,72,111,112,112,48,0>>,
+ Expected = Bin.
+
+decode(_Config) ->
+ {ok,Res} = 'ELDAPv3':decode('AddRequest', <<104,11,4,7,104,101,106,72,111,112,112,48,0>>),
+ ct:log("Res = ~p", [Res]),
+ Expected = #'AddRequest'{entry = "hejHopp",attributes = []},
+ case Res of
+ Expected -> ok;
+ #'AddRequest'{entry= <<"hejHopp">>, attributes=[]} ->
+ {fail, "decoded to (correct) binary!!"};
+ _ ->
+ {fail, "Bad decode"}
+ end.
+
diff --git a/lib/eldap/vsn.mk b/lib/eldap/vsn.mk
index dd1f50653c..efdc30b476 100644
--- a/lib/eldap/vsn.mk
+++ b/lib/eldap/vsn.mk
@@ -1 +1,2 @@
-ELDAP_VSN = 1.0.2
+ELDAP_VSN = 1.0.3
+
diff --git a/lib/erl_docgen/doc/src/notes.xml b/lib/erl_docgen/doc/src/notes.xml
index 24d12b2bb7..e546eb97fc 100644
--- a/lib/erl_docgen/doc/src/notes.xml
+++ b/lib/erl_docgen/doc/src/notes.xml
@@ -30,7 +30,48 @@
</header>
<p>This document describes the changes made to the <em>erl_docgen</em> application.</p>
- <section><title>Erl_Docgen 0.3.4.1</title>
+ <section><title>Erl_Docgen 0.3.5</title>
+
+ <section><title>Fixed Bugs and Malfunctions</title>
+ <list>
+ <item>
+ <p>
+ Application upgrade (appup) files are corrected for the
+ following applications: </p>
+ <p>
+ <c>asn1, common_test, compiler, crypto, debugger,
+ dialyzer, edoc, eldap, erl_docgen, et, eunit, gs, hipe,
+ inets, observer, odbc, os_mon, otp_mibs, parsetools,
+ percept, public_key, reltool, runtime_tools, ssh,
+ syntax_tools, test_server, tools, typer, webtool, wx,
+ xmerl</c></p>
+ <p>
+ A new test utility for testing appup files is added to
+ test_server. This is now used by most applications in
+ OTP.</p>
+ <p>
+ (Thanks to Tobias Schlager)</p>
+ <p>
+ Own Id: OTP-11744</p>
+ </item>
+ </list>
+ </section>
+
+
+ <section><title>Improvements and New Features</title>
+ <list>
+ <item>
+ <p>
+ Handle map types in docgen_edoc_xml_cb</p>
+ <p>
+ Own Id: OTP-11776</p>
+ </item>
+ </list>
+ </section>
+
+</section>
+
+<section><title>Erl_Docgen 0.3.4.1</title>
<section><title>Improvements and New Features</title>
<list>
diff --git a/lib/erl_docgen/src/docgen_edoc_xml_cb.erl b/lib/erl_docgen/src/docgen_edoc_xml_cb.erl
index e3cc354206..e6bf9ce20e 100644
--- a/lib/erl_docgen/src/docgen_edoc_xml_cb.erl
+++ b/lib/erl_docgen/src/docgen_edoc_xml_cb.erl
@@ -1014,6 +1014,8 @@ t_type([#xmlElement{name = nil}]) ->
t_nil();
t_type([#xmlElement{name = list, content = Es}]) ->
t_list(Es);
+t_type([#xmlElement{name = nonempty_list, content = Es}]) ->
+ t_nonempty_list(Es);
t_type([#xmlElement{name = tuple, content = Es}]) ->
t_tuple(Es);
t_type([#xmlElement{name = 'fun', content = Es}]) ->
@@ -1023,7 +1025,11 @@ t_type([#xmlElement{name = abstype, content = Es}]) ->
t_type([#xmlElement{name = union, content = Es}]) ->
t_union(Es);
t_type([#xmlElement{name = record, content = Es}]) ->
- t_record(Es).
+ t_record(Es);
+t_type([#xmlElement{name = map, content = Es}]) ->
+ t_map(Es);
+t_type([#xmlElement{name = map_field, content = Es}]) ->
+ t_map_field(Es).
t_var(E) ->
[get_attrval(name, E)].
@@ -1046,6 +1052,9 @@ t_nil() ->
t_list(Es) ->
["["] ++ t_utype(get_elem(type, Es)) ++ ["]"].
+t_nonempty_list(Es) ->
+ ["["] ++ t_utype(get_elem(type, Es)) ++ [", ...]"].
+
t_tuple(Es) ->
["{"] ++ seq(fun t_utype_elem/1, Es, ["}"]).
@@ -1058,6 +1067,12 @@ t_record([E|Es]) ->
t_field(#xmlElement{name=field, content=[Atom,Type]}) ->
[get_attrval(value, Atom), "="] ++ t_utype_elem(Type).
+t_map(Es) ->
+ ["#{"] ++ seq(fun t_utype_elem/1, Es, ["}"]).
+
+t_map_field([K,V]) ->
+ [t_utype_elem(K) ++ " => " ++ t_utype_elem(V)].
+
t_abstype(Es) ->
case split_at_colon(t_name(get_elem(erlangName, Es)),[]) of
{Mod,Type} ->
diff --git a/lib/erl_docgen/src/docgen_otp_specs.erl b/lib/erl_docgen/src/docgen_otp_specs.erl
index 3929e66515..886194598f 100644
--- a/lib/erl_docgen/src/docgen_otp_specs.erl
+++ b/lib/erl_docgen/src/docgen_otp_specs.erl
@@ -388,6 +388,8 @@ t_type([#xmlElement{name = nonempty_list, content = Es}]) ->
t_nonempty_list(Es);
t_type([#xmlElement{name = tuple, content = Es}]) ->
t_tuple(Es);
+t_type([#xmlElement{name = map}]) ->
+ t_map();
t_type([#xmlElement{name = 'fun', content = Es}]) ->
["fun("] ++ t_fun(Es) ++ [")"];
t_type([E = #xmlElement{name = record, content = Es}]) ->
@@ -430,6 +432,9 @@ t_nonempty_list(Es) ->
t_tuple(Es) ->
["{"] ++ seq(fun t_utype_elem/1, Es, ["}"]).
+t_map() ->
+ ["map()"].
+
t_fun(Es) ->
["("] ++ seq(fun t_utype_elem/1, get_content(argtypes, Es),
[") -> "] ++ t_utype(get_elem(type, Es))).
diff --git a/lib/erl_docgen/src/erl_docgen.app.src b/lib/erl_docgen/src/erl_docgen.app.src
index daad172106..e2830b2692 100644
--- a/lib/erl_docgen/src/erl_docgen.app.src
+++ b/lib/erl_docgen/src/erl_docgen.app.src
@@ -8,7 +8,7 @@
},
{registered,[]},
{applications, [kernel,stdlib]},
- {env, []
- }
+ {env, []},
+ {runtime_dependencies, ["xmerl-1.3.7","stdlib-2.0","edoc-0.7.13","erts-6.0"]}
]
}.
diff --git a/lib/erl_docgen/src/erl_docgen.appup.src b/lib/erl_docgen/src/erl_docgen.appup.src
index 54a63833e6..972a881c41 100644
--- a/lib/erl_docgen/src/erl_docgen.appup.src
+++ b/lib/erl_docgen/src/erl_docgen.appup.src
@@ -1 +1,21 @@
-{"%VSN%",[],[]}.
+%% -*- erlang -*-
+%% %CopyrightBegin%
+%%
+%% Copyright Ericsson AB 2014. 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%
+{"%VSN%",
+ [{<<".*">>,[{restart_application, erl_docgen}]}],
+ [{<<".*">>,[{restart_application, erl_docgen}]}]
+}.
diff --git a/lib/erl_docgen/test/Makefile b/lib/erl_docgen/test/Makefile
new file mode 100644
index 0000000000..9f4cc04105
--- /dev/null
+++ b/lib/erl_docgen/test/Makefile
@@ -0,0 +1,65 @@
+include $(ERL_TOP)/make/target.mk
+include $(ERL_TOP)/make/$(TARGET)/otp.mk
+
+# ----------------------------------------------------
+# Target Specs
+# ----------------------------------------------------
+
+MODULES= \
+ erl_docgen_SUITE
+
+ERL_FILES= $(MODULES:%=%.erl)
+
+TARGET_FILES= $(MODULES:%=$(EBIN)/%.$(EMULATOR))
+INSTALL_PROGS= $(TARGET_FILES)
+
+EMAKEFILE=Emakefile
+
+# ----------------------------------------------------
+# Release directory specification
+# ----------------------------------------------------
+RELSYSDIR = $(RELEASE_PATH)/erl_docgen_test
+
+# ----------------------------------------------------
+# FLAGS
+# ----------------------------------------------------
+
+ERL_MAKE_FLAGS +=
+ERL_COMPILE_FLAGS += -I$(ERL_TOP)/lib/test_server/include
+
+EBIN = .
+
+# ----------------------------------------------------
+# Targets
+# ----------------------------------------------------
+
+make_emakefile:
+ $(ERL_TOP)/make/make_emakefile $(ERL_COMPILE_FLAGS) -o$(EBIN) $(MODULES) \
+ > $(EMAKEFILE)
+ $(ERL_TOP)/make/make_emakefile $(ERL_COMPILE_FLAGS) -o$(EBIN) '*_SUITE_make' \
+ >> $(EMAKEFILE)
+
+tests debug opt: make_emakefile
+ erl $(ERL_MAKE_FLAGS) -make
+
+clean:
+ rm -f $(EMAKEFILE)
+ rm -f $(TARGET_FILES) $(GEN_FILES)
+ rm -f core
+
+docs:
+
+# ----------------------------------------------------
+# Release Target
+# ----------------------------------------------------
+include $(ERL_TOP)/make/otp_release_targets.mk
+
+release_spec: opt
+
+release_tests_spec: make_emakefile
+ $(INSTALL_DIR) "$(RELSYSDIR)"
+ $(INSTALL_DATA) $(EMAKEFILE) $(ERL_FILES) "$(RELSYSDIR)"
+ $(INSTALL_DATA) erl_docgen.spec "$(RELSYSDIR)"
+ chmod -R u+w "$(RELSYSDIR)"
+
+release_docs_spec:
diff --git a/lib/erl_docgen/test/erl_docgen.spec b/lib/erl_docgen/test/erl_docgen.spec
new file mode 100644
index 0000000000..98833614df
--- /dev/null
+++ b/lib/erl_docgen/test/erl_docgen.spec
@@ -0,0 +1 @@
+{suites,"../erl_docgen_test",all}.
diff --git a/lib/erl_docgen/test/erl_docgen_SUITE.erl b/lib/erl_docgen/test/erl_docgen_SUITE.erl
new file mode 100644
index 0000000000..20fbc1229b
--- /dev/null
+++ b/lib/erl_docgen/test/erl_docgen_SUITE.erl
@@ -0,0 +1,50 @@
+%% ``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 via the world wide web 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.
+%%
+%% The Initial Developer of the Original Code is Ericsson Utvecklings AB.
+%% Portions created by Ericsson are Copyright 1999, Ericsson Utvecklings
+%% AB. All Rights Reserved.''
+%%
+-module(erl_docgen_SUITE).
+
+-compile([export_all]).
+-include_lib("common_test/include/ct.hrl").
+
+suite() ->
+ [{ct_hooks, [ts_install_cth]}].
+
+all() ->
+ [app, appup].
+
+groups() ->
+ [].
+
+init_per_suite(Config) ->
+ Config.
+
+end_per_suite(_Config) ->
+ ok.
+
+init_per_group(_GroupName, Config) ->
+ Config.
+
+end_per_group(_GroupName, Config) ->
+ Config.
+
+app() ->
+ [{doc, "Test that the erl_docgen app file is ok"}].
+app(Config) when is_list(Config) ->
+ ok = ?t:app_test(erl_docgen).
+
+appup() ->
+ [{doc, "Test that the erl_docgen appup file is ok"}].
+appup(Config) when is_list(Config) ->
+ ok = ?t:appup_test(erl_docgen).
diff --git a/lib/erl_docgen/vsn.mk b/lib/erl_docgen/vsn.mk
index cda8671cfd..0f89922275 100644
--- a/lib/erl_docgen/vsn.mk
+++ b/lib/erl_docgen/vsn.mk
@@ -1 +1 @@
-ERL_DOCGEN_VSN = 0.3.4.1
+ERL_DOCGEN_VSN = 0.3.5
diff --git a/lib/erl_interface/aclocal.m4 b/lib/erl_interface/aclocal.m4
index 46b30a16b3..ed492d55ff 100644
--- a/lib/erl_interface/aclocal.m4
+++ b/lib/erl_interface/aclocal.m4
@@ -74,6 +74,21 @@ AC_ARG_VAR(erl_xcomp_clock_gettime_cpu_time, [clock_gettime() can be used for re
AC_ARG_VAR(erl_xcomp_after_morecore_hook, [__after_morecore_hook can track malloc()s core memory usage: yes|no (only used when cross compiling)])
AC_ARG_VAR(erl_xcomp_dlsym_brk_wrappers, [dlsym(RTLD_NEXT, _) brk wrappers can track malloc()s core memory usage: yes|no (only used when cross compiling)])
+dnl Cross compilation variables for OSE
+AC_ARG_VAR(erl_xcomp_ose_ldflags_pass1, [Linker flags for the OSE module (pass 1) (only used when cross compiling for OSE)])
+AC_ARG_VAR(erl_xcomp_ose_ldflags_pass2, [Linker flags for the OSE module (pass 2) (only used when cross compiling for OSE)])
+AC_ARG_VAR(erl_xcomp_ose_OSEROOT, [OSE installation root directory (only used when cross compiling for OSE)])
+AC_ARG_VAR(erl_xcomp_ose_STRIP, [Strip utility shipped with the OSE distribution(only used when cross compiling for OSE)])
+AC_ARG_VAR(erl_xcomp_ose_LM_POST_LINK, [OSE postlink tool (only used when cross compiling for OSE)])
+AC_ARG_VAR(erl_xcomp_ose_LM_SET_CONF, [Sets the configuration for an OSE load module (only used when cross compiling for OSE)])
+AC_ARG_VAR(erl_xcomp_ose_LM_ELF_SIZE, [Prints the section size information for an OSE load module (only used when cross compiling for OSE)])
+AC_ARG_VAR(erl_xcomp_ose_LM_LCF, [OSE load module linker configuration file (only used when cross compiling for OSE)])
+AC_ARG_VAR(erl_xcomp_ose_BEAM_LM_CONF, [BEAM OSE load module default configuration file (only used when cross compiling for OSE)])
+AC_ARG_VAR(erl_xcomp_ose_EPMD_LM_CONF, [EPMD OSE load module default configuration file (only used when cross compiling for OSE)])
+AC_ARG_VAR(erl_xcomp_ose_RUN_ERL_LM_CONF, [run_erl_lm OSE load module default configuration file (only used when cross compiling for OSE)])
+AC_ARG_VAR(erl_xcomp_ose_CONFD, [OSE confd source file])
+AC_ARG_VAR(erl_xcomp_ose_CRT0_LM, [OSE crt0 lm source file])
+
])
AC_DEFUN(ERL_XCOMP_SYSROOT_INIT,
@@ -488,6 +503,8 @@ AC_CACHE_VAL(ac_cv_sys_ipv6_support,
#ifdef __WIN32__
#include <winsock2.h>
#include <ws2tcpip.h>
+#elif __OSE__
+#error "no ipv6"
#else
#include <netinet/in.h>
#endif],
@@ -500,6 +517,8 @@ else
#ifdef __WIN32__
#include <winsock2.h>
#include <ws2tcpip.h>
+#elif __OSE__
+#error "no ipv6"
#else
#include <netinet/in.h>
#endif],
@@ -728,6 +747,12 @@ if test "X$host_os" = "Xwin32"; then
THR_LIBS=
THR_LIB_NAME=win32_threads
THR_LIB_TYPE=win32_threads
+elif test "X$host_os" = "Xose"; then
+ AC_MSG_RESULT(yes)
+ THR_DEFS="-DOSE_THREADS"
+ THR_LIBS=
+ THR_LIB_NAME=ose_threads
+ THR_LIB_TYPE=ose_threads
else
AC_MSG_RESULT(no)
THR_DEFS=
@@ -1078,9 +1103,22 @@ case "$THR_LIB_NAME" in
test "$ethr_have_native_atomics" = "yes" && ethr_have_native_spinlock=yes
;;
- pthread)
- ETHR_THR_LIB_BASE_DIR=pthread
- AC_DEFINE(ETHR_PTHREADS, 1, [Define if you have pthreads])
+ pthread|ose_threads)
+ case "$THR_LIB_NAME" in
+ pthread)
+ ETHR_THR_LIB_BASE_DIR=pthread
+ AC_DEFINE(ETHR_PTHREADS, 1, [Define if you have pthreads])
+ ;;
+ ose_threads)
+ AC_DEFINE(ETHR_OSE_THREADS, 1,
+ [Define if you have OSE style threads])
+ ETHR_THR_LIB_BASE_DIR=ose
+ AC_CHECK_HEADER(ose_spi/ose_spi.h,
+ AC_DEFINE(HAVE_OSE_SPI_H, 1,
+ [Define if you have the "ose_spi/ose_spi.h" header file.]))
+ ;;
+ esac
+ if test "x$THR_LIB_NAME" = "xpthread"; then
case $host_os in
openbsd*)
# The default stack size is insufficient for our needs
@@ -1139,6 +1177,7 @@ case "$THR_LIB_NAME" in
*) ;;
esac
+ fi
dnl We sometimes need ETHR_DEFS in order to find certain headers
dnl (at least for pthread.h on osf1).
saved_cppflags="$CPPFLAGS"
@@ -1151,7 +1190,6 @@ case "$THR_LIB_NAME" in
dnl
dnl Check for headers
dnl
-
AC_CHECK_HEADER(pthread.h, \
AC_DEFINE(ETHR_HAVE_PTHREAD_H, 1, \
[Define if you have the <pthread.h> header file.]))
@@ -1184,7 +1222,7 @@ case "$THR_LIB_NAME" in
dnl
dnl Check for functions
dnl
-
+ if test "x$THR_LIB_NAME" = "xpthread"; then
AC_CHECK_FUNC(pthread_spin_lock, \
[ethr_have_native_spinlock=yes \
AC_DEFINE(ETHR_HAVE_PTHREAD_SPIN_LOCK, 1, \
@@ -1311,6 +1349,8 @@ case "$THR_LIB_NAME" in
AC_MSG_RESULT([$linux_futex])
test $linux_futex = yes && AC_DEFINE(ETHR_HAVE_LINUX_FUTEX, 1, [Define if you have a linux futex implementation.])
+ fi
+
AC_CHECK_SIZEOF(int)
AC_CHECK_SIZEOF(long)
AC_CHECK_SIZEOF(long long)
diff --git a/lib/erl_interface/doc/src/ei.xml b/lib/erl_interface/doc/src/ei.xml
index ab185c9179..90495eebd6 100644
--- a/lib/erl_interface/doc/src/ei.xml
+++ b/lib/erl_interface/doc/src/ei.xml
@@ -4,7 +4,7 @@
<cref>
<header>
<copyright>
- <year>2001</year><year>2013</year>
+ <year>2001</year><year>2014</year>
<holder>Ericsson AB. All Rights Reserved.</holder>
</copyright>
<legalnotice>
@@ -417,6 +417,26 @@ ei_x_encode_empty_list(&amp;x);
</desc>
</func>
<func>
+ <name><ret>int</ret><nametext>ei_encode_map_header(char *buf, int *index, int arity)</nametext></name>
+ <name><ret>int</ret><nametext>ei_x_encode_map_header(ei_x_buff* x, int arity)</nametext></name>
+ <fsummary>Encode a map</fsummary>
+ <desc>
+ <p>This function encodes a map header, with a specified arity. The next
+ <c>arity*2</c> terms encoded will be the keys and values of the map
+ encoded in the following order: <c>K1, V1, K2, V2, ..., Kn, Vn</c>.
+ </p>
+ <p>E.g. to encode the map <c>#{a => "Apple", b => "Banana"}</c>:</p>
+ <pre>
+ei_x_encode_map_header(&amp;x, 2);
+ei_x_encode_atom(&amp;x, "a");
+ei_x_encode_string(&amp;x, "Apple");
+ei_x_encode_atom(&amp;x, "b");
+ei_x_encode_string(&amp;x, "Banana");
+ </pre>
+ <p>A correctly encoded map can not have duplicate keys.</p>
+ </desc>
+ </func>
+ <func>
<name><ret>int</ret><nametext>ei_get_type(const char *buf, const int *index, int *type, int *size)</nametext></name>
<fsummary>Fetch the type and size of an encoded term</fsummary>
<desc>
@@ -638,6 +658,18 @@ ei_x_encode_empty_list(&amp;x);
</desc>
</func>
<func>
+ <name><ret>int</ret><nametext>ei_decode_map_header(const char *buf, int *index, int *arity)</nametext></name>
+ <fsummary>Decode a map</fsummary>
+ <desc>
+ <p>This function decodes a map header from the binary
+ format. The number of key-value pairs is returned in
+ <c>*arity</c>. Keys and values follow in the following order:
+ <c>K1, V1, K2, V2, ..., Kn, Vn</c>. This makes a total of
+ <c>arity*2</c> terms. If <c>arity</c> is zero, it's an empty map.
+ A correctly encoded map does not have duplicate keys.</p>
+ </desc>
+ </func>
+ <func>
<name><ret>int</ret><nametext>ei_decode_ei_term(const char* buf, int* index, ei_term* term)</nametext></name>
<fsummary>Decode a term, without prior knowledge of type</fsummary>
<desc>
diff --git a/lib/erl_interface/doc/src/notes.xml b/lib/erl_interface/doc/src/notes.xml
index 4eb61015cc..ab6f4179d6 100644
--- a/lib/erl_interface/doc/src/notes.xml
+++ b/lib/erl_interface/doc/src/notes.xml
@@ -30,6 +30,22 @@
</header>
<p>This document describes the changes made to the Erl_interface application.</p>
+<section><title>Erl_Interface 3.7.16</title>
+
+ <section><title>Fixed Bugs and Malfunctions</title>
+ <list>
+ <item>
+ <p>
+ Fix memcheck warning in gen_challange (Thanks to Olivier
+ Girondel)</p>
+ <p>
+ Own Id: OTP-11608</p>
+ </item>
+ </list>
+ </section>
+
+</section>
+
<section><title>Erl_Interface 3.7.15</title>
<section><title>Fixed Bugs and Malfunctions</title>
diff --git a/lib/erl_interface/include/ei.h b/lib/erl_interface/include/ei.h
index 9b83385a46..3f3435977d 100644
--- a/lib/erl_interface/include/ei.h
+++ b/lib/erl_interface/include/ei.h
@@ -1,7 +1,7 @@
/*
* %CopyrightBegin%
*
- * Copyright Ericsson AB 1998-2013. All Rights Reserved.
+ * Copyright Ericsson AB 1998-2014. 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
@@ -39,7 +39,7 @@
#include <stdio.h> /* Need type FILE */
#include <errno.h> /* Need EHOSTUNREACH, ENOMEM, ... */
-#if !defined(__WIN32__) && !defined(VXWORKS) || (defined(VXWORKS) && defined(HAVE_SENS))
+#if !(defined(__WIN32__) || defined(_WIN32)) && !defined(VXWORKS) || (defined(VXWORKS) && defined(HAVE_SENS))
# include <netdb.h>
#endif
@@ -131,6 +131,7 @@
#define ERL_SMALL_BIG_EXT 'n'
#define ERL_LARGE_BIG_EXT 'o'
#define ERL_NEW_FUN_EXT 'p'
+#define ERL_MAP_EXT 't'
#define ERL_FUN_EXT 'u'
#define ERL_NEW_CACHE 'N' /* c nodes don't know these two */
@@ -467,6 +468,8 @@ int ei_encode_list_header(char *buf, int *index, int arity);
int ei_x_encode_list_header(ei_x_buff* x, long n);
#define ei_encode_empty_list(buf,i) ei_encode_list_header(buf,i,0)
int ei_x_encode_empty_list(ei_x_buff* x);
+int ei_encode_map_header(char *buf, int *index, int arity);
+int ei_x_encode_map_header(ei_x_buff* x, long n);
/*
* ei_get_type() returns the type and "size" of the item at
@@ -507,6 +510,7 @@ int ei_decode_term(const char *buf, int *index, void *t); /* ETERM** actually */
int ei_decode_trace(const char *buf, int *index, erlang_trace *p);
int ei_decode_tuple_header(const char *buf, int *index, int *arity);
int ei_decode_list_header(const char *buf, int *index, int *arity);
+int ei_decode_map_header(const char *buf, int *index, int *arity);
/*
* ei_decode_ei_term() returns 1 if term is decoded, 0 if term is OK,
diff --git a/lib/erl_interface/src/connect/ei_connect.c b/lib/erl_interface/src/connect/ei_connect.c
index 8f1f231b82..2e8418d61e 100644
--- a/lib/erl_interface/src/connect/ei_connect.c
+++ b/lib/erl_interface/src/connect/ei_connect.c
@@ -1,7 +1,7 @@
/*
* %CopyrightBegin%
*
- * Copyright Ericsson AB 2000-2013. All Rights Reserved.
+ * Copyright Ericsson AB 2000-2014. 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
@@ -1161,11 +1161,16 @@ static unsigned int gen_challenge(void)
struct utsname name;
} s;
+ memset(&s, 0, sizeof(s));
gettimeofday(&s.tv, 0);
uname(&s.name);
s.cpu = clock();
s.pid = getpid();
+#ifndef __ANDROID__
s.hid = gethostid();
+#else
+ s.hid = 0;
+#endif
s.uid = getuid();
s.gid = getgid();
@@ -1335,7 +1340,8 @@ static int send_name_or_challenge(int fd, char *nodename,
| DFLAG_NEW_FUN_TAGS
| DFLAG_NEW_FLOATS
| DFLAG_SMALL_ATOM_TAGS
- | DFLAG_UTF8_ATOMS));
+ | DFLAG_UTF8_ATOMS
+ | DFLAG_MAP_TAG));
if (f_chall)
put32be(s, challenge);
memcpy(s, nodename, strlen(nodename));
diff --git a/lib/erl_interface/src/connect/ei_connect_int.h b/lib/erl_interface/src/connect/ei_connect_int.h
index 42ab9b58d7..8fab47a787 100644
--- a/lib/erl_interface/src/connect/ei_connect_int.h
+++ b/lib/erl_interface/src/connect/ei_connect_int.h
@@ -1,7 +1,7 @@
/*
* %CopyrightBegin%
*
- * Copyright Ericsson AB 2001-2013. All Rights Reserved.
+ * Copyright Ericsson AB 2001-2014. 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
@@ -104,6 +104,7 @@ extern int h_errno;
#define DFLAG_NEW_FLOATS 0x800
#define DFLAG_SMALL_ATOM_TAGS 0x4000
#define DFLAG_UTF8_ATOMS 0x10000
+#define DFLAG_MAP_TAG 0x20000
ei_cnode *ei_fd_to_cnode(int fd);
int ei_distversion(int fd);
diff --git a/lib/erl_interface/src/connect/ei_resolve.c b/lib/erl_interface/src/connect/ei_resolve.c
index 74dcba61a7..cffcac801c 100644
--- a/lib/erl_interface/src/connect/ei_resolve.c
+++ b/lib/erl_interface/src/connect/ei_resolve.c
@@ -642,7 +642,7 @@ struct hostent *ei_gethostbyname_r(const char *name,
#ifndef HAVE_GETHOSTBYNAME_R
return my_gethostbyname_r(name,hostp,buffer,buflen,h_errnop);
#else
-#if (defined(__GLIBC__) || (__FreeBSD_version >= 602000) || defined(__DragonFly__))
+#if (defined(__GLIBC__) || (__FreeBSD_version >= 602000) || defined(__DragonFly__) || defined(__ANDROID__))
struct hostent *result;
gethostbyname_r(name, hostp, buffer, buflen, &result, h_errnop);
diff --git a/lib/erl_interface/src/decode/decode_skip.c b/lib/erl_interface/src/decode/decode_skip.c
index 553266471c..2260394da1 100644
--- a/lib/erl_interface/src/decode/decode_skip.c
+++ b/lib/erl_interface/src/decode/decode_skip.c
@@ -1,7 +1,7 @@
/*
* %CopyrightBegin%
*
- * Copyright Ericsson AB 2002-2013. All Rights Reserved.
+ * Copyright Ericsson AB 2002-2014. 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
@@ -61,7 +61,13 @@ int ei_skip_term(const char* buf, int* index)
break;
case ERL_SMALL_TUPLE_EXT:
case ERL_LARGE_TUPLE_EXT:
- if (ei_decode_tuple_header(buf, index, &n) < 0) return -1;
+ if (ei_decode_tuple_header(buf, index, &n) < 0) return -1;
+ for (i = 0; i < n; ++i)
+ ei_skip_term(buf, index);
+ break;
+ case ERL_MAP_EXT:
+ if (ei_decode_map_header(buf, index, &n) < 0) return -1;
+ n *= 2;
for (i = 0; i < n; ++i)
ei_skip_term(buf, index);
break;
diff --git a/lib/erl_interface/src/decode/decode_tuple_header.c b/lib/erl_interface/src/decode/decode_tuple_header.c
index c0ba14ea47..698be1b97a 100644
--- a/lib/erl_interface/src/decode/decode_tuple_header.c
+++ b/lib/erl_interface/src/decode/decode_tuple_header.c
@@ -1,7 +1,7 @@
/*
* %CopyrightBegin%
*
- * Copyright Ericsson AB 1998-2009. All Rights Reserved.
+ * Copyright Ericsson AB 1998-2014. 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
@@ -45,3 +45,24 @@ int ei_decode_tuple_header(const char *buf, int *index, int *arity)
return 0;
}
+
+int ei_decode_map_header(const char *buf, int *index, int *arity)
+{
+ const char *s = buf + *index;
+ const char *s0 = s;
+ int i;
+
+ switch ((i=get8(s))) {
+ case ERL_MAP_EXT:
+ if (arity) *arity = get32be(s);
+ else s += 4;
+ break;
+
+ default:
+ return -1;
+ }
+
+ *index += s-s0;
+
+ return 0;
+}
diff --git a/lib/erl_interface/src/encode/encode_tuple_header.c b/lib/erl_interface/src/encode/encode_tuple_header.c
index 97a3d1f808..5b11e60447 100644
--- a/lib/erl_interface/src/encode/encode_tuple_header.c
+++ b/lib/erl_interface/src/encode/encode_tuple_header.c
@@ -1,7 +1,7 @@
/*
* %CopyrightBegin%
*
- * Copyright Ericsson AB 1998-2009. All Rights Reserved.
+ * Copyright Ericsson AB 1998-2014. 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
@@ -47,3 +47,20 @@ int ei_encode_tuple_header(char *buf, int *index, int arity)
return 0;
}
+int ei_encode_map_header(char *buf, int *index, int arity)
+{
+ char *s = buf + *index;
+ char *s0 = s;
+
+ if (arity < 0) return -1;
+
+ if (!buf) s += 5;
+ else {
+ put8(s,ERL_MAP_EXT);
+ put32be(s,arity);
+ }
+
+ *index += s-s0;
+
+ return 0;
+}
diff --git a/lib/erl_interface/src/misc/ei_decode_term.c b/lib/erl_interface/src/misc/ei_decode_term.c
index ce5ae5b19d..2e7317f781 100644
--- a/lib/erl_interface/src/misc/ei_decode_term.c
+++ b/lib/erl_interface/src/misc/ei_decode_term.c
@@ -1,7 +1,7 @@
/*
* %CopyrightBegin%
*
- * Copyright Ericsson AB 2001-2013. All Rights Reserved.
+ * Copyright Ericsson AB 2001-2014. 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
@@ -100,6 +100,7 @@ int ei_decode_ei_term(const char* buf, int* index, ei_term* term)
term->size = get16be(s);
return 0;
case ERL_LIST_EXT:
+ case ERL_MAP_EXT:
term->arity = get32be(s);
break;
case ERL_BINARY_EXT:
diff --git a/lib/erl_interface/src/misc/ei_x_encode.c b/lib/erl_interface/src/misc/ei_x_encode.c
index 14d0b56b8f..10542c88a5 100644
--- a/lib/erl_interface/src/misc/ei_x_encode.c
+++ b/lib/erl_interface/src/misc/ei_x_encode.c
@@ -1,7 +1,7 @@
/*
* %CopyrightBegin%
*
- * Copyright Ericsson AB 2001-2013. All Rights Reserved.
+ * Copyright Ericsson AB 2001-2014. 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
@@ -206,6 +206,16 @@ int ei_x_encode_tuple_header(ei_x_buff* x, long n)
return ei_encode_tuple_header(x->buff, &x->index, n);
}
+int ei_x_encode_map_header(ei_x_buff* x, long n)
+{
+ int i = x->index;
+ if (ei_encode_map_header(NULL, &i, n) == -1)
+ return -1;
+ if (!x_fix_buff(x, i))
+ return -1;
+ return ei_encode_map_header(x->buff, &x->index, n);
+}
+
int ei_x_encode_atom(ei_x_buff* x, const char* s)
{
return ei_x_encode_atom_len_as(x, s, strlen(s), ERLANG_LATIN1, ERLANG_LATIN1);
diff --git a/lib/erl_interface/test/all_SUITE_data/ei_runner.c b/lib/erl_interface/test/all_SUITE_data/ei_runner.c
index cdf32b48c4..196a77dce5 100644
--- a/lib/erl_interface/test/all_SUITE_data/ei_runner.c
+++ b/lib/erl_interface/test/all_SUITE_data/ei_runner.c
@@ -1,7 +1,7 @@
/*
* %CopyrightBegin%
*
- * Copyright Ericsson AB 2001-2009. All Rights Reserved.
+ * Copyright Ericsson AB 2001-2014. 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
@@ -182,6 +182,10 @@ char *read_packet(int *len)
return io_buf;
}
+void free_packet(char* packet)
+{
+ free(packet);
+}
/***********************************************************************
* S e n d i n g r e p l i e s
diff --git a/lib/erl_interface/test/all_SUITE_data/ei_runner.h b/lib/erl_interface/test/all_SUITE_data/ei_runner.h
index 96d6a1cbf7..a037341d57 100644
--- a/lib/erl_interface/test/all_SUITE_data/ei_runner.h
+++ b/lib/erl_interface/test/all_SUITE_data/ei_runner.h
@@ -1,7 +1,7 @@
/*
* %CopyrightBegin%
*
- * Copyright Ericsson AB 2001-2009. All Rights Reserved.
+ * Copyright Ericsson AB 2001-2014. 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
@@ -44,6 +44,7 @@ void run_tests(char* argv0, TestCase cases[], unsigned number);
int get_bin_term(ei_x_buff* x, ei_term* term);
char *read_packet(int *len);
+void free_packet(char*);
/*
* Sending replies.
diff --git a/lib/erl_interface/test/ei_decode_SUITE_data/ei_decode_test.c b/lib/erl_interface/test/ei_decode_SUITE_data/ei_decode_test.c
index a676e59470..3f6cbbe186 100644
--- a/lib/erl_interface/test/ei_decode_SUITE_data/ei_decode_test.c
+++ b/lib/erl_interface/test/ei_decode_SUITE_data/ei_decode_test.c
@@ -603,9 +603,9 @@ TESTCASE(test_ei_decode_misc)
/*
EI_DECODE_0(decode_version);
*/
- EI_DECODE_2(decode_double, 32, double, 0.0);
- EI_DECODE_2(decode_double, 32, double, -1.0);
- EI_DECODE_2(decode_double, 32, double, 1.0);
+ EI_DECODE_2(decode_double, 9, double, 0.0);
+ EI_DECODE_2(decode_double, 9, double, -1.0);
+ EI_DECODE_2(decode_double, 9, double, 1.0);
EI_DECODE_2(decode_boolean, 8, int, 0);
EI_DECODE_2(decode_boolean, 7, int, 1);
diff --git a/lib/erl_interface/test/ei_decode_encode_SUITE.erl b/lib/erl_interface/test/ei_decode_encode_SUITE.erl
index c7830f58f2..7caec6ac04 100644
--- a/lib/erl_interface/test/ei_decode_encode_SUITE.erl
+++ b/lib/erl_interface/test/ei_decode_encode_SUITE.erl
@@ -1,7 +1,7 @@
%%
%% %CopyrightBegin%
%%
-%% Copyright Ericsson AB 2004-2013. All Rights Reserved.
+%% Copyright Ericsson AB 2004-2014. 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
@@ -127,6 +127,15 @@ test_ei_decode_encode(Config) when is_list(Config) ->
send_rec(P, mk_ref({Atom,1}, [262143, 8723648, 24097245])),
void
end || Atom <- unicode_atom_data()],
+
+ send_rec(P, {}),
+ send_rec(P, {atom, Pid, Port, Ref}),
+ send_rec(P, [atom, Pid, Port, Ref]),
+ send_rec(P, [atom | Fun]),
+ send_rec(P, #{}),
+ send_rec(P, #{key => value}),
+ send_rec(P, maps:put(Port, Ref, #{key => value, key2 => Pid})),
+
?line runner:recv_eot(P),
ok.
diff --git a/lib/erl_interface/test/ei_decode_encode_SUITE_data/ei_decode_encode_test.c b/lib/erl_interface/test/ei_decode_encode_SUITE_data/ei_decode_encode_test.c
index 317e5edecd..fcf546105b 100644
--- a/lib/erl_interface/test/ei_decode_encode_SUITE_data/ei_decode_encode_test.c
+++ b/lib/erl_interface/test/ei_decode_encode_SUITE_data/ei_decode_encode_test.c
@@ -1,7 +1,7 @@
/*
* %CopyrightBegin%
*
- * Copyright Ericsson AB 2004-2013. All Rights Reserved.
+ * Copyright Ericsson AB 2004-2014. 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
@@ -32,9 +32,33 @@
/*#define MESSAGE(FMT,A1,A2) message(FMT,A1,A2)*/
#define MESSAGE(FMT,A1,A2)
-typedef int decodeFT(const char *buf, int *index, void*);
-typedef int encodeFT(char *buf, int *index, void*);
-typedef int x_encodeFT(ei_x_buff*, void*);
+
+typedef struct
+{
+ char name[MAXATOMLEN_UTF8];
+ erlang_char_encoding enc;
+}my_atom;
+
+struct my_obj {
+ union {
+ erlang_fun fun;
+ erlang_pid pid;
+ erlang_port port;
+ erlang_ref ref;
+ erlang_trace trace;
+ erlang_big big;
+ my_atom atom;
+
+ int arity;
+ }u;
+
+ int nterms; /* 0 for non-containers */
+ char* startp; /* container start position in decode buffer */
+};
+
+typedef int decodeFT(const char *buf, int *index, struct my_obj*);
+typedef int encodeFT(char *buf, int *index, struct my_obj*);
+typedef int x_encodeFT(ei_x_buff*, struct my_obj*);
struct Type {
char* name;
@@ -44,11 +68,36 @@ struct Type {
x_encodeFT* ei_x_encode_fp;
};
-typedef struct
-{
- char name[MAXATOMLEN_UTF8];
- erlang_char_encoding enc;
-}my_atom;
+
+struct Type fun_type = {
+ "fun", "erlang_fun", (decodeFT*)ei_decode_fun,
+ (encodeFT*)ei_encode_fun, (x_encodeFT*)ei_x_encode_fun
+};
+
+struct Type pid_type = {
+ "pid", "erlang_pid", (decodeFT*)ei_decode_pid,
+ (encodeFT*)ei_encode_pid, (x_encodeFT*)ei_x_encode_pid
+};
+
+struct Type port_type = {
+ "port", "erlang_port", (decodeFT*)ei_decode_port,
+ (encodeFT*)ei_encode_port, (x_encodeFT*)ei_x_encode_port
+};
+
+struct Type ref_type = {
+ "ref", "erlang_ref", (decodeFT*)ei_decode_ref,
+ (encodeFT*)ei_encode_ref, (x_encodeFT*)ei_x_encode_ref
+};
+
+struct Type trace_type = {
+ "trace", "erlang_trace", (decodeFT*)ei_decode_trace,
+ (encodeFT*)ei_encode_trace, (x_encodeFT*)ei_x_encode_trace
+};
+
+struct Type big_type = {
+ "big", "erlang_big", (decodeFT*)ei_decode_big,
+ (encodeFT*)ei_encode_big, (x_encodeFT*)ei_x_encode_big
+};
int ei_decode_my_atom(const char *buf, int *index, my_atom* a)
{
@@ -64,130 +113,274 @@ int ei_x_encode_my_atom(ei_x_buff* x, my_atom* a)
return ei_x_encode_atom_as(x, a->name, ERLANG_UTF8, a->enc);
}
+struct Type my_atom_type = {
+ "atom", "my_atom", (decodeFT*)ei_decode_my_atom,
+ (encodeFT*)ei_encode_my_atom, (x_encodeFT*)ei_x_encode_my_atom
+};
+
+
+int my_decode_tuple_header(const char *buf, int *index, struct my_obj* obj)
+{
+ int ret = ei_decode_tuple_header(buf, index, &obj->u.arity);
+ if (ret == 0 && obj)
+ obj->nterms = obj->u.arity;
+ return ret;
+}
+
+int my_encode_tuple_header(char *buf, int *index, struct my_obj* obj)
+{
+ return ei_encode_tuple_header(buf, index, obj->u.arity);
+}
+int my_x_encode_tuple_header(ei_x_buff* x, struct my_obj* obj)
+{
+ return ei_x_encode_tuple_header(x, (long)obj->u.arity);
+}
+
+struct Type tuple_type = {
+ "tuple_header", "arity", my_decode_tuple_header,
+ my_encode_tuple_header, my_x_encode_tuple_header
+};
+
+
+int my_decode_list_header(const char *buf, int *index, struct my_obj* obj)
+{
+ int ret = ei_decode_list_header(buf, index, &obj->u.arity);
+ if (ret == 0 && obj) {
+ obj->nterms = obj->u.arity + 1;
+ }
+ return ret;
+}
+int my_encode_list_header(char *buf, int *index, struct my_obj* obj)
+{
+ return ei_encode_list_header(buf, index, obj->u.arity);
+}
+int my_x_encode_list_header(ei_x_buff* x, struct my_obj* obj)
+{
+ return ei_x_encode_list_header(x, (long)obj->u.arity);
+}
+
+struct Type list_type = {
+ "list_header", "arity", my_decode_list_header,
+ my_encode_list_header, my_x_encode_list_header
+};
+
+
+int my_decode_nil(const char *buf, int *index, struct my_obj* dummy)
+{
+ int type, size, ret;
+ ret = ei_get_type(buf, index, &type, &size);
+ (*index)++;
+ return ret ? ret : !(type == ERL_NIL_EXT);
+
+}
+int my_encode_nil(char *buf, int *index, struct my_obj* dummy)
+{
+ return ei_encode_empty_list(buf, index);
+}
+
+int my_x_encode_nil(ei_x_buff* x, struct my_obj* dummy)
+{
+ return ei_x_encode_empty_list(x);
+}
+
+struct Type nil_type = {
+ "empty_list", "nil", my_decode_nil,
+ my_encode_nil, my_x_encode_nil
+};
+
+int my_decode_map_header(const char *buf, int *index, struct my_obj* obj)
+{
+ int ret = ei_decode_map_header(buf, index, &obj->u.arity);
+ if (ret == 0 && obj)
+ obj->nterms = obj->u.arity * 2;
+ return ret;
+}
+int my_encode_map_header(char *buf, int *index, struct my_obj* obj)
+{
+ return ei_encode_map_header(buf, index, obj->u.arity);
+}
+int my_x_encode_map_header(ei_x_buff* x, struct my_obj* obj)
+{
+ return ei_x_encode_map_header(x, (long)obj->u.arity);
+}
+
+struct Type map_type = {
+ "map_header", "arity", my_decode_map_header,
+ my_encode_map_header, my_x_encode_map_header
+};
+
+
#define BUFSZ 2000
-void decode_encode(struct Type* t, void* obj)
+void decode_encode(struct Type** tv, int nobj)
{
- char *buf;
- char buf2[BUFSZ];
- int size1 = 0;
- int size2 = 0;
- int size3 = 0;
- int err;
+ struct my_obj objv[10];
+ int oix = 0;
+ char* packet;
+ char* inp;
+ char* outp;
+ char out_buf[BUFSZ];
+ int size1, size2, size3;
+ int err, i;
ei_x_buff arg;
- MESSAGE("ei_decode_%s, arg is type %s", t->name, t->type);
- buf = read_packet(NULL);
- err = t->ei_decode_fp(buf+1, &size1, NULL);
- if (err != 0) {
- if (err != -1) {
- fail("decode returned non zero but not -1");
- } else {
- fail("decode returned non zero");
+ packet = read_packet(NULL);
+ inp = packet+1;
+ outp = out_buf;
+ ei_x_new(&arg);
+ for (i=0; i<nobj; i++) {
+ struct Type* t = tv[i];
+
+ MESSAGE("ei_decode_%s, arg is type %s", t->name, t->type);
+
+ size1 = 0;
+ err = t->ei_decode_fp(inp, &size1, NULL);
+ if (err != 0) {
+ if (err != -1) {
+ fail("decode returned non zero but not -1");
+ } else {
+ fail("decode returned non zero");
+ }
+ return;
+ }
+ if (size1 < 1) {
+ fail("size is < 1");
+ return;
}
- return;
- }
- if (size1 < 1) {
- fail("size is < 1");
- return;
- }
- if (size1 > BUFSZ) {
- fail("size is > BUFSZ");
- return;
- }
+ if (size1 > BUFSZ) {
+ fail("size is > BUFSZ");
+ return;
+ }
- err = t->ei_decode_fp(buf+1, &size2, obj);
- if (err != 0) {
- if (err != -1) {
- fail("decode returned non zero but not -1");
- } else {
- fail("decode returned non zero");
+ size2 = 0;
+ objv[oix].nterms = 0;
+ objv[oix].startp = inp;
+ err = t->ei_decode_fp(inp, &size2, &objv[oix]);
+ if (err != 0) {
+ if (err != -1) {
+ fail("decode returned non zero but not -1");
+ } else {
+ fail("decode returned non zero");
+ }
+ return;
+ }
+ if (size1 != size2) {
+ MESSAGE("size1 = %d, size2 = %d\n",size1,size2);
+ fail("decode sizes differs");
+ return;
}
- return;
- }
- if (size1 != size2) {
- MESSAGE("size1 = %d, size2 = %d\n",size1,size2);
- fail("decode sizes differs");
- return;
- }
- size2 = 0;
- err = ei_skip_term(buf+1, &size2);
- if (err != 0) {
- fail("ei_skip_term returned non zero");
- return;
- }
- if (size1 != size2) {
- MESSAGE("size1 = %d, size2 = %d\n",size1,size2);
- fail("skip size differs");
- return;
- }
+ if (!objv[oix].nterms) {
+ size2 = 0;
+ err = ei_skip_term(inp, &size2);
+ if (err != 0) {
+ fail("ei_skip_term returned non zero");
+ return;
+ }
+ if (size1 != size2) {
+ MESSAGE("size1 = %d, size2 = %d\n",size1,size2);
+ fail("skip size differs");
+ return;
+ }
+ }
- MESSAGE("ei_encode_%s buf is NULL, arg is type %s", t->name, t->type);
- size2 = 0;
- err = t->ei_encode_fp(NULL, &size2, obj);
- if (err != 0) {
- if (err != -1) {
- fail("size calculation returned non zero but not -1");
+ MESSAGE("ei_encode_%s buf is NULL, arg is type %s", t->name, t->type);
+ size2 = 0;
+ err = t->ei_encode_fp(NULL, &size2, &objv[oix]);
+ if (err != 0) {
+ if (err != -1) {
+ fail("size calculation returned non zero but not -1");
+ return;
+ } else {
+ fail("size calculation returned non zero");
+ return;
+ }
+ }
+ if (size1 != size2) {
+ MESSAGE("size1 = %d, size2 = %d\n",size1,size2);
+ fail("decode and encode size differs when buf is NULL");
return;
- } else {
- fail("size calculation returned non zero");
+ }
+ MESSAGE("ei_encode_%s, arg is type %s", t->name, t->type);
+ size3 = 0;
+ err = t->ei_encode_fp(outp, &size3, &objv[oix]);
+ if (err != 0) {
+ if (err != -1) {
+ fail("returned non zero but not -1");
+ } else {
+ fail("returned non zero");
+ }
return;
}
- }
- if (size1 != size2) {
- MESSAGE("size1 = %d, size2 = %d\n",size1,size2);
- fail("decode and encode size differs when buf is NULL");
- return;
- }
- MESSAGE("ei_encode_%s, arg is type %s", t->name, t->type);
- err = t->ei_encode_fp(buf2, &size3, obj);
- if (err != 0) {
- if (err != -1) {
- fail("returned non zero but not -1");
- } else {
- fail("returned non zero");
+ if (size1 != size3) {
+ MESSAGE("size1 = %d, size2 = %d\n",size1,size3);
+ fail("decode and encode size differs");
+ return;
}
- return;
- }
- if (size1 != size3) {
- MESSAGE("size1 = %d, size2 = %d\n",size1,size3);
- fail("decode and encode size differs");
- return;
- }
- send_buffer(buf2, size1);
- MESSAGE("ei_x_encode_%s, arg is type %s", t->name, t->type);
- ei_x_new(&arg);
- err = t->ei_x_encode_fp(&arg, obj);
- if (err != 0) {
- if (err != -1) {
- fail("returned non zero but not -1");
- } else {
- fail("returned non zero");
+ MESSAGE("ei_x_encode_%s, arg is type %s", t->name, t->type);
+ err = t->ei_x_encode_fp(&arg, &objv[oix]);
+ if (err != 0) {
+ if (err != -1) {
+ fail("returned non zero but not -1");
+ } else {
+ fail("returned non zero");
+ }
+ ei_x_free(&arg);
+ return;
}
- ei_x_free(&arg);
- return;
+ if (arg.index < 1) {
+ fail("size is < 1");
+ ei_x_free(&arg);
+ return;
+ }
+
+ inp += size1;
+ outp += size1;
+
+ if (objv[oix].nterms) { /* container term */
+ if (++oix >= sizeof(objv)/sizeof(*objv))
+ fail("Term too deep");
+ }
+ else { /* "leaf" term */
+ while (oix > 0) {
+ if (--(objv[oix - 1].nterms) == 0) {
+ /* last element in container */
+ --oix;
+
+ size2 = 0;
+ err = ei_skip_term(objv[oix].startp, &size2);
+ if (err != 0) {
+ fail("ei_skip_term returned non zero");
+ return;
+ }
+ if (objv[oix].startp + size2 != inp) {
+ MESSAGE("size1 = %d, size2 = %d\n", size1, size2);
+ fail("container skip size differs");
+ return;
+ }
+ }
+ else
+ break; /* more elements in container */
+ }
+ }
+
}
- if (arg.index < 1) {
- fail("size is < 1");
- ei_x_free(&arg);
- return;
+ if (oix > 0) {
+ fail("Container not complete");
}
+ send_buffer(out_buf, outp - out_buf);
send_buffer(arg.buff, arg.index);
ei_x_free(&arg);
+ free_packet(packet);
}
+void decode_encode_one(struct Type* t)
+{
+ decode_encode(&t, 1);
+}
-#define EI_DECODE_ENCODE(TYPE, ERLANG_TYPE) { \
- struct Type type_struct = {#TYPE, #ERLANG_TYPE, \
- (decodeFT*)ei_decode_##TYPE, \
- (encodeFT*)ei_encode_##TYPE, \
- (x_encodeFT*)ei_x_encode_##TYPE }; \
- ERLANG_TYPE type_obj; \
- decode_encode(&type_struct, &type_obj); \
- }
void decode_encode_big(struct Type* t)
@@ -274,14 +467,6 @@ void decode_encode_big(struct Type* t)
ei_free_big(p);
}
-#define EI_DECODE_ENCODE_BIG(TYPE, ERLANG_TYPE) { \
- struct Type type_struct = {#TYPE, #ERLANG_TYPE, \
- (decodeFT*)ei_decode_##TYPE, \
- (encodeFT*)ei_encode_##TYPE, \
- (x_encodeFT*)ei_x_encode_##TYPE }; \
- decode_encode_big(&type_struct); \
- }
-
/* ******************************************************************** */
@@ -290,34 +475,63 @@ TESTCASE(test_ei_decode_encode)
{
int i;
- EI_DECODE_ENCODE(fun , erlang_fun);
- EI_DECODE_ENCODE(pid , erlang_pid);
- EI_DECODE_ENCODE(port , erlang_port);
- EI_DECODE_ENCODE(ref , erlang_ref);
- EI_DECODE_ENCODE(trace, erlang_trace);
+ decode_encode_one(&fun_type);
+ decode_encode_one(&pid_type);
+ decode_encode_one(&port_type);
+ decode_encode_one(&ref_type);
+ decode_encode_one(&trace_type);
- EI_DECODE_ENCODE_BIG(big , erlang_big);
- EI_DECODE_ENCODE_BIG(big , erlang_big);
- EI_DECODE_ENCODE_BIG(big , erlang_big);
+ decode_encode_big(&big_type);
+ decode_encode_big(&big_type);
+ decode_encode_big(&big_type);
- EI_DECODE_ENCODE_BIG(big , erlang_big);
- EI_DECODE_ENCODE_BIG(big , erlang_big);
- EI_DECODE_ENCODE_BIG(big , erlang_big);
+ decode_encode_big(&big_type);
+ decode_encode_big(&big_type);
+ decode_encode_big(&big_type);
/* Test large node containers... */
- EI_DECODE_ENCODE(pid , erlang_pid);
- EI_DECODE_ENCODE(port , erlang_port);
- EI_DECODE_ENCODE(ref , erlang_ref);
- EI_DECODE_ENCODE(pid , erlang_pid);
- EI_DECODE_ENCODE(port , erlang_port);
- EI_DECODE_ENCODE(ref , erlang_ref);
+ decode_encode_one(&pid_type);
+ decode_encode_one(&port_type);
+ decode_encode_one(&ref_type);
+ decode_encode_one(&pid_type);
+ decode_encode_one(&port_type);
+ decode_encode_one(&ref_type);
/* Unicode atoms */
for (i=0; i<24; i++) {
- EI_DECODE_ENCODE(my_atom, my_atom);
- EI_DECODE_ENCODE(pid, erlang_pid);
- EI_DECODE_ENCODE(port, erlang_port);
- EI_DECODE_ENCODE(ref, erlang_ref);
+ decode_encode_one(&my_atom_type);
+ decode_encode_one(&pid_type);
+ decode_encode_one(&port_type);
+ decode_encode_one(&ref_type);
+ }
+
+ decode_encode_one(&tuple_type); /* {} */
+ {
+ struct Type* tpl[] = { &tuple_type, &my_atom_type, &pid_type, &port_type, &ref_type };
+ decode_encode(tpl, 5);
+ }
+
+ {
+ struct Type* list[] = { &list_type, &my_atom_type, &pid_type, &port_type, &ref_type, &nil_type };
+ decode_encode(list, 6);
+ }
+ {
+ struct Type* list[] = { &list_type, &my_atom_type, &fun_type };
+ decode_encode(list, 3);
+ }
+ decode_encode_one(&map_type); /* #{} */
+ { /* #{atom => atom}*/
+ struct Type* map[] = { &map_type, &my_atom_type, &my_atom_type };
+ decode_encode(map, 3);
+ }
+
+ { /* #{atom => atom, atom => pid, port => ref }*/
+ struct Type* map[] = { &map_type,
+ &my_atom_type, &my_atom_type,
+ &my_atom_type, &pid_type,
+ &port_type, &ref_type
+ };
+ decode_encode(map, 7);
}
report(1);
diff --git a/lib/erl_interface/vsn.mk b/lib/erl_interface/vsn.mk
index f386ce09a8..8731283265 100644
--- a/lib/erl_interface/vsn.mk
+++ b/lib/erl_interface/vsn.mk
@@ -1 +1,2 @@
-EI_VSN = 3.7.15
+EI_VSN = 3.7.16
+ERL_INTERFACE_VSN = $(EI_VSN)
diff --git a/lib/et/doc/src/notes.xml b/lib/et/doc/src/notes.xml
index 815dfada5e..e122187cf3 100644
--- a/lib/et/doc/src/notes.xml
+++ b/lib/et/doc/src/notes.xml
@@ -36,6 +36,51 @@
one section in this document. The title of each section is the
version number of <c>Event Tracer (ET)</c>.</p>
+<section><title>ET 1.5</title>
+
+ <section><title>Fixed Bugs and Malfunctions</title>
+ <list>
+ <item>
+ <p>
+ Application upgrade (appup) files are corrected for the
+ following applications: </p>
+ <p>
+ <c>asn1, common_test, compiler, crypto, debugger,
+ dialyzer, edoc, eldap, erl_docgen, et, eunit, gs, hipe,
+ inets, observer, odbc, os_mon, otp_mibs, parsetools,
+ percept, public_key, reltool, runtime_tools, ssh,
+ syntax_tools, test_server, tools, typer, webtool, wx,
+ xmerl</c></p>
+ <p>
+ A new test utility for testing appup files is added to
+ test_server. This is now used by most applications in
+ OTP.</p>
+ <p>
+ (Thanks to Tobias Schlager)</p>
+ <p>
+ Own Id: OTP-11744</p>
+ </item>
+ </list>
+ </section>
+
+
+ <section><title>Improvements and New Features</title>
+ <list>
+ <item>
+ <p>
+ Removed gs based applications and gs based backends. The
+ <c>observer</c> application replaces the removed
+ applications.</p>
+ <p>
+ *** POTENTIAL INCOMPATIBILITY ***</p>
+ <p>
+ Own Id: OTP-10915</p>
+ </item>
+ </list>
+ </section>
+
+</section>
+
<section><title>ET 1.4.4.5</title>
<section><title>Improvements and New Features</title>
diff --git a/lib/et/src/et.app.src b/lib/et/src/et.app.src
index f7189a4197..c26d9320d8 100644
--- a/lib/et/src/et.app.src
+++ b/lib/et/src/et.app.src
@@ -31,5 +31,7 @@
]},
{registered, [et_collector]},
{applications, [stdlib, kernel]},
- {env, []}
+ {env, []},
+ {runtime_dependencies, ["wx-1.2","stdlib-2.0","runtime_tools-1.8.14",
+ "kernel-3.0","erts-6.0"]}
]}.
diff --git a/lib/et/src/et.appup.src b/lib/et/src/et.appup.src
index b6344a9387..5f15b00386 100644
--- a/lib/et/src/et.appup.src
+++ b/lib/et/src/et.appup.src
@@ -1,8 +1,7 @@
-%% This is an -*- erlang -*- file.
-%%
+%% -*- erlang -*-
%% %CopyrightBegin%
%%
-%% Copyright Ericsson AB 2002-2009. All Rights Reserved.
+%% Copyright Ericsson AB 2002-2014. 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
@@ -16,8 +15,7 @@
%% under the License.
%%
%% %CopyrightEnd%
-
{"%VSN%",
- [ ]
+ [{<<".*">>,[{restart_application, et}]}],
+ [{<<".*">>,[{restart_application, et}]}]
}.
-
diff --git a/lib/et/test/Makefile b/lib/et/test/Makefile
index 3817079b5f..1be5aac3fd 100644
--- a/lib/et/test/Makefile
+++ b/lib/et/test/Makefile
@@ -25,6 +25,7 @@ include $(ERL_TOP)/make/$(TARGET)/otp.mk
MODULES= \
ett \
+ et_SUITE \
et_wx_SUITE \
et_test_lib
diff --git a/lib/et/test/et_SUITE.erl b/lib/et/test/et_SUITE.erl
new file mode 100644
index 0000000000..e0bce41e15
--- /dev/null
+++ b/lib/et/test/et_SUITE.erl
@@ -0,0 +1,50 @@
+%% ``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 via the world wide web 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.
+%%
+%% The Initial Developer of the Original Code is Ericsson Utvecklings AB.
+%% Portions created by Ericsson are Copyright 1999, Ericsson Utvecklings
+%% AB. All Rights Reserved.''
+%%
+-module(et_SUITE).
+
+-compile([export_all]).
+-include_lib("common_test/include/ct.hrl").
+
+suite() ->
+ [{ct_hooks, [ts_install_cth]}].
+
+all() ->
+ [app, appup].
+
+groups() ->
+ [].
+
+init_per_suite(Config) ->
+ Config.
+
+end_per_suite(_Config) ->
+ ok.
+
+init_per_group(_GroupName, Config) ->
+ Config.
+
+end_per_group(_GroupName, Config) ->
+ Config.
+
+app() ->
+ [{doc, "Test that the et app file is ok"}].
+app(Config) when is_list(Config) ->
+ ok = ?t:app_test(et).
+
+appup() ->
+ [{doc, "Test that the et appup file is ok"}].
+appup(Config) when is_list(Config) ->
+ ok = ?t:appup_test(et).
diff --git a/lib/et/vsn.mk b/lib/et/vsn.mk
index 282991aa49..a47be678ca 100644
--- a/lib/et/vsn.mk
+++ b/lib/et/vsn.mk
@@ -1 +1 @@
-ET_VSN = 1.4.4.5
+ET_VSN = 1.5
diff --git a/lib/eunit/doc/src/notes.xml b/lib/eunit/doc/src/notes.xml
index c52f12dcc8..72ffda3cd5 100644
--- a/lib/eunit/doc/src/notes.xml
+++ b/lib/eunit/doc/src/notes.xml
@@ -32,6 +32,35 @@
</header>
<p>This document describes the changes made to the EUnit application.</p>
+<section><title>Eunit 2.2.7</title>
+
+ <section><title>Fixed Bugs and Malfunctions</title>
+ <list>
+ <item>
+ <p>
+ Application upgrade (appup) files are corrected for the
+ following applications: </p>
+ <p>
+ <c>asn1, common_test, compiler, crypto, debugger,
+ dialyzer, edoc, eldap, erl_docgen, et, eunit, gs, hipe,
+ inets, observer, odbc, os_mon, otp_mibs, parsetools,
+ percept, public_key, reltool, runtime_tools, ssh,
+ syntax_tools, test_server, tools, typer, webtool, wx,
+ xmerl</c></p>
+ <p>
+ A new test utility for testing appup files is added to
+ test_server. This is now used by most applications in
+ OTP.</p>
+ <p>
+ (Thanks to Tobias Schlager)</p>
+ <p>
+ Own Id: OTP-11744</p>
+ </item>
+ </list>
+ </section>
+
+</section>
+
<section><title>Eunit 2.2.6</title>
<section><title>Fixed Bugs and Malfunctions</title>
diff --git a/lib/eunit/src/eunit.app.src b/lib/eunit/src/eunit.app.src
index 431abac98b..7a3978e200 100644
--- a/lib/eunit/src/eunit.app.src
+++ b/lib/eunit/src/eunit.app.src
@@ -14,7 +14,9 @@
eunit_striptests,
eunit_surefire,
eunit_test,
+ eunit_tests,
eunit_tty]},
{registered,[]},
{applications, [kernel,stdlib]},
- {env, []}]}.
+ {env, []},
+ {runtime_dependencies, ["stdlib-2.0","kernel-3.0","erts-6.0"]}]}.
diff --git a/lib/eunit/src/eunit.appup.src b/lib/eunit/src/eunit.appup.src
index 54a63833e6..18934d44c2 100644
--- a/lib/eunit/src/eunit.appup.src
+++ b/lib/eunit/src/eunit.appup.src
@@ -1 +1,21 @@
-{"%VSN%",[],[]}.
+%% -*- erlang -*-
+%% %CopyrightBegin%
+%%
+%% Copyright Ericsson AB 2014. 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%
+{"%VSN%",
+ [{<<".*">>,[{restart_application, eunit}]}],
+ [{<<".*">>,[{restart_application, eunit}]}]
+}.
diff --git a/lib/eunit/src/eunit_serial.erl b/lib/eunit/src/eunit_serial.erl
index 80e79116e3..1a0179a5df 100644
--- a/lib/eunit/src/eunit_serial.erl
+++ b/lib/eunit/src/eunit_serial.erl
@@ -56,9 +56,9 @@
%% future use, and/or cancel the current item and possibly one or more
%% of its parent groups.
--record(state, {listeners :: set(),
- cancelled = eunit_lib:trie_new() :: gb_tree(),
- messages = dict:new() :: dict()}).
+-record(state, {listeners :: sets:set(),
+ cancelled = eunit_lib:trie_new() :: gb_trees:tree(),
+ messages = dict:new() :: dict:dict()}).
start(Pids) ->
spawn(fun () -> serializer(Pids) end).
diff --git a/lib/eunit/test/eunit_SUITE.erl b/lib/eunit/test/eunit_SUITE.erl
index 47c2435d63..d13dc73923 100644
--- a/lib/eunit/test/eunit_SUITE.erl
+++ b/lib/eunit/test/eunit_SUITE.erl
@@ -19,14 +19,15 @@
-module(eunit_SUITE).
-export([all/0, suite/0,groups/0,init_per_suite/1, end_per_suite/1,
- init_per_group/2,end_per_group/2,eunit_test/1]).
+ init_per_group/2,end_per_group/2,
+ app_test/1,appup_test/1,eunit_test/1]).
-include_lib("common_test/include/ct.hrl").
suite() -> [{ct_hooks,[ts_install_cth]}].
all() ->
- [eunit_test].
+ [app_test, appup_test, eunit_test].
groups() ->
[].
@@ -43,6 +44,11 @@ init_per_group(_GroupName, Config) ->
end_per_group(_GroupName, Config) ->
Config.
+app_test(Config) when is_list(Config) ->
+ ok = ?t:app_test(eunit).
+
+appup_test(Config) when is_list(Config) ->
+ ok = ?t:appup_test(eunit).
eunit_test(Config) when is_list(Config) ->
ok = file:set_cwd(code:lib_dir(eunit)),
diff --git a/lib/eunit/vsn.mk b/lib/eunit/vsn.mk
index 8f816b3b94..f04c0536fe 100644
--- a/lib/eunit/vsn.mk
+++ b/lib/eunit/vsn.mk
@@ -1 +1 @@
-EUNIT_VSN = 2.2.6
+EUNIT_VSN = 2.2.7
diff --git a/lib/gs/doc/src/gs.xml b/lib/gs/doc/src/gs.xml
index e0d7fb20da..7b589d002d 100644
--- a/lib/gs/doc/src/gs.xml
+++ b/lib/gs/doc/src/gs.xml
@@ -5,7 +5,7 @@
<header>
<copyright>
<year>2000</year>
- <year>2013</year>
+ <year>2014</year>
<holder>Ericsson AB, All Rights Reserved</holder>
</copyright>
<legalnotice>
@@ -39,7 +39,7 @@
graphical user interface.
</p>
<p>
- GS is deprecated and will be removed in the R16 release.
+ GS is deprecated and will be removed in the 18.0 release.
</p>
</warning>
<p>The Graphics System, GS, is easy to learn and
diff --git a/lib/gs/doc/src/notes.xml b/lib/gs/doc/src/notes.xml
index f5117cb9ba..e40310d36e 100644
--- a/lib/gs/doc/src/notes.xml
+++ b/lib/gs/doc/src/notes.xml
@@ -30,7 +30,36 @@
</header>
<p>This document describes the changes made to the GS application.</p>
- <section><title>GS 1.5.15.2</title>
+ <section><title>GS 1.5.16</title>
+
+ <section><title>Fixed Bugs and Malfunctions</title>
+ <list>
+ <item>
+ <p>
+ Application upgrade (appup) files are corrected for the
+ following applications: </p>
+ <p>
+ <c>asn1, common_test, compiler, crypto, debugger,
+ dialyzer, edoc, eldap, erl_docgen, et, eunit, gs, hipe,
+ inets, observer, odbc, os_mon, otp_mibs, parsetools,
+ percept, public_key, reltool, runtime_tools, ssh,
+ syntax_tools, test_server, tools, typer, webtool, wx,
+ xmerl</c></p>
+ <p>
+ A new test utility for testing appup files is added to
+ test_server. This is now used by most applications in
+ OTP.</p>
+ <p>
+ (Thanks to Tobias Schlager)</p>
+ <p>
+ Own Id: OTP-11744</p>
+ </item>
+ </list>
+ </section>
+
+</section>
+
+<section><title>GS 1.5.15.2</title>
<section><title>Improvements and New Features</title>
<list>
diff --git a/lib/gs/src/Makefile b/lib/gs/src/Makefile
index 0a63d5466e..f0200caf01 100644
--- a/lib/gs/src/Makefile
+++ b/lib/gs/src/Makefile
@@ -72,7 +72,7 @@ IMAGES=../priv/bitmap/fup.bm
# ----------------------------------------------------
# FLAGS
# ----------------------------------------------------
-ERL_COMPILE_FLAGS += +warn_obsolete_guard
+ERL_COMPILE_FLAGS += +warn_obsolete_guard -Werror
# ----------------------------------------------------
# Targets
diff --git a/lib/gs/src/gs.app.src b/lib/gs/src/gs.app.src
index c83c9b54d7..c6f88e5144 100644
--- a/lib/gs/src/gs.app.src
+++ b/lib/gs/src/gs.app.src
@@ -10,4 +10,5 @@
gstk_window,tcl2erl,tool_file_dialog,tool_utils,
gs_packer,gse]},
{registered, [gs_frontend]},
- {applications, [kernel, stdlib]}]}.
+ {applications, [kernel, stdlib]},
+ {runtime_dependencies, ["stdlib-2.0","kernel-3.0","erts-6.0"]}]}.
diff --git a/lib/gs/src/gs.appup.src b/lib/gs/src/gs.appup.src
index 54a63833e6..2cb3b547e8 100644
--- a/lib/gs/src/gs.appup.src
+++ b/lib/gs/src/gs.appup.src
@@ -1 +1,21 @@
-{"%VSN%",[],[]}.
+%% -*- erlang -*-
+%% %CopyrightBegin%
+%%
+%% Copyright Ericsson AB 2014. 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%
+{"%VSN%",
+ [{<<".*">>,[{restart_application, gs}]}],
+ [{<<".*">>,[{restart_application, gs}]}]
+}.
diff --git a/lib/gs/src/gstk_generic.erl b/lib/gs/src/gstk_generic.erl
index 9b0efd07c1..573b4e05bb 100644
--- a/lib/gs/src/gstk_generic.erl
+++ b/lib/gs/src/gstk_generic.erl
@@ -323,11 +323,11 @@ handle_external_opt_call([Opt|Options],Gstkid,TkW,DB,ExtraArg,ExtRes,S,P,C) ->
end.
handle_external_read(Res) ->
- _ = case Res of
- {bad_result,{Objtype,Reason,Option}} ->
- {error,{Objtype,Reason,Option}};
- _ -> ok
- end,
+ %% We have removed dead code here that attempted to translate
+ %% a bad return value from {bad_result,{A,B,C}} to {error,{A,B,C}}.
+ %% Since the gs application is deprecated, we don't want to introduce
+ %% a potential incompatibility; thus we have removed the dead code
+ %% instead of correcting it.
Res.
%%----------------------------------------------------------------------
diff --git a/lib/gs/test/Makefile b/lib/gs/test/Makefile
new file mode 100644
index 0000000000..493770745f
--- /dev/null
+++ b/lib/gs/test/Makefile
@@ -0,0 +1,65 @@
+include $(ERL_TOP)/make/target.mk
+include $(ERL_TOP)/make/$(TARGET)/otp.mk
+
+# ----------------------------------------------------
+# Target Specs
+# ----------------------------------------------------
+
+MODULES= \
+ gs_SUITE
+
+ERL_FILES= $(MODULES:%=%.erl)
+
+TARGET_FILES= $(MODULES:%=$(EBIN)/%.$(EMULATOR))
+INSTALL_PROGS= $(TARGET_FILES)
+
+EMAKEFILE=Emakefile
+
+# ----------------------------------------------------
+# Release directory specification
+# ----------------------------------------------------
+RELSYSDIR = $(RELEASE_PATH)/gs_test
+
+# ----------------------------------------------------
+# FLAGS
+# ----------------------------------------------------
+
+ERL_MAKE_FLAGS +=
+ERL_COMPILE_FLAGS += -I$(ERL_TOP)/lib/test_server/include
+
+EBIN = .
+
+# ----------------------------------------------------
+# Targets
+# ----------------------------------------------------
+
+make_emakefile:
+ $(ERL_TOP)/make/make_emakefile $(ERL_COMPILE_FLAGS) -o$(EBIN) $(MODULES) \
+ > $(EMAKEFILE)
+ $(ERL_TOP)/make/make_emakefile $(ERL_COMPILE_FLAGS) -o$(EBIN) '*_SUITE_make' \
+ >> $(EMAKEFILE)
+
+tests debug opt: make_emakefile
+ erl $(ERL_MAKE_FLAGS) -make
+
+clean:
+ rm -f $(EMAKEFILE)
+ rm -f $(TARGET_FILES) $(GEN_FILES)
+ rm -f core
+
+docs:
+
+# ----------------------------------------------------
+# Release Target
+# ----------------------------------------------------
+include $(ERL_TOP)/make/otp_release_targets.mk
+
+release_spec: opt
+
+release_tests_spec: make_emakefile
+ $(INSTALL_DIR) "$(RELSYSDIR)"
+ $(INSTALL_DATA) $(EMAKEFILE) $(ERL_FILES) "$(RELSYSDIR)"
+ $(INSTALL_DATA) gs.spec "$(RELSYSDIR)"
+ chmod -R u+w "$(RELSYSDIR)"
+
+release_docs_spec:
diff --git a/lib/gs/test/gs.spec b/lib/gs/test/gs.spec
new file mode 100644
index 0000000000..46e6b2061e
--- /dev/null
+++ b/lib/gs/test/gs.spec
@@ -0,0 +1 @@
+{suites,"../gs_test",all}.
diff --git a/lib/gs/test/gs_SUITE.erl b/lib/gs/test/gs_SUITE.erl
new file mode 100644
index 0000000000..01ce90df0b
--- /dev/null
+++ b/lib/gs/test/gs_SUITE.erl
@@ -0,0 +1,50 @@
+%% ``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 via the world wide web 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.
+%%
+%% The Initial Developer of the Original Code is Ericsson Utvecklings AB.
+%% Portions created by Ericsson are Copyright 1999, Ericsson Utvecklings
+%% AB. All Rights Reserved.''
+%%
+-module(gs_SUITE).
+
+-compile([export_all]).
+-include_lib("common_test/include/ct.hrl").
+
+suite() ->
+ [{ct_hooks, [ts_install_cth]}].
+
+all() ->
+ [app, appup].
+
+groups() ->
+ [].
+
+init_per_suite(Config) ->
+ Config.
+
+end_per_suite(_Config) ->
+ ok.
+
+init_per_group(_GroupName, Config) ->
+ Config.
+
+end_per_group(_GroupName, Config) ->
+ Config.
+
+app() ->
+ [{doc, "Test that the gs app file is ok"}].
+app(Config) when is_list(Config) ->
+ ok = ?t:app_test(gs, tolerant).
+
+appup() ->
+ [{doc, "Test that the gs appup file is ok"}].
+appup(Config) when is_list(Config) ->
+ ok = ?t:appup_test(gs).
diff --git a/lib/gs/vsn.mk b/lib/gs/vsn.mk
index 5c18153c34..96786b300c 100644
--- a/lib/gs/vsn.mk
+++ b/lib/gs/vsn.mk
@@ -1,2 +1,2 @@
-GS_VSN = 1.5.15.2
+GS_VSN = 1.5.16
diff --git a/lib/hipe/Makefile b/lib/hipe/Makefile
index a9e24f4d17..46cbc33ae2 100644
--- a/lib/hipe/Makefile
+++ b/lib/hipe/Makefile
@@ -22,7 +22,7 @@ include $(ERL_TOP)/make/target.mk
include $(ERL_TOP)/make/$(TARGET)/otp.mk
ifdef HIPE_ENABLED
-HIPE_SUBDIRS = regalloc sparc ppc x86 amd64 arm opt tools
+HIPE_SUBDIRS = regalloc sparc ppc x86 amd64 arm opt tools llvm
else
HIPE_SUBDIRS =
endif
diff --git a/lib/hipe/arm/hipe_arm_assemble.erl b/lib/hipe/arm/hipe_arm_assemble.erl
index 2af786994e..e9de96a927 100644
--- a/lib/hipe/arm/hipe_arm_assemble.erl
+++ b/lib/hipe/arm/hipe_arm_assemble.erl
@@ -44,8 +44,8 @@ assemble(CompiledCode, Closures, Exports, Options) ->
print("Total num bytes=~w\n", [CodeSize], Options),
%%
SC = hipe_pack_constants:slim_constmap(ConstMap),
- DataRelocs = mk_data_relocs(RefsFromConsts, LabelMap),
- SSE = slim_sorted_exportmap(ExportMap,Closures,Exports),
+ DataRelocs = hipe_pack_constants:mk_data_relocs(RefsFromConsts, LabelMap),
+ SSE = hipe_pack_constants:slim_sorted_exportmap(ExportMap,Closures,Exports),
SlimRefs = hipe_pack_constants:slim_refs(AccRefs),
Bin = term_to_binary([{?VERSION_STRING(),?HIPE_SYSTEM_CRC},
ConstAlign, ConstSize,
@@ -320,7 +320,7 @@ do_pseudo_li(I, MFA, ConstMap, Address, PrevImms, PendImms) ->
Atom when is_atom(Atom) ->
{load_atom, Atom};
{Label,constant} ->
- ConstNo = find_const({MFA,Label}, ConstMap),
+ ConstNo = hipe_pack_constants:find_const({MFA,Label}, ConstMap),
{load_address, {constant,ConstNo}};
{Label,closure} ->
{load_address, {closure,Label}};
@@ -518,37 +518,6 @@ fix_pc_refs(I, InsnAddress, FunAddress, LabelMap) ->
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
-mk_data_relocs(RefsFromConsts, LabelMap) ->
- lists:flatten(mk_data_relocs(RefsFromConsts, LabelMap, [])).
-
-mk_data_relocs([{MFA,Labels} | Rest], LabelMap, Acc) ->
- Map = [case Label of
- {L,Pos} ->
- Offset = find({MFA,L}, LabelMap),
- {Pos,Offset};
- {sorted,Base,OrderedLabels} ->
- {sorted, Base, [begin
- Offset = find({MFA,L}, LabelMap),
- {Order, Offset}
- end
- || {L,Order} <- OrderedLabels]}
- end
- || Label <- Labels],
- %% msg("Map: ~w Map\n",[Map]),
- mk_data_relocs(Rest, LabelMap, [Map,Acc]);
-mk_data_relocs([],_,Acc) -> Acc.
-
-find({_MFA,_L} = MFAL, LabelMap) ->
- gb_trees:get(MFAL, LabelMap).
-
-slim_sorted_exportmap([{Addr,M,F,A}|Rest], Closures, Exports) ->
- IsClosure = lists:member({M,F,A}, Closures),
- IsExported = is_exported(F, A, Exports),
- [Addr,M,F,A,IsClosure,IsExported | slim_sorted_exportmap(Rest, Closures, Exports)];
-slim_sorted_exportmap([],_,_) -> [].
-
-is_exported(F, A, Exports) -> lists:member({F,A}, Exports).
-
%%%
%%% Assembly listing support (pp_asm option).
%%%
@@ -594,17 +563,6 @@ fill_spaces(N) when N > 0 ->
fill_spaces(0) ->
[].
-%%%
-%%% Lookup a constant in a ConstMap.
-%%%
-
-find_const({MFA,Label},[{pcm_entry,MFA,Label,ConstNo,_,_,_}|_]) ->
- ConstNo;
-find_const(N,[_|R]) ->
- find_const(N,R);
-find_const(C,[]) ->
- ?EXIT({constant_not_found,C}).
-
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
%%%
diff --git a/lib/hipe/cerl/Makefile b/lib/hipe/cerl/Makefile
index 506e993ff4..d13dfb33c2 100644
--- a/lib/hipe/cerl/Makefile
+++ b/lib/hipe/cerl/Makefile
@@ -42,8 +42,8 @@ RELSYSDIR = $(RELEASE_PATH)/lib/hipe-$(VSN)
# ----------------------------------------------------
# Target Specs
# ----------------------------------------------------
-MODULES = cerl_cconv cerl_closurean cerl_hipeify \
- cerl_lib cerl_messagean cerl_pmatch cerl_prettypr cerl_to_icode \
+MODULES = cerl_cconv cerl_closurean cerl_hipeify cerl_lib \
+ cerl_messagean cerl_pmatch cerl_prettypr cerl_to_icode \
cerl_typean erl_bif_types erl_types
HRL_FILES= cerl_hipe_primops.hrl
@@ -65,7 +65,7 @@ DOC_FILES= $(MODULES:%=$(DOCS)/%.html)
include ../native.mk
-ERL_COMPILE_FLAGS += +inline +warn_exported_vars +warn_unused_import +warn_missing_spec# +warn_untyped_record
+ERL_COMPILE_FLAGS += -Werror +inline +warn_exported_vars +warn_unused_import +warn_missing_spec #+warn_untyped_record
# ----------------------------------------------------
# Targets
@@ -107,7 +107,6 @@ release_spec: opt
release_docs_spec:
-$(EBIN)/cerl_to_icode.beam: cerl_hipe_primops.hrl ../icode/hipe_icode_primops.hrl
+$(EBIN)/cerl_cconv.beam: cerl_hipe_primops.hrl
$(EBIN)/cerl_hipeify.beam: cerl_hipe_primops.hrl
-$(EBIN)/cerl_lambdalift.beam: cerl_hipe_primops.hrl
-$(EBIN)/erl_bif_types.beam: ../icode/hipe_icode_primops.hrl
+$(EBIN)/cerl_to_icode.beam: cerl_hipe_primops.hrl ../icode/hipe_icode_primops.hrl
diff --git a/lib/hipe/cerl/cerl_closurean.erl b/lib/hipe/cerl/cerl_closurean.erl
index 021acd5b35..1b325703ae 100644
--- a/lib/hipe/cerl/cerl_closurean.erl
+++ b/lib/hipe/cerl/cerl_closurean.erl
@@ -1,7 +1,7 @@
%%
%% %CopyrightBegin%
%%
-%% Copyright Ericsson AB 2003-2010. All Rights Reserved.
+%% Copyright Ericsson AB 2003-2014. 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
@@ -78,7 +78,8 @@
%% function; see `analyze' for details.
-spec annotate(cerl:cerl()) ->
- {cerl:cerl(), outlist(), dict(), escapes(), dict(), dict()}.
+ {cerl:cerl(), outlist(), dict:dict(),
+ escapes(), dict:dict(), dict:dict()}.
annotate(Tree) ->
{Xs, Out, Esc, Deps, Par} = analyze(Tree),
@@ -206,7 +207,8 @@ append_ann(Tag, Val, []) ->
%% variable labeled `escape', which will hold the set of escaped labels.
%% initially it contains `top' and `external'.
--spec analyze(cerl:cerl()) -> {outlist(), dict(), escapes(), dict(), dict()}.
+-spec analyze(cerl:cerl()) ->
+ {outlist(), dict:dict(), escapes(), dict:dict(), dict:dict()}.
analyze(Tree) ->
%% Note that we use different name spaces for variable labels and
diff --git a/lib/hipe/cerl/cerl_messagean.erl b/lib/hipe/cerl/cerl_messagean.erl
index ca812a0f0d..7911b875a9 100644
--- a/lib/hipe/cerl/cerl_messagean.erl
+++ b/lib/hipe/cerl/cerl_messagean.erl
@@ -1,7 +1,7 @@
%% =====================================================================
%% %CopyrightBegin%
%%
-%% Copyright Ericsson AB 2004-2012. All Rights Reserved.
+%% Copyright Ericsson AB 2004-2014. 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
@@ -182,7 +182,7 @@
-type label() :: integer() | 'external' | 'top'.
-type ordset(X) :: [X]. % XXX: TAKE ME OUT
--spec annotate(cerl:cerl()) -> {cerl:cerl(), ordset(label()), dict()}.
+-spec annotate(cerl:cerl()) -> {cerl:cerl(), ordset(label()), dict:dict()}.
annotate(Tree) ->
{Esc0, Vars} = analyze(Tree),
diff --git a/lib/hipe/cerl/cerl_prettypr.erl b/lib/hipe/cerl/cerl_prettypr.erl
index fba9a48cda..9a3873f46d 100644
--- a/lib/hipe/cerl/cerl_prettypr.erl
+++ b/lib/hipe/cerl/cerl_prettypr.erl
@@ -62,7 +62,10 @@
receive_action/1, receive_clauses/1, receive_timeout/1,
seq_arg/1, seq_body/1, string_lit/1, try_arg/1,
try_body/1, try_vars/1, try_evars/1, try_handler/1,
- tuple_es/1, type/1, values_es/1, var_name/1]).
+ tuple_es/1, type/1, values_es/1, var_name/1,
+ c_map/1, map_arg/1, map_es/1, is_c_map_empty/1,
+ c_map_pair/2, map_pair_key/1, map_pair_val/1, map_pair_op/1
+ ]).
-define(PAPER, 76).
-define(RIBBON, 45).
@@ -424,6 +427,10 @@ lay_1(Node, Ctxt) ->
lay_cons(Node, Ctxt);
tuple ->
lay_tuple(Node, Ctxt);
+ map ->
+ lay_map(Node, Ctxt);
+ map_pair ->
+ lay_map_pair(Node, Ctxt);
'let' ->
lay_let(Node, Ctxt);
seq ->
@@ -483,7 +490,13 @@ lay_literal(Node, Ctxt) ->
%% `lay_cons' will check for strings.
lay_cons(Node, Ctxt);
V when is_tuple(V) ->
- lay_tuple(Node, Ctxt)
+ lay_tuple(Node, Ctxt);
+ M when is_map(M), map_size(M) =:= 0 ->
+ text("~{}~");
+ M when is_map(M) ->
+ lay_map(c_map([c_map_pair(abstract(K),abstract(V))
+ || {K,V} <- maps:to_list(M)]),
+ Ctxt)
end.
lay_var(Node, Ctxt) ->
@@ -589,6 +602,30 @@ lay_tuple(Node, Ctxt) ->
Ctxt, fun lay/2)),
floating(text("}")))).
+lay_map(Node, Ctxt) ->
+ Arg = map_arg(Node),
+ After = case is_c_map_empty(Arg) of
+ true -> floating(text("}~"));
+ false ->
+ beside(floating(text(" | ")),
+ beside(lay(Arg,Ctxt),
+ floating(text("}~"))))
+ end,
+ beside(floating(text("~{")),
+ beside(par(seq(map_es(Node), floating(text(",")), Ctxt, fun lay/2)),
+ After)).
+
+lay_map_pair(Node, Ctxt) ->
+ K = map_pair_key(Node),
+ V = map_pair_val(Node),
+ OpTxt = case concrete(map_pair_op(Node)) of
+ assoc -> "::<";
+ exact -> "~<"
+ end,
+ beside(floating(text(OpTxt)),
+ beside(lay(K,Ctxt),beside(floating(text(",")), beside(lay(V,Ctxt),
+ floating(text(">")))))).
+
lay_let(Node, Ctxt) ->
V = lay_value_list(let_vars(Node), Ctxt),
D1 = par([follow(text("let"),
diff --git a/lib/hipe/cerl/cerl_to_icode.erl b/lib/hipe/cerl/cerl_to_icode.erl
index 1c1c10d9b0..2645056be1 100644
--- a/lib/hipe/cerl/cerl_to_icode.erl
+++ b/lib/hipe/cerl/cerl_to_icode.erl
@@ -29,9 +29,9 @@
-define(NO_UNUSED, true).
--export([module/2]).
+-export([module/1, module/2]).
-ifndef(NO_UNUSED).
--export([function/3, function/4, module/1]).
+-export([function/3, function/4]).
-endif.
%% Added in an attempt to suppress message by Dialyzer, but I run into
@@ -102,36 +102,32 @@
%% Record definitions
--record(ctxt, {final = false :: boolean(),
- effect = false,
- fail = [], % [] or fail-to label
- class = expr, % expr | guard
- line = 0, % current line number
- 'receive' % undefined | #receive{}
- }).
-
-record('receive', {loop}).
-record(cerl_to_icode__var, {name}).
-record('fun', {label, vars}).
+-record(ctxt, {final = false :: boolean(),
+ effect = false :: boolean(),
+ fail = [], % [] or fail-to label
+ class = expr :: 'expr' | 'guard',
+ line = 0 :: erl_scan:line(), % current line number
+ 'receive' :: 'undefined' | #'receive'{}
+ }).
%% ---------------------------------------------------------------------
%% Code
-
-%% @spec module(Module::cerl()) -> [icode()]
+%% @spec module(Module::cerl()) -> [{mfa(), icode()}]
%% @equiv module(Module, [])
--ifndef(NO_UNUSED).
+-spec module(cerl:c_module()) -> [{mfa(), hipe_icode:icode()}].
+
module(E) ->
module(E, []).
--endif.
-%% @clear
-
-%% @spec module(Module::cerl(), Options::[term()]) -> [icode()]
+%% @spec module(Module::cerl(), Options::[term()]) -> [{mfa(), icode()}]
%%
-%% cerl() = cerl:cerl()
+%% cerl() = cerl:c_module()
%% icode() = hipe_icode:icode()
%%
%% @doc Transforms a Core Erlang module to linear HiPE Icode. The result
@@ -149,7 +145,7 @@ module(E) ->
%% @see function/4
%% @see cerl_hipeify:transform/1
-%% -spec module(cerl:c_module(), [term()]) -> [{mfa(), hipe_icode:icode()}].
+-spec module(cerl:c_module(), [term()]) -> [{mfa(), hipe_icode:icode()}].
module(E, Options) ->
module_1(cerl_hipeify:transform(E, Options), Options).
@@ -163,8 +159,8 @@ module_1(E, Options) ->
throw(error)
end,
S0 = init(M),
- S1 = s__set_pmatch(proplists:get_value(pmatch, Options), S0),
- S2 = s__set_bitlevel_binaries(proplists:get_value(
+ S1 = s__set_pmatch(proplists:get_value(pmatch, Options), S0),
+ S2 = s__set_bitlevel_binaries(proplists:get_value(
bitlevel_binaries, Options), S1),
{Icode, _} = lists:mapfoldl(fun function_definition/2,
S2, cerl:module_defs(E)),
diff --git a/lib/hipe/cerl/cerl_typean.erl b/lib/hipe/cerl/cerl_typean.erl
index ccd8903658..f694c07c82 100644
--- a/lib/hipe/cerl/cerl_typean.erl
+++ b/lib/hipe/cerl/cerl_typean.erl
@@ -2,7 +2,7 @@
%%
%% %CopyrightBegin%
%%
-%% Copyright Ericsson AB 2003-2009. All Rights Reserved.
+%% Copyright Ericsson AB 2003-2014. 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
@@ -242,7 +242,7 @@ delete_ann(_, []) ->
-type labelset() :: ordset(label()).
-type outlist() :: [labelset()] | 'none'.
--spec analyze(cerl:cerl()) -> {outlist(), dict(), dict()}.
+-spec analyze(cerl:cerl()) -> {outlist(), dict:dict(), dict:dict()}.
analyze(Tree) ->
analyze(Tree, ?DEF_LIMIT).
diff --git a/lib/hipe/cerl/erl_bif_types.erl b/lib/hipe/cerl/erl_bif_types.erl
index 42c7e360c1..a460f16272 100644
--- a/lib/hipe/cerl/erl_bif_types.erl
+++ b/lib/hipe/cerl/erl_bif_types.erl
@@ -30,19 +30,17 @@
%-define(BITS, (hipe_rtl_arch:word_size() * 8) - ?TAG_IMMED1_SIZE).
-define(BITS, 128). %This is only in bsl to convert answer to pos_inf/neg_inf.
--define(TAG_IMMED1_SIZE, 4).
+-export([type/3, type/4, type/5, arg_types/3,
+ is_known/3, opaque_args/5, infinity_add/2]).
--export([type/3, type/4, arg_types/3,
- is_known/3, structure_inspecting_args/3, infinity_add/2]).
-
--import(erl_types, [number_max/1,
- number_min/1,
+-import(erl_types, [number_max/2,
+ number_min/2,
t_any/0,
t_arity/0,
t_atom/0,
t_atom/1,
t_atoms/1,
- t_atom_vals/1,
+ t_atom_vals/2,
t_binary/0,
t_bitstr/0,
t_boolean/0,
@@ -60,10 +58,11 @@
t_from_term/1,
t_fun/0,
t_fun/2,
- t_fun_args/1,
- t_fun_range/1,
+ t_fun_args/2,
+ t_fun_range/2,
t_identifier/0,
- t_inf/2,
+ t_has_opaque_subtype/2,
+ t_inf/3,
t_integer/0,
t_integer/1,
t_non_neg_fixnum/0,
@@ -71,30 +70,28 @@
t_pos_integer/0,
t_integers/1,
t_is_any/1,
- t_is_atom/1,
- t_is_binary/1,
- t_is_bitstr/1,
- t_is_boolean/1,
- t_is_cons/1,
- t_is_float/1,
- t_is_float/1,
- t_is_fun/1,
- t_is_integer/1,
- t_is_integer/1,
- t_is_nil/1,
+ t_is_atom/2,
+ t_is_binary/2,
+ t_is_bitstr/2,
+ t_is_boolean/2,
+ t_is_cons/2,
+ t_is_float/2,
+ t_is_fun/2,
+ t_is_integer/2,
+ t_is_nil/1, t_is_nil/2,
t_is_none/1,
t_is_none_or_unit/1,
- t_is_number/1,
- t_is_pid/1,
- t_is_port/1,
- t_is_maybe_improper_list/1,
- t_is_reference/1,
+ t_is_number/2,
+ t_is_pid/2,
+ t_is_port/2,
+ t_is_maybe_improper_list/2,
+ t_is_reference/2,
t_is_string/1,
t_is_subtype/2,
- t_is_tuple/1,
+ t_is_tuple/2,
t_list/0,
t_list/1,
- t_list_elements/1,
+ t_list_elements/2,
t_list_termination/1,
t_mfa/0,
t_module/0,
@@ -104,7 +101,7 @@
t_nonempty_list/0,
t_nonempty_list/1,
t_number/0,
- t_number_vals/1,
+ t_number_vals/2,
t_pid/0,
t_port/0,
t_maybe_improper_list/0,
@@ -115,9 +112,11 @@
t_sup/2,
t_tuple/0,
t_tuple/1,
- t_tuple_args/1,
- t_tuple_size/1,
- t_tuple_subtypes/1
+ t_tuple_args/2,
+ t_tuple_size/2,
+ t_tuple_subtypes/2,
+ t_is_map/2,
+ t_map/0
]).
-ifdef(DO_ERL_BIF_TYPES_TEST).
@@ -129,47 +128,61 @@
-spec type(atom(), atom(), arity()) -> erl_types:erl_type().
type(M, F, A) ->
- type(M, F, A, any_list(A)).
+ type(M, F, A, any_list(A), []).
%% Arguments should be checked for undefinedness, so we do not make
%% unnecessary overapproximations.
-spec type(atom(), atom(), arity(), [erl_types:erl_type()]) -> erl_types:erl_type().
+type(M, F, A, Xs) ->
+ type(M, F, A, Xs, 'universe').
+
+-type opaques() :: 'universe' | [erl_types:erl_type()].
+
+-type arg_types() :: [erl_types:erl_type()].
+
+-spec type(atom(), atom(), arity(), arg_types(), opaques()) ->
+ erl_types:erl_type().
+
%%-- erlang -------------------------------------------------------------------
-type(erlang, halt, 0, _) -> t_none();
-type(erlang, halt, 1, _) -> t_none();
-type(erlang, halt, 2, _) -> t_none();
-type(erlang, exit, 1, _) -> t_none();
-type(erlang, error, 1, _) -> t_none();
-type(erlang, error, 2, _) -> t_none();
-type(erlang, throw, 1, _) -> t_none();
-type(erlang, '==', 2, Xs = [X1, X2]) ->
- case t_is_atom(X1) andalso t_is_atom(X2) of
- true -> type(erlang, '=:=', 2, Xs);
+type(erlang, halt, 0, _, _) -> t_none();
+type(erlang, halt, 1, _, _) -> t_none();
+type(erlang, halt, 2, _, _) -> t_none();
+type(erlang, exit, 1, _, _) -> t_none();
+type(erlang, error, 1, _, _) -> t_none();
+type(erlang, error, 2, _, _) -> t_none();
+type(erlang, throw, 1, _, _) -> t_none();
+type(erlang, '==', 2, Xs = [X1, X2], Opaques) ->
+ case
+ t_is_atom(X1, Opaques) andalso t_is_atom(X2, Opaques)
+ of
+ true -> type(erlang, '=:=', 2, Xs, Opaques);
false ->
- case t_is_integer(X1) andalso t_is_integer(X2) of
- true -> type(erlang, '=:=', 2, Xs);
- false -> strict(Xs, t_boolean())
+ case t_is_integer(X1, Opaques) andalso t_is_integer(X2, Opaques) of
+ true -> type(erlang, '=:=', 2, Xs, Opaques);
+ false -> strict2(Xs, t_boolean())
end
end;
-type(erlang, '/=', 2, Xs = [X1, X2]) ->
- case t_is_atom(X1) andalso t_is_atom(X2) of
- true -> type(erlang, '=/=', 2, Xs);
+type(erlang, '/=', 2, Xs = [X1, X2], Opaques) ->
+ case
+ t_is_atom(X1, Opaques) andalso t_is_atom(X2, Opaques)
+ of
+ true -> type(erlang, '=/=', 2, Xs, Opaques);
false ->
- case t_is_integer(X1) andalso t_is_integer(X2) of
- true -> type(erlang, '=/=', 2, Xs);
- false -> strict(Xs, t_boolean())
+ case t_is_integer(X1, Opaques) andalso t_is_integer(X2, Opaques) of
+ true -> type(erlang, '=/=', 2, Xs, Opaques);
+ false -> strict2(Xs, t_boolean())
end
end;
-type(erlang, '=:=', 2, Xs = [Lhs, Rhs]) ->
+type(erlang, '=:=', 2, Xs = [Lhs, Rhs], Opaques) ->
Ans =
- case t_is_none(t_inf(Lhs, Rhs)) of
+ case t_is_none(t_inf(Lhs, Rhs, Opaques)) of
true -> t_atom('false');
false ->
- case t_is_atom(Lhs) andalso t_is_atom(Rhs) of
+ case t_is_atom(Lhs, Opaques) andalso t_is_atom(Rhs, Opaques) of
true ->
- case {t_atom_vals(Lhs), t_atom_vals(Rhs)} of
+ case {t_atom_vals(Lhs, Opaques), t_atom_vals(Rhs, Opaques)} of
{unknown, _} -> t_boolean();
{_, unknown} -> t_boolean();
{[X], [X]} -> t_atom('true');
@@ -181,16 +194,20 @@ type(erlang, '=:=', 2, Xs = [Lhs, Rhs]) ->
end
end;
false ->
- case t_is_integer(Lhs) andalso t_is_integer(Rhs) of
+ case
+ t_is_integer(Lhs, Opaques) andalso t_is_integer(Rhs, Opaques)
+ of
false -> t_boolean();
true ->
- case {t_number_vals(Lhs), t_number_vals(Rhs)} of
+ case
+ {t_number_vals(Lhs, Opaques), t_number_vals(Rhs, Opaques)}
+ of
{[X], [X]} when is_integer(X) -> t_atom('true');
_ ->
- LhsMax = number_max(Lhs),
- LhsMin = number_min(Lhs),
- RhsMax = number_max(Rhs),
- RhsMin = number_min(Rhs),
+ LhsMax = number_max(Lhs, Opaques),
+ LhsMin = number_min(Lhs, Opaques),
+ RhsMax = number_max(Rhs, Opaques),
+ RhsMin = number_min(Rhs, Opaques),
Ans1 = (is_integer(LhsMin)
andalso is_integer(RhsMax)
andalso (LhsMin > RhsMax)),
@@ -205,15 +222,15 @@ type(erlang, '=:=', 2, Xs = [Lhs, Rhs]) ->
end
end
end,
- strict(Xs, Ans);
-type(erlang, '=/=', 2, Xs = [Lhs, Rhs]) ->
+ strict2(Xs, Ans);
+type(erlang, '=/=', 2, Xs = [Lhs, Rhs], Opaques) ->
Ans =
- case t_is_none(t_inf(Lhs, Rhs)) of
+ case t_is_none(t_inf(Lhs, Rhs, Opaques)) of
true -> t_atom('true');
false ->
- case t_is_atom(Lhs) andalso t_is_atom(Rhs) of
+ case t_is_atom(Lhs, Opaques) andalso t_is_atom(Rhs, Opaques) of
true ->
- case {t_atom_vals(Lhs), t_atom_vals(Rhs)} of
+ case {t_atom_vals(Lhs, Opaques), t_atom_vals(Rhs, Opaques)} of
{unknown, _} -> t_boolean();
{_, unknown} -> t_boolean();
{[Val], [Val]} -> t_atom('false');
@@ -221,13 +238,15 @@ type(erlang, '=/=', 2, Xs = [Lhs, Rhs]) ->
t_sup([t_from_term(X =/= Y) || X <- LhsVals, Y <- RhsVals])
end;
false ->
- case t_is_integer(Lhs) andalso t_is_integer(Rhs) of
+ case
+ t_is_integer(Lhs, Opaques) andalso t_is_integer(Rhs, Opaques)
+ of
false -> t_boolean();
true ->
- LhsMax = number_max(Lhs),
- LhsMin = number_min(Lhs),
- RhsMax = number_max(Rhs),
- RhsMin = number_min(Rhs),
+ LhsMax = number_max(Lhs, Opaques),
+ LhsMin = number_min(Lhs, Opaques),
+ RhsMax = number_max(Rhs, Opaques),
+ RhsMin = number_min(Rhs, Opaques),
Ans1 = (is_integer(LhsMin) andalso is_integer(RhsMax)
andalso (LhsMin > RhsMax)),
Ans2 = (is_integer(LhsMax) andalso is_integer(RhsMin)
@@ -244,15 +263,15 @@ type(erlang, '=/=', 2, Xs = [Lhs, Rhs]) ->
end
end
end,
- strict(Xs, Ans);
-type(erlang, '>', 2, Xs = [Lhs, Rhs]) ->
+ strict2(Xs, Ans);
+type(erlang, '>', 2, Xs = [Lhs, Rhs], Opaques) ->
Ans =
- case t_is_integer(Lhs) andalso t_is_integer(Rhs) of
+ case t_is_integer(Lhs, Opaques) andalso t_is_integer(Rhs, Opaques) of
true ->
- LhsMax = number_max(Lhs),
- LhsMin = number_min(Lhs),
- RhsMax = number_max(Rhs),
- RhsMin = number_min(Rhs),
+ LhsMax = number_max(Lhs, Opaques),
+ LhsMin = number_min(Lhs, Opaques),
+ RhsMax = number_max(Rhs, Opaques),
+ RhsMin = number_min(Rhs, Opaques),
T = t_atom('true'),
F = t_atom('false'),
if
@@ -260,17 +279,17 @@ type(erlang, '>', 2, Xs = [Lhs, Rhs]) ->
is_integer(LhsMax), is_integer(RhsMin), RhsMin >= LhsMax -> F;
true -> t_boolean()
end;
- false -> compare('>', Lhs, Rhs)
+ false -> compare('>', Lhs, Rhs, Opaques)
end,
- strict(Xs, Ans);
-type(erlang, '>=', 2, Xs = [Lhs, Rhs]) ->
+ strict2(Xs, Ans);
+type(erlang, '>=', 2, Xs = [Lhs, Rhs], Opaques) ->
Ans =
- case t_is_integer(Lhs) andalso t_is_integer(Rhs) of
+ case t_is_integer(Lhs, Opaques) andalso t_is_integer(Rhs, Opaques) of
true ->
- LhsMax = number_max(Lhs),
- LhsMin = number_min(Lhs),
- RhsMax = number_max(Rhs),
- RhsMin = number_min(Rhs),
+ LhsMax = number_max(Lhs, Opaques),
+ LhsMin = number_min(Lhs, Opaques),
+ RhsMax = number_max(Rhs, Opaques),
+ RhsMin = number_min(Rhs, Opaques),
T = t_atom('true'),
F = t_atom('false'),
if
@@ -278,17 +297,17 @@ type(erlang, '>=', 2, Xs = [Lhs, Rhs]) ->
is_integer(LhsMax), is_integer(RhsMin), RhsMin > LhsMax -> F;
true -> t_boolean()
end;
- false -> compare('>=', Lhs, Rhs)
+ false -> compare('>=', Lhs, Rhs, Opaques)
end,
- strict(Xs, Ans);
-type(erlang, '<', 2, Xs = [Lhs, Rhs]) ->
+ strict2(Xs, Ans);
+type(erlang, '<', 2, Xs = [Lhs, Rhs], Opaques) ->
Ans =
- case t_is_integer(Lhs) andalso t_is_integer(Rhs) of
+ case t_is_integer(Lhs, Opaques) andalso t_is_integer(Rhs, Opaques) of
true ->
- LhsMax = number_max(Lhs),
- LhsMin = number_min(Lhs),
- RhsMax = number_max(Rhs),
- RhsMin = number_min(Rhs),
+ LhsMax = number_max(Lhs, Opaques),
+ LhsMin = number_min(Lhs, Opaques),
+ RhsMax = number_max(Rhs, Opaques),
+ RhsMin = number_min(Rhs, Opaques),
T = t_atom('true'),
F = t_atom('false'),
if
@@ -296,17 +315,17 @@ type(erlang, '<', 2, Xs = [Lhs, Rhs]) ->
is_integer(LhsMin), is_integer(RhsMax), RhsMax =< LhsMin -> F;
true -> t_boolean()
end;
- false -> compare('<', Lhs, Rhs)
+ false -> compare('<', Lhs, Rhs, Opaques)
end,
- strict(Xs, Ans);
-type(erlang, '=<', 2, Xs = [Lhs, Rhs]) ->
+ strict2(Xs, Ans);
+type(erlang, '=<', 2, Xs = [Lhs, Rhs], Opaques) ->
Ans =
- case t_is_integer(Lhs) andalso t_is_integer(Rhs) of
+ case t_is_integer(Lhs, Opaques) andalso t_is_integer(Rhs, Opaques) of
true ->
- LhsMax = number_max(Lhs),
- LhsMin = number_min(Lhs),
- RhsMax = number_max(Rhs),
- RhsMin = number_min(Rhs),
+ LhsMax = number_max(Lhs, Opaques),
+ LhsMin = number_min(Lhs, Opaques),
+ RhsMax = number_max(Rhs, Opaques),
+ RhsMin = number_min(Rhs, Opaques),
T = t_atom('true'),
F = t_atom('false'),
if
@@ -314,232 +333,237 @@ type(erlang, '=<', 2, Xs = [Lhs, Rhs]) ->
is_integer(LhsMin), is_integer(RhsMax), RhsMax < LhsMin -> F;
true -> t_boolean()
end;
- false -> compare('=<', Lhs, Rhs)
+ false -> compare('=<', Lhs, Rhs, Opaques)
end,
- strict(Xs, Ans);
-type(erlang, '+', 1, Xs) ->
- strict(arg_types(erlang, '+', 1), Xs,
- fun ([X]) -> X end);
-type(erlang, '-', 1, Xs) ->
- strict(arg_types(erlang, '-', 1), Xs,
+ strict2(Xs, Ans);
+type(erlang, '+', 1, Xs, Opaques) ->
+ strict(erlang, '+', 1, Xs, fun ([X]) -> X end, Opaques);
+type(erlang, '-', 1, Xs, Opaques) ->
+ strict(erlang, '-', 1, Xs,
fun ([X]) ->
- case t_is_integer(X) of
+ case t_is_integer(X, Opaques) of
true -> type(erlang, '-', 2, [t_integer(0), X]);
false -> X
end
- end);
-type(erlang, '!', 2, Xs) ->
- strict(arg_types(erlang, '!', 2), Xs, fun ([_, X2]) -> X2 end);
-type(erlang, '+', 2, Xs) ->
- strict(arg_types(erlang, '+', 2), Xs,
+ end, Opaques);
+type(erlang, '!', 2, Xs, Opaques) ->
+ strict(erlang, '!', 2, Xs, fun ([_, X2]) -> X2 end, Opaques);
+type(erlang, '+', 2, Xs, Opaques) ->
+ strict(erlang, '+', 2, Xs,
fun ([X1, X2]) ->
- case arith('+', X1, X2) of
+ case arith('+', X1, X2, Opaques) of
{ok, T} -> T;
error ->
- case t_is_float(X1) orelse t_is_float(X2) of
+ case
+ t_is_float(X1, Opaques) orelse t_is_float(X2, Opaques)
+ of
true -> t_float();
false -> t_number()
end
end
- end);
-type(erlang, '-', 2, Xs) ->
- strict(arg_types(erlang, '-', 2), Xs,
+ end, Opaques);
+type(erlang, '-', 2, Xs, Opaques) ->
+ strict(erlang, '-', 2, Xs,
fun ([X1, X2]) ->
- case arith('-', X1, X2) of
+ case arith('-', X1, X2, Opaques) of
{ok, T} -> T;
error ->
- case t_is_float(X1) orelse t_is_float(X2) of
+ case
+ t_is_float(X1, Opaques) orelse t_is_float(X2, Opaques)
+ of
true -> t_float();
false -> t_number()
end
end
- end);
-type(erlang, '*', 2, Xs) ->
- strict(arg_types(erlang, '*', 2), Xs,
+ end, Opaques);
+type(erlang, '*', 2, Xs, Opaques) ->
+ strict(erlang, '*', 2, Xs,
fun ([X1, X2]) ->
- case arith('*', X1, X2) of
+ case arith('*', X1, X2, Opaques) of
{ok, T} -> T;
error ->
- case t_is_float(X1) orelse t_is_float(X2) of
+ case
+ t_is_float(X1, Opaques) orelse t_is_float(X2, Opaques)
+ of
true -> t_float();
false -> t_number()
end
end
- end);
-type(erlang, '/', 2, Xs) ->
- strict(arg_types(erlang, '/', 2), Xs,
- fun (_) -> t_float() end);
-type(erlang, 'div', 2, Xs) ->
- strict(arg_types(erlang, 'div', 2), Xs,
+ end, Opaques);
+type(erlang, '/', 2, Xs, Opaques) ->
+ strict(erlang, '/', 2, Xs, fun (_) -> t_float() end, Opaques);
+type(erlang, 'div', 2, Xs, Opaques) ->
+ strict(erlang, 'div', 2, Xs,
fun ([X1, X2]) ->
- case arith('div', X1, X2) of
+ case arith('div', X1, X2, Opaques) of
error -> t_integer();
{ok, T} -> T
end
- end);
-type(erlang, 'rem', 2, Xs) ->
- strict(arg_types(erlang, 'rem', 2), Xs,
+ end, Opaques);
+type(erlang, 'rem', 2, Xs, Opaques) ->
+ strict(erlang, 'rem', 2, Xs,
fun ([X1, X2]) ->
- case arith('rem', X1, X2) of
+ case arith('rem', X1, X2, Opaques) of
error -> t_non_neg_integer();
{ok, T} -> T
end
- end);
-type(erlang, '++', 2, Xs) ->
- strict(arg_types(erlang, '++', 2), Xs,
+ end, Opaques);
+type(erlang, '++', 2, Xs, Opaques) ->
+ strict(erlang, '++', 2, Xs,
fun ([X1, X2]) ->
- case t_is_nil(X1) of
+ case t_is_nil(X1, Opaques) of
true -> X2; % even if X2 is not a list
false ->
- case t_is_nil(X2) of
+ case t_is_nil(X2, Opaques) of
true -> X1;
false ->
- E1 = t_list_elements(X1),
- case t_is_cons(X1) of
+ E1 = t_list_elements(X1, Opaques),
+ case t_is_cons(X1, Opaques) of
true -> t_cons(E1, X2);
false ->
t_sup(X2, t_cons(E1, X2))
end
end
end
- end);
-type(erlang, '--', 2, Xs) ->
+ end, Opaques);
+type(erlang, '--', 2, Xs, Opaques) ->
%% We don't know which elements (if any) in X2 will be found and
%% removed from X1, even if they would have the same type. Thus, we
%% must assume that X1 can remain unchanged. However, if we succeed,
%% we know that X1 must be a proper list, but the result could
%% possibly be empty even if X1 is nonempty.
- strict(arg_types(erlang, '--', 2), Xs,
+ strict(erlang, '--', 2, Xs,
fun ([X1, X2]) ->
- case t_is_nil(X1) of
+ case t_is_nil(X1, Opaques) of
true -> t_nil();
false ->
- case t_is_nil(X2) of
+ case t_is_nil(X2, Opaques) of
true -> X1;
- false -> t_list(t_list_elements(X1))
+ false -> t_list(t_list_elements(X1, Opaques))
end
end
- end);
-type(erlang, 'and', 2, Xs) ->
- strict(arg_types(erlang, 'and', 2), Xs, fun (_) -> t_boolean() end);
-type(erlang, 'or', 2, Xs) ->
- strict(arg_types(erlang, 'or', 2), Xs, fun (_) -> t_boolean() end);
-type(erlang, 'xor', 2, Xs) ->
- strict(arg_types(erlang, 'xor', 2), Xs, fun (_) -> t_boolean() end);
-type(erlang, 'not', 1, Xs) ->
- strict(arg_types(erlang, 'not', 1), Xs, fun (_) -> t_boolean() end);
-type(erlang, 'band', 2, Xs) ->
- strict(arg_types(erlang, 'band', 2), Xs,
+ end, Opaques);
+type(erlang, 'and', 2, Xs, Opaques) ->
+ strict(erlang, 'and', 2, Xs, fun (_) -> t_boolean() end, Opaques);
+type(erlang, 'or', 2, Xs, Opaques) ->
+ strict(erlang, 'or', 2, Xs, fun (_) -> t_boolean() end, Opaques);
+type(erlang, 'xor', 2, Xs, Opaques) ->
+ strict(erlang, 'xor', 2, Xs, fun (_) -> t_boolean() end, Opaques);
+type(erlang, 'not', 1, Xs, Opaques) ->
+ strict(erlang, 'not', 1, Xs, fun (_) -> t_boolean() end, Opaques);
+type(erlang, 'band', 2, Xs, Opaques) ->
+ strict(erlang, 'band', 2, Xs,
fun ([X1, X2]) ->
- case arith('band', X1, X2) of
+ case arith('band', X1, X2, Opaques) of
error -> t_integer();
{ok, T} -> T
end
- end);
+ end, Opaques);
%% The result is not wider than the smallest argument. We need to
%% kill any value-sets in the result.
-%% strict(arg_types(erlang, 'band', 2), Xs,
-%% fun ([X1, X2]) -> t_sup(t_inf(X1, X2), t_byte()) end);
-type(erlang, 'bor', 2, Xs) ->
- strict(arg_types(erlang, 'bor', 2), Xs,
+%% strict(erlang, 'band', 2, Xs,
+%% fun ([X1, X2]) -> t_sup(t_inf(X1, X2, Opaques), t_byte()) end, Opaques);
+type(erlang, 'bor', 2, Xs, Opaques) ->
+ strict(erlang, 'bor', 2, Xs,
fun ([X1, X2]) ->
- case arith('bor', X1, X2) of
+ case arith('bor', X1, X2, Opaques) of
error -> t_integer();
{ok, T} -> T
end
- end);
+ end, Opaques);
%% The result is not wider than the largest argument. We need to
%% kill any value-sets in the result.
-%% strict(arg_types(erlang, 'bor', 2), Xs,
-%% fun ([X1, X2]) -> t_sup(t_sup(X1, X2), t_byte()) end);
-type(erlang, 'bxor', 2, Xs) ->
- strict(arg_types(erlang, 'bxor', 2), Xs,
+%% strict(erlang, 'bor', 2, Xs,
+%% fun ([X1, X2]) -> t_sup(t_sup(X1, X2), t_byte()) end, Opaques);
+type(erlang, 'bxor', 2, Xs, Opaques) ->
+ strict(erlang, 'bxor', 2, Xs,
fun ([X1, X2]) ->
- case arith('bxor', X1, X2) of
+ case arith('bxor', X1, X2, Opaques) of
error -> t_integer();
{ok, T} -> T
end
- end);
+ end, Opaques);
%% The result is not wider than the largest argument. We need to
%% kill any value-sets in the result.
-%% strict(arg_types(erlang, 'bxor', 2), Xs,
-%% fun ([X1, X2]) -> t_sup(t_sup(X1, X2), t_byte()) end);
-type(erlang, 'bsr', 2, Xs) ->
- strict(arg_types(erlang, 'bsr', 2), Xs,
+%% strict(erlang, 'bxor', 2, Xs,
+%% fun ([X1, X2]) -> t_sup(t_sup(X1, X2), t_byte()) end, Opaques);
+type(erlang, 'bsr', 2, Xs, Opaques) ->
+ strict(erlang, 'bsr', 2, Xs,
fun ([X1, X2]) ->
- case arith('bsr', X1, X2) of
+ case arith('bsr', X1, X2, Opaques) of
error -> t_integer();
{ok, T} -> T
end
- end);
+ end, Opaques);
%% If the first argument is unsigned (which is the case for
%% characters and bytes), the result is never wider. We need to kill
%% any value-sets in the result.
-%% strict(arg_types(erlang, 'bsr', 2), Xs,
-%% fun ([X, _]) -> t_sup(X, t_byte()) end);
-type(erlang, 'bsl', 2, Xs) ->
- strict(arg_types(erlang, 'bsl', 2), Xs,
+%% strict(erlang, 'bsr', 2, Xs,
+%% fun ([X, _]) -> t_sup(X, t_byte()) end, Opaques);
+type(erlang, 'bsl', 2, Xs, Opaques) ->
+ strict(erlang, 'bsl', 2, Xs,
fun ([X1, X2]) ->
- case arith('bsl', X1, X2) of
+ case arith('bsl', X1, X2, Opaques) of
error -> t_integer();
{ok, T} -> T
end
- end);
+ end, Opaques);
%% Not worth doing anything special here.
-%% strict(arg_types(erlang, 'bsl', 2), Xs, fun (_) -> t_integer() end);
-type(erlang, 'bnot', 1, Xs) ->
- strict(arg_types(erlang, 'bnot', 1), Xs,
+%% strict(erlang, 'bsl', 2, Xs, fun (_) -> t_integer() end, Opaques);
+type(erlang, 'bnot', 1, Xs, Opaques) ->
+ strict(erlang, 'bnot', 1, Xs,
fun ([X1]) ->
- case arith('bnot', X1) of
+ case arith('bnot', X1, Opaques) of
error -> t_integer();
{ok, T} -> T
end
- end);
+ end, Opaques);
%% Guard bif, needs to be here.
-type(erlang, abs, 1, Xs) ->
- strict(arg_types(erlang, abs, 1), Xs, fun ([X]) -> X end);
+type(erlang, abs, 1, Xs, Opaques) ->
+ strict(erlang, abs, 1, Xs, fun ([X]) -> X end, Opaques);
%% This returns (-X)-1, so it often gives a negative result.
-%% strict(arg_types(erlang, 'bnot', 1), Xs, fun (_) -> t_integer() end);
-type(erlang, append, 2, Xs) -> type(erlang, '++', 2, Xs); % alias
-type(erlang, apply, 2, Xs) ->
+%% strict(erlang, 'bnot', 1, Xs, fun (_) -> t_integer() end, Opaques);
+type(erlang, append, 2, Xs, _Opaques) -> type(erlang, '++', 2, Xs); % alias
+type(erlang, apply, 2, Xs, Opaques) ->
Fun = fun ([X, _Y]) ->
- case t_is_fun(X) of
+ case t_is_fun(X, Opaques) of
true ->
- t_fun_range(X);
+ t_fun_range(X, Opaques);
false ->
t_any()
end
end,
- strict(arg_types(erlang, apply, 2), Xs, Fun);
-type(erlang, apply, 3, Xs) ->
- strict(arg_types(erlang, apply, 3), Xs, fun (_) -> t_any() end);
+ strict(erlang, apply, 2, Xs, Fun, Opaques);
+type(erlang, apply, 3, Xs, Opaques) ->
+ strict(erlang, apply, 3, Xs, fun (_) -> t_any() end, Opaques);
%% Guard bif, needs to be here.
-type(erlang, binary_part, 2, Xs) ->
- strict(arg_types(erlang, binary_part, 2), Xs, fun (_) -> t_binary() end);
+type(erlang, binary_part, 2, Xs, Opaques) ->
+ strict(erlang, binary_part, 2, Xs, fun (_) -> t_binary() end, Opaques);
%% Guard bif, needs to be here.
-type(erlang, binary_part, 3, Xs) ->
- strict(arg_types(erlang, binary_part, 3), Xs, fun (_) -> t_binary() end);
+type(erlang, binary_part, 3, Xs, Opaques) ->
+ strict(erlang, binary_part, 3, Xs, fun (_) -> t_binary() end, Opaques);
%% Guard bif, needs to be here.
-type(erlang, bit_size, 1, Xs) ->
- strict(arg_types(erlang, bit_size, 1), Xs,
- fun (_) -> t_non_neg_integer() end);
+type(erlang, bit_size, 1, Xs, Opaques) ->
+ strict(erlang, bit_size, 1, Xs,
+ fun (_) -> t_non_neg_integer() end, Opaques);
%% Guard bif, needs to be here.
-type(erlang, byte_size, 1, Xs) ->
- strict(arg_types(erlang, byte_size, 1), Xs,
- fun (_) -> t_non_neg_integer() end);
-type(erlang, disconnect_node, 1, Xs) ->
- strict(arg_types(erlang, disconnect_node, 1), Xs, fun (_) -> t_sup([t_boolean(), t_atom('ignored')]) end);
+type(erlang, byte_size, 1, Xs, Opaques) ->
+ strict(erlang, byte_size, 1, Xs,
+ fun (_) -> t_non_neg_integer() end, Opaques);
+type(erlang, disconnect_node, 1, Xs, Opaques) ->
+ strict(erlang, disconnect_node, 1, Xs,
+ fun (_) -> t_sup([t_boolean(), t_atom('ignored')]) end, Opaques);
%% Guard bif, needs to be here.
%% Also much more expressive than anything you could write in a spec...
-type(erlang, element, 2, Xs) ->
- strict(arg_types(erlang, element, 2), Xs,
+type(erlang, element, 2, Xs, Opaques) ->
+ strict(erlang, element, 2, Xs,
fun ([X1, X2]) ->
- case t_tuple_subtypes(X2) of
+ case t_tuple_subtypes(X2, Opaques) of
unknown -> t_any();
[_] ->
- Sz = t_tuple_size(X2),
- As = t_tuple_args(X2),
- case t_number_vals(X1) of
+ Sz = t_tuple_size(X2, Opaques),
+ As = t_tuple_args(X2, Opaques),
+ case t_number_vals(X1, Opaques) of
unknown -> t_sup(As);
Ns when is_list(Ns) ->
Fun = fun
@@ -553,165 +577,166 @@ type(erlang, element, 2, Xs) ->
Ts when is_list(Ts) ->
t_sup([type(erlang, element, 2, [X1, Y]) || Y <- Ts])
end
- end);
+ end, Opaques);
%% Guard bif, needs to be here.
-type(erlang, float, 1, Xs) ->
- strict(arg_types(erlang, float, 1), Xs, fun (_) -> t_float() end);
-type(erlang, fun_info, 1, Xs) ->
- strict(arg_types(erlang, fun_info, 1), Xs,
- fun (_) -> t_list(t_tuple([t_atom(), t_any()])) end);
-type(erlang, get_cookie, 0, _) -> t_atom(); % | t_atom('nocookie')
+type(erlang, float, 1, Xs, Opaques) ->
+ strict(erlang, float, 1, Xs, fun (_) -> t_float() end, Opaques);
+type(erlang, fun_info, 1, Xs, Opaques) ->
+ strict(erlang, fun_info, 1, Xs,
+ fun (_) -> t_list(t_tuple([t_atom(), t_any()])) end, Opaques);
+type(erlang, get_cookie, 0, _, _Opaques) -> t_atom(); % | t_atom('nocookie')
%% Guard bif, needs to be here.
-type(erlang, hd, 1, Xs) ->
- strict(arg_types(erlang, hd, 1), Xs, fun ([X]) -> t_cons_hd(X) end);
-type(erlang, integer_to_list, 2, Xs) ->
- strict(arg_types(erlang, integer_to_list, 2), Xs,
- fun (_) -> t_string() end);
-type(erlang, info, 1, Xs) -> type(erlang, system_info, 1, Xs); % alias
+type(erlang, hd, 1, Xs, Opaques) ->
+ strict(erlang, hd, 1, Xs, fun ([X]) -> t_cons_hd(X) end, Opaques);
+type(erlang, integer_to_list, 2, Xs, Opaques) ->
+ strict(erlang, integer_to_list, 2, Xs,
+ fun (_) -> t_string() end, Opaques);
+type(erlang, info, 1, Xs, _) -> type(erlang, system_info, 1, Xs); % alias
%% All type tests are guard BIF's and may be implemented in ways that
%% cannot be expressed in a type spec, why they are kept in erl_bif_types.
-type(erlang, is_atom, 1, Xs) ->
- Fun = fun (X) -> check_guard(X, fun (Y) -> t_is_atom(Y) end, t_atom()) end,
- strict(arg_types(erlang, is_atom, 1), Xs, Fun);
-type(erlang, is_binary, 1, Xs) ->
+type(erlang, is_atom, 1, Xs, Opaques) ->
Fun = fun (X) ->
- check_guard(X, fun (Y) -> t_is_binary(Y) end, t_binary())
+ check_guard(X, fun (Y) -> t_is_atom(Y, Opaques) end,
+ t_atom(), Opaques)
+ end,
+ strict(erlang, is_atom, 1, Xs, Fun, Opaques);
+type(erlang, is_binary, 1, Xs, Opaques) ->
+ Fun = fun (X) ->
+ check_guard(X, fun (Y) -> t_is_binary(Y, Opaques) end,
+ t_binary(), Opaques)
end,
- strict(arg_types(erlang, is_binary, 1), Xs, Fun);
-type(erlang, is_bitstring, 1, Xs) ->
+ strict(erlang, is_binary, 1, Xs, Fun, Opaques);
+type(erlang, is_bitstring, 1, Xs, Opaques) ->
Fun = fun (X) ->
- check_guard(X, fun (Y) -> t_is_bitstr(Y) end, t_bitstr())
+ check_guard(X, fun (Y) -> t_is_bitstr(Y, Opaques) end,
+ t_bitstr(), Opaques)
end,
- strict(arg_types(erlang, is_bitstring, 1), Xs, Fun);
-type(erlang, is_boolean, 1, Xs) ->
+ strict(erlang, is_bitstring, 1, Xs, Fun, Opaques);
+type(erlang, is_boolean, 1, Xs, Opaques) ->
Fun = fun (X) ->
- check_guard(X, fun (Y) -> t_is_boolean(Y) end, t_boolean())
+ check_guard(X, fun (Y) -> t_is_boolean(Y, Opaques) end,
+ t_boolean(), Opaques)
end,
- strict(arg_types(erlang, is_boolean, 1), Xs, Fun);
-type(erlang, is_float, 1, Xs) ->
+ strict(erlang, is_boolean, 1, Xs, Fun, Opaques);
+type(erlang, is_float, 1, Xs, Opaques) ->
Fun = fun (X) ->
- check_guard(X, fun (Y) -> t_is_float(Y) end, t_float())
+ check_guard(X, fun (Y) -> t_is_float(Y, Opaques) end,
+ t_float(), Opaques)
end,
- strict(arg_types(erlang, is_float, 1), Xs, Fun);
-type(erlang, is_function, 1, Xs) ->
- Fun = fun (X) -> check_guard(X, fun (Y) -> t_is_fun(Y) end, t_fun()) end,
- strict(arg_types(erlang, is_function, 1), Xs, Fun);
-type(erlang, is_function, 2, Xs) ->
+ strict(erlang, is_float, 1, Xs, Fun, Opaques);
+type(erlang, is_function, 1, Xs, Opaques) ->
+ Fun = fun (X) ->
+ check_guard(X, fun (Y) -> t_is_fun(Y, Opaques) end,
+ t_fun(), Opaques)
+ end,
+ strict(erlang, is_function, 1, Xs, Fun, Opaques);
+type(erlang, is_function, 2, Xs, Opaques) ->
Fun = fun ([FunType, ArityType]) ->
- case t_number_vals(ArityType) of
+ case t_number_vals(ArityType, Opaques) of
unknown -> t_boolean();
[Val] ->
FunConstr = t_fun(any_list(Val), t_any()),
Fun2 = fun (X) ->
t_is_subtype(X, FunConstr) andalso (not t_is_none(X))
end,
- check_guard_single(FunType, Fun2, FunConstr);
+ check_guard_single(FunType, Fun2, FunConstr, Opaques);
IntList when is_list(IntList) -> t_boolean() %% true?
end
end,
- strict(arg_types(erlang, is_function, 2), Xs, Fun);
-type(erlang, is_integer, 1, Xs) ->
+ strict(erlang, is_function, 2, Xs, Fun, Opaques);
+type(erlang, is_integer, 1, Xs, Opaques) ->
Fun = fun (X) ->
- check_guard(X, fun (Y) -> t_is_integer(Y) end, t_integer())
+ check_guard(X, fun (Y) -> t_is_integer(Y, Opaques) end,
+ t_integer(), Opaques)
end,
- strict(arg_types(erlang, is_integer, 1), Xs, Fun);
-type(erlang, is_list, 1, Xs) ->
+ strict(erlang, is_integer, 1, Xs, Fun, Opaques);
+type(erlang, is_list, 1, Xs, Opaques) ->
Fun = fun (X) ->
- Fun2 = fun (Y) -> t_is_maybe_improper_list(Y) end,
- check_guard(X, Fun2, t_maybe_improper_list())
+ Fun2 = fun (Y) -> t_is_maybe_improper_list(Y, Opaques) end,
+ check_guard(X, Fun2, t_maybe_improper_list(), Opaques)
end,
- strict(arg_types(erlang, is_list, 1), Xs, Fun);
-type(erlang, is_number, 1, Xs) ->
+ strict(erlang, is_list, 1, Xs, Fun, Opaques);
+type(erlang, is_map, 1, Xs, Opaques) ->
+ Fun = fun (X) ->
+ check_guard(X, fun (Y) -> t_is_map(Y, Opaques) end,
+ t_map(), Opaques) end,
+ strict(erlang, is_map, 1, Xs, Fun, Opaques);
+type(erlang, is_number, 1, Xs, Opaques) ->
Fun = fun (X) ->
- check_guard(X, fun (Y) -> t_is_number(Y) end, t_number())
+ check_guard(X, fun (Y) -> t_is_number(Y, Opaques) end,
+ t_number(), Opaques)
end,
- strict(arg_types(erlang, is_number, 1), Xs, Fun);
-type(erlang, is_pid, 1, Xs) ->
- Fun = fun (X) -> check_guard(X, fun (Y) -> t_is_pid(Y) end, t_pid()) end,
- strict(arg_types(erlang, is_pid, 1), Xs, Fun);
-type(erlang, is_port, 1, Xs) ->
- Fun = fun (X) -> check_guard(X, fun (Y) -> t_is_port(Y) end, t_port()) end,
- strict(arg_types(erlang, is_port, 1), Xs, Fun);
-type(erlang, is_record, 2, Xs) ->
+ strict(erlang, is_number, 1, Xs, Fun, Opaques);
+type(erlang, is_pid, 1, Xs, Opaques) ->
+ Fun = fun (X) ->
+ check_guard(X, fun (Y) -> t_is_pid(Y, Opaques) end,
+ t_pid(), Opaques)
+ end,
+ strict(erlang, is_pid, 1, Xs, Fun, Opaques);
+type(erlang, is_port, 1, Xs, Opaques) ->
+ Fun = fun (X) ->
+ check_guard(X, fun (Y) -> t_is_port(Y, Opaques) end,
+ t_port(), Opaques)
+ end,
+ strict(erlang, is_port, 1, Xs, Fun, Opaques);
+type(erlang, is_record, 2, Xs, Opaques) ->
Fun = fun ([X, Y]) ->
- case t_is_tuple(X) of
+ case t_is_tuple(X, Opaques) of
false ->
- case t_is_none(t_inf(t_tuple(), X)) of
- true -> t_atom('false');
+ case t_is_none(t_inf(t_tuple(), X, Opaques)) of
+ true ->
+ case t_has_opaque_subtype(X, Opaques) of
+ true -> t_none();
+ false -> t_atom('false')
+ end;
false -> t_boolean()
end;
true ->
- case t_tuple_subtypes(X) of
+ case t_tuple_subtypes(X, Opaques) of
unknown -> t_boolean();
[Tuple] ->
- case t_tuple_args(Tuple) of
+ case t_tuple_args(Tuple, Opaques) of
%% any -> t_boolean();
- [Tag|_] ->
- case t_is_atom(Tag) of
- false ->
- TagAtom = t_inf(Tag, t_atom()),
- case t_is_none(TagAtom) of
- true -> t_atom('false');
- false -> t_boolean()
- end;
- true ->
- case t_atom_vals(Tag) of
- [RealTag] ->
- case t_atom_vals(Y) of
- [RealTag] -> t_atom('true');
- _ -> t_boolean()
- end;
- _ -> t_boolean()
- end
- end
+ [Tag|_] -> check_record_tag(Tag, Y, Opaques)
end;
List when length(List) >= 2 ->
t_sup([type(erlang, is_record, 2, [T, Y]) || T <- List])
end
end
end,
- strict(arg_types(erlang, is_record, 2), Xs, Fun);
-type(erlang, is_record, 3, Xs) ->
+ strict(erlang, is_record, 2, Xs, Fun, Opaques);
+type(erlang, is_record, 3, Xs, Opaques) ->
Fun = fun ([X, Y, Z]) ->
- Arity = t_number_vals(Z),
- case t_is_tuple(X) of
+ Arity = t_number_vals(Z, Opaques),
+ case t_is_tuple(X, Opaques) of
false when length(Arity) =:= 1 ->
[RealArity] = Arity,
- case t_is_none(t_inf(t_tuple(RealArity), X)) of
- true -> t_atom('false');
+ case t_is_none(t_inf(t_tuple(RealArity), X, Opaques)) of
+ true ->
+ case t_has_opaque_subtype(X, Opaques) of
+ true -> t_none();
+ false -> t_atom('false')
+ end;
false -> t_boolean()
end;
false ->
- case t_is_none(t_inf(t_tuple(), X)) of
- true -> t_atom('false');
+ case t_is_none(t_inf(t_tuple(), X, Opaques)) of
+ true ->
+ case t_has_opaque_subtype(X, Opaques) of
+ true -> t_none();
+ false -> t_atom('false')
+ end;
false -> t_boolean()
end;
true when length(Arity) =:= 1 ->
[RealArity] = Arity,
- case t_tuple_subtypes(X) of
+ case t_tuple_subtypes(X, Opaques) of
unknown -> t_boolean();
[Tuple] ->
- case t_tuple_args(Tuple) of
+ case t_tuple_args(Tuple, Opaques) of
%% any -> t_boolean();
Args when length(Args) =:= RealArity ->
- Tag = hd(Args),
- case t_is_atom(Tag) of
- false ->
- TagAtom = t_inf(Tag, t_atom()),
- case t_is_none(TagAtom) of
- true -> t_atom('false');
- false -> t_boolean()
- end;
- true ->
- case t_atom_vals(Tag) of
- [RealTag] ->
- case t_atom_vals(Y) of
- [RealTag] -> t_atom('true');
- _ -> t_boolean()
- end;
- _ -> t_boolean()
- end
- end;
+ check_record_tag(hd(Args), Y, Opaques);
Args when length(Args) =/= RealArity ->
t_atom('false')
end;
@@ -722,62 +747,69 @@ type(erlang, is_record, 3, Xs) ->
t_boolean()
end
end,
- strict(arg_types(erlang, is_record, 3), Xs, Fun);
-type(erlang, is_reference, 1, Xs) ->
+ strict(erlang, is_record, 3, Xs, Fun, Opaques);
+type(erlang, is_reference, 1, Xs, Opaques) ->
Fun = fun (X) ->
- check_guard(X, fun (Y) -> t_is_reference(Y) end, t_reference())
+ check_guard(X, fun (Y) -> t_is_reference(Y, Opaques) end,
+ t_reference(), Opaques)
end,
- strict(arg_types(erlang, is_reference, 1), Xs, Fun);
-type(erlang, is_tuple, 1, Xs) ->
+ strict(erlang, is_reference, 1, Xs, Fun, Opaques);
+type(erlang, is_tuple, 1, Xs, Opaques) ->
Fun = fun (X) ->
- check_guard(X, fun (Y) -> t_is_tuple(Y) end, t_tuple())
+ check_guard(X, fun (Y) -> t_is_tuple(Y, Opaques) end,
+ t_tuple(), Opaques)
end,
- strict(arg_types(erlang, is_tuple, 1), Xs, Fun);
+ strict(erlang, is_tuple, 1, Xs, Fun, Opaques);
+%% Guard bif, needs to be here.
+type(erlang, length, 1, Xs, Opaques) ->
+ strict(erlang, length, 1, Xs, fun (_) -> t_non_neg_fixnum() end, Opaques);
%% Guard bif, needs to be here.
-type(erlang, length, 1, Xs) ->
- strict(arg_types(erlang, length, 1), Xs, fun (_) -> t_non_neg_fixnum() end);
-type(erlang, make_tuple, 2, Xs) ->
- strict(arg_types(erlang, make_tuple, 2), Xs,
+type(erlang, map_size, 1, Xs, Opaques) ->
+ strict(erlang, map_size, 1, Xs, fun (_) -> t_non_neg_integer() end, Opaques);
+type(erlang, make_tuple, 2, Xs, Opaques) ->
+ strict(erlang, make_tuple, 2, Xs,
fun ([Int, _]) ->
- case t_number_vals(Int) of
+ case t_number_vals(Int, Opaques) of
[N] when is_integer(N), N >= 0 -> t_tuple(N);
_Other -> t_tuple()
end
- end);
-type(erlang, make_tuple, 3, Xs) ->
- strict(arg_types(erlang, make_tuple, 3), Xs,
+ end, Opaques);
+type(erlang, make_tuple, 3, Xs, Opaques) ->
+ strict(erlang, make_tuple, 3, Xs,
fun ([Int, _, _]) ->
- case t_number_vals(Int) of
+ case t_number_vals(Int, Opaques) of
[N] when is_integer(N), N >= 0 -> t_tuple(N);
_Other -> t_tuple()
end
- end);
-type(erlang, memory, 0, _) -> t_list(t_tuple([t_atom(), t_non_neg_fixnum()]));
-type(erlang, nif_error, 1, _) ->
- t_any(); % this BIF and the next one are stubs for NIFs and never return
-type(erlang, nif_error, 2, Xs) ->
- strict(arg_types(erlang, nif_error, 2), Xs, fun (_) -> t_any() end);
+ end, Opaques);
+type(erlang, memory, 0, _, _Opaques) ->
+ t_list(t_tuple([t_atom(), t_non_neg_fixnum()]));
+type(erlang, nif_error, 1, Xs, Opaques) ->
+ %% this BIF and the next one are stubs for NIFs and never return
+ strict(erlang, nif_error, 1, Xs, fun (_) -> t_any() end, Opaques);
+type(erlang, nif_error, 2, Xs, Opaques) ->
+ strict(erlang, nif_error, 2, Xs, fun (_) -> t_any() end, Opaques);
%% Guard bif, needs to be here.
-type(erlang, node, 0, _) -> t_node();
+type(erlang, node, 0, _, _Opaques) -> t_node();
%% Guard bif, needs to be here.
-type(erlang, node, 1, Xs) ->
- strict(arg_types(erlang, node, 1), Xs, fun (_) -> t_node() end);
+type(erlang, node, 1, Xs, Opaques) ->
+ strict(erlang, node, 1, Xs, fun (_) -> t_node() end, Opaques);
%% Guard bif, needs to be here.
-type(erlang, round, 1, Xs) ->
- strict(arg_types(erlang, round, 1), Xs, fun (_) -> t_integer() end);
+type(erlang, round, 1, Xs, Opaques) ->
+ strict(erlang, round, 1, Xs, fun (_) -> t_integer() end, Opaques);
%% Guard bif, needs to be here.
-type(erlang, self, 0, _) -> t_pid();
-type(erlang, set_cookie, 2, Xs) ->
- strict(arg_types(erlang, set_cookie, 2), Xs, fun (_) -> t_atom('true') end);
-type(erlang, setelement, 3, Xs) ->
- strict(arg_types(erlang, setelement, 3), Xs,
+type(erlang, self, 0, _, _Opaques) -> t_pid();
+type(erlang, set_cookie, 2, Xs, Opaques) ->
+ strict(erlang, set_cookie, 2, Xs, fun (_) -> t_atom('true') end, Opaques);
+type(erlang, setelement, 3, Xs, Opaques) ->
+ strict(erlang, setelement, 3, Xs,
fun ([X1, X2, X3]) ->
- case t_tuple_subtypes(X2) of
+ case t_tuple_subtypes(X2, Opaques) of
unknown -> t_tuple();
[_] ->
- Sz = t_tuple_size(X2),
- As = t_tuple_args(X2),
- case t_number_vals(X1) of
+ Sz = t_tuple_size(X2, Opaques),
+ As = t_tuple_args(X2, Opaques),
+ case t_number_vals(X1, Opaques) of
unknown ->
t_tuple([t_sup(X, X3) || X <- As]);
[N] when is_integer(N), 1 =< N, N =< Sz ->
@@ -799,29 +831,29 @@ type(erlang, setelement, 3, Xs) ->
Ts when is_list(Ts) ->
t_sup([type(erlang, setelement, 3, [X1, Y, X3]) || Y <- Ts])
end
- end);
+ end, Opaques);
%% Guard bif, needs to be here.
-type(erlang, size, 1, Xs) ->
- strict(arg_types(erlang, size, 1), Xs, fun (_) -> t_non_neg_integer() end);
-type(erlang, spawn, 1, Xs) ->
- strict(arg_types(erlang, spawn, 1), Xs, fun (_) -> t_pid() end);
-type(erlang, spawn, 2, Xs) ->
- strict(arg_types(erlang, spawn, 2), Xs, fun (_) -> t_pid() end);
-type(erlang, spawn, 4, Xs) ->
- strict(arg_types(erlang, spawn, 4), Xs, fun (_) -> t_pid() end);
-type(erlang, spawn_link, 1, Xs) -> type(erlang, spawn, 1, Xs); % same
-type(erlang, spawn_link, 2, Xs) -> type(erlang, spawn, 2, Xs); % same
-type(erlang, spawn_link, 4, Xs) -> type(erlang, spawn, 4, Xs); % same
-type(erlang, subtract, 2, Xs) -> type(erlang, '--', 2, Xs); % alias
-type(erlang, suspend_process, 1, Xs) ->
- strict(arg_types(erlang, suspend_process, 1), Xs,
- fun (_) -> t_atom('true') end);
-type(erlang, system_info, 1, Xs) ->
- strict(arg_types(erlang, system_info, 1), Xs,
+type(erlang, size, 1, Xs, Opaques) ->
+ strict(erlang, size, 1, Xs, fun (_) -> t_non_neg_integer() end, Opaques);
+type(erlang, spawn, 1, Xs, Opaques) ->
+ strict(erlang, spawn, 1, Xs, fun (_) -> t_pid() end, Opaques);
+type(erlang, spawn, 2, Xs, Opaques) ->
+ strict(erlang, spawn, 2, Xs, fun (_) -> t_pid() end, Opaques);
+type(erlang, spawn, 4, Xs, Opaques) ->
+ strict(erlang, spawn, 4, Xs, fun (_) -> t_pid() end, Opaques);
+type(erlang, spawn_link, 1, Xs, _) -> type(erlang, spawn, 1, Xs); % same
+type(erlang, spawn_link, 2, Xs, _) -> type(erlang, spawn, 2, Xs); % same
+type(erlang, spawn_link, 4, Xs, _) -> type(erlang, spawn, 4, Xs); % same
+type(erlang, subtract, 2, Xs, _Opaques) -> type(erlang, '--', 2, Xs); % alias
+type(erlang, suspend_process, 1, Xs, Opaques) ->
+ strict(erlang, suspend_process, 1, Xs,
+ fun (_) -> t_atom('true') end, Opaques);
+type(erlang, system_info, 1, Xs, Opaques) ->
+ strict(erlang, system_info, 1, Xs,
fun ([Type]) ->
- case t_is_atom(Type) of
+ case t_is_atom(Type, Opaques) of
true ->
- case t_atom_vals(Type) of
+ case t_atom_vals(Type, Opaques) of
['allocated_areas'] ->
t_list(t_sup([t_tuple([t_atom(),t_non_neg_integer()]),
t_tuple([t_atom(),
@@ -880,7 +912,8 @@ type(erlang, system_info, 1, Xs) ->
t_list(t_pid());
['os_type'] ->
t_tuple([t_sup([t_atom('unix'),
- t_atom('win32')]),
+ t_atom('win32'),
+ t_atom('ose')]),
t_atom()]);
['os_version'] ->
t_sup(t_tuple([t_non_neg_fixnum(),
@@ -936,26 +969,28 @@ type(erlang, system_info, 1, Xs) ->
false -> %% This currently handles only {allocator, Alloc}
t_any() %% overapproximation as the return value might change
end
- end);
+ end, Opaques);
%% Guard bif, needs to be here.
-type(erlang, tl, 1, Xs) ->
- strict(arg_types(erlang, tl, 1), Xs, fun ([X]) -> t_cons_tl(X) end);
+type(erlang, tl, 1, Xs, Opaques) ->
+ strict(erlang, tl, 1, Xs, fun ([X]) -> t_cons_tl(X) end, Opaques);
%% Guard bif, needs to be here.
-type(erlang, trunc, 1, Xs) ->
- strict(arg_types(erlang, trunc, 1), Xs, fun (_) -> t_integer() end);
+type(erlang, trunc, 1, Xs, Opaques) ->
+ strict(erlang, trunc, 1, Xs, fun (_) -> t_integer() end, Opaques);
%% Guard bif, needs to be here.
-type(erlang, tuple_size, 1, Xs) ->
- strict(arg_types(erlang, tuple_size, 1), Xs, fun (_) -> t_non_neg_integer() end);
-type(erlang, tuple_to_list, 1, Xs) ->
- strict(arg_types(erlang, tuple_to_list, 1), Xs,
+type(erlang, tuple_size, 1, Xs, Opaques) ->
+ strict(erlang, tuple_size, 1, Xs,
+ fun (_) -> t_non_neg_integer() end, Opaques);
+type(erlang, tuple_to_list, 1, Xs, Opaques) ->
+ strict(erlang, tuple_to_list, 1, Xs,
fun ([X]) ->
- case t_tuple_subtypes(X) of
+ case t_tuple_subtypes(X, Opaques) of
unknown -> t_list();
SubTypes ->
- Args = lists:flatten([t_tuple_args(ST) || ST <- SubTypes]),
+ Args = lists:append([t_tuple_args(ST, Opaques) ||
+ ST <- SubTypes]),
%% Can be nil if the tuple can be {}
case lists:any(fun (T) ->
- t_tuple_size(T) =:= 0
+ t_tuple_size(T, Opaques) =:= 0
end, SubTypes) of
true ->
%% Be careful here. If we had only {} we need to
@@ -965,279 +1000,287 @@ type(erlang, tuple_to_list, 1, Xs) ->
t_nonempty_list(t_sup(Args))
end
end
- end);
-type(erlang, yield, 0, _) -> t_atom('true');
+ end, Opaques);
+type(erlang, yield, 0, _, _Opaques) -> t_atom('true');
%%-- ets ----------------------------------------------------------------------
-type(ets, rename, 2, Xs) ->
- strict(arg_types(ets, rename, 2), Xs, fun ([_, Name]) -> Name end);
+type(ets, rename, 2, Xs, Opaques) ->
+ strict(ets, rename, 2, Xs, fun ([_, Name]) -> Name end, Opaques);
%%-- hipe_bifs ----------------------------------------------------------------
-type(hipe_bifs, add_ref, 2, Xs) ->
- strict(arg_types(hipe_bifs, add_ref, 2), Xs, fun (_) -> t_nil() end);
-type(hipe_bifs, alloc_data, 2, Xs) ->
- strict(arg_types(hipe_bifs, alloc_data, 2), Xs,
- fun (_) -> t_integer() end); % address
-type(hipe_bifs, array, 2, Xs) ->
- strict(arg_types(hipe_bifs, array, 2), Xs, fun (_) -> t_immarray() end);
-type(hipe_bifs, array_length, 1, Xs) ->
- strict(arg_types(hipe_bifs, array_length, 1), Xs,
- fun (_) -> t_non_neg_fixnum() end);
-type(hipe_bifs, array_sub, 2, Xs) ->
- strict(arg_types(hipe_bifs, array_sub, 2), Xs, fun (_) -> t_immediate() end);
-type(hipe_bifs, array_update, 3, Xs) ->
- strict(arg_types(hipe_bifs, array_update, 3), Xs,
- fun (_) -> t_immarray() end);
-type(hipe_bifs, atom_to_word, 1, Xs) ->
- strict(arg_types(hipe_bifs, atom_to_word, 1), Xs,
- fun (_) -> t_integer() end);
-type(hipe_bifs, bif_address, 3, Xs) ->
- strict(arg_types(hipe_bifs, bif_address, 3), Xs,
- fun (_) -> t_sup(t_integer(), t_atom('false')) end);
-type(hipe_bifs, bitarray, 2, Xs) ->
- strict(arg_types(hipe_bifs, bitarray, 2), Xs, fun (_) -> t_bitarray() end);
-type(hipe_bifs, bitarray_sub, 2, Xs) ->
- strict(arg_types(hipe_bifs, bitarray_sub, 2), Xs, fun (_) -> t_boolean() end);
-type(hipe_bifs, bitarray_update, 3, Xs) ->
- strict(arg_types(hipe_bifs, bitarray_update, 3), Xs,
- fun (_) -> t_bitarray() end);
-type(hipe_bifs, bytearray, 2, Xs) ->
- strict(arg_types(hipe_bifs, bytearray, 2), Xs, fun (_) -> t_bytearray() end);
-type(hipe_bifs, bytearray_sub, 2, Xs) ->
- strict(arg_types(hipe_bifs, bytearray_sub, 2), Xs, fun (_) -> t_byte() end);
-type(hipe_bifs, bytearray_update, 3, Xs) ->
- strict(arg_types(hipe_bifs, bytearray_update, 3), Xs,
- fun (_) -> t_bytearray() end);
-type(hipe_bifs, call_count_clear, 1, Xs) ->
- strict(arg_types(hipe_bifs, call_count_clear, 1), Xs,
- fun (_) -> t_sup(t_non_neg_integer(), t_atom('false')) end);
-type(hipe_bifs, call_count_get, 1, Xs) ->
- strict(arg_types(hipe_bifs, call_count_get, 1), Xs,
- fun (_) -> t_sup(t_non_neg_integer(), t_atom('false')) end);
-type(hipe_bifs, call_count_off, 1, Xs) ->
- strict(arg_types(hipe_bifs, call_count_off, 1), Xs,
- fun (_) -> t_sup(t_non_neg_integer(), t_atom('false')) end);
-type(hipe_bifs, call_count_on, 1, Xs) ->
- strict(arg_types(hipe_bifs, call_count_on, 1), Xs,
- fun (_) -> t_sup(t_atom('true'), t_nil()) end);
-type(hipe_bifs, check_crc, 1, Xs) ->
- strict(arg_types(hipe_bifs, check_crc, 1), Xs, fun (_) -> t_boolean() end);
-type(hipe_bifs, enter_code, 2, Xs) ->
- strict(arg_types(hipe_bifs, enter_code, 2), Xs,
+type(hipe_bifs, add_ref, 2, Xs, Opaques) ->
+ strict(hipe_bifs, add_ref, 2, Xs, fun (_) -> t_nil() end, Opaques);
+type(hipe_bifs, alloc_data, 2, Xs, Opaques) ->
+ strict(hipe_bifs, alloc_data, 2, Xs,
+ fun (_) -> t_integer() end, Opaques); % address
+type(hipe_bifs, array, 2, Xs, Opaques) ->
+ strict(hipe_bifs, array, 2, Xs, fun (_) -> t_immarray() end, Opaques);
+type(hipe_bifs, array_length, 1, Xs, Opaques) ->
+ strict(hipe_bifs, array_length, 1, Xs,
+ fun (_) -> t_non_neg_fixnum() end, Opaques);
+type(hipe_bifs, array_sub, 2, Xs, Opaques) ->
+ strict(hipe_bifs, array_sub, 2, Xs, fun (_) -> t_immediate() end, Opaques);
+type(hipe_bifs, array_update, 3, Xs, Opaques) ->
+ strict(hipe_bifs, array_update, 3, Xs,
+ fun (_) -> t_immarray() end, Opaques);
+type(hipe_bifs, atom_to_word, 1, Xs, Opaques) ->
+ strict(hipe_bifs, atom_to_word, 1, Xs,
+ fun (_) -> t_integer() end, Opaques);
+type(hipe_bifs, bif_address, 3, Xs, Opaques) ->
+ strict(hipe_bifs, bif_address, 3, Xs,
+ fun (_) -> t_sup(t_integer(), t_atom('false')) end, Opaques);
+type(hipe_bifs, bitarray, 2, Xs, Opaques) ->
+ strict(hipe_bifs, bitarray, 2, Xs, fun (_) -> t_bitarray() end, Opaques);
+type(hipe_bifs, bitarray_sub, 2, Xs, Opaques) ->
+ strict(hipe_bifs, bitarray_sub, 2, Xs,
+ fun (_) -> t_boolean() end, Opaques);
+type(hipe_bifs, bitarray_update, 3, Xs, Opaques) ->
+ strict(hipe_bifs, bitarray_update, 3, Xs,
+ fun (_) -> t_bitarray() end, Opaques);
+type(hipe_bifs, bytearray, 2, Xs, Opaques) ->
+ strict(hipe_bifs, bytearray, 2, Xs, fun (_) -> t_bytearray() end, Opaques);
+type(hipe_bifs, bytearray_sub, 2, Xs, Opaques) ->
+ strict(hipe_bifs, bytearray_sub, 2, Xs, fun (_) -> t_byte() end, Opaques);
+type(hipe_bifs, bytearray_update, 3, Xs, Opaques) ->
+ strict(hipe_bifs, bytearray_update, 3, Xs,
+ fun (_) -> t_bytearray() end, Opaques);
+type(hipe_bifs, call_count_clear, 1, Xs, Opaques) ->
+ strict(hipe_bifs, call_count_clear, 1, Xs,
+ fun (_) -> t_sup(t_non_neg_integer(), t_atom('false')) end, Opaques);
+type(hipe_bifs, call_count_get, 1, Xs, Opaques) ->
+ strict(hipe_bifs, call_count_get, 1, Xs,
+ fun (_) -> t_sup(t_non_neg_integer(), t_atom('false')) end, Opaques);
+type(hipe_bifs, call_count_off, 1, Xs, Opaques) ->
+ strict(hipe_bifs, call_count_off, 1, Xs,
+ fun (_) -> t_sup(t_non_neg_integer(), t_atom('false')) end, Opaques);
+type(hipe_bifs, call_count_on, 1, Xs, Opaques) ->
+ strict(hipe_bifs, call_count_on, 1, Xs,
+ fun (_) -> t_sup(t_atom('true'), t_nil()) end, Opaques);
+type(hipe_bifs, check_crc, 1, Xs, Opaques) ->
+ strict(hipe_bifs, check_crc, 1, Xs, fun (_) -> t_boolean() end, Opaques);
+type(hipe_bifs, enter_code, 2, Xs, Opaques) ->
+ strict(hipe_bifs, enter_code, 2, Xs,
fun (_) -> t_tuple([t_integer(),
%% XXX: The tuple below contains integers and
%% is of size same as the length of the MFA list
- t_sup(t_nil(), t_binary())]) end);
-type(hipe_bifs, enter_sdesc, 1, Xs) ->
- strict(arg_types(hipe_bifs, enter_sdesc, 1), Xs, fun (_) -> t_nil() end);
-type(hipe_bifs, find_na_or_make_stub, 2, Xs) ->
- strict(arg_types(hipe_bifs, find_na_or_make_stub, 2), Xs,
- fun (_) -> t_integer() end); % address
-type(hipe_bifs, fun_to_address, 1, Xs) ->
- strict(arg_types(hipe_bifs, fun_to_address, 1), Xs,
- fun (_) -> t_integer() end);
-%% type(hipe_bifs, get_emu_address, 1, Xs) ->
-%% strict(arg_types(hipe_bifs, get_emu_address, 1), Xs,
-%% fun (_) -> t_integer() end); % address
-type(hipe_bifs, get_rts_param, 1, Xs) ->
- strict(arg_types(hipe_bifs, get_rts_param, 1), Xs,
- fun (_) -> t_sup(t_integer(), t_nil()) end);
-type(hipe_bifs, invalidate_funinfo_native_addresses, 1, Xs) ->
- strict(arg_types(hipe_bifs, invalidate_funinfo_native_addresses, 1), Xs,
- fun (_) -> t_nil() end);
-type(hipe_bifs, make_fe, 3, Xs) ->
- strict(arg_types(hipe_bifs, make_fe, 3), Xs, fun (_) -> t_integer() end);
-%% type(hipe_bifs, make_native_stub, 2, Xs) ->
-%% strict(arg_types(hipe_bifs, make_native_stub, 2), Xs,
-%% fun (_) -> t_integer() end); % address
-type(hipe_bifs, mark_referred_from, 1, Xs) ->
- strict(arg_types(hipe_bifs, mark_referred_from, 1), Xs,
- fun (_) -> t_nil() end);
-type(hipe_bifs, merge_term, 1, Xs) ->
- strict(arg_types(hipe_bifs, merge_term, 1), Xs, fun ([X]) -> X end);
-type(hipe_bifs, nstack_used_size, 0, _) ->
+ t_sup(t_nil(), t_binary())]) end, Opaques);
+type(hipe_bifs, enter_sdesc, 1, Xs, Opaques) ->
+ strict(hipe_bifs, enter_sdesc, 1, Xs, fun (_) -> t_nil() end, Opaques);
+type(hipe_bifs, find_na_or_make_stub, 2, Xs, Opaques) ->
+ strict(hipe_bifs, find_na_or_make_stub, 2, Xs,
+ fun (_) -> t_integer() end, Opaques); % address
+type(hipe_bifs, fun_to_address, 1, Xs, Opaques) ->
+ strict(hipe_bifs, fun_to_address, 1, Xs,
+ fun (_) -> t_integer() end, Opaques);
+%% type(hipe_bifs, get_emu_address, 1, Xs, Opaques) ->
+%% strict(hipe_bifs, get_emu_address, 1, Xs,
+%% fun (_) -> t_integer() end, Opaques); % address
+type(hipe_bifs, get_fe, 2, Xs, Opaques) ->
+ strict(hipe_bifs, get_fe, 2, Xs, fun (_) -> t_integer() end, Opaques);
+type(hipe_bifs, get_rts_param, 1, Xs, Opaques) ->
+ strict(hipe_bifs, get_rts_param, 1, Xs,
+ fun (_) -> t_sup(t_integer(), t_nil()) end, Opaques);
+type(hipe_bifs, invalidate_funinfo_native_addresses, 1, Xs, Opaques) ->
+ strict(hipe_bifs, invalidate_funinfo_native_addresses, 1, Xs,
+ fun (_) -> t_nil() end, Opaques);
+%% type(hipe_bifs, make_native_stub, 2, Xs, Opaques) ->
+%% strict(hipe_bifs, make_native_stub, 2, Xs,
+%% fun (_) -> t_integer() end, Opaques); % address
+type(hipe_bifs, mark_referred_from, 1, Xs, Opaques) ->
+ strict(hipe_bifs, mark_referred_from, 1, Xs,
+ fun (_) -> t_nil() end, Opaques);
+type(hipe_bifs, merge_term, 1, Xs, Opaques) ->
+ strict(hipe_bifs, merge_term, 1, Xs, fun ([X]) -> X end, Opaques);
+type(hipe_bifs, nstack_used_size, 0, _, _Opaques) ->
t_non_neg_fixnum();
-type(hipe_bifs, patch_call, 3, Xs) ->
- strict(arg_types(hipe_bifs, patch_call, 3), Xs, fun (_) -> t_nil() end);
-type(hipe_bifs, patch_insn, 3, Xs) ->
- strict(arg_types(hipe_bifs, patch_insn, 3), Xs, fun (_) -> t_nil() end);
-type(hipe_bifs, primop_address, 1, Xs) ->
- strict(arg_types(hipe_bifs, primop_address, 1), Xs,
- fun (_) -> t_sup(t_integer(), t_atom('false')) end);
-type(hipe_bifs, redirect_referred_from, 1, Xs) ->
- strict(arg_types(hipe_bifs, redirect_referred_from, 1), Xs,
- fun (_) -> t_nil() end);
-type(hipe_bifs, ref, 1, Xs) ->
- strict(arg_types(hipe_bifs, ref, 1), Xs, fun (_) -> t_immarray() end);
-type(hipe_bifs, ref_get, 1, Xs) ->
- strict(arg_types(hipe_bifs, ref_get, 1), Xs, fun (_) -> t_immediate() end);
-type(hipe_bifs, ref_set, 2, Xs) ->
- strict(arg_types(hipe_bifs, ref_set, 2), Xs, fun (_) -> t_nil() end);
-type(hipe_bifs, remove_refs_from, 1, Xs) ->
- strict(arg_types(hipe_bifs, remove_refs_from, 1), Xs,
- fun (_) -> t_atom('ok') end);
-type(hipe_bifs, set_funinfo_native_address, 3, Xs) ->
- strict(arg_types(hipe_bifs, set_funinfo_native_address, 3), Xs,
- fun (_) -> t_nil() end);
-type(hipe_bifs, set_native_address, 3, Xs) ->
- strict(arg_types(hipe_bifs, set_native_address, 3), Xs,
- fun (_) -> t_nil() end);
-type(hipe_bifs, system_crc, 1, Xs) ->
- strict(arg_types(hipe_bifs, system_crc, 1), Xs, fun (_) -> t_crc32() end);
-type(hipe_bifs, term_to_word, 1, Xs) ->
- strict(arg_types(hipe_bifs, term_to_word, 1), Xs,
- fun (_) -> t_integer() end);
-type(hipe_bifs, update_code_size, 3, Xs) ->
- strict(arg_types(hipe_bifs, update_code_size, 3), Xs,
- fun (_) -> t_nil() end);
-type(hipe_bifs, write_u8, 2, Xs) ->
- strict(arg_types(hipe_bifs, write_u8, 2), Xs, fun (_) -> t_nil() end);
-type(hipe_bifs, write_u32, 2, Xs) ->
- strict(arg_types(hipe_bifs, write_u32, 2), Xs, fun (_) -> t_nil() end);
-type(hipe_bifs, write_u64, 2, Xs) ->
- strict(arg_types(hipe_bifs, write_u64, 2), Xs, fun (_) -> t_nil() end);
+type(hipe_bifs, patch_call, 3, Xs, Opaques) ->
+ strict(hipe_bifs, patch_call, 3, Xs, fun (_) -> t_nil() end, Opaques);
+type(hipe_bifs, patch_insn, 3, Xs, Opaques) ->
+ strict(hipe_bifs, patch_insn, 3, Xs, fun (_) -> t_nil() end, Opaques);
+type(hipe_bifs, primop_address, 1, Xs, Opaques) ->
+ strict(hipe_bifs, primop_address, 1, Xs,
+ fun (_) -> t_sup(t_integer(), t_atom('false')) end, Opaques);
+type(hipe_bifs, redirect_referred_from, 1, Xs, Opaques) ->
+ strict(hipe_bifs, redirect_referred_from, 1, Xs,
+ fun (_) -> t_nil() end, Opaques);
+type(hipe_bifs, ref, 1, Xs, Opaques) ->
+ strict(hipe_bifs, ref, 1, Xs, fun (_) -> t_immarray() end, Opaques);
+type(hipe_bifs, ref_get, 1, Xs, Opaques) ->
+ strict(hipe_bifs, ref_get, 1, Xs, fun (_) -> t_immediate() end, Opaques);
+type(hipe_bifs, ref_set, 2, Xs, Opaques) ->
+ strict(hipe_bifs, ref_set, 2, Xs, fun (_) -> t_nil() end, Opaques);
+type(hipe_bifs, remove_refs_from, 1, Xs, Opaques) ->
+ strict(hipe_bifs, remove_refs_from, 1, Xs,
+ fun (_) -> t_atom('ok') end, Opaques);
+type(hipe_bifs, set_funinfo_native_address, 3, Xs, Opaques) ->
+ strict(hipe_bifs, set_funinfo_native_address, 3, Xs,
+ fun (_) -> t_nil() end, Opaques);
+type(hipe_bifs, set_native_address, 3, Xs, Opaques) ->
+ strict(hipe_bifs, set_native_address, 3, Xs,
+ fun (_) -> t_nil() end, Opaques);
+type(hipe_bifs, set_native_address_in_fe, 2, Xs, Opaques) ->
+ strict(hipe_bifs, set_native_address_in_fe, 2, Xs,
+ fun (_) -> t_atom('true') end, Opaques);
+type(hipe_bifs, system_crc, 1, Xs, Opaques) ->
+ strict(hipe_bifs, system_crc, 1, Xs, fun (_) -> t_crc32() end, Opaques);
+type(hipe_bifs, term_to_word, 1, Xs, Opaques) ->
+ strict(hipe_bifs, term_to_word, 1, Xs,
+ fun (_) -> t_integer() end, Opaques);
+type(hipe_bifs, update_code_size, 3, Xs, Opaques) ->
+ strict(hipe_bifs, update_code_size, 3, Xs,
+ fun (_) -> t_nil() end, Opaques);
+type(hipe_bifs, write_u8, 2, Xs, Opaques) ->
+ strict(hipe_bifs, write_u8, 2, Xs, fun (_) -> t_nil() end, Opaques);
+type(hipe_bifs, write_u32, 2, Xs, Opaques) ->
+ strict(hipe_bifs, write_u32, 2, Xs, fun (_) -> t_nil() end, Opaques);
+type(hipe_bifs, write_u64, 2, Xs, Opaques) ->
+ strict(hipe_bifs, write_u64, 2, Xs, fun (_) -> t_nil() end, Opaques);
%%-- lists --------------------------------------------------------------------
-type(lists, all, 2, Xs) ->
- strict(arg_types(lists, all, 2), Xs,
+type(lists, all, 2, Xs, Opaques) ->
+ strict(lists, all, 2, Xs,
fun ([F, L]) ->
- case t_is_nil(L) of
+ case t_is_nil(L, Opaques) of
true -> t_atom('true');
false ->
- El = t_list_elements(L),
- case check_fun_application(F, [El]) of
+ El = t_list_elements(L, Opaques),
+ case check_fun_application(F, [El], Opaques) of
ok ->
- case t_is_cons(L) of
- true -> t_fun_range(F);
+ case t_is_cons(L, Opaques) of
+ true -> t_fun_range(F, Opaques);
false ->
%% The list can be empty.
- t_sup(t_atom('true'), t_fun_range(F))
+ t_sup(t_atom('true'), t_fun_range(F, Opaques))
end;
error ->
- case t_is_cons(L) of
+ case t_is_cons(L, Opaques) of
true -> t_none();
- false -> t_fun_range(F)
+ false -> t_fun_range(F, Opaques)
end
end
end
- end);
-type(lists, any, 2, Xs) ->
- strict(arg_types(lists, any, 2), Xs,
+ end, Opaques);
+type(lists, any, 2, Xs, Opaques) ->
+ strict(lists, any, 2, Xs,
fun ([F, L]) ->
- case t_is_nil(L) of
+ case t_is_nil(L, Opaques) of
true -> t_atom('false');
false ->
- El = t_list_elements(L),
- case check_fun_application(F, [El]) of
+ El = t_list_elements(L, Opaques),
+ case check_fun_application(F, [El], Opaques) of
ok ->
- case t_is_cons(L) of
- true -> t_fun_range(F);
+ case t_is_cons(L, Opaques) of
+ true -> t_fun_range(F, Opaques);
false ->
%% The list can be empty
- t_sup(t_atom('false'), t_fun_range(F))
+ t_sup(t_atom('false'), t_fun_range(F, Opaques))
end;
error ->
- case t_is_cons(L) of
+ case t_is_cons(L, Opaques) of
true -> t_none();
- false -> t_fun_range(F)
+ false -> t_fun_range(F, Opaques)
end
end
end
- end);
-type(lists, append, 2, Xs) -> type(erlang, '++', 2, Xs); % alias
-type(lists, delete, 2, Xs) ->
- strict(arg_types(lists, delete, 2), Xs,
+ end, Opaques);
+type(lists, append, 2, Xs, _Opaques) -> type(erlang, '++', 2, Xs); % alias
+type(lists, delete, 2, Xs, Opaques) ->
+ strict(lists, delete, 2, Xs,
fun ([_, List]) ->
- case t_is_cons(List) of
+ case t_is_cons(List, Opaques) of
true -> t_cons_tl(List);
false -> List
end
- end);
-type(lists, dropwhile, 2, Xs) ->
- strict(arg_types(lists, dropwhile, 2), Xs,
+ end, Opaques);
+type(lists, dropwhile, 2, Xs, Opaques) ->
+ strict(lists, dropwhile, 2, Xs,
fun ([F, X]) ->
- case t_is_nil(X) of
+ case t_is_nil(X, Opaques) of
true -> t_nil();
false ->
- X1 = t_list_elements(X),
- case check_fun_application(F, [X1]) of
+ X1 = t_list_elements(X, Opaques),
+ case check_fun_application(F, [X1], Opaques) of
ok ->
- case t_atom_vals(t_fun_range(F)) of
+ case t_atom_vals(t_fun_range(F, Opaques), Opaques) of
['true'] ->
- case t_is_none(t_inf(t_list(), X)) of
+ case t_is_none(t_inf(t_list(), X, Opaques)) of
true -> t_none();
false -> t_nil()
end;
['false'] ->
- case t_is_none(t_inf(t_list(), X)) of
+ case t_is_none(t_inf(t_list(), X, Opaques)) of
true -> t_none();
false -> X
end;
_ ->
- t_inf(t_cons_tl(t_inf(X, t_cons())),
- t_maybe_improper_list())
+ t_inf(t_cons_tl(t_inf(X, t_cons(), Opaques)),
+ t_maybe_improper_list(), Opaques)
end;
error ->
- case t_is_cons(X) of
+ case t_is_cons(X, Opaques) of
true -> t_none();
false -> t_nil()
end
end
end
- end);
-type(lists, filter, 2, Xs) ->
- strict(arg_types(lists, filter, 2), Xs,
+ end, Opaques);
+type(lists, filter, 2, Xs, Opaques) ->
+ strict(lists, filter, 2, Xs,
fun ([F, L]) ->
- case t_is_nil(L) of
+ case t_is_nil(L, Opaques) of
true -> t_nil();
false ->
- T = t_list_elements(L),
- case check_fun_application(F, [T]) of
+ T = t_list_elements(L, Opaques),
+ case check_fun_application(F, [T], Opaques) of
ok ->
- case t_atom_vals(t_fun_range(F)) =:= ['false'] of
+ RangeVals = t_atom_vals(t_fun_range(F, Opaques), Opaques),
+ case RangeVals =:= ['false'] of
true -> t_nil();
false ->
- case t_atom_vals(t_fun_range(F)) =:= ['true'] of
+ case RangeVals =:= ['true'] of
true -> L;
false -> t_list(T)
end
end;
error ->
- case t_is_cons(L) of
+ case t_is_cons(L, Opaques) of
true -> t_none();
false -> t_nil()
end
end
end
- end);
-type(lists, flatten, 1, Xs) ->
- strict(arg_types(lists, flatten, 1), Xs,
+ end, Opaques);
+type(lists, flatten, 1, Xs, Opaques) ->
+ strict(lists, flatten, 1, Xs,
fun ([L]) ->
- case t_is_nil(L) of
+ case t_is_nil(L, Opaques) of
true -> L; % (nil has undefined elements)
false ->
%% Avoiding infinite recursion is tricky
- X1 = t_list_elements(L),
+ X1 = t_list_elements(L, Opaques),
case t_is_any(X1) of
true ->
t_list();
false ->
- X2 = type(lists, flatten, 1, [t_inf(X1, t_list())]),
+ X2 = type(lists, flatten, 1, [t_inf(X1, t_list(), Opaques)]),
t_sup(t_list(t_subtract(X1, t_list())), X2)
end
end
- end);
-type(lists, flatmap, 2, Xs) ->
- strict(arg_types(lists, flatmap, 2), Xs,
+ end, Opaques);
+type(lists, flatmap, 2, Xs, Opaques) ->
+ strict(lists, flatmap, 2, Xs,
fun ([F, List]) ->
- case t_is_nil(List) of
+ case t_is_nil(List, Opaques) of
true -> t_nil();
false ->
- case check_fun_application(F, [t_list_elements(List)]) of
+ case
+ check_fun_application(F, [t_list_elements(List, Opaques)],
+ Opaques)
+ of
ok ->
- R = t_fun_range(F),
+ R = t_fun_range(F, Opaques),
case t_is_nil(R) of
true -> t_nil();
false ->
- Elems = t_list_elements(R),
- case t_is_cons(List) of
+ Elems = t_list_elements(R, Opaques),
+ case t_is_cons(List, Opaques) of
true ->
case t_is_subtype(t_nil(), R) of
true -> t_list(Elems);
@@ -1247,58 +1290,65 @@ type(lists, flatmap, 2, Xs) ->
end
end;
error ->
- case t_is_cons(List) of
+ case t_is_cons(List, Opaques) of
true -> t_none();
false -> t_nil()
end
end
end
- end);
-type(lists, foreach, 2, Xs) ->
- strict(arg_types(lists, foreach, 2), Xs,
+ end, Opaques);
+type(lists, foreach, 2, Xs, Opaques) ->
+ strict(lists, foreach, 2, Xs,
fun ([F, List]) ->
- case t_is_cons(List) of
+ case t_is_cons(List, Opaques) of
true ->
- case check_fun_application(F, [t_list_elements(List)]) of
+ case
+ check_fun_application(F, [t_list_elements(List, Opaques)],
+ Opaques)
+ of
ok -> t_atom('ok');
error -> t_none()
end;
false ->
t_atom('ok')
end
- end);
-type(lists, foldl, 3, Xs) ->
- strict(arg_types(lists, foldl, 3), Xs,
+ end, Opaques);
+type(lists, foldl, 3, Xs, Opaques) ->
+ strict(lists, foldl, 3, Xs,
fun ([F, Acc, List]) ->
- case t_is_nil(List) of
+ case t_is_nil(List, Opaques) of
true -> Acc;
false ->
- case check_fun_application(F, [t_list_elements(List), Acc]) of
+ case
+ check_fun_application(F,
+ [t_list_elements(List, Opaques),Acc],
+ Opaques)
+ of
ok ->
- case t_is_cons(List) of
- true -> t_fun_range(F);
- false -> t_sup(t_fun_range(F), Acc)
+ case t_is_cons(List, Opaques) of
+ true -> t_fun_range(F, Opaques);
+ false -> t_sup(t_fun_range(F, Opaques), Acc)
end;
error ->
- case t_is_cons(List) of
+ case t_is_cons(List, Opaques) of
true -> t_none();
false -> Acc
end
end
end
- end);
-type(lists, foldr, 3, Xs) -> type(lists, foldl, 3, Xs); % same
-type(lists, keydelete, 3, Xs) ->
- strict(arg_types(lists, keydelete, 3), Xs,
+ end, Opaques);
+type(lists, foldr, 3, Xs, _Opaques) -> type(lists, foldl, 3, Xs); % same
+type(lists, keydelete, 3, Xs, Opaques) ->
+ strict(lists, keydelete, 3, Xs,
fun ([_, _, L]) ->
Term = t_list_termination(L),
t_sup(Term, erl_types:lift_list_to_pos_empty(L))
- end);
-type(lists, keyfind, 3, Xs) ->
- strict(arg_types(lists, keyfind, 3), Xs,
+ end, Opaques);
+type(lists, keyfind, 3, Xs, Opaques) ->
+ strict(lists, keyfind, 3, Xs,
fun ([X, Y, Z]) ->
- ListEs = t_list_elements(Z),
- Tuple = t_inf(t_tuple(), ListEs),
+ ListEs = t_list_elements(Z, Opaques),
+ Tuple = t_inf(t_tuple(), ListEs, Opaques),
case t_is_none(Tuple) of
true -> t_atom('false');
false ->
@@ -1308,58 +1358,61 @@ type(lists, keyfind, 3, Xs) ->
case t_is_any(X) of
true -> Ret;
false ->
- case t_tuple_subtypes(Tuple) of
+ case t_tuple_subtypes(Tuple, Opaques) of
unknown -> Ret;
List ->
- case key_comparisons_fail(X, Y, List) of
+ case key_comparisons_fail(X, Y, List, Opaques) of
true -> t_atom('false');
false -> Ret
end
end
end
end
- end);
-type(lists, keymap, 3, Xs) ->
- strict(arg_types(lists, keymap, 3), Xs,
+ end, Opaques);
+type(lists, keymap, 3, Xs, Opaques) ->
+ strict(lists, keymap, 3, Xs,
fun ([F, _I, L]) ->
- case t_is_nil(L) of
+ case t_is_nil(L, Opaques) of
true -> L;
- false -> t_list(t_sup(t_fun_range(F), t_list_elements(L)))
+ false -> t_list(t_sup(t_fun_range(F, Opaques),
+ t_list_elements(L, Opaques)))
end
- end);
-type(lists, keymember, 3, Xs) ->
- strict(arg_types(lists, keymember, 3), Xs,
+ end, Opaques);
+type(lists, keymember, 3, Xs, Opaques) ->
+ strict(lists, keymember, 3, Xs,
fun ([X, Y, Z]) ->
- ListEs = t_list_elements(Z),
- Tuple = t_inf(t_tuple(), ListEs),
+ ListEs = t_list_elements(Z, Opaques),
+ Tuple = t_inf(t_tuple(), ListEs, Opaques),
case t_is_none(Tuple) of
true -> t_atom('false');
false ->
case t_is_any(X) of
true -> t_boolean();
false ->
- case t_tuple_subtypes(Tuple) of
+ case t_tuple_subtypes(Tuple, Opaques) of
unknown -> t_boolean();
List ->
- case key_comparisons_fail(X, Y, List) of
+ case key_comparisons_fail(X, Y, List, Opaques) of
true -> t_atom('false');
false -> t_boolean()
end
end
end
end
- end);
-type(lists, keymerge, 3, Xs) ->
- strict(arg_types(lists, keymerge, 3), Xs,
- fun ([_I, L1, L2]) -> type(lists, merge, 2, [L1, L2]) end);
-type(lists, keyreplace, 4, Xs) ->
- strict(arg_types(lists, keyreplace, 4), Xs,
- fun ([_K, _I, L, T]) -> t_list(t_sup(t_list_elements(L), T)) end);
-type(lists, keysearch, 3, Xs) ->
- strict(arg_types(lists, keysearch, 3), Xs,
+ end, Opaques);
+type(lists, keymerge, 3, Xs, Opaques) ->
+ strict(lists, keymerge, 3, Xs,
+ fun ([_I, L1, L2]) -> type(lists, merge, 2, [L1, L2]) end, Opaques);
+type(lists, keyreplace, 4, Xs, Opaques) ->
+ strict(lists, keyreplace, 4, Xs,
+ fun ([_K, _I, L, T]) ->
+ t_list(t_sup(t_list_elements(L, Opaques), T))
+ end, Opaques);
+type(lists, keysearch, 3, Xs, Opaques) ->
+ strict(lists, keysearch, 3, Xs,
fun ([X, Y, Z]) ->
- ListEs = t_list_elements(Z),
- Tuple = t_inf(t_tuple(), ListEs),
+ ListEs = t_list_elements(Z, Opaques),
+ Tuple = t_inf(t_tuple(), ListEs, Opaques),
case t_is_none(Tuple) of
true -> t_atom('false');
false ->
@@ -1368,91 +1421,93 @@ type(lists, keysearch, 3, Xs) ->
case t_is_any(X) of
true -> Ret;
false ->
- case t_tuple_subtypes(Tuple) of
+ case t_tuple_subtypes(Tuple, Opaques) of
unknown -> Ret;
List ->
- case key_comparisons_fail(X, Y, List) of
+ case key_comparisons_fail(X, Y, List, Opaques) of
true -> t_atom('false');
false -> Ret
end
end
end
end
- end);
-type(lists, keysort, 2, Xs) ->
- strict(arg_types(lists, keysort, 2), Xs, fun ([_, L]) -> L end);
-type(lists, last, 1, Xs) ->
- strict(arg_types(lists, last, 1), Xs, fun ([L]) -> t_list_elements(L) end);
-type(lists, map, 2, Xs) ->
- strict(arg_types(lists, map, 2), Xs,
+ end, Opaques);
+type(lists, keysort, 2, Xs, Opaques) ->
+ strict(lists, keysort, 2, Xs, fun ([_, L]) -> L end, Opaques);
+type(lists, last, 1, Xs, Opaques) ->
+ strict(lists, last, 1, Xs,
+ fun ([L]) -> t_list_elements(L, Opaques) end, Opaques);
+type(lists, map, 2, Xs, Opaques) ->
+ strict(lists, map, 2, Xs,
fun ([F, L]) ->
- case t_is_nil(L) of
+ case t_is_nil(L, Opaques) of
true -> L;
false ->
- El = t_list_elements(L),
- case t_is_cons(L) of
+ El = t_list_elements(L, Opaques),
+ case t_is_cons(L, Opaques) of
true ->
- case check_fun_application(F, [El]) of
- ok -> t_nonempty_list(t_fun_range(F));
+ case check_fun_application(F, [El], Opaques) of
+ ok -> t_nonempty_list(t_fun_range(F, Opaques));
error -> t_none()
end;
false ->
- case check_fun_application(F, [El]) of
- ok -> t_list(t_fun_range(F));
+ case check_fun_application(F, [El], Opaques) of
+ ok -> t_list(t_fun_range(F, Opaques));
error -> t_nil()
end
end
end
- end);
-type(lists, mapfoldl, 3, Xs) ->
- strict(arg_types(lists, mapfoldl, 3), Xs,
+ end, Opaques);
+type(lists, mapfoldl, 3, Xs, Opaques) ->
+ strict(lists, mapfoldl, 3, Xs,
fun ([F, Acc, List]) ->
- case t_is_nil(List) of
+ case t_is_nil(List, Opaques) of
true -> t_tuple([List, Acc]);
false ->
- El = t_list_elements(List),
- R = t_fun_range(F),
- case t_is_cons(List) of
+ El = t_list_elements(List, Opaques),
+ R = t_fun_range(F, Opaques),
+ case t_is_cons(List, Opaques) of
true ->
- case check_fun_application(F, [El, Acc]) of
+ case check_fun_application(F, [El, Acc], Opaques) of
ok ->
Fun = fun (RangeTuple) ->
- [T1, T2] = t_tuple_args(RangeTuple),
+ [T1, T2] = t_tuple_args(RangeTuple, Opaques),
t_tuple([t_nonempty_list(T1), T2])
end,
- t_sup([Fun(ST) || ST <- t_tuple_subtypes(R)]);
+ t_sup([Fun(ST) || ST <- t_tuple_subtypes(R, Opaques)]);
error ->
t_none()
end;
false ->
- case check_fun_application(F, [El, Acc]) of
+ case check_fun_application(F, [El, Acc], Opaques) of
ok ->
Fun = fun (RangeTuple) ->
- [T1, T2] = t_tuple_args(RangeTuple),
+ [T1, T2] = t_tuple_args(RangeTuple, Opaques),
t_tuple([t_list(T1), t_sup(Acc, T2)])
end,
- t_sup([Fun(ST) || ST <- t_tuple_subtypes(R)]);
+ t_sup([Fun(ST) || ST <- t_tuple_subtypes(R, Opaques)]);
error ->
t_tuple([t_nil(), Acc])
end
end
end
- end);
-type(lists, mapfoldr, 3, Xs) -> type(lists, mapfoldl, 3, Xs); % same
-type(lists, max, 1, Xs) ->
- strict(arg_types(lists, max, 1), Xs, fun ([L]) -> t_list_elements(L) end);
-type(lists, member, 2, Xs) ->
- strict(arg_types(lists, member, 2), Xs,
+ end, Opaques);
+type(lists, mapfoldr, 3, Xs, _Opaques) -> type(lists, mapfoldl, 3, Xs); % same
+type(lists, max, 1, Xs, Opaques) ->
+ strict(lists, max, 1, Xs,
+ fun ([L]) -> t_list_elements(L, Opaques) end, Opaques);
+type(lists, member, 2, Xs, Opaques) ->
+ strict(lists, member, 2, Xs,
fun ([X, Y]) ->
- Y1 = t_list_elements(Y),
- case t_is_none(t_inf(Y1, X)) of
+ Y1 = t_list_elements(Y, Opaques),
+ case t_is_none(t_inf(Y1, X, Opaques)) of
true -> t_atom('false');
false -> t_boolean()
end
- end);
-%% type(lists, merge, 1, Xs) ->
-type(lists, merge, 2, Xs) ->
- strict(arg_types(lists, merge, 2), Xs,
+ end, Opaques);
+%% type(lists, merge, 1, Xs, Opaques) ->
+type(lists, merge, 2, Xs, Opaques) ->
+ strict(lists, merge, 2, Xs,
fun ([L1, L2]) ->
case t_is_none(L1) of
true -> L2;
@@ -1462,30 +1517,31 @@ type(lists, merge, 2, Xs) ->
false -> t_sup(L1, L2)
end
end
- end);
-type(lists, min, 1, Xs) ->
- strict(arg_types(lists, min, 1), Xs, fun ([L]) -> t_list_elements(L) end);
-type(lists, nth, 2, Xs) ->
- strict(arg_types(lists, nth, 2), Xs,
- fun ([_, Y]) -> t_list_elements(Y) end);
-type(lists, nthtail, 2, Xs) ->
- strict(arg_types(lists, nthtail, 2), Xs,
- fun ([_, Y]) -> t_sup(Y, t_list()) end);
-type(lists, partition, 2, Xs) ->
- strict(arg_types(lists, partition, 2), Xs,
+ end, Opaques);
+type(lists, min, 1, Xs, Opaques) ->
+ strict(lists, min, 1, Xs,
+ fun ([L]) -> t_list_elements(L, Opaques) end, Opaques);
+type(lists, nth, 2, Xs, Opaques) ->
+ strict(lists, nth, 2, Xs,
+ fun ([_, Y]) -> t_list_elements(Y, Opaques) end, Opaques);
+type(lists, nthtail, 2, Xs, Opaques) ->
+ strict(lists, nthtail, 2, Xs,
+ fun ([_, Y]) -> t_sup(Y, t_list()) end, Opaques);
+type(lists, partition, 2, Xs, Opaques) ->
+ strict(lists, partition, 2, Xs,
fun ([F, L]) ->
- case t_is_nil(L) of
+ case t_is_nil(L, Opaques) of
true -> t_tuple([L,L]);
false ->
- El = t_list_elements(L),
- case check_fun_application(F, [El]) of
+ El = t_list_elements(L, Opaques),
+ case check_fun_application(F, [El], Opaques) of
error ->
- case t_is_cons(L) of
+ case t_is_cons(L, Opaques) of
true -> t_none();
false -> t_tuple([t_nil(), t_nil()])
end;
ok ->
- case t_atom_vals(t_fun_range(F)) of
+ case t_atom_vals(t_fun_range(F, Opaques), Opaques) of
['true'] -> t_tuple([L, t_nil()]);
['false'] -> t_tuple([t_nil(), L]);
[_, _] ->
@@ -1494,123 +1550,131 @@ type(lists, partition, 2, Xs) ->
end
end
end
- end);
-type(lists, reverse, 1, Xs) ->
- strict(arg_types(lists, reverse, 1), Xs, fun ([X]) -> X end);
-type(lists, reverse, 2, Xs) ->
+ end, Opaques);
+type(lists, reverse, 1, Xs, Opaques) ->
+ strict(lists, reverse, 1, Xs, fun ([X]) -> X end, Opaques);
+type(lists, reverse, 2, Xs, _Opaques) ->
type(erlang, '++', 2, Xs); % reverse-onto is just like append
-type(lists, sort, 1, Xs) ->
- strict(arg_types(lists, sort, 1), Xs, fun ([X]) -> X end);
-type(lists, sort, 2, Xs) ->
- strict(arg_types(lists, sort, 2), Xs,
+type(lists, sort, 1, Xs, Opaques) ->
+ strict(lists, sort, 1, Xs, fun ([X]) -> X end, Opaques);
+type(lists, sort, 2, Xs, Opaques) ->
+ strict(lists, sort, 2, Xs,
fun ([F, L]) ->
- R = t_fun_range(F),
- case t_is_boolean(R) of
+ R = t_fun_range(F, Opaques),
+ case t_is_boolean(R, Opaques) of
true -> L;
false ->
- case t_is_nil(L) of
+ case t_is_nil(L, Opaques) of
true -> t_nil();
false -> t_none()
end
end
- end);
-type(lists, split, 2, Xs) ->
- strict(arg_types(lists, split, 2), Xs,
+ end, Opaques);
+type(lists, split, 2, Xs, Opaques) ->
+ strict(lists, split, 2, Xs,
fun ([_, L]) ->
- case t_is_nil(L) of
+ case t_is_nil(L, Opaques) of
true -> t_tuple([L, L]);
false ->
- T = t_list_elements(L),
+ T = t_list_elements(L, Opaques),
t_tuple([t_list(T), t_list(T)])
end
- end);
-type(lists, splitwith, 2, Xs) ->
+ end, Opaques);
+type(lists, splitwith, 2, Xs, _Opaques) ->
T1 = type(lists, takewhile, 2, Xs),
T2 = type(lists, dropwhile, 2, Xs),
case t_is_none(T1) orelse t_is_none(T2) of
true -> t_none();
false -> t_tuple([T1, T2])
end;
-type(lists, subtract, 2, Xs) -> type(erlang, '--', 2, Xs); % alias
-type(lists, takewhile, 2, Xs) ->
- strict(arg_types(lists, takewhile, 2), Xs,
+type(lists, subtract, 2, Xs, _Opaques) -> type(erlang, '--', 2, Xs); % alias
+type(lists, takewhile, 2, Xs, Opaques) ->
+ strict(lists, takewhile, 2, Xs,
fun([F, L]) ->
- case t_is_none(t_inf(t_list(), L)) of
+ case t_is_none(t_inf(t_list(), L, Opaques)) of
false -> type(lists, filter, 2, Xs);
true ->
%% This works for non-proper lists as well.
- El = t_list_elements(L),
+ El = t_list_elements(L, Opaques),
type(lists, filter, 2, [F, t_list(El)])
end
- end);
-type(lists, usort, 1, Xs) -> type(lists, sort, 1, Xs); % same
-type(lists, usort, 2, Xs) -> type(lists, sort, 2, Xs); % same
-type(lists, unzip, 1, Xs) ->
- strict(arg_types(lists, unzip, 1), Xs,
+ end, Opaques);
+type(lists, usort, 1, Xs, _Opaques) -> type(lists, sort, 1, Xs); % same
+type(lists, usort, 2, Xs, _Opaques) -> type(lists, sort, 2, Xs); % same
+type(lists, unzip, 1, Xs, Opaques) ->
+ strict(lists, unzip, 1, Xs,
fun ([Ps]) ->
- case t_is_nil(Ps) of
+ case t_is_nil(Ps, Opaques) of
true ->
t_tuple([t_nil(), t_nil()]);
false -> % Ps is a proper list of pairs
- TupleTypes = t_tuple_subtypes(t_list_elements(Ps)),
+ TupleTypes = t_tuple_subtypes(t_list_elements(Ps, Opaques),
+ Opaques),
lists:foldl(fun(Tuple, Acc) ->
- [A, B] = t_tuple_args(Tuple),
+ [A, B] = t_tuple_args(Tuple, Opaques),
t_sup(t_tuple([t_list(A), t_list(B)]), Acc)
end, t_none(), TupleTypes)
end
- end);
-type(lists, unzip3, 1, Xs) ->
- strict(arg_types(lists, unzip3, 1), Xs,
+ end, Opaques);
+type(lists, unzip3, 1, Xs, Opaques) ->
+ strict(lists, unzip3, 1, Xs,
fun ([Ts]) ->
- case t_is_nil(Ts) of
+ case t_is_nil(Ts, Opaques) of
true ->
t_tuple([t_nil(), t_nil(), t_nil()]);
false -> % Ps is a proper list of triples
- TupleTypes = t_tuple_subtypes(t_list_elements(Ts)),
+ TupleTypes = t_tuple_subtypes(t_list_elements(Ts, Opaques),
+ Opaques),
lists:foldl(fun(T, Acc) ->
- [A, B, C] = t_tuple_args(T),
+ [A, B, C] = t_tuple_args(T, Opaques),
t_sup(t_tuple([t_list(A),
t_list(B),
t_list(C)]),
Acc)
end, t_none(), TupleTypes)
end
- end);
-type(lists, zip, 2, Xs) ->
- strict(arg_types(lists, zip, 2), Xs,
+ end, Opaques);
+type(lists, zip, 2, Xs, Opaques) ->
+ strict(lists, zip, 2, Xs,
fun ([As, Bs]) ->
- case (t_is_nil(As) orelse t_is_nil(Bs)) of
+ case (t_is_nil(As, Opaques) orelse t_is_nil(Bs, Opaques)) of
true -> t_nil();
false ->
- A = t_list_elements(As),
- B = t_list_elements(Bs),
+ A = t_list_elements(As, Opaques),
+ B = t_list_elements(Bs, Opaques),
t_list(t_tuple([A, B]))
end
- end);
-type(lists, zip3, 3, Xs) ->
- strict(arg_types(lists, zip3, 3), Xs,
+ end, Opaques);
+type(lists, zip3, 3, Xs, Opaques) ->
+ strict(lists, zip3, 3, Xs,
fun ([As, Bs, Cs]) ->
- case (t_is_nil(As) orelse t_is_nil(Bs) orelse t_is_nil(Cs)) of
+ case
+ (t_is_nil(As, Opaques)
+ orelse t_is_nil(Bs, Opaques)
+ orelse t_is_nil(Cs, Opaques))
+ of
true -> t_nil();
false ->
- A = t_list_elements(As),
- B = t_list_elements(Bs),
- C = t_list_elements(Cs),
+ A = t_list_elements(As, Opaques),
+ B = t_list_elements(Bs, Opaques),
+ C = t_list_elements(Cs, Opaques),
t_list(t_tuple([A, B, C]))
end
- end);
-type(lists, zipwith, 3, Xs) ->
- strict(arg_types(lists, zipwith, 3), Xs,
- fun ([F, _As, _Bs]) -> t_sup(t_list(t_fun_range(F)), t_nil()) end);
-type(lists, zipwith3, 4, Xs) ->
- strict(arg_types(lists, zipwith3, 4), Xs,
- fun ([F,_As,_Bs,_Cs]) -> t_sup(t_list(t_fun_range(F)), t_nil()) end);
+ end, Opaques);
+type(lists, zipwith, 3, Xs, Opaques) ->
+ strict(lists, zipwith, 3, Xs,
+ fun ([F, _As, _Bs]) -> t_sup(t_list(t_fun_range(F, Opaques)),
+ t_nil()) end, Opaques);
+type(lists, zipwith3, 4, Xs, Opaques) ->
+ strict(lists, zipwith3, 4, Xs,
+ fun ([F,_As,_Bs,_Cs]) -> t_sup(t_list(t_fun_range(F, Opaques)),
+ t_nil()) end, Opaques);
%%-- string -------------------------------------------------------------------
-type(string, chars, 2, Xs) -> % NOTE: added to avoid loss of information
- strict(arg_types(string, chars, 2), Xs, fun (_) -> t_string() end);
-type(string, chars, 3, Xs) -> % NOTE: added to avoid loss of information
- strict(arg_types(string, chars, 3), Xs,
+type(string, chars, 2, Xs, Opaques) -> % NOTE: added to avoid loss of info
+ strict(string, chars, 2, Xs, fun (_) -> t_string() end, Opaques);
+type(string, chars, 3, Xs, Opaques) -> % NOTE: added to avoid loss of info
+ strict(string, chars, 3, Xs,
fun ([Char, N, Tail]) ->
case t_is_nil(Tail) of
true ->
@@ -1623,10 +1687,10 @@ type(string, chars, 3, Xs) -> % NOTE: added to avoid loss of information
t_sup(t_sup(t_string(), Tail), t_cons(Char, Tail))
end
end
- end);
+ end, Opaques);
%%-----------------------------------------------------------------------------
-type(M, F, A, Xs) when is_atom(M), is_atom(F),
+type(M, F, A, Xs, _O) when is_atom(M), is_atom(F),
is_integer(A), 0 =< A, A =< 255 ->
strict(Xs, t_any()). % safe approximation for all functions.
@@ -1635,13 +1699,20 @@ type(M, F, A, Xs) when is_atom(M), is_atom(F),
%% Auxiliary functions
%%-----------------------------------------------------------------------------
-strict(Xs, Ts, F) ->
- %% io:format("inf lists arg~n1:~p~n2:~p ~n", [Xs, Ts]),
- Xs1 = inf_lists(Xs, Ts),
+strict(M, F, A, Xs, Fun, Opaques) ->
+ Ts = arg_types(M, F, A),
+ %% io:format("inf lists arg~nXs: ~p~nTs: ~p ~n", [Xs, Ts]),
+ Xs1 = inf_lists(Xs, Ts, Opaques),
%% io:format("inf lists return ~p ~n", [Xs1]),
case any_is_none_or_unit(Xs1) of
true -> t_none();
- false -> F(Xs1)
+ false -> Fun(Xs1)
+ end.
+
+strict2(Xs, X) ->
+ case any_is_none_or_unit(Xs) of
+ true -> t_none();
+ false -> X
end.
strict(Xs, X) ->
@@ -1650,9 +1721,9 @@ strict(Xs, X) ->
false -> X
end.
-inf_lists([X | Xs], [T | Ts]) ->
- [t_inf(X, T) | inf_lists(Xs, Ts)];
-inf_lists([], []) ->
+inf_lists([X | Xs], [T | Ts], Opaques) ->
+ [t_inf(X, T, Opaques) | inf_lists(Xs, Ts, Opaques)];
+inf_lists([], [], _Opaques) ->
[].
any_list(N) -> any_list(N, t_any()).
@@ -1670,20 +1741,43 @@ list_replace(1, E, [_X | Xs]) ->
any_is_none_or_unit(Ts) ->
lists:any(fun erl_types:t_is_none_or_unit/1, Ts).
-check_guard([X], Test, Type) ->
- check_guard_single(X, Test, Type).
+check_guard([X], Test, Type, Opaques) ->
+ check_guard_single(X, Test, Type, Opaques).
-check_guard_single(X, Test, Type) ->
+check_guard_single(X, Test, Type, Opaques) ->
case Test(X) of
true -> t_atom('true');
false ->
- case erl_types:t_is_opaque(X) of
- true -> t_none();
- false ->
- case t_is_none(t_inf(Type, X)) of
- true -> t_atom('false');
- false -> t_boolean()
- end
+ case t_is_none(t_inf(Type, X, Opaques)) of
+ true ->
+ case t_has_opaque_subtype(X, Opaques) of
+ true -> t_none();
+ false -> t_atom('false')
+ end;
+ false -> t_boolean()
+ end
+ end.
+
+check_record_tag(Tag, Y, Opaques) ->
+ case t_is_atom(Tag, Opaques) of
+ false ->
+ TagAtom = t_inf(Tag, t_atom(), Opaques),
+ case t_is_none(TagAtom) of
+ true ->
+ case t_has_opaque_subtype(Tag, Opaques) of
+ true -> t_none();
+ false -> t_atom('false')
+ end;
+ false -> t_boolean()
+ end;
+ true ->
+ case t_atom_vals(Tag, Opaques) of
+ [RealTag] ->
+ case t_atom_vals(Y, Opaques) of
+ [RealTag] -> t_atom('true');
+ _ -> t_boolean()
+ end;
+ _ -> t_boolean()
end
end.
@@ -1828,12 +1922,12 @@ negwidth(X, N) ->
false -> negwidth(X, N+1)
end.
-arith('bnot', X1) ->
- case t_is_integer(X1) of
+arith('bnot', X1, Opaques) ->
+ case t_is_integer(X1, Opaques) of
false -> error;
true ->
- Min1 = number_min(X1),
- Max1 = number_max(X1),
+ Min1 = number_min(X1, Opaques),
+ Max1 = number_max(X1, Opaques),
{ok, t_from_range(infinity_add(infinity_inv(Max1), -1),
infinity_add(infinity_inv(Min1), -1))}
end.
@@ -1907,13 +2001,13 @@ arith_bor_range_set({Min, Max}, [Int|IntList]) ->
IntList),
{infinity_bor(Min, SafeAnd), infinity_bor(Max, SafeAnd)}.
-arith_band(X1, X2) ->
- L1 = t_number_vals(X1),
- L2 = t_number_vals(X2),
- Min1 = number_min(X1),
- Max1 = number_max(X1),
- Min2 = number_min(X2),
- Max2 = number_max(X2),
+arith_band(X1, X2, Opaques) ->
+ L1 = t_number_vals(X1, Opaques),
+ L2 = t_number_vals(X2, Opaques),
+ Min1 = number_min(X1, Opaques),
+ Max1 = number_max(X1, Opaques),
+ Min2 = number_min(X2, Opaques),
+ Max2 = number_max(X2, Opaques),
case {L1 =:= unknown, L2 =:= unknown} of
{true, false} ->
arith_band_range_set(arith_band_ranges(Min1, Max1, Min2, Max2), L2);
@@ -1923,13 +2017,13 @@ arith_band(X1, X2) ->
arith_band_ranges(Min1, Max1, Min2, Max2)
end.
-arith_bor(X1, X2) ->
- L1 = t_number_vals(X1),
- L2 = t_number_vals(X2),
- Min1 = number_min(X1),
- Max1 = number_max(X1),
- Min2 = number_min(X2),
- Max2 = number_max(X2),
+arith_bor(X1, X2, Opaques) ->
+ L1 = t_number_vals(X1, Opaques),
+ L2 = t_number_vals(X2, Opaques),
+ Min1 = number_min(X1, Opaques),
+ Max1 = number_max(X1, Opaques),
+ Min2 = number_min(X2, Opaques),
+ Max2 = number_max(X2, Opaques),
case {L1 =:= unknown, L2 =:= unknown} of
{true, false} ->
arith_bor_range_set(arith_bor_ranges(Min1, Max1, Min2, Max2), L2);
@@ -1967,19 +2061,19 @@ arith_bor_ranges(Min1, Max1, Min2, Max2) ->
end,
{Min, Max}.
-arith(Op, X1, X2) ->
+arith(Op, X1, X2, Opaques) ->
%% io:format("arith ~p ~p ~p~n", [Op, X1, X2]),
- case t_is_integer(X1) andalso t_is_integer(X2) of
+ case t_is_integer(X1, Opaques) andalso t_is_integer(X2, Opaques) of
false -> error;
true ->
- L1 = t_number_vals(X1),
- L2 = t_number_vals(X2),
+ L1 = t_number_vals(X1, Opaques),
+ L2 = t_number_vals(X2, Opaques),
case (L1 =:= unknown) orelse (L2 =:= unknown) of
true ->
- Min1 = number_min(X1),
- Max1 = number_max(X1),
- Min2 = number_min(X2),
- Max2 = number_max(X2),
+ Min1 = number_min(X1, Opaques),
+ Max1 = number_max(X1, Opaques),
+ Min2 = number_min(X2, Opaques),
+ Max2 = number_max(X2, Opaques),
{NewMin, NewMax} =
case Op of
'+' -> {infinity_add(Min1, Min2), infinity_add(Max1, Max2)};
@@ -1992,8 +2086,8 @@ arith(Op, X1, X2) ->
'bsr' -> NewMin2 = infinity_inv(Max2),
NewMax2 = infinity_inv(Min2),
arith_bsl(Min1, Max1, NewMin2, NewMax2);
- 'band' -> arith_band(X1, X2);
- 'bor' -> arith_bor(X1, X2);
+ 'band' -> arith_band(X1, X2, Opaques);
+ 'bor' -> arith_bor(X1, X2, Opaques);
'bxor' -> arith_bor_ranges(Min1, Max1, Min2, Max2) %% overaprox.
end,
%% io:format("done arith ~p = ~p~n", [Op, {NewMin, NewMax}]),
@@ -2025,58 +2119,62 @@ arith(Op, X1, X2) ->
%% Comparison of terms
%%=============================================================================
-compare(Op, Lhs, Rhs) ->
- case t_is_none(t_inf(Lhs, Rhs)) of
+compare(Op, Lhs, Rhs, Opaques) ->
+ case t_is_none(t_inf(Lhs, Rhs, Opaques)) of
false -> t_boolean();
true ->
- case Op of
- '<' -> always_smaller(Lhs, Rhs);
- '>' -> always_smaller(Rhs, Lhs);
- '=<' -> always_smaller(Lhs, Rhs);
- '>=' -> always_smaller(Rhs, Lhs)
+ case opaque_args(erlang, Op, 2, [Lhs, Rhs], Opaques) =:= [] of
+ true ->
+ case Op of
+ '<' -> always_smaller(Lhs, Rhs, Opaques);
+ '>' -> always_smaller(Rhs, Lhs, Opaques);
+ '=<' -> always_smaller(Lhs, Rhs, Opaques);
+ '>=' -> always_smaller(Rhs, Lhs, Opaques)
+ end;
+ false -> t_none()
end
end.
-always_smaller(Type1, Type2) ->
- {Min1, Max1} = type_ranks(Type1),
- {Min2, Max2} = type_ranks(Type2),
+always_smaller(Type1, Type2, Opaques) ->
+ {Min1, Max1} = type_ranks(Type1, Opaques),
+ {Min2, Max2} = type_ranks(Type2, Opaques),
if Max1 < Min2 -> t_atom('true');
Min1 > Max2 -> t_atom('false');
true -> t_boolean()
end.
-type_ranks(Type) ->
- type_ranks(Type, 1, 0, 0, type_order()).
+type_ranks(Type, Opaques) ->
+ type_ranks(Type, 1, 0, 0, type_order(), Opaques).
-type_ranks(_Type, _I, Min, Max, []) -> {Min, Max};
-type_ranks(Type, I, Min, Max, [TypeClass|Rest]) ->
+type_ranks(_Type, _I, Min, Max, [], _Opaques) -> {Min, Max};
+type_ranks(Type, I, Min, Max, [TypeClass|Rest], Opaques) ->
{NewMin, NewMax} =
- case t_is_none(t_inf(Type, TypeClass)) of
+ case t_is_none(t_inf(Type, TypeClass, Opaques)) of
true -> {Min, Max};
false -> case Min of
0 -> {I, I};
_ -> {Min, I}
end
end,
- type_ranks(Type, I+1, NewMin, NewMax, Rest).
+ type_ranks(Type, I+1, NewMin, NewMax, Rest, Opaques).
type_order() ->
[t_number(), t_atom(), t_reference(), t_fun(), t_port(), t_pid(), t_tuple(),
t_list(), t_binary()].
-key_comparisons_fail(X0, KeyPos, TupleList) ->
- X = case t_is_number(t_inf(X0, t_number())) of
+key_comparisons_fail(X0, KeyPos, TupleList, Opaques) ->
+ X = case t_is_number(t_inf(X0, t_number(), Opaques), Opaques) of
false -> X0;
true -> t_number()
end,
lists:all(fun(Tuple) ->
Key = type(erlang, element, 2, [KeyPos, Tuple]),
- t_is_none(t_inf(Key, X))
+ t_is_none(t_inf(Key, X, Opaques))
end, TupleList).
%%=============================================================================
--spec arg_types(atom(), atom(), arity()) -> [erl_types:erl_type()] | 'unknown'.
+-spec arg_types(atom(), atom(), arity()) -> arg_types() | 'unknown'.
%%------- erlang --------------------------------------------------------------
arg_types(erlang, '!', 2) ->
@@ -2213,6 +2311,8 @@ arg_types(erlang, is_integer, 1) ->
[t_any()];
arg_types(erlang, is_list, 1) ->
[t_any()];
+arg_types(erlang, is_map, 1) ->
+ [t_any()];
arg_types(erlang, is_number, 1) ->
[t_any()];
arg_types(erlang, is_pid, 1) ->
@@ -2230,6 +2330,9 @@ arg_types(erlang, is_tuple, 1) ->
%% Guard bif, needs to be here.
arg_types(erlang, length, 1) ->
[t_list()];
+%% Guard bif, needs to be here.
+arg_types(erlang, map_size, 1) ->
+ [t_map()];
arg_types(erlang, make_tuple, 2) ->
[t_non_neg_fixnum(), t_any()]; % the value 0 is OK as first argument
arg_types(erlang, make_tuple, 3) ->
@@ -2351,12 +2454,12 @@ arg_types(hipe_bifs, fun_to_address, 1) ->
[t_mfa()];
%% arg_types(hipe_bifs, get_emu_address, 1) ->
%% [t_mfa()];
+arg_types(hipe_bifs, get_fe, 2) ->
+ [t_atom(), t_tuple([t_integer(), t_integer(), t_integer()])];
arg_types(hipe_bifs, get_rts_param, 1) ->
[t_fixnum()];
arg_types(hipe_bifs, invalidate_funinfo_native_addresses, 1) ->
[t_list(t_mfa())];
-arg_types(hipe_bifs, make_fe, 3) ->
- [t_integer(), t_atom(), t_tuple([t_integer(), t_integer(), t_integer()])];
%% arg_types(hipe_bifs, make_native_stub, 2) ->
%% [t_integer(), t_arity()];
arg_types(hipe_bifs, mark_referred_from, 1) ->
@@ -2385,6 +2488,8 @@ arg_types(hipe_bifs, set_funinfo_native_address, 3) ->
arg_types(hipe_bifs, set_native_address, 3);
arg_types(hipe_bifs, set_native_address, 3) ->
[t_mfa(), t_integer(), t_boolean()];
+arg_types(hipe_bifs, set_native_address_in_fe, 2) ->
+ [t_integer(), t_integer()];
arg_types(hipe_bifs, system_crc, 1) ->
[t_crc32()];
arg_types(hipe_bifs, term_to_word, 1) ->
@@ -2508,47 +2613,78 @@ arg_types(M, F, A) when is_atom(M), is_atom(F),
unknown. % safe approximation for all functions.
--spec is_known(atom(), atom(), arity()) -> boolean().
+-spec is_known(module(), atom(), arity()) -> boolean().
is_known(M, F, A) ->
arg_types(M, F, A) =/= unknown.
+-spec opaque_args(module(), atom(), arity(),
+ arg_types(), opaques()) -> [pos_integer()].
+
+%% Use this function to find out which argument caused empty type.
+
+opaque_args(_M, _F, _A, _Xs, 'universe') -> [];
+opaque_args(M, F, A, Xs, Opaques) ->
+ case kind_of_check(M, F, A) of
+ record ->
+ [X,Y|_] = Xs,
+ [1 ||
+ case t_is_tuple(X, Opaques) of
+ true ->
+ case t_tuple_subtypes(X, Opaques) of
+ unknown -> false;
+ List when length(List) >= 1 -> opaque_recargs(List, Y, Opaques)
+ end;
+ false -> t_has_opaque_subtype(X, Opaques)
+ end];
+ subtype ->
+ [N ||
+ {N, X} <- lists:zip(lists:seq(1, length(Xs)), Xs),
+ t_has_opaque_subtype(X, Opaques)];
+ find_unknown ->
+ [L, R] = Xs,
+ erl_types:t_find_unknown_opaque(L, R, Opaques);
+ no_check -> []
+ end.
--spec structure_inspecting_args(atom(), atom(), arity()) -> [1..255].
-
-structure_inspecting_args(erlang, element, 2) -> [2];
-structure_inspecting_args(erlang, is_atom, 1) -> [1];
-structure_inspecting_args(erlang, is_boolean, 1) -> [1];
-structure_inspecting_args(erlang, is_binary, 1) -> [1];
-structure_inspecting_args(erlang, is_bitstring, 1) -> [1];
-structure_inspecting_args(erlang, is_float, 1) -> [1];
-structure_inspecting_args(erlang, is_function, 1) -> [1];
-structure_inspecting_args(erlang, is_integer, 1) -> [1];
-structure_inspecting_args(erlang, is_list, 1) -> [1];
-structure_inspecting_args(erlang, is_number, 1) -> [1];
-structure_inspecting_args(erlang, is_pid, 1) -> [1];
-structure_inspecting_args(erlang, is_port, 1) -> [1];
-structure_inspecting_args(erlang, is_reference, 1) -> [1];
-structure_inspecting_args(erlang, is_tuple, 1) -> [1];
-structure_inspecting_args(erlang, length, 1) -> [1];
-%%structure_inspecting_args(erlang, setelement, 3) -> [2].
-structure_inspecting_args(_, _, _) -> []. % XXX: assume no arg needs inspection
-
-
-check_fun_application(Fun, Args) ->
- case t_is_fun(Fun) of
+kind_of_check(erlang, is_record, 3) ->
+ record;
+kind_of_check(erlang, is_record, 2) ->
+ record;
+kind_of_check(erlang, F, A) ->
+ case erl_internal:guard_bif(F, A) orelse erl_internal:bool_op(F, A) of
+ true -> subtype;
+ false ->
+ case erl_internal:comp_op(F, A) of
+ true -> find_unknown;
+ false -> no_check
+ end
+ end;
+kind_of_check(_M, _F, _A) -> no_check.
+
+opaque_recargs(Tuples, Y, Opaques) ->
+ Fun = fun(Tuple) ->
+ case t_tuple_args(Tuple, Opaques) of
+ [Tag|_] -> t_is_none(check_record_tag(Tag, Y, Opaques));
+ _ -> false
+ end
+ end,
+ lists:all(Fun, Tuples).
+
+check_fun_application(Fun, Args, Opaques) ->
+ case t_is_fun(Fun, Opaques) of
true ->
- case t_fun_args(Fun) of
+ case t_fun_args(Fun, Opaques) of
unknown ->
- case t_is_none_or_unit(t_fun_range(Fun)) of
+ case t_is_none_or_unit(t_fun_range(Fun, Opaques)) of
true -> error;
false -> ok
end;
FunDom when length(FunDom) =:= length(Args) ->
- case any_is_none_or_unit(inf_lists(FunDom, Args)) of
+ case any_is_none_or_unit(inf_lists(FunDom, Args, Opaques)) of
true -> error;
false ->
- case t_is_none_or_unit(t_fun_range(Fun)) of
+ case t_is_none_or_unit(t_fun_range(Fun, Opaques)) of
true -> error;
false -> ok
end
diff --git a/lib/hipe/cerl/erl_types.erl b/lib/hipe/cerl/erl_types.erl
index d7d8a878c5..67661130a5 100644
--- a/lib/hipe/cerl/erl_types.erl
+++ b/lib/hipe/cerl/erl_types.erl
@@ -2,7 +2,7 @@
%%
%% %CopyrightBegin%
%%
-%% Copyright Ericsson AB 2003-2013. All Rights Reserved.
+%% Copyright Ericsson AB 2003-2014. 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
@@ -42,15 +42,15 @@
max/2,
module_builtin_opaques/1,
min/2,
- number_max/1,
- number_min/1,
+ number_max/1, number_max/2,
+ number_min/1, number_min/2,
t_abstract_records/2,
t_any/0,
t_arity/0,
t_atom/0,
t_atom/1,
t_atoms/1,
- t_atom_vals/1,
+ t_atom_vals/1, t_atom_vals/2,
t_binary/0,
t_bitstr/0,
t_bitstr/2,
@@ -66,12 +66,14 @@
t_collect_vars/1,
t_cons/0,
t_cons/2,
- t_cons_hd/1,
- t_cons_tl/1,
+ t_cons_hd/1, t_cons_hd/2,
+ t_cons_tl/1, t_cons_tl/2,
t_constant/0,
- t_contains_opaque/1,
+ t_contains_opaque/1, t_contains_opaque/2,
+ t_decorate_with_opaque/3,
t_elements/1,
t_find_opaque_mismatch/2,
+ t_find_unknown_opaque/3,
t_fixnum/0,
t_map/2,
t_non_neg_fixnum/0,
@@ -87,18 +89,18 @@
t_fun/0,
t_fun/1,
t_fun/2,
- t_fun_args/1,
- t_fun_arity/1,
- t_fun_range/1,
- t_has_opaque_subtype/1,
+ t_fun_args/1, t_fun_args/2,
+ t_fun_arity/1, t_fun_arity/2,
+ t_fun_range/1, t_fun_range/2,
+ t_has_opaque_subtype/2,
t_has_var/1,
t_identifier/0,
%% t_improper_list/2,
- t_inf/2,
- t_inf/3,
- t_inf_lists/2,
- t_inf_lists/3,
- t_inf_lists_masked/3,
+ t_inf/1,
+ t_inf/2,
+ t_inf/3,
+ t_inf_lists/2,
+ t_inf_lists/3,
t_integer/0,
t_integer/1,
t_non_neg_integer/0,
@@ -107,45 +109,49 @@
t_iodata/0,
t_iolist/0,
t_is_any/1,
- t_is_atom/1,
- t_is_atom/2,
- t_is_binary/1,
- t_is_bitstr/1,
+ t_is_atom/1, t_is_atom/2,
+ t_is_any_atom/2, t_is_any_atom/3,
+ t_is_binary/1, t_is_binary/2,
+ t_is_bitstr/1, t_is_bitstr/2,
t_is_bitwidth/1,
- t_is_boolean/1,
+ t_is_boolean/1, t_is_boolean/2,
%% t_is_byte/1,
%% t_is_char/1,
- t_is_cons/1,
+ t_is_cons/1, t_is_cons/2,
t_is_constant/1,
t_is_equal/2,
t_is_fixnum/1,
- t_is_float/1,
- t_is_fun/1,
+ t_is_float/1, t_is_float/2,
+ t_is_fun/1, t_is_fun/2,
t_is_instance/2,
- t_is_integer/1,
+ t_is_integer/1, t_is_integer/2,
t_is_list/1,
+ t_is_map/1,
+ t_is_map/2,
t_is_matchstate/1,
- t_is_nil/1,
+ t_is_nil/1, t_is_nil/2,
t_is_non_neg_integer/1,
t_is_none/1,
t_is_none_or_unit/1,
- t_is_number/1,
- t_is_opaque/1,
- t_is_pid/1,
- t_is_port/1,
- t_is_maybe_improper_list/1,
- t_is_reference/1,
+ t_is_number/1, t_is_number/2,
+ t_is_opaque/1, t_is_opaque/2,
+ t_is_pid/1, t_is_pid/2,
+ t_is_port/1, t_is_port/2,
+ t_is_maybe_improper_list/1, t_is_maybe_improper_list/2,
+ t_is_reference/1, t_is_reference/2,
t_is_remote/1,
t_is_string/1,
t_is_subtype/2,
- t_is_tuple/1,
+ t_is_tuple/1, t_is_tuple/2,
t_is_unit/1,
t_is_var/1,
t_limit/2,
t_list/0,
t_list/1,
- t_list_elements/1,
+ t_list_elements/1, t_list_elements/2,
t_list_termination/1,
+ t_map/0,
+ t_map/1,
t_matchstate/0,
t_matchstate/2,
t_matchstate_present/1,
@@ -163,11 +169,8 @@
t_nonempty_string/0,
t_number/0,
t_number/1,
- t_number_vals/1,
+ t_number_vals/1, t_number_vals/2,
t_opaque_from_records/1,
- t_opaque_match_atom/2,
- t_opaque_match_record/2,
- t_opaque_matching_structure/2,
t_opaque_structure/1,
%% t_parameterized_module/0,
t_pid/0,
@@ -192,23 +195,23 @@
t_to_tlist/1,
t_tuple/0,
t_tuple/1,
- t_tuple_args/1,
- t_tuple_size/1,
+ t_tuple_args/1, t_tuple_args/2,
+ t_tuple_size/1, t_tuple_size/2,
t_tuple_sizes/1,
t_tuple_subtypes/1,
+ t_tuple_subtypes/2,
t_unify/2,
- t_unify/3,
t_unit/0,
- t_unopaque/1,
- t_unopaque/2,
- t_unopaque_on_mismatch/3,
+ t_unopaque/1, t_unopaque/2,
t_var/1,
t_var_name/1,
%% t_assign_variables_to_subtype/2,
type_is_defined/4,
record_field_diffs_to_string/2,
subst_all_vars_to_any/1,
+ subst_all_remote/2,
lift_list_to_pos_empty/1,
+ is_opaque_type/2,
is_erl_type/1,
atom_to_string/1
]).
@@ -226,7 +229,15 @@
-export([t_is_identifier/1]).
-endif.
--export_type([erl_type/0]).
+-export_type([erl_type/0, type_table/0, var_table/0]).
+
+%%-define(DEBUG, true).
+
+-ifdef(DEBUG).
+-define(debug(__A), __A).
+-else.
+-define(debug(__A), ok).
+-endif.
%%=============================================================================
%%
@@ -260,6 +271,7 @@
-define(function_tag, function).
-define(identifier_tag, identifier).
-define(list_tag, list).
+-define(map_tag, map).
-define(matchstate_tag, matchstate).
-define(nil_tag, nil).
-define(number_tag, number).
@@ -272,7 +284,7 @@
-define(var_tag, var).
-type tag() :: ?atom_tag | ?binary_tag | ?function_tag | ?identifier_tag
- | ?list_tag | ?matchstate_tag | ?nil_tag | ?number_tag
+ | ?list_tag | ?map_tag | ?matchstate_tag | ?nil_tag | ?number_tag
| ?opaque_tag | ?product_tag | ?remote_tag
| ?tuple_tag | ?tuple_set_tag | ?union_tag | ?var_tag.
@@ -310,6 +322,9 @@
-record(int_set, {set :: [integer()]}).
-record(int_rng, {from :: rng_elem(), to :: rng_elem()}).
+%% Note: the definition of #opaque{} was changed to 'mod' and 'name';
+%% it used to be an ordsets of {Mod, Name} pairs. The Dialyzer version
+%% was updated to 2.7 due to this change.
-record(opaque, {mod :: module(), name :: atom(),
args = [] :: [erl_type()], struct :: erl_type()}).
-record(remote, {mod:: module(), name :: atom(), args = [] :: [erl_type()]}).
@@ -329,6 +344,7 @@
-define(nonempty_list(Types, Term),?list(Types, Term, ?nonempty_qual)).
-define(number(Set, Qualifier), #c{tag=?number_tag, elements=Set,
qualifier=Qualifier}).
+-define(map(Pairs), #c{tag=?map_tag, elements=Pairs}).
-define(opaque(Optypes), #c{tag=?opaque_tag, elements=Optypes}).
-define(product(Types), #c{tag=?product_tag, elements=Types}).
-define(remote(RemTypes), #c{tag=?remote_tag, elements=RemTypes}).
@@ -346,22 +362,34 @@
-define(integer_non_neg, ?int_range(0, pos_inf)).
-define(integer_neg, ?int_range(neg_inf, -1)).
+-type opaques() :: [erl_type()] | 'universe'.
+
+-type record_key() :: {'record', atom()}.
+-type type_key() :: {'type' | 'opaque', atom(), arity()}.
+-type record_value() :: orddict:orddict(). % XXX. To be refined
+-type type_value() :: {module(), erl_type(), atom()}.
+-type type_table() :: dict:dict(record_key(), record_value())
+ | dict:dict(type_key(), type_value()).
+
+-type var_table() :: dict:dict(atom(), erl_type()).
+
%%-----------------------------------------------------------------------------
%% Unions
%%
--define(union(List), #c{tag=?union_tag, elements=[_,_,_,_,_,_,_,_,_,_]=List}).
-
--define(atom_union(T), ?union([T,?none,?none,?none,?none,?none,?none,?none,?none,?none])).
--define(bitstr_union(T), ?union([?none,T,?none,?none,?none,?none,?none,?none,?none,?none])).
--define(function_union(T), ?union([?none,?none,T,?none,?none,?none,?none,?none,?none,?none])).
--define(identifier_union(T), ?union([?none,?none,?none,T,?none,?none,?none,?none,?none,?none])).
--define(list_union(T), ?union([?none,?none,?none,?none,T,?none,?none,?none,?none,?none])).
--define(number_union(T), ?union([?none,?none,?none,?none,?none,T,?none,?none,?none,?none])).
--define(tuple_union(T), ?union([?none,?none,?none,?none,?none,?none,T,?none,?none,?none])).
--define(matchstate_union(T), ?union([?none,?none,?none,?none,?none,?none,?none,T,?none,?none])).
--define(opaque_union(T), ?union([?none,?none,?none,?none,?none,?none,?none,?none,T,?none])).
--define(remote_union(T), ?union([?none,?none,?none,?none,?none,?none,?none,?none,?none,T])).
+-define(union(List), #c{tag=?union_tag, elements=[_,_,_,_,_,_,_,_,_,_,_]=List}).
+
+-define(atom_union(T), ?union([T,?none,?none,?none,?none,?none,?none,?none,?none,?none,?none])).
+-define(bitstr_union(T), ?union([?none,T,?none,?none,?none,?none,?none,?none,?none,?none,?none])).
+-define(function_union(T), ?union([?none,?none,T,?none,?none,?none,?none,?none,?none,?none,?none])).
+-define(identifier_union(T), ?union([?none,?none,?none,T,?none,?none,?none,?none,?none,?none,?none])).
+-define(list_union(T), ?union([?none,?none,?none,?none,T,?none,?none,?none,?none,?none,?none])).
+-define(number_union(T), ?union([?none,?none,?none,?none,?none,T,?none,?none,?none,?none,?none])).
+-define(tuple_union(T), ?union([?none,?none,?none,?none,?none,?none,T,?none,?none,?none,?none])).
+-define(matchstate_union(T), ?union([?none,?none,?none,?none,?none,?none,?none,T,?none,?none,?none])).
+-define(opaque_union(T), ?union([?none,?none,?none,?none,?none,?none,?none,?none,T,?none,?none])).
+-define(remote_union(T), ?union([?none,?none,?none,?none,?none,?none,?none,?none,?none,T,?none])).
+-define(map_union(T), ?union([?none,?none,?none,?none,?none,?none,?none,?none,?none,?none,T])).
-define(integer_union(T), ?number_union(T)).
-define(float_union(T), ?number_union(T)).
-define(nil_union(T), ?list_union(T)).
@@ -384,8 +412,11 @@ t_any() ->
-spec t_is_any(erl_type()) -> boolean().
-t_is_any(?any) -> true;
-t_is_any(_) -> false.
+t_is_any(Type) ->
+ do_opaque(Type, 'universe', fun is_any/1).
+
+is_any(?any) -> true;
+is_any(_) -> false.
-spec t_none() -> erl_type().
@@ -407,16 +438,25 @@ t_opaque(Mod, Name, Args, Struct) ->
O = #opaque{mod = Mod, name = Name, args = Args, struct = Struct},
?opaque(set_singleton(O)).
+-spec t_is_opaque(erl_type(), [erl_type()]) -> boolean().
+
+t_is_opaque(?opaque(_) = Type, Opaques) ->
+ not is_opaque_type(Type, Opaques);
+t_is_opaque(_Type, _Opaques) -> false.
+
-spec t_is_opaque(erl_type()) -> boolean().
t_is_opaque(?opaque(_)) -> true;
t_is_opaque(_) -> false.
--spec t_has_opaque_subtype(erl_type()) -> boolean().
+-spec t_has_opaque_subtype(erl_type(), opaques()) -> boolean().
+
+t_has_opaque_subtype(Type, Opaques) ->
+ do_opaque(Type, Opaques, fun has_opaque_subtype/1).
-t_has_opaque_subtype(?union(Ts)) ->
+has_opaque_subtype(?union(Ts)) ->
lists:any(fun t_is_opaque/1, Ts);
-t_has_opaque_subtype(T) ->
+has_opaque_subtype(T) ->
t_is_opaque(T).
-spec t_opaque_structure(erl_type()) -> erl_type().
@@ -424,74 +464,65 @@ t_has_opaque_subtype(T) ->
t_opaque_structure(?opaque(Elements)) ->
t_sup([Struct || #opaque{struct = Struct} <- ordsets:to_list(Elements)]).
--spec t_opaque_module(erl_type()) -> module().
+-spec t_opaque_modules(erl_type()) -> [module()].
-t_opaque_module(?opaque(Elements)) ->
+t_opaque_modules(?opaque(Elements)) ->
case ordsets:size(Elements) of
1 ->
- [#opaque{mod = Module}] = ordsets:to_list(Elements),
- Module;
+ [#opaque{mod = Mod}] = set_to_list(Elements),
+ [Mod];
_ -> throw({error, "Unexpected multiple opaque types"})
end.
-%% This only makes sense if we know that Type matches Opaque
--spec t_opaque_matching_structure(erl_type(), erl_type()) -> erl_type().
-
-t_opaque_matching_structure(Type, Opaque) ->
- OpaqueStruct = t_opaque_structure(Opaque),
- case OpaqueStruct of
- ?union(L1) ->
- case Type of
- ?union(_L2) -> OpaqueStruct;
- _OtherType -> t_opaque_matching_structure_list(Type, L1)
- end;
- ?tuple_set(_Set1) = TupleSet ->
- case Type of
- ?tuple_set(_Set2) -> OpaqueStruct;
- _ -> t_opaque_matching_structure_list(Type, t_tuple_subtypes(TupleSet))
- end;
- _Other -> OpaqueStruct
- end.
-
-t_opaque_matching_structure_list(Type, List) ->
- NewList = [t_inf(Element, Type) || Element <- List],
- Results = [NotNone || NotNone <- NewList, NotNone =/= ?none],
- case Results of
- [] -> ?none;
- [First|_] -> First
- end.
-
-spec t_contains_opaque(erl_type()) -> boolean().
-t_contains_opaque(?any) -> false;
-t_contains_opaque(?none) -> false;
-t_contains_opaque(?unit) -> false;
-t_contains_opaque(?atom(_Set)) -> false;
-t_contains_opaque(?bitstr(_Unit, _Base)) -> false;
-t_contains_opaque(?float) -> false;
-t_contains_opaque(?function(Domain, Range)) ->
- t_contains_opaque(Domain) orelse t_contains_opaque(Range);
-t_contains_opaque(?identifier(_Types)) -> false;
-t_contains_opaque(?integer(_Types)) -> false;
-t_contains_opaque(?int_range(_From, _To)) -> false;
-t_contains_opaque(?int_set(_Set)) -> false;
-t_contains_opaque(?list(Type, _, _)) -> t_contains_opaque(Type);
-t_contains_opaque(?matchstate(_P, _Slots)) -> false;
-t_contains_opaque(?nil) -> false;
-t_contains_opaque(?number(_Set, _Tag)) -> false;
-t_contains_opaque(?opaque(_)) -> true;
-t_contains_opaque(?product(Types)) -> list_contains_opaque(Types);
-t_contains_opaque(?tuple(?any, _, _)) -> false;
-t_contains_opaque(?tuple(Types, _, _)) -> list_contains_opaque(Types);
-t_contains_opaque(?tuple_set(_Set) = T) ->
- list_contains_opaque(t_tuple_subtypes(T));
-t_contains_opaque(?union(List)) -> list_contains_opaque(List);
-t_contains_opaque(?var(_Id)) -> false.
-
--spec list_contains_opaque([erl_type()]) -> boolean().
-
-list_contains_opaque(List) ->
- lists:any(fun t_contains_opaque/1, List).
+t_contains_opaque(Type) ->
+ t_contains_opaque(Type, []).
+
+%% Returns 'true' iff there is an opaque type that is *not* one of
+%% the types of the second argument.
+
+-spec t_contains_opaque(erl_type(), [erl_type()]) -> boolean().
+
+t_contains_opaque(?any, _Opaques) -> false;
+t_contains_opaque(?none, _Opaques) -> false;
+t_contains_opaque(?unit, _Opaques) -> false;
+t_contains_opaque(?atom(_Set), _Opaques) -> false;
+t_contains_opaque(?bitstr(_Unit, _Base), _Opaques) -> false;
+t_contains_opaque(?float, _Opaques) -> false;
+t_contains_opaque(?function(Domain, Range), Opaques) ->
+ t_contains_opaque(Domain, Opaques)
+ orelse t_contains_opaque(Range, Opaques);
+t_contains_opaque(?identifier(_Types), _Opaques) -> false;
+t_contains_opaque(?integer(_Types), _Opaques) -> false;
+t_contains_opaque(?int_range(_From, _To), _Opaques) -> false;
+t_contains_opaque(?int_set(_Set), _Opaques) -> false;
+t_contains_opaque(?list(Type, Tail, _), Opaques) ->
+ t_contains_opaque(Type, Opaques) orelse t_contains_opaque(Tail, Opaques);
+t_contains_opaque(?map(_) = Map, Opaques) ->
+ list_contains_opaque(map_values(Map), Opaques) orelse
+ list_contains_opaque(map_keys(Map), Opaques);
+t_contains_opaque(?matchstate(_P, _Slots), _Opaques) -> false;
+t_contains_opaque(?nil, _Opaques) -> false;
+t_contains_opaque(?number(_Set, _Tag), _Opaques) -> false;
+t_contains_opaque(?opaque(_)=T, Opaques) ->
+ not is_opaque_type(T, Opaques)
+ orelse t_contains_opaque(t_opaque_structure(T));
+t_contains_opaque(?product(Types), Opaques) ->
+ list_contains_opaque(Types, Opaques);
+t_contains_opaque(?tuple(?any, _, _), _Opaques) -> false;
+t_contains_opaque(?tuple(Types, _, _), Opaques) ->
+ list_contains_opaque(Types, Opaques);
+t_contains_opaque(?tuple_set(_Set) = T, Opaques) ->
+ list_contains_opaque(t_tuple_subtypes(T), Opaques);
+t_contains_opaque(?union(List), Opaques) ->
+ list_contains_opaque(List, Opaques);
+t_contains_opaque(?var(_Id), _Opaques) -> false.
+
+-spec list_contains_opaque([erl_type()], [erl_type()]) -> boolean().
+
+list_contains_opaque(List, Opaques) ->
+ lists:any(fun(E) -> t_contains_opaque(E, Opaques) end, List).
%% t_find_opaque_mismatch/2 of two types should only be used if their
%% t_inf is t_none() due to some opaque type violation.
@@ -506,9 +537,12 @@ t_find_opaque_mismatch(T1, T2) ->
t_find_opaque_mismatch(?any, _Type, _TopType) -> error;
t_find_opaque_mismatch(?none, _Type, _TopType) -> error;
-t_find_opaque_mismatch(?list(T1, _, _), ?list(T2, _, _), TopType) ->
- t_find_opaque_mismatch(T1, T2, TopType);
+t_find_opaque_mismatch(?list(T1, Tl1, _), ?list(T2, Tl2, _), TopType) ->
+ t_find_opaque_mismatch_ordlists([T1, Tl1], [T2, Tl2], TopType);
t_find_opaque_mismatch(_T1, ?opaque(_) = T2, TopType) -> {ok, TopType, T2};
+t_find_opaque_mismatch(?opaque(_) = T1, _T2, TopType) ->
+ %% The generated message is somewhat misleading:
+ {ok, TopType, T1};
t_find_opaque_mismatch(?product(T1), ?product(T2), TopType) ->
t_find_opaque_mismatch_ordlists(T1, T2, TopType);
t_find_opaque_mismatch(?tuple(T1, Arity, _), ?tuple(T2, Arity, _), TopType) ->
@@ -538,7 +572,169 @@ t_find_opaque_mismatch_list([H|T]) ->
error -> t_find_opaque_mismatch_list(T)
end.
--spec t_opaque_from_records(dict()) -> [erl_type()].
+-spec t_find_unknown_opaque(erl_type(), erl_type(), opaques()) ->
+ [pos_integer()].
+
+%% The nice thing about using two types and t_inf() as compared to
+%% calling t_contains_opaque/2 is that the traversal stops when
+%% there is a mismatch which means that unknown opaque types "below"
+%% the mismatch are not found.
+%% XXX. Returns one element even if both oparands contain opaque types.
+%% XXX. Slow since t_inf() is called but the results are ignored.
+t_find_unknown_opaque(_T1, _T2, 'universe') -> [];
+t_find_unknown_opaque(T1, T2, Opaques) ->
+ try t_inf(T1, T2, {match, Opaques}) of
+ _ -> []
+ catch throw:N when is_integer(N) -> [N]
+ end.
+
+-spec t_decorate_with_opaque(erl_type(), erl_type(), [erl_type()]) -> erl_type().
+
+%% The first argument can contain opaque types. The second argument
+%% is assumed to be taken from the contract.
+
+t_decorate_with_opaque(T1, T2, Opaques) ->
+ case t_is_equal(T1, T2) orelse not t_contains_opaque(T2) of
+ true -> T1;
+ false ->
+ T = t_inf(T1, T2),
+ case t_contains_opaque(T) of
+ false -> T1;
+ true ->
+ R = decorate(T1, T, Opaques),
+ ?debug(case catch t_is_equal(t_unopaque(R), t_unopaque(T1)) of
+ true -> ok;
+ false ->
+ io:format("T1 = ~p,\n", [T1]),
+ io:format("T2 = ~p,\n", [T2]),
+ io:format("O = ~p,\n", [Opaques]),
+ io:format("erl_types:t_decorate_with_opaque(T1,T2,O).\n"),
+ throw({error, "Failed to handle opaque types"})
+ end),
+ R
+ end
+ end.
+
+decorate(Type, ?none, _Opaques) -> Type;
+decorate(?function(Domain, Range), ?function(D, R), Opaques) ->
+ ?function(decorate(Domain, D, Opaques), decorate(Range, R, Opaques));
+decorate(?list(Types, Tail, Size), ?list(Ts, Tl, _Sz), Opaques) ->
+ ?list(decorate(Types, Ts, Opaques), decorate(Tail, Tl, Opaques), Size);
+decorate(?product(Types), ?product(Ts), Opaques) ->
+ ?product(list_decorate(Types, Ts, Opaques));
+decorate(?tuple(_, _, _)=T, ?tuple(?any, _, _), _Opaques) -> T;
+decorate(?tuple(?any, _, _)=T, ?tuple(_, _, _), _Opaques) -> T;
+decorate(?tuple(Types, Arity, Tag), ?tuple(Ts, Arity, _), Opaques) ->
+ ?tuple(list_decorate(Types, Ts, Opaques), Arity, Tag);
+decorate(?tuple_set(List), ?tuple(_, Arity, _) = T, Opaques) ->
+ decorate_tuple_sets(List, [{Arity, [T]}], Opaques);
+decorate(?tuple_set(List), ?tuple_set(L), Opaques) ->
+ decorate_tuple_sets(List, L, Opaques);
+decorate(?union(List), T, Opaques) when T =/= ?any ->
+ ?union(L) = force_union(T),
+ union_decorate(List, L, Opaques);
+decorate(?opaque(_)=T, _, _Opaques) -> T;
+decorate(T, ?union(L), Opaques) when T =/= ?any ->
+ ?union(List) = force_union(T),
+ union_decorate(List, L, Opaques);
+decorate(Type, ?opaque(_)=T, Opaques) ->
+ decorate_with_opaque(Type, T, Opaques);
+decorate(Type, _T, _Opaques) -> Type.
+
+%% Note: it is important that #opaque.struct is a subtype of the
+%% opaque type.
+decorate_with_opaque(Type, ?opaque(Set2), Opaques) ->
+ case decoration(set_to_list(Set2), Type, Opaques, [], false) of
+ {[], false} -> Type;
+ {List, All} when List =/= [] ->
+ NewType = ?opaque(ordsets:from_list(List)),
+ case All of
+ true -> NewType;
+ false -> t_sup(NewType, Type)
+ end
+ end.
+
+decoration([#opaque{struct = S} = Opaque|OpaqueTypes], Type, Opaques,
+ NewOpaqueTypes0, All) ->
+ IsOpaque = is_opaque_type2(Opaque, Opaques),
+ I = t_inf(Type, S),
+ case not IsOpaque orelse t_is_none(I) of
+ true -> decoration(OpaqueTypes, Type, Opaques, NewOpaqueTypes0, All);
+ false ->
+ NewOpaque = Opaque#opaque{struct = decorate(I, S, Opaques)},
+ NewAll = All orelse t_is_equal(I, Type),
+ NewOpaqueTypes = [NewOpaque|NewOpaqueTypes0],
+ decoration(OpaqueTypes, Type, Opaques, NewOpaqueTypes, NewAll)
+ end;
+decoration([], _Type, _Opaques, NewOpaqueTypes, All) ->
+ {NewOpaqueTypes, All}.
+
+-spec list_decorate([erl_type()], [erl_type()], opaques()) -> [erl_type()].
+
+list_decorate(List, L, Opaques) ->
+ [decorate(Elem, E, Opaques) || {Elem, E} <- lists:zip(List, L)].
+
+union_decorate(U1, U2, Opaques) ->
+ Union = union_decorate(U1, U2, Opaques, 0, []),
+ [A,B,F,I,L,N,T,M,_,_R,Map] = U1,
+ [_,_,_,_,_,_,_,_,Opaque,_,_] = U2,
+ List = [A,B,F,I,L,N,T,M,Map],
+ DecList = [Dec ||
+ E <- List,
+ not t_is_none(E),
+ not t_is_none(Dec = decorate(E, Opaque, Opaques))],
+ t_sup([Union|DecList]).
+
+union_decorate([?none|Left1], [_|Left2], Opaques, N, Acc) ->
+ union_decorate(Left1, Left2, Opaques, N, [?none|Acc]);
+union_decorate([T1|Left1], [?none|Left2], Opaques, N, Acc) ->
+ union_decorate(Left1, Left2, Opaques, N+1, [T1|Acc]);
+union_decorate([T1|Left1], [T2|Left2], Opaques, N, Acc) ->
+ union_decorate(Left1, Left2, Opaques, N+1, [decorate(T1, T2, Opaques)|Acc]);
+union_decorate([], [], _Opaques, N, Acc) ->
+ if N =:= 0 -> ?none;
+ N =:= 1 ->
+ [Type] = [T || T <- Acc, T =/= ?none],
+ Type;
+ N >= 2 -> ?union(lists:reverse(Acc))
+ end.
+
+decorate_tuple_sets(List, L, Opaques) ->
+ decorate_tuple_sets(List, L, Opaques, []).
+
+decorate_tuple_sets([{Arity, Tuples}|List], [{Arity, Ts}|L], Opaques, Acc) ->
+ DecTs = decorate_tuples_in_sets(Tuples, Ts, Opaques),
+ decorate_tuple_sets(List, L, Opaques, [{Arity, DecTs}|Acc]);
+decorate_tuple_sets([ArTup|List], L, Opaques, Acc) ->
+ decorate_tuple_sets(List, L, Opaques, [ArTup|Acc]);
+decorate_tuple_sets([], _L, _Opaques, Acc) ->
+ ?tuple_set(lists:reverse(Acc)).
+
+decorate_tuples_in_sets([?tuple(Elements, _, ?any)], Ts, Opaques) ->
+ NewList = [list_decorate(Elements, Es, Opaques) || ?tuple(Es, _, _) <- Ts],
+ case t_sup([t_tuple(Es) || Es <- NewList]) of
+ ?tuple_set([{_Arity, Tuples}]) -> Tuples;
+ ?tuple(_, _, _)=Tuple -> [Tuple]
+ end;
+decorate_tuples_in_sets(Tuples, Ts, Opaques) ->
+ decorate_tuples_in_sets(Tuples, Ts, Opaques, []).
+
+decorate_tuples_in_sets([?tuple(Elements, Arity, Tag1) = T1|Tuples] = L1,
+ [?tuple(Es, Arity, Tag2)|Ts] = L2, Opaques, Acc) ->
+ if
+ Tag1 < Tag2 -> decorate_tuples_in_sets(Tuples, L2, Opaques, [T1|Acc]);
+ Tag1 > Tag2 -> decorate_tuples_in_sets(L1, Ts, Opaques, Acc);
+ Tag1 =:= Tag2 ->
+ NewElements = list_decorate(Elements, Es, Opaques),
+ NewAcc = [?tuple(NewElements, Arity, Tag1)|Acc],
+ decorate_tuples_in_sets(Tuples, Ts, Opaques, NewAcc)
+ end;
+decorate_tuples_in_sets([T1|Tuples], L2, Opaques, Acc) ->
+ decorate_tuples_in_sets(Tuples, L2, Opaques, [T1|Acc]);
+decorate_tuples_in_sets([], _L, _Opaques, Acc) ->
+ lists:reverse(Acc).
+
+-spec t_opaque_from_records(type_table()) -> [erl_type()].
t_opaque_from_records(RecDict) ->
OpaqueRecDict =
@@ -549,54 +745,17 @@ t_opaque_from_records(RecDict) ->
end
end, RecDict),
OpaqueTypeDict =
- dict:map(fun({opaque, Name, _Arity}, {Module, Type, ArgNames}) ->
- case ArgNames of
- [] ->
- t_opaque(Module, Name, [], t_from_form(Type, RecDict));
- _ ->
- throw({error,"Polymorphic opaque types not supported yet"})
- end
+ dict:map(fun({opaque, Name, _Arity}, {Module, _Type, ArgNames}) ->
+ %% Args = args_to_types(ArgNames),
+ %% List = lists:zip(ArgNames, Args),
+ %% TmpVarDict = dict:from_list(List),
+ %% Rep = t_from_form(Type, RecDict, TmpVarDict),
+ Rep = t_none(), % not used for anything right now
+ Args = [t_any() || _ <- ArgNames],
+ skip_opaque_alias(Rep, Module, Name, Args)
end, OpaqueRecDict),
[OpaqueType || {_Key, OpaqueType} <- dict:to_list(OpaqueTypeDict)].
--spec t_opaque_match_atom(erl_type(), [erl_type()]) -> [erl_type()].
-
-t_opaque_match_atom(?atom(_) = Atom, Opaques) ->
- case t_atom_vals(Atom) of
- unknown -> [];
- _ -> [O || O <- Opaques, t_inf(Atom, O, opaque) =/= ?none,
- t_opaque_atom_vals(t_opaque_structure(O)) =/= unknown]
- end;
-t_opaque_match_atom(_, _) -> [].
-
--spec t_opaque_atom_vals(erl_type()) -> 'unknown' | [atom(),...].
-
-t_opaque_atom_vals(OpaqueStruct) ->
- case OpaqueStruct of
- ?atom(_) -> t_atom_vals(OpaqueStruct);
- ?union([Atom,_,_,_,_,_,_,_,_,_]) -> t_atom_vals(Atom);
- _ -> unknown
- end.
-
--spec t_opaque_match_record(erl_type(), [erl_type()]) -> [erl_type()].
-
-t_opaque_match_record(?tuple([?atom(_) = Tag|_Fields], _, _) = Rec, Opaques) ->
- [O || O <- Opaques, t_inf(Rec, O, opaque) =/= ?none,
- lists:member(Tag, t_opaque_tuple_tags(t_opaque_structure(O)))];
-t_opaque_match_record(_, _) -> [].
-
--spec t_opaque_tuple_tags(erl_type()) -> [erl_type()].
-
-t_opaque_tuple_tags(OpaqueStruct) ->
- case OpaqueStruct of
- ?tuple([?atom(_) = Tag|_Fields], _, _) -> [Tag];
- ?tuple_set(_) = TupleSet ->
- Tuples = t_tuple_subtypes(TupleSet),
- lists:flatten([t_opaque_tuple_tags(T) || T <- Tuples]);
- ?union([_,_,_,_,_,_,Tuples,_,_,_]) -> t_opaque_tuple_tags(Tuples);
- _ -> []
- end.
-
%% Decompose opaque instances of type arg2 to structured types, in arg1
%% XXX: Same as t_unopaque
-spec t_struct_from_opaque(erl_type(), [erl_type()]) -> erl_type().
@@ -605,9 +764,10 @@ t_struct_from_opaque(?function(Domain, Range), Opaques) ->
?function(t_struct_from_opaque(Domain, Opaques),
t_struct_from_opaque(Range, Opaques));
t_struct_from_opaque(?list(Types, Term, Size), Opaques) ->
- ?list(t_struct_from_opaque(Types, Opaques), Term, Size);
+ ?list(t_struct_from_opaque(Types, Opaques),
+ t_struct_from_opaque(Term, Opaques), Size);
t_struct_from_opaque(?opaque(_) = T, Opaques) ->
- case lists:member(T, Opaques) of
+ case is_opaque_type(T, Opaques) of
true -> t_opaque_structure(T);
false -> T
end;
@@ -627,24 +787,10 @@ t_struct_from_opaque(Type, _Opaques) -> Type.
list_struct_from_opaque(Types, Opaques) ->
[t_struct_from_opaque(Type, Opaques) || Type <- Types].
--spec t_unopaque_on_mismatch(erl_type(), erl_type(), [erl_type()]) -> erl_type().
-
-t_unopaque_on_mismatch(GenType, Type, Opaques) ->
- case t_inf(GenType, Type) of
- ?none ->
- Unopaqued = t_unopaque(Type, Opaques),
- %% XXX: Unions might be a problem, must investigate.
- case t_inf(GenType, Unopaqued) of
- ?none -> Type;
- _ -> Unopaqued
- end;
- _ -> Type
- end.
-
-spec module_builtin_opaques(module()) -> [erl_type()].
module_builtin_opaques(Module) ->
- [O || O <- all_opaque_builtins(), t_opaque_module(O) =:= Module].
+ [O || O <- all_opaque_builtins(), lists:member(Module, t_opaque_modules(O))].
%%-----------------------------------------------------------------------------
%% Remote types: these types are used for preprocessing;
@@ -657,10 +803,15 @@ t_remote(Mod, Name, Args) ->
-spec t_is_remote(erl_type()) -> boolean().
-t_is_remote(?remote(_)) -> true;
-t_is_remote(_) -> false.
+t_is_remote(Type) ->
+ do_opaque(Type, 'universe', fun is_remote/1).
+
+is_remote(?remote(_)) -> true;
+is_remote(_) -> false.
--spec t_solve_remote(erl_type(), set(), dict()) -> erl_type().
+-type mod_records() :: dict:dict(module(), type_table()).
+
+-spec t_solve_remote(erl_type(), sets:set(mfa()), mod_records()) -> erl_type().
t_solve_remote(Type, ExpTypes, Records) ->
{RT, _RR} = t_solve_remote(Type, ExpTypes, Records, []),
@@ -697,8 +848,12 @@ t_solve_remote(?union(List), ET, R, C) ->
{t_sup(RL), RR};
t_solve_remote(T, _ET, _R, _C) -> {T, []}.
-t_solve_remote_type(#remote{mod = RemMod, name = Name, args = Args} = RemType,
+t_solve_remote_type(#remote{mod = RemMod, name = Name, args = Args0} = RemType,
ET, R, C) ->
+ Args = lists:map(fun(A) ->
+ {Arg, _} = t_solve_remote(A, ET, R, C),
+ Arg
+ end, Args0),
ArgsLen = length(Args),
case dict:find(RemMod, R) of
error ->
@@ -744,9 +899,7 @@ t_solve_remote_type(#remote{mod = RemMod, name = Name, args = Args} = RemType,
true -> t_limit(NewRep, ?REC_TYPE_LIMIT);
false -> NewRep
end,
- {t_from_form({opaque, -1, Name, {Mod, Args, RT1}},
- RemDict, TmpVarDict),
- RetRR};
+ {skip_opaque_alias(RT1, Mod, Name, Args), RetRR};
error ->
Msg = io_lib:format("Unable to find remote type ~w:~w()\n",
[RemMod, Name]),
@@ -827,40 +980,75 @@ t_atoms(List) when is_list(List) ->
-spec t_atom_vals(erl_type()) -> 'unknown' | [atom(),...].
-t_atom_vals(?atom(?any)) -> unknown;
-t_atom_vals(?atom(Set)) -> set_to_list(Set);
-t_atom_vals(Other) ->
+t_atom_vals(Type) ->
+ t_atom_vals(Type, 'universe').
+
+-spec t_atom_vals(erl_type(), opaques()) -> 'unknown' | [atom(),...].
+
+t_atom_vals(Type, Opaques) ->
+ do_opaque(Type, Opaques, fun atom_vals/1).
+
+atom_vals(?atom(?any)) -> unknown;
+atom_vals(?atom(Set)) -> set_to_list(Set);
+atom_vals(?opaque(_)) -> unknown;
+atom_vals(Other) ->
?atom(_) = Atm = t_inf(t_atom(), Other),
- t_atom_vals(Atm).
+ atom_vals(Atm).
-spec t_is_atom(erl_type()) -> boolean().
-t_is_atom(?atom(_)) -> true;
-t_is_atom(_) -> false.
+t_is_atom(Type) ->
+ t_is_atom(Type, 'universe').
+
+-spec t_is_atom(erl_type(), opaques()) -> boolean().
+
+t_is_atom(Type, Opaques) ->
+ do_opaque(Type, Opaques, fun is_atom1/1).
+
+is_atom1(?atom(_)) -> true;
+is_atom1(_) -> false.
--spec t_is_atom(atom(), erl_type()) -> boolean().
+-spec t_is_any_atom(atom(), erl_type()) -> boolean().
-t_is_atom(Atom, ?atom(?any)) when is_atom(Atom) -> false;
-t_is_atom(Atom, ?atom(Set)) when is_atom(Atom) -> set_is_singleton(Atom, Set);
-t_is_atom(Atom, _) when is_atom(Atom) -> false.
+t_is_any_atom(Atom, SomeAtomsType) ->
+ t_is_any_atom(Atom, SomeAtomsType, 'universe').
+
+-spec t_is_any_atom(atom(), erl_type(), opaques()) -> boolean().
+
+t_is_any_atom(Atom, SomeAtomsType, Opaques) ->
+ do_opaque(SomeAtomsType, Opaques,
+ fun(AtomsType) -> is_any_atom(Atom, AtomsType) end).
+
+is_any_atom(Atom, ?atom(?any)) when is_atom(Atom) -> false;
+is_any_atom(Atom, ?atom(Set)) when is_atom(Atom) ->
+ set_is_singleton(Atom, Set);
+is_any_atom(Atom, _) when is_atom(Atom) -> false.
%%------------------------------------
+-spec t_is_boolean(erl_type()) -> boolean().
+
+t_is_boolean(Type) ->
+ t_is_boolean(Type, 'universe').
+
+-spec t_is_boolean(erl_type(), opaques()) -> boolean().
+
+t_is_boolean(Type, Opaques) ->
+ do_opaque(Type, Opaques, fun is_boolean/1).
+
-spec t_boolean() -> erl_type().
t_boolean() ->
?atom(set_from_list([false, true])).
--spec t_is_boolean(erl_type()) -> boolean().
-
-t_is_boolean(?atom(?any)) -> false;
-t_is_boolean(?atom(Set)) ->
+is_boolean(?atom(?any)) -> false;
+is_boolean(?atom(Set)) ->
case set_size(Set) of
1 -> set_is_element(true, Set) orelse set_is_element(false, Set);
2 -> set_is_element(true, Set) andalso set_is_element(false, Set);
N when is_integer(N), N > 2 -> false
end;
-t_is_boolean(_) -> false.
+is_boolean(_) -> false.
%%-----------------------------------------------------------------------------
%% Binaries
@@ -873,9 +1061,17 @@ t_binary() ->
-spec t_is_binary(erl_type()) -> boolean().
-t_is_binary(?bitstr(U, B)) ->
+t_is_binary(Type) ->
+ t_is_binary(Type, 'universe').
+
+-spec t_is_binary(erl_type(), opaques()) -> boolean().
+
+t_is_binary(Type, Opaques) ->
+ do_opaque(Type, Opaques, fun is_binary/1).
+
+is_binary(?bitstr(U, B)) ->
((U rem 8) =:= 0) andalso ((B rem 8) =:= 0);
-t_is_binary(_) -> false.
+is_binary(_) -> false.
%%-----------------------------------------------------------------------------
%% Bitstrings
@@ -922,19 +1118,27 @@ t_bitstr_concat_1([], Acc) ->
t_bitstr_concat(T1, T2) ->
T1p = t_inf(t_bitstr(), T1),
T2p = t_inf(t_bitstr(), T2),
- bitstr_concat(T1p, T2p).
+ bitstr_concat(t_unopaque(T1p), t_unopaque(T2p)).
-spec t_bitstr_match(erl_type(), erl_type()) -> erl_type().
t_bitstr_match(T1, T2) ->
T1p = t_inf(t_bitstr(), T1),
T2p = t_inf(t_bitstr(), T2),
- bitstr_match(T1p, T2p).
+ bitstr_match(t_unopaque(T1p), t_unopaque(T2p)).
-spec t_is_bitstr(erl_type()) -> boolean().
-t_is_bitstr(?bitstr(_, _)) -> true;
-t_is_bitstr(_) -> false.
+t_is_bitstr(Type) ->
+ t_is_bitstr(Type, 'universe').
+
+-spec t_is_bitstr(erl_type(), opaques()) -> boolean().
+
+t_is_bitstr(Type, Opaques) ->
+ do_opaque(Type, Opaques, fun is_bitstr/1).
+
+is_bitstr(?bitstr(_, _)) -> true;
+is_bitstr(_) -> false.
%%-----------------------------------------------------------------------------
%% Matchstates
@@ -1045,27 +1249,59 @@ t_fun(Arity, Range) when is_integer(Arity), 0 =< Arity, Arity =< 255 ->
-spec t_fun_args(erl_type()) -> 'unknown' | [erl_type()].
-t_fun_args(?function(?any, _)) ->
+t_fun_args(Type) ->
+ t_fun_args(Type, 'universe').
+
+-spec t_fun_args(erl_type(), opaques()) -> 'unknown' | [erl_type()].
+
+t_fun_args(Type, Opaques) ->
+ do_opaque(Type, Opaques, fun fun_args/1).
+
+fun_args(?function(?any, _)) ->
unknown;
-t_fun_args(?function(?product(Domain), _)) when is_list(Domain) ->
+fun_args(?function(?product(Domain), _)) when is_list(Domain) ->
Domain.
-spec t_fun_arity(erl_type()) -> 'unknown' | non_neg_integer().
-t_fun_arity(?function(?any, _)) ->
+t_fun_arity(Type) ->
+ t_fun_arity(Type, 'universe').
+
+-spec t_fun_arity(erl_type(), opaques()) -> 'unknown' | non_neg_integer().
+
+t_fun_arity(Type, Opaques) ->
+ do_opaque(Type, Opaques, fun fun_arity/1).
+
+fun_arity(?function(?any, _)) ->
unknown;
-t_fun_arity(?function(?product(Domain), _)) ->
+fun_arity(?function(?product(Domain), _)) ->
length(Domain).
-spec t_fun_range(erl_type()) -> erl_type().
-t_fun_range(?function(_, Range)) ->
+t_fun_range(Type) ->
+ t_fun_range(Type, 'universe').
+
+-spec t_fun_range(erl_type(), opaques()) -> erl_type().
+
+t_fun_range(Type, Opaques) ->
+ do_opaque(Type, Opaques, fun fun_range/1).
+
+fun_range(?function(_, Range)) ->
Range.
-spec t_is_fun(erl_type()) -> boolean().
-t_is_fun(?function(_, _)) -> true;
-t_is_fun(_) -> false.
+t_is_fun(Type) ->
+ t_is_fun(Type, 'universe').
+
+-spec t_is_fun(erl_type(), opaques()) -> boolean().
+
+t_is_fun(Type, Opaques) ->
+ do_opaque(Type, Opaques, fun is_fun/1).
+
+is_fun(?function(_, _)) -> true;
+is_fun(_) -> false.
%%-----------------------------------------------------------------------------
%% Identifiers. Includes ports, pids and refs.
@@ -1092,9 +1328,17 @@ t_port() ->
-spec t_is_port(erl_type()) -> boolean().
-t_is_port(?identifier(?any)) -> false;
-t_is_port(?identifier(Set)) -> set_is_singleton(?port_qual, Set);
-t_is_port(_) -> false.
+t_is_port(Type) ->
+ t_is_port(Type, 'universe').
+
+-spec t_is_port(erl_type(), opaques()) -> boolean().
+
+t_is_port(Type, Opaques) ->
+ do_opaque(Type, Opaques, fun is_port1/1).
+
+is_port1(?identifier(?any)) -> false;
+is_port1(?identifier(Set)) -> set_is_singleton(?port_qual, Set);
+is_port1(_) -> false.
%%------------------------------------
@@ -1105,9 +1349,17 @@ t_pid() ->
-spec t_is_pid(erl_type()) -> boolean().
-t_is_pid(?identifier(?any)) -> false;
-t_is_pid(?identifier(Set)) -> set_is_singleton(?pid_qual, Set);
-t_is_pid(_) -> false.
+t_is_pid(Type) ->
+ t_is_pid(Type, 'universe').
+
+-spec t_is_pid(erl_type(), opaques()) -> boolean().
+
+t_is_pid(Type, Opaques) ->
+ do_opaque(Type, Opaques, fun is_pid1/1).
+
+is_pid1(?identifier(?any)) -> false;
+is_pid1(?identifier(Set)) -> set_is_singleton(?pid_qual, Set);
+is_pid1(_) -> false.
%%------------------------------------
@@ -1118,9 +1370,17 @@ t_reference() ->
-spec t_is_reference(erl_type()) -> boolean().
-t_is_reference(?identifier(?any)) -> false;
-t_is_reference(?identifier(Set)) -> set_is_singleton(?reference_qual, Set);
-t_is_reference(_) -> false.
+t_is_reference(Type) ->
+ t_is_reference(Type, 'universe').
+
+-spec t_is_reference(erl_type(), opaques()) -> boolean().
+
+t_is_reference(Type, Opaques) ->
+ do_opaque(Type, Opaques, fun is_reference1/1).
+
+is_reference1(?identifier(?any)) -> false;
+is_reference1(?identifier(Set)) -> set_is_singleton(?reference_qual, Set);
+is_reference1(_) -> false.
%%-----------------------------------------------------------------------------
%% Numbers are divided into floats, integers, chars and bytes.
@@ -1138,21 +1398,39 @@ t_number(X) when is_integer(X) ->
-spec t_is_number(erl_type()) -> boolean().
-t_is_number(?number(_, _)) -> true;
-t_is_number(_) -> false.
+t_is_number(Type) ->
+ t_is_number(Type, 'universe').
+
+-spec t_is_number(erl_type(), opaques()) -> boolean().
+
+t_is_number(Type, Opaques) ->
+ do_opaque(Type, Opaques, fun is_number/1).
+
+is_number(?number(_, _)) -> true;
+is_number(_) -> false.
%% Currently, the type system collapses all floats to ?float and does
%% not keep any information about their values. As a result, the list
%% that this function returns contains only integers.
+
-spec t_number_vals(erl_type()) -> 'unknown' | [integer(),...].
-t_number_vals(?int_set(?any)) -> unknown;
-t_number_vals(?int_set(Set)) -> set_to_list(Set);
-t_number_vals(?number(_, _)) -> unknown;
-t_number_vals(Other) ->
+t_number_vals(Type) ->
+ t_number_vals(Type, 'universe').
+
+-spec t_number_vals(erl_type(), opaques()) -> 'unknown' | [integer(),...].
+
+t_number_vals(Type, Opaques) ->
+ do_opaque(Type, Opaques, fun number_vals/1).
+
+number_vals(?int_set(?any)) -> unknown;
+number_vals(?int_set(Set)) -> set_to_list(Set);
+number_vals(?number(_, _)) -> unknown;
+number_vals(?opaque(_)) -> unknown;
+number_vals(Other) ->
Inf = t_inf(Other, t_number()),
false = t_is_none(Inf), % sanity check
- t_number_vals(Inf).
+ number_vals(Inf).
%%------------------------------------
@@ -1163,8 +1441,16 @@ t_float() ->
-spec t_is_float(erl_type()) -> boolean().
-t_is_float(?float) -> true;
-t_is_float(_) -> false.
+t_is_float(Type) ->
+ t_is_float(Type, 'universe').
+
+-spec t_is_float(erl_type(), opaques()) -> boolean().
+
+t_is_float(Type, Opaques) ->
+ do_opaque(Type, Opaques, fun is_float1/1).
+
+is_float1(?float) -> true;
+is_float1(_) -> false.
%%------------------------------------
@@ -1185,8 +1471,16 @@ t_integers(List) when is_list(List) ->
-spec t_is_integer(erl_type()) -> boolean().
-t_is_integer(?integer(_)) -> true;
-t_is_integer(_) -> false.
+t_is_integer(Type) ->
+ t_is_integer(Type, 'universe').
+
+-spec t_is_integer(erl_type(), opaques()) -> boolean().
+
+t_is_integer(Type, Opaques) ->
+ do_opaque(Type, Opaques, fun is_integer1/1).
+
+is_integer1(?integer(_)) -> true;
+is_integer1(_) -> false.
%%------------------------------------
@@ -1250,7 +1544,7 @@ t_cons(Hd, ?nil) ->
t_cons(Hd, ?list(Contents, Termination, _)) ->
?nonempty_list(t_sup(Contents, Hd), Termination);
t_cons(Hd, Tail) ->
- case t_inf(Tail, t_maybe_improper_list()) of
+ case cons_tail(t_inf(Tail, t_maybe_improper_list())) of
?list(Contents, Termination, _Size) ->
%% Collapse the list part of the termination but keep the
%% non-list part intact.
@@ -1262,18 +1556,45 @@ t_cons(Hd, Tail) ->
?unit -> ?none
end.
+cons_tail(Type) ->
+ do_opaque(Type, 'universe', fun(T) -> T end).
+
-spec t_is_cons(erl_type()) -> boolean().
-t_is_cons(?nonempty_list(_, _)) -> true;
-t_is_cons(_) -> false.
+t_is_cons(Type) ->
+ t_is_cons(Type, 'universe').
+
+-spec t_is_cons(erl_type(), opaques()) -> boolean().
+
+t_is_cons(Type, Opaques) ->
+ do_opaque(Type, Opaques, fun is_cons/1).
+
+is_cons(?nonempty_list(_, _)) -> true;
+is_cons(_) -> false.
-spec t_cons_hd(erl_type()) -> erl_type().
-t_cons_hd(?nonempty_list(Contents, _Termination)) -> Contents.
+t_cons_hd(Type) ->
+ t_cons_hd(Type, 'universe').
+
+-spec t_cons_hd(erl_type(), opaques()) -> erl_type().
+
+t_cons_hd(Type, Opaques) ->
+ do_opaque(Type, Opaques, fun cons_hd/1).
+
+cons_hd(?nonempty_list(Contents, _Termination)) -> Contents.
-spec t_cons_tl(erl_type()) -> erl_type().
-t_cons_tl(?nonempty_list(_Contents, Termination) = T) ->
+t_cons_tl(Type) ->
+ t_cons_tl(Type, 'universe').
+
+-spec t_cons_tl(erl_type(), opaques()) -> erl_type().
+
+t_cons_tl(Type, Opaques) ->
+ do_opaque(Type, Opaques, fun cons_tl/1).
+
+cons_tl(?nonempty_list(_Contents, Termination) = T) ->
t_sup(Termination, T).
-spec t_nil() -> erl_type().
@@ -1283,8 +1604,16 @@ t_nil() ->
-spec t_is_nil(erl_type()) -> boolean().
-t_is_nil(?nil) -> true;
-t_is_nil(_) -> false.
+t_is_nil(Type) ->
+ t_is_nil(Type, 'universe').
+
+-spec t_is_nil(erl_type(), opaques()) -> boolean().
+
+t_is_nil(Type, Opaques) ->
+ do_opaque(Type, Opaques, fun is_nil/1).
+
+is_nil(?nil) -> true;
+is_nil(_) -> false.
-spec t_list() -> erl_type().
@@ -1300,8 +1629,16 @@ t_list(Contents) ->
-spec t_list_elements(erl_type()) -> erl_type().
-t_list_elements(?list(Contents, _, _)) -> Contents;
-t_list_elements(?nil) -> ?none.
+t_list_elements(Type) ->
+ t_list_elements(Type, 'universe').
+
+-spec t_list_elements(erl_type(), opaques()) -> erl_type().
+
+t_list_elements(Type, Opaques) ->
+ do_opaque(Type, Opaques, fun list_elements/1).
+
+list_elements(?list(Contents, _, _)) -> Contents;
+list_elements(?nil) -> ?none.
-spec t_list_termination(erl_type()) -> erl_type().
@@ -1356,9 +1693,17 @@ t_maybe_improper_list(Content, Termination) ->
-spec t_is_maybe_improper_list(erl_type()) -> boolean().
-t_is_maybe_improper_list(?list(_, _, _)) -> true;
-t_is_maybe_improper_list(?nil) -> true;
-t_is_maybe_improper_list(_) -> false.
+t_is_maybe_improper_list(Type) ->
+ t_is_maybe_improper_list(Type, 'universe').
+
+-spec t_is_maybe_improper_list(erl_type(), opaques()) -> boolean().
+
+t_is_maybe_improper_list(Type, Opaques) ->
+ do_opaque(Type, Opaques, fun is_maybe_improper_list/1).
+
+is_maybe_improper_list(?list(_, _, _)) -> true;
+is_maybe_improper_list(?nil) -> true;
+is_maybe_improper_list(_) -> false.
%% %% Should only be used if you know what you are doing. See t_cons/2
%% -spec t_improper_list(erl_type(), erl_type()) -> erl_type().
@@ -1377,6 +1722,33 @@ lift_list_to_pos_empty(?list(Content, Termination, _)) ->
?list(Content, Termination, ?unknown_qual).
%%-----------------------------------------------------------------------------
+%% Maps
+%%
+
+-spec t_map() -> erl_type().
+
+t_map() ->
+ ?map([]).
+
+-spec t_map([{erl_type(), erl_type()}]) -> erl_type().
+
+t_map(_) ->
+ ?map([]).
+
+-spec t_is_map(erl_type()) -> boolean().
+
+t_is_map(Type) ->
+ t_is_map(Type, 'universe').
+
+-spec t_is_map(erl_type(), opaques()) -> boolean().
+
+t_is_map(Type, Opaques) ->
+ do_opaque(Type, Opaques, fun is_map1/1).
+
+is_map1(?map(_)) -> true;
+is_map1(_) -> false.
+
+%%-----------------------------------------------------------------------------
%% Tuples
%%
@@ -1405,32 +1777,77 @@ t_tuple(List) ->
-spec get_tuple_tags([erl_type()]) -> [erl_type(),...].
-get_tuple_tags([?atom(?any)|_]) -> [?any];
-get_tuple_tags([?atom(Set)|_]) ->
+get_tuple_tags([Tag|_]) ->
+ do_opaque(Tag, 'universe', fun tuple_tags/1);
+get_tuple_tags(_) -> [?any].
+
+tuple_tags(?atom(?any)) -> [?any];
+tuple_tags(?atom(Set)) ->
case set_size(Set) > ?TUPLE_TAG_LIMIT of
true -> [?any];
false -> [t_atom(A) || A <- set_to_list(Set)]
end;
-get_tuple_tags(_) -> [?any].
+tuple_tags(_) -> [?any].
%% to be used for a tuple with known types for its arguments (not ?any)
-spec t_tuple_args(erl_type()) -> [erl_type()].
-t_tuple_args(?tuple(Args, _, _)) when is_list(Args) -> Args.
+t_tuple_args(Type) ->
+ t_tuple_args(Type, 'universe').
+
+%% to be used for a tuple with known types for its arguments (not ?any)
+-spec t_tuple_args(erl_type(), opaques()) -> [erl_type()].
+
+t_tuple_args(Type, Opaques) ->
+ do_opaque(Type, Opaques, fun tuple_args/1).
+
+tuple_args(?tuple(Args, _, _)) when is_list(Args) -> Args.
%% to be used for a tuple with a known size (not ?any)
-spec t_tuple_size(erl_type()) -> non_neg_integer().
-t_tuple_size(?tuple(_, Size, _)) when is_integer(Size) -> Size.
+t_tuple_size(Type) ->
+ t_tuple_size(Type, 'universe').
+
+%% to be used for a tuple with a known size (not ?any)
+-spec t_tuple_size(erl_type(), opaques()) -> non_neg_integer().
+
+t_tuple_size(Type, Opaques) ->
+ do_opaque(Type, Opaques, fun tuple_size1/1).
+
+tuple_size1(?tuple(_, Size, _)) when is_integer(Size) -> Size.
-spec t_tuple_sizes(erl_type()) -> 'unknown' | [non_neg_integer(),...].
-t_tuple_sizes(?tuple(?any, ?any, ?any)) -> unknown;
-t_tuple_sizes(?tuple(_, Size, _)) when is_integer(Size) -> [Size];
-t_tuple_sizes(?tuple_set(List)) -> [Size || {Size, _} <- List].
+t_tuple_sizes(Type) ->
+ do_opaque(Type, 'universe', fun tuple_sizes/1).
+
+tuple_sizes(?tuple(?any, ?any, ?any)) -> unknown;
+tuple_sizes(?tuple(_, Size, _)) when is_integer(Size) -> [Size];
+tuple_sizes(?tuple_set(List)) -> [Size || {Size, _} <- List].
+
+-spec t_tuple_subtypes(erl_type(), opaques()) ->
+ 'unknown' | [erl_type(),...].
+
+t_tuple_subtypes(Type, Opaques) ->
+ Fun = fun(?tuple_set(List)) ->
+ t_tuple_subtypes_tuple_list(List, Opaques);
+ (?opaque(_)) -> unknown;
+ (T) -> t_tuple_subtypes(T)
+ end,
+ do_opaque(Type, Opaques, Fun).
+
+t_tuple_subtypes_tuple_list(List, Opaques) ->
+ lists:append([t_tuple_subtypes_list(Tuples, Opaques) ||
+ {_Size, Tuples} <- List]).
+
+t_tuple_subtypes_list(List, Opaques) ->
+ ListOfLists = [t_tuple_subtypes(E, Opaques) || E <- List, E =/= ?none],
+ lists:append([L || L <- ListOfLists, L =/= 'unknown']).
-spec t_tuple_subtypes(erl_type()) -> 'unknown' | [erl_type(),...].
+%% XXX. Not the same as t_tuple_subtypes(T, 'universe')...
t_tuple_subtypes(?tuple(?any, ?any, ?any)) -> unknown;
t_tuple_subtypes(?tuple(_, _, _) = T) -> [T];
t_tuple_subtypes(?tuple_set(List)) ->
@@ -1438,9 +1855,17 @@ t_tuple_subtypes(?tuple_set(List)) ->
-spec t_is_tuple(erl_type()) -> boolean().
-t_is_tuple(?tuple(_, _, _)) -> true;
-t_is_tuple(?tuple_set(_)) -> true;
-t_is_tuple(_) -> false.
+t_is_tuple(Type) ->
+ t_is_tuple(Type, 'universe').
+
+-spec t_is_tuple(erl_type(), opaques()) -> boolean().
+
+t_is_tuple(Type, Opaques) ->
+ do_opaque(Type, Opaques, fun is_tuple1/1).
+
+is_tuple1(?tuple(_, _, _)) -> true;
+is_tuple1(?tuple_set(_)) -> true;
+is_tuple1(_) -> false.
%%-----------------------------------------------------------------------------
%% Non-primitive types, including some handy syntactic sugar types
@@ -1451,6 +1876,7 @@ t_is_tuple(_) -> false.
t_bitstrlist() ->
t_iolist(1, t_bitstr()).
+%% XXX. To be removed.
-spec t_constant() -> erl_type().
t_constant() ->
@@ -1553,20 +1979,26 @@ t_timeout() ->
-spec t_array() -> erl_type().
t_array() ->
- t_opaque(array, array, [],
+ t_opaque(array, array, [t_any()],
t_tuple([t_atom('array'),
- t_non_neg_integer(), t_non_neg_integer(),
- t_any(), t_any()])).
+ t_sup([t_atom('undefined'), t_non_neg_integer()]),
+ t_sup([t_atom('undefined'), t_non_neg_integer()]),
+ t_any(),
+ t_any()])).
-spec t_dict() -> erl_type().
t_dict() ->
- t_opaque(dict, dict, [],
+ t_opaque(dict, dict, [t_any(), t_any()],
t_tuple([t_atom('dict'),
- t_non_neg_integer(), t_non_neg_integer(),
- t_non_neg_integer(), t_non_neg_integer(),
- t_non_neg_integer(), t_non_neg_integer(),
- t_tuple(), t_tuple()])).
+ t_sup([t_atom('undefined'), t_non_neg_integer()]),
+ t_sup([t_atom('undefined'), t_non_neg_integer()]),
+ t_sup([t_atom('undefined'), t_non_neg_integer()]),
+ t_sup([t_atom('undefined'), t_non_neg_integer()]),
+ t_sup([t_atom('undefined'), t_non_neg_integer()]),
+ t_sup([t_atom('undefined'), t_non_neg_integer()]),
+ t_sup([t_atom('undefined'), t_tuple()]),
+ t_sup([t_atom('undefined'), t_tuple()])])).
-spec t_digraph() -> erl_type().
@@ -1593,15 +2025,17 @@ t_gb_tree() ->
-spec t_queue() -> erl_type().
t_queue() ->
- t_opaque(queue, queue, [], t_tuple([t_list(), t_list()])).
+ t_opaque(queue, queue, [t_any()], t_tuple([t_list(), t_list()])).
-spec t_set() -> erl_type().
t_set() ->
- t_opaque(sets, set, [],
+ t_opaque(sets, set, [t_any()],
t_tuple([t_atom('set'), t_non_neg_integer(), t_non_neg_integer(),
t_pos_integer(), t_non_neg_integer(), t_non_neg_integer(),
- t_non_neg_integer(), t_tuple(), t_tuple()])).
+ t_non_neg_integer(),
+ t_sup([t_atom('undefined'), t_tuple()]),
+ t_sup([t_atom('undefined'), t_tuple()])])).
-spec t_tid() -> erl_type().
@@ -1614,18 +2048,6 @@ all_opaque_builtins() ->
[t_array(), t_dict(), t_digraph(), t_gb_set(),
t_gb_tree(), t_queue(), t_set(), t_tid()].
--spec is_opaque_builtin(atom(), atom()) -> boolean().
-
-is_opaque_builtin(array, array) -> true;
-is_opaque_builtin(dict, dict) -> true;
-is_opaque_builtin(digraph, digraph) -> true;
-is_opaque_builtin(gb_sets, gb_set) -> true;
-is_opaque_builtin(gb_trees, gb_tree) -> true;
-is_opaque_builtin(queue, queue) -> true;
-is_opaque_builtin(sets, set) -> true;
-is_opaque_builtin(ets, tid) -> true;
-is_opaque_builtin(_, _) -> false.
-
%%------------------------------------
%% ?none is allowed in products. A product of size 1 is not a product.
@@ -1673,8 +2095,13 @@ t_has_var(?tuple(Elements, _, _)) ->
t_has_var_list(Elements);
t_has_var(?tuple_set(_) = T) ->
t_has_var_list(t_tuple_subtypes(T));
-%% t_has_var(?union(_) = U) ->
-%% exit(lists:flatten(io_lib:format("Union happens in t_has_var/1 ~p\n",[U])));
+t_has_var(?map(_)= Map) ->
+ t_has_var_list(map_keys(Map)) orelse t_has_var_list(map_values(Map));
+t_has_var(?opaque(Set)) ->
+ %% Assume variables in 'args' are also present i 'struct'
+ t_has_var_list([O#opaque.struct || O <- set_to_list(Set)]);
+t_has_var(?union(List)) ->
+ t_has_var_list(List);
t_has_var(_) -> false.
-spec t_has_var_list([erl_type()]) -> boolean().
@@ -1697,17 +2124,28 @@ t_collect_vars(?function(Domain, Range), Acc) ->
t_collect_vars(?list(Contents, Termination, _), Acc) ->
ordsets:union(t_collect_vars(Contents, Acc), t_collect_vars(Termination, []));
t_collect_vars(?product(Types), Acc) ->
- lists:foldl(fun(T, TmpAcc) -> t_collect_vars(T, TmpAcc) end, Acc, Types);
+ t_collect_vars_list(Types, Acc);
t_collect_vars(?tuple(?any, ?any, ?any), Acc) ->
Acc;
t_collect_vars(?tuple(Types, _, _), Acc) ->
- lists:foldl(fun(T, TmpAcc) -> t_collect_vars(T, TmpAcc) end, Acc, Types);
+ t_collect_vars_list(Types, Acc);
t_collect_vars(?tuple_set(_) = TS, Acc) ->
- lists:foldl(fun(T, TmpAcc) -> t_collect_vars(T, TmpAcc) end, Acc,
- t_tuple_subtypes(TS));
+ t_collect_vars_list(t_tuple_subtypes(TS), Acc);
+t_collect_vars(?map(_) = Map, Acc0) ->
+ Acc = t_collect_vars_list(map_keys(Map), Acc0),
+ t_collect_vars_list(map_values(Map), Acc);
+t_collect_vars(?opaque(Set), Acc) ->
+ %% Assume variables in 'args' are also present i 'struct'
+ t_collect_vars_list([O#opaque.struct || O <- set_to_list(Set)], Acc);
+t_collect_vars(?union(List), Acc) ->
+ t_collect_vars_list(List, Acc);
t_collect_vars(_, Acc) ->
Acc.
+t_collect_vars_list([T|Ts], Acc0) ->
+ Acc = t_collect_vars(T, Acc0),
+ t_collect_vars_list(Ts, Acc);
+t_collect_vars_list([], Acc) -> Acc.
%%=============================================================================
%%
@@ -1730,6 +2168,7 @@ t_from_term(T) when is_function(T) ->
{arity, Arity} = erlang:fun_info(T, arity),
t_fun(Arity, t_any());
t_from_term(T) when is_integer(T) -> t_integer(T);
+t_from_term(T) when is_map(T) -> t_map();
t_from_term(T) when is_pid(T) -> t_pid();
t_from_term(T) when is_port(T) -> t_port();
t_from_term(T) when is_reference(T) -> t_reference();
@@ -1827,15 +2266,31 @@ t_is_bitwidth(_) -> false.
-spec number_min(erl_type()) -> rng_elem().
-number_min(?int_range(From, _)) -> From;
-number_min(?int_set(Set)) -> set_min(Set);
-number_min(?number(?any, _Tag)) -> neg_inf.
+number_min(Type) ->
+ number_min(Type, 'universe').
+
+-spec number_min(erl_type(), opaques()) -> rng_elem().
+
+number_min(Type, Opaques) ->
+ do_opaque(Type, Opaques, fun number_min2/1).
+
+number_min2(?int_range(From, _)) -> From;
+number_min2(?int_set(Set)) -> set_min(Set);
+number_min2(?number(?any, _Tag)) -> neg_inf.
-spec number_max(erl_type()) -> rng_elem().
-number_max(?int_range(_, To)) -> To;
-number_max(?int_set(Set)) -> set_max(Set);
-number_max(?number(?any, _Tag)) -> pos_inf.
+number_max(Type) ->
+ number_max(Type, 'universe').
+
+-spec number_max(erl_type(), opaques()) -> rng_elem().
+
+number_max(Type, Opaques) ->
+ do_opaque(Type, Opaques, fun number_max2/1).
+
+number_max2(?int_range(_, To)) -> To;
+number_max2(?int_set(Set)) -> set_max(Set);
+number_max2(?number(?any, _Tag)) -> pos_inf.
%% -spec int_range(rgn_elem(), rng_elem()) -> erl_type().
%%
@@ -1917,7 +2372,7 @@ t_sup(?function(Domain1, Range1), ?function(Domain2, Range2)) ->
t_sup(?identifier(Set1), ?identifier(Set2)) ->
?identifier(set_union(Set1, Set2));
t_sup(?opaque(Set1), ?opaque(Set2)) ->
- ?opaque(set_union_no_limit(Set1, Set2));
+ sup_opaque(set_to_list(ordsets:union(Set1, Set2)));
%%Disallow unions with opaque types
%%t_sup(T1=?opaque(_,_,_), T2) ->
%% io:format("Debug: t_sup executed with args ~w and ~w~n",[T1, T2]), ?none;
@@ -2005,6 +2460,27 @@ t_sup(T1, T2) ->
?union(U2) = force_union(T2),
sup_union(U1, U2).
+sup_opaque([]) -> ?none;
+sup_opaque(List) ->
+ L = sup_opaq(List),
+ ?opaque(ordsets:from_list(L)).
+
+sup_opaq(L0) ->
+ L1 = [{{Mod,Name,Args}, T} ||
+ #opaque{mod = Mod, name = Name, args = Args}=T <- L0],
+ F = family(L1),
+ [supl(Ts) || {_, Ts} <- F].
+
+supl([O]) -> O;
+supl(Ts) -> supl(Ts, t_none()).
+
+supl([#opaque{struct = S}=O|L], S0) ->
+ S1 = t_sup(S, S0),
+ case L =:= [] of
+ true -> O#opaque{struct = S1};
+ false -> supl(L, S1)
+ end.
+
-spec t_sup_lists([erl_type()], [erl_type()]) -> [erl_type()].
t_sup_lists([T1|Left1], [T2|Left2]) ->
@@ -2095,9 +2571,10 @@ force_union(T = ?function(_, _)) -> ?function_union(T);
force_union(T = ?identifier(_)) -> ?identifier_union(T);
force_union(T = ?list(_, _, _)) -> ?list_union(T);
force_union(T = ?nil) -> ?list_union(T);
-force_union(T = ?number(_,_)) -> ?number_union(T);
+force_union(T = ?number(_, _)) -> ?number_union(T);
force_union(T = ?opaque(_)) -> ?opaque_union(T);
force_union(T = ?remote(_)) -> ?remote_union(T);
+force_union(T = ?map(_)) -> ?map_union(T);
force_union(T = ?tuple(_, _, _)) -> ?tuple_union(T);
force_union(T = ?tuple_set(_)) -> ?tuple_union(T);
force_union(T = ?matchstate(_, _)) -> ?matchstate_union(T);
@@ -2132,19 +2609,27 @@ t_elements(?number(_, _) = T) ->
?int_set(Set) ->
[t_integer(I) || I <- Set]
end;
-t_elements(?opaque(_) = T) -> [T];
+t_elements(?opaque(_) = T) ->
+ do_elements(T);
+t_elements(?map(_) = T) -> [T];
t_elements(?tuple(_, _, _) = T) -> [T];
t_elements(?tuple_set(_) = TS) ->
case t_tuple_subtypes(TS) of
unknown -> [];
Elems -> Elems
end;
-t_elements(?union(List)) ->
- lists:append([t_elements(T) || T <- List]);
+t_elements(?union(_) = T) ->
+ do_elements(T);
t_elements(?var(_)) -> [?any]. %% yes, vars exist -- what else to do here?
%% t_elements(T) ->
%% io:format("T_ELEMENTS => ~p\n", [T]).
+do_elements(Type0) ->
+ case do_opaque(Type0, 'universe', fun(T) -> T end) of
+ ?union(List) -> lists:append([t_elements(T) || T <- List]);
+ Type -> t_elements(Type)
+ end.
+
%%-----------------------------------------------------------------------------
%% Infimum
%%
@@ -2162,74 +2647,77 @@ t_inf([]) -> ?none.
-spec t_inf(erl_type(), erl_type()) -> erl_type().
t_inf(T1, T2) ->
- t_inf(T1, T2, structured).
-
--type t_inf_mode() :: 'opaque' | 'structured'.
--spec t_inf(erl_type(), erl_type(), t_inf_mode()) -> erl_type().
-
-t_inf(?var(_), ?var(_), _Mode) -> ?any;
-t_inf(?var(_), T, _Mode) -> subst_all_vars_to_any(T);
-t_inf(T, ?var(_), _Mode) -> subst_all_vars_to_any(T);
-t_inf(?any, T, _Mode) -> subst_all_vars_to_any(T);
-t_inf(T, ?any, _Mode) -> subst_all_vars_to_any(T);
-t_inf(?none, _, _Mode) -> ?none;
-t_inf(_, ?none, _Mode) -> ?none;
-t_inf(?unit, _, _Mode) -> ?unit; % ?unit cases should appear below ?none
-t_inf(_, ?unit, _Mode) -> ?unit;
-t_inf(T, T, _Mode) -> subst_all_vars_to_any(T);
+ t_inf(T1, T2, 'universe').
+
+%% 'match' should be used from t_find_unknown_opaque() only
+-type t_inf_opaques() :: 'universe'
+ | [erl_type()] | {'match', [erl_type() | 'universe']}.
+
+-spec t_inf(erl_type(), erl_type(), t_inf_opaques()) -> erl_type().
+
+t_inf(?var(_), ?var(_), _Opaques) -> ?any;
+t_inf(?var(_), T, _Opaques) -> subst_all_vars_to_any(T);
+t_inf(T, ?var(_), _Opaques) -> subst_all_vars_to_any(T);
+t_inf(?any, T, _Opaques) -> subst_all_vars_to_any(T);
+t_inf(T, ?any, _Opaques) -> subst_all_vars_to_any(T);
+t_inf(?none, _, _Opaques) -> ?none;
+t_inf(_, ?none, _Opaques) -> ?none;
+t_inf(?unit, _, _Opaques) -> ?unit; % ?unit cases should appear below ?none
+t_inf(_, ?unit, _Opaques) -> ?unit;
+t_inf(T, T, _Opaques) -> subst_all_vars_to_any(T);
t_inf(?atom(Set1), ?atom(Set2), _) ->
case set_intersection(Set1, Set2) of
?none -> ?none;
NewSet -> ?atom(NewSet)
end;
-t_inf(?bitstr(U1, B1), ?bitstr(0, B2), _Mode) ->
+t_inf(?bitstr(U1, B1), ?bitstr(0, B2), _Opaques) ->
if B2 >= B1 andalso (B2-B1) rem U1 =:= 0 -> t_bitstr(0, B2);
true -> ?none
end;
-t_inf(?bitstr(0, B1), ?bitstr(U2, B2), _Mode) ->
+t_inf(?bitstr(0, B1), ?bitstr(U2, B2), _Opaques) ->
if B1 >= B2 andalso (B1-B2) rem U2 =:= 0 -> t_bitstr(0, B1);
true -> ?none
end;
-t_inf(?bitstr(U1, B1), ?bitstr(U1, B1), _Mode) ->
+t_inf(?bitstr(U1, B1), ?bitstr(U1, B1), _Opaques) ->
t_bitstr(U1, B1);
-t_inf(?bitstr(U1, B1), ?bitstr(U2, B2), _Mode) when U2 > U1 ->
+t_inf(?bitstr(U1, B1), ?bitstr(U2, B2), _Opaques) when U2 > U1 ->
inf_bitstr(U2, B2, U1, B1);
-t_inf(?bitstr(U1, B1), ?bitstr(U2, B2), _Mode) ->
+t_inf(?bitstr(U1, B1), ?bitstr(U2, B2), _Opaques) ->
inf_bitstr(U1, B1, U2, B2);
-t_inf(?function(Domain1, Range1), ?function(Domain2, Range2), Mode) ->
- case t_inf(Domain1, Domain2, Mode) of
+t_inf(?function(Domain1, Range1), ?function(Domain2, Range2), Opaques) ->
+ case t_inf(Domain1, Domain2, Opaques) of
?none -> ?none;
- Domain -> ?function(Domain, t_inf(Range1, Range2, Mode))
+ Domain -> ?function(Domain, t_inf(Range1, Range2, Opaques))
end;
-t_inf(?identifier(Set1), ?identifier(Set2), _Mode) ->
+t_inf(?identifier(Set1), ?identifier(Set2), _Opaques) ->
case set_intersection(Set1, Set2) of
?none -> ?none;
Set -> ?identifier(Set)
end;
-t_inf(?matchstate(Pres1, Slots1), ?matchstate(Pres2, Slots2), _Mode) ->
+t_inf(?matchstate(Pres1, Slots1), ?matchstate(Pres2, Slots2), _Opaques) ->
?matchstate(t_inf(Pres1, Pres2), t_inf(Slots1, Slots2));
-t_inf(?nil, ?nil, _Mode) -> ?nil;
-t_inf(?nil, ?nonempty_list(_, _), _Mode) ->
+t_inf(?nil, ?nil, _Opaques) -> ?nil;
+t_inf(?nil, ?nonempty_list(_, _), _Opaques) ->
?none;
-t_inf(?nonempty_list(_, _), ?nil, _Mode) ->
+t_inf(?nonempty_list(_, _), ?nil, _Opaques) ->
?none;
-t_inf(?nil, ?list(_Contents, Termination, _), Mode) ->
- t_inf(?nil, Termination, Mode);
-t_inf(?list(_Contents, Termination, _), ?nil, Mode) ->
- t_inf(?nil, Termination, Mode);
+t_inf(?nil, ?list(_Contents, Termination, _), Opaques) ->
+ t_inf(?nil, t_unopaque(Termination), Opaques);
+t_inf(?list(_Contents, Termination, _), ?nil, Opaques) ->
+ t_inf(?nil, t_unopaque(Termination), Opaques);
t_inf(?list(Contents1, Termination1, Size1),
- ?list(Contents2, Termination2, Size2), Mode) ->
- case t_inf(Termination1, Termination2, Mode) of
+ ?list(Contents2, Termination2, Size2), Opaques) ->
+ case t_inf(Termination1, Termination2, Opaques) of
?none -> ?none;
Termination ->
- case t_inf(Contents1, Contents2, Mode) of
- ?none ->
+ case t_inf(Contents1, Contents2, Opaques) of
+ ?none ->
%% If none of the lists are nonempty, then the infimum is nil.
case (Size1 =:= ?unknown_qual) andalso (Size2 =:= ?unknown_qual) of
true -> t_nil();
false -> ?none
end;
- Contents ->
+ Contents ->
Size =
case {Size1, Size2} of
{?unknown_qual, ?unknown_qual} -> ?unknown_qual;
@@ -2240,7 +2728,7 @@ t_inf(?list(Contents1, Termination1, Size1),
?list(Contents, Termination, Size)
end
end;
-t_inf(?number(_, _) = T1, ?number(_, _) = T2, _Mode) ->
+t_inf(?number(_, _) = T1, ?number(_, _) = T2, _Opaques) ->
case {T1, T2} of
{T, T} -> T;
{_, ?number(?any, ?unknown_qual)} -> T1;
@@ -2249,16 +2737,16 @@ t_inf(?number(_, _) = T1, ?number(_, _) = T2, _Mode) ->
{?integer(_), ?float} -> ?none;
{?integer(?any), ?integer(_)} -> T2;
{?integer(_), ?integer(?any)} -> T1;
- {?int_set(Set1), ?int_set(Set2)} ->
+ {?int_set(Set1), ?int_set(Set2)} ->
case set_intersection(Set1, Set2) of
?none -> ?none;
Set -> ?int_set(Set)
end;
- {?int_range(From1, To1), ?int_range(From2, To2)} ->
+ {?int_range(From1, To1), ?int_range(From2, To2)} ->
t_from_range(max(From1, From2), min(To1, To2));
{Range = ?int_range(_, _), ?int_set(Set)} ->
%% io:format("t_inf range, set args ~p ~p ~n", [T1, T2]),
- Ans2 =
+ Ans2 =
case set_filter(fun(X) -> in_range(X, Range) end, Set) of
?none -> ?none;
NewSet -> ?int_set(NewSet)
@@ -2271,198 +2759,271 @@ t_inf(?number(_, _) = T1, ?number(_, _) = T2, _Mode) ->
NewSet -> ?int_set(NewSet)
end
end;
-t_inf(?product(Types1), ?product(Types2), Mode) ->
+t_inf(?product(Types1), ?product(Types2), Opaques) ->
L1 = length(Types1),
L2 = length(Types2),
- if L1 =:= L2 -> ?product(t_inf_lists(Types1, Types2, Mode));
+ if L1 =:= L2 -> ?product(t_inf_lists(Types1, Types2, Opaques));
true -> ?none
end;
-t_inf(?product(_), _, _Mode) ->
+t_inf(?product(_), _, _Opaques) ->
?none;
-t_inf(_, ?product(_), _Mode) ->
+t_inf(_, ?product(_), _Opaques) ->
?none;
-t_inf(?tuple(?any, ?any, ?any), ?tuple(_, _, _) = T, _Mode) ->
+t_inf(?tuple(?any, ?any, ?any), ?tuple(_, _, _) = T, _Opaques) ->
subst_all_vars_to_any(T);
-t_inf(?tuple(_, _, _) = T, ?tuple(?any, ?any, ?any), _Mode) ->
+t_inf(?tuple(_, _, _) = T, ?tuple(?any, ?any, ?any), _Opaques) ->
subst_all_vars_to_any(T);
-t_inf(?tuple(?any, ?any, ?any), ?tuple_set(_) = T, _Mode) ->
+t_inf(?tuple(?any, ?any, ?any), ?tuple_set(_) = T, _Opaques) ->
subst_all_vars_to_any(T);
-t_inf(?tuple_set(_) = T, ?tuple(?any, ?any, ?any), _Mode) ->
+t_inf(?tuple_set(_) = T, ?tuple(?any, ?any, ?any), _Opaques) ->
subst_all_vars_to_any(T);
-t_inf(?tuple(Elements1, Arity, _Tag1), ?tuple(Elements2, Arity, _Tag2), Mode) ->
- case t_inf_lists_strict(Elements1, Elements2, Mode) of
+t_inf(?tuple(Elements1, Arity, _Tag1), ?tuple(Elements2, Arity, _Tag2), Opaques) ->
+ case t_inf_lists_strict(Elements1, Elements2, Opaques) of
bottom -> ?none;
NewElements -> t_tuple(NewElements)
end;
-t_inf(?tuple_set(List1), ?tuple_set(List2), Mode) ->
- inf_tuple_sets(List1, List2, Mode);
-t_inf(?tuple_set(List), ?tuple(_, Arity, _) = T, Mode) ->
- inf_tuple_sets(List, [{Arity, [T]}], Mode);
-t_inf(?tuple(_, Arity, _) = T, ?tuple_set(List), Mode) ->
- inf_tuple_sets(List, [{Arity, [T]}], Mode);
+t_inf(?tuple_set(List1), ?tuple_set(List2), Opaques) ->
+ inf_tuple_sets(List1, List2, Opaques);
+t_inf(?tuple_set(List), ?tuple(_, Arity, _) = T, Opaques) ->
+ inf_tuple_sets(List, [{Arity, [T]}], Opaques);
+t_inf(?tuple(_, Arity, _) = T, ?tuple_set(List), Opaques) ->
+ inf_tuple_sets(List, [{Arity, [T]}], Opaques);
%% be careful: here and in the next clause T can be ?opaque
-t_inf(?union(U1), T, Mode) ->
+t_inf(?union(U1), T, Opaques) ->
?union(U2) = force_union(T),
- inf_union(U1, U2, Mode);
-t_inf(T, ?union(U2), Mode) ->
+ inf_union(U1, U2, Opaques);
+t_inf(T, ?union(U2), Opaques) ->
?union(U1) = force_union(T),
- inf_union(U1, U2, Mode);
+ inf_union(U1, U2, Opaques);
+t_inf(?opaque(Set1), ?opaque(Set2), Opaques) ->
+ inf_opaque(Set1, Set2, Opaques);
+t_inf(?opaque(_) = T1, T2, Opaques) ->
+ inf_opaque1(T2, T1, 1, Opaques);
+t_inf(T1, ?opaque(_) = T2, Opaques) ->
+ inf_opaque1(T1, T2, 2, Opaques);
%% and as a result, the cases for ?opaque should appear *after* ?union
-t_inf(?opaque(Set1) = T1, ?opaque(Set2) = T2, Mode) ->
- case set_intersection(Set1, Set2) of
- ?none ->
- case Mode =:= opaque of
- true ->
- Struct1 = t_opaque_structure(T1),
- case t_inf(Struct1, T2) of
- ?none ->
- Struct2 = t_opaque_structure(T2),
- case t_inf(Struct2, T1) of
- ?none -> ?none;
- _ -> T2
- end;
- _ -> T1
- end;
- false -> ?none
- end;
- NewSet -> ?opaque(NewSet)
- end;
-t_inf(?opaque(_) = T1, T2, opaque) ->
- case t_inf(t_opaque_structure(T1), T2, structured) of
- ?none -> ?none;
- _Type -> T1
- end;
-t_inf(T1, ?opaque(_) = T2, opaque) ->
- case t_inf(T1, t_opaque_structure(T2), structured) of
- ?none -> ?none;
- _Type -> T2
- end;
t_inf(#c{}, #c{}, _) ->
?none.
+inf_opaque1(T1, ?opaque(Set2)=T2, Pos, Opaques) ->
+ case Opaques =:= 'universe' orelse inf_is_opaque_type(T2, Pos, Opaques) of
+ false -> ?none;
+ true ->
+ List2 = set_to_list(Set2),
+ case inf_collect(T1, List2, Opaques, []) of
+ [] -> ?none;
+ OpL -> ?opaque(ordsets:from_list(OpL))
+ end
+ end.
+
+inf_is_opaque_type(T, Pos, {match, Opaques}) ->
+ is_opaque_type(T, Opaques) orelse throw(Pos);
+inf_is_opaque_type(T, _Pos, Opaques) ->
+ is_opaque_type(T, Opaques).
+
+inf_collect(T1, [T2|List2], Opaques, OpL) ->
+ #opaque{struct = S2} = T2,
+ case t_inf(T1, S2, Opaques) of
+ ?none -> inf_collect(T1, List2, Opaques, OpL);
+ Inf ->
+ Op = T2#opaque{struct = Inf},
+ inf_collect(T1, List2, Opaques, [Op|OpL])
+ end;
+inf_collect(_T1, [], _Opaques, OpL) ->
+ OpL.
+
+combine(S, T1, T2) ->
+ #opaque{mod = Mod1, name = Name1, args = Args1} = T1,
+ #opaque{mod = Mod2, name = Name2, args = Args2} = T2,
+ case is_same_type_name({Mod1, Name1, Args1}, {Mod2, Name2, Args2}) of
+ true -> [comb(Mod1, Name1, Args1, S, T1)];
+ false -> [comb(Mod1, Name1, Args1, S, T1), comb(Mod2, Name2, Args2, S, T2)]
+ end.
+
+comb(Mod, Name, Args, S, T) ->
+ case is_same_name(Mod, Name, Args, S) of
+ true -> S;
+ false -> T#opaque{struct = S}
+ end.
+
+is_same_name(Mod1, Name1, Args1,
+ ?opaque([#opaque{mod = Mod2, name = Name2, args = Args2}])) ->
+ is_same_type_name({Mod1, Name1, Args1}, {Mod2, Name2, Args2});
+is_same_name(_, _, _, _) -> false.
+
+%% Combining two lists this way can be very time consuming...
+%% Note: two parameterized opaque types are not the same if their
+%% actual parameters differ
+inf_opaque(Set1, Set2, Opaques) ->
+ List1 = inf_look_up(Set1, 1, Opaques),
+ List2 = inf_look_up(Set2, 2, Opaques),
+ List0 = [combine(Inf, T1, T2) ||
+ {Is1, ModNameArgs1, T1} <- List1,
+ {Is2, ModNameArgs2, T2} <- List2,
+ not t_is_none(Inf = inf_opaque_types(Is1, ModNameArgs1, T1,
+ Is2, ModNameArgs2, T2,
+ Opaques))],
+ List = lists:sort(lists:append(List0)),
+ sup_opaque(List).
+
+%% Optimization: do just one lookup.
+inf_look_up(Set, Pos, Opaques) ->
+ [{Opaques =:= 'universe' orelse inf_is_opaque_type2(T, Pos, Opaques),
+ {M, N, Args}, T} ||
+ #opaque{mod = M, name = N, args = Args} = T <- set_to_list(Set)].
+
+inf_is_opaque_type2(T, Pos, {match, Opaques}) ->
+ is_opaque_type2(T, Opaques) orelse throw(Pos);
+inf_is_opaque_type2(T, _Pos, Opaques) ->
+ is_opaque_type2(T, Opaques).
+
+inf_opaque_types(IsOpaque1, ModNameArgs1, T1,
+ IsOpaque2, ModNameArgs2, T2, Opaques) ->
+ #opaque{struct = S1}=T1,
+ #opaque{struct = S2}=T2,
+ case
+ Opaques =:= 'universe' orelse
+ is_same_type_name(ModNameArgs1, ModNameArgs2)
+ of
+ true -> t_inf(S1, S2, Opaques);
+ false ->
+ case {IsOpaque1, IsOpaque2} of
+ {true, true} -> t_inf(S1, S2, Opaques);
+ {true, false} -> t_inf(S1, ?opaque(set_singleton(T2)), Opaques);
+ {false, true} -> t_inf(?opaque(set_singleton(T1)), S2, Opaques);
+ {false, false} -> t_none()
+ end
+ end.
+
-spec t_inf_lists([erl_type()], [erl_type()]) -> [erl_type()].
t_inf_lists(L1, L2) ->
- t_inf_lists(L1, L2, structured).
+ t_inf_lists(L1, L2, 'universe').
--spec t_inf_lists([erl_type()], [erl_type()], t_inf_mode()) -> [erl_type()].
+-spec t_inf_lists([erl_type()], [erl_type()], t_inf_opaques()) -> [erl_type()].
-t_inf_lists(L1, L2, Mode) ->
- t_inf_lists(L1, L2, [], Mode).
+t_inf_lists(L1, L2, Opaques) ->
+ t_inf_lists(L1, L2, [], Opaques).
--spec t_inf_lists([erl_type()], [erl_type()], [erl_type()], t_inf_mode()) -> [erl_type()].
+-spec t_inf_lists([erl_type()], [erl_type()], [erl_type()], [erl_type()]) -> [erl_type()].
-t_inf_lists([T1|Left1], [T2|Left2], Acc, Mode) ->
- t_inf_lists(Left1, Left2, [t_inf(T1, T2, Mode)|Acc], Mode);
-t_inf_lists([], [], Acc, _Mode) ->
+t_inf_lists([T1|Left1], [T2|Left2], Acc, Opaques) ->
+ t_inf_lists(Left1, Left2, [t_inf(T1, T2, Opaques)|Acc], Opaques);
+t_inf_lists([], [], Acc, _Opaques) ->
lists:reverse(Acc).
%% Infimum of lists with strictness.
%% If any element is the ?none type, the value 'bottom' is returned.
--spec t_inf_lists_strict([erl_type()], [erl_type()], t_inf_mode()) -> 'bottom' | [erl_type()].
+-spec t_inf_lists_strict([erl_type()], [erl_type()], [erl_type()]) -> 'bottom' | [erl_type()].
-t_inf_lists_strict(L1, L2, Mode) ->
- t_inf_lists_strict(L1, L2, [], Mode).
+t_inf_lists_strict(L1, L2, Opaques) ->
+ t_inf_lists_strict(L1, L2, [], Opaques).
--spec t_inf_lists_strict([erl_type()], [erl_type()], [erl_type()], t_inf_mode()) -> 'bottom' | [erl_type()].
+-spec t_inf_lists_strict([erl_type()], [erl_type()], [erl_type()], [erl_type()]) -> 'bottom' | [erl_type()].
-t_inf_lists_strict([T1|Left1], [T2|Left2], Acc, Mode) ->
- case t_inf(T1, T2, Mode) of
+t_inf_lists_strict([T1|Left1], [T2|Left2], Acc, Opaques) ->
+ case t_inf(T1, T2, Opaques) of
?none -> bottom;
- T -> t_inf_lists_strict(Left1, Left2, [T|Acc], Mode)
+ T -> t_inf_lists_strict(Left1, Left2, [T|Acc], Opaques)
end;
-t_inf_lists_strict([], [], Acc, _Mode) ->
+t_inf_lists_strict([], [], Acc, _Opaques) ->
lists:reverse(Acc).
--spec t_inf_lists_masked([erl_type()], [erl_type()], [t_inf_mode()]) -> [erl_type()].
-
-t_inf_lists_masked(List1, List2, Mask) ->
- List = lists:zip3(List1, List2, Mask),
- [t_inf(T1, T2, Mode) || {T1, T2, Mode} <- List].
-
-inf_tuple_sets(L1, L2, Mode) ->
- case inf_tuple_sets(L1, L2, [], Mode) of
+inf_tuple_sets(L1, L2, Opaques) ->
+ case inf_tuple_sets(L1, L2, [], Opaques) of
[] -> ?none;
[{_Arity, [?tuple(_, _, _) = OneTuple]}] -> OneTuple;
List -> ?tuple_set(List)
end.
-inf_tuple_sets([{Arity, Tuples1}|Ts1], [{Arity, Tuples2}|Ts2], Acc, Mode) ->
- case inf_tuples_in_sets(Tuples1, Tuples2, Mode) of
- [] -> inf_tuple_sets(Ts1, Ts2, Acc, Mode);
+inf_tuple_sets([{Arity, Tuples1}|Ts1], [{Arity, Tuples2}|Ts2], Acc, Opaques) ->
+ case inf_tuples_in_sets(Tuples1, Tuples2, Opaques) of
+ [] -> inf_tuple_sets(Ts1, Ts2, Acc, Opaques);
[?tuple_set([{Arity, NewTuples}])] ->
- inf_tuple_sets(Ts1, Ts2, [{Arity, NewTuples}|Acc], Mode);
- NewTuples -> inf_tuple_sets(Ts1, Ts2, [{Arity, NewTuples}|Acc], Mode)
+ inf_tuple_sets(Ts1, Ts2, [{Arity, NewTuples}|Acc], Opaques);
+ NewTuples -> inf_tuple_sets(Ts1, Ts2, [{Arity, NewTuples}|Acc], Opaques)
end;
-inf_tuple_sets([{Arity1, _}|Ts1] = L1, [{Arity2, _}|Ts2] = L2, Acc, Mode) ->
- if Arity1 < Arity2 -> inf_tuple_sets(Ts1, L2, Acc, Mode);
- Arity1 > Arity2 -> inf_tuple_sets(L1, Ts2, Acc, Mode)
+inf_tuple_sets([{Arity1, _}|Ts1] = L1, [{Arity2, _}|Ts2] = L2, Acc, Opaques) ->
+ if Arity1 < Arity2 -> inf_tuple_sets(Ts1, L2, Acc, Opaques);
+ Arity1 > Arity2 -> inf_tuple_sets(L1, Ts2, Acc, Opaques)
end;
-inf_tuple_sets([], _, Acc, _Mode) -> lists:reverse(Acc);
-inf_tuple_sets(_, [], Acc, _Mode) -> lists:reverse(Acc).
-
-inf_tuples_in_sets([?tuple(Elements1, _, ?any)], L2, Mode) ->
- NewList = [t_inf_lists_strict(Elements1, Elements2, Mode)
+inf_tuple_sets([], _, Acc, _Opaques) -> lists:reverse(Acc);
+inf_tuple_sets(_, [], Acc, _Opaques) -> lists:reverse(Acc).
+
+inf_tuples_in_sets([?tuple(Elements1, _, ?any)], L2, Opaques) ->
+ NewList = [t_inf_lists_strict(Elements1, Elements2, Opaques)
|| ?tuple(Elements2, _, _) <- L2],
[t_tuple(Es) || Es <- NewList, Es =/= bottom];
-inf_tuples_in_sets(L1, [?tuple(Elements2, _, ?any)], Mode) ->
- NewList = [t_inf_lists_strict(Elements1, Elements2, Mode)
+inf_tuples_in_sets(L1, [?tuple(Elements2, _, ?any)], Opaques) ->
+ NewList = [t_inf_lists_strict(Elements1, Elements2, Opaques)
|| ?tuple(Elements1, _, _) <- L1],
[t_tuple(Es) || Es <- NewList, Es =/= bottom];
-inf_tuples_in_sets(L1, L2, Mode) ->
- inf_tuples_in_sets(L1, L2, [], Mode).
+inf_tuples_in_sets(L1, L2, Opaques) ->
+ inf_tuples_in_sets2(L1, L2, [], Opaques).
-inf_tuples_in_sets([?tuple(Elements1, Arity, Tag)|Ts1],
- [?tuple(Elements2, Arity, Tag)|Ts2], Acc, Mode) ->
- case t_inf_lists_strict(Elements1, Elements2, Mode) of
- bottom -> inf_tuples_in_sets(Ts1, Ts2, Acc, Mode);
+inf_tuples_in_sets2([?tuple(Elements1, Arity, Tag)|Ts1],
+ [?tuple(Elements2, Arity, Tag)|Ts2], Acc, Opaques) ->
+ case t_inf_lists_strict(Elements1, Elements2, Opaques) of
+ bottom -> inf_tuples_in_sets2(Ts1, Ts2, Acc, Opaques);
NewElements ->
- inf_tuples_in_sets(Ts1, Ts2, [?tuple(NewElements, Arity, Tag)|Acc], Mode)
+ inf_tuples_in_sets2(Ts1, Ts2, [?tuple(NewElements, Arity, Tag)|Acc],
+ Opaques)
end;
-inf_tuples_in_sets([?tuple(_, _, Tag1)|Ts1] = L1,
- [?tuple(_, _, Tag2)|Ts2] = L2, Acc, Mode) ->
- if Tag1 < Tag2 -> inf_tuples_in_sets(Ts1, L2, Acc, Mode);
- Tag1 > Tag2 -> inf_tuples_in_sets(L1, Ts2, Acc, Mode)
+inf_tuples_in_sets2([?tuple(_, _, Tag1)|Ts1] = L1,
+ [?tuple(_, _, Tag2)|Ts2] = L2, Acc, Opaques) ->
+ if Tag1 < Tag2 -> inf_tuples_in_sets2(Ts1, L2, Acc, Opaques);
+ Tag1 > Tag2 -> inf_tuples_in_sets2(L1, Ts2, Acc, Opaques)
end;
-inf_tuples_in_sets([], _, Acc, _Mode) -> lists:reverse(Acc);
-inf_tuples_in_sets(_, [], Acc, _Mode) -> lists:reverse(Acc).
-
-inf_union(U1, U2, opaque) ->
-%%---------------------------------------------------------------------
-%% Under Testing
-%%----------------------------------------------------------------------
-%% OpaqueFun =
-%% fun(Union1, Union2) ->
-%% [_,_,_,_,_,_,_,_,Opaque,_] = Union1,
-%% [A,B,F,I,L,N,T,M,_,_R] = Union2,
-%% List = [A,B,F,I,L,N,T,M],
-%% case [T || T <- List, t_inf(T, Opaque, opaque) =/= ?none] of
-%% [] -> ?none;
-%% _ -> Opaque
-%% end
-%% end,
-%% O1 = OpaqueFun(U1, U2),
-%% O2 = OpaqueFun(U2, U1),
-%% Union = inf_union(U1, U2, 0, [], opaque),
-%% t_sup([O1, O2, Union]);
- inf_union(U1, U2, 0, [], opaque);
-inf_union(U1, U2, OtherMode) ->
- inf_union(U1, U2, 0, [], OtherMode).
-
-inf_union([?none|Left1], [?none|Left2], N, Acc, Mode) ->
- inf_union(Left1, Left2, N, [?none|Acc], Mode);
-inf_union([T1|Left1], [T2|Left2], N, Acc, Mode) ->
- case t_inf(T1, T2, Mode) of
- ?none -> inf_union(Left1, Left2, N, [?none|Acc], Mode);
- T -> inf_union(Left1, Left2, N+1, [T|Acc], Mode)
+inf_tuples_in_sets2([], _, Acc, _Opaques) -> lists:reverse(Acc);
+inf_tuples_in_sets2(_, [], Acc, _Opaques) -> lists:reverse(Acc).
+
+inf_union(U1, U2, Opaques) ->
+ OpaqueFun =
+ fun(Union1, Union2, InfFun) ->
+ [_,_,_,_,_,_,_,_,Opaque,_,_] = Union1,
+ [A,B,F,I,L,N,T,M,_,_R,Map] = Union2,
+ List = [A,B,F,I,L,N,T,M,Map],
+ inf_union_collect(List, Opaque, InfFun, [], [])
+ end,
+ {O1, ThrowList1} =
+ OpaqueFun(U1, U2, fun(E, Opaque) -> t_inf(Opaque, E, Opaques) end),
+ {O2, ThrowList2}
+ = OpaqueFun(U2, U1, fun(E, Opaque) -> t_inf(E, Opaque, Opaques) end),
+ {Union, ThrowList3} = inf_union(U1, U2, 0, [], [], Opaques),
+ ThrowList = lists:merge3(ThrowList1, ThrowList2, ThrowList3),
+ case t_sup([O1, O2, Union]) of
+ ?none when ThrowList =/= [] -> throw(hd(ThrowList));
+ Sup -> Sup
+ end.
+
+inf_union_collect([], _Opaque, _InfFun, InfList, ThrowList) ->
+ {t_sup(InfList), lists:usort(ThrowList)};
+inf_union_collect([?none|L], Opaque, InfFun, InfList, ThrowList) ->
+ inf_union_collect(L, Opaque, InfFun, [?none|InfList], ThrowList);
+inf_union_collect([E|L], Opaque, InfFun, InfList, ThrowList) ->
+ try InfFun(E, Opaque)of
+ Inf ->
+ inf_union_collect(L, Opaque, InfFun, [Inf|InfList], ThrowList)
+ catch throw:N when is_integer(N) ->
+ inf_union_collect(L, Opaque, InfFun, InfList, [N|ThrowList])
+ end.
+
+inf_union([?none|Left1], [?none|Left2], N, Acc, ThrowList, Opaques) ->
+ inf_union(Left1, Left2, N, [?none|Acc], ThrowList, Opaques);
+inf_union([T1|Left1], [T2|Left2], N, Acc, ThrowList, Opaques) ->
+ try t_inf(T1, T2, Opaques) of
+ ?none -> inf_union(Left1, Left2, N, [?none|Acc], ThrowList, Opaques);
+ T -> inf_union(Left1, Left2, N+1, [T|Acc], ThrowList, Opaques)
+ catch throw:N when is_integer(N) ->
+ inf_union(Left1, Left2, N, [?none|Acc], [N|ThrowList], Opaques)
end;
-inf_union([], [], N, Acc, _Mode) ->
- if N =:= 0 -> ?none;
+inf_union([], [], N, Acc, ThrowList, _Opaques) ->
+ if N =:= 0 -> {?none, ThrowList};
N =:= 1 ->
[Type] = [T || T <- Acc, T =/= ?none],
- Type;
- N >= 2 -> ?union(lists:reverse(Acc))
+ {Type, ThrowList};
+ N >= 2 -> {?union(lists:reverse(Acc)), ThrowList}
end.
inf_bitstr(U1, B1, U2, B2) ->
@@ -2494,13 +3055,13 @@ findfirst(N1, N2, U1, B1, U2, B2) ->
%% to types. Hans Bolinder suggested the use of lists of Key-Value pairs for
%% this data structure and measurements showed a non-trivial speedup when using
%% them for operations within this module (e.g. in t_unify/2). However, there
-%% is code outside erl_types that still passes a dict() in the 2nd argument.
+%% is code outside erl_types that still passes a dict:dict() in the 2nd argument.
%% So, for the time being, this module provides a t_subst/2 function for these
%% external calls and a clone of it (t_subst_kv/2) which is used from all calls
%% from within this module. This code duplication needs to be eliminated at
%% some point.
--spec t_subst(erl_type(), dict()) -> erl_type().
+-spec t_subst(erl_type(), dict:dict(atom(), erl_type())) -> erl_type().
t_subst(T, Dict) ->
case t_has_var(T) of
@@ -2536,6 +3097,16 @@ t_subst_dict(?tuple(Elements, _Arity, _Tag), Dict) ->
t_tuple([t_subst_dict(E, Dict) || E <- Elements]);
t_subst_dict(?tuple_set(_) = TS, Dict) ->
t_sup([t_subst_dict(T, Dict) || T <- t_tuple_subtypes(TS)]);
+t_subst_dict(?map(Pairs), Dict) ->
+ ?map([{t_subst_dict(K, Dict), t_subst_dict(V, Dict)} ||
+ {K, V} <- Pairs]);
+t_subst_dict(?opaque(Es), Dict) ->
+ List = [Opaque#opaque{args = [t_subst_dict(Arg, Dict) || Arg <- Args],
+ struct = t_subst_dict(S, Dict)} ||
+ Opaque = #opaque{args = Args, struct = S} <- set_to_list(Es)],
+ ?opaque(ordsets:from_list(List));
+t_subst_dict(?union(List), Dict) ->
+ ?union([t_subst_dict(E, Dict) || E <- List]);
t_subst_dict(T, _Dict) ->
T.
@@ -2578,9 +3149,31 @@ t_subst_aux(?tuple(Elements, _Arity, _Tag), VarMap) ->
t_tuple([t_subst_aux(E, VarMap) || E <- Elements]);
t_subst_aux(?tuple_set(_) = TS, VarMap) ->
t_sup([t_subst_aux(T, VarMap) || T <- t_tuple_subtypes(TS)]);
+t_subst_aux(?map(Pairs), VarMap) ->
+ ?map([{t_subst_aux(K, VarMap), t_subst_aux(V, VarMap)} ||
+ {K, V} <- Pairs]);
+t_subst_aux(?opaque(Es), VarMap) ->
+ List = [Opaque#opaque{args = [t_subst_aux(Arg, VarMap) || Arg <- Args],
+ struct = t_subst_aux(S, VarMap)} ||
+ Opaque = #opaque{args = Args, struct = S} <- set_to_list(Es)],
+ ?opaque(ordsets:from_list(List));
+t_subst_aux(?union(List), VarMap) ->
+ ?union([t_subst_aux(E, VarMap) || E <- List]);
t_subst_aux(T, _VarMap) ->
T.
+-spec subst_all_remote(erl_type(), erl_type()) -> erl_type().
+
+subst_all_remote(Type0, Substitute) ->
+ Map =
+ fun(Type) ->
+ case erl_types:t_is_remote(Type) of
+ true -> Substitute;
+ false -> Type
+ end
+ end,
+ erl_types:t_map(Map, Type0).
+
%%-----------------------------------------------------------------------------
%% Unification
%%
@@ -2590,112 +3183,152 @@ t_subst_aux(T, _VarMap) ->
-spec t_unify(erl_type(), erl_type()) -> t_unify_ret().
t_unify(T1, T2) ->
- t_unify(T1, T2, []).
-
--spec t_unify(erl_type(), erl_type(), [erl_type()]) -> t_unify_ret().
-
-t_unify(T1, T2, Opaques) ->
- {T, VarMap} = t_unify(T1, T2, [], Opaques),
+ {T, VarMap} = t_unify(T1, T2, []),
{t_subst_kv(T, VarMap), lists:keysort(1, VarMap)}.
-t_unify(?var(Id) = T, ?var(Id), VarMap, _Opaques) ->
+t_unify(?var(Id) = T, ?var(Id), VarMap) ->
{T, VarMap};
-t_unify(?var(Id1) = T, ?var(Id2), VarMap, Opaques) ->
+t_unify(?var(Id1) = T, ?var(Id2), VarMap) ->
case lists:keyfind(Id1, 1, VarMap) of
false ->
case lists:keyfind(Id2, 1, VarMap) of
false -> {T, [{Id2, T} | VarMap]};
- {Id2, Type} -> t_unify(T, Type, VarMap, Opaques)
+ {Id2, Type} -> t_unify(T, Type, VarMap)
end;
{Id1, Type1} ->
case lists:keyfind(Id2, 1, VarMap) of
false -> {Type1, [{Id2, T} | VarMap]};
- {Id2, Type2} -> t_unify(Type1, Type2, VarMap, Opaques)
+ {Id2, Type2} -> t_unify(Type1, Type2, VarMap)
end
end;
-t_unify(?var(Id), Type, VarMap, Opaques) ->
+t_unify(?var(Id), Type, VarMap) ->
case lists:keyfind(Id, 1, VarMap) of
false -> {Type, [{Id, Type} | VarMap]};
- {Id, VarType} -> t_unify(VarType, Type, VarMap, Opaques)
+ {Id, VarType} -> t_unify(VarType, Type, VarMap)
end;
-t_unify(Type, ?var(Id), VarMap, Opaques) ->
+t_unify(Type, ?var(Id), VarMap) ->
case lists:keyfind(Id, 1, VarMap) of
false -> {Type, [{Id, Type} | VarMap]};
- {Id, VarType} -> t_unify(VarType, Type, VarMap, Opaques)
+ {Id, VarType} -> t_unify(VarType, Type, VarMap)
end;
-t_unify(?function(Domain1, Range1), ?function(Domain2, Range2), VarMap, Opaques) ->
- {Domain, VarMap1} = t_unify(Domain1, Domain2, VarMap, Opaques),
- {Range, VarMap2} = t_unify(Range1, Range2, VarMap1, Opaques),
+t_unify(?function(Domain1, Range1), ?function(Domain2, Range2), VarMap) ->
+ {Domain, VarMap1} = t_unify(Domain1, Domain2, VarMap),
+ {Range, VarMap2} = t_unify(Range1, Range2, VarMap1),
{?function(Domain, Range), VarMap2};
t_unify(?list(Contents1, Termination1, Size),
- ?list(Contents2, Termination2, Size), VarMap, Opaques) ->
- {Contents, VarMap1} = t_unify(Contents1, Contents2, VarMap, Opaques),
- {Termination, VarMap2} = t_unify(Termination1, Termination2, VarMap1, Opaques),
+ ?list(Contents2, Termination2, Size), VarMap) ->
+ {Contents, VarMap1} = t_unify(Contents1, Contents2, VarMap),
+ {Termination, VarMap2} = t_unify(Termination1, Termination2, VarMap1),
{?list(Contents, Termination, Size), VarMap2};
-t_unify(?product(Types1), ?product(Types2), VarMap, Opaques) ->
- {Types, VarMap1} = unify_lists(Types1, Types2, VarMap, Opaques),
+t_unify(?product(Types1), ?product(Types2), VarMap) ->
+ {Types, VarMap1} = unify_lists(Types1, Types2, VarMap),
{?product(Types), VarMap1};
-t_unify(?tuple(?any, ?any, ?any) = T, ?tuple(?any, ?any, ?any), VarMap, _Opaques) ->
+t_unify(?tuple(?any, ?any, ?any) = T, ?tuple(?any, ?any, ?any), VarMap) ->
{T, VarMap};
t_unify(?tuple(Elements1, Arity, _),
- ?tuple(Elements2, Arity, _), VarMap, Opaques) when Arity =/= ?any ->
- {NewElements, VarMap1} = unify_lists(Elements1, Elements2, VarMap, Opaques),
+ ?tuple(Elements2, Arity, _), VarMap) when Arity =/= ?any ->
+ {NewElements, VarMap1} = unify_lists(Elements1, Elements2, VarMap),
{t_tuple(NewElements), VarMap1};
t_unify(?tuple_set([{Arity, _}]) = T1,
- ?tuple(_, Arity, _) = T2, VarMap, Opaques) when Arity =/= ?any ->
- unify_tuple_set_and_tuple(T1, T2, VarMap, Opaques);
+ ?tuple(_, Arity, _) = T2, VarMap) when Arity =/= ?any ->
+ unify_tuple_set_and_tuple1(T1, T2, VarMap);
t_unify(?tuple(_, Arity, _) = T1,
- ?tuple_set([{Arity, _}]) = T2, VarMap, Opaques) when Arity =/= ?any ->
- unify_tuple_set_and_tuple(T2, T1, VarMap, Opaques);
-t_unify(?tuple_set(List1), ?tuple_set(List2), VarMap, Opaques) ->
- {Tuples, NewVarMap} =
- unify_lists(lists:append([T || {_Arity, T} <- List1]),
- lists:append([T || {_Arity, T} <- List2]), VarMap, Opaques),
- {t_sup(Tuples), NewVarMap};
-t_unify(?opaque(Elements) = T, ?opaque(Elements), VarMap, _Opaques) ->
- {T, VarMap};
-t_unify(?opaque(_) = T1, ?opaque(_) = T2, _VarMap, _Opaques) ->
- throw({mismatch, T1, T2});
-t_unify(Type, ?opaque(_) = OpType, VarMap, Opaques) ->
- t_unify_with_opaque(Type, OpType, VarMap, Opaques);
-t_unify(?opaque(_) = OpType, Type, VarMap, Opaques) ->
- t_unify_with_opaque(Type, OpType, VarMap, Opaques);
-t_unify(T, T, VarMap, _Opaques) ->
+ ?tuple_set([{Arity, _}]) = T2, VarMap) when Arity =/= ?any ->
+ unify_tuple_set_and_tuple2(T1, T2, VarMap);
+t_unify(?tuple_set(List1) = T1, ?tuple_set(List2) = T2, VarMap) ->
+ try
+ unify_lists(lists:append([T || {_Arity, T} <- List1]),
+ lists:append([T || {_Arity, T} <- List2]), VarMap)
+ of
+ {Tuples, NewVarMap} -> {t_sup(Tuples), NewVarMap}
+ catch _:_ -> throw({mismatch, T1, T2})
+ end;
+t_unify(?opaque(_) = T1, ?opaque(_) = T2, VarMap) ->
+ t_unify(t_opaque_structure(T1), t_opaque_structure(T2), VarMap);
+t_unify(T1, ?opaque(_) = T2, VarMap) ->
+ t_unify(T1, t_opaque_structure(T2), VarMap);
+t_unify(?opaque(_) = T1, T2, VarMap) ->
+ t_unify(t_opaque_structure(T1), T2, VarMap);
+t_unify(T, T, VarMap) ->
{T, VarMap};
-t_unify(T1, T2, _, _) ->
+t_unify(?union(_)=T1, ?union(_)=T2, VarMap) ->
+ {Type1, Type2} = unify_union2(T1, T2),
+ t_unify(Type1, Type2, VarMap);
+t_unify(?union(_)=T1, T2, VarMap) ->
+ t_unify(unify_union1(T1, T1, T2), T2, VarMap);
+t_unify(T1, ?union(_)=T2, VarMap) ->
+ t_unify(T1, unify_union1(T2, T1, T2), VarMap);
+t_unify(T1, T2, _) ->
throw({mismatch, T1, T2}).
-t_unify_with_opaque(Type, OpType, VarMap, Opaques) ->
- case lists:member(OpType, Opaques) of
+unify_union2(?union(List1)=T1, ?union(List2)=T2) ->
+ case {unify_union(List1), unify_union(List2)} of
+ {{yes, Type1}, {yes, Type2}} -> {Type1, Type2};
+ {{yes, Type1}, no} -> {Type1, T2};
+ {no, {yes, Type2}} -> {T1, Type2};
+ {no, no} -> throw({mismatch, T1, T2})
+ end.
+
+unify_union1(?union(List), T1, T2) ->
+ case unify_union(List) of
+ {yes, Type} -> Type;
+ no -> throw({mismatch, T1, T2})
+ end.
+
+unify_union(List) ->
+ [A,B,F,I,L,N,T,M,O,R,Map] = List,
+ if O =:= ?none -> no;
true ->
- Struct = t_opaque_structure(OpType),
- try t_unify(Type, Struct, VarMap, Opaques) of
- {_T, VarMap1} -> {OpType, VarMap1}
- catch
- throw:{mismatch, _T1, _T2} ->
- case t_inf(OpType, Type, opaque) of
- ?none -> throw({mismatch, Type, OpType});
- _ -> {OpType, VarMap}
- end
- end;
- false ->
- throw({mismatch, Type, OpType})
+ S = t_opaque_structure(O),
+ {yes, t_sup([A,B,F,I,L,N,T,M,S,R,Map])}
end.
-unify_tuple_set_and_tuple(?tuple_set([{Arity, List}]),
- ?tuple(Elements2, Arity, _), VarMap, Opaques) ->
+-spec is_opaque_type(erl_type(), [erl_type()]) -> boolean().
+
+%% An opaque type is a union of types. Returns true iff any of the type
+%% names (Module and Name) of the first argument (the opaque type to
+%% check) occurs in any of the opaque types of the second argument.
+is_opaque_type(?opaque(Elements), Opaques) ->
+ lists:any(fun(Opaque) -> is_opaque_type2(Opaque, Opaques) end, Elements).
+
+is_opaque_type2(#opaque{mod = Mod1, name = Name1, args = Args1}, Opaques) ->
+ F1 = fun(?opaque(Es)) ->
+ F2 = fun(#opaque{mod = Mod, name = Name, args = Args}) ->
+ is_type_name(Mod1, Name1, Args1, Mod, Name, Args)
+ end,
+ lists:any(F2, Es)
+ end,
+ lists:any(F1, Opaques).
+
+is_type_name(Mod, Name, Args1, Mod, Name, Args2) ->
+ length(Args1) =:= length(Args2);
+is_type_name(Mod1, Name1, Args1, Mod2, Name2, Args2) ->
+ is_same_type_name2(Mod1, Name1, Args1, Mod2, Name2, Args2).
+
+%% Two functions since t_unify is not symmetric.
+unify_tuple_set_and_tuple1(?tuple_set([{Arity, List}]),
+ ?tuple(Elements2, Arity, _), VarMap) ->
+ %% Can only work if the single tuple has variables at correct places.
+ %% Collapse the tuple set.
+ {NewElements, VarMap1} =
+ unify_lists(sup_tuple_elements(List), Elements2, VarMap),
+ {t_tuple(NewElements), VarMap1}.
+
+unify_tuple_set_and_tuple2(?tuple(Elements2, Arity, _),
+ ?tuple_set([{Arity, List}]), VarMap) ->
%% Can only work if the single tuple has variables at correct places.
%% Collapse the tuple set.
- {NewElements, VarMap1} = unify_lists(sup_tuple_elements(List), Elements2, VarMap, Opaques),
+ {NewElements, VarMap1} =
+ unify_lists(Elements2, sup_tuple_elements(List), VarMap),
{t_tuple(NewElements), VarMap1}.
-unify_lists(L1, L2, VarMap, Opaques) ->
- unify_lists(L1, L2, VarMap, [], Opaques).
+unify_lists(L1, L2, VarMap) ->
+ unify_lists(L1, L2, VarMap, []).
-unify_lists([T1|Left1], [T2|Left2], VarMap, Acc, Opaques) ->
- {NewT, NewVarMap} = t_unify(T1, T2, VarMap, Opaques),
- unify_lists(Left1, Left2, NewVarMap, [NewT|Acc], Opaques);
-unify_lists([], [], VarMap, Acc, _Opaques) ->
+unify_lists([T1|Left1], [T2|Left2], VarMap, Acc) ->
+ {NewT, NewVarMap} = t_unify(T1, T2, VarMap),
+ unify_lists(Left1, Left2, NewVarMap, [NewT|Acc]);
+unify_lists([], [], VarMap, Acc) ->
{lists:reverse(Acc), VarMap}.
%%t_assign_variables_to_subtype(T1, T2) ->
@@ -2837,11 +3470,12 @@ t_subtract(?identifier(Set1), ?identifier(Set2)) ->
?none -> ?none;
Set -> ?identifier(Set)
end;
-t_subtract(?opaque(Set1), ?opaque(Set2)) ->
- case set_subtract(Set1, Set2) of
- ?none -> ?none;
- Set -> ?opaque(Set)
- end;
+t_subtract(?opaque(_)=T1, ?opaque(_)=T2) ->
+ opaque_subtract(T1, t_opaque_structure(T2));
+t_subtract(?opaque(_)=T1, T2) ->
+ opaque_subtract(T1, T2);
+t_subtract(T1, ?opaque(_)=T2) ->
+ t_subtract(T1, t_opaque_structure(T2));
t_subtract(?matchstate(Pres1, Slots1), ?matchstate(Pres2, _Slots2)) ->
Pres = t_subtract(Pres1, Pres2),
case t_is_none(Pres) of
@@ -2965,6 +3599,8 @@ t_subtract(?product(Elements1) = T1, ?product(Elements2)) ->
_ -> T1
end
end;
+t_subtract(?map(_) = T, _) -> % XXX: very crude; will probably need refinement
+ T;
t_subtract(?product(P1), _) ->
?product(P1);
t_subtract(T, ?product(_)) ->
@@ -2976,6 +3612,17 @@ t_subtract(T1, T2) ->
?union(U2) = force_union(T2),
subtract_union(U1, U2).
+-spec opaque_subtract(erl_type(), erl_type()) -> erl_type().
+
+opaque_subtract(?opaque(Set1), T2) ->
+ List = [T1#opaque{struct = Sub} ||
+ #opaque{struct = S1}=T1 <- set_to_list(Set1),
+ not t_is_none(Sub = t_subtract(S1, T2))],
+ case List of
+ [] -> ?none;
+ _ -> ?opaque(ordsets:from_list(List))
+ end.
+
-spec t_subtract_lists([erl_type()], [erl_type()]) -> [erl_type()].
t_subtract_lists(L1, L2) ->
@@ -2991,7 +3638,18 @@ t_subtract_lists([], [], Acc) ->
-spec subtract_union([erl_type(),...], [erl_type(),...]) -> erl_type().
subtract_union(U1, U2) ->
- subtract_union(U1, U2, 0, []).
+ [A1,B1,F1,I1,L1,N1,T1,M1,O1,R1,Map1] = U1,
+ [A2,B2,F2,I2,L2,N2,T2,M2,O2,R2,Map2] = U2,
+ List1 = [A1,B1,F1,I1,L1,N1,T1,M1,?none,R1,Map1],
+ List2 = [A2,B2,F2,I2,L2,N2,T2,M2,?none,R2,Map2],
+ Sub1 = subtract_union(List1, List2, 0, []),
+ O = if O1 =:= ?none -> O1;
+ true -> t_subtract(O1, ?union(U2))
+ end,
+ Sub2 = if O2 =:= ?none -> Sub1;
+ true -> t_subtract(Sub1, t_opaque_structure(O2))
+ end,
+ t_sup(O, Sub2).
-spec subtract_union([erl_type()], [erl_type()], non_neg_integer(), [erl_type()]) -> erl_type().
@@ -3052,10 +3710,24 @@ t_is_equal(_, _) -> false.
t_is_subtype(T1, T2) ->
Inf = t_inf(T1, T2),
- t_is_equal(T1, Inf).
+ subtype_is_equal(T1, Inf).
+
+%% The subtype relation has to behave correctly irrespective of opaque
+%% types.
+subtype_is_equal(T, T) -> true;
+subtype_is_equal(T1, T2) ->
+ t_is_equal(case t_contains_opaque(T1) of
+ true -> t_unopaque(T1);
+ false -> T1
+ end,
+ case t_contains_opaque(T2) of
+ true -> t_unopaque(T2);
+ false -> T2
+ end).
-spec t_is_instance(erl_type(), erl_type()) -> boolean().
+%% XXX. To be removed.
t_is_instance(ConcreteType, Type) ->
t_is_subtype(ConcreteType, t_unopaque(Type)).
@@ -3067,12 +3739,12 @@ t_unopaque(T) ->
-spec t_unopaque(erl_type(), 'universe' | [erl_type()]) -> erl_type().
t_unopaque(?opaque(_) = T, Opaques) ->
- case Opaques =:= universe orelse lists:member(T, Opaques) of
+ case Opaques =:= 'universe' orelse is_opaque_type(T, Opaques) of
true -> t_unopaque(t_opaque_structure(T), Opaques);
- false -> T % XXX: needs revision for parametric opaque data types
+ false -> T
end;
t_unopaque(?list(ElemT, Termination, Sz), Opaques) ->
- ?list(t_unopaque(ElemT, Opaques), Termination, Sz);
+ ?list(t_unopaque(ElemT, Opaques), t_unopaque(Termination, Opaques), Sz);
t_unopaque(?tuple(?any, _, _) = T, _) -> T;
t_unopaque(?tuple(ArgTs, Sz, Tag), Opaques) when is_list(ArgTs) ->
NewArgTs = [t_unopaque(A, Opaques) || A <- ArgTs],
@@ -3081,14 +3753,20 @@ t_unopaque(?tuple_set(Set), Opaques) ->
NewSet = [{Sz, [t_unopaque(T, Opaques) || T <- Tuples]}
|| {Sz, Tuples} <- Set],
?tuple_set(NewSet);
-t_unopaque(?union([A,B,F,I,L,N,T,M,O,R]), Opaques) ->
+t_unopaque(?product(Types), Opaques) ->
+ ?product([t_unopaque(T, Opaques) || T <- Types]);
+t_unopaque(?function(Domain, Range), Opaques) ->
+ ?function(t_unopaque(Domain, Opaques), t_unopaque(Range, Opaques));
+t_unopaque(?union([A,B,F,I,L,N,T,M,O,R,Map]), Opaques) ->
UL = t_unopaque(L, Opaques),
UT = t_unopaque(T, Opaques),
- UO = case O of
- ?none -> [];
- ?opaque(Os) -> [t_unopaque(S, Opaques) || #opaque{struct = S} <- Os]
- end,
- t_sup([?union([A,B,F,I,UL,N,UT,M,?none,R])|UO]);
+ UF = t_unopaque(F, Opaques),
+ UMap = t_unopaque(Map, Opaques),
+ {OF,UO} = case t_unopaque(O, Opaques) of
+ ?opaque(_) = O1 -> {O1, []};
+ Type -> {?none, [Type]}
+ end,
+ t_sup([?union([A,B,UF,I,UL,N,UT,M,OF,R,UMap])|UO]);
t_unopaque(T, _) ->
T.
@@ -3134,6 +3812,12 @@ t_limit_k(?product(Elements), K) ->
?product([t_limit_k(X, K - 1) || X <- Elements]);
t_limit_k(?union(Elements), K) ->
?union([t_limit_k(X, K) || X <- Elements]);
+t_limit_k(?opaque(Es), K) ->
+ List = [begin
+ NewS = t_limit_k(S, K),
+ Opaque#opaque{struct = NewS}
+ end || #opaque{struct = S} = Opaque <- set_to_list(Es)],
+ ?opaque(ordsets:from_list(List));
t_limit_k(T, _K) -> T.
%%============================================================================
@@ -3142,7 +3826,7 @@ t_limit_k(T, _K) -> T.
%%
%%============================================================================
--spec t_abstract_records(erl_type(), dict()) -> erl_type().
+-spec t_abstract_records(erl_type(), type_table()) -> erl_type().
t_abstract_records(?list(Contents, Termination, Size), RecDict) ->
case t_abstract_records(Contents, RecDict) of
@@ -3167,7 +3851,7 @@ t_abstract_records(?union(Types), RecDict) ->
t_abstract_records(?tuple(?any, ?any, ?any) = T, _RecDict) ->
T;
t_abstract_records(?tuple(Elements, Arity, ?atom(_) = Tag), RecDict) ->
- [TagAtom] = t_atom_vals(Tag),
+ [TagAtom] = atom_vals(Tag),
case lookup_record(TagAtom, Arity - 1, RecDict) of
error -> t_tuple([t_abstract_records(E, RecDict) || E <- Elements]);
{ok, Fields} -> t_tuple([Tag|[T || {_Name, T} <- Fields]])
@@ -3176,6 +3860,8 @@ t_abstract_records(?tuple(Elements, _Arity, _Tag), RecDict) ->
t_tuple([t_abstract_records(E, RecDict) || E <- Elements]);
t_abstract_records(?tuple_set(_) = Tuples, RecDict) ->
t_sup([t_abstract_records(T, RecDict) || T <- t_tuple_subtypes(Tuples)]);
+t_abstract_records(?opaque(_)=Type, RecDict) ->
+ t_abstract_records(t_opaque_structure(Type), RecDict);
t_abstract_records(T, _RecDict) ->
T.
@@ -3198,6 +3884,14 @@ t_map(Fun, ?tuple(Elements, _Arity, _Tag)) ->
Fun(t_tuple([t_map(Fun, E) || E <- Elements]));
t_map(Fun, ?tuple_set(_) = Tuples) ->
Fun(t_sup([t_map(Fun, T) || T <- t_tuple_subtypes(Tuples)]));
+t_map(Fun, ?opaque(Set)) ->
+ L = [Opaque#opaque{struct = NewS} ||
+ #opaque{struct = S} = Opaque <- set_to_list(Set),
+ not t_is_none(NewS = t_map(Fun, S))],
+ Fun(case L of
+ [] -> ?none;
+ _ -> ?opaque(ordsets:from_list(L))
+ end);
t_map(Fun, T) ->
Fun(T).
@@ -3212,7 +3906,7 @@ t_map(Fun, T) ->
t_to_string(T) ->
t_to_string(T, dict:new()).
--spec t_to_string(erl_type(), dict()) -> string().
+-spec t_to_string(erl_type(), type_table()) -> string().
t_to_string(?any, _RecDict) ->
"any()";
@@ -3239,11 +3933,11 @@ t_to_string(?bitstr(8, 0), _RecDict) ->
t_to_string(?bitstr(1, 0), _RecDict) ->
"bitstring()";
t_to_string(?bitstr(0, B), _RecDict) ->
- lists:flatten(io_lib:format("<<_:~w>>", [B]));
+ flat_format("<<_:~w>>", [B]);
t_to_string(?bitstr(U, 0), _RecDict) ->
- lists:flatten(io_lib:format("<<_:_*~w>>", [U]));
+ flat_format("<<_:_*~w>>", [U]);
t_to_string(?bitstr(U, B), _RecDict) ->
- lists:flatten(io_lib:format("<<_:~w,_:_*~w>>", [B, U]));
+ flat_format("<<_:~w,_:_*~w>>", [B, U]);
t_to_string(?function(?any, ?any), _RecDict) ->
"fun()";
t_to_string(?function(?any, Range), RecDict) ->
@@ -3255,18 +3949,16 @@ t_to_string(?identifier(Set), _RecDict) ->
case Set of
?any -> "identifier()";
_ ->
- string:join([io_lib:format("~w()", [T]) || T <- set_to_list(Set)], " | ")
+ string:join([flat_format("~w()", [T]) || T <- set_to_list(Set)], " | ")
end;
-t_to_string(?opaque(Set), _RecDict) ->
- string:join([case is_opaque_builtin(Mod, Name) of
- true -> io_lib:format("~w()", [Name]);
- false -> io_lib:format("~w:~w()", [Mod, Name])
- end
- || #opaque{mod = Mod, name = Name} <- set_to_list(Set)],
+t_to_string(?opaque(Set), RecDict) ->
+ string:join([opaque_type(Mod, Name, Args, S, RecDict) ||
+ #opaque{mod = Mod, name = Name, struct = S, args = Args}
+ <- set_to_list(Set)],
" | ");
t_to_string(?matchstate(Pres, Slots), RecDict) ->
- io_lib:format("ms(~s,~s)", [t_to_string(Pres, RecDict),
- t_to_string(Slots,RecDict)]);
+ flat_format("ms(~s,~s)", [t_to_string(Pres, RecDict),
+ t_to_string(Slots,RecDict)]);
t_to_string(?nil, _RecDict) ->
"[]";
t_to_string(?nonempty_list(Contents, Termination), RecDict) ->
@@ -3282,7 +3974,9 @@ t_to_string(?nonempty_list(Contents, Termination), RecDict) ->
case Contents =:= ?any of
true -> ok;
false ->
- erlang:error({illegal_list, ?nonempty_list(Contents, Termination)})
+ %% XXX. See comment below.
+ %% erlang:error({illegal_list, ?nonempty_list(Contents, Termination)})
+ ok
end,
"nonempty_maybe_improper_list()";
_ ->
@@ -3305,11 +3999,14 @@ t_to_string(?list(Contents, Termination, ?unknown_qual), RecDict) ->
end;
?any ->
%% Just a safety check.
+ %% XXX. Types such as "maybe_improper_list(integer(), any())"
+ %% are OK, but cannot be printed!?
case Contents =:= ?any of
true -> ok;
false ->
- L = ?list(Contents, Termination, ?unknown_qual),
- erlang:error({illegal_list, L})
+ ok
+ %% L = ?list(Contents, Termination, ?unknown_qual),
+ %% erlang:error({illegal_list, L})
end,
"maybe_improper_list()";
_ ->
@@ -3330,7 +4027,7 @@ t_to_string(?integer_pos, _RecDict) -> "pos_integer()";
t_to_string(?integer_non_neg, _RecDict) -> "non_neg_integer()";
t_to_string(?integer_neg, _RecDict) -> "neg_integer()";
t_to_string(?int_range(From, To), _RecDict) ->
- lists:flatten(io_lib:format("~w..~w", [From, To]));
+ flat_format("~w..~w", [From, To]);
t_to_string(?integer(?any), _RecDict) -> "integer()";
t_to_string(?float, _RecDict) -> "float()";
t_to_string(?number(?any, ?unknown_qual), _RecDict) -> "number()";
@@ -3338,19 +4035,21 @@ t_to_string(?product(List), RecDict) ->
"<" ++ comma_sequence(List, RecDict) ++ ">";
t_to_string(?remote(Set), RecDict) ->
string:join([case Args =:= [] of
- true -> io_lib:format("~w:~w()", [Mod, Name]);
+ true -> flat_format("~w:~w()", [Mod, Name]);
false ->
ArgString = comma_sequence(Args, RecDict),
- io_lib:format("~w:~w(~s)", [Mod, Name, ArgString])
+ flat_format("~w:~w(~s)", [Mod, Name, ArgString])
end
|| #remote{mod = Mod, name = Name, args = Args} <-
set_to_list(Set)],
" | ");
+t_to_string(?map(Pairs), RecDict) ->
+ "#{" ++ map_pairs_to_string(Pairs,RecDict) ++ "}";
t_to_string(?tuple(?any, ?any, ?any), _RecDict) -> "tuple()";
t_to_string(?tuple(Elements, _Arity, ?any), RecDict) ->
"{" ++ comma_sequence(Elements, RecDict) ++ "}";
t_to_string(?tuple(Elements, Arity, Tag), RecDict) ->
- [TagAtom] = t_atom_vals(Tag),
+ [TagAtom] = atom_vals(Tag),
case lookup_record(TagAtom, Arity-1, RecDict) of
error -> "{" ++ comma_sequence(Elements, RecDict) ++ "}";
{ok, FieldNames} ->
@@ -3361,9 +4060,16 @@ t_to_string(?tuple_set(_) = T, RecDict) ->
t_to_string(?union(Types), RecDict) ->
union_sequence([T || T <- Types, T =/= ?none], RecDict);
t_to_string(?var(Id), _RecDict) when is_atom(Id) ->
- io_lib:format("~s", [atom_to_list(Id)]);
+ flat_format("~s", [atom_to_list(Id)]);
t_to_string(?var(Id), _RecDict) when is_integer(Id) ->
- io_lib:format("var(~w)", [Id]).
+ flat_format("var(~w)", [Id]).
+
+
+map_pairs_to_string([],_) -> [];
+map_pairs_to_string(Pairs,RecDict) ->
+ StrPairs = [{t_to_string(K,RecDict),t_to_string(V,RecDict)}||{K,V}<-Pairs],
+ string:join([K ++ "=>" ++ V||{K,V}<-StrPairs], ", ").
+
record_to_string(Tag, [_|Fields], FieldNames, RecDict) ->
FieldStrings = record_fields_to_string(Fields, FieldNames, RecDict, []),
@@ -3371,7 +4077,7 @@ record_to_string(Tag, [_|Fields], FieldNames, RecDict) ->
record_fields_to_string([F|Fs], [{FName, _DefType}|FDefs], RecDict, Acc) ->
NewAcc =
- case t_is_any(F) orelse t_is_atom('undefined', F) of
+ case t_is_equal(F, t_any()) orelse t_is_any_atom('undefined', F) of
true -> Acc;
false ->
StrFV = atom_to_string(FName) ++ "::" ++ t_to_string(F, RecDict),
@@ -3386,16 +4092,17 @@ record_fields_to_string([F|Fs], [{FName, _DefType}|FDefs], RecDict, Acc) ->
record_fields_to_string([], [], _RecDict, Acc) ->
lists:reverse(Acc).
--spec record_field_diffs_to_string(erl_type(), dict()) -> string().
+-spec record_field_diffs_to_string(erl_type(), type_table()) -> string().
record_field_diffs_to_string(?tuple([_|Fs], Arity, Tag), RecDict) ->
- [TagAtom] = t_atom_vals(Tag),
+ [TagAtom] = atom_vals(Tag),
{ok, FieldNames} = lookup_record(TagAtom, Arity-1, RecDict),
%% io:format("RecCElems = ~p\nRecTypes = ~p\n", [Fs, FieldNames]),
FieldDiffs = field_diffs(Fs, FieldNames, RecDict, []),
string:join(FieldDiffs, " and ").
field_diffs([F|Fs], [{FName, DefType}|FDefs], RecDict, Acc) ->
+ %% Don't care about opaqueness for now.
NewAcc =
case not t_is_none(t_inf(F, DefType)) of
true -> Acc;
@@ -3418,6 +4125,32 @@ union_sequence(Types, RecDict) ->
List = [t_to_string(T, RecDict) || T <- Types],
string:join(List, " | ").
+-ifdef(DEBUG).
+opaque_type(Mod, Name, _Args, S, RecDict) ->
+ ArgsString = comma_sequence(_Args, RecDict),
+ String = t_to_string(S, RecDict),
+ opaque_name(Mod, Name, ArgsString) ++ "[" ++ String ++ "]".
+-else.
+opaque_type(Mod, Name, Args, _S, RecDict) ->
+ ArgsString = comma_sequence(Args, RecDict),
+ opaque_name(Mod, Name, ArgsString).
+-endif.
+
+opaque_name(Mod, Name, Extra) ->
+ S = mod_name(Mod, Name),
+ flat_format("~s(~s)", [S, Extra]).
+
+mod_name(Mod, Name) ->
+ case is_obsolete_opaque_builtin(Mod, Name) of
+ true -> flat_format("~w", [Name]);
+ false -> flat_format("~w:~w", [Mod, Name])
+ end.
+
+is_obsolete_opaque_builtin(digraph, digraph) -> true;
+is_obsolete_opaque_builtin(gb_sets, gb_set) -> true;
+is_obsolete_opaque_builtin(gb_trees, gb_tree) -> true;
+is_obsolete_opaque_builtin(_, _) -> false.
+
%%=============================================================================
%%
%% Build a type from parse forms.
@@ -3429,318 +4162,270 @@ union_sequence(Types, RecDict) ->
t_from_form(Form) ->
t_from_form(Form, dict:new()).
--spec t_from_form(parse_form(), dict()) -> erl_type().
+-spec t_from_form(parse_form(), type_table()) -> erl_type().
t_from_form(Form, RecDict) ->
t_from_form(Form, RecDict, dict:new()).
--spec t_from_form(parse_form(), dict(), dict()) -> erl_type().
+-spec t_from_form(parse_form(), type_table(), var_table()) -> erl_type().
t_from_form(Form, RecDict, VarDict) ->
- {T, _R} = t_from_form(Form, [], false, RecDict, VarDict),
+ {T, _R} = t_from_form(Form, [], RecDict, VarDict),
T.
--type type_names() :: [{'type' | 'opaque' | 'record', atom()}].
--spec t_from_form(parse_form(), type_names(), boolean(), dict(), dict()) ->
+-type type_names() :: [type_key() | record_key()].
+
+-spec t_from_form(parse_form(), type_names(), type_table(), var_table()) ->
{erl_type(), type_names()}.
-t_from_form({var, _L, '_'}, _TypeNames, _InOpaque, _RecDict, _VarDict) ->
+t_from_form({var, _L, '_'}, _TypeNames, _RecDict, _VarDict) ->
{t_any(), []};
-t_from_form({var, _L, Name}, _TypeNames, _InOpaque, _RecDict, VarDict) ->
+t_from_form({var, _L, Name}, _TypeNames, _RecDict, VarDict) ->
case dict:find(Name, VarDict) of
error -> {t_var(Name), []};
{ok, Val} -> {Val, []}
end;
-t_from_form({ann_type, _L, [_Var, Type]}, TypeNames, InOpaque, RecDict,
- VarDict) ->
- t_from_form(Type, TypeNames, InOpaque, RecDict, VarDict);
-t_from_form({paren_type, _L, [Type]}, TypeNames, InOpaque, RecDict,
- VarDict) ->
- t_from_form(Type, TypeNames, InOpaque, RecDict, VarDict);
+t_from_form({ann_type, _L, [_Var, Type]}, TypeNames, RecDict, VarDict) ->
+ t_from_form(Type, TypeNames, RecDict, VarDict);
+t_from_form({paren_type, _L, [Type]}, TypeNames, RecDict, VarDict) ->
+ t_from_form(Type, TypeNames, RecDict, VarDict);
t_from_form({remote_type, _L, [{atom, _, Module}, {atom, _, Type}, Args]},
- TypeNames, InOpaque, RecDict, VarDict) ->
- {L, R} = list_from_form(Args, TypeNames, InOpaque, RecDict, VarDict),
+ TypeNames, RecDict, VarDict) ->
+ {L, R} = list_from_form(Args, TypeNames, RecDict, VarDict),
{t_remote(Module, Type, L), R};
-t_from_form({atom, _L, Atom}, _TypeNames, _InOpaque, _RecDict, _VarDict) ->
+t_from_form({atom, _L, Atom}, _TypeNames, _RecDict, _VarDict) ->
{t_atom(Atom), []};
-t_from_form({integer, _L, Int}, _TypeNames, _InOpaque, _RecDict, _VarDict) ->
+t_from_form({integer, _L, Int}, _TypeNames, _RecDict, _VarDict) ->
{t_integer(Int), []};
-t_from_form({op, _L, _Op, _Arg} = Op, _TypeNames, _InOpaque, _RecDict,
- _VarDict) ->
+t_from_form({op, _L, _Op, _Arg} = Op, _TypeNames, _RecDict, _VarDict) ->
case erl_eval:partial_eval(Op) of
{integer, _, Val} ->
{t_integer(Val), []};
_ -> throw({error, io_lib:format("Unable to evaluate type ~w\n", [Op])})
end;
-t_from_form({op, _L, _Op, _Arg1, _Arg2} = Op, _TypeNames, _InOpaque,
+t_from_form({op, _L, _Op, _Arg1, _Arg2} = Op, _TypeNames,
_RecDict, _VarDict) ->
case erl_eval:partial_eval(Op) of
{integer, _, Val} ->
{t_integer(Val), []};
_ -> throw({error, io_lib:format("Unable to evaluate type ~w\n", [Op])})
end;
-t_from_form({type, _L, any, []}, _TypeNames, _InOpaque, _RecDict,
- _VarDict) ->
+t_from_form({type, _L, any, []}, _TypeNames, _RecDict, _VarDict) ->
{t_any(), []};
-t_from_form({type, _L, arity, []}, _TypeNames, _InOpaque, _RecDict,
- _VarDict) ->
+t_from_form({type, _L, arity, []}, _TypeNames, _RecDict, _VarDict) ->
{t_arity(), []};
-t_from_form({type, _L, array, []}, _TypeNames, _InOpaque, _RecDict,
- _VarDict) ->
- {t_array(), []};
-t_from_form({type, _L, atom, []}, _TypeNames, _InOpaque, _RecDict,
- _VarDict) ->
+t_from_form({type, _L, array, []}, TypeNames, RecDict, VarDict) ->
+ builtin_type(array, t_array(), TypeNames, RecDict, VarDict);
+t_from_form({type, _L, atom, []}, _TypeNames, _RecDict, _VarDict) ->
{t_atom(), []};
-t_from_form({type, _L, binary, []}, _TypeNames, _InOpaque, _RecDict,
- _VarDict) ->
+t_from_form({type, _L, binary, []}, _TypeNames, _RecDict, _VarDict) ->
{t_binary(), []};
t_from_form({type, _L, binary, [Base, Unit]} = Type,
- _TypeNames, _InOpaque, _RecDict, _VarDict) ->
+ _TypeNames, _RecDict, _VarDict) ->
case {erl_eval:partial_eval(Base), erl_eval:partial_eval(Unit)} of
{{integer, _, B}, {integer, _, U}} when B >= 0, U >= 0 ->
{t_bitstr(U, B), []};
_ -> throw({error, io_lib:format("Unable to evaluate type ~w\n", [Type])})
end;
-t_from_form({type, _L, bitstring, []}, _TypeNames, _InOpaque, _RecDict,
- _VarDict) ->
+t_from_form({type, _L, bitstring, []}, _TypeNames, _RecDict, _VarDict) ->
{t_bitstr(), []};
-t_from_form({type, _L, bool, []}, _TypeNames, _InOpaque, _RecDict,
- _VarDict) ->
+t_from_form({type, _L, bool, []}, _TypeNames, _RecDict, _VarDict) ->
{t_boolean(), []}; % XXX: Temporarily
-t_from_form({type, _L, boolean, []}, _TypeNames, _InOpaque, _RecDict,
- _VarDict) ->
+t_from_form({type, _L, boolean, []}, _TypeNames, _RecDict, _VarDict) ->
{t_boolean(), []};
-t_from_form({type, _L, byte, []}, _TypeNames, _InOpaque, _RecDict,
- _VarDict) ->
+t_from_form({type, _L, byte, []}, _TypeNames, _RecDict, _VarDict) ->
{t_byte(), []};
-t_from_form({type, _L, char, []}, _TypeNames, _InOpaque, _RecDict,
- _VarDict) ->
+t_from_form({type, _L, char, []}, _TypeNames, _RecDict, _VarDict) ->
{t_char(), []};
-t_from_form({type, _L, dict, []}, _TypeNames, _InOpaque, _RecDict,
- _VarDict) ->
- {t_dict(), []};
-t_from_form({type, _L, digraph, []}, _TypeNames, _InOpaque, _RecDict,
- _VarDict) ->
- {t_digraph(), []};
-t_from_form({type, _L, float, []}, _TypeNames, _InOpaque, _RecDict,
- _VarDict) ->
+t_from_form({type, _L, dict, []}, TypeNames, RecDict, VarDict) ->
+ builtin_type(dict, t_dict(), TypeNames, RecDict, VarDict);
+t_from_form({type, _L, digraph, []}, TypeNames, RecDict, VarDict) ->
+ builtin_type(digraph, t_digraph(), TypeNames, RecDict, VarDict);
+t_from_form({type, _L, float, []}, _TypeNames, _RecDict, _VarDict) ->
{t_float(), []};
-t_from_form({type, _L, function, []}, _TypeNames, _InOpaque, _RecDict,
- _VarDict) ->
+t_from_form({type, _L, function, []}, _TypeNames, _RecDict, _VarDict) ->
{t_fun(), []};
-t_from_form({type, _L, 'fun', []}, _TypeNames, _InOpaque, _RecDict,
- _VarDict) ->
+t_from_form({type, _L, 'fun', []}, _TypeNames, _RecDict, _VarDict) ->
{t_fun(), []};
t_from_form({type, _L, 'fun', [{type, _, any}, Range]}, TypeNames,
- InOpaque, RecDict, VarDict) ->
- {T, R} = t_from_form(Range, TypeNames, InOpaque, RecDict, VarDict),
+ RecDict, VarDict) ->
+ {T, R} = t_from_form(Range, TypeNames, RecDict, VarDict),
{t_fun(T), R};
t_from_form({type, _L, 'fun', [{type, _, product, Domain}, Range]},
- TypeNames, InOpaque, RecDict, VarDict) ->
- {L, R1} = list_from_form(Domain, TypeNames, InOpaque, RecDict, VarDict),
- {T, R2} = t_from_form(Range, TypeNames, InOpaque, RecDict, VarDict),
+ TypeNames, RecDict, VarDict) ->
+ {L, R1} = list_from_form(Domain, TypeNames, RecDict, VarDict),
+ {T, R2} = t_from_form(Range, TypeNames, RecDict, VarDict),
{t_fun(L, T), R1 ++ R2};
-t_from_form({type, _L, gb_set, []}, _TypeNames, _InOpaque, _RecDict,
- _VarDict) ->
- {t_gb_set(), []};
-t_from_form({type, _L, gb_tree, []}, _TypeNames, _InOpaque, _RecDict,
- _VarDict) ->
- {t_gb_tree(), []};
-t_from_form({type, _L, identifier, []}, _TypeNames, _InOpaque, _RecDict,
- _VarDict) ->
+t_from_form({type, _L, gb_set, []}, TypeNames, RecDict, VarDict) ->
+ builtin_type(gb_set, t_gb_set(), TypeNames, RecDict, VarDict);
+t_from_form({type, _L, gb_tree, []}, TypeNames, RecDict, VarDict) ->
+ builtin_type(gb_tree, t_gb_tree(), TypeNames, RecDict, VarDict);
+t_from_form({type, _L, identifier, []}, _TypeNames, _RecDict, _VarDict) ->
{t_identifier(), []};
-t_from_form({type, _L, integer, []}, _TypeNames, _InOpaque, _RecDict,
- _VarDict) ->
+t_from_form({type, _L, integer, []}, _TypeNames, _RecDict, _VarDict) ->
{t_integer(), []};
-t_from_form({type, _L, iodata, []}, _TypeNames, _InOpaque, _RecDict,
- _VarDict) ->
+t_from_form({type, _L, iodata, []}, _TypeNames, _RecDict, _VarDict) ->
{t_iodata(), []};
-t_from_form({type, _L, iolist, []}, _TypeNames, _InOpaque, _RecDict,
- _VarDict) ->
+t_from_form({type, _L, iolist, []}, _TypeNames, _RecDict, _VarDict) ->
{t_iolist(), []};
-t_from_form({type, _L, list, []}, _TypeNames, _InOpaque, _RecDict,
- _VarDict) ->
+t_from_form({type, _L, list, []}, _TypeNames, _RecDict, _VarDict) ->
{t_list(), []};
-t_from_form({type, _L, list, [Type]}, TypeNames, InOpaque, RecDict,
- VarDict) ->
- {T, R} = t_from_form(Type, TypeNames, InOpaque, RecDict, VarDict),
+t_from_form({type, _L, list, [Type]}, TypeNames, RecDict, VarDict) ->
+ {T, R} = t_from_form(Type, TypeNames, RecDict, VarDict),
{t_list(T), R};
-t_from_form({type, _L, mfa, []}, _TypeNames, _InOpaque, _RecDict,
- _VarDict) ->
+t_from_form({type, _L, map, _}, TypeNames, RecDict, VarDict) ->
+ builtin_type(map, t_map([]), TypeNames, RecDict, VarDict);
+t_from_form({type, _L, mfa, []}, _TypeNames, _RecDict, _VarDict) ->
{t_mfa(), []};
-t_from_form({type, _L, module, []}, _TypeNames, _InOpaque, _RecDict,
- _VarDict) ->
+t_from_form({type, _L, module, []}, _TypeNames, _RecDict, _VarDict) ->
{t_module(), []};
-t_from_form({type, _L, nil, []}, _TypeNames, _InOpaque, _RecDict,
- _VarDict) ->
+t_from_form({type, _L, nil, []}, _TypeNames, _RecDict, _VarDict) ->
{t_nil(), []};
-t_from_form({type, _L, neg_integer, []}, _TypeNames, _InOpaque, _RecDict,
- _VarDict) ->
+t_from_form({type, _L, neg_integer, []}, _TypeNames, _RecDict, _VarDict) ->
{t_neg_integer(), []};
-t_from_form({type, _L, non_neg_integer, []}, _TypeNames, _InOpaque, _RecDict,
+t_from_form({type, _L, non_neg_integer, []}, _TypeNames, _RecDict,
_VarDict) ->
{t_non_neg_integer(), []};
-t_from_form({type, _L, no_return, []}, _TypeNames, _InOpaque, _RecDict,
- _VarDict) ->
+t_from_form({type, _L, no_return, []}, _TypeNames, _RecDict, _VarDict) ->
{t_unit(), []};
-t_from_form({type, _L, node, []}, _TypeNames, _InOpaque, _RecDict,
- _VarDict) ->
+t_from_form({type, _L, node, []}, _TypeNames, _RecDict, _VarDict) ->
{t_node(), []};
-t_from_form({type, _L, none, []}, _TypeNames, _InOpaque, _RecDict,
- _VarDict) ->
+t_from_form({type, _L, none, []}, _TypeNames, _RecDict, _VarDict) ->
{t_none(), []};
-t_from_form({type, _L, nonempty_list, []}, _TypeNames, _InOpaque, _RecDict,
- _VarDict) ->
+t_from_form({type, _L, nonempty_list, []}, _TypeNames, _RecDict, _VarDict) ->
{t_nonempty_list(), []};
-t_from_form({type, _L, nonempty_list, [Type]}, TypeNames, InOpaque, RecDict,
- VarDict) ->
- {T, R} = t_from_form(Type, TypeNames, InOpaque, RecDict, VarDict),
+t_from_form({type, _L, nonempty_list, [Type]}, TypeNames, RecDict, VarDict) ->
+ {T, R} = t_from_form(Type, TypeNames, RecDict, VarDict),
{t_nonempty_list(T), R};
t_from_form({type, _L, nonempty_improper_list, [Cont, Term]}, TypeNames,
- InOpaque, RecDict, VarDict) ->
- {T1, R1} = t_from_form(Cont, TypeNames, InOpaque, RecDict, VarDict),
- {T2, R2} = t_from_form(Term, TypeNames, InOpaque, RecDict, VarDict),
+ RecDict, VarDict) ->
+ {T1, R1} = t_from_form(Cont, TypeNames, RecDict, VarDict),
+ {T2, R2} = t_from_form(Term, TypeNames, RecDict, VarDict),
{t_cons(T1, T2), R1 ++ R2};
t_from_form({type, _L, nonempty_maybe_improper_list, []}, _TypeNames,
- _InOpaque, _RecDict, _VarDict) ->
+ _RecDict, _VarDict) ->
{t_cons(?any, ?any), []};
t_from_form({type, _L, nonempty_maybe_improper_list, [Cont, Term]},
- TypeNames, InOpaque, RecDict, VarDict) ->
- {T1, R1} = t_from_form(Cont, TypeNames, InOpaque, RecDict, VarDict),
- {T2, R2} = t_from_form(Term, TypeNames, InOpaque, RecDict, VarDict),
+ TypeNames, RecDict, VarDict) ->
+ {T1, R1} = t_from_form(Cont, TypeNames, RecDict, VarDict),
+ {T2, R2} = t_from_form(Term, TypeNames, RecDict, VarDict),
{t_cons(T1, T2), R1 ++ R2};
-t_from_form({type, _L, nonempty_string, []}, _TypeNames, _InOpaque, _RecDict,
+t_from_form({type, _L, nonempty_string, []}, _TypeNames, _RecDict,
_VarDict) ->
{t_nonempty_string(), []};
-t_from_form({type, _L, number, []}, _TypeNames, _InOpaque, _RecDict,
- _VarDict) ->
+t_from_form({type, _L, number, []}, _TypeNames, _RecDict, _VarDict) ->
{t_number(), []};
-t_from_form({type, _L, pid, []}, _TypeNames, _InOpaque, _RecDict,
- _VarDict) ->
+t_from_form({type, _L, pid, []}, _TypeNames, _RecDict, _VarDict) ->
{t_pid(), []};
-t_from_form({type, _L, port, []}, _TypeNames, _InOpaque, _RecDict,
- _VarDict) ->
+t_from_form({type, _L, port, []}, _TypeNames, _RecDict, _VarDict) ->
{t_port(), []};
-t_from_form({type, _L, pos_integer, []}, _TypeNames, _InOpaque, _RecDict,
- _VarDict) ->
+t_from_form({type, _L, pos_integer, []}, _TypeNames, _RecDict, _VarDict) ->
{t_pos_integer(), []};
-t_from_form({type, _L, maybe_improper_list, []}, _TypeNames, _InOpaque,
+t_from_form({type, _L, maybe_improper_list, []}, _TypeNames,
_RecDict, _VarDict) ->
{t_maybe_improper_list(), []};
t_from_form({type, _L, maybe_improper_list, [Content, Termination]},
- TypeNames, InOpaque, RecDict, VarDict) ->
- {T1, R1} = t_from_form(Content, TypeNames, InOpaque, RecDict, VarDict),
- {T2, R2} = t_from_form(Termination, TypeNames, InOpaque, RecDict, VarDict),
+ TypeNames, RecDict, VarDict) ->
+ {T1, R1} = t_from_form(Content, TypeNames, RecDict, VarDict),
+ {T2, R2} = t_from_form(Termination, TypeNames, RecDict, VarDict),
{t_maybe_improper_list(T1, T2), R1 ++ R2};
-t_from_form({type, _L, product, Elements}, TypeNames, InOpaque, RecDict,
- VarDict) ->
- {L, R} = list_from_form(Elements, TypeNames, InOpaque, RecDict, VarDict),
+t_from_form({type, _L, product, Elements}, TypeNames, RecDict, VarDict) ->
+ {L, R} = list_from_form(Elements, TypeNames, RecDict, VarDict),
{t_product(L), R};
-t_from_form({type, _L, queue, []}, _TypeNames, _InOpaque, _RecDict,
- _VarDict) ->
- {t_queue(), []};
+t_from_form({type, _L, queue, []}, TypeNames, RecDict, VarDict) ->
+ builtin_type(queue, t_queue(), TypeNames, RecDict, VarDict);
t_from_form({type, _L, range, [From, To]} = Type,
- _TypeNames, _InOpaque, _RecDict, _VarDict) ->
+ _TypeNames, _RecDict, _VarDict) ->
case {erl_eval:partial_eval(From), erl_eval:partial_eval(To)} of
{{integer, _, FromVal}, {integer, _, ToVal}} ->
{t_from_range(FromVal, ToVal), []};
_ -> throw({error, io_lib:format("Unable to evaluate type ~w\n", [Type])})
end;
-t_from_form({type, _L, record, [Name|Fields]}, TypeNames, InOpaque, RecDict,
- VarDict) ->
- record_from_form(Name, Fields, TypeNames, InOpaque, RecDict, VarDict);
-t_from_form({type, _L, reference, []}, _TypeNames, _InOpaque, _RecDict,
- _VarDict) ->
+t_from_form({type, _L, record, [Name|Fields]}, TypeNames, RecDict, VarDict) ->
+ record_from_form(Name, Fields, TypeNames, RecDict, VarDict);
+t_from_form({type, _L, reference, []}, _TypeNames, _RecDict, _VarDict) ->
{t_reference(), []};
-t_from_form({type, _L, set, []}, _TypeNames, _InOpaque, _RecDict,
- _VarDict) ->
- {t_set(), []};
-t_from_form({type, _L, string, []}, _TypeNames, _InOpaque, _RecDict,
- _VarDict) ->
+t_from_form({type, _L, set, []}, TypeNames, RecDict, VarDict) ->
+ builtin_type(set, t_set(), TypeNames, RecDict, VarDict);
+t_from_form({type, _L, string, []}, _TypeNames, _RecDict, _VarDict) ->
{t_string(), []};
-t_from_form({type, _L, term, []}, _TypeNames, _InOpaque, _RecDict,
- _VarDict) ->
+t_from_form({type, _L, term, []}, _TypeNames, _RecDict, _VarDict) ->
{t_any(), []};
-t_from_form({type, _L, tid, []}, _TypeNames, _InOpaque, _RecDict,
- _VarDict) ->
- {t_tid(), []};
-t_from_form({type, _L, timeout, []}, _TypeNames, _InOpaque, _RecDict,
- _VarDict) ->
+t_from_form({type, _L, tid, []}, TypeNames, RecDict, VarDict) ->
+ builtin_type(tid, t_tid(), TypeNames, RecDict, VarDict);
+t_from_form({type, _L, timeout, []}, _TypeNames, _RecDict, _VarDict) ->
{t_timeout(), []};
-t_from_form({type, _L, tuple, any}, _TypeNames, _InOpaque, _RecDict,
- _VarDict) ->
+t_from_form({type, _L, tuple, any}, _TypeNames, _RecDict, _VarDict) ->
{t_tuple(), []};
-t_from_form({type, _L, tuple, Args}, TypeNames, InOpaque, RecDict, VarDict) ->
- {L, R} = list_from_form(Args, TypeNames, InOpaque, RecDict, VarDict),
+t_from_form({type, _L, tuple, Args}, TypeNames, RecDict, VarDict) ->
+ {L, R} = list_from_form(Args, TypeNames, RecDict, VarDict),
{t_tuple(L), R};
-t_from_form({type, _L, union, Args}, TypeNames, InOpaque, RecDict, VarDict) ->
- {L, R} = list_from_form(Args, TypeNames, InOpaque, RecDict, VarDict),
+t_from_form({type, _L, union, Args}, TypeNames, RecDict, VarDict) ->
+ {L, R} = list_from_form(Args, TypeNames, RecDict, VarDict),
{t_sup(L), R};
-t_from_form({type, _L, Name, Args}, TypeNames, InOpaque, RecDict, VarDict) ->
+t_from_form({type, _L, Name, Args}, TypeNames, RecDict, VarDict) ->
+ type_from_form(Name, Args, TypeNames, RecDict, VarDict);
+t_from_form({opaque, _L, Name, {Mod, Args, Rep}}, _TypeNames,
+ _RecDict, _VarDict) ->
+ {t_opaque(Mod, Name, Args, Rep), []}.
+
+builtin_type(Name, Type, TypeNames, RecDict, VarDict) ->
+ case lookup_type(Name, 0, RecDict) of
+ {_, {_M, _T, _A}} ->
+ type_from_form(Name, [], TypeNames, RecDict, VarDict);
+ error ->
+ {Type, []}
+ end.
+
+type_from_form(Name, Args, TypeNames, RecDict, VarDict) ->
ArgsLen = length(Args),
+ ArgTypes = forms_to_types(Args, TypeNames, RecDict, VarDict),
case lookup_type(Name, ArgsLen, RecDict) of
{type, {_Module, Type, ArgNames}} ->
- case can_unfold_more({type, Name}, TypeNames) of
+ TypeName = {type, Name, ArgsLen},
+ case can_unfold_more(TypeName, TypeNames) of
true ->
- List = lists:zipwith(
- fun(ArgName, ArgType) ->
- {Ttemp, _R} = t_from_form(ArgType, TypeNames,
- InOpaque, RecDict,
- VarDict),
- {ArgName, Ttemp}
- end,
- ArgNames, Args),
+ List = lists:zip(ArgNames, ArgTypes),
TmpVarDict = dict:from_list(List),
- {T, R} = t_from_form(Type, [{type, Name}|TypeNames], InOpaque,
+ {T, R} = t_from_form(Type, [TypeName|TypeNames],
RecDict, TmpVarDict),
- case lists:member({type, Name}, R) of
+ case lists:member(TypeName, R) of
true -> {t_limit(T, ?REC_TYPE_LIMIT), R};
false -> {T, R}
end;
- false -> {t_any(), [{type, Name}]}
+ false -> {t_any(), [TypeName]}
end;
{opaque, {Module, Type, ArgNames}} ->
+ TypeName = {opaque, Name, ArgsLen},
{Rep, Rret} =
- case can_unfold_more({opaque, Name}, TypeNames) of
+ case can_unfold_more(TypeName, TypeNames) of
true ->
- List = lists:zipwith(
- fun(ArgName, ArgType) ->
- {Ttemp, _R} = t_from_form(ArgType, TypeNames,
- InOpaque, RecDict,
- VarDict),
- {ArgName, Ttemp}
- end,
- ArgNames, Args),
+ List = lists:zip(ArgNames, ArgTypes),
TmpVarDict = dict:from_list(List),
- {T, R} = t_from_form(Type, [{opaque, Name}|TypeNames], true,
+ {T, R} = t_from_form(Type, [TypeName|TypeNames],
RecDict, TmpVarDict),
- case lists:member({opaque, Name}, R) of
+ case lists:member(TypeName, R) of
true -> {t_limit(T, ?REC_TYPE_LIMIT), R};
false -> {T, R}
end;
- false -> {t_any(), [{opaque, Name}]}
+ false -> {t_any(), [TypeName]}
end,
- Tret =
- case InOpaque of
- true -> Rep;
- false ->
- t_from_form({opaque, -1, Name, {Module, Args, Rep}},
- RecDict, VarDict)
- end,
- {Tret, Rret};
+ Args2 = [subst_all_vars_to_any(ArgType) || ArgType <- ArgTypes],
+ {skip_opaque_alias(Rep, Module, Name, Args2), Rret};
error ->
Msg = io_lib:format("Unable to find type ~w/~w\n", [Name, ArgsLen]),
throw({error, Msg})
- end;
-t_from_form({opaque, _L, Name, {Mod, Args, Rep}}, _TypeNames, _InOpaque,
- _RecDict, _VarDict) ->
- case Args of
- [] -> {t_opaque(Mod, Name, Args, Rep), []};
- _ -> throw({error, "Polymorphic opaque types not supported yet"})
end.
-record_from_form({atom, _, Name}, ModFields, TypeNames, InOpaque, RecDict,
- VarDict) ->
+forms_to_types(Forms, TypeNames, RecDict, VarDict) ->
+ {Types, _} = list_from_form(Forms, TypeNames, RecDict, VarDict),
+ Types.
+
+skip_opaque_alias(?opaque(_) = T, _Mod, _Name, _Args) -> T;
+skip_opaque_alias(T, Module, Name, Args) ->
+ t_opaque(Module, Name, Args, T).
+
+record_from_form({atom, _, Name}, ModFields, TypeNames, RecDict, VarDict) ->
case can_unfold_more({record, Name}, TypeNames) of
true ->
case lookup_record(Name, RecDict) of
@@ -3751,11 +4436,11 @@ record_from_form({atom, _, Name}, ModFields, TypeNames, InOpaque, RecDict,
{DeclFields1, R1} =
case lists:all(fun(Elem) -> Elem end, AreTyped) of
true -> {DeclFields, []};
- false -> fields_from_form(DeclFields, TypeNames1, InOpaque,
+ false -> fields_from_form(DeclFields, TypeNames1,
RecDict, dict:new())
end,
{GetModRec, R2} = get_mod_record(ModFields, DeclFields1,
- TypeNames1, InOpaque,
+ TypeNames1,
RecDict, VarDict),
case GetModRec of
{error, FieldName} ->
@@ -3772,13 +4457,11 @@ record_from_form({atom, _, Name}, ModFields, TypeNames, InOpaque, RecDict,
false -> {t_any(), []}
end.
-get_mod_record([], DeclFields, _TypeNames, _InOpaque, _RecDict,
- _VarDict) ->
+get_mod_record([], DeclFields, _TypeNames, _RecDict, _VarDict) ->
{{ok, DeclFields}, []};
-get_mod_record(ModFields, DeclFields, TypeNames, InOpaque, RecDict,
- VarDict) ->
+get_mod_record(ModFields, DeclFields, TypeNames, RecDict, VarDict) ->
DeclFieldsDict = orddict:from_list(DeclFields),
- {ModFieldsDict, R} = build_field_dict(ModFields, TypeNames, InOpaque,
+ {ModFieldsDict, R} = build_field_dict(ModFields, TypeNames,
RecDict, VarDict),
case get_mod_record(DeclFieldsDict, ModFieldsDict, []) of
{error, _FieldName} = Error -> {Error, R};
@@ -3788,23 +4471,26 @@ get_mod_record(ModFields, DeclFields, TypeNames, InOpaque, RecDict,
R}
end.
-build_field_dict(FieldTypes, TypeNames, InOpaque, RecDict, VarDict) ->
- build_field_dict(FieldTypes, TypeNames, InOpaque, RecDict, VarDict, []).
+build_field_dict(FieldTypes, TypeNames, RecDict, VarDict) ->
+ build_field_dict(FieldTypes, TypeNames, RecDict, VarDict, []).
build_field_dict([{type, _, field_type, [{atom, _, Name}, Type]}|Left],
- TypeNames, InOpaque, RecDict, VarDict, Acc) ->
- {T, R1} = t_from_form(Type, TypeNames, InOpaque, RecDict, VarDict),
+ TypeNames, RecDict, VarDict, Acc) ->
+ {T, R1} = t_from_form(Type, TypeNames, RecDict, VarDict),
NewAcc = [{Name, T}|Acc],
- {D, R2} = build_field_dict(Left, TypeNames, InOpaque, RecDict, VarDict,
- NewAcc),
+ {D, R2} = build_field_dict(Left, TypeNames, RecDict, VarDict, NewAcc),
{D, R1 ++ R2};
-build_field_dict([], _TypeNames, _InOpaque, _RecDict, _VarDict, Acc) ->
+build_field_dict([], _TypeNames, _RecDict, _VarDict, Acc) ->
{orddict:from_list(Acc), []}.
get_mod_record([{FieldName, DeclType}|Left1],
[{FieldName, ModType}|Left2], Acc) ->
- case t_is_var(ModType) orelse t_is_remote(ModType) orelse
- t_is_subtype(ModType, DeclType) of
+ ModTypeNoVars = subst_all_vars_to_any(ModType),
+ case
+ contains_remote(ModTypeNoVars)
+ orelse contains_remote(DeclType)
+ orelse t_is_subtype(ModTypeNoVars, DeclType)
+ of
false -> {error, FieldName};
true -> get_mod_record(Left1, Left2, [{FieldName, ModType}|Acc])
end;
@@ -3817,19 +4503,23 @@ get_mod_record(DeclFields, [], Acc) ->
get_mod_record(_, [{FieldName2, _ModType}|_], _Acc) ->
{error, FieldName2}.
-fields_from_form([], _TypeNames, _InOpaque, _RecDict, _VarDict) ->
+contains_remote(Type) ->
+ TypeNoRemote = subst_all_remote(Type, t_none()),
+ not t_is_equal(Type, TypeNoRemote).
+
+fields_from_form([], _TypeNames, _RecDict, _VarDict) ->
{[], []};
-fields_from_form([{Name, Type}|Tail], TypeNames, InOpaque, RecDict,
+fields_from_form([{Name, Type}|Tail], TypeNames, RecDict,
VarDict) ->
- {T, R1} = t_from_form(Type, TypeNames, InOpaque, RecDict, VarDict),
- {F, R2} = fields_from_form(Tail, TypeNames, InOpaque, RecDict, VarDict),
+ {T, R1} = t_from_form(Type, TypeNames, RecDict, VarDict),
+ {F, R2} = fields_from_form(Tail, TypeNames, RecDict, VarDict),
{[{Name, T}|F], R1 ++ R2}.
-list_from_form([], _TypeNames, _InOpaque, _RecDict, _VarDict) ->
+list_from_form([], _TypeNames, _RecDict, _VarDict) ->
{[], []};
-list_from_form([H|Tail], TypeNames, InOpaque, RecDict, VarDict) ->
- {T, R1} = t_from_form(H, TypeNames, InOpaque, RecDict, VarDict),
- {L, R2} = list_from_form(Tail, TypeNames, InOpaque, RecDict, VarDict),
+list_from_form([H|Tail], TypeNames, RecDict, VarDict) ->
+ {T, R1} = t_from_form(H, TypeNames, RecDict, VarDict),
+ {L, R2} = list_from_form(Tail, TypeNames, RecDict, VarDict),
{[T|L], R1 ++ R2}.
-spec t_form_to_string(parse_form()) -> string().
@@ -3852,10 +4542,10 @@ t_form_to_string({op, _L, _Op, _Arg1, _Arg2} = Op) ->
t_form_to_string({ann_type, _L, [Var, Type]}) ->
t_form_to_string(Var) ++ "::" ++ t_form_to_string(Type);
t_form_to_string({paren_type, _L, [Type]}) ->
- io_lib:format("(~s)", [t_form_to_string(Type)]);
+ flat_format("(~s)", [t_form_to_string(Type)]);
t_form_to_string({remote_type, _L, [{atom, _, Mod}, {atom, _, Name}, Args]}) ->
ArgString = "(" ++ string:join(t_form_to_string_list(Args), ",") ++ ")",
- io_lib:format("~w:~w", [Mod, Name]) ++ ArgString;
+ flat_format("~w:~w", [Mod, Name]) ++ ArgString;
t_form_to_string({type, _L, arity, []}) -> "arity()";
t_form_to_string({type, _L, binary, []}) -> "binary()";
t_form_to_string({type, _L, binary, [Base, Unit]} = Type) ->
@@ -3866,9 +4556,9 @@ t_form_to_string({type, _L, binary, [Base, Unit]} = Type) ->
{0, 0} -> "<<>>";
{8, 0} -> "binary()";
{1, 0} -> "bitstring()";
- {0, B} -> lists:flatten(io_lib:format("<<_:~w>>", [B]));
- {U, 0} -> lists:flatten(io_lib:format("<<_:_*~w>>", [U]));
- {U, B} -> lists:flatten(io_lib:format("<<_:~w,_:_*~w>>", [B, U]))
+ {0, B} -> flat_format("<<_:~w>>", [B]);
+ {U, 0} -> flat_format("<<_:_*~w>>", [U]);
+ {U, B} -> flat_format("<<_:~w,_:_*~w>>", [B, U])
end;
_ -> io_lib:format("Badly formed bitstr type ~w", [Type])
end;
@@ -3883,6 +4573,8 @@ t_form_to_string({type, _L, iodata, []}) -> "iodata()";
t_form_to_string({type, _L, iolist, []}) -> "iolist()";
t_form_to_string({type, _L, list, [Type]}) ->
"[" ++ t_form_to_string(Type) ++ "]";
+t_form_to_string({type, _L, map, _}) ->
+ "#{}";
t_form_to_string({type, _L, mfa, []}) -> "mfa()";
t_form_to_string({type, _L, module, []}) -> "module()";
t_form_to_string({type, _L, node, []}) -> "node()";
@@ -3894,16 +4586,16 @@ t_form_to_string({type, _L, product, Elements}) ->
t_form_to_string({type, _L, range, [From, To]} = Type) ->
case {erl_eval:partial_eval(From), erl_eval:partial_eval(To)} of
{{integer, _, FromVal}, {integer, _, ToVal}} ->
- io_lib:format("~w..~w", [FromVal, ToVal]);
- _ -> io_lib:format("Badly formed type ~w",[Type])
+ flat_format("~w..~w", [FromVal, ToVal]);
+ _ -> flat_format("Badly formed type ~w",[Type])
end;
t_form_to_string({type, _L, record, [{atom, _, Name}]}) ->
- io_lib:format("#~w{}", [Name]);
+ flat_format("#~w{}", [Name]);
t_form_to_string({type, _L, record, [{atom, _, Name}|Fields]}) ->
FieldString = string:join(t_form_to_string_list(Fields), ","),
- io_lib:format("#~w{~s}", [Name, FieldString]);
+ flat_format("#~w{~s}", [Name, FieldString]);
t_form_to_string({type, _L, field_type, [{atom, _, Name}, Type]}) ->
- io_lib:format("~w::~s", [Name, t_form_to_string(Type)]);
+ flat_format("~w::~s", [Name, t_form_to_string(Type)]);
t_form_to_string({type, _L, term, []}) -> "term()";
t_form_to_string({type, _L, timeout, []}) -> "timeout()";
t_form_to_string({type, _L, tuple, any}) -> "tuple()";
@@ -3916,8 +4608,8 @@ t_form_to_string({type, _L, Name, []} = T) ->
catch throw:{error, _} -> atom_to_string(Name) ++ "()"
end;
t_form_to_string({type, _L, Name, List}) ->
- io_lib:format("~w(~s)",
- [Name, string:join(t_form_to_string_list(List), ",")]).
+ flat_format("~w(~s)",
+ [Name, string:join(t_form_to_string_list(List), ",")]).
t_form_to_string_list(List) ->
t_form_to_string_list(List, []).
@@ -3930,7 +4622,7 @@ t_form_to_string_list([], Acc) ->
-spec atom_to_string(atom()) -> string().
atom_to_string(Atom) ->
- lists:flatten(io_lib:format("~w", [Atom])).
+ flat_format("~w", [Atom]).
%%=============================================================================
%%
@@ -3959,7 +4651,7 @@ is_erl_type(?unit) -> true;
is_erl_type(#c{}) -> true;
is_erl_type(_) -> false.
--spec lookup_record(atom(), dict()) ->
+-spec lookup_record(atom(), type_table()) ->
'error' | {'ok', [{atom(), parse_form() | erl_type()}]}.
lookup_record(Tag, RecDict) when is_atom(Tag) ->
@@ -3974,7 +4666,8 @@ lookup_record(Tag, RecDict) when is_atom(Tag) ->
error
end.
--spec lookup_record(atom(), arity(), dict()) -> 'error' | {'ok', [{atom(), erl_type()}]}.
+-spec lookup_record(atom(), arity(), type_table()) ->
+ 'error' | {'ok', [{atom(), erl_type()}]}.
lookup_record(Tag, Arity, RecDict) when is_atom(Tag) ->
case dict:find({record, Tag}, RecDict) of
@@ -3993,7 +4686,8 @@ lookup_type(Name, Arity, RecDict) ->
{ok, Found} -> {type, Found}
end.
--spec type_is_defined('type' | 'opaque', atom(), arity(), dict()) -> boolean().
+-spec type_is_defined('type' | 'opaque', atom(), arity(), type_table()) ->
+ boolean().
type_is_defined(TypeOrOpaque, Name, Arity, RecDict) ->
dict:is_key({TypeOrOpaque, Name, Arity}, RecDict).
@@ -4002,6 +4696,59 @@ can_unfold_more(TypeName, TypeNames) ->
Fun = fun(E, Acc) -> case E of TypeName -> Acc + 1; _ -> Acc end end,
lists:foldl(Fun, 0, TypeNames) < ?REC_TYPE_LIMIT.
+-spec do_opaque(erl_type(), opaques(), fun((_) -> T)) -> T.
+
+%% Probably a little faster than calling t_unopaque/2.
+%% Unions that are due to opaque types are unopaqued.
+do_opaque(?opaque(_) = Type, Opaques, Pred) ->
+ case Opaques =:= 'universe' orelse is_opaque_type(Type, Opaques) of
+ true -> do_opaque(t_opaque_structure(Type), Opaques, Pred);
+ false -> Pred(Type)
+ end;
+do_opaque(?union(List) = Type, Opaques, Pred) ->
+ [A,B,F,I,L,N,T,M,O,R,Map] = List,
+ if O =:= ?none -> Pred(Type);
+ true ->
+ case Opaques =:= 'universe' orelse is_opaque_type(O, Opaques) of
+ true ->
+ S = t_opaque_structure(O),
+ do_opaque(t_sup([A,B,F,I,L,N,T,M,S,R,Map]), Opaques, Pred);
+ false -> Pred(Type)
+ end
+ end;
+do_opaque(Type, _Opaques, Pred) ->
+ Pred(Type).
+
+is_same_type_name(ModNameArgs, ModNameArgs) -> true;
+is_same_type_name({Mod, Name, Args1}, {Mod, Name, Args2}) ->
+ all_any(Args1) orelse all_any(Args2);
+is_same_type_name({Mod1, Name1, Args1}, {Mod2, Name2, Args2}) ->
+ is_same_type_name2(Mod1, Name1, Args1, Mod2, Name2, Args2).
+
+all_any([]) -> true;
+all_any([T|L]) ->
+ t_is_any(T) andalso all_any(L);
+all_any(_) -> false.
+
+%% Compatibility. In Erlang/OTP 17 the pre-defined opaque types
+%% digraph() and so on can be used, but there are also new types such
+%% as digraph:graph() with the exact same meaning. In Erlang/OTP R18.0
+%% all but the last clause can be removed.
+
+is_same_type_name2(digraph, digraph, [], digraph, graph, []) -> true;
+is_same_type_name2(digraph, graph, [], digraph, digraph, []) -> true;
+is_same_type_name2(gb_sets, gb_set, [], gb_sets, set, [_]) -> true;
+is_same_type_name2(gb_sets, set, [_], gb_sets, gb_set, []) -> true;
+is_same_type_name2(gb_trees, gb_tree, [], gb_trees, tree, [_, _]) -> true;
+is_same_type_name2(gb_trees, tree, [_, _], gb_trees, gb_tree, []) -> true;
+is_same_type_name2(_, _, _, _, _, _) -> false.
+
+map_keys(?map(Pairs)) ->
+ [K || {K, _} <- Pairs].
+
+map_values(?map(Pairs)) ->
+ [V || {_, V} <- Pairs].
+
%% -----------------------------------
%% Set
%%
@@ -4068,7 +4815,7 @@ set_size(Set) ->
set_to_string(Set) ->
L = [case is_atom(X) of
true -> io_lib:write_string(atom_to_list(X), $'); % stupid emacs '
- false -> io_lib:format("~w", [X])
+ false -> flat_format("~w", [X])
end || X <- set_to_list(Set)],
string:join(L, " | ").
@@ -4077,6 +4824,9 @@ set_min([H|_]) -> H.
set_max(Set) ->
hd(lists:reverse(Set)).
+flat_format(F, S) ->
+ lists:flatten(io_lib:format(F, S)).
+
%%=============================================================================
%%
%% Utilities for the binary type
@@ -4131,6 +4881,11 @@ handle_base(Unit, Pos) when Pos >= 0 ->
handle_base(Unit, Neg) ->
(Unit+(Neg rem Unit)) rem Unit.
+family(L) ->
+ R = sofs:relation(L),
+ F = sofs:relation_to_family(R),
+ sofs:to_external(F).
+
%%=============================================================================
%% Consistency-testing function(s) below
%%=============================================================================
diff --git a/lib/hipe/doc/src/notes.xml b/lib/hipe/doc/src/notes.xml
index e0b1622d19..c7faf733c7 100644
--- a/lib/hipe/doc/src/notes.xml
+++ b/lib/hipe/doc/src/notes.xml
@@ -30,6 +30,124 @@
</header>
<p>This document describes the changes made to HiPE.</p>
+<section><title>Hipe 3.10.3</title>
+
+ <section><title>Fixed Bugs and Malfunctions</title>
+ <list>
+ <item>
+ <p>
+ Fix compilation with 'no_remove_comments' (Thanks to
+ Johannes Weißl)</p>
+ <p>
+ Own Id: OTP-11564</p>
+ </item>
+ <item>
+ <p>
+ Application upgrade (appup) files are corrected for the
+ following applications: </p>
+ <p>
+ <c>asn1, common_test, compiler, crypto, debugger,
+ dialyzer, edoc, eldap, erl_docgen, et, eunit, gs, hipe,
+ inets, observer, odbc, os_mon, otp_mibs, parsetools,
+ percept, public_key, reltool, runtime_tools, ssh,
+ syntax_tools, test_server, tools, typer, webtool, wx,
+ xmerl</c></p>
+ <p>
+ A new test utility for testing appup files is added to
+ test_server. This is now used by most applications in
+ OTP.</p>
+ <p>
+ (Thanks to Tobias Schlager)</p>
+ <p>
+ Own Id: OTP-11744</p>
+ </item>
+ <item>
+ <p>
+ There is now a test suite for the Hipe application</p>
+ <p>
+ Own Id: OTP-11748</p>
+ </item>
+ <item>
+ <p>
+ Support for a LLVM backend has been added in HiPE</p>
+ <p>
+ Own Id: OTP-11801</p>
+ </item>
+ </list>
+ </section>
+
+
+ <section><title>Improvements and New Features</title>
+ <list>
+ <item>
+ <p> The pre-defined types <c>array/0</c>, <c>dict/0</c>,
+ <c>digraph/0</c>, <c>gb_set/0</c>, <c>gb_tree/0</c>,
+ <c>queue/0</c>, <c>set/0</c>, and <c>tid/0</c> have been
+ deprecated. They will be removed in Erlang/OTP 18.0. </p>
+ <p> Instead the types <c>array:array/0</c>,
+ <c>dict:dict/0</c>, <c>digraph:graph/0</c>,
+ <c>gb_set:set/0</c>, <c>gb_tree:tree/0</c>,
+ <c>queue:queue/0</c>, <c>sets:set/0</c>, and
+ <c>ets:tid/0</c> can be used. (Note: it has always been
+ necessary to use <c>ets:tid/0</c>.) </p> <p> It is
+ allowed in Erlang/OTP 17.0 to locally re-define the types
+ <c>array/0</c>, <c>dict/0</c>, and so on. </p> <p> New
+ types <c>array:array/1</c>, <c>dict:dict/2</c>,
+ <c>gb_sets:set/1</c>, <c>gb_trees:tree/2</c>,
+ <c>queue:queue/1</c>, and <c>sets:set/1</c> have been
+ added. </p> <p> A compiler option,
+ <c>nowarn_deprecated_type</c>, has been introduced. By
+ including the attribute </p> <c>
+ -compile(nowarn_deprecated_type).</c> <p> in an Erlang
+ source file, warnings about deprecated types can be
+ avoided in Erlang/OTP 17.0. </p> <p> The option can also
+ be given as a compiler flag: </p> <c> erlc
+ +nowarn_deprecated_type file.erl</c>
+ <p>
+ Own Id: OTP-10342</p>
+ </item>
+ <item>
+ <p>
+ EEP43: New data type - Maps</p>
+ <p>
+ With Maps you may for instance: <taglist> <item><c>M0 =
+ #{ a =&gt; 1, b =&gt; 2}, % create
+ associations</c></item> <item><c>M1 = M0#{ a := 10 }, %
+ update values</c></item> <item><c>M2 = M1#{ "hi" =&gt;
+ "hello"}, % add new associations</c></item> <item><c>#{
+ "hi" := V1, a := V2, b := V3} = M2. % match keys with
+ values</c></item> </taglist></p>
+ <p>
+ For information on how to use Maps please see the
+ <seealso marker="doc/reference_manual:maps">Reference
+ Manual</seealso>.</p>
+ <p>
+ The current implementation is without the following
+ features: <taglist> <item>No variable keys</item>
+ <item>No single value access</item> <item>No map
+ comprehensions</item> </taglist></p>
+ <p>
+ Note that Maps is <em>experimental</em> during OTP 17.0.</p>
+ <p>
+ Own Id: OTP-11616</p>
+ </item>
+ <item>
+ <p> Parameterized opaque types have been introduced. </p>
+ <p>
+ Own Id: OTP-11625</p>
+ </item>
+ <item>
+ <p>
+ Add support for the compilation of the is_map/1 and
+ map_size/1 guards to native code.</p>
+ <p>
+ Own Id: OTP-11831</p>
+ </item>
+ </list>
+ </section>
+
+</section>
+
<section><title>Hipe 3.10.2.2</title>
<section><title>Fixed Bugs and Malfunctions</title>
diff --git a/lib/hipe/flow/cfg.hrl b/lib/hipe/flow/cfg.hrl
index 95bf5f7194..1f7a162f27 100644
--- a/lib/hipe/flow/cfg.hrl
+++ b/lib/hipe/flow/cfg.hrl
@@ -2,7 +2,7 @@
%%
%% %CopyrightBegin%
%%
-%% Copyright Ericsson AB 2007-2012. All Rights Reserved.
+%% Copyright Ericsson AB 2007-2014. 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
@@ -42,12 +42,12 @@
%%
%% Data is a triple with a dict of constants, a list of labels and an integer
%%
--type cfg_data() :: {dict(), [cfg_lbl()], non_neg_integer()}.
+-type cfg_data() :: {dict:dict(), [cfg_lbl()], non_neg_integer()}.
%%
%% The following is to be used by other modules
%%
--record(cfg, {table = gb_trees:empty() :: gb_tree(),
+-record(cfg, {table = gb_trees:empty() :: gb_trees:tree(),
info :: #cfg_info{},
data :: cfg_data()}).
-type cfg() :: #cfg{}.
diff --git a/lib/hipe/flow/cfg.inc b/lib/hipe/flow/cfg.inc
index 62f399a81c..f0b1a75737 100644
--- a/lib/hipe/flow/cfg.inc
+++ b/lib/hipe/flow/cfg.inc
@@ -4,7 +4,7 @@
%%
%% %CopyrightBegin%
%%
-%% Copyright Ericsson AB 2001-2009. All Rights Reserved.
+%% Copyright Ericsson AB 2001-2014. 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
@@ -534,7 +534,7 @@ breadth_list([], Vis, _CFG, BO) ->
{Vis, BO}.
-endif.
--spec none_visited() -> gb_set().
+-spec none_visited() -> gb_sets:set().
none_visited() ->
gb_sets:empty().
diff --git a/lib/hipe/flow/hipe_dominators.erl b/lib/hipe/flow/hipe_dominators.erl
index 113a32c3b7..50d45c7c72 100644
--- a/lib/hipe/flow/hipe_dominators.erl
+++ b/lib/hipe/flow/hipe_dominators.erl
@@ -2,7 +2,7 @@
%%
%% %CopyrightBegin%
%%
-%% Copyright Ericsson AB 2004-2013. All Rights Reserved.
+%% Copyright Ericsson AB 2004-2014. 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
@@ -57,7 +57,7 @@
-record(domTree, {root :: cfg_lbl(),
size = 0 :: non_neg_integer(),
- nodes = gb_trees:empty() :: gb_tree()}).
+ nodes = gb_trees:empty() :: gb_trees:tree()}).
-type domTree() :: #domTree{}.
%%>----------------------------------------------------------------------<
@@ -590,7 +590,7 @@ domTree_pp_children([], _) ->
%%
%%========================================================================
--type domFrontier() :: gb_tree().
+-type domFrontier() :: gb_trees:tree().
%%>----------------------------------------------------------------------<
%% Procedure : domFrontier_create
diff --git a/lib/hipe/flow/liveness.inc b/lib/hipe/flow/liveness.inc
index 9c5eaf3e68..6f161fb269 100644
--- a/lib/hipe/flow/liveness.inc
+++ b/lib/hipe/flow/liveness.inc
@@ -3,7 +3,7 @@
%%
%% %CopyrightBegin%
%%
-%% Copyright Ericsson AB 2001-2009. All Rights Reserved.
+%% Copyright Ericsson AB 2001-2014. 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
@@ -71,7 +71,7 @@
%% The generic liveness analysis
%%
--spec analyze(cfg()) -> gb_tree().
+-spec analyze(cfg()) -> gb_trees:tree().
-ifdef(HIPE_LIVENESS_CALC_LARGEST_LIVESET).
analyze(CFG) ->
@@ -209,7 +209,7 @@ successors(L, Liveness) ->
{_GK, _LiveIn, Successors} = liveness_lookup(L, Liveness),
Successors.
--spec livein(gb_tree(), _) -> [_].
+-spec livein(gb_trees:tree(), _) -> [_].
livein(Liveness, L) ->
{_GK, LiveIn, _Successors} = liveness_lookup(L, Liveness),
diff --git a/lib/hipe/icode/hipe_beam_to_icode.erl b/lib/hipe/icode/hipe_beam_to_icode.erl
index 81249c958e..4691662f9f 100644
--- a/lib/hipe/icode/hipe_beam_to_icode.erl
+++ b/lib/hipe/icode/hipe_beam_to_icode.erl
@@ -509,6 +509,10 @@ trans_fun([{test,test_arity,{f,Lbl},[Reg,N]}|Instructions], Env) ->
I = hipe_icode:mk_type([trans_arg(Reg)],{tuple,N},
hipe_icode:label_name(True),map_label(Lbl)),
[I,True | trans_fun(Instructions,Env)];
+%%--- is_map ---
+trans_fun([{test,is_map,{f,Lbl},[Arg]}|Instructions], Env) ->
+ {Code,Env1} = trans_type_test(map,Lbl,Arg,Env),
+ [Code | trans_fun(Instructions,Env1)];
%%--------------------------------------------------------------------
%%--- select_val ---
trans_fun([{select_val,Reg,{f,Lbl},{list,Cases}}|Instructions], Env) ->
@@ -1121,6 +1125,49 @@ trans_fun([{trim,N,NY}|Instructions], Env) ->
trans_fun([{line,_}|Instructions], Env) ->
trans_fun(Instructions,Env);
%%--------------------------------------------------------------------
+%% Map instructions added in Spring 2014 (17.0).
+%%--------------------------------------------------------------------
+trans_fun([{test,has_map_fields,{f,Lbl},Map,{list,Keys}}|Instructions], Env) ->
+ {MapMove, MapVar, Env1} = mk_move_and_var(Map, Env),
+ %% We assume that hipe_icode:mk_call has no side-effects, and reuse
+ %% the help function of get_map_elements below, discarding the value
+ %% assignment instruction list.
+ {TestInstructions, _GetInstructions, Env2} =
+ trans_map_query(MapVar, map_label(Lbl), Env1,
+ lists:flatten([[K, {r, 0}] || K <- Keys])),
+ [MapMove, TestInstructions | trans_fun(Instructions, Env2)];
+trans_fun([{get_map_elements,{f,Lbl},Map,{list,KVPs}}|Instructions], Env) ->
+ {MapMove, MapVar, Env1} = mk_move_and_var(Map, Env),
+ {TestInstructions, GetInstructions, Env2} =
+ trans_map_query(MapVar, map_label(Lbl), Env1, KVPs),
+ [MapMove, TestInstructions, GetInstructions | trans_fun(Instructions, Env2)];
+%%--- put_map_assoc ---
+trans_fun([{put_map_assoc,{f,Lbl},Map,Dst,_N,{list,Pairs}}|Instructions], Env) ->
+ {MapMove, MapVar, Env1} = mk_move_and_var(Map, Env),
+ TempMapVar = mk_var(new),
+ TempMapMove = hipe_icode:mk_move(TempMapVar, MapVar),
+ {PutInstructions, Env2}
+ = case Lbl > 0 of
+ true ->
+ gen_put_map_instrs(exists, assoc, TempMapVar, Dst, Lbl, Pairs, Env1);
+ false ->
+ gen_put_map_instrs(new, assoc, TempMapVar, Dst, new, Pairs, Env1)
+ end,
+ [MapMove, TempMapMove, PutInstructions | trans_fun(Instructions, Env2)];
+%%--- put_map_exact ---
+trans_fun([{put_map_exact,{f,Lbl},Map,Dst,_N,{list,Pairs}}|Instructions], Env) ->
+ {MapMove, MapVar, Env1} = mk_move_and_var(Map, Env),
+ TempMapVar = mk_var(new),
+ TempMapMove = hipe_icode:mk_move(TempMapVar, MapVar),
+ {PutInstructions, Env2}
+ = case Lbl > 0 of
+ true ->
+ gen_put_map_instrs(exists, exact, TempMapVar, Dst, Lbl, Pairs, Env1);
+ false ->
+ gen_put_map_instrs(new, exact, TempMapVar, Dst, new, Pairs, Env1)
+ end,
+ [MapMove, TempMapMove, PutInstructions | trans_fun(Instructions, Env2)];
+%%--------------------------------------------------------------------
%%--- ERROR HANDLING ---
%%--------------------------------------------------------------------
trans_fun([X|_], _) ->
@@ -1500,6 +1547,102 @@ trans_type_test2(function2, Lbl, Arg, Arity, Env) ->
hipe_icode:label_name(True), map_label(Lbl)),
{[Move1,Move2,I,True],Env2}.
+%%
+%% Handles the get_map_elements instruction and the has_map_fields
+%% test instruction.
+%%
+trans_map_query(_MapVar, _FailLabel, Env, []) ->
+ {[], [], Env};
+trans_map_query(MapVar, FailLabel, Env, [Key,Val|KVPs]) ->
+ {Move,KeyVar,Env1} = mk_move_and_var(Key,Env),
+ PassLabel = mk_label(new),
+ BoolVar = hipe_icode:mk_new_var(),
+ ValVar = mk_var(Val),
+ IsKeyCall = hipe_icode:mk_call([BoolVar], maps, is_key, [KeyVar, MapVar],
+ remote),
+ TrueTest = hipe_icode:mk_if('=:=', [BoolVar, hipe_icode:mk_const(true)],
+ hipe_icode:label_name(PassLabel), FailLabel),
+ GetCall = hipe_icode:mk_call([ValVar], maps, get, [KeyVar, MapVar], remote),
+ {TestList, GetList, Env2} = trans_map_query(MapVar, FailLabel, Env1, KVPs),
+ {[Move, IsKeyCall, TrueTest, PassLabel|TestList], [GetCall|GetList], Env2}.
+
+%%
+%% Generates a fail label if necessary when translating put_map_* instructions.
+%%
+gen_put_map_instrs(exists, Op, TempMapVar, Dst, FailLbl, Pairs, Env) ->
+ TrueLabel = mk_label(new),
+ IsMapCode = hipe_icode:mk_type([TempMapVar], map,
+ hipe_icode:label_name(TrueLabel), map_label(FailLbl)),
+ DstMapVar = mk_var(Dst),
+ {ReturnLbl, PutInstructions, Env1}
+ = case Op of
+ assoc ->
+ trans_put_map_assoc(TempMapVar, DstMapVar, Pairs, Env, []);
+ exact ->
+ trans_put_map_exact(TempMapVar, DstMapVar,
+ map_label(FailLbl), Pairs, Env, [])
+ end,
+ {[IsMapCode, TrueLabel, PutInstructions, ReturnLbl], Env1};
+gen_put_map_instrs(new, Op, TempMapVar, Dst, new, Pairs, Env) ->
+ TrueLabel = mk_label(new),
+ FailLbl = mk_label(new),
+ IsMapCode = hipe_icode:mk_type([TempMapVar], map,
+ hipe_icode:label_name(TrueLabel),
+ hipe_icode:label_name(FailLbl)),
+ DstMapVar = mk_var(Dst),
+ {ReturnLbl, PutInstructions, Env1}
+ = case Op of
+ assoc ->
+ trans_put_map_assoc(TempMapVar, DstMapVar, Pairs, Env, []);
+ exact ->
+ trans_put_map_exact(TempMapVar, DstMapVar,
+ hipe_icode:label_name(FailLbl), Pairs, Env, [])
+ end,
+ Fail = hipe_icode:mk_fail([hipe_icode:mk_const(badarg)], error),
+ {[IsMapCode, TrueLabel, PutInstructions, FailLbl, Fail, ReturnLbl], Env1}.
+
+%%-----------------------------------------------------------------------
+%% This function generates the instructions needed to insert several
+%% (Key, Value) pairs into an existing map, each recursive call inserts
+%% one (Key, Value) pair.
+%%-----------------------------------------------------------------------
+trans_put_map_assoc(MapVar, DestMapVar, [], Env, Acc) ->
+ MoveToReturnVar = hipe_icode:mk_move(DestMapVar, MapVar),
+ ReturnLbl = mk_label(new),
+ GotoReturn = hipe_icode:mk_goto(hipe_icode:label_name(ReturnLbl)),
+ {ReturnLbl, lists:reverse([GotoReturn, MoveToReturnVar | Acc]), Env};
+trans_put_map_assoc(MapVar, DestMapVar, [Key, Value | Rest], Env, Acc) ->
+ {MoveKey, KeyVar, Env1} = mk_move_and_var(Key, Env),
+ {MoveVal, ValVar, Env2} = mk_move_and_var(Value, Env1),
+ BifCall = hipe_icode:mk_call([MapVar], maps, put,
+ [KeyVar, ValVar, MapVar], remote),
+ trans_put_map_assoc(MapVar, DestMapVar, Rest, Env2,
+ [BifCall, MoveVal, MoveKey | Acc]).
+
+%%-----------------------------------------------------------------------
+%% This function generates the instructions needed to update several
+%% (Key, Value) pairs in an existing map, each recursive call inserts
+%% one (Key, Value) pair.
+%%-----------------------------------------------------------------------
+trans_put_map_exact(MapVar, DestMapVar, _FLbl, [], Env, Acc) ->
+ MoveToReturnVar = hipe_icode:mk_move(DestMapVar, MapVar),
+ ReturnLbl = mk_label(new),
+ GotoReturn = hipe_icode:mk_goto(hipe_icode:label_name(ReturnLbl)),
+ {ReturnLbl, lists:reverse([GotoReturn, MoveToReturnVar | Acc]), Env};
+trans_put_map_exact(MapVar, DestMapVar, FLbl, [Key, Value | Rest], Env, Acc) ->
+ SuccLbl = mk_label(new),
+ {MoveKey, KeyVar, Env1} = mk_move_and_var(Key, Env),
+ {MoveVal, ValVar, Env2} = mk_move_and_var(Value, Env1),
+ IsKey = hipe_icode:mk_new_var(),
+ BifCallIsKey = hipe_icode:mk_call([IsKey], maps, is_key,
+ [KeyVar, MapVar], remote),
+ IsKeyTest = hipe_icode:mk_if('=:=', [IsKey, hipe_icode:mk_const(true)],
+ hipe_icode:label_name(SuccLbl), FLbl),
+ BifCallPut = hipe_icode:mk_call([MapVar], maps, put,
+ [KeyVar, ValVar, MapVar], remote),
+ Acc1 = [BifCallPut, SuccLbl, IsKeyTest, BifCallIsKey, MoveVal, MoveKey | Acc],
+ trans_put_map_exact(MapVar, DestMapVar, FLbl, Rest, Env2, Acc1).
+
%%-----------------------------------------------------------------------
%% trans_puts(Code, Environment) ->
%% {Movs, Code, Vars, NewEnv}
diff --git a/lib/hipe/icode/hipe_icode.erl b/lib/hipe/icode/hipe_icode.erl
index 6d4758bbf1..7b3d087e2d 100644
--- a/lib/hipe/icode/hipe_icode.erl
+++ b/lib/hipe/icode/hipe_icode.erl
@@ -503,7 +503,6 @@
enter_args_update/2,
enter_type/1,
is_enter/1,
-
mk_return/1, %% mk_return(Vars)
%% mk_fail/1, %% mk_fail(Args) class = exit
@@ -606,6 +605,12 @@
-export([highest_var/1, highest_label/1]).
+%%
+%% Exported types
+%%
+
+-export_type([icode/0]).
+
%%---------------------------------------------------------------------
%%
%% Icode
@@ -614,7 +619,7 @@
-spec mk_icode(mfa(), [icode_var()], boolean(), boolean(), [icode_instr()],
{non_neg_integer(),non_neg_integer()},
- {icode_lbl(),icode_lbl()}) -> #icode{}.
+ {icode_lbl(),icode_lbl()}) -> icode().
mk_icode(Fun, Params, IsClosure, IsLeaf, Code, VarRange, LabelRange) ->
#icode{'fun'=Fun, params=Params, code=Code,
is_closure=IsClosure,
@@ -1434,8 +1439,8 @@ subst1([_|Pairs], I) -> subst1(Pairs, I).
%%
%% @doc Returns the successors of an Icode instruction.
%% In CFG form only branch instructions have successors,
-%% but in linear form other instructions like e.g. moves and
-%% others might be the last instruction of some basic block.
+%% but in linear form other instructions like e.g. moves
+%% might be the last instruction of some basic block.
%%
-spec successors(icode_instr()) -> [icode_lbl()].
@@ -1464,6 +1469,7 @@ successors(I) ->
case fail_label(I) of [] -> []; L when is_integer(L) -> [L] end;
#icode_enter{} -> [];
#icode_return{} -> [];
+ #icode_comment{} -> [];
%% the following are included here for handling linear code
#icode_move{} -> [];
#icode_begin_handler{} -> []
diff --git a/lib/hipe/icode/hipe_icode.hrl b/lib/hipe/icode/hipe_icode.hrl
index 060493e61e..46c04beb40 100644
--- a/lib/hipe/icode/hipe_icode.hrl
+++ b/lib/hipe/icode/hipe_icode.hrl
@@ -1,7 +1,7 @@
%%
%% %CopyrightBegin%
%%
-%% Copyright Ericsson AB 2004-2013. All Rights Reserved.
+%% Copyright Ericsson AB 2004-2014. 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
@@ -61,8 +61,8 @@
| 'op_exact_eqeq_2' | 'suspend_msg_timeout'.
-type icode_type_test() :: 'atom' | 'bignum' | 'binary' | 'bitstr' | 'boolean'
- | 'cons' | 'fixnum' | 'float'
- | 'function' | 'function2' | 'integer' | 'list' | 'nil'
+ | 'cons' | 'fixnum' | 'float' | 'function'
+ | 'function2' | 'integer' | 'list' | 'map' | 'nil'
| 'number' | 'pid' | 'port' | 'reference' | 'tuple'
| {'atom', atom()} | {'integer', integer()}
| {'record', atom(), non_neg_integer()}
@@ -108,7 +108,6 @@
length :: non_neg_integer(),
cases :: [icode_switch_case()]}).
-
-record(icode_type, {test :: icode_type_test(),
args :: [icode_term_arg()],
true_label :: icode_lbl(),
@@ -178,5 +177,6 @@
var_range :: {non_neg_integer(), non_neg_integer()},
label_range :: {icode_lbl(), icode_lbl()},
info = [] :: icode_info()}).
+-type icode() :: #icode{}.
%%---------------------------------------------------------------------
diff --git a/lib/hipe/icode/hipe_icode_callgraph.erl b/lib/hipe/icode/hipe_icode_callgraph.erl
index 5789328f47..ccf97ecc17 100644
--- a/lib/hipe/icode/hipe_icode_callgraph.erl
+++ b/lib/hipe/icode/hipe_icode_callgraph.erl
@@ -2,7 +2,7 @@
%%
%% %CopyrightBegin%
%%
-%% Copyright Ericsson AB 2004-2013. All Rights Reserved.
+%% Copyright Ericsson AB 2004-2014. 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
@@ -46,7 +46,7 @@
-type mfa_icode() :: {mfa(), #icode{}}.
--record(icode_callgraph, {codedict :: dict(), ordered_sccs :: [[mfa()]]}).
+-record(icode_callgraph, {codedict :: dict:dict(), ordered_sccs :: [[mfa()]]}).
%%------------------------------------------------------------------------
%% Exported functions
diff --git a/lib/hipe/icode/hipe_icode_cfg.erl b/lib/hipe/icode/hipe_icode_cfg.erl
index 9b4a10e273..f6c2b0600b 100644
--- a/lib/hipe/icode/hipe_icode_cfg.erl
+++ b/lib/hipe/icode/hipe_icode_cfg.erl
@@ -3,7 +3,7 @@
%%
%% %CopyrightBegin%
%%
-%% Copyright Ericsson AB 2001-2009. All Rights Reserved.
+%% Copyright Ericsson AB 2001-2014. 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
@@ -54,8 +54,8 @@
-spec postorder(cfg()) -> [icode_lbl()].
-spec reverse_postorder(cfg()) -> [icode_lbl()].
--spec is_visited(icode_lbl(), gb_set()) -> boolean().
--spec visit(icode_lbl(), gb_set()) -> gb_set().
+-spec is_visited(icode_lbl(), gb_sets:set()) -> boolean().
+-spec visit(icode_lbl(), gb_sets:set()) -> gb_sets:set().
-spec bb(cfg(), icode_lbl()) -> 'not_found' | bb().
-spec bb_add(cfg(), icode_lbl(), bb()) -> cfg().
diff --git a/lib/hipe/icode/hipe_icode_coordinator.erl b/lib/hipe/icode/hipe_icode_coordinator.erl
index 79e3304e6f..c69db9afa9 100644
--- a/lib/hipe/icode/hipe_icode_coordinator.erl
+++ b/lib/hipe/icode/hipe_icode_coordinator.erl
@@ -2,7 +2,7 @@
%%
%% %CopyrightBegin%
%%
-%% Copyright Ericsson AB 2007-2013. All Rights Reserved.
+%% Copyright Ericsson AB 2007-2014. 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
@@ -49,9 +49,9 @@ coordinate(CG, Escaping, NonEscaping, Mod) ->
-type mfalists() :: {[mfa()], [mfa()]}.
--spec coordinate(mfalists(), hipe_digraph:hdg(), gb_tree(),
- fun((mfalists(), gb_tree()) -> mfalists()),
- fun((gb_tree()) -> 'ok'), pid()) -> no_return().
+-spec coordinate(mfalists(), hipe_digraph:hdg(), gb_trees:tree(),
+ fun((mfalists(), gb_trees:tree()) -> mfalists()),
+ fun((gb_trees:tree()) -> 'ok'), pid()) -> no_return().
coordinate(MFALists, CG, PM, Restart, LastAction, ServerPid) ->
case MFALists of
diff --git a/lib/hipe/icode/hipe_icode_exceptions.erl b/lib/hipe/icode/hipe_icode_exceptions.erl
index 00caffb24b..6191c536ad 100644
--- a/lib/hipe/icode/hipe_icode_exceptions.erl
+++ b/lib/hipe/icode/hipe_icode_exceptions.erl
@@ -2,7 +2,7 @@
%%
%% %CopyrightBegin%
%%
-%% Copyright Ericsson AB 2004-2011. All Rights Reserved.
+%% Copyright Ericsson AB 2004-2014. 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
@@ -397,9 +397,9 @@ get_renaming(C, Map) ->
succ :: #cfg{},
pred :: #cfg{},
start_labels :: [icode_lbl(),...],
- visited = hipe_icode_cfg:none_visited() :: gb_set(),
- out = gb_trees:empty() :: gb_tree(),
- in = gb_trees:empty() :: gb_tree()
+ visited = hipe_icode_cfg:none_visited() :: gb_sets:set(),
+ out = gb_trees:empty() :: gb_trees:tree(),
+ in = gb_trees:empty() :: gb_trees:tree()
}).
init_state(CFG) ->
diff --git a/lib/hipe/icode/hipe_icode_fp.erl b/lib/hipe/icode/hipe_icode_fp.erl
index a2ca6132d1..38b3881a77 100644
--- a/lib/hipe/icode/hipe_icode_fp.erl
+++ b/lib/hipe/icode/hipe_icode_fp.erl
@@ -2,7 +2,7 @@
%%
%% %CopyrightBegin%
%%
-%% Copyright Ericsson AB 2003-2009. All Rights Reserved.
+%% Copyright Ericsson AB 2003-2014. 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
@@ -33,8 +33,8 @@
-include("hipe_icode.hrl").
-include("../flow/cfg.hrl").
--record(state, {edge_map = gb_trees:empty() :: gb_tree(),
- fp_ebb_map = gb_trees:empty() :: gb_tree(),
+-record(state, {edge_map = gb_trees:empty() :: gb_trees:tree(),
+ fp_ebb_map = gb_trees:empty() :: gb_trees:tree(),
cfg :: #cfg{}}).
%%--------------------------------------------------------------------
@@ -424,7 +424,7 @@ redirect_phis([I|Is] = Code, OldFrom, NewFrom, Acc) ->
NewI = hipe_icode:phi_redirect_pred(I, OldFrom, NewFrom),
redirect_phis(Is, OldFrom, NewFrom, [NewI|Acc]);
_ ->
- lists:reverse(Acc) ++ Code
+ lists:reverse(Acc, Code)
end;
redirect_phis([], _OldFrom, _NewFrom, Acc) ->
lists:reverse(Acc).
diff --git a/lib/hipe/icode/hipe_icode_instruction_counter.erl b/lib/hipe/icode/hipe_icode_instruction_counter.erl
index 92658d294a..f44adfe149 100644
--- a/lib/hipe/icode/hipe_icode_instruction_counter.erl
+++ b/lib/hipe/icode/hipe_icode_instruction_counter.erl
@@ -2,7 +2,7 @@
%%
%% %CopyrightBegin%
%%
-%% Copyright Ericsson AB 2006-2009. All Rights Reserved.
+%% Copyright Ericsson AB 2006-2014. 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
@@ -64,7 +64,8 @@ walktrough_bb(BB, Info) ->
%% The counter specific functions
%%-------------------------------------------------------------------
--spec compare(gb_tree(), gb_tree(), gb_tree()) -> gb_tree().
+-spec compare(gb_trees:tree(), gb_trees:tree(), gb_trees:tree()) ->
+ gb_trees:tree().
compare(Name, Old, New) ->
NewList = gb_trees:to_list(New),
diff --git a/lib/hipe/icode/hipe_icode_mulret.erl b/lib/hipe/icode/hipe_icode_mulret.erl
index 2402bad42c..99522f6430 100644
--- a/lib/hipe/icode/hipe_icode_mulret.erl
+++ b/lib/hipe/icode/hipe_icode_mulret.erl
@@ -1166,9 +1166,9 @@ printCallList([]) -> io:format("~n").
%% removeUnElems([#icode_call{'fun'={unsafe_element,_}, args=Var}|List], Var, Res) ->
%% removeUnElems(List, Var, Res);
%% removeUnElems([I=#icode_move{dst=Var}|List], [Var], Res) ->
-%% lists:reverse(Res) ++ [I|List];
+%% lists:reverse(Res, [I|List]);
%% removeUnElems([I=#icode_call{dstlist=Var}|List], Var, Res) ->
-%% lists:reverse(Res) ++ [I|List];
+%% lists:reverse(Res, [I|List]);
%% removeUnElems([I|List], Var, Res) ->
%% removeUnElems(List, Var, [I|Res]);
%% removeUnElems([], _, Res) -> lists:reverse(Res).
@@ -1187,7 +1187,7 @@ printCallList([]) -> io:format("~n").
%% false ->
%% case lists:member(Var, Defs) of
%% true ->
-%% lists:reverse(Res) ++ [I|List];
+%% lists:reverse(Res, [I|List]);
%% false ->
%% removeUnElems(List, Var, [I|Res])
%% end
@@ -1195,7 +1195,7 @@ printCallList([]) -> io:format("~n").
%% false ->
%% case lists:member(Var, Defs) of
%% true ->
-%% lists:reverse(Res) ++ [I|List];
+%% lists:reverse(Res, [I|List]);
%% false ->
%% removeUnElems(List, Var, [I|Res])
%% end
@@ -1203,7 +1203,7 @@ printCallList([]) -> io:format("~n").
%% false ->
%% case lists:member(Var, Defs) of
%% true ->
-%% lists:reverse(Res) ++ [I|List];
+%% lists:reverse(Res, [I|List]);
%% false ->
%% removeUnElems(List, Var, [I|Res])
%% end
@@ -1248,16 +1248,16 @@ printCallList([]) -> io:format("~n").
%% modifyCode([I|Code], Var, Res) ->
%% case scanInstr(I, Var) of
%% {move, Arity, VarLst} ->
-%% Code2 = [#icode_return{vars=VarLst}, I |lists:reverse(Res) ++ Code],
+%% Code2 = [#icode_return{vars=VarLst}, I |lists:reverse(Res, Code)],
%% {Arity, lists:reverse(Code2)};
%% {mktuple, Arity, VarLst} ->
-%% Code2 = [#icode_return{vars=VarLst}|lists:reverse(Res) ++ Code],
+%% Code2 = [#icode_return{vars=VarLst}|lists:reverse(Res, Code)],
%% {Arity, lists:reverse(Code2)};
%% other ->
%% modifyCode(Code, Var, [I|Res])
%% end;
%% modifyCode([], Var, Res) ->
-%% {1, lists:reverse(Res) ++ [#icode_return{vars=Var}]}.
+%% {1, lists:reverse(Res, [#icode_return{vars=Var}]}.
%% scanInstr(#icode_call{dstlist=Var, 'fun'=mktuple, args=Lst}, Var) ->
%% {mktuple, length(Lst), Lst};
diff --git a/lib/hipe/icode/hipe_icode_range.erl b/lib/hipe/icode/hipe_icode_range.erl
index 1a2cbfae31..fbc58f3568 100644
--- a/lib/hipe/icode/hipe_icode_range.erl
+++ b/lib/hipe/icode/hipe_icode_range.erl
@@ -2,7 +2,7 @@
%%
%% %CopyrightBegin%
%%
-%% Copyright Ericsson AB 2007-2013. All Rights Reserved.
+%% Copyright Ericsson AB 2007-2014. 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
@@ -72,8 +72,8 @@
-type final_fun() :: fun((mfa(), [range()]) -> 'ok').
-type data() :: {mfa(), args_fun(), call_fun(), final_fun()}.
-type label() :: non_neg_integer().
--type info() :: gb_tree().
--type work_list() :: {[label()], [label()], set()}.
+-type info() :: gb_trees:tree().
+-type work_list() :: {[label()], [label()], sets:set()}.
-type variable() :: #icode_variable{}.
-type annotated_variable() :: #icode_variable{}.
-type argument() :: #icode_const{} | variable().
@@ -82,9 +82,9 @@
-type last_instr_return() :: {instr_split_info(), range()}.
-record(state, {info_map = gb_trees:empty() :: info(),
- counter = dict:new() :: dict(),
+ counter = dict:new() :: dict:dict(),
cfg :: cfg(),
- liveness = gb_trees:empty() :: gb_tree(),
+ liveness = gb_trees:empty() :: gb_trees:tree(),
ret_type :: range(),
lookup_fun :: call_fun(),
result_action :: final_fun()}).
diff --git a/lib/hipe/icode/hipe_icode_ssa.erl b/lib/hipe/icode/hipe_icode_ssa.erl
index 4607a96dda..2c4b6d9409 100644
--- a/lib/hipe/icode/hipe_icode_ssa.erl
+++ b/lib/hipe/icode/hipe_icode_ssa.erl
@@ -2,7 +2,7 @@
%%
%% %CopyrightBegin%
%%
-%% Copyright Ericsson AB 2002-2011. All Rights Reserved.
+%% Copyright Ericsson AB 2002-2014. 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
@@ -37,7 +37,7 @@
-include("../ssa/hipe_ssa.inc").
%% Declarations for exported functions which are Icode-specific.
--spec ssa_liveness__analyze(#cfg{}) -> gb_tree().
+-spec ssa_liveness__analyze(#cfg{}) -> gb_trees:tree().
-spec ssa_liveness__livein(_, icode_lbl()) -> [#icode_variable{}].
%% -spec ssa_liveness__livein(_, icode_lbl(), _) -> [#icode_var{}].
diff --git a/lib/hipe/icode/hipe_icode_ssa_struct_reuse.erl b/lib/hipe/icode/hipe_icode_ssa_struct_reuse.erl
index 2337ef9323..772e30eada 100644
--- a/lib/hipe/icode/hipe_icode_ssa_struct_reuse.erl
+++ b/lib/hipe/icode/hipe_icode_ssa_struct_reuse.erl
@@ -2,7 +2,7 @@
%%
%% %CopyrightBegin%
%%
-%% Copyright Ericsson AB 2007-2013. All Rights Reserved.
+%% Copyright Ericsson AB 2007-2014. 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
@@ -70,9 +70,9 @@
%% var - maps variables to expression value numbers. These variables are
%% defined or used by the structure expressions.
--record(maps, {var = gb_trees:empty() :: gb_tree(),
- instr = gb_trees:empty() :: gb_tree(),
- expr = gb_trees:empty() :: gb_tree()}).
+-record(maps, {var = gb_trees:empty() :: gb_trees:tree(),
+ instr = gb_trees:empty() :: gb_trees:tree(),
+ expr = gb_trees:empty() :: gb_trees:tree()}).
maps_var(#maps{var = Out}) -> Out.
maps_instr(#maps{instr = Out}) -> Out.
@@ -211,10 +211,10 @@ varinfo_use_add(#varinfo{use = UseSet} = I, Use) ->
pred = none :: 'none' | [icode_lbl()],
succ = none :: 'none' | [icode_lbl()],
code = [] :: [tuple()], % [illegal_icode_instr()]
- phi = gb_trees:empty() :: gb_tree(),
+ phi = gb_trees:empty() :: gb_trees:tree(),
varmap = [] :: [{icode_var(), icode_var()}],
pre_loop = false :: boolean(),
- non_struct_defs = gb_sets:new() :: gb_set(),
+ non_struct_defs = gb_sets:new() :: gb_sets:set(),
up_expr = none :: 'none' | ?SETS:?SET(_),
killed_expr = none :: 'none' | ?SETS:?SET(_),
sub_inserts = ?SETS:new() :: ?SETS:?SET(_),
@@ -319,7 +319,7 @@ node_create(Label, Pred, Succ) ->
start_label = none :: 'none' | icode_lbl(),
rev_postorder = none :: 'none' | [icode_lbl()],
all_expr = none :: 'none' | [non_neg_integer()],
- tree = gb_trees:empty() :: gb_tree()}).
+ tree = gb_trees:empty() :: gb_trees:tree()}).
nodes_postorder(#nodes{postorder = Out}) -> Out.
nodes_rev_postorder(#nodes{rev_postorder = Out}) -> Out.
@@ -356,7 +356,7 @@ nodes_create() -> #nodes{}.
%% del_red_test - flag that is set to true when the reduction test
%% has been inserted is used to move the reduction test.
--record(update, {inserted = gb_trees:empty() :: gb_tree(),
+-record(update, {inserted = gb_trees:empty() :: gb_trees:tree(),
del_red_test = false :: boolean()}).
update_inserted_lookup(#update{inserted = Inserted}, ExprId) ->
diff --git a/lib/hipe/icode/hipe_icode_type.erl b/lib/hipe/icode/hipe_icode_type.erl
index 046949d2f2..ebeb5e2c10 100644
--- a/lib/hipe/icode/hipe_icode_type.erl
+++ b/lib/hipe/icode/hipe_icode_type.erl
@@ -2,7 +2,7 @@
%%
%% %CopyrightBegin%
%%
-%% Copyright Ericsson AB 2003-2012. All Rights Reserved.
+%% Copyright Ericsson AB 2003-2014. 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
@@ -84,22 +84,22 @@
t_fun/0, t_fun/1, t_fun/2, t_fun_args/1, t_fun_arity/1,
t_inf/2, t_inf_lists/2, t_integer/0,
t_integer/1, t_is_atom/1, t_is_any/1,
- t_is_binary/1, t_is_bitstr/1, t_is_bitwidth/1, t_is_boolean/1,
- t_is_fixnum/1, t_is_cons/1,
+ t_is_binary/1, t_is_bitstr/1, t_is_bitwidth/1,
+ t_is_boolean/1, t_is_fixnum/1, t_is_cons/1, t_is_map/1,
t_is_maybe_improper_list/1, t_is_equal/2, t_is_float/1,
t_is_fun/1, t_is_integer/1, t_is_non_neg_integer/1,
t_is_number/1, t_is_matchstate/1,
- t_is_nil/1, t_is_none/1, t_is_port/1, t_is_pid/1,
+ t_is_none/1, t_is_port/1, t_is_pid/1,
t_is_reference/1, t_is_subtype/2, t_is_tuple/1,
t_limit/2, t_matchstate_present/1, t_matchstate/0,
- t_matchstate_slots/1, t_maybe_improper_list/0,
+ t_matchstate_slots/1, t_maybe_improper_list/0, t_map/0,
t_nil/0, t_none/0, t_number/0, t_number/1, t_number_vals/1,
t_pid/0, t_port/0, t_reference/0, t_subtract/2, t_sup/2,
t_to_tlist/1, t_tuple/0, t_tuple/1, t_tuple_sizes/1]).
--record(state, {info_map = gb_trees:empty() :: gb_tree(),
+-record(state, {info_map = gb_trees:empty() :: gb_trees:tree(),
cfg :: cfg(),
- liveness = gb_trees:empty() :: gb_tree(),
+ liveness = gb_trees:empty() :: gb_trees:tree(),
arg_types :: [erl_types:erl_type()],
ret_type = [t_none()] :: [erl_types:erl_type()],
lookupfun :: call_fun(),
@@ -213,7 +213,7 @@ analyse_blocks(Work, State, MFA) ->
{NewState, NewLabels} =
try analyse_block(Label, Info, State)
catch throw:none_type ->
- %% io:format("received none type at label: ~p~n",[Label]),
+ %% io:format("received none type at label: ~p~n", [Label]),
{State,[]}
end,
NewWork2 = add_work(NewWork, NewLabels),
@@ -265,7 +265,7 @@ analyse_insn(I, Info, LookupFun) ->
do_move(I, Info);
#icode_call{} ->
NewInfo = do_call(I, Info, LookupFun),
- %%io:format("Analysing Call: ~w~n~w~n", [I,NewInfo]),
+ %% io:format("Analysing Call: ~w~n~w~n", [I, NewInfo]),
update_call_arguments(I, NewInfo);
#icode_phi{} ->
Type = t_limit(join_list(hipe_icode:args(I), Info), ?TYPE_DEPTH),
@@ -788,16 +788,16 @@ test_record(Atom, Size, Var, VarInfo, TrueLab, FalseLab, Info) ->
end.
test_type(Test, Type) ->
- %%io:format("Test is: ~w\n", [Test]),
- %%io:format("Type is: ~s\n", [format_type(Type)]),
+ %% io:format("Test is: ~w\n", [Test]),
+ %% io:format("Type is: ~s\n", [format_type(Type)]),
Ans =
case t_is_any(Type) of
true -> maybe;
false ->
TrueTest = true_branch_info(Test),
Inf = t_inf(TrueTest, Type),
- %%io:format("TrueTest is: ~s\n", [format_type(TrueTest)]),
- %%io:format("Inf is: ~s\n", [format_type(Inf)]),
+ %% io:format("TrueTest is: ~s\n", [format_type(TrueTest)]),
+ %% io:format("Inf is: ~s\n", [format_type(Inf)]),
case t_is_equal(Type, Inf) of
true ->
not t_is_none(Type);
@@ -895,11 +895,12 @@ test_type0(boolean, T) ->
t_is_boolean(T);
test_type0(list, T) ->
t_is_maybe_improper_list(T);
-test_type0(cons, T) ->
- t_is_cons(T);
-test_type0(nil, T) ->
- t_is_nil(T).
-
+%% test_type0(cons, T) ->
+%% t_is_cons(T);
+%% test_type0(nil, T) ->
+%% t_is_nil(T).
+test_type0(map, T) ->
+ t_is_map(T).
true_branch_info(integer) ->
t_integer();
@@ -931,22 +932,24 @@ true_branch_info(reference) ->
t_reference();
true_branch_info(function) ->
t_fun();
-true_branch_info(cons) ->
- t_cons();
-true_branch_info(nil) ->
- t_nil();
+%% true_branch_info(cons) ->
+%% t_cons();
+%% true_branch_info(nil) ->
+%% t_nil();
true_branch_info(boolean) ->
t_boolean();
+true_branch_info(map) ->
+ t_map();
true_branch_info(T) ->
- exit({?MODULE,unknown_typetest,T}).
+ exit({?MODULE, unknown_typetest, T}).
%% _________________________________________________________________
%%
%% Remove the redundant type tests. If a test is removed, the trace
-%% that isn't taken is explicitly removed from the CFG to simpilify
+%% that isn't taken is explicitly removed from the CFG to simplify
%% the handling of Phi nodes. If a Phi node is left and at least one
-%% branch into it has disappeared, the SSA propagation pass can't
+%% branch into it has disappeared, the SSA propagation pass cannot
%% handle it.
%%
%% If the CFG has changed at the end of this pass, the analysis is
diff --git a/lib/hipe/llvm/Makefile b/lib/hipe/llvm/Makefile
new file mode 100644
index 0000000000..92f378924a
--- /dev/null
+++ b/lib/hipe/llvm/Makefile
@@ -0,0 +1,109 @@
+#
+# %CopyrightBegin%
+#
+# Copyright Ericsson AB 2001-2014. 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%
+#
+
+ifndef EBIN
+EBIN = ../ebin
+endif
+
+include $(ERL_TOP)/make/target.mk
+include $(ERL_TOP)/make/$(TARGET)/otp.mk
+
+# ----------------------------------------------------
+# Application version
+# ----------------------------------------------------
+include ../vsn.mk
+VSN=$(HIPE_VSN)
+
+# ----------------------------------------------------
+# Release directory specification
+# ----------------------------------------------------
+RELSYSDIR = $(RELEASE_PATH)/lib/hipe-$(VSN)
+
+# ----------------------------------------------------
+# Target Specs
+# ----------------------------------------------------
+ifdef HIPE_ENABLED
+HIPE_MODULES = hipe_rtl_to_llvm \
+ hipe_llvm \
+ elf_format \
+ hipe_llvm_main \
+ hipe_llvm_merge \
+ hipe_llvm_liveness
+else
+HIPE_MODULES =
+endif
+
+MODULES = $(HIPE_MODULES)
+
+HRL_FILES= elf_format.hrl elf32_format.hrl elf64_format.hrl \
+ hipe_llvm_arch.hrl
+ERL_FILES= $(MODULES:%=%.erl)
+TARGET_FILES= $(MODULES:%=$(EBIN)/%.$(EMULATOR))
+
+# APP_FILE=
+# App_SRC= $(APP_FILE).src
+# APP_TARGET= $(EBIN)/$(APP_FILE)
+#
+# APPUP_FILE=
+# APPUP_SRC= $(APPUP_FILE).src
+# APPUP_TARGET= $(EBIN)/$(APPUP_FILE)
+
+# ----------------------------------------------------
+# FLAGS: Please keep +inline below
+# ----------------------------------------------------
+
+include ../native.mk
+
+ERL_COMPILE_FLAGS += +inline #+warn_missing_spec
+
+# if in 32 bit backend define BIT32 symbol
+ARCH = $(shell echo $(TARGET) | sed 's/^\(x86_64\)-.*/64bit/')
+ifneq ($(ARCH), 64bit)
+ERL_COMPILE_FLAGS += -DBIT32
+endif
+
+# ----------------------------------------------------
+# Targets
+# ----------------------------------------------------
+
+debug opt: $(TARGET_FILES)
+
+docs:
+
+clean:
+ rm -f $(TARGET_FILES)
+ rm -f core erl_crash.dump
+
+# ----------------------------------------------------
+# Special Build Targets
+# ----------------------------------------------------
+
+
+# ----------------------------------------------------
+# Release Target
+# ----------------------------------------------------
+include $(ERL_TOP)/make/otp_release_targets.mk
+
+release_spec: opt
+ $(INSTALL_DIR) $(RELSYSDIR)/llvm
+ $(INSTALL_DATA) $(ERL_FILES) $(HRL_FILES) $(RELSYSDIR)/llvm
+ $(INSTALL_DIR) $(RELSYSDIR)/ebin
+ $(INSTALL_DATA) $(TARGET_FILES) $(RELSYSDIR)/ebin
+
+release_docs_spec:
diff --git a/lib/hipe/llvm/elf32_format.hrl b/lib/hipe/llvm/elf32_format.hrl
new file mode 100644
index 0000000000..af1d95bf5b
--- /dev/null
+++ b/lib/hipe/llvm/elf32_format.hrl
@@ -0,0 +1,59 @@
+%% -*- erlang-indent-level: 2 -*-
+
+%%% @copyright 2011-2014 Yiannis Tsiouris <[email protected]>,
+%%% Chris Stavrakakis <[email protected]>
+%%% @author Yiannis Tsiouris <[email protected]>
+%%% [http://www.softlab.ntua.gr/~gtsiour/]
+
+%%% @doc This header file contains very very useful macros for handling
+%%% various segments of an ELF-32 formated object file, such as sizes,
+%%% offsets and predefined constants. For further information about
+%%% each field take a quick look at
+%%% "[http://www.sco.com/developers/gabi/latest/contents.html]"
+%%% that contain the current HP/Intel definition of the ELF object
+%%% file format.
+
+%%------------------------------------------------------------------------------
+%% ELF-32 Data Types (in bytes)
+%%------------------------------------------------------------------------------
+-define(ELF_ADDR_SIZE, 4).
+-define(ELF_OFF_SIZE, 4).
+-define(ELF_HALF_SIZE, 2).
+-define(ELF_WORD_SIZE, 4).
+-define(ELF_SWORD_SIZE, 4).
+-define(ELF_XWORD_SIZE, ?ELF_WORD_SIZE). % for compatibility
+-define(ELF_SXWORD_SIZE, ?ELF_WORD_SIZE).
+-define(ELF_UNSIGNED_CHAR_SIZE, 1).
+
+%%------------------------------------------------------------------------------
+%% ELF-32 Symbol Table Entries
+%%------------------------------------------------------------------------------
+%% Precomputed offset for Symbol Table entries in SymTab binary (needed because
+%% of the different offsets in 32 and 64 bit formats).
+-define(ST_NAME_OFFSET, 0).
+-define(ST_VALUE_OFFSET, (?ST_NAME_OFFSET + ?ST_NAME_SIZE) ).
+-define(ST_SIZE_OFFSET, (?ST_VALUE_OFFSET + ?ST_VALUE_SIZE) ).
+-define(ST_INFO_OFFSET, (?ST_SIZE_OFFSET + ?ST_SIZE_SIZE) ).
+-define(ST_OTHER_OFFSET, (?ST_INFO_OFFSET + ?ST_INFO_SIZE) ).
+-define(ST_SHNDX_OFFSET, (?ST_OTHER_OFFSET + ?ST_OTHER_SIZE) ).
+
+%%------------------------------------------------------------------------------
+%% ELF-64 Relocation Entries
+%%------------------------------------------------------------------------------
+%% Useful macros to extract information from r_info field
+-define(ELF_R_SYM(I), (I bsr 8) ).
+-define(ELF_R_TYPE(I), (I band 16#ff) ).
+-define(ELF_R_INFO(S, T), ((S bsl 8) + (T band 16#ff)) ).
+
+%%------------------------------------------------------------------------------
+%% ELF-64 Program Header Table
+%%------------------------------------------------------------------------------
+%% Offsets of various fields in a Program Header Table entry binary.
+-define(P_TYPE_OFFSET, 0).
+-define(P_OFFSET_OFFSET, (?P_FLAGS_OFFSET + ?P_FLAGS_SIZE) ).
+-define(P_VADDR_OFFSET, (?P_OFFSET_OFFSET + ?P_OFFSET_SIZE) ).
+-define(P_PADDR_OFFSET, (?P_VADDR_OFFSET + ?P_VADDR_SIZE) ).
+-define(P_FILESZ_OFFSET, (?P_PVADDR_OFFSET + ?P_PVADDR_SIZE) ).
+-define(P_MEMSZ_OFFSET, (?P_FILESZ_OFFSET + ?P_FILESZ_SIZE) ).
+-define(P_FLAGS_OFFSET, (?P_TYPE_OFFSET + ?P_TYPE_SIZE) ).
+-define(P_ALIGN_OFFSET, (?P_MEMSZ_OFFSET + ?P_MEMSZ_SIZE) ).
diff --git a/lib/hipe/llvm/elf64_format.hrl b/lib/hipe/llvm/elf64_format.hrl
new file mode 100644
index 0000000000..794746ffdc
--- /dev/null
+++ b/lib/hipe/llvm/elf64_format.hrl
@@ -0,0 +1,58 @@
+%% -*- erlang-indent-level: 2 -*-
+
+%%% @copyright 2011-2014 Yiannis Tsiouris <[email protected]>,
+%%% Chris Stavrakakis <[email protected]>
+%%% @author Yiannis Tsiouris <[email protected]>
+%%% [http://www.softlab.ntua.gr/~gtsiour/]
+
+%%% @doc This header file contains very very useful macros for handling
+%%% various segments of an ELF-64 formated object file, such as sizes,
+%%% offsets and predefined constants. For further information about
+%%% each field take a quick look at
+%%% "[http://downloads.openwatcom.org/ftp/devel/docs/elf-64-gen.pdf]"
+%%% that contain the current HP/Intel definition of the ELF object
+%%% file format.
+
+%%------------------------------------------------------------------------------
+%% ELF-64 Data Types (in bytes)
+%%------------------------------------------------------------------------------
+-define(ELF_ADDR_SIZE, 8).
+-define(ELF_OFF_SIZE, 8).
+-define(ELF_HALF_SIZE, 2).
+-define(ELF_WORD_SIZE, 4).
+-define(ELF_SWORD_SIZE, 4).
+-define(ELF_XWORD_SIZE, 8).
+-define(ELF_SXWORD_SIZE, 8).
+-define(ELF_UNSIGNED_CHAR_SIZE, 1).
+
+%%------------------------------------------------------------------------------
+%% ELF-64 Symbol Table Entries
+%%------------------------------------------------------------------------------
+%% Precomputed offset for Symbol Table entries in SymTab binary
+-define(ST_NAME_OFFSET, 0).
+-define(ST_INFO_OFFSET, (?ST_NAME_OFFSET + ?ST_NAME_SIZE) ).
+-define(ST_OTHER_OFFSET, (?ST_INFO_OFFSET + ?ST_INFO_SIZE) ).
+-define(ST_SHNDX_OFFSET, (?ST_OTHER_OFFSET + ?ST_OTHER_SIZE) ).
+-define(ST_VALUE_OFFSET, (?ST_SHNDX_OFFSET + ?ST_SHNDX_SIZE) ).
+-define(ST_SIZE_OFFSET, (?ST_VALUE_OFFSET + ?ST_VALUE_SIZE) ).
+
+%%------------------------------------------------------------------------------
+%% ELF-64 Relocation Entries
+%%------------------------------------------------------------------------------
+%% Useful macros to extract information from r_info field
+-define(ELF_R_SYM(I), (I bsr 32) ).
+-define(ELF_R_TYPE(I), (I band 16#ffffffff) ).
+-define(ELF_R_INFO(S, T), ((S bsl 32) + (T band 16#ffffffff)) ).
+
+%%------------------------------------------------------------------------------
+%% ELF-64 Program Header Table
+%%------------------------------------------------------------------------------
+%% Offsets of various fields in a Program Header Table entry binary.
+-define(P_TYPE_OFFSET, 0).
+-define(P_FLAGS_OFFSET, (?P_TYPE_OFFSET + ?P_TYPE_SIZE) ).
+-define(P_OFFSET_OFFSET, (?P_FLAGS_OFFSET + ?P_FLAGS_SIZE) ).
+-define(P_VADDR_OFFSET, (?P_OFFSET_OFFSET + ?P_OFFSET_SIZE) ).
+-define(P_PADDR_OFFSET, (?P_VADDR_OFFSET + ?P_VADDR_SIZE) ).
+-define(P_FILESZ_OFFSET, (?P_PVADDR_OFFSET + ?P_PVADDR_SIZE) ).
+-define(P_MEMSZ_OFFSET, (?P_FILESZ_OFFSET + ?P_FILESZ_SIZE) ).
+-define(P_ALIGN_OFFSET, (?P_MEMSZ_OFFSET + ?P_MEMSZ_SIZE) ).
diff --git a/lib/hipe/llvm/elf_format.erl b/lib/hipe/llvm/elf_format.erl
new file mode 100644
index 0000000000..260da9b5e6
--- /dev/null
+++ b/lib/hipe/llvm/elf_format.erl
@@ -0,0 +1,790 @@
+%% -*- erlang-indent-level: 2 -*-
+
+%%% @copyright 2011-2014 Yiannis Tsiouris <[email protected]>,
+%%% Chris Stavrakakis <[email protected]>,
+%%% Kostis Sagonas <[email protected]>
+%%% @author Yiannis Tsiouris <[email protected]>
+%%% [http://www.softlab.ntua.gr/~gtsiour/]
+
+%%% @doc This module contains functions for extracting various pieces of
+%%% information from an ELF formated Object file. To fully understand
+%%% the ELF format and the use of these functions please read
+%%% "[http://www.linuxjournal.com/article/1060?page=0,0]" carefully.
+
+-module(elf_format).
+
+-export([get_tab_entries/1,
+ %% Relocations
+ get_rodata_relocs/1,
+ get_text_relocs/1,
+ extract_rela/2,
+ get_rela_addends/1,
+ %% Note
+ extract_note/2,
+ %% Executable code
+ extract_text/1,
+ %% GCC Exception Table
+ get_exn_handlers/1,
+ %% Misc.
+ set_architecture_flag/1,
+ is64bit/0
+ ]).
+
+-include("elf_format.hrl").
+
+%%------------------------------------------------------------------------------
+%% Types
+%%------------------------------------------------------------------------------
+
+-type elf() :: binary().
+
+-type lp() :: non_neg_integer(). % landing pad
+-type num() :: non_neg_integer().
+-type index() :: non_neg_integer().
+-type offset() :: non_neg_integer().
+-type size() :: non_neg_integer().
+-type start() :: non_neg_integer().
+
+-type info() :: index().
+-type nameoff() :: offset().
+-type valueoff() :: offset().
+
+-type name() :: string().
+-type name_size() :: {name(), size()}.
+-type name_sizes() :: [name_size()].
+
+%%------------------------------------------------------------------------------
+%% Abstract Data Types and Accessors for ELF Structures.
+%%------------------------------------------------------------------------------
+
+%% File header
+-record(elf_ehdr, {ident, % ELF identification
+ type, % Object file type
+ machine, % Machine Type
+ version, % Object file version
+ entry, % Entry point address
+ phoff, % Program header offset
+ shoff :: offset(), % Section header offset
+ flags, % Processor-specific flags
+ ehsize :: size(), % ELF header size
+ phentsize :: size(), % Size of program header entry
+ phnum :: num(), % Number of program header entries
+ shentsize :: size(), % Size of section header entry
+ shnum :: num(), % Number of section header entries
+ shstrndx :: index() % Section name string table index
+ }).
+-type elf_ehdr() :: #elf_ehdr{}.
+
+-record(elf_ehdr_ident, {class, % File class
+ data, % Data encoding
+ version, % File version
+ osabi, % OS/ABI identification
+ abiversion, % ABI version
+ pad, % Start of padding bytes
+ nident % Size of e_ident[]
+ }).
+%% -type elf_ehdr_ident() :: #elf_ehdr_ident{}.
+
+%% Section header entries
+-record(elf_shdr, {name, % Section name
+ type, % Section type
+ flags, % Section attributes
+ addr, % Virtual address in memory
+ offset :: offset(), % Offset in file
+ size :: size(), % Size of section
+ link, % Link to other section
+ info, % Miscellaneous information
+ addralign, % Address align boundary
+ entsize % Size of entries, if section has table
+ }).
+%% -type elf_shdr() :: #elf_shdr{}.
+
+%% Symbol table entries
+-record(elf_sym, {name :: nameoff(), % Symbol name
+ info, % Type and Binding attributes
+ other, % Reserved
+ shndx, % Section table index
+ value :: valueoff(), % Symbol value
+ size :: size() % Size of object
+ }).
+-type elf_sym() :: #elf_sym{}.
+
+%% Relocations
+-record(elf_rel, {r_offset :: offset(), % Address of reference
+ r_info :: info() % Symbol index and type of relocation
+ }).
+-type elf_rel() :: #elf_rel{}.
+
+-record(elf_rela, {r_offset :: offset(), % Address of reference
+ r_info :: info(), % Symbol index and type of relocation
+ r_addend :: offset() % Constant part of expression
+ }).
+-type elf_rela() :: #elf_rela{}.
+
+%% %% Program header table
+%% -record(elf_phdr, {type, % Type of segment
+%% flags, % Segment attributes
+%% offset, % Offset in file
+%% vaddr, % Virtual address in memory
+%% paddr, % Reserved
+%% filesz, % Size of segment in file
+%% memsz, % Size of segment in memory
+%% align % Alignment of segment
+%% }).
+
+%% %% GCC exception table
+%% -record(elf_gccexntab, {lpbenc, % Landing pad base encoding
+%% lpbase, % Landing pad base
+%% ttenc, % Type table encoding
+%% ttoff, % Type table offset
+%% csenc, % Call-site table encoding
+%% cstabsize, % Call-site table size
+%% cstab :: cstab() % Call-site table
+%% }).
+%% -type elf_gccexntab() :: #elf_gccexntab{}.
+
+-record(elf_gccexntab_callsite, {start :: start(), % Call-site start
+ size :: size(), % Call-site size
+ lp :: lp(), % Call-site landing pad
+ % (exception handler)
+ onaction % On action (e.g. cleanup)
+ }).
+%% -type elf_gccexntab_callsite() :: #elf_gccexntab_callsite{}.
+
+%%------------------------------------------------------------------------------
+%% Accessor Functions
+%%------------------------------------------------------------------------------
+
+%% File header
+%% -spec mk_ehdr(...) -> elf_ehrd().
+mk_ehdr(Ident, Type, Machine, Version, Entry, Phoff, Shoff, Flags, Ehsize,
+ Phentsize, Phnum, Shentsize, Shnum, Shstrndx) ->
+ #elf_ehdr{ident = Ident, type = Type, machine = Machine, version = Version,
+ entry = Entry, phoff = Phoff, shoff = Shoff, flags = Flags,
+ ehsize = Ehsize, phentsize = Phentsize, phnum = Phnum,
+ shentsize = Shentsize, shnum = Shnum, shstrndx = Shstrndx}.
+
+%% -spec ehdr_shoff(elf_ehdr()) -> offset().
+%% ehdr_shoff(#elf_ehdr{shoff = Offset}) -> Offset.
+%%
+%% -spec ehdr_shentsize(elf_ehdr()) -> size().
+%% ehdr_shentsize(#elf_ehdr{shentsize = Size}) -> Size.
+%%
+%% -spec ehdr_shnum(elf_ehdr()) -> num().
+%% ehdr_shnum(#elf_ehdr{shnum = Num}) -> Num.
+%%
+%% -spec ehdr_shstrndx(elf_ehdr()) -> index().
+%% ehdr_shstrndx(#elf_ehdr{shstrndx = Index}) -> Index.
+
+
+%%-spec mk_ehdr_ident(...) -> elf_ehdr_ident().
+mk_ehdr_ident(Class, Data, Version, OsABI, AbiVersion, Pad, Nident) ->
+ #elf_ehdr_ident{class = Class, data = Data, version = Version, osabi = OsABI,
+ abiversion = AbiVersion, pad = Pad, nident = Nident}.
+
+%%%-------------------------
+%%% Section header entries
+%%%-------------------------
+mk_shdr(Name, Type, Flags, Addr, Offset, Size, Link, Info, AddrAlign, EntSize) ->
+ #elf_shdr{name = Name, type = Type, flags = Flags, addr = Addr,
+ offset = Offset, size = Size, link = Link, info = Info,
+ addralign = AddrAlign, entsize = EntSize}.
+
+%% -spec shdr_offset(elf_shdr()) -> offset().
+%% shdr_offset(#elf_shdr{offset = Offset}) -> Offset.
+%%
+%% -spec shdr_size(elf_shdr()) -> size().
+%% shdr_size(#elf_shdr{size = Size}) -> Size.
+
+%%%-------------------------
+%%% Symbol Table Entries
+%%%-------------------------
+mk_sym(Name, Info, Other, Shndx, Value, Size) ->
+ #elf_sym{name = Name, info = Info, other = Other,
+ shndx = Shndx, value = Value, size = Size}.
+
+-spec sym_name(elf_sym()) -> nameoff().
+sym_name(#elf_sym{name = Name}) -> Name.
+
+%% -spec sym_value(elf_sym()) -> valueoff().
+%% sym_value(#elf_sym{value = Value}) -> Value.
+%%
+%% -spec sym_size(elf_sym()) -> size().
+%% sym_size(#elf_sym{size = Size}) -> Size.
+
+%%%-------------------------
+%%% Relocations
+%%%-------------------------
+-spec mk_rel(offset(), info()) -> elf_rel().
+mk_rel(Offset, Info) ->
+ #elf_rel{r_offset = Offset, r_info = Info}.
+
+%% The following two functions capitalize on the fact that the two kinds of
+%% relocation records (for 32- and 64-bit architectures have similar structure.
+
+-spec r_offset(elf_rel() | elf_rela()) -> offset().
+r_offset(#elf_rel{r_offset = Offset}) -> Offset;
+r_offset(#elf_rela{r_offset = Offset}) -> Offset.
+
+-spec r_info(elf_rel() | elf_rela()) -> info().
+r_info(#elf_rel{r_info = Info}) -> Info;
+r_info(#elf_rela{r_info = Info}) -> Info.
+
+-spec mk_rela(offset(), info(), offset()) -> elf_rela().
+mk_rela(Offset, Info, Addend) ->
+ #elf_rela{r_offset = Offset, r_info = Info, r_addend = Addend}.
+
+-spec rela_addend(elf_rela()) -> offset().
+rela_addend(#elf_rela{r_addend = Addend}) -> Addend.
+
+%% %%%-------------------------
+%% %%% GCC exception table
+%% %%%-------------------------
+%% -type cstab() :: [elf_gccexntab_callsite()].
+%%
+%% mk_gccexntab(LPbenc, LPbase, TTenc, TToff, CSenc, CStabsize, CStab) ->
+%% #elf_gccexntab{lpbenc = LPbenc, lpbase = LPbase, ttenc = TTenc,
+%% ttoff = TToff, csenc = CSenc, cstabsize = CStabsize,
+%% cstab = CStab}.
+%%
+%% -spec gccexntab_cstab(elf_gccexntab()) -> cstab().
+%% gccexntab_cstab(#elf_gccexntab{cstab = CSTab}) -> CSTab.
+
+mk_gccexntab_callsite(Start, Size, LP, Action) ->
+ #elf_gccexntab_callsite{start = Start, size=Size, lp=LP, onaction=Action}.
+
+%% -spec gccexntab_callsite_start(elf_gccexntab_callsite()) -> start().
+%% gccexntab_callsite_start(#elf_gccexntab_callsite{start = Start}) -> Start.
+%%
+%% -spec gccexntab_callsite_size(elf_gccexntab_callsite()) -> size().
+%% gccexntab_callsite_size(#elf_gccexntab_callsite{size = Size}) -> Size.
+%%
+%% -spec gccexntab_callsite_lp(elf_gccexntab_callsite()) -> lp().
+%% gccexntab_callsite_lp(#elf_gccexntab_callsite{lp = LP}) -> LP.
+
+%%------------------------------------------------------------------------------
+%% Functions to manipulate the ELF File Header
+%%------------------------------------------------------------------------------
+
+%% @doc Extracts the File Header from an ELF formatted object file. Also sets
+%% the ELF class variable in the process dictionary (used by many functions
+%% in this and hipe_llvm_main modules).
+-spec extract_header(elf()) -> elf_ehdr().
+extract_header(Elf) ->
+ Ehdr_bin = get_binary_segment(Elf, 0, ?ELF_EHDR_SIZE),
+ << %% Structural pattern matching on fields.
+ Ident_bin:?E_IDENT_SIZE/binary,
+ Type:?bits(?E_TYPE_SIZE)/integer-little,
+ Machine:?bits(?E_MACHINE_SIZE)/integer-little,
+ Version:?bits(?E_VERSION_SIZE)/integer-little,
+ Entry:?bits(?E_ENTRY_SIZE)/integer-little,
+ Phoff:?bits(?E_PHOFF_SIZE)/integer-little,
+ Shoff:?bits(?E_SHOFF_SIZE)/integer-little,
+ Flags:?bits(?E_FLAGS_SIZE)/integer-little,
+ Ehsize:?bits(?E_EHSIZE_SIZE)/integer-little,
+ Phentsize:?bits(?E_PHENTSIZE_SIZE)/integer-little,
+ Phnum:?bits(?E_PHNUM_SIZE)/integer-little,
+ Shentsize:?bits(?E_SHENTSIZE_SIZE)/integer-little,
+ Shnum:?bits(?E_SHENTSIZE_SIZE)/integer-little,
+ Shstrndx:?bits(?E_SHSTRNDX_SIZE)/integer-little
+ >> = Ehdr_bin,
+ <<16#7f, $E, $L, $F, Class, Data, Version, Osabi, Abiversion,
+ Pad:6/binary, Nident
+ >> = Ident_bin,
+ Ident = mk_ehdr_ident(Class, Data, Version, Osabi,
+ Abiversion, Pad, Nident),
+ mk_ehdr(Ident, Type, Machine, Version, Entry, Phoff, Shoff, Flags,
+ Ehsize, Phentsize, Phnum, Shentsize, Shnum, Shstrndx).
+
+%%------------------------------------------------------------------------------
+%% Functions to manipulate Section Header Entries
+%%------------------------------------------------------------------------------
+
+%% @doc Extracts the Section Header Table from an ELF formated Object File.
+extract_shdrtab(Elf) ->
+ %% Extract File Header to get info about Section Header Offset (in bytes),
+ %% Entry Size (in bytes) and Number of entries
+ #elf_ehdr{shoff = ShOff, shentsize = ShEntsize, shnum = ShNum} =
+ extract_header(Elf),
+ %% Get actual Section header table (binary)
+ ShdrBin = get_binary_segment(Elf, ShOff, ShNum * ShEntsize),
+ get_shdrtab_entries(ShdrBin, []).
+
+get_shdrtab_entries(<<>>, Acc) ->
+ lists:reverse(Acc);
+get_shdrtab_entries(ShdrBin, Acc) ->
+ <<%% Structural pattern matching on fields.
+ Name:?bits(?SH_NAME_SIZE)/integer-little,
+ Type:?bits(?SH_TYPE_SIZE)/integer-little,
+ Flags:?bits(?SH_FLAGS_SIZE)/integer-little,
+ Addr:?bits(?SH_ADDR_SIZE)/integer-little,
+ Offset:?bits(?SH_OFFSET_SIZE)/integer-little,
+ Size:?bits(?SH_SIZE_SIZE)/integer-little,
+ Link:?bits(?SH_LINK_SIZE)/integer-little,
+ Info:?bits(?SH_INFO_SIZE)/integer-little,
+ Addralign:?bits(?SH_ADDRALIGN_SIZE)/integer-little,
+ Entsize:?bits(?SH_ENTSIZE_SIZE)/integer-little,
+ MoreShdrE/binary
+ >> = ShdrBin,
+ ShdrE = mk_shdr(Name, Type, Flags, Addr, Offset,
+ Size, Link, Info, Addralign, Entsize),
+ get_shdrtab_entries(MoreShdrE, [ShdrE | Acc]).
+
+%% @doc Extracts a specific Entry of a Section Header Table. This function
+%% takes as argument the Section Header Table (`SHdrTab') and the entry's
+%% serial number (`EntryNum') and returns the entry (`shdr').
+get_shdrtab_entry(SHdrTab, EntryNum) ->
+ lists:nth(EntryNum + 1, SHdrTab).
+
+%%------------------------------------------------------------------------------
+%% Functions to manipulate Section Header String Table
+%%------------------------------------------------------------------------------
+
+%% @doc Extracts the Section Header String Table. This section is not a known
+%% ELF Object File section. It is just a "hidden" table storing the
+%% names of all sections that exist in current object file.
+-spec extract_shstrtab(elf()) -> [name()].
+extract_shstrtab(Elf) ->
+ %% Extract Section Name String Table Index
+ #elf_ehdr{shstrndx = ShStrNdx} = extract_header(Elf),
+ ShHdrTab = extract_shdrtab(Elf),
+ %% Extract Section header entry and get actual Section-header String Table
+ #elf_shdr{offset = ShStrOffset, size = ShStrSize} =
+ get_shdrtab_entry(ShHdrTab, ShStrNdx),
+ case get_binary_segment(Elf, ShStrOffset, ShStrSize) of
+ <<>> -> %% Segment empty
+ [];
+ ShStrTab -> %% Convert to string table
+ [Name || {Name, _Size} <- get_names(ShStrTab)]
+ end.
+
+%%------------------------------------------------------------------------------
+
+-spec get_tab_entries(elf()) -> [{name(), valueoff(), size()}].
+get_tab_entries(Elf) ->
+ SymTab = extract_symtab(Elf),
+ Ts = [{Name, Value, Size div ?ELF_XWORD_SIZE}
+ || #elf_sym{name = Name, value = Value, size = Size} <- SymTab,
+ Name =/= 0],
+ {NameIndices, ValueOffs, Sizes} = lists:unzip3(Ts),
+ %% Find the names of the symbols.
+ %% Get string table entries ([{Name, Offset in strtab section}]). Keep only
+ %% relevant entries:
+ StrTab = extract_strtab(Elf),
+ Relevant = [get_strtab_entry(StrTab, Off) || Off <- NameIndices],
+ %% Zip back to {Name, ValueOff, Size}
+ lists:zip3(Relevant, ValueOffs, Sizes).
+
+%%------------------------------------------------------------------------------
+%% Functions to manipulate Symbol Table
+%%------------------------------------------------------------------------------
+
+%% @doc Function that extracts Symbol Table from an ELF Object file.
+extract_symtab(Elf) ->
+ Symtab_bin = extract_segment_by_name(Elf, ?SYMTAB),
+ get_symtab_entries(Symtab_bin, []).
+
+get_symtab_entries(<<>>, Acc) ->
+ lists:reverse(Acc);
+get_symtab_entries(Symtab_bin, Acc) ->
+ <<SymE_bin:?ELF_SYM_SIZE/binary, MoreSymE/binary>> = Symtab_bin,
+ case is64bit() of
+ true ->
+ <<%% Structural pattern matching on fields.
+ Name:?bits(?ST_NAME_SIZE)/integer-little,
+ Info:?bits(?ST_INFO_SIZE)/integer-little,
+ Other:?bits(?ST_OTHER_SIZE)/integer-little,
+ Shndx:?bits(?ST_SHNDX_SIZE)/integer-little,
+ Value:?bits(?ST_VALUE_SIZE)/integer-little,
+ Size:?bits(?ST_SIZE_SIZE)/integer-little
+ >> = SymE_bin;
+ false ->
+ << %% Same fields in different order:
+ Name:?bits(?ST_NAME_SIZE)/integer-little,
+ Value:?bits(?ST_VALUE_SIZE)/integer-little,
+ Size:?bits(?ST_SIZE_SIZE)/integer-little,
+ Info:?bits(?ST_INFO_SIZE)/integer-little,
+ Other:?bits(?ST_OTHER_SIZE)/integer-little,
+ Shndx:?bits(?ST_SHNDX_SIZE)/integer-little
+ >> = SymE_bin
+ end,
+ SymE = mk_sym(Name, Info, Other, Shndx, Value, Size),
+ get_symtab_entries(MoreSymE, [SymE | Acc]).
+
+%% @doc Extracts a specific entry from the Symbol Table (as binary).
+%% This function takes as arguments the Symbol Table (`SymTab')
+%% and the entry's serial number and returns that entry (`sym').
+get_symtab_entry(SymTab, EntryNum) ->
+ lists:nth(EntryNum + 1, SymTab).
+
+%%------------------------------------------------------------------------------
+%% Functions to manipulate String Table
+%%------------------------------------------------------------------------------
+
+%% @doc Extracts String Table from an ELF formated Object File.
+-spec extract_strtab(elf()) -> [{string(), offset()}].
+extract_strtab(Elf) ->
+ Strtab_bin = extract_segment_by_name(Elf, ?STRTAB),
+ NamesSizes = get_names(Strtab_bin),
+ make_offsets(NamesSizes).
+
+%% @doc Returns the name of the symbol at the given offset. The string table
+%% contains entries of the form {Name, Offset}. If no such offset exists
+%% returns the empty string (`""').
+%% XXX: There might be a bug here because of the "compact" saving the ELF
+%% format uses: e.g. only stores ".rela.text" for ".rela.text" and ".text".
+get_strtab_entry(Strtab, Offset) ->
+ case lists:keyfind(Offset, 2, Strtab) of
+ {Name, Offset} -> Name;
+ false -> ""
+ end.
+
+%%------------------------------------------------------------------------------
+%% Functions to manipulate Relocations
+%%------------------------------------------------------------------------------
+
+%% @doc This function gets as argument an ELF binary file and returns a list
+%% with all .rela.rodata labels (i.e. constants and literals in code)
+%% or an empty list if no ".rela.rodata" section exists in code.
+-spec get_rodata_relocs(elf()) -> [offset()].
+get_rodata_relocs(Elf) ->
+ case is64bit() of
+ true ->
+ %% Only care about the addends (== offsets):
+ get_rela_addends(extract_rela(Elf, ?RODATA));
+ false ->
+ %% Find offsets hardcoded in ".rodata" entry
+ %%XXX: Treat all 0s as padding and skip them!
+ [SkipPadding || SkipPadding <- extract_rodata(Elf), SkipPadding =/= 0]
+ end.
+
+-spec get_rela_addends([elf_rela()]) -> [offset()].
+get_rela_addends(RelaEntries) ->
+ [rela_addend(E) || E <- RelaEntries].
+
+%% @doc Extract a list of the form `[{SymbolName, Offset}]' with all relocatable
+%% symbols and their offsets in the code from the ".text" section.
+-spec get_text_relocs(elf()) -> [{name(), offset()}].
+get_text_relocs(Elf) ->
+ %% Only care about the symbol table index and the offset:
+ NameOffsetTemp = [{?ELF_R_SYM(r_info(E)), r_offset(E)}
+ || E <- extract_rela(Elf, ?TEXT)],
+ {NameIndices, ActualOffsets} = lists:unzip(NameOffsetTemp),
+ %% Find the names of the symbols:
+ %%
+ %% Get those symbol table entries that are related to Text relocs:
+ Symtab = extract_symtab(Elf),
+ SymtabEs = [get_symtab_entry(Symtab, Index) || Index <- NameIndices],
+ %XXX: not zero-indexed!
+ %% Symbol table entries contain the offset of the name of the symbol in
+ %% String Table:
+ SymtabEs2 = [sym_name(E) || E <- SymtabEs], %XXX: Do we need to sort SymtabE?
+ %% Get string table entries ([{Name, Offset in strtab section}]). Keep only
+ %% relevant entries:
+ Strtab = extract_strtab(Elf),
+ Relevant = [get_strtab_entry(Strtab, Off) || Off <- SymtabEs2],
+ %% Zip back with actual offsets:
+ lists:zip(Relevant, ActualOffsets).
+
+%% @doc Extract the Relocations segment for section `Name' (that is passed
+%% as second argument) from an ELF formated Object file binary.
+-spec extract_rela(elf(), name()) -> [elf_rel() | elf_rela()].
+extract_rela(Elf, Name) ->
+ SegName =
+ case is64bit() of
+ true -> ?RELA(Name); % ELF-64 uses ".rela"
+ false -> ?REL(Name) % ...while ELF-32 uses ".rel"
+ end,
+ Rela_bin = extract_segment_by_name(Elf, SegName),
+ get_rela_entries(Rela_bin, []).
+
+get_rela_entries(<<>>, Acc) ->
+ lists:reverse(Acc);
+get_rela_entries(Bin, Acc) ->
+ E = case is64bit() of
+ true ->
+ <<%% Structural pattern matching on fields of a Rela Entry.
+ Offset:?bits(?R_OFFSET_SIZE)/integer-little,
+ Info:?bits(?R_INFO_SIZE)/integer-little,
+ Addend:?bits(?R_ADDEND_SIZE)/integer-little,
+ Rest/binary
+ >> = Bin,
+ mk_rela(Offset, Info, Addend);
+ false ->
+ <<%% Structural pattern matching on fields of a Rel Entry.
+ Offset:?bits(?R_OFFSET_SIZE)/integer-little,
+ Info:?bits(?R_INFO_SIZE)/integer-little,
+ Rest/binary
+ >> = Bin,
+ mk_rel(Offset, Info)
+ end,
+ get_rela_entries(Rest, [E | Acc]).
+
+%% %% @doc Extract the `EntryNum' (serial number) Relocation Entry.
+%% get_rela_entry(Rela, EntryNum) ->
+%% lists:nth(EntryNum + 1, Rela).
+
+%%------------------------------------------------------------------------------
+%% Functions to manipulate Executable Code segment
+%%------------------------------------------------------------------------------
+
+%% @doc This function gets as arguments an ELF formated binary file and
+%% returns the Executable Code (".text" segment) or an empty binary if it
+%% is not found.
+-spec extract_text(elf()) -> binary().
+extract_text(Elf) ->
+ extract_segment_by_name(Elf, ?TEXT).
+
+%%------------------------------------------------------------------------------
+%% Functions to manipulate Note Section
+%%------------------------------------------------------------------------------
+
+%% @doc Extract specific Note Section from an ELF Object file. The function
+%% takes as first argument the object file (`Elf') and the `Name' of the
+%% wanted Note Section (<b>without</b> the ".note" prefix!). It returns
+%% the specified binary segment or an empty binary if no such section
+%% exists.
+-spec extract_note(elf(), string()) -> binary().
+extract_note(Elf, Name) ->
+ extract_segment_by_name(Elf, ?NOTE(Name)).
+
+%%------------------------------------------------------------------------------
+%% Functions to manipulate GCC Exception Table segment
+%%------------------------------------------------------------------------------
+
+%% A description for the C++ exception table formats can be found at Exception
+%% Handling Tables (http://www.codesourcery.com/cxx-abi/exceptions.pdf).
+
+%% A list with `{Start, End, HandlerOffset}' for all call sites in the code
+-spec get_exn_handlers(elf()) -> [{start(), start(), lp()}].
+get_exn_handlers(Elf) ->
+ CallSites = extract_gccexntab_callsites(Elf),
+ [{Start, Start + Size, LP}
+ || #elf_gccexntab_callsite{start = Start, size = Size, lp = LP} <- CallSites].
+
+%% @doc This function gets as argument an ELF binary file and returns
+%% the table (list) of call sites which is stored in GCC
+%% Exception Table (".gcc_except_table") section.
+%% It returns an empty list if the Exception Table is not found.
+%% XXX: Assumes there is *no* Action Record Table.
+extract_gccexntab_callsites(Elf) ->
+ case extract_segment_by_name(Elf, ?GCC_EXN_TAB) of
+ <<>> ->
+ [];
+ ExnTab ->
+ %% First byte of LSDA is Landing Pad base encoding.
+ <<LBenc:8, More/binary>> = ExnTab,
+ %% Second byte is the Landing Pad base (if its encoding is not
+ %% DW_EH_PE_omit) (optional).
+ {_LPBase, LSDACont} =
+ case LBenc =:= ?DW_EH_PE_omit of
+ true -> % No landing pad base byte. (-1 denotes that)
+ {-1, More};
+ false -> % Landing pad base.
+ <<Base:8, More2/binary>> = More,
+ {Base, More2}
+ end,
+ %% Next byte of LSDA is the encoding of the Type Table.
+ <<TTenc:8, More3/binary>> = LSDACont,
+ %% Next byte is the Types Table offset encoded in U-LEB128 (optional).
+ {_TTOff, LSDACont2} =
+ case TTenc =:= ?DW_EH_PE_omit of
+ true -> % There is no Types Table pointer. (-1 denotes that)
+ {-1, More3};
+ false -> % The byte offset from this field to the start of the Types
+ % Table used for exception matching.
+ leb128_decode(More3)
+ end,
+ %% Next byte of LSDA is the encoding of the fields in the Call-site Table.
+ <<_CSenc:8, More4/binary>> = LSDACont2,
+ %% Sixth byte is the size (in bytes) of the Call-site Table encoded in
+ %% U-LEB128.
+ {_CSTabSize, CSTab} = leb128_decode(More4),
+ %% Extract all call site information
+ get_gccexntab_callsites(CSTab, [])
+ end.
+
+get_gccexntab_callsites(<<>>, Acc) ->
+ lists:reverse(Acc);
+get_gccexntab_callsites(CSTab, Acc) ->
+ %% We are only interested in the Landing Pad of every entry.
+ <<Start:32/integer-little, Size:32/integer-little,
+ LP:32/integer-little, OnAction:8, More/binary
+ >> = CSTab,
+ GccCS = mk_gccexntab_callsite(Start, Size, LP, OnAction),
+ get_gccexntab_callsites(More, [GccCS | Acc]).
+
+%%------------------------------------------------------------------------------
+%% Functions to manipulate Read-only Data (.rodata)
+%%------------------------------------------------------------------------------
+extract_rodata(Elf) ->
+ Rodata_bin = extract_segment_by_name(Elf, ?RODATA),
+ get_rodata_entries(Rodata_bin, []).
+
+get_rodata_entries(<<>>, Acc) ->
+ lists:reverse(Acc);
+get_rodata_entries(Rodata_bin, Acc) ->
+ <<Num:?bits(?ELF_ADDR_SIZE)/integer-little, More/binary>> = Rodata_bin,
+ get_rodata_entries(More, [Num | Acc]).
+
+%%------------------------------------------------------------------------------
+%% Helper functions
+%%------------------------------------------------------------------------------
+
+%% @doc Returns the binary segment starting at `Offset' with length `Size'
+%% (bytes) from a binary file. If `Offset' is bigger than the byte size of
+%% the binary, an empty binary (`<<>>') is returned.
+-spec get_binary_segment(binary(), offset(), size()) -> binary().
+get_binary_segment(Bin, Offset, _Size) when Offset > byte_size(Bin) ->
+ <<>>;
+get_binary_segment(Bin, Offset, Size) ->
+ <<_Hdr:Offset/binary, BinSeg:Size/binary, _More/binary>> = Bin,
+ BinSeg.
+
+%% @doc This function gets as arguments an ELF formated binary object and
+%% a string with the segments' name and returns the specified segment or
+%% an empty binary (`<<>>') if there exists no segment with that name.
+%% There are handy macros defined in elf_format.hrl for all Standard
+%% Section Names.
+-spec extract_segment_by_name(elf(), string()) -> binary().
+extract_segment_by_name(Elf, SectionName) ->
+ %% Extract Section Header Table and Section Header String Table from binary
+ SHdrTable = extract_shdrtab(Elf),
+ Names = extract_shstrtab(Elf),
+ %% Zip to a list of (Name,ShdrE)
+ [_Zero | ShdrEs] = lists:keysort(2, SHdrTable), % Skip first entry (zeros).
+ L = lists:zip(Names, ShdrEs),
+ %% Find Section Header Table entry by name
+ case lists:keyfind(SectionName, 1, L) of
+ {SectionName, ShdrE} -> %% Note: Same name.
+ #elf_shdr{offset = Offset, size = Size} = ShdrE,
+ get_binary_segment(Elf, Offset, Size);
+ false -> %% Not found.
+ <<>>
+ end.
+
+%% @doc Extracts a list of strings with (zero-separated) names from a binary.
+%% Returns tuples of `{Name, Size}'.
+%% XXX: Skip trailing 0.
+-spec get_names(<<_:8,_:_*8>>) -> name_sizes().
+get_names(<<0, Bin/binary>>) ->
+ NamesSizes = get_names(Bin, []),
+ fix_names(NamesSizes, []).
+
+get_names(<<>>, Acc) ->
+ lists:reverse(Acc);
+get_names(Bin, Acc) ->
+ {Name, MoreNames} = bin_get_string(Bin),
+ get_names(MoreNames, [{Name, length(Name)} | Acc]).
+
+%% @doc Fix names:
+%% e.g. If ".rela.text" exists, ".text" does not. Same goes for
+%% ".rel.text". In that way, the Section Header String Table is more
+%% compact. Add ".text" just *before* the corresponding rela-field,
+%% etc.
+-spec fix_names(name_sizes(), name_sizes()) -> name_sizes().
+fix_names([], Acc) ->
+ lists:reverse(Acc);
+fix_names([{Name, Size}=T | Names], Acc) ->
+ case is64bit() of
+ true ->
+ case string:str(Name, ".rela") =:= 1 of
+ true -> %% Name starts with ".rela":
+ Section = string:substr(Name, 6),
+ fix_names(Names, [{Section, Size - 5}
+ | [T | Acc]]); % XXX: Is order ok? (".text"
+ % always before ".rela.text")
+ false -> %% Name does not start with ".rela":
+ fix_names(Names, [T | Acc])
+ end;
+ false ->
+ case string:str(Name, ".rel") =:= 1 of
+ true -> %% Name starts with ".rel":
+ Section = string:substr(Name, 5),
+ fix_names(Names, [{Section, Size - 4}
+ | [T | Acc]]); % XXX: Is order ok? (".text"
+ % always before ".rela.text")
+ false -> %% Name does not start with ".rel":
+ fix_names(Names, [T | Acc])
+ end
+ end.
+
+
+%% @doc A function that byte-reverses a binary. This might be needed because of
+%% little (fucking!) endianess.
+-spec bin_reverse(binary()) -> binary().
+bin_reverse(Bin) when is_binary(Bin) ->
+ bin_reverse(Bin, <<>>).
+
+-spec bin_reverse(binary(), binary()) -> binary().
+bin_reverse(<<>>, Acc) ->
+ Acc;
+bin_reverse(<<Head, More/binary>>, Acc) ->
+ bin_reverse(More, <<Head, Acc/binary>>).
+
+%% @doc A function that extracts a null-terminated string from a binary. It
+%% returns the found string along with the rest of the binary.
+-spec bin_get_string(binary()) -> {string(), binary()}.
+bin_get_string(Bin) ->
+ bin_get_string(Bin, <<>>).
+
+bin_get_string(<<>>, BinAcc) ->
+ Bin = bin_reverse(BinAcc), % little endian!
+ {binary_to_list(Bin), <<>>};
+bin_get_string(<<0, MoreBin/binary>>, BinAcc) ->
+ Bin = bin_reverse(BinAcc), % little endian!
+ {binary_to_list(Bin), MoreBin};
+bin_get_string(<<Letter, Tail/binary>>, BinAcc) ->
+ bin_get_string(Tail, <<Letter, BinAcc/binary>>).
+
+%% @doc
+make_offsets(NamesSizes) ->
+ {Names, Sizes} = lists:unzip(NamesSizes),
+ Offsets = make_offsets_from_sizes(Sizes, 1, []),
+ lists:zip(Names, Offsets).
+
+make_offsets_from_sizes([], _, Acc) ->
+ lists:reverse(Acc);
+make_offsets_from_sizes([Size | Sizes], Cur, Acc) ->
+ make_offsets_from_sizes(Sizes, Size+Cur+1, [Cur | Acc]). % For the "."!
+
+%% @doc Little-Endian Base 128 (LEB128) Decoder
+%% This function extracts the <b>first</b> LEB128-encoded integer in a
+%% binary and returns that integer along with the remaining binary. This is
+%% done because a LEB128 number has variable bit-size and that is a way of
+%% extracting only one number in a binary and continuing parsing the binary
+%% for other kind of data (e.g. different encoding).
+%% FIXME: Only decodes unsigned data!
+-spec leb128_decode(binary()) -> {integer(), binary()}.
+leb128_decode(LebNum) ->
+ leb128_decode(LebNum, 0, <<>>).
+
+-spec leb128_decode(binary(), integer(), binary()) -> {integer(), binary()}.
+leb128_decode(LebNum, NoOfBits, Acc) ->
+ <<Sentinel:1/bits, NextBundle:7/bits, MoreLebNums/bits>> = LebNum,
+ case Sentinel of
+ <<1:1>> -> % more bytes to follow
+ leb128_decode(MoreLebNums, NoOfBits+7, <<NextBundle:7/bits, Acc/bits>>);
+ <<0:1>> -> % byte bundle stop
+ Size = NoOfBits+7,
+ <<Num:Size/integer>> = <<NextBundle:7/bits, Acc/bits>>,
+ {Num, MoreLebNums}
+ end.
+
+%% @doc Extract ELF Class from ELF header and export symbol to process
+%% dictionary.
+-spec set_architecture_flag(elf()) -> 'ok'.
+set_architecture_flag(Elf) ->
+ %% Extract information about ELF Class from ELF Header
+ <<16#7f, $E, $L, $F, EI_Class, _MoreHeader/binary>>
+ = get_binary_segment(Elf, 0, ?ELF_EHDR_SIZE),
+ put(elf_class, EI_Class),
+ ok.
+
+%% @doc Read from object file header if the file class is ELF32 or ELF64.
+-spec is64bit() -> boolean().
+is64bit() ->
+ case get(elf_class) of
+ ?ELFCLASS64 -> true;
+ ?ELFCLASS32 -> false
+ end.
diff --git a/lib/hipe/llvm/elf_format.hrl b/lib/hipe/llvm/elf_format.hrl
new file mode 100644
index 0000000000..78592e6e2a
--- /dev/null
+++ b/lib/hipe/llvm/elf_format.hrl
@@ -0,0 +1,488 @@
+%% -*- erlang-indent-level: 2 -*-
+
+%%% @copyright 2011-2014 Yiannis Tsiouris <[email protected]>,
+%%% Chris Stavrakakis <[email protected]>
+%%% @author Yiannis Tsiouris <[email protected]>
+%%% [http://www.softlab.ntua.gr/~gtsiour/]
+
+%%------------------------------------------------------------------------------
+%%
+%% ELF Header File
+%%
+%%------------------------------------------------------------------------------
+
+-ifdef(BIT32).
+-include("elf32_format.hrl"). % ELF32-specific definitions.
+-else.
+-include("elf64_format.hrl"). % ELF64-specific definitions.
+-endif.
+
+%%------------------------------------------------------------------------------
+%% ELF Data Types (in bytes)
+%%------------------------------------------------------------------------------
+%%XXX: Included in either elf32_format or elf64_format.
+
+%%------------------------------------------------------------------------------
+%% ELF File Header
+%%------------------------------------------------------------------------------
+-define(ELF_EHDR_SIZE, (?E_IDENT_SIZE + ?E_TYPE_SIZE + ?E_MACHINE_SIZE
+ +?E_VERSION_SIZE + ?E_ENTRY_SIZE + ?E_PHOFF_SIZE
+ +?E_SHOFF_SIZE + ?E_FLAGS_SIZE + ?E_EHSIZE_SIZE
+ +?E_PHENTSIZE_SIZE + ?E_PHNUM_SIZE + ?E_SHENTSIZE_SIZE
+ +?E_SHNUM_SIZE + ?E_SHSTRNDX_SIZE) ).
+
+-define(E_IDENT_SIZE, (16 * ?ELF_UNSIGNED_CHAR_SIZE) ).
+-define(E_TYPE_SIZE, ?ELF_HALF_SIZE).
+-define(E_MACHINE_SIZE, ?ELF_HALF_SIZE).
+-define(E_VERSION_SIZE, ?ELF_WORD_SIZE).
+-define(E_ENTRY_SIZE, ?ELF_ADDR_SIZE).
+-define(E_PHOFF_SIZE, ?ELF_OFF_SIZE).
+-define(E_SHOFF_SIZE, ?ELF_OFF_SIZE).
+-define(E_FLAGS_SIZE, ?ELF_WORD_SIZE).
+-define(E_EHSIZE_SIZE, ?ELF_HALF_SIZE).
+-define(E_PHENTSIZE_SIZE, ?ELF_HALF_SIZE).
+-define(E_PHNUM_SIZE, ?ELF_HALF_SIZE).
+-define(E_SHENTSIZE_SIZE, ?ELF_HALF_SIZE).
+-define(E_SHNUM_SIZE, ?ELF_HALF_SIZE).
+-define(E_SHSTRNDX_SIZE, ?ELF_HALF_SIZE).
+
+%% Useful arithmetics for computing byte offsets for various File Header
+%% entries from a File Header (erlang) binary
+-define(E_IDENT_OFFSET, 0).
+-define(E_TYPE_OFFSET, (?E_IDENT_OFFSET + ?E_IDENT_SIZE) ).
+-define(E_MACHINE_OFFSET, (?E_TYPE_OFFSET + ?E_TYPE_SIZE) ).
+-define(E_VERSION_OFFSET, (?E_MACHINE_OFFSET + ?E_MACHINE_SIZE) ).
+-define(E_ENTRY_OFFSET, (?E_VERSION_OFFSET + ?E_VERSION_SIZE) ).
+-define(E_PHOFF_OFFSET, (?E_ENTRY_OFFSET + ?E_ENTRY_SIZE) ).
+-define(E_SHOFF_OFFSET, (?E_PHOFF_OFFSET + ?E_PHOFF_SIZE) ).
+-define(E_FLAGS_OFFSET, (?E_SHOFF_OFFSET + ?E_SHOFF_SIZE) ).
+-define(E_EHSIZE_OFFSET, (?E_FLAGS_OFFSET + ?E_FLAGS_SIZE) ).
+-define(E_PHENTSIZE_OFFSET, (?E_EHSIZE_OFFSET + ?E_EHSIZE_SIZE) ).
+-define(E_PHNUM_OFFSET, (?E_PHENTSIZE_OFFSET + ?E_PHENTSIZE_SIZE) ).
+-define(E_SHENTSIZE_OFFSET, (?E_PHNUM_OFFSET + ?E_PHNUM_SIZE) ).
+-define(E_SHNUM_OFFSET, (?E_SHENTSIZE_OFFSET + ?E_SHENTSIZE_SIZE) ).
+-define(E_SHSTRNDX_OFFSET, (?E_SHNUM_OFFSET + ?E_SHNUM_SIZE) ).
+
+%% Name aliases of File Header fields information used in get_header_field
+%% function of elf64_format module.
+-define(E_IDENT, {?E_IDENT_OFFSET, ?E_IDENT_SIZE}).
+-define(E_TYPE, {?E_TYPE_OFFSET, ?E_TYPE_SIZE}).
+-define(E_MACHINE, {?E_MACHINE_OFFSET, ?E_MACHINE_SIZE}).
+-define(E_VERSION, {?E_VERSION_OFFSET, ?E_VERSION_SIZE})
+-define(E_ENTRY, {?E_ENTRY_OFFSET, ?E_ENTRY_SIZE}).
+-define(E_PHOFF, {?E_PHOFF_OFFSET, ?E_PHOFF_SIZE}).
+-define(E_SHOFF, {?E_SHOFF_OFFSET, ?E_SHOFF_SIZE}).
+-define(E_FLAGS, {?E_FLAGS_OFFSET, ?E_FLAGS_SIZE}).
+-define(E_EHSIZE, {?E_EHSIZE_OFFSET, ?E_EHSIZE_SIZE}).
+-define(E_PHENTSIZE, {?E_PHENTSIZE_OFFSET, ?E_PHENTSIZE_SIZE}).
+-define(E_PHNUM, {?E_PHNUM_OFFSET, ?E_PHNUM_SIZE}).
+-define(E_SHENTSIZE, {?E_SHENTSIZE_OFFSET, ?E_SHENTSIZE_SIZE}).
+-define(E_SHNUM, {?E_SHNUM_OFFSET, ?E_SHNUM_SIZE}).
+-define(E_SHSTRNDX, {?E_SHSTRNDX_OFFSET, ?E_SHSTRNDX_SIZE}).
+
+%% ELF Identification (e_ident)
+-define(EI_MAG0, 0).
+-define(EI_MAG1, 1).
+-define(EI_MAG2, 2).
+-define(EI_MAG3, 3).
+-define(EI_CLASS, 4).
+-define(EI_DATA, 5).
+-define(EI_VERSION, 6).
+-define(EI_OSABI, 7).
+-define(EI_ABIVERSION, 8).
+-define(EI_PAD, 9).
+-define(EI_NIDENT, 16).
+
+%% Object File Classes (e_ident[EI_CLASS])
+-define(ELFCLASSNONE, 0).
+-define(ELFCLASS32, 1).
+-define(ELFCLASS64, 2).
+
+%% Data Encodings (e_ident[EI_DATA])
+-define(ELFDATA2LSB, 1).
+-define(ELFDATA2MSB, 2).
+
+%% Operating System and ABI Identifiers (e_ident[EI_OSABI])
+-define(ELFOSABI_SYSV, 0).
+-define(ELFOSABI_HPUX, 1).
+-define(ELFOSABI_STANDALONE, 255).
+
+%% Object File Types (e_type)
+-define(ET_NONE, 0).
+-define(ET_REL, 1).
+-define(ET_EXEC, 2).
+-define(ET_DYN, 3).
+-define(ET_CORE, 4).
+-define(ET_LOOS, 16#FE00).
+-define(ET_HIOS, 16#FEFF).
+-define(ET_LOPROC, 16#FF00).
+-define(ET_HIPROC, 16#FFFF).
+
+%%------------------------------------------------------------------------------
+%% ELF Section Header
+%%------------------------------------------------------------------------------
+-define(ELF_SHDRENTRY_SIZE, (?SH_NAME_SIZE + ?SH_TYPE_SIZE + ?SH_FLAGS_SIZE
+ +?SH_ADDR_SIZE + ?SH_OFFSET_SIZE + ?SH_SIZE_SIZE
+ +?SH_LINK_SIZE + ?SH_INFO_SIZE
+ +?SH_ADDRALIGN_SIZE + ?SH_ENTSIZE_SIZE) ).
+
+-define(SH_NAME_SIZE, ?ELF_WORD_SIZE).
+-define(SH_TYPE_SIZE, ?ELF_WORD_SIZE).
+-define(SH_FLAGS_SIZE, ?ELF_XWORD_SIZE).
+-define(SH_ADDR_SIZE, ?ELF_ADDR_SIZE).
+-define(SH_OFFSET_SIZE, ?ELF_OFF_SIZE).
+-define(SH_SIZE_SIZE, ?ELF_XWORD_SIZE).
+-define(SH_LINK_SIZE, ?ELF_WORD_SIZE).
+-define(SH_INFO_SIZE, ?ELF_WORD_SIZE).
+-define(SH_ADDRALIGN_SIZE, ?ELF_XWORD_SIZE).
+-define(SH_ENTSIZE_SIZE, ?ELF_XWORD_SIZE).
+
+%% Useful arithmetics for computing byte offsets for various fields from a
+%% Section Header Entry (erlang) binary
+-define(SH_NAME_OFFSET, 0).
+-define(SH_TYPE_OFFSET, (?SH_NAME_OFFSET + ?SH_NAME_SIZE) ).
+-define(SH_FLAGS_OFFSET, (?SH_TYPE_OFFSET + ?SH_TYPE_SIZE) ).
+-define(SH_ADDR_OFFSET, (?SH_FLAGS_OFFSET + ?SH_FLAGS_SIZE) ).
+-define(SH_OFFSET_OFFSET, (?SH_ADDR_OFFSET + ?SH_ADDR_SIZE) ).
+-define(SH_SIZE_OFFSET, (?SH_OFFSET_OFFSET + ?SH_OFFSET_SIZE) ).
+-define(SH_LINK_OFFSET, (?SH_SIZE_OFFSET + ?SH_SIZE_SIZE) ).
+-define(SH_INFO_OFFSET, (?SH_LINK_OFFSET + ?SH_LINK_SIZE) ).
+-define(SH_ADDRALIGN_OFFSET, (?SH_INFO_OFFSET + ?SH_INFO_SIZE) ).
+-define(SH_ENTSIZE_OFFSET, (?SH_ADDRALIGN_OFFSET + ?SH_ADDRALIGN_SIZE) ).
+
+%% Name aliases of Section Header Table entry information used in
+%% get_shdrtab_entry function of elf64_format module.
+-define(SH_NAME, {?SH_NAME_OFFSET, ?SH_NAME_SIZE}).
+-define(SH_TYPE, {?SH_TYPE_OFFSET, ?SH_TYPE_SIZE}).
+-define(SH_FLAGS, {?SH_FLAGS_OFFSET, ?SH_FLAGS_SIZE}).
+-define(SH_ADDR, {?SH_ADDR_OFFSET, ?SH_ADDR_SIZE}).
+-define(SH_OFFSET, {?SH_OFFSET_OFFSET, ?SH_OFFSET_SIZE}).
+-define(SH_SIZE, {?SH_SIZE_OFFSET, ?SH_SIZE_SIZE}).
+-define(SH_LINK, {?SH_LINK_OFFSET, ?SH_LINK_SIZE}).
+-define(SH_INFO, {?SH_INFO_OFFSET, ?SH_INFO_SIZE}).
+-define(SH_ADDRALIGN, {?SH_ADDRALIGN_OFFSET, ?SH_ADDRALIGN_SIZE}).
+-define(SH_ENTSIZE, {?SH_ENTSIZE_OFFSET, ?SH_ENTSIZE_SIZE}).
+
+%% Section Indices
+-define(SHN_UNDEF, 0).
+-define(SHN_LOPROC, 16#FF00).
+-define(SHN_HIPROC, 16#FF1F).
+-define(SHN_LOOS, 16#FF20).
+-define(SHN_HIOS, 16#FF3F).
+-define(SHN_ABS, 16#FFF1).
+-define(SHN_COMMON, 16#FFF2).
+
+%% Section Types (sh_type)
+-define(SHT_NULL, 0).
+-define(SHT_PROGBITS, 1).
+-define(SHT_SYMTAB, 2).
+-define(SHT_STRTAB, 3).
+-define(SHT_RELA, 4).
+-define(SHT_HASH, 5).
+-define(SHT_DYNAMIC, 6).
+-define(SHT_NOTE, 7).
+-define(SHT_NOBITS, 8).
+-define(SHT_REL, 9).
+-define(SHT_SHLIB, 10).
+-define(SHT_DYNSYM, 11).
+-define(SHT_LOOS, 16#60000000).
+-define(SHT_HIOS, 16#6FFFFFFF).
+-define(SHT_LOPROC, 16#70000000).
+-define(SHT_HIPROC, 16#7FFFFFFF).
+
+%% Section Attributes (sh_flags)
+-define(SHF_WRITE, 16#1).
+-define(SHF_ALLOC, 16#2).
+-define(SHF_EXECINSTR, 16#4).
+-define(SHF_MASKOS, 16#0F000000).
+-define(SHF_MASKPROC, 16#F0000000).
+
+%%
+%% Standard Section names for Code and Data
+%%
+-define(BSS, ".bss").
+-define(DATA, ".data").
+-define(INTERP, ".interp").
+-define(RODATA, ".rodata").
+-define(TEXT, ".text").
+%% Other Standard Section names
+-define(COMMENT, ".comment").
+-define(DYNAMIC, ".dynamic").
+-define(DYNSTR, ".dynstr").
+-define(GOT, ".got").
+-define(HASH, ".hash").
+-define(NOTE(Name), (".note" ++ Name)).
+-define(PLT, ".plt").
+-define(REL(Name), (".rel" ++ Name) ).
+-define(RELA(Name), (".rela" ++ Name) ).
+-define(SHSTRTAB, ".shstrtab").
+-define(STRTAB, ".strtab").
+-define(SYMTAB, ".symtab").
+-define(GCC_EXN_TAB, ".gcc_except_table").
+
+%%------------------------------------------------------------------------------
+%% ELF Symbol Table Entries
+%%------------------------------------------------------------------------------
+-define(ELF_SYM_SIZE, (?ST_NAME_SIZE + ?ST_INFO_SIZE + ?ST_OTHER_SIZE
+ +?ST_SHNDX_SIZE + ?ST_VALUE_SIZE + ?ST_SIZE_SIZE) ).
+
+-define(ST_NAME_SIZE, ?ELF_WORD_SIZE).
+-define(ST_INFO_SIZE, ?ELF_UNSIGNED_CHAR_SIZE).
+-define(ST_OTHER_SIZE, ?ELF_UNSIGNED_CHAR_SIZE).
+-define(ST_SHNDX_SIZE, ?ELF_HALF_SIZE).
+-define(ST_VALUE_SIZE, ?ELF_ADDR_SIZE).
+-define(ST_SIZE_SIZE, ?ELF_XWORD_SIZE).
+
+%% Precomputed offset for Symbol Table entries in SymTab binary
+%%XXX: Included in either elf32_format or elf64_format.
+
+%% Name aliases for Symbol Table entry information
+-define(ST_NAME, {?ST_NAME_OFFSET, ?ST_NAME_SIZE}).
+-define(ST_INFO, {?ST_INFO_OFFSET, ?ST_INFO_SIZE}).
+-define(ST_OTHER, {?ST_OTHER_OFFSET, ?ST_OTHER_SIZE}).
+-define(ST_SHNDX, {?ST_SHNDX_OFFSET, ?ST_SHNDX_SIZE}).
+-define(ST_VALUE, {?ST_VALUE_OFFSET, ?ST_VALUE_SIZE}).
+-define(ST_SIZE, {?ST_SIZE_OFFSET, ?ST_SIZE_SIZE}).
+
+%% Macros to extract information from st_type
+-define(ELF_ST_BIND(I), (I bsr 4) ).
+-define(ELF_ST_TYPE(I), (I band 16#f) ).
+-define(ELF_ST_INFO(B,T), (B bsl 4 + T band 16#f) ).
+
+%% Symbol Bindings
+-define(STB_LOCAL, 0).
+-define(STB_GLOBAL, 1).
+-define(STB_WEAK, 2).
+-define(STB_LOOS, 10).
+-define(STB_HIOS, 12).
+-define(STB_LOPROC, 13).
+-define(STB_HIPROC, 15).
+
+%% Symbol Types
+-define(STT_NOTYPE, 0).
+-define(STT_OBJECT, 1).
+-define(STT_FUNC, 2).
+-define(STT_SECTION, 3).
+-define(STT_FILE, 4).
+-define(STT_LOOS, 10).
+-define(STT_HIOS, 12).
+-define(STT_LOPROC, 13).
+-define(STT_HIPROC, 15).
+
+%%------------------------------------------------------------------------------
+%% ELF Relocation Entries
+%%------------------------------------------------------------------------------
+-define(ELF_REL_SIZE, (?R_OFFSET_SIZE + ?R_INFO_SIZE) ).
+-define(ELF_RELA_SIZE, (?R_OFFSET_SIZE + ?R_INFO_SIZE + ?R_ADDEND_SIZE) ).
+
+-define(R_OFFSET_SIZE, ?ELF_ADDR_SIZE).
+-define(R_INFO_SIZE, ?ELF_XWORD_SIZE).
+-define(R_ADDEND_SIZE, ?ELF_SXWORD_SIZE).
+
+%% Arithmetics for computing byte offsets in a Relocation entry binary
+-define(R_OFFSET_OFFSET, 0).
+-define(R_INFO_OFFSET, (?R_OFFSET_OFFSET + ?R_OFFSET_SIZE) ).
+-define(R_ADDEND_OFFSET, (?R_INFO_OFFSET + ?R_INFO_SIZE) ).
+
+%% Name aliases for Relocation field information
+-define(R_OFFSET, {?R_OFFSET_OFFSET, ?R_OFFSET_SIZE}).
+-define(R_INFO, {?R_INFO_OFFSET, ?R_INFO_SIZE}).
+-define(R_ADDEND, {?R_ADDEND_OFFSET, ?R_ADDEND_SIZE}).
+
+%% Useful macros to extract information from r_info field
+%%XXX: Included in either elf32_format or elf64_format.
+
+%%------------------------------------------------------------------------------
+%% ELF Program Header Table
+%%------------------------------------------------------------------------------
+-define(ELF_PHDR_SIZE, (?P_TYPE_SIZE + ?P_FLAGS_SIZE + ?P_OFFSET_SIZE
+ +?P_VADDR_SIZE + ?P_PADDR_SIZE + ?P_FILESZ_SIZE
+ +?P_MEMSZ_SIZE + ?P_ALIGN_SIZE) ).
+
+-define(P_TYPE_SIZE, ?ELF_WORD_SIZE).
+-define(P_FLAGS_SIZE, ?ELF_WORD_SIZE).
+-define(P_OFFSET_SIZE, ?ELF_OFF_SIZE).
+-define(P_VADDR_SIZE, ?ELF_ADDR_SIZE).
+-define(P_PADDR_SIZE, ?ELF_ADDR_SIZE).
+-define(P_FILESZ_SIZE, ?ELF_XWORD_SIZE).
+-define(P_MEMSZ_SIZE, ?ELF_XWORD_SIZE).
+-define(P_ALIGN_SIZE, ?ELF_XWORD_SIZE).
+
+%% Offsets of various fields in a Program Header Table entry binary.
+%%XXX: Included in either elf32_format or elf64_format.
+
+%% Name aliases for each Program Header Table entry field information.
+-define(P_TYPE, {?P_TYPE_OFFSET, ?P_TYPE_SIZE} ).
+-define(P_FLAGS, {?P_FLAGS_OFFSET, ?P_FLAGS_SIZE} ).
+-define(P_OFFSET, {?P_OFFSET_OFFSET, ?P_OFFSET_SIZE} ).
+-define(P_VADDR, {?P_VADDR_OFFSET, ?P_VADDR_SIZE} ).
+-define(P_PADDR, {?P_PADDR_OFFSET, ?P_PADDR_SIZE} ).
+-define(P_FILESZ, {?P_FILESZ_OFFSET, ?P_FILESZ_SIZE} ).
+-define(P_MEMSZ, {?P_MEMSZ_OFFSET, ?P_MEMSZ_SIZE} ).
+-define(P_ALIGN, {?P_ALIGN_OFFSET, ?P_ALIGN_SIZE} ).
+
+%% Segment Types (p_type)
+-define(PT_NULL, 0).
+-define(PT_LOAD, 1).
+-define(PT_DYNAMIC, 2).
+-define(PT_INTERP, 3).
+-define(PT_NOTE, 4).
+-define(PT_SHLIB, 5).
+-define(PT_PHDR, 6).
+-define(PT_LOOS, 16#60000000).
+-define(PT_HIOS, 16#6FFFFFFF).
+-define(PT_LOPROC, 16#70000000).
+-define(PT_HIPROC, 16#7FFFFFFF).
+
+%% Segment Attributes (p_flags)
+-define(PF_X, 16#1).
+-define(PF_W, 16#2).
+-define(PF_R, 16#4).
+-define(PF_MASKOS, 16#00FF0000).
+-define(PF_MASKPROC, 16#FF000000).
+
+%%------------------------------------------------------------------------------
+%% ELF Dynamic Table
+%%------------------------------------------------------------------------------
+-define(ELF_DYN_SIZE, (?D_TAG_SIZE + ?D_VAL_PTR_SIZE) ).
+
+-define(D_TAG_SIZE, ?ELF_SXWORD_SIZE).
+-define(D_VAL_PTR_SIZE, ?ELF_ADDR_SIZE).
+
+%% Offsets of each field in Dynamic Table entry in binary
+-define(D_TAG_OFFSET, 0).
+-define(D_VAL_PTR_OFFSET, (?D_TAG_OFFSET + ?D_TAG_SIZE)).
+
+%% Name aliases for each field of a Dynamic Table entry information
+-define(D_TAG, {?D_TAG_OFFSET, ?D_TAG_SIZE} ).
+-define(D_VAL_PTR, {?D_VAL_PTR_OFFSET, ?D_VAL_PTR_SIZE} ).
+
+%% Dynamic Table Entries
+-define(DT_NULL, 0).
+-define(DT_NEEDED, 1).
+-define(DT_PLTRELSZ, 2).
+-define(DT_PLTGOT, 3).
+-define(DT_HASH, 4).
+-define(DT_STRTAB, 5).
+-define(DT_SYMTAB, 6).
+-define(DT_RELA, 7).
+-define(DT_RELASZ, 8).
+-define(DT_RELAENT, 9).
+-define(DT_STRSZ, 10).
+-define(DT_SYMENT, 11).
+-define(DT_INIT, 12).
+-define(DT_FINI, 13).
+-define(DT_SONAME, 14).
+-define(DT_RPATH, 15).
+-define(DT_SYMBOLIC, 16).
+-define(DT_REL, 17).
+-define(DT_RELSZ, 18).
+-define(DT_RELENT, 19).
+-define(DT_PLTREL, 20).
+-define(DT_DEBUG, 21).
+-define(DT_TEXTREL, 22).
+-define(DT_JMPREL, 23).
+-define(DT_BIND_NOW, 24).
+-define(DT_INIT_ARRAY, 25).
+-define(DT_FINI_ARRAY, 26).
+-define(DT_INIT_ARRAYSZ, 27).
+-define(DT_FINI_ARRAYSZ, 28).
+-define(DT_LOOS, 16#60000000).
+-define(DT_HIOS, 16#6FFFFFFF).
+-define(DT_LOPROC, 16#700000000).
+-define(DT_HIPROC, 16#7FFFFFFFF).
+
+%%------------------------------------------------------------------------------
+%% ELF GCC Exception Table
+%%------------------------------------------------------------------------------
+
+%% The DWARF Exception Header Encoding is used to describe the type of data used
+%% in the .eh_frame_hdr (and .gcc_except_table) section. The upper 4 bits
+%% indicate how the value is to be applied. The lower 4 bits indicate the format
+%% of the data.
+
+%% DWARF Exception Header value format
+-define(DW_EH_PE_omit, 16#ff). % No value is present.
+-define(DW_EH_PE_uleb128, 16#01). % Unsigned value encoded using LEB128.
+-define(DW_EH_PE_udata2, 16#02). % A 2 bytes unsigned value.
+-define(DW_EH_PE_udata4, 16#03). % A 4 bytes unsigned value.
+-define(DW_EH_PE_udata8, 16#04). % An 8 bytes unsigned value.
+-define(DW_EH_PE_sleb128, 16#09). % Signed value encoded using LEB128.
+-define(DW_EH_PE_sdata2, 16#0a). % A 2 bytes signed value.
+-define(DW_EH_PE_sdata4, 16#0b). % A 4 bytes signed value.
+-define(DW_EH_PE_sdata8, 16#0c). % An 8 bytes signed value.
+
+%% DWARF Exception Header application
+-define(DW_EH_PE_absptr, 16#00). % Value is used with no modification.
+-define(DW_EH_PE_pcrel, 16#10). % Value is relative to the current PC.
+-define(DW_EH_PE_datarel, 16#30). % Value is relative to the beginning of the
+ % section.
+
+%%------------------------------------------------------------------------------
+%% ELF Read-only data (constants, literlas etc.)
+%%------------------------------------------------------------------------------
+-define(RO_ENTRY_SIZE, 8).
+
+%%------------------------------------------------------------------------------
+%% Custom Note section: ".note.gc" for Erlang GC
+%%------------------------------------------------------------------------------
+
+%% The structure of this section is the following:
+%%
+%% .short <n> # number of safe points in code
+%%
+%% .long .L<label1> # safe point address |
+%% .long .L<label2> # safe point address |-> safe point addrs
+%% ..... |
+%% .long .L<label3> # safe point address |
+%%
+%% .short <n> # stack frame size (in words) |-> fixed-size part
+%% .short <n> # stack arity |
+%% .short <n> # number of live roots that follow |
+%%
+%% .short <n> # live root's stack index |
+%% ..... |-> live root indices
+%% .short <n> # >> |
+
+%% The name of the custom Note Section
+-define(NOTE_ERLGC_NAME, ".gc").
+
+%% The first word of a Note Section for Erlang GC (".note.gc") is always the
+%% number of safepoints in code.
+-define(SP_COUNT, {?SP_COUNT_OFFSET, ?SP_COUNT_SIZE}).
+-define(SP_COUNT_SIZE, ?ELF_HALF_SIZE).
+-define(SP_COUNT_OFFSET, 0). %(always the first entry in sdesc)
+
+%% The fixed-size part of a safe point (SP) entry consists of 4 words: the SP
+%% address (offset in code), the stack frame size of the function (where the SP
+%% is located), the stack arity of the function (the registered values are *not*
+%% counted), the number of live roots in the specific SP.
+-define(SP_FIXED, {?SP_FIXED_OFF, ?SP_FIXED_SIZE}).
+-define(SP_FIXED_OFF, 0).
+%%XXX: Exclude SP_ADDR_SIZE from SP_FIXED_SIZE in lew of new GC layout
+-define(SP_FIXED_SIZE, (?SP_STKFRAME_SIZE + ?SP_STKARITY_SIZE
+ + ?SP_LIVEROOTCNT_SIZE)).
+
+-define(SP_ADDR_SIZE, ?ELF_WORD_SIZE).
+-define(SP_STKFRAME_SIZE, ?ELF_HALF_SIZE).
+-define(SP_STKARITY_SIZE, ?ELF_HALF_SIZE).
+-define(SP_LIVEROOTCNT_SIZE, ?ELF_HALF_SIZE).
+
+%%XXX: SP_STKFRAME is the first piece of information in the new GC layout
+-define(SP_STKFRAME_OFFSET, 0).
+-define(SP_STKARITY_OFFSET, (?SP_STKFRAME_OFFSET + ?SP_STKFRAME_SIZE) ).
+-define(SP_LIVEROOTCNT_OFFSET, (?SP_STKARITY_OFFSET + ?SP_STKARITY_SIZE) ).
+
+%% Name aliases for safepoint fields.
+-define(SP_STKFRAME, {?SP_STKFRAME_OFFSET, ?SP_STKFRAME_SIZE}).
+-define(SP_STKARITY, {?SP_STKARITY_OFFSET, ?SP_STKARITY_SIZE}).
+-define(SP_LIVEROOTCNT, {?SP_LIVEROOTCNT_OFFSET, ?SP_LIVEROOTCNT_SIZE}).
+
+%% After the fixed-size part a variable-size part exists. This part holds the
+%% stack frame index of every live root in the specific SP.
+-define(LR_STKINDEX_SIZE, ?ELF_HALF_SIZE).
+
+%%------------------------------------------------------------------------------
+%% Misc.
+%%------------------------------------------------------------------------------
+-define(bits(Bytes), ((Bytes) bsl 3)).
diff --git a/lib/hipe/llvm/hipe_llvm.erl b/lib/hipe/llvm/hipe_llvm.erl
new file mode 100644
index 0000000000..5e33731a2b
--- /dev/null
+++ b/lib/hipe/llvm/hipe_llvm.erl
@@ -0,0 +1,1131 @@
+%% -*- erlang-indent-level: 2 -*-
+
+-module(hipe_llvm).
+
+-export([
+ mk_ret/1,
+ ret_ret_list/1,
+
+ mk_br/1,
+ br_dst/1,
+
+ mk_br_cond/3,
+ mk_br_cond/4,
+ br_cond_cond/1,
+ br_cond_true_label/1,
+ br_cond_false_label/1,
+ br_cond_meta/1,
+
+ mk_indirectbr/3,
+ indirectbr_type/1,
+ indirectbr_address/1,
+ indirectbr_label_list/1,
+
+ mk_switch/4,
+ switch_type/1,
+ switch_value/1,
+ switch_default_label/1,
+ switch_value_label_list/1,
+
+ mk_invoke/9,
+ invoke_dst/1,
+ invoke_cconv/1,
+ invoke_ret_attrs/1,
+ invoke_type/1,
+ invoke_fnptrval/1,
+ invoke_arglist/1,
+ invoke_fn_attrs/1,
+ invoke_to_label/1,
+ invoke_unwind_label/1,
+
+ mk_operation/6,
+ operation_dst/1,
+ operation_op/1,
+ operation_type/1,
+ operation_src1/1,
+ operation_src2/1,
+ operation_options/1,
+
+ mk_extractvalue/5,
+ extractvalue_dst/1,
+ extractvalue_type/1,
+ extractvalue_val/1,
+ extractvalue_idx/1,
+ extractvalue_idxs/1,
+
+ mk_insertvalue/7,
+ insertvalue_dst/1,
+ insertvalue_val_type/1,
+ insertvalue_val/1,
+ insertvalue_elem_type/1,
+ insertvalue_elem/1,
+ insertvalue_idx/1,
+ insertvalue_idxs/1,
+
+ mk_alloca/4,
+ alloca_dst/1,
+ alloca_type/1,
+ alloca_num/1,
+ alloca_align/1,
+
+ mk_load/6,
+ load_dst/1,
+ load_p_type/1,
+ load_pointer/1,
+ load_alignment/1,
+ load_nontemporal/1,
+ load_volatile/1,
+
+ mk_store/7,
+ store_type/1,
+ store_value/1,
+ store_p_type/1,
+ store_pointer/1,
+ store_alignment/1,
+ store_nontemporal/1,
+ store_volatile/1,
+
+ mk_getelementptr/5,
+ getelementptr_dst/1,
+ getelementptr_p_type/1,
+ getelementptr_value/1,
+ getelementptr_typed_idxs/1,
+ getelementptr_inbounds/1,
+
+ mk_conversion/5,
+ conversion_dst/1,
+ conversion_op/1,
+ conversion_src_type/1,
+ conversion_src/1,
+ conversion_dst_type/1,
+
+ mk_sitofp/4,
+ sitofp_dst/1,
+ sitofp_src_type/1,
+ sitofp_src/1,
+ sitofp_dst_type/1,
+
+ mk_ptrtoint/4,
+ ptrtoint_dst/1,
+ ptrtoint_src_type/1,
+ ptrtoint_src/1,
+ ptrtoint_dst_type/1,
+
+ mk_inttoptr/4,
+ inttoptr_dst/1,
+ inttoptr_src_type/1,
+ inttoptr_src/1,
+ inttoptr_dst_type/1,
+
+ mk_icmp/5,
+ icmp_dst/1,
+ icmp_cond/1,
+ icmp_type/1,
+ icmp_src1/1,
+ icmp_src2/1,
+
+ mk_fcmp/5,
+ fcmp_dst/1,
+ fcmp_cond/1,
+ fcmp_type/1,
+ fcmp_src1/1,
+ fcmp_src2/1,
+
+ mk_phi/3,
+ phi_dst/1,
+ phi_type/1,
+ phi_value_label_list/1,
+
+ mk_select/6,
+ select_dst/1,
+ select_cond/1,
+ select_typ1/1,
+ select_val1/1,
+ select_typ2/1,
+ select_val2/1,
+
+ mk_call/8,
+ call_dst/1,
+ call_is_tail/1,
+ call_cconv/1,
+ call_ret_attrs/1,
+ call_type/1,
+ call_fnptrval/1,
+ call_arglist/1,
+ call_fn_attrs/1,
+
+ mk_fun_def/10,
+ fun_def_linkage/1,
+ fun_def_visibility/1,
+ fun_def_cconv/1,
+ fun_def_ret_attrs/1,
+ fun_def_type/1,
+ fun_def_name/1,
+ fun_def_arglist/1,
+ fun_def_fn_attrs/1,
+ fun_def_align/1,
+ fun_def_body/1,
+
+ mk_fun_decl/8,
+ fun_decl_linkage/1,
+ fun_decl_visibility/1,
+ fun_decl_cconv/1,
+ fun_decl_ret_attrs/1,
+ fun_decl_type/1,
+ fun_decl_name/1,
+ fun_decl_arglist/1,
+ fun_decl_align/1,
+
+ mk_landingpad/0,
+
+ mk_comment/1,
+ comment_text/1,
+
+ mk_label/1,
+ label_label/1,
+ is_label/1,
+
+ mk_const_decl/4,
+ const_decl_dst/1,
+ const_decl_decl_type/1,
+ const_decl_type/1,
+ const_decl_value/1,
+
+ mk_asm/1,
+ asm_instruction/1,
+
+ mk_adj_stack/3,
+ adj_stack_offset/1,
+ adj_stack_register/1,
+ adj_stack_type/1,
+
+ mk_branch_meta/3,
+ branch_meta_id/1,
+ branch_meta_true_weight/1,
+ branch_meta_false_weight/1
+ ]).
+
+-export([
+ mk_void/0,
+
+ mk_label_type/0,
+
+ mk_int/1,
+ int_width/1,
+
+ mk_double/0,
+
+ mk_pointer/1,
+ pointer_type/1,
+
+ mk_array/2,
+ array_size/1,
+ array_type/1,
+
+ mk_vector/2,
+ vector_size/1,
+ vector_type/1,
+
+ mk_struct/1,
+ struct_type_list/1,
+
+ mk_fun/2,
+ function_ret_type/1,
+ function_arg_type_list/1
+ ]).
+
+-export([pp_ins_list/2, pp_ins/2]).
+
+
+%%-----------------------------------------------------------------------------
+%% Abstract Data Types for LLVM Assembly.
+%%-----------------------------------------------------------------------------
+
+%% Terminator Instructions
+-record(llvm_ret, {ret_list=[]}).
+-type llvm_ret() :: #llvm_ret{}.
+
+-record(llvm_br, {dst}).
+-type llvm_br() :: #llvm_br{}.
+
+-record(llvm_br_cond, {'cond', true_label, false_label, meta=[]}).
+-type llvm_br_cond() :: #llvm_br_cond{}.
+
+-record(llvm_indirectbr, {type, address, label_list}).
+-type llvm_indirectbr() :: #llvm_indirectbr{}.
+
+-record(llvm_switch, {type, value, default_label, value_label_list=[]}).
+-type llvm_switch() :: #llvm_switch{}.
+
+-record(llvm_invoke, {dst, cconv=[], ret_attrs=[], type, fnptrval, arglist=[],
+ fn_attrs=[], to_label, unwind_label}).
+-type llvm_invoke() :: #llvm_invoke{}.
+
+%% Binary Operations
+-record(llvm_operation, {dst, op, type, src1, src2, options=[]}).
+-type llvm_operation() :: #llvm_operation{}.
+
+%% Aggregate Operations
+-record(llvm_extractvalue, {dst, type, val, idx, idxs=[]}).
+-type llvm_extractvalue() :: #llvm_extractvalue{}.
+
+-record(llvm_insertvalue, {dst, val_type, val, elem_type, elem, idx, idxs=[]}).
+-type llvm_insertvalue() :: #llvm_insertvalue{}.
+
+%% Memory Access and Addressing Operations
+-record(llvm_alloca, {dst, type, num=[], align=[]}).
+-type llvm_alloca() :: #llvm_alloca{}.
+
+-record(llvm_load, {dst, p_type, pointer, alignment=[], nontemporal=[],
+ volatile=false}).
+-type llvm_load() :: #llvm_load{}.
+
+-record(llvm_store, {type, value, p_type, pointer, alignment=[],
+ nontemporal=[], volatile=false}).
+-type llvm_store() :: #llvm_store{}.
+
+-record(llvm_getelementptr, {dst, p_type, value, typed_idxs, inbounds}).
+-type llvm_getelementptr() :: #llvm_getelementptr{}.
+
+%% Conversion Operations
+-record(llvm_conversion, {dst, op, src_type, src, dst_type}).
+-type llvm_conversion() :: #llvm_conversion{}.
+
+-record(llvm_sitofp, {dst, src_type, src, dst_type}).
+-type llvm_sitofp() :: #llvm_sitofp{}.
+
+-record(llvm_ptrtoint, {dst, src_type, src, dst_type}).
+-type llvm_ptrtoint() :: #llvm_ptrtoint{}.
+
+-record(llvm_inttoptr, {dst, src_type, src, dst_type}).
+-type llvm_inttoptr() :: #llvm_inttoptr{}.
+
+%% Other Operations
+-record(llvm_icmp, {dst, 'cond', type, src1, src2}).
+-type llvm_icmp() :: #llvm_icmp{}.
+
+-record(llvm_fcmp, {dst, 'cond', type, src1, src2}).
+-type llvm_fcmp() :: #llvm_fcmp{}.
+
+-record(llvm_phi, {dst, type, value_label_list}).
+-type llvm_phi() :: #llvm_phi{}.
+
+-record(llvm_select, {dst, 'cond', typ1, val1, typ2, val2}).
+-type llvm_select() :: #llvm_select{}.
+
+-record(llvm_call, {dst=[], is_tail = false, cconv = [], ret_attrs = [], type,
+ fnptrval, arglist = [], fn_attrs = []}).
+-type llvm_call() :: #llvm_call{}.
+
+-record(llvm_fun_def, {linkage=[], visibility=[], cconv=[], ret_attrs=[],
+ type, 'name', arglist=[], fn_attrs=[], align=[], body=[]}).
+-type llvm_fun_def() :: #llvm_fun_def{}.
+
+-record(llvm_fun_decl, {linkage=[], visibility=[], cconv=[], ret_attrs=[],
+ type, 'name', arglist=[], align=[]}).
+-type llvm_fun_decl() :: #llvm_fun_decl{}.
+
+-record(llvm_landingpad, {}).
+-type llvm_landingpad() :: #llvm_landingpad{}.
+
+-record(llvm_comment, {text}).
+-type llvm_comment() :: #llvm_comment{}.
+
+-record(llvm_label, {label}).
+-type llvm_label() :: #llvm_label{}.
+
+-record(llvm_const_decl, {dst, decl_type, type, value}).
+-type llvm_const_decl() :: #llvm_const_decl{}.
+
+-record(llvm_asm, {instruction}).
+-type llvm_asm() :: #llvm_asm{}.
+
+-record(llvm_adj_stack, {offset, 'register', type}).
+-type llvm_adj_stack() :: #llvm_adj_stack{}.
+
+-record(llvm_branch_meta, {id, true_weight, false_weight}).
+-type llvm_branch_meta() :: #llvm_branch_meta{}.
+
+%% A type for any LLVM instruction
+-type llvm_instr() :: llvm_ret() | llvm_br() | llvm_br_cond()
+ | llvm_indirectbr() | llvm_switch() | llvm_invoke()
+ | llvm_operation() | llvm_extractvalue()
+ | llvm_insertvalue() | llvm_alloca() | llvm_load()
+ | llvm_store() | llvm_getelementptr() | llvm_conversion()
+ | llvm_sitofp() | llvm_ptrtoint() | llvm_inttoptr()
+ | llvm_icmp() | llvm_fcmp() | llvm_phi() | llvm_select()
+ | llvm_call() | llvm_fun_def() | llvm_fun_decl()
+ | llvm_landingpad() | llvm_comment() | llvm_label()
+ | llvm_const_decl() | llvm_asm() | llvm_adj_stack()
+ | llvm_branch_meta().
+
+%% Types
+-record(llvm_void, {}).
+%-type llvm_void() :: #llvm_void{}.
+
+-record(llvm_label_type, {}).
+%-type llvm_label_type() :: #llvm_label_type{}.
+
+-record(llvm_int, {width}).
+%-type llvm_int() :: #llvm_int{}.
+
+-record(llvm_float, {}).
+%-type llvm_float() :: #llvm_float{}.
+
+-record(llvm_double, {}).
+%-type llvm_double() :: #llvm_double{}.
+
+-record(llvm_fp80, {}).
+%-type llvm_fp80() :: #llvm_fp80{}.
+
+-record(llvm_fp128, {}).
+%-type llvm_fp128() :: #llvm_fp128{}.
+
+-record(llvm_ppc_fp128, {}).
+%-type llvm_ppc_fp128() :: #llvm_ppc_fp128{}.
+
+-record(llvm_pointer, {type}).
+%-type llvm_pointer() :: #llvm_pointer{}.
+
+-record(llvm_vector, {'size', type}).
+%-type llvm_vector() :: #llvm_vector{}.
+
+-record(llvm_struct, {type_list}).
+%-type llvm_struct() :: #llvm_struct{}.
+
+-record(llvm_array, {'size', type}).
+%-type llvm_array() :: #llvm_array{}.
+
+-record(llvm_fun, {ret_type, arg_type_list}).
+%-type llvm_fun() :: #llvm_fun{}.
+
+%%-----------------------------------------------------------------------------
+%% Accessor Functions
+%%-----------------------------------------------------------------------------
+
+%% ret
+mk_ret(Ret_list) -> #llvm_ret{ret_list=Ret_list}.
+ret_ret_list(#llvm_ret{ret_list=Ret_list}) -> Ret_list.
+
+%% br
+mk_br(Dst) -> #llvm_br{dst=Dst}.
+br_dst(#llvm_br{dst=Dst}) -> Dst.
+
+%% br_cond
+mk_br_cond(Cond, True_label, False_label) ->
+ #llvm_br_cond{'cond'=Cond, true_label=True_label, false_label=False_label}.
+mk_br_cond(Cond, True_label, False_label, Metadata) ->
+ #llvm_br_cond{'cond'=Cond, true_label=True_label, false_label=False_label,
+ meta=Metadata}.
+br_cond_cond(#llvm_br_cond{'cond'=Cond}) -> Cond.
+br_cond_true_label(#llvm_br_cond{true_label=True_label}) -> True_label.
+br_cond_false_label(#llvm_br_cond{false_label=False_label}) ->
+ False_label.
+br_cond_meta(#llvm_br_cond{meta=Metadata}) -> Metadata.
+
+%% indirectbr
+mk_indirectbr(Type, Address, Label_list) -> #llvm_indirectbr{type=Type, address=Address, label_list=Label_list}.
+indirectbr_type(#llvm_indirectbr{type=Type}) -> Type.
+indirectbr_address(#llvm_indirectbr{address=Address}) -> Address.
+indirectbr_label_list(#llvm_indirectbr{label_list=Label_list}) -> Label_list.
+
+%% invoke
+mk_invoke(Dst, Cconv, Ret_attrs, Type, Fnptrval, Arglist, Fn_attrs, To_label, Unwind_label) ->
+ #llvm_invoke{dst=Dst, cconv=Cconv, ret_attrs=Ret_attrs, type=Type,
+ fnptrval=Fnptrval, arglist=Arglist, fn_attrs=Fn_attrs, to_label=To_label,
+ unwind_label=Unwind_label}.
+invoke_dst(#llvm_invoke{dst=Dst}) -> Dst.
+invoke_cconv(#llvm_invoke{cconv=Cconv}) -> Cconv.
+invoke_ret_attrs(#llvm_invoke{ret_attrs=Ret_attrs}) -> Ret_attrs.
+invoke_type(#llvm_invoke{type=Type}) -> Type.
+invoke_fnptrval(#llvm_invoke{fnptrval=Fnptrval}) -> Fnptrval.
+invoke_arglist(#llvm_invoke{arglist=Arglist}) -> Arglist.
+invoke_fn_attrs(#llvm_invoke{fn_attrs=Fn_attrs}) -> Fn_attrs.
+invoke_to_label(#llvm_invoke{to_label=To_label}) -> To_label.
+invoke_unwind_label(#llvm_invoke{unwind_label=Unwind_label}) -> Unwind_label.
+
+%% switch
+mk_switch(Type, Value, Default_label, Value_label_list) ->
+ #llvm_switch{type=Type, value=Value, default_label=Default_label,
+ value_label_list=Value_label_list}.
+switch_type(#llvm_switch{type=Type}) -> Type.
+switch_value(#llvm_switch{value=Value}) -> Value.
+switch_default_label(#llvm_switch{default_label=Default_label}) ->
+ Default_label.
+switch_value_label_list(#llvm_switch{value_label_list=Value_label_list}) ->
+ Value_label_list.
+
+%% operation
+mk_operation(Dst, Op, Type, Src1, Src2, Options) ->
+ #llvm_operation{dst=Dst, op=Op, type=Type, src1=Src1, src2=Src2,
+ options=Options}.
+operation_dst(#llvm_operation{dst=Dst}) -> Dst.
+operation_op(#llvm_operation{op=Op}) -> Op.
+operation_type(#llvm_operation{type=Type}) -> Type.
+operation_src1(#llvm_operation{src1=Src1}) -> Src1.
+operation_src2(#llvm_operation{src2=Src2}) -> Src2.
+operation_options(#llvm_operation{options=Options}) -> Options.
+
+%% extractvalue
+mk_extractvalue(Dst, Type, Val, Idx, Idxs) ->
+ #llvm_extractvalue{dst=Dst,type=Type,val=Val,idx=Idx,idxs=Idxs}.
+extractvalue_dst(#llvm_extractvalue{dst=Dst}) -> Dst.
+extractvalue_type(#llvm_extractvalue{type=Type}) -> Type.
+extractvalue_val(#llvm_extractvalue{val=Val}) -> Val.
+extractvalue_idx(#llvm_extractvalue{idx=Idx}) -> Idx.
+extractvalue_idxs(#llvm_extractvalue{idxs=Idxs}) -> Idxs.
+
+%% insertvalue
+mk_insertvalue(Dst, Val_type, Val, Elem_type, Elem, Idx, Idxs) ->
+ #llvm_insertvalue{dst=Dst, val_type=Val_type, val=Val, elem_type=Elem_type,
+ elem=Elem, idx=Idx, idxs=Idxs}.
+insertvalue_dst(#llvm_insertvalue{dst=Dst}) -> Dst.
+insertvalue_val_type(#llvm_insertvalue{val_type=Val_type}) -> Val_type.
+insertvalue_val(#llvm_insertvalue{val=Val}) -> Val.
+insertvalue_elem_type(#llvm_insertvalue{elem_type=Elem_type}) -> Elem_type.
+insertvalue_elem(#llvm_insertvalue{elem=Elem}) -> Elem.
+insertvalue_idx(#llvm_insertvalue{idx=Idx}) -> Idx.
+insertvalue_idxs(#llvm_insertvalue{idxs=Idxs}) -> Idxs.
+
+%% alloca
+mk_alloca(Dst, Type, Num, Align) ->
+ #llvm_alloca{dst=Dst, type=Type, num=Num, align=Align}.
+alloca_dst(#llvm_alloca{dst=Dst}) -> Dst.
+alloca_type(#llvm_alloca{type=Type}) -> Type.
+alloca_num(#llvm_alloca{num=Num}) -> Num.
+alloca_align(#llvm_alloca{align=Align}) -> Align.
+
+%% load
+mk_load(Dst, Type, Pointer, Alignment, Nontemporal, Volatile) ->
+ #llvm_load{dst=Dst, p_type=Type, pointer=Pointer, alignment=Alignment,
+ nontemporal=Nontemporal, volatile=Volatile}.
+load_dst(#llvm_load{dst=Dst}) -> Dst.
+load_p_type(#llvm_load{p_type=Type}) -> Type.
+load_pointer(#llvm_load{pointer=Pointer}) -> Pointer.
+load_alignment(#llvm_load{alignment=Alignment}) -> Alignment.
+load_nontemporal(#llvm_load{nontemporal=Nontemporal}) -> Nontemporal.
+load_volatile(#llvm_load{volatile=Volatile}) -> Volatile.
+
+%% store
+mk_store(Type, Value, P_Type, Pointer, Alignment, Nontemporal, Volatile) ->
+ #llvm_store{type=Type, value=Value, p_type=P_Type, pointer=Pointer, alignment=Alignment,
+ nontemporal=Nontemporal, volatile=Volatile}.
+store_type(#llvm_store{type=Type}) -> Type.
+store_value(#llvm_store{value=Value}) -> Value.
+store_p_type(#llvm_store{p_type=P_Type}) -> P_Type.
+store_pointer(#llvm_store{pointer=Pointer}) -> Pointer.
+store_alignment(#llvm_store{alignment=Alignment}) -> Alignment.
+store_nontemporal(#llvm_store{nontemporal=Nontemporal}) -> Nontemporal.
+store_volatile(#llvm_store{volatile=Volatile}) -> Volatile.
+
+%% getelementptr
+mk_getelementptr(Dst, P_Type, Value, Typed_Idxs, Inbounds) ->
+ #llvm_getelementptr{dst=Dst,p_type=P_Type, value=Value,
+ typed_idxs=Typed_Idxs, inbounds=Inbounds}.
+getelementptr_dst(#llvm_getelementptr{dst=Dst}) -> Dst.
+getelementptr_p_type(#llvm_getelementptr{p_type=P_Type}) -> P_Type.
+getelementptr_value(#llvm_getelementptr{value=Value}) -> Value.
+getelementptr_typed_idxs(#llvm_getelementptr{typed_idxs=Typed_Idxs}) -> Typed_Idxs.
+getelementptr_inbounds(#llvm_getelementptr{inbounds=Inbounds}) -> Inbounds.
+
+%% conversion
+mk_conversion(Dst, Op, Src_type, Src, Dst_type) ->
+ #llvm_conversion{dst=Dst, op=Op, src_type=Src_type, src=Src, dst_type=Dst_type}.
+conversion_dst(#llvm_conversion{dst=Dst}) -> Dst.
+conversion_op(#llvm_conversion{op=Op}) -> Op.
+conversion_src_type(#llvm_conversion{src_type=Src_type}) -> Src_type.
+conversion_src(#llvm_conversion{src=Src}) -> Src.
+conversion_dst_type(#llvm_conversion{dst_type=Dst_type}) -> Dst_type.
+
+%% sitofp
+mk_sitofp(Dst, Src_type, Src, Dst_type) ->
+ #llvm_sitofp{dst=Dst, src_type=Src_type, src=Src, dst_type=Dst_type}.
+sitofp_dst(#llvm_sitofp{dst=Dst}) -> Dst.
+sitofp_src_type(#llvm_sitofp{src_type=Src_type}) -> Src_type.
+sitofp_src(#llvm_sitofp{src=Src}) -> Src.
+sitofp_dst_type(#llvm_sitofp{dst_type=Dst_type}) -> Dst_type.
+
+%% ptrtoint
+mk_ptrtoint(Dst, Src_Type, Src, Dst_Type) ->
+ #llvm_ptrtoint{dst=Dst, src_type=Src_Type, src=Src, dst_type=Dst_Type}.
+ptrtoint_dst(#llvm_ptrtoint{dst=Dst}) -> Dst.
+ptrtoint_src_type(#llvm_ptrtoint{src_type=Src_Type}) -> Src_Type.
+ptrtoint_src(#llvm_ptrtoint{src=Src}) -> Src.
+ptrtoint_dst_type(#llvm_ptrtoint{dst_type=Dst_Type}) -> Dst_Type .
+
+%% inttoptr
+mk_inttoptr(Dst, Src_Type, Src, Dst_Type) ->
+ #llvm_inttoptr{dst=Dst, src_type=Src_Type, src=Src, dst_type=Dst_Type}.
+inttoptr_dst(#llvm_inttoptr{dst=Dst}) -> Dst.
+inttoptr_src_type(#llvm_inttoptr{src_type=Src_Type}) -> Src_Type.
+inttoptr_src(#llvm_inttoptr{src=Src}) -> Src.
+inttoptr_dst_type(#llvm_inttoptr{dst_type=Dst_Type}) -> Dst_Type .
+
+%% icmp
+mk_icmp(Dst, Cond, Type, Src1, Src2) ->
+ #llvm_icmp{dst=Dst,'cond'=Cond,type=Type,src1=Src1,src2=Src2}.
+icmp_dst(#llvm_icmp{dst=Dst}) -> Dst.
+icmp_cond(#llvm_icmp{'cond'=Cond}) -> Cond.
+icmp_type(#llvm_icmp{type=Type}) -> Type.
+icmp_src1(#llvm_icmp{src1=Src1}) -> Src1.
+icmp_src2(#llvm_icmp{src2=Src2}) -> Src2.
+
+%% fcmp
+mk_fcmp(Dst, Cond, Type, Src1, Src2) ->
+ #llvm_fcmp{dst=Dst,'cond'=Cond,type=Type,src1=Src1,src2=Src2}.
+fcmp_dst(#llvm_fcmp{dst=Dst}) -> Dst.
+fcmp_cond(#llvm_fcmp{'cond'=Cond}) -> Cond.
+fcmp_type(#llvm_fcmp{type=Type}) -> Type.
+fcmp_src1(#llvm_fcmp{src1=Src1}) -> Src1.
+fcmp_src2(#llvm_fcmp{src2=Src2}) -> Src2.
+
+%% phi
+mk_phi(Dst, Type, Value_label_list) ->
+ #llvm_phi{dst=Dst, type=Type,value_label_list=Value_label_list}.
+phi_dst(#llvm_phi{dst=Dst}) -> Dst.
+phi_type(#llvm_phi{type=Type}) -> Type.
+phi_value_label_list(#llvm_phi{value_label_list=Value_label_list}) ->
+ Value_label_list.
+
+%% select
+mk_select(Dst, Cond, Typ1, Val1, Typ2, Val2) ->
+ #llvm_select{dst=Dst, 'cond'=Cond, typ1=Typ1, val1=Val1, typ2=Typ2, val2=Val2}.
+select_dst(#llvm_select{dst=Dst}) -> Dst.
+select_cond(#llvm_select{'cond'=Cond}) -> Cond.
+select_typ1(#llvm_select{typ1=Typ1}) -> Typ1.
+select_val1(#llvm_select{val1=Val1}) -> Val1.
+select_typ2(#llvm_select{typ2=Typ2}) -> Typ2.
+select_val2(#llvm_select{val2=Val2}) -> Val2.
+
+%% call
+mk_call(Dst, Is_tail, Cconv, Ret_attrs, Type, Fnptrval, Arglist, Fn_attrs) ->
+ #llvm_call{dst=Dst, is_tail=Is_tail, cconv=Cconv, ret_attrs=Ret_attrs,
+ type=Type, fnptrval=Fnptrval, arglist=Arglist, fn_attrs=Fn_attrs}.
+call_dst(#llvm_call{dst=Dst}) -> Dst.
+call_is_tail(#llvm_call{is_tail=Is_tail}) -> Is_tail.
+call_cconv(#llvm_call{cconv=Cconv}) -> Cconv.
+call_ret_attrs(#llvm_call{ret_attrs=Ret_attrs}) -> Ret_attrs.
+call_type(#llvm_call{type=Type}) -> Type.
+call_fnptrval(#llvm_call{fnptrval=Fnptrval}) -> Fnptrval.
+call_arglist(#llvm_call{arglist=Arglist}) -> Arglist.
+call_fn_attrs(#llvm_call{fn_attrs=Fn_attrs}) -> Fn_attrs.
+
+%% fun_def
+mk_fun_def(Linkage, Visibility, Cconv, Ret_attrs, Type, Name, Arglist,
+ Fn_attrs, Align, Body) ->
+ #llvm_fun_def{
+ linkage=Linkage,
+ visibility=Visibility,
+ cconv=Cconv,
+ ret_attrs=Ret_attrs,
+ type=Type,
+ 'name'=Name,
+ arglist=Arglist,
+ fn_attrs=Fn_attrs,
+ align=Align,
+ body=Body
+ }.
+
+fun_def_linkage(#llvm_fun_def{linkage=Linkage}) -> Linkage.
+fun_def_visibility(#llvm_fun_def{visibility=Visibility}) -> Visibility.
+fun_def_cconv(#llvm_fun_def{cconv=Cconv}) -> Cconv .
+fun_def_ret_attrs(#llvm_fun_def{ret_attrs=Ret_attrs}) -> Ret_attrs.
+fun_def_type(#llvm_fun_def{type=Type}) -> Type.
+fun_def_name(#llvm_fun_def{'name'=Name}) -> Name.
+fun_def_arglist(#llvm_fun_def{arglist=Arglist}) -> Arglist.
+fun_def_fn_attrs(#llvm_fun_def{fn_attrs=Fn_attrs}) -> Fn_attrs.
+fun_def_align(#llvm_fun_def{align=Align}) -> Align.
+fun_def_body(#llvm_fun_def{body=Body}) -> Body.
+
+%% fun_decl
+mk_fun_decl(Linkage, Visibility, Cconv, Ret_attrs, Type, Name, Arglist, Align)->
+ #llvm_fun_decl{
+ linkage=Linkage,
+ visibility=Visibility,
+ cconv=Cconv,
+ ret_attrs=Ret_attrs,
+ type=Type,
+ 'name'=Name,
+ arglist=Arglist,
+ align=Align
+ }.
+
+fun_decl_linkage(#llvm_fun_decl{linkage=Linkage}) -> Linkage.
+fun_decl_visibility(#llvm_fun_decl{visibility=Visibility}) -> Visibility.
+fun_decl_cconv(#llvm_fun_decl{cconv=Cconv}) -> Cconv .
+fun_decl_ret_attrs(#llvm_fun_decl{ret_attrs=Ret_attrs}) -> Ret_attrs.
+fun_decl_type(#llvm_fun_decl{type=Type}) -> Type.
+fun_decl_name(#llvm_fun_decl{'name'=Name}) -> Name.
+fun_decl_arglist(#llvm_fun_decl{arglist=Arglist}) -> Arglist.
+fun_decl_align(#llvm_fun_decl{align=Align}) -> Align.
+
+%% landingpad
+mk_landingpad() -> #llvm_landingpad{}.
+
+%% comment
+mk_comment(Text) -> #llvm_comment{text=Text}.
+comment_text(#llvm_comment{text=Text}) -> Text.
+
+%% label
+mk_label(Label) -> #llvm_label{label=Label}.
+label_label(#llvm_label{label=Label}) -> Label.
+
+-spec is_label(llvm_instr()) -> boolean().
+is_label(#llvm_label{}) -> true;
+is_label(#llvm_ret{}) -> false;
+is_label(#llvm_br{}) -> false;
+is_label(#llvm_br_cond{}) -> false;
+is_label(#llvm_indirectbr{}) -> false;
+is_label(#llvm_switch{}) -> false;
+is_label(#llvm_invoke{}) -> false;
+is_label(#llvm_operation{}) -> false;
+is_label(#llvm_extractvalue{}) -> false;
+is_label(#llvm_insertvalue{}) -> false;
+is_label(#llvm_alloca{}) -> false;
+is_label(#llvm_load{}) -> false;
+is_label(#llvm_store{}) -> false;
+is_label(#llvm_getelementptr{}) -> false;
+is_label(#llvm_conversion{}) -> false;
+is_label(#llvm_sitofp{}) -> false;
+is_label(#llvm_ptrtoint{}) -> false;
+is_label(#llvm_inttoptr{}) -> false;
+is_label(#llvm_icmp{}) -> false;
+is_label(#llvm_fcmp{}) -> false;
+is_label(#llvm_phi{}) -> false;
+is_label(#llvm_select{}) -> false;
+is_label(#llvm_call{}) -> false;
+is_label(#llvm_fun_def{}) -> false;
+is_label(#llvm_fun_decl{}) -> false;
+is_label(#llvm_landingpad{}) -> false;
+is_label(#llvm_comment{}) -> false;
+is_label(#llvm_const_decl{}) -> false;
+is_label(#llvm_asm{}) -> false;
+is_label(#llvm_adj_stack{}) -> false;
+is_label(#llvm_branch_meta{}) -> false.
+
+%% const_decl
+mk_const_decl(Dst, Decl_type, Type, Value) ->
+ #llvm_const_decl{dst=Dst, decl_type=Decl_type, type=Type, value=Value}.
+const_decl_dst(#llvm_const_decl{dst=Dst}) -> Dst.
+const_decl_decl_type(#llvm_const_decl{decl_type=Decl_type}) -> Decl_type.
+const_decl_type(#llvm_const_decl{type=Type}) -> Type.
+const_decl_value(#llvm_const_decl{value=Value}) -> Value.
+
+%% asm
+mk_asm(Instruction) -> #llvm_asm{instruction=Instruction}.
+asm_instruction(#llvm_asm{instruction=Instruction}) -> Instruction.
+
+%% adj_stack
+mk_adj_stack(Offset, Register, Type) ->
+ #llvm_adj_stack{offset=Offset, 'register'=Register, type=Type}.
+adj_stack_offset(#llvm_adj_stack{offset=Offset}) -> Offset.
+adj_stack_register(#llvm_adj_stack{'register'=Register}) -> Register.
+adj_stack_type(#llvm_adj_stack{type=Type}) -> Type.
+
+%% branch meta-data
+mk_branch_meta(Id, True_weight, False_weight) ->
+ #llvm_branch_meta{id=Id, true_weight=True_weight, false_weight=False_weight}.
+branch_meta_id(#llvm_branch_meta{id=Id}) -> Id.
+branch_meta_true_weight(#llvm_branch_meta{true_weight=True_weight}) ->
+ True_weight.
+branch_meta_false_weight(#llvm_branch_meta{false_weight=False_weight}) ->
+ False_weight.
+
+%% types
+mk_void() -> #llvm_void{}.
+
+mk_label_type() -> #llvm_label_type{}.
+
+mk_int(Width) -> #llvm_int{width=Width}.
+int_width(#llvm_int{width=Width}) -> Width.
+
+mk_double() -> #llvm_double{}.
+
+mk_pointer(Type) -> #llvm_pointer{type=Type}.
+pointer_type(#llvm_pointer{type=Type}) -> Type.
+
+mk_array(Size, Type) -> #llvm_array{'size'=Size, type=Type}.
+array_size(#llvm_array{'size'=Size}) -> Size.
+array_type(#llvm_array{type=Type}) -> Type.
+
+mk_vector(Size, Type) -> #llvm_vector{'size'=Size, type=Type}.
+vector_size(#llvm_vector{'size'=Size}) -> Size.
+vector_type(#llvm_vector{type=Type}) -> Type.
+
+mk_struct(Type_list) -> #llvm_struct{type_list=Type_list}.
+struct_type_list(#llvm_struct{type_list=Type_list}) -> Type_list.
+
+mk_fun(Ret_type, Arg_type_list) ->
+ #llvm_fun{ret_type=Ret_type, arg_type_list=Arg_type_list}.
+function_ret_type(#llvm_fun{ret_type=Ret_type}) -> Ret_type.
+function_arg_type_list(#llvm_fun{arg_type_list=Arg_type_list}) ->
+ Arg_type_list.
+
+%%----------------------------------------------------------------------------
+%% Pretty-printer Functions
+%%----------------------------------------------------------------------------
+
+%% @doc Pretty-print a list of LLVM instructions to a Device.
+pp_ins_list(_Dev, []) -> ok;
+pp_ins_list(Dev, [I|Is]) ->
+ pp_ins(Dev, I),
+ pp_ins_list(Dev, Is).
+
+pp_ins(Dev, I) ->
+ case indent(I) of
+ true -> write(Dev, " ");
+ false -> ok
+ end,
+ case I of
+ #llvm_ret{} ->
+ write(Dev, "ret "),
+ case ret_ret_list(I) of
+ [] -> write(Dev, "void");
+ List -> pp_args(Dev, List)
+ end,
+ write(Dev, "\n");
+ #llvm_br{} ->
+ write(Dev, ["br label ", br_dst(I), "\n"]);
+ #llvm_switch{} ->
+ write(Dev, "switch "),
+ pp_type(Dev, switch_type(I)),
+ write(Dev, [" ", switch_value(I), ", label ", switch_default_label(I),
+ " \n [\n"]),
+ pp_switch_value_label_list(Dev, switch_type(I),
+ switch_value_label_list(I)),
+ write(Dev, " ]\n");
+ #llvm_invoke{} ->
+ write(Dev, [invoke_dst(I), " = invoke ", invoke_cconv(I), " "]),
+ pp_options(Dev, invoke_ret_attrs(I)),
+ pp_type(Dev, invoke_type(I)),
+ write(Dev, [" ", invoke_fnptrval(I), "("]),
+ pp_args(Dev, invoke_arglist(I)),
+ write(Dev, ") "),
+ pp_options(Dev, invoke_fn_attrs(I)),
+ write(Dev, [" to label ", invoke_to_label(I)," unwind label ",
+ invoke_unwind_label(I), " \n"]);
+ #llvm_br_cond{} ->
+ write(Dev, ["br i1 ", br_cond_cond(I), ", label ", br_cond_true_label(I),
+ ", label ", br_cond_false_label(I)]),
+ case br_cond_meta(I) of
+ [] -> ok;
+ Metadata ->
+ write(Dev, [", !prof !", Metadata])
+ end,
+ write(Dev, "\n");
+ #llvm_indirectbr{} ->
+ write(Dev, "indirectbr "),
+ pp_type(Dev, indirectbr_type(I)),
+ write(Dev, [" ", indirectbr_address(I), ", [ "]),
+ pp_args(Dev, indirectbr_label_list(I)),
+ write(Dev, " ]\n");
+ #llvm_operation{} ->
+ write(Dev, [operation_dst(I), " = ", atom_to_list(operation_op(I)), " "]),
+ case op_has_options(operation_op(I)) of
+ true -> pp_options(Dev, operation_options(I));
+ false -> ok
+ end,
+ pp_type(Dev, operation_type(I)),
+ write(Dev, [" ", operation_src1(I), ", ", operation_src2(I), "\n"]);
+ #llvm_extractvalue{} ->
+ write(Dev, [extractvalue_dst(I), " = extractvalue "]),
+ pp_type(Dev, extractvalue_type(I)),
+ %% TODO Print idxs
+ write(Dev, [" ", extractvalue_val(I), ", ", extractvalue_idx(I), "\n"]);
+ #llvm_insertvalue{} ->
+ write(Dev, [insertvalue_dst(I), " = insertvalue "]),
+ pp_type(Dev, insertvalue_val_type(I)),
+ write(Dev, [" ", insertvalue_val(I), ", "]),
+ pp_type(Dev, insertvalue_elem_type(I)),
+ %%TODO Print idxs
+ write(Dev, [" ", insertvalue_elem(I), ", ", insertvalue_idx(I), "\n"]);
+ #llvm_alloca{} ->
+ write(Dev, [alloca_dst(I), " = alloca "]),
+ pp_type(Dev, alloca_type(I)),
+ case alloca_num(I) of
+ [] -> ok;
+ Num ->
+ write(Dev, ", "),
+ pp_type(Dev, alloca_type(I)),
+ write(Dev, [" ", Num, " "])
+ end,
+ case alloca_align(I) of
+ [] -> ok;
+ Align -> write(Dev, [",align ", Align])
+ end,
+ write(Dev, "\n");
+ #llvm_load{} ->
+ write(Dev, [load_dst(I), " = "]),
+ write(Dev, "load "),
+ case load_volatile(I) of
+ true -> write(Dev, "volatile ");
+ false -> ok
+ end,
+ pp_type(Dev, load_p_type(I)),
+ write(Dev, [" ", load_pointer(I), " "]),
+ case load_alignment(I) of
+ [] -> ok;
+ Al -> write(Dev, [", align ", Al, " "])
+ end,
+ case load_nontemporal(I) of
+ [] -> ok;
+ In -> write(Dev, [", !nontemporal !", In])
+ end,
+ write(Dev, "\n");
+ #llvm_store{} ->
+ write(Dev, "store "),
+ case store_volatile(I) of
+ true -> write(Dev, "volatile ");
+ false -> ok
+ end,
+ pp_type(Dev, store_type(I)),
+ write(Dev, [" ", store_value(I), ", "]),
+ pp_type(Dev, store_p_type(I)),
+ write(Dev, [" ", store_pointer(I), " "]),
+ case store_alignment(I) of
+ [] -> ok;
+ Al -> write(Dev, [", align ", Al, " "])
+ end,
+ case store_nontemporal(I) of
+ [] -> ok;
+ In -> write(Dev, [", !nontemporal !", In])
+ end,
+ write(Dev, "\n");
+ #llvm_getelementptr{} ->
+ write(Dev, [getelementptr_dst(I), " = getelementptr "]),
+ case getelementptr_inbounds(I) of
+ true -> write(Dev, "inbounds ");
+ false -> ok
+ end,
+ pp_type(Dev, getelementptr_p_type(I)),
+ write(Dev, [" ", getelementptr_value(I)]),
+ pp_typed_idxs(Dev, getelementptr_typed_idxs(I)),
+ write(Dev, "\n");
+ #llvm_conversion{} ->
+ write(Dev, [conversion_dst(I), " = ", atom_to_list(conversion_op(I)), " "]),
+ pp_type(Dev, conversion_src_type(I)),
+ write(Dev, [" ", conversion_src(I), " to "]),
+ pp_type(Dev, conversion_dst_type(I)),
+ write(Dev, "\n");
+ #llvm_icmp{} ->
+ write(Dev, [icmp_dst(I), " = icmp ", atom_to_list(icmp_cond(I)), " "]),
+ pp_type(Dev, icmp_type(I)),
+ write(Dev, [" ", icmp_src1(I), ", ", icmp_src2(I), "\n"]);
+ #llvm_fcmp{} ->
+ write(Dev, [fcmp_dst(I), " = fcmp ", atom_to_list(fcmp_cond(I)), " "]),
+ pp_type(Dev, fcmp_type(I)),
+ write(Dev, [" ", fcmp_src1(I), ", ", fcmp_src2(I), "\n"]);
+ #llvm_phi{} ->
+ write(Dev, [phi_dst(I), " = phi "]),
+ pp_type(Dev, phi_type(I)),
+ pp_phi_value_labels(Dev, phi_value_label_list(I)),
+ write(Dev, "\n");
+ #llvm_select{} ->
+ write(Dev, [select_dst(I), " = select i1 ", select_cond(I), ", "]),
+ pp_type(Dev, select_typ1(I)),
+ write(Dev, [" ", select_val1(I), ", "]),
+ pp_type(Dev, select_typ2(I)),
+ write(Dev, [" ", select_val2(I), "\n"]);
+ #llvm_call{} ->
+ case call_dst(I) of
+ [] -> ok;
+ Dst -> write(Dev, [Dst, " = "])
+ end,
+ case call_is_tail(I) of
+ true -> write(Dev, "tail ");
+ false -> ok
+ end,
+ write(Dev, ["call ", call_cconv(I), " "]),
+ pp_options(Dev, call_ret_attrs(I)),
+ pp_type(Dev, call_type(I)),
+ write(Dev, [" ", call_fnptrval(I), "("]),
+ pp_args(Dev, call_arglist(I)),
+ write(Dev, ") "),
+ pp_options(Dev, call_fn_attrs(I)),
+ write(Dev, "\n");
+ #llvm_fun_def{} ->
+ write(Dev, "define "),
+ pp_options(Dev, fun_def_linkage(I)),
+ pp_options(Dev, fun_def_visibility(I)),
+ case fun_def_cconv(I) of
+ [] -> ok;
+ Cc -> write(Dev, [Cc, " "])
+ end,
+ pp_options(Dev, fun_def_ret_attrs(I)),
+ write(Dev, " "),
+ pp_type(Dev, fun_def_type(I)),
+ write(Dev, [" @", fun_def_name(I), "("]),
+ pp_args(Dev, fun_def_arglist(I)),
+ write(Dev, ") "),
+ pp_options(Dev, fun_def_fn_attrs(I)),
+ case fun_def_align(I) of
+ [] -> ok;
+ N -> write(Dev, ["align ", N])
+ end,
+ write(Dev, "{\n"),
+ pp_ins_list(Dev, fun_def_body(I)),
+ write(Dev, "}\n");
+ #llvm_fun_decl{} ->
+ write(Dev, "declare "),
+ pp_options(Dev, fun_decl_linkage(I)),
+ pp_options(Dev, fun_decl_visibility(I)),
+ case fun_decl_cconv(I) of
+ [] -> ok;
+ Cc -> write(Dev, [Cc, " "])
+ end,
+ pp_options(Dev, fun_decl_ret_attrs(I)),
+ pp_type(Dev, fun_decl_type(I)),
+ write(Dev, [" ", fun_decl_name(I), "("]),
+ pp_type_list(Dev, fun_decl_arglist(I)),
+ write(Dev, ") "),
+ case fun_decl_align(I) of
+ [] -> ok;
+ N -> write(Dev, ["align ", N])
+ end,
+ write(Dev, "\n");
+ #llvm_comment{} ->
+ write(Dev, ["; ", atom_to_list(comment_text(I)), "\n"]);
+ #llvm_label{} ->
+ write(Dev, [label_label(I), ":\n"]);
+ #llvm_const_decl{} ->
+ write(Dev, [const_decl_dst(I), " = ", const_decl_decl_type(I), " "]),
+ pp_type(Dev, const_decl_type(I)),
+ write(Dev, [" ", const_decl_value(I), "\n"]);
+ #llvm_landingpad{} ->
+ write(Dev, "landingpad { i8*, i32 } personality i32 (i32, i64, i8*,i8*)*
+ @__gcc_personality_v0 cleanup\n");
+ #llvm_asm{} ->
+ write(Dev, [asm_instruction(I), "\n"]);
+ #llvm_adj_stack{} ->
+ write(Dev, ["call void asm sideeffect \"sub $0, ",
+ adj_stack_register(I), "\", \"r\"("]),
+ pp_type(Dev, adj_stack_type(I)),
+ write(Dev, [" ", adj_stack_offset(I),")\n"]);
+ #llvm_branch_meta{} ->
+ write(Dev, ["!", branch_meta_id(I), " = metadata !{metadata !\"branch_weights\",
+ i32 ", branch_meta_true_weight(I), ", i32 ",
+ branch_meta_false_weight(I), "}\n"]);
+ Other ->
+ exit({?MODULE, pp_ins, {"Unknown LLVM instruction", Other}})
+ end.
+
+%% @doc Pretty-print a list of types
+pp_type_list(_Dev, []) -> ok;
+pp_type_list(Dev, [T]) ->
+ pp_type(Dev, T);
+pp_type_list(Dev, [T|Ts]) ->
+ pp_type(Dev, T),
+ write(Dev, ", "),
+ pp_type_list(Dev, Ts).
+
+pp_type(Dev, Type) ->
+ case Type of
+ #llvm_void{} ->
+ write(Dev, "void");
+ #llvm_label_type{} ->
+ write(Dev, "label");
+ %% Integer
+ #llvm_int{} ->
+ write(Dev, ["i", integer_to_list(int_width(Type))]);
+ %% Float
+ #llvm_float{} ->
+ write(Dev, "float");
+ #llvm_double{} ->
+ write(Dev, "double");
+ #llvm_fp80{} ->
+ write(Dev, "x86_fp80");
+ #llvm_fp128{} ->
+ write(Dev, "fp128");
+ #llvm_ppc_fp128{} ->
+ write(Dev, "ppc_fp128");
+ %% Pointer
+ #llvm_pointer{} ->
+ pp_type(Dev, pointer_type(Type)),
+ write(Dev, "*");
+ %% Function
+ #llvm_fun{} ->
+ pp_type(Dev, function_ret_type(Type)),
+ write(Dev, " ("),
+ pp_type_list(Dev, function_arg_type_list(Type)),
+ write(Dev, ")");
+ %% Aggregate
+ #llvm_array{} ->
+ write(Dev, ["[", integer_to_list(array_size(Type)), " x "]),
+ pp_type(Dev, array_type(Type)),
+ write(Dev, "]");
+ #llvm_struct{} ->
+ write(Dev, "{"),
+ pp_type_list(Dev, struct_type_list(Type)),
+ write(Dev, "}");
+ #llvm_vector{} ->
+ write(Dev, ["{", integer_to_list(vector_size(Type)), " x "]),
+ pp_type(Dev, vector_type(Type)),
+ write(Dev, "}")
+ end.
+
+%% @doc Pretty-print a list of typed arguments
+pp_args(_Dev, []) -> ok;
+pp_args(Dev, [{Type, Arg} | []]) ->
+ pp_type(Dev, Type),
+ write(Dev, [" ", Arg]);
+pp_args(Dev, [{Type, Arg} | Args]) ->
+ pp_type(Dev, Type),
+ write(Dev, [" ", Arg, ", "]),
+ pp_args(Dev, Args).
+
+%% @doc Pretty-print a list of options
+pp_options(_Dev, []) -> ok;
+pp_options(Dev, [O|Os]) ->
+ write(Dev, [atom_to_list(O), " "]),
+ pp_options(Dev, Os).
+
+%% @doc Pretty-print a list of phi value-labels
+pp_phi_value_labels(_Dev, []) -> ok;
+pp_phi_value_labels(Dev, [{Value, Label}|[]]) ->
+ write(Dev, ["[ ", Value, ", ", Label, " ]"]);
+pp_phi_value_labels(Dev,[{Value, Label}|VL]) ->
+ write(Dev, ["[ ", Value, ", ", Label, " ], "]),
+ pp_phi_value_labels(Dev, VL).
+
+%% @doc Pretty-print a list of typed indexes
+pp_typed_idxs(_Dev, []) -> ok;
+pp_typed_idxs(Dev, [{Type, Id} | Tids]) ->
+ write(Dev, ", "),
+ pp_type(Dev, Type),
+ write(Dev, [" ", Id]),
+ pp_typed_idxs(Dev, Tids).
+
+%% @doc Pretty-print a switch label list
+pp_switch_value_label_list(_Dev, _Type, []) -> ok;
+pp_switch_value_label_list(Dev, Type, [{Value, Label} | VLs]) ->
+ write(Dev, " "),
+ pp_type(Dev, Type),
+ write(Dev, [" ", Value, ", label ", Label, "\n"]),
+ pp_switch_value_label_list(Dev, Type, VLs).
+
+%%----------------------------------------------------------------------------
+%% Auxiliary Functions
+%%----------------------------------------------------------------------------
+
+%% @doc Returns if an instruction needs to be intended
+indent(I) ->
+ case I of
+ #llvm_label{} -> false;
+ #llvm_fun_def{} -> false;
+ #llvm_fun_decl{} -> false;
+ #llvm_const_decl{} -> false;
+ #llvm_branch_meta{} -> false;
+ _ -> true
+ end.
+
+op_has_options(Op) ->
+ case Op of
+ 'and' -> false;
+ 'or' -> false;
+ 'xor' -> false;
+ _ -> true
+ end.
+
+%% @doc Abstracts actual writing to file operations
+write(Dev, Msg) ->
+ ok = file:write(Dev, Msg).
diff --git a/lib/hipe/llvm/hipe_llvm_arch.hrl b/lib/hipe/llvm/hipe_llvm_arch.hrl
new file mode 100644
index 0000000000..689a5a52ea
--- /dev/null
+++ b/lib/hipe/llvm/hipe_llvm_arch.hrl
@@ -0,0 +1,11 @@
+-ifdef(BIT32).
+-define(NR_PINNED_REGS, 2).
+-define(NR_ARG_REGS, 3).
+-define(ARCH_REGISTERS, hipe_x86_registers).
+-define(FLOAT_OFFSET, 2).
+-else.
+-define(NR_PINNED_REGS, 2).
+-define(NR_ARG_REGS, 4).
+-define(ARCH_REGISTERS, hipe_amd64_registers).
+-define(FLOAT_OFFSET, 6).
+-endif.
diff --git a/lib/hipe/llvm/hipe_llvm_liveness.erl b/lib/hipe/llvm/hipe_llvm_liveness.erl
new file mode 100644
index 0000000000..d1c90ed4c9
--- /dev/null
+++ b/lib/hipe/llvm/hipe_llvm_liveness.erl
@@ -0,0 +1,112 @@
+-module(hipe_llvm_liveness).
+
+-export([analyze/1]).
+
+%% @doc Find gc roots and explicitly mark when they go out of scope, based
+%% on the liveness analyzis performed by the hipe_rtl_liveness:analyze/1.
+analyze(RtlCfg) ->
+ Liveness = hipe_rtl_liveness:analyze(RtlCfg),
+ Roots = find_roots(RtlCfg, Liveness),
+ %% erlang:display(Roots),
+ NewRtlCfg = mark_dead_roots(RtlCfg, Liveness, Roots),
+ {NewRtlCfg, Roots}.
+
+%% @doc Determine which are the GC Roots.Possible roots are all
+%% RTL variables (rtl_var). However, since safe points are function calls, we
+%% consider as possible GC roots only RTL variables that are live around
+%% function calls.
+find_roots(Cfg, Liveness) ->
+ Labels = hipe_rtl_cfg:postorder(Cfg),
+ Roots = find_roots_bb(Labels, Cfg, Liveness, []),
+ lists:usort(lists:flatten(Roots)).
+
+find_roots_bb([], _Cfg, _Liveness, RootAcc) ->
+ RootAcc;
+find_roots_bb([L|Ls], Cfg, Liveness, RootAcc) ->
+ Block = hipe_rtl_cfg:bb(Cfg, L),
+ BlockCode = hipe_bb:code(Block),
+ LiveIn = ordsets:from_list(strip(hipe_rtl_liveness:livein(Liveness, L))),
+ LiveOut = ordsets:from_list(strip(hipe_rtl_liveness:liveout(Liveness, L))),
+ Roots = do_find_roots_bb(BlockCode, L, LiveOut, LiveIn, []),
+ find_roots_bb(Ls, Cfg, Liveness, Roots++RootAcc).
+
+%% For each call inside a BB the GC roots are those RTL variables that
+%% are live before and after the call.
+%% --> Live Before Call: These are the RTL variables that belong to the
+%% LiveIn list or are initialized inside the BB before the call
+%% --> Live After Call: These are the RTL variables that belong to the
+%% LiveOut list or are used after the call inside the BB (they die
+%% inside the BB and so do not belong to the LiveOut list)
+do_find_roots_bb([], _Label, _LiveOut, _LiveBefore, RootAcc) ->
+ RootAcc;
+do_find_roots_bb([I|Is], L, LiveOut, LiveBefore, RootAcc) ->
+ case hipe_rtl:is_call(I) of
+ true ->
+ %% Used inside the BB after the call
+ UsedAfterCall_ = strip(lists:flatten([hipe_rtl:uses(V) || V <- Is])),
+ UsedAfterCall = ordsets:from_list(UsedAfterCall_),
+ LiveAfter = ordsets:union(UsedAfterCall, LiveOut),
+ %% The Actual Roots
+ Roots = ordsets:intersection(LiveBefore, LiveAfter),
+ %% The result of the instruction
+ Defines = ordsets:from_list(strip(hipe_rtl:defines(I))),
+ LiveBefore1 = ordsets:union(LiveBefore, Defines),
+ do_find_roots_bb(Is, L, LiveOut, LiveBefore1, [Roots|RootAcc]);
+ false ->
+ %% The result of the instruction
+ Defines = ordsets:from_list(strip(hipe_rtl:defines(I))),
+ LiveBefore1 = ordsets:union(LiveBefore, Defines),
+ do_find_roots_bb(Is, L, LiveOut, LiveBefore1, RootAcc)
+ end.
+
+%% @doc This function is responsible for marking when GC Roots, which can be
+%% only RTL variables go out of scope (dead). This pass is needed for the LLVM
+%% back end because the LLVM framework forces us to explicit mark when gc roots
+%% are no longer live.
+mark_dead_roots(CFG, Liveness, Roots) ->
+ Labels = hipe_rtl_cfg:postorder(CFG),
+ mark_dead_bb(Labels, CFG, Liveness, Roots).
+
+mark_dead_bb([], Cfg, _Liveness, _Roots) ->
+ Cfg;
+mark_dead_bb([L|Ls], Cfg, Liveness, Roots) ->
+ Block = hipe_rtl_cfg:bb(Cfg, L),
+ BlockCode = hipe_bb:code(Block),
+ LiveOut = ordsets:from_list(strip(hipe_rtl_liveness:liveout(Liveness, L))),
+ NewBlockCode = do_mark_dead_bb(BlockCode, LiveOut, Roots, []),
+ %% Update the CFG
+ NewBB = hipe_bb:code_update(Block, NewBlockCode),
+ NewCFG = hipe_rtl_cfg:bb_add(Cfg, L, NewBB),
+ mark_dead_bb(Ls, NewCFG, Liveness, Roots).
+
+do_mark_dead_bb([], _LiveOut, _Roots, NewBlockCode) ->
+ lists:reverse(NewBlockCode);
+do_mark_dead_bb([I|Is], LiveOut ,Roots, NewBlockCode) ->
+ Uses = ordsets:from_list(strip(hipe_rtl:uses(I))),
+ %% GC roots that are used in this instruction
+ RootsUsed = ordsets:intersection(Roots, Uses),
+ UsedAfter_ = strip(lists:flatten([hipe_rtl:uses(V) || V <- Is])),
+ UsedAfter = ordsets:from_list(UsedAfter_),
+ %% GC roots that are live after this instruction
+ LiveAfter = ordsets:union(LiveOut, UsedAfter),
+ %% GC roots that their last use is in this instruction
+ DeadRoots = ordsets:subtract(RootsUsed, LiveAfter),
+ %% Recreate the RTL variable from the corresponding Index
+ OldVars = [hipe_rtl:mk_var(V1) || V1 <- DeadRoots],
+ %% Mark the RTL variable as DEAD (last use)
+ NewVars = [kill_var(V2) || V2 <- OldVars],
+ %% Create a list with the substitution of the old vars with the new
+ %% ones which are marked with the dead keyword
+ Subtitution = lists:zip(OldVars, NewVars),
+ NewI = case Subtitution of
+ [] -> I;
+ _ -> hipe_rtl:subst_uses_llvm(Subtitution, I)
+ end,
+ do_mark_dead_bb(Is, LiveOut, Roots, [NewI|NewBlockCode]).
+
+%% Update the liveness of a var,in order to mark that this is the last use.
+kill_var(Var) -> hipe_rtl:var_liveness_update(Var, dead).
+
+%% We are only interested for rtl_vars, since only rtl_vars are possible gc
+%% roots.
+strip(L) -> [Y || {rtl_var, Y, _} <- L].
diff --git a/lib/hipe/llvm/hipe_llvm_main.erl b/lib/hipe/llvm/hipe_llvm_main.erl
new file mode 100644
index 0000000000..0e50c9539b
--- /dev/null
+++ b/lib/hipe/llvm/hipe_llvm_main.erl
@@ -0,0 +1,506 @@
+%% -*- erlang-indent-level: 2 -*-
+-module(hipe_llvm_main).
+
+-export([rtl_to_native/4]).
+
+-include("../../kernel/src/hipe_ext_format.hrl").
+-include("hipe_llvm_arch.hrl").
+-include("elf_format.hrl").
+
+%% @doc Translation of RTL to a loadable object. This function takes the RTL
+%% code and calls hipe_rtl_to_llvm:translate/2 to translate the RTL code to
+%% LLVM code. After this, LLVM asm is printed to a file and the LLVM tool
+%% chain is invoked in order to produce an object file.
+rtl_to_native(MFA, RTL, Roots, Options) ->
+ %% Compile to LLVM and get Instruction List (along with infos)
+ {LLVMCode, RelocsDict, ConstTab} =
+ hipe_rtl_to_llvm:translate(RTL, Roots),
+ %% Fix function name to an acceptable LLVM identifier (needed for closures)
+ {_Module, Fun, Arity} = hipe_rtl_to_llvm:fix_mfa_name(MFA),
+ %% Write LLVM Assembly to intermediate file (on disk)
+ {ok, Dir, ObjectFile} =
+ compile_with_llvm(Fun, Arity, LLVMCode, Options, false),
+ %%
+ %% Extract information from object file
+ %%
+ ObjBin = open_object_file(ObjectFile),
+ %% Read and set the ELF class
+ elf_format:set_architecture_flag(ObjBin),
+ %% Get labels info (for switches and jump tables)
+ Labels = elf_format:get_rodata_relocs(ObjBin),
+ {Switches, Closures} = get_tables(ObjBin),
+ %% Associate Labels with Switches and Closures with stack args
+ {SwitchInfos, ExposedClosures} =
+ correlate_labels(Switches ++ Closures, Labels),
+ %% SwitchInfos: [{"table_50", [Labels]}]
+ %% ExposedClosures: [{"table_closures", [Labels]}]
+
+ %% Labelmap contains the offsets of the labels in the code that are
+ %% used for switch's jump tables
+ LabelMap = create_labelmap(MFA, SwitchInfos, RelocsDict),
+ %% Get relocation info
+ TextRelocs = elf_format:get_text_relocs(ObjBin),
+ %% AccRefs contains the offsets of all references to relocatable symbols in
+ %% the code:
+ AccRefs = fix_relocations(TextRelocs, RelocsDict, MFA),
+ %% Get stack descriptors
+ SDescs = get_sdescs(ObjBin),
+ %% FixedSDescs are the stack descriptors after correcting calls that have
+ %% arguments in the stack
+ FixedSDescs =
+ fix_stack_descriptors(RelocsDict, AccRefs, SDescs, ExposedClosures),
+ Refs = AccRefs ++ FixedSDescs,
+ %% Get binary code from object file
+ BinCode = elf_format:extract_text(ObjBin),
+ %% Remove temp files (if needed)
+ ok = remove_temp_folder(Dir, Options),
+ %% Return the code together with information that will be used in the
+ %% hipe_llvm_merge module to produce the final binary that will be loaded
+ %% by the hipe unified loader.
+ {MFA, BinCode, byte_size(BinCode), ConstTab, Refs, LabelMap}.
+
+%%------------------------------------------------------------------------------
+%% LLVM tool chain
+%%------------------------------------------------------------------------------
+
+%% @doc Compile function FunName/Arity to LLVM. Return Dir (in order to remove
+%% it if we do not want to store temporary files) and ObjectFile name that
+%% is created by the LLVM tools.
+compile_with_llvm(FunName, Arity, LLVMCode, Options, UseBuffer) ->
+ Filename = atom_to_list(FunName) ++ "_" ++ integer_to_list(Arity),
+ %% Save temp files in a unique folder
+ Dir = unique_folder(FunName, Arity, Options),
+ ok = file:make_dir(Dir),
+ %% Print LLVM assembly to file
+ OpenOpts = [append, raw] ++
+ case UseBuffer of
+ %% true -> [delayed_write]; % Use delayed_write!
+ false -> []
+ end,
+ {ok, File_llvm} = file:open(Dir ++ Filename ++ ".ll", OpenOpts),
+ hipe_llvm:pp_ins_list(File_llvm, LLVMCode),
+ %% delayed_write can cause file:close not to do a close, hence the two calls
+ ok = file:close(File_llvm),
+ __ = file:close(File_llvm),
+ %% Invoke LLVM compiler tools to produce an object file
+ llvm_opt(Dir, Filename, Options),
+ llvm_llc(Dir, Filename, Options),
+ compile(Dir, Filename, "gcc"), %%FIXME: use llc -filetype=obj and skip this!
+ {ok, Dir, Dir ++ Filename ++ ".o"}.
+
+%% @doc Invoke opt tool to optimize the bitcode (_name.ll -> _name.bc).
+llvm_opt(Dir, Filename, Options) ->
+ Source = Dir ++ Filename ++ ".ll",
+ Dest = Dir ++ Filename ++ ".bc",
+ OptLevel = trans_optlev_flag(opt, Options),
+ OptFlags = [OptLevel, "-mem2reg", "-strip"],
+ Command = "opt " ++ fix_opts(OptFlags) ++ " " ++ Source ++ " -o " ++ Dest,
+ %% io:format("OPT: ~s~n", [Command]),
+ case os:cmd(Command) of
+ "" -> ok;
+ Error -> exit({?MODULE, opt, Error})
+ end.
+
+%% @doc Invoke llc tool to compile the bitcode to object file
+%% (_name.bc -> _name.o).
+llvm_llc(Dir, Filename, Options) ->
+ Source = Dir ++ Filename ++ ".bc",
+ OptLevel = trans_optlev_flag(llc, Options),
+ Align = find_stack_alignment(),
+ LlcFlags = [OptLevel, "-code-model=medium", "-stack-alignment=" ++ Align
+ , "-tailcallopt", "-filetype=asm"], %%FIXME
+ Command = "llc " ++ fix_opts(LlcFlags) ++ " " ++ Source,
+ %% io:format("LLC: ~s~n", [Command]),
+ case os:cmd(Command) of
+ "" -> ok;
+ Error -> exit({?MODULE, llc, Error})
+ end.
+
+%% @doc Invoke the compiler tool ("gcc", "llvmc", etc.) to generate an object
+%% file from native assembly.
+compile(Dir, Fun_Name, Compiler) ->
+ Source = Dir ++ Fun_Name ++ ".s",
+ Dest = Dir ++ Fun_Name ++ ".o",
+ Command = Compiler ++ " -c " ++ Source ++ " -o " ++ Dest,
+ %% io:format("~s: ~s~n", [Compiler, Command]),
+ case os:cmd(Command) of
+ "" -> ok;
+ Error -> exit({?MODULE, cc, Error})
+ end.
+
+find_stack_alignment() ->
+ case get(hipe_target_arch) of
+ x86 -> "4";
+ amd64 -> "8";
+ _ -> exit({?MODULE, find_stack_alignment, "Unimplemented architecture"})
+ end.
+
+%% @doc Join options.
+fix_opts(Opts) ->
+ string:join(Opts, " ").
+
+%% @doc Translate optimization-level flag (default is "O2").
+trans_optlev_flag(Tool, Options) ->
+ Flag = case Tool of
+ opt -> llvm_opt;
+ llc -> llvm_llc
+ end,
+ case proplists:get_value(Flag, Options) of
+ o0 -> ""; % "-O0" does not exist in opt tool
+ o1 -> "-O1";
+ o2 -> "-O2";
+ o3 -> "-O3";
+ undefined -> "-O2"
+ end.
+
+%%------------------------------------------------------------------------------
+%% Functions to manage Relocations
+%%------------------------------------------------------------------------------
+
+%% @doc Get switch table and closure table.
+get_tables(Elf) ->
+ %% Search Symbol Table for an entry with name prefixed with "table_":
+ Triples = elf_format:get_tab_entries(Elf),
+ Switches = [T || T={"table_" ++ _, _, _} <- Triples],
+ Closures = [T || T={"table_closures" ++ _, _, _} <- Switches],
+ {Switches, Closures}.
+
+%% @doc This function associates symbols who point to some table of labels with
+%% the corresponding offsets of the labels in the code. These tables can
+%% either be jump tables for switches or a table which contains the labels
+%% of blocks that contain closure calls with more than ?NR_ARG_REGS.
+correlate_labels([], _L) -> {[], []};
+correlate_labels(Tables, Labels) ->
+ %% Sort "Tables" based on "ValueOffsets"
+ OffsetSortedTb = lists:ukeysort(2, Tables),
+ %% Unzip offset-sorted list of "Switches"
+ {Names, _Offsets, TablesSizeList} = lists:unzip3(OffsetSortedTb),
+ %% Associate switch names with labels
+ L = split_list(Labels, TablesSizeList),
+ %% Zip back! (to [{SwitchName, Values}])
+ NamesValues = lists:zip(Names, L),
+ case lists:keytake("table_closures", 1, NamesValues) of
+ false -> %% No closures in the code, no closure table
+ {NamesValues, []};
+ {value, ClosureTableNV, SwitchesNV} ->
+ {SwitchesNV, ClosureTableNV}
+ end.
+
+%% @doc Create a gb_tree which contains information about the labels that used
+%% for switch's jump tables. The keys of the gb_tree are of the form
+%% {MFA, Label} and the values are the actual Offsets.
+create_labelmap(MFA, SwitchInfos, RelocsDict) ->
+ create_labelmap(MFA, SwitchInfos, RelocsDict, gb_trees:empty()).
+
+create_labelmap(_, [], _, LabelMap) -> LabelMap;
+create_labelmap(MFA, [{Name, Offsets} | Rest], RelocsDict, LabelMap) ->
+ case dict:fetch(Name, RelocsDict) of
+ {switch, {_TableType, LabelList, _NrLabels, _SortOrder}, _JTabLab} ->
+ KVDict = lists:ukeysort(1, lists:zip(LabelList, Offsets)),
+ NewLabelMap = insert_to_labelmap(KVDict, LabelMap),
+ create_labelmap(MFA, Rest, RelocsDict, NewLabelMap);
+ _ ->
+ exit({?MODULE, create_labelmap, "Not a jump table!"})
+ end.
+
+%% @doc Insert a list of [{Key,Value}] to a LabelMap (gb_tree).
+insert_to_labelmap([], LabelMap) -> LabelMap;
+insert_to_labelmap([{Key, Value}|Rest], LabelMap) ->
+ case gb_trees:lookup(Key, LabelMap) of
+ none ->
+ insert_to_labelmap(Rest, gb_trees:insert(Key, Value, LabelMap));
+ {value, Value} -> %% Exists with the *exact* same Value.
+ insert_to_labelmap(Rest, LabelMap)
+ end.
+
+%% @doc Correlate object file relocation symbols with info from translation to
+%% llvm code.
+fix_relocations(Relocs, RelocsDict, MFA) ->
+ fix_relocs(Relocs, RelocsDict, MFA, []).
+
+fix_relocs([], _, _, RelocAcc) -> RelocAcc;
+fix_relocs([{Name, Offset}|Rs], RelocsDict, {ModName,_,_}=MFA, RelocAcc) ->
+ case dict:fetch(Name, RelocsDict) of
+ {atom, AtomName} ->
+ fix_relocs(Rs, RelocsDict, MFA,
+ [{?LOAD_ATOM, Offset, AtomName}|RelocAcc]);
+ {constant, Label} ->
+ fix_relocs(Rs, RelocsDict, MFA,
+ [{?LOAD_ADDRESS, Offset, {constant, Label}}|RelocAcc]);
+ {switch, _, JTabLab} -> %% Treat switch exactly as constant
+ fix_relocs(Rs, RelocsDict, MFA,
+ [{?LOAD_ADDRESS, Offset, {constant, JTabLab}}|RelocAcc]);
+ {closure, _}=Closure ->
+ fix_relocs(Rs, RelocsDict, MFA,
+ [{?LOAD_ADDRESS, Offset, Closure}|RelocAcc]);
+ {call, {bif, BifName, _}} ->
+ fix_relocs(Rs, RelocsDict, MFA,
+ [{?CALL_LOCAL, Offset, BifName}|RelocAcc]);
+ %% MFA calls to functions in the same module are of type 3, while all
+ %% other MFA calls are of type 2.
+ {call, {ModName,_F,_A}=CallMFA} ->
+ fix_relocs(Rs, RelocsDict, MFA,
+ [{?CALL_LOCAL, Offset, CallMFA}|RelocAcc]);
+ {call, CallMFA} ->
+ fix_relocs(Rs, RelocsDict, MFA,
+ [{?CALL_REMOTE, Offset, CallMFA}|RelocAcc]);
+ Other ->
+ exit({?MODULE, fix_relocs,
+ {"Relocation not in relocation dictionary", Other}})
+ end.
+
+%%------------------------------------------------------------------------------
+%% Functions to manage Stack Descriptors
+%%------------------------------------------------------------------------------
+
+%% @doc This function takes an ELF Object File binary and returns a proper sdesc
+%% list for Erlang/OTP System's loader. The return value should be of the
+%% form:
+%% {
+%% 4, Safepoint Address,
+%% {ExnLabel OR [], FrameSize, StackArity, {Liveroot stack frame indexes}},
+%% }
+get_sdescs(Elf) ->
+ case elf_format:extract_note(Elf, ?NOTE_ERLGC_NAME) of
+ <<>> -> % Object file has no ".note.gc" section!
+ [];
+ NoteGC_bin ->
+ %% Get safe point addresses (stored in ".rela.note.gc" section):
+ RelaNoteGC = elf_format:extract_rela(Elf, ?NOTE(?NOTE_ERLGC_NAME)),
+ SPCount = length(RelaNoteGC),
+ T = SPCount * ?SP_ADDR_SIZE,
+ %% Pattern match fields of ".note.gc":
+ <<SPCount:(?bits(?SP_COUNT_SIZE))/integer-little, % Sanity check!
+ SPAddrs:T/binary, % NOTE: In 64bit they are relocs!
+ StkFrameSize:(?bits(?SP_STKFRAME_SIZE))/integer-little,
+ StkArity:(?bits(?SP_STKARITY_SIZE))/integer-little,
+ _LiveRootCount:(?bits(?SP_LIVEROOTCNT_SIZE))/integer-little, % Skip
+ Roots/binary>> = NoteGC_bin,
+ LiveRoots = get_liveroots(Roots, []),
+ %% Extract information about the safe point addresses:
+ SPOffs =
+ case elf_format:is64bit() of
+ true -> %% Find offsets in ".rela.note.gc":
+ elf_format:get_rela_addends(RelaNoteGC);
+ false -> %% Find offsets in SPAddrs (in ".note.gc"):
+ get_spoffs(SPAddrs, [])
+ end,
+ %% Extract Exception Handler labels:
+ ExnHandlers = elf_format:get_exn_handlers(Elf),
+ %% Combine ExnHandlers and Safe point addresses (return addresses):
+ ExnAndSPOffs = combine_ras_and_exns(ExnHandlers, SPOffs, []),
+ create_sdesc_list(ExnAndSPOffs, StkFrameSize, StkArity, LiveRoots, [])
+ end.
+
+%% @doc Extracts a bunch of integers (live roots) from a binary. Returns a tuple
+%% as need for stack descriptors.
+get_liveroots(<<>>, Acc) ->
+ list_to_tuple(Acc);
+get_liveroots(<<Root:?bits(?LR_STKINDEX_SIZE)/integer-little,
+ MoreRoots/binary>>, Acc) ->
+ get_liveroots(MoreRoots, [Root | Acc]).
+
+%% @doc Extracts a bunch of integers (safepoint offsets) from a binary. Returns
+%% a tuple as need for stack descriptors.
+get_spoffs(<<>>, Acc) ->
+ lists:reverse(Acc);
+get_spoffs(<<SPOff:?bits(?SP_ADDR_SIZE)/integer-little, More/binary>>, Acc) ->
+ get_spoffs(More, [SPOff | Acc]).
+
+combine_ras_and_exns(_, [], Acc) ->
+ lists:reverse(Acc);
+combine_ras_and_exns(ExnHandlers, [RA | MoreRAs], Acc) ->
+ %% FIXME: do something better than O(n^2) by taking advantage of the property
+ %% ||ExnHandlers|| <= ||RAs||
+ Handler = find_exn_handler(RA, ExnHandlers),
+ combine_ras_and_exns(ExnHandlers, MoreRAs, [{Handler, RA} | Acc]).
+
+find_exn_handler(_, []) ->
+ [];
+find_exn_handler(RA, [{Start, End, Handler} | MoreExnHandlers]) ->
+ case (RA >= Start andalso RA =< End) of
+ true ->
+ Handler;
+ false ->
+ find_exn_handler(RA, MoreExnHandlers)
+ end.
+
+create_sdesc_list([], _, _, _, Acc) ->
+ lists:reverse(Acc);
+create_sdesc_list([{ExnLbl, SPOff} | MoreExnAndSPOffs],
+ StkFrameSize, StkArity, LiveRoots, Acc) ->
+ Hdlr = case ExnLbl of
+ 0 -> [];
+ N -> N
+ end,
+ create_sdesc_list(MoreExnAndSPOffs, StkFrameSize, StkArity, LiveRoots,
+ [{?SDESC, SPOff, {Hdlr, StkFrameSize, StkArity, LiveRoots}}
+ | Acc]).
+
+%% @doc This function is responsible for correcting the stack descriptors of
+%% the calls that are found in the code and have more than NR_ARG_REGS
+%% (thus, some of their arguments are passed to the stack). Because of the
+%% Reserved Call Frame feature that the LLVM uses, the stack descriptors
+%% are not correct since at the point of call the frame size is reduced
+%% by the number of arguments that are passed on the stack. Also, the
+%% offsets of the roots need to be re-adjusted.
+fix_stack_descriptors(_, _, [], _) ->
+ [];
+fix_stack_descriptors(RelocsDict, Relocs, SDescs, ExposedClosures) ->
+ %% NamedCalls are MFA and BIF calls that need fix
+ NamedCalls = calls_with_stack_args(RelocsDict),
+ NamedCallsOffs = calls_offsets_arity(Relocs, NamedCalls),
+ ExposedClosures1 =
+ case dict:is_key("table_closures", RelocsDict) of
+ true -> %% A Table with closures exists
+ {table_closures, ArityList} = dict:fetch("table_closures", RelocsDict),
+ case ExposedClosures of
+ {_, Offsets} ->
+ lists:zip(Offsets, ArityList);
+ _ ->
+ exit({?MODULE, fix_stack_descriptors,
+ {"Wrong exposed closures", ExposedClosures}})
+ end;
+ false ->
+ []
+ end,
+ ClosuresOffs = closures_offsets_arity(ExposedClosures1, SDescs),
+ fix_sdescs(NamedCallsOffs ++ ClosuresOffs, SDescs).
+
+%% @doc This function takes as argument the relocation dictionary as produced by
+%% the translation of RTL code to LLVM and finds the names of the calls
+%% (MFA and BIF calls) that have more than NR_ARG_REGS.
+calls_with_stack_args(Dict) ->
+ calls_with_stack_args(dict:to_list(Dict), []).
+
+calls_with_stack_args([], Calls) -> Calls;
+calls_with_stack_args([ {_Name, {call, {M, F, A}}} | Rest], Calls)
+ when A > ?NR_ARG_REGS ->
+ Call =
+ case M of
+ bif -> {F,A};
+ _ -> {M,F,A}
+ end,
+ calls_with_stack_args(Rest, [Call|Calls]);
+calls_with_stack_args([_|Rest], Calls) ->
+ calls_with_stack_args(Rest, Calls).
+
+%% @doc This function extracts the stack arity and the offset in the code of
+%% the named calls (MFAs, BIFs) that have stack arguments.
+calls_offsets_arity(AccRefs, CallsWithStackArgs) ->
+ calls_offsets_arity(AccRefs, CallsWithStackArgs, []).
+
+calls_offsets_arity([], _, Acc) -> Acc;
+calls_offsets_arity([{Type, Offset, Term} | Rest], CallsWithStackArgs, Acc)
+ when Type =:= ?CALL_REMOTE orelse Type =:= ?CALL_LOCAL ->
+ case lists:member(Term, CallsWithStackArgs) of
+ true ->
+ Arity =
+ case Term of
+ {_M, _F, A} -> A;
+ {_F, A} -> A
+ end,
+ calls_offsets_arity(Rest, CallsWithStackArgs,
+ [{Offset + 4, Arity - ?NR_ARG_REGS} | Acc]);
+ false ->
+ calls_offsets_arity(Rest, CallsWithStackArgs, Acc)
+ end;
+calls_offsets_arity([_|Rest], CallsWithStackArgs, Acc) ->
+ calls_offsets_arity(Rest, CallsWithStackArgs, Acc).
+
+%% @doc This function extracts the stack arity and the offsets of closures that
+%% have stack arity. The Closures argument represents the
+%% hipe_bifs:llvm_exposure_closure/0 calls in the code. The actual closure
+%% is the next call in the code, so the offset of the next call must be
+%% calculated from the stack descriptors.
+closures_offsets_arity([], _) ->
+ [];
+closures_offsets_arity(ExposedClosures, SDescs) ->
+ Offsets = [Offset || {_, Offset, _} <- SDescs],
+ %% Offsets and closures must be sorted in order for find_offsets/3 to work
+ SortedOffsets = lists:sort(Offsets),
+ SortedExposedClosures = lists:keysort(1, ExposedClosures),
+ find_offsets(SortedExposedClosures, SortedOffsets, []).
+
+find_offsets([], _, Acc) -> Acc;
+find_offsets([{Off,Arity}|Rest], Offsets, Acc) ->
+ [I | RestOffsets] = lists:dropwhile(fun (Y) -> Y<Off end, Offsets),
+ find_offsets(Rest, RestOffsets, [{I, Arity}|Acc]).
+
+%% The function below corrects the stack descriptors of calls with arguments
+%% that are passed on the stack (more than NR_ARG_REGS) by subtracting the
+%% number of stacked arguments from the frame size and from the offset of the
+%% roots.
+fix_sdescs([], SDescs) -> SDescs;
+fix_sdescs([{Offset, Arity} | Rest], SDescs) ->
+ case lists:keyfind(Offset, 2, SDescs) of
+ false ->
+ fix_sdescs(Rest, SDescs);
+ {?SDESC, Offset, {ExnHandler, FrameSize, StkArity, Roots}} ->
+ FixedRoots = list_to_tuple([Ri - Arity || Ri <- tuple_to_list(Roots)]),
+ FixedSDesc =
+ {?SDESC, Offset, {ExnHandler, FrameSize - Arity, StkArity, FixedRoots}},
+ fix_sdescs(Rest, [FixedSDesc | lists:keydelete(Offset, 2, SDescs)])
+ end.
+
+%%------------------------------------------------------------------------------
+%% Miscellaneous functions
+%%------------------------------------------------------------------------------
+
+%% @doc A function that opens a file as binary. The function takes as argument
+%% the name of the file and returns an Erlang binary.
+-spec open_object_file(string()) -> binary().
+open_object_file(ObjFile) ->
+ case file:read_file(ObjFile) of
+ {ok, Binary} ->
+ Binary;
+ {error, Reason} ->
+ exit({?MODULE, open_file, Reason})
+ end.
+
+remove_temp_folder(Dir, Options) ->
+ case proplists:get_bool(llvm_save_temps, Options) of
+ true -> ok;
+ false -> spawn(fun () -> "" = os:cmd("rm -rf " ++ Dir) end), ok
+ end.
+
+unique_id(FunName, Arity) ->
+ integer_to_list(erlang:phash2({FunName, Arity, now()})).
+
+unique_folder(FunName, Arity, Options) ->
+ DirName = "llvm_" ++ unique_id(FunName, Arity) ++ "/",
+ Dir =
+ case proplists:get_bool(llvm_save_temps, Options) of
+ true -> %% Store folder in current directory
+ DirName;
+ false -> %% Temporarily store folder in tempfs (/dev/shm/)
+ "/dev/shm/" ++ DirName
+ end,
+ %% Make sure it does not exist
+ case dir_exists(Dir) of
+ true -> %% Dir already exists! Generate again.
+ unique_folder(FunName, Arity, Options);
+ false ->
+ Dir
+ end.
+
+%% @doc Function that checks that a given Filename is an existing Directory
+%% Name (from http://rosettacode.org/wiki/Ensure_that_a_file_exists#Erlang)
+dir_exists(Filename) ->
+ {Flag, Info} = file:read_file_info(Filename),
+ (Flag =:= ok) andalso (element(3, Info) =:= directory).
+
+%% @doc Function that takes as arguments a list of integers and a list with
+%% numbers indicating how many items should each tuple have and splits
+%% the original list to a list of lists of integers (with the specified
+%% number of elements), i.e. [ [...], [...] ].
+-spec split_list([integer()], [integer()]) -> [ [integer()] ].
+split_list(List, ElemsPerTuple) ->
+ split_list(List, ElemsPerTuple, []).
+
+-spec split_list([integer()], [integer()], [ [integer()] ]) -> [ [integer()] ].
+split_list([], [], Acc) ->
+ lists:reverse(Acc);
+split_list(List, [NumOfElems | MoreNums], Acc) ->
+ {L1, L2} = lists:split(NumOfElems, List),
+ split_list(L2, MoreNums, [ L1 | Acc]).
diff --git a/lib/hipe/llvm/hipe_llvm_merge.erl b/lib/hipe/llvm/hipe_llvm_merge.erl
new file mode 100644
index 0000000000..3ababfc21a
--- /dev/null
+++ b/lib/hipe/llvm/hipe_llvm_merge.erl
@@ -0,0 +1,114 @@
+%%% -*- erlang-indent-level: 2 -*-
+-module(hipe_llvm_merge).
+
+-export([finalize/3]).
+
+-include("hipe_llvm_arch.hrl").
+-include("../../kernel/src/hipe_ext_format.hrl").
+-include("../rtl/hipe_literals.hrl").
+-include("../main/hipe.hrl").
+
+finalize(CompiledCode, Closures, Exports) ->
+ CompiledCode1 = [CodePack || {_, CodePack} <- CompiledCode],
+ Code = [{MFA, [], ConstTab}
+ || {MFA, _, _ , ConstTab, _, _} <- CompiledCode1],
+ {ConstAlign, ConstSize, ConstMap, RefsFromConsts} =
+ hipe_pack_constants:pack_constants(Code, ?ARCH_REGISTERS:alignment()),
+ %% Compute total code size separately as a sanity check for alignment
+ CodeSize = compute_code_size(CompiledCode1, 0),
+ %% io:format("Code Size (pre-computed): ~w~n", [CodeSize]),
+ {CodeBinary, ExportMap} = merge_mfas(CompiledCode1, 0, <<>>, []),
+ %% io:format("Code Size (post-computed): ~w~n", [byte_size(CodeBinary)]),
+ ?VERBOSE_ASSERT(CodeSize =:= byte_size(CodeBinary)),
+ AccRefs = merge_refs(CompiledCode1, ConstMap, 0, []),
+ %% Bring CompiledCode to a combine_label_maps-acceptable form.
+ LabelMap = combine_label_maps(CompiledCode1, 0, gb_trees:empty()),
+ SC = hipe_pack_constants:slim_constmap(ConstMap),
+ DataRelocs = hipe_pack_constants:mk_data_relocs(RefsFromConsts, LabelMap),
+ SSE = hipe_pack_constants:slim_sorted_exportmap(ExportMap, Closures, Exports),
+ SlimRefs = hipe_pack_constants:slim_refs(AccRefs),
+ term_to_binary([{?VERSION_STRING(),?HIPE_SYSTEM_CRC},
+ ConstAlign, ConstSize,
+ SC, % ConstMap
+ DataRelocs, % LabelMap
+ SSE, % ExportMap
+ CodeSize, CodeBinary, SlimRefs,
+ 0,[] % ColdCodeSize, SlimColdRefs
+ ]).
+
+%% Copied from hipe_x86_assemble.erl
+nr_pad_bytes(Address) ->
+ (4 - (Address rem 4)) rem 4. % XXX: 16 or 32 instead?
+
+align_entry(Address) ->
+ Address + nr_pad_bytes(Address).
+
+compute_code_size([{_MFA, _BinaryCode, CodeSize, _, _, _}|Code], Size) ->
+ compute_code_size(Code, align_entry(Size+CodeSize));
+compute_code_size([], Size) -> Size.
+
+combine_label_maps([{MFA, _, CodeSize, _, _, LabelMap}|Code], Address, CLM) ->
+ NewCLM = merge_label_map(gb_trees:to_list(LabelMap), MFA, Address, CLM),
+ combine_label_maps(Code, align_entry(Address+CodeSize), NewCLM);
+combine_label_maps([], _Address, CLM) -> CLM.
+
+merge_label_map([{Label,Offset}|Rest], MFA, Address, CLM) ->
+ NewCLM = gb_trees:insert({MFA,Label}, Address+Offset, CLM),
+ merge_label_map(Rest, MFA, Address, NewCLM);
+merge_label_map([], _MFA, _Address, CLM) -> CLM.
+
+%% @doc Merge the MFAs' binary code to one continuous binary and compute the
+%% size of this binary. At the same time create an exportmap in a form
+%% of {Address, M, F, A}.
+%% XXX: Is alignment correct/optimal for X86/AMD64?
+merge_mfas([{{M,F,A}, CodeBinary, CodeSize, _, _, _}|Code],
+ Address, AccCode, AccExportMap) ->
+ ?VERBOSE_ASSERT(CodeSize =:= byte_size(CodeBinary)),
+ {Address1, Code1} =
+ case nr_pad_bytes(Address + CodeSize) of
+ 0 -> %% Retains alignment:
+ {Address + CodeSize, CodeBinary};
+ NrPadBytes -> %% Needs padding!
+ Padding = list_to_binary(lists:duplicate(NrPadBytes, 0)),
+ {Address + CodeSize + NrPadBytes, % =:= align_entry(Address+CodeSize)
+ <<CodeBinary/binary, Padding/binary>>}
+ end,
+ ?VERBOSE_ASSERT(Address1 =:=
+ align_entry(Address + CodeSize)), %XXX: Should address be aligned?
+ AccCode1 = <<AccCode/binary, Code1/binary>>,
+ merge_mfas(Code, Address1, AccCode1, [{Address, M, F, A}|AccExportMap]);
+merge_mfas([], _Address, AccCode, AccExportMap) ->
+ {AccCode, AccExportMap}.
+
+%% @doc Merge the references of relocatable symbols in the binary code. The
+%% offsets must be updated because of the merging of the code binaries!
+merge_refs([], _ConstMap, _Addr, AccRefs) -> AccRefs;
+merge_refs([{MFA, _, CodeSize, _, Refs, _}|Rest], ConstMap, Address, AccRefs) ->
+ %% Important!: The hipe_pack_constants:pack_constants/2 function assignes
+ %% unique numbers to constants (ConstNo). This numbers are used from now on,
+ %% instead of labels that were used before. So, in order to be compatible, we
+ %% must change all the constant labels in the Refs to the corresponding
+ %% ConstNo, that can be found in the ConstMap (#pcm_entry{}).
+ UpdatedRefs = [update_ref(label_to_constno(Ref, MFA, ConstMap), Address)
+ || Ref <- Refs],
+ merge_refs(Rest, ConstMap, align_entry(Address+CodeSize),
+ UpdatedRefs++AccRefs).
+
+label_to_constno({Type, Offset, {constant, Label}}, MFA, ConstMap) ->
+ ConstNo = hipe_pack_constants:find_const({MFA, Label}, ConstMap),
+ {Type, Offset, {constant, ConstNo}};
+label_to_constno(Other, _MFA, _ConstMap) ->
+ Other.
+
+%% @doc Update offset to a reference. In case of stack descriptors we must check
+%% if there exists an exception handler, because it must also be updated.
+update_ref({?SDESC, Offset, SDesc}, CodeAddr) ->
+ NewRefAddr = Offset+CodeAddr,
+ case SDesc of
+ {[], _, _, _} -> % No handler; only update offset
+ {?SDESC, NewRefAddr, SDesc};
+ {ExnHandler, FrameSize, StackArity, Roots} -> % Update exception handler
+ {?SDESC, NewRefAddr, {ExnHandler+CodeAddr, FrameSize, StackArity, Roots}}
+ end;
+update_ref({Type, Offset, Term}, CodeAddr) ->
+ {Type, Offset+CodeAddr, Term}.
diff --git a/lib/hipe/llvm/hipe_rtl_to_llvm.erl b/lib/hipe/llvm/hipe_rtl_to_llvm.erl
new file mode 100644
index 0000000000..d7d8d1b049
--- /dev/null
+++ b/lib/hipe/llvm/hipe_rtl_to_llvm.erl
@@ -0,0 +1,1613 @@
+%% -*- erlang-indent-level: 2 -*-
+
+-module(hipe_rtl_to_llvm).
+-author("Chris Stavrakakis, Yiannis Tsiouris").
+
+-export([translate/2]). % the main function of this module
+-export([fix_mfa_name/1]). % a help function used in hipe_llvm_main
+
+-include("../rtl/hipe_rtl.hrl").
+-include("../rtl/hipe_literals.hrl").
+-include("hipe_llvm_arch.hrl").
+
+-define(WORD_WIDTH, (?bytes_to_bits(hipe_rtl_arch:word_size()))).
+-define(BRANCH_META_TAKEN, "0").
+-define(BRANCH_META_NOT_TAKEN, "1").
+
+%%------------------------------------------------------------------------------
+%% @doc Main function for translating an RTL function to LLVM Assembly. Takes as
+%% input the RTL code and the variable indexes of possible garbage
+%% collection roots and returns the corresponing LLVM, a dictionary with
+%% all the relocations in the code and a hipe_consttab() with informaton
+%% about data.
+%%------------------------------------------------------------------------------
+translate(RTL, Roots) ->
+ Fun = hipe_rtl:rtl_fun(RTL),
+ Params = hipe_rtl:rtl_params(RTL),
+ Data = hipe_rtl:rtl_data(RTL),
+ Code = hipe_rtl:rtl_code(RTL),
+ %% Init unique symbol generator and initialize the label counter to the last
+ %% RTL label.
+ hipe_gensym:init(llvm),
+ {_, MaxLabel} = hipe_rtl:rtl_label_range(RTL),
+ put({llvm,label_count}, MaxLabel + 1),
+ %% Put first label of RTL code in process dictionary
+ find_code_entry_label(Code),
+ %% Initialize relocations symbol dictionary
+ Relocs = dict:new(),
+ %% Print RTL to file
+ %% {ok, File_rtl} = file:open("rtl_" ++integer_to_list(random:uniform(2000))
+ %% ++ ".rtl", [write]),
+ %% hipe_rtl:pp(File_rtl, RTL),
+ %% file:close(File_rtl),
+
+ %% Pass on RTL code to handle exception handling and identify labels of Fail
+ %% Blocks
+ {Code1, FailLabels} = fix_code(Code),
+ %% Allocate stack slots for each virtual register and declare gc roots
+ AllocaStackCode = alloca_stack(Code1, Params, Roots),
+ %% Translate Code
+ {LLVM_Code1, Relocs1, NewData} =
+ translate_instr_list(Code1, [], Relocs, Data),
+ %% Create LLVM code to declare relocation symbols as external symbols along
+ %% with local variables in order to use them as just any other variable
+ {FinalRelocs, ExternalDecl, LocalVars} =
+ handle_relocations(Relocs1, Data, Fun),
+ %% Pass on LLVM code in order to create Fail blocks and a landingpad
+ %% instruction to each one
+ LLVM_Code2 = add_landingpads(LLVM_Code1, FailLabels),
+ %% Create LLVM Code for the compiled function
+ LLVM_Code3 = create_function_definition(Fun, Params, LLVM_Code2,
+ AllocaStackCode ++ LocalVars),
+ %% Final Code = CompiledFunction + External Declarations
+ FinalLLVMCode = [LLVM_Code3 | ExternalDecl],
+ {FinalLLVMCode, FinalRelocs, NewData}.
+
+find_code_entry_label([]) ->
+ exit({?MODULE, find_code_entry_label, "Empty code"});
+find_code_entry_label([I|_]) ->
+ case hipe_rtl:is_label(I) of
+ true ->
+ put(first_label, hipe_rtl:label_name(I));
+ false ->
+ exit({?MODULE, find_code_entry_label, "First instruction is not a label"})
+ end.
+
+%% @doc Create a stack slot for each virtual register. The stack slots
+%% that correspond to possible garbage collection roots must be
+%% marked as such.
+alloca_stack(Code, Params, Roots) ->
+ %% Find all assigned virtual registers
+ Destinations = collect_destinations(Code),
+ %% Declare virtual registers, and declare garbage collection roots
+ do_alloca_stack(Destinations++Params, Params, Roots).
+
+collect_destinations(Code) ->
+ lists:usort(lists:flatmap(fun insn_dst/1, Code)).
+
+do_alloca_stack(Destinations, Params, Roots) ->
+ do_alloca_stack(Destinations, Params, Roots, []).
+
+do_alloca_stack([], _, _, Acc) ->
+ Acc;
+do_alloca_stack([D|Ds], Params, Roots, Acc) ->
+ {Name, _I} = trans_dst(D),
+ WordTy = hipe_llvm:mk_int(?WORD_WIDTH),
+ WordTyPtr = hipe_llvm:mk_pointer(WordTy),
+ ByteTyPtr = hipe_llvm:mk_pointer(hipe_llvm:mk_int(8)),
+ case hipe_rtl:is_var(D) of
+ true ->
+ Num = hipe_rtl:var_index(D),
+ I1 = hipe_llvm:mk_alloca(Name, WordTy, [], []),
+ case lists:member(Num, Roots) of
+ true -> %% Variable is a possible Root
+ T1 = mk_temp(),
+ BYTE_TYPE_PP = hipe_llvm:mk_pointer(ByteTyPtr),
+ I2 =
+ hipe_llvm:mk_conversion(T1, bitcast, WordTyPtr, Name, BYTE_TYPE_PP),
+ GcRootArgs = [{BYTE_TYPE_PP, T1}, {ByteTyPtr, "@gc_metadata"}],
+ I3 = hipe_llvm:mk_call([], false, [], [], hipe_llvm:mk_void(),
+ "@llvm.gcroot", GcRootArgs, []),
+ I4 = case lists:member(D, Params) of
+ false ->
+ hipe_llvm:mk_store(WordTy, "-5", WordTyPtr, Name,
+ [], [], false);
+ true -> []
+ end,
+ do_alloca_stack(Ds, Params, Roots, [I1, I2, I3, I4 | Acc]);
+ false ->
+ do_alloca_stack(Ds, Params, Roots, [I1|Acc])
+ end;
+ false ->
+ case hipe_rtl:is_reg(D) andalso isPrecoloured(D) of
+ true -> %% Precoloured registers are mapped to "special" stack slots
+ do_alloca_stack(Ds, Params, Roots, Acc);
+ false ->
+ I1 = case hipe_rtl:is_fpreg(D) of
+ true ->
+ FloatTy = hipe_llvm:mk_double(),
+ hipe_llvm:mk_alloca(Name, FloatTy, [], []);
+ false -> hipe_llvm:mk_alloca(Name, WordTy, [], [])
+ end,
+ do_alloca_stack(Ds, Params, Roots, [I1|Acc])
+ end
+ end.
+
+%%------------------------------------------------------------------------------
+%% @doc Translation of the linearized RTL Code. Each RTL instruction is
+%% translated to a list of LLVM Assembly instructions. The relocation
+%% dictionary is updated when needed.
+%%------------------------------------------------------------------------------
+translate_instr_list([], Acc, Relocs, Data) ->
+ {lists:reverse(lists:flatten(Acc)), Relocs, Data};
+translate_instr_list([I | Is], Acc, Relocs, Data) ->
+ {Acc1, NewRelocs, NewData} = translate_instr(I, Relocs, Data),
+ translate_instr_list(Is, [Acc1 | Acc], NewRelocs, NewData).
+
+translate_instr(I, Relocs, Data) ->
+ case I of
+ #alu{} ->
+ {I2, Relocs2} = trans_alu(I, Relocs),
+ {I2, Relocs2, Data};
+ #alub{} ->
+ {I2, Relocs2} = trans_alub(I, Relocs),
+ {I2, Relocs2, Data};
+ #branch{} ->
+ {I2, Relocs2} = trans_branch(I, Relocs),
+ {I2, Relocs2, Data};
+ #call{} ->
+ {I2, Relocs2} =
+ case hipe_rtl:call_fun(I) of
+ %% In AMD64 this instruction does nothing!
+ %% TODO: chech use of fwait in other architectures!
+ fwait ->
+ {[], Relocs};
+ _ ->
+ trans_call(I, Relocs)
+ end,
+ {I2, Relocs2, Data};
+ #comment{} ->
+ {I2, Relocs2} = trans_comment(I, Relocs),
+ {I2, Relocs2, Data};
+ #enter{} ->
+ {I2, Relocs2} = trans_enter(I, Relocs),
+ {I2, Relocs2, Data};
+ #fconv{} ->
+ {I2, Relocs2} = trans_fconv(I, Relocs),
+ {I2, Relocs2, Data};
+ #fload{} ->
+ {I2, Relocs2} = trans_fload(I, Relocs),
+ {I2, Relocs2, Data};
+ #fmove{} ->
+ {I2, Relocs2} = trans_fmove(I, Relocs),
+ {I2, Relocs2, Data};
+ #fp{} ->
+ {I2, Relocs2} = trans_fp(I, Relocs),
+ {I2, Relocs2, Data};
+ #fp_unop{} ->
+ {I2, Relocs2} = trans_fp_unop(I, Relocs),
+ {I2, Relocs2, Data};
+ #fstore{} ->
+ {I2, Relocs2} = trans_fstore(I, Relocs),
+ {I2, Relocs2, Data};
+ #goto{} ->
+ {I2, Relocs2} = trans_goto(I, Relocs),
+ {I2, Relocs2, Data};
+ #label{} ->
+ {I2, Relocs2} = trans_label(I, Relocs),
+ {I2, Relocs2, Data};
+ #load{} ->
+ {I2, Relocs2} = trans_load(I, Relocs),
+ {I2, Relocs2, Data};
+ #load_address{} ->
+ {I2, Relocs2} = trans_load_address(I, Relocs),
+ {I2, Relocs2, Data};
+ #load_atom{} ->
+ {I2, Relocs2} = trans_load_atom(I, Relocs),
+ {I2, Relocs2, Data};
+ #move{} ->
+ {I2, Relocs2} = trans_move(I, Relocs),
+ {I2, Relocs2, Data};
+ #return{} ->
+ {I2, Relocs2} = trans_return(I, Relocs),
+ {I2, Relocs2, Data};
+ #store{} ->
+ {I2, Relocs2} = trans_store(I, Relocs),
+ {I2, Relocs2, Data};
+ #switch{} -> %% Only switch instruction updates Data
+ {I2, Relocs2, NewData} = trans_switch(I, Relocs, Data),
+ {I2, Relocs2, NewData};
+ Other ->
+ exit({?MODULE, translate_instr, {"Unknown RTL instruction", Other}})
+ end.
+
+%%
+%% alu
+%%
+trans_alu(I, Relocs) ->
+ RtlDst = hipe_rtl:alu_dst(I),
+ TmpDst = mk_temp(),
+ {Src1, I1} = trans_src(hipe_rtl:alu_src1(I)),
+ {Src2, I2} = trans_src(hipe_rtl:alu_src2(I)),
+ Op = trans_op(hipe_rtl:alu_op(I)),
+ WordTy = hipe_llvm:mk_int(?WORD_WIDTH),
+ I3 = hipe_llvm:mk_operation(TmpDst, Op, WordTy, Src1, Src2, []),
+ I4 = store_stack_dst(TmpDst, RtlDst),
+ {[I4, I3, I2, I1], Relocs}.
+
+%%
+%% alub
+%%
+trans_alub(I, Relocs) ->
+ case hipe_rtl:alub_cond(I) of
+ Op when Op =:= overflow orelse Op =:= not_overflow ->
+ trans_alub_overflow(I, signed, Relocs);
+ ltu -> %% ltu means unsigned overflow
+ trans_alub_overflow(I, unsigned, Relocs);
+ _ ->
+ trans_alub_no_overflow(I, Relocs)
+ end.
+
+trans_alub_overflow(I, Sign, Relocs) ->
+ {Src1, I1} = trans_src(hipe_rtl:alub_src1(I)),
+ {Src2, I2} = trans_src(hipe_rtl:alub_src2(I)),
+ RtlDst = hipe_rtl:alub_dst(I),
+ TmpDst = mk_temp(),
+ Name = trans_alub_op(I, Sign),
+ NewRelocs = relocs_store(Name, {call, {llvm, Name, 2}}, Relocs),
+ WordTy = hipe_llvm:mk_int(?WORD_WIDTH),
+ ReturnType = hipe_llvm:mk_struct([WordTy, hipe_llvm:mk_int(1)]),
+ T1 = mk_temp(),
+ I3 = hipe_llvm:mk_call(T1, false, [], [], ReturnType, "@" ++ Name,
+ [{WordTy, Src1}, {WordTy, Src2}], []),
+ %% T1{0}: result of the operation
+ I4 = hipe_llvm:mk_extractvalue(TmpDst, ReturnType, T1 , "0", []),
+ I5 = store_stack_dst(TmpDst, RtlDst),
+ T2 = mk_temp(),
+ %% T1{1}: Boolean variable indicating overflow
+ I6 = hipe_llvm:mk_extractvalue(T2, ReturnType, T1, "1", []),
+ case hipe_rtl:alub_cond(I) of
+ Op when Op =:= overflow orelse Op =:= ltu ->
+ True_label = mk_jump_label(hipe_rtl:alub_true_label(I)),
+ False_label = mk_jump_label(hipe_rtl:alub_false_label(I)),
+ MetaData = branch_metadata(hipe_rtl:alub_pred(I));
+ not_overflow ->
+ True_label = mk_jump_label(hipe_rtl:alub_false_label(I)),
+ False_label = mk_jump_label(hipe_rtl:alub_true_label(I)),
+ MetaData = branch_metadata(1 - hipe_rtl:alub_pred(I))
+ end,
+ I7 = hipe_llvm:mk_br_cond(T2, True_label, False_label, MetaData),
+ {[I7, I6, I5, I4, I3, I2, I1], NewRelocs}.
+
+trans_alub_op(I, Sign) ->
+ Name =
+ case Sign of
+ signed ->
+ case hipe_rtl:alub_op(I) of
+ add -> "llvm.sadd.with.overflow.";
+ mul -> "llvm.smul.with.overflow.";
+ sub -> "llvm.ssub.with.overflow.";
+ Op -> exit({?MODULE, trans_alub_op, {"Unknown alub operator", Op}})
+ end;
+ unsigned ->
+ case hipe_rtl:alub_op(I) of
+ add -> "llvm.uadd.with.overflow.";
+ mul -> "llvm.umul.with.overflow.";
+ sub -> "llvm.usub.with.overflow.";
+ Op -> exit({?MODULE, trans_alub_op, {"Unknown alub operator", Op}})
+ end
+ end,
+ Type =
+ case hipe_rtl_arch:word_size() of
+ 4 -> "i32";
+ 8 -> "i64"
+ %% Other -> exit({?MODULE, trans_alub_op, {"Unknown type", Other}})
+ end,
+ Name ++ Type.
+
+trans_alub_no_overflow(I, Relocs) ->
+ %% alu
+ T = hipe_rtl:mk_alu(hipe_rtl:alub_dst(I), hipe_rtl:alub_src1(I),
+ hipe_rtl:alub_op(I), hipe_rtl:alub_src2(I)),
+ %% A trans_alu instruction cannot change relocations
+ {I1, _} = trans_alu(T, Relocs),
+ %% icmp
+ %% Translate destination as src, to match with the semantics of instruction
+ {Dst, I2} = trans_src(hipe_rtl:alub_dst(I)),
+ Cond = trans_rel_op(hipe_rtl:alub_cond(I)),
+ T3 = mk_temp(),
+ WordTy = hipe_llvm:mk_int(?WORD_WIDTH),
+ I5 = hipe_llvm:mk_icmp(T3, Cond, WordTy, Dst, "0"),
+ %% br
+ Metadata = branch_metadata(hipe_rtl:alub_pred(I)),
+ True_label = mk_jump_label(hipe_rtl:alub_true_label(I)),
+ False_label = mk_jump_label(hipe_rtl:alub_false_label(I)),
+ I6 = hipe_llvm:mk_br_cond(T3, True_label, False_label, Metadata),
+ {[I6, I5, I2, I1], Relocs}.
+
+%%
+%% branch
+%%
+trans_branch(I, Relocs) ->
+ {Src1, I1} = trans_src(hipe_rtl:branch_src1(I)),
+ {Src2, I2} = trans_src(hipe_rtl:branch_src2(I)),
+ Cond = trans_rel_op(hipe_rtl:branch_cond(I)),
+ %% icmp
+ T1 = mk_temp(),
+ WordTy = hipe_llvm:mk_int(?WORD_WIDTH),
+ I3 = hipe_llvm:mk_icmp(T1, Cond, WordTy, Src1, Src2),
+ %% br
+ True_label = mk_jump_label(hipe_rtl:branch_true_label(I)),
+ False_label = mk_jump_label(hipe_rtl:branch_false_label(I)),
+ Metadata = branch_metadata(hipe_rtl:branch_pred(I)),
+ I4 = hipe_llvm:mk_br_cond(T1, True_label, False_label, Metadata),
+ {[I4, I3, I2, I1], Relocs}.
+
+branch_metadata(X) when X =:= 0.5 -> [];
+branch_metadata(X) when X > 0.5 -> ?BRANCH_META_TAKEN;
+branch_metadata(X) when X < 0.5 -> ?BRANCH_META_NOT_TAKEN.
+
+%%
+%% call
+%%
+trans_call(I, Relocs) ->
+ RtlCallArgList= hipe_rtl:call_arglist(I),
+ RtlCallName = hipe_rtl:call_fun(I),
+ {I0, Relocs1} = expose_closure(RtlCallName, RtlCallArgList, Relocs),
+ TmpDst = mk_temp(),
+ {CallArgs, I1} = trans_call_args(RtlCallArgList),
+ FixedRegs = fixed_registers(),
+ {LoadedFixedRegs, I2} = load_fixed_regs(FixedRegs),
+ FinalArgs = fix_reg_args(LoadedFixedRegs) ++ CallArgs,
+ {Name, I3, Relocs2} =
+ trans_call_name(RtlCallName, Relocs1, CallArgs, FinalArgs),
+ T1 = mk_temp(),
+ WordTy = hipe_llvm:mk_int(?WORD_WIDTH),
+ FunRetTy = hipe_llvm:mk_struct(lists:duplicate(?NR_PINNED_REGS + 1, WordTy)),
+ I4 =
+ case hipe_rtl:call_fail(I) of
+ %% Normal Call
+ [] ->
+ hipe_llvm:mk_call(T1, false, "cc 11", [], FunRetTy, Name, FinalArgs,
+ []);
+ %% Call With Exception
+ FailLabelNum ->
+ TrueLabel = "L" ++ integer_to_list(hipe_rtl:call_normal(I)),
+ FailLabel = "%FL" ++ integer_to_list(FailLabelNum),
+ II1 =
+ hipe_llvm:mk_invoke(T1, "cc 11", [], FunRetTy, Name, FinalArgs, [],
+ "%" ++ TrueLabel, FailLabel),
+ II2 = hipe_llvm:mk_label(TrueLabel),
+ [II2, II1]
+ end,
+ I5 = store_fixed_regs(FixedRegs, T1),
+ I6 =
+ case hipe_rtl:call_dstlist(I) of
+ [] -> []; %% No return value
+ [Destination] ->
+ II3 =
+ hipe_llvm:mk_extractvalue(TmpDst, FunRetTy, T1,
+ integer_to_list(?NR_PINNED_REGS), []),
+ II4 = store_stack_dst(TmpDst, Destination),
+ [II4, II3]
+ end,
+ I7 =
+ case hipe_rtl:call_continuation(I) of
+ [] -> []; %% No continuation
+ CC ->
+ {II5, _} = trans_goto(hipe_rtl:mk_goto(CC), Relocs2),
+ II5
+ end,
+ {[I7, I6, I5, I4, I3, I2, I1, I0], Relocs2}.
+
+%% In case of call to a register (closure call) with more than ?NR_ARG_REGS
+%% arguments we must track the offset this call in the code, in order to
+%% to correct the stack descriptor. So, we insert a new Label and add this label
+%% to the "table_closures"
+%% --------------------------------|--------------------------------------------
+%% Old Code | New Code
+%% --------------------------------|--------------------------------------------
+%% | br %ClosureLabel
+%% call %reg(Args) | ClosureLabel:
+%% | call %reg(Args)
+expose_closure(CallName, CallArgs, Relocs) ->
+ CallArgsNr = length(CallArgs),
+ case hipe_rtl:is_reg(CallName) andalso CallArgsNr > ?NR_ARG_REGS of
+ true ->
+ LabelNum = hipe_gensym:new_label(llvm),
+ ClosureLabel = hipe_llvm:mk_label(mk_label(LabelNum)),
+ JumpIns = hipe_llvm:mk_br(mk_jump_label(LabelNum)),
+ Relocs1 =
+ relocs_store({CallName, LabelNum},
+ {closure_label, LabelNum, CallArgsNr - ?NR_ARG_REGS},
+ Relocs),
+ {[ClosureLabel, JumpIns], Relocs1};
+ false ->
+ {[], Relocs}
+ end.
+
+trans_call_name(RtlCallName, Relocs, CallArgs, FinalArgs) ->
+ case RtlCallName of
+ PrimOp when is_atom(PrimOp) ->
+ LlvmName = trans_prim_op(PrimOp),
+ Relocs1 =
+ relocs_store(LlvmName, {call, {bif, PrimOp, length(CallArgs)}}, Relocs),
+ {"@" ++ LlvmName, [], Relocs1};
+ {M, F, A} when is_atom(M), is_atom(F), is_integer(A) ->
+ LlvmName = trans_mfa_name({M, F, A}),
+ Relocs1 =
+ relocs_store(LlvmName, {call, {M, F, length(CallArgs)}}, Relocs),
+ {"@" ++ LlvmName, [], Relocs1};
+ Reg ->
+ case hipe_rtl:is_reg(Reg) of
+ true ->
+ %% In case of a closure call, the register holding the address
+ %% of the closure must be converted to function type in
+ %% order to make the call
+ TT1 = mk_temp(),
+ {RegName, II1} = trans_src(Reg),
+ WordTy = hipe_llvm:mk_int(?WORD_WIDTH),
+ WordTyPtr = hipe_llvm:mk_pointer(WordTy),
+ II2 =
+ hipe_llvm:mk_conversion(TT1, inttoptr, WordTy, RegName, WordTyPtr),
+ TT2 = mk_temp(),
+ ArgsTypeList = lists:duplicate(length(FinalArgs), WordTy),
+ FunRetTy =
+ hipe_llvm:mk_struct(lists:duplicate(?NR_PINNED_REGS + 1, WordTy)),
+ FunType = hipe_llvm:mk_fun(FunRetTy, ArgsTypeList),
+ FunTypeP = hipe_llvm:mk_pointer(FunType),
+ II3 = hipe_llvm:mk_conversion(TT2, bitcast, WordTyPtr, TT1, FunTypeP),
+ {TT2, [II3, II2, II1], Relocs};
+ false ->
+ exit({?MODULE, trans_call, {"Unimplemented call to", RtlCallName}})
+ end
+ end.
+
+%%
+trans_call_args(ArgList) ->
+ {Args, I} = lists:unzip(trans_args(ArgList)),
+ %% Reverse arguments that are passed to stack to match with the Erlang
+ %% calling convention. (Propably not needed in prim calls.)
+ ReversedArgs =
+ case erlang:length(Args) > ?NR_ARG_REGS of
+ false ->
+ Args;
+ true ->
+ {ArgsInRegs, ArgsInStack} = lists:split(?NR_ARG_REGS, Args),
+ ArgsInRegs ++ lists:reverse(ArgsInStack)
+ end,
+ %% Reverse I, because some of the arguments may go out of scope and
+ %% should be killed(store -5). When two or more arguments are they
+ %% same, then order matters!
+ {ReversedArgs, lists:reverse(I)}.
+
+%%
+%% trans_comment
+%%
+trans_comment(I, Relocs) ->
+ I1 = hipe_llvm:mk_comment(hipe_rtl:comment_text(I)),
+ {I1, Relocs}.
+
+%%
+%% enter
+%%
+trans_enter(I, Relocs) ->
+ {CallArgs, I0} = trans_call_args(hipe_rtl:enter_arglist(I)),
+ FixedRegs = fixed_registers(),
+ {LoadedFixedRegs, I1} = load_fixed_regs(FixedRegs),
+ FinalArgs = fix_reg_args(LoadedFixedRegs) ++ CallArgs,
+ {Name, I2, NewRelocs} =
+ trans_call_name(hipe_rtl:enter_fun(I), Relocs, CallArgs, FinalArgs),
+ T1 = mk_temp(),
+ WordTy = hipe_llvm:mk_int(?WORD_WIDTH),
+ FunRetTy = hipe_llvm:mk_struct(lists:duplicate(?NR_PINNED_REGS + 1, WordTy)),
+ I3 = hipe_llvm:mk_call(T1, true, "cc 11", [], FunRetTy, Name, FinalArgs, []),
+ I4 = hipe_llvm:mk_ret([{FunRetTy, T1}]),
+ {[I4, I3, I2, I1, I0], NewRelocs}.
+
+%%
+%% fconv
+%%
+trans_fconv(I, Relocs) ->
+ %% XXX: Can a fconv destination be a precoloured reg?
+ RtlDst = hipe_rtl:fconv_dst(I),
+ TmpDst = mk_temp(),
+ {Src, I1} = trans_float_src(hipe_rtl:fconv_src(I)),
+ FloatTy = hipe_llvm:mk_double(),
+ WordTy = hipe_llvm:mk_int(?WORD_WIDTH),
+ I2 = hipe_llvm:mk_conversion(TmpDst, sitofp, WordTy, Src, FloatTy),
+ I3 = store_float_stack(TmpDst, RtlDst),
+ {[I3, I2, I1], Relocs}.
+
+
+%% TODO: fload, fstore, fmove, and fp are almost the same with load, store, move
+%% and alu. Maybe we should join them.
+
+%%
+%% fload
+%%
+trans_fload(I, Relocs) ->
+ RtlDst = hipe_rtl:fload_dst(I),
+ RtlSrc = hipe_rtl:fload_src(I),
+ _Offset = hipe_rtl:fload_offset(I),
+ TmpDst = mk_temp(),
+ {Src, I1} = trans_float_src(RtlSrc),
+ {Offset, I2} = trans_float_src(_Offset),
+ T1 = mk_temp(),
+ WordTy = hipe_llvm:mk_int(?WORD_WIDTH),
+ FloatTyPtr = hipe_llvm:mk_pointer(hipe_llvm:mk_double()),
+ I3 = hipe_llvm:mk_operation(T1, add, WordTy, Src, Offset, []),
+ T2 = mk_temp(),
+ I4 = hipe_llvm:mk_conversion(T2, inttoptr, WordTy, T1, FloatTyPtr),
+ I5 = hipe_llvm:mk_load(TmpDst, FloatTyPtr, T2, [], [], false),
+ I6 = store_float_stack(TmpDst, RtlDst),
+ {[I6, I5, I4, I3, I2, I1], Relocs}.
+
+%%
+%% fmove
+%%
+trans_fmove(I, Relocs) ->
+ RtlDst = hipe_rtl:fmove_dst(I),
+ RtlSrc = hipe_rtl:fmove_src(I),
+ {Src, I1} = trans_float_src(RtlSrc),
+ I2 = store_float_stack(Src, RtlDst),
+ {[I2, I1], Relocs}.
+
+%%
+%% fp
+%%
+trans_fp(I, Relocs) ->
+ %% XXX: Just copied trans_alu...think again..
+ RtlDst = hipe_rtl:fp_dst(I),
+ RtlSrc1 = hipe_rtl:fp_src1(I),
+ RtlSrc2 = hipe_rtl:fp_src2(I),
+ %% Destination cannot be a precoloured register
+ FloatTy = hipe_llvm:mk_double(),
+ FloatTyPtr = hipe_llvm:mk_pointer(FloatTy),
+ TmpDst = mk_temp(),
+ {Src1, I1} = trans_float_src(RtlSrc1),
+ {Src2, I2} = trans_float_src(RtlSrc2),
+ Op = trans_fp_op(hipe_rtl:fp_op(I)),
+ I3 = hipe_llvm:mk_operation(TmpDst, Op, FloatTy, Src1, Src2, []),
+ I4 = store_float_stack(TmpDst, RtlDst),
+ %% Synchronization for floating point exceptions
+ I5 = hipe_llvm:mk_store(FloatTy, TmpDst, FloatTyPtr, "%exception_sync", [],
+ [], true),
+ T1 = mk_temp(),
+ I6 = hipe_llvm:mk_load(T1, FloatTyPtr, "%exception_sync", [], [], true),
+ {[I6, I5, I4, I3, I2, I1], Relocs}.
+
+%%
+%% fp_unop
+%%
+trans_fp_unop(I, Relocs) ->
+ RtlDst = hipe_rtl:fp_unop_dst(I),
+ RtlSrc = hipe_rtl:fp_unop_src(I),
+ %% Destination cannot be a precoloured register
+ TmpDst = mk_temp(),
+ {Src, I1} = trans_float_src(RtlSrc),
+ Op = trans_fp_op(hipe_rtl:fp_unop_op(I)),
+ FloatTy = hipe_llvm:mk_double(),
+ I2 = hipe_llvm:mk_operation(TmpDst, Op, FloatTy, "0.0", Src, []),
+ I3 = store_float_stack(TmpDst, RtlDst),
+ {[I3, I2, I1], Relocs}.
+%% TODO: Fix fp_unop in a way like the following. You must change trans_dest,
+%% in order to call float_to_list in a case of float constant. Maybe the type
+%% check is expensive...
+%% Dst = hipe_rtl:fp_unop_dst(I),
+%% Src = hipe_rtl:fp_unop_src(I),
+%% Op = hipe_rtl:fp_unop_op(I),
+%% Zero = hipe_rtl:mk_imm(0.0),
+%% I1 = hipe_rtl:mk_fp(Dst, Zero, Op, Src),
+%% trans_fp(I, Relocs1).
+
+%%
+%% fstore
+%%
+trans_fstore(I, Relocs) ->
+ Base = hipe_rtl:fstore_base(I),
+ case isPrecoloured(Base) of
+ true ->
+ trans_fstore_reg(I, Relocs);
+ false ->
+ exit({?MODULE, trans_fstore ,{"Not implemented yet", false}})
+ end.
+
+trans_fstore_reg(I, Relocs) ->
+ {Base, I0} = trans_reg(hipe_rtl:fstore_base(I), dst),
+ WordTy = hipe_llvm:mk_int(?WORD_WIDTH),
+ WordTyPtr = hipe_llvm:mk_pointer(WordTy),
+ FloatTy = hipe_llvm:mk_double(),
+ FloatTyPtr = hipe_llvm:mk_pointer(FloatTy),
+ T1 = mk_temp(),
+ I1 = hipe_llvm:mk_load(T1, WordTyPtr, Base, [], [], false),
+ {Offset, I2} = trans_src(hipe_rtl:fstore_offset(I)),
+ T2 = mk_temp(),
+ I3 = hipe_llvm:mk_operation(T2, add, WordTy, T1, Offset, []),
+ T3 = mk_temp(),
+ I4 = hipe_llvm:mk_conversion(T3, inttoptr, WordTy, T2, FloatTyPtr),
+ {Value, I5} = trans_src(hipe_rtl:fstore_src(I)),
+ I6 = hipe_llvm:mk_store(FloatTy, Value, FloatTyPtr, T3, [], [], false),
+ {[I6, I5, I4, I3, I2, I1, I0], Relocs}.
+
+%%
+%% goto
+%%
+trans_goto(I, Relocs) ->
+ I1 = hipe_llvm:mk_br(mk_jump_label(hipe_rtl:goto_label(I))),
+ {I1, Relocs}.
+
+%%
+%% label
+%%
+trans_label(I, Relocs) ->
+ Label = mk_label(hipe_rtl:label_name(I)),
+ I1 = hipe_llvm:mk_label(Label),
+ {I1, Relocs}.
+
+%%
+%% load
+%%
+trans_load(I, Relocs) ->
+ RtlDst = hipe_rtl:load_dst(I),
+ TmpDst = mk_temp(),
+ %% XXX: Why translate them independently? ------------------------
+ {Src, I1} = trans_src(hipe_rtl:load_src(I)),
+ {Offset, I2} = trans_src(hipe_rtl:load_offset(I)),
+ T1 = mk_temp(),
+ WordTy = hipe_llvm:mk_int(?WORD_WIDTH),
+ WordTyPtr = hipe_llvm:mk_pointer(WordTy),
+ I3 = hipe_llvm:mk_operation(T1, add, WordTy, Src, Offset, []),
+ %%----------------------------------------------------------------
+ I4 = case hipe_rtl:load_size(I) of
+ word ->
+ T2 = mk_temp(),
+ II1 = hipe_llvm:mk_conversion(T2, inttoptr, WordTy, T1, WordTyPtr),
+ II2 = hipe_llvm:mk_load(TmpDst, WordTyPtr, T2, [], [], false),
+ [II2, II1];
+ Size ->
+ LoadType = llvm_type_from_size(Size),
+ LoadTypeP = hipe_llvm:mk_pointer(LoadType),
+ T2 = mk_temp(),
+ II1 = hipe_llvm:mk_conversion(T2, inttoptr, WordTy, T1, LoadTypeP),
+ T3 = mk_temp(),
+ LoadTypePointer = hipe_llvm:mk_pointer(LoadType),
+ II2 = hipe_llvm:mk_load(T3, LoadTypePointer, T2, [], [], false),
+ Conversion =
+ case hipe_rtl:load_sign(I) of
+ signed -> sext;
+ unsigned -> zext
+ end,
+ II3 =
+ hipe_llvm:mk_conversion(TmpDst, Conversion, LoadType, T3, WordTy),
+ [II3, II2, II1]
+ end,
+ I5 = store_stack_dst(TmpDst, RtlDst),
+ {[I5, I4, I3, I2, I1], Relocs}.
+
+%%
+%% load_address
+%%
+trans_load_address(I, Relocs) ->
+ RtlDst = hipe_rtl:load_address_dst(I),
+ RtlAddr = hipe_rtl:load_address_addr(I),
+ {Addr, NewRelocs} =
+ case hipe_rtl:load_address_type(I) of
+ constant ->
+ {"%DL" ++ integer_to_list(RtlAddr) ++ "_var", Relocs};
+ closure ->
+ {{_, ClosureName, _}, _, _} = RtlAddr,
+ FixedClosureName = fix_closure_name(ClosureName),
+ Relocs1 = relocs_store(FixedClosureName, {closure, RtlAddr}, Relocs),
+ {"%" ++ FixedClosureName ++ "_var", Relocs1};
+ type ->
+ exit({?MODULE, trans_load_address,
+ {"Type not implemented in load_address", RtlAddr}})
+ end,
+ I1 = store_stack_dst(Addr, RtlDst),
+ {[I1], NewRelocs}.
+
+%%
+%% load_atom
+%%
+trans_load_atom(I, Relocs) ->
+ RtlDst = hipe_rtl:load_atom_dst(I),
+ RtlAtom = hipe_rtl:load_atom_atom(I),
+ AtomName = "atom_" ++ make_llvm_id(atom_to_list(RtlAtom)),
+ AtomVar = "%" ++ AtomName ++ "_var",
+ NewRelocs = relocs_store(AtomName, {atom, RtlAtom}, Relocs),
+ I1 = store_stack_dst(AtomVar, RtlDst),
+ {[I1], NewRelocs}.
+
+%%
+%% move
+%%
+trans_move(I, Relocs) ->
+ RtlDst = hipe_rtl:move_dst(I),
+ RtlSrc = hipe_rtl:move_src(I),
+ {Src, I1} = trans_src(RtlSrc),
+ I2 = store_stack_dst(Src, RtlDst),
+ {[I2, I1], Relocs}.
+
+%%
+%% return
+%%
+trans_return(I, Relocs) ->
+ WordTy = hipe_llvm:mk_int(?WORD_WIDTH),
+ {VarRet, I1} =
+ case hipe_rtl:return_varlist(I) of
+ [] ->
+ {[], []};
+ [A] ->
+ {Name, II1} = trans_src(A),
+ {[{WordTy, Name}], II1}
+ end,
+ FixedRegs = fixed_registers(),
+ {LoadedFixedRegs, I2} = load_fixed_regs(FixedRegs),
+ FixedRet = [{WordTy, X} || X <- LoadedFixedRegs],
+ Ret = FixedRet ++ VarRet,
+ {RetTypes, _RetNames} = lists:unzip(Ret),
+ Type = hipe_llvm:mk_struct(RetTypes),
+ {RetStruct, I3} = mk_return_struct(Ret, Type),
+ I4 = hipe_llvm:mk_ret([{Type, RetStruct}]),
+ {[I4, I3, I2, I1], Relocs}.
+
+%% @doc Create a structure to hold the return value and the precoloured
+%% registers.
+mk_return_struct(RetValues, Type) ->
+ mk_return_struct(RetValues, Type, [], "undef", 0).
+
+mk_return_struct([], _, Acc, StructName, _) ->
+ {StructName, Acc};
+mk_return_struct([{ElemType, ElemName}|Rest], Type, Acc, StructName, Index) ->
+ T1 = mk_temp(),
+ I1 = hipe_llvm:mk_insertvalue(T1, Type, StructName, ElemType, ElemName,
+ integer_to_list(Index), []),
+ mk_return_struct(Rest, Type, [I1 | Acc], T1, Index+1).
+
+%%
+%% store
+%%
+trans_store(I, Relocs) ->
+ {Base, I1} = trans_src(hipe_rtl:store_base(I)),
+ {Offset, I2} = trans_src(hipe_rtl:store_offset(I)),
+ {Value, I3} = trans_src(hipe_rtl:store_src(I)),
+ T1 = mk_temp(),
+ WordTy = hipe_llvm:mk_int(?WORD_WIDTH),
+ WordTyPtr = hipe_llvm:mk_pointer(WordTy),
+ I4 = hipe_llvm:mk_operation(T1, add, WordTy, Base, Offset, []),
+ I5 =
+ case hipe_rtl:store_size(I) of
+ word ->
+ T2 = mk_temp(),
+ II1 = hipe_llvm:mk_conversion(T2, inttoptr, WordTy, T1, WordTyPtr),
+ II2 = hipe_llvm:mk_store(WordTy, Value, WordTyPtr, T2, [], [],
+ false),
+ [II2, II1];
+ Size ->
+ %% XXX: Is always trunc correct ?
+ LoadType = llvm_type_from_size(Size),
+ LoadTypePointer = hipe_llvm:mk_pointer(LoadType),
+ T2 = mk_temp(),
+ II1 = hipe_llvm:mk_conversion(T2, inttoptr, WordTy, T1, LoadTypePointer),
+ T3 = mk_temp(),
+ II2 = hipe_llvm:mk_conversion(T3, 'trunc', WordTy, Value, LoadType),
+ II3 = hipe_llvm:mk_store(LoadType, T3, LoadTypePointer, T2, [], [], false),
+ [II3, II2, II1]
+ end,
+ {[I5, I4, I3, I2, I1], Relocs}.
+
+%%
+%% switch
+%%
+trans_switch(I, Relocs, Data) ->
+ RtlSrc = hipe_rtl:switch_src(I),
+ {Src, I1} = trans_src(RtlSrc),
+ Labels = hipe_rtl:switch_labels(I),
+ JumpLabels = [mk_jump_label(L) || L <- Labels],
+ SortOrder = hipe_rtl:switch_sort_order(I),
+ NrLabels = length(Labels),
+ ByteTyPtr = hipe_llvm:mk_pointer(hipe_llvm:mk_int(8)),
+ TableType = hipe_llvm:mk_array(NrLabels, ByteTyPtr),
+ TableTypeP = hipe_llvm:mk_pointer(TableType),
+ TypedJumpLabels = [{hipe_llvm:mk_label_type(), X} || X <- JumpLabels],
+ T1 = mk_temp(),
+ {Src2, []} = trans_dst(RtlSrc),
+ TableName = "table_" ++ tl(Src2),
+ WordTy = hipe_llvm:mk_int(?WORD_WIDTH),
+ I2 = hipe_llvm:mk_getelementptr(T1, TableTypeP, "@"++TableName,
+ [{WordTy, "0"}, {WordTy, Src}], false),
+ T2 = mk_temp(),
+ BYTE_TYPE_PP = hipe_llvm:mk_pointer(ByteTyPtr),
+ I3 = hipe_llvm:mk_load(T2, BYTE_TYPE_PP, T1, [], [], false),
+ I4 = hipe_llvm:mk_indirectbr(ByteTyPtr, T2, TypedJumpLabels),
+ LMap = [{label, L} || L <- Labels],
+ %% Update data with the info for the jump table
+ {NewData, JTabLab} =
+ case hipe_rtl:switch_sort_order(I) of
+ [] ->
+ hipe_consttab:insert_block(Data, word, LMap);
+ SortOrder ->
+ hipe_consttab:insert_sorted_block(Data, word, LMap, SortOrder)
+ end,
+ Relocs2 = relocs_store(TableName, {switch, {TableType, Labels, NrLabels,
+ SortOrder}, JTabLab}, Relocs),
+ {[I4, I3, I2, I1], Relocs2, NewData}.
+
+%% @doc Pass on RTL code in order to fix invoke and closure calls.
+fix_code(Code) ->
+ fix_calls(Code).
+
+%% @doc Fix invoke calls and closure calls with more than ?NR_ARG_REGS
+%% arguments.
+fix_calls(Code) ->
+ fix_calls(Code, [], []).
+
+fix_calls([], Acc, FailLabels) ->
+ {lists:reverse(Acc), FailLabels};
+fix_calls([I | Is], Acc, FailLabels) ->
+ case hipe_rtl:is_call(I) of
+ true ->
+ {NewCall, NewFailLabels} =
+ case hipe_rtl:call_fail(I) of
+ [] ->
+ {I, FailLabels};
+ FailLabel ->
+ fix_invoke_call(I, FailLabel, FailLabels)
+ end,
+ fix_calls(Is, [NewCall|Acc], NewFailLabels);
+ false ->
+ fix_calls(Is, [I|Acc], FailLabels)
+ end.
+
+%% @doc When a call has a fail continuation label it must be extended with a
+%% normal continuation label to go with the LLVM's invoke instruction.
+%% FailLabels is the list of labels of all fail blocks, which are needed to
+%% be declared as landing pads. Furtermore, we must add to fail labels a
+%% call to hipe_bifs:llvm_fix_pinned_regs/0 in order to avoid reloading old
+%% values of pinned registers. This may happen because the result of an
+%% invoke instruction is not available at fail-labels, and, thus, we cannot
+%% get the correct values of pinned registers. Finally, the stack needs to
+%% be re-adjusted when there are stack arguments.
+fix_invoke_call(I, FailLabel, FailLabels) ->
+ NewLabel = hipe_gensym:new_label(llvm),
+ NewCall1 = hipe_rtl:call_normal_update(I, NewLabel),
+ SpAdj = find_sp_adj(hipe_rtl:call_arglist(I)),
+ case lists:keyfind(FailLabel, 1, FailLabels) of
+ %% Same fail label with same Stack Pointer adjustment
+ {FailLabel, NewFailLabel, SpAdj} ->
+ NewCall2 = hipe_rtl:call_fail_update(NewCall1, NewFailLabel),
+ {NewCall2, FailLabels};
+ %% Same fail label but with different Stack Pointer adjustment
+ {_, _, _} ->
+ NewFailLabel = hipe_gensym:new_label(llvm),
+ NewCall2 = hipe_rtl:call_fail_update(NewCall1, NewFailLabel),
+ {NewCall2, [{FailLabel, NewFailLabel, SpAdj} | FailLabels]};
+ %% New Fail label
+ false ->
+ NewFailLabel = hipe_gensym:new_label(llvm),
+ NewCall2 = hipe_rtl:call_fail_update(NewCall1, NewFailLabel),
+ {NewCall2, [{FailLabel, NewFailLabel, SpAdj} | FailLabels]}
+ end.
+
+find_sp_adj(ArgList) ->
+ NrArgs = length(ArgList),
+ case NrArgs > ?NR_ARG_REGS of
+ true ->
+ (NrArgs - ?NR_ARG_REGS) * hipe_rtl_arch:word_size();
+ false ->
+ 0
+ end.
+
+%% @doc Add landingpad instruction in Fail Blocks.
+add_landingpads(LLVM_Code, FailLabels) ->
+ FailLabels2 = [convert_label(T) || T <- FailLabels],
+ add_landingpads(LLVM_Code, FailLabels2, []).
+
+add_landingpads([], _, Acc) ->
+ lists:reverse(Acc);
+add_landingpads([I | Is], FailLabels, Acc) ->
+ case hipe_llvm:is_label(I) of
+ true ->
+ Label = hipe_llvm:label_label(I),
+ Ins = create_fail_blocks(Label, FailLabels),
+ add_landingpads(Is, FailLabels, [I | Ins] ++ Acc);
+ false ->
+ add_landingpads(Is, FailLabels, [I | Acc])
+ end.
+
+convert_label({X,Y,Z}) ->
+ {"L" ++ integer_to_list(X), "FL" ++ integer_to_list(Y), Z}.
+
+%% @doc Create a fail block wich.
+create_fail_blocks(_, []) -> [];
+create_fail_blocks(Label, FailLabels) ->
+ create_fail_blocks(Label, FailLabels, []).
+
+create_fail_blocks(Label, FailLabels, Acc) ->
+ case lists:keytake(Label, 1, FailLabels) of
+ false ->
+ Acc;
+ {value, {Label, FailLabel, SpAdj}, RestFailLabels} ->
+ WordTy = hipe_llvm:mk_int(?WORD_WIDTH),
+ I1 = hipe_llvm:mk_label(FailLabel),
+ LP = hipe_llvm:mk_landingpad(),
+ I2 =
+ case SpAdj > 0 of
+ true ->
+ StackPointer = ?ARCH_REGISTERS:reg_name(?ARCH_REGISTERS:sp()),
+ hipe_llvm:mk_adj_stack(integer_to_list(SpAdj), StackPointer,
+ WordTy);
+ false -> []
+ end,
+ T1 = mk_temp(),
+ FixedRegs = fixed_registers(),
+ FunRetTy =
+ hipe_llvm:mk_struct(lists:duplicate(?NR_PINNED_REGS + 1, WordTy)),
+ I3 = hipe_llvm:mk_call(T1, false, "cc 11", [], FunRetTy,
+ "@hipe_bifs.llvm_fix_pinned_regs.0", [], []),
+ I4 = store_fixed_regs(FixedRegs, T1),
+ I5 = hipe_llvm:mk_br("%" ++ Label),
+ Ins = lists:flatten([I5, I4, I3, I2, LP,I1]),
+ create_fail_blocks(Label, RestFailLabels, Ins ++ Acc)
+ end.
+
+%%------------------------------------------------------------------------------
+%% Miscellaneous Functions
+%%------------------------------------------------------------------------------
+
+%% @doc Convert RTL argument list to LLVM argument list.
+trans_args(ArgList) ->
+ WordTy = hipe_llvm:mk_int(?WORD_WIDTH),
+ MakeArg =
+ fun(A) ->
+ {Name, I1} = trans_src(A),
+ {{WordTy, Name}, I1}
+ end,
+ [MakeArg(A) || A <- ArgList].
+
+%% @doc Convert a list of Precoloured registers to LLVM argument list.
+fix_reg_args(ArgList) ->
+ WordTy = hipe_llvm:mk_int(?WORD_WIDTH),
+ [{WordTy, A} || A <- ArgList].
+
+%% @doc Load Precoloured registers.
+load_fixed_regs(RegList) ->
+ Names = [mk_temp_reg(R) || R <- RegList],
+ WordTy = hipe_llvm:mk_int(?WORD_WIDTH),
+ WordTyPtr = hipe_llvm:mk_pointer(WordTy),
+ Fun1 =
+ fun (X, Y) ->
+ hipe_llvm:mk_load(X, WordTyPtr, "%" ++ Y ++ "_reg_var", [], [], false)
+ end,
+ Ins = lists:zipwith(Fun1, Names, RegList),
+ {Names, Ins}.
+
+%% @doc Store Precoloured registers.
+store_fixed_regs(RegList, Name) ->
+ Names = [mk_temp_reg(R) || R <- RegList],
+ Indexes = lists:seq(0, erlang:length(RegList) - 1),
+ WordTy = hipe_llvm:mk_int(?WORD_WIDTH),
+ WordTyPtr = hipe_llvm:mk_pointer(WordTy),
+ FunRetTy = hipe_llvm:mk_struct(lists:duplicate(?NR_PINNED_REGS + 1, WordTy)),
+ Fun1 =
+ fun(X,Y) ->
+ hipe_llvm:mk_extractvalue(X, FunRetTy, Name, integer_to_list(Y), [])
+ end,
+ I1 = lists:zipwith(Fun1, Names, Indexes),
+ Fun2 =
+ fun (X, Y) ->
+ hipe_llvm:mk_store(WordTy, X, WordTyPtr, "%" ++ Y ++ "_reg_var", [], [],
+ false)
+ end,
+ I2 = lists:zipwith(Fun2, Names, RegList),
+ [I2, I1].
+
+%%------------------------------------------------------------------------------
+%% Translation of Names
+%%------------------------------------------------------------------------------
+
+%% @doc Fix F in MFA tuple to acceptable LLVM identifier (case of closure).
+-spec fix_mfa_name(mfa()) -> mfa().
+fix_mfa_name({Mod_Name, Closure_Name, Arity}) ->
+ Fun_Name = list_to_atom(fix_closure_name(Closure_Name)),
+ {Mod_Name, Fun_Name, Arity}.
+
+%% @doc Make an acceptable LLVM identifier for a closure name.
+fix_closure_name(ClosureName) ->
+ make_llvm_id(atom_to_list(ClosureName)).
+
+%% @doc Create an acceptable LLVM identifier.
+make_llvm_id(Name) ->
+ case Name of
+ "" -> "Empty";
+ Other -> lists:flatten([llvm_id(C) || C <- Other])
+ end.
+
+llvm_id(C) when C=:=46; C>47 andalso C<58; C>64 andalso C<91; C=:=95;
+ C>96 andalso C<123 ->
+ C;
+llvm_id(C) ->
+ io_lib:format("_~2.16.0B_",[C]).
+
+%% @doc Create an acceptable LLVM identifier for an MFA.
+trans_mfa_name({M,F,A}) ->
+ N = atom_to_list(M) ++ "." ++ atom_to_list(F) ++ "." ++ integer_to_list(A),
+ make_llvm_id(N).
+
+%%------------------------------------------------------------------------------
+%% Creation of Labels and Temporaries
+%%------------------------------------------------------------------------------
+mk_label(N) ->
+ "L" ++ integer_to_list(N).
+
+mk_jump_label(N) ->
+ "%L" ++ integer_to_list(N).
+
+mk_temp() ->
+ "%t" ++ integer_to_list(hipe_gensym:new_var(llvm)).
+
+mk_temp_reg(Name) ->
+ "%" ++ Name ++ integer_to_list(hipe_gensym:new_var(llvm)).
+
+%%----------------------------------------------------------------------------
+%% Translation of Operands
+%%----------------------------------------------------------------------------
+
+store_stack_dst(TempDst, Dst) ->
+ {Dst2, II1} = trans_dst(Dst),
+ WordTy = hipe_llvm:mk_int(?WORD_WIDTH),
+ WordTyPtr = hipe_llvm:mk_pointer(WordTy),
+ II2 = hipe_llvm:mk_store(WordTy, TempDst, WordTyPtr, Dst2, [], [], false),
+ [II2, II1].
+
+store_float_stack(TempDst, Dst) ->
+ {Dst2, II1} = trans_dst(Dst),
+ FloatTy = hipe_llvm:mk_double(),
+ FloatTyPtr = hipe_llvm:mk_pointer(FloatTy),
+ II2 = hipe_llvm:mk_store(FloatTy, TempDst, FloatTyPtr, Dst2, [], [], false),
+ [II2, II1].
+
+trans_float_src(Src) ->
+ case hipe_rtl:is_const_label(Src) of
+ true ->
+ Name = "@DL" ++ integer_to_list(hipe_rtl:const_label_label(Src)),
+ T1 = mk_temp(),
+ %% XXX: Hardcoded offset
+ ByteTy = hipe_llvm:mk_int(8),
+ ByteTyPtr = hipe_llvm:mk_pointer(ByteTy),
+ I1 = hipe_llvm:mk_getelementptr(T1, ByteTyPtr, Name,
+ [{ByteTy, integer_to_list(?FLOAT_OFFSET)}], true),
+ T2 = mk_temp(),
+ FloatTy = hipe_llvm:mk_double(),
+ FloatTyPtr = hipe_llvm:mk_pointer(FloatTy),
+ I2 = hipe_llvm:mk_conversion(T2, bitcast, ByteTyPtr, T1, FloatTyPtr),
+ T3 = mk_temp(),
+ I3 = hipe_llvm:mk_load(T3, FloatTyPtr, T2, [], [], false),
+ {T3, [I3, I2, I1]};
+ false ->
+ trans_src(Src)
+ end.
+
+trans_src(A) ->
+ WordTy = hipe_llvm:mk_int(?WORD_WIDTH),
+ WordTyPtr = hipe_llvm:mk_pointer(WordTy),
+ case hipe_rtl:is_imm(A) of
+ true ->
+ Value = integer_to_list(hipe_rtl:imm_value(A)),
+ {Value, []};
+ false ->
+ case hipe_rtl:is_reg(A) of
+ true ->
+ case isPrecoloured(A) of
+ true -> trans_reg(A, src);
+ false ->
+ {Name, []} = trans_reg(A, src),
+ T1 = mk_temp(),
+ I1 = hipe_llvm:mk_load(T1, WordTyPtr, Name, [], [], false),
+ {T1, [I1]}
+ end;
+ false ->
+ case hipe_rtl:is_var(A) of
+ true ->
+ RootName = "%vr" ++ integer_to_list(hipe_rtl:var_index(A)),
+ T1 = mk_temp(),
+ I1 = hipe_llvm:mk_load(T1, WordTyPtr, RootName, [], [], false),
+ I2 =
+ case hipe_rtl:var_liveness(A) of
+ live ->
+ [];
+ dead ->
+ NilValue = hipe_tagscheme:mk_nil(),
+ hipe_llvm:mk_store(WordTy, integer_to_list(NilValue), WordTyPtr, RootName,
+ [], [], false)
+ end,
+ {T1, [I2, I1]};
+ false ->
+ case hipe_rtl:is_fpreg(A) of
+ true ->
+ {Name, []} = trans_dst(A),
+ T1 = mk_temp(),
+ FloatTyPtr = hipe_llvm:mk_pointer(hipe_llvm:mk_double()),
+ I1 = hipe_llvm:mk_load(T1, FloatTyPtr, Name, [], [], false),
+ {T1, [I1]};
+ false -> trans_dst(A)
+ end
+ end
+ end
+ end.
+
+trans_dst(A) ->
+ case hipe_rtl:is_reg(A) of
+ true ->
+ trans_reg(A, dst);
+ false ->
+ Name = case hipe_rtl:is_var(A) of
+ true ->
+ "%vr" ++ integer_to_list(hipe_rtl:var_index(A));
+ false ->
+ case hipe_rtl:is_fpreg(A) of
+ true -> "%fr" ++ integer_to_list(hipe_rtl:fpreg_index(A));
+ false ->
+ case hipe_rtl:is_const_label(A) of
+ true ->
+ "%DL" ++ integer_to_list(hipe_rtl:const_label_label(A)) ++ "_var";
+ false ->
+ exit({?MODULE, trans_dst, {"Bad RTL argument",A}})
+ end
+ end
+ end,
+ {Name, []}
+ end.
+
+%% @doc Translate a register. If it is precoloured it must be mapped to the
+%% correct stack slot that holds the precoloured register value.
+trans_reg(Arg, Position) ->
+ Index = hipe_rtl:reg_index(Arg),
+ case isPrecoloured(Arg) of
+ true ->
+ Name = map_precoloured_reg(Index),
+ case Position of
+ src -> fix_reg_src(Name);
+ dst -> fix_reg_dst(Name)
+ end;
+ false ->
+ {hipe_rtl_arch:reg_name(Index), []}
+ end.
+
+map_precoloured_reg(Index) ->
+ case hipe_rtl_arch:reg_name(Index) of
+ "%r15" -> "%hp_reg_var";
+ "%rbp" -> "%p_reg_var";
+ "%esi" -> "%hp_reg_var";
+ "%ebp" -> "%p_reg_var";
+ "%fcalls" ->
+ {"%p_reg_var", ?ARCH_REGISTERS:proc_offset(?ARCH_REGISTERS:fcalls())};
+ "%hplim" ->
+ {"%p_reg_var", ?ARCH_REGISTERS:proc_offset(?ARCH_REGISTERS:heap_limit())};
+ _ ->
+ exit({?MODULE, map_precoloured_reg, {"Register not mapped yet", Index}})
+ end.
+
+%% @doc Load precoloured dst register.
+fix_reg_dst(Register) ->
+ case Register of
+ {Name, Offset} -> %% Case of %fcalls, %hplim
+ WordTy = hipe_llvm:mk_int(?WORD_WIDTH),
+ pointer_from_reg(Name, WordTy, Offset);
+ Name -> %% Case of %p and %hp
+ {Name, []}
+ end.
+
+%% @doc Load precoloured src register.
+fix_reg_src(Register) ->
+ WordTy = hipe_llvm:mk_int(?WORD_WIDTH),
+ WordTyPtr = hipe_llvm:mk_pointer(WordTy),
+ case Register of
+ {Name, Offset} -> %% Case of %fcalls, %hplim
+ {T1, I1} = pointer_from_reg(Name, WordTy, Offset),
+ T2 = mk_temp(),
+ I2 = hipe_llvm:mk_load(T2, WordTyPtr, T1, [], [] , false),
+ {T2, [I2, I1]};
+ Name -> %% Case of %p and %hp
+ T1 = mk_temp(),
+ {T1, hipe_llvm:mk_load(T1, WordTyPtr, Name, [], [], false)}
+ end.
+
+%% @doc Load %fcalls and %hplim.
+pointer_from_reg(RegName, Type, Offset) ->
+ PointerType = hipe_llvm:mk_pointer(Type),
+ T1 = mk_temp(),
+ I1 = hipe_llvm:mk_load(T1, PointerType, RegName, [], [] ,false),
+ T2 = mk_temp(),
+ I2 = hipe_llvm:mk_conversion(T2, inttoptr, Type, T1, PointerType),
+ T3 = mk_temp(),
+ %% XXX: Offsets should be a power of 2.
+ I3 = hipe_llvm:mk_getelementptr(T3, PointerType, T2,
+ [{Type, integer_to_list(Offset div hipe_rtl_arch:word_size())}], true),
+ {T3, [I3, I2, I1]}.
+
+isPrecoloured(X) ->
+ hipe_rtl_arch:is_precoloured(X).
+
+%%------------------------------------------------------------------------------
+%% Translation of operators
+%%------------------------------------------------------------------------------
+
+trans_op(Op) ->
+ case Op of
+ add -> add;
+ sub -> sub;
+ 'or' -> 'or';
+ 'and' -> 'and';
+ 'xor' -> 'xor';
+ sll -> shl;
+ srl -> lshr;
+ sra -> ashr;
+ mul -> mul;
+ 'fdiv' -> fdiv;
+ 'sdiv' -> sdiv;
+ 'srem' -> srem;
+ Other -> exit({?MODULE, trans_op, {"Unknown RTL operator", Other}})
+ end.
+
+trans_rel_op(Op) ->
+ case Op of
+ eq -> eq;
+ ne -> ne;
+ gtu -> ugt;
+ geu -> uge;
+ ltu -> ult;
+ leu -> ule;
+ gt -> sgt;
+ ge -> sge;
+ lt -> slt;
+ le -> sle
+ end.
+
+trans_prim_op(Op) ->
+ case Op of
+ '+' -> "bif_add";
+ '-' -> "bif_sub";
+ '*' -> "bif_mul";
+ 'div' -> "bif_div";
+ '/' -> "bif_div";
+ Other -> atom_to_list(Other)
+ end.
+
+trans_fp_op(Op) ->
+ case Op of
+ fadd -> fadd;
+ fsub -> fsub;
+ fdiv -> fdiv;
+ fmul -> fmul;
+ fchs -> fsub;
+ Other -> exit({?MODULE, trans_fp_op, {"Unknown RTL float operator",Other}})
+ end.
+
+%% Misc.
+insn_dst(I) ->
+ case I of
+ #alu{} ->
+ [hipe_rtl:alu_dst(I)];
+ #alub{} ->
+ [hipe_rtl:alub_dst(I)];
+ #call{} ->
+ case hipe_rtl:call_dstlist(I) of
+ [] -> [];
+ [Dst] -> [Dst]
+ end;
+ #load{} ->
+ [hipe_rtl:load_dst(I)];
+ #load_address{} ->
+ [hipe_rtl:load_address_dst(I)];
+ #load_atom{} ->
+ [hipe_rtl:load_atom_dst(I)];
+ #move{} ->
+ [hipe_rtl:move_dst(I)];
+ #phi{} ->
+ [hipe_rtl:phi_dst(I)];
+ #fconv{} ->
+ [hipe_rtl:fconv_dst(I)];
+ #fload{} ->
+ [hipe_rtl:fload_dst(I)];
+ #fmove{} ->
+ [hipe_rtl:fmove_dst(I)];
+ #fp{} ->
+ [hipe_rtl:fp_dst(I)];
+ #fp_unop{} ->
+ [hipe_rtl:fp_unop_dst(I)];
+ _ ->
+ []
+ end.
+
+llvm_type_from_size(Size) ->
+ case Size of
+ byte -> hipe_llvm:mk_int(8);
+ int16 -> hipe_llvm:mk_int(16);
+ int32 -> hipe_llvm:mk_int(32);
+ word -> hipe_llvm:mk_int(64)
+ end.
+
+%% @doc Create definition for the compiled function. The parameters that are
+%% passed to the stack must be reversed to match with the CC. Also
+%% precoloured registers that are passed as arguments must be stored to
+%% the corresonding stack slots.
+create_function_definition(Fun, Params, Code, LocalVars) ->
+ FunctionName = trans_mfa_name(Fun),
+ FixedRegs = fixed_registers(),
+ %% Reverse parameters to match with the Erlang calling convention
+ ReversedParams =
+ case erlang:length(Params) > ?NR_ARG_REGS of
+ false ->
+ Params;
+ true ->
+ {ParamsInRegs, ParamsInStack} = lists:split(?NR_ARG_REGS, Params),
+ ParamsInRegs ++ lists:reverse(ParamsInStack)
+ end,
+ Args = header_regs(FixedRegs) ++ header_params(ReversedParams),
+ EntryLabel = hipe_llvm:mk_label("Entry"),
+ FloatTy = hipe_llvm:mk_double(),
+ ExceptionSync = hipe_llvm:mk_alloca("%exception_sync", FloatTy, [], []),
+ I2 = load_regs(FixedRegs),
+ I3 = hipe_llvm:mk_br(mk_jump_label(get(first_label))),
+ StoredParams = store_params(Params),
+ EntryBlock =
+ lists:flatten([EntryLabel, ExceptionSync, I2, LocalVars, StoredParams, I3]),
+ Final_Code = EntryBlock ++ Code,
+ FunctionOptions = [nounwind, noredzone, list_to_atom("gc \"erlang\"")],
+ WordTy = hipe_llvm:mk_int(?WORD_WIDTH),
+ FunRetTy = hipe_llvm:mk_struct(lists:duplicate(?NR_PINNED_REGS + 1, WordTy)),
+ hipe_llvm:mk_fun_def([], [], "cc 11", [], FunRetTy, FunctionName, Args,
+ FunctionOptions, [], Final_Code).
+
+header_params(Params) ->
+ WordTy = hipe_llvm:mk_int(?WORD_WIDTH),
+ [{WordTy, "%v" ++ integer_to_list(hipe_rtl:var_index(P))} || P <- Params].
+
+store_params(Params) ->
+ Fun1 =
+ fun(X) ->
+ Index = hipe_rtl:var_index(X),
+ {Name, _} = trans_dst(X),
+ ParamName = "%v" ++ integer_to_list(Index),
+ WordTy = hipe_llvm:mk_int(?WORD_WIDTH),
+ WordTyPtr = hipe_llvm:mk_pointer(WordTy),
+ hipe_llvm:mk_store(WordTy, ParamName, WordTyPtr, Name, [], [], false)
+ end,
+ lists:map(Fun1, Params).
+
+fixed_registers() ->
+ case get(hipe_target_arch) of
+ x86 ->
+ ["hp", "p"];
+ amd64 ->
+ ["hp", "p"];
+ Other ->
+ exit({?MODULE, map_registers, {"Unknown architecture", Other}})
+ end.
+
+header_regs(Registers) ->
+ WordTy = hipe_llvm:mk_int(?WORD_WIDTH),
+ [{WordTy, "%" ++ X ++ "_in"} || X <- Registers].
+
+load_regs(Registers) ->
+ WordTy = hipe_llvm:mk_int(?WORD_WIDTH),
+ WordTyPtr = hipe_llvm:mk_pointer(WordTy),
+ Fun1 =
+ fun(X) ->
+ I1 = hipe_llvm:mk_alloca("%" ++ X ++ "_reg_var", WordTy, [], []),
+ I2 = hipe_llvm:mk_store(WordTy, "%" ++ X ++ "_in", WordTyPtr,
+ "%" ++ X ++ "_reg_var", [], [], false),
+ [I1, I2]
+ end,
+ lists:map(Fun1, Registers).
+
+%%------------------------------------------------------------------------------
+%% Relocation-specific Stuff
+%%------------------------------------------------------------------------------
+
+relocs_store(Key, Value, Relocs) ->
+ dict:store(Key, Value, Relocs).
+
+relocs_to_list(Relocs) ->
+ dict:to_list(Relocs).
+
+%% @doc This function is responsible for the actions needed to handle
+%% relocations:
+%% 1) Updates relocations with constants and switch jump tables.
+%% 2) Creates LLVM code to declare relocations as external
+%% functions/constants.
+%% 3) Creates LLVM code in order to create local variables for the external
+%% constants/labels.
+handle_relocations(Relocs, Data, Fun) ->
+ RelocsList = relocs_to_list(Relocs),
+ %% Seperate Relocations according to their type
+ {CallList, AtomList, ClosureList, ClosureLabels, SwitchList} =
+ seperate_relocs(RelocsList),
+ %% Create code to declare atoms
+ AtomDecl = [declare_atom(A) || A <- AtomList],
+ %% Create code to create local name for atoms
+ AtomLoad = [load_atom(A) || A <- AtomList],
+ %% Create code to declare closures
+ ClosureDecl = [declare_closure(C) || C <- ClosureList],
+ %% Create code to create local name for closures
+ ClosureLoad = [load_closure(C) || C <- ClosureList],
+ %% Find function calls
+ IsExternalCall = fun (X) -> is_external_call(X, Fun) end,
+ ExternalCallList = lists:filter(IsExternalCall, CallList),
+ %% Create code to declare external function
+ FunDecl = fixed_fun_decl() ++ [call_to_decl(C) || C <- ExternalCallList],
+ %% Extract constant labels from Constant Map (remove duplicates)
+ ConstLabels = hipe_consttab:labels(Data),
+ %% Create code to declare constants
+ ConstDecl = [declare_constant(C) || C <- ConstLabels],
+ %% Create code to create local name for constants
+ ConstLoad = [load_constant(C) || C <- ConstLabels],
+ %% Create code to create jump tables
+ SwitchDecl = declare_switches(SwitchList, Fun),
+ %% Create code to create a table with the labels of all closure calls
+ {ClosureLabelDecl, Relocs1} =
+ declare_closure_labels(ClosureLabels, Relocs, Fun),
+ %% Enter constants to relocations
+ Relocs2 = lists:foldl(fun const_to_dict/2, Relocs1, ConstLabels),
+ %% Temporary Store inc_stack and llvm_fix_pinned_regs to Dictionary
+ %% TODO: Remove this
+ Relocs3 = dict:store("inc_stack_0", {call, {bif, inc_stack_0, 0}}, Relocs2),
+ Relocs4 = dict:store("hipe_bifs.llvm_fix_pinned_regs.0",
+ {call, {hipe_bifs, llvm_fix_pinned_regs, 0}}, Relocs3),
+ BranchMetaData = [
+ hipe_llvm:mk_branch_meta(?BRANCH_META_TAKEN, "99", "1")
+ , hipe_llvm:mk_branch_meta(?BRANCH_META_NOT_TAKEN, "1", "99")
+ ],
+ ExternalDeclarations = AtomDecl ++ ClosureDecl ++ ConstDecl ++ FunDecl ++
+ ClosureLabelDecl ++ SwitchDecl ++ BranchMetaData,
+ LocalVariables = AtomLoad ++ ClosureLoad ++ ConstLoad,
+ {Relocs4, ExternalDeclarations, LocalVariables}.
+
+%% @doc Seperate relocations according to their type.
+seperate_relocs(Relocs) ->
+ seperate_relocs(Relocs, [], [], [], [], []).
+
+seperate_relocs([], CallAcc, AtomAcc, ClosureAcc, LabelAcc, JmpTableAcc) ->
+ {CallAcc, AtomAcc, ClosureAcc, LabelAcc, JmpTableAcc};
+seperate_relocs([R|Rs], CallAcc, AtomAcc, ClosureAcc, LabelAcc, JmpTableAcc) ->
+ case R of
+ {_, {call, _}} ->
+ seperate_relocs(Rs, [R | CallAcc], AtomAcc, ClosureAcc, LabelAcc,
+ JmpTableAcc);
+ {_, {atom, _}} ->
+ seperate_relocs(Rs, CallAcc, [R | AtomAcc], ClosureAcc, LabelAcc,
+ JmpTableAcc);
+ {_, {closure, _}} ->
+ seperate_relocs(Rs, CallAcc, AtomAcc, [R | ClosureAcc], LabelAcc,
+ JmpTableAcc);
+ {_, {switch, _, _}} ->
+ seperate_relocs(Rs, CallAcc, AtomAcc, ClosureAcc, LabelAcc,
+ [R | JmpTableAcc]);
+ {_, {closure_label, _, _}} ->
+ seperate_relocs(Rs, CallAcc, AtomAcc, ClosureAcc, [R | LabelAcc],
+ JmpTableAcc)
+ end.
+
+%% @doc External declaration of an atom.
+declare_atom({AtomName, _}) ->
+ WordTy = hipe_llvm:mk_int(?WORD_WIDTH),
+ hipe_llvm:mk_const_decl("@" ++ AtomName, "external constant", WordTy, "").
+
+%% @doc Creation of local variable for an atom.
+load_atom({AtomName, _}) ->
+ Dst = "%" ++ AtomName ++ "_var",
+ Name = "@" ++ AtomName,
+ WordTy = hipe_llvm:mk_int(?WORD_WIDTH),
+ WordTyPtr = hipe_llvm:mk_pointer(WordTy),
+ hipe_llvm:mk_conversion(Dst, ptrtoint, WordTyPtr, Name, WordTy).
+
+%% @doc External declaration of a closure.
+declare_closure({ClosureName, _})->
+ ByteTy = hipe_llvm:mk_int(8),
+ hipe_llvm:mk_const_decl("@" ++ ClosureName, "external constant", ByteTy, "").
+
+%% @doc Creation of local variable for a closure.
+load_closure({ClosureName, _})->
+ Dst = "%" ++ ClosureName ++ "_var",
+ Name = "@" ++ ClosureName,
+ WordTy = hipe_llvm:mk_int(?WORD_WIDTH),
+ ByteTyPtr = hipe_llvm:mk_pointer(hipe_llvm:mk_int(8)),
+ hipe_llvm:mk_conversion(Dst, ptrtoint, ByteTyPtr, Name, WordTy).
+
+%% @doc Declaration of a local variable for a switch jump table.
+declare_switches(JumpTableList, Fun) ->
+ FunName = trans_mfa_name(Fun),
+ [declare_switch_table(X, FunName) || X <- JumpTableList].
+
+declare_switch_table({Name, {switch, {TableType, Labels, _, _}, _}}, FunName) ->
+ LabelList = [mk_jump_label(L) || L <- Labels],
+ Fun1 = fun(X) -> "i8* blockaddress(@" ++ FunName ++ ", " ++ X ++ ")" end,
+ List2 = lists:map(Fun1, LabelList),
+ List3 = string:join(List2, ",\n"),
+ List4 = "[\n" ++ List3 ++ "\n]\n",
+ hipe_llvm:mk_const_decl("@" ++ Name, "constant", TableType, List4).
+
+%% @doc Declaration of a variable for a table with the labels of all closure
+%% calls in the code.
+declare_closure_labels([], Relocs, _Fun) ->
+ {[], Relocs};
+declare_closure_labels(ClosureLabels, Relocs, Fun) ->
+ FunName = trans_mfa_name(Fun),
+ {LabelList, ArityList} =
+ lists:unzip([{mk_jump_label(Label), A} ||
+ {_, {closure_label, Label, A}} <- ClosureLabels]),
+ Relocs1 = relocs_store("table_closures", {table_closures, ArityList}, Relocs),
+ List2 =
+ ["i8* blockaddress(@" ++ FunName ++ ", " ++ L ++ ")" || L <- LabelList],
+ List3 = string:join(List2, ",\n"),
+ List4 = "[\n" ++ List3 ++ "\n]\n",
+ NrLabels = length(LabelList),
+ ByteTyPtr = hipe_llvm:mk_pointer(hipe_llvm:mk_int(8)),
+ TableType = hipe_llvm:mk_array(NrLabels, ByteTyPtr),
+ ConstDecl =
+ hipe_llvm:mk_const_decl("@table_closures", "constant", TableType, List4),
+ {[ConstDecl], Relocs1}.
+
+%% @doc A call is treated as non external only in a case of a recursive
+%% function.
+is_external_call({_, {call, Fun}}, Fun) -> false;
+is_external_call(_, _) -> true.
+
+%% @doc External declaration of a function.
+call_to_decl({Name, {call, MFA}}) ->
+ {M, _F, A} = MFA,
+ CConv = "cc 11",
+ WordTy = hipe_llvm:mk_int(?WORD_WIDTH),
+ FunRetTy = hipe_llvm:mk_struct(lists:duplicate(?NR_PINNED_REGS + 1, WordTy)),
+ {Type, Args} =
+ case M of
+ llvm ->
+ {hipe_llvm:mk_struct([WordTy, hipe_llvm:mk_int(1)]), [1, 2]};
+ %% +precoloured regs
+ _ ->
+ {FunRetTy, lists:seq(1, A + ?NR_PINNED_REGS)}
+ end,
+ ArgsTypes = lists:duplicate(length(Args), WordTy),
+ hipe_llvm:mk_fun_decl([], [], CConv, [], Type, "@" ++ Name, ArgsTypes, []).
+
+%% @doc These functions are always declared, even if not used.
+fixed_fun_decl() ->
+ ByteTy = hipe_llvm:mk_int(8),
+ ByteTyPtr = hipe_llvm:mk_pointer(ByteTy),
+ LandPad = hipe_llvm:mk_fun_decl([], [], [], [], hipe_llvm:mk_int(32),
+ "@__gcc_personality_v0", [hipe_llvm:mk_int(32), hipe_llvm:mk_int(64),
+ ByteTyPtr, ByteTyPtr], []),
+ GCROOTDecl = hipe_llvm:mk_fun_decl([], [], [], [], hipe_llvm:mk_void(),
+ "@llvm.gcroot", [hipe_llvm:mk_pointer(ByteTyPtr), ByteTyPtr], []),
+ WordTy = hipe_llvm:mk_int(?WORD_WIDTH),
+ FunRetTy = hipe_llvm:mk_struct(lists:duplicate(?NR_PINNED_REGS + 1, WordTy)),
+ FixPinnedRegs = hipe_llvm:mk_fun_decl([], [], [], [], FunRetTy,
+ "@hipe_bifs.llvm_fix_pinned_regs.0", [], []),
+ GcMetadata = hipe_llvm:mk_const_decl("@gc_metadata", "external constant",
+ ByteTy, ""),
+ [LandPad, GCROOTDecl, FixPinnedRegs, GcMetadata].
+
+%% @doc Declare an External Consant. We declare all constants as i8 in order to
+%% be able to calcucate pointers of the form DL+6, with the getelementptr
+%% instruction. Otherwise we have to convert constants form pointers to
+%% values, add the offset and convert them again to pointers.
+declare_constant(Label) ->
+ Name = "@DL" ++ integer_to_list(Label),
+ ByteTy = hipe_llvm:mk_int(8),
+ hipe_llvm:mk_const_decl(Name, "external constant", ByteTy, "").
+
+%% @doc Load a constant is achieved by converting a pointer to an integer of
+%% the correct width.
+load_constant(Label) ->
+ Dst = "%DL" ++ integer_to_list(Label) ++ "_var",
+ Name = "@DL" ++ integer_to_list(Label),
+ WordTy = hipe_llvm:mk_int(?WORD_WIDTH),
+ ByteTyPtr = hipe_llvm:mk_pointer(hipe_llvm:mk_int(8)),
+ hipe_llvm:mk_conversion(Dst, ptrtoint, ByteTyPtr, Name, WordTy).
+
+%% @doc Store external constants and calls to dictionary.
+const_to_dict(Elem, Dict) ->
+ Name = "DL" ++ integer_to_list(Elem),
+ dict:store(Name, {'constant', Elem}, Dict).
diff --git a/lib/hipe/main/hipe.app.src b/lib/hipe/main/hipe.app.src
index 7db4db8a57..e81212d4dc 100644
--- a/lib/hipe/main/hipe.app.src
+++ b/lib/hipe/main/hipe.app.src
@@ -30,6 +30,7 @@
cerl_prettypr,
cerl_to_icode,
cerl_typean,
+ elf_format,
erl_bif_types,
erl_types,
hipe,
@@ -108,6 +109,10 @@
hipe_ig,
hipe_ig_moves,
hipe_jit,
+ hipe_llvm,
+ hipe_llvm_liveness,
+ hipe_llvm_main,
+ hipe_llvm_merge,
hipe_ls_regalloc,
hipe_main,
hipe_moves,
@@ -159,6 +164,7 @@
hipe_rtl_symbolic,
hipe_rtl_to_amd64,
hipe_rtl_to_arm,
+ hipe_rtl_to_llvm,
hipe_rtl_to_ppc,
hipe_rtl_to_sparc,
hipe_rtl_to_x86,
@@ -192,7 +198,6 @@
hipe_tagscheme,
hipe_temp_map,
hipe_timing,
- hipe_tool,
hipe_vectors,
hipe_x86,
hipe_x86_assemble,
@@ -217,4 +222,6 @@
hipe_x86_x87]},
{registered,[]},
{applications, [kernel,stdlib]},
- {env, []}]}.
+ {env, []},
+ {runtime_dependencies, ["syntax_tools-1.6.14","stdlib-2.0","kernel-3.0",
+ "erts-6.0","compiler-5.0"]}]}.
diff --git a/lib/hipe/main/hipe.appup.src b/lib/hipe/main/hipe.appup.src
index 1d5a0d93f5..02679fab21 100644
--- a/lib/hipe/main/hipe.appup.src
+++ b/lib/hipe/main/hipe.appup.src
@@ -1,7 +1,7 @@
-%%
+%% -*- erlang -*-
%% %CopyrightBegin%
%%
-%% Copyright Ericsson AB 2002-2009. All Rights Reserved.
+%% Copyright Ericsson AB 2002-2014. 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
@@ -15,5 +15,4 @@
%% under the License.
%%
%% %CopyrightEnd%
-%%
-{"%VSN%",[],[]}.
+{"%VSN%", [], []}.
diff --git a/lib/hipe/main/hipe.erl b/lib/hipe/main/hipe.erl
index 434d5c3061..539ce883c0 100644
--- a/lib/hipe/main/hipe.erl
+++ b/lib/hipe/main/hipe.erl
@@ -200,6 +200,7 @@
compile_core/4,
file/1,
file/2,
+ llvm_support_available/0,
load/1,
help/0,
help_hiper/0,
@@ -648,7 +649,18 @@ run_compiler_1(DisasmFun, IcodeFun, Options) ->
%% The full option expansion is not done
%% until the DisasmFun returns.
{Code, CompOpts} = DisasmFun(Options),
- Opts = expand_options(Options ++ CompOpts),
+ Opts0 = expand_options(Options ++ CompOpts),
+ Opts =
+ case proplists:get_bool(to_llvm, Opts0) andalso
+ not llvm_support_available() of
+ true ->
+ ?error_msg("No LLVM version 3.4 or greater "
+ "found in $PATH; aborting "
+ "native code compilation.\n", []),
+ ?EXIT(cant_find_required_llvm_version);
+ false ->
+ Opts0
+ end,
check_options(Opts),
?when_option(verbose, Options,
?debug_msg("Options: ~p.\n",[Opts])),
@@ -821,7 +833,9 @@ finalize_fun_sequential({MFA, Icode}, Opts, Servers) ->
?debug_msg("Compiled ~w in ~.2f s\n", [MFA,(T2-T1)/1000])),
{MFA, Code};
{rtl, LinearRtl} ->
- {MFA, LinearRtl}
+ {MFA, LinearRtl};
+ {llvm_binary, Binary} ->
+ {MFA, Binary}
catch
error:Error ->
?when_option(verbose, Opts, ?debug_untagged_msg("\n", [])),
@@ -890,21 +904,27 @@ do_load(Mod, Bin, BeamBinOrPath) when is_binary(BeamBinOrPath);
end.
assemble(CompiledCode, Closures, Exports, Options) ->
- case get(hipe_target_arch) of
- ultrasparc ->
- hipe_sparc_assemble:assemble(CompiledCode, Closures, Exports, Options);
- powerpc ->
- hipe_ppc_assemble:assemble(CompiledCode, Closures, Exports, Options);
- ppc64 ->
- hipe_ppc_assemble:assemble(CompiledCode, Closures, Exports, Options);
- arm ->
- hipe_arm_assemble:assemble(CompiledCode, Closures, Exports, Options);
- x86 ->
- hipe_x86_assemble:assemble(CompiledCode, Closures, Exports, Options);
- amd64 ->
- hipe_amd64_assemble:assemble(CompiledCode, Closures, Exports, Options);
- Arch ->
- ?EXIT({executing_on_an_unsupported_architecture, Arch})
+ case proplists:get_bool(to_llvm, Options) of
+ false ->
+ case get(hipe_target_arch) of
+ ultrasparc ->
+ hipe_sparc_assemble:assemble(CompiledCode, Closures, Exports, Options);
+ powerpc ->
+ hipe_ppc_assemble:assemble(CompiledCode, Closures, Exports, Options);
+ ppc64 ->
+ hipe_ppc_assemble:assemble(CompiledCode, Closures, Exports, Options);
+ arm ->
+ hipe_arm_assemble:assemble(CompiledCode, Closures, Exports, Options);
+ x86 ->
+ hipe_x86_assemble:assemble(CompiledCode, Closures, Exports, Options);
+ amd64 ->
+ hipe_amd64_assemble:assemble(CompiledCode, Closures, Exports, Options);
+ Arch ->
+ ?EXIT({executing_on_an_unsupported_architecture, Arch})
+ end;
+ true ->
+ %% Merge already compiled code (per MFA) to a single binary.
+ hipe_llvm_merge:finalize(CompiledCode, Closures, Exports)
end.
%% --------------------------------------------------------------------
@@ -1330,6 +1350,11 @@ opt_keys() ->
timeregalloc,
timers,
to_rtl,
+ to_llvm, % Use the LLVM backend for compilation.
+ llvm_save_temps, % Save the LLVM intermediate files in the current
+ % directory; useful for debugging.
+ llvm_llc, % Specify llc optimization-level: o1, o2, o3, undefined.
+ llvm_opt, % Specify opt optimization-level: o1, o2, o3, undefined.
use_indexing,
use_inline_atom_search,
use_callgraph,
@@ -1468,11 +1493,19 @@ opt_expansions() ->
[{o1, o1_opts()},
{o2, o2_opts()},
{o3, o3_opts()},
+ {to_llvm, llvm_opts(o3)},
+ {{to_llvm, o0}, llvm_opts(o0)},
+ {{to_llvm, o1}, llvm_opts(o1)},
+ {{to_llvm, o2}, llvm_opts(o2)},
+ {{to_llvm, o3}, llvm_opts(o3)},
{x87, [x87, inline_fp]},
{inline_fp, case get(hipe_target_arch) of %% XXX: Temporary until x86
x86 -> [x87, inline_fp]; %% has sse2
_ -> [inline_fp] end}].
+llvm_opts(O) ->
+ [to_llvm, {llvm_opt, O}, {llvm_llc, O}].
+
%% This expands "basic" options, which may be tested early and cannot be
%% in conflict with options found in the source code.
@@ -1516,4 +1549,22 @@ check_options(Opts) ->
ok
end.
+-spec llvm_support_available() -> boolean().
+
+llvm_support_available() ->
+ get_llvm_version() >= 3.4.
+
+get_llvm_version() ->
+ OptStr = os:cmd("opt -version"),
+ SubStr = "LLVM version ", N = length(SubStr),
+ case string:str(OptStr, SubStr) of
+ 0 -> % No opt available
+ 0.0;
+ S ->
+ case string:to_float(string:sub_string(OptStr, S + N)) of
+ {error, _} -> 0.0; %XXX: Assumes no revision numbers in versioning
+ {Float, _} -> Float
+ end
+ end.
+
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
diff --git a/lib/hipe/main/hipe_main.erl b/lib/hipe/main/hipe_main.erl
index 99028cc3c1..89b79998be 100644
--- a/lib/hipe/main/hipe_main.erl
+++ b/lib/hipe/main/hipe_main.erl
@@ -49,7 +49,7 @@
%%=====================================================================
-type comp_icode_ret() :: {'native',hipe_architecture(),{'unprofiled',_}}
- | {'rtl',tuple()}.
+ | {'rtl',tuple()} | {'llvm_binary',term()}.
%%=====================================================================
@@ -115,11 +115,18 @@ compile_icode(MFA, LinearIcode0, Options, Servers, DebugState) ->
pp(IcodeCfg7, MFA, icode_liveness, pp_icode_liveness, Options, Servers),
FinalIcode = hipe_icode_cfg:cfg_to_linear(IcodeCfg7),
?opt_stop_timer("Icode"),
- LinearRTL = ?option_time(icode_to_rtl(MFA,FinalIcode,Options, Servers),
- "RTL", Options),
+ {LinearRTL, Roots} = ?option_time(icode_to_rtl(MFA, FinalIcode, Options, Servers),
+ "RTL", Options),
case proplists:get_bool(to_rtl, Options) of
false ->
- rtl_to_native(MFA, LinearRTL, Options, DebugState);
+ case proplists:get_bool(to_llvm, Options) of
+ false ->
+ rtl_to_native(MFA, LinearRTL, Options, DebugState);
+ true ->
+ %% The LLVM backend returns binary code, unlike the rest of the HiPE
+ %% backends which return native assembly.
+ rtl_to_llvm_to_binary(MFA, LinearRTL, Roots, Options, DebugState)
+ end;
true ->
put(hipe_debug, DebugState),
{rtl, LinearRTL}
@@ -385,11 +392,21 @@ icode_to_rtl(MFA, Icode, Options, Servers) ->
%% hipe_rtl_cfg:pp(RtlCfg3),
pp(RtlCfg3, MFA, rtl_liveness, pp_rtl_liveness, Options, Servers),
RtlCfg4 = rtl_lcm(RtlCfg3, Options),
- pp(RtlCfg4, MFA, rtl, pp_rtl, Options, Servers),
- LinearRTL1 = hipe_rtl_cfg:linearize(RtlCfg4),
+ %% LLVM: A liveness analysis on RTL must be performed in order to find the GC
+ %% roots and explicitly mark them (in RTL) when they go out of scope (only
+ %% when the LLVM backend is used).
+ {RtlCfg5, Roots} =
+ case proplists:get_bool(to_llvm, Options) of
+ false ->
+ {RtlCfg4, []};
+ true ->
+ hipe_llvm_liveness:analyze(RtlCfg4)
+ end,
+ pp(RtlCfg5, MFA, rtl, pp_rtl, Options, Servers),
+ LinearRTL1 = hipe_rtl_cfg:linearize(RtlCfg5),
LinearRTL2 = hipe_rtl_cleanup_const:cleanup(LinearRTL1),
%% hipe_rtl:pp(standard_io, LinearRTL2),
- LinearRTL2.
+ {LinearRTL2, Roots}.
translate_to_rtl(Icode, Options) ->
%% GC tests should have been added in the conversion to Icode.
@@ -540,6 +557,17 @@ rtl_to_native(MFA, LinearRTL, Options, DebugState) ->
put(hipe_debug, DebugState),
LinearNativeCode.
+%% Translate Linear RTL to binary code using LLVM.
+rtl_to_llvm_to_binary(MFA, LinearRTL, Roots, Options, DebugState) ->
+ ?opt_start_timer("LLVM native code"),
+ %% BinaryCode is a tuple, as defined in llvm/hipe_llvm_main module, which
+ %% contains the binary code together with info needed by the loader, e.g.
+ %% ConstTab, Refs, LabelMap, etc.
+ BinaryCode = hipe_llvm_main:rtl_to_native(MFA, LinearRTL, Roots, Options),
+ ?opt_stop_timer("LLVM native code"),
+ put(hipe_debug, DebugState),
+ {llvm_binary, BinaryCode}.
+
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
%% Debugging stuff ...
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
diff --git a/lib/hipe/misc/hipe_consttab.erl b/lib/hipe/misc/hipe_consttab.erl
index c381e6a057..2b02f54b5c 100644
--- a/lib/hipe/misc/hipe_consttab.erl
+++ b/lib/hipe/misc/hipe_consttab.erl
@@ -2,7 +2,7 @@
%%
%% %CopyrightBegin%
%%
-%% Copyright Ericsson AB 2001-2009. All Rights Reserved.
+%% Copyright Ericsson AB 2001-2014. 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
@@ -462,7 +462,7 @@ update_referred_labels(Table, LabelMap) ->
tree_keys(T) ->
dict:fetch_keys(T).
--spec tree_to_list(dict()) -> [{_, _}].
+-spec tree_to_list(dict:dict()) -> [{_, _}].
tree_to_list(T) ->
dict:to_list(T).
@@ -486,11 +486,11 @@ tree_lookup(Key, T) ->
none
end.
--spec tree_empty() -> dict().
+-spec tree_empty() -> dict:dict().
tree_empty() ->
dict:new().
--spec tree_lookup_key_for_value(ctdata(), dict()) -> 'none' | {'value', _}.
+-spec tree_lookup_key_for_value(ctdata(), dict:dict()) -> 'none' | {'value', _}.
tree_lookup_key_for_value(Val, T) ->
tree_lookup_key_for_value_1(tree_to_list(T), Val).
diff --git a/lib/hipe/misc/hipe_consttab.hrl b/lib/hipe/misc/hipe_consttab.hrl
index 39018dac34..aea3c5bc88 100644
--- a/lib/hipe/misc/hipe_consttab.hrl
+++ b/lib/hipe/misc/hipe_consttab.hrl
@@ -2,7 +2,7 @@
%%
%% %CopyrightBegin%
%%
-%% Copyright Ericsson AB 2008-2009. All Rights Reserved.
+%% Copyright Ericsson AB 2008-2014. 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
@@ -22,6 +22,6 @@
-type ct_alignment() :: 4 | 8.
-type hipe_constlbl() :: non_neg_integer().
--type hipe_consttab() :: {dict(), [hipe_constlbl()], hipe_constlbl()}.
+-type hipe_consttab() :: {dict:dict(), [hipe_constlbl()], hipe_constlbl()}.
%%-----------------------------------------------------------------------------
diff --git a/lib/hipe/misc/hipe_gensym.erl b/lib/hipe/misc/hipe_gensym.erl
index 84fc8fa7e8..4d2a237188 100644
--- a/lib/hipe/misc/hipe_gensym.erl
+++ b/lib/hipe/misc/hipe_gensym.erl
@@ -44,7 +44,7 @@
%% Types of allowable entities to set global variables for
%%-----------------------------------------------------------------------
--type gvarname() :: 'icode' | 'rtl' | 'arm' | 'ppc' | 'sparc' | 'x86'.
+-type gvarname() :: 'icode' | 'rtl' | 'arm' | 'ppc' | 'sparc' | 'x86' | 'llvm'.
%%-----------------------------------------------------------------------
diff --git a/lib/hipe/misc/hipe_pack_constants.erl b/lib/hipe/misc/hipe_pack_constants.erl
index e214d7ebbc..300f9ae43a 100644
--- a/lib/hipe/misc/hipe_pack_constants.erl
+++ b/lib/hipe/misc/hipe_pack_constants.erl
@@ -3,7 +3,7 @@
%%
%% %CopyrightBegin%
%%
-%% Copyright Ericsson AB 2003-2009. All Rights Reserved.
+%% Copyright Ericsson AB 2003-2014. All Rights Reserved.
%%
%% The contents of this file are subject to the Erlang Public License,
%% Version 1.1, (the "License"); you may not use this file except in
@@ -20,30 +20,48 @@
%%
-module(hipe_pack_constants).
--export([pack_constants/2, slim_refs/1, slim_constmap/1]).
+-export([pack_constants/2, slim_refs/1, slim_constmap/1,
+ find_const/2, mk_data_relocs/2, slim_sorted_exportmap/3]).
-include("hipe_consttab.hrl").
-include("../../kernel/src/hipe_ext_format.hrl").
+-include("../main/hipe.hrl"). % Needed for the EXIT macro in find_const/2.
%%-----------------------------------------------------------------------------
--type raw_data() :: binary() | number() | list() | tuple().
--type tbl_ref() :: {hipe_constlbl(), non_neg_integer()}.
+-type const_num() :: non_neg_integer().
+-type raw_data() :: binary() | number() | list() | tuple().
+
+-type addr() :: non_neg_integer().
+-type ref_p() :: {DataPos :: hipe_constlbl(), CodeOffset :: addr()}.
+-type ref() :: ref_p() | {'sorted', Base :: addr(), [ref_p()]}.
+
+-type mfa_refs() :: {mfa(), [ref()]}.
+
+%% XXX: these types may not belong here: FIX!
+-type fa() :: {atom(), arity()}.
+-type export_map() :: [{addr(), module(), atom(), arity()}].
-record(pcm_entry, {mfa :: mfa(),
label :: hipe_constlbl(),
- const_num :: non_neg_integer(),
- start :: non_neg_integer(),
+ const_num :: const_num(),
+ start :: addr(),
type :: 0 | 1 | 2,
raw_data :: raw_data()}).
+-type pcm_entry() :: #pcm_entry{}.
+
+-type label_map() :: gb_trees:tree({mfa(), hipe_constlbl()}, addr()).
+
+%% Some of the following types may possibly need to be exported
+-type data_relocs() :: [ref()].
+-type packed_const_map() :: [pcm_entry()].
+-type mfa_refs_map() :: [mfa_refs()].
+-type slim_export_map() :: [addr() | module() | atom() | arity() | boolean()].
%%-----------------------------------------------------------------------------
-spec pack_constants([{mfa(),[_],hipe_consttab()}], ct_alignment()) ->
- {ct_alignment(),
- non_neg_integer(),
- [#pcm_entry{}],
- [{mfa(),[tbl_ref() | {'sorted',non_neg_integer(),[tbl_ref()]}]}]}.
+ {ct_alignment(), non_neg_integer(), packed_const_map(), mfa_refs_map()}.
pack_constants(Data, Align) ->
pack_constants(Data, 0, Align, 0, [], []).
@@ -194,13 +212,12 @@ compact_dests([], Dest, AccofDest, Acc) ->
%% to the slimmed and flattened format ConstMap which is put in object
%% files.
%%
--spec slim_constmap([#pcm_entry{}]) -> [raw_data()].
+-spec slim_constmap(packed_const_map()) -> [raw_data()].
slim_constmap(Map) ->
slim_constmap(Map, gb_sets:new(), []).
--spec slim_constmap([#pcm_entry{}], gb_set(), [raw_data()]) -> [raw_data()].
-slim_constmap([#pcm_entry{const_num=ConstNo, start=Offset,
- type=Type, raw_data=Term}|Rest], Inserted, Acc) ->
+slim_constmap([#pcm_entry{const_num = ConstNo, start = Offset,
+ type = Type, raw_data = Term}|Rest], Inserted, Acc) ->
case gb_sets:is_member(ConstNo, Inserted) of
true ->
slim_constmap(Rest, Inserted, Acc);
@@ -209,3 +226,60 @@ slim_constmap([#pcm_entry{const_num=ConstNo, start=Offset,
slim_constmap(Rest, NewInserted, [ConstNo, Offset, Type, Term|Acc])
end;
slim_constmap([], _Inserted, Acc) -> Acc.
+
+%%
+%% Lookup a constant in a ConstMap.
+%%
+-spec find_const({mfa(), hipe_constlbl()}, packed_const_map()) -> const_num().
+
+find_const({MFA, Label}, [E = #pcm_entry{mfa = MFA, label = Label}|_]) ->
+ E#pcm_entry.const_num;
+find_const(N, [_|R]) ->
+ find_const(N, R);
+find_const(C, []) ->
+ ?EXIT({constant_not_found, C}).
+
+%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
+
+%%
+%% Functions to build and handle Refs, ExportMap and LabelMap.
+%% Note: Moved here because they are used by all backends in
+%% hipe_{arm,sparc,ppc,x86}_assemble.erl
+%% XXX: Is this the right place for them?
+%%
+
+-spec mk_data_relocs(mfa_refs_map(), label_map()) -> data_relocs().
+
+mk_data_relocs(RefsFromConsts, LabelMap) ->
+ lists:flatten(mk_data_relocs(RefsFromConsts, LabelMap, [])).
+
+mk_data_relocs([{MFA, Labels} | Rest], LabelMap, Acc) ->
+ Map = [case Label of
+ {L,Pos} ->
+ Offset = find({MFA,L}, LabelMap),
+ {Pos,Offset};
+ {sorted,Base,OrderedLabels} ->
+ {sorted, Base, [begin
+ Offset = find({MFA,L}, LabelMap),
+ {Order, Offset}
+ end
+ || {L,Order} <- OrderedLabels]}
+ end
+ || Label <- Labels],
+ %% msg("Map: ~w Map\n", [Map]),
+ mk_data_relocs(Rest, LabelMap, [Map,Acc]);
+mk_data_relocs([], _, Acc) -> Acc.
+
+find({MFA,L}, LabelMap) ->
+ gb_trees:get({MFA,L}, LabelMap).
+
+-spec slim_sorted_exportmap(export_map(), [mfa()], [fa()]) -> slim_export_map().
+
+slim_sorted_exportmap([{Addr,M,F,A}|Rest], Closures, Exports) ->
+ IsClosure = lists:member({M,F,A}, Closures),
+ IsExported = is_exported(F, A, Exports),
+ [Addr,M,F,A,IsClosure,IsExported | slim_sorted_exportmap(Rest, Closures, Exports)];
+slim_sorted_exportmap([], _, _) -> [].
+
+is_exported(F, A, Exports) ->
+ lists:member({F,A}, Exports).
diff --git a/lib/hipe/misc/hipe_sdi.erl b/lib/hipe/misc/hipe_sdi.erl
index ef1b5b48c5..9a2ff78ecf 100644
--- a/lib/hipe/misc/hipe_sdi.erl
+++ b/lib/hipe/misc/hipe_sdi.erl
@@ -3,7 +3,7 @@
%%%
%%% %CopyrightBegin%
%%%
-%%% Copyright Ericsson AB 2004-2009. All Rights Reserved.
+%%% Copyright Ericsson AB 2004-2014. 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
@@ -50,7 +50,7 @@
-record(pass1, {prevSdi :: integer(),
preS = [] :: [#pre_sdi_data{}],
- labelMap = gb_trees:empty() :: gb_tree()}).
+ labelMap = gb_trees:empty() :: gb_trees:tree()}).
-record(sdi_data, {address :: address(),
label_address :: address(),
@@ -105,11 +105,11 @@ pass1_add_sdi(Pass1, Address, Label, SdiInfo) ->
PreSdiData = #pre_sdi_data{address=Address, label=Label, si=SdiInfo},
Pass1#pass1{prevSdi=PrevSdi+1, preS=[PreSdiData|PreS]}.
--spec pass1_finalise(#pass1{}) -> {non_neg_integer(),tuple(),gb_tree()}.
+-spec pass1_finalise(#pass1{}) -> {non_neg_integer(),tuple(),gb_trees:tree()}.
pass1_finalise(#pass1{prevSdi=PrevSdi, preS=PreS, labelMap=LabelMap}) ->
{PrevSdi+1, pass1_finalise_preS(PreS, LabelMap, []), LabelMap}.
--spec pass1_finalise_preS([#pre_sdi_data{}], gb_tree(), [#sdi_data{}]) ->
+-spec pass1_finalise_preS([#pre_sdi_data{}], gb_trees:tree(), [#sdi_data{}]) ->
tuple().
pass1_finalise_preS([], _LabelMap, S) -> vector_from_list(S);
pass1_finalise_preS([PreSdiData|PreS], LabelMap, S) ->
@@ -122,7 +122,7 @@ pass1_finalise_preS([PreSdiData|PreS], LabelMap, S) ->
%%% Pass2.
--spec pass2(#pass1{}) -> {gb_tree(), non_neg_integer()}.
+-spec pass2(#pass1{}) -> {gb_trees:tree(), non_neg_integer()}.
pass2(Pass1) ->
{N,SDIS,LabelMap} = pass1_finalise(Pass1),
LONG = mk_long(N),
@@ -339,13 +339,14 @@ initINCR(SdiNr, PrevIncr, N, LONG, INCREMENT) ->
%%% a and previous sdi i is remapped to a+incr(i), where
%%% incr(i) = if i < 0 then 0 else INCREMENT[i].
--spec adjust_label_map(gb_tree(), hipe_array()) -> gb_tree().
+-spec adjust_label_map(gb_trees:tree(), hipe_array()) -> gb_trees:tree().
adjust_label_map(LabelMap, INCREMENT) ->
applyIncr(gb_trees:to_list(LabelMap), INCREMENT, gb_trees:empty()).
-type label_pair() :: {label(), #label_data{}}.
--spec applyIncr([label_pair()], hipe_array(), gb_tree()) -> gb_tree().
+-spec applyIncr([label_pair()], hipe_array(), gb_trees:tree()) ->
+ gb_trees:tree().
applyIncr([], _INCREMENT, LabelMap) -> LabelMap;
applyIncr([{Label,LabelData}|List], INCREMENT, LabelMap) ->
#label_data{address=Address, prevSdi=PrevSdi} = LabelData,
diff --git a/lib/hipe/ppc/hipe_ppc_assemble.erl b/lib/hipe/ppc/hipe_ppc_assemble.erl
index b2fd50517b..3ad91f4051 100644
--- a/lib/hipe/ppc/hipe_ppc_assemble.erl
+++ b/lib/hipe/ppc/hipe_ppc_assemble.erl
@@ -46,8 +46,8 @@ assemble(CompiledCode, Closures, Exports, Options) ->
print("Total num bytes=~w\n", [CodeSize], Options),
%%
SC = hipe_pack_constants:slim_constmap(ConstMap),
- DataRelocs = mk_data_relocs(RefsFromConsts, LabelMap),
- SSE = slim_sorted_exportmap(ExportMap,Closures,Exports),
+ DataRelocs = hipe_pack_constants:mk_data_relocs(RefsFromConsts, LabelMap),
+ SSE = hipe_pack_constants:slim_sorted_exportmap(ExportMap,Closures,Exports),
SlimRefs = hipe_pack_constants:slim_refs(AccRefs),
Bin = term_to_binary([{?VERSION_STRING(),?HIPE_SYSTEM_CRC},
ConstAlign, ConstSize,
@@ -288,7 +288,7 @@ do_pseudo_li(I, MFA, ConstMap) ->
%%% end,
%%% {load_address, {Tag,untag_mfa_or_prim(MFAorPrim)}};
{Label,constant} ->
- ConstNo = find_const({MFA,Label}, ConstMap),
+ ConstNo = hipe_pack_constants:find_const({MFA,Label}, ConstMap),
{load_address, {constant,ConstNo}};
{Label,closure} ->
{load_address, {closure,Label}};
@@ -574,37 +574,6 @@ mk_y(Pred, BD) ->
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
-mk_data_relocs(RefsFromConsts, LabelMap) ->
- lists:flatten(mk_data_relocs(RefsFromConsts, LabelMap, [])).
-
-mk_data_relocs([{MFA,Labels} | Rest], LabelMap, Acc) ->
- Map = [case Label of
- {L,Pos} ->
- Offset = find({MFA,L}, LabelMap),
- {Pos,Offset};
- {sorted,Base,OrderedLabels} ->
- {sorted, Base, [begin
- Offset = find({MFA,L}, LabelMap),
- {Order, Offset}
- end
- || {L,Order} <- OrderedLabels]}
- end
- || Label <- Labels],
- %% msg("Map: ~w Map\n",[Map]),
- mk_data_relocs(Rest, LabelMap, [Map,Acc]);
-mk_data_relocs([],_,Acc) -> Acc.
-
-find({_MFA,_L} = MFAL,LabelMap) ->
- gb_trees:get(MFAL, LabelMap).
-
-slim_sorted_exportmap([{Addr,M,F,A}|Rest], Closures, Exports) ->
- IsClosure = lists:member({M,F,A}, Closures),
- IsExported = is_exported(F, A, Exports),
- [Addr,M,F,A,IsClosure,IsExported | slim_sorted_exportmap(Rest, Closures, Exports)];
-slim_sorted_exportmap([],_,_) -> [].
-
-is_exported(F, A, Exports) -> lists:member({F,A}, Exports).
-
%%%
%%% Assembly listing support (pp_asm option).
%%%
@@ -642,14 +611,3 @@ fill_spaces(N) when N > 0 ->
fill_spaces(N-1);
fill_spaces(0) ->
[].
-
-%%%
-%%% Lookup a constant in a ConstMap.
-%%%
-
-find_const({MFA,Label}, [{pcm_entry,MFA,Label,ConstNo,_,_,_}|_]) ->
- ConstNo;
-find_const(N, [_|R]) ->
- find_const(N, R);
-find_const(C, []) ->
- ?EXIT({constant_not_found,C}).
diff --git a/lib/hipe/regalloc/hipe_ig_moves.erl b/lib/hipe/regalloc/hipe_ig_moves.erl
index 186c87a690..ebc6ebc20d 100644
--- a/lib/hipe/regalloc/hipe_ig_moves.erl
+++ b/lib/hipe/regalloc/hipe_ig_moves.erl
@@ -2,7 +2,7 @@
%%
%% %CopyrightBegin%
%%
-%% Copyright Ericsson AB 2001-2009. All Rights Reserved.
+%% Copyright Ericsson AB 2001-2014. 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
@@ -36,7 +36,7 @@
-record(ig_moves, {movelist :: hipe_vector(),
nrmoves = 0 :: non_neg_integer(),
moveinsns = [] :: [{_,_}],
- moveset = gb_sets:empty() :: gb_set()}).
+ moveset = gb_sets:empty() :: gb_sets:set()}).
%%-----------------------------------------------------------------------------
diff --git a/lib/hipe/regalloc/hipe_ls_regalloc.erl b/lib/hipe/regalloc/hipe_ls_regalloc.erl
index 4276b8f968..7a00a0534a 100644
--- a/lib/hipe/regalloc/hipe_ls_regalloc.erl
+++ b/lib/hipe/regalloc/hipe_ls_regalloc.erl
@@ -722,7 +722,7 @@ is_free(R, Free) ->
is_free(R, Free, []).
is_free(R, [{R,_}|Rest], Acc) ->
- {true,lists:reverse(Acc)++Rest};
+ {true, lists:reverse(Acc, Rest)};
is_free(R, [X|Rs],Acc) ->
is_free(R, Rs, [X|Acc]);
is_free(_, [], _) ->
@@ -733,7 +733,7 @@ exists_free_register(Start, Regs) ->
exists_free_register(Start, [{Phys, Start0}|Rest], Acc)
when Start > Start0 ->
- {true, Phys, lists:reverse(Acc)++Rest};
+ {true, Phys, lists:reverse(Acc, Rest)};
exists_free_register(Start, [Free|Rest], Acc) ->
exists_free_register(Start, Rest, [Free|Acc]);
exists_free_register(_, [], _) ->
diff --git a/lib/hipe/regalloc/hipe_optimistic_regalloc.erl b/lib/hipe/regalloc/hipe_optimistic_regalloc.erl
index 5bad31ade9..0278a896d2 100644
--- a/lib/hipe/regalloc/hipe_optimistic_regalloc.erl
+++ b/lib/hipe/regalloc/hipe_optimistic_regalloc.erl
@@ -958,9 +958,9 @@ splits_2({Cols, NonCols, OldSpillCost}, L, SpillCost) ->
%% Merge two ordered sub-splits into one.
spillCostOrderedMerge(Spl1, [], Spl) ->
- lists:reverse(Spl) ++ Spl1;
+ lists:reverse(Spl, Spl1);
spillCostOrderedMerge([], Spl2, Spl) ->
- lists:reverse(Spl) ++ Spl2;
+ lists:reverse(Spl, Spl2);
spillCostOrderedMerge(Spl1, Spl2, Spl) ->
{_, _, SpillCost1} = hd(Spl1),
{_, _, SpillCost2} = hd(Spl2),
diff --git a/lib/hipe/rtl/hipe_icode2rtl.erl b/lib/hipe/rtl/hipe_icode2rtl.erl
index 034153a3cb..483d0b37f7 100644
--- a/lib/hipe/rtl/hipe_icode2rtl.erl
+++ b/lib/hipe/rtl/hipe_icode2rtl.erl
@@ -427,8 +427,6 @@ gen_type_test([X], Type, TrueLbl, FalseLbl, Pred, ConstTab) ->
hipe_rtl:mk_branch(X, eq, TmpF, TrueLbl, FalseLbl, Pred)], ConstTab};
cons ->
{hipe_tagscheme:test_cons(X, TrueLbl, FalseLbl, Pred), ConstTab};
- constant ->
- {hipe_tagscheme:test_constant(X, TrueLbl, FalseLbl, Pred), ConstTab};
fixnum ->
{hipe_tagscheme:test_fixnum(X, TrueLbl, FalseLbl, Pred), ConstTab};
float ->
@@ -439,6 +437,8 @@ gen_type_test([X], Type, TrueLbl, FalseLbl, Pred, ConstTab) ->
{hipe_tagscheme:test_integer(X, TrueLbl, FalseLbl, Pred), ConstTab};
list ->
{hipe_tagscheme:test_list(X, TrueLbl, FalseLbl, Pred), ConstTab};
+ map ->
+ {hipe_tagscheme:test_map(X, TrueLbl, FalseLbl, Pred), ConstTab};
nil ->
{hipe_tagscheme:test_nil(X, TrueLbl, FalseLbl, Pred), ConstTab};
number ->
diff --git a/lib/hipe/rtl/hipe_rtl.erl b/lib/hipe/rtl/hipe_rtl.erl
index 4bf4eb6bd7..bc61bec0bd 100644
--- a/lib/hipe/rtl/hipe_rtl.erl
+++ b/lib/hipe/rtl/hipe_rtl.erl
@@ -29,7 +29,7 @@
%% <li> {alu, Dst, Src1, Op, Src2} </li>
%% <li> {alub, Dst, Src1, Op, Src2, RelOp, TrueLabel, FalseLabel, P} </li>
%% <li> {branch, Src1, Src2, RelOp, TrueLabel, FalseLabel, P} </li>
-%% <li> {call, DsListt, Fun, ArgList, Type, Continuation, FailContinuation}
+%% <li> {call, DsListt, Fun, ArgList, Type, Continuation, FailContinuation, NormalContinuation}
%% Type is one of {local, remote, primop, closure} </li>
%% <li> {comment, Text} </li>
%% <li> {enter, Fun, ArgList, Type}
@@ -106,7 +106,7 @@
%% rtl_data_update/2,
%% rtl_var_range/1,
%% rtl_var_range_update/2,
- %% rtl_label_range/1,
+ rtl_label_range/1,
%% rtl_label_range_update/2,
rtl_info/1,
rtl_info_update/2]).
@@ -226,6 +226,7 @@
%% goto_label_update/2,
mk_call/6,
+ mk_call/7,
call_fun/1,
call_dstlist/1,
call_dstlist_update/2,
@@ -233,8 +234,10 @@
call_continuation/1,
call_fail/1,
call_type/1,
+ call_normal/1,
+ call_normal_update/2,
%% call_continuation_update/2,
- %% call_fail_update/2,
+ call_fail_update/2,
is_call/1,
mk_enter/3,
@@ -290,10 +293,13 @@
%% fconv_src_update/2,
%% is_fconv/1,
- %% mk_var/1,
+ mk_var/1,
+ mk_var/2,
mk_new_var/0,
is_var/1,
var_index/1,
+ var_liveness/1,
+ var_liveness_update/2,
%% change_vars_to_regs/1,
@@ -350,10 +356,15 @@
%% move_dst_update/2,
fixnumop_dst_update/2,
pp_instr/2,
- %% pp_arg/2,
+ %% Uber hack!
+ pp_var/2,
+ pp_reg/2,
+ pp_arg/2,
phi_arglist_update/2,
phi_redirect_pred/3]).
+-export([subst_uses_llvm/2]).
+
-export_type([alub_cond/0]).
%%
@@ -387,7 +398,7 @@ rtl_data(#rtl{data=Data}) -> Data.
%% rtl_data_update(Rtl, Data) -> Rtl#rtl{data=Data}.
%% rtl_var_range(#rtl{var_range=VarRange}) -> VarRange.
%% rtl_var_range_update(Rtl, VarRange) -> Rtl#rtl{var_range=VarRange}.
-%% rtl_label_range(#rtl{label_range=LabelRange}) -> LabelRange.
+rtl_label_range(#rtl{label_range=LabelRange}) -> LabelRange.
%% rtl_label_range_update(Rtl, LabelRange) -> Rtl#rtl{label_range=LabelRange}.
rtl_info(#rtl{info=Info}) -> Info.
rtl_info_update(Rtl, Info) -> Rtl#rtl{info=Info}.
@@ -643,6 +654,17 @@ is_goto(_) -> false.
%% call
%%
+%% LLVM: Call with normal continuation
+mk_call(DstList, Fun, ArgList, Continuation, FailContinuation,
+ NormalContinuation, Type) ->
+ case Type of
+ remote -> ok;
+ not_remote -> ok
+ end,
+ #call{dstlist=DstList, 'fun'=Fun, arglist=ArgList, type=Type,
+ continuation=Continuation, failcontinuation=FailContinuation,
+ normalcontinuation=NormalContinuation}.
+
mk_call(DstList, Fun, ArgList, Continuation, FailContinuation, Type) ->
case Type of
remote -> ok;
@@ -651,6 +673,10 @@ mk_call(DstList, Fun, ArgList, Continuation, FailContinuation, Type) ->
#call{dstlist=DstList, 'fun'=Fun, arglist=ArgList, type=Type,
continuation=Continuation,
failcontinuation=FailContinuation}.
+
+call_normal(#call{normalcontinuation=NormalContinuation}) -> NormalContinuation.
+call_normal_update(C, NewNormalContinuation) ->
+ C#call{normalcontinuation=NewNormalContinuation}.
call_dstlist(#call{dstlist=DstList}) -> DstList.
call_dstlist_update(C, NewDstList) -> C#call{dstlist=NewDstList}.
call_fun(#call{'fun'=Fun}) -> Fun.
@@ -853,11 +879,14 @@ reg_is_gcsafe(#rtl_reg{is_gc_safe=IsGcSafe}) -> IsGcSafe.
is_reg(#rtl_reg{}) -> true;
is_reg(_) -> false.
--record(rtl_var, {index :: non_neg_integer()}).
+-record(rtl_var, {index :: non_neg_integer(), liveness=live :: dead | live}).
mk_var(Num) when is_integer(Num), Num >= 0 -> #rtl_var{index=Num}.
+mk_var(Num, Liveness) when is_integer(Num), Num>=0 -> #rtl_var{index=Num, liveness=Liveness}.
mk_new_var() -> mk_var(hipe_gensym:get_next_var(rtl)).
var_index(#rtl_var{index=Index}) -> Index.
+var_liveness(#rtl_var{liveness=Liveness}) -> Liveness.
+var_liveness_update(RtlVar, Liveness) -> RtlVar#rtl_var{liveness=Liveness}.
is_var(#rtl_var{}) -> true;
is_var(_) -> false.
@@ -1077,6 +1106,131 @@ subst_uses(Subst, I) ->
switch_src_update(I, subst1(Subst, switch_src(I)))
end.
+subst_uses_llvm(Subst, I) ->
+ case I of
+ #alu{} ->
+ {NewSrc2, Subst1} = subst1_llvm(Subst, alu_src2(I)),
+ {NewSrc1, _ } = subst1_llvm(Subst1, alu_src1(I)),
+ I0 = alu_src1_update(I, NewSrc1),
+ alu_src2_update(I0, NewSrc2);
+ #alub{} ->
+ {NewSrc2, Subst1} = subst1_llvm(Subst, alub_src2(I)),
+ {NewSrc1, _ } = subst1_llvm(Subst1, alub_src1(I)),
+ I0 = alub_src1_update(I, NewSrc1),
+ alub_src2_update(I0, NewSrc2);
+ #branch{} ->
+ {NewSrc2, Subst1} = subst1_llvm(Subst, branch_src2(I)),
+ {NewSrc1, _ } = subst1_llvm(Subst1, branch_src1(I)),
+ I0 = branch_src1_update(I, NewSrc1),
+ branch_src2_update(I0, NewSrc2);
+ #call{} ->
+ case call_is_known(I) of
+ false ->
+ {NewFun, Subst1} = subst1_llvm(Subst, call_fun(I)),
+ {NewArgList, _} = subst_list_llvm(Subst1, call_arglist(I)),
+ I0 = call_fun_update(I, NewFun),
+ call_arglist_update(I0, NewArgList);
+ true ->
+ {NewArgList, _} = subst_list_llvm(Subst, call_arglist(I)),
+ call_arglist_update(I, NewArgList)
+ end;
+ #comment{} ->
+ I;
+ #enter{} ->
+ case enter_is_known(I) of
+ false ->
+ {NewFun, Subst1} = subst1_llvm(Subst, enter_fun(I)),
+ {NewArgList, _} = subst_list_llvm(Subst1, enter_arglist(I)),
+ I0 = enter_fun_update(I, NewFun),
+ enter_arglist_update(I0, NewArgList);
+ true ->
+ {NewArgList, _} = subst_list_llvm(Subst, enter_arglist(I)),
+ enter_arglist_update(I, NewArgList)
+ end;
+ #fconv{} ->
+ {NewSrc, _ } = subst1_llvm(Subst, fconv_src(I)),
+ fconv_src_update(I, NewSrc);
+ #fixnumop{} ->
+ {NewSrc, _ } = subst1_llvm(Subst, fixnumop_src(I)),
+ fixnumop_src_update(I, NewSrc);
+ #fload{} ->
+ {NewSrc, Subst1} = subst1_llvm(Subst, fload_src(I)),
+ {NewOffset, _ } = subst1_llvm(Subst1, fload_offset(I)),
+ I0 = fload_src_update(I, NewSrc),
+ fload_offset_update(I0, NewOffset);
+ #fmove{} ->
+ {NewSrc, _ } = subst1_llvm(Subst, fmove_src(I)),
+ fmove_src_update(I, NewSrc);
+ #fp{} ->
+ {NewSrc2, Subst1} = subst1_llvm(Subst, fp_src2(I)),
+ {NewSrc1, _ } = subst1_llvm(Subst1, fp_src1(I)),
+ I0 = fp_src1_update(I, NewSrc1),
+ fp_src2_update(I0, NewSrc2);
+ #fp_unop{} ->
+ {NewSrc, _ } = subst1_llvm(Subst, fp_unop_src(I)),
+ fp_unop_src_update(I, NewSrc);
+ #fstore{} ->
+ {NewSrc, Subst1} = subst1_llvm(Subst, fstore_src(I)),
+ {NewBase, Subst2} = subst1_llvm(Subst1, fstore_base(I)),
+ {NewOffset, _ } = subst1_llvm(Subst2, fstore_offset(I)),
+ I0 = fstore_src_update(I, NewSrc),
+ I1 = fstore_base_update(I0, NewBase),
+ fstore_offset_update(I1, NewOffset);
+ #goto{} ->
+ I;
+ #goto_index{} ->
+ I;
+ #gctest{} ->
+ {NewWords, _ } = subst1_llvm(Subst, gctest_words(I)),
+ gctest_words_update(I, NewWords);
+ #label{} ->
+ I;
+ #load{} ->
+ {NewSrc, Subst1} = subst1_llvm(Subst, load_src(I)),
+ {NewOffset, _ } = subst1_llvm(Subst1, load_offset(I)),
+ I0 = load_src_update(I, NewSrc),
+ load_offset_update(I0, NewOffset);
+ #load_address{} ->
+ I;
+ #load_atom{} ->
+ I;
+ #load_word_index{} ->
+ I;
+ #move{} ->
+ {NewSrc, _ } = subst1_llvm(Subst, move_src(I)),
+ move_src_update(I, NewSrc);
+ #multimove{} ->
+ {NewSrcList, _} = subst_list_llvm(Subst, multimove_srclist(I)),
+ multimove_srclist_update(I, NewSrcList);
+ #phi{} ->
+ phi_argvar_subst(I, Subst);
+ #return{} ->
+ {NewVarList, _} = subst_list_llvm(Subst, return_varlist(I)),
+ return_varlist_update(I, NewVarList);
+ #store{} ->
+ {NewSrc, Subst1} = subst1_llvm(Subst, store_src(I)),
+ {NewBase, Subst2} = subst1_llvm(Subst1, store_base(I)),
+ {NewOffset, _ } = subst1_llvm(Subst2, store_offset(I)),
+ I0 = store_src_update(I, NewSrc),
+ I1 = store_base_update(I0, NewBase),
+ store_offset_update(I1, NewOffset);
+ #switch{} ->
+ {NewSrc, _ } = subst1_llvm(Subst, switch_src(I)),
+ switch_src_update(I, NewSrc)
+ end.
+
+subst_list_llvm(S,X) -> subst_list_llvm(S, lists:reverse(X), []).
+subst_list_llvm(S, [], Acc) -> {Acc, S};
+subst_list_llvm(S, [X|Xs], Acc) ->
+ {NewX, RestS} = subst1_llvm(S, X),
+ subst_list_llvm(RestS, Xs, [NewX|Acc]).
+
+subst1_llvm(A,B) -> subst1_llvm(A,B,[]).
+
+subst1_llvm([], X, Acc) -> {X, Acc};
+subst1_llvm([{X,Y}|Rs], X, Acc) -> {Y, Acc++Rs};
+subst1_llvm([R|Xs], X, Acc) -> subst1_llvm(Xs,X,[R|Acc]).
+
subst_defines(Subst, I)->
case I of
#alu{} ->
@@ -1614,7 +1768,11 @@ pp_var(Dev, Arg) ->
true ->
pp_hard_reg(Dev, var_index(Arg));
false ->
- io:format(Dev, "v~w", [var_index(Arg)])
+ io:format(Dev, "v~w", [var_index(Arg)]),
+ case var_liveness(Arg) of
+ dead -> io:format(Dev, "(dead)", []);
+ _ -> ok
+ end
end.
pp_arg(Dev, A) ->
diff --git a/lib/hipe/rtl/hipe_rtl.hrl b/lib/hipe/rtl/hipe_rtl.hrl
index 974e40f830..fbdf9ac524 100644
--- a/lib/hipe/rtl/hipe_rtl.hrl
+++ b/lib/hipe/rtl/hipe_rtl.hrl
@@ -28,7 +28,8 @@
-record(alu, {dst, src1, op, src2}).
-record(alub, {dst, src1, op, src2, 'cond', true_label, false_label, p}).
-record(branch, {src1, src2, 'cond', true_label, false_label, p}).
--record(call, {dstlist, 'fun', arglist, type, continuation, failcontinuation}).
+-record(call, {dstlist, 'fun', arglist, type, continuation,
+ failcontinuation, normalcontinuation = []}).
-record(comment, {text}).
-record(enter, {'fun', arglist, type}).
-record(fconv, {dst, src}).
diff --git a/lib/hipe/rtl/hipe_rtl_liveness.erl b/lib/hipe/rtl/hipe_rtl_liveness.erl
index 3cfada9d6c..0c4b6b2e11 100644
--- a/lib/hipe/rtl/hipe_rtl_liveness.erl
+++ b/lib/hipe/rtl/hipe_rtl_liveness.erl
@@ -34,7 +34,8 @@
-module(hipe_rtl_liveness).
-%% -define(LIVEOUT_NEEDED,true). % needed for liveness.inc below.
+%% -define(DEBUG_LIVENESS,true).
+-define(LIVEOUT_NEEDED,true). % needed for liveness.inc below.
-define(PRETTY_PRINT,false).
-include("hipe_rtl.hrl").
diff --git a/lib/hipe/rtl/hipe_tagscheme.erl b/lib/hipe/rtl/hipe_tagscheme.erl
index f1e8d1ef41..c27c682915 100644
--- a/lib/hipe/rtl/hipe_tagscheme.erl
+++ b/lib/hipe/rtl/hipe_tagscheme.erl
@@ -39,14 +39,13 @@
test_tuple/4, test_atom/4, test_bignum/4, test_pos_bignum/4,
test_any_pid/4, test_any_port/4,
test_ref/4, test_fun/4, test_fun2/5, test_matchstate/4,
- test_binary/4, test_bitstr/4, test_list/4,
- test_integer/4, test_number/4, test_constant/4, test_tuple_N/5]).
+ test_binary/4, test_bitstr/4, test_list/4, test_map/4,
+ test_integer/4, test_number/4, test_tuple_N/5]).
-export([realtag_fixnum/2, tag_fixnum/2, realuntag_fixnum/2, untag_fixnum/2]).
-export([test_two_fixnums/3, test_fixnums/4, unsafe_fixnum_add/3,
unsafe_fixnum_sub/3,
fixnum_gt/5, fixnum_lt/5, fixnum_ge/5, fixnum_le/5, fixnum_val/1,
- fixnum_mul/4,
- fixnum_addsub/5, fixnum_andorxor/4, fixnum_not/2,
+ fixnum_mul/4, fixnum_addsub/5, fixnum_andorxor/4, fixnum_not/2,
fixnum_bsr/3, fixnum_bsl/3]).
-export([unsafe_car/2, unsafe_cdr/2,
unsafe_constant_element/3, unsafe_update_element/3, element/6]).
@@ -113,13 +112,15 @@
-define(TAG_HEADER_EXTERNAL_PID, ((16#C bsl ?TAG_PRIMARY_SIZE) bor ?TAG_PRIMARY_HEADER)).
-define(TAG_HEADER_EXTERNAL_PORT,((16#D bsl ?TAG_PRIMARY_SIZE) bor ?TAG_PRIMARY_HEADER)).
-define(TAG_HEADER_EXTERNAL_REF, ((16#E bsl ?TAG_PRIMARY_SIZE) bor ?TAG_PRIMARY_HEADER)).
+-define(TAG_HEADER_MAP, ((16#F bsl ?TAG_PRIMARY_SIZE) bor ?TAG_PRIMARY_HEADER)).
-define(TAG_HEADER_MASK, 16#3F).
-define(HEADER_ARITY_OFFS, 6).
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
-mk_header(SZ,TAG) -> (SZ bsl ?HEADER_ARITY_OFFS) + TAG.
+mk_header(SZ, TAG) -> (SZ bsl ?HEADER_ARITY_OFFS) + TAG.
+
mk_arityval(SZ) -> mk_header(SZ, ?TAG_HEADER_ARITYVAL).
size_from_header(Sz, Header) ->
@@ -133,9 +134,9 @@ mk_var_header(Header, Size, Tag) ->
mk_fixnum(X) -> (X bsl ?TAG_IMMED1_SIZE) + ?TAG_IMMED1_SMALL.
-define(NIL, ((-1 bsl ?TAG_IMMED2_SIZE) bor ?TAG_IMMED2_NIL)).
-mk_nil() -> ?NIL.
-%% mk_atom(X) -> (X bsl ?TAG_IMMED2_SIZE) + ?TAG_IMMED2_ATOM.
-mk_non_value() -> ?THE_NON_VALUE.
+mk_nil() -> ?NIL.
+%% mk_atom(X) -> (X bsl ?TAG_IMMED2_SIZE) + ?TAG_IMMED2_ATOM.
+mk_non_value() -> ?THE_NON_VALUE.
-spec is_fixnum(integer()) -> boolean().
is_fixnum(N) when is_integer(N) ->
@@ -253,6 +254,15 @@ test_tuple_N(X, N, TrueLab, FalseLab, Pred) ->
hipe_rtl:mk_branch(Tmp, 'eq', hipe_rtl:mk_imm(mk_arityval(N)),
TrueLab, FalseLab, Pred)].
+test_map(X, TrueLab, FalseLab, Pred) ->
+ Tmp = hipe_rtl:mk_new_reg_gcsafe(),
+ HalfTrueLab = hipe_rtl:mk_new_label(),
+ MapMask = ?TAG_HEADER_MASK,
+ [test_is_boxed(X, hipe_rtl:label_name(HalfTrueLab), FalseLab, Pred),
+ HalfTrueLab,
+ get_header(Tmp, X),
+ mask_and_compare(Tmp, MapMask, ?TAG_HEADER_MAP, TrueLab, FalseLab, Pred)].
+
test_ref(X, TrueLab, FalseLab, Pred) ->
Hdr = hipe_rtl:mk_new_reg_gcsafe(),
Tag = hipe_rtl:mk_new_reg_gcsafe(),
@@ -405,17 +415,6 @@ test_number(X, TrueLab, FalseLab, Pred) ->
hipe_rtl:mk_branch(Tmp, 'eq', hipe_rtl:mk_imm(HeaderFlonum),
TrueLab, FalseLab, Pred)].
-%% CONS, NIL, and TUPLE are not constants, everything else is
-test_constant(X, TrueLab, FalseLab, Pred) ->
- Lab1 = hipe_rtl:mk_new_label(),
- Lab2 = hipe_rtl:mk_new_label(),
- Pred1 = 1-Pred,
- [test_cons(X, FalseLab, hipe_rtl:label_name(Lab1), Pred1),
- Lab1,
- test_nil(X, FalseLab, hipe_rtl:label_name(Lab2), Pred1),
- Lab2,
- test_tuple(X, FalseLab, TrueLab, Pred1)].
-
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
tag_fixnum(DestVar, SrcReg) ->
diff --git a/lib/hipe/sparc/hipe_sparc_assemble.erl b/lib/hipe/sparc/hipe_sparc_assemble.erl
index b534fe20ec..68a4e1b349 100644
--- a/lib/hipe/sparc/hipe_sparc_assemble.erl
+++ b/lib/hipe/sparc/hipe_sparc_assemble.erl
@@ -45,8 +45,8 @@ assemble(CompiledCode, Closures, Exports, Options) ->
print("Total num bytes=~w\n", [CodeSize], Options),
%%
SC = hipe_pack_constants:slim_constmap(ConstMap),
- DataRelocs = mk_data_relocs(RefsFromConsts, LabelMap),
- SSE = slim_sorted_exportmap(ExportMap,Closures,Exports),
+ DataRelocs = hipe_pack_constants:mk_data_relocs(RefsFromConsts, LabelMap),
+ SSE = hipe_pack_constants:slim_sorted_exportmap(ExportMap,Closures,Exports),
SlimRefs = hipe_pack_constants:slim_refs(AccRefs),
Bin = term_to_binary([{?VERSION_STRING(),?HIPE_SYSTEM_CRC},
ConstAlign, ConstSize,
@@ -222,7 +222,7 @@ do_pseudo_set(I, MFA, ConstMap) ->
%%% end,
%%% {load_address, {Tag,untag_mfa_or_prim(MFAorPrim)}};
{Label,constant} ->
- ConstNo = find_const({MFA,Label}, ConstMap),
+ ConstNo = hipe_pack_constants:find_const({MFA,Label}, ConstMap),
{load_address, {constant,ConstNo}};
{Label,closure} ->
{load_address, {closure,Label}};
@@ -507,37 +507,6 @@ px({pred,Pred}) -> % XXX: use pt/pn throughout entire backend
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
-mk_data_relocs(RefsFromConsts, LabelMap) ->
- lists:flatten(mk_data_relocs(RefsFromConsts, LabelMap, [])).
-
-mk_data_relocs([{MFA,Labels} | Rest], LabelMap, Acc) ->
- Map = [case Label of
- {L,Pos} ->
- Offset = find({MFA,L}, LabelMap),
- {Pos,Offset};
- {sorted,Base,OrderedLabels} ->
- {sorted, Base, [begin
- Offset = find({MFA,L}, LabelMap),
- {Order, Offset}
- end
- || {L,Order} <- OrderedLabels]}
- end
- || Label <- Labels],
- %% msg("Map: ~w Map\n",[Map]),
- mk_data_relocs(Rest, LabelMap, [Map,Acc]);
-mk_data_relocs([],_,Acc) -> Acc.
-
-find({_MFA,_L} = MFAL, LabelMap) ->
- gb_trees:get(MFAL, LabelMap).
-
-slim_sorted_exportmap([{Addr,M,F,A}|Rest], Closures, Exports) ->
- IsClosure = lists:member({M,F,A}, Closures),
- IsExported = is_exported(F, A, Exports),
- [Addr,M,F,A,IsClosure,IsExported | slim_sorted_exportmap(Rest, Closures, Exports)];
-slim_sorted_exportmap([],_,_) -> [].
-
-is_exported(F, A, Exports) -> lists:member({F,A}, Exports).
-
%%%
%%% Assembly listing support (pp_asm option).
%%%
@@ -575,14 +544,3 @@ fill_spaces(N) when N > 0 ->
fill_spaces(N-1);
fill_spaces(0) ->
[].
-
-%%%
-%%% Lookup a constant in a ConstMap.
-%%%
-
-find_const({MFA,Label},[{pcm_entry,MFA,Label,ConstNo,_,_,_}|_]) ->
- ConstNo;
-find_const(N,[_|R]) ->
- find_const(N,R);
-find_const(C,[]) ->
- ?EXIT({constant_not_found,C}).
diff --git a/lib/hipe/ssa/hipe_ssa_const_prop.inc b/lib/hipe/ssa/hipe_ssa_const_prop.inc
index 2fce384197..0876fca34a 100644
--- a/lib/hipe/ssa/hipe_ssa_const_prop.inc
+++ b/lib/hipe/ssa/hipe_ssa_const_prop.inc
@@ -3,7 +3,7 @@
%%
%% %CopyrightBegin%
%%
-%% Copyright Ericsson AB 2004-2009. All Rights Reserved.
+%% Copyright Ericsson AB 2004-2014. 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
@@ -72,10 +72,10 @@ visit_expressions([Inst | Insts], Environment, FlowWork, SSAWork) ->
%%-----------------------------------------------------------------------------
-record(env, {cfg :: #cfg{},
- executable_flags = gb_sets:empty() :: gb_set(),
- handled_blocks = gb_sets:empty() :: gb_set(),
- lattice_values = gb_trees:empty() :: gb_tree(),
- ssa_edges = gb_trees:empty() :: gb_tree()
+ executable_flags = gb_sets:empty() :: gb_sets:set(),
+ handled_blocks = gb_sets:empty() :: gb_sets:set(),
+ lattice_values = gb_trees:empty() :: gb_trees:tree(),
+ ssa_edges = gb_trees:empty() :: gb_trees:tree()
}).
create_env(CFG) ->
diff --git a/lib/hipe/test/Makefile b/lib/hipe/test/Makefile
new file mode 100644
index 0000000000..009f503abb
--- /dev/null
+++ b/lib/hipe/test/Makefile
@@ -0,0 +1,80 @@
+include $(ERL_TOP)/make/target.mk
+include $(ERL_TOP)/make/$(TARGET)/otp.mk
+
+# ----------------------------------------------------
+# Target Specs
+# ----------------------------------------------------
+
+MODULES= \
+ hipe_SUITE
+
+# .erl files for these modules are automatically generated
+GEN_MODULES= \
+ bs_SUITE \
+ maps_SUITE
+
+ERL_FILES= $(MODULES:%=%.erl)
+
+TARGET_FILES= $(MODULES:%=$(EBIN)/%.$(EMULATOR))
+INSTALL_PROGS= $(TARGET_FILES)
+
+# ----------------------------------------------------
+# Files
+# ----------------------------------------------------
+EMAKEFILE = Emakefile
+AUXILIARY_FILES = hipe.spec hipe_testsuite_driver.erl $(EMAKEFILE)
+
+# ----------------------------------------------------
+# Release directory specification
+# ----------------------------------------------------
+RELSYSDIR = $(RELEASE_PATH)/hipe_test
+
+# ----------------------------------------------------
+# FLAGS
+# ----------------------------------------------------
+
+ERL_MAKE_FLAGS +=
+ERL_COMPILE_FLAGS += -I$(ERL_TOP)/lib/test_server/include
+
+EBIN = .
+
+# ----------------------------------------------------
+# Targets
+# ----------------------------------------------------
+
+make_emakefile:
+ $(ERL_TOP)/make/make_emakefile $(ERL_COMPILE_FLAGS) -o$(EBIN) $(MODULES) \
+ > $(EMAKEFILE)
+ $(ERL_TOP)/make/make_emakefile $(ERL_COMPILE_FLAGS) -o$(EBIN) $(GEN_MODULES) \
+ >> $(EMAKEFILE)
+ $(ERL_TOP)/make/make_emakefile $(ERL_COMPILE_FLAGS) -o$(EBIN) '*_SUITE_make' \
+ >> $(EMAKEFILE)
+
+tests debug opt: make_emakefile
+ erl $(ERL_MAKE_FLAGS) -make
+
+clean:
+ rm -f $(EMAKEFILE)
+ rm -f $(TARGET_FILES) $(GEN_FILES)
+ rm -f core
+
+docs:
+
+# ----------------------------------------------------
+# Release Target
+# ----------------------------------------------------
+include $(ERL_TOP)/make/otp_release_targets.mk
+
+release_spec: opt
+
+release_docs_spec:
+
+release_tests_spec: make_emakefile
+ $(INSTALL_DIR) "$(RELSYSDIR)"
+ chmod -R u+w "$(RELSYSDIR)"
+ $(INSTALL_DATA) $(AUXILIARY_FILES) "$(RELSYSDIR)"
+ $(INSTALL_DATA) $(ERL_FILES) "$(RELSYSDIR)"
+ @tar cf - *_SUITE_data | (cd "$(RELSYSDIR)"; tar xf -)
+ cd "$(RELSYSDIR)";\
+ erlc hipe_testsuite_driver.erl;\
+ erl -noshell -run hipe_testsuite_driver create_all_suites -s erlang halt
diff --git a/lib/hipe/test/bs_SUITE_data/bs_add.erl b/lib/hipe/test/bs_SUITE_data/bs_add.erl
new file mode 100644
index 0000000000..af5a3b2f23
--- /dev/null
+++ b/lib/hipe/test/bs_SUITE_data/bs_add.erl
@@ -0,0 +1,18 @@
+%% -*- erlang-indent-level: 2 -*-
+%%-------------------------------------------------------------------------
+%% The guard in f/3 revealed a problem in the translation of the 'bs_add'
+%% BEAM instruction to Icode. The fail label was not properly translated.
+%% Fixed 3/2/2011.
+%%-------------------------------------------------------------------------
+-module(bs_add).
+
+-export([test/0]).
+
+test() ->
+ 42 = f(<<12345:16>>, 4711, <<42>>),
+ ok.
+
+f(Bin, A, B) when <<A:9, B:7/binary>> == Bin ->
+ gazonk;
+f(Bin, _, _) when is_binary(Bin) ->
+ 42.
diff --git a/lib/hipe/test/bs_SUITE_data/bs_bincomp.erl b/lib/hipe/test/bs_SUITE_data/bs_bincomp.erl
new file mode 100644
index 0000000000..082b83bab9
--- /dev/null
+++ b/lib/hipe/test/bs_SUITE_data/bs_bincomp.erl
@@ -0,0 +1,79 @@
+%%% -*- erlang-indent-level: 2 -*-
+%%%-------------------------------------------------------------------
+%%% File : bs_bincomp.erl
+%%% Author : Per Gustafsson <[email protected]>
+%%% Purpose : Test bit comprehensions
+%%% Created : 13 Sep 2006
+%%%-------------------------------------------------------------------
+-module(bs_bincomp).
+
+-export([test/0]).
+
+test() ->
+ ok = byte_aligned(),
+ ok = bit_aligned(),
+ ok = extended_byte_aligned(),
+ ok = extended_bit_aligned(),
+ ok = mixed(),
+ ok.
+
+byte_aligned() ->
+ <<"abcdefg">> = << <<(X+32)>> || <<X>> <= <<"ABCDEFG">> >>,
+ <<1:32/little,2:32/little,3:32/little,4:32/little>> =
+ << <<X:32/little>> || <<X:32>> <= <<1:32,2:32,3:32,4:32>> >>,
+ <<1:32/little,2:32/little,3:32/little,4:32/little>> =
+ << <<X:32/little>> || <<X:16>> <= <<1:16,2:16,3:16,4:16>> >>,
+ ok.
+
+bit_aligned() ->
+ <<$a:7,$b:7,$c:7,$d:7,$e:7,$f:7,$g:7>> =
+ << <<(X+32):7>> || <<X>> <= <<"ABCDEFG">> >>,
+ <<"ABCDEFG">> =
+ << <<(X-32)>> || <<X:7>> <= <<$a:7,$b:7,$c:7,$d:7,$e:7,$f:7,$g:7>> >>,
+ <<1:31/little,2:31/little,3:31/little,4:31/little>> =
+ << <<X:31/little>> || <<X:31>> <= <<1:31,2:31,3:31,4:31>> >>,
+ <<1:31/little,2:31/little,3:31/little,4:31/little>> =
+ << <<X:31/little>> || <<X:15>> <= <<1:15,2:15,3:15,4:15>> >>,
+ ok.
+
+extended_byte_aligned() ->
+ <<"abcdefg">> = << <<(X+32)>> || X <- "ABCDEFG" >>,
+ "abcdefg" = [(X+32) || <<X>> <= <<"ABCDEFG">>],
+ <<1:32/little,2:32/little,3:32/little,4:32/little>> =
+ << <<X:32/little>> || X <- [1,2,3,4] >>,
+ [256,512,768,1024] =
+ [X || <<X:16/little>> <= <<1:16,2:16,3:16,4:16>>],
+ ok.
+
+extended_bit_aligned() ->
+ <<$a:7,$b:7,$c:7,$d:7,$e:7,$f:7,$g:7>> =
+ << <<(X+32):7>> || X <- "ABCDEFG" >>,
+ "ABCDEFG" = [(X-32) || <<X:7>> <= <<$a:7,$b:7,$c:7,$d:7,$e:7,$f:7,$g:7>>],
+ <<1:31/little,2:31/little,3:31/little,4:31/little>> =
+ << <<X:31/little>> || X <- [1,2,3,4] >>,
+ [256,512,768,1024] =
+ [X || <<X:15/little>> <= <<1:15,2:15,3:15,4:15>>],
+ ok.
+
+mixed() ->
+ <<2,3,3,4,4,5,5,6>> =
+ << <<(X+Y)>> || <<X>> <= <<1,2,3,4>>, <<Y>> <= <<1,2>> >>,
+ <<2,3,3,4,4,5,5,6>> =
+ << <<(X+Y)>> || <<X>> <= <<1,2,3,4>>, Y <- [1,2] >>,
+ <<2,3,3,4,4,5,5,6>> =
+ << <<(X+Y)>> || X <- [1,2,3,4], Y <- [1,2] >>,
+ [2,3,3,4,4,5,5,6] =
+ [(X+Y) || <<X>> <= <<1,2,3,4>>, <<Y>> <= <<1,2>>],
+ [2,3,3,4,4,5,5,6] =
+ [(X+Y) || <<X>> <= <<1,2,3,4>>, Y <- [1,2]],
+ <<2:3,3:3,3:3,4:3,4:3,5:3,5:3,6:3>> =
+ << <<(X+Y):3>> || <<X:3>> <= <<1:3,2:3,3:3,4:3>>, <<Y:3>> <= <<1:3,2:3>> >>,
+ <<2:3,3:3,3:3,4:3,4:3,5:3,5:3,6:3>> =
+ << <<(X+Y):3>> || <<X:3>> <= <<1:3,2:3,3:3,4:3>>, Y <- [1,2] >>,
+ <<2:3,3:3,3:3,4:3,4:3,5:3,5:3,6:3>> =
+ << <<(X+Y):3>> || X <- [1,2,3,4], Y <- [1,2] >>,
+ [2,3,3,4,4,5,5,6] =
+ [(X+Y) || <<X:3>> <= <<1:3,2:3,3:3,4:3>>, <<Y:3>> <= <<1:3,2:3>>],
+ [2,3,3,4,4,5,5,6] =
+ [(X+Y) || <<X:3>> <= <<1:3,2:3,3:3,4:3>>, Y <- [1,2]],
+ ok.
diff --git a/lib/hipe/test/bs_SUITE_data/bs_bits.erl b/lib/hipe/test/bs_SUITE_data/bs_bits.erl
new file mode 100644
index 0000000000..ef9a6bb137
--- /dev/null
+++ b/lib/hipe/test/bs_SUITE_data/bs_bits.erl
@@ -0,0 +1,150 @@
+%%% -*- erlang-indent-level: 2 -*-
+%%%-------------------------------------------------------------------
+%%% File : bs_bits.erl
+%%% Author : Per Gustafsson <[email protected]>
+%%% Purpose : Tests for bit stream operations including matching,
+%%% construction, binary_to_list and list_to_binary
+%%% Created : 6 Sep 2006
+%%%-------------------------------------------------------------------
+-module(bs_bits).
+
+-export([test/0]).
+
+test() ->
+ <<1:100>> = <<1:100>>,
+ ok = match(7),
+ ok = match(9),
+ ok = match1(15),
+ ok = match1(31),
+ ok = horrid_match(),
+ ok = test_bitstr(),
+ ok = test_is_bitstr(<<1:1>>,<<8>>),
+ ok = test_is_binary(<<1:1>>,<<8>>),
+ ok = test_bitsize(),
+ ok = asymmetric_tests(),
+ ok = big_asymmetric_tests(),
+ ok = bitstr_to_and_from_list(),
+ ok = big_bitstr_to_and_from_list(),
+ ok = send_and_receive(),
+ ok = send_and_receive_alot(),
+ ok.
+
+match(N) ->
+ <<0:N>> = <<0:N>>,
+ ok.
+
+match1(N) ->
+ <<42:N/little>> = <<42:N/little>>,
+ ok.
+
+test_is_bitstr(Bitstr, Binary) ->
+ true = is_bitstring(Bitstr),
+ true = is_bitstring(Binary),
+ ok = if is_bitstring(Bitstr) -> ok end,
+ ok = if is_bitstring(Binary) -> ok end.
+
+test_is_binary(Bitstr, Binary) ->
+ false = is_binary(Bitstr),
+ true = is_binary(Binary),
+ ok = if is_binary(Bitstr) -> not_ok; true -> ok end,
+ ok = if is_binary(Binary) -> ok end.
+
+test_bitsize() ->
+ 101 = erlang:bit_size(<<1:101>>),
+ 1001 = erlang:bit_size(<<1:1001>>),
+ 80 = erlang:bit_size(<<1:80>>),
+ 800 = erlang:bit_size(<<1:800>>),
+ Bin = <<0:16#1000000>>,
+ BigBin = list_to_bitstring([Bin||_ <- lists:seq(1,16#10)]++[<<1:1>>]),
+ 16#10000001 = bit_size(BigBin),
+ %% Only run these on computers with lots of memory
+ %% HugeBin = list_to_bitstring([BigBin||_ <- lists:seq(1,16#10)]++[<<1:1>>]),
+ %% 16#100000011 = bit_size(HugeBin),
+ 0 = erlang:bit_size(<<>>),
+ ok.
+
+horrid_match() ->
+ <<1:4,B:24/bitstring>> = <<1:4,42:24/little>>,
+ <<42:24/little>> = B,
+ ok.
+
+test_bitstr() ->
+ <<1:7,B/bitstring>> = <<1:7,<<1:1,6>>/bitstring>>,
+ <<1:1,6>> = B,
+ B = <<1:1,6>>,
+ ok.
+
+asymmetric_tests() ->
+ <<1:12>> = <<0,1:4>>,
+ <<0,1:4>> = <<1:12>>,
+ <<1:1,X/bitstring>> = <<128,255,0,0:2>>,
+ <<1,254,0,0:1>> = X,
+ X = <<1,254,0,0:1>>,
+ <<1:1,X1:25/bitstring>> = <<128,255,0,0:2>>,
+ <<1,254,0,0:1>> = X1,
+ X1 = <<1,254,0,0:1>>,
+ ok.
+
+big_asymmetric_tests() ->
+ <<1:875,1:12>> = <<1:875,0,1:4>>,
+ <<1:875,0,1:4>> = <<1:875,1:12>>,
+ <<1:1,X/bitstring>> = <<128,255,0,0:2,1:875>>,
+ <<1,254,0,0:1,1:875>> = X,
+ X = <<1,254,0,0:1,1:875>>,
+ <<1:1,X1:900/bitstring>> = <<128,255,0,0:2,1:875>>,
+ <<1,254,0,0:1,1:875>> = X1,
+ X1 = <<1,254,0,0:1,1:875>>,
+ ok.
+
+bitstr_to_and_from_list() ->
+ <<1:7>> = list_to_bitstring(bitstring_to_list(<<1:7>>)),
+ <<1,2,3,4,1:1>> = list_to_bitstring(bitstring_to_list(<<1,2,3,4,1:1>>)),
+ [1,2,3,4,<<1:1>>] = bitstring_to_list(<<1,2,3,4,1:1>>),
+ <<1:1,1,2,3,4>> = list_to_bitstring([<<1:1>>,1,2,3,4]),
+ [128,129,1,130,<<0:1>>] = bitstring_to_list(<<1:1,1,2,3,4>>),
+ ok.
+
+big_bitstr_to_and_from_list() ->
+ <<1:800,2,3,4,1:1>> = list_to_bitstring(bitstring_to_list(<<1:800,2,3,4,1:1>>)),
+ [1,2,3,4|_Rest1] = bitstring_to_list(<<1,2,3,4,1:800,1:1>>),
+ <<1:801,1,2,3,4>> = list_to_bitstring([<<1:801>>,1,2,3,4]),
+ ok.
+
+send_and_receive() ->
+ Bin = <<1,2:7>>,
+ Pid = spawn(fun() -> receiver(Bin) end),
+ Pid ! {self(),<<1:7,8:5,Bin/bitstring>>},
+ receive
+ ok ->
+ ok
+ end.
+
+receiver(Bin) ->
+ receive
+ {Pid,<<1:7,8:5,Bin/bitstring>>} ->
+ Pid ! ok
+ end.
+
+send_and_receive_alot() ->
+ Bin = <<1:1000001>>,
+ Pid = spawn(fun() -> receiver_alot(Bin) end),
+ send_alot(100,Bin,Pid).
+
+send_alot(N,Bin,Pid) when N > 0 ->
+ Pid ! {self(),<<1:7,8:5,Bin/bitstring>>},
+ receive
+ ok ->
+ ok
+ end,
+ send_alot(N-1,Bin,Pid);
+send_alot(0,_Bin,Pid) ->
+ Pid ! no_more,
+ ok.
+
+receiver_alot(Bin) ->
+ receive
+ {Pid,<<1:7,8:5,Bin/bitstring>>} ->
+ Pid ! ok;
+ no_more -> ok
+ end,
+ receiver_alot(Bin).
diff --git a/lib/hipe/test/bs_SUITE_data/bs_bitsize.erl b/lib/hipe/test/bs_SUITE_data/bs_bitsize.erl
new file mode 100644
index 0000000000..c0774e7279
--- /dev/null
+++ b/lib/hipe/test/bs_SUITE_data/bs_bitsize.erl
@@ -0,0 +1,23 @@
+%% -*- erlang-indent-level: 2 -*-
+%%-------------------------------------------------------------------
+-module(bs_bitsize).
+
+-export([test/0]).
+
+test() ->
+ true = bitsize_in_body(<<1:42>>),
+ true = bitsize_in_guard(<<1:7>>),
+ 8 = constant_binary(42),
+ ok.
+
+bitsize_in_body(Bin) ->
+ 42 =:= erlang:bit_size(Bin).
+
+bitsize_in_guard(Bin) when erlang:bit_size(Bin) rem 7 =:= 0 ->
+ true;
+bitsize_in_guard(Bin) when is_bitstring(Bin) ->
+ false.
+
+%% Tests that binary constants can properly be treated in Icode
+constant_binary(N) when N > 0 ->
+ bit_size(<<42>>).
diff --git a/lib/hipe/test/bs_SUITE_data/bs_bugs_R08.erl b/lib/hipe/test/bs_SUITE_data/bs_bugs_R08.erl
new file mode 100644
index 0000000000..7b62a17cfb
--- /dev/null
+++ b/lib/hipe/test/bs_SUITE_data/bs_bugs_R08.erl
@@ -0,0 +1,32 @@
+%% -*- erlang-indent-level: 2 -*-
+%%-------------------------------------------------------------------
+%% When executing this in R8 (and compiled with R8) the result was
+%% {ok,[148,129,0,0]} but should be {ok,[145,148,113,129,0,0,0,0]}
+%% Thanks to Kenneth Lundin for sending this to us.
+%%-------------------------------------------------------------------
+
+-module(bs_bugs_R08).
+
+-export([test/0]).
+
+test() ->
+ List = [145,148,113,129,0,0,0,0],
+ {ok, List} = msisdn_internal_storage(<<145,148,113,129,0,0,0,0>>, []),
+ ok.
+
+%% msisdn_internal_storage/3
+%% Convert MSISDN binary to internal datatype (TBCD-octet list)
+
+msisdn_internal_storage(<<>>, MSISDN) ->
+ {ok, lists:reverse(MSISDN)};
+msisdn_internal_storage(<<2#11111111:8,_Rest/binary>>, MSISDN) ->
+ {ok, lists:reverse(MSISDN)};
+msisdn_internal_storage(<<2#1111:4,DigitN:4,_Rest/binary>>, MSISDN) when
+ DigitN < 10 ->
+ {ok, lists:reverse([(DigitN bor 2#11110000)|MSISDN])};
+msisdn_internal_storage(<<DigitNplus1:4,DigitN:4,Rest/binary>>, MSISDN) when
+ DigitNplus1 < 10, DigitN < 10 ->
+ NewMSISDN = [((DigitNplus1 bsl 4) bor DigitN)|MSISDN],
+ msisdn_internal_storage(Rest, NewMSISDN);
+msisdn_internal_storage(_Rest, _MSISDN) ->
+ {fault}. %% Mandatory IE incorrect
diff --git a/lib/hipe/test/bs_SUITE_data/bs_bugs_R09.erl b/lib/hipe/test/bs_SUITE_data/bs_bugs_R09.erl
new file mode 100644
index 0000000000..670f2a08bb
--- /dev/null
+++ b/lib/hipe/test/bs_SUITE_data/bs_bugs_R09.erl
@@ -0,0 +1,35 @@
+%% -*- erlang-indent-level: 2 -*-
+%%--------------------------------------------------------------------
+%% Date: Mon, 7 Jun 2004 13:07:39 +0300
+%% From: Einar Karttunen
+%% To: Erlang ML <[email protected]>
+%% Subject: Apparent binary matching bug with native compilation
+%%
+%% It seems that there is a problem with binary matching when
+%% compiling native code. A length prefixed field matches one
+%% byte too short in the native case.
+%%
+%% The test module works when compiled with no options, but
+%% crashes with case_clause when compiled with [native].
+%% This has been confirmed with R9C-0 and hipe snapshot 5/4/2004.
+%%--------------------------------------------------------------------
+
+-module(bs_bugs_R09).
+
+-export([test/0]).
+
+test() ->
+ ["rei",".",[]] = pp(<<3,$r,$e,$i,0>>),
+ ok.
+
+pp(Bin) ->
+ %% io:format("PP with ~p~n", [Bin]),
+ case Bin of
+ <<>> ->
+ ["."];
+ <<_:2, Len:6, Part:Len/binary>> ->
+ [binary_to_list(Part)];
+ <<_:2, Len:6, Part:Len/binary, Rest/binary>> ->
+ %% io:format("Len ~p Part ~p Rest ~p~n", [Len,Part,Rest]),
+ [binary_to_list(Part), "." | pp(Rest)]
+ end.
diff --git a/lib/hipe/test/bs_SUITE_data/bs_bugs_R12.erl b/lib/hipe/test/bs_SUITE_data/bs_bugs_R12.erl
new file mode 100644
index 0000000000..43ee9eb85b
--- /dev/null
+++ b/lib/hipe/test/bs_SUITE_data/bs_bugs_R12.erl
@@ -0,0 +1,133 @@
+%% -*- erlang-indent-level: 2 -*-
+%%--------------------------------------------------------------------
+%% Contains three cases of bugs that were reported for R12B
+%%--------------------------------------------------------------------
+-module(bs_bugs_R12).
+
+-export([test/0]).
+
+test() ->
+ ok = test_beam_bug(),
+ ok = test_v3_codegen(),
+ ok = test_hipe_bug(),
+ ok.
+
+%%--------------------------------
+%% First test case: a bug in BEAM
+%%--------------------------------
+test_beam_bug() ->
+ lists:foreach(fun (_) -> ok = run(100) end, [1,2,3,4]).
+
+%% For testing - runs scanner N number of times with same input
+run(N) ->
+ lists:foreach(fun(_) -> scan(<<"region:whatever">>, []) end, lists:seq(1, N)).
+
+scan(<<>>, TokAcc) ->
+ lists:reverse(['$thats_all_folks$' | TokAcc]);
+scan(<<D, Z, Rest/binary>>, TokAcc)
+ when (D =:= $D orelse D =:= $d) and
+ ((Z =:= $\s) or (Z =:= $() or (Z =:= $))) ->
+ scan(<<Z, Rest/binary>>, ['AND' | TokAcc]);
+scan(<<D>>, TokAcc) when (D =:= $D) or (D =:= $d) ->
+ scan(<<>>, ['AND' | TokAcc]);
+scan(<<N, Z, Rest/binary>>, TokAcc)
+ when (N =:= $N orelse N =:= $n) and
+ ((Z =:= $\s) or (Z =:= $() or (Z =:= $))) ->
+ scan(<<Z, Rest/binary>>, ['NOT' | TokAcc]);
+scan(<<C, Rest/binary>>, TokAcc) when (C >= $A) and (C =< $Z);
+ (C >= $a) and (C =< $z);
+ (C >= $0) and (C =< $9) ->
+ case Rest of
+ <<$:, R/binary>> ->
+ scan(R, [{'FIELD', C} | TokAcc]);
+ _ ->
+ scan(Rest, [{'KEYWORD', C} | TokAcc])
+ end.
+
+%%---------------------------------------------------
+%% Second test case: an internal error in v3_codegen
+%% Reported by Mateusz Berezecki on 19/1/2008
+%%---------------------------------------------------
+-define(S, {42, 4242, 4711}).
+-define(R, <<90,164,116>>).
+
+test_v3_codegen() ->
+ _ = random:seed(?S),
+ B0 = gen_bit(120, <<>>),
+ B1 = set_bit(B0, 5),
+ B2 = clr_bit(B1, 5),
+ ?R = set_bit(B2, 5),
+ ok.
+
+gen_bit(0, Acc) -> Acc;
+gen_bit(N, Acc) when is_integer(N), N > 0 ->
+ gen_bit(N-1, <<Acc/bits, (random:uniform(2)-1):1>>).
+
+%% sets bit K in the Bitmap
+set_bit(<<_Start:32/unsigned-little-integer, Bitmap/bits>>, K)
+ when is_integer(K), 0 < K, K =< bit_size(Bitmap) ->
+ Before = K-1,
+ After = bit_size(Bitmap) - K,
+ <<BeforeBits:Before/bits, _:1, AfterBits:After/bits>> = Bitmap,
+ <<BeforeBits/bits, 1:1, AfterBits/bits>>.
+
+%% clears bit K in the Bitmap
+clr_bit(<<_Start:32/unsigned-little-integer, Bitmap/bits>>, K)
+ when is_integer(K), 0 < K, K =< bit_size(Bitmap) ->
+ Before = K-1,
+ After = bit_size(Bitmap) - K,
+ <<BeforeBits:Before/bits, _:1, AfterBits:After/bits>> = Bitmap,
+ <<BeforeBits/bits, 0:1, AfterBits/bits>>.
+
+%%--------------------------------------------------------------------
+%% Third test case: a bug in HiPE
+%% Reported by Steve Vinoski on 1/3/2008
+%%
+%% Below find the results of compiling and running the example code at
+%% the bottom of this message. Using "c" to compile gives the right
+%% answer; using "hipe:c" gives the wrong answer. This is with R12B-1.
+%%
+%% Within the code, on the second instance of function check/2 you'll
+%% find a commented-out guard. If you uncomment the guard, then the
+%% code works correctly with both "c" and "hipe:c".
+%%---------------------------------------------------------------------
+
+test_hipe_bug() ->
+ String = "2006/10/02/Linux-Journal",
+ Binary = list_to_binary(String),
+ StringToMatch = "200x/" ++ String ++ " ",
+ BinaryToMatch = list_to_binary(StringToMatch),
+ {ok, Binary} = match(BinaryToMatch),
+ ok.
+
+match(<<>>) ->
+ nomatch;
+match(Bin) ->
+ <<Front:16/binary, Tail/binary>> = Bin,
+ case Front of
+ <<_:3/binary,"x/",Y:4/binary,$/,M:2/binary,$/,D:2/binary,$/>> ->
+ case check(Tail) of
+ {ok, Match} ->
+ {ok, <<Y/binary,$/,M/binary,$/,D/binary,$/,Match/binary>>};
+ {nomatch, Skip} ->
+ {skip, Skip+size(Front)};
+ _ ->
+ wrong_answer
+ end;
+ _ ->
+ nomatch
+ end.
+
+check(Bin) ->
+ check(Bin, 0).
+check(<<$ , _/binary>>, 0) ->
+ {nomatch, 0};
+check(Bin, Len) -> %when Len < size(Bin) ->
+ case Bin of
+ <<Front:Len/binary, $ , _/binary>> ->
+ {ok, Front};
+ <<_:Len/binary, $., _/binary>> ->
+ {nomatch, Len};
+ _ ->
+ check(Bin, Len+1)
+ end.
diff --git a/lib/hipe/test/bs_SUITE_data/bs_build.erl b/lib/hipe/test/bs_SUITE_data/bs_build.erl
new file mode 100644
index 0000000000..256cea9403
--- /dev/null
+++ b/lib/hipe/test/bs_SUITE_data/bs_build.erl
@@ -0,0 +1,41 @@
+%%% -*- erlang-indent-level: 2 -*-
+%%%-------------------------------------------------------------------
+%%% File : bs_build.erl
+%%% Author : Per Gustafsson <[email protected]>
+%%% Purpose :
+%%%
+%%% Created : 12 Sep 2007
+%%%-------------------------------------------------------------------
+-module(bs_build).
+
+-export([test/0]).
+
+test() ->
+ <<0,1,2,3,4,5,6>> = Bin = << <<X>> || X <- lists:seq(0, 6)>>,
+ test(Bin).
+
+test(Bin) ->
+ <<0,1,2,3,4,5,6,0,1,2,3,4,5,6>> = RealBin = multiply(Bin, 2),
+ <<6,5,4,3,2,1,0,6,5,4,3,2,1,0>> = reverse(RealBin),
+ RealBin = copy(RealBin),
+ RealBin = bc(RealBin),
+ ok.
+
+multiply(Bin, 1) ->
+ Bin;
+multiply(Bin, N) when N > 0 ->
+ <<(multiply(Bin, N-1))/binary, Bin/binary>>.
+
+bc(Bin) ->
+ << <<X>> || <<X>> <= Bin >>.
+
+reverse(<<X, Rest/binary>>) ->
+ <<(reverse(Rest))/binary, X>>;
+reverse(<<>>) -> <<>>.
+
+copy(Bin) ->
+ copy(Bin, <<>>).
+
+copy(<<X, Rest/binary>>, Bin) ->
+ copy(Rest, <<Bin/binary, X>>);
+copy(<<>>, Bin) -> Bin.
diff --git a/lib/hipe/test/bs_SUITE_data/bs_catch_bug.erl b/lib/hipe/test/bs_SUITE_data/bs_catch_bug.erl
new file mode 100644
index 0000000000..6125f8f87f
--- /dev/null
+++ b/lib/hipe/test/bs_SUITE_data/bs_catch_bug.erl
@@ -0,0 +1,25 @@
+%%% -*- erlang-indent-level: 2 -*-
+%%%-------------------------------------------------------------------
+%%% File : bs_catch_bug.erl
+%%% Author : Per Gustafsson <[email protected]>
+%%% Purpose : Tests a catch-related bug which might destroy properties
+%%% of ICode CFGs which are assumed by the subsequent ICode
+%%% binary pass.
+%%% Created : 22 Jan 2004
+%%% -------------------------------------------------------------------
+-module(bs_catch_bug).
+
+-export([test/0]).
+
+test() ->
+ test(foo, <<>>).
+
+%% Introduced auxiliary test/2 function so that constant propagation
+%% does not destroy the properties of the test. - Kostis 26/1/2004
+test(X, Bin) ->
+ catch (<<_/binary>> = X),
+ X = case Bin of
+ <<42,_/binary>> -> weird_bs_match;
+ _ -> X
+ end,
+ ok.
diff --git a/lib/hipe/test/bs_SUITE_data/bs_checksum.erl b/lib/hipe/test/bs_SUITE_data/bs_checksum.erl
new file mode 100644
index 0000000000..ca4f254f12
--- /dev/null
+++ b/lib/hipe/test/bs_SUITE_data/bs_checksum.erl
@@ -0,0 +1,35 @@
+%% -*- erlang-indent-level: 2 -*-
+%%--------------------------------------------------------------------
+%% Code from Zoltan Toth that crashed the HiPE compiler (in R11B-3).
+%% The problem was that the binary matching produces a pretty large
+%% integer and we tried to find the range for this integer in a bad way.
+%% Fixed on the same day -- 6th March 2007.
+%%--------------------------------------------------------------------
+
+-module(bs_checksum).
+
+-export([test/0]).
+
+test() ->
+ "3389DAE361AF79B04C9C8E7057F60CC6" = checksum(<<42>>),
+ ok.
+
+checksum(Bin) ->
+ Context = erlang:md5_init(),
+ checksum(Context, Bin).
+
+checksum(Context, <<>>) ->
+ bin_to_hex(erlang:md5_final(Context));
+checksum(Context, <<Bin:20480/binary,Rest/binary>>) ->
+ checksum(erlang:md5_update(Context, Bin), Rest);
+checksum(Context,Bin) ->
+ checksum(erlang:md5_update(Context, Bin), <<>>).
+
+bin_to_hex(Bin) ->
+ lists:flatten([byte_to_hex(X) || X <- binary_to_list(Bin)]).
+
+byte_to_hex(Byte) ->
+ [int_to_hex(Byte div 16), int_to_hex(Byte rem 16)].
+
+int_to_hex(Int) when Int < 10 -> $0 + Int;
+int_to_hex(Int) when Int > 9 -> $A + Int - 10.
diff --git a/lib/hipe/test/bs_SUITE_data/bs_construct.erl b/lib/hipe/test/bs_SUITE_data/bs_construct.erl
new file mode 100644
index 0000000000..9cc9ac848c
--- /dev/null
+++ b/lib/hipe/test/bs_SUITE_data/bs_construct.erl
@@ -0,0 +1,128 @@
+%% -*- erlang-indent-level: 2 -*-
+%%--------------------------------------------------------------------
+%% Tests that basic cases of binary construction work
+%%--------------------------------------------------------------------
+-module(bs_construct).
+
+-export([test/0]).
+
+test() ->
+ <<42>> = sz(8),
+ <<42:8/little>> = sz_little(8),
+ <<55>> = take_five(1, 3, 1, 7, 4),
+ ok = bs5(),
+ 16#10000008 = bit_size(large_bin(1, 2, 3, 4)),
+ ok = bad_ones(),
+ ok.
+
+%%--------------------------------------------------------------------
+%% Taken from a bug report submitted by Dan Wallin (24 Oct 2003), the
+%% following cases test construction of binaries whose segments have
+%% sizes that are statically unknown.
+
+sz(S) ->
+ <<42:S>>.
+
+sz_little(S) ->
+ <<42:S/little>>.
+
+take_five(A, Head, FB, C, Tail) ->
+ <<A:Head, FB:1, C:Tail>>.
+
+%%--------------------------------------------------------------------
+
+bs5() ->
+ Const = mk_constant(),
+ Pairs = mk_pairs(),
+ true = are_same(Const, Pairs),
+ true = lists:all(fun ({B, L}) -> binary_to_list(B) =:= L end, Pairs),
+ ok.
+
+are_same(C, L) ->
+ C =:= L.
+
+mk_constant() ->
+ [{<<213>>,[213]},
+ {<<56>>,[56]},
+ {<<1,2>>,[1,2]},
+ {<<71>>,[71]},
+ {<<8,1>>,[8,1]},
+ {<<3,9>>,[3,9]},
+ {<<9,3>>,[9,3]},
+ {<<0,0,0,0>>,[0,0,0,0]},
+ {<<62,0,0,0>>,[62,0,0,0]},
+ {<<0,0,0,62>>,[0,0,0,62]},
+ {<<138,99,0,147>>,[138,99,0,147]},
+ {<<138,99,0,148>>,[138,99,0,148]},
+ {<<147,0,99,138>>,[147,0,99,138]},
+ {<<255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255>>,
+ [255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255]},
+ {<<13>>,[13]},
+ {<<0,4,0,5>>,[0,4,0,5]},
+ {<<129>>,[129]},
+ {<<129>>,[129]},
+ {<<1,2>>,[1,2]},
+ {<<1>>,[1]},
+ {<<4,3,1>>,[4,3,1]},
+ {<<47>>,[47]},
+ {<<>>,[]},
+ {<<97,112,97>>,[97,112,97]},
+ {<<46,110,142,77,45,204,233>>,[46,110,142,77,45,204,233]},
+ {<<>>,[]}].
+
+mk_pairs() ->
+ L4 = [138,99,0,147],
+ [{<<-43>>,[256-43]},
+ {<<56>>,[56]},
+ {<<1,2>>,[1,2]},
+ {<<4:4,7:4>>,[4*16+7]},
+ {<<1:5,1:11>>,[1*8,1]},
+ {<<777:16/big>>,[3,9]},
+ {<<777:16/little>>,[9,3]},
+ {<<0.0:32/float>>,[0,0,0,0]},
+ {<<0.125:32/float>>,[62,0,0,0]},
+ {<<0.125:32/little-float>>,[0,0,0,62]},
+ {<<57285702734876389752897683:32>>,L4},
+ {<<57285702734876389752897684:32>>,[138,99,0,148]},
+ {<<57285702734876389752897683:32/little>>,lists:reverse(L4)},
+ {<<-1:17/unit:8>>,lists:duplicate(17,255)},
+ {<<13>>,[13]},
+ {<<4:8/unit:2,5:2/unit:8>>,[0,4,0,5]},
+ {<<1:1,0:6,1:1>>,[129]},
+ {<<1:1/little,0:6/little,1:1/little>>,[129]},
+ {<<<<1,2>>/binary>>,[1,2]},
+ {<<<<1,2>>:1/binary>>,[1]},
+ {<<4,3,<<1,2>>:1/binary>>,[4,3,1]},
+ {<<(256*45+47)>>,[47]},
+ {<<57:0>>,[]},
+ {<<"apa">>,"apa"},
+ {<<1:3,"string",9:5>>,[46,110,142,77,45,204,233]},
+ {<<>>,[]}].
+
+%%--------------------------------------------------------------------
+%% Constructs a big enough binary to have a bit size that needs a
+%% bignum on 32-bit architectures
+
+large_bin(X1, X2, X3, X4) ->
+ Sz = 16#4000000,
+ <<1, <<X1:Sz, X2:Sz, X3:Sz, X4:Sz>>/bits>>.
+
+%%--------------------------------------------------------------------
+%% Test construction of "bad" binaries
+
+-define(FAIL(Expr), {'EXIT', {badarg, _}} = (catch Expr)).
+
+bad_ones() ->
+ PI = math:pi(),
+ ?FAIL(<<PI>>),
+ Bin12 = <<1,2>>,
+ ?FAIL(<<Bin12>>),
+ E = 2.71,
+ ?FAIL(<<E/binary>>),
+ Int = 24334,
+ ?FAIL(<<Int/binary>>),
+ BigInt = 24334344294788947129487129487219847,
+ ?FAIL(<<BigInt/binary>>),
+ Bin123 = <<1,2,3>>,
+ ?FAIL(<<Bin123/float>>),
+ ok.
diff --git a/lib/hipe/test/bs_SUITE_data/bs_decode.erl b/lib/hipe/test/bs_SUITE_data/bs_decode.erl
new file mode 100644
index 0000000000..d12654a1e3
--- /dev/null
+++ b/lib/hipe/test/bs_SUITE_data/bs_decode.erl
@@ -0,0 +1,980 @@
+%% -*- erlang-indent-level: 2 -*-
+
+-module(bs_decode).
+
+-export([test/0]).
+
+-include("bs_decode_extract.hrl").
+
+-define(PDU, <<30,16,0,90,0,1,0,0,255,255,255,255,81,67,101,7,0,0,0,96,
+ 6,12,146,18,14,0,15,252,16,0,0,17,0,0,128,0,2,241,33,131,
+ 0,20,7,97,112,110,48,49,51,97,8,101,114,105,99,115,115,
+ 111,110,2,115,101,132,0,20,128,192,35,16,1,5,0,16,5,117,
+ 115,101,114,53,5,112,97,115,115,53,133,0,4,172,28,12,1,
+ 133,0,4,172,28,12,3,134,0,8,145,148,113,129,0,0,0,0>>).
+
+-define(RES, {ok,{sesT_createReqV0,
+ {mvsgT_tid,{mvsgT_imsi,<<81,67,101,7,0,0,0,240>>},6},
+ [81,67,101,7,0,0,0,96],
+ {sesT_qualityOfServiceV0,1,4,9,2,18},
+ 0,subscribed,0,0,
+ {mvsgT_pdpAddressType,ietf_ipv4,[]},
+ [<<"apn013a">>,<<"ericsson">>,<<"se">>],
+ {masT_protocolConfigOptions,[],
+ {masT_pap,true,1,5,"user5","pass5"},
+ []},
+ {mvsgT_ipAddress,ipv4,172,28,12,1,0,0,0,0},
+ {mvsgT_ipAddress,ipv4,172,28,12,3,0,0,0,0},
+ {mvsT_msisdn,<<145,148,113,129,0,0,0,0>>}},
+ 1}).
+
+test() ->
+ ?RES = decode_v0_opt(42, ?PDU),
+ ok.
+
+decode_v0_opt(0, Pdu) ->
+ decode_gtpc_msg(Pdu);
+decode_v0_opt(N, Pdu) ->
+ decode_gtpc_msg(Pdu),
+ decode_v0_opt(N-1, Pdu).
+
+%%% --------------------------------------------------------------
+%%% #3.1.2 DECODE GTP-C MESSAGE
+%%% --------------------------------------------------------------
+
+%%% - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
+%%% Function : decode_gtpc_msg(GTP_C_Message)->
+%%% {ok,Request,ControlDataUs} |
+%%% {fault,Cause,Request,ControlDataUs}
+%%%
+%%% Types : GTP_C_Message = binary(), GTP-C message from SGSN
+%%% Request = record(), Containing decoded request
+%%% ControlDataUS = record(), Containing header info
+%%% Cause = integer(), Error code
+%%%
+%%% Description: This function decodes a binary GTP-C message and
+%%% stores it in a record. Different records are used
+%%% for different message types.
+%%%
+%%% - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
+
+%%% Create PDP Context Request
+%%% GTP97, SNN=0
+%%% (No SNDCP N-PDU number)
+decode_gtpc_msg(<<0:3,_:4,0:1,16:8,_Length:16,SequenceNumber:16,
+ _FlowLabel:16,_SNDCP_N_PDU_Number:8,_:3/binary-unit:8,
+ TID:8/binary-unit:8,InformationElements/binary>>) ->
+ Errors = #protocolErrors{},
+ {ok,TID2} = tid_internal_storage(TID,[]),
+ EmptyCreateReq = #sesT_createReqV0{tid = TID2,
+ tidRaw = binary_to_list(TID)},
+ case catch decode_ie_create(InformationElements,0,Errors,EmptyCreateReq) of
+ {ok,CreateReq} ->
+ {ok,CreateReq,SequenceNumber};
+ {fault,Cause,CreateReq} ->
+ {fault,Cause,CreateReq,SequenceNumber};
+ {'EXIT',_Reason} ->
+ {fault,193,EmptyCreateReq,SequenceNumber}
+ end;
+
+%%% Update PDP Context Request
+%%% GTP97, SNN=0
+%%% (No SNDCP N-PDU number)
+decode_gtpc_msg(<<0:3,_:4,0:1,18:8,_Length:16,SequenceNumber:16,
+ _FlowLabel:16,_SNDCP_N_PDU_Number:8,_:3/binary-unit:8,
+ TID:8/binary-unit:8,InformationElements/binary>>) ->
+ io:format("hej", []),
+ Errors = #protocolErrors{},
+ {ok,TID2}=tid_internal_storage(TID,[]),
+ EmptyUpdateReq=#sesT_updateReqV0{tid=TID2,
+ tidRaw=binary_to_list(TID)},
+ case catch decode_ie_update(InformationElements,0,Errors,
+ EmptyUpdateReq) of
+ {ok,UpdateReq} ->
+ {ok,UpdateReq,SequenceNumber};
+ {fault,Cause,UpdateReq} ->
+ {fault,Cause,UpdateReq,SequenceNumber};
+ {'EXIT',Reason} ->
+ io:format("hej", []),
+ {fault,193,EmptyUpdateReq,SequenceNumber, Reason}
+ end;
+
+%%% Delete PDP Context Request
+%%% GTP97, SNN=0
+%%% (No SNDCP N-PDU number)
+decode_gtpc_msg(<<0:3,_:4,0:1,20:8,_Length:16,SequenceNumber:16,
+ _FlowLabel:16,_SNDCP_N_PDU_Number:8,_:3/binary-unit:8,
+ TID:8/binary-unit:8,_InformationElements/binary>>) ->
+ {ok,TID2} = tid_internal_storage(TID,[]),
+ DeleteReq = #sesT_deleteReqV0{tid=TID2},
+ {ok,DeleteReq,SequenceNumber};
+
+%%% Delete PDP Context Response
+%%% GTP97, SNN=0
+%%% (No SNDCP N-PDU number)
+decode_gtpc_msg(<<0:3,_:4,0:1,21:8,_Length:16,SequenceNumber:16,
+ _FlowLabel:16,_SNDCP_N_PDU_Number:8,_:3/binary-unit:8,
+ TID:8/binary-unit:8,InformationElements/binary>>) ->
+ {ok,TID2} = tid_internal_storage(TID,[]),
+ EmptyDeleteRes = #sesT_deleteResV0{tid=TID2},
+ case catch decode_ie_delete_res(InformationElements,0,EmptyDeleteRes) of
+ {ok, DeleteRes} ->
+ {ok,DeleteRes,SequenceNumber};
+ {fault,Cause,DeleteRes} ->
+ {fault,Cause,DeleteRes,SequenceNumber};
+ {'EXIT',_Reason} ->
+ {fault,193,EmptyDeleteRes,SequenceNumber}
+ end;
+
+%%% Error handling
+decode_gtpc_msg(_GTP_C_Message) ->
+ {fault}.
+
+%%% - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
+%%% decode_ie_create/4
+%%% Decode information elements for Create PDP Context Request
+
+%%% All elements decoded
+decode_ie_create(<<>>,PresentIEs,Errors,CreateReq) ->
+ %% Check mandatory IE's
+ if
+ (PresentIEs band 16#77D) =/= 16#77D ->
+ {fault,202,CreateReq}; %Mandatory IE missing
+ true -> %OK
+ %% Check errors during decoding
+ case Errors of
+ #protocolErrors{invalidManIE=true} -> %Invalid mandatory IE
+ {fault,201,CreateReq}; %Mandatory IE incorrect
+ #protocolErrors{outOfSequence=true} -> %Out of sequence
+ {fault,193,CreateReq}; %Invalid message format
+ #protocolErrors{incorrectOptIE=true} -> %Incorrect optional IE
+ {fault,203,CreateReq}; %Optional IE incorrect
+ _ -> %OK
+ {ok,CreateReq}
+ end
+ end;
+
+%%% Quality of Service Profile, Mandatory
+decode_ie_create(<<6:8,QoSElement:3/binary-unit:8,Rest/binary>>,PresentIEs,
+ Errors,CreateReq) ->
+ if
+ (PresentIEs band 16#00000001) =:= 16#00000001 -> %Repeated IE's, ignore
+ decode_ie_create(Rest,PresentIEs,Errors,CreateReq);
+ PresentIEs > 16#00000001 -> %Out of sequence
+ UpdatedErrors=Errors#protocolErrors{outOfSequence=true},
+ <<_:2,DelayClass:3,ReliabilityClass:3,
+ PeakThroughput:4,_:1,PrecedenceClass:3,
+ _:3,MeanThroughput:5>> = QoSElement,
+ QoS=#sesT_qualityOfServiceV0{delayClass=DelayClass,
+ reliabilityClass=ReliabilityClass,
+ peakThroughput=PeakThroughput,
+ precedenceClass=PrecedenceClass,
+ meanThroughput=MeanThroughput},
+ UpdatedCreateReq=CreateReq#sesT_createReqV0{qos=QoS},
+ decode_ie_create(Rest,(PresentIEs bor 16#00000001),
+ UpdatedErrors,UpdatedCreateReq);
+ true -> %OK
+ <<_:2,DelayClass:3,ReliabilityClass:3,
+ PeakThroughput:4,_:1,PrecedenceClass:3,
+ _:3,MeanThroughput:5>> = QoSElement,
+ QoS=#sesT_qualityOfServiceV0{delayClass=DelayClass,
+ reliabilityClass=ReliabilityClass,
+ peakThroughput=PeakThroughput,
+ precedenceClass=PrecedenceClass,
+ meanThroughput=MeanThroughput},
+ UpdatedCreateReq=CreateReq#sesT_createReqV0{qos=QoS},
+ decode_ie_create(Rest,(PresentIEs bor 16#00000001),
+ Errors,UpdatedCreateReq)
+ end;
+
+%%% Recovery, Optional
+decode_ie_create(<<14:8,Recovery:8,Rest/binary>>,
+ PresentIEs,Errors,CreateReq) ->
+ if
+ (PresentIEs band 16#00000002) =:= 16#00000002 -> %Repeated IE, ignored
+ decode_ie_create(Rest,PresentIEs,Errors,CreateReq);
+ PresentIEs > 16#00000002 -> %Out of sequence
+ UpdatedErrors=Errors#protocolErrors{outOfSequence=true},
+ UpdatedCreateReq=CreateReq#sesT_createReqV0{recovery=Recovery},
+ decode_ie_create(Rest,(PresentIEs bor 16#00000002),
+ UpdatedErrors,UpdatedCreateReq);
+ true -> %OK
+ UpdatedCreateReq=CreateReq#sesT_createReqV0{recovery=Recovery},
+ decode_ie_create(Rest,(PresentIEs bor 16#00000002),Errors,
+ UpdatedCreateReq)
+ end;
+
+%%% Selection mode, Mandatory
+decode_ie_create(<<15:8,_:6,SelectionMode:2,Rest/binary>>,PresentIEs,
+ Errors,CreateReq) ->
+ if
+ (PresentIEs band 16#00000004) =:= 16#00000004 -> %Repeated IE, ignored
+ decode_ie_create(Rest,PresentIEs,Errors,CreateReq);
+ PresentIEs > 16#00000004 -> %Out of sequence
+ UpdatedErrors=Errors#protocolErrors{outOfSequence=true},
+ UpdatedCreateReq=CreateReq#sesT_createReqV0{
+ selMode=selection_mode_internal_storage(SelectionMode)},
+ decode_ie_create(Rest,(PresentIEs bor 16#00000004),
+ UpdatedErrors,UpdatedCreateReq);
+ true -> %OK
+ UpdatedCreateReq=CreateReq#sesT_createReqV0{
+ selMode=selection_mode_internal_storage(SelectionMode)},
+ decode_ie_create(Rest,(PresentIEs bor 16#00000004),Errors,
+ UpdatedCreateReq)
+ end;
+
+%%% Flow Label Data I, Mandatory
+decode_ie_create(<<16:8,FlowLabel:16,Rest/binary>>,PresentIEs,Errors,CreateReq) ->
+ if
+ (PresentIEs band 16#00000008) =:= 16#00000008 -> %Repeated IE, ignored
+ decode_ie_create(Rest,PresentIEs,Errors,CreateReq);
+ PresentIEs > 16#00000008 -> %Out of sequence
+ UpdatedErrors=Errors#protocolErrors{outOfSequence=true},
+ UpdatedCreateReq=CreateReq#sesT_createReqV0{flowLblData=FlowLabel},
+ decode_ie_create(Rest,(PresentIEs bor 16#00000008),
+ UpdatedErrors,UpdatedCreateReq);
+ true -> %OK
+ UpdatedCreateReq=CreateReq#sesT_createReqV0{flowLblData=FlowLabel},
+ decode_ie_create(Rest,(PresentIEs bor 16#00000008),Errors,
+ UpdatedCreateReq)
+ end;
+
+%%% Flow Label Signalling, Mandatory
+decode_ie_create(<<17:8,FlowLabel:16,Rest/binary>>,PresentIEs,Errors,CreateReq) ->
+ if
+ (PresentIEs band 16#00000010) =:= 16#00000010 -> %Repeated IE, ignored
+ decode_ie_create(Rest,PresentIEs,Errors,CreateReq);
+ PresentIEs > 16#00000010 -> %Out of sequence
+ UpdatedErrors=Errors#protocolErrors{outOfSequence=true},
+ UpdatedCreateReq=CreateReq#sesT_createReqV0{flowLblSig=FlowLabel},
+ decode_ie_create(Rest,(PresentIEs bor 16#00000010),
+ UpdatedErrors,UpdatedCreateReq);
+ true -> %OK
+ UpdatedCreateReq=CreateReq#sesT_createReqV0{flowLblSig=FlowLabel},
+ decode_ie_create(Rest,(PresentIEs bor 16#00000010),Errors,
+ UpdatedCreateReq)
+ end;
+
+%%% End User Address, Mandatory
+decode_ie_create(<<128:8,Length:16,More/binary>>,PresentIEs,
+ Errors,CreateReq) ->
+ <<PDPElement:Length/binary-unit:8,Rest/binary>> = More,
+ if
+ (PresentIEs band 16#00000020) =:= 16#00000020 -> %Repeated IE, ignore
+ decode_ie_create(Rest,PresentIEs,Errors,CreateReq);
+ PresentIEs > 16#00000020 -> %Out of sequence
+ case pdp_addr_internal_storage(PDPElement) of
+ {ok,PDPAddress} ->
+ UpdatedErrors=Errors#protocolErrors{outOfSequence=true},
+ UpdatedCreateReq=CreateReq#sesT_createReqV0{endUserAdd=PDPAddress},
+ decode_ie_create(Rest,(PresentIEs bor 16#00000020),
+ UpdatedErrors,UpdatedCreateReq);
+ {fault} ->
+ UpdatedErrors=Errors#protocolErrors{invalidManIE=true,
+ outOfSequence=true},
+ decode_ie_create(Rest,(PresentIEs bor 16#00000020),
+ UpdatedErrors,CreateReq)
+ end;
+ true -> %OK
+ case pdp_addr_internal_storage(PDPElement) of
+ {ok,PDPAddress} ->
+ UpdatedCreateReq=CreateReq#sesT_createReqV0{endUserAdd=PDPAddress},
+ decode_ie_create(Rest,(PresentIEs bor 16#00000020),
+ Errors,UpdatedCreateReq);
+ {fault} ->
+ UpdatedErrors=Errors#protocolErrors{invalidManIE=true},
+ decode_ie_create(Rest,(PresentIEs bor 16#00000020),
+ UpdatedErrors,CreateReq)
+ end
+ end;
+
+%%% Access Point Name, Mandatory
+decode_ie_create(<<131:8,Length:16,More/binary>>,PresentIEs,
+ Errors,CreateReq) ->
+ <<APNElement:Length/binary-unit:8,Rest/binary>> = More,
+ if
+ (PresentIEs band 16#00000040) =:= 16#00000040 -> %Repeated IE, ignore
+ decode_ie_create(Rest,PresentIEs,Errors,CreateReq);
+ PresentIEs > 16#00000040 -> %Out of sequence
+ case catch apn_internal_storage(APNElement,[]) of
+ {ok,APN} ->
+ UpdatedErrors=Errors#protocolErrors{outOfSequence=true},
+ UpdatedCreateReq=CreateReq#sesT_createReqV0{accPointName=APN},
+ decode_ie_create(Rest,(PresentIEs bor 16#00000040),
+ UpdatedErrors,UpdatedCreateReq);
+ _ ->
+ UpdatedErrors=Errors#protocolErrors{outOfSequence=true,
+ invalidManIE=true},
+ decode_ie_create(Rest,(PresentIEs bor 16#00000040),
+ UpdatedErrors,CreateReq)
+ end;
+ true -> %OK
+ case catch apn_internal_storage(APNElement,[]) of
+ {ok,APN} ->
+ UpdatedCreateReq=CreateReq#sesT_createReqV0{accPointName=APN},
+ decode_ie_create(Rest,(PresentIEs bor 16#00000040),
+ Errors,UpdatedCreateReq);
+ _ ->
+ UpdatedErrors=Errors#protocolErrors{invalidManIE=true},
+ decode_ie_create(Rest,(PresentIEs bor 16#00000040),
+ UpdatedErrors,CreateReq)
+ end
+ end;
+
+%%% Protocol Configuration Options, Optional
+decode_ie_create(<<132:8,Length:16,More/binary>>,PresentIEs,Errors,CreateReq) ->
+ <<ConfigurationElement:Length/binary-unit:8,Rest/binary>> = More,
+ if
+ (PresentIEs band 16#00000080) =:= 16#00000080 -> %Repeated IE, ignore
+ decode_ie_create(Rest,PresentIEs,Errors,CreateReq);
+ PresentIEs > 16#00000080 -> %Out of sequence
+ case catch pco_internal_storage(ConfigurationElement) of
+ {ok,PCO} ->
+ UpdatedErrors=Errors#protocolErrors{outOfSequence=true},
+ UpdatedCreateReq=CreateReq#sesT_createReqV0{protConOpt=PCO},
+ decode_ie_create(Rest,(PresentIEs bor 16#00000080),
+ UpdatedErrors,UpdatedCreateReq);
+ _ ->
+ UpdatedErrors=Errors#protocolErrors{outOfSequence=true,
+ incorrectOptIE=true},
+ decode_ie_create(Rest,(PresentIEs bor 16#00000080),
+ UpdatedErrors,CreateReq)
+ end;
+ true -> %OK
+ case catch pco_internal_storage(ConfigurationElement) of
+ {ok,PCO} ->
+ UpdatedCreateReq=CreateReq#sesT_createReqV0{protConOpt=PCO},
+ decode_ie_create(Rest,(PresentIEs bor 16#00000080),
+ Errors,UpdatedCreateReq);
+ _ ->
+ UpdatedErrors=Errors#protocolErrors{incorrectOptIE=true},
+ decode_ie_create(Rest,(PresentIEs bor 16#00000080),
+ UpdatedErrors,CreateReq)
+ end
+ end;
+
+%%% SGSN Address for signalling, Mandatory OR SGSN Address for user traffic, Mandatory
+decode_ie_create(<<133:8,Length:16,More/binary>>,PresentIEs,
+ Errors,CreateReq) ->
+ <<AddressElement:Length/binary-unit:8,Rest/binary>> = More,
+ if
+ (PresentIEs band 16#00000300) =:= 16#00000300 -> %Repeated IE, ignore
+ decode_ie_create(Rest,PresentIEs,Errors,CreateReq);
+ PresentIEs > 16#00000200 -> %Out of sequence
+ if
+ (PresentIEs band 16#00000100) =:= 16#00000000 -> %Signalling
+ case gsn_addr_internal_storage(AddressElement) of
+ {ok,GSNAddr} ->
+ UpdatedErrors=Errors#protocolErrors{outOfSequence=true},
+ UpdatedCreateReq=CreateReq#sesT_createReqV0{sgsnAddSig=GSNAddr},
+ decode_ie_create(Rest,(PresentIEs bor 16#00000100),
+ UpdatedErrors,UpdatedCreateReq);
+ {fault} ->
+ UpdatedErrors=Errors#protocolErrors{invalidManIE=true,
+ outOfSequence=true},
+ decode_ie_create(Rest,(PresentIEs bor 16#00000100),
+ UpdatedErrors,CreateReq)
+ end;
+ true -> % User traffic
+ case gsn_addr_internal_storage(AddressElement) of
+ {ok,GSNAddr} ->
+ UpdatedErrors=Errors#protocolErrors{outOfSequence=true},
+ UpdatedCreateReq=CreateReq#sesT_createReqV0{sgsnAddUser=GSNAddr},
+ decode_ie_create(Rest,(PresentIEs bor 16#00000200),
+ UpdatedErrors,UpdatedCreateReq);
+ {fault} ->
+ UpdatedErrors=Errors#protocolErrors{invalidManIE=true,
+ outOfSequence=true},
+ decode_ie_create(Rest,(PresentIEs bor 16#00000200),
+ UpdatedErrors,CreateReq)
+ end
+ end;
+ PresentIEs < 16#00000100 -> %OK, SGSN Address for signalling
+ case gsn_addr_internal_storage(AddressElement) of
+ {ok,GSNAddr} ->
+ UpdatedCreateReq=CreateReq#sesT_createReqV0{sgsnAddSig=GSNAddr},
+ decode_ie_create(Rest,(PresentIEs bor 16#00000100),
+ Errors,UpdatedCreateReq);
+ {fault} ->
+ UpdatedErrors=Errors#protocolErrors{invalidManIE=true},
+ decode_ie_create(Rest,(PresentIEs bor 16#00000100),
+ UpdatedErrors,CreateReq)
+ end;
+ true -> %OK, SGSN Address for user traffic
+ case gsn_addr_internal_storage(AddressElement) of
+ {ok,GSNAddr} ->
+ UpdatedCreateReq=CreateReq#sesT_createReqV0{sgsnAddUser=GSNAddr},
+ decode_ie_create(Rest,(PresentIEs bor 16#00000200),
+ Errors,UpdatedCreateReq);
+ {fault} ->
+ UpdatedErrors=Errors#protocolErrors{invalidManIE=true},
+ decode_ie_create(Rest,(PresentIEs bor 16#00000200),
+ UpdatedErrors,CreateReq)
+ end
+ end;
+
+%%% MSISDN, Mandatory
+decode_ie_create(<<134:8,Length:16,More/binary>>,PresentIEs,
+ Errors,CreateReq) ->
+ <<MSISDNElement:Length/binary-unit:8,Rest/binary>> = More,
+ if
+ (PresentIEs band 16#00000400) =:= 16#00000400 -> %Repeated IE, ignore
+ decode_ie_create(Rest,PresentIEs,Errors,CreateReq);
+ PresentIEs > 16#00000400 -> %Out of sequence
+ case msisdn_internal_storage(MSISDNElement,[]) of
+ {ok,MSISDN} ->
+ UpdatedErrors=Errors#protocolErrors{outOfSequence=true},
+ UpdatedCreateReq=CreateReq#sesT_createReqV0{msisdn=MSISDN},
+ decode_ie_create(Rest,(PresentIEs bor 16#00000400),
+ UpdatedErrors,UpdatedCreateReq);
+ {fault} ->
+ UpdatedErrors=Errors#protocolErrors{outOfSequence=true,invalidManIE=true},
+ decode_ie_create(Rest,(PresentIEs bor 16#00000400),
+ UpdatedErrors,CreateReq)
+ end;
+ true -> %OK
+ UpdatedCreateReq=CreateReq#sesT_createReqV0{msisdn=#mvsT_msisdn{value=MSISDNElement}},
+ decode_ie_create(Rest,(PresentIEs bor 16#00000400),
+ Errors,UpdatedCreateReq)
+
+ end;
+
+%%% Private Extension, Optional
+%%% Not implemented
+
+%%% Error handling, Unexpected or unknown IE
+decode_ie_create(UnexpectedIE,PresentIEs,Errors,CreateReq) ->
+ case check_ie(UnexpectedIE) of
+ {defined_ie,Rest} -> %OK, ignored
+ decode_ie_create(Rest,PresentIEs,Errors,CreateReq);
+ {handled_ie,Rest} -> %OK, ignored
+ decode_ie_create(Rest,PresentIEs,Errors,CreateReq);
+ {unhandled_ie} -> %Error, abort decoding
+ {fault,193,CreateReq} %Invalid message format
+ end.
+
+%%% - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
+%%% decode_ie_update/4
+%%% Decode information elements for Update PDP Context Request
+
+%%% All elements decoded
+decode_ie_update(<<>>,PresentIEs,Errors,UpdateReq) ->
+ %% Check mandatory IE's
+ if
+ (PresentIEs band 16#3D) =/= 16#3D ->
+ {fault,202,UpdateReq}; %Mandatory IE missing
+ true -> %OK
+ %% Check errors during decoding
+ case Errors of
+ #protocolErrors{invalidManIE=true} -> %Invalid mandatory IE
+ {fault,201,UpdateReq}; %Mandatory IE incorrect
+ #protocolErrors{outOfSequence=true} -> %Out of sequence
+ {fault,193,UpdateReq}; %Invalid message format
+ _ -> %OK
+ {ok,UpdateReq}
+ end
+ end;
+
+%%% Quality of Service Profile, Mandatory
+decode_ie_update(<<6:8,QoSElement:3/binary-unit:8,Rest/binary>>,PresentIEs,
+ Errors,UpdateReq) ->
+ if
+ (PresentIEs band 16#00000001) =:= 16#00000001 -> %Repeated IE's, ignore
+ decode_ie_update(Rest,PresentIEs,Errors,UpdateReq);
+ PresentIEs > 16#00000001 -> %Out of sequence
+ UpdatedErrors=Errors#protocolErrors{outOfSequence=true},
+ <<_:2,DelayClass:3,ReliabilityClass:3,
+ PeakThroughput:4,_:1,PrecedenceClass:3,
+ _:3,MeanThroughput:5>> = QoSElement,
+ QoS=#sesT_qualityOfServiceV0{delayClass=DelayClass,
+ reliabilityClass=ReliabilityClass,
+ peakThroughput=PeakThroughput,
+ precedenceClass=PrecedenceClass,
+ meanThroughput=MeanThroughput},
+ UpdatedUpdateReq=UpdateReq#sesT_updateReqV0{qos=QoS},
+ decode_ie_update(Rest,(PresentIEs bor 16#00000001),
+ UpdatedErrors,UpdatedUpdateReq);
+ true -> %OK
+ <<_:2,DelayClass:3,ReliabilityClass:3,
+ PeakThroughput:4,_:1,PrecedenceClass:3,
+ _:3,MeanThroughput:5>> = QoSElement,
+ QoS=#sesT_qualityOfServiceV0{delayClass=DelayClass,
+ reliabilityClass=ReliabilityClass,
+ peakThroughput=PeakThroughput,
+ precedenceClass=PrecedenceClass,
+ meanThroughput=MeanThroughput},
+ UpdatedUpdateReq=UpdateReq#sesT_updateReqV0{qos=QoS},
+ decode_ie_update(Rest,(PresentIEs bor 16#00000001),
+ Errors,UpdatedUpdateReq)
+ end;
+
+%%% Recovery, Optional
+decode_ie_update(<<14:8,Recovery:8,Rest/binary>>,PresentIEs,Errors,UpdateReq) ->
+ if
+ (PresentIEs band 16#00000002) =:= 16#00000002 -> %Repeated IE, ignored
+ decode_ie_update(Rest,PresentIEs,Errors,UpdateReq);
+ PresentIEs > 16#00000002 -> %Out of sequence
+ UpdatedErrors=Errors#protocolErrors{outOfSequence=true},
+ UpdatedUpdateReq=UpdateReq#sesT_updateReqV0{recovery=Recovery},
+ decode_ie_update(Rest,(PresentIEs bor 16#00000002),
+ UpdatedErrors,UpdatedUpdateReq);
+ true -> %OK
+ UpdatedUpdateReq=UpdateReq#sesT_updateReqV0{recovery=Recovery},
+ decode_ie_update(Rest,(PresentIEs bor 16#00000002),Errors,
+ UpdatedUpdateReq)
+ end;
+
+%%% Flow Label Data I, Mandatory
+decode_ie_update(<<16:8,FlowLabel:16,Rest/binary>>,PresentIEs,Errors,UpdateReq) ->
+ if
+ (PresentIEs band 16#00000004) =:= 16#00000004 -> %Repeated IE, ignored
+ decode_ie_update(Rest,PresentIEs,Errors,UpdateReq);
+ PresentIEs > 16#00000004 -> %Out of sequence
+ UpdatedErrors=Errors#protocolErrors{outOfSequence=true},
+ UpdatedUpdateReq=UpdateReq#sesT_updateReqV0{flowLblData=FlowLabel},
+ decode_ie_update(Rest,(PresentIEs bor 16#00000004),
+ UpdatedErrors,UpdatedUpdateReq);
+ true -> %OK
+ UpdatedUpdateReq=UpdateReq#sesT_updateReqV0{flowLblData=FlowLabel},
+ decode_ie_update(Rest,(PresentIEs bor 16#00000004),Errors,
+ UpdatedUpdateReq)
+ end;
+
+%%% Flow Label Signalling, Mandatory
+decode_ie_update(<<17:8,FlowLabel:16,Rest/binary>>,PresentIEs,Errors,UpdateReq) ->
+ if
+ (PresentIEs band 16#00000008) =:= 16#00000008 -> %Repeated IE, ignored
+ decode_ie_update(Rest,PresentIEs,Errors,UpdateReq);
+ PresentIEs > 16#00000008 -> %Out of sequence
+ UpdatedErrors=Errors#protocolErrors{outOfSequence=true},
+ UpdatedUpdateReq=UpdateReq#sesT_updateReqV0{flowLblSig=FlowLabel},
+ decode_ie_update(Rest,(PresentIEs bor 16#00000008),
+ UpdatedErrors,UpdatedUpdateReq);
+ true -> %OK
+ UpdatedUpdateReq=UpdateReq#sesT_updateReqV0{flowLblSig=FlowLabel},
+ decode_ie_update(Rest,(PresentIEs bor 16#00000008),Errors,
+ UpdatedUpdateReq)
+ end;
+
+%%% SGSN Address for signalling, Mandatory OR SGSN Address for user traffic, Mandatory
+decode_ie_update(<<133:8,Length:16,More/binary>>,PresentIEs,
+ Errors,UpdateReq) ->
+ <<AddressElement:Length/binary-unit:8,Rest/binary>> = More,
+ if
+ (PresentIEs band 16#00000030) =:= 16#00000030 -> %Repeated IE, ignore
+ decode_ie_update(Rest,PresentIEs,Errors,UpdateReq);
+ PresentIEs > 16#00000020 -> %Out of sequence
+ if
+ (PresentIEs band 16#00000010) =:= 16#00000000 -> %Signalling
+ case gsn_addr_internal_storage(AddressElement) of
+ {ok,GSNAddr} ->
+ UpdatedErrors=Errors#protocolErrors{outOfSequence=true},
+ UpdatedUpdateReq=UpdateReq#sesT_updateReqV0{sgsnAddSig=GSNAddr},
+ decode_ie_update(Rest,(PresentIEs bor 16#00000010),
+ UpdatedErrors,UpdatedUpdateReq);
+ {fault} ->
+ UpdatedErrors=Errors#protocolErrors{invalidManIE=true,
+ outOfSequence=true},
+ decode_ie_update(Rest,(PresentIEs bor 16#00000010),
+ UpdatedErrors,UpdateReq)
+ end;
+ true -> % User traffic
+ case gsn_addr_internal_storage(AddressElement) of
+ {ok,GSNAddr} ->
+ UpdatedErrors=Errors#protocolErrors{outOfSequence=true},
+ UpdatedUpdateReq=UpdateReq#sesT_updateReqV0{sgsnAddUser=GSNAddr},
+ decode_ie_update(Rest,(PresentIEs bor 16#00000020),
+ UpdatedErrors,UpdatedUpdateReq);
+ {fault} ->
+ UpdatedErrors=Errors#protocolErrors{invalidManIE=true,
+ outOfSequence=true},
+ decode_ie_update(Rest,(PresentIEs bor 16#00000020),
+ UpdatedErrors,UpdateReq)
+ end
+ end;
+ PresentIEs < 16#00000010 -> %OK, SGSN Address for signalling
+ case gsn_addr_internal_storage(AddressElement) of
+ {ok,GSNAddr} ->
+ UpdatedUpdateReq=UpdateReq#sesT_updateReqV0{sgsnAddSig=GSNAddr},
+ decode_ie_update(Rest,(PresentIEs bor 16#00000010),
+ Errors,UpdatedUpdateReq);
+ {fault} ->
+ UpdatedErrors=Errors#protocolErrors{invalidManIE=true},
+ decode_ie_update(Rest,(PresentIEs bor 16#00000010),
+ UpdatedErrors,UpdateReq)
+ end;
+ true -> %OK, SGSN Address for user traffic
+ case gsn_addr_internal_storage(AddressElement) of
+ {ok,GSNAddr} ->
+ UpdatedUpdateReq=UpdateReq#sesT_updateReqV0{sgsnAddUser=GSNAddr},
+ decode_ie_update(Rest,(PresentIEs bor 16#00000020),
+ Errors,UpdatedUpdateReq);
+ {fault} ->
+ UpdatedErrors=Errors#protocolErrors{invalidManIE=true},
+ decode_ie_update(Rest,(PresentIEs bor 16#00000020),
+ UpdatedErrors,UpdateReq)
+ end
+ end;
+
+%%% Private Extension, Optional
+%%% Not implemented
+
+%%% Error handling, Unexpected or unknown IE
+decode_ie_update(UnexpectedIE,PresentIEs,Errors,UpdateReq) ->
+ case check_ie(UnexpectedIE) of
+ {defined_ie,Rest} -> %OK, ignored
+ decode_ie_update(Rest,PresentIEs,Errors,UpdateReq);
+ {handled_ie,Rest} -> %OK, ignored
+ decode_ie_update(Rest,PresentIEs,Errors,UpdateReq);
+ {unhandled_ie} -> %Error, abort decoding
+ {fault,193,UpdateReq} %Invalid message format
+ end.
+
+
+%%% - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
+%%% decode_ie_delete_req/4
+%%% Decode information elements for Delete PDP Context Request
+
+%%% Private Extension, Optional
+%%% Not implemented
+
+
+%%% - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
+%%% decode_ie_delete_res/4
+%%% Decode information elements for Delete PDP Context Response
+
+%%% All elements decoded
+decode_ie_delete_res(<<>>,PresentIEs,DeleteRes) ->
+ %% Check mandatory IE's
+ if
+ (PresentIEs band 16#0001) =/= 16#0001 ->
+ {fault,202,DeleteRes}; %Mandatory IE missing
+ true -> %OK
+ {ok,DeleteRes}
+ end;
+
+%%% Cause, Mandatory
+decode_ie_delete_res(<<1:8,Cause:8,Rest/binary>>,PresentIEs,DeleteRes) ->
+ if
+ (PresentIEs band 16#00000001) =:= 16#00000001 -> %Repeated IE, ignored
+ decode_ie_delete_res(Rest,PresentIEs,DeleteRes);
+ true -> %OK
+ UpdatedDeleteRes=DeleteRes#sesT_deleteResV0{cause=Cause},
+ decode_ie_delete_res(Rest,(PresentIEs bor 16#00000001),
+ UpdatedDeleteRes)
+ end;
+
+%%% Private Extension, Optional
+%%% Not implemented
+
+%%% Error handling, Unexpected or unknown IE
+decode_ie_delete_res(UnexpectedIE,PresentIEs,DeleteRes) ->
+ case check_ie(UnexpectedIE) of
+ {defined_ie,Rest} -> %OK, ignored
+ decode_ie_delete_res(Rest,PresentIEs,DeleteRes);
+ {handled_ie,Rest} -> %OK, ignored
+ decode_ie_delete_res(Rest,PresentIEs,DeleteRes);
+ {unhandled_ie} -> %Error, abort decoding
+ {fault,193,DeleteRes} %Invalid message format
+ end.
+
+%%% --------------------------------------------------------------
+%%% #3.2 COMMON INTERNAL FUNCTIONS
+%%% --------------------------------------------------------------
+
+%%% - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
+%%% check_ie/1
+%%% Check Information Element, Unexpected or Unknown
+check_ie(<<1:8,_:8,Rest/binary>>) ->
+ {defined_ie,Rest};
+%%% IMSI
+check_ie(<<2:8,_:8/binary-unit:8,Rest/binary>>) ->
+ {defined_ie,Rest};
+%%% RAI
+check_ie(<<3:8,_:6/binary-unit:8,Rest/binary>>) ->
+ {defined_ie,Rest};
+%%% TTLI
+check_ie(<<4:8,_:4/binary-unit:8,Rest/binary>>) ->
+ {defined_ie,Rest};
+%%% P-TMSI
+check_ie(<<5:8,_:4/binary-unit:8,Rest/binary>>) ->
+ {defined_ie,Rest};
+%%% Quality of Service Profile
+check_ie(<<6:8,_:3/binary-unit:8,Rest/binary>>) ->
+ {defined_ie,Rest};
+%%% Reordering Required
+check_ie(<<8:8,_:8,Rest/binary>>) ->
+ {defined_ie,Rest};
+%%% Authentication Triplet
+check_ie(<<9:8,_:28/binary-unit:8,Rest/binary>>) ->
+ {defined_ie,Rest};
+%%% MAP Cause
+check_ie(<<11:8,_:8,Rest/binary>>) ->
+ {defined_ie,Rest};
+%%% P-TMSI Signature
+check_ie(<<12:8,_:3/binary-unit:8,Rest/binary>>) ->
+ {defined_ie,Rest};
+%%% MS Validated
+check_ie(<<13:8,_:8,Rest/binary>>) ->
+ {defined_ie,Rest};
+%%% Recovery
+check_ie(<<14:8,_:8,Rest/binary>>) ->
+ {defined_ie,Rest};
+%%% Selection Mode
+check_ie(<<15:8,_:8,Rest/binary>>) ->
+ {defined_ie,Rest};
+%%% Flow Label Data I
+check_ie(<<16:8,_:16,Rest/binary>>) ->
+ {defined_ie,Rest};
+%%% Flow Label Signalling
+check_ie(<<17:8,_:16,Rest/binary>>) ->
+ {defined_ie,Rest};
+%%% Flow Label Data II
+check_ie(<<18:8,_:32,Rest/binary>>) ->
+ {defined_ie,Rest};
+%%% MS Not Reachable Reason
+check_ie(<<19:8,_:8,Rest/binary>>) ->
+ {defined_ie,Rest};
+%%% Charging ID
+check_ie(<<127:8,_:4/binary-unit:8,Rest/binary>>) ->
+ {defined_ie,Rest};
+%%% TLV element, skipped using Length
+check_ie(<<1:1,_:7,Length:16,More/binary>>) ->
+ if
+ Length > byte_size(More) ->
+ {unhandled_ie};
+ true ->
+ <<_:Length/binary-unit:8,Rest/binary>> = More,
+ {handled_ie,Rest}
+ end;
+%%% TV element, unknown size. Can not be handled.
+check_ie(_UnhandledIE) ->
+ {unhandled_ie}.
+
+%%% - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
+%%% tid_internal_storage/3
+%%% Convert TID binary to internal datatype
+tid_internal_storage(Bin,_) ->
+ Size = byte_size(Bin) - 1,
+ <<Front:Size/binary,NSAPI:4,DigitN:4>> = Bin,
+ Result =
+ case DigitN of
+ 2#1111 ->
+ #mvsgT_tid{imsi = #mvsgT_imsi{value = Front}, nsapi = NSAPI};
+ _ ->
+ Value = <<Front/binary,2#1111:4,DigitN:4>>,
+ #mvsgT_tid{imsi = #mvsgT_imsi{value = Value}, nsapi = NSAPI}
+ end,
+ {ok,Result}.
+%% tid_internal_storage(<<NSAPI:4,2#1111:4>>,IMSI) ->
+%% {ok,#mvsgT_tid{imsi=#mvsgT_imsi{value=lists:reverse(IMSI)},
+%% nsapi=NSAPI}};
+%% tid_internal_storage(<<NSAPI:4,DigitN:4>>,IMSI) when
+%% DigitN < 10 ->
+%% {ok,#mvsgT_tid{imsi=#mvsgT_imsi{value=lists:reverse([(DigitN bor 2#11110000)|IMSI])},
+%% nsapi=NSAPI}};
+%% tid_internal_storage(<<2#11111111:8,Rest/binary>>,IMSI) ->
+%% tid_internal_storage(Rest,IMSI);
+%% tid_internal_storage(<<2#1111:4,DigitN:4,Rest/binary>>,IMSI) when
+%% DigitN < 10 ->
+%% tid_internal_storage(Rest,[(DigitN bor 2#11110000)|IMSI]);
+%% tid_internal_storage(<<DigitNplus1:4,DigitN:4,Rest/binary>>,IMSI) when
+%% DigitNplus1 < 10,
+%% DigitN < 10 ->
+%% tid_internal_storage(Rest,[((DigitNplus1 bsl 4) bor DigitN)|IMSI]);
+%% tid_internal_storage(_Rest,_IMSI) ->
+%% {fault}. %% Mandatory IE incorrect
+
+%%% - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
+%%% selection_mode_internal_storage/1
+%%% Convert Selection Mode integer to internal datatype (enum)
+selection_mode_internal_storage(0) ->
+ subscribed;
+selection_mode_internal_storage(1) ->
+ msRequested;
+selection_mode_internal_storage(2) ->
+ sgsnSelected;
+selection_mode_internal_storage(3) ->
+ sgsnSelected.
+
+%%% - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
+%%% pdp_addr_internal_storage/1
+%%% Convert PDP address to internal datatype (record containing
+%%% addresstype and value)
+pdp_addr_internal_storage(<<_:4,0:4,1:8>>) ->
+ {ok,#mvsgT_pdpAddressType{pdpTypeNbr=etsi_ppp,address=[]}};
+pdp_addr_internal_storage(<<_:4,0:4,2:8>>) ->
+ {ok,#mvsgT_pdpAddressType{pdpTypeNbr=etsi_osp_ihoss,address=[]}};
+pdp_addr_internal_storage(<<_:4,1:4,16#21:8>>) ->
+ {ok,#mvsgT_pdpAddressType{pdpTypeNbr=ietf_ipv4,address=[]}};
+pdp_addr_internal_storage(<<_:4,1:4,16#21:8,IP_A:8,IP_B:8,IP_C:8,IP_D:8>>) ->
+ {ok,#mvsgT_pdpAddressType{pdpTypeNbr=ietf_ipv4,
+ address=[IP_A,IP_B,IP_C,IP_D]}};
+pdp_addr_internal_storage(<<_:4,1:4,16#57:8,IP_A:16,IP_B:16,IP_C:16,IP_D:16,
+ IP_E:16,IP_F:16,IP_G:16,IP_H:16>>) ->
+ {ok,#mvsgT_pdpAddressType{pdpTypeNbr=ietf_ipv6,
+ address=[IP_A,IP_B,IP_C,IP_D,IP_E,IP_F,IP_G,IP_H]}};
+pdp_addr_internal_storage(_PDP_ADDR) ->
+ {fault}.
+
+%%% - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
+%%% apn_internal_storage/2
+%%% Convert APN to internal datatype (List containing APN labels)
+apn_internal_storage(<<>>,APN) ->
+ {ok,lists:reverse(APN)};
+apn_internal_storage(<<Length:8,Rest/binary>>,APN) ->
+ <<Label:Length/binary-unit:8,MoreAPNLabels/binary>> = Rest,
+ apn_internal_storage(MoreAPNLabels,[Label|APN]).
+
+%%% - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
+%%% pco_internal_storage/1
+%%% Convert Protocol Configuration Options to internal datatype.
+%%% Implemented configuration options:
+%%% For PPP:
+%%% LCP - Not implemented
+%%% PAP - Authenticate request
+%%% CHAP - Challenge
+%%% - Response
+%%% IPCP - IP-Address
+%%% For OSP:IHOSS
+%%% Nothing implemented
+pco_internal_storage(<<1:1,_:4,0:3,PPPConfigurationOptions/binary>>) ->
+ case ppp_configuration_options(PPPConfigurationOptions,
+ #masT_pap{exists=false},[],[]) of
+ {ok,PAP,CHAP,IPCP} ->
+ {ok,#masT_protocolConfigOptions{pap=PAP,chap=CHAP,ipcp=IPCP}};
+ {fault} ->
+ {fault}
+ end;
+pco_internal_storage(<<1:1,_:4,1:3,_OSP_IHOSSConfigurationOptions/binary>>) ->
+ {ok,osp_ihoss};
+pco_internal_storage(_UnknownConfigurationOptions) ->
+ {fault}. %% Optional IE incorrect
+
+ppp_configuration_options(<<>>,PAP,CHAP,IPCP) ->
+ {ok,PAP,CHAP,IPCP};
+ppp_configuration_options(<<16#C021:16,Length:8,More/binary>>,PAP,CHAP,IPCP) ->
+ %% LCP - Not implemented
+ <<_LCP:Length/binary-unit:8,Rest/binary>> = More,
+ ppp_configuration_options(Rest,PAP,CHAP,IPCP);
+ppp_configuration_options(<<16#C023:16,_Length:8,1:8,Identifier:8,DataLength:16,
+ More/binary>>,_PAP,CHAP,IPCP) ->
+ %% PAP - Authenticate request
+ ActualDataLength=DataLength-4, %% DataLength includes Code, Identifier and itself
+ <<Data:ActualDataLength/binary-unit:8,Rest/binary>> = More,
+ <<PeerIDLength:8,PeerData/binary>> = Data,
+ <<PeerID:PeerIDLength/binary-unit:8,PasswdLength:8,PasswordData/binary>> = PeerData,
+ <<Password:PasswdLength/binary,_Padding/binary>> = PasswordData,
+ ppp_configuration_options(Rest,#masT_pap{exists=true,code=1,id=Identifier,
+ username=binary_to_list(PeerID),
+ password=binary_to_list(Password)},CHAP,IPCP);
+
+ppp_configuration_options(<<16#C023:16,Length:8,More/binary>>,PAP,CHAP,IPCP) ->
+ %% PAP - Other, not implemented
+ <<_PAP:Length/binary-unit:8,Rest/binary>> = More,
+ ppp_configuration_options(Rest,PAP,CHAP,IPCP);
+ppp_configuration_options(<<16#C223:16,_Length:8,1:8,Identifier:8,DataLength:16,
+ More/binary>>,PAP,CHAP,IPCP) ->
+ %% CHAP - Challenge
+ ActualDataLength=DataLength-4, %% DataLength includes Code, Identifier and itself
+ <<Data:ActualDataLength/binary-unit:8,Rest/binary>> = More,
+ <<ValueSize:8,ValueAndName/binary>> = Data,
+ <<Value:ValueSize/binary-unit:8,Name/binary>> = ValueAndName,
+ ppp_configuration_options(Rest,PAP,[#masT_chap{code=1,id=Identifier,
+ value=binary_to_list(Value),
+ name=binary_to_list(Name)}|CHAP],
+ IPCP);
+ppp_configuration_options(<<16#C223:16,_Length:8,2:8,Identifier:8,DataLength:16,
+ More/binary>>,PAP,CHAP,IPCP) ->
+ %% CHAP - Response
+ ActualDataLength=DataLength-4, %% DataLength includes Code, Identifier and itself
+ <<Data:ActualDataLength/binary-unit:8,Rest/binary>> = More,
+ <<ValueSize:8,ValueAndName/binary>> = Data,
+ <<Value:ValueSize/binary-unit:8,Name/binary>> = ValueAndName,
+ ppp_configuration_options(Rest,PAP,[#masT_chap{code=2,id=Identifier,
+ value=binary_to_list(Value),
+ name=binary_to_list(Name)}|CHAP],
+ IPCP);
+ppp_configuration_options(<<16#C223:16,Length:8,More/binary>>,PAP,CHAP,IPCP) ->
+ %% CHAP - Other, not implemented
+ <<_CHAP:Length/binary-unit:8,Rest/binary>> = More,
+ ppp_configuration_options(Rest,PAP,CHAP,IPCP);
+ppp_configuration_options(<<16#8021:16,_Length:8,1:8,Identifier:8,OptionsLength:16,
+ More/binary>>,PAP,CHAP,IPCP) ->
+ %% IPCP - Configure request
+ ActualOptionsLength=OptionsLength-4, %% OptionsLength includes Code, Identifier and itself
+ <<Options:ActualOptionsLength/binary-unit:8,Rest/binary>> = More,
+ case Options of
+ <<3:8,6:8,A1:8,A2:8,A3:8,A4:8>> ->
+ %% IP Address, version 4
+ ppp_configuration_options(Rest,PAP,CHAP,
+ [#masT_ipcp{exists=true,code=1,
+ id=Identifier,
+ ipcpList=[#masT_ipcpData{type=3,ipAddress=
+ #mvsgT_ipAddress{version=ipv4,
+ a1=A1,a2=A2,
+ a3=A3,a4=A4,
+ a5=0,a6=0,
+ a7=0,a8=0},
+ rawMessage=binary_to_list(Options)}]}|IPCP]);
+ <<129:8,6:8,B1:8,B2:8,B3:8,B4:8>> ->
+ %% IP Address, version 4
+ ppp_configuration_options(Rest,PAP,CHAP,
+ [#masT_ipcp{exists=true,code=1,
+ id=Identifier,
+ ipcpList=[#masT_ipcpData{type=129,ipAddress=
+ #mvsgT_ipAddress{version=ipv4,
+ a1=B1,a2=B2,
+ a3=B3,a4=B4},
+ rawMessage=binary_to_list(Options)}]}|IPCP]);
+
+ <<131:8,6:8,C1:8,C2:8,C3:8,C4:8>> ->
+ %% IP Address, version 4
+ ppp_configuration_options(Rest,PAP,CHAP,
+ [#masT_ipcp{exists=true,code=1,
+ id=Identifier,
+ ipcpList=[#masT_ipcpData{type=131,ipAddress=
+ #mvsgT_ipAddress{version=ipv4,
+ a1=C1,a2=C2,
+ a3=C3,a4=C4},
+ rawMessage=binary_to_list(Options)}]}|IPCP]);
+ _ ->
+ ppp_configuration_options(Rest,PAP,CHAP,IPCP)
+ end;
+ppp_configuration_options(<<_UnknownProtocolID:16,Length:8,More/binary>>,
+ PAP,CHAP,IPCP) ->
+ <<_Skipped:Length/binary-unit:8,Rest/binary>> = More,
+ ppp_configuration_options(Rest,PAP,CHAP,IPCP);
+ppp_configuration_options(_Unhandled,_PAP,_CHAP,_IPCP) ->
+ {fault}.
+
+%%% - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
+%%% gsn_addr_internal_storage/1
+%%% Convert GSN Address to internal datatype
+gsn_addr_internal_storage(<<IP_A:8,IP_B:8,IP_C:8,IP_D:8>>) ->
+ {ok,#mvsgT_ipAddress{version=ipv4,a1=IP_A,a2=IP_B,a3=IP_C,a4=IP_D,a5=0,a6=0,a7=0,a8=0}};
+gsn_addr_internal_storage(<<IP_A:16,IP_B:16,IP_C:16,IP_D:16,
+ IP_E:16,IP_F:16,IP_G:16,IP_H:16>>) ->
+ {ok,#mvsgT_ipAddress{version=ipv6,a1=IP_A,a2=IP_B,a3=IP_C,a4=IP_D,
+ a5=IP_E,a6=IP_F,a7=IP_G,a8=IP_H}};
+gsn_addr_internal_storage(_GSN_ADDR) ->
+ {fault}.
+
+%%% - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
+%%% msisdn_internal_storage/3
+%%% Convert MSISDN binary to internal datatype (TBCD-octet list)
+
+msisdn_internal_storage(<<>>,MSISDN) ->
+ {ok,#mvsT_msisdn{value=lists:reverse(MSISDN)}};
+msisdn_internal_storage(<<2#11111111:8,_Rest/binary>>,MSISDN) ->
+ {ok,#mvsT_msisdn{value=lists:reverse(MSISDN)}};
+msisdn_internal_storage(<<2#1111:4,DigitN:4,_Rest/binary>>,MSISDN) when
+ DigitN < 10 ->
+ {ok,#mvsT_msisdn{value=lists:reverse([(DigitN bor 2#11110000)|MSISDN])}};
+msisdn_internal_storage(<<DigitNplus1:4,DigitN:4,Rest/binary>>,MSISDN) when
+ DigitNplus1 < 10,
+ DigitN < 10 ->
+ NewMSISDN=[((DigitNplus1 bsl 4) bor DigitN)|MSISDN],
+ msisdn_internal_storage(Rest,NewMSISDN);
+msisdn_internal_storage(_Rest,_MSISDN) ->
+ {fault}. %% Mandatory IE incorrect
diff --git a/lib/hipe/test/bs_SUITE_data/bs_decode_extract.hrl b/lib/hipe/test/bs_SUITE_data/bs_decode_extract.hrl
new file mode 100644
index 0000000000..80add514a0
--- /dev/null
+++ b/lib/hipe/test/bs_SUITE_data/bs_decode_extract.hrl
@@ -0,0 +1,91 @@
+-ifndef(EXTDEC_HRL).
+-define(EXTDEC_HRL, true).
+
+-record(protocolErrors,{
+ invalidManIE=false,
+ outOfSequence=false,
+ incorrectOptIE=false}).
+-record(mvsT_msisdn, {value}).
+-record(mvsT_isdnAddress, {value}).
+-record(mvsT_hlrAddress, {value}).
+-record(mvsT_authenticationTriplet, {rand, sres, kc}).
+-record(mvsT_authenticationQuintuplet, {rand, xres, ck, ik, autn}).
+-record(mvsT_resynchInfo, {rand, auts}).
+-record(mvsT_resynch, {label, value}).
+-record(mvsT_storeImsiFault, {label, value}).
+-record(mvsT_additionalImsisResults, {roamingStatus, defaultApnOperatorId, misc1, misc2, misc3}).
+-record(mvsT_pdpActiveRecord, {contextId, nsapi, pdpTypeReq, pdpAddrReq, apnReq, qosReq, pdpTypeInUse, pdpAddressNature, pdpAddressInUse, apnInUse, ggsnAddrInUse, qosNegotiated}).
+-record(mvsgT_rai, {mcc, mnc, lac, rac}).
+-record(mvsgT_lai, {mcc, mnc, lac}).
+-record(mvsgT_errorInd, {dummyElement}).
+-record(mvsgT_deleteRes, {cause}).
+-record(mvsgT_deleteReq, {dummyElement}).
+-record(mvsgT_ptmsi, {value}).
+-record(mvsgT_ddRef, {cid, extId, validity}).
+-record(mvsgT_dpRef, {cid, devId}).
+-record(mvsgT_qualityOfService, {delayClass, relClass, peakThrput, precClass, meanThrput}).
+-record(mvsgT_pdpAddressType, {pdpTypeNbr, address}).
+-record(mvsgT_msNetworkCapability, {gea1, smCapDediccatedChannel, smCapGprsChannel, ucs2Support, ssScreenInd}).
+-record(mvsgT_cellId, {mcc, mnc, lac, rac, ci}).
+-record(mvsgT_ipAddress, {version, a1, a2, a3, a4, a5, a6, a7, a8}).
+-record(mvsgT_restartContextData, {gsn_address, restart_counter}).
+-record(mvsgT_updateRes, {cause, qos, ggsnAddSig, ggsnAddUser, recovery, flowLabDataI, flowLabSig, chargId, optFlags}).
+-record(mvsgT_updateReq, {qos, sgsnAddSig, sgsnAddUser, recovery, flowLabDataI, flowLabSig, otpFlags}).
+-record(mvsgT_imsi, {value}).
+-record(mvsgT_tid, {imsi, nsapi}).
+-record(mvsgT_extQualityOfService, {allocRetention, trfClass, delOrder, delOfErrSDU, maxSDUSize, maxBRUp, maxBRDown, residualBER, sduErrorRatio, transferDelay, traffHandlPrio, guarBRUp, guarBRDown}).
+-record(mvsgT_qualServ, {label, value}).
+-record(sesT_gnDevContextData, {numberOfContext, recoveryInfoArray}).
+-record(sesT_tid, {imsi, nsapi}).
+-record(sesT_gnDevContextDataInfo, {dummy}).
+-record(sesT_teid, {value}).
+-record(sesT_qualityOfServiceV1, {allocRetPriority, delayClass, reliabilityClass, peakThroughput, precedenceClass, meanThroughput, trafficClass, deliveryOrder, delivOfErrSDU, maxSDUsize, maxBrUp, maxBrDown, residualBER, sduErrorRatio, transferDelay, trafficHandlPrio, guaranteedBrUp, guaranteedBrDown}).
+-record(sesT_flowLbl, {value}).
+-record(sesT_qualityOfServiceV0, {delayClass, reliabilityClass, peakThroughput, precedenceClass, meanThroughput}).
+-record(sesT_createReq, {dummy}).
+-record(sesT_createRes, {dummy}).
+-record(sesT_deleteReq, {dummy}).
+-record(sesT_deleteRes, {dummy}).
+-record(sesT_gtid, {imsi, nsapi}).
+-record(sesT_updateReq, {dummy}).
+-record(sesT_updateRes, {dummy}).
+-record(sesT_gcontrolDataUs, {gtpSeqNr, gsnAddress, gtunnelId, gsnPort}).
+-record(sesT_gcontrolDataDs, {gtpSeqNr, gsnAddress, protocol, gtunnelId, flowLabSig, gsnPort}).
+-record(sesT_createResV1, {cause, teidSignalling, teidData, ggsnAddSig, ggsnAddUser, reorderingReq, recovery, chargId, endUserAdd, optFlags, protConOpt, qos}).
+-record(sesT_createReqV1, {qos, sgsnAddSig, sgsnAddUser, selMode, recovery, msisdn, endUserAdd, accPointName, optFlags, protConOpt, imsi, teidData, teidSignalling, nsapi}).
+-record(sesT_deleteReqV1, {teardownInd, nsapi}).
+-record(sesT_deleteResV1, {cause}).
+-record(sesT_updateReqV1, {imsi, recovery, teidData, teidSignalling, nsapi, sgsnAddSig, sgsnAddUser, qos}).
+-record(sesT_updateResV1, {cause, recovery, teidData, teidSignalling, chargId, ggsnAddSig, ggsnAddUser, qos}).
+-record(sesT_deleteReqV0, {tid}).
+-record(sesT_deleteResV0, {tid, cause}).
+-record(sesT_createReqV0, {tid, tidRaw, qos, recovery, selMode, flowLblData, flowLblSig, endUserAdd, accPointName, protConOpt, sgsnAddSig, sgsnAddUser, msisdn}).
+-record(sesT_createResV0, {tid, cause, qos, reorderingReq, recovery, flowLblData, flowLblSig, chargId, endUserAdd, protConOpt, ggsnAddSig, ggsnAddUser}).
+-record(sesT_updateReqV0, {tid, tidRaw, qos, recovery, flowLblData, flowLblSig, sgsnAddSig, sgsnAddUser}).
+-record(sesT_updateResV0, {tid, cause, qos, recovery, flowLblData, flowLblSig, chargId, ggsnAddSig, ggsnAddUser}).
+-record(sesT_echoReq, {dummy}).
+-record(sesT_echoRes, {dummy}).
+-record(sesT_echoReqV1, {dummy}).
+-record(sesT_echoResV1, {recovery}).
+-record(sesT_echoReqV0, {dummy}).
+-record(sesT_echoResV0, {recovery}).
+-record(masT_apnSecurity, {sgsnSel, subscribedSel, userSel, ipSpoofing}).
+-record(masT_radiusServer, {radiusApn, radiusAddress, radiusMepAddress, timer, tries, secret}).
+-record(masT_ipSegment, {startSegAddress, stopSegAddress, netmask}).
+-record(masT_llf, {name, metric, id}).
+-record(masT_apnLink, {ggsnAddress, ipSegList, ipAddressOrigin, llfConnName, mepAddress}).
+-record(masT_ispSubObj, {label, value}).
+-record(masT_ipcpData, {type, ipAddress, rawMessage}).
+-record(masT_ipcp, {exists, code, id, ipcpList}).
+-record(masT_pap, {exists, code, id, username, password}).
+-record(masT_chap, {code, id, value, name}).
+-record(masT_ispDevContextData, {nsapi, ipAddress, apnhandle}).
+-record(masT_protocolConfigOptions, {chap, pap, ipcp}).
+-record(masT_apnRadius, {radiusAddress, timer, tries, secret}).
+-record(masT_outbandRadius, {gwAddress, llfConnName, primRadius, secRadius}).
+-record(masT_radiusPair, {primRadius, secRadius}).
+-record(masT_radiusOpt, {dummyMsisdnAuth, dummyMsisdnAcct, msisdnInAuth, msisdnInAcct, sendFullImsi, sendMccMnc, sendSelMode, sendChargingId, asynchAcct}).
+-record(masT_radiusConfig, {hostApn, authPair, acctList, radiusOptions}).
+-record(masT_apnConfig, {link, security, radiusConfig, primDns, secDns, dhcpAddress, indAcct, indAuth, userNameBasedSelection}).
+
+-endif.
diff --git a/lib/hipe/test/bs_SUITE_data/bs_des.erl b/lib/hipe/test/bs_SUITE_data/bs_des.erl
new file mode 100644
index 0000000000..9c495d37ad
--- /dev/null
+++ b/lib/hipe/test/bs_SUITE_data/bs_des.erl
@@ -0,0 +1,734 @@
+%%% -*- erlang-indent-level: 2 -*-
+%%%-------------------------------------------------------------------
+%%% File : bs_des.erl
+%%% Author : Per Gustafsson <[email protected]>
+%%% Purpose : An implementation of the DES Encryption/Descryption
+%%% algorithm using Erlang binaries.
+%%%
+%%% Created : 14 Apr 2004
+%%%-------------------------------------------------------------------
+-module(bs_des).
+
+-export([encode/2, decode/2, test/0]).
+
+-define(ITERATIONS, 42). %% for benchmarking use a higher number
+
+test() ->
+ Bin = <<1:64>>,
+ Size= byte_size(Bin),
+ Key = <<4704650607608769871263876:64>>,
+ Jumbled = run_encode(?ITERATIONS, Bin, Key),
+ Unjumbled = run_decode(?ITERATIONS, Jumbled, Key),
+ <<Bin:Size/binary,_/binary>> = Unjumbled,
+ ok.
+
+run_encode(1, Bin, Key) ->
+ encode(Bin, Key);
+run_encode(N, Bin, Key) ->
+ encode(Bin, Key),
+ run_encode(N-1, Bin, Key).
+
+run_decode(1, Bin, Key) ->
+ decode(Bin, Key);
+run_decode(N, Bin, Key) ->
+ decode(Bin, Key),
+ run_decode(N-1, Bin, Key).
+
+encode(Data, Key) ->
+ Keys = schedule(Key),
+ list_to_binary(encode_data(Data, Keys)).
+
+decode(Data, Key) ->
+ Keys = lists:reverse(schedule(Key)),
+ list_to_binary(decode_data(Data, Keys)).
+
+encode_data(<<Data:8/binary, Rest/binary>>, Keys) ->
+ [ipinv(des_core(ip(Data), Keys))|encode_data(Rest, Keys)];
+encode_data(<<Rest/binary>>, Keys) ->
+ case byte_size(Rest) of
+ 0 -> [];
+ X ->
+ Y = 8 - X,
+ Data = <<Rest/binary, 0:Y/integer-unit:8>>,
+ [ipinv(des_core(ip(Data), Keys))]
+ end.
+
+decode_data(<<Data:8/binary, Rest/binary>>, Keys) ->
+ [ipinv(dechiper(ip(Data), Keys))|decode_data(Rest, Keys)];
+decode_data(_, _Keys) ->
+ [].
+
+schedule(Key) ->
+ NewKey = pc1(Key),
+ subkeys(NewKey, 1).
+
+subkeys(_Key, 17) ->
+ [];
+subkeys(Key, N) ->
+ TmpKey =
+ case rotate(N) of
+ 1 ->
+ <<X1:1, L:27, X2:1, R:27>> = Key,
+ <<L:27, X1:1, R:27, X2:1>>;
+ 2 ->
+ <<X1:2, L:26, X2:2, R:26>> = Key,
+ <<L:26, X1:2, R:26, X2:2>>
+ end,
+ [pc2(TmpKey)|subkeys(TmpKey, N+1)].
+
+pc2(<<I1:1, I2:1, I3:1, I4:1, I5:1, I6:1, I7:1, I8:1,
+ _I9:1, I10:1, I11:1, I12:1, I13:1, I14:1, I15:1, I16:1,
+ I17:1, _I18:1, I19:1, I20:1, I21:1, _I22:1, I23:1, I24:1,
+ _I25:1, I26:1, I27:1, I28:1, I29:1, I30:1, I31:1, I32:1,
+ I33:1, I34:1, _I35:1, I36:1, I37:1, _I38:1, I39:1, I40:1,
+ I41:1, I42:1, _I43:1, I44:1, I45:1, I46:1, I47:1, I48:1,
+ I49:1, I50:1, I51:1, I52:1, I53:1, _I54:1, I55:1, I56:1>>) ->
+ <<I14:1, I17:1, I11:1, I24:1, I1:1, I5:1, I3:1, I28:1,
+ I15:1, I6:1, I21:1, I10:1, I23:1, I19:1, I12:1, I4:1,
+ I26:1, I8:1, I16:1, I7:1, I27:1, I20:1, I13:1, I2:1,
+ I41:1, I52:1, I31:1, I37:1, I47:1, I55:1, I30:1, I40:1,
+ I51:1, I45:1, I33:1, I48:1, I44:1, I49:1, I39:1, I56:1,
+ I34:1, I53:1, I46:1, I42:1, I50:1, I36:1, I29:1, I32:1>>.
+
+pc1(<<I1:1, I2:1, I3:1, I4:1, I5:1, I6:1, I7:1, _:1,
+ I9:1, I10:1, I11:1, I12:1, I13:1, I14:1, I15:1, _:1,
+ I17:1, I18:1, I19:1, I20:1, I21:1, I22:1, I23:1, _:1,
+ I25:1, I26:1, I27:1, I28:1, I29:1, I30:1, I31:1, _:1,
+ I33:1, I34:1, I35:1, I36:1, I37:1, I38:1, I39:1, _:1,
+ I41:1, I42:1, I43:1, I44:1, I45:1, I46:1, I47:1, _:1,
+ I49:1, I50:1, I51:1, I52:1, I53:1, I54:1, I55:1, _:1,
+ I57:1, I58:1, I59:1, I60:1, I61:1, I62:1, I63:1, _:1>>) ->
+ <<I57:1, I49:1, I41:1, I33:1, I25:1, I17:1, I9:1, I1:1,
+ I58:1, I50:1, I42:1, I34:1, I26:1, I18:1, I10:1, I2:1,
+ I59:1, I51:1, I43:1, I35:1, I27:1, I19:1, I11:1, I3:1,
+ I60:1, I52:1, I44:1, I36:1, I63:1, I55:1, I47:1, I39:1,
+ I31:1, I23:1, I15:1, I7:1, I62:1, I54:1, I46:1, I38:1,
+ I30:1, I22:1, I14:1, I6:1, I61:1, I53:1, I45:1, I37:1,
+ I29:1, I21:1, I13:1, I5:1, I28:1, I20:1, I12:1, I4:1>>.
+
+ip(<<I1:1, I2:1, I3:1, I4:1, I5:1, I6:1, I7:1, I8:1,
+ I9:1, I10:1, I11:1, I12:1, I13:1, I14:1, I15:1, I16:1,
+ I17:1, I18:1, I19:1, I20:1, I21:1, I22:1, I23:1, I24:1,
+ I25:1, I26:1, I27:1, I28:1, I29:1, I30:1, I31:1, I32:1,
+ I33:1, I34:1, I35:1, I36:1, I37:1, I38:1, I39:1, I40:1,
+ I41:1, I42:1, I43:1, I44:1, I45:1, I46:1, I47:1, I48:1,
+ I49:1, I50:1, I51:1, I52:1, I53:1, I54:1, I55:1, I56:1,
+ I57:1, I58:1, I59:1, I60:1, I61:1, I62:1, I63:1, I64:1>>) ->
+ <<I58:1, I50:1, I42:1, I34:1, I26:1, I18:1, I10:1, I2:1,
+ I60:1, I52:1, I44:1, I36:1, I28:1, I20:1, I12:1, I4:1,
+ I62:1, I54:1, I46:1, I38:1, I30:1, I22:1, I14:1, I6:1,
+ I64:1, I56:1, I48:1, I40:1, I32:1, I24:1, I16:1, I8:1,
+ I57:1, I49:1, I41:1, I33:1, I25:1, I17:1, I9:1, I1:1,
+ I59:1, I51:1, I43:1, I35:1, I27:1, I19:1, I11:1, I3:1,
+ I61:1, I53:1, I45:1, I37:1, I29:1, I21:1, I13:1, I5:1,
+ I63:1, I55:1, I47:1, I39:1, I31:1, I23:1, I15:1, I7:1>>.
+
+ipinv(<<I58:1, I50:1, I42:1, I34:1, I26:1, I18:1, I10:1, I2:1,
+ I60:1, I52:1, I44:1, I36:1, I28:1, I20:1, I12:1, I4:1,
+ I62:1, I54:1, I46:1, I38:1, I30:1, I22:1, I14:1, I6:1,
+ I64:1, I56:1, I48:1, I40:1, I32:1, I24:1, I16:1, I8:1,
+ I57:1, I49:1, I41:1, I33:1, I25:1, I17:1, I9:1, I1:1,
+ I59:1, I51:1, I43:1, I35:1, I27:1, I19:1, I11:1, I3:1,
+ I61:1, I53:1, I45:1, I37:1, I29:1, I21:1, I13:1, I5:1,
+ I63:1, I55:1, I47:1, I39:1, I31:1, I23:1, I15:1, I7:1>>) ->
+ <<I1:1, I2:1, I3:1, I4:1, I5:1, I6:1, I7:1, I8:1,
+ I9:1, I10:1, I11:1, I12:1, I13:1, I14:1, I15:1, I16:1,
+ I17:1, I18:1, I19:1, I20:1, I21:1, I22:1, I23:1, I24:1,
+ I25:1, I26:1, I27:1, I28:1, I29:1, I30:1, I31:1, I32:1,
+ I33:1, I34:1, I35:1, I36:1, I37:1, I38:1, I39:1, I40:1,
+ I41:1, I42:1, I43:1, I44:1, I45:1, I46:1, I47:1, I48:1,
+ I49:1, I50:1, I51:1, I52:1, I53:1, I54:1, I55:1, I56:1,
+ I57:1, I58:1, I59:1, I60:1, I61:1, I62:1, I63:1, I64:1>>.
+
+dechiper(<<L:4/binary, R:4/binary>>, Keys) ->
+ dechiper(L, R, Keys, 16).
+
+dechiper(L, R, [], 0) ->
+ <<L:4/binary, R:4/binary>>;
+dechiper(L, R, [Key|Rest], I) ->
+ NewL = ebit(L),
+ XorL = xor48(NewL, Key),
+ Sboxed = sboxing(XorL),
+ Ped = p(Sboxed),
+ EndL = xor32(Ped, R),
+ dechiper(EndL, L, Rest, I-1).
+
+des_core(<<L:4/binary, R:4/binary>>, Keys) ->
+ des_core(L, R, Keys, 0).
+
+des_core(L, R, [], 16) ->
+ <<L:4/binary, R:4/binary>>;
+des_core(L, R, [Key|Rest], I) when I<16 ->
+ NewR = ebit(R),
+ XorR = xor48(NewR, Key),
+ Sboxed = sboxing(XorR),
+ Ped = p(Sboxed),
+ EndR = xor32(Ped, L),
+ des_core(R, EndR, Rest, I+1).
+
+ebit(<<I1:1, I2:2, I3:2,I4:2,I5:2,I6:2,
+ I7:2,I8:2,I9:2,I10:2,I11:2,I12:2,
+ I13:2,I14:2,I15:2,I16:2,I17:1>>) ->
+ <<I17:1, I1:1, I2:2, I3:2, I3:2,
+ I4:2, I5:2, I5:2, I6:2,
+ I7:2, I7:2, I8:2, I9:2,
+ I9:2, I10:2, I11:2, I11:2,
+ I12:2, I13:2, I13:2, I14:2,
+ I15:2, I15:2, I16:2, I17:1, I1:1>>.
+
+p(<<I1:1, I2:1, I3:1, I4:1, I5:1, I6:1, I7:1, I8:1,
+ I9:1, I10:1, I11:1, I12:1, I13:1, I14:1, I15:1, I16:1,
+ I17:1, I18:1, I19:1, I20:1, I21:1, I22:1, I23:1, I24:1,
+ I25:1, I26:1, I27:1, I28:1, I29:1, I30:1, I31:1, I32:1>>) ->
+ <<I16:1, I7:1, I20:1, I21:1, I29:1, I12:1, I28:1, I17:1,
+ I1:1, I15:1, I23:1, I26:1, I5:1, I18:1, I31:1, I10:1,
+ I2:1, I8:1, I24:1, I14:1, I32:1, I27:1, I3:1, I9:1,
+ I19:1, I13:1, I30:1, I6:1, I22:1, I11:1, I4:1, I25:1>>.
+
+rotate(1) -> 1;
+rotate(2) -> 1;
+rotate(9) -> 1;
+rotate(16) -> 1;
+rotate(N) when N>0, N<17 -> 2.
+
+%% xor64(<<I1:16, I2:16, I3:16, I4:16>>,<<J1:16, J2:16, J3:16, J4:16>>) ->
+%% K1 = I1 bxor J1,
+%% K2 = I2 bxor J2,
+%% K3 = I3 bxor J3,
+%% K4 = I4 bxor J4,
+%% <<K1:16, K2:16, K3:16, K4:16>>.
+
+xor48(<<I1:16, I2:16, I3:16>>,<<J1:16, J2:16, J3:16>>) ->
+ K1 = I1 bxor J1,
+ K2 = I2 bxor J2,
+ K3 = I3 bxor J3,
+ <<K1:16, K2:16, K3:16>>.
+
+xor32(<<I1:16, I2:16>>,<<J1:16, J2:16>>) ->
+ K1 = I1 bxor J1,
+ K2 = I2 bxor J2,
+ <<K1:16, K2:16>>.
+
+sboxing(<<A1:6, A2:6, A3:6, A4:6, A5:6, A6:6, A7:6, A8:6>>) ->
+ S1 = sbox(A1, 1),
+ S2 = sbox(A2, 2),
+ S3 = sbox(A3, 3),
+ S4 = sbox(A4, 4),
+ S5 = sbox(A5, 5),
+ S6 = sbox(A6, 6),
+ S7 = sbox(A7, 7),
+ S8 = sbox(A8, 8),
+ <<S1:4,S2:4,S3:4,S4:4,S5:4,S6:4,S7:4,S8:4>>.
+
+sbox(0,1) -> 14;
+sbox(1,1) -> 0;
+sbox(2,1) -> 4;
+sbox(3,1) -> 15;
+sbox(4,1) -> 13;
+sbox(5,1) -> 7;
+sbox(6,1) -> 1;
+sbox(7,1) -> 4;
+sbox(8,1) -> 2;
+sbox(9,1) -> 14;
+sbox(10,1) -> 15;
+sbox(11,1) -> 2;
+sbox(12,1) -> 11;
+sbox(13,1) -> 13;
+sbox(14,1) -> 8;
+sbox(15,1) -> 1;
+sbox(16,1) -> 3;
+sbox(17,1) -> 10;
+sbox(18,1) -> 10;
+sbox(19,1) -> 6;
+sbox(20,1) -> 6;
+sbox(21,1) -> 12;
+sbox(22,1) -> 12;
+sbox(23,1) -> 11;
+sbox(24,1) -> 5;
+sbox(25,1) -> 9;
+sbox(26,1) -> 9;
+sbox(27,1) -> 5;
+sbox(28,1) -> 0;
+sbox(29,1) -> 3;
+sbox(30,1) -> 7;
+sbox(31,1) -> 8;
+sbox(32,1) -> 4;
+sbox(33,1) -> 15;
+sbox(34,1) -> 1;
+sbox(35,1) -> 12;
+sbox(36,1) -> 14;
+sbox(37,1) -> 8;
+sbox(38,1) -> 8;
+sbox(39,1) -> 2;
+sbox(40,1) -> 13;
+sbox(41,1) -> 4;
+sbox(42,1) -> 6;
+sbox(43,1) -> 9;
+sbox(44,1) -> 2;
+sbox(45,1) -> 1;
+sbox(46,1) -> 11;
+sbox(47,1) -> 7;
+sbox(48,1) -> 15;
+sbox(49,1) -> 5;
+sbox(50,1) -> 12;
+sbox(51,1) -> 11;
+sbox(52,1) -> 9;
+sbox(53,1) -> 3;
+sbox(54,1) -> 7;
+sbox(55,1) -> 14;
+sbox(56,1) -> 3;
+sbox(57,1) -> 10;
+sbox(58,1) -> 10;
+sbox(59,1) -> 0;
+sbox(60,1) -> 5;
+sbox(61,1) -> 6;
+sbox(62,1) -> 0;
+sbox(63,1) -> 13;
+sbox(0,2) -> 15;
+sbox(1,2) -> 3;
+sbox(2,2) -> 1;
+sbox(3,2) -> 13;
+sbox(4,2) -> 8;
+sbox(5,2) -> 4;
+sbox(6,2) -> 14;
+sbox(7,2) -> 7;
+sbox(8,2) -> 6;
+sbox(9,2) -> 15;
+sbox(10,2) -> 11;
+sbox(11,2) -> 2;
+sbox(12,2) -> 3;
+sbox(13,2) -> 8;
+sbox(14,2) -> 4;
+sbox(15,2) -> 14;
+sbox(16,2) -> 9;
+sbox(17,2) -> 12;
+sbox(18,2) -> 7;
+sbox(19,2) -> 0;
+sbox(20,2) -> 2;
+sbox(21,2) -> 1;
+sbox(22,2) -> 13;
+sbox(23,2) -> 10;
+sbox(24,2) -> 12;
+sbox(25,2) -> 6;
+sbox(26,2) -> 0;
+sbox(27,2) -> 9;
+sbox(28,2) -> 5;
+sbox(29,2) -> 11;
+sbox(30,2) -> 10;
+sbox(31,2) -> 5;
+sbox(32,2) -> 0;
+sbox(33,2) -> 13;
+sbox(34,2) -> 14;
+sbox(35,2) -> 8;
+sbox(36,2) -> 7;
+sbox(37,2) -> 10;
+sbox(38,2) -> 11;
+sbox(39,2) -> 1;
+sbox(40,2) -> 10;
+sbox(41,2) -> 3;
+sbox(42,2) -> 4;
+sbox(43,2) -> 15;
+sbox(44,2) -> 13;
+sbox(45,2) -> 4;
+sbox(46,2) -> 1;
+sbox(47,2) -> 2;
+sbox(48,2) -> 5;
+sbox(49,2) -> 11;
+sbox(50,2) -> 8;
+sbox(51,2) -> 6;
+sbox(52,2) -> 12;
+sbox(53,2) -> 7;
+sbox(54,2) -> 6;
+sbox(55,2) -> 12;
+sbox(56,2) -> 9;
+sbox(57,2) -> 0;
+sbox(58,2) -> 3;
+sbox(59,2) -> 5;
+sbox(60,2) -> 2;
+sbox(61,2) -> 14;
+sbox(62,2) -> 15;
+sbox(63,2) -> 9;
+sbox(0,3) -> 10;
+sbox(1,3) -> 13;
+sbox(2,3) -> 0;
+sbox(3,3) -> 7;
+sbox(4,3) -> 9;
+sbox(5,3) -> 0;
+sbox(6,3) -> 14;
+sbox(7,3) -> 9;
+sbox(8,3) -> 6;
+sbox(9,3) -> 3;
+sbox(10,3) -> 3;
+sbox(11,3) -> 4;
+sbox(12,3) -> 15;
+sbox(13,3) -> 6;
+sbox(14,3) -> 5;
+sbox(15,3) -> 10;
+sbox(16,3) -> 1;
+sbox(17,3) -> 2;
+sbox(18,3) -> 13;
+sbox(19,3) -> 8;
+sbox(20,3) -> 12;
+sbox(21,3) -> 5;
+sbox(22,3) -> 7;
+sbox(23,3) -> 14;
+sbox(24,3) -> 11;
+sbox(25,3) -> 12;
+sbox(26,3) -> 4;
+sbox(27,3) -> 11;
+sbox(28,3) -> 2;
+sbox(29,3) -> 15;
+sbox(30,3) -> 8;
+sbox(31,3) -> 1;
+sbox(32,3) -> 13;
+sbox(33,3) -> 1;
+sbox(34,3) -> 6;
+sbox(35,3) -> 10;
+sbox(36,3) -> 4;
+sbox(37,3) -> 13;
+sbox(38,3) -> 9;
+sbox(39,3) -> 0;
+sbox(40,3) -> 8;
+sbox(41,3) -> 6;
+sbox(42,3) -> 15;
+sbox(43,3) -> 9;
+sbox(44,3) -> 3;
+sbox(45,3) -> 8;
+sbox(46,3) -> 0;
+sbox(47,3) -> 7;
+sbox(48,3) -> 11;
+sbox(49,3) -> 4;
+sbox(50,3) -> 1;
+sbox(51,3) -> 15;
+sbox(52,3) -> 2;
+sbox(53,3) -> 14;
+sbox(54,3) -> 12;
+sbox(55,3) -> 3;
+sbox(56,3) -> 5;
+sbox(57,3) -> 11;
+sbox(58,3) -> 10;
+sbox(59,3) -> 5;
+sbox(60,3) -> 14;
+sbox(61,3) -> 2;
+sbox(62,3) -> 7;
+sbox(63,3) -> 12;
+sbox(0,4) -> 7;
+sbox(1,4) -> 13;
+sbox(2,4) -> 13;
+sbox(3,4) -> 8;
+sbox(4,4) -> 14;
+sbox(5,4) -> 11;
+sbox(6,4) -> 3;
+sbox(7,4) -> 5;
+sbox(8,4) -> 0;
+sbox(9,4) -> 6;
+sbox(10,4) -> 6;
+sbox(11,4) -> 15;
+sbox(12,4) -> 9;
+sbox(13,4) -> 0;
+sbox(14,4) -> 10;
+sbox(15,4) -> 3;
+sbox(16,4) -> 1;
+sbox(17,4) -> 4;
+sbox(18,4) -> 2;
+sbox(19,4) -> 7;
+sbox(20,4) -> 8;
+sbox(21,4) -> 2;
+sbox(22,4) -> 5;
+sbox(23,4) -> 12;
+sbox(24,4) -> 11;
+sbox(25,4) -> 1;
+sbox(26,4) -> 12;
+sbox(27,4) -> 10;
+sbox(28,4) -> 4;
+sbox(29,4) -> 14;
+sbox(30,4) -> 15;
+sbox(31,4) -> 9;
+sbox(32,4) -> 10;
+sbox(33,4) -> 3;
+sbox(34,4) -> 6;
+sbox(35,4) -> 15;
+sbox(36,4) -> 9;
+sbox(37,4) -> 0;
+sbox(38,4) -> 0;
+sbox(39,4) -> 6;
+sbox(40,4) -> 12;
+sbox(41,4) -> 10;
+sbox(42,4) -> 11;
+sbox(43,4) -> 1;
+sbox(44,4) -> 7;
+sbox(45,4) -> 13;
+sbox(46,4) -> 13;
+sbox(47,4) -> 8;
+sbox(48,4) -> 15;
+sbox(49,4) -> 9;
+sbox(50,4) -> 1;
+sbox(51,4) -> 4;
+sbox(52,4) -> 3;
+sbox(53,4) -> 5;
+sbox(54,4) -> 14;
+sbox(55,4) -> 11;
+sbox(56,4) -> 5;
+sbox(57,4) -> 12;
+sbox(58,4) -> 2;
+sbox(59,4) -> 7;
+sbox(60,4) -> 8;
+sbox(61,4) -> 2;
+sbox(62,4) -> 4;
+sbox(63,4) -> 14;
+sbox(0,5) -> 2;
+sbox(1,5) -> 14;
+sbox(2,5) -> 12;
+sbox(3,5) -> 11;
+sbox(4,5) -> 4;
+sbox(5,5) -> 2;
+sbox(6,5) -> 1;
+sbox(7,5) -> 12;
+sbox(8,5) -> 7;
+sbox(9,5) -> 4;
+sbox(10,5) -> 10;
+sbox(11,5) -> 7;
+sbox(12,5) -> 11;
+sbox(13,5) -> 13;
+sbox(14,5) -> 6;
+sbox(15,5) -> 1;
+sbox(16,5) -> 8;
+sbox(17,5) -> 5;
+sbox(18,5) -> 5;
+sbox(19,5) -> 0;
+sbox(20,5) -> 3;
+sbox(21,5) -> 15;
+sbox(22,5) -> 15;
+sbox(23,5) -> 10;
+sbox(24,5) -> 13;
+sbox(25,5) -> 3;
+sbox(26,5) -> 0;
+sbox(27,5) -> 9;
+sbox(28,5) -> 14;
+sbox(29,5) -> 8;
+sbox(30,5) -> 9;
+sbox(31,5) -> 6;
+sbox(32,5) -> 4;
+sbox(33,5) -> 11;
+sbox(34,5) -> 2;
+sbox(35,5) -> 8;
+sbox(36,5) -> 1;
+sbox(37,5) -> 12;
+sbox(38,5) -> 11;
+sbox(39,5) -> 7;
+sbox(40,5) -> 10;
+sbox(41,5) -> 1;
+sbox(42,5) -> 13;
+sbox(43,5) -> 14;
+sbox(44,5) -> 7;
+sbox(45,5) -> 2;
+sbox(46,5) -> 8;
+sbox(47,5) -> 13;
+sbox(48,5) -> 15;
+sbox(49,5) -> 6;
+sbox(50,5) -> 9;
+sbox(51,5) -> 15;
+sbox(52,5) -> 12;
+sbox(53,5) -> 0;
+sbox(54,5) -> 5;
+sbox(55,5) -> 9;
+sbox(56,5) -> 6;
+sbox(57,5) -> 10;
+sbox(58,5) -> 3;
+sbox(59,5) -> 4;
+sbox(60,5) -> 0;
+sbox(61,5) -> 5;
+sbox(62,5) -> 14;
+sbox(63,5) -> 3;
+sbox(0,6) -> 12;
+sbox(1,6) -> 10;
+sbox(2,6) -> 1;
+sbox(3,6) -> 15;
+sbox(4,6) -> 10;
+sbox(5,6) -> 4;
+sbox(6,6) -> 15;
+sbox(7,6) -> 2;
+sbox(8,6) -> 9;
+sbox(9,6) -> 7;
+sbox(10,6) -> 2;
+sbox(11,6) -> 12;
+sbox(12,6) -> 6;
+sbox(13,6) -> 9;
+sbox(14,6) -> 8;
+sbox(15,6) -> 5;
+sbox(16,6) -> 0;
+sbox(17,6) -> 6;
+sbox(18,6) -> 13;
+sbox(19,6) -> 1;
+sbox(20,6) -> 3;
+sbox(21,6) -> 13;
+sbox(22,6) -> 4;
+sbox(23,6) -> 14;
+sbox(24,6) -> 14;
+sbox(25,6) -> 0;
+sbox(26,6) -> 7;
+sbox(27,6) -> 11;
+sbox(28,6) -> 5;
+sbox(29,6) -> 3;
+sbox(30,6) -> 11;
+sbox(31,6) -> 8;
+sbox(32,6) -> 9;
+sbox(33,6) -> 4;
+sbox(34,6) -> 14;
+sbox(35,6) -> 3;
+sbox(36,6) -> 15;
+sbox(37,6) -> 2;
+sbox(38,6) -> 5;
+sbox(39,6) -> 12;
+sbox(40,6) -> 2;
+sbox(41,6) -> 9;
+sbox(42,6) -> 8;
+sbox(43,6) -> 5;
+sbox(44,6) -> 12;
+sbox(45,6) -> 15;
+sbox(46,6) -> 3;
+sbox(47,6) -> 10;
+sbox(48,6) -> 7;
+sbox(49,6) -> 11;
+sbox(50,6) -> 0;
+sbox(51,6) -> 14;
+sbox(52,6) -> 4;
+sbox(53,6) -> 1;
+sbox(54,6) -> 10;
+sbox(55,6) -> 7;
+sbox(56,6) -> 1;
+sbox(57,6) -> 6;
+sbox(58,6) -> 13;
+sbox(59,6) -> 0;
+sbox(60,6) -> 11;
+sbox(61,6) -> 8;
+sbox(62,6) -> 6;
+sbox(63,6) -> 13;
+sbox(0,7) -> 4;
+sbox(1,7) -> 13;
+sbox(2,7) -> 11;
+sbox(3,7) -> 0;
+sbox(4,7) -> 2;
+sbox(5,7) -> 11;
+sbox(6,7) -> 14;
+sbox(7,7) -> 7;
+sbox(8,7) -> 15;
+sbox(9,7) -> 4;
+sbox(10,7) -> 0;
+sbox(11,7) -> 9;
+sbox(12,7) -> 8;
+sbox(13,7) -> 1;
+sbox(14,7) -> 13;
+sbox(15,7) -> 10;
+sbox(16,7) -> 3;
+sbox(17,7) -> 14;
+sbox(18,7) -> 12;
+sbox(19,7) -> 3;
+sbox(20,7) -> 9;
+sbox(21,7) -> 5;
+sbox(22,7) -> 7;
+sbox(23,7) -> 12;
+sbox(24,7) -> 5;
+sbox(25,7) -> 2;
+sbox(26,7) -> 10;
+sbox(27,7) -> 15;
+sbox(28,7) -> 6;
+sbox(29,7) -> 8;
+sbox(30,7) -> 1;
+sbox(31,7) -> 6;
+sbox(32,7) -> 1;
+sbox(33,7) -> 6;
+sbox(34,7) -> 4;
+sbox(35,7) -> 11;
+sbox(36,7) -> 11;
+sbox(37,7) -> 13;
+sbox(38,7) -> 13;
+sbox(39,7) -> 8;
+sbox(40,7) -> 12;
+sbox(41,7) -> 1;
+sbox(42,7) -> 3;
+sbox(43,7) -> 4;
+sbox(44,7) -> 7;
+sbox(45,7) -> 10;
+sbox(46,7) -> 14;
+sbox(47,7) -> 7;
+sbox(48,7) -> 10;
+sbox(49,7) -> 9;
+sbox(50,7) -> 15;
+sbox(51,7) -> 5;
+sbox(52,7) -> 6;
+sbox(53,7) -> 0;
+sbox(54,7) -> 8;
+sbox(55,7) -> 15;
+sbox(56,7) -> 0;
+sbox(57,7) -> 14;
+sbox(58,7) -> 5;
+sbox(59,7) -> 2;
+sbox(60,7) -> 9;
+sbox(61,7) -> 3;
+sbox(62,7) -> 2;
+sbox(63,7) -> 12;
+sbox(0,8) -> 13;
+sbox(1,8) -> 1;
+sbox(2,8) -> 2;
+sbox(3,8) -> 15;
+sbox(4,8) -> 8;
+sbox(5,8) -> 13;
+sbox(6,8) -> 4;
+sbox(7,8) -> 8;
+sbox(8,8) -> 6;
+sbox(9,8) -> 10;
+sbox(10,8) -> 15;
+sbox(11,8) -> 3;
+sbox(12,8) -> 11;
+sbox(13,8) -> 7;
+sbox(14,8) -> 1;
+sbox(15,8) -> 4;
+sbox(16,8) -> 10;
+sbox(17,8) -> 12;
+sbox(18,8) -> 9;
+sbox(19,8) -> 5;
+sbox(20,8) -> 3;
+sbox(21,8) -> 6;
+sbox(22,8) -> 14;
+sbox(23,8) -> 11;
+sbox(24,8) -> 5;
+sbox(25,8) -> 0;
+sbox(26,8) -> 0;
+sbox(27,8) -> 14;
+sbox(28,8) -> 12;
+sbox(29,8) -> 9;
+sbox(30,8) -> 7;
+sbox(31,8) -> 2;
+sbox(32,8) -> 7;
+sbox(33,8) -> 2;
+sbox(34,8) -> 11;
+sbox(35,8) -> 1;
+sbox(36,8) -> 4;
+sbox(37,8) -> 14;
+sbox(38,8) -> 1;
+sbox(39,8) -> 7;
+sbox(40,8) -> 9;
+sbox(41,8) -> 4;
+sbox(42,8) -> 12;
+sbox(43,8) -> 10;
+sbox(44,8) -> 14;
+sbox(45,8) -> 8;
+sbox(46,8) -> 2;
+sbox(47,8) -> 13;
+sbox(48,8) -> 0;
+sbox(49,8) -> 15;
+sbox(50,8) -> 6;
+sbox(51,8) -> 12;
+sbox(52,8) -> 10;
+sbox(53,8) -> 9;
+sbox(54,8) -> 13;
+sbox(55,8) -> 0;
+sbox(56,8) -> 15;
+sbox(57,8) -> 3;
+sbox(58,8) -> 3;
+sbox(59,8) -> 5;
+sbox(60,8) -> 5;
+sbox(61,8) -> 6;
+sbox(62,8) -> 8;
+sbox(63,8) -> 11.
diff --git a/lib/hipe/test/bs_SUITE_data/bs_extract.erl b/lib/hipe/test/bs_SUITE_data/bs_extract.erl
new file mode 100644
index 0000000000..0492689fa8
--- /dev/null
+++ b/lib/hipe/test/bs_SUITE_data/bs_extract.erl
@@ -0,0 +1,94 @@
+%% -*- erlang-indent-level: 2 -*-
+%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
+%%
+%% Among testing other things, this module shows why performing LCM on
+%% SPARC is currently problematic. SPARC does not mark untagged values
+%% as dead when they are live over function calls which in turn causes
+%% them to be traced by the garbage collector leading to crashes.
+%%
+%% A simple way to get this behaviour is to compile just the function
+%%
+%% {bsextract,tid_internal_storage,2}
+%%
+%% with the compiler option "rtl_lcm" on and without.
+%%
+%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
+
+-module(bs_extract).
+
+-export([test/0]).
+
+-include("bs_decode_extract.hrl").
+
+-define(PDU, <<30,16,0,90,0,1,0,0,255,255,255,255,81,67,101,7,0,0,0,96,
+ 6,12,146,18,14,0,15,252,16,0,0,17,0,0,128,0,2,241,33,131,
+ 0,20,7,97,112,110,48,49,51,97,8,101,114,105,99,115,115,
+ 111,110,2,115,101,132,0,20,128,192,35,16,1,5,0,16,5,117,
+ 115,101,114,53,5,112,97,115,115,53,133,0,4,172,28,12,1,
+ 133,0,4,172,28,12,3,134,0,8,145,148,113,129,0,0,0,0>>).
+
+-define(RES, {ok, {mvsgT_imsi, <<81,67,101,7,0,0,0,240>>}}).
+
+test() ->
+ ?RES = extract_v0_opt(1000, ?PDU),
+ ok.
+
+extract_v0_opt(0, Pdu) ->
+ get_external_id(Pdu);
+extract_v0_opt(N, Pdu) ->
+ {ok,_} = get_external_id(Pdu),
+ extract_v0_opt(N-1, Pdu).
+
+get_external_id(<<0:3,_:4,0:1,1:8,_Length:16,SequenceNumber:16,
+ _FlowLabel:16,_SNDCP_N_PDU_Number:8,_:3/binary-unit:8,
+ _TID:8/binary-unit:8,_InformationElements/binary>>) ->
+ {echo,#sesT_echoReqV0{},SequenceNumber};
+%% Create PDP Context Request
+%% GTP97, SNN=0
+%% (No SNDCP N-PDU number)
+get_external_id(<<0:3,_:4,0:1,16:8,_Length:16,_SequenceNumber:16,
+ _FlowLabel:16,_SNDCP_N_PDU_Number:8,_:3/binary-unit:8,
+ TID:8/binary-unit:8,_InformationElements/binary>>) ->
+ {ok,_IMSI} = extract_imsi(TID);
+%%% Update PDP Context Request
+%%% GTP97, SNN=0
+%%% (No SNDCP N-PDU number)
+get_external_id(<<0:3,_:4,0:1,18:8,_Length:16,_SequenceNumber:16,
+ _FlowLabel:16,_SNDCP_N_PDU_Number:8,_:3/binary-unit:8,
+ TID:8/binary-unit:8,_InformationElements/binary>>) ->
+ {ok,_IMSI} = extract_imsi(TID);
+%%% Delete PDP Context Request
+%%% GTP97, SNN=0
+%%% (No SNDCP N-PDU number)
+get_external_id(<<0:3,_:4,0:1,20:8,_Length:16,_SequenceNumber:16,
+ _FlowLabel:16,_SNDCP_N_PDU_Number:8,_:3/binary-unit:8,
+ TID:8/binary-unit:8,_InformationElements/binary>>) ->
+ {ok,_IMSI} = extract_imsi(TID);
+%%% Error handling: GTP Message Too Short
+%%% Error handling: Unknown GTP Signalling message.
+%%% Error handling: Unexpected GTP Signalling message.
+get_external_id(_GTP_Message) ->
+ fault.
+
+%% - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
+%% extract_imsi/1
+%% Get the IMSI element from TID
+extract_imsi(TID) ->
+ {ok,#mvsgT_tid{imsi=IMSI}} = tid_internal_storage(TID,[]),
+ {ok,IMSI}.
+
+%%% - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
+%%% tid_internal_storage/3
+%%% Convert TID binary to internal datatype
+tid_internal_storage(Bin,_) ->
+ Size = byte_size(Bin) - 1,
+ <<Front:Size/binary,NSAPI:4,DigitN:4>> = Bin,
+ Result =
+ case DigitN of
+ 2#1111 ->
+ #mvsgT_tid{imsi = #mvsgT_imsi{value=Front}, nsapi = NSAPI};
+ _ ->
+ Value = <<Front/binary,2#1111:4,DigitN:4>>,
+ #mvsgT_tid{imsi = #mvsgT_imsi{value = Value}, nsapi = NSAPI}
+ end,
+ {ok,Result}.
diff --git a/lib/hipe/test/bs_SUITE_data/bs_flatb.erl b/lib/hipe/test/bs_SUITE_data/bs_flatb.erl
new file mode 100644
index 0000000000..6163917965
--- /dev/null
+++ b/lib/hipe/test/bs_SUITE_data/bs_flatb.erl
@@ -0,0 +1,29 @@
+%% -*- erlang-indent-level: 2 -*-
+%%--------------------------------------------------------------------------
+%% Program which resulted in a badarg crash when compiled to native code.
+%% The problem was that hipe_icode_primops was stating that the primop
+%% {bs_start_match, ok_matchstate} could not fail which made the icode_type
+%% pass removing the third clause of flatb/1.
+%%
+%% (The program was working correctly with hipe option 'no_icode_type'.)
+%%
+%% Reported by Andreas Sandberg on 3/1/2011 and fixed by Kostis on 5/1/2011
+%% with the help of Per Gustafsson.
+%% --------------------------------------------------------------------------
+-module(bs_flatb).
+
+-export([hipe_options/0, test/0]).
+
+hipe_options() ->
+ [icode_type].
+
+test() ->
+ [] = flatb([<<>>], []),
+ ok.
+
+flatb(<<X:8, Rest/binary>>, Acc) ->
+ flatb(Rest, [X|Acc]);
+flatb(<<>>, Acc) ->
+ Acc;
+flatb([V], Acc) ->
+ flatb(V, Acc).
diff --git a/lib/hipe/test/bs_SUITE_data/bs_id3.erl b/lib/hipe/test/bs_SUITE_data/bs_id3.erl
new file mode 100644
index 0000000000..a6152f05cd
--- /dev/null
+++ b/lib/hipe/test/bs_SUITE_data/bs_id3.erl
@@ -0,0 +1,75 @@
+%% -*- erlang-indent-level: 2 -*-
+%%==========================================================================
+%% From: Tomas Stejskal -- 23/02/2008
+%% I've found some strange behavior regarding binary matching. The module's
+%% purpose is reading an id3 version 1 or version 1.1 tag from an mp3 bin.
+%% When I use the function read_v1_or_v11_tag on a mp3 binary containing
+%% version 1 tag, it returns an error. However, when the function
+%% read_only_v1_tag is applied on the same file, it reads the tag data
+%% correctly. The only difference between these two functions is that the
+%% former has an extra branch to read version 1.1 tag.
+%% This was a BEAM compiler bug which was fixed by a patch to beam_dead.
+%%==========================================================================
+
+-module(bs_id3).
+
+-export([test/0]).
+
+-define(BIN, <<84,65,71,68,117,154,105,232,107,121,0,0,0,0,0,0,0,0,0,0,0,
+ 0,0,0,0,0,0,0,0,0,0,0,0,68,97,110,105,101,108,32,76,97,110,
+ 100,97,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,66,101,115,116,
+ 32,79,102,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,
+ 50,48,48,48,50,48,48,48,32,45,32,66,101,115,116,32,79,102,
+ 32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,12>>).
+
+test() ->
+ R1 = parse_only_v1_tag(?BIN),
+ R2 = parse_v1_or_v11_tag(?BIN),
+ %% io:format("~p\n~p\n", [R1, R2]),
+ R1 = R2, % crash if not equal
+ ok.
+
+parse_only_v1_tag(<<"TAG", Title:30/binary,
+ Artist:30/binary, Album:30/binary,
+ _Year:4/binary, _Comment:30/binary,
+ _Genre:8>>) ->
+ {ok,
+ {"ID3v1",
+ [{title, trim(Title)},
+ {artist, trim(Artist)},
+ {album, trim(Album)}]}};
+parse_only_v1_tag(_) ->
+ error.
+
+parse_v1_or_v11_tag(<<"TAG", Title:30/binary,
+ Artist:30/binary, Album:30/binary,
+ _Year:4/binary, _Comment:28/binary,
+ 0:8, Track:8, _Genre:8>>) ->
+ {ok,
+ {"ID3v1.1",
+ [{track, Track}, {title, trim(Title)},
+ {artist, trim(Artist)}, {album, trim(Album)}]}};
+parse_v1_or_v11_tag(<<"TAG", Title:30/binary,
+ Artist:30/binary, Album:30/binary,
+ _Year:4/binary, _Comment:30/binary,
+ _Genre:8>>) ->
+ {ok,
+ {"ID3v1",
+ [{title, trim(Title)},
+ {artist, trim(Artist)},
+ {album, trim(Album)}]}};
+parse_v1_or_v11_tag(_) ->
+ error.
+
+trim(Bin) ->
+ list_to_binary(trim_blanks(binary_to_list(Bin))).
+
+trim_blanks(L) ->
+ lists:reverse(skip_blanks_and_zero(lists:reverse(L))).
+
+skip_blanks_and_zero([$\s|T]) ->
+ skip_blanks_and_zero(T);
+skip_blanks_and_zero([0|T]) ->
+ skip_blanks_and_zero(T);
+skip_blanks_and_zero(L) ->
+ L.
diff --git a/lib/hipe/test/bs_SUITE_data/bs_match.erl b/lib/hipe/test/bs_SUITE_data/bs_match.erl
new file mode 100644
index 0000000000..8194d878b8
--- /dev/null
+++ b/lib/hipe/test/bs_SUITE_data/bs_match.erl
@@ -0,0 +1,175 @@
+%%% -*- erlang-indent-level: 2 -*-
+%%%-------------------------------------------------------------------
+%%% File : bs_match.erl
+%%% Author : Per Gustafsson <[email protected]>
+%%% Purpose : Performs simple matching and construction of binaries
+%%% TODO : Add binary and float tests
+%%% Created : 20 Feb 2004
+%%%-------------------------------------------------------------------
+-module(bs_match).
+
+-export([test/0]).
+
+test() ->
+ Funs = [fun test_aligned/0, fun test_unaligned/0,
+ fun test_zero_tail/0, fun test_integer_matching/0],
+ lists:foreach(fun (F) -> ok = F() end, Funs).
+
+%%-------------------------------------------------------------------
+%% Test aligned accesses
+
+test_aligned() ->
+ 10 = aligned_skip_bits_all(1, <<10,11,12>>),
+ ok = aligned().
+
+aligned_skip_bits_all(N, Bin) ->
+ <<X:N/integer-unit:8, _/binary>> = Bin,
+ X.
+
+aligned() ->
+ Tail1 = mkbin([]),
+ {258, Tail1} = al_get_tail_used(mkbin([1,2])),
+ Tail2 = mkbin(lists:seq(1, 127)),
+ {35091, Tail2} = al_get_tail_used(mkbin([137,19|Tail2])),
+ 64896 = al_get_tail_unused(mkbin([253,128])),
+ 64895 = al_get_tail_unused(mkbin([253,127|lists:seq(42, 255)])),
+ Tail3 = mkbin(lists:seq(0, 19)),
+ {0, Tail1} = get_dyn_tail_used(Tail1, 0),
+ {0, Tail3} = get_dyn_tail_used(mkbin([Tail3]), 0),
+ {73, Tail3} = get_dyn_tail_used(mkbin([73|Tail3]), 8),
+ 0 = get_dyn_tail_unused(mkbin([]), 0),
+ 233 = get_dyn_tail_unused(mkbin([233]), 8),
+ 23 = get_dyn_tail_unused(mkbin([23,22,2]), 8),
+ ok.
+
+mkbin(L) when is_list(L) -> list_to_binary(L).
+
+al_get_tail_used(<<A:16,T/binary>>) -> {A, T}.
+
+al_get_tail_unused(<<A:16,_/binary>>) -> A.
+
+%%-------------------------------------------------------------------
+%% Test unaligned accesses
+
+test_unaligned() ->
+ 10 = unaligned_skip_bits_all(8, <<10,11,12>>),
+ ok = unaligned().
+
+unaligned_skip_bits_all(N, Bin) ->
+ <<X:N, _/binary>> = Bin,
+ X.
+
+unaligned() ->
+ {'EXIT', {function_clause,_}} = (catch get_tail_used(mkbin([42]))),
+ {'EXIT', {{badmatch,_},_}} = (catch get_dyn_tail_used(mkbin([137]), 3)),
+ {'EXIT', {function_clause,_}} = (catch get_tail_unused(mkbin([42,33]))),
+ {'EXIT', {{badmatch,_},_}} = (catch get_dyn_tail_unused(mkbin([44]), 7)),
+ ok.
+
+get_tail_used(<<A:1, T/binary>>) -> {A, T}.
+
+get_tail_unused(<<A:15, _/binary>>) -> A.
+
+get_dyn_tail_used(Bin, Sz) ->
+ <<A:Sz, T/binary>> = Bin,
+ {A,T}.
+
+get_dyn_tail_unused(Bin, Sz) ->
+ <<A:Sz, _T/binary>> = Bin,
+ A.
+
+%%-------------------------------------------------------------------
+%% Test zero tail
+
+test_zero_tail() ->
+ 42 = zt8(mkbin([42])),
+ {'EXIT', {function_clause, _}} = (catch zt8(mkbin([1,2]))),
+ {'EXIT', {function_clause, _}} = (catch zt44(mkbin([1,2]))),
+ ok.
+
+zt8(<<A:8>>) -> A.
+
+zt44(<<_:4,_:4>>) -> ok.
+
+%%-------------------------------------------------------------------
+%% Test integer matching
+
+test_integer_matching() ->
+ ok = test_static_integer_matching_1(),
+ ok = test_static_integer_matching_2(),
+ ok = test_static_integer_matching_3(),
+ ok = test_static_integer_matching_4(),
+ DynFun = fun (N) -> ok = test_dynamic_integer_matching(N) end,
+ lists:foreach(DynFun, [28, 27, 9, 17, 25, 8, 16, 24, 32]).
+
+test_static_integer_matching_1() ->
+ <<0:6, -25:28/integer-signed, 0:6>> = s11(),
+ <<0:6, -25:28/integer-little-signed, 0:6>> = s12(),
+ <<0:6, 25:28/integer-little, 0:6>> = s13(),
+ <<0:6, 25:28, 0:6>> = s14(),
+ ok.
+
+s11() ->
+ <<0:6, -25:28/integer-signed, 0:6>>.
+s12() ->
+ <<0:6, -25:28/integer-little-signed, 0:6>>.
+s13() ->
+ <<0:6, 25:28/integer-little, 0:6>>.
+s14() ->
+ <<0:6, 25:28, 0:6>>.
+
+test_static_integer_matching_2() ->
+ <<0:6, -25:20/integer-signed, 0:6>> = s21(),
+ <<0:6, -25:20/integer-little-signed, 0:6>> = s22(),
+ <<0:6, 25:20/integer-little, 0:6>> = s23(),
+ <<0:6, 25:20, 0:6>> = s24(),
+ ok.
+
+s21() ->
+ <<0:6, -25:20/integer-signed, 0:6>>.
+s22() ->
+ <<0:6, -25:20/integer-little-signed, 0:6>>.
+s23() ->
+ <<0:6, 25:20/integer-little, 0:6>>.
+s24() ->
+ <<0:6, 25:20, 0:6>>.
+
+test_static_integer_matching_3() ->
+ <<0:6, -25:12/integer-signed, 0:6>> = s31(),
+ <<0:6, -25:12/integer-little-signed, 0:6>> = s32(),
+ <<0:6, 25:12/integer-little, 0:6>> = s33(),
+ <<0:6, 25:12, 0:6>> = s34(),
+ ok.
+
+s31() ->
+ <<0:6, -25:12/integer-signed, 0:6>>.
+s32() ->
+ <<0:6, -25:12/integer-little-signed, 0:6>>.
+s33() ->
+ <<0:6, 25:12/integer-little, 0:6>>.
+s34() ->
+ <<0:6, 25:12, 0:6>>.
+
+test_static_integer_matching_4() ->
+ <<0:6, -3:4/integer-signed, 0:6>> = s41(),
+ <<0:6, -3:4/integer-little-signed, 0:6>> = s42(),
+ <<0:6, 7:4/integer-little, 0:6>> = s43(),
+ <<0:6, 7:4, 0:6>> = s44(),
+ ok.
+
+s41() ->
+ <<0:6, -3:4/integer-signed, 0:6>>.
+s42() ->
+ <<0:6, -3:4/integer-little-signed, 0:6>>.
+s43() ->
+ <<0:6, 7:4/integer-little, 0:6>>.
+s44() ->
+ <<0:6, 7:4, 0:6>>.
+
+test_dynamic_integer_matching(N) ->
+ S = 32 - N,
+ <<-12:N/integer-signed, 0:S>> = <<-12:N/integer-signed, 0:S>>,
+ <<-12:N/integer-little-signed, 0:S>> = <<-12:N/integer-little-signed, 0:S>>,
+ <<12:N/integer, 0:S>> = <<12:N/integer, 0:S>>,
+ <<12:N/integer-little, 0:S>> = <<12:N/integer-little, 0:S>>,
+ ok.
diff --git a/lib/hipe/test/bs_SUITE_data/bs_native_float.erl b/lib/hipe/test/bs_SUITE_data/bs_native_float.erl
new file mode 100644
index 0000000000..15fe0bf0c6
--- /dev/null
+++ b/lib/hipe/test/bs_SUITE_data/bs_native_float.erl
@@ -0,0 +1,22 @@
+%% -*- erlang-indent-level: 2 -*-
+%%-------------------------------------------------------------------
+%% File : bs_native_float.erl
+%% Author : Kostis Sagonas
+%% Description : Test sent by Bjorn Gustavsson to report a bug in the
+%% handling of the 'native' endian specifier.
+%% Created : 28 Nov 2004
+%%-------------------------------------------------------------------
+-module(bs_native_float).
+
+-export([test/0]).
+
+test() ->
+ BeamRes = mk_bin(1.0, 2.0, 3.0),
+ hipe:c(?MODULE), %% Original was: hipe:c({?MODULE,vs_to_bin,1}, [o2]),
+ HipeRes = mk_bin(1.0, 2.0, 3.0),
+ %% io:format("Beam result = ~w\nHiPE result = ~w\n", [BeamRes,HipeRes]),
+ BeamRes = HipeRes,
+ ok.
+
+mk_bin(X, Y, Z) ->
+ <<X:64/native-float, Y:64/native-float, Z:64/native-float>>.
diff --git a/lib/hipe/test/bs_SUITE_data/bs_orber.erl b/lib/hipe/test/bs_SUITE_data/bs_orber.erl
new file mode 100644
index 0000000000..c80ab8928d
--- /dev/null
+++ b/lib/hipe/test/bs_SUITE_data/bs_orber.erl
@@ -0,0 +1,26 @@
+%%% -*- erlang-indent-level: 2 -*-
+%%%-------------------------------------------------------------------
+%%% Author : Per Gustafsson <[email protected]>
+%%% Purpose : Checks that labels are handled properly from Core
+%%% Created : 2 Nov 2004
+%%%-------------------------------------------------------------------
+-module(bs_orber).
+
+-export([test/0]).
+
+test() ->
+ 1 = dec_giop_message_header(<<1,1:32/little-integer>>),
+ 1 = dec_giop_message_header(<<0,1:32/big-integer>>),
+ {2, 1} = dec_giop_message_header(<<2,1:32/little-integer>>),
+ {3, 1} = dec_giop_message_header(<<3,1:32/big-integer>>),
+ ok.
+
+dec_giop_message_header(<<1:8, MessSize:32/little-integer>>) ->
+ MessSize;
+dec_giop_message_header(<<0:8, MessSize:32/big-integer>>) ->
+ MessSize;
+dec_giop_message_header(<<Flags:8, MessSize:32/little-integer>>) when
+ ((Flags band 16#03) =:= 16#02) ->
+ {Flags, MessSize};
+dec_giop_message_header(<<Flags:8, MessSize:32/big-integer>>) ->
+ {Flags, MessSize}.
diff --git a/lib/hipe/test/bs_SUITE_data/bs_pmatch.erl b/lib/hipe/test/bs_SUITE_data/bs_pmatch.erl
new file mode 100644
index 0000000000..9474ffea4a
--- /dev/null
+++ b/lib/hipe/test/bs_SUITE_data/bs_pmatch.erl
@@ -0,0 +1,269 @@
+%% -*- erlang-indent-level: 2 -*-
+%%--------------------------------------------------------------------
+%% Tests that basic cases of binary pattern matching work
+%%--------------------------------------------------------------------
+-module(bs_pmatch).
+
+-export([test/0]).
+
+test() ->
+ %% construct some binaries
+ Bin42 = <<42>>,
+ Bin = <<12,17,42,0,0,0>>,
+ BinSS = <<0,1,0,0,0>>,
+ %% do some pattern matching
+ ok = pm_const(Bin42),
+ <<17,42,0,0,0>> = pm_tail(Bin),
+ 42 = pm_little(<<0:1,42:7>>),
+ 42 = pm_rec(Bin),
+ 30 = pm_rec_acc(<<1,2,3,4,5,6,7,8,9,10>>, 0),
+ 42 = pm_binary_tuple(Bin42),
+ -1 = pm_with_illegal_float(),
+ %% do some pattern matching with bound segments
+ ok = pm_bound_var(),
+ ok = pm_bound_tail(),
+ %% do some tests with floating point numbers
+ ok = pm_float(),
+ ok = pm_float_little(),
+ %% do some pattern matching with segments of unknown sizes
+ {<<17>>, <<42,0,0,0>>} = pm_body_s(Bin, 1),
+ {<<17>>, <<42,0,0,0>>} = pm_body_ss(Bin, 1, 4),
+ {<<45>>, <<>>} = pm_size_split(<<1:16,45>>),
+ {<<45>>, <<46,47>>} = pm_size_split(<<1:16,45,46,47>>),
+ {<<45,46>>, <<47>>} = pm_size_split(<<2:16,45,46,47>>),
+ {<<45,46>>, <<47>>} = pm_size_split_2(2, <<2:16,45,46,47>>),
+ {'EXIT',{function_clause,_}} = (catch pm_size_split_2(42, <<2:16,45,46,47>>)),
+ {<<45,46,47>>, <<48>>} = pm_sizes_split(<<16:8,3:16,45,46,47,48>>),
+ <<"cdef">> = pm_skip_segment(<<2:8, "abcdef">>),
+ -1 = pm_double_size_in_head(BinSS),
+ -1 = pm_double_size_in_body(BinSS),
+ %% and finally some cases which were problematic for various reasons
+ ok = pm_bigs(),
+ ok = pm_sean(),
+ ok = pm_bin8(<<1,2,3,4,5,6,7,8>>),
+ ok = pm_bs_match_string(),
+ ok = pm_till_gc(),
+ ok.
+
+%%--------------------
+%% Test cases below
+%%--------------------
+
+pm_const(<<42>>) ->
+ ok.
+
+pm_tail(<<12, Bin/binary>>) ->
+ Bin.
+
+pm_little(<<_:1, X:15/little>>) ->
+ {wrong, X};
+pm_little(<<_:1, X:7/little>>) ->
+ X.
+
+pm_rec(<<12, Bin/binary>>) ->
+ pm_rec(Bin);
+pm_rec(<<17, Word:4/little-signed-integer-unit:8>>) ->
+ Word.
+
+pm_rec_acc(<<_:4, A:4, Rest/binary>>, Acc) ->
+ case Rest of
+ <<X, Y, 9, NewRest/binary>> ->
+ pm_rec_acc(NewRest, X+Y+Acc);
+ <<X, 5, NewRest/binary>> ->
+ pm_rec_acc(NewRest, X+Acc);
+ <<2, NewRest/binary>> ->
+ pm_rec_acc(NewRest, 1+Acc);
+ <<NewRest/binary>> ->
+ pm_rec_acc(NewRest, A+Acc)
+ end;
+pm_rec_acc(<<>>, Acc) ->
+ Acc.
+
+pm_binary_tuple(<<X>>) ->
+ X;
+pm_binary_tuple({Y, Z}) ->
+ Y + Z.
+
+pm_with_illegal_float() ->
+ Bin = <<-1:64>>, % create a binary which is illegal as float
+ pm_float_integer(Bin). % try to match it out as a float
+
+pm_float_integer(<<F:64/float>>) -> F;
+pm_float_integer(<<I:64/integer-signed>>) -> I.
+
+%%--------------------------------------------------------------------
+%% Some tests with bound variables in segments
+
+pm_bound_var() ->
+ ok = pm_bound_var(42, 13, <<42,13>>),
+ no = pm_bound_var(42, 13, <<42,255>>),
+ no = pm_bound_var(42, 13, <<154,255>>),
+ ok.
+
+pm_bound_var(A, B, <<A:8, B:8>>) -> ok;
+pm_bound_var(_, _, _) -> no.
+
+pm_bound_tail() ->
+ ok = pm_bound_tail(<<>>, <<13,14>>),
+ ok = pm_bound_tail(<<2,3>>, <<1,1,2,3>>),
+ no = pm_bound_tail(<<2,3>>, <<1,1,2,7>>),
+ no = pm_bound_tail(<<2,3>>, <<1,1,2,3,4>>),
+ no = pm_bound_tail(<<2,3>>, <<>>),
+ ok.
+
+pm_bound_tail(T, <<_:16, T/binary>>) -> ok;
+pm_bound_tail(_, _) -> no.
+
+%%--------------------------------------------------------------------
+%% Floating point tests
+
+pm_float() ->
+ F = f1(),
+ G = f_one(),
+ G = match_float(<<63,128,0,0>>, 32, 0),
+ G = match_float(<<63,240,0,0,0,0,0,0>>, 64, 0),
+ fcmp(F, match_float(<<F:32/float>>, 32, 0)),
+ fcmp(F, match_float(<<F:64/float>>, 64, 0)),
+ fcmp(F, match_float(<<1:1,F:32/float,127:7>>, 32, 1)),
+ fcmp(F, match_float(<<1:1,F:64/float,127:7>>, 64, 1)),
+ fcmp(F, match_float(<<1:13,F:32/float,127:3>>, 32, 13)),
+ fcmp(F, match_float(<<1:13,F:64/float,127:3>>, 64, 13)),
+ ok.
+
+fcmp(F1, F2) when (F1 - F2) / F2 < 0.0000001 -> ok.
+
+match_float(Bin0, Fsz, I) ->
+ Bin = make_sub_bin(Bin0),
+ Bsz = bit_size(Bin),
+ Tsz = Bsz - Fsz - I,
+ <<_:I,F:Fsz/float,_:Tsz>> = Bin,
+ F.
+
+pm_float_little() ->
+ F = f2(),
+ G = f_one(),
+ G = match_float_little(<<0,0,0,0,0,0,240,63>>, 64, 0),
+ G = match_float_little(<<0,0,128,63>>, 32, 0),
+ fcmp(F, match_float_little(<<F:32/float-little>>, 32, 0)),
+ fcmp(F, match_float_little(<<F:64/float-little>>, 64, 0)),
+ fcmp(F, match_float_little(<<1:1,F:32/float-little,127:7>>, 32, 1)),
+ fcmp(F, match_float_little(<<1:1,F:64/float-little,127:7>>, 64, 1)),
+ fcmp(F, match_float_little(<<1:13,F:32/float-little,127:3>>, 32, 13)),
+ fcmp(F, match_float_little(<<1:13,F:64/float-little,127:3>>, 64, 13)),
+ ok.
+
+match_float_little(Bin0, Fsz, I) ->
+ Bin = make_sub_bin(Bin0),
+ Bsz = bit_size(Bin),
+ Tsz = Bsz - Fsz - I,
+ <<_:I, F:Fsz/float-little, _:Tsz>> = Bin,
+ F.
+
+make_sub_bin(Bin0) ->
+ Sz = byte_size(Bin0),
+ Bin1 = <<37,Bin0/binary,38,39>>,
+ <<_:8,Bin:Sz/binary,_:8,_:8>> = Bin1,
+ Bin.
+
+f1() -> 3.1415.
+
+f2() -> 2.7133.
+
+f_one() -> 1.0.
+
+%%--------------------------------------------------------------------
+%% Some tests using size fields specified within the binary
+pm_body_s(Bin, S1) ->
+ <<12, B1:S1/binary, B2:4/binary>> = Bin, %% 4 is hard-coded
+ {B1, B2}.
+
+pm_body_ss(Bin, S1, S2) ->
+ <<12, B1:S1/binary, B2:S2/binary>> = Bin,
+ {B1, B2}.
+
+pm_size_split(<<N:16, B:N/binary, T/binary>>) ->
+ {B, T}.
+
+pm_size_split_2(N, <<N:16, B:N/binary, T/binary>>) ->
+ {B, T}.
+
+pm_sizes_split(<<N0:8, N:N0, B:N/binary, T/binary>>) ->
+ {B, T}.
+
+pm_skip_segment(<<N:8, _:N/binary, T/binary>>) -> T.
+
+%%--------------------------------------------------------------------
+%% Some tests using multiple occurrences of size fields
+pm_double_size_in_head(<<S:16, _:S/binary, _:S/binary, _/binary>>) ->
+ -S.
+
+pm_double_size_in_body(Bin) ->
+ <<S:16, _:S/binary, _:S/binary, _/binary>> = Bin,
+ -S.
+
+%%--------------------------------------------------------------------
+%% matching with 64-bit integers which become big nums
+-define(BIG, 16#7fffffff7fffffff).
+
+pm_bigs() ->
+ <<X:64/little>> = <<?BIG:64/little>>,
+ true = (X =:= big()),
+ <<Y:64>> = <<?BIG:64>>,
+ true = (Y =:= big()),
+ ok.
+
+big() -> ?BIG.
+
+%%--------------------------------------------------------------------
+
+pm_sean() ->
+ small = sean1(<<>>),
+ small = sean1(<<1>>),
+ small = sean1(<<1,2>>),
+ small = sean1(<<1,2,3>>),
+ large = sean1(<<1,2,3,4>>),
+ small = sean1(<<4>>),
+ small = sean1(<<4,5>>),
+ small = sean1(<<4,5,6>>),
+ {'EXIT', {function_clause, _}} = (catch sean1(<<4,5,6,7>>)),
+ ok.
+
+sean1(<<B/binary>>) when byte_size(B) < 4 -> small;
+sean1(<<1, _/binary>>) -> large.
+
+%%--------------------------------------------------------------------
+%% Crashed on SPARC due to a bug in linear scan register allocator
+pm_bin8(<<A, B, C, D, E, F, G, H>>) ->
+ 10 = add4(A, B, C, D),
+ 26 = add4(E, F, G, H),
+ ok.
+
+add4(X, Y, Z, W) ->
+ X + Y + Z + W.
+
+%%--------------------------------------------------------------------
+%% Cases that exposed bugs in the handling of bs_match_string with an
+%% empty destination list. Reported on 2013/2/12 and fixed 2013/3/10.
+
+pm_bs_match_string() ->
+ Bin = <<42,42>>,
+ Bin = pm_match_string_head(Bin),
+ ok = (pm_match_string_fun())(Bin).
+
+pm_match_string_head(<<42, _/bits>> = B) -> B.
+
+pm_match_string_fun() ->
+ fun (<<X, _/bits>>) when X =:= 42 -> ok end.
+
+%%--------------------------------------------------------------------
+%% Match a lot to force a garbage collection which exposed a bug
+
+pm_till_gc() ->
+ Bin = <<16#76543210:32>>,
+ 16#76543210 = pm_a_lot(Bin, 1000000),
+ ok.
+
+pm_a_lot(<<X:32>>, 0) ->
+ X;
+pm_a_lot(<<X:32>>, N) ->
+ pm_a_lot(<<X:32>>, N-1).
diff --git a/lib/hipe/test/bs_SUITE_data/bs_pmatch_bugs.erl b/lib/hipe/test/bs_SUITE_data/bs_pmatch_bugs.erl
new file mode 100644
index 0000000000..b280705a47
--- /dev/null
+++ b/lib/hipe/test/bs_SUITE_data/bs_pmatch_bugs.erl
@@ -0,0 +1,67 @@
+%% -*- erlang-indent-level: 2 -*-
+%%--------------------------------------------------------------------
+-module(bs_pmatch_bugs).
+
+-export([test/0]).
+
+test() ->
+ Bin = <<"123.123">>,
+ <<49,50,51>> = lex_digits1(Bin, 1, []),
+ <<49,50,51>> = lex_digits2(Bin, 1, []),
+ ok = var_bind_bug(<<1, 2, 3, 4, 5, 6, 7, 8>>),
+ ok.
+
+%%--------------------------------------------------------------------
+%% One of the lex_digits functions below gave incorrect results due to
+%% incorrect pattern matching compilation of binaries by the byte code
+%% compiler. Fixed by Bjorn Gustavsson on 5/3/2003.
+%% --------------------------------------------------------------------
+lex_digits1(<<$., Rest/binary>>, _Val, _Acc) ->
+ Rest;
+lex_digits1(<<N, Rest/binary>>, Val, Acc) when N >= $0, N =< $9 ->
+ lex_digits1(Rest, Val * 10 + dec(N), Acc);
+lex_digits1(_Other, _Val, _Acc) ->
+ not_ok.
+
+lex_digits2(<<N, Rest/binary>>,Val, Acc) when N >= $0, N =< $9 ->
+ lex_digits2(Rest, Val * 10 + dec(N), Acc);
+lex_digits2(<<$., Rest/binary>>, _Val, _Acc) ->
+ Rest;
+lex_digits2(_Other, _Val, _Acc) ->
+ not_ok.
+
+dec(A) ->
+ A - $0.
+
+%%--------------------------------------------------------------------
+%% From: Bernard Duggan
+%% Date: 11/3/2011
+%%
+%% I've just run into an interesting little bit of behaviour that
+%% doesn't seem quite right. erlc gives me the warning
+%%
+%% 43: Warning: this clause cannot match because a previous
+%% clause at line 42 always matches
+%% (line 42 is the "B -> wrong;" line).
+%%
+%% And sure enough, if you run test/0 you get 'wrong' back.
+%%
+%% That, in itself, is curious to me since by my understanding B should
+%% be bound by the function header, and have no guarantee of being the
+%% same as A. I can't see how it could be unbound.
+%%
+%% Doubly curious, is that if I stop using B as the size specifier of C,
+%% like this:
+%%
+%% match(<<A:1/binary, B:8/integer, _C:1/binary, _Rest/binary>>) ->
+%%
+%% the warning goes away. And the result becomes 'ok' (in spite of
+%% nothing in the body having changed, and the only thing changing in
+%% the header being the size of an unused variable at the tail of the
+%% binary).
+%%--------------------------------------------------------------------
+var_bind_bug(<<A:1/binary, B:8/integer, _C:B/binary, _Rest/binary>>) ->
+ case A of
+ B -> wrong;
+ _ -> ok
+ end.
diff --git a/lib/hipe/test/bs_SUITE_data/bs_pmatch_in_guards.erl b/lib/hipe/test/bs_SUITE_data/bs_pmatch_in_guards.erl
new file mode 100644
index 0000000000..159227bb92
--- /dev/null
+++ b/lib/hipe/test/bs_SUITE_data/bs_pmatch_in_guards.erl
@@ -0,0 +1,23 @@
+%% -*- erlang-indent-level: 2 -*-
+%%--------------------------------------------------------------------
+%% Tests that basic cases of binary pattern matching in guards work
+%%--------------------------------------------------------------------
+-module(bs_pmatch_in_guards).
+
+-export([test/0]).
+
+test() ->
+ 1 = in_guard(<<16#74ad:16>>, 16#e95, 5),
+ 2 = in_guard(<<16#3A,16#F7,"hello">>, 16#3AF7, <<"hello">>),
+ 3 = in_guard(<<16#FBCD:14,3.1415/float,3:2>>, 16#FBCD, 3.1415),
+ nope = in_guard(<<1>>, 42, b),
+ nope = in_guard(<<1>>, a, b),
+ nope = in_guard(<<1,2>>, 1, 1),
+ nope = in_guard(<<4,5>>, 1, 2.71),
+ nope = in_guard(<<4,5>>, 1, <<12,13>>),
+ ok.
+
+in_guard(Bin, A, B) when <<A:13,B:3>> == Bin -> 1;
+in_guard(Bin, A, B) when <<A:16,B/binary>> == Bin -> 2;
+in_guard(Bin, A, B) when <<A:14,B/float,3:2>> == Bin -> 3;
+in_guard(_, _, _) -> nope.
diff --git a/lib/hipe/test/bs_SUITE_data/bs_potpurri.erl b/lib/hipe/test/bs_SUITE_data/bs_potpurri.erl
new file mode 100644
index 0000000000..8bc4fe5c88
--- /dev/null
+++ b/lib/hipe/test/bs_SUITE_data/bs_potpurri.erl
@@ -0,0 +1,200 @@
+%%% -*- erlang-indent-level: 2 -*-
+%%%-------------------------------------------------------------------
+-module(bs_potpurri).
+
+-export([test/0]).
+
+test() ->
+ ok = integer(),
+ ok = signed_integer(),
+ ok = dynamic(),
+ ok = more_dynamic(),
+ ok = mml(),
+ ok.
+
+%% compile(Opts0) ->
+%% case proplists:get_bool(core, Opts0) of
+%% true ->
+%% test:note(?MODULE, "disabling compilation from core - BUG"),
+%% Opts = [{core,false}|Opts0];
+%% false ->
+%% Opts = Opts0
+%% end,
+%% hipe:c(?MODULE, Opts).
+
+integer() ->
+ 0 = get_int(mkbin([])),
+ 0 = get_int(mkbin([0])),
+ 42 = get_int(mkbin([42])),
+ 255 = get_int(mkbin([255])),
+ 256 = get_int(mkbin([1,0])),
+ 257 = get_int(mkbin([1,1])),
+ 258 = get_int(mkbin([1,2])),
+ 258 = get_int(mkbin([1,2])),
+ 65534 = get_int(mkbin([255,254])),
+ 16776455 = get_int(mkbin([255,253,7])),
+ 4245492555 = get_int(mkbin([253,13,19,75])),
+ L = [200,1,19,128,222,42,97,111,200,1,19,128,222,42,97,111],
+ ok = cmp128(mkbin(L), uint(L)),
+ ok = fun_clause(catch get_int(mkbin(lists:seq(1,5)))),
+ ok.
+
+get_int(<<I:0>>) -> I;
+get_int(<<I:8>>) -> I;
+get_int(<<I:16>>) -> I;
+get_int(<<I:24>>) -> I;
+get_int(<<I:32>>) -> I.
+
+cmp128(<<I:128>>, I) -> ok;
+cmp128(_Bin, _I) -> not_ok.
+
+signed_integer() ->
+ {no_match,_} = sint(mkbin([])),
+ {no_match,_} = sint(mkbin([1,2,3])),
+ 127 = sint(mkbin([127])),
+ -1 = sint(mkbin([255])),
+ -128 = sint(mkbin([128])),
+ 42 = sint(mkbin([42,255])),
+ 127 = sint(mkbin([127,255])),
+ ok.
+
+sint(Bin) ->
+ case Bin of
+ <<I:8/signed>> -> I;
+ <<I:8/signed,_:3,_:5>> -> I;
+ Other -> {no_match,Other}
+ end.
+
+uint(L) -> uint(L, 0).
+
+uint([H|T], Acc) -> uint(T, Acc bsl 8 bor H);
+uint([], Acc) -> Acc.
+
+dynamic() ->
+ ok = dynamic(mkbin([255]), 8),
+ ok = dynamic(mkbin([255,255]), 16),
+ ok = dynamic(mkbin([255,255,255]), 24),
+ ok = dynamic(mkbin([255,255,255,255]), 32),
+ ok.
+
+dynamic(Bin, S1) when S1 >= 0 ->
+ S2 = bit_size(Bin) - S1,
+ dynamic(Bin, S1, S2, (1 bsl S1) - 1, (1 bsl S2) - 1),
+ dynamic(Bin, S1-1);
+dynamic(_Bin, _) -> ok.
+
+dynamic(Bin, S1, S2, A, B) ->
+ %% io:format("~p ~p ~p ~p\n", [S1,S2,A,B]),
+ case Bin of
+ <<A:S1,B:S2>> ->
+ %% io:format("~p ~p ~p ~p\n", [S1,S2,A,B]),
+ ok;
+ <<A1:S1,B2:S2>> -> erlang:error(badmatch, [Bin,S1,S2,A,B,A1,B2])
+ end.
+
+more_dynamic() ->
+ %% Unsigned big-endian numbers.
+ Unsigned = fun(Bin, List, SkipBef, N) ->
+ SkipAft = bit_size(Bin) - N - SkipBef,
+ <<_I1:SkipBef,Int:N,_I2:SkipAft>> = Bin,
+ Int = make_int(List, N, 0)
+ end,
+ ok = more_dynamic1(Unsigned, funny_binary(42)),
+
+ %% Signed big-endian numbers.
+ Signed = fun(Bin, List, SkipBef, N) ->
+ SkipAft = bit_size(Bin) - N - SkipBef,
+ <<_I1:SkipBef,Int:N/signed,_I2:SkipAft>> = Bin,
+ case make_signed_int(List, N) of
+ Int -> ok;
+ Other ->
+ io:format("Bin = ~p,", [Bin]),
+ io:format("SkipBef = ~p, N = ~p", [SkipBef,N]),
+ io:format("Expected ~p, got ~p", [Int,Other]),
+ exit(Other)
+ end
+ end,
+ ok = more_dynamic1(Signed, funny_binary(43)),
+
+ %% Unsigned little-endian numbers.
+ UnsLittle = fun(Bin, List, SkipBef, N) ->
+ SkipAft = bit_size(Bin) - N - SkipBef,
+ <<_I1:SkipBef,Int:N/little,_I2:SkipAft>> = Bin,
+ Int = make_int(big_to_little(List, N), N, 0)
+ end,
+ more_dynamic1(UnsLittle, funny_binary(44)),
+
+ %% Signed little-endian numbers.
+ SignLittle = fun(Bin, List, SkipBef, N) ->
+ SkipAft = bit_size(Bin) - N - SkipBef,
+ <<_I1:SkipBef,Int:N/signed-little,_I2:SkipAft>> = Bin,
+ Little = big_to_little(List, N),
+ Int = make_signed_int(Little, N)
+ end,
+ ok = more_dynamic1(SignLittle, funny_binary(45)),
+
+ ok.
+
+funny_binary(N) ->
+ B0 = erlang:md5([N]),
+ {B1,_B2} = split_binary(B0, byte_size(B0) div 2),
+ B1.
+
+more_dynamic1(Action, Bin) ->
+ BitList = bits_to_list(binary_to_list(Bin), 16#80),
+ more_dynamic2(Action, Bin, BitList, 0).
+
+more_dynamic2(Action, Bin, [_|T]=List, Bef) ->
+ more_dynamic3(Action, Bin, List, Bef, bit_size(Bin)),
+ more_dynamic2(Action, Bin, T, Bef+1);
+more_dynamic2(_Action, _Bin, [], _Bef) -> ok.
+
+more_dynamic3(Action, Bin, List, Bef, Aft) when Bef =< Aft ->
+ %% io:format("~p, ~p", [Bef,Aft-Bef]),
+ Action(Bin, List, Bef, Aft-Bef),
+ more_dynamic3(Action, Bin, List, Bef, Aft-1);
+more_dynamic3(_, _, _, _, _) -> ok.
+
+big_to_little(List, N) -> big_to_little(List, N, []).
+
+big_to_little([B0,B1,B2,B3,B4,B5,B6,B7|T], N, Acc) when N >= 8 ->
+ big_to_little(T, N-8, [B0,B1,B2,B3,B4,B5,B6,B7|Acc]);
+big_to_little(List, N, Acc) -> lists:sublist(List, 1, N) ++ Acc.
+
+make_signed_int(_List, 0) -> 0;
+make_signed_int([0|_]=List, N) -> make_int(List, N, 0);
+make_signed_int([1|_]=List0, N) ->
+ List1 = reversed_sublist(List0, N, []),
+ List2 = two_complement_and_reverse(List1, 1, []),
+ -make_int(List2, length(List2), 0).
+
+reversed_sublist(_List, 0, Acc) -> Acc;
+reversed_sublist([H|T], N, Acc) -> reversed_sublist(T, N-1, [H|Acc]).
+
+two_complement_and_reverse([H|T], Carry, Acc) ->
+ Sum = 1 - H + Carry,
+ two_complement_and_reverse(T, Sum div 2, [Sum rem 2|Acc]);
+two_complement_and_reverse([], Carry, Acc) -> [Carry|Acc].
+
+make_int(_List, 0, Acc) -> Acc;
+make_int([H|T], N, Acc) -> make_int(T, N-1, Acc bsl 1 bor H).
+
+bits_to_list([_|T], 0) -> bits_to_list(T, 16#80);
+bits_to_list([H|_]=List, Mask) ->
+ [case H band Mask of
+ 0 -> 0;
+ _ -> 1
+ end|bits_to_list(List, Mask bsr 1)];
+bits_to_list([], _) -> [].
+
+fun_clause({'EXIT',{function_clause,_}}) -> ok.
+
+mkbin(L) when is_list(L) -> list_to_binary(L).
+
+mml() ->
+ single_byte_binary = mml_choose(<<42>>),
+ multi_byte_binary = mml_choose(<<42,43>>),
+ ok.
+
+mml_choose(<<_:8>>) -> single_byte_binary;
+mml_choose(<<_:8, _T/binary>>) -> multi_byte_binary.
diff --git a/lib/hipe/test/bs_SUITE_data/bs_remove3.erl b/lib/hipe/test/bs_SUITE_data/bs_remove3.erl
new file mode 100644
index 0000000000..a98b0b5b28
--- /dev/null
+++ b/lib/hipe/test/bs_SUITE_data/bs_remove3.erl
@@ -0,0 +1,104 @@
+%%% -*- erlang-indent-level: 2 -*-
+%%%-------------------------------------------------------------------
+%%% File : bs_remove3.erl
+%%% Author : Per Gustafsson <[email protected]>
+%%% Purpose :
+%%%
+%%% Created : 13 Apr 2004 by Per Gustafsson
+%%%-------------------------------------------------------------------
+-module(bs_remove3).
+
+-export([test/0]).
+
+-define(A, <<56,0,120,0,0,31,255,255,102,42,12,0,3,3,16,5,24,3,240,0,0,32,0,196,
+ 2,128,4,0,255,255,254,33,68,96,0,8,8,213,40,192,31,196,0,4,0,0>>).
+-define(B, <<28,32,0,96,0,8,0,7,255,255,212,33,98,12,0,0,1,0,48,72,66,3,0,7,240,
+ 64,0,0,8,0,0,224,0,10,128,0,64,0,63,255,254,133,10,80,96,0,0,8,1,6,
+ 18,4,24,0,63,128,0,0,4,64,0,0>>).
+
+test() ->
+ Bin1 = <<30,16,0,90,0,1,0,0,255,255,255,255,81,67,101,7,0,
+ 0,0,96,6,12,146,18,14,0,15,252,16,0,0,17,0,0>>,
+ Bin = <<Bin1/binary, Bin1/binary>>,
+ ?A = loop(Bin, 10, fun run_list/1),
+ ?A = loop(Bin, 10, fun run_bin/1),
+ ?B = loop(Bin, 10, fun r31/1),
+ ok.
+
+loop(Arg, 0, F) ->
+ F(Arg);
+loop(Arg, N, F) ->
+ F(Arg),
+ loop(Arg, N-1, F).
+
+run_list(Bin) ->
+ List = run1(Bin),
+ list_to_binary(List).
+
+run1(<<A1:2,_:1,A2:2,_:1,A3:2,_:1,A4:2,_:1,
+ A5:2,_:1,A6:2,_:1,A7:2,_:1,A8:2,_:1,Rest/binary>>) ->
+ [<<A1:2,A2:2,A3:2,A4:2,A5:2,A6:2,A7:2,A8:2>>, run2(Rest)];
+run1(<<A1:2,_:1,A2:2,_:1,A3:2,_:1,A4:2,_:1,A5:2,_:1,A6:1>>) ->
+ [<<A1:2,A2:2,A3:2,A4:2,A5:2,A6:1,0:5>>];
+run1(<<A1:2,_:1,A2:2,_:1,A3:2>>) ->
+ [<<A1:2,A2:2,A3:2,0:2>>];
+run1(<<>>) ->
+ [].
+
+run_bin(Bin) ->
+ run2(Bin).
+
+run2(<<A1:2,_:1,A2:2,_:1,A3:2,_:1,A4:2,_:1,
+ A5:2,_:1,A6:2,_:1,A7:2,_:1,A8:2,_:1,Rest/binary>>) ->
+ Bin = run2(Rest),
+ <<A1:2,A2:2,A3:2,A4:2,A5:2,A6:2,A7:2,A8:2,Bin/binary>>;
+run2(<<A1:2,_:1,A2:2,_:1,A3:2,_:1,A4:2,_:1,A5:2,_:1,A6:1>>) ->
+ <<A1:2,A2:2,A3:2,A4:2,A5:2,A6:1,0:5>>;
+run2(<<A1:2,_:1,A2:2,_:1,A3:2>>) ->
+ <<A1:2,A2:2,A3:2,0:2>>;
+run2(<<>>) ->
+ <<>>.
+
+r31(Bin) ->
+ List = remove3rd1(0, 0, Bin, [-1]),
+ build(List, Bin, 0, <<>>).
+
+build([N1, N2|Rest], Bin, N, Present) ->
+ X = N1+1, Y = N2-X,
+ S = rest(N2),
+ <<_:X,A:Y,_:S,_/binary>> = Bin,
+ S1 = rest(N+Y),
+ NewPresent = <<Present:N/binary-unit:1, A:Y, 0:S1>>,
+ build([N2|Rest], Bin, N+Y, NewPresent);
+
+build([_], _Bin, _N, Present) ->
+ Present.
+
+rest(X) ->
+ case 8 - (X rem 8) of
+ 8 -> 0;
+ H -> H
+ end.
+
+remove3rd1(N, 2, Bin, List) ->
+ S = rest(N+1),
+ case Bin of
+ <<_:N, 1:1, _:S,_/binary>> ->
+ remove3rd1(N+1, 0, Bin, [N|List]);
+ <<_:N, 0:1, _:S,_/binary>> ->
+ remove3rd1(N+1, 2, Bin, List);
+ _ ->
+ Size = byte_size(Bin) * 8,
+ lists:reverse([Size|List])
+ end;
+remove3rd1(N, I, Bin, List) ->
+ S = rest(N+1),
+ case Bin of
+ <<_:N, 1:1, _:S,_/binary>> ->
+ remove3rd1(N+1, I+1, Bin, List);
+ <<_:N, 0:1, _:S,_/binary>> ->
+ remove3rd1(N+1, I, Bin, List);
+ _ ->
+ Size = byte_size(Bin) * 8,
+ lists:reverse([Size|List])
+ end.
diff --git a/lib/hipe/test/bs_SUITE_data/bs_save.erl b/lib/hipe/test/bs_SUITE_data/bs_save.erl
new file mode 100644
index 0000000000..fe2b1105f2
--- /dev/null
+++ b/lib/hipe/test/bs_SUITE_data/bs_save.erl
@@ -0,0 +1,21 @@
+%%% -*- erlang-indent-level: 2 -*-
+%%%-------------------------------------------------------------------
+%%% File : bs_save.erl
+%%% Author : Per Gustafsson
+%%% Purpose : Tests that compilation works for bs_save
+%%% Created : 1 Nov 2007
+%%%-------------------------------------------------------------------
+-module(bs_save).
+
+-export([test/0]).
+
+test() ->
+ {[16257, 1], <<0>>} = inc_on_ones(<<255,1,128,1,128,0>>, 0, [], 5),
+ ok.
+
+inc_on_ones(Buffer, _Av, Al, 0) ->
+ {lists:reverse(Al), Buffer};
+inc_on_ones(<<1:1, H:7, T/binary>>, Av, Al, Len) ->
+ inc_on_ones(T, (Av bsl 7) bor H, Al, Len-1);
+inc_on_ones(<<H, T/binary>>, Av, Al, Len) ->
+ inc_on_ones(T, 0, [((Av bsl 7) bor H)|Al], Len-1).
diff --git a/lib/hipe/test/bs_SUITE_data/bs_shell_native.erl b/lib/hipe/test/bs_SUITE_data/bs_shell_native.erl
new file mode 100644
index 0000000000..b438f8d9ef
--- /dev/null
+++ b/lib/hipe/test/bs_SUITE_data/bs_shell_native.erl
@@ -0,0 +1,275 @@
+%%% -*- erlang-indent-level: 2 -*-
+%%%-------------------------------------------------------------------
+%%% File : bs_shell_native.erl
+%%% Author : Per Gustafsson <[email protected]>
+%%% Purpose : Tests that the Erlang shell works well when in native
+%%% Created : 6 Sep 2006
+%%%-------------------------------------------------------------------
+-module(bs_shell_native).
+
+-export([prepare_for_test/0, test/0]).
+%% These need to be exported so that we emulate calling them from the shell
+-export([parse_and_eval/1, receiver/1, receiver_alot/1, send_alot/3]).
+
+%% This makes sure the shell runs native code
+prepare_for_test() ->
+ lists:foreach(fun (M) -> {ok, M} = hipe:c(M) end, [erl_bits, erl_eval]).
+
+test() ->
+ ok = eval_bits_in_shell(),
+ ok = eval_bin_comp_in_shell(),
+ ok.
+
+%%--------------------------------------------------------------------
+%% Tests for bit stream operations including matching, construction
+%% and binary_to_list, list_to_binary in the shell
+eval_bits_in_shell() ->
+ <<1:100>> = parse_and_eval("<<1:100>> = <<1:100>>."),
+ ok = match(7),
+ ok = match(9),
+ ok = match1(15),
+ ok = match1(31),
+ ok = horrid_match(),
+ ok = test_bitstr(),
+ ok = test_bitsize(),
+ ok = asymmetric_tests(),
+ ok = big_asymmetric_tests(),
+ ok = binary_to_and_from_list(),
+ ok = big_binary_to_and_from_list(),
+ ok = send_and_receive(),
+ ok = send_and_receive_alot(),
+ ok.
+
+parse_and_eval(String) ->
+ {ok, Toks, _} = erl_scan:string(String),
+ {ok, Exprs} = erl_parse:parse_exprs(Toks),
+ Bnds = erl_eval:new_bindings(),
+ case erl_eval:exprs(Exprs, Bnds) of
+ {value, V, _} ->
+ V;
+ V ->
+ V
+ end.
+
+match(N) ->
+ Str = "N =" ++ integer_to_list(N) ++ ", <<0:N>> = <<0:N>>.",
+ <<0:N>> = parse_and_eval(Str),
+ ok.
+
+match1(N) ->
+ Str = "N =" ++ integer_to_list(N) ++ ", <<42:N/little>> = <<42:N/little>>.",
+ <<42:N/little>> = parse_and_eval(Str),
+ ok.
+
+test_bitsize() ->
+ 101 = parse_and_eval("101 = erlang:bit_size(<<1:101>>)."),
+ 1001 = parse_and_eval("1001 = erlang:bit_size(<<1:1001>>)."),
+ 80 = parse_and_eval("80 = erlang:bit_size(<<1:80>>)."),
+ 800 = parse_and_eval("800 = erlang:bit_size(<<1:800>>)."),
+ S =
+ "Bin = <<0:16#1000000>>,"
+ "BigBin = list_to_bitstring([Bin||_ <- lists:seq(1,16#10)] ++ [<<1:1>>]),"
+ "16#10000001 = erlang:bit_size(BigBin).",
+ 16#10000001 = parse_and_eval(S),
+ %% Only run these on computers with lots of memory
+ %% HugeBin = list_to_bitstring([BigBin||_ <- lists:seq(1,16#10)]++[<<1:1>>]),
+ %% 16#100000011 = erlang:bit_size(HugeBin),
+ 0 = parse_and_eval("0 = erlang:bit_size(<<>>)."),
+ ok.
+
+horrid_match() ->
+ S = "<<1:4,B:24/bitstring>> = <<1:4,42:24/little>>, <<42:24/little>> = B.",
+ <<42:24/little>> = parse_and_eval(S),
+ ok.
+
+test_bitstr() ->
+ S =
+ "<<1:7,B/bitstring>> = <<1:7,<<1:1,6>>/bitstring>>,"
+ "<<1:1,6>> = B,"
+ "B = <<1:1,6>>.",
+ <<1:1,6>> = parse_and_eval(S),
+ ok.
+
+asymmetric_tests() ->
+ <<1:12>> = parse_and_eval("<<1:12>> = <<0,1:4>>."),
+ <<0,1:4>> = parse_and_eval("<<0,1:4>> = <<1:12>>."),
+ S1 =
+ "<<1:1,X/bitstring>> = <<128,255,0,0:2>>,"
+ "<<1,254,0,0:1>> = X,"
+ "X = <<1,254,0,0:1>>.",
+ <<1,254,0,0:1>> = parse_and_eval(S1),
+ S2 =
+ "<<1:1,X1:25/bitstring>> = <<128,255,0,0:2>>,"
+ "<<1,254,0,0:1>> = X1,"
+ "X1 = <<1,254,0,0:1>>.",
+ <<1,254,0,0:1>> = parse_and_eval(S2),
+ ok.
+
+big_asymmetric_tests() ->
+ <<1:875,1:12>> = parse_and_eval("<<1:875,1:12>> = <<1:875,0,1:4>>."),
+ <<1:875,0,1:4>> = parse_and_eval("<<1:875,0,1:4>> = <<1:875,1:12>>."),
+ S1 =
+ "<<1:1,X/bitstring>> = <<128,255,0,0:2,1:875>>,"
+ "<<1,254,0,0:1,1:875>> = X,"
+ "X = <<1,254,0,0:1,1:875>>.",
+ <<1,254,0,0:1,1:875>> = parse_and_eval(S1),
+ S2 =
+ "<<1:1,X1:900/bitstring>> = <<128,255,0,0:2,1:875>>,"
+ "<<1,254,0,0:1,1:875>> = X1,"
+ "X1 = <<1,254,0,0:1,1:875>>.",
+ parse_and_eval(S2),
+ ok.
+
+binary_to_and_from_list() ->
+ <<1:7>> = parse_and_eval("list_to_bitstring(bitstring_to_list(<<1:7>>))."),
+ <<1,2,3,4,1:1>> = parse_and_eval("list_to_bitstring(bitstring_to_list(<<1,2,3,4,1:1>>))."),
+ [1,2,3,4,<<1:1>>] = parse_and_eval("bitstring_to_list(<<1,2,3,4,1:1>>)."),
+ <<1:1,1,2,3,4>> = parse_and_eval("list_to_bitstring([<<1:1>>,1,2,3,4])."),
+ [128,129,1,130,<<0:1>>] = parse_and_eval("bitstring_to_list(<<1:1,1,2,3,4>>)."),
+ ok.
+
+big_binary_to_and_from_list() ->
+ S1 = "erlang:list_to_bitstring(bitstring_to_list(<<1:800,2,3,4,1:1>>)).",
+ <<1:800,2,3,4,1:1>> = parse_and_eval(S1),
+ S2 = "erlang:bitstring_to_list(<<1,2,3,4,1:800,1:1>>).",
+ [1,2,3,4|_Rest1] = parse_and_eval(S2),
+ S3 = "erlang:list_to_bitstring([<<1:801>>,1,2,3,4]).",
+ <<1:801,1,2,3,4>> = parse_and_eval(S3),
+ ok.
+
+send_and_receive() ->
+ S =
+ "Bin = <<1,2:7>>,"
+ "Pid = spawn(fun() -> bs_shell_native:receiver(Bin) end),"
+ "Pid ! {self(),<<1:7,8:5,Bin/bitstring>>},"
+ "receive ok -> ok end.",
+ parse_and_eval(S).
+
+receiver(Bin) ->
+ receive
+ {Pid, <<1:7,8:5,Bin/bitstring>>} ->
+ Pid ! ok
+ end.
+
+send_and_receive_alot() ->
+ S =
+ "Bin = <<1:1000001>>,"
+ "Pid = spawn(fun() -> bs_shell_native:receiver_alot(Bin) end),"
+ "bs_shell_native:send_alot(100,Bin,Pid).",
+ parse_and_eval(S).
+
+send_alot(N,Bin,Pid) when N > 0 ->
+ Pid ! {self(),<<1:7,8:5,Bin/bitstring>>},
+ receive
+ ok ->
+ ok
+ end,
+ send_alot(N-1,Bin,Pid);
+send_alot(0,_Bin,Pid) ->
+ Pid ! no_more,
+ ok.
+
+receiver_alot(Bin) ->
+ receive
+ {Pid, <<1:7,8:5,Bin/bitstring>>} ->
+ Pid ! ok;
+ no_more -> ok
+ end,
+ receiver_alot(Bin).
+
+%%--------------------------------------------------------------------
+
+eval_bin_comp_in_shell() ->
+ ok = byte_aligned(),
+ ok = bit_aligned(),
+ ok = extended_byte_aligned(),
+ ok = extended_bit_aligned(),
+ ok = mixed(),
+ ok.
+
+byte_aligned() ->
+ <<"abcdefg">> =
+ parse_and_eval("<<\"abcdefg\">> = << <<(X+32)>> || <<X>> <= <<\"ABCDEFG\">> >>."),
+ <<1:32/little,2:32/little,3:32/little,4:32/little>> =
+ parse_and_eval("<<1:32/little,2:32/little,3:32/little,4:32/little>> =
+ << <<X:32/little>> || <<X:32>> <= <<1:32,2:32,3:32,4:32>> >>."),
+ <<1:32/little,2:32/little,3:32/little,4:32/little>> =
+ parse_and_eval("<<1:32/little,2:32/little,3:32/little,4:32/little>> =
+ << <<X:32/little>> || <<X:16>> <= <<1:16,2:16,3:16,4:16>> >>."),
+ ok.
+
+bit_aligned() ->
+ <<$a:7,$b:7,$c:7,$d:7,$e:7,$f:7,$g:7>> =
+ parse_and_eval("<<$a:7,$b:7,$c:7,$d:7,$e:7,$f:7,$g:7>> =
+ << <<(X+32):7>> || <<X>> <= <<\"ABCDEFG\">> >>."),
+ <<"ABCDEFG">> =
+ parse_and_eval("<<\"ABCDEFG\">> =
+ << <<(X-32)>> || <<X:7>> <= <<$a:7,$b:7,$c:7,$d:7,$e:7,$f:7,$g:7>> >>."),
+ <<1:31/little,2:31/little,3:31/little,4:31/little>> =
+ parse_and_eval("<<1:31/little,2:31/little,3:31/little,4:31/little>> =
+ << <<X:31/little>> || <<X:31>> <= <<1:31,2:31,3:31,4:31>> >>."),
+ <<1:31/little,2:31/little,3:31/little,4:31/little>> =
+ parse_and_eval("<<1:31/little,2:31/little,3:31/little,4:31/little>> =
+ << <<X:31/little>> || <<X:15>> <= <<1:15,2:15,3:15,4:15>> >>."),
+ ok.
+
+extended_byte_aligned() ->
+ <<"abcdefg">> =
+ parse_and_eval("<<\"abcdefg\">> = << <<(X+32)>> || X <- \"ABCDEFG\" >>."),
+ "abcdefg" =
+ parse_and_eval("\"abcdefg\" = [(X+32) || <<X>> <= <<\"ABCDEFG\">>]."),
+ <<1:32/little,2:32/little,3:32/little,4:32/little>> =
+ parse_and_eval("<<1:32/little,2:32/little,3:32/little,4:32/little>> =
+ << <<X:32/little>> || X <- [1,2,3,4] >>."),
+ [256,512,768,1024] =
+ parse_and_eval("[256,512,768,1024] =
+ [X || <<X:16/little>> <= <<1:16,2:16,3:16,4:16>>]."),
+ ok.
+
+extended_bit_aligned() ->
+ <<$a:7,$b:7,$c:7,$d:7,$e:7,$f:7,$g:7>> =
+ parse_and_eval("<<$a:7,$b:7,$c:7,$d:7,$e:7,$f:7,$g:7>> =
+ << <<(X+32):7>> || X <- \"ABCDEFG\" >>."),
+ "ABCDEFG" =
+ parse_and_eval("\"ABCDEFG\" = [(X-32) || <<X:7>> <=
+<<$a:7,$b:7,$c:7,$d:7,$e:7,$f:7,$g:7>>]."),
+ <<1:31/little,2:31/little,3:31/little,4:31/little>> =
+ parse_and_eval("<<1:31/little,2:31/little,3:31/little,4:31/little>> =
+ << <<X:31/little>> || X <- [1,2,3,4] >>."),
+ [256,512,768,1024] =
+ parse_and_eval("[256,512,768,1024] =
+ [X || <<X:15/little>> <= <<1:15,2:15,3:15,4:15>>]."),
+ ok.
+
+mixed() ->
+ <<2,3,3,4,4,5,5,6>> =
+ parse_and_eval("<<2,3,3,4,4,5,5,6>> =
+ << <<(X+Y)>> || <<X>> <= <<1,2,3,4>>, <<Y>> <= <<1,2>> >>."),
+ <<2,3,3,4,4,5,5,6>> =
+ parse_and_eval("<<2,3,3,4,4,5,5,6>> =
+ << <<(X+Y)>> || <<X>> <= <<1,2,3,4>>, Y <- [1,2] >>."),
+ <<2,3,3,4,4,5,5,6>> =
+ parse_and_eval("<<2,3,3,4,4,5,5,6>> =
+ << <<(X+Y)>> || X <- [1,2,3,4], Y <- [1,2] >>."),
+ [2,3,3,4,4,5,5,6] =
+ parse_and_eval("[2,3,3,4,4,5,5,6] =
+ [(X+Y) || <<X>> <= <<1,2,3,4>>, <<Y>> <= <<1,2>>]."),
+ [2,3,3,4,4,5,5,6] =
+ parse_and_eval("[2,3,3,4,4,5,5,6] =
+ [(X+Y) || <<X>> <= <<1,2,3,4>>, Y <- [1,2]]."),
+ <<2:3,3:3,3:3,4:3,4:3,5:3,5:3,6:3>> =
+ parse_and_eval("<<2:3,3:3,3:3,4:3,4:3,5:3,5:3,6:3>> =
+ << <<(X+Y):3>> || <<X:3>> <= <<1:3,2:3,3:3,4:3>>, <<Y:3>> <= <<1:3,2:3>> >>."),
+ <<2:3,3:3,3:3,4:3,4:3,5:3,5:3,6:3>> =
+ parse_and_eval("<<2:3,3:3,3:3,4:3,4:3,5:3,5:3,6:3>> =
+ << <<(X+Y):3>> || <<X:3>> <= <<1:3,2:3,3:3,4:3>>, Y <- [1,2] >>."),
+ <<2:3,3:3,3:3,4:3,4:3,5:3,5:3,6:3>> =
+ parse_and_eval("<<2:3,3:3,3:3,4:3,4:3,5:3,5:3,6:3>> =
+ << <<(X+Y):3>> || X <- [1,2,3,4], Y <- [1,2] >>."),
+ [2,3,3,4,4,5,5,6] =
+ parse_and_eval("[2,3,3,4,4,5,5,6] =
+ [(X+Y) || <<X:3>> <= <<1:3,2:3,3:3,4:3>>, <<Y:3>> <= <<1:3,2:3>>]."),
+ [2,3,3,4,4,5,5,6] =
+ parse_and_eval("[2,3,3,4,4,5,5,6] =
+ [(X+Y) || <<X:3>> <= <<1:3,2:3,3:3,4:3>>, Y <- [1,2]]."),
+ ok.
diff --git a/lib/hipe/test/bs_SUITE_data/bs_split.erl b/lib/hipe/test/bs_SUITE_data/bs_split.erl
new file mode 100644
index 0000000000..2e52308a77
--- /dev/null
+++ b/lib/hipe/test/bs_SUITE_data/bs_split.erl
@@ -0,0 +1,105 @@
+%% -*- erlang-indent-level: 2 -*-
+%%--------------------------------------------------------------------
+
+-module(bs_split).
+
+-export([test/0]).
+
+test() ->
+ Funs = [fun byte_split_binary/0, fun bit_split_binary/0, fun z_split/0],
+ lists:foreach(fun (F) -> ok = F() end, Funs).
+
+%%--------------------------------------------------------------------
+
+byte_split_binary() ->
+ L = lists:seq(0, 57),
+ B = mkbin(L),
+ byte_split(L, B, byte_size(B)).
+
+byte_split(L, B, Pos) when Pos >= 0 ->
+ Sz1 = Pos,
+ Sz2 = byte_size(B) - Pos,
+ bs1(L, B, Pos, Sz1, Sz2);
+byte_split(_, _, _) -> ok.
+
+bs1(L, B, Pos, Sz1, Sz2) ->
+ <<B1:Sz1/binary, B2:Sz2/binary>> = B,
+ bs2(L, B, Pos, B1, B2).
+
+bs2(L, B, Pos, B1, B2)->
+ B1 = list_to_binary(lists:sublist(L, 1, Pos)),
+ bs3(L, B, Pos, B2).
+
+bs3(L, B, Pos, B2) ->
+ B2 = list_to_binary(lists:nthtail(Pos, L)),
+ byte_split(L, B, Pos-1).
+
+%%--------------------------------------------------------------------
+
+bit_split_binary() ->
+ Fun = fun(Bin, List, SkipBef, N) ->
+ SkipAft = bit_size(Bin) - N - SkipBef,
+ %% io:format("~p, ~p, ~p", [SkipBef,N,SkipAft]),
+ <<_I1:SkipBef,OutBin:N/binary-unit:1,_I2:SkipAft>> = Bin,
+ OutBin = make_bin_from_list(List, N)
+ end,
+ bit_split_binary1(Fun, erlang:md5(<<1,2,3>>)).
+
+bit_split_binary1(Action, Bin) ->
+ BitList = bits_to_list(binary_to_list(Bin), 16#80),
+ bit_split_binary2(Action, Bin, BitList, 0).
+
+bit_split_binary2(Action, Bin, [_|T]=List, Bef) ->
+ bit_split_binary3(Action, Bin, List, Bef, bit_size(Bin)),
+ bit_split_binary2(Action, Bin, T, Bef+1);
+bit_split_binary2(_Action, _Bin, [], _Bef) -> ok.
+
+bit_split_binary3(Action, Bin, List, Bef, Aft) when Bef =< Aft ->
+ Action(Bin, List, Bef, (Aft-Bef) div 8 * 8),
+ bit_split_binary3(Action, Bin, List, Bef, Aft-8);
+bit_split_binary3(_, _, _, _, _) -> ok.
+
+make_bin_from_list(_List, 0) ->
+ mkbin([]);
+make_bin_from_list(List, N) ->
+ list_to_binary([make_int(List, 8, 0),
+ make_bin_from_list(lists:nthtail(8, List), N-8)]).
+
+make_int(_List, 0, Acc) -> Acc;
+make_int([H|T], N, Acc) -> make_int(T, N-1, Acc bsl 1 bor H).
+
+bits_to_list([_|T], 0) -> bits_to_list(T, 16#80);
+bits_to_list([H|_]=List, Mask) ->
+ [case H band Mask of
+ 0 -> 0;
+ _ -> 1
+ end|bits_to_list(List, Mask bsr 1)];
+bits_to_list([], _) -> [].
+
+mkbin(L) when is_list(L) -> list_to_binary(L).
+
+%%--------------------------------------------------------------------
+%% Splits a series of null terminated segments of a binary without
+%% creating any new sub-binaries until the zero is found.
+
+z_split() ->
+ [<<61,62,63>>] = z_split(<<61,62,63>>),
+ [<<61,62,63>>, <<>>] = z_split(<<61,62,63,0>>),
+ [<<61,62,63>>, <<64>>] = z_split(<<61,62,63,0,64>>),
+ [<<61,62,63>>, <<64,65,66>>] = z_split(<<61,62,63,0,64,65,66>>),
+ [<<61,62>>, <<64>>, <<>>, <<65,66>>] = z_split(<<61,62,0,64,0,0,65,66>>),
+ ok.
+
+z_split(B) when is_binary(B) ->
+ z_split(B, 0).
+
+z_split(B, N) ->
+ case B of
+ <<_B1:N/binary,0,_B2/binary>> -> % use skip_bits for B1, B2
+ <<B1:N/binary,_,B2/binary>> = B, % and postpone the matching
+ [B1 | z_split(B2)];
+ <<_:N/binary>> ->
+ [B];
+ _ ->
+ z_split(B, N+1)
+ end.
diff --git a/lib/hipe/test/bs_SUITE_data/bs_system_limit_32.erl b/lib/hipe/test/bs_SUITE_data/bs_system_limit_32.erl
new file mode 100644
index 0000000000..eccb0083bd
--- /dev/null
+++ b/lib/hipe/test/bs_SUITE_data/bs_system_limit_32.erl
@@ -0,0 +1,26 @@
+%%% -*- erlang-indent-level: 2 -*-
+%%%-------------------------------------------------------------------
+%%% File : bs_system_limit_32.erl
+%%% Author : Per Gustafsson <[email protected]>
+%%% Purpose : Checks binary system limits on 32-bit machines
+%%% Created : 14 May 2008
+%%%-------------------------------------------------------------------
+-module(bs_system_limit_32).
+
+-export([test/0]).
+
+test() ->
+ case erlang:system_info(wordsize) of
+ 4 -> system_limit_32();
+ 8 -> ok
+ end.
+
+system_limit_32() ->
+ {'EXIT', {badarg, _}} = (catch <<42:(id(-1))>>),
+ {'EXIT', {badarg, _}} = (catch <<42:(id(-389739873536870912))/unit:8>>),
+ {'EXIT', {system_limit, _}} = (catch <<32:536870912/unit:8>>),
+ {'EXIT', {system_limit, _}} = (catch <<42:(id(536870912))/unit:8>>),
+ {'EXIT', {system_limit, _}} = (catch <<42:(id(536870912))/unit:8,1:1>>),
+ ok.
+
+id(X) -> X.
diff --git a/lib/hipe/test/bs_SUITE_data/bs_utf.erl b/lib/hipe/test/bs_SUITE_data/bs_utf.erl
new file mode 100644
index 0000000000..f50ae08964
--- /dev/null
+++ b/lib/hipe/test/bs_SUITE_data/bs_utf.erl
@@ -0,0 +1,18 @@
+%% -*- erlang-indent-level: 2 -*-
+%%-------------------------------------------------------------------
+%% Purpose: test support for UTF datatypes in binaries - INCOMPLETE
+%%-------------------------------------------------------------------
+
+-module(bs_utf).
+
+-export([test/0]).
+
+test() ->
+ <<65>> = b65utf8(),
+ ok = m(<<65>>).
+
+m(<<65/utf8>>) ->
+ ok.
+
+b65utf8() ->
+ <<65/utf8>>.
diff --git a/lib/hipe/test/bs_SUITE_data/bs_var_segs.erl b/lib/hipe/test/bs_SUITE_data/bs_var_segs.erl
new file mode 100644
index 0000000000..a20df04b53
--- /dev/null
+++ b/lib/hipe/test/bs_SUITE_data/bs_var_segs.erl
@@ -0,0 +1,76 @@
+%% -*- erlang-indent-level: 2 -*-
+%%--------------------------------------------------------------------
+%% Author : Kostis Sagonas
+%% Purpose : These tests are intended to test the construction and
+%% matching of binaries using variable sizes
+%% Notes :
+%% - Added test that crashed BEAM compiler
+%% - Added test that crashed when segments of size zero were used
+%% and one that did not convert integers to floats when constructing
+%% binaries.
+%% - Added a construction test which crashed from core because of
+%% problems with the effect flag (2004/11/15)
+%%--------------------------------------------------------------------
+-module(bs_var_segs).
+
+-export([test/0]).
+
+test() ->
+ N1 = 18,
+ A1 = 2,
+ A1 = match1(N1, <<1:12, 2:N1, A1:2>>),
+ A1 = match2(N1, <<1:12, 2:N1/integer-little, A1:2>>),
+ N3 = 3,
+ A3 = <<1,2,3>>,
+ B3 = 2,
+ {A3, B3} = match3(N3, <<1:12, A3:N3/binary, B3:4>>),
+ N4 = 12,
+ B4 = <<1,2,3>>,
+ A4 = 2,
+ {A4, B4} = match4(N4, <<1:N4, A4:4, B4/binary>>),
+ Y = <<5>>,
+ Y = match5(a, Y),
+ <<73>> = gen1(8, 0, <<73>>),
+ <<171>> = gen2(8, 7, 2#10101010101010101),
+ <<0:64>> = construct(),
+ <<0:32>> = construct2(0),
+ ok = in_guard(<<16#BCD:14,3:2>>, 16#BCD),
+ ok.
+
+construct() ->
+ <<0:64/float>>.
+
+construct2(X) ->
+ <<X:32/little>>.
+
+match1(N, Bin) ->
+ <<1:12, 2:N, A:2>>=Bin,
+ A.
+
+match2(N, Bin) ->
+ <<1:12, 2:N/integer-little, A:2>>=Bin,
+ A.
+
+match3(N, Bin) ->
+ <<1:12, A:N/binary, B:4>>=Bin,
+ {A,B}.
+
+match4(N, Bin) ->
+ <<1:N, A:4, B/binary>>=Bin,
+ {A,B}.
+
+match5(X, Y) ->
+ case X of
+ a ->
+ Y2 = 8
+ end,
+ <<5:Y2>> = Y.
+
+gen1(N, S, A) ->
+ <<A:S/binary-unit:1, A:(N-S)/binary-unit:1>>.
+
+gen2(N, S, A) ->
+ <<A:S/little, A:(N-S)/little>>.
+
+in_guard(Bin, A) when <<A:14,3:2>> == Bin -> ok;
+in_guard(_, _) -> no.
diff --git a/lib/hipe/test/hipe.spec b/lib/hipe/test/hipe.spec
new file mode 100644
index 0000000000..2894f40354
--- /dev/null
+++ b/lib/hipe/test/hipe.spec
@@ -0,0 +1,6 @@
+%% -*- erlang -*-
+
+{alias, tests, "../hipe_test"}.
+
+{suites, tests, all}.
+
diff --git a/lib/hipe/test/hipe_SUITE.erl b/lib/hipe/test/hipe_SUITE.erl
new file mode 100644
index 0000000000..554bc972f6
--- /dev/null
+++ b/lib/hipe/test/hipe_SUITE.erl
@@ -0,0 +1,55 @@
+%% ``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 via the world wide web 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.
+%%
+%% The Initial Developer of the Original Code is Ericsson Utvecklings AB.
+%% Portions created by Ericsson are Copyright 1999, Ericsson Utvecklings
+%% AB. All Rights Reserved.''
+%%
+-module(hipe_SUITE).
+
+-compile([export_all]).
+-include_lib("common_test/include/ct.hrl").
+
+suite() ->
+ [{ct_hooks, [ts_install_cth]}].
+
+all() ->
+ [app, appup].
+
+groups() ->
+ [].
+
+init_per_suite(Config) ->
+ case erlang:system_info(hipe_architecture) of
+ undefined -> {skip, "HiPE not available or enabled"};
+ _ -> Config
+ end.
+
+end_per_suite(_Config) ->
+ ok.
+
+init_per_group(_GroupName, Config) ->
+ Config.
+
+end_per_group(_GroupName, Config) ->
+ Config.
+
+app() ->
+ [{doc, "Test that the hipe app file is ok"}].
+app(Config) when is_list(Config) ->
+ ok = ?t:app_test(hipe, tolerant).
+
+appup() ->
+ [{doc, "Test that the hipe appup file is ok"}].
+appup(Config) when is_list(Config) ->
+ AppupFile = "hipe.appup",
+ AppupPath = filename:join([code:lib_dir(hipe), "ebin", AppupFile]),
+ {ok, [{_Vsn, [], []}]} = file:consult(AppupPath).
diff --git a/lib/hipe/test/hipe_testsuite_driver.erl b/lib/hipe/test/hipe_testsuite_driver.erl
new file mode 100644
index 0000000000..5f05a716bc
--- /dev/null
+++ b/lib/hipe/test/hipe_testsuite_driver.erl
@@ -0,0 +1,201 @@
+-module(hipe_testsuite_driver).
+
+-export([create_all_suites/0, run/3]).
+
+-include_lib("kernel/include/file.hrl").
+
+-type testcase() :: atom().
+-type file_type() :: 'device' | 'directory' | 'regular' | 'other'.
+-type ext_posix() :: file:posix() | 'badarg'.
+
+-define(suite_suffix, "_SUITE").
+-define(data_folder, "_data").
+-define(suite_data, ?suite_suffix ++ ?data_folder).
+
+-record(suite, {suitename :: string(),
+ outputfile :: file:io_device(),
+ testcases :: [testcase()]}).
+
+-spec create_all_suites() -> 'ok'.
+
+create_all_suites() ->
+ {ok, Cwd} = file:get_cwd(),
+ Suites = get_suites(Cwd),
+ lists:foreach(fun create_suite/1, Suites).
+
+-spec get_suites(file:filename()) -> [string()].
+
+get_suites(Dir) ->
+ case file:list_dir(Dir) of
+ {error, _} -> [];
+ {ok, Filenames} ->
+ FullFilenames = [filename:join(Dir, F) || F <- Filenames],
+ Dirs = [suffix(filename:basename(F), ?suite_data) ||
+ F <- FullFilenames,
+ file_type(F) =:= {ok, 'directory'}],
+ [S || {yes, S} <- Dirs]
+ end.
+
+suffix(String, Suffix) ->
+ case string:rstr(String, Suffix) of
+ 0 -> no;
+ Index ->
+ case string:substr(String, Index) =:= Suffix of
+ true -> {yes, string:sub_string(String, 1, Index-1)};
+ false -> no
+ end
+ end.
+
+-spec file_type(file:filename()) -> {ok, file_type()} | {error, ext_posix()}.
+
+file_type(Filename) ->
+ case file:read_file_info(Filename) of
+ {ok, FI} -> {ok, FI#file_info.type};
+ Error -> Error
+ end.
+
+-spec create_suite(string()) -> 'ok'.
+
+create_suite(SuiteName) ->
+ {ok, Cwd} = file:get_cwd(),
+ SuiteDirN = filename:join(Cwd, SuiteName ++ ?suite_data),
+ OutputFile = generate_suite_file(Cwd, SuiteName),
+ generate_suite(SuiteName, OutputFile, SuiteDirN).
+
+generate_suite_file(Cwd, SuiteName) ->
+ F = filename:join(Cwd, SuiteName ++ ?suite_suffix ++ ".erl"),
+ case file:open(F, [write]) of
+ {ok, IoDevice} -> IoDevice;
+ {error, _} = E -> exit({E, F})
+ end.
+
+generate_suite(SuiteName, OutputFile, SuiteDirN) ->
+ TestCases = list_testcases(SuiteDirN),
+ Suite = #suite{suitename = SuiteName, outputfile = OutputFile,
+ testcases = TestCases},
+ write_suite(Suite),
+ file:close(OutputFile).
+
+list_testcases(Dirname) ->
+ {ok, Files} = list_dir(Dirname, ".erl", true),
+ [list_to_atom(filename:basename(F, ".erl")) || F <- Files].
+
+-spec list_dir(file:filename(), string(), boolean()) ->
+ {error, ext_posix()} | {ok, [file:filename()]}.
+
+list_dir(Dir, Extension, Dirs) ->
+ case file:list_dir(Dir) of
+ {error, _} = Error -> Error;
+ {ok, Filenames} ->
+ FullFilenames = [filename:join(Dir, F) || F <- Filenames],
+ Matches1 = case Dirs of
+ true ->
+ [F || F <- FullFilenames,
+ file_type(F) =:= {ok, 'directory'}];
+ false -> []
+ end,
+ Matches2 = [F || F <- FullFilenames,
+ file_type(F) =:= {ok, 'regular'},
+ filename:extension(F) =:= Extension],
+ {ok, lists:sort(Matches1 ++ Matches2)}
+ end.
+
+write_suite(Suite) ->
+ write_header(Suite),
+ write_testcases(Suite).
+
+write_header(#suite{suitename = SuiteName, outputfile = OutputFile,
+ testcases = TestCases}) ->
+ Exports = format_export(TestCases),
+ TimeLimit = 2, %% with 1 it fails on some slow machines...
+ io:format(OutputFile,
+ "%% ATTENTION!\n"
+ "%% This is an automatically generated file. Do not edit.\n\n"
+ "-module(~s).\n\n"
+ "-export([suite/0, init_per_suite/0, init_per_suite/1,\n"
+ " end_per_suite/1, all/0]).\n"
+ "~s\n\n"
+ "-include_lib(\"common_test/include/ct.hrl\").\n\n"
+ "suite() ->\n"
+ " [{timetrap, {minutes, ~w}}].\n\n"
+ "init_per_suite() ->\n"
+ " [].\n\n"
+ "init_per_suite(Config) ->\n"
+ " case erlang:system_info(hipe_architecture) of\n"
+ " undefined -> {skip, \"HiPE not available or enabled\"};\n"
+ " _ -> Config\n"
+ " end.\n\n"
+ "end_per_suite(_Config) ->\n"
+ " ok.\n\n"
+ "all() ->\n"
+ " ~p.\n\n"
+ "test(Config, TestCase) ->\n"
+ " Dir = ?config(data_dir, Config),\n"
+ " OutDir = ?config(priv_dir, Config),\n"
+ " hipe_testsuite_driver:run(TestCase, Dir, OutDir)."
+ "\n\n",
+ [SuiteName ++ ?suite_suffix, Exports, TimeLimit, TestCases]).
+
+format_export(TestCases) ->
+ TL = [list_to_atom(atom_to_list(N)++"/1") || N <- TestCases],
+ TestCaseString = io_lib:format("-export(~p).", [TL]),
+ strip_quotes(lists:flatten(TestCaseString), []).
+
+strip_quotes([], Result) ->
+ lists:reverse(Result);
+strip_quotes([$' |Rest], Result) ->
+ strip_quotes(Rest, Result);
+strip_quotes([$\, |Rest], Result) ->
+ strip_quotes(Rest, [$\ , $\, |Result]);
+strip_quotes([C|Rest], Result) ->
+ strip_quotes(Rest, [C|Result]).
+
+write_testcases(#suite{outputfile = OutputFile, testcases = TestCases}) ->
+ lists:foreach(fun (T) -> write_testcase(OutputFile, T) end, TestCases).
+
+write_testcase(OutputFile, TestCase) ->
+ io:format(OutputFile,
+ "~p(Config) ->\n"
+ " test(Config, ~p).\n\n",
+ [TestCase, TestCase]).
+
+-spec run(atom(), string(), string()) -> 'ok'.
+
+run(TestCase, Dir, _OutDir) ->
+ F = filename:join(Dir, atom_to_list(TestCase) ++ ".erl"),
+ {ok, TestCase} = compile:file(F),
+ ok = try TestCase:prepare_for_test() catch _:_ -> ok end,
+ %% DataFiles = try TestCase:datafiles() catch _:_ -> [] end,
+ %% lists:foreach(fun (DF) ->
+ %% Src = filename:join(Dir, DF),
+ %% Dst = filename:join(OutDir, DF),
+ %% {ok, _} = file:copy(Src, Dst)
+ %% end, DataFiles),
+ %% try
+ ok = TestCase:test(),
+ HiPEOpts = try TestCase:hipe_options() catch error:undef -> [] end,
+ {ok, TestCase} = hipe:c(TestCase, HiPEOpts),
+ ok = TestCase:test(),
+ case is_llvm_opt_available() of
+ true ->
+ {ok, TestCase} = hipe:c(TestCase, [to_llvm|HiPEOpts]),
+ ok = TestCase:test();
+ false -> ok
+ end.
+ %% after
+ %% lists:foreach(fun (DF) -> ok end, % = file:delete(DF) end,
+ %% [filename:join(OutDir, D) || D <- DataFiles])
+ %% end.
+
+
+%% This function, which is supposed to check whether the right LLVM
+%% infrastructure is available, should be probably written in a better
+%% and more portable way and moved to the hipe application.
+
+is_llvm_opt_available() ->
+ OptStr = os:cmd("opt -version"),
+ SubStr = "LLVM version ", N = length(SubStr),
+ case string:str(OptStr, SubStr) of
+ 0 -> false;
+ S -> P = S + N, string:sub_string(OptStr, P, P + 2) >= "3.4"
+ end.
diff --git a/lib/hipe/test/maps_SUITE_data/maps_build_and_match_aliasing.erl b/lib/hipe/test/maps_SUITE_data/maps_build_and_match_aliasing.erl
new file mode 100644
index 0000000000..14d8320cdf
--- /dev/null
+++ b/lib/hipe/test/maps_SUITE_data/maps_build_and_match_aliasing.erl
@@ -0,0 +1,20 @@
+-module(maps_build_and_match_aliasing).
+-export([test/0]).
+
+test() ->
+ M1 = id(#{a=>1,b=>2,c=>3,d=>4}),
+ #{c:=C1=_=_=C2} = M1,
+ true = C1 =:= C2,
+ #{a:=A,a:=A,a:=A,b:=B,b:=B} = M1,
+ #{a:=A,a:=A,a:=A,b:=B,b:=B,b:=2} = M1,
+ #{a:=A=1,a:=A,a:=A,b:=B=2,b:=B,b:=2} = M1,
+ #{c:=C1, c:=_, c:=3, c:=_, c:=C2} = M1,
+ #{c:=C=_=3=_=C} = M1,
+
+ M2 = id(#{"a"=>1,"b"=>2,"c"=>3,"d"=>4}),
+ #{"a":=A2,"a":=A2,"a":=A2,"b":=B2,"b":=B2,"b":=2} = M2,
+ #{"a":=_,"a":=_,"a":=_,"b":=_,"b":=_,"b":=2} = M2,
+ ok.
+
+%% Use this function to avoid compile-time evaluation of an expression.
+id(I) -> I.
diff --git a/lib/hipe/test/maps_SUITE_data/maps_build_and_match_empty_val.erl b/lib/hipe/test/maps_SUITE_data/maps_build_and_match_empty_val.erl
new file mode 100644
index 0000000000..2abfa4e5b3
--- /dev/null
+++ b/lib/hipe/test/maps_SUITE_data/maps_build_and_match_empty_val.erl
@@ -0,0 +1,17 @@
+-module(maps_build_and_match_empty_val).
+-export([test/0]).
+
+test() ->
+ F = fun(#{ "hi":=_,{1,2}:=_,1337:=_}) -> ok end,
+ ok = F(id(#{"hi"=>ok,{1,2}=>ok,1337=>ok})),
+
+ %% error case
+ case (catch (F(id(#{"hi"=>ok})))) of
+ {'EXIT',{function_clause,_}} -> ok;
+ {'EXIT', {{case_clause,_},_}} -> {comment,inlined};
+ Other ->
+ test_server:fail({no_match, Other})
+ end.
+
+%% Use this function to avoid compile-time evaluation of an expression.
+id(I) -> I.
diff --git a/lib/hipe/test/maps_SUITE_data/maps_build_and_match_literals.erl b/lib/hipe/test/maps_SUITE_data/maps_build_and_match_literals.erl
new file mode 100644
index 0000000000..dc2c63fab2
--- /dev/null
+++ b/lib/hipe/test/maps_SUITE_data/maps_build_and_match_literals.erl
@@ -0,0 +1,40 @@
+-module(maps_build_and_match_literals).
+-export([test/0]).
+
+test() ->
+ #{} = id(#{}),
+ #{1:=a} = id(#{1=>a}),
+ #{1:=a,2:=b} = id(#{1=>a,2=>b}),
+ #{1:=a,2:=b,3:="c"} = id(#{1=>a,2=>b,3=>"c"}),
+ #{1:=a,2:=b,3:="c","4":="d"} = id(#{1=>a,2=>b,3=>"c","4"=>"d"}),
+ #{1:=a,2:=b,3:="c","4":="d",<<"5">>:=<<"e">>} =
+ id(#{1=>a,2=>b,3=>"c","4"=>"d",<<"5">>=><<"e">>}),
+ #{1:=a,2:=b,3:="c","4":="d",<<"5">>:=<<"e">>,{"6",7}:="f"} =
+ id(#{1=>a,2=>b,3=>"c","4"=>"d",<<"5">>=><<"e">>,{"6",7}=>"f"}),
+ #{1:=a,2:=b,3:="c","4":="d",<<"5">>:=<<"e">>,{"6",7}:="f",8:=g} =
+ id(#{1=>a,2=>b,3=>"c","4"=>"d",<<"5">>=><<"e">>,{"6",7}=>"f",8=>g}),
+
+ #{<<"hi all">> := 1} = id(#{<<"hi",32,"all">> => 1}),
+
+ #{a:=X,a:=X=3,b:=4} = id(#{a=>3,b=>4}), % weird but ok =)
+
+ #{ a:=#{ b:=#{c := third, b:=second}}, b:=first} =
+ id(#{ b=>first, a=>#{ b=>#{c => third, b=> second}}}),
+
+ M = #{ map_1=>#{ map_2=>#{value_3 => third}, value_2=> second}, value_1=>first},
+ M = #{ map_1:=#{ map_2:=#{value_3 := third}, value_2:= second}, value_1:=first} =
+ id(#{ map_1=>#{ map_2=>#{value_3 => third}, value_2=> second}, value_1=>first}),
+
+ %% nil key
+ #{[]:=ok,1:=2} = id(#{[]=>ok,1=>2}),
+
+ %% error case
+ {'EXIT',{{badmatch,_},_}} = (catch (#{x:=3,x:=2} = id(#{x=>3}))),
+ {'EXIT',{{badmatch,_},_}} = (catch (#{x:=2} = id(#{x=>3}))),
+ {'EXIT',{{badmatch,_},_}} = (catch (#{x:=3} = id({a,b,c}))),
+ {'EXIT',{{badmatch,_},_}} = (catch (#{x:=3} = id(#{y=>3}))),
+ {'EXIT',{{badmatch,_},_}} = (catch (#{x:=3} = id(#{x=>"three"}))),
+ ok.
+
+%% Use this function to avoid compile-time evaluation of an expression.
+id(I) -> I.
diff --git a/lib/hipe/test/maps_SUITE_data/maps_build_and_match_over_alloc.erl b/lib/hipe/test/maps_SUITE_data/maps_build_and_match_over_alloc.erl
new file mode 100644
index 0000000000..dae6f64e5f
--- /dev/null
+++ b/lib/hipe/test/maps_SUITE_data/maps_build_and_match_over_alloc.erl
@@ -0,0 +1,16 @@
+-module(maps_build_and_match_over_alloc).
+-export([test/0]).
+
+test() ->
+ Ls = id([1,2,3]),
+ V0 = [a|Ls],
+ M0 = id(#{ "a" => V0 }),
+ #{ "a" := V1 } = M0,
+ V2 = id([c|Ls]),
+ M2 = id(#{ "a" => V2 }),
+ #{ "a" := V3 } = M2,
+ {[a,1,2,3],[c,1,2,3]} = id({V1,V3}),
+ ok.
+
+%% Use this function to avoid compile-time evaluation of an expression.
+id(I) -> I.
diff --git a/lib/hipe/test/maps_SUITE_data/maps_build_and_match_val.erl b/lib/hipe/test/maps_SUITE_data/maps_build_and_match_val.erl
new file mode 100644
index 0000000000..284f69e06c
--- /dev/null
+++ b/lib/hipe/test/maps_SUITE_data/maps_build_and_match_val.erl
@@ -0,0 +1,23 @@
+-module(maps_build_and_match_val).
+-export([test/0]).
+
+test() ->
+ F = fun
+ (#{ "hi" := first, v := V}) -> {1,V};
+ (#{ "hi" := second, v := V}) -> {2,V}
+ end,
+
+
+ {1,"hello"} = F(id(#{"hi"=>first,v=>"hello"})),
+ {2,"second"} = F(id(#{"hi"=>second,v=>"second"})),
+
+ %% error case
+ case (catch (F(id(#{"hi"=>ok})))) of
+ {'EXIT',{function_clause,_}} -> ok;
+ {'EXIT', {{case_clause,_},_}} -> {comment,inlined};
+ Other ->
+ test_server:fail({no_match, Other})
+ end.
+
+%% Use this function to avoid compile-time evaluation of an expression.
+id(I) -> I.
diff --git a/lib/hipe/test/maps_SUITE_data/maps_expand_map_update.erl b/lib/hipe/test/maps_SUITE_data/maps_expand_map_update.erl
new file mode 100644
index 0000000000..df0f77ea47
--- /dev/null
+++ b/lib/hipe/test/maps_SUITE_data/maps_expand_map_update.erl
@@ -0,0 +1,7 @@
+-module(maps_expand_map_update).
+-export([test/0]).
+
+test() ->
+ M = #{<<"hello">> => <<"world">>}#{<<"hello">> := <<"les gens">>},
+ #{<<"hello">> := <<"les gens">>} = M,
+ ok.
diff --git a/lib/hipe/test/maps_SUITE_data/maps_export.erl b/lib/hipe/test/maps_SUITE_data/maps_export.erl
new file mode 100644
index 0000000000..4d43fc96ed
--- /dev/null
+++ b/lib/hipe/test/maps_SUITE_data/maps_export.erl
@@ -0,0 +1,11 @@
+-module(maps_export).
+-export([test/0]).
+
+test() ->
+ Raclette = id(#{}),
+ case brie of brie -> Fromage = Raclette end,
+ Raclette = Fromage#{},
+ ok.
+
+%% Use this function to avoid compile-time evaluation of an expression.
+id(I) -> I.
diff --git a/lib/hipe/test/maps_SUITE_data/maps_get_map_elements.erl b/lib/hipe/test/maps_SUITE_data/maps_get_map_elements.erl
new file mode 100644
index 0000000000..b2d749796a
--- /dev/null
+++ b/lib/hipe/test/maps_SUITE_data/maps_get_map_elements.erl
@@ -0,0 +1,23 @@
+%% -*- erlang-indent-level: 2 -*-
+%%-------------------------------------------------------------------------
+-module(maps_get_map_elements).
+
+-export([test/0]).
+
+test() ->
+ {A, B} = id({"hej", <<123>>}),
+ Map = maps:from_list([{a, A}, {b, B}]),
+ #{a := A, b := B} = id(Map),
+ false = test_pattern(Map),
+ true = test_pattern(#{b => 1, a => "hej"}),
+ case Map of
+ #{a := C, b := <<124>>} -> yay;
+ _ -> C = B, nay
+ end,
+ C = id(B),
+ ok.
+
+id(X) -> X.
+
+test_pattern(#{a := _, b := 1}) -> true;
+test_pattern(#{}) -> false.
diff --git a/lib/hipe/test/maps_SUITE_data/maps_guard_bifs.erl b/lib/hipe/test/maps_SUITE_data/maps_guard_bifs.erl
new file mode 100644
index 0000000000..61a0eaa1e7
--- /dev/null
+++ b/lib/hipe/test/maps_SUITE_data/maps_guard_bifs.erl
@@ -0,0 +1,31 @@
+-module(maps_guard_bifs).
+-export([test/0]).
+
+test() ->
+ true = map_guard_empty(),
+ true = map_guard_empty_2(),
+ true = map_guard_head(#{a=>1}),
+ false = map_guard_head([]),
+ true = map_guard_body(#{a=>1}),
+ false = map_guard_body({}),
+ true = map_guard_pattern(#{a=>1, <<"hi">> => "hi" }),
+ false = map_guard_pattern("list"),
+ true = map_guard_tautology(),
+ true = map_guard_ill_map_size(),
+ ok.
+
+map_guard_empty() when is_map(#{}); false -> true.
+
+map_guard_empty_2() when true; #{} andalso false -> true.
+
+map_guard_head(M) when is_map(M) -> true;
+map_guard_head(_) -> false.
+
+map_guard_body(M) -> is_map(M).
+
+map_guard_pattern(#{}) -> true;
+map_guard_pattern(_) -> false.
+
+map_guard_tautology() when #{} =:= #{}; true -> true.
+
+map_guard_ill_map_size() when true; map_size(0) -> true.
diff --git a/lib/hipe/test/maps_SUITE_data/maps_guard_fun.erl b/lib/hipe/test/maps_SUITE_data/maps_guard_fun.erl
new file mode 100644
index 0000000000..9f6eb3a04e
--- /dev/null
+++ b/lib/hipe/test/maps_SUITE_data/maps_guard_fun.erl
@@ -0,0 +1,36 @@
+-module(maps_guard_fun).
+-export([test/0]).
+
+test() ->
+ F1 = fun
+ (#{s:=v,v:=V}) -> {v,V};
+ (#{s:=t,v:={V,V}}) -> {t,V};
+ (#{s:=l,v:=[V,V]}) -> {l,V}
+ end,
+
+ F2 = fun
+ (#{s:=T,v:={V,V}}) -> {T,V};
+ (#{s:=T,v:=[V,V]}) -> {T,V};
+ (#{s:=T,v:=V}) -> {T,V}
+ end,
+ V = <<"hi">>,
+
+ {v,V} = F1(#{s=>v,v=>V}),
+ {t,V} = F1(#{s=>t,v=>{V,V}}),
+ {l,V} = F1(#{s=>l,v=>[V,V]}),
+
+ {v,V} = F2(#{s=>v,v=>V}),
+ {t,V} = F2(#{s=>t,v=>{V,V}}),
+ {l,V} = F2(#{s=>l,v=>[V,V]}),
+
+ %% error case
+ case (catch F1(#{s=>none,v=>none})) of
+ {'EXIT', {function_clause,[{?MODULE,_,[#{s:=none,v:=none}],_}|_]}} -> ok;
+ {'EXIT', {function_clause,[{?MODULE,_,1,[#{s:=none,v:=none}]}|_]}} -> ok;
+ {'EXIT', {function_clause,[Frame|_]}}
+ when is_tuple(Frame), element(1, Frame) =:= ?MODULE ->
+ test_server:comment("Unexpected trace format, probably using HiPE");
+ {'EXIT', {{case_clause,_},_}} -> {comment,inlined};
+ Other ->
+ test_server:fail({no_match, Other})
+ end.
diff --git a/lib/hipe/test/maps_SUITE_data/maps_guard_receive.erl b/lib/hipe/test/maps_SUITE_data/maps_guard_receive.erl
new file mode 100644
index 0000000000..f84ba19c86
--- /dev/null
+++ b/lib/hipe/test/maps_SUITE_data/maps_guard_receive.erl
@@ -0,0 +1,54 @@
+-module(maps_guard_receive).
+-export([test/0]).
+
+test() ->
+ M0 = #{ id => 0 },
+ Pid = spawn_link(fun() -> guard_receive_loop() end),
+ Big = 36893488147419103229,
+ B1 = <<"some text">>,
+ B2 = <<"was appended">>,
+ B3 = <<B1/binary, B2/binary>>,
+
+ #{id:=1, res:=Big} = M1 = call(Pid, M0#{op=>sub,in=>{1 bsl 65, 3}}),
+ #{id:=2, res:=26} = M2 = call(Pid, M1#{op=>idiv,in=>{53,2}}),
+ #{id:=3, res:=832} = M3 = call(Pid, M2#{op=>imul,in=>{26,32}}),
+ #{id:=4, res:=4} = M4 = call(Pid, M3#{op=>add,in=>{1,3}}),
+ #{id:=5, res:=Big} = M5 = call(Pid, M4#{op=>sub,in=>{1 bsl 65, 3}}),
+ #{id:=6, res:=B3} = M6 = call(Pid, M5#{op=>"append",in=>{B1,B2}}),
+ #{id:=7, res:=4} = _ = call(Pid, M6#{op=>add,in=>{1,3}}),
+
+
+ %% update old maps and check id update
+ #{id:=2, res:=B3} = call(Pid, M1#{op=>"append",in=>{B1,B2}}),
+ #{id:=5, res:=99} = call(Pid, M4#{op=>add,in=>{33, 66}}),
+
+ %% cleanup
+ done = call(Pid, done),
+ ok.
+
+call(Pid, M) ->
+ Pid ! {self(), M}, receive {Pid, Res} -> Res end.
+
+guard_receive_loop() ->
+ receive
+ {Pid, #{ id:=Id, op:="append", in:={X,Y}}=M} when is_binary(X), is_binary(Y) ->
+ Pid ! {self(), M#{ id=>Id+1, res=><<X/binary,Y/binary>>}},
+ guard_receive_loop();
+ {Pid, #{ id:=Id, op:=add, in:={X,Y}}} ->
+ Pid ! {self(), #{ id=>Id+1, res=>X+Y}},
+ guard_receive_loop();
+ {Pid, #{ id:=Id, op:=sub, in:={X,Y}}=M} ->
+ Pid ! {self(), M#{ id=>Id+1, res=>X-Y}},
+ guard_receive_loop();
+ {Pid, #{ id:=Id, op:=idiv, in:={X,Y}}=M} ->
+ Pid ! {self(), M#{ id=>Id+1, res=>X div Y}},
+ guard_receive_loop();
+ {Pid, #{ id:=Id, op:=imul, in:={X,Y}}=M} ->
+ Pid ! {self(), M#{ id=>Id+1, res=>X * Y}},
+ guard_receive_loop();
+ {Pid, done} ->
+ Pid ! {self(), done};
+ {Pid, Other} ->
+ Pid ! {error, Other},
+ guard_receive_loop()
+ end.
diff --git a/lib/hipe/test/maps_SUITE_data/maps_guard_sequence.erl b/lib/hipe/test/maps_SUITE_data/maps_guard_sequence.erl
new file mode 100644
index 0000000000..4eb18dcea1
--- /dev/null
+++ b/lib/hipe/test/maps_SUITE_data/maps_guard_sequence.erl
@@ -0,0 +1,35 @@
+-module(maps_guard_sequence).
+-export([test/0]).
+
+test() ->
+ {1, "a"} = map_guard_sequence_1(#{seq=>1,val=>id("a")}),
+ {2, "b"} = map_guard_sequence_1(#{seq=>2,val=>id("b")}),
+ {3, "c"} = map_guard_sequence_1(#{seq=>3,val=>id("c")}),
+ {4, "d"} = map_guard_sequence_1(#{seq=>4,val=>id("d")}),
+ {5, "e"} = map_guard_sequence_1(#{seq=>5,val=>id("e")}),
+
+ {1,M1} = map_guard_sequence_2(M1 = id(#{a=>3})),
+ {2,M2} = map_guard_sequence_2(M2 = id(#{a=>4, b=>4})),
+ {3,gg,M3} = map_guard_sequence_2(M3 = id(#{a=>gg, b=>4})),
+ {4,sc,sc,M4} = map_guard_sequence_2(M4 = id(#{a=>sc, b=>3, c=>sc2})),
+ {5,kk,kk,M5} = map_guard_sequence_2(M5 = id(#{a=>kk, b=>other, c=>sc2})),
+
+ %% error case
+ {'EXIT',{function_clause,_}} = (catch map_guard_sequence_1(#{seq=>6,val=>id("e")})),
+ {'EXIT',{function_clause,_}} = (catch map_guard_sequence_2(#{b=>5})),
+ ok.
+
+map_guard_sequence_1(#{seq:=1=Seq, val:=Val}) -> {Seq,Val};
+map_guard_sequence_1(#{seq:=2=Seq, val:=Val}) -> {Seq,Val};
+map_guard_sequence_1(#{seq:=3=Seq, val:=Val}) -> {Seq,Val};
+map_guard_sequence_1(#{seq:=4=Seq, val:=Val}) -> {Seq,Val};
+map_guard_sequence_1(#{seq:=5=Seq, val:=Val}) -> {Seq,Val}.
+
+map_guard_sequence_2(#{ a:=3 }=M) -> {1, M};
+map_guard_sequence_2(#{ a:=4 }=M) -> {2, M};
+map_guard_sequence_2(#{ a:=X, a:=X, b:=4 }=M) -> {3,X,M};
+map_guard_sequence_2(#{ a:=X, a:=Y, b:=3 }=M) when X =:= Y -> {4,X,Y,M};
+map_guard_sequence_2(#{ a:=X, a:=Y }=M) when X =:= Y -> {5,X,Y,M}.
+
+%% Use this function to avoid compile-time evaluation of an expression.
+id(I) -> I.
diff --git a/lib/hipe/test/maps_SUITE_data/maps_guard_update.erl b/lib/hipe/test/maps_SUITE_data/maps_guard_update.erl
new file mode 100644
index 0000000000..254c1c2984
--- /dev/null
+++ b/lib/hipe/test/maps_SUITE_data/maps_guard_update.erl
@@ -0,0 +1,14 @@
+-module(maps_guard_update).
+-export([test/0]).
+
+test() ->
+ error = map_guard_update(#{},#{}),
+ first = map_guard_update(#{}, #{x=>first}),
+ second = map_guard_update(#{y=>old}, #{x=>second,y=>old}),
+ third = map_guard_update(#{x=>old,y=>old}, #{x=>third,y=>old}),
+ ok.
+
+map_guard_update(M1, M2) when M1#{x=>first} =:= M2 -> first;
+map_guard_update(M1, M2) when M1#{x=>second} =:= M2 -> second;
+map_guard_update(M1, M2) when M1#{x:=third} =:= M2 -> third;
+map_guard_update(_, _) -> error.
diff --git a/lib/hipe/test/maps_SUITE_data/maps_has_map_fields.erl b/lib/hipe/test/maps_SUITE_data/maps_has_map_fields.erl
new file mode 100644
index 0000000000..61653aa519
--- /dev/null
+++ b/lib/hipe/test/maps_SUITE_data/maps_has_map_fields.erl
@@ -0,0 +1,46 @@
+%% -*- erlang-indent-level: 2 -*-
+%%-------------------------------------------------------------------------
+-module(maps_has_map_fields).
+
+-export([test/0]).
+
+test() ->
+ false = has_a_field(#{}),
+ false = has_a_field(#{b => 2}),
+ true = has_a_field(#{a => 3}),
+ true = has_a_field(#{b => c, a => false}),
+
+ false = has_a_b_field(#{a => true}),
+ false = has_a_b_field(#{b => a}),
+ true = has_a_b_field(#{a => 1, b => 2}),
+ true = has_a_b_field(#{b => 3, a => 4}),
+
+ false = has_binary_field(#{}),
+ false = has_binary_field(#{#{} => yay}),
+ true = has_binary_field(#{<<"true">> => false}),
+
+ false = has_binary_but_no_map_field(#{}),
+ false = has_map_but_no_binary_field(#{}),
+ false = has_binary_but_no_map_field(#{#{} => 1}),
+ false = has_map_but_no_binary_field(#{<<"true">> => true}),
+ true = has_binary_but_no_map_field(#{<<"true">> => false}),
+ true = has_map_but_no_binary_field(#{#{} => 1}),
+ false = has_binary_but_no_map_field(#{<<"true">> => true, #{} => 1}),
+ false = has_map_but_no_binary_field(#{<<"true">> => true, #{} => 1}),
+ ok.
+
+has_a_field(#{a := _}) -> true;
+has_a_field(#{}) -> false.
+
+has_a_b_field(#{a := _, b := _}) -> true;
+has_a_b_field(#{}) -> false.
+
+has_binary_field(#{<<"true">> := _}) -> true;
+has_binary_field(#{}) -> false.
+
+has_map_but_no_binary_field(#{<<"true">> := _}) -> false;
+has_map_but_no_binary_field(#{} = M) -> maps:is_key(#{}, M).
+
+has_binary_but_no_map_field(#{<<"true">> := _} = M) ->
+ not maps:is_key(#{}, M);
+has_binary_but_no_map_field(#{}) -> false.
diff --git a/lib/hipe/test/maps_SUITE_data/maps_is_map.erl b/lib/hipe/test/maps_SUITE_data/maps_is_map.erl
new file mode 100644
index 0000000000..e84f4b8c44
--- /dev/null
+++ b/lib/hipe/test/maps_SUITE_data/maps_is_map.erl
@@ -0,0 +1,24 @@
+%% -*- erlang-indent-level: 2 -*-
+%%-------------------------------------------------------------------------
+-module(maps_is_map).
+
+-export([test/0]).
+
+test() ->
+ true = test_is_map(#{}),
+ false = test_is_map(<<"hej">>),
+ true = test_is_map_guard(#{a => b}),
+ false = test_is_map_guard(3),
+ true = test_is_map_with_binary_guard(#{"a" => <<"b">>}),
+ false = test_is_map_with_binary_guard(12),
+ ok.
+
+test_is_map(X) ->
+ is_map(X).
+
+test_is_map_guard(Map) when is_map(Map) -> true;
+test_is_map_guard(_) -> false.
+
+test_is_map_with_binary_guard(B) when is_binary(B) -> false;
+test_is_map_with_binary_guard(#{}) -> true;
+test_is_map_with_binary_guard(_) -> false.
diff --git a/lib/hipe/test/maps_SUITE_data/maps_list_comprehension.erl b/lib/hipe/test/maps_SUITE_data/maps_list_comprehension.erl
new file mode 100644
index 0000000000..ad2c726d65
--- /dev/null
+++ b/lib/hipe/test/maps_SUITE_data/maps_list_comprehension.erl
@@ -0,0 +1,6 @@
+-module(maps_list_comprehension).
+-export([test/0]).
+
+test() ->
+ [#{k:=1},#{k:=2},#{k:=3}] = [#{k=>I} || I <- [1,2,3]],
+ ok.
diff --git a/lib/hipe/test/maps_SUITE_data/maps_map_size.erl b/lib/hipe/test/maps_SUITE_data/maps_map_size.erl
new file mode 100644
index 0000000000..25c8e5d4c7
--- /dev/null
+++ b/lib/hipe/test/maps_SUITE_data/maps_map_size.erl
@@ -0,0 +1,29 @@
+-module(maps_map_size).
+-export([test/0]).
+
+test() ->
+ 0 = map_size(id(#{})),
+ 1 = map_size(id(#{a=>1})),
+ 1 = map_size(id(#{a=>"wat"})),
+ 2 = map_size(id(#{a=>1, b=>2})),
+ 3 = map_size(id(#{a=>1, b=>2, b=>"3","33"=><<"n">>})),
+
+ true = map_is_size(#{a=>1}, 1),
+ true = map_is_size(#{a=>1, a=>2}, 1),
+ M = #{ "a" => 1, "b" => 2},
+ true = map_is_size(M, 2),
+ false = map_is_size(M, 3),
+ true = map_is_size(M#{ "a" => 2}, 2),
+ false = map_is_size(M#{ "c" => 2}, 2),
+
+ %% Error cases.
+ {'EXIT',{badarg,_}} = (catch map_size([])),
+ {'EXIT',{badarg,_}} = (catch map_size(<<1,2,3>>)),
+ {'EXIT',{badarg,_}} = (catch map_size(1)),
+ ok.
+
+map_is_size(M,N) when map_size(M) =:= N -> true;
+map_is_size(_,_) -> false.
+
+%% Use this function to avoid compile-time evaluation of an expression.
+id(I) -> I.
diff --git a/lib/hipe/test/maps_SUITE_data/maps_map_sort_literals.erl b/lib/hipe/test/maps_SUITE_data/maps_map_sort_literals.erl
new file mode 100644
index 0000000000..31abf15d49
--- /dev/null
+++ b/lib/hipe/test/maps_SUITE_data/maps_map_sort_literals.erl
@@ -0,0 +1,41 @@
+-module(maps_map_sort_literals).
+-export([test/0]).
+
+test() ->
+ % test relation
+
+ %% size order
+ true = #{ a => 1, b => 2} < id(#{ a => 1, b => 1, c => 1}),
+ true = #{ b => 1, a => 1} < id(#{ c => 1, a => 1, b => 1}),
+ false = #{ c => 1, b => 1, a => 1} < id(#{ c => 1, a => 1}),
+
+ %% key order
+ true = id(#{ a => 1 }) < id(#{ b => 1}),
+ false = id(#{ b => 1 }) < id(#{ a => 1}),
+ true = id(#{ a => 1, b => 1, c => 1 }) < id(#{ b => 1, c => 1, d => 1}),
+ true = id(#{ b => 1, c => 1, d => 1 }) > id(#{ a => 1, b => 1, c => 1}),
+ true = id(#{ c => 1, b => 1, a => 1 }) < id(#{ b => 1, c => 1, d => 1}),
+ true = id(#{ "a" => 1 }) < id(#{ <<"a">> => 1}),
+ false = id(#{ <<"a">> => 1 }) < id(#{ "a" => 1}),
+ false = id(#{ 1 => 1 }) < id(#{ 1.0 => 1}),
+ false = id(#{ 1.0 => 1 }) < id(#{ 1 => 1}),
+
+ %% value order
+ true = id(#{ a => 1 }) < id(#{ a => 2}),
+ false = id(#{ a => 2 }) < id(#{ a => 1}),
+ false = id(#{ a => 2, b => 1 }) < id(#{ a => 1, b => 3}),
+ true = id(#{ a => 1, b => 1 }) < id(#{ a => 1, b => 3}),
+
+ true = id(#{ "a" => "hi", b => 134 }) == id(#{ b => 134,"a" => "hi"}),
+
+ %% lists:sort
+
+ SortVs = [#{"a"=>1},#{a=>2},#{1=>3},#{<<"a">>=>4}],
+ [#{1:=ok},#{a:=ok},#{"a":=ok},#{<<"a">>:=ok}] = lists:sort([#{"a"=>ok},#{a=>ok},#{1=>ok},#{<<"a">>=>ok}]),
+ [#{1:=3},#{a:=2},#{"a":=1},#{<<"a">>:=4}] = lists:sort(SortVs),
+ [#{1:=3},#{a:=2},#{"a":=1},#{<<"a">>:=4}] = lists:sort(lists:reverse(SortVs)),
+
+ ok.
+
+%% Use this function to avoid compile-time evaluation of an expression.
+id(I) -> I.
diff --git a/lib/hipe/test/maps_SUITE_data/maps_match_and_update_literals.erl b/lib/hipe/test/maps_SUITE_data/maps_match_and_update_literals.erl
new file mode 100644
index 0000000000..29a6a29290
--- /dev/null
+++ b/lib/hipe/test/maps_SUITE_data/maps_match_and_update_literals.erl
@@ -0,0 +1,24 @@
+-module(maps_match_and_update_literals).
+-export([test/0]).
+
+test() ->
+ Map = #{x=>0,y=>"untouched",z=>"also untouched",q=>1},
+ #{x:=16,q:=21,y:="untouched",z:="also untouched"} = loop_match_and_update_literals_x_q(Map, [
+ {1,2},{3,4},{5,6},{7,8}
+ ]),
+ M0 = id(#{ "hi" => "hello", int => 3, <<"key">> => <<"value">>,
+ 4 => number, 18446744073709551629 => wat}),
+ M1 = id(#{}),
+ M2 = M1#{ "hi" => "hello", int => 3, <<"key">> => <<"value">>,
+ 4 => number, 18446744073709551629 => wat},
+ M0 = M2,
+
+ #{ 4 := another_number, int := 3 } = M2#{ 4 => another_number },
+ ok.
+
+loop_match_and_update_literals_x_q(Map, []) -> Map;
+loop_match_and_update_literals_x_q(#{q:=Q0,x:=X0} = Map, [{X,Q}|Vs]) ->
+ loop_match_and_update_literals_x_q(Map#{q=>Q0+Q,x=>X0+X},Vs).
+
+%% Use this function to avoid compile-time evaluation of an expression.
+id(I) -> I.
diff --git a/lib/hipe/test/maps_SUITE_data/maps_put_map_assoc.erl b/lib/hipe/test/maps_SUITE_data/maps_put_map_assoc.erl
new file mode 100644
index 0000000000..72ac9ce078
--- /dev/null
+++ b/lib/hipe/test/maps_SUITE_data/maps_put_map_assoc.erl
@@ -0,0 +1,23 @@
+%% -*- erlang-indent-level: 2 -*-
+%%-------------------------------------------------------------------------
+-module(maps_put_map_assoc).
+
+-export([test/0]).
+
+test() ->
+ true = assoc_guard(#{}),
+ false = assoc_guard(not_a_map),
+ #{a := true} = assoc_update(#{}),
+ {'EXIT', {badarg, [{?MODULE, assoc_update, 1, _}|_]}}
+ = (catch assoc_update(not_a_map)),
+ ok = assoc_guard_clause(#{}),
+ {'EXIT', {function_clause, [{?MODULE, assoc_guard_clause, _, _}|_]}}
+ = (catch assoc_guard_clause(not_a_map)),
+ ok.
+
+assoc_guard(M) when is_map(M#{a => b}) -> true;
+assoc_guard(_) -> false.
+
+assoc_update(M) -> M#{a => true}.
+
+assoc_guard_clause(M) when is_map(M#{a => 3}) -> ok.
diff --git a/lib/hipe/test/maps_SUITE_data/maps_put_map_exact.erl b/lib/hipe/test/maps_SUITE_data/maps_put_map_exact.erl
new file mode 100644
index 0000000000..1cfcd80180
--- /dev/null
+++ b/lib/hipe/test/maps_SUITE_data/maps_put_map_exact.erl
@@ -0,0 +1,28 @@
+%% -*- erlang-indent-level: 2 -*-
+%%-------------------------------------------------------------------------
+-module(maps_put_map_exact).
+
+-export([test/0]).
+
+test() ->
+ false = exact_guard(#{b => a}),
+ false = exact_guard(not_a_map),
+ true = exact_guard(#{a => false}),
+ #{a := true} = exact_update(#{a => false}),
+ {'EXIT', {badarg, [{?MODULE, exact_update, 1, _}|_]}}
+ = (catch exact_update(not_a_map)),
+ {'EXIT', {badarg, [{?MODULE, exact_update, 1, _}|_]}}
+ = (catch exact_update(#{})),
+ ok = exact_guard_clause(#{a => yes}),
+ {'EXIT', {function_clause, [{?MODULE, exact_guard_clause, _, _}|_]}}
+ = (catch exact_guard_clause(#{})),
+ {'EXIT', {function_clause, [{?MODULE, exact_guard_clause, _, _}|_]}}
+ = (catch exact_guard_clause(not_a_map)),
+ ok.
+
+exact_guard(M) when is_map(M#{a := b}) -> true;
+exact_guard(_) -> false.
+
+exact_update(M) -> M#{a := true}.
+
+exact_guard_clause(M) when is_map(M#{a := 42}) -> ok.
diff --git a/lib/hipe/test/maps_SUITE_data/maps_update_assoc.erl b/lib/hipe/test/maps_SUITE_data/maps_update_assoc.erl
new file mode 100644
index 0000000000..cc7c1353de
--- /dev/null
+++ b/lib/hipe/test/maps_SUITE_data/maps_update_assoc.erl
@@ -0,0 +1,22 @@
+-module(maps_update_assoc).
+-export([test/0]).
+
+test() ->
+ M0 = id(#{1=>a,2=>b,3.0=>c,4=>d,5=>e}),
+
+ M1 = M0#{1=>42,2=>100,4=>[a,b,c]},
+ #{1:=42,2:=100,3.0:=c,4:=[a,b,c],5:=e} = M1,
+ #{1:=42,2:=b,4:=d,5:=e,2.0:=100,3.0:=c,4.0:=[a,b,c]} = M0#{1.0=>float,1:=42,2.0=>wrong,2.0=>100,4.0=>[a,b,c]},
+
+ M2 = M0#{3.0=>new},
+ #{1:=a,2:=b,3.0:=new,4:=d,5:=e} = M2,
+ M2 = M0#{3.0:=wrong,3.0=>new},
+
+ %% Errors cases.
+ BadMap = id(badmap),
+ {'EXIT',{badarg,_}} = (catch BadMap#{nonexisting=>val}),
+
+ ok.
+
+%% Use this function to avoid compile-time evaluation of an expression.
+id(I) -> I.
diff --git a/lib/hipe/test/maps_SUITE_data/maps_update_exact.erl b/lib/hipe/test/maps_SUITE_data/maps_update_exact.erl
new file mode 100644
index 0000000000..6e5acb3283
--- /dev/null
+++ b/lib/hipe/test/maps_SUITE_data/maps_update_exact.erl
@@ -0,0 +1,32 @@
+-module(maps_update_exact).
+-export([test/0]).
+
+test() ->
+ M0 = id(#{1=>a,2=>b,3.0=>c,4=>d,5=>e}),
+
+ M1 = M0#{1:=42,2:=100,4:=[a,b,c]},
+ #{1:=42,2:=100,3.0:=c,4:=[a,b,c],5:=e} = M1,
+ M1 = M0#{1:=wrong,1=>42,2=>wrong,2:=100,4:=[a,b,c]},
+
+ M2 = M0#{3.0:=new},
+ #{1:=a,2:=b,3.0:=new,4:=d,5:=e} = M2,
+ M2 = M0#{3.0=>wrong,3.0:=new},
+ true = M2 =/= M0#{3=>right,3.0:=new},
+ #{ 3 := right, 3.0 := new } = M0#{3=>right,3.0:=new},
+
+ M3 = id(#{ 1 => val}),
+ #{1 := update2,1.0 := new_val4} = M3#{
+ 1.0 => new_val1, 1 := update, 1=> update3,
+ 1 := update2, 1.0 := new_val2, 1.0 => new_val3,
+ 1.0 => new_val4 },
+
+ %% Errors cases.
+ {'EXIT',{badarg,_}} = (catch ((id(nil))#{ a := b })),
+ {'EXIT',{badarg,_}} = (catch M0#{nonexisting:=val}),
+ {'EXIT',{badarg,_}} = (catch M0#{1.0:=v,1.0=>v2}),
+ {'EXIT',{badarg,_}} = (catch M0#{42.0:=v,42:=v2}),
+ {'EXIT',{badarg,_}} = (catch M0#{42=>v1,42.0:=v2,42:=v3}),
+ ok.
+
+%% Use this function to avoid compile-time evaluation of an expression.
+id(I) -> I.
diff --git a/lib/hipe/test/maps_SUITE_data/maps_update_literals.erl b/lib/hipe/test/maps_SUITE_data/maps_update_literals.erl
new file mode 100644
index 0000000000..87aea3d8e1
--- /dev/null
+++ b/lib/hipe/test/maps_SUITE_data/maps_update_literals.erl
@@ -0,0 +1,13 @@
+-module(maps_update_literals).
+-export([test/0]).
+
+test() ->
+ Map = #{x=>1,y=>2,z=>3,q=>4},
+ #{x:="d",q:="4"} = loop_update_literals_x_q(Map, [
+ {"a","1"},{"b","2"},{"c","3"},{"d","4"}
+ ]),
+ ok.
+
+loop_update_literals_x_q(Map, []) -> Map;
+loop_update_literals_x_q(Map, [{X,Q}|Vs]) ->
+ loop_update_literals_x_q(Map#{q=>Q,x=>X},Vs).
diff --git a/lib/hipe/test/maps_SUITE_data/maps_update_map_expressions.erl b/lib/hipe/test/maps_SUITE_data/maps_update_map_expressions.erl
new file mode 100644
index 0000000000..181e3f18f7
--- /dev/null
+++ b/lib/hipe/test/maps_SUITE_data/maps_update_map_expressions.erl
@@ -0,0 +1,32 @@
+-module(maps_update_map_expressions).
+-export([test/0]).
+
+test() ->
+ M = maps:new(),
+ X = id(fondue),
+ M1 = #{ a := 1 } = M#{a => 1},
+ #{ b := {X} } = M1#{ a := 1, b => {X} },
+
+ #{ b := 2 } = (maps:new())#{ b => 2 },
+
+ #{ a :=42, b:=42, c:=42 } = (maps:from_list([{a,1},{b,2},{c,3}]))#{ a := 42, b := 42, c := 42 },
+ #{ "a" :=1, "b":=42, "c":=42 } = (maps:from_list([{"a",1},{"b",2}]))#{ "b" := 42, "c" => 42 },
+
+ %% Test need to be in a fun.
+ %% This tests that let expr optimisation in sys_core_fold
+ %% covers maps correctly.
+ F = fun() ->
+ M0 = id(#{ "a" => [1,2,3] }),
+ #{ "a" := _ } = M0,
+ M0#{ "a" := b }
+ end,
+
+ #{ "a" := b } = F(),
+
+ %% Error cases, FIXME: should be 'badmap'?
+ {'EXIT',{badarg,_}} = (catch (id(<<>>))#{ a := 42, b => 2 }),
+ {'EXIT',{badarg,_}} = (catch (id([]))#{ a := 42, b => 2 }),
+ ok.
+
+%% Use this function to avoid compile-time evaluation of an expression.
+id(I) -> I.
diff --git a/lib/hipe/test/maps_SUITE_data/maps_update_values.erl b/lib/hipe/test/maps_SUITE_data/maps_update_values.erl
new file mode 100644
index 0000000000..bbad5ac19e
--- /dev/null
+++ b/lib/hipe/test/maps_SUITE_data/maps_update_values.erl
@@ -0,0 +1,28 @@
+-module(maps_update_values).
+-export([test/0]).
+
+test() ->
+ V0 = id(1337),
+ M0 = #{ a => 1, val => V0},
+ V1 = get_val(M0),
+ M1 = M0#{ val := [V0,V1], "wazzup" => 42 },
+ [1337, {some_val, 1337}] = get_val(M1),
+
+ N = 110,
+ List = [{[I,1,2,3,I],{1,2,3,"wat",I}}|| I <- lists:seq(1,N)],
+
+ {_,_,#{val2 := {1,2,3,"wat",N}, val1 := [N,1,2,3,N]}} = lists:foldl(fun
+ ({V2,V3},{Old2,Old3,Mi}) ->
+ ok = check_val(Mi,Old2,Old3),
+ #{ val1 := Old2, val2 := Old3 } = Mi,
+ {V2,V3, Mi#{ val1 := id(V2), val2 := V1, val2 => id(V3)}}
+ end, {none, none, #{val1=>none,val2=>none}},List),
+ ok.
+
+get_val(#{ "wazzup" := _, val := V}) -> V;
+get_val(#{ val := V }) -> {some_val, V}.
+
+check_val(#{val1:=V1, val2:=V2},V1,V2) -> ok.
+
+%% Use this function to avoid compile-time evaluation of an expression.
+id(I) -> I.
diff --git a/lib/hipe/test/maps_SUITE_data/maps_warn_pair_key_overloaded.erl b/lib/hipe/test/maps_SUITE_data/maps_warn_pair_key_overloaded.erl
new file mode 100644
index 0000000000..76b2a91f94
--- /dev/null
+++ b/lib/hipe/test/maps_SUITE_data/maps_warn_pair_key_overloaded.erl
@@ -0,0 +1,27 @@
+-module(maps_warn_pair_key_overloaded).
+-export([test/0]).
+
+test() ->
+ #{ "hi1" := 42 } = id(#{ "hi1" => 1, "hi1" => 42 }),
+
+ #{ "hi1" := 1337, "hi2" := [2], "hi3" := 3 } = id(#{
+ "hi1" => erlang:atom_to_binary(?MODULE,utf8),
+ "hi1" => erlang:binary_to_atom(<<"wazzup">>,utf8),
+ "hi1" => erlang:binary_to_float(<<"3.1416">>),
+ "hi1" => erlang:float_to_binary(3.1416),
+ "hi2" => erlang:pid_to_list(self()),
+ "hi3" => erlang:float_to_binary(3.1416),
+ "hi2" => lists:subtract([1,2],[1]),
+ "hi3" => +3,
+ "hi1" => erlang:min(1,2),
+ "hi1" => erlang:hash({1,2},35),
+ "hi1" => erlang:phash({1,2},33),
+ "hi1" => erlang:phash2({1,2},34),
+ "hi1" => erlang:integer_to_binary(1337),
+ "hi1" => erlang:binary_to_integer(<<"1337">>),
+ "hi4" => erlang:float_to_binary(3.1416)
+ }),
+ ok.
+
+%% Use this function to avoid compile-time evaluation of an expression.
+id(I) -> I.
diff --git a/lib/hipe/test/maps_SUITE_data/maps_warn_useless_build.erl b/lib/hipe/test/maps_SUITE_data/maps_warn_useless_build.erl
new file mode 100644
index 0000000000..6cb0366314
--- /dev/null
+++ b/lib/hipe/test/maps_SUITE_data/maps_warn_useless_build.erl
@@ -0,0 +1,9 @@
+-module(maps_warn_useless_build).
+-export([test/0]).
+
+test() ->
+ [#{ a => id(I)} || I <- [1,2,3]],
+ ok.
+
+%% Use this function to avoid compile-time evaluation of an expression.
+id(I) -> I.
diff --git a/lib/hipe/util/hipe_digraph.erl b/lib/hipe/util/hipe_digraph.erl
index fcfaa64684..01b1f8c77c 100644
--- a/lib/hipe/util/hipe_digraph.erl
+++ b/lib/hipe/util/hipe_digraph.erl
@@ -2,7 +2,7 @@
%%
%% %CopyrightBegin%
%%
-%% Copyright Ericsson AB 2005-2010. All Rights Reserved.
+%% Copyright Ericsson AB 2005-2014. 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
@@ -36,10 +36,10 @@
-type ordset(T) :: [T]. % XXX: temporarily
--record(hipe_digraph, {edges = dict:new() :: dict(),
- rev_edges = dict:new() :: dict(),
+-record(hipe_digraph, {edges = dict:new() :: dict:dict(),
+ rev_edges = dict:new() :: dict:dict(),
leaves = ordsets:new() :: ordset(_), % ???
- nodes = sets:new() :: set()}).
+ nodes = sets:new() :: sets:set()}).
-opaque hdg() :: #hipe_digraph{}.
diff --git a/lib/hipe/util/hipe_dot.erl b/lib/hipe/util/hipe_dot.erl
index e4a47ae0c4..94f7fd60cc 100644
--- a/lib/hipe/util/hipe_dot.erl
+++ b/lib/hipe/util/hipe_dot.erl
@@ -2,7 +2,7 @@
%%%
%%% %CopyrightBegin%
%%%
-%%% Copyright Ericsson AB 2004-2011. All Rights Reserved.
+%%% Copyright Ericsson AB 2004-2014. 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
@@ -70,13 +70,13 @@
%%
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
--spec translate_digraph(digraph(), string(), string()) -> 'ok'.
+-spec translate_digraph(digraph:graph(), string(), string()) -> 'ok'.
translate_digraph(G, FileName, GName) ->
translate_digraph(G, FileName, GName,
fun(X) -> io_lib:format("~p", [X]) end, []).
--spec translate_digraph(digraph(), string(), string(),
+-spec translate_digraph(digraph:graph(), string(), string(),
fun((_) -> string()), [_]) -> 'ok'.
translate_digraph(G, FileName, GName, Fun, Opts) ->
diff --git a/lib/hipe/util/hipe_vectors.hrl b/lib/hipe/util/hipe_vectors.hrl
index 043faf4c91..5e24db238d 100644
--- a/lib/hipe/util/hipe_vectors.hrl
+++ b/lib/hipe/util/hipe_vectors.hrl
@@ -1,7 +1,7 @@
%%
%% %CopyrightBegin%
%%
-%% Copyright Ericsson AB 2008-2009. All Rights Reserved.
+%% Copyright Ericsson AB 2008-2014. 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
@@ -24,5 +24,5 @@
-endif.
-ifdef(USE_GBTREES).
--type hipe_vector() :: gb_tree().
+-type hipe_vector() :: gb_trees:tree().
-endif.
diff --git a/lib/hipe/vsn.mk b/lib/hipe/vsn.mk
index ed4b4dc8d2..fb7e4b91a0 100644
--- a/lib/hipe/vsn.mk
+++ b/lib/hipe/vsn.mk
@@ -1 +1 @@
-HIPE_VSN = 3.10.2.2
+HIPE_VSN = 3.10.3
diff --git a/lib/hipe/x86/hipe_x86_assemble.erl b/lib/hipe/x86/hipe_x86_assemble.erl
index 7878c7219d..3f756769c4 100644
--- a/lib/hipe/x86/hipe_x86_assemble.erl
+++ b/lib/hipe/x86/hipe_x86_assemble.erl
@@ -21,7 +21,6 @@
%%%
%%% TODO:
%%% - Simplify combine_label_maps and mk_data_relocs.
-%%% - Move find_const to hipe_pack_constants?
-ifdef(HIPE_AMD64).
-define(HIPE_X86_ASSEMBLE, hipe_amd64_assemble).
@@ -80,8 +79,8 @@ assemble(CompiledCode, Closures, Exports, Options) ->
%% ?debug_msg("Constants are ~w bytes\n",[ConstSize])),
%%
SC = hipe_pack_constants:slim_constmap(ConstMap),
- DataRelocs = mk_data_relocs(RefsFromConsts, LabelMap),
- SSE = slim_sorted_exportmap(ExportMap,Closures,Exports),
+ DataRelocs = hipe_pack_constants:mk_data_relocs(RefsFromConsts, LabelMap),
+ SSE = hipe_pack_constants:slim_sorted_exportmap(ExportMap,Closures,Exports),
SlimRefs = hipe_pack_constants:slim_refs(AccRefs),
Bin = term_to_binary([{?VERSION_STRING(),?HIPE_SYSTEM_CRC},
ConstAlign, ConstSize,
@@ -442,7 +441,7 @@ translate_imm(#x86_imm{value=Imm}, Context, MayTrunc8) ->
case Imm of
{Label,constant} ->
{MFA,ConstMap} = Context,
- ConstNo = find_const({MFA,Label}, ConstMap),
+ ConstNo = hipe_pack_constants:find_const({MFA,Label}, ConstMap),
{constant,ConstNo};
{Label,closure} ->
{closure,Label};
@@ -712,7 +711,7 @@ resolve_jmp_switch_arg(I, _Context) ->
{rm64,hipe_amd64_encode:rm_mem(EA)}.
-else.
resolve_jmp_switch_arg(I, {MFA,ConstMap}) ->
- ConstNo = find_const({MFA,hipe_x86:jmp_switch_jtab(I)}, ConstMap),
+ ConstNo = hipe_pack_constants:find_const({MFA,hipe_x86:jmp_switch_jtab(I)}, ConstMap),
Disp32 = {?LOAD_ADDRESS,{constant,ConstNo}},
SINDEX = ?HIPE_X86_ENCODE:sindex(2, hipe_x86:temp_reg(hipe_x86:jmp_switch_temp(I))),
EA = ?HIPE_X86_ENCODE:ea_disp32_sindex(Disp32, SINDEX), % this creates a SIB implicitly
@@ -932,37 +931,6 @@ resolve_x87_binop_args(Src=#x86_fpreg{}, Dst=#x86_fpreg{})->
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
-mk_data_relocs(RefsFromConsts, LabelMap) ->
- lists:flatten(mk_data_relocs(RefsFromConsts, LabelMap, [])).
-
-mk_data_relocs([{MFA,Labels} | Rest], LabelMap, Acc) ->
- Map = [case Label of
- {L,Pos} ->
- Offset = find({MFA,L}, LabelMap),
- {Pos,Offset};
- {sorted,Base,OrderedLabels} ->
- {sorted, Base, [begin
- Offset = find({MFA,L}, LabelMap),
- {Order, Offset}
- end
- || {L,Order} <- OrderedLabels]}
- end
- || Label <- Labels],
- %% msg("Map: ~w Map\n",[Map]),
- mk_data_relocs(Rest, LabelMap, [Map,Acc]);
-mk_data_relocs([],_,Acc) -> Acc.
-
-find({MFA,L},LabelMap) ->
- gb_trees:get({MFA,L}, LabelMap).
-
-slim_sorted_exportmap([{Addr,M,F,A}|Rest], Closures, Exports) ->
- IsClosure = lists:member({M,F,A}, Closures),
- IsExported = is_exported(F, A, Exports),
- [Addr,M,F,A,IsClosure,IsExported | slim_sorted_exportmap(Rest, Closures, Exports)];
-slim_sorted_exportmap([],_,_) -> [].
-
-is_exported(F, A, Exports) -> lists:member({F,A}, Exports).
-
%%%
%%% Assembly listing support (pp_asm option).
%%%
@@ -1001,14 +969,3 @@ fill_spaces(N) when N > 0 ->
fill_spaces(N-1);
fill_spaces(0) ->
[].
-
-%%%
-%%% Lookup a constant in a ConstMap.
-%%%
-
-find_const({MFA,Label},[{pcm_entry,MFA,Label,ConstNo,_,_,_}|_]) ->
- ConstNo;
-find_const(N,[_|R]) ->
- find_const(N,R);
-find_const(C,[]) ->
- ?EXIT({constant_not_found,C}).
diff --git a/lib/ic/doc/src/notes.xml b/lib/ic/doc/src/notes.xml
index 9ae464e028..03af316f75 100644
--- a/lib/ic/doc/src/notes.xml
+++ b/lib/ic/doc/src/notes.xml
@@ -30,7 +30,23 @@
<file>notes.xml</file>
</header>
- <section><title>IC 4.3.4</title>
+ <section><title>IC 4.3.5</title>
+
+ <section><title>Fixed Bugs and Malfunctions</title>
+ <list>
+ <item>
+ <p> Added Latin-1 code directive in the generated files
+ to keep old behaviour. Updated IC so it can handle
+ Unicode characters in the path. </p>
+ <p>
+ Own Id: OTP-11783</p>
+ </item>
+ </list>
+ </section>
+
+</section>
+
+<section><title>IC 4.3.4</title>
<section><title>Fixed Bugs and Malfunctions</title>
<list>
diff --git a/lib/ic/src/ic.app.src b/lib/ic/src/ic.app.src
index 29aa6def00..7dd47ac9c6 100644
--- a/lib/ic/src/ic.app.src
+++ b/lib/ic/src/ic.app.src
@@ -46,7 +46,8 @@
{registered, []},
{applications, [stdlib, kernel]},
{env, []},
- {mod, {ic, []}}
+ {mod, {ic, []}},
+ {runtime_dependencies, ["stdlib-2.0","kernel-3.0","erts-6.0"]}
]}.
diff --git a/lib/ic/src/ic.erl b/lib/ic/src/ic.erl
index c0742cf7bd..4f3e8d180c 100644
--- a/lib/ic/src/ic.erl
+++ b/lib/ic/src/ic.erl
@@ -250,7 +250,7 @@ make_erl_options(Opts) ->
Optimize = Opts#options.optimize,
PreProc =
lists:flatten(
- lists:map(fun(D) -> io_lib:format("-I\"~s\" ", [ic_util:to_list(D)]) end,
+ lists:map(fun(D) -> io_lib:format("-I\"~ts\" ", [ic_util:to_list(D)]) end,
Includes1)++
lists:map(
fun ({Name, Value}) ->
diff --git a/lib/ic/src/ic_codegen.erl b/lib/ic/src/ic_codegen.erl
index f611c69bea..82431b79a2 100644
--- a/lib/ic/src/ic_codegen.erl
+++ b/lib/ic/src/ic_codegen.erl
@@ -216,12 +216,14 @@ exp_to_string({F,N}) -> io_lib:format("~p/~p", [ic_util:to_atom(F), N]).
%%--------------------------------------------------------------------
emit_stub_head(_G, ignore, _Name, _) -> ignore;
emit_stub_head(G, F1, Name, erlang) ->
+ comment(F1, " coding: latin-1", []),
mcomment(F1, stub_header(G, Name)),
nl(F1),
emit(F1, "-module(~p).\n", [list_to_atom(Name)]),
emit(F1, "-ic_compiled(~p).\n", [compiler_vsn(?COMPILERVSN)]),
emit(F1, "\n\n"), F1;
emit_stub_head(G, F1, Name, erlang_template) ->
+ comment(F1, " coding: latin-1", []),
ic_erl_template:emit_header(G, F1, Name),
F1;
emit_stub_head(_G, F1, _Name, erlang_template_no_gen) ->
@@ -259,6 +261,7 @@ compiler_vsn(Vsn) ->
%% Name is Fully scoped (undescore) name of interface or module
emit_hrl_head(_G, ignore, _Name, _) -> ignore;
emit_hrl_head(G, Fd, Name, erlang) ->
+ comment(Fd, " coding: latin-1", []),
mcomment(Fd, ["Erlang header file" |
hrl_header(G, Name)]),
nl(Fd),
diff --git a/lib/ic/src/ic_pp.erl b/lib/ic/src/ic_pp.erl
index 54701f7438..e54304ebaa 100644
--- a/lib/ic/src/ic_pp.erl
+++ b/lib/ic/src/ic_pp.erl
@@ -257,15 +257,15 @@ run_include(FileName, FileList, _Out, Defs, Err, War, IncLine, IncFile, IncDir,
tokenise(File, FileName) ->
{Result, _L} = token(File, 2, [], not_set, 0),
- FI_start = lists:reverse(lists:flatten(io_lib:format("# 1 ~p~n",[FileName]))),
+ FI_start = lists:reverse(lists:flatten(io_lib:format("# 1 \"~ts\"~n",[FileName]))),
FileInfoStart = {file_info, FI_start},
[FileInfoStart | Result].
tokenise(File, FileName, IncLine, PrevFile) ->
{Result, _L} = token(File, 2, [], not_set, 0),
- FI_start = lists:reverse(lists:flatten(io_lib:format("# 1 ~p 1~n",[FileName]))),
+ FI_start = lists:reverse(lists:flatten(io_lib:format("# 1 \"~ts\" 1~n",[FileName]))),
FileInfoStart = {file_info, FI_start},
- FI_end = lists:reverse(lists:flatten(io_lib:format("# ~p ~p 2~n~n",[IncLine-1,PrevFile]))),
+ FI_end = lists:reverse(lists:flatten(io_lib:format("# ~p \"~ts\" 2~n~n",[IncLine-1,PrevFile]))),
FileInfoEnd = [{file_info, FI_end}],
{Result, FileInfoStart, FileInfoEnd}.
% [FileInfoStart | Result] ++ FileInfoEnd.
@@ -1942,7 +1942,7 @@ read_inc_file(FileName, IncDir, Mio) ->
FileList = binary_to_list(Bin),
{ok, AbsFile, FileList};
{error, Text} ->
- {error, Text}
+ {error, Text}
end;
true ->
skip
diff --git a/lib/ic/test/java_client_erl_server_SUITE.erl b/lib/ic/test/java_client_erl_server_SUITE.erl
index 9e49305c3c..cbcf32515e 100644
--- a/lib/ic/test/java_client_erl_server_SUITE.erl
+++ b/lib/ic/test/java_client_erl_server_SUITE.erl
@@ -288,7 +288,7 @@ classpath(Dir) ->
cmd(Cmd) ->
PortOpts = [{line,80},eof,exit_status,stderr_to_stdout],
- io:format("<cmd> ~s~n", [Cmd]),
+ io:format("<cmd> ~ts~n", [Cmd]),
case catch open_port({spawn,Cmd}, PortOpts) of
Port when is_port(Port) ->
Result = cmd_loop(Port, []),
diff --git a/lib/ic/vsn.mk b/lib/ic/vsn.mk
index fe27d095d3..2ffbbad444 100644
--- a/lib/ic/vsn.mk
+++ b/lib/ic/vsn.mk
@@ -1 +1 @@
-IC_VSN = 4.3.4
+IC_VSN = 4.3.5
diff --git a/lib/inets/doc/src/notes.xml b/lib/inets/doc/src/notes.xml
index a6f2933f6a..596c0d77f4 100644
--- a/lib/inets/doc/src/notes.xml
+++ b/lib/inets/doc/src/notes.xml
@@ -4,7 +4,7 @@
<chapter>
<header>
<copyright>
- <year>2002</year><year>2013</year>
+ <year>2002</year><year>2014</year>
<holder>Ericsson AB. All Rights Reserved.</holder>
</copyright>
<legalnotice>
@@ -32,7 +32,144 @@
<file>notes.xml</file>
</header>
- <section><title>Inets 5.9.7</title>
+ <section><title>Inets 5.10.1</title>
+
+ <section><title>Fixed Bugs and Malfunctions</title>
+ <list>
+ <item>
+ <p>
+ Correct distirbing mode for httpd:reload_config/2</p>
+ <p>
+ Own Id: OTP-11914</p>
+ </item>
+ </list>
+ </section>
+
+
+ <section><title>Improvements and New Features</title>
+ <list>
+ <item>
+ <p>
+ Improved handling of invalid strings in the HTTP request
+ line.</p>
+ <p>
+ Impact: May improve memory consumption</p>
+ <p>
+ Own Id: OTP-11925 Aux Id: Sequence 12601 </p>
+ </item>
+ </list>
+ </section>
+
+</section>
+
+<section><title>Inets 5.10</title>
+
+ <section><title>Fixed Bugs and Malfunctions</title>
+ <list>
+ <item>
+ <p>
+ Fixed a spelling mistake in httpc doc (Thanks to Wasif
+ Riaz Malik)</p>
+ <p>
+ Own Id: OTP-11538</p>
+ </item>
+ <item>
+ <p>
+ Application upgrade (appup) files are corrected for the
+ following applications: </p>
+ <p>
+ <c>asn1, common_test, compiler, crypto, debugger,
+ dialyzer, edoc, eldap, erl_docgen, et, eunit, gs, hipe,
+ inets, observer, odbc, os_mon, otp_mibs, parsetools,
+ percept, public_key, reltool, runtime_tools, ssh,
+ syntax_tools, test_server, tools, typer, webtool, wx,
+ xmerl</c></p>
+ <p>
+ A new test utility for testing appup files is added to
+ test_server. This is now used by most applications in
+ OTP.</p>
+ <p>
+ (Thanks to Tobias Schlager)</p>
+ <p>
+ Own Id: OTP-11744</p>
+ </item>
+ <item>
+ <p>
+ ftp now sanitize file name, user name and passwords from
+ &lt;CR&gt; and &lt;LF&gt; tags (Thanks to Sergei Golovan)</p>
+ <p>
+ Own Id: OTP-11750</p>
+ </item>
+ <item>
+ <p>
+ Corrected error handling in the HTTP client, making it
+ behave more graceful.</p>
+ <p>
+ Thanks to Kirilll Zaborsky</p>
+ <p>
+ Own Id: OTP-11794</p>
+ </item>
+ <item>
+ <p>
+ Support identity transfer-encoding in httpc.</p>
+ <p>
+ Thanks to Anthony Ramine</p>
+ <p>
+ Own Id: OTP-11802</p>
+ </item>
+ <item>
+ <p>
+ Ignore empty Set-Cookie headers to increase
+ interoperability with servers that violate the RFC. </p>
+ <p>
+ Thanks to Kirilll Zaborsky</p>
+ <p>
+ Own Id: OTP-11803</p>
+ </item>
+ </list>
+ </section>
+
+
+ <section><title>Improvements and New Features</title>
+ <list>
+ <item>
+ <p>
+ The commit 6189bc07 "inets: httpc improve pipelining" has
+ been reverted, as it turned out to break things rather
+ than improve pipelining utilization. It is instead up to
+ the user to configure httpc and use it wisely to be able
+ to get the most out of pipelining.</p>
+ <p>
+ Own Id: OTP-11756</p>
+ </item>
+ <item>
+ <p>
+ Handle all response codes in httpd_util:message/3</p>
+ <p>
+ Own Id: OTP-11838</p>
+ </item>
+ </list>
+ </section>
+
+</section>
+
+<section><title>Inets 5.9.8</title>
+
+ <section><title>Improvements and New Features</title>
+ <list>
+ <item>
+ <p>
+ Mend max_clients check that was broken and avoid too
+ extensive logging that could cause memory problems.</p>
+ <p>
+ Own Id: OTP-11557 Aux Id: seq12478 </p>
+ </item>
+ </list>
+ </section>
+
+</section>
+
+<section><title>Inets 5.9.7</title>
<section><title>Fixed Bugs and Malfunctions</title>
<list>
diff --git a/lib/inets/src/ftp/ftp.erl b/lib/inets/src/ftp/ftp.erl
index 520db1b457..5674599ac5 100644
--- a/lib/inets/src/ftp/ftp.erl
+++ b/lib/inets/src/ftp/ftp.erl
@@ -192,7 +192,12 @@ do_open(Pid, OpenOptions, TLSOpts) ->
'ok' | {'error', Reason :: 'euser' | common_reason()}.
user(Pid, User, Pass) ->
- call(Pid, {user, User, Pass}, atom).
+ case {is_name_sane(User), is_name_sane(Pass)} of
+ {true, true} ->
+ call(Pid, {user, User, Pass}, atom);
+ _ ->
+ {error, euser}
+ end.
-spec user(Pid :: pid(),
User :: string(),
@@ -201,7 +206,12 @@ user(Pid, User, Pass) ->
'ok' | {'error', Reason :: 'euser' | common_reason()}.
user(Pid, User, Pass, Acc) ->
- call(Pid, {user, User, Pass, Acc}, atom).
+ case {is_name_sane(User), is_name_sane(Pass), is_name_sane(Acc)} of
+ {true, true, true} ->
+ call(Pid, {user, User, Pass, Acc}, atom);
+ _ ->
+ {error, euser}
+ end.
%%--------------------------------------------------------------------------
@@ -216,7 +226,12 @@ user(Pid, User, Pass, Acc) ->
'ok' | {'error', Reason :: 'eacct' | common_reason()}.
account(Pid, Acc) ->
- call(Pid, {account, Acc}, atom).
+ case is_name_sane(Acc) of
+ true ->
+ call(Pid, {account, Acc}, atom);
+ _ ->
+ {error, eacct}
+ end.
%%--------------------------------------------------------------------------
@@ -262,7 +277,12 @@ lpwd(Pid) ->
'ok' | {'error', Reason :: restriction_reason() | common_reason()}.
cd(Pid, Dir) ->
- call(Pid, {cd, Dir}, atom).
+ case is_name_sane(Dir) of
+ true ->
+ call(Pid, {cd, Dir}, atom);
+ _ ->
+ {error, efnamena}
+ end.
%%--------------------------------------------------------------------------
@@ -305,7 +325,12 @@ ls(Pid) ->
{'error', Reason :: restriction_reason() | common_reason()}.
ls(Pid, Dir) ->
- call(Pid, {dir, long, Dir}, string).
+ case is_name_sane(Dir) of
+ true ->
+ call(Pid, {dir, long, Dir}, string);
+ _ ->
+ {error, efnamena}
+ end.
%%--------------------------------------------------------------------------
@@ -333,7 +358,12 @@ nlist(Pid) ->
{'error', Reason :: restriction_reason() | common_reason()}.
nlist(Pid, Dir) ->
- call(Pid, {dir, short, Dir}, string).
+ case is_name_sane(Dir) of
+ true ->
+ call(Pid, {dir, short, Dir}, string);
+ _ ->
+ {error, efnamena}
+ end.
%%--------------------------------------------------------------------------
@@ -349,7 +379,12 @@ nlist(Pid, Dir) ->
'ok' | {'error', Reason :: restriction_reason() | common_reason()}.
rename(Pid, Old, New) ->
- call(Pid, {rename, Old, New}, string).
+ case {is_name_sane(Old), is_name_sane(New)} of
+ {true, true} ->
+ call(Pid, {rename, Old, New}, string);
+ _ ->
+ {error, efnamena}
+ end.
%%--------------------------------------------------------------------------
@@ -365,7 +400,12 @@ rename(Pid, Old, New) ->
'ok' | {'error', Reason :: restriction_reason() | common_reason()}.
delete(Pid, File) ->
- call(Pid, {delete, File}, string).
+ case is_name_sane(File) of
+ true ->
+ call(Pid, {delete, File}, string);
+ _ ->
+ {error, efnamena}
+ end.
%%--------------------------------------------------------------------------
@@ -380,7 +420,12 @@ delete(Pid, File) ->
'ok' | {'error', Reason :: restriction_reason() | common_reason()}.
mkdir(Pid, Dir) ->
- call(Pid, {mkdir, Dir}, atom).
+ case is_name_sane(Dir) of
+ true ->
+ call(Pid, {mkdir, Dir}, atom);
+ _ ->
+ {error, efnamena}
+ end.
%%--------------------------------------------------------------------------
@@ -395,7 +440,12 @@ mkdir(Pid, Dir) ->
'ok' | {'error', Reason :: restriction_reason() | common_reason()}.
rmdir(Pid, Dir) ->
- call(Pid, {rmdir, Dir}, atom).
+ case is_name_sane(Dir) of
+ true ->
+ call(Pid, {rmdir, Dir}, atom);
+ _ ->
+ {error, efnamena}
+ end.
%%--------------------------------------------------------------------------
@@ -437,7 +487,12 @@ recv(Pid, RemotFileName) ->
'ok' | {'error', Reason :: term()}.
recv(Pid, RemotFileName, LocalFileName) ->
- call(Pid, {recv, RemotFileName, LocalFileName}, atom).
+ case is_name_sane(RemotFileName) of
+ true ->
+ call(Pid, {recv, RemotFileName, LocalFileName}, atom);
+ _ ->
+ {error, efnamena}
+ end.
%%--------------------------------------------------------------------------
@@ -456,7 +511,12 @@ recv(Pid, RemotFileName, LocalFileName) ->
{'error', Reason :: restriction_reason() | common_reason()}.
recv_bin(Pid, RemoteFile) ->
- call(Pid, {recv_bin, RemoteFile}, bin).
+ case is_name_sane(RemoteFile) of
+ true ->
+ call(Pid, {recv_bin, RemoteFile}, bin);
+ _ ->
+ {error, efnamena}
+ end.
%%--------------------------------------------------------------------------
@@ -473,7 +533,12 @@ recv_bin(Pid, RemoteFile) ->
'ok' | {'error', Reason :: restriction_reason() | common_reason()}.
recv_chunk_start(Pid, RemoteFile) ->
- call(Pid, {recv_chunk_start, RemoteFile}, atom).
+ case is_name_sane(RemoteFile) of
+ true ->
+ call(Pid, {recv_chunk_start, RemoteFile}, atom);
+ _ ->
+ {error, efnamena}
+ end.
%%--------------------------------------------------------------------------
@@ -521,7 +586,12 @@ send(Pid, LocalFileName) ->
shortage_reason()}.
send(Pid, LocalFileName, RemotFileName) ->
- call(Pid, {send, LocalFileName, RemotFileName}, atom).
+ case is_name_sane(RemotFileName) of
+ true ->
+ call(Pid, {send, LocalFileName, RemotFileName}, atom);
+ _ ->
+ {error, efnamena}
+ end.
%%--------------------------------------------------------------------------
@@ -541,7 +611,12 @@ send(Pid, LocalFileName, RemotFileName) ->
shortage_reason()}.
send_bin(Pid, Bin, RemoteFile) when is_binary(Bin) ->
- call(Pid, {send_bin, Bin, RemoteFile}, atom);
+ case is_name_sane(RemoteFile) of
+ true ->
+ call(Pid, {send_bin, Bin, RemoteFile}, atom);
+ _ ->
+ {error, efnamena}
+ end;
send_bin(_Pid, _Bin, _RemoteFile) ->
{error, enotbinary}.
@@ -559,7 +634,12 @@ send_bin(_Pid, _Bin, _RemoteFile) ->
'ok' | {'error', Reason :: restriction_reason() | common_reason()}.
send_chunk_start(Pid, RemoteFile) ->
- call(Pid, {send_chunk_start, RemoteFile}, atom).
+ case is_name_sane(RemoteFile) of
+ true ->
+ call(Pid, {send_chunk_start, RemoteFile}, atom);
+ _ ->
+ {error, efnamena}
+ end.
%%--------------------------------------------------------------------------
@@ -575,7 +655,12 @@ send_chunk_start(Pid, RemoteFile) ->
'ok' | {'error', Reason :: term()}.
append_chunk_start(Pid, RemoteFile) ->
- call(Pid, {append_chunk_start, RemoteFile}, atom).
+ case is_name_sane(RemoteFile) of
+ true ->
+ call(Pid, {append_chunk_start, RemoteFile}, atom);
+ _ ->
+ {error, efnamena}
+ end.
%%--------------------------------------------------------------------------
@@ -683,7 +768,12 @@ append(Pid, LocalFileName) ->
'ok' | {'error', Reason :: term()}.
append(Pid, LocalFileName, RemotFileName) ->
- call(Pid, {append, LocalFileName, RemotFileName}, atom).
+ case is_name_sane(RemotFileName) of
+ true ->
+ call(Pid, {append, LocalFileName, RemotFileName}, atom);
+ _ ->
+ {error, efnamena}
+ end.
%%--------------------------------------------------------------------------
@@ -705,7 +795,12 @@ append(Pid, LocalFileName, RemotFileName) ->
shortage_reason()}.
append_bin(Pid, Bin, RemoteFile) when is_binary(Bin) ->
- call(Pid, {append_bin, Bin, RemoteFile}, atom);
+ case is_name_sane(RemoteFile) of
+ true ->
+ call(Pid, {append_bin, Bin, RemoteFile}, atom);
+ _ ->
+ {error, efnamena}
+ end;
append_bin(_Pid, _Bin, _RemoteFile) ->
{error, enotbinary}.
@@ -2302,6 +2397,15 @@ send_bin(State, Bin) ->
mk_cmd(Fmt, Args) ->
[io_lib:format(Fmt, Args)| [?CR, ?LF]]. % Deep list ok.
+is_name_sane([]) ->
+ true;
+is_name_sane([?CR| _]) ->
+ false;
+is_name_sane([?LF| _]) ->
+ false;
+is_name_sane([_| Rest]) ->
+ is_name_sane(Rest).
+
pwd_result(Lines) ->
{_, [?DOUBLE_QUOTE | Rest]} =
lists:splitwith(fun(?DOUBLE_QUOTE) -> false; (_) -> true end, Lines),
diff --git a/lib/inets/src/http_client/httpc_cookie.erl b/lib/inets/src/http_client/httpc_cookie.erl
index 69900bae65..134115bdfa 100644
--- a/lib/inets/src/http_client/httpc_cookie.erl
+++ b/lib/inets/src/http_client/httpc_cookie.erl
@@ -335,7 +335,8 @@ add_domain(Str, #http_cookie{domain = Domain}) ->
Str ++ "; $Domain=" ++ Domain.
parse_set_cookies(CookieHeaders, DefaultPathDomain) ->
- SetCookieHeaders = [Value || {"set-cookie", Value} <- CookieHeaders],
+ %% empty Set-Cookie header is invalid according to RFC but some sites violate it
+ SetCookieHeaders = [Value || {"set-cookie", Value} <- CookieHeaders, Value /= ""],
Cookies = [parse_set_cookie(SetCookieHeader, DefaultPathDomain) ||
SetCookieHeader <- SetCookieHeaders],
%% print_cookies("Parsed Cookies", Cookies),
diff --git a/lib/inets/src/http_client/httpc_handler.erl b/lib/inets/src/http_client/httpc_handler.erl
index 80c8b2439e..5ae6760f08 100644
--- a/lib/inets/src/http_client/httpc_handler.erl
+++ b/lib/inets/src/http_client/httpc_handler.erl
@@ -1,7 +1,7 @@
%%
%% %CopyrightBegin%
%%
-%% Copyright Ericsson AB 2002-2013. All Rights Reserved.
+%% Copyright Ericsson AB 2002-2014. 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
@@ -55,8 +55,8 @@
headers, % #http_response_h{}
body, % binary()
mfa, % {Module, Function, Args}
- pipeline = queue:new(), % queue()
- keep_alive = queue:new(), % queue()
+ pipeline = queue:new(), % queue:queue()
+ keep_alive = queue:new(), % queue:queue()
status, % undefined | new | pipeline | keep_alive | close | {ssl_tunnel, Request}
canceled = [], % [RequestId]
max_header_size = nolimit, % nolimit | integer()
@@ -1116,18 +1116,19 @@ handle_http_body(Body, #state{headers = Headers,
{new_body, NewBody}]),
NewHeaders = http_chunk:handle_headers(Headers,
ChunkedHeaders),
- handle_response(State#state{headers = NewHeaders,
- body = NewBody})
+ case Body of
+ <<>> ->
+ handle_response(State#state{headers = NewHeaders,
+ body = NewBody});
+ _ ->
+ {NewBody2, NewRequest} =
+ stream(NewBody, Request, Code),
+ handle_response(State#state{headers = NewHeaders,
+ body = NewBody2})
+ end
end;
- Encoding when is_list(Encoding) ->
- ?hcrt("handle_http_body - encoding", [{encoding, Encoding}]),
- NewState = answer_request(Request,
- httpc_response:error(Request,
- unknown_encoding),
- State),
- {stop, normal, NewState};
- _ ->
- ?hcrt("handle_http_body - other", []),
+ Enc when Enc =:= "identity"; Enc =:= undefined ->
+ ?hcrt("handle_http_body - identity", []),
Length =
list_to_integer(Headers#http_response_h.'content-length'),
case ((Length =< MaxBodySize) orelse (MaxBodySize =:= nolimit)) of
@@ -1149,12 +1150,19 @@ handle_http_body(Body, #state{headers = Headers,
body_too_big),
State),
{stop, normal, NewState}
- end
+ end;
+ Encoding when is_list(Encoding) ->
+ ?hcrt("handle_http_body - other", [{encoding, Encoding}]),
+ NewState = answer_request(Request,
+ httpc_response:error(Request,
+ unknown_encoding),
+ State),
+ {stop, normal, NewState}
end.
handle_response(#state{status = new} = State) ->
?hcrd("handle response - status = new", []),
- handle_response(check_persistent(State));
+ handle_response(try_to_enable_pipeline_or_keep_alive(State));
handle_response(#state{request = Request,
status = Status,
@@ -1218,6 +1226,7 @@ handle_response(#state{request = Request,
handle_queue(State#state{request = undefined}, Data);
{ok, Msg, Data} ->
?hcrd("handle response - ok", []),
+ stream_remaining_body(Body, Request, StatusLine),
end_stream(StatusLine, Request),
NewState = maybe_send_answer(Request, Msg, State),
handle_queue(NewState, Data);
@@ -1429,22 +1438,39 @@ is_keep_alive_enabled_server(_,_) ->
is_keep_alive_connection(Headers, #session{client_close = ClientClose}) ->
(not ((ClientClose) orelse httpc_response:is_server_closing(Headers))).
-check_persistent(
- #state{session = #session{type = Type} = Session,
+try_to_enable_pipeline_or_keep_alive(
+ #state{session = Session,
+ request = #request{method = Method},
status_line = {Version, _, _},
headers = Headers,
- profile_name = ProfileName} = State) ->
+ profile_name = ProfileName} = State) ->
+ ?hcrd("try to enable pipeline or keep-alive",
+ [{version, Version},
+ {headers, Headers},
+ {session, Session}]),
case is_keep_alive_enabled_server(Version, Headers) andalso
- is_keep_alive_connection(Headers, Session) of
+ is_keep_alive_connection(Headers, Session) of
true ->
- mark_persistent(ProfileName, Session),
- State#state{status = Type};
+ case (is_pipeline_enabled_client(Session) andalso
+ httpc_request:is_idempotent(Method)) of
+ true ->
+ insert_session(Session, ProfileName),
+ State#state{status = pipeline};
+ false ->
+ insert_session(Session, ProfileName),
+ %% Make sure type is keep_alive in session
+ %% as it in this case might be pipeline
+ NewSession = Session#session{type = keep_alive},
+ State#state{status = keep_alive,
+ session = NewSession}
+ end;
false ->
State#state{status = close}
end.
answer_request(#request{id = RequestId, from = From} = Request, Msg,
- #state{timers = Timers,
+ #state{session = Session,
+ timers = Timers,
profile_name = ProfileName} = State) ->
?hcrt("answer request", [{request, Request}, {msg, Msg}]),
httpc_response:send(From, Msg),
@@ -1454,14 +1480,19 @@ answer_request(#request{id = RequestId, from = From} = Request, Msg,
Timer = {RequestId, TimerRef},
cancel_timer(TimerRef, {timeout, Request#request.id}),
httpc_manager:request_done(RequestId, ProfileName),
+ NewSession = maybe_make_session_available(ProfileName, Session),
Timers2 = Timers#timers{request_timers = lists:delete(Timer,
RequestTimers)},
State#state{request = Request#request{from = answer_sent},
+ session = NewSession,
timers = Timers2}.
-mark_persistent(ProfileName, Session) ->
- update_session(ProfileName, Session, #session.persistent, true),
- Session#session{persistent = true}.
+maybe_make_session_available(ProfileName,
+ #session{available = false} = Session) ->
+ update_session(ProfileName, Session, #session.available, true),
+ Session#session{available = true};
+maybe_make_session_available(_ProfileName, Session) ->
+ Session.
cancel_timers(#timers{request_timers = ReqTmrs, queue_timer = QTmr}) ->
cancel_timer(QTmr, timeout_queue),
@@ -1626,6 +1657,10 @@ start_stream(_StatusLine, _Headers, Request) ->
?hcrt("start stream - no op", []),
{ok, Request}.
+stream_remaining_body(<<>>, _, _) ->
+ ok;
+stream_remaining_body(Body, Request, {_, Code, _}) ->
+ stream(Body, Request, Code).
%% Note the end stream message is handled by httpc_response and will
%% be sent by answer_request
@@ -1829,7 +1864,7 @@ update_session(ProfileName, #session{id = SessionId} = Session, Pos, Value) ->
[ProfileName, SessionId, Pos, Value,
(catch httpc_manager:which_session_info(ProfileName)),
Session,
- (catch httpc_manager:lookup_session(ProfileName, SessionId)),
+ (catch httpc_manager:lookup_session(SessionId, ProfileName)),
T, E]),
exit({failed_updating_session,
[{profile, ProfileName},
diff --git a/lib/inets/src/http_client/httpc_internal.hrl b/lib/inets/src/http_client/httpc_internal.hrl
index d5b3dd2a2a..add5d11dfa 100644
--- a/lib/inets/src/http_client/httpc_internal.hrl
+++ b/lib/inets/src/http_client/httpc_internal.hrl
@@ -1,7 +1,7 @@
%%
%% %CopyrightBegin%
%%
-%% Copyright Ericsson AB 2005-2013. All Rights Reserved.
+%% Copyright Ericsson AB 2005-2014. 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
@@ -143,8 +143,8 @@
%% true | false
%% This will be true, when a response has been received for
- %% the first request and the server has not closed the connection
- persistent = false
+ %% the first request. See type above.
+ available = false
}).
diff --git a/lib/inets/src/http_client/httpc_manager.erl b/lib/inets/src/http_client/httpc_manager.erl
index a3ed371e61..48a9c32454 100644
--- a/lib/inets/src/http_client/httpc_manager.erl
+++ b/lib/inets/src/http_client/httpc_manager.erl
@@ -1,7 +1,7 @@
%%
%% %CopyrightBegin%
%%
-%% Copyright Ericsson AB 2002-2013. All Rights Reserved.
+%% Copyright Ericsson AB 2002-2014. 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
@@ -451,7 +451,7 @@ do_init(ProfileName, CookiesDir) ->
%%--------------------------------------------------------------------
handle_call({request, Request}, _, State) ->
?hcri("request", [{request, Request}]),
- case (catch handle_request(Request, State, false)) of
+ case (catch handle_request(Request, State)) of
{reply, Msg, NewState} ->
{reply, Msg, NewState};
Error ->
@@ -511,7 +511,7 @@ handle_cast({retry_or_redirect_request, {Time, Request}},
{noreply, State};
handle_cast({retry_or_redirect_request, Request}, State) ->
- case (catch handle_request(Request, State, true)) of
+ case (catch handle_request(Request, State)) of
{reply, {ok, _}, NewState} ->
{noreply, NewState};
Error ->
@@ -724,7 +724,7 @@ get_handler_info(Tab) ->
handle_request(#request{settings =
#http_options{version = "HTTP/0.9"}} = Request,
- State, _) ->
+ State) ->
%% Act as an HTTP/0.9 client that does not know anything
%% about persistent connections
@@ -737,7 +737,7 @@ handle_request(#request{settings =
handle_request(#request{settings =
#http_options{version = "HTTP/1.0"}} = Request,
- State, _) ->
+ State) ->
%% Act as an HTTP/1.0 client that does not
%% use persistent connections
@@ -748,13 +748,13 @@ handle_request(#request{settings =
start_handler(NewRequest#request{headers = NewHeaders}, State),
{reply, {ok, NewRequest#request.id}, State};
-handle_request(Request, State = #state{options = Options}, Retry) ->
+handle_request(Request, State = #state{options = Options}) ->
NewRequest = handle_cookies(generate_request_id(Request), State),
SessionType = session_type(Options),
case select_session(Request#request.method,
Request#request.address,
- Request#request.scheme, SessionType, State, Retry) of
+ Request#request.scheme, SessionType, State) of
{ok, HandlerPid} ->
pipeline_or_keep_alive(NewRequest, HandlerPid, State);
no_connection ->
@@ -778,7 +778,6 @@ start_handler(#request{id = Id,
#state{profile_name = ProfileName,
handler_db = HandlerDb,
options = Options}) ->
- ClientClose = httpc_request:is_client_closing(Request#request.headers),
{ok, Pid} =
case is_inets_manager() of
true ->
@@ -789,18 +788,13 @@ start_handler(#request{id = Id,
end,
HandlerInfo = {Id, Pid, From},
ets:insert(HandlerDb, HandlerInfo),
- insert_session(#session{id = {Request#request.address, Pid},
- scheme = Request#request.scheme,
- client_close = ClientClose,
- type = session_type(Options)
- }, ProfileName),
erlang:monitor(process, Pid).
select_session(Method, HostPort, Scheme, SessionType,
#state{options = #options{max_pipeline_length = MaxPipe,
max_keep_alive_length = MaxKeepAlive},
- session_db = SessionDb}, Retry) ->
+ session_db = SessionDb}) ->
?hcrd("select session", [{session_type, SessionType},
{max_pipeline_length, MaxPipe},
{max_keep_alive_length, MaxKeepAlive}]),
@@ -813,23 +807,13 @@ select_session(Method, HostPort, Scheme, SessionType,
%% client_close, scheme and type specified.
%% The fields id (part of: HandlerPid) and queue_length
%% specified.
- Pattern = case (Retry andalso SessionType == pipeline) of
- true ->
- #session{id = {HostPort, '$1'},
- client_close = false,
- scheme = Scheme,
- queue_length = '$2',
- type = SessionType,
- persistent = true,
- _ = '_'};
- false ->
- #session{id = {HostPort, '$1'},
- client_close = false,
- scheme = Scheme,
- queue_length = '$2',
- type = SessionType,
- _ = '_'}
- end,
+ Pattern = #session{id = {HostPort, '$1'},
+ client_close = false,
+ scheme = Scheme,
+ queue_length = '$2',
+ type = SessionType,
+ available = true,
+ _ = '_'},
%% {'_', {HostPort, '$1'}, false, Scheme, '_', '$2', SessionTyp},
Candidates = ets:match(SessionDb, Pattern),
?hcrd("select session", [{host_port, HostPort},
diff --git a/lib/inets/src/http_lib/http_internal.hrl b/lib/inets/src/http_lib/http_internal.hrl
index 97cf474ab9..53b776c4e7 100644
--- a/lib/inets/src/http_lib/http_internal.hrl
+++ b/lib/inets/src/http_lib/http_internal.hrl
@@ -1,7 +1,7 @@
%%
%% %CopyrightBegin%
%%
-%% Copyright Ericsson AB 2002-2011. All Rights Reserved.
+%% Copyright Ericsson AB 2002-2014. 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
@@ -26,6 +26,8 @@
-define(HTTP_MAX_BODY_SIZE, nolimit).
-define(HTTP_MAX_HEADER_SIZE, 10240).
-define(HTTP_MAX_URI_SIZE, nolimit).
+-define(HTTP_MAX_VERSION_STRING, 8).
+-define(HTTP_MAX_METHOD_STRING, 20).
-ifndef(HTTP_DEFAULT_SSL_KIND).
-define(HTTP_DEFAULT_SSL_KIND, essl).
diff --git a/lib/inets/src/http_lib/http_request.erl b/lib/inets/src/http_lib/http_request.erl
index aa9f9f6774..f295453bdd 100644
--- a/lib/inets/src/http_lib/http_request.erl
+++ b/lib/inets/src/http_lib/http_request.erl
@@ -1,7 +1,7 @@
%%
%% %CopyrightBegin%
%%
-%% Copyright Ericsson AB 2005-2013. All Rights Reserved.
+%% Copyright Ericsson AB 2005-2014. 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
@@ -40,9 +40,6 @@ headers([Header | Tail], Headers) ->
headers(Tail, headers(http_util:to_lower(string:strip(Key)),
string:strip(Value), Headers));
{_, []} ->
- Report = io_lib:format("Ignored invalid HTTP-header: ~p~n",
- [Header]),
- error_logger:error_report(Report),
headers(Tail, Headers)
end.
diff --git a/lib/inets/src/http_server/Makefile b/lib/inets/src/http_server/Makefile
index 67555d5f1c..2660d04d16 100644
--- a/lib/inets/src/http_server/Makefile
+++ b/lib/inets/src/http_server/Makefile
@@ -1,7 +1,7 @@
#
# %CopyrightBegin%
#
-# Copyright Ericsson AB 2005-2012. All Rights Reserved.
+# Copyright Ericsson AB 2005-2013. 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
@@ -43,6 +43,7 @@ MODULES = \
httpd \
httpd_acceptor \
httpd_acceptor_sup \
+ httpd_connection_sup\
httpd_cgi \
httpd_conf \
httpd_example \
diff --git a/lib/inets/src/http_server/httpd.erl b/lib/inets/src/http_server/httpd.erl
index 93608dbf96..e8148ea362 100644
--- a/lib/inets/src/http_server/httpd.erl
+++ b/lib/inets/src/http_server/httpd.erl
@@ -1,7 +1,7 @@
%%
%% %CopyrightBegin%
%%
-%% Copyright Ericsson AB 1997-2010. All Rights Reserved.
+%% Copyright Ericsson AB 1997-2014. 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
@@ -36,13 +36,6 @@
%% API
-export([parse_query/1, reload_config/2, info/1, info/2, info/3]).
-%% Internal debugging and status info stuff...
--export([
- get_status/1, get_status/2, get_status/3,
- get_admin_state/0, get_admin_state/1, get_admin_state/2,
- get_usage_state/0, get_usage_state/1, get_usage_state/2
- ]).
-
%%%========================================================================
%%% API
%%%========================================================================
@@ -296,227 +289,22 @@ make_name(Addr, Port) ->
httpd_util:make_name("httpd", Addr, Port).
-%%%--------------------------------------------------------------
-%%% Internal debug functions - Do we want these functions here!?
-%%%--------------------------------------------------------------------
-
-%%% =========================================================
-%%% Function: get_admin_state/0, get_admin_state/1, get_admin_state/2
-%%% get_admin_state()
-%%% get_admin_state(Port)
-%%% get_admin_state(Addr,Port)
-%%%
-%%% Returns: {ok,State} | {error,Reason}
-%%%
-%%% Description: This function is used to retrieve the administrative
-%%% state of the HTTP server.
-%%%
-%%% Types: Port -> integer()
-%%% Addr -> {A,B,C,D} | string() | undefined
-%%% State -> unblocked | shutting_down | blocked
-%%% Reason -> term()
-%%%
-get_admin_state() -> get_admin_state(undefined,8888).
-get_admin_state(Port) when is_integer(Port) -> get_admin_state(undefined,Port);
-
-get_admin_state(ConfigFile) when is_list(ConfigFile) ->
- case get_addr_and_port(ConfigFile) of
- {ok,Addr,Port} ->
- unblock(Addr,Port);
- Error ->
- Error
- end.
-
-get_admin_state(Addr,Port) when is_integer(Port) ->
- Name = make_name(Addr,Port),
- case whereis(Name) of
- Pid when is_pid(Pid) ->
- httpd_manager:get_admin_state(Pid);
- _ ->
- {error,not_started}
- end.
-
-
-
-%%% =========================================================
-%%% Function: get_usage_state/0, get_usage_state/1, get_usage_state/2
-%%% get_usage_state()
-%%% get_usage_state(Port)
-%%% get_usage_state(Addr,Port)
-%%%
-%%% Returns: {ok,State} | {error,Reason}
-%%%
-%%% Description: This function is used to retrieve the usage
-%%% state of the HTTP server.
-%%%
-%%% Types: Port -> integer()
-%%% Addr -> {A,B,C,D} | string() | undefined
-%%% State -> idle | active | busy
-%%% Reason -> term()
-%%%
-get_usage_state() -> get_usage_state(undefined,8888).
-get_usage_state(Port) when is_integer(Port) -> get_usage_state(undefined,Port);
-
-get_usage_state(ConfigFile) when is_list(ConfigFile) ->
- case get_addr_and_port(ConfigFile) of
- {ok,Addr,Port} ->
- unblock(Addr,Port);
- Error ->
- Error
- end.
-
-get_usage_state(Addr,Port) when is_integer(Port) ->
- Name = make_name(Addr,Port),
- case whereis(Name) of
- Pid when is_pid(Pid) ->
- httpd_manager:get_usage_state(Pid);
- _ ->
- {error,not_started}
- end.
-
-
-
-%%% =========================================================
-%% Function: get_status(ConfigFile) -> Status
-%% get_status(Port) -> Status
-%% get_status(Addr,Port) -> Status
-%% get_status(Port,Timeout) -> Status
-%% get_status(Addr,Port,Timeout) -> Status
-%%
-%% Arguments: ConfigFile -> string()
-%% Configuration file from which Port and
-%% BindAddress will be extracted.
-%% Addr -> {A,B,C,D} | string()
-%% Bind Address of the http server
-%% Port -> integer()
-%% Port number of the http server
-%% Timeout -> integer()
-%% Timeout time for the call
-%%
-%% Returns: Status -> list()
-%%
-%% Description: This function is used when the caller runs in the
-%% same node as the http server or if calling with a
-%% program such as erl_call (see erl_interface).
-%%
-
-get_status(ConfigFile) when is_list(ConfigFile) ->
- case get_addr_and_port(ConfigFile) of
- {ok,Addr,Port} ->
- get_status(Addr,Port);
- Error ->
- Error
- end;
-
-get_status(Port) when is_integer(Port) ->
- get_status(undefined,Port,5000).
-
-get_status(Port,Timeout) when is_integer(Port) andalso is_integer(Timeout) ->
- get_status(undefined,Port,Timeout);
-
-get_status(Addr,Port) ->
- get_status(Addr,Port,5000).
-
-get_status(Addr,Port,Timeout) when is_integer(Port) ->
- Name = make_name(Addr,Port),
- case whereis(Name) of
- Pid when is_pid(Pid) ->
- httpd_manager:get_status(Pid,Timeout);
- _ ->
- not_started
- end.
-
do_reload_config(ConfigList, Mode) ->
case (catch httpd_conf:validate_properties(ConfigList)) of
{ok, Config} ->
Address = proplists:get_value(bind_address, Config, any),
Port = proplists:get_value(port, Config, 80),
- block(Address, Port, Mode),
- reload(Config, Address, Port),
- unblock(Address, Port);
+ case block(Address, Port, Mode) of
+ ok ->
+ reload(Config, Address, Port),
+ unblock(Address, Port);
+ Error ->
+ Error
+ end;
Error ->
Error
end.
-
%%%--------------------------------------------------------------
%%% Deprecated
%%%--------------------------------------------------------------
-
-%% start() ->
-%% start("/var/tmp/server_root/conf/8888.conf").
-
-%% start(ConfigFile) ->
-%% {ok, Pid} = inets:start(httpd, ConfigFile, stand_alone),
-%% unlink(Pid),
-%% {ok, Pid}.
-
-%% start_link() ->
-%% start("/var/tmp/server_root/conf/8888.conf").
-
-%% start_link(ConfigFile) when is_list(ConfigFile) ->
-%% inets:start(httpd, ConfigFile, stand_alone).
-
-%% stop() ->
-%% stop(8888).
-
-%% stop(Port) when is_integer(Port) ->
-%% stop(undefined, Port);
-%% stop(Pid) when is_pid(Pid) ->
-%% old_stop(Pid);
-%% stop(ConfigFile) when is_list(ConfigFile) ->
-%% old_stop(ConfigFile).
-
-%% stop(Addr, Port) when is_integer(Port) ->
-%% old_stop(Addr, Port).
-
-%% start_child() ->
-%% start_child("/var/tmp/server_root/conf/8888.conf").
-
-%% start_child(ConfigFile) ->
-%% httpd_sup:start_child(ConfigFile).
-
-%% stop_child() ->
-%% stop_child(8888).
-
-%% stop_child(Port) ->
-%% stop_child(undefined, Port).
-
-%% stop_child(Addr, Port) when is_integer(Port) ->
-%% httpd_sup:stop_child(Addr, Port).
-
-%% restart() -> reload(undefined, 8888).
-
-%% restart(Port) when is_integer(Port) ->
-%% reload(undefined, Port).
-%% restart(Addr, Port) ->
-%% reload(Addr, Port).
-
-%% old_stop(Pid) when is_pid(Pid) ->
-%% do_stop(Pid);
-%% old_stop(ConfigFile) when is_list(ConfigFile) ->
-%% case get_addr_and_port(ConfigFile) of
-%% {ok, Addr, Port} ->
-%% old_stop(Addr, Port);
-
-%% Error ->
-%% Error
-%% end;
-%% old_stop(_StartArgs) ->
-%% ok.
-
-%% old_stop(Addr, Port) when is_integer(Port) ->
-%% Name = old_make_name(Addr, Port),
-%% case whereis(Name) of
-%% Pid when is_pid(Pid) ->
-%% do_stop(Pid),
-%% ok;
-%% _ ->
-%% not_started
-%% end.
-
-%% do_stop(Pid) ->
-%% exit(Pid, shutdown).
-
-%% old_make_name(Addr,Port) ->
-%% httpd_util:make_name("httpd_instance_sup",Addr,Port).
diff --git a/lib/inets/src/http_server/httpd_acceptor.erl b/lib/inets/src/http_server/httpd_acceptor.erl
index 1bffcc1f12..e812bc76f5 100644
--- a/lib/inets/src/http_server/httpd_acceptor.erl
+++ b/lib/inets/src/http_server/httpd_acceptor.erl
@@ -21,13 +21,13 @@
-include("httpd.hrl").
-include("httpd_internal.hrl").
--include("inets_internal.hrl").
+%%-include("inets_internal.hrl").
%% Internal application API
--export([start_link/6, start_link/7]).
+-export([start_link/7, start_link/8]).
%% Other exports (for spawn's etc.)
--export([acceptor_init/7, acceptor_init/8, acceptor_loop/6]).
+-export([acceptor_init/8, acceptor_init/9, acceptor_loop/8]).
%%
%% External API
@@ -36,51 +36,52 @@
%% start_link
start_link(Manager, SocketType, Addr, Port, IpFamily, ConfigDb, AcceptTimeout) ->
- ?hdrd("start link",
- [{manager, Manager},
- {socket_type, SocketType},
- {address, Addr},
- {port, Port},
- {timeout, AcceptTimeout}]),
+ %% ?hdrd("start link",
+ %% [{manager, Manager},
+ %% {socket_type, SocketType},
+ %% {address, Addr},
+ %% {port, Port},
+ %% {timeout, AcceptTimeout}]),
Args = [self(), Manager, SocketType, Addr, Port, IpFamily, ConfigDb, AcceptTimeout],
proc_lib:start_link(?MODULE, acceptor_init, Args).
-start_link(Manager, SocketType, ListenSocket, IpFamily, ConfigDb, AcceptTimeout) ->
- ?hdrd("start link",
- [{manager, Manager},
- {socket_type, SocketType},
- {listen_socket, ListenSocket},
- {timeout, AcceptTimeout}]),
- Args = [self(), Manager, SocketType, ListenSocket, IpFamily,
+start_link(Manager, SocketType, Addr, Port, ListenSocket, IpFamily, ConfigDb, AcceptTimeout) ->
+ %% ?hdrd("start link",
+ %% [{manager, Manager},
+ %% {socket_type, SocketType},
+ %% {listen_socket, ListenSocket},
+ %% {timeout, AcceptTimeout}]),
+ Args = [self(), Manager, SocketType, Addr, Port, ListenSocket, IpFamily,
ConfigDb, AcceptTimeout],
proc_lib:start_link(?MODULE, acceptor_init, Args).
-acceptor_init(Parent, Manager, SocketType, {ListenOwner, ListenSocket}, IpFamily,
+acceptor_init(Parent, Manager, SocketType, Addr, Port, {ListenOwner, ListenSocket}, IpFamily,
ConfigDb, AcceptTimeout) ->
- ?hdrd("acceptor init",
- [{parent, Parent},
- {manager, Manager},
- {socket_type, SocketType},
- {listen_owner, ListenOwner},
- {listen_socket, ListenSocket},
- {timeout, AcceptTimeout}]),
+ %% ?hdrd("acceptor init",
+ %% [{parent, Parent},
+ %% {manager, Manager},
+ %% {socket_type, SocketType},
+ %% {listen_owner, ListenOwner},
+ %% {listen_socket, ListenSocket},
+ %% {timeout, AcceptTimeout}]),
link(ListenOwner),
proc_lib:init_ack(Parent, {ok, self()}),
- acceptor_loop(Manager, SocketType, ListenSocket, IpFamily, ConfigDb, AcceptTimeout).
+ acceptor_loop(Manager, SocketType, Addr, Port,
+ ListenSocket, IpFamily, ConfigDb, AcceptTimeout).
acceptor_init(Parent, Manager, SocketType, Addr, Port, IpFamily,
ConfigDb, AcceptTimeout) ->
- ?hdrd("acceptor init",
- [{parent, Parent},
- {manager, Manager},
- {socket_type, SocketType},
- {address, Addr},
- {port, Port},
- {timeout, AcceptTimeout}]),
+ %% ?hdrd("acceptor init",
+ %% [{parent, Parent},
+ %% {manager, Manager},
+ %% {socket_type, SocketType},
+ %% {address, Addr},
+ %% {port, Port},
+ %% {timeout, AcceptTimeout}]),
case (catch do_init(SocketType, Addr, Port, IpFamily)) of
{ok, ListenSocket} ->
proc_lib:init_ack(Parent, {ok, self()}),
- acceptor_loop(Manager, SocketType,
+ acceptor_loop(Manager, SocketType, Addr, Port,
ListenSocket, IpFamily,ConfigDb, AcceptTimeout);
Error ->
proc_lib:init_ack(Parent, Error),
@@ -88,67 +89,68 @@ acceptor_init(Parent, Manager, SocketType, Addr, Port, IpFamily,
end.
do_init(SocketType, Addr, Port, IpFamily) ->
- ?hdrt("do init", []),
+ %% ?hdrt("do init", []),
do_socket_start(SocketType),
ListenSocket = do_socket_listen(SocketType, Addr, Port, IpFamily),
{ok, ListenSocket}.
do_socket_start(SocketType) ->
- ?hdrt("do socket start", []),
+ %% ?hdrt("do socket start", []),
case http_transport:start(SocketType) of
ok ->
ok;
{error, Reason} ->
- ?hdrv("failed starting transport", [{reason, Reason}]),
+ %% ?hdrv("failed starting transport", [{reason, Reason}]),
throw({error, {socket_start_failed, Reason}})
end.
do_socket_listen(SocketType, Addr, Port, IpFamily) ->
- ?hdrt("do socket listen", []),
+ %% ?hdrt("do socket listen", []),
case http_transport:listen(SocketType, Addr, Port, IpFamily) of
{ok, ListenSocket} ->
ListenSocket;
{error, Reason} ->
- ?hdrv("listen failed", [{reason, Reason},
- {socket_type, SocketType},
- {addr, Addr},
- {port, Port}]),
+ %% ?hdrv("listen failed", [{reason, Reason},
+ %% {socket_type, SocketType},
+ %% {addr, Addr},
+ %% {port, Port}]),
throw({error, {listen, Reason}})
end.
%% acceptor
-acceptor_loop(Manager, SocketType, ListenSocket, IpFamily, ConfigDb, AcceptTimeout) ->
- ?hdrd("awaiting accept",
- [{manager, Manager},
- {socket_type, SocketType},
- {listen_socket, ListenSocket},
- {timeout, AcceptTimeout}]),
+acceptor_loop(Manager, SocketType, Addr, Port, ListenSocket, IpFamily, ConfigDb, AcceptTimeout) ->
+ %% ?hdrd("awaiting accept",
+ %% [{manager, Manager},
+ %% {socket_type, SocketType},
+ %% {listen_socket, ListenSocket},
+ %% {timeout, AcceptTimeout}]),
case (catch http_transport:accept(SocketType, ListenSocket, 50000)) of
{ok, Socket} ->
- ?hdrv("accepted", [{socket, Socket}]),
- handle_connection(Manager, ConfigDb, AcceptTimeout,
+ %% ?hdrv("accepted", [{socket, Socket}]),
+ handle_connection(Addr, Port, Manager, ConfigDb, AcceptTimeout,
SocketType, Socket),
- ?MODULE:acceptor_loop(Manager, SocketType,
+ ?MODULE:acceptor_loop(Manager, SocketType, Addr, Port,
ListenSocket, IpFamily, ConfigDb,AcceptTimeout);
{error, Reason} ->
- ?hdri("accept failed", [{reason, Reason}]),
+ %% ?hdri("accept failed", [{reason, Reason}]),
handle_error(Reason, ConfigDb),
- ?MODULE:acceptor_loop(Manager, SocketType, ListenSocket,
+ ?MODULE:acceptor_loop(Manager, SocketType, Addr, Port, ListenSocket,
IpFamily, ConfigDb, AcceptTimeout);
{'EXIT', Reason} ->
- ?hdri("accept exited", [{reason, Reason}]),
+ %% ?hdri("accept exited", [{reason, Reason}]),
ReasonString =
lists:flatten(io_lib:format("Accept exit: ~p", [Reason])),
accept_failed(ConfigDb, ReasonString)
end.
-handle_connection(Manager, ConfigDb, AcceptTimeout, SocketType, Socket) ->
- {ok, Pid} = httpd_request_handler:start(Manager, ConfigDb, AcceptTimeout),
+handle_connection(Address, Port, Manager, ConfigDb, AcceptTimeout, SocketType, Socket) ->
+ Sup = httpd_connection_sup:connection_sup(Address, Port),
+ {ok, Pid} = httpd_connection_sup:start_child(Sup, [Manager, ConfigDb, AcceptTimeout]),
http_transport:controlling_process(SocketType, Socket, Pid),
httpd_request_handler:socket_ownership_transfered(Pid, SocketType, Socket).
diff --git a/lib/inets/src/http_server/httpd_acceptor_sup.erl b/lib/inets/src/http_server/httpd_acceptor_sup.erl
index df837b5a24..cc2b582b52 100644
--- a/lib/inets/src/http_server/httpd_acceptor_sup.erl
+++ b/lib/inets/src/http_server/httpd_acceptor_sup.erl
@@ -27,7 +27,8 @@
-behaviour(supervisor).
%% API
--export([start_link/2, start_acceptor/6, start_acceptor/7, stop_acceptor/2]).
+-export([start_link/1]).
+%%, start_acceptor/6, start_acceptor/7, stop_acceptor/2]).
%% Supervisor callback
-export([init/1]).
@@ -35,63 +36,48 @@
%%%=========================================================================
%%% API
%%%=========================================================================
-start_link(Addr, Port) ->
+start_link([Addr, Port| _] = Args) ->
SupName = make_name(Addr, Port),
- supervisor:start_link({local, SupName}, ?MODULE, []).
-
-%%----------------------------------------------------------------------
-%% Function: [start|stop]_acceptor/5
-%% Description: Starts/stops an [auth | security] worker (child) process
-%%----------------------------------------------------------------------
-start_acceptor(SocketType, Addr, Port, IpFamily, ConfigDb, AcceptTimeout) ->
- start_worker(httpd_acceptor, SocketType, Addr, Port, IpFamily,
- ConfigDb, AcceptTimeout, self(), []).
-start_acceptor(SocketType, Addr, Port, IpFamily, ConfigDb, AcceptTimeout, ListenSocket) ->
- start_worker(httpd_acceptor, SocketType, Addr, Port, IpFamily,
- ConfigDb, AcceptTimeout, ListenSocket, self(), []).
-
-
-stop_acceptor(Addr, Port) ->
- stop_worker(httpd_acceptor, Addr, Port).
+ supervisor:start_link({local, SupName}, ?MODULE, [Args]).
%%%=========================================================================
%%% Supervisor callback
%%%=========================================================================
-init(_) ->
- Flags = {one_for_one, 500, 100},
- Workers = [],
- {ok, {Flags, Workers}}.
+init([Args]) ->
+ RestartStrategy = one_for_one,
+ MaxR = 10,
+ MaxT = 3600,
+ Children = [child_spec(Args)],
+ {ok, {{RestartStrategy, MaxR, MaxT}, Children}}.
%%%=========================================================================
%%% Internal functions
%%%=========================================================================
+child_spec([Address, Port, ConfigList, AcceptTimeout, ListenInfo]) ->
+ Name = id(Address, Port),
+ Manager = httpd_util:make_name("httpd", Address, Port),
+ SockType = proplists:get_value(socket_type, ConfigList, ip_comm),
+ IpFamily = proplists:get_value(ipfamily, ConfigList, inet),
+ StartFunc = case ListenInfo of
+ undefined ->
+ {httpd_acceptor, start_link, [Manager, SockType, Address, Port, IpFamily,
+ httpd_util:make_name("httpd_conf", Address, Port),
+ AcceptTimeout]};
+ _ ->
+ {httpd_acceptor, start_link, [Manager, SockType, Address, Port, ListenInfo,
+ IpFamily,
+ httpd_util:make_name("httpd_conf", Address, Port),
+ AcceptTimeout]}
+ end,
+ Restart = transient,
+ Shutdown = brutal_kill,
+ Modules = [httpd_acceptor],
+ Type = worker,
+ {Name, StartFunc, Restart, Shutdown, Type, Modules}.
-make_name(Addr,Port) ->
- httpd_util:make_name("httpd_acc_sup", Addr, Port).
+id(Address, Port) ->
+ {httpd_acceptor_sup, Address, Port}.
-start_worker(M, SocketType, Addr, Port, IpFamily, ConfigDB, AcceptTimeout, Manager, Modules) ->
- SupName = make_name(Addr, Port),
- Args = [Manager, SocketType, Addr, Port, IpFamily, ConfigDB, AcceptTimeout],
- Spec = {{M, Addr, Port},
- {M, start_link, Args},
- permanent, timer:seconds(1), worker, [M] ++ Modules},
- supervisor:start_child(SupName, Spec).
-
-start_worker(M, SocketType, Addr, Port, IpFamily, ConfigDB, AcceptTimeout, ListenSocket,
- Manager, Modules) ->
- SupName = make_name(Addr, Port),
- Args = [Manager, SocketType, ListenSocket, IpFamily, ConfigDB, AcceptTimeout],
- Spec = {{M, Addr, Port},
- {M, start_link, Args},
- permanent, timer:seconds(1), worker, [M] ++ Modules},
- supervisor:start_child(SupName, Spec).
+make_name(Addr,Port) ->
+ httpd_util:make_name("httpd_acceptor_sup", Addr, Port).
-stop_worker(M, Addr, Port) ->
- SupName = make_name(Addr, Port),
- Name = {M, Addr, Port},
- case supervisor:terminate_child(SupName, Name) of
- ok ->
- supervisor:delete_child(SupName, Name);
- Error ->
- Error
- end.
diff --git a/lib/inets/src/http_server/httpd_connection_sup.erl b/lib/inets/src/http_server/httpd_connection_sup.erl
new file mode 100644
index 0000000000..48c2d8f076
--- /dev/null
+++ b/lib/inets/src/http_server/httpd_connection_sup.erl
@@ -0,0 +1,68 @@
+%%
+%% %CopyrightBegin%
+%%
+%% Copyright Ericsson AB 2008-2014. 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%
+%%
+%%
+%%----------------------------------------------------------------------
+%% Purpose: Ssh connection supervisor.
+%%----------------------------------------------------------------------
+
+-module(httpd_connection_sup).
+
+-behaviour(supervisor).
+
+%% API
+-export([start_link/1]).
+-export([start_child/2, connection_sup/2]).
+
+%% Supervisor callback
+-export([init/1]).
+
+%%%=========================================================================
+%%% API
+%%%=========================================================================
+start_link(Args) ->
+ supervisor:start_link(?MODULE, [Args]).
+
+start_child(Sup, Args) ->
+ supervisor:start_child(Sup, Args).
+
+connection_sup(Addr, Port) ->
+ httpd_util:make_name("httpd_connection_sup", Addr, Port).
+
+%%%=========================================================================
+%%% Supervisor callback
+%%%=========================================================================
+init([[Addr, Port]]) ->
+ RegName = connection_sup(Addr, Port),
+ register(RegName, self()),
+ RestartStrategy = simple_one_for_one,
+ MaxR = 0,
+ MaxT = 3600,
+
+ Name = undefined, % As simple_one_for_one is used.
+ StartFunc = {httpd_request_handler, start_link, []},
+ Restart = temporary, % E.g. should not be restarted
+ Shutdown = 4000,
+ Modules = [httpd_request_handler],
+ Type = worker,
+
+ ChildSpec = {Name, StartFunc, Restart, Shutdown, Type, Modules},
+ {ok, {{RestartStrategy, MaxR, MaxT}, [ChildSpec]}}.
+
+
+
diff --git a/lib/inets/src/http_server/httpd_example.erl b/lib/inets/src/http_server/httpd_example.erl
index 16a080f8e2..6fc07f033c 100644
--- a/lib/inets/src/http_server/httpd_example.erl
+++ b/lib/inets/src/http_server/httpd_example.erl
@@ -1,7 +1,7 @@
%%
%% %CopyrightBegin%
%%
-%% Copyright Ericsson AB 1997-2009. All Rights Reserved.
+%% Copyright Ericsson AB 1997-2014. 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
@@ -66,7 +66,7 @@ get_bin(_Env,_Input) ->
<INPUT TYPE=\"text\" NAME=\"input2\">
<INPUT TYPE=\"submit\"><BR>
</FORM>" ++ "\n"),
- footer()].
+ list_to_binary(footer())].
post(_Env,[]) ->
[header(),
diff --git a/lib/inets/src/http_server/httpd_instance_sup.erl b/lib/inets/src/http_server/httpd_instance_sup.erl
index baa60d318c..b95be44b2a 100644
--- a/lib/inets/src/http_server/httpd_instance_sup.erl
+++ b/lib/inets/src/http_server/httpd_instance_sup.erl
@@ -1,7 +1,7 @@
%%
%% %CopyrightBegin%
%%
-%% Copyright Ericsson AB 2001-2010. All Rights Reserved.
+%% Copyright Ericsson AB 2001-2013. 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
@@ -100,7 +100,9 @@ start_link(ConfigFile, AcceptTimeout, ListenInfo, Debug) ->
init([ConfigFile, ConfigList, AcceptTimeout, Debug, Address, Port]) ->
httpd_util:enable_debug(Debug),
Flags = {one_for_one, 0, 1},
- Children = [sup_spec(httpd_acceptor_sup, Address, Port),
+ Children = [httpd_connection_sup_spec(Address, Port),
+ httpd_acceptor_sup_spec(Address, Port, ConfigList, AcceptTimeout,
+ undefined),
sup_spec(httpd_misc_sup, Address, Port),
worker_spec(httpd_manager, Address, Port,
ConfigFile, ConfigList,AcceptTimeout)],
@@ -108,7 +110,9 @@ init([ConfigFile, ConfigList, AcceptTimeout, Debug, Address, Port]) ->
init([ConfigFile, ConfigList, AcceptTimeout, Debug, Address, Port, ListenInfo]) ->
httpd_util:enable_debug(Debug),
Flags = {one_for_one, 0, 1},
- Children = [sup_spec(httpd_acceptor_sup, Address, Port),
+ Children = [httpd_connection_sup_spec(Address, Port),
+ httpd_acceptor_sup_spec(Address, Port, ConfigList, AcceptTimeout,
+ ListenInfo),
sup_spec(httpd_misc_sup, Address, Port),
worker_spec(httpd_manager, Address, Port, ListenInfo,
ConfigFile, ConfigList, AcceptTimeout)],
@@ -118,6 +122,24 @@ init([ConfigFile, ConfigList, AcceptTimeout, Debug, Address, Port, ListenInfo])
%%%=========================================================================
%%% Internal functions
%%%=========================================================================
+httpd_connection_sup_spec(Address, Port) ->
+ Name = {httpd_connection_sup, Address, Port},
+ StartFunc = {httpd_connection_sup, start_link, [[Address, Port]]},
+ Restart = permanent,
+ Shutdown = 5000,
+ Modules = [httpd_connection_sup],
+ Type = supervisor,
+ {Name, StartFunc, Restart, Shutdown, Type, Modules}.
+
+httpd_acceptor_sup_spec(Address, Port, ConfigList, AcceptTimeout, ListenInfo) ->
+ Name = {httpd_acceptor_sup, Address, Port},
+ StartFunc = {httpd_acceptor_sup, start_link, [[Address, Port, ConfigList, AcceptTimeout, ListenInfo]]},
+ Restart = permanent,
+ Shutdown = infinity,
+ Modules = [httpd_acceptor_sup],
+ Type = supervisor,
+ {Name, StartFunc, Restart, Shutdown, Type, Modules}.
+
sup_spec(SupModule, Address, Port) ->
Name = {SupModule, Address, Port},
StartFunc = {SupModule, start_link, [Address, Port]},
@@ -167,5 +189,3 @@ file_2_config(ConfigFile) ->
Error ->
Error
end.
-
-
diff --git a/lib/inets/src/http_server/httpd_manager.erl b/lib/inets/src/http_server/httpd_manager.erl
index 00384fa108..3da0343401 100644
--- a/lib/inets/src/http_server/httpd_manager.erl
+++ b/lib/inets/src/http_server/httpd_manager.erl
@@ -1,7 +1,7 @@
%%
%% %CopyrightBegin%
%%
-%% Copyright Ericsson AB 2000-2013. All Rights Reserved.
+%% Copyright Ericsson AB 2000-2014. 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
@@ -25,11 +25,11 @@
-behaviour(gen_server).
%% Application internal API
--export([start/2, start_link/2, start_link/3, start_link/4, stop/1, reload/2]).
--export([new_connection/1, done_connection/1]).
--export([config_lookup/2, config_lookup/3,
- config_multi_lookup/2, config_multi_lookup/3,
- config_match/2, config_match/3]).
+-export([start/2, start_link/2, start_link/3, start_link/4,
+ stop/1, reload/2]).
+-export([new_connection/1]).
+-export([config_match/2, config_match/3]).
+-export([block/2, block/3, unblock/1]).
%% gen_server exports
-export([init/1,
@@ -37,34 +37,19 @@
terminate/2,
code_change/3]).
-
-%% Management exports
--export([block/2, block/3, unblock/1]).
--export([get_admin_state/1, get_usage_state/1]).
--export([is_busy/1,is_busy/2,is_busy_or_blocked/1,is_blocked/1]). %% ???????
--export([get_status/1, get_status/2]).
-
--export([c/1]).
-
-record(state,{socket_type = ip_comm,
config_file,
config_db = null,
- connections, %% Current request handlers
+ connection_sup,
admin_state = unblocked,
blocker_ref = undefined,
- blocking_tmr = undefined,
+ blocking_from = undefined,
+ shutdown_poller = undefined,
status = []}).
+%%%--------------------------------------------------------------------
+%%% Application internal API
+%%%--------------------------------------------------------------------
-
-%%TODO: Clean up this module!
-
-c(Port) ->
- Ref = httpd_util:make_name("httpd",undefined,Port),
- call(Ref, fake_close).
-
-%%
-%% External API
-%%
%% Deprecated
start(ConfigFile, ConfigList) ->
Port = proplists:get_value(port,ConfigList,80),
@@ -83,7 +68,8 @@ start_link(ConfigFile, ConfigList, AcceptTimeout) ->
Name = make_name(Addr, Port),
gen_server:start_link({local, Name},?MODULE,
- [ConfigFile, ConfigList, AcceptTimeout, Addr, Port],[]).
+ [ConfigFile, ConfigList,
+ AcceptTimeout, Addr, Port],[]).
start_link(ConfigFile, ConfigList, AcceptTimeout, ListenSocket) ->
Port = proplists:get_value(port, ConfigList, 80),
@@ -93,146 +79,33 @@ start_link(ConfigFile, ConfigList, AcceptTimeout, ListenSocket) ->
gen_server:start_link({local, Name},?MODULE,
[ConfigFile, ConfigList, AcceptTimeout, Addr,
Port, ListenSocket],[]).
-
stop(ServerRef) ->
call(ServerRef, stop).
reload(ServerRef, Conf) ->
call(ServerRef, {reload, Conf}).
-
-%%%----------------------------------------------------------------
-
-block(ServerRef, disturbing) ->
- call(ServerRef,block);
-
-block(ServerRef, non_disturbing) ->
- do_block(ServerRef, non_disturbing, infinity).
+block(ServerRef, Method) ->
+ block(ServerRef, Method, infinity).
block(ServerRef, Method, Timeout) ->
- do_block(ServerRef, Method, Timeout).
-
-
-%% The reason for not using call here, is that the manager cannot
-%% _wait_ for completion of the requests. It must be able to do
-%% do other things at the same time as the blocking goes on.
-do_block(ServerRef, Method, infinity) ->
- Ref = make_ref(),
- cast(ServerRef, {block, Method, infinity, self(), Ref}),
- receive
- {block_reply, Reply, Ref} ->
- Reply
- end;
-do_block(ServerRef,Method,Timeout) when Timeout > 0 ->
- Ref = make_ref(),
- cast(ServerRef,{block,Method,Timeout,self(),Ref}),
- receive
- {block_reply,Reply,Ref} ->
- Reply
- end.
-
-
-%%%----------------------------------------------------------------
-
-%% unblock
+ call(ServerRef, {block, self(), Method, Timeout}).
unblock(ServerRef) ->
- call(ServerRef,unblock).
-
-%% get admin/usage state
-
-get_admin_state(ServerRef) ->
- call(ServerRef,get_admin_state).
-
-get_usage_state(ServerRef) ->
- call(ServerRef,get_usage_state).
-
-
-%% get_status
-
-get_status(ServerRef) ->
- gen_server:call(ServerRef,get_status).
-
-get_status(ServerRef,Timeout) ->
- gen_server:call(ServerRef,get_status,Timeout).
-
-%%
-%% Internal API
-%%
-
-
-%% new_connection
+ call(ServerRef,{unblock, self()}).
new_connection(Manager) ->
- gen_server:call(Manager, {new_connection, self()}, infinity).
-
-%% done
-
-done_connection(Manager) ->
- gen_server:cast(Manager, {done_connection, self()}).
-
-
-%% is_busy(ServerRef) -> true | false
-%%
-%% Tests if the server is (in usage state) busy,
-%% i.e. has rached the heavy load limit.
-%%
-
-is_busy(ServerRef) ->
- gen_server:call(ServerRef,is_busy).
-
-is_busy(ServerRef,Timeout) ->
- gen_server:call(ServerRef,is_busy,Timeout).
-
-
-%% is_busy_or_blocked(ServerRef) -> busy | blocked | false
-%%
-%% Tests if the server is busy (usage state), i.e. has rached,
-%% the heavy load limit, or blocked (admin state) .
-%%
-
-is_busy_or_blocked(ServerRef) ->
- gen_server:call(ServerRef,is_busy_or_blocked).
-
-
-%% is_blocked(ServerRef) -> true | false
-%%
-%% Tests if the server is blocked (admin state) .
-%%
-
-is_blocked(ServerRef) ->
- gen_server:call(ServerRef,is_blocked).
-
-
-%%
-%% Module API. Theese functions are intended for use from modules only.
-%%
-
-config_lookup(Port, Query) ->
- config_lookup(undefined, Port, Query).
-config_lookup(Addr, Port, Query) ->
- Name = httpd_util:make_name("httpd",Addr,Port),
- gen_server:call(whereis(Name), {config_lookup, Query}).
-
-config_multi_lookup(Port, Query) ->
- config_multi_lookup(undefined,Port,Query).
-config_multi_lookup(Addr,Port, Query) ->
- Name = httpd_util:make_name("httpd",Addr,Port),
- gen_server:call(whereis(Name), {config_multi_lookup, Query}).
+ call(Manager, {new_connection, self()}).
config_match(Port, Pattern) ->
config_match(undefined,Port,Pattern).
config_match(Addr, Port, Pattern) ->
Name = httpd_util:make_name("httpd",Addr,Port),
- gen_server:call(whereis(Name), {config_match, Pattern}).
-
-
-%%
-%% Server call-back functions
-%%
-
-%% init
+ call(whereis(Name), {config_match, Pattern}).
+%%%--------------------------------------------------------------------
+%%% gen_server callbacks functions
+%%%--------------------------------------------------------------------
init([ConfigFile, ConfigList, AcceptTimeout, Addr, Port]) ->
process_flag(trap_exit, true),
case (catch do_init(ConfigFile, ConfigList, AcceptTimeout, Addr, Port)) of
@@ -263,47 +136,35 @@ init([ConfigFile, ConfigList, AcceptTimeout, Addr, Port, ListenInfo]) ->
{ok, State}
end.
-do_init(ConfigFile, ConfigList, AcceptTimeout, Addr, Port) ->
- IpFamily = proplists:get_value(ipfamily, ConfigList, inet6fb4),
+do_init(ConfigFile, ConfigList, _AcceptTimeout, Addr, Port) ->
+ Sup = httpd_util:make_name("httpd_connection_sup", Addr, Port),
NewConfigFile = proplists:get_value(file, ConfigList, ConfigFile),
ConfigDB = do_initial_store(ConfigList),
SocketType = httpd_conf:lookup_socket_type(ConfigDB),
- case httpd_acceptor_sup:start_acceptor(SocketType, Addr,
- Port, IpFamily, ConfigDB, AcceptTimeout) of
- {ok, _Pid} ->
- Status = [{max_conn, 0},
- {last_heavy_load, never},
- {last_connection, never}],
+ Status = [{max_conn, 0},
+ {last_heavy_load, never},
+ {last_connection, never}],
State = #state{socket_type = SocketType,
config_file = NewConfigFile,
config_db = ConfigDB,
- connections = [],
+ connection_sup = Sup,
status = Status},
- {ok, State};
- Else ->
- Else
- end.
+ {ok, State}.
-do_init(ConfigFile, ConfigList, AcceptTimeout, Addr, Port, ListenInfo) ->
- IpFamily = proplists:get_value(ipfamily, ConfigList, inet6fb4),
+do_init(ConfigFile, ConfigList, _AcceptTimeout, Addr, Port, _ListenInfo) ->
+ Sup = httpd_util:make_name("httpd_connection_sup", Addr, Port),
NewConfigFile = proplists:get_value(file, ConfigList, ConfigFile),
ConfigDB = do_initial_store(ConfigList),
SocketType = httpd_conf:lookup_socket_type(ConfigDB),
- case httpd_acceptor_sup:start_acceptor(SocketType, Addr,
- Port, IpFamily, ConfigDB,
- AcceptTimeout, ListenInfo) of
- {ok, _Pid} ->
- Status = [{max_conn,0}, {last_heavy_load,never},
- {last_connection,never}],
+ Status = [{max_conn,0}, {last_heavy_load,never},
+ {last_connection,never}],
State = #state{socket_type = SocketType,
config_file = NewConfigFile,
config_db = ConfigDB,
- connections = [],
+ connection_sup = Sup,
status = Status},
- {ok, State};
- Else ->
- Else
- end.
+ {ok, State}.
+
do_initial_store(ConfigList) ->
case httpd_conf:store(ConfigList) of
@@ -313,75 +174,14 @@ do_initial_store(ConfigList) ->
throw({error, Reason})
end.
-
-
-%% handle_call
-
handle_call(stop, _From, State) ->
{stop, normal, ok, State};
-handle_call({config_lookup, Query}, _From, State) ->
- Res = httpd_util:lookup(State#state.config_db, Query),
- {reply, Res, State};
-
-handle_call({config_multi_lookup, Query}, _From, State) ->
- Res = httpd_util:multi_lookup(State#state.config_db, Query),
- {reply, Res, State};
-
handle_call({config_match, Query}, _From, State) ->
Res = ets:match_object(State#state.config_db, Query),
{reply, Res, State};
-handle_call(get_status, _From, State) ->
- ManagerStatus = manager_status(self()),
- S1 = [{current_conn,length(State#state.connections)}|State#state.status]++
- [ManagerStatus],
- {reply,S1,State};
-
-handle_call(is_busy, _From, State) ->
- Reply = case get_ustate(State) of
- busy ->
- true;
- _ ->
- false
- end,
- {reply,Reply,State};
-
-handle_call(is_busy_or_blocked, _From, State) ->
- Reply =
- case get_astate(State) of
- unblocked ->
- case get_ustate(State) of
- busy ->
- busy;
- _ ->
- false
- end;
- _ ->
- blocked
- end,
- {reply,Reply,State};
-
-handle_call(is_blocked, _From, State) ->
- Reply =
- case get_astate(State) of
- unblocked ->
- false;
- _ ->
- true
- end,
- {reply,Reply,State};
-
-handle_call(get_admin_state, _From, State) ->
- Reply = get_astate(State),
- {reply,Reply,State};
-
-handle_call(get_usage_state, _From, State) ->
- Reply = get_ustate(State),
- {reply,Reply,State};
-
-handle_call({reload, Conf}, _From, State)
- when State#state.admin_state =:= blocked ->
+handle_call({reload, Conf}, _From, #state{admin_state = blocked} = State) ->
case handle_reload(Conf, State) of
{stop, Reply,S1} ->
{stop, Reply, S1};
@@ -392,13 +192,33 @@ handle_call({reload, Conf}, _From, State)
handle_call({reload, _}, _From, State) ->
{reply,{error,{invalid_admin_state,State#state.admin_state}},State};
-handle_call(block, _From, State) ->
- {Reply,S1} = handle_block(State),
- {reply,Reply,S1};
+handle_call({block , Blocker, Mode, Timeout}, From,
+ #state{admin_state = unblocked,
+ connection_sup = CSup} = State) ->
+ Monitor = erlang:monitor(process, Blocker),
+ case count_children(CSup) of
+ 0 ->
+ %% Already in idle usage state => go directly to blocked
+ {reply, ok, State#state{admin_state = blocked,
+ blocker_ref = {Blocker, Monitor},
+ blocking_from = From}};
+ _ ->
+ handle_block(Mode, Timeout,
+ State#state{blocker_ref = {Blocker, Monitor},
+ blocking_from = From})
+ end;
+handle_call({block , _, _, _}, _, State) ->
+ {reply, {error, blocked}, State};
-handle_call(unblock, {From,_Tag}, State) ->
- {Reply,S1} = handle_unblock(State,From),
- {reply, Reply, S1};
+handle_call({unblock, Blocker}, _, #state{blocker_ref = {Blocker, Monitor},
+ admin_state = blocked} = State) ->
+
+ erlang:demonitor(Monitor),
+ {reply, ok,
+ State#state{admin_state = unblocked, blocker_ref = undefined}};
+
+handle_call({unblock, _}, _, State) ->
+ {reply, {error, only_blocker_may_unblock}, State};
handle_call({new_connection, Pid}, _From, State) ->
{Status, NewState} = handle_new_connection(State, Pid),
@@ -415,21 +235,6 @@ handle_call(Request, From, State) ->
report_error(State,String),
{reply, ok, State}.
-
-%% handle_cast
-
-handle_cast({done_connection, Pid}, State) ->
- S1 = handle_done_connection(State, Pid),
- {noreply, S1};
-
-handle_cast({block, disturbing, Timeout, From, Ref}, State) ->
- S1 = handle_block(State, Timeout, From, Ref),
- {noreply,S1};
-
-handle_cast({block, non_disturbing, Timeout, From, Ref}, State) ->
- S1 = handle_nd_block(State, Timeout, From, Ref),
- {noreply,S1};
-
handle_cast(Message, State) ->
String =
lists:flatten(
@@ -440,32 +245,50 @@ handle_cast(Message, State) ->
report_error(State, String),
{noreply, State}.
-%% handle_info
-
-handle_info({block_timeout, Method}, State) ->
- S1 = handle_block_timeout(State,Method),
- {noreply, S1};
+handle_info(connections_terminated, #state{admin_state = shutting_down,
+ blocking_from = From} = State) ->
+ gen_server:reply(From, ok),
+ {noreply, State#state{admin_state = blocked, blocking_from = undefined}};
+handle_info(connections_terminated, State) ->
+ {noreply, State};
-handle_info({'DOWN', Ref, process, _Object, _Info}, State) ->
- S1 =
- case State#state.blocker_ref of
- Ref ->
- handle_blocker_exit(State);
- _ ->
- %% Not our blocker, so ignore
- State
- end,
- {noreply, S1};
+handle_info({block_timeout, non_disturbing, Blocker},
+ #state{admin_state = shutting_down,
+ blocking_from = From,
+ blocker_ref = {_, Monitor} = Blocker} = State) ->
+ erlang:demonitor(Monitor),
+ gen_server:reply(From, {error, timeout}),
+ {noreply, State#state{admin_state = unblocked, blocking_from = undefined,
+ blocker_ref = undefined}};
+handle_info({block_timeout, disturbing, Blocker},
+ #state{admin_state = shutting_down,
+ blocking_from = From,
+ blocker_ref = Blocker,
+ connection_sup = Sup} = State) ->
+ SupPid = whereis(Sup),
+ shutdown_connections(SupPid),
+ gen_server:reply(From, ok),
+ {noreply, State#state{admin_state = blocked,
+ blocking_from = undefined}};
+handle_info({block_timeout, _, _}, State) ->
+ {noreply, State};
+
+handle_info({'DOWN', _, process, Pid, _Info},
+ #state{admin_state = Admin,
+ blocker_ref = {Pid, Monitor}} = State) when
+ Admin =/= unblocked ->
+ erlang:demonitor(Monitor),
+ {noreply, State#state{admin_state = unblocked,
+ blocking_from = undefined,
+ blocker_ref = undefined}};
+handle_info({'DOWN', _, process, _, _}, State) ->
+ {noreply, State};
handle_info({'EXIT', _, normal}, State) ->
{noreply, State};
-handle_info({'EXIT', _, blocked}, S) ->
- {noreply, S};
-
-handle_info({'EXIT', Pid, Reason}, State) ->
- S1 = check_connections(State, Pid, Reason),
- {noreply, S1};
+handle_info({'EXIT', _, shutdown}, State) ->
+ {stop, shutdown, State};
handle_info(Info, State) ->
String =
@@ -477,217 +300,64 @@ handle_info(Info, State) ->
report_error(State, String),
{noreply, State}.
-
-%% terminate
-
terminate(_, #state{config_db = Db}) ->
httpd_conf:remove_all(Db),
ok.
-
-%% code_change({down,ToVsn}, State, Extra)
-%%
-
code_change({down,_ToVsn}, State, _Extra) ->
{ok,State};
-%% code_change(FromVsn, State, Extra)
-%%
code_change(_FromVsn, State, _Extra) ->
{ok,State}.
-
-
-%% -------------------------------------------------------------------------
-%% check_connection
-%%
-%%
-%%
-%%
-
-check_connections(#state{connections = []} = State, _Pid, _Reason) ->
- State;
-check_connections(#state{connections = Connections} = State, Pid, _Reason) ->
- State#state{connections = lists:delete(Pid, Connections)}.
-
-
-%% -------------------------------------------------------------------------
-%% handle_[new | done]_connection
-%%
-%%
-%%
-%%
-
-handle_new_connection(State, Handler) ->
+%%%--------------------------------------------------------------------
+%%% Internal functions
+%%%--------------------------------------------------------------------
+handle_new_connection(#state{admin_state = AdminState} = State, Handler) ->
UsageState = get_ustate(State),
- AdminState = get_astate(State),
handle_new_connection(UsageState, AdminState, State, Handler).
-handle_new_connection(busy, unblocked, State, _Handler) ->
- Status = update_heavy_load_status(State#state.status),
- {{reject, busy},
- State#state{status = Status}};
-
-handle_new_connection(_UsageState, unblocked, State, Handler) ->
- Connections = State#state.connections,
- Status = update_connection_status(State#state.status,
- length(Connections)+1),
- link(Handler),
- {{ok, accept},
- State#state{connections = [Handler|Connections], status = Status}};
-
-handle_new_connection(_UsageState, _AdminState, State, _Handler) ->
- {{reject, blocked},
- State}.
-
-handle_done_connection(#state{admin_state = shutting_down,
- connections = Connections} = State, Handler) ->
- unlink(Handler),
- case lists:delete(Handler, Connections) of
- [] -> % Ok, block complete
- demonitor_blocker(State#state.blocker_ref),
- {Tmr,From,Ref} = State#state.blocking_tmr,
- stop_block_tmr(Tmr),
- From ! {block_reply,ok,Ref},
- State#state{admin_state = blocked, connections = [],
- blocker_ref = undefined};
- Connections1 ->
- State#state{connections = Connections1}
- end;
-
-handle_done_connection(#state{connections = Connections} = State, Handler) ->
- State#state{connections = lists:delete(Handler, Connections)}.
-
-
-%% -------------------------------------------------------------------------
-%% handle_block
-%%
-%%
-%%
-%%
-handle_block(#state{admin_state = AdminState} = S) ->
- handle_block(S, AdminState).
-
-handle_block(S,unblocked) ->
- %% Kill all connections
- [kill_handler(Pid) || Pid <- S#state.connections],
- {ok,S#state{connections = [], admin_state = blocked}};
-handle_block(S,blocked) ->
- {ok,S};
-handle_block(S,shutting_down) ->
- {{error,shutting_down},S}.
-
-
-kill_handler(Pid) ->
- exit(Pid, blocked).
-
-handle_block(S,Timeout,From,Ref) when Timeout >= 0 ->
- do_block(S,Timeout,From,Ref);
-
-handle_block(S,Timeout,From,Ref) ->
- Reply = {error,{invalid_block_request,Timeout}},
- From ! {block_reply,Reply,Ref},
- S.
-
-do_block(S,Timeout,From,Ref) ->
- case S#state.connections of
- [] ->
- %% Already in idle usage state => go directly to blocked
- From ! {block_reply,ok,Ref},
- S#state{admin_state = blocked};
- _ ->
- %% Active or Busy usage state => go to shutting_down
- %% Make sure we get to know if blocker dies...
- MonitorRef = monitor_blocker(From),
- Tmr = {start_block_tmr(Timeout,disturbing),From,Ref},
- S#state{admin_state = shutting_down,
- blocker_ref = MonitorRef, blocking_tmr = Tmr}
- end.
-
-handle_nd_block(S,infinity,From,Ref) ->
- do_nd_block(S,infinity,From,Ref);
-
-handle_nd_block(S,Timeout,From,Ref) when Timeout >= 0 ->
- do_nd_block(S,Timeout,From,Ref);
-
-handle_nd_block(S,Timeout,From,Ref) ->
- Reply = {error,{invalid_block_request,Timeout}},
- From ! {block_reply,Reply,Ref},
- S.
-
-do_nd_block(S,Timeout,From,Ref) ->
- case S#state.connections of
- [] ->
- %% Already in idle usage state => go directly to blocked
- From ! {block_reply,ok,Ref},
- S#state{admin_state = blocked};
+handle_new_connection(_UsageState, unblocked,
+ #state{config_db = Db, connection_sup = CSup} =
+ State, _) ->
+ Max = httpd_util:lookup(Db, max_clients),
+ case count_children(CSup) of
+ Count when Count =< Max ->
+ {{ok, accept}, State};
_ ->
- %% Active or Busy usage state => go to shutting_down
- %% Make sure we get to know if blocker dies...
- MonitorRef = monitor_blocker(From),
- Tmr = {start_block_tmr(Timeout,non_disturbing),From,Ref},
- S#state{admin_state = shutting_down,
- blocker_ref = MonitorRef, blocking_tmr = Tmr}
- end.
+ {{reject, busy}, State}
+ end;
-handle_block_timeout(S,Method) ->
- %% Time to take this to the road...
- demonitor_blocker(S#state.blocker_ref),
- handle_block_timeout1(S,Method,S#state.blocking_tmr).
-
-handle_block_timeout1(S,non_disturbing,{_,From,Ref}) ->
- From ! {block_reply,{error,timeout},Ref},
- S#state{admin_state = unblocked,
- blocker_ref = undefined, blocking_tmr = undefined};
-
-handle_block_timeout1(S,disturbing,{_,From,Ref}) ->
- [exit(Pid,blocked) || Pid <- S#state.connections],
-
- From ! {block_reply,ok,Ref},
- S#state{admin_state = blocked, connections = [],
- blocker_ref = undefined, blocking_tmr = undefined};
-
-handle_block_timeout1(S,Method,{_,From,Ref}) ->
- From ! {block_reply,{error,{unknown_block_method,Method}},Ref},
- S#state{admin_state = blocked, connections = [],
- blocker_ref = undefined, blocking_tmr = undefined};
-
-handle_block_timeout1(S, _Method, _TmrInfo) ->
- S#state{admin_state = unblocked,
- blocker_ref = undefined, blocking_tmr = undefined}.
-
-handle_unblock(S, FromA) ->
- handle_unblock(S, FromA, S#state.admin_state).
-
-handle_unblock(S, _FromA, unblocked) ->
- {ok,S};
-handle_unblock(S, FromA, _AdminState) ->
- case S#state.blocking_tmr of
- {Tmr,FromB,Ref} ->
- %% Another process is trying to unblock
- %% Inform the blocker
- stop_block_tmr(Tmr),
- FromB ! {block_reply, {error,{unblocked,FromA}},Ref};
- _ ->
- ok
- end,
- {ok,S#state{admin_state = unblocked, blocking_tmr = undefined}}.
-
-%% The blocker died so we give up on the block.
-handle_blocker_exit(S) ->
- {Tmr,_From,_Ref} = S#state.blocking_tmr,
- stop_block_tmr(Tmr),
- S#state{admin_state = unblocked,
- blocker_ref = undefined, blocking_tmr = undefined}.
+handle_new_connection(_UsageState, _AdminState, State, _Handler) ->
+ {{reject, blocked}, State}.
+
+handle_block(disturbing, infinity,
+ #state{connection_sup = CSup,
+ blocking_from = From} = State) ->
+ SupPid = whereis(CSup),
+ shutdown_connections(SupPid),
+ gen_server:reply(From, ok),
+ {noreply, State#state{admin_state = blocked,
+ blocking_from = undefined}};
+handle_block(disturbing, Timeout, #state{connection_sup = CSup, blocker_ref = Blocker} = State) ->
+ Manager = self(),
+ spawn_link(fun() -> wait_for_shutdown(CSup, Manager) end),
+ erlang:send_after(Timeout, self(), {block_timeout, disturbing, Blocker}),
+ {noreply, State#state{admin_state = shutting_down}};
+
+handle_block(non_disturbing, infinity,
+ #state{connection_sup = CSup} = State) ->
+ Manager = self(),
+ spawn_link(fun() -> wait_for_shutdown(CSup, Manager) end),
+ {noreply, State#state{admin_state = shutting_down}};
+
+handle_block(non_disturbing, Timeout,
+ #state{connection_sup = CSup, blocker_ref = Blocker} = State) ->
+ Manager = self(),
+ spawn_link(fun() -> wait_for_shutdown(CSup, Manager) end),
+ erlang:send_after(Timeout, self(), {block_timeout, non_disturbing, Blocker}),
+ {noreply, State#state{admin_state = shutting_down}}.
-
-
-%% -------------------------------------------------------------------------
-%% handle_reload
-%%
-%%
-%%
-%%
handle_reload(undefined, #state{config_file = undefined} = State) ->
{continue, {error, undefined_config_file}, State};
handle_reload(undefined, #state{config_file = ConfigFile} = State) ->
@@ -763,7 +433,7 @@ check_constant_values(Db, Config) ->
%% Otherwise -> active
%%
get_ustate(State) ->
- get_ustate(length(State#state.connections),State).
+ get_ustate(count_children(State#state.connection_sup),State).
get_ustate(0,_State) ->
idle;
@@ -776,76 +446,6 @@ get_ustate(ConnectionCnt,State) ->
active
end.
-
-get_astate(S) -> S#state.admin_state.
-
-
-%% Timer handling functions
-start_block_tmr(infinity,_) ->
- undefined;
-start_block_tmr(T,M) ->
- erlang:send_after(T,self(),{block_timeout,M}).
-
-stop_block_tmr(undefined) ->
- ok;
-stop_block_tmr(Ref) ->
- erlang:cancel_timer(Ref).
-
-
-%% Monitor blocker functions
-monitor_blocker(Pid) when is_pid(Pid) ->
- case (catch erlang:monitor(process,Pid)) of
- {'EXIT', _Reason} ->
- undefined;
- MonitorRef ->
- MonitorRef
- end;
-monitor_blocker(_) ->
- undefined.
-
-demonitor_blocker(undefined) ->
- ok;
-demonitor_blocker(Ref) ->
- (catch erlang:demonitor(Ref)).
-
-
-%% Some status utility functions
-
-update_heavy_load_status(Status) ->
- update_status_with_time(Status,last_heavy_load).
-
-update_connection_status(Status,ConnCount) ->
- S1 = case lists:keysearch(max_conn,1,Status) of
- {value, {max_conn, C1}} when ConnCount > C1 ->
- lists:keyreplace(max_conn,1,Status,{max_conn,ConnCount});
- {value, {max_conn, _C2}} ->
- Status;
- false ->
- [{max_conn, ConnCount} | Status]
- end,
- update_status_with_time(S1,last_connection).
-
-update_status_with_time(Status,Key) ->
- lists:keyreplace(Key,1,Status,{Key,universal_time()}).
-
-universal_time() -> calendar:universal_time().
-
-manager_status(P) ->
- Items = [status, message_queue_len, reductions,
- heap_size, stack_size],
- {manager_status, process_status(P,Items,[])}.
-
-
-process_status(P,[],L) ->
- [{pid,P}|lists:reverse(L)];
-process_status(P,[H|T],L) ->
- case (catch process_info(P,H)) of
- {H, Value} ->
- process_status(P,T,[{H,Value}|L]);
- _ ->
- process_status(P,T,[{H,undefined}|L])
- end.
-
make_name(Addr,Port) ->
httpd_util:make_name("httpd",Addr,Port).
@@ -856,10 +456,31 @@ report_error(State,String) ->
mod_log:report_error(Cdb,String),
mod_disk_log:report_error(Cdb,String).
-%%
-call(ServerRef,Request) ->
- gen_server:call(ServerRef,Request).
+call(ServerRef, Request) ->
+ try gen_server:call(ServerRef, Request, infinity)
+ catch
+ exit:_ ->
+ {error, closed}
+ end.
+
+count_children(Sup) ->
+ Children = supervisor:count_children(whereis(Sup)),
+ proplists:get_value(workers, Children).
-cast(ServerRef,Message) ->
- gen_server:cast(ServerRef,Message).
+shutdown_connections(Sup) ->
+ Children = [Child || {_,Child,_,_} <- supervisor:which_children(Sup)],
+ lists:foreach(fun(Pid) -> exit(Pid, kill) end,
+ Children).
+
+wait_for_shutdown(CSup, Manager) ->
+ case count_children(CSup) of
+ 0 ->
+ Manager ! connections_terminated;
+ _ ->
+ receive
+ after 500 ->
+ ok
+ end,
+ wait_for_shutdown(CSup, Manager)
+ end.
diff --git a/lib/inets/src/http_server/httpd_request.erl b/lib/inets/src/http_server/httpd_request.erl
index 5ba79b2706..712c73599f 100644
--- a/lib/inets/src/http_server/httpd_request.erl
+++ b/lib/inets/src/http_server/httpd_request.erl
@@ -1,7 +1,7 @@
%%
%% %CopyrightBegin%
%%
-%% Copyright Ericsson AB 2005-2011. All Rights Reserved.
+%% Copyright Ericsson AB 2005-2014. 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
@@ -44,26 +44,26 @@
%%%=========================================================================
parse([Bin, MaxSizes]) ->
?hdrt("parse", [{bin, Bin}, {max_sizes, MaxSizes}]),
- parse_method(Bin, [], MaxSizes, []);
+ parse_method(Bin, [], 0, proplists:get_value(max_method, MaxSizes), MaxSizes, []);
parse(Unknown) ->
?hdrt("parse", [{unknown, Unknown}]),
exit({bad_args, Unknown}).
%% Functions that may be returned during the decoding process
%% if the input data is incompleate.
-parse_method([Bin, Method, MaxSizes, Result]) ->
- parse_method(Bin, Method, MaxSizes, Result).
+parse_method([Bin, Method, Current, Max, MaxSizes, Result]) ->
+ parse_method(Bin, Method, Current, Max, MaxSizes, Result).
-parse_uri([Bin, URI, CurrSize, MaxSizes, Result]) ->
- parse_uri(Bin, URI, CurrSize, MaxSizes, Result).
+parse_uri([Bin, URI, Current, Max, MaxSizes, Result]) ->
+ parse_uri(Bin, URI, Current, Max, MaxSizes, Result).
-parse_version([Bin, Rest, Version, MaxSizes, Result]) ->
- parse_version(<<Rest/binary, Bin/binary>>, Version, MaxSizes,
+parse_version([Bin, Rest, Version, Current, Max, MaxSizes, Result]) ->
+ parse_version(<<Rest/binary, Bin/binary>>, Version, Current, Max, MaxSizes,
Result).
-parse_headers([Bin, Rest, Header, Headers, CurrSize, MaxSizes, Result]) ->
+parse_headers([Bin, Rest, Header, Headers, Current, Max, MaxSizes, Result]) ->
parse_headers(<<Rest/binary, Bin/binary>>,
- Header, Headers, CurrSize, MaxSizes, Result).
+ Header, Headers, Current, Max, MaxSizes, Result).
whole_body([Bin, Body, Length]) ->
whole_body(<<Body/binary, Bin/binary>>, Length).
@@ -107,8 +107,12 @@ validate("POST", Uri, "HTTP/1." ++ _N) ->
validate("TRACE", Uri, "HTTP/1." ++ N) when hd(N) >= $1 ->
validate_uri(Uri);
validate(Method, Uri, Version) ->
- {error, {not_supported, {Method, Uri, Version}}}.
-
+ case validate_version(Version) of
+ true ->
+ {error, {not_supported, {Method, Uri, Version}}};
+ false ->
+ {error, {bad_version, Version}}
+ end.
%%----------------------------------------------------------------------
%% The request is passed through the server as a record of type mod
%% create it.
@@ -131,104 +135,75 @@ update_mod_data(ModData, Method, RequestURI, HTTPVersion, Headers)->
%%%========================================================================
%%% Internal functions
%%%========================================================================
-parse_method(<<>>, Method, MaxSizes, Result) ->
- ?hdrt("parse_method - empty bin",
- [{method, Method}, {max_sizes, MaxSizes}, {result, Result}]),
- {?MODULE, parse_method, [Method, MaxSizes, Result]};
-parse_method(<<?SP, Rest/binary>>, Method, MaxSizes, Result) ->
- ?hdrt("parse_method - SP begin",
- [{rest, Rest},
- {method, Method},
- {max_sizes, MaxSizes},
- {result, Result}]),
- parse_uri(Rest, [], 0, MaxSizes,
+parse_method(<<>>, Method, Current, Max, MaxSizes, Result) ->
+ {?MODULE, parse_method, [Method, Current, Max, MaxSizes, Result]};
+parse_method(<<?SP, Rest/binary>>, Method, _Current, _Max, MaxSizes, Result) ->
+ parse_uri(Rest, [], 0, proplists:get_value(max_uri, MaxSizes), MaxSizes,
[string:strip(lists:reverse(Method)) | Result]);
-parse_method(<<Octet, Rest/binary>>, Method, MaxSizes, Result) ->
- ?hdrt("parse_method",
- [{octet, Octet},
- {rest, Rest},
- {method, Method},
- {max_sizes, MaxSizes},
- {result, Result}]),
- parse_method(Rest, [Octet | Method], MaxSizes, Result).
-
-parse_uri(_, _, CurrSize, {MaxURI, _}, _)
- when (CurrSize > MaxURI) andalso (MaxURI =/= nolimit) ->
- ?hdrt("parse_uri",
- [{current_size, CurrSize},
- {max_uri, MaxURI}]),
+parse_method(<<Octet, Rest/binary>>, Method, Current, Max, MaxSizes, Result) when Current =< Max ->
+ parse_method(Rest, [Octet | Method], Current + 1, Max, MaxSizes, Result);
+parse_method(_, _, _, Max, _, _) ->
+ %% We do not know the version of the client as it comes after the
+ %% method send the lowest version in the response so that the client
+ %% will be able to handle it.
+ {error, {too_long, Max, 413, "Method unreasonably long"}, lowest_version()}.
+
+parse_uri(_, _, Current, MaxURI, _, _)
+ when (Current > MaxURI) andalso (MaxURI =/= nolimit) ->
%% We do not know the version of the client as it comes after the
%% uri send the lowest version in the response so that the client
%% will be able to handle it.
- HttpVersion = "HTTP/0.9",
- {error, {uri_too_long, MaxURI}, HttpVersion};
-parse_uri(<<>>, URI, CurrSize, MaxSizes, Result) ->
- ?hdrt("parse_uri - empty bin",
- [{uri, URI},
- {current_size, CurrSize},
- {max_sz, MaxSizes},
- {result, Result}]),
- {?MODULE, parse_uri, [URI, CurrSize, MaxSizes, Result]};
-parse_uri(<<?SP, Rest/binary>>, URI, _, MaxSizes, Result) ->
- ?hdrt("parse_uri - SP begin",
- [{uri, URI},
- {max_sz, MaxSizes},
- {result, Result}]),
- parse_version(Rest, [], MaxSizes,
+ {error, {too_long, MaxURI, 414, "URI unreasonably long"},lowest_version()};
+parse_uri(<<>>, URI, Current, Max, MaxSizes, Result) ->
+ {?MODULE, parse_uri, [URI, Current, Max, MaxSizes, Result]};
+parse_uri(<<?SP, Rest/binary>>, URI, _, _, MaxSizes, Result) ->
+ parse_version(Rest, [], 0, proplists:get_value(max_version, MaxSizes), MaxSizes,
[string:strip(lists:reverse(URI)) | Result]);
%% Can happen if it is a simple HTTP/0.9 request e.i "GET /\r\n\r\n"
-parse_uri(<<?CR, _Rest/binary>> = Data, URI, _, MaxSizes, Result) ->
- ?hdrt("parse_uri - CR begin",
- [{uri, URI},
- {max_sz, MaxSizes},
- {result, Result}]),
- parse_version(Data, [], MaxSizes,
+parse_uri(<<?CR, _Rest/binary>> = Data, URI, _, _, MaxSizes, Result) ->
+ parse_version(Data, [], 0, proplists:get_value(max_version, MaxSizes), MaxSizes,
[string:strip(lists:reverse(URI)) | Result]);
-parse_uri(<<Octet, Rest/binary>>, URI, CurrSize, MaxSizes, Result) ->
- ?hdrt("parse_uri",
- [{octet, Octet},
- {uri, URI},
- {curr_sz, CurrSize},
- {max_sz, MaxSizes},
- {result, Result}]),
- parse_uri(Rest, [Octet | URI], CurrSize + 1, MaxSizes, Result).
-
-parse_version(<<>>, Version, MaxSizes, Result) ->
- {?MODULE, parse_version, [<<>>, Version, MaxSizes, Result]};
-parse_version(<<?LF, Rest/binary>>, Version, MaxSizes, Result) ->
+parse_uri(<<Octet, Rest/binary>>, URI, Current, Max, MaxSizes, Result) ->
+ parse_uri(Rest, [Octet | URI], Current + 1, Max, MaxSizes, Result).
+
+parse_version(<<>>, Version, Current, Max, MaxSizes, Result) ->
+ {?MODULE, parse_version, [<<>>, Version, Current, Max, MaxSizes, Result]};
+parse_version(<<?LF, Rest/binary>>, Version, Current, Max, MaxSizes, Result) ->
%% If ?CR is is missing RFC2616 section-19.3
- parse_version(<<?CR, ?LF, Rest/binary>>, Version, MaxSizes, Result);
-parse_version(<<?CR, ?LF, Rest/binary>>, Version, MaxSizes, Result) ->
- parse_headers(Rest, [], [], 0, MaxSizes,
+ parse_version(<<?CR, ?LF, Rest/binary>>, Version, Current, Max, MaxSizes, Result);
+parse_version(<<?CR, ?LF, Rest/binary>>, Version, _, _, MaxSizes, Result) ->
+ parse_headers(Rest, [], [], 0, proplists:get_value(max_header, MaxSizes), MaxSizes,
[string:strip(lists:reverse(Version)) | Result]);
-parse_version(<<?CR>> = Data, Version, MaxSizes, Result) ->
- {?MODULE, parse_version, [Data, Version, MaxSizes, Result]};
-parse_version(<<Octet, Rest/binary>>, Version, MaxSizes, Result) ->
- parse_version(Rest, [Octet | Version], MaxSizes, Result).
-
-parse_headers(_, _, _, CurrSize, {_, MaxHeaderSize}, Result)
- when CurrSize > MaxHeaderSize, MaxHeaderSize =/= nolimit ->
+parse_version(<<?CR>> = Data, Version, Current, Max, MaxSizes, Result) ->
+ {?MODULE, parse_version, [Data, Version, Current, Max, MaxSizes, Result]};
+parse_version(<<Octet, Rest/binary>>, Version, Current, Max, MaxSizes, Result) when Current =< Max ->
+ parse_version(Rest, [Octet | Version], Current + 1, Max, MaxSizes, Result);
+parse_version(_, _, _, Max,_,_) ->
+ {error, {too_long, Max, 413, "Version string unreasonably long"}, lowest_version()}.
+
+parse_headers(_, _, _, Current, Max, _, Result)
+ when Max =/= nolimit andalso Current > Max ->
HttpVersion = lists:nth(3, lists:reverse(Result)),
- {error, {header_too_long, MaxHeaderSize}, HttpVersion};
+ {error, {too_long, Max, 413, "Headers unreasonably long"}, HttpVersion};
-parse_headers(<<>>, Header, Headers, CurrSize, MaxSizes, Result) ->
- {?MODULE, parse_headers, [<<>>, Header, Headers, CurrSize,
+parse_headers(<<>>, Header, Headers, Current, Max, MaxSizes, Result) ->
+ {?MODULE, parse_headers, [<<>>, Header, Headers, Current, Max,
MaxSizes, Result]};
-parse_headers(<<?CR,?LF,?LF,Body/binary>>, [], [], CurrSize, MaxSizes, Result) ->
+parse_headers(<<?CR,?LF,?LF,Body/binary>>, [], [], Current, Max, MaxSizes, Result) ->
%% If ?CR is is missing RFC2616 section-19.3
- parse_headers(<<?CR,?LF,?CR,?LF,Body/binary>>, [], [], CurrSize,
+ parse_headers(<<?CR,?LF,?CR,?LF,Body/binary>>, [], [], Current, Max,
MaxSizes, Result);
-parse_headers(<<?LF,?LF,Body/binary>>, [], [], CurrSize, MaxSizes, Result) ->
+parse_headers(<<?LF,?LF,Body/binary>>, [], [], Current, Max, MaxSizes, Result) ->
%% If ?CR is is missing RFC2616 section-19.3
- parse_headers(<<?CR,?LF,?CR,?LF,Body/binary>>, [], [], CurrSize,
+ parse_headers(<<?CR,?LF,?CR,?LF,Body/binary>>, [], [], Current, Max,
MaxSizes, Result);
-parse_headers(<<?CR,?LF,?CR,?LF,Body/binary>>, [], [], _, _, Result) ->
+parse_headers(<<?CR,?LF,?CR,?LF,Body/binary>>, [], [], _, _, _, Result) ->
NewResult = list_to_tuple(lists:reverse([Body, {#http_request_h{}, []} |
Result])),
{ok, NewResult};
-parse_headers(<<?CR,?LF,?CR,?LF,Body/binary>>, Header, Headers, _,
+parse_headers(<<?CR,?LF,?CR,?LF,Body/binary>>, Header, Headers, _, _,
_, Result) ->
HTTPHeaders = [lists:reverse(Header) | Headers],
RequestHeaderRcord =
@@ -238,52 +213,51 @@ parse_headers(<<?CR,?LF,?CR,?LF,Body/binary>>, Header, Headers, _,
HTTPHeaders} | Result])),
{ok, NewResult};
-parse_headers(<<?CR,?LF,?CR>> = Data, Header, Headers, CurrSize,
+parse_headers(<<?CR,?LF,?CR>> = Data, Header, Headers, Current, Max,
MaxSizes, Result) ->
- {?MODULE, parse_headers, [Data, Header, Headers, CurrSize,
+ {?MODULE, parse_headers, [Data, Header, Headers, Current, Max,
MaxSizes, Result]};
-parse_headers(<<?LF>>, [], [], CurrSize, MaxSizes, Result) ->
+parse_headers(<<?LF>>, [], [], Current, Max, MaxSizes, Result) ->
%% If ?CR is is missing RFC2616 section-19.3
- parse_headers(<<?CR,?LF>>, [], [], CurrSize, MaxSizes, Result);
+ parse_headers(<<?CR,?LF>>, [], [], Current, Max, MaxSizes, Result);
%% There where no headers, which is unlikely to happen.
-parse_headers(<<?CR,?LF>>, [], [], _, _, Result) ->
+parse_headers(<<?CR,?LF>>, [], [], _, _, _, Result) ->
NewResult = list_to_tuple(lists:reverse([<<>>, {#http_request_h{}, []} |
Result])),
{ok, NewResult};
-parse_headers(<<?LF>>, Header, Headers, CurrSize,
+parse_headers(<<?LF>>, Header, Headers, Current, Max,
MaxSizes, Result) ->
%% If ?CR is is missing RFC2616 section-19.3
- parse_headers(<<?CR,?LF>>, Header, Headers, CurrSize, MaxSizes, Result);
+ parse_headers(<<?CR,?LF>>, Header, Headers, Current, Max, MaxSizes, Result);
-parse_headers(<<?CR,?LF>> = Data, Header, Headers, CurrSize,
+parse_headers(<<?CR,?LF>> = Data, Header, Headers, Current, Max,
MaxSizes, Result) ->
- {?MODULE, parse_headers, [Data, Header, Headers, CurrSize,
+ {?MODULE, parse_headers, [Data, Header, Headers, Current, Max,
MaxSizes, Result]};
-parse_headers(<<?LF, Octet, Rest/binary>>, Header, Headers, CurrSize,
+parse_headers(<<?LF, Octet, Rest/binary>>, Header, Headers, Current, Max,
MaxSizes, Result) ->
%% If ?CR is is missing RFC2616 section-19.3
- parse_headers(<<?CR,?LF, Octet, Rest/binary>>, Header, Headers, CurrSize,
+ parse_headers(<<?CR,?LF, Octet, Rest/binary>>, Header, Headers, Current, Max,
MaxSizes, Result);
-parse_headers(<<?CR,?LF, Octet, Rest/binary>>, Header, Headers, CurrSize,
+parse_headers(<<?CR,?LF, Octet, Rest/binary>>, Header, Headers, _, Max,
MaxSizes, Result) ->
parse_headers(Rest, [Octet], [lists:reverse(Header) | Headers],
- CurrSize + 1, MaxSizes, Result);
-
-parse_headers(<<?CR>> = Data, Header, Headers, CurrSize,
+ 0, Max, MaxSizes, Result);
+parse_headers(<<?CR>> = Data, Header, Headers, Current, Max,
MaxSizes, Result) ->
- {?MODULE, parse_headers, [Data, Header, Headers, CurrSize,
+ {?MODULE, parse_headers, [Data, Header, Headers, Current, Max,
MaxSizes, Result]};
-parse_headers(<<?LF>>, Header, Headers, CurrSize,
+parse_headers(<<?LF>>, Header, Headers, Current, Max,
MaxSizes, Result) ->
%% If ?CR is is missing RFC2616 section-19.3
- parse_headers(<<?CR, ?LF>>, Header, Headers, CurrSize,
+ parse_headers(<<?CR, ?LF>>, Header, Headers, Current, Max,
MaxSizes, Result);
-parse_headers(<<Octet, Rest/binary>>, Header, Headers,
- CurrSize, MaxSizes, Result) ->
- parse_headers(Rest, [Octet | Header], Headers, CurrSize + 1,
+parse_headers(<<Octet, Rest/binary>>, Header, Headers, Current,
+ Max, MaxSizes, Result) ->
+ parse_headers(Rest, [Octet | Header], Headers, Current + 1, Max,
MaxSizes, Result).
whole_body(Body, Length) ->
@@ -326,6 +300,14 @@ validate_path([".." | Rest], N, RequestURI) ->
validate_path([_ | Rest], N, RequestURI) ->
validate_path(Rest, N + 1, RequestURI).
+validate_version("HTTP/1.1") ->
+ true;
+validate_version("HTTP/1.0") ->
+ true;
+validate_version("HTTP/0.9") ->
+ true;
+validate_version(_) ->
+ false.
%%----------------------------------------------------------------------
%% There are 3 possible forms of the reuqest URI
%%
@@ -430,3 +412,5 @@ tag([$:|Rest], Tag) ->
tag([Chr|Rest], Tag) ->
tag(Rest, [Chr|Tag]).
+lowest_version()->
+ "HTTP/0.9".
diff --git a/lib/inets/src/http_server/httpd_request_handler.erl b/lib/inets/src/http_server/httpd_request_handler.erl
index ea7a17e40d..b3c9cbc46a 100644
--- a/lib/inets/src/http_server/httpd_request_handler.erl
+++ b/lib/inets/src/http_server/httpd_request_handler.erl
@@ -1,7 +1,7 @@
%%
%% %CopyrightBegin%
%%
-%% Copyright Ericsson AB 1997-2012. All Rights Reserved.
+%% Copyright Ericsson AB 1997-2014. 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
@@ -25,7 +25,7 @@
-behaviour(gen_server).
%% Application internal API
--export([start/2, start/3, socket_ownership_transfered/3]).
+-export([start_link/2, start_link/3, socket_ownership_transfered/3]).
%% gen_server callbacks
-export([init/1, handle_call/3, handle_cast/2, handle_info/2,
@@ -57,10 +57,10 @@
%% Description: Starts a httpd-request handler process. Intended to be
%% called by the httpd acceptor process.
%%--------------------------------------------------------------------
-start(Manager, ConfigDB) ->
- start(Manager, ConfigDB, 15000).
-start(Manager, ConfigDB, AcceptTimeout) ->
- proc_lib:start(?MODULE, init, [[Manager, ConfigDB,AcceptTimeout]]).
+start_link(Manager, ConfigDB) ->
+ start_link(Manager, ConfigDB, 15000).
+start_link(Manager, ConfigDB, AcceptTimeout) ->
+ proc_lib:start_link(?MODULE, init, [[Manager, ConfigDB,AcceptTimeout]]).
%%--------------------------------------------------------------------
@@ -87,34 +87,27 @@ socket_ownership_transfered(Pid, SocketType, Socket) ->
%% gen_server provides is needed.
%%--------------------------------------------------------------------
init([Manager, ConfigDB, AcceptTimeout]) ->
- ?hdrd("initiate",
- [{manager, Manager}, {cdb, ConfigDB}, {timeout, AcceptTimeout}]),
+ process_flag(trap_exit, true),
%% Make sure this process terminates if the httpd manager process
%% should die!
- link(Manager),
+ %%link(Manager),
%% At this point the function httpd_request_handler:start/2 will return.
proc_lib:init_ack({ok, self()}),
{SocketType, Socket} = await_socket_ownership_transfer(AcceptTimeout),
- ?hdrd("socket ownership transfered",
- [{socket_type, SocketType}, {socket, Socket}]),
-
+
TimeOut = httpd_util:lookup(ConfigDB, keep_alive_timeout, 150000),
Then = erlang:now(),
- ?hdrd("negotiate", []),
case http_transport:negotiate(SocketType, Socket, TimeOut) of
- {error, Error} ->
- ?hdrd("negotiation failed", [{error, Error}]),
+ {error, _Error} ->
exit(shutdown); %% Can be 'normal'.
ok ->
- ?hdrt("negotiation successfull", []),
NewTimeout = TimeOut - timer:now_diff(now(),Then) div 1000,
continue_init(Manager, ConfigDB, SocketType, Socket, NewTimeout)
end.
continue_init(Manager, ConfigDB, SocketType, Socket, TimeOut) ->
- ?hdrt("continue init", [{timeout, TimeOut}]),
Resolve = http_transport:resolve(),
Peername = httpd_socket:peername(SocketType, Socket),
@@ -130,7 +123,8 @@ continue_init(Manager, ConfigDB, SocketType, Socket, TimeOut) ->
{_, Status} = httpd_manager:new_connection(Manager),
- MFA = {httpd_request, parse, [{MaxURISize, MaxHeaderSize}]},
+ MFA = {httpd_request, parse, [[{max_uri, MaxURISize}, {max_header, MaxHeaderSize},
+ {max_version, ?HTTP_MAX_VERSION_STRING}, {max_method, ?HTTP_MAX_METHOD_STRING}]]},
State = #state{mod = Mod,
manager = Manager,
@@ -139,14 +133,10 @@ continue_init(Manager, ConfigDB, SocketType, Socket, TimeOut) ->
max_keep_alive_request = NrOfRequest,
mfa = MFA},
- ?hdrt("activate request timeout", []),
-
- ?hdrt("set socket options (binary, packet & active)", []),
http_transport:setopts(SocketType, Socket,
[binary, {packet, 0}, {active, once}]),
NewState = data_receive_counter(activate_request_timeout(State), httpd_util:lookup(ConfigDB, minimum_bytes_per_second, false)),
- ?hdrt("init done", []),
- gen_server:enter_loop(?MODULE, [], NewState).
+ gen_server:enter_loop(?MODULE, [], NewState).
%%====================================================================
@@ -195,18 +185,13 @@ handle_cast(Msg, #state{mod = ModData} = State) ->
%% Description: Handling all non call/cast messages
%%--------------------------------------------------------------------
handle_info({Proto, Socket, Data},
- #state{mfa = {Module, Function, Args} = MFA,
+ #state{mfa = {Module, Function, Args},
mod = #mod{socket_type = SockType,
socket = Socket} = ModData} = State)
when (((Proto =:= tcp) orelse
(Proto =:= ssl) orelse
(Proto =:= dummy)) andalso is_binary(Data)) ->
- ?hdrd("received data",
- [{data, Data}, {proto, Proto},
- {socket, Socket}, {socket_type, SockType}, {mfa, MFA}]),
-
-%% case (catch Module:Function([Data | Args])) of
PROCESSED = (catch Module:Function([Data | Args])),
NewDataSize = case State#state.byte_limit of
undefined ->
@@ -214,10 +199,8 @@ handle_info({Proto, Socket, Data},
_ ->
State#state.data + byte_size(Data)
end,
- ?hdrt("data processed", [{processing_result, PROCESSED}]),
case PROCESSED of
{ok, Result} ->
- ?hdrd("data processed", [{result, Result}]),
NewState = case NewDataSize of
undefined ->
cancel_request_timeout(State);
@@ -225,28 +208,16 @@ handle_info({Proto, Socket, Data},
set_new_data_size(cancel_request_timeout(State), NewDataSize)
end,
handle_http_msg(Result, NewState);
-
- {error, {uri_too_long, MaxSize}, Version} ->
- ?hdrv("uri too long", [{max_size, MaxSize}, {version, Version}]),
- NewModData = ModData#mod{http_version = Version},
- httpd_response:send_status(NewModData, 414, "URI too long"),
- Reason = io_lib:format("Uri too long, max size is ~p~n",
- [MaxSize]),
- error_log(Reason, NewModData),
- {stop, normal, State#state{response_sent = true,
- mod = NewModData}};
- {error, {header_too_long, MaxSize}, Version} ->
- ?hdrv("header too long",
- [{max_size, MaxSize}, {version, Version}]),
+ {error, {too_long, MaxSize, ErrCode, ErrStr}, Version} ->
NewModData = ModData#mod{http_version = Version},
- httpd_response:send_status(NewModData, 413, "Header too long"),
- Reason = io_lib:format("Header too long, max size is ~p~n",
- [MaxSize]),
+ httpd_response:send_status(NewModData, ErrCode, ErrStr),
+ Reason = io_lib:format("~p: ~p max size is ~p~n",
+ [ErrCode, ErrStr, MaxSize]),
error_log(Reason, NewModData),
{stop, normal, State#state{response_sent = true,
mod = NewModData}};
+
NewMFA ->
- ?hdrd("data processed - reactivate socket", [{new_mfa, NewMFA}]),
http_transport:setopts(SockType, Socket, [{active, once}]),
case NewDataSize of
undefined ->
@@ -293,6 +264,10 @@ handle_info(check_data, #state{data = Data, byte_limit = Byte_Limit} = State) ->
_ ->
{stop, normal, State#state{response_sent = true}}
end;
+
+handle_info({'EXIT', _, Reason}, State) ->
+ {stop, Reason, State};
+
%% Default case
handle_info(Info, #state{mod = ModData} = State) ->
Error = lists:flatten(
@@ -324,10 +299,8 @@ terminate(Reason, #state{response_sent = false, mod = ModData} = State) ->
terminate(_Reason, State) ->
do_terminate(State).
-do_terminate(#state{mod = ModData, manager = Manager} = State) ->
- catch httpd_manager:done_connection(Manager),
+do_terminate(#state{mod = ModData} = State) ->
cancel_request_timeout(State),
- %% receive after 5000 -> ok end,
httpd_socket:close(ModData#mod.socket_type, ModData#mod.socket).
@@ -355,30 +328,24 @@ await_socket_ownership_transfer(AcceptTimeout) ->
handle_http_msg({_, _, Version, {_, _}, _},
#state{status = busy, mod = ModData} = State) ->
- ?hdrt("handle http msg when manager busy", [{mod, ModData}]),
handle_manager_busy(State#state{mod =
ModData#mod{http_version = Version}}),
{stop, normal, State};
handle_http_msg({_, _, Version, {_, _}, _},
#state{status = blocked, mod = ModData} = State) ->
- ?hdrt("handle http msg when manager blocket", [{mod, ModData}]),
handle_manager_blocked(State#state{mod =
ModData#mod{http_version = Version}}),
{stop, normal, State};
handle_http_msg({Method, Uri, Version, {RecordHeaders, Headers}, Body},
#state{status = accept, mod = ModData} = State) ->
- ?hdrt("handle http msg when manager accepting",
- [{method, Method}, {mod, ModData}]),
case httpd_request:validate(Method, Uri, Version) of
ok ->
- ?hdrt("request validated", []),
{ok, NewModData} =
httpd_request:update_mod_data(ModData, Method, Uri,
Version, Headers),
- ?hdrt("new mod data", [{mod, NewModData}]),
case is_host_specified_if_required(NewModData#mod.absolute_uri,
RecordHeaders, Version) of
true ->
@@ -392,37 +359,34 @@ handle_http_msg({Method, Uri, Version, {RecordHeaders, Headers}, Body},
{stop, normal, State#state{response_sent = true}}
end;
{error, {not_supported, What}} ->
- ?hdrd("validation failed: not supported", [{what, What}]),
httpd_response:send_status(ModData#mod{http_version = Version},
501, {Method, Uri, Version}),
Reason = io_lib:format("Not supported: ~p~n", [What]),
error_log(Reason, ModData),
{stop, normal, State#state{response_sent = true}};
{error, {bad_request, {forbidden, URI}}} ->
- ?hdrd("validation failed: bad request - forbidden",
- [{uri, URI}]),
httpd_response:send_status(ModData#mod{http_version = Version},
403, URI),
Reason = io_lib:format("Forbidden URI: ~p~n", [URI]),
error_log(Reason, ModData),
{stop, normal, State#state{response_sent = true}};
{error, {bad_request, {malformed_syntax, URI}}} ->
- ?hdrd("validation failed: bad request - malformed syntax",
- [{uri, URI}]),
httpd_response:send_status(ModData#mod{http_version = Version},
400, URI),
Reason = io_lib:format("Malformed syntax in URI: ~p~n", [URI]),
error_log(Reason, ModData),
+ {stop, normal, State#state{response_sent = true}};
+ {error, {bad_version, Ver}} ->
+ httpd_response:send_status(ModData#mod{http_version = "HTTP/0.9"}, 400, Ver),
+ Reason = io_lib:format("Malformed syntax version: ~p~n", [Ver]),
+ error_log(Reason, ModData),
{stop, normal, State#state{response_sent = true}}
end;
handle_http_msg({ChunkedHeaders, Body},
State = #state{headers = Headers}) ->
- ?hdrt("handle http msg",
- [{chunked_headers, ChunkedHeaders}, {body, Body}]),
NewHeaders = http_chunk:handle_headers(Headers, ChunkedHeaders),
handle_response(State#state{headers = NewHeaders, body = Body});
handle_http_msg(Body, State) ->
- ?hdrt("handle http msg", [{body, Body}]),
handle_response(State#state{body = Body}).
handle_manager_busy(#state{mod = #mod{config_db = ConfigDB}} = State) ->
@@ -445,7 +409,6 @@ is_host_specified_if_required(_, _, _) ->
true.
handle_body(#state{mod = #mod{config_db = ConfigDB}} = State) ->
- ?hdrt("handle body", []),
MaxHeaderSize = max_header_size(ConfigDB),
MaxBodySize = max_body_size(ConfigDB),
@@ -459,34 +422,22 @@ handle_body(#state{mod = #mod{config_db = ConfigDB}} = State) ->
handle_body(#state{headers = Headers, body = Body, mod = ModData} = State,
MaxHeaderSize, MaxBodySize) ->
- ?hdrt("handle body", [{headers, Headers}, {body, Body}]),
case Headers#http_request_h.'transfer-encoding' of
"chunked" ->
- ?hdrt("chunked - attempt decode", []),
case http_chunk:decode(Body, MaxBodySize, MaxHeaderSize) of
{Module, Function, Args} ->
- ?hdrt("chunk decoded",
- [{module, Module},
- {function, Function},
- {args, Args}]),
http_transport:setopts(ModData#mod.socket_type,
ModData#mod.socket,
[{active, once}]),
{noreply, State#state{mfa =
{Module, Function, Args}}};
{ok, {ChunkedHeaders, NewBody}} ->
- ?hdrt("chunk decoded",
- [{chunked_headers, ChunkedHeaders},
- {new_body, NewBody}]),
NewHeaders =
http_chunk:handle_headers(Headers, ChunkedHeaders),
- ?hdrt("chunked - headers handled",
- [{new_headers, NewHeaders}]),
handle_response(State#state{headers = NewHeaders,
body = NewBody})
end;
Encoding when is_list(Encoding) ->
- ?hdrt("not chunked - encoding", [{encoding, Encoding}]),
httpd_response:send_status(ModData, 501,
"Unknown Transfer-Encoding"),
Reason = io_lib:format("Unknown Transfer-Encoding: ~p~n",
@@ -494,17 +445,12 @@ handle_body(#state{headers = Headers, body = Body, mod = ModData} = State,
error_log(Reason, ModData),
{stop, normal, State#state{response_sent = true}};
_ ->
- ?hdrt("not chunked", []),
Length =
list_to_integer(Headers#http_request_h.'content-length'),
case ((Length =< MaxBodySize) or (MaxBodySize == nolimit)) of
true ->
case httpd_request:whole_body(Body, Length) of
{Module, Function, Args} ->
- ?hdrt("whole body",
- [{module, Module},
- {function, Function},
- {args, Args}]),
http_transport:setopts(ModData#mod.socket_type,
ModData#mod.socket,
[{active, once}]),
@@ -512,15 +458,11 @@ handle_body(#state{headers = Headers, body = Body, mod = ModData} = State,
{Module, Function, Args}}};
{ok, NewBody} ->
- ?hdrt("whole body",
- [{new_body, NewBody}]),
handle_response(
State#state{headers = Headers,
body = NewBody})
end;
false ->
- ?hdrd("body too long",
- [{length, Length}, {max_body_size, MaxBodySize}]),
httpd_response:send_status(ModData, 413, "Body too long"),
error_log("Body too long", ModData),
{stop, normal, State#state{response_sent = true}}
@@ -582,8 +524,6 @@ handle_response(#state{body = Body,
mod = ModData,
headers = Headers,
max_keep_alive_request = Max} = State) when Max > 0 ->
- ?hdrt("handle response",
- [{body, Body}, {mod, ModData}, {headers, Headers}, {max, Max}]),
{NewBody, Data} = httpd_request:body_data(Headers, Body),
ok = httpd_response:generate_and_send_response(
ModData#mod{entity_body = NewBody}),
@@ -592,8 +532,6 @@ handle_response(#state{body = Body,
handle_response(#state{body = Body,
headers = Headers,
mod = ModData} = State) ->
- ?hdrt("handle response",
- [{body, Body}, {mod, ModData}, {headers, Headers}]),
{NewBody, _} = httpd_request:body_data(Headers, Body),
ok = httpd_response:generate_and_send_response(
ModData#mod{entity_body = NewBody}),
@@ -601,7 +539,6 @@ handle_response(#state{body = Body,
handle_next_request(#state{mod = #mod{connection = true} = ModData,
max_keep_alive_request = Max} = State, Data) ->
- ?hdrt("handle next request", [{max, Max}]),
NewModData = #mod{socket_type = ModData#mod.socket_type,
socket = ModData#mod.socket,
@@ -610,7 +547,8 @@ handle_next_request(#state{mod = #mod{connection = true} = ModData,
MaxHeaderSize = max_header_size(ModData#mod.config_db),
MaxURISize = max_uri_size(ModData#mod.config_db),
- MFA = {httpd_request, parse, [{MaxURISize, MaxHeaderSize}]},
+ MFA = {httpd_request, parse, [[{max_uri, MaxURISize}, {max_header, MaxHeaderSize},
+ {max_version, ?HTTP_MAX_VERSION_STRING}, {max_method, ?HTTP_MAX_METHOD_STRING}]]},
TmpState = State#state{mod = NewModData,
mfa = MFA,
max_keep_alive_request = decrease(Max),
@@ -630,11 +568,9 @@ handle_next_request(#state{mod = #mod{connection = true} = ModData,
end;
handle_next_request(State, _) ->
- ?hdrt("handle next request - stop", []),
{stop, normal, State}.
activate_request_timeout(#state{timeout = Time} = State) ->
- ?hdrt("activate request timeout", [{time, Time}]),
Ref = erlang:send_after(Time, self(), timeout),
State#state{timer = Ref}.
data_receive_counter(State, Byte_limit) ->
diff --git a/lib/inets/src/http_server/httpd_util.erl b/lib/inets/src/http_server/httpd_util.erl
index b0b18b9c3d..0d04a75205 100644
--- a/lib/inets/src/http_server/httpd_util.erl
+++ b/lib/inets/src/http_server/httpd_util.erl
@@ -1,7 +1,7 @@
%%
%% %CopyrightBegin%
%%
-%% Copyright Ericsson AB 1997-2011. All Rights Reserved.
+%% Copyright Ericsson AB 1997-2014. 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
@@ -206,9 +206,6 @@ message(413, Reason,_) ->
"Entity: " ++ html_encode(Reason);
message(414,ReasonPhrase,_) ->
"Message " ++ html_encode(ReasonPhrase) ++ ".";
-message(416,ReasonPhrase,_) ->
- html_encode(ReasonPhrase);
-
message(500,_,ConfigDB) ->
ServerAdmin=lookup(ConfigDB,server_admin,"unknown@unknown"),
"The server encountered an internal error or "
@@ -233,7 +230,9 @@ message(501,{Method, RequestURI, HTTPVersion}, _ConfigDB) ->
end;
message(503, String, _ConfigDB) ->
- "This service in unavailable due to: " ++ html_encode(String).
+ "This service in unavailable due to: " ++ html_encode(String);
+message(_, ReasonPhrase, _) ->
+ html_encode(ReasonPhrase).
maybe_encode(URI) ->
Decoded = try http_uri:decode(URI) of
diff --git a/lib/inets/src/inets_app/inets.app.src b/lib/inets/src/inets_app/inets.app.src
index 4aea2ef3d7..9eae962d03 100644
--- a/lib/inets/src/inets_app/inets.app.src
+++ b/lib/inets/src/inets_app/inets.app.src
@@ -1,7 +1,7 @@
%% This is an -*- erlang -*- file.
%% %CopyrightBegin%
%%
-%% Copyright Ericsson AB 1997-2011. All Rights Reserved.
+%% Copyright Ericsson AB 1997-2014. 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
@@ -59,6 +59,7 @@
httpd_acceptor,
httpd_acceptor_sup,
httpd_cgi,
+ httpd_connection_sup,
httpd_conf,
httpd_esi,
httpd_example,
@@ -109,4 +110,6 @@
{registered,[inets_sup, httpc_manager]},
%% If the "new" ssl is used then 'crypto' must be started before inets.
{applications,[kernel,stdlib]},
- {mod,{inets_app,[]}}]}.
+ {mod,{inets_app,[]}},
+ {runtime_dependencies, ["stdlib-2.0","ssl-5.3.4","runtime_tools-1.8.14",
+ "mnesia-4.12","kernel-3.0","erts-6.0"]}]}.
diff --git a/lib/inets/src/inets_app/inets.appup.src b/lib/inets/src/inets_app/inets.appup.src
index c63dcafa6c..5499596bbd 100644
--- a/lib/inets/src/inets_app/inets.appup.src
+++ b/lib/inets/src/inets_app/inets.appup.src
@@ -1,7 +1,7 @@
-%% This is an -*- erlang -*- file.
+%% -*- erlang -*-
%% %CopyrightBegin%
%%
-%% Copyright Ericsson AB 1999-2013. All Rights Reserved.
+%% Copyright Ericsson AB 1999-2014. 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
@@ -15,11 +15,22 @@
%% under the License.
%%
%% %CopyrightEnd%
-
{"%VSN%",
[
- {<<"5\\.*">>, [{restart_application, inets}]}
- ],
+ {"5.10",
+ [{load_module, httpd, soft_purge, soft_purge, []},
+ {load_module, httpd_manager, soft_purge, soft_purge, []},
+ {load_module, httpd_request, soft_purge, soft_purge, []},
+ {load_module, httpd_request_handler, soft_purge, soft_purge,
+ []}]},
+ {<<"5\\..*">>,[{restart_application, inets}]}
+ ],
[
- {<<"5\\.*">>, [{restart_application, inets}]}
-]}.
+ {"5.10",
+ [{load_module, httpd, soft_purge, soft_purge, []},
+ {load_module, httpd_manager, soft_purge, soft_purge, []},
+ {load_module, httpd_request, soft_purge, soft_purge, []},
+ {load_module, httpd_request_handler, soft_purge, soft_purge, []}]},
+ {<<"5\\..*">>,[{restart_application, inets}]}
+ ]
+}.
diff --git a/lib/inets/test/Makefile b/lib/inets/test/Makefile
index f18db273ec..609396273d 100644
--- a/lib/inets/test/Makefile
+++ b/lib/inets/test/Makefile
@@ -1,7 +1,7 @@
#
# %CopyrightBegin%
#
-# Copyright Ericsson AB 1997-2013. All Rights Reserved.
+# Copyright Ericsson AB 1997-2014. 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
@@ -158,12 +158,14 @@ MODULES = \
httpc_cookie_SUITE \
httpc_proxy_SUITE \
httpd_SUITE \
+ old_httpd_SUITE \
httpd_basic_SUITE \
httpd_mod \
httpd_block \
httpd_load \
httpd_time_test \
httpd_1_1 \
+ httpd_1_0 \
httpd_test_lib \
inets_sup_SUITE \
inets_SUITE \
@@ -201,7 +203,7 @@ INETS_FILES = inets.config $(INETS_SPECS)
# inets_tftp_suite
INETS_DATADIRS = inets_SUITE_data inets_sup_SUITE_data
-HTTPD_DATADIRS = httpd_test_data httpd_SUITE_data httpd_basic_SUITE_data
+HTTPD_DATADIRS = httpd_test_data httpd_SUITE_data httpd_basic_SUITE_data old_httpd_SUITE_data
HTTPC_DATADIRS = httpc_SUITE_data httpc_proxy_SUITE_data
FTP_DATADIRS = ftp_SUITE_data
diff --git a/lib/inets/test/ftp_suite_lib.erl b/lib/inets/test/ftp_suite_lib.erl
index 35f21cc74d..daee1bdcdc 100644
--- a/lib/inets/test/ftp_suite_lib.erl
+++ b/lib/inets/test/ftp_suite_lib.erl
@@ -1266,6 +1266,8 @@ read_log_6035([]) ->
%%--------------------------------------------------------------------
do_user(Pid) ->
{error, euser} = ftp:user(Pid, ?BAD_USER, ?FTP_PASS),
+ {error, euser} = ftp:user(Pid, ?FTP_USER++"\r\nPASS "++?FTP_PASS, ?FTP_PASS),
+ {error, euser} = ftp:user(Pid, ?FTP_USER, ?FTP_PASS++"\r\nCWD ."),
ok = ftp:user(Pid, ?FTP_USER, ?FTP_PASS),
ok.
@@ -1278,6 +1280,7 @@ do_pwd(Pid) ->
do_cd(Pid) ->
ok = ftp:cd(Pid, "/pub"),
{error, epath} = ftp:cd(Pid, ?BAD_DIR),
+ {error, efnamena} = ftp:cd(Pid, "/pub\r\nCWD ."),
ok.
do_lcd(Pid, Dir) ->
@@ -1294,11 +1297,14 @@ do_ls(Pid) ->
%% directory, but can also be a filename or a group
%% of files (including wildcards).
{ok, _} = ftp:ls(Pid, "incom*"),
+ %% but \r\n can't be in the wildcard
+ {error, efnamena} = ftp:ls(Pid, "incoming\r\nCWD ."),
ok.
do_nlist(Pid, WildcardSupport) ->
{ok, _} = ftp:nlist(Pid),
{ok, _} = ftp:nlist(Pid, "incoming"),
+ {error, efnamena} = ftp:ls(Pid, "incoming\r\nCWD ."),
%% neither nlist nor ls operates on a directory
%% they operate on a pathname, which *can* be a
%% directory, but can also be a filename or a group
@@ -1324,6 +1330,8 @@ do_rename(Pid, Config) ->
ftp:delete(Pid, NewLFile), % reset
ok = ftp:send(Pid, LFile),
{error, epath} = ftp:rename(Pid, NewLFile, LFile),
+ {error, efnamena} = ftp:rename(Pid, NewLFile++"\r\nRNTO "++LFile++"\r\nRNFR "++NewLFile, LFile),
+ {error, efnamena} = ftp:rename(Pid, NewLFile, LFile++"\r\nCWD ."),
ok = ftp:rename(Pid, LFile, NewLFile),
ftp:delete(Pid, LFile), % cleanup
ftp:delete(Pid, NewLFile), % cleanup
@@ -1338,6 +1346,7 @@ do_delete(Pid, Config) ->
ok = ftp:cd(Pid, "incoming"),
ok = ftp:lcd(Pid, PrivDir),
ftp:delete(Pid,LFile), % reset
+ {error, efnamena} = ftp:delete(Pid,LFile++"\r\nCWD ."),
ok = ftp:send(Pid, LFile),
ok = ftp:delete(Pid,LFile),
ok.
@@ -1348,6 +1357,8 @@ do_mkdir(Pid) ->
integer_to_list(B) ++ "_" ++ integer_to_list(C),
ok = ftp:cd(Pid, "incoming"),
{ok, CurrDir} = ftp:pwd(Pid),
+ {error, efnamena} = ftp:mkdir(Pid, NewDir++"\r\nCWD ."),
+ {error, efnamena} = ftp:rmdir(Pid, NewDir++"\r\nCWD ."),
ok = ftp:mkdir(Pid, NewDir),
ok = ftp:cd(Pid, NewDir),
ok = ftp:cd(Pid, CurrDir),
@@ -1363,6 +1374,7 @@ do_send(Pid, Config) ->
ok = file:write_file(AbsLFile, list_to_binary(Contents)),
ok = ftp:cd(Pid, "incoming"),
ok = ftp:lcd(Pid, PrivDir),
+ {error, efnamena} = ftp:send(Pid, LFile, RFile++"1\r\nCWD ."),
ok = ftp:send(Pid, LFile, RFile),
{ok, RFilesString} = ftp:nlist(Pid),
RFiles = split(RFilesString),
@@ -1392,6 +1404,7 @@ do_append(Pid, Config) ->
ftp:delete(Pid, RFile),
ftp:delete(Pid, LFile),
+ {error, efnamena} = ftp:append(Pid, LFile, RFile++"1\r\nCWD ."),
ok = ftp:append(Pid, LFile, RFile),
ok = ftp:append(Pid, LFile, RFile),
ok = ftp:append(Pid, LFile),
@@ -1413,6 +1426,7 @@ do_send_bin(Pid, Config) ->
Bin = list_to_binary(Contents),
ok = ftp:cd(Pid, "incoming"),
{error, enotbinary} = ftp:send_bin(Pid, Contents, File),
+ {error, efnamena} = ftp:send_bin(Pid, Bin, File++"1\r\nCWD ."),
ok = ftp:send_bin(Pid, Bin, File),
{ok, RFilesString} = ftp:nlist(Pid),
RFiles = split(RFilesString),
@@ -1426,6 +1440,7 @@ do_append_bin(Pid, Config) ->
Bin = list_to_binary(Contents),
ok = ftp:cd(Pid, "incoming"),
{error, enotbinary} = ftp:append_bin(Pid, Contents, File),
+ {error, efnamena} = ftp:append_bin(Pid, Bin, File++"1\r\nCWD ."),
ok = ftp:append_bin(Pid, Bin, File),
ok = ftp:append_bin(Pid, Bin, File),
%% Control the contents of the file
@@ -1438,6 +1453,7 @@ do_send_chunk(Pid, Config) ->
Contents = "ftp_SUITE test ...",
Bin = list_to_binary(Contents),
ok = ftp:cd(Pid, "incoming"),
+ {error, efnamena} = ftp:send_chunk_start(Pid, File++"1\r\nCWD ."),
ok = ftp:send_chunk_start(Pid, File),
{error, echunk} = ftp:cd(Pid, "incoming"),
{error, enotbinary} = ftp:send_chunk(Pid, Contents),
@@ -1454,6 +1470,7 @@ do_append_chunk(Pid, Config) ->
File = ?config(file, Config),
Contents = ["ER","LE","RL"],
ok = ftp:cd(Pid, "incoming"),
+ {error, efnamena} = ftp:append_chunk_start(Pid, File++"1\r\nCWD ."),
ok = ftp:append_chunk_start(Pid, File),
{error, enotbinary} = ftp:append_chunk(Pid, lists:nth(1,Contents)),
ok = ftp:append_chunk(Pid,list_to_binary(lists:nth(1,Contents))),
@@ -1480,6 +1497,7 @@ do_recv(Pid, Config) ->
ok = file:delete(AbsFile), % cleanup
test_server:sleep(100),
ok = ftp:lcd(Pid, PrivDir),
+ {error, efnamena} = ftp:recv(Pid, File++"\r\nCWD ."),
ok = ftp:recv(Pid, File),
{ok, Files} = file:list_dir(PrivDir),
true = lists:member(File, Files),
@@ -1495,6 +1513,7 @@ do_recv_bin(Pid, Config) ->
ok = ftp:cd(Pid, "incoming"),
ok = ftp:send_bin(Pid, Bin1, File),
test_server:sleep(100),
+ {error, efnamena} = ftp:recv_bin(Pid, File++"\r\nCWD ."),
{ok, Bin2} = ftp:recv_bin(Pid, File),
ok = ftp:delete(Pid, File), % cleanup
Contents2 = binary_to_list(Bin2),
@@ -1520,6 +1539,7 @@ do_recv_chunk(Pid, Config) ->
ok = ftp:send_bin(Pid, Bin1, File),
test_server:sleep(100),
{error, "ftp:recv_chunk_start/2 not called"} = recv_chunk(Pid, <<>>),
+ {error, efnamena} = ftp:recv_chunk_start(Pid, File++"\r\nCWD ."),
ok = ftp:recv_chunk_start(Pid, File),
{ok, Contents2} = recv_chunk(Pid, <<>>),
ok = ftp:delete(Pid, File), % cleanup
diff --git a/lib/inets/test/http_format_SUITE.erl b/lib/inets/test/http_format_SUITE.erl
index c5920a3968..d4a3f28f38 100644
--- a/lib/inets/test/http_format_SUITE.erl
+++ b/lib/inets/test/http_format_SUITE.erl
@@ -1,7 +1,7 @@
%%
%% %CopyrightBegin%
%%
-%% Copyright Ericsson AB 2004-2013. All Rights Reserved.
+%% Copyright Ericsson AB 2004-2014. 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
@@ -356,7 +356,10 @@ http_request(Config) when is_list(Config) ->
"HTTP/1.1",
{#http_request_h{host = "www.erlang.org", te = []},
["te: ","host:www.erlang.org"]}, <<>>} =
- parse(httpd_request, parse, [?HTTP_MAX_HEADER_SIZE], HttpHead),
+ parse(httpd_request, parse, [[{max_header, ?HTTP_MAX_HEADER_SIZE},
+ {max_version, ?HTTP_MAX_VERSION_STRING},
+ {max_method, ?HTTP_MAX_METHOD_STRING}]],
+ HttpHead),
HttpHead1 = ["GET http://www.erlang.org HTTP/1.1" ++
[?CR], [?LF, ?CR, ?LF]],
@@ -364,7 +367,9 @@ http_request(Config) when is_list(Config) ->
"http://www.erlang.org",
"HTTP/1.1",
{#http_request_h{}, []}, <<>>} =
- parse(httpd_request, parse, [?HTTP_MAX_HEADER_SIZE], HttpHead1),
+ parse(httpd_request, parse, [[{max_header, ?HTTP_MAX_HEADER_SIZE},
+ {max_version, ?HTTP_MAX_VERSION_STRING},
+ {max_method, ?HTTP_MAX_METHOD_STRING}]], HttpHead1),
HttpHead2 = ["GET http://www.erlang.org HTTP/1.1" ++
@@ -373,7 +378,9 @@ http_request(Config) when is_list(Config) ->
"http://www.erlang.org",
"HTTP/1.1",
{#http_request_h{}, []}, <<>>} =
- parse(httpd_request, parse, [?HTTP_MAX_HEADER_SIZE], HttpHead2),
+ parse(httpd_request, parse, [[{max_header, ?HTTP_MAX_HEADER_SIZE},
+ {max_version, ?HTTP_MAX_VERSION_STRING},
+ {max_method, ?HTTP_MAX_METHOD_STRING}]], HttpHead2),
%% Note the following body is not related to the headers above
HttpBody = ["<HTML>\n<HEAD>\n<TITLE> dummy </TITLE>\n</HEAD>\n<BODY>\n",
diff --git a/lib/inets/test/httpc_SUITE.erl b/lib/inets/test/httpc_SUITE.erl
index fe6edd504e..c535d59b9f 100644
--- a/lib/inets/test/httpc_SUITE.erl
+++ b/lib/inets/test/httpc_SUITE.erl
@@ -1,7 +1,7 @@
%%
%% %CopyrightBegin%
%%
-%% Copyright Ericsson AB 2004-2013. All Rights Reserved.
+%% Copyright Ericsson AB 2004-2014. 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
@@ -27,15 +27,14 @@
-include_lib("kernel/include/file.hrl").
-include_lib("common_test/include/ct.hrl").
-include("inets_test_lib.hrl").
-
+-include("http_internal.hrl").
%% Note: This directive should only be used in test suites.
-compile(export_all).
-define(URL_START, "http://").
-define(TLS_URL_START, "https://").
-define(NOT_IN_USE_PORT, 8997).
--define(LF, $\n).
--define(HTTP_MAX_HEADER_SIZE, 10240).
+
-record(sslsocket, {fd = nil, pid = nil}).
%%--------------------------------------------------------------------
%% Common Test interface functions -----------------------------------
@@ -91,8 +90,11 @@ only_simulated() ->
[
cookie,
cookie_profile,
+ empty_set_cookie,
trace,
stream_once,
+ stream_single_chunk,
+ stream_no_length,
no_content_204,
tolerate_missing_CR,
userinfo,
@@ -104,6 +106,7 @@ only_simulated() ->
remote_socket_close,
remote_socket_close_async,
transfer_encoding,
+ transfer_encoding_identity,
redirect_loop,
redirect_moved_permanently,
redirect_multiple_choises,
@@ -296,6 +299,9 @@ trace(Config) when is_list(Config) ->
pipeline(Config) when is_list(Config) ->
Request = {url(group_name(Config), "/dummy.html", Config), []},
{ok, _} = httpc:request(get, Request, [], [], pipeline),
+
+ %% Make sure pipeline session is registerd
+ test_server:sleep(4000),
keep_alive_requests(Request, pipeline).
%%--------------------------------------------------------------------
@@ -303,6 +309,9 @@ pipeline(Config) when is_list(Config) ->
persistent_connection(Config) when is_list(Config) ->
Request = {url(group_name(Config), "/dummy.html", Config), []},
{ok, _} = httpc:request(get, Request, [], [], persistent),
+
+ %% Make sure pipeline session is registerd
+ test_server:sleep(4000),
keep_alive_requests(Request, persistent).
%%-------------------------------------------------------------------------
@@ -379,6 +388,22 @@ stream_once(Config) when is_list(Config) ->
Request2 = {url(group_name(Config), "/once_chunked.html", Config), []},
stream_test(Request2, {stream, {self, once}}).
+%%-------------------------------------------------------------------------
+stream_single_chunk() ->
+ [{doc, "Test the option stream for asynchrony requests"}].
+stream_single_chunk(Config) when is_list(Config) ->
+ Request = {url(group_name(Config), "/single_chunk.html", Config), []},
+ stream_test(Request, {stream, self}).
+%%-------------------------------------------------------------------------
+stream_no_length() ->
+ [{doc, "Test the option stream for asynchrony requests with HTTP 1.0 "
+ "body end on closed connection" }].
+stream_no_length(Config) when is_list(Config) ->
+ Request1 = {url(group_name(Config), "/http_1_0_no_length_single.html", Config), []},
+ stream_test(Request1, {stream, self}),
+ Request2 = {url(group_name(Config), "/http_1_0_no_length_multiple.html", Config), []},
+ stream_test(Request2, {stream, self}).
+
%%-------------------------------------------------------------------------
redirect_multiple_choises() ->
@@ -530,6 +555,19 @@ cookie_profile(Config) when is_list(Config) ->
inets:stop(httpc, cookie_test).
%%-------------------------------------------------------------------------
+empty_set_cookie() ->
+ [{doc, "Test empty Set-Cookie header."}].
+empty_set_cookie(Config) when is_list(Config) ->
+ ok = httpc:set_options([{cookies, enabled}]),
+
+ Request0 = {url(group_name(Config), "/empty_set_cookie.html", Config), []},
+
+ {ok, {{_,200,_}, [_ | _], [_|_]}}
+ = httpc:request(get, Request0, [], []),
+
+ ok = httpc:set_options([{cookies, disabled}]).
+
+%%-------------------------------------------------------------------------
headers_as_is(doc) ->
["Test the option headers_as_is"];
headers_as_is(Config) when is_list(Config) ->
@@ -624,6 +662,12 @@ transfer_encoding(Config) when is_list(Config) ->
%%-------------------------------------------------------------------------
+transfer_encoding_identity(Config) when is_list(Config) ->
+ URL = url(group_name(Config), "/identity_transfer_encoding.html", Config),
+ {ok, {{_,200,_}, [_|_], "IDENTITY"}} = httpc:request(URL).
+
+%%-------------------------------------------------------------------------
+
empty_response_header() ->
[{doc, "Test the case that the HTTP server does not send any headers. Solves OTP-6830"}].
empty_response_header(Config) when is_list(Config) ->
@@ -1020,7 +1064,7 @@ stream_test(Request, To) ->
ct:fail(Msg)
end,
- Body == binary_to_list(StreamedBody).
+ Body = binary_to_list(StreamedBody).
url(http, End, Config) ->
Port = ?config(port, Config),
@@ -1199,7 +1243,10 @@ dummy_server_init(Caller, ip_comm, Inet, _) ->
{ok, ListenSocket} = gen_tcp:listen(0, [Inet | BaseOpts]),
{ok, Port} = inet:port(ListenSocket),
Caller ! {port, Port},
- dummy_ipcomm_server_loop({httpd_request, parse, [?HTTP_MAX_HEADER_SIZE]},
+ dummy_ipcomm_server_loop({httpd_request, parse, [[{max_uri, ?HTTP_MAX_URI_SIZE},
+ {max_header, ?HTTP_MAX_HEADER_SIZE},
+ {max_version,?HTTP_MAX_VERSION_STRING},
+ {max_method, ?HTTP_MAX_METHOD_STRING}]]},
[], ListenSocket);
dummy_server_init(Caller, ssl, Inet, SSLOptions) ->
@@ -1211,7 +1258,10 @@ dummy_ssl_server_init(Caller, BaseOpts, Inet) ->
{ok, ListenSocket} = ssl:listen(0, [Inet | BaseOpts]),
{ok, {_, Port}} = ssl:sockname(ListenSocket),
Caller ! {port, Port},
- dummy_ssl_server_loop({httpd_request, parse, [?HTTP_MAX_HEADER_SIZE]},
+ dummy_ssl_server_loop({httpd_request, parse, [[{max_uri, ?HTTP_MAX_URI_SIZE},
+ {max_method, ?HTTP_MAX_METHOD_STRING},
+ {max_version,?HTTP_MAX_VERSION_STRING},
+ {max_method, ?HTTP_MAX_METHOD_STRING}]]},
[], ListenSocket).
dummy_ipcomm_server_loop(MFA, Handlers, ListenSocket) ->
@@ -1241,6 +1291,7 @@ dummy_ssl_server_loop(MFA, Handlers, ListenSocket) ->
From ! {stopped, self()}
after 0 ->
{ok, Socket} = ssl:transport_accept(ListenSocket),
+ ok = ssl:ssl_accept(Socket, infinity),
HandlerPid = dummy_request_handler(MFA, Socket),
ssl:controlling_process(Socket, HandlerPid),
HandlerPid ! ssl_controller,
@@ -1287,10 +1338,16 @@ handle_request(Module, Function, Args, Socket) ->
stop ->
stop;
<<>> ->
- {httpd_request, parse, [[<<>>, ?HTTP_MAX_HEADER_SIZE]]};
+ {httpd_request, parse, [[<<>>, [{max_uri, ?HTTP_MAX_URI_SIZE},
+ {max_header, ?HTTP_MAX_HEADER_SIZE},
+ {max_version,?HTTP_MAX_VERSION_STRING},
+ {max_method, ?HTTP_MAX_METHOD_STRING}]]]};
Data ->
handle_request(httpd_request, parse,
- [Data |[?HTTP_MAX_HEADER_SIZE]], Socket)
+ [Data, [{max_uri, ?HTTP_MAX_URI_SIZE},
+ {max_header, ?HTTP_MAX_HEADER_SIZE},
+ {max_version,?HTTP_MAX_VERSION_STRING},
+ {max_method, ?HTTP_MAX_METHOD_STRING}]], Socket)
end;
NewMFA ->
NewMFA
@@ -1609,6 +1666,13 @@ handle_uri(_,"/capital_transfer_encoding.html",_,_,Socket,_) ->
send(Socket, http_chunk:encode("obar</BODY></HTML>")),
http_chunk:encode_last();
+handle_uri(_,"/identity_transfer_encoding.html",_,_,_,_) ->
+ "HTTP/1.0 200 OK\r\n"
+ "Transfer-Encoding:identity\r\n"
+ "Content-Length:8\r\n"
+ "\r\n"
+ "IDENTITY";
+
handle_uri(_,"/cookie.html",_,_,_,_) ->
"HTTP/1.1 200 ok\r\n" ++
"set-cookie:" ++ "test_cookie=true; path=/;" ++
@@ -1616,6 +1680,12 @@ handle_uri(_,"/cookie.html",_,_,_,_) ->
"Content-Length:32\r\n\r\n"++
"<HTML><BODY>foobar</BODY></HTML>";
+handle_uri(_,"/empty_set_cookie.html",_,_,_,_) ->
+ "HTTP/1.1 200 ok\r\n" ++
+ "set-cookie: \r\n" ++
+ "Content-Length:32\r\n\r\n"++
+ "<HTML><BODY>foobar</BODY></HTML>";
+
handle_uri(_,"/missing_crlf.html",_,_,_,_) ->
"HTTP/1.1 200 ok" ++
"Content-Length:32\r\n" ++
@@ -1635,6 +1705,30 @@ handle_uri(_,"/once_chunked.html",_,_,Socket,_) ->
http_chunk:encode("obar</BODY></HTML>")),
http_chunk:encode_last();
+handle_uri(_,"/single_chunk.html",_,_,Socket,_) ->
+ Chunk = "HTTP/1.1 200 ok\r\n" ++
+ "Transfer-Encoding:Chunked\r\n\r\n" ++
+ http_chunk:encode("<HTML><BODY>fo") ++
+ http_chunk:encode("obar</BODY></HTML>") ++
+ http_chunk:encode_last(),
+ send(Socket, Chunk);
+
+handle_uri(_,"/http_1_0_no_length_single.html",_,_,Socket,_) ->
+ Body = "HTTP/1.0 200 ok\r\n"
+ "Content-type:text/plain\r\n\r\n"
+ "single packet",
+ send(Socket, Body),
+ close(Socket);
+
+handle_uri(_,"/http_1_0_no_length_multiple.html",_,_,Socket,_) ->
+ Head = "HTTP/1.0 200 ok\r\n"
+ "Content-type:text/plain\r\n\r\n"
+ "multiple packets, ",
+ send(Socket, Head),
+ %% long body to make sure it will be sent in multiple tcp packets
+ send(Socket, string:copies("other multiple packets ", 200)),
+ close(Socket);
+
handle_uri(_,"/once.html",_,_,Socket,_) ->
Head = "HTTP/1.1 200 ok\r\n" ++
"Content-Length:32\r\n\r\n",
diff --git a/lib/inets/test/httpd_1_0.erl b/lib/inets/test/httpd_1_0.erl
new file mode 100644
index 0000000000..0836c9e881
--- /dev/null
+++ b/lib/inets/test/httpd_1_0.erl
@@ -0,0 +1,38 @@
+%%
+%% %CopyrightBegin%
+%%
+%% Copyright Ericsson AB 2013-2014. 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(httpd_1_0).
+
+-export([host/4, trace/4]).
+
+%%-------------------------------------------------------------------------
+%% Test cases
+%%-------------------------------------------------------------------------
+host(Type, Port, Host, Node) ->
+ %% No host needed for HTTP/1.0
+ ok = httpd_test_lib:verify_request(Type, Host, Port, Node,
+ "GET / HTTP/1.0\r\n\r\n",
+ [{statuscode, 200},
+ {version, "HTTP/1.0"}]).
+trace(Type, Port, Host, Node)->
+ ok = httpd_test_lib:verify_request(Type, Host, Port, Node,
+ "TRACE / HTTP/1.0\r\n\r\n",
+ [{statuscode, 501},
+ {version, "HTTP/1.0"}]).
diff --git a/lib/inets/test/httpd_1_1.erl b/lib/inets/test/httpd_1_1.erl
index 07d94ea97a..6a5fc4a18f 100644
--- a/lib/inets/test/httpd_1_1.erl
+++ b/lib/inets/test/httpd_1_1.erl
@@ -1,7 +1,7 @@
%%
%% %CopyrightBegin%
%%
-%% Copyright Ericsson AB 2005-2011. All Rights Reserved.
+%% Copyright Ericsson AB 2005-2014. All Rights Reserved.
%%
%% The contents of this file are subject to the Erlang Public License,
%% Version 1.1, (the "License"); you may not use this file except in
@@ -20,11 +20,9 @@
-module(httpd_1_1).
--include("test_server.hrl").
--include("test_server_line.hrl").
-include_lib("kernel/include/file.hrl").
--export([host/4, chunked/4, expect/4, range/4, if_test/5, http_trace/4,
+-export([host/4, chunked/4, expect/4, range/4, if_test/5, trace/4,
head/4, mod_cgi_chunked_encoding_test/5]).
%% -define(all_keys_lower_case,true).
@@ -40,14 +38,10 @@
%%-------------------------------------------------------------------------
-%% Test cases starts here.
+%% Test cases
%%-------------------------------------------------------------------------
host(Type, Port, Host, Node) ->
- %% No host needed for HTTP/1.0
- ok = httpd_test_lib:verify_request(Type, Host, Port, Node,
- "GET / HTTP/1.0\r\n\r\n",
- [{statuscode, 200},
- {version, "HTTP/1.0"}]),
+
%% No host must generate an error
ok = httpd_test_lib:verify_request(Type, Host, Port, Node,
"GET / HTTP/1.1\r\n\r\n",
@@ -158,13 +152,13 @@ if_test(Type, Port, Host, Node, DocRoot)->
calendar:datetime_to_gregorian_seconds(FileInfo#file_info.mtime),
Mod = httpd_util:rfc1123_date(calendar:gregorian_seconds_to_datetime(
- CreatedSec-1)),
+ CreatedSec-1)),
%% Test that we get the data when the file is modified
ok = httpd_test_lib:verify_request(Type, Host, Port, Node,
"GET / HTTP/1.1\r\nHost:" ++ Host ++
- "\r\nIf-Modified-Since:" ++
- Mod ++ "\r\n\r\n",
+ "\r\nIf-Modified-Since:" ++
+ Mod ++ "\r\n\r\n",
[{statuscode, 200}]),
Mod1 = httpd_util:rfc1123_date(calendar:gregorian_seconds_to_datetime(
CreatedSec+100)),
@@ -174,74 +168,69 @@ if_test(Type, Port, Host, Node, DocRoot)->
++ Mod1 ++"\r\n\r\n",
[{statuscode, 304}]),
-
+
ok = httpd_test_lib:verify_request(Type, Host, Port, Node,
"GET / HTTP/1.1\r\nHost:" ++ Host ++
- "\r\nIf-Modified-Since:" ++
- "AAA[...]AAAA" ++ "\r\n\r\n",
+ "\r\nIf-Modified-Since:" ++
+ "AAA[...]AAAA" ++ "\r\n\r\n",
[{statuscode, 400}]),
-
-
- Mod2 = httpd_util:rfc1123_date(calendar:gregorian_seconds_to_datetime(
+
+ Mod2 = httpd_util:rfc1123_date(calendar:gregorian_seconds_to_datetime(
CreatedSec+1)),
- %% Control that the If-Unmodified-Header lmits the response
- ok = httpd_test_lib:verify_request(Type,Host,Port,Node,
- "GET / HTTP/1.1\r\nHost:"
- ++ Host ++
- "\r\nIf-Unmodified-Since:" ++ Mod2
- ++ "\r\n\r\n",
- [{statuscode, 200}]),
- Mod3 = httpd_util:rfc1123_date(calendar:gregorian_seconds_to_datetime(
+ %% Control that the If-Unmodified-Header lmits the response
+ ok = httpd_test_lib:verify_request(Type,Host,Port,Node,
+ "GET / HTTP/1.1\r\nHost:"
+ ++ Host ++
+ "\r\nIf-Unmodified-Since:" ++ Mod2
+ ++ "\r\n\r\n",
+ [{statuscode, 200}]),
+ Mod3 = httpd_util:rfc1123_date(calendar:gregorian_seconds_to_datetime(
CreatedSec-1)),
ok = httpd_test_lib:verify_request(Type, Host, Port, Node,
- "GET / HTTP/1.1\r\nHost:"
- ++ Host ++
- "\r\nIf-Unmodified-Since:"++ Mod3
+ "GET / HTTP/1.1\r\nHost:"
+ ++ Host ++
+ "\r\nIf-Unmodified-Since:"++ Mod3
++"\r\n\r\n",
- [{statuscode, 412}]),
+ [{statuscode, 412}]),
- %% Control that we get the body when the etag match
- ok = httpd_test_lib:verify_request(Type, Host, Port, Node,
- "GET / HTTP/1.1\r\nHost:" ++ Host
- ++"\r\n"++
- "If-Match:"++
- httpd_util:create_etag(FileInfo)++
- "\r\n\r\n",
- [{statuscode, 200}]),
+ %% Control that we get the body when the etag match
ok = httpd_test_lib:verify_request(Type, Host, Port, Node,
- "GET / HTTP/1.1\r\nHost:" ++
- Host ++ "\r\n"++
- "If-Match:NotEtag\r\n\r\n",
- [{statuscode, 412}]),
+ "GET / HTTP/1.1\r\nHost:" ++ Host
+ ++"\r\n"++
+ "If-Match:"++
+ httpd_util:create_etag(FileInfo)++
+ "\r\n\r\n",
+ [{statuscode, 200}]),
+ ok = httpd_test_lib:verify_request(Type, Host, Port, Node,
+ "GET / HTTP/1.1\r\nHost:" ++
+ Host ++ "\r\n"++
+ "If-Match:NotEtag\r\n\r\n",
+ [{statuscode, 412}]),
- %% Control the response when the if-none-match header is there
- ok = httpd_test_lib:verify_request(Type, Host, Port, Node,
- "GET / HTTP/1.1\r\nHost:"
- ++ Host ++"\r\n"++
- "If-None-Match:NoTaag," ++
- httpd_util:create_etag(FileInfo) ++
- "\r\n\r\n",
- [{statuscode, 304}]),
+ %% Control the response when the if-none-match header is there
+ ok = httpd_test_lib:verify_request(Type, Host, Port, Node,
+ "GET / HTTP/1.1\r\nHost:"
+ ++ Host ++"\r\n"++
+ "If-None-Match:NoTaag," ++
+ httpd_util:create_etag(FileInfo) ++
+ "\r\n\r\n",
+ [{statuscode, 304}]),
ok = httpd_test_lib:verify_request(Type, Host, Port, Node,
"GET / HTTP/1.1\r\nHost:"
- ++ Host ++ "\r\n"++
- "If-None-Match:NotEtag,"
- "NeihterEtag\r\n\r\n",
+ ++ Host ++ "\r\n"++
+ "If-None-Match:NotEtag,"
+ "NeihterEtag\r\n\r\n",
[{statuscode,200}]),
ok.
-
-http_trace(Type, Port, Host, Node)->
+
+trace(Type, Port, Host, Node)->
ok = httpd_test_lib:verify_request(Type, Host, Port, Node,
"TRACE / HTTP/1.1\r\n" ++
"Host:" ++ Host ++ "\r\n" ++
"Max-Forwards:2\r\n\r\n",
- [{statuscode, 200}]),
- ok = httpd_test_lib:verify_request(Type, Host, Port, Node,
- "TRACE / HTTP/1.0\r\n\r\n",
- [{statuscode, 501},
- {version, "HTTP/1.0"}]).
+ [{statuscode, 200}]).
head(Type, Port, Host, Node)->
%% mod_include
ok = httpd_test_lib:verify_request(Type, Host, Port, Node,
@@ -289,7 +278,7 @@ mod_cgi_chunked_encoding_test(Type, Port, Host, Node, [Request| Rest])->
%%--------------------------------------------------------------------
validateRangeRequest(Socket,Response,ValidBody,C,O,DE)->
receive
- {tcp,Socket,Data} ->
+ {_,Socket,Data} ->
case string:str(Data,"\r\n") of
0->
validateRangeRequest(Socket,
@@ -318,7 +307,7 @@ validateRangeRequest1(Socket, Response, ValidBody) ->
case end_of_header(Response) of
false ->
receive
- {tcp,Socket,Data} ->
+ {_,Socket,Data} ->
validateRangeRequest1(Socket, Response ++ Data,
ValidBody);
_->
@@ -337,10 +326,10 @@ validateRangeRequest2(Socket, Head, Body, ValidBody, {multiPart,Boundary})->
validateMultiPartRangeRequest(Body, ValidBody, Boundary);
false->
receive
- {tcp, Socket, Data} ->
+ {_, Socket, Data} ->
validateRangeRequest2(Socket, Head, Body ++ Data,
ValidBody, {multiPart, Boundary});
- {tcp_closed, Socket} ->
+ {_, Socket} ->
error;
_ ->
error
@@ -359,7 +348,7 @@ validateRangeRequest2(Socket, Head, Body, ValidBody, BodySize)
end;
Size when Size < BodySize ->
receive
- {tcp, Socket, Data} ->
+ {_, Socket, Data} ->
validateRangeRequest2(Socket, Head,
Body ++ Data, ValidBody, BodySize);
_ ->
diff --git a/lib/inets/test/httpd_SUITE.erl b/lib/inets/test/httpd_SUITE.erl
index ef801f91c7..4be20d3a69 100644
--- a/lib/inets/test/httpd_SUITE.erl
+++ b/lib/inets/test/httpd_SUITE.erl
@@ -1,2238 +1,1515 @@
%%
%% %CopyrightBegin%
-%%
-%% Copyright Ericsson AB 2005-2013. All Rights Reserved.
-%%
+%%
+%% Copyright Ericsson AB 2013-2014. 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%
%%
%%
+%%
+%% ct:run("../inets_test", httpd_SUITE).
+%%
+
-module(httpd_SUITE).
--include_lib("test_server/include/test_server.hrl").
--include("test_server_line.hrl").
+-include_lib("kernel/include/file.hrl").
+-include_lib("common_test/include/ct.hrl").
+-include_lib("public_key/include/public_key.hrl").
-include("inets_test_lib.hrl").
--include_lib("kernel/include/file.hrl").
+%% Note: This directive should only be used in test suites.
+-compile(export_all).
-%% Test server specific exports
--export([all/0, suite/0,groups/0,init_per_group/2,end_per_group/2]).
--export([init_per_testcase/2, end_per_testcase/2,
- init_per_suite/1, end_per_suite/1]).
-
-%% Core Server tests
--export([
- ip_mod_alias/1,
- ip_mod_actions/1,
- ip_mod_security/1,
- ip_mod_auth/1,
- ip_mod_auth_api/1,
- ip_mod_auth_mnesia_api/1,
- ip_mod_htaccess/1,
- ip_mod_cgi/1,
- ip_mod_esi/1,
- ip_mod_get/1,
- ip_mod_head/1,
- ip_mod_all/1,
- ip_load_light/1,
- ip_load_medium/1,
- ip_load_heavy/1,
- ip_dos_hostname/1,
- ip_time_test/1,
- ip_block_disturbing_idle/1,
- ip_block_non_disturbing_idle/1,
- ip_block_503/1,
- ip_block_disturbing_active/1,
- ip_block_non_disturbing_active/1,
- ip_block_disturbing_active_timeout_not_released/1,
- ip_block_disturbing_active_timeout_released/1,
- ip_block_non_disturbing_active_timeout_not_released/1,
- ip_block_non_disturbing_active_timeout_released/1,
- ip_block_disturbing_blocker_dies/1,
- ip_block_non_disturbing_blocker_dies/1,
- ip_restart_no_block/1,
- ip_restart_disturbing_block/1,
- ip_restart_non_disturbing_block/1
- ]).
-
--export([
- essl_mod_alias/1,
- essl_mod_actions/1,
- essl_mod_security/1,
- essl_mod_auth/1,
- essl_mod_auth_api/1,
- essl_mod_auth_mnesia_api/1,
- essl_mod_htaccess/1,
- essl_mod_cgi/1,
- essl_mod_esi/1,
- essl_mod_get/1,
- essl_mod_head/1,
- essl_mod_all/1,
- essl_load_light/1,
- essl_load_medium/1,
- essl_load_heavy/1,
- essl_dos_hostname/1,
- essl_time_test/1,
- essl_restart_no_block/1,
- essl_restart_disturbing_block/1,
- essl_restart_non_disturbing_block/1,
- essl_block_disturbing_idle/1,
- essl_block_non_disturbing_idle/1,
- essl_block_503/1,
- essl_block_disturbing_active/1,
- essl_block_non_disturbing_active/1,
- essl_block_disturbing_active_timeout_not_released/1,
- essl_block_disturbing_active_timeout_released/1,
- essl_block_non_disturbing_active_timeout_not_released/1,
- essl_block_non_disturbing_active_timeout_released/1,
- essl_block_disturbing_blocker_dies/1,
- essl_block_non_disturbing_blocker_dies/1
- ]).
-
-%%% HTTP 1.1 tests
--export([ip_host/1, ip_chunked/1, ip_expect/1, ip_range/1,
- ip_if_test/1, ip_http_trace/1, ip_http1_1_head/1,
- ip_mod_cgi_chunked_encoding_test/1]).
-
-%%% HTTP 1.0 tests
--export([ip_head_1_0/1, ip_get_1_0/1, ip_post_1_0/1]).
-
-%%% HTTP 0.9 tests
--export([ip_get_0_9/1]).
-
-%%% Ticket tests
--export([ticket_5775/1,ticket_5865/1,ticket_5913/1,ticket_6003/1,
- ticket_7304/1]).
-
-%%% IPv6 tests
--export([ipv6_hostname_ipcomm/0, ipv6_hostname_ipcomm/1,
- ipv6_address_ipcomm/0, ipv6_address_ipcomm/1,
- ipv6_hostname_essl/0, ipv6_hostname_essl/1,
- ipv6_address_essl/0, ipv6_address_essl/1]).
-
-%% Help functions
--export([cleanup_mnesia/0, setup_mnesia/0, setup_mnesia/1]).
-
--define(IP_PORT, 8898).
--define(SSL_PORT, 8899).
+-record(httpd_user, {user_name, password, user_data}).
+-record(httpd_group, {group_name, userlist}).
-define(MAX_HEADER_SIZE, 256).
--define(IPV6_LOCAL_HOST, "0:0:0:0:0:0:0:1").
-
%% Minutes before failed auths timeout.
-define(FAIL_EXPIRE_TIME,1).
-
%% Seconds before successful auths timeout.
-define(AUTH_TIMEOUT,5).
--record(httpd_user, {user_name, password, user_data}).
--record(httpd_group, {group_name, userlist}).
-
-
%%--------------------------------------------------------------------
-%% all(Arg) -> [Doc] | [Case] | {skip, Comment}
-%% Arg - doc | suite
-%% Doc - string()
-%% Case - atom()
-%% Name of a test case function.
-%% Comment - string()
-%% Description: Returns documentation/test cases in this test suite
-%% or a skip tuple if the platform is not supported.
+%% Common Test interface functions -----------------------------------
%%--------------------------------------------------------------------
-suite() -> [{ct_hooks,[ts_install_cth]}].
+suite() ->
+ [{ct_hooks,[ts_install_cth]}].
-all() ->
+all() ->
[
- {group, ip},
- {group, ssl},
- {group, http_1_1_ip},
- {group, http_1_0_ip},
- {group, http_0_9_ip},
- {group, ipv6},
- {group, tickets}
+ {group, http_basic},
+ {group, https_basic},
+ {group, http_limit},
+ {group, https_limit},
+ {group, http_basic_auth},
+ {group, https_basic_auth},
+ {group, http_auth_api},
+ {group, https_auth_api},
+ {group, http_auth_api_dets},
+ {group, https_auth_api_dets},
+ {group, http_auth_api_mnesia},
+ {group, https_auth_api_mnesia},
+ {group, http_htaccess},
+ {group, https_htaccess},
+ {group, http_security},
+ {group, https_security}
].
-groups() ->
+groups() ->
[
- {ip, [],
- [ip_mod_alias, ip_mod_actions, ip_mod_security,
- ip_mod_auth, ip_mod_auth_api, ip_mod_auth_mnesia_api,
- ip_mod_htaccess, ip_mod_cgi, ip_mod_esi, ip_mod_get,
- ip_mod_head, ip_mod_all, ip_load_light, ip_load_medium,
- ip_load_heavy, ip_dos_hostname, ip_time_test,
- ip_restart_no_block, ip_restart_disturbing_block,
- ip_restart_non_disturbing_block,
- ip_block_disturbing_idle, ip_block_non_disturbing_idle,
- ip_block_503, ip_block_disturbing_active,
- ip_block_non_disturbing_active,
- ip_block_disturbing_active_timeout_not_released,
- ip_block_disturbing_active_timeout_released,
- ip_block_non_disturbing_active_timeout_not_released,
- ip_block_non_disturbing_active_timeout_released,
- ip_block_disturbing_blocker_dies,
- ip_block_non_disturbing_blocker_dies]},
- {ssl, [], [{group, essl}]},
- {essl, [],
- [essl_mod_alias, essl_mod_actions, essl_mod_security,
- essl_mod_auth, essl_mod_auth_api,
- essl_mod_auth_mnesia_api, essl_mod_htaccess,
- essl_mod_cgi, essl_mod_esi, essl_mod_get, essl_mod_head,
- essl_mod_all, essl_load_light, essl_load_medium,
- essl_load_heavy, essl_dos_hostname, essl_time_test,
- essl_restart_no_block, essl_restart_disturbing_block,
- essl_restart_non_disturbing_block,
- essl_block_disturbing_idle,
- essl_block_non_disturbing_idle, essl_block_503,
- essl_block_disturbing_active,
- essl_block_non_disturbing_active,
- essl_block_disturbing_active_timeout_not_released,
- essl_block_disturbing_active_timeout_released,
- essl_block_non_disturbing_active_timeout_not_released,
- essl_block_non_disturbing_active_timeout_released,
- essl_block_disturbing_blocker_dies,
- essl_block_non_disturbing_blocker_dies]},
- {http_1_1_ip, [],
- [ip_host, ip_chunked, ip_expect, ip_range, ip_if_test,
- ip_http_trace, ip_http1_1_head,
- ip_mod_cgi_chunked_encoding_test]},
- {http_1_0_ip, [],
- [ip_head_1_0, ip_get_1_0, ip_post_1_0]},
- {http_0_9_ip, [], [ip_get_0_9]},
- {ipv6, [], [ipv6_hostname_ipcomm, ipv6_address_ipcomm,
- ipv6_hostname_essl, ipv6_address_essl]},
- {tickets, [],
- [ticket_5775, ticket_5865, ticket_5913, ticket_6003,
- ticket_7304]}].
-
-
-init_per_group(ipv6 = _GroupName, Config) ->
- case inets_test_lib:has_ipv6_support() of
- {ok, _} ->
- Config;
- _ ->
- {skip, "Host does not support IPv6"}
- end;
-init_per_group(essl, Config) ->
- catch crypto:stop(),
- case (catch crypto:start()) of
- ok ->
- Config;
- _ ->
- {skip, "Crypto not startable"}
- end;
-
-init_per_group(_GroupName, Config) ->
- Config.
+ {http_basic, [], basic_groups()},
+ {https_basic, [], basic_groups()},
+ {http_limit, [], [{group, limit}]},
+ {https_limit, [], [{group, limit}]},
+ {http_basic_auth, [], [{group, basic_auth}]},
+ {https_basic_auth, [], [{group, basic_auth}]},
+ {http_auth_api, [], [{group, auth_api}]},
+ {https_auth_api, [], [{group, auth_api}]},
+ {http_auth_api_dets, [], [{group, auth_api_dets}]},
+ {https_auth_api_dets, [], [{group, auth_api_dets}]},
+ {http_auth_api_mnesia, [], [{group, auth_api_mnesia}]},
+ {https_auth_api_mnesia, [], [{group, auth_api_mnesia}]},
+ {http_htaccess, [], [{group, htaccess}]},
+ {https_htaccess, [], [{group, htaccess}]},
+ {http_security, [], [{group, security}]},
+ {https_security, [], [{group, security}]},
+ {limit, [], [max_clients_1_1, max_clients_1_0, max_clients_0_9]},
+ {basic_auth, [], [basic_auth_1_1, basic_auth_1_0, basic_auth_0_9]},
+ {auth_api, [], [auth_api_1_1, auth_api_1_0, auth_api_0_9
+ ]},
+ {auth_api_dets, [], [auth_api_1_1, auth_api_1_0, auth_api_0_9
+ ]},
+ {auth_api_mnesia, [], [auth_api_1_1, auth_api_1_0, auth_api_0_9
+ ]},
+ {htaccess, [], [htaccess_1_1, htaccess_1_0, htaccess_0_9]},
+ {security, [], [security_1_1, security_1_0]}, %% Skip 0.9 as causes timing issus in test code
+ {http_1_1, [], [host, chunked, expect, cgi, cgi_chunked_encoding_test,
+ trace, range, if_modified_since] ++ http_head() ++ http_get() ++ load()},
+ {http_1_0, [], [host, cgi, trace] ++ http_head() ++ http_get() ++ load()},
+ {http_0_9, [], http_head() ++ http_get() ++ load()}
+ ].
-end_per_group(_GroupName, Config) ->
- Config.
+basic_groups ()->
+ [{group, http_1_1},
+ {group, http_1_0},
+ {group, http_0_9}
+ ].
+http_head() ->
+ [head].
+http_get() ->
+ [alias,
+ get,
+ %%actions, Add configuration so that this test mod_action
+ esi,
+ ssi,
+ content_length,
+ bad_hex,
+ missing_CR,
+ max_header,
+ ipv6
+ ].
-%%--------------------------------------------------------------------
-%% Function: init_per_suite(Config) -> Config
-%% Config - [tuple()]
-%% A list of key/value pairs, holding the test case configuration.
-%% Description: Initiation before the whole suite
-%%
-%% Note: This function is free to add any key/value pairs to the Config
-%% variable, but should NOT alter/remove any existing entries.
-%%--------------------------------------------------------------------
+load() ->
+ [light, medium
+ %%,heavy
+ ].
+
init_per_suite(Config) ->
- io:format(user, "init_per_suite -> entry with"
- "~n Config: ~p"
- "~n", [Config]),
-
- ?PRINT_SYSTEM_INFO([]),
-
PrivDir = ?config(priv_dir, Config),
- SuiteTopDir = filename:join(PrivDir, ?MODULE),
- case file:make_dir(SuiteTopDir) of
- ok ->
- ok;
- {error, eexist} ->
- ok;
- Error ->
- throw({error, {failed_creating_suite_top_dir, Error}})
- end,
-
- [{has_ipv6_support, inets_test_lib:has_ipv6_support()},
- {suite_top_dir, SuiteTopDir},
+ DataDir = ?config(data_dir, Config),
+ inets_test_lib:stop_apps([inets]),
+ ServerRoot = filename:join(PrivDir, "server_root"),
+ inets_test_lib:del_dirs(ServerRoot),
+ DocRoot = filename:join(ServerRoot, "htdocs"),
+ setup_server_dirs(ServerRoot, DocRoot, DataDir),
+ [{server_root, ServerRoot},
+ {doc_root, DocRoot},
{node, node()},
- {host, inets_test_lib:hostname()},
+ {host, inets_test_lib:hostname()},
{address, getaddr()} | Config].
+end_per_suite(_Config) ->
+ ok.
%%--------------------------------------------------------------------
-%% Function: end_per_suite(Config) -> _
-%% Config - [tuple()]
-%% A list of key/value pairs, holding the test case configuration.
-%% Description: Cleanup after the whole suite
-%%--------------------------------------------------------------------
+init_per_group(Group, Config0) when Group == https_basic;
+ Group == https_limit;
+ Group == https_basic_auth;
+ Group == https_auth_api;
+ Group == https_auth_api_dets;
+ Group == https_auth_api_mnesia;
+ Group == https_security
+ ->
+ init_ssl(Group, Config0);
+init_per_group(Group, Config0) when Group == http_basic;
+ Group == http_limit;
+ Group == http_basic_auth;
+ Group == http_auth_api;
+ Group == http_auth_api_dets;
+ Group == http_auth_api_mnesia;
+ Group == http_security
+ ->
+ ok = start_apps(Group),
+ init_httpd(Group, [{type, ip_comm} | Config0]);
+init_per_group(http_1_1, Config) ->
+ [{http_version, "HTTP/1.1"} | Config];
+init_per_group(http_1_0, Config) ->
+ [{http_version, "HTTP/1.0"} | Config];
+init_per_group(http_0_9, Config) ->
+ case {os:type(), os:version()} of
+ {{win32, _}, {5,1,2600}} ->
+ {skip, "eaddrinuse XP problem"};
+ _ ->
+ [{http_version, "HTTP/0.9"} | Config]
+ end;
+init_per_group(http_htaccess = Group, Config) ->
+ Path = ?config(doc_root, Config),
+ catch remove_htaccess(Path),
+ create_htaccess_data(Path, ?config(address, Config)),
+ ok = start_apps(Group),
+ init_httpd(Group, [{type, ip_comm} | Config]);
+init_per_group(https_htaccess = Group, Config) ->
+ Path = ?config(doc_root, Config),
+ catch remove_htaccess(Path),
+ create_htaccess_data(Path, ?config(address, Config)),
+ init_ssl(Group, Config);
+init_per_group(auth_api, Config) ->
+ [{auth_prefix, ""} | Config];
+init_per_group(auth_api_dets, Config) ->
+ [{auth_prefix, "dets_"} | Config];
+init_per_group(auth_api_mnesia, Config) ->
+ start_mnesia(?config(node, Config)),
+ [{auth_prefix, "mnesia_"} | Config];
+init_per_group(_, Config) ->
+ Config.
-end_per_suite(_Config) ->
- %% SuiteTopDir = ?config(suite_top_dir, Config),
- %% inets_test_lib:del_dirs(SuiteTopDir),
+end_per_group(Group, _Config) when Group == http_basic;
+ Group == http_limit;
+ Group == http_basic_auth;
+ Group == http_auth_api;
+ Group == http_auth_api_dets;
+ Group == http_auth_api_mnesia;
+ Group == http_htaccess;
+ Group == http_security
+ ->
+ inets:stop();
+end_per_group(Group, _Config) when Group == https_basic;
+ Group == https_limit;
+ Group == https_basic_auth;
+ Group == https_auth_api;
+ Group == http_auth_api_dets;
+ Group == http_auth_api_mnesia;
+ Group == https_htaccess;
+ Group == http_security
+ ->
+ ssl:stop(),
+ inets:stop();
+
+end_per_group(auth_api_mnesia, _) ->
+ cleanup_mnesia();
+
+end_per_group(_, _) ->
ok.
-
-%%--------------------------------------------------------------------
-%% Function: init_per_testcase(Case, Config) -> Config
-%% Case - atom()
-%% Name of the test case that is about to be run.
-%% Config - [tuple()]
-%% A list of key/value pairs, holding the test case configuration.
-%%
-%% Description: Initiation before each test case
-%%
-%% Note: This function is free to add any key/value pairs to the Config
-%% variable, but should NOT alter/remove any existing entries.
%%--------------------------------------------------------------------
-init_per_testcase(Case, Config) ->
- NewConfig = init_per_testcase2(Case, Config),
- init_per_testcase3(Case, NewConfig).
-
+init_per_testcase(Case, Config) when Case == host; Case == trace ->
+ Prop = ?config(tc_group_properties, Config),
+ Name = proplists:get_value(name, Prop),
+ Cb = case Name of
+ http_1_0 ->
+ httpd_1_0;
+ http_1_1 ->
+ httpd_1_1
+ end,
+ [{version_cb, Cb} | proplists:delete(version_cb, Config)];
+
+init_per_testcase(range, Config) ->
+ DocRoot = ?config(doc_root, Config),
+ create_range_data(DocRoot),
+ Config;
+
+init_per_testcase(_, Config) ->
+ Config.
-init_per_testcase2(Case, Config) ->
+end_per_testcase(_Case, _Config) ->
+ ok.
- %% tsp("init_per_testcase2 -> entry with"
- %% "~n Config: ~p", [Config]),
-
- IpNormal = integer_to_list(?IP_PORT) ++ ".conf",
- IpHtaccess = integer_to_list(?IP_PORT) ++ "htaccess.conf",
- SslNormal = integer_to_list(?SSL_PORT) ++ ".conf",
- SslHtaccess = integer_to_list(?SSL_PORT) ++ "htaccess.conf",
+%%-------------------------------------------------------------------------
+%% Test cases starts here.
+%%-------------------------------------------------------------------------
- DataDir = ?config(data_dir, Config),
- SuiteTopDir = ?config(suite_top_dir, Config),
+head() ->
+ [{doc, "HTTP HEAD request for static page"}].
- %% tsp("init_per_testcase2 -> "
- %% "~n SuiteDir: ~p"
- %% "~n DataDir: ~p", [SuiteTopDir, DataDir]),
-
- TcTopDir = filename:join(SuiteTopDir, Case),
- ?line ok = file:make_dir(TcTopDir),
+head(Config) when is_list(Config) ->
+ Version = ?config(http_version, Config),
+ Host = ?config(host, Config),
+ ok = httpd_test_lib:verify_request(?config(type, Config), Host,
+ ?config(port, Config), ?config(node, Config),
+ http_request("HEAD /index.html ", Version, Host),
+ [{statuscode, head_status(Version)},
+ {version, Version}]).
- %% tsp("init_per_testcase2 -> "
- %% "~n TcTopDir: ~p", [TcTopDir]),
+get() ->
+ [{doc, "HTTP GET request for static page"}].
- DataSrc = filename:join([DataDir, "server_root"]),
- ServerRoot = filename:join([TcTopDir, "server_root"]),
-
- %% tsp("init_per_testcase2 -> "
- %% "~n DataSrc: ~p"
- %% "~n ServerRoot: ~p", [DataSrc, ServerRoot]),
+get(Config) when is_list(Config) ->
+ Version = ?config(http_version, Config),
+ Host = ?config(host, Config),
+ Type = ?config(type, Config),
+ ok = httpd_test_lib:verify_request(?config(type, Config), Host,
+ ?config(port, Config),
+ transport_opts(Type, Config),
+ ?config(node, Config),
+ http_request("GET /index.html ", Version, Host),
+ [{statuscode, 200},
+ {header, "Content-Type", "text/html"},
+ {header, "Date"},
+ {header, "Server"},
+ {version, Version}]).
- ok = file:make_dir(ServerRoot),
- ok = file:make_dir(filename:join([TcTopDir, "logs"])),
+basic_auth_1_1(Config) when is_list(Config) ->
+ basic_auth([{http_version, "HTTP/1.1"} | Config]).
- NewConfig = [{tc_top_dir, TcTopDir}, {server_root, ServerRoot} | Config],
+basic_auth_1_0(Config) when is_list(Config) ->
+ basic_auth([{http_version, "HTTP/1.0"} | Config]).
- %% tsp("init_per_testcase2 -> copy DataSrc to ServerRoot"),
+basic_auth_0_9(Config) when is_list(Config) ->
+ basic_auth([{http_version, "HTTP/0.9"} | Config]).
- inets_test_lib:copy_dirs(DataSrc, ServerRoot),
+basic_auth() ->
+ [{doc, "Test Basic authentication with WWW-Authenticate header"}].
- %% tsp("init_per_testcase2 -> fix cgi"),
- EnvCGI = filename:join([ServerRoot, "cgi-bin", "printenv.sh"]),
- {ok, FileInfo} = file:read_file_info(EnvCGI),
- ok = file:write_file_info(EnvCGI,
- FileInfo#file_info{mode = 8#00755}),
-
- EchoCGI = case test_server:os_type() of
- {win32, _} ->
- "cgi_echo.exe";
- _ ->
- "cgi_echo"
- end,
- CGIDir = filename:join([ServerRoot, "cgi-bin"]),
- inets_test_lib:copy_file(EchoCGI, DataDir, CGIDir),
- NewEchoCGI = filename:join([CGIDir, EchoCGI]),
- {ok, FileInfo1} = file:read_file_info(NewEchoCGI),
- ok = file:write_file_info(NewEchoCGI,
- FileInfo1#file_info{mode = 8#00755}),
+basic_auth(Config) ->
+ Version = ?config(http_version, Config),
+ Host = ?config(host, Config),
+ basic_auth_requiered(Config),
+ %% Authentication OK! ["one:OnePassword" user first in user list]
+ ok = auth_status(auth_request("/open/dummy.html", "one", "onePassword", Version, Host), Config,
+ [{statuscode, 200}]),
+ %% Authentication OK and a directory listing is supplied!
+ %% ["Aladdin:open sesame" user second in user list]
+ ok = auth_status(auth_request("/open/", "Aladdin", "AladdinPassword", Version, Host), Config,
+ [{statuscode, 200}]),
+ %% User correct but wrong password! ["one:one" user first in user list]
+ ok = auth_status(auth_request("/open/dummy.html", "one", "one", Version, Host), Config,
+ [{statuscode, 401},
+ {header, "WWW-Authenticate"}]),
+ %% Make sure Authenticate header is received even the second time
+ %% we try a incorrect password! Otherwise a browser client will hang!
+ ok = auth_status(auth_request("/open/dummy.html", "one", "one", Version, Host), Config,
+ [{statuscode, 401},
+ {header, "WWW-Authenticate"}]),
+ %% Neither user or password correct! ["dummy:dummy"]
+ ok = auth_status(auth_request("/open/dummy.html", "dummy", "dummy", Version, Host), Config,
+ [{statuscode, 401}]),
+ %% Nested secret/top_secret OK! ["Aladdin:open sesame"]
+ ok = http_status(auth_request("/secret/top_secret/", "Aladdin", "AladdinPassword", Version, Host),
+ Config, [{statuscode, 200}]),
+ %% Authentication still required!
+ basic_auth_requiered(Config).
+
+auth_api_1_1(Config) when is_list(Config) ->
+ auth_api([{http_version, "HTTP/1.1"} | Config]).
+
+auth_api_1_0(Config) when is_list(Config) ->
+ auth_api([{http_version, "HTTP/1.0"} | Config]).
+
+auth_api_0_9(Config) when is_list(Config) ->
+ auth_api([{http_version, "HTTP/0.9"} | Config]).
+
+auth_api() ->
+ [{doc, "Test mod_auth API"}].
+
+auth_api(Config) when is_list(Config) ->
+ Prefix = ?config(auth_prefix, Config),
+ do_auth_api(Prefix, Config).
+
+do_auth_api(AuthPrefix, Config) ->
+ Version = ?config(http_version, Config),
+ Host = ?config(host, Config),
+ Port = ?config(port, Config),
+ Node = ?config(node, Config),
+ ServerRoot = ?config(server_root, Config),
+ ok = http_status("GET / ", Config,
+ [{statuscode, 200}]),
+ ok = auth_status(auth_request("/", "one", "WrongPassword", Version, Host), Config,
+ [{statuscode, 200}]),
+
+ %% Make sure Authenticate header is received even the second time
+ %% we try a incorrect password! Otherwise a browser client will hang!
+ ok = auth_status(auth_request("/" ++ AuthPrefix ++ "open/",
+ "dummy", "WrongPassword", Version, Host), Config,
+ [{statuscode, 401},
+ {header, "WWW-Authenticate"}]),
+ ok = auth_status(auth_request("/" ++ AuthPrefix ++ "open/", "dummy", "WrongPassword",
+ Version, Host), Config, [{statuscode, 401},
+ {header, "WWW-Authenticate"}]),
- %% To be used by IP test cases
- %% tsp("init_per_testcase2 -> ip testcase setups"),
- create_config([{port, ?IP_PORT}, {sock_type, ip_comm} | NewConfig],
- normal_access, IpNormal),
- create_config([{port, ?IP_PORT}, {sock_type, ip_comm} | NewConfig],
- mod_htaccess, IpHtaccess),
-
- %% To be used by SSL test cases
- %% tsp("init_per_testcase2 -> ssl testcase setups"),
- SocketType =
- case atom_to_list(Case) of
- [X, $s, $s, $l | _] ->
- case X of
- $p -> ssl;
- $e -> essl
- end;
- _ ->
- ssl
- end,
-
- create_config([{port, ?SSL_PORT}, {sock_type, SocketType} | NewConfig],
- normal_access, SslNormal),
- create_config([{port, ?SSL_PORT}, {sock_type, SocketType} | NewConfig],
- mod_htaccess, SslHtaccess),
+ %% Change the password to DummyPassword then try to add a user
+ %% Get an error and set it to NoPassword
+ ok = update_password(Node, ServerRoot, Host, Port, AuthPrefix,
+ "open", "NoPassword", "DummyPassword"),
+ {error,bad_password} =
+ add_user(Node, ServerRoot, Port, AuthPrefix, "open", "one",
+ "onePassword", []),
+ ok = update_password(Node, ServerRoot, Host, Port, AuthPrefix, "open",
+ "DummyPassword", "NoPassword"),
- %% To be used by IPv6 test cases. Case-clause is so that
- %% you can do ts:run(inets, httpd_SUITE, <test case>)
- %% for all cases except the ipv6 cases as they depend
- %% on 'test_host_ipv6_only' that will only be present
- %% when you run the whole test suite due to shortcomings
- %% of the test server.
-
- tsp("init_per_testcase2 -> maybe generate IPv6 config file(s)"),
- NewConfig2 =
- case atom_to_list(Case) of
- "ipv6_" ++ _ ->
- case (catch inets_test_lib:has_ipv6_support(NewConfig)) of
- {ok, IPv6Address0} ->
- {ok, Hostname} = inet:gethostname(),
- IPv6Address = http_transport:ipv6_name(IPv6Address0),
- create_ipv6_config([{port, ?IP_PORT},
- {sock_type, ip_comm},
- {ipv6_host, IPv6Address} |
- NewConfig],
- "ipv6_hostname_ipcomm.conf",
- Hostname),
- create_ipv6_config([{port, ?IP_PORT},
- {sock_type, ip_comm},
- {ipv6_host, IPv6Address} |
- NewConfig],
- "ipv6_address_ipcomm.conf",
- IPv6Address),
- create_ipv6_config([{port, ?SSL_PORT},
- {sock_type, essl},
- {ipv6_host, IPv6Address} |
- NewConfig],
- "ipv6_hostname_essl.conf",
- Hostname),
- create_ipv6_config([{port, ?SSL_PORT},
- {sock_type, essl},
- {ipv6_host, IPv6Address} |
- NewConfig],
- "ipv6_address_essl.conf",
- IPv6Address),
- [{ipv6_host, IPv6Address} | NewConfig];
- _ ->
- NewConfig
- end;
-
- _ ->
- NewConfig
- end,
-
- %% tsp("init_per_testcase2 -> done when"
- %% "~n NewConfig2: ~p", [NewConfig2]),
-
- NewConfig2.
-
-
-init_per_testcase3(Case, Config) ->
- tsp("init_per_testcase3(~w) -> entry with"
- "~n Config: ~p", [Case, Config]),
-
-
-%% %% Create a new fresh node to be used by the server in this test-case
+ %% Test /*open, require user one Aladdin
+ remove_users(Node, ServerRoot, Host, Port, AuthPrefix, "open"),
-%% NodeName = list_to_atom(atom_to_list(Case) ++ "_httpd"),
-%% Node = inets_test_lib:start_node(NodeName),
+ ok = auth_status(auth_request("/" ++ AuthPrefix ++ "open/",
+ "one", "onePassword", Version, Host), Config,
+ [{statuscode, 401}]),
- %% Clean up (we do not want this clean up in end_per_testcase
- %% if init_per_testcase crashes for some testcase it will
- %% have contaminated the environment and there will be no clean up.)
- %% This init can take a few different paths so that one crashes
- %% does not mean that all invocations will.
-
- application:unset_env(inets, services),
- application:stop(inets),
- application:stop(ssl),
- cleanup_mnesia(),
+ ok = auth_status(auth_request("/" ++ AuthPrefix ++ "open/",
+ "two", "twoPassword", Version, Host), Config,
+ [{statuscode, 401}]),
- %% Start initialization
- tsp("init_per_testcase3(~w) -> start init", [Case]),
-
- Dog = test_server:timetrap(inets_test_lib:minutes(10)),
- NewConfig = lists:keydelete(watchdog, 1, Config),
- TcTopDir = ?config(tc_top_dir, Config),
-
- CaseRest =
- case atom_to_list(Case) of
- "ip_mod_htaccess" ->
- inets_test_lib:start_http_server(
- filename:join(TcTopDir,
- integer_to_list(?IP_PORT) ++
- "htaccess.conf")),
- "mod_htaccess";
- "ip_" ++ Rest ->
- inets_test_lib:start_http_server(
- filename:join(TcTopDir,
- integer_to_list(?IP_PORT) ++ ".conf")),
- Rest;
- "ticket_5913" ->
- HttpdOptions =
- [{file,
- filename:join(TcTopDir,
- integer_to_list(?IP_PORT) ++ ".conf")},
- {accept_timeout,30000},
- {debug,[{exported_functions,
- [httpd_manager,httpd_request_handler]}]}],
- inets_test_lib:start_http_server(HttpdOptions);
- "ticket_"++Rest ->
- %% OTP-5913 use the new syntax of inets.config
- inets_test_lib:start_http_server([{file,
- filename:join(TcTopDir,
- integer_to_list(?IP_PORT) ++ ".conf")}]),
- Rest;
-
- [X, $s, $s, $l, $_, $m, $o, $d, $_, $h, $t, $a, $c, $c, $e, $s, $s] ->
- ?ENSURE_STARTED([crypto, public_key, ssl]),
- SslTag =
- case X of
- $p -> ssl; % Plain
- $e -> essl % Erlang based ssl
- end,
- case inets_test_lib:start_http_server_ssl(
- filename:join(TcTopDir,
- integer_to_list(?SSL_PORT) ++
- "htaccess.conf"), SslTag) of
- ok ->
- "mod_htaccess";
- Other ->
- error_logger:info_msg("Other: ~p~n", [Other]),
- {skip, "SSL does not seem to be supported"}
- end;
- [X, $s, $s, $l, $_ | Rest] ->
- ?ENSURE_STARTED([crypto, public_key, ssl]),
- SslTag =
- case X of
- $p -> ssl;
- $e -> essl
- end,
- case inets_test_lib:start_http_server_ssl(
- filename:join(TcTopDir,
- integer_to_list(?SSL_PORT) ++
- ".conf"), SslTag) of
- ok ->
- Rest;
- Other ->
- error_logger:info_msg("Other: ~p~n", [Other]),
- {skip, "SSL does not seem to be supported"}
- end;
- "ipv6_" ++ _ = TestCaseStr ->
- case inets_test_lib:has_ipv6_support() of
- {ok, _} ->
- inets_test_lib:start_http_server(
- filename:join(TcTopDir,
- TestCaseStr ++ ".conf"));
-
- _ ->
- {skip, "Host does not support IPv6"}
- end
- end,
-
- InitRes =
- case CaseRest of
- {skip, _} = Skip ->
- Skip;
- "mod_auth_" ++ _ ->
- start_mnesia(?config(node, Config)),
- [{watchdog, Dog} | NewConfig];
- "mod_htaccess" ->
- ServerRoot = ?config(server_root, Config),
- Path = filename:join([ServerRoot, "htdocs"]),
- catch remove_htaccess(Path),
- create_htaccess_data(Path, ?config(address, Config)),
- [{watchdog, Dog} | NewConfig];
- "range" ->
- ServerRoot = ?config(server_root, Config),
- Path = filename:join([ServerRoot, "htdocs"]),
- create_range_data(Path),
- [{watchdog, Dog} | NewConfig];
- _ ->
- [{watchdog, Dog} | NewConfig]
- end,
+ ok = auth_status(auth_request("/" ++ AuthPrefix ++ "open/",
+ "Aladdin", "onePassword", Version, Host),
+ Config, [{statuscode, 401}]),
- tsp("init_per_testcase3(~w) -> done when"
- "~n InitRes: ~p", [Case, InitRes]),
-
- InitRes.
-
-
-%%--------------------------------------------------------------------
-%% Function: end_per_testcase(Case, Config) -> _
-%% Case - atom()
-%% Name of the test case that is about to be run.
-%% Config - [tuple()]
-%% A list of key/value pairs, holding the test case configuration.
-%% Description: Cleanup after each test case
-%%--------------------------------------------------------------------
-end_per_testcase(Case, Config) ->
- Dog = ?config(watchdog, Config),
- test_server:timetrap_cancel(Dog),
- end_per_testcase2(Case, lists:keydelete(watchdog, 1, Config)),
- ok.
-
-end_per_testcase2(Case, Config) ->
- tsp("end_per_testcase2(~w) -> entry with"
- "~n Config: ~p", [Case, Config]),
- application:unset_env(inets, services),
- application:stop(inets),
- application:stop(ssl),
- application:stop(crypto), % used by the new ssl (essl test cases)
- cleanup_mnesia(),
- tsp("end_per_testcase2(~w) -> done", [Case]),
- ok.
-
-
-%%-------------------------------------------------------------------------
-%% Test cases starts here.
-%%-------------------------------------------------------------------------
-
+ true = add_user(Node, ServerRoot, Port, AuthPrefix, "open", "one",
+ "onePassword", []),
+ true = add_user(Node, ServerRoot, Port, AuthPrefix, "open", "two",
+ "twoPassword", []),
+ true = add_user(Node, ServerRoot, Port, AuthPrefix, "open", "Aladdin",
+ "AladdinPassword", []),
+ {ok, [_|_]} = list_users(Node, ServerRoot, Host, Port,
+ AuthPrefix, "open"),
+ ok = auth_status(auth_request("/" ++ AuthPrefix ++ "open/",
+ "one", "WrongPassword", Version, Host),
+ Config, [{statuscode, 401}]),
+ ok = auth_status(auth_request("/" ++ AuthPrefix ++ "open/",
+ "one", "onePassword", Version, Host),
+ Config, [{statuscode, 200}]),
+ ok = auth_status(auth_request("/" ++ AuthPrefix ++ "open/",
+ "two", "twoPassword", Version, Host),
+ Config,[{statuscode, 401}]),
+ ok = auth_status(auth_request("/" ++ AuthPrefix ++ "open/",
+ "Aladdin", "WrongPassword", Version, Host),
+ Config,[{statuscode, 401}]),
+ ok = auth_status(auth_request("/" ++ AuthPrefix ++ "open/",
+ "Aladdin", "AladdinPassword", Version, Host),
+ Config, [{statuscode, 200}]),
+
+ remove_users(Node, ServerRoot, Host, Port, AuthPrefix, "open"),
+ {ok, []} = list_users(Node, ServerRoot, Host, Port,
+ AuthPrefix, "open"),
+
+ %% Phase 2
+ remove_users(Node, ServerRoot, Host, Port, AuthPrefix, "secret"),
+ {ok, []} = list_users(Node, ServerRoot, Host, Port, AuthPrefix,
+ "secret"),
+ ok = auth_status(auth_request("/" ++ AuthPrefix ++ "secret/",
+ "one", "onePassword", Version, Host),
+ Config, [{statuscode, 401}]),
+ ok = auth_status(auth_request("/" ++ AuthPrefix ++ "secret/",
+ "two", "twoPassword", Version, Host),
+ Config, [{statuscode, 401}]),
+ ok = auth_status(auth_request("/" ++ AuthPrefix ++ "secret/",
+ "three", "threePassword", Version, Host),
+ Config, [{statuscode, 401}]),
+ add_user(Node, ServerRoot, Port, AuthPrefix, "secret", "one",
+ "onePassword",
+ []),
+ add_user(Node, ServerRoot, Port, AuthPrefix, "secret",
+ "two", "twoPassword", []),
+ add_user(Node, ServerRoot, Port, AuthPrefix, "secret", "Aladdin",
+ "AladdinPassword",[]),
+ add_group_member(Node, ServerRoot, Port, AuthPrefix, "secret",
+ "one", "group1"),
+ add_group_member(Node, ServerRoot, Port, AuthPrefix, "secret",
+ "two", "group1"),
+ add_group_member(Node, ServerRoot, Port, AuthPrefix,
+ "secret", "Aladdin", "group2"),
+ ok = auth_status(auth_request("/" ++ AuthPrefix ++ "secret/",
+ "one", "onePassword", Version, Host),
+ Config, [{statuscode, 200}]),
+ ok = auth_status(auth_request("/" ++ AuthPrefix ++ "secret/",
+ "two", "twoPassword", Version, Host),
+ Config,[{statuscode, 200}]),
+ ok = auth_status(auth_request("/" ++ AuthPrefix ++ "secret/",
+ "Aladdin", "AladdinPassword", Version, Host),
+ Config, [{statuscode, 200}]),
+ ok = auth_status(auth_request("/" ++ AuthPrefix ++ "secret/",
+ "three", "threePassword", Version, Host),
+ Config, [{statuscode, 401}]),
+ remove_users(Node, ServerRoot, Host, Port, AuthPrefix, "secret"),
+ {ok, []} = list_users(Node, ServerRoot, Host, Port,
+ AuthPrefix, "secret"),
+ remove_groups(Node, ServerRoot, Host, Port, AuthPrefix, "secret"),
+
+ {ok, []} = list_groups(Node, ServerRoot, Host, Port, AuthPrefix, "secret"),
+
+ %% Phase 3
+ remove_users(Node, ServerRoot, Host, Port, AuthPrefix, "secret/top_secret"),
+ remove_groups(Node, ServerRoot, Host, Port, AuthPrefix, "secret/top_secret"),
+
+ ok = auth_status(auth_request("/" ++ AuthPrefix ++
+ "secret/top_secret/",
+ "three", "threePassword", Version, Host),
+ Config, [{statuscode, 401}]),
+ ok = auth_status(auth_request("/" ++ AuthPrefix ++
+ "secret/top_secret/", "two", "twoPassword", Version, Host),
+ Config, [{statuscode, 401}]),
+ add_user(Node, ServerRoot, Port, AuthPrefix,
+ "secret/top_secret","three",
+ "threePassword",[]),
+ add_user(Node, ServerRoot, Port, AuthPrefix, "secret/top_secret",
+ "two","twoPassword", []),
+ add_group_member(Node, ServerRoot, Port, AuthPrefix, "secret/top_secret", "three", "group3"),
+ ok = auth_status(auth_request("/" ++ AuthPrefix ++
+ "secret/top_secret/", "three", "threePassword",
+ Version, Host),
+ Config, [{statuscode, 200}]),
+ ok = auth_status(auth_request("/" ++ AuthPrefix ++
+ "secret/top_secret/", "two", "twoPassword", Version, Host),
+ Config, [{statuscode, 401}]),
+ add_group_member(Node, ServerRoot, Port, AuthPrefix, "secret/top_secret", "two", "group3"),
+ ok = auth_status(auth_request("/" ++ AuthPrefix ++
+ "secret/top_secret/",
+ "two", "twoPassword", Version, Host),
+ Config, [{statuscode, 200}]),
+ remove_users(Node, ServerRoot, Host, Port, AuthPrefix, "secret/top_secret"),
+ {ok, []} = list_users(Node, ServerRoot, Host, Port,
+ AuthPrefix, "secret/top_secret"),
+ remove_groups(Node, ServerRoot, Host, Port, AuthPrefix, "secret/top_secret"),
+ {ok, []} = list_groups(Node, ServerRoot, Host, Port, AuthPrefix, "secret/top_secret"),
+ ok = auth_status(auth_request("/" ++ AuthPrefix ++
+ "secret/top_secret/", "two", "twoPassword", Version, Host),
+ Config, [{statuscode, 401}]),
+ ok = auth_status(auth_request("/" ++ AuthPrefix ++
+ "secret/top_secret/","three", "threePassword", Version, Host),
+ Config, [{statuscde, 401}]).
+%%-------------------------------------------------------------------------
+ipv6() ->
+ [{require, ipv6_hosts},
+ {doc,"Test ipv6."}].
+ipv6(Config) when is_list(Config) ->
+ {ok, Hostname0} = inet:gethostname(),
+ case lists:member(list_to_atom(Hostname0), ct:get_config(ipv6_hosts)) of
+ true ->
+ Version = ?config(http_version, Config),
+ Host = ?config(host, Config),
+ URI = http_request("GET /", Version, Host),
+ httpd_test_lib:verify_request(?config(type, Config), Host,
+ ?config(port, Config), [inet6],
+ ?config(code, Config),
+ URI,
+ [{statuscode, 200}, {version, Version}]);
+ false ->
+ {skip, "Host does not support IPv6"}
+ end.
+
+%%-------------------------------------------------------------------------
+ssi() ->
+ [{doc, "HTTP GET server side include test"}].
+ssi(Config) when is_list(Config) ->
+ Version = ?config(http_version, Config),
+ Host = ?config(host, Config),
+ Type = ?config(type, Config),
+ ok = httpd_test_lib:verify_request(?config(type, Config), Host, ?config(port, Config),
+ transport_opts(Type, Config),
+ ?config(node, Config),
+ http_request("GET /fsize.shtml ", Version, Host),
+ [{statuscode, 200},
+ {header, "Content-Type", "text/html"},
+ {header, "Date"},
+ {header, "Server"},
+ {version, Version}]).
%%-------------------------------------------------------------------------
-ip_mod_alias(doc) ->
- ["Module test: mod_alias"];
-ip_mod_alias(suite) ->
- [];
-ip_mod_alias(Config) when is_list(Config) ->
- httpd_mod:alias(ip_comm, ?IP_PORT,
- ?config(host, Config), ?config(node, Config)),
- ok.
+htaccess_1_1(Config) when is_list(Config) ->
+ htaccess([{http_version, "HTTP/1.1"} | Config]).
-%%-------------------------------------------------------------------------
-ip_mod_actions(doc) ->
- ["Module test: mod_actions"];
-ip_mod_actions(suite) ->
- [];
-ip_mod_actions(Config) when is_list(Config) ->
- httpd_mod:actions(ip_comm, ?IP_PORT,
- ?config(host, Config), ?config(node, Config)),
- ok.
+htaccess_1_0(Config) when is_list(Config) ->
+ htaccess([{http_version, "HTTP/1.0"} | Config]).
-%%-------------------------------------------------------------------------
-ip_mod_security(doc) ->
- ["Module test: mod_security"];
-ip_mod_security(suite) ->
- [];
-ip_mod_security(Config) when is_list(Config) ->
- ServerRoot = ?config(server_root, Config),
- httpd_mod:security(ServerRoot, ip_comm, ?IP_PORT,
- ?config(host, Config), ?config(node, Config)),
- ok.
+htaccess_0_9(Config) when is_list(Config) ->
+ htaccess([{http_version, "HTTP/0.9"} | Config]).
-%%-------------------------------------------------------------------------
-ip_mod_auth(doc) ->
- ["Module test: mod_auth"];
-ip_mod_auth(suite) ->
- [];
-ip_mod_auth(Config) when is_list(Config) ->
- httpd_mod:auth(ip_comm, ?IP_PORT,
- ?config(host, Config), ?config(node, Config)),
- ok.
+htaccess() ->
+ [{doc, "Test mod_auth API"}].
-%%-------------------------------------------------------------------------
-ip_mod_auth_api(doc) ->
- ["Module test: mod_auth_api"];
-ip_mod_auth_api(suite) ->
- [];
-ip_mod_auth_api(Config) when is_list(Config) ->
- ServerRoot = ?config(server_root, Config),
- Host = ?config(host, Config),
+htaccess(Config) when is_list(Config) ->
+ Version = ?config(http_version, Config),
+ Host = ?config(host, Config),
+ Type = ?config(type, Config),
+ Port = ?config(port, Config),
Node = ?config(node, Config),
- httpd_mod:auth_api(ServerRoot, "", ip_comm, ?IP_PORT, Host, Node),
- httpd_mod:auth_api(ServerRoot, "dets_", ip_comm, ?IP_PORT, Host, Node),
- httpd_mod:auth_api(ServerRoot, "mnesia_", ip_comm, ?IP_PORT, Host, Node),
- ok.
-%%-------------------------------------------------------------------------
-ip_mod_auth_mnesia_api(doc) ->
- ["Module test: mod_auth_mnesia_api"];
-ip_mod_auth_mnesia_api(suite) ->
- [];
-ip_mod_auth_mnesia_api(Config) when is_list(Config) ->
- httpd_mod:auth_mnesia_api(ip_comm, ?IP_PORT,
- ?config(host, Config), ?config(node, Config)),
- ok.
-%%-------------------------------------------------------------------------
-ip_mod_htaccess(doc) ->
- ["Module test: mod_htaccess"];
-ip_mod_htaccess(suite) ->
- [];
-ip_mod_htaccess(Config) when is_list(Config) ->
- httpd_mod:htaccess(ip_comm, ?IP_PORT,
- ?config(host, Config), ?config(node, Config)),
- ok.
-%%-------------------------------------------------------------------------
-ip_mod_cgi(doc) ->
- ["Module test: mod_cgi"];
-ip_mod_cgi(suite) ->
- [];
-ip_mod_cgi(Config) when is_list(Config) ->
- httpd_mod:cgi(ip_comm, ?IP_PORT,
- ?config(host, Config), ?config(node, Config)),
- ok.
-%%-------------------------------------------------------------------------
-ip_mod_esi(doc) ->
- ["Module test: mod_esi"];
-ip_mod_esi(suite) ->
- [];
-ip_mod_esi(Config) when is_list(Config) ->
- httpd_mod:esi(ip_comm, ?IP_PORT,
- ?config(host, Config), ?config(node, Config)),
- ok.
-
-%%-------------------------------------------------------------------------
-ip_mod_get(doc) ->
- ["Module test: mod_get"];
-ip_mod_get(suite) ->
- [];
-ip_mod_get(Config) when is_list(Config) ->
- httpd_mod:get(ip_comm, ?IP_PORT,
- ?config(host, Config), ?config(node, Config)),
- ok.
-
-%%-------------------------------------------------------------------------
-ip_mod_head(doc) ->
- ["Module test: mod_head"];
-ip_mod_head(suite) ->
- [];
-ip_mod_head(Config) when is_list(Config) ->
- httpd_mod:head(ip_comm, ?IP_PORT,
- ?config(host, Config), ?config(node, Config)),
- ok.
-%%-------------------------------------------------------------------------
-ip_mod_all(doc) ->
- ["All modules test"];
-ip_mod_all(suite) ->
- [];
-ip_mod_all(Config) when is_list(Config) ->
- httpd_mod:all(ip_comm, ?IP_PORT,
- ?config(host, Config), ?config(node, Config)),
- ok.
-%%-------------------------------------------------------------------------
-ip_load_light(doc) ->
- ["Test light load"];
-ip_load_light(suite) ->
- [];
-ip_load_light(Config) when is_list(Config) ->
- httpd_load:load_test(ip_comm, ?IP_PORT, ?config(host, Config),
- ?config(node, Config),
- get_nof_clients(ip_comm, light)),
- ok.
-%%-------------------------------------------------------------------------
-ip_load_medium(doc) ->
- ["Test medium load"];
-ip_load_medium(suite) ->
- [];
-ip_load_medium(Config) when is_list(Config) ->
- httpd_load:load_test(ip_comm, ?IP_PORT, ?config(host, Config),
- ?config(node, Config),
- get_nof_clients(ip_comm, medium)),
- ok.
-%%-------------------------------------------------------------------------
-ip_load_heavy(doc) ->
- ["Test heavy load"];
-ip_load_heavy(suite) ->
- [];
-ip_load_heavy(Config) when is_list(Config) ->
- httpd_load:load_test(ip_comm, ?IP_PORT, ?config(host, Config),
- ?config(node, Config),
- get_nof_clients(ip_comm, heavy)),
- ok.
-
-
-%%-------------------------------------------------------------------------
-ip_dos_hostname(doc) ->
- ["Denial Of Service (DOS) attack test case"];
-ip_dos_hostname(suite) ->
- [];
-ip_dos_hostname(Config) when is_list(Config) ->
- dos_hostname(ip_comm, ?IP_PORT, ?config(host, Config),
- ?config(node, Config), ?MAX_HEADER_SIZE),
- ok.
-
-
-%%-------------------------------------------------------------------------
-ip_time_test(doc) ->
- [""];
-ip_time_test(suite) ->
- [];
-ip_time_test(Config) when is_list(Config) ->
- %% <CONDITIONAL-SKIP>
- Skippable = [win32],
- Condition = fun() -> ?OS_BASED_SKIP(Skippable) end,
- ?NON_PC_TC_MAYBE_SKIP(Config, Condition),
- %% </CONDITIONAL-SKIP>
+ %% Control that authentication required!
+ %% Control that the pages that shall be
+ %% authenticated really need authenticatin
+ ok = httpd_test_lib:verify_request(Type, Host, Port, Node,
+ http_request("GET /ht/open/ ", Version, Host),
+ [{statuscode, 401},
+ {version, Version},
+ {header, "WWW-Authenticate"}]),
+ ok = httpd_test_lib:verify_request(Type, Host, Port, Node,
+ http_request("GET /ht/secret/ ", Version, Host),
+ [{statuscode, 401},
+ {version, Version},
+ {header, "WWW-Authenticate"}]),
+ ok = httpd_test_lib:verify_request(Type, Host, Port, Node,
+ http_request("GET /ht/secret/top_secret/ ",
+ Version, Host),
+ [{statuscode, 401},
+ {version, Version},
+ {header, "WWW-Authenticate"}]),
+
+ %% Make sure Authenticate header is received even the second time
+ %% we try a incorrect password! Otherwise a browser client will hang!
+ ok = auth_status(auth_request("/ht/open/",
+ "dummy", "WrongPassword", Version, Host), Config,
+ [{statuscode, 401},
+ {header, "WWW-Authenticate"}]),
+ ok = auth_status(auth_request("/ht/open/",
+ "dummy", "WrongPassword", Version, Host), Config,
+ [{statuscode, 401},
+ {header, "WWW-Authenticate"}]),
- httpd_time_test:t(ip_comm, ?config(host, Config), ?IP_PORT),
- ok.
-
-%%-------------------------------------------------------------------------
-ip_block_503(doc) ->
- ["Check that you will receive status code 503 when the server"
- " is blocked and 200 when its not blocked."];
-ip_block_503(suite) ->
- [];
-ip_block_503(Config) when is_list(Config) ->
- httpd_block:block_503(ip_comm, ?IP_PORT, ?config(host, Config),
- ?config(node, Config)),
- ok.
-%%-------------------------------------------------------------------------
-ip_block_disturbing_idle(doc) ->
- ["Check that you can block/unblock an idle server. The strategy "
- "distribing does not really make a difference in this case."];
-ip_block_disturbing_idle(suite) ->
- [];
-ip_block_disturbing_idle(Config) when is_list(Config) ->
- httpd_block:block_disturbing_idle(ip_comm, ?IP_PORT,
- ?config(host, Config),
- ?config(node, Config)),
- ok.
-%%-------------------------------------------------------------------------
-ip_block_non_disturbing_idle(doc) ->
- ["Check that you can block/unblock an idle server. The strategy "
- "non distribing does not really make a difference in this case."];
-ip_block_non_disturbing_idle(suite) ->
- [];
-ip_block_non_disturbing_idle(Config) when is_list(Config) ->
- httpd_block:block_non_disturbing_idle(ip_comm, ?IP_PORT,
- ?config(host, Config),
- ?config(node, Config)),
- ok.
-%%-------------------------------------------------------------------------
-ip_block_disturbing_active(doc) ->
- ["Check that you can block/unblock an active server. The strategy "
- "distribing means ongoing requests should be terminated."];
-ip_block_disturbing_active(suite) ->
- [];
-ip_block_disturbing_active(Config) when is_list(Config) ->
- httpd_block:block_disturbing_active(ip_comm, ?IP_PORT,
- ?config(host, Config),
- ?config(node, Config)),
- ok.
-%%-------------------------------------------------------------------------
-ip_block_non_disturbing_active(doc) ->
- ["Check that you can block/unblock an idle server. The strategy "
- "non distribing means the ongoing requests should be compleated."];
-ip_block_non_disturbing_active(suite) ->
- [];
-ip_block_non_disturbing_active(Config) when is_list(Config) ->
- httpd_block:block_non_disturbing_idle(ip_comm, ?IP_PORT,
- ?config(host, Config),
- ?config(node, Config)),
- ok.
-
-%%-------------------------------------------------------------------------
-ip_block_disturbing_active_timeout_not_released(doc) ->
- ["Check that you can block an active server. The strategy "
- "distribing means ongoing requests should be compleated"
- "if the timeout does not occur."];
-ip_block_disturbing_active_timeout_not_released(suite) ->
- [];
-ip_block_disturbing_active_timeout_not_released(Config)
- when is_list(Config) ->
- httpd_block:block_disturbing_active_timeout_not_released(ip_comm,
- ?IP_PORT,
- ?config(host,
- Config),
- ?config(node,
- Config)),
- ok.
-%%-------------------------------------------------------------------------
-ip_block_disturbing_active_timeout_released(doc) ->
- ["Check that you can block an active server. The strategy "
- "distribing means ongoing requests should be terminated when"
- "the timeout occurs."];
-ip_block_disturbing_active_timeout_released(suite) ->
- [];
-ip_block_disturbing_active_timeout_released(Config)
- when is_list(Config) ->
- httpd_block:block_disturbing_active_timeout_released(ip_comm,
- ?IP_PORT,
- ?config(host,
- Config),
- ?config(node,
- Config)),
- ok.
-
-%%-------------------------------------------------------------------------
-ip_block_non_disturbing_active_timeout_not_released(doc) ->
- ["Check that you can block an active server. The strategy "
- "non non distribing means ongoing requests should be completed."];
-ip_block_non_disturbing_active_timeout_not_released(suite) ->
- [];
-ip_block_non_disturbing_active_timeout_not_released(Config)
- when is_list(Config) ->
- httpd_block:
- block_non_disturbing_active_timeout_not_released(ip_comm,
- ?IP_PORT,
- ?config(host,
- Config),
- ?config(node,
- Config)),
- ok.
-%%-------------------------------------------------------------------------
-ip_block_non_disturbing_active_timeout_released(doc) ->
- ["Check that you can block an active server. The strategy "
- "non non distribing means ongoing requests should be completed. "
- "When the timeout occurs the block operation sohould be canceled." ];
-ip_block_non_disturbing_active_timeout_released(suite) ->
- [];
-ip_block_non_disturbing_active_timeout_released(Config)
- when is_list(Config) ->
- httpd_block:
- block_non_disturbing_active_timeout_released(ip_comm,
- ?IP_PORT,
- ?config(host,
- Config),
- ?config(node,
- Config)),
- ok.
-%%-------------------------------------------------------------------------
-ip_block_disturbing_blocker_dies(doc) ->
- [];
-ip_block_disturbing_blocker_dies(suite) ->
- [];
-ip_block_disturbing_blocker_dies(Config) when is_list(Config) ->
- httpd_block:disturbing_blocker_dies(ip_comm, ?IP_PORT,
- ?config(host, Config),
- ?config(node, Config)),
- ok.
-%%-------------------------------------------------------------------------
-ip_block_non_disturbing_blocker_dies(doc) ->
- [];
-ip_block_non_disturbing_blocker_dies(suite) ->
- [];
-ip_block_non_disturbing_blocker_dies(Config) when is_list(Config) ->
- httpd_block:non_disturbing_blocker_dies(ip_comm, ?IP_PORT,
- ?config(host, Config),
- ?config(node, Config)),
- ok.
-%%-------------------------------------------------------------------------
-ip_restart_no_block(doc) ->
- [""];
-ip_restart_no_block(suite) ->
- [];
-ip_restart_no_block(Config) when is_list(Config) ->
- httpd_block:restart_no_block(ip_comm, ?IP_PORT, ?config(host, Config),
- ?config(node, Config)),
- ok.
-%%-------------------------------------------------------------------------
-ip_restart_disturbing_block(doc) ->
- [""];
-ip_restart_disturbing_block(suite) ->
- [];
-ip_restart_disturbing_block(Config) when is_list(Config) ->
- %% <CONDITIONAL-SKIP>
- Condition =
- fun() ->
- case os:type() of
- {unix, linux} ->
- HW = string:strip(os:cmd("uname -m"), right, $\n),
- case HW of
- "ppc" ->
- case inet:gethostname() of
- {ok, "peach"} ->
- true;
- _ ->
- false
- end;
- _ ->
- false
- end;
- _ ->
- false
- end
+ %% Control that not just the first user in the list is valid
+ %% Control the first user
+ %% Authennticating ["one:OnePassword" user first in user list]
+ ok = auth_status(auth_request("/ht/open/dummy.html", "one", "OnePassword",
+ Version, Host), Config,
+ [{statuscode, 200}]),
+
+ %% Control the second user
+ %% Authentication OK and a directory listing is supplied!
+ %% ["Aladdin:open sesame" user second in user list]
+ ok = auth_status(auth_request("/ht/open/","Aladdin",
+ "AladdinPassword", Version, Host), Config,
+ [{statuscode, 200}]),
+
+ %% Contro that bad passwords and userids get a good denial
+ %% User correct but wrong password! ["one:one" user first in user list]
+ ok = auth_status(auth_request("/ht/open/", "one", "one", Version, Host), Config,
+ [{statuscode, 401}]),
+ %% Neither user or password correct! ["dummy:dummy"]
+ ok = auth_status(auth_request("/ht/open/", "dummy", "dummy", Version, Host), Config,
+ [{statuscode, 401}]),
+
+ %% Control that authetication still works, even if its a member in a group
+ %% Authentication OK! ["two:TwoPassword" user in first group]
+ ok = auth_status(auth_request("/ht/secret/dummy.html", "two",
+ "TwoPassword", Version, Host), Config,
+ [{statuscode, 200}]),
+
+ %% Authentication OK and a directory listing is supplied!
+ %% ["three:ThreePassword" user in second group]
+ ok = auth_status(auth_request("/ht/secret/", "three",
+ "ThreePassword", Version, Host), Config,
+ [{statuscode, 200}]),
+
+ %% Deny users with bad passwords even if the user is a group member
+ %% User correct but wrong password! ["two:two" user in first group]
+ ok = auth_status(auth_request("/ht/secret/", "two", "two", Version, Host), Config,
+ [{statuscode, 401}]),
+ %% Neither user or password correct! ["dummy:dummy"]
+ ok = auth_status(auth_request("/ht/secret/", "dummy", "dummy", Version, Host), Config,
+ [{statuscode, 401}]),
+
+ %% control that we deny the users that are in subnet above the allowed
+ ok = auth_status(auth_request("/ht/blocknet/dummy.html", "four",
+ "FourPassword", Version, Host), Config,
+ [{statuscode, 403}]),
+ %% Control that we only applies the rules to the right methods
+ ok = httpd_test_lib:verify_request(Type, Host, Port, Node,
+ http_request("HEAD /ht/blocknet/dummy.html ", Version, Host),
+ [{statuscode, head_status(Version)},
+ {version, Version}]),
+
+ %% Control that the rerquire directive can be overrideen
+ ok = auth_status(auth_request("/ht/secret/top_secret/ ", "Aladdin", "AladdinPassword",
+ Version, Host), Config,
+ [{statuscode, 401}]),
+
+ %% Authentication still required!
+ ok = httpd_test_lib:verify_request(Type, Host, Port, Node,
+ http_request("GET /ht/open/ ", Version, Host),
+ [{statuscode, 401},
+ {version, Version},
+ {header, "WWW-Authenticate"}]),
+ ok = httpd_test_lib:verify_request(Type, Host, Port, Node,
+ http_request("GET /ht/secret/ ", Version, Host),
+ [{statuscode, 401},
+ {version, Version},
+ {header, "WWW-Authenticate"}]),
+ ok = httpd_test_lib:verify_request(Type, Host, Port, Node,
+ http_request("GET /ht/secret/top_secret/ ", Version, Host),
+ [{statuscode, 401},
+ {version, Version},
+ {header, "WWW-Authenticate"}]).
+
+%%-------------------------------------------------------------------------
+host() ->
+ [{doc, "Test host header"}].
+
+host(Config) when is_list(Config) ->
+ Cb = ?config(version_cb, Config),
+ Cb:host(?config(type, Config), ?config(port, Config),
+ ?config(host, Config), ?config(node, Config)).
+%%-------------------------------------------------------------------------
+chunked() ->
+ [{doc, "Check that the server accepts chunked requests."}].
+
+chunked(Config) when is_list(Config) ->
+ httpd_1_1:chunked(?config(type, Config), ?config(port, Config),
+ ?config(host, Config), ?config(node, Config)).
+%%-------------------------------------------------------------------------
+expect() ->
+ ["Check that the server handles request with the expect header "
+ "field appropiate"].
+expect(Config) when is_list(Config) ->
+ httpd_1_1:expect(?config(type, Config), ?config(port, Config),
+ ?config(host, Config), ?config(node, Config)).
+%%-------------------------------------------------------------------------
+max_clients_1_1() ->
+ [{doc, "Test max clients limit"}].
+
+max_clients_1_1(Config) when is_list(Config) ->
+ do_max_clients([{http_version, "HTTP/1.1"} | Config]).
+
+max_clients_1_0() ->
+ [{doc, "Test max clients limit"}].
+
+max_clients_1_0(Config) when is_list(Config) ->
+ do_max_clients([{http_version, "HTTP/1.0"} | Config]).
+
+max_clients_0_9() ->
+ [{doc, "Test max clients limit"}].
+
+max_clients_0_9(Config) when is_list(Config) ->
+ do_max_clients([{http_version, "HTTP/0.9"} | Config]).
+%%-------------------------------------------------------------------------
+esi() ->
+ [{doc, "Test mod_esi"}].
+
+esi(Config) when is_list(Config) ->
+ ok = http_status("GET /eval?httpd_example:print(\"Hi!\") ",
+ Config, [{statuscode, 200}]),
+ ok = http_status("GET /eval?not_allowed:print(\"Hi!\") ",
+ Config, [{statuscode, 403}]),
+ ok = http_status("GET /eval?httpd_example:undef(\"Hi!\") ",
+ Config, [{statuscode, 500}]),
+ ok = http_status("GET /cgi-bin/erl/httpd_example ",
+ Config, [{statuscode, 400}]),
+ ok = http_status("GET /cgi-bin/erl/httpd_example:get ",
+ Config, [{statuscode, 200}]),
+ ok = http_status("GET /cgi-bin/erl/httpd_example:"
+ "get?input=4711 ", Config,
+ [{statuscode, 200}]),
+ ok = http_status("GET /cgi-bin/erl/httpd_example:post ",
+ Config, [{statuscode, 200}]),
+ ok = http_status("GET /cgi-bin/erl/not_allowed:post ",
+ Config, [{statuscode, 403}]),
+ ok = http_status("GET /cgi-bin/erl/httpd_example:undef ",
+ Config, [{statuscode, 404}]),
+ ok = http_status("GET /cgi-bin/erl/httpd_example/yahoo ",
+ Config, [{statuscode, 302}]),
+ %% Check "ErlScriptNoCache" directive (default: false)
+ ok = http_status("GET /cgi-bin/erl/httpd_example:get ",
+ Config, [{statuscode, 200},
+ {no_header, "cache-control"}]).
+%%-------------------------------------------------------------------------
+cgi() ->
+ [{doc, "Test mod_cgi"}].
+
+cgi(Config) when is_list(Config) ->
+ {Script, Script2, Script3} =
+ case test_server:os_type() of
+ {win32, _} ->
+ {"printenv.bat", "printenv.sh", "cgi_echo.exe"};
+ _ ->
+ {"printenv.sh", "printenv.bat", "cgi_echo"}
end,
- ?NON_PC_TC_MAYBE_SKIP(Config, Condition),
- %% </CONDITIONAL-SKIP>
- httpd_block:restart_disturbing_block(ip_comm, ?IP_PORT,
- ?config(host, Config),
- ?config(node, Config)),
- ok.
+ %%The length (> 100) is intentional
+ ok = http_status("POST /cgi-bin/" ++ Script3 ++ " ",
+ {"Content-Length:100 \r\n",
+ "ZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZ"
+ "ZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZ"
+ "ZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZ"
+ "ZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZ"
+ "ZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZ"
+ "ZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZ"
+ "ZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZ"
+ "ZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZ"
+ "ZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZ"
+ "ZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZ"
+ "ZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZ"
+ "ZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZ"
+ "ZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZ"
+ "ZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZ"
+ "ZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZ"
+ "ZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZ"
+ "ZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZ"},
+ Config,
+ [{statuscode, 200},
+ {header, "content-type", "text/plain"}]),
+
+ ok = http_status("GET /cgi-bin/"++ Script ++ " ", Config, [{statuscode, 200}]),
-%%-------------------------------------------------------------------------
-ip_restart_non_disturbing_block(doc) ->
- [""];
-ip_restart_non_disturbing_block(suite) ->
- [];
-ip_restart_non_disturbing_block(Config) when is_list(Config) ->
- %% <CONDITIONAL-SKIP>
- Condition =
- fun() ->
- case os:type() of
- {unix, linux} ->
- HW = string:strip(os:cmd("uname -m"), right, $\n),
- case HW of
- "ppc" ->
- case inet:gethostname() of
- {ok, "peach"} ->
- true;
- _ ->
- false
- end;
- _ ->
- false
- end;
- _ ->
- false
- end
+ ok = http_status("GET /cgi-bin/not_there ", Config,
+ [{statuscode, 404}, {statuscode, 500}]),
+
+ ok = http_status("GET /cgi-bin/"++ Script ++ "?Nisse:kkk?sss/lll ",
+ Config,
+ [{statuscode, 200}]),
+
+ ok = http_status("POST /cgi-bin/"++ Script ++ " ", Config,
+ [{statuscode, 200}]),
+
+ ok = http_status("GET /htbin/"++ Script ++ " ", Config,
+ [{statuscode, 200}]),
+
+ ok = http_status("GET /htbin/not_there ", Config,
+ [{statuscode, 404},{statuscode, 500}]),
+
+ ok = http_status("GET /htbin/"++ Script ++ "?Nisse:kkk?sss/lll ", Config,
+ [{statuscode, 200}]),
+
+ ok = http_status("POST /htbin/"++ Script ++ " ", Config,
+ [{statuscode, 200}]),
+
+ ok = http_status("POST /htbin/"++ Script ++ " ", Config,
+ [{statuscode, 200}]),
+
+ %% Execute an existing, but bad CGI script..
+ ok = http_status("POST /htbin/"++ Script2 ++ " ", Config,
+ [{statuscode, 404}]),
+
+ ok = http_status("POST /cgi-bin/"++ Script2 ++ " ", Config,
+ [{statuscode, 404}]),
+
+ %% Check "ScriptNoCache" directive (default: false)
+ ok = http_status("GET /cgi-bin/" ++ Script ++ " ", Config,
+ [{statuscode, 200},
+ {no_header, "cache-control"}]).
+%%-------------------------------------------------------------------------
+cgi_chunked_encoding_test() ->
+ [{doc, "Test chunked encoding together with mod_cgi "}].
+cgi_chunked_encoding_test(Config) when is_list(Config) ->
+ Host = ?config(host, Config),
+ Script =
+ case test_server:os_type() of
+ {win32, _} ->
+ "/cgi-bin/printenv.bat";
+ _ ->
+ "/cgi-bin/printenv.sh"
end,
- ?NON_PC_TC_MAYBE_SKIP(Config, Condition),
- %% </CONDITIONAL-SKIP>
-
- httpd_block:restart_non_disturbing_block(ip_comm, ?IP_PORT,
- ?config(host, Config),
- ?config(node, Config)),
- ok.
-
-%%-------------------------------------------------------------------------
-
-essl_mod_alias(doc) ->
- ["Module test: mod_alias - using new of configure new SSL"];
-essl_mod_alias(suite) ->
- [];
-essl_mod_alias(Config) when is_list(Config) ->
- ssl_mod_alias(essl, Config).
-
-
-ssl_mod_alias(Tag, Config) ->
- httpd_mod:alias(Tag, ?SSL_PORT,
- ?config(host, Config), ?config(node, Config)),
- ok.
-
-
-%%-------------------------------------------------------------------------
-
-essl_mod_actions(doc) ->
- ["Module test: mod_actions - using new of configure new SSL"];
-essl_mod_actions(suite) ->
- [];
-essl_mod_actions(Config) when is_list(Config) ->
- ssl_mod_actions(essl, Config).
-
-
-ssl_mod_actions(Tag, Config) ->
- httpd_mod:actions(Tag,
- ?SSL_PORT,
- ?config(host, Config),
- ?config(node, Config)),
- ok.
-
-
-%%-------------------------------------------------------------------------
-
-essl_mod_security(doc) ->
- ["Module test: mod_security - using new of configure new SSL"];
-essl_mod_security(suite) ->
- [];
-essl_mod_security(Config) when is_list(Config) ->
- ssl_mod_security(essl, Config).
-
-ssl_mod_security(Tag, Config) ->
- ServerRoot = ?config(server_root, Config),
- httpd_mod:security(ServerRoot,
- Tag,
- ?SSL_PORT,
- ?config(host, Config),
- ?config(node, Config)),
- ok.
-
-
-%%-------------------------------------------------------------------------
-
-essl_mod_auth(doc) ->
- ["Module test: mod_auth - using new of configure new SSL"];
-essl_mod_auth(suite) ->
- [];
-essl_mod_auth(Config) when is_list(Config) ->
- ssl_mod_auth(essl, Config).
-
-ssl_mod_auth(Tag, Config) ->
- httpd_mod:auth(Tag,
- ?SSL_PORT,
- ?config(host, Config),
- ?config(node, Config)),
- ok.
-
-
-%%-------------------------------------------------------------------------
-
-
-essl_mod_auth_api(doc) ->
- ["Module test: mod_auth - using new of configure new SSL"];
-essl_mod_auth_api(suite) ->
- [];
-essl_mod_auth_api(Config) when is_list(Config) ->
- ssl_mod_auth_api(essl, Config).
-
-ssl_mod_auth_api(Tag, Config) ->
- ServerRoot = ?config(server_root, Config),
- Host = ?config(host, Config),
- Node = ?config(node, Config),
- httpd_mod:auth_api(ServerRoot, "", Tag, ?SSL_PORT, Host, Node),
- httpd_mod:auth_api(ServerRoot, "dets_", Tag, ?SSL_PORT, Host, Node),
- httpd_mod:auth_api(ServerRoot, "mnesia_", Tag, ?SSL_PORT, Host, Node),
- ok.
-
-
-%%-------------------------------------------------------------------------
-
-
-essl_mod_auth_mnesia_api(doc) ->
- ["Module test: mod_auth_mnesia_api - using new of configure new SSL"];
-essl_mod_auth_mnesia_api(suite) ->
- [];
-essl_mod_auth_mnesia_api(Config) when is_list(Config) ->
- ssl_mod_auth_mnesia_api(essl, Config).
-
-ssl_mod_auth_mnesia_api(Tag, Config) ->
- httpd_mod:auth_mnesia_api(Tag,
- ?SSL_PORT,
- ?config(host, Config),
- ?config(node, Config)),
- ok.
-
-
-%%-------------------------------------------------------------------------
-
-essl_mod_htaccess(doc) ->
- ["Module test: mod_htaccess - using new of configure new SSL"];
-essl_mod_htaccess(suite) ->
- [];
-essl_mod_htaccess(Config) when is_list(Config) ->
- ssl_mod_htaccess(essl, Config).
-
-ssl_mod_htaccess(Tag, Config) ->
- httpd_mod:htaccess(Tag,
- ?SSL_PORT,
- ?config(host, Config),
- ?config(node, Config)),
- ok.
-
-
+ Requests =
+ ["GET " ++ Script ++ " HTTP/1.1\r\nHost:"++ Host ++"\r\n\r\n",
+ "GET /cgi-bin/erl/httpd_example/newformat HTTP/1.1\r\nHost:"
+ ++ Host ++"\r\n\r\n"],
+ httpd_1_1:mod_cgi_chunked_encoding_test(?config(type, Config), ?config(port, Config),
+ Host,
+ ?config(node, Config),
+ Requests).
%%-------------------------------------------------------------------------
+alias() ->
+ [{doc, "Test mod_alias"}].
-essl_mod_cgi(doc) ->
- ["Module test: mod_cgi - using new of configure new SSL"];
-essl_mod_cgi(suite) ->
- [];
-essl_mod_cgi(Config) when is_list(Config) ->
- ssl_mod_cgi(essl, Config).
-
-ssl_mod_cgi(Tag, Config) ->
- httpd_mod:cgi(Tag,
- ?SSL_PORT,
- ?config(host, Config),
- ?config(node, Config)),
- ok.
-
+alias(Config) when is_list(Config) ->
+ ok = http_status("GET /pics/icon.sheet.gif ", Config,
+ [{statuscode, 200},
+ {header, "Content-Type","image/gif"},
+ {header, "Server"},
+ {header, "Date"}]),
+
+ ok = http_status("GET / ", Config,
+ [{statuscode, 200},
+ {header, "Content-Type","text/html"},
+ {header, "Server"},
+ {header, "Date"}]),
+
+ ok = http_status("GET /misc/ ", Config,
+ [{statuscode, 200},
+ {header, "Content-Type","text/html"},
+ {header, "Server"},
+ {header, "Date"}]),
+ %% Check redirection if trailing slash is missing.
+ ok = http_status("GET /misc ", Config,
+ [{statuscode, 301},
+ {header, "Location"},
+ {header, "Content-Type","text/html"}]).
%%-------------------------------------------------------------------------
+actions() ->
+ [{doc, "Test mod_actions"}].
-essl_mod_esi(doc) ->
- ["Module test: mod_esi - using new of configure new SSL"];
-essl_mod_esi(suite) ->
- [];
-essl_mod_esi(Config) when is_list(Config) ->
- ssl_mod_esi(essl, Config).
-
-ssl_mod_esi(Tag, Config) ->
- httpd_mod:esi(Tag,
- ?SSL_PORT,
- ?config(host, Config),
- ?config(node, Config)),
- ok.
-
+actions(Config) when is_list(Config) ->
+ ok = http_status("GET /", Config, [{statuscode, 200}]).
%%-------------------------------------------------------------------------
+range() ->
+ [{doc, "Test Range header"}].
-essl_mod_get(doc) ->
- ["Module test: mod_get - using new of configure new SSL"];
-essl_mod_get(suite) ->
- [];
-essl_mod_get(Config) when is_list(Config) ->
- ssl_mod_get(essl, Config).
-
-ssl_mod_get(Tag, Config) ->
- httpd_mod:get(Tag,
- ?SSL_PORT,
- ?config(host, Config),
- ?config(node, Config)),
- ok.
-
+range(Config) when is_list(Config) ->
+ httpd_1_1:range(?config(type, Config), ?config(port, Config),
+ ?config(host, Config), ?config(node, Config)).
%%-------------------------------------------------------------------------
+if_modified_since() ->
+ [{doc, "Test If-Modified-Since header"}].
-essl_mod_head(doc) ->
- ["Module test: mod_head - using new of configure new SSL"];
-essl_mod_head(suite) ->
- [];
-essl_mod_head(Config) when is_list(Config) ->
- ssl_mod_head(essl, Config).
-
-ssl_mod_head(Tag, Config) ->
- httpd_mod:head(Tag,
- ?SSL_PORT,
- ?config(host, Config),
- ?config(node, Config)),
- ok.
-
-
+if_modified_since(Config) when is_list(Config) ->
+ httpd_1_1:if_test(?config(type, Config), ?config(port, Config),
+ ?config(host, Config), ?config(node, Config),
+ ?config(doc_root, Config)).
%%-------------------------------------------------------------------------
+trace() ->
+ [{doc, "Test TRACE method"}].
-essl_mod_all(doc) ->
- ["All modules test - using new of configure new SSL"];
-essl_mod_all(suite) ->
- [];
-essl_mod_all(Config) when is_list(Config) ->
- ssl_mod_all(essl, Config).
-
-ssl_mod_all(Tag, Config) ->
- httpd_mod:all(Tag,
- ?SSL_PORT,
- ?config(host, Config),
- ?config(node, Config)),
- ok.
-
+trace(Config) when is_list(Config) ->
+ Cb = ?config(version_cb, Config),
+ Cb:trace(?config(type, Config), ?config(port, Config),
+ ?config(host, Config), ?config(node, Config)).
%%-------------------------------------------------------------------------
-
-essl_load_light(doc) ->
- ["Test light load - using new of configure new SSL"];
-essl_load_light(suite) ->
- [];
-essl_load_light(Config) when is_list(Config) ->
- ssl_load_light(essl, Config).
-
-ssl_load_light(Tag, Config) ->
- httpd_load:load_test(Tag,
- ?SSL_PORT,
- ?config(host, Config),
- ?config(node, Config),
- get_nof_clients(ssl, light)),
- ok.
-
-
+light() ->
+ ["Test light load"].
+light(Config) when is_list(Config) ->
+ httpd_load:load_test(?config(type, Config), ?config(port, Config), ?config(host, Config),
+ ?config(node, Config), 10).
%%-------------------------------------------------------------------------
-
-essl_load_medium(doc) ->
- ["Test medium load - using new of configure new SSL"];
-essl_load_medium(suite) ->
- [];
-essl_load_medium(Config) when is_list(Config) ->
- ssl_load_medium(essl, Config).
-
-ssl_load_medium(Tag, Config) ->
- %% <CONDITIONAL-SKIP>
- Skippable = [win32],
- Condition = fun() -> ?OS_BASED_SKIP(Skippable) end,
- ?NON_PC_TC_MAYBE_SKIP(Config, Condition),
- %% </CONDITIONAL-SKIP>
-
- httpd_load:load_test(Tag,
- ?SSL_PORT,
- ?config(host, Config),
- ?config(node, Config),
- get_nof_clients(ssl, medium)),
- ok.
-
-
+medium() ->
+ ["Test medium load"].
+medium(Config) when is_list(Config) ->
+ httpd_load:load_test(?config(type, Config), ?config(port, Config), ?config(host, Config),
+ ?config(node, Config), 100).
%%-------------------------------------------------------------------------
-
-essl_load_heavy(doc) ->
- ["Test heavy load - using new of configure new SSL"];
-essl_load_heavy(suite) ->
- [];
-essl_load_heavy(Config) when is_list(Config) ->
- ssl_load_heavy(essl, Config).
-
-ssl_load_heavy(Tag, Config) ->
- %% <CONDITIONAL-SKIP>
- Skippable = [win32],
- Condition = fun() -> ?OS_BASED_SKIP(Skippable) end,
- ?NON_PC_TC_MAYBE_SKIP(Config, Condition),
- %% </CONDITIONAL-SKIP>
-
- httpd_load:load_test(Tag,
- ?SSL_PORT,
- ?config(host, Config),
+heavy() ->
+ ["Test heavy load"].
+heavy(Config) when is_list(Config) ->
+ httpd_load:load_test(?config(type, Config), ?config(port, Config), ?config(host, Config),
?config(node, Config),
- get_nof_clients(ssl, heavy)),
- ok.
-
-
-%%-------------------------------------------------------------------------
-
-
-essl_dos_hostname(doc) ->
- ["Denial Of Service (DOS) attack test case - using new of configure new SSL"];
-essl_dos_hostname(suite) ->
- [];
-essl_dos_hostname(Config) when is_list(Config) ->
- ssl_dos_hostname(essl, Config).
-
-ssl_dos_hostname(Tag, Config) ->
- dos_hostname(Tag,
- ?SSL_PORT,
- ?config(host, Config),
- ?config(node, Config),
- ?MAX_HEADER_SIZE),
- ok.
-
-
-%%-------------------------------------------------------------------------
-
-
-essl_time_test(doc) ->
- ["using new of configure new SSL"];
-essl_time_test(suite) ->
- [];
-essl_time_test(Config) when is_list(Config) ->
- ssl_time_test(essl, Config).
-
-ssl_time_test(Tag, Config) when is_list(Config) ->
- %% <CONDITIONAL-SKIP>
- FreeBSDVersionVerify =
- fun() ->
- case os:version() of
- {7, 1, _} -> % We only have one such machine, so...
- true;
- _ ->
- false
- end
- end,
- Skippable = [win32, {unix, [{freebsd, FreeBSDVersionVerify}]}],
- Condition = fun() -> ?OS_BASED_SKIP(Skippable) end,
- ?NON_PC_TC_MAYBE_SKIP(Config, Condition),
- %% </CONDITIONAL-SKIP>
-
- httpd_time_test:t(Tag,
- ?config(host, Config),
- ?SSL_PORT),
- ok.
-
-
+ 1000).
%%-------------------------------------------------------------------------
-
-
-essl_block_503(doc) ->
- ["Check that you will receive status code 503 when the server"
- " is blocked and 200 when its not blocked - using new of configure new SSL."];
-essl_block_503(suite) ->
- [];
-essl_block_503(Config) when is_list(Config) ->
- ssl_block_503(essl, Config).
-
-ssl_block_503(Tag, Config) ->
- httpd_block:block_503(Tag,
- ?SSL_PORT,
- ?config(host, Config),
- ?config(node, Config)),
- ok.
-
-
+content_length() ->
+ ["Tests that content-length is correct OTP-5775"].
+content_length(Config) ->
+ Version = ?config(http_version, Config),
+ Host = ?config(host, Config),
+ ok = httpd_test_lib:verify_request(?config(type, Config), Host,
+ ?config(port, Config), ?config(node, Config),
+ http_request("GET /cgi-bin/erl/httpd_example:get_bin ",
+ Version, Host),
+ [{statuscode, 200},
+ {content_length, 274},
+ {version, Version}]).
%%-------------------------------------------------------------------------
-
-essl_block_disturbing_idle(doc) ->
- ["Check that you can block/unblock an idle server. The strategy "
- "distribing does not really make a difference in this case."
- "Using new of configure new SSL"];
-essl_block_disturbing_idle(suite) ->
- [];
-essl_block_disturbing_idle(Config) when is_list(Config) ->
- ssl_block_disturbing_idle(essl, Config).
-
-ssl_block_disturbing_idle(Tag, Config) ->
- httpd_block:block_disturbing_idle(Tag,
- ?SSL_PORT,
- ?config(host, Config),
- ?config(node, Config)),
- ok.
-
-
+bad_hex() ->
+ ["Tests that a URI with a bad hexadecimal code is handled OTP-6003"].
+bad_hex(Config) ->
+ Version = ?config(http_version, Config),
+ Host = ?config(host, Config),
+ ok = httpd_test_lib:verify_request(?config(type, Config), Host,
+ ?config(port, Config), ?config(node, Config),
+ http_request("GET http://www.erlang.org/%skalle ",
+ Version, Host),
+ [{statuscode, 400},
+ {version, Version}]).
%%-------------------------------------------------------------------------
-
-essl_block_non_disturbing_idle(doc) ->
- ["Check that you can block/unblock an idle server. The strategy "
- "non distribing does not really make a difference in this case."
- "Using new of configure new SSL"];
-essl_block_non_disturbing_idle(suite) ->
- [];
-essl_block_non_disturbing_idle(Config) when is_list(Config) ->
- ssl_block_non_disturbing_idle(essl, Config).
-
-ssl_block_non_disturbing_idle(Tag, Config) ->
- httpd_block:block_non_disturbing_idle(Tag,
- ?SSL_PORT,
- ?config(host, Config),
- ?config(node, Config)),
- ok.
-
+missing_CR() ->
+ ["Tests missing CR in delimiter OTP-7304"].
+missing_CR(Config) ->
+ Version = ?config(http_version, Config),
+ Host = ?config(host, Config),
+ ok = httpd_test_lib:verify_request(?config(type, Config), Host,
+ ?config(port, Config), ?config(node, Config),
+ http_request_missing_CR("GET /index.html ", Version, Host),
+ [{statuscode, 200},
+ {version, Version}]).
%%-------------------------------------------------------------------------
-
-essl_block_disturbing_active(doc) ->
- ["Check that you can block/unblock an active server. The strategy "
- "distribing means ongoing requests should be terminated."
- "Using new of configure new SSL"];
-essl_block_disturbing_active(suite) ->
- [];
-essl_block_disturbing_active(Config) when is_list(Config) ->
- ssl_block_disturbing_active(essl, Config).
-
-ssl_block_disturbing_active(Tag, Config) ->
- httpd_block:block_disturbing_active(Tag,
- ?SSL_PORT,
- ?config(host, Config),
- ?config(node, Config)),
- ok.
-
+max_header() ->
+ ["Denial Of Service (DOS) attack, prevented by max_header"].
+max_header(Config) when is_list(Config) ->
+ Version = ?config(http_version, Config),
+ Host = ?config(host, Config),
+ case Version of
+ "HTTP/0.9" ->
+ {skip, no_implemented};
+ _ ->
+ dos_hostname(?config(type, Config), ?config(port, Config), Host,
+ ?config(node, Config), Version, ?MAX_HEADER_SIZE)
+ end.
%%-------------------------------------------------------------------------
+security_1_1(Config) when is_list(Config) ->
+ security([{http_version, "HTTP/1.1"} | Config]).
-essl_block_non_disturbing_active(doc) ->
- ["Check that you can block/unblock an idle server. The strategy "
- "non distribing means the ongoing requests should be compleated."
- "Using new of configure new SSL"];
-essl_block_non_disturbing_active(suite) ->
- [];
-essl_block_non_disturbing_active(Config) when is_list(Config) ->
- ssl_block_non_disturbing_active(essl, Config).
-
-ssl_block_non_disturbing_active(Tag, Config) ->
- httpd_block:block_non_disturbing_idle(Tag,
- ?SSL_PORT,
- ?config(host, Config),
- ?config(node, Config)),
- ok.
-
-
-%%-------------------------------------------------------------------------
+security_1_0(Config) when is_list(Config) ->
+ security([{http_version, "HTTP/1.0"} | Config]).
-essl_block_disturbing_active_timeout_not_released(doc) ->
- ["Check that you can block an active server. The strategy "
- "distribing means ongoing requests should be compleated"
- "if the timeout does not occur."
- "Using new of configure new SSL"];
-essl_block_disturbing_active_timeout_not_released(suite) ->
- [];
-essl_block_disturbing_active_timeout_not_released(Config)
- when is_list(Config) ->
- ssl_block_disturbing_active_timeout_not_released(essl, Config).
-
-ssl_block_disturbing_active_timeout_not_released(Tag, Config) ->
- Port = ?SSL_PORT,
- Host = ?config(host, Config),
- Node = ?config(node, Config),
- httpd_block:block_disturbing_active_timeout_not_released(Tag,
- Port, Host, Node),
- ok.
+security() ->
+ ["Test mod_security"].
+security(Config) ->
+ Version = ?config(http_version, Config),
+ Host = ?config(host, Config),
+ Port = ?config(port, Config),
+ Node = ?config(node, Config),
+ ServerRoot = ?config(server_root, Config),
+ global:register_name(mod_security_test, self()), % Receive events
-%%-------------------------------------------------------------------------
+ test_server:sleep(5000),
-essl_block_disturbing_active_timeout_released(doc) ->
- ["Check that you can block an active server. The strategy "
- "distribing means ongoing requests should be terminated when"
- "the timeout occurs."
- "Using new of configure new SSL"];
-essl_block_disturbing_active_timeout_released(suite) ->
- [];
-essl_block_disturbing_active_timeout_released(Config)
- when is_list(Config) ->
- ssl_block_disturbing_active_timeout_released(essl, Config).
-
-ssl_block_disturbing_active_timeout_released(Tag, Config) ->
- Port = ?SSL_PORT,
- Host = ?config(host, Config),
- Node = ?config(node, Config),
- httpd_block:block_disturbing_active_timeout_released(Tag,
- Port,
- Host,
- Node),
- ok.
+ OpenDir = filename:join([ServerRoot, "htdocs", "open"]),
+ %% Test blocking / unblocking of users.
-%%-------------------------------------------------------------------------
+ %% /open, require user one Aladdin
+ remove_users(Node, ServerRoot, Host, Port, "", "open"),
-essl_block_non_disturbing_active_timeout_not_released(doc) ->
- ["Check that you can block an active server. The strategy "
- "non non distribing means ongoing requests should be completed."
- "Using new of configure new SSL"];
-essl_block_non_disturbing_active_timeout_not_released(suite) ->
- [];
-essl_block_non_disturbing_active_timeout_not_released(Config)
- when is_list(Config) ->
- ssl_block_non_disturbing_active_timeout_not_released(essl, Config).
-
-ssl_block_non_disturbing_active_timeout_not_released(Tag, Config) ->
- Port = ?SSL_PORT,
- Host = ?config(host, Config),
- Node = ?config(node, Config),
- httpd_block:block_non_disturbing_active_timeout_not_released(Tag,
- Port,
- Host,
- Node),
- ok.
+ ok = auth_status(auth_request("/open/",
+ "one", "onePassword", Version, Host), Config,
+ [{statuscode, 401}]),
+
+ receive_security_event({event, auth_fail, Port, OpenDir,
+ [{user, "one"}, {password, "onePassword"}]},
+ Node, Port),
+
+ ok = auth_status(auth_request("/open/",
+ "two", "twoPassword", Version, Host), Config,
+ [{statuscode, 401}]),
+
+ receive_security_event({event, auth_fail, Port, OpenDir,
+ [{user, "two"}, {password, "twoPassword"}]},
+ Node, Port),
+ ok = auth_status(auth_request("/open/",
+ "Aladdin", "AladdinPassword", Version, Host),
+ Config, [{statuscode, 401}]),
+
+ receive_security_event({event, auth_fail, Port, OpenDir,
+ [{user, "Aladdin"},
+ {password, "AladdinPassword"}]},
+ Node, Port),
-%%-------------------------------------------------------------------------
+ add_user(Node, ServerRoot, Port, "", "open", "one", "onePassword", []),
+ add_user(Node, ServerRoot, Port, "", "open", "two", "twoPassword", []),
+ ok = auth_status(auth_request("/open/", "one", "WrongPassword", Version, Host), Config,
+ [{statuscode, 401}]),
+
+ receive_security_event({event, auth_fail, Port, OpenDir,
+ [{user, "one"}, {password, "WrongPassword"}]},
+ Node, Port),
-essl_block_non_disturbing_active_timeout_released(doc) ->
- ["Check that you can block an active server. The strategy "
- "non distribing means ongoing requests should be completed. "
- "When the timeout occurs the block operation sohould be canceled."
- "Using new of configure new SSL"];
-essl_block_non_disturbing_active_timeout_released(suite) ->
- [];
-essl_block_non_disturbing_active_timeout_released(Config)
- when is_list(Config) ->
- ssl_block_non_disturbing_active_timeout_released(essl, Config).
-
-ssl_block_non_disturbing_active_timeout_released(Tag, Config)
- when is_list(Config) ->
- Port = ?SSL_PORT,
- Host = ?config(host, Config),
- Node = ?config(node, Config),
- httpd_block:block_non_disturbing_active_timeout_released(Tag,
- Port,
- Host,
- Node),
+ ok = auth_status(auth_request("/open/", "one", "WrongPassword", Version, Host), Config,
+ [{statuscode, 401}]),
+
+ receive_security_event({event, auth_fail, Port, OpenDir,
+ [{user, "one"}, {password, "WrongPassword"}]},
+ Node, Port),
+ receive_security_event({event, user_block, Port, OpenDir,
+ [{user, "one"}]}, Node, Port),
+
+ global:unregister_name(mod_security_test), % No more events.
+
+ ok = auth_status(auth_request("/open/", "one", "WrongPassword", Version, Host), Config,
+ [{statuscode, 401}]),
+
+ %% User "one" should be blocked now..
+ case list_blocked_users(Node, Port) of
+ [{"one",_, Port, OpenDir,_}] ->
+ ok;
+ Blocked ->
+ ct:fail({unexpected_blocked, Blocked})
+ end,
- ok.
+ [{"one",_, Port, OpenDir,_}] = list_blocked_users(Node, Port, OpenDir),
+ true = unblock_user(Node, "one", Port, OpenDir),
+ %% User "one" should not be blocked any more.
-%%-------------------------------------------------------------------------
+ [] = list_blocked_users(Node, Port),
+ ok = auth_status(auth_request("/open/", "one", "onePassword", Version, Host), Config,
+ [{statuscode, 200}]),
-essl_block_disturbing_blocker_dies(doc) ->
- ["using new of configure new SSL"];
-essl_block_disturbing_blocker_dies(suite) ->
- [];
-essl_block_disturbing_blocker_dies(Config) when is_list(Config) ->
- ssl_block_disturbing_blocker_dies(essl, Config).
+ %% Test list_auth_users & auth_timeout
-ssl_block_disturbing_blocker_dies(Tag, Config) ->
- httpd_block:disturbing_blocker_dies(Tag,
- ?SSL_PORT,
- ?config(host, Config),
- ?config(node, Config)),
- ok.
+ ["one"] = list_auth_users(Node, Port),
+ ok = auth_status(auth_request("/open/", "two", "onePassword", Version, Host), Config,
+ [{statuscode, 401}]),
-%%-------------------------------------------------------------------------
+ ["one"] = list_auth_users(Node, Port),
-essl_block_non_disturbing_blocker_dies(doc) ->
- ["using new of configure new SSL"];
-essl_block_non_disturbing_blocker_dies(suite) ->
- [];
-essl_block_non_disturbing_blocker_dies(Config) when is_list(Config) ->
- ssl_block_non_disturbing_blocker_dies(essl, Config).
-
-ssl_block_non_disturbing_blocker_dies(Tag, Config) ->
- httpd_block:non_disturbing_blocker_dies(Tag,
- ?SSL_PORT,
- ?config(host, Config),
- ?config(node, Config)),
- ok.
+
+ ["one"] = list_auth_users(Node, Port, OpenDir),
+
+ ok = auth_status(auth_request("/open/", "two", "twoPassword", Version, Host), Config,
+ [{statuscode, 401}]),
-%%-------------------------------------------------------------------------
+ ["one"] = list_auth_users(Node, Port),
+
+ ["one"] = list_auth_users(Node, Port, OpenDir),
-essl_restart_no_block(doc) ->
- ["using new of configure new SSL"];
-essl_restart_no_block(suite) ->
- [];
-essl_restart_no_block(Config) when is_list(Config) ->
- ssl_restart_no_block(essl, Config).
+ %% Wait for successful auth to timeout.
+ test_server:sleep(?AUTH_TIMEOUT*1001),
-ssl_restart_no_block(Tag, Config) ->
- httpd_block:restart_no_block(Tag,
- ?SSL_PORT,
- ?config(host, Config),
- ?config(node, Config)),
- ok.
+ [] = list_auth_users(Node, Port),
+ [] = list_auth_users(Node, Port, OpenDir),
-%%-------------------------------------------------------------------------
+ %% "two" is blocked.
+ true = unblock_user(Node, "two", Port, OpenDir),
-essl_restart_disturbing_block(doc) ->
- ["using new of configure new SSL"];
-essl_restart_disturbing_block(suite) ->
- [];
-essl_restart_disturbing_block(Config) when is_list(Config) ->
- ssl_restart_disturbing_block(essl, Config).
-
-ssl_restart_disturbing_block(Tag, Config) ->
- %% <CONDITIONAL-SKIP>
- Condition =
- fun() ->
- case os:type() of
- {unix, linux} ->
- case ?OSCMD("uname -m") of
- "ppc" ->
- case file:read_file_info("/etc/fedora-release") of
- {ok, _} ->
- case ?OSCMD("awk '{print $2}' /etc/fedora-release") of
- "release" ->
- %% Fedora 7 and later
- case ?OSCMD("awk '{print $3}' /etc/fedora-release") of
- "7" ->
- true;
- _ ->
- false
- end;
- _ ->
- false
- end;
- _ ->
- false
- end;
- _ ->
- false
- end;
- _ ->
- false
- end
- end,
- ?NON_PC_TC_MAYBE_SKIP(Config, Condition),
- %% </CONDITIONAL-SKIP>
- httpd_block:restart_disturbing_block(Tag, ?SSL_PORT,
- ?config(host, Config),
- ?config(node, Config)),
- ok.
+ %% Test explicit blocking. Block user 'two'.
+ [] = list_blocked_users(Node,Port,OpenDir),
-%%-------------------------------------------------------------------------
+ true = block_user(Node, "two", Port, OpenDir, 10),
+ ok = auth_status(auth_request("/open/", "two", "twoPassword", Version, Host), Config,
+ [{statuscode, 401}]),
+
+ true = unblock_user(Node, "two", Port, OpenDir).
+
-essl_restart_non_disturbing_block(doc) ->
- ["using new of configure new SSL"];
-essl_restart_non_disturbing_block(suite) ->
- [];
-essl_restart_non_disturbing_block(Config) when is_list(Config) ->
- ssl_restart_non_disturbing_block(essl, Config).
-
-ssl_restart_non_disturbing_block(Tag, Config) ->
- %% <CONDITIONAL-SKIP>
- Condition =
- fun() ->
- case os:type() of
- {unix, linux} ->
- HW = string:strip(os:cmd("uname -m"), right, $\n),
- case HW of
- "ppc" ->
- case inet:gethostname() of
- {ok, "peach"} ->
- true;
- _ ->
- false
- end;
- _ ->
- false
- end;
- _ ->
- false
- end
- end,
- ?NON_PC_TC_MAYBE_SKIP(Config, Condition),
- %% </CONDITIONAL-SKIP>
- httpd_block:restart_non_disturbing_block(Tag,
- ?SSL_PORT,
- ?config(host, Config),
- ?config(node, Config)),
- ok.
+%%--------------------------------------------------------------------
+%% Internal functions -----------------------------------
+%%--------------------------------------------------------------------
+do_max_clients(Config) ->
+ Version = ?config(http_version, Config),
+ Host = ?config(host, Config),
+ Port = ?config(port, Config),
+ Type = ?config(type, Config),
+
+ Request = http_request("GET /index.html ", Version, Host),
+ BlockRequest = http_request("GET /eval?httpd_example:delay(2000) ", Version, Host),
+ {ok, Socket} = inets_test_lib:connect_bin(Type, Host, Port, transport_opts(Type, Config)),
+ inets_test_lib:send(Type, Socket, BlockRequest),
+ ct:sleep(100), %% Avoid possible timing issues
+ ok = httpd_test_lib:verify_request(Type, Host,
+ Port,
+ transport_opts(Type, Config),
+ ?config(node, Config),
+ Request,
+ [{statuscode, 503},
+ {version, Version}]),
+ receive
+ {_, Socket, _Msg} ->
+ ok
+ end,
+ inets_test_lib:close(Type, Socket),
+ ct:sleep(100), %% Avoid possible timing issues
+ ok = httpd_test_lib:verify_request(Type, Host,
+ Port,
+ transport_opts(Type, Config),
+ ?config(node, Config),
+ Request,
+ [{statuscode, 200},
+ {version, Version}]).
+setup_server_dirs(ServerRoot, DocRoot, DataDir) ->
+ CgiDir = filename:join(ServerRoot, "cgi-bin"),
+ AuthDir = filename:join(ServerRoot, "auth"),
+ PicsDir = filename:join(ServerRoot, "icons"),
-%%-------------------------------------------------------------------------
-ip_host(doc) ->
- ["Control that the server accepts/rejects requests with/ without host"];
-ip_host(suite)->
- [];
-ip_host(Config) when is_list(Config) ->
- httpd_1_1:host(ip_comm, ?IP_PORT, ?config(host, Config),
- ?config(node, Config)),
- ok.
-%%-------------------------------------------------------------------------
-ip_chunked(doc) ->
- ["Control that the server accepts chunked requests"];
-ip_chunked(suite) ->
- [];
-ip_chunked(Config) when is_list(Config) ->
- httpd_1_1:chunked(ip_comm, ?IP_PORT, ?config(host, Config),
- ?config(node, Config)),
- ok.
-%%-------------------------------------------------------------------------
-ip_expect(doc) ->
- ["Control that the server handles request with the expect header "
- "field appropiate"];
-ip_expect(suite)->
- [];
-ip_expect(Config) when is_list(Config) ->
- httpd_1_1:expect(ip_comm, ?IP_PORT, ?config(host, Config),
- ?config(node, Config)),
- ok.
-%%-------------------------------------------------------------------------
-ip_range(doc) ->
- ["Control that the server can handle range requests to plain files"];
-ip_range(suite)->
- [];
-ip_range(Config) when is_list(Config) ->
- httpd_1_1:range(ip_comm, ?IP_PORT, ?config(host, Config),
- ?config(node, Config)),
- ok.
-%%-------------------------------------------------------------------------
-ip_if_test(doc) ->
- ["Test that the if - request header fields is handled correclty"];
-ip_if_test(suite) ->
- [];
-ip_if_test(Config) when is_list(Config) ->
- ServerRoot = ?config(server_root, Config),
- DocRoot = filename:join([ServerRoot, "htdocs"]),
- httpd_1_1:if_test(ip_comm, ?IP_PORT, ?config(host, Config),
- ?config(node, Config), DocRoot),
- ok.
-%%-------------------------------------------------------------------------
-ip_http_trace(doc) ->
- ["Test the trace module "];
-ip_http_trace(suite) ->
- [];
-ip_http_trace(Config) when is_list(Config) ->
- httpd_1_1:http_trace(ip_comm, ?IP_PORT, ?config(host, Config),
- ?config(node, Config)),
- ok.
-%%-------------------------------------------------------------------------
-ip_http1_1_head(doc) ->
- ["Test the trace module "];
-ip_http1_1_head(suite)->
- [];
-ip_http1_1_head(Config) when is_list(Config) ->
- httpd_1_1:head(ip_comm, ?IP_PORT, ?config(host, Config),
- ?config(node, Config)),
- ok.
-
-%%-------------------------------------------------------------------------
-ip_get_0_9(doc) ->
- ["Test simple HTTP/0.9 GET"];
-ip_get_0_9(suite)->
- [];
-ip_get_0_9(Config) when is_list(Config) ->
- Host = ?config(host, Config),
- Node = ?config(node, Config),
- ok = httpd_test_lib:verify_request(ip_comm, Host, ?IP_PORT, Node,
- "GET / \r\n\r\n",
- [{statuscode, 200},
- {version, "HTTP/0.9"} ]),
- %% Without space after uri
- ok = httpd_test_lib:verify_request(ip_comm, Host, ?IP_PORT, Node,
- "GET /\r\n\r\n",
- [{statuscode, 200},
- {version, "HTTP/0.9"} ]),
- ok = httpd_test_lib:verify_request(ip_comm, Host, ?IP_PORT, Node,
- "GET / HTTP/0.9\r\n\r\n",
- [{statuscode, 200},
- {version, "HTTP/0.9"}]),
-
- ok.
-%%-------------------------------------------------------------------------
-ip_head_1_0(doc) ->
- ["Test HTTP/1.0 HEAD"];
-ip_head_1_0(suite)->
- [];
-ip_head_1_0(Config) when is_list(Config) ->
- Host = ?config(host, Config),
- Node = ?config(node, Config),
- ok = httpd_test_lib:verify_request(ip_comm, Host, ?IP_PORT, Node,
- "HEAD / HTTP/1.0\r\n\r\n", [{statuscode, 200},
- {version, "HTTP/1.0"}]),
+ ok = file:make_dir(ServerRoot),
+ ok = file:make_dir(DocRoot),
+ ok = file:make_dir(CgiDir),
+ ok = file:make_dir(AuthDir),
+ ok = file:make_dir(PicsDir),
+
+ DocSrc = filename:join(DataDir, "server_root/htdocs"),
+ AuthSrc = filename:join(DataDir, "server_root/auth"),
+ CgiSrc = filename:join(DataDir, "server_root/cgi-bin"),
+ PicsSrc = filename:join(DataDir, "server_root/icons"),
- ok.
-%%-------------------------------------------------------------------------
-ip_get_1_0(doc) ->
- ["Test HTTP/1.0 GET"];
-ip_get_1_0(suite)->
- [];
-ip_get_1_0(Config) when is_list(Config) ->
- Host = ?config(host, Config),
- Node = ?config(node, Config),
- ok = httpd_test_lib:verify_request(ip_comm, Host, ?IP_PORT, Node,
- "GET / HTTP/1.0\r\n\r\n", [{statuscode, 200},
- {version, "HTTP/1.0"}]),
+ inets_test_lib:copy_dirs(DocSrc, DocRoot),
+ inets_test_lib:copy_dirs(AuthSrc, AuthDir),
+ inets_test_lib:copy_dirs(CgiSrc, CgiDir),
+ inets_test_lib:copy_dirs(PicsSrc, PicsDir),
+
+ Cgi = case test_server:os_type() of
+ {win32, _} ->
+ "cgi_echo.exe";
+ _ ->
+ "cgi_echo"
+ end,
- ok.
-%%-------------------------------------------------------------------------
-ip_post_1_0(doc) ->
- ["Test HTTP/1.0 POST"];
-ip_post_1_0(suite)->
- [];
-ip_post_1_0(Config) when is_list(Config) ->
- Host = ?config(host, Config),
- Node = ?config(node, Config),
- %% Test the post message formatin 1.0! Real post are testes elsewhere
- ok = httpd_test_lib:verify_request(ip_comm, Host, ?IP_PORT, Node,
- "POST / HTTP/1.0\r\n\r\n "
- "Content-Length:6 \r\n\r\nfoobar",
- [{statuscode, 500}, {version, "HTTP/1.0"}]),
+ inets_test_lib:copy_file(Cgi, DataDir, CgiDir),
+ AbsCgi = filename:join([CgiDir, Cgi]),
+ {ok, FileInfo} = file:read_file_info(AbsCgi),
+ ok = file:write_file_info(AbsCgi, FileInfo#file_info{mode = 8#00755}),
- ok.
-%%-------------------------------------------------------------------------
-ip_mod_cgi_chunked_encoding_test(doc) ->
- ["Test the trace module "];
-ip_mod_cgi_chunked_encoding_test(suite)->
- [];
-ip_mod_cgi_chunked_encoding_test(Config) when is_list(Config) ->
- Host = ?config(host, Config),
- Script =
- case test_server:os_type() of
- {win32, _} ->
- "/cgi-bin/printenv.bat";
- _ ->
- "/cgi-bin/printenv.sh"
- end,
- Requests =
- ["GET " ++ Script ++ " HTTP/1.1\r\nHost:"++ Host ++"\r\n\r\n",
- "GET /cgi-bin/erl/httpd_example/newformat HTTP/1.1\r\nHost:"
- ++ Host ++"\r\n\r\n"],
- httpd_1_1:mod_cgi_chunked_encoding_test(ip_comm, ?IP_PORT,
- Host,
- ?config(node, Config),
- Requests),
- ok.
-
-%-------------------------------------------------------------------------
-
-ipv6_hostname_ipcomm() ->
- [{require, ipv6_hosts}].
-ipv6_hostname_ipcomm(X) ->
- SocketType = ip_comm,
- Port = ?IP_PORT,
- ipv6_hostname(SocketType, Port, X).
-
-ipv6_hostname_essl() ->
- [{require, ipv6_hosts}].
-ipv6_hostname_essl(X) ->
- SocketType = essl,
- Port = ?SSL_PORT,
- ipv6_hostname(SocketType, Port, X).
-
-ipv6_hostname(_SocketType, _Port, doc) ->
- ["Test standard ipv6 address"];
-ipv6_hostname(_SocketType, _Port, suite)->
- [];
-ipv6_hostname(SocketType, Port, Config) when is_list(Config) ->
- tsp("ipv6_hostname -> entry with"
- "~n SocketType: ~p"
- "~n Port: ~p"
- "~n Config: ~p", [SocketType, Port, Config]),
- Host = ?config(host, Config),
- URI = "GET HTTP://" ++
- Host ++ ":" ++ integer_to_list(Port) ++ "/ HTTP/1.1\r\n\r\n",
- tsp("ipv6_hostname -> Host: ~p", [Host]),
- httpd_test_lib:verify_request(SocketType, Host, Port, [inet6],
- node(),
- URI,
- [{statuscode, 200}, {version, "HTTP/1.1"}]),
- ok.
-
-%%-------------------------------------------------------------------------
-
-ipv6_address_ipcomm() ->
- [{require, ipv6_hosts}].
-ipv6_address_ipcomm(X) ->
- SocketType = ip_comm,
- Port = ?IP_PORT,
- ipv6_address(SocketType, Port, X).
-
-ipv6_address_essl() ->
- [{require, ipv6_hosts}].
-ipv6_address_essl(X) ->
- SocketType = essl,
- Port = ?SSL_PORT,
- ipv6_address(SocketType, Port, X).
-
-ipv6_address(_SocketType, _Port, doc) ->
- ["Test standard ipv6 address"];
-ipv6_address(_SocketType, _Port, suite)->
- [];
-ipv6_address(SocketType, Port, Config) when is_list(Config) ->
- tsp("ipv6_address -> entry with"
- "~n SocketType: ~p"
- "~n Port: ~p"
- "~n Config: ~p", [SocketType, Port, Config]),
- Host = ?config(host, Config),
- tsp("ipv6_address -> Host: ~p", [Host]),
- URI = "GET HTTP://" ++
- Host ++ ":" ++ integer_to_list(Port) ++ "/ HTTP/1.1\r\n\r\n",
- httpd_test_lib:verify_request(SocketType, Host, Port, [inet6],
- node(),
- URI,
- [{statuscode, 200}, {version, "HTTP/1.1"}]),
- ok.
-
-
-%%--------------------------------------------------------------------
-ticket_5775(doc) ->
- ["Tests that content-length is correct"];
-ticket_5775(suite) ->
- [];
-ticket_5775(Config) ->
- ok=httpd_test_lib:verify_request(ip_comm, ?config(host, Config),
- ?IP_PORT, ?config(node, Config),
- "GET /cgi-bin/erl/httpd_example:get_bin "
- "HTTP/1.0\r\n\r\n",
- [{statuscode, 200},
- {version, "HTTP/1.0"}]),
- ok.
-ticket_5865(doc) ->
- ["Tests that a header without last-modified is handled"];
-ticket_5865(suite) ->
- [];
-ticket_5865(Config) ->
- ?SKIP(as_of_r15_behaviour_of_calendar_has_changed),
- Host = ?config(host,Config),
- ServerRoot = ?config(server_root, Config),
- DocRoot = filename:join([ServerRoot, "htdocs"]),
- File = filename:join([DocRoot,"last_modified.html"]),
-
- Bad_mtime = case test_server:os_type() of
- {win32, _} ->
- {{1600,12,31},{23,59,59}};
- {unix, _} ->
- {{1969,12,31},{23,59,59}}
- end,
+ EnvCGI = filename:join([ServerRoot, "cgi-bin", "printenv.sh"]),
+ {ok, FileInfo1} = file:read_file_info(EnvCGI),
+ ok = file:write_file_info(EnvCGI,
+ FileInfo1#file_info{mode = 8#00755}).
- {ok,FI}=file:read_file_info(File),
+start_apps(Group) when Group == https_basic;
+ Group == https_limit;
+ Group == https_basic_auth;
+ Group == https_auth_api;
+ Group == https_auth_api_dets;
+ Group == https_auth_api_mnesia;
+ Group == http_htaccess;
+ Group == http_security ->
+ inets_test_lib:start_apps([inets, asn1, crypto, public_key, ssl]);
+start_apps(Group) when Group == http_basic;
+ Group == http_limit;
+ Group == http_basic_auth;
+ Group == http_auth_api;
+ Group == http_auth_api_dets;
+ Group == http_auth_api_mnesia;
+ Group == https_htaccess;
+ Group == https_security ->
+ inets_test_lib:start_apps([inets]).
+
+server_start(_, HttpdConfig) ->
+ {ok, Pid} = inets:start(httpd, HttpdConfig),
+ Serv = inets:services_info(),
+ {value, {_, _, Info}} = lists:keysearch(Pid, 2, Serv),
+ {Pid, proplists:get_value(port, Info)}.
+
+init_ssl(Group, Config) ->
+ PrivDir = ?config(priv_dir, Config),
+ CaKey = {_Trusted,_} =
+ erl_make_certs:make_cert([{key, dsa},
+ {subject,
+ [{name, "Public Key"},
+ {?'id-at-name',
+ {printableString, "public_key"}},
+ {?'id-at-pseudonym',
+ {printableString, "pubkey"}},
+ {city, "Stockholm"},
+ {country, "SE"},
+ {org, "erlang"},
+ {org_unit, "testing dep"}
+ ]}
+ ]),
+ ok = erl_make_certs:write_pem(PrivDir, "public_key_cacert", CaKey),
- case file:write_file_info(File,FI#file_info{mtime=Bad_mtime}) of
+ CertK1 = {_Cert1, _} = erl_make_certs:make_cert([{issuer, CaKey}]),
+ CertK2 = {_Cert2,_} = erl_make_certs:make_cert([{issuer, CertK1},
+ {digest, md5},
+ {extensions, false}]),
+ ok = erl_make_certs:write_pem(PrivDir, "public_key_cert", CertK2),
+
+ case start_apps(Group) of
ok ->
- ok = httpd_test_lib:verify_request(ip_comm, Host,
- ?IP_PORT, ?config(node, Config),
- "GET /last_modified.html"
- " HTTP/1.1\r\nHost:"
- ++Host++"\r\n\r\n",
- [{statuscode, 200},
- {no_header,
- "last-modified"}]),
- ok;
- {error, Reason} ->
- Fault =
- io_lib:format("Attempt to change the file info to set the"
- " preconditions of the test case failed ~p~n",
- [Reason]),
- {skip, Fault}
+ init_httpd(Group, [{type, ssl} | Config]);
+ _ ->
+ {skip, "Could not start https apps"}
end.
-ticket_5913(doc) ->
- ["Tests that a header without last-modified is handled"];
-ticket_5913(suite) -> [];
-ticket_5913(Config) ->
- ok = httpd_test_lib:verify_request(ip_comm, ?config(host, Config),
- ?IP_PORT, ?config(node, Config),
- "GET /cgi-bin/erl/httpd_example:get_bin "
- "HTTP/1.0\r\n\r\n",
- [{statuscode, 200},
- {version, "HTTP/1.0"}]),
- ok.
-
-ticket_6003(doc) ->
- ["Tests that a URI with a bad hexadecimal code is handled"];
-ticket_6003(suite) -> [];
-ticket_6003(Config) ->
- ok = httpd_test_lib:verify_request(ip_comm, ?config(host, Config),
- ?IP_PORT, ?config(node, Config),
- "GET http://www.erlang.org/%skalle "
- "HTTP/1.0\r\n\r\n",
- [{statuscode, 400},
- {version, "HTTP/1.0"}]),
- ok.
-
-ticket_7304(doc) ->
- ["Tests missing CR in delimiter"];
-ticket_7304(suite) ->
- [];
-ticket_7304(Config) ->
- ok = httpd_test_lib:verify_request(ip_comm, ?config(host, Config),
- ?IP_PORT, ?config(node, Config),
- "GET / HTTP/1.0\r\n\n",
- [{statuscode, 200},
- {version, "HTTP/1.0"}]),
- ok.
-
-%%--------------------------------------------------------------------
-%% Internal functions
-%%--------------------------------------------------------------------
-dos_hostname(Type, Port, Host, Node, Max) ->
- H1 = {"", 200},
- H2 = {"dummy-host.ericsson.se", 200},
- TooLongHeader = lists:append(lists:duplicate(Max + 1, "a")),
- H3 = {TooLongHeader, 403},
- Hosts = [H1,H2,H3],
- dos_hostname_poll(Type, Host, Port, Node, Hosts).
-
-%% make_ipv6(T) when is_tuple(T) andalso (size(T) =:= 8) ->
-%% make_ipv6(tuple_to_list(T));
-
-%% make_ipv6([_, _, _, _, _, _, _, _] = IPV6) ->
-%% lists:flatten(io_lib:format("~s:~s:~s:~s:~s:~s:~s:~s", IPV6)).
-
-
-%%--------------------------------------------------------------------
-%% Other help functions
-create_config(Config, Access, FileName) ->
+server_config(http_basic, Config) ->
+ basic_conf() ++ server_config(http, Config);
+server_config(https_basic, Config) ->
+ basic_conf() ++ server_config(https, Config);
+server_config(http_limit, Config) ->
+ [{max_clients, 1}] ++ server_config(http, Config);
+server_config(https_limit, Config) ->
+ [{max_clients, 1}] ++ server_config(https, Config);
+server_config(http_basic_auth, Config) ->
ServerRoot = ?config(server_root, Config),
- TcTopDir = ?config(tc_top_dir, Config),
- Port = ?config(port, Config),
- Type = ?config(sock_type, Config),
- Host = ?config(host, Config),
- Mods = io_lib:format("~p", [httpd_mod]),
- Funcs = io_lib:format("~p", [ssl_password_cb]),
- MaxHdrSz = io_lib:format("~p", [256]),
- MaxHdrAct = io_lib:format("~p", [close]),
-
- io:format(user,
- "create_config -> "
- "~n ServerRoot: ~p"
- "~n TcTopDir: ~p"
- "~n Type: ~p"
- "~n Port: ~p"
- "~n Host: ~p"
- "~n", [ServerRoot, TcTopDir, Type, Port, Host]),
-
- SSL =
- if
- (Type =:= ssl) orelse
- (Type =:= essl) ->
- [cline(["SSLCertificateFile ",
- filename:join(ServerRoot, "ssl/ssl_server.pem")]),
- cline(["SSLCertificateKeyFile ",
- filename:join(ServerRoot, "ssl/ssl_server.pem")]),
- cline(["SSLCACertificateFile ",
- filename:join(ServerRoot, "ssl/ssl_server.pem")]),
- cline(["SSLPasswordCallbackModule ", Mods]),
- cline(["SSLPasswordCallbackFunction ", Funcs]),
- cline(["SSLVerifyClient 0"]),
- cline(["SSLVerifyDepth 1"])];
- true ->
- []
- end,
- ModOrder =
- case Access of
- mod_htaccess ->
- "Modules mod_alias mod_htaccess mod_auth "
- "mod_security "
- "mod_responsecontrol mod_trace mod_esi "
- "mod_actions mod_cgi mod_include mod_dir "
- "mod_range mod_get "
- "mod_head mod_log mod_disk_log";
- _ ->
- "Modules mod_alias mod_auth mod_security "
- "mod_responsecontrol mod_trace mod_esi "
- "mod_actions mod_cgi mod_include mod_dir "
- "mod_range mod_get "
- "mod_head mod_log mod_disk_log"
- end,
-
- %% The test suite currently does not handle an explicit BindAddress.
- %% They assume any has been used, that is Addr is always set to undefined!
-
- %% {ok, Hostname} = inet:gethostname(),
- %% {ok, Addr} = inet:getaddr(Hostname, inet6),
- %% AddrStr = make_ipv6(Addr),
- %% BindAddress = lists:flatten(io_lib:format("~s|inet6", [AddrStr])),
-
- BindAddress = "*|inet",
- %% BindAddress = "*",
-
- HttpConfig = [
- cline(["Port ", integer_to_list(Port)]),
- cline(["ServerName ", Host]),
- cline(["SocketType ", atom_to_list(Type)]),
- cline([ModOrder]),
- %% cline(["LogFormat ", "erlang"]),
- cline(["ServerAdmin [email protected]"]),
- cline(["BindAddress ", BindAddress]),
- cline(["ServerRoot ", ServerRoot]),
- cline(["ErrorLog ", TcTopDir,
- "/logs/error_log_", integer_to_list(Port)]),
- cline(["TransferLog ", TcTopDir,
- "/logs/access_log_", integer_to_list(Port)]),
- cline(["SecurityLog ", TcTopDir,
- "/logs/security_log_", integer_to_list(Port)]),
- cline(["ErrorDiskLog ", TcTopDir,
- "/logs/error_disk_log_", integer_to_list(Port)]),
- cline(["ErrorDiskLogSize ", "190000 ", "11"]),
- cline(["TransferDiskLog ", TcTopDir,
- "/logs/access_disk_log_", integer_to_list(Port)]),
- cline(["TransferDiskLogSize ", "200000 ", "10"]),
- cline(["SecurityDiskLog ", TcTopDir,
- "/logs/security_disk_log_", integer_to_list(Port)]),
- cline(["SecurityDiskLogSize ", "210000 ", "9"]),
- cline(["MaxClients 10"]),
- cline(["MaxHeaderSize ", MaxHdrSz]),
- cline(["MaxHeaderAction ", MaxHdrAct]),
- cline(["DocumentRoot ",
- filename:join(ServerRoot, "htdocs")]),
- cline(["DirectoryIndex ", "index.html ", "welcome.html"]),
- cline(["DefaultType ", "text/plain"]),
- SSL,
- mod_alias_config(ServerRoot),
-
- config_directory(filename:join([ServerRoot,"htdocs",
- "open"]),
- "Open Area",
- filename:join(ServerRoot, "auth/passwd"),
- filename:join(ServerRoot, "auth/group"),
- plain,
- "user one Aladdin",
- filename:join(ServerRoot, "security_data")),
- config_directory(filename:join([ServerRoot,"htdocs",
- "secret"]),
- "Secret Area",
- filename:join(ServerRoot, "auth/passwd"),
- filename:join(ServerRoot, "auth/group"),
- plain,
- "group group1 group2",
- filename:join(ServerRoot, "security_data")),
- config_directory(filename:join([ServerRoot,"htdocs",
- "secret",
- "top_secret"]),
- "Top Secret Area",
- filename:join(ServerRoot, "auth/passwd"),
- filename:join(ServerRoot, "auth/group"),
- plain,
- "group group3",
- filename:join(ServerRoot, "security_data")),
-
- config_directory(filename:join([ServerRoot,"htdocs",
- "dets_open"]),
- "Dets Open Area",
- filename:join(ServerRoot, "passwd"),
- filename:join(ServerRoot, "group"),
- dets,
- "user one Aladdin",
- filename:join(ServerRoot, "security_data")),
- config_directory(filename:join([ServerRoot,"htdocs",
- "dets_secret"]),
- "Dets Secret Area",
- filename:join(ServerRoot, "passwd"),
- filename:join(ServerRoot, "group"),
- dets,
- "group group1 group2",
- filename:join(ServerRoot, "security_data")),
- config_directory(filename:join([ServerRoot,"htdocs",
- "dets_secret",
- "top_secret"]),
- "Dets Top Secret Area",
- filename:join(ServerRoot, "passwd"),
- filename:join(ServerRoot, "group"),
- dets,
- "group group3",
- filename:join(ServerRoot, "security_data")),
-
- config_directory(filename:join([ServerRoot,"htdocs",
- "mnesia_open"]),
- "Mnesia Open Area",
- false,
- false,
- mnesia,
- "user one Aladdin",
- filename:join(ServerRoot, "security_data")),
- config_directory(filename:join([ServerRoot,"htdocs",
- "mnesia_secret"]),
- "Mnesia Secret Area",
- false,
- false,
- mnesia,
- "group group1 group2",
- filename:join(ServerRoot, "security_data")),
- config_directory(filename:join(
- [ServerRoot, "htdocs", "mnesia_secret",
- "top_secret"]),
- "Mnesia Top Secret Area",
- false,
- false,
- mnesia,
- "group group3",
- filename:join(ServerRoot, "security_data"))
- ],
- ConfigFile = filename:join([TcTopDir, FileName]),
- {ok, Fd} = file:open(ConfigFile, [write]),
- ok = file:write(Fd, lists:flatten(HttpConfig)),
- ok = file:close(Fd).
-
-config_directory(Dir, AuthName, AuthUserFile, AuthGroupFile, AuthDBType,
- Require, SF) ->
- file:delete(SF),
- [
- cline(["<Directory ", Dir, ">"]),
- cline(["SecurityDataFile ", SF]),
- cline(["SecurityMaxRetries 3"]),
- cline(["SecurityFailExpireTime ", integer_to_list(?FAIL_EXPIRE_TIME)]),
- cline(["SecurityBlockTime 1"]),
- cline(["SecurityAuthTimeout ", integer_to_list(?AUTH_TIMEOUT)]),
- cline(["SecurityCallbackModule ", "httpd_mod"]),
- cline_if_set("AuthUserFile", AuthUserFile),
- cline_if_set("AuthGroupFile", AuthGroupFile),
- cline_if_set("AuthName", AuthName),
- cline_if_set("AuthDBType", AuthDBType),
- cline(["require ", Require]),
- cline(["</Directory>\r\n"])
- ].
+ auth_conf(ServerRoot) ++ server_config(http, Config);
+server_config(https_basic_auth, Config) ->
+ ServerRoot = ?config(server_root, Config),
+ auth_conf(ServerRoot) ++ server_config(https, Config);
+server_config(http_auth_api, Config) ->
+ ServerRoot = ?config(server_root, Config),
+ auth_api_conf(ServerRoot, plain) ++ server_config(http, Config);
+server_config(https_auth_api, Config) ->
+ ServerRoot = ?config(server_root, Config),
+ auth_api_conf(ServerRoot, plain) ++ server_config(https, Config);
+server_config(http_auth_api_dets, Config) ->
+ ServerRoot = ?config(server_root, Config),
+ auth_api_conf(ServerRoot, dets) ++ server_config(http, Config);
+server_config(https_auth_api_dets, Config) ->
+ ServerRoot = ?config(server_root, Config),
+ auth_api_conf(ServerRoot, dets) ++ server_config(https, Config);
+server_config(http_auth_api_mnesia, Config) ->
+ ServerRoot = ?config(server_root, Config),
+ auth_api_conf(ServerRoot, mnesia) ++ server_config(http, Config);
+server_config(https_auth_api_mnesia, Config) ->
+ ServerRoot = ?config(server_root, Config),
+ auth_api_conf(ServerRoot, mnesia) ++ server_config(https, Config);
+server_config(http_htaccess, Config) ->
+ auth_access_conf() ++ server_config(http, Config);
+server_config(https_htaccess, Config) ->
+ auth_access_conf() ++ server_config(https, Config);
+server_config(http_security, Config) ->
+ ServerRoot = ?config(server_root, Config),
+ tl(auth_conf(ServerRoot)) ++ security_conf(ServerRoot) ++ server_config(http, Config);
+server_config(https_security, Config) ->
+ ServerRoot = ?config(server_root, Config),
+ tl(auth_conf(ServerRoot)) ++ security_conf(ServerRoot) ++ server_config(https, Config);
-mod_alias_config(Root) ->
+server_config(http, Config) ->
+ ServerRoot = ?config(server_root, Config),
+ [{port, 0},
+ {server_name,"httpd_test"},
+ {server_root, ServerRoot},
+ {document_root, ?config(doc_root, Config)},
+ {bind_address, any},
+ {ipfamily, inet},
+ {max_header_size, 256},
+ {max_header_action, close},
+ {directory_index, ["index.html", "welcome.html"]},
+ {mime_types, [{"html","text/html"},{"htm","text/html"}, {"shtml","text/html"},
+ {"gif", "image/gif"}]},
+ {alias, {"/icons/", filename:join(ServerRoot,"icons") ++ "/"}},
+ {alias, {"/pics/", filename:join(ServerRoot,"icons") ++ "/"}},
+ {script_alias, {"/cgi-bin/", filename:join(ServerRoot, "cgi-bin") ++ "/"}},
+ {script_alias, {"/htbin/", filename:join(ServerRoot, "cgi-bin") ++ "/"}},
+ {erl_script_alias, {"/cgi-bin/erl", [httpd_example, io]}},
+ {eval_script_alias, {"/eval", [httpd_example, io]}}
+ ];
+
+server_config(https, Config) ->
+ PrivDir = ?config(priv_dir, Config),
+ [{socket_type, {essl,
+ [{cacertfile,
+ filename:join(PrivDir, "public_key_cacert.pem")},
+ {certfile,
+ filename:join(PrivDir, "public_key_cert.pem")},
+ {keyfile,
+ filename:join(PrivDir, "public_key_cert_key.pem")}
+ ]}}] ++ server_config(http, Config).
+
+init_httpd(Group, Config0) ->
+ Config1 = proplists:delete(port, Config0),
+ Config = proplists:delete(server_pid, Config1),
+ {Pid, Port} = server_start(Group, server_config(Group, Config)),
+ [{server_pid, Pid}, {port, Port} | Config].
+
+http_request(Request, "HTTP/1.1" = Version, Host, {Headers, Body}) ->
+ Request ++ Version ++ "\r\nhost:" ++ Host ++ "\r\n" ++ Headers ++ "\r\n" ++ Body;
+http_request(Request, Version, _, {Headers, Body}) ->
+ Request ++ Version ++ "\r\n" ++ Headers ++ "\r\n" ++ Body.
+
+http_request(Request, "HTTP/1.1" = Version, Host) ->
+ Request ++ Version ++ "\r\nhost:" ++ Host ++ "\r\n\r\n";
+http_request(Request, Version, _) ->
+ Request ++ Version ++ "\r\n\r\n".
+
+auth_request(Path, User, Passwd, "HTTP/1.1" = Version, Host) ->
+ "GET " ++ Path ++ " " ++ Version ++ "\r\nhost:" ++ Host ++
+ "\r\nAuthorization: Basic " ++
+ base64:encode_to_string(User++":"++Passwd) ++
+ "\r\n\r\n";
+auth_request(Path, User, Passwd, Version, _Host) ->
+ "GET " ++ Path ++ " " ++ Version ++
+ "\r\nAuthorization: Basic " ++
+ base64:encode_to_string(User++":"++Passwd) ++
+ "\r\n\r\n".
+
+http_request_missing_CR(Request, "HTTP/1.1" = Version, Host) ->
+ Request ++ Version ++ "\r\nhost:" ++ Host ++ "\r\n\r\n\n";
+http_request_missing_CR(Request, Version, _) ->
+ Request ++ Version ++ "\r\n\n".
+
+head_status("HTTP/0.9") ->
+ 501; %% Not implemented in HTTP/0.9
+head_status(_) ->
+ 200.
+
+basic_conf() ->
+ [{modules, [mod_alias, mod_range, mod_responsecontrol,
+ mod_trace, mod_esi, mod_cgi, mod_dir, mod_get, mod_head]}].
+
+auth_access_conf() ->
+ [{modules, [mod_alias, mod_htaccess, mod_dir, mod_get, mod_head]},
+ {access_files, [".htaccess"]}].
+
+auth_conf(Root) ->
+ [{modules, [mod_alias, mod_auth, mod_dir, mod_get, mod_head]},
+ {directory, {filename:join(Root, "htdocs/open"),
+ [{auth_type, plain},
+ {auth_name, "Open Area"},
+ {auth_user_file, filename:join(Root, "auth/passwd")},
+ {auth_group_file, filename:join(Root, "auth/group")},
+ {require_user, ["one", "Aladdin"]}]}},
+ {directory, {filename:join(Root, "htdocs/secret"),
+ [{auth_type, plain},
+ {auth_name, "Secret Area"},
+ {auth_user_file, filename:join(Root, "auth/passwd")},
+ {auth_group_file, filename:join(Root, "auth/group")},
+ {require_group, ["group1", "group2"]}]}},
+ {directory, {filename:join(Root, "htdocs/secret/top_secret"),
+ [{auth_type, plain},
+ {auth_name, "Top Secret Area"},
+ {auth_user_file, filename:join(Root, "auth/passwd")},
+ {auth_group_file, filename:join(Root, "auth/group")},
+ {require_group, ["group3"]}]}}].
+
+auth_api_conf(Root, plain) ->
+ [{modules, [mod_alias, mod_auth, mod_dir, mod_get, mod_head]},
+ {directory, {filename:join(Root, "htdocs/open"),
+ [{auth_type, plain},
+ {auth_name, "Open Area"},
+ {auth_user_file, filename:join(Root, "auth/passwd")},
+ {auth_group_file, filename:join(Root, "auth/group")},
+ {require_user, ["one", "Aladdin"]}]}},
+ {directory, {filename:join(Root, "htdocs/secret"),
+ [{auth_type, plain},
+ {auth_name, "Secret Area"},
+ {auth_user_file, filename:join(Root, "auth/passwd")},
+ {auth_group_file, filename:join(Root, "auth/group")},
+ {require_group, ["group1", "group2"]}]}},
+ {directory, {filename:join(Root, "htdocs/secret/top_secret"),
+ [{auth_type, plain},
+ {auth_name, "Top Secret Area"},
+ {auth_user_file, filename:join(Root, "auth/passwd")},
+ {auth_group_file, filename:join(Root, "auth/group")},
+ {require_group, ["group3"]}]}}];
+
+auth_api_conf(Root, dets) ->
[
- cline(["Alias /icons/ ", filename:join(Root,"icons"), "/"]),
- cline(["Alias /pics/ ", filename:join(Root, "icons"), "/"]),
- cline(["ScriptAlias /cgi-bin/ ", filename:join(Root, "cgi-bin"), "/"]),
- cline(["ScriptAlias /htbin/ ", filename:join(Root, "cgi-bin"), "/"]),
- cline(["ErlScriptAlias /cgi-bin/erl httpd_example io"]),
- cline(["EvalScriptAlias /eval httpd_example io"])
+ {modules, [mod_alias, mod_auth, mod_dir, mod_get, mod_head]},
+ {directory, {filename:join(Root, "htdocs/dets_open"),
+ [{auth_type, dets},
+ {auth_name, "Dets Open Area"},
+ {auth_user_file, filename:join(Root, "passwd")},
+ {auth_group_file, filename:join(Root, "group")},
+ {require_user, ["one", "Aladdin"]}]}},
+ {directory, {filename:join(Root, "htdocs/dets_secret"),
+ [{auth_type, dets},
+ {auth_name, "Dests Secret Area"},
+ {auth_user_file, filename:join(Root, "passwd")},
+ {auth_group_file, filename:join(Root, "group")},
+ {require_group, ["group1", "group2"]}]}},
+ {directory, {filename:join(Root, "htdocs/dets_secret/top_secret"),
+ [{auth_type, dets},
+ {auth_name, "Dets Top Secret Area"},
+ {auth_user_file, filename:join(Root, "passwd")},
+ {auth_group_file, filename:join(Root, "group")},
+ {require_group, ["group3"]}]}}
+ ];
+
+auth_api_conf(Root, mnesia) ->
+ [{modules, [mod_alias, mod_auth, mod_dir, mod_get, mod_head]},
+ {directory, {filename:join(Root, "htdocs/mnesia_open"),
+ [{auth_type, mnesia},
+ {auth_name, "Mnesia Open Area"},
+ {require_user, ["one", "Aladdin"]}]}},
+ {directory, {filename:join(Root, "htdocs/mnesia_secret"),
+ [{auth_type, mnesia},
+ {auth_name, "Mnesia Secret Area"},
+ {require_group, ["group1", "group2"]}]}},
+ {directory, {filename:join(Root, "htdocs/mnesia_secret/top_secret"),
+ [{auth_type, mnesia},
+ {auth_name, "Mnesia Top Secret Area"},
+ {require_group, ["group3"]}]}}].
+
+security_conf(Root) ->
+ SecFile = filename:join(Root, "security_data"),
+ Open = filename:join(Root, "htdocs/open"),
+ Secret = filename:join(Root, "htdocs/secret"),
+ TopSecret = filename:join(Root, "htdocs/secret/top_secret"),
+
+ [{modules, [mod_alias, mod_auth, mod_security, mod_dir, mod_get, mod_head]},
+ {security_directory, {Open,
+ [{auth_name, "Open Area"},
+ {auth_user_file, filename:join(Root, "auth/passwd")},
+ {auth_group_file, filename:join(Root, "auth/group")},
+ {require_user, ["one", "Aladdin"]} |
+ mod_security_conf(SecFile, Open)]}},
+ {security_directory, {Secret,
+ [{auth_name, "Secret Area"},
+ {auth_user_file, filename:join(Root, "auth/passwd")},
+ {auth_group_file, filename:join(Root, "auth/group")},
+ {require_group, ["group1", "group2"]} |
+ mod_security_conf(SecFile, Secret)]}},
+ {security_directory, {TopSecret,
+ [{auth_name, "Top Secret Area"},
+ {auth_user_file, filename:join(Root, "auth/passwd")},
+ {auth_group_file, filename:join(Root, "auth/group")},
+ {require_group, ["group3"]} |
+ mod_security_conf(SecFile, TopSecret)]}}].
+
+mod_security_conf(SecFile, Dir) ->
+ [{data_file, SecFile},
+ {max_retries, 3},
+ {fail_expire_time, ?FAIL_EXPIRE_TIME},
+ {block_time, 1},
+ {auth_timeout, ?AUTH_TIMEOUT},
+ {callback_module, ?MODULE},
+ {path, Dir} %% This is should not be needed, but is atm, awful design!
].
+
-cline(List) ->
- lists:flatten([List, "\r\n"]).
-
-cline_if_set(_, false) ->
- [];
-cline_if_set(Name, Var) when is_list(Var) ->
- cline([Name, " ", Var]);
-cline_if_set(Name, Var) when is_atom(Var) ->
- cline([Name, " ", atom_to_list(Var)]).
-
-getaddr() ->
- {ok,HostName} = inet:gethostname(),
- {ok,{A1,A2,A3,A4}} = inet:getaddr(HostName,inet),
- lists:flatten(io_lib:format("~p.~p.~p.~p",[A1,A2,A3,A4])).
+http_status(Request, Config, Expected) ->
+ Version = ?config(http_version, Config),
+ Host = ?config(host, Config),
+ Type = ?config(type, Config),
+ httpd_test_lib:verify_request(?config(type, Config), Host,
+ ?config(port, Config),
+ transport_opts(Type, Config),
+ ?config(node, Config),
+ http_request(Request, Version, Host),
+ Expected ++ [{version, Version}]).
+
+http_status(Request, HeadersAndBody, Config, Expected) ->
+ Version = ?config(http_version, Config),
+ Host = ?config(host, Config),
+ Type = ?config(type, Config),
+ httpd_test_lib:verify_request(?config(type, Config), Host,
+ ?config(port, Config),
+ transport_opts(Type, Config),
+ ?config(node, Config),
+ http_request(Request, Version, Host, HeadersAndBody),
+ Expected ++ [{version, Version}]).
+
+auth_status(AuthRequest, Config, Expected) ->
+ Version = ?config(http_version, Config),
+ Host = ?config(host, Config),
+ Type = ?config(type, Config),
+ httpd_test_lib:verify_request(?config(type, Config), Host,
+ ?config(port, Config),
+ transport_opts(Type, Config),
+ ?config(node, Config),
+ AuthRequest,
+ Expected ++ [{version, Version}]).
+
+basic_auth_requiered(Config) ->
+ ok = http_status("GET /open/ ", Config, [{statuscode, 401},
+ {header, "WWW-Authenticate"}]),
+ ok = http_status("GET /secret/ ", Config, [{statuscode, 401},
+ {header, "WWW-Authenticate"}]),
+ ok = http_status("GET /secret/top_secret/ ", Config, [{statuscode, 401},
+ {header, "WWW-Authenticate"}]).
start_mnesia(Node) ->
case rpc:call(Node, ?MODULE, cleanup_mnesia, []) of
ok ->
ok;
Other ->
- tsf({failed_to_cleanup_mnesia, Other})
+ ct:fail({failed_to_cleanup_mnesia, Other})
end,
case rpc:call(Node, ?MODULE, setup_mnesia, []) of
{atomic, ok} ->
ok;
Other2 ->
- tsf({failed_to_setup_mnesia, Other2})
+ ct:fail({failed_to_setup_mnesia, Other2})
end,
ok.
@@ -2260,6 +1537,28 @@ cleanup_mnesia() ->
mnesia:delete_schema([node()]),
ok.
+transport_opts(ssl, Config) ->
+ PrivDir = ?config(priv_dir, Config),
+ [{cacertfile, filename:join(PrivDir, "public_key_cacert.pem")}];
+transport_opts(_, _) ->
+ [].
+
+
+%%% mod_range
+create_range_data(Path) ->
+ PathAndFileName=filename:join([Path,"range.txt"]),
+ case file:read_file(PathAndFileName) of
+ {error, enoent} ->
+ file:write_file(PathAndFileName,list_to_binary(["12345678901234567890",
+ "12345678901234567890",
+ "12345678901234567890",
+ "12345678901234567890",
+ "12345678901234567890"]));
+ _ ->
+ ok
+ end.
+
+%%% mod_htaccess
create_htaccess_data(Path, IpAddress)->
create_htaccess_dirs(Path),
@@ -2356,99 +1655,140 @@ remove_htaccess(Path)->
file:delete(filename:join([Path,"ht","groups.file"])),
remove_htaccess_dirs(Path).
+dos_hostname(Type, Port, Host, Node, Version, Max) ->
+ TooLongHeader = lists:append(lists:duplicate(Max + 1, "a")),
+
+ ok = httpd_test_lib:verify_request(Type, Host, Port, Node,
+ dos_hostname_request("", Version),
+ [{statuscode, 200},
+ {version, Version}]),
+
+ ok = httpd_test_lib:verify_request(Type, Host, Port, Node,
+ dos_hostname_request("dummy-host.ericsson.se", Version),
+ [{statuscode, 200},
+ {version, Version}]),
+
+ ok = httpd_test_lib:verify_request(Type, Host, Port, Node,
+ dos_hostname_request(TooLongHeader, Version),
+ [{statuscode, dos_code(Version)},
+ {version, Version}]).
+dos_hostname_request(Host, Version) ->
+ dos_http_request("GET / ", Version, Host).
+
+dos_http_request(Request, "HTTP/1.1" = Version, Host) ->
+ http_request(Request, Version, Host);
+dos_http_request(Request, Version, Host) ->
+ Request ++ Version ++ "\r\nhost:" ++ Host ++ "\r\n\r\n".
+
+dos_code("HTTP/1.0") ->
+ 403; %% 413 not defined in HTTP/1.0
+dos_code(_) ->
+ 413.
+
+update_password(Node, ServerRoot, _Address, Port, AuthPrefix, Dir, Old, New)->
+ Directory = filename:join([ServerRoot, "htdocs", AuthPrefix ++ Dir]),
+ rpc:call(Node, mod_auth, update_password,
+ [undefined, Port, Directory, Old, New, New]).
+
+add_user(Node, Root, Port, AuthPrefix, Dir, User, Password, UserData) ->
+ Addr = undefined,
+ Directory = filename:join([Root, "htdocs", AuthPrefix ++ Dir]),
+ rpc:call(Node, mod_auth, add_user,
+ [User, Password, UserData, Addr, Port, Directory]).
+
+
+delete_user(Node, Root, _Host, Port, AuthPrefix, Dir, User) ->
+ Addr = undefined,
+ Directory = filename:join([Root, "htdocs", AuthPrefix ++ Dir]),
+ rpc:call(Node, mod_auth, delete_user, [User, Addr, Port, Directory]).
+remove_users(Node, ServerRoot, Host, Port, AuthPrefix, Dir) ->
+ %% List users, delete them, and make sure they are gone.
+ case list_users(Node, ServerRoot, Host, Port, AuthPrefix, Dir) of
+ {ok, Users} ->
+ lists:foreach(fun(User) ->
+ delete_user(Node, ServerRoot, Host,
+ Port, AuthPrefix, Dir, User)
+ end,
+ Users),
+ {ok, []} = list_users(Node, ServerRoot, Host, Port, AuthPrefix, Dir);
+ _ ->
+ ok
+ end.
-dos_hostname_poll(Type, Host, Port, Node, Hosts) ->
- [dos_hostname_poll1(Type, Host, Port, Node, Host1, Code)
- || {Host1,Code} <- Hosts].
+list_users(Node, Root, _Host, Port, AuthPrefix, Dir) ->
+ Addr = undefined,
+ Directory = filename:join([Root, "htdocs", AuthPrefix ++ Dir]),
+ rpc:call(Node, mod_auth, list_users, [Addr, Port, Directory]).
+
+remove_groups(Node, ServerRoot, Host, Port, AuthPrefix, Dir) ->
+ {ok, Groups} = list_groups(Node, ServerRoot, Host, Port, AuthPrefix, Dir),
+ lists:foreach(fun(Group) ->
+ delete_group(Node, Group, Port, ServerRoot, AuthPrefix, Dir)
+ end,
+ Groups),
+ {ok, []} = list_groups(Node, ServerRoot, Host, Port, AuthPrefix, Dir).
+
+delete_group(Node, Group, Port, Root, AuthPrefix, Dir) ->
+ Addr = undefined,
+ Directory = filename:join([Root, "htdocs", AuthPrefix ++ Dir]),
+ rpc:call(Node, mod_auth, delete_group, [Group, Addr, Port, Directory]).
+
+list_groups(Node, Root, _, Port, AuthPrefix, Dir) ->
+ Addr = undefined,
+ Directory = filename:join([Root, "htdocs", AuthPrefix ++ Dir]),
+ rpc:call(Node, mod_auth, list_groups, [Addr, Port, Directory]).
+
+add_group_member(Node, Root, Port, AuthPrefix, Dir, User, Group) ->
+ Addr = undefined,
+ Directory = filename:join([Root, "htdocs", AuthPrefix ++ Dir]),
+ rpc:call(Node, mod_auth, add_group_member, [Group, User, Addr, Port,
+ Directory]).
+getaddr() ->
+ {ok,HostName} = inet:gethostname(),
+ {ok,{A1,A2,A3,A4}} = inet:getaddr(HostName,inet),
+ lists:flatten(io_lib:format("~p.~p.~p.~p",[A1,A2,A3,A4])).
-dos_hostname_poll1(Type, Host, Port, Node, Host1, Code) ->
- ok = httpd_test_lib:verify_request(Type, Host, Port, Node,
- dos_hostname_request(Host1),
- [{statuscode, Code},
- {version, "HTTP/1.0"}]).
-
-dos_hostname_request(Host) ->
- "GET / HTTP/1.0\r\n" ++ Host ++ "\r\n\r\n".
+receive_security_event(Event, Node, Port) ->
+ receive
+ Event ->
+ ok;
+ {'EXIT', _, _} ->
+ receive_security_event(Event, Node, Port)
+ after 5000 ->
+ %% Flush the message queue, to see if we got something...
+ inets_test_lib:flush()
+ end.
-get_nof_clients(Mode, Load) ->
- get_nof_clients(test_server:os_type(), Mode, Load).
+list_blocked_users(Node,Port) ->
+ Addr = undefined, % Assumed to be on the same host
+ rpc:call(Node, mod_security, list_blocked_users, [Addr,Port]).
-get_nof_clients(_, ip_comm, light) -> 5;
-get_nof_clients(_, ssl, light) -> 2;
-get_nof_clients(_, ip_comm, medium) -> 10;
-get_nof_clients(_, ssl, medium) -> 4;
-get_nof_clients(_, ip_comm, heavy) -> 20;
-get_nof_clients(_, ssl, heavy) -> 6.
+list_blocked_users(Node,Port,Dir) ->
+ Addr = undefined, % Assumed to be on the same host
+ rpc:call(Node, mod_security, list_blocked_users, [Addr,Port,Dir]).
-%% Make a file 100 bytes long containing 012...9*10
-create_range_data(Path) ->
- PathAndFileName=filename:join([Path,"range.txt"]),
- file:write_file(PathAndFileName,list_to_binary(["12345678901234567890",
- "12345678901234567890",
- "12345678901234567890",
- "12345678901234567890",
- "12345678901234567890"])).
+block_user(Node,User,Port,Dir,Sec) ->
+ Addr = undefined, % Assumed to be on the same host
+ rpc:call(Node, mod_security, block_user, [User, Addr, Port, Dir, Sec]).
-create_ipv6_config(Config, FileName, Ipv6Address) ->
- ServerRoot = ?config(server_root, Config),
- TcTopDir = ?config(tc_top_dir, Config),
- Port = ?config(port, Config),
- SockType = ?config(sock_type, Config),
- Mods = io_lib:format("~p", [httpd_mod]),
- Funcs = io_lib:format("~p", [ssl_password_cb]),
- Host = ?config(ipv6_host, Config),
-
- MaxHdrSz = io_lib:format("~p", [256]),
- MaxHdrAct = io_lib:format("~p", [close]),
-
- Mod_order = "Modules mod_alias mod_auth mod_esi mod_actions mod_cgi"
- " mod_include mod_dir mod_get mod_head"
- " mod_log mod_disk_log mod_trace",
-
- SSL =
- if
- (SockType =:= ssl) orelse
- (SockType =:= essl) ->
- [cline(["SSLCertificateFile ",
- filename:join(ServerRoot, "ssl/ssl_server.pem")]),
- cline(["SSLCertificateKeyFile ",
- filename:join(ServerRoot, "ssl/ssl_server.pem")]),
- cline(["SSLCACertificateFile ",
- filename:join(ServerRoot, "ssl/ssl_server.pem")]),
- cline(["SSLPasswordCallbackModule ", Mods]),
- cline(["SSLPasswordCallbackFunction ", Funcs]),
- cline(["SSLVerifyClient 0"]),
- cline(["SSLVerifyDepth 1"])];
- true ->
- []
- end,
+unblock_user(Node,User,Port,Dir) ->
+ Addr = undefined, % Assumed to be on the same host
+ rpc:call(Node, mod_security, unblock_user, [User, Addr, Port, Dir]).
+
+list_auth_users(Node,Port) ->
+ Addr = undefined, % Assumed to be on the same host
+ rpc:call(Node, mod_security, list_auth_users, [Addr,Port]).
- BindAddress = "[" ++ Ipv6Address ++"]|inet6",
-
- HttpConfig =
- [cline(["BindAddress ", BindAddress]),
- cline(["Port ", integer_to_list(Port)]),
- cline(["ServerName ", Host]),
- cline(["SocketType ", atom_to_list(SockType)]),
- cline([Mod_order]),
- cline(["ServerRoot ", ServerRoot]),
- cline(["DocumentRoot ", filename:join(ServerRoot, "htdocs")]),
- cline(["MaxHeaderSize ",MaxHdrSz]),
- cline(["MaxHeaderAction ",MaxHdrAct]),
- cline(["DirectoryIndex ", "index.html "]),
- cline(["DefaultType ", "text/plain"]),
- SSL],
- ConfigFile = filename:join([TcTopDir,FileName]),
- {ok, Fd} = file:open(ConfigFile, [write]),
- ok = file:write(Fd, lists:flatten(HttpConfig)),
- ok = file:close(Fd).
-
-
-tsp(F) ->
- inets_test_lib:tsp("[~w]" ++ F, [?MODULE]).
-tsp(F, A) ->
- inets_test_lib:tsp("[~w]" ++ F, [?MODULE|A]).
-
-tsf(Reason) ->
- inets_test_lib:tsf(Reason).
+list_auth_users(Node,Port,Dir) ->
+ Addr = undefined, % Assumed to be on the same host
+ rpc:call(Node, mod_security, list_auth_users, [Addr,Port,Dir]).
+
+event(What, Port, Dir, Data) ->
+ Msg = {event, What, Port, Dir, Data},
+ case global:whereis_name(mod_security_test) of
+ undefined ->
+ ok;
+ _Pid ->
+ global:send(mod_security_test, Msg)
+ end.
diff --git a/lib/inets/test/httpd_all.erl b/lib/inets/test/httpd_all.erl
new file mode 100644
index 0000000000..9be02e3fd8
--- /dev/null
+++ b/lib/inets/test/httpd_all.erl
@@ -0,0 +1,240 @@
+alias(Version, Type, Port, Host, Node) ->
+ Opts = [],
+ ok = httpd_test_lib:verify_request(Type, Host, Port, Opts, Node,
+ "GET /pics/icon.sheet.gif "
+ ++ Version ++ "\r\n\r\n",
+ [{statuscode, 200},
+ {header, "Content-Type","image/gif"},
+ {header, "Server"},
+ {header, "Date"},
+ {version, Version}]),
+
+ ok = httpd_test_lib:verify_request(Type, Host, Port, Opts, Node,
+ "GET / " ++ Version ++ "\r\n\r\n",
+ [{statuscode, 200},
+ {header, "Content-Type","text/html"},
+ {header, "Server"},
+ {header, "Date"},
+ {version, Version}]),
+
+ ok = httpd_test_lib:verify_request(Type, Host, Port, Opts, Node,
+ "GET /misc/ " ++ Version ++ "\r\n\r\n",
+ [{statuscode, 200},
+ {header, "Content-Type","text/html"},
+ {header, "Server"},
+ {header, "Date"},
+ {version, Version}]),
+
+ %% Check redirection if trailing slash is missing.
+ ok = httpd_test_lib:verify_request(Type, Host, Port, Opts, Node,
+ "GET /misc "++ Version ++ "\r\n\r\n",
+ [{statuscode, 301},
+ {header, "Location"},
+ {header, "Content-Type","text/html"},
+ {version, Version}]).
+
+
+head(Version, Type, Port, Host, Node) ->
+ ok = httpd_test_lib:verify_request(Type, Host, Port, Node,
+ "HEAD /index.html " ++ Version ++ "\r\n\r\n",
+ [{statuscode, 200},
+ {version, Version}]).
+
+
+get(Version, Type, Port, Host, Node) ->
+ ok = httpd_test_lib:verify_request(Type, Host, Port, Node,
+ "GET /index.html " ++ Version ++ "\r\n\r\n",
+ [{statuscode, 200},
+ {header, "Content-Type", "text/html"},
+ {header, "Date"},
+ {header, "Server"},
+ {version, Version}]),
+
+ ok = httpd_test_lib:verify_request(Type, Host, Port, Node,
+ "GET /fsize.shtml " ++ Version ++ "\r\nHost:"
+ ++ Host ++ "\r\n\r\n",
+ [{statuscode, 200},
+ {header, "Content-Type", "text/html"},
+ {header, "Date"},
+ {header, "Server"}]),
+
+ ok = httpd_test_lib:verify_request(Type, Host, Port, Node,
+ "GET /secret/dummy.html "
+ ++ Version ++ "\r\n\r\n",
+ [{statuscode, 401},
+ {header, "WWW-Authenticate"},
+ {version, Version}]).
+
+esi(Version, Type, Port, Host, Node) ->
+ %% Check "ErlScriptAlias" and "EvalScriptAlias" directives
+ ok = httpd_test_lib:verify_request(Type, Host, Port, Node,
+ "GET /eval?httpd_example:print(\"Hi!\") "
+ ++ Version ++ "\r\n\r\n",
+ [{statuscode, 200},
+ {version, Version}]),
+ ok = httpd_test_lib:verify_request(Type, Host, Port, Node,
+ "GET /eval?not_allowed:print(\"Hi!\") "
+ ++ Version ++ "\r\n\r\n",
+ [{statuscode, 403},
+ {version, Version}]),
+ ok = httpd_test_lib:verify_request(Type, Host, Port, Node,
+ "GET /eval?httpd_example:undef(\"Hi!\") "
+ ++ Version ++ "\r\n\r\n",
+ [{statuscode, 500},
+ {version, Version}]),
+ ok = httpd_test_lib:verify_request(Type, Host, Port, Node,
+ "GET /cgi-bin/erl/httpd_example "
+ ++ Version ++ "\r\n\r\n",
+ [{statuscode, 400},
+ {version, Version}]),
+ ok = httpd_test_lib:verify_request(Type, Host, Port, Node,
+ "GET /cgi-bin/erl/httpd_example:get "
+ ++ Version ++ "\r\n\r\n",
+ [{statuscode, 200},
+ {version, Version}]),
+ ok = httpd_test_lib:verify_request(Type, Host, Port, Node,
+ "GET /cgi-bin/erl/httpd_example:"
+ "get?input=4711"
+ " HTTP/1.0\r\n\r\n",
+ [{statuscode, 200},
+ {version, "HTTP/1.0"}]),
+ ok = httpd_test_lib:verify_request(Type, Host, Port, Node,
+ "GET /cgi-bin/erl/httpd_example:"
+ "post " ++ Version ++ "\r\n\r\n",
+ [{statuscode, 200},
+ {version, Version}]),
+ ok = httpd_test_lib:verify_request(Type, Host, Port, Node,
+ "GET /cgi-bin/erl/not_allowed:post "
+ ++ Version ++ "\r\n\r\n",
+ [{statuscode, 403},
+ {version, Version}]),
+ ok = httpd_test_lib:verify_request(Type, Host, Port, Node,
+ "GET /cgi-bin/erl/httpd_example:undef "
+ ++ Version ++ "\r\n\r\n",
+ [{statuscode, 404},
+ {version, Version}]),
+ ok = httpd_test_lib:verify_request(Type, Host, Port, Node,
+ "GET /cgi-bin/erl/httpd_example/yahoo "
+ ++ Version ++ "\r\n\r\n",
+ [{statuscode, 302},
+ {version, Version}]),
+ %% Check "ErlScriptNoCache" directive (default: false)
+ ok = httpd_test_lib:verify_request(Type, Host, Port, Node,
+ "GET /cgi-bin/erl/httpd_example:get "
+ ++ Version ++ "\r\n\r\n",
+ [{statuscode, 200},
+ {no_header, "cache-control"},
+ {version, "HTTP/1.0"}]).
+
+cgi(Version, Type, Port, Host, Node) ->
+ {Script, Script2, Script3} =
+ case test_server:os_type() of
+ {win32, _} ->
+ {"printenv.bat", "printenv.sh", "cgi_echo.exe"};
+ _ ->
+ {"printenv.sh", "printenv.bat", "cgi_echo"}
+ end,
+
+ %% The length (> 100) is intentional
+ ok = httpd_test_lib:
+ verify_request(Type, Host, Port, Node,
+ "POST /cgi-bin/" ++ Script3 ++
+ Version ++ " \r\n"
+ "Content-Length:100 \r\n\r\n "
+ "ZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZ"
+ "ZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZ"
+ "ZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZ"
+ "ZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZ"
+ "ZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZ"
+ "ZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZ"
+ "ZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZ"
+ "ZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZ"
+ "ZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZ"
+ "ZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZ"
+ "ZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZ"
+ "ZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZ"
+ "ZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZ"
+ "ZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZ"
+ "ZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZ"
+ "ZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZ"
+ "ZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZ"
+ " \r\n\r\n",
+ [{statuscode, 200},
+ {version, Version},
+ {header, "content-type", "text/plain"}]),
+
+ ok = httpd_test_lib:verify_request(Type, Host, Port, Node,
+ "GET /cgi-bin/"++ Script ++
+ " " ++ Version ++ "\r\n\r\n",
+ [{statuscode, 200},
+ {version, Version}]),
+
+ ok = httpd_test_lib:verify_request(Type, Host, Port, Node,
+ "GET /cgi-bin/not_there " ++
+ Version ++ "\r\n\r\n",
+ [{statuscode, 404},{statuscode, 500},
+ {version, Version}]),
+
+ ok = httpd_test_lib:verify_request(Type, Host, Port, Node,
+ "GET /cgi-bin/"++ Script ++
+ "?Nisse:kkk?sss/lll " ++ Version ++ "\r\n\r\n",
+ [{statuscode, 200},
+ {version, Version}]),
+
+ ok = httpd_test_lib:verify_request(Type, Host, Port, Node,
+ "POST /cgi-bin/"++ Script ++
+ " HTTP/1.0\r\n\r\n",
+ [{statuscode, 200},
+ {version, "HTTP/1.0"}]),
+
+ ok = httpd_test_lib:verify_request(Type, Host, Port, Node,
+ "GET /htbin/"++ Script ++
+ " HTTP/1.0\r\n\r\n",
+ [{statuscode, 200},
+ {version, "HTTP/1.0"}]),
+
+ ok = httpd_test_lib:verify_request(Type, Host, Port, Node,
+ "GET /htbin/not_there "
+ "HTTP/1.0\r\n\r\n",
+ [{statuscode, 404},{statuscode, 500},
+ {version, "HTTP/1.0"}]),
+
+ ok = httpd_test_lib:verify_request(Type, Host, Port, Node,
+ "GET /htbin/"++ Script ++
+ "?Nisse:kkk?sss/lll HTTP/1.0\r\n\r\n",
+ [{statuscode, 200},
+ {version, "HTTP/1.0"}]),
+
+ ok = httpd_test_lib:verify_request(Type, Host, Port, Node,
+ "POST /htbin/"++ Script ++
+ " HTTP/1.0\r\n\r\n",
+ [{statuscode, 200},
+ {version, "HTTP/1.0"}]),
+
+ ok = httpd_test_lib:verify_request(Type, Host, Port, Node,
+ "POST /htbin/"++ Script ++
+ " HTTP/1.0\r\n\r\n",
+ [{statuscode, 200},
+ {version, "HTTP/1.0"}]),
+
+ %% Execute an existing, but bad CGI script..
+ ok = httpd_test_lib:verify_request(Type, Host, Port, Node,
+ "POST /htbin/"++ Script2 ++
+ " HTTP/1.0\r\n\r\n",
+ [{statuscode, 404},
+ {version, "HTTP/1.0"}]),
+
+ ok = httpd_test_lib:verify_request(Type, Host, Port, Node,
+ "POST /cgi-bin/"++ Script2 ++
+ " HTTP/1.0\r\n\r\n",
+ [{statuscode, 404},
+ {version, "HTTP/1.0"}]),
+
+ %% Check "ScriptNoCache" directive (default: false)
+ ok = httpd_test_lib:verify_request(Type, Host, Port, Node,
+ "GET /cgi-bin/" ++ Script ++
+ " HTTP/1.0\r\n\r\n",
+ [{statuscode, 200},
+ {no_header, "cache-control"},
+ {version, "HTTP/1.0"}]).
+
diff --git a/lib/inets/test/httpd_basic_SUITE.erl b/lib/inets/test/httpd_basic_SUITE.erl
index 2d06f3e70c..1fcc5f257e 100644
--- a/lib/inets/test/httpd_basic_SUITE.erl
+++ b/lib/inets/test/httpd_basic_SUITE.erl
@@ -1,7 +1,7 @@
%%
%% %CopyrightBegin%
%%
-%% Copyright Ericsson AB 2007-2012. All Rights Reserved.
+%% Copyright Ericsson AB 2007-2014. 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
@@ -32,9 +32,9 @@
suite() -> [{ct_hooks,[ts_install_cth]}].
all() ->
- [
- uri_too_long_414,
+ [uri_too_long_414,
header_too_long_413,
+ entity_too_long,
erl_script_nocache_opt,
script_nocache,
escaped_url_in_error_body,
@@ -63,14 +63,13 @@ end_per_group(_GroupName, Config) ->
%% variable, but should NOT alter/remove any existing entries.
%%--------------------------------------------------------------------
init_per_suite(Config) ->
- tsp("init_per_suite -> entry with"
- "~n Config: ~p", [Config]),
- ok = inets:start(),
+ inets_test_lib:stop_apps([inets]),
+ inets_test_lib:start_apps([inets]),
PrivDir = ?config(priv_dir, Config),
DataDir = ?config(data_dir, Config),
-
+
Dummy =
-"<HTML>
+ "<HTML>
<HEAD>
<TITLE>/index.html</TITLE>
</HEAD>
@@ -78,7 +77,7 @@ init_per_suite(Config) ->
DUMMY
</BODY>
</HTML>",
-
+
DummyFile = filename:join([PrivDir,"dummy.html"]),
CgiDir = filename:join(PrivDir, "cgi-bin"),
ok = file:make_dir(CgiDir),
@@ -115,8 +114,6 @@ DUMMY
%% Description: Cleanup after the whole suite
%%--------------------------------------------------------------------
end_per_suite(_Config) ->
- tsp("end_per_suite -> entry with"
- "~n Config: ~p", [_Config]),
inets:stop(),
ok.
@@ -133,8 +130,6 @@ end_per_suite(_Config) ->
%% variable, but should NOT alter/remove any existing entries.
%%--------------------------------------------------------------------
init_per_testcase(Case, Config) ->
- tsp("init_per_testcase(~w) -> entry with"
- "~n Config: ~p", [Case, Config]),
Config.
@@ -146,22 +141,18 @@ init_per_testcase(Case, Config) ->
%% A list of key/value pairs, holding the test case configuration.
%% Description: Cleanup after each test case
%%--------------------------------------------------------------------
-end_per_testcase(Case, Config) ->
- tsp("end_per_testcase(~w) -> entry with"
- "~n Config: ~p", [Case, Config]),
+end_per_testcase(_Case, Config) ->
Config.
%%-------------------------------------------------------------------------
%% Test cases starts here.
%%-------------------------------------------------------------------------
-uri_too_long_414(doc) ->
- ["Test that too long uri's get 414 HTTP code"];
-uri_too_long_414(suite) ->
- [];
+uri_too_long_414() ->
+ [{doc, "Test that too long uri's get 414 HTTP code"}].
uri_too_long_414(Config) when is_list(Config) ->
HttpdConf = ?config(httpd_conf, Config),
- {ok, Pid} = inets:start(httpd, [{port, 0}, {max_uri_size, 10}
+ {ok, Pid} = inets:start(httpd, [{max_uri_size, 10}
| HttpdConf]),
Info = httpd:info(Pid),
Port = proplists:get_value(port, Info),
@@ -177,17 +168,12 @@ uri_too_long_414(Config) when is_list(Config) ->
{version, "HTTP/0.9"}]),
inets:stop(httpd, Pid).
-
-%%-------------------------------------------------------------------------
%%-------------------------------------------------------------------------
-
-header_too_long_413(doc) ->
- ["Test that too long headers's get 413 HTTP code"];
-header_too_long_413(suite) ->
- [];
+header_too_long_413() ->
+ [{doc,"Test that too long headers's get 413 HTTP code"}].
header_too_long_413(Config) when is_list(Config) ->
HttpdConf = ?config(httpd_conf, Config),
- {ok, Pid} = inets:start(httpd, [{port, 0}, {max_header_size, 10}
+ {ok, Pid} = inets:start(httpd, [{max_header_size, 10}
| HttpdConf]),
Info = httpd:info(Pid),
Port = proplists:get_value(port, Info),
@@ -201,8 +187,72 @@ header_too_long_413(Config) when is_list(Config) ->
inets:stop(httpd, Pid).
%%-------------------------------------------------------------------------
+
+entity_too_long() ->
+ [{doc, "Test that too long versions and method strings are rejected"}].
+entity_too_long(Config) when is_list(Config) ->
+ HttpdConf = ?config(httpd_conf, Config),
+ {ok, Pid} = inets:start(httpd, HttpdConf),
+ Info = httpd:info(Pid),
+ Port = proplists:get_value(port, Info),
+ Address = proplists:get_value(bind_address, Info),
+
+ %% Not so long but wrong
+ ok = httpd_test_lib:verify_request(ip_comm, Address, Port, node(),
+ "GET / " ++
+ lists:duplicate(5, $A) ++ "\r\n\r\n",
+ [{statuscode, 400},
+ %% Server will send lowest version
+ %% as it will not get to the
+ %% client version
+ %% before aborting
+ {version, "HTTP/0.9"}]),
+
+ %% Too long
+ ok = httpd_test_lib:verify_request(ip_comm, Address, Port, node(),
+ "GET / " ++
+ lists:duplicate(100, $A) ++ "\r\n\r\n",
+ [{statuscode, 413},
+ %% Server will send lowest version
+ %% as it will not get to the
+ %% client version
+ %% before aborting
+ {version, "HTTP/0.9"}]),
+ %% Not so long but wrong
+ ok = httpd_test_lib:verify_request(ip_comm, Address, Port, node(),
+ lists:duplicate(5, $A) ++ " / "
+ "HTTP/1.1\r\n\r\n",
+ [{statuscode, 501},
+ %% Server will send lowest version
+ %% as it will not get to the
+ %% client version
+ %% before aborting
+ {version, "HTTP/1.1"}]),
+ %% Too long
+ ok = httpd_test_lib:verify_request(ip_comm, Address, Port, node(),
+ lists:duplicate(100, $A) ++ " / "
+ "HTTP/1.1\r\n\r\n",
+ [{statuscode, 413},
+ %% Server will send lowest version
+ %% as it will not get to the
+ %% client version
+ %% before aborting
+ {version, "HTTP/0.9"}]),
+ inets:stop(httpd, Pid).
+
%%-------------------------------------------------------------------------
+script_nocache() ->
+ [{doc,"Test nocache option for mod_cgi and mod_esi"}].
+script_nocache(Config) when is_list(Config) ->
+ Normal = {no_header, "cache-control"},
+ NoCache = {header, "cache-control", "no-cache"},
+ verify_script_nocache(Config, false, false, Normal, Normal),
+ verify_script_nocache(Config, true, false, NoCache, Normal),
+ verify_script_nocache(Config, false, true, Normal, NoCache),
+ verify_script_nocache(Config, true, true, NoCache, NoCache).
+
+%%-------------------------------------------------------------------------
erl_script_nocache_opt(doc) ->
["Test that too long headers's get 413 HTTP code"];
erl_script_nocache_opt(suite) ->
@@ -224,155 +274,49 @@ erl_script_nocache_opt(Config) when is_list(Config) ->
inets:stop(httpd, Pid).
%%-------------------------------------------------------------------------
-%%-------------------------------------------------------------------------
-script_nocache(doc) ->
- ["Test nocache option for mod_cgi and mod_esi"];
-script_nocache(suite) ->
- [];
-script_nocache(Config) when is_list(Config) ->
- Normal = {no_header, "cache-control"},
- NoCache = {header, "cache-control", "no-cache"},
- verify_script_nocache(Config, false, false, Normal, Normal),
- verify_script_nocache(Config, true, false, NoCache, Normal),
- verify_script_nocache(Config, false, true, Normal, NoCache),
- verify_script_nocache(Config, true, true, NoCache, NoCache),
- ok.
-verify_script_nocache(Config, CgiNoCache, EsiNoCache, CgiOption, EsiOption) ->
- HttpdConf = ?config(httpd_conf, Config),
- CgiScript = ?config(cgi_printenv, Config),
- CgiDir = ?config(cgi_dir, Config),
- {ok, Pid} = inets:start(httpd, [{port, 0},
- {script_alias,
- {"/cgi-bin/", CgiDir ++ "/"}},
- {script_nocache, CgiNoCache},
- {erl_script_alias,
- {"/cgi-bin/erl", [httpd_example,io]}},
- {erl_script_nocache, EsiNoCache}
- | HttpdConf]),
- Info = httpd:info(Pid),
- Port = proplists:get_value(port, Info),
- Address = proplists:get_value(bind_address, Info),
- ok = httpd_test_lib:verify_request(ip_comm, Address, Port, node(),
- "GET /cgi-bin/" ++ CgiScript ++
- " HTTP/1.0\r\n\r\n",
- [{statuscode, 200},
- CgiOption,
- {version, "HTTP/1.0"}]),
- ok = httpd_test_lib:verify_request(ip_comm, Address, Port, node(),
- "GET /cgi-bin/erl/httpd_example:get "
- "HTTP/1.0\r\n\r\n",
- [{statuscode, 200},
- EsiOption,
- {version, "HTTP/1.0"}]),
- inets:stop(httpd, Pid).
-
-
-%%-------------------------------------------------------------------------
%%-------------------------------------------------------------------------
-escaped_url_in_error_body(doc) ->
- ["Test Url-encoding see OTP-8940"];
-escaped_url_in_error_body(suite) ->
- [];
-escaped_url_in_error_body(Config) when is_list(Config) ->
- %% <CONDITIONAL-SKIP>
- %% This skip is due to a problem on windows with long path's
- %% If a path is too long file:open fails with, for example, eio.
- %% Until that problem is fixed, we skip this case...
- Skippable = [win32],
- Condition = fun() -> ?OS_BASED_SKIP(Skippable) end,
- ?NON_PC_TC_MAYBE_SKIP(Config, Condition),
- %% </CONDITIONAL-SKIP>
-
- tsp("escaped_url_in_error_body -> entry"),
+escaped_url_in_error_body() ->
+ [{doc, "Test Url-encoding see OTP-8940"}].
+escaped_url_in_error_body(Config) when is_list(Config) ->
HttpdConf = ?config(httpd_conf, Config),
{ok, Pid} = inets:start(httpd, [{port, 0} | HttpdConf]),
Info = httpd:info(Pid),
Port = proplists:get_value(port, Info),
- _Address = proplists:get_value(bind_address, Info),
-
- %% Request 1
- tss(1000),
- tsp("escaped_url_in_error_body -> request 1"),
URL1 = ?URL_START ++ integer_to_list(Port),
- %% Make sure the server is ok, by making a request for a valid page
- case httpc:request(get, {URL1 ++ "/dummy.html", []},
- [{url_encode, false},
- {version, "HTTP/1.0"}],
- [{full_result, false}]) of
- {ok, {200, _}} ->
- %% Don't care about the the body, just that we get a ok response
- ok;
- {ok, {StatusCode1, Body1}} ->
- tsf({unexpected_ok_1, StatusCode1, Body1})
- end,
-
- %% Request 2
- tss(1000),
- tsp("escaped_url_in_error_body -> request 2"),
- %% Make sure the server is ok, by making a request for a valid page
- case httpc:request(get, {URL1 ++ "/dummy.html", []},
- [{url_encode, true},
- {version, "HTTP/1.0"}],
- [{full_result, false}]) of
- {ok, {200, _}} ->
- %% Don't care about the the body, just that we get a ok response
- ok;
- {ok, {StatusCode2, Body2}} ->
- tsf({unexpected_ok_2, StatusCode2, Body2})
- end,
-
- %% Request 3
- tss(1000),
- tsp("escaped_url_in_error_body -> request 3"),
+
+ %% Sanity check
+ {ok, {200, _}} = httpc:request(get, {URL1 ++ "/dummy.html", []},
+ [{url_encode, false},
+ {version, "HTTP/1.0"}],
+ [{full_result, false}]),
+ {ok, {200, _}} = httpc:request(get, {URL1 ++ "/dummy.html", []},
+ [{url_encode, true},
+ {version, "HTTP/1.0"}],
+ [{full_result, false}]),
+
%% Ask for a non-existing page(1)
Path = "/<b>this_is_bold<b>",
HTMLEncodedPath = http_util:html_encode(Path),
URL2 = URL1 ++ Path,
- case httpc:request(get, {URL2, []},
- [{url_encode, true},
- {version, "HTTP/1.0"}],
- [{full_result, false}]) of
- {ok, {404, Body3}} ->
- case find_URL_path(string:tokens(Body3, " ")) of
- HTMLEncodedPath ->
- ok;
- BadPath3 ->
- tsf({unexpected_path_3, HTMLEncodedPath, BadPath3})
- end;
- {ok, UnexpectedOK3} ->
- tsf({unexpected_ok_3, UnexpectedOK3})
- end,
+ {ok, {404, Body3}} = httpc:request(get, {URL2, []},
+ [{url_encode, true},
+ {version, "HTTP/1.0"}],
+ [{full_result, false}]),
- %% Request 4
- tss(1000),
- tsp("escaped_url_in_error_body -> request 4"),
- %% Ask for a non-existing page(2)
- case httpc:request(get, {URL2, []},
- [{url_encode, false},
- {version, "HTTP/1.0"}],
- [{full_result, false}]) of
- {ok, {404, Body4}} ->
- case find_URL_path(string:tokens(Body4, " ")) of
- HTMLEncodedPath ->
- ok;
- BadPath4 ->
- tsf({unexpected_path_4, HTMLEncodedPath, BadPath4})
- end;
- {ok, UnexpectedOK4} ->
- tsf({unexpected_ok_4, UnexpectedOK4})
- end,
- tss(1000),
- tsp("escaped_url_in_error_body -> stop inets"),
- inets:stop(httpd, Pid),
- tsp("escaped_url_in_error_body -> done"),
- ok.
+ HTMLEncodedPath = find_URL_path(string:tokens(Body3, " ")),
+ {ok, {404, Body4}} = httpc:request(get, {URL2, []},
+ [{url_encode, false},
+ {version, "HTTP/1.0"}],
+ [{full_result, false}]),
+
+ HTMLEncodedPath = find_URL_path(string:tokens(Body4, " ")),
+ inets:stop(httpd, Pid).
%%-------------------------------------------------------------------------
-%%-------------------------------------------------------------------------
keep_alive_timeout(doc) ->
["Test the keep_alive_timeout option"];
@@ -392,7 +336,6 @@ keep_alive_timeout(Config) when is_list(Config) ->
inets:stop(httpd, Pid).
%%-------------------------------------------------------------------------
-%%-------------------------------------------------------------------------
script_timeout(doc) ->
["Test the httpd script_timeout option"];
@@ -422,12 +365,10 @@ verify_script_timeout(Config, ScriptTimeout, StatusCode) ->
{version, "HTTP/1.0"}]),
inets:stop(httpd, Pid).
-
-%%-------------------------------------------------------------------------
%%-------------------------------------------------------------------------
-slowdose(doc) ->
- ["Testing minimum bytes per second option"];
+slowdose() ->
+ [{doc, "Testing minimum bytes per second option"}].
slowdose(Config) when is_list(Config) ->
HttpdConf = ?config(httpd_conf, Config),
{ok, Pid} = inets:start(httpd, [{port, 0}, {minimum_bytes_per_second, 200}|HttpdConf]),
@@ -438,6 +379,40 @@ slowdose(Config) when is_list(Config) ->
after 6000 ->
{error, closed} = gen_tcp:send(Socket, "Hey")
end.
+
+%%-------------------------------------------------------------------------
+%% Internal functions
+%%-------------------------------------------------------------------------
+
+verify_script_nocache(Config, CgiNoCache, EsiNoCache, CgiOption, EsiOption) ->
+ HttpdConf = ?config(httpd_conf, Config),
+ CgiScript = ?config(cgi_printenv, Config),
+ CgiDir = ?config(cgi_dir, Config),
+ {ok, Pid} = inets:start(httpd, [{port, 0},
+ {script_alias,
+ {"/cgi-bin/", CgiDir ++ "/"}},
+ {script_nocache, CgiNoCache},
+ {erl_script_alias,
+ {"/cgi-bin/erl", [httpd_example,io]}},
+ {erl_script_nocache, EsiNoCache}
+ | HttpdConf]),
+ Info = httpd:info(Pid),
+ Port = proplists:get_value(port, Info),
+ Address = proplists:get_value(bind_address, Info),
+ ok = httpd_test_lib:verify_request(ip_comm, Address, Port, node(),
+ "GET /cgi-bin/" ++ CgiScript ++
+ " HTTP/1.0\r\n\r\n",
+ [{statuscode, 200},
+ CgiOption,
+ {version, "HTTP/1.0"}]),
+ ok = httpd_test_lib:verify_request(ip_comm, Address, Port, node(),
+ "GET /cgi-bin/erl/httpd_example:get "
+ "HTTP/1.0\r\n\r\n",
+ [{statuscode, 200},
+ EsiOption,
+ {version, "HTTP/1.0"}]),
+ inets:stop(httpd, Pid).
+
find_URL_path([]) ->
"";
find_URL_path(["URL", URL | _]) ->
@@ -445,21 +420,6 @@ find_URL_path(["URL", URL | _]) ->
find_URL_path([_ | Rest]) ->
find_URL_path(Rest).
-
-tsp(F) ->
- inets_test_lib:tsp(F).
-tsp(F, A) ->
- inets_test_lib:tsp(F, A).
-
-tsf(Reason) ->
- inets_test_lib:tsf(Reason).
-
-tss(Time) ->
- inets_test_lib:tss(Time).
-
-
-
-
skip(Reason) ->
{skip, Reason}.
diff --git a/lib/inets/test/httpd_block.erl b/lib/inets/test/httpd_block.erl
index ac1bf43ff5..9790623b6f 100644
--- a/lib/inets/test/httpd_block.erl
+++ b/lib/inets/test/httpd_block.erl
@@ -1,7 +1,7 @@
%%
%% %CopyrightBegin%
%%
-%% Copyright Ericsson AB 2005-2010. All Rights Reserved.
+%% Copyright Ericsson AB 2005-2014. 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
@@ -19,8 +19,7 @@
%%
-module(httpd_block).
--include("test_server.hrl").
--include("test_server_line.hrl").
+-include_lib("common_test/include/ct.hrl").
%% General testcases bodies called from httpd_SUITE
-export([block_disturbing_idle/4, block_non_disturbing_idle/4,
@@ -88,7 +87,7 @@ block_503(Type, Port, Host, Node) ->
block_disturbing_active(Type, Port, Host, Node) ->
process_flag(trap_exit, true),
Pid = long_poll(Type, Host, Port, Node, 200, 60000),
- test_server:sleep(15000),
+ ct:sleep(15000),
block_server(Node, Host, Port),
await_suite_failed_process_exit(Pid, "poller", 60000,
connection_closed),
@@ -100,7 +99,7 @@ block_disturbing_active(Type, Port, Host, Node) ->
block_non_disturbing_active(Type, Port, Host, Node) ->
process_flag(trap_exit, true),
Poller = long_poll(Type, Host, Port, Node, 200, 60000),
- test_server:sleep(15000),
+ ct:sleep(15000),
ok = block_nd_server(Node, Host, Port),
await_normal_process_exit(Poller, "poller", 60000),
blocked = get_admin_state(Node, Host, Port),
@@ -111,9 +110,8 @@ block_non_disturbing_active(Type, Port, Host, Node) ->
block_disturbing_active_timeout_not_released(Type, Port, Host, Node) ->
process_flag(trap_exit, true),
Poller = long_poll(Type, Host, Port, Node, 200, 60000),
- test_server:sleep(15000),
- Blocker = blocker(Node, Host, Port, 50000),
- await_normal_process_exit(Blocker, "blocker", 50000),
+ ct:sleep(15000),
+ ok = httpd_block(undefined, Port, disturbing, 50000),
await_normal_process_exit(Poller, "poller", 30000),
blocked = get_admin_state(Node, Host, Port),
process_flag(trap_exit, false),
@@ -123,9 +121,8 @@ block_disturbing_active_timeout_not_released(Type, Port, Host, Node) ->
block_disturbing_active_timeout_released(Type, Port, Host, Node) ->
process_flag(trap_exit, true),
Poller = long_poll(Type, Host, Port, Node, 200, 40000),
- test_server:sleep(5000),
- Blocker = blocker(Node, Host, Port, 10000),
- await_normal_process_exit(Blocker, "blocker", 15000),
+ ct:sleep(5000),
+ ok = httpd_block(undefined, Port, disturbing, 10000),
await_suite_failed_process_exit(Poller, "poller", 40000,
connection_closed),
blocked = get_admin_state(Node, Host, Port),
@@ -146,7 +143,7 @@ block_non_disturbing_active_timeout_not_released(Type, Port, Host, Node) ->
block_non_disturbing_active_timeout_released(Type, Port, Host, Node) ->
process_flag(trap_exit, true),
Poller = long_poll(Type, Host, Port, Node, 200, 45000),
- test_server:sleep(5000),
+ ct:sleep(5000),
Blocker = blocker_nd(Node, Host, Port ,10000, {error,timeout}),
await_normal_process_exit(Blocker, "blocker", 15000),
await_normal_process_exit(Poller, "poller", 50000),
@@ -157,9 +154,9 @@ block_non_disturbing_active_timeout_released(Type, Port, Host, Node) ->
disturbing_blocker_dies(Type, Port, Host, Node) ->
process_flag(trap_exit, true),
Poller = long_poll(Type, Host, Port, Node, 200, 60000),
- test_server:sleep(5000),
+ ct:sleep(5000),
Blocker = blocker(Node, Host, Port, 10000),
- test_server:sleep(5000),
+ ct:sleep(5000),
exit(Blocker,simulate_blocker_crash),
await_normal_process_exit(Poller, "poller", 60000),
unblocked = get_admin_state(Node, Host, Port),
@@ -170,9 +167,9 @@ disturbing_blocker_dies(Type, Port, Host, Node) ->
non_disturbing_blocker_dies(Type, Port, Host, Node) ->
process_flag(trap_exit, true),
Poller = long_poll(Type, Host, Port, Node, 200, 60000),
- test_server:sleep(5000),
+ ct:sleep(5000),
Blocker = blocker_nd(Node, Host, Port, 10000, ok),
- test_server:sleep(5000),
+ ct:sleep(5000),
exit(Blocker, simulate_blocker_crash),
await_normal_process_exit(Poller, "poller", 60000),
unblocked = get_admin_state(Node, Host, Port),
@@ -297,9 +294,12 @@ httpd_restart(Addr, Port) ->
make_name(Addr, Port) ->
httpd_util:make_name("httpd", Addr, Port).
-get_admin_state(Node, _Host, Port) ->
- Addr = undefined,
- rpc:call(Node, httpd, get_admin_state, [Addr, Port]).
+get_admin_state(_, _Host, Port) ->
+ Name = make_name(undefined, Port),
+ {status, _, _, StatusInfo} = sys:get_status(whereis(Name)),
+ [_, _,_, _, Prop] = StatusInfo,
+ State = state(Prop),
+ element(6, State).
validate_admin_state(Node, Host, Port, Expect) ->
io:format("try validating server admin state: ~p~n", [Expect]),
@@ -323,15 +323,15 @@ await_normal_process_exit(Pid, Name, Timeout) ->
io_lib:format("expected normal exit, "
"unexpected exit of ~s process: ~p",
[Name, Reason])),
- test_server:fail(Err)
+ ct:fail(Err)
after Timeout ->
- test_server:fail("timeout while waiting for " ++ Name)
+ ct:fail("timeout while waiting for " ++ Name)
end.
await_suite_failed_process_exit(Pid, Name, Timeout, Why) ->
receive
- {'EXIT', Pid, {suite_failed, Why}} ->
+ {'EXIT', Pid, {test_failed, Why}} ->
ok;
{'EXIT', Pid, Reason} ->
Err =
@@ -339,9 +339,9 @@ await_suite_failed_process_exit(Pid, Name, Timeout, Why) ->
io_lib:format("expected connection_closed, "
"unexpected exit of ~s process: ~p",
[Name, Reason])),
- test_server:fail(Err)
+ ct:fail(Err)
after Timeout ->
- test_server:fail("timeout while waiting for " ++ Name)
+ ct:fail("timeout while waiting for " ++ Name)
end.
long_poll(Type, Host, Port, Node, StatusCode, Timeout) ->
@@ -359,10 +359,13 @@ do_long_poll(Type, Host, Port, Node, StatusCode, Timeout) ->
ok ->
exit(normal);
Reason ->
- test_server:fail(Reason)
+ exit({test_failed, Reason})
end.
-
-
-
+state([{data,[{"State", State}]} | _]) ->
+ State;
+state([{data,[{"StateData", State}]} | _]) ->
+ State;
+state([_ | Rest]) ->
+ state(Rest).
diff --git a/lib/inets/test/httpd_mod_SUITE.erl b/lib/inets/test/httpd_mod_SUITE.erl
new file mode 100644
index 0000000000..d23cd22670
--- /dev/null
+++ b/lib/inets/test/httpd_mod_SUITE.erl
@@ -0,0 +1,76 @@
+%%
+%% %CopyrightBegin%
+%%
+%% Copyright Ericsson AB 2013-2013. 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%
+%%
+%%
+
+%%
+%% ct:run("../inets_test", httpd_mod_SUITE).
+-module(httpd_mod_SUITE).
+
+-include_lib("kernel/include/file.hrl").
+-include_lib("common_test/include/ct.hrl").
+-include("inets_test_lib.hrl").
+
+%% Note: This directive should only be used in test suites.
+-compile(export_all).
+
+%%--------------------------------------------------------------------
+%% Common Test interface functions -----------------------------------
+%%--------------------------------------------------------------------
+suite() ->
+ [{ct_hooks,[ts_install_cth]}].
+
+all() ->
+ [
+ {group, http},
+ {group, https}
+ ].
+
+groups() ->
+ [
+ {http, [], all_version_groups()},
+ {https, [], all_version_groups()}
+ {http_1_1, [], []},
+ {http_1_0, [], []},
+ {http_0_9, [], []},
+ {mod_alias, [], []},
+ {mod_actions, [], []},
+ {mod_security, [], []},
+ {mod_auth, [], []},
+ {mod_htaccess, [], []},
+ {mod_cgi, [], []},
+ {mod_esi, [], []},
+ {mod_head, [], []},
+ {configure, [], []}
+ ].
+
+all_version_groups ()->
+ [
+ {group, mod_alias},
+ {group, mod_actions},
+ {group, mod_security},
+ {group, mod_auth},
+ {group, mod_htaccess},
+ {group, mod_cgi},
+ {group, mod_esi},
+ {group, mod_head}
+ ].
+
+%%-------------------------------------------------------------------------
+%% Test cases starts here.
+%%-------------------------------------------------------------------------
diff --git a/lib/inets/test/httpd_test_lib.erl b/lib/inets/test/httpd_test_lib.erl
index 3e82324a30..36a5bb9e71 100644
--- a/lib/inets/test/httpd_test_lib.erl
+++ b/lib/inets/test/httpd_test_lib.erl
@@ -1,7 +1,7 @@
%%
%% %CopyrightBegin%
%%
-%% Copyright Ericsson AB 2001-2013. All Rights Reserved.
+%% Copyright Ericsson AB 2001-2014. 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
@@ -92,16 +92,6 @@ verify_request(SocketType, Host, Port, Node, RequestStr, Options, TimeOut)
verify_request(SocketType, Host, Port, [], Node, RequestStr, Options, TimeOut).
verify_request(SocketType, Host, Port, TranspOpts0, Node, RequestStr, Options, TimeOut) ->
- tsp("verify_request -> entry with"
- "~n SocketType: ~p"
- "~n Host: ~p"
- "~n Port: ~p"
- "~n TranspOpts: ~p"
- "~n Node: ~p"
- "~n Options: ~p"
- "~n TimeOut: ~p",
- [SocketType, Host, Port, TranspOpts0, Node, Options, TimeOut]),
-
%% For now, until we modernize the httpd tests
TranspOpts =
case lists:member(inet6, TranspOpts0) of
@@ -113,10 +103,7 @@ verify_request(SocketType, Host, Port, TranspOpts0, Node, RequestStr, Options, T
try inets_test_lib:connect_bin(SocketType, Host, Port, TranspOpts) of
{ok, Socket} ->
- tsp("verify_request -> connected - now send message"),
- SendRes = inets_test_lib:send(SocketType, Socket, RequestStr),
- tsp("verify_request -> send result: "
- "~n ~p", [SendRes]),
+ ok = inets_test_lib:send(SocketType, Socket, RequestStr),
State = case inets_regexp:match(RequestStr, "printenv") of
nomatch ->
#state{};
@@ -127,37 +114,24 @@ verify_request(SocketType, Host, Port, TranspOpts0, Node, RequestStr, Options, T
case request(State#state{request = RequestStr,
socket = Socket}, TimeOut) of
{error, Reason} ->
- tsp("verify_request -> request failed: "
- "~n Reason: ~p", [Reason]),
{error, Reason};
NewState ->
- tsp("verify_request -> validate reply: "
- "~n NewState: ~p", [NewState]),
ValidateResult =
validate(RequestStr, NewState, Options, Node, Port),
- tsp("verify_request -> validation result: "
- "~n ~p", [ValidateResult]),
inets_test_lib:close(SocketType, Socket),
ValidateResult
end;
ConnectError ->
- tsp("verify_request -> connect error: "
- "~n ~p"
- "~n", [ConnectError]),
- tsf({connect_error, ConnectError,
- [SocketType, Host, Port, TranspOpts]})
+ ct:fail({connect_error, ConnectError,
+ [SocketType, Host, Port, TranspOpts]})
catch
T:E ->
- tsp("verify_request -> connect failed: "
- "~n E: ~p"
- "~n T: ~p"
- "~n", [E, T]),
- tsf({connect_failure,
- [{type, T},
- {error, E},
- {stacktrace, erlang:get_stacktrace()},
- {args, [SocketType, Host, Port, TranspOpts]}]})
+ ct:fail({connect_failure,
+ [{type, T},
+ {error, E},
+ {stacktrace, erlang:get_stacktrace()},
+ {args, [SocketType, Host, Port, TranspOpts]}]})
end.
request(#state{mfa = {Module, Function, Args},
@@ -166,10 +140,6 @@ request(#state{mfa = {Module, Function, Args},
HeadRequest = lists:sublist(RequestStr, 1, 4),
receive
{tcp, Socket, Data} ->
- io:format("~p ~w[~w]request -> received (tcp) data"
- "~n Data: ~p"
- "~n", [self(), ?MODULE, ?LINE, Data]),
- print(tcp, Data, State),
case Module:Function([Data | Args]) of
{ok, Parsed} ->
handle_http_msg(Parsed, State);
@@ -179,22 +149,12 @@ request(#state{mfa = {Module, Function, Args},
request(State#state{mfa = NewMFA}, TimeOut)
end;
{tcp_closed, Socket} when Function =:= whole_body ->
- io:format("~p ~w[~w]request -> "
- "received (tcp) closed when whole_body"
- "~n", [self(), ?MODULE, ?LINE]),
- print(tcp, "closed", State),
State#state{body = hd(Args)};
{tcp_closed, Socket} ->
- io:format("~p ~w[~w]request -> received (tcp) closed"
- "~n", [self(), ?MODULE, ?LINE]),
- test_server:fail(connection_closed);
+ exit({test_failed, connection_closed});
{tcp_error, Socket, Reason} ->
- io:format("~p ~w[~w]request -> received (tcp) error"
- "~n Reason: ~p"
- "~n", [self(), ?MODULE, ?LINE, Reason]),
- test_server:fail({tcp_error, Reason});
+ ct:fail({tcp_error, Reason});
{ssl, Socket, Data} ->
- print(ssl, Data, State),
case Module:Function([Data | Args]) of
{ok, Parsed} ->
handle_http_msg(Parsed, State);
@@ -204,28 +164,19 @@ request(#state{mfa = {Module, Function, Args},
request(State#state{mfa = NewMFA}, TimeOut)
end;
{ssl_closed, Socket} when Function =:= whole_body ->
- print(ssl, "closed", State),
State#state{body = hd(Args)};
{ssl_closed, Socket} ->
- test_server:fail(connection_closed);
+ exit({test_failed, connection_closed});
{ssl_error, Socket, Reason} ->
- test_server:fail({ssl_error, Reason})
+ ct:fail({ssl_error, Reason})
after TimeOut ->
- io:format("~p ~w[~w]request -> timeout"
- "~n", [self(), ?MODULE, ?LINE]),
- test_server:fail(connection_timed_out)
+ ct:pal("~p ~w[~w]request -> timeout"
+ "~n", [self(), ?MODULE, ?LINE]),
+ ct:fail(connection_timed_out)
end.
handle_http_msg({Version, StatusCode, ReasonPharse, Headers, Body},
State = #state{request = RequestStr}) ->
- io:format("~p ~w[~w]handle_http_msg -> entry with"
- "~n Version: ~p"
- "~n StatusCode: ~p"
- "~n ReasonPharse: ~p"
- "~n Headers: ~p"
- "~n Body: ~p"
- "~n", [self(), ?MODULE, ?LINE,
- Version, StatusCode, ReasonPharse, Headers, Body]),
case is_expect(RequestStr) of
true ->
State#state{status_line = {Version,
@@ -277,7 +228,7 @@ handle_http_body(Body, State = #state{headers = Headers,
request(State#state{mfa = MFA}, 5000)
end;
false ->
- test_server:fail(body_too_big)
+ ct:fail(body_too_big)
end
end.
@@ -285,11 +236,6 @@ validate(RequestStr, #state{status_line = {Version, StatusCode, _},
headers = Headers,
body = Body}, Options, N, P) ->
- tsp("validate -> entry with"
- "~n StatusCode: ~p"
- "~n Headers: ~p"
- "~n Body: ~p", [StatusCode, Headers, Body]),
-
check_version(Version, Options),
case lists:keysearch(statuscode, 1, Options) of
{value, _} ->
@@ -311,20 +257,20 @@ check_version(Version, Options) ->
{value, {version, Version}} ->
ok;
{value, {version, Ver}} ->
- tsf({wrong_version, [{got, Version},
- {expected, Ver}]});
+ ct:fail({wrong_version, [{got, Version},
+ {expected, Ver}]});
_ ->
- case Version of
- "HTTP/1.1" ->
- ok;
+ case Version of
+ "HTTP/1.1" ->
+ ok;
_ ->
- tsf({wrong_version, [{got, Version},
- {expected, "HTTP/1.1"}]})
- end
+ ct:fail({wrong_version, [{got, Version},
+ {expected, "HTTP/1.1"}]})
+ end
end.
check_status_code(StatusCode, [], Options) ->
- tsf({wrong_status_code, [{got, StatusCode}, {expected, Options}]});
+ ct:fail({wrong_status_code, [{got, StatusCode}, {expected, Options}]});
check_status_code(StatusCode, Current = [_ | Rest], Options) ->
case lists:keysearch(statuscode, 1, Current) of
{value, {statuscode, StatusCode}} ->
@@ -332,7 +278,7 @@ check_status_code(StatusCode, Current = [_ | Rest], Options) ->
{value, {statuscode, _OtherStatus}} ->
check_status_code(StatusCode, Rest, Options);
false ->
- tsf({wrong_status_code, [{got, StatusCode}, {expected, Options}]})
+ ct:fail({wrong_status_code, [{got, StatusCode}, {expected, Options}]})
end.
do_validate(_, [], _, _) ->
@@ -345,9 +291,9 @@ do_validate(Header, [{header, HeaderField}|Rest], N, P) ->
{value, {LowerHeaderField, _Value}} ->
ok;
false ->
- tsf({missing_header_field, LowerHeaderField, Header});
+ ct:fail({missing_header_field, LowerHeaderField, Header});
_ ->
- tsf({missing_header_field, LowerHeaderField, Header})
+ ct:fail({missing_header_field, LowerHeaderField, Header})
end,
do_validate(Header, Rest, N, P);
do_validate(Header, [{header, HeaderField, Value}|Rest],N,P) ->
@@ -356,15 +302,15 @@ do_validate(Header, [{header, HeaderField, Value}|Rest],N,P) ->
{value, {LowerHeaderField, Value}} ->
ok;
false ->
- tsf({wrong_header_field_value, LowerHeaderField, Header});
+ ct:fail({wrong_header_field_value, LowerHeaderField, Header});
_ ->
- tsf({wrong_header_field_value, LowerHeaderField, Header})
+ ct:fail({wrong_header_field_value, LowerHeaderField, Header})
end,
do_validate(Header, Rest, N, P);
do_validate(Header,[{no_header, HeaderField}|Rest],N,P) ->
case lists:keysearch(HeaderField,1,Header) of
{value,_} ->
- tsf({wrong_header_field_value, HeaderField, Header});
+ ct:fail({wrong_header_field_value, HeaderField, Header});
_ ->
ok
end,
@@ -382,14 +328,14 @@ is_expect(RequestStr) ->
%% OTP-5775, content-length
check_body("GET /cgi-bin/erl/httpd_example:get_bin HTTP/1.0\r\n\r\n", 200, "text/html", Length, _Body) when (Length =/= 274) ->
- tsf(content_length_error);
+ ct:fail(content_length_error);
check_body("GET /cgi-bin/cgi_echo HTTP/1.0\r\n\r\n", 200, "text/plain",
_, Body) ->
case size(Body) of
100 ->
ok;
_ ->
- tsf(content_length_error)
+ ct:fail(content_length_error)
end;
check_body(RequestStr, 200, "text/html", _, Body) ->
@@ -404,16 +350,3 @@ check_body(RequestStr, 200, "text/html", _, Body) ->
check_body(_, _, _, _,_) ->
ok.
-print(Proto, Data, #state{print = true}) ->
- test_server:format("Received ~p: ~p~n", [Proto, Data]);
-print(_, _, #state{print = false}) ->
- ok.
-
-
-tsp(F) ->
- inets_test_lib:tsp(F).
-tsp(F, A) ->
- inets_test_lib:tsp(F, A).
-
-tsf(Reason) ->
- inets_test_lib:tsf(Reason).
diff --git a/lib/inets/test/inets_appup_test.erl b/lib/inets/test/inets_appup_test.erl
index d563b52ae7..a8051c6c85 100644
--- a/lib/inets/test/inets_appup_test.erl
+++ b/lib/inets/test/inets_appup_test.erl
@@ -23,13 +23,7 @@
-module(inets_appup_test).
-compile(export_all).
--compile({no_auto_import,[error/1]}).
-
--include("inets_test_lib.hrl").
-
-
- % t() -> megaco_test_lib:t(?MODULE).
- % t(Case) -> megaco_test_lib:t({?MODULE, Case}).
+-include_lib("common_test/include/ct.hrl").
%% Test server callbacks
@@ -59,16 +53,9 @@ end_per_group(_GroupName, Config) ->
init_per_suite(suite) -> [];
init_per_suite(doc) -> [];
init_per_suite(Config) when is_list(Config) ->
- AppFile = file_name(inets, ".app"),
- AppupFile = file_name(inets, ".appup"),
- [{app_file, AppFile}, {appup_file, AppupFile}|Config].
+ Config.
-file_name(App, Ext) ->
- LibDir = code:lib_dir(App),
- filename:join([LibDir, "ebin", atom_to_list(App) ++ Ext]).
-
-
end_per_suite(suite) -> [];
end_per_suite(doc) -> [];
end_per_suite(Config) when is_list(Config) ->
@@ -77,282 +64,7 @@ end_per_suite(Config) when is_list(Config) ->
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
-appup(suite) ->
- [];
-appup(doc) ->
- "perform a simple check of the appup file";
+appup() ->
+ [{doc, "Perform a simple check of the inets appup file"}].
appup(Config) when is_list(Config) ->
- AppupFile = key1search(appup_file, Config),
- AppFile = key1search(app_file, Config),
- Modules = modules(AppFile),
- check_appup(AppupFile, Modules).
-
-modules(File) ->
- case file:consult(File) of
- {ok, [{application,inets,Info}]} ->
- case lists:keysearch(modules,1,Info) of
- {value, {modules, Modules}} ->
- Modules;
- false ->
- fail({bad_appinfo, Info})
- end;
- Error ->
- fail({bad_appfile, Error})
- end.
-
-
-check_appup(AppupFile, Modules) ->
- case file:consult(AppupFile) of
- {ok, [{V, UpFrom, DownTo}]} ->
-% io:format("~p => "
-% "~n ~p"
-% "~n ~p"
-% "~n", [V, UpFrom, DownTo]),
- check_appup(V, UpFrom, DownTo, Modules);
- Else ->
- fail({bad_appupfile, Else})
- end.
-
-
-check_appup(V, UpFrom, DownTo, Modules) ->
- check_version(V),
- check_depends(up, UpFrom, Modules),
- check_depends(down, DownTo, Modules),
- ok.
-
-
-check_depends(_, [], _) ->
- ok;
-check_depends(UpDown, [Dep|Deps], Modules) ->
- check_depend(UpDown, Dep, Modules),
- check_depends(UpDown, Deps, Modules).
-
-
-check_depend(UpDown, {V, Instructions}, Modules) ->
- check_version(V),
- case check_instructions(UpDown,
- Instructions, Instructions, [], [], Modules) of
- {_Good, []} ->
- ok;
- {_, Bad} ->
- fail({bad_instructions, Bad, UpDown})
- end.
-
-
-check_instructions(_, [], _, Good, Bad, _) ->
- {lists:reverse(Good), lists:reverse(Bad)};
-check_instructions(UpDown, [Instr|Instrs], AllInstr, Good, Bad, Modules) ->
- case (catch check_instruction(UpDown, Instr, AllInstr, Modules)) of
- ok ->
- check_instructions(UpDown, Instrs, AllInstr,
- [Instr|Good], Bad, Modules);
- {error, Reason} ->
- check_instructions(UpDown, Instrs, AllInstr, Good,
- [{Instr, Reason}|Bad], Modules)
- end;
-check_instructions(UpDown, Instructions, _, _, _, _) ->
- fail({bad_instructions, {UpDown, Instructions}}).
-
-%% A new module is added
-check_instruction(up, {add_module, Module}, _, Modules)
- when is_atom(Module) ->
- check_module(Module, Modules);
-
-%% An old module is re-added
-check_instruction(down, {add_module, Module}, _, Modules)
- when is_atom(Module) ->
- case (catch check_module(Module, Modules)) of
- {error, {unknown_module, Module, Modules}} ->
- ok;
- ok ->
- error({existing_readded_module, Module})
- end;
-
-%% Removing a module on upgrade:
-%% - the module has been removed from the app-file.
-%% - check that no module depends on this (removed) module
-check_instruction(up, {remove, {Module, Pre, Post}}, _, Modules)
- when is_atom(Module), is_atom(Pre), is_atom(Post) ->
- case (catch check_module(Module, Modules)) of
- {error, {unknown_module, Module, Modules}} ->
- check_purge(Pre),
- check_purge(Post);
- ok ->
- error({existing_removed_module, Module})
- end;
-
-%% Removing a module on downgrade: the module exist
-%% in the app-file.
-check_instruction(down, {remove, {Module, Pre, Post}}, AllInstr, Modules)
- when is_atom(Module), is_atom(Pre), is_atom(Post) ->
- case (catch check_module(Module, Modules)) of
- ok ->
- check_purge(Pre),
- check_purge(Post),
- check_no_remove_depends(Module, AllInstr);
- {error, {unknown_module, Module, Modules}} ->
- error({nonexisting_removed_module, Module})
- end;
-
-check_instruction(up, {load_module, Module, Pre, Post, Depend}, _, Modules)
- when is_atom(Module), is_atom(Pre), is_atom(Post), is_list(Depend) ->
- check_module(Module, Modules),
- check_module_depend(Module, Depend, Modules),
- check_purge(Pre),
- check_purge(Post);
-
-check_instruction(down, {load_module, Module, Pre, Post, Depend}, _, Modules)
- when is_atom(Module), is_atom(Pre), is_atom(Post), is_list(Depend) ->
- check_module(Module, Modules),
- % Can not be sure that the the dependent module exists in the new appfile
- %%check_module_depend(Module, Depend, Modules),
- check_purge(Pre),
- check_purge(Post);
-
-
-
-check_instruction(up, {delete_module, Module}, _, Modules)
- when is_atom(Module) ->
- case (catch check_module(Module, Modules)) of
- {error, {unknown_module, Module, Modules}} ->
- ok;
- ok ->
- error({existing_module_deleted, Module})
- end;
-
-check_instruction(down, {delete_module, Module}, _, Modules)
- when is_atom(Module) ->
- check_module(Module, Modules);
-
-
-check_instruction(_, {apply, {Module, Function, Args}}, _, _) when is_atom(Module), is_atom(Function), is_list(Args) ->
- ok;
-
-check_instruction(_, {update, Module, supervisor}, _, Modules) when is_atom(Module) ->
- check_module(Module, Modules);
-
-check_instruction(_, {update, Module, {advanced, _}, DepMods}, _, Modules) when is_atom(Module), is_list(DepMods) ->
- check_module(Module, Modules),
- check_module_depend(Module, DepMods, Modules);
-
-check_instruction(_, {update, Module, Change, Pre, Post, Depend}, _, Modules)
- when is_atom(Module), is_atom(Pre), is_atom(Post), is_list(Depend) ->
- check_module(Module, Modules),
- check_module_depend(Module, Depend, Modules),
- check_change(Change),
- check_purge(Pre),
- check_purge(Post);
-
-check_instruction(_, {restart_application, inets}, _AllInstr, _Modules) ->
- ok;
-
-check_instruction(_, {update, Module, {advanced, _}}, _, Modules) ->
- check_module(Module, Modules);
-
-check_instruction(_, Instr, _AllInstr, _Modules) ->
- error({error, {unknown_instruction, Instr}}).
-
-
-%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
-
-check_version(V) when is_list(V) ->
- ok;
-check_version(REBin) when is_binary(REBin) ->
- try
- begin
- RE = binary_to_list(REBin),
- case re:compile(RE) of
- {ok, _} ->
- ok;
- {error, _} ->
- error({bad_version, REBin})
- end
- end
- catch
- _T:_E ->
- error({bad_version, REBin})
- end;
-check_version(V) ->
- error({bad_version, V}).
-
-
-check_module(M, Modules) when is_atom(M) ->
- case lists:member(M,Modules) of
- true ->
- ok;
- false ->
- error({unknown_module, M, Modules})
- end;
-check_module(M, _) ->
- error({bad_module, M}).
-
-
-check_module_depend(M, [], _) when is_atom(M) ->
- ok;
-check_module_depend(M, Deps, Modules) when is_atom(M), is_list(Deps) ->
- case [Dep || Dep <- Deps, lists:member(Dep, Modules) == false] of
- [] ->
- ok;
- Unknown ->
- error({unknown_depend_modules, Unknown})
- end;
-check_module_depend(_M, D, _Modules) ->
- error({bad_depend, D}).
-
-
-check_no_remove_depends(_Module, []) ->
- ok;
-check_no_remove_depends(Module, [Instr|Instrs]) ->
- check_no_remove_depend(Module, Instr),
- check_no_remove_depends(Module, Instrs).
-
-check_no_remove_depend(Module, {load_module, Mod, _Pre, _Post, Depend}) ->
- case lists:member(Module, Depend) of
- true ->
- error({removed_module_in_depend, load_module, Mod, Module});
- false ->
- ok
- end;
-check_no_remove_depend(Module, {update, Mod, _Change, _Pre, _Post, Depend}) ->
- case lists:member(Module, Depend) of
- true ->
- error({removed_module_in_depend, update, Mod, Module});
- false ->
- ok
- end;
-check_no_remove_depend(_, _) ->
- ok.
-
-
-check_change(soft) ->
- ok;
-check_change({advanced, _Something}) ->
- ok;
-check_change(Change) ->
- error({bad_change, Change}).
-
-
-check_purge(soft_purge) ->
- ok;
-check_purge(brutal_purge) ->
- ok;
-check_purge(Purge) ->
- error({bad_purge, Purge}).
-
-
-
-%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
-
-error(Reason) ->
- throw({error, Reason}).
-
-fail(Reason) ->
- exit({suite_failed, Reason}).
-
-key1search(Key, L) ->
- case lists:keysearch(Key, 1, L) of
- undefined ->
- fail({not_found, Key, L});
- {value, {Key, Value}} ->
- Value
- end.
+ ok = ?t:appup_test(inets).
diff --git a/lib/inets/test/inets_sup_SUITE.erl b/lib/inets/test/inets_sup_SUITE.erl
index 0ac940fd3e..60979278fc 100644
--- a/lib/inets/test/inets_sup_SUITE.erl
+++ b/lib/inets/test/inets_sup_SUITE.erl
@@ -1,7 +1,7 @@
%%
%% %CopyrightBegin%
%%
-%% Copyright Ericsson AB 2004-2013. All Rights Reserved.
+%% Copyright Ericsson AB 2004-2014. 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
@@ -21,7 +21,7 @@
-module(inets_sup_SUITE).
-include_lib("common_test/include/ct.hrl").
--include("test_server_line.hrl").
+
%% Note: This directive should only be used in test suites.
-compile(export_all).
@@ -77,75 +77,32 @@ end_per_suite(_) ->
%% variable, but should NOT alter/remove any existing entries.
%%--------------------------------------------------------------------
init_per_testcase(httpd_subtree, Config) ->
- io:format("init_per_testcase(httpd_subtree) -> entry with"
- "~n Config: ~p"
- "~n", [Config]),
Dog = test_server:timetrap(?t:minutes(1)),
NewConfig = lists:keydelete(watchdog, 1, Config),
-
- DataDir = ?config(data_dir, Config),
PrivDir = ?config(priv_dir, Config),
- ServerROOT = filename:join(PrivDir, "server_root"),
- DocROOT = filename:join(PrivDir, "htdocs"),
- ConfDir = filename:join(ServerROOT, "conf"),
-
- io:format("init_per_testcase(httpd_subtree) -> create dir(s)"
- "~n", []),
- file:make_dir(ServerROOT), %% until http_test is cleaned up!
- ok = file:make_dir(DocROOT),
- ok = file:make_dir(ConfDir),
-
- io:format("init_per_testcase(httpd_subtree) -> copy file(s)"
- "~n", []),
- {ok, _} = inets_test_lib:copy_file("simple.conf", DataDir, PrivDir),
- {ok, _} = inets_test_lib:copy_file("mime.types", DataDir, ConfDir),
-
- io:format("init_per_testcase(httpd_subtree) -> write file(s)"
- "~n", []),
- ConfFile = filename:join(PrivDir, "simple.conf"),
- {ok, Fd} = file:open(ConfFile, [append]),
- ok = file:write(Fd, "ServerRoot " ++ ServerROOT ++ "\n"),
- ok = file:write(Fd, "DocumentRoot " ++ DocROOT ++ "\n"),
- ok = file:close(Fd),
-
- %% To make sure application:set_env is not overwritten by any
- %% app-file settings.
- io:format("init_per_testcase(httpd_subtree) -> load inets app"
- "~n", []),
- application:load(inets),
- io:format("init_per_testcase(httpd_subtree) -> update inets env"
- "~n", []),
- ok = application:set_env(inets, services, [{httpd, ConfFile}]),
-
+
+ SimpleConfig = [{port, 0},
+ {server_name,"www.test"},
+ {modules, [mod_get]},
+ {server_root, PrivDir},
+ {document_root, PrivDir},
+ {bind_address, any},
+ {ipfamily, inet}],
try
- io:format("init_per_testcase(httpd_subtree) -> start inets app"
- "~n", []),
- ok = inets:start(),
- io:format("init_per_testcase(httpd_subtree) -> done"
- "~n", []),
- [{watchdog, Dog}, {server_root, ServerROOT}, {doc_root, DocROOT},
- {conf_dir, ConfDir}| NewConfig]
+ inets:start(),
+ inets:start(httpd, SimpleConfig),
+ [{watchdog, Dog} | NewConfig]
catch
_:Reason ->
- io:format("init_per_testcase(httpd_subtree) -> "
- "failed starting inets - cleanup"
- "~n Reason: ~p"
- "~n", [Reason]),
- application:unset_env(inets, services),
- application:unload(inets),
+ inets:stop(),
exit({failed_starting_inets, Reason})
end;
-init_per_testcase(Case, Config) ->
- io:format("init_per_testcase(~p) -> entry with"
- "~n Config: ~p"
- "~n", [Case, Config]),
+init_per_testcase(_Case, Config) ->
Dog = test_server:timetrap(?t:minutes(5)),
NewConfig = lists:keydelete(watchdog, 1, Config),
- Stop = inets:stop(),
- io:format("init_per_testcase(~p) -> Stop: ~p"
- "~n", [Case, Stop]),
+ inets:stop(),
ok = inets:start(),
[{watchdog, Dog} | NewConfig].
@@ -260,10 +217,10 @@ tftpd_worker(suite) ->
[];
tftpd_worker(Config) when is_list(Config) ->
[] = supervisor:which_children(tftp_sup),
- {ok, Pid0} = inets:start(tftpd, [{host, "localhost"},
- {port, inet_port()}]),
- {ok, _Pid1} = inets:start(tftpd, [{host, "localhost"},
- {port, inet_port()}], stand_alone),
+ {ok, Pid0} = inets:start(tftpd, [{host, inets_test_lib:hostname()},
+ {port, 0}]),
+ {ok, _Pid1} = inets:start(tftpd, [{host, inets_test_lib:hostname()},
+ {port, 0}], stand_alone),
[{_,Pid0, worker, _}] = supervisor:which_children(tftp_sup),
inets:stop(tftpd, Pid0),
@@ -280,30 +237,22 @@ httpd_subtree(doc) ->
httpd_subtree(suite) ->
[];
httpd_subtree(Config) when is_list(Config) ->
- io:format("httpd_subtree -> entry with"
- "~n Config: ~p"
- "~n", [Config]),
-
%% Check that we have the httpd top supervisor
- io:format("httpd_subtree -> verify inets~n", []),
{ok, _} = verify_child(inets_sup, httpd_sup, supervisor),
%% Check that we have the httpd instance supervisor
- io:format("httpd_subtree -> verify httpd~n", []),
{ok, Id} = verify_child(httpd_sup, httpd_instance_sup, supervisor),
{httpd_instance_sup, Addr, Port} = Id,
Instance = httpd_util:make_name("httpd_instance_sup", Addr, Port),
%% Check that we have the expected httpd instance children
- io:format("httpd_subtree -> verify httpd instance children "
- "(acceptor, misc and manager)~n", []),
+ {ok, _} = verify_child(Instance, httpd_connection_sup, supervisor),
{ok, _} = verify_child(Instance, httpd_acceptor_sup, supervisor),
{ok, _} = verify_child(Instance, httpd_misc_sup, supervisor),
{ok, _} = verify_child(Instance, httpd_manager, worker),
%% Check that the httpd instance acc supervisor has children
- io:format("httpd_subtree -> verify acc~n", []),
- InstanceAcc = httpd_util:make_name("httpd_acc_sup", Addr, Port),
+ InstanceAcc = httpd_util:make_name("httpd_acceptor_sup", Addr, Port),
case supervisor:which_children(InstanceAcc) of
[_ | _] ->
ok;
@@ -327,15 +276,7 @@ httpd_subtree(Config) when is_list(Config) ->
verify_child(Parent, Child, Type) ->
-%% io:format("verify_child -> entry with"
-%% "~n Parent: ~p"
-%% "~n Child: ~p"
-%% "~n Type: ~p"
-%% "~n", [Parent, Child, Type]),
Children = supervisor:which_children(Parent),
-%% io:format("verify_child -> which children"
-%% "~n Children: ~p"
-%% "~n", [Children]),
verify_child(Children, Parent, Child, Type).
verify_child([], Parent, Child, _Type) ->
@@ -343,21 +284,12 @@ verify_child([], Parent, Child, _Type) ->
verify_child([{Id, _Pid, Type2, Mods}|Children], Parent, Child, Type) ->
case lists:member(Child, Mods) of
true when (Type2 =:= Type) ->
-%% io:format("verify_child -> found with expected type"
-%% "~n Id: ~p"
-%% "~n", [Id]),
{ok, Id};
true when (Type2 =/= Type) ->
-%% io:format("verify_child -> found with unexpected type"
-%% "~n Type2: ~p"
-%% "~n Id: ~p"
-%% "~n", [Type2, Id]),
{error, {wrong_type, Type2, Child, Parent}};
false ->
verify_child(Children, Parent, Child, Type)
end.
-
-
%%-------------------------------------------------------------------------
%% httpc_subtree
@@ -367,47 +299,19 @@ httpc_subtree(doc) ->
httpc_subtree(suite) ->
[];
httpc_subtree(Config) when is_list(Config) ->
- tsp("httpc_subtree -> entry with"
- "~n Config: ~p", [Config]),
-
- tsp("httpc_subtree -> start inets service httpc with profile foo"),
- {ok, _Foo} = inets:start(httpc, [{profile, foo}]),
+ {ok, Foo} = inets:start(httpc, [{profile, foo}]),
- tsp("httpc_subtree -> "
- "start stand-alone inets service httpc with profile bar"),
- {ok, _Bar} = inets:start(httpc, [{profile, bar}], stand_alone),
+ {ok, Bar} = inets:start(httpc, [{profile, bar}], stand_alone),
- tsp("httpc_subtree -> retreive list of httpc instances"),
HttpcChildren = supervisor:which_children(httpc_profile_sup),
- tsp("httpc_subtree -> HttpcChildren: ~n~p", [HttpcChildren]),
-
- tsp("httpc_subtree -> verify httpc stand-alone instances"),
+
{value, {httpc_manager, _, worker, [httpc_manager]}} =
lists:keysearch(httpc_manager, 1, HttpcChildren),
- tsp("httpc_subtree -> verify httpc (named) instances"),
- {value,{{httpc,foo}, Pid, worker, [httpc_manager]}} =
+ {value,{{httpc,foo}, _Pid, worker, [httpc_manager]}} =
lists:keysearch({httpc, foo}, 1, HttpcChildren),
false = lists:keysearch({httpc, bar}, 1, HttpcChildren),
- tsp("httpc_subtree -> stop inets"),
- inets:stop(httpc, Pid),
-
- tsp("httpc_subtree -> done"),
- ok.
-
-inet_port() ->
- {ok, Socket} = gen_tcp:listen(0, [{reuseaddr, true}]),
- {ok, Port} = inet:port(Socket),
- gen_tcp:close(Socket),
- Port.
-
-
-tsp(F) ->
- tsp(F, []).
-tsp(F, A) ->
- test_server:format("~p ~p:" ++ F ++ "~n", [self(), ?MODULE | A]).
-
-tsf(Reason) ->
- test_server:fail(Reason).
+ inets:stop(httpc, Foo),
+ exit(Bar, normal).
diff --git a/lib/inets/test/inets_sup_SUITE_data/mime.types b/lib/inets/test/inets_sup_SUITE_data/mime.types
deleted file mode 100644
index e52d345ff7..0000000000
--- a/lib/inets/test/inets_sup_SUITE_data/mime.types
+++ /dev/null
@@ -1,3 +0,0 @@
-# MIME type Extension
-text/html html htm
-text/plain asc txt
diff --git a/lib/inets/test/inets_sup_SUITE_data/simple.conf b/lib/inets/test/inets_sup_SUITE_data/simple.conf
deleted file mode 100644
index e1429b4a28..0000000000
--- a/lib/inets/test/inets_sup_SUITE_data/simple.conf
+++ /dev/null
@@ -1,6 +0,0 @@
-Port 8888
-ServerName www.test
-SocketType ip_comm
-Modules mod_get
-ServerAdmin [email protected]
-
diff --git a/lib/inets/test/inets_test_lib.erl b/lib/inets/test/inets_test_lib.erl
index 6ccc7b0da1..4be9d9c8b3 100644
--- a/lib/inets/test/inets_test_lib.erl
+++ b/lib/inets/test/inets_test_lib.erl
@@ -287,7 +287,9 @@ print(F, A, Mod, Line) ->
print("", F, A, Mod, Line).
hostname() ->
- from($@, atom_to_list(node())).
+ {ok, Name} = inet:gethostname(),
+ Name.
+
from(H, [H | T]) -> T;
from(H, [_ | T]) -> from(H, T);
from(_, []) -> [].
@@ -545,14 +547,14 @@ tsp(F) ->
tsp(F, []).
tsp(F, A) ->
Timestamp = formated_timestamp(),
- test_server:format("*** ~s ~p ~p " ++ F ++ "~n",
+ ct:pal("*** ~s ~p ~p " ++ F ++ "~n",
[Timestamp, node(), self() | A]).
tsf(Reason) ->
- test_server:fail(Reason).
+ ct:fail(Reason).
tss(Time) ->
- test_server:sleep(Time).
+ ct:sleep(Time).
timestamp() ->
http_util:timestamp().
diff --git a/lib/inets/test/old_httpd_SUITE.erl b/lib/inets/test/old_httpd_SUITE.erl
new file mode 100644
index 0000000000..19c2bc129e
--- /dev/null
+++ b/lib/inets/test/old_httpd_SUITE.erl
@@ -0,0 +1,2485 @@
+%%
+%% %CopyrightBegin%
+%%
+%% Copyright Ericsson AB 2005-2014. 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(old_httpd_SUITE).
+
+-include_lib("test_server/include/test_server.hrl").
+-include("test_server_line.hrl").
+-include("inets_test_lib.hrl").
+
+-include_lib("kernel/include/file.hrl").
+
+%% Test server specific exports
+-export([all/0, suite/0,groups/0,init_per_group/2,end_per_group/2]).
+-export([init_per_testcase/2, end_per_testcase/2,
+ init_per_suite/1, end_per_suite/1]).
+
+%% Core Server tests
+-export([
+ ip_mod_alias/1,
+ ip_mod_actions/1,
+ ip_mod_security/1,
+ ip_mod_auth/1,
+ ip_mod_auth_api/1,
+ ip_mod_auth_mnesia_api/1,
+ ip_mod_htaccess/1,
+ ip_mod_cgi/1,
+ ip_mod_esi/1,
+ ip_mod_get/1,
+ ip_mod_head/1,
+ ip_mod_all/1,
+ ip_load_light/1,
+ ip_load_medium/1,
+ ip_load_heavy/1,
+ ip_dos_hostname/1,
+ ip_time_test/1,
+ ip_block_disturbing_idle/1,
+ ip_block_non_disturbing_idle/1,
+ ip_block_503/1,
+ ip_block_disturbing_active/1,
+ ip_block_non_disturbing_active/1,
+ ip_block_disturbing_active_timeout_not_released/1,
+ ip_block_disturbing_active_timeout_released/1,
+ ip_block_non_disturbing_active_timeout_not_released/1,
+ ip_block_non_disturbing_active_timeout_released/1,
+ ip_block_disturbing_blocker_dies/1,
+ ip_block_non_disturbing_blocker_dies/1,
+ ip_restart_no_block/1,
+ ip_restart_disturbing_block/1,
+ ip_restart_non_disturbing_block/1
+ ]).
+
+-export([
+ essl_mod_alias/1,
+ essl_mod_actions/1,
+ essl_mod_security/1,
+ essl_mod_auth/1,
+ essl_mod_auth_api/1,
+ essl_mod_auth_mnesia_api/1,
+ essl_mod_htaccess/1,
+ essl_mod_cgi/1,
+ essl_mod_esi/1,
+ essl_mod_get/1,
+ essl_mod_head/1,
+ essl_mod_all/1,
+ essl_load_light/1,
+ essl_load_medium/1,
+ essl_load_heavy/1,
+ essl_dos_hostname/1,
+ essl_time_test/1,
+ essl_restart_no_block/1,
+ essl_restart_disturbing_block/1,
+ essl_restart_non_disturbing_block/1,
+ essl_block_disturbing_idle/1,
+ essl_block_non_disturbing_idle/1,
+ essl_block_503/1,
+ essl_block_disturbing_active/1,
+ essl_block_non_disturbing_active/1,
+ essl_block_disturbing_active_timeout_not_released/1,
+ essl_block_disturbing_active_timeout_released/1,
+ essl_block_non_disturbing_active_timeout_not_released/1,
+ essl_block_non_disturbing_active_timeout_released/1,
+ essl_block_disturbing_blocker_dies/1,
+ essl_block_non_disturbing_blocker_dies/1
+ ]).
+
+%%% HTTP 1.1 tests
+-export([ip_host/1, ip_chunked/1, ip_expect/1, ip_range/1,
+ ip_if_test/1, ip_http_trace/1, ip_http1_1_head/1,
+ ip_mod_cgi_chunked_encoding_test/1]).
+
+%%% HTTP 1.0 tests
+-export([ip_head_1_0/1, ip_get_1_0/1, ip_post_1_0/1]).
+
+%%% HTTP 0.9 tests
+-export([ip_get_0_9/1]).
+
+%%% Ticket tests
+-export([ticket_5775/1,ticket_5865/1,ticket_5913/1,ticket_6003/1,
+ ticket_7304/1]).
+
+%%% IPv6 tests
+-export([ipv6_hostname_ipcomm/0, ipv6_hostname_ipcomm/1,
+ ipv6_address_ipcomm/0, ipv6_address_ipcomm/1,
+ ipv6_hostname_essl/0, ipv6_hostname_essl/1,
+ ipv6_address_essl/0, ipv6_address_essl/1]).
+
+%% Help functions
+-export([cleanup_mnesia/0, setup_mnesia/0, setup_mnesia/1]).
+
+-define(IP_PORT, 8898).
+-define(SSL_PORT, 8899).
+-define(MAX_HEADER_SIZE, 256).
+-define(IPV6_LOCAL_HOST, "0:0:0:0:0:0:0:1").
+
+%% Minutes before failed auths timeout.
+-define(FAIL_EXPIRE_TIME,1).
+
+%% Seconds before successful auths timeout.
+-define(AUTH_TIMEOUT,5).
+
+-record(httpd_user, {user_name, password, user_data}).
+-record(httpd_group, {group_name, userlist}).
+
+
+%%--------------------------------------------------------------------
+%% all(Arg) -> [Doc] | [Case] | {skip, Comment}
+%% Arg - doc | suite
+%% Doc - string()
+%% Case - atom()
+%% Name of a test case function.
+%% Comment - string()
+%% Description: Returns documentation/test cases in this test suite
+%% or a skip tuple if the platform is not supported.
+%%--------------------------------------------------------------------
+suite() -> [{ct_hooks,[ts_install_cth]}].
+
+all() ->
+ [
+ {group, ip},
+ {group, ssl},
+ %%{group, http_1_1_ip},
+ %%{group, http_1_0_ip},
+ %%{group, http_0_9_ip},
+ %%{group, ipv6},
+ {group, tickets}
+ ].
+
+groups() ->
+ [
+ {ip, [],
+ [
+ %%ip_mod_alias,
+ ip_mod_actions,
+ %%ip_mod_security,
+ %% ip_mod_auth,
+ %% ip_mod_auth_api,
+ ip_mod_auth_mnesia_api,
+ %%ip_mod_htaccess,
+ %%ip_mod_cgi,
+ %%ip_mod_esi,
+ %%ip_mod_get,
+ %%ip_mod_head,
+ %%ip_mod_all,
+ %% ip_load_light,
+ %% ip_load_medium,
+ %% ip_load_heavy,
+ %%ip_dos_hostname,
+ ip_time_test,
+ %% Only used through load_config
+ %% but we still need these tests
+ %% should be cleaned up and moved to new test suite
+ ip_restart_no_block,
+ ip_restart_disturbing_block,
+ ip_restart_non_disturbing_block,
+ ip_block_disturbing_idle,
+ ip_block_non_disturbing_idle,
+ ip_block_503,
+ ip_block_disturbing_active,
+ ip_block_non_disturbing_active,
+ ip_block_disturbing_active_timeout_not_released,
+ ip_block_disturbing_active_timeout_released,
+ ip_block_non_disturbing_active_timeout_not_released,
+ ip_block_non_disturbing_active_timeout_released,
+ ip_block_disturbing_blocker_dies,
+ ip_block_non_disturbing_blocker_dies
+ ]},
+ {ssl, [], [{group, essl}]},
+ {essl, [],
+ [
+ %%essl_mod_alias,
+ essl_mod_actions,
+ %% essl_mod_security,
+ %% essl_mod_auth,
+ %% essl_mod_auth_api,
+ essl_mod_auth_mnesia_api,
+ %%essl_mod_htaccess,
+ %%essl_mod_cgi,
+ %%essl_mod_esi,
+ %%essl_mod_get,
+ %%essl_mod_head,
+ %% essl_mod_all,
+ %% essl_load_light,
+ %% essl_load_medium,
+ %% essl_load_heavy,
+ %%essl_dos_hostname,
+ essl_time_test
+ %% Replaced by load_config
+ %% essl_restart_no_block,
+ %% essl_restart_disturbing_block,
+ %% essl_restart_non_disturbing_block,
+ %% essl_block_disturbing_idle,
+ %% essl_block_non_disturbing_idle, essl_block_503,
+ %% essl_block_disturbing_active,
+ %% essl_block_non_disturbing_active,
+ %% essl_block_disturbing_active_timeout_not_released,
+ %% essl_block_disturbing_active_timeout_released,
+ %% essl_block_non_disturbing_active_timeout_not_released,
+ %% essl_block_non_disturbing_active_timeout_released,
+ %% essl_block_disturbing_blocker_dies,
+ %% essl_block_non_disturbing_blocker_dies
+ ]},
+ %% {http_1_1_ip, [],
+ %% [
+ %% %%ip_host, ip_chunked, ip_expect,
+ %% %%ip_range,
+ %% %%ip_if_test
+ %% %%ip_http_trace, ip_http1_1_head,
+ %% %%ip_mod_cgi_chunked_encoding_test
+ %% ]},
+ %%{http_1_0_ip, [],
+ %%[ip_head_1_0, ip_get_1_0, ip_post_1_0]},
+ %%{http_0_9_ip, [], [ip_get_0_9]},
+ %% {ipv6, [], [ipv6_hostname_ipcomm, ipv6_address_ipcomm,
+ %% ipv6_hostname_essl, ipv6_address_essl]},
+ {tickets, [],
+ [%%ticket_5775, ticket_5865,
+ ticket_5913%%, ticket_6003,
+ %%ticket_7304
+ ]}].
+
+init_per_group(ipv6 = _GroupName, Config) ->
+ case inets_test_lib:has_ipv6_support() of
+ {ok, _} ->
+ Config;
+ _ ->
+ {skip, "Host does not support IPv6"}
+ end;
+init_per_group(_GroupName, Config) ->
+ Config.
+
+end_per_group(_GroupName, Config) ->
+ Config.
+
+
+%%--------------------------------------------------------------------
+%% Function: init_per_suite(Config) -> Config
+%% Config - [tuple()]
+%% A list of key/value pairs, holding the test case configuration.
+%% Description: Initiation before the whole suite
+%%
+%% Note: This function is free to add any key/value pairs to the Config
+%% variable, but should NOT alter/remove any existing entries.
+%%--------------------------------------------------------------------
+init_per_suite(Config) ->
+ io:format(user, "init_per_suite -> entry with"
+ "~n Config: ~p"
+ "~n", [Config]),
+
+ ?PRINT_SYSTEM_INFO([]),
+
+ PrivDir = ?config(priv_dir, Config),
+ SuiteTopDir = filename:join(PrivDir, ?MODULE),
+ case file:make_dir(SuiteTopDir) of
+ ok ->
+ ok;
+ {error, eexist} ->
+ ok;
+ Error ->
+ throw({error, {failed_creating_suite_top_dir, Error}})
+ end,
+
+ [{has_ipv6_support, inets_test_lib:has_ipv6_support()},
+ {suite_top_dir, SuiteTopDir},
+ {node, node()},
+ {host, inets_test_lib:hostname()},
+ {address, getaddr()} | Config].
+
+
+%%--------------------------------------------------------------------
+%% Function: end_per_suite(Config) -> _
+%% Config - [tuple()]
+%% A list of key/value pairs, holding the test case configuration.
+%% Description: Cleanup after the whole suite
+%%--------------------------------------------------------------------
+
+end_per_suite(_Config) ->
+ %% SuiteTopDir = ?config(suite_top_dir, Config),
+ %% inets_test_lib:del_dirs(SuiteTopDir),
+ ok.
+
+
+%%--------------------------------------------------------------------
+%% Function: init_per_testcase(Case, Config) -> Config
+%% Case - atom()
+%% Name of the test case that is about to be run.
+%% Config - [tuple()]
+%% A list of key/value pairs, holding the test case configuration.
+%%
+%% Description: Initiation before each test case
+%%
+%% Note: This function is free to add any key/value pairs to the Config
+%% variable, but should NOT alter/remove any existing entries.
+%%--------------------------------------------------------------------
+init_per_testcase(Case, Config) ->
+ NewConfig = init_per_testcase2(Case, Config),
+ init_per_testcase3(Case, NewConfig).
+
+
+init_per_testcase2(Case, Config) ->
+
+ %% tsp("init_per_testcase2 -> entry with"
+ %% "~n Config: ~p", [Config]),
+
+ IpNormal = integer_to_list(?IP_PORT) ++ ".conf",
+ IpHtaccess = integer_to_list(?IP_PORT) ++ "htaccess.conf",
+ SslNormal = integer_to_list(?SSL_PORT) ++ ".conf",
+ SslHtaccess = integer_to_list(?SSL_PORT) ++ "htaccess.conf",
+
+ DataDir = ?config(data_dir, Config),
+ SuiteTopDir = ?config(suite_top_dir, Config),
+
+ %% tsp("init_per_testcase2 -> "
+ %% "~n SuiteDir: ~p"
+ %% "~n DataDir: ~p", [SuiteTopDir, DataDir]),
+
+ TcTopDir = filename:join(SuiteTopDir, Case),
+ ?line ok = file:make_dir(TcTopDir),
+
+ %% tsp("init_per_testcase2 -> "
+ %% "~n TcTopDir: ~p", [TcTopDir]),
+
+ DataSrc = filename:join([DataDir, "server_root"]),
+ ServerRoot = filename:join([TcTopDir, "server_root"]),
+
+ %% tsp("init_per_testcase2 -> "
+ %% "~n DataSrc: ~p"
+ %% "~n ServerRoot: ~p", [DataSrc, ServerRoot]),
+
+ ok = file:make_dir(ServerRoot),
+ ok = file:make_dir(filename:join([TcTopDir, "logs"])),
+
+ NewConfig = [{tc_top_dir, TcTopDir}, {server_root, ServerRoot} | Config],
+
+ %% tsp("init_per_testcase2 -> copy DataSrc to ServerRoot"),
+
+ inets_test_lib:copy_dirs(DataSrc, ServerRoot),
+
+ %% tsp("init_per_testcase2 -> fix cgi"),
+ EnvCGI = filename:join([ServerRoot, "cgi-bin", "printenv.sh"]),
+ {ok, FileInfo} = file:read_file_info(EnvCGI),
+ ok = file:write_file_info(EnvCGI,
+ FileInfo#file_info{mode = 8#00755}),
+
+ EchoCGI = case test_server:os_type() of
+ {win32, _} ->
+ "cgi_echo.exe";
+ _ ->
+ "cgi_echo"
+ end,
+ CGIDir = filename:join([ServerRoot, "cgi-bin"]),
+ inets_test_lib:copy_file(EchoCGI, DataDir, CGIDir),
+ NewEchoCGI = filename:join([CGIDir, EchoCGI]),
+ {ok, FileInfo1} = file:read_file_info(NewEchoCGI),
+ ok = file:write_file_info(NewEchoCGI,
+ FileInfo1#file_info{mode = 8#00755}),
+
+ %% To be used by IP test cases
+ %% tsp("init_per_testcase2 -> ip testcase setups"),
+ create_config([{port, ?IP_PORT}, {sock_type, ip_comm} | NewConfig],
+ normal_access, IpNormal),
+ create_config([{port, ?IP_PORT}, {sock_type, ip_comm} | NewConfig],
+ mod_htaccess, IpHtaccess),
+
+ %% To be used by SSL test cases
+ %% tsp("init_per_testcase2 -> ssl testcase setups"),
+ SocketType =
+ case atom_to_list(Case) of
+ [X, $s, $s, $l | _] ->
+ case X of
+ $p -> ssl;
+ $e -> essl
+ end;
+ _ ->
+ ssl
+ end,
+
+ create_config([{port, ?SSL_PORT}, {sock_type, SocketType} | NewConfig],
+ normal_access, SslNormal),
+ create_config([{port, ?SSL_PORT}, {sock_type, SocketType} | NewConfig],
+ mod_htaccess, SslHtaccess),
+
+ %% To be used by IPv6 test cases. Case-clause is so that
+ %% you can do ts:run(inets, httpd_SUITE, <test case>)
+ %% for all cases except the ipv6 cases as they depend
+ %% on 'test_host_ipv6_only' that will only be present
+ %% when you run the whole test suite due to shortcomings
+ %% of the test server.
+
+ tsp("init_per_testcase2 -> maybe generate IPv6 config file(s)"),
+ NewConfig2 =
+ case atom_to_list(Case) of
+ "ipv6_" ++ _ ->
+ case (catch inets_test_lib:has_ipv6_support(NewConfig)) of
+ {ok, IPv6Address0} ->
+ {ok, Hostname} = inet:gethostname(),
+ IPv6Address = http_transport:ipv6_name(IPv6Address0),
+ create_ipv6_config([{port, ?IP_PORT},
+ {sock_type, ip_comm},
+ {ipv6_host, IPv6Address} |
+ NewConfig],
+ "ipv6_hostname_ipcomm.conf",
+ Hostname),
+ create_ipv6_config([{port, ?IP_PORT},
+ {sock_type, ip_comm},
+ {ipv6_host, IPv6Address} |
+ NewConfig],
+ "ipv6_address_ipcomm.conf",
+ IPv6Address),
+ create_ipv6_config([{port, ?SSL_PORT},
+ {sock_type, essl},
+ {ipv6_host, IPv6Address} |
+ NewConfig],
+ "ipv6_hostname_essl.conf",
+ Hostname),
+ create_ipv6_config([{port, ?SSL_PORT},
+ {sock_type, essl},
+ {ipv6_host, IPv6Address} |
+ NewConfig],
+ "ipv6_address_essl.conf",
+ IPv6Address),
+ [{ipv6_host, IPv6Address} | NewConfig];
+ _ ->
+ NewConfig
+ end;
+
+ _ ->
+ NewConfig
+ end,
+
+ %% tsp("init_per_testcase2 -> done when"
+ %% "~n NewConfig2: ~p", [NewConfig2]),
+
+ NewConfig2.
+
+
+init_per_testcase3(Case, Config) ->
+ tsp("init_per_testcase3(~w) -> entry with"
+ "~n Config: ~p", [Case, Config]),
+
+
+%% %% Create a new fresh node to be used by the server in this test-case
+
+%% NodeName = list_to_atom(atom_to_list(Case) ++ "_httpd"),
+%% Node = inets_test_lib:start_node(NodeName),
+
+ %% Clean up (we do not want this clean up in end_per_testcase
+ %% if init_per_testcase crashes for some testcase it will
+ %% have contaminated the environment and there will be no clean up.)
+ %% This init can take a few different paths so that one crashes
+ %% does not mean that all invocations will.
+
+ application:unset_env(inets, services),
+ application:stop(inets),
+ application:stop(ssl),
+ cleanup_mnesia(),
+
+ %% Start initialization
+ tsp("init_per_testcase3(~w) -> start init", [Case]),
+
+ Dog = test_server:timetrap(inets_test_lib:minutes(10)),
+ NewConfig = lists:keydelete(watchdog, 1, Config),
+ TcTopDir = ?config(tc_top_dir, Config),
+
+ CaseRest =
+ case atom_to_list(Case) of
+ "ip_mod_htaccess" ->
+ inets_test_lib:start_http_server(
+ filename:join(TcTopDir,
+ integer_to_list(?IP_PORT) ++
+ "htaccess.conf")),
+ "mod_htaccess";
+ "ip_" ++ Rest ->
+ inets_test_lib:start_http_server(
+ filename:join(TcTopDir,
+ integer_to_list(?IP_PORT) ++ ".conf")),
+ Rest;
+ "ticket_5913" ->
+ HttpdOptions =
+ [{file,
+ filename:join(TcTopDir,
+ integer_to_list(?IP_PORT) ++ ".conf")},
+ {accept_timeout,30000},
+ {debug,[{exported_functions,
+ [httpd_manager,httpd_request_handler]}]}],
+ inets_test_lib:start_http_server(HttpdOptions);
+ "ticket_"++Rest ->
+ %% OTP-5913 use the new syntax of inets.config
+ inets_test_lib:start_http_server([{file,
+ filename:join(TcTopDir,
+ integer_to_list(?IP_PORT) ++ ".conf")}]),
+ Rest;
+
+ [X, $s, $s, $l, $_, $m, $o, $d, $_, $h, $t, $a, $c, $c, $e, $s, $s] ->
+ ?ENSURE_STARTED([crypto, public_key, ssl]),
+ SslTag =
+ case X of
+ $p -> ssl; % Plain
+ $e -> essl % Erlang based ssl
+ end,
+ case inets_test_lib:start_http_server_ssl(
+ filename:join(TcTopDir,
+ integer_to_list(?SSL_PORT) ++
+ "htaccess.conf"), SslTag) of
+ ok ->
+ "mod_htaccess";
+ Other ->
+ error_logger:info_msg("Other: ~p~n", [Other]),
+ {skip, "SSL does not seem to be supported"}
+ end;
+ [X, $s, $s, $l, $_ | Rest] ->
+ ?ENSURE_STARTED([crypto, public_key, ssl]),
+ SslTag =
+ case X of
+ $p -> ssl;
+ $e -> essl
+ end,
+ case inets_test_lib:start_http_server_ssl(
+ filename:join(TcTopDir,
+ integer_to_list(?SSL_PORT) ++
+ ".conf"), SslTag) of
+ ok ->
+ Rest;
+ Other ->
+ error_logger:info_msg("Other: ~p~n", [Other]),
+ {skip, "SSL does not seem to be supported"}
+ end;
+ "ipv6_" ++ _ = TestCaseStr ->
+ case inets_test_lib:has_ipv6_support() of
+ {ok, _} ->
+ inets_test_lib:start_http_server(
+ filename:join(TcTopDir,
+ TestCaseStr ++ ".conf"));
+
+ _ ->
+ {skip, "Host does not support IPv6"}
+ end
+ end,
+
+ InitRes =
+ case CaseRest of
+ {skip, _} = Skip ->
+ Skip;
+ "mod_auth_" ++ _ ->
+ start_mnesia(?config(node, Config)),
+ [{watchdog, Dog} | NewConfig];
+ "mod_htaccess" ->
+ ServerRoot = ?config(server_root, Config),
+ Path = filename:join([ServerRoot, "htdocs"]),
+ catch remove_htaccess(Path),
+ create_htaccess_data(Path, ?config(address, Config)),
+ [{watchdog, Dog} | NewConfig];
+ "range" ->
+ ServerRoot = ?config(server_root, Config),
+ Path = filename:join([ServerRoot, "htdocs"]),
+ create_range_data(Path),
+ [{watchdog, Dog} | NewConfig];
+ _ ->
+ [{watchdog, Dog} | NewConfig]
+ end,
+
+ tsp("init_per_testcase3(~w) -> done when"
+ "~n InitRes: ~p", [Case, InitRes]),
+
+ InitRes.
+
+
+%%--------------------------------------------------------------------
+%% Function: end_per_testcase(Case, Config) -> _
+%% Case - atom()
+%% Name of the test case that is about to be run.
+%% Config - [tuple()]
+%% A list of key/value pairs, holding the test case configuration.
+%% Description: Cleanup after each test case
+%%--------------------------------------------------------------------
+end_per_testcase(Case, Config) ->
+ Dog = ?config(watchdog, Config),
+ test_server:timetrap_cancel(Dog),
+ end_per_testcase2(Case, lists:keydelete(watchdog, 1, Config)),
+ ok.
+
+end_per_testcase2(Case, Config) ->
+ tsp("end_per_testcase2(~w) -> entry with"
+ "~n Config: ~p", [Case, Config]),
+ application:unset_env(inets, services),
+ application:stop(inets),
+ application:stop(ssl),
+ application:stop(crypto), % used by the new ssl (essl test cases)
+ cleanup_mnesia(),
+ tsp("end_per_testcase2(~w) -> done", [Case]),
+ ok.
+
+
+%%-------------------------------------------------------------------------
+%% Test cases starts here.
+%%-------------------------------------------------------------------------
+
+%%-------------------------------------------------------------------------
+ip_mod_alias(doc) ->
+ ["Module test: mod_alias"];
+ip_mod_alias(suite) ->
+ [];
+ip_mod_alias(Config) when is_list(Config) ->
+ httpd_mod:alias(ip_comm, ?IP_PORT,
+ ?config(host, Config), ?config(node, Config)),
+ ok.
+
+%%-------------------------------------------------------------------------
+ip_mod_actions(doc) ->
+ ["Module test: mod_actions"];
+ip_mod_actions(suite) ->
+ [];
+ip_mod_actions(Config) when is_list(Config) ->
+ httpd_mod:actions(ip_comm, ?IP_PORT,
+ ?config(host, Config), ?config(node, Config)),
+ ok.
+
+%%-------------------------------------------------------------------------
+ip_mod_security(doc) ->
+ ["Module test: mod_security"];
+ip_mod_security(suite) ->
+ [];
+ip_mod_security(Config) when is_list(Config) ->
+ ServerRoot = ?config(server_root, Config),
+ httpd_mod:security(ServerRoot, ip_comm, ?IP_PORT,
+ ?config(host, Config), ?config(node, Config)),
+ ok.
+
+%%-------------------------------------------------------------------------
+ip_mod_auth(doc) ->
+ ["Module test: mod_auth"];
+ip_mod_auth(suite) ->
+ [];
+ip_mod_auth(Config) when is_list(Config) ->
+ httpd_mod:auth(ip_comm, ?IP_PORT,
+ ?config(host, Config), ?config(node, Config)),
+ ok.
+
+%%-------------------------------------------------------------------------
+ip_mod_auth_api(doc) ->
+ ["Module test: mod_auth_api"];
+ip_mod_auth_api(suite) ->
+ [];
+ip_mod_auth_api(Config) when is_list(Config) ->
+ ServerRoot = ?config(server_root, Config),
+ Host = ?config(host, Config),
+ Node = ?config(node, Config),
+ httpd_mod:auth_api(ServerRoot, "", ip_comm, ?IP_PORT, Host, Node),
+ httpd_mod:auth_api(ServerRoot, "dets_", ip_comm, ?IP_PORT, Host, Node),
+ httpd_mod:auth_api(ServerRoot, "mnesia_", ip_comm, ?IP_PORT, Host, Node),
+ ok.
+%%-------------------------------------------------------------------------
+ip_mod_auth_mnesia_api(doc) ->
+ ["Module test: mod_auth_mnesia_api"];
+ip_mod_auth_mnesia_api(suite) ->
+ [];
+ip_mod_auth_mnesia_api(Config) when is_list(Config) ->
+ httpd_mod:auth_mnesia_api(ip_comm, ?IP_PORT,
+ ?config(host, Config), ?config(node, Config)),
+ ok.
+%%-------------------------------------------------------------------------
+ip_mod_htaccess(doc) ->
+ ["Module test: mod_htaccess"];
+ip_mod_htaccess(suite) ->
+ [];
+ip_mod_htaccess(Config) when is_list(Config) ->
+ httpd_mod:htaccess(ip_comm, ?IP_PORT,
+ ?config(host, Config), ?config(node, Config)),
+ ok.
+%%-------------------------------------------------------------------------
+ip_mod_cgi(doc) ->
+ ["Module test: mod_cgi"];
+ip_mod_cgi(suite) ->
+ [];
+ip_mod_cgi(Config) when is_list(Config) ->
+ httpd_mod:cgi(ip_comm, ?IP_PORT,
+ ?config(host, Config), ?config(node, Config)),
+ ok.
+%%-------------------------------------------------------------------------
+ip_mod_esi(doc) ->
+ ["Module test: mod_esi"];
+ip_mod_esi(suite) ->
+ [];
+ip_mod_esi(Config) when is_list(Config) ->
+ httpd_mod:esi(ip_comm, ?IP_PORT,
+ ?config(host, Config), ?config(node, Config)),
+ ok.
+
+%%-------------------------------------------------------------------------
+ip_mod_get(doc) ->
+ ["Module test: mod_get"];
+ip_mod_get(suite) ->
+ [];
+ip_mod_get(Config) when is_list(Config) ->
+ httpd_mod:get(ip_comm, ?IP_PORT,
+ ?config(host, Config), ?config(node, Config)),
+ ok.
+
+%%-------------------------------------------------------------------------
+ip_mod_head(doc) ->
+ ["Module test: mod_head"];
+ip_mod_head(suite) ->
+ [];
+ip_mod_head(Config) when is_list(Config) ->
+ httpd_mod:head(ip_comm, ?IP_PORT,
+ ?config(host, Config), ?config(node, Config)),
+ ok.
+%%-------------------------------------------------------------------------
+ip_mod_all(doc) ->
+ ["All modules test"];
+ip_mod_all(suite) ->
+ [];
+ip_mod_all(Config) when is_list(Config) ->
+ httpd_mod:all(ip_comm, ?IP_PORT,
+ ?config(host, Config), ?config(node, Config)),
+ ok.
+%%-------------------------------------------------------------------------
+ip_load_light(doc) ->
+ ["Test light load"];
+ip_load_light(suite) ->
+ [];
+ip_load_light(Config) when is_list(Config) ->
+ httpd_load:load_test(ip_comm, ?IP_PORT, ?config(host, Config),
+ ?config(node, Config),
+ get_nof_clients(ip_comm, light)),
+ ok.
+%%-------------------------------------------------------------------------
+ip_load_medium(doc) ->
+ ["Test medium load"];
+ip_load_medium(suite) ->
+ [];
+ip_load_medium(Config) when is_list(Config) ->
+ httpd_load:load_test(ip_comm, ?IP_PORT, ?config(host, Config),
+ ?config(node, Config),
+ get_nof_clients(ip_comm, medium)),
+ ok.
+%%-------------------------------------------------------------------------
+ip_load_heavy(doc) ->
+ ["Test heavy load"];
+ip_load_heavy(suite) ->
+ [];
+ip_load_heavy(Config) when is_list(Config) ->
+ httpd_load:load_test(ip_comm, ?IP_PORT, ?config(host, Config),
+ ?config(node, Config),
+ get_nof_clients(ip_comm, heavy)),
+ ok.
+
+
+%%-------------------------------------------------------------------------
+ip_dos_hostname(doc) ->
+ ["Denial Of Service (DOS) attack test case"];
+ip_dos_hostname(suite) ->
+ [];
+ip_dos_hostname(Config) when is_list(Config) ->
+ dos_hostname(ip_comm, ?IP_PORT, ?config(host, Config),
+ ?config(node, Config), ?MAX_HEADER_SIZE),
+ ok.
+
+
+%%-------------------------------------------------------------------------
+ip_time_test(doc) ->
+ [""];
+ip_time_test(suite) ->
+ [];
+ip_time_test(Config) when is_list(Config) ->
+ %% <CONDITIONAL-SKIP>
+ Skippable = [win32],
+ Condition = fun() -> ?OS_BASED_SKIP(Skippable) end,
+ ?NON_PC_TC_MAYBE_SKIP(Config, Condition),
+ %% </CONDITIONAL-SKIP>
+
+ httpd_time_test:t(ip_comm, ?config(host, Config), ?IP_PORT),
+ ok.
+
+%%-------------------------------------------------------------------------
+ip_block_503(doc) ->
+ ["Check that you will receive status code 503 when the server"
+ " is blocked and 200 when its not blocked."];
+ip_block_503(suite) ->
+ [];
+ip_block_503(Config) when is_list(Config) ->
+ httpd_block:block_503(ip_comm, ?IP_PORT, ?config(host, Config),
+ ?config(node, Config)),
+ ok.
+%%-------------------------------------------------------------------------
+ip_block_disturbing_idle(doc) ->
+ ["Check that you can block/unblock an idle server. The strategy "
+ "distribing does not really make a difference in this case."];
+ip_block_disturbing_idle(suite) ->
+ [];
+ip_block_disturbing_idle(Config) when is_list(Config) ->
+ httpd_block:block_disturbing_idle(ip_comm, ?IP_PORT,
+ ?config(host, Config),
+ ?config(node, Config)),
+ ok.
+%%-------------------------------------------------------------------------
+ip_block_non_disturbing_idle(doc) ->
+ ["Check that you can block/unblock an idle server. The strategy "
+ "non distribing does not really make a difference in this case."];
+ip_block_non_disturbing_idle(suite) ->
+ [];
+ip_block_non_disturbing_idle(Config) when is_list(Config) ->
+ httpd_block:block_non_disturbing_idle(ip_comm, ?IP_PORT,
+ ?config(host, Config),
+ ?config(node, Config)),
+ ok.
+%%-------------------------------------------------------------------------
+ip_block_disturbing_active(doc) ->
+ ["Check that you can block/unblock an active server. The strategy "
+ "distribing means ongoing requests should be terminated."];
+ip_block_disturbing_active(suite) ->
+ [];
+ip_block_disturbing_active(Config) when is_list(Config) ->
+ httpd_block:block_disturbing_active(ip_comm, ?IP_PORT,
+ ?config(host, Config),
+ ?config(node, Config)),
+ ok.
+%%-------------------------------------------------------------------------
+ip_block_non_disturbing_active(doc) ->
+ ["Check that you can block/unblock an idle server. The strategy "
+ "non distribing means the ongoing requests should be compleated."];
+ip_block_non_disturbing_active(suite) ->
+ [];
+ip_block_non_disturbing_active(Config) when is_list(Config) ->
+ httpd_block:block_non_disturbing_idle(ip_comm, ?IP_PORT,
+ ?config(host, Config),
+ ?config(node, Config)),
+ ok.
+
+%%-------------------------------------------------------------------------
+ip_block_disturbing_active_timeout_not_released(doc) ->
+ ["Check that you can block an active server. The strategy "
+ "distribing means ongoing requests should be compleated"
+ "if the timeout does not occur."];
+ip_block_disturbing_active_timeout_not_released(suite) ->
+ [];
+ip_block_disturbing_active_timeout_not_released(Config)
+ when is_list(Config) ->
+ httpd_block:block_disturbing_active_timeout_not_released(ip_comm,
+ ?IP_PORT,
+ ?config(host,
+ Config),
+ ?config(node,
+ Config)),
+ ok.
+%%-------------------------------------------------------------------------
+ip_block_disturbing_active_timeout_released(doc) ->
+ ["Check that you can block an active server. The strategy "
+ "distribing means ongoing requests should be terminated when"
+ "the timeout occurs."];
+ip_block_disturbing_active_timeout_released(suite) ->
+ [];
+ip_block_disturbing_active_timeout_released(Config)
+ when is_list(Config) ->
+ httpd_block:block_disturbing_active_timeout_released(ip_comm,
+ ?IP_PORT,
+ ?config(host,
+ Config),
+ ?config(node,
+ Config)),
+ ok.
+
+%%-------------------------------------------------------------------------
+ip_block_non_disturbing_active_timeout_not_released(doc) ->
+ ["Check that you can block an active server. The strategy "
+ "non non distribing means ongoing requests should be completed."];
+ip_block_non_disturbing_active_timeout_not_released(suite) ->
+ [];
+ip_block_non_disturbing_active_timeout_not_released(Config)
+ when is_list(Config) ->
+ httpd_block:
+ block_non_disturbing_active_timeout_not_released(ip_comm,
+ ?IP_PORT,
+ ?config(host,
+ Config),
+ ?config(node,
+ Config)),
+ ok.
+%%-------------------------------------------------------------------------
+ip_block_non_disturbing_active_timeout_released(doc) ->
+ ["Check that you can block an active server. The strategy "
+ "non non distribing means ongoing requests should be completed. "
+ "When the timeout occurs the block operation sohould be canceled." ];
+ip_block_non_disturbing_active_timeout_released(suite) ->
+ [];
+ip_block_non_disturbing_active_timeout_released(Config)
+ when is_list(Config) ->
+ httpd_block:
+ block_non_disturbing_active_timeout_released(ip_comm,
+ ?IP_PORT,
+ ?config(host,
+ Config),
+ ?config(node,
+ Config)),
+ ok.
+%%-------------------------------------------------------------------------
+ip_block_disturbing_blocker_dies(doc) ->
+ [];
+ip_block_disturbing_blocker_dies(suite) ->
+ [];
+ip_block_disturbing_blocker_dies(Config) when is_list(Config) ->
+ httpd_block:disturbing_blocker_dies(ip_comm, ?IP_PORT,
+ ?config(host, Config),
+ ?config(node, Config)),
+ ok.
+%%-------------------------------------------------------------------------
+ip_block_non_disturbing_blocker_dies(doc) ->
+ [];
+ip_block_non_disturbing_blocker_dies(suite) ->
+ [];
+ip_block_non_disturbing_blocker_dies(Config) when is_list(Config) ->
+ httpd_block:non_disturbing_blocker_dies(ip_comm, ?IP_PORT,
+ ?config(host, Config),
+ ?config(node, Config)),
+ ok.
+%%-------------------------------------------------------------------------
+ip_restart_no_block(doc) ->
+ [""];
+ip_restart_no_block(suite) ->
+ [];
+ip_restart_no_block(Config) when is_list(Config) ->
+ httpd_block:restart_no_block(ip_comm, ?IP_PORT, ?config(host, Config),
+ ?config(node, Config)),
+ ok.
+%%-------------------------------------------------------------------------
+ip_restart_disturbing_block(doc) ->
+ [""];
+ip_restart_disturbing_block(suite) ->
+ [];
+ip_restart_disturbing_block(Config) when is_list(Config) ->
+ %% <CONDITIONAL-SKIP>
+ Condition =
+ fun() ->
+ case os:type() of
+ {unix, linux} ->
+ HW = string:strip(os:cmd("uname -m"), right, $\n),
+ case HW of
+ "ppc" ->
+ case inet:gethostname() of
+ {ok, "peach"} ->
+ true;
+ _ ->
+ false
+ end;
+ _ ->
+ false
+ end;
+ _ ->
+ false
+ end
+ end,
+ ?NON_PC_TC_MAYBE_SKIP(Config, Condition),
+ %% </CONDITIONAL-SKIP>
+
+ httpd_block:restart_disturbing_block(ip_comm, ?IP_PORT,
+ ?config(host, Config),
+ ?config(node, Config)),
+ ok.
+
+%%-------------------------------------------------------------------------
+ip_restart_non_disturbing_block(doc) ->
+ [""];
+ip_restart_non_disturbing_block(suite) ->
+ [];
+ip_restart_non_disturbing_block(Config) when is_list(Config) ->
+ %% <CONDITIONAL-SKIP>
+ Condition =
+ fun() ->
+ case os:type() of
+ {unix, linux} ->
+ HW = string:strip(os:cmd("uname -m"), right, $\n),
+ case HW of
+ "ppc" ->
+ case inet:gethostname() of
+ {ok, "peach"} ->
+ true;
+ _ ->
+ false
+ end;
+ _ ->
+ false
+ end;
+ _ ->
+ false
+ end
+ end,
+ ?NON_PC_TC_MAYBE_SKIP(Config, Condition),
+ %% </CONDITIONAL-SKIP>
+
+ httpd_block:restart_non_disturbing_block(ip_comm, ?IP_PORT,
+ ?config(host, Config),
+ ?config(node, Config)),
+ ok.
+
+%%-------------------------------------------------------------------------
+
+essl_mod_alias(doc) ->
+ ["Module test: mod_alias - using new of configure new SSL"];
+essl_mod_alias(suite) ->
+ [];
+essl_mod_alias(Config) when is_list(Config) ->
+ ssl_mod_alias(essl, Config).
+
+
+ssl_mod_alias(Tag, Config) ->
+ httpd_mod:alias(Tag, ?SSL_PORT,
+ ?config(host, Config), ?config(node, Config)),
+ ok.
+
+
+%%-------------------------------------------------------------------------
+
+essl_mod_actions(doc) ->
+ ["Module test: mod_actions - using new of configure new SSL"];
+essl_mod_actions(suite) ->
+ [];
+essl_mod_actions(Config) when is_list(Config) ->
+ ssl_mod_actions(essl, Config).
+
+
+ssl_mod_actions(Tag, Config) ->
+ httpd_mod:actions(Tag,
+ ?SSL_PORT,
+ ?config(host, Config),
+ ?config(node, Config)),
+ ok.
+
+
+%%-------------------------------------------------------------------------
+
+essl_mod_security(doc) ->
+ ["Module test: mod_security - using new of configure new SSL"];
+essl_mod_security(suite) ->
+ [];
+essl_mod_security(Config) when is_list(Config) ->
+ ssl_mod_security(essl, Config).
+
+ssl_mod_security(Tag, Config) ->
+ ServerRoot = ?config(server_root, Config),
+ httpd_mod:security(ServerRoot,
+ Tag,
+ ?SSL_PORT,
+ ?config(host, Config),
+ ?config(node, Config)),
+ ok.
+
+
+%%-------------------------------------------------------------------------
+
+essl_mod_auth(doc) ->
+ ["Module test: mod_auth - using new of configure new SSL"];
+essl_mod_auth(suite) ->
+ [];
+essl_mod_auth(Config) when is_list(Config) ->
+ ssl_mod_auth(essl, Config).
+
+ssl_mod_auth(Tag, Config) ->
+ httpd_mod:auth(Tag,
+ ?SSL_PORT,
+ ?config(host, Config),
+ ?config(node, Config)),
+ ok.
+
+
+%%-------------------------------------------------------------------------
+
+
+essl_mod_auth_api(doc) ->
+ ["Module test: mod_auth - using new of configure new SSL"];
+essl_mod_auth_api(suite) ->
+ [];
+essl_mod_auth_api(Config) when is_list(Config) ->
+ ssl_mod_auth_api(essl, Config).
+
+ssl_mod_auth_api(Tag, Config) ->
+ ServerRoot = ?config(server_root, Config),
+ Host = ?config(host, Config),
+ Node = ?config(node, Config),
+ httpd_mod:auth_api(ServerRoot, "", Tag, ?SSL_PORT, Host, Node),
+ httpd_mod:auth_api(ServerRoot, "dets_", Tag, ?SSL_PORT, Host, Node),
+ httpd_mod:auth_api(ServerRoot, "mnesia_", Tag, ?SSL_PORT, Host, Node),
+ ok.
+
+
+%%-------------------------------------------------------------------------
+
+
+essl_mod_auth_mnesia_api(doc) ->
+ ["Module test: mod_auth_mnesia_api - using new of configure new SSL"];
+essl_mod_auth_mnesia_api(suite) ->
+ [];
+essl_mod_auth_mnesia_api(Config) when is_list(Config) ->
+ ssl_mod_auth_mnesia_api(essl, Config).
+
+ssl_mod_auth_mnesia_api(Tag, Config) ->
+ httpd_mod:auth_mnesia_api(Tag,
+ ?SSL_PORT,
+ ?config(host, Config),
+ ?config(node, Config)),
+ ok.
+
+
+%%-------------------------------------------------------------------------
+
+essl_mod_htaccess(doc) ->
+ ["Module test: mod_htaccess - using new of configure new SSL"];
+essl_mod_htaccess(suite) ->
+ [];
+essl_mod_htaccess(Config) when is_list(Config) ->
+ ssl_mod_htaccess(essl, Config).
+
+ssl_mod_htaccess(Tag, Config) ->
+ httpd_mod:htaccess(Tag,
+ ?SSL_PORT,
+ ?config(host, Config),
+ ?config(node, Config)),
+ ok.
+
+
+%%-------------------------------------------------------------------------
+
+essl_mod_cgi(doc) ->
+ ["Module test: mod_cgi - using new of configure new SSL"];
+essl_mod_cgi(suite) ->
+ [];
+essl_mod_cgi(Config) when is_list(Config) ->
+ ssl_mod_cgi(essl, Config).
+
+ssl_mod_cgi(Tag, Config) ->
+ httpd_mod:cgi(Tag,
+ ?SSL_PORT,
+ ?config(host, Config),
+ ?config(node, Config)),
+ ok.
+
+
+%%-------------------------------------------------------------------------
+
+essl_mod_esi(doc) ->
+ ["Module test: mod_esi - using new of configure new SSL"];
+essl_mod_esi(suite) ->
+ [];
+essl_mod_esi(Config) when is_list(Config) ->
+ ssl_mod_esi(essl, Config).
+
+ssl_mod_esi(Tag, Config) ->
+ httpd_mod:esi(Tag,
+ ?SSL_PORT,
+ ?config(host, Config),
+ ?config(node, Config)),
+ ok.
+
+
+%%-------------------------------------------------------------------------
+
+essl_mod_get(doc) ->
+ ["Module test: mod_get - using new of configure new SSL"];
+essl_mod_get(suite) ->
+ [];
+essl_mod_get(Config) when is_list(Config) ->
+ ssl_mod_get(essl, Config).
+
+ssl_mod_get(Tag, Config) ->
+ httpd_mod:get(Tag,
+ ?SSL_PORT,
+ ?config(host, Config),
+ ?config(node, Config)),
+ ok.
+
+
+%%-------------------------------------------------------------------------
+
+essl_mod_head(doc) ->
+ ["Module test: mod_head - using new of configure new SSL"];
+essl_mod_head(suite) ->
+ [];
+essl_mod_head(Config) when is_list(Config) ->
+ ssl_mod_head(essl, Config).
+
+ssl_mod_head(Tag, Config) ->
+ httpd_mod:head(Tag,
+ ?SSL_PORT,
+ ?config(host, Config),
+ ?config(node, Config)),
+ ok.
+
+
+%%-------------------------------------------------------------------------
+
+essl_mod_all(doc) ->
+ ["All modules test - using new of configure new SSL"];
+essl_mod_all(suite) ->
+ [];
+essl_mod_all(Config) when is_list(Config) ->
+ ssl_mod_all(essl, Config).
+
+ssl_mod_all(Tag, Config) ->
+ httpd_mod:all(Tag,
+ ?SSL_PORT,
+ ?config(host, Config),
+ ?config(node, Config)),
+ ok.
+
+
+%%-------------------------------------------------------------------------
+
+essl_load_light(doc) ->
+ ["Test light load - using new of configure new SSL"];
+essl_load_light(suite) ->
+ [];
+essl_load_light(Config) when is_list(Config) ->
+ ssl_load_light(essl, Config).
+
+ssl_load_light(Tag, Config) ->
+ httpd_load:load_test(Tag,
+ ?SSL_PORT,
+ ?config(host, Config),
+ ?config(node, Config),
+ get_nof_clients(ssl, light)),
+ ok.
+
+
+%%-------------------------------------------------------------------------
+
+essl_load_medium(doc) ->
+ ["Test medium load - using new of configure new SSL"];
+essl_load_medium(suite) ->
+ [];
+essl_load_medium(Config) when is_list(Config) ->
+ ssl_load_medium(essl, Config).
+
+ssl_load_medium(Tag, Config) ->
+ %% <CONDITIONAL-SKIP>
+ Skippable = [win32],
+ Condition = fun() -> ?OS_BASED_SKIP(Skippable) end,
+ ?NON_PC_TC_MAYBE_SKIP(Config, Condition),
+ %% </CONDITIONAL-SKIP>
+
+ httpd_load:load_test(Tag,
+ ?SSL_PORT,
+ ?config(host, Config),
+ ?config(node, Config),
+ get_nof_clients(ssl, medium)),
+ ok.
+
+
+%%-------------------------------------------------------------------------
+
+essl_load_heavy(doc) ->
+ ["Test heavy load - using new of configure new SSL"];
+essl_load_heavy(suite) ->
+ [];
+essl_load_heavy(Config) when is_list(Config) ->
+ ssl_load_heavy(essl, Config).
+
+ssl_load_heavy(Tag, Config) ->
+ %% <CONDITIONAL-SKIP>
+ Skippable = [win32],
+ Condition = fun() -> ?OS_BASED_SKIP(Skippable) end,
+ ?NON_PC_TC_MAYBE_SKIP(Config, Condition),
+ %% </CONDITIONAL-SKIP>
+
+ httpd_load:load_test(Tag,
+ ?SSL_PORT,
+ ?config(host, Config),
+ ?config(node, Config),
+ get_nof_clients(ssl, heavy)),
+ ok.
+
+
+%%-------------------------------------------------------------------------
+
+
+essl_dos_hostname(doc) ->
+ ["Denial Of Service (DOS) attack test case - using new of configure new SSL"];
+essl_dos_hostname(suite) ->
+ [];
+essl_dos_hostname(Config) when is_list(Config) ->
+ ssl_dos_hostname(essl, Config).
+
+ssl_dos_hostname(Tag, Config) ->
+ dos_hostname(Tag,
+ ?SSL_PORT,
+ ?config(host, Config),
+ ?config(node, Config),
+ ?MAX_HEADER_SIZE),
+ ok.
+
+
+%%-------------------------------------------------------------------------
+
+
+essl_time_test(doc) ->
+ ["using new of configure new SSL"];
+essl_time_test(suite) ->
+ [];
+essl_time_test(Config) when is_list(Config) ->
+ ssl_time_test(essl, Config).
+
+ssl_time_test(Tag, Config) when is_list(Config) ->
+ %% <CONDITIONAL-SKIP>
+ FreeBSDVersionVerify =
+ fun() ->
+ case os:version() of
+ {7, 1, _} -> % We only have one such machine, so...
+ true;
+ _ ->
+ false
+ end
+ end,
+ Skippable = [win32, {unix, [{freebsd, FreeBSDVersionVerify}]}],
+ Condition = fun() -> ?OS_BASED_SKIP(Skippable) end,
+ ?NON_PC_TC_MAYBE_SKIP(Config, Condition),
+ %% </CONDITIONAL-SKIP>
+
+ httpd_time_test:t(Tag,
+ ?config(host, Config),
+ ?SSL_PORT),
+ ok.
+
+
+%%-------------------------------------------------------------------------
+
+
+essl_block_503(doc) ->
+ ["Check that you will receive status code 503 when the server"
+ " is blocked and 200 when its not blocked - using new of configure new SSL."];
+essl_block_503(suite) ->
+ [];
+essl_block_503(Config) when is_list(Config) ->
+ ssl_block_503(essl, Config).
+
+ssl_block_503(Tag, Config) ->
+ httpd_block:block_503(Tag,
+ ?SSL_PORT,
+ ?config(host, Config),
+ ?config(node, Config)),
+ ok.
+
+
+%%-------------------------------------------------------------------------
+
+essl_block_disturbing_idle(doc) ->
+ ["Check that you can block/unblock an idle server. The strategy "
+ "distribing does not really make a difference in this case."
+ "Using new of configure new SSL"];
+essl_block_disturbing_idle(suite) ->
+ [];
+essl_block_disturbing_idle(Config) when is_list(Config) ->
+ ssl_block_disturbing_idle(essl, Config).
+
+ssl_block_disturbing_idle(Tag, Config) ->
+ httpd_block:block_disturbing_idle(Tag,
+ ?SSL_PORT,
+ ?config(host, Config),
+ ?config(node, Config)),
+ ok.
+
+
+%%-------------------------------------------------------------------------
+
+essl_block_non_disturbing_idle(doc) ->
+ ["Check that you can block/unblock an idle server. The strategy "
+ "non distribing does not really make a difference in this case."
+ "Using new of configure new SSL"];
+essl_block_non_disturbing_idle(suite) ->
+ [];
+essl_block_non_disturbing_idle(Config) when is_list(Config) ->
+ ssl_block_non_disturbing_idle(essl, Config).
+
+ssl_block_non_disturbing_idle(Tag, Config) ->
+ httpd_block:block_non_disturbing_idle(Tag,
+ ?SSL_PORT,
+ ?config(host, Config),
+ ?config(node, Config)),
+ ok.
+
+
+%%-------------------------------------------------------------------------
+
+essl_block_disturbing_active(doc) ->
+ ["Check that you can block/unblock an active server. The strategy "
+ "distribing means ongoing requests should be terminated."
+ "Using new of configure new SSL"];
+essl_block_disturbing_active(suite) ->
+ [];
+essl_block_disturbing_active(Config) when is_list(Config) ->
+ ssl_block_disturbing_active(essl, Config).
+
+ssl_block_disturbing_active(Tag, Config) ->
+ httpd_block:block_disturbing_active(Tag,
+ ?SSL_PORT,
+ ?config(host, Config),
+ ?config(node, Config)),
+ ok.
+
+
+%%-------------------------------------------------------------------------
+
+essl_block_non_disturbing_active(doc) ->
+ ["Check that you can block/unblock an idle server. The strategy "
+ "non distribing means the ongoing requests should be compleated."
+ "Using new of configure new SSL"];
+essl_block_non_disturbing_active(suite) ->
+ [];
+essl_block_non_disturbing_active(Config) when is_list(Config) ->
+ ssl_block_non_disturbing_active(essl, Config).
+
+ssl_block_non_disturbing_active(Tag, Config) ->
+ httpd_block:block_non_disturbing_idle(Tag,
+ ?SSL_PORT,
+ ?config(host, Config),
+ ?config(node, Config)),
+ ok.
+
+
+%%-------------------------------------------------------------------------
+
+essl_block_disturbing_active_timeout_not_released(doc) ->
+ ["Check that you can block an active server. The strategy "
+ "distribing means ongoing requests should be compleated"
+ "if the timeout does not occur."
+ "Using new of configure new SSL"];
+essl_block_disturbing_active_timeout_not_released(suite) ->
+ [];
+essl_block_disturbing_active_timeout_not_released(Config)
+ when is_list(Config) ->
+ ssl_block_disturbing_active_timeout_not_released(essl, Config).
+
+ssl_block_disturbing_active_timeout_not_released(Tag, Config) ->
+ Port = ?SSL_PORT,
+ Host = ?config(host, Config),
+ Node = ?config(node, Config),
+ httpd_block:block_disturbing_active_timeout_not_released(Tag,
+ Port, Host, Node),
+ ok.
+
+
+%%-------------------------------------------------------------------------
+
+essl_block_disturbing_active_timeout_released(doc) ->
+ ["Check that you can block an active server. The strategy "
+ "distribing means ongoing requests should be terminated when"
+ "the timeout occurs."
+ "Using new of configure new SSL"];
+essl_block_disturbing_active_timeout_released(suite) ->
+ [];
+essl_block_disturbing_active_timeout_released(Config)
+ when is_list(Config) ->
+ ssl_block_disturbing_active_timeout_released(essl, Config).
+
+ssl_block_disturbing_active_timeout_released(Tag, Config) ->
+ Port = ?SSL_PORT,
+ Host = ?config(host, Config),
+ Node = ?config(node, Config),
+ httpd_block:block_disturbing_active_timeout_released(Tag,
+ Port,
+ Host,
+ Node),
+ ok.
+
+
+%%-------------------------------------------------------------------------
+
+essl_block_non_disturbing_active_timeout_not_released(doc) ->
+ ["Check that you can block an active server. The strategy "
+ "non non distribing means ongoing requests should be completed."
+ "Using new of configure new SSL"];
+essl_block_non_disturbing_active_timeout_not_released(suite) ->
+ [];
+essl_block_non_disturbing_active_timeout_not_released(Config)
+ when is_list(Config) ->
+ ssl_block_non_disturbing_active_timeout_not_released(essl, Config).
+
+ssl_block_non_disturbing_active_timeout_not_released(Tag, Config) ->
+ Port = ?SSL_PORT,
+ Host = ?config(host, Config),
+ Node = ?config(node, Config),
+ httpd_block:block_non_disturbing_active_timeout_not_released(Tag,
+ Port,
+ Host,
+ Node),
+ ok.
+
+
+%%-------------------------------------------------------------------------
+
+
+essl_block_non_disturbing_active_timeout_released(doc) ->
+ ["Check that you can block an active server. The strategy "
+ "non distribing means ongoing requests should be completed. "
+ "When the timeout occurs the block operation sohould be canceled."
+ "Using new of configure new SSL"];
+essl_block_non_disturbing_active_timeout_released(suite) ->
+ [];
+essl_block_non_disturbing_active_timeout_released(Config)
+ when is_list(Config) ->
+ ssl_block_non_disturbing_active_timeout_released(essl, Config).
+
+ssl_block_non_disturbing_active_timeout_released(Tag, Config)
+ when is_list(Config) ->
+ Port = ?SSL_PORT,
+ Host = ?config(host, Config),
+ Node = ?config(node, Config),
+ httpd_block:block_non_disturbing_active_timeout_released(Tag,
+ Port,
+ Host,
+ Node),
+
+ ok.
+
+
+%%-------------------------------------------------------------------------
+
+
+essl_block_disturbing_blocker_dies(doc) ->
+ ["using new of configure new SSL"];
+essl_block_disturbing_blocker_dies(suite) ->
+ [];
+essl_block_disturbing_blocker_dies(Config) when is_list(Config) ->
+ ssl_block_disturbing_blocker_dies(essl, Config).
+
+ssl_block_disturbing_blocker_dies(Tag, Config) ->
+ httpd_block:disturbing_blocker_dies(Tag,
+ ?SSL_PORT,
+ ?config(host, Config),
+ ?config(node, Config)),
+ ok.
+
+
+%%-------------------------------------------------------------------------
+
+essl_block_non_disturbing_blocker_dies(doc) ->
+ ["using new of configure new SSL"];
+essl_block_non_disturbing_blocker_dies(suite) ->
+ [];
+essl_block_non_disturbing_blocker_dies(Config) when is_list(Config) ->
+ ssl_block_non_disturbing_blocker_dies(essl, Config).
+
+ssl_block_non_disturbing_blocker_dies(Tag, Config) ->
+ httpd_block:non_disturbing_blocker_dies(Tag,
+ ?SSL_PORT,
+ ?config(host, Config),
+ ?config(node, Config)),
+ ok.
+
+
+%%-------------------------------------------------------------------------
+
+
+essl_restart_no_block(doc) ->
+ ["using new of configure new SSL"];
+essl_restart_no_block(suite) ->
+ [];
+essl_restart_no_block(Config) when is_list(Config) ->
+ ssl_restart_no_block(essl, Config).
+
+ssl_restart_no_block(Tag, Config) ->
+ httpd_block:restart_no_block(Tag,
+ ?SSL_PORT,
+ ?config(host, Config),
+ ?config(node, Config)),
+ ok.
+
+
+%%-------------------------------------------------------------------------
+
+
+essl_restart_disturbing_block(doc) ->
+ ["using new of configure new SSL"];
+essl_restart_disturbing_block(suite) ->
+ [];
+essl_restart_disturbing_block(Config) when is_list(Config) ->
+ ssl_restart_disturbing_block(essl, Config).
+
+ssl_restart_disturbing_block(Tag, Config) ->
+ %% <CONDITIONAL-SKIP>
+ Condition =
+ fun() ->
+ case os:type() of
+ {unix, linux} ->
+ case ?OSCMD("uname -m") of
+ "ppc" ->
+ case file:read_file_info("/etc/fedora-release") of
+ {ok, _} ->
+ case ?OSCMD("awk '{print $2}' /etc/fedora-release") of
+ "release" ->
+ %% Fedora 7 and later
+ case ?OSCMD("awk '{print $3}' /etc/fedora-release") of
+ "7" ->
+ true;
+ _ ->
+ false
+ end;
+ _ ->
+ false
+ end;
+ _ ->
+ false
+ end;
+ _ ->
+ false
+ end;
+ _ ->
+ false
+ end
+ end,
+ ?NON_PC_TC_MAYBE_SKIP(Config, Condition),
+ %% </CONDITIONAL-SKIP>
+
+ httpd_block:restart_disturbing_block(Tag, ?SSL_PORT,
+ ?config(host, Config),
+ ?config(node, Config)),
+ ok.
+
+
+%%-------------------------------------------------------------------------
+
+
+essl_restart_non_disturbing_block(doc) ->
+ ["using new of configure new SSL"];
+essl_restart_non_disturbing_block(suite) ->
+ [];
+essl_restart_non_disturbing_block(Config) when is_list(Config) ->
+ ssl_restart_non_disturbing_block(essl, Config).
+
+ssl_restart_non_disturbing_block(Tag, Config) ->
+ %% <CONDITIONAL-SKIP>
+ Condition =
+ fun() ->
+ case os:type() of
+ {unix, linux} ->
+ HW = string:strip(os:cmd("uname -m"), right, $\n),
+ case HW of
+ "ppc" ->
+ case inet:gethostname() of
+ {ok, "peach"} ->
+ true;
+ _ ->
+ false
+ end;
+ _ ->
+ false
+ end;
+ _ ->
+ false
+ end
+ end,
+ ?NON_PC_TC_MAYBE_SKIP(Config, Condition),
+ %% </CONDITIONAL-SKIP>
+
+ httpd_block:restart_non_disturbing_block(Tag,
+ ?SSL_PORT,
+ ?config(host, Config),
+ ?config(node, Config)),
+ ok.
+
+
+%%-------------------------------------------------------------------------
+ip_host(doc) ->
+ ["Control that the server accepts/rejects requests with/ without host"];
+ip_host(suite)->
+ [];
+ip_host(Config) when is_list(Config) ->
+ httpd_1_1:host(ip_comm, ?IP_PORT, ?config(host, Config),
+ ?config(node, Config)),
+ ok.
+%%-------------------------------------------------------------------------
+ip_chunked(doc) ->
+ ["Control that the server accepts chunked requests"];
+ip_chunked(suite) ->
+ [];
+ip_chunked(Config) when is_list(Config) ->
+ httpd_1_1:chunked(ip_comm, ?IP_PORT, ?config(host, Config),
+ ?config(node, Config)),
+ ok.
+%%-------------------------------------------------------------------------
+ip_expect(doc) ->
+ ["Control that the server handles request with the expect header "
+ "field appropiate"];
+ip_expect(suite)->
+ [];
+ip_expect(Config) when is_list(Config) ->
+ httpd_1_1:expect(ip_comm, ?IP_PORT, ?config(host, Config),
+ ?config(node, Config)),
+ ok.
+%%-------------------------------------------------------------------------
+ip_range(doc) ->
+ ["Control that the server can handle range requests to plain files"];
+ip_range(suite)->
+ [];
+ip_range(Config) when is_list(Config) ->
+ httpd_1_1:range(ip_comm, ?IP_PORT, ?config(host, Config),
+ ?config(node, Config)),
+ ok.
+%%-------------------------------------------------------------------------
+ip_if_test(doc) ->
+ ["Test that the if - request header fields is handled correclty"];
+ip_if_test(suite) ->
+ [];
+ip_if_test(Config) when is_list(Config) ->
+ ServerRoot = ?config(server_root, Config),
+ DocRoot = filename:join([ServerRoot, "htdocs"]),
+ httpd_1_1:if_test(ip_comm, ?IP_PORT, ?config(host, Config),
+ ?config(node, Config), DocRoot),
+ ok.
+%%-------------------------------------------------------------------------
+ip_http_trace(doc) ->
+ ["Test the trace module "];
+ip_http_trace(suite) ->
+ [];
+ip_http_trace(Config) when is_list(Config) ->
+ httpd_1_1:http_trace(ip_comm, ?IP_PORT, ?config(host, Config),
+ ?config(node, Config)),
+ ok.
+%%-------------------------------------------------------------------------
+ip_http1_1_head(doc) ->
+ ["Test the trace module "];
+ip_http1_1_head(suite)->
+ [];
+ip_http1_1_head(Config) when is_list(Config) ->
+ httpd_1_1:head(ip_comm, ?IP_PORT, ?config(host, Config),
+ ?config(node, Config)),
+ ok.
+
+%%-------------------------------------------------------------------------
+ip_get_0_9(doc) ->
+ ["Test simple HTTP/0.9 GET"];
+ip_get_0_9(suite)->
+ [];
+ip_get_0_9(Config) when is_list(Config) ->
+ Host = ?config(host, Config),
+ Node = ?config(node, Config),
+ ok = httpd_test_lib:verify_request(ip_comm, Host, ?IP_PORT, Node,
+ "GET / \r\n\r\n",
+ [{statuscode, 200},
+ {version, "HTTP/0.9"} ]),
+ %% Without space after uri
+ ok = httpd_test_lib:verify_request(ip_comm, Host, ?IP_PORT, Node,
+ "GET /\r\n\r\n",
+ [{statuscode, 200},
+ {version, "HTTP/0.9"} ]),
+ ok = httpd_test_lib:verify_request(ip_comm, Host, ?IP_PORT, Node,
+ "GET / HTTP/0.9\r\n\r\n",
+ [{statuscode, 200},
+ {version, "HTTP/0.9"}]),
+
+ ok.
+%%-------------------------------------------------------------------------
+ip_head_1_0(doc) ->
+ ["Test HTTP/1.0 HEAD"];
+ip_head_1_0(suite)->
+ [];
+ip_head_1_0(Config) when is_list(Config) ->
+ Host = ?config(host, Config),
+ Node = ?config(node, Config),
+ ok = httpd_test_lib:verify_request(ip_comm, Host, ?IP_PORT, Node,
+ "HEAD / HTTP/1.0\r\n\r\n", [{statuscode, 200},
+ {version, "HTTP/1.0"}]),
+
+ ok.
+%%-------------------------------------------------------------------------
+ip_get_1_0(doc) ->
+ ["Test HTTP/1.0 GET"];
+ip_get_1_0(suite)->
+ [];
+ip_get_1_0(Config) when is_list(Config) ->
+ Host = ?config(host, Config),
+ Node = ?config(node, Config),
+ ok = httpd_test_lib:verify_request(ip_comm, Host, ?IP_PORT, Node,
+ "GET / HTTP/1.0\r\n\r\n", [{statuscode, 200},
+ {version, "HTTP/1.0"}]),
+
+ ok.
+%%-------------------------------------------------------------------------
+ip_post_1_0(doc) ->
+ ["Test HTTP/1.0 POST"];
+ip_post_1_0(suite)->
+ [];
+ip_post_1_0(Config) when is_list(Config) ->
+ Host = ?config(host, Config),
+ Node = ?config(node, Config),
+ %% Test the post message formatin 1.0! Real post are testes elsewhere
+ ok = httpd_test_lib:verify_request(ip_comm, Host, ?IP_PORT, Node,
+ "POST / HTTP/1.0\r\n\r\n "
+ "Content-Length:6 \r\n\r\nfoobar",
+ [{statuscode, 500}, {version, "HTTP/1.0"}]),
+
+ ok.
+%%-------------------------------------------------------------------------
+ip_mod_cgi_chunked_encoding_test(doc) ->
+ ["Test the trace module "];
+ip_mod_cgi_chunked_encoding_test(suite)->
+ [];
+ip_mod_cgi_chunked_encoding_test(Config) when is_list(Config) ->
+ Host = ?config(host, Config),
+ Script =
+ case test_server:os_type() of
+ {win32, _} ->
+ "/cgi-bin/printenv.bat";
+ _ ->
+ "/cgi-bin/printenv.sh"
+ end,
+ Requests =
+ ["GET " ++ Script ++ " HTTP/1.1\r\nHost:"++ Host ++"\r\n\r\n",
+ "GET /cgi-bin/erl/httpd_example/newformat HTTP/1.1\r\nHost:"
+ ++ Host ++"\r\n\r\n"],
+ httpd_1_1:mod_cgi_chunked_encoding_test(ip_comm, ?IP_PORT,
+ Host,
+ ?config(node, Config),
+ Requests),
+ ok.
+
+%-------------------------------------------------------------------------
+
+ipv6_hostname_ipcomm() ->
+ [{require, ipv6_hosts}].
+ipv6_hostname_ipcomm(X) ->
+ SocketType = ip_comm,
+ Port = ?IP_PORT,
+ ipv6_hostname(SocketType, Port, X).
+
+ipv6_hostname_essl() ->
+ [{require, ipv6_hosts}].
+ipv6_hostname_essl(X) ->
+ SocketType = essl,
+ Port = ?SSL_PORT,
+ ipv6_hostname(SocketType, Port, X).
+
+ipv6_hostname(_SocketType, _Port, doc) ->
+ ["Test standard ipv6 address"];
+ipv6_hostname(_SocketType, _Port, suite)->
+ [];
+ipv6_hostname(SocketType, Port, Config) when is_list(Config) ->
+ tsp("ipv6_hostname -> entry with"
+ "~n SocketType: ~p"
+ "~n Port: ~p"
+ "~n Config: ~p", [SocketType, Port, Config]),
+ Host = ?config(host, Config),
+ URI = "GET HTTP://" ++
+ Host ++ ":" ++ integer_to_list(Port) ++ "/ HTTP/1.1\r\n\r\n",
+ tsp("ipv6_hostname -> Host: ~p", [Host]),
+ httpd_test_lib:verify_request(SocketType, Host, Port, [inet6],
+ node(),
+ URI,
+ [{statuscode, 200}, {version, "HTTP/1.1"}]),
+ ok.
+
+%%-------------------------------------------------------------------------
+
+ipv6_address_ipcomm() ->
+ [{require, ipv6_hosts}].
+ipv6_address_ipcomm(X) ->
+ SocketType = ip_comm,
+ Port = ?IP_PORT,
+ ipv6_address(SocketType, Port, X).
+
+ipv6_address_essl() ->
+ [{require, ipv6_hosts}].
+ipv6_address_essl(X) ->
+ SocketType = essl,
+ Port = ?SSL_PORT,
+ ipv6_address(SocketType, Port, X).
+
+ipv6_address(_SocketType, _Port, doc) ->
+ ["Test standard ipv6 address"];
+ipv6_address(_SocketType, _Port, suite)->
+ [];
+ipv6_address(SocketType, Port, Config) when is_list(Config) ->
+ tsp("ipv6_address -> entry with"
+ "~n SocketType: ~p"
+ "~n Port: ~p"
+ "~n Config: ~p", [SocketType, Port, Config]),
+ Host = ?config(host, Config),
+ tsp("ipv6_address -> Host: ~p", [Host]),
+ URI = "GET HTTP://" ++
+ Host ++ ":" ++ integer_to_list(Port) ++ "/ HTTP/1.1\r\n\r\n",
+ httpd_test_lib:verify_request(SocketType, Host, Port, [inet6],
+ node(),
+ URI,
+ [{statuscode, 200}, {version, "HTTP/1.1"}]),
+ ok.
+
+
+%%--------------------------------------------------------------------
+ticket_5775(doc) ->
+ ["Tests that content-length is correct"];
+ticket_5775(suite) ->
+ [];
+ticket_5775(Config) ->
+ ok=httpd_test_lib:verify_request(ip_comm, ?config(host, Config),
+ ?IP_PORT, ?config(node, Config),
+ "GET /cgi-bin/erl/httpd_example:get_bin "
+ "HTTP/1.0\r\n\r\n",
+ [{statuscode, 200},
+ {version, "HTTP/1.0"}]),
+ ok.
+ticket_5865(doc) ->
+ ["Tests that a header without last-modified is handled"];
+ticket_5865(suite) ->
+ [];
+ticket_5865(Config) ->
+ ?SKIP(as_of_r15_behaviour_of_calendar_has_changed),
+ Host = ?config(host,Config),
+ ServerRoot = ?config(server_root, Config),
+ DocRoot = filename:join([ServerRoot, "htdocs"]),
+ File = filename:join([DocRoot,"last_modified.html"]),
+
+ Bad_mtime = case test_server:os_type() of
+ {win32, _} ->
+ {{1600,12,31},{23,59,59}};
+ {unix, _} ->
+ {{1969,12,31},{23,59,59}}
+ end,
+
+ {ok,FI}=file:read_file_info(File),
+
+ case file:write_file_info(File,FI#file_info{mtime=Bad_mtime}) of
+ ok ->
+ ok = httpd_test_lib:verify_request(ip_comm, Host,
+ ?IP_PORT, ?config(node, Config),
+ "GET /last_modified.html"
+ " HTTP/1.1\r\nHost:"
+ ++Host++"\r\n\r\n",
+ [{statuscode, 200},
+ {no_header,
+ "last-modified"}]),
+ ok;
+ {error, Reason} ->
+ Fault =
+ io_lib:format("Attempt to change the file info to set the"
+ " preconditions of the test case failed ~p~n",
+ [Reason]),
+ {skip, Fault}
+ end.
+
+ticket_5913(doc) ->
+ ["Tests that a header without last-modified is handled"];
+ticket_5913(suite) -> [];
+ticket_5913(Config) ->
+ ok = httpd_test_lib:verify_request(ip_comm, ?config(host, Config),
+ ?IP_PORT, ?config(node, Config),
+ "GET /cgi-bin/erl/httpd_example:get_bin "
+ "HTTP/1.0\r\n\r\n",
+ [{statuscode, 200},
+ {version, "HTTP/1.0"}]),
+ ok.
+
+ticket_6003(doc) ->
+ ["Tests that a URI with a bad hexadecimal code is handled"];
+ticket_6003(suite) -> [];
+ticket_6003(Config) ->
+ ok = httpd_test_lib:verify_request(ip_comm, ?config(host, Config),
+ ?IP_PORT, ?config(node, Config),
+ "GET http://www.erlang.org/%skalle "
+ "HTTP/1.0\r\n\r\n",
+ [{statuscode, 400},
+ {version, "HTTP/1.0"}]),
+ ok.
+
+ticket_7304(doc) ->
+ ["Tests missing CR in delimiter"];
+ticket_7304(suite) ->
+ [];
+ticket_7304(Config) ->
+ ok = httpd_test_lib:verify_request(ip_comm, ?config(host, Config),
+ ?IP_PORT, ?config(node, Config),
+ "GET / HTTP/1.0\r\n\n",
+ [{statuscode, 200},
+ {version, "HTTP/1.0"}]),
+ ok.
+
+%%--------------------------------------------------------------------
+%% Internal functions
+%%--------------------------------------------------------------------
+dos_hostname(Type, Port, Host, Node, Max) ->
+ H1 = {"", 200},
+ H2 = {"dummy-host.ericsson.se", 200},
+ TooLongHeader = lists:append(lists:duplicate(Max + 1, "a")),
+ H3 = {TooLongHeader, 403},
+ Hosts = [H1,H2,H3],
+ dos_hostname_poll(Type, Host, Port, Node, Hosts).
+
+%% make_ipv6(T) when is_tuple(T) andalso (size(T) =:= 8) ->
+%% make_ipv6(tuple_to_list(T));
+
+%% make_ipv6([_, _, _, _, _, _, _, _] = IPV6) ->
+%% lists:flatten(io_lib:format("~s:~s:~s:~s:~s:~s:~s:~s", IPV6)).
+
+
+%%--------------------------------------------------------------------
+%% Other help functions
+create_config(Config, Access, FileName) ->
+ ServerRoot = ?config(server_root, Config),
+ TcTopDir = ?config(tc_top_dir, Config),
+ Port = ?config(port, Config),
+ Type = ?config(sock_type, Config),
+ Host = ?config(host, Config),
+ Mods = io_lib:format("~p", [httpd_mod]),
+ Funcs = io_lib:format("~p", [ssl_password_cb]),
+ MaxHdrSz = io_lib:format("~p", [256]),
+ MaxHdrAct = io_lib:format("~p", [close]),
+
+ io:format(user,
+ "create_config -> "
+ "~n ServerRoot: ~p"
+ "~n TcTopDir: ~p"
+ "~n Type: ~p"
+ "~n Port: ~p"
+ "~n Host: ~p"
+ "~n", [ServerRoot, TcTopDir, Type, Port, Host]),
+
+ SSL =
+ if
+ (Type =:= ssl) orelse
+ (Type =:= essl) ->
+ [cline(["SSLCertificateFile ",
+ filename:join(ServerRoot, "ssl/ssl_server.pem")]),
+ cline(["SSLCertificateKeyFile ",
+ filename:join(ServerRoot, "ssl/ssl_server.pem")]),
+ cline(["SSLCACertificateFile ",
+ filename:join(ServerRoot, "ssl/ssl_server.pem")]),
+ cline(["SSLPasswordCallbackModule ", Mods]),
+ cline(["SSLPasswordCallbackFunction ", Funcs]),
+ cline(["SSLVerifyClient 0"]),
+ cline(["SSLVerifyDepth 1"])];
+ true ->
+ []
+ end,
+ ModOrder =
+ case Access of
+ mod_htaccess ->
+ "Modules mod_alias mod_htaccess mod_auth "
+ "mod_security "
+ "mod_responsecontrol mod_trace mod_esi "
+ "mod_actions mod_cgi mod_include mod_dir "
+ "mod_range mod_get "
+ "mod_head mod_log mod_disk_log";
+ _ ->
+ "Modules mod_alias mod_auth mod_security "
+ "mod_responsecontrol mod_trace mod_esi "
+ "mod_actions mod_cgi mod_include mod_dir "
+ "mod_range mod_get "
+ "mod_head mod_log mod_disk_log"
+ end,
+
+ %% The test suite currently does not handle an explicit BindAddress.
+ %% They assume any has been used, that is Addr is always set to undefined!
+
+ %% {ok, Hostname} = inet:gethostname(),
+ %% {ok, Addr} = inet:getaddr(Hostname, inet6),
+ %% AddrStr = make_ipv6(Addr),
+ %% BindAddress = lists:flatten(io_lib:format("~s|inet6", [AddrStr])),
+
+ BindAddress = "*|inet",
+ %% BindAddress = "*",
+
+ HttpConfig = [
+ cline(["Port ", integer_to_list(Port)]),
+ cline(["ServerName ", Host]),
+ cline(["SocketType ", atom_to_list(Type)]),
+ cline([ModOrder]),
+ %% cline(["LogFormat ", "erlang"]),
+ cline(["ServerAdmin [email protected]"]),
+ cline(["BindAddress ", BindAddress]),
+ cline(["ServerRoot ", ServerRoot]),
+ cline(["ErrorLog ", TcTopDir,
+ "/logs/error_log_", integer_to_list(Port)]),
+ cline(["TransferLog ", TcTopDir,
+ "/logs/access_log_", integer_to_list(Port)]),
+ cline(["SecurityLog ", TcTopDir,
+ "/logs/security_log_", integer_to_list(Port)]),
+ cline(["ErrorDiskLog ", TcTopDir,
+ "/logs/error_disk_log_", integer_to_list(Port)]),
+ cline(["ErrorDiskLogSize ", "190000 ", "11"]),
+ cline(["TransferDiskLog ", TcTopDir,
+ "/logs/access_disk_log_", integer_to_list(Port)]),
+ cline(["TransferDiskLogSize ", "200000 ", "10"]),
+ cline(["SecurityDiskLog ", TcTopDir,
+ "/logs/security_disk_log_", integer_to_list(Port)]),
+ cline(["SecurityDiskLogSize ", "210000 ", "9"]),
+ cline(["MaxClients 10"]),
+ cline(["MaxHeaderSize ", MaxHdrSz]),
+ cline(["MaxHeaderAction ", MaxHdrAct]),
+ cline(["DocumentRoot ",
+ filename:join(ServerRoot, "htdocs")]),
+ cline(["DirectoryIndex ", "index.html ", "welcome.html"]),
+ cline(["DefaultType ", "text/plain"]),
+ SSL,
+ mod_alias_config(ServerRoot),
+
+ config_directory(filename:join([ServerRoot,"htdocs",
+ "open"]),
+ "Open Area",
+ filename:join(ServerRoot, "auth/passwd"),
+ filename:join(ServerRoot, "auth/group"),
+ plain,
+ "user one Aladdin",
+ filename:join(ServerRoot, "security_data")),
+ config_directory(filename:join([ServerRoot,"htdocs",
+ "secret"]),
+ "Secret Area",
+ filename:join(ServerRoot, "auth/passwd"),
+ filename:join(ServerRoot, "auth/group"),
+ plain,
+ "group group1 group2",
+ filename:join(ServerRoot, "security_data")),
+ config_directory(filename:join([ServerRoot,"htdocs",
+ "secret",
+ "top_secret"]),
+ "Top Secret Area",
+ filename:join(ServerRoot, "auth/passwd"),
+ filename:join(ServerRoot, "auth/group"),
+ plain,
+ "group group3",
+ filename:join(ServerRoot, "security_data")),
+
+ config_directory(filename:join([ServerRoot,"htdocs",
+ "dets_open"]),
+ "Dets Open Area",
+ filename:join(ServerRoot, "passwd"),
+ filename:join(ServerRoot, "group"),
+ dets,
+ "user one Aladdin",
+ filename:join(ServerRoot, "security_data")),
+ config_directory(filename:join([ServerRoot,"htdocs",
+ "dets_secret"]),
+ "Dets Secret Area",
+ filename:join(ServerRoot, "passwd"),
+ filename:join(ServerRoot, "group"),
+ dets,
+ "group group1 group2",
+ filename:join(ServerRoot, "security_data")),
+ config_directory(filename:join([ServerRoot,"htdocs",
+ "dets_secret",
+ "top_secret"]),
+ "Dets Top Secret Area",
+ filename:join(ServerRoot, "passwd"),
+ filename:join(ServerRoot, "group"),
+ dets,
+ "group group3",
+ filename:join(ServerRoot, "security_data")),
+
+ config_directory(filename:join([ServerRoot,"htdocs",
+ "mnesia_open"]),
+ "Mnesia Open Area",
+ false,
+ false,
+ mnesia,
+ "user one Aladdin",
+ filename:join(ServerRoot, "security_data")),
+ config_directory(filename:join([ServerRoot,"htdocs",
+ "mnesia_secret"]),
+ "Mnesia Secret Area",
+ false,
+ false,
+ mnesia,
+ "group group1 group2",
+ filename:join(ServerRoot, "security_data")),
+ config_directory(filename:join(
+ [ServerRoot, "htdocs", "mnesia_secret",
+ "top_secret"]),
+ "Mnesia Top Secret Area",
+ false,
+ false,
+ mnesia,
+ "group group3",
+ filename:join(ServerRoot, "security_data"))
+ ],
+ ConfigFile = filename:join([TcTopDir, FileName]),
+ {ok, Fd} = file:open(ConfigFile, [write]),
+ ok = file:write(Fd, lists:flatten(HttpConfig)),
+ ok = file:close(Fd).
+
+config_directory(Dir, AuthName, AuthUserFile, AuthGroupFile, AuthDBType,
+ Require, SF) ->
+ file:delete(SF),
+ [
+ cline(["<Directory ", Dir, ">"]),
+ cline(["SecurityDataFile ", SF]),
+ cline(["SecurityMaxRetries 3"]),
+ cline(["SecurityFailExpireTime ", integer_to_list(?FAIL_EXPIRE_TIME)]),
+ cline(["SecurityBlockTime 1"]),
+ cline(["SecurityAuthTimeout ", integer_to_list(?AUTH_TIMEOUT)]),
+ cline(["SecurityCallbackModule ", "httpd_mod"]),
+ cline_if_set("AuthUserFile", AuthUserFile),
+ cline_if_set("AuthGroupFile", AuthGroupFile),
+ cline_if_set("AuthName", AuthName),
+ cline_if_set("AuthDBType", AuthDBType),
+ cline(["require ", Require]),
+ cline(["</Directory>\r\n"])
+ ].
+
+mod_alias_config(Root) ->
+ [
+ cline(["Alias /icons/ ", filename:join(Root,"icons"), "/"]),
+ cline(["Alias /pics/ ", filename:join(Root, "icons"), "/"]),
+ cline(["ScriptAlias /cgi-bin/ ", filename:join(Root, "cgi-bin"), "/"]),
+ cline(["ScriptAlias /htbin/ ", filename:join(Root, "cgi-bin"), "/"]),
+ cline(["ErlScriptAlias /cgi-bin/erl httpd_example io"]),
+ cline(["EvalScriptAlias /eval httpd_example io"])
+ ].
+
+cline(List) ->
+ lists:flatten([List, "\r\n"]).
+
+cline_if_set(_, false) ->
+ [];
+cline_if_set(Name, Var) when is_list(Var) ->
+ cline([Name, " ", Var]);
+cline_if_set(Name, Var) when is_atom(Var) ->
+ cline([Name, " ", atom_to_list(Var)]).
+
+getaddr() ->
+ {ok,HostName} = inet:gethostname(),
+ {ok,{A1,A2,A3,A4}} = inet:getaddr(HostName,inet),
+ lists:flatten(io_lib:format("~p.~p.~p.~p",[A1,A2,A3,A4])).
+
+start_mnesia(Node) ->
+ case rpc:call(Node, ?MODULE, cleanup_mnesia, []) of
+ ok ->
+ ok;
+ Other ->
+ tsf({failed_to_cleanup_mnesia, Other})
+ end,
+ case rpc:call(Node, ?MODULE, setup_mnesia, []) of
+ {atomic, ok} ->
+ ok;
+ Other2 ->
+ tsf({failed_to_setup_mnesia, Other2})
+ end,
+ ok.
+
+setup_mnesia() ->
+ setup_mnesia([node()]).
+
+setup_mnesia(Nodes) ->
+ ok = mnesia:create_schema(Nodes),
+ ok = mnesia:start(),
+ {atomic, ok} = mnesia:create_table(httpd_user,
+ [{attributes,
+ record_info(fields, httpd_user)},
+ {disc_copies,Nodes}, {type, set}]),
+ {atomic, ok} = mnesia:create_table(httpd_group,
+ [{attributes,
+ record_info(fields,
+ httpd_group)},
+ {disc_copies,Nodes}, {type,bag}]).
+
+cleanup_mnesia() ->
+ mnesia:start(),
+ mnesia:delete_table(httpd_user),
+ mnesia:delete_table(httpd_group),
+ stopped = mnesia:stop(),
+ mnesia:delete_schema([node()]),
+ ok.
+
+create_htaccess_data(Path, IpAddress)->
+ create_htaccess_dirs(Path),
+
+ create_html_file(filename:join([Path,"ht/open/dummy.html"])),
+ create_html_file(filename:join([Path,"ht/blocknet/dummy.html"])),
+ create_html_file(filename:join([Path,"ht/secret/dummy.html"])),
+ create_html_file(filename:join([Path,"ht/secret/top_secret/dummy.html"])),
+
+ create_htaccess_file(filename:join([Path,"ht/open/.htaccess"]),
+ Path, "user one Aladdin"),
+ create_htaccess_file(filename:join([Path,"ht/secret/.htaccess"]),
+ Path, "group group1 group2"),
+ create_htaccess_file(filename:join([Path,
+ "ht/secret/top_secret/.htaccess"]),
+ Path, "user four"),
+ create_htaccess_file(filename:join([Path,"ht/blocknet/.htaccess"]),
+ Path, nouser, IpAddress),
+
+ create_user_group_file(filename:join([Path,"ht","users.file"]),
+ "one:OnePassword\ntwo:TwoPassword\nthree:"
+ "ThreePassword\nfour:FourPassword\nAladdin:"
+ "AladdinPassword"),
+ create_user_group_file(filename:join([Path,"ht","groups.file"]),
+ "group1: two one\ngroup2: two three").
+
+create_html_file(PathAndFileName)->
+ file:write_file(PathAndFileName,list_to_binary(
+ "<html><head><title>test</title></head>
+ <body>testar</body></html>")).
+
+create_htaccess_file(PathAndFileName, BaseDir, RequireData)->
+ file:write_file(PathAndFileName,
+ list_to_binary(
+ "AuthUserFile "++ BaseDir ++
+ "/ht/users.file\nAuthGroupFile "++ BaseDir
+ ++ "/ht/groups.file\nAuthName Test\nAuthType"
+ " Basic\n<Limit>\nrequire " ++ RequireData ++
+ "\n</Limit>")).
+
+create_htaccess_file(PathAndFileName, BaseDir, nouser, IpAddress)->
+ file:write_file(PathAndFileName,list_to_binary(
+ "AuthUserFile "++ BaseDir ++
+ "/ht/users.file\nAuthGroupFile " ++
+ BaseDir ++ "/ht/groups.file\nAuthName"
+ " Test\nAuthType"
+ " Basic\n<Limit GET>\n\tallow from " ++
+ format_ip(IpAddress,
+ string:rchr(IpAddress,$.)) ++
+ "\n</Limit>")).
+
+create_user_group_file(PathAndFileName, Data)->
+ file:write_file(PathAndFileName, list_to_binary(Data)).
+
+create_htaccess_dirs(Path)->
+ ok = file:make_dir(filename:join([Path,"ht"])),
+ ok = file:make_dir(filename:join([Path,"ht/open"])),
+ ok = file:make_dir(filename:join([Path,"ht/blocknet"])),
+ ok = file:make_dir(filename:join([Path,"ht/secret"])),
+ ok = file:make_dir(filename:join([Path,"ht/secret/top_secret"])).
+
+remove_htaccess_dirs(Path)->
+ file:del_dir(filename:join([Path,"ht/secret/top_secret"])),
+ file:del_dir(filename:join([Path,"ht/secret"])),
+ file:del_dir(filename:join([Path,"ht/blocknet"])),
+ file:del_dir(filename:join([Path,"ht/open"])),
+ file:del_dir(filename:join([Path,"ht"])).
+
+format_ip(IpAddress,Pos)when Pos > 0->
+ case lists:nth(Pos,IpAddress) of
+ $.->
+ case lists:nth(Pos-2,IpAddress) of
+ $.->
+ format_ip(IpAddress,Pos-3);
+ _->
+ lists:sublist(IpAddress,Pos-2) ++ "."
+ end;
+ _ ->
+ format_ip(IpAddress,Pos-1)
+ end;
+
+format_ip(IpAddress, _Pos)->
+ "1" ++ IpAddress.
+
+remove_htaccess(Path)->
+ file:delete(filename:join([Path,"ht/open/dummy.html"])),
+ file:delete(filename:join([Path,"ht/secret/dummy.html"])),
+ file:delete(filename:join([Path,"ht/secret/top_secret/dummy.html"])),
+ file:delete(filename:join([Path,"ht/blocknet/dummy.html"])),
+ file:delete(filename:join([Path,"ht/blocknet/.htaccess"])),
+ file:delete(filename:join([Path,"ht/open/.htaccess"])),
+ file:delete(filename:join([Path,"ht/secret/.htaccess"])),
+ file:delete(filename:join([Path,"ht/secret/top_secret/.htaccess"])),
+ file:delete(filename:join([Path,"ht","users.file"])),
+ file:delete(filename:join([Path,"ht","groups.file"])),
+ remove_htaccess_dirs(Path).
+
+
+dos_hostname_poll(Type, Host, Port, Node, Hosts) ->
+ [dos_hostname_poll1(Type, Host, Port, Node, Host1, Code)
+ || {Host1,Code} <- Hosts].
+
+dos_hostname_poll1(Type, Host, Port, Node, Host1, Code) ->
+ ok = httpd_test_lib:verify_request(Type, Host, Port, Node,
+ dos_hostname_request(Host1),
+ [{statuscode, Code},
+ {version, "HTTP/1.0"}]).
+
+dos_hostname_request(Host) ->
+ "GET / HTTP/1.0\r\n" ++ Host ++ "\r\n\r\n".
+
+get_nof_clients(Mode, Load) ->
+ get_nof_clients(test_server:os_type(), Mode, Load).
+
+get_nof_clients(_, ip_comm, light) -> 5;
+get_nof_clients(_, ssl, light) -> 2;
+get_nof_clients(_, ip_comm, medium) -> 10;
+get_nof_clients(_, ssl, medium) -> 4;
+get_nof_clients(_, ip_comm, heavy) -> 20;
+get_nof_clients(_, ssl, heavy) -> 6.
+
+%% Make a file 100 bytes long containing 012...9*10
+create_range_data(Path) ->
+ PathAndFileName=filename:join([Path,"range.txt"]),
+ file:write_file(PathAndFileName,list_to_binary(["12345678901234567890",
+ "12345678901234567890",
+ "12345678901234567890",
+ "12345678901234567890",
+ "12345678901234567890"])).
+
+create_ipv6_config(Config, FileName, Ipv6Address) ->
+ ServerRoot = ?config(server_root, Config),
+ TcTopDir = ?config(tc_top_dir, Config),
+ Port = ?config(port, Config),
+ SockType = ?config(sock_type, Config),
+ Mods = io_lib:format("~p", [httpd_mod]),
+ Funcs = io_lib:format("~p", [ssl_password_cb]),
+ Host = ?config(ipv6_host, Config),
+
+ MaxHdrSz = io_lib:format("~p", [256]),
+ MaxHdrAct = io_lib:format("~p", [close]),
+
+ Mod_order = "Modules mod_alias mod_auth mod_esi mod_actions mod_cgi"
+ " mod_include mod_dir mod_get mod_head"
+ " mod_log mod_disk_log mod_trace",
+
+ SSL =
+ if
+ (SockType =:= ssl) orelse
+ (SockType =:= essl) ->
+ [cline(["SSLCertificateFile ",
+ filename:join(ServerRoot, "ssl/ssl_server.pem")]),
+ cline(["SSLCertificateKeyFile ",
+ filename:join(ServerRoot, "ssl/ssl_server.pem")]),
+ cline(["SSLCACertificateFile ",
+ filename:join(ServerRoot, "ssl/ssl_server.pem")]),
+ cline(["SSLPasswordCallbackModule ", Mods]),
+ cline(["SSLPasswordCallbackFunction ", Funcs]),
+ cline(["SSLVerifyClient 0"]),
+ cline(["SSLVerifyDepth 1"])];
+ true ->
+ []
+ end,
+
+ BindAddress = "[" ++ Ipv6Address ++"]|inet6",
+
+ HttpConfig =
+ [cline(["BindAddress ", BindAddress]),
+ cline(["Port ", integer_to_list(Port)]),
+ cline(["ServerName ", Host]),
+ cline(["SocketType ", atom_to_list(SockType)]),
+ cline([Mod_order]),
+ cline(["ServerRoot ", ServerRoot]),
+ cline(["DocumentRoot ", filename:join(ServerRoot, "htdocs")]),
+ cline(["MaxHeaderSize ",MaxHdrSz]),
+ cline(["MaxHeaderAction ",MaxHdrAct]),
+ cline(["DirectoryIndex ", "index.html "]),
+ cline(["DefaultType ", "text/plain"]),
+ SSL],
+ ConfigFile = filename:join([TcTopDir,FileName]),
+ {ok, Fd} = file:open(ConfigFile, [write]),
+ ok = file:write(Fd, lists:flatten(HttpConfig)),
+ ok = file:close(Fd).
+
+
+tsp(F) ->
+ inets_test_lib:tsp("[~w]" ++ F, [?MODULE]).
+tsp(F, A) ->
+ inets_test_lib:tsp("[~w]" ++ F, [?MODULE|A]).
+
+tsf(Reason) ->
+ inets_test_lib:tsf(Reason).
+
diff --git a/lib/inets/test/old_httpd_SUITE_data/Makefile.src b/lib/inets/test/old_httpd_SUITE_data/Makefile.src
new file mode 100644
index 0000000000..b0fdb43d8d
--- /dev/null
+++ b/lib/inets/test/old_httpd_SUITE_data/Makefile.src
@@ -0,0 +1,14 @@
+CC = @CC@
+LD = @LD@
+CFLAGS = @CFLAGS@ -I@erl_include@ @DEFS@
+CROSSLDFLAGS = @CROSSLDFLAGS@
+
+PROGS = cgi_echo@exe@
+
+all: $(PROGS)
+
+cgi_echo@exe@: cgi_echo@obj@
+ $(LD) $(CROSSLDFLAGS) -o cgi_echo cgi_echo@obj@ @LIBS@
+
+cgi_echo@obj@: cgi_echo.c
+ $(CC) -c -o cgi_echo@obj@ $(CFLAGS) cgi_echo.c
diff --git a/lib/inets/test/old_httpd_SUITE_data/cgi_echo.c b/lib/inets/test/old_httpd_SUITE_data/cgi_echo.c
new file mode 100644
index 0000000000..580f860e96
--- /dev/null
+++ b/lib/inets/test/old_httpd_SUITE_data/cgi_echo.c
@@ -0,0 +1,97 @@
+#include <stdlib.h>
+#include <stdio.h>
+
+#if defined __WIN32__
+#include <windows.h>
+#include <fcntl.h>
+#endif
+
+static int read_exact(char *buffer, int len);
+static int write_exact(char *buffer, int len);
+
+int main(void)
+{
+ char msg[100];
+ int msg_len;
+#ifdef __WIN32__
+ _setmode(_fileno( stdin), _O_BINARY);
+ _setmode(_fileno( stdout), _O_BINARY);
+#endif
+ msg_len = read_exact(msg, 100);
+
+ write_exact("Content-type: text/plain\r\n\r\n", 28);
+ write_exact(msg, msg_len);
+ exit(EXIT_SUCCESS);
+}
+
+
+/* read from stdin */
+#ifdef __WIN32__
+static int read_exact(char *buffer, int len)
+{
+ HANDLE standard_input = GetStdHandle(STD_INPUT_HANDLE);
+
+ unsigned read_result;
+ unsigned sofar = 0;
+
+ if (!len) { /* Happens for "empty packages */
+ return 0;
+ }
+ for (;;) {
+ if (!ReadFile(standard_input, buffer + sofar,
+ len - sofar, &read_result, NULL)) {
+ return -1; /* EOF */
+ }
+ if (!read_result) {
+ return -2; /* Interrupted while reading? */
+ }
+ sofar += read_result;
+ if (sofar == len) {
+ return len;
+ }
+ }
+}
+#else
+static int read_exact(char *buffer, int len) {
+ int i, got = 0;
+
+ do {
+ if ((i = read(0, buffer + got, len - got)) <= 0)
+ return(i);
+ got += i;
+ } while (got < len);
+ return len;
+
+}
+#endif
+
+/* write to stdout */
+#ifdef __WIN32__
+ static int write_exact(char *buffer, int len)
+ {
+ HANDLE standard_output = GetStdHandle(STD_OUTPUT_HANDLE);
+ unsigned written;
+
+ if (!WriteFile(standard_output, buffer, len, &written, NULL)) {
+ return -1; /* Broken Pipe */
+ }
+ if (written < ((unsigned) len)) {
+ /* This should not happen, standard output is not blocking? */
+ return -2;
+ }
+
+ return (int) written;
+}
+
+#else
+ static int write_exact(char *buffer, int len) {
+ int i, wrote = 0;
+
+ do {
+ if ((i = write(1, buffer + wrote, len - wrote)) <= 0)
+ return i;
+ wrote += i;
+ } while (wrote < len);
+ return len;
+ }
+#endif
diff --git a/lib/inets/test/httpd_SUITE_data/server_root/Makefile b/lib/inets/test/old_httpd_SUITE_data/server_root/Makefile
index d7a3231068..d7a3231068 100644
--- a/lib/inets/test/httpd_SUITE_data/server_root/Makefile
+++ b/lib/inets/test/old_httpd_SUITE_data/server_root/Makefile
diff --git a/lib/inets/test/old_httpd_SUITE_data/server_root/auth/group b/lib/inets/test/old_httpd_SUITE_data/server_root/auth/group
new file mode 100644
index 0000000000..b3da0ccbd3
--- /dev/null
+++ b/lib/inets/test/old_httpd_SUITE_data/server_root/auth/group
@@ -0,0 +1,3 @@
+group1: one two
+group2: two three
+group3: three Aladdin
diff --git a/lib/inets/test/old_httpd_SUITE_data/server_root/auth/passwd b/lib/inets/test/old_httpd_SUITE_data/server_root/auth/passwd
new file mode 100644
index 0000000000..8c980ff547
--- /dev/null
+++ b/lib/inets/test/old_httpd_SUITE_data/server_root/auth/passwd
@@ -0,0 +1,4 @@
+one:onePassword
+two:twoPassword
+three:threePassword
+Aladdin:AladdinPassword
diff --git a/lib/inets/test/old_httpd_SUITE_data/server_root/cgi-bin/printenv.bat b/lib/inets/test/old_httpd_SUITE_data/server_root/cgi-bin/printenv.bat
new file mode 100644
index 0000000000..25a49a1536
--- /dev/null
+++ b/lib/inets/test/old_httpd_SUITE_data/server_root/cgi-bin/printenv.bat
@@ -0,0 +1,9 @@
+@echo off
+echo tomrad > c:\cygwin\tmp\hej
+echo Content-type: text/html
+echo.
+echo ^<HTML^> ^<HEAD^> ^<TITLE^>OS Environment^</TITLE^> ^</HEAD^> ^<BODY^>^<PRE^>
+set
+echo ^</PRE^>^</BODY^>^</HTML^>
+
+
diff --git a/lib/inets/test/old_httpd_SUITE_data/server_root/cgi-bin/printenv.sh b/lib/inets/test/old_httpd_SUITE_data/server_root/cgi-bin/printenv.sh
new file mode 100755
index 0000000000..de81de9bde
--- /dev/null
+++ b/lib/inets/test/old_httpd_SUITE_data/server_root/cgi-bin/printenv.sh
@@ -0,0 +1,6 @@
+#!/bin/sh
+echo "Content-type: text/html"
+echo ""
+echo "<HTML> <HEAD> <TITLE>OS Environment</TITLE> </HEAD> <BODY><PRE>"
+env
+echo "</PRE></BODY></HTML>" \ No newline at end of file
diff --git a/lib/inets/test/httpd_SUITE_data/server_root/conf/8080.conf b/lib/inets/test/old_httpd_SUITE_data/server_root/conf/8080.conf
index 48e66f0114..48e66f0114 100644
--- a/lib/inets/test/httpd_SUITE_data/server_root/conf/8080.conf
+++ b/lib/inets/test/old_httpd_SUITE_data/server_root/conf/8080.conf
diff --git a/lib/inets/test/httpd_SUITE_data/server_root/conf/8888.conf b/lib/inets/test/old_httpd_SUITE_data/server_root/conf/8888.conf
index 79bb7fcca4..79bb7fcca4 100644
--- a/lib/inets/test/httpd_SUITE_data/server_root/conf/8888.conf
+++ b/lib/inets/test/old_httpd_SUITE_data/server_root/conf/8888.conf
diff --git a/lib/inets/test/httpd_SUITE_data/server_root/conf/httpd.conf b/lib/inets/test/old_httpd_SUITE_data/server_root/conf/httpd.conf
index ceb94237d2..ceb94237d2 100644
--- a/lib/inets/test/httpd_SUITE_data/server_root/conf/httpd.conf
+++ b/lib/inets/test/old_httpd_SUITE_data/server_root/conf/httpd.conf
diff --git a/lib/inets/test/httpd_SUITE_data/server_root/conf/mime.types b/lib/inets/test/old_httpd_SUITE_data/server_root/conf/mime.types
index d2f81e4e5e..d2f81e4e5e 100644
--- a/lib/inets/test/httpd_SUITE_data/server_root/conf/mime.types
+++ b/lib/inets/test/old_httpd_SUITE_data/server_root/conf/mime.types
diff --git a/lib/inets/test/httpd_SUITE_data/server_root/conf/ssl.conf b/lib/inets/test/old_httpd_SUITE_data/server_root/conf/ssl.conf
index 8b8c57a98b..8b8c57a98b 100644
--- a/lib/inets/test/httpd_SUITE_data/server_root/conf/ssl.conf
+++ b/lib/inets/test/old_httpd_SUITE_data/server_root/conf/ssl.conf
diff --git a/lib/inets/test/old_httpd_SUITE_data/server_root/htdocs/config.shtml b/lib/inets/test/old_httpd_SUITE_data/server_root/htdocs/config.shtml
new file mode 100644
index 0000000000..107e3ff610
--- /dev/null
+++ b/lib/inets/test/old_httpd_SUITE_data/server_root/htdocs/config.shtml
@@ -0,0 +1,70 @@
+<HTML>
+<HEAD>
+<TITLE>/ssi.html (17-Apr-1997)</TITLE>
+</HEAD>
+<BODY>
+<H1>/ssi.html</H1>
+
+<!-- ************* CONFIG ************* -->
+
+<!--#config timefmt="%a %b %e %T %Z %Y" sizefmt="abbrev"-->
+<!--#config errmsg="[an especially ugly error occurred while processing this directive]"-->
+
+<!-- ************* INCLUDE ************* -->
+
+<P>Include /misc/friedrich.html:
+<!--#include virtual="/misc/friedrich.html"-->
+<P>Include /misc/not_defined.html: <!--#include virtual="/misc/not_defined.html"-->
+<P>Include misc/friedrich.html:
+<!--#include file="misc/friedrich.html"-->
+<P>Include not_defined.html: <!--#include file="not_defined.html"-->
+
+<P><HR>
+
+<!-- ************* ECHO ************* -->
+
+<P>DOCUMENT_NAME: <!--#echo var="DOCUMENT_NAME"-->
+<P>DOCUMENT_URI: <!--#echo var="DOCUMENT_URI"-->
+<P>QUERY_STRING_UNESCAPED: <!--#echo var="QUERY_STRING_UNESCAPED"-->
+<P>DATE_LOCAL: <!--#echo var="DATE_LOCAL"-->
+<P>DATE_GMT: <!--#echo var="DATE_GMT"-->
+<P>LAST_MODIFIED: <!--#echo var="LAST_MODIFIED"-->
+<P>NOT_DEFINED: <!--#echo var="NOT_DEFINED"-->
+
+<P><HR>
+
+<!-- ************* FSIZE ************* -->
+
+<P>Size of index.html: <!--#fsize file="index.html"-->
+<P>Size of not_defined.html: <!--#fsize file="not_defined.html"-->
+<!--#config sizefmt="bytes"-->
+<P>Size of /misc/friedrich.html: <!--#fsize virtual="/misc/friedrich.html"-->
+<P>Size of /misc/not_defined.html: <!--#fsize virtual="/misc/not_defined.html"-->
+
+<P><HR>
+
+<!-- ************* FLASTMOD ************* -->
+
+<P>Last modification of index.html: <!--#flastmod file="index.html"-->
+<P>Last modification of not_defined.html: <!--#flastmod file="not_defined.html"-->
+<P>Last modification of /misc/friedrich.html: <!--#flastmod virtual="/misc/friedrich.html"-->
+<P>Last modification of /misc/not_defined.html: <!--#flastmod virtual="/misc/not_defined.html"-->
+
+<!--#exec cmd="ls"-->
+<!--#exec cmd="printenv"-->
+<!--#exec cmd="sunemaja"-->
+
+<!--#exec cgi="/cgi-bin/printenv.sh"-->
+
+</BODY>
+</HTML>
+
+
+
+
+
+
+
+
+
+
diff --git a/lib/inets/test/old_httpd_SUITE_data/server_root/htdocs/dets_open/dummy.html b/lib/inets/test/old_httpd_SUITE_data/server_root/htdocs/dets_open/dummy.html
new file mode 100644
index 0000000000..a6e8a35a04
--- /dev/null
+++ b/lib/inets/test/old_httpd_SUITE_data/server_root/htdocs/dets_open/dummy.html
@@ -0,0 +1,10 @@
+<HTML>
+<HEAD>
+<TITLE>/open/dummy.html (17-Apr-1997)</TITLE>
+<!-- Created by: Joakim Greben�, 17-Apr-1997 -->
+<!-- Changed by: Joakim Greben�, 17-Apr-1997 -->
+</HEAD>
+<BODY>
+<H1>/open/dummy.html</H1>
+</BODY>
+</HTML>
diff --git a/lib/inets/test/old_httpd_SUITE_data/server_root/htdocs/dets_secret/dummy.html b/lib/inets/test/old_httpd_SUITE_data/server_root/htdocs/dets_secret/dummy.html
new file mode 100644
index 0000000000..016b04e540
--- /dev/null
+++ b/lib/inets/test/old_httpd_SUITE_data/server_root/htdocs/dets_secret/dummy.html
@@ -0,0 +1,10 @@
+<HTML>
+<HEAD>
+<TITLE>/secret/dummy.html (17-Apr-1997)</TITLE>
+<!-- Created by: Joakim Greben�, 17-Apr-1997 -->
+<!-- Changed by: Joakim Greben�, 17-Apr-1997 -->
+</HEAD>
+<BODY>
+<H1>/secret/dummy.html</H1>
+</BODY>
+</HTML>
diff --git a/lib/inets/test/old_httpd_SUITE_data/server_root/htdocs/dets_secret/top_secret/index.html b/lib/inets/test/old_httpd_SUITE_data/server_root/htdocs/dets_secret/top_secret/index.html
new file mode 100644
index 0000000000..34db3d5d1a
--- /dev/null
+++ b/lib/inets/test/old_httpd_SUITE_data/server_root/htdocs/dets_secret/top_secret/index.html
@@ -0,0 +1,9 @@
+<HTML>
+<HEAD>
+<TITLE>/secret/top_secret/index.html (04-Feb-1998)</TITLE>
+<!-- Created by: Mattias Nilsson, 04-Feb-1998 -->
+</HEAD>
+<BODY>
+<H1>/secret/top_secret/index.html</H1>
+</BODY>
+</HTML>
diff --git a/lib/inets/test/old_httpd_SUITE_data/server_root/htdocs/echo.shtml b/lib/inets/test/old_httpd_SUITE_data/server_root/htdocs/echo.shtml
new file mode 100644
index 0000000000..141db5be59
--- /dev/null
+++ b/lib/inets/test/old_httpd_SUITE_data/server_root/htdocs/echo.shtml
@@ -0,0 +1,35 @@
+<HTML>
+<HEAD>
+<TITLE>/echo.shtml</TITLE>
+</HEAD>
+<BODY>
+<H1>/echo.shtml</H1>
+
+<P>DOCUMENT_NAME: <!--#echo var="DOCUMENT_NAME"-->
+
+<P>DOCUMENT_URI: <!--#echo var="DOCUMENT_URI"-->
+
+<P>QUERY_STRING_UNESCAPED: <!--#echo var="QUERY_STRING_UNESCAPED"-->
+
+<P>DATE_LOCAL: <!--#echo var="DATE_LOCAL"-->
+
+<P>DATE_GMT: <!--#echo var="DATE_GMT"-->
+
+<P>LAST_MODIFIED: <!--#echo var="LAST_MODIFIED"-->
+
+<P>NOT_DEFINED: <!--#echo var="NOT_DEFINED"-->
+
+<P>[<A HREF="ssi.html">Back</A>]
+
+</BODY>
+</HTML>
+
+
+
+
+
+
+
+
+
+
diff --git a/lib/inets/test/old_httpd_SUITE_data/server_root/htdocs/exec.shtml b/lib/inets/test/old_httpd_SUITE_data/server_root/htdocs/exec.shtml
new file mode 100644
index 0000000000..97333da898
--- /dev/null
+++ b/lib/inets/test/old_httpd_SUITE_data/server_root/htdocs/exec.shtml
@@ -0,0 +1,30 @@
+<HTML>
+<HEAD>
+<TITLE>/exec.shtml</TITLE>
+</HEAD>
+<BODY>
+<H1>/exec.shtml</H1>
+<PRE>
+<!--#exec cmd="ls"-->
+<HR>
+<!--#exec cmd="printenv"-->
+<HR>
+<!--#exec cmd="sunemaja"-->
+<HR>
+<!--#exec cgi="/cgi-bin/printenv.sh"-->
+</PRE>
+
+<P>[<A HREF="ssi.html">Back</A>]
+
+</BODY>
+</HTML>
+
+
+
+
+
+
+
+
+
+
diff --git a/lib/inets/test/old_httpd_SUITE_data/server_root/htdocs/flastmod.shtml b/lib/inets/test/old_httpd_SUITE_data/server_root/htdocs/flastmod.shtml
new file mode 100644
index 0000000000..d54c36fe50
--- /dev/null
+++ b/lib/inets/test/old_httpd_SUITE_data/server_root/htdocs/flastmod.shtml
@@ -0,0 +1,29 @@
+<HTML>
+<HEAD>
+<TITLE>/flastmod.shtml</TITLE>
+</HEAD>
+<BODY>
+<H1>/flastmod.shtml</H1>
+
+<P>Last modification of index.html: <!--#flastmod file="index.html"-->
+
+<P>Last modification of not_defined.html: <!--#flastmod file="not_defined.html"-->
+
+<P>Last modification of /misc/friedrich.html: <!--#flastmod virtual="/misc/friedrich.html"-->
+
+<P>Last modification of /misc/not_defined.html: <!--#flastmod virtual="/misc/not_defined.html"-->
+
+<P>[<A HREF="ssi.html">Back</A>]
+
+</BODY>
+</HTML>
+
+
+
+
+
+
+
+
+
+
diff --git a/lib/inets/test/old_httpd_SUITE_data/server_root/htdocs/fsize.shtml b/lib/inets/test/old_httpd_SUITE_data/server_root/htdocs/fsize.shtml
new file mode 100644
index 0000000000..570ee9cf6d
--- /dev/null
+++ b/lib/inets/test/old_httpd_SUITE_data/server_root/htdocs/fsize.shtml
@@ -0,0 +1,29 @@
+<HTML>
+<HEAD>
+<TITLE>/fsize.shtml</TITLE>
+</HEAD>
+<BODY>
+<H1>/fsize.shtml</H1>
+
+<P>Size of index.html: <!--#fsize file="index.html"-->
+
+<P>Size of not_defined.html: <!--#fsize file="not_defined.html"-->
+
+<P>Size of /misc/friedrich.html: <!--#fsize virtual="/misc/friedrich.html"-->
+
+<P>Size of /misc/not_defined.html: <!--#fsize virtual="/misc/not_defined.html"-->
+
+<P>[<A HREF="ssi.html">Back</A>]
+
+</BODY>
+</HTML>
+
+
+
+
+
+
+
+
+
+
diff --git a/lib/inets/test/old_httpd_SUITE_data/server_root/htdocs/include.shtml b/lib/inets/test/old_httpd_SUITE_data/server_root/htdocs/include.shtml
new file mode 100644
index 0000000000..529aad0437
--- /dev/null
+++ b/lib/inets/test/old_httpd_SUITE_data/server_root/htdocs/include.shtml
@@ -0,0 +1,33 @@
+<HTML>
+<HEAD>
+<TITLE>/include.shtml</TITLE>
+</HEAD>
+<BODY>
+<H1>/include.shtml</H1>
+
+<P>Include /misc/friedrich.html:
+<!--#include virtual="/misc/friedrich.html"-->
+
+<P>Include /misc/not_defined.html:
+<!--#include virtual="/misc/not_defined.html"-->
+
+<P>Include misc/friedrich.html:
+<!--#include file="misc/friedrich.html"-->
+
+<P>Include not_defined.html:
+<!--#include file="not_defined.html"-->
+
+<P>[<A HREF="ssi.html">Back</A>]
+
+</BODY>
+</HTML>
+
+
+
+
+
+
+
+
+
+
diff --git a/lib/inets/test/old_httpd_SUITE_data/server_root/htdocs/index.html b/lib/inets/test/old_httpd_SUITE_data/server_root/htdocs/index.html
new file mode 100644
index 0000000000..cfdc9f9ab7
--- /dev/null
+++ b/lib/inets/test/old_httpd_SUITE_data/server_root/htdocs/index.html
@@ -0,0 +1,25 @@
+<HTML>
+<HEAD>
+<TITLE>/index.html</TITLE>
+</HEAD>
+<BODY>
+<H1>/index.html</H1>
+
+<STRONG>Server-Side Include (SSI) commands:</STRONG><BR>
+<A HREF="config.shtml">config</A><BR>
+<A HREF="echo.shtml">echo</A><BR>
+<A HREF="exec.shtml">exec</A><BR>
+<A HREF="flastmod.shtml">flastmod</A><BR>
+<A HREF="fsize.shtml">fsize</A><BR>
+<A HREF="include.shtml">include</A><BR>
+
+<BR>
+<BR>
+
+<STRONG>ESI callback:</STRING><BR>
+<A HREF="cgi-bin/erl/httpd_example/get">cgi-bin/erl/httpd_example/get</A><BR>
+<A HREF="cgi-bin/erl/httpd_example/yahoo">cgi-bin/erl/httpd_example/yahoo</A><BR>
+<A HREF="cgi-bin/erl/httpd_example/test1">cgi-bin/erl/httpd_example/test1</A><BR>
+
+</BODY>
+</HTML>
diff --git a/lib/inets/test/old_httpd_SUITE_data/server_root/htdocs/last_modified.html b/lib/inets/test/old_httpd_SUITE_data/server_root/htdocs/last_modified.html
new file mode 100644
index 0000000000..65c1790813
--- /dev/null
+++ b/lib/inets/test/old_httpd_SUITE_data/server_root/htdocs/last_modified.html
@@ -0,0 +1,22 @@
+<HTML>
+<HEAD>
+<TITLE>/last_modified.html</TITLE>
+</HEAD>
+<BODY>
+<H1>/last_modified.html</H1>
+
+<P>This document is only used for test of illegal last-modified date.</P>
+
+
+</BODY>
+</HTML>
+
+
+
+
+
+
+
+
+
+
diff --git a/lib/inets/test/old_httpd_SUITE_data/server_root/htdocs/misc/friedrich.html b/lib/inets/test/old_httpd_SUITE_data/server_root/htdocs/misc/friedrich.html
new file mode 100644
index 0000000000..d7953d5df4
--- /dev/null
+++ b/lib/inets/test/old_httpd_SUITE_data/server_root/htdocs/misc/friedrich.html
@@ -0,0 +1,7 @@
+<P><CITE>
+Talking much about oneself can also be a means to conceal oneself.<BR>
+-- Friedrich Nietzsche
+</CITE>
+
+<P>Nested Include:
+<!--#include file="misc/oech.html"-->
diff --git a/lib/inets/test/old_httpd_SUITE_data/server_root/htdocs/misc/oech.html b/lib/inets/test/old_httpd_SUITE_data/server_root/htdocs/misc/oech.html
new file mode 100644
index 0000000000..506064bf04
--- /dev/null
+++ b/lib/inets/test/old_httpd_SUITE_data/server_root/htdocs/misc/oech.html
@@ -0,0 +1,4 @@
+<P><CITE>
+What excuses stand in your way? How can you eliminate them?<BR>
+-- Roger von Oech
+</CITE>
diff --git a/lib/inets/test/old_httpd_SUITE_data/server_root/htdocs/misc/welcome.html b/lib/inets/test/old_httpd_SUITE_data/server_root/htdocs/misc/welcome.html
new file mode 100644
index 0000000000..8c17451f91
--- /dev/null
+++ b/lib/inets/test/old_httpd_SUITE_data/server_root/htdocs/misc/welcome.html
@@ -0,0 +1 @@
+<HTML></HTML>
diff --git a/lib/inets/test/old_httpd_SUITE_data/server_root/htdocs/mnesia_open/dummy.html b/lib/inets/test/old_httpd_SUITE_data/server_root/htdocs/mnesia_open/dummy.html
new file mode 100644
index 0000000000..a6e8a35a04
--- /dev/null
+++ b/lib/inets/test/old_httpd_SUITE_data/server_root/htdocs/mnesia_open/dummy.html
@@ -0,0 +1,10 @@
+<HTML>
+<HEAD>
+<TITLE>/open/dummy.html (17-Apr-1997)</TITLE>
+<!-- Created by: Joakim Greben�, 17-Apr-1997 -->
+<!-- Changed by: Joakim Greben�, 17-Apr-1997 -->
+</HEAD>
+<BODY>
+<H1>/open/dummy.html</H1>
+</BODY>
+</HTML>
diff --git a/lib/inets/test/old_httpd_SUITE_data/server_root/htdocs/mnesia_secret/dummy.html b/lib/inets/test/old_httpd_SUITE_data/server_root/htdocs/mnesia_secret/dummy.html
new file mode 100644
index 0000000000..016b04e540
--- /dev/null
+++ b/lib/inets/test/old_httpd_SUITE_data/server_root/htdocs/mnesia_secret/dummy.html
@@ -0,0 +1,10 @@
+<HTML>
+<HEAD>
+<TITLE>/secret/dummy.html (17-Apr-1997)</TITLE>
+<!-- Created by: Joakim Greben�, 17-Apr-1997 -->
+<!-- Changed by: Joakim Greben�, 17-Apr-1997 -->
+</HEAD>
+<BODY>
+<H1>/secret/dummy.html</H1>
+</BODY>
+</HTML>
diff --git a/lib/inets/test/old_httpd_SUITE_data/server_root/htdocs/mnesia_secret/top_secret/index.html b/lib/inets/test/old_httpd_SUITE_data/server_root/htdocs/mnesia_secret/top_secret/index.html
new file mode 100644
index 0000000000..2d17e8b596
--- /dev/null
+++ b/lib/inets/test/old_httpd_SUITE_data/server_root/htdocs/mnesia_secret/top_secret/index.html
@@ -0,0 +1,9 @@
+<HTML>
+<HEAD>
+<TITLE>/mnesia_secret/top_secret/index.html (04-Feb-1998)</TITLE>
+<!-- Created by: Mattias Nilsson, 04-Feb-1998 -->
+</HEAD>
+<BODY>
+<H1>/mnesia_secret/top_secret/index.html</H1>
+</BODY>
+</HTML>
diff --git a/lib/inets/test/old_httpd_SUITE_data/server_root/htdocs/open/dummy.html b/lib/inets/test/old_httpd_SUITE_data/server_root/htdocs/open/dummy.html
new file mode 100644
index 0000000000..a6e8a35a04
--- /dev/null
+++ b/lib/inets/test/old_httpd_SUITE_data/server_root/htdocs/open/dummy.html
@@ -0,0 +1,10 @@
+<HTML>
+<HEAD>
+<TITLE>/open/dummy.html (17-Apr-1997)</TITLE>
+<!-- Created by: Joakim Greben�, 17-Apr-1997 -->
+<!-- Changed by: Joakim Greben�, 17-Apr-1997 -->
+</HEAD>
+<BODY>
+<H1>/open/dummy.html</H1>
+</BODY>
+</HTML>
diff --git a/lib/inets/test/old_httpd_SUITE_data/server_root/htdocs/secret/dummy.html b/lib/inets/test/old_httpd_SUITE_data/server_root/htdocs/secret/dummy.html
new file mode 100644
index 0000000000..016b04e540
--- /dev/null
+++ b/lib/inets/test/old_httpd_SUITE_data/server_root/htdocs/secret/dummy.html
@@ -0,0 +1,10 @@
+<HTML>
+<HEAD>
+<TITLE>/secret/dummy.html (17-Apr-1997)</TITLE>
+<!-- Created by: Joakim Greben�, 17-Apr-1997 -->
+<!-- Changed by: Joakim Greben�, 17-Apr-1997 -->
+</HEAD>
+<BODY>
+<H1>/secret/dummy.html</H1>
+</BODY>
+</HTML>
diff --git a/lib/inets/test/old_httpd_SUITE_data/server_root/htdocs/secret/top_secret/index.html b/lib/inets/test/old_httpd_SUITE_data/server_root/htdocs/secret/top_secret/index.html
new file mode 100644
index 0000000000..34db3d5d1a
--- /dev/null
+++ b/lib/inets/test/old_httpd_SUITE_data/server_root/htdocs/secret/top_secret/index.html
@@ -0,0 +1,9 @@
+<HTML>
+<HEAD>
+<TITLE>/secret/top_secret/index.html (04-Feb-1998)</TITLE>
+<!-- Created by: Mattias Nilsson, 04-Feb-1998 -->
+</HEAD>
+<BODY>
+<H1>/secret/top_secret/index.html</H1>
+</BODY>
+</HTML>
diff --git a/lib/inets/test/httpd_SUITE_data/server_root/icons/README b/lib/inets/test/old_httpd_SUITE_data/server_root/icons/README
index a1fc5a5a9c..a1fc5a5a9c 100644
--- a/lib/inets/test/httpd_SUITE_data/server_root/icons/README
+++ b/lib/inets/test/old_httpd_SUITE_data/server_root/icons/README
diff --git a/lib/inets/test/old_httpd_SUITE_data/server_root/icons/a.gif b/lib/inets/test/old_httpd_SUITE_data/server_root/icons/a.gif
new file mode 100644
index 0000000000..bb23d971f4
--- /dev/null
+++ b/lib/inets/test/old_httpd_SUITE_data/server_root/icons/a.gif
Binary files differ
diff --git a/lib/inets/test/old_httpd_SUITE_data/server_root/icons/alert.black.gif b/lib/inets/test/old_httpd_SUITE_data/server_root/icons/alert.black.gif
new file mode 100644
index 0000000000..eaecd2172a
--- /dev/null
+++ b/lib/inets/test/old_httpd_SUITE_data/server_root/icons/alert.black.gif
Binary files differ
diff --git a/lib/inets/test/old_httpd_SUITE_data/server_root/icons/alert.red.gif b/lib/inets/test/old_httpd_SUITE_data/server_root/icons/alert.red.gif
new file mode 100644
index 0000000000..a423894043
--- /dev/null
+++ b/lib/inets/test/old_httpd_SUITE_data/server_root/icons/alert.red.gif
Binary files differ
diff --git a/lib/inets/test/old_httpd_SUITE_data/server_root/icons/apache_pb.gif b/lib/inets/test/old_httpd_SUITE_data/server_root/icons/apache_pb.gif
new file mode 100644
index 0000000000..3a1c139fc4
--- /dev/null
+++ b/lib/inets/test/old_httpd_SUITE_data/server_root/icons/apache_pb.gif
Binary files differ
diff --git a/lib/inets/test/old_httpd_SUITE_data/server_root/icons/back.gif b/lib/inets/test/old_httpd_SUITE_data/server_root/icons/back.gif
new file mode 100644
index 0000000000..a694ae1ec3
--- /dev/null
+++ b/lib/inets/test/old_httpd_SUITE_data/server_root/icons/back.gif
Binary files differ
diff --git a/lib/inets/test/old_httpd_SUITE_data/server_root/icons/ball.gray.gif b/lib/inets/test/old_httpd_SUITE_data/server_root/icons/ball.gray.gif
new file mode 100644
index 0000000000..eb84268c4c
--- /dev/null
+++ b/lib/inets/test/old_httpd_SUITE_data/server_root/icons/ball.gray.gif
Binary files differ
diff --git a/lib/inets/test/old_httpd_SUITE_data/server_root/icons/ball.red.gif b/lib/inets/test/old_httpd_SUITE_data/server_root/icons/ball.red.gif
new file mode 100644
index 0000000000..a8425cb574
--- /dev/null
+++ b/lib/inets/test/old_httpd_SUITE_data/server_root/icons/ball.red.gif
Binary files differ
diff --git a/lib/inets/test/old_httpd_SUITE_data/server_root/icons/binary.gif b/lib/inets/test/old_httpd_SUITE_data/server_root/icons/binary.gif
new file mode 100644
index 0000000000..9a15cbae04
--- /dev/null
+++ b/lib/inets/test/old_httpd_SUITE_data/server_root/icons/binary.gif
Binary files differ
diff --git a/lib/inets/test/old_httpd_SUITE_data/server_root/icons/binhex.gif b/lib/inets/test/old_httpd_SUITE_data/server_root/icons/binhex.gif
new file mode 100644
index 0000000000..62d0363108
--- /dev/null
+++ b/lib/inets/test/old_httpd_SUITE_data/server_root/icons/binhex.gif
Binary files differ
diff --git a/lib/inets/test/old_httpd_SUITE_data/server_root/icons/blank.gif b/lib/inets/test/old_httpd_SUITE_data/server_root/icons/blank.gif
new file mode 100644
index 0000000000..0ccf01e198
--- /dev/null
+++ b/lib/inets/test/old_httpd_SUITE_data/server_root/icons/blank.gif
Binary files differ
diff --git a/lib/inets/test/old_httpd_SUITE_data/server_root/icons/bomb.gif b/lib/inets/test/old_httpd_SUITE_data/server_root/icons/bomb.gif
new file mode 100644
index 0000000000..270fdb1c06
--- /dev/null
+++ b/lib/inets/test/old_httpd_SUITE_data/server_root/icons/bomb.gif
Binary files differ
diff --git a/lib/inets/test/old_httpd_SUITE_data/server_root/icons/box1.gif b/lib/inets/test/old_httpd_SUITE_data/server_root/icons/box1.gif
new file mode 100644
index 0000000000..65dcd002ea
--- /dev/null
+++ b/lib/inets/test/old_httpd_SUITE_data/server_root/icons/box1.gif
Binary files differ
diff --git a/lib/inets/test/old_httpd_SUITE_data/server_root/icons/box2.gif b/lib/inets/test/old_httpd_SUITE_data/server_root/icons/box2.gif
new file mode 100644
index 0000000000..c43bc4faec
--- /dev/null
+++ b/lib/inets/test/old_httpd_SUITE_data/server_root/icons/box2.gif
Binary files differ
diff --git a/lib/inets/test/old_httpd_SUITE_data/server_root/icons/broken.gif b/lib/inets/test/old_httpd_SUITE_data/server_root/icons/broken.gif
new file mode 100644
index 0000000000..9f8cbe9f76
--- /dev/null
+++ b/lib/inets/test/old_httpd_SUITE_data/server_root/icons/broken.gif
Binary files differ
diff --git a/lib/inets/test/old_httpd_SUITE_data/server_root/icons/burst.gif b/lib/inets/test/old_httpd_SUITE_data/server_root/icons/burst.gif
new file mode 100644
index 0000000000..fbdcf575f7
--- /dev/null
+++ b/lib/inets/test/old_httpd_SUITE_data/server_root/icons/burst.gif
Binary files differ
diff --git a/lib/inets/test/old_httpd_SUITE_data/server_root/icons/button1.gif b/lib/inets/test/old_httpd_SUITE_data/server_root/icons/button1.gif
new file mode 100644
index 0000000000..eb97cb7333
--- /dev/null
+++ b/lib/inets/test/old_httpd_SUITE_data/server_root/icons/button1.gif
Binary files differ
diff --git a/lib/inets/test/old_httpd_SUITE_data/server_root/icons/button10.gif b/lib/inets/test/old_httpd_SUITE_data/server_root/icons/button10.gif
new file mode 100644
index 0000000000..fe0c97998c
--- /dev/null
+++ b/lib/inets/test/old_httpd_SUITE_data/server_root/icons/button10.gif
Binary files differ
diff --git a/lib/inets/test/old_httpd_SUITE_data/server_root/icons/button2.gif b/lib/inets/test/old_httpd_SUITE_data/server_root/icons/button2.gif
new file mode 100644
index 0000000000..7698455bf9
--- /dev/null
+++ b/lib/inets/test/old_httpd_SUITE_data/server_root/icons/button2.gif
Binary files differ
diff --git a/lib/inets/test/old_httpd_SUITE_data/server_root/icons/button3.gif b/lib/inets/test/old_httpd_SUITE_data/server_root/icons/button3.gif
new file mode 100644
index 0000000000..a8b8319232
--- /dev/null
+++ b/lib/inets/test/old_httpd_SUITE_data/server_root/icons/button3.gif
Binary files differ
diff --git a/lib/inets/test/old_httpd_SUITE_data/server_root/icons/button4.gif b/lib/inets/test/old_httpd_SUITE_data/server_root/icons/button4.gif
new file mode 100644
index 0000000000..0fd15a0d7f
--- /dev/null
+++ b/lib/inets/test/old_httpd_SUITE_data/server_root/icons/button4.gif
Binary files differ
diff --git a/lib/inets/test/old_httpd_SUITE_data/server_root/icons/button5.gif b/lib/inets/test/old_httpd_SUITE_data/server_root/icons/button5.gif
new file mode 100644
index 0000000000..64241e5c5d
--- /dev/null
+++ b/lib/inets/test/old_httpd_SUITE_data/server_root/icons/button5.gif
Binary files differ
diff --git a/lib/inets/test/old_httpd_SUITE_data/server_root/icons/button6.gif b/lib/inets/test/old_httpd_SUITE_data/server_root/icons/button6.gif
new file mode 100644
index 0000000000..867cfd1212
--- /dev/null
+++ b/lib/inets/test/old_httpd_SUITE_data/server_root/icons/button6.gif
Binary files differ
diff --git a/lib/inets/test/old_httpd_SUITE_data/server_root/icons/button7.gif b/lib/inets/test/old_httpd_SUITE_data/server_root/icons/button7.gif
new file mode 100644
index 0000000000..b3f5fb248f
--- /dev/null
+++ b/lib/inets/test/old_httpd_SUITE_data/server_root/icons/button7.gif
Binary files differ
diff --git a/lib/inets/test/old_httpd_SUITE_data/server_root/icons/button8.gif b/lib/inets/test/old_httpd_SUITE_data/server_root/icons/button8.gif
new file mode 100644
index 0000000000..7a308be8f6
--- /dev/null
+++ b/lib/inets/test/old_httpd_SUITE_data/server_root/icons/button8.gif
Binary files differ
diff --git a/lib/inets/test/old_httpd_SUITE_data/server_root/icons/button9.gif b/lib/inets/test/old_httpd_SUITE_data/server_root/icons/button9.gif
new file mode 100644
index 0000000000..9acba576c0
--- /dev/null
+++ b/lib/inets/test/old_httpd_SUITE_data/server_root/icons/button9.gif
Binary files differ
diff --git a/lib/inets/test/old_httpd_SUITE_data/server_root/icons/buttonl.gif b/lib/inets/test/old_httpd_SUITE_data/server_root/icons/buttonl.gif
new file mode 100644
index 0000000000..3883088e7a
--- /dev/null
+++ b/lib/inets/test/old_httpd_SUITE_data/server_root/icons/buttonl.gif
Binary files differ
diff --git a/lib/inets/test/old_httpd_SUITE_data/server_root/icons/buttonr.gif b/lib/inets/test/old_httpd_SUITE_data/server_root/icons/buttonr.gif
new file mode 100644
index 0000000000..c4dc3887db
--- /dev/null
+++ b/lib/inets/test/old_httpd_SUITE_data/server_root/icons/buttonr.gif
Binary files differ
diff --git a/lib/inets/test/old_httpd_SUITE_data/server_root/icons/c.gif b/lib/inets/test/old_httpd_SUITE_data/server_root/icons/c.gif
new file mode 100644
index 0000000000..7555b6c164
--- /dev/null
+++ b/lib/inets/test/old_httpd_SUITE_data/server_root/icons/c.gif
Binary files differ
diff --git a/lib/inets/test/old_httpd_SUITE_data/server_root/icons/comp.blue.gif b/lib/inets/test/old_httpd_SUITE_data/server_root/icons/comp.blue.gif
new file mode 100644
index 0000000000..f8d76a8c23
--- /dev/null
+++ b/lib/inets/test/old_httpd_SUITE_data/server_root/icons/comp.blue.gif
Binary files differ
diff --git a/lib/inets/test/old_httpd_SUITE_data/server_root/icons/comp.gray.gif b/lib/inets/test/old_httpd_SUITE_data/server_root/icons/comp.gray.gif
new file mode 100644
index 0000000000..7664cd0364
--- /dev/null
+++ b/lib/inets/test/old_httpd_SUITE_data/server_root/icons/comp.gray.gif
Binary files differ
diff --git a/lib/inets/test/old_httpd_SUITE_data/server_root/icons/compressed.gif b/lib/inets/test/old_httpd_SUITE_data/server_root/icons/compressed.gif
new file mode 100644
index 0000000000..39e732739f
--- /dev/null
+++ b/lib/inets/test/old_httpd_SUITE_data/server_root/icons/compressed.gif
Binary files differ
diff --git a/lib/inets/test/old_httpd_SUITE_data/server_root/icons/continued.gif b/lib/inets/test/old_httpd_SUITE_data/server_root/icons/continued.gif
new file mode 100644
index 0000000000..b0ffb7e0cc
--- /dev/null
+++ b/lib/inets/test/old_httpd_SUITE_data/server_root/icons/continued.gif
Binary files differ
diff --git a/lib/inets/test/old_httpd_SUITE_data/server_root/icons/dir.gif b/lib/inets/test/old_httpd_SUITE_data/server_root/icons/dir.gif
new file mode 100644
index 0000000000..48264601ae
--- /dev/null
+++ b/lib/inets/test/old_httpd_SUITE_data/server_root/icons/dir.gif
Binary files differ
diff --git a/lib/inets/test/old_httpd_SUITE_data/server_root/icons/down.gif b/lib/inets/test/old_httpd_SUITE_data/server_root/icons/down.gif
new file mode 100644
index 0000000000..a354c871cd
--- /dev/null
+++ b/lib/inets/test/old_httpd_SUITE_data/server_root/icons/down.gif
Binary files differ
diff --git a/lib/inets/test/old_httpd_SUITE_data/server_root/icons/dvi.gif b/lib/inets/test/old_httpd_SUITE_data/server_root/icons/dvi.gif
new file mode 100644
index 0000000000..791be33105
--- /dev/null
+++ b/lib/inets/test/old_httpd_SUITE_data/server_root/icons/dvi.gif
Binary files differ
diff --git a/lib/inets/test/old_httpd_SUITE_data/server_root/icons/f.gif b/lib/inets/test/old_httpd_SUITE_data/server_root/icons/f.gif
new file mode 100644
index 0000000000..fbe353c282
--- /dev/null
+++ b/lib/inets/test/old_httpd_SUITE_data/server_root/icons/f.gif
Binary files differ
diff --git a/lib/inets/test/old_httpd_SUITE_data/server_root/icons/folder.gif b/lib/inets/test/old_httpd_SUITE_data/server_root/icons/folder.gif
new file mode 100644
index 0000000000..48264601ae
--- /dev/null
+++ b/lib/inets/test/old_httpd_SUITE_data/server_root/icons/folder.gif
Binary files differ
diff --git a/lib/inets/test/old_httpd_SUITE_data/server_root/icons/folder.open.gif b/lib/inets/test/old_httpd_SUITE_data/server_root/icons/folder.open.gif
new file mode 100644
index 0000000000..30979cb528
--- /dev/null
+++ b/lib/inets/test/old_httpd_SUITE_data/server_root/icons/folder.open.gif
Binary files differ
diff --git a/lib/inets/test/old_httpd_SUITE_data/server_root/icons/folder.sec.gif b/lib/inets/test/old_httpd_SUITE_data/server_root/icons/folder.sec.gif
new file mode 100644
index 0000000000..75332d9e59
--- /dev/null
+++ b/lib/inets/test/old_httpd_SUITE_data/server_root/icons/folder.sec.gif
Binary files differ
diff --git a/lib/inets/test/old_httpd_SUITE_data/server_root/icons/forward.gif b/lib/inets/test/old_httpd_SUITE_data/server_root/icons/forward.gif
new file mode 100644
index 0000000000..b2959b4c85
--- /dev/null
+++ b/lib/inets/test/old_httpd_SUITE_data/server_root/icons/forward.gif
Binary files differ
diff --git a/lib/inets/test/old_httpd_SUITE_data/server_root/icons/generic.gif b/lib/inets/test/old_httpd_SUITE_data/server_root/icons/generic.gif
new file mode 100644
index 0000000000..de60b2940f
--- /dev/null
+++ b/lib/inets/test/old_httpd_SUITE_data/server_root/icons/generic.gif
Binary files differ
diff --git a/lib/inets/test/old_httpd_SUITE_data/server_root/icons/generic.red.gif b/lib/inets/test/old_httpd_SUITE_data/server_root/icons/generic.red.gif
new file mode 100644
index 0000000000..94743981d9
--- /dev/null
+++ b/lib/inets/test/old_httpd_SUITE_data/server_root/icons/generic.red.gif
Binary files differ
diff --git a/lib/inets/test/old_httpd_SUITE_data/server_root/icons/generic.sec.gif b/lib/inets/test/old_httpd_SUITE_data/server_root/icons/generic.sec.gif
new file mode 100644
index 0000000000..88d5240c3c
--- /dev/null
+++ b/lib/inets/test/old_httpd_SUITE_data/server_root/icons/generic.sec.gif
Binary files differ
diff --git a/lib/inets/test/old_httpd_SUITE_data/server_root/icons/hand.right.gif b/lib/inets/test/old_httpd_SUITE_data/server_root/icons/hand.right.gif
new file mode 100644
index 0000000000..5cdbc7206d
--- /dev/null
+++ b/lib/inets/test/old_httpd_SUITE_data/server_root/icons/hand.right.gif
Binary files differ
diff --git a/lib/inets/test/old_httpd_SUITE_data/server_root/icons/hand.up.gif b/lib/inets/test/old_httpd_SUITE_data/server_root/icons/hand.up.gif
new file mode 100644
index 0000000000..85a5d68317
--- /dev/null
+++ b/lib/inets/test/old_httpd_SUITE_data/server_root/icons/hand.up.gif
Binary files differ
diff --git a/lib/inets/test/old_httpd_SUITE_data/server_root/icons/htdig.gif b/lib/inets/test/old_httpd_SUITE_data/server_root/icons/htdig.gif
new file mode 100644
index 0000000000..35443fb63a
--- /dev/null
+++ b/lib/inets/test/old_httpd_SUITE_data/server_root/icons/htdig.gif
Binary files differ
diff --git a/lib/inets/test/old_httpd_SUITE_data/server_root/icons/icon.sheet.gif b/lib/inets/test/old_httpd_SUITE_data/server_root/icons/icon.sheet.gif
new file mode 100644
index 0000000000..ad1686e448
--- /dev/null
+++ b/lib/inets/test/old_httpd_SUITE_data/server_root/icons/icon.sheet.gif
Binary files differ
diff --git a/lib/inets/test/old_httpd_SUITE_data/server_root/icons/image1.gif b/lib/inets/test/old_httpd_SUITE_data/server_root/icons/image1.gif
new file mode 100644
index 0000000000..01e442bfa9
--- /dev/null
+++ b/lib/inets/test/old_httpd_SUITE_data/server_root/icons/image1.gif
Binary files differ
diff --git a/lib/inets/test/old_httpd_SUITE_data/server_root/icons/image2.gif b/lib/inets/test/old_httpd_SUITE_data/server_root/icons/image2.gif
new file mode 100644
index 0000000000..751faeea36
--- /dev/null
+++ b/lib/inets/test/old_httpd_SUITE_data/server_root/icons/image2.gif
Binary files differ
diff --git a/lib/inets/test/old_httpd_SUITE_data/server_root/icons/image3.gif b/lib/inets/test/old_httpd_SUITE_data/server_root/icons/image3.gif
new file mode 100644
index 0000000000..4f30484ff6
--- /dev/null
+++ b/lib/inets/test/old_httpd_SUITE_data/server_root/icons/image3.gif
Binary files differ
diff --git a/lib/inets/test/old_httpd_SUITE_data/server_root/icons/index.gif b/lib/inets/test/old_httpd_SUITE_data/server_root/icons/index.gif
new file mode 100644
index 0000000000..162478fb3a
--- /dev/null
+++ b/lib/inets/test/old_httpd_SUITE_data/server_root/icons/index.gif
Binary files differ
diff --git a/lib/inets/test/old_httpd_SUITE_data/server_root/icons/layout.gif b/lib/inets/test/old_httpd_SUITE_data/server_root/icons/layout.gif
new file mode 100644
index 0000000000..c96338a152
--- /dev/null
+++ b/lib/inets/test/old_httpd_SUITE_data/server_root/icons/layout.gif
Binary files differ
diff --git a/lib/inets/test/old_httpd_SUITE_data/server_root/icons/left.gif b/lib/inets/test/old_httpd_SUITE_data/server_root/icons/left.gif
new file mode 100644
index 0000000000..279e6710d4
--- /dev/null
+++ b/lib/inets/test/old_httpd_SUITE_data/server_root/icons/left.gif
Binary files differ
diff --git a/lib/inets/test/old_httpd_SUITE_data/server_root/icons/link.gif b/lib/inets/test/old_httpd_SUITE_data/server_root/icons/link.gif
new file mode 100644
index 0000000000..c5b6889a76
--- /dev/null
+++ b/lib/inets/test/old_httpd_SUITE_data/server_root/icons/link.gif
Binary files differ
diff --git a/lib/inets/test/old_httpd_SUITE_data/server_root/icons/movie.gif b/lib/inets/test/old_httpd_SUITE_data/server_root/icons/movie.gif
new file mode 100644
index 0000000000..0035183774
--- /dev/null
+++ b/lib/inets/test/old_httpd_SUITE_data/server_root/icons/movie.gif
Binary files differ
diff --git a/lib/inets/test/old_httpd_SUITE_data/server_root/icons/p.gif b/lib/inets/test/old_httpd_SUITE_data/server_root/icons/p.gif
new file mode 100644
index 0000000000..7b917b4e91
--- /dev/null
+++ b/lib/inets/test/old_httpd_SUITE_data/server_root/icons/p.gif
Binary files differ
diff --git a/lib/inets/test/old_httpd_SUITE_data/server_root/icons/patch.gif b/lib/inets/test/old_httpd_SUITE_data/server_root/icons/patch.gif
new file mode 100644
index 0000000000..39bc90e795
--- /dev/null
+++ b/lib/inets/test/old_httpd_SUITE_data/server_root/icons/patch.gif
Binary files differ
diff --git a/lib/inets/test/old_httpd_SUITE_data/server_root/icons/pdf.gif b/lib/inets/test/old_httpd_SUITE_data/server_root/icons/pdf.gif
new file mode 100644
index 0000000000..c88fd777c4
--- /dev/null
+++ b/lib/inets/test/old_httpd_SUITE_data/server_root/icons/pdf.gif
Binary files differ
diff --git a/lib/inets/test/old_httpd_SUITE_data/server_root/icons/pie0.gif b/lib/inets/test/old_httpd_SUITE_data/server_root/icons/pie0.gif
new file mode 100644
index 0000000000..6f7a0ae7a7
--- /dev/null
+++ b/lib/inets/test/old_httpd_SUITE_data/server_root/icons/pie0.gif
Binary files differ
diff --git a/lib/inets/test/old_httpd_SUITE_data/server_root/icons/pie1.gif b/lib/inets/test/old_httpd_SUITE_data/server_root/icons/pie1.gif
new file mode 100644
index 0000000000..03aa6be71e
--- /dev/null
+++ b/lib/inets/test/old_httpd_SUITE_data/server_root/icons/pie1.gif
Binary files differ
diff --git a/lib/inets/test/old_httpd_SUITE_data/server_root/icons/pie2.gif b/lib/inets/test/old_httpd_SUITE_data/server_root/icons/pie2.gif
new file mode 100644
index 0000000000..b04c5e0908
--- /dev/null
+++ b/lib/inets/test/old_httpd_SUITE_data/server_root/icons/pie2.gif
Binary files differ
diff --git a/lib/inets/test/old_httpd_SUITE_data/server_root/icons/pie3.gif b/lib/inets/test/old_httpd_SUITE_data/server_root/icons/pie3.gif
new file mode 100644
index 0000000000..4db9d023ed
--- /dev/null
+++ b/lib/inets/test/old_httpd_SUITE_data/server_root/icons/pie3.gif
Binary files differ
diff --git a/lib/inets/test/old_httpd_SUITE_data/server_root/icons/pie4.gif b/lib/inets/test/old_httpd_SUITE_data/server_root/icons/pie4.gif
new file mode 100644
index 0000000000..93471fdd88
--- /dev/null
+++ b/lib/inets/test/old_httpd_SUITE_data/server_root/icons/pie4.gif
Binary files differ
diff --git a/lib/inets/test/old_httpd_SUITE_data/server_root/icons/pie5.gif b/lib/inets/test/old_httpd_SUITE_data/server_root/icons/pie5.gif
new file mode 100644
index 0000000000..57aee93f07
--- /dev/null
+++ b/lib/inets/test/old_httpd_SUITE_data/server_root/icons/pie5.gif
Binary files differ
diff --git a/lib/inets/test/old_httpd_SUITE_data/server_root/icons/pie6.gif b/lib/inets/test/old_httpd_SUITE_data/server_root/icons/pie6.gif
new file mode 100644
index 0000000000..0dc327b569
--- /dev/null
+++ b/lib/inets/test/old_httpd_SUITE_data/server_root/icons/pie6.gif
Binary files differ
diff --git a/lib/inets/test/old_httpd_SUITE_data/server_root/icons/pie7.gif b/lib/inets/test/old_httpd_SUITE_data/server_root/icons/pie7.gif
new file mode 100644
index 0000000000..8661337f06
--- /dev/null
+++ b/lib/inets/test/old_httpd_SUITE_data/server_root/icons/pie7.gif
Binary files differ
diff --git a/lib/inets/test/old_httpd_SUITE_data/server_root/icons/pie8.gif b/lib/inets/test/old_httpd_SUITE_data/server_root/icons/pie8.gif
new file mode 100644
index 0000000000..59ddb34ce0
--- /dev/null
+++ b/lib/inets/test/old_httpd_SUITE_data/server_root/icons/pie8.gif
Binary files differ
diff --git a/lib/inets/test/old_httpd_SUITE_data/server_root/icons/portal.gif b/lib/inets/test/old_httpd_SUITE_data/server_root/icons/portal.gif
new file mode 100644
index 0000000000..0e6e506e00
--- /dev/null
+++ b/lib/inets/test/old_httpd_SUITE_data/server_root/icons/portal.gif
Binary files differ
diff --git a/lib/inets/test/old_httpd_SUITE_data/server_root/icons/poweredby.gif b/lib/inets/test/old_httpd_SUITE_data/server_root/icons/poweredby.gif
new file mode 100644
index 0000000000..d324ab80ea
--- /dev/null
+++ b/lib/inets/test/old_httpd_SUITE_data/server_root/icons/poweredby.gif
Binary files differ
diff --git a/lib/inets/test/old_httpd_SUITE_data/server_root/icons/ps.gif b/lib/inets/test/old_httpd_SUITE_data/server_root/icons/ps.gif
new file mode 100644
index 0000000000..0f565bc1db
--- /dev/null
+++ b/lib/inets/test/old_httpd_SUITE_data/server_root/icons/ps.gif
Binary files differ
diff --git a/lib/inets/test/old_httpd_SUITE_data/server_root/icons/quill.gif b/lib/inets/test/old_httpd_SUITE_data/server_root/icons/quill.gif
new file mode 100644
index 0000000000..818a5cdc7e
--- /dev/null
+++ b/lib/inets/test/old_httpd_SUITE_data/server_root/icons/quill.gif
Binary files differ
diff --git a/lib/inets/test/old_httpd_SUITE_data/server_root/icons/right.gif b/lib/inets/test/old_httpd_SUITE_data/server_root/icons/right.gif
new file mode 100644
index 0000000000..b256e5f75f
--- /dev/null
+++ b/lib/inets/test/old_httpd_SUITE_data/server_root/icons/right.gif
Binary files differ
diff --git a/lib/inets/test/old_httpd_SUITE_data/server_root/icons/screw1.gif b/lib/inets/test/old_httpd_SUITE_data/server_root/icons/screw1.gif
new file mode 100644
index 0000000000..af6ba2b097
--- /dev/null
+++ b/lib/inets/test/old_httpd_SUITE_data/server_root/icons/screw1.gif
Binary files differ
diff --git a/lib/inets/test/old_httpd_SUITE_data/server_root/icons/screw2.gif b/lib/inets/test/old_httpd_SUITE_data/server_root/icons/screw2.gif
new file mode 100644
index 0000000000..06dccb3e44
--- /dev/null
+++ b/lib/inets/test/old_httpd_SUITE_data/server_root/icons/screw2.gif
Binary files differ
diff --git a/lib/inets/test/old_httpd_SUITE_data/server_root/icons/script.gif b/lib/inets/test/old_httpd_SUITE_data/server_root/icons/script.gif
new file mode 100644
index 0000000000..d8a853bc58
--- /dev/null
+++ b/lib/inets/test/old_httpd_SUITE_data/server_root/icons/script.gif
Binary files differ
diff --git a/lib/inets/test/old_httpd_SUITE_data/server_root/icons/sound1.gif b/lib/inets/test/old_httpd_SUITE_data/server_root/icons/sound1.gif
new file mode 100644
index 0000000000..8efb49f55d
--- /dev/null
+++ b/lib/inets/test/old_httpd_SUITE_data/server_root/icons/sound1.gif
Binary files differ
diff --git a/lib/inets/test/old_httpd_SUITE_data/server_root/icons/sound2.gif b/lib/inets/test/old_httpd_SUITE_data/server_root/icons/sound2.gif
new file mode 100644
index 0000000000..48e6a7fb2f
--- /dev/null
+++ b/lib/inets/test/old_httpd_SUITE_data/server_root/icons/sound2.gif
Binary files differ
diff --git a/lib/inets/test/old_httpd_SUITE_data/server_root/icons/sphere1.gif b/lib/inets/test/old_httpd_SUITE_data/server_root/icons/sphere1.gif
new file mode 100644
index 0000000000..7067070da2
--- /dev/null
+++ b/lib/inets/test/old_httpd_SUITE_data/server_root/icons/sphere1.gif
Binary files differ
diff --git a/lib/inets/test/old_httpd_SUITE_data/server_root/icons/sphere2.gif b/lib/inets/test/old_httpd_SUITE_data/server_root/icons/sphere2.gif
new file mode 100644
index 0000000000..a9e462a377
--- /dev/null
+++ b/lib/inets/test/old_httpd_SUITE_data/server_root/icons/sphere2.gif
Binary files differ
diff --git a/lib/inets/test/old_httpd_SUITE_data/server_root/icons/star.gif b/lib/inets/test/old_httpd_SUITE_data/server_root/icons/star.gif
new file mode 100644
index 0000000000..4cfe0a5e0f
--- /dev/null
+++ b/lib/inets/test/old_httpd_SUITE_data/server_root/icons/star.gif
Binary files differ
diff --git a/lib/inets/test/old_httpd_SUITE_data/server_root/icons/star_blank.gif b/lib/inets/test/old_httpd_SUITE_data/server_root/icons/star_blank.gif
new file mode 100644
index 0000000000..a0c83cb85b
--- /dev/null
+++ b/lib/inets/test/old_httpd_SUITE_data/server_root/icons/star_blank.gif
Binary files differ
diff --git a/lib/inets/test/old_httpd_SUITE_data/server_root/icons/tar.gif b/lib/inets/test/old_httpd_SUITE_data/server_root/icons/tar.gif
new file mode 100644
index 0000000000..617e779efa
--- /dev/null
+++ b/lib/inets/test/old_httpd_SUITE_data/server_root/icons/tar.gif
Binary files differ
diff --git a/lib/inets/test/old_httpd_SUITE_data/server_root/icons/tex.gif b/lib/inets/test/old_httpd_SUITE_data/server_root/icons/tex.gif
new file mode 100644
index 0000000000..45e43233b8
--- /dev/null
+++ b/lib/inets/test/old_httpd_SUITE_data/server_root/icons/tex.gif
Binary files differ
diff --git a/lib/inets/test/old_httpd_SUITE_data/server_root/icons/text.gif b/lib/inets/test/old_httpd_SUITE_data/server_root/icons/text.gif
new file mode 100644
index 0000000000..4c623909fb
--- /dev/null
+++ b/lib/inets/test/old_httpd_SUITE_data/server_root/icons/text.gif
Binary files differ
diff --git a/lib/inets/test/old_httpd_SUITE_data/server_root/icons/transfer.gif b/lib/inets/test/old_httpd_SUITE_data/server_root/icons/transfer.gif
new file mode 100644
index 0000000000..33697dbb66
--- /dev/null
+++ b/lib/inets/test/old_httpd_SUITE_data/server_root/icons/transfer.gif
Binary files differ
diff --git a/lib/inets/test/old_httpd_SUITE_data/server_root/icons/unknown.gif b/lib/inets/test/old_httpd_SUITE_data/server_root/icons/unknown.gif
new file mode 100644
index 0000000000..32b1ea23fb
--- /dev/null
+++ b/lib/inets/test/old_httpd_SUITE_data/server_root/icons/unknown.gif
Binary files differ
diff --git a/lib/inets/test/old_httpd_SUITE_data/server_root/icons/up.gif b/lib/inets/test/old_httpd_SUITE_data/server_root/icons/up.gif
new file mode 100644
index 0000000000..6d6d6d1ebf
--- /dev/null
+++ b/lib/inets/test/old_httpd_SUITE_data/server_root/icons/up.gif
Binary files differ
diff --git a/lib/inets/test/old_httpd_SUITE_data/server_root/icons/uu.gif b/lib/inets/test/old_httpd_SUITE_data/server_root/icons/uu.gif
new file mode 100644
index 0000000000..4387d529f6
--- /dev/null
+++ b/lib/inets/test/old_httpd_SUITE_data/server_root/icons/uu.gif
Binary files differ
diff --git a/lib/inets/test/old_httpd_SUITE_data/server_root/icons/uuencoded.gif b/lib/inets/test/old_httpd_SUITE_data/server_root/icons/uuencoded.gif
new file mode 100644
index 0000000000..4387d529f6
--- /dev/null
+++ b/lib/inets/test/old_httpd_SUITE_data/server_root/icons/uuencoded.gif
Binary files differ
diff --git a/lib/inets/test/old_httpd_SUITE_data/server_root/icons/world1.gif b/lib/inets/test/old_httpd_SUITE_data/server_root/icons/world1.gif
new file mode 100644
index 0000000000..05b4ec2058
--- /dev/null
+++ b/lib/inets/test/old_httpd_SUITE_data/server_root/icons/world1.gif
Binary files differ
diff --git a/lib/inets/test/old_httpd_SUITE_data/server_root/icons/world2.gif b/lib/inets/test/old_httpd_SUITE_data/server_root/icons/world2.gif
new file mode 100644
index 0000000000..e3203f7a88
--- /dev/null
+++ b/lib/inets/test/old_httpd_SUITE_data/server_root/icons/world2.gif
Binary files differ
diff --git a/lib/inets/test/httpd_SUITE_data/server_root/logs/Dummy_File_Needed_By_WinZip b/lib/inets/test/old_httpd_SUITE_data/server_root/logs/Dummy_File_Needed_By_WinZip
index 8d1c8b69c3..8d1c8b69c3 100644
--- a/lib/inets/test/httpd_SUITE_data/server_root/logs/Dummy_File_Needed_By_WinZip
+++ b/lib/inets/test/old_httpd_SUITE_data/server_root/logs/Dummy_File_Needed_By_WinZip
diff --git a/lib/inets/test/httpd_SUITE_data/server_root/ssl/ssl_client.pem b/lib/inets/test/old_httpd_SUITE_data/server_root/ssl/ssl_client.pem
index 427447958d..427447958d 100644
--- a/lib/inets/test/httpd_SUITE_data/server_root/ssl/ssl_client.pem
+++ b/lib/inets/test/old_httpd_SUITE_data/server_root/ssl/ssl_client.pem
diff --git a/lib/inets/test/httpd_SUITE_data/server_root/ssl/ssl_server.pem b/lib/inets/test/old_httpd_SUITE_data/server_root/ssl/ssl_server.pem
index 4aac86db49..4aac86db49 100644
--- a/lib/inets/test/httpd_SUITE_data/server_root/ssl/ssl_server.pem
+++ b/lib/inets/test/old_httpd_SUITE_data/server_root/ssl/ssl_server.pem
diff --git a/lib/inets/vsn.mk b/lib/inets/vsn.mk
index 3c20348322..bbd86c3eb3 100644
--- a/lib/inets/vsn.mk
+++ b/lib/inets/vsn.mk
@@ -2,7 +2,7 @@
# %CopyrightBegin%
#
-# Copyright Ericsson AB 2001-2013. All Rights Reserved.
+# Copyright Ericsson AB 2001-2014. 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
@@ -18,7 +18,6 @@
# %CopyrightEnd%
APPLICATION = inets
-INETS_VSN = 5.9.7
+INETS_VSN = 5.10.1
PRE_VSN =
APP_VSN = "$(APPLICATION)-$(INETS_VSN)$(PRE_VSN)"
-
diff --git a/lib/jinterface/doc/src/jinterface_users_guide.xml b/lib/jinterface/doc/src/jinterface_users_guide.xml
index aaf84e2e3d..5dfe5c0c6d 100644
--- a/lib/jinterface/doc/src/jinterface_users_guide.xml
+++ b/lib/jinterface/doc/src/jinterface_users_guide.xml
@@ -112,6 +112,10 @@
<cell align="left" valign="middle"><seealso marker="java/com/ericsson/otp/erlang/OtpErlangTuple">OtpErlangTuple</seealso></cell>
</row>
<row>
+ <cell align="left" valign="middle">map</cell>
+ <cell align="left" valign="middle"><seealso marker="java/com/ericsson/otp/erlang/OtpErlangMap">OtpErlangMap</seealso></cell>
+ </row>
+ <row>
<cell align="left" valign="middle">term</cell>
<cell align="left" valign="middle"><seealso marker="java/com/ericsson/otp/erlang/OtpErlangObject">OtpErlangObject</seealso></cell>
</row>
diff --git a/lib/jinterface/doc/src/notes.xml b/lib/jinterface/doc/src/notes.xml
index 8c45d187bc..e81a9f82d2 100644
--- a/lib/jinterface/doc/src/notes.xml
+++ b/lib/jinterface/doc/src/notes.xml
@@ -30,6 +30,25 @@
</header>
<p>This document describes the changes made to the Jinterface application.</p>
+<section><title>Jinterface 1.5.9</title>
+
+ <section><title>Improvements and New Features</title>
+ <list>
+ <item>
+ <p>
+ Implement support for Maps</p>
+ <p>
+ The API and implementation are simplistic, like for lists
+ and tuples, using arrays and without any connection to
+ java.util.Map. (Thanks to Vlad Dumitrescu)</p>
+ <p>
+ Own Id: OTP-11703</p>
+ </item>
+ </list>
+ </section>
+
+</section>
+
<section><title>Jinterface 1.5.8</title>
<section><title>Fixed Bugs and Malfunctions</title>
diff --git a/lib/jinterface/java_src/com/ericsson/otp/erlang/AbstractNode.java b/lib/jinterface/java_src/com/ericsson/otp/erlang/AbstractNode.java
index 968f284bff..3ef44b8851 100644
--- a/lib/jinterface/java_src/com/ericsson/otp/erlang/AbstractNode.java
+++ b/lib/jinterface/java_src/com/ericsson/otp/erlang/AbstractNode.java
@@ -1,7 +1,7 @@
/*
* %CopyrightBegin%
*
- * Copyright Ericsson AB 2000-2013. All Rights Reserved.
+ * Copyright Ericsson AB 2000-2014. 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
@@ -92,6 +92,7 @@ public class AbstractNode {
static final int dFlagNewFloats = 0x800;
static final int dFlagUnicodeIo = 0x1000;
static final int dFlagUtf8Atoms = 0x10000;
+ static final int dFlagMapTag = 0x20000;
int ntype = NTYPE_R6;
int proto = 0; // tcp/ip
@@ -100,7 +101,7 @@ public class AbstractNode {
int creation = 0;
int flags = dFlagExtendedReferences | dFlagExtendedPidsPorts
| dFlagBitBinaries | dFlagNewFloats | dFlagFunTags
- | dflagNewFunTags | dFlagUtf8Atoms;
+ | dflagNewFunTags | dFlagUtf8Atoms | dFlagMapTag;
/* initialize hostname and default cookie */
static {
diff --git a/lib/jinterface/java_src/com/ericsson/otp/erlang/OtpErlangMap.java b/lib/jinterface/java_src/com/ericsson/otp/erlang/OtpErlangMap.java
new file mode 100644
index 0000000000..03c18e55a2
--- /dev/null
+++ b/lib/jinterface/java_src/com/ericsson/otp/erlang/OtpErlangMap.java
@@ -0,0 +1,289 @@
+/*
+ * %CopyrightBegin%
+ *
+ * Copyright Ericsson AB 2000-2013. 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%
+ */
+package com.ericsson.otp.erlang;
+
+import java.io.Serializable;
+
+/**
+ * Provides a Java representation of Erlang maps. Maps are created from one or
+ * more arbitrary Erlang terms.
+ *
+ * <p>
+ * The arity of the map is the number of elements it contains. The keys and
+ * values can be retrieved as arrays and the value for a key can be queried.
+ *
+ */
+public class OtpErlangMap extends OtpErlangObject implements Serializable,
+ Cloneable {
+ // don't change this!
+ private static final long serialVersionUID = -6410770117696198497L;
+
+ private static final OtpErlangObject[] NO_ELEMENTS = new OtpErlangObject[0];
+
+ private OtpErlangObject[] keys = NO_ELEMENTS;
+ private OtpErlangObject[] values = NO_ELEMENTS;
+
+ /**
+ * Create a map from an array of keys and an array of values.
+ *
+ * @param keys
+ * the array of terms to create the map keys from.
+ * @param values
+ * the array of terms to create the map values from.
+ *
+ * @exception java.lang.IllegalArgumentException
+ * if any array is empty (null) or contains null elements.
+ */
+ public OtpErlangMap(final OtpErlangObject[] keys,
+ final OtpErlangObject[] values) {
+ this(keys, 0, keys.length, values, 0, values.length);
+ }
+
+ /**
+ * Create a map from an array of terms.
+ *
+ * @param elems
+ * the array of terms to create the map from.
+ * @param start
+ * the offset of the first term to insert.
+ * @param vcount
+ * the number of terms to insert.
+ *
+ * @exception java.lang.IllegalArgumentException
+ * if any array is empty (null) or contains null elements.
+ */
+ public OtpErlangMap(final OtpErlangObject[] keys, final int kstart,
+ final int kcount, final OtpErlangObject[] values, final int vstart,
+ final int vcount) {
+ if (keys == null || values == null) {
+ throw new java.lang.IllegalArgumentException(
+ "Map content can't be null");
+ } else if (kcount != vcount) {
+ throw new java.lang.IllegalArgumentException(
+ "Map keys and values must have same arity");
+ } else if (vcount < 1) {
+ this.keys = NO_ELEMENTS;
+ this.values = NO_ELEMENTS;
+ } else {
+ this.keys = new OtpErlangObject[vcount];
+ for (int i = 0; i < vcount; i++) {
+ if (keys[kstart + i] != null) {
+ this.keys[i] = keys[kstart + i];
+ } else {
+ throw new java.lang.IllegalArgumentException(
+ "Map key cannot be null (element" + (kstart + i)
+ + ")");
+ }
+ }
+ this.values = new OtpErlangObject[vcount];
+ for (int i = 0; i < vcount; i++) {
+ if (values[vstart + i] != null) {
+ this.values[i] = values[vstart + i];
+ } else {
+ throw new java.lang.IllegalArgumentException(
+ "Map value cannot be null (element" + (vstart + i)
+ + ")");
+ }
+ }
+ }
+ }
+
+ /**
+ * Create a map from a stream containing a map encoded in Erlang external
+ * format.
+ *
+ * @param buf
+ * the stream containing the encoded map.
+ *
+ * @exception OtpErlangDecodeException
+ * if the buffer does not contain a valid external
+ * representation of an Erlang map.
+ */
+ public OtpErlangMap(final OtpInputStream buf)
+ throws OtpErlangDecodeException {
+ final int arity = buf.read_map_head();
+
+ if (arity > 0) {
+ keys = new OtpErlangObject[arity];
+ values = new OtpErlangObject[arity];
+
+ for (int i = 0; i < arity; i++) {
+ keys[i] = buf.read_any();
+ values[i] = buf.read_any();
+ }
+ } else {
+ keys = NO_ELEMENTS;
+ values = NO_ELEMENTS;
+ }
+ }
+
+ /**
+ * Get the arity of the map.
+ *
+ * @return the number of elements contained in the map.
+ */
+ public int arity() {
+ return keys.length;
+ }
+
+ /**
+ * Get the specified value from the map.
+ *
+ * @param key
+ * the key of the requested value.
+ *
+ * @return the requested value, of null if key is not a valid key.
+ */
+ public OtpErlangObject get(final OtpErlangObject key) {
+ if (key == null) {
+ return null;
+ }
+ for (int i = 0; i < keys.length; i++) {
+ if (key.equals(keys[i])) {
+ return values[i];
+ }
+ }
+ return null;
+ }
+
+ /**
+ * Get all the keys from the map as an array.
+ *
+ * @return an array containing all of the map's keys.
+ */
+ public OtpErlangObject[] keys() {
+ final OtpErlangObject[] res = new OtpErlangObject[arity()];
+ System.arraycopy(keys, 0, res, 0, res.length);
+ return res;
+ }
+
+ /**
+ * Get all the values from the map as an array.
+ *
+ * @return an array containing all of the map's values.
+ */
+ public OtpErlangObject[] values() {
+ final OtpErlangObject[] res = new OtpErlangObject[arity()];
+ System.arraycopy(values, 0, res, 0, res.length);
+ return res;
+ }
+
+ /**
+ * Get the string representation of the map.
+ *
+ * @return the string representation of the map.
+ */
+ @Override
+ public String toString() {
+ int i;
+ final StringBuffer s = new StringBuffer();
+ final int arity = values.length;
+
+ s.append("#{");
+
+ for (i = 0; i < arity; i++) {
+ if (i > 0) {
+ s.append(",");
+ }
+ s.append(keys[i].toString());
+ s.append(" => ");
+ s.append(values[i].toString());
+ }
+
+ s.append("}");
+
+ return s.toString();
+ }
+
+ /**
+ * Convert this map to the equivalent Erlang external representation.
+ *
+ * @param buf
+ * an output stream to which the encoded map should be written.
+ */
+ @Override
+ public void encode(final OtpOutputStream buf) {
+ final int arity = values.length;
+
+ buf.write_map_head(arity);
+
+ for (int i = 0; i < arity; i++) {
+ buf.write_any(keys[i]);
+ buf.write_any(values[i]);
+ }
+ }
+
+ /**
+ * Determine if two maps are equal. Maps are equal if they have the same
+ * arity and all of the elements are equal.
+ *
+ * @param o
+ * the map to compare to.
+ *
+ * @return true if the maps have the same arity and all the elements are
+ * equal.
+ */
+ @Override
+ public boolean equals(final Object o) {
+ if (!(o instanceof OtpErlangMap)) {
+ return false;
+ }
+
+ final OtpErlangMap t = (OtpErlangMap) o;
+ final int a = arity();
+
+ if (a != t.arity()) {
+ return false;
+ }
+
+ for (int i = 0; i < a; i++) {
+ if (!keys[i].equals(t.keys[i])) {
+ return false; // early exit
+ }
+ }
+ for (int i = 0; i < a; i++) {
+ if (!values[i].equals(t.values[i])) {
+ return false; // early exit
+ }
+ }
+
+ return true;
+ }
+
+ @Override
+ protected int doHashCode() {
+ final OtpErlangObject.Hash hash = new OtpErlangObject.Hash(9);
+ final int a = arity();
+ hash.combine(a);
+ for (int i = 0; i < a; i++) {
+ hash.combine(keys[i].hashCode());
+ }
+ for (int i = 0; i < a; i++) {
+ hash.combine(values[i].hashCode());
+ }
+ return hash.valueOf();
+ }
+
+ @Override
+ public Object clone() {
+ final OtpErlangMap newMap = (OtpErlangMap) super.clone();
+ newMap.values = values.clone();
+ return newMap;
+ }
+}
diff --git a/lib/jinterface/java_src/com/ericsson/otp/erlang/OtpExternal.java b/lib/jinterface/java_src/com/ericsson/otp/erlang/OtpExternal.java
index 45a82d6c94..fa0fe18e95 100644
--- a/lib/jinterface/java_src/com/ericsson/otp/erlang/OtpExternal.java
+++ b/lib/jinterface/java_src/com/ericsson/otp/erlang/OtpExternal.java
@@ -85,6 +85,9 @@ public class OtpExternal {
/** The tag used for new style references */
public static final int newRefTag = 114;
+ /** The tag used for maps */
+ public static final int mapTag = 116;
+
/** The tag used for old Funs */
public static final int funTag = 117;
diff --git a/lib/jinterface/java_src/com/ericsson/otp/erlang/OtpInputStream.java b/lib/jinterface/java_src/com/ericsson/otp/erlang/OtpInputStream.java
index 9dc1728346..0d1342d796 100644
--- a/lib/jinterface/java_src/com/ericsson/otp/erlang/OtpInputStream.java
+++ b/lib/jinterface/java_src/com/ericsson/otp/erlang/OtpInputStream.java
@@ -1202,6 +1202,9 @@ public class OtpInputStream extends ByteArrayInputStream {
case OtpExternal.newRefTag:
return new OtpErlangRef(this);
+ case OtpExternal.mapTag:
+ return new OtpErlangMap(this);
+
case OtpExternal.portTag:
return new OtpErlangPort(this);
@@ -1244,4 +1247,21 @@ public class OtpInputStream extends ByteArrayInputStream {
throw new OtpErlangDecodeException("Uknown data type: " + tag);
}
}
+
+ public int read_map_head() throws OtpErlangDecodeException {
+ int arity = 0;
+ final int tag = read1skip_version();
+
+ // decode the map header and get arity
+ switch (tag) {
+ case OtpExternal.mapTag:
+ arity = read4BE();
+ break;
+
+ default:
+ throw new OtpErlangDecodeException("Not valid map tag: " + tag);
+ }
+
+ return arity;
+ }
}
diff --git a/lib/jinterface/java_src/com/ericsson/otp/erlang/OtpOutputStream.java b/lib/jinterface/java_src/com/ericsson/otp/erlang/OtpOutputStream.java
index 78f47aa32f..a78423db44 100644
--- a/lib/jinterface/java_src/com/ericsson/otp/erlang/OtpOutputStream.java
+++ b/lib/jinterface/java_src/com/ericsson/otp/erlang/OtpOutputStream.java
@@ -974,4 +974,9 @@ public class OtpOutputStream extends ByteArrayOutputStream {
write_atom(function);
write_long(arity);
}
+
+ public void write_map_head(final int arity) {
+ write1(OtpExternal.mapTag);
+ write4BE(arity);
+ }
}
diff --git a/lib/jinterface/java_src/com/ericsson/otp/erlang/java_files b/lib/jinterface/java_src/com/ericsson/otp/erlang/java_files
index 1390542194..62fa7f990e 100644
--- a/lib/jinterface/java_src/com/ericsson/otp/erlang/java_files
+++ b/lib/jinterface/java_src/com/ericsson/otp/erlang/java_files
@@ -74,6 +74,7 @@ ERL = \
OtpErlangShort\
OtpErlangString\
OtpErlangTuple \
+ OtpErlangMap \
OtpErlangUInt \
OtpErlangUShort
diff --git a/lib/jinterface/test/jinterface_SUITE.erl b/lib/jinterface/test/jinterface_SUITE.erl
index de8d611efc..cb725164cd 100644
--- a/lib/jinterface/test/jinterface_SUITE.erl
+++ b/lib/jinterface/test/jinterface_SUITE.erl
@@ -37,7 +37,9 @@
erl_exit_with_reason_any_term/1,
java_exit_with_reason_any_term/1,
status_handler_localStatus/1, status_handler_remoteStatus/1,
- status_handler_connAttempt/1]).
+ status_handler_connAttempt/1,
+ maps/1
+ ]).
-include_lib("common_test/include/ct.hrl").
-include("test_server_line.hrl").
@@ -103,7 +105,8 @@ fundamental() ->
nodename, % Nodename.java
register_and_whereis, % RegisterAndWhereis.java
get_names, % GetNames.java
- boolean_atom % BooleanAtom.java
+ boolean_atom, % BooleanAtom.java
+ maps % Maps.java
].
ping() ->
@@ -675,6 +678,17 @@ status_handler_connAttempt(Config) when is_list(Config) ->
"NodeStatusHandler",
[erlang:get_cookie(),node(),?status_handler_connAttempt]).
+%%%-----------------------------------------------------------------
+maps(doc) ->
+ ["Maps.java: "
+ "Tests OtpErlangMap encoding, decoding, toString, get"];
+maps(suite) ->
+ [];
+maps(Config) when is_list(Config) ->
+ ok = jitu:java(?config(java, Config),
+ ?config(data_dir, Config),
+ "Maps",
+ []).
%%%-----------------------------------------------------------------
%%% INTERNAL FUNCTIONS
diff --git a/lib/jinterface/test/jinterface_SUITE_data/Makefile.src b/lib/jinterface/test/jinterface_SUITE_data/Makefile.src
index 2a3dca463b..a15ed1aa63 100644
--- a/lib/jinterface/test/jinterface_SUITE_data/Makefile.src
+++ b/lib/jinterface/test/jinterface_SUITE_data/Makefile.src
@@ -46,7 +46,8 @@ JAVA_FILES = \
MboxPing.java \
MboxSendReceive.java \
MboxLinkUnlink.java \
- NodeStatusHandler.java
+ NodeStatusHandler.java \
+ Maps.java
CLASS_FILES = $(JAVA_FILES:.java=.class)
diff --git a/lib/jinterface/test/jinterface_SUITE_data/Maps.java b/lib/jinterface/test/jinterface_SUITE_data/Maps.java
new file mode 100644
index 0000000000..653defc621
--- /dev/null
+++ b/lib/jinterface/test/jinterface_SUITE_data/Maps.java
@@ -0,0 +1,108 @@
+import java.util.Arrays;
+
+import com.ericsson.otp.erlang.OtpErlangAtom;
+import com.ericsson.otp.erlang.OtpErlangDecodeException;
+import com.ericsson.otp.erlang.OtpErlangList;
+import com.ericsson.otp.erlang.OtpErlangLong;
+import com.ericsson.otp.erlang.OtpErlangMap;
+import com.ericsson.otp.erlang.OtpInputStream;
+import com.ericsson.otp.erlang.OtpOutputStream;
+
+/*
+ * %CopyrightBegin%
+ *
+ * Copyright Ericsson AB 2004-2010. All Rights Reserved.
+ *
+ * The contents of this file are subject to the Erlang Public License,
+ * Version 1.1, (the "License"); you may not use this file except in
+ * 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%
+ */
+
+class Maps {
+
+ /*
+ * Implements test case jinterface_SUITE:maps/1
+ *
+ * Test the class OtpErlangMap
+ */
+
+ @SuppressWarnings("resource")
+ public static void main(final String argv[]) {
+
+ runTest(new byte[] { (byte) 131, 116, 0, 0, 0, 0 }, "#{}", 1);
+ runTest(new byte[] { (byte) 131, 116, 0, 0, 0, 1, 100, 0, 1, 97, 100,
+ 0, 1, 98 }, "#{a => b}", 2);
+ // make sure keys are sorted here, jinterface doesn't reorder them
+ runTest(new byte[] { (byte) 131, 116, 0, 0, 0, 2, 97, 2, 106,
+ 100, 0, 1, 97, 97, 1 }, "#{2 => [],a => 1}", 3);
+ runTest(new byte[] { (byte) 131, 116, 0, 0, 0, 1, 104, 1, 97, 3, 108,
+ 0, 0, 0, 1, 100, 0, 1, 114, 106 }, "#{{3} => [r]}", 4);
+
+ try {
+ // #{2 => [],a => 1}
+ final OtpErlangMap map = new OtpErlangMap(new OtpInputStream(
+ new byte[] { (byte) 131, 116, 0, 0, 0, 2, 97, 2, 106,
+ 100, 0, 1, 97, 97, 1 }));
+
+ if (map.arity() != 2) {
+ fail(5);
+ }
+ if (!new OtpErlangLong(1).equals(map.get(new OtpErlangAtom("a")))) {
+ fail(6);
+ }
+ if (!new OtpErlangList().equals(map.get(new OtpErlangLong(2)))) {
+ fail(7);
+ }
+ if (map.get(new OtpErlangLong(1)) != null) {
+ fail(8);
+ }
+ } catch (final OtpErlangDecodeException e) {
+ fail(99);
+ }
+
+ }
+
+ @SuppressWarnings("resource")
+ private static void runTest(final byte[] in, final String out, final int err) {
+ try {
+ final OtpInputStream is = new OtpInputStream(in);
+
+ final OtpErlangMap map = new OtpErlangMap(is);
+ final String output = map.toString();
+ if (!output.equals(out)) {
+ fail("toString mismatch " + output + " <> " + out, err);
+ }
+
+ final OtpOutputStream os = new OtpOutputStream(map);
+ final byte[] outArray0 = os.toByteArray();
+ final byte[] outArray = new byte[outArray0.length + 1];
+ System.arraycopy(outArray0, 0, outArray, 1, outArray0.length);
+ outArray[0] = (byte) 131;
+ if (!Arrays.equals(in, outArray)) {
+ fail("encode error " + Arrays.toString(outArray), err);
+ }
+ } catch (final OtpErlangDecodeException e) {
+ fail("decode error " + e.getMessage(), err);
+ } catch (final Exception e) {
+ fail("error " + e.getMessage(), err);
+ }
+ }
+
+ private static void fail(final int reason) {
+ System.exit(reason);
+ }
+
+ private static void fail(final String str, final int reason) {
+ System.out.println(str);
+ System.exit(reason);
+ }
+}
diff --git a/lib/jinterface/test/jitu.erl b/lib/jinterface/test/jitu.erl
index a029c063bc..46b8cb3ac2 100644
--- a/lib/jinterface/test/jitu.erl
+++ b/lib/jinterface/test/jitu.erl
@@ -1,7 +1,7 @@
%%
%% %CopyrightBegin%
%%
-%% Copyright Ericsson AB 2004-2013. All Rights Reserved.
+%% Copyright Ericsson AB 2004-2014. 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
@@ -133,7 +133,7 @@ es(L,Quote,EscSpace) ->
cmd(Cmd) ->
PortOpts = [{line,80},eof,exit_status,stderr_to_stdout],
- io:format("cmd: ~s~n", [Cmd]),
+ io:format("cmd: ~ts~n", [Cmd]),
case catch open_port({spawn,Cmd}, PortOpts) of
Port when is_port(Port) ->
case erlang:port_info(Port,os_pid) of
diff --git a/lib/jinterface/vsn.mk b/lib/jinterface/vsn.mk
index 1954040c3d..c50200fab6 100644
--- a/lib/jinterface/vsn.mk
+++ b/lib/jinterface/vsn.mk
@@ -1 +1 @@
-JINTERFACE_VSN = 1.5.8
+JINTERFACE_VSN = 1.5.9
diff --git a/lib/kernel/doc/src/Makefile b/lib/kernel/doc/src/Makefile
index de3ca1e176..ec5d1f09e4 100644
--- a/lib/kernel/doc/src/Makefile
+++ b/lib/kernel/doc/src/Makefile
@@ -76,8 +76,8 @@ BOOK_FILES = book.xml
XML_FILES = \
$(BOOK_FILES) $(XML_CHAPTER_FILES) \
- $(XML_PART_FILES) $(XML_REF3_FILES) $(XML_REF4_FILES) \
- $(XML_REF6_FILES) $(XML_APPLICATION_FILES)
+ $(XML_PART_FILES) $(XML_REF3_FILES) $(XML_REF4_FILES)\
+ $(XML_REF6_FILES) $(XML_APPLICATION_FILES)
# ----------------------------------------------------
diff --git a/lib/kernel/doc/src/app.xml b/lib/kernel/doc/src/app.xml
index 7c9d6eecec..8575d94048 100644
--- a/lib/kernel/doc/src/app.xml
+++ b/lib/kernel/doc/src/app.xml
@@ -61,7 +61,8 @@
{applications, Apps},
{env, Env},
{mod, Start},
- {start_phases, Phases}]}.
+ {start_phases, Phases},
+ {runtime_dependencies, RTDeps}]}.
Value Default
----- -------
@@ -77,8 +78,10 @@ Apps [App] []
Env [{Par,Val}] []
Start {Module,StartArgs} []
Phases [{Phase,PhaseArgs}] undefined
+RTDeps [ApplicationVersion] []
Module = Name = App = Par = Phase = atom()
- Val = StartArgs = PhaseArgs = term()</code>
+ Val = StartArgs = PhaseArgs = term()
+ ApplicationVersion = string()</code>
<p><c>Application</c> is the name of the application.</p>
<p>For the application controller, all keys are optional.
The respective default values are used for any omitted keys.</p>
@@ -87,6 +90,8 @@ Phases [{Phase,PhaseArgs}] undefined
<c>description</c>, <c>vsn</c>, <c>modules</c>, <c>registered</c>
and <c>applications</c>. The other keys are ignored by
<c>systools</c>.</p>
+ <warning><p>The <c>RTDeps</c> type was introduced in OTP 17.0 and
+ might be subject to changes during the OTP 17 release.</p></warning>
<taglist>
<tag><c>description</c></tag>
<item>
@@ -185,6 +190,33 @@ Phases [{Phase,PhaseArgs}] undefined
start phases must be a subset of the set of phases defined
for the primary application. Refer to <em>OTP Design Principles</em> for more information.</p>
</item>
+ <tag><marker id="runtime_dependencies"><c>runtime_dependencies</c></marker></tag>
+ <item><p>A list of application versions that the application
+ depends on. An example of such an application version is
+ <c>"kernel-3.0"</c>. Application versions specified as runtime
+ dependencies are minimum requirements. That is, a larger
+ application version than the one specified in the
+ dependency satisfies the requirement. For information on
+ how to compare application versions see
+ <seealso marker="doc/system_principles:versions">the
+ documentation of versions in the system principles
+ guide</seealso>. Note that that the application version
+ specifies a source code version. An additional indirect
+ requirement is that installed binary application of
+ the specified version has been built so that it is
+ compatible with the rest of the system.</p>
+ <p>Some dependencies might only be required in specific runtime
+ scenarios. In the case such optional dependencies exist, these are
+ specified and documented in the corresponding "App" documentation
+ of the specific application.</p>
+ <warning><p>The <c>runtime_dependencies</c> key was introduced in
+ OTP 17.0. The type of its value might be subject to changes during
+ the OTP 17 release.</p></warning>
+ <warning><p>All runtime dependencies specified in OTP applications
+ during the OTP 17 release may not be completely correct. This
+ is actively being worked on. Declared runtime dependencies in OTP
+ applications are expected to be correct in OTP 18.</p></warning>
+ </item>
</taglist>
</section>
diff --git a/lib/kernel/doc/src/application.xml b/lib/kernel/doc/src/application.xml
index 29eaf348a9..7664fda4db 100644
--- a/lib/kernel/doc/src/application.xml
+++ b/lib/kernel/doc/src/application.xml
@@ -4,7 +4,7 @@
<erlref>
<header>
<copyright>
- <year>1996</year><year>2013</year>
+ <year>1996</year><year>2014</year>
<holder>Ericsson AB. All Rights Reserved.</holder>
</copyright>
<legalnotice>
@@ -239,10 +239,19 @@ Nodes = [cp1@cave, {cp2@cave, cp3@cave}]</code>
<desc>
<p>Sets the value of the configuration parameter <c><anno>Par</anno></c> for
<c><anno>Application</anno></c>.</p>
- <p><c>set_env/3</c> uses the standard <c>gen_server</c> timeout
- value (5000 ms). A <c><anno>Timeout</anno></c> argument can be provided
+ <p><c>set_env/4</c> uses the standard <c>gen_server</c> timeout
+ value (5000 ms). The <c>timeout</c> option can be provided
if another timeout value is useful, for example, in situations
where the application controller is heavily loaded.</p>
+ <p>If <c>set_env/4</c> is called before the application is loaded,
+ the application environment values specified in the <c>Application.app</c>
+ file will override the ones previously set. This is also true for application
+ reloads.</p>
+ <p>The <c>persistent</c> option can be set to <c>true</c>
+ when there is a need to guarantee parameters set with <c>set_env/4</c>
+ will not be overridden by the ones defined in the application resource
+ file on load. This means persistent values will stick after the application
+ is loaded and also on application reload.</p>
<warning>
<p>Use this function only if you know what you are doing,
that is, on your own applications. It is very application
@@ -406,9 +415,11 @@ Nodes = [cp1@cave, {cp2@cave, cp3@cave}]</code>
<p>Removes the configuration parameter <c><anno>Par</anno></c> and its value
for <c><anno>Application</anno></c>.</p>
<p><c>unset_env/2</c> uses the standard <c>gen_server</c>
- timeout value (5000 ms). A <c><anno>Timeout</anno></c> argument can be
+ timeout value (5000 ms). The <c>timeout</c> option can be
provided if another timeout value is useful, for example, in
situations where the application controller is heavily loaded.</p>
+ <p><c>unset_env/3</c> also allows the persistent option to be passed
+ (see <c>set_env/4</c> above).</p>
<warning>
<p>Use this function only if you know what you are doing,
that is, on your own applications. It is very application
@@ -448,8 +459,7 @@ Nodes = [cp1@cave, {cp2@cave, cp3@cave}]</code>
<name>Module:start(StartType, StartArgs) -> {ok, Pid} | {ok, Pid, State} | {error, Reason}</name>
<fsummary>Start an application</fsummary>
<type>
- <v>StartType = normal | {takeover,Node} | {failover,Node}</v>
- <v>&nbsp;Node = node()</v>
+ <v>StartType = <seealso marker="#type-start_type">start_type()</seealso></v>
<v>StartArgs = term()</v>
<v>Pid = pid()</v>
<v>State = term()</v>
diff --git a/lib/kernel/doc/src/file.xml b/lib/kernel/doc/src/file.xml
index 0a4dd3ba47..8dae34431b 100644
--- a/lib/kernel/doc/src/file.xml
+++ b/lib/kernel/doc/src/file.xml
@@ -4,7 +4,7 @@
<erlref>
<header>
<copyright>
- <year>1996</year><year>2013</year>
+ <year>1996</year><year>2014</year>
<holder>Ericsson AB. All Rights Reserved.</holder>
</copyright>
<legalnotice>
@@ -37,54 +37,48 @@
the file operations. See the command line flag
<c>+A</c> in <seealso marker="erts:erl">erl(1)</seealso>.</p>
- <p>The Erlang VM supports file names in Unicode to a limited
- extent. Depending on how the VM is started (with the parameter
- <c>+fnu</c> or <c>+fnl</c>), file names given can contain
- characters > 255 and the VM system will convert file names
- back and forth to the native file name encoding.</p>
+ <p>With regard to file name encoding, the Erlang VM can operate in
+ two modes. The current mode can be queried using the <seealso
+ marker="#native_name_encoding">native_name_encoding/0</seealso>
+ function. It returns either <c>latin1</c> or <c>utf8</c>.</p>
- <p>The default behavior for Unicode character translation depends
- on to what extent the underlying OS/filesystem enforces consistent
- naming. On OSes where all file names are ensured to be in one or
- another encoding, Unicode is the default (currently this holds for
- Windows and MacOSX). On OSes with completely transparent file
- naming (i.e. all Unixes except MacOSX), ISO-latin-1 file naming is
- the default. The reason for the ISO-latin-1 default is that
- file names are not guaranteed to be possible to interpret according to
- the Unicode encoding expected (i.e. UTF-8), and file names that
- cannot be decoded will only be accessible by using &quot;raw
- file names&quot;, in other word file names given as binaries.</p>
-
- <p>As file names are traditionally not binaries in Erlang,
- applications that need to handle raw file names need to be
- converted, why the Unicode mode for file names is not default on
- systems having completely transparent file naming.</p>
+ <p>In the <c>latin1</c> mode, the Erlang VM does not change the
+ encoding of file names. In the <c>utf8</c> mode, file names can
+ contain Unicode characters greater than 255 and the VM will
+ convert file names back and forth to the native file name encoding
+ (usually UTF-8, but UTF-16 on Windows).</p>
- <p>Raw file names is a new feature in OTP R14B01, which allows the
- user to supply completely uninterpreted file names to the
- underlying OS/filesystem. They are supplied as binaries, where it
- is up to the user to supply a correct encoding for the
- environment. The function <c>file:native_name_encoding()</c> can
- be used to check what encoding the VM is working in. If the
- function returns <c>latin1</c> file names are not in any way
- converted to Unicode, if it is <c>utf8</c>, raw file names should
- be encoded as UTF-8 if they are to follow the convention of the VM
- (and usually the convention of the OS as well). Using raw
- file names is useful if you have a filesystem with inconsistent
- file naming, where some files are named in UTF-8 encoding while
- others are not. A file:list_dir on such mixed file name systems
- when the VM is in Unicode file name mode might return file names as
- raw binaries as they cannot be interpreted as Unicode
- file names. Raw file names can also be used to give UTF-8 encoded
- file names even though the VM is not started in Unicode file name
- translation mode.</p>
+ <p>The default mode depends on the operating system. Windows and
+ MacOS X enforce consistent file name encoding and therefore the
+ VM uses the <c>utf8</c> mode.</p>
+
+ <p>On operating systems with transparent naming (i.e. all Unix
+ systems except MacOS X), the default will be <c>utf8</c> if the
+ terminal supports UTF-8, otherwise <c>latin1</c>. The default may
+ be overridden using the <c>+fnl</c> (to force <c>latin1</c> mode)
+ or <c>+fnu</c> (to force <c>utf8</c> mode) when starting <seealso
+ marker="erts:erl">erl</seealso>.</p>
+
+ <p>On operating systems with transparent naming, files could be
+ inconsistently named, i.e. some files are encoded in UTF-8 while
+ others are encoded in (for example) iso-latin1. To be able to
+ handle file systems with inconsistent naming when running in the
+ <c>utf8</c> mode, the concept of "raw file names" has been
+ introduced.</p>
+
+ <p>A raw file name is a file name given as a binary. The Erlang VM
+ will perform no translation of a file name given as a binary on
+ systems with transparent naming.</p>
+
+ <p>When running in the <c>utf8</c> mode, the
+ <c>file:list_dir/1</c> and <c>file:read_link/1</c> functions will
+ never return raw file names. Use the <seealso
+ marker="#list_dir_all">list_dir_all/1</seealso> and <seealso
+ marker="#read_link_all">read_link_all/1</seealso> functions to
+ return all file names including raw file names.</p>
+
+ <p>Also see <seealso marker="stdlib:unicode_usage#notes-about-raw-filenames">Notes about raw file names</seealso>.</p>
- <p>Note that on Windows, <c>file:native_name_encoding()</c>
- returns <c>utf8</c> per default, which is the format for raw
- file names even on Windows, although the underlying OS specific
- code works in a limited version of little endian UTF16. As far as
- the Erlang programmer is concerned, Windows native Unicode format
- is UTF-8...</p>
</description>
<datatypes>
@@ -535,8 +529,8 @@
<name name="list_dir_all" arity="1"/>
<fsummary>List all files in a directory</fsummary>
<desc>
- <p>Lists all the files in a directory, including files with
- "raw" names.
+ <p><marker id="list_dir_all"/>Lists all the files in a directory,
+ including files with "raw" names.
Returns <c>{ok, <anno>Filenames</anno>}</c> if successful.
Otherwise, it returns <c>{error, <anno>Reason</anno>}</c>.
<c><anno>Filenames</anno></c> is a list of
@@ -648,16 +642,24 @@
<item>
<p>Symbolic links are not supported on this platform.</p>
</item>
+ <tag><c>eperm</c></tag>
+ <item>
+ <p>User does not have privileges to create symbolic links
+ (<c>SeCreateSymbolicLinkPrivilege</c> on Windows).</p>
+ </item>
</taglist>
</desc>
</func>
<func>
<name name="native_name_encoding" arity="0"/>
- <fsummary>Return the VM's configured filename encoding.</fsummary>
+ <fsummary>Return the VM's configured filename encoding</fsummary>
<desc>
- <p>This function returns the configured default file name encoding to use for raw file names. Generally an application supplying file names raw (as binaries), should obey the character encoding returned by this function.</p>
- <p>By default, the VM uses ISO-latin-1 file name encoding on filesystems and/or OSes that use completely transparent file naming. This includes all Unix versions except MacOSX, where the vfs layer enforces UTF-8 file naming. By giving the experimental option <c>+fnu</c> when starting Erlang, UTF-8 translation of file names can be turned on even for those systems. If Unicode file name translation is in effect, the system behaves as usual as long as file names conform to the encoding, but will return file names that are not properly encoded in UTF-8 as raw file names (i.e. binaries).</p>
- <p>On Windows, this function also returns <c>utf8</c> by default. The OS uses a pure Unicode naming scheme and file names are always possible to interpret as valid Unicode. The fact that the underlying Windows OS actually encodes file names using little endian UTF-16 can be ignored by the Erlang programmer. Windows and MacOSX are the only operating systems where the VM operates in Unicode file name mode by default.</p>
+ <p><marker id="native_name_encoding"/>This function returns
+ the file name encoding mode. If it is <c>latin1</c>, the
+ system does no translation of file names. If it is
+ <c>utf8</c>, file names will be converted back and forth to
+ the native file name encoding (usually UTF-8, but UTF-16 on
+ Windows).</p>
</desc>
</func>
<func>
@@ -1450,7 +1452,8 @@
<name name="read_link" arity="1"/>
<fsummary>See what a link is pointing to</fsummary>
<desc>
- <p>This function returns <c>{ok, <anno>Filename</anno>}</c> if
+ <p><marker id="read_link_all"/>This function returns
+ <c>{ok, <anno>Filename</anno>}</c> if
<c><anno>Name</anno></c> refers to a symbolic link that is
not a "raw" file name, or <c>{error, <anno>Reason</anno>}</c>
otherwise.
@@ -1632,6 +1635,11 @@
<desc>
<p>Sets the current working directory of the file server to
<c><anno>Dir</anno></c>. Returns <c>ok</c> if successful.</p>
+ <p>The functions in the <c>file</c> module usually treat binaries
+ as raw filenames, i.e. they are passed as is even when the encoding
+ of the binary does not agree with <c>file:native_name_encoding()</c>.
+ This function however expects binaries to be encoded according to the
+ value returned by <c>file:native_name_encoding()</c>.</p>
<p>Typical error reasons are:</p>
<taglist>
<tag><c>enoent</c></tag>
@@ -1656,8 +1664,8 @@
<tag><c>no_translation</c></tag>
<item>
<p><c><anno>Dir</anno></c> is a <c>binary()</c> with
- characters coded in ISO-latin-1 and the VM was started
- with the parameter <c>+fnue</c>.</p>
+ characters coded in ISO-latin-1 and the VM is operating
+ with unicode file name encoding.</p>
</item>
</taglist>
<warning>
@@ -1746,16 +1754,16 @@
<item>The chunk size used by the erlang fallback to send
data. If using the fallback, this should be set to a value
which comfortably fits in the systems memory. Default is 20 MB.</item>
+ <tag><c>use_threads</c></tag>
+ <item>Instruct the emulator to use the async thread pool for the
+ sendfile system call. This could be usefull if the OS you are running
+ on does not properly support non-blocking sendfile calls. Do note that
+ using async threads potentially makes your system volnerable to slow
+ client attacks. If set to true and no async threads are available,
+ the sendfile call will return <c>{error,einval}</c>.
+ Introduced in Erlang/OTP 17.0. Default is false.</item>
</taglist>
</p>
- <p>On operating systems with thread support, it is recommended to use
- async threads. See the command line flag
- <c>+A</c> in <seealso marker="erts:erl">erl(1)</seealso>. If it is not
- possible to use async threads for sendfile, it is recommended to use
- a relatively small value for the send buffer on the socket. Otherwise
- the Erlang VM might loose some of its soft realtime guarantees.
- Which size to use depends on the OS/hardware and the requirements
- of the application.</p>
</desc>
</func>
<func>
diff --git a/lib/kernel/doc/src/inet.xml b/lib/kernel/doc/src/inet.xml
index 4a48a5c3d8..50e1cc290c 100644
--- a/lib/kernel/doc/src/inet.xml
+++ b/lib/kernel/doc/src/inet.xml
@@ -361,7 +361,7 @@ fe80::204:acff:fe17:bf38
</item>
<tag><c>send_dvi</c></tag>
<item>
- <p>Average packet size deviation in bytes received sent from the socket.</p>
+ <p>Average packet size deviation in bytes sent from the socket.</p>
</item>
<tag><c>send_max</c></tag>
<item>
diff --git a/lib/kernel/doc/src/kernel_app.xml b/lib/kernel/doc/src/kernel_app.xml
index 49a93d2c70..00c6bc33d6 100644
--- a/lib/kernel/doc/src/kernel_app.xml
+++ b/lib/kernel/doc/src/kernel_app.xml
@@ -4,7 +4,7 @@
<appref>
<header>
<copyright>
- <year>1996</year><year>2013</year>
+ <year>1996</year><year>2014</year>
<holder>Ericsson AB. All Rights Reserved.</holder>
</copyright>
<legalnotice>
@@ -35,7 +35,7 @@
Erlang/OTP consists of Kernel and STDLIB. The Kernel application
contains the following services:</p>
<list type="bulleted">
- <item>application controller, see <c>application(3)</c></item>
+ <item>application controller, see <seealso marker="application">application(3)</seealso></item>
<item><c>code</c></item>
<item><c>disk_log</c></item>
<item><c>dist_ac</c>, distributed application controller</item>
@@ -66,8 +66,8 @@
<section>
<title>Configuration</title>
<p>The following configuration parameters are defined for the Kernel
- application. See <c>app(3)</c> for more information about
- configuration parameters.</p>
+ application. See <seealso marker="app">app(4)</seealso> for more
+ information about configuration parameters.</p>
<taglist>
<tag><c>browser_cmd = string() | {M,F,A}</c></tag>
<item>
@@ -93,7 +93,8 @@
<item><c>Time = integer()>0</c></item>
<item><c>Nodes = [node() | {node(),...,node()}]</c></item>
</list>
- <p>The parameter is described in <c>application(3)</c>, function
+ <p>The parameter is described in
+ <seealso marker="application">application(3)</seealso>, function
<c>load/2</c>.</p>
</item>
<tag><c>dist_auto_connect = Value</c></tag>
@@ -105,11 +106,13 @@
<taglist>
<tag><c>never</c></tag>
<item>Connections are never automatically established, they
- must be explicitly connected. See <c>net_kernel(3)</c>.</item>
+ must be explicitly connected. See
+ <seealso marker="net_kernel">net_kernel(3)</seealso>.</item>
<tag><c>once</c></tag>
<item>Connections will be established automatically, but only
once per node. If a node goes down, it must thereafter be
- explicitly connected. See <c>net_kernel(3)</c>.</item>
+ explicitly connected. See
+ <seealso marker="net_kernel">net_kernel(3)</seealso>.</item>
</taglist>
</item>
<tag><c>permissions = [Perm]</c></tag>
@@ -121,7 +124,8 @@
<item><c>ApplName = atom()</c></item>
<item><c>Bool = boolean()</c></item>
</list>
- <p>Permissions are described in <c>application(3)</c>, function
+ <p>Permissions are described in
+ <seealso marker="application">application(3)</seealso>, function
<c>permit/2</c>.</p>
</item>
<tag><c>error_logger = Value</c></tag>
@@ -149,7 +153,8 @@
</item>
<tag><c>global_groups = [GroupTuple]</c></tag>
<item>
- <p>Defines global groups, see <c>global_group(3)</c>.</p>
+ <p>Defines global groups, see
+ <seealso marker="global_group">global_group(3)</seealso>.</p>
<list type="bulleted">
<item><c>GroupTuple = {GroupName, [Node]} | {GroupName, PublishType, [Node]}</c></item>
<item><c>GroupName = atom()</c></item>
@@ -160,18 +165,19 @@
<tag><c>inet_default_connect_options = [{Opt, Val}]</c></tag>
<item>
<p>Specifies default options for <c>connect</c> sockets,
- see <c>inet(3)</c>.</p>
+ see <seealso marker="inet">inet(3)</seealso>.</p>
</item>
<tag><c>inet_default_listen_options = [{Opt, Val}]</c></tag>
<item>
<p>Specifies default options for <c>listen</c> (and
- <c>accept</c>) sockets, see <c>inet(3)</c>.</p>
+ <c>accept</c>) sockets, see <seealso marker="inet">inet(3)</seealso>.</p>
</item>
<tag><c>{inet_dist_use_interface, ip_address()}</c></tag>
<item>
<p>If the host of an Erlang node has several network interfaces,
this parameter specifies which one to listen on. See
- <c>inet(3)</c> for the type definition of <c>ip_address()</c>.</p>
+ <seealso marker="inet">inet(3)</seealso> for the type definition
+ of <c>ip_address()</c>.</p>
</item>
<tag><c>{inet_dist_listen_min, First}</c></tag>
<item>
@@ -276,7 +282,8 @@ MaxT = TickTime + TickTime / 4</code>
<tag><c>start_boot_server = true | false</c></tag>
<item>
<p>Starts the <c>boot_server</c> if the parameter is <c>true</c>
- (see <c>erl_boot_server(3)</c>). This parameter should be
+ (see <seealso marker="erl_boot_server">erl_boot_server(3)</seealso>).
+ This parameter should be
set to <c>true</c> in an embedded system which uses this
service.</p>
<p>The default value is <c>false</c>.</p>
@@ -296,13 +303,15 @@ MaxT = TickTime + TickTime / 4</code>
<tag><c>start_disk_log = true | false</c></tag>
<item>
<p>Starts the <c>disk_log_server</c> if the parameter is
- <c>true</c> (see <c>disk_log(3)</c>). This parameter should be
+ <c>true</c> (see <seealso marker="disk_log">disk_log(3)</seealso>).
+ This parameter should be
set to true in an embedded system which uses this service.</p>
<p>The default value is <c>false</c>.</p>
</item>
<tag><c>start_pg2 = true | false</c></tag>
<item>
- <p>Starts the <c>pg2</c> server (see <c>pg2(3)</c>) if
+ <p>Starts the <c>pg2</c> server (see
+ <seealso marker="pg2">pg2(3)</seealso>) if
the parameter is <c>true</c>. This parameter should be set to
<c>true</c> in an embedded system which uses this service.</p>
<p>The default value is <c>false</c>.</p>
@@ -310,7 +319,8 @@ MaxT = TickTime + TickTime / 4</code>
<tag><c>start_timer = true | false</c></tag>
<item>
<p>Starts the <c>timer_server</c> if the parameter is
- <c>true</c> (see <c>timer(3)</c>). This parameter should be
+ <c>true</c> (see <seealso marker="stdlib:timer">timer(3)</seealso>).
+ This parameter should be
set to <c>true</c> in an embedded system which uses this
service.</p>
<p>The default value is <c>false</c>.</p>
@@ -351,6 +361,7 @@ MaxT = TickTime + TickTime / 4</code>
<seealso marker="pg2">pg2(3)</seealso>,
<seealso marker="rpc">rpc(3)</seealso>,
<seealso marker="seq_trace">seq_trace(3)</seealso>,
+ <seealso marker="stdlib:timer">timer(3)</seealso>,
<seealso marker="user">user(3)</seealso></p>
</section>
</appref>
diff --git a/lib/kernel/doc/src/notes.xml b/lib/kernel/doc/src/notes.xml
index b2e89ea850..c6538b7d05 100644
--- a/lib/kernel/doc/src/notes.xml
+++ b/lib/kernel/doc/src/notes.xml
@@ -30,6 +30,203 @@
</header>
<p>This document describes the changes made to the Kernel application.</p>
+<section><title>Kernel 3.0</title>
+
+ <section><title>Fixed Bugs and Malfunctions</title>
+ <list>
+ <item>
+ <p>
+ Fixed a deadlock possibility in terminate application</p>
+ <p>
+ Own Id: OTP-11171</p>
+ </item>
+ <item>
+ <p>
+ Fixed bug where sendfile would return the wrong error
+ code for a remotely closed socket if the socket was in
+ passive mode. (Thanks to Vincent Siliakus for reporting
+ the bug.)</p>
+ <p>
+ Own Id: OTP-11614</p>
+ </item>
+ <item>
+ <p>
+ The new option <c>persistent</c> is added to
+ <c>application:set_env/4</c> and
+ <c>application:unset_env/3</c>. An environment key set
+ with the <c>persistent</c> option will not be overridden
+ by the ones configured in the application resource file
+ on load. This means persistent values will stick after
+ the application is loaded and also on application reload.
+ (Thanks to José Valim)</p>
+ <p>
+ Own Id: OTP-11708</p>
+ </item>
+ <item>
+ <p>
+ The spec for file:set_cwd/1 is modified to also accept
+ binaries as arguments. This has always been allowed in
+ the code, but it was not reflected in the spec since
+ binaries are mostly used for raw file names. Raw file
+ names are names that are not encoded according to
+ file:native_name_encoding(), and these are not allowed in
+ file:set_cwd/1. The spec is now, however, more allowing
+ in order to avoid unnecessary dialyzer warnings. Raw file
+ names will still fail in runtime with reason
+ 'no_translation'. (Thanks to José Valim)</p>
+ <p>
+ Own Id: OTP-11787</p>
+ </item>
+ </list>
+ </section>
+
+
+ <section><title>Improvements and New Features</title>
+ <list>
+ <item>
+ <p>
+ heart:set_cmd/1 is updated to allow unicode code points >
+ 255 in the given heart command</p>
+ <p>
+ Own Id: OTP-10843</p>
+ </item>
+ <item>
+ <p> Dialyzer's <c>unmatched_return</c> warnings have been
+ corrected. </p>
+ <p>
+ Own Id: OTP-10908</p>
+ </item>
+ <item>
+ <p>
+ Make erlang:open_port/2 spawn and spawn_executable handle
+ unicode.</p>
+ <p>
+ Own Id: OTP-11105</p>
+ </item>
+ <item>
+ <p>
+ Erlang/OTP has been ported to the realtime operating
+ system OSE. The port supports both smp and non-smp
+ emulator. For details around the port and how to started
+ see the User's Guide in the <seealso
+ marker="ose:ose_intro">ose</seealso> application. </p>
+ <p>
+ Note that not all parts of Erlang/OTP has been ported. </p>
+ <p>
+ Notable things that work are: non-smp and smp emulators,
+ OSE signal interaction, crypto, asn1, run_erl/to_erl,
+ tcp, epmd, distribution and most if not all non-os
+ specific functionality of Erlang.</p>
+ <p>
+ Notable things that does not work are: udp/sctp, os_mon,
+ erl_interface, binding of schedulers.</p>
+ <p>
+ Own Id: OTP-11334</p>
+ </item>
+ <item>
+ <p>
+ Add the {active,N} socket option for TCP, UDP, and SCTP,
+ where N is an integer in the range -32768..32767, to
+ allow a caller to specify the number of data messages to
+ be delivered to the controlling process. Once the
+ socket's delivered message count either reaches 0 or is
+ explicitly set to 0 with inet:setopts/2 or by including
+ {active,0} as an option when the socket is created, the
+ socket transitions to passive ({active, false}) mode and
+ the socket's controlling process receives a message to
+ inform it of the transition. TCP sockets receive
+ {tcp_passive,Socket}, UDP sockets receive
+ {udp_passive,Socket} and SCTP sockets receive
+ {sctp_passive,Socket}. </p>
+ <p>
+ The socket's delivered message counter defaults to 0, but
+ it can be set using {active,N} via any gen_tcp, gen_udp,
+ or gen_sctp function that takes socket options as
+ arguments, or via inet:setopts/2. New N values are added
+ to the socket's current counter value, and negative
+ numbers can be used to reduce the counter value.
+ Specifying a number that would cause the socket's counter
+ value to go above 32767 causes an einval error. If a
+ negative number is specified such that the counter value
+ would become negative, the socket's counter value is set
+ to 0 and the socket transitions to passive mode. If the
+ counter value is already 0 and inet:setopts(Socket,
+ [{active,0}]) is specified, the counter value remains at
+ 0 but the appropriate passive mode transition message is
+ generated for the socket.</p>
+ <p>
+ Thanks to Steve Vinoski</p>
+ <p>
+ Own Id: OTP-11368</p>
+ </item>
+ <item>
+ <p>
+ A call to either the <c>garbage_collect/1</c> BIF or the
+ <c>check_process_code/2</c> BIF may trigger garbage
+ collection of another processes than the process calling
+ the BIF. The previous implementations performed these
+ kinds of garbage collections without considering the
+ internal state of the process being garbage collected. In
+ order to be able to more easily and more efficiently
+ implement yielding native code, these types of garbage
+ collections have been rewritten. A garbage collection
+ like this is now triggered by an asynchronous request
+ signal, the actual garbage collection is performed by the
+ process being garbage collected itself, and finalized by
+ a reply signal to the process issuing the request. Using
+ this approach processes can disable garbage collection
+ and yield without having to set up the heap in a state
+ that can be garbage collected.</p>
+ <p>
+ The <seealso
+ marker="erts:erlang#garbage_collect/2"><c>garbage_collect/2</c></seealso>,
+ and <seealso
+ marker="erts:erlang#check_process_code/3"><c>check_process_code/3</c></seealso>
+ BIFs have been introduced. Both taking an option list as
+ last argument. Using these, one can issue asynchronous
+ requests.</p>
+ <p>
+ <c>code:purge/1</c> and <c>code:soft_purge/1</c> have
+ been rewritten to utilize asynchronous
+ <c>check_process_code</c> requests in order to
+ parallelize work.</p>
+ <p>
+ Characteristics impact: A call to the
+ <c>garbage_collect/1</c> BIF or the
+ <c>check_process_code/2</c> BIF will normally take longer
+ time to complete while the system as a whole wont be as
+ much negatively effected by the operation as before. A
+ call to <c>code:purge/1</c> and <c>code:soft_purge/1</c>
+ may complete faster or slower depending on the state of
+ the system while the system as a whole wont be as much
+ negatively effected by the operation as before.</p>
+ <p>
+ Own Id: OTP-11388 Aux Id: OTP-11535, OTP-11648 </p>
+ </item>
+ <item>
+ <p>
+ Add sync option to file:open/2.</p>
+ <p>
+ The sync option adds the POSIX O_SYNC flag to the open
+ system call on platforms that support the flag or its
+ equivalent, e.g., FILE_FLAG_WRITE_THROUGH on Windows. For
+ platforms that don't support it, file:open/2 returns
+ {error, enotsup} if the sync option is passed in. Thank
+ to Steve Vinoski and Joseph Blomstedt</p>
+ <p>
+ Own Id: OTP-11498</p>
+ </item>
+ <item>
+ <p> The contract of <c>inet:ntoa/1</c> has been
+ corrected. </p> <p> Thanks to Max Treskin. </p>
+ <p>
+ Own Id: OTP-11730</p>
+ </item>
+ </list>
+ </section>
+
+</section>
+
<section><title>Kernel 2.16.4</title>
<section><title>Fixed Bugs and Malfunctions</title>
diff --git a/lib/kernel/doc/src/ref_man.xml b/lib/kernel/doc/src/ref_man.xml
index c1b9eac9d7..bd25d1e78d 100644
--- a/lib/kernel/doc/src/ref_man.xml
+++ b/lib/kernel/doc/src/ref_man.xml
@@ -13,12 +13,12 @@
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.
-
+
</legalnotice>
<title>Kernel Reference Manual</title>
@@ -65,4 +65,3 @@
<xi:include href="app.xml"/>
<xi:include href="config.xml"/>
</application>
-
diff --git a/lib/kernel/doc/src/ref_man.xml.src b/lib/kernel/doc/src/ref_man.xml.src
new file mode 100644
index 0000000000..bd25d1e78d
--- /dev/null
+++ b/lib/kernel/doc/src/ref_man.xml.src
@@ -0,0 +1,67 @@
+<?xml version="1.0" encoding="utf-8" ?>
+<!DOCTYPE application SYSTEM "application.dtd">
+
+<application xmlns:xi="http://www.w3.org/2001/XInclude">
+ <header>
+ <copyright>
+ <year>1996</year><year>2013</year>
+ <holder>Ericsson AB. All Rights Reserved.</holder>
+ </copyright>
+ <legalnotice>
+ 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.
+
+ </legalnotice>
+
+ <title>Kernel Reference Manual</title>
+ <prepared></prepared>
+ <docno></docno>
+ <date></date>
+ <rev></rev>
+ </header>
+ <description>
+ <p>The <em>Kernel</em> application has all the code necessary to run
+ the Erlang runtime system itself: file servers and code servers
+ and so on.</p>
+ </description>
+ <xi:include href="kernel_app.xml"/>
+ <xi:include href="application.xml"/>
+ <xi:include href="auth.xml"/>
+ <xi:include href="code.xml"/>
+ <xi:include href="disk_log.xml"/>
+ <xi:include href="erl_boot_server.xml"/>
+ <xi:include href="erl_ddll.xml"/>
+ <xi:include href="erl_prim_loader_stub.xml"/>
+ <xi:include href="erlang_stub.xml"/>
+ <xi:include href="error_handler.xml"/>
+ <xi:include href="error_logger.xml"/>
+ <xi:include href="file.xml"/>
+ <xi:include href="gen_tcp.xml"/>
+ <xi:include href="gen_udp.xml"/>
+ <xi:include href="gen_sctp.xml"/>
+ <xi:include href="global.xml"/>
+ <xi:include href="global_group.xml"/>
+ <xi:include href="heart.xml"/>
+ <xi:include href="inet.xml"/>
+ <xi:include href="inet_res.xml"/>
+ <xi:include href="init_stub.xml"/>
+ <xi:include href="net_adm.xml"/>
+ <xi:include href="net_kernel.xml"/>
+ <xi:include href="os.xml"/>
+ <xi:include href="pg2.xml"/>
+ <xi:include href="rpc.xml"/>
+ <xi:include href="seq_trace.xml"/>
+ <xi:include href="user.xml"/>
+ <xi:include href="wrap_log_reader.xml"/>
+ <xi:include href="zlib_stub.xml"/>
+ <xi:include href="app.xml"/>
+ <xi:include href="config.xml"/>
+</application>
diff --git a/lib/kernel/include/dist.hrl b/lib/kernel/include/dist.hrl
index e32c112e63..77556d1303 100644
--- a/lib/kernel/include/dist.hrl
+++ b/lib/kernel/include/dist.hrl
@@ -1,7 +1,7 @@
%%
%% %CopyrightBegin%
%%
-%% Copyright Ericsson AB 1999-2013. All Rights Reserved.
+%% Copyright Ericsson AB 1999-2014. 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
@@ -37,3 +37,4 @@
-define(DFLAG_DIST_HDR_ATOM_CACHE,16#2000).
-define(DFLAG_SMALL_ATOM_TAGS, 16#4000).
-define(DFLAG_UTF8_ATOMS, 16#10000).
+-define(DFLAG_MAP_TAG, 16#20000).
diff --git a/lib/kernel/src/application.erl b/lib/kernel/src/application.erl
index 4e8ba1b78a..c4bef5188a 100644
--- a/lib/kernel/src/application.erl
+++ b/lib/kernel/src/application.erl
@@ -1,7 +1,7 @@
%%
%% %CopyrightBegin%
%%
-%% Copyright Ericsson AB 1996-2013. All Rights Reserved.
+%% Copyright Ericsson AB 1996-2014. 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
@@ -30,6 +30,8 @@
-export([get_application/0, get_application/1, info/0]).
-export([start_type/0]).
+-export_type([start_type/0]).
+
%%%-----------------------------------------------------------------
-type start_type() :: 'normal'
@@ -58,8 +60,7 @@
%%------------------------------------------------------------------
--callback start(StartType :: normal | {takeover, node()} | {failover, node()},
- StartArgs :: term()) ->
+-callback start(StartType :: start_type(), StartArgs :: term()) ->
{'ok', pid()} | {'ok', pid(), State :: term()} | {'error', Reason :: term()}.
-callback stop(State :: term()) ->
@@ -132,7 +133,7 @@ ensure_all_started(Application, Type) ->
{ok, Started} ->
{ok, lists:reverse(Started)};
{error, Reason, Started} ->
- [stop(App) || App <- Started],
+ _ = [stop(App) || App <- Started],
{error, Reason}
end.
@@ -285,16 +286,18 @@ info() ->
set_env(Application, Key, Val) ->
application_controller:set_env(Application, Key, Val).
--spec set_env(Application, Par, Val, Timeout) -> 'ok' when
+-spec set_env(Application, Par, Val, Opts) -> 'ok' when
Application :: atom(),
Par :: atom(),
Val :: term(),
- Timeout :: timeout().
+ Opts :: [{timeout, timeout()} | {persistent, boolean()}].
set_env(Application, Key, Val, infinity) ->
- application_controller:set_env(Application, Key, Val, infinity);
+ set_env(Application, Key, Val, [{timeout, infinity}]);
set_env(Application, Key, Val, Timeout) when is_integer(Timeout), Timeout>=0 ->
- application_controller:set_env(Application, Key, Val, Timeout).
+ set_env(Application, Key, Val, [{timeout, Timeout}]);
+set_env(Application, Key, Val, Opts) when is_list(Opts) ->
+ application_controller:set_env(Application, Key, Val, Opts).
-spec unset_env(Application, Par) -> 'ok' when
Application :: atom(),
@@ -303,15 +306,17 @@ set_env(Application, Key, Val, Timeout) when is_integer(Timeout), Timeout>=0 ->
unset_env(Application, Key) ->
application_controller:unset_env(Application, Key).
--spec unset_env(Application, Par, Timeout) -> 'ok' when
+-spec unset_env(Application, Par, Opts) -> 'ok' when
Application :: atom(),
Par :: atom(),
- Timeout :: timeout().
+ Opts :: [{timeout, timeout()} | {persistent, boolean()}].
unset_env(Application, Key, infinity) ->
- application_controller:unset_env(Application, Key, infinity);
+ unset_env(Application, Key, [{timeout, infinity}]);
unset_env(Application, Key, Timeout) when is_integer(Timeout), Timeout>=0 ->
- application_controller:unset_env(Application, Key, Timeout).
+ unset_env(Application, Key, [{timeout, Timeout}]);
+unset_env(Application, Key, Opts) when is_list(Opts) ->
+ application_controller:unset_env(Application, Key, Opts).
-spec get_env(Par) -> 'undefined' | {'ok', Val} when
Par :: atom(),
diff --git a/lib/kernel/src/application_controller.erl b/lib/kernel/src/application_controller.erl
index 1a4473593a..daad45b6c2 100644
--- a/lib/kernel/src/application_controller.erl
+++ b/lib/kernel/src/application_controller.erl
@@ -1,7 +1,7 @@
%%
%% %CopyrightBegin%
%%
-%% Copyright Ericsson AB 1996-2013. All Rights Reserved.
+%% Copyright Ericsson AB 1996-2014. 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
@@ -461,14 +461,16 @@ permit_application(ApplName, Flag) ->
set_env(AppName, Key, Val) ->
- gen_server:call(?AC, {set_env, AppName, Key, Val}).
-set_env(AppName, Key, Val, Timeout) ->
- gen_server:call(?AC, {set_env, AppName, Key, Val}, Timeout).
+ gen_server:call(?AC, {set_env, AppName, Key, Val, []}).
+set_env(AppName, Key, Val, Opts) ->
+ Timeout = proplists:get_value(timeout, Opts, 5000),
+ gen_server:call(?AC, {set_env, AppName, Key, Val, Opts}, Timeout).
unset_env(AppName, Key) ->
- gen_server:call(?AC, {unset_env, AppName, Key}).
-unset_env(AppName, Key, Timeout) ->
- gen_server:call(?AC, {unset_env, AppName, Key}, Timeout).
+ gen_server:call(?AC, {unset_env, AppName, Key, []}).
+unset_env(AppName, Key, Opts) ->
+ Timeout = proplists:get_value(timeout, Opts, 5000),
+ gen_server:call(?AC, {unset_env, AppName, Key, Opts}, Timeout).
%%%-----------------------------------------------------------------
%%% call-back functions from gen_server
@@ -609,8 +611,8 @@ check_para([Else | _ParaList], AppName) ->
| {'change_application_data', _, _}
| {'permit_application', atom() | {'application',atom(),_},_}
| {'start_application', _, _}
- | {'unset_env', _, _}
- | {'set_env', _, _, _}.
+ | {'unset_env', _, _, _}
+ | {'set_env', _, _, _, _}.
-spec handle_call(calls(), {pid(), term()}, state()) ->
{'noreply', state()} | {'reply', term(), state()}.
@@ -827,12 +829,12 @@ handle_call({change_application_data, Applications, Config}, _From, S) ->
{reply, Error, S};
{'EXIT', R} ->
{reply, {error, R}, S};
- NewAppls ->
+ {NewAppls, NewConfig} ->
lists:foreach(fun(Appl) ->
ets:insert(ac_tab, {{loaded, Appl#appl.name},
Appl})
end, NewAppls),
- {reply, ok, S#state{conf_data = Config}}
+ {reply, ok, S#state{conf_data = NewConfig}}
end;
handle_call(prep_config_change, _From, S) ->
@@ -858,13 +860,25 @@ handle_call(which_applications, _From, S) ->
end, S#state.running),
{reply, Reply, S};
-handle_call({set_env, AppName, Key, Val}, _From, S) ->
+handle_call({set_env, AppName, Key, Val, Opts}, _From, S) ->
ets:insert(ac_tab, {{env, AppName, Key}, Val}),
- {reply, ok, S};
+ case proplists:get_value(persistent, Opts, false) of
+ true ->
+ Fun = fun(Env) -> lists:keystore(Key, 1, Env, {Key, Val}) end,
+ {reply, ok, S#state{conf_data = change_app_env(S#state.conf_data, AppName, Fun)}};
+ false ->
+ {reply, ok, S}
+ end;
-handle_call({unset_env, AppName, Key}, _From, S) ->
+handle_call({unset_env, AppName, Key, Opts}, _From, S) ->
ets:delete(ac_tab, {env, AppName, Key}),
- {reply, ok, S};
+ case proplists:get_value(persistent, Opts, false) of
+ true ->
+ Fun = fun(Env) -> lists:keydelete(Key, 1, Env) end,
+ {reply, ok, S#state{conf_data = change_app_env(S#state.conf_data, AppName, Fun)}};
+ false ->
+ {reply, ok, S}
+ end;
handle_call({control_application, AppName}, {Pid, _Tag}, S) ->
Control = S#state.control,
@@ -1536,18 +1550,19 @@ do_change_apps(Applications, Config, OldAppls) ->
end,
Errors),
- map(fun(Appl) ->
- AppName = Appl#appl.name,
- case is_loaded_app(AppName, Applications) of
- {true, Application} ->
- do_change_appl(make_appl(Application),
- Appl, SysConfig);
+ {map(fun(Appl) ->
+ AppName = Appl#appl.name,
+ case is_loaded_app(AppName, Applications) of
+ {true, Application} ->
+ do_change_appl(make_appl(Application),
+ Appl, SysConfig);
- %% ignored removed apps - handled elsewhere
- false ->
- Appl
- end
- end, OldAppls).
+ %% ignored removed apps - handled elsewhere
+ false ->
+ Appl
+ end
+ end, OldAppls),
+ SysConfig}.
is_loaded_app(AppName, [{application, AppName, App} | _]) ->
{true, {application, AppName, App}};
@@ -1640,6 +1655,16 @@ merge_env([{App, AppEnv1} | T], Env2, Res) ->
merge_env([], Env2, Res) ->
Env2 ++ Res.
+%% Changes the environment for the given application
+%% If there is no application, an empty one is created
+change_app_env(Env, App, Fun) ->
+ case get_env_key(App, Env) of
+ {value, AppEnv, RestEnv} ->
+ [{App, Fun(AppEnv)} | RestEnv];
+ _ ->
+ [{App, Fun([])} | Env]
+ end.
+
%% Merges envs for an application. Env2 overrides Env1
merge_app_env(Env1, Env2) ->
merge_app_env(Env1, Env2, []).
diff --git a/lib/kernel/src/application_master.erl b/lib/kernel/src/application_master.erl
index 68f78c6eb8..bc15b5a7de 100644
--- a/lib/kernel/src/application_master.erl
+++ b/lib/kernel/src/application_master.erl
@@ -1,7 +1,7 @@
%%
%% %CopyrightBegin%
%%
-%% Copyright Ericsson AB 1996-2013. All Rights Reserved.
+%% Copyright Ericsson AB 1996-2014. 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
@@ -27,7 +27,7 @@
-include("application_master.hrl").
--record(state, {child, appl_data, children = [], procs = 0, gleader}).
+-record(state, {child, appl_data, children = [], procs = 0, gleader, req=[]}).
%%-----------------------------------------------------------------
%% Func: start_link/1
@@ -205,22 +205,25 @@ terminate_loop(Child, State) ->
%%-----------------------------------------------------------------
%% The Application Master is linked to *all* processes in the group
-%% (application).
+%% (application).
%%-----------------------------------------------------------------
handle_msg({get_child, Tag, From}, State) ->
- From ! {Tag, get_child_i(State#state.child)},
- State;
+ get_child_i(State, Tag, From);
handle_msg({stop, Tag, From}, State) ->
catch terminate(normal, State),
From ! {Tag, ok},
exit(normal);
+handle_msg({child, Ref, GrandChild, Mod}, #state{req=Reqs0}=State) ->
+ {value, {_, Tag, From}, Reqs} = lists:keytake(Ref, 1, Reqs0),
+ From ! {Tag, {GrandChild, Mod}},
+ State#state{req=Reqs};
handle_msg(_, State) ->
State.
-
-terminate(Reason, State) ->
- terminate_child(State#state.child, State),
- kill_children(State#state.children),
+terminate(Reason, State = #state{child=Child, children=Children, req=Reqs}) ->
+ _ = [From ! {Tag, error} || {_, Tag, From} <- Reqs],
+ terminate_child(Child, State),
+ kill_children(Children),
exit(Reason).
@@ -342,8 +345,8 @@ start_supervisor(Type, M, A) ->
loop_it(Parent, Child, Mod, AppState) ->
receive
- {Parent, get_child} ->
- Parent ! {self(), Child, Mod},
+ {Parent, get_child, Ref} ->
+ Parent ! {child, Ref, Child, Mod},
loop_it(Parent, Child, Mod, AppState);
{Parent, terminate} ->
NewAppState = prep_stop(Mod, AppState),
@@ -382,10 +385,15 @@ prep_stop(Mod, AppState) ->
NewAppState
end.
-get_child_i(Child) ->
- Child ! {self(), get_child},
- receive
- {Child, GrandChild, Mod} -> {GrandChild, Mod}
+get_child_i(#state{child=Child, req=Reqs}=State, Tag, From) ->
+ Ref = erlang:make_ref(),
+ case erlang:is_process_alive(Child) of
+ true ->
+ Child ! {self(), get_child, Ref},
+ State#state{req=[{Ref, Tag, From}|Reqs]};
+ false ->
+ From ! {Tag, error},
+ State
end.
terminate_child_i(Child, State) ->
diff --git a/lib/kernel/src/code_server.erl b/lib/kernel/src/code_server.erl
index fc7ac08699..dd06affd70 100644
--- a/lib/kernel/src/code_server.erl
+++ b/lib/kernel/src/code_server.erl
@@ -63,7 +63,10 @@ init(Ref, Parent, [Root,Mode0]) ->
process_flag(trap_exit, true),
Db = ets:new(code, [private]),
- foreach(fun (M) -> ets:insert(Db, {M,preloaded}) end, erlang:pre_loaded()),
+ foreach(fun (M) ->
+ %% Pre-loaded modules are always sticky.
+ ets:insert(Db, [{M,preloaded},{{sticky,M},true}])
+ end, erlang:pre_loaded()),
ets:insert(Db, init:fetch_loaded()),
Mode =
@@ -988,7 +991,7 @@ try_archive_subdirs(_Archive, Base, []) ->
%% the complete directory name.
%%
del_path(Name0,Path,NameDb) ->
- case catch to_list(Name0)of
+ case catch filename:join([to_list(Name0)]) of
{'EXIT',_} ->
{{error,bad_name},Path};
Name ->
@@ -1165,7 +1168,7 @@ stick_dir(Dir, Stick, St) ->
true ->
foreach(fun (M) -> ets:insert(Db, {{sticky,M},true}) end, Mods);
false ->
- foreach(fun (M) -> ets:delete(Db, {sticky,M}) end, Mods)
+ foreach(fun (M) -> do_unstick_mod(Db, M) end, Mods)
end;
Error ->
Error
@@ -1177,6 +1180,15 @@ stick_mod(M, Stick, St) ->
true ->
ets:insert(Db, {{sticky,M},true});
false ->
+ do_unstick_mod(Db, M)
+ end.
+
+do_unstick_mod(Db, M) ->
+ case ets:lookup(Db, M) of
+ [{M,preloaded}] ->
+ %% Never unstick pre-loaded modules.
+ true;
+ _ ->
ets:delete(Db, {sticky,M})
end.
diff --git a/lib/kernel/src/disk_log_server.erl b/lib/kernel/src/disk_log_server.erl
index 684ea5b5db..45334912eb 100644
--- a/lib/kernel/src/disk_log_server.erl
+++ b/lib/kernel/src/disk_log_server.erl
@@ -1,7 +1,7 @@
%%
%% %CopyrightBegin%
%%
-%% Copyright Ericsson AB 1997-2013. All Rights Reserved.
+%% Copyright Ericsson AB 1997-2014. 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
@@ -199,7 +199,7 @@ do_open({open, W, #arg{name = Name}=A}=Req, From, State) ->
false when W =:= local ->
case A#arg.distributed of
{true, Nodes} ->
- Fun = fun() -> open_distr_rpc(Nodes, A, From) end,
+ Fun = open_distr_rpc_fun(Nodes, A, From),
_Pid = spawn(Fun),
%% No pending reply is expected, but don't reply yet.
{pending, State};
@@ -225,11 +225,15 @@ do_open({open, W, #arg{name = Name}=A}=Req, From, State) ->
end
end.
+-spec open_distr_rpc_fun([node()], _, _) -> % XXX: underspecified
+ fun(() -> no_return()).
+
+open_distr_rpc_fun(Nodes, A, From) ->
+ fun() -> open_distr_rpc(Nodes, A, From) end.
+
%% Spawning a process is a means to avoid deadlock when
%% disk_log_servers mutually open disk_logs.
--spec open_distr_rpc([node()], _, _) -> no_return(). % XXX: underspecified
-
open_distr_rpc(Nodes, A, From) ->
{AllReplies, BadNodes} = rpc:multicall(Nodes, ?MODULE, dist_open, [A]),
{Ok, Bad} = cr(AllReplies, [], []),
diff --git a/lib/kernel/src/dist_util.erl b/lib/kernel/src/dist_util.erl
index fc50ec6717..b127fe2e33 100644
--- a/lib/kernel/src/dist_util.erl
+++ b/lib/kernel/src/dist_util.erl
@@ -1,7 +1,7 @@
%%
%% %CopyrightBegin%
%%
-%% Copyright Ericsson AB 1999-2013. All Rights Reserved.
+%% Copyright Ericsson AB 1999-2014. 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
@@ -116,7 +116,8 @@ make_this_flags(RequestType, OtherNode) ->
?DFLAG_UNICODE_IO bor
?DFLAG_DIST_HDR_ATOM_CACHE bor
?DFLAG_SMALL_ATOM_TAGS bor
- ?DFLAG_UTF8_ATOMS).
+ ?DFLAG_UTF8_ATOMS bor
+ ?DFLAG_MAP_TAG).
handshake_other_started(#hs_data{request_type=ReqType}=HSData0) ->
{PreOtherFlags,Node,Version} = recv_name(HSData0),
diff --git a/lib/kernel/src/erts_debug.erl b/lib/kernel/src/erts_debug.erl
index f7a815882b..ef605d0bfe 100644
--- a/lib/kernel/src/erts_debug.erl
+++ b/lib/kernel/src/erts_debug.erl
@@ -182,6 +182,11 @@ size(Tuple, Seen0, Sum0) when is_tuple(Tuple) ->
Sum = Sum0 + 1 + tuple_size(Tuple),
tuple_size(1, tuple_size(Tuple), Tuple, Seen, Sum)
end;
+size(Map, Seen0, Sum) when is_map(Map) ->
+ case remember_term(Map, Seen0) of
+ seen -> {Sum,Seen0};
+ Seen -> map_size(Map, Seen, Sum)
+ end;
size(Fun, Seen0, Sum) when is_function(Fun) ->
case remember_term(Fun, Seen0) of
seen -> {Sum,Seen0};
@@ -203,6 +208,12 @@ tuple_size(I, Sz, Tuple, Seen0, Sum0) ->
{Sum,Seen} = size(element(I, Tuple), Seen0, Sum0),
tuple_size(I+1, Sz, Tuple, Seen, Sum).
+map_size(Map,Seen0,Sum0) ->
+ Kt = erts_internal:map_to_tuple_keys(Map),
+ Vs = maps:values(Map),
+ {Sum1,Seen1} = size(Kt,Seen0,Sum0),
+ fold_size(Vs,Seen1,Sum1+length(Vs)+3).
+
fun_size(Fun, Seen, Sum) ->
case erlang:fun_info(Fun, type) of
{type,external} ->
@@ -210,14 +221,14 @@ fun_size(Fun, Seen, Sum) ->
{type,local} ->
Sz = erts_debug:flat_size(fun() -> ok end),
{env,Env} = erlang:fun_info(Fun, env),
- fun_size_1(Env, Seen, Sum+Sz+length(Env))
+ fold_size(Env, Seen, Sum+Sz+length(Env))
end.
-fun_size_1([H|T], Seen0, Sum0) ->
+fold_size([H|T], Seen0, Sum0) ->
{Sum,Seen} = size(H, Seen0, Sum0),
- fun_size_1(T, Seen, Sum);
-fun_size_1([], Seen, Sum) -> {Sum,Seen}.
-
+ fold_size(T, Seen, Sum);
+fold_size([], Seen, Sum) -> {Sum,Seen}.
+
remember_term(Term, Seen) ->
case gb_trees:lookup(Term, Seen) of
none -> gb_trees:insert(Term, [Term], Seen);
diff --git a/lib/kernel/src/file.erl b/lib/kernel/src/file.erl
index b5152018e0..20b703e084 100644
--- a/lib/kernel/src/file.erl
+++ b/lib/kernel/src/file.erl
@@ -111,7 +111,8 @@
-type date_time() :: calendar:datetime().
-type posix_file_advise() :: 'normal' | 'sequential' | 'random'
| 'no_reuse' | 'will_need' | 'dont_need'.
--type sendfile_option() :: {chunk_size, non_neg_integer()}.
+-type sendfile_option() :: {chunk_size, non_neg_integer()}
+ | {use_threads, boolean()}.
-type file_info_option() :: {'time', 'local'} | {'time', 'universal'}
| {'time', 'posix'}.
%%% BIFs
@@ -198,7 +199,8 @@ get_cwd(Drive) ->
check_and_call(get_cwd, [file_name(Drive)]).
-spec set_cwd(Dir) -> ok | {error, Reason} when
- Dir :: name(),
+ Dir :: name() | EncodedBinary,
+ EncodedBinary :: binary(),
Reason :: posix() | badarg | no_translation.
set_cwd(Dirname) ->
@@ -1229,8 +1231,7 @@ change_time(Name, {{AY, AM, AD}, {AH, AMin, ASec}}=Atime,
sendfile(File, _Sock, _Offet, _Bytes, _Opts) when is_pid(File) ->
{error, badarg};
sendfile(File, Sock, Offset, Bytes, []) ->
- sendfile(File, Sock, Offset, Bytes, ?MAX_CHUNK_SIZE, [], [],
- false, false, false);
+ sendfile(File, Sock, Offset, Bytes, ?MAX_CHUNK_SIZE, [], [], []);
sendfile(File, Sock, Offset, Bytes, Opts) ->
ChunkSize0 = proplists:get_value(chunk_size, Opts, ?MAX_CHUNK_SIZE),
ChunkSize = if ChunkSize0 > ?MAX_CHUNK_SIZE ->
@@ -1240,8 +1241,7 @@ sendfile(File, Sock, Offset, Bytes, Opts) ->
%% Support for headers, trailers and options has been removed because the
%% Darwin and BSD API for using it does not play nice with
%% non-blocking sockets. See unix_efile.c for more info.
- sendfile(File, Sock, Offset, Bytes, ChunkSize, [], [],
- false,false,false).
+ sendfile(File, Sock, Offset, Bytes, ChunkSize, [], [], Opts).
%% sendfile/2
-spec sendfile(Filename, Socket) ->
@@ -1261,17 +1261,17 @@ sendfile(Filename, Sock) ->
%% Internal sendfile functions
sendfile(#file_descriptor{ module = Mod } = Fd, Sock, Offset, Bytes,
- ChunkSize, Headers, Trailers, Nodiskio, MNowait, Sync)
+ ChunkSize, Headers, Trailers, Opts)
when is_port(Sock) ->
case Mod:sendfile(Fd, Sock, Offset, Bytes, ChunkSize, Headers, Trailers,
- Nodiskio, MNowait, Sync) of
+ Opts) of
{error, enotsup} ->
sendfile_fallback(Fd, Sock, Offset, Bytes, ChunkSize,
Headers, Trailers);
Else ->
Else
end;
-sendfile(_,_,_,_,_,_,_,_,_,_) ->
+sendfile(_,_,_,_,_,_,_,_) ->
{error, badarg}.
%%%
diff --git a/lib/kernel/src/global.erl b/lib/kernel/src/global.erl
index ef878b8d0c..0a4edea452 100644
--- a/lib/kernel/src/global.erl
+++ b/lib/kernel/src/global.erl
@@ -1,7 +1,7 @@
%%
%% %CopyrightBegin%
%%
-%% Copyright Ericsson AB 1996-2013. All Rights Reserved.
+%% Copyright Ericsson AB 1996-2014. 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
@@ -1513,14 +1513,18 @@ delete_global_name(_Name, _Pid) ->
-record(him, {node, locker, vsn, my_tag}).
start_the_locker(DoTrace) ->
- spawn_link(fun() -> init_the_locker(DoTrace) end).
-
-init_the_locker(DoTrace) ->
- process_flag(trap_exit, true), % needed?
- S0 = #multi{do_trace = DoTrace},
- S1 = update_locker_known({add, get_known()}, S0),
- loop_the_locker(S1),
- erlang:error(locker_exited).
+ spawn_link(init_the_locker_fun(DoTrace)).
+
+-spec init_the_locker_fun(boolean()) -> fun(() -> no_return()).
+
+init_the_locker_fun(DoTrace) ->
+ fun() ->
+ process_flag(trap_exit, true), % needed?
+ S0 = #multi{do_trace = DoTrace},
+ S1 = update_locker_known({add, get_known()}, S0),
+ loop_the_locker(S1),
+ erlang:error(locker_exited)
+ end.
loop_the_locker(S) ->
?trace({loop_the_locker,S}),
diff --git a/lib/kernel/src/hipe_unified_loader.erl b/lib/kernel/src/hipe_unified_loader.erl
index e111cb800e..e5928c7b63 100644
--- a/lib/kernel/src/hipe_unified_loader.erl
+++ b/lib/kernel/src/hipe_unified_loader.erl
@@ -194,6 +194,13 @@ load_common(Mod, Bin, Beam, OldReferencesToPatch) ->
CodeSize, CodeBinary, Refs,
0,[] % ColdSize, CRrefs
] = binary_to_term(Bin),
+ ?debug_msg("***** ErLLVM *****~nVersion: ~s~nCheckSum: ~w~nConstAlign: ~w~n" ++
+ "ConstSize: ~w~nConstMap: ~w~nLabelMap: ~w~nExportMap ~w~nRefs ~w~n",
+ [Version, CheckSum, ConstAlign, ConstSize, ConstMap, LabelMap, ExportMap,
+ Refs]),
+ %% Write HiPE binary code to a file in the current directory in order to
+ %% debug by disassembling.
+ %% file:write_file("erl.o", CodeBinary, [binary]),
%% Check that we are loading up-to-date code.
version_check(Version, Mod),
case hipe_bifs:check_crc(CheckSum) of
@@ -203,6 +210,7 @@ load_common(Mod, Bin, Beam, OldReferencesToPatch) ->
"please regenerate native code for this runtime system\n", [Mod]),
bad_crc;
true ->
+ put(closures_to_patch, []),
%% Create data segment
{ConstAddr,ConstMap2} =
create_data_segment(ConstAlign, ConstSize, ConstMap),
@@ -220,24 +228,33 @@ load_common(Mod, Bin, Beam, OldReferencesToPatch) ->
{MFAs,Addresses} = exports(ExportMap, CodeAddress),
%% Remove references to old versions of the module.
ReferencesToPatch = get_refs_from(MFAs, []),
+ %% io:format("References to patch: ~w~n", [ReferencesToPatch]),
ok = remove_refs_from(MFAs),
%% Patch all dynamic references in the code.
%% Function calls, Atoms, Constants, System calls
ok = patch(Refs, CodeAddress, ConstMap2, Addresses, TrampolineMap),
+
%% Tell the system where the loaded funs are.
%% (patches the BEAM code to redirect to native.)
case Beam of
[] ->
+ %% This module was previously loaded as BEAM code during system
+ %% start-up before the code server has started (-enable-native-libs
+ %% is active), so we must now patch the pre-existing entries in the
+ %% fun table with the native code addresses for all closures.
+ lists:foreach(fun({FE, DestAddress}) ->
+ hipe_bifs:set_native_address_in_fe(FE, DestAddress)
+ end, erase(closures_to_patch)),
export_funs(Addresses),
ok;
BeamBinary when is_binary(BeamBinary) ->
%% Find all closures in the code.
+ [] = erase(closures_to_patch), %Clean up, assertion.
ClosurePatches = find_closure_patches(Refs),
AddressesOfClosuresToPatch =
calculate_addresses(ClosurePatches, CodeAddress, Addresses),
export_funs(Addresses),
- export_funs(Mod, BeamBinary, Addresses, AddressesOfClosuresToPatch),
- ok
+ export_funs(Mod, BeamBinary, Addresses, AddressesOfClosuresToPatch)
end,
%% Redirect references to the old module to the new module's BEAM stub.
patch_to_emu_step2(OldReferencesToPatch),
@@ -245,6 +262,9 @@ load_common(Mod, Bin, Beam, OldReferencesToPatch) ->
%% The call to export_funs/1 above updated the native addresses
%% for the targets, so passing 'Addresses' is not needed.
redirect(ReferencesToPatch),
+ %% Final clean up.
+ _ = erase(hipe_patch_closures),
+ _ = erase(hipe_assert_code_area),
?debug_msg("****************Loader Finished****************\n", []),
{module,Mod} % for compatibility with code:load_file/1
end.
@@ -562,12 +582,17 @@ patch_closure(DestMFA, Uniq, Index, Address, Addresses) ->
case get(hipe_patch_closures) of
false ->
[]; % This is taken care of when registering the module.
- true -> % We are not loading a module patch these closures
+ true ->
+ %% We are replacing a previosly loaded BEAM module with native code,
+ %% so we must reference the pre-existing entries in the fun table
+ %% from the native code. We must delay actually patching the native
+ %% address into the fun entry to ensure that the native code cannot
+ %% be called until it has been completely fixed up.
RemoteOrLocal = local, % closure code refs are local
DestAddress = get_native_address(DestMFA, Addresses, RemoteOrLocal),
BEAMAddress = hipe_bifs:fun_to_address(DestMFA),
- FE = hipe_bifs:make_fe(DestAddress, mod(DestMFA),
- {Uniq, Index, BEAMAddress}),
+ FE = hipe_bifs:get_fe(mod(DestMFA), {Uniq, Index, BEAMAddress}),
+ put(closures_to_patch, [{FE,DestAddress}|get(closures_to_patch)]),
?debug_msg("Patch FE(~w) to 0x~.16b->0x~.16b (emu:0x~.16b)\n",
[DestMFA, FE, DestAddress, BEAMAddress]),
?ASSERT(assert_local_patch(Address)),
diff --git a/lib/kernel/src/inet.erl b/lib/kernel/src/inet.erl
index 792593246a..41d422d7d4 100644
--- a/lib/kernel/src/inet.erl
+++ b/lib/kernel/src/inet.erl
@@ -1,7 +1,7 @@
%%
%% %CopyrightBegin%
%%
-%% Copyright Ericsson AB 1997-2013. All Rights Reserved.
+%% Copyright Ericsson AB 1997-2014. 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
@@ -597,8 +597,7 @@ getservbyname(Name, Protocol) when is_atom(Name) ->
Error -> Error
end.
--spec ntoa(IpAddress) ->
- {ok, Address} | {error, einval} when
+-spec ntoa(IpAddress) -> Address | {error, einval} when
Address :: string(),
IpAddress :: ip_address().
ntoa(Addr) ->
diff --git a/lib/kernel/src/inet_config.erl b/lib/kernel/src/inet_config.erl
index 2461f3ff25..fdc244f959 100644
--- a/lib/kernel/src/inet_config.erl
+++ b/lib/kernel/src/inet_config.erl
@@ -197,6 +197,9 @@ do_load_resolv({win32,Type}, longnames) ->
win32_load_from_registry(Type),
inet_db:set_lookup([native]);
+do_load_resolv({ose,_}, _) ->
+ inet_db:set_lookup([file]);
+
do_load_resolv(_, _) ->
inet_db:set_lookup([native]).
diff --git a/lib/kernel/src/kernel.app.src b/lib/kernel/src/kernel.app.src
index cb8c98ab06..5658c6b6cf 100644
--- a/lib/kernel/src/kernel.app.src
+++ b/lib/kernel/src/kernel.app.src
@@ -114,6 +114,7 @@
pg2]},
{applications, []},
{env, [{error_logger, tty}]},
- {mod, {kernel, []}}
+ {mod, {kernel, []}},
+ {runtime_dependencies, ["erts-6.0", "stdlib-2.0", "sasl-2.4"]}
]
}.
diff --git a/lib/kernel/src/kernel.appup.src b/lib/kernel/src/kernel.appup.src
index b946c2d1af..f8f4cc1ec2 100644
--- a/lib/kernel/src/kernel.appup.src
+++ b/lib/kernel/src/kernel.appup.src
@@ -1,7 +1,7 @@
%% -*- erlang -*-
%% %CopyrightBegin%
%%
-%% Copyright Ericsson AB 1999-2013. All Rights Reserved.
+%% Copyright Ericsson AB 1999-2014. 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
@@ -16,12 +16,10 @@
%%
%% %CopyrightEnd%
{"%VSN%",
- %% Up from - max two major revisions back
+ %% Up from - max one major revision back
[{<<"3\\.0(\\.[0-9]+)*">>,[restart_new_emulator]}, %% R17
- {<<"2\\.16(\\.[0-9]+)*">>,[restart_new_emulator]}, %% R16
- {<<"2\\.15(\\.[0-9]+)*">>,[restart_new_emulator]}],%% R15
- %% Down to - max two major revisions back
+ {<<"2\\.16(\\.[0-9]+)*">>,[restart_new_emulator]}],%% R16
+ %% Down to - max one major revision back
[{<<"3\\.0(\\.[0-9]+)*">>,[restart_new_emulator]}, %% R17
- {<<"2\\.16(\\.[0-9]+)*">>,[restart_new_emulator]}, %% R16
- {<<"2\\.15(\\.[0-9]+)*">>,[restart_new_emulator]}] %% R15
+ {<<"2\\.16(\\.[0-9]+)*">>,[restart_new_emulator]}] %% R16
}.
diff --git a/lib/kernel/src/os.erl b/lib/kernel/src/os.erl
index 9ffa9adeab..187fd0001b 100644
--- a/lib/kernel/src/os.erl
+++ b/lib/kernel/src/os.erl
@@ -67,7 +67,7 @@ unsetenv(_) ->
%%% End of BIFs
-spec type() -> {Osfamily, Osname} when
- Osfamily :: unix | win32,
+ Osfamily :: unix | win32 | ose,
Osname :: atom().
type() ->
@@ -230,7 +230,9 @@ unix_cmd(Cmd) ->
%% and the commands are read from standard input. We set the
%% $1 parameter for easy identification of the resident shell.
%%
--define(SHELL, "/bin/sh -s unix:cmd 2>&1").
+-define(ROOT, "/").
+-define(ROOT_ANDROID, "/system").
+-define(SHELL, "bin/sh -s unix:cmd 2>&1").
-define(PORT_CREATOR_NAME, os_cmd_port_creator).
%%
@@ -280,7 +282,12 @@ start_port_srv(Request) ->
end.
start_port_srv_handle({Ref,Client}) ->
- Reply = try open_port({spawn, ?SHELL},[stream]) of
+ Path = case lists:reverse(erlang:system_info(system_architecture)) of
+ % androideabi
+ "ibaediordna" ++ _ -> filename:join([?ROOT_ANDROID, ?SHELL]);
+ _ -> filename:join([?ROOT, ?SHELL])
+ end,
+ Reply = try open_port({spawn, Path},[stream]) of
Port when is_port(Port) ->
(catch port_connect(Port, Client)),
unlink(Port),
diff --git a/lib/kernel/src/rpc.erl b/lib/kernel/src/rpc.erl
index 7dc51495f7..2300b7e901 100644
--- a/lib/kernel/src/rpc.erl
+++ b/lib/kernel/src/rpc.erl
@@ -1,7 +1,7 @@
%%
%% %CopyrightBegin%
%%
-%% Copyright Ericsson AB 1996-2013. All Rights Reserved.
+%% Copyright Ericsson AB 1996-2014. 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
@@ -66,7 +66,7 @@
%%------------------------------------------------------------------------
--type state() :: gb_tree().
+-type state() :: gb_trees:tree(pid(), {pid(), reference()}).
%%------------------------------------------------------------------------
diff --git a/lib/kernel/test/application_SUITE.erl b/lib/kernel/test/application_SUITE.erl
index 9ec8a15861..4901206c8e 100644
--- a/lib/kernel/test/application_SUITE.erl
+++ b/lib/kernel/test/application_SUITE.erl
@@ -1,7 +1,7 @@
%%
%% %CopyrightBegin%
%%
-%% Copyright Ericsson AB 1996-2013. All Rights Reserved.
+%% Copyright Ericsson AB 1996-2014. 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
@@ -33,10 +33,10 @@
permit_false_start_local/1, permit_false_start_dist/1, script_start/1,
nodedown_start/1, init2973/0, loop2973/0, loop5606/1]).
--export([config_change/1,
+-export([config_change/1, persistent_env/1,
distr_changed_tc1/1, distr_changed_tc2/1,
ensure_started/1, ensure_all_started/1,
- shutdown_func/1, do_shutdown/1, shutdown_timeout/1]).
+ shutdown_func/1, do_shutdown/1, shutdown_timeout/1, shutdown_deadlock/1]).
-define(TESTCASE, testcase_name).
-define(testcase, ?config(?TESTCASE, Config)).
@@ -53,7 +53,9 @@ all() ->
load_use_cache, ensure_started, {group, reported_bugs}, start_phases,
script_start, nodedown_start, permit_false_start_local,
permit_false_start_dist, get_key, get_env, ensure_all_started,
- {group, distr_changed}, config_change, shutdown_func, shutdown_timeout].
+ {group, distr_changed}, config_change, shutdown_func, shutdown_timeout,
+ shutdown_deadlock,
+ persistent_env].
groups() ->
[{reported_bugs, [],
@@ -960,7 +962,7 @@ nodedown_start(Conf) when is_list(Conf) ->
ensure_started(suite) -> [];
ensure_started(doc) -> ["Test application:ensure_started/1."];
-ensure_started(Conf) ->
+ensure_started(_Conf) ->
{ok, Fd} = file:open("app1.app", [write]),
w_app1(Fd),
@@ -980,7 +982,7 @@ ensure_started(Conf) ->
ensure_all_started(suite) -> [];
ensure_all_started(doc) -> ["Test application:ensure_all_started/1-2."];
-ensure_all_started(Conf) ->
+ensure_all_started(_Conf) ->
{ok, Fd1} = file:open("app1.app", [write]),
w_app1(Fd1),
@@ -1074,10 +1076,13 @@ otp_1586(Conf) when is_list(Conf) ->
{ok, Fd} = file:open(filename:join(Dir, "app5.app"), [write]),
w_app5(Fd),
file:close(Fd),
- code:add_patha(Dir),
- ok = application:load(app4()),
- ok = application:unload(app4),
- ok.
+ try
+ true = code:add_patha(Dir),
+ ok = application:load(app4()),
+ ok = application:unload(app4)
+ after
+ _ = code:del_path(Dir)
+ end.
%%-----------------------------------------------------------------
%% Ticket: OTP-2078
@@ -1947,14 +1952,22 @@ config_change(Conf) when is_list(Conf) ->
%% Find out application data from boot script
Boot = filename:join([code:root_dir(), "bin", "start.boot"]),
{ok, Bin} = file:read_file(Boot),
- Appls = get_appls(binary_to_term(Bin)),
+ Appls0 = get_appls(binary_to_term(Bin)),
+
+ %% And add app1 in order to test OTP-11864 - included config files
+ %% not read for new (not already loaded) applications
+ Appls = [app1() | Appls0],
%% Simulate contents of "sys.config"
Config = [{stdlib, [{par1,sys},{par2,sys}]},
"t1",
"t2.config",
filename:join([DataDir, "subdir", "t3"]),
- {stdlib, [{par6,sys}]}],
+ {stdlib, [{par6,sys}]},
+ "t4.config"],
+
+ %% Check that app1 is not loaded
+ false = lists:keymember(app1,1,application:loaded_applications()),
%% Order application_controller to update configuration
ok = application_controller:change_application_data(Appls,
@@ -1969,6 +1982,13 @@ config_change(Conf) when is_list(Conf) ->
{value, {par5,t3}} = lists:keysearch(par5, 1, Env),
{value, {par6,sys}} = lists:keysearch(par6, 1, Env),
+ %% Check that app1 parameters are correctly set after loading
+ [] = application:get_all_env(app1),
+ application:load(app1()),
+ App1Env = application:get_all_env(app1),
+ {value, {par1,t4}} = lists:keysearch(par1, 1, App1Env),
+ application:unload(app1),
+
ok = file:set_cwd(CWD).
%% This function is stolen from SASL module release_handler, OTP R10B
@@ -1987,6 +2007,51 @@ get_appls([_ | T], Res) ->
get_appls([], Res) ->
Res.
+
+persistent_env(suite) ->
+ [];
+persistent_env(doc) ->
+ ["Test set_env/4 and unset_env/3 with persistent true"];
+persistent_env(Conf) when is_list(Conf) ->
+ ok = application:set_env(appinc, own2, persist, [{persistent, true}]),
+ ok = application:set_env(appinc, key1, persist, [{persistent, true}]),
+
+ %% own_env1 and own2 are set in appinc
+ ok = application:load(appinc()),
+ {ok, value1} = application:get_env(appinc, own_env1),
+ {ok, persist} = application:get_env(appinc, own2),
+ {ok, persist} = application:get_env(appinc, key1),
+
+ %% Changing the environment after loaded reflects and should persist
+ ok = application:set_env(appinc, own_env1, persist, [{persistent, true}]),
+ {ok, persist} = application:get_env(appinc, own_env1),
+ {ok, persist} = application:get_env(appinc, own2),
+ {ok, persist} = application:get_env(appinc, key1),
+
+ %% On reload, own_env1, own2 and key1 should all persist
+ ok = application:unload(appinc),
+ ok = application:load(appinc()),
+ {ok, persist} = application:get_env(appinc, own_env1),
+ {ok, persist} = application:get_env(appinc, own2),
+ {ok, persist} = application:get_env(appinc, key1),
+
+ %% Unset own_env1 and key1, own2 should still persist
+ ok = application:unset_env(appinc, own_env1, [{persistent, true}]),
+ ok = application:unset_env(appinc, key1, [{persistent, true}]),
+ undefined = application:get_env(appinc, own_env1),
+ {ok, persist} = application:get_env(appinc, own2),
+ undefined = application:get_env(appinc, key1),
+
+ %% own_env1 should be back to its application value on reload
+ ok = application:unload(appinc),
+ ok = application:load(appinc()),
+ {ok, value1} = application:get_env(appinc, own_env1),
+ {ok, persist} = application:get_env(appinc, own2),
+ undefined = application:get_env(appinc, key1),
+
+ %% Clean up
+ ok = application:unload(appinc).
+
%%%-----------------------------------------------------------------
%%% Tests the 'shutdown_func' kernel config parameter
%%%-----------------------------------------------------------------
@@ -2051,7 +2116,32 @@ shutdown_timeout(Config) when is_list(Config) ->
end,
ok.
+%%%-----------------------------------------------------------------
+%%% Provokes a (previous) application shutdown deadlock
+%%%-----------------------------------------------------------------
+shutdown_deadlock(Config) when is_list(Config) ->
+ DataDir = ?config(data_dir,Config),
+ code:add_path(filename:join([DataDir,deadlock])),
+ %% ok = rpc:call(Cp1, application, start, [sasl]),
+ ok = application:start(deadlock),
+ Tester = self(),
+ application:set_env(deadlock, fail_stop, Tester),
+ spawn(fun() -> Tester ! {stop, application:stop(deadlock)} end),
+ receive
+ {deadlock, Server} ->
+ spawn(fun() ->
+ Master = application_controller:get_master(deadlock),
+ Child = application_master:get_child(Master),
+ Tester ! {child, Child}
+ end),
+ timer:sleep(100),
+ erlang:display({self(), "Sending Continue", Server}),
+ Server ! continue
+ end,
+ [_|_] = application:which_applications(),
+ application:unload(deadlock), % clean up!
+ ok.
%%-----------------------------------------------------------------
diff --git a/lib/kernel/test/application_SUITE_data/deadlock/deadlock.app b/lib/kernel/test/application_SUITE_data/deadlock/deadlock.app
index 0c1001bed6..233c7a3f76 100644
--- a/lib/kernel/test/application_SUITE_data/deadlock/deadlock.app
+++ b/lib/kernel/test/application_SUITE_data/deadlock/deadlock.app
@@ -4,5 +4,5 @@
{applications, [kernel, stdlib, sasl]},
{modules, [deadlock]},
{mod, {deadlock, []}},
- {env, [{fail_start, false}]}
+ {env, [{fail_start, false}, {fail_stop, false}]}
]}.
diff --git a/lib/kernel/test/application_SUITE_data/deadlock/deadlock.erl b/lib/kernel/test/application_SUITE_data/deadlock/deadlock.erl
index 5f68bf9078..3ef6105371 100644
--- a/lib/kernel/test/application_SUITE_data/deadlock/deadlock.erl
+++ b/lib/kernel/test/application_SUITE_data/deadlock/deadlock.erl
@@ -21,7 +21,7 @@ init([sup]) ->
{ok, {{one_for_one, 5, 10}, [
{
sasl_syslog_dm, {?MODULE, start_link, []},
- permanent, brutal_kill, worker,
+ permanent, 25000, worker,
[deadlock]
}
]}};
@@ -32,6 +32,8 @@ init([sup]) ->
init([child]) ->
case application:get_env(deadlock, fail_start) of
{ok, false} ->
+ process_flag(trap_exit, true),
+ io:format("~p: Traps exit~n",[?MODULE]),
%% we must not fail on the first init, otherwise supervisor
%% terminates immediately
{ok, []};
@@ -50,6 +52,14 @@ handle_info(_Msg, State) ->
{noreply, State}.
terminate(_Reason, _State) ->
+ case application:get_env(deadlock, fail_stop) of
+ {ok, false} -> ok;
+ {ok, Tester} ->
+ Tester ! {deadlock, self()},
+ io:format("~p: Waiting in terminate (~p)~n",[?MODULE,Tester]),
+ receive continue -> ok end
+ end,
+ io:format("~p: terminates~n", [?MODULE]),
ok.
code_change(_OldVsn, State, _Extra) ->
diff --git a/lib/kernel/test/application_SUITE_data/t4.config b/lib/kernel/test/application_SUITE_data/t4.config
new file mode 100644
index 0000000000..8b2bc52c01
--- /dev/null
+++ b/lib/kernel/test/application_SUITE_data/t4.config
@@ -0,0 +1 @@
+[{app1, [{par1,t4}]}]. \ No newline at end of file
diff --git a/lib/kernel/test/code_SUITE.erl b/lib/kernel/test/code_SUITE.erl
index 17983e972d..afedc17e57 100644
--- a/lib/kernel/test/code_SUITE.erl
+++ b/lib/kernel/test/code_SUITE.erl
@@ -37,8 +37,7 @@
native_early_modules/1, get_mode/1]).
-export([init_per_testcase/2, end_per_testcase/2,
- init_per_suite/1, end_per_suite/1,
- sticky_compiler/1]).
+ init_per_suite/1, end_per_suite/1]).
%% error_logger
-export([init/1,
@@ -55,7 +54,7 @@ all() ->
delete, purge, purge_many_exits, soft_purge, is_loaded, all_loaded,
load_binary, dir_req, object_code, set_path_file,
upgrade,
- pa_pz_option, add_del_path, dir_disappeared,
+ sticky_dir, pa_pz_option, add_del_path, dir_disappeared,
ext_mod_dep, clash, load_cached, start_node_with_cache,
add_and_rehash, where_is_file_no_cache,
where_is_file_cached, purge_stacktrace, mult_lib_roots,
@@ -219,6 +218,13 @@ del_path(suite) -> [];
del_path(doc) -> [];
del_path(Config) when is_list(Config) ->
P = code:get_path(),
+ try
+ del_path_1(P)
+ after
+ code:set_path(P)
+ end.
+
+del_path_1(P) ->
test_server:format("Initial code:get_path()=~p~n",[P]),
{'EXIT',_} = (catch code:del_path(3)),
false = code:del_path(my_dummy_name),
@@ -226,19 +232,22 @@ del_path(Config) when is_list(Config) ->
Dir = filename:join([code:lib_dir(kernel),"ebin"]),
test_server:format("kernel dir: ~p~n",[Dir]),
-
true = code:del_path(kernel),
NewP = code:get_path(),
test_server:format("Path after removing 'kernel':~p~n",[NewP]),
ReferenceP = lists:delete(Dir,P),
test_server:format("Reference path:~p~n",[ReferenceP]),
NewP = ReferenceP, % check that dir is deleted
+ code:set_path(P),
+ %% An superfluous "/" should also work.
+ true = code:del_path("kernel/"),
+ NewP = ReferenceP, % check that dir is deleted
code:set_path(P),
+
true = code:del_path(Dir),
NewP1 = code:get_path(),
NewP1 = lists:delete(Dir,P), % check that dir is deleted
- code:set_path(P),
ok.
replace_path(suite) -> [];
@@ -577,35 +586,42 @@ sticky_dir(suite) -> [];
sticky_dir(doc) -> ["Test that a module with the same name as a module in ",
"a sticky directory cannot be loaded."];
sticky_dir(Config) when is_list(Config) ->
- MyDir=filename:dirname(code:which(?MODULE)),
- {ok, Node}=?t:start_node(sticky_dir, slave,[{args, "-pa \""++MyDir++"\""}]),
- File=filename:join([?config(data_dir, Config), "calendar"]),
- Ret=rpc:call(Node, ?MODULE, sticky_compiler, [File]),
+ Pa = filename:dirname(code:which(?MODULE)),
+ {ok,Node} = ?t:start_node(sticky_dir, slave, [{args,"-pa "++Pa}]),
+ Mods = [code,lists,erlang,init],
+ OutDir = filename:join(?config(priv_dir, Config), sticky_dir),
+ _ = file:make_dir(OutDir),
+ Ret = rpc:call(Node, erlang, apply,
+ [fun sticky_compiler/2,[Mods,OutDir]]),
case Ret of
- fail ->
- ?t:fail("c:c allowed a sticky module to be compiled and loaded.");
- ok ->
+ [] ->
ok;
Other ->
- test_server:format("Other: ~p",[Other])
+ io:format("~p\n", [Other]),
+ ?t:fail()
end,
- ?t:stop_node(Node).
+ ?t:stop_node(Node),
+ ok.
-sticky_compiler(File) ->
- Compiled=File++code:objfile_extension(),
- Dir=filename:dirname(File),
- code:add_patha(Dir),
- file:delete(Compiled),
- case c:c(File, [{outdir, Dir}]) of
- {ok, Module} ->
- case catch Module:test(apa) of
- {error, _} ->
- fail;
- {'EXIT', _} ->
- ok
- end;
- Other ->
- test_server:format("c:c(~p) returned: ~p",[File, Other]),
+sticky_compiler(Files, PrivDir) ->
+ code:add_patha(PrivDir),
+ Rets = [do_sticky_compile(F, PrivDir) || F <- Files],
+ [R || R <- Rets, R =/= ok].
+
+do_sticky_compile(Mod, Dir) ->
+ %% Make sure that the module is loaded. A module being sticky
+ %% only prevents it from begin reloaded, not from being loaded
+ %% from the wrong place to begin with.
+ Mod = Mod:module_info(module),
+ File = filename:append(Dir, atom_to_list(Mod)),
+ Src = io_lib:format("-module(~s).\n"
+ "-export([test/1]).\n"
+ "test(me) -> fail.\n", [Mod]),
+ ok = file:write_file(File++".erl", Src),
+ case c:c(File, [{outdir,Dir}]) of
+ {ok,Module} ->
+ Module:test(me);
+ {error,sticky_directory} ->
ok
end.
@@ -653,7 +669,7 @@ clash(Config) when is_list(Config) ->
DDir = ?config(data_dir,Config)++"clash/",
P = code:get_path(),
[TestServerPath|_] = [Path || Path <- code:get_path(),
- re:run(Path,"test_server/?$",[]) /= nomatch],
+ re:run(Path,"test_server/?$",[unicode]) /= nomatch],
%% test non-clashing entries
@@ -1527,7 +1543,10 @@ create_big_script(Config,Local) ->
Leftover <- UnloadFix,
lists:keymember(Leftover,1,InitialApplications) ],
%% Now we should have only "real" applications...
- [application:load(list_to_atom(Y)) || {match,[Y]} <- [ re:run(X,code:lib_dir()++"/"++"([^/-]*).*/ebin",[{capture,[1],list}]) || X <- code:get_path()],filter_app(Y,Local)],
+ [application:load(list_to_atom(Y))
+ || {match,[Y]} <- [re:run(X,code:lib_dir()++"/"++"([^/-]*).*/ebin",
+ [{capture,[1],list},unicode]) ||
+ X <- code:get_path()],filter_app(Y,Local)],
Apps = [ {N,V} || {N,_,V} <- application:loaded_applications()],
{ok,Fd} = file:open(Name ++ ".rel", [write]),
io:format(Fd,
diff --git a/lib/kernel/test/file_SUITE.erl b/lib/kernel/test/file_SUITE.erl
index c75639ae7e..f6d6cd94ab 100644
--- a/lib/kernel/test/file_SUITE.erl
+++ b/lib/kernel/test/file_SUITE.erl
@@ -161,7 +161,13 @@ init_per_suite(Config) when is_list(Config) ->
ok ->
[{sasl,started}]
end,
- ok = application:start(os_mon),
+ ok = case os:type() of
+ {ose,_} ->
+ ok;
+ _ ->
+ application:start(os_mon)
+ end,
+
case os:type() of
{win32, _} ->
Priv = ?config(priv_dir, Config),
@@ -185,7 +191,13 @@ end_per_suite(Config) when is_list(Config) ->
_ ->
ok
end,
- application:stop(os_mon),
+
+ case os:type() of
+ {ose,_} ->
+ ok;
+ _ ->
+ application:stop(os_mon)
+ end,
case proplists:get_value(sasl, Config) of
started ->
application:stop(sasl);
@@ -416,7 +428,13 @@ make_del_dir(Config) when is_list(Config) ->
% because there are processes having that directory as current.
?line ok = ?FILE_MODULE:make_dir(NewDir),
?line {ok,CurrentDir} = file:get_cwd(),
- ?line ok = ?FILE_MODULE:set_cwd(NewDir),
+ case {os:type(), length(NewDir) >= 260 } of
+ {{win32,_}, true} ->
+ io:format("Skip set_cwd for windows path longer than 260 (MAX_PATH)\n", []),
+ io:format("\nNewDir = ~p\n", [NewDir]);
+ _ ->
+ ?line ok = ?FILE_MODULE:set_cwd(NewDir)
+ end,
try
%% Check that we get an error when trying to create...
%% a deep directory
@@ -473,32 +491,39 @@ cur_dir_0(Config) when is_list(Config) ->
atom_to_list(?MODULE)
++"_curdir"),
?line ok = ?FILE_MODULE:make_dir(NewDir),
- ?line io:format("cd to ~s",[NewDir]),
- ?line ok = ?FILE_MODULE:set_cwd(NewDir),
-
- %% Create a file in the new current directory, and check that it
- %% really is created there
- ?line UncommonName = "uncommon.fil",
- ?line {ok,Fd} = ?FILE_MODULE:open(UncommonName,read_write),
- ?line ok = ?FILE_MODULE:close(Fd),
- ?line {ok,NewDirFiles} = ?FILE_MODULE:list_dir("."),
- ?line true = lists:member(UncommonName,NewDirFiles),
-
- %% Delete the directory and return to the old current directory
- %% and check that the created file isn't there (too!)
- ?line expect({error, einval}, {error, eacces},
- ?FILE_MODULE:del_dir(NewDir)),
- ?line ?FILE_MODULE:delete(UncommonName),
- ?line {ok,[]} = ?FILE_MODULE:list_dir("."),
- ?line ok = ?FILE_MODULE:set_cwd(Dir1),
- ?line io:format("cd back to ~s",[Dir1]),
- ?line ok = ?FILE_MODULE:del_dir(NewDir),
- ?line {error, enoent} = ?FILE_MODULE:set_cwd(NewDir),
- ?line ok = ?FILE_MODULE:set_cwd(Dir1),
- ?line io:format("cd back to ~s",[Dir1]),
- ?line {ok,OldDirFiles} = ?FILE_MODULE:list_dir("."),
- ?line false = lists:member(UncommonName,OldDirFiles),
-
+ case {os:type(), length(NewDir) >= 260} of
+ {{win32,_}, true} ->
+ io:format("Skip set_cwd for windows path longer than 260 (MAX_PATH):\n"),
+ io:format("\nNewDir = ~p\n", [NewDir]);
+ _ ->
+ io:format("cd to ~s",[NewDir]),
+ ok = ?FILE_MODULE:set_cwd(NewDir),
+
+ %% Create a file in the new current directory, and check that it
+ %% really is created there
+ UncommonName = "uncommon.fil",
+ {ok,Fd} = ?FILE_MODULE:open(UncommonName,read_write),
+ ok = ?FILE_MODULE:close(Fd),
+ {ok,NewDirFiles} = ?FILE_MODULE:list_dir("."),
+ true = lists:member(UncommonName,NewDirFiles),
+
+ %% Delete the directory and return to the old current directory
+ %% and check that the created file isn't there (too!)
+ expect({error, einval}, {error, eacces},
+ ?FILE_MODULE:del_dir(NewDir)),
+ ?FILE_MODULE:delete(UncommonName),
+ {ok,[]} = ?FILE_MODULE:list_dir("."),
+ ok = ?FILE_MODULE:set_cwd(Dir1),
+ io:format("cd back to ~s",[Dir1]),
+
+ ok = ?FILE_MODULE:del_dir(NewDir),
+ {error, enoent} = ?FILE_MODULE:set_cwd(NewDir),
+ ok = ?FILE_MODULE:set_cwd(Dir1),
+ io:format("cd back to ~s",[Dir1]),
+ {ok,OldDirFiles} = ?FILE_MODULE:list_dir("."),
+ false = lists:member(UncommonName,OldDirFiles)
+ end,
+
%% Try doing some bad things
?line {error, badarg} = ?FILE_MODULE:set_cwd({foo,bar}),
?line {error, enoent} = ?FILE_MODULE:set_cwd(""),
@@ -525,11 +550,11 @@ cur_dir_1(Config) when is_list(Config) ->
?line Dog = test_server:timetrap(test_server:seconds(5)),
?line case os:type() of
- {unix, _} ->
- ?line {error, enotsup} = ?FILE_MODULE:get_cwd("d:");
- {win32, _} ->
- win_cur_dir_1(Config)
- end,
+ {win32, _} ->
+ win_cur_dir_1(Config);
+ _ ->
+ ?line {error, enotsup} = ?FILE_MODULE:get_cwd("d:")
+ end,
?line [] = flush(),
?line test_server:timetrap_cancel(Dog),
ok.
@@ -712,7 +737,10 @@ open1(Config) when is_list(Config) ->
?line io:format(Fd1,Str,[]),
?line {ok,0} = ?FILE_MODULE:position(Fd1,bof),
?line Str = io:get_line(Fd1,''),
- ?line Str = io:get_line(Fd2,''),
+ ?line case io:get_line(Fd2,'') of
+ Str -> Str;
+ eof -> Str
+ end,
?line ok = ?FILE_MODULE:close(Fd2),
?line {ok,0} = ?FILE_MODULE:position(Fd1,bof),
?line ok = ?FILE_MODULE:truncate(Fd1),
@@ -1246,7 +1274,7 @@ file_info_basic_directory(Config) when is_list(Config) ->
?line test_directory("/", read_write),
?line test_directory("c:/", read_write),
?line test_directory("c:\\", read_write);
- {unix, _} ->
+ _ ->
?line test_directory("/", read)
end,
test_server:timetrap_cancel(Dog).
@@ -1967,7 +1995,6 @@ names(Config) when is_list(Config) ->
?line Name1 = filename:join(RootDir, FileName),
?line Name2 = [RootDir,"/","foo1",".","fil"],
?line Name3 = [RootDir,"/",foo,$1,[[[],[],'.']],"f",il],
- ?line Name4 = list_to_atom(Name1),
?line {ok,Fd0} = ?FILE_MODULE:open(Name1,write),
?line ok = ?FILE_MODULE:close(Fd0),
@@ -1980,23 +2007,33 @@ names(Config) when is_list(Config) ->
?line ok = ?FILE_MODULE:close(Fd2),
?line {ok,Fd3} = ?FILE_MODULE:open(Name3,read),
?line ok = ?FILE_MODULE:close(Fd3),
- ?line {ok,Fd4} = ?FILE_MODULE:open(Name4,read),
- ?line ok = ?FILE_MODULE:close(Fd4),
+ case length(Name1) > 255 of
+ true ->
+ io:format("Path too long for an atom:\n\n~p\n", [Name1]);
+ false ->
+ Name4 = list_to_atom(Name1),
+ {ok,Fd4} = ?FILE_MODULE:open(Name4,read),
+ ok = ?FILE_MODULE:close(Fd4)
+ end,
%% Try some path names
?line Path1 = RootDir,
?line Path2 = [RootDir],
?line Path3 = ['',[],[RootDir,[[]]]],
- ?line Path4 = list_to_atom(Path1),
?line {ok,Fd11,_} = ?FILE_MODULE:path_open([Path1],FileName,read),
?line ok = ?FILE_MODULE:close(Fd11),
?line {ok,Fd12,_} = ?FILE_MODULE:path_open([Path2],FileName,read),
?line ok = ?FILE_MODULE:close(Fd12),
?line {ok,Fd13,_} = ?FILE_MODULE:path_open([Path3],FileName,read),
?line ok = ?FILE_MODULE:close(Fd13),
- ?line {ok,Fd14,_} = ?FILE_MODULE:path_open([Path4],FileName,read),
- ?line ok = ?FILE_MODULE:close(Fd14),
-
+ case length(Path1) > 255 of
+ true->
+ io:format("Path too long for an atom:\n\n~p\n", [Path1]);
+ false ->
+ Path4 = list_to_atom(Path1),
+ {ok,Fd14,_} = ?FILE_MODULE:path_open([Path4],FileName,read),
+ ok = ?FILE_MODULE:close(Fd14)
+ end,
?line [] = flush(),
?line test_server:timetrap_cancel(Dog),
ok.
@@ -2030,15 +2067,15 @@ e_delete(Config) when is_list(Config) ->
%% No permission.
?line case os:type() of
- {unix, _} ->
+ {win32, _} ->
+ %% Remove a character device.
+ ?line {error, eacces} = ?FILE_MODULE:delete("nul");
+ _ ->
?line ?FILE_MODULE:write_file_info(
Base, #file_info {mode=0}),
?line {error, eacces} = ?FILE_MODULE:delete(Afile),
?line ?FILE_MODULE:write_file_info(
- Base, #file_info {mode=8#600});
- {win32, _} ->
- %% Remove a character device.
- ?line {error, eacces} = ?FILE_MODULE:delete("nul")
+ Base, #file_info {mode=8#600})
end,
?line [] = flush(),
@@ -2140,6 +2177,9 @@ e_rename(Config) when is_list(Config) ->
%% At least Windows NT can
%% successfully move a file to
%% another drive.
+ ok;
+ {ose, _} ->
+ %% disabled for now
ok
end,
[] = flush(),
@@ -2171,13 +2211,13 @@ e_make_dir(Config) when is_list(Config) ->
%% No permission (on Unix only).
case os:type() of
- {unix, _} ->
+ {win32, _} ->
+ ok;
+ _ ->
?FILE_MODULE:write_file_info(Base, #file_info {mode=0}),
{error, eacces} = ?FILE_MODULE:make_dir(filename:join(Base, "xxxx")),
?FILE_MODULE:write_file_info(
- Base, #file_info {mode=8#600});
- {win32, _} ->
- ok
+ Base, #file_info {mode=8#600})
end,
test_server:timetrap_cancel(Dog),
ok.
@@ -2220,14 +2260,14 @@ e_del_dir(Config) when is_list(Config) ->
%% No permission.
case os:type() of
- {unix, _} ->
+ {win32, _} ->
+ ok;
+ _ ->
ADirectory = filename:join(Base, "no_perm"),
ok = ?FILE_MODULE:make_dir(ADirectory),
?FILE_MODULE:write_file_info( Base, #file_info {mode=0}),
{error, eacces} = ?FILE_MODULE:del_dir(ADirectory),
- ?FILE_MODULE:write_file_info( Base, #file_info {mode=8#600});
- {win32, _} ->
- ok
+ ?FILE_MODULE:write_file_info( Base, #file_info {mode=8#600})
end,
[] = flush(),
test_server:timetrap_cancel(Dog),
@@ -2655,6 +2695,9 @@ symlinks(Config) when is_list(Config) ->
case ?FILE_MODULE:make_symlink(Name, Alias) of
{error, enotsup} ->
{skipped, "Links not supported on this platform"};
+ {error, eperm} ->
+ {win32,_} = os:type(),
+ {skipped, "Windows user not privileged to create symlinks"};
ok ->
?line {ok, Info1} = ?FILE_MODULE:read_file_info(Name),
?line {ok, Info1} = ?FILE_MODULE:read_file_info(Alias),
@@ -3581,7 +3624,11 @@ otp_10852(Config) when is_list(Config) ->
ok = rpc_call(Node, list_dir_all, [B]),
ok = rpc_call(Node, read_file, [B]),
ok = rpc_call(Node, make_link, [B,B]),
- ok = rpc_call(Node, make_symlink, [B,B]),
+ case rpc_call(Node, make_symlink, [B,B]) of
+ ok -> ok;
+ {error, E} when (E =:= enotsup) or (E =:= eperm) ->
+ {win32,_} = os:type()
+ end,
ok = rpc_call(Node, delete, [B]),
ok = rpc_call(Node, make_dir, [B]),
ok = rpc_call(Node, del_dir, [B]),
diff --git a/lib/kernel/test/gen_tcp_misc_SUITE.erl b/lib/kernel/test/gen_tcp_misc_SUITE.erl
index ee8bfcceb1..2df4bf7c95 100644
--- a/lib/kernel/test/gen_tcp_misc_SUITE.erl
+++ b/lib/kernel/test/gen_tcp_misc_SUITE.erl
@@ -1,7 +1,7 @@
%%
%% %CopyrightBegin%
%%
-%% Copyright Ericsson AB 1998-2013. All Rights Reserved.
+%% Copyright Ericsson AB 1998-2014. 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
@@ -50,6 +50,14 @@
oct_acceptor/1,
otp_7731_server/1, zombie_server/2, do_iter_max_socks/2]).
+init_per_testcase(wrapping_oct, Config) when is_list(Config) ->
+ Dog = case os:type() of
+ {ose,_} ->
+ test_server:timetrap(test_server:minutes(20));
+ _Else ->
+ test_server:timetrap(test_server:seconds(600))
+ end,
+ [{watchdog, Dog}|Config];
init_per_testcase(iter_max_socks, Config) when is_list(Config) ->
Dog = case os:type() of
{win32,_} ->
@@ -58,6 +66,17 @@ init_per_testcase(iter_max_socks, Config) when is_list(Config) ->
test_server:timetrap(test_server:seconds(240))
end,
[{watchdog, Dog}|Config];
+init_per_testcase(accept_system_limit, Config) when is_list(Config) ->
+ case os:type() of
+ {ose,_} ->
+ {skip,"Skip in OSE"};
+ _ ->
+ Dog = test_server:timetrap(test_server:seconds(240)),
+ [{watchdog,Dog}|Config]
+ end;
+init_per_testcase(wrapping_oct, Config) when is_list(Config) ->
+ Dog = test_server:timetrap(test_server:seconds(600)),
+ [{watchdog, Dog}|Config];
init_per_testcase(_Func, Config) when is_list(Config) ->
Dog = test_server:timetrap(test_server:seconds(240)),
[{watchdog, Dog}|Config].
@@ -537,7 +556,6 @@ otp_3924(Config) when is_list(Config) ->
otp_3924_1(MaxDelay).
otp_3924_1(MaxDelay) ->
- Dog = test_server:timetrap(test_server:seconds(240)),
?line {ok, Node} = start_node(otp_3924),
?line DataLen = 100*1024,
?line Data = otp_3924_data(DataLen),
@@ -548,7 +566,6 @@ otp_3924_1(MaxDelay) ->
?line ok = otp_3924(MaxDelay, Node, Data, DataLen, N)
end),
?line test_server:stop_node(Node),
- test_server:timetrap_cancel(Dog),
ok.
otp_3924(MaxDelay, Node, Data, DataLen, N) ->
@@ -1953,7 +1970,9 @@ accept_system_limit(doc) ->
accept_system_limit(Config) when is_list(Config) ->
?line {ok, LS} = gen_tcp:listen(0, []),
?line {ok, TcpPort} = inet:port(LS),
- ?line Connector = spawn_link(fun () -> connector(TcpPort) end),
+ Me = self(),
+ ?line Connector = spawn_link(fun () -> connector(TcpPort, Me) end),
+ receive {Connector, sync} -> Connector ! {self(), continue} end,
?line ok = acceptor(LS, false, []),
?line Connector ! stop,
ok.
@@ -1970,8 +1989,10 @@ acceptor(LS, GotSL, A) ->
error
end.
-connector(TcpPort) ->
+connector(TcpPort, Tester) ->
ManyPorts = open_ports([]),
+ Tester ! {self(), sync},
+ receive {Tester, continue} -> timer:sleep(100) end,
ConnF = fun (Port) ->
case catch gen_tcp:connect({127,0,0,1}, TcpPort, []) of
{ok, Sock} ->
@@ -2705,13 +2726,11 @@ wrapping_oct(doc) ->
wrapping_oct(suite) ->
[];
wrapping_oct(Config) when is_list(Config) ->
- Dog = test_server:timetrap(test_server:seconds(600)),
{ok,Sock} = gen_tcp:listen(0,[{active,false},{mode,binary}]),
{ok,Port} = inet:port(Sock),
spawn_link(?MODULE,oct_acceptor,[Sock]),
Res = oct_datapump(Port,16#1FFFFFFFF),
gen_tcp:close(Sock),
- test_server:timetrap_cancel(Dog),
ok = Res,
ok.
diff --git a/lib/kernel/test/heart_SUITE.erl b/lib/kernel/test/heart_SUITE.erl
index 320b23bea1..35d3b75b34 100644
--- a/lib/kernel/test/heart_SUITE.erl
+++ b/lib/kernel/test/heart_SUITE.erl
@@ -1,7 +1,7 @@
%%
%% %CopyrightBegin%
%%
-%% Copyright Ericsson AB 1996-2012. All Rights Reserved.
+%% Copyright Ericsson AB 1996-2014. 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
@@ -93,10 +93,10 @@ start_check(Type, Name) ->
start_check(Type, Name, []).
start_check(Type, Name, Envs) ->
Args = case ?t:os_type() of
- {win32,_} ->
- "-heart " ++ env_encode([{"HEART_COMMAND", no_reboot}|Envs]);
+ {win32,_} ->
+ "+t50000 -heart " ++ env_encode([{"HEART_COMMAND", no_reboot}|Envs]);
_ ->
- "-heart " ++ env_encode(Envs)
+ "+t50000 -heart " ++ env_encode(Envs)
end,
{ok, Node} = case Type of
loose ->
diff --git a/lib/kernel/test/kernel_SUITE.erl b/lib/kernel/test/kernel_SUITE.erl
index 0f29d895e5..1884e8cf58 100644
--- a/lib/kernel/test/kernel_SUITE.erl
+++ b/lib/kernel/test/kernel_SUITE.erl
@@ -1,7 +1,7 @@
%%
%% %CopyrightBegin%
%%
-%% Copyright Ericsson AB 1997-2011. All Rights Reserved.
+%% Copyright Ericsson AB 1997-2014. 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
@@ -23,9 +23,6 @@
-include_lib("test_server/include/test_server.hrl").
-% Default timetrap timeout (set in init_per_testcase).
--define(default_timeout, ?t:minutes(1)).
-
% Test server specific exports
-export([all/0, suite/0,groups/0,init_per_suite/1, end_per_suite/1,
init_per_group/2,end_per_group/2]).
@@ -59,11 +56,8 @@ end_per_group(_GroupName, Config) ->
init_per_testcase(_Case, Config) ->
- ?line Dog=test_server:timetrap(?default_timeout),
- [{watchdog, Dog}|Config].
-end_per_testcase(_Case, Config) ->
- Dog=?config(watchdog, Config),
- test_server:timetrap_cancel(Dog),
+ Config.
+end_per_testcase(_Case, _Config) ->
ok.
%
@@ -78,56 +72,80 @@ app_test(Config) when is_list(Config) ->
ok.
-%% Test that appup allows upgrade from/downgrade to a maximum of two
-%% major releases back.
+%% Test that appup allows upgrade from/downgrade to a maximum of one
+%% major release back.
appup_test(_Config) ->
- application:load(kernel),
- {_,_,Vsn} = lists:keyfind(kernel,1,application:loaded_applications()),
- AppupFile = filename:join([code:lib_dir(kernel),ebin,"kernel.appup"]),
+ appup_tests(kernel,create_test_vsns(kernel)).
+
+appup_tests(_App,{[],[]}) ->
+ {skip,"no previous releases available"};
+appup_tests(App,{OkVsns,NokVsns}) ->
+ application:load(App),
+ {_,_,Vsn} = lists:keyfind(App,1,application:loaded_applications()),
+ AppupFileName = atom_to_list(App) ++ ".appup",
+ AppupFile = filename:join([code:lib_dir(App),ebin,AppupFileName]),
{ok,[{Vsn,UpFrom,DownTo}=AppupScript]} = file:consult(AppupFile),
ct:log("~p~n",[AppupScript]),
- {OkVsns,NokVsns} = create_test_vsns(Vsn),
+ ct:log("Testing ok versions: ~p~n",[OkVsns]),
check_appup(OkVsns,UpFrom,{ok,[restart_new_emulator]}),
check_appup(OkVsns,DownTo,{ok,[restart_new_emulator]}),
+ ct:log("Testing not ok versions: ~p~n",[NokVsns]),
check_appup(NokVsns,UpFrom,error),
check_appup(NokVsns,DownTo,error),
ok.
-create_test_vsns(Current) ->
- [XStr,YStr|Rest] = string:tokens(Current,"."),
- X = list_to_integer(XStr),
- Y = list_to_integer(YStr),
- SecondMajor = vsn(X,Y-2),
- SecondMinor = SecondMajor ++ ".1.3",
- FirstMajor = vsn(X,Y-1),
- FirstMinor = FirstMajor ++ ".57",
- ThisMajor = vsn(X,Y),
- This =
- case Rest of
- [] ->
- [];
- ["1"] ->
- [ThisMajor];
- _ ->
- ThisMinor = ThisMajor ++ ".1",
- [ThisMajor,ThisMinor]
+create_test_vsns(App) ->
+ ThisMajor = erlang:system_info(otp_release),
+ FirstMajor = previous_major(ThisMajor),
+ SecondMajor = previous_major(FirstMajor),
+ Ok = app_vsn(App,[ThisMajor,FirstMajor]),
+ Nok0 = app_vsn(App,[SecondMajor]),
+ Nok = case Ok of
+ [Ok1|_] ->
+ [Ok1 ++ ",1" | Nok0]; % illegal
+ _ ->
+ Nok0
+ end,
+ {Ok,Nok}.
+
+previous_major("17") ->
+ "r16b";
+previous_major("r16b") ->
+ "r15b";
+previous_major(Rel) ->
+ integer_to_list(list_to_integer(Rel)-1).
+
+app_vsn(App,[R|Rs]) ->
+ OldRel =
+ case test_server:is_release_available(R) of
+ true ->
+ {release,R};
+ false ->
+ case ct:get_config({otp_releases,list_to_atom(R)}) of
+ undefined ->
+ false;
+ Prog0 ->
+ case os:find_executable(Prog0) of
+ false ->
+ false;
+ Prog ->
+ {prog,Prog}
+ end
+ end
end,
- OkVsns = This ++ [FirstMajor, FirstMinor, SecondMajor, SecondMinor],
-
- ThirdMajor = vsn(X,Y-3),
- ThirdMinor = ThirdMajor ++ ".10.12",
- Illegal = ThisMajor ++ ",1",
- Newer1Major = vsn(X,Y+1),
- Newer1Minor = Newer1Major ++ ".1",
- Newer2Major = ThisMajor ++ "1",
- NokVsns = [ThirdMajor,ThirdMinor,
- Illegal,
- Newer1Major,Newer1Minor,
- Newer2Major],
- {OkVsns,NokVsns}.
-
-vsn(X,Y) ->
- integer_to_list(X) ++ "." ++ integer_to_list(Y).
+ case OldRel of
+ false ->
+ app_vsn(App,Rs);
+ _ ->
+ {ok,N} = test_server:start_node(prevrel,peer,[{erl,[OldRel]}]),
+ _ = rpc:call(N,application,load,[App]),
+ As = rpc:call(N,application,loaded_applications,[]),
+ {_,_,V} = lists:keyfind(App,1,As),
+ test_server:stop_node(N),
+ [V|app_vsn(App,Rs)]
+ end;
+app_vsn(_App,[]) ->
+ [].
check_appup([Vsn|Vsns],Instrs,Expected) ->
case systools_relup:appup_search_for_version(Vsn, Instrs) of
diff --git a/lib/kernel/test/prim_file_SUITE.erl b/lib/kernel/test/prim_file_SUITE.erl
index 199e597e78..05bd5b3a3d 100644
--- a/lib/kernel/test/prim_file_SUITE.erl
+++ b/lib/kernel/test/prim_file_SUITE.erl
@@ -1,7 +1,7 @@
%%
%% %CopyrightBegin%
%%
-%% Copyright Ericsson AB 2000-2013. All Rights Reserved.
+%% Copyright Ericsson AB 2000-2014. 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
@@ -78,7 +78,7 @@
_ -> apply(?PRIM_FILE, F, [H | A])
end).
-suite() -> [{ct_hooks,[ts_install_cth]}].
+suite() -> [].
all() ->
[read_write_file, {group, dirs}, {group, files},
@@ -183,7 +183,6 @@ time_dist({_D1, _T1} = DT1, {_D2, _T2} = DT2) ->
read_write_file(suite) -> [];
read_write_file(doc) -> [];
read_write_file(Config) when is_list(Config) ->
- ?line Dog = test_server:timetrap(test_server:seconds(5)),
?line RootDir = ?config(priv_dir,Config),
?line Name = filename:join(RootDir,
atom_to_list(?MODULE)
@@ -232,7 +231,6 @@ read_write_file(Config) when is_list(Config) ->
?line {ok,Bin5} = ?PRIM_FILE:read_file(Name),
?line {Bin1,Bin2} = split_binary(Bin5,byte_size(Bin1)),
- ?line test_server:timetrap_cancel(Dog),
ok.
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
@@ -254,7 +252,6 @@ make_del_dir_b(Config) when is_list(Config) ->
Result.
make_del_dir(Config, Handle, Suffix) ->
- ?line Dog = test_server:timetrap(test_server:seconds(5)),
?line RootDir = ?config(priv_dir,Config),
?line NewDir = filename:join(RootDir,
atom_to_list(?MODULE)
@@ -269,7 +266,13 @@ make_del_dir(Config, Handle, Suffix) ->
% because there are processes having that directory as current.
?line ok = ?PRIM_FILE_call(make_dir, Handle, [NewDir]),
?line {ok, CurrentDir} = ?PRIM_FILE_call(get_cwd, Handle, []),
- ?line ok = ?PRIM_FILE_call(set_cwd, Handle, [NewDir]),
+ case {os:type(), length(NewDir) >= 260 } of
+ {{win32,_}, true} ->
+ io:format("Skip set_cwd for windows path longer than 260 (MAX_PATH)\n", []),
+ io:format("\nNewDir = ~p\n", [NewDir]);
+ _ ->
+ ok = ?PRIM_FILE_call(set_cwd, Handle, [NewDir])
+ end,
try
%% Check that we get an error when trying to create...
%% a deep directory
@@ -302,9 +305,7 @@ make_del_dir(Config, Handle, Suffix) ->
{error, einval} -> ok %FreeBSD
end,
?line {error, enoent} = ?PRIM_FILE_call(del_dir, Handle, [""]),
- ?line {error, badarg} = ?PRIM_FILE_call(del_dir, Handle, [[3,2,1,{}]]),
-
- ?line test_server:timetrap_cancel(Dog)
+ ?line {error, badarg} = ?PRIM_FILE_call(del_dir, Handle, [[3,2,1,{}]])
after
?line ok = ?PRIM_FILE_call(set_cwd, Handle, [CurrentDir])
end,
@@ -324,7 +325,6 @@ cur_dir_0b(Config) when is_list(Config) ->
Result.
cur_dir_0(Config, Handle) ->
- ?line Dog = test_server:timetrap(test_server:seconds(5)),
%% Find out the current dir, and cd to it ;-)
?line {ok,BaseDir} = ?PRIM_FILE_call(get_cwd, Handle, []),
?line Dir1 = BaseDir ++ "", %% Check that it's a string
@@ -341,31 +341,37 @@ cur_dir_0(Config, Handle) ->
?line RootDir = ?config(priv_dir,Config),
?line NewDir = filename:join(RootDir, DirName),
?line ok = ?PRIM_FILE_call(make_dir, Handle, [NewDir]),
- ?line io:format("cd to ~s",[NewDir]),
- ?line ok = ?PRIM_FILE_call(set_cwd, Handle, [NewDir]),
-
- %% Create a file in the new current directory, and check that it
- %% really is created there
- ?line UncommonName = "uncommon.fil",
- ?line {ok,Fd} = ?PRIM_FILE:open(UncommonName, [read, write]),
- ?line ok = ?PRIM_FILE:close(Fd),
- ?line {ok,NewDirFiles} = ?PRIM_FILE_call(list_dir, Handle, ["."]),
- ?line true = lists:member(UncommonName,NewDirFiles),
-
- %% Delete the directory and return to the old current directory
- %% and check that the created file isn't there (too!)
- ?line expect({error, einval}, {error, eacces}, {error, eexist},
+ case {os:type(), length(NewDir) >= 260} of
+ {{win32,_}, true} ->
+ io:format("Skip set_cwd for windows path longer than 260 (MAX_PATH):\n"),
+ io:format("\nNewDir = ~p\n", [NewDir]);
+ _ ->
+ io:format("cd to ~s",[NewDir]),
+ ok = ?PRIM_FILE_call(set_cwd, Handle, [NewDir]),
+
+ %% Create a file in the new current directory, and check that it
+ %% really is created there
+ UncommonName = "uncommon.fil",
+ {ok,Fd} = ?PRIM_FILE:open(UncommonName, [read, write]),
+ ok = ?PRIM_FILE:close(Fd),
+ {ok,NewDirFiles} = ?PRIM_FILE_call(list_dir, Handle, ["."]),
+ true = lists:member(UncommonName,NewDirFiles),
+
+ %% Delete the directory and return to the old current directory
+ %% and check that the created file isn't there (too!)
+ expect({error, einval}, {error, eacces}, {error, eexist},
?PRIM_FILE_call(del_dir, Handle, [NewDir])),
- ?line ?PRIM_FILE_call(delete, Handle, [UncommonName]),
- ?line {ok,[]} = ?PRIM_FILE_call(list_dir, Handle, ["."]),
- ?line ok = ?PRIM_FILE_call(set_cwd, Handle, [Dir1]),
- ?line io:format("cd back to ~s",[Dir1]),
- ?line ok = ?PRIM_FILE_call(del_dir, Handle, [NewDir]),
- ?line {error, enoent} = ?PRIM_FILE_call(set_cwd, Handle, [NewDir]),
- ?line ok = ?PRIM_FILE_call(set_cwd, Handle, [Dir1]),
- ?line io:format("cd back to ~s",[Dir1]),
- ?line {ok,OldDirFiles} = ?PRIM_FILE_call(list_dir, Handle, ["."]),
- ?line false = lists:member(UncommonName,OldDirFiles),
+ ?PRIM_FILE_call(delete, Handle, [UncommonName]),
+ {ok,[]} = ?PRIM_FILE_call(list_dir, Handle, ["."]),
+ ok = ?PRIM_FILE_call(set_cwd, Handle, [Dir1]),
+ io:format("cd back to ~s",[Dir1]),
+ ok = ?PRIM_FILE_call(del_dir, Handle, [NewDir]),
+ {error, enoent} = ?PRIM_FILE_call(set_cwd, Handle, [NewDir]),
+ ok = ?PRIM_FILE_call(set_cwd, Handle, [Dir1]),
+ io:format("cd back to ~s",[Dir1]),
+ {ok,OldDirFiles} = ?PRIM_FILE_call(list_dir, Handle, ["."]),
+ false = lists:member(UncommonName,OldDirFiles)
+ end,
%% Try doing some bad things
?line {error, badarg} =
@@ -385,7 +391,6 @@ cur_dir_0(Config, Handle) ->
?line {ok, BaseDir} = ?PRIM_FILE_call(get_cwd, Handle, []),
?line false = lists:member($\\, BaseDir),
- ?line test_server:timetrap_cancel(Dog),
ok.
%% Tests ?PRIM_FILE:get_cwd/1.
@@ -404,16 +409,13 @@ cur_dir_1b(Config) when is_list(Config) ->
Result.
cur_dir_1(Config, Handle) ->
- ?line Dog = test_server:timetrap(test_server:seconds(5)),
-
?line case os:type() of
- {unix, _} ->
- ?line {error, enotsup} =
- ?PRIM_FILE_call(get_cwd, Handle, ["d:"]);
{win32, _} ->
- win_cur_dir_1(Config, Handle)
+ win_cur_dir_1(Config, Handle);
+ _ ->
+ ?line {error, enotsup} =
+ ?PRIM_FILE_call(get_cwd, Handle, ["d:"])
end,
- ?line test_server:timetrap_cancel(Dog),
ok.
win_cur_dir_1(_Config, Handle) ->
@@ -439,7 +441,6 @@ win_cur_dir_1(_Config, Handle) ->
open1(suite) -> [];
open1(doc) -> [];
open1(Config) when is_list(Config) ->
- ?line Dog = test_server:timetrap(test_server:seconds(5)),
?line RootDir = ?config(priv_dir,Config),
?line NewDir = filename:join(RootDir,
atom_to_list(?MODULE)
@@ -453,7 +454,10 @@ open1(Config) when is_list(Config) ->
?line ?PRIM_FILE:write(Fd1,Str),
?line {ok,0} = ?PRIM_FILE:position(Fd1,bof),
?line {ok, Str} = ?PRIM_FILE:read(Fd1,Length),
- ?line {ok, Str} = ?PRIM_FILE:read(Fd2,Length),
+ ?line case ?PRIM_FILE:read(Fd2,Length) of
+ {ok,Str} -> Str;
+ eof -> Str
+ end,
?line ok = ?PRIM_FILE:close(Fd2),
?line {ok,0} = ?PRIM_FILE:position(Fd1,bof),
?line ok = ?PRIM_FILE:truncate(Fd1),
@@ -462,7 +466,6 @@ open1(Config) when is_list(Config) ->
?line {ok,Fd3} = ?PRIM_FILE:open(Name, [read]),
?line eof = ?PRIM_FILE:read(Fd3,Length),
?line ok = ?PRIM_FILE:close(Fd3),
- ?line test_server:timetrap_cancel(Dog),
ok.
%% Tests all open modes.
@@ -514,7 +517,6 @@ modes(Config) when is_list(Config) ->
close(suite) -> [];
close(doc) -> [];
close(Config) when is_list(Config) ->
- ?line Dog = test_server:timetrap(test_server:seconds(5)),
?line RootDir = ?config(priv_dir,Config),
?line Name = filename:join(RootDir,
atom_to_list(?MODULE)
@@ -531,13 +533,11 @@ close(Config) when is_list(Config) ->
?line Val = ?PRIM_FILE:close(Fd1),
?line io:format("Second close gave: ~p", [Val]),
- ?line test_server:timetrap_cancel(Dog),
ok.
access(suite) -> [];
access(doc) -> [];
access(Config) when is_list(Config) ->
- ?line Dog = test_server:timetrap(test_server:seconds(5)),
?line RootDir = ?config(priv_dir,Config),
?line Name = filename:join(RootDir,
atom_to_list(?MODULE)
@@ -559,7 +559,6 @@ access(Config) when is_list(Config) ->
?line {ok, Str} = ?PRIM_FILE:read(Fd3,length(Str)),
?line ok = ?PRIM_FILE:close(Fd3),
- ?line test_server:timetrap_cancel(Dog),
ok.
%% Tests ?PRIM_FILE:read/2 and ?PRIM_FILE:write/2.
@@ -567,7 +566,6 @@ access(Config) when is_list(Config) ->
read_write(suite) -> [];
read_write(doc) -> [];
read_write(Config) when is_list(Config) ->
- ?line Dog = test_server:timetrap(test_server:seconds(5)),
?line RootDir = ?config(priv_dir, Config),
?line NewDir = filename:join(RootDir,
atom_to_list(?MODULE)
@@ -579,7 +577,6 @@ read_write(Config) when is_list(Config) ->
?line {ok, Fd} = ?PRIM_FILE:open(Name, [read, write]),
?line read_write_test(Fd),
- ?line test_server:timetrap_cancel(Dog),
ok.
read_write_test(File) ->
@@ -597,7 +594,6 @@ read_write_test(File) ->
pread_write(suite) -> [];
pread_write(doc) -> [];
pread_write(Config) when is_list(Config) ->
- ?line Dog = test_server:timetrap(test_server:seconds(5)),
?line RootDir = ?config(priv_dir, Config),
?line NewDir = filename:join(RootDir,
atom_to_list(?MODULE)
@@ -609,7 +605,6 @@ pread_write(Config) when is_list(Config) ->
?line {ok, Fd} = ?PRIM_FILE:open(Name, [read, write]),
?line pread_write_test(Fd),
- ?line test_server:timetrap_cancel(Dog),
ok.
pread_write_test(File) ->
@@ -629,7 +624,6 @@ pread_write_test(File) ->
append(doc) -> "Test appending to a file.";
append(suite) -> [];
append(Config) when is_list(Config) ->
- ?line Dog = test_server:timetrap(test_server:seconds(5)),
?line RootDir = ?config(priv_dir, Config),
?line NewDir = filename:join(RootDir,
atom_to_list(?MODULE)
@@ -656,13 +650,11 @@ append(Config) when is_list(Config) ->
?line Expected = list_to_binary([First, Second, Third]),
?line {ok, Expected} = ?PRIM_FILE:read_file(Name1),
- ?line test_server:timetrap_cancel(Dog),
ok.
exclusive(suite) -> [];
exclusive(doc) -> "Test exclusive access to a file.";
exclusive(Config) when is_list(Config) ->
- ?line Dog = test_server:timetrap(test_server:seconds(5)),
?line RootDir = ?config(priv_dir,Config),
?line NewDir = filename:join(RootDir,
atom_to_list(?MODULE)
@@ -672,7 +664,6 @@ exclusive(Config) when is_list(Config) ->
?line {ok,Fd} = ?PRIM_FILE:open(Name, [write, exclusive]),
?line {error, eexist} = ?PRIM_FILE:open(Name, [write, exclusive]),
?line ok = ?PRIM_FILE:close(Fd),
- ?line test_server:timetrap_cancel(Dog),
ok.
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
@@ -681,7 +672,6 @@ exclusive(Config) when is_list(Config) ->
pos1(suite) -> [];
pos1(doc) -> [];
pos1(Config) when is_list(Config) ->
- ?line Dog = test_server:timetrap(test_server:seconds(5)),
?line RootDir = ?config(priv_dir,Config),
?line Name = filename:join(RootDir,
atom_to_list(?MODULE)
@@ -738,13 +728,11 @@ pos1(Config) when is_list(Config) ->
?line {ok, 0} = ?PRIM_FILE:position(Fd2,{eof,-8}),
?line {ok, "A"} = ?PRIM_FILE:read(Fd2,1),
?line {error, einval} = ?PRIM_FILE:position(Fd2,{eof,-9}),
- ?line test_server:timetrap_cancel(Dog),
ok.
pos2(suite) -> [];
pos2(doc) -> [];
pos2(Config) when is_list(Config) ->
- ?line Dog = test_server:timetrap(test_server:seconds(5)),
?line RootDir = ?config(priv_dir,Config),
?line Name = filename:join(RootDir,
atom_to_list(?MODULE)
@@ -761,7 +749,6 @@ pos2(Config) when is_list(Config) ->
?line {ok, "D"} = ?PRIM_FILE:read(Fd2,1),
?line io:format("DONE"),
- ?line test_server:timetrap_cancel(Dog),
ok.
@@ -779,7 +766,6 @@ file_info_basic_file_b(Config) when is_list(Config) ->
Result.
file_info_basic_file(Config, Handle, Suffix) ->
- ?line Dog = test_server:timetrap(test_server:seconds(5)),
?line RootDir = ?config(priv_dir, Config),
%% Create a short file.
@@ -808,7 +794,6 @@ file_info_basic_file(Config, Handle, Suffix) ->
?line {MD, MT} = ModifyTime,
?line all_integers(tuple_to_list(MD) ++ tuple_to_list(MT)),
- ?line test_server:timetrap_cancel(Dog),
ok.
file_info_basic_directory_a(suite) -> [];
@@ -825,8 +810,6 @@ file_info_basic_directory_b(Config) when is_list(Config) ->
Result.
file_info_basic_directory(Config, Handle) ->
- ?line Dog = test_server:timetrap(test_server:seconds(5)),
-
%% Note: filename:join/1 removes any trailing slash,
%% which is essential for ?PRIM_FILE:read_file_info/1 to work on
%% platforms such as Windows95.
@@ -843,10 +826,10 @@ file_info_basic_directory(Config, Handle) ->
?line test_directory("/", read_write, Handle),
?line test_directory("c:/", read_write, Handle),
?line test_directory("c:\\", read_write, Handle);
- {unix, _} ->
+ _ ->
?line test_directory("/", read, Handle)
end,
- ?line test_server:timetrap_cancel(Dog).
+ ok.
test_directory(Name, ExpectedAccess, Handle) ->
?line {ok, FileInfo} = ?PRIM_FILE_call(read_file_info, Handle, [Name]),
@@ -887,14 +870,12 @@ file_info_bad_b(Config) when is_list(Config) ->
Result.
file_info_bad(Config, Handle) ->
- ?line Dog = test_server:timetrap(test_server:seconds(5)),
?line RootDir = filename:join([?config(priv_dir, Config)]),
?line {error, enoent} =
?PRIM_FILE_call(
read_file_info, Handle,
[filename:join(RootDir,
atom_to_list(?MODULE)++"_nonexistent")]),
- ?line test_server:timetrap_cancel(Dog),
ok.
%% Test that the file times behave as they should.
@@ -1189,7 +1170,6 @@ get_good_directory(Config) ->
truncate(suite) -> [];
truncate(doc) -> [];
truncate(Config) when is_list(Config) ->
- ?line Dog = test_server:timetrap(test_server:seconds(5)),
?line RootDir = ?config(priv_dir,Config),
?line Name = filename:join(RootDir,
atom_to_list(?MODULE)
@@ -1215,14 +1195,12 @@ truncate(Config) when is_list(Config) ->
?line {ok, 5} = ?PRIM_FILE:position(Fd2, 5),
?line {error, _} = ?PRIM_FILE:truncate(Fd2),
- ?line test_server:timetrap_cancel(Dog),
ok.
datasync(suite) -> [];
datasync(doc) -> "Tests that ?PRIM_FILE:datasync/1 at least doesn't crash.";
datasync(Config) when is_list(Config) ->
- ?line Dog = test_server:timetrap(test_server:seconds(5)),
?line PrivDir = ?config(priv_dir, Config),
?line Sync = filename:join(PrivDir,
atom_to_list(?MODULE)
@@ -1233,14 +1211,12 @@ datasync(Config) when is_list(Config) ->
?line ok = ?PRIM_FILE:datasync(Fd),
?line ok = ?PRIM_FILE:close(Fd),
- ?line test_server:timetrap_cancel(Dog),
ok.
sync(suite) -> [];
sync(doc) -> "Tests that ?PRIM_FILE:sync/1 at least doesn't crash.";
sync(Config) when is_list(Config) ->
- ?line Dog = test_server:timetrap(test_server:seconds(5)),
?line PrivDir = ?config(priv_dir, Config),
?line Sync = filename:join(PrivDir,
atom_to_list(?MODULE)
@@ -1251,14 +1227,12 @@ sync(Config) when is_list(Config) ->
?line ok = ?PRIM_FILE:sync(Fd),
?line ok = ?PRIM_FILE:close(Fd),
- ?line test_server:timetrap_cancel(Dog),
ok.
advise(suite) -> [];
advise(doc) -> "Tests that ?PRIM_FILE:advise/4 at least doesn't crash.";
advise(Config) when is_list(Config) ->
- ?line Dog = test_server:timetrap(test_server:seconds(5)),
?line PrivDir = ?config(priv_dir, Config),
?line Advise = filename:join(PrivDir,
atom_to_list(?MODULE)
@@ -1322,7 +1296,6 @@ advise(Config) when is_list(Config) ->
?line eof = ?PRIM_FILE:read_line(Fd9),
?line ok = ?PRIM_FILE:close(Fd9),
- ?line test_server:timetrap_cancel(Dog),
ok.
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
@@ -1366,7 +1339,6 @@ check_large_write(Dog, Fd, _, _, []) ->
allocate(suite) -> [];
allocate(doc) -> "Tests that ?PRIM_FILE:allocate/3 at least doesn't crash.";
allocate(Config) when is_list(Config) ->
- ?line Dog = test_server:timetrap(test_server:seconds(5)),
?line PrivDir = ?config(priv_dir, Config),
?line Allocate = filename:join(PrivDir,
atom_to_list(?MODULE)
@@ -1399,7 +1371,6 @@ allocate(Config) when is_list(Config) ->
?line ok = ?PRIM_FILE:write(Fd4, Line2),
?line ok = ?PRIM_FILE:close(Fd4),
- ?line test_server:timetrap_cancel(Dog),
ok.
allocate_and_assert(Fd, Offset, Length) ->
@@ -1447,7 +1418,6 @@ delete_b(Config) when is_list(Config) ->
Result.
delete(Config, Handle, Suffix) ->
- ?line Dog = test_server:timetrap(test_server:seconds(5)),
?line RootDir = ?config(priv_dir,Config),
?line Name = filename:join(RootDir,
atom_to_list(?MODULE)
@@ -1463,7 +1433,6 @@ delete(Config, Handle, Suffix) ->
?line {error, _} = ?PRIM_FILE:open(Name, [read]),
%% Try deleting a nonexistent file
?line {error, enoent} = ?PRIM_FILE_call(delete, Handle, [Name]),
- ?line test_server:timetrap_cancel(Dog),
ok.
rename_a(suite) ->[];
@@ -1480,7 +1449,6 @@ rename_b(Config) when is_list(Config) ->
Result.
rename(Config, Handle, Suffix) ->
- ?line Dog = test_server:timetrap(test_server:seconds(5)),
?line RootDir = ?config(priv_dir,Config),
?line FileName1 = atom_to_list(?MODULE)++"_rename"++Suffix++".fil",
?line FileName2 = atom_to_list(?MODULE)++"_rename"++Suffix++".ful",
@@ -1533,7 +1501,6 @@ rename(Config, Handle, Suffix) ->
?PRIM_FILE_call(rename, Handle, [DirName2, Name2foo]),
?line io:format("Errmsg2: ~p",[Msg2]),
- ?line test_server:timetrap_cancel(Dog),
ok.
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
@@ -1568,15 +1535,15 @@ e_delete(Config) when is_list(Config) ->
%% No permission.
?line case os:type() of
- {unix, _} ->
+ {win32, _} ->
+ %% Remove a character device.
+ ?line {error, eacces} = ?PRIM_FILE:delete("nul");
+ _ ->
?line ?PRIM_FILE:write_file_info(
Base, #file_info {mode=0}),
?line {error, eacces} = ?PRIM_FILE:delete(Afile),
?line ?PRIM_FILE:write_file_info(
- Base, #file_info {mode=8#600});
- {win32, _} ->
- %% Remove a character device.
- ?line {error, eacces} = ?PRIM_FILE:delete("nul")
+ Base, #file_info {mode=8#600})
end,
?line test_server:timetrap_cancel(Dog),
@@ -1656,7 +1623,12 @@ e_rename(Config) when is_list(Config) ->
%% XXX - Gross hack!
?line Comment =
case os:type() of
- {unix, _} ->
+ {win32, _} ->
+ %% At least Windows NT can
+ %% successfully move a file to
+ %% another drive.
+ ok;
+ {unix, _ } ->
OtherFs = "/tmp",
?line NameOnOtherFs =
filename:join(OtherFs,
@@ -1681,10 +1653,8 @@ e_rename(Config) when is_list(Config) ->
Else
end,
Com;
- {win32, _} ->
- %% At least Windows NT can
- %% successfully move a file to
- %% another drive.
+ {ose, _} ->
+ %% disabled for now
ok
end,
?line test_server:timetrap_cancel(Dog),
@@ -1714,14 +1684,14 @@ e_make_dir(Config) when is_list(Config) ->
%% No permission (on Unix only).
case os:type() of
- {unix, _} ->
+ {win32, _} ->
+ ok;
+ _ ->
?line ?PRIM_FILE:write_file_info(Base, #file_info {mode=0}),
?line {error, eacces} =
?PRIM_FILE:make_dir(filename:join(Base, "xxxx")),
?line
- ?PRIM_FILE:write_file_info(Base, #file_info {mode=8#600});
- {win32, _} ->
- ok
+ ?PRIM_FILE:write_file_info(Base, #file_info {mode=8#600})
end,
?line test_server:timetrap_cancel(Dog),
ok.
@@ -1767,15 +1737,15 @@ e_del_dir(Config) when is_list(Config) ->
%% No permission.
case os:type() of
- {unix, _} ->
+ {win32, _} ->
+ ok;
+ _ ->
?line ADirectory = filename:join(Base, "no_perm"),
?line ok = ?PRIM_FILE:make_dir(ADirectory),
?line ?PRIM_FILE:write_file_info(Base, #file_info {mode=0}),
?line {error, eacces} = ?PRIM_FILE:del_dir(ADirectory),
?line ?PRIM_FILE:write_file_info(
- Base, #file_info {mode=8#600});
- {win32, _} ->
- ok
+ Base, #file_info {mode=8#600})
end,
?line test_server:timetrap_cancel(Dog),
ok.
@@ -2023,6 +1993,9 @@ symlinks(Config, Handle, Suffix) ->
case ?PRIM_FILE_call(make_symlink, Handle, [Name, Alias]) of
{error, enotsup} ->
{skipped, "Links not supported on this platform"};
+ {error, eperm} ->
+ {win32,_} = os:type(),
+ {skipped, "Windows user not privileged to create links"};
ok ->
?line {ok, Info1} =
?PRIM_FILE_call(read_file_info, Handle, [Name]),
diff --git a/lib/kernel/test/sendfile_SUITE.erl b/lib/kernel/test/sendfile_SUITE.erl
index 4cf4c6489d..123e849ccb 100644
--- a/lib/kernel/test/sendfile_SUITE.erl
+++ b/lib/kernel/test/sendfile_SUITE.erl
@@ -24,7 +24,14 @@
-compile(export_all).
-all() ->
+all() -> [{group,async_threads},
+ {group,no_async_threads}].
+
+groups() ->
+ [{async_threads,[],tcs()},
+ {no_async_threads,[],tcs()}].
+
+tcs() ->
[t_sendfile_small
,t_sendfile_big_all
,t_sendfile_big_size
@@ -33,6 +40,7 @@ all() ->
,t_sendfile_offset
,t_sendfile_sendafter
,t_sendfile_recvafter
+ ,t_sendfile_recvafter_remoteclose
,t_sendfile_sendduring
,t_sendfile_recvduring
,t_sendfile_closeduring
@@ -63,6 +71,19 @@ init_per_suite(Config) ->
end_per_suite(Config) ->
file:delete(proplists:get_value(big_file, Config)).
+init_per_group(async_threads,Config) ->
+ case erlang:system_info(thread_pool_size) of
+ 0 ->
+ {skip,"No async threads"};
+ _ ->
+ [{sendfile_opts,[{use_threads,true}]}|Config]
+ end;
+init_per_group(no_async_threads,Config) ->
+ [{sendfile_opts,[{use_threads,false}]}|Config].
+
+end_per_group(_,_Config) ->
+ ok.
+
init_per_testcase(TC,Config) when TC == t_sendfile_recvduring;
TC == t_sendfile_sendduring ->
Filename = proplists:get_value(small_file, Config),
@@ -71,7 +92,7 @@ init_per_testcase(TC,Config) when TC == t_sendfile_recvduring;
{_Size, Data} = sendfile_file_info(Filename),
{ok,D} = file:open(Filename, [raw,binary,read]),
prim_file:sendfile(D, Sock, 0, 0, 0,
- [],[],false,false,false),
+ [],[],[]),
Data
end,
@@ -92,6 +113,7 @@ t_sendfile_small(Config) when is_list(Config) ->
Send = fun(Sock) ->
{Size, Data} = sendfile_file_info(Filename),
+ %% Here we make sure to test the sendfile/2 api
{ok, Size} = file:sendfile(Filename, Sock),
Data
end,
@@ -101,6 +123,7 @@ t_sendfile_small(Config) when is_list(Config) ->
t_sendfile_many_small(Config) when is_list(Config) ->
Filename = proplists:get_value(small_file, Config),
FileOpts = proplists:get_value(file_opts, Config, []),
+ SendfileOpts = proplists:get_value(sendfile_opts, Config),
error_logger:add_report_handler(?MODULE,[self()]),
@@ -109,7 +132,7 @@ t_sendfile_many_small(Config) when is_list(Config) ->
N = 10000,
{ok,D} = file:open(Filename,[read|FileOpts]),
[begin
- {ok,Size} = file:sendfile(D,Sock,0,0,[])
+ {ok,Size} = file:sendfile(D,Sock,0,0,SendfileOpts)
end || _I <- lists:seq(1,N)],
file:close(D),
Size*N
@@ -127,11 +150,12 @@ t_sendfile_many_small(Config) when is_list(Config) ->
t_sendfile_big_all(Config) when is_list(Config) ->
Filename = proplists:get_value(big_file, Config),
+ SendfileOpts = proplists:get_value(sendfile_opts, Config),
Send = fun(Sock) ->
{ok, #file_info{size = Size}} =
file:read_file_info(Filename),
- {ok, Size} = file:sendfile(Filename, Sock),
+ {ok, Size} = sendfile(Filename, Sock, SendfileOpts),
Size
end,
@@ -140,12 +164,13 @@ t_sendfile_big_all(Config) when is_list(Config) ->
t_sendfile_big_size(Config) ->
Filename = proplists:get_value(big_file, Config),
FileOpts = proplists:get_value(file_opts, Config, []),
+ SendfileOpts = proplists:get_value(sendfile_opts, Config),
SendAll = fun(Sock) ->
{ok, #file_info{size = Size}} =
file:read_file_info(Filename),
{ok,D} = file:open(Filename,[read|FileOpts]),
- {ok, Size} = file:sendfile(D, Sock,0,Size,[]),
+ {ok, Size} = file:sendfile(D, Sock,0,Size,SendfileOpts),
Size
end,
@@ -154,12 +179,13 @@ t_sendfile_big_size(Config) ->
t_sendfile_partial(Config) ->
Filename = proplists:get_value(small_file, Config),
FileOpts = proplists:get_value(file_opts, Config, []),
+ SendfileOpts = proplists:get_value(sendfile_opts, Config),
SendSingle = fun(Sock) ->
{_Size, <<Data:5/binary,_/binary>>} =
sendfile_file_info(Filename),
{ok,D} = file:open(Filename,[read|FileOpts]),
- {ok,5} = file:sendfile(D,Sock,0,5,[]),
+ {ok,5} = file:sendfile(D,Sock,0,5,SendfileOpts),
file:close(D),
Data
end,
@@ -170,14 +196,14 @@ t_sendfile_partial(Config) ->
{ok,D} = file:open(Filename,[read|FileOpts]),
{ok, <<FData/binary>>} = file:read(D,5),
FSend = fun(Sock) ->
- {ok,5} = file:sendfile(D,Sock,0,5,[]),
+ {ok,5} = file:sendfile(D,Sock,0,5,SendfileOpts),
FData
end,
ok = sendfile_send(FSend),
SSend = fun(Sock) ->
- {ok,3} = file:sendfile(D,Sock,5,3,[]),
+ {ok,3} = file:sendfile(D,Sock,5,3,SendfileOpts),
SData
end,
@@ -190,12 +216,13 @@ t_sendfile_partial(Config) ->
t_sendfile_offset(Config) ->
Filename = proplists:get_value(small_file, Config),
FileOpts = proplists:get_value(file_opts, Config, []),
+ SendfileOpts = proplists:get_value(sendfile_opts, Config),
Send = fun(Sock) ->
{_Size, <<_:5/binary,Data:3/binary,_/binary>> = AllData} =
sendfile_file_info(Filename),
{ok,D} = file:open(Filename,[read|FileOpts]),
- {ok,3} = file:sendfile(D,Sock,5,3,[]),
+ {ok,3} = file:sendfile(D,Sock,5,3,SendfileOpts),
{ok, AllData} = file:read(D,100),
file:close(D),
Data
@@ -205,10 +232,11 @@ t_sendfile_offset(Config) ->
t_sendfile_sendafter(Config) ->
Filename = proplists:get_value(small_file, Config),
+ SendfileOpts = proplists:get_value(sendfile_opts, Config),
Send = fun(Sock) ->
{Size, Data} = sendfile_file_info(Filename),
- {ok, Size} = file:sendfile(Filename, Sock),
+ {ok, Size} = sendfile(Filename, Sock, SendfileOpts),
ok = gen_tcp:send(Sock, <<2>>),
<<Data/binary,2>>
end,
@@ -217,10 +245,11 @@ t_sendfile_sendafter(Config) ->
t_sendfile_recvafter(Config) ->
Filename = proplists:get_value(small_file, Config),
+ SendfileOpts = proplists:get_value(sendfile_opts, Config),
Send = fun(Sock) ->
{Size, Data} = sendfile_file_info(Filename),
- {ok, Size} = file:sendfile(Filename, Sock),
+ {ok, Size} = sendfile(Filename, Sock, SendfileOpts),
ok = gen_tcp:send(Sock, <<1>>),
{ok,<<1>>} = gen_tcp:recv(Sock, 1),
<<Data/binary,1>>
@@ -228,8 +257,28 @@ t_sendfile_recvafter(Config) ->
ok = sendfile_send(Send).
+%% This tests specifically for a bug fixed in 17.0
+t_sendfile_recvafter_remoteclose(Config) ->
+ Filename = proplists:get_value(small_file, Config),
+
+ Send = fun(Sock, SFServer) ->
+ {Size, _Data} = sendfile_file_info(Filename),
+ {ok, Size} = file:sendfile(Filename, Sock),
+
+ %% Make sure the remote end has been closed
+ SFServer ! stop,
+ timer:sleep(100),
+
+ %% In the bug this returned {error,ebadf}
+ {error,closed} = gen_tcp:recv(Sock, 1),
+ -1
+ end,
+
+ ok = sendfile_send({127,0,0,1},Send,0).
+
t_sendfile_sendduring(Config) ->
Filename = proplists:get_value(big_file, Config),
+ SendfileOpts = proplists:get_value(sendfile_opts, Config),
Send = fun(Sock) ->
{ok, #file_info{size = Size}} =
@@ -238,7 +287,7 @@ t_sendfile_sendduring(Config) ->
timer:sleep(50),
ok = gen_tcp:send(Sock, <<2>>)
end),
- {ok, Size} = file:sendfile(Filename, Sock),
+ {ok, Size} = sendfile(Filename, Sock, SendfileOpts),
Size+1
end,
@@ -246,6 +295,7 @@ t_sendfile_sendduring(Config) ->
t_sendfile_recvduring(Config) ->
Filename = proplists:get_value(big_file, Config),
+ SendfileOpts = proplists:get_value(sendfile_opts, Config),
Send = fun(Sock) ->
{ok, #file_info{size = Size}} =
@@ -255,7 +305,7 @@ t_sendfile_recvduring(Config) ->
ok = gen_tcp:send(Sock, <<1>>),
{ok,<<1>>} = gen_tcp:recv(Sock, 1)
end),
- {ok, Size} = file:sendfile(Filename, Sock),
+ {ok, Size} = sendfile(Filename, Sock, SendfileOpts),
timer:sleep(1000),
Size+1
end,
@@ -264,6 +314,7 @@ t_sendfile_recvduring(Config) ->
t_sendfile_closeduring(Config) ->
Filename = proplists:get_value(big_file, Config),
+ SendfileOpts = proplists:get_value(sendfile_opts, Config),
Send = fun(Sock,SFServPid) ->
spawn_link(fun() ->
@@ -272,13 +323,14 @@ t_sendfile_closeduring(Config) ->
end),
case erlang:system_info(thread_pool_size) of
0 ->
- {error, closed} = file:sendfile(Filename, Sock);
+ {error, closed} = sendfile(Filename, Sock,
+ SendfileOpts);
_Else ->
%% This can return how much has been sent or
%% {error,closed} depending on OS.
%% How much is sent impossible to know as
%% the socket was closed mid sendfile
- case file:sendfile(Filename, Sock) of
+ case sendfile(Filename, Sock, SendfileOpts) of
{error, closed} ->
ok;
{ok, Size} when is_integer(Size) ->
@@ -292,6 +344,7 @@ t_sendfile_closeduring(Config) ->
t_sendfile_crashduring(Config) ->
Filename = proplists:get_value(big_file, Config),
+ SendfileOpts = proplists:get_value(sendfile_opts, Config),
error_logger:add_report_handler(?MODULE,[self()]),
@@ -300,7 +353,7 @@ t_sendfile_crashduring(Config) ->
timer:sleep(50),
exit(die)
end),
- {error, closed} = file:sendfile(Filename, Sock),
+ {error, closed} = sendfile(Filename, Sock, SendfileOpts),
-1
end,
process_flag(trap_exit,true),
@@ -395,6 +448,16 @@ sendfile_file_info(File) ->
{ok, Data} = file:read_file(File),
{Size, Data}.
+sendfile(Filename,Sock,Opts) ->
+ case file:open(Filename, [read, raw, binary]) of
+ {error, Reason} ->
+ {error, Reason};
+ {ok, Fd} ->
+ Res = file:sendfile(Fd, Sock, 0, 0, Opts),
+ _ = file:close(Fd),
+ Res
+ end.
+
%% Error handler
diff --git a/lib/kernel/test/zlib_SUITE.erl b/lib/kernel/test/zlib_SUITE.erl
index e91f6f18d4..3be6f39d95 100644
--- a/lib/kernel/test/zlib_SUITE.erl
+++ b/lib/kernel/test/zlib_SUITE.erl
@@ -178,7 +178,7 @@ api_deflateInit(Config) when is_list(Config) ->
?m(ok,zlib:close(Z))
end, lists:seq(1,8)),
- Strategies = [filtered,huffman_only,default],
+ Strategies = [filtered,huffman_only,rle,default],
lists:foreach(fun(Strategy) ->
?line Z = zlib:open(),
?m(ok, zlib:deflateInit(Z,best_speed,deflated,-15,8,Strategy)),
@@ -220,7 +220,6 @@ api_deflateParams(Config) when is_list(Config) ->
?m(_, zlib:deflate(Z1, <<1,1,1,1,1,1,1,1,1>>, none)),
?m(ok, zlib:deflateParams(Z1, best_compression, huffman_only)),
?m(_, zlib:deflate(Z1, <<1,1,1,1,1,1,1,1,1>>, sync)),
- ?m({'EXIT',_}, zlib:deflateParams(Z1,best_speed, filtered)),
?m(ok, zlib:close(Z1)).
api_deflate(doc) -> "Test deflate";
diff --git a/lib/megaco/aclocal.m4 b/lib/megaco/aclocal.m4
index 46b30a16b3..ed492d55ff 100644
--- a/lib/megaco/aclocal.m4
+++ b/lib/megaco/aclocal.m4
@@ -74,6 +74,21 @@ AC_ARG_VAR(erl_xcomp_clock_gettime_cpu_time, [clock_gettime() can be used for re
AC_ARG_VAR(erl_xcomp_after_morecore_hook, [__after_morecore_hook can track malloc()s core memory usage: yes|no (only used when cross compiling)])
AC_ARG_VAR(erl_xcomp_dlsym_brk_wrappers, [dlsym(RTLD_NEXT, _) brk wrappers can track malloc()s core memory usage: yes|no (only used when cross compiling)])
+dnl Cross compilation variables for OSE
+AC_ARG_VAR(erl_xcomp_ose_ldflags_pass1, [Linker flags for the OSE module (pass 1) (only used when cross compiling for OSE)])
+AC_ARG_VAR(erl_xcomp_ose_ldflags_pass2, [Linker flags for the OSE module (pass 2) (only used when cross compiling for OSE)])
+AC_ARG_VAR(erl_xcomp_ose_OSEROOT, [OSE installation root directory (only used when cross compiling for OSE)])
+AC_ARG_VAR(erl_xcomp_ose_STRIP, [Strip utility shipped with the OSE distribution(only used when cross compiling for OSE)])
+AC_ARG_VAR(erl_xcomp_ose_LM_POST_LINK, [OSE postlink tool (only used when cross compiling for OSE)])
+AC_ARG_VAR(erl_xcomp_ose_LM_SET_CONF, [Sets the configuration for an OSE load module (only used when cross compiling for OSE)])
+AC_ARG_VAR(erl_xcomp_ose_LM_ELF_SIZE, [Prints the section size information for an OSE load module (only used when cross compiling for OSE)])
+AC_ARG_VAR(erl_xcomp_ose_LM_LCF, [OSE load module linker configuration file (only used when cross compiling for OSE)])
+AC_ARG_VAR(erl_xcomp_ose_BEAM_LM_CONF, [BEAM OSE load module default configuration file (only used when cross compiling for OSE)])
+AC_ARG_VAR(erl_xcomp_ose_EPMD_LM_CONF, [EPMD OSE load module default configuration file (only used when cross compiling for OSE)])
+AC_ARG_VAR(erl_xcomp_ose_RUN_ERL_LM_CONF, [run_erl_lm OSE load module default configuration file (only used when cross compiling for OSE)])
+AC_ARG_VAR(erl_xcomp_ose_CONFD, [OSE confd source file])
+AC_ARG_VAR(erl_xcomp_ose_CRT0_LM, [OSE crt0 lm source file])
+
])
AC_DEFUN(ERL_XCOMP_SYSROOT_INIT,
@@ -488,6 +503,8 @@ AC_CACHE_VAL(ac_cv_sys_ipv6_support,
#ifdef __WIN32__
#include <winsock2.h>
#include <ws2tcpip.h>
+#elif __OSE__
+#error "no ipv6"
#else
#include <netinet/in.h>
#endif],
@@ -500,6 +517,8 @@ else
#ifdef __WIN32__
#include <winsock2.h>
#include <ws2tcpip.h>
+#elif __OSE__
+#error "no ipv6"
#else
#include <netinet/in.h>
#endif],
@@ -728,6 +747,12 @@ if test "X$host_os" = "Xwin32"; then
THR_LIBS=
THR_LIB_NAME=win32_threads
THR_LIB_TYPE=win32_threads
+elif test "X$host_os" = "Xose"; then
+ AC_MSG_RESULT(yes)
+ THR_DEFS="-DOSE_THREADS"
+ THR_LIBS=
+ THR_LIB_NAME=ose_threads
+ THR_LIB_TYPE=ose_threads
else
AC_MSG_RESULT(no)
THR_DEFS=
@@ -1078,9 +1103,22 @@ case "$THR_LIB_NAME" in
test "$ethr_have_native_atomics" = "yes" && ethr_have_native_spinlock=yes
;;
- pthread)
- ETHR_THR_LIB_BASE_DIR=pthread
- AC_DEFINE(ETHR_PTHREADS, 1, [Define if you have pthreads])
+ pthread|ose_threads)
+ case "$THR_LIB_NAME" in
+ pthread)
+ ETHR_THR_LIB_BASE_DIR=pthread
+ AC_DEFINE(ETHR_PTHREADS, 1, [Define if you have pthreads])
+ ;;
+ ose_threads)
+ AC_DEFINE(ETHR_OSE_THREADS, 1,
+ [Define if you have OSE style threads])
+ ETHR_THR_LIB_BASE_DIR=ose
+ AC_CHECK_HEADER(ose_spi/ose_spi.h,
+ AC_DEFINE(HAVE_OSE_SPI_H, 1,
+ [Define if you have the "ose_spi/ose_spi.h" header file.]))
+ ;;
+ esac
+ if test "x$THR_LIB_NAME" = "xpthread"; then
case $host_os in
openbsd*)
# The default stack size is insufficient for our needs
@@ -1139,6 +1177,7 @@ case "$THR_LIB_NAME" in
*) ;;
esac
+ fi
dnl We sometimes need ETHR_DEFS in order to find certain headers
dnl (at least for pthread.h on osf1).
saved_cppflags="$CPPFLAGS"
@@ -1151,7 +1190,6 @@ case "$THR_LIB_NAME" in
dnl
dnl Check for headers
dnl
-
AC_CHECK_HEADER(pthread.h, \
AC_DEFINE(ETHR_HAVE_PTHREAD_H, 1, \
[Define if you have the <pthread.h> header file.]))
@@ -1184,7 +1222,7 @@ case "$THR_LIB_NAME" in
dnl
dnl Check for functions
dnl
-
+ if test "x$THR_LIB_NAME" = "xpthread"; then
AC_CHECK_FUNC(pthread_spin_lock, \
[ethr_have_native_spinlock=yes \
AC_DEFINE(ETHR_HAVE_PTHREAD_SPIN_LOCK, 1, \
@@ -1311,6 +1349,8 @@ case "$THR_LIB_NAME" in
AC_MSG_RESULT([$linux_futex])
test $linux_futex = yes && AC_DEFINE(ETHR_HAVE_LINUX_FUTEX, 1, [Define if you have a linux futex implementation.])
+ fi
+
AC_CHECK_SIZEOF(int)
AC_CHECK_SIZEOF(long)
AC_CHECK_SIZEOF(long long)
diff --git a/lib/megaco/doc/src/notes.xml b/lib/megaco/doc/src/notes.xml
index a1039cbda0..dff36fd51c 100644
--- a/lib/megaco/doc/src/notes.xml
+++ b/lib/megaco/doc/src/notes.xml
@@ -4,7 +4,7 @@
<chapter>
<header>
<copyright>
- <year>2000</year><year>2013</year>
+ <year>2000</year><year>2014</year>
<holder>Ericsson AB. All Rights Reserved.</holder>
</copyright>
<legalnotice>
@@ -13,14 +13,14 @@
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.
-
+
</legalnotice>
-
+
<title>Megaco Release Notes</title>
<prepared>Lars Thors&eacute;n, H&aring;kan Mattsson, Micael Karlberg</prepared>
<docno></docno>
@@ -29,30 +29,59 @@
<file>notes.xml</file>
</header>
<p>This document describes the changes made to the Megaco system
- from version to version. The intention of this document is to
- list all incompatibilities as well as all enhancements and
- bugfixes for every release of Megaco. Each release of Megaco
- thus constitutes one section in this document. The title of each
- section is the version number of Megaco.</p>
-
-
- <section><title>Megaco 3.17.0.2</title>
+ from version to version. The intention of this document is to
+ list all incompatibilities as well as all enhancements and
+ bugfixes for every release of Megaco. Each release of Megaco
+ thus constitutes one section in this document. The title of each
+ section is the version number of Megaco.</p>
+
+
+ <section><title>Megaco 3.17.1</title>
<section><title>Improvements and New Features</title>
<list>
<item>
+ <p> The default encoding of Erlang files has been changed
+ from ISO-8859-1 to UTF-8. </p> <p> The encoding of XML
+ files has also been changed to UTF-8. </p>
<p>
- Introduced functionality for inspection of system and
- build configuration.</p>
- <p>
- Own Id: OTP-11196</p>
+ Own Id: OTP-10907</p>
</item>
</list>
</section>
</section>
-<section><title>Megaco 3.17.0.1</title>
+<section><title>Megaco 3.17.0.3</title>
+
+ <section><title>Improvements and New Features</title>
+ <list>
+ <item>
+ <p>Updated doc files to utf8.</p>
+ <p>Own Id: OTP-10907</p>
+ </item>
+ </list>
+ </section>
+
+ </section>
+
+ <section><title>Megaco 3.17.0.2</title>
+
+ <section><title>Improvements and New Features</title>
+ <list>
+ <item>
+ <p>
+ Introduced functionality for inspection of system and
+ build configuration.</p>
+ <p>
+ Own Id: OTP-11196</p>
+ </item>
+ </list>
+ </section>
+
+ </section>
+
+ <section><title>Megaco 3.17.0.1</title>
<section><title>Improvements and New Features</title>
<list>
diff --git a/lib/megaco/src/app/megaco.app.src b/lib/megaco/src/app/megaco.app.src
index 40265166ae..6ab85a1bbc 100644
--- a/lib/megaco/src/app/megaco.app.src
+++ b/lib/megaco/src/app/megaco.app.src
@@ -112,7 +112,10 @@
megaco_trans_sup, megaco_misc_sup, megaco_sup]},
{applications, [stdlib, kernel]},
{env, []},
- {mod, {megaco_sup, []}}
+ {mod, {megaco_sup, []}},
+ {runtime_dependencies, ["stdlib-2.0","runtime_tools-1.8.14","kernel-3.0",
+ "et-1.5","erts-6.0","debugger-4.0",
+ "asn1-3.0"]}
]}.
diff --git a/lib/megaco/src/app/megaco.appup.src b/lib/megaco/src/app/megaco.appup.src
index da171e0c18..db59f55b55 100644
--- a/lib/megaco/src/app/megaco.appup.src
+++ b/lib/megaco/src/app/megaco.appup.src
@@ -2,7 +2,7 @@
%%
%% %CopyrightBegin%
%%
-%% Copyright Ericsson AB 2001-2013. All Rights Reserved.
+%% Copyright Ericsson AB 2001-2014. 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
@@ -165,11 +165,21 @@
%% | | | | |
%% v v v v v
%% 3.17 <- 3.16.1 <- 3.15.2 <- 3.14.2 <- 3.11.4
+%% |
+%% v
+%% 3.17.0.1
+%% |
+%% v
+%% 3.17.0.2
+%% |
+%% v
+%% 3.17.0.3
%%
%%
{"%VSN%",
[
+ {"3.17.0.2", []},
{"3.17.0.1", []},
{"3.17", []},
{"3.16.0.3",
@@ -180,6 +190,7 @@
}
],
[
+ {"3.17.0.2", []},
{"3.17.0.1", []},
{"3.17", []},
{"3.16.0.3",
diff --git a/lib/megaco/src/binary/depend.mk b/lib/megaco/src/binary/depend.mk
index b9b86d3183..4225bc69dc 100644
--- a/lib/megaco/src/binary/depend.mk
+++ b/lib/megaco/src/binary/depend.mk
@@ -28,7 +28,7 @@
# This means that the ASN.1 runtime library will be inlined.
#
-ASN1_CT_OPTS += +noobj
+ASN1_CT_OPTS += +noobj +legacy_erlang_types
ifeq ($(MEGACO_INLINE_ASN1_RT),true)
# We need atleast version 1.4.6 of the ANS.1 application
ASN1_CT_OPTS += +inline
diff --git a/lib/megaco/src/binary/megaco_binary_encoder_lib.erl b/lib/megaco/src/binary/megaco_binary_encoder_lib.erl
index 8a4f4e7509..7d82262a59 100644
--- a/lib/megaco/src/binary/megaco_binary_encoder_lib.erl
+++ b/lib/megaco/src/binary/megaco_binary_encoder_lib.erl
@@ -66,7 +66,7 @@ version_of(_EC, Binary, 3, [AsnModV1, AsnModV2, AsnModV3])
version_of([], _Binary, Err) ->
{error, {decode_failed, lists:reverse(Err)}};
version_of([AsnMod|AsnMods], Binary, Errs) when is_atom(AsnMod) ->
- case (catch asn1rt:decode(AsnMod, 'MegacoMessage', Binary)) of
+ case (catch AsnMod:decode('MegacoMessage', Binary)) of
{ok, M} ->
V = (M#'MegacoMessage'.mess)#'Message'.version,
{ok, V};
@@ -82,14 +82,14 @@ version_of([AsnMod|AsnMods], Binary, Errs) when is_atom(AsnMod) ->
encode_message([native], MegaMsg, AsnMod, _TransMod, binary)
when is_record(MegaMsg, 'MegacoMessage') ->
- asn1rt:encode(AsnMod, 'MegacoMessage', MegaMsg);
+ AsnMod:encode('MegacoMessage', MegaMsg);
encode_message(EC, MegaMsg, AsnMod, TransMod, binary)
when is_list(EC) andalso is_record(MegaMsg, 'MegacoMessage') ->
case (catch TransMod:tr_message(MegaMsg, encode, EC)) of
{'EXIT', Reason} ->
{error, Reason};
MegaMsg2 ->
- asn1rt:encode(AsnMod, 'MegacoMessage', MegaMsg2)
+ AsnMod:encode('MegacoMessage', MegaMsg2)
end;
encode_message(EC, MegaMsg, AsnMod, TransMod, io_list) ->
case encode_message(EC, MegaMsg, AsnMod, TransMod, binary) of
@@ -276,7 +276,7 @@ decode_message_dynamic(_EC, _BadBin, _Mods, _Type) ->
decode_message(EC, Bin, AsnMod, TransMod, _) ->
- case asn1rt:decode(AsnMod, 'MegacoMessage', Bin) of
+ case AsnMod:decode('MegacoMessage', Bin) of
{ok, MegaMsg} ->
case EC of
[native] ->
diff --git a/lib/megaco/vsn.mk b/lib/megaco/vsn.mk
index ea4e9f2eb8..373f5199bf 100644
--- a/lib/megaco/vsn.mk
+++ b/lib/megaco/vsn.mk
@@ -2,7 +2,7 @@
# %CopyrightBegin%
#
-# Copyright Ericsson AB 1997-2013. All Rights Reserved.
+# Copyright Ericsson AB 1997-2014. 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
@@ -18,6 +18,6 @@
# %CopyrightEnd%
APPLICATION = megaco
-MEGACO_VSN = 3.17.0.2
+MEGACO_VSN = 3.17.1
PRE_VSN =
APP_VSN = "$(APPLICATION)-$(MEGACO_VSN)$(PRE_VSN)"
diff --git a/lib/mnesia/doc/src/mnesia.xml b/lib/mnesia/doc/src/mnesia.xml
index 914ec77721..72e9bd7e8f 100644
--- a/lib/mnesia/doc/src/mnesia.xml
+++ b/lib/mnesia/doc/src/mnesia.xml
@@ -4,7 +4,7 @@
<erlref>
<header>
<copyright>
- <year>1996</year><year>2013</year>
+ <year>1996</year><year>2014</year>
<holder>Ericsson AB. All Rights Reserved.</holder>
</copyright>
<legalnotice>
@@ -1204,7 +1204,11 @@ mnesia:create_table(person,
<desc>
<p>Performs a user initiated dump of the local log file.
This is usually not necessary since Mnesia, by default,
- manages this automatically.</p>
+ manages this automatically.
+ See configuration parameters
+ <seealso marker="#dump_log_time_threshold">dump_log_time_threshold</seealso> and
+ <seealso marker="#dump_log_write_threshold">dump_log_write_threshold</seealso>.
+ </p>
</desc>
</func>
<func>
@@ -2208,6 +2212,18 @@ mnesia:create_table(employee,
</desc>
</func>
<func>
+ <name>sync_log() -> ok | {error, Reason} </name>
+ <fsummary>Perform a file sync of the local log file.</fsummary>
+ <desc>
+ <p>Ensures that the local transaction log file is synced to disk.
+ On a single node system data written to disk tables, since the last dump,
+ can be lost in case of a power outage.
+ See <seealso marker="#dump_log/0">dump_log/0</seealso>.
+ </p>
+ </desc>
+ </func>
+
+ <func>
<name>sync_transaction(Fun, [[, Args], Retries]) -> {aborted, Reason} | {atomic, ResultOfFun} </name>
<fsummary>Synchronously execute a transaction.</fsummary>
<desc>
@@ -2445,7 +2461,7 @@ mnesia:create_table(employee,
<name>table(Tab [,[Option]]) -> QueryHandle </name>
<fsummary>Return a QLC query handle.</fsummary>
<desc>
- <p> <marker id="qlc_table"></marker>
+ <p><marker id="qlc_table"></marker>
Returns a QLC (Query List Comprehension) query handle, see
<seealso marker="stdlib:qlc">qlc(3)</seealso>.The module <c>qlc</c> implements a query language, it
can use mnesia tables as sources of data. Calling
@@ -3015,6 +3031,7 @@ raise(Name, Amount) ->
performed on the original data file. The default is <c>true</c></p>
</item>
<item>
+ <marker id=" dump_log_write_threshold"></marker>
<p><c>-mnesia dump_log_write_threshold Max</c>, where
<c>Max</c> is an integer which specifies the maximum number of writes
allowed to the transaction log before a new dump of the log
@@ -3022,13 +3039,14 @@ raise(Name, Amount) ->
</p>
</item>
<item>
+ <marker id=" dump_log_time_threshold"></marker>
<p><c>-mnesia dump_log_time_threshold Max</c>,
where <c>Max</c> is an integer which
specifies the dump log interval in milliseconds. It defaults
to 3 minutes. If a dump has not been performed within
<c>dump_log_time_threshold</c> milliseconds, then a new dump is
performed regardless of how many writes have been
- performed.
+ performed.
</p>
</item>
<item>
diff --git a/lib/mnesia/doc/src/notes.xml b/lib/mnesia/doc/src/notes.xml
index 0e9131190d..213c2b6d21 100644
--- a/lib/mnesia/doc/src/notes.xml
+++ b/lib/mnesia/doc/src/notes.xml
@@ -38,7 +38,69 @@
thus constitutes one section in this document. The title of each
section is the version number of Mnesia.</p>
- <section><title>Mnesia 4.11</title>
+ <section><title>Mnesia 4.12</title>
+
+ <section><title>Fixed Bugs and Malfunctions</title>
+ <list>
+ <item>
+ <p>
+ Some local implementations of removing the last element
+ from a list are replaced by <c>lists:droplast/1</c>. Note
+ that this requires at least <c>stdlib-2.0</c>, which is
+ the stdlib version delivered in OTP 17.0. (Thanks to Hans
+ Svensson)</p>
+ <p>
+ Own Id: OTP-11678</p>
+ </item>
+ <item>
+ <p>
+ Application upgrade (appup) files are corrected for the
+ following applications: </p>
+ <p>
+ <c>asn1, common_test, compiler, crypto, debugger,
+ dialyzer, edoc, eldap, erl_docgen, et, eunit, gs, hipe,
+ inets, observer, odbc, os_mon, otp_mibs, parsetools,
+ percept, public_key, reltool, runtime_tools, ssh,
+ syntax_tools, test_server, tools, typer, webtool, wx,
+ xmerl</c></p>
+ <p>
+ A new test utility for testing appup files is added to
+ test_server. This is now used by most applications in
+ OTP.</p>
+ <p>
+ (Thanks to Tobias Schlager)</p>
+ <p>
+ Own Id: OTP-11744</p>
+ </item>
+ </list>
+ </section>
+
+
+ <section><title>Improvements and New Features</title>
+ <list>
+ <item>
+ <p>
+ To prevent a race condition if there is a short
+ communication problem when node-down and node-up events
+ are received. They are now stored and later checked if
+ the node came up just before mnesia flagged the node as
+ down. (Thanks to Jonas Falkevik )</p>
+ <p>
+ Own Id: OTP-11497</p>
+ </item>
+ <item>
+ <p>
+ Added <c>mnesia:sync_log/0</c> to explicit sync mnesias
+ transaction log.</p>
+ <p>
+ Own Id: OTP-11729</p>
+ </item>
+ </list>
+ </section>
+
+</section>
+
+<section><title>Mnesia 4.11</title>
<section><title>Fixed Bugs and Malfunctions</title>
<list>
diff --git a/lib/mnesia/src/mnesia.app.src b/lib/mnesia/src/mnesia.app.src
index 3715488ec2..e755864792 100644
--- a/lib/mnesia/src/mnesia.app.src
+++ b/lib/mnesia/src/mnesia.app.src
@@ -47,6 +47,7 @@
mnesia_tm
]},
{applications, [kernel, stdlib]},
- {mod, {mnesia_sup, []}}]}.
+ {mod, {mnesia_sup, []}},
+ {runtime_dependencies, ["stdlib-2.0","kernel-3.0","erts-6.0"]}]}.
diff --git a/lib/mnesia/src/mnesia.erl b/lib/mnesia/src/mnesia.erl
index 70466d10d7..b7d80c1370 100644
--- a/lib/mnesia/src/mnesia.erl
+++ b/lib/mnesia/src/mnesia.erl
@@ -1,7 +1,7 @@
%%
%% %CopyrightBegin%
%%
-%% Copyright Ericsson AB 1996-2013. All Rights Reserved.
+%% Copyright Ericsson AB 1996-2014. 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
@@ -104,7 +104,8 @@
set_master_nodes/1, set_master_nodes/2,
%% Misc admin
- dump_log/0, subscribe/1, unsubscribe/1, report_event/1,
+ dump_log/0, sync_log/0,
+ subscribe/1, unsubscribe/1, report_event/1,
%% Snmp
snmp_open_table/2, snmp_close_table/1,
@@ -1808,7 +1809,7 @@ do_dirty_rpc(Tab, Node, M, F, Args) ->
{badrpc, Reason} ->
timer:sleep(20), %% Do not be too eager, and can't use yield on SMP
%% Sync with mnesia_monitor
- try sys:get_status(mnesia_monitor) catch _:_ -> ok end,
+ _ = try sys:get_status(mnesia_monitor) catch _:_ -> ok end,
case mnesia_controller:call({check_w2r, Node, Tab}) of % Sync
NewNode when NewNode =:= Node ->
ErrorTag = mnesia_lib:dirty_rpc_error_tag(Reason),
@@ -2554,6 +2555,9 @@ set_master_nodes(Tab, Nodes) ->
dump_log() ->
mnesia_controller:sync_dump_log(user).
+sync_log() ->
+ mnesia_monitor:sync_log(latest_log).
+
subscribe(What) ->
mnesia_subscr:subscribe(self(), What).
diff --git a/lib/mnesia/src/mnesia.hrl b/lib/mnesia/src/mnesia.hrl
index 2855792646..c8010d5466 100644
--- a/lib/mnesia/src/mnesia.hrl
+++ b/lib/mnesia/src/mnesia.hrl
@@ -1,7 +1,7 @@
%%
%% %CopyrightBegin%
%%
-%% Copyright Ericsson AB 1996-2011. All Rights Reserved.
+%% Copyright Ericsson AB 1996-2014. 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
@@ -35,7 +35,7 @@
-define(ets_last(Tab), ets:last(Tab)).
-define(ets_prev(Tab, Key), ets:prev(Tab, Key)).
-define(ets_slot(Tab, Pos), ets:slot(Tab, Pos)).
--define(ets_new_table(Tab, Props), ets:new(Tab, Props)).
+-define(ets_new_table(Tab, Props), _ = ets:new(Tab, Props)).
-define(ets_delete_table(Tab), ets:delete(Tab)).
-define(ets_fixtable(Tab, Bool), ets:fixtable(Tab, Bool)).
diff --git a/lib/mnesia/src/mnesia_controller.erl b/lib/mnesia/src/mnesia_controller.erl
index 78f7bfa325..fe2fd67d71 100644
--- a/lib/mnesia/src/mnesia_controller.erl
+++ b/lib/mnesia/src/mnesia_controller.erl
@@ -1,7 +1,7 @@
%%
%% %CopyrightBegin%
%%
-%% Copyright Ericsson AB 1996-2013. All Rights Reserved.
+%% Copyright Ericsson AB 1996-2014. 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
@@ -198,7 +198,8 @@ sync_dump_log(InitBy) ->
call({sync_dump_log, InitBy}).
async_dump_log(InitBy) ->
- ?SERVER_NAME ! {async_dump_log, InitBy}.
+ ?SERVER_NAME ! {async_dump_log, InitBy},
+ ok.
%% Wait for tables to be active
%% If needed, we will wait for Mnesia to start
@@ -293,10 +294,11 @@ update(Fun) ->
mnesia_down(Node) ->
- case cast({mnesia_down, Node}) of
- {error, _} -> mnesia_monitor:mnesia_down(?SERVER_NAME, Node);
- _Pid -> ok
+ case whereis(?SERVER_NAME) of
+ undefined -> mnesia_monitor:mnesia_down(?SERVER_NAME, Node);
+ Pid -> gen_server:cast(Pid, {mnesia_down, Node})
end.
+
wait_for_schema_commit_lock() ->
link(whereis(?SERVER_NAME)),
unsafe_call(wait_for_schema_commit_lock).
@@ -467,7 +469,7 @@ connect_nodes2(Father, Ns, UserFun) ->
process_flag(trap_exit, true),
Res = try_merge_schema(New, [], UserFun),
Msg = {schema_is_merged, [], late_merge, []},
- multicall([node()|Ns], Msg),
+ _ = multicall([node()|Ns], Msg),
After = val({current, db_nodes}),
Father ! {?MODULE, self(), Res, mnesia_lib:intersect(Ns,After)},
unlink(Father),
@@ -548,7 +550,7 @@ schema_is_merged() ->
cast(Msg) ->
case whereis(?SERVER_NAME) of
- undefined ->{error, {node_not_running, node()}};
+ undefined -> ok;
Pid -> gen_server:cast(Pid, Msg)
end.
@@ -1206,7 +1208,14 @@ handle_info(Done = #loader_done{worker_pid=WPid, table_name=Tab}, State0) ->
{value,{_,Worker}} = lists:keysearch(WPid,1,get_loaders(State0)),
add_loader(Tab,Worker,State1);
_ ->
- State1
+ DelState = State1#state{late_loader_queue=gb_trees:delete_any(Tab, LateQueue0)},
+ case ?catch_val({Tab, storage_type}) of
+ ram_copies ->
+ cast({disc_load, Tab, ram_only}),
+ DelState;
+ _ ->
+ DelState
+ end
end
end,
State3 = opt_start_worker(State2),
@@ -1789,7 +1798,7 @@ sync_and_block_table_whereabouts(Tab, ToNode, RemoteS, AccessMode) when Tab /= s
true -> Current -- [ToNode];
false -> Current
end,
- remote_call(ToNode, block_table, [Tab]),
+ _ = remote_call(ToNode, block_table, [Tab]),
[remote_call(Node, add_active_replica, [Tab, ToNode, RemoteS, AccessMode]) ||
Node <- [ToNode | Ns]],
ok.
diff --git a/lib/mnesia/src/mnesia_dumper.erl b/lib/mnesia/src/mnesia_dumper.erl
index e2a0aa3bda..14665797a0 100644
--- a/lib/mnesia/src/mnesia_dumper.erl
+++ b/lib/mnesia/src/mnesia_dumper.erl
@@ -1,7 +1,7 @@
%%
%% %CopyrightBegin%
%%
-%% Copyright Ericsson AB 1996-2011. All Rights Reserved.
+%% Copyright Ericsson AB 1996-2014. 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
@@ -85,7 +85,7 @@ adjust_log_writes(DoCast) ->
%% Don't care if we lost a few writes
mnesia_lib:set_counter(trans_log_writes_left, Max),
Diff = Max - Left,
- mnesia_lib:incr_counter(trans_log_writes, Diff),
+ _ = mnesia_lib:incr_counter(trans_log_writes, Diff),
global:del_lock(Token, [node()])
end.
@@ -451,7 +451,8 @@ disc_delete_table(Tab, Storage) ->
Storage == disc_only_copies; Tab == schema ->
mnesia_monitor:unsafe_close_dets(Tab),
Dat = mnesia_lib:tab2dat(Tab),
- file:delete(Dat);
+ file:delete(Dat),
+ ok;
true ->
DclFile = mnesia_lib:tab2dcl(Tab),
case get({?MODULE,Tab}) of
@@ -466,13 +467,14 @@ disc_delete_table(Tab, Storage) ->
file:delete(DcdFile),
ok
end,
- erase({?MODULE, Tab});
+ erase({?MODULE, Tab}),
+ ok;
false ->
- ignore
+ ok
end.
disc_delete_indecies(_Tab, _Cs, Storage) when Storage /= disc_only_copies ->
- ignore;
+ ok;
disc_delete_indecies(Tab, Cs, disc_only_copies) ->
Indecies = Cs#cstruct.index,
mnesia_index:del_transient(Tab, Indecies, disc_only_copies).
@@ -522,10 +524,11 @@ insert_op(Tid, _, {op, change_table_copy_type, N, FromS, ToS, TabDef}, InPlace,
{disc_copies, ram_copies} when Tab == schema ->
mnesia_lib:set(use_dir, false),
mnesia_monitor:unsafe_close_dets(Tab),
- file:delete(Dat);
+ ok = file:delete(Dat);
{disc_copies, ram_copies} ->
- file:delete(Dcl),
- file:delete(Dcd);
+ _ = file:delete(Dcl),
+ _ = file:delete(Dcd),
+ ok;
{ram_copies, disc_only_copies} ->
ok = ensure_rename(Dmp, Dat),
true = open_files(Tab, disc_only_copies, InPlace, InitBy),
@@ -544,7 +547,8 @@ insert_op(Tid, _, {op, change_table_copy_type, N, FromS, ToS, TabDef}, InPlace,
startup ->
ignore;
_ ->
- mnesia_controller:get_disc_copy(Tab)
+ mnesia_controller:get_disc_copy(Tab),
+ ok
end,
disc_delete_table(Tab, disc_only_copies);
{disc_copies, disc_only_copies} ->
@@ -553,8 +557,9 @@ insert_op(Tid, _, {op, change_table_copy_type, N, FromS, ToS, TabDef}, InPlace,
mnesia_schema:ram_delete_table(Tab, FromS),
PosList = Cs#cstruct.index,
mnesia_index:init_indecies(Tab, disc_only_copies, PosList),
- file:delete(Dcl),
- file:delete(Dcd);
+ _ = file:delete(Dcl),
+ _ = file:delete(Dcd),
+ ok;
{disc_only_copies, disc_copies} ->
mnesia_monitor:unsafe_close_dets(Tab),
disc_delete_indecies(Tab, Cs, disc_only_copies),
diff --git a/lib/mnesia/src/mnesia_event.erl b/lib/mnesia/src/mnesia_event.erl
index 35fe2d4035..67ec9d7399 100644
--- a/lib/mnesia/src/mnesia_event.erl
+++ b/lib/mnesia/src/mnesia_event.erl
@@ -1,7 +1,7 @@
%%
%% %CopyrightBegin%
%%
-%% Copyright Ericsson AB 1997-2013. All Rights Reserved.
+%% Copyright Ericsson AB 1997-2014. 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
@@ -63,7 +63,7 @@ handle_event(Event, State) ->
%%-----------------------------------------------------------------
handle_info(Msg, State) ->
- handle_any_event(Msg, State),
+ {ok, _} = handle_any_event(Msg, State),
{ok, State}.
%%-----------------------------------------------------------------
diff --git a/lib/mnesia/src/mnesia_index.erl b/lib/mnesia/src/mnesia_index.erl
index 54db45e3ba..87cb58dae1 100644
--- a/lib/mnesia/src/mnesia_index.erl
+++ b/lib/mnesia/src/mnesia_index.erl
@@ -1,7 +1,7 @@
%%
%% %CopyrightBegin%
%%
-%% Copyright Ericsson AB 1996-2013. All Rights Reserved.
+%% Copyright Ericsson AB 1996-2014. 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
@@ -52,7 +52,11 @@
val(Var) ->
case ?catch_val(Var) of
- {'EXIT', _ReASoN_} -> mnesia_lib:other_val(Var, _ReASoN_);
+ {'EXIT', _ReASoN_} ->
+ case mnesia_lib:other_val(Var) of
+ error -> mnesia_lib:pr_other(Var, _ReASoN_);
+ Val -> Val
+ end;
_VaLuE_ -> _VaLuE_
end.
@@ -229,7 +233,7 @@ del_transient(Tab, Storage) ->
PosList = val({Tab, index}),
del_transient(Tab, PosList, Storage).
-del_transient(_, [], _) -> done;
+del_transient(_, [], _) -> ok;
del_transient(Tab, [Pos | Tail], Storage) ->
delete_transient_index(Tab, Pos, Storage),
del_transient(Tab, Tail, Storage).
@@ -237,7 +241,7 @@ del_transient(Tab, [Pos | Tail], Storage) ->
delete_transient_index(Tab, Pos, disc_only_copies) ->
Tag = {Tab, index, Pos},
mnesia_monitor:unsafe_close_dets(Tag),
- file:delete(tab2filename(Tab, Pos)),
+ _ = file:delete(tab2filename(Tab, Pos)),
del_index_info(Tab, Pos), %% Uses val(..)
mnesia_lib:unset({Tab, {index, Pos}});
@@ -255,7 +259,7 @@ init_disc_index(_Tab, []) ->
init_disc_index(Tab, [Pos | Tail]) when is_integer(Pos) ->
Fn = tab2filename(Tab, Pos),
IxTag = {Tab, index, Pos},
- file:delete(Fn),
+ _ = file:delete(Fn),
Args = [{file, Fn}, {keypos, 1}, {type, bag}],
mnesia_monitor:open_dets(IxTag, Args),
Storage = disc_only_copies,
diff --git a/lib/mnesia/src/mnesia_lib.erl b/lib/mnesia/src/mnesia_lib.erl
index ae6631646c..a32c69c59e 100644
--- a/lib/mnesia/src/mnesia_lib.erl
+++ b/lib/mnesia/src/mnesia_lib.erl
@@ -1,7 +1,7 @@
%%
%% %CopyrightBegin%
%%
-%% Copyright Ericsson AB 1996-2011. All Rights Reserved.
+%% Copyright Ericsson AB 1996-2014. 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
@@ -115,6 +115,8 @@
mkcore/1,
not_active_here/1,
other_val/2,
+ other_val/1,
+ pr_other/2,
overload_read/0,
overload_read/1,
overload_set/2,
@@ -296,11 +298,7 @@ active_here(Tab) ->
not_active_here(Tab) ->
not active_here(Tab).
-exists(Fname) ->
- case file:open(Fname, [raw,read]) of
- {ok, F} ->file:close(F), true;
- _ -> false
- end.
+exists(Fname) -> filelib:is_regular(Fname).
dir() -> mnesia_monitor:get_env(dir).
@@ -393,16 +391,19 @@ unset(Var) ->
?ets_delete(mnesia_gvar, Var).
other_val(Var, Other) ->
+ case other_val(Var) of
+ error -> pr_other(Var, Other);
+ Val -> Val
+ end.
+
+other_val(Var) ->
case Var of
{_, where_to_read} -> nowhere;
{_, where_to_write} -> [];
{_, active_replicas} -> [];
- _ ->
- pr_other(Var, Other)
+ _ -> error
end.
--spec pr_other(_,_) -> no_return().
-
pr_other(Var, Other) ->
Why =
case is_running() of
@@ -596,7 +597,7 @@ coredump(CrashInfo) ->
Core = mkcore(CrashInfo),
Out = core_file(),
important("Writing Mnesia core to file: ~p...~p~n", [Out, CrashInfo]),
- file:write_file(Out, Core),
+ _ = file:write_file(Out, Core),
Out.
core_file() ->
@@ -620,7 +621,7 @@ mkcore(CrashInfo) ->
Core = [
CrashInfo,
{time, {date(), time()}},
- {self, catch process_info(self())},
+ {self, proc_dbg_info(self())},
{nodes, catch rpc:multicall(Nodes, ?MODULE, get_node_number, [])},
{applications, catch lists:sort(application:loaded_applications())},
{flags, catch init:get_arguments()},
@@ -697,7 +698,7 @@ relatives() ->
Info = fun(Name) ->
case whereis(Name) of
undefined -> false;
- Pid -> {true, {Name, Pid, catch process_info(Pid)}}
+ Pid -> {true, {Name, Pid, proc_dbg_info(Pid)}}
end
end,
lists:zf(Info, mnesia:ms()).
@@ -706,14 +707,14 @@ workers({workers, Loaders, Senders, Dumper}) ->
Info = fun({Pid, {send_table, Tab, _Receiver, _St}}) ->
case Pid of
undefined -> false;
- Pid -> {true, {Pid, Tab, catch process_info(Pid)}}
+ Pid -> {true, {Pid, Tab, proc_dbg_info(Pid)}}
end;
({Pid, What}) when is_pid(Pid) ->
- {true, {Pid, What, catch process_info(Pid)}};
+ {true, {Pid, What, proc_dbg_info(Pid)}};
({Name, Pid}) ->
case Pid of
undefined -> false;
- Pid -> {true, {Name, Pid, catch process_info(Pid)}}
+ Pid -> {true, {Name, Pid, proc_dbg_info(Pid)}}
end
end,
SInfo = lists:zf(Info, Senders),
@@ -727,13 +728,21 @@ locking_procs(LockList) when is_list(LockList) ->
Pid = Tid#tid.pid,
case node(Pid) == node() of
true ->
- {true, {Pid, catch process_info(Pid)}};
+ {true, {Pid, proc_dbg_info(Pid)}};
_ ->
false
end
end,
lists:zf(Info, UT).
+proc_dbg_info(Pid) ->
+ try
+ [process_info(Pid, current_stacktrace)|
+ process_info(Pid)]
+ catch _:R ->
+ [{process_info,crashed,R}]
+ end.
+
view() ->
Bin = mkcore({crashinfo, {"view only~n", []}}),
vcore(Bin).
@@ -806,9 +815,9 @@ vcore(File) ->
vcore_elem({schema_file, {ok, B}}) ->
Fname = "/tmp/schema.DAT",
- file:write_file(Fname, B),
- dets:view(Fname),
- file:delete(Fname);
+ _ = file:write_file(Fname, B),
+ _ = dets:view(Fname),
+ _ = file:delete(Fname);
vcore_elem({logfile, {ok, BinList}}) ->
Fun = fun({F, Info}) ->
@@ -922,7 +931,7 @@ random_time(Retries, _Counter0) ->
case get(random_seed) of
undefined ->
{X, Y, Z} = erlang:now(), %% time()
- random:seed(X, Y, Z),
+ _ = random:seed(X, Y, Z),
Time = Dup + random:uniform(MaxIntv),
%% dbg_out("---random_test rs ~w max ~w val ~w---~n", [Retries, MaxIntv, Time]),
Time;
@@ -958,20 +967,17 @@ report_system_event({'EXIT', Reason}, Event) ->
unlink(Pid),
%% We get an exit signal if server dies
- receive
- {'EXIT', Pid, _Reason} ->
- {error, {node_not_running, node()}}
- after 0 ->
- gen_event:stop(mnesia_event),
- ok
+ receive {'EXIT', Pid, _Reason} -> ok
+ after 0 -> gen_event:stop(mnesia_event)
end;
Error ->
Msg = "Mnesia(~p): Cannot report event ~p: ~p (~p)~n",
error_logger:format(Msg, [node(), Event, Reason, Error])
- end;
+ end,
+ ok;
report_system_event(_Res, _Event) ->
- ignore.
+ ok.
%% important messages are reported regardless of debug level
important(Format, Args) ->
@@ -1025,8 +1031,8 @@ copy_file(From, To) ->
case file:open(To, [raw, binary, write]) of
{ok, T} ->
Res = copy_file_loop(F, T, 8000),
- file:close(F),
- file:close(T),
+ ok = file:close(F),
+ ok = file:close(T),
Res;
{error, Reason} ->
{error, Reason}
@@ -1038,7 +1044,7 @@ copy_file(From, To) ->
copy_file_loop(F, T, ChunkSize) ->
case file:read(F, ChunkSize) of
{ok, Bin} ->
- file:write(T, Bin),
+ ok = file:write(T, Bin),
copy_file_loop(F, T, ChunkSize);
eof ->
ok;
@@ -1205,7 +1211,7 @@ dets_to_ets(Tabname, Tab, File, Type, Rep, Lock) ->
{keypos, 2}, {repair, Rep}]) of
{ok, Tabname} ->
Res = dets:to_ets(Tabname, Tab),
- Close(Tabname),
+ ok = Close(Tabname),
trav_ret(Res, Tab);
Other ->
Other
diff --git a/lib/mnesia/src/mnesia_locker.erl b/lib/mnesia/src/mnesia_locker.erl
index c4fe370ec1..c3846b00c0 100644
--- a/lib/mnesia/src/mnesia_locker.erl
+++ b/lib/mnesia/src/mnesia_locker.erl
@@ -1,7 +1,7 @@
%%
%% %CopyrightBegin%
%%
-%% Copyright Ericsson AB 1996-2013. All Rights Reserved.
+%% Copyright Ericsson AB 1996-2014. 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
@@ -103,7 +103,8 @@ val(Var) ->
end.
reply(From, R) ->
- From ! {?MODULE, node(), R}.
+ From ! {?MODULE, node(), R},
+ true. %% Quiets dialyzer
l_request(Node, X, Store) ->
{?MODULE, Node} ! {self(), X},
@@ -130,9 +131,14 @@ send_release_tid(Nodes, Tid) ->
receive_release_tid_acc([Node | Nodes], Tid) ->
receive
{?MODULE, Node, {tid_released, Tid}} ->
- receive_release_tid_acc(Nodes, Tid);
- {mnesia_down, Node} ->
receive_release_tid_acc(Nodes, Tid)
+ after 0 ->
+ receive
+ {?MODULE, Node, {tid_released, Tid}} ->
+ receive_release_tid_acc(Nodes, Tid);
+ {mnesia_down, Node} ->
+ receive_release_tid_acc(Nodes, Tid)
+ end
end;
receive_release_tid_acc([], _Tid) ->
ok.
@@ -269,7 +275,8 @@ try_sticky_lock(Tid, Op, Pid, {Tab, _} = Oid) ->
try_lock(Tid, Op, Pid, Oid);
[{_,N}] ->
Req = {Pid, {Op, Tid, Oid}},
- Pid ! {?MODULE, node(), {switch, N, Req}}
+ Pid ! {?MODULE, node(), {switch, N, Req}},
+ true
end.
try_lock(Tid, read_write, Pid, Oid) ->
diff --git a/lib/mnesia/src/mnesia_log.erl b/lib/mnesia/src/mnesia_log.erl
index 18303869ed..d2fd04a60b 100644
--- a/lib/mnesia/src/mnesia_log.erl
+++ b/lib/mnesia/src/mnesia_log.erl
@@ -1,7 +1,7 @@
%%
%% %CopyrightBegin%
%%
-%% Copyright Ericsson AB 1996-2011. All Rights Reserved.
+%% Copyright Ericsson AB 1996-2014. 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
@@ -393,13 +393,15 @@ unsafe_close_log(Log) ->
purge_some_logs() ->
mnesia_monitor:unsafe_close_log(latest_log),
- file:delete(latest_log_file()),
- file:delete(decision_tab_file()).
+ _ = file:delete(latest_log_file()),
+ _ = file:delete(decision_tab_file()),
+ ok.
purge_all_logs() ->
- file:delete(previous_log_file()),
- file:delete(latest_log_file()),
- file:delete(decision_tab_file()).
+ _ = file:delete(previous_log_file()),
+ _ = file:delete(latest_log_file()),
+ _ = file:delete(decision_tab_file()),
+ ok.
%% Prepare dump by renaming the open logfile if possible
%% Returns a tuple on the following format: {Res, OpenLog}
diff --git a/lib/mnesia/src/mnesia_monitor.erl b/lib/mnesia/src/mnesia_monitor.erl
index c7b905a1bf..6fc1a394a6 100644
--- a/lib/mnesia/src/mnesia_monitor.erl
+++ b/lib/mnesia/src/mnesia_monitor.erl
@@ -1,7 +1,7 @@
%%
%% %CopyrightBegin%
%%
-%% Copyright Ericsson AB 1996-2013. All Rights Reserved.
+%% Copyright Ericsson AB 1996-2014. 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
@@ -44,6 +44,7 @@
set_env/2,
start/0,
start_proc/4,
+ sync_log/1,
terminate_proc/3,
unsafe_close_dets/1,
unsafe_close_log/1,
@@ -118,6 +119,9 @@ open_log(Args) ->
reopen_log(Name, Fname, Head) ->
unsafe_call({reopen_log, Name, Fname, Head}).
+sync_log(Name) ->
+ unsafe_call({sync_log, Name}).
+
close_log(Name) ->
unsafe_call({close_log, Name}).
@@ -202,7 +206,7 @@ needs_protocol_conversion(Node) ->
cast(Msg) ->
case whereis(?MODULE) of
- undefined -> ignore;
+ undefined -> ok;
Pid -> gen_server:cast(Pid, Msg)
end.
@@ -382,6 +386,9 @@ handle_call({reopen_log, Name, Fname, Head}, _From, State) ->
{noreply, State}
end;
+handle_call({sync_log, Name}, _From, State) ->
+ {reply, disk_log:sync(Name), State};
+
handle_call({close_log, Name}, _From, State) ->
case disk_log:close(Name) of
ok ->
@@ -395,7 +402,7 @@ handle_call({close_log, Name}, _From, State) ->
end;
handle_call({unsafe_close_log, Name}, _From, State) ->
- disk_log:close(Name),
+ _ = disk_log:close(Name),
{reply, ok, State};
handle_call({negotiate_protocol, Mon, _Version, _Protocols}, _From, State)
@@ -439,7 +446,7 @@ handle_call({negotiate_protocol, Nodes}, From, State) ->
end;
handle_call(init, _From, State) ->
- net_kernel:monitor_nodes(true),
+ _ = net_kernel:monitor_nodes(true),
EarlyNodes = State#state.early_connects,
State2 = State#state{tm_started = true},
{reply, EarlyNodes, State2};
diff --git a/lib/mnesia/src/mnesia_recover.erl b/lib/mnesia/src/mnesia_recover.erl
index 7aa03bda37..b6492707e2 100644
--- a/lib/mnesia/src/mnesia_recover.erl
+++ b/lib/mnesia/src/mnesia_recover.erl
@@ -1,7 +1,7 @@
%%
%% %CopyrightBegin%
%%
-%% Copyright Ericsson AB 1997-2013. All Rights Reserved.
+%% Copyright Ericsson AB 1997-2014. 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
@@ -178,7 +178,11 @@ log_decision(D) ->
val(Var) ->
case ?catch_val(Var) of
- {'EXIT', Reason} -> mnesia_lib:other_val(Var, Reason);
+ {'EXIT', Reason} ->
+ case mnesia_lib:other_val(Var) of
+ error -> mnesia_lib:pr_other(Var, Reason);
+ Val -> Val
+ end;
Value -> Value
end.
diff --git a/lib/mnesia/src/mnesia_snmp_hook.erl b/lib/mnesia/src/mnesia_snmp_hook.erl
index 893b39f3c0..256f83b029 100644
--- a/lib/mnesia/src/mnesia_snmp_hook.erl
+++ b/lib/mnesia/src/mnesia_snmp_hook.erl
@@ -1,7 +1,7 @@
%%
%% %CopyrightBegin%
%%
-%% Copyright Ericsson AB 1996-2011. All Rights Reserved.
+%% Copyright Ericsson AB 1996-2014. 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
@@ -32,7 +32,11 @@
val(Var) ->
case ?catch_val(Var) of
- {'EXIT', _ReASoN_} -> mnesia_lib:other_val(Var, _ReASoN_);
+ {'EXIT', _ReASoN_} ->
+ case mnesia_lib:other_val(Var) of
+ error -> mnesia_lib:pr_other(Var, _ReASoN_);
+ Val -> Val
+ end;
_VaLuE_ -> _VaLuE_
end.
diff --git a/lib/mnesia/src/mnesia_tm.erl b/lib/mnesia/src/mnesia_tm.erl
index 17af0cad44..af658150da 100644
--- a/lib/mnesia/src/mnesia_tm.erl
+++ b/lib/mnesia/src/mnesia_tm.erl
@@ -1,7 +1,7 @@
%%
%% %CopyrightBegin%
%%
-%% Copyright Ericsson AB 1996-2013. All Rights Reserved.
+%% Copyright Ericsson AB 1996-2014. 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
@@ -183,7 +183,8 @@ mnesia_down(Node) ->
undefined ->
mnesia_monitor:mnesia_down(?MODULE, Node);
Pid ->
- Pid ! {mnesia_down, Node}
+ Pid ! {mnesia_down, Node},
+ ok
end.
prepare_checkpoint(Nodes, Cp) ->
diff --git a/lib/mnesia/test/mnesia_SUITE.erl b/lib/mnesia/test/mnesia_SUITE.erl
index e0004ecb51..921ebb71e9 100644
--- a/lib/mnesia/test/mnesia_SUITE.erl
+++ b/lib/mnesia/test/mnesia_SUITE.erl
@@ -21,6 +21,7 @@
-module(mnesia_SUITE).
-author('[email protected]').
-compile([export_all]).
+-include_lib("common_test/include/ct.hrl").
-include("mnesia_test_lib.hrl").
init_per_testcase(Func, Conf) ->
@@ -50,7 +51,7 @@ suite() -> [{ct_hooks,[{ts_install_cth,[{nodenames,2}]}]}].
%% and do not involve the normal test machinery.
all() ->
- [{group, light}, {group, medium}, {group, heavy},
+ [app, appup, {group, light}, {group, medium}, {group, heavy},
clean_up_suite].
groups() ->
@@ -144,6 +145,18 @@ silly() ->
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
+%% Test structure of the mnesia application resource file
+app(Config) when is_list(Config) ->
+ ok = ?t:app_test(mnesia).
+
+%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
+
+%% Test that all required versions have appup directives
+appup(Config) when is_list(Config) ->
+ ok = ?t:appup_test(mnesia).
+
+%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
+
clean_up_suite(doc) -> ["Not a test case only kills mnesia and nodes, that where"
"started during the tests"];
clean_up_suite(suite) ->
diff --git a/lib/mnesia/test/mnesia_config_test.erl b/lib/mnesia/test/mnesia_config_test.erl
index 6baf86a4a5..c495bce63f 100644
--- a/lib/mnesia/test/mnesia_config_test.erl
+++ b/lib/mnesia/test/mnesia_config_test.erl
@@ -1,7 +1,7 @@
%%
%% %CopyrightBegin%
%%
-%% Copyright Ericsson AB 1997-2013. All Rights Reserved.
+%% Copyright Ericsson AB 1997-2014. 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
@@ -639,10 +639,10 @@ send_compressed(Config) ->
end,
?match([], mnesia_test_lib:kill_mnesia([N2])),
-
+ sys:get_status(mnesia_monitor), %% sync N1
?match([], mnesia_test_lib:kill_mnesia([N1])),
?match(ok, mnesia:start([{send_compressed, 9}])),
- ?match(ok, mnesia:wait_for_tables([t0,t1,t2], 5000)),
+ ?match(ok, mnesia:wait_for_tables([t0,t1,t2], 25000)),
?match({atomic, ok}, mnesia:transaction(Create, [t0])),
?match({atomic, ok}, mnesia:transaction(Create, [t1])),
@@ -1158,6 +1158,7 @@ dynamic_basic(Config) when is_list(Config) ->
%%% SYNC!!!
timer:sleep(1000),
+ sys:get_status(mnesia_monitor),
?match([N3,N1], sort(rpc:call(N1, mnesia, system_info, [running_db_nodes]))),
?match([N3,N1], sort(rpc:call(N3, mnesia, system_info, [running_db_nodes]))),
diff --git a/lib/mnesia/test/mnesia_durability_test.erl b/lib/mnesia/test/mnesia_durability_test.erl
index 4434abaa1e..366fda7044 100644
--- a/lib/mnesia/test/mnesia_durability_test.erl
+++ b/lib/mnesia/test/mnesia_durability_test.erl
@@ -1,7 +1,7 @@
%%
%% %CopyrightBegin%
%%
-%% Copyright Ericsson AB 1997-2013. All Rights Reserved.
+%% Copyright Ericsson AB 1997-2014. 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
@@ -48,19 +48,19 @@ groups() ->
load_directly_when_all_are_ram_copiesB,
{group, late_load_when_all_are_ram_copies_on_ram_nodes},
load_when_last_replica_becomes_available,
- load_when_we_have_down_from_all_other_replica_nodes,
+ load_when_down_from_all_other_replica_nodes,
late_load_transforms_into_disc_load,
late_load_leads_to_hanging,
force_load_when_nobody_intents_to_load,
force_load_when_someone_has_decided_to_load,
- force_load_when_someone_else_already_has_loaded,
+ force_load_when_someone_else_has_loaded,
force_load_when_we_has_loaded,
force_load_on_a_non_local_table,
force_load_when_the_table_does_not_exist,
{group, load_tables_with_master_tables}]},
{late_load_when_all_are_ram_copies_on_ram_nodes, [],
- [late_load_when_all_are_ram_copies_on_ram_nodes1,
- late_load_when_all_are_ram_copies_on_ram_nodes2]},
+ [late_load_all_ram_cs_ram_nodes1,
+ late_load_all_ram_cs_ram_nodes2]},
{load_tables_with_master_tables, [],
[master_nodes, starting_master_nodes,
master_on_non_local_tables,
@@ -292,8 +292,8 @@ load_directly_when_all_are_ram_copiesB(Config) when is_list(Config) ->
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
-late_load_when_all_are_ram_copies_on_ram_nodes1(suite) -> [];
-late_load_when_all_are_ram_copies_on_ram_nodes1(Config) when is_list(Config) ->
+late_load_all_ram_cs_ram_nodes1(suite) -> [];
+late_load_all_ram_cs_ram_nodes1(Config) when is_list(Config) ->
[N1, N2] = mnesia_test_lib:prepare_test_case([{init_test_case, [mnesia]},
delete_schema,
{reload_appls, [mnesia]}],
@@ -303,8 +303,8 @@ late_load_when_all_are_ram_copies_on_ram_nodes1(Config) when is_list(Config) ->
2, Config, ?FILE, ?LINE),
Res.
-late_load_when_all_are_ram_copies_on_ram_nodes2(suite) -> [];
-late_load_when_all_are_ram_copies_on_ram_nodes2(Config) when is_list(Config) ->
+late_load_all_ram_cs_ram_nodes2(suite) -> [];
+late_load_all_ram_cs_ram_nodes2(Config) when is_list(Config) ->
[N1, N2, N3] = mnesia_test_lib:prepare_test_case([{init_test_case, [mnesia]},
delete_schema,
{reload_appls, [mnesia]}],
@@ -439,13 +439,13 @@ load_when_last_replica_becomes_available(Config) when is_list(Config) ->
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
-load_when_we_have_down_from_all_other_replica_nodes(doc) ->
+load_when_down_from_all_other_replica_nodes(doc) ->
["The table can be loaded if this node was the last one surviving. ",
"Check this by having N1, N2, N3 and a table replicated on all those ",
"nodes. Then kill them in the N1, N2, N3 order. Then start N3 and ",
"verify that the table is available with correct contents."];
-load_when_we_have_down_from_all_other_replica_nodes(suite) -> [];
-load_when_we_have_down_from_all_other_replica_nodes(Config) when is_list(Config) ->
+load_when_down_from_all_other_replica_nodes(suite) -> [];
+load_when_down_from_all_other_replica_nodes(Config) when is_list(Config) ->
[N1, N2, N3] = Nodes = ?acquire_nodes(3, Config),
?match({atomic,ok},
mnesia:create_table(test_rec,
@@ -773,14 +773,14 @@ wait_for_signal() ->
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
-force_load_when_someone_else_already_has_loaded(doc) ->
+force_load_when_someone_else_has_loaded(doc) ->
["Normal case. Do a force load when somebody else has loaded the table. ",
"Start N1, N2, kill in N1, N2 order. Start N2 load the table, start N1 ",
"force load. Did it work? (i.e: did N1 load the table from N2 as that",
"one is the latest version and it is available on N2)"];
-force_load_when_someone_else_already_has_loaded(suite) -> [];
-force_load_when_someone_else_already_has_loaded(Config) when is_list(Config) ->
+force_load_when_someone_else_has_loaded(suite) -> [];
+force_load_when_someone_else_has_loaded(Config) when is_list(Config) ->
[N1, N2] = Nodes = ?acquire_nodes(2, Config),
Table = test_rec,
Trec1 = #test_rec{key=1,val=111},
diff --git a/lib/mnesia/test/mnesia_evil_coverage_test.erl b/lib/mnesia/test/mnesia_evil_coverage_test.erl
index 91820238e5..2d1623b6ca 100644
--- a/lib/mnesia/test/mnesia_evil_coverage_test.erl
+++ b/lib/mnesia/test/mnesia_evil_coverage_test.erl
@@ -1,7 +1,7 @@
%%
%% %CopyrightBegin%
%%
-%% Copyright Ericsson AB 1996-2013. All Rights Reserved.
+%% Copyright Ericsson AB 1996-2014. 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
@@ -671,13 +671,16 @@ add_copy_when_going_down(Config) ->
?acquire_nodes(2, Config ++ [{tc_timeout, timer:minutes(2)}]),
?match({atomic, ok}, mnesia:create_table(a, [{ram_copies, [Node1]}])),
%% Grab a write lock
+ Tester = self(),
WriteAndWait = fun() ->
mnesia:write({a,1,1}),
- receive continue -> ok
+ Tester ! {self(), got_lock},
+ receive continue -> ok
end
end,
- _Lock = spawn(fun() -> mnesia:transaction(WriteAndWait) end),
- Tester = self(),
+ Locker = spawn(fun() -> mnesia:transaction(WriteAndWait) end),
+ receive {Locker, got_lock} -> ok end,
+
spawn_link(fun() -> Res = rpc:call(Node2, mnesia, add_table_copy,
[a, Node2, ram_copies]),
Tester ! {test, Res}
diff --git a/lib/mnesia/test/mnesia_frag_test.erl b/lib/mnesia/test/mnesia_frag_test.erl
index d3f6762af7..6695fbc880 100644
--- a/lib/mnesia/test/mnesia_frag_test.erl
+++ b/lib/mnesia/test/mnesia_frag_test.erl
@@ -461,7 +461,7 @@ nice_iter_access(Tab, FragNames, RawRead) ->
ExpectedLast = lists:last(Keys),
?match(ExpectedLast, mnesia:last(Tab)),
- ExpectedAllPrev = ['$end_of_table' | lists:reverse(tl(lists:reverse(Keys)))],
+ ExpectedAllPrev = ['$end_of_table' | lists:droplast(Keys)],
?match(ExpectedAllPrev, lists:map(fun(K) -> mnesia:prev(Tab, K) end, Keys)),
ExpectedAllNext = tl(Keys) ++ ['$end_of_table'],
@@ -477,7 +477,7 @@ evil_iter_access(Tab, FragNames, RawRead) ->
ExpectedLast = lists:last(Keys),
?match(ExpectedLast, mnesia:last(Tab)),
- ExpectedAllPrev = ['$end_of_table' | lists:reverse(tl(lists:reverse(Keys)))],
+ ExpectedAllPrev = ['$end_of_table' | lists:droplast(Keys)],
?match(ExpectedAllPrev, lists:map(fun(K) -> mnesia:prev(Tab, K) end, Keys)),
ExpectedAllNext = tl(Keys) ++ ['$end_of_table'],
diff --git a/lib/mnesia/test/mnesia_nice_coverage_test.erl b/lib/mnesia/test/mnesia_nice_coverage_test.erl
index 78eab67b11..4b28ac634f 100644
--- a/lib/mnesia/test/mnesia_nice_coverage_test.erl
+++ b/lib/mnesia/test/mnesia_nice_coverage_test.erl
@@ -1,7 +1,7 @@
%%
%% %CopyrightBegin%
%%
-%% Copyright Ericsson AB 1996-2010. All Rights Reserved.
+%% Copyright Ericsson AB 1996-2014. 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
@@ -189,6 +189,7 @@ adm(Attrs, Node1, Node2) ->
?match({atomic, ok}, mnesia:move_table_copy(nice_tab, Node2, Node1)),
?match(yes, mnesia:force_load_table(nice_counter_tab)),
+ ?match(ok, mnesia:sync_log()),
?match(dumped, mnesia:dump_log()),
ok.
diff --git a/lib/mnesia/test/mnesia_qlc_test.erl b/lib/mnesia/test/mnesia_qlc_test.erl
index 5f46840ae9..9886754710 100644
--- a/lib/mnesia/test/mnesia_qlc_test.erl
+++ b/lib/mnesia/test/mnesia_qlc_test.erl
@@ -264,7 +264,7 @@ atomic_eval(Config) ->
?match({1,[{a,{a,9},91}]}, ok(Restart,[Pid3, Cursor])),
QC1 = ok(fun() -> qlc:cursor(Q1) end, []),
- ?match({'EXIT', _}, qlc:next_answers(QC1)),
+ ?match({'EXIT', _}, (catch qlc:next_answers(QC1))),
?match({aborted,_}, ok(fun()->qlc:next_answers(QC1)end,[])),
?verify_mnesia(Ns, []).
diff --git a/lib/mnesia/test/mnesia_schema_recovery_test.erl b/lib/mnesia/test/mnesia_schema_recovery_test.erl
index 0fe26efd0b..2301b291c2 100644
--- a/lib/mnesia/test/mnesia_schema_recovery_test.erl
+++ b/lib/mnesia/test/mnesia_schema_recovery_test.erl
@@ -1,7 +1,7 @@
%%
%% %CopyrightBegin%
%%
-%% Copyright Ericsson AB 1998-2010. All Rights Reserved.
+%% Copyright Ericsson AB 1998-2014. 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
@@ -49,66 +49,69 @@ groups() ->
[{interrupted_before_log_dump, [],
[interrupted_before_create_ram,
interrupted_before_create_disc,
- interrupted_before_create_disc_only,
+ interrupted_before_create_do,
interrupted_before_create_nostore,
interrupted_before_delete_ram,
interrupted_before_delete_disc,
- interrupted_before_delete_disc_only,
- interrupted_before_add_ram, interrupted_before_add_disc,
- interrupted_before_add_disc_only,
+ interrupted_before_delete_do,
+ interrupted_before_add_ram,
+ interrupted_before_add_disc,
+ interrupted_before_add_do,
interrupted_before_add_kill_copier,
interrupted_before_move_ram,
interrupted_before_move_disc,
- interrupted_before_move_disc_only,
+ interrupted_before_move_do,
interrupted_before_move_kill_copier,
interrupted_before_delcopy_ram,
interrupted_before_delcopy_disc,
- interrupted_before_delcopy_disc_only,
+ interrupted_before_delcopy_do,
interrupted_before_delcopy_kill_copier,
interrupted_before_addindex_ram,
interrupted_before_addindex_disc,
- interrupted_before_addindex_disc_only,
+ interrupted_before_addindex_do,
interrupted_before_delindex_ram,
interrupted_before_delindex_disc,
- interrupted_before_delindex_disc_only,
+ interrupted_before_delindex_do,
interrupted_before_change_type_ram2disc,
- interrupted_before_change_type_ram2disc_only,
+ interrupted_before_change_type_ram2do,
interrupted_before_change_type_disc2ram,
- interrupted_before_change_type_disc2disc_only,
- interrupted_before_change_type_disc_only2ram,
- interrupted_before_change_type_disc_only2disc,
+ interrupted_before_change_type_disc2do,
+ interrupted_before_change_type_do2ram,
+ interrupted_before_change_type_do2disc,
interrupted_before_change_type_other_node,
interrupted_before_change_schema_type]},
{interrupted_after_log_dump, [],
[interrupted_after_create_ram,
interrupted_after_create_disc,
- interrupted_after_create_disc_only,
+ interrupted_after_create_do,
interrupted_after_create_nostore,
interrupted_after_delete_ram,
interrupted_after_delete_disc,
- interrupted_after_delete_disc_only,
- interrupted_after_add_ram, interrupted_after_add_disc,
- interrupted_after_add_disc_only,
+ interrupted_after_delete_do,
+ interrupted_after_add_ram,
+ interrupted_after_add_disc,
+ interrupted_after_add_do,
interrupted_after_add_kill_copier,
- interrupted_after_move_ram, interrupted_after_move_disc,
- interrupted_after_move_disc_only,
+ interrupted_after_move_ram,
+ interrupted_after_move_disc,
+ interrupted_after_move_do,
interrupted_after_move_kill_copier,
interrupted_after_delcopy_ram,
interrupted_after_delcopy_disc,
- interrupted_after_delcopy_disc_only,
+ interrupted_after_delcopy_do,
interrupted_after_delcopy_kill_copier,
interrupted_after_addindex_ram,
interrupted_after_addindex_disc,
- interrupted_after_addindex_disc_only,
+ interrupted_after_addindex_do,
interrupted_after_delindex_ram,
interrupted_after_delindex_disc,
- interrupted_after_delindex_disc_only,
+ interrupted_after_delindex_do,
interrupted_after_change_type_ram2disc,
- interrupted_after_change_type_ram2disc_only,
+ interrupted_after_change_type_ram2do,
interrupted_after_change_type_disc2ram,
- interrupted_after_change_type_disc2disc_only,
- interrupted_after_change_type_disc_only2ram,
- interrupted_after_change_type_disc_only2disc,
+ interrupted_after_change_type_disc2do,
+ interrupted_after_change_type_do2ram,
+ interrupted_after_change_type_do2disc,
interrupted_after_change_type_other_node,
interrupted_after_change_schema_type]}].
@@ -128,8 +131,8 @@ interrupted_before_create_disc(Config) when is_list(Config) ->
KillAt = {mnesia_dumper, dump_schema_op},
interrupted_create(Config, disc_copies, all, KillAt).
-interrupted_before_create_disc_only(suite) -> [];
-interrupted_before_create_disc_only(Config) when is_list(Config) ->
+interrupted_before_create_do(suite) -> [];
+interrupted_before_create_do(Config) when is_list(Config) ->
KillAt = {mnesia_dumper, dump_schema_op},
interrupted_create(Config, disc_only_copies, all, KillAt).
@@ -148,8 +151,8 @@ interrupted_after_create_disc(Config) when is_list(Config) ->
KillAt = {mnesia_dumper, post_dump},
interrupted_create(Config, disc_copies, all, KillAt).
-interrupted_after_create_disc_only(suite) -> [];
-interrupted_after_create_disc_only(Config) when is_list(Config) ->
+interrupted_after_create_do(suite) -> [];
+interrupted_after_create_do(Config) when is_list(Config) ->
KillAt = {mnesia_dumper, post_dump},
interrupted_create(Config, disc_only_copies, all, KillAt).
@@ -204,8 +207,8 @@ interrupted_before_delete_disc(suite) -> [];
interrupted_before_delete_disc(Config) when is_list(Config) ->
Debug_Point = {mnesia_dumper, dump_schema_op},
interrupted_delete(Config, disc_copies, Debug_Point).
-interrupted_before_delete_disc_only(suite) -> [];
-interrupted_before_delete_disc_only(Config) when is_list(Config) ->
+interrupted_before_delete_do(suite) -> [];
+interrupted_before_delete_do(Config) when is_list(Config) ->
Debug_Point = {mnesia_dumper, dump_schema_op},
interrupted_delete(Config, disc_only_copies, Debug_Point).
@@ -217,8 +220,8 @@ interrupted_after_delete_disc(suite) -> [];
interrupted_after_delete_disc(Config) when is_list(Config) ->
Debug_Point = {mnesia_dumper, post_dump},
interrupted_delete(Config, disc_copies, Debug_Point).
-interrupted_after_delete_disc_only(suite) -> [];
-interrupted_after_delete_disc_only(Config) when is_list(Config) ->
+interrupted_after_delete_do(suite) -> [];
+interrupted_after_delete_do(Config) when is_list(Config) ->
Debug_Point = {mnesia_dumper, post_dump},
interrupted_delete(Config, disc_only_copies, Debug_Point).
@@ -249,8 +252,8 @@ interrupted_before_add_disc(suite) -> [];
interrupted_before_add_disc(Config) when is_list(Config) ->
Debug_Point = {mnesia_dumper, dump_schema_op},
interrupted_add(Config, disc_copies, kill_reciever, Debug_Point).
-interrupted_before_add_disc_only(suite) -> [];
-interrupted_before_add_disc_only(Config) when is_list(Config) ->
+interrupted_before_add_do(suite) -> [];
+interrupted_before_add_do(Config) when is_list(Config) ->
Debug_Point = {mnesia_dumper, dump_schema_op},
interrupted_add(Config, disc_only_copies, kill_reciever, Debug_Point).
interrupted_before_add_kill_copier(suite) -> [];
@@ -266,8 +269,8 @@ interrupted_after_add_disc(suite) -> [];
interrupted_after_add_disc(Config) when is_list(Config) ->
Debug_Point = {mnesia_dumper, post_dump},
interrupted_add(Config, disc_copies, kill_reciever, Debug_Point).
-interrupted_after_add_disc_only(suite) -> [];
-interrupted_after_add_disc_only(Config) when is_list(Config) ->
+interrupted_after_add_do(suite) -> [];
+interrupted_after_add_do(Config) when is_list(Config) ->
Debug_Point = {mnesia_dumper, post_dump},
interrupted_add(Config, disc_only_copies, kill_reciever, Debug_Point).
interrupted_after_add_kill_copier(suite) -> [];
@@ -327,8 +330,8 @@ interrupted_before_move_disc(suite) -> [];
interrupted_before_move_disc(Config) when is_list(Config) ->
Debug_Point = {mnesia_dumper, dump_schema_op},
interrupted_move(Config, disc_copies, kill_reciever, Debug_Point).
-interrupted_before_move_disc_only(suite) -> [];
-interrupted_before_move_disc_only(Config) when is_list(Config) ->
+interrupted_before_move_do(suite) -> [];
+interrupted_before_move_do(Config) when is_list(Config) ->
Debug_Point = {mnesia_dumper, dump_schema_op},
interrupted_move(Config, disc_only_copies, kill_reciever, Debug_Point).
interrupted_before_move_kill_copier(suite) -> [];
@@ -344,8 +347,8 @@ interrupted_after_move_disc(suite) -> [];
interrupted_after_move_disc(Config) when is_list(Config) ->
Debug_Point = {mnesia_dumper, post_dump},
interrupted_move(Config, disc_copies, kill_reciever, Debug_Point).
-interrupted_after_move_disc_only(suite) -> [];
-interrupted_after_move_disc_only(Config) when is_list(Config) ->
+interrupted_after_move_do(suite) -> [];
+interrupted_after_move_do(Config) when is_list(Config) ->
Debug_Point = {mnesia_dumper, post_dump},
interrupted_move(Config, disc_only_copies, kill_reciever, Debug_Point).
interrupted_after_move_kill_copier(suite) -> [];
@@ -408,8 +411,8 @@ interrupted_before_delcopy_disc(suite) -> [];
interrupted_before_delcopy_disc(Config) when is_list(Config) ->
Debug_Point = {mnesia_dumper, dump_schema_op},
interrupted_delcopy(Config, disc_copies, kill_reciever, Debug_Point).
-interrupted_before_delcopy_disc_only(suite) -> [];
-interrupted_before_delcopy_disc_only(Config) when is_list(Config) ->
+interrupted_before_delcopy_do(suite) -> [];
+interrupted_before_delcopy_do(Config) when is_list(Config) ->
Debug_Point = {mnesia_dumper, dump_schema_op},
interrupted_delcopy(Config, disc_only_copies, kill_reciever, Debug_Point).
interrupted_before_delcopy_kill_copier(suite) -> [];
@@ -425,8 +428,8 @@ interrupted_after_delcopy_disc(suite) -> [];
interrupted_after_delcopy_disc(Config) when is_list(Config) ->
Debug_Point = {mnesia_dumper, post_dump},
interrupted_delcopy(Config, disc_copies, kill_reciever, Debug_Point).
-interrupted_after_delcopy_disc_only(suite) -> [];
-interrupted_after_delcopy_disc_only(Config) when is_list(Config) ->
+interrupted_after_delcopy_do(suite) -> [];
+interrupted_after_delcopy_do(Config) when is_list(Config) ->
Debug_Point = {mnesia_dumper, post_dump},
interrupted_delcopy(Config, disc_only_copies, kill_reciever, Debug_Point).
interrupted_after_delcopy_kill_copier(suite) -> [];
@@ -487,8 +490,8 @@ interrupted_before_addindex_disc(suite) -> [];
interrupted_before_addindex_disc(Config) when is_list(Config) ->
Debug_Point = {mnesia_dumper, dump_schema_op},
interrupted_addindex(Config, disc_copies, Debug_Point).
-interrupted_before_addindex_disc_only(suite) -> [];
-interrupted_before_addindex_disc_only(Config) when is_list(Config) ->
+interrupted_before_addindex_do(suite) -> [];
+interrupted_before_addindex_do(Config) when is_list(Config) ->
Debug_Point = {mnesia_dumper, dump_schema_op},
interrupted_addindex(Config, disc_only_copies, Debug_Point).
@@ -500,8 +503,8 @@ interrupted_after_addindex_disc(suite) -> [];
interrupted_after_addindex_disc(Config) when is_list(Config) ->
Debug_Point = {mnesia_dumper, post_dump},
interrupted_addindex(Config, disc_copies, Debug_Point).
-interrupted_after_addindex_disc_only(suite) -> [];
-interrupted_after_addindex_disc_only(Config) when is_list(Config) ->
+interrupted_after_addindex_do(suite) -> [];
+interrupted_after_addindex_do(Config) when is_list(Config) ->
Debug_Point = {mnesia_dumper, post_dump},
interrupted_addindex(Config, disc_only_copies, Debug_Point).
@@ -555,8 +558,8 @@ interrupted_before_delindex_disc(suite) -> [];
interrupted_before_delindex_disc(Config) when is_list(Config) ->
Debug_Point = {mnesia_dumper, dump_schema_op},
interrupted_delindex(Config, disc_copies, Debug_Point).
-interrupted_before_delindex_disc_only(suite) -> [];
-interrupted_before_delindex_disc_only(Config) when is_list(Config) ->
+interrupted_before_delindex_do(suite) -> [];
+interrupted_before_delindex_do(Config) when is_list(Config) ->
Debug_Point = {mnesia_dumper, dump_schema_op},
interrupted_delindex(Config, disc_only_copies, Debug_Point).
@@ -568,8 +571,8 @@ interrupted_after_delindex_disc(suite) -> [];
interrupted_after_delindex_disc(Config) when is_list(Config) ->
Debug_Point = {mnesia_dumper, post_dump},
interrupted_delindex(Config, disc_copies, Debug_Point).
-interrupted_after_delindex_disc_only(suite) -> [];
-interrupted_after_delindex_disc_only(Config) when is_list(Config) ->
+interrupted_after_delindex_do(suite) -> [];
+interrupted_after_delindex_do(Config) when is_list(Config) ->
Debug_Point = {mnesia_dumper, post_dump},
interrupted_delindex(Config, disc_only_copies, Debug_Point).
@@ -613,24 +616,24 @@ interrupted_before_change_type_ram2disc(suite) -> [];
interrupted_before_change_type_ram2disc(Config) when is_list(Config) ->
Debug_Point = {mnesia_dumper, dump_schema_op},
interrupted_change_type(Config, ram_copies, disc_copies, changer, Debug_Point).
-interrupted_before_change_type_ram2disc_only(suite) -> [];
-interrupted_before_change_type_ram2disc_only(Config) when is_list(Config) ->
+interrupted_before_change_type_ram2do(suite) -> [];
+interrupted_before_change_type_ram2do(Config) when is_list(Config) ->
Debug_Point = {mnesia_dumper, dump_schema_op},
interrupted_change_type(Config, ram_copies, disc_only_copies, changer, Debug_Point).
interrupted_before_change_type_disc2ram(suite) -> [];
interrupted_before_change_type_disc2ram(Config) when is_list(Config) ->
Debug_Point = {mnesia_dumper, dump_schema_op},
interrupted_change_type(Config, disc_copies, ram_copies, changer, Debug_Point).
-interrupted_before_change_type_disc2disc_only(suite) -> [];
-interrupted_before_change_type_disc2disc_only(Config) when is_list(Config) ->
+interrupted_before_change_type_disc2do(suite) -> [];
+interrupted_before_change_type_disc2do(Config) when is_list(Config) ->
Debug_Point = {mnesia_dumper, dump_schema_op},
interrupted_change_type(Config, disc_copies, disc_only_copies, changer, Debug_Point).
-interrupted_before_change_type_disc_only2ram(suite) -> [];
-interrupted_before_change_type_disc_only2ram(Config) when is_list(Config) ->
+interrupted_before_change_type_do2ram(suite) -> [];
+interrupted_before_change_type_do2ram(Config) when is_list(Config) ->
Debug_Point = {mnesia_dumper, dump_schema_op},
interrupted_change_type(Config, disc_only_copies, ram_copies, changer, Debug_Point).
-interrupted_before_change_type_disc_only2disc(suite) -> [];
-interrupted_before_change_type_disc_only2disc(Config) when is_list(Config) ->
+interrupted_before_change_type_do2disc(suite) -> [];
+interrupted_before_change_type_do2disc(Config) when is_list(Config) ->
Debug_Point = {mnesia_dumper, dump_schema_op},
interrupted_change_type(Config, disc_only_copies, disc_copies, changer, Debug_Point).
interrupted_before_change_type_other_node(suite) -> [];
@@ -642,24 +645,24 @@ interrupted_after_change_type_ram2disc(suite) -> [];
interrupted_after_change_type_ram2disc(Config) when is_list(Config) ->
Debug_Point = {mnesia_dumper, post_dump},
interrupted_change_type(Config, ram_copies, disc_copies, changer, Debug_Point).
-interrupted_after_change_type_ram2disc_only(suite) -> [];
-interrupted_after_change_type_ram2disc_only(Config) when is_list(Config) ->
+interrupted_after_change_type_ram2do(suite) -> [];
+interrupted_after_change_type_ram2do(Config) when is_list(Config) ->
Debug_Point = {mnesia_dumper, post_dump},
interrupted_change_type(Config, ram_copies, disc_only_copies, changer, Debug_Point).
interrupted_after_change_type_disc2ram(suite) -> [];
interrupted_after_change_type_disc2ram(Config) when is_list(Config) ->
Debug_Point = {mnesia_dumper, post_dump},
interrupted_change_type(Config, disc_copies, ram_copies, changer, Debug_Point).
-interrupted_after_change_type_disc2disc_only(suite) -> [];
-interrupted_after_change_type_disc2disc_only(Config) when is_list(Config) ->
+interrupted_after_change_type_disc2do(suite) -> [];
+interrupted_after_change_type_disc2do(Config) when is_list(Config) ->
Debug_Point = {mnesia_dumper, post_dump},
interrupted_change_type(Config, disc_copies, disc_only_copies, changer, Debug_Point).
-interrupted_after_change_type_disc_only2ram(suite) -> [];
-interrupted_after_change_type_disc_only2ram(Config) when is_list(Config) ->
+interrupted_after_change_type_do2ram(suite) -> [];
+interrupted_after_change_type_do2ram(Config) when is_list(Config) ->
Debug_Point = {mnesia_dumper, post_dump},
interrupted_change_type(Config, disc_only_copies, ram_copies, changer, Debug_Point).
-interrupted_after_change_type_disc_only2disc(suite) -> [];
-interrupted_after_change_type_disc_only2disc(Config) when is_list(Config) ->
+interrupted_after_change_type_do2disc(suite) -> [];
+interrupted_after_change_type_do2disc(Config) when is_list(Config) ->
Debug_Point = {mnesia_dumper, post_dump},
interrupted_change_type(Config, disc_only_copies, disc_copies, changer, Debug_Point).
interrupted_after_change_type_other_node(suite) -> [];
diff --git a/lib/mnesia/test/mnesia_test_lib.hrl b/lib/mnesia/test/mnesia_test_lib.hrl
index 281634c239..94a195f01f 100644
--- a/lib/mnesia/test/mnesia_test_lib.hrl
+++ b/lib/mnesia/test/mnesia_test_lib.hrl
@@ -46,15 +46,32 @@
-define(match(ExpectedRes,Expr),
fun() ->
- AcTuAlReS = (catch (Expr)),
- case AcTuAlReS of
- ExpectedRes ->
- ?verbose("ok, ~n Result as expected:~p~n",[AcTuAlReS]),
- {success,AcTuAlReS};
- _ ->
- ?error("Not Matching Actual result was:~n ~p~n",
- [AcTuAlReS]),
- {fail,AcTuAlReS}
+ try Expr of
+ _AR_0 = ExpectedRes ->
+ ?verbose("ok, ~n Result as expected:~p~n",[_AR_0]),
+ {success,_AR_0};
+ _AR_0 ->
+ ?error("Not Matching Actual result was:~n ~p~n",[_AR_0]),
+ {fail,_AR_0}
+ catch
+ exit:{aborted, _ER_1} when
+ element(1, _ER_1) =:= node_not_running;
+ element(1, _ER_1) =:= bad_commit;
+ element(1, _ER_1) =:= cyclic ->
+ %% Need to re-raise these to restart transaction
+ erlang:raise(exit, {aborted, _ER_1}, erlang:get_stacktrace());
+ exit:_AR_1 ->
+ case fun(_AR_EXIT_) -> {'EXIT', _AR_EXIT_} end(_AR_1) of
+ _AR_2 = ExpectedRes ->
+ ?verbose("ok, ~n Result as expected:~p~n",[_AR_2]),
+ {success,_AR_2};
+ _AR_2 ->
+ ?error("Not Matching Actual result was:~n ~p~n", [_AR_2]),
+ {fail,_AR_2}
+ end;
+ _:_AR_1 ->
+ ?error("Not Matching Actual result was:~n ~p~n", [_AR_1]),
+ {fail,_AR_1}
end
end()).
diff --git a/lib/mnesia/test/mnesia_trans_access_test.erl b/lib/mnesia/test/mnesia_trans_access_test.erl
index 157e441b27..237984978e 100644
--- a/lib/mnesia/test/mnesia_trans_access_test.erl
+++ b/lib/mnesia/test/mnesia_trans_access_test.erl
@@ -677,7 +677,7 @@ check_res(sync_dirty, Res) when is_list(Res) ->
check_res(ets, Res) when is_list(Res) ->
Res;
check_res(Type,Res) ->
- ?match(bug,{Type,Res}).
+ ?match({bug, bug},{Type,Res}).
read_op(Oid) ->
case lists:reverse(mnesia:read(Oid)) of
@@ -1118,10 +1118,7 @@ create_live_table_index(Config, Storage) ->
ValPos = 3,
mnesia:dirty_write({Tab, 1, 2}),
- Fun = fun() ->
- ?match(ok, mnesia:write({Tab, 2, 2})),
- ok
- end,
+ Fun = fun() -> mnesia:write({Tab, 2, 2}) end,
?match({atomic, ok}, mnesia:transaction(Fun)),
?match({atomic, ok}, mnesia:add_table_index(Tab, ValPos)),
IRead = fun() -> lists:sort(mnesia:index_read(Tab, 2, ValPos)) end,
diff --git a/lib/mnesia/vsn.mk b/lib/mnesia/vsn.mk
index 064ba43791..c596f98c81 100644
--- a/lib/mnesia/vsn.mk
+++ b/lib/mnesia/vsn.mk
@@ -1 +1 @@
-MNESIA_VSN = 4.11
+MNESIA_VSN = 4.12
diff --git a/lib/observer/doc/src/Makefile b/lib/observer/doc/src/Makefile
index b43aeccd73..baeeeb1c65 100644
--- a/lib/observer/doc/src/Makefile
+++ b/lib/observer/doc/src/Makefile
@@ -34,6 +34,8 @@ RELSYSDIR = $(RELEASE_PATH)/lib/$(APPLICATION)-$(VSN)
# Target Specs
# ----------------------------------------------------
XML_APPLICATION_FILES = ref_man.xml
+XML_REF1_FILES = \
+ cdv.xml
XML_REF3_FILES = \
crashdump.xml \
observer.xml \
@@ -59,11 +61,10 @@ BOOK_FILES = book.xml
XML_FILES = \
$(BOOK_FILES) $(XML_CHAPTER_FILES) \
- $(XML_PART_FILES) $(XML_REF3_FILES) \
+ $(XML_PART_FILES) $(XML_REF1_FILES) $(XML_REF3_FILES) \
$(XML_APPLICATION_FILES) $(XML_REF6_FILES)
-ONLY_HTML_FILE = \
- crashdump_help.html
+ONLY_HTML_FILE =
GIF_FILES = \
et_processes.gif \
@@ -77,6 +78,7 @@ HTML_FILES = $(XML_APPLICATION_FILES:%.xml=$(HTMLDIR)/%.html) \
INFO_FILE = ../../info
+MAN1_FILES = $(XML_REF1_FILES:%.xml=$(MAN1DIR)/%.1)
MAN3_FILES = $(XML_REF3_FILES:%.xml=$(MAN3DIR)/%.3)
MAN6_FILES = $(XML_REF6_FILES:%_app.xml=$(MAN6DIR)/%.6)
@@ -106,6 +108,7 @@ html: gifs $(HTML_REF_MAN_FILE) $(ONLY_HTML_FILE:%=$(HTMLDIR)/%)
clean clean_docs:
rm -rf $(HTMLDIR)/*
+ rm -f $(MAN1DIR)/*
rm -f $(MAN3DIR)/*
rm -f $(MAN6DIR)/*
rm -f $(TOP_PDF_FILE) $(TOP_PDF_FILE:%.pdf=%.fo)
@@ -115,7 +118,7 @@ clean clean_docs:
$(HTMLDIR)/$(ONLY_HTML_FILE):
$(INSTALL_DATA) $(ONLY_HTML_FILE) $@
-man: $(MAN3_FILES) $(MAN6_FILES)
+man: $(MAN1_FILES) $(MAN3_FILES) $(MAN6_FILES)
gifs: $(GIF_FILES:%=$(HTMLDIR)/%)
@@ -135,6 +138,8 @@ release_docs_spec: docs
$(INSTALL_DATA) $(HTMLDIR)/* \
"$(RELSYSDIR)/doc/html"
$(INSTALL_DATA) $(INFO_FILE) "$(RELSYSDIR)"
+ $(INSTALL_DIR) "$(RELEASE_PATH)/man/man1"
+ $(INSTALL_DATA) $(MAN1DIR)/* "$(RELEASE_PATH)/man/man1"
$(INSTALL_DIR) "$(RELEASE_PATH)/man/man3"
$(INSTALL_DATA) $(MAN3DIR)/* "$(RELEASE_PATH)/man/man3"
$(INSTALL_DIR) "$(RELEASE_PATH)/man/man6"
diff --git a/lib/observer/doc/src/cdv.xml b/lib/observer/doc/src/cdv.xml
new file mode 100644
index 0000000000..fc8f16bc4e
--- /dev/null
+++ b/lib/observer/doc/src/cdv.xml
@@ -0,0 +1,60 @@
+<?xml version="1.0" encoding="utf-8" ?>
+<!DOCTYPE comref SYSTEM "comref.dtd">
+
+<comref>
+ <header>
+ <copyright>
+ <year>2013</year>
+ <holder>Ericsson AB. All Rights Reserved.</holder>
+ </copyright>
+ <legalnotice>
+ 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.
+
+ </legalnotice>
+
+ <title>The cdv program</title>
+ <prepared>Siri Hansen</prepared>
+ <responsible>Siri Hansen</responsible>
+ <docno></docno>
+ <approved></approved>
+ <checked></checked>
+ <date>2013-10-015</date>
+ <rev>PA1</rev>
+ <file>cdv.xml</file>
+ </header>
+ <com>cdv</com>
+ <comsummary>Script used for starting the Crashdump Viewer from the
+ OS command line.
+ </comsummary>
+
+ <description>
+ <p>The <c>cdv</c> shell script can be found under the <c>priv</c>
+ directory of the <c>observer</c> application. The script is used
+ for starting the Crashdump Viewer tool from the OS command
+ line.</p>
+ <p>For Windows users, <c>cdv.bat</c> can be found in the same
+ location.</p>
+ </description>
+
+ <funcs>
+ <func>
+ <name>cdv [file]</name>
+ <fsummary>Start the Crashdump Viewer and load the given file.</fsummary>
+ <desc>
+ <p>The <c>file</c> arguments is optional. If not given, a file
+ dialog will pop up allowing the user to select a crashdump
+ from the file system.</p>
+ </desc>
+ </func>
+ </funcs>
+
+</comref>
diff --git a/lib/observer/doc/src/crashdump.xml b/lib/observer/doc/src/crashdump.xml
index 5b58a52739..27e42e83b7 100644
--- a/lib/observer/doc/src/crashdump.xml
+++ b/lib/observer/doc/src/crashdump.xml
@@ -31,13 +31,14 @@
<checked></checked>
<date>2003-03-10</date>
<rev>PA1</rev>
- <file>crashdump.sgml</file>
+ <file>crashdump.xml</file>
</header>
<module>crashdump_viewer</module>
- <modulesummary>A HTML based tool for browsing Erlang crashdumps.</modulesummary>
+ <modulesummary>A WxWidgets based tool for browsing Erlang
+ crashdumps.</modulesummary>
<description>
- <p>The Crashdump Viewer is an HTML based tool for browsing Erlang
- crashdumps. Crashdump Viewer runs under the WebTool application.</p>
+ <p>The Crashdump Viewer is a WxWidgets based tool for browsing Erlang
+ crashdumps.</p>
<p>See the <seealso marker="crashdump_ug">user's guide</seealso>
for more information about how to get started with the Crashdump
@@ -46,16 +47,26 @@
<funcs>
<func>
<name>start() -> ok</name>
+ <name>start(File) -> ok</name>
<fsummary>Start the crashdump_viewer</fsummary>
+ <type>
+ <v>File = string()</v>
+ <d>The file name of the crashdump.</d>
+ </type>
<desc>
- <p>This function starts the <c>crashdump_viewer</c>.</p>
+ <p>This function starts the <c>crashdump_viewer</c> GUI and
+ loads the given crashdump.</p>
+
+ <p>If <c>File</c> is not given, a file dialog will be opened
+ where the crashdump can be selected.</p>
</desc>
</func>
<func>
<name>stop() -> ok</name>
<fsummary>Stop the crashdump_viewer</fsummary>
<desc>
- <p>This function stops the <c>crashdump_viewer</c>.</p>
+ <p>This function stops the <c>crashdump_viewer</c> and closes
+ all GUI windows.</p>
</desc>
</func>
</funcs>
diff --git a/lib/observer/doc/src/crashdump_help.html b/lib/observer/doc/src/crashdump_help.html
deleted file mode 100644
index 268b9495d6..0000000000
--- a/lib/observer/doc/src/crashdump_help.html
+++ /dev/null
@@ -1,307 +0,0 @@
-</<!doctype chapter PUBLIC "-//Stork//DTD chapter//EN">
-<!--
- ``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 via the world wide web 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.
-
- The Initial Developer of the Original Code is Ericsson Utvecklings AB.
- Portions created by Ericsson are Copyright 1999, Ericsson Utvecklings
- AB. All Rights Reserved.''
-
- $Id$
--->
-<html>
-<head>
-<title>Crashdump Viewer help</title>
-</head>
-<body BGCOLOR="#FFFFFF">
-<center>
-<a HREF="http://www.erlang.se"><img BORDER=0 ALT="[Erlang Systems]"
-SRC="min_head.gif"></a>
-</center>
-<blockquote>
- <h2>Information pages</h2>
-
- <p>Each menu item points to an information page. If no information
- is found for an item, the page will simply say "No information
- found". The reason for not finding any information about an item
- can be that the dump is truncated, that it is a dump from an old
- OTP release in which this item was not written or that the item
- simply wasn't present in the system at the point of failure.
-
- <p>If the dump was truncated, a warning is displayed.
-
- <p>Even if some information about an item exists, there might be
- empty fields if the dump originates from an old OTP release.
-
- <p>The value "-1" in any field means "unknown", and in most cases
- it means that the dump was truncated somewhere around this field.
-
- <p>Only some of the fields in the different information pages are
- described here. These are fields that to not exist in the raw
- crashdump, or in some way differs from the fields in the raw
- crashdump. Details about other field can be found in the user's
- guide for the Erlang runtime system, in the chapter "How to
- interpret the Erlang crash dumps". A link to this chapter can be
- found in the Crashdump Viewer's menu under documentation, and
- there are also direct links from the specific sections below to
- related information in "How to interpret the Erlang crash dumps".
-
- <a NAME="general_info">
- <h3>General information</h3>
-
- <p>This is the first page shown when a new dump is loaded into
- the system. It shows a very short overview of the dump.
-
- <p>'Node name' will only exist in dumps originating from OTP R9C
- and later.
-
- <p>The following fields are not described in the Erlang runtime
- system user's guide:
-
- <dl>
- <dt><strong>Crashdump created on</strong></dt>
- <dd>Time of failure.</dd>
-
- <dt><strong>Memory allocated</strong></dt>
- <dd>The total number of bytes allocated, equivalent to
- <code>c:memory(total)</code>. This will only be present in
- dumps from OTP R9C and later.</dd>
-
- <dt><strong>Memory maximum</strong></dt>
- <dd>The maximum number of bytes that has been allocated
- during the lifetime of the originating node. This will not be
- present in dumps older than OTP R9C, and even in newer
- releases it is only shown if the Erlang runtime system was run
- instrumented.</dd>
-
- <dt><strong>Atoms</strong></dt>
- <dd>If at all available in the dump, this is the total
- number of atoms in the atom table. If the size of the atom
- table is not available, the number of atoms visible in the
- dump is presented.</dd>
-
- <dt><strong>Processes, ETS tables and Funs</strong></dt>
- <dd>The number of processes, ETS tables and funs visible in
- the dump.</dd>
- </dl>
-
- <center>
- <a href=/crashdump_erts_doc/crash_dump.html#general_info>
- More...</a>
- </center>
-
-
- <a NAME="processes">
- <h3>Processes</h3>
-
- <p>The Process Information page shows a list of all processes
- found in the crashdump, including some short information about
- each process. By default the processes are sorted by their
- pids. To sort by other topic, click any heading in the process
- table.
-
- <p>Detailed information about a specific process is shown when
- the pid is clicked.
-
- <center>
- <a href=/crashdump_erts_doc/crash_dump.html#processes>
- More...</a>
- </center>
-
-
-
- <a NAME="ports">
- <h3>Ports</h3>
-
- <p>The port information page shows all port information found in
- the dump.
-
- <center>
- <a href=/crashdump_erts_doc/crash_dump.html#ports>
- More...</a>
- </center>
-
-
-
- <a NAME="ets_tables"><a NAME="internal_ets_tables">
- <h3>ETS tables</h3>
-
- <p>The ETS table information page shows all ETS table
- information found in the dump. The 'Id' is the same as the
- 'Table' field found in the raw crashdump, and 'Memory' is the
- 'Words' field from the raw crashdump translated into
- bytes. 'Type' is the type of table, and it can be either "hash"
- or "tree". For tree tables there will be no value in the
- 'Bucket' field.
-
- <p>Clicking a pid in the 'Owner' column takes you to the
- detailed information about the process owning the ETS table.
-
- <center>
- <a href=/crashdump_erts_doc/crash_dump.html#ets_tables>
- More...</a>
- </center>
-
-
- <a NAME="timers">
- <h3>Timers</h3>
-
- <p>The timer information page shows all timer information found
- in the dump.
-
- <p>Clicking a pid in the 'Owner' column takes you to the
- detailed information about the process owning the timer.
-
- <center>
- <a href=/crashdump_erts_doc/crash_dump.html#timers>
- More...</a>
- </center>
-
-
-
- <a NAME="funs">
- <h3>Fun table</h3>
-
- <p>The Fun table information page shows all Fun information
- found in the dump. Fun information will only exist in dumps from
- OTP R8B or later.
-
- <center>
- <a href=/crashdump_erts_doc/crash_dump.html#funs>
- More...</a>
- </center>
-
-
-
- <a NAME="atoms">
- <h3>Atoms</h3>
-
- <p>The atoms information page lists all atoms found in the
- dump. The last created atom is listed first.
-
- <p>Note that if the dump is from OTP R8B or earlier, the raw
- dump lists the atoms in the opposite order and the Crashdump
- Viewer reverses them. This means that there is no problem if the
- dump is not truncated. However, if the dump is truncated, the
- last atoms might not be shown at all!!
-
- <center>
- <a href=/crashdump_erts_doc/crash_dump.html#atoms>
- More...</a>
- </center>
-
-
- <a NAME="distribution_info">
- <h3>Distribution information</h3>
-
- <p>The distribution information page shows all distribution
- information found in the dump.
-
- <p>If the page shows "Not alive", it means that the node was not
- distributed.
-
- <p>It the node was distributed, all connected nodes are
- shown. Visible nodes are alive nodes with a living connection to
- the originating node. Hidden nodes are the same as visible
- nodes, except they are started with the "-hidden" flag. Not
- connected nodes are nodes that are not connected to the
- originating node anymore, but references (i.e. process or port
- identitifiers) exist.
-
- <p>'Links/Monitors' may contain information about links or
- monitors between processes on the originating node and the
- connected node.
-
- <p>'Extra Info' may contain debug information (i.e. special
- information written if the emulator is debug compiled) or error
- information.
-
- <center>
- <a href=/crashdump_erts_doc/crash_dump.html#distribution_info>
- More...</a>
- </center>
-
-
- <a NAME="loaded_modules">
- <h3>Loaded modules</h3>
-
- <p>The loaded modules information page shows all modules that
- were loaded on the originating node, and the current size of the
- code. If old code exsits, the old size is also shown.
-
- <p>Detailed information about a specific module is shown when
- the module name is clicked.
-
- <center>
- <a href=/crashdump_erts_doc/crash_dump.html#loaded_modules>
- More...</a>
- </center>
-
-
- <a NAME="internal_tables">
- <h3>Internal tables</h3>
-
- <p>Internal tables are shown in two information pages: hash
- tables and index tables.
-
- <center>
- <a href=/crashdump_erts_doc/crash_dump.html#internal_tables>
- More...</a>
- </center>
-
-
- <a NAME="memory">
- <h3>Memory</h3>
-
- <p>Memory information is divided into three pages.
-
- <p>The first page, <strong>Memory</strong>, shows information
- similar to what you can obtain on a living node with
- <code>c:memory()</code>. This will only be present in dumps from
- OTP R9C and later.
- <a href=/crashdump_erts_doc/crash_dump.html#memory>More...</a>
-
- <p>The <strong>Allocated areas</strong> page shows information
- similar to what you can obtain on a living node with
- <code>erlang:system_info(allocated_areas)</code>.
- <a href=/crashdump_erts_doc/crash_dump.html#allocated_areas>More...</a>
-
- <p>The <strong>Allocator information</strong> page shows
- information about allocators. The contents of the page will vary
- with the version.
- <a href=/crashdump_erts_doc/crash_dump.html#allocator>More...</a>
-
- <center>
-
- </center>
-
-
- <h3>Documentation</h3>
-
- <p>'Crashdump Viewer help' is this document.
-
- <p>'How to interpret Erlang crashdumps' is a document from the
- Erlang runtime system describing details in the raw
- crashdumps. Here you will also find information about each
- single field in the different information pages.
-
-</blockquote>
-<center>
-<hr>
-<font SIZE=-1>
-
-Copyright &copy; 1991-2003
-<a HREF="http://www.erlang.se">Ericsson Utvecklings AB</a><br>
-<!--#include virtual="/ssi/otp_footer.html"-->
-</font>
-</center>
-</body>
-</html>
diff --git a/lib/observer/doc/src/crashdump_ug.xml b/lib/observer/doc/src/crashdump_ug.xml
index fd4405df09..d22fb4cc40 100644
--- a/lib/observer/doc/src/crashdump_ug.xml
+++ b/lib/observer/doc/src/crashdump_ug.xml
@@ -13,12 +13,11 @@
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.
-
</legalnotice>
<title>Crashdump Viewer</title>
@@ -31,9 +30,9 @@
<section>
<title>Introduction</title>
- <p>The Crashdump Viewer is an HTML based tool for browsing Erlang
- crashdumps. Crashdump Viewer runs under the WebTool application.
- </p>
+ <p>The Crashdump Viewer is a WxWidgets based tool for browsing
+ Erlang crashdumps.
+ </p>
</section>
<section>
@@ -42,93 +41,357 @@
<p>The easiest way to start Crashdump Viewer is to use the
provided shell script named <c>cdv</c> with the full path to the
erlang crashdump as an argument. The script can be found in the
- priv directory of the <c>observer</c> application. This starts
- WebTool, Crashdump Viewer and a web browser, and loads the given
- file. The browser should then display a page named General
- Information which shows a short summary of the information in
- the crashdump.</p>
-
- <p>The default browser is Internet Explorer on Windows, open on Mac OS X,
- or else Firefox. To use another browser, give the browser's start command
- as the second argument to <c>cdv</c>. If the given browser name is
- not known to Crashdump Viewer, the browser argument is executed as
- a command with the start URL as the only argument.</p>
+ priv directory of the <c>observer</c> application. This starts the
+ Crashdump Viewer GUI and loads the given file. If no file name is
+ given, a file dialog will be opened where the file can be
+ selected.</p>
<p>Under Windows the batch file <c>cdv.bat</c> can be used.</p>
<p>It is also possible to start the Crashdump Viewer from within
an erlang node by calling <seealso
- marker="crashdump_viewer#start/0">crashdump_viewer:start/0</seealso>. This
- will automatically start WebTool and display the web address where
- WebTool can be found. See the documentation for the WebTool
- application for further information about how to use WebTool.</p>
-
- <p>Point your web browser to the address displayed, and you should
- now see the start page of WebTool. At the top of the page, you
- will see a link to "CrashDumpViewer". Click this link to get to
- the start page for Crashdump Viewer. (Note that if webtool is on
- localhost, you must configure your web browser to have direct
- connection to the internet, or you must set no proxy for
- localhost.)
- </p>
- <p>From the start page of Crashdump Viewer, push the "Load
- Crashdump" button to load a crashdump into the tool. Then enter
- the filename of the crashdump in the entry field and push the
- "Ok" button. This will bring you to the General Information
- page, i.e. the same page as the <c>cdv</c> script will open in
- the browser.
- </p>
- <p>Crashdumps generated by OTP R9C and later are loaded directly
- into the Crashdump Viewer, while dumps from earlier releases first
- are translated by the Crashdump Translater. The Crashdump
- Translater creates a new file with the same name as the original
- crashdump, but with the extension <c>.translated</c>. If there is
- no write access to the directory of the original file, you will be
- asked to enter a new path and filename for the translated file.
- </p>
+ marker="crashdump_viewer#start/0">crashdump_viewer:start/0</seealso>
+ or <seealso
+ marker="crashdump_viewer#start/1">crashdump_viewer:start/1</seealso>.</p>
</section>
<section>
- <title>Navigating</title>
- <p>The lefthand frame contains a menu. Menu folders can be
- expanded and collapsed by clicking the folder picture. When a menu
- item is clicked, the item information is shown in the big
- information frame.
- </p>
- <p>The filename frame above the information frame shows the full
- name of the currently viewed Erlang crashdump.
- </p>
- <p>To load a new crashdump, click the "Load New Crashdump" button
- in the menu frame.
- </p>
- <p>The various information shown in the information frame will
- contain links to process identifiers (PIDs) and port
- identifiers. Clicking one of these links will take you to the
- detailed information page for the process or port in question. Use
- the "Back" button in your browser to get back to the
- startingpoint. If the process or port resided on a remote node,
- there will be no information available. Clicking the link will
- then take you to the information about the remote node.
- </p>
+ <title>The graphical interface</title>
+
+ <p>The main window is opened when Crashdump Viewer has loaded a
+ crashdump. It contains a title bar, a menu bar, a number of
+ information panels and a status bar.</p>
+
+ <p>The title bar shows the name of the currently loaded
+ crashdump.</p>
+
+ <p>The menu bar contains a <em>File</em> menu and a <em>Help</em>
+ menu. From the File menu a new crashdump can be loaded or the tool
+ can be terminated. From the Help menu this user's guide and the
+ chapter "How to interpret the Erlang crash dumps" from the user's
+ guide for Erlang runtime system can be opened. "How to interpret
+ the Erlang crash dumps" describes the raw crashdumps in
+ detail. Here you will also find information about each single
+ field in the different information pages. This document can also
+ be found directly in the OTP online documentation, via the Erlang
+ runtime system user's guide.</p>
+
+ <p>The status bar at the bottom of the window will show a warning
+ if the currently loaded dump is truncated.</p>
+
+ <p>The centre area of the main window contains the information
+ panels. Each panel displays information about a specific item or a
+ list of items. A panel is selected by clicking the title of the
+ tab.</p>
+
+ <p>From panels that display lists of items, for example the
+ Processes- or the Ports panel, a new window with further
+ information can be opened by double clicking a row or by right
+ clicking the row and selecting an item from the drop down
+ menu. The new window is called a detail window. Detail windows can
+ be opened for processes, ports, nodes and modules.</p>
+
+ <p>The various information shown in a detail window might contain
+ links to processes or ports. Clicking one of these links will open
+ the detail window for the process or port in question. If the
+ process or port resided on a remote node, there will be no
+ information available. Clicking the link will then pop up a dialog
+ where you can choose whether to open the detail window for the
+ remote node or not.
+ </p>
+
+ <p>Some of the panels contain a left hand menu where sub items of
+ the panel's information area can be selected. Click on one of the
+ rows, and the information will be displayed in the right hand
+ information area.</p>
</section>
<section>
- <title>Help</title>
- <p>Further help on how to use the Crashdump Viewer tool can be
- found in the tool's menu under 'Documentation':
- </p>
- <p>'Crashdump Viewer help' is a short document describing each
- information page and any additional information that might occur,
- compared to the raw dump described in 'How to interpret Erlang
- crashdumps'.
- </p>
- <p>'How to interpret Erlang crashdumps' is a document from the
- Erlang runtime system describing details in the raw
- crashdumps. Here you will also find information about each single
- field in the different information pages. This document can also
- be found directly in the OTP online documentation, via the Erlang
- runtime system user's guide.
- </p>
+ <title>Data content</title>
+
+ <p>Each panel in the main window contains an information
+ page. If no information is found for an item, the page will be
+ empty. The reason for not finding any information about an item
+ can be that the dump is truncated, that it is a dump from an old
+ OTP release in which this item was not written or that the item
+ simply wasn't present in the system at the point of failure.</p>
+
+ <p>If the dump was truncated, a warning is displayed in the
+ status bar of the main window.</p>
+
+ <p>Even if some information about an item exists, there might be
+ empty fields if the dump originates from an old OTP release.</p>
+
+ <p>The value "-1" in any field means "unknown", and in most
+ cases it means that the dump was truncated somewhere around this
+ field.</p>
+
+ <p>The sections below describe some of the fields in the
+ different information panels. These are fields that do not exist
+ in the raw crashdump, or in some way differ from the fields in
+ the raw crashdump. Details about other fields can be found in
+ the user's guide for the Erlang runtime system, in the chapter
+ "How to interpret the Erlang crash dumps". That chapter can also
+ be opened from the Help menu in the Crashdump Viewer's main
+ window, and there are also direct links from the specific
+ sections below to related information in "How to interpret the
+ Erlang crash dumps".</p>
</section>
-</chapter>
+ <section>
+ <marker id="general_info"/>
+ <title>General information</title>
+
+ <p>The <em>General information</em> panel shows a short overview
+ of the dump.</p>
+
+ <p>The following fields are not described in the Erlang runtime
+ system user's guide:</p>
+
+ <taglist>
+ <tag><em>Crashdump created on</em></tag>
+ <item>Time of failure.</item>
+
+ <tag><em>Memory allocated</em></tag>
+ <item>The total number of bytes allocated, equivalent to
+ <c>c:memory(total)</c>.</item>
+
+ <tag><em>Memory maximum</em></tag>
+ <item>The maximum number of bytes that has been allocated during
+ the lifetime of the originating node. This will only be shown if
+ the Erlang runtime system was run instrumented.</item>
+
+ <tag><em>Atoms</em></tag>
+ <item>If available in the dump, this is the total number of
+ atoms in the atom table. If the size of the atom table is not
+ available, the number of atoms visible in the dump is
+ presented.</item>
+
+ <tag><em>Processes, ETS tables and Funs</em></tag>
+ <item>The number of processes, ETS tables and funs visible in
+ the dump.</item>
+ </taglist>
+
+ <p>
+ <seealso marker="erts:crash_dump#general_info">More...</seealso>
+ </p>
+ </section>
+
+ <section>
+ <marker id="processes"/>
+ <title>Processes</title>
+
+ <p>The <em>Processes</em> panel shows a list of all processes
+ found in the crashdump, including some short information about
+ each process. By default the processes are sorted by their
+ pids. To sort by other topic, click the desired column
+ heading.</p>
+
+ <p>The <em>Memory</em> column shows the 'Memory' field which was
+ added to crashdumps in R16B01. This is the total amount of memory
+ used by the process. For crashdumps from earlier releases, this
+ column shows the 'Stack+heap' field. The value shown is always in
+ bytes.</p>
+
+ <p>To view detailed information about a specific process, double
+ click the row in the list or right click the row and select
+ "Properties for &lt;pid&gt;".</p>
+
+ <p>
+ <seealso marker="erts:crash_dump#processes">More...</seealso>
+ </p>
+ </section>
+
+ <section>
+ <marker id="ports"/>
+ <title>Ports</title>
+
+ <p>The <em>Ports</em> panel is similar to the <em>Processes</em>
+ panel, except it lists all ports found in the crashdump.</p>
+
+ <p>To see more details about a specific port, dobule click the row
+ or right click it and select "Properties for &lt;port&gt;". From
+ the right click menu you can also select "Properties for
+ &lt;pid&gt;", where &lt;pid&gt; is the process connected to the
+ port.</p>
+
+ <p>
+ <seealso marker="erts:crash_dump#ports">
+ More...</seealso>
+ </p>
+ </section>
+
+ <section>
+ <marker id="ets_tables"/><marker id="internal_ets_tables"/>
+ <title>ETS tables</title>
+
+ <p>The <em>ETS Tables</em> panel shows all ETS table information
+ found in the dump. The 'Id' is the same as the 'Table' field found
+ in the raw crashdump, and 'Memory' is the 'Words' field from the
+ raw crashdump translated into bytes. 'Type' is the type of table,
+ and it can be either "hash" or "tree". For tree tables there will
+ be no value in the 'Bucket' field.</p>
+
+ <p>To open the detailed information page about the owner process
+ of an ETS table, right click the row and select "Properties for
+ &lt;pid&gt;".</p>
+
+ <p>Double clicking a row in the ETS Tables panel has no
+ effect.</p>
+
+ <p>From the left hand menu you can also select to see internal ETS
+ tables.</p>
+
+ <p>
+ <seealso marker="erts:crash_dump#ets_tables">
+ More...</seealso>
+ </p>
+ </section>
+
+ <section>
+ <marker id="timers"/>
+ <title>Timers</title>
+
+ <p>The <em>Timers</em> panel shows all timer information found in
+ the dump.</p>
+
+ <p>To open the detailed information page about the owner process
+ of a timer, right click the row and select "Properties for
+ &lt;pid&gt;".</p>
+
+ <p>Double clicking a row in the Timers panel has no effect.</p>
+
+ <p>
+ <seealso marker="erts:crash_dump#timers">More...</seealso>
+ </p>
+ </section>
+
+ <section>
+ <marker id="funs"/>
+ <title>Funs</title>
+
+ <p>The <em>Funs</em> panel shows all Fun information found in the
+ dump.</p>
+
+ <p>To open the detailed information page about the module to which
+ the fun belongs, right click the row and select "Properties for
+ &lt;mod&gt;".</p>
+
+ <p>Double clicking a row in the Funs panel has no effect.</p>
+
+ <p>
+ <seealso marker="erts:crash_dump#funs">More...</seealso>
+ </p>
+ </section>
+
+ <section>
+ <marker id="atoms"/>
+ <title>Atoms</title>
+
+ <p>The <em>Atoms</em> panel lists all atoms found in the dump. By
+ default the atoms are sorted in creation order from first to
+ last. This is opposite of the raw crashdump where atoms are listed
+ from last to first, meaning that if the dump was truncated in the
+ middle of the atom list only the last created atoms will be seen
+ in the <em>Atoms</em> panel.</p>
+
+ <p>
+ <seealso marker="erts:crash_dump#atoms">More...</seealso>
+ </p>
+ </section>
+
+ <section>
+ <marker id="distribution_info"/>
+ <title>Nodes</title>
+
+ <p>The <em>Nodes</em> panel shows a list of all external erlang
+ nodes which are referenced from the crashdump.</p>
+
+ <p>If the page is empty it either means that the crashed node was
+ not distributed, that it was distributed but had no references to
+ other nodes or that the dump was truncated.</p>
+
+ <p>If the node was distributed, all referenced nodes are
+ shown. The column named <em>Connection type</em> shows if the node
+ is visible, hidden or not connected. Visible nodes are alive nodes
+ with a living connection to the originating node. Hidden nodes are
+ the same as visible nodes, except they are started with the
+ <c>-hidden</c> flag. Not connected nodes are nodes that are not
+ connected to the originating node anymore, but references
+ (i.e. process or port identifiers) exist.</p>
+
+ <p>To see more detailed information about a node, double click the
+ row or right click the row and select "Properties for node
+ &lt;node&gt;". From the right click menu you can also select
+ "Properties for &lt;port&gt;", to open the detailed information
+ window for the controlling port.</p>
+
+ <p>In the detailed information window for a node, any exsisting
+ links and monitors between processes on the originating node and
+ the connected node are shown. <em>Extra Info</em> may contain
+ debug information (i.e. special information written if the
+ emulator is debug compiled) or error information.</p>
+
+ <p>
+ <seealso marker="erts:crash_dump#distribution_info">
+ More...</seealso>
+ </p>
+ </section>
+
+ <section>
+ <marker id="loaded_modules"/>
+ <title>Loaded modules</title>
+
+ <p>The <em>Modules</em> panel lists all modules that were loaded
+ on the originating node, and the current size of the code. If old
+ code exsits, the old size is also shown.</p>
+
+ <p>To see detailed information about a specific module, double
+ click the row or right click it and select "Properties for
+ &lt;mod&gt;".</p>
+
+ <p>
+ <seealso marker="erts:crash_dump#loaded_modules">
+ More...</seealso>
+ </p>
+ </section>
+
+ <section>
+ <marker id="memory"/>
+ <title>Memory</title>
+
+ <p>The <em>Memory</em> panel shows memory and allocator
+ information. From the left hand menu you can select:</p>
+
+ <p>
+ <list>
+
+ <item><em>Memory</em> <seealso
+ marker="erts:crash_dump#memory">More...</seealso></item>
+
+ <item><em>Allocator Summary</em> - this page presents a
+ summary of values from all allocators below.</item>
+
+ <item><em>&lt;Allocator&gt;</em> - one entry per allocator
+ <seealso
+ marker="erts:crash_dump#allocator">More...</seealso></item>
+
+ <item><em>Allocated Areas</em> <seealso
+ marker="erts:crash_dump#allocated_areas">More...</seealso></item>
+
+ </list>
+ </p>
+ </section>
+
+ <section>
+ <marker id="internal_tables"/>
+ <title>Internal tables</title>
+
+ <p>On the <em>Internal Tables</em> panel you can choose from the
+ left hand menu to see hash tables or index tables.</p>
+
+ <p>
+ <seealso marker="erts:crash_dump#internal_tables">More...</seealso>
+ </p>
+ </section>
+</chapter>
diff --git a/lib/observer/doc/src/notes.xml b/lib/observer/doc/src/notes.xml
index 9de00b8c16..a2c5eda9d7 100644
--- a/lib/observer/doc/src/notes.xml
+++ b/lib/observer/doc/src/notes.xml
@@ -31,6 +31,68 @@
<p>This document describes the changes made to the Observer
application.</p>
+<section><title>Observer 2.0</title>
+
+ <section><title>Fixed Bugs and Malfunctions</title>
+ <list>
+ <item>
+ <p>
+ etop trace handler now works in smp environment (Thanks
+ to Péter Gömöri)</p>
+ <p>
+ Own Id: OTP-11633</p>
+ </item>
+ <item>
+ <p>
+ Application upgrade (appup) files are corrected for the
+ following applications: </p>
+ <p>
+ <c>asn1, common_test, compiler, crypto, debugger,
+ dialyzer, edoc, eldap, erl_docgen, et, eunit, gs, hipe,
+ inets, observer, odbc, os_mon, otp_mibs, parsetools,
+ percept, public_key, reltool, runtime_tools, ssh,
+ syntax_tools, test_server, tools, typer, webtool, wx,
+ xmerl</c></p>
+ <p>
+ A new test utility for testing appup files is added to
+ test_server. This is now used by most applications in
+ OTP.</p>
+ <p>
+ (Thanks to Tobias Schlager)</p>
+ <p>
+ Own Id: OTP-11744</p>
+ </item>
+ </list>
+ </section>
+
+
+ <section><title>Improvements and New Features</title>
+ <list>
+ <item>
+ <p>
+ Removed gs based applications and gs based backends. The
+ <c>observer</c> application replaces the removed
+ applications.</p>
+ <p>
+ *** POTENTIAL INCOMPATIBILITY ***</p>
+ <p>
+ Own Id: OTP-10915</p>
+ </item>
+ <item>
+ <p>
+ The <c>crashdump_viewer</c> is re-written using
+ <c>wx</c>. The old <c>webtool</c> interface for
+ <c>crashdump_viewer</c> does no longer exist.</p>
+ <p>
+ *** POTENTIAL INCOMPATIBILITY ***</p>
+ <p>
+ Own Id: OTP-11179</p>
+ </item>
+ </list>
+ </section>
+
+</section>
+
<section><title>Observer 1.3.1.2</title>
<section><title>Fixed Bugs and Malfunctions</title>
diff --git a/lib/observer/doc/src/ref_man.xml b/lib/observer/doc/src/ref_man.xml
index 3230a1c9d3..c3805b2d86 100644
--- a/lib/observer/doc/src/ref_man.xml
+++ b/lib/observer/doc/src/ref_man.xml
@@ -38,5 +38,6 @@
<xi:include href="ttb.xml"/>
<xi:include href="etop.xml"/>
<xi:include href="crashdump.xml"/>
+ <xi:include href="cdv.xml"/>
</application>
diff --git a/lib/observer/priv/erlang_observer.png b/lib/observer/priv/erlang_observer.png
index 01723d210b..cf900a29e6 100644
--- a/lib/observer/priv/erlang_observer.png
+++ b/lib/observer/priv/erlang_observer.png
Binary files differ
diff --git a/lib/observer/src/Makefile b/lib/observer/src/Makefile
index 646892663f..c120865213 100644
--- a/lib/observer/src/Makefile
+++ b/lib/observer/src/Makefile
@@ -36,14 +36,33 @@ RELSYSDIR = $(RELEASE_PATH)/lib/observer-$(VSN)
MODULES= \
crashdump_viewer \
- crashdump_viewer_html \
+ cdv_atom_cb \
+ cdv_bin_cb \
+ cdv_detail_wx \
+ cdv_dist_cb \
+ cdv_ets_cb \
+ cdv_fun_cb \
+ cdv_gen_cb \
+ cdv_html_wx \
+ cdv_info_wx \
+ cdv_int_tab_cb \
+ cdv_mem_cb \
+ cdv_mod_cb \
+ cdv_multi_wx \
+ cdv_port_cb \
+ cdv_proc_cb \
+ cdv_table_wx \
+ cdv_term_cb \
+ cdv_timer_cb \
+ cdv_virtual_list_wx \
+ cdv_wx \
etop \
etop_tr \
etop_txt \
observer \
observer_app_wx \
+ observer_html_lib \
observer_lib \
- observer_wx \
observer_perf_wx \
observer_pro_wx \
observer_procinfo \
@@ -52,6 +71,7 @@ MODULES= \
observer_traceoptions_wx \
observer_tv_table \
observer_tv_wx \
+ observer_wx \
ttb \
ttb_et
diff --git a/lib/observer/src/cdv_atom_cb.erl b/lib/observer/src/cdv_atom_cb.erl
new file mode 100644
index 0000000000..46fce81b52
--- /dev/null
+++ b/lib/observer/src/cdv_atom_cb.erl
@@ -0,0 +1,48 @@
+%%
+%% %CopyrightBegin%
+%%
+%% Copyright Ericsson AB 2013. 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(cdv_atom_cb).
+
+-export([col_to_elem/1,
+ col_spec/0,
+ get_info/1,
+ format/1]).
+
+-include_lib("wx/include/wx.hrl").
+
+%% Defines
+-define(COL_ID, 0).
+-define(COL_ATOM, ?COL_ID+1).
+
+%% Callbacks for cdv_virtual_list_wx
+col_to_elem(id) -> col_to_elem(?COL_ID);
+col_to_elem(Id) -> Id+1.
+
+col_spec() ->
+ [{"Creation order", ?wxLIST_FORMAT_CENTER, 100},
+ {"Atom", ?wxLIST_FORMAT_LEFT, 100}].
+
+get_info(_) ->
+ {ok,Info,TW} = crashdump_viewer:atoms(),
+ {Info,TW}.
+
+format({Bin,q}) when is_binary(Bin) ->
+ [$'|binary_to_list(Bin)];
+format({Bin,nq}) when is_binary(Bin) ->
+ lists:flatten(io_lib:format("~ts",[Bin]));
+format(D) ->
+ D.
diff --git a/lib/observer/src/cdv_bin_cb.erl b/lib/observer/src/cdv_bin_cb.erl
new file mode 100644
index 0000000000..d5fbceff1e
--- /dev/null
+++ b/lib/observer/src/cdv_bin_cb.erl
@@ -0,0 +1,82 @@
+%%
+%% %CopyrightBegin%
+%%
+%% Copyright Ericsson AB 2013-2014. 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(cdv_bin_cb).
+
+-export([get_details/1,
+ detail_pages/0]).
+
+%% Callbacks for cdv_detail_wx
+get_details({Type, {T,Key}}) ->
+ [{Key,Term}] = ets:lookup(T,Key),
+ {ok,{"Expanded Binary", {Type, Term}, []}};
+get_details({cdv, Id}) ->
+ {ok,Bin} = crashdump_viewer:expand_binary(Id),
+ {ok,{"Expanded Binary", {cvd, Bin}, []}}.
+
+detail_pages() ->
+ [{"Binary", fun init_bin_page/2}].
+
+init_bin_page(Parent,{Type,Bin}) ->
+ cdv_multi_wx:start_link(
+ Parent,
+ [{"Format \~p",cdv_html_wx,{Type,format_bin_fun("~p",Bin)}},
+ {"Format \~tp",cdv_html_wx,{Type,format_bin_fun("~tp",Bin)}},
+ {"Format \~w",cdv_html_wx,{Type,format_bin_fun("~w",Bin)}},
+ {"Format \~s",cdv_html_wx,{Type,format_bin_fun("~s",Bin)}},
+ {"Format \~ts",cdv_html_wx,{Type,format_bin_fun("~ts",Bin)}},
+ {"Hex",cdv_html_wx,{Type,hex_binary_fun(Bin)}},
+ {"Term",cdv_html_wx,{Type,binary_to_term_fun(Bin)}}]).
+
+format_bin_fun(Format,Bin) ->
+ fun() ->
+ try io_lib:format(Format,[Bin]) of
+ Str -> plain_html(lists:flatten(Str))
+ catch error:badarg ->
+ Warning = "This binary can not be formatted with " ++ Format,
+ observer_html_lib:warning(Warning)
+ end
+ end.
+
+binary_to_term_fun(Bin) ->
+ fun() ->
+ try binary_to_term(Bin) of
+ Term -> plain_html(io_lib:format("~p",[Term]))
+ catch error:badarg ->
+ Warning = "This binary can not be coverted to an Erlang term",
+ observer_html_lib:warning(Warning)
+ end
+ end.
+
+-define(line_break,25).
+hex_binary_fun(Bin) ->
+ fun() ->
+ S = "<<" ++ format_hex(Bin,?line_break) ++ ">>",
+ plain_html(io_lib:format("~s",[S]))
+ end.
+
+format_hex(<<B1:4,B2:4>>,_) ->
+ [integer_to_list(B1,16),integer_to_list(B2,16)];
+format_hex(<<B1:4,B2:4,Bin/binary>>,0) ->
+ [integer_to_list(B1,16),integer_to_list(B2,16),$,,$\n,$\s,$\s
+ | format_hex(Bin,?line_break)];
+format_hex(<<B1:4,B2:4,Bin/binary>>,N) ->
+ [integer_to_list(B1,16),integer_to_list(B2,16),$,
+ | format_hex(Bin,N-1)].
+
+plain_html(Text) ->
+ observer_html_lib:plain_page(Text).
diff --git a/lib/observer/src/cdv_detail_wx.erl b/lib/observer/src/cdv_detail_wx.erl
new file mode 100644
index 0000000000..dc93507a36
--- /dev/null
+++ b/lib/observer/src/cdv_detail_wx.erl
@@ -0,0 +1,158 @@
+%%
+%% %CopyrightBegin%
+%%
+%% Copyright Ericsson AB 2013. 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(cdv_detail_wx).
+
+-behaviour(wx_object).
+
+-export([start_link/3]).
+
+-export([init/1, handle_event/2, handle_cast/2, terminate/2, code_change/3,
+ handle_call/3, handle_info/2]).
+
+-include_lib("wx/include/wx.hrl").
+-include("crashdump_viewer.hrl").
+-include("observer_defs.hrl").
+
+-record(state, {parent,
+ frame,
+ id,
+ pages=[]
+ }).
+
+%% Defines
+-define(ID_NOTEBOOK, 604).
+
+%% Detail view
+start_link(Id, ParentFrame, Callback) ->
+ wx_object:start_link(?MODULE, [Id, ParentFrame, Callback, self()], []).
+
+%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
+
+init([Id, ParentFrame, Callback, Parent]) ->
+ case Callback:get_details(Id) of
+ {ok,Details} ->
+ init(Id,ParentFrame,Callback,Parent,Details);
+ {yes_no, Info, Fun} ->
+ case observer_lib:display_yes_no_dialog(Info) of
+ ?wxID_YES -> Fun();
+ ?wxID_NO -> ok
+ end,
+ {stop,normal};
+ {info,Info} ->
+ observer_lib:display_info_dialog(Info),
+ {stop,normal}
+ end.
+
+init(Id,ParentFrame,Callback,Parent,{Title,Info,TW}) ->
+ Frame=wxFrame:new(ParentFrame, ?wxID_ANY, [Title],
+ [{style, ?wxDEFAULT_FRAME_STYLE}, {size, {850,600}}]),
+ MenuBar = wxMenuBar:new(),
+ create_menus(MenuBar),
+ wxFrame:setMenuBar(Frame, MenuBar),
+
+ Panel = wxPanel:new(Frame, []),
+ Sizer = wxBoxSizer:new(?wxVERTICAL),
+ {InfoPanel,Pages} = create_pages(Panel,Callback:detail_pages(),[Info]),
+ wxSizer:add(Sizer, InfoPanel, [{proportion, 1}, {flag, ?wxEXPAND}]),
+
+ case TW of
+ [] ->
+ undefined;
+ _ ->
+ StatusBar = observer_lib:create_status_bar(Panel),
+ wxSizer:add(Sizer, StatusBar, [{flag, ?wxEXPAND bor ?wxALL},
+ {proportion, 0},
+ {border,4}]),
+ wxTextCtrl:writeText(StatusBar, TW),
+ StatusBar
+ end,
+
+ wxPanel:setSizer(Panel, Sizer),
+
+ wxFrame:connect(Frame, close_window),
+ wxMenu:connect(Frame, command_menu_selected),
+ wxFrame:show(Frame),
+ {Frame, #state{parent=Parent,
+ id=Id,
+ frame=Frame,
+ pages=Pages
+ }}.
+
+create_pages(Panel,[{_PageTitle,Fun}],FunArgs) ->
+ %% Only one page - don't create notebook
+ Page = init_panel(Panel, Fun, FunArgs),
+ {Page,[Page]};
+create_pages(Panel,PageSpecs,FunArgs) ->
+ Notebook = wxNotebook:new(Panel, ?ID_NOTEBOOK, [{style, ?wxBK_DEFAULT}]),
+ Pages = [init_tab(Notebook, PageTitle, Fun, FunArgs)
+ || {PageTitle,Fun} <- PageSpecs],
+ {Notebook, Pages}.
+
+init_tab(Notebook,Title,Fun,FunArgs) ->
+ Panel = init_panel(Notebook,Fun,FunArgs),
+ true = wxNotebook:addPage(Notebook, Panel, Title),
+ Panel.
+
+init_panel(ParentWin, Fun, FunArgs) ->
+ Panel = wxScrolledWindow:new(ParentWin),
+ wxScrolledWindow:enableScrolling(Panel,true,true),
+ wxScrolledWindow:setScrollbars(Panel,1,1,0,0),
+ Sizer = wxBoxSizer:new(?wxHORIZONTAL),
+ Window = apply(Fun, [Panel | FunArgs]),
+ wxSizer:add(Sizer, Window, [{flag, ?wxEXPAND bor ?wxALL},
+ {proportion, 1},
+ {border, 5}]),
+ wxPanel:setSizer(Panel, Sizer),
+ Panel.
+
+%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%Callbacks%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
+handle_event(#wx{event=#wxClose{type=close_window}}, State) ->
+ {stop, normal, State};
+
+handle_event(#wx{id=?wxID_CLOSE, event=#wxCommand{type=command_menu_selected}},
+ State) ->
+ {stop, normal, State};
+
+handle_event(Event, _State) ->
+ error({unhandled_event, Event}).
+
+handle_info(_Info, State) ->
+ %% io:format("~p: ~p, Handle info: ~p~n", [?MODULE, ?LINE, _Info]),
+ {noreply, State}.
+
+handle_call(Call, From, _State) ->
+ error({unhandled_call, Call, From}).
+
+handle_cast(Cast, _State) ->
+ error({unhandled_cast, Cast}).
+
+terminate(_Reason, #state{parent=Parent,id=Id,frame=Frame}) ->
+ wx_object:cast(Parent,{detail_win_closed, Id}),
+ case Frame of
+ undefined -> ok;
+ _ -> wxFrame:destroy(Frame)
+ end,
+ ok.
+
+code_change(_, _, State) ->
+ {ok, State}.
+
+%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
+create_menus(MenuBar) ->
+ Menus = [{"File", [#create_menu{id=?wxID_CLOSE, text="Close"}]}],
+ observer_lib:create_menus(Menus, MenuBar, new_window).
diff --git a/lib/observer/src/cdv_dist_cb.erl b/lib/observer/src/cdv_dist_cb.erl
new file mode 100644
index 0000000000..f7e6c9aded
--- /dev/null
+++ b/lib/observer/src/cdv_dist_cb.erl
@@ -0,0 +1,97 @@
+%%
+%% %CopyrightBegin%
+%%
+%% Copyright Ericsson AB 2013-2014. 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(cdv_dist_cb).
+
+-export([col_to_elem/1,
+ col_spec/0,
+ get_info/1,
+ get_detail_cols/1,
+ get_details/1,
+ detail_pages/0,
+ format/1]).
+
+-include_lib("wx/include/wx.hrl").
+-include("crashdump_viewer.hrl").
+
+%% Columns
+-define(COL_NAME, 0).
+-define(COL_TYPE, ?COL_NAME+1).
+-define(COL_CTRL, ?COL_TYPE+1).
+-define(COL_CH, ?COL_CTRL+1).
+-define(COL_CRE, ?COL_CH+1).
+
+%% Callbacks for cdv_virtual_list_wx
+col_to_elem(id) -> col_to_elem(?COL_CH);
+col_to_elem(?COL_NAME) -> #nod.name;
+col_to_elem(?COL_CH) -> #nod.channel;
+col_to_elem(?COL_CTRL) -> #nod.controller;
+col_to_elem(?COL_CRE) -> #nod.creation;
+col_to_elem(?COL_TYPE) -> #nod.conn_type.
+
+col_spec() ->
+ [{"Name", ?wxLIST_FORMAT_LEFT, 300},
+ {"Connection type", ?wxLIST_FORMAT_LEFT, 130},
+ {"Controller", ?wxLIST_FORMAT_LEFT, 130},
+ {"Channel", ?wxLIST_FORMAT_RIGHT, 80},
+ {"Creation", ?wxLIST_FORMAT_RIGHT, 80}].
+
+get_info(_) ->
+ {ok,Info,TW} = crashdump_viewer:dist_info(),
+ {Info,TW}.
+
+get_detail_cols(_) ->
+ {[?COL_CH,?COL_CTRL],true}.
+
+%% Callbacks for cdv_detail_wx
+get_details(Id) ->
+ case crashdump_viewer:node_info(Id) of
+ {ok,Info,TW} ->
+ Proplist = crashdump_viewer:to_proplist(record_info(fields,nod),Info),
+ Title = io_lib:format("~s (~s)",[Info#nod.name,Id]),
+ {ok,{Title,Proplist,TW}};
+ {error,not_found} ->
+ Info = "The node you are searching for could not be found.",
+ {info,Info}
+ end.
+
+detail_pages() ->
+ [{"General Information", fun init_gen_page/2}].
+
+init_gen_page(Parent, Info) ->
+ Fields = info_fields(),
+ cdv_info_wx:start_link(Parent,{Fields,Info,[]}).
+
+format({creations,Creations}) ->
+ string:join([integer_to_list(C) || C <- Creations],",");
+format(D) ->
+ D.
+
+%%%-----------------------------------------------------------------
+%%% Internal
+info_fields() ->
+ [{"Overview",
+ [{"Name", name},
+ {"Type", conn_type},
+ {"Channel", channel},
+ {"Controller", {click,controller}},
+ {"Creation", {{format,fun format/1},creation}},
+ {"Extra Info", error}]},
+ {scroll_boxes,
+ [{"Remote Links",1,{click,remote_links}},
+ {"Remote Monitors",1,{click,remote_mon}},
+ {"Remote Monitored By",1,{click,remote_mon_by}}]}].
diff --git a/lib/observer/src/cdv_ets_cb.erl b/lib/observer/src/cdv_ets_cb.erl
new file mode 100644
index 0000000000..2a5c170e58
--- /dev/null
+++ b/lib/observer/src/cdv_ets_cb.erl
@@ -0,0 +1,67 @@
+%%
+%% %CopyrightBegin%
+%%
+%% Copyright Ericsson AB 2013. 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(cdv_ets_cb).
+
+-export([col_to_elem/1,
+ col_spec/0,
+ get_info/1,
+ get_detail_cols/1]).
+
+-include_lib("wx/include/wx.hrl").
+-include("crashdump_viewer.hrl").
+
+%% Defines
+-define(COL_ID, 0).
+-define(COL_NAME, ?COL_ID+1).
+-define(COL_SLOT, ?COL_NAME+1).
+-define(COL_OWNER, ?COL_SLOT+1).
+-define(COL_BUCK, ?COL_OWNER+1).
+-define(COL_OBJ, ?COL_BUCK+1).
+-define(COL_MEM, ?COL_OBJ+1).
+-define(COL_TYPE, ?COL_MEM+1).
+
+%% Callbacks for cdv_virtual_list_wx
+col_to_elem(id) -> col_to_elem(?COL_ID);
+col_to_elem(?COL_ID) -> #ets_table.id;
+col_to_elem(?COL_NAME) -> #ets_table.name;
+col_to_elem(?COL_SLOT) -> #ets_table.slot;
+col_to_elem(?COL_OWNER) -> #ets_table.pid;
+col_to_elem(?COL_TYPE) -> #ets_table.type;
+col_to_elem(?COL_BUCK) -> #ets_table.buckets;
+col_to_elem(?COL_OBJ) -> #ets_table.size;
+col_to_elem(?COL_MEM) -> #ets_table.memory.
+
+col_spec() ->
+ [{"Id", ?wxLIST_FORMAT_LEFT, 200},
+ {"Name", ?wxLIST_FORMAT_LEFT, 200},
+ {"Slot", ?wxLIST_FORMAT_RIGHT, 50},
+ {"Owner", ?wxLIST_FORMAT_CENTRE, 90},
+ {"Buckets", ?wxLIST_FORMAT_RIGHT, 50},
+ {"Objects", ?wxLIST_FORMAT_RIGHT, 50},
+ {"Memory", ?wxLIST_FORMAT_RIGHT, 80},
+ {"Type", ?wxLIST_FORMAT_LEFT, 50}
+ ].
+
+get_info(Owner) ->
+ {ok,Info,TW} = crashdump_viewer:ets_tables(Owner),
+ {Info,TW}.
+
+get_detail_cols(all) ->
+ {[?COL_OWNER],false};
+get_detail_cols(_) ->
+ {[],false}.
diff --git a/lib/observer/src/cdv_fun_cb.erl b/lib/observer/src/cdv_fun_cb.erl
new file mode 100644
index 0000000000..689ef0e3bb
--- /dev/null
+++ b/lib/observer/src/cdv_fun_cb.erl
@@ -0,0 +1,58 @@
+%%
+%% %CopyrightBegin%
+%%
+%% Copyright Ericsson AB 2013. 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(cdv_fun_cb).
+
+-export([col_to_elem/1,
+ col_spec/0,
+ get_info/1,
+ get_detail_cols/1]).
+
+-include_lib("wx/include/wx.hrl").
+-include("crashdump_viewer.hrl").
+
+%% Defines
+-define(COL_MOD, 0).
+-define(COL_UNIQ, ?COL_MOD+1).
+-define(COL_INDEX, ?COL_UNIQ+1).
+-define(COL_ADDR, ?COL_INDEX+1).
+-define(COL_NADDR, ?COL_ADDR+1).
+-define(COL_REFC, ?COL_NADDR+1).
+
+%% Callbacks for cdv_virtual_list_wx
+col_to_elem(id) -> col_to_elem(?COL_MOD);
+col_to_elem(?COL_MOD) -> #fu.module;
+col_to_elem(?COL_UNIQ) -> #fu.uniq;
+col_to_elem(?COL_INDEX) -> #fu.index;
+col_to_elem(?COL_ADDR) -> #fu.address;
+col_to_elem(?COL_NADDR) -> #fu.native_address;
+col_to_elem(?COL_REFC) -> #fu.refc.
+
+col_spec() ->
+ [{"Module", ?wxLIST_FORMAT_LEFT, 200},
+ {"Uniq", ?wxLIST_FORMAT_RIGHT, 100},
+ {"Index", ?wxLIST_FORMAT_RIGHT, 50},
+ {"Address", ?wxLIST_FORMAT_LEFT, 120},
+ {"Native Address", ?wxLIST_FORMAT_LEFT, 120},
+ {"Refc", ?wxLIST_FORMAT_RIGHT, 50}].
+
+get_info(_) ->
+ {ok,Info,TW} = crashdump_viewer:funs(),
+ {Info,TW}.
+
+get_detail_cols(_) ->
+ {[?COL_MOD],false}.
diff --git a/lib/observer/src/cdv_gen_cb.erl b/lib/observer/src/cdv_gen_cb.erl
new file mode 100644
index 0000000000..6be717d76d
--- /dev/null
+++ b/lib/observer/src/cdv_gen_cb.erl
@@ -0,0 +1,45 @@
+%%
+%% %CopyrightBegin%
+%%
+%% Copyright Ericsson AB 2011-2013. 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(cdv_gen_cb).
+
+-export([get_info/0]).
+
+-include("crashdump_viewer.hrl").
+
+get_info() ->
+ {ok,Info,TW} = crashdump_viewer:general_info(),
+ Fields = info_fields(),
+ Proplist =
+ crashdump_viewer:to_proplist(record_info(fields,general_info),Info),
+ {Fields,Proplist,TW}.
+
+info_fields() ->
+ [{"General Information",
+ [{"Slogan",slogan},
+ {"Node name",node_name},
+ {"Crashdump created on",created},
+ {"System version",system_vsn},
+ {"Compiled",compile_time},
+ {"Taints",taints},
+ {"Memory allocated",{bytes,mem_tot}},
+ {"Memory maximum",{bytes,mem_max}},
+ {"Atoms",num_atoms},
+ {"Processes",num_procs},
+ {"ETS tables",num_ets},
+ {"Timers",num_timers},
+ {"Funs",num_fun}]}].
diff --git a/lib/observer/src/cdv_html_wx.erl b/lib/observer/src/cdv_html_wx.erl
new file mode 100644
index 0000000000..b79c647f63
--- /dev/null
+++ b/lib/observer/src/cdv_html_wx.erl
@@ -0,0 +1,136 @@
+%%
+%% %CopyrightBegin%
+%%
+%% Copyright Ericsson AB 2013-2014. 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(cdv_html_wx).
+
+-behaviour(wx_object).
+
+-export([start_link/2]).
+%% wx_object callbacks
+-export([init/1, handle_info/2, terminate/2, code_change/3, handle_call/3,
+ handle_event/2, handle_cast/2]).
+
+-include_lib("wx/include/wx.hrl").
+-include("observer_defs.hrl").
+
+%% Records
+-record(state,
+ {panel,
+ app, %% which tool is the user
+ expand_table,
+ expand_wins=[]}).
+
+start_link(ParentWin, Info) ->
+ wx_object:start_link(?MODULE, [ParentWin, Info], []).
+
+%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
+
+init([ParentWin, {App, Fun}]) when is_function(Fun) ->
+ init([ParentWin, {App, Fun()}]);
+init([ParentWin, {expand,HtmlText,Tab}]) ->
+ init(ParentWin, HtmlText, Tab, cdv);
+init([ParentWin, {App, {expand,HtmlText,Tab}}]) ->
+ init(ParentWin, HtmlText, Tab, App);
+init([ParentWin, {App,HtmlText}]) ->
+ init(ParentWin, HtmlText, undefined, App);
+init([ParentWin, HtmlText]) ->
+ init(ParentWin, HtmlText, undefined, cdv).
+
+init(ParentWin, HtmlText, Tab, App) ->
+ HtmlWin = observer_lib:html_window(ParentWin),
+ wxHtmlWindow:setPage(HtmlWin,HtmlText),
+ {HtmlWin, #state{panel=HtmlWin,expand_table=Tab,app=App}}.
+
+%%%%%%%%%%%%%%%%%%%%%%% Callbacks %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
+
+handle_info(active, State) ->
+ {noreply, State};
+
+handle_info(Info, State) ->
+ io:format("~p:~p: Unhandled info: ~p~n", [?MODULE, ?LINE, Info]),
+ {noreply, State}.
+
+terminate(_Reason, _State) ->
+ ok.
+
+code_change(_, _, State) ->
+ {ok, State}.
+
+handle_call(Msg, _From, State) ->
+ io:format("~p~p: Unhandled Call ~p~n",[?MODULE, ?LINE, Msg]),
+ {reply, ok, State}.
+
+handle_cast({detail_win_closed, Id},#state{expand_wins=Opened0}=State) ->
+ Opened = lists:keydelete(Id, 1, Opened0),
+ {noreply, State#state{expand_wins=Opened}};
+
+handle_cast(Msg, State) ->
+ io:format("~p~p: Unhandled cast ~p~n",[?MODULE, ?LINE, Msg]),
+ {noreply, State}.
+
+handle_event(#wx{event=#wxHtmlLink{type=command_html_link_clicked,
+ linkInfo=#wxHtmlLinkInfo{href=Target}}},
+ #state{expand_table=Tab, app=App}=State) ->
+ NewState=
+ case Target of
+ "#Binary?" ++ BinSpec ->
+ [{"offset",Off},{"size",Size},{"pos",Pos}] =
+ httpd:parse_query(BinSpec),
+ Id = {cdv, {list_to_integer(Off),
+ list_to_integer(Size),
+ list_to_integer(Pos)}},
+ expand(Id,cdv_bin_cb,State);
+ "#OBSBinary?" ++ BinSpec ->
+ [{"key1",Preview},{"key2",Size},{"key3",Hash}] =
+ httpd:parse_query(BinSpec),
+ Id = {obs, {Tab, {list_to_integer(Preview),
+ list_to_integer(Size),
+ list_to_integer(Hash)}}},
+ expand(Id,cdv_bin_cb,State);
+ "#Term?" ++ TermKeys ->
+ [{"key1",Key1},{"key2",Key2},{"key3",Key3}] =
+ httpd:parse_query(TermKeys),
+ Id = {cdv, {Tab,{list_to_integer(Key1),
+ list_to_integer(Key2),
+ list_to_integer(Key3)}}},
+ expand(Id,cdv_term_cb,State);
+ _ when App =:= obs ->
+ observer ! {open_link, Target};
+ _ ->
+ cdv_virtual_list_wx:start_detail_win(Target),
+ State
+ end,
+ {noreply, NewState};
+
+handle_event(Event, State) ->
+ io:format("~p:~p: Unhandled event ~p\n", [?MODULE,?LINE,Event]),
+ {noreply, State}.
+
+%%%-----------------------------------------------------------------
+%%% Internal
+expand(Id,Callback,#state{expand_wins=Opened0}=State) ->
+ Opened =
+ case lists:keyfind(Id,1,Opened0) of
+ false ->
+ EW = cdv_detail_wx:start_link(Id,State#state.panel,Callback),
+ wx_object:get_pid(EW) ! active,
+ [{Id,EW}|Opened0];
+ {_,EW} ->
+ wxFrame:raise(EW),
+ Opened0
+ end,
+ State#state{expand_wins=Opened}.
diff --git a/lib/observer/src/cdv_info_wx.erl b/lib/observer/src/cdv_info_wx.erl
new file mode 100644
index 0000000000..59ce0cabb1
--- /dev/null
+++ b/lib/observer/src/cdv_info_wx.erl
@@ -0,0 +1,128 @@
+%%
+%% %CopyrightBegin%
+%%
+%% Copyright Ericsson AB 2011-2013. 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(cdv_info_wx).
+
+-behaviour(wx_object).
+
+-export([start_link/2]).
+%% wx_object callbacks
+-export([init/1, handle_info/2, terminate/2, code_change/3, handle_call/3,
+ handle_event/2, handle_cast/2]).
+
+-include_lib("wx/include/wx.hrl").
+-include("observer_defs.hrl").
+
+%% Records
+-record(state,
+ {panel,
+ sizer,
+ fpanel,
+ callback,
+ trunc_warn=[]
+ }).
+
+start_link(ParentWin, Info) ->
+ wx_object:start_link(?MODULE, [ParentWin, Info], []).
+
+%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
+
+init([ParentWin, Callback]) when is_atom(Callback) ->
+ {InfoFields,Info,TW} = Callback:get_info(),
+ {Panel,Sizer,FPanel} = create_box(ParentWin,InfoFields,Info),
+ {Panel,#state{panel=Panel,
+ sizer=Sizer,
+ fpanel=FPanel,
+ callback=Callback,
+ trunc_warn=TW}};
+
+init([ParentWin, {InfoFields,Info,TW}]) ->
+ {Panel,Sizer,FPanel} = create_box(ParentWin,InfoFields,Info),
+ {Panel, #state{panel=Panel,
+ sizer=Sizer,
+ fpanel=FPanel,
+ trunc_warn=TW}}.
+
+%%%%%%%%%%%%%%%%%%%%%%% Callbacks %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
+
+handle_info(active, State) ->
+ cdv_wx:set_status(State#state.trunc_warn),
+ {noreply, State};
+
+handle_info(Info, State) ->
+ io:format("~p:~p: Unhandled info: ~p~n", [?MODULE, ?LINE, Info]),
+ {noreply, State}.
+
+terminate(_Reason, _State) ->
+ ok.
+
+code_change(_, _, State) ->
+ {ok, State}.
+
+handle_call(new_dump, _From, #state{callback=Callback,panel=Panel,
+ sizer=Sizer,fpanel=FPanel} = State) ->
+ {InfoFields,Info,TW} = Callback:get_info(),
+ NewFPanel =
+ wx:batch(
+ fun() ->
+ wxWindow:destroy(FPanel),
+ FP = create_field_panel(Panel,Sizer,InfoFields,Info),
+ wxSizer:layout(Sizer),
+ FP
+ end),
+ {reply, ok, State#state{fpanel=NewFPanel,trunc_warn=TW}};
+
+handle_call(Msg, _From, State) ->
+ io:format("~p~p: Unhandled Call ~p~n",[?MODULE, ?LINE, Msg]),
+ {reply, ok, State}.
+
+handle_cast(Msg, State) ->
+ io:format("~p~p: Unhandled cast ~p~n",[?MODULE, ?LINE, Msg]),
+ {noreply, State}.
+
+handle_event(#wx{event=#wxMouse{type=left_down},userData=Target}, State) ->
+ cdv_virtual_list_wx:start_detail_win(Target),
+ {noreply, State};
+
+handle_event(#wx{obj=Obj,event=#wxMouse{type=enter_window}},State) ->
+ wxTextCtrl:setForegroundColour(Obj,{0,0,100,255}),
+ {noreply, State};
+
+handle_event(#wx{obj=Obj,event=#wxMouse{type=leave_window}},State) ->
+ wxTextCtrl:setForegroundColour(Obj,?wxBLUE),
+ {noreply, State};
+
+handle_event(Event, State) ->
+ io:format("~p:~p: Unhandled event ~p\n", [?MODULE,?LINE,Event]),
+ {noreply, State}.
+
+%%%-----------------------------------------------------------------
+%%% Internal
+create_box(ParentWin,InfoFields,Info) ->
+ Panel = wxPanel:new(ParentWin),
+ Sizer = wxBoxSizer:new(?wxVERTICAL),
+ FPanel = create_field_panel(Panel,Sizer,InfoFields,Info),
+ wxPanel:setSizer(Panel, Sizer),
+ {Panel,Sizer,FPanel}.
+
+create_field_panel(Panel,Sizer,InfoFields,Info0) ->
+ Info = observer_lib:fill_info(InfoFields, Info0),
+ {FPanel, _FSizer, _Fields} = observer_lib:display_info(Panel,Info),
+ BorderFlags = ?wxLEFT bor ?wxRIGHT,
+ wxSizer:add(Sizer, FPanel, [{flag, ?wxEXPAND bor BorderFlags bor ?wxTOP},
+ {proportion, 0}, {border, 5}]),
+ FPanel.
diff --git a/lib/observer/src/cdv_int_tab_cb.erl b/lib/observer/src/cdv_int_tab_cb.erl
new file mode 100644
index 0000000000..31727391fe
--- /dev/null
+++ b/lib/observer/src/cdv_int_tab_cb.erl
@@ -0,0 +1,86 @@
+%%
+%% %CopyrightBegin%
+%%
+%% Copyright Ericsson AB 2011-2013. 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(cdv_int_tab_cb).
+
+-export([get_info/0]).
+
+-include_lib("wx/include/wx.hrl").
+-include("crashdump_viewer.hrl").
+
+get_info() ->
+ observer_lib:report_progress({ok,"Processing internal tables"}),
+ HashInfo = get_hash_info(),
+ observer_lib:report_progress({ok,33}),
+ IndexInfo = get_index_info(),
+ observer_lib:report_progress({ok,66}),
+ IntEtsInfo = get_internal_ets_info(),
+ observer_lib:report_progress({ok,100}),
+ [{"Hash Tables",cdv_table_wx,HashInfo},
+ {"Index Tables",cdv_table_wx,IndexInfo},
+ {"Internal ETS Tables",cdv_table_wx,IntEtsInfo}].
+
+%%%-----------------------------------------------------------------
+%%% Hash tables
+get_hash_info() ->
+ {ok,Info0,TW} = crashdump_viewer:hash_tables(),
+ Columns = hash_columns(),
+ Info = [crashdump_viewer:to_value_list(R) || R <- Info0],
+ {Columns,Info,TW}.
+
+hash_columns() ->
+ [{"Name", ?wxLIST_FORMAT_LEFT, 150},
+ {"Size", ?wxLIST_FORMAT_RIGHT, 100},
+ {"Used", ?wxLIST_FORMAT_RIGHT, 100},
+ {"Objects",?wxLIST_FORMAT_RIGHT, 100},
+ {"Depth", ?wxLIST_FORMAT_RIGHT, 100}].
+
+%%%-----------------------------------------------------------------
+%%% Index tables
+get_index_info() ->
+ {ok,Info0,TW} = crashdump_viewer:index_tables(),
+ Columns = index_columns(),
+ Info = [crashdump_viewer:to_value_list(R) || R <- Info0],
+ {Columns,Info,TW}.
+
+index_columns() ->
+ [{"Name", ?wxLIST_FORMAT_LEFT, 150},
+ {"Size", ?wxLIST_FORMAT_RIGHT, 100},
+ {"Limit", ?wxLIST_FORMAT_RIGHT, 100},
+ {"Used", ?wxLIST_FORMAT_RIGHT, 100},
+ {"Rate", ?wxLIST_FORMAT_RIGHT, 100},
+ {"Entries",?wxLIST_FORMAT_RIGHT, 100}].
+
+%%%-----------------------------------------------------------------
+%%% Internal ets tables
+get_internal_ets_info() ->
+ {ok,Info0,TW} = crashdump_viewer:internal_ets_tables(),
+ Columns = int_ets_columns(),
+ Info = [begin
+ [_,_|Data] = crashdump_viewer:to_value_list(R), %skip pid and slot
+ [Desc|Data]
+ end || {Desc,R} <- Info0],
+ {Columns,Info,TW}.
+
+int_ets_columns() ->
+ [{"Description", ?wxLIST_FORMAT_LEFT, 170},
+ {"Id", ?wxLIST_FORMAT_LEFT, 80},
+ {"Name", ?wxLIST_FORMAT_LEFT, 80},
+ {"Type", ?wxLIST_FORMAT_LEFT, 80},
+ {"Buckets", ?wxLIST_FORMAT_RIGHT, 80},
+ {"Objects", ?wxLIST_FORMAT_RIGHT, 80},
+ {"Memory", ?wxLIST_FORMAT_RIGHT, 80}].
diff --git a/lib/observer/src/cdv_mem_cb.erl b/lib/observer/src/cdv_mem_cb.erl
new file mode 100644
index 0000000000..2b0809df13
--- /dev/null
+++ b/lib/observer/src/cdv_mem_cb.erl
@@ -0,0 +1,84 @@
+%%
+%% %CopyrightBegin%
+%%
+%% Copyright Ericsson AB 2011-2013. 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(cdv_mem_cb).
+
+-export([get_info/0]).
+
+-include("crashdump_viewer.hrl").
+-include_lib("wx/include/wx.hrl").
+
+get_info() ->
+ observer_lib:report_progress({ok,"Processing memory info"}),
+ MemInfo = get_mem_info(),
+ observer_lib:report_progress({ok,33}),
+ {AllocInfo,AllocTW} = get_alloc_info(),
+ observer_lib:report_progress({ok,66}),
+ AreaInfo = get_area_info(),
+ observer_lib:report_progress({ok,100}),
+ [{"Memory",cdv_info_wx,MemInfo}
+ | [{Title,cdv_table_wx,{Cols,Data,AllocTW}} ||
+ {Title,Cols,Data} <- AllocInfo]] ++
+ [{"Allocated Areas",cdv_table_wx,AreaInfo}].
+
+
+%%%-----------------------------------------------------------------
+%%% Memory page
+get_mem_info() ->
+ {ok,Info,TW} = crashdump_viewer:memory(),
+ {[{"Memory Information",gen_mem_info_fields(Info)}],Info,TW}.
+
+gen_mem_info_fields([{Key,_}|T]) ->
+ [{upper(atom_to_list(Key)),{bytes,Key}}|gen_mem_info_fields(T)];
+gen_mem_info_fields([]) ->
+ [].
+
+upper(Key) ->
+ string:join([string:to_upper([H]) ++ T ||
+ [H|T] <- string:tokens(Key,"_")]," ").
+
+
+%%%-----------------------------------------------------------------
+%%% Allocated areas page
+get_area_info() ->
+ {ok,Info0,TW} = crashdump_viewer:allocated_areas(),
+ Info = [tuple_to_list(R) || R <- Info0],
+ {area_columns(),Info,TW}.
+
+area_columns() ->
+ [{"", ?wxLIST_FORMAT_LEFT, 150},
+ {"Allocated (bytes)",?wxLIST_FORMAT_RIGHT, 150},
+ {"Used (bytes)", ?wxLIST_FORMAT_RIGHT, 150}].
+
+%%%-----------------------------------------------------------------
+%%% Allocator page
+get_alloc_info() ->
+ {ok,Info,TW} = crashdump_viewer:allocator_info(),
+ {fix_alloc(Info),TW}.
+
+fix_alloc([{Title,Columns,Data}|Tables]) ->
+ [{Title,alloc_columns(Columns),
+ [[Key|Values] || {Key,Values} <- Data]} |
+ fix_alloc(Tables)];
+fix_alloc([{Title,[{_,V}|_]=Data}|Tables]) ->
+ fix_alloc([{Title,lists:duplicate(length(V),[]),Data}|Tables]);
+fix_alloc([]) ->
+ [].
+
+alloc_columns(Columns) ->
+ [{"", ?wxLIST_FORMAT_LEFT, 180} |
+ [{Column, ?wxLIST_FORMAT_RIGHT, 140} || Column <- Columns]].
diff --git a/lib/observer/src/cdv_mod_cb.erl b/lib/observer/src/cdv_mod_cb.erl
new file mode 100644
index 0000000000..e829ff4fca
--- /dev/null
+++ b/lib/observer/src/cdv_mod_cb.erl
@@ -0,0 +1,102 @@
+%%
+%% %CopyrightBegin%
+%%
+%% Copyright Ericsson AB 2013. 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(cdv_mod_cb).
+
+-export([col_to_elem/1,
+ col_spec/0,
+ get_info/1,
+ get_detail_cols/1,
+ get_details/1,
+ detail_pages/0,
+ format/1]).
+
+-include_lib("wx/include/wx.hrl").
+-include("crashdump_viewer.hrl").
+
+%% Defines
+-define(COL_ID, 0).
+-define(COL_CUR, ?COL_ID+1).
+-define(COL_OLD, ?COL_CUR+1).
+
+%% Callbacks for cdv_virtual_list_wx
+col_to_elem(id) -> col_to_elem(?COL_ID);
+col_to_elem(?COL_ID) -> #loaded_mod.mod;
+col_to_elem(?COL_CUR) -> #loaded_mod.current_size;
+col_to_elem(?COL_OLD) -> #loaded_mod.old_size.
+
+col_spec() ->
+ [{"Module", ?wxLIST_FORMAT_LEFT, 300},
+ {"Current size", ?wxLIST_FORMAT_RIGHT, 80},
+ {"Old size", ?wxLIST_FORMAT_RIGHT, 80}].
+
+get_info(_) ->
+ {ok,Info,TW} = crashdump_viewer:loaded_modules(),
+ {Info,TW}.
+
+get_detail_cols(_) ->
+ {[?COL_ID],true}.
+
+%% Callbacks for cdv_detail_wx
+get_details(Id) ->
+ {ok,Info,TW} = crashdump_viewer:loaded_mod_details(Id),
+ Proplist = crashdump_viewer:to_proplist(record_info(fields,loaded_mod),Info),
+ Title = io_lib:format("~s",[Info#loaded_mod.mod]),
+ {ok,{Title,Proplist,TW}}.
+
+detail_pages() ->
+ [{"General Information", fun init_gen_page/2},
+ {"Current Attributes", fun init_curr_attr_page/2},
+ {"Current Compilation Info", fun init_curr_comp_page/2},
+ {"Old Attributes", fun init_old_attr_page/2},
+ {"Old Compilation Info", fun init_old_comp_page/2}].
+
+init_gen_page(Parent, Info) ->
+ Fields = info_fields(),
+ cdv_info_wx:start_link(Parent,{Fields,Info,[]}).
+
+init_curr_attr_page(Parent, Info) ->
+ init_info_page(Parent, proplists:get_value(current_attrib,Info)).
+
+init_curr_comp_page(Parent, Info) ->
+ init_info_page(Parent, proplists:get_value(current_comp_info,Info)).
+
+init_old_attr_page(Parent, Info) ->
+ init_info_page(Parent, proplists:get_value(old_attrib,Info)).
+
+init_old_comp_page(Parent, Info) ->
+ init_info_page(Parent, proplists:get_value(old_comp_info,Info)).
+
+init_info_page(Parent, undefined) ->
+ init_info_page(Parent, "");
+init_info_page(Parent, String) ->
+ cdv_html_wx:start_link(Parent,observer_html_lib:plain_page(String)).
+
+format({Bin,q}) when is_binary(Bin) ->
+ [$'|binary_to_list(Bin)];
+format({Bin,nq}) when is_binary(Bin) ->
+ lists:flatten(io_lib:format("~ts",[Bin]));
+format(D) ->
+ D.
+
+%%%-----------------------------------------------------------------
+%%% Internal
+info_fields() ->
+ [{"Overview",
+ [{"Name", mod},
+ {"Current Size", current_size},
+ {"Old Size", old_size}]}].
diff --git a/lib/observer/src/cdv_multi_wx.erl b/lib/observer/src/cdv_multi_wx.erl
new file mode 100644
index 0000000000..75c7f48fc2
--- /dev/null
+++ b/lib/observer/src/cdv_multi_wx.erl
@@ -0,0 +1,188 @@
+%%
+%% %CopyrightBegin%
+%%
+%% Copyright Ericsson AB 2011-2013. 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(cdv_multi_wx).
+
+-behaviour(wx_object).
+
+-export([start_link/2]).
+%% wx_object callbacks
+-export([init/1, handle_info/2, terminate/2, code_change/3, handle_call/3,
+ handle_event/2, handle_cast/2]).
+
+-include_lib("wx/include/wx.hrl").
+-include("observer_defs.hrl").
+
+%% Records
+-record(state,
+ {main_panel,
+ main_sizer,
+ menu,
+ menu_sizer,
+ callback,
+ pages,
+ dyn_panel,
+ dyn_sizer,
+ dyn_page
+ }).
+
+start_link(Notebook, Info) ->
+ wx_object:start_link(?MODULE, [Notebook, Info], []).
+
+%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
+
+init([Notebook, Callback]) when is_atom(Callback) ->
+ Pages = Callback:get_info(),
+ {MainPanel,State0} = init([Notebook, Pages]),
+ {MainPanel,State0#state{callback=Callback}};
+init([Notebook, Pages]) ->
+ MainPanel = wxPanel:new(Notebook),
+ Sizer = wxBoxSizer:new(?wxHORIZONTAL),
+ LeftMenuSizer = wxStaticBoxSizer:new(?wxVERTICAL,MainPanel,
+ [{label,"Please select"}]),
+ LeftMenu = wxListBox:new(MainPanel,?wxID_ANY,
+ [{style,?wxLB_SINGLE},
+ {choices,[T || {T,_,_} <- Pages]}]),
+ wxListBox:setSelection(LeftMenu,0),
+ wxListBox:connect(LeftMenu, command_listbox_selected),
+ wxSizer:add(LeftMenuSizer,LeftMenu,[{flag,?wxEXPAND},{proportion,2}]),
+
+ DynPanel = wxScrolledWindow:new(MainPanel),
+ wxScrolledWindow:enableScrolling(DynPanel,true,true),
+ wxScrolledWindow:setScrollbars(DynPanel,1,1,0,0),
+
+ BorderFlags = ?wxLEFT bor ?wxRIGHT,
+ wxSizer:add(Sizer, LeftMenuSizer,
+ [{flag, ?wxEXPAND bor BorderFlags bor ?wxTOP},
+ {proportion, 0}, {border, 5}]),
+ wxSizer:add(Sizer, DynPanel, [{flag, ?wxEXPAND bor BorderFlags bor ?wxTOP},
+ {proportion, 1}, {border, 5}]),
+ wxPanel:setSizer(MainPanel, Sizer),
+
+ State = load_dyn_page(#state{main_panel=MainPanel,
+ main_sizer=Sizer,
+ menu=LeftMenu,
+ menu_sizer=LeftMenuSizer,
+ pages=Pages,
+ dyn_panel=DynPanel
+ }),
+ {MainPanel, State}.
+
+%%%%%%%%%%%%%%%%%%%%%%% Callbacks %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
+
+handle_info(active, State) ->
+ NewState =
+ wx:batch(
+ fun() ->
+ update_dyn_page(State)
+ end),
+ {noreply, NewState};
+
+handle_info(Info, State) ->
+ io:format("~p:~p: Unhandled info: ~p~n", [?MODULE, ?LINE, Info]),
+ {noreply, State}.
+
+terminate(_Reason, _State) ->
+ ok.
+
+code_change(_, _, State) ->
+ {ok, State}.
+
+handle_call(new_dump, _From, State) ->
+ NewState =
+ wx:batch(
+ fun() ->
+ update_left_menu(State)
+ end),
+ {reply, ok, NewState};
+
+handle_call(Msg, _From, State) ->
+ io:format("~p:~p: Unhandled Call ~p~n",[?MODULE, ?LINE, Msg]),
+ {reply, ok, State}.
+
+handle_cast(Msg, State) ->
+ io:format("~p:~p: Unhandled cast ~p~n",[?MODULE, ?LINE, Msg]),
+ {noreply, State}.
+
+handle_event(#wx{event=#wxCommand{type=command_listbox_selected,
+ cmdString=[]}},
+ State) ->
+ %% For some reason, the listbox sometimes gets an "unselect"
+ %% command like this during termination. Ignore!
+ {noreply, State};
+
+handle_event(#wx{event=#wxCommand{type=command_listbox_selected,
+ cmdString=_DynName}},
+ State) ->
+ NewState =
+ wx:batch(fun() ->
+ update_dyn_page(State)
+ end),
+ {noreply,NewState};
+
+handle_event(Event, State) ->
+ io:format("~p:~p: Unhandled event ~p\n", [?MODULE,?LINE,Event]),
+ {noreply, State}.
+
+%%%%%%%%%%%%%%%%%%%%%%% Internal %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
+update_left_menu(#state{main_panel=Panel,
+ callback=Callback,
+ menu=OldMenu,
+ menu_sizer=MenuSizer} = State) ->
+ Pages = Callback:get_info(),
+ wxListBox:disconnect(OldMenu),
+ wxWindow:destroy(OldMenu),
+ NewMenu = wxListBox:new(Panel,?wxID_ANY,
+ [{style,?wxLB_SINGLE},
+ {choices,[T || {T,_,_} <- Pages]}]),
+ wxListBox:setSelection(NewMenu,0),
+ wxListBox:connect(NewMenu, command_listbox_selected),
+ wxSizer:add(MenuSizer,NewMenu,[{flag,?wxEXPAND},{proportion,2}]),
+ wxSizer:layout(MenuSizer),
+ State#state{pages=Pages,menu=NewMenu}.
+
+update_dyn_page(#state{dyn_page=undefined} = State) ->
+ load_dyn_page(State);
+update_dyn_page(#state{dyn_page=OldDynPage,
+ dyn_sizer=OldDynSizer} = State) ->
+ wxSizer:detach(OldDynSizer,OldDynPage),
+ wxWindow:destroy(OldDynPage),
+ load_dyn_page(State).
+
+load_dyn_page(#state{main_sizer=MainSizer,
+ dyn_panel=DynPanel,
+ menu=Menu,
+ pages=Pages} = State) ->
+ %% Freeze and thaw causes a hang (and is not needed) on 2.9 and higher
+ DoFreeze = [?wxMAJOR_VERSION,?wxMINOR_VERSION] < [2,9],
+ DoFreeze andalso wxWindow:freeze(DynPanel),
+ Name = wxListBox:getStringSelection(Menu),
+ {Page,Sizer} = load_dyn_page(DynPanel,Name,Pages),
+ wxSizer:layout(MainSizer),
+ DoFreeze andalso wxWindow:thaw(DynPanel),
+ wx_object:get_pid(Page) ! active,
+ State#state{dyn_page=Page,dyn_sizer=Sizer}.
+
+load_dyn_page(Panel,Name,Pages) ->
+ Sizer = wxStaticBoxSizer:new(?wxVERTICAL, Panel, [{label,Name}]),
+
+ {_,Callback,Info} = lists:keyfind(Name,1,Pages),
+ DynPage = Callback:start_link(Panel,Info),
+
+ wxSizer:add(Sizer,DynPage,[{flag, ?wxEXPAND}, {proportion, 1}]),
+ wxPanel:setSizerAndFit(Panel,Sizer,[{deleteOld,true}]),
+ {DynPage,Sizer}.
diff --git a/lib/observer/src/cdv_port_cb.erl b/lib/observer/src/cdv_port_cb.erl
new file mode 100644
index 0000000000..08488d3e34
--- /dev/null
+++ b/lib/observer/src/cdv_port_cb.erl
@@ -0,0 +1,103 @@
+%%
+%% %CopyrightBegin%
+%%
+%% Copyright Ericsson AB 2013. 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(cdv_port_cb).
+
+-export([col_to_elem/1,
+ col_spec/0,
+ get_info/1,
+ get_detail_cols/1,
+ get_details/1,
+ detail_pages/0,
+ format/1]).
+
+-include_lib("wx/include/wx.hrl").
+-include("crashdump_viewer.hrl").
+
+%% Columns
+-define(COL_ID, 0).
+-define(COL_CONN, ?COL_ID+1).
+-define(COL_NAME, ?COL_CONN+1).
+-define(COL_CTRL, ?COL_NAME+1).
+-define(COL_SLOT, ?COL_CTRL+1).
+
+
+
+%% Callbacks for cdv_virtual_list_wx
+col_to_elem(id) -> col_to_elem(?COL_ID);
+col_to_elem(?COL_ID) -> #port.id;
+col_to_elem(?COL_CONN) -> #port.connected;
+col_to_elem(?COL_NAME) -> #port.name;
+col_to_elem(?COL_CTRL) -> #port.controls;
+col_to_elem(?COL_SLOT) -> #port.slot.
+
+col_spec() ->
+ [{"Id", ?wxLIST_FORMAT_LEFT, 100},
+ {"Connected", ?wxLIST_FORMAT_LEFT, 120},
+ {"Name", ?wxLIST_FORMAT_LEFT, 150},
+ {"Controls", ?wxLIST_FORMAT_LEFT, 200},
+ {"Slot", ?wxLIST_FORMAT_RIGHT, 50}].
+
+get_info(_) ->
+ {ok,Info,TW} = crashdump_viewer:ports(),
+ {Info,TW}.
+
+get_detail_cols(_) ->
+ {[?COL_ID,?COL_CONN],true}.
+
+%% Callbacks for cdv_detail_wx
+get_details(Id) ->
+ case crashdump_viewer:port(Id) of
+ {ok,Info,TW} ->
+ Proplist =
+ crashdump_viewer:to_proplist(record_info(fields,port),Info),
+ {ok,{Id,Proplist,TW}};
+ {error,{other_node,NodeId}} ->
+ Info = "The port you are searching for was residing on "
+ "a remote node. No port information is available. "
+ "Show information about the remote node?",
+ Fun = fun() -> cdv_virtual_list_wx:start_detail_win(NodeId) end,
+ {yes_no, Info, Fun};
+ {error,not_found} ->
+ Info = "The port you are searching for could not be found.",
+ {info,Info}
+ end.
+
+detail_pages() ->
+ [{"General Information", fun init_gen_page/2}].
+
+init_gen_page(Parent, Info) ->
+ Fields = info_fields(),
+ cdv_info_wx:start_link(Parent,{Fields,Info,[]}).
+
+format({I1,I2}) ->
+ "#Port<"++integer_to_list(I1) ++ "." ++ integer_to_list(I2) ++ ">";
+format(D) ->
+ D.
+
+
+%%%-----------------------------------------------------------------
+%%% Internal
+info_fields() ->
+ [{"Overview",
+ [{"Name", name},
+ {"Connected", {click,connected}},
+ {"Slot", slot},
+ {"Controls", controls}]},
+ {scroll_boxes,
+ [{"Links",1,{click,links}},
+ {"Monitors",1,{click,monitors}}]}].
diff --git a/lib/observer/src/cdv_proc_cb.erl b/lib/observer/src/cdv_proc_cb.erl
new file mode 100644
index 0000000000..dfc2df9c4c
--- /dev/null
+++ b/lib/observer/src/cdv_proc_cb.erl
@@ -0,0 +1,156 @@
+%%
+%% %CopyrightBegin%
+%%
+%% Copyright Ericsson AB 2013. 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(cdv_proc_cb).
+
+-export([col_to_elem/1,
+ col_spec/0,
+ get_info/1,
+ get_detail_cols/1,
+ get_details/1,
+ detail_pages/0]).
+
+-include_lib("wx/include/wx.hrl").
+-include("crashdump_viewer.hrl").
+
+%% Columns
+-define(COL_ID, 0).
+-define(COL_NAME, ?COL_ID+1).
+-define(COL_STATE,?COL_NAME+1).
+-define(COL_REDS, ?COL_STATE+1).
+-define(COL_MEM, ?COL_REDS+1).
+-define(COL_MSG, ?COL_MEM+1).
+
+%% Callbacks for cdv_virtual_list_wx
+col_to_elem(id) -> col_to_elem(?COL_ID);
+col_to_elem(?COL_ID) -> #proc.pid;
+col_to_elem(?COL_NAME) -> #proc.name;
+col_to_elem(?COL_STATE) -> #proc.state;
+col_to_elem(?COL_MEM) -> #proc.memory;
+col_to_elem(?COL_REDS) -> #proc.reds;
+col_to_elem(?COL_MSG) -> #proc.msg_q_len.
+
+col_spec() ->
+ [{"Pid", ?wxLIST_FORMAT_CENTRE, 120},
+ {"Name or Initial Func", ?wxLIST_FORMAT_LEFT, 250},
+ {"State", ?wxLIST_FORMAT_LEFT, 100},
+ {"Reds", ?wxLIST_FORMAT_RIGHT, 80},
+ {"Memory", ?wxLIST_FORMAT_RIGHT, 80},
+ {"MsgQ", ?wxLIST_FORMAT_RIGHT, 50}].
+
+get_info(_) ->
+ {ok,Info,TW} = crashdump_viewer:processes(),
+ {Info,TW}.
+
+get_detail_cols(_) ->
+ {[?COL_ID],true}.
+
+%% Callbacks for cdv_detail_wx
+get_details(Id) ->
+ case crashdump_viewer:proc_details(Id) of
+ {ok,Info,TW} ->
+ %% The following table is used by observer_html_lib
+ %% for storing expanded terms and it is read by
+ %% cdv_html_wx when a link to an expandable term is clicked.
+ Tab = ets:new(cdv_expand,[set,public]),
+ Proplist0 =
+ crashdump_viewer:to_proplist(record_info(fields,proc),Info),
+ Proplist = [{expand_table,Tab}|Proplist0],
+ Title = io_lib:format("~s (~s)",[Info#proc.name, Id]),
+ {ok,{Title,Proplist,TW}};
+ {error,{other_node,NodeId}} ->
+ Info = "The process you are searching for was residing on "
+ "a remote node. No process information is available. "
+ "Show information about the remote node?",
+ Fun = fun() -> cdv_virtual_list_wx:start_detail_win(NodeId) end,
+ {yes_no, Info, Fun};
+ {error,not_found} ->
+ Info = "The process you are searching for could not be found.",
+ {info,Info}
+ end.
+
+detail_pages() ->
+ [{"General Information", fun init_gen_page/2},
+ {"Messages", fun init_message_page/2},
+ {"Dictionary", fun init_dict_page/2},
+ {"Stack Dump", fun init_stack_page/2},
+ {"ETS tables", fun init_ets_page/2},
+ {"Timers", fun init_timer_page/2}].
+
+init_gen_page(Parent, Info) ->
+ Fields = info_fields(),
+ cdv_info_wx:start_link(Parent,{Fields,Info,[]}).
+
+init_message_page(Parent, Info) ->
+ init_memory_page(Parent, Info, msg_q, "MsgQueue").
+
+init_dict_page(Parent, Info) ->
+ init_memory_page(Parent, Info, dict, "Dictionary").
+
+init_stack_page(Parent, Info) ->
+ init_memory_page(Parent, Info, stack_dump, "StackDump").
+
+init_memory_page(Parent, Info0, Tag, Heading) ->
+ Info = proplists:get_value(Tag,Info0),
+ Tab = proplists:get_value(expand_table,Info0),
+ Html = observer_html_lib:expandable_term(Heading,Info,Tab),
+ cdv_html_wx:start_link(Parent,{expand,Html,Tab}).
+
+init_ets_page(Parent, Info) ->
+ Pid = proplists:get_value(pid,Info),
+ cdv_virtual_list_wx:start_link(Parent, cdv_ets_cb, Pid).
+
+init_timer_page(Parent, Info) ->
+ Pid = proplists:get_value(pid,Info),
+ cdv_virtual_list_wx:start_link(Parent, cdv_timer_cb, Pid).
+
+%%%-----------------------------------------------------------------
+%%% Internal
+info_fields() ->
+ [{"Overview",
+ [{"Initial Call", init_func},
+ {dynamic, current_func},
+ {"Registered Name", name},
+ {"Status", state},
+ {"Started", start_time},
+ {"Parent", {click,parent}},
+ {"Message Queue Len",msg_q_len},
+ {"Reductions", reds},
+ {"Program counter", prog_count},
+ {"Continuation pointer",cp},
+ {"Arity",arity}]},
+ {scroll_boxes,
+ [{"Last Calls",1,{plain,last_calls}}]},
+ {scroll_boxes,
+ [{"Links",1,{click,links}},
+ {"Monitors",2,{click,monitors}},
+ {"Monitored By",2,{click,mon_by}}]},
+ {"Memory and Garbage Collection",
+ [{"Memory", memory},
+ {"Stack and Heap", stack_heap},
+ {"Old Heap", old_heap},
+ {"Heap Unused", heap_unused},
+ {"Old Heap Unused", old_heap_unused},
+ {"Number of Heap Fragements", num_heap_frag},
+ {"Heap Fragment Data",heap_frag_data},
+ {"New Heap Start", new_heap_start},
+ {"New Heap Top", new_heap_top},
+ {"Stack Top", stack_top},
+ {"Stack End", stack_end},
+ {"Old Heap Start", old_heap_start},
+ {"Old Heap Top", old_heap_top},
+ {"Old Heap End", old_heap_end}]}].
diff --git a/lib/observer/src/cdv_table_wx.erl b/lib/observer/src/cdv_table_wx.erl
new file mode 100644
index 0000000000..f8943db17d
--- /dev/null
+++ b/lib/observer/src/cdv_table_wx.erl
@@ -0,0 +1,106 @@
+%%
+%% %CopyrightBegin%
+%%
+%% Copyright Ericsson AB 2011-2013. 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(cdv_table_wx).
+
+-behaviour(wx_object).
+
+-export([start_link/2]).
+%% wx_object callbacks
+-export([init/1, handle_info/2, terminate/2, code_change/3, handle_call/3,
+ handle_event/2, handle_cast/2]).
+
+-include_lib("wx/include/wx.hrl").
+-include("observer_defs.hrl").
+
+%% Records
+-record(state,
+ {trunc_warn=[]}).
+
+start_link(ParentWin, Info) ->
+ wx_object:start_link(?MODULE, [ParentWin, Info], []).
+
+%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
+
+init([ParentWin, Callback]) when is_atom(Callback) ->
+ {ok,TableInfo} = Callback:get_info(),
+ init([ParentWin, TableInfo]);
+
+init([ParentWin, {ColumnSpec,Info,TW}]) ->
+ Style0 = ?wxLC_REPORT bor ?wxLC_SINGLE_SEL bor ?wxLC_HRULES bor ?wxLC_VRULES,
+ Style =
+ case lists:all(fun({"",_,_}) -> true; (_) -> false end, ColumnSpec) of
+ true -> Style0 bor ?wxLC_NO_HEADER;
+ false -> Style0
+ end,
+ Grid = wxListCtrl:new(ParentWin, [{style, Style}]),
+ Li = wxListItem:new(),
+ AddListEntry = fun({Name, Align, DefSize}, Col) ->
+ wxListItem:setText(Li, Name),
+ wxListItem:setAlign(Li, Align),
+ wxListCtrl:insertColumn(Grid, Col, Li),
+ wxListCtrl:setColumnWidth(Grid, Col, DefSize),
+ Col + 1
+ end,
+ lists:foldl(AddListEntry, 0, ColumnSpec),
+ wxListItem:destroy(Li),
+ Insert = fun(RowData, Row) ->
+ wxListCtrl:insertItem(Grid, Row, ""),
+ set_items(Grid,Row,RowData,0),
+ Row + 1
+ end,
+ lists:foldl(Insert, 0, Info),
+ {Grid, #state{trunc_warn=TW}}.
+
+%%%%%%%%%%%%%%%%%%%%%%% Callbacks %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
+
+handle_info(active, State) ->
+ cdv_wx:set_status(State#state.trunc_warn),
+ {noreply, State};
+
+handle_info(Info, State) ->
+ io:format("~p:~p: Unhandled info: ~p~n", [?MODULE, ?LINE, Info]),
+ {noreply, State}.
+
+terminate(_Reason, _State) ->
+ ok.
+
+code_change(_, _, State) ->
+ {ok, State}.
+
+handle_call(Msg, _From, State) ->
+ io:format("~p~p: Unhandled Call ~p~n",[?MODULE, ?LINE, Msg]),
+ {reply, ok, State}.
+
+handle_cast(Msg, State) ->
+ io:format("~p~p: Unhandled cast ~p~n",[?MODULE, ?LINE, Msg]),
+ {noreply, State}.
+
+handle_event(Event, State) ->
+ io:format("~p:~p: Unhandled event ~p\n", [?MODULE,?LINE,Event]),
+ {noreply, State}.
+
+%%%%%%%%%%%%%%%%%%%%%%% Internal %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
+set_items(Grid,Row,[Col|Cols],ColN) ->
+ Str = case Col of
+ undefined -> "";
+ _ -> observer_lib:to_str(Col)
+ end,
+ wxListCtrl:setItem(Grid, Row, ColN, Str),
+ set_items(Grid,Row,Cols,ColN+1);
+set_items(_,_,[],_) ->
+ ok.
diff --git a/lib/observer/src/cdv_term_cb.erl b/lib/observer/src/cdv_term_cb.erl
new file mode 100644
index 0000000000..4451045012
--- /dev/null
+++ b/lib/observer/src/cdv_term_cb.erl
@@ -0,0 +1,76 @@
+%%
+%% %CopyrightBegin%
+%%
+%% Copyright Ericsson AB 2013-2014. 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(cdv_term_cb).
+
+-export([get_details/1,
+ detail_pages/0]).
+
+%% Callbacks for cdv_detail_wx
+get_details({Type, {T,Key}}) ->
+ [{Key,Term}] = ets:lookup(T,Key),
+ {ok,{"Expanded Term", {Type,[Term, T]}, []}}.
+
+detail_pages() ->
+ [{"Term", fun init_term_page/2}].
+
+init_term_page(ParentWin, {Type, [Term, Tab]}) ->
+ Expanded = expand(Term, true),
+ BinSaved = expand(Term, Tab),
+ cdv_multi_wx:start_link(
+ ParentWin,
+ [{"Format \~p",cdv_html_wx,{Type, format_term_fun("~p",BinSaved,Tab)}},
+ {"Format \~tp",cdv_html_wx,{Type,format_term_fun("~tp",BinSaved,Tab)}},
+ {"Format \~w",cdv_html_wx,{Type,format_term_fun("~w",BinSaved,Tab)}},
+ {"Format \~s",cdv_html_wx,{Type,format_term_fun("~s",Expanded,Tab)}},
+ {"Format \~ts",cdv_html_wx,{Type,format_term_fun("~ts",Expanded,Tab)}}]).
+
+format_term_fun(Format,Term,Tab) ->
+ fun() ->
+ try io_lib:format(Format,[Term]) of
+ Str -> {expand, plain_html(Str), Tab}
+ catch error:badarg ->
+ Warning = "This term can not be formatted with " ++ Format,
+ observer_html_lib:warning(Warning)
+ end
+ end.
+
+plain_html(Text) ->
+ observer_html_lib:plain_page(Text).
+
+expand(['#CDVBin',Offset,Size,Pos], true) ->
+ {ok,Bin} = crashdump_viewer:expand_binary({Offset,Size,Pos}),
+ Bin;
+expand(Bin, Tab) when is_binary(Bin), not is_boolean(Tab) ->
+ Size = byte_size(Bin),
+ PrevSize = min(Size, 10) * 8,
+ <<Preview:PrevSize, _/binary>> = Bin,
+ Hash = erlang:phash2(Bin),
+ Key = {Preview, Size, Hash},
+ ets:insert(Tab, {Key,Bin}),
+ ['#OBSBin',Preview,Size,Hash];
+expand([H|T], Expand) ->
+ case expand(T, Expand) of
+ ET when is_list(ET) ->
+ [expand(H, Expand)|ET];
+ ET -> % The tail is an expanded binary - cannot append with |
+ [expand(H, Expand),ET]
+ end;
+expand(Tuple, Expand) when is_tuple(Tuple) ->
+ list_to_tuple(expand(tuple_to_list(Tuple), Expand));
+expand(Term, _) ->
+ Term.
diff --git a/lib/observer/src/cdv_timer_cb.erl b/lib/observer/src/cdv_timer_cb.erl
new file mode 100644
index 0000000000..d44592cf18
--- /dev/null
+++ b/lib/observer/src/cdv_timer_cb.erl
@@ -0,0 +1,54 @@
+%%
+%% %CopyrightBegin%
+%%
+%% Copyright Ericsson AB 2013. 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(cdv_timer_cb).
+
+-export([col_to_elem/1,
+ col_spec/0,
+ get_info/1,
+ get_detail_cols/1]).
+
+-include_lib("wx/include/wx.hrl").
+-include("crashdump_viewer.hrl").
+
+%% Defines
+-define(COL_OWNER, 0).
+-define(COL_NAME, ?COL_OWNER+1).
+-define(COL_MSG, ?COL_NAME+1).
+-define(COL_TIME, ?COL_MSG+1).
+
+%% Callbacks for cdv_virtual_list_wx
+col_to_elem(id) -> col_to_elem(?COL_OWNER);
+col_to_elem(?COL_OWNER) -> #timer.pid;
+col_to_elem(?COL_NAME) -> #timer.name;
+col_to_elem(?COL_MSG) -> #timer.msg;
+col_to_elem(?COL_TIME) -> #timer.time.
+
+col_spec() ->
+ [{"Owner", ?wxLIST_FORMAT_LEFT, 110},
+ {"Owner name", ?wxLIST_FORMAT_LEFT, 150},
+ {"Message", ?wxLIST_FORMAT_LEFT, 300},
+ {"Time left (ms)", ?wxLIST_FORMAT_RIGHT, 80}].
+
+get_info(Owner) ->
+ {ok,Info,TW} = crashdump_viewer:timers(Owner),
+ {Info,TW}.
+
+get_detail_cols(all) ->
+ {[?COL_OWNER],false};
+get_detail_cols(_) ->
+ {[],false}.
diff --git a/lib/observer/src/cdv_virtual_list_wx.erl b/lib/observer/src/cdv_virtual_list_wx.erl
new file mode 100644
index 0000000000..bfe115a42e
--- /dev/null
+++ b/lib/observer/src/cdv_virtual_list_wx.erl
@@ -0,0 +1,419 @@
+%%
+%% %CopyrightBegin%
+%%
+%% Copyright Ericsson AB 2013. 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(cdv_virtual_list_wx).
+
+-behaviour(wx_object).
+
+-export([start_link/2, start_link/3, start_detail_win/1]).
+
+%% wx_object callbacks
+-export([init/1, handle_info/2, terminate/2, code_change/3, handle_call/3,
+ handle_event/2, handle_cast/2]).
+
+-include_lib("wx/include/wx.hrl").
+-include("observer_defs.hrl").
+
+%% Defines
+-define(COL_ID, 0).
+-define(ID_DETAILS, 202).
+
+%% Records
+
+-record(sort,
+ {
+ sort_key,
+ sort_incr=true
+ }).
+
+-record(holder, {parent,
+ info,
+ last_row,
+ sort,
+ attrs,
+ callback
+ }).
+
+-record(state, {grid,
+ panel,
+ detail_wins=[],
+ holder,
+ callback,
+ trunc_warn=[],
+ menu_cols=[], % columns to show in right click menu
+ menu_items=[]}). % right click menu items for the selected row
+
+start_link(ParentWin, Callback) ->
+ wx_object:start_link({local,Callback},?MODULE,
+ [ParentWin, Callback, all], []).
+
+start_link(ParentWin, Callback, Owner) ->
+ wx_object:start_link(?MODULE, [ParentWin, Callback, Owner], []).
+
+start_detail_win(Id) ->
+ Callback =
+ case Id of
+ "<"++_ ->
+ cdv_proc_cb;
+ "#Port"++_ ->
+ cdv_port_cb;
+ _ ->
+ case catch list_to_integer(Id) of
+ NodeId when is_integer(NodeId) ->
+ cdv_dist_cb;
+ _ ->
+ cdv_mod_cb
+ end
+ end,
+ start_detail_win(Callback,Id).
+start_detail_win(Callback,Id) ->
+ wx_object:cast(Callback,{start_detail_win,Id}).
+
+%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
+init([ParentWin, Callback, Owner]) ->
+ {Holder,TW} = spawn_table_holder(Callback, Owner),
+ Panel = wxPanel:new(ParentWin),
+ {Grid,MenuCols} = create_list_box(Panel, Holder, Callback, Owner),
+ Sizer = wxBoxSizer:new(?wxVERTICAL),
+ wxSizer:add(Sizer, Grid, [{flag, ?wxEXPAND bor ?wxALL},
+ {proportion, 1},
+ {border,4}]),
+
+ wxWindow:setSizer(Panel, Sizer),
+
+ State = #state{grid=Grid,
+ panel=Panel,
+ holder=Holder,
+ callback=Callback,
+ trunc_warn=TW,
+ menu_cols=MenuCols
+ },
+ {Panel, State}.
+
+%% UI-creation
+
+create_list_box(Panel, Holder, Callback, Owner) ->
+ Style =
+ ?wxLC_SINGLE_SEL bor ?wxLC_REPORT bor ?wxLC_VIRTUAL bor
+ ?wxLC_HRULES bor ?wxHSCROLL bor ?wxVSCROLL,
+ ListCtrl = wxListCtrl:new(Panel, [{style, Style},
+ {onGetItemText,
+ fun(_, Row, Col) ->
+ call(Holder, {get_row, self(), Row, Col})
+ end},
+ {onGetItemAttr,
+ fun(_, Item) ->
+ call(Holder, {get_attr, self(), Item})
+ end}
+ ]),
+ Li = wxListItem:new(),
+ AddListEntry = fun({Name, Align, DefSize}, Col) ->
+ wxListItem:setText(Li, Name),
+ wxListItem:setAlign(Li, Align),
+ wxListCtrl:insertColumn(ListCtrl, Col, Li),
+ wxListCtrl:setColumnWidth(ListCtrl, Col, DefSize),
+ Col + 1
+ end,
+ ListItems = Callback:col_spec(),
+ lists:foldl(AddListEntry, 0, ListItems),
+ wxListItem:destroy(Li),
+
+ wxListCtrl:setItemCount(ListCtrl, 0),
+ wxListCtrl:connect(ListCtrl, size, [{skip, true}]),
+ wxListCtrl:connect(ListCtrl, command_list_col_click),
+
+
+ %% If detail pages can be opened from this list - catch double
+ %% click and right click
+ DetailCols =
+ case catch Callback:get_detail_cols(Owner) of
+ {DC,DoubleClick} when is_list(DC), DC=/=[] ->
+ wxListCtrl:connect(ListCtrl, command_list_item_right_click),
+ if DoubleClick ->
+ wxListCtrl:connect(ListCtrl, command_list_item_activated);
+ true ->
+ ok
+ end,
+ DC;
+ _ ->
+ []
+ end,
+
+ {ListCtrl,DetailCols}.
+
+do_start_detail_win(undefined, State) ->
+ State;
+do_start_detail_win(Id, #state{panel=Panel,detail_wins=Opened,
+ callback=Callback}=State) ->
+ NewOpened =
+ case lists:keyfind(Id, 1, Opened) of
+ false ->
+ case cdv_detail_wx:start_link(Id, Panel, Callback) of
+ {error, _} ->
+ Opened;
+ IW ->
+ [{Id, IW} | Opened]
+ end;
+ {_, IW} ->
+ wxFrame:raise(IW),
+ Opened
+ end,
+ State#state{detail_wins=NewOpened}.
+
+call(Holder, What) when is_atom(Holder) ->
+ call(whereis(Holder), What);
+call(Holder, What) when is_pid(Holder) ->
+ Ref = erlang:monitor(process, Holder),
+ Holder ! What,
+ receive
+ {'DOWN', Ref, _, _, _} -> "";
+ {Holder, Res} ->
+ erlang:demonitor(Ref),
+ Res
+ after 5000 ->
+ io:format("Hanging call ~p~n",[What]),
+ ""
+ end;
+call(_,_) ->
+ "".
+
+
+%%%%%%%%%%%%%%%%%%%%%%% Callbacks %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
+
+handle_info({holder_updated, Count}, State=#state{grid=Grid}) ->
+ wxListCtrl:setItemCount(Grid, Count),
+ Count > 0 andalso wxListCtrl:refreshItems(Grid, 0, Count-1),
+ {noreply, State};
+
+handle_info(active, State) ->
+ cdv_wx:set_status(State#state.trunc_warn),
+ {noreply, State};
+
+handle_info(Info, State) ->
+ io:format("~p:~p, Unexpected info: ~p~n", [?MODULE, ?LINE, Info]),
+ {noreply, State}.
+
+terminate(_Reason, #state{holder=Holder}) ->
+ Holder ! stop,
+ ok.
+
+code_change(_, _, State) ->
+ {ok, State}.
+
+handle_call(new_dump, _From,
+ #state{grid=Grid,detail_wins=Opened,
+ holder=Holder,callback=Callback}=State) ->
+ lists:foreach(fun({_Id, IW}) -> wxFrame:destroy(IW) end, Opened),
+ wxListCtrl:deleteAllItems(Grid),
+ Ref = erlang:monitor(process,Holder),
+ Holder ! stop,
+ receive {'DOWN',Ref,_,_,_} -> ok end,
+ {NewHolder,TW} = spawn_table_holder(Callback, all),
+ {reply, ok, State#state{detail_wins=[],holder=NewHolder,trunc_warn=TW}};
+
+handle_call(Msg, _From, State) ->
+ io:format("~p:~p: Unhandled call ~p~n",[?MODULE, ?LINE, Msg]),
+ {reply, ok, State}.
+
+handle_cast({start_detail_win,Id}, State) ->
+ State2 = do_start_detail_win(Id, State),
+ {noreply, State2};
+
+handle_cast({detail_win_closed, Id},#state{detail_wins=Opened}=State) ->
+ Opened2 = lists:keydelete(Id, 1, Opened),
+ {noreply, State#state{detail_wins=Opened2}};
+
+handle_cast(Msg, State) ->
+ io:format("~p:~p: Unhandled cast ~p~n", [?MODULE, ?LINE, Msg]),
+ {noreply, State}.
+
+%%%%%%%%%%%%%%%%%%%%LOOP%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
+
+handle_event(#wx{id=MenuId,
+ event=#wxCommand{type = command_menu_selected}},
+ #state{menu_items=MenuItems} = State) ->
+ case lists:keyfind(MenuId,1,MenuItems) of
+ {MenuId,Id} ->
+ start_detail_win(Id);
+ false ->
+ ok
+ end,
+ {noreply, State};
+
+handle_event(#wx{event=#wxSize{size={W,_}}},
+ #state{grid=Grid}=State) ->
+ observer_lib:set_listctrl_col_size(Grid, W),
+ {noreply, State};
+
+handle_event(#wx{event=#wxList{type=command_list_item_right_click,
+ itemIndex=Row}},
+ #state{panel=Panel, holder=Holder, menu_cols=MenuCols} = State) ->
+ Menu = wxMenu:new(),
+ MenuItems =
+ lists:flatmap(
+ fun(Col) ->
+ MenuId = ?ID_DETAILS + Col,
+ ColText = call(Holder, {get_row, self(), Row, Col}),
+ case ColText of
+ Empty when Empty=="[]"; Empty=="" -> [];
+ _ ->
+ What =
+ case catch list_to_integer(ColText) of
+ NodeId when is_integer(NodeId) ->
+ "node " ++ ColText;
+ _ ->
+ ColText
+ end,
+ Text = "Properties for " ++ What,
+ wxMenu:append(Menu, MenuId, Text),
+ [{MenuId,ColText}]
+ end
+ end,
+ MenuCols),
+ case MenuItems of
+ [] ->
+ wxMenu:destroy(Menu);
+ _ ->
+ wxWindow:popupMenu(Panel, Menu),
+ wxMenu:destroy(Menu)
+ end,
+ {noreply,State#state{menu_items=MenuItems}};
+
+handle_event(#wx{event=#wxList{type=command_list_col_click, col=Col}},
+ #state{holder=Holder}=State) ->
+ Holder ! {change_sort, Col},
+ {noreply, State};
+
+handle_event(#wx{event=#wxList{type=command_list_item_activated,
+ itemIndex=Row}},
+ #state{holder=Holder} = State) ->
+ Id = call(Holder, {get_row, self(), Row, id}),
+ start_detail_win(Id),
+ {noreply, State};
+
+handle_event(Event, State) ->
+ io:format("~p:~p: handle event ~p\n", [?MODULE, ?LINE, Event]),
+ {noreply, State}.
+
+
+%%%%%%%%%%%%%%%%%%%%%%%%%%%TABLE HOLDER%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
+
+spawn_table_holder(Callback, Owner) ->
+ {Info,TW} = Callback:get_info(Owner),
+ Attrs = observer_lib:create_attrs(),
+ Parent = self(),
+ Holder =
+ case Owner of
+ all ->
+ Name = list_to_atom(atom_to_list(Callback) ++ "__holder"),
+ spawn_link(
+ fun() ->
+ register(Name,self()),
+ init_table_holder(Parent, Attrs, Callback, Info)
+ end),
+ Name;
+ _ ->
+ spawn_link(
+ fun() ->
+ init_table_holder(Parent, Attrs, Callback, Info)
+ end)
+ end,
+ {Holder,TW}.
+
+init_table_holder(Parent, Attrs, Callback, InfoList0) ->
+ Sort = #sort{sort_key=Callback:col_to_elem(id)},
+ {_Sort, InfoList} = do_sort(Sort,InfoList0),
+ Info = array:from_list(InfoList),
+ NRows = array:size(Info),
+ Parent ! {holder_updated, NRows},
+ table_holder(#holder{parent=Parent,
+ info=Info,
+ sort=Sort,
+ attrs=Attrs,
+ callback=Callback}).
+
+table_holder(#holder{callback=Callback, attrs=Attrs}=S0) ->
+ receive
+ _M={get_row, From, Row, Col} ->
+ %% erlang:display(_M),
+ State = get_row(From, Row, Col, S0),
+ table_holder(State);
+ _M={get_attr, From, Row} ->
+ %% erlang:display(_M),
+ get_attr(From, Row, Attrs),
+ table_holder(S0);
+ _M={change_sort, Col} ->
+ %% erlang:display(_M),
+ State = change_sort(Callback:col_to_elem(Col), S0),
+ table_holder(State);
+ stop ->
+ ok;
+ What ->
+ io:format("Table holder got ~p~n",[What]),
+ table_holder(S0)
+ end.
+
+change_sort(Col, S0=#holder{parent=Parent, info=Info0, sort=Sort0}) ->
+ NRows = array:size(Info0),
+ InfoList0 = array:to_list(Info0),
+ {Sort, InfoList}=sort(Col, Sort0, InfoList0),
+ Info = array:from_list(InfoList),
+ Parent ! {holder_updated, NRows},
+ S0#holder{info=Info, last_row=undefined, sort=Sort}.
+
+sort(Col, Opt=#sort{sort_key=Col, sort_incr=Bool}, Table) ->
+ do_sort(Opt#sort{sort_incr=not Bool}, Table);
+sort(Col, Sort,Table) ->
+ do_sort(Sort#sort{sort_key=Col, sort_incr=true}, Table).
+
+do_sort(Sort=#sort{sort_key=Col, sort_incr=true}, Table) ->
+ {Sort, lists:keysort(Col, Table)};
+do_sort(Sort=#sort{sort_key=Col, sort_incr=false}, Table) ->
+ {Sort, lists:reverse(lists:keysort(Col, Table))}.
+
+%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
+
+get_cell_data(Callback, ColNo, RowInfo) ->
+ case element(Callback:col_to_elem(ColNo), RowInfo) of
+ undefined -> "";
+ Cell -> try Callback:format(Cell) catch error:undef -> Cell end
+ end.
+
+get_row(From, Row, Col,
+ #holder{callback=Callback, last_row={Row,RowInfo}}=State) ->
+ Data = get_cell_data(Callback, Col, RowInfo),
+ From ! {self(), observer_lib:to_str(Data)},
+ State;
+get_row(From, Row, Col, #holder{callback=Callback, info=Info}=S0) ->
+ {Data,State} =
+ case Row >= array:size(Info) of
+ true ->
+ {"",S0};
+ false ->
+ RowInfo = array:get(Row, Info),
+ CellData = get_cell_data(Callback, Col, RowInfo),
+ {CellData,S0#holder{last_row={Row,RowInfo}}}
+ end,
+ From ! {self(), observer_lib:to_str(Data)},
+ State.
+
+get_attr(From, Row, Attrs) ->
+ Attribute = case Row rem 2 =:= 0 of
+ true -> Attrs#attrs.even;
+ false -> Attrs#attrs.odd
+ end,
+ From ! {self(), Attribute}.
diff --git a/lib/observer/src/cdv_wx.erl b/lib/observer/src/cdv_wx.erl
new file mode 100644
index 0000000000..26df60b0a6
--- /dev/null
+++ b/lib/observer/src/cdv_wx.erl
@@ -0,0 +1,462 @@
+%%
+%% %CopyrightBegin%
+%%
+%% Copyright Ericsson AB 2013. 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(cdv_wx).
+-compile(export_all).
+-behaviour(wx_object).
+
+-export([start/1]).
+-export([get_attrib/1, set_status/1, create_txt_dialog/4]).
+
+-export([init/1, handle_event/2, handle_cast/2, terminate/2, code_change/3,
+ handle_call/3, handle_info/2, check_page_title/1]).
+
+%% Includes
+-include_lib("wx/include/wx.hrl").
+-include_lib("kernel/include/file.hrl").
+
+-include("observer_defs.hrl").
+
+%% Defines
+
+-define(SERVER, cdv_wx).
+
+-define(ID_UG, 1).
+-define(ID_HOWTO, 2).
+-define(ID_NOTEBOOK, 3).
+
+-define(GEN_STR, "General").
+-define(PRO_STR, "Processes").
+-define(PORT_STR, "Ports").
+-define(ETS_STR, "ETS Tables").
+-define(TIMER_STR, "Timers").
+-define(FUN_STR, "Funs").
+-define(ATOM_STR, "Atoms").
+-define(DIST_STR, "Nodes").
+-define(MOD_STR, "Modules").
+-define(MEM_STR, "Memory").
+-define(INT_STR, "Internal Tables").
+
+%% Records
+-record(state,
+ {server,
+ file,
+ frame,
+ menubar,
+ menus = [],
+ status_bar,
+ notebook,
+ main_panel,
+ gen_panel,
+ pro_panel,
+ port_panel,
+ ets_panel,
+ timer_panel,
+ fun_panel,
+ atom_panel,
+ dist_panel,
+ mod_panel,
+ mem_panel,
+ int_panel,
+ active_tab
+ }).
+
+start(File) ->
+ case wx_object:start(?MODULE, File, []) of
+ Err = {error, _} -> Err;
+ _Obj -> ok
+ end.
+
+get_attrib(What) ->
+ wx_object:call(?SERVER, {get_attrib, What}).
+
+set_status(What) ->
+ wx_object:cast(?SERVER, {status_bar, What}).
+
+%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
+
+init(File0) ->
+ register(?SERVER, self()),
+ wx:new(),
+
+ {ok,CdvServer} = crashdump_viewer:start_link(),
+
+ catch wxSystemOptions:setOption("mac.listctrl.always_use_generic", 1),
+ Frame = wxFrame:new(wx:null(), ?wxID_ANY, "Crashdump Viewer",
+ [{size, {850, 600}}, {style, ?wxDEFAULT_FRAME_STYLE}]),
+ IconFile = filename:join(code:priv_dir(observer), "erlang_observer.png"),
+ Icon = wxIcon:new(IconFile, [{type,?wxBITMAP_TYPE_PNG}]),
+ wxFrame:setIcon(Frame, Icon),
+ wxIcon:destroy(Icon),
+
+ %% Setup panels
+ Panel = wxPanel:new(Frame, []),
+ Notebook = wxNotebook:new(Panel, ?ID_NOTEBOOK, [{style, ?wxBK_DEFAULT}]),
+
+ %% Setup "statusbar" to show warnings
+ StatusBar = observer_lib:create_status_bar(Panel),
+
+ %% Setup sizer create early to get it when window shows
+ MainSizer = wxBoxSizer:new(?wxVERTICAL),
+
+ wxSizer:add(MainSizer, Notebook, [{proportion, 1}, {flag, ?wxEXPAND}]),
+ wxSizer:add(MainSizer, StatusBar, [{flag, ?wxEXPAND bor ?wxALL},
+ {proportion, 0},
+ {border,4}]),
+ wxPanel:setSizer(Panel, MainSizer),
+
+ wxNotebook:connect(Notebook, command_notebook_page_changing),
+ wxFrame:connect(Frame, close_window, [{skip, true}]),
+ wxMenu:connect(Frame, command_menu_selected),
+
+ case load_dump(Frame,File0) of
+ {ok,File} ->
+ %% Set window title
+ T1 = "Crashdump Viewer: ",
+ Title =
+ if length(File) > 70 ->
+ T1 ++ filename:basename(File);
+ true ->
+ T1 ++ File
+ end,
+ wxFrame:setTitle(Frame, Title),
+
+ setup(#state{server=CdvServer,
+ file=File,
+ frame=Frame,
+ status_bar=StatusBar,
+ notebook=Notebook,
+ main_panel=Panel});
+ error ->
+ wxFrame:destroy(Frame),
+ wx:destroy(),
+ crashdump_viewer:stop(),
+ ignore
+ end.
+
+setup(#state{frame=Frame, notebook=Notebook}=State) ->
+
+ %% Setup Menubar & Menus
+ MenuBar = wxMenuBar:new(),
+ DefMenus = default_menus(),
+ observer_lib:create_menus(DefMenus, MenuBar, default),
+ wxFrame:setMenuBar(Frame, MenuBar),
+
+ %% General information Panel
+ GenPanel = add_page(Notebook, ?GEN_STR, cdv_info_wx, cdv_gen_cb),
+
+ %% Process Panel
+ ProPanel = add_page(Notebook, ?PRO_STR, cdv_virtual_list_wx, cdv_proc_cb),
+
+ %% Port Panel
+ PortPanel = add_page(Notebook, ?PORT_STR, cdv_virtual_list_wx, cdv_port_cb),
+
+ %% Table Panel
+ EtsPanel = add_page(Notebook, ?ETS_STR, cdv_virtual_list_wx, cdv_ets_cb),
+
+ %% Timer Panel
+ TimerPanel = add_page(Notebook, ?TIMER_STR, cdv_virtual_list_wx,cdv_timer_cb),
+
+ %% Fun Panel
+ FunPanel = add_page(Notebook, ?FUN_STR, cdv_virtual_list_wx, cdv_fun_cb),
+
+ %% Atom Panel
+ AtomPanel = add_page(Notebook, ?ATOM_STR, cdv_virtual_list_wx, cdv_atom_cb),
+
+ %% Distribution Panel
+ DistPanel = add_page(Notebook, ?DIST_STR, cdv_virtual_list_wx, cdv_dist_cb),
+
+ %% Loaded Modules Panel
+ ModPanel = add_page(Notebook, ?MOD_STR, cdv_virtual_list_wx, cdv_mod_cb),
+
+ %% Memory Panel
+ MemPanel = add_page(Notebook, ?MEM_STR, cdv_multi_wx, cdv_mem_cb),
+
+ %% Memory Panel
+ IntPanel = add_page(Notebook, ?INT_STR, cdv_multi_wx, cdv_int_tab_cb),
+
+ %% Show the window
+ wxFrame:show(Frame),
+
+ GenPid = wx_object:get_pid(GenPanel),
+ GenPid ! active,
+ observer_lib:destroy_progress_dialog(),
+ process_flag(trap_exit, true),
+ {Frame, State#state{menubar = MenuBar,
+ gen_panel = GenPanel,
+ pro_panel = ProPanel,
+ port_panel = PortPanel,
+ ets_panel = EtsPanel,
+ timer_panel = TimerPanel,
+ fun_panel = FunPanel,
+ atom_panel = AtomPanel,
+ dist_panel = DistPanel,
+ mod_panel = ModPanel,
+ mem_panel = MemPanel,
+ int_panel = IntPanel,
+ active_tab = GenPid
+ }}.
+
+%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
+
+%%Callbacks
+handle_event(#wx{event=#wxNotebook{type=command_notebook_page_changing}},
+ #state{active_tab=Previous} = State) ->
+ case get_active_pid(State) of
+ Previous -> {noreply, State};
+ Pid ->
+ Pid ! active,
+ {noreply, State#state{active_tab=Pid}}
+ end;
+
+handle_event(#wx{event = #wxClose{}}, State) ->
+ {stop, normal, State};
+
+handle_event(#wx{id = ?wxID_OPEN,
+ event = #wxCommand{type = command_menu_selected}},
+ State) ->
+ NewState =
+ case load_dump(State#state.frame,undefined) of
+ {ok,File} ->
+ Panels = [State#state.gen_panel,
+ State#state.pro_panel,
+ State#state.port_panel,
+ State#state.ets_panel,
+ State#state.timer_panel,
+ State#state.fun_panel,
+ State#state.atom_panel,
+ State#state.dist_panel,
+ State#state.mod_panel,
+ State#state.mem_panel,
+ State#state.int_panel],
+ _ = [wx_object:call(Panel,new_dump) || Panel<-Panels],
+ wxNotebook:setSelection(State#state.notebook,0),
+ observer_lib:destroy_progress_dialog(),
+ State#state{file=File};
+ error ->
+ State
+ end,
+ {noreply,NewState};
+
+handle_event(#wx{id = ?wxID_EXIT,
+ event = #wxCommand{type = command_menu_selected}},
+ State) ->
+ {stop, normal, State};
+
+handle_event(#wx{id = HelpId,
+ event = #wxCommand{type = command_menu_selected}},
+ State) when HelpId==?wxID_HELP; HelpId==?ID_UG; HelpId==?ID_HOWTO ->
+ Help = get_help_doc(HelpId),
+ wx_misc:launchDefaultBrowser(Help) orelse
+ create_txt_dialog(State#state.frame,
+ "Could not launch browser: ~n " ++ Help,
+ "Error", ?wxICON_ERROR),
+ {noreply, State};
+
+handle_event(#wx{id = ?wxID_ABOUT,
+ event = #wxCommand{type = command_menu_selected}},
+ State = #state{frame=Frame}) ->
+ AboutString = "Display information from an erlang crash dump",
+ Style = [{style, ?wxOK bor ?wxSTAY_ON_TOP},
+ {caption, "About"}],
+ wxMessageDialog:showModal(wxMessageDialog:new(Frame, AboutString, Style)),
+ {noreply, State};
+
+handle_event(Event, State) ->
+ Pid = get_active_pid(State),
+ Pid ! Event,
+ {noreply, State}.
+
+handle_cast({status_bar, Msg}, State=#state{status_bar=SB}) ->
+ wxTextCtrl:clear(SB),
+ wxTextCtrl:writeText(SB, Msg),
+ {noreply, State};
+
+handle_cast(_Cast, State) ->
+ {noreply, State}.
+
+handle_call({get_attrib, Attrib}, _From, State) ->
+ {reply, get(Attrib), State};
+
+handle_call(_Msg, _From, State) ->
+ {reply, ok, State}.
+
+handle_info({'EXIT', Pid, normal}, #state{server=Pid}=State) ->
+ {stop, normal, State};
+
+handle_info({'EXIT', Pid, _Reason}, State) ->
+ io:format("Child (~s) crashed exiting: ~p ~p~n",
+ [pid2panel(Pid, State), Pid,_Reason]),
+ {stop, normal, State};
+
+handle_info(_Info, State) ->
+ {noreply, State}.
+
+terminate(_Reason, #state{frame = Frame}) ->
+ wxFrame:destroy(Frame),
+ wx:destroy(),
+ crashdump_viewer:stop(),
+ ok.
+
+code_change(_, _, State) ->
+ {ok, State}.
+
+%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
+
+add_page(Notebook,Title,Callback,Extra) ->
+ Panel = Callback:start_link(Notebook, Extra),
+ wxNotebook:addPage(Notebook, Panel, Title, []),
+ Panel.
+
+create_txt_dialog(Frame, Msg, Title, Style) ->
+ MD = wxMessageDialog:new(Frame, Msg, [{style, Style}]),
+ wxMessageDialog:setTitle(MD, Title),
+ wxDialog:showModal(MD),
+ wxDialog:destroy(MD).
+
+check_page_title(Notebook) ->
+ Selection = wxNotebook:getSelection(Notebook),
+ wxNotebook:getPageText(Notebook, Selection).
+
+get_active_pid(#state{notebook=Notebook, gen_panel=Gen, pro_panel=Pro,
+ port_panel=Ports, ets_panel=Ets, timer_panel=Timers,
+ fun_panel=Funs, atom_panel=Atoms, dist_panel=Dist,
+ mod_panel=Mods, mem_panel=Mem, int_panel=Int
+ }) ->
+ Panel = case check_page_title(Notebook) of
+ ?GEN_STR -> Gen;
+ ?PRO_STR -> Pro;
+ ?PORT_STR -> Ports;
+ ?ETS_STR -> Ets;
+ ?TIMER_STR -> Timers;
+ ?FUN_STR -> Funs;
+ ?ATOM_STR -> Atoms;
+ ?DIST_STR -> Dist;
+ ?MOD_STR -> Mods;
+ ?MEM_STR -> Mem;
+ ?INT_STR -> Int
+ end,
+ wx_object:get_pid(Panel).
+
+pid2panel(Pid, #state{gen_panel=Gen, pro_panel=Pro, port_panel=Ports,
+ ets_panel=Ets, timer_panel=Timers, fun_panel=Funs,
+ atom_panel=Atoms, dist_panel=Dist, mod_panel=Mods,
+ mem_panel=Mem, int_panel=Int}) ->
+ case Pid of
+ Gen -> ?GEN_STR;
+ Pro -> ?PRO_STR;
+ Ports -> ?PORT_STR;
+ Ets -> ?ETS_STR;
+ Timers -> ?TIMER_STR;
+ Funs -> ?FUN_STR;
+ Atoms -> ?ATOM_STR;
+ Dist -> ?DIST_STR;
+ Mods -> ?MOD_STR;
+ Mem -> ?MEM_STR;
+ Int -> ?INT_STR;
+ _ -> "unknown"
+ end.
+
+default_menus() ->
+ Open = #create_menu{id = ?wxID_OPEN, text = "Open new crash dump"},
+ Quit = #create_menu{id = ?wxID_EXIT, text = "Quit"},
+ About = #create_menu{id = ?wxID_ABOUT, text = "About"},
+ Help = #create_menu{id = ?wxID_HELP},
+ UG = #create_menu{id = ?ID_UG, text = "Crashdump viewer user's guide"},
+ Howto = #create_menu{id = ?ID_HOWTO, text = "How to interpret crash dump"},
+ case os:type() =:= {unix, darwin} of
+ false ->
+ FileMenu = {"File", [Open,Quit]},
+ HelpMenu = {"Help", [About,Help,UG,Howto]},
+ [FileMenu, HelpMenu];
+ true ->
+ %% On Mac quit and about will be moved to the "default' place
+ %% automagicly, so just add them to a menu that always exist.
+ [{"File", [Open, About,Quit]}, {"&Help", [Help,UG,Howto]}]
+ end.
+
+
+load_dump(Frame,undefined) ->
+ FD = wxFileDialog:new(wx:null(),
+ [{style,?wxFD_OPEN bor ?wxFD_FILE_MUST_EXIST}]),
+ case wxFileDialog:showModal(FD) of
+ ?wxID_OK ->
+ Path = wxFileDialog:getPath(FD),
+ wxDialog:destroy(FD),
+ load_dump(Frame,Path);
+ _ ->
+ wxDialog:destroy(FD),
+ error
+ end;
+load_dump(Frame,FileName) ->
+ ok = observer_lib:display_progress_dialog("Crashdump Viewer",
+ "Loading crashdump"),
+ crashdump_viewer:read_file(FileName),
+ case observer_lib:wait_for_progress() of
+ ok ->
+ %% Set window title
+ T1 = "Crashdump Viewer: ",
+ Title =
+ if length(FileName) > 70 ->
+ T1 ++ filename:basename(FileName);
+ true ->
+ T1 ++ FileName
+ end,
+ wxFrame:setTitle(Frame, Title),
+ {ok,FileName};
+ error ->
+ error
+ end.
+
+%%%-----------------------------------------------------------------
+%%% Find help document (HTML files)
+get_help_doc(HelpId) ->
+ Internal = get_internal_help_doc(HelpId),
+ case filelib:is_file(Internal) of
+ true -> Internal;
+ false -> get_external_help_doc(HelpId)
+ end.
+
+get_internal_help_doc(?ID_HOWTO) ->
+ filename:join(erts_doc_dir(),help_file(?ID_HOWTO));
+get_internal_help_doc(HelpId) ->
+ filename:join(observer_doc_dir(),help_file(HelpId)).
+
+get_external_help_doc(?ID_HOWTO) ->
+ filename:join("http://www.erlang.org/doc/apps/erts",help_file(?ID_HOWTO));
+get_external_help_doc(HelpId) ->
+ filename:join("http://www.erlang.org/doc/apps/observer",help_file(HelpId)).
+
+observer_doc_dir() ->
+ filename:join([code:lib_dir(observer),"doc","html"]).
+
+erts_doc_dir() ->
+ ErtsVsn = erlang:system_info(version),
+ RootDir = code:root_dir(),
+ VsnErtsDir = filename:join(RootDir,"erts-"++ErtsVsn),
+ DocDir = filename:join(["doc","html"]),
+ case filelib:is_dir(VsnErtsDir) of
+ true ->
+ filename:join(VsnErtsDir,DocDir);
+ false ->
+ %% So this can be run in source tree
+ filename:join([RootDir,"erts",DocDir])
+ end.
+
+help_file(?wxID_HELP) -> "crashdump_help.html";
+help_file(?ID_UG) -> "crashdump_ug.html";
+help_file(?ID_HOWTO) -> "crash_dump.html".
diff --git a/lib/observer/src/crashdump_viewer.erl b/lib/observer/src/crashdump_viewer.erl
index e7d71c581e..99329b94e2 100644
--- a/lib/observer/src/crashdump_viewer.erl
+++ b/lib/observer/src/crashdump_viewer.erl
@@ -1,7 +1,7 @@
%%
%% %CopyrightBegin%
%%
-%% Copyright Ericsson AB 2003-2013. All Rights Reserved.
+%% Copyright Ericsson AB 2003-2014. All Rights Reserved.
%%
%% The contents of this file are subject to the Erlang Public License,
%% Version 1.1, (the "License"); you may not use this file except in
@@ -20,80 +20,53 @@
%%
%% This module is the main module in the crashdump viewer. It implements
-%% the server started by webtool and the API for the crashdump viewer tool.
-%%
-%% All functions in the API except configData/0 and start_link/0 are
-%% called from HTML pages via erl_scheme (mod_esi).
+%% the server backend for the crashdump viewer tool.
%%
%% Tables
%% ------
-%% cdv_menu_table: This table holds the menu which is presented in the left
-%% frame of the crashdump viewer page. Each element in the table represents
-%% one meny item, and the state of the item indicates if it is presently
-%% visible or not.
-%%
-%% cdv_dump_index_table: This table holds all tags read from the crashdump.
-%% Each tag indicates where the information about a specific item starts.
-%% The table entry for a tag includes the start position for this
-%% item-information. All tags start with a "=" at the beginning of
-%% a line.
+%% cdv_dump_index_table: This table holds all tags read from the
+%% crashdump. Each tag indicates where the information about a
+%% specific item starts. The table entry for a tag includes the start
+%% position for this item-information. In a crash dump file, all tags
+%% start with a "=" at the beginning of a line.
%%
%% Process state
%% -------------
%% file: The name of the crashdump currently viewed.
%% dump_vsn: The version number of the crashdump
-%% procs_summary: Process summary represented by a list of
-%% #proc records. This is used for efficiency reasons when sorting the
-%% process summary table instead of reading all processes from the
-%% dump again. Note that if the dump contains more than
-%% ?max_sort_process_num processes, the sort functionality is not
-%% available, and the procs_summary field in the state will have the
-%% value 'too_many'.
-%% sorted: string(), indicated what item was last sorted in process summary.
-%% This is needed so reverse sorting can be done.
-%% shared_heap: 'true' if crashdump comes from a system running shared heap,
-%% else 'false'.
%% wordsize: 4 | 8, the number of bytes in a word.
%% binaries: a gb_tree containing binaries or links to binaries in the dump
%%
%% User API
--export([start/0,stop/0,script_start/0,script_start/1]).
-
-%% Webtool API
--export([configData/0,
- start_link/0]).
--export([start_page/2,
- read_file_frame/2,
- read_file/2,
- redirect/2,
- filename_frame/2,
- menu_frame/2,
- initial_info_frame/2,
- toggle/2,
- general_info/2,
- processes/3,
- proc_details/2,
- port/2,
- ports/3,
- ets_tables/3,
- internal_ets_tables/2,
- timers/3,
- fun_table/3,
- atoms/3,
- dist_info/2,
- loaded_modules/3,
- loaded_mod_details/2,
- memory/2,
- allocated_areas/2,
- allocator_info/2,
- hash_tables/2,
- index_tables/2,
- sort_procs/3,
- expand/2,
- expand_binary/2,
- expand_memory/2]).
-
+-export([start/0,start/1,stop/0,script_start/0,script_start/1]).
+
+%% GUI API
+-export([start_link/0]).
+-export([read_file/1,
+ general_info/0,
+ processes/0,
+ proc_details/1,
+ port/1,
+ ports/0,
+ ets_tables/1,
+ internal_ets_tables/0,
+ timers/1,
+ funs/0,
+ atoms/0,
+ dist_info/0,
+ node_info/1,
+ loaded_modules/0,
+ loaded_mod_details/1,
+ memory/0,
+ allocated_areas/0,
+ allocator_info/0,
+ hash_tables/0,
+ index_tables/0,
+ expand_binary/1]).
+
+%% Library function
+-export([to_proplist/2, to_value_list/1]).
%% gen_server callbacks
-export([init/1, handle_call/3, handle_cast/2, handle_info/2,
@@ -106,28 +79,11 @@
-include_lib("kernel/include/file.hrl").
-include_lib("stdlib/include/ms_transform.hrl").
--define(START_PAGE,"/cdv_erl/crashdump_viewer/start_page").
--define(READ_FILE_PAGE,"/cdv_erl/crashdump_viewer/read_file?path=").
-define(SERVER, crashdump_viewer_server).
-define(call_timeout,3600000).
-define(chunk_size,1000). % number of bytes read from crashdump at a time
-define(max_line_size,100). % max number of bytes (i.e. characters) the
% line_head/1 function can return
--define(max_display_size,500). % max number of bytes that will be directly
- % displayed. If e.g. msg_q is longer than
- % this, it must be explicitly expanded.
--define(max_display_binary_size,50). % max size of a binary that will be
- % directly displayed.
--define(max_sort_process_num,10000). % Max number of processes that allows
- % sorting. If more than this number of
- % processes exist, they will be displayed
- % in the order they are found in the log.
--define(items_chunk_size,?max_sort_process_num). % Number of items per chunk
- % when page of many items
- % is displayed, e.g. processes,
- % timers, funs...
- % Must be equal to
- % ?max_sort_process_num!
-define(not_available,"N/A").
@@ -136,7 +92,6 @@
-define(allocator,allocator).
-define(atoms,atoms).
-define(binary,binary).
--define(debug_proc_dictionary,debug_proc_dictionary).
-define(ende,ende).
-define(erl_crash_dump,erl_crash_dump).
-define(ets,ets).
@@ -152,7 +107,6 @@
-define(no_distribution,no_distribution).
-define(node,node).
-define(not_connected,not_connected).
--define(num_atoms,num_atoms).
-define(old_instr_data,old_instr_data).
-define(port,port).
-define(proc,proc).
@@ -164,8 +118,7 @@
-define(visible_node,visible_node).
--record(state,{file,dump_vsn,procs_summary,sorted,shared_heap=false,
- wordsize=4,num_atoms="unknown",binaries,bg_status}).
+-record(state,{file,dump_vsn,wordsize=4,num_atoms="unknown",binaries}).
%%%-----------------------------------------------------------------
%%% Debugging
@@ -198,133 +151,72 @@ stop_debug() ->
%%%-----------------------------------------------------------------
%%% User API
start() ->
- webtool:start(),
- receive after 1000 -> ok end,
- webtool:start_tools([],"app=crashdump_viewer"),
- receive after 1000 -> ok end,
- ok.
+ start(undefined).
+start(File) ->
+ cdv_wx:start(File).
stop() ->
- webtool:stop_tools([],"app=crashdump_viewer"),
- webtool:stop().
+ case whereis(?SERVER) of
+ undefined ->
+ ok;
+ Pid ->
+ Ref = erlang:monitor(process,Pid),
+ cast(stop),
+ receive {'DOWN', Ref, process, Pid, _} -> ok end
+ end.
%%%-----------------------------------------------------------------
%%% Start crashdump_viewer via the cdv script located in
%%% $OBSERVER_PRIV_DIR/bin
script_start() ->
- usage().
-script_start([File]) ->
- DefaultBrowser =
- case os:type() of
- {win32,_} -> iexplore;
- {unix,darwin} -> open;
- _ -> firefox
- end,
- script_start([File,DefaultBrowser]);
-script_start([FileAtom,Browser]) ->
+ do_script_start(fun() -> start() end),
+ erlang:halt().
+script_start([FileAtom]) ->
File = atom_to_list(FileAtom),
case filelib:is_regular(File) of
true ->
- io:format("Starting crashdump_viewer...\n"),
- start(),
- io:format("Reading crashdump..."),
- read_file(File),
- redirect([],[]),
- io:format("done\n"),
- start_browser(Browser);
+ do_script_start(fun() -> start(File) end);
false ->
io:format("cdv error: the given file does not exist\n"),
usage()
- end.
-
-start_browser(Browser) ->
- PortStr = integer_to_list(gen_server:call(web_tool,get_port)),
- Url = "http://localhost:" ++ PortStr ++ ?START_PAGE,
- {OSType,_} = os:type(),
- case Browser of
- none ->
- ok;
- iexplore when OSType == win32->
- io:format("Starting internet explorer...\n"),
- {ok,R} = win32reg:open(""),
- Key="\\local_machine\\SOFTWARE\\Microsoft\\IE Setup\\Setup",
- win32reg:change_key(R,Key),
- {ok,Val} = win32reg:value(R,"Path"),
- IExplore=filename:join(win32reg:expand(Val),"iexplore.exe"),
- os:cmd("\"" ++ IExplore ++ "\" " ++ Url);
- _ when OSType == win32 ->
- io:format("Starting ~w...\n",[Browser]),
- os:cmd("\"" ++ atom_to_list(Browser) ++ "\" " ++ Url);
- B when B==firefox; B==mozilla ->
- io:format("Sending URL to ~w...",[Browser]),
- BStr = atom_to_list(Browser),
- SendCmd = BStr ++ " -raise -remote \'openUrl(" ++ Url ++ ")\'",
- Port = open_port({spawn,SendCmd},[exit_status]),
- receive
- {Port,{exit_status,0}} ->
- io:format("done\n");
- {Port,{exit_status,_Error}} ->
- io:format(" not running, starting ~w...\n",[Browser]),
- os:cmd(BStr ++ " " ++ Url)
- after 5000 ->
- io:format(" failed, starting ~w...\n",[Browser]),
- erlang:port_close(Port),
- os:cmd(BStr ++ " " ++ Url)
- end;
- _ ->
- io:format("Starting ~w...\n",[Browser]),
- os:cmd(atom_to_list(Browser) ++ " " ++ Url)
end,
- ok.
+ erlang:halt();
+script_start(_) ->
+ usage(),
+ erlang:halt().
+
+do_script_start(StartFun) ->
+ process_flag(trap_exit,true),
+ case StartFun() of
+ ok ->
+ case whereis(cdv_wx) of
+ Pid when is_pid(Pid) ->
+ link(Pid),
+ receive
+ {'EXIT', Pid, normal} ->
+ ok;
+ {'EXIT', Pid, Reason} ->
+ io:format("\ncdv crash: ~p\n",[Reason])
+ end;
+ _ ->
+ io:format("\ncdv crash: ~p\n",[unknown_reason])
+ end;
+ Error ->
+ io:format("\ncdv start failed: ~p\n",[Error])
+ end.
usage() ->
io:format(
- "\nusage: cdv file [ browser ]\n"
+ "usage: cdv [file]\n"
"\tThe \'file\' must be an existing erlang crash dump.\n"
- "\tDefault browser is \'iexplore\' (Internet Explorer) on Windows,\n"
- "\t\'open\' on Mac OS X, or else \'firefox\'.\n",
+ "\tIf omitted a file dialog will be opened.\n",
[]).
-
-
-
-%%%-----------------------------------------------------------------
-%%% Return config data used by webtool
-configData() ->
- Dir = filename:join(code:priv_dir(observer),"crashdump_viewer"),
- {crashdump_viewer,
- [{web_data,{"CrashDumpViewer",?START_PAGE}},
- {alias,{"/crashdump_viewer",Dir}},
- {alias,{"/crashdump_erts_doc",erts_docdir()}},
- {alias,{"/crashdump_doc",cdv_docdir()}},
- {alias,{erl_alias,"/cdv_erl",[?MODULE]}},
- {start,{child,{{local,?SERVER},
- {?MODULE,start_link,[]},
- permanent,100,worker,[?MODULE]}}}
- ]}.
-
-erts_docdir() ->
- ErtsVsn = erlang:system_info(version),
- RootDir = code:root_dir(),
- VsnErtsDir = filename:join(RootDir,"erts-"++ErtsVsn),
- DocDir = filename:join(["doc","html"]),
- case filelib:is_dir(VsnErtsDir) of
- true ->
- filename:join(VsnErtsDir,DocDir);
- false ->
- %% So this can be run in clearcase
- filename:join([RootDir,"erts",DocDir])
- end.
-
-cdv_docdir() ->
- ObserverDir = code:lib_dir(observer),
- filename:join([ObserverDir,"doc","html"]).
-
%%====================================================================
%% External functions
%%====================================================================
%%%--------------------------------------------------------------------
-%%% Start the server
+%%% Start the server - called by cdv_wx
start_link() ->
case whereis(?SERVER) of
undefined ->
@@ -334,119 +226,63 @@ start_link() ->
end.
%%%-----------------------------------------------------------------
-%%% If crashdump_viewer is just started, show welcome frame. Else
-%%% show menu and general_info
-start_page(_Env,_Input) ->
- call(start_page).
-
-%%%-----------------------------------------------------------------
-%%% Display the form for entering the file name for the crashdump
-%%% to view.
-read_file_frame(_Env,_Input) ->
- crashdump_viewer_html:read_file_frame().
-
-%%%-----------------------------------------------------------------
-%%% Called when the 'ok' button is clicked after entering the dump
-%%% file name.
-read_file(_Env,Input) ->
- call({read_file,Input}).
-
-%%%-----------------------------------------------------------------
-%%% The topmost frame of the main page. Called when a crashdump is
-%%% loaded.
-filename_frame(_Env,_Input) ->
- call(filename_frame).
-
-%%%-----------------------------------------------------------------
-%%% The initial information frame. Called when a crashdump is loaded.
-initial_info_frame(_Env,_Input) ->
- call(initial_info_frame).
-
-%%%-----------------------------------------------------------------
-%%% The left frame of the main page. Called when a crashdump is
-%%% loaded.
-menu_frame(_Env,_Input) ->
- crashdump_viewer_html:menu_frame().
-
-%%%-----------------------------------------------------------------
-%%% Called when the collapsed or exploded picture in the menu is
-%%% clicked.
-toggle(_Env,Input) ->
- call({toggle,Input}).
+%%% Called by cdv_wx
+read_file(File) ->
+ cast({read_file,File}).
%%%-----------------------------------------------------------------
-%%% The following functions are called when menu items are clicked.
-general_info(_Env,_Input) ->
+%%% The following functions are called when the different tabs are
+%%% created
+general_info() ->
call(general_info).
-processes(SessionId,_Env,_Input) ->
- call({procs_summary,SessionId}).
-ports(SessionId,_Env,_Input) ->
- call({ports,SessionId}).
-ets_tables(SessionId,_Env,Input) ->
- call({ets_tables,SessionId,Input}).
-internal_ets_tables(_Env,_Input) ->
+processes() ->
+ call(procs_summary).
+ports() ->
+ call(ports).
+ets_tables(Owner) ->
+ call({ets_tables,Owner}).
+internal_ets_tables() ->
call(internal_ets_tables).
-timers(SessionId,_Env,Input) ->
- call({timers,SessionId,Input}).
-fun_table(SessionId,_Env,_Input) ->
- call({funs,SessionId}).
-atoms(SessionId,_Env,_Input) ->
- call({atoms,SessionId}).
-dist_info(_Env,_Input) ->
+timers(Owner) ->
+ call({timers,Owner}).
+funs() ->
+ call(funs).
+atoms() ->
+ call(atoms).
+dist_info() ->
call(dist_info).
-loaded_modules(SessionId,_Env,_Input) ->
- call({loaded_mods,SessionId}).
-loaded_mod_details(_Env,Input) ->
- call({loaded_mod_details,Input}).
-memory(_Env,_Input) ->
+node_info(Channel) ->
+ call({node_info,Channel}).
+loaded_modules() ->
+ call(loaded_mods).
+loaded_mod_details(Mod) ->
+ call({loaded_mod_details,Mod}).
+memory() ->
call(memory).
-allocated_areas(_Env,_Input) ->
+allocated_areas() ->
call(allocated_areas).
-allocator_info(_Env,_Input) ->
+allocator_info() ->
call(allocator_info).
-hash_tables(_Env,_Input) ->
+hash_tables() ->
call(hash_tables).
-index_tables(_Env,_Input) ->
+index_tables() ->
call(index_tables).
%%%-----------------------------------------------------------------
%%% Called when a link to a process (Pid) is clicked.
-proc_details(_Env,Input) ->
- call({proc_details,Input}).
-
-%%%-----------------------------------------------------------------
-%%% Called when one of the headings in the process summary table are
-%%% clicked. It sorts the processes by the clicked heading.
-sort_procs(SessionId,_Env,Input) ->
- call({sort_procs,SessionId,Input}).
+proc_details(Pid) ->
+ call({proc_details,Pid}).
%%%-----------------------------------------------------------------
%%% Called when a link to a port is clicked.
-port(_Env,Input) ->
- call({port,Input}).
-
-%%%-----------------------------------------------------------------
-%%% Called when the "Expand" link in a call stack (Last Calls) is
-%%% clicked.
-expand(_Env,Input) ->
- call({expand,Input}).
-
-%%%-----------------------------------------------------------------
-%%% Called when the "Expand" link in a stack dump, message queue or
-%%% dictionary is clicked.
-expand_memory(_Env,Input) ->
- call({expand_memory,Input}).
-
-%%%-----------------------------------------------------------------
-%%% Called when "<< xxx bytes>>" link in a stack dump, message queue or
-%%% dictionary is clicked.
-expand_binary(_Env,Input) ->
- call({expand_binary,Input}).
+port(Id) ->
+ call({port,Id}).
%%%-----------------------------------------------------------------
-%%% Called on regular intervals while waiting for a dump to be read
-redirect(_Env,_Input) ->
- call(redirect).
+%%% Called when "<< xxx bytes>>" link is clicket to open a new window
+%%% displaying the whole binary.
+expand_binary(Pos) ->
+ call({expand_binary,Pos}).
%%====================================================================
%% Server functions
@@ -461,8 +297,8 @@ redirect(_Env,_Input) ->
%% {stop, Reason}
%%--------------------------------------------------------------------
init([]) ->
- ets:new(cdv_menu_table,[set,named_table,{keypos,#menu_item.index},public]),
ets:new(cdv_dump_index_table,[ordered_set,named_table,public]),
+ ets:new(cdv_reg_proc_table,[ordered_set,named_table,public]),
{ok, #state{}}.
%%--------------------------------------------------------------------
@@ -475,223 +311,125 @@ init([]) ->
%% {stop, Reason, Reply, State} | (terminate/2 is called)
%% {stop, Reason, State} (terminate/2 is called)
%%--------------------------------------------------------------------
-handle_call(start_page,_From,State=#state{file=undefined,bg_status=undefined})->
- Reply = crashdump_viewer_html:welcome(),
- {reply,Reply,State};
-handle_call(start_page, _From, State=#state{file=undefined,bg_status={done,Page}}) ->
- {reply,Page,State};
-handle_call(start_page, _From, State=#state{file=undefined,bg_status=Status}) ->
- Reply = crashdump_viewer_html:redirect(Status),
- {reply,Reply,State};
-handle_call(start_page, _From, State) ->
- Reply = crashdump_viewer_html:start_page(),
- {reply,Reply,State};
-handle_call({read_file,Input}, _From, _State) ->
- {ok,File} = get_value("path",httpd:parse_query(Input)),
- spawn_link(fun() -> read_file(File) end),
- Status = background_status(reading,File),
- Reply = crashdump_viewer_html:redirect(Status),
- {reply, Reply, #state{bg_status=Status}};
-handle_call(redirect,_From, State=#state{bg_status={done,Page}}) ->
- {reply, Page, State#state{bg_status=undefined}};
-handle_call(redirect,_From, State=#state{bg_status=Status}) ->
- Reply = crashdump_viewer_html:redirect(Status),
- {reply, Reply, State};
-handle_call(filename_frame,_From,State=#state{file=File}) ->
- Reply = crashdump_viewer_html:filename_frame(File),
- {reply,Reply,State};
-handle_call(initial_info_frame,_From,State=#state{file=File}) ->
+handle_call(general_info,_From,State=#state{file=File}) ->
GenInfo = general_info(File),
- [{DumpVsn,_}] = lookup_index(?erl_crash_dump),
NumAtoms = GenInfo#general_info.num_atoms,
- {WS,SH} = parse_vsn_str(GenInfo#general_info.system_vsn,4,false),
- NumProcs = list_to_integer(GenInfo#general_info.num_procs),
- ProcsSummary =
- if NumProcs > ?max_sort_process_num -> too_many;
- true -> State#state.procs_summary
- end,
- NewState = State#state{dump_vsn=[list_to_integer(L) ||
- L<-string:tokens(DumpVsn,".")],
- shared_heap=SH,
- wordsize=WS,
- num_atoms=NumAtoms,
- procs_summary=ProcsSummary},
- Reply = crashdump_viewer_html:general_info(GenInfo),
- {reply,Reply,NewState};
-handle_call({toggle,Input},_From,State) ->
- {ok,Index} = get_value("index",httpd:parse_query(Input)),
- do_toggle(list_to_integer(Index)),
- Reply = crashdump_viewer_html:menu_frame(),
- {reply,Reply,State};
-handle_call({expand,Input},_From,State=#state{file=File}) ->
- [{"pos",Pos},{"size",Size},{"what",What},{"truncated",Truncated}] =
- httpd:parse_query(Input),
- Expanded = get_expanded(File,list_to_integer(Pos),list_to_integer(Size)),
- TruncText = if Truncated=="true" -> "WARNING: This term is truncated!\n\n";
- true -> ""
- end,
- Reply =
- case {Truncated,What} of
- {_,"LastCalls"} ->
- LastCalls = replace_all($ ,$\n,Expanded,[]),
- crashdump_viewer_html:info_page(What,[TruncText,LastCalls]);
- {_,"StackDump"} ->
- crashdump_viewer_html:info_page(What,[TruncText,Expanded]);
- {"false",_} ->
- crashdump_viewer_html:pretty_info_page(What,Expanded);
- {"true",_} ->
- crashdump_viewer_html:info_page(What,[TruncText,Expanded])
- end,
- {reply,Reply,State};
-handle_call({expand_memory,Input},_From,State=#state{file=File,binaries=B}) ->
- [{"pid",Pid},{"what",What}] = httpd:parse_query(Input),
- Reply =
- case truncated_warning([{?proc,Pid}]) of
- [] ->
- Expanded = expand_memory(File,What,Pid,B),
- crashdump_viewer_html:expanded_memory(What,Expanded);
- _TW ->
- Info =
- "The crashdump is truncated in the middle of this "
- "process' memory information, so this information "
- "can not be extracted.",
- crashdump_viewer_html:info_page(What,Info)
- end,
- {reply,Reply,State};
-handle_call({expand_binary,Input},_From,State=#state{file=File}) ->
- [{"pos",Pos0}] = httpd:parse_query(Input),
- Pos = list_to_integer(Pos0),
+ WS = parse_vsn_str(GenInfo#general_info.system_vsn,4),
+ TW = case get(truncated) of
+ true -> ["WARNING: The crash dump is truncated. "
+ "Some information might be missing."];
+ false -> []
+ end,
+ {reply,{ok,GenInfo,TW},State#state{wordsize=WS, num_atoms=NumAtoms}};
+handle_call({expand_binary,{Offset,Size,Pos}},_From,State=#state{file=File}) ->
Fd = open(File),
pos_bof(Fd,Pos),
- {Bin,_Line} = get_binary(val(Fd)),
+ {Bin,_Line} = get_binary(Offset,Size,val(Fd)),
close(Fd),
- Reply=crashdump_viewer_html:expanded_binary(io_lib:format("~p",[Bin])),
- {reply,Reply,State};
-handle_call(general_info,_From,State=#state{file=File}) ->
- GenInfo=general_info(File),
- Reply = crashdump_viewer_html:general_info(GenInfo),
- {reply,Reply,State};
-handle_call({procs_summary,SessionId},_From,State) ->
- TW = truncated_warning([?proc]),
- NewState = procs_summary(SessionId,TW,"pid",State#state{sorted=undefined}),
- {reply,ok,NewState};
-handle_call({sort_procs,SessionId,Input}, _From, State) ->
- {ok,Sort} = get_value("sort",httpd:parse_query(Input)),
+ {reply,{ok,Bin},State};
+handle_call(procs_summary,_From,State=#state{file=File,wordsize=WS}) ->
TW = truncated_warning([?proc]),
- NewState = procs_summary(SessionId,TW,Sort,State),
- {reply,ok,NewState};
-handle_call({proc_details,Input},_From,State=#state{file=File,shared_heap=SH}) ->
- {ok,Pid} = get_value("pid",httpd:parse_query(Input)),
+ Procs = procs_summary(File,WS),
+ {reply,{ok,Procs,TW},State};
+handle_call({proc_details,Pid},_From,
+ State=#state{file=File,wordsize=WS,dump_vsn=DumpVsn,binaries=B})->
Reply =
- case get_proc_details(File,Pid,State#state.dump_vsn) of
- {ok,Proc} ->
- TW = truncated_warning([{?proc,Pid}]),
- crashdump_viewer_html:proc_details(Pid,Proc,TW,SH);
- {other_node,Node} ->
- TW = truncated_warning([?visible_node,
- ?hidden_node,
- ?not_connected]),
- crashdump_viewer_html:nods(Node,TW);
- not_found ->
- crashdump_viewer_html:info_page(["Could not find process: ",
- Pid],?space)
+ case get_proc_details(File,Pid,WS,DumpVsn,B) of
+ {ok,Proc,TW} ->
+ {ok,Proc,TW};
+ Other ->
+ {error,Other}
end,
{reply, Reply, State};
-handle_call({port,Input},_From,State=#state{file=File}) ->
- {ok,P} = get_value("port",httpd:parse_query(Input)),
- Id = [$#|P],
+handle_call({port,Id},_From,State=#state{file=File}) ->
Reply =
case get_port(File,Id) of
{ok,PortInfo} ->
TW = truncated_warning([{?port,Id}]),
- crashdump_viewer_html:port(Id,PortInfo,TW);
- {other_node,Node} ->
- TW = truncated_warning([?visible_node,
- ?hidden_node,
- ?not_connected]),
- crashdump_viewer_html:nods(Node,TW);
- not_found ->
- crashdump_viewer_html:info_page(
- ["Could not find port: ",Id],?space)
+ {ok,PortInfo,TW};
+ Other ->
+ {error,Other}
end,
{reply,Reply,State};
-handle_call({ports,SessionId},_From,State=#state{file=File}) ->
+handle_call(ports,_From,State=#state{file=File}) ->
TW = truncated_warning([?port]),
- get_ports(SessionId,File,TW),
- {reply,ok,State};
-handle_call({ets_tables,SessionId,Input},_From,State=#state{file=File,wordsize=WS}) ->
- {Pid,Heading} =
- case get_value("pid",httpd:parse_query(Input)) of
- {ok,P} ->
- {P,["ETS Tables for Process ",P]};
- error ->
- {'$2',"ETS Table Information"}
+ Ports = get_ports(File),
+ {reply,{ok,Ports,TW},State};
+handle_call({ets_tables,Pid0},_From,State=#state{file=File,wordsize=WS}) ->
+ Pid =
+ case Pid0 of
+ all -> '$2';
+ _ -> Pid0
end,
TW = truncated_warning([?ets]),
- get_ets_tables(SessionId,File,Heading,TW,Pid,WS),
- {reply,ok,State};
+ Ets = get_ets_tables(File,Pid,WS),
+ {reply,{ok,Ets,TW},State};
handle_call(internal_ets_tables,_From,State=#state{file=File,wordsize=WS}) ->
InternalEts = get_internal_ets_tables(File,WS),
TW = truncated_warning([?internal_ets]),
- Reply = crashdump_viewer_html:internal_ets_tables(InternalEts,TW),
- {reply,Reply,State};
-handle_call({timers,SessionId,Input},_From,State=#state{file=File}) ->
- {Pid,Heading} =
- case get_value("pid",httpd:parse_query(Input)) of
- {ok,P} -> {P,["Timers for Process ",P]};
- error -> {'$2',"Timer Information"}
+ {reply,{ok,InternalEts,TW},State};
+handle_call({timers,Pid0},_From,State=#state{file=File}) ->
+ Pid =
+ case Pid0 of
+ all -> '$2';
+ _ -> Pid0
end,
TW = truncated_warning([?timer]),
- get_timers(SessionId,File,Heading,TW,Pid),
- {reply,ok,State};
+ Timers = get_timers(File,Pid),
+ {reply,{ok,Timers,TW},State};
handle_call(dist_info,_From,State=#state{file=File}) ->
- Nods=nods(File),
TW = truncated_warning([?visible_node,?hidden_node,?not_connected]),
- Reply = crashdump_viewer_html:nods(Nods,TW),
+ Nods=nods(File),
+ {reply,{ok,Nods,TW},State};
+handle_call({node_info,Channel},_From,State=#state{file=File}) ->
+ Reply =
+ case get_node(File,Channel) of
+ {ok,Nod} ->
+ TW = truncated_warning([?visible_node,
+ ?hidden_node,
+ ?not_connected]),
+ {ok,Nod,TW};
+ {error,Other} ->
+ {error,Other}
+ end,
{reply,Reply,State};
-handle_call({loaded_mods,SessionId},_From,State=#state{file=File}) ->
+handle_call(loaded_mods,_From,State=#state{file=File}) ->
TW = truncated_warning([?mod]),
- loaded_mods(SessionId,File,TW),
- {reply,ok,State};
-handle_call({loaded_mod_details,Input},_From,State=#state{file=File}) ->
- {ok,Mod} = get_value("mod",httpd:parse_query(Input)),
- ModInfo = get_loaded_mod_details(File,Mod),
+ {_CC,_OC,Mods} = loaded_mods(File),
+ {reply,{ok,Mods,TW},State};
+handle_call({loaded_mod_details,Mod},_From,State=#state{file=File}) ->
TW = truncated_warning([{?mod,Mod}]),
- Reply = crashdump_viewer_html:loaded_mod_details(ModInfo,TW),
- {reply,Reply,State};
-handle_call({funs,SessionId},_From,State=#state{file=File}) ->
+ ModInfo = get_loaded_mod_details(File,Mod),
+ {reply,{ok,ModInfo,TW},State};
+handle_call(funs,_From,State=#state{file=File}) ->
TW = truncated_warning([?fu]),
- funs(SessionId,File,TW),
- {reply,ok,State};
-handle_call({atoms,SessionId},_From,State=#state{file=File,num_atoms=Num}) ->
- TW = truncated_warning([?atoms,?num_atoms]),
- atoms(SessionId,File,TW,Num),
- {reply,ok,State};
+ Funs = funs(File),
+ {reply,{ok,Funs,TW},State};
+handle_call(atoms,_From,State=#state{file=File,num_atoms=NumAtoms0}) ->
+ TW = truncated_warning([?atoms]),
+ NumAtoms = try list_to_integer(NumAtoms0) catch error:badarg -> -1 end,
+ Atoms = atoms(File,NumAtoms),
+ {reply,{ok,Atoms,TW},State};
handle_call(memory,_From,State=#state{file=File}) ->
Memory=memory(File),
TW = truncated_warning([?memory]),
- Reply = crashdump_viewer_html:memory(Memory,TW),
- {reply,Reply,State};
+ {reply,{ok,Memory,TW},State};
handle_call(allocated_areas,_From,State=#state{file=File}) ->
AllocatedAreas=allocated_areas(File),
TW = truncated_warning([?allocated_areas]),
- Reply = crashdump_viewer_html:allocated_areas(AllocatedAreas,TW),
- {reply,Reply,State};
+ {reply,{ok,AllocatedAreas,TW},State};
handle_call(allocator_info,_From,State=#state{file=File}) ->
SlAlloc=allocator_info(File),
TW = truncated_warning([?allocator]),
- Reply = crashdump_viewer_html:allocator_info(SlAlloc,TW),
- {reply,Reply,State};
+ {reply,{ok,SlAlloc,TW},State};
handle_call(hash_tables,_From,State=#state{file=File}) ->
HashTables=hash_tables(File),
TW = truncated_warning([?hash_table,?index_table]),
- Reply = crashdump_viewer_html:hash_tables(HashTables,TW),
- {reply,Reply,State};
+ {reply,{ok,HashTables,TW},State};
handle_call(index_tables,_From,State=#state{file=File}) ->
IndexTables=index_tables(File),
TW = truncated_warning([?hash_table,?index_table]),
- Reply = crashdump_viewer_html:index_tables(IndexTables,TW),
- {reply,Reply,State}.
+ {reply,{ok,IndexTables,TW},State}.
@@ -702,11 +440,18 @@ handle_call(index_tables,_From,State=#state{file=File}) ->
%% {noreply, State, Timeout} |
%% {stop, Reason, State} (terminate/2 is called)
%%--------------------------------------------------------------------
-handle_cast({background_done,{Page,File,Binaries},Dict}, State) ->
- lists:foreach(fun({Key,Val}) -> put(Key,Val) end, Dict),
- {noreply, State#state{file=File,binaries=Binaries,bg_status={done,Page}}};
-handle_cast({background_status,Status}, State) ->
- {noreply, State#state{bg_status=Status}}.
+handle_cast({read_file,File}, _State) ->
+ case do_read_file(File) of
+ {ok,Binaries,DumpVsn} ->
+ observer_lib:report_progress({ok,done}),
+ {noreply, #state{file=File,binaries=Binaries,dump_vsn=DumpVsn}};
+ Error ->
+ end_progress(Error),
+ {noreply, #state{}}
+ end;
+handle_cast(stop,State) ->
+ {stop,normal,State}.
+
%%--------------------------------------------------------------------
%% Function: handle_info/2
@@ -791,24 +536,6 @@ compare_pid("<"++Id,"<"++OtherId) ->
compare_pid(_,_) ->
false.
-background_status(Action,File) ->
- SizeInfo = filesizeinfo(File),
- background_status(Action,File,SizeInfo).
-
-background_status(processing,File,SizeInfo) ->
- "Processing " ++ File ++ SizeInfo;
-background_status(reading,File,SizeInfo) ->
- "Reading file " ++ File ++ SizeInfo.
-
-filesizeinfo(File) ->
- case file:read_file_info(File) of
- {ok,#file_info{size=Size}} ->
- " (" ++ integer_to_list(Size) ++ " bytes)";
- _X ->
- ""
- end.
-
-
open(File) ->
{ok,Fd} = file:open(File,[read,read_ahead,raw,binary]),
Fd.
@@ -861,6 +588,18 @@ get_chunk(Fd) ->
{ok,Bin}
end.
+%% Read and report progress
+progress_read(Fd) ->
+ {R,Bytes} =
+ case read(Fd) of
+ {ok,Bin} ->
+ {{ok,Bin},byte_size(Bin)};
+ Other ->
+ {Other,0}
+ end,
+ update_progress(Bytes),
+ R.
+
read(Fd) ->
file:read(Fd,?chunk_size).
@@ -962,73 +701,30 @@ get_rest_of_line_1(Fd, <<>>, Acc) ->
eof -> {eof,lists:reverse(Acc)}
end.
-count_rest_of_line(Fd) ->
- case get_chunk(Fd) of
- {ok,Bin} -> count_rest_of_line(Fd,Bin,0);
- eof -> {eof,0}
- end.
-count_rest_of_line(Fd,<<$\n:8,Bin/binary>>,N) ->
- put_chunk(Fd,Bin),
- N;
-count_rest_of_line(Fd,<<$\r:8,Bin/binary>>,N) ->
- count_rest_of_line(Fd,Bin,N);
-count_rest_of_line(Fd,<<_Char:8,Bin/binary>>,N) ->
- count_rest_of_line(Fd,Bin,N+1);
-count_rest_of_line(Fd,<<>>,N) ->
- case get_chunk(Fd) of
- {ok,Bin} -> count_rest_of_line(Fd,Bin,N);
- eof -> {eof,N}
- end.
-
-get_n_lines_of_tag(Fd,N) ->
+get_lines_to_empty(Fd) ->
case get_chunk(Fd) of
- {ok,Bin} ->
- {AllOrPart,Rest,Lines} = get_n_lines_of_tag(Fd,N,Bin,[]),
- {AllOrPart,N-Rest,Lines};
+ {ok,Bin} ->
+ get_lines_to_empty(Fd,Bin,[],[]);
eof ->
- empty
- end.
-get_n_lines_of_tag(Fd,N,<<"\n=",_/binary>>=Bin,Acc) ->
- put_chunk(Fd,Bin),
- {all,N-1,lists:reverse(Acc)};
-get_n_lines_of_tag(Fd,0,Bin,Acc) ->
- put_chunk(Fd,Bin),
- {part,0,lists:reverse(Acc)};
-get_n_lines_of_tag(Fd,N,<<$\n:8,Bin/binary>>,Acc) ->
- get_n_lines_of_tag(Fd,N-1,Bin,[$\n|Acc]);
-get_n_lines_of_tag(Fd,N,<<$\r:8,Bin/binary>>,Acc) ->
- get_n_lines_of_tag(Fd,N,Bin,Acc);
-get_n_lines_of_tag(Fd,N,<<Char:8,Bin/binary>>,Acc) ->
- get_n_lines_of_tag(Fd,N,Bin,[Char|Acc]);
-get_n_lines_of_tag(Fd,N,<<>>,Acc) ->
- case get_chunk(Fd) of
- {ok,Bin} ->
- get_n_lines_of_tag(Fd,N,Bin,Acc);
- eof ->
- case Acc of
- [$\n|_] ->
- {all,N,lists:reverse(Acc)};
- _ ->
- {all,N-1,lists:reverse(Acc)}
- end
- end.
-
-count_rest_of_tag(Fd) ->
- case get_chunk(Fd) of
- {ok,Bin} -> count_rest_of_tag(Fd,Bin,0);
- eof -> 0
+ []
end.
-count_rest_of_tag(Fd,<<"\n=",Bin/binary>>,N) ->
+get_lines_to_empty(Fd,<<$\n:8,Bin/binary>>,[],Lines) ->
put_chunk(Fd,Bin),
- N;
-count_rest_of_tag(Fd,<<$\r:8,Bin/binary>>,N) ->
- count_rest_of_tag(Fd,Bin,N);
-count_rest_of_tag(Fd,<<_Char:8,Bin/binary>>,N) ->
- count_rest_of_tag(Fd,Bin,N+1);
-count_rest_of_tag(Fd,<<>>,N) ->
+ lists:reverse(Lines);
+get_lines_to_empty(Fd,<<$\n:8,Bin/binary>>,Acc,Lines) ->
+ get_lines_to_empty(Fd,Bin,[],[lists:reverse(Acc)|Lines]);
+get_lines_to_empty(Fd,<<$\r:8,Bin/binary>>,Acc,Lines) ->
+ get_lines_to_empty(Fd,Bin,Acc,Lines);
+get_lines_to_empty(Fd,<<$\s:8,Bin/binary>>,[],Lines) ->
+ get_lines_to_empty(Fd,Bin,[],Lines);
+get_lines_to_empty(Fd,<<Char:8,Bin/binary>>,Acc,Lines) ->
+ get_lines_to_empty(Fd,Bin,[Char|Acc],Lines);
+get_lines_to_empty(Fd,<<>>,Acc,Lines) ->
case get_chunk(Fd) of
- {ok,Bin} -> count_rest_of_tag(Fd,Bin,N);
- eof -> N
+ {ok,Bin} ->
+ get_lines_to_empty(Fd,Bin,Acc,Lines);
+ eof ->
+ lists:reverse(Lines,[lists:reverse(Acc)])
end.
split(Str) ->
@@ -1046,150 +742,32 @@ split(Char,[H|T],Acc) ->
split(_Char,[],Acc) ->
{lists:reverse(Acc),[]}.
-size_or_term(Fd) ->
- size_or_term(Fd,get(pos)).
-size_or_term(Fd,Pos) ->
- case count_rest_of_line(Fd) of
- {eof,Size} ->
- {size,true,Size,Pos};
- Size when Size > ?max_display_size ->
- {size,false,Size,Pos};
- _Size ->
- {ok,Pos} = pos_bof(Fd,Pos),
- val(Fd)
- end.
-
%%%-----------------------------------------------------------------
%%%
-get_value(Key,List) ->
- case lists:keysearch(Key,1,List) of
- {value,{Key,Value}} -> {ok,Value};
- false -> error
- end.
-
-parse_vsn_str([],WS,false) ->
- %% If the log is translated, crashdump_translate might have written
- %% shared_heap=true in dictionary.
- case erase(shared_heap) of
- true -> {WS,true};
- _ -> {WS,false}
- end;
-parse_vsn_str([],WS,SH) ->
- {WS,SH};
-parse_vsn_str(Str,WS,SH) ->
+parse_vsn_str([],WS) ->
+ WS;
+parse_vsn_str(Str,WS) ->
case Str of
- "[64-bit]" ++ Rest ->
- case SH of
- false ->
- parse_vsn_str(Rest,8,false);
- _ ->
- {8,SH}
- end;
- "[shared heap]" ++ Rest ->
- case WS of
- 4 ->
- parse_vsn_str(Rest,WS,true);
- _ ->
- {WS,true}
- end;
+ "[64-bit]" ++ _Rest ->
+ 8;
[_Char|Rest] ->
- parse_vsn_str(Rest,WS,SH)
+ parse_vsn_str(Rest,WS)
end.
%%%-----------------------------------------------------------------
-%%%
-initial_menu() ->
- insert_items(
- [menu_item(0, {"./general_info","General information"},0),
- menu_item(0, {"./processes","Processes"}, 0),
- menu_item(0, {"./ports","Ports"}, 0),
- menu_item(2, "ETS tables", 0),
- menu_item(0, {"./ets_tables","ETS tables"}, 1),
- menu_item(0, {"./internal_ets_tables","Internal ETS tables"}, 1),
- menu_item(0, {"./timers","Timers"}, 0),
- menu_item(0, {"./fun_table","Fun table"}, 0),
- menu_item(0, {"./atoms","Atoms"}, 0),
- menu_item(0, {"./dist_info","Distribution information"}, 0),
- menu_item(0, {"./loaded_modules","Loaded modules"}, 0),
- menu_item(2, "Internal Tables", 0),
- menu_item(0, {"./hash_tables","Hash tables"}, 1),
- menu_item(0, {"./index_tables","Index tables"}, 1),
- menu_item(3, "Memory information", 0),
- menu_item(0, {"./memory","Memory"}, 1),
- menu_item(0, {"./allocated_areas","Allocated areas"}, 1),
- menu_item(0, {"./allocator_info","Allocator information"}, 1),
- menu_item(2, "Documentation", 0),
- menu_item(0, {"/crashdump_doc/crashdump_help.html",
- "Crashdump Viewer help"}, 1,"doc"),
- menu_item(0, {"/crashdump_erts_doc/crash_dump.html",
- "How to interpret Erlang crashdumps"}, 1,"doc")]).
-
-menu_item(Children,Text,Depth) ->
- menu_item(Children,Text,Depth,"main").
-menu_item(Children,Text,Depth,Target) ->
- #menu_item{picture=get_pic(Children),
- text=Text,
- depth=Depth,
- children=Children,
- state=if Depth==0 -> true; true -> false end,
- target=Target}.
-
-insert_items(Items) ->
- insert_items(Items,1).
-insert_items([Item|Items],Index) ->
- ets:insert(cdv_menu_table,Item#menu_item{index=Index}),
- insert_items(Items,Index+1);
-insert_items([],_) ->
- ok.
-
-get_pic(0) ->
- "";
-get_pic(_) ->
- "/crashdump_viewer/collapsd.gif".
-
-do_toggle(Index) ->
- [Item]= ets:lookup(cdv_menu_table,Index),
- case toggle_children(Index,Index+Item#menu_item.children,
- Item#menu_item.depth+1,undefined) of
- true ->
- ets:insert(cdv_menu_table,
- Item#menu_item{picture=
- "/crashdump_viewer/exploded.gif"});
- false ->
- ets:insert(cdv_menu_table,
- Item#menu_item{picture=
- "/crashdump_viewer/collapsd.gif"})
- end.
-
-toggle_children(Index,Max,_Depth,ToggleState) when Index>Max->
- ToggleState;
-toggle_children(Index,Max,Depth,ToggleState) ->
- case ets:lookup(cdv_menu_table,Index+1) of
- [#menu_item{depth=Depth}=Child] ->
- NewState = not Child#menu_item.state,
- ets:insert(cdv_menu_table,Child#menu_item{state=NewState}),
- toggle_children(Index+1,Max,Depth,NewState);
- _ ->
- toggle_children(Index+1,Max,Depth,ToggleState)
- end.
-
-%%%-----------------------------------------------------------------
%%% Traverse crash dump and insert index in table for each heading
-%%%
-%%% This function is executed in a background process in order to
-%%% avoid a timeout in the web browser. The browser displays "Please
-%%% wait..." while this is going on.
%%%
-%%% Variable written to process dictionary in this function are copied
-%%% to the crashdump_viewer_server when the function is completed (see
-%%% background_done/1).
-read_file(File) ->
+%%% Progress is reported during the time and MUST be checked with
+%%% crashdump_viewer:get_progress/0 until it returns {ok,done}.
+do_read_file(File) ->
case file:read_file_info(File) of
- {ok,#file_info{type=regular,access=FileA}} when FileA=:=read;
- FileA=:=read_write ->
+ {ok,#file_info{type=regular,
+ access=FileA,
+ size=Size}} when FileA=:=read; FileA=:=read_write ->
Fd = open(File),
- case read(Fd) of
+ init_progress("Reading file",Size),
+ case progress_read(Fd) of
{ok,<<$=:8,TagAndRest/binary>>} ->
{Tag,Id,Rest,N1} = tag(Fd,TagAndRest,1),
case Tag of
@@ -1197,41 +775,40 @@ read_file(File) ->
reset_index_table(),
insert_index(Tag,Id,N1+1),
put(last_tag,{Tag,""}),
- Status = background_status(processing,File),
- background_status(Status),
indexify(Fd,Rest,N1),
+ end_progress(),
check_if_truncated(),
- initial_menu(),
- Binaries = read_binaries(Fd),
- R = crashdump_viewer_html:start_page(),
+ [{DumpVsn0,_}] = lookup_index(?erl_crash_dump),
+ DumpVsn = [list_to_integer(L) ||
+ L<-string:tokens(DumpVsn0,".")],
+ Binaries = read_binaries(Fd,DumpVsn),
close(Fd),
- background_done({R,File,Binaries});
+ {ok,Binaries,DumpVsn};
_Other ->
- R = crashdump_viewer_html:error(
+ R = io_lib:format(
"~s is not an Erlang crash dump~n",
[File]),
close(Fd),
- background_done({R,undefined,undefined})
+ {error,R}
end;
{ok,<<"<Erlang crash dump>",_Rest/binary>>} ->
%% old version - no longer supported
- R = crashdump_viewer_html:error(
+ R = io_lib:format(
"The crashdump ~s is in the pre-R10B format, "
"which is no longer supported.~n",
- [File]),
+ [File]),
close(Fd),
- background_done({R,undefined,undefined});
+ {error,R};
_Other ->
- R = crashdump_viewer_html:error(
+ R = io_lib:format(
"~s is not an Erlang crash dump~n",
[File]),
close(Fd),
- background_done({R,undefined,undefined})
+ {error,R}
end;
_other ->
- R = crashdump_viewer_html:error("~s is not an Erlang crash dump~n",
- [File]),
- background_done({R,undefined,undefined})
+ R = io_lib:format("~s is not an Erlang crash dump~n",[File]),
+ {error,R}
end.
indexify(Fd,Bin,N) ->
@@ -1244,7 +821,7 @@ indexify(Fd,Bin,N) ->
put(last_tag,{Tag,Id}),
indexify(Fd,Rest,N1);
nomatch ->
- case read(Fd) of
+ case progress_read(Fd) of
{ok,Chunk0} when is_binary(Chunk0) ->
{Chunk,N1} =
case binary:last(Bin) of
@@ -1272,7 +849,7 @@ tag(Fd,<<Char:8,Rest/binary>>,N,Gat,Di,tag) ->
tag(Fd,<<Char:8,Rest/binary>>,N,Gat,Di,id) ->
tag(Fd,Rest,N+1,Gat,[Char|Di],id);
tag(Fd,<<>>,N,Gat,Di,Now) ->
- case read(Fd) of
+ case progress_read(Fd) of
{ok,Chunk} when is_binary(Chunk) ->
tag(Fd,Chunk,N,Gat,Di,Now);
eof ->
@@ -1304,21 +881,12 @@ find_truncated_proc({Tag,Pid}) ->
is_proc_tag(Tag) when Tag==?proc;
Tag==?proc_dictionary;
Tag==?proc_messages;
- Tag==?debug_proc_dictionary;
Tag==?proc_stack;
Tag==?proc_heap ->
true;
is_proc_tag(_) ->
false.
-%%% Inform the crashdump_viewer_server that a background job is completed.
-background_done(Result) ->
- Dict = get(),
- cast({background_done,Result,Dict}).
-
-background_status(Status) ->
- cast({background_status,Status}).
-
%%%-----------------------------------------------------------------
%%% Functions for reading information from the dump
general_info(File) ->
@@ -1330,22 +898,18 @@ general_info(File) ->
WholeLine -> WholeLine
end,
- GI0 = get_general_info(Fd,#general_info{created=Created}),
- GI = case GI0#general_info.num_atoms of
- ?space -> GI0#general_info{num_atoms=get_num_atoms(Fd)};
- _ -> GI0
- end,
+ GI = get_general_info(Fd,#general_info{created=Created}),
{MemTot,MemMax} =
case lookup_index(?memory) of
[{_,MemStart}] ->
pos_bof(Fd,MemStart),
Memory = get_meminfo(Fd,[]),
- Tot = case lists:keysearch("total",1,Memory) of
+ Tot = case lists:keysearch(total,1,Memory) of
{value,{_,T}} -> T;
false -> ""
end,
- Max = case lists:keysearch("maximum",1,Memory) of
+ Max = case lists:keysearch(maximum,1,Memory) of
{value,{_,M}} -> M;
false -> ""
end,
@@ -1408,269 +972,221 @@ get_general_info(Fd,GenInfo) ->
GenInfo
end.
-get_num_atoms(Fd) ->
- case lookup_index(?hash_table,"atom_tab") of
- [{_,Pos}] ->
- pos_bof(Fd,Pos),
- skip_rest_of_line(Fd), % size
- skip_rest_of_line(Fd), % used
- case line_head(Fd) of
- "objs" ->
- val(Fd);
- _1 ->
- get_num_atoms2()
- end;
- [] ->
- get_num_atoms2()
- end.
-get_num_atoms2() ->
- case lookup_index(?num_atoms) of
- [] ->
- ?space;
- [{NA,_Pos}] ->
- %% If dump is translated this will exist
- case get(truncated) of
- true ->
- [NA," (visible in dump)"]; % might be more
- false ->
- NA
- end
- end.
-
count() ->
{count_index(?proc),count_index(?ets),count_index(?fu),count_index(?timer)}.
%%-----------------------------------------------------------------
%% Page with all processes
-%%
-%% If there are less than ?max_sort_process_num processes in the dump,
-%% we will store the list of processes in the server state in order to
-%% allow sorting according to the different columns of the
-%% table. Since ?max_sort_process_num=:=?items_chunk_size, there will
-%% never be more than one chunk in this case.
-%%
-%% If there are more than ?max_sort_process_num processes in the dump,
-%% no sorting will be allowed, and the processes must be read (chunk
-%% by chunk) from the file each time the page is opened. This is to
-%% avoid really big data in the server state.
-procs_summary(SessionId,TW,_,State=#state{procs_summary=too_many}) ->
- chunk_page(SessionId,State#state.file,TW,?proc,processes,
- {no_sort,State#state.shared_heap,State#state.dump_vsn},
- procs_summary_parsefun()),
- State;
-procs_summary(SessionId,TW,SortOn,State) ->
- ProcsSummary =
- case State#state.procs_summary of
- undefined -> % first time - read from file
- Fd = open(State#state.file),
- {PS,_}=lookup_and_parse_index_chunk(first_chunk_pointer(?proc),
- Fd,procs_summary_parsefun()),
- close(Fd),
- PS;
- PS ->
- PS
- end,
- {SortedPS,NewSorted} = do_sort_procs(SortOn,ProcsSummary,State),
- HtmlInfo =
- crashdump_viewer_html:chunk_page(processes,SessionId,TW,
- {SortOn,
- State#state.shared_heap,
- State#state.dump_vsn},
- SortedPS),
- crashdump_viewer_html:chunk(SessionId,done,HtmlInfo),
- State#state{procs_summary=ProcsSummary,sorted=NewSorted}.
-
-procs_summary_parsefun() ->
- fun(Fd,Pid) ->
- get_procinfo(Fd,fun main_procinfo/4,#proc{pid=Pid})
- end.
+procs_summary(File,WS) ->
+ ParseFun = fun(Fd,Pid0) ->
+ Pid = list_to_pid(Pid0),
+ Proc = get_procinfo(Fd,fun main_procinfo/5,
+ #proc{pid=Pid},WS),
+ case Proc#proc.name of
+ undefined ->
+ true;
+ Name ->
+ %% Registered process - store to allow
+ %% lookup for timers connected to
+ %% registered name instead of pid.
+ ets:insert(cdv_reg_proc_table,{Name,Pid}),
+ ets:insert(cdv_reg_proc_table,{Pid0,Name})
+ end,
+ case Proc#proc.memory of
+ undefined -> Proc#proc{memory=Proc#proc.stack_heap};
+ _ -> Proc
+ end
+ end,
+ lookup_and_parse_index(File,?proc,ParseFun,"processes").
%%-----------------------------------------------------------------
%% Page with one process
-get_proc_details(File,Pid,DumpVsn) ->
+get_proc_details(File,Pid,WS,DumpVsn,Binaries) ->
case lookup_index(?proc,Pid) of
[{_,Start}] ->
Fd = open(File),
- pos_bof(Fd,Start),
- Proc0 =
- case DumpVsn of
- [0,0] ->
- %% Old version (translated)
- #proc{pid=Pid};
- _ ->
- #proc{pid=Pid,
- stack_dump=if_exist(?proc_stack,Pid),
- msg_q=if_exist(?proc_messages,Pid),
- dict=if_exist(?proc_dictionary,Pid),
- debug_dict=if_exist(?debug_proc_dictionary,Pid)}
+ {{Stack,MsgQ,Dict},TW} =
+ case truncated_warning([{?proc,Pid}]) of
+ [] ->
+ {expand_memory(Fd,Pid,DumpVsn,Binaries),[]};
+ TW0 ->
+ {{[],[],[]},TW0}
end,
- Proc = get_procinfo(Fd,fun all_procinfo/4,Proc0),
+ pos_bof(Fd,Start),
+ Proc0 = #proc{pid=Pid,stack_dump=Stack,msg_q=MsgQ,dict=Dict},
+ Proc = get_procinfo(Fd,fun all_procinfo/5,Proc0,WS),
close(Fd),
- {ok,Proc};
+ {ok,Proc,TW};
_ ->
- case maybe_other_node(File,Pid) of
- {other_node,Type,Node} ->
- Info = "The process you are searching for was residing on "
- "a remote node. No process information is available. "
- "Information about the remote node is show below.",
- {other_node,{Type,Info,Node}};
- not_found ->
- not_found
- end
+ maybe_other_node(Pid)
end.
-if_exist(Tag,Key) ->
- case count_index(Tag,Key) of
- 0 ->
- Tag1 =
- case is_proc_tag(Tag) of
- true -> ?proc;
- false -> Tag
- end,
- case truncated_here({Tag1,Key}) of
- true -> truncated;
- false -> ?space
- end;
- _ ->
- expand
- end.
-
-get_procinfo(Fd,Fun,Proc) ->
+get_procinfo(Fd,Fun,Proc,WS) ->
case line_head(Fd) of
"State" ->
State = case val(Fd) of
"Garbing" -> "Garbing\n(limited info)";
State0 -> State0
end,
- get_procinfo(Fd,Fun,Proc#proc{state=State});
+ get_procinfo(Fd,Fun,Proc#proc{state=State},WS);
"Name" ->
- get_procinfo(Fd,Fun,Proc#proc{name=val(Fd)});
+ get_procinfo(Fd,Fun,Proc#proc{name=val(Fd)},WS);
"Spawned as" ->
IF = val(Fd),
case Proc#proc.name of
- ?space ->
- get_procinfo(Fd,Fun,Proc#proc{name=IF,init_func=IF});
+ undefined ->
+ get_procinfo(Fd,Fun,Proc#proc{name=IF,init_func=IF},WS);
_ ->
- get_procinfo(Fd,Fun,Proc#proc{init_func=IF})
+ get_procinfo(Fd,Fun,Proc#proc{init_func=IF},WS)
end;
+ "Message queue length" ->
+ %% stored as integer so we can sort on it
+ get_procinfo(Fd,Fun,Proc#proc{msg_q_len=list_to_integer(val(Fd))},WS);
+ "Reductions" ->
+ %% stored as integer so we can sort on it
+ get_procinfo(Fd,Fun,Proc#proc{reds=list_to_integer(val(Fd))},WS);
+ "Stack+heap" ->
+ %% stored as integer so we can sort on it
+ get_procinfo(Fd,Fun,Proc#proc{stack_heap=
+ list_to_integer(val(Fd))*WS},WS);
+ "Memory" ->
+ %% stored as integer so we can sort on it
+ get_procinfo(Fd,Fun,Proc#proc{memory=list_to_integer(val(Fd))},WS);
+ {eof,_} ->
+ Proc; % truncated file
+ Other ->
+ Fun(Fd,Fun,Proc,WS,Other)
+ end.
+
+main_procinfo(Fd,Fun,Proc,WS,LineHead) ->
+ case LineHead of
+ "=" ++ _next_tag ->
+ Proc;
+ "arity = " ++ _ ->
+ %%! Temporary workaround
+ get_procinfo(Fd,Fun,Proc,WS);
+ _Other ->
+ skip_rest_of_line(Fd),
+ get_procinfo(Fd,Fun,Proc,WS)
+ end.
+all_procinfo(Fd,Fun,Proc,WS,LineHead) ->
+ case LineHead of
+ %% - START - moved from get_procinfo -
"Spawned by" ->
case val(Fd) of
"[]" ->
- get_procinfo(Fd,Fun,Proc);
+ get_procinfo(Fd,Fun,Proc,WS);
Parent ->
- get_procinfo(Fd,Fun,Proc#proc{parent=Parent})
+ get_procinfo(Fd,Fun,Proc#proc{parent=Parent},WS)
end;
"Started" ->
- get_procinfo(Fd,Fun,Proc#proc{start_time=val(Fd)});
+ get_procinfo(Fd,Fun,Proc#proc{start_time=val(Fd)},WS);
"Last scheduled in for" ->
get_procinfo(Fd,Fun,Proc#proc{current_func=
{"Last scheduled in for",
- val(Fd)}});
+ val(Fd)}},WS);
"Current call" ->
get_procinfo(Fd,Fun,Proc#proc{current_func={"Current call",
- val(Fd)}});
- "Message queue length" ->
- %% stored as integer so we can sort on it
- get_procinfo(Fd,Fun,Proc#proc{msg_q_len=list_to_integer(val(Fd))});
- "Reductions" ->
- %% stored as integer so we can sort on it
- get_procinfo(Fd,Fun,Proc#proc{reds=list_to_integer(val(Fd))});
+ val(Fd)}},WS);
"Number of heap fragments" ->
- get_procinfo(Fd,Fun,Proc#proc{num_heap_frag=val(Fd)});
+ get_procinfo(Fd,Fun,Proc#proc{num_heap_frag=val(Fd)},WS);
"Heap fragment data" ->
- get_procinfo(Fd,Fun,Proc#proc{heap_frag_data=val(Fd)});
- Stack when Stack=:="Stack+heap"; Stack=:="Stack" ->
- %% stored as integer so we can sort on it
- get_procinfo(Fd,Fun,Proc#proc{stack_heap=
- list_to_integer(val(Fd))});
+ get_procinfo(Fd,Fun,Proc#proc{heap_frag_data=val(Fd)},WS);
"OldHeap" ->
- get_procinfo(Fd,Fun,Proc#proc{old_heap=val(Fd)});
+ Bytes = list_to_integer(val(Fd))*WS,
+ get_procinfo(Fd,Fun,Proc#proc{old_heap=Bytes},WS);
"Heap unused" ->
- get_procinfo(Fd,Fun,Proc#proc{heap_unused=val(Fd)});
+ Bytes = list_to_integer(val(Fd))*WS,
+ get_procinfo(Fd,Fun,Proc#proc{heap_unused=Bytes},WS);
"OldHeap unused" ->
- get_procinfo(Fd,Fun,Proc#proc{old_heap_unused=val(Fd)});
+ Bytes = list_to_integer(val(Fd))*WS,
+ get_procinfo(Fd,Fun,Proc#proc{old_heap_unused=Bytes},WS);
"New heap start" ->
- get_procinfo(Fd,Fun,Proc#proc{new_heap_start=val(Fd)});
+ get_procinfo(Fd,Fun,Proc#proc{new_heap_start=val(Fd)},WS);
"New heap top" ->
- get_procinfo(Fd,Fun,Proc#proc{new_heap_top=val(Fd)});
+ get_procinfo(Fd,Fun,Proc#proc{new_heap_top=val(Fd)},WS);
"Stack top" ->
- get_procinfo(Fd,Fun,Proc#proc{stack_top=val(Fd)});
+ get_procinfo(Fd,Fun,Proc#proc{stack_top=val(Fd)},WS);
"Stack end" ->
- get_procinfo(Fd,Fun,Proc#proc{stack_end=val(Fd)});
+ get_procinfo(Fd,Fun,Proc#proc{stack_end=val(Fd)},WS);
"Old heap start" ->
- get_procinfo(Fd,Fun,Proc#proc{old_heap_start=val(Fd)});
+ get_procinfo(Fd,Fun,Proc#proc{old_heap_start=val(Fd)},WS);
"Old heap top" ->
- get_procinfo(Fd,Fun,Proc#proc{old_heap_top=val(Fd)});
+ get_procinfo(Fd,Fun,Proc#proc{old_heap_top=val(Fd)},WS);
"Old heap end" ->
- get_procinfo(Fd,Fun,Proc#proc{old_heap_end=val(Fd)});
- "Memory" ->
- %% stored as integer so we can sort on it
- get_procinfo(Fd,Fun,Proc#proc{memory=list_to_integer(val(Fd))});
- {eof,_} ->
- Proc; % truncated file
- Other ->
- Fun(Fd,Fun,Proc,Other)
- end.
-
-main_procinfo(Fd,Fun,Proc,LineHead) ->
- case LineHead of
- "Stack dump" ->
- %% This is the last element in older dumps (DumpVsn=0.0)
- Proc;
- "=" ++ _next_tag ->
- %% DumpVsn=0.1 or newer: No stack dump here
- Proc;
- "arity = " ++ _ ->
- %%! Temporary workaround
- get_procinfo(Fd,Fun,Proc);
- _Other ->
- skip_rest_of_line(Fd),
- get_procinfo(Fd,Fun,Proc)
- end.
-all_procinfo(Fd,Fun,Proc,LineHead) ->
- case LineHead of
- "Message queue" ->
- get_procinfo(Fd,Fun,Proc#proc{msg_q=size_or_term(Fd)});
+ get_procinfo(Fd,Fun,Proc#proc{old_heap_end=val(Fd)},WS);
+ %% - END - moved from get_procinfo -
"Last calls" ->
- R = case size_or_term(Fd) of
- SizeThing when is_tuple(SizeThing) ->
- Proc#proc{last_calls=SizeThing};
- Term ->
- Proc#proc{last_calls=replace_all($ ,$\n,Term,[])}
- end,
- get_procinfo(Fd,Fun,R);
+ get_procinfo(Fd,Fun,Proc#proc{last_calls=get_lines_to_empty(Fd)},WS);
"Link list" ->
- get_procinfo(Fd,Fun,Proc#proc{links=val(Fd)});
+ {Links,Monitors,MonitoredBy} = parse_link_list(val(Fd),[],[],[]),
+ get_procinfo(Fd,Fun,Proc#proc{links=Links,
+ monitors=Monitors,
+ mon_by=MonitoredBy},WS);
"Program counter" ->
- get_procinfo(Fd,Fun,Proc#proc{prog_count=val(Fd)});
+ get_procinfo(Fd,Fun,Proc#proc{prog_count=val(Fd)},WS);
"CP" ->
- get_procinfo(Fd,Fun,Proc#proc{cp=val(Fd)});
+ get_procinfo(Fd,Fun,Proc#proc{cp=val(Fd)},WS);
"arity = " ++ Arity ->
%%! Temporary workaround
- get_procinfo(Fd,Fun,Proc#proc{arity=Arity--"\r\n"});
- "Dictionary" ->
- get_procinfo(Fd,Fun,Proc#proc{dict=size_or_term(Fd)});
- "$Dictionary" ->
- get_procinfo(Fd,Fun,Proc#proc{debug_dict=size_or_term(Fd)});
- "Stack dump" ->
- %% This is the last element in older dumps (DumpVsn=0.0)
- get_stack_dump(Fd,Proc);
+ get_procinfo(Fd,Fun,Proc#proc{arity=Arity--"\r\n"},WS);
"=" ++ _next_tag ->
- %% DumpVsn=0.1 or newer: No stack dump here
Proc;
Other ->
unexpected(Fd,Other,"process info"),
- get_procinfo(Fd,Fun,Proc)
+ get_procinfo(Fd,Fun,Proc,WS)
+ end.
+
+parse_link_list([SB|Str],Links,Monitors,MonitoredBy) when SB==$[; SB==$] ->
+ parse_link_list(Str,Links,Monitors,MonitoredBy);
+parse_link_list("#Port"++_=Str,Links,Monitors,MonitoredBy) ->
+ {Link,Rest} = parse_port(Str),
+ parse_link_list(Rest,[Link|Links],Monitors,MonitoredBy);
+parse_link_list("<"++_=Str,Links,Monitors,MonitoredBy) ->
+ {Link,Rest} = parse_pid(Str),
+ parse_link_list(Rest,[Link|Links],Monitors,MonitoredBy);
+parse_link_list("{to,"++Str,Links,Monitors,MonitoredBy) ->
+ {Mon,Rest} = parse_monitor(Str),
+ parse_link_list(Rest,Links,[Mon|Monitors],MonitoredBy);
+parse_link_list("{from,"++Str,Links,Monitors,MonitoredBy) ->
+ {Mon,Rest} = parse_monitor(Str),
+ parse_link_list(Rest,Links,Monitors,[Mon|MonitoredBy]);
+parse_link_list(", "++Rest,Links,Monitors,MonitoredBy) ->
+ parse_link_list(Rest,Links,Monitors,MonitoredBy);
+parse_link_list([],Links,Monitors,MonitoredBy) ->
+ {lists:reverse(Links),lists:reverse(Monitors),lists:reverse(MonitoredBy)}.
+
+parse_port(Str) ->
+ {Port,Rest} = parse_link(Str,[]),
+ {{Port,Port},Rest}.
+
+parse_pid(Str) ->
+ {Pid,Rest} = parse_link(Str,[]),
+ {{Pid,Pid},Rest}.
+
+parse_monitor(Str) ->
+ case parse_link(Str,[]) of
+ {Pid,","++Rest1} ->
+ case parse_link(Rest1,[]) of
+ {Ref,"}"++Rest2} ->
+ {{Pid,Pid++" ("++Ref++")"},Rest2};
+ {Ref,[]} ->
+ {{Pid,Pid++" ("++Ref++")"},[]}
+ end;
+ {Pid,[]} ->
+ {{Pid,Pid++" (unknown_ref)"},[]}
end.
-get_stack_dump(Fd,Proc) ->
- %% Always show stackdump as "Expand" link
- Pos = get(pos),
- Size = count_rest_of_tag(Fd),
- Proc#proc{stack_dump={size,true,Size,Pos}}.
+parse_link(">"++Rest,Acc) ->
+ {lists:reverse(Acc,">"),Rest};
+parse_link([H|T],Acc) ->
+ parse_link(T,[H|Acc]);
+parse_link([],Acc) ->
+ %% truncated
+ {lists:reverse(Acc),[]}.
-maybe_other_node(File,Id) ->
+maybe_other_node(Id) ->
Channel =
case split($.,Id) of
{"<" ++ N, _Rest} ->
@@ -1688,99 +1204,77 @@ maybe_other_node(File,Id) ->
end),
case ets:select(cdv_dump_index_table,Ms) of
- [] ->
+ [] ->
not_found;
- [{Type,Pos}] ->
- Fd = open(File),
- NodeInfo = get_nodeinfo(Fd,Channel,Pos),
- close(Fd),
- {other_node,Type,NodeInfo}
+ [_] ->
+ {other_node,Channel}
end.
-expand_memory(File,What,Pid,Binaries) ->
- Fd = open(File),
+expand_memory(Fd,Pid,DumpVsn,Binaries) ->
+ BinAddrAdj = get_bin_addr_adj(DumpVsn),
put(fd,Fd),
- Dict = read_heap(Fd,Pid,Binaries),
- Expanded =
- case What of
- "StackDump" -> read_stack_dump(Fd,Pid,Dict);
- "MsgQueue" -> read_messages(Fd,Pid,Dict);
- "Dictionary" -> read_dictionary(Fd,?proc_dictionary,Pid,Dict);
- "DebugDictionary" -> read_dictionary(Fd,?debug_proc_dictionary,Pid,Dict)
- end,
+ Dict = read_heap(Fd,Pid,BinAddrAdj,Binaries),
+ Expanded = {read_stack_dump(Fd,Pid,BinAddrAdj,Dict),
+ read_messages(Fd,Pid,BinAddrAdj,Dict),
+ read_dictionary(Fd,Pid,BinAddrAdj,Dict)},
erase(fd),
- close(Fd),
Expanded.
-
+
+%%%-----------------------------------------------------------------
+%%% This is a workaround for a bug in dump versions prior to 0.3:
+%%% Addresses were truncated to 32 bits. This could cause binaries to
+%%% get the same address as heap terms in the dump. To work around it
+%%% we always store binaries on very high addresses in the gb_tree.
+get_bin_addr_adj(DumpVsn) when DumpVsn < [0,3] ->
+ 16#f bsl 64;
+get_bin_addr_adj(_) ->
+ 0.
+
%%%
%%% Read binaries.
%%%
-read_binaries(Fd) ->
+read_binaries(Fd,DumpVsn) ->
AllBinaries = lookup_index(?binary),
- read_binaries(Fd,AllBinaries, gb_trees:empty()).
-
-read_binaries(Fd,[{Addr0,Pos}|Bins],Dict0) ->
- pos_bof(Fd,Pos),
- {Addr,_} = get_hex(Addr0),
- Dict =
- case line_head(Fd) of
- {eof,_} ->
- gb_trees:enter(Addr,'#CDVTruncatedBinary',Dict0);
- Size0 ->
- {Size,_} = get_hex(Size0),
- if Size > ?max_display_binary_size ->
- gb_trees:enter(Addr,{'#CDVTooBig',binary,Pos},Dict0);
- true ->
- pos_bof(Fd,Pos),
- Line = val(Fd),
- parse_binary(Addr,Line,Dict0)
- end
- end,
- read_binaries(Fd,Bins,Dict);
-read_binaries(_Fd,[],Dict) ->
- Dict.
-
-parse_binary(Addr, Line0, Dict) ->
- case get_hex(Line0) of
- {N,":"++Line1} ->
- {Bin,Line} = get_binary(N, Line1, []),
- [] = skip_blanks(Line),
- gb_trees:enter(Addr, Bin, Dict);
- {_N,[]} ->
- %% If the dump is truncated before the ':' in this line, then
- %% line_head/1 might not discover it (if a \n has been inserted
- %% somehow???)
- gb_trees:enter(Addr,'#CDVTruncatedBinary',Dict)
- end.
-
-
+ AddrAdj = get_bin_addr_adj(DumpVsn),
+ Fun = fun({Addr0,Pos},Dict0) ->
+ pos_bof(Fd,Pos),
+ {HexAddr,_} = get_hex(Addr0),
+ Addr = HexAddr bor AddrAdj,
+ Bin =
+ case line_head(Fd) of
+ {eof,_} -> '#CDVTruncatedBinary';
+ _Size -> {'#CDVBin',Pos}
+ end,
+ gb_trees:enter(Addr,Bin,Dict0)
+ end,
+ progress_foldl("Processing binaries",Fun,gb_trees:empty(),AllBinaries).
%%%
%%% Read top level section.
%%%
-read_stack_dump(Fd,Pid,Dict) ->
+read_stack_dump(Fd,Pid,BinAddrAdj,Dict) ->
case lookup_index(?proc_stack,Pid) of
[{_,Start}] ->
pos_bof(Fd,Start),
- read_stack_dump1(Fd,Dict,[]);
+ read_stack_dump1(Fd,BinAddrAdj,Dict,[]);
[] ->
[]
end.
-read_stack_dump1(Fd,Dict,Acc) ->
+read_stack_dump1(Fd,BinAddrAdj,Dict,Acc) ->
%% This function is never called if the dump is truncated in {?proc_heap,Pid}
case val(Fd) of
"=" ++ _next_tag ->
lists:reverse(Acc);
Line ->
- Stack = parse_top(Line,Dict),
- read_stack_dump1(Fd,Dict,[Stack|Acc])
+ Stack = parse_top(Line,BinAddrAdj,Dict),
+ read_stack_dump1(Fd,BinAddrAdj,Dict,[Stack|Acc])
end.
-parse_top(Line0, D) ->
+parse_top(Line0, BinAddrAdj, D) ->
{Label,Line1} = get_label(Line0),
- {Term,Line,D} = parse_term(Line1, D),
+ {Term,Line,D} = parse_term(Line1, BinAddrAdj, D),
[] = skip_blanks(Line),
{Label,Term}.
@@ -1788,27 +1282,27 @@ parse_top(Line0, D) ->
%%% Read message queue.
%%%
-read_messages(Fd,Pid,Dict) ->
+read_messages(Fd,Pid,BinAddrAdj,Dict) ->
case lookup_index(?proc_messages,Pid) of
[{_,Start}] ->
pos_bof(Fd,Start),
- read_messages1(Fd,Dict,[]);
+ read_messages1(Fd,BinAddrAdj,Dict,[]);
[] ->
[]
end.
-read_messages1(Fd,Dict,Acc) ->
+read_messages1(Fd,BinAddrAdj,Dict,Acc) ->
%% This function is never called if the dump is truncated in {?proc_heap,Pid}
case val(Fd) of
"=" ++ _next_tag ->
lists:reverse(Acc);
Line ->
- Msg = parse_message(Line,Dict),
- read_messages1(Fd,Dict,[Msg|Acc])
+ Msg = parse_message(Line,BinAddrAdj,Dict),
+ read_messages1(Fd,BinAddrAdj,Dict,[Msg|Acc])
end.
-parse_message(Line0, D) ->
- {Msg,":"++Line1,_} = parse_term(Line0, D),
- {Token,Line,_} = parse_term(Line1, D),
+parse_message(Line0, BinAddrAdj, D) ->
+ {Msg,":"++Line1,_} = parse_term(Line0, BinAddrAdj, D),
+ {Token,Line,_} = parse_term(Line1, BinAddrAdj, D),
[] = skip_blanks(Line),
{Msg,Token}.
@@ -1816,26 +1310,26 @@ parse_message(Line0, D) ->
%%% Read process dictionary
%%%
-read_dictionary(Fd,Tag,Pid,Dict) ->
- case lookup_index(Tag,Pid) of
+read_dictionary(Fd,Pid,BinAddrAdj,Dict) ->
+ case lookup_index(?proc_dictionary,Pid) of
[{_,Start}] ->
pos_bof(Fd,Start),
- read_dictionary1(Fd,Dict,[]);
+ read_dictionary1(Fd,BinAddrAdj,Dict,[]);
[] ->
[]
end.
-read_dictionary1(Fd,Dict,Acc) ->
+read_dictionary1(Fd,BinAddrAdj,Dict,Acc) ->
%% This function is never called if the dump is truncated in {?proc_heap,Pid}
case val(Fd) of
"=" ++ _next_tag ->
lists:reverse(Acc);
Line ->
- Msg = parse_dictionary(Line,Dict),
- read_dictionary1(Fd,Dict,[Msg|Acc])
+ Msg = parse_dictionary(Line,BinAddrAdj,Dict),
+ read_dictionary1(Fd,BinAddrAdj,Dict,[Msg|Acc])
end.
-parse_dictionary(Line0, D) ->
- {Entry,Line,_} = parse_term(Line0, D),
+parse_dictionary(Line0, BinAddrAdj, D) ->
+ {Entry,Line,_} = parse_term(Line0, BinAddrAdj, D),
[] = skip_blanks(Line),
Entry.
@@ -1843,16 +1337,16 @@ parse_dictionary(Line0, D) ->
%%% Read heap data.
%%%
-read_heap(Fd,Pid,Dict0) ->
+read_heap(Fd,Pid,BinAddrAdj,Dict0) ->
case lookup_index(?proc_heap,Pid) of
[{_,Pos}] ->
pos_bof(Fd,Pos),
- read_heap(Dict0);
+ read_heap(BinAddrAdj,Dict0);
[] ->
Dict0
end.
-read_heap(Dict0) ->
+read_heap(BinAddrAdj,Dict0) ->
%% This function is never called if the dump is truncated in {?proc_heap,Pid}
case get(fd) of
end_of_heap ->
@@ -1863,68 +1357,18 @@ read_heap(Dict0) ->
put(fd, end_of_heap),
Dict0;
Line ->
- Dict = parse(Line,Dict0),
- read_heap(Dict)
+ Dict = parse(Line,BinAddrAdj,Dict0),
+ read_heap(BinAddrAdj,Dict)
end
end.
-parse(Line0, Dict0) ->
+parse(Line0, BinAddrAdj, Dict0) ->
{Addr,":"++Line1} = get_hex(Line0),
- {_Term,Line,Dict} = parse_heap_term(Line1, Addr, Dict0),
+ {_Term,Line,Dict} = parse_heap_term(Line1, Addr, BinAddrAdj, Dict0),
[] = skip_blanks(Line),
Dict.
-do_sort_procs("state",Procs,#state{sorted="state"}) ->
- {lists:reverse(lists:keysort(#proc.state,Procs)),"rstate"};
-do_sort_procs("state",Procs,_) ->
- {lists:keysort(#proc.state,Procs),"state"};
-do_sort_procs("pid",Procs,#state{sorted="pid"}) ->
- {lists:reverse(Procs),"rpid"};
-do_sort_procs("pid",Procs,_) ->
- {Procs,"pid"};
-do_sort_procs("msg_q_len",Procs,#state{sorted="msg_q_len"}) ->
- {lists:keysort(#proc.msg_q_len,Procs),"rmsg_q_len"};
-do_sort_procs("msg_q_len",Procs,_) ->
- {lists:reverse(lists:keysort(#proc.msg_q_len,Procs)),"msg_q_len"};
-do_sort_procs("reds",Procs,#state{sorted="reds"}) ->
- {lists:keysort(#proc.reds,Procs),"rreds"};
-do_sort_procs("reds",Procs,_) ->
- {lists:reverse(lists:keysort(#proc.reds,Procs)),"reds"};
-do_sort_procs("mem",Procs,#state{sorted="mem",dump_vsn=DumpVsn}) ->
- KeyPos = if DumpVsn>=?r16b01_dump_vsn -> #proc.memory;
- true -> #proc.stack_heap
- end,
- {lists:keysort(KeyPos,Procs),"rmem"};
-do_sort_procs("mem",Procs,#state{dump_vsn=DumpVsn}) ->
- KeyPos = if DumpVsn>=?r16b01_dump_vsn -> #proc.memory;
- true -> #proc.stack_heap
- end,
- {lists:reverse(lists:keysort(KeyPos,Procs)),"mem"};
-do_sort_procs("init_func",Procs,#state{sorted="init_func"}) ->
- {lists:reverse(lists:keysort(#proc.init_func,Procs)),"rinit_func"};
-do_sort_procs("init_func",Procs,_) ->
- {lists:keysort(#proc.init_func,Procs),"init_func"};
-do_sort_procs("name_func",Procs,#state{sorted="name_func"}) ->
- {lists:reverse(lists:keysort(#proc.name,Procs)),"rname_func"};
-do_sort_procs("name_func",Procs,_) ->
- {lists:keysort(#proc.name,Procs),"name_func"};
-do_sort_procs("name",Procs,#state{sorted=Sorted}) ->
- {No,Yes} =
- lists:foldl(fun(P,{N,Y}) ->
- case P#proc.name of
- ?space -> {[P|N],Y};
- _other -> {N,[P|Y]}
- end
- end,
- {[],[]},
- Procs),
- Result = lists:keysort(#proc.name,Yes) ++ No,
- case Sorted of
- "name" -> {lists:reverse(Result),"rname"};
- _ -> {Result,"name"}
- end.
-
%%-----------------------------------------------------------------
%% Page with one port
get_port(File,Port) ->
@@ -1936,46 +1380,59 @@ get_port(File,Port) ->
close(Fd),
{ok,R};
[] ->
- case maybe_other_node(File,Port) of
- {other_node,Type,Node} ->
- Info = "The port you are searching for was residing on "
- "a remote node. No port information is available. "
- "Information about the remote node is show below.",
- {other_node,{Type,Info,Node}};
- not_found ->
- not_found
- end
+ maybe_other_node(Port)
end.
%%-----------------------------------------------------------------
%% Page with all ports
-get_ports(SessionId,File,TW) ->
- ParseFun = fun(Fd,Id) -> get_portinfo(Fd,#port{id=Id}) end,
- chunk_page(SessionId,File,TW,?port,ports,[],ParseFun).
+get_ports(File) ->
+ ParseFun = fun(Fd,Id) -> get_portinfo(Fd,#port{id=port_to_tuple(Id)}) end,
+ lookup_and_parse_index(File,?port,ParseFun,"ports").
+
+%% Converting port string to tuple to secure correct sorting. This is
+%% converted back in cdv_port_cb:format/1.
+port_to_tuple("#Port<"++Port) ->
+ [I1,I2] = string:tokens(Port,".>"),
+ {list_to_integer(I1),list_to_integer(I2)}.
get_portinfo(Fd,Port) ->
case line_head(Fd) of
"Slot" ->
- get_portinfo(Fd,Port#port{slot=val(Fd)});
+ %% stored as integer so we can sort on it
+ get_portinfo(Fd,Port#port{slot=list_to_integer(val(Fd))});
"Connected" ->
- get_portinfo(Fd,Port#port{connected=val(Fd)});
+ %% stored as pid so we can sort on it
+ Connected0 = val(Fd),
+ Connected =
+ try list_to_pid(Connected0)
+ catch error:badarg -> Connected0
+ end,
+ get_portinfo(Fd,Port#port{connected=Connected});
"Links" ->
- get_portinfo(Fd,Port#port{links=val(Fd)});
+ Pids = split_pid_list_no_space(val(Fd)),
+ Links = [{Pid,Pid} || Pid <- Pids],
+ get_portinfo(Fd,Port#port{links=Links});
"Registered as" ->
get_portinfo(Fd,Port#port{name=val(Fd)});
"Monitors" ->
- get_portinfo(Fd,Port#port{monitors=val(Fd)});
+ Monitors0 = string:tokens(val(Fd),"()"),
+ Monitors = [begin
+ [Pid,Ref] = string:tokens(Mon,","),
+ {Pid,Pid++" ("++Ref++")"}
+ end || Mon <- Monitors0],
+ get_portinfo(Fd,Port#port{monitors=Monitors});
"Port controls linked-in driver" ->
- get_portinfo(Fd,Port#port{controls=["Linked in driver: " |
- val(Fd)]});
+ Str = lists:flatten(["Linked in driver: " | val(Fd)]),
+ get_portinfo(Fd,Port#port{controls=Str});
"Port controls external process" ->
- get_portinfo(Fd,Port#port{controls=["External proc: " | val(Fd)]});
+ Str = lists:flatten(["External proc: " | val(Fd)]),
+ get_portinfo(Fd,Port#port{controls=Str});
"Port is a file" ->
- get_portinfo(Fd,Port#port{controls=["File: "| val(Fd)]});
+ Str = lists:flatten(["File: "| val(Fd)]),
+ get_portinfo(Fd,Port#port{controls=Str});
"Port is UNIX fd not opened by emulator" ->
- get_portinfo(Fd,Port#port{
- controls=["UNIX fd not opened by emulator: "|
- val(Fd)]});
+ Str = lists:flatten(["UNIX fd not opened by emulator: "| val(Fd)]),
+ get_portinfo(Fd,Port#port{controls=Str});
"=" ++ _next_tag ->
Port;
Other ->
@@ -1983,17 +1440,27 @@ get_portinfo(Fd,Port) ->
Port
end.
+split_pid_list_no_space(String) ->
+ split_pid_list_no_space(String,[],[]).
+split_pid_list_no_space([$>|Rest],Acc,Pids) ->
+ split_pid_list_no_space(Rest,[],[lists:reverse(Acc,[$>])|Pids]);
+split_pid_list_no_space([H|T],Acc,Pids) ->
+ split_pid_list_no_space(T,[H|Acc],Pids);
+split_pid_list_no_space([],[],Pids) ->
+ lists:reverse(Pids).
%%-----------------------------------------------------------------
%% Page with external ets tables
-get_ets_tables(SessionId,File,Heading,TW,Pid,WS) ->
- ParseFun = fun(Fd,Id) -> get_etsinfo(Fd,#ets_table{pid=Id},WS) end,
- chunk_page(SessionId,File,TW,{?ets,Pid},ets_tables,Heading,ParseFun).
+get_ets_tables(File,Pid,WS) ->
+ ParseFun = fun(Fd,Id) ->
+ get_etsinfo(Fd,#ets_table{pid=list_to_pid(Id)},WS)
+ end,
+ lookup_and_parse_index(File,{?ets,Pid},ParseFun,"ets").
get_etsinfo(Fd,EtsTable,WS) ->
case line_head(Fd) of
"Slot" ->
- get_etsinfo(Fd,EtsTable#ets_table{slot=val(Fd)},WS);
+ get_etsinfo(Fd,EtsTable#ets_table{slot=list_to_integer(val(Fd))},WS);
"Table" ->
get_etsinfo(Fd,EtsTable#ets_table{id=val(Fd)},WS);
"Name" ->
@@ -2002,15 +1469,18 @@ get_etsinfo(Fd,EtsTable,WS) ->
skip_rest_of_line(Fd),
get_etsinfo(Fd,EtsTable#ets_table{type="tree",buckets="-"},WS);
"Buckets" ->
- get_etsinfo(Fd,EtsTable#ets_table{buckets=val(Fd)},WS);
+ %% A bug in erl_db_hash.c prints a space after the buckets
+ %% - need to strip the string to make list_to_integer/1 happy.
+ Buckets = list_to_integer(string:strip(val(Fd))),
+ get_etsinfo(Fd,EtsTable#ets_table{buckets=Buckets},WS);
"Objects" ->
- get_etsinfo(Fd,EtsTable#ets_table{size=val(Fd)},WS);
+ get_etsinfo(Fd,EtsTable#ets_table{size=list_to_integer(val(Fd))},WS);
"Words" ->
Words = list_to_integer(val(Fd)),
Bytes =
case Words of
- -1 -> "-1"; % probably truncated
- _ -> integer_to_list(Words * WS)
+ -1 -> -1; % probably truncated
+ _ -> Words * WS
end,
get_etsinfo(Fd,EtsTable#ets_table{memory=Bytes},WS);
"=" ++ _next_tag ->
@@ -2036,16 +1506,37 @@ get_internal_ets_tables(File,WS) ->
%%-----------------------------------------------------------------
%% Page with list of all timers
-get_timers(SessionId,File,Heading,TW,Pid) ->
- ParseFun = fun(Fd,Id) -> get_timerinfo_1(Fd,#timer{pid=Id}) end,
- chunk_page(SessionId,File,TW,{?timer,Pid},timers,Heading,ParseFun).
+get_timers(File,Pid) ->
+ ParseFun = fun(Fd,Id) -> get_timerinfo(Fd,Id) end,
+ T1 = lookup_and_parse_index(File,{?timer,Pid},ParseFun,"timers"),
+ T2 = case ets:lookup(cdv_reg_proc_table,Pid) of
+ [{_,Name}] ->
+ lookup_and_parse_index(File,{?timer,Name},ParseFun,"timers");
+ _ ->
+ []
+ end,
+ T1 ++ T2.
+
+get_timerinfo(Fd,Id) ->
+ case catch list_to_pid(Id) of
+ Pid when is_pid(Pid) ->
+ get_timerinfo_1(Fd,#timer{pid=Pid});
+ _ ->
+ case ets:lookup(cdv_reg_proc_table,Id) of
+ [{_,Pid}] when is_pid(Pid) ->
+ get_timerinfo_1(Fd,#timer{pid=Pid,name=Id});
+ [] ->
+ get_timerinfo_1(Fd,#timer{name=Id})
+ end
+ end.
get_timerinfo_1(Fd,Timer) ->
case line_head(Fd) of
"Message" ->
get_timerinfo_1(Fd,Timer#timer{msg=val(Fd)});
"Time left" ->
- get_timerinfo_1(Fd,Timer#timer{time=val(Fd)});
+ TimeLeft = list_to_integer(val(Fd) -- " ms"),
+ get_timerinfo_1(Fd,Timer#timer{time=TimeLeft});
"=" ++ _next_tag ->
Timer;
Other ->
@@ -2054,6 +1545,28 @@ get_timerinfo_1(Fd,Timer) ->
end.
%%-----------------------------------------------------------------
+%% Page with information about a node in the distribution
+get_node(File,Channel) ->
+ Ms = ets:fun2ms(
+ fun({{Tag,Start},Ch}) when Tag=:=?visible_node, Ch=:=Channel ->
+ {visible,Start};
+ ({{Tag,Start},Ch}) when Tag=:=?hidden_node, Ch=:=Channel ->
+ {hidden,Start};
+ ({{Tag,Start},Ch}) when Tag=:=?not_connected, Ch=:=Channel ->
+ {not_connected,Start}
+ end),
+
+ case ets:select(cdv_dump_index_table,Ms) of
+ [] ->
+ {error,not_found};
+ [{Type,Pos}] ->
+ Fd = open(File),
+ NodeInfo = get_nodeinfo(Fd,Channel,Type,Pos),
+ close(Fd),
+ {ok,NodeInfo}
+ end.
+
+%%-----------------------------------------------------------------
%% Page with information about the erlang distribution
nods(File) ->
case lookup_index(?no_distribution) of
@@ -2064,28 +1577,29 @@ nods(File) ->
Fd = open(File),
Visible = lists:map(
fun({Channel,Start}) ->
- get_nodeinfo(Fd,Channel,Start)
+ get_nodeinfo(Fd,Channel,visible,Start)
end,
V),
Hidden = lists:map(
fun({Channel,Start}) ->
- get_nodeinfo(Fd,Channel,Start)
+ get_nodeinfo(Fd,Channel,hidden,Start)
end,
H),
NotConnected = lists:map(
fun({Channel,Start}) ->
- get_nodeinfo(Fd,Channel,Start)
+ get_nodeinfo(Fd,Channel,not_connected,Start)
end,
N),
close(Fd),
- {Visible,Hidden,NotConnected};
+ Visible++Hidden++NotConnected;
[_] ->
- no_distribution
+ %% no_distribution
+ []
end.
-get_nodeinfo(Fd,Channel,Start) ->
+get_nodeinfo(Fd,Channel,Type,Start) ->
pos_bof(Fd,Start),
- get_nodeinfo(Fd,#nod{channel=Channel}).
+ get_nodeinfo(Fd,#nod{channel=list_to_integer(Channel),conn_type=Type}).
get_nodeinfo(Fd,Nod) ->
case line_head(Fd) of
@@ -2094,21 +1608,33 @@ get_nodeinfo(Fd,Nod) ->
"Controller" ->
get_nodeinfo(Fd,Nod#nod{controller=val(Fd)});
"Creation" ->
- get_nodeinfo(Fd,Nod#nod{creation=val(Fd)});
+ %% Throwing away elements like "(refc=1)", which might be
+ %% printed from a debug compiled emulator.
+ Creations = lists:flatmap(fun(C) -> try [list_to_integer(C)]
+ catch error:badarg -> []
+ end
+ end, string:tokens(val(Fd)," ")),
+ get_nodeinfo(Fd,Nod#nod{creation={creations,Creations}});
"Remote link" ->
Procs = val(Fd), % e.g. "<0.31.0> <4322.54.0>"
- RemoteLinks = Nod#nod.remote_links,
- get_nodeinfo(Fd,Nod#nod{remote_links=[split(Procs)|RemoteLinks]});
+ {Local,Remote} = split(Procs),
+ Str = Local++" <-> "++Remote,
+ NewRemLinks = [{Local,Str} | Nod#nod.remote_links],
+ get_nodeinfo(Fd,Nod#nod{remote_links=NewRemLinks});
"Remote monitoring" ->
Procs = val(Fd), % e.g. "<0.31.0> <4322.54.0>"
- RemoteMon = Nod#nod.remote_mon,
- get_nodeinfo(Fd,Nod#nod{remote_mon=[split(Procs)|RemoteMon]});
+ {Local,Remote} = split(Procs),
+ Str = Local++" -> "++Remote,
+ NewRemMon = [{Local,Str} | Nod#nod.remote_mon],
+ get_nodeinfo(Fd,Nod#nod{remote_mon=NewRemMon});
"Remotely monitored by" ->
Procs = val(Fd), % e.g. "<0.31.0> <4322.54.0>"
- RemoteMonBy = Nod#nod.remote_mon_by,
- get_nodeinfo(Fd,Nod#nod{remote_mon_by=[split(Procs)|RemoteMonBy]});
+ {Local,Remote} = split(Procs),
+ Str = Local++" <- "++Remote,
+ NewRemMonBy = [{Local,Str} | Nod#nod.remote_mon_by],
+ get_nodeinfo(Fd,Nod#nod{remote_mon_by=NewRemMonBy});
"Error" ->
- get_nodeinfo(Fd,Nod#nod{error=val(Fd)});
+ get_nodeinfo(Fd,Nod#nod{error="ERROR: "++val(Fd)});
"=" ++ _next_tag ->
Nod;
Other ->
@@ -2129,10 +1655,11 @@ get_loaded_mod_details(File,Mod) ->
%%-----------------------------------------------------------------
%% Page with list of all loaded modules
-loaded_mods(SessionId,File,TW) ->
+loaded_mods(File) ->
ParseFun =
fun(Fd,Id) ->
- get_loaded_mod_info(Fd,#loaded_mod{mod=Id},
+ get_loaded_mod_info(Fd,
+ #loaded_mod{mod=get_atom(list_to_binary(Id))},
fun main_modinfo/3)
end,
{CC,OC} =
@@ -2146,7 +1673,7 @@ loaded_mods(SessionId,File,TW) ->
[] ->
{"unknown","unknown"}
end,
- chunk_page(SessionId,File,TW,?mod,loaded_mods,{CC,OC},ParseFun).
+ {CC,OC,lookup_and_parse_index(File,?mod,ParseFun,"modules")}.
get_loaded_mod_totals(Fd,{CC,OC}) ->
case line_head(Fd) of
@@ -2164,9 +1691,11 @@ get_loaded_mod_totals(Fd,{CC,OC}) ->
get_loaded_mod_info(Fd,LM,Fun) ->
case line_head(Fd) of
"Current size" ->
- get_loaded_mod_info(Fd,LM#loaded_mod{current_size=val(Fd)},Fun);
+ CS = list_to_integer(val(Fd)),
+ get_loaded_mod_info(Fd,LM#loaded_mod{current_size=CS},Fun);
"Old size" ->
- get_loaded_mod_info(Fd,LM#loaded_mod{old_size=val(Fd)},Fun);
+ OS = list_to_integer(val(Fd)),
+ get_loaded_mod_info(Fd,LM#loaded_mod{old_size=OS},Fun);
"=" ++ _next_tag ->
LM;
{eof,_} ->
@@ -2229,24 +1758,24 @@ hex_to_dec(N) -> list_to_integer(N).
%%-----------------------------------------------------------------
%% Page with list of all funs
-funs(SessionId,File,TW) ->
+funs(File) ->
ParseFun = fun(Fd,_Id) -> get_funinfo(Fd,#fu{}) end,
- chunk_page(SessionId,File,TW,?fu,funs,[],ParseFun).
+ lookup_and_parse_index(File,?fu,ParseFun,"funs").
get_funinfo(Fd,Fu) ->
case line_head(Fd) of
"Module" ->
get_funinfo(Fd,Fu#fu{module=val(Fd)});
"Uniq" ->
- get_funinfo(Fd,Fu#fu{uniq=val(Fd)});
+ get_funinfo(Fd,Fu#fu{uniq=list_to_integer(val(Fd))});
"Index" ->
- get_funinfo(Fd,Fu#fu{index=val(Fd)});
+ get_funinfo(Fd,Fu#fu{index=list_to_integer(val(Fd))});
"Address" ->
get_funinfo(Fd,Fu#fu{address=val(Fd)});
"Native_address" ->
get_funinfo(Fd,Fu#fu{native_address=val(Fd)});
"Refc" ->
- get_funinfo(Fd,Fu#fu{refc=val(Fd)});
+ get_funinfo(Fd,Fu#fu{refc=list_to_integer(val(Fd))});
"=" ++ _next_tag ->
Fu;
Other ->
@@ -2256,45 +1785,54 @@ get_funinfo(Fd,Fu) ->
%%-----------------------------------------------------------------
%% Page with list of all atoms
-atoms(SessionId,File,TW,Num) ->
+atoms(File,NumAtoms) ->
case lookup_index(?atoms) of
[{_Id,Start}] ->
Fd = open(File),
pos_bof(Fd,Start),
- case get_atoms(Fd,?items_chunk_size) of
- {Atoms,Cont} ->
- crashdump_viewer_html:atoms(SessionId,TW,Num,Atoms),
- atoms_chunks(Fd,SessionId,Cont);
- done ->
- crashdump_viewer_html:atoms(SessionId,TW,Num,done)
- end;
+ get_atoms(Fd,NumAtoms);
_ ->
- crashdump_viewer_html:atoms(SessionId,TW,Num,done)
+ []
end.
-get_atoms(Fd,Number) ->
- case get_n_lines_of_tag(Fd,Number) of
- {all,_,Lines} ->
- close(Fd),
- {Lines,done};
- {part,_,Lines} ->
- {Lines,Number};
- empty ->
- close(Fd),
- done
+get_atoms(Fd,NumAtoms) ->
+ case get_chunk(Fd) of
+ {ok,Bin} ->
+ init_progress("Processing atoms",NumAtoms),
+ get_atoms(Fd,Bin,NumAtoms,[]);
+ eof ->
+ []
end.
-atoms_chunks(_Fd,SessionId,done) ->
- crashdump_viewer_html:atoms_chunk(SessionId,done);
-atoms_chunks(Fd,SessionId,Number) ->
- case get_atoms(Fd,Number) of
- {Atoms,Cont} ->
- crashdump_viewer_html:atoms_chunk(SessionId,Atoms),
- atoms_chunks(Fd,SessionId,Cont);
- done ->
- atoms_chunks(Fd,SessionId,done)
- end.
+%% Atoms are written one per line in the crash dump, in creation order
+%% from last to first.
+get_atoms(Fd,Bin,NumAtoms,Atoms) ->
+ Bins = binary:split(Bin,<<"\n">>,[global]),
+ get_atoms1(Fd,Bins,NumAtoms,Atoms).
+
+get_atoms1(_Fd,[<<"=",_/binary>>|_],_N,Atoms) ->
+ end_progress(),
+ Atoms;
+get_atoms1(Fd,[LastBin],N,Atoms) ->
+ case get_chunk(Fd) of
+ {ok,Bin0} ->
+ get_atoms(Fd,<<LastBin/binary,Bin0/binary>>,N,Atoms);
+ eof ->
+ end_progress(),
+ [{N,get_atom(LastBin)}|Atoms]
+ end;
+get_atoms1(Fd,[Bin|Bins],N,Atoms) ->
+ update_progress(),
+ get_atoms1(Fd,Bins,N-1,[{N,get_atom(Bin)}|Atoms]).
+
+%% This ensures sorting according to first actual letter in the atom,
+%% disregarding possible single quote. It is formatted back to correct
+%% syntax in cdv_atom_cb:format/1
+get_atom(<<"\'",Atom/binary>>) ->
+ {Atom,q}; % quoted
+get_atom(Atom) when is_binary(Atom) ->
+ {Atom,nq}. % not quoted
%%-----------------------------------------------------------------
%% Page with memory information
@@ -2317,7 +1855,7 @@ get_meminfo(Fd,Acc) ->
{eof,_last_line} ->
lists:reverse(Acc);
Key ->
- get_meminfo(Fd,[{Key,val(Fd)}|Acc])
+ get_meminfo(Fd,[{list_to_atom(Key),val(Fd)}|Acc])
end.
%%-----------------------------------------------------------------
@@ -2345,7 +1883,7 @@ get_allocareainfo(Fd,Acc) ->
AllocInfo =
case split(Val) of
{Alloc,[]} ->
- {Key,Alloc,?space};
+ {Key,Alloc,""};
{Alloc,Used} ->
{Key,Alloc,Used}
end,
@@ -2361,7 +1899,7 @@ allocator_info(File) ->
AllAllocators ->
Fd = open(File),
R = lists:map(fun({Heading,Start}) ->
- {Heading,get_allocatorinfo(Fd,Start)}
+ {Heading,get_allocatorinfo(Fd,Start)}
end,
AllAllocators),
close(Fd),
@@ -2370,17 +1908,19 @@ allocator_info(File) ->
get_allocatorinfo(Fd,Start) ->
pos_bof(Fd,Start),
- get_allocatorinfo1(Fd,[]).
+ get_allocatorinfo1(Fd,[],0).
-get_allocatorinfo1(Fd,Acc) ->
+get_allocatorinfo1(Fd,Acc,Max) ->
case line_head(Fd) of
"=" ++ _next_tag ->
- lists:reverse(Acc);
+ pad_and_reverse(Acc,Max,[]);
{eof,_last_line} ->
- lists:reverse(Acc);
+ pad_and_reverse(Acc,Max,[]);
Key ->
Values = get_all_vals(val(Fd),[]),
- get_allocatorinfo1(Fd,[{Key,Values}|Acc])
+ L = length(Values),
+ Max1 = if L > Max -> L; true -> Max end,
+ get_allocatorinfo1(Fd,[{Key,Values}|Acc],Max1)
end.
get_all_vals([$ |Rest],Acc) ->
@@ -2390,6 +1930,16 @@ get_all_vals([],Acc) ->
get_all_vals([Char|Rest],Acc) ->
get_all_vals(Rest,[Char|Acc]).
+%% Make sure all V have the same length by padding with "".
+pad_and_reverse([{K,V}|T],Len,Rev) ->
+ VLen = length(V),
+ V1 = if VLen == Len -> V;
+ true -> V ++ lists:duplicate(Len-VLen,"")
+ end,
+ pad_and_reverse(T,Len,[{K,V1}|Rev]);
+pad_and_reverse([],_,Rev) ->
+ Rev.
+
%% Calculate allocator summary:
%%
%% System totals:
@@ -2473,7 +2023,8 @@ allocator_summary(Allocators) ->
{TBS,TCS} ->
{integer_to_list(TBS),integer_to_list(TCS)}
end,
- {{"Summary",["blocks size","carriers size","mseg carriers size"]},
+ {"Allocator Summary",
+ ["blocks size","carriers size","mseg carriers size"],
[{"total",[TotalBS,TotalCS,TotalMCS]} |
format_allocator_summary(lists:reverse(TypeTotals))]}.
@@ -2673,142 +2224,120 @@ get_indextableinfo1(Fd,IndexTable) ->
IndexTable
end.
-
-
-
-
-%%-----------------------------------------------------------------
-%% Expand a set of data which was shown in a truncated form on
-get_expanded(File,Pos,Size) ->
- Fd = open(File),
- R = case file:pread(Fd,Pos,Size) of
- {ok,Bin}->
- binary_to_list(Bin);
- eof ->
- ?space
- end,
- close(Fd),
- R.
-
-
-replace_all(From,To,[From|Rest],Acc) ->
- replace_all(From,To,Rest,[To|Acc]);
-replace_all(From,To,[Char|Rest],Acc) ->
- replace_all(From,To,Rest,[Char|Acc]);
-replace_all(_From,_To,[],Acc) ->
- lists:reverse(Acc).
-
-
%%%-----------------------------------------------------------------
%%% Parse memory in crashdump version 0.1 and newer
%%%
-parse_heap_term([$l|Line0], Addr, D0) -> %Cons cell.
- {H,"|"++Line1,D1} = parse_term(Line0, D0),
- {T,Line,D2} = parse_term(Line1, D1),
+parse_heap_term([$l|Line0], Addr, BinAddrAdj, D0) -> %Cons cell.
+ {H,"|"++Line1,D1} = parse_term(Line0, BinAddrAdj, D0),
+ {T,Line,D2} = parse_term(Line1, BinAddrAdj, D1),
Term = [H|T],
D = gb_trees:insert(Addr, Term, D2),
{Term,Line,D};
-parse_heap_term([$t|Line0], Addr, D) -> %Tuple
+parse_heap_term([$t|Line0], Addr, BinAddrAdj, D) -> %Tuple
{N,":"++Line} = get_hex(Line0),
- parse_tuple(N, Line, Addr, D, []);
-parse_heap_term([$F|Line0], Addr, D0) -> %Float
+ parse_tuple(N, Line, Addr, BinAddrAdj, D, []);
+parse_heap_term([$F|Line0], Addr, _BinAddrAdj, D0) -> %Float
{N,":"++Line1} = get_hex(Line0),
{Chars,Line} = get_chars(N, Line1),
Term = list_to_float(Chars),
D = gb_trees:insert(Addr, Term, D0),
{Term,Line,D};
-parse_heap_term("B16#"++Line0, Addr, D0) -> %Positive big number.
+parse_heap_term("B16#"++Line0, Addr, _BinAddrAdj, D0) -> %Positive big number.
{Term,Line} = get_hex(Line0),
D = gb_trees:insert(Addr, Term, D0),
{Term,Line,D};
-parse_heap_term("B-16#"++Line0, Addr, D0) -> %Negative big number
+parse_heap_term("B-16#"++Line0, Addr, _BinAddrAdj, D0) -> %Negative big number
{Term0,Line} = get_hex(Line0),
Term = -Term0,
D = gb_trees:insert(Addr, Term, D0),
{Term,Line,D};
-parse_heap_term("B"++Line0, Addr, D0) -> %Decimal big num (new in R10B-something).
+parse_heap_term("B"++Line0, Addr, _BinAddrAdj, D0) -> %Decimal big num
case string:to_integer(Line0) of
{Int,Line} when is_integer(Int) ->
D = gb_trees:insert(Addr, Int, D0),
{Int,Line,D}
end;
-parse_heap_term([$P|Line0], Addr, D0) -> % External Pid.
+parse_heap_term([$P|Line0], Addr, _BinAddrAdj, D0) -> % External Pid.
{Pid0,Line} = get_id(Line0),
- Pid = "#CDVPid"++Pid0,
+ Pid = ['#CDVPid'|Pid0],
D = gb_trees:insert(Addr, Pid, D0),
{Pid,Line,D};
-parse_heap_term([$p|Line0], Addr, D0) -> % External Port.
+parse_heap_term([$p|Line0], Addr, _BinAddrAdj, D0) -> % External Port.
{Port0,Line} = get_id(Line0),
- Port = "#CDVPort"++Port0,
+ Port = ['#CDVPort'|Port0],
D = gb_trees:insert(Addr, Port, D0),
{Port,Line,D};
-parse_heap_term("E"++Line0, Addr, D0) -> %Term encoded in external format.
+parse_heap_term("E"++Line0, Addr, _BinAddrAdj, D0) -> %Term encoded in external format.
{Bin,Line} = get_binary(Line0),
Term = binary_to_term(Bin),
D = gb_trees:insert(Addr, Term, D0),
{Term,Line,D};
-parse_heap_term("Yh"++Line0, Addr, D0) -> %Heap binary.
+parse_heap_term("Yh"++Line0, Addr, _BinAddrAdj, D0) -> %Heap binary.
{Term,Line} = get_binary(Line0),
D = gb_trees:insert(Addr, Term, D0),
{Term,Line,D};
-parse_heap_term("Yc"++Line0, Addr, D0) -> %Reference-counted binary.
- {Binp,":"++Line1} = get_hex(Line0),
- {First,":"++Line2} = get_hex(Line1),
+parse_heap_term("Yc"++Line0, Addr, BinAddrAdj, D0) -> %Reference-counted binary.
+ {Binp0,":"++Line1} = get_hex(Line0),
+ {Offset,":"++Line2} = get_hex(Line1),
{Sz,Line} = get_hex(Line2),
+ Binp = Binp0 bor BinAddrAdj,
Term = case gb_trees:lookup(Binp, D0) of
- {value,<<_:First/binary,T:Sz/binary,_/binary>>} -> T;
- {value,{'#CDVTooBig',binary,Pos}} -> cdvbin(Sz,Pos);
- {value,'#CDVTruncatedBinary'} -> '#CDVTruncatedBinary';
+ {value,Bin} -> cdvbin(Offset,Sz,Bin);
none -> '#CDVNonexistingBinary'
end,
D = gb_trees:insert(Addr, Term, D0),
{Term,Line,D};
-parse_heap_term("Ys"++Line0, Addr, D0) -> %Sub binary.
- {Binp,":"++Line1} = get_hex(Line0),
- {First,":"++Line2} = get_hex(Line1),
+parse_heap_term("Ys"++Line0, Addr, BinAddrAdj, D0) -> %Sub binary.
+ {Binp0,":"++Line1} = get_hex(Line0),
+ {Offset,":"++Line2} = get_hex(Line1),
{Sz,Line} = get_hex(Line2),
+ Binp = Binp0 bor BinAddrAdj,
Term = case gb_trees:lookup(Binp, D0) of
- {value,<<_:First/binary,T:Sz/binary,_/binary>>} -> T;
- {value,{'#CDVTooBig',binary,Pos}} -> cdvbin(Sz,Pos);
- {value,'#CDVTruncatedBinary'} -> '#CDVTruncatedBinary';
+ {value,Bin} -> cdvbin(Offset,Sz,Bin);
+ none when Binp0=/=Binp ->
+ %% Might it be on the heap?
+ case gb_trees:lookup(Binp0, D0) of
+ {value,Bin} -> cdvbin(Offset,Sz,Bin);
+ none -> '#CDVNonexistingBinary'
+ end;
none -> '#CDVNonexistingBinary'
end,
D = gb_trees:insert(Addr, Term, D0),
{Term,Line,D}.
-parse_tuple(0, Line, Addr, D0, Acc) ->
+parse_tuple(0, Line, Addr, _, D0, Acc) ->
Tuple = list_to_tuple(lists:reverse(Acc)),
D = gb_trees:insert(Addr, Tuple, D0),
{Tuple,Line,D};
-parse_tuple(N, Line0, Addr, D0, Acc) ->
- case parse_term(Line0, D0) of
+parse_tuple(N, Line0, Addr, BinAddrAdj, D0, Acc) ->
+ case parse_term(Line0, BinAddrAdj, D0) of
{Term,[$,|Line],D} when N > 1 ->
- parse_tuple(N-1, Line, Addr, D, [Term|Acc]);
+ parse_tuple(N-1, Line, Addr, BinAddrAdj, D, [Term|Acc]);
{Term,Line,D}->
- parse_tuple(N-1, Line, Addr, D, [Term|Acc])
+ parse_tuple(N-1, Line, Addr, BinAddrAdj, D, [Term|Acc])
end.
-parse_term([$H|Line0], D) -> %Pointer to heap term.
+parse_term([$H|Line0], BinAddrAdj, D) -> %Pointer to heap term.
{Ptr,Line} = get_hex(Line0),
- deref_ptr(Ptr, Line, D);
-parse_term([$N|Line], D) -> %[] (nil).
+ deref_ptr(Ptr, Line, BinAddrAdj, D);
+parse_term([$N|Line], _, D) -> %[] (nil).
{[],Line,D};
-parse_term([$I|Line0], D) -> %Small.
+parse_term([$I|Line0], _, D) -> %Small.
{Int,Line} = string:to_integer(Line0),
{Int,Line,D};
-parse_term([$A|_]=Line, D) -> %Atom.
+parse_term([$A|_]=Line, _, D) -> %Atom.
parse_atom(Line, D);
-parse_term([$P|Line0], D) -> %Pid.
+parse_term([$P|Line0], _, D) -> %Pid.
{Pid,Line} = get_id(Line0),
- {"#CDVPid"++Pid,Line,D};
-parse_term([$p|Line0], D) -> %Port.
+ {['#CDVPid'|Pid],Line,D};
+parse_term([$p|Line0], _, D) -> %Port.
{Port,Line} = get_id(Line0),
- {"#CDVPort"++Port,Line,D};
-parse_term([$S|Str0], D) -> %Information string.
+ {['#CDVPort'|Port],Line,D};
+parse_term([$S|Str0], _, D) -> %Information string.
Str = lists:reverse(skip_blanks(lists:reverse(Str0))),
{Str,[],D};
-parse_term([$D|Line0], D) -> %DistExternal
+parse_term([$D|Line0], _, D) -> %DistExternal
try
{AttabSize,":"++Line1} = get_hex(Line0),
{Attab, "E"++Line2} = parse_atom_translation_table(AttabSize, Line1, []),
@@ -2848,7 +2377,7 @@ parse_atom_translation_table(N, Line0, As) ->
-deref_ptr(Ptr, Line, D0) ->
+deref_ptr(Ptr, Line, BinAddrAdj, D0) ->
case gb_trees:lookup(Ptr, D0) of
{value,Term} ->
{Term,Line,D0};
@@ -2860,10 +2389,10 @@ deref_ptr(Ptr, Line, D0) ->
case val(Fd) of
"="++_ ->
put(fd, end_of_heap),
- deref_ptr(Ptr, Line, D0);
+ deref_ptr(Ptr, Line, BinAddrAdj, D0);
L ->
- D = parse(L, D0),
- deref_ptr(Ptr, Line, D)
+ D = parse(L, BinAddrAdj, D0),
+ deref_ptr(Ptr, Line, BinAddrAdj, D)
end
end
end.
@@ -2901,13 +2430,16 @@ get_chars(0, Line, Acc) ->
get_chars(N, [H|T], Acc) ->
get_chars(N-1, T, [H|Acc]).
-get_id(Line) ->
- get_id(Line, []).
+get_id(Line0) ->
+ [$<|Line] = lists:dropwhile(fun($<) -> false; (_) -> true end,Line0),
+ get_id(Line, [], []).
-get_id([$>|Line], Acc) ->
- {lists:reverse(Acc, [$>]),Line};
-get_id([H|T], Acc) ->
- get_id(T, [H|Acc]).
+get_id([$>|Line], Acc, Id) ->
+ {lists:reverse(Id,[list_to_integer(lists:reverse(Acc))]),Line};
+get_id([$.|Line], Acc, Id) ->
+ get_id(Line,[],[list_to_integer(lists:reverse(Acc))|Id]);
+get_id([H|T], Acc, Id) ->
+ get_id(T, [H|Acc], Id).
get_label(L) ->
get_label(L, []).
@@ -2925,19 +2457,26 @@ get_label([H|T], Acc) ->
get_binary(Line0) ->
{N,":"++Line} = get_hex(Line0),
- get_binary(N, Line, []).
+ do_get_binary(N, Line, []).
+
+get_binary(Offset,Size,Line0) ->
+ {_N,":"++Line} = get_hex(Line0),
+ do_get_binary(Size, lists:sublist(Line,(Offset*2)+1,Size*2), []).
-get_binary(0, Line, Acc) ->
+do_get_binary(0, Line, Acc) ->
{list_to_binary(lists:reverse(Acc)),Line};
-get_binary(N, [A,B|Line], Acc) ->
+do_get_binary(N, [A,B|Line], Acc) ->
Byte = (get_hex_digit(A) bsl 4) bor get_hex_digit(B),
- get_binary(N-1, Line, [Byte|Acc]);
-get_binary(_N, [], _Acc) ->
+ do_get_binary(N-1, Line, [Byte|Acc]);
+do_get_binary(_N, [], _Acc) ->
{'#CDVTruncatedBinary',[]}.
-cdvbin(Sz,Pos) ->
- "#CDVBin<"++integer_to_list(Sz)++","++integer_to_list(Pos)++">".
-
+cdvbin(Offset,Size,{'#CDVBin',Pos}) ->
+ ['#CDVBin',Offset,Size,Pos];
+cdvbin(Offset,Size,['#CDVBin',_,_,Pos]) ->
+ ['#CDVBin',Offset,Size,Pos];
+cdvbin(_,_,'#CDVTruncatedBinary') ->
+ '#CDVTruncatedBinary'.
%%-----------------------------------------------------------------
%% Functions for accessing the cdv_dump_index_table
@@ -2947,29 +2486,15 @@ reset_index_table() ->
insert_index(Tag,Id,Pos) ->
ets:insert(cdv_dump_index_table,{{Tag,Pos},Id}).
+lookup_index({Tag,Id}) ->
+ lookup_index(Tag,Id);
lookup_index(Tag) ->
lookup_index(Tag,'$2').
lookup_index(Tag,Id) ->
ets:select(cdv_dump_index_table,[{{{Tag,'$1'},Id},[],[{{Id,'$1'}}]}]).
-lookup_index_chunk({'#CDVFirstChunk',Tag,Id}) ->
- ets:select(cdv_dump_index_table,
- [{{{Tag,'$1'},Id},[],[{{Id,'$1'}}]}],
- ?items_chunk_size);
-lookup_index_chunk(Cont) ->
- ets:select(Cont).
-
-%% Create a tag which can be used instead of an ets Continuation for
-%% the first call to lookup_index_chunk.
-first_chunk_pointer({Tag,Id}) ->
- {'#CDVFirstChunk',Tag,Id};
-first_chunk_pointer(Tag) ->
- first_chunk_pointer({Tag,'$2'}).
-
count_index(Tag) ->
ets:select_count(cdv_dump_index_table,[{{{Tag,'_'},'_'},[],[true]}]).
-count_index(Tag,Id) ->
- ets:select_count(cdv_dump_index_table,[{{{Tag,'_'},Id},[],[true]}]).
%%-----------------------------------------------------------------
@@ -2979,7 +2504,6 @@ tag_to_atom("allocated_areas") -> ?allocated_areas;
tag_to_atom("allocator") -> ?allocator;
tag_to_atom("atoms") -> ?atoms;
tag_to_atom("binary") -> ?binary;
-tag_to_atom("debug_proc_dictionary") -> ?debug_proc_dictionary;
tag_to_atom("end") -> ?ende;
tag_to_atom("erl_crash_dump") -> ?erl_crash_dump;
tag_to_atom("ets") -> ?ets;
@@ -2995,7 +2519,6 @@ tag_to_atom("mod") -> ?mod;
tag_to_atom("no_distribution") -> ?no_distribution;
tag_to_atom("node") -> ?node;
tag_to_atom("not_connected") -> ?not_connected;
-tag_to_atom("num_atoms") -> ?num_atoms;
tag_to_atom("old_instr_data") -> ?old_instr_data;
tag_to_atom("port") -> ?port;
tag_to_atom("proc") -> ?proc;
@@ -3010,37 +2533,133 @@ tag_to_atom(UnknownTag) ->
list_to_atom(UnknownTag).
%%%-----------------------------------------------------------------
-%%% Create a page by sending chunk by chunk to crashdump_viewer_html
-chunk_page(SessionId,File,TW,What,HtmlCB,HtmlExtra,ParseFun) ->
+%%% Fetch next chunk from crashdump file
+lookup_and_parse_index(File,What,ParseFun,Str) when is_list(File) ->
+ Indices = lookup_index(What),
+ Fun = fun(Fd,{Id,Start}) ->
+ pos_bof(Fd,Start),
+ ParseFun(Fd,Id)
+ end,
+ Report = "Processing " ++ Str,
+ progress_pmap(Report,File,Fun,Indices).
+
+%%%-----------------------------------------------------------------
+%%% Convert a record to a proplist
+to_proplist(Fields,Record) ->
+ Values = to_value_list(Record),
+ lists:zip(Fields,Values).
+
+%%%-----------------------------------------------------------------
+%%% Convert a record to a simple list of field values
+to_value_list(Record) ->
+ [_RecordName|Values] = tuple_to_list(Record),
+ Values.
+
+%%%-----------------------------------------------------------------
+%%% Fold over List and report progress in percent.
+%%% Report is the text to be presented in the progress dialog.
+%%% Acc0 is the initial accumulator and will be passed to Fun as the
+%%% second arguement, i.e. Fun = fun(Item,Acc) -> NewAcc end.
+progress_foldl(Report,Fun,Acc0,List) ->
+ init_progress(Report, length(List)),
+ progress_foldl1(Fun,Acc0,List).
+
+progress_foldl1(Fun,Acc,[H|T]) ->
+ update_progress(),
+ progress_foldl1(Fun,Fun(H,Acc),T);
+progress_foldl1(_Fun,Acc,[]) ->
+ end_progress(),
+ Acc.
+
+
+%%%-----------------------------------------------------------------
+%%% Map over List and report progress in percent.
+%%% Report is the text to be presented in the progress dialog.
+%%% Distribute the load over a number of processes, and File is opened
+%%% on each process and passed to the Fun as first argument.
+%%% I.e. Fun = fun(Fd,Item) -> ItemResult end.
+progress_pmap(Report,File,Fun,List) ->
+ NTot = length(List),
+ NProcs = erlang:system_info(schedulers) * 2,
+ NPerProc = (NTot div NProcs) + 1,
+
+ %% Worker processes send message to collector for each ReportInterval.
+ ReportInterval = (NTot div 100) + 1,
+
+ %% Progress reporter on collector process reports 1 percent for
+ %% each message from worker process.
+ init_progress(Report,99),
+
+ Collector = self(),
+ {[],Pids} =
+ lists:foldl(
+ fun(_,{L,Ps}) ->
+ {L1,L2} = if length(L)>=NPerProc -> lists:split(NPerProc,L);
+ true -> {L,[]} % last chunk
+ end,
+ {P,_Ref} =
+ spawn_monitor(
+ fun() ->
+ progress_map(Collector,ReportInterval,File,Fun,L1)
+ end),
+ {L2,[P|Ps]}
+ end,
+ {List,[]},
+ lists:seq(1,NProcs)),
+ collect(Pids,[]).
+
+progress_map(Collector,ReportInterval,File,Fun,List) ->
Fd = open(File),
- case lookup_and_parse_index_chunk(first_chunk_pointer(What),Fd,ParseFun) of
- done ->
- crashdump_viewer_html:chunk_page(HtmlCB,SessionId,TW,HtmlExtra,done);
- {Chunk,Cont} ->
- HtmlInfo = crashdump_viewer_html:chunk_page(
- HtmlCB,
- SessionId,TW,HtmlExtra,Chunk),
- chunk_page_1(Fd,HtmlInfo,SessionId,ParseFun,
- lookup_and_parse_index_chunk(Cont,Fd,ParseFun))
- end.
-
-chunk_page_1(_Fd,HtmlInfo,SessionId,_ParseFun,done) ->
- crashdump_viewer_html:chunk(SessionId,done,HtmlInfo);
-chunk_page_1(Fd,HtmlInfo,SessionId,ParseFun,{Chunk,Cont}) ->
- crashdump_viewer_html:chunk(SessionId,Chunk,HtmlInfo),
- chunk_page_1(Fd,HtmlInfo,SessionId,ParseFun,
- lookup_and_parse_index_chunk(Cont,Fd,ParseFun)).
-
-lookup_and_parse_index_chunk(Pointer,Fd,ParseFun) ->
- case lookup_index_chunk(Pointer) of
- '$end_of_table' ->
- close(Fd),
- done;
- {Chunk,Cont} ->
- R = lists:map(fun({Id,Start}) ->
- pos_bof(Fd,Start),
- ParseFun(Fd,Id)
- end,
- Chunk),
- {R,Cont}
+ init_progress(ReportInterval, fun(_) -> Collector ! progress end, ok),
+ progress_map(Fd,Fun,List,[]).
+progress_map(Fd,Fun,[H|T],Acc) ->
+ update_progress(),
+ progress_map(Fd,Fun,T,[Fun(Fd,H)|Acc]);
+progress_map(Fd,_Fun,[],Acc) ->
+ close(Fd),
+ exit({pmap_done,Acc}).
+
+collect([],Acc) ->
+ end_progress(),
+ lists:append(Acc);
+collect(Pids,Acc) ->
+ receive
+ progress ->
+ update_progress(),
+ collect(Pids,Acc);
+ {'DOWN', _Ref, process, Pid, {pmap_done,Result}} ->
+ collect(lists:delete(Pid,Pids),[Result|Acc])
end.
+
+%%%-----------------------------------------------------------------
+%%% Help functions for progress reporting
+
+%% Set text in progress dialog and initialize the progress counter
+init_progress(Report,N) ->
+ observer_lib:report_progress({ok,Report}),
+ Interval = (N div 100) + 1,
+ Fun = fun(P0) -> P=P0+1,observer_lib:report_progress({ok,P}),P end,
+ init_progress(Interval,Fun,0).
+init_progress(Interval,Fun,Acc) ->
+ put(progress,{Interval,Interval,Fun,Acc}),
+ ok.
+
+%% Count progress and report on given interval
+update_progress() ->
+ update_progress(1).
+update_progress(Processed) ->
+ do_update_progress(get(progress),Processed).
+
+do_update_progress({Count,Interval,Fun,Acc},Processed) when Processed>Count ->
+ do_update_progress({Interval,Interval,Fun,Fun(Acc)},Processed-Count);
+do_update_progress({Count,Interval,Fun,Acc},Processed) ->
+ put(progress,{Count-Processed,Interval,Fun,Acc}),
+ ok.
+
+%% End progress reporting for this item
+end_progress() ->
+ end_progress({ok,100}).
+end_progress(Report) ->
+ observer_lib:report_progress(Report),
+ erase(progress),
+ ok.
diff --git a/lib/observer/src/crashdump_viewer.hrl b/lib/observer/src/crashdump_viewer.hrl
index 2e0ea5cf96..0e2eba6dee 100644
--- a/lib/observer/src/crashdump_viewer.hrl
+++ b/lib/observer/src/crashdump_viewer.hrl
@@ -16,7 +16,7 @@
%%
%% %CopyrightEnd%
%%
--define(space, "&nbsp;").
+-define(space, undefined).
-define(unknown, "unknown").
-define(r16b01_dump_vsn, [0,2]). % =erl_crash_dump:0.2
@@ -24,28 +24,28 @@
-record(general_info,
{created,
- slogan=?space,
- system_vsn=?space,
- compile_time=?space,
- taints=?space,
- node_name=?space,
- num_atoms=?space,
- num_procs=?space,
- num_ets=?space,
- num_timers=?space,
- num_fun=?space,
- mem_tot=?space,
- mem_max=?space,
- instr_info=?space}).
+ slogan,
+ system_vsn,
+ compile_time,
+ taints,
+ node_name,
+ num_atoms,
+ num_procs,
+ num_ets,
+ num_timers,
+ num_fun,
+ mem_tot,
+ mem_max,
+ instr_info}).
-record(proc,
%% Initial data according to the follwoing:
%%
- %% msg_q_len, reds and stack_heap are integers because it must
+ %% msg_q_len, reds, memory and stack_heap are integers because it must
%% be possible to sort on them. All other fields are strings
%%
- %% for old dumps start_time, parent and number of heap frament
- %% does not exist
+ %% for old dumps start_time, parent and number of heap framents
+ %% do not exist
%%
%% current_func can be both "current function" and
%% "last scheduled in for"
@@ -54,100 +54,103 @@
%% displayed as a link to "Expand" (if dump is from OTP R9B
%% or newer)
{pid,
- name=?space,
- init_func=?space,
+ name,
+ init_func,
parent=?unknown,
start_time=?unknown,
- state=?space,
- current_func={"Current Function",?space},
+ state,
+ current_func,
msg_q_len=0,
- msg_q=?space,
- last_calls=?space,
- links=?space,
- prog_count=?space,
- cp=?space,
- arity=?space,
- dict=?space,
- debug_dict=?space,
+ msg_q,
+ last_calls,
+ links,
+ monitors,
+ mon_by,
+ prog_count,
+ cp,
+ arity,
+ dict,
reds=0,
num_heap_frag=?unknown,
- heap_frag_data=?space,
+ heap_frag_data,
stack_heap=0,
- old_heap=?space,
- heap_unused=?space,
- old_heap_unused=?space,
- new_heap_start=?space,
- new_heap_top=?space,
- stack_top=?space,
- stack_end=?space,
- old_heap_start=?space,
- old_heap_top=?space,
- old_heap_end=?space,
+ old_heap,
+ heap_unused,
+ old_heap_unused,
+ new_heap_start,
+ new_heap_top,
+ stack_top,
+ stack_end,
+ old_heap_start,
+ old_heap_top,
+ old_heap_end,
memory,
- stack_dump=?space}).
+ stack_dump}).
-record(port,
{id,
- slot=?space,
- connected=?space,
- links=?space,
- name=?space,
- monitors=?space,
- controls=?space}).
+ slot,
+ connected,
+ links,
+ name,
+ monitors,
+ controls}).
-record(ets_table,
{pid,
- slot=?space,
- id=?space,
- name=?space,
+ slot,
+ id,
+ name,
type="hash",
- buckets=?space,
- size=?space,
- memory=?space}).
+ buckets,
+ size,
+ memory}).
-record(timer,
{pid,
- msg=?space,
- time=?space}).
+ name,
+ msg,
+ time}).
-record(fu,
- {module=?space,
- uniq=?space,
- index=?space,
- address=?space,
- native_address=?space,
- refc=?space}).
+ {module,
+ uniq,
+ index,
+ address,
+ native_address,
+ refc}).
-record(nod,
- {name=?space,
+ {name,
channel,
- controller=?space,
- creation=?space,
- remote_links=?space,
- remote_mon=?space,
- remote_mon_by=?space,
- error=?space}).
+ conn_type,
+ controller,
+ creation,
+ remote_links=[],
+ remote_mon=[],
+ remote_mon_by=[],
+ error}).
-record(loaded_mod,
{mod,
- current_size=?space,
- current_attrib=?space,
- current_comp_info=?space,
- old_size=?space,
- old_attrib=?space,
- old_comp_info=?space}).
+ current_size,
+ current_attrib,
+ current_comp_info,
+ old_size,
+ old_attrib,
+ old_comp_info}).
-record(hash_table,
{name,
- size=?space,
- used=?space,
- objs=?space,
- depth=?space}).
+ size,
+ used,
+ objs,
+ depth}).
-record(index_table,
{name,
- size=?space,
- used=?space,
- limit=?space,
- rate=?space,
- entries=?space}).
+ size,
+ limit,
+ used,
+ rate,
+ entries}).
diff --git a/lib/observer/src/crashdump_viewer_html.erl b/lib/observer/src/crashdump_viewer_html.erl
deleted file mode 100644
index 93c1a842b5..0000000000
--- a/lib/observer/src/crashdump_viewer_html.erl
+++ /dev/null
@@ -1,1440 +0,0 @@
-%%
-%% %CopyrightBegin%
-%%
-%% Copyright Ericsson AB 2003-2013. 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(crashdump_viewer_html).
-
-%%
-%% This module implements the HTML generation for the crashdump
-%% viewer. No logic or states are kept by this module.
-%%
-
--export([welcome/0,
- read_file_frame/0,
- redirect/1,
- start_page/0,
- filename_frame/1,
- menu_frame/0,
- general_info/1,
- pretty_info_page/2,
- info_page/2,
- proc_details/4,
- expanded_memory/2,
- expanded_binary/1,
- port/3,
- internal_ets_tables/2,
- nods/2,
- loaded_mod_details/2,
- atoms/4,
- atoms_chunk/2,
- memory/2,
- allocated_areas/2,
- allocator_info/2,
- hash_tables/2,
- index_tables/2,
- error/2,
- chunk_page/5,
- chunk/3]).
-
--include("crashdump_viewer.hrl").
-
-%%%-----------------------------------------------------------------
-%%% Welcome frame
-welcome() ->
- header(body(welcome_body())).
-
-welcome_body() ->
- table(
- "WIDTH=100% HEIGHT=60%",
- [tr("VALIGN=middle",
- td("ALIGN=center",
- font("SIZE=6",
- ["Welcome to the Web Based",br(),
- "Erlang Crash Dump Analyser"]))),
- tr("VALIGN=middle",
- td("ALIGN=center",
- form(["name=load_new ACTION=\"./read_file_frame\""],
- input(["TYPE=submit VALUE=\"Load Crashdump\""]))))]).
-
-%%%-----------------------------------------------------------------
-%%% Present a form to enter file name of erlang crash dump
-read_file_frame() ->
- header("Read File",body(read_file_frame_body())).
-
-
-read_file_frame_body() ->
- %% Using a plain text input field instead of a file input field
- %% (e.g. <INPUT TYPE=file NAME=pathj SIZE=40">) because most
- %% browsers can not forward the full path from this dialog even if
- %% the browser is running on localhost (Ref 'fakepath'-problem)
- Entry = input("TYPE=text NAME=path SIZE=60"),
- Form =
- form(
- "NAME=read_file_form METHOD=post ACTION=\"./read_file\"",
- table(
- "BORDER=0",
- [tr(td("COLSPAN=2","Enter file to analyse")),
- tr(
- [td(Entry),
- td("ALIGN=center",input("TYPE=submit VALUE=Ok"))])])),
- table(
- "WIDTH=100% HEIGHT=60%",
- tr("VALIGN=middle",
- td("ALIGN=center",Form))).
-
-
-%%%-----------------------------------------------------------------
-%%% Display "Please wait..." while crashdump is being read
-redirect(Status) ->
- Head = ["<META HTTP-EQUIV=\"refresh\" CONTENT=\"3; URL=./redirect\">"],
- header("Please wait...",Head,body([Status,br(),"Please wait..."])).
-
-%%%-----------------------------------------------------------------
-%%% Frameset containing "filename", "menu", and "main" frames
-start_page() ->
- header("Crashdump Viewer Start Page",start_page_frameset()).
-
-start_page_frameset() ->
- frameset(
- "ROWS=\"70,*\"",
- [frame(["NAME=\"filename\" SRC=\"./filename_frame\""]),
- frameset(
- "COLS=\"200,*\"",
- [frame(["NAME=\"menu\" ",
- "SRC=\"/cdv_erl/crashdump_viewer/menu_frame\""]),
- frame("NAME=\"main\" SRC=\"./initial_info_frame\"")])]).
-
-
-
-%%%-----------------------------------------------------------------
-%%% Topmost frame presents the filename of the crashdump currently
-%%% viewed
-filename_frame(File) ->
- header("Filename",body(filename_body(File))).
-
-filename_body(File) ->
- p("ALIGN=center",[b("Crashdump currently viewed:"),br(),File]).
-
-
-%%%-----------------------------------------------------------------
-%%% Left frame displays the menu
-menu_frame() ->
- header("Menu", body(menu_body())).
-
-menu_body() ->
- [p(format_items(1,ets:info(cdv_menu_table,size),true)),
- p([br(),
- form(["name=load_new ACTION=\"./read_file_frame\" ",
- "TARGET=app_frame"],
- input("TYPE=submit VALUE=\"Load New Crashdump\""))])].
-
-format_items(I,Max,_ParentState) when I>Max->
- [];
-format_items(I,Max,ParentState) when I=<Max->
- case ets:lookup(cdv_menu_table,I) of
- [] -> [];
- [#menu_item{state=false,children=0}] ->
- format_items(I+1,Max,ParentState);
- [#menu_item{state=false,children=Children}] ->
- format_items(I+Children+1,Max,arentState);
- [Item=#menu_item{state=true,children=0}] when ParentState ->
- This = format_item(Item),
- [This|format_items(I+1,Max,ParentState)];
- [Item=#menu_item{state=true,children=Children}] when ParentState ->
- This = format_item(Item),
- Ch = format_items(I+1,I+Children,true),
- [[This | Ch] | format_items(I+Children+1,Max,ParentState)]
- end.
-
-format_item(Item) ->
- [lists:duplicate(Item#menu_item.depth*5,?space),
- format_picture(Item#menu_item.index,
- Item#menu_item.picture,
- Item#menu_item.children),
- format_title(Item#menu_item.text,Item#menu_item.target),
- br()].
-
-format_picture(_Index,Picture,0) ->
- img(Picture);
-format_picture(Index,Picture,_Children) ->
- href( ["./toggle?index=", integer_to_list(Index)], img(Picture)).
-
-format_title({Link,Text},Target) ->
- href(["TARGET=\"",Target,"\""],Link,Text);
-format_title(Text,_Type) ->
- Text.
-
-%%%-----------------------------------------------------------------
-%%% Display the general information
-general_info(GenInfo) ->
- Heading = "General Information",
- header(Heading,body(general_info_body(Heading,GenInfo))).
-
-general_info_body(Heading,GenInfo) ->
- TruncatedInfo =
- case get(truncated) of
- true ->
- p(font("SIZE=\"+1\" COLOR=\"#FF0000\"",
- b(["WARNING:",br(),
- "The crashdump is truncated",br(),
- "Some information might be missing",br()])));
- false ->
- ""
- end,
-
- [heading(Heading,"general_info"),
- TruncatedInfo,
- table(
- "BORDER=4 CELLPADDING=4",
- [tr([th("ALIGN=left BGCOLOR=\"#8899AA\"","Slogan"),
- td(GenInfo#general_info.slogan)]),
- tr([th("ALIGN=left BGCOLOR=\"#8899AA\"","Node name"),
- td(GenInfo#general_info.node_name)]),
- tr([th("ALIGN=left BGCOLOR=\"#8899AA\"","Crashdump created on"),
- td(GenInfo#general_info.created)]),
- tr([th("ALIGN=left BGCOLOR=\"#8899AA\"","System version"),
- td(GenInfo#general_info.system_vsn)]),
- tr([th("ALIGN=left BGCOLOR=\"#8899AA\"","Compiled"),
- td(GenInfo#general_info.compile_time)]),
- tr([th("ALIGN=left BGCOLOR=\"#8899AA\"","Taints"),
- td(GenInfo#general_info.taints)]),
- case GenInfo#general_info.mem_tot of
- "" -> "";
- MemTot ->
- tr([th("ALIGN=left BGCOLOR=\"#8899AA\"","Memory allocated"),
- td([MemTot," bytes"])])
- end,
- case GenInfo#general_info.mem_max of
- "" -> "";
- MemMax ->
- tr([th("ALIGN=left BGCOLOR=\"#8899AA\"","Memory maximum"),
- td([MemMax," bytes"])])
- end,
- tr([th("ALIGN=left BGCOLOR=\"#8899AA\"","Atoms"),
- td(GenInfo#general_info.num_atoms)]),
- tr([th("ALIGN=left BGCOLOR=\"#8899AA\"","Processes"),
- td(GenInfo#general_info.num_procs)]),
- tr([th("ALIGN=left BGCOLOR=\"#8899AA\"","ETS tables"),
- td(GenInfo#general_info.num_ets)]),
- tr([th("ALIGN=left BGCOLOR=\"#8899AA\"","Timers"),
- td(GenInfo#general_info.num_timers)]),
- tr([th("ALIGN=left BGCOLOR=\"#8899AA\"","Funs"),
- td(GenInfo#general_info.num_fun)])]),
- case GenInfo#general_info.instr_info of
- old_instr_data ->
- [br(),br(),
- font("COLOR=\"#FF0000\"",
- ["Instrumentation information is found at the end of ",br(),
- "the dump. The information has an old format, and ",br(),
- "is not presented in this tool. Please read the ",br(),
- "crashdump manually to see this information."])];
- instr_data ->
- [br(),br(),
- font("COLOR=\"#FF0000\"",
- ["Instrumentation information is found at the end of ",br(),
- "the dump. The information is not presented in this ",br(),
- "tool. Please read the crashdump manually to see",br(),
- "this information."])];
- false ->
- []
- end].
-
-%%%-----------------------------------------------------------------
-%%% Display an error message
-error(Text,Args) ->
- Str = io_lib:format(Text,Args),
- header(body(error_body(Str))).
-
-error_body(Str) ->
- [h1("An error occured:"),Str,"\n"].
-
-
-%%%-----------------------------------------------------------------
-%%% Display the given information as is
-info_page(Heading,Info) ->
- info_page(Heading,Info,[]).
-info_page(Heading,Info,TW) ->
- header(Heading,body(info_body(Heading,Info,TW))).
-
-info_body(Heading,[],TW) ->
- [h1(Heading),
- warn(TW),
- "No information was found\n"];
-info_body(Heading,Info,TW) ->
- [h1(Heading),
- warn(TW),
- pre(href_proc_port(lists:flatten(Info)))].
-
-%%%-----------------------------------------------------------------
-%%% Pretty print the given information
-pretty_info_page(Heading,Info) ->
- header(Heading,body(pretty_info_body(Heading,Info))).
-
-pretty_info_body(Heading,[]) ->
- [h1(Heading),
- "No information was found\n"];
-pretty_info_body(Heading,Info) ->
- [h1(Heading),
- pre(pretty_format(Info))].
-
-%%%-----------------------------------------------------------------
-%%% Print details for one process
-proc_details(Pid,Proc,TW,SharedHeap) ->
- Script =
-"<SCRIPT type=\"text/javascript\">
- function popup() {
- window.open(\"\",\"expanded\",'resizable=yes,scrollbars=yes')
-}
-</SCRIPT>\n",
-
- Heading = ["Process ", Pid],
- header(Heading,Script,body(proc_details_body(Heading,Proc,TW,SharedHeap))).
-
-proc_details_body(Heading,Proc,TW,SharedHeap) ->
- Pid = Proc#proc.pid,
- Name = if Proc#proc.name==Proc#proc.init_func -> ?space;
- true -> Proc#proc.name
- end,
- [help("processes"),
- warn(TW),
- table(
- "BORDER=4 COLS=4 WIDTH=\"100%\"",
- [tr(
- "BGCOLOR=\"#8899AA\"",
- [td("COLSPAN=4 ALIGN=center",Heading)]),
- tr(
- [td("NOWRAP=true",b("Name")),
- td("COLSPAN=1",Name),
- td("NOWRAP=true",b("Spawned as")),
- td("COLSPAN=1",Proc#proc.init_func)]),
- tr(
- [td("NOWRAP=true",b("State")),
- td("COLSPAN=1",Proc#proc.state),
- td("NOWRAP=true",b(element(1,Proc#proc.current_func))),
- td("COLSPAN=1",element(2,Proc#proc.current_func))]),
- tr(
- [td("NOWRAP=true",b("Started")),
- td("COLSPAN=1",Proc#proc.start_time),
- td("NOWRAP=true",b("Spawned by")),
- td("COLSPAN=1",href_proc_port(Proc#proc.parent))]),
- tr(
- [td("NOWRAP=true",b("Reductions")),
- td("COLSPAN=1",integer_to_list(Proc#proc.reds))] ++
- case Proc#proc.memory of
- undefined -> []; % before R16B01
- Mem ->
- [td("NOWRAP=true",b("Memory (bytes)")),
- td("COLSPAN=1",integer_to_list(Mem))]
- end),
- if SharedHeap ->
- Stack = case Proc#proc.stack_heap of
- -1 -> "unknown";
- S -> integer_to_list(S)
- end,
- tr(
- [td("NOWRAP=true",b("Stack")),
- td("COLSPAN=3",Stack)]);
- true ->
- [tr(
- [td("NOWRAP=true",b("Stack+heap")),
- td(integer_to_list(Proc#proc.stack_heap)),
- td("NOWRAP=true",b("OldHeap")),
- td(Proc#proc.old_heap)]),
- tr(
- [td("NOWRAP=true",b("Heap unused")),
- td(Proc#proc.heap_unused),
- td("NOWRAP=true",b("OldHeap unused")),
- td(Proc#proc.old_heap_unused)]),
- tr(
- [td("NOWRAP=true",b("Number of heap fragments")),
- td(Proc#proc.num_heap_frag),
- td("NOWRAP=true",b("Heap fragment data")),
- td(Proc#proc.heap_frag_data)])]
- end,
- case Proc#proc.new_heap_start of
- ?space -> "";
- _ ->
- %% Garbing
- [tr(
- [td("NOWRAP=true",b("New heap start")),
- td("COLSPAN=1",Proc#proc.new_heap_start),
- td("NOWRAP=true",b("New heap top")),
- td("COLSPAN=1",Proc#proc.new_heap_top)]),
- tr(
- [td("NOWRAP=true",b("Stack top")),
- td("COLSPAN=1",Proc#proc.stack_top),
- td("NOWRAP=true",b("Stack end")),
- td("COLSPAN=1",Proc#proc.stack_end)]),
- tr(
- [td("NOWRAP=true",b("Old heap start")),
- td("COLSPAN=1",Proc#proc.old_heap_start),
- td("NOWRAP=true",b("Old heap top")),
- td("COLSPAN=1",Proc#proc.old_heap_top)]),
- tr(
- [td("NOWRAP=true",b("Old heap end")),
- td("COLSPAN=3",Proc#proc.old_heap_end)])]
- end,
- case Proc#proc.prog_count of
- ?space -> "";
- _ ->
- [tr(
- [td("NOWRAP=true",b("Program counter")),
- td("COLSPAN=3",Proc#proc.prog_count)]),
- tr(
- [td("NOWRAP=true",b("Continuation pointer")),
- td("COLSPAN=3",Proc#proc.cp)]),
- tr(
- [td("NOWRAP=true",b("Arity")),
- td("COLSPAN=3",Proc#proc.arity)])]
- end,
- tr(
- [td("NOWRAP=true",b("Link list")),
- td("COLSPAN=3",href_proc_port(Proc#proc.links))]),
-
- tr(
- [td("NOWRAP=true",b("Msg queue length")),
- td("COLSPAN=3",integer_to_list(Proc#proc.msg_q_len))]),
-
- %% These are displayed only if data exist
- display_or_link_to_expand("MsgQueue",Proc#proc.msg_q,Pid),
- display_or_link_to_expand("Dictionary",Proc#proc.dict,Pid),
- display_or_link_to_expand("DebugDictionary",Proc#proc.debug_dict,Pid),
- display_or_link_to_expand("LastCalls",Proc#proc.last_calls,Pid),
- display_or_link_to_expand("StackDump",Proc#proc.stack_dump,Pid)]),
-
- p([href(["./ets_tables?pid=",Proc#proc.pid],
- "ETS tables owned by this process"),
- "&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;",
- href(["./timers?pid=",Proc#proc.pid],
- "Timers owned by this process")])].
-
-display_or_link_to_expand(Heading,Data,Pid) ->
- case Data of
- expand ->
- link_to_read_memory(Heading,Pid);
- truncated ->
- Text = font("COLOR=\"#FF0000\"",
- "The dump is truncated, no data available"),
- tr(
- [td("NOWRAP=true VALIGN=top",b(Heading)),
- td("COLSPAN=3",Text)]);
- ?space ->
- "";
- {size,Truncated,Size,Pos} ->
- %% Too much data, or truncated data -
- %% display a link to expand it
- tr(
- [td("NOWRAP=true",b(Heading)),
- td("COLSPAN=3",
- href("TARGET=\"expanded\" onClick=popup()",
- ["./expand?pos=",integer_to_list(Pos),
- "&size=",integer_to_list(Size),
- "&what=",Heading,
- "&truncated=",atom_to_list(Truncated)],
- ["Expand (",integer_to_list(Size)," bytes)"]))]);
- _ ->
- %% Not too much Data - display it
- tr(
- [td("NOWRAP=true VALIGN=top",b(Heading)),
- td("COLSPAN=3",pre(format(Heading,Data)))])
- end.
-
-link_to_read_memory(Heading,Pid) ->
- tr(
- [td("NOWRAP=true",b(Heading)),
- td("COLSPAN=3",
- href("TARGET=\"expanded\" onClick=popup()",
- ["./expand_memory?pid=",Pid,
- "&what=",Heading],
- ["Expand ", Heading]))]).
-
-format("LastCalls",Data) ->
- Data;
-format("StackDump",Data) ->
- Data;
-format(_Heading,Data) ->
- pretty_format(Data).
-
-
-
-%%%-----------------------------------------------------------------
-%%% Expanded memory
-expanded_memory(Heading,Expanded) ->
- header(Heading,body(expanded_memory_body(Heading,Expanded))).
-
-expanded_memory_body(Heading,[]) ->
- [heading(Heading,"processes"),
- case Heading of
- "MsgQueue" -> "No messages were found";
- "StackDump" -> "No stack dump was found";
- "Dictionary" -> "No dictionary was found";
- "DebugDictionary" -> "No debug dictionary was found"
- end];
-expanded_memory_body(Heading,Expanded) ->
- [heading(Heading,"processes"),
- case Heading of
- "MsgQueue" ->
- table(
- "BORDER=4 CELLPADDING=4",
- [tr(
- [th("Message"),
- th("SeqTraceToken")]) |
- lists:map(fun(Msg) -> msgq_table(Msg) end, Expanded)]);
- "StackDump" ->
- table(
- "BORDER=4 CELLPADDING=4",
- [tr(
- [th("Label"),
- th("Term")]) |
- lists:map(fun(Entry) -> stackdump_table(Entry) end, Expanded)]);
- _ ->
- table(
- "BORDER=4 CELLPADDING=4",
- [tr(
- [th("Key"),
- th("Value")]) |
- lists:map(fun(Entry) -> dict_table(Entry) end, Expanded)])
- end].
-
-msgq_table({Msg0,Token0}) ->
- Token = case Token0 of
- [] -> ?space;
- _ -> io_lib:fwrite("~w",[Token0])
- end,
- Msg = href_proc_port(lists:flatten(io_lib:format("~p",[Msg0]))),
- tr([td(pre(Msg)), td(Token)]).
-
-stackdump_table({Label0,Term0}) ->
- Label = io_lib:format("~w",[Label0]),
- Term = href_proc_port(lists:flatten(io_lib:format("~p",[Term0]))),
- tr([td("VALIGN=top",Label), td(pre(Term))]).
-
-dict_table({Key0,Value0}) ->
- Key = href_proc_port(lists:flatten(io_lib:format("~p",[Key0]))),
- Value = href_proc_port(lists:flatten(io_lib:format("~p",[Value0]))),
- tr([td("VALIGN=top",pre(Key)), td(pre(Value))]).
-
-
-%%%-----------------------------------------------------------------
-%%% Display an expanded binary, i.e. the whole binary, not just the
-%%% size of it.
-expanded_binary(Bin) ->
- Heading = "Expanded binary",
- header(Heading,body(expanded_binary_body(Heading,Bin))).
-
-expanded_binary_body(Heading,Bin) ->
- [h1(Heading),
- pre(href_proc_port(lists:flatten(Bin))),
- br(),br(),
- href("javascript:history.go(-1)","BACK")].
-
-%%%-----------------------------------------------------------------
-%%% Print info for one port
-port(Heading,Port,TW) ->
- header(Heading,body(port_body(Heading,Port,TW))).
-
-port_body(Heading,Port,TW) ->
- [heading(Heading,"ports"),
- warn(TW),
- table(
- "BORDER=4 CELLPADDING=4",
- [tr([th(Head) || Head <- port_table_head()]), ports_table(Port)])].
-
-%%%-----------------------------------------------------------------
-%%% Print table of internal ETS tables
-internal_ets_tables(InternalEts,TW) ->
- Heading = "Internal ETS tables",
- header(Heading,body(internal_ets_tables_body(Heading,InternalEts,TW))).
-
-internal_ets_tables_body(Heading,[],TW) ->
- [h1(Heading),
- warn(TW),
- "No internal ETS tables were found\n"];
-internal_ets_tables_body(Heading,InternalEts,TW) ->
- [heading(Heading,"internal_ets_tables"),
- warn(TW),
- table(
- "BORDER=4 CELLPADDING=4",
- [tr(
- [th("Description"),
- th("Id"),
- th("Name"),
- th("Type"),
- th("Buckets"),
- th("Objects"),
- th("Memory (bytes)")]) |
- lists:map(fun(InternalEtsTable) ->
- internal_ets_tables_table1(InternalEtsTable)
- end,
- InternalEts)])].
-
-internal_ets_tables_table1({Descr,InternalEtsTable}) ->
- #ets_table{id=Id,name=Name,type=Type,buckets=Buckets,
- size=Size,memory=Memory} = InternalEtsTable,
- tr(
- [td(Descr),
- td(Id),
- td(Name),
- td(Type),
- td("ALIGN=right",Buckets),
- td("ALIGN=right",Size),
- td("ALIGN=right",Memory)]).
-
-%%%-----------------------------------------------------------------
-%%% Print table of nodes in distribution
-nods(Nods,TW) ->
- header("Distribution Information",body(nodes_body(Nods,TW))).
-
-nodes_body(no_distribution,_TW) ->
- [heading("Distribution Information","distribution_info"),
- "Not alive\n"];
-nodes_body({Type,Info,Node},TW) when is_record(Node,nod) ->
- %% Display only one node - used when a pid or port on a remote
- %% node is clicked.
- [heading("Remote Node","distribution_info"),
- warn(TW),
- Info,
- make_nodes_table(Type,[Node])];
-nodes_body({Visible,Hidden,NotConnected},TW) ->
- %% Display all nodes - this is the complete distribution info
- [heading("Distribution Information","distribution_info"),
- warn(TW),
- make_nodes_table("Visible Nodes",Visible),
- make_nodes_table("Hidden Nodes",Hidden),
- make_nodes_table("Not Connected Nodes",NotConnected)].
-
-make_nodes_table(Text,[]) ->
- p(["No \"",Text,"\" were found"]);
-make_nodes_table(Text,Nodes) ->
- p(table(
- "BORDER=4 CELLPADDING=4",
- [nodes_table_heading(Text),
- lists:map(fun(Node) -> nodes_table_row(Node) end, Nodes)])).
-
-nodes_table_heading(Text) ->
- [tr("BGCOLOR=\"#8899AA\"",[th("COLSPAN=6",Text)]),
- tr([th("Name"),
- th("Channel"),
- th("Controller"),
- th("Creation(s)"),
- th("Links/Monitors"),
- th("Extra info")])].
-
-nodes_table_row(Node) ->
- #nod{name=Name,channel=Channel,controller=Controller,creation=Creation,
- remote_links=Links,remote_mon=Mon,remote_mon_by=MonBy,error=Error}=Node,
- tr(
- [td(maybe_refcount(Name)),
- td("ALIGN=right",Channel),
- td(href_proc_port(Controller)),
- td("ALIGN=right",break_lines_creation(Creation)),
- td(format_links_and_monitors(Links,Mon,MonBy)),
- td(format_extra_info(Error))]).
-
-maybe_refcount(Name) ->
- maybe_refcount(Name, []).
-maybe_refcount([$ ,$( | Rest], Acc) ->
- [lists:reverse(Acc),br(),[$(|Rest]];
-maybe_refcount([Char | Rest], Acc) ->
- maybe_refcount(Rest, [Char | Acc]);
-maybe_refcount([],Acc) ->
- lists:reverse(Acc).
-
-break_lines_creation(Creation) ->
- break_lines_creation(Creation,[]).
-break_lines_creation([$ ,$( | Rest1], Acc) ->
- {RefCount,Rest2} = to_end_par(Rest1,[$(,$ ]),
- [lists:reverse(Acc),RefCount,br(),break_lines_creation(Rest2)];
-break_lines_creation([$ | Rest], Acc) ->
- [lists:reverse(Acc),br(),break_lines_creation(Rest)];
-break_lines_creation([Char | Rest], Acc) ->
- break_lines_creation(Rest, [Char | Acc]);
-break_lines_creation([],Acc) ->
- lists:reverse(Acc).
-
-to_end_par([$),$ | Rest], Acc) ->
- {lists:reverse([$) | Acc]),Rest};
-to_end_par([$) | Rest], Acc) ->
- {lists:reverse([$) | Acc]),Rest};
-to_end_par([Char | Rest], Acc) ->
- to_end_par(Rest, [Char | Acc]);
-to_end_par([],Acc) ->
- {lists:reverse(Acc),[]}.
-
-
-format_links_and_monitors(?space,?space,?space) ->
- ?space;
-format_links_and_monitors(Links,Mon,MonBy) ->
- [format_links_and_monitors(Links," is linked to "),
- format_links_and_monitors(Mon," is monitoring "),
- format_links_and_monitors(MonBy," is monitored by ")].
-
-format_links_and_monitors(?space,_Text) ->
- "";
-format_links_and_monitors([{Local,Remote}|Rest],Text) ->
- [[href_proc_port(Local),Text,href_proc_port(Remote),br()] |
- format_links_and_monitors(Rest,Text)];
-format_links_and_monitors([],_Text) ->
- [].
-
-format_extra_info(?space) ->
- ?space;
-format_extra_info(Error) ->
- case Error of
- ?space -> "";
- _ -> font("COLOR=\"#FF0000\"",["ERROR: ",Error,"\n"])
- end.
-
-%%%-----------------------------------------------------------------
-%%% Print detailed information about one module
-loaded_mod_details(ModInfo,TW) ->
- header(ModInfo#loaded_mod.mod,body(loaded_mod_details_body(ModInfo,TW))).
-
-loaded_mod_details_body(ModInfo,TW) ->
- #loaded_mod{mod=Mod,current_size=CS,current_attrib=CA,
- current_comp_info=CCI,old_size=OS,
- old_attrib=OA,old_comp_info=OCI} = ModInfo,
- [help("loaded_modules"),
- warn(TW),
- table(
- "BORDER=4 CELLPADDING=4",
- [tr(th("BGCOLOR=\"#8899AA\" COLSPAN=3",
- ["Module: ",Mod])),
- tr([td(?space),th("Current"),th("Old")]),
- tr([th("ALIGN=left","Size (bytes)"),
- td(CS),
- td(OS)]),
- tr([th("ALIGN=left","Attributes"),
- td(pre(CA)),
- td(pre(OA))]),
- tr([th("ALIGN=left","Compilation info"),
- td(pre(CCI)),
- td(pre(OCI))])])].
-
-
-%%%-----------------------------------------------------------------
-%%% Print atoms
-atoms(SessionId,TW,Num,FirstChunk) ->
- Heading = "Atoms",
- case FirstChunk of
- done ->
- deliver_first(SessionId,[start_html_page(Heading),
- h1(Heading),
- warn(TW),
- "No atoms were found in log",br(),
- "Total number of atoms in node was ", Num,
- br()]);
- _ ->
- deliver_first(SessionId,[start_html_page(Heading),
- heading(Heading,"atoms"),
- warn(TW),
- "Total number of atoms in node was ", Num,
- br(),
- "The last created atom is shown first",
- br(),
- start_pre()]),
- atoms_chunk(SessionId,FirstChunk)
- end.
-
-atoms_chunk(SessionId,done) ->
- deliver(SessionId,[stop_pre(),stop_html_page()]);
-atoms_chunk(SessionId,Atoms) ->
- deliver(SessionId,Atoms).
-
-%%%-----------------------------------------------------------------
-%%% Print memory information
-memory(Memory,TW) ->
- Heading = "Memory Information",
- header(Heading,body(memory_body(Heading,Memory,TW))).
-
-memory_body(Heading,[],TW) ->
- [h1(Heading),
- warn(TW),
- "No memory information was found\n"];
-memory_body(Heading,Memory,TW) ->
- [heading(Heading,"memory"),
- warn(TW),
- table(
- "BORDER=4 CELLPADDING=4",
- [tr("BGCOLOR=\"#8899AA\"",
- [th(?space),
- th("Bytes")]) |
- lists:map(fun(Entry) -> memory_table(Entry) end, Memory)])].
-
-memory_table({Key,Value}) ->
- tr([th("ALIGN=left",Key),td("ALIGN=right",Value)]).
-
-%%%-----------------------------------------------------------------
-%%% Print allocated areas information
-allocated_areas(AllocatedAreas,TW) ->
- Heading = "Information about allocated areas",
- header(Heading,body(allocated_areas_body(Heading,AllocatedAreas,TW))).
-
-allocated_areas_body(Heading,[],TW) ->
- [h1(Heading),
- warn(TW),
- "No information was found about allocated areas\n"];
-allocated_areas_body(Heading,AllocatedAreas,TW) ->
- [heading(Heading,"memory"),
- warn(TW),
- table(
- "BORDER=4 CELLPADDING=4",
- [tr("BGCOLOR=\"#8899AA\"",
- [th(?space),
- th("Allocated (bytes)"),
- th("Used (bytes)")]) |
- lists:map(fun(Entry) -> allocated_areas_table(Entry) end,
- AllocatedAreas)])].
-
-allocated_areas_table({Key,Alloc,Used}) ->
- tr(
- [th("ALIGN=left",Key),
- td("ALIGN=right",Alloc),
- td("ALIGN=right",Used)]).
-
-
-%%%-----------------------------------------------------------------
-%%% Print allocator_info information
-allocator_info(Allocators,TW) ->
- Heading = "Allocator Information",
- header(Heading,body(allocator_info_body(Heading,Allocators,TW))).
-
-allocator_info_body(Heading,[],TW) ->
- [h1(Heading),
- warn(TW),
- "No information was found about allocators\n"];
-allocator_info_body(Heading,Allocators,TW) ->
- [heading(Heading,"memory"),
- warn(TW),
- p(b("Sizes are in bytes")),
- lists:map(fun({Head,Allocator}) ->
- TableHead =
- case Head of
- {SubTitle,Columns} ->
- tr("BGCOLOR=\"#8899AA\"",
- [th("ALIGN=left",
- font("SIZE=+1",SubTitle)) |
- lists:map(
- fun(CH) ->
- th("ALIGN=right",CH)
- end,
- Columns)]);
- SubTitle ->
- tr("BGCOLOR=\"#8899AA\"",
- th("COLSPAN=10 ALIGN=left",
- font("SIZE=+1",SubTitle)))
- end,
- [table(
- "BORDER=4 CELLPADDING=4",
- [TableHead |
- lists:map(
- fun({Key,Values}) ->
- tr([th("ALIGN=left",Key) |
- lists:map(
- fun(Val) ->
- td("ALIGN=right",Val)
- end,Values)])
- end,
- Allocator)]),
- br(),br()]
- end,
- Allocators)].
-
-%%%-----------------------------------------------------------------
-%%% Print informatin about internal tables
-hash_tables(HashTables,TW) ->
- Heading = "Hash Table Information",
- header(Heading,body(hash_tables_body(Heading,HashTables,TW))).
-
-hash_tables_body(Heading,[],TW) ->
- [h1(Heading),
- warn(TW),
- "No hash table information was found\n"];
-hash_tables_body(Heading,HashTables,TW) ->
- [heading(Heading,"internal_tables"),
- warn(TW),
- table(
- "BORDER=4 CELLPADDING=4",
- [tr(
- [th("Name"),
- th("Size"),
- th("Used"),
- th("Objects"),
- th("Depth")]) |
- lists:map(fun(HashTable) -> hash_tables_table(HashTable) end,
- HashTables)])].
-
-hash_tables_table(HashTable) ->
- #hash_table{name=Name,size=Size,used=Used,objs=Objs,depth=Depth}=HashTable,
- tr(
- [td(Name),
- td("ALIGN=right",Size),
- td("ALIGN=right",Used),
- td("ALIGN=right",Objs),
- td("ALIGN=right",Depth)]).
-
-index_tables(IndexTables,TW) ->
- Heading = "Index Table Information",
- header(Heading,body(index_tables_body(Heading,IndexTables,TW))).
-
-index_tables_body(Heading,[],TW) ->
- [h1(Heading),
- warn(TW),
- "No index table information was found\n"];
-index_tables_body(Heading,IndexTables,TW) ->
- [heading(Heading,"internal_tables"),
- warn(TW),
- table(
- "BORDER=4 CELLPADDING=4",
- [tr(
- [th("Name"),
- th("Size"),
- th("Limit"),
- th("Used"),
- th("Rate"),
- th("Entries")]) |
- lists:map(fun(IndexTable) -> index_tables_table(IndexTable) end,
- IndexTables)])].
-
-index_tables_table(IndexTable) ->
- #index_table{name=Name,size=Size,limit=Limit,used=Used,
- rate=Rate,entries=Entries} = IndexTable,
- tr(
- [td(Name),
- td("ALIGN=right",Size),
- td("ALIGN=right",Limit),
- td("ALIGN=right",Used),
- td("ALIGN=right",Rate),
- td("ALIGN=right",Entries)]).
-
-%%%-----------------------------------------------------------------
-%%% Internal library
-start_html_page(Title) ->
- [only_http_header(),
- start_html(),
- only_html_header(Title),
- start_html_body()].
-
-stop_html_page() ->
- [stop_html_body(),
- stop_html()].
-
-only_http_header() ->
- ["Pragma:no-cache\r\n",
- "Content-type: text/html\r\n\r\n"].
-
-only_html_header(Title) ->
- only_html_header(Title,"").
-only_html_header(Title,JavaScript) ->
- ["<HEAD>\n",
- "<TITLE>", Title, "</TITLE>\n",
- JavaScript,
- "</HEAD>\n"].
-
-start_html() ->
- "<HTML>\n".
-stop_html() ->
- "</HTML>".
-start_html_body() ->
- "<BODY BGCOLOR=\"#FFFFFF\">\n".
-stop_html_body() ->
- "</BODY>\n".
-
-header(Body) ->
- header("","",Body).
-header(Title,Body) ->
- header(Title,"",Body).
-header(Title,JavaScript,Body) ->
- [only_http_header(),
- html_header(Title,JavaScript,Body)].
-
-html_header(Title,JavaScript,Body) ->
- [start_html(),
- only_html_header(Title,JavaScript),
- Body,
- stop_html()].
-
-body(Text) ->
- [start_html_body(),
- Text,
- stop_html_body()].
-
-frameset(Args,Frames) ->
- ["<FRAMESET ",Args,">\n", Frames, "\n</FRAMESET>\n"].
-frame(Args) ->
- ["<FRAME ",Args, ">\n"].
-
-start_visible_table() ->
- start_table("BORDER=\"4\" CELLPADDING=\"4\"").
-start_visible_table(ColTitles) ->
- [start_visible_table(),
- tr([th(ColTitle) || ColTitle <- ColTitles])].
-
-start_table(Args) ->
- ["<TABLE ", Args, ">\n"].
-stop_table() ->
- "</TABLE>\n".
-
-table(Args,Text) ->
- [start_table(Args), Text, stop_table()].
-tr(Text) ->
- ["<TR>\n", Text, "\n</TR>\n"].
-tr(Args,Text) ->
- ["<TR ", Args, ">\n", Text, "\n</TR>\n"].
-th(Text) ->
- ["<TH>", Text, "</TH>"].
-th(Args,Text) ->
- ["<TH ", Args, ">\n", Text, "\n</TH>\n"].
-td(Text) ->
- ["<TD>", Text, "</TD>"].
-td(Args,Text) ->
- ["<TD ", Args, ">", Text, "</TD>"].
-
-b(Text) ->
- ["<B>",Text,"</B>"].
-em(Text) ->
- ["<EM>",Text,"</EM>\n"].
-start_pre() ->
- "<PRE>".
-stop_pre() ->
- "</PRE>".
-pre(Text) ->
- [start_pre(),Text,stop_pre()].
-href(Link,Text) ->
- ["<A HREF=\"",Link,"\">",Text,"</A>"].
-href(Args,Link,Text) ->
- ["<A HREF=\"",Link,"\" ",Args,">",Text,"</A>"].
-img("") ->
- "";
-img(Picture) ->
- ["<IMG SRC=\"", Picture, "\" BORDER=0>"].
-form(Args,Text) ->
- ["<FORM ",Args,">\n",Text,"\n</FORM>\n"].
-input(Args) ->
- ["<INPUT ", Args, ">\n"].
-h1(Text) ->
- ["<H1>",Text,"</H1>\n"].
-font(Args,Text) ->
- ["<FONT ",Args,">\n",Text,"\n</FONT>\n"].
-p(Text) ->
- ["<P>",Text,"</P>\n"].
-p(Args, Text) ->
- ["<P ", Args, ">",Text,"</P>\n"].
-br() ->
- "<BR>\n".
-
-
-%% In all the following, "<" is changed to "&lt;" and ">" is changed to "&gt;"
-href_proc_port(Text) ->
- href_proc_port(Text,[]).
-href_proc_port([$#,$R,$e,$f,$<|T],Acc) ->
- %% No links to refs
- href_proc_port(T,[$;,$t,$l,$&,$f,$e,$R,$#|Acc]);
-href_proc_port([$#,$F,$u,$n,$<|T],Acc) ->
- %% No links to funs
- href_proc_port(T,[$;,$t,$l,$&,$n,$u,$F,$#|Acc]);
-href_proc_port([$#,$P,$o,$r,$t,$<|T],Acc) ->
- {[$#|Port]=HashPort,Rest} = to_gt(T,[$;,$t,$l,$&,$t,$r,$o,$P,$#]),
- href_proc_port(Rest,[href("TARGET=\"main\"",
- ["./port?port=",Port],HashPort)|Acc]);
-href_proc_port([$<,$<|T],Acc) ->
- %% No links to binaries
- href_proc_port(T,[$;,$t,$l,$&,$;,$t,$l,$&|Acc]);
-href_proc_port([$<,C|T],Acc) when $0 =< C, C =< $9 ->
- %% Pid
- {Pid,Rest} = to_gt(T,[C,$;,$t,$l,$&]),
- href_proc_port(Rest,[href("TARGET=\"main\"",
- ["./proc_details?pid=",Pid],Pid)|Acc]);
-href_proc_port([$",$#,$C,$D,$V,$B,$i,$n,$<|T],Acc) ->
- %% Binary written by crashdump_viewer:parse_heap_term(...)
- {SizeAndPos,[$"|Rest]} = split($>,T),
- {Size,Pos} = split($,,SizeAndPos),
- href_proc_port(Rest,[href("TARGET=\"expanded\"",
- ["./expand_binary?pos=",Pos],
- ["&lt;&lt; ",Size," bytes &gt;&gt;"]) | Acc]);
-href_proc_port([$",$#,$C,$D,$V,$P,$o,$r,$t,$<|T],Acc) ->
- %% Port written by crashdump_viewer:parse_term(...)
- {[$#|Port]=HashPort,[$"|Rest]} = to_gt(T,[$;,$t,$l,$&,$t,$r,$o,$P,$#]),
- href_proc_port(Rest,[href("TARGET=\"main\"",
- ["./port?port=",Port],HashPort)|Acc]);
-href_proc_port([$",$#,$C,$D,$V,$P,$i,$d,$<|T],Acc) ->
- %% Pid written by crashdump_viewer:parse_term(...)
- {Pid,[$"|Rest]} = to_gt(T,[$;,$t,$l,$&]),
- href_proc_port(Rest,[href("TARGET=\"main\"",
- ["./proc_details?pid=",Pid],Pid)|Acc]);
-href_proc_port([$',$#,$C,$D,$V,$I,$n,$c,$o,$m,$p,$l,$e,$t,$e,$H,$e,$a,$p,$'|T],
- Acc)->
- %% The heap is incomplete! Written by crashdump_viewer:deref_pts(...)
- IH = lists:reverse(
- lists:flatten(
- "<FONT COLOR=\"#FF0000\">...(Incomplete Heap)</FONT>")),
- href_proc_port(T,IH++Acc);
-href_proc_port([$',$#,$C,$D,$V,$T,$r,$u,$n,$c,$a,$t,$e,$d,$B,$i,$n,$a,$r,$y,$'
- |T], Acc)->
- %% A binary which is truncated! Written by
- %% crashdump_viewer:parse_heap_term(...)
- IH = lists:reverse(
- lists:flatten(
- "<FONT COLOR=\"#FF0000\">&lt;&lt;...(Truncated Binary)&gt;&gt;"
- "</FONT>")),
- href_proc_port(T,IH++Acc);
-href_proc_port([$',$#,$C,$D,$V,$N,$o,$n,$e,$x,$i,$s,$t,$i,$n,$g,$B,$i,$n,$a,$r,
- $y,$'|T], Acc)->
- %% A binary which could not be found in the dump! Written by
- %% crashdump_viewer:parse_heap_term(...)
- IH = lists:reverse(
- lists:flatten(
- "<FONT COLOR=\"#FF0000\">&lt;&lt;...(Nonexisting Binary)&gt;&gt;"
- "</FONT>")),
- href_proc_port(T,IH++Acc);
-href_proc_port([$<|T],Acc) ->
- href_proc_port(T,[$;,$t,$l,$&|Acc]);
-href_proc_port([$>|T],Acc) ->
- href_proc_port(T,[$;,$t,$g,$&|Acc]);
-href_proc_port([H|T],Acc) ->
- href_proc_port(T,[H|Acc]);
-href_proc_port([],Acc) ->
- lists:reverse(Acc).
-
-to_gt(Str,Acc) ->
- {Match,Rest} = to_gt_noreverse(Str,Acc),
- {lists:reverse(Match),Rest}.
-to_gt_noreverse([$>|T],Acc) ->
- {[$;,$t,$g,$&|Acc],T};
-to_gt_noreverse([H|T],Acc) ->
- to_gt_noreverse(T,[H|Acc]);
-to_gt_noreverse([],Acc) ->
- {Acc,[]}.
-
-split(Char,Str) ->
- split(Char,Str,[]).
-split(Char,[Char|Str],Acc) -> % match Char
- {lists:reverse(Acc),Str};
-split(Char,[H|T],Acc) ->
- split(Char,T,[H|Acc]).
-
-
-warn([]) ->
- [];
-warn(Warning) ->
- font("COLOR=\"#FF0000\"",p([Warning,br(),br()])).
-
-heading(Heading,HelpMarker) ->
- [font("SIZE=+2",b(Heading)),?space,?space,help(HelpMarker)].
-
-help(HelpMarker) ->
- [href("TARGET=doc",
- ["/crashdump_doc/crashdump_help.html#",HelpMarker],
- "Help"),
- br(),br()].
-
-%%%-----------------------------------------------------------------
-%%% This function pretty formats a string which contains erlang
-%%% terms (e.g. the message queue).
-%%% In all the following, "<" is changed to "&lt;" and ">" is changed to "&gt;"
-pretty_format(In) ->
- case catch scan(In,[],initial,[]) of
- {'EXIT',_Reason} ->
- %% Probably a truncated file, so the erlang term is not complete
- [font("COLOR=\"#FF0000\"","(This term might be truncated)"),
- href_proc_port(lists:flatten(In))];
- {[R],_,Insrt} ->
- InsrtString = lists:flatten(io_lib:format("~p",[R])),
- lists:flatten(replace_insrt(lists:reverse(InsrtString),Insrt,[]))
- end.
-
-%% Finish term
-scan(In,Acc,list,Insrt) when hd(In)==$] ->
- {lists:reverse(Acc),tl(In),Insrt};
-scan(In,Acc,tuple,Insrt) when hd(In)==$} ->
- {list_to_tuple(lists:reverse(Acc)),tl(In),Insrt};
-scan(In,Acc,atom,Insrt) when In==[];hd(In)==$,;hd(In)==$];hd(In)==$} ->
- {list_to_atom(lists:reverse(Acc)),In,Insrt};
-scan(In,Acc,float,Insrt) when In==[];hd(In)==$,;hd(In)==$];hd(In)==$} ->
- {list_to_float(lists:reverse(Acc)),In,Insrt};
-scan(In,Acc,integer,Insrt) when In==[];hd(In)==$,;hd(In)==$];hd(In)==$} ->
- {list_to_integer(lists:reverse(Acc)),In,Insrt};
-scan([$"|In],Acc,string,Insrt) when In==[];hd(In)==$,;hd(In)==$];hd(In)==$} ->
- {lists:reverse(Acc),In,Insrt};
-scan([$>|In],Acc,special,Insrt) when In==[];hd(In)==$,;hd(In)==$];hd(In)==$} ->
- %% pid, ref, port, fun
- {lists:reverse([$;,$t,$g,$&|Acc]),In,Insrt};
-scan([$}|In],Acc,special,Insrt) when In==[];hd(In)==$,;hd(In)==$];hd(In)==$} ->
- %% bignum integer, e.g. #integer(2) = {2452,4324}
- {lists:reverse([$}|Acc]),In,Insrt};
-scan([$,|In],Acc,Cur,Insrt) when Cur/=string,Cur/=special ->
- scan(In,Acc,Cur,Insrt);
-
-%% In the middle of an atom
-scan([$'|In],Acc,Cur,Insrt) when Cur==atom ->
- %% all $' are removed. They are added again by list_to_atom,
- %% so if we don't remove them we will get two of them.
- scan(In,Acc,Cur,Insrt);
-
-%% A $. in the middle of an integer - turn to float
-scan([C|T],Acc,integer,Insrt) when C==$. ->
- scan(T,[C|Acc],float,Insrt);
-
-%% In the middle of an atom, integer, float or string
-scan([$<|T],Acc,Cur,Insrt) when Cur==atom;Cur==string;Cur==special ->
- scan(T,[$;,$t,$l,$&|Acc],Cur,Insrt);
-scan([$>|T],Acc,Cur,Insrt) when Cur==atom;Cur==string ->
- scan(T,[$;,$t,$g,$&|Acc],Cur,Insrt);
-scan([C|T],Acc,Cur,Insrt) when Cur==atom;Cur==integer;Cur==float;Cur==string;Cur==special ->
- scan(T,[C|Acc],Cur,Insrt);
-
-%% Start list
-scan([$[|T],Acc,Cur,Insrt0) ->
- {L,Rest,Insrt} = scan(T,[],list,Insrt0),
- scan(Rest,[L|Acc],Cur,Insrt);
-
-%% Star tuple
-scan([${|T],Acc,Cur,Insrt0) ->
- {Tuple,Rest,Insrt} = scan(T,[],tuple,Insrt0),
- scan(Rest,[Tuple|Acc],Cur,Insrt);
-
-%% Star string
-scan([$"|T],Acc,Cur,Insrt0) ->
- {String,Rest,Insrt} = scan(T,[],string,Insrt0),
- scan(Rest,[String|Acc],Cur,Insrt);
-
-%% Start atom
-scan([$'|T],Acc,Cur,Insrt0) ->
- %% all $' are removed. They are added again by list_to_atom,
- %% so if we don't remove them we will get two of them.
- {Atom,Rest,Insrt} = scan(T,[],atom,Insrt0),
- scan(Rest,[Atom|Acc],Cur,Insrt);
-scan([C|T],Acc,Cur,Insrt0) when C>=$A,C=<$Z;C>=$a,C=<$z;C==$'->
- {Atom,Rest,Insrt} = scan(T,[C],atom,Insrt0),
- scan(Rest,[Atom|Acc],Cur,Insrt);
-
-%% Start integer or float
-scan([C|T],Acc,Cur,Insrt0) when C>=$0,C=<$9;C==$- ->
- {Num,Rest,Insrt} = scan(T,[C],integer,Insrt0), % can later change to float
- scan(Rest,[Num|Acc],Cur,Insrt);
-
-%% Start Pid/Port/Ref/Fun/Binary
-scan([$<|T],Acc,Cur,Insrt0) ->
- {Special,Rest,Insrt} = scan(T,[$;,$t,$l,$&],special,Insrt0),
- scan(Rest,['$insrt'|Acc],Cur,[Special|Insrt]);
-scan([$#|T],Acc,Cur,Insrt0) ->
- {Special,Rest,Insrt} = scan(T,[$#],special,Insrt0),
- scan(Rest,['$insrt'|Acc],Cur,[Special|Insrt]);
-
-
-%% done
-scan([],Acc,initial,Insrt) ->
- {Acc,[],Insrt}.
-
-
-replace_insrt("'trsni$'"++Rest,[H|T],Acc) -> % the list is reversed here!
- Special =
- case H of
- "&lt;&lt;" ++ _Binary ->
- H;
- "&lt;" ++ _Pid ->
- href("TARGET=\"main\"",["./proc_details?pid=",H],H);
- "#Port&lt;" ++ Port ->
- href("TARGET=\"main\"",["./port?port=","Port&lt;"++Port],H);
- "#" ++ _other ->
- H
- end,
- replace_insrt(Rest,T,[Special|Acc]);
-replace_insrt([H|T],Insrt,Acc) ->
- replace_insrt(T,Insrt,[H|Acc]);
-replace_insrt([],[],Acc) ->
- Acc.
-
-%%%-----------------------------------------------------------------
-%%% Create a page with one table by delivering chunk by chunk to
-%%% inets. crashdump_viewer first calls chunk_page/5 once, then
-%%% chunk/3 multiple times until all data is delivered.
-chunk_page(processes,SessionId,TW,{Sorted,SharedHeap,DumpVsn},FirstChunk) ->
- Columns = procs_summary_table_head(Sorted,SharedHeap,DumpVsn),
- chunk_page(SessionId, "Process Information", TW, FirstChunk,
- "processes", Columns, fun procs_summary_table/1);
-chunk_page(ports,SessionId,TW,_,FirstChunk) ->
- chunk_page(SessionId, "Port Information", TW, FirstChunk,
- "ports", port_table_head(), fun ports_table/1);
-chunk_page(ets_tables,SessionId,TW,Heading,FirstChunk) ->
- Columns = ["Owner",
- "Slot",
- "Id",
- "Name",
- "Type",
- "Buckets",
- "Objects",
- "Memory (bytes)"],
- chunk_page(SessionId, Heading, TW, FirstChunk,
- "ets_tables", Columns, fun ets_tables_table/1);
-chunk_page(timers,SessionId,TW,Heading,FirstChunk) ->
- chunk_page(SessionId, Heading, TW, FirstChunk, "timers",
- ["Owner","Message","Time left"], fun timers_table/1);
-chunk_page(loaded_mods,SessionId,TW,{CC,OC},FirstChunk) ->
- TotalsInfo = p([b("Current code: "),CC," bytes",br(),
- b("Old code: "),OC," bytes"]),
- Columns = ["Module","Current size (bytes)","Old size (bytes)"],
- chunk_page(SessionId, "Loaded Modules Information", TW, FirstChunk,
- "loaded_modules", TotalsInfo,Columns, fun loaded_mods_table/1);
-chunk_page(funs,SessionId, TW, _, FirstChunk) ->
- Columns = ["Module",
- "Uniq",
- "Index",
- "Address",
- "Native_address",
- "Refc"],
- chunk_page(SessionId, "Fun Information", TW, FirstChunk,
- "funs", Columns, fun funs_table/1).
-
-chunk_page(SessionId,Heading,TW,FirstChunk,Type,TableColumns,TableFun) ->
- chunk_page(SessionId,Heading,TW,FirstChunk,Type,[],TableColumns,TableFun).
-chunk_page(SessionId,Heading,TW,done,Type,_TotalsInfo,_TableColumns,_TableFun) ->
- no_info_found(SessionId,Heading,TW,Type);
-chunk_page(SessionId,Heading,TW,FirstChunk,Type,TotalsInfo,TableColumns,TableFun) ->
- deliver_first(SessionId,[start_html_page(Heading),
- heading(Heading,Type),
- warn(TW),
- TotalsInfo,
- start_visible_table(TableColumns)]),
- chunk(SessionId,FirstChunk,TableFun),
- TableFun.
-
-no_info_found(SessionId, Heading, TW, Type) ->
- Info = ["No ", Type, " were found\n"],
- deliver_first(SessionId,[start_html_page(Heading),
- h1(Heading),
- warn(TW),
- Info,
- stop_html_page()]).
-
-chunk(SessionId, done, _TableFun) ->
- deliver(SessionId,[stop_table(),stop_html_page()]);
-chunk(SessionId, Items, TableFun) ->
- deliver(SessionId, [lists:map(TableFun, Items),
- stop_table(), %! Will produce an empty table at the end
- start_visible_table()]). % of the page :(
-
-%%%-----------------------------------------------------------------
-%%% Deliver part of a page to inets
-%%% The first part, which includes the HTTP header, must always be
-%%% delivered as a string (i.e. no binaries). The rest of the page is
-%%% better delivered as binaries in order to avoid data copying.
-deliver_first(SessionId,String) ->
- mod_esi:deliver(SessionId,String).
-deliver(SessionId,IoList) ->
- mod_esi:deliver(SessionId,[list_to_binary(IoList)]).
-
-
-%%%-----------------------------------------------------------------
-%%% Page specific stuff for chunk pages
-procs_summary_table_head(Sorted,SharedHeap,DumpVsn) ->
- MemHeading =
- if DumpVsn>=?r16b01_dump_vsn ->
- "Memory (bytes)";
- true ->
- if SharedHeap ->
- "Stack";
- true ->
- "Stack+heap"
- end
- end,
- [procs_summary_table_head1("pid","Pid",Sorted),
- procs_summary_table_head1("name_func","Name/Spawned as",Sorted),
- procs_summary_table_head1("state","State",Sorted),
- procs_summary_table_head1("reds","Reductions",Sorted),
- procs_summary_table_head1("mem",MemHeading,Sorted),
- procs_summary_table_head1("msg_q_len","MsgQ Length",Sorted)].
-
-procs_summary_table_head1(_,Text,no_sort) ->
- Text;
-procs_summary_table_head1(Sorted,Text,Sorted) ->
- %% Mark the sorted column (bigger and italic)
- font("SIZE=\"+1\"",em(href("./sort_procs?sort="++Sorted,Text)));
-procs_summary_table_head1(SortOn,Text,_Sorted) ->
- href("./sort_procs?sort="++SortOn,Text).
-
-procs_summary_table(Proc) ->
- #proc{pid=Pid,name=Name,state=State,
- reds=Reds,stack_heap=Stack,memory=Memory,msg_q_len=MsgQLen}=Proc,
- Mem =
- case Memory of
- undefined -> % assuming pre-R16B01
- case Stack of
- -1 -> "unknown";
- _ -> integer_to_list(Stack)
- end;
- _ ->
- integer_to_list(Memory)
- end,
- tr(
- [td(href(["./proc_details?pid=",Pid],Pid)),
- td(Name),
- td(State),
- td("ALIGN=right",integer_to_list(Reds)),
- td("ALIGN=right",Mem),
- td("ALIGN=right",integer_to_list(MsgQLen))]).
-
-port_table_head() ->
- ["Id","Slot","Connected","Links","Name","Monitors","Controls"].
-
-ports_table(Port) ->
- #port{id=Id,slot=Slot,connected=Connected,links=Links,name=Name,
- monitors=Monitors,controls=Controls}=Port,
- tr(
- [td(Id),
- td("ALIGN=right",Slot),
- td(href_proc_port(Connected)),
- td(href_proc_port(Links)),
- td(Name),
- td(href_proc_port(Monitors)),
- td(Controls)]).
-
-ets_tables_table(EtsTable) ->
- #ets_table{pid=Pid,slot=Slot,id=Id,name=Name,type=Type,
- buckets=Buckets,size=Size,memory=Memory} = EtsTable,
- tr(
- [td(href_proc_port(Pid)),
- td(Slot),
- td(Id),
- td(Name),
- td(Type),
- td("ALIGN=right",Buckets),
- td("ALIGN=right",Size),
- td("ALIGN=right",Memory)]).
-
-timers_table(Timer) ->
- #timer{pid=Pid,msg=Msg,time=Time}=Timer,
- tr(
- [td(href_proc_port(Pid)),
- td(Msg),
- td("ALIGN=right",Time)]).
-
-loaded_mods_table(#loaded_mod{mod=Mod,current_size=CS,old_size=OS}) ->
- tr([td(href(["loaded_mod_details?mod=",http_uri:encode(Mod)],Mod)),
- td("ALIGN=right",CS),
- td("ALIGN=right",OS)]).
-
-funs_table(Fu) ->
- #fu{module=Module,uniq=Uniq,index=Index,address=Address,
- native_address=NativeAddress,refc=Refc}=Fu,
- tr(
- [td(Module),
- td("ALIGN=right",Uniq),
- td("ALIGN=right",Index),
- td(Address),
- td(NativeAddress),
- td("ALIGN=right",Refc)]).
diff --git a/lib/observer/src/etop_tr.erl b/lib/observer/src/etop_tr.erl
index dd326fe639..e6c69e4e1e 100644
--- a/lib/observer/src/etop_tr.erl
+++ b/lib/observer/src/etop_tr.erl
@@ -59,7 +59,7 @@ reader(Config) ->
Port = getopt(port, Config),
{ok, Sock} = gen_tcp:connect(Host, Port, [{active, false}]),
- spawn_link(fun() -> reader_init(Sock,getopt(store,Config),nopid) end).
+ spawn_link(fun() -> reader_init(Sock,getopt(store,Config),[]) end).
%%%%%%%%%%%%%% Socket reader %%%%%%%%%%%%%%%%%%%%%%%%%%%
@@ -73,24 +73,30 @@ reader(Sock, Store, Last) ->
New = handle_data(Last, Data, Store),
reader(Sock, Store, New).
-handle_data(_, {_, Pid, in, _, Time}, _) ->
- {Pid,Time};
-handle_data({Pid,Time1}, {_, Pid, out, _, Time2}, Store) ->
- Elapsed = elapsed(Time1, Time2),
- case ets:member(Store,Pid) of
- true -> ets:update_counter(Store, Pid, Elapsed);
- false -> ets:insert(Store,{Pid,Elapsed})
- end,
- nopid;
+handle_data(Last, {_, Pid, in, _, Time}, _) ->
+ [{Pid,Time}|Last];
+handle_data([], {_, _, out, _, _}, _Store) ->
+ %% ignore - there was probably just a 'drop'
+ [];
+handle_data(Last, {_, Pid, out, _, Time2} = G, Store) ->
+ case lists:keytake(Pid, 1, Last) of
+ {_, {_, Time1}, New} ->
+ Elapsed = elapsed(Time1, Time2),
+ case ets:member(Store,Pid) of
+ true -> ets:update_counter(Store, Pid, Elapsed);
+ false -> ets:insert(Store,{Pid,Elapsed})
+ end,
+ New;
+ false ->
+ io:format("Erlang top got garbage ~p~n", [G]),
+ Last
+ end;
handle_data(_W, {drop, D}, _) -> %% Error case we are missing data here!
io:format("Erlang top dropped data ~p~n", [D]),
- nopid;
-handle_data(nopid, {_, _, out, _, _}, _Store) ->
- %% ignore - there was probably just a 'drop'
- nopid;
-handle_data(_, G, _) ->
+ [];
+handle_data(Last, G, _) ->
io:format("Erlang top got garbage ~p~n", [G]),
- nopid.
+ Last.
elapsed({Me1, S1, Mi1}, {Me2, S2, Mi2}) ->
Me = (Me2 - Me1) * 1000000,
diff --git a/lib/observer/src/observer.app.src b/lib/observer/src/observer.app.src
index 6d5259624c..97a54cd6f9 100644
--- a/lib/observer/src/observer.app.src
+++ b/lib/observer/src/observer.app.src
@@ -20,12 +20,32 @@
[{description, "OBSERVER version 1"},
{vsn, "%VSN%"},
{modules, [crashdump_viewer,
- crashdump_viewer_html,
+ cdv_atom_cb,
+ cdv_bin_cb,
+ cdv_detail_wx,
+ cdv_dist_cb,
+ cdv_ets_cb,
+ cdv_fun_cb,
+ cdv_gen_cb,
+ cdv_html_wx,
+ cdv_info_wx,
+ cdv_int_tab_cb,
+ cdv_mem_cb,
+ cdv_mod_cb,
+ cdv_multi_wx,
+ cdv_port_cb,
+ cdv_proc_cb,
+ cdv_table_wx,
+ cdv_term_cb,
+ cdv_timer_cb,
+ cdv_virtual_list_wx,
+ cdv_wx,
etop,
etop_tr,
etop_txt,
observer,
observer_app_wx,
+ observer_html_lib,
observer_lib,
observer_perf_wx,
observer_pro_wx,
@@ -40,6 +60,9 @@
ttb_et]},
{registered, []},
{applications, [kernel, stdlib]},
- {env, []}]}.
+ {env, []},
+ {runtime_dependencies, ["wx-1.2","stdlib-2.0","runtime_tools-1.8.14",
+ "kernel-3.0","inets-5.10","et-1.5",
+ "erts-6.0"]}]}.
diff --git a/lib/observer/src/observer.appup.src b/lib/observer/src/observer.appup.src
index 1d5a0d93f5..9fde365ff3 100644
--- a/lib/observer/src/observer.appup.src
+++ b/lib/observer/src/observer.appup.src
@@ -1,7 +1,7 @@
-%%
+%% -*- erlang -*-
%% %CopyrightBegin%
%%
-%% Copyright Ericsson AB 2002-2009. All Rights Reserved.
+%% Copyright Ericsson AB 2002-2014. 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
@@ -15,5 +15,7 @@
%% under the License.
%%
%% %CopyrightEnd%
-%%
-{"%VSN%",[],[]}.
+{"%VSN%",
+ [{<<".*">>,[{restart_application, observer}]}],
+ [{<<".*">>,[{restart_application, observer}]}]
+}.
diff --git a/lib/observer/src/observer.erl b/lib/observer/src/observer.erl
index 098100e8ee..a30ceecc63 100644
--- a/lib/observer/src/observer.erl
+++ b/lib/observer/src/observer.erl
@@ -1,7 +1,7 @@
%%
%% %CopyrightBegin%
%%
-%% Copyright Ericsson AB 2011. All Rights Reserved.
+%% Copyright Ericsson AB 2011-2014. 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
@@ -18,8 +18,11 @@
-module(observer).
--export([start/0]).
+-export([start/0, stop/0]).
start() ->
observer_wx:start().
+
+stop() ->
+ observer_wx:stop().
diff --git a/lib/observer/src/observer_app_wx.erl b/lib/observer/src/observer_app_wx.erl
index 72bafcc5e0..a8ace10275 100644
--- a/lib/observer/src/observer_app_wx.erl
+++ b/lib/observer/src/observer_app_wx.erl
@@ -1,7 +1,7 @@
%%
%% %CopyrightBegin%
%%
-%% Copyright Ericsson AB 2011-2012. All Rights Reserved.
+%% Copyright Ericsson AB 2011-2013. 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
@@ -81,7 +81,7 @@ init([Notebook, Parent]) ->
]),
Main = wxBoxSizer:new(?wxHORIZONTAL),
Splitter = wxSplitterWindow:new(Panel, [{size, wxWindow:getClientSize(Panel)},
- {style, ?wxSP_LIVE_UPDATE},
+ {style, ?SASH_STYLE},
{id, 2}
]),
Apps = wxListBox:new(Splitter, 3, []),
@@ -178,11 +178,16 @@ handle_event(#wx{id=Id, event=_Sz=#wxSize{size=Size}},
{noreply, State};
handle_event(#wx{event=#wxMouse{type=Type, x=X0, y=Y0}},
- S0=#state{app=#app{ptree=Tree}, app_w=AppWin}) ->
- {X,Y} = wxScrolledWindow:calcUnscrolledPosition(AppWin, X0, Y0),
- Hit = locate_node(X,Y, [Tree]),
- State = handle_mouse_click(Hit, Type, S0),
- {noreply, State};
+ S0=#state{app=App, app_w=AppWin}) ->
+ case App of
+ #app{ptree=Tree} ->
+ {X,Y} = wxScrolledWindow:calcUnscrolledPosition(AppWin, X0, Y0),
+ Hit = locate_node(X,Y, [Tree]),
+ State = handle_mouse_click(Hit, Type, S0),
+ {noreply, State};
+ _ ->
+ {noreply, S0}
+ end;
handle_event(#wx{event=#wxCommand{type=command_menu_selected}},
State = #state{sel=undefined}) ->
@@ -190,8 +195,8 @@ handle_event(#wx{event=#wxCommand{type=command_menu_selected}},
{noreply, State};
handle_event(#wx{id=?ID_PROC_INFO, event=#wxCommand{type=command_menu_selected}},
- State = #state{panel=Panel, sel={#box{s1=#str{pid=Pid}},_}}) ->
- observer_procinfo:start(Pid, Panel, self()),
+ State = #state{sel={#box{s1=#str{pid=Pid}},_}}) ->
+ observer ! {open_link, Pid},
{noreply, State};
handle_event(#wx{id=?ID_PROC_MSG, event=#wxCommand{type=command_menu_selected}},
@@ -337,8 +342,8 @@ code_change(_, _, State) ->
handle_mouse_click(Node = {#box{s1=#str{pid=Pid}},_}, Type,
State=#state{app_w=AppWin,panel=Panel}) ->
case Type of
- left_dclick -> observer_procinfo:start(Pid, Panel, self());
- right_down -> popup_menu(Panel);
+ left_dclick -> observer ! {open_link, Pid};
+ right_down -> popup_menu(Panel);
_ -> ok
end,
observer_wx:set_status(io_lib:format("Pid: ~p", [Pid])),
diff --git a/lib/observer/src/observer_defs.hrl b/lib/observer/src/observer_defs.hrl
index 586e7bbff9..3adc358b95 100644
--- a/lib/observer/src/observer_defs.hrl
+++ b/lib/observer/src/observer_defs.hrl
@@ -1,7 +1,7 @@
%%
%% %CopyrightBegin%
%%
-%% Copyright Ericsson AB 2011. All Rights Reserved.
+%% Copyright Ericsson AB 2011-2013. 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
@@ -35,13 +35,16 @@
check = false
}).
--record(attrs, {even, odd, deleted, changed, searched}).
+-record(attrs, {even, odd, searched, deleted, changed_odd, changed_even, new_odd, new_even}).
-define(EVEN(Row), ((Row rem 2) =:= 0)).
-define(BG_EVEN, {230,230,250}).
-define(BG_ODD, {255,255,255}).
-define(BG_DELETED, {100,100,100}).
--define(FG_DELETED, {240,30,30}).
+-define(FG_DELETED, {230,230,230}).
-define(BG_SEARCHED,{235,215,90}).
--define(BG_CHANGED, {230,230,250}).
+-define(BG_CHANGED, {184,207,184}).
+-define(BG_NEW, {123,168,123}).
-define(LCTRL_WDECR, 4). %% Remove some pixels in column width to avoid creating unnecessary scrollbar
+
+-define(SASH_STYLE, ?wxSP_LIVE_UPDATE bor ?wxSP_NOBORDER bor ?wxSP_3DSASH).
diff --git a/lib/observer/src/observer_html_lib.erl b/lib/observer/src/observer_html_lib.erl
new file mode 100644
index 0000000000..c279218707
--- /dev/null
+++ b/lib/observer/src/observer_html_lib.erl
@@ -0,0 +1,407 @@
+%%
+%% %CopyrightBegin%
+%%
+%% Copyright Ericsson AB 2003-2014. 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(observer_html_lib).
+
+%%
+%% This module implements the HTML generation for the crashdump
+%% viewer. No logic or states are kept by this module.
+%%
+
+-export([plain_page/1,
+ expandable_term/3,
+ warning/1]).
+
+-include("crashdump_viewer.hrl").
+-include("observer_defs.hrl").
+
+%%%-----------------------------------------------------------------
+%%% Display the given information as is, no heading
+%%% Empty body if no info exists.
+warning(Info) ->
+ header(body(warning_body(Info))).
+
+warning_body(Info) ->
+ [warn(Info)].
+
+%%%-----------------------------------------------------------------
+%%% Display the given information as is, no heading
+%%% Empty body if no info exists.
+plain_page(Info) ->
+ header(body(plain_body(Info))).
+
+plain_body(Info) ->
+ [pre(href_proc_port(lists:flatten(Info)))].
+
+%%%-----------------------------------------------------------------
+%%% Expanded memory
+expandable_term(Heading,Expanded,Tab) ->
+ header(Heading,body(expandable_term_body(Heading,Expanded,Tab))).
+
+expandable_term_body(Heading,[],_Tab) ->
+ [case Heading of
+ "MsgQueue" -> "No messages were found";
+ "Message Queue" -> "No messages were found";
+ "StackDump" -> "No stack dump was found";
+ "Dictionary" -> "No dictionary was found";
+ "ProcState" -> "Information could not be retrieved,"
+ " system messages may not be handled by this process."
+ end];
+expandable_term_body(Heading,Expanded,Tab) ->
+ Attr = "BORDER=0 CELLPADDING=0 CELLSPACING=1 WIDTH=100%",
+ [case Heading of
+ "MsgQueue" ->
+ table(Attr,
+ [tr(
+ [th("WIDTH=70%","Message"),
+ th("WIDTH=30%","SeqTraceToken")]) |
+ element(1, lists:mapfoldl(fun(Msg, Even) ->
+ {msgq_table(Tab, Msg, Even),
+ not Even}
+ end,
+ true, Expanded))]);
+ "Message Queue" ->
+ table(Attr,
+ [tr(
+ [th("WIDTH=10%","Id"),
+ th("WIDTH=90%","Message")]) |
+ element(1, lists:mapfoldl(fun(Msg, {Even,N}) ->
+ {msgq_table(Tab, Msg, N, Even),
+ {not Even, N+1}}
+ end,
+ {true,1}, Expanded))]);
+ "StackDump" ->
+ table(Attr,
+ [tr(
+ [th("WIDTH=20%","Label"),
+ th("WIDTH=80%","Term")]) |
+ element(1, lists:mapfoldl(fun(Entry, Even) ->
+ {stackdump_table(Tab, Entry, Even),
+ not Even}
+ end, true, Expanded))]);
+ "ProcState" ->
+ table(Attr,
+ [tr(
+ [th("WIDTH=20%","Label"),
+ th("WIDTH=80%","Information")]) |
+ element(1, lists:mapfoldl(fun(Entry, Even) ->
+ {proc_state(Tab, Entry,Even),
+ not Even}
+ end, true, Expanded))]);
+ _ ->
+ table(Attr,
+ [tr(
+ [th("WIDTH=30%","Key"),
+ th("WIDTH=70%","Value")]) |
+ element(1, lists:mapfoldl(fun(Entry, Even) ->
+ {dict_table(Tab, Entry,Even),
+ not Even}
+ end, true, Expanded))])
+ end].
+
+msgq_table(Tab,{Msg0,Token0}, Even) ->
+ Token = case Token0 of
+ [] -> "";
+ _ -> io_lib:fwrite("~w",[Token0])
+ end,
+ Msg = all_or_expand(Tab,Msg0),
+ tr(color(Even),[td(pre(Msg)), td(Token)]).
+
+msgq_table(Tab,Msg0, Id, Even) ->
+ Msg = all_or_expand(Tab,Msg0),
+ tr(color(Even),[td(integer_to_list(Id)), td(pre(Msg))]).
+
+stackdump_table(Tab,{Label0,Term0},Even) ->
+ Label = io_lib:format("~w",[Label0]),
+ Term = all_or_expand(Tab,Term0),
+ tr(color(Even), [td("VALIGN=center",pre(Label)), td(pre(Term))]).
+
+dict_table(Tab,{Key0,Value0}, Even) ->
+ Key = all_or_expand(Tab,Key0),
+ Value = all_or_expand(Tab,Value0),
+ tr(color(Even), [td("VALIGN=center",pre(Key)), td(pre(Value))]).
+
+proc_state(Tab,{Key0,Value0}, Even) ->
+ Key = lists:flatten(io_lib:format("~s",[Key0])),
+ Value = all_or_expand(Tab,Value0),
+ tr(color(Even), [td("VALIGN=center",Key), td(pre(Value))]).
+
+all_or_expand(Tab,Term) ->
+ Preview = io_lib:format("~P",[Term,8]),
+ Check = io_lib:format("~P",[Term,100]),
+ Exp = Preview=/=Check,
+ all_or_expand(Tab,Term,Preview,Exp).
+all_or_expand(_Tab,Term,Str,false)
+ when not is_binary(Term) ->
+ href_proc_port(lists:flatten(Str));
+all_or_expand(Tab,Term,Preview,true)
+ when not is_binary(Term) ->
+ Key = {Key1,Key2,Key3} = now(),
+ ets:insert(Tab,{Key,Term}),
+ [href_proc_port(lists:flatten(Preview), false), $\n,
+ href("TARGET=\"expanded\"",
+ ["#Term?key1="++integer_to_list(Key1)++
+ "&key2="++integer_to_list(Key2)++
+ "&key3="++integer_to_list(Key3)],
+ "Click to expand above term")];
+all_or_expand(Tab,Bin,_PreviewStr,_Expand)
+ when is_binary(Bin) ->
+ Size = byte_size(Bin),
+ PrevSize = min(Size, 10) * 8,
+ <<Preview:PrevSize, _/binary>> = Bin,
+ Hash = erlang:phash2(Bin),
+ Key = {Preview, Size, Hash},
+ ets:insert(Tab,{Key,Bin}),
+ Term = io_lib:format("~p", [['#OBSBin',Preview,Size,Hash]]),
+ href_proc_port(lists:flatten(Term), true).
+
+color(true) -> io_lib:format("BGCOLOR=\"#~2.16.0B~2.16.0B~2.16.0B\"", tuple_to_list(?BG_EVEN));
+color(false) -> io_lib:format("BGCOLOR=\"#~2.16.0B~2.16.0B~2.16.0B\"", tuple_to_list(?BG_ODD)).
+
+%%%-----------------------------------------------------------------
+%%% Internal library
+start_html() ->
+ "<HTML>\n".
+stop_html() ->
+ "</HTML>".
+start_html_body() ->
+ "<BODY BGCOLOR=\"#FFFFFF\">\n".
+stop_html_body() ->
+ "</BODY>\n".
+
+header(Body) ->
+ header("","",Body).
+header(Title,Body) ->
+ header(Title,"",Body).
+header(Title,JavaScript,Body) ->
+ [%only_http_header(),
+ html_header(Title,JavaScript,Body)].
+
+html_header(Title,JavaScript,Body) ->
+ [start_html(),
+ only_html_header(Title,JavaScript),
+ Body,
+ stop_html()].
+
+only_html_header(Title,JavaScript) ->
+ ["<HEAD>\n",
+ "<TITLE>", Title, "</TITLE>\n",
+ JavaScript,
+ "</HEAD>\n"].
+
+body(Text) ->
+ [start_html_body(),
+ Text,
+ stop_html_body()].
+
+start_table(Args) ->
+ ["<TABLE ", Args, ">\n"].
+stop_table() ->
+ "</TABLE>\n".
+
+table(Args,Text) ->
+ [start_table(Args), Text, stop_table()].
+tr(Text) ->
+ ["<TR>\n", Text, "\n</TR>\n"].
+tr(Args,Text) ->
+ ["<TR ", Args, ">\n", Text, "\n</TR>\n"].
+th(Args,Text) ->
+ ["<TH ", Args, ">\n", Text, "\n</TH>\n"].
+td(Text) ->
+ ["<TD>", Text, "</TD>"].
+td(Args,Text) ->
+ ["<TD ", Args, ">", Text, "</TD>"].
+
+start_pre() ->
+ "<PRE>".
+stop_pre() ->
+ "</PRE>".
+pre(Text) ->
+ [start_pre(),Text,stop_pre()].
+href(Link,Text) ->
+ ["<A HREF=\"",Link,"\">",Text,"</A>"].
+href(Args,Link,Text) ->
+ ["<A HREF=\"",Link,"\" ",Args,">",Text,"</A>"].
+font(Args,Text) ->
+ ["<FONT ",Args,">\n",Text,"\n</FONT>\n"].
+p(Text) ->
+ ["<P>",Text,"</P>\n"].
+br() ->
+ "<BR>\n".
+
+
+%% In all the following, "<" is changed to "&lt;" and ">" is changed to "&gt;"
+href_proc_port(Text) ->
+ href_proc_port(Text,true).
+href_proc_port(Text,LinkToBin) ->
+ href_proc_port(Text,[],LinkToBin).
+href_proc_port("#Ref<"++T,Acc,LTB) ->
+ %% No links to refs
+ href_proc_port(T,["#Ref&lt;"|Acc],LTB);
+href_proc_port("#Fun<"++T,Acc,LTB) ->
+ %% No links to funs
+ href_proc_port(T,["#Fun&lt;"|Acc],LTB);
+href_proc_port("#Port<"++T,Acc,LTB) ->
+ {Port0,Rest} = split($>,T),
+ Port = "#Port&lt;"++Port0 ++ "&gt;",
+ href_proc_port(Rest,[href(Port,Port)|Acc],LTB);
+href_proc_port("<<"++T,Acc,LTB) ->
+ %% No links to binaries
+ href_proc_port(T,["&lt;&lt;"|Acc],LTB);
+href_proc_port("<"++([C|_]=T),Acc,LTB) when $0 =< C, C =< $9 ->
+ %% Pid
+ {Pid0,Rest} = split($>,T),
+ Pid = "&lt;" ++ Pid0 ++ "&gt",
+ href_proc_port(Rest,[href(Pid,Pid)|Acc],LTB);
+href_proc_port("['#CDVBin'"++T,Acc,LTB) ->
+ %% Binary written by crashdump_viewer:parse_heap_term(...)
+ href_proc_bin(cdv, T, Acc, LTB);
+href_proc_port("['#OBSBin'"++T,Acc,LTB) ->
+ %% Binary written by crashdump_viewer:parse_heap_term(...)
+ href_proc_bin(obs, T, Acc, LTB);
+href_proc_port("['#CDVPort'"++T,Acc,LTB) ->
+ %% Port written by crashdump_viewer:parse_term(...)
+ {Port0,Rest} = split($],T),
+ PortStr=
+ case string:tokens(Port0,",.|") of
+ [X,Y] ->
+ Port = "#Port&lt;"++X++"."++Y++"&gt;",
+ href(Port,Port);
+ Ns ->
+ "#Port&lt;" ++ string:join(Ns,".") ++"...&gt;"
+ end,
+ href_proc_port(Rest,[PortStr|Acc],LTB);
+href_proc_port("['#CDVPid'"++T,Acc,LTB) ->
+ %% Pid written by crashdump_viewer:parse_term(...)
+ {Pid0,Rest} = split($],T),
+ PidStr =
+ case string:tokens(Pid0,",.|") of
+ [X,Y,Z] ->
+ Pid = "&lt;"++X++"."++Y++"."++Z++"&gt;",
+ href(Pid,Pid);
+ Ns ->
+ "&lt;" ++ string:join(Ns,".") ++ "...&gt;"
+ end,
+ href_proc_port(Rest,[PidStr|Acc],LTB);
+href_proc_port("'#CDVIncompleteHeap'"++T,Acc,LTB)->
+ %% The heap is incomplete! Written by crashdump_viewer:deref_pts(...)
+ IH = lists:reverse(
+ lists:flatten(
+ "<FONT COLOR=\"#FF0000\">...(Incomplete Heap)</FONT>")),
+ href_proc_port(T,IH++Acc,LTB);
+href_proc_port("'#CDVTruncatedBinary'"++T,Acc,LTB)->
+ %% A binary which is truncated! Written by
+ %% crashdump_viewer:parse_heap_term(...)
+ IH = lists:reverse(
+ lists:flatten(
+ "<FONT COLOR=\"#FF0000\">&lt;&lt;...(Truncated Binary)&gt;&gt;"
+ "</FONT>")),
+ href_proc_port(T,IH++Acc,LTB);
+href_proc_port("'#CDVNonexistingBinary'"++T,Acc,LTB)->
+ %% A binary which could not be found in the dump! Written by
+ %% crashdump_viewer:parse_heap_term(...)
+ IH = lists:reverse(
+ lists:flatten(
+ "<FONT COLOR=\"#FF0000\">&lt;&lt;...(Nonexisting Binary)&gt;&gt;"
+ "</FONT>")),
+ href_proc_port(T,IH++Acc,LTB);
+href_proc_port("<"++T,Acc,LTB) ->
+ href_proc_port(T,["&lt;"|Acc],LTB);
+href_proc_port(">"++T,Acc,LTB) ->
+ href_proc_port(T,["&gt;"|Acc],LTB);
+href_proc_port([H|T],Acc,LTB) ->
+ href_proc_port(T,[H|Acc],LTB);
+href_proc_port([],Acc,_) ->
+ lists:reverse(Acc).
+
+href_proc_bin(From, T, Acc, LTB) ->
+ {OffsetSizePos,Rest} = split($],T),
+ BinStr =
+ case string:tokens(OffsetSizePos,",.| \n") of
+ [Offset,SizeStr,Pos] when From =:= cdv ->
+ Id = {list_to_integer(Offset),10,list_to_integer(Pos)},
+ {ok,PreviewBin} = crashdump_viewer:expand_binary(Id),
+ PreviewStr = preview_string(list_to_integer(SizeStr), PreviewBin),
+ if LTB ->
+ href("TARGET=\"expanded\"",
+ ["#Binary?offset="++Offset++
+ "&size="++SizeStr++
+ "&pos="++Pos],
+ PreviewStr);
+ true ->
+ PreviewStr
+ end;
+ [Preview,SizeStr,Md5] when From =:= obs ->
+ Size = list_to_integer(SizeStr),
+ PrevSize = min(Size, 10) * 8,
+ PreviewStr = preview_string(Size,
+ <<(list_to_integer(Preview)):PrevSize>>),
+ if LTB ->
+ href("TARGET=\"expanded\"",
+ ["#OBSBinary?key1="++Preview++
+ "&key2="++SizeStr++
+ "&key3="++Md5],
+ PreviewStr);
+ true ->
+ PreviewStr
+ end;
+ _ ->
+ "&lt;&lt; ... &gt;&gt;"
+ end,
+ href_proc_port(Rest,[BinStr|Acc],LTB).
+
+preview_string(Size, PreviewBin) when Size > 10 ->
+ ["&lt;&lt;",
+ remove_lgt(io_lib:format("~p",[PreviewBin])),
+ "...(",
+ observer_lib:to_str({bytes,Size}),
+ ")",
+ "&gt;&gt"];
+preview_string(_, PreviewBin) ->
+ ["&lt;&lt;",
+ remove_lgt(io_lib:format("~p",[PreviewBin])),
+ "&gt;&gt"].
+
+remove_lgt(Deep) ->
+ remove_lgt_1(lists:flatten(Deep)).
+
+remove_lgt_1([$<,$<|Rest]) ->
+ [$>,$>|BinStr] = lists:reverse(Rest),
+ replace_lgt(lists:reverse(BinStr)).
+
+replace_lgt([$<|R]) ->
+ ["&lt;"|replace_lgt(R)];
+replace_lgt([$>|R]) ->
+ ["&gt;"|replace_lgt(R)];
+replace_lgt([L=[_|_]|R]) ->
+ [replace_lgt(L)|replace_lgt(R)];
+replace_lgt([A|R]) ->
+ [A|replace_lgt(R)];
+replace_lgt([]) -> [].
+
+split(Char,Str) ->
+ split(Char,Str,[]).
+split(Char,[Char|Str],Acc) -> % match Char
+ {lists:reverse(Acc),Str};
+split(Char,[H|T],Acc) ->
+ split(Char,T,[H|Acc]).
+
+warn([]) ->
+ [];
+warn(Warning) ->
+ font("COLOR=\"#FF0000\"",p([Warning,br(),br()])).
diff --git a/lib/observer/src/observer_lib.erl b/lib/observer/src/observer_lib.erl
index f7712cf3da..34c7b127ff 100644
--- a/lib/observer/src/observer_lib.erl
+++ b/lib/observer/src/observer_lib.erl
@@ -1,7 +1,7 @@
%%
%% %CopyrightBegin%
%%
-%% Copyright Ericsson AB 2011-2013. All Rights Reserved.
+%% Copyright Ericsson AB 2011-2014. 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
@@ -19,17 +19,26 @@
-module(observer_lib).
-export([get_wx_parent/1,
- display_info_dialog/1, user_term/3, user_term_multiline/3,
+ display_info_dialog/1, display_yes_no_dialog/1,
+ display_progress_dialog/2, destroy_progress_dialog/0,
+ wait_for_progress/0, report_progress/1,
+ user_term/3, user_term_multiline/3,
interval_dialog/4, start_timer/1, stop_timer/1,
display_info/2, fill_info/2, update_info/2, to_str/1,
create_menus/3, create_menu_item/3,
create_attrs/0,
- set_listctrl_col_size/2
+ set_listctrl_col_size/2,
+ create_status_bar/1,
+ html_window/1, html_window/2
]).
-include_lib("wx/include/wx.hrl").
-include("observer_defs.hrl").
+-define(SINGLE_LINE_STYLE, ?wxBORDER_NONE bor ?wxTE_READONLY bor ?wxTE_RICH2).
+-define(MULTI_LINE_STYLE, ?SINGLE_LINE_STYLE bor ?wxTE_MULTILINE).
+
+
get_wx_parent(Window) ->
Parent = wxWindow:getParent(Window),
case wx:is_null(Parent) of
@@ -96,11 +105,19 @@ setup_timer(Bool, {Timer, Old}) ->
setup_timer(Bool, {false, Old}).
display_info_dialog(Str) ->
- Dlg = wxMessageDialog:new(wx:null(), Str),
+ display_info_dialog("",Str).
+display_info_dialog(Title,Str) ->
+ Dlg = wxMessageDialog:new(wx:null(), Str, [{caption,Title}]),
wxMessageDialog:showModal(Dlg),
wxMessageDialog:destroy(Dlg),
ok.
+display_yes_no_dialog(Str) ->
+ Dlg = wxMessageDialog:new(wx:null(), Str, [{style,?wxYES_NO}]),
+ R = wxMessageDialog:showModal(Dlg),
+ wxMessageDialog:destroy(Dlg),
+ R.
+
%% display_info(Parent, [{Title, [{Label, Info}]}]) -> {Panel, Sizer, InfoFieldsToUpdate}
display_info(Frame, Info) ->
Panel = wxPanel:new(Frame),
@@ -108,24 +125,50 @@ display_info(Frame, Info) ->
Sizer = wxBoxSizer:new(?wxVERTICAL),
wxSizer:addSpacer(Sizer, 5),
Add = fun(BoxInfo) ->
- {Box, InfoFs} = create_box(Panel, BoxInfo),
- wxSizer:add(Sizer, Box, [{flag, ?wxEXPAND bor ?wxALL},
- {border, 5}]),
- wxSizer:addSpacer(Sizer, 5),
- InfoFs
+ case create_box(Panel, BoxInfo) of
+ {Box, InfoFs} ->
+ wxSizer:add(Sizer, Box, [{flag, ?wxEXPAND bor ?wxALL},
+ {border, 5}]),
+ wxSizer:addSpacer(Sizer, 5),
+ InfoFs;
+ undefined ->
+ []
+ end
end,
InfoFs = [Add(I) || I <- Info],
wxWindow:setSizerAndFit(Panel, Sizer),
{Panel, Sizer, InfoFs}.
+fill_info([{dynamic, Key}|Rest], Data)
+ when is_atom(Key); is_function(Key) ->
+ %% Special case used by crashdump_viewer when the value decides
+ %% which header to use
+ case get_value(Key, Data) of
+ undefined -> [undefined | fill_info(Rest, Data)];
+ {Str,Value} -> [{Str, Value} | fill_info(Rest, Data)]
+ end;
fill_info([{Str, Key}|Rest], Data) when is_atom(Key); is_function(Key) ->
- [{Str, get_value(Key, Data)} | fill_info(Rest, Data)];
+ case get_value(Key, Data) of
+ undefined -> [undefined | fill_info(Rest, Data)];
+ Value -> [{Str, Value} | fill_info(Rest, Data)]
+ end;
+fill_info([{Str,Attrib,Key}|Rest], Data) when is_atom(Key); is_function(Key) ->
+ case get_value(Key, Data) of
+ undefined -> [undefined | fill_info(Rest, Data)];
+ Value -> [{Str,Attrib,Value} | fill_info(Rest, Data)]
+ end;
fill_info([{Str, {Format, Key}}|Rest], Data)
when is_atom(Key); is_function(Key), is_atom(Format) ->
case get_value(Key, Data) of
- undefined -> [{Str, undefined} | fill_info(Rest, Data)];
+ undefined -> [undefined | fill_info(Rest, Data)];
Value -> [{Str, {Format, Value}} | fill_info(Rest, Data)]
end;
+fill_info([{Str, Attrib, {Format, Key}}|Rest], Data)
+ when is_atom(Key); is_function(Key), is_atom(Format) ->
+ case get_value(Key, Data) of
+ undefined -> [undefined | fill_info(Rest, Data)];
+ Value -> [{Str, Attrib, {Format, Value}} | fill_info(Rest, Data)]
+ end;
fill_info([{Str,SubStructure}|Rest], Data) when is_list(SubStructure) ->
[{Str, fill_info(SubStructure, Data)}|fill_info(Rest,Data)];
fill_info([{Str,Attrib,SubStructure}|Rest], Data) ->
@@ -146,23 +189,49 @@ update_info([Fields|Fs], [{_Header, _Attrib, SubStructure}| Rest]) ->
update_info([], []) ->
ok.
+update_info2([undefined|Fs], [_|Rest]) ->
+ update_info2(Fs, Rest);
+update_info2([Scroll = {_, _, _}|Fs], [{_, NewInfo}|Rest]) ->
+ update_scroll_boxes(Scroll, NewInfo),
+ update_info2(Fs, Rest);
+update_info2([Field|Fs], [{_Str, {click, Value}}|Rest]) ->
+ wxTextCtrl:setValue(Field, to_str(Value)),
+ update_info2(Fs, Rest);
update_info2([Field|Fs], [{_Str, Value}|Rest]) ->
- wxStaticText:setLabel(Field, to_str(Value)),
+ wxTextCtrl:setValue(Field, to_str(Value)),
+ update_info2(Fs, Rest);
+update_info2([Field|Fs], [undefined|Rest]) ->
+ wxTextCtrl:setValue(Field, ""),
update_info2(Fs, Rest);
update_info2([], []) -> ok.
+update_scroll_boxes({_, _, 0}, {_, []}) -> ok;
+update_scroll_boxes({Win, Sizer, _}, {Type, List}) ->
+ [wxSizerItem:deleteWindows(Child) || Child <- wxSizer:getChildren(Sizer)],
+ BC = wxWindow:getBackgroundColour(Win),
+ Cursor = wxCursor:new(?wxCURSOR_HAND),
+ add_entries(Type, List, Win, Sizer, BC, Cursor),
+ wxCursor:destroy(Cursor),
+ wxSizer:recalcSizes(Sizer),
+ wxWindow:refresh(Win),
+ ok.
to_str(Value) when is_atom(Value) ->
atom_to_list(Value);
+to_str({Unit, X}) when (Unit==bytes orelse Unit==time_ms) andalso is_list(X) ->
+ try list_to_integer(X) of
+ B -> to_str({Unit,B})
+ catch error:badarg -> X
+ end;
to_str({bytes, B}) ->
KB = B div 1024,
MB = KB div 1024,
GB = MB div 1024,
if
- GB > 10 -> integer_to_list(GB) ++ " gB";
- MB > 10 -> integer_to_list(MB) ++ " mB";
+ GB > 10 -> integer_to_list(GB) ++ " GB";
+ MB > 10 -> integer_to_list(MB) ++ " MB";
KB > 0 -> integer_to_list(KB) ++ " kB";
- true -> integer_to_list(B) ++ " B "
+ true -> integer_to_list(B) ++ " B"
end;
to_str({time_ms, MS}) ->
S = MS div 1000,
@@ -180,6 +249,8 @@ to_str({func, {F,A}}) when is_atom(F), is_integer(A) ->
lists:concat([F, "/", A]);
to_str({func, {F,'_'}}) when is_atom(F) ->
atom_to_list(F);
+to_str({{format,Fun},Value}) when is_function(Fun) ->
+ Fun(Value);
to_str({A, B}) when is_atom(A), is_atom(B) ->
lists:concat([A, ":", B]);
to_str({M,F,A}) when is_atom(M), is_atom(F), is_integer(A) ->
@@ -207,27 +278,23 @@ create_menus(Menus, MenuBar, Type) ->
create_menu(Tag, Ms, Index, MenuBar, Type)
end,
[{First, _}|_] = Menus,
- OnMac = os:type() =:= {unix, darwin},
Index = if Type =:= default -> 0;
First =:= "File" -> 0;
- OnMac -> 0;
true -> 1
end,
wx:foldl(Add, Index, Menus),
ok.
create_menu("File", MenuItems, Index, MenuBar, Type) ->
- OnMac = os:type() =:= {unix, darwin},
- if OnMac, Type =:= default ->
- Index;
- not OnMac, Type =:= plugin ->
+ if
+ Type =:= plugin ->
MenuId = wxMenuBar:findMenu(MenuBar, "File"),
Menu = wxMenuBar:getMenu(MenuBar, MenuId),
lists:foldl(fun(Record, N) ->
create_menu_item(Record, Menu, N)
end, 0, MenuItems),
Index + 1;
- true ->
+ true ->
Menu = wxMenu:new(),
lists:foldl(fun(Record, N) ->
create_menu_item(Record, Menu, N)
@@ -279,36 +346,188 @@ create_attrs() ->
#attrs{even = wxListItemAttr:new(Text, ?BG_EVEN, Font),
odd = wxListItemAttr:new(Text, ?BG_ODD, Font),
deleted = wxListItemAttr:new(?FG_DELETED, ?BG_DELETED, Font),
- changed = wxListItemAttr:new(Text, ?BG_CHANGED, Font),
+ changed_even = wxListItemAttr:new(Text, mix(?BG_CHANGED,?BG_EVEN), Font),
+ changed_odd = wxListItemAttr:new(Text, mix(?BG_CHANGED,?BG_ODD), Font),
+ new_even = wxListItemAttr:new(Text, mix(?BG_NEW,?BG_EVEN), Font),
+ new_odd = wxListItemAttr:new(Text, mix(?BG_NEW, ?BG_ODD), Font),
searched = wxListItemAttr:new(Text, ?BG_SEARCHED, Font)
}.
+mix(RGB,_) -> RGB.
+
+%% mix({R,G,B},{MR,MG,MB}) ->
+%% {trunc(R*MR/255), trunc(G*MG/255), trunc(B*MB/255)}.
+
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
get_box_info({Title, List}) when is_list(List) -> {Title, ?wxALIGN_LEFT, List};
get_box_info({Title, left, List}) -> {Title, ?wxALIGN_LEFT, List};
get_box_info({Title, right, List}) -> {Title, ?wxALIGN_RIGHT, List}.
+add_box(Panel, OuterBox, Cursor, Title, Proportion, {Format, List}) ->
+ Box = wxStaticBoxSizer:new(?wxVERTICAL, Panel, [{label, Title}]),
+ Scroll = wxScrolledWindow:new(Panel),
+ wxScrolledWindow:enableScrolling(Scroll,true,true),
+ wxScrolledWindow:setScrollbars(Scroll,1,1,0,0),
+ ScrollSizer = wxBoxSizer:new(?wxVERTICAL),
+ wxScrolledWindow:setSizer(Scroll, ScrollSizer),
+ BC = wxWindow:getBackgroundColour(Panel),
+ wxWindow:setBackgroundColour(Scroll,BC),
+ add_entries(Format, List, Scroll, ScrollSizer, BC, Cursor),
+ wxSizer:add(Box,Scroll,[{proportion,1},{flag,?wxEXPAND}]),
+ wxSizer:add(OuterBox,Box,[{proportion,Proportion},{flag,?wxEXPAND}]),
+ {Scroll,ScrollSizer,length(List)}.
+
+add_entries(click, List, Scroll, ScrollSizer, BC, Cursor) ->
+ Add = fun(Link) ->
+ TC = link_entry(Scroll, Link, Cursor),
+ wxWindow:setBackgroundColour(TC,BC),
+ wxSizer:add(ScrollSizer,TC,[{flag,?wxEXPAND}])
+ end,
+ [Add(Link) || Link <- List];
+add_entries(plain, List, Scroll, ScrollSizer, _, _) ->
+ Add = fun(String) ->
+ TC = wxTextCtrl:new(Scroll, ?wxID_ANY,
+ [{style,?SINGLE_LINE_STYLE},
+ {value,String}]),
+ wxSizer:add(ScrollSizer,TC,[{flag,?wxEXPAND}])
+ end,
+ [Add(String) || String <- List].
+
+
+create_box(_Panel, {scroll_boxes,[]}) ->
+ undefined;
+create_box(Panel, {scroll_boxes,Data}) ->
+ OuterBox = wxBoxSizer:new(?wxHORIZONTAL),
+ Cursor = wxCursor:new(?wxCURSOR_HAND),
+ AddBox = fun({Title,Proportion,Format = {_,_}}) ->
+ add_box(Panel, OuterBox, Cursor, Title, Proportion, Format);
+ ({Title, Format = {_,_}}) ->
+ add_box(Panel, OuterBox, Cursor, Title, 1, Format);
+ (undefined) ->
+ undefined
+ end,
+ Boxes = [AddBox(Entry) || Entry <- Data],
+ wxCursor:destroy(Cursor),
+
+ MaxL = lists:foldl(fun({_,_,L},Max) when L>Max -> L;
+ (_,Max) -> Max
+ end,
+ 0,
+ Boxes),
+
+ Dummy = wxTextCtrl:new(Panel, ?wxID_ANY, [{style, ?SINGLE_LINE_STYLE}]),
+ {_,H} = wxWindow:getSize(Dummy),
+ wxTextCtrl:destroy(Dummy),
+
+ MaxH = if MaxL > 8 -> 8*H;
+ true -> MaxL*H
+ end,
+ [wxWindow:setMinSize(B,{0,MaxH}) || {B,_,_} <- Boxes],
+ wxSizer:layout(OuterBox),
+ {OuterBox, Boxes};
+
create_box(Panel, Data) ->
{Title, Align, Info} = get_box_info(Data),
- Box = wxStaticBoxSizer:new(?wxHORIZONTAL, Panel, [{label, Title}]),
- Left = wxBoxSizer:new(?wxVERTICAL),
- Right = wxBoxSizer:new(?wxVERTICAL),
- Expand = [{flag, ?wxEXPAND}],
- ExpAlign = [{flag, Align}],
- AddRow = fun({Desc, Value}) ->
- wxSizer:add(Left, wxStaticText:new(Panel, ?wxID_ANY, Desc ++ ":"), Expand),
- Field = wxStaticText:new(Panel, ?wxID_ANY, to_str(Value)),
- wxSizer:add(Right, Field, ExpAlign),
- Field
+ Box = wxStaticBoxSizer:new(?wxVERTICAL, Panel, [{label, Title}]),
+ LeftSize = get_max_size(Panel,Info),
+ LeftProportion = [{proportion,0}],
+ RightProportion = [{proportion,1}, {flag, Align bor ?wxEXPAND}],
+ AddRow = fun({Desc0, Value0}) ->
+ Desc = Desc0++":",
+ Line = wxBoxSizer:new(?wxHORIZONTAL),
+ wxSizer:add(Line,
+ wxTextCtrl:new(Panel, ?wxID_ANY,
+ [{style,?SINGLE_LINE_STYLE},
+ {size,LeftSize},
+ {value,Desc}]),
+ LeftProportion),
+ Field =
+ case Value0 of
+ {click,"unknown"} ->
+ wxTextCtrl:new(Panel, ?wxID_ANY,
+ [{style,?SINGLE_LINE_STYLE},
+ {value,"unknown"}]);
+ {click,Value} ->
+ link_entry(Panel,Value);
+ _ ->
+ Value = to_str(Value0),
+ TCtrl = wxTextCtrl:new(Panel, ?wxID_ANY,
+ [{style,?SINGLE_LINE_STYLE},
+ {value,Value}]),
+ length(Value) > 50 andalso
+ wxWindow:setToolTip(TCtrl,wxToolTip:new(Value)),
+ TCtrl
+ end,
+ wxSizer:add(Line, 10, 0), % space of size 10 horisontally
+ wxSizer:add(Line, Field, RightProportion),
+
+ {_,H,_,_} = wxTextCtrl:getTextExtent(Field,"Wj"),
+ wxTextCtrl:setMinSize(Field,{0,H}),
+
+ wxSizer:add(Box, Line, [{proportion,0},{flag,?wxEXPAND}]),
+ Field;
+ (undefined) ->
+ undefined
end,
InfoFields = [AddRow(Entry) || Entry <- Info],
- wxSizer:add(Box, Left),
- wxSizer:addSpacer(Box, 10),
- wxSizer:add(Box, Right),
- wxSizer:addSpacer(Box, 30),
{Box, InfoFields}.
+link_entry(Panel, Link) ->
+ Cursor = wxCursor:new(?wxCURSOR_HAND),
+ TC = link_entry2(Panel, to_link(Link), Cursor),
+ wxCursor:destroy(Cursor),
+ TC.
+link_entry(Panel, Link, Cursor) ->
+ link_entry2(Panel, to_link(Link), Cursor).
+
+link_entry2(Panel,{Target,Str},Cursor) ->
+ TC = wxTextCtrl:new(Panel, ?wxID_ANY, [{style, ?SINGLE_LINE_STYLE}]),
+ wxTextCtrl:setForegroundColour(TC,?wxBLUE),
+ wxTextCtrl:appendText(TC, Str),
+ wxWindow:setCursor(TC, Cursor),
+ wxTextCtrl:connect(TC, left_down, [{userData,Target}]),
+ wxTextCtrl:connect(TC, enter_window),
+ wxTextCtrl:connect(TC, leave_window),
+ ToolTip = wxToolTip:new("Click to see properties for " ++ Str),
+ wxWindow:setToolTip(TC, ToolTip),
+ TC.
+
+to_link(Tuple = {_Target, _Str}) ->
+ Tuple;
+to_link(Target0) ->
+ Target=to_str(Target0),
+ {Target, Target}.
+
+html_window(Panel) ->
+ Win = wxHtmlWindow:new(Panel, [{style, ?wxHW_SCROLLBAR_AUTO}]),
+ %% wxHtmlWindow:setFonts(Win, "", FixedName),
+ wxHtmlWindow:connect(Win,command_html_link_clicked),
+ Win.
+
+html_window(Panel, Html) ->
+ Win = html_window(Panel),
+ wxHtmlWindow:setPage(Win, Html),
+ Win.
+
+get_max_size(Panel,Info) ->
+ Txt = wxTextCtrl:new(Panel, ?wxID_ANY, []),
+ Size = get_max_size(Txt,Info,0,0),
+ wxTextCtrl:destroy(Txt),
+ Size.
+
+get_max_size(Txt,[{Desc,_}|Info],MaxX,MaxY) ->
+ {X,Y,_,_} = wxTextCtrl:getTextExtent(Txt,Desc++":"),
+ if X>MaxX ->
+ get_max_size(Txt,Info,X,Y);
+ true ->
+ get_max_size(Txt,Info,MaxX,MaxY)
+ end;
+get_max_size(Txt,[undefined|Info],MaxX,MaxY) ->
+ get_max_size(Txt,Info,MaxX,MaxY);
+get_max_size(_,[],X,_Y) ->
+ {X+2,-1}.
+
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
set_listctrl_col_size(LCtrl, Total) ->
wx:batch(fun() -> calc_last(LCtrl, Total) end).
@@ -326,10 +545,7 @@ calc_last(LCtrl, _Total) ->
scroll_size(LCtrl) ->
case os:type() of
{win32, nt} -> 0;
- {unix, darwin} ->
- %% I can't figure out is there is a visible scrollbar
- %% Always make room for it
- wxSystemSettings:getMetric(?wxSYS_VSCROLL_X);
+ {unix, darwin} -> 0; %% Always 0 in wxWidgets-3.0
_ ->
case wxWindow:hasScrollbar(LCtrl, ?wxVERTICAL) of
true -> wxSystemSettings:getMetric(?wxSYS_VSCROLL_X);
@@ -430,3 +646,108 @@ ensure_last_is_dot(String) ->
false ->
String ++ "."
end.
+
+%%%-----------------------------------------------------------------
+%%% Status bar for warnings
+create_status_bar(Panel) ->
+ StatusStyle = ?wxTE_MULTILINE bor ?wxTE_READONLY bor ?wxTE_RICH2,
+ Red = wxTextAttr:new(?wxRED),
+
+ %% wxTextCtrl:setSize/3 does not work, so we must create a dummy
+ %% text ctrl first to get the size of the text, then set it when
+ %% creating the real text ctrl.
+ Dummy = wxTextCtrl:new(Panel, ?wxID_ANY,[{style,StatusStyle}]),
+ {X,Y,_,_} = wxTextCtrl:getTextExtent(Dummy,"WARNING"),
+ wxTextCtrl:destroy(Dummy),
+ StatusBar = wxTextCtrl:new(Panel, ?wxID_ANY,
+ [{style,StatusStyle},
+ {size,{X,Y+2}}]), % Y+2 to avoid scrollbar
+ wxTextCtrl:setDefaultStyle(StatusBar,Red),
+ wxTextAttr:destroy(Red),
+ StatusBar.
+
+%%%-----------------------------------------------------------------
+%%% Progress dialog
+-define(progress_handler,cdv_progress_handler).
+display_progress_dialog(Title,Str) ->
+ Caller = self(),
+ Env = wx:get_env(),
+ spawn_link(fun() ->
+ progress_handler(Caller,Env,Title,Str)
+ end),
+ ok.
+
+wait_for_progress() ->
+ receive
+ continue ->
+ ok;
+ Error ->
+ Error
+ end.
+
+destroy_progress_dialog() ->
+ report_progress(finish).
+
+report_progress(Progress) ->
+ case whereis(?progress_handler) of
+ Pid when is_pid(Pid) ->
+ Pid ! {progress,Progress},
+ ok;
+ _ ->
+ ok
+ end.
+
+progress_handler(Caller,Env,Title,Str) ->
+ register(?progress_handler,self()),
+ wx:set_env(Env),
+ PD = progress_dialog(Env,Title,Str),
+ try progress_loop(Title,PD,Caller)
+ catch closed -> normal end.
+
+progress_loop(Title,PD,Caller) ->
+ receive
+ {progress,{ok,done}} -> % to make wait_for_progress/0 return
+ Caller ! continue,
+ progress_loop(Title,PD,Caller);
+ {progress,{ok,Percent}} when is_integer(Percent) ->
+ update_progress(PD,Percent),
+ progress_loop(Title,PD,Caller);
+ {progress,{ok,Msg}} ->
+ update_progress_text(PD,Msg),
+ progress_loop(Title,PD,Caller);
+ {progress,{error, Reason}} ->
+ finish_progress(PD),
+ FailMsg =
+ if is_list(Reason) -> Reason;
+ true -> file:format_error(Reason)
+ end,
+ display_info_dialog("Crashdump Viewer Error",FailMsg),
+ Caller ! error,
+ unregister(?progress_handler),
+ unlink(Caller);
+ {progress,finish} ->
+ finish_progress(PD),
+ unregister(?progress_handler),
+ unlink(Caller)
+ end.
+
+progress_dialog(_Env,Title,Str) ->
+ PD = wxProgressDialog:new(Title,Str,
+ [{maximum,101},
+ {style,
+ ?wxPD_APP_MODAL bor
+ ?wxPD_SMOOTH bor
+ ?wxPD_AUTO_HIDE}]),
+ wxProgressDialog:setMinSize(PD,{200,-1}),
+ PD.
+
+update_progress(PD,Value) ->
+ try wxProgressDialog:update(PD,Value)
+ catch _:_ -> throw(closed) %% Port or window have died
+ end.
+update_progress_text(PD,Text) ->
+ try wxProgressDialog:update(PD,0,[{newmsg,Text}])
+ catch _:_ -> throw(closed) %% Port or window have died
+ end.
+finish_progress(PD) ->
+ wxProgressDialog:destroy(PD).
diff --git a/lib/observer/src/observer_perf_wx.erl b/lib/observer/src/observer_perf_wx.erl
index 54c98f3ba3..8173349ed7 100644
--- a/lib/observer/src/observer_perf_wx.erl
+++ b/lib/observer/src/observer_perf_wx.erl
@@ -1,7 +1,7 @@
%%
%% %CopyrightBegin%
%%
-%% Copyright Ericsson AB 2012. All Rights Reserved.
+%% Copyright Ericsson AB 2012-2013. 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
@@ -283,7 +283,12 @@ mem_types() ->
lmax([]) -> 0;
lmax(List) ->
- lists:max([lists:max(tuple_to_list(T)) || T <- List]).
+ Max = [lists:max(tuple_to_list(T)) || T <- List,
+ tuple_size(T) > 0],
+ case Max of
+ [] -> 0;
+ _ -> lists:max(Max)
+ end.
calc_delta([{Id, WN, TN}|Ss], [{Id, WP, TP}|Ps]) ->
[100*(WN-WP) div (TN-TP)|calc_delta(Ss, Ps)];
@@ -301,25 +306,23 @@ draw(Offset, Id, DC, Panel, Paint=#paint{pens=Pens, small=Small}, Data, Active)
{X0,Y0,WS,HS} = draw_borders(Id, NoGraphs, DC, Size, Max, Paint),
Last = 60*WS+X0-1,
Start = max(61-Len, 0)*WS+X0 - Offset*WS,
- case Hs of
- [] -> ignore;
- [_] -> ignore;
- _ ->
+ Samples = length(Hs),
+ case Active andalso Samples > 1 andalso NoGraphs > 0 of
+ true ->
Draw = fun(N) ->
Lines = make_lines(Hs, Start, N, {X0,Max*HS,Last}, Y0, WS, HS),
setPen(DC, element(1+ ((N-1) rem tuple_size(Pens)), Pens)),
strokeLines(DC, Lines),
N+1
end,
- [Draw(I) || I <- lists:seq(NoGraphs, 1, -1)]
- end,
- case Active of
+ [Draw(I) || I <- lists:seq(NoGraphs, 1, -1)];
false ->
- NotActive = "Service not available",
+ Info = case Active andalso Samples =< 1 of
+ true -> "Waiting on data";
+ false -> "Information not available"
+ end,
setFont(DC, Small, {0,0,0}),
- drawText(DC, NotActive, X0 + 100, element(2,Size) div 2);
- true ->
- ignore
+ drawText(DC, Info, X0 + 100, element(2,Size) div 2)
end,
ok.
diff --git a/lib/observer/src/observer_pro_wx.erl b/lib/observer/src/observer_pro_wx.erl
index 9aaf648ea2..0be8c18893 100644
--- a/lib/observer/src/observer_pro_wx.erl
+++ b/lib/observer/src/observer_pro_wx.erl
@@ -1,7 +1,7 @@
%%
%% %CopyrightBegin%
%%
-%% Copyright Ericsson AB 2011-2012. All Rights Reserved.
+%% Copyright Ericsson AB 2011-2013. 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
@@ -66,6 +66,7 @@
-record(holder, {parent,
info,
+ etop,
sort=#sort{},
accum=[],
attrs,
@@ -191,20 +192,16 @@ dump_to_file(Parent, FileName, Holder) ->
start_procinfo(undefined, _Frame, Opened) ->
Opened;
start_procinfo(Pid, Frame, Opened) ->
- %% This code doesn't work until we collect which windows have been
- %% closed maybe it should moved to observer_wx.erl
- %% and add a global menu which remembers windows.
- %% case lists:keyfind(Pid, 1, Opened) of
- %% false ->
- case observer_procinfo:start(Pid, Frame, self()) of
- {error, _} -> Opened;
- PI -> [{Pid, PI} | Opened]
+ case lists:keyfind(Pid, 1, Opened) of
+ false ->
+ case observer_procinfo:start(Pid, Frame, self()) of
+ {error, _} -> Opened;
+ PI -> [{Pid, PI} | Opened]
+ end;
+ {_, PI} ->
+ wxFrame:raise(PI),
+ Opened
end.
- %%;
- %% {_, PI} ->
- %% wxFrame:raise(PI),
- %% Opened
- %% end.
call(Holder, What) ->
Ref = erlang:monitor(process, Holder),
@@ -235,9 +232,14 @@ handle_info(refresh_interval, #state{holder=Holder}=State) ->
handle_info({procinfo_menu_closed, Pid},
#state{procinfo_menu_pids=Opened}=State) ->
- NewPids = lists:delete(Pid, Opened),
+ NewPids = lists:keydelete(Pid, 1, Opened),
{noreply, State#state{procinfo_menu_pids=NewPids}};
+handle_info({procinfo_open, Pid},
+ #state{panel=Panel, procinfo_menu_pids=Opened}=State) ->
+ Opened2 = start_procinfo(Pid, Panel, Opened),
+ {noreply, State#state{procinfo_menu_pids=Opened2}};
+
handle_info({active, Node},
#state{holder=Holder, timer=Timer, parent=Parent}=State) ->
create_pro_menu(Parent, Holder),
@@ -378,8 +380,7 @@ handle_event(#wx{event=#wxList{type=command_list_col_click, col=Col}},
handle_event(#wx{event=#wxList{type=command_list_item_activated}},
#state{panel=Panel, procinfo_menu_pids=Opened,
- sel={_, [Pid|_]}}=State)
- when Pid =/= undefined ->
+ sel={_, [Pid|_]}}=State) ->
Opened2 = start_procinfo(Pid, Panel, Opened),
{noreply, State#state{procinfo_menu_pids=Opened2}};
@@ -435,13 +436,14 @@ set_focus([Old|_], [New|_], Grid) ->
init_table_holder(Parent, Attrs) ->
Backend = spawn_link(node(), observer_backend,etop_collect,[self()]),
table_holder(#holder{parent=Parent,
- info=#etop_info{procinfo=[]},
+ etop=#etop_info{},
+ info=array:new(),
node=node(),
backend_pid=Backend,
attrs=Attrs
}).
-table_holder(#holder{info=#etop_info{procinfo=Info}, attrs=Attrs,
+table_holder(#holder{info=Info, attrs=Attrs,
node=Node, backend_pid=Backend}=S0) ->
receive
{get_row, From, Row, Col} ->
@@ -488,7 +490,8 @@ table_holder(#holder{info=#etop_info{procinfo=Info}, attrs=Attrs,
From ! {self(), S0#holder.accum == true},
table_holder(S0);
{dump, Fd} ->
- etop_txt:do_update(Fd, S0#holder.info, #opts{node=Node}),
+ EtopInfo = (S0#holder.etop)#etop_info{procinfo=array:to_list(Info)},
+ etop_txt:do_update(Fd, EtopInfo, #opts{node=Node}),
file:close(Fd),
table_holder(S0);
stop ->
@@ -498,23 +501,23 @@ table_holder(#holder{info=#etop_info{procinfo=Info}, attrs=Attrs,
table_holder(S0)
end.
-change_sort(Col, S0=#holder{parent=Parent, info=EI=#etop_info{procinfo=Data}, sort=Sort0}) ->
+change_sort(Col, S0=#holder{parent=Parent, info=Data, sort=Sort0}) ->
{Sort, ProcInfo}=sort(Col, Sort0, Data),
- Parent ! {holder_updated, length(Data)},
- S0#holder{info=EI#etop_info{procinfo=ProcInfo}, sort=Sort}.
+ Parent ! {holder_updated, array:size(Data)},
+ S0#holder{info=ProcInfo, sort=Sort}.
change_accum(true, S0) ->
S0#holder{accum=true};
-change_accum(false, S0=#holder{info=#etop_info{procinfo=Info}}) ->
+change_accum(false, S0=#holder{info=Info}) ->
self() ! refresh,
- S0#holder{accum=lists:sort(Info)}.
+ S0#holder{accum=lists:sort(array:to_list(Info))}.
handle_update(EI=#etop_info{procinfo=ProcInfo0},
S0=#holder{parent=Parent, sort=Sort=#sort{sort_key=KeyField}}) ->
{ProcInfo1, S1} = accum(ProcInfo0, S0),
{_SO, ProcInfo} = sort(KeyField, Sort#sort{sort_key=undefined}, ProcInfo1),
- Parent ! {holder_updated, length(ProcInfo)},
- S1#holder{info=EI#etop_info{procinfo=ProcInfo}}.
+ Parent ! {holder_updated, array:size(ProcInfo)},
+ S1#holder{info=ProcInfo, etop=EI#etop_info{procinfo=[]}}.
accum(ProcInfo, State=#holder{accum=true}) ->
{ProcInfo, State};
@@ -532,12 +535,18 @@ accum2([PI|PIs], Old, Acc) ->
accum2(PIs, Old, [PI|Acc]);
accum2([], _, Acc) -> Acc.
+sort(Col, Opt, Table)
+ when not is_list(Table) ->
+ sort(Col,Opt,array:to_list(Table));
sort(Col, Opt=#sort{sort_key=Col, sort_incr=Bool}, Table) ->
- {Opt#sort{sort_incr=not Bool}, lists:reverse(Table)};
+ {Opt#sort{sort_incr=not Bool},
+ array:from_list(lists:reverse(Table))};
sort(Col, S=#sort{sort_incr=true}, Table) ->
- {S#sort{sort_key=Col}, lists:keysort(col_to_element(Col), Table)};
+ {S#sort{sort_key=Col},
+ array:from_list(lists:keysort(col_to_element(Col), Table))};
sort(Col, S=#sort{sort_incr=false}, Table) ->
- {S#sort{sort_key=Col}, lists:reverse(lists:keysort(col_to_element(Col), Table))}.
+ {S#sort{sort_key=Col},
+ array:from_list(lists:reverse(lists:keysort(col_to_element(Col), Table)))}.
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
@@ -552,40 +561,50 @@ col_to_element(?COL_FUN) -> #etop_proc_info.cf;
col_to_element(?COL_MSG) -> #etop_proc_info.mq.
get_pids(From, Indices, ProcInfo) ->
- Processes = [(lists:nth(I+1, ProcInfo))#etop_proc_info.pid || I <- Indices],
+ Processes = [(array:get(I, ProcInfo))#etop_proc_info.pid || I <- Indices],
From ! {self(), Processes}.
get_name_or_pid(From, Indices, ProcInfo) ->
Get = fun(#etop_proc_info{name=Name}) when is_atom(Name) -> Name;
(#etop_proc_info{pid=Pid}) -> Pid
end,
- Processes = [Get(lists:nth(I+1, ProcInfo)) || I <- Indices],
+ Processes = [Get(array:get(I, ProcInfo)) || I <- Indices],
From ! {self(), Processes}.
-
get_row(From, Row, pid, Info) ->
Pid = case Row =:= -1 of
true -> {error, undefined};
- false -> {ok, get_procinfo_data(?COL_PID, lists:nth(Row+1, Info))}
+ false -> {ok, get_procinfo_data(?COL_PID, array:get(Row, Info))}
end,
From ! {self(), Pid};
get_row(From, Row, Col, Info) ->
- Data = case Row+1 > length(Info) of
+ Data = case Row > array:size(Info) of
true ->
"";
false ->
- ProcInfo = lists:nth(Row+1, Info),
+ ProcInfo = array:get(Row, Info),
get_procinfo_data(Col, ProcInfo)
end,
From ! {self(), observer_lib:to_str(Data)}.
get_rows_from_pids(From, Pids0, Info) ->
- Res = lists:foldl(fun(Pid, Data = {Ids, Pids}) ->
- case index(Pid, Info, 0) of
- false -> Data;
- Index -> {[Index|Ids], [Pid|Pids]}
- end
- end, {[],[]}, Pids0),
+ Search = fun(Idx, #etop_proc_info{pid=Pid}, Acc0={Pick0, {Idxs, Pids}}) ->
+ case ordsets:is_element(Pid, Pick0) of
+ true ->
+ Acc = {[Idx|Idxs],[Pid|Pids]},
+ Pick = ordsets:del_element(Pid, Pick0),
+ case Pick =:= [] of
+ true -> throw(Acc);
+ false -> {Pick, Acc}
+ end;
+ false -> Acc0
+ end
+ end,
+ Res = try
+ {_, R} = array:foldl(Search, {ordsets:from_list(Pids0), {[],[]}}, Info),
+ R
+ catch R0 -> R0
+ end,
From ! {self(), Res}.
get_attr(From, Row, Attrs) ->
@@ -594,7 +613,3 @@ get_attr(From, Row, Attrs) ->
false -> Attrs#attrs.odd
end,
From ! {self(), Attribute}.
-
-index(Pid, [#etop_proc_info{pid=Pid}|_], Index) -> Index;
-index(Pid, [_|PI], Index) -> index(Pid, PI, Index+1);
-index(_, _, _) -> false.
diff --git a/lib/observer/src/observer_procinfo.erl b/lib/observer/src/observer_procinfo.erl
index 98d0403139..8e8a37fc93 100644
--- a/lib/observer/src/observer_procinfo.erl
+++ b/lib/observer/src/observer_procinfo.erl
@@ -1,7 +1,7 @@
%%
%% %CopyrightBegin%
%%
-%% Copyright Ericsson AB 2011-2013. All Rights Reserved.
+%% Copyright Ericsson AB 2011-2014. 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
@@ -34,8 +34,11 @@
-record(state, {parent,
frame,
+ notebook,
pid,
- pages=[]
+ pages=[],
+ expand_table,
+ expand_wins=[]
}).
-record(worker, {panel, callback}).
@@ -47,6 +50,7 @@ start(Process, ParentFrame, Parent) ->
init([Pid, ParentFrame, Parent]) ->
try
+ Table = ets:new(observer_expand,[set,public]),
Title=case observer_wx:try_rpc(node(Pid), erlang, process_info, [Pid, registered_name]) of
[] -> io_lib:format("~p",[Pid]);
{registered_name, Registered} -> io_lib:format("~p (~p)",[Registered, Pid]);
@@ -60,11 +64,11 @@ init([Pid, ParentFrame, Parent]) ->
Notebook = wxNotebook:new(Frame, ?ID_NOTEBOOK, [{style, ?wxBK_DEFAULT}]),
- ProcessPage = init_panel(Notebook, "Process Information", Pid, fun init_process_page/2),
- MessagePage = init_panel(Notebook, "Messages", Pid, fun init_message_page/2),
- DictPage = init_panel(Notebook, "Dictionary", Pid, fun init_dict_page/2),
- StackPage = init_panel(Notebook, "Stack Trace", Pid, fun init_stack_page/2),
- StatePage = init_panel(Notebook, "State", Pid, fun init_state_page/2),
+ ProcessPage = init_panel(Notebook, "Process Information", [Pid], fun init_process_page/2),
+ MessagePage = init_panel(Notebook, "Messages", [Pid,Table], fun init_message_page/3),
+ DictPage = init_panel(Notebook, "Dictionary", [Pid,Table], fun init_dict_page/3),
+ StackPage = init_panel(Notebook, "Stack Trace", [Pid], fun init_stack_page/2),
+ StatePage = init_panel(Notebook, "State", [Pid,Table], fun init_state_page/3),
wxFrame:connect(Frame, close_window),
wxMenu:connect(Frame, command_menu_selected),
@@ -73,7 +77,9 @@ init([Pid, ParentFrame, Parent]) ->
{Frame, #state{parent=Parent,
pid=Pid,
frame=Frame,
- pages=[ProcessPage,MessagePage,DictPage,StackPage,StatePage]
+ notebook=Notebook,
+ pages=[ProcessPage,MessagePage,DictPage,StackPage,StatePage],
+ expand_table=Table
}}
catch error:{badrpc, _} ->
observer_wx:return_to_localnode(ParentFrame, node(Pid)),
@@ -83,10 +89,10 @@ init([Pid, ParentFrame, Parent]) ->
{stop, normal}
end.
-init_panel(Notebook, Str, Pid, Fun) ->
+init_panel(Notebook, Str, FunArgs, Fun) ->
Panel = wxPanel:new(Notebook),
Sizer = wxBoxSizer:new(?wxHORIZONTAL),
- {Window,Callback} = Fun(Panel, Pid),
+ {Window,Callback} = apply(Fun,[Panel|FunArgs]),
wxSizer:add(Sizer, Window, [{flag, ?wxEXPAND bor ?wxALL}, {proportion, 1}, {border, 5}]),
wxPanel:setSizer(Panel, Sizer),
true = wxNotebook:addPage(Notebook, Panel, Str),
@@ -99,16 +105,64 @@ handle_event(#wx{event=#wxClose{type=close_window}}, State) ->
handle_event(#wx{id=?wxID_CLOSE, event=#wxCommand{type=command_menu_selected}}, State) ->
{stop, normal, State};
-handle_event(#wx{id=?REFRESH}, #state{frame=Frame, pid=Pid, pages=Pages}=State) ->
+handle_event(#wx{id=?REFRESH}, #state{frame=Frame, pid=Pid, pages=Pages, expand_table=T}=State) ->
+ ets:delete_all_objects(T),
try [(W#worker.callback)() || W <- Pages]
catch process_undefined ->
wxFrame:setTitle(Frame, io_lib:format("*DEAD* ~p",[Pid]))
end,
{noreply, State};
+handle_event(#wx{event=#wxMouse{type=left_down}, userData=TargetPid}, State) ->
+ observer ! {open_link, TargetPid},
+ {noreply, State};
+
+handle_event(#wx{obj=Obj, event=#wxMouse{type=enter_window}}, State) ->
+ wxTextCtrl:setForegroundColour(Obj,{0,0,100,255}),
+ {noreply, State};
+
+handle_event(#wx{obj=Obj, event=#wxMouse{type=leave_window}}, State) ->
+ wxTextCtrl:setForegroundColour(Obj,?wxBLUE),
+ {noreply, State};
+
+handle_event(#wx{event=#wxHtmlLink{linkInfo=#wxHtmlLinkInfo{href=Href}}},
+ #state{frame=Frame,expand_table=T,expand_wins=Opened0}=State) ->
+ {Type, Rest} = case Href of
+ "#Term?"++Keys -> {cdv_term_cb, Keys};
+ "#OBSBinary?"++Keys -> {cdv_bin_cb, Keys};
+ _ -> {other, Href}
+ end,
+ case Type of
+ other ->
+ observer ! {open_link, Href},
+ {noreply, State};
+ Callback ->
+ [{"key1",Key1},{"key2",Key2},{"key3",Key3}] = httpd:parse_query(Rest),
+ Id = {obs, {T,{list_to_integer(Key1),
+ list_to_integer(Key2),
+ list_to_integer(Key3)}}},
+ Opened =
+ case lists:keyfind(Id,1,Opened0) of
+ false ->
+ Win = cdv_detail_wx:start_link(Id,Frame,Callback),
+ [{Id,Win}|Opened0];
+ {_,Win} ->
+ wxFrame:raise(Win),
+ Opened0
+ end,
+ {noreply,State#state{expand_wins=Opened}}
+ end;
+
+handle_event(#wx{event=#wxHtmlLink{linkInfo=#wxHtmlLinkInfo{href=Info}}}, State) ->
+ observer ! {open_link, Info},
+ {noreply, State};
+
handle_event(Event, _State) ->
error({unhandled_event, Event}).
+handle_info({get_debug_info, From}, State = #state{notebook=Notebook}) ->
+ From ! {procinfo_debug, Notebook},
+ {noreply, State};
handle_info(_Info, State) ->
%% io:format("~p: ~p, Handle info: ~p~n", [?MODULE, ?LINE, Info]),
{noreply, State}.
@@ -116,10 +170,15 @@ handle_info(_Info, State) ->
handle_call(Call, From, _State) ->
error({unhandled_call, Call, From}).
+handle_cast({detail_win_closed,Id}, #state{expand_wins=Opened0}=State) ->
+ Opened = lists:keydelete(Id,1,Opened0),
+ {noreply,State#state{expand_wins=Opened}};
+
handle_cast(Cast, _State) ->
error({unhandled_cast, Cast}).
-terminate(_Reason, #state{parent=Parent,pid=Pid,frame=Frame}) ->
+terminate(_Reason, #state{parent=Parent,pid=Pid,frame=Frame,expand_table=T}) ->
+ T=/=undefined andalso ets:delete(T),
Parent ! {procinfo_menu_closed, Pid},
case Frame of
undefined -> ok;
@@ -139,58 +198,37 @@ init_process_page(Panel, Pid) ->
observer_lib:update_info(UpFields, Fields)
end}.
-init_text_page(Parent) ->
- Style = ?wxTE_MULTILINE bor ?wxTE_RICH2 bor ?wxTE_READONLY,
- Text = wxTextCtrl:new(Parent, ?wxID_ANY, [{style, Style}]),
- Font = observer_wx:get_attrib({font, fixed}),
- Attr = wxTextAttr:new(?wxBLACK, [{font, Font}]),
- true = wxTextCtrl:setDefaultStyle(Text, Attr),
- wxTextAttr:destroy(Attr),
- Text.
-
-init_message_page(Parent, Pid) ->
- Text = init_text_page(Parent),
- Format = fun(Message, Number) ->
- {io_lib:format("~-4.w ~p~n", [Number, Message]),
- Number+1}
- end,
+
+init_message_page(Parent, Pid, Table) ->
+ Win = observer_lib:html_window(Parent),
Update = fun() ->
case observer_wx:try_rpc(node(Pid), erlang, process_info,
[Pid, messages])
of
- {messages,RawMessages} ->
- {Messages,_} = lists:mapfoldl(Format, 1, RawMessages),
- Last = wxTextCtrl:getLastPosition(Text),
- wxTextCtrl:remove(Text, 0, Last),
- case Messages =:= [] of
- true ->
- wxTextCtrl:writeText(Text, "No messages");
- false ->
- wxTextCtrl:writeText(Text, Messages)
- end;
+ {messages, Messages} ->
+ Html = observer_html_lib:expandable_term("Message Queue", Messages, Table),
+ wxHtmlWindow:setPage(Win, Html);
_ ->
throw(process_undefined)
end
end,
Update(),
- {Text, Update}.
+ {Win, Update}.
-init_dict_page(Parent, Pid) ->
- Text = init_text_page(Parent),
+init_dict_page(Parent, Pid, Table) ->
+ Win = observer_lib:html_window(Parent),
Update = fun() ->
case observer_wx:try_rpc(node(Pid), erlang, process_info, [Pid, dictionary])
of
- {dictionary,RawDict} ->
- Dict = [io_lib:format("~-20.w ~p~n", [K, V]) || {K, V} <- RawDict],
- Last = wxTextCtrl:getLastPosition(Text),
- wxTextCtrl:remove(Text, 0, Last),
- wxTextCtrl:writeText(Text, Dict);
+ {dictionary,Dict} ->
+ Html = observer_html_lib:expandable_term("Dictionary", Dict, Table),
+ wxHtmlWindow:setPage(Win, Html);
_ ->
throw(process_undefined)
end
end,
Update(),
- {Text, Update}.
+ {Win, Update}.
init_stack_page(Parent, Pid) ->
LCtrl = wxListCtrl:new(Parent, [{style, ?wxLC_REPORT bor ?wxLC_HRULES}]),
@@ -236,58 +274,58 @@ init_stack_page(Parent, Pid) ->
Update(),
{LCtrl, Update}.
-
-init_state_page(Parent, Pid) ->
- Text = init_text_page(Parent),
+init_state_page(Parent, Pid, Table) ->
+ Win = observer_lib:html_window(Parent),
Update = fun() ->
- %% First, test if sys:get_status/2 have any chance to return an answer
- case rpc:call(node(Pid), proc_lib, translate_initial_call, [Pid])
- of
- %% Not a gen process
- {proc_lib,init_p,5} -> Misc = [{"Information", "Not available"}];
- %% May be a gen process
- {M, _F, _A} ->
- %% Get the behavio(u)r
- I = rpc:call(node(Pid), M, module_info, [attributes]),
- case lists:keyfind(behaviour, 1, I) of
- false -> case lists:keyfind(behavior, 1, I) of
- false -> B = undefined;
- {behavior, [B]} -> B
- end;
- {behaviour, [B]} -> B
- end,
- %% but not sure that system messages are treated by this process
- %% so using a rpc with a small timeout in order not to lag the display
- case rpc:call(node(Pid), sys, get_status, [Pid, 200])
- of
- {status, _, {module, _}, [_PDict, _SysState, _Parent, _Dbg,
- [Header,{data, First},{data, Second}]]} ->
- Misc = [{"Behaviour", B}] ++ [Header] ++ First ++ Second;
- {status, _, {module, _}, [_PDict, _SysState, _Parent, _Dbg,
- [Header,{data, First}, OtherFormat]]} ->
- Misc = [{"Behaviour", B}] ++ [Header] ++ First ++ [{"State",OtherFormat}];
- {status, _, {module, _}, [_PDict, _SysState, _Parent, _Dbg,
- OtherFormat]} ->
- %% Formatted status ?
- case lists:keyfind(format_status, 1, rpc:call(node(Pid), M, module_info, [exports])) of
- false -> Opt = {"Format", unknown};
- _ -> Opt = {"Format", overriden}
- end,
- Misc = [{"Behaviour", B}] ++ [Opt, {"State",OtherFormat}];
- {badrpc,{'EXIT',{timeout, _}}} ->
- Misc = [{"Information","Timed out"},
- {"Tip","system messages are probably not treated by this process"}]
- end;
- _ -> Misc=[], throw(process_undefined)
- end,
- Dict = [io_lib:format("~-20.s ~tp~n", [K, V]) || {K, V} <- Misc],
- Last = wxTextCtrl:getLastPosition(Text),
- wxTextCtrl:remove(Text, 0, Last),
- wxTextCtrl:writeText(Text, Dict)
+ StateInfo = fetch_state_info(Pid),
+ Html = observer_html_lib:expandable_term("ProcState", StateInfo, Table),
+ wxHtmlWindow:setPage(Win, Html)
end,
Update(),
- {Text, Update}.
+ {Win, Update}.
+
+fetch_state_info(Pid) ->
+ %% First, test if sys:get_status/2 have any chance to return an answer
+ case rpc:call(node(Pid), proc_lib, translate_initial_call, [Pid]) of
+ %% Not a gen process
+ {proc_lib,init_p,5} -> [];
+ %% May be a gen process
+ {M, _F, _A} -> fetch_state_info2(Pid, M);
+ _ -> throw(process_undefined)
+ end.
+fetch_state_info2(Pid, M) ->
+ %% Get the behavio(u)r
+ I = rpc:call(node(Pid), M, module_info, [attributes]),
+ case lists:keyfind(behaviour, 1, I) of
+ false -> case lists:keyfind(behavior, 1, I) of
+ false -> B = undefined;
+ {behavior, [B]} -> B
+ end;
+ {behaviour, [B]} -> B
+ end,
+ %% but not sure that system messages are treated by this process
+ %% so using a rpc with a small timeout in order not to lag the display
+ case rpc:call(node(Pid), sys, get_status, [Pid, 200])
+ of
+ {status, _, {module, _},
+ [_PDict, _SysState, _Parent, _Dbg,
+ [Header,{data, First},{data, Second}]]} ->
+ [{"Behaviour", B}, Header] ++ First ++ Second;
+ {status, _, {module, _},
+ [_PDict, _SysState, _Parent, _Dbg,
+ [Header,{data, First}, OtherFormat]]} ->
+ [{"Behaviour", B}, Header] ++ First ++ [{"State",OtherFormat}];
+ {status, _, {module, _},
+ [_PDict, _SysState, _Parent, _Dbg, OtherFormat]} ->
+ %% Formatted status ?
+ case lists:keyfind(format_status, 1, rpc:call(node(Pid), M, module_info, [exports])) of
+ false -> Opt = {"Format", unknown};
+ _ -> Opt = {"Format", overriden}
+ end,
+ [{"Behaviour", B}, Opt, {"State",OtherFormat}];
+ {badrpc,{'EXIT',{timeout, _}}} -> []
+ end.
create_menus(MenuBar) ->
Menus = [{"File", [#create_menu{id=?wxID_CLOSE, text="Close"}]},
@@ -301,6 +339,7 @@ process_info_fields(Pid) ->
{"Registered Name", registered_name},
{"Status", status},
{"Message Queue Len",message_queue_len},
+ {"Group Leader", {click, group_leader}},
{"Priority", priority},
{"Trap Exit", trap_exit},
{"Reductions", reductions},
@@ -311,11 +350,10 @@ process_info_fields(Pid) ->
{"Suspending", suspending},
{"Sequential Trace Token", sequential_trace_token},
{"Error Handler", error_handler}]},
- {"Connections",
- [{"Group Leader", group_leader},
- {"Links", links},
- {"Monitors", monitors},
- {"Monitored by", monitored_by}]},
+ {scroll_boxes,
+ [{"Links", {click, links}},
+ {"Monitors", {click, filter_monitor_info()}},
+ {"Monitored by", {click, monitored_by}}]},
{"Memory and Garbage Collection", right,
[{"Memory", {bytes, memory}},
{"Stack and Heaps", {bytes, total_heap_size}},
@@ -365,3 +403,9 @@ get_gc_info(Arg) ->
GC = proplists:get_value(garbage_collection, Data),
proplists:get_value(Arg, GC)
end.
+
+filter_monitor_info() ->
+ fun(Data) ->
+ Ms = proplists:get_value(monitors, Data),
+ [Pid || {process, Pid} <- Ms]
+ end.
diff --git a/lib/observer/src/observer_sys_wx.erl b/lib/observer/src/observer_sys_wx.erl
index 31800cf12a..f989f9cf97 100644
--- a/lib/observer/src/observer_sys_wx.erl
+++ b/lib/observer/src/observer_sys_wx.erl
@@ -60,10 +60,10 @@ init([Notebook, Parent]) ->
wxSizer:add(TopSizer, FPanel0, [{flag, ?wxEXPAND}, {proportion, 1}]),
wxSizer:add(TopSizer, FPanel1, [{flag, ?wxEXPAND}, {proportion, 1}]),
BorderFlags = ?wxLEFT bor ?wxRIGHT,
- MemoryInfo = create_mem_info(Panel, AllocInfo),
+ {MemPanel, MemoryInfo} = create_mem_info(Panel, AllocInfo),
wxSizer:add(Sizer, TopSizer, [{flag, ?wxEXPAND bor BorderFlags bor ?wxTOP},
{proportion, 0}, {border, 5}]),
- wxSizer:add(Sizer, MemoryInfo, [{flag, ?wxEXPAND bor BorderFlags bor ?wxBOTTOM},
+ wxSizer:add(Sizer, MemPanel, [{flag, ?wxEXPAND bor BorderFlags bor ?wxBOTTOM},
{proportion, 1}, {border, 5}]),
wxPanel:setSizer(Panel, Sizer),
Timer = observer_lib:start_timer(10),
@@ -86,7 +86,9 @@ update_syspage(#sys_wx_state{node = Node, fields=Fields, sizer=Sizer, alloc=Allo
update_alloc(AllocCtrl, AllocInfo),
wxSizer:layout(Sizer).
-create_mem_info(Panel, Fields) ->
+create_mem_info(Parent, Fields) ->
+ Panel = wxPanel:new(Parent),
+ wxWindow:setBackgroundColour(Panel, {255,255,255}),
Style = ?wxLC_REPORT bor ?wxLC_SINGLE_SEL bor ?wxLC_HRULES bor ?wxLC_VRULES,
Grid = wxListCtrl:new(Panel, [{style, Style}]),
Li = wxListItem:new(),
@@ -103,7 +105,12 @@ create_mem_info(Panel, Fields) ->
lists:foldl(AddListEntry, 0, ListItems),
wxListItem:destroy(Li),
update_alloc(Grid, Fields),
- Grid.
+
+ Sizer = wxBoxSizer:new(?wxVERTICAL),
+ wxSizer:add(Sizer, Grid, [{flag, ?wxEXPAND bor ?wxLEFT bor ?wxRIGHT},
+ {border, 5}, {proportion, 1}]),
+ wxWindow:setSizerAndFit(Panel, Sizer),
+ {Panel, Grid}.
update_alloc(Grid, AllocInfo) ->
Fields = alloc_info(AllocInfo, [], 0, 0, true),
@@ -167,9 +174,12 @@ info_fields() ->
{"Async thread pool size", thread_pool_size}
]},
{"CPU's and Threads",
- [{"System Logical CPU's", logical_processors},
- {"Erlang Logical CPU's", logical_processors_online},
- {"Used Logical CPU's", logical_processors_available}
+ [{"Logical CPU's", logical_processors},
+ {"Online Logical CPU's", logical_processors_online},
+ {"Available Logical CPU's", logical_processors_available},
+ {"Schedulers", schedulers},
+ {"Online schedulers", schedulers_online},
+ {"Available schedulers", schedulers_available}
]}
],
Stat = [{"Memory Usage", right,
diff --git a/lib/observer/src/observer_trace_wx.erl b/lib/observer/src/observer_trace_wx.erl
index f2a1084f85..2878842c23 100644
--- a/lib/observer/src/observer_trace_wx.erl
+++ b/lib/observer/src/observer_trace_wx.erl
@@ -84,7 +84,8 @@ create_window(Notebook, ParentPid) ->
%% Create the window
Panel = wxPanel:new(Notebook, [{size, wxWindow:getClientSize(Notebook)}]),
Sizer = wxBoxSizer:new(?wxVERTICAL),
- Splitter = wxSplitterWindow:new(Panel, [{size, wxWindow:getClientSize(Panel)}]),
+ Splitter = wxSplitterWindow:new(Panel, [{size, wxWindow:getClientSize(Panel)},
+ {style, ?SASH_STYLE}]),
{NodeProcView, NodeView, ProcessView} = create_process_view(Splitter),
{MatchSpecView,ModView,FuncView} = create_matchspec_view(Splitter),
wxSplitterWindow:setSashGravity(Splitter, 0.5),
@@ -120,7 +121,7 @@ create_process_view(Parent) ->
Panel = wxPanel:new(Parent),
MainSz = wxBoxSizer:new(?wxHORIZONTAL),
Style = ?wxLC_REPORT bor ?wxLC_HRULES,
- Splitter = wxSplitterWindow:new(Panel, []),
+ Splitter = wxSplitterWindow:new(Panel, [{style, ?SASH_STYLE}]),
Nodes = wxListCtrl:new(Splitter, [{winid, ?NODES_WIN}, {style, Style}]),
Procs = wxListCtrl:new(Splitter, [{winid, ?PROC_WIN}, {style, Style}]),
Li = wxListItem:new(),
@@ -157,7 +158,7 @@ create_matchspec_view(Parent) ->
Panel = wxPanel:new(Parent),
MainSz = wxBoxSizer:new(?wxHORIZONTAL),
Style = ?wxLC_REPORT bor ?wxLC_HRULES,
- Splitter = wxSplitterWindow:new(Panel, []),
+ Splitter = wxSplitterWindow:new(Panel, [{style, ?SASH_STYLE}]),
Modules = wxListCtrl:new(Splitter, [{winid, ?MODULES_WIN}, {style, Style}]),
Funcs = wxListCtrl:new(Splitter, [{winid, ?FUNCS_WIN}, {style, Style}]),
Li = wxListItem:new(),
diff --git a/lib/observer/src/observer_tv_table.erl b/lib/observer/src/observer_tv_table.erl
index b4832d9599..7757dfea53 100644
--- a/lib/observer/src/observer_tv_table.erl
+++ b/lib/observer/src/observer_tv_table.erl
@@ -1,7 +1,7 @@
%%
%% %CopyrightBegin%
%%
-%% Copyright Ericsson AB 2011-2013. All Rights Reserved.
+%% Copyright Ericsson AB 2011-2014. 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
@@ -98,7 +98,7 @@ init([Parent, Opts]) ->
ets -> "TV Ets: " ++ Title0;
mnesia -> "TV Mnesia: " ++ Title0
end,
- Frame = wxFrame:new(Parent, ?wxID_ANY, Title, [{size, {800, 300}}]),
+ Frame = wxFrame:new(Parent, ?wxID_ANY, Title, [{size, {800, 600}}]),
IconFile = filename:join(code:priv_dir(observer), "erlang_observer.png"),
Icon = wxIcon:new(IconFile, [{type,?wxBITMAP_TYPE_PNG}]),
wxFrame:setIcon(Frame, Icon),
@@ -261,11 +261,12 @@ handle_event(#wx{id=?ID_EDIT}, State = #state{selected=Index}) ->
handle_event(#wx{id=?ID_DELETE}, State = #state{selected=undefined}) ->
{noreply, State};
handle_event(#wx{id=?ID_DELETE},
- State = #state{pid=Pid, status=StatusBar, selected=Index}) ->
+ State = #state{grid=Grid, pid=Pid, status=StatusBar, selected=Index}) ->
Str = get_row(Pid, Index, all),
Pid ! {delete, Index},
wxStatusBar:setStatusText(StatusBar, io_lib:format("Deleted object: ~s",[Str])),
- {noreply, State};
+ wxListCtrl:setItemState(Grid, Index, 0, ?wxLIST_STATE_FOCUSED),
+ {noreply, State#state{selected=undefined}};
handle_event(#wx{id=?wxID_CLOSE}, State = #state{frame=Frame}) ->
wxFrame:destroy(Frame),
@@ -279,8 +280,8 @@ handle_event(#wx{id=?GOTO_ENTRY, event=#wxCommand{cmdString=Str}},
State = #state{grid=Grid}) ->
try
Row0 = list_to_integer(Str),
- Row1 = min(0, Row0),
- Row = max(wxListCtrl:getItemCount(Grid)-1,Row1),
+ Row1 = max(0, Row0),
+ Row = min(wxListCtrl:getItemCount(Grid)-1,Row1),
wxListCtrl:ensureVisible(Grid, Row),
ok
catch _:_ -> ok
@@ -289,7 +290,9 @@ handle_event(#wx{id=?GOTO_ENTRY, event=#wxCommand{cmdString=Str}},
%% Search functionality
handle_event(#wx{id=?ID_SEARCH},
- State = #state{sizer=Sz, search=Search}) ->
+ State = #state{grid=Grid, sizer=Sz, search=Search, selected=Index}) ->
+ is_integer(Index) andalso
+ wxListCtrl:setItemState(Grid, Index, 0, ?wxLIST_STATE_FOCUSED),
wxSizer:show(Sz, Search#search.win),
wxWindow:setFocus(Search#search.search),
wxSizer:layout(Sz),
@@ -321,7 +324,7 @@ handle_event(#wx{id=?SEARCH_ENTRY, event=#wxCommand{type=command_text_enter,cmdS
Pid ! {mark_search_hit, false},
case search(Pid, Str, Pos, Dir, Case) of
false ->
- wxStatusBar:setStatusText(SB, "Not found"),
+ wxStatusBar:setStatusText(SB, io_lib:format("Not found (regexp): ~s",[Str])),
Pid ! {mark_search_hit, Find#find.start},
wxListCtrl:refreshItem(Grid, Find#find.start),
{noreply, State#state{search=Search#search{find=Find#find{found=false}}}};
@@ -355,7 +358,7 @@ handle_event(#wx{id=?SEARCH_ENTRY, event=#wxCommand{cmdString=Str}},
Pid ! {mark_search_hit, false},
case search(Pid, Str, Cont#find.start, Dir, Case) of
false ->
- wxStatusBar:setStatusText(SB, "Not found"),
+ wxStatusBar:setStatusText(SB, io_lib:format("Not found (regexp): ~s",[Str])),
{noreply, State};
Row ->
wxListCtrl:ensureVisible(Grid, Row),
@@ -402,6 +405,9 @@ handle_info({new_cols, New}, State = #state{grid=Grid, columns=Cols0}) ->
Cols = add_columns(Grid, Cols0, New),
{noreply, State#state{columns=Cols}};
+handle_info({refresh, Min, Min}, State = #state{grid=Grid}) ->
+ wxListCtrl:refreshItem(Grid, Min), %% Avoid assert in wx below if Max is 0
+ {noreply, State};
handle_info({refresh, Min, Max}, State = #state{grid=Grid}) ->
Max > 0 andalso wxListCtrl:refreshItems(Grid, Min, Max),
{noreply, State};
@@ -426,10 +432,14 @@ handle_info(_Event, State) ->
terminate(_Event, #state{pid=Pid, attrs=Attrs}) ->
%% ListItemAttr are not auto deleted
- #attrs{odd=Odd, deleted=D, changed=Ch, searched=S} = Attrs,
- wxListItemAttr:destroy(Odd),
+ #attrs{odd=Odd, even=Even, deleted=D, searched=S,
+ changed_odd=Ch1, changed_even=Ch2,
+ new_odd=New1, new_even=New2
+ } = Attrs,
+ wxListItemAttr:destroy(Odd), wxListItemAttr:destroy(Even),
wxListItemAttr:destroy(D),
- wxListItemAttr:destroy(Ch),
+ wxListItemAttr:destroy(Ch1),wxListItemAttr:destroy(Ch2),
+ wxListItemAttr:destroy(New1),wxListItemAttr:destroy(New2),
wxListItemAttr:destroy(S),
unlink(Pid),
exit(Pid, window_closed),
@@ -473,7 +483,7 @@ search(Table, Str, Row, Dir, Case) ->
end.
-record(holder, {node, parent, pid,
- table=[], n=0, columns,
+ table=array:new(), n=0, columns,
temp=[],
search,
source, tabid,
@@ -507,6 +517,7 @@ table_holder(S0 = #holder{parent=Parent, pid=Pid, table=Table}) ->
S1 = handle_new_data_chunk(Data, S0),
table_holder(S1);
{sort, Col} ->
+ Parent ! {refresh, 0, S0#holder.n-1},
table_holder(sort(Col, S0));
{search, Data} ->
table_holder(search(Data, S0));
@@ -530,11 +541,14 @@ table_holder(S0 = #holder{parent=Parent, pid=Pid, table=Table}) ->
table_holder(S0);
What ->
io:format("Table holder got ~p~n",[What]),
+ Parent ! {refresh, 0, S0#holder.n-1},
table_holder(S0)
end.
handle_new_data_chunk(Data, S0 = #holder{columns=Cols, parent=Parent}) ->
- S1 = #holder{columns=NewCols} = handle_new_data_chunk2(Data, S0),
+ S1 = #holder{n=N,columns=NewCols} = handle_new_data_chunk2(Data, S0),
+ Parent ! {no_rows, N},
+ Parent ! {refresh, 0, N-1},
case NewCols =:= Cols of
true -> S1;
false ->
@@ -543,15 +557,12 @@ handle_new_data_chunk(Data, S0 = #holder{columns=Cols, parent=Parent}) ->
end.
handle_new_data_chunk2('$end_of_table',
- S0 = #holder{parent=Parent, sort=Opt,
- key=Key,
+ S0 = #holder{sort=Opt0, key=Key,
table=Old, temp=New}) ->
- Table = merge(Old, New, Key),
- N = length(Table),
- Parent ! {no_rows, N},
- sort(Opt#opt.sort_key, S0#holder{n=N, pid=undefine,
- sort=Opt#opt{sort_key = undefined},
- table=Table, temp=[]});
+ Merged = merge(array:to_list(Old), New, Key),
+ {Opt,Sorted} = sort(Opt0#opt.sort_key, Opt0#opt{sort_key = undefined}, Merged),
+ SortedA = array:from_list(Sorted),
+ S0#holder{sort=Opt, table=SortedA, n=array:size(SortedA), temp=[], pid=undefined};
handle_new_data_chunk2(Data, S0 = #holder{columns=Cols0, source=ets, temp=Tab0}) ->
{Tab, Cols} = parse_ets_data(Data, Cols0, Tab0),
S0#holder{columns=Cols, temp=Tab};
@@ -566,10 +577,9 @@ parse_ets_data([Recs|Rs], C0, Tab0) ->
parse_ets_data([], Cols, Tab) ->
{Tab, Cols}.
-sort(Col, S=#holder{n=N, parent=Parent, sort=Opt0, table=Table0}) ->
- {Opt, Table} = sort(Col, Opt0, Table0),
- Parent ! {refresh, 0, N-1},
- S#holder{sort=Opt, table=Table}.
+sort(Col, S=#holder{sort=Opt0, table=Table0}) ->
+ {Opt, Table} = sort(Col, Opt0, array:to_list(Table0)),
+ S#holder{sort=Opt, table=array:from_list(Table)}.
sort(Col, Opt = #opt{sort_key=Col, sort_incr=Bool}, Table) ->
{Opt#opt{sort_incr=not Bool}, lists:reverse(Table)};
@@ -597,7 +607,7 @@ keysort(Col, Table) ->
lists:sort(Sort, Table).
search([Str, Row, Dir0, CaseSens],
- S=#holder{parent=Parent, table=Table0}) ->
+ S=#holder{parent=Parent, n=N, table=Table}) ->
Opt = case CaseSens of
true -> [];
false -> [caseless]
@@ -607,32 +617,26 @@ search([Str, Row, Dir0, CaseSens],
false -> -1
end,
Res = case re:compile(Str, Opt) of
- {ok, Re} ->
- Table =
- case Dir0 of
- true ->
- lists:nthtail(Row, Table0);
- false ->
- lists:reverse(lists:sublist(Table0, Row+1))
- end,
- search(Row, Dir, Re, Table);
+ {ok, Re} -> re_search(Row, Dir, N, Re, Table);
{error, _} -> false
end,
Parent ! {self(), Res},
S#holder{search=Res}.
-search(Row, Dir, Re, [ [Term|_] |Table]) ->
+re_search(Row, Dir, N, Re, Table) when Row >= 0, Row < N ->
+ [Term|_] = array:get(Row, Table),
Str = format(Term),
Res = re:run(Str, Re),
case Res of
- nomatch -> search(Row+Dir, Dir, Re, Table);
- {match,_} -> Row
+ nomatch -> re_search(Row+Dir, Dir, N, Re, Table);
+ {match,_} ->
+ Row
end;
-search(_, _, _, []) ->
+re_search(_, _, _, _, _) ->
false.
get_row(From, Row, Col, Table) ->
- case lists:nth(Row+1, Table) of
+ case array:get(Row, Table) of
[Object|_] when Col =:= all ->
From ! {self(), format(Object)};
[Object|_] when Col =:= all_multiline ->
@@ -647,14 +651,15 @@ get_attr(From, Row, #holder{attrs=Attrs, search=Row}) ->
What = Attrs#attrs.searched,
From ! {self(), What};
get_attr(From, Row, #holder{table=Table, attrs=Attrs}) ->
- What = case lists:nth(Row+1, Table) of
+ Odd = (Row rem 2) > 0,
+ What = case array:get(Row, Table) of
[_|deleted] -> Attrs#attrs.deleted;
- [_|changed] -> Attrs#attrs.changed;
- [_|new] -> Attrs#attrs.changed;
- _ when (Row rem 2) > 0 ->
- Attrs#attrs.odd;
- _ ->
- Attrs#attrs.even
+ [_|changed] when Odd -> Attrs#attrs.changed_odd;
+ [_|changed] -> Attrs#attrs.changed_even;
+ [_|new] when Odd -> Attrs#attrs.new_odd;
+ [_|new] -> Attrs#attrs.new_even;
+ _ when Odd -> Attrs#attrs.odd;
+ _ -> Attrs#attrs.even
end,
From ! {self(), What}.
@@ -665,19 +670,29 @@ merge(Old, New, Key) ->
merge2([[Obj|_]|Old], [Obj|New], Key) ->
[[Obj]|merge2(Old, New, Key)];
-merge2([[A|_]|Old], [B|New], Key)
+merge2([[A|Op]|Old], [B|New], Key)
when element(Key, A) == element(Key, B) ->
- [[B|changed]|merge2(Old, New, Key)];
-merge2([[A|_]|Old], New = [B|_], Key)
+ case Op of
+ deleted ->
+ [[B|new]|merge2(Old, New, Key)];
+ _ ->
+ [[B|changed]|merge2(Old, New, Key)]
+ end;
+merge2([[A|Op]|Old], New = [B|_], Key)
when element(Key, A) < element(Key, B) ->
- [[A|deleted]|merge2(Old, New, Key)];
+ case Op of
+ deleted -> merge2(Old, New, Key);
+ _ -> [[A|deleted]|merge2(Old, New, Key)]
+ end;
merge2(Old = [[A|_]|_], [B|New], Key)
when element(Key, A) > element(Key, B) ->
[[B|new]|merge2(Old, New, Key)];
merge2([], New, _Key) ->
[[N|new] || N <- New];
merge2(Old, [], _Key) ->
- [[O|deleted] || [O|_] <- Old].
+ lists:foldl(fun([_O|deleted], Acc) -> Acc;
+ ([O|_], Acc) -> [[O|deleted]|Acc]
+ end, [], Old).
delete_row(Row, S0 = #holder{parent=Parent}) ->
@@ -691,7 +706,7 @@ delete_row(Row, S0 = #holder{parent=Parent}) ->
delete(Row, #holder{tabid=Id, table=Table,
source=Source, node=Node}) ->
- [Object|_] = lists:nth(Row+1, Table),
+ [Object|_] = array:get(Row, Table),
try
case Source of
ets ->
diff --git a/lib/observer/src/observer_tv_wx.erl b/lib/observer/src/observer_tv_wx.erl
index b276965f83..da4cb8e041 100644
--- a/lib/observer/src/observer_tv_wx.erl
+++ b/lib/observer/src/observer_tv_wx.erl
@@ -1,7 +1,7 @@
%%
%% %CopyrightBegin%
%%
-%% Copyright Ericsson AB 2011-2012. All Rights Reserved.
+%% Copyright Ericsson AB 2011-2014. 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
@@ -132,8 +132,8 @@ handle_event(#wx{event=#wxSize{size={W,_}}}, State=#state{grid=Grid}) ->
observer_lib:set_listctrl_col_size(Grid, W),
{noreply, State};
-handle_event(#wx{obj=Grid, event=#wxList{type=command_list_item_activated,
- itemIndex=Index}},
+handle_event(#wx{event=#wxList{type=command_list_item_activated,
+ itemIndex=Index}},
State=#state{grid=Grid, node=Node, opt=#opt{type=Type}, tabs=Tabs}) ->
Table = lists:nth(Index+1, Tabs),
case Table#tab.protection of
diff --git a/lib/observer/src/observer_wx.erl b/lib/observer/src/observer_wx.erl
index 47740581f0..03ca1bf9c1 100644
--- a/lib/observer/src/observer_wx.erl
+++ b/lib/observer/src/observer_wx.erl
@@ -1,7 +1,7 @@
%%
%% %CopyrightBegin%
%%
-%% Copyright Ericsson AB 2011-2012. All Rights Reserved.
+%% Copyright Ericsson AB 2011-2014. 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
@@ -19,7 +19,7 @@
-behaviour(wx_object).
--export([start/0]).
+-export([start/0, stop/0]).
-export([create_menus/2, get_attrib/1, get_tracer/0, set_status/1,
create_txt_dialog/4, try_rpc/4, return_to_localnode/2]).
@@ -36,6 +36,7 @@
-define(ID_PING, 1).
-define(ID_CONNECT, 2).
-define(ID_NOTEBOOK, 3).
+-define(ID_CDV, 4).
-define(FIRST_NODES_MENU_ID, 1000).
-define(LAST_NODES_MENU_ID, 2000).
@@ -68,6 +69,9 @@ start() ->
_Obj -> ok
end.
+stop() ->
+ wx_object:call(observer, stop).
+
create_menus(Object, Menus) when is_list(Menus) ->
wx_object:call(Object, {create_menus, Menus}).
@@ -108,7 +112,8 @@ setup(#state{frame = Frame} = State) ->
observer_lib:create_menus(DefMenus, MenuBar, default),
wxFrame:setMenuBar(Frame, MenuBar),
- StatusBar = wxFrame:createStatusBar(Frame, []),
+ StatusBar = wxStatusBar:new(Frame),
+ wxFrame:setStatusBar(Frame, StatusBar),
wxFrame:setTitle(Frame, atom_to_list(node())),
wxStatusBar:setStatusText(StatusBar, atom_to_list(node())),
@@ -131,6 +136,9 @@ setup(#state{frame = Frame} = State) ->
wxMenu:connect(Frame, command_menu_selected),
wxFrame:show(Frame),
+ %% Freeze and thaw is buggy currently
+ DoFreeze = [?wxMAJOR_VERSION,?wxMINOR_VERSION] < [2,9],
+ DoFreeze andalso wxWindow:freeze(Panel),
%% I postpone the creation of the other tabs so they can query/use
%% the window size
@@ -154,9 +162,12 @@ setup(#state{frame = Frame} = State) ->
TracePanel = observer_trace_wx:start_link(Notebook, self()),
wxNotebook:addPage(Notebook, TracePanel, ?TRACE_STR, []),
-
- %% Force redraw (window needs it)
+ %% Force redraw (windows needs it)
wxWindow:refresh(Panel),
+ DoFreeze andalso wxWindow:thaw(Panel),
+
+ wxFrame:raise(Frame),
+ wxFrame:setFocus(Frame),
SysPid = wx_object:get_pid(SysPanel),
SysPid ! {active, node()},
@@ -206,6 +217,10 @@ handle_event(#wx{event=#wxNotebook{type=command_notebook_page_changing}},
handle_event(#wx{event = #wxClose{}}, State) ->
{stop, normal, State};
+handle_event(#wx{id = ?ID_CDV, event = #wxCommand{type = command_menu_selected}}, State) ->
+ spawn(crashdump_viewer, start, []),
+ {noreply, State};
+
handle_event(#wx{id = ?wxID_EXIT, event = #wxCommand{type = command_menu_selected}}, State) ->
{stop, normal, State};
@@ -320,6 +335,10 @@ handle_call({get_attrib, Attrib}, _From, State) ->
handle_call(get_tracer, _From, State=#state{trace_panel=TraceP}) ->
{reply, TraceP, State};
+handle_call(stop, _, State = #state{frame = Frame}) ->
+ wxFrame:destroy(Frame),
+ {stop, normal, ok, State};
+
handle_call(_Msg, _From, State) ->
{reply, ok, State}.
@@ -340,6 +359,26 @@ handle_info({nodedown, Node},
create_txt_dialog(Frame, Msg, "Node down", ?wxICON_EXCLAMATION),
{noreply, State3};
+handle_info({open_link, Pid0}, State = #state{pro_panel=ProcViewer, frame=Frame}) ->
+ Pid = case Pid0 of
+ [_|_] -> try list_to_pid(Pid0) catch _:_ -> Pid0 end;
+ _ -> Pid0
+ end,
+ %% Forward to process tab
+ case is_pid(Pid) of
+ true -> wx_object:get_pid(ProcViewer) ! {procinfo_open, Pid};
+ false ->
+ Msg = io_lib:format("Information about ~p is not available or implemented",[Pid]),
+ Info = wxMessageDialog:new(Frame, Msg),
+ wxMessageDialog:showModal(Info),
+ wxMessageDialog:destroy(Info)
+ end,
+ {noreply, State};
+
+handle_info({get_debug_info, From}, State = #state{notebook=Notebook, active_tab=Pid}) ->
+ From ! {observer_debug, wx:get_env(), Notebook, Pid},
+ {noreply, State};
+
handle_info({'EXIT', Pid, _Reason}, State) ->
io:format("Child (~s) crashed exiting: ~p ~p~n",
[pid2panel(Pid, State), Pid,_Reason]),
@@ -350,6 +389,7 @@ handle_info(_Info, State) ->
terminate(_Reason, #state{frame = Frame}) ->
wxFrame:destroy(Frame),
+ wx:destroy(),
ok.
code_change(_, _, State) ->
@@ -517,9 +557,11 @@ create_connect_dialog(connect, #state{frame = Frame}) ->
end.
default_menus(NodesMenuItems) ->
+ CDV = #create_menu{id = ?ID_CDV, text = "Examine Crashdump"},
Quit = #create_menu{id = ?wxID_EXIT, text = "Quit"},
About = #create_menu{id = ?wxID_ABOUT, text = "About"},
Help = #create_menu{id = ?wxID_HELP},
+ FileMenu = {"File", [CDV, Quit]},
NodeMenu = case erlang:is_alive() of
true -> {"Nodes", NodesMenuItems ++
[#create_menu{id = ?ID_PING, text = "Connect Node"}]};
@@ -528,15 +570,15 @@ default_menus(NodesMenuItems) ->
end,
case os:type() =:= {unix, darwin} of
false ->
- FileMenu = {"File", [Quit]},
+ FileMenu = {"File", [CDV, Quit]},
HelpMenu = {"Help", [About,Help]},
[FileMenu, NodeMenu, HelpMenu];
true ->
%% On Mac quit and about will be moved to the "default' place
%% automagicly, so just add them to a menu that always exist.
%% But not to the help menu for some reason
- {Tag, Menus} = NodeMenu,
- [{Tag, Menus ++ [Quit,About]}, {"&Help", [Help]}]
+ {Tag, Menus} = FileMenu,
+ [{Tag, Menus ++ [About]}, NodeMenu, {"&Help", [Help]}]
end.
clean_menus(Menus, MenuBar) ->
@@ -550,13 +592,6 @@ remove_menu_items([{MenuStr = "File", Menus}|Rest], MenuBar) ->
Menu = wxMenuBar:getMenu(MenuBar, MenuId),
Items = [wxMenu:findItem(Menu, Tag) || #create_menu{text=Tag} <- Menus],
[wxMenu:delete(Menu, MItem) || MItem <- Items],
- case os:type() =:= {unix, darwin} of
- true ->
- wxMenuBar:remove(MenuBar, MenuId),
- wxMenu:destroy(Menu);
- false ->
- ignore
- end,
remove_menu_items(Rest, MenuBar)
end;
remove_menu_items([{"Nodes", _}|_], _MB) ->
diff --git a/lib/observer/test/crashdump_helper.erl b/lib/observer/test/crashdump_helper.erl
index 520fcdfd0d..0eb4a92c53 100644
--- a/lib/observer/test/crashdump_helper.erl
+++ b/lib/observer/test/crashdump_helper.erl
@@ -1,7 +1,7 @@
%%
%% %CopyrightBegin%
%%
-%% Copyright Ericsson AB 2007-2011. All Rights Reserved.
+%% Copyright Ericsson AB 2007-2013. 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
@@ -23,39 +23,71 @@
-include("test_server.hrl").
n1_proc(N2,Creator) ->
- spawn(fun() -> n1_proc(Creator,N2,x,[]) end).
-n1_proc(Creator,N2,P2,L) when P2==x;length(L)<2->
+ spawn(fun() -> n1_proc(Creator,N2,x,y,[]) end).
+n1_proc(Creator,N2,Pid2,Port2,L) when Pid2==x;length(L)<2->
receive
- {N2,P} ->
- n1_proc(Creator,N2,P,L);
+ {N2,Pid,Port} ->
+ n1_proc(Creator,N2,Pid,Port,L);
P ->
- n1_proc(Creator,N2,P2,[P|L])
+ n1_proc(Creator,N2,Pid2,Port2,[P|L])
end;
-n1_proc(Creator,_N2,P2,_L) ->
+n1_proc(Creator,_N2,Pid2,Port2,_L) ->
register(aaaaaaaa,self()),
process_flag(save_calls,3),
ets:new(cdv_test_ordset_table,[ordered_set]),
- erlang:send_after(1000000,self(),cdv_test_timer_message),
+ erlang:send_after(1000000,self(),cdv_test_timer_message1),
+ erlang:send_after(1000000,aaaaaaaa,cdv_test_timer_message2),
+ erlang:send_after(1000000,noexistproc,cdv_test_timer_message3),
Port = hd(erlang:ports()),
Fun = fun() -> ok end,
Ref = make_ref(),
Pid = self(),
Bin = list_to_binary(lists:seq(1, 255)),
SubBin = element(1, split_binary(element(2, split_binary(Bin, 8)), 17)),
- DictionaryValue = {"list",atom,42,54.654,math:pow(2,1023),{},
- Port,Fun,Ref,Pid,
- Bin,SubBin,83974938738373873,-38748762783736367},
- put(dictionary_key,DictionaryValue),
- spawn(fun() -> register(aaaaaaab,self()),
- receive after infinity -> ok end
- end),
- link(P2),
+
+ register(named_port,Port),
+
+ %% Dictionary
+ put(list,"list"),
+ put(atom,atom),
+ put(integer,42),
+ put(float,54.654),
+ put(big_float,math:pow(2,1023)),
+ put(tuple,{1,2,{}}),
+ put(port,Port),
+ put('fun',Fun),
+ put(ref,Ref),
+ put(pid,Pid),
+ put(bin,Bin),
+ put(sub_bin,SubBin),
+ put(bignum,83974938738373873),
+ put(neg_bignum,-38748762783736367),
+ put(ext_pid,Pid2),
+ put(ext_port,Port2),
+
+ %% Message queue
+ L = lists:seq(0,255),
+ BigMsg = {message,list_to_binary(L),L},
+ Port = hd(erlang:ports()),
+ self() ! {short,message,1,2.5,"hello world",Port,{}},
+ self() ! BigMsg,
+
+ OtherPid = spawn(fun() -> register(aaaaaaab,self()),
+ receive after infinity -> ok end
+ end),
+ link(OtherPid), % own node
+ link(Pid2), % external node
+ erlang:monitor(process,OtherPid),
+ erlang:monitor(process,Pid2),
+
+ code:load_file(?MODULE),
+
Creator ! {self(),done},
receive after infinity -> ok end.
remote_proc(P1,Creator) ->
spawn(fun() ->
- P1 ! {node(),self()},
+ P1 ! {node(),self(),hd(erlang:ports())},
Creator ! {self(),done},
receive after infinity -> ok end
end).
diff --git a/lib/observer/test/crashdump_viewer_SUITE.erl b/lib/observer/test/crashdump_viewer_SUITE.erl
index 28c7853eaf..03ab0c20e1 100644
--- a/lib/observer/test/crashdump_viewer_SUITE.erl
+++ b/lib/observer/test/crashdump_viewer_SUITE.erl
@@ -1,7 +1,7 @@
%%
%% %CopyrightBegin%
%%
-%% Copyright Ericsson AB 2003-2013. All Rights Reserved.
+%% Copyright Ericsson AB 2003-2014. 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
@@ -19,9 +19,11 @@
-module(crashdump_viewer_SUITE).
+-include_lib("observer/src/crashdump_viewer.hrl").
+
%% Test functions
-export([all/0, suite/0,groups/0,init_per_group/2,end_per_group/2,
- translate/1,start/1,fini/1,load_file/1,
+ start_stop/1,load_file/1,not_found_items/1,
non_existing/1,not_a_crashdump/1,old_crashdump/1]).
-export([init_per_suite/1, end_per_suite/1]).
-export([init_per_testcase/2, end_per_testcase/2]).
@@ -30,22 +32,39 @@
-include("test_server_line.hrl").
-include_lib("kernel/include/file.hrl").
--include_lib("stdlib/include/ms_transform.hrl").
-
--define(default_timeout, ?t:minutes(30)).
--define(sl_alloc_vsns,[r9b]).
-define(failed_file,"failed-cases.txt").
+-define(helper_mod,crashdump_helper).
+
+
+init_per_testcase(start_stop, Config) ->
+ catch crashdump_viewer:stop(),
+ try
+ case os:type() of
+ {unix,darwin} ->
+ exit("Can not test on MacOSX");
+ {unix, _} ->
+ io:format("DISPLAY ~s~n", [os:getenv("DISPLAY")]),
+ case ct:get_config(xserver, none) of
+ none -> ignore;
+ Server -> os:putenv("DISPLAY", Server)
+ end;
+ _ -> ignore
+ end,
+ wx:new(),
+ wx:destroy(),
+ Config
+ catch
+ _:undef ->
+ {skipped, "No wx compiled for this platform"};
+ _:Reason ->
+ SkipReason = io_lib:format("Start wx failed: ~p", [Reason]),
+ {skipped, lists:flatten(SkipReason)}
+ end;
init_per_testcase(_Case, Config) ->
- DataDir = ?config(data_dir,Config),
- Fs = filelib:wildcard(filename:join(DataDir,"*translated*")),
- lists:foreach(fun(F) -> file:delete(F) end,Fs),
catch crashdump_viewer:stop(),
- Dog = ?t:timetrap(?default_timeout),
- [{watchdog, Dog}|Config].
+ Config.
end_per_testcase(Case, Config) ->
- Dog=?config(watchdog, Config),
- ?t:timetrap_cancel(Dog),
case ?config(tc_status,Config) of
ok ->
ok;
@@ -60,8 +79,13 @@ end_per_testcase(Case, Config) ->
suite() -> [{ct_hooks,[ts_install_cth]}].
all() ->
- [translate, load_file, non_existing, not_a_crashdump,
- old_crashdump].
+ [start_stop,
+ non_existing,
+ not_a_crashdump,
+ old_crashdump,
+ load_file,
+ not_found_items
+ ].
groups() ->
[].
@@ -73,18 +97,13 @@ end_per_group(_GroupName, Config) ->
Config.
-init_per_suite(doc) ->
- ["Create a lot of crashdumps which can be used in the testcases below"];
+%% Create a lot of crashdumps which can be used in the testcases below
init_per_suite(Config) when is_list(Config) ->
- Dog = ?t:timetrap(?default_timeout),
delete_saved(Config),
- application:start(inets), % will be using the http client later
- httpc:set_options([{ipfamily,inet6fb4}]),
DataDir = ?config(data_dir,Config),
Rels = [R || R <- [r15b,r16b], ?t:is_release_available(R)] ++ [current],
io:format("Creating crash dumps for the following releases: ~p", [Rels]),
AllDumps = create_dumps(DataDir,Rels),
- ?t:timetrap_cancel(Dog),
[{dumps,AllDumps}|Config].
delete_saved(Config) ->
@@ -97,54 +116,100 @@ delete_saved(Config) ->
ok.
-translate(suite) ->
- [];
-translate(doc) ->
- ["Test that crash dumps from OTP R9B can be translated"];
-translate(Config) when is_list(Config) ->
- DataDir = ?config(data_dir,Config),
- OutFile = filename:join(DataDir,"translated"),
-
- R9BFiles = filelib:wildcard(filename:join(DataDir,"r9b_dump.*")),
- AllFiles = R9BFiles,
- lists:foreach(
- fun(File) ->
- io:format("Translating file: ~s~n",[File]),
- ok = crashdump_translate:old2new(File,OutFile),
- check_result(File,OutFile)
- end,
- AllFiles),
- ok.
-
-start(suite) ->
- [];
-start(doc) ->
- ["Test start and stop of the Crashdump Viewer"];
-start(Config) when is_list(Config) ->
- %% Set a much shorter timeout here... We don't have all the time in world.
- AngryDog = ?t:timetrap(?t:seconds(30)),
- Port = start_cdv(),
- true = is_pid(whereis(crashdump_viewer_server)),
- true = is_pid(whereis(web_tool)),
- Html = contents(Port,"start_page"),
- "Welcome to the Web BasedErlang Crash Dump Analyser" = strip(Html),
+start_stop(Config) when is_list(Config) ->
+ Dump = hd(?config(dumps,Config)),
+ timer:sleep(1000),
+
+ ProcsBefore = processes(),
+ NumProcsBefore = length(ProcsBefore),
+ ok = crashdump_viewer:start(Dump),
+ ExpectedRegistered = [crashdump_viewer_server,
+ cdv_wx,
+ cdv_proc_cb,
+ cdv_proc_cb__holder,
+ cdv_port_cb,
+ cdv_port_cb__holder,
+ cdv_ets_cb,
+ cdv_ets_cb__holder,
+ cdv_timer_cb,
+ cdv_timer_cb__holder,
+ cdv_fun_cb,
+ cdv_fun_cb__holder,
+ cdv_atom_cb,
+ cdv_atom_cb__holder,
+ cdv_dist_cb,
+ cdv_dist_cb__holder,
+ cdv_mod_cb,
+ cdv_mod_cb__holder],
+ Regs=[begin
+ P=whereis(N),
+ {P,N,erlang:monitor(process,P)}
+ end || N <- ExpectedRegistered],
+ ct:log("CDV procs: ~n~p~n",[Regs]),
+ [true=is_pid(P) || {P,_,_} <- Regs],
+ timer:sleep(5000), % give some time to live
ok = crashdump_viewer:stop(),
- timer:sleep(10), % give some time to stop
- undefined = whereis(crashdump_viewer_server),
- undefined = whereis(web_tool),
- Url = cdv_url(Port,"start_page"),
- {error,_} = httpc:request(Url),
-% exit(whereis(httpc_manager),kill),
- ?t:timetrap_cancel(AngryDog),
+ recv_downs(Regs),
+ timer:sleep(2000),
+ ProcsAfter = processes(),
+ NumProcsAfter = length(ProcsAfter),
+ if NumProcsAfter=/=NumProcsBefore ->
+ ct:log("Before but not after:~n~p~n",
+ [[{P,process_info(P)} || P <- ProcsBefore -- ProcsAfter]]),
+ ct:log("After but not before:~n~p~n",
+ [[{P,process_info(P)} || P <- ProcsAfter -- ProcsBefore]]),
+ ct:fail("leaking processes");
+ true ->
+ ok
+ end,
ok.
-fini(Config) when is_list(Config) ->
- ok.
+recv_downs([]) ->
+ ok;
+recv_downs(Regs) ->
+ receive
+ {'DOWN',Ref,process,_Pid,_} ->
+ ct:log("Got 'DOWN' for process ~n~p~n",[_Pid]),
+ recv_downs(lists:keydelete(Ref,3,Regs))
+ after 30000 ->
+ ct:log("Timeout waiting for down:~n~p~n",
+ [[{Reg,process_info(P)} || {P,_,_}=Reg <- Regs]]),
+ ct:log("Message queue:~n~p~n",[process_info(self(),messages)])
+ end.
+
+%% Try to load nonexisting file
+non_existing(Config) when is_list(Config) ->
+ ExpectedReason = "non-existing-file is not an Erlang crash dump\n",
+ {error, ExpectedReason} = start_backend("non-existing-file"),
+ ok = crashdump_viewer:stop().
+
+%% Try to load a crashdump of old (earlier than OTP R10B) format
+old_crashdump(Config) when is_list(Config) ->
+ DataDir = ?config(data_dir,Config),
+ OldFile = filename:join(DataDir,"old_format.dump"),
+ ExpectedReason = "The crashdump " ++ OldFile ++
+ " is in the pre-R10B format, which is no longer supported.\n",
+ {error, ExpectedReason} = start_backend(OldFile),
+ ok = crashdump_viewer:stop().
-load_file(suite) ->
- [];
-load_file(doc) ->
- ["Load files into the tool and view all pages"];
+%% Try to load a file which is not an erlang crashdump
+not_a_crashdump(Config) when is_list(Config) ->
+ PrivDir = ?config(priv_dir,Config),
+ F1 = filename:join(PrivDir,"f1"),
+ F2 = filename:join(PrivDir,"f2"),
+
+ file:write_file(F1,"=unexpected_tag:xyz"),
+ file:write_file(F2,""),
+
+ ExpReason1 = F1 ++ " is not an Erlang crash dump\n",
+ ExpReason2 = F2 ++ " is not an Erlang crash dump\n",
+
+ {error,ExpReason1} = start_backend(F1),
+ {error,ExpReason2} = start_backend(F2),
+
+ ok = crashdump_viewer:stop().
+
+%% Load files into the tool and view all pages
load_file(Config) when is_list(Config) ->
case ?t:is_debug() of
true ->
@@ -156,65 +221,33 @@ load_file(Config) when is_list(Config) ->
load_file_1(Config) ->
DataDir = ?config(data_dir,Config),
- Port = start_cdv(),
+ crashdump_viewer:start_link(),
+ %% Read both created and predefined dumps
AllFiles = filelib:wildcard(filename:join(DataDir,"r*_dump.*")),
lists:foreach(
fun(File) ->
- browse_file(Port,File),
- special(Port,File)
+ Content = browse_file(File),
+ special(File,Content)
end,
AllFiles),
ok = crashdump_viewer:stop().
-non_existing(suite) ->
- [];
-non_existing(doc) ->
- ["Try to load nonexisting file"];
-non_existing(Config) when is_list(Config) ->
- Port = start_cdv(),
- Url = "http://localhost:"++Port++"/cdv_erl/crashdump_viewer/read_file",
- Html = request_sync(post,{Url,[],[],"path=nonexistingfile"}),
- "Please wait..." = title(Html),
- "An error occured:nonexistingfile is not an Erlang crash dump" =
- strip(wait(10,Port,"redirect")),
- ok = crashdump_viewer:stop().
+%% Try to lookup nonexisting process, port and node
+not_found_items(Config) ->
+ Dump = hd(?config(dumps,Config)),
-old_crashdump(doc) ->
- ["Try to load nonexisting file"];
-old_crashdump(Config) when is_list(Config) ->
- Port = start_cdv(),
- DataDir = ?config(data_dir, Config),
- OldCrashDump = filename:join(DataDir, "old_format.dump"),
- Url = "http://localhost:"++Port++"/cdv_erl/crashdump_viewer/read_file",
- Html = request_sync(post,{Url,[],[],"path="++OldCrashDump}),
- "Please wait..." = title(Html),
- Str = "An error occured:The crashdump "++OldCrashDump++
- " is in the pre-R10B format, which is no longer supported.",
- Str = strip(wait(10,Port,"redirect")),
- ok = crashdump_viewer:stop().
+ ok = start_backend(Dump),
+ {ok,#general_info{},_} = crashdump_viewer:general_info(),
-not_a_crashdump(suite) ->
- [];
-not_a_crashdump(doc) ->
- ["Try to load a file which is not an erlang crashdump"];
-not_a_crashdump(Config) when is_list(Config) ->
- Port = start_cdv(),
- NoCrashdump = code:which(?MODULE),
- Url = "http://localhost:"++Port++"/cdv_erl/crashdump_viewer/read_file",
- Html = request_sync(post,{Url,[],[],"path="++NoCrashdump}),
- "Please wait..." = title(Html),
- Str = "An error occured:"++NoCrashdump++" is not an Erlang crash dump",
- Str = strip(wait(10,Port,"redirect")),
- ok = crashdump_viewer:stop(),
-% exit(whereis(httpc_manager),kill),
- ok.
-
+ {error,not_found} = crashdump_viewer:proc_details("<1111.1111.1111>"),
+ {error,not_found} = crashdump_viewer:port("#Port<1111.1111>"),
+ {error,not_found} = crashdump_viewer:node_info("1111"),
+ ok = crashdump_viewer:stop().
-end_per_suite(doc) ->
- ["Remove generated crashdumps"];
+%% Remove generated crashdumps
end_per_suite(Config) when is_list(Config) ->
Dumps = ?config(dumps,Config),
DataDir = ?config(data_dir,Config),
@@ -240,387 +273,188 @@ end_per_suite(Config) when is_list(Config) ->
%%%-----------------------------------------------------------------
%%% Internal
-start_cdv() ->
- ?t:capture_start(),
- ok = crashdump_viewer:start(),
- "WebTool is available at http://localhost:" ++ Where =
- lists:flatten(?t:capture_get()),
- ?t:capture_stop(),
- [Port|_] = string:tokens(Where,"/"),
- Port.
-
-
-check_result(File,OutFile) ->
- {ok,#file_info{size=FS}} = file:read_file_info(File),
- {ok,#file_info{size=OFS}} = file:read_file_info(OutFile),
- Rel =
- if OFS > 0 -> FS/OFS;
- true -> 1.25
- end,
- if Rel>0.75, Rel<1.25 -> ok;
- true -> ?t:fail({unreasonable_size,File,FS,OFS})
- end,
- {ok,Fd} = file:open(OutFile,[read]),
- "=erl_crash_dump:0.0\n" = io:get_line(Fd,''),
- case is_truncated(File) of
- true ->
- ok;
- false ->
- {ok,_} = file:position(Fd,{eof,-5}),
- case io:get_line(Fd,'') of
- "=end\n" -> ok;
- Other -> ?t:fail({truncated,File,Other})
- end
- end,
- ok = file:close(Fd).
-
-
-%% Read a page and check that the page title matches Title
-contents(Port,Link) ->
- Url = cdv_url(Port,Link),
- request_sync(get,{Url,[]}).
-
-cdv_url(Port,Link) ->
- "http://localhost:" ++ Port ++ "/cdv_erl/crashdump_viewer/" ++ Link.
-
-request_sync(Method,HTTPReqCont) ->
- case httpc:request(Method,
- HTTPReqCont,
- [{timeout,30000}],
- [{full_result, false}]) of
- {ok,{200,Html}} ->
- Html;
- {ok,{Code,Html}} ->
- io:format("~s\n", [Html]),
- io:format("Received ~w from httpc:request(...) with\nMethod=~w\n"
- "HTTPReqCont=~p\n",
- [Code,Method,HTTPReqCont]),
- ?t:fail();
- Other ->
- io:format(
- "Received ~w from httpc:request(...) with\nMethod=~w\n"
- "HTTPReqCont=~p\n",
- [Other,Method,HTTPReqCont]),
- ?t:fail()
- end.
-
-
+%%%-----------------------------------------------------------------
+%%% Start the crashdump_viewer backend and load a dump
+start_backend(File) ->
+ crashdump_viewer:start_link(),
+ register_progress_handler(),
+ ok = crashdump_viewer:read_file(File),
+ wait_for_progress_done().
+%%%-----------------------------------------------------------------
+%%% Simulate the progress handler in observer_lib
+register_progress_handler() ->
+ register(cdv_progress_handler,self()).
-strip([$<|Html]) ->
- strip(drop_tag(Html));
-strip([$\n|Html]) ->
- strip(Html);
-strip([X|Html]) ->
- [X|strip(Html)];
-strip([]) ->
- [].
-drop_tag([$>|Html]) ->
- Html;
-drop_tag([_|Html]) ->
- drop_tag(Html).
-
-title(Port,Link,Title) ->
- Html = contents(Port,Link),
- Title = title(Html).
-
-wait(0,_Port,Link) ->
- ?t:fail({wait,Link,timeout});
-wait(Time,Port,Link) ->
- Html = contents(Port,Link),
- case title(Html) of
- "Please wait..." ->
- timer:sleep(1000),
- wait(Time-1,Port,Link);
- _Title ->
- Html
+wait_for_progress_done() ->
+ receive
+ {progress,{error,Reason}} ->
+ unregister(cdv_progress_handler),
+ {error,lists:flatten(Reason)};
+ {progress,{ok,done}} ->
+ unregister(cdv_progress_handler),
+ ok;
+ {progress,_} ->
+ wait_for_progress_done()
end.
-title([$<,$T,$I,$T,$L,$E,$>|Html]) ->
- title_end(Html);
-title([_|Html]) ->
- title(Html);
-title([]) ->
- [].
-
-title_end([$<,$/,$T,$I,$T,$L,$E,$>|_]) ->
- [];
-title_end([X|Html]) ->
- [X|title_end(Html)].
-
-
%%%-----------------------------------------------------------------
%%% General check of what is displayed for a dump
-browse_file(Port,File) ->
- io:format("Browsing file: ~s~n",[File]),
-
- %% The page where a filename can be entered
- title(Port,"read_file_frame","Read File"),
-
- %% Load a file
- Url = "http://localhost:"++Port++"/cdv_erl/crashdump_viewer/read_file",
- Html = request_sync(post,{Url,[],[],"path="++File}),
- "Please wait..." = title(Html),
- "Crashdump Viewer Start Page" = title(wait(10,Port,"start_page")),
-
- %% The frame with the initial information for a dump
- title(Port,"initial_info_frame","General Information"),
-
- %% Topmost frame of the page
- FilenameFrame = contents(Port,"filename_frame"),
- Match = "FilenameCrashdump currently viewed:" ++ File,
- true = lists:prefix(Match,strip(FilenameFrame)),
-
- %% Toggle a menu item and check that it explodes/collapses
- title(Port,"menu_frame","Menu"),
- exploded = toggle_menu(Port),
- collapsed = toggle_menu(Port),
-
- %% Open each page in menu and check that correct title is shown
- title(Port,"general_info","General Information"),
- title(Port,"processes","Process Information"),
- title(Port,"sort_procs?sort=state","Process Information"),
- title(Port,"sort_procs?sort=state","Process Information"),
- title(Port,"sort_procs?sort=pid","Process Information"),
- title(Port,"sort_procs?sort=pid","Process Information"),
- title(Port,"sort_procs?sort=msg_q_len","Process Information"),
- title(Port,"sort_procs?sort=msg_q_len","Process Information"),
- title(Port,"sort_procs?sort=reds","Process Information"),
- title(Port,"sort_procs?sort=reds","Process Information"),
- title(Port,"sort_procs?sort=mem","Process Information"),
- title(Port,"sort_procs?sort=mem","Process Information"),
- title(Port,"sort_procs?sort=name","Process Information"),
- title(Port,"sort_procs?sort=name","Process Information"),
- title(Port,"sort_procs?sort=init_func","Process Information"),
- title(Port,"sort_procs?sort=init_func","Process Information"),
- title(Port,"ports","Port Information"),
- title(Port,"ets_tables","ETS Table Information"),
- title(Port,"timers","Timer Information"),
- title(Port,"fun_table","Fun Information"),
- title(Port,"atoms","Atoms"),
- title(Port,"dist_info","Distribution Information"),
- title(Port,"loaded_modules","Loaded Modules Information"),
- title(Port,"hash_tables","Hash Table Information"),
- title(Port,"index_tables","Index Table Information"),
- title(Port,"memory","Memory Information"),
- title(Port,"allocated_areas","Information about allocated areas"),
- title(Port,"allocator_info","Allocator Information"),
-
- case is_truncated(File) of
- true ->
- ok;
- _ ->
- proc_details(Port),
- port_details(Port),
- title(Port,"loaded_mod_details?mod=kernel","kernel")
- end,
-
- ok.
-
-
-special(Port,File) ->
+browse_file(File) ->
+ io:format("~nBrowsing file: ~s",[File]),
+
+ ok = start_backend(File),
+
+ io:format(" backend started",[]),
+
+ {ok,_GI=#general_info{},_GenTW} = crashdump_viewer:general_info(),
+ {ok,Procs,_ProcsTW} = crashdump_viewer:processes(),
+ {ok,Ports,_PortsTW} = crashdump_viewer:ports(),
+ {ok,_Ets,_EtsTW} = crashdump_viewer:ets_tables(all),
+ {ok,_IntEts,_IntEtsTW} = crashdump_viewer:internal_ets_tables(),
+ {ok,_Timers,_TimersTW} = crashdump_viewer:timers(all),
+ {ok,_Funs,_FunsTW} = crashdump_viewer:funs(),
+ {ok,_Atoms,_AtomsTW} = crashdump_viewer:atoms(),
+ {ok,Nodes,_NodesTW} = crashdump_viewer:dist_info(),
+ {ok,Mods,_ModsTW} = crashdump_viewer:loaded_modules(),
+ {ok,_Mem,_MemTW} = crashdump_viewer:memory(),
+ {ok,_AllocAreas,_AreaTW} = crashdump_viewer:allocated_areas(),
+ {ok,_AllocINfo,_AllocInfoTW} = crashdump_viewer:allocator_info(),
+ {ok,_HashTabs,_HashTabsTW} = crashdump_viewer:hash_tables(),
+ {ok,_IndexTabs,_IndexTabsTW} = crashdump_viewer:index_tables(),
+
+ io:format(" info read",[]),
+
+ lookat_all_pids(Procs),
+ io:format(" pids ok",[]),
+ lookat_all_ports(Ports),
+ io:format(" ports ok",[]),
+ lookat_all_mods(Mods),
+ io:format(" mods ok",[]),
+ lookat_all_nodes(Nodes),
+ io:format(" nodes ok",[]),
+
+ Procs. % used as second arg to special/2
+
+special(File,Procs) ->
case filename:extension(File) of
".full_dist" ->
- contents(Port,"processes"),
- AllProcs = contents(Port,"sort_procs?sort=name"),
-
%% I registered a process as aaaaaaaa in the full_dist dumps
%% to make sure it will be the first in the list when sorted
%% on names. There are some special data here, so I'll thoroughly
%% read the process details for this process. Other processes
%% are just briefly traversed.
- {Pid,Rest1} = get_first_process(AllProcs),
-
- ProcDetails = contents(Port,"proc_details?pid=" ++ Pid),
- ProcTitle = "Process " ++ Pid,
- ProcTitle = title(ProcDetails),
- title(Port,"ets_tables?pid="++Pid,"ETS Tables for Process "++Pid),
- title(Port,"timers?pid="++Pid,"Timers for Process "++Pid),
-
- case filename:basename(File) of
- "r10b_dump.full_dist" ->
- [MsgQueueLink,DictLink,StackDumpLink] =
- expand_memory_links(ProcDetails),
- MsgQueue = contents(Port,MsgQueueLink),
- "MsgQueue" = title(MsgQueue),
- title(Port,DictLink,"Dictionary"),
- title(Port,StackDumpLink,"StackDump"),
-
- ExpandBinaryLink = expand_binary_link(MsgQueue),
- title(Port,ExpandBinaryLink,"Expanded binary"),
- lookat_all_pids(Port,Rest1);
- _ ->
- ok
- end;
- ".strangemodname" ->
- AllMods = contents(Port,"loaded_modules"),
- open_all_modules(Port,AllMods),
+ [#proc{pid=Pid0}|_Rest] = lists:keysort(#proc.name,Procs),
+ Pid = pid_to_list(Pid0),
+ {ok,ProcDetails=#proc{},[]} = crashdump_viewer:proc_details(Pid),
+ io:format(" process details ok",[]),
+
+ #proc{dict=Dict} = ProcDetails,
+
+ ['#CDVBin',Offset,Size,Pos] = proplists:get_value(bin,Dict),
+ {ok,<<_:Size/binary>>} =
+ crashdump_viewer:expand_binary({Offset,Size,Pos}),
+ {ok,'#CDVTruncatedBinary'} =
+ crashdump_viewer:expand_binary({Offset,Size+1,Pos}),
+ ['#CDVBin',SOffset,SSize,SPos] = proplists:get_value(sub_bin,Dict),
+ {ok,<<_:SSize/binary>>} =
+ crashdump_viewer:expand_binary({SOffset,SSize,SPos}),
+ io:format(" expand binary ok",[]),
+
+ ['#CDVPid',X1,Y1,Z1] = proplists:get_value(ext_pid,Dict),
+ ChannelStr1 = integer_to_list(X1),
+ ExtPid =
+ "<" ++ ChannelStr1 ++ "." ++
+ integer_to_list(Y1) ++ "." ++
+ integer_to_list(Z1) ++ ">",
+ {error,{other_node,ChannelStr1}} =
+ crashdump_viewer:proc_details(ExtPid),
+ io:format(" process details external ok",[]),
+
+ ['#CDVPort',X2,Y2] = proplists:get_value(port,Dict),
+ ChannelStr2 = integer_to_list(X2),
+ Port = "#Port<"++ChannelStr2++"."++integer_to_list(Y2)++">",
+ {ok,_PortDetails=#port{},[]} = crashdump_viewer:port(Port),
+ io:format(" port details ok",[]),
+
+ ['#CDVPort',X3,Y3] = proplists:get_value(ext_port,Dict),
+ ChannelStr3 = integer_to_list(X3),
+ ExtPort = "#Port<"++ChannelStr3++"."++integer_to_list(Y3)++">",
+ {error,{other_node,ChannelStr3}} = crashdump_viewer:port(ExtPort),
+ io:format(" port details external ok",[]),
+
+ {ok,[_Ets=#ets_table{}],[]} = crashdump_viewer:ets_tables(Pid),
+ io:format(" ets tables ok",[]),
+
+ {ok,[#timer{pid=Pid0,name=undefined},
+ #timer{pid=Pid0,name="aaaaaaaa"}],[]} =
+ crashdump_viewer:timers(Pid),
+ {ok,AllTimers,_TimersTW} = crashdump_viewer:timers(all),
+ #timer{name="noexistproc"} =
+ lists:keyfind(undefined,#timer.pid,AllTimers),
+ io:format(" timers ok:",[]),
+
+ {ok,Mod1=#loaded_mod{},[]} =
+ crashdump_viewer:loaded_mod_details(atom_to_list(?helper_mod)),
+ io:format(" modules ok",[]),
+ #loaded_mod{current_size=CS, old_size=OS,
+ old_attrib=A,old_comp_info=C}=Mod1,
+ true = is_integer(CS),
+ true = (CS==OS),
+ true = (A=/=undefined),
+ true = (C=/=undefined),
+ {ok,Mod2=#loaded_mod{},[]} =
+ crashdump_viewer:loaded_mod_details("application"),
+ io:format(" module details ok",[]),
+ #loaded_mod{old_size="No old code exists",
+ old_attrib=undefined,
+ old_comp_info=undefined}=Mod2,
ok;
- %%! No longer needed - all atoms are shown on one page!!
- %% ".250atoms" ->
- %% Html1 = contents(Port,"atoms"),
- %% NextLink1 = next_link(Html1),
- %% "Atoms" = title(Html1),
- %% Html2 = contents(Port,NextLink1),
- %% NextLink2 = next_link(Html2),
- %% "Atoms" = title(Html2),
- %% Html3 = contents(Port,NextLink2),
- %% "" = next_link(Html3),
- %% "Atoms" = title(Html3);
- _ ->
- ok
- end,
- case filename:basename(File) of
- "r10b_dump." ++ _ ->
- lookat_all_pids(Port,contents(Port,"processes"));
- "r11b_dump." ++ _ ->
- lookat_all_pids(Port,contents(Port,"processes"));
+ %% ".strangemodname" ->
+ %% {ok,Mods,[]} = crashdump_viewer:loaded_modules(),
+ %% lookat_all_mods(Mods),
+ %% ok;
+ %% ".sort" ->
+ %% %% sort ports, atoms and modules ????
+ %% ok;
+ %% ".trunc" ->
+ %% %% ????
+ %% ok;
_ ->
ok
end,
ok.
-lookat_all_pids(Port,Pids) ->
- case get_first_process(Pids) of
- {Pid,Rest} ->
- ProcDetails = contents(Port,"proc_details?pid=" ++ Pid),
- ProcTitle = "Process " ++ Pid,
- ProcTitle = title(ProcDetails),
- title(Port,"ets_tables?pid="++Pid,"ETS Tables for Process "++Pid),
- title(Port,"timers?pid="++Pid,"Timers for Process "++Pid),
-
- MemoryLinks = expand_memory_links(ProcDetails),
- lists:foreach(
- fun(Link) ->
- Cont = contents(Port,Link),
- true = lists:member(title(Cont),
- ["MsgQueue",
- "Dictionary",
- "StackDump"])
- end,
- MemoryLinks),
- lookat_all_pids(Port,Rest);
- false ->
- ok
- end.
-
-
-get_first_process([]) ->
- false;
-get_first_process(Html) ->
- case Html of
- "<TD><A HREF=\"./proc_details?pid=" ++ Rest ->
- {string:sub_word(Rest,1,$"),Rest};
- [_H|T] ->
- get_first_process(T)
- end.
-
-expand_memory_links(Html) ->
- case Html of
- "<B>MsgQueue</B></TD><TD COLSPAN=3><A HREF=\"./" ++ Rest ->
- [string:sub_word(Rest,1,$")|expand_memory_links(Rest)];
- "<B>Dictionary</B></TD><TD COLSPAN=3><A HREF=\"./" ++ Rest ->
- [string:sub_word(Rest,1,$")|expand_memory_links(Rest)];
- "<B>StackDump</B></TD><TD COLSPAN=3><A HREF=\"./" ++ Rest ->
- [string:sub_word(Rest,1,$")];
- [_H|T] ->
- expand_memory_links(T);
- [] ->
- []
- end.
-
-expand_binary_link(Html) ->
- case Html of
- "<A HREF=\"./expand_binary?pos=" ++ Rest ->
- "expand_binary?pos=" ++ string:sub_word(Rest,1,$");
- [_H|T] ->
- expand_binary_link(T)
- end.
-
-open_all_modules(Port,Modules) ->
- case get_first_module(Modules) of
- {Module,Rest} ->
- ModuleDetails = contents(Port,"loaded_mod_details?mod=" ++ Module),
- ModTitle = http_uri:decode(Module),
- ModTitle = title(ModuleDetails),
- open_all_modules(Port,Rest);
- false ->
- ok
- end.
-
-get_first_module([]) ->
- false;
-get_first_module(Html) ->
- case Html of
- "<TD><A HREF=\"loaded_mod_details?mod=" ++ Rest ->
- {string:sub_word(Rest,1,$"),Rest};
- [_H|T] ->
- get_first_module(T)
- end.
-
-%% next_link(Html) ->
-%% case Html of
-%% "<A HREF=\"./next?pos=" ++ Rest ->
-%% "next?pos=" ++ string:sub_word(Rest,1,$");
-%% [_H|T] ->
-%% next_link(T);
-%% [] ->
-%% []
-%% end.
-
-
-
-toggle_menu(Port) ->
- Html = contents(Port,"toggle?index=4"),
- check_toggle(Html).
-
-check_toggle(Html) ->
- case Html of
- "<A HREF=\"./toggle?index=4\"><IMG SRC=\"/crashdump_viewer/collapsd.gif\"" ++ _ ->
- collapsed;
- "<A HREF=\"./toggle?index=4\"><IMG SRC=\"/crashdump_viewer/exploded.gif\"" ++ _ ->
- exploded;
- [_H|T] ->
- check_toggle(T)
- end.
-
-
-proc_details(Port) ->
- ProcDetails = contents(Port,"proc_details?pid=<0.0.0>"),
- "Process <0.0.0>" = title(ProcDetails),
-
- ExpandLink = expand_link(ProcDetails),
- title(Port,ExpandLink,"StackDump"),
-
- Unknown = contents(Port,"proc_details?pid=<0.9999.0>"),
- "Could not find process: <0.9999.0>" = title(Unknown).
-
-expand_link(Html) ->
- case Html of
- "<B>StackDump</B></TD><TD COLSPAN=3><A HREF=\"./" ++ Rest ->
- string:sub_word(Rest,1,$");
- [_H|T] ->
- expand_link(T)
- end.
-
-
-port_details(Port) ->
- Port0 = contents(Port,"port?port=Port<0.0>"),
- Port1 = contents(Port,"port?port=Port<0.1>"),
- case title(Port0) of
- "#Port<0.0>" -> % R16 or later
- "Could not find port: #Port<0.1>" = title(Port1);
- "Could not find port: #Port<0.0>" -> % R15 or earlier
- "#Port<0.1>" = title(Port1)
- end.
-
-is_truncated(File) ->
- case filename:extension(filename:rootname(File)) of
- ".trunc" -> true;
- _ -> false
- end.
-
+lookat_all_pids([]) ->
+ ok;
+lookat_all_pids([#proc{pid=Pid0}|Procs]) ->
+ Pid = pid_to_list(Pid0),
+ {ok,_ProcDetails=#proc{},_ProcTW} = crashdump_viewer:proc_details(Pid),
+ {ok,_Ets,_EtsTW} = crashdump_viewer:ets_tables(Pid),
+ {ok,_Timers,_TimersTW} = crashdump_viewer:timers(Pid),
+ lookat_all_pids(Procs).
+
+lookat_all_ports([]) ->
+ ok;
+lookat_all_ports([#port{id=Port0}|Procs]) ->
+ Port = cdv_port_cb:format(Port0),
+ {ok,_PortDetails=#port{},_PortTW} = crashdump_viewer:port(Port),
+ lookat_all_ports(Procs).
+
+lookat_all_mods([]) ->
+ ok;
+lookat_all_mods([#loaded_mod{mod=ModId}|Mods]) ->
+ ModName = cdv_mod_cb:format(ModId),
+ {ok,_Mod=#loaded_mod{},_ModTW} = crashdump_viewer:loaded_mod_details(ModName),
+ lookat_all_mods(Mods).
+
+lookat_all_nodes([]) ->
+ ok;
+lookat_all_nodes([#nod{channel=Channel0}|Nodes]) ->
+ Channel = integer_to_list(Channel0),
+ {ok,_Node=#nod{},_NodeTW} = crashdump_viewer:node_info(Channel),
+ lookat_all_nodes(Nodes).
%%%-----------------------------------------------------------------
%%%
@@ -629,22 +463,13 @@ create_dumps(DataDir,Rels) ->
create_dumps(DataDir,[Rel|Rels],Acc) ->
Fun = fun() -> do_create_dumps(DataDir,Rel) end,
Pa = filename:dirname(code:which(?MODULE)),
- {SlAllocDumps,Dumps,DosDump} =
+ {Dumps,DosDump} =
?t:run_on_shielded_node(Fun, compat_rel(Rel) ++ "-pa \"" ++ Pa ++ "\""),
- create_dumps(DataDir,Rels,SlAllocDumps ++ Dumps ++ Acc ++ DosDump);
+ create_dumps(DataDir,Rels,Dumps ++ Acc ++ DosDump);
create_dumps(_DataDir,[],Acc) ->
Acc.
do_create_dumps(DataDir,Rel) ->
- SlAllocDumps =
- case lists:member(Rel,?sl_alloc_vsns) of
- true ->
- [dump_with_args(DataDir,Rel,"no_sl_alloc","+Se false"),
- dump_with_args(DataDir,Rel,"sl_alloc_1","+Se true +Sr 1"),
- dump_with_args(DataDir,Rel,"sl_alloc_2","+Se true +Sr 2")];
- false ->
- []
- end,
CD1 = full_dist_dump(DataDir,Rel),
CD2 = dump_with_args(DataDir,Rel,"port_is_unix_fd","-oldshell"),
DosDump =
@@ -656,14 +481,16 @@ do_create_dumps(DataDir,Rel) ->
current ->
CD3 = dump_with_args(DataDir,Rel,"instr","+Mim true"),
CD4 = dump_with_strange_module_name(DataDir,Rel,"strangemodname"),
- {SlAllocDumps, [CD1,CD2,CD3,CD4], DosDump};
+ {[CD1,CD2,CD3,CD4], DosDump};
_ ->
- {SlAllocDumps, [CD1,CD2], DosDump}
+ {[CD1,CD2], DosDump}
end.
-%% Create a dump which has two visible nodes, one hidden and one
+%% Create a dump which has three visible nodes, one hidden and one
%% not connected node, and with monitors and links between nodes.
+%% One of the visible nodes is stopped and started again in order to
+%% get multiple creations.
full_dist_dump(DataDir,Rel) ->
Opt = rel_opt(Rel),
Pz = "-pz \"" ++ filename:dirname(code:which(?MODULE)) ++ "\"",
@@ -674,23 +501,26 @@ full_dist_dump(DataDir,Rel) ->
{ok,N4} = ?t:start_node(n4,peer,Opt ++ [{args,"-hidden " ++ Pz}]),
Creator = self(),
- HelperMod = crashdump_helper,
-
- P1 = rpc:call(N1,HelperMod,n1_proc,[N2,Creator]),
- P2 = rpc:call(N2,HelperMod,remote_proc,[P1,Creator]),
- P3 = rpc:call(N3,HelperMod,remote_proc,[P1,Creator]),
- P4 = rpc:call(N4,HelperMod,remote_proc,[P1,Creator]),
+ P1 = rpc:call(N1,?helper_mod,n1_proc,[N2,Creator]),
+ P2 = rpc:call(N2,?helper_mod,remote_proc,[P1,Creator]),
+ P3 = rpc:call(N3,?helper_mod,remote_proc,[P1,Creator]),
+ P4 = rpc:call(N4,?helper_mod,remote_proc,[P1,Creator]),
get_response(P2),
get_response(P3),
get_response(P4),
get_response(P1),
- L = lists:seq(0,255),
- BigMsg = {message,list_to_binary(L),L},
- Port = hd(erlang:ports()),
- {aaaaaaaa,N1} ! {short,message,1,2.5,"hello world",Port,{}},
- {aaaaaaaa,N1} ! BigMsg,
+ %% start, stop and start a node in order to get multiple 'creations'
+ {ok,N5} = ?t:start_node(n5,peer,Opt ++ PzOpt),
+ P51 = rpc:call(N5,?helper_mod,remote_proc,[P1,Creator]),
+ get_response(P51),
+ ?t:stop_node(N5),
+ {ok,N5} = ?t:start_node(n5,peer,Opt ++ PzOpt),
+ P52 = rpc:call(N5,?helper_mod,remote_proc,[P1,Creator]),
+ get_response(P52),
+
+ {aaaaaaaa,N1} ! {hello,from,other,node}, % distribution message
?t:stop_node(N3),
DumpName = "full_dist",
@@ -698,6 +528,7 @@ full_dist_dump(DataDir,Rel) ->
?t:stop_node(N2),
?t:stop_node(N4),
+ ?t:stop_node(N5),
CD.
get_response(P) ->
diff --git a/lib/observer/test/crashdump_viewer_SUITE_data/r10b_dump.trunc.100atoms b/lib/observer/test/crashdump_viewer_SUITE_data/r10b_dump.trunc.100atoms
deleted file mode 100644
index 921c27bd0e..0000000000
--- a/lib/observer/test/crashdump_viewer_SUITE_data/r10b_dump.trunc.100atoms
+++ /dev/null
@@ -1,13135 +0,0 @@
-=erl_crash_dump:0.1
-Wed Apr 21 13:22:44 2004
-Slogan: eheap_alloc: Cannot allocate 785672 bytes of memory (of type "heap").
-System version: Erlang (BEAM) emulator version 5.4 [source] [hipe] [threads:0]
-Compiled: Thu Dec 18 14:07:45 2003
-Atoms: 5614
-=memory
-total: 653336887
-processes: 1768396
-processes_used: 1765460
-system: 651568491
-atom: 244837
-atom_used: 237116
-binary: 648618369
-code: 2158413
-ets: 225620
-=hash_table:atom_tab
-size: 4813
-used: 3304
-objs: 5614
-depth: 7
-=index_table:atom_tab
-size: 5700
-limit: 1048576
-used: 5614
-rate: 100
-=hash_table:module_code
-size: 97
-used: 69
-objs: 107
-depth: 5
-=index_table:module_code
-size: 110
-limit: 65536
-used: 107
-rate: 10
-=hash_table:export_list
-size: 2411
-used: 1674
-objs: 2843
-depth: 6
-=index_table:export_list
-size: 2900
-limit: 65536
-used: 2843
-rate: 100
-=hash_table:process_reg
-size: 47
-used: 16
-objs: 23
-depth: 3
-=hash_table:fun_table
-size: 397
-used: 261
-objs: 400
-depth: 4
-=hash_table:node_table
-size: 11
-used: 1
-objs: 1
-depth: 1
-=hash_table:dist_table
-size: 11
-used: 1
-objs: 1
-depth: 1
-=allocated_areas
-processes: 1765460 1768396
-ets: 225620
-sys_misc: 24634
-static: 295033
-atom_space: 65544 57967
-binary: 648618369
-atom_table: 42141
-module_table: 920
-export_table: 21336
-register_table: 252
-fun_table: 1650
-module_refs: 1024
-loaded_code: 1968915
-dist_table: 159
-node_table: 131
-bits_bufs_size: 19
-bif_timer: 13392
-link_lh: 0
-dist_buf: 0
-proc: 15080 13576
-atom_entry: 137152 137008
-export_entry: 138448 137632
-module_entry: 4872 4352
-reg_proc: 1000 592
-link_nh: 2464 2080
-link_sh: 832 192
-proc_list: 24 24
-fun_entry: 22584 22584
-db_tab: 1632 1632
-=allocator:sys_alloc
-option e: true
-option m: libc
-=allocator:temp_alloc
-versions: 0.9 2.1
-option e: true
-option sbct: 524288
-option asbcst: 4145152
-option rsbcst: 90
-option rsbcmt: 80
-option mmbcs: 65536
-option mmsbc: 256
-option mmmbc: 10
-option lmbcs: 5242880
-option smbcs: 1048576
-option mbcgs: 10
-option as: af
-mbcs blocks: 0 9 9
-mbcs blocks size: 0 35376 35376
-mbcs carriers: 1 1 1
-mbcs mseg carriers: 0
-mbcs sys_alloc carriers: 1
-mbcs carriers size: 65568 65568 65568
-mbcs mseg carriers size: 0
-mbcs sys_alloc carriers size: 65568
-sbcs blocks: 0 0 0
-sbcs blocks size: 0 0 0
-sbcs carriers: 0 0 0
-sbcs mseg carriers: 0
-sbcs sys_alloc carriers: 0
-sbcs carriers size: 0 0 0
-sbcs mseg carriers size: 0
-sbcs sys_alloc carriers size: 0
-temp_alloc calls: 6155
-temp_free calls: 6155
-temp_realloc calls: 29
-mseg_alloc calls: 0
-mseg_dealloc calls: 0
-mseg_realloc calls: 0
-sys_alloc calls: 1
-sys_free calls: 0
-sys_realloc calls: 0
-=allocator:sl_alloc
-option e: false
-=allocator:std_alloc
-option e: false
-=allocator:ll_alloc
-versions: 0.9 2.1
-option e: true
-option sbct: 4294967295
-option asbcst: 0
-option rsbcst: 0
-option rsbcmt: 0
-option mmbcs: 2097152
-option mmsbc: 0
-option mmmbc: 0
-option lmbcs: 5242880
-option smbcs: 1048576
-option mbcgs: 10
-option as: aobf
-mbcs blocks: 592 592 592
-mbcs blocks size: 2838520 2863304 2863304
-mbcs carriers: 2 2 2
-mbcs mseg carriers: 0
-mbcs sys_alloc carriers: 2
-mbcs carriers size: 3145760 3145760 3145760
-mbcs mseg carriers size: 0
-mbcs sys_alloc carriers size: 3145760
-sbcs blocks: 0 0 0
-sbcs blocks size: 0 0 0
-sbcs carriers: 0 0 0
-sbcs mseg carriers: 0
-sbcs sys_alloc carriers: 0
-sbcs carriers size: 0 0 0
-sbcs mseg carriers size: 0
-sbcs sys_alloc carriers size: 0
-ll_alloc calls: 592
-ll_free calls: 0
-ll_realloc calls: 235
-mseg_alloc calls: 0
-mseg_dealloc calls: 0
-mseg_realloc calls: 0
-sys_alloc calls: 2
-sys_free calls: 0
-sys_realloc calls: 0
-=allocator:eheap_alloc
-versions: 2.1 2.1
-option e: true
-option sbct: 524288
-option asbcst: 4145152
-option rsbcst: 50
-option rsbcmt: 80
-option mmbcs: 524288
-option mmsbc: 256
-option mmmbc: 10
-option lmbcs: 5242880
-option smbcs: 1048576
-option mbcgs: 10
-option mbsd: 3
-option as: gf
-mbcs blocks: 56 102 102
-mbcs blocks size: 833280 1638920 1638920
-mbcs carriers: 2 3 3
-mbcs mseg carriers: 1
-mbcs sys_alloc carriers: 1
-mbcs carriers size: 1998880 3047456 3047456
-mbcs mseg carriers size: 1474560
-mbcs sys_alloc carriers size: 524320
-sbcs blocks: 0 0 0
-sbcs blocks size: 0 0 0
-sbcs carriers: 0 0 0
-sbcs mseg carriers: 0
-sbcs sys_alloc carriers: 0
-sbcs carriers size: 0 0 0
-sbcs mseg carriers size: 0
-sbcs sys_alloc carriers size: 0
-eheap_alloc calls: 6971
-eheap_free calls: 6914
-eheap_realloc calls: 461
-mseg_alloc calls: 16
-mseg_dealloc calls: 14
-mseg_realloc calls: 0
-sys_alloc calls: 3
-sys_free calls: 0
-sys_realloc calls: 0
-=allocator:binary_alloc
-option e: false
-=allocator:ets_alloc
-option e: false
-=allocator:fix_alloc
-option e: true
-proc: 15080 13576
-atom_entry: 137152 137008
-export_entry: 138448 137632
-module_entry: 4872 4352
-reg_proc: 1000 592
-link_nh: 2464 2080
-link_sh: 832 192
-proc_list: 24 24
-fun_entry: 22584 22584
-db_tab: 1632 1632
-=allocator:mseg_alloc
-version: 0.9
-option amcbf: 4194304
-option rmcbf: 20
-option mcs: 5
-option cci: 1000
-cached_segments: 0
-cache_hits: 13
-segments: 2
-segments_watermark: 2
-mseg_alloc calls: 16
-mseg_dealloc calls: 14
-mseg_realloc calls: 0
-mseg_create calls: 4
-mseg_destroy calls: 1
-mseg_clear_cache calls: 6
-mseg_check_cache calls: 2
-=allocator:alloc_util
-option mmc: 1024
-option ycs: 1048576
-=allocator:instr
-option m: false
-option s: false
-option t: false
-=proc:<0.0.0>
-State: Waiting
-Name: init
-Spawned as: otp_ring0:start/2
-Spawned by: []
-Started: Wed Apr 21 13:22:07 2004
-Message queue length: 0
-Number of heap fragments: 0
-Heap fragment data: 0
-Link list: [<0.5.0>,<0.4.0>,<0.2.0>]
-Reductions: 3851
-Stack+heap: 377
-OldHeap: 610
-Heap unused: 53
-OldHeap unused: 610
-Program counter: 0x1f496c (init:loop/1 + 20)
-CP: 0x156f90 (<terminate process normally>)
-arity = 0
-=proc:<0.2.0>
-State: Waiting
-Name: erl_prim_loader
-Spawned as: erlang:apply/2
-Spawned by: <0.1.0>
-Started: Wed Apr 21 13:22:07 2004
-Message queue length: 0
-Number of heap fragments: 0
-Heap fragment data: 0
-Link list: [<0.0.0>,#Port<0.2>]
-Reductions: 201036
-Stack+heap: 987
-OldHeap: 987
-Heap unused: 923
-OldHeap unused: 987
-Program counter: 0x20cc94 (erl_prim_loader:loop/3 + 52)
-CP: 0x156f90 (<terminate process normally>)
-arity = 0
-=proc:<0.4.0>
-State: Waiting
-Name: error_logger
-Spawned as: proc_lib:init_p/5
-Spawned by: <0.1.0>
-Started: Wed Apr 21 13:22:07 2004
-Message queue length: 0
-Number of heap fragments: 0
-Heap fragment data: 0
-Link list: [<0.21.0>,<0.0.0>]
-Reductions: 296
-Stack+heap: 6765
-OldHeap: 0
-Heap unused: 851
-OldHeap unused: 0
-Program counter: 0x21f5b8 (gen_event:loop/4 + 40)
-CP: 0x225860 (proc_lib:init_p/5 + 164)
-arity = 0
-=proc:<0.5.0>
-State: Waiting
-Name: application_controller
-Spawned as: proc_lib:init_p/5
-Spawned by: <0.1.0>
-Started: Wed Apr 21 13:22:07 2004
-Message queue length: 0
-Number of heap fragments: 0
-Heap fragment data: 0
-Link list: [<0.7.0>,<0.0.0>]
-Reductions: 1508
-Stack+heap: 1597
-OldHeap: 0
-Heap unused: 835
-OldHeap unused: 0
-Program counter: 0x239d50 (gen_server:loop/6 + 52)
-CP: 0x225860 (proc_lib:init_p/5 + 164)
-arity = 0
-=proc:<0.7.0>
-State: Waiting
-Spawned as: proc_lib:init_p/5
-Spawned by: <0.6.0>
-Started: Wed Apr 21 13:22:07 2004
-Message queue length: 0
-Number of heap fragments: 0
-Heap fragment data: 0
-Link list: [<0.8.0>,<0.5.0>]
-Reductions: 23
-Stack+heap: 377
-OldHeap: 0
-Heap unused: 79
-OldHeap unused: 0
-Program counter: 0x248d04 (application_master:main_loop/2 + 28)
-CP: 0x225860 (proc_lib:init_p/5 + 164)
-arity = 0
-=proc:<0.8.0>
-State: Waiting
-Spawned as: application_master:start_it/4
-Spawned by: <0.7.0>
-Started: Wed Apr 21 13:22:07 2004
-Message queue length: 0
-Number of heap fragments: 0
-Heap fragment data: 0
-Link list: [<0.9.0>,<0.7.0>]
-Reductions: 91
-Stack+heap: 233
-OldHeap: 0
-Heap unused: 177
-OldHeap unused: 0
-Program counter: 0x24a26c (application_master:loop_it/4 + 40)
-CP: 0x156f90 (<terminate process normally>)
-arity = 0
-=proc:<0.9.0>
-State: Waiting
-Name: kernel_sup
-Spawned as: proc_lib:init_p/5
-Spawned by: <0.8.0>
-Started: Wed Apr 21 13:22:07 2004
-Message queue length: 0
-Number of heap fragments: 0
-Heap fragment data: 0
-Link list: [<0.24.0>,<0.23.0>,<0.19.0>,<0.18.0>,<0.17.0>,<0.16.0>,<0.15.0>,<0.14.0>,<0.11.0>,<0.10.0>,<0.8.0>]
-Reductions: 7402
-Stack+heap: 610
-OldHeap: 987
-Heap unused: 311
-OldHeap unused: 987
-Program counter: 0x239d50 (gen_server:loop/6 + 52)
-CP: 0x225860 (proc_lib:init_p/5 + 164)
-arity = 0
-=proc:<0.10.0>
-State: Waiting
-Name: rex
-Spawned as: proc_lib:init_p/5
-Spawned by: <0.9.0>
-Started: Wed Apr 21 13:22:07 2004
-Message queue length: 0
-Number of heap fragments: 0
-Heap fragment data: 0
-Link list: [<0.9.0>]
-Reductions: 44
-Stack+heap: 233
-OldHeap: 0
-Heap unused: 144
-OldHeap unused: 0
-Program counter: 0x239d50 (gen_server:loop/6 + 52)
-CP: 0x225860 (proc_lib:init_p/5 + 164)
-arity = 0
-=proc:<0.11.0>
-State: Waiting
-Name: global_name_server
-Spawned as: proc_lib:init_p/5
-Spawned by: <0.9.0>
-Started: Wed Apr 21 13:22:07 2004
-Message queue length: 0
-Number of heap fragments: 0
-Heap fragment data: 0
-Link list: [<0.13.0>,<0.12.0>,<0.9.0>]
-Reductions: 47
-Stack+heap: 233
-OldHeap: 0
-Heap unused: 98
-OldHeap unused: 0
-Program counter: 0x239d50 (gen_server:loop/6 + 52)
-CP: 0x225860 (proc_lib:init_p/5 + 164)
-arity = 0
-=proc:<0.12.0>
-State: Waiting
-Spawned as: global:init_the_locker/1
-Spawned by: <0.11.0>
-Started: Wed Apr 21 13:22:07 2004
-Message queue length: 0
-Number of heap fragments: 0
-Heap fragment data: 0
-Link list: [<0.11.0>]
-Reductions: 3
-Stack+heap: 233
-OldHeap: 0
-Heap unused: 227
-OldHeap unused: 0
-Program counter: 0x261340 (global:loop_the_locker/2 + 92)
-CP: 0x261184 (global:init_the_locker/1 + 112)
-arity = 0
-=proc:<0.13.0>
-State: Waiting
-Spawned as: erlang:apply/2
-Spawned by: <0.11.0>
-Started: Wed Apr 21 13:22:07 2004
-Message queue length: 0
-Number of heap fragments: 0
-Heap fragment data: 0
-Link list: [<0.11.0>]
-Reductions: 4
-Stack+heap: 233
-OldHeap: 0
-Heap unused: 221
-OldHeap unused: 0
-Program counter: 0x265288 (global:collect_deletions/2 + 76)
-CP: 0x2651ac (global:loop_the_deleter/1 + 36)
-arity = 0
-=proc:<0.14.0>
-State: Waiting
-Name: inet_db
-Spawned as: proc_lib:init_p/5
-Spawned by: <0.9.0>
-Started: Wed Apr 21 13:22:07 2004
-Message queue length: 0
-Number of heap fragments: 0
-Heap fragment data: 0
-Link list: [<0.9.0>]
-Reductions: 376
-Stack+heap: 233
-OldHeap: 233
-Heap unused: 30
-OldHeap unused: 233
-Program counter: 0x239d50 (gen_server:loop/6 + 52)
-CP: 0x225860 (proc_lib:init_p/5 + 164)
-arity = 0
-=proc:<0.15.0>
-State: Waiting
-Name: global_group
-Spawned as: proc_lib:init_p/5
-Spawned by: <0.9.0>
-Started: Wed Apr 21 13:22:07 2004
-Message queue length: 0
-Number of heap fragments: 0
-Heap fragment data: 0
-Link list: [<0.9.0>]
-Reductions: 71
-Stack+heap: 233
-OldHeap: 0
-Heap unused: 92
-OldHeap unused: 0
-Program counter: 0x239d50 (gen_server:loop/6 + 52)
-CP: 0x225860 (proc_lib:init_p/5 + 164)
-arity = 0
-=proc:<0.16.0>
-State: Waiting
-Name: file_server_2
-Spawned as: proc_lib:init_p/5
-Spawned by: <0.9.0>
-Started: Wed Apr 21 13:22:07 2004
-Message queue length: 0
-Number of heap fragments: 1
-Heap fragment data: 119
-Link list: [{from,<0.17.0>,#Ref<0.0.0.22>},#Port<0.4>,<0.9.0>]
-Reductions: 83605
-Stack+heap: 4181
-OldHeap: 4181
-Heap unused: 1720
-OldHeap unused: 4181
-Program counter: 0x239d50 (gen_server:loop/6 + 52)
-CP: 0x225860 (proc_lib:init_p/5 + 164)
-arity = 0
-=proc:<0.17.0>
-State: Waiting
-Name: file_server
-Spawned as: erlang:apply/2
-Spawned by: <0.9.0>
-Started: Wed Apr 21 13:22:07 2004
-Message queue length: 0
-Number of heap fragments: 0
-Heap fragment data: 0
-Link list: [{to,<0.16.0>,#Ref<0.0.0.22>},<0.9.0>]
-Reductions: 12
-Stack+heap: 233
-OldHeap: 0
-Heap unused: 207
-OldHeap unused: 0
-Program counter: 0x2a18e8 (old_file_server:relay_loop/3 + 32)
-CP: 0x156f90 (<terminate process normally>)
-arity = 0
-=proc:<0.18.0>
-State: Waiting
-Name: code_server
-Spawned as: erlang:apply/2
-Spawned by: <0.9.0>
-Started: Wed Apr 21 13:22:07 2004
-Message queue length: 0
-Number of heap fragments: 0
-Heap fragment data: 0
-Link list: [<0.9.0>]
-Reductions: 108900
-Stack+heap: 6765
-OldHeap: 6765
-Heap unused: 4389
-OldHeap unused: 6765
-Program counter: 0x2a6e64 (code_server:loop/1 + 64)
-CP: 0x156f90 (<terminate process normally>)
-arity = 0
-=proc:<0.19.0>
-State: Waiting
-Spawned as: proc_lib:init_p/5
-Spawned by: <0.9.0>
-Started: Wed Apr 21 13:22:08 2004
-Message queue length: 0
-Number of heap fragments: 0
-Heap fragment data: 0
-Link list: [<0.21.0>,<0.9.0>]
-Reductions: 74
-Stack+heap: 233
-OldHeap: 233
-Heap unused: 180
-OldHeap unused: 233
-Program counter: 0x239d50 (gen_server:loop/6 + 52)
-CP: 0x225860 (proc_lib:init_p/5 + 164)
-arity = 0
-=proc:<0.20.0>
-State: Waiting
-Spawned as: user_drv:server/2
-Spawned by: <0.19.0>
-Started: Wed Apr 21 13:22:08 2004
-Message queue length: 0
-Number of heap fragments: 0
-Heap fragment data: 0
-Link list: [<0.22.0>,<0.21.0>,#Port<0.72>]
-Reductions: 596
-Stack+heap: 233
-OldHeap: 377
-Heap unused: 214
-OldHeap unused: 377
-Program counter: 0x2ca4e0 (user_drv:server_loop/5 + 56)
-CP: 0x156f90 (<terminate process normally>)
-arity = 0
-=proc:<0.21.0>
-State: Waiting
-Name: user
-Spawned as: group:server/2
-Spawned by: <0.20.0>
-Started: Wed Apr 21 13:22:08 2004
-Message queue length: 0
-Number of heap fragments: 0
-Heap fragment data: 0
-Link list: [<0.4.0>,<0.19.0>,<0.20.0>]
-Reductions: 26
-Stack+heap: 233
-OldHeap: 0
-Heap unused: 202
-OldHeap unused: 0
-Program counter: 0x2cd9d8 (group:server_loop/3 + 32)
-CP: 0x156f90 (<terminate process normally>)
-arity = 0
-=proc:<0.22.0>
-State: Waiting
-Spawned as: group:server/2
-Spawned by: <0.20.0>
-Started: Wed Apr 21 13:22:08 2004
-Message queue length: 0
-Number of heap fragments: 0
-Heap fragment data: 0
-Link list: [{from,<0.49.0>,#Ref<0.0.0.307>},<0.25.0>,<0.20.0>]
-Reductions: 1244
-Stack+heap: 233
-OldHeap: 233
-Heap unused: 40
-OldHeap unused: 233
-Program counter: 0x2cf238 (group:get_line1/3 + 1652)
-CP: 0x2cf230 (group:get_line1/3 + 1644)
-arity = 0
-=proc:<0.23.0>
-State: Waiting
-Spawned as: proc_lib:init_p/5
-Spawned by: <0.9.0>
-Started: Wed Apr 21 13:22:08 2004
-Message queue length: 0
-Number of heap fragments: 0
-Heap fragment data: 0
-Link list: [<0.9.0>]
-Reductions: 45
-Stack+heap: 233
-OldHeap: 0
-Heap unused: 63
-OldHeap unused: 0
-Program counter: 0x239d50 (gen_server:loop/6 + 52)
-CP: 0x225860 (proc_lib:init_p/5 + 164)
-arity = 0
-=proc:<0.24.0>
-State: Waiting
-Name: kernel_safe_sup
-Spawned as: proc_lib:init_p/5
-Spawned by: <0.9.0>
-Started: Wed Apr 21 13:22:08 2004
-Message queue length: 0
-Number of heap fragments: 0
-Heap fragment data: 0
-Link list: [<0.31.0>,<0.9.0>]
-Reductions: 133
-Stack+heap: 233
-OldHeap: 233
-Heap unused: 198
-OldHeap unused: 233
-Program counter: 0x239d50 (gen_server:loop/6 + 52)
-CP: 0x225860 (proc_lib:init_p/5 + 164)
-arity = 0
-=proc:<0.25.0>
-State: Waiting
-Spawned as: erlang:apply/2
-Spawned by: <0.22.0>
-Started: Wed Apr 21 13:22:08 2004
-Message queue length: 0
-Number of heap fragments: 0
-Heap fragment data: 0
-Link list: [<0.49.0>,<0.27.0>,<0.22.0>]
-Reductions: 161
-Stack+heap: 233
-OldHeap: 0
-Heap unused: 169
-OldHeap unused: 0
-Program counter: 0x2e0d00 (shell:get_command1/4 + 40)
-CP: 0x2e06fc (shell:server_loop/6 + 140)
-arity = 0
-=proc:<0.27.0>
-State: Waiting
-Spawned as: erlang:apply/2
-Spawned by: <0.25.0>
-Started: Wed Apr 21 13:22:08 2004
-Message queue length: 0
-Number of heap fragments: 0
-Heap fragment data: 0
-Link list: [<0.25.0>]
-Reductions: 506
-Stack+heap: 4181
-OldHeap: 0
-Heap unused: 1131
-OldHeap unused: 0
-Program counter: 0x2e2bbc (shell:eval_loop/2 + 32)
-CP: 0x156f90 (<terminate process normally>)
-arity = 0
-=proc:<0.31.0>
-State: Waiting
-Name: inet_gethost_native_sup
-Spawned as: proc_lib:init_p/5
-Spawned by: <0.24.0>
-Started: Wed Apr 21 13:22:17 2004
-Message queue length: 0
-Number of heap fragments: 0
-Heap fragment data: 0
-Link list: [<0.32.0>,<0.24.0>]
-Reductions: 49
-Stack+heap: 233
-OldHeap: 0
-Heap unused: 87
-OldHeap unused: 0
-Program counter: 0x239d50 (gen_server:loop/6 + 52)
-CP: 0x225860 (proc_lib:init_p/5 + 164)
-arity = 0
-=proc:<0.32.0>
-State: Waiting
-Name: inet_gethost_native
-Spawned as: inet_gethost_native:server_init/2
-Spawned by: <0.31.0>
-Started: Wed Apr 21 13:22:17 2004
-Message queue length: 0
-Number of heap fragments: 1
-Heap fragment data: 118
-Link list: [#Port<0.105>,<0.31.0>]
-Reductions: 65
-Stack+heap: 233
-OldHeap: 0
-Heap unused: 13
-OldHeap unused: 0
-Program counter: 0x4ad840 (inet_gethost_native:main_loop/1 + 20)
-CP: 0x156f90 (<terminate process normally>)
-arity = 0
-=proc:<0.33.0>
-State: Waiting
-Name: web_tool
-Spawned as: proc_lib:init_p/5
-Spawned by: <0.27.0>
-Started: Wed Apr 21 13:22:17 2004
-Message queue length: 0
-Number of heap fragments: 0
-Heap fragment data: 0
-Link list: [<0.41.0>]
-Reductions: 131773
-Stack+heap: 6765
-OldHeap: 6765
-Heap unused: 2941
-OldHeap unused: 6765
-Program counter: 0x239d50 (gen_server:loop/6 + 52)
-CP: 0x225860 (proc_lib:init_p/5 + 164)
-arity = 0
-=proc:<0.41.0>
-State: Waiting
-Name: websup
-Spawned as: proc_lib:init_p/5
-Spawned by: <0.33.0>
-Started: Wed Apr 21 13:22:17 2004
-Message queue length: 0
-Number of heap fragments: 0
-Heap fragment data: 0
-Link list: [<0.48.0>,<0.33.0>]
-Reductions: 118
-Stack+heap: 233
-OldHeap: 233
-Heap unused: 205
-OldHeap unused: 233
-Program counter: 0x239d50 (gen_server:loop/6 + 52)
-CP: 0x225860 (proc_lib:init_p/5 + 164)
-arity = 0
-=proc:<0.43.0>
-State: Waiting
-Name: httpd_sup__127_0_0_1__8888
-Spawned as: proc_lib:init_p/5
-Spawned by: <0.33.0>
-Started: Wed Apr 21 13:22:17 2004
-Message queue length: 0
-Number of heap fragments: 0
-Heap fragment data: 0
-Link list: [<0.46.0>,<0.45.0>,<0.44.0>]
-Reductions: 1220
-Stack+heap: 6765
-OldHeap: 0
-Heap unused: 277
-OldHeap unused: 0
-Program counter: 0x239d50 (gen_server:loop/6 + 52)
-CP: 0x225860 (proc_lib:init_p/5 + 164)
-arity = 0
-=proc:<0.44.0>
-State: Waiting
-Name: httpd_acc_sup__127_0_0_1__8888
-Spawned as: proc_lib:init_p/5
-Spawned by: <0.43.0>
-Started: Wed Apr 21 13:22:17 2004
-Message queue length: 0
-Number of heap fragments: 0
-Heap fragment data: 0
-Link list: [<0.47.0>,<0.43.0>]
-Reductions: 147
-Stack+heap: 233
-OldHeap: 233
-Heap unused: 77
-OldHeap unused: 233
-Program counter: 0x239d50 (gen_server:loop/6 + 52)
-CP: 0x225860 (proc_lib:init_p/5 + 164)
-arity = 0
-=proc:<0.45.0>
-State: Waiting
-Name: httpd_misc_sup__127_0_0_1__8888
-Spawned as: proc_lib:init_p/5
-Spawned by: <0.43.0>
-Started: Wed Apr 21 13:22:17 2004
-Message queue length: 0
-Number of heap fragments: 0
-Heap fragment data: 0
-Link list: [<0.43.0>]
-Reductions: 52
-Stack+heap: 233
-OldHeap: 0
-Heap unused: 80
-OldHeap unused: 0
-Program counter: 0x239d50 (gen_server:loop/6 + 52)
-CP: 0x225860 (proc_lib:init_p/5 + 164)
-arity = 0
-=proc:<0.46.0>
-State: Waiting
-Name: httpd__127_0_0_1__8888
-Spawned as: proc_lib:init_p/5
-Spawned by: <0.43.0>
-Started: Wed Apr 21 13:22:17 2004
-Message queue length: 0
-Number of heap fragments: 0
-Heap fragment data: 0
-Link list: [<0.43.0>]
-Reductions: 2905
-Stack+heap: 6765
-OldHeap: 10946
-Heap unused: 138
-OldHeap unused: 10946
-Program counter: 0x239d50 (gen_server:loop/6 + 52)
-CP: 0x225860 (proc_lib:init_p/5 + 164)
-arity = 0
-=proc:<0.47.0>
-State: Waiting
-Spawned as: proc_lib:init_p/5
-Spawned by: <0.44.0>
-Started: Wed Apr 21 13:22:18 2004
-Message queue length: 0
-Number of heap fragments: 0
-Heap fragment data: 0
-Link list: [#Port<0.161>,#Port<0.141>,<0.44.0>]
-Reductions: 874
-Stack+heap: 233
-OldHeap: 233
-Heap unused: 190
-OldHeap unused: 233
-Program counter: 0x1fe798 (prim_inet:accept0/2 + 96)
-CP: 0x1feb04 (prim_inet:async_accept/2 + 380)
-arity = 0
-=proc:<0.48.0>
-State: Waiting
-Name: crashdump_viewer_server
-Spawned as: proc_lib:init_p/5
-Spawned by: <0.41.0>
-Started: Wed Apr 21 13:22:18 2004
-Message queue length: 0
-Number of heap fragments: 0
-Heap fragment data: 0
-Link list: [<0.56.0>,<0.41.0>]
-Reductions: 1913
-Stack+heap: 987
-OldHeap: 987
-Heap unused: 524
-OldHeap unused: 987
-Program counter: 0x239d50 (gen_server:loop/6 + 52)
-CP: 0x225860 (proc_lib:init_p/5 + 164)
-arity = 0
-=proc:<0.49.0>
-State: Waiting
-Spawned as: erlang:apply/2
-Spawned by: <0.25.0>
-Started: Wed Apr 21 13:22:18 2004
-Message queue length: 0
-Number of heap fragments: 0
-Heap fragment data: 0
-Link list: [{to,<0.22.0>,#Ref<0.0.0.307>},<0.25.0>]
-Reductions: 15
-Stack+heap: 233
-OldHeap: 0
-Heap unused: 190
-OldHeap unused: 0
-Program counter: 0x301d58 (io:wait_io_mon_reply/2 + 28)
-CP: 0x30174c (io:parse_erl_exprs/3 + 92)
-arity = 0
-=proc:<0.56.0>
-State: Garbing
-Spawned as: erlang:apply/2
-Last scheduled in for: erlang:garbage_collect/0
-Spawned by: <0.48.0>
-Started: Wed Apr 21 13:22:27 2004
-Message queue length: 0
-Number of heap fragments: 1
-Heap fragment data: 121
-Link list: [#Port<0.158>,#Port<0.157>,<0.48.0>]
-Reductions: 2420470
-Stack+heap: 121393
-OldHeap: 0
-Heap unused: 22172
-OldHeap unused: 0
-New heap start: FE5768E0
-New heap top: FE5D7734
-Stack top: FE5ED130
-Stack end: FE5ED1A4
-Old heap start: 0
-Old heap top: 0
-Old heap end: 0
-Program counter: 0x1a4980 (unknown function)
-CP: 0x20710c (prim_file:read/2 + 436)
-=port:#Port<0.1>
-Slot: 1
-Connected: #Port<0.0>
-Port controls linked-in driver: async
-=port:#Port<0.2>
-Slot: 2
-Connected: <0.2.0>
-Links: <0.2.0>
-Port controls linked-in driver: efile
-=port:#Port<0.4>
-Slot: 4
-Connected: <0.16.0>
-Links: <0.16.0>
-Port controls linked-in driver: efile
-=port:#Port<0.72>
-Slot: 72
-Connected: <0.20.0>
-Links: <0.20.0>
-Port controls linked-in driver: tty_sl -c -e
-=port:#Port<0.105>
-Slot: 105
-Connected: <0.32.0>
-Links: <0.32.0>
-Port controls external process: inet_gethost 4
-=port:#Port<0.141>
-Slot: 141
-Connected: <0.47.0>
-Links: <0.47.0>
-Port controls linked-in driver: tcp_inet
-=port:#Port<0.157>
-Slot: 157
-Connected: <0.56.0>
-Links: <0.56.0>
-Port controls linked-in driver: efile
-=port:#Port<0.158>
-Slot: 158
-Connected: <0.56.0>
-Links: <0.56.0>
-Port controls linked-in driver: efile
-=port:#Port<0.161>
-Slot: 161
-Connected: <0.47.0>
-Links: <0.47.0>
-Port controls linked-in driver: tcp_inet
-=ets:<0.18.0>
-Slot: 9
-Table: 9
-Name: code
-Buckets: 256
-Objects: 289
-Words: 14108
-=ets:<0.18.0>
-Slot: 10
-Table: 10
-Name: code_names
-Buckets: 256
-Objects: 47
-Words: 4334
-=ets:<0.32.0>
-Slot: 11
-Table: 11
-Name: ign_requests
-Buckets: 256
-Objects: 0
-Words: 277
-=ets:<0.32.0>
-Slot: 12
-Table: 12
-Name: ign_req_index
-Buckets: 256
-Objects: 0
-Words: 277
-=ets:<0.33.0>
-Slot: 13
-Table: 13
-Name: app_data
-Buckets: 256
-Objects: 7
-Words: 952
-=ets:<0.46.0>
-Slot: 15
-Table: 15
-Name: httpd_mime__127_0_0_1__8888
-Buckets: 256
-Objects: 105
-Words: 5742
-=ets:<0.11.0>
-Slot: 84
-Table: global_names
-Name: global_names
-Buckets: 256
-Objects: 0
-Words: 277
-=ets:<0.11.0>
-Slot: 95
-Table: global_locks
-Name: global_locks
-Buckets: 256
-Objects: 0
-Words: 277
-=ets:<0.11.0>
-Slot: 96
-Table: global_names_ext
-Name: global_names_ext
-Buckets: 256
-Objects: 0
-Words: 277
-=ets:<0.14.0>
-Slot: 316
-Table: inet_cache
-Name: inet_cache
-Buckets: 256
-Objects: 0
-Words: 277
-=ets:<0.48.0>
-Slot: 340
-Table: cdv_menu_table
-Name: cdv_menu_table
-Buckets: 256
-Objects: 0
-Words: 277
-=ets:<0.48.0>
-Slot: 341
-Table: cdv_dump_index_table
-Name: cdv_dump_index_table
-Buckets: 256
-Objects: 0
-Words: 277
-=ets:<0.48.0>
-Slot: 342
-Table: cdv_decode_heap_table
-Name: cdv_decode_heap_table
-Buckets: 256
-Objects: 0
-Words: 277
-=ets:<0.16.0>
-Slot: 780
-Table: file_io_servers
-Name: file_io_servers
-Buckets: 256
-Objects: 0
-Words: 277
-=ets:<0.46.0>
-Slot: 984
-Table: httpd_conf__127_0_0_1__8888
-Name: httpd_conf__127_0_0_1__8888
-Buckets: 256
-Objects: 17
-Words: 1176
-=ets:<0.14.0>
-Slot: 1342
-Table: inet_hosts
-Name: inet_hosts
-Buckets: 256
-Objects: 4
-Words: 421
-=ets:<0.14.0>
-Slot: 1362
-Table: inet_db
-Name: inet_db
-Buckets: 256
-Objects: 20
-Words: 671
-=ets:<0.5.0>
-Slot: 1655
-Table: ac_tab
-Name: ac_tab
-Buckets: 256
-Objects: 6
-Words: 843
-=timer:<0.14.0>
-Message: refresh_timeout
-Time left: 3565692 ms
-=node:'nonode@nohost'
-=no_distribution
-=loaded_modules
-Current code: 1968915
-Old code: 0
-=mod:otp_ring0
-Current size: 489
-=mod:init
-Current size: 30110
-=mod:prim_inet
-Current size: 35532
-=mod:prim_file
-Current size: 24965
-=mod:erl_prim_loader
-Current size: 19607
-=mod:erlang
-Current size: 11137
-=mod:error_handler
-Current size: 2389
-Current attributes: 836C00000001680264000376736E6C000000016E100030769A34345F26EF6D3433254FF2AE576A6A
-Current compilation info: 836C0000000468026400076F7074696F6E736C0000000568026400036377646B00222F636C656172636173652F6F74702F657274732F6C69622F6B65726E656C2F73726368026400066F75746469726B002A2F636C656172636173652F6F74702F657274732F6C69622F6B65726E656C2F7372632F2E2E2F6562696E6802640001696B002D2F636C656172636173652F6F74702F657274732F6C69622F6B65726E656C2F7372632F2E2E2F696E636C75646564000A64656275675F696E666F6400107761726E5F756E757365645F766172736A680264000776657273696F6E6B0005342E322E31680264000474696D65680662000007D3610C6112610B613161216802640006736F757263656B00342F636C656172636173652F6F74702F657274732F6C69622F6B65726E656C2F7372632F6572726F725F68616E646C65722E65726C6A
-=mod:heart
-Current size: 6687
-Current attributes: 836C00000001680264000376736E6C000000016E10003094F7BECF345494DDBB4D7186E694186A6A
-Current compilation info: 836C0000000468026400076F7074696F6E736C0000000568026400036377646B00222F636C656172636173652F6F74702F657274732F6C69622F6B65726E656C2F73726368026400066F75746469726B002A2F636C656172636173652F6F74702F657274732F6C69622F6B65726E656C2F7372632F2E2E2F6562696E6802640001696B002D2F636C656172636173652F6F74702F657274732F6C69622F6B65726E656C2F7372632F2E2E2F696E636C75646564000A64656275675F696E666F6400107761726E5F756E757365645F766172736A680264000776657273696F6E6B0005342E322E31680264000474696D65680662000007D3610C6112610B613261086802640006736F757263656B002C2F636C656172636173652F6F74702F657274732F6C69622F6B65726E656C2F7372632F68656172742E65726C6A
-=mod:error_logger
-Current size: 7051
-Current attributes: 836C00000001680264000376736E6C000000016E10004E3347F841DEAE2EB6A74389E6E127146A6A
-Current compilation info: 836C0000000468026400076F7074696F6E736C0000000568026400036377646B00222F636C656172636173652F6F74702F657274732F6C69622F6B65726E656C2F73726368026400066F75746469726B002A2F636C656172636173652F6F74702F657274732F6C69622F6B65726E656C2F7372632F2E2E2F6562696E6802640001696B002D2F636C656172636173652F6F74702F657274732F6C69622F6B65726E656C2F7372632F2E2E2F696E636C75646564000A64656275675F696E666F6400107761726E5F756E757365645F766172736A680264000776657273696F6E6B0005342E322E31680264000474696D65680662000007D3610C6112610B613161246802640006736F757263656B00332F636C656172636173652F6F74702F657274732F6C69622F6B65726E656C2F7372632F6572726F725F6C6F676765722E65726C6A
-=mod:gen_event
-Current size: 18288
-Current attributes: 836C00000001680264000376736E6C000000016E1000336F22DF1EA75E0EA4AE65D3B8C34F946A6A
-Current compilation info: 836C0000000468026400076F7074696F6E736C0000000768026400036377646B00222F636C656172636173652F6F74702F657274732F6C69622F7374646C69622F73726368026400066F75746469726B002A2F636C656172636173652F6F74702F657274732F6C69622F7374646C69622F7372632F2E2E2F6562696E6802640001696B002D2F636C656172636173652F6F74702F657274732F6C69622F7374646C69622F7372632F2E2E2F696E636C7564656802640001696B00372F636C656172636173652F6F74702F657274732F6C69622F7374646C69622F7372632F2E2E2F2E2E2F6B65726E656C2F696E636C7564656400107761726E5F756E757365645F7661727364000A64656275675F696E666F6400107761726E5F756E757365645F766172736A680264000776657273696F6E6B0005342E322E31680264000474696D65680662000007D3610C6112610B612D61346802640006736F757263656B00302F636C656172636173652F6F74702F657274732F6C69622F7374646C69622F7372632F67656E5F6576656E742E65726C6A
-=mod:gen
-Current size: 7129
-Current attributes: 836C00000001680264000376736E6C000000016E10007BE6AEB66EF48D8B33323C89C9936A526A6A
-Current compilation info: 836C0000000468026400076F7074696F6E736C0000000768026400036377646B00222F636C656172636173652F6F74702F657274732F6C69622F7374646C69622F73726368026400066F75746469726B002A2F636C656172636173652F6F74702F657274732F6C69622F7374646C69622F7372632F2E2E2F6562696E6802640001696B002D2F636C656172636173652F6F74702F657274732F6C69622F7374646C69622F7372632F2E2E2F696E636C7564656802640001696B00372F636C656172636173652F6F74702F657274732F6C69622F7374646C69622F7372632F2E2E2F2E2E2F6B65726E656C2F696E636C7564656400107761726E5F756E757365645F7661727364000A64656275675F696E666F6400107761726E5F756E757365645F766172736A680264000776657273696F6E6B0005342E322E31680264000474696D65680662000007D3610C6112610B612D61316802640006736F757263656B002A2F636C656172636173652F6F74702F657274732F6C69622F7374646C69622F7372632F67656E2E65726C6A
-=mod:proc_lib
-Current size: 11658
-Current attributes: 836C00000001680264000376736E6C000000016E10005C589A8C9BD2E1F2E895E765CAE983406A6A
-Current compilation info: 836C0000000468026400076F7074696F6E736C0000000768026400036377646B00222F636C656172636173652F6F74702F657274732F6C69622F7374646C69622F73726368026400066F75746469726B002A2F636C656172636173652F6F74702F657274732F6C69622F7374646C69622F7372632F2E2E2F6562696E6802640001696B002D2F636C656172636173652F6F74702F657274732F6C69622F7374646C69622F7372632F2E2E2F696E636C7564656802640001696B00372F636C656172636173652F6F74702F657274732F6C69622F7374646C69622F7372632F2E2E2F2E2E2F6B65726E656C2F696E636C7564656400107761726E5F756E757365645F7661727364000A64656275675F696E666F6400107761726E5F756E757365645F766172736A680264000776657273696F6E6B0005342E322E31680264000474696D65680662000007D3610C6112610B612E612D6802640006736F757263656B002F2F636C656172636173652F6F74702F657274732F6C69622F7374646C69622F7372632F70726F635F6C69622E65726C6A
-=mod:application_controller
-Current size: 55249
-Current attributes: 836C00000002680264000376736E6C000000016E10003372E1AB0410565065FA086086A721316A68026400096265686176696F75726C0000000164000A67656E5F7365727665726A6A
-Current compilation info: 836C0000000468026400076F7074696F6E736C0000000568026400036377646B00222F636C656172636173652F6F74702F657274732F6C69622F6B65726E656C2F73726368026400066F75746469726B002A2F636C656172636173652F6F74702F657274732F6C69622F6B65726E656C2F7372632F2E2E2F6562696E6802640001696B002D2F636C656172636173652F6F74702F657274732F6C69622F6B65726E656C2F7372632F2E2E2F696E636C75646564000A64656275675F696E666F6400107761726E5F756E757365645F766172736A680264000776657273696F6E6B0005342E322E31680264000474696D65680662000007D3610C6112610B613061246802640006736F757263656B003D2F636C656172636173652F6F74702F657274732F6C69622F6B65726E656C2F7372632F6170706C69636174696F6E5F636F6E74726F6C6C65722E65726C6A
-=mod:gen_server
-Current size: 18728
-Current attributes: 836C00000001680264000376736E6C000000016E10004C5E93533036DAC7698FC4112F59CF236A6A
-Current compilation info: 836C0000000468026400076F7074696F6E736C0000000768026400036377646B00222F636C656172636173652F6F74702F657274732F6C69622F7374646C69622F73726368026400066F75746469726B002A2F636C656172636173652F6F74702F657274732F6C69622F7374646C69622F7372632F2E2E2F6562696E6802640001696B002D2F636C656172636173652F6F74702F657274732F6C69622F7374646C69622F7372632F2E2E2F696E636C7564656802640001696B00372F636C656172636173652F6F74702F657274732F6C69622F7374646C69622F7372632F2E2E2F2E2E2F6B65726E656C2F696E636C7564656400107761726E5F756E757365645F7661727364000A64656275675F696E666F6400107761726E5F756E757365645F766172736A680264000776657273696F6E6B0005342E322E31680264000474696D65680662000007D3610C6112610B612D61396802640006736F757263656B00312F636C656172636173652F6F74702F657274732F6C69622F7374646C69622F7372632F67656E5F7365727665722E65726C6A
-=mod:sys
-Current size: 11589
-Current attributes: 836C00000001680264000376736E6C000000016E1000E12B0E8267551204BD5924BAB9629ADF6A6A
-Current compilation info: 836C0000000468026400076F7074696F6E736C0000000768026400036377646B00222F636C656172636173652F6F74702F657274732F6C69622F7374646C69622F73726368026400066F75746469726B002A2F636C656172636173652F6F74702F657274732F6C69622F7374646C69622F7372632F2E2E2F6562696E6802640001696B002D2F636C656172636173652F6F74702F657274732F6C69622F7374646C69622F7372632F2E2E2F696E636C7564656802640001696B00372F636C656172636173652F6F74702F657274732F6C69622F7374646C69622F7372632F2E2E2F2E2E2F6B65726E656C2F696E636C7564656400107761726E5F756E757365645F7661727364000A64656275675F696E666F6400107761726E5F756E757365645F766172736A680264000776657273696F6E6B0005342E322E31680264000474696D65680662000007D3610C6112610B612F61176802640006736F757263656B002A2F636C656172636173652F6F74702F657274732F6C69622F7374646C69622F7372632F7379732E65726C6A
-=mod:lists
-Current size: 18638
-Current attributes: 836C00000002680264000376736E6C000000016E10001E95B32C30E4CDAF0BDD1ABA58CBB5F36A680264000A646570726563617465646C0000000B68026400066B65796D617061046802640003616C6C61036802640003616E79610368026400036D617061036802640007666C61746D617061036802640005666F6C646C61046802640005666F6C64726104680264000666696C746572610368026400086D6170666F6C646C610468026400086D6170666F6C647261046802640007666F726561636861036A6A
-Current compilation info: 836C0000000468026400076F7074696F6E736C0000000768026400036377646B00222F636C656172636173652F6F74702F657274732F6C69622F7374646C69622F73726368026400066F75746469726B002A2F636C656172636173652F6F74702F657274732F6C69622F7374646C69622F7372632F2E2E2F6562696E6802640001696B002D2F636C656172636173652F6F74702F657274732F6C69622F7374646C69622F7372632F2E2E2F696E636C7564656802640001696B00372F636C656172636173652F6F74702F657274732F6C69622F7374646C69622F7372632F2E2E2F2E2E2F6B65726E656C2F696E636C7564656400107761726E5F756E757365645F7661727364000A64656275675F696E666F6400107761726E5F756E757365645F766172736A680264000776657273696F6E6B0005342E322E31680264000474696D65680662000007D3610C6112610B612E61116802640006736F757263656B002C2F636C656172636173652F6F74702F657274732F6C69622F7374646C69622F7372632F6C697374732E65726C6A
-=mod:application
-Current size: 2666
-Current attributes: 836C00000001680264000376736E6C000000016E1000C0C5A7B67B306300FEFF9D91AA50ECB36A6A
-Current compilation info: 836C0000000468026400076F7074696F6E736C0000000568026400036377646B00222F636C656172636173652F6F74702F657274732F6C69622F6B65726E656C2F73726368026400066F75746469726B002A2F636C656172636173652F6F74702F657274732F6C69622F6B65726E656C2F7372632F2E2E2F6562696E6802640001696B002D2F636C656172636173652F6F74702F657274732F6C69622F6B65726E656C2F7372632F2E2E2F696E636C75646564000A64656275675F696E666F6400107761726E5F756E757365645F766172736A680264000776657273696F6E6B0005342E322E31680264000474696D65680662000007D3610C6112610B6130611F6802640006736F757263656B00322F636C656172636173652F6F74702F657274732F6C69622F6B65726E656C2F7372632F6170706C69636174696F6E2E65726C6A
-=mod:application_master
-Current size: 10912
-Current attributes: 836C00000001680264000376736E6C000000016E1000360420F5CEB80AD7DD51B3A8A0E2AFA26A6A
-Current compilation info: 836C0000000468026400076F7074696F6E736C0000000568026400036377646B00222F636C656172636173652F6F74702F657274732F6C69622F6B65726E656C2F73726368026400066F75746469726B002A2F636C656172636173652F6F74702F657274732F6C69622F6B65726E656C2F7372632F2E2E2F6562696E6802640001696B002D2F636C656172636173652F6F74702F657274732F6C69622F6B65726E656C2F7372632F2E2E2F696E636C75646564000A64656275675F696E666F6400107761726E5F756E757365645F766172736A680264000776657273696F6E6B0005342E322E31680264000474696D65680662000007D3610C6112610B613061266802640006736F757263656B00392F636C656172636173652F6F74702F657274732F6C69622F6B65726E656C2F7372632F6170706C69636174696F6E5F6D61737465722E65726C6A
-=mod:kernel
-Current size: 7639
-Current attributes: 836C00000002680264000376736E6C000000016E10004D418ACCB0F948D4D3CA6B9A81B462746A68026400096265686176696F75726C0000000164000A73757065727669736F726A6A
-Current compilation info: 836C0000000468026400076F7074696F6E736C0000000568026400036377646B00222F636C656172636173652F6F74702F657274732F6C69622F6B65726E656C2F73726368026400066F75746469726B002A2F636C656172636173652F6F74702F657274732F6C69622F6B65726E656C2F7372632F2E2E2F6562696E6802640001696B002D2F636C656172636173652F6F74702F657274732F6C69622F6B65726E656C2F7372632F2E2E2F696E636C75646564000A64656275675F696E666F6400107761726E5F756E757365645F766172736A680264000776657273696F6E6B0005342E322E31680264000474696D65680662000007D3610C6112610B613261336802640006736F757263656B002D2F636C656172636173652F6F74702F657274732F6C69622F6B65726E656C2F7372632F6B65726E656C2E65726C6A
-=mod:supervisor
-Current size: 24469
-Current attributes: 836C00000002680264000376736E6C000000016E1000979F65727577135484BE0892A35087CC6A68026400096265686176696F75726C0000000164000A67656E5F7365727665726A6A
-Current compilation info: 836C0000000468026400076F7074696F6E736C0000000768026400036377646B00222F636C656172636173652F6F74702F657274732F6C69622F7374646C69622F73726368026400066F75746469726B002A2F636C656172636173652F6F74702F657274732F6C69622F7374646C69622F7372632F2E2E2F6562696E6802640001696B002D2F636C656172636173652F6F74702F657274732F6C69622F7374646C69622F7372632F2E2E2F696E636C7564656802640001696B00372F636C656172636173652F6F74702F657274732F6C69622F7374646C69622F7372632F2E2E2F2E2E2F6B65726E656C2F696E636C7564656400107761726E5F756E757365645F7661727364000A64656275675F696E666F6400107761726E5F756E757365645F766172736A680264000776657273696F6E6B0005342E322E31680264000474696D65680662000007D3610C6112610B612F61126802640006736F757263656B00312F636C656172636173652F6F74702F657274732F6C69622F7374646C69622F7372632F73757065727669736F722E65726C6A
-=mod:rpc
-Current size: 14539
-Current attributes: 836C00000002680264000376736E6C000000016E10008C5D6242D36B3201E3B11E82D5E1581E6A68026400096265686176696F75726C0000000164000A67656E5F7365727665726A6A
-Current compilation info: 836C0000000468026400076F7074696F6E736C0000000568026400036377646B00222F636C656172636173652F6F74702F657274732F6C69622F6B65726E656C2F73726368026400066F75746469726B002A2F636C656172636173652F6F74702F657274732F6C69622F6B65726E656C2F7372632F2E2E2F6562696E6802640001696B002D2F636C656172636173652F6F74702F657274732F6C69622F6B65726E656C2F7372632F2E2E2F696E636C75646564000A64656275675F696E666F6400107761726E5F756E757365645F766172736A680264000776657273696F6E6B0005342E322E31680264000474696D65680662000007D3610C6112610B6133610F6802640006736F757263656B002A2F636C656172636173652F6F74702F657274732F6C69622F6B65726E656C2F7372632F7270632E65726C6A
-=mod:gb_trees
-Current size: 8274
-Current attributes: 836C00000001680264000376736E6C000000016E1000094BEFDE7B866EF2CB6FCD895AC2EE056A6A
-Current compilation info: 836C0000000468026400076F7074696F6E736C0000000768026400036377646B00222F636C656172636173652F6F74702F657274732F6C69622F7374646C69622F73726368026400066F75746469726B002A2F636C656172636173652F6F74702F657274732F6C69622F7374646C69622F7372632F2E2E2F6562696E6802640001696B002D2F636C656172636173652F6F74702F657274732F6C69622F7374646C69622F7372632F2E2E2F696E636C7564656802640001696B00372F636C656172636173652F6F74702F657274732F6C69622F7374646C69622F7372632F2E2E2F2E2E2F6B65726E656C2F696E636C7564656400107761726E5F756E757365645F7661727364000A64656275675F696E666F6400107761726E5F756E757365645F766172736A680264000776657273696F6E6B0005342E322E31680264000474696D65680662000007D3610C6112610B612D612B6802640006736F757263656B002F2F636C656172636173652F6F74702F657274732F6C69622F7374646C69622F7372632F67625F74726565732E65726C6A
-=mod:global
-Current size: 40753
-Current attributes: 836C00000002680264000376736E6C000000016E10001D02C89BDE6CB2052F099894683C14CA6A68026400096265686176696F75726C0000000164000A67656E5F7365727665726A6A
-Current compilation info: 836C0000000468026400076F7074696F6E736C0000000568026400036377646B00222F636C656172636173652F6F74702F657274732F6C69622F6B65726E656C2F73726368026400066F75746469726B002A2F636C656172636173652F6F74702F657274732F6C69622F6B65726E656C2F7372632F2E2E2F6562696E6802640001696B002D2F636C656172636173652F6F74702F657274732F6C69622F6B65726E656C2F7372632F2E2E2F696E636C75646564000A64656275675F696E666F6400107761726E5F756E757365645F766172736A680264000776657273696F6E6B0005342E322E31680264000474696D65680662000007D3610C6112610B613161386802640006736F757263656B002D2F636C656172636173652F6F74702F657274732F6C69622F6B65726E656C2F7372632F676C6F62616C2E65726C6A
-=mod:inet_db
-Current size: 34555
-Current attributes: 836C00000001680264000376736E6C000000016E1000C1CF6A6F2E83D4EBC23D2CCECBF376226A6A
-Current compilation info: 836C0000000468026400076F7074696F6E736C0000000568026400036377646B00222F636C656172636173652F6F74702F657274732F6C69622F6B65726E656C2F73726368026400066F75746469726B002A2F636C656172636173652F6F74702F657274732F6C69622F6B65726E656C2F7372632F2E2E2F6562696E6802640001696B002D2F636C656172636173652F6F74702F657274732F6C69622F6B65726E656C2F7372632F2E2E2F696E636C75646564000A64656275675F696E666F6400107761726E5F756E757365645F766172736A680264000776657273696F6E6B0005342E322E31680264000474696D65680662000007D3610C6112610B6132611A6802640006736F757263656B002E2F636C656172636173652F6F74702F657274732F6C69622F6B65726E656C2F7372632F696E65745F64622E65726C6A
-=mod:inet_config
-Current size: 13575
-Current attributes: 836C00000001680264000376736E6C000000016E1000650F6571C03BC9C16BB7973A747565066A6A
-Current compilation info: 836C0000000468026400076F7074696F6E736C0000000568026400036377646B00222F636C656172636173652F6F74702F657274732F6C69622F6B65726E656C2F73726368026400066F75746469726B002A2F636C656172636173652F6F74702F657274732F6C69622F6B65726E656C2F7372632F2E2E2F6562696E6802640001696B002D2F636C656172636173652F6F74702F657274732F6C69622F6B65726E656C2F7372632F2E2E2F696E636C75646564000A64656275675F696E666F6400107761726E5F756E757365645F766172736A680264000776657273696F6E6B0005342E322E31680264000474696D65680662000007D3610C6112610B613261166802640006736F757263656B00322F636C656172636173652F6F74702F657274732F6C69622F6B65726E656C2F7372632F696E65745F636F6E6669672E65726C6A
-=mod:os
-Current size: 5997
-Current attributes: 836C00000001680264000376736E6C000000016E100017144CD766A604A9DFBA0B58C8FCA78B6A6A
-Current compilation info: 836C0000000468026400076F7074696F6E736C0000000568026400036377646B00222F636C656172636173652F6F74702F657274732F6C69622F6B65726E656C2F73726368026400066F75746469726B002A2F636C656172636173652F6F74702F657274732F6C69622F6B65726E656C2F7372632F2E2E2F6562696E6802640001696B002D2F636C656172636173652F6F74702F657274732F6C69622F6B65726E656C2F7372632F2E2E2F696E636C75646564000A64656275675F696E666F6400107761726E5F756E757365645F766172736A680264000776657273696F6E6B0005342E322E31680264000474696D65680662000007D3610C6112610B613361056802640006736F757263656B00292F636C656172636173652F6F74702F657274732F6C69622F6B65726E656C2F7372632F6F732E65726C6A
-=mod:inet_udp
-Current size: 2451
-Current attributes: 836C00000001680264000376736E6C000000016E1000ACB163E87A687A6683B50B331C6E289B6A6A
-Current compilation info: 836C0000000468026400076F7074696F6E736C0000000568026400036377646B00222F636C656172636173652F6F74702F657274732F6C69622F6B65726E656C2F73726368026400066F75746469726B002A2F636C656172636173652F6F74702F657274732F6C69622F6B65726E656C2F7372632F2E2E2F6562696E6802640001696B002D2F636C656172636173652F6F74702F657274732F6C69622F6B65726E656C2F7372632F2E2E2F696E636C75646564000A64656275675F696E666F6400107761726E5F756E757365645F766172736A680264000776657273696F6E6B0005342E322E31680264000474696D65680662000007D3610C6112610B613261306802640006736F757263656B002F2F636C656172636173652F6F74702F657274732F6C69622F6B65726E656C2F7372632F696E65745F7564702E65726C6A
-=mod:inet
-Current size: 28288
-Current attributes: 836C00000001680264000376736E6C000000016E10009B9AD400F0BAF6AAF17A4788A4EFF11E6A6A
-Current compilation info: 836C0000000468026400076F7074696F6E736C0000000568026400036377646B00222F636C656172636173652F6F74702F657274732F6C69622F6B65726E656C2F73726368026400066F75746469726B002A2F636C656172636173652F6F74702F657274732F6C69622F6B65726E656C2F7372632F2E2E2F6562696E6802640001696B002D2F636C656172636173652F6F74702F657274732F6C69622F6B65726E656C2F7372632F2E2E2F696E636C75646564000A64656275675F696E666F6400107761726E5F756E757365645F766172736A680264000776657273696F6E6B0005342E322E31680264000474696D65680662000007D3610C6112610B6132610C6802640006736F757263656B002B2F636C656172636173652F6F74702F657274732F6C69622F6B65726E656C2F7372632F696E65742E65726C6A
-=mod:inet_parse
-Current size: 21928
-Current attributes: 836C00000001680264000376736E6C000000016E1000E0E65454C096847749930EDC1C53C80B6A6A
-Current compilation info: 836C0000000468026400076F7074696F6E736C0000000568026400036377646B00222F636C656172636173652F6F74702F657274732F6C69622F6B65726E656C2F73726368026400066F75746469726B002A2F636C656172636173652F6F74702F657274732F6C69622F6B65726E656C2F7372632F2E2E2F6562696E6802640001696B002D2F636C656172636173652F6F74702F657274732F6C69622F6B65726E656C2F7372632F2E2E2F696E636C75646564000A64656275675F696E666F6400107761726E5F756E757365645F766172736A680264000776657273696F6E6B0005342E322E31680264000474696D65680662000007D3610C6112610B613261266802640006736F757263656B00312F636C656172636173652F6F74702F657274732F6C69622F6B65726E656C2F7372632F696E65745F70617273652E65726C6A
-=mod:filename
-Current size: 17411
-Current attributes: 836C00000001680264000376736E6C000000016E100068085214F459D51A3E08819BF8D7698A6A6A
-Current compilation info: 836C0000000468026400076F7074696F6E736C0000000768026400036377646B00222F636C656172636173652F6F74702F657274732F6C69622F7374646C69622F73726368026400066F75746469726B002A2F636C656172636173652F6F74702F657274732F6C69622F7374646C69622F7372632F2E2E2F6562696E6802640001696B002D2F636C656172636173652F6F74702F657274732F6C69622F7374646C69622F7372632F2E2E2F696E636C7564656802640001696B00372F636C656172636173652F6F74702F657274732F6C69622F7374646C69622F7372632F2E2E2F2E2E2F6B65726E656C2F696E636C7564656400107761726E5F756E757365645F7661727364000A64656275675F696E666F6400107761726E5F756E757365645F766172736A680264000776657273696F6E6B0005342E322E31680264000474696D65680662000007D3610C6112610B612D61296802640006736F757263656B002F2F636C656172636173652F6F74702F657274732F6C69622F7374646C69622F7372632F66696C656E616D652E65726C6A
-=mod:inet_hosts
-Current size: 3745
-Current attributes: 836C00000001680264000376736E6C000000016E1000E7430304E86230057150DEE5D279881F6A6A
-Current compilation info: 836C0000000468026400076F7074696F6E736C0000000568026400036377646B00222F636C656172636173652F6F74702F657274732F6C69622F6B65726E656C2F73726368026400066F75746469726B002A2F636C656172636173652F6F74702F657274732F6C69622F6B65726E656C2F7372632F2E2E2F6562696E6802640001696B002D2F636C656172636173652F6F74702F657274732F6C69622F6B65726E656C2F7372632F2E2E2F696E636C75646564000A64656275675F696E666F6400107761726E5F756E757365645F766172736A680264000776657273696F6E6B0005342E322E31680264000474696D65680662000007D3610C6112610B613261226802640006736F757263656B00312F636C656172636173652F6F74702F657274732F6C69622F6B65726E656C2F7372632F696E65745F686F7374732E65726C6A
-=mod:erl_distribution
-Current size: 2512
-Current attributes: 836C00000002680264000376736E6C000000016E1000CDE49D63ACA767E0D49679657E99D2046A68026400096265686176696F75726C0000000164000A73757065727669736F726A6A
-Current compilation info: 836C0000000468026400076F7074696F6E736C0000000568026400036377646B00222F636C656172636173652F6F74702F657274732F6C69622F6B65726E656C2F73726368026400066F75746469726B002A2F636C656172636173652F6F74702F657274732F6C69622F6B65726E656C2F7372632F2E2E2F6562696E6802640001696B002D2F636C656172636173652F6F74702F657274732F6C69622F6B65726E656C2F7372632F2E2E2F696E636C75646564000A64656275675F696E666F6400107761726E5F756E757365645F766172736A680264000776657273696F6E6B0005342E322E31680264000474696D65680662000007D3610C6112610B613161186802640006736F757263656B00372F636C656172636173652F6F74702F657274732F6C69622F6B65726E656C2F7372632F65726C5F646973747269627574696F6E2E65726C6A
-=mod:global_group
-Current size: 30960
-Current attributes: 836C00000002680264000376736E6C000000016E10008ECE759E5920988CA3ACFF34B32F86736A68026400096265686176696F75726C0000000164000A67656E5F7365727665726A6A
-Current compilation info: 836C0000000468026400076F7074696F6E736C0000000568026400036377646B00222F636C656172636173652F6F74702F657274732F6C69622F6B65726E656C2F73726368026400066F75746469726B002A2F636C656172636173652F6F74702F657274732F6C69622F6B65726E656C2F7372632F2E2E2F6562696E6802640001696B002D2F636C656172636173652F6F74702F657274732F6C69622F6B65726E656C2F7372632F2E2E2F696E636C75646564000A64656275675F696E666F6400107761726E5F756E757365645F766172736A680264000776657273696F6E6B0005342E322E31680264000474696D65680662000007D3610C6112610B6131613B6802640006736F757263656B00332F636C656172636173652F6F74702F657274732F6C69622F6B65726E656C2F7372632F676C6F62616C5F67726F75702E65726C6A
-=mod:net_kernel
-Current size: 37648
-Current attributes: 836C00000002680264000376736E6C000000016E1000967CE7DE41F9B39906CCCF3225E6E5286A68026400096265686176696F75726C0000000164000A67656E5F7365727665726A6A
-Current compilation info: 836C0000000468026400076F7074696F6E736C0000000568026400036377646B00222F636C656172636173652F6F74702F657274732F6C69622F6B65726E656C2F73726368026400066F75746469726B002A2F636C656172636173652F6F74702F657274732F6C69622F6B65726E656C2F7372632F2E2E2F6562696E6802640001696B002D2F636C656172636173652F6F74702F657274732F6C69622F6B65726E656C2F7372632F2E2E2F696E636C75646564000A64656275675F696E666F6400107761726E5F756E757365645F766172736A680264000776657273696F6E6B0005342E322E31680264000474696D65680662000007D3610C6112610B613361026802640006736F757263656B00312F636C656172636173652F6F74702F657274732F6C69622F6B65726E656C2F7372632F6E65745F6B65726E656C2E65726C6A
-=mod:file_server
-Current size: 8372
-Current attributes: 836C00000002680264000376736E6C000000016E1000EF90906EC6204204AC0A77C4A25B65236A68026400096265686176696F75726C0000000164000A67656E5F7365727665726A6A
-Current compilation info: 836C0000000468026400076F7074696F6E736C0000000568026400036377646B00222F636C656172636173652F6F74702F657274732F6C69622F6B65726E656C2F73726368026400066F75746469726B002A2F636C656172636173652F6F74702F657274732F6C69622F6B65726E656C2F7372632F2E2E2F6562696E6802640001696B002D2F636C656172636173652F6F74702F657274732F6C69622F6B65726E656C2F7372632F2E2E2F696E636C75646564000A64656275675F696E666F6400107761726E5F756E757365645F766172736A680264000776657273696F6E6B0005342E322E31680264000474696D65680662000007D3610C6112610B6131612D6802640006736F757263656B00322F636C656172636173652F6F74702F657274732F6C69622F6B65726E656C2F7372632F66696C655F7365727665722E65726C6A
-=mod:old_file_server
-Current size: 3074
-Current attributes: 836C00000001680264000376736E6C000000016E1000C802085DD76D4EFBA6A8F528FECB94B36A6A
-Current compilation info: 836C0000000468026400076F7074696F6E736C0000000568026400036377646B00222F636C656172636173652F6F74702F657274732F6C69622F6B65726E656C2F73726368026400066F75746469726B002A2F636C656172636173652F6F74702F657274732F6C69622F6B65726E656C2F7372632F2E2E2F6562696E6802640001696B002D2F636C656172636173652F6F74702F657274732F6C69622F6B65726E656C2F7372632F2E2E2F696E636C75646564000A64656275675F696E666F6400107761726E5F756E757365645F766172736A680264000776657273696F6E6B0005342E322E31680264000474696D65680662000007D3610C6112610B6131612F6802640006736F757263656B00362F636C656172636173652F6F74702F657274732F6C69622F6B65726E656C2F7372632F6F6C645F66696C655F7365727665722E65726C6A
-=mod:code
-Current size: 7419
-Current attributes: 836C00000001680264000376736E6C000000016E1000AE618E3041C8E3807A3719CD5140DF5E6A6A
-Current compilation info: 836C0000000468026400076F7074696F6E736C0000000568026400036377646B00222F636C656172636173652F6F74702F657274732F6C69622F6B65726E656C2F73726368026400066F75746469726B002A2F636C656172636173652F6F74702F657274732F6C69622F6B65726E656C2F7372632F2E2E2F6562696E6802640001696B002D2F636C656172636173652F6F74702F657274732F6C69622F6B65726E656C2F7372632F2E2E2F696E636C75646564000A64656275675F696E666F6400107761726E5F756E757365645F766172736A680264000776657273696F6E6B0005342E322E31680264000474696D65680662000007D3610C6112610B6130612E6802640006736F757263656B002B2F636C656172636173652F6F74702F657274732F6C69622F6B65726E656C2F7372632F636F64652E65726C6A
-=mod:code_server
-Current size: 30811
-Current attributes: 836C00000001680264000376736E6C000000016E0F00BFB96248C2CA8601B4CB7F543F52E26A6A
-Current compilation info: 836C0000000468026400076F7074696F6E736C0000000568026400036377646B00222F636C656172636173652F6F74702F657274732F6C69622F6B65726E656C2F73726368026400066F75746469726B002A2F636C656172636173652F6F74702F657274732F6C69622F6B65726E656C2F7372632F2E2E2F6562696E6802640001696B002D2F636C656172636173652F6F74702F657274732F6C69622F6B65726E656C2F7372632F2E2E2F696E636C75646564000A64656275675F696E666F6400107761726E5F756E757365645F766172736A680264000776657273696F6E6B0005342E322E31680264000474696D65680662000007D3610C6112610B613061346802640006736F757263656B00322F636C656172636173652F6F74702F657274732F6C69622F6B65726E656C2F7372632F636F64655F7365727665722E65726C6A
-=mod:code_aux
-Current size: 1736
-Current attributes: 836C00000001680264000376736E6C000000016E10007A90DB53FCCECD52504F20E7A3B6BAE26A6A
-Current compilation info: 836C0000000468026400076F7074696F6E736C0000000568026400036377646B00222F636C656172636173652F6F74702F657274732F6C69622F6B65726E656C2F73726368026400066F75746469726B002A2F636C656172636173652F6F74702F657274732F6C69622F6B65726E656C2F7372632F2E2E2F6562696E6802640001696B002D2F636C656172636173652F6F74702F657274732F6C69622F6B65726E656C2F7372632F2E2E2F696E636C75646564000A64656275675F696E666F6400107761726E5F756E757365645F766172736A680264000776657273696F6E6B0005342E322E31680264000474696D65680662000007D3610C6112610B613061316802640006736F757263656B002F2F636C656172636173652F6F74702F657274732F6C69622F6B65726E656C2F7372632F636F64655F6175782E65726C6A
-=mod:packages
-Current size: 3119
-Current attributes: 836C00000001680264000376736E6C000000016E1000044DC8EEB65F178AE23EF2465E1954496A6A
-Current compilation info: 836C0000000468026400076F7074696F6E736C0000000568026400036377646B00222F636C656172636173652F6F74702F657274732F6C69622F6B65726E656C2F73726368026400066F75746469726B002A2F636C656172636173652F6F74702F657274732F6C69622F6B65726E656C2F7372632F2E2E2F6562696E6802640001696B002D2F636C656172636173652F6F74702F657274732F6C69622F6B65726E656C2F7372632F2E2E2F696E636C75646564000A64656275675F696E666F6400107761726E5F756E757365645F766172736A680264000776657273696F6E6B0005342E322E31680264000474696D65680662000007D3610C6112610B613361076802640006736F757263656B002F2F636C656172636173652F6F74702F657274732F6C69622F6B65726E656C2F7372632F7061636B616765732E65726C6A
-=mod:hipe_unified_loader
-Current size: 37330
-Current attributes: 836C00000001680264000376736E6C000000016E1000DABD57945702E56F4B3AA7B7B19C1D166A6A
-Current compilation info: 836C0000000468026400076F7074696F6E736C0000000568026400036377646B00222F636C656172636173652F6F74702F657274732F6C69622F6B65726E656C2F73726368026400066F75746469726B002A2F636C656172636173652F6F74702F657274732F6C69622F6B65726E656C2F7372632F2E2E2F6562696E6802640001696B002D2F636C656172636173652F6F74702F657274732F6C69622F6B65726E656C2F7372632F2E2E2F696E636C75646564000A64656275675F696E666F6400107761726E5F756E757365645F766172736A680264000776657273696F6E6B0005342E322E31680264000474696D65680662000007D3610C6112610B613361326802640006736F757263656B003A2F636C656172636173652F6F74702F657274732F6C69622F6B65726E656C2F7372632F686970655F756E69666965645F6C6F616465722E65726C6A
-=mod:hipe_sparc_loader
-Current size: 1821
-Current attributes: 836C00000001680264000376736E6C000000016E1000582BC55E9FADFF879C2C45D25A6CB7E56A6A
-Current compilation info: 836C0000000468026400076F7074696F6E736C0000000868026400036377646B00222F636C656172636173652F6F74702F657274732F6C69622F6B65726E656C2F73726368026400066F75746469726B002A2F636C656172636173652F6F74702F657274732F6C69622F6B65726E656C2F7372632F2E2E2F6562696E6802640001696B002D2F636C656172636173652F6F74702F657274732F6C69622F6B65726E656C2F7372632F2E2E2F696E636C7564656802640001696B00322F636C656172636173652F6F74702F657274732F6C69622F6B65726E656C2F7372632F2E2E2F2E2E2F686970652F6D61696E6802640001696B00312F636C656172636173652F6F74702F657274732F6C69622F6B65726E656C2F7372632F2E2E2F2E2E2F686970652F72746C6802640001696B00332F636C656172636173652F6F74702F657274732F6C69622F6B65726E656C2F7372632F2E2E2F2E2E2F686970652F737061726364000A64656275675F696E666F6400107761726E5F756E757365645F766172736A680264000776657273696F6E6B0005342E322E31680264000474696D65680662000007D3610C6112610B6133612B6802640006736F757263656B00382F636C656172636173652F6F74702F657274732F6C69622F6B65726E656C2F7372632F686970655F73706172635F6C6F616465722E65726C6A
-=mod:ets
-Current size: 16577
-Current attributes: 836C00000002680264000376736E6C000000016E100033D982AC91129E5FC35E0AC3337A4EB56A680264000A646570726563617465646C0000000168026400086669787461626C6561026A6A
-Current compilation info: 836C0000000468026400076F7074696F6E736C0000000768026400036377646B00222F636C656172636173652F6F74702F657274732F6C69622F7374646C69622F73726368026400066F75746469726B002A2F636C656172636173652F6F74702F657274732F6C69622F7374646C69622F7372632F2E2E2F6562696E6802640001696B002D2F636C656172636173652F6F74702F657274732F6C69622F7374646C69622F7372632F2E2E2F696E636C7564656802640001696B00372F636C656172636173652F6F74702F657274732F6C69622F7374646C69622F7372632F2E2E2F2E2E2F6B65726E656C2F696E636C7564656400107761726E5F756E757365645F7661727364000A64656275675F696E666F6400107761726E5F756E757365645F766172736A680264000776657273696F6E6B0005342E322E31680264000474696D65680662000007D3610C6112610B612D611C6802640006736F757263656B002A2F636C656172636173652F6F74702F657274732F6C69622F7374646C69622F7372632F6574732E65726C6A
-=mod:lists_sort
-Current size: 38692
-Current attributes: 836C00000001680264000376736E6C000000016E1000E17EC92FA9AA3199DD71701C215044616A6A
-Current compilation info: 836C0000000468026400076F7074696F6E736C0000000B68026400036377646B00222F636C656172636173652F6F74702F657274732F6C69622F7374646C69622F73726368026400066F75746469726B002A2F636C656172636173652F6F74702F657274732F6C69622F7374646C69622F7372632F2E2E2F6562696E6802640001696B002D2F636C656172636173652F6F74702F657274732F6C69622F7374646C69622F7372632F2E2E2F696E636C7564656802640001696B00372F636C656172636173652F6F74702F657274732F6C69622F7374646C69622F7372632F2E2E2F2E2E2F6B65726E656C2F696E636C7564656400107761726E5F756E757365645F7661727364000A64656275675F696E666F6400107761726E5F756E757365645F766172736802640006696E6C696E656C0000000468026400096D65726765335F3132610768026400096D65726765335F32316107680264000A726D65726765335F31326107680264000A726D65726765335F323161076A6802640006696E6C696E656C00000004680264000A756D65726765335F31326108680264000A756D65726765335F32316108680264000C72756D65726765335F3132616107680264000C72756D65726765335F31326261086A6802640006696E6C696E656C00000004680264000C6B65796D65726765335F3132610C680264000C6B65796D65726765335F3231610C680264000D726B65796D65726765335F3132610C680264000D726B65796D65726765335F3231610C6A6802640006696E6C696E656C00000006680264000D756B65796D65726765335F3132610D680264000D756B65796D65726765335F3231610D680264000F72756B65796D65726765335F313261610B680264000F72756B65796D65726765335F323161610D680264000F72756B65796D65726765335F313262610D680264000F72756B65796D65726765335F323162610C6A6A680264000776657273696F6E6B0005342E322E31680264000474696D65680662000007D3610C6112610B612E61166802640006736F757263656B00312F636C656172636173652F6F74702F657274732F6C69622F7374646C69622F7372632F6C697374735F736F72742E65726C6A
-=mod:user_sup
-Current size: 2355
-Current attributes: 836C00000002680264000376736E6C000000016E100074BA860804CB4D60D6908C705E6544BD6A68026400096265686176696F75726C0000000164001173757065727669736F725F6272696467656A6A
-Current compilation info: 836C0000000468026400076F7074696F6E736C0000000568026400036377646B00222F636C656172636173652F6F74702F657274732F6C69622F6B65726E656C2F73726368026400066F75746469726B002A2F636C656172636173652F6F74702F657274732F6C69622F6B65726E656C2F7372632F2E2E2F6562696E6802640001696B002D2F636C656172636173652F6F74702F657274732F6C69622F6B65726E656C2F7372632F2E2E2F696E636C75646564000A64656275675F696E666F6400107761726E5F756E757365645F766172736A680264000776657273696F6E6B0005342E322E31680264000474696D65680662000007D3610C6112610B613361246802640006736F757263656B002F2F636C656172636173652F6F74702F657274732F6C69622F6B65726E656C2F7372632F757365725F7375702E65726C6A
-=mod:supervisor_bridge
-Current size: 2944
-Current attributes: 836C00000002680264000376736E6C000000016E10001590DDC10CF8A9D09763CDB7479678ED6A68026400096265686176696F75726C0000000164000A67656E5F7365727665726A6A
-Current compilation info: 836C0000000468026400076F7074696F6E736C0000000768026400036377646B00222F636C656172636173652F6F74702F657274732F6C69622F7374646C69622F73726368026400066F75746469726B002A2F636C656172636173652F6F74702F657274732F6C69622F7374646C69622F7372632F2E2E2F6562696E6802640001696B002D2F636C656172636173652F6F74702F657274732F6C69622F7374646C69622F7372632F2E2E2F696E636C7564656802640001696B00372F636C656172636173652F6F74702F657274732F6C69622F7374646C69622F7372632F2E2E2F2E2E2F6B65726E656C2F696E636C7564656400107761726E5F756E757365645F7661727364000A64656275675F696E666F6400107761726E5F756E757365645F766172736A680264000776657273696F6E6B0005342E322E31680264000474696D65680662000007D3610C6112610B612F61156802640006736F757263656B00382F636C656172636173652F6F74702F657274732F6C69622F7374646C69622F7372632F73757065727669736F725F6272696467652E65726C6A
-=mod:user_drv
-Current size: 14630
-Current attributes: 836C00000001680264000376736E6C000000016E1000F29F3B193A1EB1ADA9975D97E51BF0E86A6A
-Current compilation info: 836C0000000468026400076F7074696F6E736C0000000568026400036377646B00222F636C656172636173652F6F74702F657274732F6C69622F6B65726E656C2F73726368026400066F75746469726B002A2F636C656172636173652F6F74702F657274732F6C69622F6B65726E656C2F7372632F2E2E2F6562696E6802640001696B002D2F636C656172636173652F6F74702F657274732F6C69622F6B65726E656C2F7372632F2E2E2F696E636C75646564000A64656275675F696E666F6400107761726E5F756E757365645F766172736A680264000776657273696F6E6B0005342E322E31680264000474696D65680662000007D3610C6112610B613361216802640006736F757263656B002F2F636C656172636173652F6F74702F657274732F6C69622F6B65726E656C2F7372632F757365725F6472762E65726C6A
-=mod:group
-Current size: 10165
-Current attributes: 836C00000001680264000376736E6C000000016E1000F6427D0DA330BBFAD5D4C19058516FF36A6A
-Current compilation info: 836C0000000468026400076F7074696F6E736C0000000568026400036377646B00222F636C656172636173652F6F74702F657274732F6C69622F6B65726E656C2F73726368026400066F75746469726B002A2F636C656172636173652F6F74702F657274732F6C69622F6B65726E656C2F7372632F2E2E2F6562696E6802640001696B002D2F636C656172636173652F6F74702F657274732F6C69622F6B65726E656C2F7372632F2E2E2F696E636C75646564000A64656275675F696E666F6400107761726E5F756E757365645F766172736A680264000776657273696F6E6B0005342E322E31680264000474696D65680662000007D3610C6112610B613261066802640006736F757263656B002C2F636C656172636173652F6F74702F657274732F6C69622F6B65726E656C2F7372632F67726F75702E65726C6A
-=mod:io_lib
-Current size: 12601
-Current attributes: 836C00000002680264000376736E6C000000016E10004160DD78F37EE7C72F7C5B6A751DB7F56A680264000A646570726563617465646C0000000468026400047363616E610168026400047363616E610268026400047363616E6103680264000D72657365727665645F776F726461016A6A
-Current compilation info: 836C0000000468026400076F7074696F6E736C0000000768026400036377646B00222F636C656172636173652F6F74702F657274732F6C69622F7374646C69622F73726368026400066F75746469726B002A2F636C656172636173652F6F74702F657274732F6C69622F7374646C69622F7372632F2E2E2F6562696E6802640001696B002D2F636C656172636173652F6F74702F657274732F6C69622F7374646C69622F7372632F2E2E2F696E636C7564656802640001696B00372F636C656172636173652F6F74702F657274732F6C69622F7374646C69622F7372632F2E2E2F2E2E2F6B65726E656C2F696E636C7564656400107761726E5F756E757365645F7661727364000A64656275675F696E666F6400107761726E5F756E757365645F766172736A680264000776657273696F6E6B0005342E322E31680264000474696D65680662000007D3610C6112610B612E61036802640006736F757263656B002D2F636C656172636173652F6F74702F657274732F6C69622F7374646C69622F7372632F696F5F6C69622E65726C6A
-=mod:edlin
-Current size: 18178
-Current attributes: 836C00000001680264000376736E6C000000016E100035D752FCBA8ED7F4D26990EF3E6A1A526A6A
-Current compilation info: 836C0000000468026400076F7074696F6E736C0000000768026400036377646B00222F636C656172636173652F6F74702F657274732F6C69622F7374646C69622F73726368026400066F75746469726B002A2F636C656172636173652F6F74702F657274732F6C69622F7374646C69622F7372632F2E2E2F6562696E6802640001696B002D2F636C656172636173652F6F74702F657274732F6C69622F7374646C69622F7372632F2E2E2F696E636C7564656802640001696B00372F636C656172636173652F6F74702F657274732F6C69622F7374646C69622F7372632F2E2E2F2E2E2F6B65726E656C2F696E636C7564656400107761726E5F756E757365645F7661727364000A64656275675F696E666F6400107761726E5F756E757365645F766172736A680264000776657273696F6E6B0005342E322E31680264000474696D65680662000007D3610C6112610B612C61016802640006736F757263656B002C2F636C656172636173652F6F74702F657274732F6C69622F7374646C69622F7372632F65646C696E2E65726C6A
-=mod:io_lib_format
-Current size: 16189
-Current attributes: 836C00000001680264000376736E6C000000016E10004F382F327C456F83F33C3D5EBFBD87906A6A
-Current compilation info: 836C0000000468026400076F7074696F6E736C0000000768026400036377646B00222F636C656172636173652F6F74702F657274732F6C69622F7374646C69622F73726368026400066F75746469726B002A2F636C656172636173652F6F74702F657274732F6C69622F7374646C69622F7372632F2E2E2F6562696E6802640001696B002D2F636C656172636173652F6F74702F657274732F6C69622F7374646C69622F7372632F2E2E2F696E636C7564656802640001696B00372F636C656172636173652F6F74702F657274732F6C69622F7374646C69622F7372632F2E2E2F2E2E2F6B65726E656C2F696E636C7564656400107761726E5F756E757365645F7661727364000A64656275675F696E666F6400107761726E5F756E757365645F766172736A680264000776657273696F6E6B0005342E322E31680264000474696D65680662000007D3610C6112610B612E61066802640006736F757263656B00342F636C656172636173652F6F74702F657274732F6C69622F7374646C69622F7372632F696F5F6C69625F666F726D61742E65726C6A
-=mod:kernel_config
-Current size: 3295
-Current attributes: 836C00000002680264000376736E6C000000016E100077B8EE6C9E95FBBE5DB0371F6DB235226A68026400096265686176696F75726C0000000164000A67656E5F7365727665726A6A
-Current compilation info: 836C0000000468026400076F7074696F6E736C0000000568026400036377646B00222F636C656172636173652F6F74702F657274732F6C69622F6B65726E656C2F73726368026400066F75746469726B002A2F636C656172636173652F6F74702F657274732F6C69622F6B65726E656C2F7372632F2E2E2F6562696E6802640001696B002D2F636C656172636173652F6F74702F657274732F6C69622F6B65726E656C2F7372632F2E2E2F696E636C75646564000A64656275675F696E666F6400107761726E5F756E757365645F766172736A680264000776657273696F6E6B0005342E322E31680264000474696D65680662000007D3610C6112610B613261356802640006736F757263656B00342F636C656172636173652F6F74702F657274732F6C69622F6B65726E656C2F7372632F6B65726E656C5F636F6E6669672E65726C6A
-=mod:shell
-Current size: 22571
-Current attributes: 836C00000001680264000376736E6C000000016E10007D1354325618EB98A5BD4E8F41E6A0226A6A
-Current compilation info: 836C0000000468026400076F7074696F6E736C0000000768026400036377646B00222F636C656172636173652F6F74702F657274732F6C69622F7374646C69622F73726368026400066F75746469726B002A2F636C656172636173652F6F74702F657274732F6C69622F7374646C69622F7372632F2E2E2F6562696E6802640001696B002D2F636C656172636173652F6F74702F657274732F6C69622F7374646C69622F7372632F2E2E2F696E636C7564656802640001696B00372F636C656172636173652F6F74702F657274732F6C69622F7374646C69622F7372632F2E2E2F2E2E2F6B65726E656C2F696E636C7564656400107761726E5F756E757365645F7661727364000A64656275675F696E666F6400107761726E5F756E757365645F766172736A680264000776657273696F6E6B0005342E322E31680264000474696D65680662000007D3610C6112610B612F61016802640006736F757263656B002C2F636C656172636173652F6F74702F657274732F6C69622F7374646C69622F7372632F7368656C6C2E65726C6A
-=mod:error_logger_tty_h
-Current size: 7773
-Current attributes: 836C00000002680264000376736E6C000000016E10001502D55D6C1777F07E2E05CDD91D16986A68026400096265686176696F75726C0000000164000967656E5F6576656E746A6A
-Current compilation info: 836C0000000468026400076F7074696F6E736C0000000768026400036377646B00222F636C656172636173652F6F74702F657274732F6C69622F7374646C69622F73726368026400066F75746469726B002A2F636C656172636173652F6F74702F657274732F6C69622F7374646C69622F7372632F2E2E2F6562696E6802640001696B002D2F636C656172636173652F6F74702F657274732F6C69622F7374646C69622F7372632F2E2E2F696E636C7564656802640001696B00372F636C656172636173652F6F74702F657274732F6C69622F7374646C69622F7372632F2E2E2F2E2E2F6B65726E656C2F696E636C7564656400107761726E5F756E757365645F7661727364000A64656275675F696E666F6400107761726E5F756E757365645F766172736A680264000776657273696F6E6B0005342E322E31680264000474696D65680662000007D3610C6112610B612D61196802640006736F757263656B00392F636C656172636173652F6F74702F657274732F6C69622F7374646C69622F7372632F6572726F725F6C6F676765725F7474795F682E65726C6A
-=mod:erl_eval
-Current size: 33481
-Current attributes: 836C00000002680264000376736E6C000000016E1000D06903753C86BBC49A5CBD789CCB09B66A680264000A646570726563617465646C00000004680264000373657161026802640003736571610368026400086172675F6C697374610268026400086172675F6C69737461036A6A
-Current compilation info: 836C0000000468026400076F7074696F6E736C0000000768026400036377646B00222F636C656172636173652F6F74702F657274732F6C69622F7374646C69622F73726368026400066F75746469726B002A2F636C656172636173652F6F74702F657274732F6C69622F7374646C69622F7372632F2E2E2F6562696E6802640001696B002D2F636C656172636173652F6F74702F657274732F6C69622F7374646C69622F7372632F2E2E2F696E636C7564656802640001696B00372F636C656172636173652F6F74702F657274732F6C69622F7374646C69622F7372632F2E2E2F2E2E2F6B65726E656C2F696E636C7564656400107761726E5F756E757365645F7661727364000A64656275675F696E666F6400107761726E5F756E757365645F766172736A680264000776657273696F6E6B0005342E322E31680264000474696D65680662000007D3610C6112610B612C610D6802640006736F757263656B002F2F636C656172636173652F6F74702F657274732F6C69622F7374646C69622F7372632F65726C5F6576616C2E65726C6A
-=mod:orddict
-Current size: 4872
-Current attributes: 836C00000002680264000376736E6C000000016E100078DCF69F3949D79BC54168266A3ABF566A680264000A646570726563617465646C00000002680264000C646963745F746F5F6C6973746101680264000C6C6973745F746F5F6469637461016A6A
-Current compilation info: 836C0000000468026400076F7074696F6E736C0000000768026400036377646B00222F636C656172636173652F6F74702F657274732F6C69622F7374646C69622F73726368026400066F75746469726B002A2F636C656172636173652F6F74702F657274732F6C69622F7374646C69622F7372632F2E2E2F6562696E6802640001696B002D2F636C656172636173652F6F74702F657274732F6C69622F7374646C69622F7372632F2E2E2F696E636C7564656802640001696B00372F636C656172636173652F6F74702F657274732F6C69622F7374646C69622F7372632F2E2E2F2E2E2F6B65726E656C2F696E636C7564656400107761726E5F756E757365645F7661727364000A64656275675F696E666F6400107761726E5F756E757365645F766172736A680264000776657273696F6E6B0005342E322E31680264000474696D65680662000007D3610C6112610B612E61236802640006736F757263656B002E2F636C656172636173652F6F74702F657274732F6C69622F7374646C69622F7372632F6F7264646963742E65726C6A
-=mod:c
-Current size: 19555
-Current attributes: 836C00000001680264000376736E6C000000016E10003FACCF5DE16ABBC988ABF0811980C33B6A6A
-Current compilation info: 836C0000000468026400076F7074696F6E736C0000000768026400036377646B00222F636C656172636173652F6F74702F657274732F6C69622F7374646C69622F73726368026400066F75746469726B002A2F636C656172636173652F6F74702F657274732F6C69622F7374646C69622F7372632F2E2E2F6562696E6802640001696B002D2F636C656172636173652F6F74702F657274732F6C69622F7374646C69622F7372632F2E2E2F696E636C7564656802640001696B00372F636C656172636173652F6F74702F657274732F6C69622F7374646C69622F7372632F2E2E2F2E2E2F6B65726E656C2F696E636C7564656400107761726E5F756E757365645F7661727364000A64656275675F696E666F6400107761726E5F756E757365645F766172736A680264000776657273696F6E6B0005342E322E31680264000474696D65680662000007D3610C6112610B612B61136802640006736F757263656B00282F636C656172636173652F6F74702F657274732F6C69622F7374646C69622F7372632F632E65726C6A
-=mod:io
-Current size: 7417
-Current attributes: 836C00000002680264000376736E6C000000016E1000E2F2A6094B3C3D945865225D0620E7546A680264000A646570726563617465646C00000007680264000B70617273655F65787072736102680264000C7363616E5F65726C5F7365716101680264000C7363616E5F65726C5F7365716102680264000C7363616E5F65726C5F7365716103680264000D70617273655F65726C5F7365716101680264000D70617273655F65726C5F7365716102680264000D70617273655F65726C5F73657161036A6A
-Current compilation info: 836C0000000468026400076F7074696F6E736C0000000768026400036377646B00222F636C656172636173652F6F74702F657274732F6C69622F7374646C69622F73726368026400066F75746469726B002A2F636C656172636173652F6F74702F657274732F6C69622F7374646C69622F7372632F2E2E2F6562696E6802640001696B002D2F636C656172636173652F6F74702F657274732F6C69622F7374646C69622F7372632F2E2E2F696E636C7564656802640001696B00372F636C656172636173652F6F74702F657274732F6C69622F7374646C69622F7372632F2E2E2F2E2E2F6B65726E656C2F696E636C7564656400107761726E5F756E757365645F7661727364000A64656275675F696E666F6400107761726E5F756E757365645F766172736A680264000776657273696F6E6B0005342E322E31680264000474696D65680662000007D3610C6112610B612E61006802640006736F757263656B00292F636C656172636173652F6F74702F657274732F6C69622F7374646C69622F7372632F696F2E65726C6A
-=mod:file
-Current size: 20795
-Current attributes: 836C00000002680264000376736E6C000000016E1000D291AF77EE8B08B792B7FE99274504506A680264000A646570726563617465646C00000001680264000966696C655F696E666F61016A6A
-Current compilation info: 836C0000000468026400076F7074696F6E736C0000000568026400036377646B00222F636C656172636173652F6F74702F657274732F6C69622F6B65726E656C2F73726368026400066F75746469726B002A2F636C656172636173652F6F74702F657274732F6C69622F6B65726E656C2F7372632F2E2E2F6562696E6802640001696B002D2F636C656172636173652F6F74702F657274732F6C69622F6B65726E656C2F7372632F2E2E2F696E636C75646564000A64656275675F696E666F6400107761726E5F756E757365645F766172736A680264000776657273696F6E6B0005342E322E31680264000474696D65680662000007D3610C6112610B613161276802640006736F757263656B002B2F636C656172636173652F6F74702F657274732F6C69622F6B65726E656C2F7372632F66696C652E65726C6A
-=mod:file_io_server
-Current size: 12071
-Current attributes: 836C00000001680264000376736E6C000000016E1000A5A8C4E2B2646855AD5C617CB216CB966A6A
-Current compilation info: 836C0000000468026400076F7074696F6E736C0000000568026400036377646B00222F636C656172636173652F6F74702F657274732F6C69622F6B65726E656C2F73726368026400066F75746469726B002A2F636C656172636173652F6F74702F657274732F6C69622F6B65726E656C2F7372632F2E2E2F6562696E6802640001696B002D2F636C656172636173652F6F74702F657274732F6C69622F6B65726E656C2F7372632F2E2E2F696E636C75646564000A64656275675F696E666F6400107761726E5F756E757365645F766172736A680264000776657273696F6E6B0005342E322E31680264000474696D65680662000007D3610C6112610B6131612A6802640006736F757263656B00352F636C656172636173652F6F74702F657274732F6C69622F6B65726E656C2F7372632F66696C655F696F5F7365727665722E65726C6A
-=mod:erl_scan
-Current size: 21891
-Current attributes: 836C00000001680264000376736E6C000000016E100094F386F0C378B258E5D9CEADD4F03B6A6A6A
-Current compilation info: 836C0000000468026400076F7074696F6E736C0000000768026400036377646B00222F636C656172636173652F6F74702F657274732F6C69622F7374646C69622F73726368026400066F75746469726B002A2F636C656172636173652F6F74702F657274732F6C69622F7374646C69622F7372632F2E2E2F6562696E6802640001696B002D2F636C656172636173652F6F74702F657274732F6C69622F7374646C69622F7372632F2E2E2F696E636C7564656802640001696B00372F636C656172636173652F6F74702F657274732F6C69622F7374646C69622F7372632F2E2E2F2E2E2F6B65726E656C2F696E636C7564656400107761726E5F756E757365645F7661727364000A64656275675F696E666F6400107761726E5F756E757365645F766172736A680264000776657273696F6E6B0005342E322E31680264000474696D65680662000007D3610C6112610B612D61116802640006736F757263656B002F2F636C656172636173652F6F74702F657274732F6C69622F7374646C69622F7372632F65726C5F7363616E2E65726C6A
-=mod:erl_parse
-Current size: 161233
-Current attributes: 836C00000001680264000376736E6C000000016E10000E8CBC32C293BFC1FBC721CE918062236A6A
-Current compilation info: 836C0000000468026400076F7074696F6E736C0000000968026400036377646B00222F636C656172636173652F6F74702F657274732F6C69622F7374646C69622F73726368026400066F75746469726B002A2F636C656172636173652F6F74702F657274732F6C69622F7374646C69622F7372632F2E2E2F6562696E6802640001696B002D2F636C656172636173652F6F74702F657274732F6C69622F7374646C69622F7372632F2E2E2F696E636C7564656802640001696B00372F636C656172636173652F6F74702F657274732F6C69622F7374646C69622F7372632F2E2E2F2E2E2F6B65726E656C2F696E636C7564656400107761726E5F756E757365645F7661727364000A64656275675F696E666F6400107761726E5F756E757365645F76617273640006696E6C696E656802640004686970656C000000016802640008726567616C6C6F6364000B6C696E6561725F7363616E6A6A680264000776657273696F6E6B0005342E322E31680264000474696D65680662000007D3610C6112610B612D61076802640006736F757263656B00302F636C656172636173652F6F74702F657274732F6C69622F7374646C69622F7372632F65726C5F70617273652E65726C6A
-=mod:erl_lint
-Current size: 73159
-Current attributes: 836C00000001680264000376736E6C000000016E1000D1D2A7D6DDFD1195CB180993C76FD2CD6A6A
-Current compilation info: 836C0000000468026400076F7074696F6E736C0000000768026400036377646B00222F636C656172636173652F6F74702F657274732F6C69622F7374646C69622F73726368026400066F75746469726B002A2F636C656172636173652F6F74702F657274732F6C69622F7374646C69622F7372632F2E2E2F6562696E6802640001696B002D2F636C656172636173652F6F74702F657274732F6C69622F7374646C69622F7372632F2E2E2F696E636C7564656802640001696B00372F636C656172636173652F6F74702F657274732F6C69622F7374646C69622F7372632F2E2E2F2E2E2F6B65726E656C2F696E636C7564656400107761726E5F756E757365645F7661727364000A64656275675F696E666F6400107761726E5F756E757365645F766172736A680264000776657273696F6E6B0005342E322E31680264000474696D65680662000007D3610C6112610B612C61156802640006736F757263656B002F2F636C656172636173652F6F74702F657274732F6C69622F7374646C69622F7372632F65726C5F6C696E742E65726C6A
-=mod:ordsets
-Current size: 3257
-Current attributes: 836C00000002680264000376736E6C000000016E1000FD39D8FD846511128F5670BA28600F676A680264000A646570726563617465646C0000000468026400076E65775F7365746100680264000B7365745F746F5F6C6973746101680264000B6C6973745F746F5F7365746101680264000673756273657461026A6A
-Current compilation info: 836C0000000468026400076F7074696F6E736C0000000768026400036377646B00222F636C656172636173652F6F74702F657274732F6C69622F7374646C69622F73726368026400066F75746469726B002A2F636C656172636173652F6F74702F657274732F6C69622F7374646C69622F7372632F2E2E2F6562696E6802640001696B002D2F636C656172636173652F6F74702F657274732F6C69622F7374646C69622F7372632F2E2E2F696E636C7564656802640001696B00372F636C656172636173652F6F74702F657274732F6C69622F7374646C69622F7372632F2E2E2F2E2E2F6B65726E656C2F696E636C7564656400107761726E5F756E757365645F7661727364000A64656275675F696E666F6400107761726E5F756E757365645F766172736A680264000776657273696F6E6B0005342E322E31680264000474696D65680662000007D3610C6112610B612E61256802640006736F757263656B002E2F636C656172636173652F6F74702F657274732F6C69622F7374646C69622F7372632F6F7264736574732E65726C6A
-=mod:dict
-Current size: 15637
-Current attributes: 836C00000002680264000376736E6C000000016E1000BC846E7EF85045A5D76190CE9B1AE97C6A680264000A646570726563617465646C00000002680264000C646963745F746F5F6C6973746101680264000C6C6973745F746F5F6469637461016A6A
-Current compilation info: 836C0000000468026400076F7074696F6E736C0000000768026400036377646B00222F636C656172636173652F6F74702F657274732F6C69622F7374646C69622F73726368026400066F75746469726B002A2F636C656172636173652F6F74702F657274732F6C69622F7374646C69622F7372632F2E2E2F6562696E6802640001696B002D2F636C656172636173652F6F74702F657274732F6C69622F7374646C69622F7372632F2E2E2F696E636C7564656802640001696B00372F636C656172636173652F6F74702F657274732F6C69622F7374646C69622F7372632F2E2E2F2E2E2F6B65726E656C2F696E636C7564656400107761726E5F756E757365645F7661727364000A64656275675F696E666F6400107761726E5F756E757365645F766172736A680264000776657273696F6E6B0005342E322E31680264000474696D65680662000007D3610C6112610B612B61356802640006736F757263656B002B2F636C656172636173652F6F74702F657274732F6C69622F7374646C69622F7372632F646963742E65726C6A
-=mod:otp_internal
-Current size: 7133
-Current attributes: 836C00000001680264000376736E6C000000016E1000DC494F64DE590AFC4919DFEB0EB026B66A6A
-Current compilation info: 836C0000000468026400076F7074696F6E736C0000000768026400036377646B00222F636C656172636173652F6F74702F657274732F6C69622F7374646C69622F73726368026400066F75746469726B002A2F636C656172636173652F6F74702F657274732F6C69622F7374646C69622F7372632F2E2E2F6562696E6802640001696B002D2F636C656172636173652F6F74702F657274732F6C69622F7374646C69622F7372632F2E2E2F696E636C7564656802640001696B00372F636C656172636173652F6F74702F657274732F6C69622F7374646C69622F7372632F2E2E2F2E2E2F6B65726E656C2F696E636C7564656400107761726E5F756E757365645F7661727364000A64656275675F696E666F6400107761726E5F756E757365645F766172736A680264000776657273696F6E6B0005342E322E31680264000474696D65680662000007D3610C6112610B612E61206802640006736F757263656B00332F636C656172636173652F6F74702F657274732F6C69622F7374646C69622F7372632F6F74705F696E7465726E616C2E65726C6A
-=mod:user_default
-Current size: 1261
-Current attributes: 836C00000002680264000376736E6C000000016E1000505078ACD9B84D514FC6DA2BE249E6756A6802640006617574686F726C0000000164001765656973686E6E406565692E6572696373736F6E2E73656A6A
-Current compilation info: 836C0000000468026400076F7074696F6E736C0000000368026400036377646B00112F686F6D652F736972692F65726C616E6768026400066F75746469726B00112F686F6D652F736972692F65726C616E676400107761726E5F756E757365645F766172736A680264000776657273696F6E6B0005342E322E32680264000474696D65680662000007D461036116610D612C61126802640006736F757263656B00222F686F6D652F736972692F65726C616E672F757365725F64656661756C742E65726C6A
-=mod:tt
-Current size: 2959
-Current attributes: 836C00000002680264000376736E6C000000016E10001D71FD5A55D3BCBF06BFEDF2426C3C386A6802640006617574686F726C0000000164001765656973686E6E406565692E6572696373736F6E2E73656A6A
-Current compilation info: 836C0000000468026400076F7074696F6E736C0000000368026400036377646B00112F686F6D652F736972692F65726C616E6768026400066F75746469726B00112F686F6D652F736972692F65726C616E676400107761726E5F756E757365645F766172736A680264000776657273696F6E6B0005342E322E32680264000474696D65680662000007D461036116610D612B610C6802640006736F757263656B00182F686F6D652F736972692F65726C616E672F74742E65726C6A
-=mod:distel
-Current size: 18214
-Current attributes: 836C00000002680264000376736E6C000000016E1000CC9C9EF141459249C1CCA00993B2E29A6A6802640006617574686F726C000000016400116C756B6540626C75657461696C2E636F6D6A6A
-Current compilation info: 836C0000000368026400076F7074696F6E736C0000000664000276336400107761726E5F756E757365645F7661727364000A64656275675F696E666F68026400066F75746469726B00046562696E68026400036377646B001C2F6C6469736B2F736972692F746F6F6C732F64697374656C2D332E3164000A6578706F72745F616C6C6A680264000776657273696F6E6B0003342E31680264000474696D65680662000007D2610B6114610B610361336A
-=mod:crashdump_viewer
-Current size: 125756
-Current attributes: 836C00000001680264000376736E6C000000016E10002DC5D9D96190A2D5F27FAC3FA3D5C7956A6A
-Current compilation info: 836C0000000468026400076F7074696F6E736C0000000868026400036377646B00212F636C656172636173652F6F74702F746F6F6C732F6F627365727665722F73726368026400066F75746469726B00292F636C656172636173652F6F74702F746F6F6C732F6F627365727665722F7372632F2E2E2F6562696E6802640001696B002C2F636C656172636173652F6F74702F746F6F6C732F6F627365727665722F7372632F2E2E2F696E636C7564656802640001696B00322F636C656172636173652F6F74702F746F6F6C732F6F627365727665722F7372632F2E2E2F2E2E2F65742F696E636C7564656802640001696B003F2F636C656172636173652F6F74702F746F6F6C732F6F627365727665722F7372632F2E2E2F2E2E2F2E2E2F6C69627261726965732F65742F696E636C75646564000A64656275675F696E666F6400107761726E5F756E757365645F76617273680264000F70617273655F7472616E73666F726D64000C6D735F7472616E73666F726D6A680264000776657273696F6E6B0005342E322E32680264000474696D65680662000007D4610461146108611B61366802640006736F757263656B00362F636C656172636173652F6F74702F746F6F6C732F6F627365727665722F7372632F637261736864756D705F7669657765722E65726C6A
-=mod:webtool
-Current size: 29229
-Current attributes: 836C00000002680264000376736E6C000000016E10008AEEF06B60527A3390CBC2C98083CC0A6A68026400096265686176696F75726C0000000164000A67656E5F7365727665726A6A
-Current compilation info: 836C0000000468026400076F7074696F6E736C0000000568026400036377646B00202F636C656172636173652F6F74702F746F6F6C732F776562746F6F6C2F73726368026400066F75746469726B00282F636C656172636173652F6F74702F746F6F6C732F776562746F6F6C2F7372632F2E2E2F6562696E64000A64656275675F696E666F6400107761726E5F756E757365645F76617273680264000F70617273655F7472616E73666F726D64000C6D735F7472616E73666F726D6A680264000776657273696F6E6B0005342E322E32680264000474696D65680662000007D46104610661086106612D6802640006736F757263656B002C2F636C656172636173652F6F74702F746F6F6C732F776562746F6F6C2F7372632F776562746F6F6C2E65726C6A
-=mod:gen_tcp
-Current size: 3574
-Current attributes: 836C00000001680264000376736E6C000000016E1000C965E4EAFDAA94D7F21EDCBE30B21E7B6A6A
-Current compilation info: 836C0000000468026400076F7074696F6E736C0000000568026400036377646B00222F636C656172636173652F6F74702F657274732F6C69622F6B65726E656C2F73726368026400066F75746469726B002A2F636C656172636173652F6F74702F657274732F6C69622F6B65726E656C2F7372632F2E2E2F6562696E6802640001696B002D2F636C656172636173652F6F74702F657274732F6C69622F6B65726E656C2F7372632F2E2E2F696E636C75646564000A64656275675F696E666F6400107761726E5F756E757365645F766172736A680264000776657273696F6E6B0005342E322E31680264000474696D65680662000007D3610C6112610B613161316802640006736F757263656B002E2F636C656172636173652F6F74702F657274732F6C69622F6B65726E656C2F7372632F67656E5F7463702E65726C6A
-=mod:inet_tcp
-Current size: 2743
-Current attributes: 836C00000001680264000376736E6C000000016E1000C4AFE0B49768E4CF78B2C42EA1D3DB7F6A6A
-Current compilation info: 836C0000000468026400076F7074696F6E736C0000000568026400036377646B00222F636C656172636173652F6F74702F657274732F6C69622F6B65726E656C2F73726368026400066F75746469726B002A2F636C656172636173652F6F74702F657274732F6C69622F6B65726E656C2F7372632F2E2E2F6562696E6802640001696B002D2F636C656172636173652F6F74702F657274732F6C69622F6B65726E656C2F7372632F2E2E2F696E636C75646564000A64656275675F696E666F6400107761726E5F756E757365645F766172736A680264000776657273696F6E6B0005342E322E31680264000474696D65680662000007D3610C6112610B6132612B6802640006736F757263656B002F2F636C656172636173652F6F74702F657274732F6C69622F6B65726E656C2F7372632F696E65745F7463702E65726C6A
-=mod:inet_gethost_native
-Current size: 15611
-Current attributes: 836C00000002680264000376736E6C000000016E10005D8CD4277D0BD2425B9C26036AE314506A68026400096265686176696F75726C0000000164001173757065727669736F725F6272696467656A6A
-Current compilation info: 836C0000000468026400076F7074696F6E736C0000000568026400036377646B00222F636C656172636173652F6F74702F657274732F6C69622F6B65726E656C2F73726368026400066F75746469726B002A2F636C656172636173652F6F74702F657274732F6C69622F6B65726E656C2F7372632F2E2E2F6562696E6802640001696B002D2F636C656172636173652F6F74702F657274732F6C69622F6B65726E656C2F7372632F2E2E2F696E636C75646564000A64656275675F696E666F6400107761726E5F756E757365645F766172736A680264000776657273696F6E6B0005342E322E31680264000474696D65680662000007D3610C6112610B613261206802640006736F757263656B003A2F636C656172636173652F6F74702F657274732F6C69622F6B65726E656C2F7372632F696E65745F676574686F73745F6E61746976652E65726C6A
-=mod:filelib
-Current size: 7202
-Current attributes: 836C00000001680264000376736E6C000000016E10007B42AA23FF99DF2CD9D586635B77556A6A6A
-Current compilation info: 836C0000000468026400076F7074696F6E736C0000000768026400036377646B00222F636C656172636173652F6F74702F657274732F6C69622F7374646C69622F73726368026400066F75746469726B002A2F636C656172636173652F6F74702F657274732F6C69622F7374646C69622F7372632F2E2E2F6562696E6802640001696B002D2F636C656172636173652F6F74702F657274732F6C69622F7374646C69622F7372632F2E2E2F696E636C7564656802640001696B00372F636C656172636173652F6F74702F657274732F6C69622F7374646C69622F7372632F2E2E2F2E2E2F6B65726E656C2F696E636C7564656400107761726E5F756E757365645F7661727364000A64656275675F696E666F6400107761726E5F756E757365645F766172736A680264000776657273696F6E6B0005342E322E31680264000474696D65680662000007D3610C6112610B612D61266802640006736F757263656B002E2F636C656172636173652F6F74702F657274732F6C69622F7374646C69622F7372632F66696C656C69622E65726C6A
-=mod:httpd_util
-Current size: 24068
-Current attributes: 836C00000002680264000376736E6C000000016E10008D99E096221B88D542E52CB9C8377F6D6A68026400076170705F76736E6B000B696E6574732D332E302E376A
-Current compilation info: 836C0000000468026400076F7074696F6E736C0000000868036400016464001164656661756C745F766572626F7369747964000773696C656E636568036400016464000F5345525645525F534F4654574152456B000B696E6574732F332E302E3768026400036377646B00222F636C656172636173652F6F74702F6C69627261726965732F696E6574732F73726368026400066F75746469726B002A2F636C656172636173652F6F74702F6C69627261726965732F696E6574732F7372632F2E2E2F6562696E6804640009617474726962757465640006696E736572746400076170705F76736E6B000B696E6574732D332E302E37680264000F70617273655F7472616E73666F726D6400127379735F7072655F6174747269627574657364000A64656275675F696E666F6400107761726E5F756E757365645F766172736A680264000776657273696F6E6B0005342E322E32680264000474696D65680662000007D46104611561066128613B6802640006736F757263656B00312F636C656172636173652F6F74702F6C69627261726965732F696E6574732F7372632F68747470645F7574696C2E65726C6A
-=mod:webtool_sup
-Current size: 695
-Current attributes: 836C00000002680264000376736E6C000000016E1000FA5449E12816CF3AD0A3085BB26CDB9B6A68026400096265686176696F75726C0000000164000A73757065727669736F726A6A
-Current compilation info: 836C0000000468026400076F7074696F6E736C0000000468026400036377646B00202F636C656172636173652F6F74702F746F6F6C732F776562746F6F6C2F73726368026400066F75746469726B00282F636C656172636173652F6F74702F746F6F6C732F776562746F6F6C2F7372632F2E2E2F6562696E64000A64656275675F696E666F6400107761726E5F756E757365645F766172736A680264000776657273696F6E6B0005342E322E32680264000474696D65680662000007D4610461066108610761236802640006736F757263656B00302F636C656172636173652F6F74702F746F6F6C732F776562746F6F6C2F7372632F776562746F6F6C5F7375702E65726C6A
-=mod:httpd_conf
-Current size: 33659
-Current attributes: 836C00000002680264000376736E6C000000016E1000E3198FBDC73BC48CB7D0C1C762B8F1AB6A68026400076170705F76736E6B000B696E6574732D332E302E376A
-Current compilation info: 836C0000000468026400076F7074696F6E736C0000000868036400016464001164656661756C745F766572626F7369747964000773696C656E636568036400016464000F5345525645525F534F4654574152456B000B696E6574732F332E302E3768026400036377646B00222F636C656172636173652F6F74702F6C69627261726965732F696E6574732F73726368026400066F75746469726B002A2F636C656172636173652F6F74702F6C69627261726965732F696E6574732F7372632F2E2E2F6562696E6804640009617474726962757465640006696E736572746400076170705F76736E6B000B696E6574732D332E302E37680264000F70617273655F7472616E73666F726D6400127379735F7072655F6174747269627574657364000A64656275675F696E666F6400107761726E5F756E757365645F766172736A680264000776657273696F6E6B0005342E322E32680264000474696D65680662000007D4610461156106612861116802640006736F757263656B00312F636C656172636173652F6F74702F6C69627261726965732F696E6574732F7372632F68747470645F636F6E662E65726C6A
-=mod:regexp
-Current size: 13698
-Current attributes: 836C00000001680264000376736E6C000000016E10009DD44F3D02F8328BE3ABF4DDA89E0CAE6A6A
-Current compilation info: 836C0000000468026400076F7074696F6E736C0000000768026400036377646B00222F636C656172636173652F6F74702F657274732F6C69622F7374646C69622F73726368026400066F75746469726B002A2F636C656172636173652F6F74702F657274732F6C69622F7374646C69622F7372632F2E2E2F6562696E6802640001696B002D2F636C656172636173652F6F74702F657274732F6C69622F7374646C69622F7372632F2E2E2F696E636C7564656802640001696B00372F636C656172636173652F6F74702F657274732F6C69622F7374646C69622F7372632F2E2E2F2E2E2F6B65726E656C2F696E636C7564656400107761726E5F756E757365645F7661727364000A64656275675F696E666F6400107761726E5F756E757365645F766172736A680264000776657273696F6E6B0005342E322E31680264000474696D65680662000007D3610C6112610B612E61376802640006736F757263656B002D2F636C656172636173652F6F74702F657274732F6C69622F7374646C69622F7372632F7265676578702E65726C6A
-=mod:string
-Current size: 7740
-Current attributes: 836C00000002680264000376736E6C000000016E10005521DDF38903D46D7C53DB864266F7456A680264000A646570726563617465646C00000007680264000C72655F73685F746F5F61776B6101680264000872655F70617273656101680264000872655F6D617463686102680264000672655F7375626103680264000772655F677375626103680264000872655F73706C697461026802640005696E64657861026A6A
-Current compilation info: 836C0000000468026400076F7074696F6E736C0000000768026400036377646B00222F636C656172636173652F6F74702F657274732F6C69622F7374646C69622F73726368026400066F75746469726B002A2F636C656172636173652F6F74702F657274732F6C69622F7374646C69622F7372632F2E2E2F6562696E6802640001696B002D2F636C656172636173652F6F74702F657274732F6C69622F7374646C69622F7372632F2E2E2F696E636C7564656802640001696B00372F636C656172636173652F6F74702F657274732F6C69622F7374646C69622F7372632F2E2E2F2E2E2F6B65726E656C2F696E636C7564656400107761726E5F756E757365645F7661727364000A64656275675F696E666F6400107761726E5F756E757365645F766172736A680264000776657273696F6E6B0005342E322E31680264000474696D65680662000007D3610C6112610B612F610F6802640006736F757263656B002D2F636C656172636173652F6F74702F657274732F6C69622F7374646C69622F7372632F737472696E672E65726C6A
-=mod:httpd
-Current size: 7563
-Current attributes: 836C00000002680264000376736E6C000000016E1000BFD190D951EB3CAD2CC72ADEF20886906A68026400076170705F76736E6B000B696E6574732D332E302E376A
-Current compilation info: 836C0000000468026400076F7074696F6E736C0000000868036400016464001164656661756C745F766572626F7369747964000773696C656E636568036400016464000F5345525645525F534F4654574152456B000B696E6574732F332E302E3768026400036377646B00222F636C656172636173652F6F74702F6C69627261726965732F696E6574732F73726368026400066F75746469726B002A2F636C656172636173652F6F74702F6C69627261726965732F696E6574732F7372632F2E2E2F6562696E6804640009617474726962757465640006696E736572746400076170705F76736E6B000B696E6574732D332E302E37680264000F70617273655F7472616E73666F726D6400127379735F7072655F6174747269627574657364000A64656275675F696E666F6400107761726E5F756E757365645F766172736A680264000776657273696F6E6B0005342E322E32680264000474696D65680662000007D4610461156106612861036802640006736F757263656B002C2F636C656172636173652F6F74702F6C69627261726965732F696E6574732F7372632F68747470642E65726C6A
-=mod:httpd_sup
-Current size: 4068
-Current attributes: 836C00000003680264000376736E6C000000016E10007FA5C790118F18F3D20A2BFAF0229F0A6A68026400076170705F76736E6B000B696E6574732D332E302E3768026400096265686176696F75726C0000000164000A73757065727669736F726A6A
-Current compilation info: 836C0000000468026400076F7074696F6E736C0000000868036400016464001164656661756C745F766572626F7369747964000773696C656E636568036400016464000F5345525645525F534F4654574152456B000B696E6574732F332E302E3768026400036377646B00222F636C656172636173652F6F74702F6C69627261726965732F696E6574732F73726368026400066F75746469726B002A2F636C656172636173652F6F74702F6C69627261726965732F696E6574732F7372632F2E2E2F6562696E6804640009617474726962757465640006696E736572746400076170705F76736E6B000B696E6574732D332E302E37680264000F70617273655F7472616E73666F726D6400127379735F7072655F6174747269627574657364000A64656275675F696E666F6400107761726E5F756E757365645F766172736A680264000776657273696F6E6B0005342E322E32680264000474696D65680662000007D4610461156106612861366802640006736F757263656B00302F636C656172636173652F6F74702F6C69627261726965732F696E6574732F7372632F68747470645F7375702E65726C6A
-=mod:httpd_acceptor_sup
-Current size: 2161
-Current attributes: 836C00000003680264000376736E6C000000016E10003E6F9289B64C13F1EC8A1184BACF055F6A68026400076170705F76736E6B000B696E6574732D332E302E3768026400096265686176696F75726C0000000164000A73757065727669736F726A6A
-Current compilation info: 836C0000000468026400076F7074696F6E736C0000000868036400016464001164656661756C745F766572626F7369747964000773696C656E636568036400016464000F5345525645525F534F4654574152456B000B696E6574732F332E302E3768026400036377646B00222F636C656172636173652F6F74702F6C69627261726965732F696E6574732F73726368026400066F75746469726B002A2F636C656172636173652F6F74702F6C69627261726965732F696E6574732F7372632F2E2E2F6562696E6804640009617474726962757465640006696E736572746400076170705F76736E6B000B696E6574732D332E302E37680264000F70617273655F7472616E73666F726D6400127379735F7072655F6174747269627574657364000A64656275675F696E666F6400107761726E5F756E757365645F766172736A680264000776657273696F6E6B0005342E322E32680264000474696D65680662000007D46104611561066128610C6802640006736F757263656B00392F636C656172636173652F6F74702F6C69627261726965732F696E6574732F7372632F68747470645F6163636570746F725F7375702E65726C6A
-=mod:httpd_verbosity
-Current size: 2672
-Current attributes: 836C00000002680264000376736E6C000000016E100018B6F407D391872421748F87877DAAF36A68026400076170705F76736E6B000B696E6574732D332E302E376A
-Current compilation info: 836C0000000468026400076F7074696F6E736C0000000868036400016464001164656661756C745F766572626F7369747964000773696C656E636568036400016464000F5345525645525F534F4654574152456B000B696E6574732F332E302E3768026400036377646B00222F636C656172636173652F6F74702F6C69627261726965732F696E6574732F73726368026400066F75746469726B002A2F636C656172636173652F6F74702F6C69627261726965732F696E6574732F7372632F2E2E2F6562696E6804640009617474726962757465640006696E736572746400076170705F76736E6B000B696E6574732D332E302E37680264000F70617273655F7472616E73666F726D6400127379735F7072655F6174747269627574657364000A64656275675F696E666F6400107761726E5F756E757365645F766172736A680264000776657273696F6E6B0005342E322E32680264000474696D65680662000007D4610461156106612961036802640006736F757263656B00362F636C656172636173652F6F74702F6C69627261726965732F696E6574732F7372632F68747470645F766572626F736974792E65726C6A
-=mod:timer
-Current size: 8223
-Current attributes: 836C00000001680264000376736E6C000000016E10001D0D64DB1B923D1B3B9497655C43B4AD6A6A
-Current compilation info: 836C0000000468026400076F7074696F6E736C0000000768026400036377646B00222F636C656172636173652F6F74702F657274732F6C69622F7374646C69622F73726368026400066F75746469726B002A2F636C656172636173652F6F74702F657274732F6C69622F7374646C69622F7372632F2E2E2F6562696E6802640001696B002D2F636C656172636173652F6F74702F657274732F6C69622F7374646C69622F7372632F2E2E2F696E636C7564656802640001696B00372F636C656172636173652F6F74702F657274732F6C69622F7374646C69622F7372632F2E2E2F2E2E2F6B65726E656C2F696E636C7564656400107761726E5F756E757365645F7661727364000A64656275675F696E666F6400107761726E5F756E757365645F766172736A680264000776657273696F6E6B0005342E322E31680264000474696D65680662000007D3610C6112610B612F611A6802640006736F757263656B002C2F636C656172636173652F6F74702F657274732F6C69622F7374646C69622F7372632F74696D65722E65726C6A
-=mod:httpd_misc_sup
-Current size: 2066
-Current attributes: 836C00000003680264000376736E6C000000016E100092342F38AC16C074DDC21532FBFB52C26A68026400076170705F76736E6B000B696E6574732D332E302E3768026400096265686176696F75726C0000000164000A73757065727669736F726A6A
-Current compilation info: 836C0000000468026400076F7074696F6E736C0000000868036400016464001164656661756C745F766572626F7369747964000773696C656E636568036400016464000F5345525645525F534F4654574152456B000B696E6574732F332E302E3768026400036377646B00222F636C656172636173652F6F74702F6C69627261726965732F696E6574732F73726368026400066F75746469726B002A2F636C656172636173652F6F74702F6C69627261726965732F696E6574732F7372632F2E2E2F6562696E6804640009617474726962757465640006696E736572746400076170705F76736E6B000B696E6574732D332E302E37680264000F70617273655F7472616E73666F726D6400127379735F7072655F6174747269627574657364000A64656275675F696E666F6400107761726E5F756E757365645F766172736A680264000776657273696F6E6B0005342E322E32680264000474696D65680662000007D46104611561066128611F6802640006736F757263656B00352F636C656172636173652F6F74702F6C69627261726965732F696E6574732F7372632F68747470645F6D6973635F7375702E65726C6A
-=mod:httpd_manager
-Current size: 28916
-Current attributes: 836C00000003680264000376736E6C000000016E100013F7A1E6A4B6407A0A1892A794EE10A36A68026400076170705F76736E6B000B696E6574732D332E302E3768026400096265686176696F75726C0000000164000A67656E5F7365727665726A6A
-Current compilation info: 836C0000000468026400076F7074696F6E736C0000000868036400016464001164656661756C745F766572626F7369747964000773696C656E636568036400016464000F5345525645525F534F4654574152456B000B696E6574732F332E302E3768026400036377646B00222F636C656172636173652F6F74702F6C69627261726965732F696E6574732F73726368026400066F75746469726B002A2F636C656172636173652F6F74702F6C69627261726965732F696E6574732F7372632F2E2E2F6562696E6804640009617474726962757465640006696E736572746400076170705F76736E6B000B696E6574732D332E302E37680264000F70617273655F7472616E73666F726D6400127379735F7072655F6174747269627574657364000A64656275675F696E666F6400107761726E5F756E757365645F766172736A680264000776657273696F6E6B0005342E322E32680264000474696D65680662000007D46104611561066128611B6802640006736F757263656B00342F636C656172636173652F6F74702F6C69627261726965732F696E6574732F7372632F68747470645F6D616E616765722E65726C6A
-=mod:mod_alias
-Current size: 6720
-Current attributes: 836C00000002680264000376736E6C000000016E10002F35C36060B4AC45474440381D146AB96A68026400076170705F76736E6B000B696E6574732D332E302E376A
-Current compilation info: 836C0000000468026400076F7074696F6E736C0000000868036400016464001164656661756C745F766572626F7369747964000773696C656E636568036400016464000F5345525645525F534F4654574152456B000B696E6574732F332E302E3768026400036377646B00222F636C656172636173652F6F74702F6C69627261726965732F696E6574732F73726368026400066F75746469726B002A2F636C656172636173652F6F74702F6C69627261726965732F696E6574732F7372632F2E2E2F6562696E6804640009617474726962757465640006696E736572746400076170705F76736E6B000B696E6574732D332E302E37680264000F70617273655F7472616E73666F726D6400127379735F7072655F6174747269627574657364000A64656275675F696E666F6400107761726E5F756E757365645F766172736A680264000776657273696F6E6B0005342E322E32680264000474696D65680662000007D4610461156106612961106802640006736F757263656B00302F636C656172636173652F6F74702F6C69627261726965732F696E6574732F7372632F6D6F645F616C6961732E65726C6A
-=mod:mod_auth
-Current size: 25168
-Current attributes: 836C00000002680264000376736E6C000000016E100083F3CA0C7A3E7B5E19A635A7F916595D6A68026400076170705F76736E6B000B696E6574732D332E302E376A
-Current compilation info: 836C0000000468026400076F7074696F6E736C0000000868036400016464001164656661756C745F766572626F7369747964000773696C656E636568036400016464000F5345525645525F534F4654574152456B000B696E6574732F332E302E3768026400036377646B00222F636C656172636173652F6F74702F6C69627261726965732F696E6574732F73726368026400066F75746469726B002A2F636C656172636173652F6F74702F6C69627261726965732F696E6574732F7372632F2E2E2F6562696E6804640009617474726962757465640006696E736572746400076170705F76736E6B000B696E6574732D332E302E37680264000F70617273655F7472616E73666F726D6400127379735F7072655F6174747269627574657364000A64656275675F696E666F6400107761726E5F756E757365645F766172736A680264000776657273696F6E6B0005342E322E32680264000474696D65680662000007D4610461156106612961166802640006736F757263656B002F2F636C656172636173652F6F74702F6C69627261726965732F696E6574732F7372632F6D6F645F617574682E65726C6A
-=mod:mod_esi
-Current size: 22534
-Current attributes: 836C00000002680264000376736E6C000000016E1000513E3FF733E1E6592B86CB55B9C14E086A68026400076170705F76736E6B000B696E6574732D332E302E376A
-Current compilation info: 836C0000000468026400076F7074696F6E736C0000000868036400016464001164656661756C745F766572626F7369747964000773696C656E636568036400016464000F5345525645525F534F4654574152456B000B696E6574732F332E302E3768026400036377646B00222F636C656172636173652F6F74702F6C69627261726965732F696E6574732F73726368026400066F75746469726B002A2F636C656172636173652F6F74702F6C69627261726965732F696E6574732F7372632F2E2E2F6562696E6804640009617474726962757465640006696E736572746400076170705F76736E6B000B696E6574732D332E302E37680264000F70617273655F7472616E73666F726D6400127379735F7072655F6174747269627574657364000A64656275675F696E666F6400107761726E5F756E757365645F766172736A680264000776657273696F6E6B0005342E322E32680264000474696D65680662000007D4610461156106612A61026802640006736F757263656B002E2F636C656172636173652F6F74702F6C69627261726965732F696E6574732F7372632F6D6F645F6573692E65726C6A
-=mod:mod_actions
-Current size: 3625
-Current attributes: 836C00000002680264000376736E6C000000016E10008E5437921662830490CA76DFF88548966A68026400076170705F76736E6B000B696E6574732D332E302E376A
-Current compilation info: 836C0000000468026400076F7074696F6E736C0000000868036400016464001164656661756C745F766572626F7369747964000773696C656E636568036400016464000F5345525645525F534F4654574152456B000B696E6574732F332E302E3768026400036377646B00222F636C656172636173652F6F74702F6C69627261726965732F696E6574732F73726368026400066F75746469726B002A2F636C656172636173652F6F74702F6C69627261726965732F696E6574732F7372632F2E2E2F6562696E6804640009617474726962757465640006696E736572746400076170705F76736E6B000B696E6574732D332E302E37680264000F70617273655F7472616E73666F726D6400127379735F7072655F6174747269627574657364000A64656275675F696E666F6400107761726E5F756E757365645F766172736A680264000776657273696F6E6B0005342E322E32680264000474696D65680662000007D46104611561066129610C6802640006736F757263656B00322F636C656172636173652F6F74702F6C69627261726965732F696E6574732F7372632F6D6F645F616374696F6E732E65726C6A
-=mod:mod_cgi
-Current size: 25891
-Current attributes: 836C00000002680264000376736E6C000000016E1000F91D405488188F1BD25110B4ED9EE8786A68026400076170705F76736E6B000B696E6574732D332E302E376A
-Current compilation info: 836C0000000468026400076F7074696F6E736C0000000868036400016464001164656661756C745F766572626F7369747964000773696C656E636568036400016464000F5345525645525F534F4654574152456B000B696E6574732F332E302E3768026400036377646B00222F636C656172636173652F6F74702F6C69627261726965732F696E6574732F73726368026400066F75746469726B002A2F636C656172636173652F6F74702F6C69627261726965732F696E6574732F7372632F2E2E2F6562696E6804640009617474726962757465640006696E736572746400076170705F76736E6B000B696E6574732D332E302E37680264000F70617273655F7472616E73666F726D6400127379735F7072655F6174747269627574657364000A64656275675F696E666F6400107761726E5F756E757365645F766172736A680264000776657273696F6E6B0005342E322E32680264000474696D65680662000007D4610461156106612961306802640006736F757263656B002E2F636C656172636173652F6F74702F6C69627261726965732F696E6574732F7372632F6D6F645F6367692E65726C6A
-=mod:mod_include
-Current size: 34923
-Current attributes: 836C00000002680264000376736E6C000000016E1000B9CCE88D63DD6AC49D5DF533C46B97D56A68026400076170705F76736E6B000B696E6574732D332E302E376A
-Current compilation info: 836C0000000468026400076F7074696F6E736C0000000868036400016464001164656661756C745F766572626F7369747964000773696C656E636568036400016464000F5345525645525F534F4654574152456B000B696E6574732F332E302E3768026400036377646B00222F636C656172636173652F6F74702F6C69627261726965732F696E6574732F73726368026400066F75746469726B002A2F636C656172636173652F6F74702F6C69627261726965732F696E6574732F7372632F2E2E2F6562696E6804640009617474726962757465640006696E736572746400076170705F76736E6B000B696E6574732D332E302E37680264000F70617273655F7472616E73666F726D6400127379735F7072655F6174747269627574657364000A64656275675F696E666F6400107761726E5F756E757365645F766172736A680264000776657273696F6E6B0005342E322E32680264000474696D65680662000007D4610461156106612A61176802640006736F757263656B00322F636C656172636173652F6F74702F6C69627261726965732F696E6574732F7372632F6D6F645F696E636C7564652E65726C6A
-=mod:mod_dir
-Current size: 13488
-Current attributes: 836C00000002680264000376736E6C000000016E1000EF620CB4B5DE5586ED681347496DA1C86A68026400076170705F76736E6B000B696E6574732D332E302E376A
-Current compilation info: 836C0000000468026400076F7074696F6E736C0000000868036400016464001164656661756C745F766572626F7369747964000773696C656E636568036400016464000F5345525645525F534F4654574152456B000B696E6574732F332E302E3768026400036377646B00222F636C656172636173652F6F74702F6C69627261726965732F696E6574732F73726368026400066F75746469726B002A2F636C656172636173652F6F74702F6C69627261726965732F696E6574732F7372632F2E2E2F6562696E6804640009617474726962757465640006696E736572746400076170705F76736E6B000B696E6574732D332E302E37680264000F70617273655F7472616E73666F726D6400127379735F7072655F6174747269627574657364000A64656275675F696E666F6400107761726E5F756E757365645F766172736A680264000776657273696F6E6B0005342E322E32680264000474696D65680662000007D4610461156106612961356802640006736F757263656B002E2F636C656172636173652F6F74702F6C69627261726965732F696E6574732F7372632F6D6F645F6469722E65726C6A
-=mod:mod_get
-Current size: 4672
-Current attributes: 836C00000002680264000376736E6C000000016E1000AD2730B6BE6AF875A500AF4857C4D7F86A68026400076170705F76736E6B000B696E6574732D332E302E376A
-Current compilation info: 836C0000000468026400076F7074696F6E736C0000000868036400016464001164656661756C745F766572626F7369747964000773696C656E636568036400016464000F5345525645525F534F4654574152456B000B696E6574732F332E302E3768026400036377646B00222F636C656172636173652F6F74702F6C69627261726965732F696E6574732F73726368026400066F75746469726B002A2F636C656172636173652F6F74702F6C69627261726965732F696E6574732F7372632F2E2E2F6562696E6804640009617474726962757465640006696E736572746400076170705F76736E6B000B696E6574732D332E302E37680264000F70617273655F7472616E73666F726D6400127379735F7072655F6174747269627574657364000A64656275675F696E666F6400107761726E5F756E757365645F766172736A680264000776657273696F6E6B0005342E322E32680264000474696D65680662000007D4610461156106612A61076802640006736F757263656B002E2F636C656172636173652F6F74702F6C69627261726965732F696E6574732F7372632F6D6F645F6765742E65726C6A
-=mod:mod_head
-Current size: 3074
-Current attributes: 836C00000002680264000376736E6C000000016E1000CAF803B9FA6A28D4153BC109B00D7DF96A68026400076170705F76736E6B000B696E6574732D332E302E376A
-Current compilation info: 836C0000000468026400076F7074696F6E736C0000000868036400016464001164656661756C745F766572626F7369747964000773696C656E636568036400016464000F5345525645525F534F4654574152456B000B696E6574732F332E302E3768026400036377646B00222F636C656172636173652F6F74702F6C69627261726965732F696E6574732F73726368026400066F75746469726B002A2F636C656172636173652F6F74702F6C69627261726965732F696E6574732F7372632F2E2E2F6562696E6804640009617474726962757465640006696E736572746400076170705F76736E6B000B696E6574732D332E302E37680264000F70617273655F7472616E73666F726D6400127379735F7072655F6174747269627574657364000A64656275675F696E666F6400107761726E5F756E757365645F766172736A680264000776657273696F6E6B0005342E322E32680264000474696D65680662000007D4610461156106612A610B6802640006736F757263656B002F2F636C656172636173652F6F74702F6C69627261726965732F696E6574732F7372632F6D6F645F686561642E65726C6A
-=mod:mod_log
-Current size: 8546
-Current attributes: 836C00000002680264000376736E6C000000016E1000F9664B54861260DEA081249379219AF86A68026400076170705F76736E6B000B696E6574732D332E302E376A
-Current compilation info: 836C0000000468026400076F7074696F6E736C0000000868036400016464001164656661756C745F766572626F7369747964000773696C656E636568036400016464000F5345525645525F534F4654574152456B000B696E6574732F332E302E3768026400036377646B00222F636C656172636173652F6F74702F6C69627261726965732F696E6574732F73726368026400066F75746469726B002A2F636C656172636173652F6F74702F6C69627261726965732F696E6574732F7372632F2E2E2F6562696E6804640009617474726962757465640006696E736572746400076170705F76736E6B000B696E6574732D332E302E37680264000F70617273655F7472616E73666F726D6400127379735F7072655F6174747269627574657364000A64656275675F696E666F6400107761726E5F756E757365645F766172736A680264000776657273696F6E6B0005342E322E32680264000474696D65680662000007D4610461156106612A611B6802640006736F757263656B002E2F636C656172636173652F6F74702F6C69627261726965732F696E6574732F7372632F6D6F645F6C6F672E65726C6A
-=mod:mod_disk_log
-Current size: 15160
-Current attributes: 836C00000002680264000376736E6C000000016E1000DDA1E88A9C423A2866B56425DF36F5C66A68026400076170705F76736E6B000B696E6574732D332E302E376A
-Current compilation info: 836C0000000468026400076F7074696F6E736C0000000868036400016464001164656661756C745F766572626F7369747964000773696C656E636568036400016464000F5345525645525F534F4654574152456B000B696E6574732F332E302E3768026400036377646B00222F636C656172636173652F6F74702F6C69627261726965732F696E6574732F73726368026400066F75746469726B002A2F636C656172636173652F6F74702F6C69627261726965732F696E6574732F7372632F2E2E2F6562696E6804640009617474726962757465640006696E736572746400076170705F76736E6B000B696E6574732D332E302E37680264000F70617273655F7472616E73666F726D6400127379735F7072655F6174747269627574657364000A64656275675F696E666F6400107761726E5F756E757365645F766172736A680264000776657273696F6E6B0005342E322E32680264000474696D65680662000007D4610461156106612961396802640006736F757263656B00332F636C656172636173652F6F74702F6C69627261726965732F696E6574732F7372632F6D6F645F6469736B5F6C6F672E65726C6A
-=mod:httpd_socket
-Current size: 7426
-Current attributes: 836C00000002680264000376736E6C000000016E1000B831219096661E4D2E200A07C4A9A7776A68026400076170705F76736E6B000B696E6574732D332E302E376A
-Current compilation info: 836C0000000468026400076F7074696F6E736C0000000868036400016464001164656661756C745F766572626F7369747964000773696C656E636568036400016464000F5345525645525F534F4654574152456B000B696E6574732F332E302E3768026400036377646B00222F636C656172636173652F6F74702F6C69627261726965732F696E6574732F73726368026400066F75746469726B002A2F636C656172636173652F6F74702F6C69627261726965732F696E6574732F7372632F2E2E2F6562696E6804640009617474726962757465640006696E736572746400076170705F76736E6B000B696E6574732D332E302E37680264000F70617273655F7472616E73666F726D6400127379735F7072655F6174747269627574657364000A64656275675F696E666F6400107761726E5F756E757365645F766172736A680264000776657273696F6E6B0005342E322E32680264000474696D65680662000007D4610461156106612861326802640006736F757263656B00332F636C656172636173652F6F74702F6C69627261726965732F696E6574732F7372632F68747470645F736F636B65742E65726C6A
-=mod:httpd_acceptor
-Current size: 4472
-Current attributes: 836C00000002680264000376736E6C000000016E1000A501686DF4E4053E7D978E0CA162BEC56A68026400076170705F76736E6B000B696E6574732D332E302E376A
-Current compilation info: 836C0000000468026400076F7074696F6E736C0000000868036400016464001164656661756C745F766572626F7369747964000773696C656E636568036400016464000F5345525645525F534F4654574152456B000B696E6574732F332E302E3768026400036377646B00222F636C656172636173652F6F74702F6C69627261726965732F696E6574732F73726368026400066F75746469726B002A2F636C656172636173652F6F74702F6C69627261726965732F696E6574732F7372632F2E2E2F6562696E6804640009617474726962757465640006696E736572746400076170705F76736E6B000B696E6574732D332E302E37680264000F70617273655F7472616E73666F726D6400127379735F7072655F6174747269627574657364000A64656275675F696E666F6400107761726E5F756E757365645F766172736A680264000776657273696F6E6B0005342E322E32680264000474696D65680662000007D4610461156106612861076802640006736F757263656B00352F636C656172636173652F6F74702F6C69627261726965732F696E6574732F7372632F68747470645F6163636570746F722E65726C6A
-=mod:io_lib_pretty
-Current size: 8171
-Current attributes: 836C00000001680264000376736E6C000000016E1000CD397E11D2D380D02A4BC6EE309B98CB6A6A
-Current compilation info: 836C0000000468026400076F7074696F6E736C0000000768026400036377646B00222F636C656172636173652F6F74702F657274732F6C69622F7374646C69622F73726368026400066F75746469726B002A2F636C656172636173652F6F74702F657274732F6C69622F7374646C69622F7372632F2E2E2F6562696E6802640001696B002D2F636C656172636173652F6F74702F657274732F6C69622F7374646C69622F7372632F2E2E2F696E636C7564656802640001696B00372F636C656172636173652F6F74702F657274732F6C69622F7374646C69622F7372632F2E2E2F2E2E2F6B65726E656C2F696E636C7564656400107761726E5F756E757365645F7661727364000A64656275675F696E666F6400107761726E5F756E757365645F766172736A680264000776657273696F6E6B0005342E322E31680264000474696D65680662000007D3610C6112610B612E610C6802640006736F757263656B00342F636C656172636173652F6F74702F657274732F6C69622F7374646C69622F7372632F696F5F6C69625F7072657474792E65726C6A
-=mod:httpd_request_handler
-Current size: 26393
-Current attributes: 836C00000002680264000376736E6C000000016E100021C280A5EB5B9CCD00A2C418A341202A6A68026400076170705F76736E6B000B696E6574732D332E302E376A
-Current compilation info: 836C0000000468026400076F7074696F6E736C0000000868036400016464001164656661756C745F766572626F7369747964000773696C656E636568036400016464000F5345525645525F534F4654574152456B000B696E6574732F332E302E3768026400036377646B00222F636C656172636173652F6F74702F6C69627261726965732F696E6574732F73726368026400066F75746469726B002A2F636C656172636173652F6F74702F6C69627261726965732F696E6574732F7372632F2E2E2F6562696E6804640009617474726962757465640006696E736572746400076170705F76736E6B000B696E6574732D332E302E37680264000F70617273655F7472616E73666F726D6400127379735F7072655F6174747269627574657364000A64656275675F696E666F6400107761726E5F756E757365645F766172736A680264000776657273696F6E6B0005342E322E32680264000474696D65680662000007D4610461156106612861296802640006736F757263656B003C2F636C656172636173652F6F74702F6C69627261726965732F696E6574732F7372632F68747470645F726571756573745F68616E646C65722E65726C6A
-=mod:calendar
-Current size: 7158
-Current attributes: 836C00000002680264000376736E6C000000016E10008C44498546709037F8D72DA4AF8B7FB76A680264000A646570726563617465646C00000001680264001C6C6F63616C5F74696D655F746F5F756E6976657273616C5F74696D6561016A6A
-Current compilation info: 836C0000000468026400076F7074696F6E736C0000000768026400036377646B00222F636C656172636173652F6F74702F657274732F6C69622F7374646C69622F73726368026400066F75746469726B002A2F636C656172636173652F6F74702F657274732F6C69622F7374646C69622F7372632F2E2E2F6562696E6802640001696B002D2F636C656172636173652F6F74702F657274732F6C69622F7374646C69622F7372632F2E2E2F696E636C7564656802640001696B00372F636C656172636173652F6F74702F657274732F6C69622F7374646C69622F7372632F2E2E2F2E2E2F6B65726E656C2F696E636C7564656400107761726E5F756E757365645F7661727364000A64656275675F696E666F6400107761726E5F756E757365645F766172736A680264000776657273696F6E6B0005342E322E31680264000474696D65680662000007D3610C6112610B612B61166802640006736F757263656B002F2F636C656172636173652F6F74702F657274732F6C69622F7374646C69622F7372632F63616C656E6461722E65726C6A
-=mod:httpd_parse
-Current size: 9977
-Current attributes: 836C00000002680264000376736E6C000000016E1000174653BAA652261FEB44FFDED99E50B76A68026400076170705F76736E6B000B696E6574732D332E302E376A
-Current compilation info: 836C0000000468026400076F7074696F6E736C0000000868036400016464001164656661756C745F766572626F7369747964000773696C656E636568036400016464000F5345525645525F534F4654574152456B000B696E6574732F332E302E3768026400036377646B00222F636C656172636173652F6F74702F6C69627261726965732F696E6574732F73726368026400066F75746469726B002A2F636C656172636173652F6F74702F6C69627261726965732F696E6574732F7372632F2E2E2F6562696E6804640009617474726962757465640006696E736572746400076170705F76736E6B000B696E6574732D332E302E37680264000F70617273655F7472616E73666F726D6400127379735F7072655F6174747269627574657364000A64656275675F696E666F6400107761726E5F756E757365645F766172736A680264000776657273696F6E6B0005342E322E32680264000474696D65680662000007D4610461156106612861246802640006736F757263656B00322F636C656172636173652F6F74702F6C69627261726965732F696E6574732F7372632F68747470645F70617273652E65726C6A
-=mod:httpd_response
-Current size: 13535
-Current attributes: 836C00000002680264000376736E6C000000016E1000785B247D894BA08A40D814EF11F848976A68026400076170705F76736E6B000B696E6574732D332E302E376A
-Current compilation info: 836C0000000468026400076F7074696F6E736C0000000868036400016464001164656661756C745F766572626F7369747964000773696C656E636568036400016464000F5345525645525F534F4654574152456B000B696E6574732F332E302E3768026400036377646B00222F636C656172636173652F6F74702F6C69627261726965732F696E6574732F73726368026400066F75746469726B002A2F636C656172636173652F6F74702F6C69627261726965732F696E6574732F7372632F2E2E2F6562696E6804640009617474726962757465640006696E736572746400076170705F76736E6B000B696E6574732D332E302E37680264000F70617273655F7472616E73666F726D6400127379735F7072655F6174747269627574657364000A64656275675F696E666F6400107761726E5F756E757365645F766172736A680264000776657273696F6E6B0005342E322E32680264000474696D65680662000007D46104611561066128612D6802640006736F757263656B00352F636C656172636173652F6F74702F6C69627261726965732F696E6574732F7372632F68747470645F726573706F6E73652E65726C6A
-=mod:crashdump_viewer_html
-Current size: 68343
-Current attributes: 836C00000001680264000376736E6C000000016E1000AE414770FDB0806C5583FF8D6D71DC766A6A
-Current compilation info: 836C0000000468026400076F7074696F6E736C0000000768026400036377646B00212F636C656172636173652F6F74702F746F6F6C732F6F627365727665722F73726368026400066F75746469726B00292F636C656172636173652F6F74702F746F6F6C732F6F627365727665722F7372632F2E2E2F6562696E6802640001696B002C2F636C656172636173652F6F74702F746F6F6C732F6F627365727665722F7372632F2E2E2F696E636C7564656802640001696B00322F636C656172636173652F6F74702F746F6F6C732F6F627365727665722F7372632F2E2E2F2E2E2F65742F696E636C7564656802640001696B003F2F636C656172636173652F6F74702F746F6F6C732F6F627365727665722F7372632F2E2E2F2E2E2F2E2E2F6C69627261726965732F65742F696E636C75646564000A64656275675F696E666F6400107761726E5F756E757365645F766172736A680264000776657273696F6E6B0005342E322E32680264000474696D65680662000007D4610461146108611C61026802640006736F757263656B003B2F636C656172636173652F6F74702F746F6F6C732F6F627365727665722F7372632F637261736864756D705F7669657765725F68746D6C2E65726C6A
-=mod:crashdump_translate
-Current size: 89840
-Current attributes: 836C00000001680264000376736E6C000000016E100038F332287181E933A76CEF4799BDB6416A6A
-Current compilation info: 836C0000000468026400076F7074696F6E736C0000000668026400036377646B00212F636C656172636173652F6F74702F746F6F6C732F6F627365727665722F73726368026400066F75746469726B00292F636C656172636173652F6F74702F746F6F6C732F6F627365727665722F7372632F2E2E2F6562696E6802640001696B002C2F636C656172636173652F6F74702F746F6F6C732F6F627365727665722F7372632F2E2E2F696E636C7564656802640001696B00322F636C656172636173652F6F74702F746F6F6C732F6F627365727665722F7372632F2E2E2F2E2E2F65742F696E636C7564656802640001696B003F2F636C656172636173652F6F74702F746F6F6C732F6F627365727665722F7372632F2E2E2F2E2E2F2E2E2F6C69627261726965732F65742F696E636C75646564000A64656275675F696E666F6A680264000776657273696F6E6B0005342E322E32680264000474696D65680662000007D461046115610B611661106802640006736F757263656B00392F636C656172636173652F6F74702F746F6F6C732F6F627365727665722F7372632F637261736864756D705F7472616E736C6174652E65726C6A
-=fun
-Module: crashdump_viewer_html
-Uniq: 9122590
-Index: 0
-Address: 526308
-Native_address: bcefc
-Refc: 1
-=fun
-Module: global
-Uniq: 77168418
-Index: 14
-Address: 26541c
-Native_address: bcf04
-Refc: 1
-=fun
-Module: inet_parse
-Uniq: 88083515
-Index: 9
-Address: 284c30
-Native_address: bcefc
-Refc: 1
-=fun
-Module: inet_db
-Uniq: 36747896
-Index: 4
-Address: 26df84
-Native_address: bcefc
-Refc: 1
-=fun
-Module: global
-Uniq: 80395734
-Index: 8
-Address: 265838
-Native_address: bcef4
-Refc: 1
-=fun
-Module: erl_eval
-Uniq: 103184573
-Index: 5
-Address: 2fa59c
-Native_address: bce80
-Refc: 1
-=fun
-Module: erl_lint
-Uniq: 88265811
-Index: 24
-Address: 34f6a0
-Native_address: bcefc
-Refc: 1
-=fun
-Module: global_group
-Uniq: 9644262
-Index: 2
-Address: 292cec
-Native_address: bcef4
-Refc: 1
-=fun
-Module: net_kernel
-Uniq: 100885585
-Index: 0
-Address: 29eb2c
-Native_address: bcefc
-Refc: 1
-=fun
-Module: inet_db
-Uniq: 128335479
-Index: 6
-Address: 26de84
-Native_address: bcef4
-Refc: 1
-=fun
-Module: erl_prim_loader
-Uniq: 42988083
-Index: 1
-Address: 210c14
-Native_address: bcf04
-Refc: 1
-=fun
-Module: dict
-Uniq: 7105125
-Index: 7
-Address: 354f84
-Native_address: bcefc
-Refc: 1
-=fun
-Module: application_controller
-Uniq: 29030584
-Index: 8
-Address: 234978
-Native_address: bcefc
-Refc: 1
-=fun
-Module: inet_parse
-Uniq: 29214351
-Index: 2
-Address: 285660
-Native_address: bcefc
-Refc: 1
-=fun
-Module: inet_config
-Uniq: 5158633
-Index: 4
-Address: 274034
-Native_address: bcefc
-Refc: 1
-=fun
-Module: erl_lint
-Uniq: 74624950
-Index: 25
-Address: 34f63c
-Native_address: bcefc
-Refc: 1
-=fun
-Module: code_server
-Uniq: 6477018
-Index: 3
-Address: 2adb6c
-Native_address: bcefc
-Refc: 1
-=fun
-Module: c
-Uniq: 117885138
-Index: 7
-Address: 2ffff8
-Native_address: bcefc
-Refc: 1
-=fun
-Module: dict
-Uniq: 47566924
-Index: 6
-Address: 354fb8
-Native_address: bcefc
-Refc: 1
-=fun
-Module: erl_scan
-Uniq: 114637756
-Index: 12
-Address: 313c60
-Native_address: bced4
-Refc: 1
-=fun
-Module: erl_scan
-Uniq: 121316204
-Index: 31
-Address: 313a68
-Native_address: bced4
-Refc: 1
-=fun
-Module: code_server
-Uniq: 61363639
-Index: 12
-Address: 2ad6a4
-Native_address: bcefc
-Refc: 1
-=fun
-Module: inet_config
-Uniq: 116208699
-Index: 3
-Address: 274094
-Native_address: bcefc
-Refc: 1
-=fun
-Module: global_group
-Uniq: 113750737
-Index: 0
-Address: 292d54
-Native_address: bcefc
-Refc: 1
-=fun
-Module: gen_event
-Uniq: 12853672
-Index: 0
-Address: 222e74
-Native_address: bcefc
-Refc: 1
-=fun
-Module: webtool
-Uniq: 108046357
-Index: 12
-Address: 4ab0b0
-Native_address: bcefc
-Refc: 1
-=fun
-Module: erl_lint
-Uniq: 111569299
-Index: 47
-Address: 34e80c
-Native_address: bcef4
-Refc: 1
-=fun
-Module: erl_eval
-Uniq: 20108653
-Index: 15
-Address: 2f9f94
-Native_address: bcea4
-Refc: 1
-=fun
-Module: erl_scan
-Uniq: 45252965
-Index: 15
-Address: 313c0c
-Native_address: bced4
-Refc: 1
-=fun
-Module: webtool
-Uniq: 12437425
-Index: 9
-Address: 4ab3e0
-Native_address: bcefc
-Refc: 1
-=fun
-Module: erl_lint
-Uniq: 30942993
-Index: 22
-Address: 34f6ec
-Native_address: bcef4
-Refc: 1
-=fun
-Module: erl_parse
-Uniq: 93430337
-Index: 3
-Address: 33b100
-Native_address: bcefc
-Refc: 1
-=fun
-Module: erl_parse
-Uniq: 6604883
-Index: 2
-Address: 33b16c
-Native_address: bcefc
-Refc: 1
-=fun
-Module: rpc
-Uniq: 36867745
-Index: 5
-Address: 255e28
-Native_address: bcefc
-Refc: 1
-=fun
-Module: inet_parse
-Uniq: 90563105
-Index: 1
-Address: 285708
-Native_address: bcefc
-Refc: 1
-=fun
-Module: inet_db
-Uniq: 18519297
-Index: 7
-Address: 26ddfc
-Native_address: bcef4
-Refc: 1
-=fun
-Module: crashdump_viewer
-Uniq: 8058975
-Index: 16
-Address: 4a36b4
-Native_address: bcefc
-Refc: 1
-=fun
-Module: inet
-Uniq: 30694569
-Index: 7
-Address: 27d018
-Native_address: bcefc
-Refc: 1
-=fun
-Module: inet_config
-Uniq: 76933943
-Index: 0
-Address: 2741b4
-Native_address: bcefc
-Refc: 1
-=fun
-Module: crashdump_viewer
-Uniq: 9033258
-Index: 6
-Address: 4a4690
-Native_address: bcefc
-Refc: 1
-=fun
-Module: crashdump_viewer
-Uniq: 74851752
-Index: 5
-Address: 4a4798
-Native_address: bcef4
-Refc: 1
-=fun
-Module: global
-Uniq: 50855382
-Index: 4
-Address: 2659a8
-Native_address: bcefc
-Refc: 1
-=fun
-Module: erl_lint
-Uniq: 39211582
-Index: 52
-Address: 34e504
-Native_address: bceec
-Refc: 1
-=fun
-Module: file_server
-Uniq: 77665472
-Index: 0
-Address: 2a0dec
-Native_address: bcf04
-Refc: 1
-=fun
-Module: erl_eval
-Uniq: 57487277
-Index: 8
-Address: 2fa3c4
-Native_address: bce94
-Refc: 1
-=fun
-Module: webtool
-Uniq: 87386575
-Index: 11
-Address: 4ab1c8
-Native_address: bcefc
-Refc: 1
-=fun
-Module: crashdump_viewer
-Uniq: 58991950
-Index: 8
-Address: 4a4338
-Native_address: bcefc
-Refc: 1
-=fun
-Module: crashdump_viewer
-Uniq: 118859163
-Index: 17
-Address: 4a34d4
-Native_address: bcefc
-Refc: 1
-=fun
-Module: dict
-Uniq: 38265609
-Index: 12
-Address: 354dec
-Native_address: bcefc
-Refc: 1
-=fun
-Module: supervisor
-Uniq: 56903339
-Index: 1
-Address: 2527c4
-Native_address: bcefc
-Refc: 1
-=fun
-Module: inet_hosts
-Uniq: 129504763
-Index: 0
-Address: 28aae8
-Native_address: bcefc
-Refc: 1
-=fun
-Module: dict
-Uniq: 44817307
-Index: 10
-Address: 354e3c
-Native_address: bceec
-Refc: 1
-=fun
-Module: erl_lint
-Uniq: 52856894
-Index: 41
-Address: 34eb70
-Native_address: bcef4
-Refc: 1
-=fun
-Module: erl_lint
-Uniq: 22623360
-Index: 23
-Address: 34f5d4
-Native_address: bceec
-Refc: 1
-=fun
-Module: orddict
-Uniq: 34963136
-Index: 0
-Address: 2fbbbc
-Native_address: bcef4
-Refc: 1
-=fun
-Module: erlang
-Uniq: 24496633
-Index: 0
-Address: 213744
-Native_address: bcef4
-Refc: 1
-=fun
-Module: erl_eval
-Uniq: 99313855
-Index: 27
-Address: 2f9914
-Native_address: bcef4
-Refc: 1
-=fun
-Module: httpd_util
-Uniq: 99137703
-Index: 3
-Address: 4b5dfc
-Native_address: bcefc
-Refc: 1
-=fun
-Module: gen_event
-Uniq: 124043500
-Index: 3
-Address: 222b84
-Native_address: bcefc
-Refc: 1
-=fun
-Module: erl_scan
-Uniq: 102650878
-Index: 22
-Address: 313b48
-Native_address: bced4
-Refc: 1
-=fun
-Module: erl_lint
-Uniq: 13333720
-Index: 12
-Address: 34fb2c
-Native_address: bcef4
-Refc: 1
-=fun
-Module: global_group
-Uniq: 133457
-Index: 5
-Address: 292a80
-Native_address: bcefc
-Refc: 1
-=fun
-Module: net_kernel
-Uniq: 64640983
-Index: 4
-Address: 29e944
-Native_address: bcefc
-Refc: 1
-=fun
-Module: rpc
-Uniq: 7580218
-Index: 2
-Address: 255f08
-Native_address: bcf04
-Refc: 1
-=fun
-Module: erl_lint
-Uniq: 131850870
-Index: 59
-Address: 34e6b8
-Native_address: bcef4
-Refc: 1
-=fun
-Module: inet_parse
-Uniq: 56617403
-Index: 10
-Address: 284b40
-Native_address: bcefc
-Refc: 1
-=fun
-Module: webtool
-Uniq: 108680306
-Index: 4
-Address: 4ab5e0
-Native_address: bcefc
-Refc: 1
-=fun
-Module: inet_db
-Uniq: 90880071
-Index: 2
-Address: 26e150
-Native_address: bcefc
-Refc: 1
-=fun
-Module: file_io_server
-Uniq: 23980778
-Index: 0
-Address: 30ac30
-Native_address: bcf04
-Refc: 1
-=fun
-Module: erl_eval
-Uniq: 12006418
-Index: 19
-Address: 2f9d54
-Native_address: bce80
-Refc: 1
-=fun
-Module: crashdump_viewer_html
-Uniq: 81701030
-Index: 8
-Address: 526228
-Native_address: bcefc
-Refc: 1
-=fun
-Module: crashdump_viewer
-Uniq: 71013875
-Index: 1
-Address: 4a4ddc
-Native_address: bcf04
-Refc: 1
-=fun
-Module: distel
-Uniq: 87740845
-Index: 2
-Address: 35c0e0
-Native_address: bcf04
-Refc: 1
-=fun
-Module: erl_eval
-Uniq: 90782401
-Index: 17
-Address: 2f9e8c
-Native_address: bced4
-Refc: 1
-=fun
-Module: shell
-Uniq: 133882676
-Index: 6
-Address: 2e52ac
-Native_address: bcef4
-Refc: 1
-=fun
-Module: inet_parse
-Uniq: 105698088
-Index: 3
-Address: 2855b4
-Native_address: bcefc
-Refc: 1
-=fun
-Module: inet
-Uniq: 58370899
-Index: 0
-Address: 27d370
-Native_address: bcefc
-Refc: 1
-=fun
-Module: erl_eval
-Uniq: 15274536
-Index: 25
-Address: 2f9a94
-Native_address: bcef4
-Refc: 1
-=fun
-Module: supervisor
-Uniq: 94349557
-Index: 0
-Address: 252844
-Native_address: bcefc
-Refc: 1
-=fun
-Module: erl_parse
-Uniq: 33328185
-Index: 1
-Address: 33b1d8
-Native_address: bcef4
-Refc: 1
-=fun
-Module: erl_scan
-Uniq: 86971387
-Index: 16
-Address: 313db0
-Native_address: bced4
-Refc: 1
-=fun
-Module: erl_lint
-Uniq: 53364473
-Index: 38
-Address: 34ee84
-Native_address: bcefc
-Refc: 1
-=fun
-Module: webtool
-Uniq: 128145687
-Index: 0
-Address: 4ab944
-Native_address: bcee4
-Refc: 1
-=fun
-Module: c
-Uniq: 98651404
-Index: 10
-Address: 2fff20
-Native_address: bcefc
-Refc: 1
-=fun
-Module: erl_scan
-Uniq: 78224618
-Index: 0
-Address: 313dcc
-Native_address: bced4
-Refc: 1
-=fun
-Module: shell
-Uniq: 40779085
-Index: 11
-Address: 2e50c8
-Native_address: bcef4
-Refc: 1
-=fun
-Module: c
-Uniq: 93517350
-Index: 4
-Address: 300090
-Native_address: bcefc
-Refc: 1
-=fun
-Module: application_controller
-Uniq: 58551291
-Index: 0
-Address: 234f14
-Native_address: bcefc
-Refc: 1
-=fun
-Module: crashdump_viewer_html
-Uniq: 10055518
-Index: 17
-Address: 526170
-Native_address: bcefc
-Refc: 1
-=fun
-Module: erl_scan
-Uniq: 15795706
-Index: 19
-Address: 313bd4
-Native_address: bced4
-Refc: 1
-=fun
-Module: erl_scan
-Uniq: 31129467
-Index: 13
-Address: 313c44
-Native_address: bced4
-Refc: 1
-=fun
-Module: old_file_server
-Uniq: 115635393
-Index: 0
-Address: 2a1a4c
-Native_address: bcf04
-Refc: 2
-=fun
-Module: erl_eval
-Uniq: 65839696
-Index: 22
-Address: 2f9c00
-Native_address: bcef4
-Refc: 1
-=fun
-Module: erl_scan
-Uniq: 69275064
-Index: 28
-Address: 313aa0
-Native_address: bced4
-Refc: 1
-=fun
-Module: dict
-Uniq: 55938066
-Index: 11
-Address: 354d6c
-Native_address: bceec
-Refc: 1
-=fun
-Module: supervisor
-Uniq: 22323433
-Index: 3
-Address: 252688
-Native_address: bcefc
-Refc: 1
-=fun
-Module: erl_scan
-Uniq: 129726129
-Index: 29
-Address: 313abc
-Native_address: bced4
-Refc: 1
-=fun
-Module: dict
-Uniq: 84346832
-Index: 0
-Address: 3550fc
-Native_address: bceec
-Refc: 1
-=fun
-Module: shell
-Uniq: 102096820
-Index: 7
-Address: 2e5290
-Native_address: bcefc
-Refc: 1
-=fun
-Module: inet
-Uniq: 70385762
-Index: 11
-Address: 27cf44
-Native_address: bcefc
-Refc: 1
-=fun
-Module: mod_cgi
-Uniq: 1483038
-Index: 0
-Address: 4ec2e8
-Native_address: bcefc
-Refc: 1
-=fun
-Module: dict
-Uniq: 3664813
-Index: 1
-Address: 3550b4
-Native_address: bcef4
-Refc: 1
-=fun
-Module: inet
-Uniq: 131143671
-Index: 6
-Address: 27d08c
-Native_address: bcef4
-Refc: 1
-=fun
-Module: inet_config
-Uniq: 46286977
-Index: 2
-Address: 2740b0
-Native_address: bcefc
-Refc: 1
-=fun
-Module: mod_esi
-Uniq: 49099432
-Index: 0
-Address: 4e522c
-Native_address: bcefc
-Refc: 1
-=fun
-Module: application_master
-Uniq: 95764905
-Index: 2
-Address: 24aaa8
-Native_address: bcefc
-Refc: 1
-=fun
-Module: packages
-Uniq: 62890926
-Index: 0
-Address: 2ae814
-Native_address: bcef4
-Refc: 1
-=fun
-Module: erl_scan
-Uniq: 41564771
-Index: 35
-Address: 3139f8
-Native_address: bced4
-Refc: 1
-=fun
-Module: crashdump_viewer
-Uniq: 95490768
-Index: 0
-Address: 4a4dc0
-Native_address: bcf04
-Refc: 1
-=fun
-Module: erl_scan
-Uniq: 121559432
-Index: 3
-Address: 313d78
-Native_address: bced4
-Refc: 1
-=fun
-Module: httpd_conf
-Uniq: 21152662
-Index: 0
-Address: 4be5a0
-Native_address: bcefc
-Refc: 1
-=fun
-Module: net_kernel
-Uniq: 41630916
-Index: 5
-Address: 29e914
-Native_address: bcefc
-Refc: 1
-=fun
-Module: erl_scan
-Uniq: 19747201
-Index: 5
-Address: 313d24
-Native_address: bced4
-Refc: 1
-=fun
-Module: erl_lint
-Uniq: 100584837
-Index: 36
-Address: 34f0f4
-Native_address: bcef4
-Refc: 1
-=fun
-Module: erl_lint
-Uniq: 64635712
-Index: 15
-Address: 34f94c
-Native_address: bcef4
-Refc: 1
-=fun
-Module: net_kernel
-Uniq: 46398361
-Index: 3
-Address: 29e9a4
-Native_address: bcefc
-Refc: 1
-=fun
-Module: erl_scan
-Uniq: 86699817
-Index: 27
-Address: 313b2c
-Native_address: bced4
-Refc: 1
-=fun
-Module: distel
-Uniq: 40869731
-Index: 0
-Address: 35c12c
-Native_address: bcf04
-Refc: 1
-=fun
-Module: inet
-Uniq: 83701641
-Index: 1
-Address: 27d33c
-Native_address: bcefc
-Refc: 1
-=fun
-Module: mod_auth
-Uniq: 85845790
-Index: 0
-Address: 4dfd84
-Native_address: bcefc
-Refc: 1
-=fun
-Module: shell
-Uniq: 101292714
-Index: 9
-Address: 2e519c
-Native_address: bcefc
-Refc: 1
-=fun
-Module: global
-Uniq: 134173702
-Index: 1
-Address: 265b68
-Native_address: bcefc
-Refc: 1
-=fun
-Module: code_server
-Uniq: 92433687
-Index: 6
-Address: 2ad9f4
-Native_address: bcef4
-Refc: 1
-=fun
-Module: dict
-Uniq: 62315241
-Index: 8
-Address: 354f38
-Native_address: bcefc
-Refc: 1
-=fun
-Module: global
-Uniq: 11615541
-Index: 12
-Address: 265530
-Native_address: bcefc
-Refc: 1
-=fun
-Module: hipe_unified_loader
-Uniq: 11160090
-Index: 2
-Address: 2b6bb4
-Native_address: bcef4
-Refc: 1
-=fun
-Module: application_controller
-Uniq: 12116524
-Index: 15
-Address: 2342c4
-Native_address: bcef4
-Refc: 1
-=fun
-Module: mod_log
-Uniq: 61620901
-Index: 2
-Address: 4fc670
-Native_address: bcefc
-Refc: 1
-=fun
-Module: crashdump_viewer
-Uniq: 23665189
-Index: 12
-Address: 4a3b94
-Native_address: bcefc
-Refc: 1
-=fun
-Module: c
-Uniq: 43844413
-Index: 0
-Address: 300100
-Native_address: bcefc
-Refc: 1
-=fun
-Module: erl_scan
-Uniq: 100514258
-Index: 6
-Address: 313d08
-Native_address: bced4
-Refc: 1
-=fun
-Module: erl_lint
-Uniq: 54271286
-Index: 17
-Address: 34f8a0
-Native_address: bcefc
-Refc: 1
-=fun
-Module: inet_db
-Uniq: 47017252
-Index: 3
-Address: 26dfa0
-Native_address: bcefc
-Refc: 1
-=fun
-Module: crashdump_viewer
-Uniq: 1228304
-Index: 7
-Address: 4a45a4
-Native_address: bcefc
-Refc: 1
-=fun
-Module: global
-Uniq: 127131470
-Index: 10
-Address: 2655a0
-Native_address: bcefc
-Refc: 1
-=fun
-Module: file_server
-Uniq: 22638227
-Index: 1
-Address: 2a0e20
-Native_address: bcf04
-Refc: 1
-=fun
-Module: code_server
-Uniq: 112704920
-Index: 15
-Address: 2ad488
-Native_address: bcefc
-Refc: 1
-=fun
-Module: erl_eval
-Uniq: 88302875
-Index: 2
-Address: 2fa76c
-Native_address: bceb4
-Refc: 1
-=fun
-Module: inet_hosts
-Uniq: 85808984
-Index: 1
-Address: 28ab18
-Native_address: bcefc
-Refc: 1
-=fun
-Module: erl_parse
-Uniq: 106391799
-Index: 0
-Address: 33b22c
-Native_address: bcefc
-Refc: 1
-=fun
-Module: inet
-Uniq: 25830519
-Index: 5
-Address: 27d0c0
-Native_address: bcefc
-Refc: 1
-=fun
-Module: shell
-Uniq: 110491036
-Index: 1
-Address: 2e5398
-Native_address: bcef4
-Refc: 1
-=fun
-Module: crashdump_viewer_html
-Uniq: 13128736
-Index: 5
-Address: 52627c
-Native_address: bcefc
-Refc: 1
-=fun
-Module: erl_scan
-Uniq: 84644982
-Index: 21
-Address: 313b9c
-Native_address: bced4
-Refc: 1
-=fun
-Module: erl_lint
-Uniq: 120577486
-Index: 3
-Address: 34fffc
-Native_address: bcefc
-Refc: 1
-=fun
-Module: erl_lint
-Uniq: 4504456
-Index: 44
-Address: 34e938
-Native_address: bceec
-Refc: 1
-=fun
-Module: mod_disk_log
-Uniq: 28754183
-Index: 0
-Address: 500140
-Native_address: bcefc
-Refc: 1
-=fun
-Module: erl_scan
-Uniq: 88043334
-Index: 14
-Address: 313c28
-Native_address: bced4
-Refc: 1
-=fun
-Module: code_server
-Uniq: 61592373
-Index: 0
-Address: 2adc28
-Native_address: bcf04
-Refc: 1
-=fun
-Module: erl_scan
-Uniq: 74468346
-Index: 26
-Address: 313ad8
-Native_address: bced4
-Refc: 1
-=fun
-Module: erl_eval
-Uniq: 69896253
-Index: 21
-Address: 2f9c40
-Native_address: bce80
-Refc: 1
-=fun
-Module: global_group
-Uniq: 59656873
-Index: 4
-Address: 292ac0
-Native_address: bcefc
-Refc: 1
-=fun
-Module: crashdump_viewer
-Uniq: 103891261
-Index: 2
-Address: 4a4d70
-Native_address: bcefc
-Refc: 1
-=fun
-Module: httpd_util
-Uniq: 89619733
-Index: 0
-Address: 4b5e64
-Native_address: bcefc
-Refc: 1
-=fun
-Module: shell
-Uniq: 133201466
-Index: 10
-Address: 2e5180
-Native_address: bceec
-Refc: 1
-=fun
-Module: webtool
-Uniq: 32159369
-Index: 2
-Address: 4ab820
-Native_address: bcefc
-Refc: 1
-=fun
-Module: code_server
-Uniq: 76861396
-Index: 2
-Address: 2adbb0
-Native_address: bcefc
-Refc: 1
-=fun
-Module: mod_log
-Uniq: 48206487
-Index: 0
-Address: 4fc6f0
-Native_address: bcefc
-Refc: 1
-=fun
-Module: erl_lint
-Uniq: 118996551
-Index: 28
-Address: 34f384
-Native_address: bcefc
-Refc: 1
-=fun
-Module: erl_lint
-Uniq: 12593774
-Index: 50
-Address: 34e60c
-Native_address: bcef4
-Refc: 1
-=fun
-Module: httpd_request_handler
-Uniq: 48542841
-Index: 1
-Address: 50e88c
-Native_address: bcefc
-Refc: 1
-=fun
-Module: crashdump_viewer
-Uniq: 56178490
-Index: 9
-Address: 4a420c
-Native_address: bcefc
-Refc: 1
-=fun
-Module: distel
-Uniq: 88212576
-Index: 4
-Address: 35bf44
-Native_address: bcefc
-Refc: 1
-=fun
-Module: erl_lint
-Uniq: 79562132
-Index: 29
-Address: 34f368
-Native_address: bcefc
-Refc: 1
-=fun
-Module: erl_lint
-Uniq: 129524917
-Index: 32
-Address: 34f2c0
-Native_address: bcefc
-Refc: 1
-=fun
-Module: erl_eval
-Uniq: 54029891
-Index: 23
-Address: 2f9af0
-Native_address: bcefc
-Refc: 1
-=fun
-Module: inet
-Uniq: 108872092
-Index: 4
-Address: 27d0f0
-Native_address: bcef4
-Refc: 1
-=fun
-Module: application_controller
-Uniq: 40905124
-Index: 6
-Address: 234ac0
-Native_address: bcef4
-Refc: 1
-=fun
-Module: code_server
-Uniq: 50124876
-Index: 10
-Address: 2ad760
-Native_address: bcefc
-Refc: 1
-=fun
-Module: erl_lint
-Uniq: 791358
-Index: 48
-Address: 34e7b0
-Native_address: bcef4
-Refc: 1
-=fun
-Module: erl_scan
-Uniq: 18404828
-Index: 24
-Address: 313af4
-Native_address: bced4
-Refc: 1
-=fun
-Module: httpd_util
-Uniq: 13278653
-Index: 1
-Address: 4b5e48
-Native_address: bcefc
-Refc: 1
-=fun
-Module: inet_parse
-Uniq: 110307423
-Index: 13
-Address: 284a7c
-Native_address: bcefc
-Refc: 1
-=fun
-Module: rpc
-Uniq: 99592247
-Index: 0
-Address: 256118
-Native_address: bcf04
-Refc: 1
-=fun
-Module: global
-Uniq: 99918211
-Index: 2
-Address: 265af4
-Native_address: bcefc
-Refc: 1
-=fun
-Module: erl_lint
-Uniq: 71442319
-Index: 27
-Address: 34f510
-Native_address: bcef4
-Refc: 1
-=fun
-Module: erl_eval
-Uniq: 7612785
-Index: 13
-Address: 2fa0fc
-Native_address: bce80
-Refc: 1
-=fun
-Module: crashdump_viewer
-Uniq: 56095795
-Index: 15
-Address: 4a38a0
-Native_address: bcefc
-Refc: 1
-=fun
-Module: erl_scan
-Uniq: 23626796
-Index: 25
-Address: 313b10
-Native_address: bced4
-Refc: 1
-=fun
-Module: file_server
-Uniq: 126074974
-Index: 2
-Address: 2a0cac
-Native_address: bcef4
-Refc: 1
-=fun
-Module: inet_config
-Uniq: 104278122
-Index: 1
-Address: 274154
-Native_address: bcefc
-Refc: 1
-=fun
-Module: sys
-Uniq: 90854051
-Index: 0
-Address: 240344
-Native_address: bcefc
-Refc: 1
-=fun
-Module: erl_scan
-Uniq: 113334594
-Index: 2
-Address: 313d5c
-Native_address: bced4
-Refc: 1
-=fun
-Module: inet_parse
-Uniq: 8832142
-Index: 7
-Address: 284e30
-Native_address: bcefc
-Refc: 1
-=fun
-Module: erl_lint
-Uniq: 9159706
-Index: 42
-Address: 34eb54
-Native_address: bceec
-Refc: 1
-=fun
-Module: inet_db
-Uniq: 123946665
-Index: 8
-Address: 26e494
-Native_address: bcefc
-Refc: 1
-=fun
-Module: crashdump_viewer_html
-Uniq: 3149789
-Index: 1
-Address: 5262d0
-Native_address: bcefc
-Refc: 1
-=fun
-Module: c
-Uniq: 48288621
-Index: 11
-Address: 2ffed8
-Native_address: bcefc
-Refc: 1
-=fun
-Module: crashdump_viewer
-Uniq: 8953292
-Index: 20
-Address: 4a4d54
-Native_address: bcee4
-Refc: 1
-=fun
-Module: erl_lint
-Uniq: 9632158
-Index: 4
-Address: 34ff88
-Native_address: bcefc
-Refc: 1
-=fun
-Module: net_kernel
-Uniq: 31111567
-Index: 7
-Address: 29e8c8
-Native_address: bcef4
-Refc: 1
-=fun
-Module: erl_eval
-Uniq: 85307443
-Index: 10
-Address: 2fa29c
-Native_address: bcec4
-Refc: 1
-=fun
-Module: erl_scan
-Uniq: 104417191
-Index: 7
-Address: 313cd0
-Native_address: bced4
-Refc: 1
-=fun
-Module: dict
-Uniq: 43625777
-Index: 5
-Address: 354fec
-Native_address: bcefc
-Refc: 1
-=fun
-Module: webtool
-Uniq: 92698798
-Index: 3
-Address: 4ab780
-Native_address: bcefc
-Refc: 1
-=fun
-Module: erl_eval
-Uniq: 39074546
-Index: 6
-Address: 2fa54c
-Native_address: bcefc
-Refc: 1
-=fun
-Module: application_controller
-Uniq: 71451126
-Index: 5
-Address: 234b98
-Native_address: bcefc
-Refc: 1
-=fun
-Module: c
-Uniq: 122084387
-Index: 6
-Address: 300038
-Native_address: bcefc
-Refc: 1
-=fun
-Module: inet_parse
-Uniq: 9625924
-Index: 14
-Address: 284a60
-Native_address: bcefc
-Refc: 1
-=fun
-Module: erl_scan
-Uniq: 128777368
-Index: 11
-Address: 313c7c
-Native_address: bced4
-Refc: 1
-=fun
-Module: webtool
-Uniq: 10203723
-Index: 7
-Address: 4ab4f8
-Native_address: bcefc
-Refc: 1
-=fun
-Module: erl_scan
-Uniq: 35032400
-Index: 10
-Address: 313c98
-Native_address: bced4
-Refc: 1
-=fun
-Module: erl_scan
-Uniq: 17252586
-Index: 34
-Address: 313a14
-Native_address: bced4
-Refc: 1
-=fun
-Module: code_server
-Uniq: 7177165
-Index: 11
-Address: 2ad734
-Native_address: bcefc
-Refc: 1
-=fun
-Module: crashdump_viewer
-Uniq: 115778175
-Index: 3
-Address: 4a4930
-Native_address: bcefc
-Refc: 1
-=fun
-Module: erl_lint
-Uniq: 96440880
-Index: 51
-Address: 34e590
-Native_address: bcefc
-Refc: 1
-=fun
-Module: hipe_unified_loader
-Uniq: 68275407
-Index: 0
-Address: 2b7340
-Native_address: bcefc
-Refc: 1
-=fun
-Module: erl_eval
-Uniq: 88854488
-Index: 16
-Address: 2f9f04
-Native_address: bcebc
-Refc: 1
-=fun
-Module: global
-Uniq: 26353848
-Index: 13
-Address: 2654e8
-Native_address: bcf04
-Refc: 3
-=fun
-Module: global
-Uniq: 93414722
-Index: 11
-Address: 265568
-Native_address: bcefc
-Refc: 1
-=fun
-Module: erl_lint
-Uniq: 11194189
-Index: 60
-Address: 34fe0c
-Native_address: bcef4
-Refc: 1
-=fun
-Module: c
-Uniq: 125189992
-Index: 8
-Address: 2fffdc
-Native_address: bcefc
-Refc: 1
-=fun
-Module: dict
-Uniq: 112472016
-Index: 2
-Address: 355088
-Native_address: bceec
-Refc: 1
-=fun
-Module: shell
-Uniq: 104426442
-Index: 5
-Address: 2e52e0
-Native_address: bceec
-Refc: 1
-=fun
-Module: global
-Uniq: 17426458
-Index: 0
-Address: 265bc4
-Native_address: bcefc
-Refc: 1
-=fun
-Module: code_server
-Uniq: 81191039
-Index: 5
-Address: 2ada48
-Native_address: bcef4
-Refc: 1
-=fun
-Module: inet_parse
-Uniq: 71765042
-Index: 5
-Address: 284f74
-Native_address: bcefc
-Refc: 1
-=fun
-Module: init
-Uniq: 85855821
-Index: 2
-Address: 1fa298
-Native_address: bcefc
-Refc: 1
-=fun
-Module: crashdump_viewer
-Uniq: 70586122
-Index: 10
-Address: 4a3fe4
-Native_address: bcefc
-Refc: 1
-=fun
-Module: erl_lint
-Uniq: 87067911
-Index: 49
-Address: 34e708
-Native_address: bcef4
-Refc: 1
-=fun
-Module: distel
-Uniq: 63126735
-Index: 1
-Address: 35c0fc
-Native_address: bcf04
-Refc: 1
-=fun
-Module: c
-Uniq: 58270309
-Index: 1
-Address: 3000e4
-Native_address: bcefc
-Refc: 1
-=fun
-Module: ets
-Uniq: 80538457
-Index: 1
-Address: 2bc1a0
-Native_address: bcefc
-Refc: 1
-=fun
-Module: erl_lint
-Uniq: 69827241
-Index: 9
-Address: 34fd70
-Native_address: bcef4
-Refc: 1
-=fun
-Module: dict
-Uniq: 103968752
-Index: 3
-Address: 355054
-Native_address: bcefc
-Refc: 1
-=fun
-Module: erl_lint
-Uniq: 117175573
-Index: 21
-Address: 34f728
-Native_address: bcef4
-Refc: 1
-=fun
-Module: shell
-Uniq: 57865450
-Index: 2
-Address: 2e537c
-Native_address: bcef4
-Refc: 1
-=fun
-Module: erl_scan
-Uniq: 14705965
-Index: 20
-Address: 313b80
-Native_address: bced4
-Refc: 1
-=fun
-Module: webtool
-Uniq: 85360931
-Index: 6
-Address: 4ab56c
-Native_address: bcefc
-Refc: 1
-=fun
-Module: kernel_config
-Uniq: 41755598
-Index: 0
-Address: 2d9e20
-Native_address: bcefc
-Refc: 1
-=fun
-Module: erl_lint
-Uniq: 7110547
-Index: 37
-Address: 34ef14
-Native_address: bcef4
-Refc: 1
-=fun
-Module: application_controller
-Uniq: 28091577
-Index: 16
-Address: 234244
-Native_address: bcef4
-Refc: 2
-=fun
-Module: code_server
-Uniq: 96448152
-Index: 14
-Address: 2ad4e4
-Native_address: bcefc
-Refc: 1
-=fun
-Module: crashdump_viewer
-Uniq: 40177568
-Index: 13
-Address: 4a39a4
-Native_address: bcefc
-Refc: 1
-=fun
-Module: erl_lint
-Uniq: 31948320
-Index: 58
-Address: 34dfdc
-Native_address: bcef4
-Refc: 1
-=fun
-Module: global
-Uniq: 54153760
-Index: 7
-Address: 265854
-Native_address: bcefc
-Refc: 1
-=fun
-Module: crashdump_viewer_html
-Uniq: 60156260
-Index: 3
-Address: 5262b4
-Native_address: bcefc
-Refc: 1
-=fun
-Module: erl_lint
-Uniq: 1010616
-Index: 2
-Address: 350064
-Native_address: bcef4
-Refc: 1
-=fun
-Module: init
-Uniq: 96784459
-Index: 1
-Address: 1fa2b4
-Native_address: bcefc
-Refc: 1
-=fun
-Module: erl_scan
-Uniq: 48691771
-Index: 18
-Address: 313bb8
-Native_address: bced4
-Refc: 1
-=fun
-Module: global
-Uniq: 26895060
-Index: 9
-Address: 265710
-Native_address: bcefc
-Refc: 1
-=fun
-Module: code_server
-Uniq: 109625093
-Index: 7
-Address: 2ad8fc
-Native_address: bcef4
-Refc: 1
-=fun
-Module: erl_lint
-Uniq: 59436171
-Index: 1
-Address: 3500dc
-Native_address: bcef4
-Refc: 1
-=fun
-Module: dict
-Uniq: 92768306
-Index: 9
-Address: 354f04
-Native_address: bcefc
-Refc: 1
-=fun
-Module: global_group
-Uniq: 106430008
-Index: 3
-Address: 292b38
-Native_address: bcefc
-Refc: 1
-=fun
-Module: init
-Uniq: 79749196
-Index: 6
-Address: 1fa01c
-Native_address: bceec
-Refc: 1
-=fun
-Module: erl_eval
-Uniq: 6014929
-Index: 9
-Address: 2fa324
-Native_address: bceac
-Refc: 1
-=fun
-Module: application_controller
-Uniq: 57051922
-Index: 7
-Address: 234a28
-Native_address: bcef4
-Refc: 1
-=fun
-Module: net_kernel
-Uniq: 77043468
-Index: 6
-Address: 29e8e4
-Native_address: bcefc
-Refc: 1
-=fun
-Module: crashdump_viewer_html
-Uniq: 36176045
-Index: 9
-Address: 52620c
-Native_address: bcefc
-Refc: 1
-=fun
-Module: rpc
-Uniq: 35862809
-Index: 3
-Address: 255edc
-Native_address: bcefc
-Refc: 1
-=fun
-Module: inet_parse
-Uniq: 113649451
-Index: 4
-Address: 2850a0
-Native_address: bcefc
-Refc: 1
-=fun
-Module: global
-Uniq: 67943969
-Index: 5
-Address: 2658f4
-Native_address: bcefc
-Refc: 1
-=fun
-Module: crashdump_viewer_html
-Uniq: 109003032
-Index: 16
-Address: 5260d0
-Native_address: bcefc
-Refc: 1
-=fun
-Module: crashdump_viewer_html
-Uniq: 104711447
-Index: 13
-Address: 525f5c
-Native_address: bcefc
-Refc: 1
-=fun
-Module: inet
-Uniq: 107666872
-Index: 9
-Address: 27cfb0
-Native_address: bcefc
-Refc: 1
-=fun
-Module: crashdump_viewer_html
-Uniq: 89410000
-Index: 10
-Address: 5261f0
-Native_address: bcefc
-Refc: 1
-=fun
-Module: inet_parse
-Uniq: 47356870
-Index: 11
-Address: 284ab4
-Native_address: bcefc
-Refc: 1
-=fun
-Module: erl_lint
-Uniq: 17873449
-Index: 56
-Address: 34e1e8
-Native_address: bcef4
-Refc: 1
-=fun
-Module: erl_lint
-Uniq: 8839441
-Index: 33
-Address: 34f25c
-Native_address: bcefc
-Refc: 1
-=fun
-Module: gen_event
-Uniq: 82513204
-Index: 2
-Address: 222c18
-Native_address: bcefc
-Refc: 1
-=fun
-Module: application_master
-Uniq: 5973059
-Index: 0
-Address: 24ab7c
-Native_address: bcefc
-Refc: 1
-=fun
-Module: inet_gethost_native
-Uniq: 127832132
-Index: 0
-Address: 4b065c
-Native_address: bcefc
-Refc: 2
-=fun
-Module: crashdump_viewer_html
-Uniq: 39322658
-Index: 14
-Address: 525f40
-Native_address: bcefc
-Refc: 1
-=fun
-Module: gen_server
-Uniq: 100284021
-Index: 0
-Address: 23d288
-Native_address: bcf04
-Refc: 1
-=fun
-Module: inet_parse
-Uniq: 17430070
-Index: 12
-Address: 284a98
-Native_address: bcefc
-Refc: 1
-=fun
-Module: init
-Uniq: 97509773
-Index: 3
-Address: 1fa27c
-Native_address: bcefc
-Refc: 1
-=fun
-Module: distel
-Uniq: 32364818
-Index: 3
-Address: 35c050
-Native_address: bcefc
-Refc: 1
-=fun
-Module: erl_scan
-Uniq: 58576084
-Index: 32
-Address: 313a4c
-Native_address: bced4
-Refc: 1
-=fun
-Module: crashdump_viewer
-Uniq: 38384851
-Index: 14
-Address: 4a3988
-Native_address: bceec
-Refc: 1
-=fun
-Module: application_controller
-Uniq: 14139883
-Index: 4
-Address: 234d78
-Native_address: bcefc
-Refc: 1
-=fun
-Module: erl_eval
-Uniq: 122590256
-Index: 0
-Address: 2fa8b4
-Native_address: bcef4
-Refc: 1
-=fun
-Module: erl_eval
-Uniq: 14705629
-Index: 11
-Address: 2fa22c
-Native_address: bcedc
-Refc: 1
-=fun
-Module: erl_eval
-Uniq: 9273769
-Index: 4
-Address: 2fa684
-Native_address: bcee4
-Refc: 1
-=fun
-Module: crashdump_viewer_html
-Uniq: 87950142
-Index: 11
-Address: 5261d4
-Native_address: bcefc
-Refc: 1
-=fun
-Module: mod_log
-Uniq: 54913678
-Index: 1
-Address: 4fc6b0
-Native_address: bcefc
-Refc: 1
-=fun
-Module: inet_db
-Uniq: 28370334
-Index: 0
-Address: 26e4b0
-Native_address: bcefc
-Refc: 1
-=fun
-Module: erl_lint
-Uniq: 24927227
-Index: 40
-Address: 34ed4c
-Native_address: bceec
-Refc: 1
-=fun
-Module: erl_scan
-Uniq: 105437500
-Index: 33
-Address: 313a30
-Native_address: bced4
-Refc: 1
-=fun
-Module: application_controller
-Uniq: 10921695
-Index: 1
-Address: 234eac
-Native_address: bcefc
-Refc: 1
-=fun
-Module: erl_lint
-Uniq: 112431564
-Index: 55
-Address: 34e22c
-Native_address: bceec
-Refc: 1
-=fun
-Module: webtool
-Uniq: 129460863
-Index: 5
-Address: 4ab5c4
-Native_address: bcefc
-Refc: 1
-=fun
-Module: inet
-Uniq: 89001648
-Index: 3
-Address: 27d2ec
-Native_address: bcefc
-Refc: 1
-=fun
-Module: inet
-Uniq: 36199507
-Index: 8
-Address: 27cfe4
-Native_address: bcefc
-Refc: 1
-=fun
-Module: crashdump_viewer_html
-Uniq: 35620771
-Index: 2
-Address: 5262ec
-Native_address: bcefc
-Refc: 1
-=fun
-Module: erl_eval
-Uniq: 83214871
-Index: 18
-Address: 2f9e34
-Native_address: bceec
-Refc: 1
-=fun
-Module: code_server
-Uniq: 122455383
-Index: 1
-Address: 2adc0c
-Native_address: bcf04
-Refc: 1
-=fun
-Module: erl_lint
-Uniq: 22389488
-Index: 31
-Address: 34f1b8
-Native_address: bceec
-Refc: 1
-=fun
-Module: erl_eval
-Uniq: 41869059
-Index: 12
-Address: 2fa1d4
-Native_address: bcef4
-Refc: 1
-=fun
-Module: erl_lint
-Uniq: 18130505
-Index: 45
-Address: 34e904
-Native_address: bcefc
-Refc: 1
-=fun
-Module: hipe_unified_loader
-Uniq: 107414126
-Index: 1
-Address: 2b706c
-Native_address: bcefc
-Refc: 1
-=fun
-Module: erl_eval
-Uniq: 116638945
-Index: 28
-Address: 2f98f8
-Native_address: bcefc
-Refc: 1
-=fun
-Module: application_controller
-Uniq: 48465762
-Index: 9
-Address: 2348c8
-Native_address: bcefc
-Refc: 1
-=fun
-Module: httpd_request_handler
-Uniq: 87633852
-Index: 0
-Address: 50e97c
-Native_address: bcefc
-Refc: 1
-=fun
-Module: webtool
-Uniq: 28213098
-Index: 8
-Address: 4ab42c
-Native_address: bcefc
-Refc: 1
-=fun
-Module: gen_event
-Uniq: 123630574
-Index: 4
-Address: 222b58
-Native_address: bcefc
-Refc: 1
-=fun
-Module: dict
-Uniq: 127425508
-Index: 13
-Address: 354eb4
-Native_address: bcefc
-Refc: 1
-=fun
-Module: code_server
-Uniq: 95048118
-Index: 16
-Address: 2ad46c
-Native_address: bcef4
-Refc: 1
-=fun
-Module: erl_lint
-Uniq: 108661978
-Index: 19
-Address: 34f75c
-Native_address: bcefc
-Refc: 1
-=fun
-Module: erl_lint
-Uniq: 21272619
-Index: 13
-Address: 34fad8
-Native_address: bcef4
-Refc: 1
-=fun
-Module: erl_scan
-Uniq: 29943747
-Index: 17
-Address: 313bf0
-Native_address: bced4
-Refc: 1
-=fun
-Module: erl_scan
-Uniq: 120240397
-Index: 4
-Address: 313d94
-Native_address: bced4
-Refc: 1
-=fun
-Module: erl_lint
-Uniq: 124060676
-Index: 0
-Address: 350124
-Native_address: bcef4
-Refc: 1
-=fun
-Module: crashdump_viewer_html
-Uniq: 100975346
-Index: 6
-Address: 526260
-Native_address: bcefc
-Refc: 1
-=fun
-Module: code_server
-Uniq: 61421476
-Index: 4
-Address: 2ada9c
-Native_address: bcef4
-Refc: 1
-=fun
-Module: erl_lint
-Uniq: 45197232
-Index: 7
-Address: 34fe5c
-Native_address: bcef4
-Refc: 1
-=fun
-Module: crashdump_viewer_html
-Uniq: 3151900
-Index: 15
-Address: 525f24
-Native_address: bcefc
-Refc: 1
-=fun
-Module: httpd_util
-Uniq: 77509245
-Index: 2
-Address: 4b5e2c
-Native_address: bcefc
-Refc: 1
-=fun
-Module: code_server
-Uniq: 94110229
-Index: 8
-Address: 2ad7e4
-Native_address: bcef4
-Refc: 3
-=fun
-Module: rpc
-Uniq: 101217130
-Index: 1
-Address: 2560c4
-Native_address: bcf04
-Refc: 1
-=fun
-Module: lists
-Uniq: 103647452
-Index: 0
-Address: 244b7c
-Native_address: bcefc
-Refc: 1
-=fun
-Module: code_server
-Uniq: 37841211
-Index: 9
-Address: 2ad77c
-Native_address: bcef4
-Refc: 1
-=fun
-Module: erl_lint
-Uniq: 40109251
-Index: 54
-Address: 34e2b4
-Native_address: bcef4
-Refc: 1
-=fun
-Module: init
-Uniq: 98012300
-Index: 0
-Address: 1fa2d0
-Native_address: bcefc
-Refc: 1
-=fun
-Module: webtool
-Uniq: 73604759
-Index: 10
-Address: 4ab270
-Native_address: bcefc
-Refc: 1
-=fun
-Module: erl_scan
-Uniq: 12042434
-Index: 1
-Address: 313d40
-Native_address: bced4
-Refc: 1
-=fun
-Module: shell
-Uniq: 127137775
-Index: 4
-Address: 2e531c
-Native_address: bcf04
-Refc: 1
-=fun
-Module: inet
-Uniq: 45498037
-Index: 12
-Address: 27cec0
-Native_address: bcefc
-Refc: 1
-=fun
-Module: erl_lint
-Uniq: 122441107
-Index: 34
-Address: 34f1d4
-Native_address: bcefc
-Refc: 1
-=fun
-Module: erl_lint
-Uniq: 70933889
-Index: 46
-Address: 34e8d0
-Native_address: bcef4
-Refc: 1
-=fun
-Module: inet
-Uniq: 69850797
-Index: 2
-Address: 27d308
-Native_address: bcefc
-Refc: 1
-=fun
-Module: application_controller
-Uniq: 103965539
-Index: 13
-Address: 234684
-Native_address: bcefc
-Refc: 1
-=fun
-Module: erl_scan
-Uniq: 29979659
-Index: 30
-Address: 313a84
-Native_address: bced4
-Refc: 1
-=fun
-Module: erl_lint
-Uniq: 17148721
-Index: 20
-Address: 34f778
-Native_address: bcefc
-Refc: 1
-=fun
-Module: httpd_response
-Uniq: 100673049
-Index: 0
-Address: 5165dc
-Native_address: bcefc
-Refc: 1
-=fun
-Module: inet_gethost_native
-Uniq: 10508176
-Index: 1
-Address: 4b04dc
-Native_address: bcefc
-Refc: 1
-=fun
-Module: erl_lint
-Uniq: 32476064
-Index: 57
-Address: 34e1c4
-Native_address: bcef4
-Refc: 1
-=fun
-Module: erl_scan
-Uniq: 74835078
-Index: 9
-Address: 313cec
-Native_address: bced4
-Refc: 1
-=fun
-Module: crashdump_viewer
-Uniq: 60689814
-Index: 19
-Address: 4a3b78
-Native_address: bceec
-Refc: 1
-=fun
-Module: erl_lint
-Uniq: 39269715
-Index: 5
-Address: 34ff14
-Native_address: bcef4
-Refc: 1
-=fun
-Module: shell
-Uniq: 112923172
-Index: 0
-Address: 2e5404
-Native_address: bcf04
-Refc: 1
-=fun
-Module: erl_eval
-Uniq: 43010824
-Index: 14
-Address: 2fa03c
-Native_address: bce8c
-Refc: 1
-=fun
-Module: global
-Uniq: 82495254
-Index: 3
-Address: 265ac8
-Native_address: bcefc
-Refc: 1
-=fun
-Module: shell
-Uniq: 48568081
-Index: 8
-Address: 2e5220
-Native_address: bcefc
-Refc: 1
-=fun
-Module: init
-Uniq: 77236637
-Index: 7
-Address: 1fa000
-Native_address: bcf04
-Refc: 1
-=fun
-Module: erl_eval
-Uniq: 109386574
-Index: 1
-Address: 2fa804
-Native_address: bce9c
-Refc: 1
-=fun
-Module: erl_lint
-Uniq: 42613220
-Index: 14
-Address: 34f980
-Native_address: bcef4
-Refc: 1
-=fun
-Module: erl_scan
-Uniq: 67093144
-Index: 23
-Address: 313b64
-Native_address: bced4
-Refc: 1
-=fun
-Module: erl_lint
-Uniq: 86833790
-Index: 11
-Address: 34fbe8
-Native_address: bcefc
-Refc: 1
-=fun
-Module: net_kernel
-Uniq: 6344855
-Index: 1
-Address: 29eabc
-Native_address: bcefc
-Refc: 1
-=fun
-Module: erl_lint
-Uniq: 5149749
-Index: 35
-Address: 34f220
-Native_address: bcefc
-Refc: 1
-=fun
-Module: init
-Uniq: 93451769
-Index: 5
-Address: 1fa120
-Native_address: bcefc
-Refc: 1
-=fun
-Module: application_controller
-Uniq: 117428568
-Index: 11
-Address: 234758
-Native_address: bcefc
-Refc: 1
-=fun
-Module: crashdump_viewer_html
-Uniq: 15225890
-Index: 4
-Address: 526298
-Native_address: bcefc
-Refc: 1
-=fun
-Module: application_controller
-Uniq: 120760477
-Index: 2
-Address: 234cdc
-Native_address: bcefc
-Refc: 1
-=fun
-Module: c
-Uniq: 88561919
-Index: 3
-Address: 3000ac
-Native_address: bcefc
-Refc: 1
-=fun
-Module: erl_scan
-Uniq: 108931174
-Index: 8
-Address: 313cb4
-Native_address: bced4
-Refc: 1
-=fun
-Module: rpc
-Uniq: 122901192
-Index: 4
-Address: 255e44
-Native_address: bcf04
-Refc: 1
-=fun
-Module: erl_lint
-Uniq: 32985930
-Index: 10
-Address: 34fc40
-Native_address: bcef4
-Refc: 1
-=fun
-Module: global_group
-Uniq: 97968498
-Index: 1
-Address: 292b7c
-Native_address: bcef4
-Refc: 1
-=fun
-Module: crashdump_viewer
-Uniq: 45671671
-Index: 18
-Address: 4a32d0
-Native_address: bcefc
-Refc: 1
-=fun
-Module: erl_eval
-Uniq: 117968056
-Index: 3
-Address: 2fa6ec
-Native_address: bcecc
-Refc: 1
-=fun
-Module: init
-Uniq: 108717591
-Index: 4
-Address: 1fa194
-Native_address: bcf04
-Refc: 1
-=fun
-Module: supervisor
-Uniq: 15091954
-Index: 2
-Address: 2526dc
-Native_address: bcefc
-Refc: 1
-=fun
-Module: global
-Uniq: 65707495
-Index: 6
-Address: 2658a4
-Native_address: bcefc
-Refc: 1
-=fun
-Module: code_server
-Uniq: 34473969
-Index: 17
-Address: 2ad450
-Native_address: bcef4
-Refc: 2
-=fun
-Module: crashdump_viewer_html
-Uniq: 124296602
-Index: 7
-Address: 526244
-Native_address: bcefc
-Refc: 1
-=fun
-Module: global
-Uniq: 23074707
-Index: 15
-Address: 265460
-Native_address: bcefc
-Refc: 1
-=fun
-Module: inet
-Uniq: 25972856
-Index: 10
-Address: 27cf74
-Native_address: bcefc
-Refc: 1
-=fun
-Module: erl_eval
-Uniq: 43110452
-Index: 24
-Address: 2f9ad4
-Native_address: bceec
-Refc: 1
-=fun
-Module: code_server
-Uniq: 106445918
-Index: 13
-Address: 2ad660
-Native_address: bcefc
-Refc: 1
-=fun
-Module: crashdump_viewer_html
-Uniq: 116071286
-Index: 12
-Address: 5261b8
-Native_address: bcefc
-Refc: 1
-=fun
-Module: inet_parse
-Uniq: 130814477
-Index: 8
-Address: 284cfc
-Native_address: bcefc
-Refc: 1
-=fun
-Module: erl_lint
-Uniq: 121017037
-Index: 39
-Address: 34ed80
-Native_address: bcef4
-Refc: 1
-=fun
-Module: ets
-Uniq: 104895267
-Index: 0
-Address: 2bc1bc
-Native_address: bcefc
-Refc: 1
-=fun
-Module: crashdump_viewer
-Uniq: 104682437
-Index: 11
-Address: 4a3de0
-Native_address: bcefc
-Refc: 1
-=fun
-Module: erl_lint
-Uniq: 70248777
-Index: 30
-Address: 34f30c
-Native_address: bcefc
-Refc: 1
-=fun
-Module: c
-Uniq: 13274975
-Index: 5
-Address: 300074
-Native_address: bcef4
-Refc: 1
-=fun
-Module: erl_lint
-Uniq: 98442771
-Index: 53
-Address: 34e2d0
-Native_address: bceec
-Refc: 1
-=fun
-Module: erl_eval
-Uniq: 69829006
-Index: 7
-Address: 2fa47c
-Native_address: bce80
-Refc: 1
-=fun
-Module: old_file_server
-Uniq: 36444943
-Index: 1
-Address: 2a1a80
-Native_address: bcf04
-Refc: 1
-=fun
-Module: erl_lint
-Uniq: 58719455
-Index: 26
-Address: 34f5f0
-Native_address: bcefc
-Refc: 1
-=fun
-Module: timer
-Uniq: 42505885
-Index: 0
-Address: 4cd62c
-Native_address: bcefc
-Refc: 1
-=fun
-Module: erl_eval
-Uniq: 54682479
-Index: 20
-Address: 2f9d08
-Native_address: bcf04
-Refc: 1
-=fun
-Module: gen_event
-Uniq: 86070332
-Index: 1
-Address: 222d7c
-Native_address: bcefc
-Refc: 1
-=fun
-Module: c
-Uniq: 54728136
-Index: 9
-Address: 2fff68
-Native_address: bcefc
-Refc: 1
-=fun
-Module: application_controller
-Uniq: 16474219
-Index: 3
-Address: 234c60
-Native_address: bcefc
-Refc: 1
-=fun
-Module: application_controller
-Uniq: 108831556
-Index: 10
-Address: 234810
-Native_address: bcefc
-Refc: 1
-=fun
-Module: erl_lint
-Uniq: 72053761
-Index: 16
-Address: 34f8ec
-Native_address: bcef4
-Refc: 1
-=fun
-Module: net_kernel
-Uniq: 65127616
-Index: 2
-Address: 29ea04
-Native_address: bcefc
-Refc: 1
-=fun
-Module: application_controller
-Uniq: 126167637
-Index: 14
-Address: 234640
-Native_address: bcef4
-Refc: 1
-=fun
-Module: inet_parse
-Uniq: 113704917
-Index: 0
-Address: 285788
-Native_address: bcefc
-Refc: 1
-=fun
-Module: mod_disk_log
-Uniq: 75279647
-Index: 1
-Address: 500100
-Native_address: bcefc
-Refc: 1
-=fun
-Module: inet_db
-Uniq: 119218247
-Index: 5
-Address: 26df68
-Native_address: bcef4
-Refc: 1
-=fun
-Module: httpd_util
-Uniq: 85690044
-Index: 4
-Address: 4b5d6c
-Native_address: bcefc
-Refc: 1
-=fun
-Module: inet_db
-Uniq: 53075592
-Index: 1
-Address: 26e16c
-Native_address: bcefc
-Refc: 1
-=fun
-Module: c
-Uniq: 39490182
-Index: 2
-Address: 3000c8
-Native_address: bcefc
-Refc: 1
-=fun
-Module: application_controller
-Uniq: 75189006
-Index: 12
-Address: 234714
-Native_address: bcef4
-Refc: 1
-=fun
-Module: erl_lint
-Uniq: 14980808
-Index: 43
-Address: 34eb38
-Native_address: bceec
-Refc: 1
-=fun
-Module: crashdump_viewer
-Uniq: 16463468
-Index: 4
-Address: 4a4914
-Native_address: bcee4
-Refc: 1
-=fun
-Module: dict
-Uniq: 99965326
-Index: 4
-Address: 355020
-Native_address: bcefc
-Refc: 1
-=fun
-Module: inet_parse
-Uniq: 36900786
-Index: 6
-Address: 284f3c
-Native_address: bcefc
-Refc: 1
-=fun
-Module: erl_lint
-Uniq: 45447147
-Index: 18
-Address: 34f794
-Native_address: bcef4
-Refc: 1
-=fun
-Module: erl_lint
-Uniq: 32353825
-Index: 6
-Address: 34fe78
-Native_address: bcef4
-Refc: 1
-=fun
-Module: erl_lint
-Uniq: 134052338
-Index: 8
-Address: 34fdc0
-Native_address: bceec
-Refc: 1
-=fun
-Module: application_master
-Uniq: 23840924
-Index: 1
-Address: 24aae0
-Native_address: bcefc
-Refc: 1
-=fun
-Module: webtool
-Uniq: 108282500
-Index: 1
-Address: 4ab918
-Native_address: bcefc
-Refc: 1
-=fun
-Module: erl_prim_loader
-Uniq: 31081110
-Index: 0
-Address: 210c68
-Native_address: bcf04
-Refc: 1
-=fun
-Module: erl_eval
-Uniq: 54275742
-Index: 26
-Address: 2f9a4c
-Native_address: bcef4
-Refc: 1
-=fun
-Module: shell
-Uniq: 45083091
-Index: 3
-Address: 2e5350
-Native_address: bcf04
-Refc: 3
-=proc_stack:<0.0.0>
-3a48bc:SReturn addr 0x156F90 (<terminate process normally>)
-y0:H371264
-=proc_heap:<0.0.0>
-371264:t9:A5:state,H3710D8,N,N,H3710F4,P<0.1.0>,H37128C,H3710FC,N
-3710FC:t2:H371138,H371140
-371140:lI80|H371194
-371194:lI49|H3711E0
-3711E0:lI48|H371204
-371204:lI66|N
-371138:lI79|H37118C
-37118C:lI84|H3711D8
-3711D8:lI80|H3711FC
-3711FC:lI32|H37120C
-37120C:lI32|H371214
-371214:lI65|H37121C
-37121C:lI80|H371224
-371224:lI78|H37122C
-37122C:lI32|H371234
-371234:lI49|H37123C
-37123C:lI56|H371244
-371244:lI49|H37124C
-37124C:lI32|H371254
-371254:lI48|H37125C
-37125C:lI49|N
-37128C:t2:A7:started,A7:started
-3710F4:lH371124|H371130
-371124:t2:A16:application_controller,P<0.5.0>
-371130:lH371178|H371184
-371178:t2:AC:error_logger,P<0.4.0>
-371184:lH3711CC|N
-3711CC:t2:AF:erl_prim_loader,P<0.2.0>
-3710D8:lH3710E0|H3710EC
-3710E0:t2:A5:-root,H371108
-371108:lH371148|N
-371148:Yh13:2F636C656172636173652F6F74702F65727473
-3710EC:lH371110|H37111C
-371110:t2:A9:-progname,H371164
-371164:lH37119C|N
-37119C:Yh1D:2F636C656172636173652F6F74702F657274732F62696E2F6365726C20
-37111C:lH37116C|N
-37116C:t2:A5:-home,H3711C4
-3711C4:lH3711E8|N
-3711E8:YhA:2F686F6D652F73697269
-=proc_stack:<0.2.0>
-38eca8:SReturn addr 0x156F90 (<terminate process normally>)
-y0:H367D20
-y1:P<0.1.0>
-y2:H367D28
-y3:A8:infinity
-=proc_heap:<0.2.0>
-367D20:lH367D48|H367D50
-367D48:lI47|H367D58
-367D58:lI99|H367D68
-367D68:lI108|H367D78
-367D78:lI101|H367D88
-367D88:lI97|H367D98
-367D98:lI114|H367DA8
-367DA8:lI99|H367DB8
-367DB8:lI97|H367DC8
-367DC8:lI115|H367DD8
-367DD8:lI101|H367DE8
-367DE8:lI47|H367DF8
-367DF8:lI111|H367E08
-367E08:lI116|H367E18
-367E18:lI112|H367E28
-367E28:lI47|H367E38
-367E38:lI101|H367E48
-367E48:lI114|H367E58
-367E58:lI116|H367E68
-367E68:lI115|H367E78
-367E78:lI47|H367E88
-367E88:lI108|H367E98
-367E98:lI105|H367EA8
-367EA8:lI98|H367EB8
-367EB8:lI47|H367EC8
-367EC8:lI107|H367ED8
-367ED8:lI101|H367EE8
-367EE8:lI114|H367EF8
-367EF8:lI110|H367F08
-367F08:lI101|H367F18
-367F18:lI108|H367F28
-367F28:lI47|H367F38
-367F38:lI101|H367F48
-367F48:lI98|H367F58
-367F58:lI105|H367F68
-367F68:lI110|N
-367D50:lH367D60|N
-367D60:lI47|H367D70
-367D70:lI99|H367D80
-367D80:lI108|H367D90
-367D90:lI101|H367DA0
-367DA0:lI97|H367DB0
-367DB0:lI114|H367DC0
-367DC0:lI99|H367DD0
-367DD0:lI97|H367DE0
-367DE0:lI115|H367DF0
-367DF0:lI101|H367E00
-367E00:lI47|H367E10
-367E10:lI111|H367E20
-367E20:lI116|H367E30
-367E30:lI112|H367E40
-367E40:lI47|H367E50
-367E50:lI101|H367E60
-367E60:lI114|H367E70
-367E70:lI116|H367E80
-367E80:lI115|H367E90
-367E90:lI47|H367EA0
-367EA0:lI108|H367EB0
-367EB0:lI105|H367EC0
-367EC0:lI98|H367ED0
-367ED0:lI47|H367EE0
-367EE0:lI115|H367EF0
-367EF0:lI116|H367F00
-367F00:lI100|H367F10
-367F10:lI108|H367F20
-367F20:lI105|H367F30
-367F30:lI98|H367F40
-367F40:lI47|H367F50
-367F50:lI101|H367F60
-367F60:lI98|H367F70
-367F70:lI105|H367F78
-367F78:lI110|N
-367D28:t7:A5:state,A5:efile,N,A4:none,p<0.2>,A8:infinity,A5:false
-=proc_dictionary:<0.4.0>
-H3AC588
-H3AC594
-=proc_stack:<0.4.0>
-3b2f14:SReturn addr 0x225860 (proc_lib:init_p/5 + 164)
-y0:N
-y1:H3B21E8
-y2:AC:error_logger
-y3:P<0.1.0>
-3b2f28:SReturn addr 0x156F90 (<terminate process normally>)
-y0:SCatch 0x225860 (proc_lib:init_p/5 + 164)
-y1:A3:gen
-y2:A7:init_it
-y3:H3AC5A8
-=proc_heap:<0.4.0>
-3B21E8:lH3B2144|H3B21E0
-3B2144:t5:A7:handler,AC:error_logger,A5:false,N,A5:false
-3B21E0:lH3B21BC|N
-3B21BC:t5:A7:handler,A12:error_logger_tty_h,A5:false,H3AC610,A5:false
-3AC610:t2:P<0.21.0>,AC:error_logger
-3AC5A8:lA9:gen_event|H3AC5E8
-3AC5E8:lP<0.1.0>|H3AC608
-3AC608:lP<0.1.0>|H3AC61C
-3AC61C:lH3AC624|H3AC630
-3AC624:t2:A5:local,AC:error_logger
-3AC630:lN|H3AC638
-3AC638:lN|H3AC640
-3AC640:lN|N
-3AC588:t2:AD:$initial_call,H3AC5B0
-3AC5B0:t3:A3:gen,A7:init_it,H3AC5A8
-3AC594:t2:AA:$ancestors,H3AC5C0
-3AC5C0:lP<0.1.0>|N
-=proc_dictionary:<0.5.0>
-H372E4C
-H372E58
-=proc_stack:<0.5.0>
-374704:SReturn addr 0x225860 (proc_lib:init_p/5 + 164)
-y0:N
-y1:A8:infinity
-y2:A16:application_controller
-y3:H3739F4
-y4:A16:application_controller
-y5:P<0.1.0>
-374720:SReturn addr 0x156F90 (<terminate process normally>)
-y0:SCatch 0x225860 (proc_lib:init_p/5 + 164)
-y1:A3:gen
-y2:A7:init_it
-y3:H372ED0
-=proc_heap:<0.5.0>
-3739F4:t9:A5:state,N,N,N,H373914,N,H373928,N,N
-373928:lH37391C|H372F54
-37391C:t2:A6:stdlib,A9:permanent
-372F54:lH372F90|N
-372F90:t2:A6:kernel,A9:permanent
-373914:lH373908|H372F4C
-373908:t2:A6:stdlib,A9:undefined
-372F4C:lH372F84|N
-372F84:t2:A6:kernel,P<0.7.0>
-372ED0:lAA:gen_server|H372F5C
-372F5C:lP<0.1.0>|H372F9C
-372F9C:lP<0.1.0>|H372FC4
-372FC4:lH372FEC|H372FF8
-372FEC:t2:A5:local,A16:application_controller
-372FF8:lA16:application_controller|H373018
-373018:lH373038|H373048
-373038:t3:AB:application,A6:kernel,H373060
-373060:lH373078|H373084
-373078:t2:AB:description,H37309C
-37309C:lI69|H3730C8
-3730C8:lI82|H3730FC
-3730FC:lI84|H373130
-373130:lI83|H37316C
-37316C:lI32|H3731A8
-3731A8:lI32|H3731E4
-3731E4:lI67|H373220
-373220:lI88|H37325C
-37325C:lI67|H37329C
-37329C:lI32|H3732D0
-3732D0:lI49|H3732FC
-3732FC:lI51|H373328
-373328:lI56|H373348
-373348:lI32|H373368
-373368:lI49|H373388
-373388:lI48|N
-373084:lH3730A4|H3730B0
-3730A4:t2:A3:vsn,H3730D0
-3730D0:lI50|H373104
-373104:lI46|H373138
-373138:lI57|N
-3730B0:lH3730D8|H3730E4
-3730D8:t2:A2:id,N
-3730E4:lH37310C|H373118
-37310C:t2:A7:modules,H373140
-373140:lAB:application|H373174
-373174:lA16:application_controller|H3731B0
-3731B0:lA12:application_master|H3731EC
-3731EC:lA13:application_starter|H373228
-373228:lA4:auth|H373264
-373264:lA4:code|H3732A4
-3732A4:lA8:code_aux|H3732D8
-3732D8:lA8:packages|H373304
-373304:lAB:code_server|H373330
-373330:lA9:dist_util|H373350
-373350:lAF:erl_boot_server|H373370
-373370:lA10:erl_distribution|H373390
-373390:lAF:erl_prim_loader|H3733A8
-3733A8:lA9:erl_reply|H3733C0
-3733C0:lA6:erlang|H3733D8
-3733D8:lAD:error_handler|H3733F0
-3733F0:lAC:error_logger|H373408
-373408:lA4:file|H373420
-373420:lAB:file_server|H373438
-373438:lAF:old_file_server|H373450
-373450:lAE:file_io_server|H373468
-373468:lA9:prim_file|H373480
-373480:lA6:global|H373498
-373498:lAC:global_group|H3734B0
-3734B0:lAD:global_search|H3734C8
-3734C8:lA5:group|H3734E0
-3734E0:lA5:heart|H3734F8
-3734F8:lA13:hipe_unified_loader|H373510
-373510:lA11:hipe_sparc_loader|H373520
-373520:lAF:hipe_x86_loader|H373530
-373530:lA9:inet6_tcp|H373540
-373540:lAE:inet6_tcp_dist|H373550
-373550:lA9:inet6_udp|H373560
-373560:lAB:inet_config|H373570
-373570:lAA:inet_hosts|H373580
-373580:lA13:inet_gethost_native|H373590
-373590:lAD:inet_tcp_dist|H3735A0
-3735A0:lA4:init|H3735B0
-3735B0:lA6:kernel|H3735C0
-3735C0:lAD:kernel_config|H3735D0
-3735D0:lA3:net|H3735E0
-3735E0:lA7:net_adm|H3735F0
-3735F0:lAA:net_kernel|H373600
-373600:lA2:os|H373610
-373610:lA8:ram_file|H373620
-373620:lA3:rpc|H373630
-373630:lA4:user|H373640
-373640:lA8:user_drv|H373650
-373650:lA8:user_sup|H373660
-373660:lA8:disk_log|H373670
-373670:lAA:disk_log_1|H373680
-373680:lAF:disk_log_server|H373690
-373690:lAC:disk_log_sup|H3736A0
-3736A0:lA7:dist_ac|H3736B0
-3736B0:lA8:erl_ddll|H3736C0
-3736C0:lA8:erl_epmd|H3736D0
-3736D0:lAA:erts_debug|H3736E0
-3736E0:lA7:gen_tcp|H3736F0
-3736F0:lA7:gen_udp|H373700
-373700:lA9:prim_inet|H373708
-373708:lA4:inet|H373710
-373710:lA7:inet_db|H373718
-373718:lA8:inet_dns|H373720
-373720:lAA:inet_parse|H373728
-373728:lA8:inet_res|H373730
-373730:lA8:inet_tcp|H373738
-373738:lA8:inet_udp|H373740
-373740:lA3:pg2|H373748
-373748:lA9:seq_trace|H373750
-373750:lA6:socks5|H373758
-373758:lAB:socks5_auth|H373760
-373760:lAA:socks5_tcp|H373768
-373768:lAA:socks5_udp|H373770
-373770:lAF:wrap_log_reader|H373778
-373778:lA4:zlib|H373780
-373780:lA9:otp_ring0|N
-373118:lH373148|H373154
-373148:t2:AA:registered,H37317C
-37317C:lA16:application_controller|H3731B8
-3731B8:lA9:erl_reply|H3731F4
-3731F4:lA4:auth|H373230
-373230:lAB:boot_server|H37326C
-37326C:lAB:code_server|H3732AC
-3732AC:lAF:disk_log_server|H3732E0
-3732E0:lAC:disk_log_sup|H37330C
-37330C:lAF:erl_prim_loader|H373338
-373338:lAC:error_logger|H373358
-373358:lAB:file_server|H373378
-373378:lAD:file_server_2|H373398
-373398:lAF:fixtable_server|H3733B0
-3733B0:lAC:global_group|H3733C8
-3733C8:lA12:global_name_server|H3733E0
-3733E0:lA5:heart|H3733F8
-3733F8:lA4:init|H373410
-373410:lAD:kernel_config|H373428
-373428:lAA:kernel_sup|H373440
-373440:lAA:net_kernel|H373458
-373458:lA7:net_sup|H373470
-373470:lA3:rex|H373488
-373488:lA4:user|H3734A0
-3734A0:lA9:os_server|H3734B8
-3734B8:lAB:ddll_server|H3734D0
-3734D0:lA8:erl_epmd|H3734E8
-3734E8:lA7:inet_db|H373500
-373500:lA3:pg2|N
-373154:lH373184|H373190
-373184:t2:AC:applications,N
-373190:lH3731C0|H3731CC
-3731C0:t2:A15:included_applications,N
-3731CC:lH3731FC|H373208
-3731FC:t2:A3:env,H373238
-373238:lH373274|N
-373274:t2:AC:error_logger,A3:tty
-373208:lH373240|H37324C
-373240:t2:AC:start_phases,A9:undefined
-37324C:lH373280|H37328C
-373280:t2:A4:maxT,A8:infinity
-37328C:lH3732B4|H3732C0
-3732B4:t2:A4:maxP,A8:infinity
-3732C0:lH3732E8|N
-3732E8:t2:A3:mod,H373314
-373314:t2:A6:kernel,N
-373048:lN|N
-372E4C:t2:AD:$initial_call,H372EE4
-372EE4:t3:A3:gen,A7:init_it,H372ED0
-372E58:t2:AA:$ancestors,H372EF4
-372EF4:lP<0.1.0>|N
-=proc_dictionary:<0.7.0>
-H369B78
-H369B5C
-=proc_stack:<0.7.0>
-369d64:SReturn addr 0x225860 (proc_lib:init_p/5 + 164)
-y0:H369C2C
-y1:P<0.5.0>
-369d70:SReturn addr 0x156F90 (<terminate process normally>)
-y0:SCatch 0x225860 (proc_lib:init_p/5 + 164)
-y1:A12:application_master
-y2:A4:init
-y3:H369B2C
-=proc_heap:<0.7.0>
-369C2C:t6:A5:state,P<0.8.0>,H3697B0,N,I0,P<0.0.0>
-3697B0:t9:A9:appl_data,A6:kernel,H369B14,A9:undefined,H3697D8,H369A3C,N,A8:infinity,A8:infinity
-369A3C:lAB:application|H369A34
-369A34:lA16:application_controller|H369A2C
-369A2C:lA12:application_master|H369A24
-369A24:lA13:application_starter|H369A1C
-369A1C:lA4:auth|H369A14
-369A14:lA4:code|H369A0C
-369A0C:lA8:code_aux|H369A04
-369A04:lA8:packages|H3699FC
-3699FC:lAB:code_server|H3699F4
-3699F4:lA9:dist_util|H3699EC
-3699EC:lAF:erl_boot_server|H3699E4
-3699E4:lA10:erl_distribution|H3699DC
-3699DC:lAF:erl_prim_loader|H3699D4
-3699D4:lA9:erl_reply|H3699CC
-3699CC:lA6:erlang|H3699C4
-3699C4:lAD:error_handler|H3699BC
-3699BC:lAC:error_logger|H3699B4
-3699B4:lA4:file|H3699AC
-3699AC:lAB:file_server|H3699A4
-3699A4:lAF:old_file_server|H36999C
-36999C:lAE:file_io_server|H369994
-369994:lA9:prim_file|H36998C
-36998C:lA6:global|H369984
-369984:lAC:global_group|H36997C
-36997C:lAD:global_search|H369974
-369974:lA5:group|H36996C
-36996C:lA5:heart|H369964
-369964:lA13:hipe_unified_loader|H36995C
-36995C:lA11:hipe_sparc_loader|H369954
-369954:lAF:hipe_x86_loader|H36994C
-36994C:lA9:inet6_tcp|H369944
-369944:lAE:inet6_tcp_dist|H36993C
-36993C:lA9:inet6_udp|H369934
-369934:lAB:inet_config|H36992C
-36992C:lAA:inet_hosts|H369924
-369924:lA13:inet_gethost_native|H36991C
-36991C:lAD:inet_tcp_dist|H369914
-369914:lA4:init|H36990C
-36990C:lA6:kernel|H369904
-369904:lAD:kernel_config|H3698FC
-3698FC:lA3:net|H3698F4
-3698F4:lA7:net_adm|H3698EC
-3698EC:lAA:net_kernel|H3698E4
-3698E4:lA2:os|H3698DC
-3698DC:lA8:ram_file|H3698D4
-3698D4:lA3:rpc|H3698CC
-3698CC:lA4:user|H3698C4
-3698C4:lA8:user_drv|H3698BC
-3698BC:lA8:user_sup|H3698B4
-3698B4:lA8:disk_log|H3698AC
-3698AC:lAA:disk_log_1|H3698A4
-3698A4:lAF:disk_log_server|H36989C
-36989C:lAC:disk_log_sup|H369894
-369894:lA7:dist_ac|H36988C
-36988C:lA8:erl_ddll|H369884
-369884:lA8:erl_epmd|H36987C
-36987C:lAA:erts_debug|H369874
-369874:lA7:gen_tcp|H36986C
-36986C:lA7:gen_udp|H369864
-369864:lA9:prim_inet|H36985C
-36985C:lA4:inet|H369854
-369854:lA7:inet_db|H36984C
-36984C:lA8:inet_dns|H369844
-369844:lAA:inet_parse|H36983C
-36983C:lA8:inet_res|H369834
-369834:lA8:inet_tcp|H36982C
-36982C:lA8:inet_udp|H369824
-369824:lA3:pg2|H36981C
-36981C:lA9:seq_trace|H369814
-369814:lA6:socks5|H36980C
-36980C:lAB:socks5_auth|H369804
-369804:lAA:socks5_tcp|H3697FC
-3697FC:lAA:socks5_udp|H3697F4
-3697F4:lAF:wrap_log_reader|H3697EC
-3697EC:lA4:zlib|H3697E4
-3697E4:lA9:otp_ring0|N
-3697D8:t2:A6:kernel,N
-369B14:lA16:application_controller|H369B0C
-369B0C:lA9:erl_reply|H369B04
-369B04:lA4:auth|H369AFC
-369AFC:lAB:boot_server|H369AF4
-369AF4:lAB:code_server|H369AEC
-369AEC:lAF:disk_log_server|H369AE4
-369AE4:lAC:disk_log_sup|H369ADC
-369ADC:lAF:erl_prim_loader|H369AD4
-369AD4:lAC:error_logger|H369ACC
-369ACC:lAB:file_server|H369AC4
-369AC4:lAD:file_server_2|H369ABC
-369ABC:lAF:fixtable_server|H369AB4
-369AB4:lAC:global_group|H369AAC
-369AAC:lA12:global_name_server|H369AA4
-369AA4:lA5:heart|H369A9C
-369A9C:lA4:init|H369A94
-369A94:lAD:kernel_config|H369A8C
-369A8C:lAA:kernel_sup|H369A84
-369A84:lAA:net_kernel|H369A7C
-369A7C:lA7:net_sup|H369A74
-369A74:lA3:rex|H369A6C
-369A6C:lA4:user|H369A64
-369A64:lA9:os_server|H369A5C
-369A5C:lAB:ddll_server|H369A54
-369A54:lA8:erl_epmd|H369A4C
-369A4C:lA7:inet_db|H369A44
-369A44:lA3:pg2|N
-369B2C:lP<0.5.0>|H369B24
-369B24:lP<0.6.0>|H3697A8
-3697A8:lH3697B0|H369B1C
-369B1C:lA6:normal|N
-369B78:t2:AD:$initial_call,H369B68
-369B68:t3:A12:application_master,A4:init,H369B2C
-369B5C:t2:AA:$ancestors,H369B54
-369B54:lP<0.6.0>|N
-=proc_stack:<0.8.0>
-384ec0:SReturn addr 0x156F90 (<terminate process normally>)
-y0:H384BDC
-y1:A6:kernel
-y2:P<0.9.0>
-y3:P<0.7.0>
-=proc_heap:<0.8.0>
-384BDC:t2:A5:state,A3:tty
-=proc_dictionary:<0.9.0>
-H376850
-H37685C
-=proc_stack:<0.9.0>
-36bde8:SReturn addr 0x225860 (proc_lib:init_p/5 + 164)
-y0:N
-y1:A8:infinity
-y2:AA:supervisor
-y3:H36B8E8
-y4:AA:kernel_sup
-y5:P<0.8.0>
-36be04:SReturn addr 0x156F90 (<terminate process normally>)
-y0:SCatch 0x225860 (proc_lib:init_p/5 + 164)
-y1:A3:gen
-y2:A7:init_it
-y3:H3768D4
-=proc_heap:<0.9.0>
-36B8E8:tA:A5:state,H376868,AB:one_for_all,H36B8D4,N,I0,I1,N,A6:kernel,N
-36B8D4:lH36B8B0|H36B6E8
-36B8B0:t8:A5:child,P<0.24.0>,AF:kernel_safe_sup,H376BF0,A9:permanent,A8:infinity,AA:supervisor,H376C00
-376C00:lA6:kernel|N
-376BF0:t3:AA:supervisor,AA:start_link,H376C08
-376C08:lH376C10|H376C1C
-376C10:t2:A5:local,AF:kernel_safe_sup
-376C1C:lA6:kernel|H376C24
-376C24:lA4:safe|N
-36B6E8:lH36B6C4|H36B490
-36B6C4:t8:A5:child,P<0.23.0>,AD:kernel_config,H376BB4,A9:permanent,I2000,A6:worker,H376BC4
-376BC4:lAD:kernel_config|N
-376BB4:t3:AD:kernel_config,AA:start_link,N
-36B490:lH36B498|H36B4BC
-36B498:t8:A5:child,P<0.19.0>,A4:user,H376B70,A9:temporary,I2000,AA:supervisor,H376B80
-376B80:lA8:user_sup|N
-376B70:t3:A8:user_sup,A5:start,N
-36B4BC:lH36B4C4|H376CB0
-36B4C4:t8:A5:child,P<0.18.0>,AB:code_server,H376B0C,A9:permanent,I2000,A6:worker,H376B1C
-376B1C:lA4:code|N
-376B0C:t3:A4:code,AA:start_link,N
-376CB0:lH376CB8|H376CDC
-376CB8:t8:A5:child,P<0.17.0>,AB:file_server,H376AB8,A9:permanent,I2000,A6:worker,H376AC8
-376AC8:lAF:old_file_server|N
-376AB8:t3:AF:old_file_server,AA:start_link,N
-376CDC:lH376CE4|H376C2C
-376CE4:t8:A5:child,P<0.16.0>,AD:file_server_2,H376A58,A9:permanent,I2000,A6:worker,H376A68
-376A68:lA4:file|H376AB0
-376AB0:lAB:file_server|H376B04
-376B04:lAE:file_io_server|H376B68
-376B68:lA9:prim_file|N
-376A58:t3:AB:file_server,AA:start_link,N
-376C2C:lH376C34|H376C58
-376C34:t8:A5:child,P<0.15.0>,AC:global_group,H3769F4,A9:permanent,I2000,A6:worker,H376A04
-376A04:lAC:global_group|N
-3769F4:t3:AC:global_group,AA:start_link,N
-376C58:lH376C60|H376C84
-376C60:t8:A5:child,A9:undefined,A7:net_sup,H37696C,A9:permanent,A8:infinity,AA:supervisor,H37697C
-37697C:lA10:erl_distribution|N
-37696C:t3:A10:erl_distribution,AA:start_link,N
-376C84:lH376C8C|H3768A0
-376C8C:t8:A5:child,P<0.14.0>,A7:inet_db,H3768F4,A9:permanent,I2000,A6:worker,H376904
-376904:lA7:inet_db|N
-3768F4:t3:A7:inet_db,AA:start_link,N
-3768A0:lH376938|H37695C
-376938:t8:A5:child,P<0.11.0>,A12:global_name_server,H3769B0,A9:permanent,I2000,A6:worker,H3769C0
-3769C0:lA6:global|N
-3769B0:t3:A6:global,AA:start_link,N
-37695C:lH3769C8|N
-3769C8:t8:A5:child,P<0.10.0>,A3:rex,H376A38,A9:permanent,I2000,A6:worker,H376A48
-376A48:lA3:rpc|N
-376A38:t3:A3:rpc,AA:start_link,N
-376868:t2:A5:local,AA:kernel_sup
-3768D4:lAA:gen_server|H376964
-376964:lP<0.8.0>|H3769EC
-3769EC:lP<0.8.0>|H376A50
-376A50:lH376A9C|H376AA8
-376A9C:t2:A5:local,AA:kernel_sup
-376AA8:lAA:supervisor|H376AFC
-376AFC:lH376B50|H376B60
-376B50:t3:H376868,A6:kernel,N
-376B60:lN|N
-376850:t2:AD:$initial_call,H3768DC
-3768DC:t3:A3:gen,A7:init_it,H3768D4
-37685C:t2:AA:$ancestors,H3768EC
-3768EC:lP<0.8.0>|N
-=proc_dictionary:<0.10.0>
-H367A10
-H3679F4
-=proc_stack:<0.10.0>
-367cec:SReturn addr 0x225860 (proc_lib:init_p/5 + 164)
-y0:N
-y1:A8:infinity
-y2:A3:rpc
-y3:H367AA8
-y4:A3:rex
-y5:P<0.9.0>
-367d08:SReturn addr 0x156F90 (<terminate process normally>)
-y0:SCatch 0x225860 (proc_lib:init_p/5 + 164)
-y1:A3:gen
-y2:A7:init_it
-y3:H3679C4
-=proc_heap:<0.10.0>
-367AA8:t2:I0,A3:nil
-3679C4:lAA:gen_server|H3679BC
-3679BC:lP<0.9.0>|H3679B4
-3679B4:lP<0.9.0>|H367988
-367988:lH367990|H3679AC
-367990:t2:A5:local,A3:rex
-3679AC:lA3:rpc|H3679A4
-3679A4:lN|H36799C
-36799C:lN|N
-367A10:t2:AD:$initial_call,H367A00
-367A00:t3:A3:gen,A7:init_it,H3679C4
-3679F4:t2:AA:$ancestors,H3679EC
-3679EC:lAA:kernel_sup|H3679CC
-3679CC:lP<0.8.0>|N
-=proc_dictionary:<0.11.0>
-H36ADD8
-H36ADBC
-=proc_stack:<0.11.0>
-36b0b4:SReturn addr 0x225860 (proc_lib:init_p/5 + 164)
-y0:N
-y1:A8:infinity
-y2:A6:global
-y3:H36AF0C
-y4:A12:global_name_server
-y5:P<0.9.0>
-36b0d0:SReturn addr 0x156F90 (<terminate process normally>)
-y0:SCatch 0x225860 (proc_lib:init_p/5 + 164)
-y1:A3:gen
-y2:A7:init_it
-y3:H36AD8C
-=proc_heap:<0.11.0>
-36AF0C:t9:A5:state,A4:true,N,N,N,N,AD:nonode@nohost,P<0.12.0>,P<0.13.0>
-36AD8C:lAA:gen_server|H36AD84
-36AD84:lP<0.9.0>|H36AD7C
-36AD7C:lP<0.9.0>|H36AD50
-36AD50:lH36AD58|H36AD74
-36AD58:t2:A5:local,A12:global_name_server
-36AD74:lA6:global|H36AD6C
-36AD6C:lN|H36AD64
-36AD64:lN|N
-36ADD8:t2:AD:$initial_call,H36ADC8
-36ADC8:t3:A3:gen,A7:init_it,H36AD8C
-36ADBC:t2:AA:$ancestors,H36ADB4
-36ADB4:lAA:kernel_sup|H36AD94
-36AD94:lP<0.8.0>|N
-=proc_stack:<0.12.0>
-36921c:SReturn addr 0x261184 (global:init_the_locker/1 + 112)
-y0:N
-y1:N
-y2:N
-y3:N
-y4:N
-y5:N
-y6:A8:infinity
-y7:H368EB0
-y8:P<0.11.0>
-369244:SReturn addr 0x156F90 (<terminate process normally>)
-y0:N
-=proc_heap:<0.12.0>
-368EB0:t3:A5:multi,A9:undefined,N
-=proc_stack:<0.13.0>
-3695d0:SReturn addr 0x2651AC (global:loop_the_deleter/1 + 36)
-y0:A8:infinity
-y1:N
-y2:P<0.11.0>
-3695e0:SReturn addr 0x2654F8 (global:'-start_the_deleter/1-fun-0-'/1 + 20)
-y0:N
-y1:N
-y2:P<0.11.0>
-3695f0:SReturn addr 0x156F90 (<terminate process normally>)
-=proc_heap:<0.13.0>
-=proc_dictionary:<0.14.0>
-H36A998
-H36A9A4
-=proc_stack:<0.14.0>
-372e0c:SReturn addr 0x225860 (proc_lib:init_p/5 + 164)
-y0:N
-y1:A8:infinity
-y2:A7:inet_db
-y3:H36A9B0
-y4:A7:inet_db
-y5:P<0.9.0>
-372e28:SReturn addr 0x156F90 (<terminate process normally>)
-y0:SCatch 0x225860 (proc_lib:init_p/5 + 164)
-y1:A3:gen
-y2:A7:init_it
-y3:H36A9C8
-=proc_heap:<0.14.0>
-36A9B0:t5:A5:state,A7:inet_db,AA:inet_cache,AA:inet_hosts,H36A9E8
-36A9E8:E21:8372000364000D6E6F6E6F6465406E6F686F737400000000060000000000000000
-36A9C8:lAA:gen_server|H36A9F8
-36A9F8:lP<0.9.0>|H36AA08
-36AA08:lP<0.9.0>|H36AA10
-36AA10:lH36AA18|H36AA24
-36AA18:t2:A5:local,A7:inet_db
-36AA24:lA7:inet_db|H36AA2C
-36AA2C:lN|H36AA34
-36AA34:lN|N
-36A998:t2:AD:$initial_call,H36A9D0
-36A9D0:t3:A3:gen,A7:init_it,H36A9C8
-36A9A4:t2:AA:$ancestors,H36A9E0
-36A9E0:lAA:kernel_sup|H36AA00
-36AA00:lP<0.8.0>|N
-=proc_dictionary:<0.15.0>
-H372788
-H3727F8
-H37276C
-H37280C
-H372820
-=proc_stack:<0.15.0>
-372a64:SReturn addr 0x225860 (proc_lib:init_p/5 + 164)
-y0:N
-y1:A8:infinity
-y2:AC:global_group
-y3:H3728C8
-y4:AC:global_group
-y5:P<0.9.0>
-372a80:SReturn addr 0x156F90 (<terminate process normally>)
-y0:SCatch 0x225860 (proc_lib:init_p/5 + 164)
-y1:A3:gen
-y2:A7:init_it
-y3:H37273C
-=proc_heap:<0.15.0>
-3728C8:tC:A5:state,A7:no_conf,A4:true,N,N,N,N,N,AD:nonode@nohost,N,A6:normal,A6:normal
-37273C:lAA:gen_server|H372734
-372734:lP<0.9.0>|H37272C
-37272C:lP<0.9.0>|H372700
-372700:lH372708|H372724
-372708:t2:A5:local,AC:global_group
-372724:lAC:global_group|H37271C
-37271C:lN|H372714
-372714:lN|N
-372788:t2:AD:$initial_call,H372778
-372778:t3:A3:gen,A7:init_it,H37273C
-3727F8:t2:A10:registered_names,H3727F0
-3727F0:lA9:undefined|N
-37276C:t2:AA:$ancestors,H372764
-372764:lAA:kernel_sup|H372744
-372744:lP<0.8.0>|N
-37280C:t2:A4:send,H372804
-372804:lA9:undefined|N
-372820:t2:AC:whereis_name,H372818
-372818:lA9:undefined|N
-=proc_dictionary:<0.16.0>
-H37B918
-H37B924
-=proc_stack:<0.16.0>
-3d303c:SReturn addr 0x225860 (proc_lib:init_p/5 + 164)
-y0:N
-y1:A8:infinity
-y2:AB:file_server
-y3:p<0.4>
-y4:AD:file_server_2
-y5:P<0.9.0>
-3d3058:SReturn addr 0x156F90 (<terminate process normally>)
-y0:SCatch 0x225860 (proc_lib:init_p/5 + 164)
-y1:A3:gen
-y2:A7:init_it
-y3:H37B930
-=proc_heap:<0.16.0>
-37B930:lAA:gen_server|H37B950
-37B950:lP<0.9.0>|H37B960
-37B960:lP<0.9.0>|H37B968
-37B968:lH37B970|H37B97C
-37B970:t2:A5:local,AD:file_server_2
-37B97C:lAB:file_server|H37B984
-37B984:lN|H37B98C
-37B98C:lN|N
-37B918:t2:AD:$initial_call,H37B938
-37B938:t3:A3:gen,A7:init_it,H37B930
-37B924:t2:AA:$ancestors,H37B948
-37B948:lAA:kernel_sup|H37B958
-37B958:lP<0.8.0>|N
-=proc_stack:<0.17.0>
-3763cc:SReturn addr 0x156F90 (<terminate process normally>)
-y0:H376084
-y1:P<0.16.0>
-y2:P<0.9.0>
-=proc_heap:<0.17.0>
-376084:E21:8372000364000D6E6F6E6F6465406E6F686F737400000000160000000000000000
-=proc_stack:<0.18.0>
-3b98e8:SReturn addr 0x156F90 (<terminate process normally>)
-y0:H38AE84
-y1:P<0.9.0>
-=proc_heap:<0.18.0>
-38AE84:t8:A5:state,P<0.9.0>,H3873BC,H38AEB8,I9,I10,A8:no_cache,AB:interactive
-38AEB8:lH3873D4|H38AEE0
-3873D4:lI46|N
-38AEE0:lH3873EC|H38AF10
-3873EC:lI47|H387404
-387404:lI99|H387424
-387424:lI108|H38744C
-38744C:lI101|H38747C
-38747C:lI97|H3874B4
-3874B4:lI114|H3874F4
-3874F4:lI99|H38753C
-38753C:lI97|H38758C
-38758C:lI115|H3875E4
-3875E4:lI101|H387644
-387644:lI47|H3876AC
-3876AC:lI111|H38771C
-38771C:lI116|H387794
-387794:lI112|H387814
-387814:lI47|H38789C
-38789C:lI101|H38792C
-38792C:lI114|H3879BC
-3879BC:lI116|H387A54
-387A54:lI115|H387AF4
-387AF4:lI47|H387B9C
-387B9C:lI108|H387C4C
-387C4C:lI105|H387D04
-387D04:lI98|H387DC4
-387DC4:lI47|H387E8C
-387E8C:lI107|H387F5C
-387F5C:lI101|H388034
-388034:lI114|H388114
-388114:lI110|H3881FC
-3881FC:lI101|H3882EC
-3882EC:lI108|H3883E4
-3883E4:lI47|H3884E4
-3884E4:lI101|H3885EC
-3885EC:lI98|H3886FC
-3886FC:lI105|H388814
-388814:lI110|N
-38AF10:lH38740C|H38AF48
-38740C:lI47|H38742C
-38742C:lI99|H387454
-387454:lI108|H387484
-387484:lI101|H3874BC
-3874BC:lI97|H3874FC
-3874FC:lI114|H387544
-387544:lI99|H387594
-387594:lI97|H3875EC
-3875EC:lI115|H38764C
-38764C:lI101|H3876B4
-3876B4:lI47|H387724
-387724:lI111|H38779C
-38779C:lI116|H38781C
-38781C:lI112|H3878A4
-3878A4:lI47|H387934
-387934:lI101|H3879C4
-3879C4:lI114|H387A5C
-387A5C:lI116|H387AFC
-387AFC:lI115|H387BA4
-387BA4:lI47|H387C54
-387C54:lI108|H387D0C
-387D0C:lI105|H387DCC
-387DCC:lI98|H387E94
-387E94:lI47|H387F64
-387F64:lI115|H38803C
-38803C:lI116|H38811C
-38811C:lI100|H388204
-388204:lI108|H3882F4
-3882F4:lI105|H3883EC
-3883EC:lI98|H3884EC
-3884EC:lI47|H3885F4
-3885F4:lI101|H388704
-388704:lI98|H38881C
-38881C:lI105|H38892C
-38892C:lI110|N
-38AF48:lH387434|H38AF70
-387434:lI47|H38745C
-38745C:lI99|H38748C
-38748C:lI108|H3874C4
-3874C4:lI101|H387504
-387504:lI97|H38754C
-38754C:lI114|H38759C
-38759C:lI99|H3875F4
-3875F4:lI97|H387654
-387654:lI115|H3876BC
-3876BC:lI101|H38772C
-38772C:lI47|H3877A4
-3877A4:lI111|H387824
-387824:lI116|H3878AC
-3878AC:lI112|H38793C
-38793C:lI47|H3879CC
-3879CC:lI101|H387A64
-387A64:lI114|H387B04
-387B04:lI116|H387BAC
-387BAC:lI115|H387C5C
-387C5C:lI47|H387D14
-387D14:lI108|H387DD4
-387DD4:lI105|H387E9C
-387E9C:lI98|H387F6C
-387F6C:lI47|H388044
-388044:lI119|H388124
-388124:lI101|H38820C
-38820C:lI98|H3882FC
-3882FC:lI116|H3883F4
-3883F4:lI111|H3884F4
-3884F4:lI111|H3885FC
-3885FC:lI108|H38870C
-38870C:lI47|H388824
-388824:lI101|H388934
-388934:lI98|H388A44
-388A44:lI105|H388B54
-388B54:lI110|N
-38AF70:lH387464|H38AF98
-387464:lI47|H387494
-387494:lI99|H3874CC
-3874CC:lI108|H38750C
-38750C:lI101|H387554
-387554:lI97|H3875A4
-3875A4:lI114|H3875FC
-3875FC:lI99|H38765C
-38765C:lI97|H3876C4
-3876C4:lI115|H387734
-387734:lI101|H3877AC
-3877AC:lI47|H38782C
-38782C:lI111|H3878B4
-3878B4:lI116|H387944
-387944:lI112|H3879D4
-3879D4:lI47|H387A6C
-387A6C:lI101|H387B0C
-387B0C:lI114|H387BB4
-387BB4:lI116|H387C64
-387C64:lI115|H387D1C
-387D1C:lI47|H387DDC
-387DDC:lI108|H387EA4
-387EA4:lI105|H387F74
-387F74:lI98|H38804C
-38804C:lI47|H38812C
-38812C:lI116|H388214
-388214:lI118|H388304
-388304:lI47|H3883FC
-3883FC:lI101|H3884FC
-3884FC:lI98|H388604
-388604:lI105|H388714
-388714:lI110|N
-38AF98:lH38749C|H38AFC0
-38749C:lI47|H3874D4
-3874D4:lI99|H387514
-387514:lI108|H38755C
-38755C:lI101|H3875AC
-3875AC:lI97|H387604
-387604:lI114|H387664
-387664:lI99|H3876CC
-3876CC:lI97|H38773C
-38773C:lI115|H3877B4
-3877B4:lI101|H387834
-387834:lI47|H3878BC
-3878BC:lI111|H38794C
-38794C:lI116|H3879DC
-3879DC:lI112|H387A74
-387A74:lI47|H387B14
-387B14:lI101|H387BBC
-387BBC:lI114|H387C6C
-387C6C:lI116|H387D24
-387D24:lI115|H387DE4
-387DE4:lI47|H387EAC
-387EAC:lI108|H387F7C
-387F7C:lI105|H388054
-388054:lI98|H388134
-388134:lI47|H38821C
-38821C:lI116|H38830C
-38830C:lI115|H388404
-388404:lI112|H388504
-388504:lI47|H38860C
-38860C:lI101|H38871C
-38871C:lI98|H38882C
-38882C:lI105|H38893C
-38893C:lI110|N
-38AFC0:lH3874DC|H38AFE8
-3874DC:lI47|H38751C
-38751C:lI99|H387564
-387564:lI108|H3875B4
-3875B4:lI101|H38760C
-38760C:lI97|H38766C
-38766C:lI114|H3876D4
-3876D4:lI99|H387744
-387744:lI97|H3877BC
-3877BC:lI115|H38783C
-38783C:lI101|H3878C4
-3878C4:lI47|H387954
-387954:lI111|H3879E4
-3879E4:lI116|H387A7C
-387A7C:lI112|H387B1C
-387B1C:lI47|H387BC4
-387BC4:lI101|H387C74
-387C74:lI114|H387D2C
-387D2C:lI116|H387DEC
-387DEC:lI115|H387EB4
-387EB4:lI47|H387F84
-387F84:lI108|H38805C
-38805C:lI105|H38813C
-38813C:lI98|H388224
-388224:lI47|H388314
-388314:lI116|H38840C
-38840C:lI111|H38850C
-38850C:lI111|H388614
-388614:lI108|H388724
-388724:lI115|H388834
-388834:lI47|H388944
-388944:lI101|H388A4C
-388A4C:lI98|H388B5C
-388B5C:lI105|H388C6C
-388C6C:lI110|N
-38AFE8:lH387524|H38B008
-387524:lI47|H38756C
-38756C:lI99|H3875BC
-3875BC:lI108|H387614
-387614:lI101|H387674
-387674:lI97|H3876DC
-3876DC:lI114|H38774C
-38774C:lI99|H3877C4
-3877C4:lI97|H387844
-387844:lI115|H3878CC
-3878CC:lI101|H38795C
-38795C:lI47|H3879EC
-3879EC:lI111|H387A84
-387A84:lI116|H387B24
-387B24:lI112|H387BCC
-387BCC:lI47|H387C7C
-387C7C:lI101|H387D34
-387D34:lI114|H387DF4
-387DF4:lI116|H387EBC
-387EBC:lI115|H387F8C
-387F8C:lI47|H388064
-388064:lI108|H388144
-388144:lI105|H38822C
-38822C:lI98|H38831C
-38831C:lI47|H388414
-388414:lI116|H388514
-388514:lI111|H38861C
-38861C:lI111|H38872C
-38872C:lI108|H38883C
-38883C:lI98|H38894C
-38894C:lI97|H388A54
-388A54:lI114|H388B64
-388B64:lI47|H388C74
-388C74:lI101|H388D84
-388D84:lI98|H388E9C
-388E9C:lI105|H388FB4
-388FB4:lI110|N
-38B008:lH387574|H38B018
-387574:lI47|H3875C4
-3875C4:lI99|H38761C
-38761C:lI108|H38767C
-38767C:lI101|H3876E4
-3876E4:lI97|H387754
-387754:lI114|H3877CC
-3877CC:lI99|H38784C
-38784C:lI97|H3878D4
-3878D4:lI115|H387964
-387964:lI101|H3879F4
-3879F4:lI47|H387A8C
-387A8C:lI111|H387B2C
-387B2C:lI116|H387BD4
-387BD4:lI112|H387C84
-387C84:lI47|H387D3C
-387D3C:lI101|H387DFC
-387DFC:lI114|H387EC4
-387EC4:lI116|H387F94
-387F94:lI115|H38806C
-38806C:lI47|H38814C
-38814C:lI108|H388234
-388234:lI105|H388324
-388324:lI98|H38841C
-38841C:lI47|H38851C
-38851C:lI116|H388624
-388624:lI101|H388734
-388734:lI115|H388844
-388844:lI116|H388954
-388954:lI95|H388A5C
-388A5C:lI115|H388B6C
-388B6C:lI101|H388C7C
-388C7C:lI114|H388D8C
-388D8C:lI118|H388EA4
-388EA4:lI101|H388FBC
-388FBC:lI114|H3890D4
-3890D4:lI47|H3891EC
-3891EC:lI101|H3892FC
-3892FC:lI98|H38940C
-38940C:lI105|H38951C
-38951C:lI110|N
-38B018:lH3875CC|H38AE7C
-3875CC:lI47|H387624
-387624:lI99|H387684
-387684:lI108|H3876EC
-3876EC:lI101|H38775C
-38775C:lI97|H3877D4
-3877D4:lI114|H387854
-387854:lI99|H3878DC
-3878DC:lI97|H38796C
-38796C:lI115|H3879FC
-3879FC:lI101|H387A94
-387A94:lI47|H387B34
-387B34:lI111|H387BDC
-387BDC:lI116|H387C8C
-387C8C:lI112|H387D44
-387D44:lI47|H387E04
-387E04:lI101|H387ECC
-387ECC:lI114|H387F9C
-387F9C:lI116|H388074
-388074:lI115|H388154
-388154:lI47|H38823C
-38823C:lI108|H38832C
-38832C:lI105|H388424
-388424:lI98|H388524
-388524:lI47|H38862C
-38862C:lI115|H38873C
-38873C:lI115|H38884C
-38884C:lI108|H38895C
-38895C:lI47|H388A64
-388A64:lI101|H388B74
-388B74:lI98|H388C84
-388C84:lI105|H388D94
-388D94:lI110|N
-38AE7C:lH38762C|H38AEB0
-38762C:lI47|H38768C
-38768C:lI99|H3876F4
-3876F4:lI108|H387764
-387764:lI101|H3877DC
-3877DC:lI97|H38785C
-38785C:lI114|H3878E4
-3878E4:lI99|H387974
-387974:lI97|H387A04
-387A04:lI115|H387A9C
-387A9C:lI101|H387B3C
-387B3C:lI47|H387BE4
-387BE4:lI111|H387C94
-387C94:lI116|H387D4C
-387D4C:lI112|H387E0C
-387E0C:lI47|H387ED4
-387ED4:lI101|H387FA4
-387FA4:lI114|H38807C
-38807C:lI116|H38815C
-38815C:lI115|H388244
-388244:lI47|H388334
-388334:lI108|H38842C
-38842C:lI105|H38852C
-38852C:lI98|H388634
-388634:lI47|H388744
-388744:lI115|H388854
-388854:lI110|H388964
-388964:lI109|H388A6C
-388A6C:lI112|H388B7C
-388B7C:lI47|H388C8C
-388C8C:lI101|H388D9C
-388D9C:lI98|H388EAC
-388EAC:lI105|H388FC4
-388FC4:lI110|N
-38AEB0:lH387694|H38AED8
-387694:lI47|H3876FC
-3876FC:lI99|H38776C
-38776C:lI108|H3877E4
-3877E4:lI101|H387864
-387864:lI97|H3878EC
-3878EC:lI114|H38797C
-38797C:lI99|H387A0C
-387A0C:lI97|H387AA4
-387AA4:lI115|H387B44
-387B44:lI101|H387BEC
-387BEC:lI47|H387C9C
-387C9C:lI111|H387D54
-387D54:lI116|H387E14
-387E14:lI112|H387EDC
-387EDC:lI47|H387FAC
-387FAC:lI101|H388084
-388084:lI114|H388164
-388164:lI116|H38824C
-38824C:lI115|H38833C
-38833C:lI47|H388434
-388434:lI108|H388534
-388534:lI105|H38863C
-38863C:lI98|H38874C
-38874C:lI47|H38885C
-38885C:lI115|H38896C
-38896C:lI97|H388A74
-388A74:lI115|H388B84
-388B84:lI108|H388C94
-388C94:lI47|H388DA4
-388DA4:lI101|H388EB4
-388EB4:lI98|H388FCC
-388FCC:lI105|H3890DC
-3890DC:lI110|N
-38AED8:lH387704|H38AF08
-387704:lI47|H387774
-387774:lI99|H3877EC
-3877EC:lI108|H38786C
-38786C:lI101|H3878F4
-3878F4:lI97|H387984
-387984:lI114|H387A14
-387A14:lI99|H387AAC
-387AAC:lI97|H387B4C
-387B4C:lI115|H387BF4
-387BF4:lI101|H387CA4
-387CA4:lI47|H387D5C
-387D5C:lI111|H387E1C
-387E1C:lI116|H387EE4
-387EE4:lI112|H387FB4
-387FB4:lI47|H38808C
-38808C:lI101|H38816C
-38816C:lI114|H388254
-388254:lI116|H388344
-388344:lI115|H38843C
-38843C:lI47|H38853C
-38853C:lI108|H388644
-388644:lI105|H388754
-388754:lI98|H388864
-388864:lI47|H388974
-388974:lI114|H388A7C
-388A7C:lI117|H388B8C
-388B8C:lI110|H388C9C
-388C9C:lI116|H388DAC
-388DAC:lI105|H388EBC
-388EBC:lI109|H388FD4
-388FD4:lI101|H3890E4
-3890E4:lI95|H3891F4
-3891F4:lI116|H389304
-389304:lI111|H389414
-389414:lI111|H389524
-389524:lI108|H389624
-389624:lI115|H38971C
-38971C:lI47|H389814
-389814:lI101|H38990C
-38990C:lI98|H389A04
-389A04:lI105|H389AE4
-389AE4:lI110|N
-38AF08:lH38777C|H38AF40
-38777C:lI47|H3877F4
-3877F4:lI99|H387874
-387874:lI108|H3878FC
-3878FC:lI101|H38798C
-38798C:lI97|H387A1C
-387A1C:lI114|H387AB4
-387AB4:lI99|H387B54
-387B54:lI97|H387BFC
-387BFC:lI115|H387CAC
-387CAC:lI101|H387D64
-387D64:lI47|H387E24
-387E24:lI111|H387EEC
-387EEC:lI116|H387FBC
-387FBC:lI112|H388094
-388094:lI47|H388174
-388174:lI101|H38825C
-38825C:lI114|H38834C
-38834C:lI116|H388444
-388444:lI115|H388544
-388544:lI47|H38864C
-38864C:lI108|H38875C
-38875C:lI105|H38886C
-38886C:lI98|H38897C
-38897C:lI47|H388A84
-388A84:lI114|H388B94
-388B94:lI115|H388CA4
-388CA4:lI104|H388DB4
-388DB4:lI101|H388EC4
-388EC4:lI108|H388FDC
-388FDC:lI108|H3890EC
-3890EC:lI47|H3891FC
-3891FC:lI101|H38930C
-38930C:lI98|H38941C
-38941C:lI105|H38952C
-38952C:lI110|N
-38AF40:lH3877FC|H38AF68
-3877FC:lI47|H38787C
-38787C:lI99|H387904
-387904:lI108|H387994
-387994:lI101|H387A24
-387A24:lI97|H387ABC
-387ABC:lI114|H387B5C
-387B5C:lI99|H387C04
-387C04:lI97|H387CB4
-387CB4:lI115|H387D6C
-387D6C:lI101|H387E2C
-387E2C:lI47|H387EF4
-387EF4:lI111|H387FC4
-387FC4:lI116|H38809C
-38809C:lI112|H38817C
-38817C:lI47|H388264
-388264:lI101|H388354
-388354:lI114|H38844C
-38844C:lI116|H38854C
-38854C:lI115|H388654
-388654:lI47|H388764
-388764:lI108|H388874
-388874:lI105|H388984
-388984:lI98|H388A8C
-388A8C:lI47|H388B9C
-388B9C:lI112|H388CAC
-388CAC:lI109|H388DBC
-388DBC:lI97|H388ECC
-388ECC:lI110|H388FE4
-388FE4:lI47|H3890F4
-3890F4:lI101|H389204
-389204:lI98|H389314
-389314:lI105|H389424
-389424:lI110|N
-38AF68:lH387884|H38AF90
-387884:lI47|H38790C
-38790C:lI99|H38799C
-38799C:lI108|H387A2C
-387A2C:lI101|H387AC4
-387AC4:lI97|H387B64
-387B64:lI114|H387C0C
-387C0C:lI99|H387CBC
-387CBC:lI97|H387D74
-387D74:lI115|H387E34
-387E34:lI101|H387EFC
-387EFC:lI47|H387FCC
-387FCC:lI111|H3880A4
-3880A4:lI116|H388184
-388184:lI112|H38826C
-38826C:lI47|H38835C
-38835C:lI101|H388454
-388454:lI114|H388554
-388554:lI116|H38865C
-38865C:lI115|H38876C
-38876C:lI47|H38887C
-38887C:lI108|H38898C
-38898C:lI105|H388A94
-388A94:lI98|H388BA4
-388BA4:lI47|H388CB4
-388CB4:lI112|H388DC4
-388DC4:lI97|H388ED4
-388ED4:lI114|H388FEC
-388FEC:lI115|H3890FC
-3890FC:lI101|H38920C
-38920C:lI116|H38931C
-38931C:lI111|H38942C
-38942C:lI111|H389534
-389534:lI108|H38962C
-38962C:lI115|H389724
-389724:lI47|H38981C
-38981C:lI101|H389914
-389914:lI98|H389A0C
-389A0C:lI105|H389AEC
-389AEC:lI110|N
-38AF90:lH387914|H38AFB8
-387914:lI47|H3879A4
-3879A4:lI99|H387A34
-387A34:lI108|H387ACC
-387ACC:lI101|H387B6C
-387B6C:lI97|H387C14
-387C14:lI114|H387CC4
-387CC4:lI99|H387D7C
-387D7C:lI97|H387E3C
-387E3C:lI115|H387F04
-387F04:lI101|H387FD4
-387FD4:lI47|H3880AC
-3880AC:lI111|H38818C
-38818C:lI116|H388274
-388274:lI112|H388364
-388364:lI47|H38845C
-38845C:lI101|H38855C
-38855C:lI114|H388664
-388664:lI116|H388774
-388774:lI115|H388884
-388884:lI47|H388994
-388994:lI108|H388A9C
-388A9C:lI105|H388BAC
-388BAC:lI98|H388CBC
-388CBC:lI47|H388DCC
-388DCC:lI111|H388EDC
-388EDC:lI116|H388FF4
-388FF4:lI112|H389104
-389104:lI95|H389214
-389214:lI109|H389324
-389324:lI105|H389434
-389434:lI98|H38953C
-38953C:lI115|H389634
-389634:lI47|H38972C
-38972C:lI101|H389824
-389824:lI98|H38991C
-38991C:lI105|H389A14
-389A14:lI110|N
-38AFB8:lH3879AC|H38AFE0
-3879AC:lI47|H387A3C
-387A3C:lI99|H387AD4
-387AD4:lI108|H387B74
-387B74:lI101|H387C1C
-387C1C:lI97|H387CCC
-387CCC:lI114|H387D84
-387D84:lI99|H387E44
-387E44:lI97|H387F0C
-387F0C:lI115|H387FDC
-387FDC:lI101|H3880B4
-3880B4:lI47|H388194
-388194:lI111|H38827C
-38827C:lI116|H38836C
-38836C:lI112|H388464
-388464:lI47|H388564
-388564:lI101|H38866C
-38866C:lI114|H38877C
-38877C:lI116|H38888C
-38888C:lI115|H38899C
-38899C:lI47|H388AA4
-388AA4:lI108|H388BB4
-388BB4:lI105|H388CC4
-388CC4:lI98|H388DD4
-388DD4:lI47|H388EE4
-388EE4:lI111|H388FFC
-388FFC:lI115|H38910C
-38910C:lI95|H38921C
-38921C:lI109|H38932C
-38932C:lI111|H38943C
-38943C:lI110|H389544
-389544:lI47|H38963C
-38963C:lI101|H389734
-389734:lI98|H38982C
-38982C:lI105|H389924
-389924:lI110|N
-38AFE0:lH387A44|H38B000
-387A44:lI47|H387ADC
-387ADC:lI99|H387B7C
-387B7C:lI108|H387C24
-387C24:lI101|H387CD4
-387CD4:lI97|H387D8C
-387D8C:lI114|H387E4C
-387E4C:lI99|H387F14
-387F14:lI97|H387FE4
-387FE4:lI115|H3880BC
-3880BC:lI101|H38819C
-38819C:lI47|H388284
-388284:lI111|H388374
-388374:lI116|H38846C
-38846C:lI112|H38856C
-38856C:lI47|H388674
-388674:lI101|H388784
-388784:lI114|H388894
-388894:lI116|H3889A4
-3889A4:lI115|H388AAC
-388AAC:lI47|H388BBC
-388BBC:lI108|H388CCC
-388CCC:lI105|H388DDC
-388DDC:lI98|H388EEC
-388EEC:lI47|H389004
-389004:lI111|H389114
-389114:lI114|H389224
-389224:lI98|H389334
-389334:lI101|H389444
-389444:lI114|H38954C
-38954C:lI47|H389644
-389644:lI101|H38973C
-38973C:lI98|H389834
-389834:lI105|H38992C
-38992C:lI110|N
-38B000:lH387AE4|H38B010
-387AE4:lI47|H387B84
-387B84:lI99|H387C2C
-387C2C:lI108|H387CDC
-387CDC:lI101|H387D94
-387D94:lI97|H387E54
-387E54:lI114|H387F1C
-387F1C:lI99|H387FEC
-387FEC:lI97|H3880C4
-3880C4:lI115|H3881A4
-3881A4:lI101|H38828C
-38828C:lI47|H38837C
-38837C:lI111|H388474
-388474:lI116|H388574
-388574:lI112|H38867C
-38867C:lI47|H38878C
-38878C:lI101|H38889C
-38889C:lI114|H3889AC
-3889AC:lI116|H388AB4
-388AB4:lI115|H388BC4
-388BC4:lI47|H388CD4
-388CD4:lI108|H388DE4
-388DE4:lI105|H388EF4
-388EF4:lI98|H38900C
-38900C:lI47|H38911C
-38911C:lI111|H38922C
-38922C:lI100|H38933C
-38933C:lI98|H38944C
-38944C:lI99|H389554
-389554:lI47|H38964C
-38964C:lI101|H389744
-389744:lI98|H38983C
-38983C:lI105|H389934
-389934:lI110|N
-38B010:lH387B8C|H38B020
-387B8C:lI47|H387C34
-387C34:lI99|H387CE4
-387CE4:lI108|H387D9C
-387D9C:lI101|H387E5C
-387E5C:lI97|H387F24
-387F24:lI114|H387FF4
-387FF4:lI99|H3880CC
-3880CC:lI97|H3881AC
-3881AC:lI115|H388294
-388294:lI101|H388384
-388384:lI47|H38847C
-38847C:lI111|H38857C
-38857C:lI116|H388684
-388684:lI112|H388794
-388794:lI47|H3888A4
-3888A4:lI101|H3889B4
-3889B4:lI114|H388ABC
-388ABC:lI116|H388BCC
-388BCC:lI115|H388CDC
-388CDC:lI47|H388DEC
-388DEC:lI108|H388EFC
-388EFC:lI105|H389014
-389014:lI98|H389124
-389124:lI47|H389234
-389234:lI111|H389344
-389344:lI98|H389454
-389454:lI115|H38955C
-38955C:lI101|H389654
-389654:lI114|H38974C
-38974C:lI118|H389844
-389844:lI101|H38993C
-38993C:lI114|H389A1C
-389A1C:lI47|H389AF4
-389AF4:lI101|H389BBC
-389BBC:lI98|H389C84
-389C84:lI105|H389D4C
-389D4C:lI110|N
-38B020:lH387C3C|H38B028
-387C3C:lI47|H387CEC
-387CEC:lI99|H387DA4
-387DA4:lI108|H387E64
-387E64:lI101|H387F2C
-387F2C:lI97|H387FFC
-387FFC:lI114|H3880D4
-3880D4:lI99|H3881B4
-3881B4:lI97|H38829C
-38829C:lI115|H38838C
-38838C:lI101|H388484
-388484:lI47|H388584
-388584:lI111|H38868C
-38868C:lI116|H38879C
-38879C:lI112|H3888AC
-3888AC:lI47|H3889BC
-3889BC:lI101|H388AC4
-388AC4:lI114|H388BD4
-388BD4:lI116|H388CE4
-388CE4:lI115|H388DF4
-388DF4:lI47|H388F04
-388F04:lI108|H38901C
-38901C:lI105|H38912C
-38912C:lI98|H38923C
-38923C:lI47|H38934C
-38934C:lI109|H38945C
-38945C:lI110|H389564
-389564:lI101|H38965C
-38965C:lI115|H389754
-389754:lI105|H38984C
-38984C:lI97|H389944
-389944:lI95|H389A24
-389A24:lI115|H389AFC
-389AFC:lI101|H389BC4
-389BC4:lI115|H389C8C
-389C8C:lI115|H389D54
-389D54:lI105|H389E14
-389E14:lI111|H389ECC
-389ECC:lI110|H389F7C
-389F7C:lI47|H38A01C
-38A01C:lI101|H38A0AC
-38A0AC:lI98|H38A12C
-38A12C:lI105|H38A19C
-38A19C:lI110|N
-38B028:lH387CF4|H38B030
-387CF4:lI47|H387DAC
-387DAC:lI99|H387E6C
-387E6C:lI108|H387F34
-387F34:lI101|H388004
-388004:lI97|H3880DC
-3880DC:lI114|H3881BC
-3881BC:lI99|H3882A4
-3882A4:lI97|H388394
-388394:lI115|H38848C
-38848C:lI101|H38858C
-38858C:lI47|H388694
-388694:lI111|H3887A4
-3887A4:lI116|H3888B4
-3888B4:lI112|H3889C4
-3889C4:lI47|H388ACC
-388ACC:lI101|H388BDC
-388BDC:lI114|H388CEC
-388CEC:lI116|H388DFC
-388DFC:lI115|H388F0C
-388F0C:lI47|H389024
-389024:lI108|H389134
-389134:lI105|H389244
-389244:lI98|H389354
-389354:lI47|H389464
-389464:lI109|H38956C
-38956C:lI110|H389664
-389664:lI101|H38975C
-38975C:lI115|H389854
-389854:lI105|H38994C
-38994C:lI97|H389A2C
-389A2C:lI47|H389B04
-389B04:lI101|H389BCC
-389BCC:lI98|H389C94
-389C94:lI105|H389D5C
-389D5C:lI110|N
-38B030:lH387DB4|H38B038
-387DB4:lI47|H387E74
-387E74:lI99|H387F3C
-387F3C:lI108|H38800C
-38800C:lI101|H3880E4
-3880E4:lI97|H3881C4
-3881C4:lI114|H3882AC
-3882AC:lI99|H38839C
-38839C:lI97|H388494
-388494:lI115|H388594
-388594:lI101|H38869C
-38869C:lI47|H3887AC
-3887AC:lI111|H3888BC
-3888BC:lI116|H3889CC
-3889CC:lI112|H388AD4
-388AD4:lI47|H388BE4
-388BE4:lI101|H388CF4
-388CF4:lI114|H388E04
-388E04:lI116|H388F14
-388F14:lI115|H38902C
-38902C:lI47|H38913C
-38913C:lI108|H38924C
-38924C:lI105|H38935C
-38935C:lI98|H38946C
-38946C:lI47|H389574
-389574:lI109|H38966C
-38966C:lI110|H389764
-389764:lI101|H38985C
-38985C:lI109|H389954
-389954:lI111|H389A34
-389A34:lI115|H389B0C
-389B0C:lI121|H389BD4
-389BD4:lI110|H389C9C
-389C9C:lI101|H389D64
-389D64:lI47|H389E1C
-389E1C:lI101|H389ED4
-389ED4:lI98|H389F84
-389F84:lI105|H38A024
-38A024:lI110|N
-38B038:lH387E7C|H38B040
-387E7C:lI47|H387F44
-387F44:lI99|H388014
-388014:lI108|H3880EC
-3880EC:lI101|H3881CC
-3881CC:lI97|H3882B4
-3882B4:lI114|H3883A4
-3883A4:lI99|H38849C
-38849C:lI97|H38859C
-38859C:lI115|H3886A4
-3886A4:lI101|H3887B4
-3887B4:lI47|H3888C4
-3888C4:lI111|H3889D4
-3889D4:lI116|H388ADC
-388ADC:lI112|H388BEC
-388BEC:lI47|H388CFC
-388CFC:lI101|H388E0C
-388E0C:lI114|H388F1C
-388F1C:lI116|H389034
-389034:lI115|H389144
-389144:lI47|H389254
-389254:lI108|H389364
-389364:lI105|H389474
-389474:lI98|H38957C
-38957C:lI47|H389674
-389674:lI109|H38976C
-38976C:lI101|H389864
-389864:lI103|H38995C
-38995C:lI97|H389A3C
-389A3C:lI99|H389B14
-389B14:lI111|H389BDC
-389BDC:lI47|H389CA4
-389CA4:lI101|H389D6C
-389D6C:lI98|H389E24
-389E24:lI105|H389EDC
-389EDC:lI110|N
-38B040:lH387F4C|H38B048
-387F4C:lI47|H38801C
-38801C:lI99|H3880F4
-3880F4:lI108|H3881D4
-3881D4:lI101|H3882BC
-3882BC:lI97|H3883AC
-3883AC:lI114|H3884A4
-3884A4:lI99|H3885A4
-3885A4:lI97|H3886AC
-3886AC:lI115|H3887BC
-3887BC:lI101|H3888CC
-3888CC:lI47|H3889DC
-3889DC:lI111|H388AE4
-388AE4:lI116|H388BF4
-388BF4:lI112|H388D04
-388D04:lI47|H388E14
-388E14:lI101|H388F24
-388F24:lI114|H38903C
-38903C:lI116|H38914C
-38914C:lI115|H38925C
-38925C:lI47|H38936C
-38936C:lI108|H38947C
-38947C:lI105|H389584
-389584:lI98|H38967C
-38967C:lI47|H389774
-389774:lI106|H38986C
-38986C:lI105|H389964
-389964:lI110|H389A44
-389A44:lI116|H389B1C
-389B1C:lI101|H389BE4
-389BE4:lI114|H389CAC
-389CAC:lI102|H389D74
-389D74:lI97|H389E2C
-389E2C:lI99|H389EE4
-389EE4:lI101|N
-38B048:lH388024|H38B050
-388024:lI47|H3880FC
-3880FC:lI99|H3881DC
-3881DC:lI108|H3882C4
-3882C4:lI101|H3883B4
-3883B4:lI97|H3884AC
-3884AC:lI114|H3885AC
-3885AC:lI99|H3886B4
-3886B4:lI97|H3887C4
-3887C4:lI115|H3888D4
-3888D4:lI101|H3889E4
-3889E4:lI47|H388AEC
-388AEC:lI111|H388BFC
-388BFC:lI116|H388D0C
-388D0C:lI112|H388E1C
-388E1C:lI47|H388F2C
-388F2C:lI101|H389044
-389044:lI114|H389154
-389154:lI116|H389264
-389264:lI115|H389374
-389374:lI47|H389484
-389484:lI108|H38958C
-38958C:lI105|H389684
-389684:lI98|H38977C
-38977C:lI47|H389874
-389874:lI105|H38996C
-38996C:lI110|H389A4C
-389A4C:lI101|H389B24
-389B24:lI116|H389BEC
-389BEC:lI115|H389CB4
-389CB4:lI47|H389D7C
-389D7C:lI101|H389E34
-389E34:lI98|H389EEC
-389EEC:lI105|H389F8C
-389F8C:lI110|N
-38B050:lH388104|H38B058
-388104:lI47|H3881E4
-3881E4:lI99|H3882CC
-3882CC:lI108|H3883BC
-3883BC:lI101|H3884B4
-3884B4:lI97|H3885B4
-3885B4:lI114|H3886BC
-3886BC:lI99|H3887CC
-3887CC:lI97|H3888DC
-3888DC:lI115|H3889EC
-3889EC:lI101|H388AF4
-388AF4:lI47|H388C04
-388C04:lI111|H388D14
-388D14:lI116|H388E24
-388E24:lI112|H388F34
-388F34:lI47|H38904C
-38904C:lI101|H38915C
-38915C:lI114|H38926C
-38926C:lI116|H38937C
-38937C:lI115|H38948C
-38948C:lI47|H389594
-389594:lI108|H38968C
-38968C:lI105|H389784
-389784:lI98|H38987C
-38987C:lI47|H389974
-389974:lI105|H389A54
-389A54:lI99|H389B2C
-389B2C:lI47|H389BF4
-389BF4:lI101|H389CBC
-389CBC:lI98|H389D84
-389D84:lI105|H389E3C
-389E3C:lI110|N
-38B058:lH3881EC|H38B060
-3881EC:lI47|H3882D4
-3882D4:lI99|H3883C4
-3883C4:lI108|H3884BC
-3884BC:lI101|H3885BC
-3885BC:lI97|H3886C4
-3886C4:lI114|H3887D4
-3887D4:lI99|H3888E4
-3888E4:lI97|H3889F4
-3889F4:lI115|H388AFC
-388AFC:lI101|H388C0C
-388C0C:lI47|H388D1C
-388D1C:lI111|H388E2C
-388E2C:lI116|H388F3C
-388F3C:lI112|H389054
-389054:lI47|H389164
-389164:lI101|H389274
-389274:lI114|H389384
-389384:lI116|H389494
-389494:lI115|H38959C
-38959C:lI47|H389694
-389694:lI108|H38978C
-38978C:lI105|H389884
-389884:lI98|H38997C
-38997C:lI47|H389A5C
-389A5C:lI104|H389B34
-389B34:lI105|H389BFC
-389BFC:lI112|H389CC4
-389CC4:lI101|H389D8C
-389D8C:lI47|H389E44
-389E44:lI101|H389EF4
-389EF4:lI98|H389F94
-389F94:lI105|H38A02C
-38A02C:lI110|N
-38B060:lH3882DC|H38B068
-3882DC:lI47|H3883CC
-3883CC:lI99|H3884C4
-3884C4:lI108|H3885C4
-3885C4:lI101|H3886CC
-3886CC:lI97|H3887DC
-3887DC:lI114|H3888EC
-3888EC:lI99|H3889FC
-3889FC:lI97|H388B04
-388B04:lI115|H388C14
-388C14:lI101|H388D24
-388D24:lI47|H388E34
-388E34:lI111|H388F44
-388F44:lI116|H38905C
-38905C:lI112|H38916C
-38916C:lI47|H38927C
-38927C:lI101|H38938C
-38938C:lI114|H38949C
-38949C:lI116|H3895A4
-3895A4:lI115|H38969C
-38969C:lI47|H389794
-389794:lI108|H38988C
-38988C:lI105|H389984
-389984:lI98|H389A64
-389A64:lI47|H389B3C
-389B3C:lI103|H389C04
-389C04:lI115|H389CCC
-389CCC:lI47|H389D94
-389D94:lI101|H389E4C
-389E4C:lI98|H389EFC
-389EFC:lI105|H389F9C
-389F9C:lI110|N
-38B068:lH3883D4|H38B070
-3883D4:lI47|H3884CC
-3884CC:lI99|H3885CC
-3885CC:lI108|H3886D4
-3886D4:lI101|H3887E4
-3887E4:lI97|H3888F4
-3888F4:lI114|H388A04
-388A04:lI99|H388B0C
-388B0C:lI97|H388C1C
-388C1C:lI115|H388D2C
-388D2C:lI101|H388E3C
-388E3C:lI47|H388F4C
-388F4C:lI111|H389064
-389064:lI116|H389174
-389174:lI112|H389284
-389284:lI47|H389394
-389394:lI101|H3894A4
-3894A4:lI114|H3895AC
-3895AC:lI116|H3896A4
-3896A4:lI115|H38979C
-38979C:lI47|H389894
-389894:lI108|H38998C
-38998C:lI105|H389A6C
-389A6C:lI98|H389B44
-389B44:lI47|H389C0C
-389C0C:lI101|H389CD4
-389CD4:lI118|H389D9C
-389D9C:lI97|H389E54
-389E54:lI47|H389F04
-389F04:lI101|H389FA4
-389FA4:lI98|H38A034
-38A034:lI105|H38A0B4
-38A0B4:lI110|N
-38B070:lH3884D4|H38B078
-3884D4:lI47|H3885D4
-3885D4:lI99|H3886DC
-3886DC:lI108|H3887EC
-3887EC:lI101|H3888FC
-3888FC:lI97|H388A0C
-388A0C:lI114|H388B14
-388B14:lI99|H388C24
-388C24:lI97|H388D34
-388D34:lI115|H388E44
-388E44:lI101|H388F54
-388F54:lI47|H38906C
-38906C:lI111|H38917C
-38917C:lI116|H38928C
-38928C:lI112|H38939C
-38939C:lI47|H3894AC
-3894AC:lI101|H3895B4
-3895B4:lI114|H3896AC
-3896AC:lI116|H3897A4
-3897A4:lI115|H38989C
-38989C:lI47|H389994
-389994:lI108|H389A74
-389A74:lI105|H389B4C
-389B4C:lI98|H389C14
-389C14:lI47|H389CDC
-389CDC:lI101|H389DA4
-389DA4:lI116|H389E5C
-389E5C:lI47|H389F0C
-389F0C:lI101|H389FAC
-389FAC:lI98|H38A03C
-38A03C:lI105|H38A0BC
-38A0BC:lI110|N
-38B078:lH3885DC|H38B080
-3885DC:lI47|H3886E4
-3886E4:lI99|H3887F4
-3887F4:lI108|H388904
-388904:lI101|H388A14
-388A14:lI97|H388B1C
-388B1C:lI114|H388C2C
-388C2C:lI99|H388D3C
-388D3C:lI97|H388E4C
-388E4C:lI115|H388F5C
-388F5C:lI101|H389074
-389074:lI47|H389184
-389184:lI111|H389294
-389294:lI116|H3893A4
-3893A4:lI112|H3894B4
-3894B4:lI47|H3895BC
-3895BC:lI101|H3896B4
-3896B4:lI114|H3897AC
-3897AC:lI116|H3898A4
-3898A4:lI115|H38999C
-38999C:lI47|H389A7C
-389A7C:lI108|H389B54
-389B54:lI105|H389C1C
-389C1C:lI98|H389CE4
-389CE4:lI47|H389DAC
-389DAC:lI101|H389E64
-389E64:lI114|H389F14
-389F14:lI108|H389FB4
-389FB4:lI95|H38A044
-38A044:lI105|H38A0C4
-38A0C4:lI110|H38A134
-38A134:lI116|H38A1A4
-38A1A4:lI101|H38A20C
-38A20C:lI114|H38A274
-38A274:lI102|H38A2DC
-38A2DC:lI97|H38A344
-38A344:lI99|H38A3AC
-38A3AC:lI101|N
-38B080:lH3886EC|H38B088
-3886EC:lI47|H3887FC
-3887FC:lI99|H38890C
-38890C:lI108|H388A1C
-388A1C:lI101|H388B24
-388B24:lI97|H388C34
-388C34:lI114|H388D44
-388D44:lI99|H388E54
-388E54:lI97|H388F64
-388F64:lI115|H38907C
-38907C:lI101|H38918C
-38918C:lI47|H38929C
-38929C:lI111|H3893AC
-3893AC:lI116|H3894BC
-3894BC:lI112|H3895C4
-3895C4:lI47|H3896BC
-3896BC:lI101|H3897B4
-3897B4:lI114|H3898AC
-3898AC:lI116|H3899A4
-3899A4:lI115|H389A84
-389A84:lI47|H389B5C
-389B5C:lI108|H389C24
-389C24:lI105|H389CEC
-389CEC:lI98|H389DB4
-389DB4:lI47|H389E6C
-389E6C:lI100|H389F1C
-389F1C:lI101|H389FBC
-389FBC:lI98|H38A04C
-38A04C:lI117|H38A0CC
-38A0CC:lI103|H38A13C
-38A13C:lI103|H38A1AC
-38A1AC:lI101|H38A214
-38A214:lI114|H38A27C
-38A27C:lI47|H38A2E4
-38A2E4:lI101|H38A34C
-38A34C:lI98|H38A3B4
-38A3B4:lI105|H38A414
-38A414:lI110|N
-38B088:lH388804|H38B090
-388804:lI47|H388914
-388914:lI99|H388A24
-388A24:lI108|H388B2C
-388B2C:lI101|H388C3C
-388C3C:lI97|H388D4C
-388D4C:lI114|H388E5C
-388E5C:lI99|H388F6C
-388F6C:lI97|H389084
-389084:lI115|H389194
-389194:lI101|H3892A4
-3892A4:lI47|H3893B4
-3893B4:lI111|H3894C4
-3894C4:lI116|H3895CC
-3895CC:lI112|H3896C4
-3896C4:lI47|H3897BC
-3897BC:lI101|H3898B4
-3898B4:lI114|H3899AC
-3899AC:lI116|H389A8C
-389A8C:lI115|H389B64
-389B64:lI47|H389C2C
-389C2C:lI108|H389CF4
-389CF4:lI105|H389DBC
-389DBC:lI98|H389E74
-389E74:lI47|H389F24
-389F24:lI99|H389FC4
-389FC4:lI114|H38A054
-38A054:lI121|H38A0D4
-38A0D4:lI112|H38A144
-38A144:lI116|H38A1B4
-38A1B4:lI111|H38A21C
-38A21C:lI47|H38A284
-38A284:lI101|H38A2EC
-38A2EC:lI98|H38A354
-38A354:lI105|H38A3BC
-38A3BC:lI110|N
-38B090:lH38891C|H38B098
-38891C:lI47|H388A2C
-388A2C:lI99|H388B34
-388B34:lI108|H388C44
-388C44:lI101|H388D54
-388D54:lI97|H388E64
-388E64:lI114|H388F74
-388F74:lI99|H38908C
-38908C:lI97|H38919C
-38919C:lI115|H3892AC
-3892AC:lI101|H3893BC
-3893BC:lI47|H3894CC
-3894CC:lI111|H3895D4
-3895D4:lI116|H3896CC
-3896CC:lI112|H3897C4
-3897C4:lI47|H3898BC
-3898BC:lI101|H3899B4
-3899B4:lI114|H389A94
-389A94:lI116|H389B6C
-389B6C:lI115|H389C34
-389C34:lI47|H389CFC
-389CFC:lI108|H389DC4
-389DC4:lI105|H389E7C
-389E7C:lI98|H389F2C
-389F2C:lI47|H389FCC
-389FCC:lI99|H38A05C
-38A05C:lI111|H38A0DC
-38A0DC:lI115|H38A14C
-38A14C:lI84|H38A1BC
-38A1BC:lI114|H38A224
-38A224:lI97|H38A28C
-38A28C:lI110|H38A2F4
-38A2F4:lI115|H38A35C
-38A35C:lI97|H38A3C4
-38A3C4:lI99|H38A41C
-38A41C:lI116|H38A46C
-38A46C:lI105|H38A4BC
-38A4BC:lI111|H38A50C
-38A50C:lI110|H38A554
-38A554:lI115|H38A59C
-38A59C:lI47|H38A5E4
-38A5E4:lI101|H38A62C
-38A62C:lI98|H38A66C
-38A66C:lI105|H38A6A4
-38A6A4:lI110|N
-38B098:lH388A34|H38B0A0
-388A34:lI47|H388B3C
-388B3C:lI99|H388C4C
-388C4C:lI108|H388D5C
-388D5C:lI101|H388E6C
-388E6C:lI97|H388F7C
-388F7C:lI114|H389094
-389094:lI99|H3891A4
-3891A4:lI97|H3892B4
-3892B4:lI115|H3893C4
-3893C4:lI101|H3894D4
-3894D4:lI47|H3895DC
-3895DC:lI111|H3896D4
-3896D4:lI116|H3897CC
-3897CC:lI112|H3898C4
-3898C4:lI47|H3899BC
-3899BC:lI101|H389A9C
-389A9C:lI114|H389B74
-389B74:lI116|H389C3C
-389C3C:lI115|H389D04
-389D04:lI47|H389DCC
-389DCC:lI108|H389E84
-389E84:lI105|H389F34
-389F34:lI98|H389FD4
-389FD4:lI47|H38A064
-38A064:lI99|H38A0E4
-38A0E4:lI111|H38A154
-38A154:lI115|H38A1C4
-38A1C4:lI84|H38A22C
-38A22C:lI105|H38A294
-38A294:lI109|H38A2FC
-38A2FC:lI101|H38A364
-38A364:lI47|H38A3CC
-38A3CC:lI101|H38A424
-38A424:lI98|H38A474
-38A474:lI105|H38A4C4
-38A4C4:lI110|N
-38B0A0:lH388B44|H38B0A8
-388B44:lI47|H388C54
-388C54:lI99|H388D64
-388D64:lI108|H388E74
-388E74:lI101|H388F84
-388F84:lI97|H38909C
-38909C:lI114|H3891AC
-3891AC:lI99|H3892BC
-3892BC:lI97|H3893CC
-3893CC:lI115|H3894DC
-3894DC:lI101|H3895E4
-3895E4:lI47|H3896DC
-3896DC:lI111|H3897D4
-3897D4:lI116|H3898CC
-3898CC:lI112|H3899C4
-3899C4:lI47|H389AA4
-389AA4:lI101|H389B7C
-389B7C:lI114|H389C44
-389C44:lI116|H389D0C
-389D0C:lI115|H389DD4
-389DD4:lI47|H389E8C
-389E8C:lI108|H389F3C
-389F3C:lI105|H389FDC
-389FDC:lI98|H38A06C
-38A06C:lI47|H38A0EC
-38A0EC:lI99|H38A15C
-38A15C:lI111|H38A1CC
-38A1CC:lI115|H38A234
-38A234:lI80|H38A29C
-38A29C:lI114|H38A304
-38A304:lI111|H38A36C
-38A36C:lI112|H38A3D4
-38A3D4:lI101|H38A42C
-38A42C:lI114|H38A47C
-38A47C:lI116|H38A4CC
-38A4CC:lI121|H38A514
-38A514:lI47|H38A55C
-38A55C:lI101|H38A5A4
-38A5A4:lI98|H38A5EC
-38A5EC:lI105|H38A634
-38A634:lI110|N
-38B0A8:lH388C5C|H38B0B0
-388C5C:lI47|H388D6C
-388D6C:lI99|H388E7C
-388E7C:lI108|H388F8C
-388F8C:lI101|H3890A4
-3890A4:lI97|H3891B4
-3891B4:lI114|H3892C4
-3892C4:lI99|H3893D4
-3893D4:lI97|H3894E4
-3894E4:lI115|H3895EC
-3895EC:lI101|H3896E4
-3896E4:lI47|H3897DC
-3897DC:lI111|H3898D4
-3898D4:lI116|H3899CC
-3899CC:lI112|H389AAC
-389AAC:lI47|H389B84
-389B84:lI101|H389C4C
-389C4C:lI114|H389D14
-389D14:lI116|H389DDC
-389DDC:lI115|H389E94
-389E94:lI47|H389F44
-389F44:lI108|H389FE4
-389FE4:lI105|H38A074
-38A074:lI98|H38A0F4
-38A0F4:lI47|H38A164
-38A164:lI99|H38A1D4
-38A1D4:lI111|H38A23C
-38A23C:lI115|H38A2A4
-38A2A4:lI78|H38A30C
-38A30C:lI111|H38A374
-38A374:lI116|H38A3DC
-38A3DC:lI105|H38A434
-38A434:lI102|H38A484
-38A484:lI105|H38A4D4
-38A4D4:lI99|H38A51C
-38A51C:lI97|H38A564
-38A564:lI116|H38A5AC
-38A5AC:lI105|H38A5F4
-38A5F4:lI111|H38A63C
-38A63C:lI110|H38A674
-38A674:lI47|H38A6AC
-38A6AC:lI101|H38A6D4
-38A6D4:lI98|H38A6EC
-38A6EC:lI105|H38A704
-38A704:lI110|N
-38B0B0:lH388D74|H38B0B8
-388D74:lI47|H388E84
-388E84:lI99|H388F94
-388F94:lI108|H3890AC
-3890AC:lI101|H3891BC
-3891BC:lI97|H3892CC
-3892CC:lI114|H3893DC
-3893DC:lI99|H3894EC
-3894EC:lI97|H3895F4
-3895F4:lI115|H3896EC
-3896EC:lI101|H3897E4
-3897E4:lI47|H3898DC
-3898DC:lI111|H3899D4
-3899D4:lI116|H389AB4
-389AB4:lI112|H389B8C
-389B8C:lI47|H389C54
-389C54:lI101|H389D1C
-389D1C:lI114|H389DE4
-389DE4:lI116|H389E9C
-389E9C:lI115|H389F4C
-389F4C:lI47|H389FEC
-389FEC:lI108|H38A07C
-38A07C:lI105|H38A0FC
-38A0FC:lI98|H38A16C
-38A16C:lI47|H38A1DC
-38A1DC:lI99|H38A244
-38A244:lI111|H38A2AC
-38A2AC:lI115|H38A314
-38A314:lI70|H38A37C
-38A37C:lI105|H38A3E4
-38A3E4:lI108|H38A43C
-38A43C:lI101|H38A48C
-38A48C:lI84|H38A4DC
-38A4DC:lI114|H38A524
-38A524:lI97|H38A56C
-38A56C:lI110|H38A5B4
-38A5B4:lI115|H38A5FC
-38A5FC:lI102|H38A644
-38A644:lI101|H38A67C
-38A67C:lI114|H38A6B4
-38A6B4:lI47|H38A6DC
-38A6DC:lI101|H38A6F4
-38A6F4:lI98|H38A70C
-38A70C:lI105|H38A71C
-38A71C:lI110|N
-38B0B8:lH388E8C|H38B0C0
-388E8C:lI47|H388F9C
-388F9C:lI99|H3890B4
-3890B4:lI108|H3891C4
-3891C4:lI101|H3892D4
-3892D4:lI97|H3893E4
-3893E4:lI114|H3894F4
-3894F4:lI99|H3895FC
-3895FC:lI97|H3896F4
-3896F4:lI115|H3897EC
-3897EC:lI101|H3898E4
-3898E4:lI47|H3899DC
-3899DC:lI111|H389ABC
-389ABC:lI116|H389B94
-389B94:lI112|H389C5C
-389C5C:lI47|H389D24
-389D24:lI101|H389DEC
-389DEC:lI114|H389EA4
-389EA4:lI116|H389F54
-389F54:lI115|H389FF4
-389FF4:lI47|H38A084
-38A084:lI108|H38A104
-38A104:lI105|H38A174
-38A174:lI98|H38A1E4
-38A1E4:lI47|H38A24C
-38A24C:lI99|H38A2B4
-38A2B4:lI111|H38A31C
-38A31C:lI115|H38A384
-38A384:lI69|H38A3EC
-38A3EC:lI118|H38A444
-38A444:lI101|H38A494
-38A494:lI110|H38A4E4
-38A4E4:lI116|H38A52C
-38A52C:lI68|H38A574
-38A574:lI111|H38A5BC
-38A5BC:lI109|H38A604
-38A604:lI97|H38A64C
-38A64C:lI105|H38A684
-38A684:lI110|H38A6BC
-38A6BC:lI47|H38A6E4
-38A6E4:lI101|H38A6FC
-38A6FC:lI98|H38A714
-38A714:lI105|H38A724
-38A724:lI110|N
-38B0C0:lH388FA4|H38B0C8
-388FA4:lI47|H3890BC
-3890BC:lI99|H3891CC
-3891CC:lI108|H3892DC
-3892DC:lI101|H3893EC
-3893EC:lI97|H3894FC
-3894FC:lI114|H389604
-389604:lI99|H3896FC
-3896FC:lI97|H3897F4
-3897F4:lI115|H3898EC
-3898EC:lI101|H3899E4
-3899E4:lI47|H389AC4
-389AC4:lI111|H389B9C
-389B9C:lI116|H389C64
-389C64:lI112|H389D2C
-389D2C:lI47|H389DF4
-389DF4:lI101|H389EAC
-389EAC:lI114|H389F5C
-389F5C:lI116|H389FFC
-389FFC:lI115|H38A08C
-38A08C:lI47|H38A10C
-38A10C:lI108|H38A17C
-38A17C:lI105|H38A1EC
-38A1EC:lI98|H38A254
-38A254:lI47|H38A2BC
-38A2BC:lI99|H38A324
-38A324:lI111|H38A38C
-38A38C:lI115|H38A3F4
-38A3F4:lI69|H38A44C
-38A44C:lI118|H38A49C
-38A49C:lI101|H38A4EC
-38A4EC:lI110|H38A534
-38A534:lI116|H38A57C
-38A57C:lI47|H38A5C4
-38A5C4:lI101|H38A60C
-38A60C:lI98|H38A654
-38A654:lI105|H38A68C
-38A68C:lI110|N
-38B0C8:lH3890C4|H38B0D0
-3890C4:lI47|H3891D4
-3891D4:lI99|H3892E4
-3892E4:lI108|H3893F4
-3893F4:lI101|H389504
-389504:lI97|H38960C
-38960C:lI114|H389704
-389704:lI99|H3897FC
-3897FC:lI97|H3898F4
-3898F4:lI115|H3899EC
-3899EC:lI101|H389ACC
-389ACC:lI47|H389BA4
-389BA4:lI111|H389C6C
-389C6C:lI116|H389D34
-389D34:lI112|H389DFC
-389DFC:lI47|H389EB4
-389EB4:lI101|H389F64
-389F64:lI114|H38A004
-38A004:lI116|H38A094
-38A094:lI115|H38A114
-38A114:lI47|H38A184
-38A184:lI108|H38A1F4
-38A1F4:lI105|H38A25C
-38A25C:lI98|H38A2C4
-38A2C4:lI47|H38A32C
-38A32C:lI99|H38A394
-38A394:lI111|H38A3FC
-38A3FC:lI109|H38A454
-38A454:lI112|H38A4A4
-38A4A4:lI105|H38A4F4
-38A4F4:lI108|H38A53C
-38A53C:lI101|H38A584
-38A584:lI114|H38A5CC
-38A5CC:lI47|H38A614
-38A614:lI101|H38A65C
-38A65C:lI98|H38A694
-38A694:lI105|H38A6C4
-38A6C4:lI110|N
-38B0D0:lH3891DC|H38B0D8
-3891DC:lI47|H3892EC
-3892EC:lI99|H3893FC
-3893FC:lI108|H38950C
-38950C:lI101|H389614
-389614:lI97|H38970C
-38970C:lI114|H389804
-389804:lI99|H3898FC
-3898FC:lI97|H3899F4
-3899F4:lI115|H389AD4
-389AD4:lI101|H389BAC
-389BAC:lI47|H389C74
-389C74:lI111|H389D3C
-389D3C:lI116|H389E04
-389E04:lI112|H389EBC
-389EBC:lI47|H389F6C
-389F6C:lI101|H38A00C
-38A00C:lI114|H38A09C
-38A09C:lI116|H38A11C
-38A11C:lI115|H38A18C
-38A18C:lI47|H38A1FC
-38A1FC:lI108|H38A264
-38A264:lI105|H38A2CC
-38A2CC:lI98|H38A334
-38A334:lI47|H38A39C
-38A39C:lI97|H38A404
-38A404:lI115|H38A45C
-38A45C:lI110|H38A4AC
-38A4AC:lI49|H38A4FC
-38A4FC:lI47|H38A544
-38A544:lI101|H38A58C
-38A58C:lI98|H38A5D4
-38A5D4:lI105|H38A61C
-38A61C:lI110|N
-38B0D8:lH3892F4|H38B0E0
-3892F4:lI47|H389404
-389404:lI99|H389514
-389514:lI108|H38961C
-38961C:lI101|H389714
-389714:lI97|H38980C
-38980C:lI114|H389904
-389904:lI99|H3899FC
-3899FC:lI97|H389ADC
-389ADC:lI115|H389BB4
-389BB4:lI101|H389C7C
-389C7C:lI47|H389D44
-389D44:lI111|H389E0C
-389E0C:lI116|H389EC4
-389EC4:lI112|H389F74
-389F74:lI47|H38A014
-38A014:lI101|H38A0A4
-38A0A4:lI114|H38A124
-38A124:lI116|H38A194
-38A194:lI115|H38A204
-38A204:lI47|H38A26C
-38A26C:lI108|H38A2D4
-38A2D4:lI105|H38A33C
-38A33C:lI98|H38A3A4
-38A3A4:lI47|H38A40C
-38A40C:lI97|H38A464
-38A464:lI112|H38A4B4
-38A4B4:lI112|H38A504
-38A504:lI109|H38A54C
-38A54C:lI111|H38A594
-38A594:lI110|H38A5DC
-38A5DC:lI47|H38A624
-38A624:lI101|H38A664
-38A664:lI98|H38A69C
-38A69C:lI105|H38A6CC
-38A6CC:lI110|N
-38B0E0:lH38AA88|H38B0E8
-38AA88:lI47|H38AA90
-38AA90:lI104|H38AA98
-38AA98:lI111|H38AAA0
-38AAA0:lI109|H38AAA8
-38AAA8:lI101|H38AAB0
-38AAB0:lI47|H38AAB8
-38AAB8:lI115|H38AAC0
-38AAC0:lI105|H38AAC8
-38AAC8:lI114|H38AAD0
-38AAD0:lI105|H38AAD8
-38AAD8:lI47|H38AAE0
-38AAE0:lI101|H38AAE8
-38AAE8:lI114|H38AAF0
-38AAF0:lI108|H38AAF8
-38AAF8:lI97|H38AB00
-38AB00:lI110|H38AB08
-38AB08:lI103|N
-38B0E8:lH38AB1C|H38B0F0
-38AB1C:lI47|H38AB2C
-38AB2C:lI104|H38AB4C
-38AB4C:lI111|H38AB74
-38AB74:lI109|H38ABA4
-38ABA4:lI101|H38ABC4
-38ABC4:lI47|H38ABE4
-38ABE4:lI115|H38AC04
-38AC04:lI105|H38AC24
-38AC24:lI114|H38AC3C
-38AC3C:lI105|H38AC44
-38AC44:lI47|H38AC4C
-38AC4C:lI116|H38AC54
-38AC54:lI111|H38AC5C
-38AC5C:lI111|H38AC64
-38AC64:lI108|H38AC6C
-38AC6C:lI115|H38AC74
-38AC74:lI47|H38AC7C
-38AC7C:lI100|H38AC84
-38AC84:lI105|H38AC8C
-38AC8C:lI115|H38AC94
-38AC94:lI116|H38AC9C
-38AC9C:lI101|H38ACA4
-38ACA4:lI108|H38ACAC
-38ACAC:lI47|H38ACB4
-38ACB4:lI101|H38ACBC
-38ACBC:lI98|H38ACC4
-38ACC4:lI105|H38ACCC
-38ACCC:lI110|N
-38B0F0:lH38B0F8|N
-38B0F8:lI47|H38B100
-38B100:lI104|H38B108
-38B108:lI111|H38B110
-38B110:lI109|H38B118
-38B118:lI101|H38B120
-38B120:lI47|H38B128
-38B128:lI115|H38B130
-38B130:lI105|H38B138
-38B138:lI114|H38B140
-38B140:lI105|H38B148
-38B148:lI47|H38B150
-38B150:lI79|H38B158
-38B158:lI84|H38B160
-38B160:lI80|H38B168
-38B168:lI47|H38B170
-38B170:lI103|H38B178
-38B178:lI112|H38B180
-38B180:lI114|H38B188
-38B188:lI115|H38B190
-38B190:lI95|H38B198
-38B198:lI116|H38B1A0
-38B1A0:lI114|H38B1A8
-38B1A8:lI97|H38B1B0
-38B1B0:lI99|H38B1B8
-38B1B8:lI101|H38B1C0
-38B1C0:lI47|H38B1C8
-38B1C8:lI106|H38B1D0
-38B1D0:lI97|H38B1D8
-38B1D8:lI110|N
-3873BC:lI47|H3873CC
-3873CC:lI99|H3873E4
-3873E4:lI108|H3873FC
-3873FC:lI101|H38741C
-38741C:lI97|H387444
-387444:lI114|H387474
-387474:lI99|H3874AC
-3874AC:lI97|H3874EC
-3874EC:lI115|H387534
-387534:lI101|H387584
-387584:lI47|H3875DC
-3875DC:lI111|H38763C
-38763C:lI116|H3876A4
-3876A4:lI112|H387714
-387714:lI47|H38778C
-38778C:lI101|H38780C
-38780C:lI114|H387894
-387894:lI116|H387924
-387924:lI115|N
-=proc_dictionary:<0.19.0>
-H370244
-H370250
-=proc_stack:<0.19.0>
-36b45c:SReturn addr 0x225860 (proc_lib:init_p/5 + 164)
-y0:N
-y1:A8:infinity
-y2:A11:supervisor_bridge
-y3:H36B17C
-y4:P<0.19.0>
-y5:P<0.9.0>
-36b478:SReturn addr 0x156F90 (<terminate process normally>)
-y0:SCatch 0x225860 (proc_lib:init_p/5 + 164)
-y1:A3:gen
-y2:A7:init_it
-y3:H37025C
-=proc_heap:<0.19.0>
-36B17C:t5:A5:state,A8:user_sup,P<0.21.0>,P<0.21.0>,H370238
-370238:t2:P<0.19.0>,A8:user_sup
-37025C:lAA:gen_server|H37027C
-37027C:lP<0.9.0>|H37028C
-37028C:lP<0.9.0>|H370294
-370294:lA11:supervisor_bridge|H37029C
-37029C:lH3702A4|H3702AC
-3702A4:lA8:user_sup|H3702B4
-3702B4:lN|H3702BC
-3702BC:lA4:self|N
-3702AC:lN|N
-370244:t2:AD:$initial_call,H370264
-370264:t3:A3:gen,A7:init_it,H37025C
-370250:t2:AA:$ancestors,H370274
-370274:lAA:kernel_sup|H370284
-370284:lP<0.8.0>|N
-=proc_dictionary:<0.20.0>
-H36F8A8
-=proc_stack:<0.20.0>
-36a714:SReturn addr 0x156F90 (<terminate process normally>)
-y0:N
-y1:N
-y2:H36F8C4
-y3:P<0.21.0>
-y4:P<0.22.0>
-y5:p<0.72>
-y6:p<0.72>
-=proc_heap:<0.20.0>
-36F8C4:t4:I3,I2,P<0.22.0>,H36F8F0
-36F8F0:lH36F900|H36F910
-36F900:t3:I1,P<0.21.0>,H36F920
-36F920:t0:
-36F910:lH36F924|N
-36F924:t3:I2,P<0.22.0>,H36F93C
-36F93C:t3:A5:shell,A5:start,N
-36F8A8:t2:A3:eof,A5:false
-=proc_dictionary:<0.21.0>
-H3709DC
-H3709D0
-H3709F8
-=proc_stack:<0.21.0>
-370d1c:SReturn addr 0x156F90 (<terminate process normally>)
-y0:N
-y1:A9:undefined
-y2:P<0.20.0>
-=proc_heap:<0.21.0>
-3709DC:t2:AB:line_buffer,N
-3709D0:t2:AB:kill_buffer,N
-3709F8:t2:A9:read_mode,A4:list
-=proc_dictionary:<0.22.0>
-H370D44
-H370D60
-H370D7C
-H370D38
-=proc_stack:<0.22.0>
-374a88:SReturn addr 0x2CE718 (group:get_chars_loop/7 + 80)
-y0:N
-y1:N
-y2:A8:infinity
-y3:H374A00
-y4:P<0.20.0>
-y5:H374A28
-374aa4:SReturn addr 0x2CDC18 (group:io_request/5 + 48)
-y0:H37499C
-y1:A6:io_lib
-y2:A9:get_until
-y3:H3748B8
-y4:P<0.20.0>
-y5:A5:start
-374ac0:SReturn addr 0x2CDB2C (group:server_loop/3 + 372)
-y0:P<0.49.0>
-y1:P<0.22.0>
-374acc:SReturn addr 0x156F90 (<terminate process normally>)
-y0:N
-y1:P<0.25.0>
-y2:P<0.20.0>
-=proc_heap:<0.22.0>
-374A00:t4:A4:line,H37499C,H3749A4,A4:none
-3749A4:t2:N,N
-37499C:lI50|H374994
-374994:lI62|H37498C
-37498C:lI32|N
-374A28:t4:A5:stack,H370D58,H374A24,N
-374A24:t0:
-370D58:lH370D74|N
-370D74:lI99|H370D88
-370D88:lI114|H370D90
-370D90:lI97|H370D98
-370D98:lI115|H370DA0
-370DA0:lI104|H370DA8
-370DA8:lI100|H370DB0
-370DB0:lI117|H370DB8
-370DB8:lI109|H370DC0
-370DC0:lI112|H370DC8
-370DC8:lI95|H370DD0
-370DD0:lI118|H370DD8
-370DD8:lI105|H370DE0
-370DE0:lI101|H370DE8
-370DE8:lI119|H370DF0
-370DF0:lI101|H370DF8
-370DF8:lI114|H370E00
-370E00:lI58|H370E08
-370E08:lI115|H370E10
-370E10:lI116|H370E18
-370E18:lI97|H370E20
-370E20:lI114|H370E28
-370E28:lI116|H370E30
-370E30:lI40|H370E38
-370E38:lI41|H370E40
-370E40:lI46|H370E48
-370E48:lI10|N
-3748B8:t3:A8:erl_scan,A6:tokens,H3748B0
-3748B0:lI1|N
-370D44:t2:AB:line_buffer,H370D58
-370D60:t2:A5:shell,P<0.25.0>
-370D7C:t2:AB:kill_buffer,N
-370D38:t2:A9:read_mode,A4:list
-=proc_dictionary:<0.23.0>
-H376464
-H376448
-=proc_stack:<0.23.0>
-376754:SReturn addr 0x225860 (proc_lib:init_p/5 + 164)
-y0:N
-y1:A8:infinity
-y2:AD:kernel_config
-y3:N
-y4:P<0.23.0>
-y5:P<0.9.0>
-376770:SReturn addr 0x156F90 (<terminate process normally>)
-y0:SCatch 0x225860 (proc_lib:init_p/5 + 164)
-y1:A3:gen
-y2:A7:init_it
-y3:H376418
-=proc_heap:<0.23.0>
-376418:lAA:gen_server|H376410
-376410:lP<0.9.0>|H376408
-376408:lP<0.9.0>|H376400
-376400:lAD:kernel_config|H3763F8
-3763F8:lN|H3763F0
-3763F0:lN|N
-376464:t2:AD:$initial_call,H376454
-376454:t3:A3:gen,A7:init_it,H376418
-376448:t2:AA:$ancestors,H376440
-376440:lAA:kernel_sup|H376420
-376420:lP<0.8.0>|N
-=proc_dictionary:<0.24.0>
-H3705E0
-H3705EC
-=proc_stack:<0.24.0>
-36f38c:SReturn addr 0x225860 (proc_lib:init_p/5 + 164)
-y0:N
-y1:A8:infinity
-y2:AA:supervisor
-y3:H36F018
-y4:AF:kernel_safe_sup
-y5:P<0.9.0>
-36f3a8:SReturn addr 0x156F90 (<terminate process normally>)
-y0:SCatch 0x225860 (proc_lib:init_p/5 + 164)
-y1:A3:gen
-y2:A7:init_it
-y3:H37063C
-=proc_heap:<0.24.0>
-36F018:tA:A5:state,H370644,AB:one_for_one,H36F044,N,I4,I3600,N,A6:kernel,A4:safe
-36F044:lH36F04C|N
-36F04C:t8:A5:child,P<0.31.0>,A17:inet_gethost_native_sup,H370650,A9:temporary,I1000,A6:worker,H370660
-370660:lA13:inet_gethost_native|N
-370650:t3:A13:inet_gethost_native,AA:start_link,N
-370644:t2:A5:local,AF:kernel_safe_sup
-37063C:lAA:gen_server|H3706AC
-3706AC:lP<0.9.0>|H3706BC
-3706BC:lP<0.9.0>|H3706C4
-3706C4:lH3706CC|H3706D8
-3706CC:t2:A5:local,AF:kernel_safe_sup
-3706D8:lAA:supervisor|H3706E0
-3706E0:lH3706E8|H3706F8
-3706E8:t3:H370644,A6:kernel,A4:safe
-3706F8:lN|N
-3705E0:t2:AD:$initial_call,H370668
-370668:t3:A3:gen,A7:init_it,H37063C
-3705EC:t2:AA:$ancestors,H370678
-370678:lAA:kernel_sup|H3706B4
-3706B4:lP<0.8.0>|N
-=proc_dictionary:<0.25.0>
-H36E304
-H36E31C
-=proc_stack:<0.25.0>
-36e610:SReturn addr 0x2E06FC (shell:server_loop/6 + 140)
-y0:N
-y1:N
-y2:P<0.27.0>
-y3:P<0.49.0>
-36e624:SReturn addr 0x156F90 (<terminate process normally>)
-y0:N
-y1:N
-y2:I2
-y3:I1
-y4:N
-y5:N
-y6:N
-y7:I20
-y8:I20
-=proc_heap:<0.25.0>
-36E304:t2:H36E2F8,H36E2A8
-36E2A8:lH36E2B0|N
-36E2B0:t4:A4:call,I1,H36E2C4,N
-36E2C4:t4:A6:remote,I1,H36E2D8,H36E2E8
-36E2E8:t3:A4:atom,I1,A5:start
-36E2D8:t3:A4:atom,I1,A10:crashdump_viewer
-36E2F8:t2:A7:command,I1
-36E31C:t2:H36E310,A2:ok
-36E310:t2:A6:result,I1
-=proc_stack:<0.27.0>
-3bda3c:SReturn addr 0x156F90 (<terminate process normally>)
-y0:N
-y1:N
-y2:P<0.25.0>
-=proc_heap:<0.27.0>
-=proc_dictionary:<0.31.0>
-H36DA24
-H36DA08
-=proc_stack:<0.31.0>
-36dcd4:SReturn addr 0x225860 (proc_lib:init_p/5 + 164)
-y0:N
-y1:A8:infinity
-y2:A11:supervisor_bridge
-y3:H36DB68
-y4:A17:inet_gethost_native_sup
-y5:P<0.24.0>
-36dcf0:SReturn addr 0x156F90 (<terminate process normally>)
-y0:SCatch 0x225860 (proc_lib:init_p/5 + 164)
-y1:A3:gen
-y2:A7:init_it
-y3:H36D9D0
-=proc_heap:<0.31.0>
-36DB68:t5:A5:state,A13:inet_gethost_native,P<0.32.0>,P<0.32.0>,H36D994
-36D994:t2:A5:local,A17:inet_gethost_native_sup
-36D9D0:lAA:gen_server|H36D9C8
-36D9C8:lP<0.24.0>|H36D9C0
-36D9C0:lP<0.24.0>|H36D970
-36D970:lH36D980|H36D9B8
-36D980:t2:A5:local,A17:inet_gethost_native_sup
-36D9B8:lA11:supervisor_bridge|H36D978
-36D978:lH36D9A8|H36D9B0
-36D9A8:lA13:inet_gethost_native|H36D9A0
-36D9A0:lN|H36D98C
-36D98C:lH36D994|N
-36D9B0:lN|N
-36DA24:t2:AD:$initial_call,H36DA14
-36DA14:t3:A3:gen,A7:init_it,H36D9D0
-36DA08:t2:AA:$ancestors,H36DA00
-36DA00:lAF:kernel_safe_sup|H36D9E0
-36D9E0:lAA:kernel_sup|H36D9D8
-36D9D8:lP<0.8.0>|N
-=proc_dictionary:<0.32.0>
-H36CFD4
-H36D0BC
-=proc_stack:<0.32.0>
-36d12c:SReturn addr 0x156F90 (<terminate process normally>)
-y0:H36CF18
-=proc_heap:<0.32.0>
-36CF18:t8:A5:state,p<0.105>,I8000,I11,I12,P<0.31.0>,I4,H36CEF0
-36CEF0:t9:AA:statistics,I0,I0,I0,I0,I0,I0,I0,I0
-36CFD4:t2:A3:rid,I1
-36D0BC:t2:AC:num_requests,I0
-=proc_dictionary:<0.33.0>
-H3905C4
-H3905D0
-=proc_stack:<0.33.0>
-3ceee4:SReturn addr 0x225860 (proc_lib:init_p/5 + 164)
-y0:N
-y1:A8:infinity
-y2:A7:webtool
-y3:H3C8570
-y4:A8:web_tool
-y5:P<0.33.0>
-3cef00:SReturn addr 0x156F90 (<terminate process normally>)
-y0:SCatch 0x225860 (proc_lib:init_p/5 + 164)
-y1:A3:gen
-y2:A7:init_it
-y3:H3905FC
-=proc_heap:<0.33.0>
-3C8570:t6:A5:state,H3905EC,I13,P<0.41.0>,H3905F4,H3C85D4
-3C85D4:lA10:crashdump_viewer|N
-3905F4:lH390650|H39065C
-390650:t2:A4:port,I8888
-39065C:lH3906C8|H3906D4
-3906C8:t2:AC:bind_address,H390760
-390760:t4:I127,I0,I0,I1
-3906D4:lH390774|H390780
-390774:t2:AB:server_name,H39082C
-39082C:lI108|H390908
-390908:lI111|H3909DC
-3909DC:lI99|H390AC0
-390AC0:lI97|H390B98
-390B98:lI108|H390C78
-390C78:lI104|H390D58
-390D58:lI111|H390E2C
-390E2C:lI115|H390F10
-390F10:lI116|N
-390780:lH390834|H390840
-390834:t2:AE:max_header_siz,I1024
-390840:lH390910|H39091C
-390910:t2:A11:max_header_action,A8:reply414
-39091C:lH3909E4|H3909F0
-3909E4:t2:A8:com_type,A7:ip_comm
-3909F0:lH390AC8|H390AD4
-390AC8:t2:A7:modules,H390BA0
-390BA0:lA9:mod_alias|H390C80
-390C80:lA8:mod_auth|H390D60
-390D60:lA7:mod_esi|H390E34
-390E34:lAB:mod_actions|H390F18
-390F18:lA7:mod_cgi|H390FF4
-390FF4:lAB:mod_include|H3910D8
-3910D8:lA7:mod_dir|H3911B4
-3911B4:lA7:mod_get|H3912A0
-3912A0:lA8:mod_head|H39139C
-39139C:lA7:mod_log|H3914A0
-3914A0:lAC:mod_disk_log|N
-390AD4:lH390BA8|H390BB4
-390BA8:t2:AF:directory_index,H390C88
-390C88:lH390D68|N
-390D68:lI105|H390E3C
-390E3C:lI110|H390F20
-390F20:lI100|H390FFC
-390FFC:lI101|H3910E0
-3910E0:lI120|H3911BC
-3911BC:lI46|H3912A8
-3912A8:lI104|H3913A4
-3913A4:lI116|H3914A8
-3914A8:lI109|H39159C
-39159C:lI108|N
-390BB4:lH390C90|N
-390C90:t2:AC:default_type,H390D70
-390D70:lI116|H390E44
-390E44:lI101|H390F28
-390F28:lI120|H391004
-391004:lI116|H3910E8
-3910E8:lI47|H3911C4
-3911C4:lI112|H3912B0
-3912B0:lI108|H3913AC
-3913AC:lI97|H3914B0
-3914B0:lI105|H3915A4
-3915A4:lI110|N
-3905EC:lI47|H390648
-390648:lI99|H3906C0
-3906C0:lI108|H390758
-390758:lI101|H390824
-390824:lI97|H390900
-390900:lI114|H3909D4
-3909D4:lI99|H390AB8
-390AB8:lI97|H390B90
-390B90:lI115|H390C70
-390C70:lI101|H390D50
-390D50:lI47|H390E24
-390E24:lI111|H390F08
-390F08:lI116|H390FEC
-390FEC:lI112|H3910D0
-3910D0:lI47|H3911AC
-3911AC:lI101|H391298
-391298:lI114|H391394
-391394:lI116|H391498
-391498:lI115|H391594
-391594:lI47|H391680
-391680:lI108|H39175C
-39175C:lI105|H391840
-391840:lI98|H391924
-391924:lI47|H3919F8
-3919F8:lI119|H391AC4
-391AC4:lI101|H391B90
-391B90:lI98|H391C54
-391C54:lI116|H391D18
-391D18:lI111|H391DD4
-391DD4:lI111|H391E90
-391E90:lI108|H391F5C
-391F5C:lI47|H392030
-392030:lI112|H3920EC
-3920EC:lI114|H3921A8
-3921A8:lI105|H392264
-392264:lI118|N
-3905FC:lAA:gen_server|H390664
-390664:lP<0.27.0>|H3906DC
-3906DC:lA4:self|H390788
-390788:lH390848|H390854
-390848:t2:A5:local,A8:web_tool
-390854:lA7:webtool|H390924
-390924:lH3909F8|H390A04
-3909F8:t2:H3905EC,H3905F4
-390A04:lN|N
-3905C4:t2:AD:$initial_call,H390614
-390614:t3:A3:gen,A7:init_it,H3905FC
-3905D0:t2:AA:$ancestors,H390624
-390624:lP<0.27.0>|N
-=proc_dictionary:<0.41.0>
-H36DF0C
-H36DF18
-=proc_stack:<0.41.0>
-36eda4:SReturn addr 0x225860 (proc_lib:init_p/5 + 164)
-y0:N
-y1:A8:infinity
-y2:AA:supervisor
-y3:H36EA3C
-y4:A6:websup
-y5:P<0.33.0>
-36edc0:SReturn addr 0x156F90 (<terminate process normally>)
-y0:SCatch 0x225860 (proc_lib:init_p/5 + 164)
-y1:A3:gen
-y2:A7:init_it
-y3:H36DF24
-=proc_heap:<0.41.0>
-36EA3C:tA:A5:state,H36DF2C,AB:one_for_one,H36EA68,N,I100,I10,N,AB:webtool_sup,N
-36EA68:lH36EA70|N
-36EA70:t8:A5:child,P<0.48.0>,H36DF38,H36DF44,A9:permanent,I100,A6:worker,H36DF54
-36DF54:lA10:crashdump_viewer|N
-36DF44:t3:A10:crashdump_viewer,AA:start_link,N
-36DF38:t2:A5:local,A17:crashdump_viewer_server
-36DF2C:t2:A5:local,A6:websup
-36DF24:lAA:gen_server|H36DF84
-36DF84:lP<0.33.0>|H36DF94
-36DF94:lP<0.33.0>|H36DF9C
-36DF9C:lH36DFA4|H36DFB0
-36DFA4:t2:A5:local,A6:websup
-36DFB0:lAA:supervisor|H36DFB8
-36DFB8:lH36DFC0|H36DFD0
-36DFC0:t3:H36DF2C,AB:webtool_sup,N
-36DFD0:lN|N
-36DF0C:t2:AD:$initial_call,H36DF6C
-36DF6C:t3:A3:gen,A7:init_it,H36DF24
-36DF18:t2:AA:$ancestors,H36DF7C
-36DF7C:lA8:web_tool|H36DF8C
-36DF8C:lP<0.27.0>|N
-=proc_dictionary:<0.43.0>
-H39D940
-H39D94C
-=proc_stack:<0.43.0>
-3a42ac:SReturn addr 0x225860 (proc_lib:init_p/5 + 164)
-y0:N
-y1:A8:infinity
-y2:AA:supervisor
-y3:H3A3E34
-y4:A1A:httpd_sup__127_0_0_1__8888
-y5:P<0.33.0>
-3a42c8:SReturn addr 0x156F90 (<terminate process normally>)
-y0:SCatch 0x225860 (proc_lib:init_p/5 + 164)
-y1:A3:gen
-y2:A7:init_it
-y3:H39D9CC
-=proc_heap:<0.43.0>
-3A3E34:tA:A5:state,H39D960,AB:one_for_one,H3A3E20,N,I0,I1,N,A9:httpd_sup,H39DA88
-39DA88:lA9:undefined|H39DB18
-39DB18:lH39DB50|H39DB58
-39DB50:lH39DB88|H39DB94
-39DB88:t2:AB:server_root,H39DBD0
-39DBD0:lI47|H39DC0C
-39DC0C:lI99|H39DC50
-39DC50:lI108|H39DC84
-39DC84:lI101|H39DCC4
-39DCC4:lI97|H39DD28
-39DD28:lI114|H39DD90
-39DD90:lI99|H39DE00
-39DE00:lI97|H39DE78
-39DE78:lI115|H39DF00
-39DF00:lI101|H39DF90
-39DF90:lI47|H39E038
-39E038:lI111|H39E0E8
-39E0E8:lI116|H39E1AC
-39E1AC:lI112|H39E288
-39E288:lI47|H39E37C
-39E37C:lI101|H39E478
-39E478:lI114|H39E580
-39E580:lI116|H39E69C
-39E69C:lI115|H39E7B0
-39E7B0:lI47|H39E8C4
-39E8C4:lI108|H39E9D8
-39E9D8:lI105|H39EACC
-39EACC:lI98|H39EBC0
-39EBC0:lI47|H39ECB4
-39ECB4:lI119|H39EDA8
-39EDA8:lI101|H39EE7C
-39EE7C:lI98|H39EF50
-39EF50:lI116|H39F02C
-39F02C:lI111|H39F110
-39F110:lI111|H39F1E4
-39F1E4:lI108|H39F2B0
-39F2B0:lI47|H39F36C
-39F36C:lI112|H39F430
-39F430:lI114|H39F4FC
-39F4FC:lI105|H39F5C0
-39F5C0:lI118|H39F694
-39F694:lI47|H39F768
-39F768:lI114|H39F83C
-39F83C:lI111|H39F920
-39F920:lI111|H39F9FC
-39F9FC:lI116|N
-39DB94:lH39DBD8|H39DBE4
-39DBD8:t2:AD:document_root,H39DC14
-39DC14:lI47|H39DC58
-39DC58:lI99|H39DC8C
-39DC8C:lI108|H39DCCC
-39DCCC:lI101|H39DD30
-39DD30:lI97|H39DD98
-39DD98:lI114|H39DE08
-39DE08:lI99|H39DE80
-39DE80:lI97|H39DF08
-39DF08:lI115|H39DF98
-39DF98:lI101|H39E040
-39E040:lI47|H39E0F0
-39E0F0:lI111|H39E1B4
-39E1B4:lI116|H39E290
-39E290:lI112|H39E384
-39E384:lI47|H39E480
-39E480:lI101|H39E588
-39E588:lI114|H39E6A4
-39E6A4:lI116|H39E7B8
-39E7B8:lI115|H39E8CC
-39E8CC:lI47|H39E9E0
-39E9E0:lI108|H39EAD4
-39EAD4:lI105|H39EBC8
-39EBC8:lI98|H39ECBC
-39ECBC:lI47|H39EDB0
-39EDB0:lI119|H39EE84
-39EE84:lI101|H39EF58
-39EF58:lI98|H39F034
-39F034:lI116|H39F118
-39F118:lI111|H39F1EC
-39F1EC:lI111|H39F2B8
-39F2B8:lI108|H39F374
-39F374:lI47|H39F438
-39F438:lI112|H39F504
-39F504:lI114|H39F5C8
-39F5C8:lI105|H39F69C
-39F69C:lI118|H39F770
-39F770:lI47|H39F844
-39F844:lI114|H39F928
-39F928:lI111|H39FA04
-39FA04:lI111|H39FAD8
-39FAD8:lI116|H39FBB4
-39FBB4:lI47|H39FC80
-39FC80:lI100|H39FD44
-39FD44:lI111|H39FE10
-39FE10:lI99|N
-39DBE4:lH39DC1C|H39DC28
-39DC1C:t2:AA:mime_types,H39DC60
-39DC60:lH39DC94|H39DCA0
-39DC94:t2:H39DCD4,H39DCDC
-39DCDC:lI120|H39DD40
-39DD40:lI45|H39DDA8
-39DDA8:lI119|H39DE10
-39DE10:lI111|H39DE88
-39DE88:lI114|H39DF10
-39DF10:lI108|H39DFA0
-39DFA0:lI100|H39E048
-39E048:lI47|H39E0F8
-39E0F8:lI120|H39E1BC
-39E1BC:lI45|H39E298
-39E298:lI118|H39E38C
-39E38C:lI114|H39E488
-39E488:lI109|H39E590
-39E590:lI108|N
-39DCD4:lI119|H39DD38
-39DD38:lI114|H39DDA0
-39DDA0:lI108|N
-39DCA0:lH39DCE4|H39DCF0
-39DCE4:t2:H39DD48,H39DD50
-39DD50:lI120|H39DDB8
-39DDB8:lI45|H39DE20
-39DE20:lI119|H39DE98
-39DE98:lI111|H39DF18
-39DF18:lI114|H39DFA8
-39DFA8:lI108|H39E050
-39E050:lI100|H39E100
-39E100:lI47|H39E1C4
-39E1C4:lI120|H39E2A0
-39E2A0:lI45|H39E394
-39E394:lI118|H39E490
-39E490:lI114|H39E598
-39E598:lI109|H39E6AC
-39E6AC:lI108|N
-39DD48:lI118|H39DDB0
-39DDB0:lI114|H39DE18
-39DE18:lI109|H39DE90
-39DE90:lI108|N
-39DCF0:lH39DD58|H39DD64
-39DD58:t2:H39DDC0,H39DDC8
-39DDC8:lI120|H39DE30
-39DE30:lI45|H39DEA8
-39DEA8:lI99|H39DF20
-39DF20:lI111|H39DFB0
-39DFB0:lI110|H39E058
-39E058:lI102|H39E108
-39E108:lI101|H39E1CC
-39E1CC:lI114|H39E2A8
-39E2A8:lI101|H39E39C
-39E39C:lI110|H39E498
-39E498:lI99|H39E5A0
-39E5A0:lI101|H39E6B4
-39E6B4:lI47|H39E7C0
-39E7C0:lI120|H39E8D4
-39E8D4:lI45|H39E9E8
-39E9E8:lI99|H39EADC
-39EADC:lI111|H39EBD0
-39EBD0:lI111|H39ECC4
-39ECC4:lI108|H39EDB8
-39EDB8:lI116|H39EE8C
-39EE8C:lI97|H39EF60
-39EF60:lI108|H39F03C
-39F03C:lI107|N
-39DDC0:lI105|H39DE28
-39DE28:lI99|H39DEA0
-39DEA0:lI101|N
-39DD64:lH39DDD0|H39DDDC
-39DDD0:t2:H39DE38,H39DE40
-39DE40:lI118|H39DEB8
-39DEB8:lI105|H39DF30
-39DF30:lI100|H39DFC0
-39DFC0:lI101|H39E068
-39E068:lI111|H39E110
-39E110:lI47|H39E1D4
-39E1D4:lI120|H39E2B0
-39E2B0:lI45|H39E3A4
-39E3A4:lI115|H39E4A0
-39E4A0:lI103|H39E5A8
-39E5A8:lI105|H39E6BC
-39E6BC:lI45|H39E7C8
-39E7C8:lI109|H39E8DC
-39E8DC:lI111|H39E9F0
-39E9F0:lI118|H39EAE4
-39EAE4:lI105|H39EBD8
-39EBD8:lI101|N
-39DE38:lI109|H39DEB0
-39DEB0:lI111|H39DF28
-39DF28:lI118|H39DFB8
-39DFB8:lI105|H39E060
-39E060:lI101|N
-39DDDC:lH39DE48|H39DE54
-39DE48:t2:H39DEC0,H39DEC8
-39DEC8:lI118|H39DF40
-39DF40:lI105|H39DFD0
-39DFD0:lI100|H39E070
-39E070:lI101|H39E118
-39E118:lI111|H39E1DC
-39E1DC:lI47|H39E2B8
-39E2B8:lI120|H39E3AC
-39E3AC:lI45|H39E4A8
-39E4A8:lI109|H39E5B0
-39E5B0:lI115|H39E6C4
-39E6C4:lI118|H39E7D0
-39E7D0:lI105|H39E8E4
-39E8E4:lI100|H39E9F8
-39E9F8:lI101|H39EAEC
-39EAEC:lI111|N
-39DEC0:lI97|H39DF38
-39DF38:lI118|H39DFC8
-39DFC8:lI105|N
-39DE54:lH39DED0|H39DEDC
-39DED0:t2:H39DF48,H39DF50
-39DF50:lI118|H39DFE0
-39DFE0:lI105|H39E078
-39E078:lI100|H39E120
-39E120:lI101|H39E1E4
-39E1E4:lI111|H39E2C0
-39E2C0:lI47|H39E3B4
-39E3B4:lI113|H39E4B0
-39E4B0:lI117|H39E5B8
-39E5B8:lI105|H39E6CC
-39E6CC:lI99|H39E7D8
-39E7D8:lI107|H39E8EC
-39E8EC:lI116|H39EA00
-39EA00:lI105|H39EAF4
-39EAF4:lI109|H39EBE0
-39EBE0:lI101|N
-39DF48:lI113|H39DFD8
-39DFD8:lI116|N
-39DEDC:lH39DF58|H39DF64
-39DF58:t2:H39DFE8,H39DFF0
-39DFF0:lI118|H39E088
-39E088:lI105|H39E130
-39E130:lI100|H39E1EC
-39E1EC:lI101|H39E2C8
-39E2C8:lI111|H39E3BC
-39E3BC:lI47|H39E4B8
-39E4B8:lI113|H39E5C0
-39E5C0:lI117|H39E6D4
-39E6D4:lI105|H39E7E0
-39E7E0:lI99|H39E8F4
-39E8F4:lI107|H39EA08
-39EA08:lI116|H39EAFC
-39EAFC:lI105|H39EBE8
-39EBE8:lI109|H39ECCC
-39ECCC:lI101|N
-39DFE8:lI109|H39E080
-39E080:lI111|H39E128
-39E128:lI118|N
-39DF64:lH39DFF8|H39E004
-39DFF8:t2:H39E090,H39E098
-39E098:lI118|H39E140
-39E140:lI105|H39E1FC
-39E1FC:lI100|H39E2D8
-39E2D8:lI101|H39E3C4
-39E3C4:lI111|H39E4C0
-39E4C0:lI47|H39E5C8
-39E5C8:lI109|H39E6DC
-39E6DC:lI112|H39E7E8
-39E7E8:lI101|H39E8FC
-39E8FC:lI103|N
-39E090:lI109|H39E138
-39E138:lI112|H39E1F4
-39E1F4:lI101|H39E2D0
-39E2D0:lI103|N
-39E004:lH39E0A0|H39E0AC
-39E0A0:t2:H39E148,H39E150
-39E150:lI118|H39E20C
-39E20C:lI105|H39E2E8
-39E2E8:lI100|H39E3CC
-39E3CC:lI101|H39E4C8
-39E4C8:lI111|H39E5D0
-39E5D0:lI47|H39E6E4
-39E6E4:lI109|H39E7F0
-39E7F0:lI112|H39E904
-39E904:lI101|H39EA10
-39EA10:lI103|N
-39E148:lI109|H39E204
-39E204:lI112|H39E2E0
-39E2E0:lI103|N
-39E0AC:lH39E158|H39E164
-39E158:t2:H39E214,H39E21C
-39E21C:lI118|H39E2F8
-39E2F8:lI105|H39E3DC
-39E3DC:lI100|H39E4D0
-39E4D0:lI101|H39E5D8
-39E5D8:lI111|H39E6EC
-39E6EC:lI47|H39E7F8
-39E7F8:lI109|H39E90C
-39E90C:lI112|H39EA18
-39EA18:lI101|H39EB04
-39EB04:lI103|N
-39E214:lI109|H39E2F0
-39E2F0:lI112|H39E3D4
-39E3D4:lI101|N
-39E164:lH39E224|H39E230
-39E224:t2:H39E300,H39E308
-39E308:lI116|H39E3EC
-39E3EC:lI101|H39E4E0
-39E4E0:lI120|H39E5E8
-39E5E8:lI116|H39E6F4
-39E6F4:lI47|H39E800
-39E800:lI120|H39E914
-39E914:lI45|H39EA20
-39EA20:lI115|H39EB0C
-39EB0C:lI103|H39EBF0
-39EBF0:lI109|H39ECD4
-39ECD4:lI108|N
-39E300:lI115|H39E3E4
-39E3E4:lI103|H39E4D8
-39E4D8:lI109|H39E5E0
-39E5E0:lI108|N
-39E230:lH39E310|H39E31C
-39E310:t2:H39E3F4,H39E3FC
-39E3FC:lI116|H39E4F0
-39E4F0:lI101|H39E5F8
-39E5F8:lI120|H39E6FC
-39E6FC:lI116|H39E808
-39E808:lI47|H39E91C
-39E91C:lI120|H39EA28
-39EA28:lI45|H39EB14
-39EB14:lI115|H39EBF8
-39EBF8:lI103|H39ECDC
-39ECDC:lI109|H39EDC0
-39EDC0:lI108|N
-39E3F4:lI115|H39E4E8
-39E4E8:lI103|H39E5F0
-39E5F0:lI109|N
-39E31C:lH39E404|H39E410
-39E404:t2:H39E4F8,H39E500
-39E500:lI116|H39E608
-39E608:lI101|H39E70C
-39E70C:lI120|H39E810
-39E810:lI116|H39E924
-39E924:lI47|H39EA30
-39EA30:lI120|H39EB1C
-39EB1C:lI45|H39EC00
-39EC00:lI115|H39ECE4
-39ECE4:lI101|H39EDC8
-39EDC8:lI116|H39EE94
-39EE94:lI101|H39EF68
-39EF68:lI120|H39F044
-39F044:lI116|N
-39E4F8:lI101|H39E600
-39E600:lI116|H39E704
-39E704:lI120|N
-39E410:lH39E508|H39E514
-39E508:t2:H39E610,H39E618
-39E618:lI116|H39E71C
-39E71C:lI101|H39E820
-39E820:lI120|H39E92C
-39E92C:lI116|H39EA38
-39EA38:lI47|H39EB24
-39EB24:lI116|H39EC08
-39EC08:lI97|H39ECEC
-39ECEC:lI98|H39EDD0
-39EDD0:lI45|H39EE9C
-39EE9C:lI115|H39EF70
-39EF70:lI101|H39F04C
-39F04C:lI112|H39F120
-39F120:lI97|H39F1F4
-39F1F4:lI114|H39F2C0
-39F2C0:lI97|H39F37C
-39F37C:lI116|H39F440
-39F440:lI101|H39F50C
-39F50C:lI100|H39F5D0
-39F5D0:lI45|H39F6A4
-39F6A4:lI118|H39F778
-39F778:lI97|H39F84C
-39F84C:lI108|H39F930
-39F930:lI117|H39FA0C
-39FA0C:lI101|H39FAE0
-39FAE0:lI115|N
-39E610:lI116|H39E714
-39E714:lI115|H39E818
-39E818:lI118|N
-39E514:lH39E620|H39E62C
-39E620:t2:H39E724,H39E72C
-39E72C:lI116|H39E830
-39E830:lI101|H39E93C
-39E93C:lI120|H39EA40
-39EA40:lI116|H39EB2C
-39EB2C:lI47|H39EC10
-39EC10:lI114|H39ECF4
-39ECF4:lI105|H39EDD8
-39EDD8:lI99|H39EEA4
-39EEA4:lI104|H39EF78
-39EF78:lI116|H39F054
-39F054:lI101|H39F128
-39F128:lI120|H39F1FC
-39F1FC:lI116|N
-39E724:lI114|H39E828
-39E828:lI116|H39E934
-39E934:lI120|N
-39E62C:lH39E734|H39E740
-39E734:t2:H39E838,H39E840
-39E840:lI116|H39E94C
-39E94C:lI101|H39EA50
-39EA50:lI120|H39EB34
-39EB34:lI116|H39EC18
-39EC18:lI47|H39ECFC
-39ECFC:lI112|H39EDE0
-39EDE0:lI108|H39EEAC
-39EEAC:lI97|H39EF80
-39EF80:lI105|H39F05C
-39F05C:lI110|N
-39E838:lI116|H39E944
-39E944:lI120|H39EA48
-39EA48:lI116|N
-39E740:lH39E848|H39E854
-39E848:t2:H39E954,H39E95C
-39E95C:lI116|H39EA60
-39EA60:lI101|H39EB44
-39EB44:lI120|H39EC28
-39EC28:lI116|H39ED0C
-39ED0C:lI47|H39EDE8
-39EDE8:lI120|H39EEB4
-39EEB4:lI45|H39EF88
-39EF88:lI115|H39F064
-39F064:lI101|H39F130
-39F130:lI114|H39F204
-39F204:lI118|H39F2C8
-39F2C8:lI101|H39F384
-39F384:lI114|H39F448
-39F448:lI45|H39F514
-39F514:lI112|H39F5D8
-39F5D8:lI97|H39F6AC
-39F6AC:lI114|H39F780
-39F780:lI115|H39F854
-39F854:lI101|H39F938
-39F938:lI100|H39FA14
-39FA14:lI45|H39FAE8
-39FAE8:lI104|H39FBBC
-39FBBC:lI116|H39FC88
-39FC88:lI109|H39FD4C
-39FD4C:lI108|N
-39E954:lI115|H39EA58
-39EA58:lI104|H39EB3C
-39EB3C:lI116|H39EC20
-39EC20:lI109|H39ED04
-39ED04:lI108|N
-39E854:lH39E964|H39E970
-39E964:t2:H39EA68,H39EA70
-39EA70:lI116|H39EB54
-39EB54:lI101|H39EC38
-39EC38:lI120|H39ED1C
-39ED1C:lI116|H39EDF0
-39EDF0:lI47|H39EEBC
-39EEBC:lI104|H39EF90
-39EF90:lI116|H39F06C
-39F06C:lI109|H39F138
-39F138:lI108|N
-39EA68:lI104|H39EB4C
-39EB4C:lI116|H39EC30
-39EC30:lI109|H39ED14
-39ED14:lI108|N
-39E970:lH39EA78|H39EA84
-39EA78:t2:H39EB5C,H39EB64
-39EB64:lI116|H39EC48
-39EC48:lI101|H39ED2C
-39ED2C:lI120|H39EDF8
-39EDF8:lI116|H39EEC4
-39EEC4:lI47|H39EF98
-39EF98:lI104|H39F074
-39F074:lI116|H39F140
-39F140:lI109|H39F20C
-39F20C:lI108|N
-39EB5C:lI104|H39EC40
-39EC40:lI116|H39ED24
-39ED24:lI109|N
-39EA84:lH39EB6C|H39EB78
-39EB6C:t2:H39EC50,H39EC58
-39EC58:lI105|H39ED3C
-39ED3C:lI109|H39EE08
-39EE08:lI97|H39EECC
-39EECC:lI103|H39EFA0
-39EFA0:lI101|H39F07C
-39F07C:lI47|H39F148
-39F148:lI120|H39F214
-39F214:lI45|H39F2D0
-39F2D0:lI120|H39F38C
-39F38C:lI119|H39F450
-39F450:lI105|H39F51C
-39F51C:lI110|H39F5E0
-39F5E0:lI100|H39F6B4
-39F6B4:lI111|H39F788
-39F788:lI119|H39F85C
-39F85C:lI100|H39F940
-39F940:lI117|H39FA1C
-39FA1C:lI109|H39FAF0
-39FAF0:lI112|N
-39EC50:lI120|H39ED34
-39ED34:lI119|H39EE00
-39EE00:lI100|N
-39EB78:lH39EC60|H39EC6C
-39EC60:t2:H39ED44,H39ED4C
-39ED4C:lI105|H39EE18
-39EE18:lI109|H39EEDC
-39EEDC:lI97|H39EFA8
-39EFA8:lI103|H39F084
-39F084:lI101|H39F150
-39F150:lI47|H39F21C
-39F21C:lI120|H39F2D8
-39F2D8:lI45|H39F394
-39F394:lI120|H39F458
-39F458:lI112|H39F524
-39F524:lI105|H39F5E8
-39F5E8:lI120|H39F6BC
-39F6BC:lI109|H39F790
-39F790:lI97|H39F864
-39F864:lI112|N
-39ED44:lI120|H39EE10
-39EE10:lI112|H39EED4
-39EED4:lI109|N
-39EC6C:lH39ED54|H39ED60
-39ED54:t2:H39EE20,H39EE28
-39EE28:lI105|H39EEEC
-39EEEC:lI109|H39EFB8
-39EFB8:lI97|H39F08C
-39F08C:lI103|H39F158
-39F158:lI101|H39F224
-39F224:lI47|H39F2E0
-39F2E0:lI120|H39F39C
-39F39C:lI45|H39F460
-39F460:lI120|H39F52C
-39F52C:lI98|H39F5F0
-39F5F0:lI105|H39F6C4
-39F6C4:lI116|H39F798
-39F798:lI109|H39F86C
-39F86C:lI97|H39F948
-39F948:lI112|N
-39EE20:lI120|H39EEE4
-39EEE4:lI98|H39EFB0
-39EFB0:lI109|N
-39ED60:lH39EE30|H39EE3C
-39EE30:t2:H39EEF4,H39EEFC
-39EEFC:lI105|H39EFC8
-39EFC8:lI109|H39F09C
-39F09C:lI97|H39F160
-39F160:lI103|H39F22C
-39F22C:lI101|H39F2E8
-39F2E8:lI47|H39F3A4
-39F3A4:lI120|H39F468
-39F468:lI45|H39F534
-39F534:lI114|H39F5F8
-39F5F8:lI103|H39F6CC
-39F6CC:lI98|N
-39EEF4:lI114|H39EFC0
-39EFC0:lI103|H39F094
-39F094:lI98|N
-39EE3C:lH39EF04|H39EF10
-39EF04:t2:H39EFD0,H39EFD8
-39EFD8:lI105|H39F0AC
-39F0AC:lI109|H39F170
-39F170:lI97|H39F234
-39F234:lI103|H39F2F0
-39F2F0:lI101|H39F3AC
-39F3AC:lI47|H39F470
-39F470:lI120|H39F53C
-39F53C:lI45|H39F600
-39F600:lI112|H39F6D4
-39F6D4:lI111|H39F7A0
-39F7A0:lI114|H39F874
-39F874:lI116|H39F950
-39F950:lI97|H39FA24
-39FA24:lI98|H39FAF8
-39FAF8:lI108|H39FBC4
-39FBC4:lI101|H39FC90
-39FC90:lI45|H39FD54
-39FD54:lI112|H39FE18
-39FE18:lI105|H39FECC
-39FECC:lI120|H39FF88
-39FF88:lI109|H3A003C
-3A003C:lI97|H3A00E8
-3A00E8:lI112|N
-39EFD0:lI112|H39F0A4
-39F0A4:lI112|H39F168
-39F168:lI109|N
-39EF10:lH39EFE0|H39EFEC
-39EFE0:t2:H39F0B4,H39F0BC
-39F0BC:lI105|H39F180
-39F180:lI109|H39F244
-39F244:lI97|H39F2F8
-39F2F8:lI103|H39F3B4
-39F3B4:lI101|H39F478
-39F478:lI47|H39F544
-39F544:lI120|H39F608
-39F608:lI45|H39F6DC
-39F6DC:lI112|H39F7A8
-39F7A8:lI111|H39F87C
-39F87C:lI114|H39F958
-39F958:lI116|H39FA2C
-39FA2C:lI97|H39FB00
-39FB00:lI98|H39FBCC
-39FBCC:lI108|H39FC98
-39FC98:lI101|H39FD5C
-39FD5C:lI45|H39FE20
-39FE20:lI103|H39FED4
-39FED4:lI114|H39FF90
-39FF90:lI97|H3A0044
-3A0044:lI121|H3A00F0
-3A00F0:lI109|H3A0194
-3A0194:lI97|H3A0248
-3A0248:lI112|N
-39F0B4:lI112|H39F178
-39F178:lI103|H39F23C
-39F23C:lI109|N
-39EFEC:lH39F0C4|H39F0D0
-39F0C4:t2:H39F188,H39F190
-39F190:lI105|H39F254
-39F254:lI109|H39F308
-39F308:lI97|H39F3BC
-39F3BC:lI103|H39F480
-39F480:lI101|H39F54C
-39F54C:lI47|H39F610
-39F610:lI120|H39F6E4
-39F6E4:lI45|H39F7B0
-39F7B0:lI112|H39F884
-39F884:lI111|H39F960
-39F960:lI114|H39FA34
-39FA34:lI116|H39FB08
-39FB08:lI97|H39FBD4
-39FBD4:lI98|H39FCA0
-39FCA0:lI108|H39FD64
-39FD64:lI101|H39FE28
-39FE28:lI45|H39FEDC
-39FEDC:lI98|H39FF98
-39FF98:lI105|H3A004C
-3A004C:lI116|H3A00F8
-3A00F8:lI109|H3A019C
-3A019C:lI97|H3A0250
-3A0250:lI112|N
-39F188:lI112|H39F24C
-39F24C:lI98|H39F300
-39F300:lI109|N
-39F0D0:lH39F198|H39F1A4
-39F198:t2:H39F25C,H39F264
-39F264:lI105|H39F318
-39F318:lI109|H39F3CC
-39F3CC:lI97|H39F488
-39F488:lI103|H39F554
-39F554:lI101|H39F618
-39F618:lI47|H39F6EC
-39F6EC:lI120|H39F7B8
-39F7B8:lI45|H39F88C
-39F88C:lI112|H39F968
-39F968:lI111|H39FA3C
-39FA3C:lI114|H39FB10
-39FB10:lI116|H39FBDC
-39FBDC:lI97|H39FCA8
-39FCA8:lI98|H39FD6C
-39FD6C:lI108|H39FE30
-39FE30:lI101|H39FEE4
-39FEE4:lI45|H39FFA0
-39FFA0:lI97|H3A0054
-3A0054:lI110|H3A0100
-3A0100:lI121|H3A01A4
-3A01A4:lI109|H3A0258
-3A0258:lI97|H3A0304
-3A0304:lI112|N
-39F25C:lI112|H39F310
-39F310:lI110|H39F3C4
-39F3C4:lI109|N
-39F1A4:lH39F26C|H39F278
-39F26C:t2:H39F320,H39F328
-39F328:lI105|H39F3DC
-39F3DC:lI109|H39F498
-39F498:lI97|H39F55C
-39F55C:lI103|H39F620
-39F620:lI101|H39F6F4
-39F6F4:lI47|H39F7C0
-39F7C0:lI120|H39F894
-39F894:lI45|H39F970
-39F970:lI99|H39FA44
-39FA44:lI109|H39FB18
-39FB18:lI117|H39FBE4
-39FBE4:lI45|H39FCB0
-39FCB0:lI114|H39FD74
-39FD74:lI97|H39FE38
-39FE38:lI115|H39FEEC
-39FEEC:lI116|H39FFA8
-39FFA8:lI101|H3A005C
-3A005C:lI114|N
-39F320:lI114|H39F3D4
-39F3D4:lI97|H39F490
-39F490:lI115|N
-39F278:lH39F330|H39F33C
-39F330:t2:H39F3E4,H39F3EC
-39F3EC:lI105|H39F4A8
-39F4A8:lI109|H39F56C
-39F56C:lI97|H39F630
-39F630:lI103|H39F6FC
-39F6FC:lI101|H39F7C8
-39F7C8:lI47|H39F89C
-39F89C:lI116|H39F978
-39F978:lI105|H39FA4C
-39FA4C:lI102|H39FB20
-39FB20:lI102|N
-39F3E4:lI116|H39F4A0
-39F4A0:lI105|H39F564
-39F564:lI102|H39F628
-39F628:lI102|N
-39F33C:lH39F3F4|H39F400
-39F3F4:t2:H39F4B0,H39F4B8
-39F4B8:lI105|H39F57C
-39F57C:lI109|H39F640
-39F640:lI97|H39F704
-39F704:lI103|H39F7D0
-39F7D0:lI101|H39F8A4
-39F8A4:lI47|H39F980
-39F980:lI116|H39FA54
-39FA54:lI105|H39FB28
-39FB28:lI102|H39FBEC
-39FBEC:lI102|N
-39F4B0:lI116|H39F574
-39F574:lI105|H39F638
-39F638:lI102|N
-39F400:lH39F4C0|H39F4CC
-39F4C0:t2:H39F584,H39F58C
-39F58C:lI105|H39F650
-39F650:lI109|H39F714
-39F714:lI97|H39F7D8
-39F7D8:lI103|H39F8AC
-39F8AC:lI101|H39F988
-39F988:lI47|H39FA5C
-39FA5C:lI112|H39FB30
-39FB30:lI110|H39FBF4
-39FBF4:lI103|N
-39F584:lI112|H39F648
-39F648:lI110|H39F70C
-39F70C:lI103|N
-39F4CC:lH39F594|H39F5A0
-39F594:t2:H39F658,H39F660
-39F660:lI105|H39F724
-39F724:lI109|H39F7E8
-39F7E8:lI97|H39F8BC
-39F8BC:lI103|H39F990
-39F990:lI101|H39FA64
-39FA64:lI47|H39FB38
-39FB38:lI106|H39FBFC
-39FBFC:lI112|H39FCB8
-39FCB8:lI101|H39FD7C
-39FD7C:lI103|N
-39F658:lI106|H39F71C
-39F71C:lI112|H39F7E0
-39F7E0:lI101|H39F8B4
-39F8B4:lI103|N
-39F5A0:lH39F668|H39F674
-39F668:t2:H39F72C,H39F734
-39F734:lI105|H39F7F8
-39F7F8:lI109|H39F8CC
-39F8CC:lI97|H39F998
-39F998:lI103|H39FA6C
-39FA6C:lI101|H39FB40
-39FB40:lI47|H39FC04
-39FC04:lI106|H39FCC0
-39FCC0:lI112|H39FD84
-39FD84:lI101|H39FE40
-39FE40:lI103|N
-39F72C:lI106|H39F7F0
-39F7F0:lI112|H39F8C4
-39F8C4:lI103|N
-39F674:lH39F73C|H39F748
-39F73C:t2:H39F800,H39F808
-39F808:lI105|H39F8DC
-39F8DC:lI109|H39F9A8
-39F9A8:lI97|H39FA74
-39FA74:lI103|H39FB48
-39FB48:lI101|H39FC0C
-39FC0C:lI47|H39FCC8
-39FCC8:lI106|H39FD8C
-39FD8C:lI112|H39FE48
-39FE48:lI101|H39FEF4
-39FEF4:lI103|N
-39F800:lI106|H39F8D4
-39F8D4:lI112|H39F9A0
-39F9A0:lI101|N
-39F748:lH39F810|H39F81C
-39F810:t2:H39F8E4,H39F8EC
-39F8EC:lI105|H39F9B8
-39F9B8:lI109|H39FA84
-39FA84:lI97|H39FB50
-39FB50:lI103|H39FC14
-39FC14:lI101|H39FCD0
-39FCD0:lI47|H39FD94
-39FD94:lI105|H39FE50
-39FE50:lI101|H39FEFC
-39FEFC:lI102|N
-39F8E4:lI105|H39F9B0
-39F9B0:lI101|H39FA7C
-39FA7C:lI102|N
-39F81C:lH39F8F4|H39F900
-39F8F4:t2:H39F9C0,H39F9C8
-39F9C8:lI105|H39FA94
-39FA94:lI109|H39FB60
-39FB60:lI97|H39FC1C
-39FC1C:lI103|H39FCD8
-39FCD8:lI101|H39FD9C
-39FD9C:lI47|H39FE58
-39FE58:lI103|H39FF04
-39FF04:lI105|H39FFB0
-39FFB0:lI102|N
-39F9C0:lI103|H39FA8C
-39FA8C:lI105|H39FB58
-39FB58:lI102|N
-39F900:lH39F9D0|H39F9DC
-39F9D0:t2:H39FA9C,H39FAA4
-39FAA4:lI99|H39FB70
-39FB70:lI104|H39FC2C
-39FC2C:lI101|H39FCE0
-39FCE0:lI109|H39FDA4
-39FDA4:lI105|H39FE60
-39FE60:lI99|H39FF0C
-39FF0C:lI97|H39FFB8
-39FFB8:lI108|H3A0064
-3A0064:lI47|H3A0108
-3A0108:lI120|H3A01AC
-3A01AC:lI45|H3A0260
-3A0260:lI112|H3A030C
-3A030C:lI100|H3A03B8
-3A03B8:lI98|N
-39FA9C:lI112|H39FB68
-39FB68:lI100|H39FC24
-39FC24:lI98|N
-39F9DC:lH39FAAC|H39FAB8
-39FAAC:t2:H39FB78,H39FB80
-39FB80:lI99|H39FC3C
-39FC3C:lI104|H39FCF0
-39FCF0:lI101|H39FDAC
-39FDAC:lI109|H39FE68
-39FE68:lI105|H39FF14
-39FF14:lI99|H39FFC0
-39FFC0:lI97|H3A006C
-3A006C:lI108|H3A0110
-3A0110:lI47|H3A01B4
-3A01B4:lI120|H3A0268
-3A0268:lI45|H3A0314
-3A0314:lI112|H3A03C0
-3A03C0:lI100|H3A0454
-3A0454:lI98|N
-39FB78:lI120|H39FC34
-39FC34:lI121|H39FCE8
-39FCE8:lI122|N
-39FAB8:lH39FB88|H39FB94
-39FB88:t2:H39FC44,H39FC4C
-39FC4C:lI97|H39FD00
-39FD00:lI117|H39FDBC
-39FDBC:lI100|H39FE70
-39FE70:lI105|H39FF1C
-39FF1C:lI111|H39FFC8
-39FFC8:lI47|H3A0074
-3A0074:lI120|H3A0118
-3A0118:lI45|H3A01BC
-3A01BC:lI119|H3A0270
-3A0270:lI97|H3A031C
-3A031C:lI118|N
-39FC44:lI119|H39FCF8
-39FCF8:lI97|H39FDB4
-39FDB4:lI118|N
-39FB94:lH39FC54|H39FC60
-39FC54:t2:H39FD08,H39FD10
-39FD10:lI97|H39FDCC
-39FDCC:lI117|H39FE78
-39FE78:lI100|H39FF24
-39FF24:lI105|H39FFD0
-39FFD0:lI111|H3A007C
-3A007C:lI47|H3A0120
-3A0120:lI120|H3A01C4
-3A01C4:lI45|H3A0278
-3A0278:lI114|H3A0324
-3A0324:lI101|H3A03C8
-3A03C8:lI97|H3A045C
-3A045C:lI108|H3A04F8
-3A04F8:lI97|H3A059C
-3A059C:lI117|H3A0648
-3A0648:lI100|H3A06F4
-3A06F4:lI105|H3A07A0
-3A07A0:lI111|N
-39FD08:lI114|H39FDC4
-39FDC4:lI97|N
-39FC60:lH39FD18|H39FD24
-39FD18:t2:H39FDD4,H39FDDC
-39FDDC:lI97|H39FE88
-39FE88:lI117|H39FF34
-39FF34:lI100|H39FFD8
-39FFD8:lI105|H3A0084
-3A0084:lI111|H3A0128
-3A0128:lI47|H3A01CC
-3A01CC:lI120|H3A0280
-3A0280:lI45|H3A032C
-3A032C:lI112|H3A03D0
-3A03D0:lI110|H3A0464
-3A0464:lI45|H3A0500
-3A0500:lI114|H3A05A4
-3A05A4:lI101|H3A0650
-3A0650:lI97|H3A06FC
-3A06FC:lI108|H3A07A8
-3A07A8:lI97|H3A0844
-3A0844:lI117|H3A08D0
-3A08D0:lI100|H3A0964
-3A0964:lI105|H3A09F8
-3A09F8:lI111|H3A0A94
-3A0A94:lI45|H3A0B40
-3A0B40:lI112|H3A0BEC
-3A0BEC:lI108|H3A0CA8
-3A0CA8:lI117|H3A0D64
-3A0D64:lI103|H3A0E18
-3A0E18:lI105|H3A0ECC
-3A0ECC:lI110|N
-39FDD4:lI114|H39FE80
-39FE80:lI112|H39FF2C
-39FF2C:lI109|N
-39FD24:lH39FDE4|H39FDF0
-39FDE4:t2:H39FE90,H39FE98
-39FE98:lI97|H39FF44
-39FF44:lI117|H39FFE8
-39FFE8:lI100|H3A008C
-3A008C:lI105|H3A0130
-3A0130:lI111|H3A01D4
-3A01D4:lI47|H3A0288
-3A0288:lI120|H3A0334
-3A0334:lI45|H3A03D8
-3A03D8:lI112|H3A046C
-3A046C:lI110|H3A0508
-3A0508:lI45|H3A05AC
-3A05AC:lI114|H3A0658
-3A0658:lI101|H3A0704
-3A0704:lI97|H3A07B0
-3A07B0:lI108|H3A084C
-3A084C:lI97|H3A08D8
-3A08D8:lI117|H3A096C
-3A096C:lI100|H3A0A00
-3A0A00:lI105|H3A0A9C
-3A0A9C:lI111|N
-39FE90:lI114|H39FF3C
-39FF3C:lI97|H39FFE0
-39FFE0:lI109|N
-39FDF0:lH39FEA0|H39FEAC
-39FEA0:t2:H39FF4C,H39FF54
-39FF54:lI97|H39FFF8
-39FFF8:lI117|H3A009C
-3A009C:lI100|H3A0138
-3A0138:lI105|H3A01DC
-3A01DC:lI111|H3A0290
-3A0290:lI47|H3A033C
-3A033C:lI120|H3A03E0
-3A03E0:lI45|H3A0474
-3A0474:lI97|H3A0510
-3A0510:lI105|H3A05B4
-3A05B4:lI102|H3A0660
-3A0660:lI102|N
-39FF4C:lI97|H39FFF0
-39FFF0:lI105|H3A0094
-3A0094:lI102|N
-39FEAC:lH39FF5C|H39FF68
-39FF5C:t2:H3A0000,H3A0008
-3A0008:lI97|H3A00AC
-3A00AC:lI117|H3A0148
-3A0148:lI100|H3A01EC
-3A01EC:lI105|H3A0298
-3A0298:lI111|H3A0344
-3A0344:lI47|H3A03E8
-3A03E8:lI120|H3A047C
-3A047C:lI45|H3A0518
-3A0518:lI97|H3A05BC
-3A05BC:lI105|H3A0668
-3A0668:lI102|H3A070C
-3A070C:lI102|N
-3A0000:lI97|H3A00A4
-3A00A4:lI105|H3A0140
-3A0140:lI102|H3A01E4
-3A01E4:lI102|N
-39FF68:lH3A0010|H3A001C
-3A0010:t2:H3A00B4,H3A00BC
-3A00BC:lI97|H3A0158
-3A0158:lI117|H3A01FC
-3A01FC:lI100|H3A02A8
-3A02A8:lI105|H3A034C
-3A034C:lI111|H3A03F0
-3A03F0:lI47|H3A0484
-3A0484:lI120|H3A0520
-3A0520:lI45|H3A05C4
-3A05C4:lI97|H3A0670
-3A0670:lI105|H3A0714
-3A0714:lI102|H3A07B8
-3A07B8:lI102|N
-3A00B4:lI97|H3A0150
-3A0150:lI105|H3A01F4
-3A01F4:lI102|H3A02A0
-3A02A0:lI99|N
-3A001C:lH3A00C4|H3A00D0
-3A00C4:t2:H3A0160,H3A0168
-3A0168:lI97|H3A020C
-3A020C:lI117|H3A02B8
-3A02B8:lI100|H3A035C
-3A035C:lI105|H3A03F8
-3A03F8:lI111|H3A048C
-3A048C:lI47|H3A0528
-3A0528:lI109|H3A05CC
-3A05CC:lI112|H3A0678
-3A0678:lI101|H3A071C
-3A071C:lI103|N
-3A0160:lI109|H3A0204
-3A0204:lI112|H3A02B0
-3A02B0:lI103|H3A0354
-3A0354:lI97|N
-3A00D0:lH3A0170|H3A017C
-3A0170:t2:H3A0214,H3A021C
-3A021C:lI97|H3A02C8
-3A02C8:lI117|H3A036C
-3A036C:lI100|H3A0400
-3A0400:lI105|H3A0494
-3A0494:lI111|H3A0530
-3A0530:lI47|H3A05D4
-3A05D4:lI109|H3A0680
-3A0680:lI112|H3A0724
-3A0724:lI101|H3A07C0
-3A07C0:lI103|N
-3A0214:lI109|H3A02C0
-3A02C0:lI112|H3A0364
-3A0364:lI50|N
-3A017C:lH3A0224|H3A0230
-3A0224:t2:H3A02D0,H3A02D8
-3A02D8:lI97|H3A037C
-3A037C:lI117|H3A0408
-3A0408:lI100|H3A049C
-3A049C:lI105|H3A0538
-3A0538:lI111|H3A05DC
-3A05DC:lI47|H3A0688
-3A0688:lI98|H3A072C
-3A072C:lI97|H3A07C8
-3A07C8:lI115|H3A0854
-3A0854:lI105|H3A08E0
-3A08E0:lI99|N
-3A02D0:lI97|H3A0374
-3A0374:lI117|N
-3A0230:lH3A02E0|H3A02EC
-3A02E0:t2:H3A0384,H3A038C
-3A038C:lI97|H3A0418
-3A0418:lI117|H3A04AC
-3A04AC:lI100|H3A0540
-3A0540:lI105|H3A05E4
-3A05E4:lI111|H3A0690
-3A0690:lI47|H3A0734
-3A0734:lI98|H3A07D0
-3A07D0:lI97|H3A085C
-3A085C:lI115|H3A08E8
-3A08E8:lI105|H3A0974
-3A0974:lI99|N
-3A0384:lI115|H3A0410
-3A0410:lI110|H3A04A4
-3A04A4:lI100|N
-3A02EC:lH3A0394|H3A03A0
-3A0394:t2:H3A0420,H3A0428
-3A0428:lI97|H3A04BC
-3A04BC:lI112|H3A0550
-3A0550:lI112|H3A05EC
-3A05EC:lI108|H3A0698
-3A0698:lI105|H3A073C
-3A073C:lI99|H3A07D8
-3A07D8:lI97|H3A0864
-3A0864:lI116|H3A08F0
-3A08F0:lI105|H3A097C
-3A097C:lI111|H3A0A08
-3A0A08:lI110|H3A0AA4
-3A0AA4:lI47|H3A0B48
-3A0B48:lI122|H3A0BF4
-3A0BF4:lI105|H3A0CB0
-3A0CB0:lI112|N
-3A0420:lI122|H3A04B4
-3A04B4:lI105|H3A0548
-3A0548:lI112|N
-3A03A0:lH3A0430|H3A043C
-3A0430:t2:H3A04C4,H3A04CC
-3A04CC:lI97|H3A0560
-3A0560:lI112|H3A05FC
-3A05FC:lI112|H3A06A0
-3A06A0:lI108|H3A0744
-3A0744:lI105|H3A07E0
-3A07E0:lI99|H3A086C
-3A086C:lI97|H3A08F8
-3A08F8:lI116|H3A0984
-3A0984:lI105|H3A0A10
-3A0A10:lI111|H3A0AAC
-3A0AAC:lI110|H3A0B50
-3A0B50:lI47|H3A0BFC
-3A0BFC:lI120|H3A0CB8
-3A0CB8:lI45|H3A0D6C
-3A0D6C:lI119|H3A0E20
-3A0E20:lI97|H3A0ED4
-3A0ED4:lI105|H3A0F90
-3A0F90:lI115|H3A105C
-3A105C:lI45|H3A1130
-3A1130:lI115|H3A1204
-3A1204:lI111|H3A12D0
-3A12D0:lI117|H3A13A4
-3A13A4:lI114|H3A1480
-3A1480:lI99|H3A1564
-3A1564:lI101|N
-3A04C4:lI115|H3A0558
-3A0558:lI114|H3A05F4
-3A05F4:lI99|N
-3A043C:lH3A04D4|H3A04E0
-3A04D4:t2:H3A0568,H3A0570
-3A0570:lI97|H3A060C
-3A060C:lI112|H3A06B0
-3A06B0:lI112|H3A0754
-3A0754:lI108|H3A07F0
-3A07F0:lI105|H3A0874
-3A0874:lI99|H3A0900
-3A0900:lI97|H3A098C
-3A098C:lI116|H3A0A18
-3A0A18:lI105|H3A0AB4
-3A0AB4:lI111|H3A0B58
-3A0B58:lI110|H3A0C04
-3A0C04:lI47|H3A0CC0
-3A0CC0:lI120|H3A0D74
-3A0D74:lI45|H3A0E28
-3A0E28:lI117|H3A0EDC
-3A0EDC:lI115|H3A0F98
-3A0F98:lI116|H3A1064
-3A1064:lI97|H3A1138
-3A1138:lI114|N
-3A0568:lI117|H3A0604
-3A0604:lI115|H3A06A8
-3A06A8:lI116|H3A074C
-3A074C:lI97|H3A07E8
-3A07E8:lI114|N
-3A04E0:lH3A0578|H3A0584
-3A0578:t2:H3A0614,H3A061C
-3A061C:lI97|H3A06C0
-3A06C0:lI112|H3A075C
-3A075C:lI112|H3A07F8
-3A07F8:lI108|H3A087C
-3A087C:lI105|H3A0908
-3A0908:lI99|H3A0994
-3A0994:lI97|H3A0A20
-3A0A20:lI116|H3A0ABC
-3A0ABC:lI105|H3A0B60
-3A0B60:lI111|H3A0C0C
-3A0C0C:lI110|H3A0CC8
-3A0CC8:lI47|H3A0D7C
-3A0D7C:lI120|H3A0E30
-3A0E30:lI45|H3A0EE4
-3A0EE4:lI116|H3A0FA0
-3A0FA0:lI114|H3A106C
-3A106C:lI111|H3A1140
-3A1140:lI102|H3A120C
-3A120C:lI102|H3A12D8
-3A12D8:lI45|H3A13AC
-3A13AC:lI109|H3A1488
-3A1488:lI115|N
-3A0614:lI109|H3A06B8
-3A06B8:lI115|N
-3A0584:lH3A0624|H3A0630
-3A0624:t2:H3A06C8,H3A06D0
-3A06D0:lI97|H3A076C
-3A076C:lI112|H3A0800
-3A0800:lI112|H3A0884
-3A0884:lI108|H3A0910
-3A0910:lI105|H3A099C
-3A099C:lI99|H3A0A28
-3A0A28:lI97|H3A0AC4
-3A0AC4:lI116|H3A0B68
-3A0B68:lI105|H3A0C14
-3A0C14:lI111|H3A0CD0
-3A0CD0:lI110|H3A0D84
-3A0D84:lI47|H3A0E38
-3A0E38:lI120|H3A0EEC
-3A0EEC:lI45|H3A0FA8
-3A0FA8:lI116|H3A1074
-3A1074:lI114|H3A1148
-3A1148:lI111|H3A1214
-3A1214:lI102|H3A12E0
-3A12E0:lI102|H3A13B4
-3A13B4:lI45|H3A1490
-3A1490:lI109|H3A156C
-3A156C:lI101|N
-3A06C8:lI109|H3A0764
-3A0764:lI101|N
-3A0630:lH3A06D8|H3A06E4
-3A06D8:t2:H3A0774,H3A077C
-3A077C:lI97|H3A0810
-3A0810:lI112|H3A0894
-3A0894:lI112|H3A0918
-3A0918:lI108|H3A09A4
-3A09A4:lI105|H3A0A30
-3A0A30:lI99|H3A0ACC
-3A0ACC:lI97|H3A0B70
-3A0B70:lI116|H3A0C1C
-3A0C1C:lI105|H3A0CD8
-3A0CD8:lI111|H3A0D8C
-3A0D8C:lI110|H3A0E40
-3A0E40:lI47|H3A0EF4
-3A0EF4:lI120|H3A0FB0
-3A0FB0:lI45|H3A107C
-3A107C:lI116|H3A1150
-3A1150:lI114|H3A121C
-3A121C:lI111|H3A12E8
-3A12E8:lI102|H3A13BC
-3A13BC:lI102|H3A1498
-3A1498:lI45|H3A1574
-3A1574:lI109|H3A1648
-3A1648:lI97|H3A171C
-3A171C:lI110|N
-3A0774:lI109|H3A0808
-3A0808:lI97|H3A088C
-3A088C:lI110|N
-3A06E4:lH3A0784|H3A0790
-3A0784:t2:H3A0818,H3A0820
-3A0820:lI97|H3A089C
-3A089C:lI112|H3A0920
-3A0920:lI112|H3A09AC
-3A09AC:lI108|H3A0A38
-3A0A38:lI105|H3A0AD4
-3A0AD4:lI99|H3A0B78
-3A0B78:lI97|H3A0C24
-3A0C24:lI116|H3A0CE0
-3A0CE0:lI105|H3A0D94
-3A0D94:lI111|H3A0E48
-3A0E48:lI110|H3A0EFC
-3A0EFC:lI47|H3A0FB8
-3A0FB8:lI120|H3A1084
-3A1084:lI45|H3A1158
-3A1158:lI116|H3A1224
-3A1224:lI114|H3A12F0
-3A12F0:lI111|H3A13C4
-3A13C4:lI102|H3A14A0
-3A14A0:lI102|N
-3A0818:lI116|N
-3A0790:lH3A0828|H3A0834
-3A0828:t2:H3A08A4,H3A08AC
-3A08AC:lI97|H3A0930
-3A0930:lI112|H3A09B4
-3A09B4:lI112|H3A0A40
-3A0A40:lI108|H3A0ADC
-3A0ADC:lI105|H3A0B80
-3A0B80:lI99|H3A0C2C
-3A0C2C:lI97|H3A0CE8
-3A0CE8:lI116|H3A0D9C
-3A0D9C:lI105|H3A0E50
-3A0E50:lI111|H3A0F04
-3A0F04:lI110|H3A0FC0
-3A0FC0:lI47|H3A108C
-3A108C:lI120|H3A1160
-3A1160:lI45|H3A122C
-3A122C:lI116|H3A12F8
-3A12F8:lI114|H3A13CC
-3A13CC:lI111|H3A14A8
-3A14A8:lI102|H3A157C
-3A157C:lI102|N
-3A08A4:lI116|H3A0928
-3A0928:lI114|N
-3A0834:lH3A08B4|H3A08C0
-3A08B4:t2:H3A0938,H3A0940
-3A0940:lI97|H3A09C4
-3A09C4:lI112|H3A0A50
-3A0A50:lI112|H3A0AEC
-3A0AEC:lI108|H3A0B88
-3A0B88:lI105|H3A0C34
-3A0C34:lI99|H3A0CF0
-3A0CF0:lI97|H3A0DA4
-3A0DA4:lI116|H3A0E58
-3A0E58:lI105|H3A0F0C
-3A0F0C:lI111|H3A0FC8
-3A0FC8:lI110|H3A1094
-3A1094:lI47|H3A1168
-3A1168:lI120|H3A1234
-3A1234:lI45|H3A1300
-3A1300:lI116|H3A13D4
-3A13D4:lI114|H3A14B0
-3A14B0:lI111|H3A1584
-3A1584:lI102|H3A1650
-3A1650:lI102|N
-3A0938:lI114|H3A09BC
-3A09BC:lI111|H3A0A48
-3A0A48:lI102|H3A0AE4
-3A0AE4:lI102|N
-3A08C0:lH3A0948|H3A0954
-3A0948:t2:H3A09CC,H3A09D4
-3A09D4:lI97|H3A0A60
-3A0A60:lI112|H3A0AFC
-3A0AFC:lI112|H3A0B98
-3A0B98:lI108|H3A0C44
-3A0C44:lI105|H3A0D00
-3A0D00:lI99|H3A0DB4
-3A0DB4:lI97|H3A0E60
-3A0E60:lI116|H3A0F14
-3A0F14:lI105|H3A0FD0
-3A0FD0:lI111|H3A109C
-3A109C:lI110|H3A1170
-3A1170:lI47|H3A123C
-3A123C:lI120|H3A1308
-3A1308:lI45|H3A13DC
-3A13DC:lI116|H3A14B8
-3A14B8:lI101|H3A158C
-3A158C:lI120|H3A1658
-3A1658:lI105|H3A1724
-3A1724:lI110|H3A17E8
-3A17E8:lI102|H3A18AC
-3A18AC:lI111|N
-3A09CC:lI116|H3A0A58
-3A0A58:lI101|H3A0AF4
-3A0AF4:lI120|H3A0B90
-3A0B90:lI105|H3A0C3C
-3A0C3C:lI110|H3A0CF8
-3A0CF8:lI102|H3A0DAC
-3A0DAC:lI111|N
-3A0954:lH3A09DC|H3A09E8
-3A09DC:t2:H3A0A68,H3A0A70
-3A0A70:lI97|H3A0B0C
-3A0B0C:lI112|H3A0BA8
-3A0BA8:lI112|H3A0C54
-3A0C54:lI108|H3A0D08
-3A0D08:lI105|H3A0DBC
-3A0DBC:lI99|H3A0E68
-3A0E68:lI97|H3A0F1C
-3A0F1C:lI116|H3A0FD8
-3A0FD8:lI105|H3A10A4
-3A10A4:lI111|H3A1178
-3A1178:lI110|H3A1244
-3A1244:lI47|H3A1310
-3A1310:lI120|H3A13E4
-3A13E4:lI45|H3A14C0
-3A14C0:lI116|H3A1594
-3A1594:lI101|H3A1660
-3A1660:lI120|H3A172C
-3A172C:lI105|H3A17F0
-3A17F0:lI110|H3A18B4
-3A18B4:lI102|H3A1970
-3A1970:lI111|N
-3A0A68:lI116|H3A0B04
-3A0B04:lI101|H3A0BA0
-3A0BA0:lI120|H3A0C4C
-3A0C4C:lI105|N
-3A09E8:lH3A0A78|H3A0A84
-3A0A78:t2:H3A0B14,H3A0B1C
-3A0B1C:lI97|H3A0BB8
-3A0BB8:lI112|H3A0C64
-3A0C64:lI112|H3A0D10
-3A0D10:lI108|H3A0DC4
-3A0DC4:lI105|H3A0E70
-3A0E70:lI99|H3A0F24
-3A0F24:lI97|H3A0FE0
-3A0FE0:lI116|H3A10AC
-3A10AC:lI105|H3A1180
-3A1180:lI111|H3A124C
-3A124C:lI110|H3A1318
-3A1318:lI47|H3A13EC
-3A13EC:lI120|H3A14C8
-3A14C8:lI45|H3A159C
-3A159C:lI116|H3A1668
-3A1668:lI101|H3A1734
-3A1734:lI120|N
-3A0B14:lI116|H3A0BB0
-3A0BB0:lI101|H3A0C5C
-3A0C5C:lI120|N
-3A0A84:lH3A0B24|H3A0B30
-3A0B24:t2:H3A0BC0,H3A0BC8
-3A0BC8:lI97|H3A0C74
-3A0C74:lI112|H3A0D20
-3A0D20:lI112|H3A0DCC
-3A0DCC:lI108|H3A0E78
-3A0E78:lI105|H3A0F2C
-3A0F2C:lI99|H3A0FE8
-3A0FE8:lI97|H3A10B4
-3A10B4:lI116|H3A1188
-3A1188:lI105|H3A1254
-3A1254:lI111|H3A1320
-3A1320:lI110|H3A13F4
-3A13F4:lI47|H3A14D0
-3A14D0:lI120|H3A15A4
-3A15A4:lI45|H3A1670
-3A1670:lI116|H3A173C
-3A173C:lI99|H3A17F8
-3A17F8:lI108|N
-3A0BC0:lI116|H3A0C6C
-3A0C6C:lI99|H3A0D18
-3A0D18:lI108|N
-3A0B30:lH3A0BD0|H3A0BDC
-3A0BD0:t2:H3A0C7C,H3A0C84
-3A0C84:lI97|H3A0D30
-3A0D30:lI112|H3A0DDC
-3A0DDC:lI112|H3A0E80
-3A0E80:lI108|H3A0F34
-3A0F34:lI105|H3A0FF0
-3A0FF0:lI99|H3A10BC
-3A10BC:lI97|H3A1190
-3A1190:lI116|H3A125C
-3A125C:lI105|H3A1328
-3A1328:lI111|H3A13FC
-3A13FC:lI110|H3A14D8
-3A14D8:lI47|H3A15AC
-3A15AC:lI120|H3A1678
-3A1678:lI45|H3A1744
-3A1744:lI116|H3A1800
-3A1800:lI97|H3A18BC
-3A18BC:lI114|N
-3A0C7C:lI116|H3A0D28
-3A0D28:lI97|H3A0DD4
-3A0DD4:lI114|N
-3A0BDC:lH3A0C8C|H3A0C98
-3A0C8C:t2:H3A0D38,H3A0D40
-3A0D40:lI97|H3A0DEC
-3A0DEC:lI112|H3A0E90
-3A0E90:lI112|H3A0F44
-3A0F44:lI108|H3A1000
-3A1000:lI105|H3A10CC
-3A10CC:lI99|H3A1198
-3A1198:lI97|H3A1264
-3A1264:lI116|H3A1330
-3A1330:lI105|H3A1404
-3A1404:lI111|H3A14E0
-3A14E0:lI110|H3A15B4
-3A15B4:lI47|H3A1680
-3A1680:lI120|H3A174C
-3A174C:lI45|H3A1808
-3A1808:lI115|H3A18C4
-3A18C4:lI118|H3A1978
-3A1978:lI52|H3A1A2C
-3A1A2C:lI99|H3A1AE0
-3A1AE0:lI114|H3A1BA4
-3A1BA4:lI99|N
-3A0D38:lI115|H3A0DE4
-3A0DE4:lI118|H3A0E88
-3A0E88:lI52|H3A0F3C
-3A0F3C:lI99|H3A0FF8
-3A0FF8:lI114|H3A10C4
-3A10C4:lI99|N
-3A0C98:lH3A0D48|H3A0D54
-3A0D48:t2:H3A0DF4,H3A0DFC
-3A0DFC:lI97|H3A0EA0
-3A0EA0:lI112|H3A0F54
-3A0F54:lI112|H3A1010
-3A1010:lI108|H3A10DC
-3A10DC:lI105|H3A11A8
-3A11A8:lI99|H3A1274
-3A1274:lI97|H3A1338
-3A1338:lI116|H3A140C
-3A140C:lI105|H3A14E8
-3A14E8:lI111|H3A15BC
-3A15BC:lI110|H3A1688
-3A1688:lI47|H3A1754
-3A1754:lI120|H3A1810
-3A1810:lI45|H3A18CC
-3A18CC:lI115|H3A1980
-3A1980:lI118|H3A1A34
-3A1A34:lI52|H3A1AE8
-3A1AE8:lI99|H3A1BAC
-3A1BAC:lI112|H3A1C78
-3A1C78:lI105|H3A1D3C
-3A1D3C:lI111|N
-3A0DF4:lI115|H3A0E98
-3A0E98:lI118|H3A0F4C
-3A0F4C:lI52|H3A1008
-3A1008:lI99|H3A10D4
-3A10D4:lI112|H3A11A0
-3A11A0:lI105|H3A126C
-3A126C:lI111|N
-3A0D54:lH3A0E04|H3A0E10
-3A0E04:t2:H3A0EA8,H3A0EB0
-3A0EB0:lI97|H3A0F64
-3A0F64:lI112|H3A1020
-3A1020:lI112|H3A10E4
-3A10E4:lI108|H3A11B0
-3A11B0:lI105|H3A127C
-3A127C:lI99|H3A1340
-3A1340:lI97|H3A1414
-3A1414:lI116|H3A14F0
-3A14F0:lI105|H3A15C4
-3A15C4:lI111|H3A1690
-3A1690:lI110|H3A175C
-3A175C:lI47|H3A1818
-3A1818:lI120|H3A18D4
-3A18D4:lI45|H3A1988
-3A1988:lI115|H3A1A3C
-3A1A3C:lI116|H3A1AF0
-3A1AF0:lI117|H3A1BB4
-3A1BB4:lI102|H3A1C80
-3A1C80:lI102|H3A1D44
-3A1D44:lI105|H3A1E00
-3A1E00:lI116|N
-3A0EA8:lI115|H3A0F5C
-3A0F5C:lI105|H3A1018
-3A1018:lI116|N
-3A0E10:lH3A0EB8|H3A0EC4
-3A0EB8:t2:H3A0F6C,H3A0F74
-3A0F74:lI97|H3A1030
-3A1030:lI112|H3A10F4
-3A10F4:lI112|H3A11C0
-3A11C0:lI108|H3A1284
-3A1284:lI105|H3A1348
-3A1348:lI99|H3A141C
-3A141C:lI97|H3A14F8
-3A14F8:lI116|H3A15CC
-3A15CC:lI105|H3A1698
-3A1698:lI111|H3A1764
-3A1764:lI110|H3A1820
-3A1820:lI47|H3A18DC
-3A18DC:lI120|H3A1990
-3A1990:lI45|H3A1A44
-3A1A44:lI115|H3A1AF8
-3A1AF8:lI104|H3A1BBC
-3A1BBC:lI97|H3A1C88
-3A1C88:lI114|N
-3A0F6C:lI115|H3A1028
-3A1028:lI104|H3A10EC
-3A10EC:lI97|H3A11B8
-3A11B8:lI114|N
-3A0EC4:lH3A0F7C|H3A0F88
-3A0F7C:t2:H3A1038,H3A1040
-3A1040:lI97|H3A1104
-3A1104:lI112|H3A11C8
-3A11C8:lI112|H3A128C
-3A128C:lI108|H3A1350
-3A1350:lI105|H3A1424
-3A1424:lI99|H3A1500
-3A1500:lI97|H3A15D4
-3A15D4:lI116|H3A16A0
-3A16A0:lI105|H3A176C
-3A176C:lI111|H3A1828
-3A1828:lI110|H3A18E4
-3A18E4:lI47|H3A1998
-3A1998:lI120|H3A1A4C
-3A1A4C:lI45|H3A1B00
-3A1B00:lI115|H3A1BC4
-3A1BC4:lI104|N
-3A1038:lI115|H3A10FC
-3A10FC:lI104|N
-3A0F88:lH3A1048|H3A1054
-3A1048:t2:H3A110C,H3A1114
-3A1114:lI97|H3A11D8
-3A11D8:lI112|H3A1294
-3A1294:lI112|H3A1358
-3A1358:lI108|H3A142C
-3A142C:lI105|H3A1508
-3A1508:lI99|H3A15DC
-3A15DC:lI97|H3A16A8
-3A16A8:lI116|H3A1774
-3A1774:lI105|H3A1830
-3A1830:lI111|H3A18EC
-3A18EC:lI110|H3A19A0
-3A19A0:lI47|H3A1A54
-3A1A54:lI120|H3A1B08
-3A1B08:lI45|H3A1BCC
-3A1BCC:lI110|H3A1C90
-3A1C90:lI101|H3A1D4C
-3A1D4C:lI116|H3A1E08
-3A1E08:lI99|H3A1EC4
-3A1EC4:lI100|H3A1F88
-3A1F88:lI102|N
-3A110C:lI110|H3A11D0
-3A11D0:lI99|N
-3A1054:lH3A111C|H3A1128
-3A111C:t2:H3A11E0,H3A11E8
-3A11E8:lI97|H3A12A4
-3A12A4:lI112|H3A1368
-3A1368:lI112|H3A1434
-3A1434:lI108|H3A1510
-3A1510:lI105|H3A15E4
-3A15E4:lI99|H3A16B0
-3A16B0:lI97|H3A177C
-3A177C:lI116|H3A1838
-3A1838:lI105|H3A18F4
-3A18F4:lI111|H3A19A8
-3A19A8:lI110|H3A1A5C
-3A1A5C:lI47|H3A1B10
-3A1B10:lI120|H3A1BD4
-3A1BD4:lI45|H3A1C98
-3A1C98:lI110|H3A1D54
-3A1D54:lI101|H3A1E10
-3A1E10:lI116|H3A1ECC
-3A1ECC:lI99|H3A1F90
-3A1F90:lI100|H3A2044
-3A2044:lI102|N
-3A11E0:lI99|H3A129C
-3A129C:lI100|H3A1360
-3A1360:lI102|N
-3A1128:lH3A11F0|H3A11FC
-3A11F0:t2:H3A12AC,H3A12B4
-3A12B4:lI97|H3A1378
-3A1378:lI112|H3A1444
-3A1444:lI112|H3A1518
-3A1518:lI108|H3A15EC
-3A15EC:lI105|H3A16B8
-3A16B8:lI99|H3A1784
-3A1784:lI97|H3A1840
-3A1840:lI116|H3A18FC
-3A18FC:lI105|H3A19B0
-3A19B0:lI111|H3A1A64
-3A1A64:lI110|H3A1B18
-3A1B18:lI47|H3A1BDC
-3A1BDC:lI120|H3A1CA0
-3A1CA0:lI45|H3A1D5C
-3A1D5C:lI109|H3A1E18
-3A1E18:lI105|H3A1ED4
-3A1ED4:lI102|N
-3A12AC:lI109|H3A1370
-3A1370:lI105|H3A143C
-3A143C:lI102|N
-3A11FC:lH3A12BC|H3A12C8
-3A12BC:t2:H3A1380,H3A1388
-3A1388:lI97|H3A1454
-3A1454:lI112|H3A1528
-3A1528:lI112|H3A15FC
-3A15FC:lI108|H3A16C8
-3A16C8:lI105|H3A178C
-3A178C:lI99|H3A1848
-3A1848:lI97|H3A1904
-3A1904:lI116|H3A19B8
-3A19B8:lI105|H3A1A6C
-3A1A6C:lI111|H3A1B20
-3A1B20:lI110|H3A1BE4
-3A1BE4:lI47|H3A1CA8
-3A1CA8:lI120|H3A1D64
-3A1D64:lI45|H3A1E20
-3A1E20:lI108|H3A1EDC
-3A1EDC:lI97|H3A1F98
-3A1F98:lI116|H3A204C
-3A204C:lI101|H3A2108
-3A2108:lI120|N
-3A1380:lI108|H3A144C
-3A144C:lI97|H3A1520
-3A1520:lI116|H3A15F4
-3A15F4:lI101|H3A16C0
-3A16C0:lI120|N
-3A12C8:lH3A1390|H3A139C
-3A1390:t2:H3A145C,H3A1464
-3A1464:lI97|H3A1538
-3A1538:lI112|H3A160C
-3A160C:lI112|H3A16D0
-3A16D0:lI108|H3A1794
-3A1794:lI105|H3A1850
-3A1850:lI99|H3A190C
-3A190C:lI97|H3A19C0
-3A19C0:lI116|H3A1A74
-3A1A74:lI105|H3A1B28
-3A1B28:lI111|H3A1BEC
-3A1BEC:lI110|H3A1CB0
-3A1CB0:lI47|H3A1D6C
-3A1D6C:lI120|H3A1E28
-3A1E28:lI45|H3A1EE4
-3A1EE4:lI107|H3A1FA0
-3A1FA0:lI111|H3A2054
-3A2054:lI97|H3A2110
-3A2110:lI110|N
-3A145C:lI115|H3A1530
-3A1530:lI107|H3A1604
-3A1604:lI112|N
-3A139C:lH3A146C|H3A1478
-3A146C:t2:H3A1540,H3A1548
-3A1548:lI97|H3A161C
-3A161C:lI112|H3A16E0
-3A16E0:lI112|H3A179C
-3A179C:lI108|H3A1858
-3A1858:lI105|H3A1914
-3A1914:lI99|H3A19C8
-3A19C8:lI97|H3A1A7C
-3A1A7C:lI116|H3A1B30
-3A1B30:lI105|H3A1BF4
-3A1BF4:lI111|H3A1CB8
-3A1CB8:lI110|H3A1D74
-3A1D74:lI47|H3A1E30
-3A1E30:lI120|H3A1EEC
-3A1EEC:lI45|H3A1FA8
-3A1FA8:lI107|H3A205C
-3A205C:lI111|H3A2118
-3A2118:lI97|H3A21CC
-3A21CC:lI110|N
-3A1540:lI115|H3A1614
-3A1614:lI107|H3A16D8
-3A16D8:lI100|N
-3A1478:lH3A1550|H3A155C
-3A1550:t2:H3A1624,H3A162C
-3A162C:lI97|H3A16F0
-3A16F0:lI112|H3A17AC
-3A17AC:lI112|H3A1860
-3A1860:lI108|H3A191C
-3A191C:lI105|H3A19D0
-3A19D0:lI99|H3A1A84
-3A1A84:lI97|H3A1B38
-3A1B38:lI116|H3A1BFC
-3A1BFC:lI105|H3A1CC0
-3A1CC0:lI111|H3A1D7C
-3A1D7C:lI110|H3A1E38
-3A1E38:lI47|H3A1EF4
-3A1EF4:lI120|H3A1FB0
-3A1FB0:lI45|H3A2064
-3A2064:lI107|H3A2120
-3A2120:lI111|H3A21D4
-3A21D4:lI97|H3A2288
-3A2288:lI110|N
-3A1624:lI115|H3A16E8
-3A16E8:lI107|H3A17A4
-3A17A4:lI116|N
-3A155C:lH3A1634|H3A1640
-3A1634:t2:H3A16F8,H3A1700
-3A1700:lI97|H3A17BC
-3A17BC:lI112|H3A1870
-3A1870:lI112|H3A1924
-3A1924:lI108|H3A19D8
-3A19D8:lI105|H3A1A8C
-3A1A8C:lI99|H3A1B40
-3A1B40:lI97|H3A1C04
-3A1C04:lI116|H3A1CC8
-3A1CC8:lI105|H3A1D84
-3A1D84:lI111|H3A1E40
-3A1E40:lI110|H3A1EFC
-3A1EFC:lI47|H3A1FB8
-3A1FB8:lI120|H3A206C
-3A206C:lI45|H3A2128
-3A2128:lI107|H3A21DC
-3A21DC:lI111|H3A2290
-3A2290:lI97|H3A234C
-3A234C:lI110|N
-3A16F8:lI115|H3A17B4
-3A17B4:lI107|H3A1868
-3A1868:lI109|N
-3A1640:lH3A1708|H3A1714
-3A1708:t2:H3A17C4,H3A17CC
-3A17CC:lI97|H3A1880
-3A1880:lI112|H3A1934
-3A1934:lI112|H3A19E0
-3A19E0:lI108|H3A1A94
-3A1A94:lI105|H3A1B48
-3A1B48:lI99|H3A1C0C
-3A1C0C:lI97|H3A1CD0
-3A1CD0:lI116|H3A1D8C
-3A1D8C:lI105|H3A1E48
-3A1E48:lI111|H3A1F04
-3A1F04:lI110|H3A1FC0
-3A1FC0:lI47|H3A2074
-3A2074:lI120|H3A2130
-3A2130:lI45|H3A21E4
-3A21E4:lI104|H3A2298
-3A2298:lI116|H3A2354
-3A2354:lI116|H3A2410
-3A2410:lI112|H3A24C4
-3A24C4:lI100|H3A2580
-3A2580:lI45|H3A263C
-3A263C:lI99|H3A2700
-3A2700:lI103|H3A27BC
-3A27BC:lI105|N
-3A17C4:lI99|H3A1878
-3A1878:lI103|H3A192C
-3A192C:lI105|N
-3A1714:lH3A17D4|H3A17E0
-3A17D4:t2:H3A1888,H3A1890
-3A1890:lI97|H3A1944
-3A1944:lI112|H3A19F0
-3A19F0:lI112|H3A1A9C
-3A1A9C:lI108|H3A1B50
-3A1B50:lI105|H3A1C14
-3A1C14:lI99|H3A1CD8
-3A1CD8:lI97|H3A1D94
-3A1D94:lI116|H3A1E50
-3A1E50:lI105|H3A1F0C
-3A1F0C:lI111|H3A1FC8
-3A1FC8:lI110|H3A207C
-3A207C:lI47|H3A2138
-3A2138:lI120|H3A21EC
-3A21EC:lI45|H3A22A0
-3A22A0:lI104|H3A235C
-3A235C:lI100|H3A2418
-3A2418:lI102|N
-3A1888:lI104|H3A193C
-3A193C:lI100|H3A19E8
-3A19E8:lI102|N
-3A17E0:lH3A1898|H3A18A4
-3A1898:t2:H3A194C,H3A1954
-3A1954:lI97|H3A1A00
-3A1A00:lI112|H3A1AA4
-3A1AA4:lI112|H3A1B58
-3A1B58:lI108|H3A1C1C
-3A1C1C:lI105|H3A1CE0
-3A1CE0:lI99|H3A1D9C
-3A1D9C:lI97|H3A1E58
-3A1E58:lI116|H3A1F14
-3A1F14:lI105|H3A1FD0
-3A1FD0:lI111|H3A2084
-3A2084:lI110|H3A2140
-3A2140:lI47|H3A21F4
-3A21F4:lI120|H3A22A8
-3A22A8:lI45|H3A2364
-3A2364:lI103|H3A2420
-3A2420:lI122|H3A24CC
-3A24CC:lI105|H3A2588
-3A2588:lI112|N
-3A194C:lI103|H3A19F8
-3A19F8:lI122|N
-3A18A4:lH3A195C|H3A1968
-3A195C:t2:H3A1A08,H3A1A10
-3A1A10:lI97|H3A1AB4
-3A1AB4:lI112|H3A1B68
-3A1B68:lI112|H3A1C2C
-3A1C2C:lI108|H3A1CE8
-3A1CE8:lI105|H3A1DA4
-3A1DA4:lI99|H3A1E60
-3A1E60:lI97|H3A1F1C
-3A1F1C:lI116|H3A1FD8
-3A1FD8:lI105|H3A208C
-3A208C:lI111|H3A2148
-3A2148:lI110|H3A21FC
-3A21FC:lI47|H3A22B0
-3A22B0:lI120|H3A236C
-3A236C:lI45|H3A2428
-3A2428:lI103|H3A24D4
-3A24D4:lI116|H3A2590
-3A2590:lI97|H3A2644
-3A2644:lI114|N
-3A1A08:lI103|H3A1AAC
-3A1AAC:lI116|H3A1B60
-3A1B60:lI97|H3A1C24
-3A1C24:lI114|N
-3A1968:lH3A1A18|H3A1A24
-3A1A18:t2:H3A1ABC,H3A1AC4
-3A1AC4:lI97|H3A1B78
-3A1B78:lI112|H3A1C3C
-3A1C3C:lI112|H3A1CF0
-3A1CF0:lI108|H3A1DAC
-3A1DAC:lI105|H3A1E68
-3A1E68:lI99|H3A1F24
-3A1F24:lI97|H3A1FE0
-3A1FE0:lI116|H3A2094
-3A2094:lI105|H3A2150
-3A2150:lI111|H3A2204
-3A2204:lI110|H3A22B8
-3A22B8:lI47|H3A2374
-3A2374:lI120|H3A2430
-3A2430:lI45|H3A24DC
-3A24DC:lI100|H3A2598
-3A2598:lI118|H3A264C
-3A264C:lI105|N
-3A1ABC:lI100|H3A1B70
-3A1B70:lI118|H3A1C34
-3A1C34:lI105|N
-3A1A24:lH3A1ACC|H3A1AD8
-3A1ACC:t2:H3A1B80,H3A1B88
-3A1B88:lI97|H3A1C4C
-3A1C4C:lI112|H3A1D00
-3A1D00:lI112|H3A1DB4
-3A1DB4:lI108|H3A1E70
-3A1E70:lI105|H3A1F2C
-3A1F2C:lI99|H3A1FE8
-3A1FE8:lI97|H3A209C
-3A209C:lI116|H3A2158
-3A2158:lI105|H3A220C
-3A220C:lI111|H3A22C0
-3A22C0:lI110|H3A237C
-3A237C:lI47|H3A2438
-3A2438:lI120|H3A24E4
-3A24E4:lI45|H3A25A0
-3A25A0:lI100|H3A2654
-3A2654:lI105|H3A2708
-3A2708:lI114|H3A27C4
-3A27C4:lI101|H3A2880
-3A2880:lI99|H3A2944
-3A2944:lI116|H3A2A10
-3A2A10:lI111|H3A2ADC
-3A2ADC:lI114|N
-3A1B80:lI100|H3A1C44
-3A1C44:lI99|H3A1CF8
-3A1CF8:lI114|N
-3A1AD8:lH3A1B90|H3A1B9C
-3A1B90:t2:H3A1C54,H3A1C5C
-3A1C5C:lI97|H3A1D10
-3A1D10:lI112|H3A1DC4
-3A1DC4:lI112|H3A1E78
-3A1E78:lI108|H3A1F34
-3A1F34:lI105|H3A1FF0
-3A1FF0:lI99|H3A20A4
-3A20A4:lI97|H3A2160
-3A2160:lI116|H3A2214
-3A2214:lI105|H3A22C8
-3A22C8:lI111|H3A2384
-3A2384:lI110|H3A2440
-3A2440:lI47|H3A24EC
-3A24EC:lI120|H3A25A8
-3A25A8:lI45|H3A265C
-3A265C:lI100|H3A2710
-3A2710:lI105|H3A27CC
-3A27CC:lI114|H3A2888
-3A2888:lI101|H3A294C
-3A294C:lI99|H3A2A18
-3A2A18:lI116|H3A2AE4
-3A2AE4:lI111|H3A2BB0
-3A2BB0:lI114|N
-3A1C54:lI100|H3A1D08
-3A1D08:lI105|H3A1DBC
-3A1DBC:lI114|N
-3A1B9C:lH3A1C64|H3A1C70
-3A1C64:t2:H3A1D18,H3A1D20
-3A1D20:lI97|H3A1DD4
-3A1DD4:lI112|H3A1E88
-3A1E88:lI112|H3A1F3C
-3A1F3C:lI108|H3A1FF8
-3A1FF8:lI105|H3A20AC
-3A20AC:lI99|H3A2168
-3A2168:lI97|H3A221C
-3A221C:lI116|H3A22D0
-3A22D0:lI105|H3A238C
-3A238C:lI111|H3A2448
-3A2448:lI110|H3A24F4
-3A24F4:lI47|H3A25B0
-3A25B0:lI120|H3A2664
-3A2664:lI45|H3A2718
-3A2718:lI100|H3A27D4
-3A27D4:lI105|H3A2890
-3A2890:lI114|H3A2954
-3A2954:lI101|H3A2A20
-3A2A20:lI99|H3A2AEC
-3A2AEC:lI116|H3A2BB8
-3A2BB8:lI111|H3A2C74
-3A2C74:lI114|N
-3A1D18:lI100|H3A1DCC
-3A1DCC:lI120|H3A1E80
-3A1E80:lI114|N
-3A1C70:lH3A1D28|H3A1D34
-3A1D28:t2:H3A1DDC,H3A1DE4
-3A1DE4:lI97|H3A1E98
-3A1E98:lI112|H3A1F4C
-3A1F4C:lI112|H3A2000
-3A2000:lI108|H3A20B4
-3A20B4:lI105|H3A2170
-3A2170:lI99|H3A2224
-3A2224:lI97|H3A22D8
-3A22D8:lI116|H3A2394
-3A2394:lI105|H3A2450
-3A2450:lI111|H3A24FC
-3A24FC:lI110|H3A25B8
-3A25B8:lI47|H3A266C
-3A266C:lI120|H3A2720
-3A2720:lI45|H3A27DC
-3A27DC:lI99|H3A2898
-3A2898:lI115|H3A295C
-3A295C:lI104|N
-3A1DDC:lI99|H3A1E90
-3A1E90:lI115|H3A1F44
-3A1F44:lI104|N
-3A1D34:lH3A1DEC|H3A1DF8
-3A1DEC:t2:H3A1EA0,H3A1EA8
-3A1EA8:lI97|H3A1F5C
-3A1F5C:lI112|H3A2010
-3A2010:lI112|H3A20C4
-3A20C4:lI108|H3A2178
-3A2178:lI105|H3A222C
-3A222C:lI99|H3A22E0
-3A22E0:lI97|H3A239C
-3A239C:lI116|H3A2458
-3A2458:lI105|H3A2504
-3A2504:lI111|H3A25C0
-3A25C0:lI110|H3A2674
-3A2674:lI47|H3A2728
-3A2728:lI120|H3A27E4
-3A27E4:lI45|H3A28A0
-3A28A0:lI99|H3A2964
-3A2964:lI112|H3A2A28
-3A2A28:lI105|H3A2AF4
-3A2AF4:lI111|N
-3A1EA0:lI99|H3A1F54
-3A1F54:lI112|H3A2008
-3A2008:lI105|H3A20BC
-3A20BC:lI111|N
-3A1DF8:lH3A1EB0|H3A1EBC
-3A1EB0:t2:H3A1F64,H3A1F6C
-3A1F6C:lI97|H3A2018
-3A2018:lI112|H3A20CC
-3A20CC:lI112|H3A2180
-3A2180:lI108|H3A2234
-3A2234:lI105|H3A22E8
-3A22E8:lI99|H3A23A4
-3A23A4:lI97|H3A2460
-3A2460:lI116|H3A250C
-3A250C:lI105|H3A25C8
-3A25C8:lI111|H3A267C
-3A267C:lI110|H3A2730
-3A2730:lI47|H3A27EC
-3A27EC:lI120|H3A28A8
-3A28A8:lI45|H3A296C
-3A296C:lI99|H3A2A30
-3A2A30:lI111|H3A2AFC
-3A2AFC:lI109|H3A2BC0
-3A2BC0:lI112|H3A2C7C
-3A2C7C:lI114|H3A2D2C
-3A2D2C:lI101|H3A2DD4
-3A2DD4:lI115|H3A2E6C
-3A2E6C:lI115|N
-3A1F64:lI90|N
-3A1EBC:lH3A1F74|H3A1F80
-3A1F74:t2:H3A2020,H3A2028
-3A2028:lI97|H3A20DC
-3A20DC:lI112|H3A2190
-3A2190:lI112|H3A223C
-3A223C:lI108|H3A22F0
-3A22F0:lI105|H3A23AC
-3A23AC:lI99|H3A2468
-3A2468:lI97|H3A2514
-3A2514:lI116|H3A25D0
-3A25D0:lI105|H3A2684
-3A2684:lI111|H3A2738
-3A2738:lI110|H3A27F4
-3A27F4:lI47|H3A28B0
-3A28B0:lI120|H3A2974
-3A2974:lI45|H3A2A38
-3A2A38:lI99|H3A2B04
-3A2B04:lI100|H3A2BC8
-3A2BC8:lI108|H3A2C84
-3A2C84:lI105|H3A2D34
-3A2D34:lI110|H3A2DDC
-3A2DDC:lI107|N
-3A2020:lI118|H3A20D4
-3A20D4:lI99|H3A2188
-3A2188:lI100|N
-3A1F80:lH3A2030|H3A203C
-3A2030:t2:H3A20E4,H3A20EC
-3A20EC:lI97|H3A21A0
-3A21A0:lI112|H3A224C
-3A224C:lI112|H3A2300
-3A2300:lI108|H3A23BC
-3A23BC:lI105|H3A2470
-3A2470:lI99|H3A251C
-3A251C:lI97|H3A25D8
-3A25D8:lI116|H3A268C
-3A268C:lI105|H3A2740
-3A2740:lI111|H3A27FC
-3A27FC:lI110|H3A28B8
-3A28B8:lI47|H3A297C
-3A297C:lI120|H3A2A40
-3A2A40:lI45|H3A2B0C
-3A2B0C:lI98|H3A2BD0
-3A2BD0:lI99|H3A2C8C
-3A2C8C:lI112|H3A2D3C
-3A2D3C:lI105|H3A2DE4
-3A2DE4:lI111|N
-3A20E4:lI98|H3A2198
-3A2198:lI99|H3A2244
-3A2244:lI112|H3A22F8
-3A22F8:lI105|H3A23B4
-3A23B4:lI111|N
-3A203C:lH3A20F4|H3A2100
-3A20F4:t2:H3A21A8,H3A21B0
-3A21B0:lI97|H3A225C
-3A225C:lI112|H3A2310
-3A2310:lI112|H3A23C4
-3A23C4:lI108|H3A2478
-3A2478:lI105|H3A2524
-3A2524:lI99|H3A25E0
-3A25E0:lI97|H3A2694
-3A2694:lI116|H3A2748
-3A2748:lI105|H3A2804
-3A2804:lI111|H3A28C0
-3A28C0:lI110|H3A2984
-3A2984:lI47|H3A2A48
-3A2A48:lI114|H3A2B14
-3A2B14:lI116|H3A2BD8
-3A2BD8:lI102|N
-3A21A8:lI114|H3A2254
-3A2254:lI116|H3A2308
-3A2308:lI102|N
-3A2100:lH3A21B8|H3A21C4
-3A21B8:t2:H3A2264,H3A226C
-3A226C:lI97|H3A2320
-3A2320:lI112|H3A23D4
-3A23D4:lI112|H3A2480
-3A2480:lI108|H3A252C
-3A252C:lI105|H3A25E8
-3A25E8:lI99|H3A269C
-3A269C:lI97|H3A2750
-3A2750:lI116|H3A280C
-3A280C:lI105|H3A28C8
-3A28C8:lI111|H3A298C
-3A298C:lI110|H3A2A50
-3A2A50:lI47|H3A2B1C
-3A2B1C:lI112|H3A2BE0
-3A2BE0:lI111|H3A2C94
-3A2C94:lI119|H3A2D44
-3A2D44:lI101|H3A2DEC
-3A2DEC:lI114|H3A2E74
-3A2E74:lI112|H3A2EEC
-3A2EEC:lI111|H3A2F64
-3A2F64:lI105|H3A2FD4
-3A2FD4:lI110|H3A303C
-3A303C:lI116|N
-3A2264:lI112|H3A2318
-3A2318:lI112|H3A23CC
-3A23CC:lI116|N
-3A21C4:lH3A2274|H3A2280
-3A2274:t2:H3A2328,H3A2330
-3A2330:lI97|H3A23E4
-3A23E4:lI112|H3A2488
-3A2488:lI112|H3A2534
-3A2534:lI108|H3A25F0
-3A25F0:lI105|H3A26A4
-3A26A4:lI99|H3A2758
-3A2758:lI97|H3A2814
-3A2814:lI116|H3A28D0
-3A28D0:lI105|H3A2994
-3A2994:lI111|H3A2A58
-3A2A58:lI110|H3A2B24
-3A2B24:lI47|H3A2BE8
-3A2BE8:lI112|H3A2C9C
-3A2C9C:lI111|H3A2D4C
-3A2D4C:lI115|H3A2DF4
-3A2DF4:lI116|H3A2E7C
-3A2E7C:lI115|H3A2EF4
-3A2EF4:lI99|H3A2F6C
-3A2F6C:lI114|H3A2FDC
-3A2FDC:lI105|H3A3044
-3A3044:lI112|H3A30A4
-3A30A4:lI116|N
-3A2328:lI97|H3A23DC
-3A23DC:lI105|N
-3A2280:lH3A2338|H3A2344
-3A2338:t2:H3A23EC,H3A23F4
-3A23F4:lI97|H3A2498
-3A2498:lI112|H3A2544
-3A2544:lI112|H3A25F8
-3A25F8:lI108|H3A26AC
-3A26AC:lI105|H3A2760
-3A2760:lI99|H3A281C
-3A281C:lI97|H3A28D8
-3A28D8:lI116|H3A299C
-3A299C:lI105|H3A2A60
-3A2A60:lI111|H3A2B2C
-3A2B2C:lI110|H3A2BF0
-3A2BF0:lI47|H3A2CA4
-3A2CA4:lI112|H3A2D54
-3A2D54:lI111|H3A2DFC
-3A2DFC:lI115|H3A2E84
-3A2E84:lI116|H3A2EFC
-3A2EFC:lI115|H3A2F74
-3A2F74:lI99|H3A2FE4
-3A2FE4:lI114|H3A304C
-3A304C:lI105|H3A30AC
-3A30AC:lI112|H3A3104
-3A3104:lI116|N
-3A23EC:lI101|H3A2490
-3A2490:lI112|H3A253C
-3A253C:lI115|N
-3A2344:lH3A23FC|H3A2408
-3A23FC:t2:H3A24A0,H3A24A8
-3A24A8:lI97|H3A2554
-3A2554:lI112|H3A2600
-3A2600:lI112|H3A26B4
-3A26B4:lI108|H3A2768
-3A2768:lI105|H3A2824
-3A2824:lI99|H3A28E0
-3A28E0:lI97|H3A29A4
-3A29A4:lI116|H3A2A68
-3A2A68:lI105|H3A2B34
-3A2B34:lI111|H3A2BF8
-3A2BF8:lI110|H3A2CAC
-3A2CAC:lI47|H3A2D5C
-3A2D5C:lI112|H3A2E04
-3A2E04:lI111|H3A2E8C
-3A2E8C:lI115|H3A2F04
-3A2F04:lI116|H3A2F7C
-3A2F7C:lI115|H3A2FEC
-3A2FEC:lI99|H3A3054
-3A3054:lI114|H3A30B4
-3A30B4:lI105|H3A310C
-3A310C:lI112|H3A315C
-3A315C:lI116|N
-3A24A0:lI112|H3A254C
-3A254C:lI115|N
-3A2408:lH3A24B0|H3A24BC
-3A24B0:t2:H3A255C,H3A2564
-3A2564:lI97|H3A2610
-3A2610:lI112|H3A26C4
-3A26C4:lI112|H3A2770
-3A2770:lI108|H3A282C
-3A282C:lI105|H3A28E8
-3A28E8:lI99|H3A29AC
-3A29AC:lI97|H3A2A70
-3A2A70:lI116|H3A2B3C
-3A2B3C:lI105|H3A2C00
-3A2C00:lI111|H3A2CB4
-3A2CB4:lI110|H3A2D64
-3A2D64:lI47|H3A2E0C
-3A2E0C:lI112|H3A2E94
-3A2E94:lI100|H3A2F0C
-3A2F0C:lI102|N
-3A255C:lI112|H3A2608
-3A2608:lI100|H3A26BC
-3A26BC:lI102|N
-3A24BC:lH3A256C|H3A2578
-3A256C:t2:H3A2618,H3A2620
-3A2620:lI97|H3A26D4
-3A26D4:lI112|H3A2780
-3A2780:lI112|H3A2834
-3A2834:lI108|H3A28F0
-3A28F0:lI105|H3A29B4
-3A29B4:lI99|H3A2A78
-3A2A78:lI97|H3A2B44
-3A2B44:lI116|H3A2C08
-3A2C08:lI105|H3A2CBC
-3A2CBC:lI111|H3A2D6C
-3A2D6C:lI110|H3A2E14
-3A2E14:lI47|H3A2E9C
-3A2E9C:lI111|H3A2F14
-3A2F14:lI100|H3A2F84
-3A2F84:lI97|N
-3A2618:lI111|H3A26CC
-3A26CC:lI100|H3A2778
-3A2778:lI97|N
-3A2578:lH3A2628|H3A2634
-3A2628:t2:H3A26DC,H3A26E4
-3A26E4:lI97|H3A2790
-3A2790:lI112|H3A2844
-3A2844:lI112|H3A28F8
-3A28F8:lI108|H3A29BC
-3A29BC:lI105|H3A2A80
-3A2A80:lI99|H3A2B4C
-3A2B4C:lI97|H3A2C10
-3A2C10:lI116|H3A2CC4
-3A2CC4:lI105|H3A2D74
-3A2D74:lI111|H3A2E1C
-3A2E1C:lI110|H3A2EA4
-3A2EA4:lI47|H3A2F1C
-3A2F1C:lI111|H3A2F8C
-3A2F8C:lI99|H3A2FF4
-3A2FF4:lI116|H3A305C
-3A305C:lI101|H3A30BC
-3A30BC:lI116|H3A3114
-3A3114:lI45|H3A3164
-3A3164:lI115|H3A31AC
-3A31AC:lI116|H3A31F4
-3A31F4:lI114|H3A323C
-3A323C:lI101|H3A3284
-3A3284:lI97|H3A32CC
-3A32CC:lI109|N
-3A26DC:lI98|H3A2788
-3A2788:lI105|H3A283C
-3A283C:lI110|N
-3A2634:lH3A26EC|H3A26F8
-3A26EC:t2:H3A2798,H3A27A0
-3A27A0:lI97|H3A2854
-3A2854:lI112|H3A2908
-3A2908:lI112|H3A29C4
-3A29C4:lI108|H3A2A88
-3A2A88:lI105|H3A2B54
-3A2B54:lI99|H3A2C18
-3A2C18:lI97|H3A2CCC
-3A2CCC:lI116|H3A2D7C
-3A2D7C:lI105|H3A2E24
-3A2E24:lI111|H3A2EAC
-3A2EAC:lI110|H3A2F24
-3A2F24:lI47|H3A2F94
-3A2F94:lI111|H3A2FFC
-3A2FFC:lI99|H3A3064
-3A3064:lI116|H3A30C4
-3A30C4:lI101|H3A311C
-3A311C:lI116|H3A316C
-3A316C:lI45|H3A31B4
-3A31B4:lI115|H3A31FC
-3A31FC:lI116|H3A3244
-3A3244:lI114|H3A328C
-3A328C:lI101|H3A32D4
-3A32D4:lI97|H3A3314
-3A3314:lI109|N
-3A2798:lI100|H3A284C
-3A284C:lI109|H3A2900
-3A2900:lI115|N
-3A26F8:lH3A27A8|H3A27B4
-3A27A8:t2:H3A285C,H3A2864
-3A2864:lI97|H3A2918
-3A2918:lI112|H3A29D4
-3A29D4:lI112|H3A2A90
-3A2A90:lI108|H3A2B5C
-3A2B5C:lI105|H3A2C20
-3A2C20:lI99|H3A2CD4
-3A2CD4:lI97|H3A2D84
-3A2D84:lI116|H3A2E2C
-3A2E2C:lI105|H3A2EB4
-3A2EB4:lI111|H3A2F2C
-3A2F2C:lI110|H3A2F9C
-3A2F9C:lI47|H3A3004
-3A3004:lI111|H3A306C
-3A306C:lI99|H3A30CC
-3A30CC:lI116|H3A3124
-3A3124:lI101|H3A3174
-3A3174:lI116|H3A31BC
-3A31BC:lI45|H3A3204
-3A3204:lI115|H3A324C
-3A324C:lI116|H3A3294
-3A3294:lI114|H3A32DC
-3A32DC:lI101|H3A331C
-3A331C:lI97|H3A334C
-3A334C:lI109|N
-3A285C:lI108|H3A2910
-3A2910:lI104|H3A29CC
-3A29CC:lI97|N
-3A27B4:lH3A286C|H3A2878
-3A286C:t2:H3A2920,H3A2928
-3A2928:lI97|H3A29E4
-3A29E4:lI112|H3A2AA0
-3A2AA0:lI112|H3A2B64
-3A2B64:lI108|H3A2C28
-3A2C28:lI105|H3A2CDC
-3A2CDC:lI99|H3A2D8C
-3A2D8C:lI97|H3A2E34
-3A2E34:lI116|H3A2EBC
-3A2EBC:lI105|H3A2F34
-3A2F34:lI111|H3A2FA4
-3A2FA4:lI110|H3A300C
-3A300C:lI47|H3A3074
-3A3074:lI111|H3A30D4
-3A30D4:lI99|H3A312C
-3A312C:lI116|H3A317C
-3A317C:lI101|H3A31C4
-3A31C4:lI116|H3A320C
-3A320C:lI45|H3A3254
-3A3254:lI115|H3A329C
-3A329C:lI116|H3A32E4
-3A32E4:lI114|H3A3324
-3A3324:lI101|H3A3354
-3A3354:lI97|H3A337C
-3A337C:lI109|N
-3A2920:lI108|H3A29DC
-3A29DC:lI122|H3A2A98
-3A2A98:lI104|N
-3A2878:lH3A2930|H3A293C
-3A2930:t2:H3A29EC,H3A29F4
-3A29F4:lI97|H3A2AB0
-3A2AB0:lI112|H3A2B74
-3A2B74:lI112|H3A2C30
-3A2C30:lI108|H3A2CE4
-3A2CE4:lI105|H3A2D94
-3A2D94:lI99|H3A2E3C
-3A2E3C:lI97|H3A2EC4
-3A2EC4:lI116|H3A2F3C
-3A2F3C:lI105|H3A2FAC
-3A2FAC:lI111|H3A3014
-3A3014:lI110|H3A307C
-3A307C:lI47|H3A30DC
-3A30DC:lI111|H3A3134
-3A3134:lI99|H3A3184
-3A3184:lI116|H3A31CC
-3A31CC:lI101|H3A3214
-3A3214:lI116|H3A325C
-3A325C:lI45|H3A32A4
-3A32A4:lI115|H3A32EC
-3A32EC:lI116|H3A332C
-3A332C:lI114|H3A335C
-3A335C:lI101|H3A3384
-3A3384:lI97|H3A33A4
-3A33A4:lI109|N
-3A29EC:lI101|H3A2AA8
-3A2AA8:lI120|H3A2B6C
-3A2B6C:lI101|N
-3A293C:lH3A29FC|H3A2A08
-3A29FC:t2:H3A2AB8,H3A2AC0
-3A2AC0:lI97|H3A2B84
-3A2B84:lI112|H3A2C40
-3A2C40:lI112|H3A2CF4
-3A2CF4:lI108|H3A2DA4
-3A2DA4:lI105|H3A2E44
-3A2E44:lI99|H3A2ECC
-3A2ECC:lI97|H3A2F44
-3A2F44:lI116|H3A2FB4
-3A2FB4:lI105|H3A301C
-3A301C:lI111|H3A3084
-3A3084:lI110|H3A30E4
-3A30E4:lI47|H3A313C
-3A313C:lI111|H3A318C
-3A318C:lI99|H3A31D4
-3A31D4:lI116|H3A321C
-3A321C:lI101|H3A3264
-3A3264:lI116|H3A32AC
-3A32AC:lI45|H3A32F4
-3A32F4:lI115|H3A3334
-3A3334:lI116|H3A3364
-3A3364:lI114|H3A338C
-3A338C:lI101|H3A33AC
-3A33AC:lI97|H3A33C4
-3A33C4:lI109|N
-3A2AB8:lI99|H3A2B7C
-3A2B7C:lI108|H3A2C38
-3A2C38:lI97|H3A2CEC
-3A2CEC:lI115|H3A2D9C
-3A2D9C:lI115|N
-3A2A08:lH3A2AC8|H3A2AD4
-3A2AC8:t2:H3A2B8C,H3A2B94
-3A2B94:lI97|H3A2C50
-3A2C50:lI112|H3A2D04
-3A2D04:lI112|H3A2DAC
-3A2DAC:lI108|H3A2E4C
-3A2E4C:lI105|H3A2ED4
-3A2ED4:lI99|H3A2F4C
-3A2F4C:lI97|H3A2FBC
-3A2FBC:lI116|H3A3024
-3A3024:lI105|H3A308C
-3A308C:lI111|H3A30EC
-3A30EC:lI110|H3A3144
-3A3144:lI47|H3A3194
-3A3194:lI109|H3A31DC
-3A31DC:lI115|H3A3224
-3A3224:lI119|H3A326C
-3A326C:lI111|H3A32B4
-3A32B4:lI114|H3A32FC
-3A32FC:lI100|N
-3A2B8C:lI100|H3A2C48
-3A2C48:lI111|H3A2CFC
-3A2CFC:lI99|N
-3A2AD4:lH3A2B9C|H3A2BA8
-3A2B9C:t2:H3A2C58,H3A2C60
-3A2C60:lI97|H3A2D14
-3A2D14:lI112|H3A2DBC
-3A2DBC:lI112|H3A2E54
-3A2E54:lI108|H3A2EDC
-3A2EDC:lI105|H3A2F54
-3A2F54:lI99|H3A2FC4
-3A2FC4:lI97|H3A302C
-3A302C:lI116|H3A3094
-3A3094:lI105|H3A30F4
-3A30F4:lI111|H3A314C
-3A314C:lI110|H3A319C
-3A319C:lI47|H3A31E4
-3A31E4:lI109|H3A322C
-3A322C:lI97|H3A3274
-3A3274:lI99|H3A32BC
-3A32BC:lI45|H3A3304
-3A3304:lI99|H3A333C
-3A333C:lI111|H3A336C
-3A336C:lI109|H3A3394
-3A3394:lI112|H3A33B4
-3A33B4:lI97|H3A33CC
-3A33CC:lI99|H3A33DC
-3A33DC:lI116|H3A33EC
-3A33EC:lI112|H3A33FC
-3A33FC:lI114|H3A340C
-3A340C:lI111|N
-3A2C58:lI99|H3A2D0C
-3A2D0C:lI112|H3A2DB4
-3A2DB4:lI116|N
-3A2BA8:lH3A2C68|N
-3A2C68:t2:H3A2D1C,H3A2D24
-3A2D24:lI97|H3A2DCC
-3A2DCC:lI112|H3A2E64
-3A2E64:lI112|H3A2EE4
-3A2EE4:lI108|H3A2F5C
-3A2F5C:lI105|H3A2FCC
-3A2FCC:lI99|H3A3034
-3A3034:lI97|H3A309C
-3A309C:lI116|H3A30FC
-3A30FC:lI105|H3A3154
-3A3154:lI111|H3A31A4
-3A31A4:lI110|H3A31EC
-3A31EC:lI47|H3A3234
-3A3234:lI109|H3A327C
-3A327C:lI97|H3A32C4
-3A32C4:lI99|H3A330C
-3A330C:lI45|H3A3344
-3A3344:lI98|H3A3374
-3A3374:lI105|H3A339C
-3A339C:lI110|H3A33BC
-3A33BC:lI104|H3A33D4
-3A33D4:lI101|H3A33E4
-3A33E4:lI120|H3A33F4
-3A33F4:lI52|H3A3404
-3A3404:lI48|N
-3A2D1C:lI104|H3A2DC4
-3A2DC4:lI113|H3A2E5C
-3A2E5C:lI120|N
-39DC28:lH39DC68|H39DC74
-39DC68:t2:A4:port,I8888
-39DC74:lH39DCA8|H39DCB4
-39DCA8:t2:AC:bind_address,H39DCF8
-39DCF8:t4:I127,I0,I0,I1
-39DCB4:lH39DD0C|H39DD18
-39DD0C:t2:AB:server_name,H39DD6C
-39DD6C:lI108|H39DDE4
-39DDE4:lI111|H39DE5C
-39DE5C:lI99|H39DEE4
-39DEE4:lI97|H39DF6C
-39DF6C:lI108|H39E00C
-39E00C:lI104|H39E0B4
-39E0B4:lI111|H39E16C
-39E16C:lI115|H39E238
-39E238:lI116|N
-39DD18:lH39DD74|H39DD80
-39DD74:t2:AE:max_header_siz,I1024
-39DD80:lH39DDEC|H39DDF8
-39DDEC:t2:A11:max_header_action,A8:reply414
-39DDF8:lH39DE64|H39DE70
-39DE64:t2:A8:com_type,A7:ip_comm
-39DE70:lH39DEEC|H39DEF8
-39DEEC:t2:A7:modules,H39DF74
-39DF74:lA9:mod_alias|H39E014
-39E014:lA8:mod_auth|H39E0BC
-39E0BC:lA7:mod_esi|H39E174
-39E174:lAB:mod_actions|H39E240
-39E240:lA7:mod_cgi|H39E324
-39E324:lAB:mod_include|H39E418
-39E418:lA7:mod_dir|H39E51C
-39E51C:lA7:mod_get|H39E634
-39E634:lA8:mod_head|H39E748
-39E748:lA7:mod_log|H39E85C
-39E85C:lAC:mod_disk_log|N
-39DEF8:lH39DF7C|H39DF88
-39DF7C:t2:AF:directory_index,H39E01C
-39E01C:lH39E0C4|N
-39E0C4:lI105|H39E17C
-39E17C:lI110|H39E248
-39E248:lI100|H39E32C
-39E32C:lI101|H39E420
-39E420:lI120|H39E524
-39E524:lI46|H39E63C
-39E63C:lI104|H39E750
-39E750:lI116|H39E864
-39E864:lI109|H39E978
-39E978:lI108|N
-39DF88:lH39E024|H39E030
-39E024:t2:AC:default_type,H39E0CC
-39E0CC:lI116|H39E184
-39E184:lI101|H39E250
-39E250:lI120|H39E334
-39E334:lI116|H39E428
-39E428:lI47|H39E52C
-39E52C:lI112|H39E644
-39E644:lI108|H39E758
-39E758:lI97|H39E86C
-39E86C:lI105|H39E980
-39E980:lI110|N
-39E030:lH39E0D4|H39E0E0
-39E0D4:t2:A10:erl_script_alias,H39E18C
-39E18C:t2:H39E258,H39E260
-39E260:lH39E344|N
-39E344:lI119|H39E438
-39E438:lI101|H39E53C
-39E53C:lI98|H39E654
-39E654:lI116|H39E768
-39E768:lI111|H39E87C
-39E87C:lI111|H39E990
-39E990:lI108|N
-39E258:lI47|H39E33C
-39E33C:lI119|H39E430
-39E430:lI101|H39E534
-39E534:lI98|H39E64C
-39E64C:lI116|H39E760
-39E760:lI111|H39E874
-39E874:lI111|H39E988
-39E988:lI108|N
-39E0E0:lH39E198|H39E1A4
-39E198:t2:A5:alias,H39E268
-39E268:t2:H39E34C,H39E354
-39E354:lI47|H39E448
-39E448:lI99|H39E54C
-39E54C:lI108|H39E664
-39E664:lI101|H39E778
-39E778:lI97|H39E88C
-39E88C:lI114|H39E9A0
-39E9A0:lI99|H39EA94
-39EA94:lI97|H39EB88
-39EB88:lI115|H39EC7C
-39EC7C:lI101|H39ED70
-39ED70:lI47|H39EE4C
-39EE4C:lI111|H39EF20
-39EF20:lI116|H39EFFC
-39EFFC:lI112|H39F0E0
-39F0E0:lI47|H39F1B4
-39F1B4:lI101|H39F288
-39F288:lI114|H39F344
-39F344:lI116|H39F408
-39F408:lI115|H39F4D4
-39F4D4:lI47|H39F5A8
-39F5A8:lI108|H39F67C
-39F67C:lI105|H39F750
-39F750:lI98|H39F824
-39F824:lI47|H39F908
-39F908:lI111|H39F9E4
-39F9E4:lI98|H39FAC0
-39FAC0:lI115|H39FB9C
-39FB9C:lI101|H39FC68
-39FC68:lI114|H39FD2C
-39FD2C:lI118|H39FDF8
-39FDF8:lI101|H39FEB4
-39FEB4:lI114|H39FF70
-39FF70:lI47|H3A0024
-3A0024:lI112|H3A00D8
-3A00D8:lI114|H3A0184
-3A0184:lI105|H3A0238
-3A0238:lI118|H3A02F4
-3A02F4:lI47|H3A03A8
-3A03A8:lI99|H3A0444
-3A0444:lI114|H3A04E8
-3A04E8:lI97|H3A058C
-3A058C:lI115|H3A0638
-3A0638:lI104|H3A06EC
-3A06EC:lI100|H3A0798
-3A0798:lI117|H3A083C
-3A083C:lI109|H3A08C8
-3A08C8:lI112|H3A095C
-3A095C:lI95|H3A09F0
-3A09F0:lI118|H3A0A8C
-3A0A8C:lI105|H3A0B38
-3A0B38:lI101|H3A0BE4
-3A0BE4:lI119|H3A0CA0
-3A0CA0:lI101|H3A0D5C
-3A0D5C:lI114|N
-39E34C:lI47|H39E440
-39E440:lI99|H39E544
-39E544:lI114|H39E65C
-39E65C:lI97|H39E770
-39E770:lI115|H39E884
-39E884:lI104|H39E998
-39E998:lI100|H39EA8C
-39EA8C:lI117|H39EB80
-39EB80:lI109|H39EC74
-39EC74:lI112|H39ED68
-39ED68:lI95|H39EE44
-39EE44:lI118|H39EF18
-39EF18:lI105|H39EFF4
-39EFF4:lI101|H39F0D8
-39F0D8:lI119|H39F1AC
-39F1AC:lI101|H39F280
-39F280:lI114|N
-39E1A4:lH39E274|H39E280
-39E274:t2:A5:alias,H39E35C
-39E35C:t2:H39E450,H39E458
-39E458:lI47|H39E55C
-39E55C:lI99|H39E674
-39E674:lI108|H39E788
-39E788:lI101|H39E89C
-39E89C:lI97|H39E9B0
-39E9B0:lI114|H39EAA4
-39EAA4:lI99|H39EB98
-39EB98:lI97|H39EC8C
-39EC8C:lI115|H39ED80
-39ED80:lI101|H39EE5C
-39EE5C:lI47|H39EF30
-39EF30:lI111|H39F00C
-39F00C:lI116|H39F0F0
-39F0F0:lI112|H39F1C4
-39F1C4:lI47|H39F298
-39F298:lI101|H39F354
-39F354:lI114|H39F418
-39F418:lI116|H39F4E4
-39F4E4:lI115|H39F5B0
-39F5B0:lI47|H39F684
-39F684:lI101|H39F758
-39F758:lI114|H39F82C
-39F82C:lI116|H39F910
-39F910:lI115|H39F9EC
-39F9EC:lI47|H39FAC8
-39FAC8:lI100|H39FBA4
-39FBA4:lI111|H39FC70
-39FC70:lI99|H39FD34
-39FD34:lI47|H39FE00
-39FE00:lI104|H39FEBC
-39FEBC:lI116|H39FF78
-39FF78:lI109|H3A002C
-3A002C:lI108|N
-39E450:lI47|H39E554
-39E554:lI99|H39E66C
-39E66C:lI114|H39E780
-39E780:lI97|H39E894
-39E894:lI115|H39E9A8
-39E9A8:lI104|H39EA9C
-39EA9C:lI100|H39EB90
-39EB90:lI117|H39EC84
-39EC84:lI109|H39ED78
-39ED78:lI112|H39EE54
-39EE54:lI95|H39EF28
-39EF28:lI101|H39F004
-39F004:lI114|H39F0E8
-39F0E8:lI116|H39F1BC
-39F1BC:lI115|H39F290
-39F290:lI95|H39F34C
-39F34C:lI100|H39F410
-39F410:lI111|H39F4DC
-39F4DC:lI99|N
-39E280:lH39E368|H39E374
-39E368:t2:A5:alias,H39E460
-39E460:t2:H39E564,H39E56C
-39E56C:lI47|H39E684
-39E684:lI99|H39E798
-39E798:lI108|H39E8AC
-39E8AC:lI101|H39E9C0
-39E9C0:lI97|H39EAB4
-39EAB4:lI114|H39EBA8
-39EBA8:lI99|H39EC9C
-39EC9C:lI97|H39ED90
-39ED90:lI115|H39EE6C
-39EE6C:lI101|H39EF40
-39EF40:lI47|H39F01C
-39F01C:lI111|H39F100
-39F100:lI116|H39F1D4
-39F1D4:lI112|H39F2A0
-39F2A0:lI47|H39F35C
-39F35C:lI101|H39F420
-39F420:lI114|H39F4EC
-39F4EC:lI116|H39F5B8
-39F5B8:lI115|H39F68C
-39F68C:lI47|H39F760
-39F760:lI108|H39F834
-39F834:lI105|H39F918
-39F918:lI98|H39F9F4
-39F9F4:lI47|H39FAD0
-39FAD0:lI111|H39FBAC
-39FBAC:lI98|H39FC78
-39FC78:lI115|H39FD3C
-39FD3C:lI101|H39FE08
-39FE08:lI114|H39FEC4
-39FEC4:lI118|H39FF80
-39FF80:lI101|H3A0034
-3A0034:lI114|H3A00E0
-3A00E0:lI47|H3A018C
-3A018C:lI100|H3A0240
-3A0240:lI111|H3A02FC
-3A02FC:lI99|H3A03B0
-3A03B0:lI47|H3A044C
-3A044C:lI104|H3A04F0
-3A04F0:lI116|H3A0594
-3A0594:lI109|H3A0640
-3A0640:lI108|N
-39E564:lI47|H39E67C
-39E67C:lI99|H39E790
-39E790:lI114|H39E8A4
-39E8A4:lI97|H39E9B8
-39E9B8:lI115|H39EAAC
-39EAAC:lI104|H39EBA0
-39EBA0:lI100|H39EC94
-39EC94:lI117|H39ED88
-39ED88:lI109|H39EE64
-39EE64:lI112|H39EF38
-39EF38:lI95|H39F014
-39F014:lI100|H39F0F8
-39F0F8:lI111|H39F1CC
-39F1CC:lI99|N
-39E374:lH39E46C|N
-39E46C:t2:A10:erl_script_alias,H39E574
-39E574:t2:H39E68C,H39E694
-39E694:lH39E7A8|N
-39E7A8:lI99|H39E8BC
-39E8BC:lI114|H39E9D0
-39E9D0:lI97|H39EAC4
-39EAC4:lI115|H39EBB8
-39EBB8:lI104|H39ECAC
-39ECAC:lI100|H39EDA0
-39EDA0:lI117|H39EE74
-39EE74:lI109|H39EF48
-39EF48:lI112|H39F024
-39F024:lI95|H39F108
-39F108:lI118|H39F1DC
-39F1DC:lI105|H39F2A8
-39F2A8:lI101|H39F364
-39F364:lI119|H39F428
-39F428:lI101|H39F4F4
-39F4F4:lI114|N
-39E68C:lI47|H39E7A0
-39E7A0:lI99|H39E8B4
-39E8B4:lI100|H39E9C8
-39E9C8:lI118|H39EABC
-39EABC:lI95|H39EBB0
-39EBB0:lI101|H39ECA4
-39ECA4:lI114|H39ED98
-39ED98:lI108|N
-39DB58:lN|H39DB9C
-39DB9C:lH39D9FC|H39DBEC
-39D9FC:t4:I127,I0,I0,I1
-39DBEC:lI8888|N
-3A3E20:lH3A3DFC|H3A3704
-3A3DFC:t8:A5:child,P<0.46.0>,H39DAC8,H39DAD8,A9:permanent,I2000,A6:worker,H39DAE8
-39DAE8:lAD:httpd_manager|H39DB38
-39DB38:lAA:gen_server|N
-39DAD8:t3:AD:httpd_manager,AA:start_link,H39DB30
-39DB30:lA9:undefined|H39DB78
-39DB78:lH39DB50|H39DBC0
-39DBC0:lN|N
-39DAC8:t3:AD:httpd_manager,H39D9FC,I8888
-3A3704:lH3A36E0|H39D998
-3A36E0:t8:A5:child,P<0.45.0>,H39DA18,H39DA28,A9:permanent,I2000,AA:supervisor,H39DA38
-39DA38:lAE:httpd_misc_sup|H39DAC0
-39DAC0:lAA:supervisor|N
-39DA28:t3:AE:httpd_misc_sup,A5:start,H39D958
-39D958:lH39D9FC|H39DA10
-39DA10:lI8888|H39DAB8
-39DAB8:lA7:silence|N
-39DA18:t3:AE:httpd_misc_sup,H39D9FC,I8888
-39D998:lH39DA64|N
-39DA64:t8:A5:child,P<0.44.0>,H39DAF0,H39DB00,A9:permanent,I2000,AA:supervisor,H39DB10
-39DB10:lA12:httpd_acceptor_sup|H39DB48
-39DB48:lAA:supervisor|N
-39DB00:t3:A12:httpd_acceptor_sup,A5:start,H39DB40
-39DB40:lH39D9FC|H39DB80
-39DB80:lI8888|H39DBC8
-39DBC8:lA7:silence|N
-39DAF0:t3:A12:httpd_acceptor_sup,H39D9FC,I8888
-39D960:t2:A5:local,A1A:httpd_sup__127_0_0_1__8888
-39D9CC:lAA:gen_server|H39DA90
-39DA90:lP<0.33.0>|H39DB20
-39DB20:lP<0.33.0>|H39DB60
-39DB60:lH39DBA4|H39DBB0
-39DBA4:t2:A5:local,A1A:httpd_sup__127_0_0_1__8888
-39DBB0:lAA:supervisor|H39DBF4
-39DBF4:lH39DC30|H39DC40
-39DC30:t3:H39D960,A9:httpd_sup,H39DA88
-39DC40:lN|N
-39D940:t2:AD:$initial_call,H39D9E4
-39D9E4:t3:A3:gen,A7:init_it,H39D9CC
-39D94C:t2:AA:$ancestors,H39D9F4
-39D9F4:lA8:web_tool|H39DAB0
-39DAB0:lP<0.27.0>|N
-=proc_dictionary:<0.44.0>
-H3756A8
-H3756B4
-H3756C0
-H3756CC
-=proc_stack:<0.44.0>
-36c194:SReturn addr 0x225860 (proc_lib:init_p/5 + 164)
-y0:N
-y1:A8:infinity
-y2:AA:supervisor
-y3:H36C030
-y4:A1E:httpd_acc_sup__127_0_0_1__8888
-y5:P<0.43.0>
-36c1b0:SReturn addr 0x156F90 (<terminate process normally>)
-y0:SCatch 0x225860 (proc_lib:init_p/5 + 164)
-y1:A3:gen
-y2:A7:init_it
-y3:H375710
-=proc_heap:<0.44.0>
-36C030:tA:A5:state,H3756D8,AB:one_for_one,H36C028,N,I500,I100,N,A12:httpd_acceptor_sup,H375730
-375730:lA7:silence|N
-36C028:lH36C004|N
-36C004:t8:A5:child,P<0.47.0>,H36BE80,H36BE90,A9:permanent,I1000,A6:worker,H36BEA0
-36BEA0:lAE:httpd_acceptor|N
-36BE90:t3:AE:httpd_acceptor,AA:start_link,H36BEE8
-36BEE8:lP<0.46.0>|H36BEF0
-36BEF0:lA7:ip_comm|H36BEF8
-36BEF8:lH36BF00|H36BF14
-36BF00:t4:I127,I0,I0,I1
-36BF14:lI8888|H36BF1C
-36BF1C:lA1B:httpd_conf__127_0_0_1__8888|H36BF24
-36BF24:lA7:silence|N
-36BE80:t3:AE:httpd_acceptor,H36BED4,I8888
-36BED4:t4:I127,I0,I0,I1
-3756D8:t2:A5:local,A1E:httpd_acc_sup__127_0_0_1__8888
-375710:lAA:gen_server|H375738
-375738:lP<0.43.0>|H375748
-375748:lP<0.43.0>|H375758
-375758:lH375760|H37576C
-375760:t2:A5:local,A1E:httpd_acc_sup__127_0_0_1__8888
-37576C:lAA:supervisor|H375774
-375774:lH37577C|H37578C
-37577C:t3:H3756D8,A12:httpd_acceptor_sup,H375730
-37578C:lN|N
-3756A8:t2:AD:$initial_call,H375718
-375718:t3:A3:gen,A7:init_it,H375710
-3756B4:t2:A9:verbosity,A7:silence
-3756C0:t2:AA:$ancestors,H375728
-375728:lA1A:httpd_sup__127_0_0_1__8888|H375740
-375740:lA8:web_tool|H375750
-375750:lP<0.27.0>|N
-3756CC:t2:A5:sname,A7:acc_sup
-=proc_dictionary:<0.45.0>
-H36F484
-H36F4F4
-H36F468
-H36F500
-=proc_stack:<0.45.0>
-36f734:SReturn addr 0x225860 (proc_lib:init_p/5 + 164)
-y0:N
-y1:A8:infinity
-y2:AA:supervisor
-y3:H36F5D0
-y4:A1F:httpd_misc_sup__127_0_0_1__8888
-y5:P<0.43.0>
-36f750:SReturn addr 0x156F90 (<terminate process normally>)
-y0:SCatch 0x225860 (proc_lib:init_p/5 + 164)
-y1:A3:gen
-y2:A7:init_it
-y3:H36F430
-=proc_heap:<0.45.0>
-36F5D0:tA:A5:state,H36F3FC,AB:one_for_one,N,N,I0,I1,N,AE:httpd_misc_sup,H36F408
-36F408:lA7:silence|N
-36F3FC:t2:A5:local,A1F:httpd_misc_sup__127_0_0_1__8888
-36F430:lAA:gen_server|H36F428
-36F428:lP<0.43.0>|H36F420
-36F420:lP<0.43.0>|H36F3D0
-36F3D0:lH36F3E0|H36F418
-36F3E0:t2:A5:local,A1F:httpd_misc_sup__127_0_0_1__8888
-36F418:lAA:supervisor|H36F3D8
-36F3D8:lH36F3EC|H36F410
-36F3EC:t3:H36F3FC,AE:httpd_misc_sup,H36F408
-36F410:lN|N
-36F484:t2:AD:$initial_call,H36F474
-36F474:t3:A3:gen,A7:init_it,H36F430
-36F4F4:t2:A9:verbosity,A7:silence
-36F468:t2:AA:$ancestors,H36F460
-36F460:lA1A:httpd_sup__127_0_0_1__8888|H36F440
-36F440:lA8:web_tool|H36F438
-36F438:lP<0.27.0>|N
-36F500:t2:A5:sname,A8:misc_sup
-=proc_dictionary:<0.46.0>
-H3BDA50
-H3BDA5C
-H3BDAC8
-H3BDB28
-H3BDB9C
-H3BDC00
-H3BDADC
-H3BDB3C
-=proc_stack:<0.46.0>
-39d8f4:SReturn addr 0x225860 (proc_lib:init_p/5 + 164)
-y0:N
-y1:A8:infinity
-y2:AD:httpd_manager
-y3:H39D5A4
-y4:A16:httpd__127_0_0_1__8888
-y5:P<0.43.0>
-39d910:SReturn addr 0x156F90 (<terminate process normally>)
-y0:SCatch 0x225860 (proc_lib:init_p/5 + 164)
-y1:A3:gen
-y2:A7:init_it
-y3:H3BDAB0
-=proc_heap:<0.46.0>
-39D5A4:t9:A5:state,A7:ip_comm,A9:undefined,A1B:httpd_conf__127_0_0_1__8888,N,A9:unblocked,A9:undefined,A9:undefined,H39D430
-39D430:lH39BF40|H39D428
-39BF40:t2:A8:max_conn,I1
-39D428:lH39BC80|H39D420
-39BC80:t2:AF:last_heavy_load,A5:never
-39D420:lH39D414|N
-39D414:t2:AF:last_connection,H39D408
-39D408:t2:H39D3E8,H39D3F8
-39D3F8:t3:I11,I22,I34
-39D3E8:t3:I2004,I4,I21
-3BDAB0:lAA:gen_server|H3BDB20
-3BDB20:lP<0.43.0>|H3BDB94
-3BDB94:lP<0.43.0>|H3BDBF8
-3BDBF8:lH3BDC48|H3BDC54
-3BDC48:t2:A5:local,A16:httpd__127_0_0_1__8888
-3BDC54:lAD:httpd_manager|H3BDCAC
-3BDCAC:lH3BDD14|H3BDD1C
-3BDD14:lA9:undefined|H3BDD9C
-3BDD9C:lH3BDA84|H3BDE2C
-3BDA84:lH3BDAF0|H3BDAFC
-3BDAF0:t2:AB:server_root,H3BDB48
-3BDB48:lI47|H3BDBB0
-3BDBB0:lI99|H3BDC0C
-3BDC0C:lI108|H3BDC64
-3BDC64:lI101|H3BDCBC
-3BDCBC:lI97|H3BDD2C
-3BDD2C:lI114|H3BDDA4
-3BDDA4:lI99|H3BDE34
-3BDE34:lI97|H3BDED4
-3BDED4:lI115|H3BDF90
-3BDF90:lI101|H3BE054
-3BE054:lI47|H3BE128
-3BE128:lI111|H3BE204
-3BE204:lI116|H3BE2EC
-3BE2EC:lI112|H3BE3E0
-3BE3E0:lI47|H3BE4E4
-3BE4E4:lI101|H3BE5E8
-3BE5E8:lI114|H3BE6EC
-3BE6EC:lI116|H3BE7E0
-3BE7E0:lI115|H3BE8CC
-3BE8CC:lI47|H3BE9B8
-3BE9B8:lI108|H3BEAAC
-3BEAAC:lI105|H3BEB98
-3BEB98:lI98|H3BEC84
-3BEC84:lI47|H3BED70
-3BED70:lI119|H3BEE5C
-3BEE5C:lI101|H3BEF30
-3BEF30:lI98|H3BEFFC
-3BEFFC:lI116|H3BF0C8
-3BF0C8:lI111|H3BF19C
-3BF19C:lI111|H3BF260
-3BF260:lI108|H3BF314
-3BF314:lI47|H3BF3C0
-3BF3C0:lI112|H3BF474
-3BF474:lI114|H3BF530
-3BF530:lI105|H3BF5F4
-3BF5F4:lI118|H3BF6C8
-3BF6C8:lI47|H3BF79C
-3BF79C:lI114|H3BF870
-3BF870:lI111|H3BF954
-3BF954:lI111|H3BFA30
-3BFA30:lI116|N
-3BDAFC:lH3BDB50|H3BDB5C
-3BDB50:t2:AD:document_root,H3BDBB8
-3BDBB8:lI47|H3BDC14
-3BDC14:lI99|H3BDC6C
-3BDC6C:lI108|H3BDCC4
-3BDCC4:lI101|H3BDD34
-3BDD34:lI97|H3BDDAC
-3BDDAC:lI114|H3BDE3C
-3BDE3C:lI99|H3BDEDC
-3BDEDC:lI97|H3BDF98
-3BDF98:lI115|H3BE05C
-3BE05C:lI101|H3BE130
-3BE130:lI47|H3BE20C
-3BE20C:lI111|H3BE2F4
-3BE2F4:lI116|H3BE3E8
-3BE3E8:lI112|H3BE4EC
-3BE4EC:lI47|H3BE5F0
-3BE5F0:lI101|H3BE6F4
-3BE6F4:lI114|H3BE7E8
-3BE7E8:lI116|H3BE8D4
-3BE8D4:lI115|H3BE9C0
-3BE9C0:lI47|H3BEAB4
-3BEAB4:lI108|H3BEBA0
-3BEBA0:lI105|H3BEC8C
-3BEC8C:lI98|H3BED78
-3BED78:lI47|H3BEE64
-3BEE64:lI119|H3BEF38
-3BEF38:lI101|H3BF004
-3BF004:lI98|H3BF0D0
-3BF0D0:lI116|H3BF1A4
-3BF1A4:lI111|H3BF268
-3BF268:lI111|H3BF31C
-3BF31C:lI108|H3BF3C8
-3BF3C8:lI47|H3BF47C
-3BF47C:lI112|H3BF538
-3BF538:lI114|H3BF5FC
-3BF5FC:lI105|H3BF6D0
-3BF6D0:lI118|H3BF7A4
-3BF7A4:lI47|H3BF878
-3BF878:lI114|H3BF95C
-3BF95C:lI111|H3BFA38
-3BFA38:lI111|H3BFB0C
-3BFB0C:lI116|H3BFBE8
-3BFBE8:lI47|H3BFCB4
-3BFCB4:lI100|H3BFD78
-3BFD78:lI111|H3BFE3C
-3BFE3C:lI99|N
-3BDB5C:lH3BDBC0|H3BDBCC
-3BDBC0:t2:AA:mime_types,H3BDC1C
-3BDC1C:lH3BDC74|H3BDC80
-3BDC74:t2:H3BDCCC,H3BDCD4
-3BDCD4:lI120|H3BDD44
-3BDD44:lI45|H3BDDBC
-3BDDBC:lI119|H3BDE44
-3BDE44:lI111|H3BDEE4
-3BDEE4:lI114|H3BDFA0
-3BDFA0:lI108|H3BE064
-3BE064:lI100|H3BE138
-3BE138:lI47|H3BE214
-3BE214:lI120|H3BE2FC
-3BE2FC:lI45|H3BE3F0
-3BE3F0:lI118|H3BE4F4
-3BE4F4:lI114|H3BE5F8
-3BE5F8:lI109|H3BE6FC
-3BE6FC:lI108|N
-3BDCCC:lI119|H3BDD3C
-3BDD3C:lI114|H3BDDB4
-3BDDB4:lI108|N
-3BDC80:lH3BDCDC|H3BDCE8
-3BDCDC:t2:H3BDD4C,H3BDD54
-3BDD54:lI120|H3BDDCC
-3BDDCC:lI45|H3BDE54
-3BDE54:lI119|H3BDEF4
-3BDEF4:lI111|H3BDFA8
-3BDFA8:lI114|H3BE06C
-3BE06C:lI108|H3BE140
-3BE140:lI100|H3BE21C
-3BE21C:lI47|H3BE304
-3BE304:lI120|H3BE3F8
-3BE3F8:lI45|H3BE4FC
-3BE4FC:lI118|H3BE600
-3BE600:lI114|H3BE704
-3BE704:lI109|H3BE7F0
-3BE7F0:lI108|N
-3BDD4C:lI118|H3BDDC4
-3BDDC4:lI114|H3BDE4C
-3BDE4C:lI109|H3BDEEC
-3BDEEC:lI108|N
-3BDCE8:lH3BDD5C|H3BDD68
-3BDD5C:t2:H3BDDD4,H3BDDDC
-3BDDDC:lI120|H3BDE64
-3BDE64:lI45|H3BDF04
-3BDF04:lI99|H3BDFB0
-3BDFB0:lI111|H3BE074
-3BE074:lI110|H3BE148
-3BE148:lI102|H3BE224
-3BE224:lI101|H3BE30C
-3BE30C:lI114|H3BE400
-3BE400:lI101|H3BE504
-3BE504:lI110|H3BE608
-3BE608:lI99|H3BE70C
-3BE70C:lI101|H3BE7F8
-3BE7F8:lI47|H3BE8DC
-3BE8DC:lI120|H3BE9C8
-3BE9C8:lI45|H3BEABC
-3BEABC:lI99|H3BEBA8
-3BEBA8:lI111|H3BEC94
-3BEC94:lI111|H3BED80
-3BED80:lI108|H3BEE6C
-3BEE6C:lI116|H3BEF40
-3BEF40:lI97|H3BF00C
-3BF00C:lI108|H3BF0D8
-3BF0D8:lI107|N
-3BDDD4:lI105|H3BDE5C
-3BDE5C:lI99|H3BDEFC
-3BDEFC:lI101|N
-3BDD68:lH3BDDE4|H3BDDF0
-3BDDE4:t2:H3BDE6C,H3BDE74
-3BDE74:lI118|H3BDF14
-3BDF14:lI105|H3BDFC0
-3BDFC0:lI100|H3BE084
-3BE084:lI101|H3BE158
-3BE158:lI111|H3BE22C
-3BE22C:lI47|H3BE314
-3BE314:lI120|H3BE408
-3BE408:lI45|H3BE50C
-3BE50C:lI115|H3BE610
-3BE610:lI103|H3BE714
-3BE714:lI105|H3BE800
-3BE800:lI45|H3BE8E4
-3BE8E4:lI109|H3BE9D0
-3BE9D0:lI111|H3BEAC4
-3BEAC4:lI118|H3BEBB0
-3BEBB0:lI105|H3BEC9C
-3BEC9C:lI101|N
-3BDE6C:lI109|H3BDF0C
-3BDF0C:lI111|H3BDFB8
-3BDFB8:lI118|H3BE07C
-3BE07C:lI105|H3BE150
-3BE150:lI101|N
-3BDDF0:lH3BDE7C|H3BDE88
-3BDE7C:t2:H3BDF1C,H3BDF24
-3BDF24:lI118|H3BDFD0
-3BDFD0:lI105|H3BE094
-3BE094:lI100|H3BE160
-3BE160:lI101|H3BE234
-3BE234:lI111|H3BE31C
-3BE31C:lI47|H3BE410
-3BE410:lI120|H3BE514
-3BE514:lI45|H3BE618
-3BE618:lI109|H3BE71C
-3BE71C:lI115|H3BE808
-3BE808:lI118|H3BE8EC
-3BE8EC:lI105|H3BE9D8
-3BE9D8:lI100|H3BEACC
-3BEACC:lI101|H3BEBB8
-3BEBB8:lI111|N
-3BDF1C:lI97|H3BDFC8
-3BDFC8:lI118|H3BE08C
-3BE08C:lI105|N
-3BDE88:lH3BDF2C|H3BDF38
-3BDF2C:t2:H3BDFD8,H3BDFE0
-3BDFE0:lI118|H3BE0A4
-3BE0A4:lI105|H3BE168
-3BE168:lI100|H3BE23C
-3BE23C:lI101|H3BE324
-3BE324:lI111|H3BE418
-3BE418:lI47|H3BE51C
-3BE51C:lI113|H3BE620
-3BE620:lI117|H3BE724
-3BE724:lI105|H3BE810
-3BE810:lI99|H3BE8F4
-3BE8F4:lI107|H3BE9E0
-3BE9E0:lI116|H3BEAD4
-3BEAD4:lI105|H3BEBC0
-3BEBC0:lI109|H3BECA4
-3BECA4:lI101|N
-3BDFD8:lI113|H3BE09C
-3BE09C:lI116|N
-3BDF38:lH3BDFE8|H3BDFF4
-3BDFE8:t2:H3BE0AC,H3BE0B4
-3BE0B4:lI118|H3BE178
-3BE178:lI105|H3BE24C
-3BE24C:lI100|H3BE32C
-3BE32C:lI101|H3BE420
-3BE420:lI111|H3BE524
-3BE524:lI47|H3BE628
-3BE628:lI113|H3BE72C
-3BE72C:lI117|H3BE818
-3BE818:lI105|H3BE8FC
-3BE8FC:lI99|H3BE9E8
-3BE9E8:lI107|H3BEADC
-3BEADC:lI116|H3BEBC8
-3BEBC8:lI105|H3BECAC
-3BECAC:lI109|H3BED88
-3BED88:lI101|N
-3BE0AC:lI109|H3BE170
-3BE170:lI111|H3BE244
-3BE244:lI118|N
-3BDFF4:lH3BE0BC|H3BE0C8
-3BE0BC:t2:H3BE180,H3BE188
-3BE188:lI118|H3BE25C
-3BE25C:lI105|H3BE33C
-3BE33C:lI100|H3BE430
-3BE430:lI101|H3BE52C
-3BE52C:lI111|H3BE630
-3BE630:lI47|H3BE734
-3BE734:lI109|H3BE820
-3BE820:lI112|H3BE904
-3BE904:lI101|H3BE9F0
-3BE9F0:lI103|N
-3BE180:lI109|H3BE254
-3BE254:lI112|H3BE334
-3BE334:lI101|H3BE428
-3BE428:lI103|N
-3BE0C8:lH3BE190|H3BE19C
-3BE190:t2:H3BE264,H3BE26C
-3BE26C:lI118|H3BE34C
-3BE34C:lI105|H3BE440
-3BE440:lI100|H3BE534
-3BE534:lI101|H3BE638
-3BE638:lI111|H3BE73C
-3BE73C:lI47|H3BE828
-3BE828:lI109|H3BE90C
-3BE90C:lI112|H3BE9F8
-3BE9F8:lI101|H3BEAE4
-3BEAE4:lI103|N
-3BE264:lI109|H3BE344
-3BE344:lI112|H3BE438
-3BE438:lI103|N
-3BE19C:lH3BE274|H3BE280
-3BE274:t2:H3BE354,H3BE35C
-3BE35C:lI118|H3BE450
-3BE450:lI105|H3BE544
-3BE544:lI100|H3BE640
-3BE640:lI101|H3BE744
-3BE744:lI111|H3BE830
-3BE830:lI47|H3BE914
-3BE914:lI109|H3BEA00
-3BEA00:lI112|H3BEAEC
-3BEAEC:lI101|H3BEBD0
-3BEBD0:lI103|N
-3BE354:lI109|H3BE448
-3BE448:lI112|H3BE53C
-3BE53C:lI101|N
-3BE280:lH3BE364|H3BE370
-3BE364:t2:H3BE458,H3BE460
-3BE460:lI116|H3BE554
-3BE554:lI101|H3BE650
-3BE650:lI120|H3BE754
-3BE754:lI116|H3BE838
-3BE838:lI47|H3BE91C
-3BE91C:lI120|H3BEA08
-3BEA08:lI45|H3BEAF4
-3BEAF4:lI115|H3BEBD8
-3BEBD8:lI103|H3BECB4
-3BECB4:lI109|H3BED90
-3BED90:lI108|N
-3BE458:lI115|H3BE54C
-3BE54C:lI103|H3BE648
-3BE648:lI109|H3BE74C
-3BE74C:lI108|N
-3BE370:lH3BE468|H3BE474
-3BE468:t2:H3BE55C,H3BE564
-3BE564:lI116|H3BE660
-3BE660:lI101|H3BE764
-3BE764:lI120|H3BE840
-3BE840:lI116|H3BE924
-3BE924:lI47|H3BEA10
-3BEA10:lI120|H3BEAFC
-3BEAFC:lI45|H3BEBE0
-3BEBE0:lI115|H3BECBC
-3BECBC:lI103|H3BED98
-3BED98:lI109|H3BEE74
-3BEE74:lI108|N
-3BE55C:lI115|H3BE658
-3BE658:lI103|H3BE75C
-3BE75C:lI109|N
-3BE474:lH3BE56C|H3BE578
-3BE56C:t2:H3BE668,H3BE670
-3BE670:lI116|H3BE774
-3BE774:lI101|H3BE850
-3BE850:lI120|H3BE92C
-3BE92C:lI116|H3BEA18
-3BEA18:lI47|H3BEB04
-3BEB04:lI120|H3BEBE8
-3BEBE8:lI45|H3BECC4
-3BECC4:lI115|H3BEDA0
-3BEDA0:lI101|H3BEE7C
-3BEE7C:lI116|H3BEF48
-3BEF48:lI101|H3BF014
-3BF014:lI120|H3BF0E0
-3BF0E0:lI116|N
-3BE668:lI101|H3BE76C
-3BE76C:lI116|H3BE848
-3BE848:lI120|N
-3BE578:lH3BE678|H3BE684
-3BE678:t2:H3BE77C,H3BE784
-3BE784:lI116|H3BE860
-3BE860:lI101|H3BE93C
-3BE93C:lI120|H3BEA20
-3BEA20:lI116|H3BEB0C
-3BEB0C:lI47|H3BEBF0
-3BEBF0:lI116|H3BECCC
-3BECCC:lI97|H3BEDA8
-3BEDA8:lI98|H3BEE84
-3BEE84:lI45|H3BEF50
-3BEF50:lI115|H3BF01C
-3BF01C:lI101|H3BF0E8
-3BF0E8:lI112|H3BF1AC
-3BF1AC:lI97|H3BF270
-3BF270:lI114|H3BF324
-3BF324:lI97|H3BF3D0
-3BF3D0:lI116|H3BF484
-3BF484:lI101|H3BF540
-3BF540:lI100|H3BF604
-3BF604:lI45|H3BF6D8
-3BF6D8:lI118|H3BF7AC
-3BF7AC:lI97|H3BF880
-3BF880:lI108|H3BF964
-3BF964:lI117|H3BFA40
-3BFA40:lI101|H3BFB14
-3BFB14:lI115|N
-3BE77C:lI116|H3BE858
-3BE858:lI115|H3BE934
-3BE934:lI118|N
-3BE684:lH3BE78C|H3BE798
-3BE78C:t2:H3BE868,H3BE870
-3BE870:lI116|H3BE94C
-3BE94C:lI101|H3BEA30
-3BEA30:lI120|H3BEB14
-3BEB14:lI116|H3BEBF8
-3BEBF8:lI47|H3BECD4
-3BECD4:lI114|H3BEDB0
-3BEDB0:lI105|H3BEE8C
-3BEE8C:lI99|H3BEF58
-3BEF58:lI104|H3BF024
-3BF024:lI116|H3BF0F0
-3BF0F0:lI101|H3BF1B4
-3BF1B4:lI120|H3BF278
-3BF278:lI116|N
-3BE868:lI114|H3BE944
-3BE944:lI116|H3BEA28
-3BEA28:lI120|N
-3BE798:lH3BE878|H3BE884
-3BE878:t2:H3BE954,H3BE95C
-3BE95C:lI116|H3BEA40
-3BEA40:lI101|H3BEB24
-3BEB24:lI120|H3BEC00
-3BEC00:lI116|H3BECDC
-3BECDC:lI47|H3BEDB8
-3BEDB8:lI112|H3BEE94
-3BEE94:lI108|H3BEF60
-3BEF60:lI97|H3BF02C
-3BF02C:lI105|H3BF0F8
-3BF0F8:lI110|N
-3BE954:lI116|H3BEA38
-3BEA38:lI120|H3BEB1C
-3BEB1C:lI116|N
-3BE884:lH3BE964|H3BE970
-3BE964:t2:H3BEA48,H3BEA50
-3BEA50:lI116|H3BEB34
-3BEB34:lI101|H3BEC10
-3BEC10:lI120|H3BECEC
-3BECEC:lI116|H3BEDC8
-3BEDC8:lI47|H3BEE9C
-3BEE9C:lI120|H3BEF68
-3BEF68:lI45|H3BF034
-3BF034:lI115|H3BF100
-3BF100:lI101|H3BF1BC
-3BF1BC:lI114|H3BF280
-3BF280:lI118|H3BF32C
-3BF32C:lI101|H3BF3D8
-3BF3D8:lI114|H3BF48C
-3BF48C:lI45|H3BF548
-3BF548:lI112|H3BF60C
-3BF60C:lI97|H3BF6E0
-3BF6E0:lI114|H3BF7B4
-3BF7B4:lI115|H3BF888
-3BF888:lI101|H3BF96C
-3BF96C:lI100|H3BFA48
-3BFA48:lI45|H3BFB1C
-3BFB1C:lI104|H3BFBF0
-3BFBF0:lI116|H3BFCBC
-3BFCBC:lI109|H3BFD80
-3BFD80:lI108|N
-3BEA48:lI115|H3BEB2C
-3BEB2C:lI104|H3BEC08
-3BEC08:lI116|H3BECE4
-3BECE4:lI109|H3BEDC0
-3BEDC0:lI108|N
-3BE970:lH3BEA58|H3BEA64
-3BEA58:t2:H3BEB3C,H3BEB44
-3BEB44:lI116|H3BEC20
-3BEC20:lI101|H3BECFC
-3BECFC:lI120|H3BEDD8
-3BEDD8:lI116|H3BEEA4
-3BEEA4:lI47|H3BEF70
-3BEF70:lI104|H3BF03C
-3BF03C:lI116|H3BF108
-3BF108:lI109|H3BF1C4
-3BF1C4:lI108|N
-3BEB3C:lI104|H3BEC18
-3BEC18:lI116|H3BECF4
-3BECF4:lI109|H3BEDD0
-3BEDD0:lI108|N
-3BEA64:lH3BEB4C|H3BEB58
-3BEB4C:t2:H3BEC28,H3BEC30
-3BEC30:lI116|H3BED0C
-3BED0C:lI101|H3BEDE8
-3BEDE8:lI120|H3BEEAC
-3BEEAC:lI116|H3BEF78
-3BEF78:lI47|H3BF044
-3BF044:lI104|H3BF110
-3BF110:lI116|H3BF1CC
-3BF1CC:lI109|H3BF288
-3BF288:lI108|N
-3BEC28:lI104|H3BED04
-3BED04:lI116|H3BEDE0
-3BEDE0:lI109|N
-3BEB58:lH3BEC38|H3BEC44
-3BEC38:t2:H3BED14,H3BED1C
-3BED1C:lI105|H3BEDF8
-3BEDF8:lI109|H3BEEBC
-3BEEBC:lI97|H3BEF80
-3BEF80:lI103|H3BF04C
-3BF04C:lI101|H3BF118
-3BF118:lI47|H3BF1D4
-3BF1D4:lI120|H3BF290
-3BF290:lI45|H3BF334
-3BF334:lI120|H3BF3E0
-3BF3E0:lI119|H3BF494
-3BF494:lI105|H3BF550
-3BF550:lI110|H3BF614
-3BF614:lI100|H3BF6E8
-3BF6E8:lI111|H3BF7BC
-3BF7BC:lI119|H3BF890
-3BF890:lI100|H3BF974
-3BF974:lI117|H3BFA50
-3BFA50:lI109|H3BFB24
-3BFB24:lI112|N
-3BED14:lI120|H3BEDF0
-3BEDF0:lI119|H3BEEB4
-3BEEB4:lI100|N
-3BEC44:lH3BED24|H3BED30
-3BED24:t2:H3BEE00,H3BEE08
-3BEE08:lI105|H3BEECC
-3BEECC:lI109|H3BEF90
-3BEF90:lI97|H3BF054
-3BF054:lI103|H3BF120
-3BF120:lI101|H3BF1DC
-3BF1DC:lI47|H3BF298
-3BF298:lI120|H3BF33C
-3BF33C:lI45|H3BF3E8
-3BF3E8:lI120|H3BF49C
-3BF49C:lI112|H3BF558
-3BF558:lI105|H3BF61C
-3BF61C:lI120|H3BF6F0
-3BF6F0:lI109|H3BF7C4
-3BF7C4:lI97|H3BF898
-3BF898:lI112|N
-3BEE00:lI120|H3BEEC4
-3BEEC4:lI112|H3BEF88
-3BEF88:lI109|N
-3BED30:lH3BEE10|H3BEE1C
-3BEE10:t2:H3BEED4,H3BEEDC
-3BEEDC:lI105|H3BEFA0
-3BEFA0:lI109|H3BF064
-3BF064:lI97|H3BF128
-3BF128:lI103|H3BF1E4
-3BF1E4:lI101|H3BF2A0
-3BF2A0:lI47|H3BF344
-3BF344:lI120|H3BF3F0
-3BF3F0:lI45|H3BF4A4
-3BF4A4:lI120|H3BF560
-3BF560:lI98|H3BF624
-3BF624:lI105|H3BF6F8
-3BF6F8:lI116|H3BF7CC
-3BF7CC:lI109|H3BF8A0
-3BF8A0:lI97|H3BF97C
-3BF97C:lI112|N
-3BEED4:lI120|H3BEF98
-3BEF98:lI98|H3BF05C
-3BF05C:lI109|N
-3BEE1C:lH3BEEE4|H3BEEF0
-3BEEE4:t2:H3BEFA8,H3BEFB0
-3BEFB0:lI105|H3BF074
-3BF074:lI109|H3BF138
-3BF138:lI97|H3BF1EC
-3BF1EC:lI103|H3BF2A8
-3BF2A8:lI101|H3BF34C
-3BF34C:lI47|H3BF3F8
-3BF3F8:lI120|H3BF4AC
-3BF4AC:lI45|H3BF568
-3BF568:lI114|H3BF62C
-3BF62C:lI103|H3BF700
-3BF700:lI98|N
-3BEFA8:lI114|H3BF06C
-3BF06C:lI103|H3BF130
-3BF130:lI98|N
-3BEEF0:lH3BEFB8|H3BEFC4
-3BEFB8:t2:H3BF07C,H3BF084
-3BF084:lI105|H3BF148
-3BF148:lI109|H3BF1FC
-3BF1FC:lI97|H3BF2B0
-3BF2B0:lI103|H3BF354
-3BF354:lI101|H3BF400
-3BF400:lI47|H3BF4B4
-3BF4B4:lI120|H3BF570
-3BF570:lI45|H3BF634
-3BF634:lI112|H3BF708
-3BF708:lI111|H3BF7D4
-3BF7D4:lI114|H3BF8A8
-3BF8A8:lI116|H3BF984
-3BF984:lI97|H3BFA58
-3BFA58:lI98|H3BFB2C
-3BFB2C:lI108|H3BFBF8
-3BFBF8:lI101|H3BFCC4
-3BFCC4:lI45|H3BFD88
-3BFD88:lI112|H3BFE44
-3BFE44:lI105|H3BFEF0
-3BFEF0:lI120|H3BFFA4
-3BFFA4:lI109|H3C0050
-3C0050:lI97|H3C00FC
-3C00FC:lI112|N
-3BF07C:lI112|H3BF140
-3BF140:lI112|H3BF1F4
-3BF1F4:lI109|N
-3BEFC4:lH3BF08C|H3BF098
-3BF08C:t2:H3BF150,H3BF158
-3BF158:lI105|H3BF20C
-3BF20C:lI109|H3BF2C0
-3BF2C0:lI97|H3BF35C
-3BF35C:lI103|H3BF408
-3BF408:lI101|H3BF4BC
-3BF4BC:lI47|H3BF578
-3BF578:lI120|H3BF63C
-3BF63C:lI45|H3BF710
-3BF710:lI112|H3BF7DC
-3BF7DC:lI111|H3BF8B0
-3BF8B0:lI114|H3BF98C
-3BF98C:lI116|H3BFA60
-3BFA60:lI97|H3BFB34
-3BFB34:lI98|H3BFC00
-3BFC00:lI108|H3BFCCC
-3BFCCC:lI101|H3BFD90
-3BFD90:lI45|H3BFE4C
-3BFE4C:lI103|H3BFEF8
-3BFEF8:lI114|H3BFFAC
-3BFFAC:lI97|H3C0058
-3C0058:lI121|H3C0104
-3C0104:lI109|H3C01A8
-3C01A8:lI97|H3C025C
-3C025C:lI112|N
-3BF150:lI112|H3BF204
-3BF204:lI103|H3BF2B8
-3BF2B8:lI109|N
-3BF098:lH3BF160|H3BF16C
-3BF160:t2:H3BF214,H3BF21C
-3BF21C:lI105|H3BF2D0
-3BF2D0:lI109|H3BF36C
-3BF36C:lI97|H3BF410
-3BF410:lI103|H3BF4C4
-3BF4C4:lI101|H3BF580
-3BF580:lI47|H3BF644
-3BF644:lI120|H3BF718
-3BF718:lI45|H3BF7E4
-3BF7E4:lI112|H3BF8B8
-3BF8B8:lI111|H3BF994
-3BF994:lI114|H3BFA68
-3BFA68:lI116|H3BFB3C
-3BFB3C:lI97|H3BFC08
-3BFC08:lI98|H3BFCD4
-3BFCD4:lI108|H3BFD98
-3BFD98:lI101|H3BFE54
-3BFE54:lI45|H3BFF00
-3BFF00:lI98|H3BFFB4
-3BFFB4:lI105|H3C0060
-3C0060:lI116|H3C010C
-3C010C:lI109|H3C01B0
-3C01B0:lI97|H3C0264
-3C0264:lI112|N
-3BF214:lI112|H3BF2C8
-3BF2C8:lI98|H3BF364
-3BF364:lI109|N
-3BF16C:lH3BF224|H3BF230
-3BF224:t2:H3BF2D8,H3BF2E0
-3BF2E0:lI105|H3BF37C
-3BF37C:lI109|H3BF420
-3BF420:lI97|H3BF4CC
-3BF4CC:lI103|H3BF588
-3BF588:lI101|H3BF64C
-3BF64C:lI47|H3BF720
-3BF720:lI120|H3BF7EC
-3BF7EC:lI45|H3BF8C0
-3BF8C0:lI112|H3BF99C
-3BF99C:lI111|H3BFA70
-3BFA70:lI114|H3BFB44
-3BFB44:lI116|H3BFC10
-3BFC10:lI97|H3BFCDC
-3BFCDC:lI98|H3BFDA0
-3BFDA0:lI108|H3BFE5C
-3BFE5C:lI101|H3BFF08
-3BFF08:lI45|H3BFFBC
-3BFFBC:lI97|H3C0068
-3C0068:lI110|H3C0114
-3C0114:lI121|H3C01B8
-3C01B8:lI109|H3C026C
-3C026C:lI97|H3C0318
-3C0318:lI112|N
-3BF2D8:lI112|H3BF374
-3BF374:lI110|H3BF418
-3BF418:lI109|N
-3BF230:lH3BF2E8|H3BF2F4
-3BF2E8:t2:H3BF384,H3BF38C
-3BF38C:lI105|H3BF430
-3BF430:lI109|H3BF4DC
-3BF4DC:lI97|H3BF590
-3BF590:lI103|H3BF654
-3BF654:lI101|H3BF728
-3BF728:lI47|H3BF7F4
-3BF7F4:lI120|H3BF8C8
-3BF8C8:lI45|H3BF9A4
-3BF9A4:lI99|H3BFA78
-3BFA78:lI109|H3BFB4C
-3BFB4C:lI117|H3BFC18
-3BFC18:lI45|H3BFCE4
-3BFCE4:lI114|H3BFDA8
-3BFDA8:lI97|H3BFE64
-3BFE64:lI115|H3BFF10
-3BFF10:lI116|H3BFFC4
-3BFFC4:lI101|H3C0070
-3C0070:lI114|N
-3BF384:lI114|H3BF428
-3BF428:lI97|H3BF4D4
-3BF4D4:lI115|N
-3BF2F4:lH3BF394|H3BF3A0
-3BF394:t2:H3BF438,H3BF440
-3BF440:lI105|H3BF4EC
-3BF4EC:lI109|H3BF5A0
-3BF5A0:lI97|H3BF664
-3BF664:lI103|H3BF730
-3BF730:lI101|H3BF7FC
-3BF7FC:lI47|H3BF8D0
-3BF8D0:lI116|H3BF9AC
-3BF9AC:lI105|H3BFA80
-3BFA80:lI102|H3BFB54
-3BFB54:lI102|N
-3BF438:lI116|H3BF4E4
-3BF4E4:lI105|H3BF598
-3BF598:lI102|H3BF65C
-3BF65C:lI102|N
-3BF3A0:lH3BF448|H3BF454
-3BF448:t2:H3BF4F4,H3BF4FC
-3BF4FC:lI105|H3BF5B0
-3BF5B0:lI109|H3BF674
-3BF674:lI97|H3BF738
-3BF738:lI103|H3BF804
-3BF804:lI101|H3BF8D8
-3BF8D8:lI47|H3BF9B4
-3BF9B4:lI116|H3BFA88
-3BFA88:lI105|H3BFB5C
-3BFB5C:lI102|H3BFC20
-3BFC20:lI102|N
-3BF4F4:lI116|H3BF5A8
-3BF5A8:lI105|H3BF66C
-3BF66C:lI102|N
-3BF454:lH3BF504|H3BF510
-3BF504:t2:H3BF5B8,H3BF5C0
-3BF5C0:lI105|H3BF684
-3BF684:lI109|H3BF748
-3BF748:lI97|H3BF80C
-3BF80C:lI103|H3BF8E0
-3BF8E0:lI101|H3BF9BC
-3BF9BC:lI47|H3BFA90
-3BFA90:lI112|H3BFB64
-3BFB64:lI110|H3BFC28
-3BFC28:lI103|N
-3BF5B8:lI112|H3BF67C
-3BF67C:lI110|H3BF740
-3BF740:lI103|N
-3BF510:lH3BF5C8|H3BF5D4
-3BF5C8:t2:H3BF68C,H3BF694
-3BF694:lI105|H3BF758
-3BF758:lI109|H3BF81C
-3BF81C:lI97|H3BF8F0
-3BF8F0:lI103|H3BF9C4
-3BF9C4:lI101|H3BFA98
-3BFA98:lI47|H3BFB6C
-3BFB6C:lI106|H3BFC30
-3BFC30:lI112|H3BFCEC
-3BFCEC:lI101|H3BFDB0
-3BFDB0:lI103|N
-3BF68C:lI106|H3BF750
-3BF750:lI112|H3BF814
-3BF814:lI101|H3BF8E8
-3BF8E8:lI103|N
-3BF5D4:lH3BF69C|H3BF6A8
-3BF69C:t2:H3BF760,H3BF768
-3BF768:lI105|H3BF82C
-3BF82C:lI109|H3BF900
-3BF900:lI97|H3BF9CC
-3BF9CC:lI103|H3BFAA0
-3BFAA0:lI101|H3BFB74
-3BFB74:lI47|H3BFC38
-3BFC38:lI106|H3BFCF4
-3BFCF4:lI112|H3BFDB8
-3BFDB8:lI101|H3BFE6C
-3BFE6C:lI103|N
-3BF760:lI106|H3BF824
-3BF824:lI112|H3BF8F8
-3BF8F8:lI103|N
-3BF6A8:lH3BF770|H3BF77C
-3BF770:t2:H3BF834,H3BF83C
-3BF83C:lI105|H3BF910
-3BF910:lI109|H3BF9DC
-3BF9DC:lI97|H3BFAA8
-3BFAA8:lI103|H3BFB7C
-3BFB7C:lI101|H3BFC40
-3BFC40:lI47|H3BFCFC
-3BFCFC:lI106|H3BFDC0
-3BFDC0:lI112|H3BFE74
-3BFE74:lI101|H3BFF18
-3BFF18:lI103|N
-3BF834:lI106|H3BF908
-3BF908:lI112|H3BF9D4
-3BF9D4:lI101|N
-3BF77C:lH3BF844|H3BF850
-3BF844:t2:H3BF918,H3BF920
-3BF920:lI105|H3BF9EC
-3BF9EC:lI109|H3BFAB8
-3BFAB8:lI97|H3BFB84
-3BFB84:lI103|H3BFC48
-3BFC48:lI101|H3BFD04
-3BFD04:lI47|H3BFDC8
-3BFDC8:lI105|H3BFE7C
-3BFE7C:lI101|H3BFF20
-3BFF20:lI102|N
-3BF918:lI105|H3BF9E4
-3BF9E4:lI101|H3BFAB0
-3BFAB0:lI102|N
-3BF850:lH3BF928|H3BF934
-3BF928:t2:H3BF9F4,H3BF9FC
-3BF9FC:lI105|H3BFAC8
-3BFAC8:lI109|H3BFB94
-3BFB94:lI97|H3BFC50
-3BFC50:lI103|H3BFD0C
-3BFD0C:lI101|H3BFDD0
-3BFDD0:lI47|H3BFE84
-3BFE84:lI103|H3BFF28
-3BFF28:lI105|H3BFFCC
-3BFFCC:lI102|N
-3BF9F4:lI103|H3BFAC0
-3BFAC0:lI105|H3BFB8C
-3BFB8C:lI102|N
-3BF934:lH3BFA04|H3BFA10
-3BFA04:t2:H3BFAD0,H3BFAD8
-3BFAD8:lI99|H3BFBA4
-3BFBA4:lI104|H3BFC60
-3BFC60:lI101|H3BFD14
-3BFD14:lI109|H3BFDD8
-3BFDD8:lI105|H3BFE8C
-3BFE8C:lI99|H3BFF30
-3BFF30:lI97|H3BFFD4
-3BFFD4:lI108|H3C0078
-3C0078:lI47|H3C011C
-3C011C:lI120|H3C01C0
-3C01C0:lI45|H3C0274
-3C0274:lI112|H3C0320
-3C0320:lI100|H3C03CC
-3C03CC:lI98|N
-3BFAD0:lI112|H3BFB9C
-3BFB9C:lI100|H3BFC58
-3BFC58:lI98|N
-3BFA10:lH3BFAE0|H3BFAEC
-3BFAE0:t2:H3BFBAC,H3BFBB4
-3BFBB4:lI99|H3BFC70
-3BFC70:lI104|H3BFD24
-3BFD24:lI101|H3BFDE0
-3BFDE0:lI109|H3BFE94
-3BFE94:lI105|H3BFF38
-3BFF38:lI99|H3BFFDC
-3BFFDC:lI97|H3C0080
-3C0080:lI108|H3C0124
-3C0124:lI47|H3C01C8
-3C01C8:lI120|H3C027C
-3C027C:lI45|H3C0328
-3C0328:lI112|H3C03D4
-3C03D4:lI100|H3C0460
-3C0460:lI98|N
-3BFBAC:lI120|H3BFC68
-3BFC68:lI121|H3BFD1C
-3BFD1C:lI122|N
-3BFAEC:lH3BFBBC|H3BFBC8
-3BFBBC:t2:H3BFC78,H3BFC80
-3BFC80:lI97|H3BFD34
-3BFD34:lI117|H3BFDF0
-3BFDF0:lI100|H3BFE9C
-3BFE9C:lI105|H3BFF40
-3BFF40:lI111|H3BFFE4
-3BFFE4:lI47|H3C0088
-3C0088:lI120|H3C012C
-3C012C:lI45|H3C01D0
-3C01D0:lI119|H3C0284
-3C0284:lI97|H3C0330
-3C0330:lI118|N
-3BFC78:lI119|H3BFD2C
-3BFD2C:lI97|H3BFDE8
-3BFDE8:lI118|N
-3BFBC8:lH3BFC88|H3BFC94
-3BFC88:t2:H3BFD3C,H3BFD44
-3BFD44:lI97|H3BFE00
-3BFE00:lI117|H3BFEA4
-3BFEA4:lI100|H3BFF48
-3BFF48:lI105|H3BFFEC
-3BFFEC:lI111|H3C0090
-3C0090:lI47|H3C0134
-3C0134:lI120|H3C01D8
-3C01D8:lI45|H3C028C
-3C028C:lI114|H3C0338
-3C0338:lI101|H3C03DC
-3C03DC:lI97|H3C0468
-3C0468:lI108|H3C04FC
-3C04FC:lI97|H3C0598
-3C0598:lI117|H3C063C
-3C063C:lI100|H3C06E8
-3C06E8:lI105|H3C0794
-3C0794:lI111|N
-3BFD3C:lI114|H3BFDF8
-3BFDF8:lI97|N
-3BFC94:lH3BFD4C|H3BFD58
-3BFD4C:t2:H3BFE08,H3BFE10
-3BFE10:lI97|H3BFEB4
-3BFEB4:lI117|H3BFF58
-3BFF58:lI100|H3BFFF4
-3BFFF4:lI105|H3C0098
-3C0098:lI111|H3C013C
-3C013C:lI47|H3C01E0
-3C01E0:lI120|H3C0294
-3C0294:lI45|H3C0340
-3C0340:lI112|H3C03E4
-3C03E4:lI110|H3C0470
-3C0470:lI45|H3C0504
-3C0504:lI114|H3C05A0
-3C05A0:lI101|H3C0644
-3C0644:lI97|H3C06F0
-3C06F0:lI108|H3C079C
-3C079C:lI97|H3C0838
-3C0838:lI117|H3C08C4
-3C08C4:lI100|H3C0958
-3C0958:lI105|H3C09EC
-3C09EC:lI111|H3C0A88
-3C0A88:lI45|H3C0B2C
-3C0B2C:lI112|H3C0BD0
-3C0BD0:lI108|H3C0C84
-3C0C84:lI117|H3C0D38
-3C0D38:lI103|H3C0DEC
-3C0DEC:lI105|H3C0EA0
-3C0EA0:lI110|N
-3BFE08:lI114|H3BFEAC
-3BFEAC:lI112|H3BFF50
-3BFF50:lI109|N
-3BFD58:lH3BFE18|H3BFE24
-3BFE18:t2:H3BFEBC,H3BFEC4
-3BFEC4:lI97|H3BFF68
-3BFF68:lI117|H3C0004
-3C0004:lI100|H3C00A0
-3C00A0:lI105|H3C0144
-3C0144:lI111|H3C01E8
-3C01E8:lI47|H3C029C
-3C029C:lI120|H3C0348
-3C0348:lI45|H3C03EC
-3C03EC:lI112|H3C0478
-3C0478:lI110|H3C050C
-3C050C:lI45|H3C05A8
-3C05A8:lI114|H3C064C
-3C064C:lI101|H3C06F8
-3C06F8:lI97|H3C07A4
-3C07A4:lI108|H3C0840
-3C0840:lI97|H3C08CC
-3C08CC:lI117|H3C0960
-3C0960:lI100|H3C09F4
-3C09F4:lI105|H3C0A90
-3C0A90:lI111|N
-3BFEBC:lI114|H3BFF60
-3BFF60:lI97|H3BFFFC
-3BFFFC:lI109|N
-3BFE24:lH3BFECC|H3BFED8
-3BFECC:t2:H3BFF70,H3BFF78
-3BFF78:lI97|H3C0014
-3C0014:lI117|H3C00B0
-3C00B0:lI100|H3C014C
-3C014C:lI105|H3C01F0
-3C01F0:lI111|H3C02A4
-3C02A4:lI47|H3C0350
-3C0350:lI120|H3C03F4
-3C03F4:lI45|H3C0480
-3C0480:lI97|H3C0514
-3C0514:lI105|H3C05B0
-3C05B0:lI102|H3C0654
-3C0654:lI102|N
-3BFF70:lI97|H3C000C
-3C000C:lI105|H3C00A8
-3C00A8:lI102|N
-3BFED8:lH3BFF80|H3BFF8C
-3BFF80:t2:H3C001C,H3C0024
-3C0024:lI97|H3C00C0
-3C00C0:lI117|H3C015C
-3C015C:lI100|H3C0200
-3C0200:lI105|H3C02AC
-3C02AC:lI111|H3C0358
-3C0358:lI47|H3C03FC
-3C03FC:lI120|H3C0488
-3C0488:lI45|H3C051C
-3C051C:lI97|H3C05B8
-3C05B8:lI105|H3C065C
-3C065C:lI102|H3C0700
-3C0700:lI102|N
-3C001C:lI97|H3C00B8
-3C00B8:lI105|H3C0154
-3C0154:lI102|H3C01F8
-3C01F8:lI102|N
-3BFF8C:lH3C002C|H3C0038
-3C002C:t2:H3C00C8,H3C00D0
-3C00D0:lI97|H3C016C
-3C016C:lI117|H3C0210
-3C0210:lI100|H3C02BC
-3C02BC:lI105|H3C0360
-3C0360:lI111|H3C0404
-3C0404:lI47|H3C0490
-3C0490:lI120|H3C0524
-3C0524:lI45|H3C05C0
-3C05C0:lI97|H3C0664
-3C0664:lI105|H3C0708
-3C0708:lI102|H3C07AC
-3C07AC:lI102|N
-3C00C8:lI97|H3C0164
-3C0164:lI105|H3C0208
-3C0208:lI102|H3C02B4
-3C02B4:lI99|N
-3C0038:lH3C00D8|H3C00E4
-3C00D8:t2:H3C0174,H3C017C
-3C017C:lI97|H3C0220
-3C0220:lI117|H3C02CC
-3C02CC:lI100|H3C0370
-3C0370:lI105|H3C040C
-3C040C:lI111|H3C0498
-3C0498:lI47|H3C052C
-3C052C:lI109|H3C05C8
-3C05C8:lI112|H3C066C
-3C066C:lI101|H3C0710
-3C0710:lI103|N
-3C0174:lI109|H3C0218
-3C0218:lI112|H3C02C4
-3C02C4:lI103|H3C0368
-3C0368:lI97|N
-3C00E4:lH3C0184|H3C0190
-3C0184:t2:H3C0228,H3C0230
-3C0230:lI97|H3C02DC
-3C02DC:lI117|H3C0380
-3C0380:lI100|H3C0414
-3C0414:lI105|H3C04A0
-3C04A0:lI111|H3C0534
-3C0534:lI47|H3C05D0
-3C05D0:lI109|H3C0674
-3C0674:lI112|H3C0718
-3C0718:lI101|H3C07B4
-3C07B4:lI103|N
-3C0228:lI109|H3C02D4
-3C02D4:lI112|H3C0378
-3C0378:lI50|N
-3C0190:lH3C0238|H3C0244
-3C0238:t2:H3C02E4,H3C02EC
-3C02EC:lI97|H3C0390
-3C0390:lI117|H3C041C
-3C041C:lI100|H3C04A8
-3C04A8:lI105|H3C053C
-3C053C:lI111|H3C05D8
-3C05D8:lI47|H3C067C
-3C067C:lI98|H3C0720
-3C0720:lI97|H3C07BC
-3C07BC:lI115|H3C0848
-3C0848:lI105|H3C08D4
-3C08D4:lI99|N
-3C02E4:lI97|H3C0388
-3C0388:lI117|N
-3C0244:lH3C02F4|H3C0300
-3C02F4:t2:H3C0398,H3C03A0
-3C03A0:lI97|H3C042C
-3C042C:lI117|H3C04B8
-3C04B8:lI100|H3C0544
-3C0544:lI105|H3C05E0
-3C05E0:lI111|H3C0684
-3C0684:lI47|H3C0728
-3C0728:lI98|H3C07C4
-3C07C4:lI97|H3C0850
-3C0850:lI115|H3C08DC
-3C08DC:lI105|H3C0968
-3C0968:lI99|N
-3C0398:lI115|H3C0424
-3C0424:lI110|H3C04B0
-3C04B0:lI100|N
-3C0300:lH3C03A8|H3C03B4
-3C03A8:t2:H3C0434,H3C043C
-3C043C:lI97|H3C04C8
-3C04C8:lI112|H3C0554
-3C0554:lI112|H3C05E8
-3C05E8:lI108|H3C068C
-3C068C:lI105|H3C0730
-3C0730:lI99|H3C07CC
-3C07CC:lI97|H3C0858
-3C0858:lI116|H3C08E4
-3C08E4:lI105|H3C0970
-3C0970:lI111|H3C09FC
-3C09FC:lI110|H3C0A98
-3C0A98:lI47|H3C0B34
-3C0B34:lI122|H3C0BD8
-3C0BD8:lI105|H3C0C8C
-3C0C8C:lI112|N
-3C0434:lI122|H3C04C0
-3C04C0:lI105|H3C054C
-3C054C:lI112|N
-3C03B4:lH3C0444|H3C0450
-3C0444:t2:H3C04D0,H3C04D8
-3C04D8:lI97|H3C0564
-3C0564:lI112|H3C05F8
-3C05F8:lI112|H3C0694
-3C0694:lI108|H3C0738
-3C0738:lI105|H3C07D4
-3C07D4:lI99|H3C0860
-3C0860:lI97|H3C08EC
-3C08EC:lI116|H3C0978
-3C0978:lI105|H3C0A04
-3C0A04:lI111|H3C0AA0
-3C0AA0:lI110|H3C0B3C
-3C0B3C:lI47|H3C0BE0
-3C0BE0:lI120|H3C0C94
-3C0C94:lI45|H3C0D40
-3C0D40:lI119|H3C0DF4
-3C0DF4:lI97|H3C0EA8
-3C0EA8:lI105|H3C0F64
-3C0F64:lI115|H3C1030
-3C1030:lI45|H3C1104
-3C1104:lI115|H3C11D8
-3C11D8:lI111|H3C12A4
-3C12A4:lI117|H3C1378
-3C1378:lI114|H3C1454
-3C1454:lI99|H3C1538
-3C1538:lI101|N
-3C04D0:lI115|H3C055C
-3C055C:lI114|H3C05F0
-3C05F0:lI99|N
-3C0450:lH3C04E0|H3C04EC
-3C04E0:t2:H3C056C,H3C0574
-3C0574:lI97|H3C0608
-3C0608:lI112|H3C06A4
-3C06A4:lI112|H3C0748
-3C0748:lI108|H3C07E4
-3C07E4:lI105|H3C0868
-3C0868:lI99|H3C08F4
-3C08F4:lI97|H3C0980
-3C0980:lI116|H3C0A0C
-3C0A0C:lI105|H3C0AA8
-3C0AA8:lI111|H3C0B44
-3C0B44:lI110|H3C0BE8
-3C0BE8:lI47|H3C0C9C
-3C0C9C:lI120|H3C0D48
-3C0D48:lI45|H3C0DFC
-3C0DFC:lI117|H3C0EB0
-3C0EB0:lI115|H3C0F6C
-3C0F6C:lI116|H3C1038
-3C1038:lI97|H3C110C
-3C110C:lI114|N
-3C056C:lI117|H3C0600
-3C0600:lI115|H3C069C
-3C069C:lI116|H3C0740
-3C0740:lI97|H3C07DC
-3C07DC:lI114|N
-3C04EC:lH3C057C|H3C0588
-3C057C:t2:H3C0610,H3C0618
-3C0618:lI97|H3C06B4
-3C06B4:lI112|H3C0750
-3C0750:lI112|H3C07EC
-3C07EC:lI108|H3C0870
-3C0870:lI105|H3C08FC
-3C08FC:lI99|H3C0988
-3C0988:lI97|H3C0A14
-3C0A14:lI116|H3C0AB0
-3C0AB0:lI105|H3C0B4C
-3C0B4C:lI111|H3C0BF0
-3C0BF0:lI110|H3C0CA4
-3C0CA4:lI47|H3C0D50
-3C0D50:lI120|H3C0E04
-3C0E04:lI45|H3C0EB8
-3C0EB8:lI116|H3C0F74
-3C0F74:lI114|H3C1040
-3C1040:lI111|H3C1114
-3C1114:lI102|H3C11E0
-3C11E0:lI102|H3C12AC
-3C12AC:lI45|H3C1380
-3C1380:lI109|H3C145C
-3C145C:lI115|N
-3C0610:lI109|H3C06AC
-3C06AC:lI115|N
-3C0588:lH3C0620|H3C062C
-3C0620:t2:H3C06BC,H3C06C4
-3C06C4:lI97|H3C0760
-3C0760:lI112|H3C07F4
-3C07F4:lI112|H3C0878
-3C0878:lI108|H3C0904
-3C0904:lI105|H3C0990
-3C0990:lI99|H3C0A1C
-3C0A1C:lI97|H3C0AB8
-3C0AB8:lI116|H3C0B54
-3C0B54:lI105|H3C0BF8
-3C0BF8:lI111|H3C0CAC
-3C0CAC:lI110|H3C0D58
-3C0D58:lI47|H3C0E0C
-3C0E0C:lI120|H3C0EC0
-3C0EC0:lI45|H3C0F7C
-3C0F7C:lI116|H3C1048
-3C1048:lI114|H3C111C
-3C111C:lI111|H3C11E8
-3C11E8:lI102|H3C12B4
-3C12B4:lI102|H3C1388
-3C1388:lI45|H3C1464
-3C1464:lI109|H3C1540
-3C1540:lI101|N
-3C06BC:lI109|H3C0758
-3C0758:lI101|N
-3C062C:lH3C06CC|H3C06D8
-3C06CC:t2:H3C0768,H3C0770
-3C0770:lI97|H3C0804
-3C0804:lI112|H3C0888
-3C0888:lI112|H3C090C
-3C090C:lI108|H3C0998
-3C0998:lI105|H3C0A24
-3C0A24:lI99|H3C0AC0
-3C0AC0:lI97|H3C0B5C
-3C0B5C:lI116|H3C0C00
-3C0C00:lI105|H3C0CB4
-3C0CB4:lI111|H3C0D60
-3C0D60:lI110|H3C0E14
-3C0E14:lI47|H3C0EC8
-3C0EC8:lI120|H3C0F84
-3C0F84:lI45|H3C1050
-3C1050:lI116|H3C1124
-3C1124:lI114|H3C11F0
-3C11F0:lI111|H3C12BC
-3C12BC:lI102|H3C1390
-3C1390:lI102|H3C146C
-3C146C:lI45|H3C1548
-3C1548:lI109|H3C161C
-3C161C:lI97|H3C16F0
-3C16F0:lI110|N
-3C0768:lI109|H3C07FC
-3C07FC:lI97|H3C0880
-3C0880:lI110|N
-3C06D8:lH3C0778|H3C0784
-3C0778:t2:H3C080C,H3C0814
-3C0814:lI97|H3C0890
-3C0890:lI112|H3C0914
-3C0914:lI112|H3C09A0
-3C09A0:lI108|H3C0A2C
-3C0A2C:lI105|H3C0AC8
-3C0AC8:lI99|H3C0B64
-3C0B64:lI97|H3C0C08
-3C0C08:lI116|H3C0CBC
-3C0CBC:lI105|H3C0D68
-3C0D68:lI111|H3C0E1C
-3C0E1C:lI110|H3C0ED0
-3C0ED0:lI47|H3C0F8C
-3C0F8C:lI120|H3C1058
-3C1058:lI45|H3C112C
-3C112C:lI116|H3C11F8
-3C11F8:lI114|H3C12C4
-3C12C4:lI111|H3C1398
-3C1398:lI102|H3C1474
-3C1474:lI102|N
-3C080C:lI116|N
-3C0784:lH3C081C|H3C0828
-3C081C:t2:H3C0898,H3C08A0
-3C08A0:lI97|H3C0924
-3C0924:lI112|H3C09A8
-3C09A8:lI112|H3C0A34
-3C0A34:lI108|H3C0AD0
-3C0AD0:lI105|H3C0B6C
-3C0B6C:lI99|H3C0C10
-3C0C10:lI97|H3C0CC4
-3C0CC4:lI116|H3C0D70
-3C0D70:lI105|H3C0E24
-3C0E24:lI111|H3C0ED8
-3C0ED8:lI110|H3C0F94
-3C0F94:lI47|H3C1060
-3C1060:lI120|H3C1134
-3C1134:lI45|H3C1200
-3C1200:lI116|H3C12CC
-3C12CC:lI114|H3C13A0
-3C13A0:lI111|H3C147C
-3C147C:lI102|H3C1550
-3C1550:lI102|N
-3C0898:lI116|H3C091C
-3C091C:lI114|N
-3C0828:lH3C08A8|H3C08B4
-3C08A8:t2:H3C092C,H3C0934
-3C0934:lI97|H3C09B8
-3C09B8:lI112|H3C0A44
-3C0A44:lI112|H3C0AE0
-3C0AE0:lI108|H3C0B74
-3C0B74:lI105|H3C0C18
-3C0C18:lI99|H3C0CCC
-3C0CCC:lI97|H3C0D78
-3C0D78:lI116|H3C0E2C
-3C0E2C:lI105|H3C0EE0
-3C0EE0:lI111|H3C0F9C
-3C0F9C:lI110|H3C1068
-3C1068:lI47|H3C113C
-3C113C:lI120|H3C1208
-3C1208:lI45|H3C12D4
-3C12D4:lI116|H3C13A8
-3C13A8:lI114|H3C1484
-3C1484:lI111|H3C1558
-3C1558:lI102|H3C1624
-3C1624:lI102|N
-3C092C:lI114|H3C09B0
-3C09B0:lI111|H3C0A3C
-3C0A3C:lI102|H3C0AD8
-3C0AD8:lI102|N
-3C08B4:lH3C093C|H3C0948
-3C093C:t2:H3C09C0,H3C09C8
-3C09C8:lI97|H3C0A54
-3C0A54:lI112|H3C0AF0
-3C0AF0:lI112|H3C0B84
-3C0B84:lI108|H3C0C28
-3C0C28:lI105|H3C0CDC
-3C0CDC:lI99|H3C0D88
-3C0D88:lI97|H3C0E34
-3C0E34:lI116|H3C0EE8
-3C0EE8:lI105|H3C0FA4
-3C0FA4:lI111|H3C1070
-3C1070:lI110|H3C1144
-3C1144:lI47|H3C1210
-3C1210:lI120|H3C12DC
-3C12DC:lI45|H3C13B0
-3C13B0:lI116|H3C148C
-3C148C:lI101|H3C1560
-3C1560:lI120|H3C162C
-3C162C:lI105|H3C16F8
-3C16F8:lI110|H3C17BC
-3C17BC:lI102|H3C1880
-3C1880:lI111|N
-3C09C0:lI116|H3C0A4C
-3C0A4C:lI101|H3C0AE8
-3C0AE8:lI120|H3C0B7C
-3C0B7C:lI105|H3C0C20
-3C0C20:lI110|H3C0CD4
-3C0CD4:lI102|H3C0D80
-3C0D80:lI111|N
-3C0948:lH3C09D0|H3C09DC
-3C09D0:t2:H3C0A5C,H3C0A64
-3C0A64:lI97|H3C0B00
-3C0B00:lI112|H3C0B94
-3C0B94:lI112|H3C0C38
-3C0C38:lI108|H3C0CE4
-3C0CE4:lI105|H3C0D90
-3C0D90:lI99|H3C0E3C
-3C0E3C:lI97|H3C0EF0
-3C0EF0:lI116|H3C0FAC
-3C0FAC:lI105|H3C1078
-3C1078:lI111|H3C114C
-3C114C:lI110|H3C1218
-3C1218:lI47|H3C12E4
-3C12E4:lI120|H3C13B8
-3C13B8:lI45|H3C1494
-3C1494:lI116|H3C1568
-3C1568:lI101|H3C1634
-3C1634:lI120|H3C1700
-3C1700:lI105|H3C17C4
-3C17C4:lI110|H3C1888
-3C1888:lI102|H3C1944
-3C1944:lI111|N
-3C0A5C:lI116|H3C0AF8
-3C0AF8:lI101|H3C0B8C
-3C0B8C:lI120|H3C0C30
-3C0C30:lI105|N
-3C09DC:lH3C0A6C|H3C0A78
-3C0A6C:t2:H3C0B08,H3C0B10
-3C0B10:lI97|H3C0BA4
-3C0BA4:lI112|H3C0C48
-3C0C48:lI112|H3C0CEC
-3C0CEC:lI108|H3C0D98
-3C0D98:lI105|H3C0E44
-3C0E44:lI99|H3C0EF8
-3C0EF8:lI97|H3C0FB4
-3C0FB4:lI116|H3C1080
-3C1080:lI105|H3C1154
-3C1154:lI111|H3C1220
-3C1220:lI110|H3C12EC
-3C12EC:lI47|H3C13C0
-3C13C0:lI120|H3C149C
-3C149C:lI45|H3C1570
-3C1570:lI116|H3C163C
-3C163C:lI101|H3C1708
-3C1708:lI120|N
-3C0B08:lI116|H3C0B9C
-3C0B9C:lI101|H3C0C40
-3C0C40:lI120|N
-3C0A78:lH3C0B18|H3C0B24
-3C0B18:t2:H3C0BAC,H3C0BB4
-3C0BB4:lI97|H3C0C58
-3C0C58:lI112|H3C0CFC
-3C0CFC:lI112|H3C0DA0
-3C0DA0:lI108|H3C0E4C
-3C0E4C:lI105|H3C0F00
-3C0F00:lI99|H3C0FBC
-3C0FBC:lI97|H3C1088
-3C1088:lI116|H3C115C
-3C115C:lI105|H3C1228
-3C1228:lI111|H3C12F4
-3C12F4:lI110|H3C13C8
-3C13C8:lI47|H3C14A4
-3C14A4:lI120|H3C1578
-3C1578:lI45|H3C1644
-3C1644:lI116|H3C1710
-3C1710:lI99|H3C17CC
-3C17CC:lI108|N
-3C0BAC:lI116|H3C0C50
-3C0C50:lI99|H3C0CF4
-3C0CF4:lI108|N
-3C0B24:lH3C0BBC|H3C0BC8
-3C0BBC:t2:H3C0C60,H3C0C68
-3C0C68:lI97|H3C0D0C
-3C0D0C:lI112|H3C0DB0
-3C0DB0:lI112|H3C0E54
-3C0E54:lI108|H3C0F08
-3C0F08:lI105|H3C0FC4
-3C0FC4:lI99|H3C1090
-3C1090:lI97|H3C1164
-3C1164:lI116|H3C1230
-3C1230:lI105|H3C12FC
-3C12FC:lI111|H3C13D0
-3C13D0:lI110|H3C14AC
-3C14AC:lI47|H3C1580
-3C1580:lI120|H3C164C
-3C164C:lI45|H3C1718
-3C1718:lI116|H3C17D4
-3C17D4:lI97|H3C1890
-3C1890:lI114|N
-3C0C60:lI116|H3C0D04
-3C0D04:lI97|H3C0DA8
-3C0DA8:lI114|N
-3C0BC8:lH3C0C70|H3C0C7C
-3C0C70:t2:H3C0D14,H3C0D1C
-3C0D1C:lI97|H3C0DC0
-3C0DC0:lI112|H3C0E64
-3C0E64:lI112|H3C0F18
-3C0F18:lI108|H3C0FD4
-3C0FD4:lI105|H3C10A0
-3C10A0:lI99|H3C116C
-3C116C:lI97|H3C1238
-3C1238:lI116|H3C1304
-3C1304:lI105|H3C13D8
-3C13D8:lI111|H3C14B4
-3C14B4:lI110|H3C1588
-3C1588:lI47|H3C1654
-3C1654:lI120|H3C1720
-3C1720:lI45|H3C17DC
-3C17DC:lI115|H3C1898
-3C1898:lI118|H3C194C
-3C194C:lI52|H3C1A00
-3C1A00:lI99|H3C1AB4
-3C1AB4:lI114|H3C1B78
-3C1B78:lI99|N
-3C0D14:lI115|H3C0DB8
-3C0DB8:lI118|H3C0E5C
-3C0E5C:lI52|H3C0F10
-3C0F10:lI99|H3C0FCC
-3C0FCC:lI114|H3C1098
-3C1098:lI99|N
-3C0C7C:lH3C0D24|H3C0D30
-3C0D24:t2:H3C0DC8,H3C0DD0
-3C0DD0:lI97|H3C0E74
-3C0E74:lI112|H3C0F28
-3C0F28:lI112|H3C0FE4
-3C0FE4:lI108|H3C10B0
-3C10B0:lI105|H3C117C
-3C117C:lI99|H3C1248
-3C1248:lI97|H3C130C
-3C130C:lI116|H3C13E0
-3C13E0:lI105|H3C14BC
-3C14BC:lI111|H3C1590
-3C1590:lI110|H3C165C
-3C165C:lI47|H3C1728
-3C1728:lI120|H3C17E4
-3C17E4:lI45|H3C18A0
-3C18A0:lI115|H3C1954
-3C1954:lI118|H3C1A08
-3C1A08:lI52|H3C1ABC
-3C1ABC:lI99|H3C1B80
-3C1B80:lI112|H3C1C4C
-3C1C4C:lI105|H3C1D10
-3C1D10:lI111|N
-3C0DC8:lI115|H3C0E6C
-3C0E6C:lI118|H3C0F20
-3C0F20:lI52|H3C0FDC
-3C0FDC:lI99|H3C10A8
-3C10A8:lI112|H3C1174
-3C1174:lI105|H3C1240
-3C1240:lI111|N
-3C0D30:lH3C0DD8|H3C0DE4
-3C0DD8:t2:H3C0E7C,H3C0E84
-3C0E84:lI97|H3C0F38
-3C0F38:lI112|H3C0FF4
-3C0FF4:lI112|H3C10B8
-3C10B8:lI108|H3C1184
-3C1184:lI105|H3C1250
-3C1250:lI99|H3C1314
-3C1314:lI97|H3C13E8
-3C13E8:lI116|H3C14C4
-3C14C4:lI105|H3C1598
-3C1598:lI111|H3C1664
-3C1664:lI110|H3C1730
-3C1730:lI47|H3C17EC
-3C17EC:lI120|H3C18A8
-3C18A8:lI45|H3C195C
-3C195C:lI115|H3C1A10
-3C1A10:lI116|H3C1AC4
-3C1AC4:lI117|H3C1B88
-3C1B88:lI102|H3C1C54
-3C1C54:lI102|H3C1D18
-3C1D18:lI105|H3C1DD4
-3C1DD4:lI116|N
-3C0E7C:lI115|H3C0F30
-3C0F30:lI105|H3C0FEC
-3C0FEC:lI116|N
-3C0DE4:lH3C0E8C|H3C0E98
-3C0E8C:t2:H3C0F40,H3C0F48
-3C0F48:lI97|H3C1004
-3C1004:lI112|H3C10C8
-3C10C8:lI112|H3C1194
-3C1194:lI108|H3C1258
-3C1258:lI105|H3C131C
-3C131C:lI99|H3C13F0
-3C13F0:lI97|H3C14CC
-3C14CC:lI116|H3C15A0
-3C15A0:lI105|H3C166C
-3C166C:lI111|H3C1738
-3C1738:lI110|H3C17F4
-3C17F4:lI47|H3C18B0
-3C18B0:lI120|H3C1964
-3C1964:lI45|H3C1A18
-3C1A18:lI115|H3C1ACC
-3C1ACC:lI104|H3C1B90
-3C1B90:lI97|H3C1C5C
-3C1C5C:lI114|N
-3C0F40:lI115|H3C0FFC
-3C0FFC:lI104|H3C10C0
-3C10C0:lI97|H3C118C
-3C118C:lI114|N
-3C0E98:lH3C0F50|H3C0F5C
-3C0F50:t2:H3C100C,H3C1014
-3C1014:lI97|H3C10D8
-3C10D8:lI112|H3C119C
-3C119C:lI112|H3C1260
-3C1260:lI108|H3C1324
-3C1324:lI105|H3C13F8
-3C13F8:lI99|H3C14D4
-3C14D4:lI97|H3C15A8
-3C15A8:lI116|H3C1674
-3C1674:lI105|H3C1740
-3C1740:lI111|H3C17FC
-3C17FC:lI110|H3C18B8
-3C18B8:lI47|H3C196C
-3C196C:lI120|H3C1A20
-3C1A20:lI45|H3C1AD4
-3C1AD4:lI115|H3C1B98
-3C1B98:lI104|N
-3C100C:lI115|H3C10D0
-3C10D0:lI104|N
-3C0F5C:lH3C101C|H3C1028
-3C101C:t2:H3C10E0,H3C10E8
-3C10E8:lI97|H3C11AC
-3C11AC:lI112|H3C1268
-3C1268:lI112|H3C132C
-3C132C:lI108|H3C1400
-3C1400:lI105|H3C14DC
-3C14DC:lI99|H3C15B0
-3C15B0:lI97|H3C167C
-3C167C:lI116|H3C1748
-3C1748:lI105|H3C1804
-3C1804:lI111|H3C18C0
-3C18C0:lI110|H3C1974
-3C1974:lI47|H3C1A28
-3C1A28:lI120|H3C1ADC
-3C1ADC:lI45|H3C1BA0
-3C1BA0:lI110|H3C1C64
-3C1C64:lI101|H3C1D20
-3C1D20:lI116|H3C1DDC
-3C1DDC:lI99|H3C1E98
-3C1E98:lI100|H3C1F5C
-3C1F5C:lI102|N
-3C10E0:lI110|H3C11A4
-3C11A4:lI99|N
-3C1028:lH3C10F0|H3C10FC
-3C10F0:t2:H3C11B4,H3C11BC
-3C11BC:lI97|H3C1278
-3C1278:lI112|H3C133C
-3C133C:lI112|H3C1408
-3C1408:lI108|H3C14E4
-3C14E4:lI105|H3C15B8
-3C15B8:lI99|H3C1684
-3C1684:lI97|H3C1750
-3C1750:lI116|H3C180C
-3C180C:lI105|H3C18C8
-3C18C8:lI111|H3C197C
-3C197C:lI110|H3C1A30
-3C1A30:lI47|H3C1AE4
-3C1AE4:lI120|H3C1BA8
-3C1BA8:lI45|H3C1C6C
-3C1C6C:lI110|H3C1D28
-3C1D28:lI101|H3C1DE4
-3C1DE4:lI116|H3C1EA0
-3C1EA0:lI99|H3C1F64
-3C1F64:lI100|H3C2018
-3C2018:lI102|N
-3C11B4:lI99|H3C1270
-3C1270:lI100|H3C1334
-3C1334:lI102|N
-3C10FC:lH3C11C4|H3C11D0
-3C11C4:t2:H3C1280,H3C1288
-3C1288:lI97|H3C134C
-3C134C:lI112|H3C1418
-3C1418:lI112|H3C14EC
-3C14EC:lI108|H3C15C0
-3C15C0:lI105|H3C168C
-3C168C:lI99|H3C1758
-3C1758:lI97|H3C1814
-3C1814:lI116|H3C18D0
-3C18D0:lI105|H3C1984
-3C1984:lI111|H3C1A38
-3C1A38:lI110|H3C1AEC
-3C1AEC:lI47|H3C1BB0
-3C1BB0:lI120|H3C1C74
-3C1C74:lI45|H3C1D30
-3C1D30:lI109|H3C1DEC
-3C1DEC:lI105|H3C1EA8
-3C1EA8:lI102|N
-3C1280:lI109|H3C1344
-3C1344:lI105|H3C1410
-3C1410:lI102|N
-3C11D0:lH3C1290|H3C129C
-3C1290:t2:H3C1354,H3C135C
-3C135C:lI97|H3C1428
-3C1428:lI112|H3C14FC
-3C14FC:lI112|H3C15D0
-3C15D0:lI108|H3C169C
-3C169C:lI105|H3C1760
-3C1760:lI99|H3C181C
-3C181C:lI97|H3C18D8
-3C18D8:lI116|H3C198C
-3C198C:lI105|H3C1A40
-3C1A40:lI111|H3C1AF4
-3C1AF4:lI110|H3C1BB8
-3C1BB8:lI47|H3C1C7C
-3C1C7C:lI120|H3C1D38
-3C1D38:lI45|H3C1DF4
-3C1DF4:lI108|H3C1EB0
-3C1EB0:lI97|H3C1F6C
-3C1F6C:lI116|H3C2020
-3C2020:lI101|H3C20DC
-3C20DC:lI120|N
-3C1354:lI108|H3C1420
-3C1420:lI97|H3C14F4
-3C14F4:lI116|H3C15C8
-3C15C8:lI101|H3C1694
-3C1694:lI120|N
-3C129C:lH3C1364|H3C1370
-3C1364:t2:H3C1430,H3C1438
-3C1438:lI97|H3C150C
-3C150C:lI112|H3C15E0
-3C15E0:lI112|H3C16A4
-3C16A4:lI108|H3C1768
-3C1768:lI105|H3C1824
-3C1824:lI99|H3C18E0
-3C18E0:lI97|H3C1994
-3C1994:lI116|H3C1A48
-3C1A48:lI105|H3C1AFC
-3C1AFC:lI111|H3C1BC0
-3C1BC0:lI110|H3C1C84
-3C1C84:lI47|H3C1D40
-3C1D40:lI120|H3C1DFC
-3C1DFC:lI45|H3C1EB8
-3C1EB8:lI107|H3C1F74
-3C1F74:lI111|H3C2028
-3C2028:lI97|H3C20E4
-3C20E4:lI110|N
-3C1430:lI115|H3C1504
-3C1504:lI107|H3C15D8
-3C15D8:lI112|N
-3C1370:lH3C1440|H3C144C
-3C1440:t2:H3C1514,H3C151C
-3C151C:lI97|H3C15F0
-3C15F0:lI112|H3C16B4
-3C16B4:lI112|H3C1770
-3C1770:lI108|H3C182C
-3C182C:lI105|H3C18E8
-3C18E8:lI99|H3C199C
-3C199C:lI97|H3C1A50
-3C1A50:lI116|H3C1B04
-3C1B04:lI105|H3C1BC8
-3C1BC8:lI111|H3C1C8C
-3C1C8C:lI110|H3C1D48
-3C1D48:lI47|H3C1E04
-3C1E04:lI120|H3C1EC0
-3C1EC0:lI45|H3C1F7C
-3C1F7C:lI107|H3C2030
-3C2030:lI111|H3C20EC
-3C20EC:lI97|H3C21A0
-3C21A0:lI110|N
-3C1514:lI115|H3C15E8
-3C15E8:lI107|H3C16AC
-3C16AC:lI100|N
-3C144C:lH3C1524|H3C1530
-3C1524:t2:H3C15F8,H3C1600
-3C1600:lI97|H3C16C4
-3C16C4:lI112|H3C1780
-3C1780:lI112|H3C1834
-3C1834:lI108|H3C18F0
-3C18F0:lI105|H3C19A4
-3C19A4:lI99|H3C1A58
-3C1A58:lI97|H3C1B0C
-3C1B0C:lI116|H3C1BD0
-3C1BD0:lI105|H3C1C94
-3C1C94:lI111|H3C1D50
-3C1D50:lI110|H3C1E0C
-3C1E0C:lI47|H3C1EC8
-3C1EC8:lI120|H3C1F84
-3C1F84:lI45|H3C2038
-3C2038:lI107|H3C20F4
-3C20F4:lI111|H3C21A8
-3C21A8:lI97|H3C225C
-3C225C:lI110|N
-3C15F8:lI115|H3C16BC
-3C16BC:lI107|H3C1778
-3C1778:lI116|N
-3C1530:lH3C1608|H3C1614
-3C1608:t2:H3C16CC,H3C16D4
-3C16D4:lI97|H3C1790
-3C1790:lI112|H3C1844
-3C1844:lI112|H3C18F8
-3C18F8:lI108|H3C19AC
-3C19AC:lI105|H3C1A60
-3C1A60:lI99|H3C1B14
-3C1B14:lI97|H3C1BD8
-3C1BD8:lI116|H3C1C9C
-3C1C9C:lI105|H3C1D58
-3C1D58:lI111|H3C1E14
-3C1E14:lI110|H3C1ED0
-3C1ED0:lI47|H3C1F8C
-3C1F8C:lI120|H3C2040
-3C2040:lI45|H3C20FC
-3C20FC:lI107|H3C21B0
-3C21B0:lI111|H3C2264
-3C2264:lI97|H3C2320
-3C2320:lI110|N
-3C16CC:lI115|H3C1788
-3C1788:lI107|H3C183C
-3C183C:lI109|N
-3C1614:lH3C16DC|H3C16E8
-3C16DC:t2:H3C1798,H3C17A0
-3C17A0:lI97|H3C1854
-3C1854:lI112|H3C1908
-3C1908:lI112|H3C19B4
-3C19B4:lI108|H3C1A68
-3C1A68:lI105|H3C1B1C
-3C1B1C:lI99|H3C1BE0
-3C1BE0:lI97|H3C1CA4
-3C1CA4:lI116|H3C1D60
-3C1D60:lI105|H3C1E1C
-3C1E1C:lI111|H3C1ED8
-3C1ED8:lI110|H3C1F94
-3C1F94:lI47|H3C2048
-3C2048:lI120|H3C2104
-3C2104:lI45|H3C21B8
-3C21B8:lI104|H3C226C
-3C226C:lI116|H3C2328
-3C2328:lI116|H3C23E4
-3C23E4:lI112|H3C2498
-3C2498:lI100|H3C2554
-3C2554:lI45|H3C2610
-3C2610:lI99|H3C26D4
-3C26D4:lI103|H3C2790
-3C2790:lI105|N
-3C1798:lI99|H3C184C
-3C184C:lI103|H3C1900
-3C1900:lI105|N
-3C16E8:lH3C17A8|H3C17B4
-3C17A8:t2:H3C185C,H3C1864
-3C1864:lI97|H3C1918
-3C1918:lI112|H3C19C4
-3C19C4:lI112|H3C1A70
-3C1A70:lI108|H3C1B24
-3C1B24:lI105|H3C1BE8
-3C1BE8:lI99|H3C1CAC
-3C1CAC:lI97|H3C1D68
-3C1D68:lI116|H3C1E24
-3C1E24:lI105|H3C1EE0
-3C1EE0:lI111|H3C1F9C
-3C1F9C:lI110|H3C2050
-3C2050:lI47|H3C210C
-3C210C:lI120|H3C21C0
-3C21C0:lI45|H3C2274
-3C2274:lI104|H3C2330
-3C2330:lI100|H3C23EC
-3C23EC:lI102|N
-3C185C:lI104|H3C1910
-3C1910:lI100|H3C19BC
-3C19BC:lI102|N
-3C17B4:lH3C186C|H3C1878
-3C186C:t2:H3C1920,H3C1928
-3C1928:lI97|H3C19D4
-3C19D4:lI112|H3C1A78
-3C1A78:lI112|H3C1B2C
-3C1B2C:lI108|H3C1BF0
-3C1BF0:lI105|H3C1CB4
-3C1CB4:lI99|H3C1D70
-3C1D70:lI97|H3C1E2C
-3C1E2C:lI116|H3C1EE8
-3C1EE8:lI105|H3C1FA4
-3C1FA4:lI111|H3C2058
-3C2058:lI110|H3C2114
-3C2114:lI47|H3C21C8
-3C21C8:lI120|H3C227C
-3C227C:lI45|H3C2338
-3C2338:lI103|H3C23F4
-3C23F4:lI122|H3C24A0
-3C24A0:lI105|H3C255C
-3C255C:lI112|N
-3C1920:lI103|H3C19CC
-3C19CC:lI122|N
-3C1878:lH3C1930|H3C193C
-3C1930:t2:H3C19DC,H3C19E4
-3C19E4:lI97|H3C1A88
-3C1A88:lI112|H3C1B3C
-3C1B3C:lI112|H3C1C00
-3C1C00:lI108|H3C1CBC
-3C1CBC:lI105|H3C1D78
-3C1D78:lI99|H3C1E34
-3C1E34:lI97|H3C1EF0
-3C1EF0:lI116|H3C1FAC
-3C1FAC:lI105|H3C2060
-3C2060:lI111|H3C211C
-3C211C:lI110|H3C21D0
-3C21D0:lI47|H3C2284
-3C2284:lI120|H3C2340
-3C2340:lI45|H3C23FC
-3C23FC:lI103|H3C24A8
-3C24A8:lI116|H3C2564
-3C2564:lI97|H3C2618
-3C2618:lI114|N
-3C19DC:lI103|H3C1A80
-3C1A80:lI116|H3C1B34
-3C1B34:lI97|H3C1BF8
-3C1BF8:lI114|N
-3C193C:lH3C19EC|H3C19F8
-3C19EC:t2:H3C1A90,H3C1A98
-3C1A98:lI97|H3C1B4C
-3C1B4C:lI112|H3C1C10
-3C1C10:lI112|H3C1CC4
-3C1CC4:lI108|H3C1D80
-3C1D80:lI105|H3C1E3C
-3C1E3C:lI99|H3C1EF8
-3C1EF8:lI97|H3C1FB4
-3C1FB4:lI116|H3C2068
-3C2068:lI105|H3C2124
-3C2124:lI111|H3C21D8
-3C21D8:lI110|H3C228C
-3C228C:lI47|H3C2348
-3C2348:lI120|H3C2404
-3C2404:lI45|H3C24B0
-3C24B0:lI100|H3C256C
-3C256C:lI118|H3C2620
-3C2620:lI105|N
-3C1A90:lI100|H3C1B44
-3C1B44:lI118|H3C1C08
-3C1C08:lI105|N
-3C19F8:lH3C1AA0|H3C1AAC
-3C1AA0:t2:H3C1B54,H3C1B5C
-3C1B5C:lI97|H3C1C20
-3C1C20:lI112|H3C1CD4
-3C1CD4:lI112|H3C1D88
-3C1D88:lI108|H3C1E44
-3C1E44:lI105|H3C1F00
-3C1F00:lI99|H3C1FBC
-3C1FBC:lI97|H3C2070
-3C2070:lI116|H3C212C
-3C212C:lI105|H3C21E0
-3C21E0:lI111|H3C2294
-3C2294:lI110|H3C2350
-3C2350:lI47|H3C240C
-3C240C:lI120|H3C24B8
-3C24B8:lI45|H3C2574
-3C2574:lI100|H3C2628
-3C2628:lI105|H3C26DC
-3C26DC:lI114|H3C2798
-3C2798:lI101|H3C2854
-3C2854:lI99|H3C2918
-3C2918:lI116|H3C29E4
-3C29E4:lI111|H3C2AB0
-3C2AB0:lI114|N
-3C1B54:lI100|H3C1C18
-3C1C18:lI99|H3C1CCC
-3C1CCC:lI114|N
-3C1AAC:lH3C1B64|H3C1B70
-3C1B64:t2:H3C1C28,H3C1C30
-3C1C30:lI97|H3C1CE4
-3C1CE4:lI112|H3C1D98
-3C1D98:lI112|H3C1E4C
-3C1E4C:lI108|H3C1F08
-3C1F08:lI105|H3C1FC4
-3C1FC4:lI99|H3C2078
-3C2078:lI97|H3C2134
-3C2134:lI116|H3C21E8
-3C21E8:lI105|H3C229C
-3C229C:lI111|H3C2358
-3C2358:lI110|H3C2414
-3C2414:lI47|H3C24C0
-3C24C0:lI120|H3C257C
-3C257C:lI45|H3C2630
-3C2630:lI100|H3C26E4
-3C26E4:lI105|H3C27A0
-3C27A0:lI114|H3C285C
-3C285C:lI101|H3C2920
-3C2920:lI99|H3C29EC
-3C29EC:lI116|H3C2AB8
-3C2AB8:lI111|H3C2B84
-3C2B84:lI114|N
-3C1C28:lI100|H3C1CDC
-3C1CDC:lI105|H3C1D90
-3C1D90:lI114|N
-3C1B70:lH3C1C38|H3C1C44
-3C1C38:t2:H3C1CEC,H3C1CF4
-3C1CF4:lI97|H3C1DA8
-3C1DA8:lI112|H3C1E5C
-3C1E5C:lI112|H3C1F10
-3C1F10:lI108|H3C1FCC
-3C1FCC:lI105|H3C2080
-3C2080:lI99|H3C213C
-3C213C:lI97|H3C21F0
-3C21F0:lI116|H3C22A4
-3C22A4:lI105|H3C2360
-3C2360:lI111|H3C241C
-3C241C:lI110|H3C24C8
-3C24C8:lI47|H3C2584
-3C2584:lI120|H3C2638
-3C2638:lI45|H3C26EC
-3C26EC:lI100|H3C27A8
-3C27A8:lI105|H3C2864
-3C2864:lI114|H3C2928
-3C2928:lI101|H3C29F4
-3C29F4:lI99|H3C2AC0
-3C2AC0:lI116|H3C2B8C
-3C2B8C:lI111|H3C2C48
-3C2C48:lI114|N
-3C1CEC:lI100|H3C1DA0
-3C1DA0:lI120|H3C1E54
-3C1E54:lI114|N
-3C1C44:lH3C1CFC|H3C1D08
-3C1CFC:t2:H3C1DB0,H3C1DB8
-3C1DB8:lI97|H3C1E6C
-3C1E6C:lI112|H3C1F20
-3C1F20:lI112|H3C1FD4
-3C1FD4:lI108|H3C2088
-3C2088:lI105|H3C2144
-3C2144:lI99|H3C21F8
-3C21F8:lI97|H3C22AC
-3C22AC:lI116|H3C2368
-3C2368:lI105|H3C2424
-3C2424:lI111|H3C24D0
-3C24D0:lI110|H3C258C
-3C258C:lI47|H3C2640
-3C2640:lI120|H3C26F4
-3C26F4:lI45|H3C27B0
-3C27B0:lI99|H3C286C
-3C286C:lI115|H3C2930
-3C2930:lI104|N
-3C1DB0:lI99|H3C1E64
-3C1E64:lI115|H3C1F18
-3C1F18:lI104|N
-3C1D08:lH3C1DC0|H3C1DCC
-3C1DC0:t2:H3C1E74,H3C1E7C
-3C1E7C:lI97|H3C1F30
-3C1F30:lI112|H3C1FE4
-3C1FE4:lI112|H3C2098
-3C2098:lI108|H3C214C
-3C214C:lI105|H3C2200
-3C2200:lI99|H3C22B4
-3C22B4:lI97|H3C2370
-3C2370:lI116|H3C242C
-3C242C:lI105|H3C24D8
-3C24D8:lI111|H3C2594
-3C2594:lI110|H3C2648
-3C2648:lI47|H3C26FC
-3C26FC:lI120|H3C27B8
-3C27B8:lI45|H3C2874
-3C2874:lI99|H3C2938
-3C2938:lI112|H3C29FC
-3C29FC:lI105|H3C2AC8
-3C2AC8:lI111|N
-3C1E74:lI99|H3C1F28
-3C1F28:lI112|H3C1FDC
-3C1FDC:lI105|H3C2090
-3C2090:lI111|N
-3C1DCC:lH3C1E84|H3C1E90
-3C1E84:t2:H3C1F38,H3C1F40
-3C1F40:lI97|H3C1FEC
-3C1FEC:lI112|H3C20A0
-3C20A0:lI112|H3C2154
-3C2154:lI108|H3C2208
-3C2208:lI105|H3C22BC
-3C22BC:lI99|H3C2378
-3C2378:lI97|H3C2434
-3C2434:lI116|H3C24E0
-3C24E0:lI105|H3C259C
-3C259C:lI111|H3C2650
-3C2650:lI110|H3C2704
-3C2704:lI47|H3C27C0
-3C27C0:lI120|H3C287C
-3C287C:lI45|H3C2940
-3C2940:lI99|H3C2A04
-3C2A04:lI111|H3C2AD0
-3C2AD0:lI109|H3C2B94
-3C2B94:lI112|H3C2C50
-3C2C50:lI114|H3C2D00
-3C2D00:lI101|H3C2DA8
-3C2DA8:lI115|H3C2E40
-3C2E40:lI115|N
-3C1F38:lI90|N
-3C1E90:lH3C1F48|H3C1F54
-3C1F48:t2:H3C1FF4,H3C1FFC
-3C1FFC:lI97|H3C20B0
-3C20B0:lI112|H3C2164
-3C2164:lI112|H3C2210
-3C2210:lI108|H3C22C4
-3C22C4:lI105|H3C2380
-3C2380:lI99|H3C243C
-3C243C:lI97|H3C24E8
-3C24E8:lI116|H3C25A4
-3C25A4:lI105|H3C2658
-3C2658:lI111|H3C270C
-3C270C:lI110|H3C27C8
-3C27C8:lI47|H3C2884
-3C2884:lI120|H3C2948
-3C2948:lI45|H3C2A0C
-3C2A0C:lI99|H3C2AD8
-3C2AD8:lI100|H3C2B9C
-3C2B9C:lI108|H3C2C58
-3C2C58:lI105|H3C2D08
-3C2D08:lI110|H3C2DB0
-3C2DB0:lI107|N
-3C1FF4:lI118|H3C20A8
-3C20A8:lI99|H3C215C
-3C215C:lI100|N
-3C1F54:lH3C2004|H3C2010
-3C2004:t2:H3C20B8,H3C20C0
-3C20C0:lI97|H3C2174
-3C2174:lI112|H3C2220
-3C2220:lI112|H3C22D4
-3C22D4:lI108|H3C2390
-3C2390:lI105|H3C2444
-3C2444:lI99|H3C24F0
-3C24F0:lI97|H3C25AC
-3C25AC:lI116|H3C2660
-3C2660:lI105|H3C2714
-3C2714:lI111|H3C27D0
-3C27D0:lI110|H3C288C
-3C288C:lI47|H3C2950
-3C2950:lI120|H3C2A14
-3C2A14:lI45|H3C2AE0
-3C2AE0:lI98|H3C2BA4
-3C2BA4:lI99|H3C2C60
-3C2C60:lI112|H3C2D10
-3C2D10:lI105|H3C2DB8
-3C2DB8:lI111|N
-3C20B8:lI98|H3C216C
-3C216C:lI99|H3C2218
-3C2218:lI112|H3C22CC
-3C22CC:lI105|H3C2388
-3C2388:lI111|N
-3C2010:lH3C20C8|H3C20D4
-3C20C8:t2:H3C217C,H3C2184
-3C2184:lI97|H3C2230
-3C2230:lI112|H3C22E4
-3C22E4:lI112|H3C2398
-3C2398:lI108|H3C244C
-3C244C:lI105|H3C24F8
-3C24F8:lI99|H3C25B4
-3C25B4:lI97|H3C2668
-3C2668:lI116|H3C271C
-3C271C:lI105|H3C27D8
-3C27D8:lI111|H3C2894
-3C2894:lI110|H3C2958
-3C2958:lI47|H3C2A1C
-3C2A1C:lI114|H3C2AE8
-3C2AE8:lI116|H3C2BAC
-3C2BAC:lI102|N
-3C217C:lI114|H3C2228
-3C2228:lI116|H3C22DC
-3C22DC:lI102|N
-3C20D4:lH3C218C|H3C2198
-3C218C:t2:H3C2238,H3C2240
-3C2240:lI97|H3C22F4
-3C22F4:lI112|H3C23A8
-3C23A8:lI112|H3C2454
-3C2454:lI108|H3C2500
-3C2500:lI105|H3C25BC
-3C25BC:lI99|H3C2670
-3C2670:lI97|H3C2724
-3C2724:lI116|H3C27E0
-3C27E0:lI105|H3C289C
-3C289C:lI111|H3C2960
-3C2960:lI110|H3C2A24
-3C2A24:lI47|H3C2AF0
-3C2AF0:lI112|H3C2BB4
-3C2BB4:lI111|H3C2C68
-3C2C68:lI119|H3C2D18
-3C2D18:lI101|H3C2DC0
-3C2DC0:lI114|H3C2E48
-3C2E48:lI112|H3C2EC0
-3C2EC0:lI111|H3C2F38
-3C2F38:lI105|H3C2FA8
-3C2FA8:lI110|H3C3010
-3C3010:lI116|N
-3C2238:lI112|H3C22EC
-3C22EC:lI112|H3C23A0
-3C23A0:lI116|N
-3C2198:lH3C2248|H3C2254
-3C2248:t2:H3C22FC,H3C2304
-3C2304:lI97|H3C23B8
-3C23B8:lI112|H3C245C
-3C245C:lI112|H3C2508
-3C2508:lI108|H3C25C4
-3C25C4:lI105|H3C2678
-3C2678:lI99|H3C272C
-3C272C:lI97|H3C27E8
-3C27E8:lI116|H3C28A4
-3C28A4:lI105|H3C2968
-3C2968:lI111|H3C2A2C
-3C2A2C:lI110|H3C2AF8
-3C2AF8:lI47|H3C2BBC
-3C2BBC:lI112|H3C2C70
-3C2C70:lI111|H3C2D20
-3C2D20:lI115|H3C2DC8
-3C2DC8:lI116|H3C2E50
-3C2E50:lI115|H3C2EC8
-3C2EC8:lI99|H3C2F40
-3C2F40:lI114|H3C2FB0
-3C2FB0:lI105|H3C3018
-3C3018:lI112|H3C3078
-3C3078:lI116|N
-3C22FC:lI97|H3C23B0
-3C23B0:lI105|N
-3C2254:lH3C230C|H3C2318
-3C230C:t2:H3C23C0,H3C23C8
-3C23C8:lI97|H3C246C
-3C246C:lI112|H3C2518
-3C2518:lI112|H3C25CC
-3C25CC:lI108|H3C2680
-3C2680:lI105|H3C2734
-3C2734:lI99|H3C27F0
-3C27F0:lI97|H3C28AC
-3C28AC:lI116|H3C2970
-3C2970:lI105|H3C2A34
-3C2A34:lI111|H3C2B00
-3C2B00:lI110|H3C2BC4
-3C2BC4:lI47|H3C2C78
-3C2C78:lI112|H3C2D28
-3C2D28:lI111|H3C2DD0
-3C2DD0:lI115|H3C2E58
-3C2E58:lI116|H3C2ED0
-3C2ED0:lI115|H3C2F48
-3C2F48:lI99|H3C2FB8
-3C2FB8:lI114|H3C3020
-3C3020:lI105|H3C3080
-3C3080:lI112|H3C30D8
-3C30D8:lI116|N
-3C23C0:lI101|H3C2464
-3C2464:lI112|H3C2510
-3C2510:lI115|N
-3C2318:lH3C23D0|H3C23DC
-3C23D0:t2:H3C2474,H3C247C
-3C247C:lI97|H3C2528
-3C2528:lI112|H3C25D4
-3C25D4:lI112|H3C2688
-3C2688:lI108|H3C273C
-3C273C:lI105|H3C27F8
-3C27F8:lI99|H3C28B4
-3C28B4:lI97|H3C2978
-3C2978:lI116|H3C2A3C
-3C2A3C:lI105|H3C2B08
-3C2B08:lI111|H3C2BCC
-3C2BCC:lI110|H3C2C80
-3C2C80:lI47|H3C2D30
-3C2D30:lI112|H3C2DD8
-3C2DD8:lI111|H3C2E60
-3C2E60:lI115|H3C2ED8
-3C2ED8:lI116|H3C2F50
-3C2F50:lI115|H3C2FC0
-3C2FC0:lI99|H3C3028
-3C3028:lI114|H3C3088
-3C3088:lI105|H3C30E0
-3C30E0:lI112|H3C3130
-3C3130:lI116|N
-3C2474:lI112|H3C2520
-3C2520:lI115|N
-3C23DC:lH3C2484|H3C2490
-3C2484:t2:H3C2530,H3C2538
-3C2538:lI97|H3C25E4
-3C25E4:lI112|H3C2698
-3C2698:lI112|H3C2744
-3C2744:lI108|H3C2800
-3C2800:lI105|H3C28BC
-3C28BC:lI99|H3C2980
-3C2980:lI97|H3C2A44
-3C2A44:lI116|H3C2B10
-3C2B10:lI105|H3C2BD4
-3C2BD4:lI111|H3C2C88
-3C2C88:lI110|H3C2D38
-3C2D38:lI47|H3C2DE0
-3C2DE0:lI112|H3C2E68
-3C2E68:lI100|H3C2EE0
-3C2EE0:lI102|N
-3C2530:lI112|H3C25DC
-3C25DC:lI100|H3C2690
-3C2690:lI102|N
-3C2490:lH3C2540|H3C254C
-3C2540:t2:H3C25EC,H3C25F4
-3C25F4:lI97|H3C26A8
-3C26A8:lI112|H3C2754
-3C2754:lI112|H3C2808
-3C2808:lI108|H3C28C4
-3C28C4:lI105|H3C2988
-3C2988:lI99|H3C2A4C
-3C2A4C:lI97|H3C2B18
-3C2B18:lI116|H3C2BDC
-3C2BDC:lI105|H3C2C90
-3C2C90:lI111|H3C2D40
-3C2D40:lI110|H3C2DE8
-3C2DE8:lI47|H3C2E70
-3C2E70:lI111|H3C2EE8
-3C2EE8:lI100|H3C2F58
-3C2F58:lI97|N
-3C25EC:lI111|H3C26A0
-3C26A0:lI100|H3C274C
-3C274C:lI97|N
-3C254C:lH3C25FC|H3C2608
-3C25FC:t2:H3C26B0,H3C26B8
-3C26B8:lI97|H3C2764
-3C2764:lI112|H3C2818
-3C2818:lI112|H3C28CC
-3C28CC:lI108|H3C2990
-3C2990:lI105|H3C2A54
-3C2A54:lI99|H3C2B20
-3C2B20:lI97|H3C2BE4
-3C2BE4:lI116|H3C2C98
-3C2C98:lI105|H3C2D48
-3C2D48:lI111|H3C2DF0
-3C2DF0:lI110|H3C2E78
-3C2E78:lI47|H3C2EF0
-3C2EF0:lI111|H3C2F60
-3C2F60:lI99|H3C2FC8
-3C2FC8:lI116|H3C3030
-3C3030:lI101|H3C3090
-3C3090:lI116|H3C30E8
-3C30E8:lI45|H3C3138
-3C3138:lI115|H3C3180
-3C3180:lI116|H3C31C8
-3C31C8:lI114|H3C3210
-3C3210:lI101|H3C3258
-3C3258:lI97|H3C32A0
-3C32A0:lI109|N
-3C26B0:lI98|H3C275C
-3C275C:lI105|H3C2810
-3C2810:lI110|N
-3C2608:lH3C26C0|H3C26CC
-3C26C0:t2:H3C276C,H3C2774
-3C2774:lI97|H3C2828
-3C2828:lI112|H3C28DC
-3C28DC:lI112|H3C2998
-3C2998:lI108|H3C2A5C
-3C2A5C:lI105|H3C2B28
-3C2B28:lI99|H3C2BEC
-3C2BEC:lI97|H3C2CA0
-3C2CA0:lI116|H3C2D50
-3C2D50:lI105|H3C2DF8
-3C2DF8:lI111|H3C2E80
-3C2E80:lI110|H3C2EF8
-3C2EF8:lI47|H3C2F68
-3C2F68:lI111|H3C2FD0
-3C2FD0:lI99|H3C3038
-3C3038:lI116|H3C3098
-3C3098:lI101|H3C30F0
-3C30F0:lI116|H3C3140
-3C3140:lI45|H3C3188
-3C3188:lI115|H3C31D0
-3C31D0:lI116|H3C3218
-3C3218:lI114|H3C3260
-3C3260:lI101|H3C32A8
-3C32A8:lI97|H3C32E8
-3C32E8:lI109|N
-3C276C:lI100|H3C2820
-3C2820:lI109|H3C28D4
-3C28D4:lI115|N
-3C26CC:lH3C277C|H3C2788
-3C277C:t2:H3C2830,H3C2838
-3C2838:lI97|H3C28EC
-3C28EC:lI112|H3C29A8
-3C29A8:lI112|H3C2A64
-3C2A64:lI108|H3C2B30
-3C2B30:lI105|H3C2BF4
-3C2BF4:lI99|H3C2CA8
-3C2CA8:lI97|H3C2D58
-3C2D58:lI116|H3C2E00
-3C2E00:lI105|H3C2E88
-3C2E88:lI111|H3C2F00
-3C2F00:lI110|H3C2F70
-3C2F70:lI47|H3C2FD8
-3C2FD8:lI111|H3C3040
-3C3040:lI99|H3C30A0
-3C30A0:lI116|H3C30F8
-3C30F8:lI101|H3C3148
-3C3148:lI116|H3C3190
-3C3190:lI45|H3C31D8
-3C31D8:lI115|H3C3220
-3C3220:lI116|H3C3268
-3C3268:lI114|H3C32B0
-3C32B0:lI101|H3C32F0
-3C32F0:lI97|H3C3320
-3C3320:lI109|N
-3C2830:lI108|H3C28E4
-3C28E4:lI104|H3C29A0
-3C29A0:lI97|N
-3C2788:lH3C2840|H3C284C
-3C2840:t2:H3C28F4,H3C28FC
-3C28FC:lI97|H3C29B8
-3C29B8:lI112|H3C2A74
-3C2A74:lI112|H3C2B38
-3C2B38:lI108|H3C2BFC
-3C2BFC:lI105|H3C2CB0
-3C2CB0:lI99|H3C2D60
-3C2D60:lI97|H3C2E08
-3C2E08:lI116|H3C2E90
-3C2E90:lI105|H3C2F08
-3C2F08:lI111|H3C2F78
-3C2F78:lI110|H3C2FE0
-3C2FE0:lI47|H3C3048
-3C3048:lI111|H3C30A8
-3C30A8:lI99|H3C3100
-3C3100:lI116|H3C3150
-3C3150:lI101|H3C3198
-3C3198:lI116|H3C31E0
-3C31E0:lI45|H3C3228
-3C3228:lI115|H3C3270
-3C3270:lI116|H3C32B8
-3C32B8:lI114|H3C32F8
-3C32F8:lI101|H3C3328
-3C3328:lI97|H3C3350
-3C3350:lI109|N
-3C28F4:lI108|H3C29B0
-3C29B0:lI122|H3C2A6C
-3C2A6C:lI104|N
-3C284C:lH3C2904|H3C2910
-3C2904:t2:H3C29C0,H3C29C8
-3C29C8:lI97|H3C2A84
-3C2A84:lI112|H3C2B48
-3C2B48:lI112|H3C2C04
-3C2C04:lI108|H3C2CB8
-3C2CB8:lI105|H3C2D68
-3C2D68:lI99|H3C2E10
-3C2E10:lI97|H3C2E98
-3C2E98:lI116|H3C2F10
-3C2F10:lI105|H3C2F80
-3C2F80:lI111|H3C2FE8
-3C2FE8:lI110|H3C3050
-3C3050:lI47|H3C30B0
-3C30B0:lI111|H3C3108
-3C3108:lI99|H3C3158
-3C3158:lI116|H3C31A0
-3C31A0:lI101|H3C31E8
-3C31E8:lI116|H3C3230
-3C3230:lI45|H3C3278
-3C3278:lI115|H3C32C0
-3C32C0:lI116|H3C3300
-3C3300:lI114|H3C3330
-3C3330:lI101|H3C3358
-3C3358:lI97|H3C3378
-3C3378:lI109|N
-3C29C0:lI101|H3C2A7C
-3C2A7C:lI120|H3C2B40
-3C2B40:lI101|N
-3C2910:lH3C29D0|H3C29DC
-3C29D0:t2:H3C2A8C,H3C2A94
-3C2A94:lI97|H3C2B58
-3C2B58:lI112|H3C2C14
-3C2C14:lI112|H3C2CC8
-3C2CC8:lI108|H3C2D78
-3C2D78:lI105|H3C2E18
-3C2E18:lI99|H3C2EA0
-3C2EA0:lI97|H3C2F18
-3C2F18:lI116|H3C2F88
-3C2F88:lI105|H3C2FF0
-3C2FF0:lI111|H3C3058
-3C3058:lI110|H3C30B8
-3C30B8:lI47|H3C3110
-3C3110:lI111|H3C3160
-3C3160:lI99|H3C31A8
-3C31A8:lI116|H3C31F0
-3C31F0:lI101|H3C3238
-3C3238:lI116|H3C3280
-3C3280:lI45|H3C32C8
-3C32C8:lI115|H3C3308
-3C3308:lI116|H3C3338
-3C3338:lI114|H3C3360
-3C3360:lI101|H3C3380
-3C3380:lI97|H3C3398
-3C3398:lI109|N
-3C2A8C:lI99|H3C2B50
-3C2B50:lI108|H3C2C0C
-3C2C0C:lI97|H3C2CC0
-3C2CC0:lI115|H3C2D70
-3C2D70:lI115|N
-3C29DC:lH3C2A9C|H3C2AA8
-3C2A9C:t2:H3C2B60,H3C2B68
-3C2B68:lI97|H3C2C24
-3C2C24:lI112|H3C2CD8
-3C2CD8:lI112|H3C2D80
-3C2D80:lI108|H3C2E20
-3C2E20:lI105|H3C2EA8
-3C2EA8:lI99|H3C2F20
-3C2F20:lI97|H3C2F90
-3C2F90:lI116|H3C2FF8
-3C2FF8:lI105|H3C3060
-3C3060:lI111|H3C30C0
-3C30C0:lI110|H3C3118
-3C3118:lI47|H3C3168
-3C3168:lI109|H3C31B0
-3C31B0:lI115|H3C31F8
-3C31F8:lI119|H3C3240
-3C3240:lI111|H3C3288
-3C3288:lI114|H3C32D0
-3C32D0:lI100|N
-3C2B60:lI100|H3C2C1C
-3C2C1C:lI111|H3C2CD0
-3C2CD0:lI99|N
-3C2AA8:lH3C2B70|H3C2B7C
-3C2B70:t2:H3C2C2C,H3C2C34
-3C2C34:lI97|H3C2CE8
-3C2CE8:lI112|H3C2D90
-3C2D90:lI112|H3C2E28
-3C2E28:lI108|H3C2EB0
-3C2EB0:lI105|H3C2F28
-3C2F28:lI99|H3C2F98
-3C2F98:lI97|H3C3000
-3C3000:lI116|H3C3068
-3C3068:lI105|H3C30C8
-3C30C8:lI111|H3C3120
-3C3120:lI110|H3C3170
-3C3170:lI47|H3C31B8
-3C31B8:lI109|H3C3200
-3C3200:lI97|H3C3248
-3C3248:lI99|H3C3290
-3C3290:lI45|H3C32D8
-3C32D8:lI99|H3C3310
-3C3310:lI111|H3C3340
-3C3340:lI109|H3C3368
-3C3368:lI112|H3C3388
-3C3388:lI97|H3C33A0
-3C33A0:lI99|H3C33B0
-3C33B0:lI116|H3C33C0
-3C33C0:lI112|H3C33D0
-3C33D0:lI114|H3C33E0
-3C33E0:lI111|N
-3C2C2C:lI99|H3C2CE0
-3C2CE0:lI112|H3C2D88
-3C2D88:lI116|N
-3C2B7C:lH3C2C3C|N
-3C2C3C:t2:H3C2CF0,H3C2CF8
-3C2CF8:lI97|H3C2DA0
-3C2DA0:lI112|H3C2E38
-3C2E38:lI112|H3C2EB8
-3C2EB8:lI108|H3C2F30
-3C2F30:lI105|H3C2FA0
-3C2FA0:lI99|H3C3008
-3C3008:lI97|H3C3070
-3C3070:lI116|H3C30D0
-3C30D0:lI105|H3C3128
-3C3128:lI111|H3C3178
-3C3178:lI110|H3C31C0
-3C31C0:lI47|H3C3208
-3C3208:lI109|H3C3250
-3C3250:lI97|H3C3298
-3C3298:lI99|H3C32E0
-3C32E0:lI45|H3C3318
-3C3318:lI98|H3C3348
-3C3348:lI105|H3C3370
-3C3370:lI110|H3C3390
-3C3390:lI104|H3C33A8
-3C33A8:lI101|H3C33B8
-3C33B8:lI120|H3C33C8
-3C33C8:lI52|H3C33D8
-3C33D8:lI48|N
-3C2CF0:lI104|H3C2D98
-3C2D98:lI113|H3C2E30
-3C2E30:lI120|N
-3BDBCC:lH3BDA78|H3BDA8C
-3BDA78:t2:A4:port,I8888
-3BDA8C:lH3BDB04|H3BDB10
-3BDB04:t2:AC:bind_address,H3BDB64
-3BDB64:t4:I127,I0,I0,I1
-3BDB10:lH3BDB78|H3BDB84
-3BDB78:t2:AB:server_name,H3BDBD4
-3BDBD4:lI108|H3BDC24
-3BDC24:lI111|H3BDC88
-3BDC88:lI99|H3BDCF0
-3BDCF0:lI97|H3BDD70
-3BDD70:lI108|H3BDDF8
-3BDDF8:lI104|H3BDE90
-3BDE90:lI111|H3BDF40
-3BDF40:lI115|H3BDFFC
-3BDFFC:lI116|N
-3BDB84:lH3BDBDC|H3BDBE8
-3BDBDC:t2:AE:max_header_siz,I1024
-3BDBE8:lH3BDC2C|H3BDC38
-3BDC2C:t2:A11:max_header_action,A8:reply414
-3BDC38:lH3BDC90|H3BDC9C
-3BDC90:t2:A8:com_type,A7:ip_comm
-3BDC9C:lH3BDCF8|H3BDD04
-3BDCF8:t2:A7:modules,H3BDD78
-3BDD78:lA9:mod_alias|H3BDE00
-3BDE00:lA8:mod_auth|H3BDE98
-3BDE98:lA7:mod_esi|H3BDF48
-3BDF48:lAB:mod_actions|H3BE004
-3BE004:lA7:mod_cgi|H3BE0D0
-3BE0D0:lAB:mod_include|H3BE1A4
-3BE1A4:lA7:mod_dir|H3BE288
-3BE288:lA7:mod_get|H3BE378
-3BE378:lA8:mod_head|H3BE47C
-3BE47C:lA7:mod_log|H3BE580
-3BE580:lAC:mod_disk_log|N
-3BDD04:lH3BDD80|H3BDD8C
-3BDD80:t2:AF:directory_index,H3BDE08
-3BDE08:lH3BDEA0|N
-3BDEA0:lI105|H3BDF50
-3BDF50:lI110|H3BE00C
-3BE00C:lI100|H3BE0D8
-3BE0D8:lI101|H3BE1AC
-3BE1AC:lI120|H3BE290
-3BE290:lI46|H3BE380
-3BE380:lI104|H3BE484
-3BE484:lI116|H3BE588
-3BE588:lI109|H3BE68C
-3BE68C:lI108|N
-3BDD8C:lH3BDE10|H3BDE1C
-3BDE10:t2:AC:default_type,H3BDEA8
-3BDEA8:lI116|H3BDF58
-3BDF58:lI101|H3BE014
-3BE014:lI120|H3BE0E0
-3BE0E0:lI116|H3BE1B4
-3BE1B4:lI47|H3BE298
-3BE298:lI112|H3BE388
-3BE388:lI108|H3BE48C
-3BE48C:lI97|H3BE590
-3BE590:lI105|H3BE694
-3BE694:lI110|N
-3BDE1C:lH3BDEB0|H3BDEBC
-3BDEB0:t2:A10:erl_script_alias,H3BDF60
-3BDF60:t2:H3BE01C,H3BE024
-3BE024:lH3BE0F0|N
-3BE0F0:lI119|H3BE1C4
-3BE1C4:lI101|H3BE2A8
-3BE2A8:lI98|H3BE398
-3BE398:lI116|H3BE49C
-3BE49C:lI111|H3BE5A0
-3BE5A0:lI111|H3BE6A4
-3BE6A4:lI108|N
-3BE01C:lI47|H3BE0E8
-3BE0E8:lI119|H3BE1BC
-3BE1BC:lI101|H3BE2A0
-3BE2A0:lI98|H3BE390
-3BE390:lI116|H3BE494
-3BE494:lI111|H3BE598
-3BE598:lI111|H3BE69C
-3BE69C:lI108|N
-3BDEBC:lH3BDF6C|H3BDF78
-3BDF6C:t2:A5:alias,H3BE02C
-3BE02C:t2:H3BE0F8,H3BE100
-3BE100:lI47|H3BE1D4
-3BE1D4:lI99|H3BE2B8
-3BE2B8:lI108|H3BE3A8
-3BE3A8:lI101|H3BE4AC
-3BE4AC:lI97|H3BE5B0
-3BE5B0:lI114|H3BE6B4
-3BE6B4:lI99|H3BE7A8
-3BE7A8:lI97|H3BE894
-3BE894:lI115|H3BE980
-3BE980:lI101|H3BEA74
-3BEA74:lI47|H3BEB68
-3BEB68:lI111|H3BEC54
-3BEC54:lI116|H3BED40
-3BED40:lI112|H3BEE2C
-3BEE2C:lI47|H3BEF00
-3BEF00:lI101|H3BEFD4
-3BEFD4:lI114|H3BF0A0
-3BF0A0:lI116|H3BF174
-3BF174:lI115|H3BF238
-3BF238:lI47|H3BF2FC
-3BF2FC:lI108|H3BF3A8
-3BF3A8:lI105|H3BF45C
-3BF45C:lI98|H3BF518
-3BF518:lI47|H3BF5DC
-3BF5DC:lI111|H3BF6B0
-3BF6B0:lI98|H3BF784
-3BF784:lI115|H3BF858
-3BF858:lI101|H3BF93C
-3BF93C:lI114|H3BFA18
-3BFA18:lI118|H3BFAF4
-3BFAF4:lI101|H3BFBD0
-3BFBD0:lI114|H3BFC9C
-3BFC9C:lI47|H3BFD60
-3BFD60:lI112|H3BFE2C
-3BFE2C:lI114|H3BFEE0
-3BFEE0:lI105|H3BFF94
-3BFF94:lI118|H3C0040
-3C0040:lI47|H3C00EC
-3C00EC:lI99|H3C0198
-3C0198:lI114|H3C024C
-3C024C:lI97|H3C0308
-3C0308:lI115|H3C03BC
-3C03BC:lI104|H3C0458
-3C0458:lI100|H3C04F4
-3C04F4:lI117|H3C0590
-3C0590:lI109|H3C0634
-3C0634:lI112|H3C06E0
-3C06E0:lI95|H3C078C
-3C078C:lI118|H3C0830
-3C0830:lI105|H3C08BC
-3C08BC:lI101|H3C0950
-3C0950:lI119|H3C09E4
-3C09E4:lI101|H3C0A80
-3C0A80:lI114|N
-3BE0F8:lI47|H3BE1CC
-3BE1CC:lI99|H3BE2B0
-3BE2B0:lI114|H3BE3A0
-3BE3A0:lI97|H3BE4A4
-3BE4A4:lI115|H3BE5A8
-3BE5A8:lI104|H3BE6AC
-3BE6AC:lI100|H3BE7A0
-3BE7A0:lI117|H3BE88C
-3BE88C:lI109|H3BE978
-3BE978:lI112|H3BEA6C
-3BEA6C:lI95|H3BEB60
-3BEB60:lI118|H3BEC4C
-3BEC4C:lI105|H3BED38
-3BED38:lI101|H3BEE24
-3BEE24:lI119|H3BEEF8
-3BEEF8:lI101|H3BEFCC
-3BEFCC:lI114|N
-3BDF78:lH3BE038|H3BE044
-3BE038:t2:A5:alias,H3BE108
-3BE108:t2:H3BE1DC,H3BE1E4
-3BE1E4:lI47|H3BE2C8
-3BE2C8:lI99|H3BE3B8
-3BE3B8:lI108|H3BE4BC
-3BE4BC:lI101|H3BE5C0
-3BE5C0:lI97|H3BE6C4
-3BE6C4:lI114|H3BE7B8
-3BE7B8:lI99|H3BE8A4
-3BE8A4:lI97|H3BE990
-3BE990:lI115|H3BEA84
-3BEA84:lI101|H3BEB78
-3BEB78:lI47|H3BEC64
-3BEC64:lI111|H3BED50
-3BED50:lI116|H3BEE3C
-3BEE3C:lI112|H3BEF10
-3BEF10:lI47|H3BEFE4
-3BEFE4:lI101|H3BF0B0
-3BF0B0:lI114|H3BF184
-3BF184:lI116|H3BF248
-3BF248:lI115|H3BF304
-3BF304:lI47|H3BF3B0
-3BF3B0:lI101|H3BF464
-3BF464:lI114|H3BF520
-3BF520:lI116|H3BF5E4
-3BF5E4:lI115|H3BF6B8
-3BF6B8:lI47|H3BF78C
-3BF78C:lI100|H3BF860
-3BF860:lI111|H3BF944
-3BF944:lI99|H3BFA20
-3BFA20:lI47|H3BFAFC
-3BFAFC:lI104|H3BFBD8
-3BFBD8:lI116|H3BFCA4
-3BFCA4:lI109|H3BFD68
-3BFD68:lI108|N
-3BE1DC:lI47|H3BE2C0
-3BE2C0:lI99|H3BE3B0
-3BE3B0:lI114|H3BE4B4
-3BE4B4:lI97|H3BE5B8
-3BE5B8:lI115|H3BE6BC
-3BE6BC:lI104|H3BE7B0
-3BE7B0:lI100|H3BE89C
-3BE89C:lI117|H3BE988
-3BE988:lI109|H3BEA7C
-3BEA7C:lI112|H3BEB70
-3BEB70:lI95|H3BEC5C
-3BEC5C:lI101|H3BED48
-3BED48:lI114|H3BEE34
-3BEE34:lI116|H3BEF08
-3BEF08:lI115|H3BEFDC
-3BEFDC:lI95|H3BF0A8
-3BF0A8:lI100|H3BF17C
-3BF17C:lI111|H3BF240
-3BF240:lI99|N
-3BE044:lH3BE114|H3BE120
-3BE114:t2:A5:alias,H3BE1EC
-3BE1EC:t2:H3BE2D0,H3BE2D8
-3BE2D8:lI47|H3BE3C8
-3BE3C8:lI99|H3BE4CC
-3BE4CC:lI108|H3BE5D0
-3BE5D0:lI101|H3BE6D4
-3BE6D4:lI97|H3BE7C8
-3BE7C8:lI114|H3BE8B4
-3BE8B4:lI99|H3BE9A0
-3BE9A0:lI97|H3BEA94
-3BEA94:lI115|H3BEB88
-3BEB88:lI101|H3BEC74
-3BEC74:lI47|H3BED60
-3BED60:lI111|H3BEE4C
-3BEE4C:lI116|H3BEF20
-3BEF20:lI112|H3BEFEC
-3BEFEC:lI47|H3BF0B8
-3BF0B8:lI101|H3BF18C
-3BF18C:lI114|H3BF250
-3BF250:lI116|H3BF30C
-3BF30C:lI115|H3BF3B8
-3BF3B8:lI47|H3BF46C
-3BF46C:lI108|H3BF528
-3BF528:lI105|H3BF5EC
-3BF5EC:lI98|H3BF6C0
-3BF6C0:lI47|H3BF794
-3BF794:lI111|H3BF868
-3BF868:lI98|H3BF94C
-3BF94C:lI115|H3BFA28
-3BFA28:lI101|H3BFB04
-3BFB04:lI114|H3BFBE0
-3BFBE0:lI118|H3BFCAC
-3BFCAC:lI101|H3BFD70
-3BFD70:lI114|H3BFE34
-3BFE34:lI47|H3BFEE8
-3BFEE8:lI100|H3BFF9C
-3BFF9C:lI111|H3C0048
-3C0048:lI99|H3C00F4
-3C00F4:lI47|H3C01A0
-3C01A0:lI104|H3C0254
-3C0254:lI116|H3C0310
-3C0310:lI109|H3C03C4
-3C03C4:lI108|N
-3BE2D0:lI47|H3BE3C0
-3BE3C0:lI99|H3BE4C4
-3BE4C4:lI114|H3BE5C8
-3BE5C8:lI97|H3BE6CC
-3BE6CC:lI115|H3BE7C0
-3BE7C0:lI104|H3BE8AC
-3BE8AC:lI100|H3BE998
-3BE998:lI117|H3BEA8C
-3BEA8C:lI109|H3BEB80
-3BEB80:lI112|H3BEC6C
-3BEC6C:lI95|H3BED58
-3BED58:lI100|H3BEE44
-3BEE44:lI111|H3BEF18
-3BEF18:lI99|N
-3BE120:lH3BE1F8|N
-3BE1F8:t2:A10:erl_script_alias,H3BE2E0
-3BE2E0:t2:H3BE3D0,H3BE3D8
-3BE3D8:lH3BE4DC|N
-3BE4DC:lI99|H3BE5E0
-3BE5E0:lI114|H3BE6E4
-3BE6E4:lI97|H3BE7D8
-3BE7D8:lI115|H3BE8C4
-3BE8C4:lI104|H3BE9B0
-3BE9B0:lI100|H3BEAA4
-3BEAA4:lI117|H3BEB90
-3BEB90:lI109|H3BEC7C
-3BEC7C:lI112|H3BED68
-3BED68:lI95|H3BEE54
-3BEE54:lI118|H3BEF28
-3BEF28:lI105|H3BEFF4
-3BEFF4:lI101|H3BF0C0
-3BF0C0:lI119|H3BF194
-3BF194:lI101|H3BF258
-3BF258:lI114|N
-3BE3D0:lI47|H3BE4D4
-3BE4D4:lI99|H3BE5D8
-3BE5D8:lI100|H3BE6DC
-3BE6DC:lI118|H3BE7D0
-3BE7D0:lI95|H3BE8BC
-3BE8BC:lI101|H3BE9A8
-3BE9A8:lI114|H3BEA9C
-3BEA9C:lI108|N
-3BDE2C:lH3BDA9C|H3BDECC
-3BDA9C:t4:I127,I0,I0,I1
-3BDECC:lI8888|H3BDF88
-3BDF88:lN|N
-3BDD1C:lN|N
-3BDA50:t2:AD:$initial_call,H3BDAB8
-3BDAB8:t3:A3:gen,A7:init_it,H3BDAB0
-3BDA5C:t2:A9:verbosity,A7:silence
-3BDAC8:t2:AE:auth_verbosity,A7:silence
-3BDB28:t2:A12:security_verbosity,A7:silence
-3BDB9C:t2:A12:acceptor_verbosity,A7:silence
-3BDC00:t2:AA:$ancestors,H3BDC5C
-3BDC5C:lA1A:httpd_sup__127_0_0_1__8888|H3BDCB4
-3BDCB4:lA8:web_tool|H3BDD24
-3BDD24:lP<0.27.0>|N
-3BDADC:t2:A19:request_handler_verbosity,A7:silence
-3BDB3C:t2:A5:sname,A3:man
-=proc_dictionary:<0.47.0>
-H36E688
-H36E694
-H36E6A0
-H36E6AC
-=proc_stack:<0.47.0>
-36c520:SReturn addr 0x362C9C (inet_tcp:accept/2 + 20)
-y0:I5
-y1:p<0.161>
-y2:p<0.141>
-36c530:SReturn addr 0x500C5C (httpd_socket:accept/3 + 280)
-y0:N
-36c538:SReturn addr 0x502BFC (httpd_acceptor:acceptor/4 + 164)
-y0:N
-36c540:SReturn addr 0x225860 (proc_lib:init_p/5 + 164)
-y0:SCatch 0x502BFC (httpd_acceptor:acceptor/4 + 164)
-y1:P<0.46.0>
-y2:A7:ip_comm
-y3:p<0.141>
-y4:A1B:httpd_conf__127_0_0_1__8888
-36c558:SReturn addr 0x156F90 (<terminate process normally>)
-y0:SCatch 0x225860 (proc_lib:init_p/5 + 164)
-y1:AE:httpd_acceptor
-y2:A8:acceptor
-y3:H36E6C8
-=proc_heap:<0.47.0>
-36E6C8:lP<0.44.0>|H36E724
-36E724:lP<0.46.0>|H36E748
-36E748:lA7:ip_comm|H36E760
-36E760:lH36E6D0|H36E778
-36E6D0:t4:I127,I0,I0,I1
-36E778:lI8888|H36E788
-36E788:lA1B:httpd_conf__127_0_0_1__8888|H36E798
-36E798:lA7:silence|N
-36E688:t2:AD:$initial_call,H36E6F0
-36E6F0:t3:AE:httpd_acceptor,A8:acceptor,H36E6C8
-36E694:t2:A9:verbosity,A7:silence
-36E6A0:t2:AA:$ancestors,H36E700
-36E700:lA1E:httpd_acc_sup__127_0_0_1__8888|H36E72C
-36E72C:lA1A:httpd_sup__127_0_0_1__8888|H36E750
-36E750:lA8:web_tool|H36E768
-36E768:lP<0.27.0>|N
-36E6AC:t2:A5:sname,A3:acc
-=proc_dictionary:<0.48.0>
-H385E48
-H385E54
-=proc_stack:<0.48.0>
-3ac1bc:SReturn addr 0x225860 (proc_lib:init_p/5 + 164)
-y0:N
-y1:A8:infinity
-y2:A10:crashdump_viewer
-y3:H3AB280
-y4:A17:crashdump_viewer_server
-y5:P<0.41.0>
-3ac1d8:SReturn addr 0x156F90 (<terminate process normally>)
-y0:SCatch 0x225860 (proc_lib:init_p/5 + 164)
-y1:A3:gen
-y2:A7:init_it
-y3:H385E90
-=proc_heap:<0.48.0>
-3AB280:t8:A5:state,A9:undefined,A9:undefined,A9:undefined,A5:false,I4,A9:undefined,P<0.56.0>
-385E90:lAA:gen_server|H385ED8
-385ED8:lP<0.41.0>|H385F10
-385F10:lP<0.41.0>|H385F58
-385F58:lH385FA8|H385FB4
-385FA8:t2:A5:local,A17:crashdump_viewer_server
-385FB4:lA10:crashdump_viewer|H386014
-386014:lN|H38606C
-38606C:lN|N
-385E48:t2:AD:$initial_call,H385EB0
-385EB0:t3:A3:gen,A7:init_it,H385E90
-385E54:t2:AA:$ancestors,H385EC0
-385EC0:lA6:websup|H385F08
-385F08:lA8:web_tool|H385F50
-385F50:lP<0.27.0>|N
-=proc_stack:<0.49.0>
-36a114:SReturn addr 0x30174C (io:parse_erl_exprs/3 + 92)
-y0:H369E10
-y1:P<0.22.0>
-36a120:SReturn addr 0x2E5360 (shell:'-get_command/4-fun-0-'/1 + 20)
-y0:N
-36a128:SReturn addr 0x156F90 (<terminate process normally>)
-=proc_heap:<0.49.0>
-369E10:E21:8372000364000D6E6F6E6F6465406E6F686F737400000001330000000000000000
-=atoms
-http_cache_control
-copy_word
-drop_line
-copy_line
-write_rest_of_line
-drop_to_empty_line
-read_to_empty_line_reverse
-set_pos
-read_line_backwards
-jumped
-jump_to_empty_line_or_eof
-get_pos
-translate_atoms
-translate_fun
-translate_funs
-translate_loaded_modules2
-translate_loaded_modules_totals
-translate_loaded_modules
-translate_links
-get_all_creations
-translate_node_info2
-translate_node_info
-translate_dist_info2
-translate_dist_info
-get_msg
-translate_timers
-translate_ets
-translate_ets_tables
-do_translate_sl_alloc_r7_r8
-translate_sl_alloc_r7_r8
-translate_sl_alloc_line
-do_translate_sl_alloc
-translate_sl_alloc
-translate_memory_and_allocated_area_r9b
-translate_allocated_areas
-translate_internal_table_line
-translate_index_table
-translate_hash_table
-translate_internal_tables
-translate_ports
-write_last_calls
-write_msg_q_stuff
-translate_process
-translate_processes
-erts_vsn
-translate_summary
-'Send'
-erl_crash_dump
-internal_tables
-mods
-zombies
-http_content_length
-http_content_type
-'-procs_summary_body/5-fun-0-'
-'-expanded_memory_body/2-fun-0-'
-'-expanded_memory_body/2-fun-1-'
-'-expanded_memory_body/2-fun-2-'
-'-ports_body/3-fun-0-'
-'-ets_tables_body/4-fun-0-'
-'-internal_ets_tables_table/1-fun-0-'
-'-timers_body/3-fun-0-'
-'-make_nodes_table/2-fun-0-'
-'-loaded_mods_body/5-fun-0-'
-'-funs_body/3-fun-0-'
-'-memory_body/3-fun-0-'
-'-allocated_areas_body/3-fun-0-'
-'-allocator_info_body/3-fun-0-'
-'-allocator_info_body/3-fun-1-'
-'-allocator_info_body/3-fun-2-'
-'-hash_tables_body/3-fun-0-'
-'-index_tables_body/3-fun-0-'
-enter_write_file
-replace_insrt
-'$insrt'
-special
-initial
-pretty_format
-heading
-to_gt_noreverse
-to_gt
-href_proc_port
-br
-font
-h2
-h1
-img
-href
-pre
-em
-td
-th
-tr
-frame
-frameset
-html_header
-index_tables_table
-index_tables_body
-hash_tables_table
-hash_tables_body
-allocator_info_body \ No newline at end of file
diff --git a/lib/observer/test/crashdump_viewer_SUITE_data/r10b_dump.trunc.250atoms b/lib/observer/test/crashdump_viewer_SUITE_data/r10b_dump.trunc.250atoms
deleted file mode 100644
index ce3e5d8228..0000000000
--- a/lib/observer/test/crashdump_viewer_SUITE_data/r10b_dump.trunc.250atoms
+++ /dev/null
@@ -1,13285 +0,0 @@
-=erl_crash_dump:0.1
-Wed Apr 21 13:22:44 2004
-Slogan: eheap_alloc: Cannot allocate 785672 bytes of memory (of type "heap").
-System version: Erlang (BEAM) emulator version 5.4 [source] [hipe] [threads:0]
-Compiled: Thu Dec 18 14:07:45 2003
-Atoms: 5614
-=memory
-total: 653336887
-processes: 1768396
-processes_used: 1765460
-system: 651568491
-atom: 244837
-atom_used: 237116
-binary: 648618369
-code: 2158413
-ets: 225620
-=hash_table:atom_tab
-size: 4813
-used: 3304
-objs: 5614
-depth: 7
-=index_table:atom_tab
-size: 5700
-limit: 1048576
-used: 5614
-rate: 100
-=hash_table:module_code
-size: 97
-used: 69
-objs: 107
-depth: 5
-=index_table:module_code
-size: 110
-limit: 65536
-used: 107
-rate: 10
-=hash_table:export_list
-size: 2411
-used: 1674
-objs: 2843
-depth: 6
-=index_table:export_list
-size: 2900
-limit: 65536
-used: 2843
-rate: 100
-=hash_table:process_reg
-size: 47
-used: 16
-objs: 23
-depth: 3
-=hash_table:fun_table
-size: 397
-used: 261
-objs: 400
-depth: 4
-=hash_table:node_table
-size: 11
-used: 1
-objs: 1
-depth: 1
-=hash_table:dist_table
-size: 11
-used: 1
-objs: 1
-depth: 1
-=allocated_areas
-processes: 1765460 1768396
-ets: 225620
-sys_misc: 24634
-static: 295033
-atom_space: 65544 57967
-binary: 648618369
-atom_table: 42141
-module_table: 920
-export_table: 21336
-register_table: 252
-fun_table: 1650
-module_refs: 1024
-loaded_code: 1968915
-dist_table: 159
-node_table: 131
-bits_bufs_size: 19
-bif_timer: 13392
-link_lh: 0
-dist_buf: 0
-proc: 15080 13576
-atom_entry: 137152 137008
-export_entry: 138448 137632
-module_entry: 4872 4352
-reg_proc: 1000 592
-link_nh: 2464 2080
-link_sh: 832 192
-proc_list: 24 24
-fun_entry: 22584 22584
-db_tab: 1632 1632
-=allocator:sys_alloc
-option e: true
-option m: libc
-=allocator:temp_alloc
-versions: 0.9 2.1
-option e: true
-option sbct: 524288
-option asbcst: 4145152
-option rsbcst: 90
-option rsbcmt: 80
-option mmbcs: 65536
-option mmsbc: 256
-option mmmbc: 10
-option lmbcs: 5242880
-option smbcs: 1048576
-option mbcgs: 10
-option as: af
-mbcs blocks: 0 9 9
-mbcs blocks size: 0 35376 35376
-mbcs carriers: 1 1 1
-mbcs mseg carriers: 0
-mbcs sys_alloc carriers: 1
-mbcs carriers size: 65568 65568 65568
-mbcs mseg carriers size: 0
-mbcs sys_alloc carriers size: 65568
-sbcs blocks: 0 0 0
-sbcs blocks size: 0 0 0
-sbcs carriers: 0 0 0
-sbcs mseg carriers: 0
-sbcs sys_alloc carriers: 0
-sbcs carriers size: 0 0 0
-sbcs mseg carriers size: 0
-sbcs sys_alloc carriers size: 0
-temp_alloc calls: 6155
-temp_free calls: 6155
-temp_realloc calls: 29
-mseg_alloc calls: 0
-mseg_dealloc calls: 0
-mseg_realloc calls: 0
-sys_alloc calls: 1
-sys_free calls: 0
-sys_realloc calls: 0
-=allocator:sl_alloc
-option e: false
-=allocator:std_alloc
-option e: false
-=allocator:ll_alloc
-versions: 0.9 2.1
-option e: true
-option sbct: 4294967295
-option asbcst: 0
-option rsbcst: 0
-option rsbcmt: 0
-option mmbcs: 2097152
-option mmsbc: 0
-option mmmbc: 0
-option lmbcs: 5242880
-option smbcs: 1048576
-option mbcgs: 10
-option as: aobf
-mbcs blocks: 592 592 592
-mbcs blocks size: 2838520 2863304 2863304
-mbcs carriers: 2 2 2
-mbcs mseg carriers: 0
-mbcs sys_alloc carriers: 2
-mbcs carriers size: 3145760 3145760 3145760
-mbcs mseg carriers size: 0
-mbcs sys_alloc carriers size: 3145760
-sbcs blocks: 0 0 0
-sbcs blocks size: 0 0 0
-sbcs carriers: 0 0 0
-sbcs mseg carriers: 0
-sbcs sys_alloc carriers: 0
-sbcs carriers size: 0 0 0
-sbcs mseg carriers size: 0
-sbcs sys_alloc carriers size: 0
-ll_alloc calls: 592
-ll_free calls: 0
-ll_realloc calls: 235
-mseg_alloc calls: 0
-mseg_dealloc calls: 0
-mseg_realloc calls: 0
-sys_alloc calls: 2
-sys_free calls: 0
-sys_realloc calls: 0
-=allocator:eheap_alloc
-versions: 2.1 2.1
-option e: true
-option sbct: 524288
-option asbcst: 4145152
-option rsbcst: 50
-option rsbcmt: 80
-option mmbcs: 524288
-option mmsbc: 256
-option mmmbc: 10
-option lmbcs: 5242880
-option smbcs: 1048576
-option mbcgs: 10
-option mbsd: 3
-option as: gf
-mbcs blocks: 56 102 102
-mbcs blocks size: 833280 1638920 1638920
-mbcs carriers: 2 3 3
-mbcs mseg carriers: 1
-mbcs sys_alloc carriers: 1
-mbcs carriers size: 1998880 3047456 3047456
-mbcs mseg carriers size: 1474560
-mbcs sys_alloc carriers size: 524320
-sbcs blocks: 0 0 0
-sbcs blocks size: 0 0 0
-sbcs carriers: 0 0 0
-sbcs mseg carriers: 0
-sbcs sys_alloc carriers: 0
-sbcs carriers size: 0 0 0
-sbcs mseg carriers size: 0
-sbcs sys_alloc carriers size: 0
-eheap_alloc calls: 6971
-eheap_free calls: 6914
-eheap_realloc calls: 461
-mseg_alloc calls: 16
-mseg_dealloc calls: 14
-mseg_realloc calls: 0
-sys_alloc calls: 3
-sys_free calls: 0
-sys_realloc calls: 0
-=allocator:binary_alloc
-option e: false
-=allocator:ets_alloc
-option e: false
-=allocator:fix_alloc
-option e: true
-proc: 15080 13576
-atom_entry: 137152 137008
-export_entry: 138448 137632
-module_entry: 4872 4352
-reg_proc: 1000 592
-link_nh: 2464 2080
-link_sh: 832 192
-proc_list: 24 24
-fun_entry: 22584 22584
-db_tab: 1632 1632
-=allocator:mseg_alloc
-version: 0.9
-option amcbf: 4194304
-option rmcbf: 20
-option mcs: 5
-option cci: 1000
-cached_segments: 0
-cache_hits: 13
-segments: 2
-segments_watermark: 2
-mseg_alloc calls: 16
-mseg_dealloc calls: 14
-mseg_realloc calls: 0
-mseg_create calls: 4
-mseg_destroy calls: 1
-mseg_clear_cache calls: 6
-mseg_check_cache calls: 2
-=allocator:alloc_util
-option mmc: 1024
-option ycs: 1048576
-=allocator:instr
-option m: false
-option s: false
-option t: false
-=proc:<0.0.0>
-State: Waiting
-Name: init
-Spawned as: otp_ring0:start/2
-Spawned by: []
-Started: Wed Apr 21 13:22:07 2004
-Message queue length: 0
-Number of heap fragments: 0
-Heap fragment data: 0
-Link list: [<0.5.0>,<0.4.0>,<0.2.0>]
-Reductions: 3851
-Stack+heap: 377
-OldHeap: 610
-Heap unused: 53
-OldHeap unused: 610
-Program counter: 0x1f496c (init:loop/1 + 20)
-CP: 0x156f90 (<terminate process normally>)
-arity = 0
-=proc:<0.2.0>
-State: Waiting
-Name: erl_prim_loader
-Spawned as: erlang:apply/2
-Spawned by: <0.1.0>
-Started: Wed Apr 21 13:22:07 2004
-Message queue length: 0
-Number of heap fragments: 0
-Heap fragment data: 0
-Link list: [<0.0.0>,#Port<0.2>]
-Reductions: 201036
-Stack+heap: 987
-OldHeap: 987
-Heap unused: 923
-OldHeap unused: 987
-Program counter: 0x20cc94 (erl_prim_loader:loop/3 + 52)
-CP: 0x156f90 (<terminate process normally>)
-arity = 0
-=proc:<0.4.0>
-State: Waiting
-Name: error_logger
-Spawned as: proc_lib:init_p/5
-Spawned by: <0.1.0>
-Started: Wed Apr 21 13:22:07 2004
-Message queue length: 0
-Number of heap fragments: 0
-Heap fragment data: 0
-Link list: [<0.21.0>,<0.0.0>]
-Reductions: 296
-Stack+heap: 6765
-OldHeap: 0
-Heap unused: 851
-OldHeap unused: 0
-Program counter: 0x21f5b8 (gen_event:loop/4 + 40)
-CP: 0x225860 (proc_lib:init_p/5 + 164)
-arity = 0
-=proc:<0.5.0>
-State: Waiting
-Name: application_controller
-Spawned as: proc_lib:init_p/5
-Spawned by: <0.1.0>
-Started: Wed Apr 21 13:22:07 2004
-Message queue length: 0
-Number of heap fragments: 0
-Heap fragment data: 0
-Link list: [<0.7.0>,<0.0.0>]
-Reductions: 1508
-Stack+heap: 1597
-OldHeap: 0
-Heap unused: 835
-OldHeap unused: 0
-Program counter: 0x239d50 (gen_server:loop/6 + 52)
-CP: 0x225860 (proc_lib:init_p/5 + 164)
-arity = 0
-=proc:<0.7.0>
-State: Waiting
-Spawned as: proc_lib:init_p/5
-Spawned by: <0.6.0>
-Started: Wed Apr 21 13:22:07 2004
-Message queue length: 0
-Number of heap fragments: 0
-Heap fragment data: 0
-Link list: [<0.8.0>,<0.5.0>]
-Reductions: 23
-Stack+heap: 377
-OldHeap: 0
-Heap unused: 79
-OldHeap unused: 0
-Program counter: 0x248d04 (application_master:main_loop/2 + 28)
-CP: 0x225860 (proc_lib:init_p/5 + 164)
-arity = 0
-=proc:<0.8.0>
-State: Waiting
-Spawned as: application_master:start_it/4
-Spawned by: <0.7.0>
-Started: Wed Apr 21 13:22:07 2004
-Message queue length: 0
-Number of heap fragments: 0
-Heap fragment data: 0
-Link list: [<0.9.0>,<0.7.0>]
-Reductions: 91
-Stack+heap: 233
-OldHeap: 0
-Heap unused: 177
-OldHeap unused: 0
-Program counter: 0x24a26c (application_master:loop_it/4 + 40)
-CP: 0x156f90 (<terminate process normally>)
-arity = 0
-=proc:<0.9.0>
-State: Waiting
-Name: kernel_sup
-Spawned as: proc_lib:init_p/5
-Spawned by: <0.8.0>
-Started: Wed Apr 21 13:22:07 2004
-Message queue length: 0
-Number of heap fragments: 0
-Heap fragment data: 0
-Link list: [<0.24.0>,<0.23.0>,<0.19.0>,<0.18.0>,<0.17.0>,<0.16.0>,<0.15.0>,<0.14.0>,<0.11.0>,<0.10.0>,<0.8.0>]
-Reductions: 7402
-Stack+heap: 610
-OldHeap: 987
-Heap unused: 311
-OldHeap unused: 987
-Program counter: 0x239d50 (gen_server:loop/6 + 52)
-CP: 0x225860 (proc_lib:init_p/5 + 164)
-arity = 0
-=proc:<0.10.0>
-State: Waiting
-Name: rex
-Spawned as: proc_lib:init_p/5
-Spawned by: <0.9.0>
-Started: Wed Apr 21 13:22:07 2004
-Message queue length: 0
-Number of heap fragments: 0
-Heap fragment data: 0
-Link list: [<0.9.0>]
-Reductions: 44
-Stack+heap: 233
-OldHeap: 0
-Heap unused: 144
-OldHeap unused: 0
-Program counter: 0x239d50 (gen_server:loop/6 + 52)
-CP: 0x225860 (proc_lib:init_p/5 + 164)
-arity = 0
-=proc:<0.11.0>
-State: Waiting
-Name: global_name_server
-Spawned as: proc_lib:init_p/5
-Spawned by: <0.9.0>
-Started: Wed Apr 21 13:22:07 2004
-Message queue length: 0
-Number of heap fragments: 0
-Heap fragment data: 0
-Link list: [<0.13.0>,<0.12.0>,<0.9.0>]
-Reductions: 47
-Stack+heap: 233
-OldHeap: 0
-Heap unused: 98
-OldHeap unused: 0
-Program counter: 0x239d50 (gen_server:loop/6 + 52)
-CP: 0x225860 (proc_lib:init_p/5 + 164)
-arity = 0
-=proc:<0.12.0>
-State: Waiting
-Spawned as: global:init_the_locker/1
-Spawned by: <0.11.0>
-Started: Wed Apr 21 13:22:07 2004
-Message queue length: 0
-Number of heap fragments: 0
-Heap fragment data: 0
-Link list: [<0.11.0>]
-Reductions: 3
-Stack+heap: 233
-OldHeap: 0
-Heap unused: 227
-OldHeap unused: 0
-Program counter: 0x261340 (global:loop_the_locker/2 + 92)
-CP: 0x261184 (global:init_the_locker/1 + 112)
-arity = 0
-=proc:<0.13.0>
-State: Waiting
-Spawned as: erlang:apply/2
-Spawned by: <0.11.0>
-Started: Wed Apr 21 13:22:07 2004
-Message queue length: 0
-Number of heap fragments: 0
-Heap fragment data: 0
-Link list: [<0.11.0>]
-Reductions: 4
-Stack+heap: 233
-OldHeap: 0
-Heap unused: 221
-OldHeap unused: 0
-Program counter: 0x265288 (global:collect_deletions/2 + 76)
-CP: 0x2651ac (global:loop_the_deleter/1 + 36)
-arity = 0
-=proc:<0.14.0>
-State: Waiting
-Name: inet_db
-Spawned as: proc_lib:init_p/5
-Spawned by: <0.9.0>
-Started: Wed Apr 21 13:22:07 2004
-Message queue length: 0
-Number of heap fragments: 0
-Heap fragment data: 0
-Link list: [<0.9.0>]
-Reductions: 376
-Stack+heap: 233
-OldHeap: 233
-Heap unused: 30
-OldHeap unused: 233
-Program counter: 0x239d50 (gen_server:loop/6 + 52)
-CP: 0x225860 (proc_lib:init_p/5 + 164)
-arity = 0
-=proc:<0.15.0>
-State: Waiting
-Name: global_group
-Spawned as: proc_lib:init_p/5
-Spawned by: <0.9.0>
-Started: Wed Apr 21 13:22:07 2004
-Message queue length: 0
-Number of heap fragments: 0
-Heap fragment data: 0
-Link list: [<0.9.0>]
-Reductions: 71
-Stack+heap: 233
-OldHeap: 0
-Heap unused: 92
-OldHeap unused: 0
-Program counter: 0x239d50 (gen_server:loop/6 + 52)
-CP: 0x225860 (proc_lib:init_p/5 + 164)
-arity = 0
-=proc:<0.16.0>
-State: Waiting
-Name: file_server_2
-Spawned as: proc_lib:init_p/5
-Spawned by: <0.9.0>
-Started: Wed Apr 21 13:22:07 2004
-Message queue length: 0
-Number of heap fragments: 1
-Heap fragment data: 119
-Link list: [{from,<0.17.0>,#Ref<0.0.0.22>},#Port<0.4>,<0.9.0>]
-Reductions: 83605
-Stack+heap: 4181
-OldHeap: 4181
-Heap unused: 1720
-OldHeap unused: 4181
-Program counter: 0x239d50 (gen_server:loop/6 + 52)
-CP: 0x225860 (proc_lib:init_p/5 + 164)
-arity = 0
-=proc:<0.17.0>
-State: Waiting
-Name: file_server
-Spawned as: erlang:apply/2
-Spawned by: <0.9.0>
-Started: Wed Apr 21 13:22:07 2004
-Message queue length: 0
-Number of heap fragments: 0
-Heap fragment data: 0
-Link list: [{to,<0.16.0>,#Ref<0.0.0.22>},<0.9.0>]
-Reductions: 12
-Stack+heap: 233
-OldHeap: 0
-Heap unused: 207
-OldHeap unused: 0
-Program counter: 0x2a18e8 (old_file_server:relay_loop/3 + 32)
-CP: 0x156f90 (<terminate process normally>)
-arity = 0
-=proc:<0.18.0>
-State: Waiting
-Name: code_server
-Spawned as: erlang:apply/2
-Spawned by: <0.9.0>
-Started: Wed Apr 21 13:22:07 2004
-Message queue length: 0
-Number of heap fragments: 0
-Heap fragment data: 0
-Link list: [<0.9.0>]
-Reductions: 108900
-Stack+heap: 6765
-OldHeap: 6765
-Heap unused: 4389
-OldHeap unused: 6765
-Program counter: 0x2a6e64 (code_server:loop/1 + 64)
-CP: 0x156f90 (<terminate process normally>)
-arity = 0
-=proc:<0.19.0>
-State: Waiting
-Spawned as: proc_lib:init_p/5
-Spawned by: <0.9.0>
-Started: Wed Apr 21 13:22:08 2004
-Message queue length: 0
-Number of heap fragments: 0
-Heap fragment data: 0
-Link list: [<0.21.0>,<0.9.0>]
-Reductions: 74
-Stack+heap: 233
-OldHeap: 233
-Heap unused: 180
-OldHeap unused: 233
-Program counter: 0x239d50 (gen_server:loop/6 + 52)
-CP: 0x225860 (proc_lib:init_p/5 + 164)
-arity = 0
-=proc:<0.20.0>
-State: Waiting
-Spawned as: user_drv:server/2
-Spawned by: <0.19.0>
-Started: Wed Apr 21 13:22:08 2004
-Message queue length: 0
-Number of heap fragments: 0
-Heap fragment data: 0
-Link list: [<0.22.0>,<0.21.0>,#Port<0.72>]
-Reductions: 596
-Stack+heap: 233
-OldHeap: 377
-Heap unused: 214
-OldHeap unused: 377
-Program counter: 0x2ca4e0 (user_drv:server_loop/5 + 56)
-CP: 0x156f90 (<terminate process normally>)
-arity = 0
-=proc:<0.21.0>
-State: Waiting
-Name: user
-Spawned as: group:server/2
-Spawned by: <0.20.0>
-Started: Wed Apr 21 13:22:08 2004
-Message queue length: 0
-Number of heap fragments: 0
-Heap fragment data: 0
-Link list: [<0.4.0>,<0.19.0>,<0.20.0>]
-Reductions: 26
-Stack+heap: 233
-OldHeap: 0
-Heap unused: 202
-OldHeap unused: 0
-Program counter: 0x2cd9d8 (group:server_loop/3 + 32)
-CP: 0x156f90 (<terminate process normally>)
-arity = 0
-=proc:<0.22.0>
-State: Waiting
-Spawned as: group:server/2
-Spawned by: <0.20.0>
-Started: Wed Apr 21 13:22:08 2004
-Message queue length: 0
-Number of heap fragments: 0
-Heap fragment data: 0
-Link list: [{from,<0.49.0>,#Ref<0.0.0.307>},<0.25.0>,<0.20.0>]
-Reductions: 1244
-Stack+heap: 233
-OldHeap: 233
-Heap unused: 40
-OldHeap unused: 233
-Program counter: 0x2cf238 (group:get_line1/3 + 1652)
-CP: 0x2cf230 (group:get_line1/3 + 1644)
-arity = 0
-=proc:<0.23.0>
-State: Waiting
-Spawned as: proc_lib:init_p/5
-Spawned by: <0.9.0>
-Started: Wed Apr 21 13:22:08 2004
-Message queue length: 0
-Number of heap fragments: 0
-Heap fragment data: 0
-Link list: [<0.9.0>]
-Reductions: 45
-Stack+heap: 233
-OldHeap: 0
-Heap unused: 63
-OldHeap unused: 0
-Program counter: 0x239d50 (gen_server:loop/6 + 52)
-CP: 0x225860 (proc_lib:init_p/5 + 164)
-arity = 0
-=proc:<0.24.0>
-State: Waiting
-Name: kernel_safe_sup
-Spawned as: proc_lib:init_p/5
-Spawned by: <0.9.0>
-Started: Wed Apr 21 13:22:08 2004
-Message queue length: 0
-Number of heap fragments: 0
-Heap fragment data: 0
-Link list: [<0.31.0>,<0.9.0>]
-Reductions: 133
-Stack+heap: 233
-OldHeap: 233
-Heap unused: 198
-OldHeap unused: 233
-Program counter: 0x239d50 (gen_server:loop/6 + 52)
-CP: 0x225860 (proc_lib:init_p/5 + 164)
-arity = 0
-=proc:<0.25.0>
-State: Waiting
-Spawned as: erlang:apply/2
-Spawned by: <0.22.0>
-Started: Wed Apr 21 13:22:08 2004
-Message queue length: 0
-Number of heap fragments: 0
-Heap fragment data: 0
-Link list: [<0.49.0>,<0.27.0>,<0.22.0>]
-Reductions: 161
-Stack+heap: 233
-OldHeap: 0
-Heap unused: 169
-OldHeap unused: 0
-Program counter: 0x2e0d00 (shell:get_command1/4 + 40)
-CP: 0x2e06fc (shell:server_loop/6 + 140)
-arity = 0
-=proc:<0.27.0>
-State: Waiting
-Spawned as: erlang:apply/2
-Spawned by: <0.25.0>
-Started: Wed Apr 21 13:22:08 2004
-Message queue length: 0
-Number of heap fragments: 0
-Heap fragment data: 0
-Link list: [<0.25.0>]
-Reductions: 506
-Stack+heap: 4181
-OldHeap: 0
-Heap unused: 1131
-OldHeap unused: 0
-Program counter: 0x2e2bbc (shell:eval_loop/2 + 32)
-CP: 0x156f90 (<terminate process normally>)
-arity = 0
-=proc:<0.31.0>
-State: Waiting
-Name: inet_gethost_native_sup
-Spawned as: proc_lib:init_p/5
-Spawned by: <0.24.0>
-Started: Wed Apr 21 13:22:17 2004
-Message queue length: 0
-Number of heap fragments: 0
-Heap fragment data: 0
-Link list: [<0.32.0>,<0.24.0>]
-Reductions: 49
-Stack+heap: 233
-OldHeap: 0
-Heap unused: 87
-OldHeap unused: 0
-Program counter: 0x239d50 (gen_server:loop/6 + 52)
-CP: 0x225860 (proc_lib:init_p/5 + 164)
-arity = 0
-=proc:<0.32.0>
-State: Waiting
-Name: inet_gethost_native
-Spawned as: inet_gethost_native:server_init/2
-Spawned by: <0.31.0>
-Started: Wed Apr 21 13:22:17 2004
-Message queue length: 0
-Number of heap fragments: 1
-Heap fragment data: 118
-Link list: [#Port<0.105>,<0.31.0>]
-Reductions: 65
-Stack+heap: 233
-OldHeap: 0
-Heap unused: 13
-OldHeap unused: 0
-Program counter: 0x4ad840 (inet_gethost_native:main_loop/1 + 20)
-CP: 0x156f90 (<terminate process normally>)
-arity = 0
-=proc:<0.33.0>
-State: Waiting
-Name: web_tool
-Spawned as: proc_lib:init_p/5
-Spawned by: <0.27.0>
-Started: Wed Apr 21 13:22:17 2004
-Message queue length: 0
-Number of heap fragments: 0
-Heap fragment data: 0
-Link list: [<0.41.0>]
-Reductions: 131773
-Stack+heap: 6765
-OldHeap: 6765
-Heap unused: 2941
-OldHeap unused: 6765
-Program counter: 0x239d50 (gen_server:loop/6 + 52)
-CP: 0x225860 (proc_lib:init_p/5 + 164)
-arity = 0
-=proc:<0.41.0>
-State: Waiting
-Name: websup
-Spawned as: proc_lib:init_p/5
-Spawned by: <0.33.0>
-Started: Wed Apr 21 13:22:17 2004
-Message queue length: 0
-Number of heap fragments: 0
-Heap fragment data: 0
-Link list: [<0.48.0>,<0.33.0>]
-Reductions: 118
-Stack+heap: 233
-OldHeap: 233
-Heap unused: 205
-OldHeap unused: 233
-Program counter: 0x239d50 (gen_server:loop/6 + 52)
-CP: 0x225860 (proc_lib:init_p/5 + 164)
-arity = 0
-=proc:<0.43.0>
-State: Waiting
-Name: httpd_sup__127_0_0_1__8888
-Spawned as: proc_lib:init_p/5
-Spawned by: <0.33.0>
-Started: Wed Apr 21 13:22:17 2004
-Message queue length: 0
-Number of heap fragments: 0
-Heap fragment data: 0
-Link list: [<0.46.0>,<0.45.0>,<0.44.0>]
-Reductions: 1220
-Stack+heap: 6765
-OldHeap: 0
-Heap unused: 277
-OldHeap unused: 0
-Program counter: 0x239d50 (gen_server:loop/6 + 52)
-CP: 0x225860 (proc_lib:init_p/5 + 164)
-arity = 0
-=proc:<0.44.0>
-State: Waiting
-Name: httpd_acc_sup__127_0_0_1__8888
-Spawned as: proc_lib:init_p/5
-Spawned by: <0.43.0>
-Started: Wed Apr 21 13:22:17 2004
-Message queue length: 0
-Number of heap fragments: 0
-Heap fragment data: 0
-Link list: [<0.47.0>,<0.43.0>]
-Reductions: 147
-Stack+heap: 233
-OldHeap: 233
-Heap unused: 77
-OldHeap unused: 233
-Program counter: 0x239d50 (gen_server:loop/6 + 52)
-CP: 0x225860 (proc_lib:init_p/5 + 164)
-arity = 0
-=proc:<0.45.0>
-State: Waiting
-Name: httpd_misc_sup__127_0_0_1__8888
-Spawned as: proc_lib:init_p/5
-Spawned by: <0.43.0>
-Started: Wed Apr 21 13:22:17 2004
-Message queue length: 0
-Number of heap fragments: 0
-Heap fragment data: 0
-Link list: [<0.43.0>]
-Reductions: 52
-Stack+heap: 233
-OldHeap: 0
-Heap unused: 80
-OldHeap unused: 0
-Program counter: 0x239d50 (gen_server:loop/6 + 52)
-CP: 0x225860 (proc_lib:init_p/5 + 164)
-arity = 0
-=proc:<0.46.0>
-State: Waiting
-Name: httpd__127_0_0_1__8888
-Spawned as: proc_lib:init_p/5
-Spawned by: <0.43.0>
-Started: Wed Apr 21 13:22:17 2004
-Message queue length: 0
-Number of heap fragments: 0
-Heap fragment data: 0
-Link list: [<0.43.0>]
-Reductions: 2905
-Stack+heap: 6765
-OldHeap: 10946
-Heap unused: 138
-OldHeap unused: 10946
-Program counter: 0x239d50 (gen_server:loop/6 + 52)
-CP: 0x225860 (proc_lib:init_p/5 + 164)
-arity = 0
-=proc:<0.47.0>
-State: Waiting
-Spawned as: proc_lib:init_p/5
-Spawned by: <0.44.0>
-Started: Wed Apr 21 13:22:18 2004
-Message queue length: 0
-Number of heap fragments: 0
-Heap fragment data: 0
-Link list: [#Port<0.161>,#Port<0.141>,<0.44.0>]
-Reductions: 874
-Stack+heap: 233
-OldHeap: 233
-Heap unused: 190
-OldHeap unused: 233
-Program counter: 0x1fe798 (prim_inet:accept0/2 + 96)
-CP: 0x1feb04 (prim_inet:async_accept/2 + 380)
-arity = 0
-=proc:<0.48.0>
-State: Waiting
-Name: crashdump_viewer_server
-Spawned as: proc_lib:init_p/5
-Spawned by: <0.41.0>
-Started: Wed Apr 21 13:22:18 2004
-Message queue length: 0
-Number of heap fragments: 0
-Heap fragment data: 0
-Link list: [<0.56.0>,<0.41.0>]
-Reductions: 1913
-Stack+heap: 987
-OldHeap: 987
-Heap unused: 524
-OldHeap unused: 987
-Program counter: 0x239d50 (gen_server:loop/6 + 52)
-CP: 0x225860 (proc_lib:init_p/5 + 164)
-arity = 0
-=proc:<0.49.0>
-State: Waiting
-Spawned as: erlang:apply/2
-Spawned by: <0.25.0>
-Started: Wed Apr 21 13:22:18 2004
-Message queue length: 0
-Number of heap fragments: 0
-Heap fragment data: 0
-Link list: [{to,<0.22.0>,#Ref<0.0.0.307>},<0.25.0>]
-Reductions: 15
-Stack+heap: 233
-OldHeap: 0
-Heap unused: 190
-OldHeap unused: 0
-Program counter: 0x301d58 (io:wait_io_mon_reply/2 + 28)
-CP: 0x30174c (io:parse_erl_exprs/3 + 92)
-arity = 0
-=proc:<0.56.0>
-State: Garbing
-Spawned as: erlang:apply/2
-Last scheduled in for: erlang:garbage_collect/0
-Spawned by: <0.48.0>
-Started: Wed Apr 21 13:22:27 2004
-Message queue length: 0
-Number of heap fragments: 1
-Heap fragment data: 121
-Link list: [#Port<0.158>,#Port<0.157>,<0.48.0>]
-Reductions: 2420470
-Stack+heap: 121393
-OldHeap: 0
-Heap unused: 22172
-OldHeap unused: 0
-New heap start: FE5768E0
-New heap top: FE5D7734
-Stack top: FE5ED130
-Stack end: FE5ED1A4
-Old heap start: 0
-Old heap top: 0
-Old heap end: 0
-Program counter: 0x1a4980 (unknown function)
-CP: 0x20710c (prim_file:read/2 + 436)
-=port:#Port<0.1>
-Slot: 1
-Connected: #Port<0.0>
-Port controls linked-in driver: async
-=port:#Port<0.2>
-Slot: 2
-Connected: <0.2.0>
-Links: <0.2.0>
-Port controls linked-in driver: efile
-=port:#Port<0.4>
-Slot: 4
-Connected: <0.16.0>
-Links: <0.16.0>
-Port controls linked-in driver: efile
-=port:#Port<0.72>
-Slot: 72
-Connected: <0.20.0>
-Links: <0.20.0>
-Port controls linked-in driver: tty_sl -c -e
-=port:#Port<0.105>
-Slot: 105
-Connected: <0.32.0>
-Links: <0.32.0>
-Port controls external process: inet_gethost 4
-=port:#Port<0.141>
-Slot: 141
-Connected: <0.47.0>
-Links: <0.47.0>
-Port controls linked-in driver: tcp_inet
-=port:#Port<0.157>
-Slot: 157
-Connected: <0.56.0>
-Links: <0.56.0>
-Port controls linked-in driver: efile
-=port:#Port<0.158>
-Slot: 158
-Connected: <0.56.0>
-Links: <0.56.0>
-Port controls linked-in driver: efile
-=port:#Port<0.161>
-Slot: 161
-Connected: <0.47.0>
-Links: <0.47.0>
-Port controls linked-in driver: tcp_inet
-=ets:<0.18.0>
-Slot: 9
-Table: 9
-Name: code
-Buckets: 256
-Objects: 289
-Words: 14108
-=ets:<0.18.0>
-Slot: 10
-Table: 10
-Name: code_names
-Buckets: 256
-Objects: 47
-Words: 4334
-=ets:<0.32.0>
-Slot: 11
-Table: 11
-Name: ign_requests
-Buckets: 256
-Objects: 0
-Words: 277
-=ets:<0.32.0>
-Slot: 12
-Table: 12
-Name: ign_req_index
-Buckets: 256
-Objects: 0
-Words: 277
-=ets:<0.33.0>
-Slot: 13
-Table: 13
-Name: app_data
-Buckets: 256
-Objects: 7
-Words: 952
-=ets:<0.46.0>
-Slot: 15
-Table: 15
-Name: httpd_mime__127_0_0_1__8888
-Buckets: 256
-Objects: 105
-Words: 5742
-=ets:<0.11.0>
-Slot: 84
-Table: global_names
-Name: global_names
-Buckets: 256
-Objects: 0
-Words: 277
-=ets:<0.11.0>
-Slot: 95
-Table: global_locks
-Name: global_locks
-Buckets: 256
-Objects: 0
-Words: 277
-=ets:<0.11.0>
-Slot: 96
-Table: global_names_ext
-Name: global_names_ext
-Buckets: 256
-Objects: 0
-Words: 277
-=ets:<0.14.0>
-Slot: 316
-Table: inet_cache
-Name: inet_cache
-Buckets: 256
-Objects: 0
-Words: 277
-=ets:<0.48.0>
-Slot: 340
-Table: cdv_menu_table
-Name: cdv_menu_table
-Buckets: 256
-Objects: 0
-Words: 277
-=ets:<0.48.0>
-Slot: 341
-Table: cdv_dump_index_table
-Name: cdv_dump_index_table
-Buckets: 256
-Objects: 0
-Words: 277
-=ets:<0.48.0>
-Slot: 342
-Table: cdv_decode_heap_table
-Name: cdv_decode_heap_table
-Buckets: 256
-Objects: 0
-Words: 277
-=ets:<0.16.0>
-Slot: 780
-Table: file_io_servers
-Name: file_io_servers
-Buckets: 256
-Objects: 0
-Words: 277
-=ets:<0.46.0>
-Slot: 984
-Table: httpd_conf__127_0_0_1__8888
-Name: httpd_conf__127_0_0_1__8888
-Buckets: 256
-Objects: 17
-Words: 1176
-=ets:<0.14.0>
-Slot: 1342
-Table: inet_hosts
-Name: inet_hosts
-Buckets: 256
-Objects: 4
-Words: 421
-=ets:<0.14.0>
-Slot: 1362
-Table: inet_db
-Name: inet_db
-Buckets: 256
-Objects: 20
-Words: 671
-=ets:<0.5.0>
-Slot: 1655
-Table: ac_tab
-Name: ac_tab
-Buckets: 256
-Objects: 6
-Words: 843
-=timer:<0.14.0>
-Message: refresh_timeout
-Time left: 3565692 ms
-=node:'nonode@nohost'
-=no_distribution
-=loaded_modules
-Current code: 1968915
-Old code: 0
-=mod:otp_ring0
-Current size: 489
-=mod:init
-Current size: 30110
-=mod:prim_inet
-Current size: 35532
-=mod:prim_file
-Current size: 24965
-=mod:erl_prim_loader
-Current size: 19607
-=mod:erlang
-Current size: 11137
-=mod:error_handler
-Current size: 2389
-Current attributes: 836C00000001680264000376736E6C000000016E100030769A34345F26EF6D3433254FF2AE576A6A
-Current compilation info: 836C0000000468026400076F7074696F6E736C0000000568026400036377646B00222F636C656172636173652F6F74702F657274732F6C69622F6B65726E656C2F73726368026400066F75746469726B002A2F636C656172636173652F6F74702F657274732F6C69622F6B65726E656C2F7372632F2E2E2F6562696E6802640001696B002D2F636C656172636173652F6F74702F657274732F6C69622F6B65726E656C2F7372632F2E2E2F696E636C75646564000A64656275675F696E666F6400107761726E5F756E757365645F766172736A680264000776657273696F6E6B0005342E322E31680264000474696D65680662000007D3610C6112610B613161216802640006736F757263656B00342F636C656172636173652F6F74702F657274732F6C69622F6B65726E656C2F7372632F6572726F725F68616E646C65722E65726C6A
-=mod:heart
-Current size: 6687
-Current attributes: 836C00000001680264000376736E6C000000016E10003094F7BECF345494DDBB4D7186E694186A6A
-Current compilation info: 836C0000000468026400076F7074696F6E736C0000000568026400036377646B00222F636C656172636173652F6F74702F657274732F6C69622F6B65726E656C2F73726368026400066F75746469726B002A2F636C656172636173652F6F74702F657274732F6C69622F6B65726E656C2F7372632F2E2E2F6562696E6802640001696B002D2F636C656172636173652F6F74702F657274732F6C69622F6B65726E656C2F7372632F2E2E2F696E636C75646564000A64656275675F696E666F6400107761726E5F756E757365645F766172736A680264000776657273696F6E6B0005342E322E31680264000474696D65680662000007D3610C6112610B613261086802640006736F757263656B002C2F636C656172636173652F6F74702F657274732F6C69622F6B65726E656C2F7372632F68656172742E65726C6A
-=mod:error_logger
-Current size: 7051
-Current attributes: 836C00000001680264000376736E6C000000016E10004E3347F841DEAE2EB6A74389E6E127146A6A
-Current compilation info: 836C0000000468026400076F7074696F6E736C0000000568026400036377646B00222F636C656172636173652F6F74702F657274732F6C69622F6B65726E656C2F73726368026400066F75746469726B002A2F636C656172636173652F6F74702F657274732F6C69622F6B65726E656C2F7372632F2E2E2F6562696E6802640001696B002D2F636C656172636173652F6F74702F657274732F6C69622F6B65726E656C2F7372632F2E2E2F696E636C75646564000A64656275675F696E666F6400107761726E5F756E757365645F766172736A680264000776657273696F6E6B0005342E322E31680264000474696D65680662000007D3610C6112610B613161246802640006736F757263656B00332F636C656172636173652F6F74702F657274732F6C69622F6B65726E656C2F7372632F6572726F725F6C6F676765722E65726C6A
-=mod:gen_event
-Current size: 18288
-Current attributes: 836C00000001680264000376736E6C000000016E1000336F22DF1EA75E0EA4AE65D3B8C34F946A6A
-Current compilation info: 836C0000000468026400076F7074696F6E736C0000000768026400036377646B00222F636C656172636173652F6F74702F657274732F6C69622F7374646C69622F73726368026400066F75746469726B002A2F636C656172636173652F6F74702F657274732F6C69622F7374646C69622F7372632F2E2E2F6562696E6802640001696B002D2F636C656172636173652F6F74702F657274732F6C69622F7374646C69622F7372632F2E2E2F696E636C7564656802640001696B00372F636C656172636173652F6F74702F657274732F6C69622F7374646C69622F7372632F2E2E2F2E2E2F6B65726E656C2F696E636C7564656400107761726E5F756E757365645F7661727364000A64656275675F696E666F6400107761726E5F756E757365645F766172736A680264000776657273696F6E6B0005342E322E31680264000474696D65680662000007D3610C6112610B612D61346802640006736F757263656B00302F636C656172636173652F6F74702F657274732F6C69622F7374646C69622F7372632F67656E5F6576656E742E65726C6A
-=mod:gen
-Current size: 7129
-Current attributes: 836C00000001680264000376736E6C000000016E10007BE6AEB66EF48D8B33323C89C9936A526A6A
-Current compilation info: 836C0000000468026400076F7074696F6E736C0000000768026400036377646B00222F636C656172636173652F6F74702F657274732F6C69622F7374646C69622F73726368026400066F75746469726B002A2F636C656172636173652F6F74702F657274732F6C69622F7374646C69622F7372632F2E2E2F6562696E6802640001696B002D2F636C656172636173652F6F74702F657274732F6C69622F7374646C69622F7372632F2E2E2F696E636C7564656802640001696B00372F636C656172636173652F6F74702F657274732F6C69622F7374646C69622F7372632F2E2E2F2E2E2F6B65726E656C2F696E636C7564656400107761726E5F756E757365645F7661727364000A64656275675F696E666F6400107761726E5F756E757365645F766172736A680264000776657273696F6E6B0005342E322E31680264000474696D65680662000007D3610C6112610B612D61316802640006736F757263656B002A2F636C656172636173652F6F74702F657274732F6C69622F7374646C69622F7372632F67656E2E65726C6A
-=mod:proc_lib
-Current size: 11658
-Current attributes: 836C00000001680264000376736E6C000000016E10005C589A8C9BD2E1F2E895E765CAE983406A6A
-Current compilation info: 836C0000000468026400076F7074696F6E736C0000000768026400036377646B00222F636C656172636173652F6F74702F657274732F6C69622F7374646C69622F73726368026400066F75746469726B002A2F636C656172636173652F6F74702F657274732F6C69622F7374646C69622F7372632F2E2E2F6562696E6802640001696B002D2F636C656172636173652F6F74702F657274732F6C69622F7374646C69622F7372632F2E2E2F696E636C7564656802640001696B00372F636C656172636173652F6F74702F657274732F6C69622F7374646C69622F7372632F2E2E2F2E2E2F6B65726E656C2F696E636C7564656400107761726E5F756E757365645F7661727364000A64656275675F696E666F6400107761726E5F756E757365645F766172736A680264000776657273696F6E6B0005342E322E31680264000474696D65680662000007D3610C6112610B612E612D6802640006736F757263656B002F2F636C656172636173652F6F74702F657274732F6C69622F7374646C69622F7372632F70726F635F6C69622E65726C6A
-=mod:application_controller
-Current size: 55249
-Current attributes: 836C00000002680264000376736E6C000000016E10003372E1AB0410565065FA086086A721316A68026400096265686176696F75726C0000000164000A67656E5F7365727665726A6A
-Current compilation info: 836C0000000468026400076F7074696F6E736C0000000568026400036377646B00222F636C656172636173652F6F74702F657274732F6C69622F6B65726E656C2F73726368026400066F75746469726B002A2F636C656172636173652F6F74702F657274732F6C69622F6B65726E656C2F7372632F2E2E2F6562696E6802640001696B002D2F636C656172636173652F6F74702F657274732F6C69622F6B65726E656C2F7372632F2E2E2F696E636C75646564000A64656275675F696E666F6400107761726E5F756E757365645F766172736A680264000776657273696F6E6B0005342E322E31680264000474696D65680662000007D3610C6112610B613061246802640006736F757263656B003D2F636C656172636173652F6F74702F657274732F6C69622F6B65726E656C2F7372632F6170706C69636174696F6E5F636F6E74726F6C6C65722E65726C6A
-=mod:gen_server
-Current size: 18728
-Current attributes: 836C00000001680264000376736E6C000000016E10004C5E93533036DAC7698FC4112F59CF236A6A
-Current compilation info: 836C0000000468026400076F7074696F6E736C0000000768026400036377646B00222F636C656172636173652F6F74702F657274732F6C69622F7374646C69622F73726368026400066F75746469726B002A2F636C656172636173652F6F74702F657274732F6C69622F7374646C69622F7372632F2E2E2F6562696E6802640001696B002D2F636C656172636173652F6F74702F657274732F6C69622F7374646C69622F7372632F2E2E2F696E636C7564656802640001696B00372F636C656172636173652F6F74702F657274732F6C69622F7374646C69622F7372632F2E2E2F2E2E2F6B65726E656C2F696E636C7564656400107761726E5F756E757365645F7661727364000A64656275675F696E666F6400107761726E5F756E757365645F766172736A680264000776657273696F6E6B0005342E322E31680264000474696D65680662000007D3610C6112610B612D61396802640006736F757263656B00312F636C656172636173652F6F74702F657274732F6C69622F7374646C69622F7372632F67656E5F7365727665722E65726C6A
-=mod:sys
-Current size: 11589
-Current attributes: 836C00000001680264000376736E6C000000016E1000E12B0E8267551204BD5924BAB9629ADF6A6A
-Current compilation info: 836C0000000468026400076F7074696F6E736C0000000768026400036377646B00222F636C656172636173652F6F74702F657274732F6C69622F7374646C69622F73726368026400066F75746469726B002A2F636C656172636173652F6F74702F657274732F6C69622F7374646C69622F7372632F2E2E2F6562696E6802640001696B002D2F636C656172636173652F6F74702F657274732F6C69622F7374646C69622F7372632F2E2E2F696E636C7564656802640001696B00372F636C656172636173652F6F74702F657274732F6C69622F7374646C69622F7372632F2E2E2F2E2E2F6B65726E656C2F696E636C7564656400107761726E5F756E757365645F7661727364000A64656275675F696E666F6400107761726E5F756E757365645F766172736A680264000776657273696F6E6B0005342E322E31680264000474696D65680662000007D3610C6112610B612F61176802640006736F757263656B002A2F636C656172636173652F6F74702F657274732F6C69622F7374646C69622F7372632F7379732E65726C6A
-=mod:lists
-Current size: 18638
-Current attributes: 836C00000002680264000376736E6C000000016E10001E95B32C30E4CDAF0BDD1ABA58CBB5F36A680264000A646570726563617465646C0000000B68026400066B65796D617061046802640003616C6C61036802640003616E79610368026400036D617061036802640007666C61746D617061036802640005666F6C646C61046802640005666F6C64726104680264000666696C746572610368026400086D6170666F6C646C610468026400086D6170666F6C647261046802640007666F726561636861036A6A
-Current compilation info: 836C0000000468026400076F7074696F6E736C0000000768026400036377646B00222F636C656172636173652F6F74702F657274732F6C69622F7374646C69622F73726368026400066F75746469726B002A2F636C656172636173652F6F74702F657274732F6C69622F7374646C69622F7372632F2E2E2F6562696E6802640001696B002D2F636C656172636173652F6F74702F657274732F6C69622F7374646C69622F7372632F2E2E2F696E636C7564656802640001696B00372F636C656172636173652F6F74702F657274732F6C69622F7374646C69622F7372632F2E2E2F2E2E2F6B65726E656C2F696E636C7564656400107761726E5F756E757365645F7661727364000A64656275675F696E666F6400107761726E5F756E757365645F766172736A680264000776657273696F6E6B0005342E322E31680264000474696D65680662000007D3610C6112610B612E61116802640006736F757263656B002C2F636C656172636173652F6F74702F657274732F6C69622F7374646C69622F7372632F6C697374732E65726C6A
-=mod:application
-Current size: 2666
-Current attributes: 836C00000001680264000376736E6C000000016E1000C0C5A7B67B306300FEFF9D91AA50ECB36A6A
-Current compilation info: 836C0000000468026400076F7074696F6E736C0000000568026400036377646B00222F636C656172636173652F6F74702F657274732F6C69622F6B65726E656C2F73726368026400066F75746469726B002A2F636C656172636173652F6F74702F657274732F6C69622F6B65726E656C2F7372632F2E2E2F6562696E6802640001696B002D2F636C656172636173652F6F74702F657274732F6C69622F6B65726E656C2F7372632F2E2E2F696E636C75646564000A64656275675F696E666F6400107761726E5F756E757365645F766172736A680264000776657273696F6E6B0005342E322E31680264000474696D65680662000007D3610C6112610B6130611F6802640006736F757263656B00322F636C656172636173652F6F74702F657274732F6C69622F6B65726E656C2F7372632F6170706C69636174696F6E2E65726C6A
-=mod:application_master
-Current size: 10912
-Current attributes: 836C00000001680264000376736E6C000000016E1000360420F5CEB80AD7DD51B3A8A0E2AFA26A6A
-Current compilation info: 836C0000000468026400076F7074696F6E736C0000000568026400036377646B00222F636C656172636173652F6F74702F657274732F6C69622F6B65726E656C2F73726368026400066F75746469726B002A2F636C656172636173652F6F74702F657274732F6C69622F6B65726E656C2F7372632F2E2E2F6562696E6802640001696B002D2F636C656172636173652F6F74702F657274732F6C69622F6B65726E656C2F7372632F2E2E2F696E636C75646564000A64656275675F696E666F6400107761726E5F756E757365645F766172736A680264000776657273696F6E6B0005342E322E31680264000474696D65680662000007D3610C6112610B613061266802640006736F757263656B00392F636C656172636173652F6F74702F657274732F6C69622F6B65726E656C2F7372632F6170706C69636174696F6E5F6D61737465722E65726C6A
-=mod:kernel
-Current size: 7639
-Current attributes: 836C00000002680264000376736E6C000000016E10004D418ACCB0F948D4D3CA6B9A81B462746A68026400096265686176696F75726C0000000164000A73757065727669736F726A6A
-Current compilation info: 836C0000000468026400076F7074696F6E736C0000000568026400036377646B00222F636C656172636173652F6F74702F657274732F6C69622F6B65726E656C2F73726368026400066F75746469726B002A2F636C656172636173652F6F74702F657274732F6C69622F6B65726E656C2F7372632F2E2E2F6562696E6802640001696B002D2F636C656172636173652F6F74702F657274732F6C69622F6B65726E656C2F7372632F2E2E2F696E636C75646564000A64656275675F696E666F6400107761726E5F756E757365645F766172736A680264000776657273696F6E6B0005342E322E31680264000474696D65680662000007D3610C6112610B613261336802640006736F757263656B002D2F636C656172636173652F6F74702F657274732F6C69622F6B65726E656C2F7372632F6B65726E656C2E65726C6A
-=mod:supervisor
-Current size: 24469
-Current attributes: 836C00000002680264000376736E6C000000016E1000979F65727577135484BE0892A35087CC6A68026400096265686176696F75726C0000000164000A67656E5F7365727665726A6A
-Current compilation info: 836C0000000468026400076F7074696F6E736C0000000768026400036377646B00222F636C656172636173652F6F74702F657274732F6C69622F7374646C69622F73726368026400066F75746469726B002A2F636C656172636173652F6F74702F657274732F6C69622F7374646C69622F7372632F2E2E2F6562696E6802640001696B002D2F636C656172636173652F6F74702F657274732F6C69622F7374646C69622F7372632F2E2E2F696E636C7564656802640001696B00372F636C656172636173652F6F74702F657274732F6C69622F7374646C69622F7372632F2E2E2F2E2E2F6B65726E656C2F696E636C7564656400107761726E5F756E757365645F7661727364000A64656275675F696E666F6400107761726E5F756E757365645F766172736A680264000776657273696F6E6B0005342E322E31680264000474696D65680662000007D3610C6112610B612F61126802640006736F757263656B00312F636C656172636173652F6F74702F657274732F6C69622F7374646C69622F7372632F73757065727669736F722E65726C6A
-=mod:rpc
-Current size: 14539
-Current attributes: 836C00000002680264000376736E6C000000016E10008C5D6242D36B3201E3B11E82D5E1581E6A68026400096265686176696F75726C0000000164000A67656E5F7365727665726A6A
-Current compilation info: 836C0000000468026400076F7074696F6E736C0000000568026400036377646B00222F636C656172636173652F6F74702F657274732F6C69622F6B65726E656C2F73726368026400066F75746469726B002A2F636C656172636173652F6F74702F657274732F6C69622F6B65726E656C2F7372632F2E2E2F6562696E6802640001696B002D2F636C656172636173652F6F74702F657274732F6C69622F6B65726E656C2F7372632F2E2E2F696E636C75646564000A64656275675F696E666F6400107761726E5F756E757365645F766172736A680264000776657273696F6E6B0005342E322E31680264000474696D65680662000007D3610C6112610B6133610F6802640006736F757263656B002A2F636C656172636173652F6F74702F657274732F6C69622F6B65726E656C2F7372632F7270632E65726C6A
-=mod:gb_trees
-Current size: 8274
-Current attributes: 836C00000001680264000376736E6C000000016E1000094BEFDE7B866EF2CB6FCD895AC2EE056A6A
-Current compilation info: 836C0000000468026400076F7074696F6E736C0000000768026400036377646B00222F636C656172636173652F6F74702F657274732F6C69622F7374646C69622F73726368026400066F75746469726B002A2F636C656172636173652F6F74702F657274732F6C69622F7374646C69622F7372632F2E2E2F6562696E6802640001696B002D2F636C656172636173652F6F74702F657274732F6C69622F7374646C69622F7372632F2E2E2F696E636C7564656802640001696B00372F636C656172636173652F6F74702F657274732F6C69622F7374646C69622F7372632F2E2E2F2E2E2F6B65726E656C2F696E636C7564656400107761726E5F756E757365645F7661727364000A64656275675F696E666F6400107761726E5F756E757365645F766172736A680264000776657273696F6E6B0005342E322E31680264000474696D65680662000007D3610C6112610B612D612B6802640006736F757263656B002F2F636C656172636173652F6F74702F657274732F6C69622F7374646C69622F7372632F67625F74726565732E65726C6A
-=mod:global
-Current size: 40753
-Current attributes: 836C00000002680264000376736E6C000000016E10001D02C89BDE6CB2052F099894683C14CA6A68026400096265686176696F75726C0000000164000A67656E5F7365727665726A6A
-Current compilation info: 836C0000000468026400076F7074696F6E736C0000000568026400036377646B00222F636C656172636173652F6F74702F657274732F6C69622F6B65726E656C2F73726368026400066F75746469726B002A2F636C656172636173652F6F74702F657274732F6C69622F6B65726E656C2F7372632F2E2E2F6562696E6802640001696B002D2F636C656172636173652F6F74702F657274732F6C69622F6B65726E656C2F7372632F2E2E2F696E636C75646564000A64656275675F696E666F6400107761726E5F756E757365645F766172736A680264000776657273696F6E6B0005342E322E31680264000474696D65680662000007D3610C6112610B613161386802640006736F757263656B002D2F636C656172636173652F6F74702F657274732F6C69622F6B65726E656C2F7372632F676C6F62616C2E65726C6A
-=mod:inet_db
-Current size: 34555
-Current attributes: 836C00000001680264000376736E6C000000016E1000C1CF6A6F2E83D4EBC23D2CCECBF376226A6A
-Current compilation info: 836C0000000468026400076F7074696F6E736C0000000568026400036377646B00222F636C656172636173652F6F74702F657274732F6C69622F6B65726E656C2F73726368026400066F75746469726B002A2F636C656172636173652F6F74702F657274732F6C69622F6B65726E656C2F7372632F2E2E2F6562696E6802640001696B002D2F636C656172636173652F6F74702F657274732F6C69622F6B65726E656C2F7372632F2E2E2F696E636C75646564000A64656275675F696E666F6400107761726E5F756E757365645F766172736A680264000776657273696F6E6B0005342E322E31680264000474696D65680662000007D3610C6112610B6132611A6802640006736F757263656B002E2F636C656172636173652F6F74702F657274732F6C69622F6B65726E656C2F7372632F696E65745F64622E65726C6A
-=mod:inet_config
-Current size: 13575
-Current attributes: 836C00000001680264000376736E6C000000016E1000650F6571C03BC9C16BB7973A747565066A6A
-Current compilation info: 836C0000000468026400076F7074696F6E736C0000000568026400036377646B00222F636C656172636173652F6F74702F657274732F6C69622F6B65726E656C2F73726368026400066F75746469726B002A2F636C656172636173652F6F74702F657274732F6C69622F6B65726E656C2F7372632F2E2E2F6562696E6802640001696B002D2F636C656172636173652F6F74702F657274732F6C69622F6B65726E656C2F7372632F2E2E2F696E636C75646564000A64656275675F696E666F6400107761726E5F756E757365645F766172736A680264000776657273696F6E6B0005342E322E31680264000474696D65680662000007D3610C6112610B613261166802640006736F757263656B00322F636C656172636173652F6F74702F657274732F6C69622F6B65726E656C2F7372632F696E65745F636F6E6669672E65726C6A
-=mod:os
-Current size: 5997
-Current attributes: 836C00000001680264000376736E6C000000016E100017144CD766A604A9DFBA0B58C8FCA78B6A6A
-Current compilation info: 836C0000000468026400076F7074696F6E736C0000000568026400036377646B00222F636C656172636173652F6F74702F657274732F6C69622F6B65726E656C2F73726368026400066F75746469726B002A2F636C656172636173652F6F74702F657274732F6C69622F6B65726E656C2F7372632F2E2E2F6562696E6802640001696B002D2F636C656172636173652F6F74702F657274732F6C69622F6B65726E656C2F7372632F2E2E2F696E636C75646564000A64656275675F696E666F6400107761726E5F756E757365645F766172736A680264000776657273696F6E6B0005342E322E31680264000474696D65680662000007D3610C6112610B613361056802640006736F757263656B00292F636C656172636173652F6F74702F657274732F6C69622F6B65726E656C2F7372632F6F732E65726C6A
-=mod:inet_udp
-Current size: 2451
-Current attributes: 836C00000001680264000376736E6C000000016E1000ACB163E87A687A6683B50B331C6E289B6A6A
-Current compilation info: 836C0000000468026400076F7074696F6E736C0000000568026400036377646B00222F636C656172636173652F6F74702F657274732F6C69622F6B65726E656C2F73726368026400066F75746469726B002A2F636C656172636173652F6F74702F657274732F6C69622F6B65726E656C2F7372632F2E2E2F6562696E6802640001696B002D2F636C656172636173652F6F74702F657274732F6C69622F6B65726E656C2F7372632F2E2E2F696E636C75646564000A64656275675F696E666F6400107761726E5F756E757365645F766172736A680264000776657273696F6E6B0005342E322E31680264000474696D65680662000007D3610C6112610B613261306802640006736F757263656B002F2F636C656172636173652F6F74702F657274732F6C69622F6B65726E656C2F7372632F696E65745F7564702E65726C6A
-=mod:inet
-Current size: 28288
-Current attributes: 836C00000001680264000376736E6C000000016E10009B9AD400F0BAF6AAF17A4788A4EFF11E6A6A
-Current compilation info: 836C0000000468026400076F7074696F6E736C0000000568026400036377646B00222F636C656172636173652F6F74702F657274732F6C69622F6B65726E656C2F73726368026400066F75746469726B002A2F636C656172636173652F6F74702F657274732F6C69622F6B65726E656C2F7372632F2E2E2F6562696E6802640001696B002D2F636C656172636173652F6F74702F657274732F6C69622F6B65726E656C2F7372632F2E2E2F696E636C75646564000A64656275675F696E666F6400107761726E5F756E757365645F766172736A680264000776657273696F6E6B0005342E322E31680264000474696D65680662000007D3610C6112610B6132610C6802640006736F757263656B002B2F636C656172636173652F6F74702F657274732F6C69622F6B65726E656C2F7372632F696E65742E65726C6A
-=mod:inet_parse
-Current size: 21928
-Current attributes: 836C00000001680264000376736E6C000000016E1000E0E65454C096847749930EDC1C53C80B6A6A
-Current compilation info: 836C0000000468026400076F7074696F6E736C0000000568026400036377646B00222F636C656172636173652F6F74702F657274732F6C69622F6B65726E656C2F73726368026400066F75746469726B002A2F636C656172636173652F6F74702F657274732F6C69622F6B65726E656C2F7372632F2E2E2F6562696E6802640001696B002D2F636C656172636173652F6F74702F657274732F6C69622F6B65726E656C2F7372632F2E2E2F696E636C75646564000A64656275675F696E666F6400107761726E5F756E757365645F766172736A680264000776657273696F6E6B0005342E322E31680264000474696D65680662000007D3610C6112610B613261266802640006736F757263656B00312F636C656172636173652F6F74702F657274732F6C69622F6B65726E656C2F7372632F696E65745F70617273652E65726C6A
-=mod:filename
-Current size: 17411
-Current attributes: 836C00000001680264000376736E6C000000016E100068085214F459D51A3E08819BF8D7698A6A6A
-Current compilation info: 836C0000000468026400076F7074696F6E736C0000000768026400036377646B00222F636C656172636173652F6F74702F657274732F6C69622F7374646C69622F73726368026400066F75746469726B002A2F636C656172636173652F6F74702F657274732F6C69622F7374646C69622F7372632F2E2E2F6562696E6802640001696B002D2F636C656172636173652F6F74702F657274732F6C69622F7374646C69622F7372632F2E2E2F696E636C7564656802640001696B00372F636C656172636173652F6F74702F657274732F6C69622F7374646C69622F7372632F2E2E2F2E2E2F6B65726E656C2F696E636C7564656400107761726E5F756E757365645F7661727364000A64656275675F696E666F6400107761726E5F756E757365645F766172736A680264000776657273696F6E6B0005342E322E31680264000474696D65680662000007D3610C6112610B612D61296802640006736F757263656B002F2F636C656172636173652F6F74702F657274732F6C69622F7374646C69622F7372632F66696C656E616D652E65726C6A
-=mod:inet_hosts
-Current size: 3745
-Current attributes: 836C00000001680264000376736E6C000000016E1000E7430304E86230057150DEE5D279881F6A6A
-Current compilation info: 836C0000000468026400076F7074696F6E736C0000000568026400036377646B00222F636C656172636173652F6F74702F657274732F6C69622F6B65726E656C2F73726368026400066F75746469726B002A2F636C656172636173652F6F74702F657274732F6C69622F6B65726E656C2F7372632F2E2E2F6562696E6802640001696B002D2F636C656172636173652F6F74702F657274732F6C69622F6B65726E656C2F7372632F2E2E2F696E636C75646564000A64656275675F696E666F6400107761726E5F756E757365645F766172736A680264000776657273696F6E6B0005342E322E31680264000474696D65680662000007D3610C6112610B613261226802640006736F757263656B00312F636C656172636173652F6F74702F657274732F6C69622F6B65726E656C2F7372632F696E65745F686F7374732E65726C6A
-=mod:erl_distribution
-Current size: 2512
-Current attributes: 836C00000002680264000376736E6C000000016E1000CDE49D63ACA767E0D49679657E99D2046A68026400096265686176696F75726C0000000164000A73757065727669736F726A6A
-Current compilation info: 836C0000000468026400076F7074696F6E736C0000000568026400036377646B00222F636C656172636173652F6F74702F657274732F6C69622F6B65726E656C2F73726368026400066F75746469726B002A2F636C656172636173652F6F74702F657274732F6C69622F6B65726E656C2F7372632F2E2E2F6562696E6802640001696B002D2F636C656172636173652F6F74702F657274732F6C69622F6B65726E656C2F7372632F2E2E2F696E636C75646564000A64656275675F696E666F6400107761726E5F756E757365645F766172736A680264000776657273696F6E6B0005342E322E31680264000474696D65680662000007D3610C6112610B613161186802640006736F757263656B00372F636C656172636173652F6F74702F657274732F6C69622F6B65726E656C2F7372632F65726C5F646973747269627574696F6E2E65726C6A
-=mod:global_group
-Current size: 30960
-Current attributes: 836C00000002680264000376736E6C000000016E10008ECE759E5920988CA3ACFF34B32F86736A68026400096265686176696F75726C0000000164000A67656E5F7365727665726A6A
-Current compilation info: 836C0000000468026400076F7074696F6E736C0000000568026400036377646B00222F636C656172636173652F6F74702F657274732F6C69622F6B65726E656C2F73726368026400066F75746469726B002A2F636C656172636173652F6F74702F657274732F6C69622F6B65726E656C2F7372632F2E2E2F6562696E6802640001696B002D2F636C656172636173652F6F74702F657274732F6C69622F6B65726E656C2F7372632F2E2E2F696E636C75646564000A64656275675F696E666F6400107761726E5F756E757365645F766172736A680264000776657273696F6E6B0005342E322E31680264000474696D65680662000007D3610C6112610B6131613B6802640006736F757263656B00332F636C656172636173652F6F74702F657274732F6C69622F6B65726E656C2F7372632F676C6F62616C5F67726F75702E65726C6A
-=mod:net_kernel
-Current size: 37648
-Current attributes: 836C00000002680264000376736E6C000000016E1000967CE7DE41F9B39906CCCF3225E6E5286A68026400096265686176696F75726C0000000164000A67656E5F7365727665726A6A
-Current compilation info: 836C0000000468026400076F7074696F6E736C0000000568026400036377646B00222F636C656172636173652F6F74702F657274732F6C69622F6B65726E656C2F73726368026400066F75746469726B002A2F636C656172636173652F6F74702F657274732F6C69622F6B65726E656C2F7372632F2E2E2F6562696E6802640001696B002D2F636C656172636173652F6F74702F657274732F6C69622F6B65726E656C2F7372632F2E2E2F696E636C75646564000A64656275675F696E666F6400107761726E5F756E757365645F766172736A680264000776657273696F6E6B0005342E322E31680264000474696D65680662000007D3610C6112610B613361026802640006736F757263656B00312F636C656172636173652F6F74702F657274732F6C69622F6B65726E656C2F7372632F6E65745F6B65726E656C2E65726C6A
-=mod:file_server
-Current size: 8372
-Current attributes: 836C00000002680264000376736E6C000000016E1000EF90906EC6204204AC0A77C4A25B65236A68026400096265686176696F75726C0000000164000A67656E5F7365727665726A6A
-Current compilation info: 836C0000000468026400076F7074696F6E736C0000000568026400036377646B00222F636C656172636173652F6F74702F657274732F6C69622F6B65726E656C2F73726368026400066F75746469726B002A2F636C656172636173652F6F74702F657274732F6C69622F6B65726E656C2F7372632F2E2E2F6562696E6802640001696B002D2F636C656172636173652F6F74702F657274732F6C69622F6B65726E656C2F7372632F2E2E2F696E636C75646564000A64656275675F696E666F6400107761726E5F756E757365645F766172736A680264000776657273696F6E6B0005342E322E31680264000474696D65680662000007D3610C6112610B6131612D6802640006736F757263656B00322F636C656172636173652F6F74702F657274732F6C69622F6B65726E656C2F7372632F66696C655F7365727665722E65726C6A
-=mod:old_file_server
-Current size: 3074
-Current attributes: 836C00000001680264000376736E6C000000016E1000C802085DD76D4EFBA6A8F528FECB94B36A6A
-Current compilation info: 836C0000000468026400076F7074696F6E736C0000000568026400036377646B00222F636C656172636173652F6F74702F657274732F6C69622F6B65726E656C2F73726368026400066F75746469726B002A2F636C656172636173652F6F74702F657274732F6C69622F6B65726E656C2F7372632F2E2E2F6562696E6802640001696B002D2F636C656172636173652F6F74702F657274732F6C69622F6B65726E656C2F7372632F2E2E2F696E636C75646564000A64656275675F696E666F6400107761726E5F756E757365645F766172736A680264000776657273696F6E6B0005342E322E31680264000474696D65680662000007D3610C6112610B6131612F6802640006736F757263656B00362F636C656172636173652F6F74702F657274732F6C69622F6B65726E656C2F7372632F6F6C645F66696C655F7365727665722E65726C6A
-=mod:code
-Current size: 7419
-Current attributes: 836C00000001680264000376736E6C000000016E1000AE618E3041C8E3807A3719CD5140DF5E6A6A
-Current compilation info: 836C0000000468026400076F7074696F6E736C0000000568026400036377646B00222F636C656172636173652F6F74702F657274732F6C69622F6B65726E656C2F73726368026400066F75746469726B002A2F636C656172636173652F6F74702F657274732F6C69622F6B65726E656C2F7372632F2E2E2F6562696E6802640001696B002D2F636C656172636173652F6F74702F657274732F6C69622F6B65726E656C2F7372632F2E2E2F696E636C75646564000A64656275675F696E666F6400107761726E5F756E757365645F766172736A680264000776657273696F6E6B0005342E322E31680264000474696D65680662000007D3610C6112610B6130612E6802640006736F757263656B002B2F636C656172636173652F6F74702F657274732F6C69622F6B65726E656C2F7372632F636F64652E65726C6A
-=mod:code_server
-Current size: 30811
-Current attributes: 836C00000001680264000376736E6C000000016E0F00BFB96248C2CA8601B4CB7F543F52E26A6A
-Current compilation info: 836C0000000468026400076F7074696F6E736C0000000568026400036377646B00222F636C656172636173652F6F74702F657274732F6C69622F6B65726E656C2F73726368026400066F75746469726B002A2F636C656172636173652F6F74702F657274732F6C69622F6B65726E656C2F7372632F2E2E2F6562696E6802640001696B002D2F636C656172636173652F6F74702F657274732F6C69622F6B65726E656C2F7372632F2E2E2F696E636C75646564000A64656275675F696E666F6400107761726E5F756E757365645F766172736A680264000776657273696F6E6B0005342E322E31680264000474696D65680662000007D3610C6112610B613061346802640006736F757263656B00322F636C656172636173652F6F74702F657274732F6C69622F6B65726E656C2F7372632F636F64655F7365727665722E65726C6A
-=mod:code_aux
-Current size: 1736
-Current attributes: 836C00000001680264000376736E6C000000016E10007A90DB53FCCECD52504F20E7A3B6BAE26A6A
-Current compilation info: 836C0000000468026400076F7074696F6E736C0000000568026400036377646B00222F636C656172636173652F6F74702F657274732F6C69622F6B65726E656C2F73726368026400066F75746469726B002A2F636C656172636173652F6F74702F657274732F6C69622F6B65726E656C2F7372632F2E2E2F6562696E6802640001696B002D2F636C656172636173652F6F74702F657274732F6C69622F6B65726E656C2F7372632F2E2E2F696E636C75646564000A64656275675F696E666F6400107761726E5F756E757365645F766172736A680264000776657273696F6E6B0005342E322E31680264000474696D65680662000007D3610C6112610B613061316802640006736F757263656B002F2F636C656172636173652F6F74702F657274732F6C69622F6B65726E656C2F7372632F636F64655F6175782E65726C6A
-=mod:packages
-Current size: 3119
-Current attributes: 836C00000001680264000376736E6C000000016E1000044DC8EEB65F178AE23EF2465E1954496A6A
-Current compilation info: 836C0000000468026400076F7074696F6E736C0000000568026400036377646B00222F636C656172636173652F6F74702F657274732F6C69622F6B65726E656C2F73726368026400066F75746469726B002A2F636C656172636173652F6F74702F657274732F6C69622F6B65726E656C2F7372632F2E2E2F6562696E6802640001696B002D2F636C656172636173652F6F74702F657274732F6C69622F6B65726E656C2F7372632F2E2E2F696E636C75646564000A64656275675F696E666F6400107761726E5F756E757365645F766172736A680264000776657273696F6E6B0005342E322E31680264000474696D65680662000007D3610C6112610B613361076802640006736F757263656B002F2F636C656172636173652F6F74702F657274732F6C69622F6B65726E656C2F7372632F7061636B616765732E65726C6A
-=mod:hipe_unified_loader
-Current size: 37330
-Current attributes: 836C00000001680264000376736E6C000000016E1000DABD57945702E56F4B3AA7B7B19C1D166A6A
-Current compilation info: 836C0000000468026400076F7074696F6E736C0000000568026400036377646B00222F636C656172636173652F6F74702F657274732F6C69622F6B65726E656C2F73726368026400066F75746469726B002A2F636C656172636173652F6F74702F657274732F6C69622F6B65726E656C2F7372632F2E2E2F6562696E6802640001696B002D2F636C656172636173652F6F74702F657274732F6C69622F6B65726E656C2F7372632F2E2E2F696E636C75646564000A64656275675F696E666F6400107761726E5F756E757365645F766172736A680264000776657273696F6E6B0005342E322E31680264000474696D65680662000007D3610C6112610B613361326802640006736F757263656B003A2F636C656172636173652F6F74702F657274732F6C69622F6B65726E656C2F7372632F686970655F756E69666965645F6C6F616465722E65726C6A
-=mod:hipe_sparc_loader
-Current size: 1821
-Current attributes: 836C00000001680264000376736E6C000000016E1000582BC55E9FADFF879C2C45D25A6CB7E56A6A
-Current compilation info: 836C0000000468026400076F7074696F6E736C0000000868026400036377646B00222F636C656172636173652F6F74702F657274732F6C69622F6B65726E656C2F73726368026400066F75746469726B002A2F636C656172636173652F6F74702F657274732F6C69622F6B65726E656C2F7372632F2E2E2F6562696E6802640001696B002D2F636C656172636173652F6F74702F657274732F6C69622F6B65726E656C2F7372632F2E2E2F696E636C7564656802640001696B00322F636C656172636173652F6F74702F657274732F6C69622F6B65726E656C2F7372632F2E2E2F2E2E2F686970652F6D61696E6802640001696B00312F636C656172636173652F6F74702F657274732F6C69622F6B65726E656C2F7372632F2E2E2F2E2E2F686970652F72746C6802640001696B00332F636C656172636173652F6F74702F657274732F6C69622F6B65726E656C2F7372632F2E2E2F2E2E2F686970652F737061726364000A64656275675F696E666F6400107761726E5F756E757365645F766172736A680264000776657273696F6E6B0005342E322E31680264000474696D65680662000007D3610C6112610B6133612B6802640006736F757263656B00382F636C656172636173652F6F74702F657274732F6C69622F6B65726E656C2F7372632F686970655F73706172635F6C6F616465722E65726C6A
-=mod:ets
-Current size: 16577
-Current attributes: 836C00000002680264000376736E6C000000016E100033D982AC91129E5FC35E0AC3337A4EB56A680264000A646570726563617465646C0000000168026400086669787461626C6561026A6A
-Current compilation info: 836C0000000468026400076F7074696F6E736C0000000768026400036377646B00222F636C656172636173652F6F74702F657274732F6C69622F7374646C69622F73726368026400066F75746469726B002A2F636C656172636173652F6F74702F657274732F6C69622F7374646C69622F7372632F2E2E2F6562696E6802640001696B002D2F636C656172636173652F6F74702F657274732F6C69622F7374646C69622F7372632F2E2E2F696E636C7564656802640001696B00372F636C656172636173652F6F74702F657274732F6C69622F7374646C69622F7372632F2E2E2F2E2E2F6B65726E656C2F696E636C7564656400107761726E5F756E757365645F7661727364000A64656275675F696E666F6400107761726E5F756E757365645F766172736A680264000776657273696F6E6B0005342E322E31680264000474696D65680662000007D3610C6112610B612D611C6802640006736F757263656B002A2F636C656172636173652F6F74702F657274732F6C69622F7374646C69622F7372632F6574732E65726C6A
-=mod:lists_sort
-Current size: 38692
-Current attributes: 836C00000001680264000376736E6C000000016E1000E17EC92FA9AA3199DD71701C215044616A6A
-Current compilation info: 836C0000000468026400076F7074696F6E736C0000000B68026400036377646B00222F636C656172636173652F6F74702F657274732F6C69622F7374646C69622F73726368026400066F75746469726B002A2F636C656172636173652F6F74702F657274732F6C69622F7374646C69622F7372632F2E2E2F6562696E6802640001696B002D2F636C656172636173652F6F74702F657274732F6C69622F7374646C69622F7372632F2E2E2F696E636C7564656802640001696B00372F636C656172636173652F6F74702F657274732F6C69622F7374646C69622F7372632F2E2E2F2E2E2F6B65726E656C2F696E636C7564656400107761726E5F756E757365645F7661727364000A64656275675F696E666F6400107761726E5F756E757365645F766172736802640006696E6C696E656C0000000468026400096D65726765335F3132610768026400096D65726765335F32316107680264000A726D65726765335F31326107680264000A726D65726765335F323161076A6802640006696E6C696E656C00000004680264000A756D65726765335F31326108680264000A756D65726765335F32316108680264000C72756D65726765335F3132616107680264000C72756D65726765335F31326261086A6802640006696E6C696E656C00000004680264000C6B65796D65726765335F3132610C680264000C6B65796D65726765335F3231610C680264000D726B65796D65726765335F3132610C680264000D726B65796D65726765335F3231610C6A6802640006696E6C696E656C00000006680264000D756B65796D65726765335F3132610D680264000D756B65796D65726765335F3231610D680264000F72756B65796D65726765335F313261610B680264000F72756B65796D65726765335F323161610D680264000F72756B65796D65726765335F313262610D680264000F72756B65796D65726765335F323162610C6A6A680264000776657273696F6E6B0005342E322E31680264000474696D65680662000007D3610C6112610B612E61166802640006736F757263656B00312F636C656172636173652F6F74702F657274732F6C69622F7374646C69622F7372632F6C697374735F736F72742E65726C6A
-=mod:user_sup
-Current size: 2355
-Current attributes: 836C00000002680264000376736E6C000000016E100074BA860804CB4D60D6908C705E6544BD6A68026400096265686176696F75726C0000000164001173757065727669736F725F6272696467656A6A
-Current compilation info: 836C0000000468026400076F7074696F6E736C0000000568026400036377646B00222F636C656172636173652F6F74702F657274732F6C69622F6B65726E656C2F73726368026400066F75746469726B002A2F636C656172636173652F6F74702F657274732F6C69622F6B65726E656C2F7372632F2E2E2F6562696E6802640001696B002D2F636C656172636173652F6F74702F657274732F6C69622F6B65726E656C2F7372632F2E2E2F696E636C75646564000A64656275675F696E666F6400107761726E5F756E757365645F766172736A680264000776657273696F6E6B0005342E322E31680264000474696D65680662000007D3610C6112610B613361246802640006736F757263656B002F2F636C656172636173652F6F74702F657274732F6C69622F6B65726E656C2F7372632F757365725F7375702E65726C6A
-=mod:supervisor_bridge
-Current size: 2944
-Current attributes: 836C00000002680264000376736E6C000000016E10001590DDC10CF8A9D09763CDB7479678ED6A68026400096265686176696F75726C0000000164000A67656E5F7365727665726A6A
-Current compilation info: 836C0000000468026400076F7074696F6E736C0000000768026400036377646B00222F636C656172636173652F6F74702F657274732F6C69622F7374646C69622F73726368026400066F75746469726B002A2F636C656172636173652F6F74702F657274732F6C69622F7374646C69622F7372632F2E2E2F6562696E6802640001696B002D2F636C656172636173652F6F74702F657274732F6C69622F7374646C69622F7372632F2E2E2F696E636C7564656802640001696B00372F636C656172636173652F6F74702F657274732F6C69622F7374646C69622F7372632F2E2E2F2E2E2F6B65726E656C2F696E636C7564656400107761726E5F756E757365645F7661727364000A64656275675F696E666F6400107761726E5F756E757365645F766172736A680264000776657273696F6E6B0005342E322E31680264000474696D65680662000007D3610C6112610B612F61156802640006736F757263656B00382F636C656172636173652F6F74702F657274732F6C69622F7374646C69622F7372632F73757065727669736F725F6272696467652E65726C6A
-=mod:user_drv
-Current size: 14630
-Current attributes: 836C00000001680264000376736E6C000000016E1000F29F3B193A1EB1ADA9975D97E51BF0E86A6A
-Current compilation info: 836C0000000468026400076F7074696F6E736C0000000568026400036377646B00222F636C656172636173652F6F74702F657274732F6C69622F6B65726E656C2F73726368026400066F75746469726B002A2F636C656172636173652F6F74702F657274732F6C69622F6B65726E656C2F7372632F2E2E2F6562696E6802640001696B002D2F636C656172636173652F6F74702F657274732F6C69622F6B65726E656C2F7372632F2E2E2F696E636C75646564000A64656275675F696E666F6400107761726E5F756E757365645F766172736A680264000776657273696F6E6B0005342E322E31680264000474696D65680662000007D3610C6112610B613361216802640006736F757263656B002F2F636C656172636173652F6F74702F657274732F6C69622F6B65726E656C2F7372632F757365725F6472762E65726C6A
-=mod:group
-Current size: 10165
-Current attributes: 836C00000001680264000376736E6C000000016E1000F6427D0DA330BBFAD5D4C19058516FF36A6A
-Current compilation info: 836C0000000468026400076F7074696F6E736C0000000568026400036377646B00222F636C656172636173652F6F74702F657274732F6C69622F6B65726E656C2F73726368026400066F75746469726B002A2F636C656172636173652F6F74702F657274732F6C69622F6B65726E656C2F7372632F2E2E2F6562696E6802640001696B002D2F636C656172636173652F6F74702F657274732F6C69622F6B65726E656C2F7372632F2E2E2F696E636C75646564000A64656275675F696E666F6400107761726E5F756E757365645F766172736A680264000776657273696F6E6B0005342E322E31680264000474696D65680662000007D3610C6112610B613261066802640006736F757263656B002C2F636C656172636173652F6F74702F657274732F6C69622F6B65726E656C2F7372632F67726F75702E65726C6A
-=mod:io_lib
-Current size: 12601
-Current attributes: 836C00000002680264000376736E6C000000016E10004160DD78F37EE7C72F7C5B6A751DB7F56A680264000A646570726563617465646C0000000468026400047363616E610168026400047363616E610268026400047363616E6103680264000D72657365727665645F776F726461016A6A
-Current compilation info: 836C0000000468026400076F7074696F6E736C0000000768026400036377646B00222F636C656172636173652F6F74702F657274732F6C69622F7374646C69622F73726368026400066F75746469726B002A2F636C656172636173652F6F74702F657274732F6C69622F7374646C69622F7372632F2E2E2F6562696E6802640001696B002D2F636C656172636173652F6F74702F657274732F6C69622F7374646C69622F7372632F2E2E2F696E636C7564656802640001696B00372F636C656172636173652F6F74702F657274732F6C69622F7374646C69622F7372632F2E2E2F2E2E2F6B65726E656C2F696E636C7564656400107761726E5F756E757365645F7661727364000A64656275675F696E666F6400107761726E5F756E757365645F766172736A680264000776657273696F6E6B0005342E322E31680264000474696D65680662000007D3610C6112610B612E61036802640006736F757263656B002D2F636C656172636173652F6F74702F657274732F6C69622F7374646C69622F7372632F696F5F6C69622E65726C6A
-=mod:edlin
-Current size: 18178
-Current attributes: 836C00000001680264000376736E6C000000016E100035D752FCBA8ED7F4D26990EF3E6A1A526A6A
-Current compilation info: 836C0000000468026400076F7074696F6E736C0000000768026400036377646B00222F636C656172636173652F6F74702F657274732F6C69622F7374646C69622F73726368026400066F75746469726B002A2F636C656172636173652F6F74702F657274732F6C69622F7374646C69622F7372632F2E2E2F6562696E6802640001696B002D2F636C656172636173652F6F74702F657274732F6C69622F7374646C69622F7372632F2E2E2F696E636C7564656802640001696B00372F636C656172636173652F6F74702F657274732F6C69622F7374646C69622F7372632F2E2E2F2E2E2F6B65726E656C2F696E636C7564656400107761726E5F756E757365645F7661727364000A64656275675F696E666F6400107761726E5F756E757365645F766172736A680264000776657273696F6E6B0005342E322E31680264000474696D65680662000007D3610C6112610B612C61016802640006736F757263656B002C2F636C656172636173652F6F74702F657274732F6C69622F7374646C69622F7372632F65646C696E2E65726C6A
-=mod:io_lib_format
-Current size: 16189
-Current attributes: 836C00000001680264000376736E6C000000016E10004F382F327C456F83F33C3D5EBFBD87906A6A
-Current compilation info: 836C0000000468026400076F7074696F6E736C0000000768026400036377646B00222F636C656172636173652F6F74702F657274732F6C69622F7374646C69622F73726368026400066F75746469726B002A2F636C656172636173652F6F74702F657274732F6C69622F7374646C69622F7372632F2E2E2F6562696E6802640001696B002D2F636C656172636173652F6F74702F657274732F6C69622F7374646C69622F7372632F2E2E2F696E636C7564656802640001696B00372F636C656172636173652F6F74702F657274732F6C69622F7374646C69622F7372632F2E2E2F2E2E2F6B65726E656C2F696E636C7564656400107761726E5F756E757365645F7661727364000A64656275675F696E666F6400107761726E5F756E757365645F766172736A680264000776657273696F6E6B0005342E322E31680264000474696D65680662000007D3610C6112610B612E61066802640006736F757263656B00342F636C656172636173652F6F74702F657274732F6C69622F7374646C69622F7372632F696F5F6C69625F666F726D61742E65726C6A
-=mod:kernel_config
-Current size: 3295
-Current attributes: 836C00000002680264000376736E6C000000016E100077B8EE6C9E95FBBE5DB0371F6DB235226A68026400096265686176696F75726C0000000164000A67656E5F7365727665726A6A
-Current compilation info: 836C0000000468026400076F7074696F6E736C0000000568026400036377646B00222F636C656172636173652F6F74702F657274732F6C69622F6B65726E656C2F73726368026400066F75746469726B002A2F636C656172636173652F6F74702F657274732F6C69622F6B65726E656C2F7372632F2E2E2F6562696E6802640001696B002D2F636C656172636173652F6F74702F657274732F6C69622F6B65726E656C2F7372632F2E2E2F696E636C75646564000A64656275675F696E666F6400107761726E5F756E757365645F766172736A680264000776657273696F6E6B0005342E322E31680264000474696D65680662000007D3610C6112610B613261356802640006736F757263656B00342F636C656172636173652F6F74702F657274732F6C69622F6B65726E656C2F7372632F6B65726E656C5F636F6E6669672E65726C6A
-=mod:shell
-Current size: 22571
-Current attributes: 836C00000001680264000376736E6C000000016E10007D1354325618EB98A5BD4E8F41E6A0226A6A
-Current compilation info: 836C0000000468026400076F7074696F6E736C0000000768026400036377646B00222F636C656172636173652F6F74702F657274732F6C69622F7374646C69622F73726368026400066F75746469726B002A2F636C656172636173652F6F74702F657274732F6C69622F7374646C69622F7372632F2E2E2F6562696E6802640001696B002D2F636C656172636173652F6F74702F657274732F6C69622F7374646C69622F7372632F2E2E2F696E636C7564656802640001696B00372F636C656172636173652F6F74702F657274732F6C69622F7374646C69622F7372632F2E2E2F2E2E2F6B65726E656C2F696E636C7564656400107761726E5F756E757365645F7661727364000A64656275675F696E666F6400107761726E5F756E757365645F766172736A680264000776657273696F6E6B0005342E322E31680264000474696D65680662000007D3610C6112610B612F61016802640006736F757263656B002C2F636C656172636173652F6F74702F657274732F6C69622F7374646C69622F7372632F7368656C6C2E65726C6A
-=mod:error_logger_tty_h
-Current size: 7773
-Current attributes: 836C00000002680264000376736E6C000000016E10001502D55D6C1777F07E2E05CDD91D16986A68026400096265686176696F75726C0000000164000967656E5F6576656E746A6A
-Current compilation info: 836C0000000468026400076F7074696F6E736C0000000768026400036377646B00222F636C656172636173652F6F74702F657274732F6C69622F7374646C69622F73726368026400066F75746469726B002A2F636C656172636173652F6F74702F657274732F6C69622F7374646C69622F7372632F2E2E2F6562696E6802640001696B002D2F636C656172636173652F6F74702F657274732F6C69622F7374646C69622F7372632F2E2E2F696E636C7564656802640001696B00372F636C656172636173652F6F74702F657274732F6C69622F7374646C69622F7372632F2E2E2F2E2E2F6B65726E656C2F696E636C7564656400107761726E5F756E757365645F7661727364000A64656275675F696E666F6400107761726E5F756E757365645F766172736A680264000776657273696F6E6B0005342E322E31680264000474696D65680662000007D3610C6112610B612D61196802640006736F757263656B00392F636C656172636173652F6F74702F657274732F6C69622F7374646C69622F7372632F6572726F725F6C6F676765725F7474795F682E65726C6A
-=mod:erl_eval
-Current size: 33481
-Current attributes: 836C00000002680264000376736E6C000000016E1000D06903753C86BBC49A5CBD789CCB09B66A680264000A646570726563617465646C00000004680264000373657161026802640003736571610368026400086172675F6C697374610268026400086172675F6C69737461036A6A
-Current compilation info: 836C0000000468026400076F7074696F6E736C0000000768026400036377646B00222F636C656172636173652F6F74702F657274732F6C69622F7374646C69622F73726368026400066F75746469726B002A2F636C656172636173652F6F74702F657274732F6C69622F7374646C69622F7372632F2E2E2F6562696E6802640001696B002D2F636C656172636173652F6F74702F657274732F6C69622F7374646C69622F7372632F2E2E2F696E636C7564656802640001696B00372F636C656172636173652F6F74702F657274732F6C69622F7374646C69622F7372632F2E2E2F2E2E2F6B65726E656C2F696E636C7564656400107761726E5F756E757365645F7661727364000A64656275675F696E666F6400107761726E5F756E757365645F766172736A680264000776657273696F6E6B0005342E322E31680264000474696D65680662000007D3610C6112610B612C610D6802640006736F757263656B002F2F636C656172636173652F6F74702F657274732F6C69622F7374646C69622F7372632F65726C5F6576616C2E65726C6A
-=mod:orddict
-Current size: 4872
-Current attributes: 836C00000002680264000376736E6C000000016E100078DCF69F3949D79BC54168266A3ABF566A680264000A646570726563617465646C00000002680264000C646963745F746F5F6C6973746101680264000C6C6973745F746F5F6469637461016A6A
-Current compilation info: 836C0000000468026400076F7074696F6E736C0000000768026400036377646B00222F636C656172636173652F6F74702F657274732F6C69622F7374646C69622F73726368026400066F75746469726B002A2F636C656172636173652F6F74702F657274732F6C69622F7374646C69622F7372632F2E2E2F6562696E6802640001696B002D2F636C656172636173652F6F74702F657274732F6C69622F7374646C69622F7372632F2E2E2F696E636C7564656802640001696B00372F636C656172636173652F6F74702F657274732F6C69622F7374646C69622F7372632F2E2E2F2E2E2F6B65726E656C2F696E636C7564656400107761726E5F756E757365645F7661727364000A64656275675F696E666F6400107761726E5F756E757365645F766172736A680264000776657273696F6E6B0005342E322E31680264000474696D65680662000007D3610C6112610B612E61236802640006736F757263656B002E2F636C656172636173652F6F74702F657274732F6C69622F7374646C69622F7372632F6F7264646963742E65726C6A
-=mod:c
-Current size: 19555
-Current attributes: 836C00000001680264000376736E6C000000016E10003FACCF5DE16ABBC988ABF0811980C33B6A6A
-Current compilation info: 836C0000000468026400076F7074696F6E736C0000000768026400036377646B00222F636C656172636173652F6F74702F657274732F6C69622F7374646C69622F73726368026400066F75746469726B002A2F636C656172636173652F6F74702F657274732F6C69622F7374646C69622F7372632F2E2E2F6562696E6802640001696B002D2F636C656172636173652F6F74702F657274732F6C69622F7374646C69622F7372632F2E2E2F696E636C7564656802640001696B00372F636C656172636173652F6F74702F657274732F6C69622F7374646C69622F7372632F2E2E2F2E2E2F6B65726E656C2F696E636C7564656400107761726E5F756E757365645F7661727364000A64656275675F696E666F6400107761726E5F756E757365645F766172736A680264000776657273696F6E6B0005342E322E31680264000474696D65680662000007D3610C6112610B612B61136802640006736F757263656B00282F636C656172636173652F6F74702F657274732F6C69622F7374646C69622F7372632F632E65726C6A
-=mod:io
-Current size: 7417
-Current attributes: 836C00000002680264000376736E6C000000016E1000E2F2A6094B3C3D945865225D0620E7546A680264000A646570726563617465646C00000007680264000B70617273655F65787072736102680264000C7363616E5F65726C5F7365716101680264000C7363616E5F65726C5F7365716102680264000C7363616E5F65726C5F7365716103680264000D70617273655F65726C5F7365716101680264000D70617273655F65726C5F7365716102680264000D70617273655F65726C5F73657161036A6A
-Current compilation info: 836C0000000468026400076F7074696F6E736C0000000768026400036377646B00222F636C656172636173652F6F74702F657274732F6C69622F7374646C69622F73726368026400066F75746469726B002A2F636C656172636173652F6F74702F657274732F6C69622F7374646C69622F7372632F2E2E2F6562696E6802640001696B002D2F636C656172636173652F6F74702F657274732F6C69622F7374646C69622F7372632F2E2E2F696E636C7564656802640001696B00372F636C656172636173652F6F74702F657274732F6C69622F7374646C69622F7372632F2E2E2F2E2E2F6B65726E656C2F696E636C7564656400107761726E5F756E757365645F7661727364000A64656275675F696E666F6400107761726E5F756E757365645F766172736A680264000776657273696F6E6B0005342E322E31680264000474696D65680662000007D3610C6112610B612E61006802640006736F757263656B00292F636C656172636173652F6F74702F657274732F6C69622F7374646C69622F7372632F696F2E65726C6A
-=mod:file
-Current size: 20795
-Current attributes: 836C00000002680264000376736E6C000000016E1000D291AF77EE8B08B792B7FE99274504506A680264000A646570726563617465646C00000001680264000966696C655F696E666F61016A6A
-Current compilation info: 836C0000000468026400076F7074696F6E736C0000000568026400036377646B00222F636C656172636173652F6F74702F657274732F6C69622F6B65726E656C2F73726368026400066F75746469726B002A2F636C656172636173652F6F74702F657274732F6C69622F6B65726E656C2F7372632F2E2E2F6562696E6802640001696B002D2F636C656172636173652F6F74702F657274732F6C69622F6B65726E656C2F7372632F2E2E2F696E636C75646564000A64656275675F696E666F6400107761726E5F756E757365645F766172736A680264000776657273696F6E6B0005342E322E31680264000474696D65680662000007D3610C6112610B613161276802640006736F757263656B002B2F636C656172636173652F6F74702F657274732F6C69622F6B65726E656C2F7372632F66696C652E65726C6A
-=mod:file_io_server
-Current size: 12071
-Current attributes: 836C00000001680264000376736E6C000000016E1000A5A8C4E2B2646855AD5C617CB216CB966A6A
-Current compilation info: 836C0000000468026400076F7074696F6E736C0000000568026400036377646B00222F636C656172636173652F6F74702F657274732F6C69622F6B65726E656C2F73726368026400066F75746469726B002A2F636C656172636173652F6F74702F657274732F6C69622F6B65726E656C2F7372632F2E2E2F6562696E6802640001696B002D2F636C656172636173652F6F74702F657274732F6C69622F6B65726E656C2F7372632F2E2E2F696E636C75646564000A64656275675F696E666F6400107761726E5F756E757365645F766172736A680264000776657273696F6E6B0005342E322E31680264000474696D65680662000007D3610C6112610B6131612A6802640006736F757263656B00352F636C656172636173652F6F74702F657274732F6C69622F6B65726E656C2F7372632F66696C655F696F5F7365727665722E65726C6A
-=mod:erl_scan
-Current size: 21891
-Current attributes: 836C00000001680264000376736E6C000000016E100094F386F0C378B258E5D9CEADD4F03B6A6A6A
-Current compilation info: 836C0000000468026400076F7074696F6E736C0000000768026400036377646B00222F636C656172636173652F6F74702F657274732F6C69622F7374646C69622F73726368026400066F75746469726B002A2F636C656172636173652F6F74702F657274732F6C69622F7374646C69622F7372632F2E2E2F6562696E6802640001696B002D2F636C656172636173652F6F74702F657274732F6C69622F7374646C69622F7372632F2E2E2F696E636C7564656802640001696B00372F636C656172636173652F6F74702F657274732F6C69622F7374646C69622F7372632F2E2E2F2E2E2F6B65726E656C2F696E636C7564656400107761726E5F756E757365645F7661727364000A64656275675F696E666F6400107761726E5F756E757365645F766172736A680264000776657273696F6E6B0005342E322E31680264000474696D65680662000007D3610C6112610B612D61116802640006736F757263656B002F2F636C656172636173652F6F74702F657274732F6C69622F7374646C69622F7372632F65726C5F7363616E2E65726C6A
-=mod:erl_parse
-Current size: 161233
-Current attributes: 836C00000001680264000376736E6C000000016E10000E8CBC32C293BFC1FBC721CE918062236A6A
-Current compilation info: 836C0000000468026400076F7074696F6E736C0000000968026400036377646B00222F636C656172636173652F6F74702F657274732F6C69622F7374646C69622F73726368026400066F75746469726B002A2F636C656172636173652F6F74702F657274732F6C69622F7374646C69622F7372632F2E2E2F6562696E6802640001696B002D2F636C656172636173652F6F74702F657274732F6C69622F7374646C69622F7372632F2E2E2F696E636C7564656802640001696B00372F636C656172636173652F6F74702F657274732F6C69622F7374646C69622F7372632F2E2E2F2E2E2F6B65726E656C2F696E636C7564656400107761726E5F756E757365645F7661727364000A64656275675F696E666F6400107761726E5F756E757365645F76617273640006696E6C696E656802640004686970656C000000016802640008726567616C6C6F6364000B6C696E6561725F7363616E6A6A680264000776657273696F6E6B0005342E322E31680264000474696D65680662000007D3610C6112610B612D61076802640006736F757263656B00302F636C656172636173652F6F74702F657274732F6C69622F7374646C69622F7372632F65726C5F70617273652E65726C6A
-=mod:erl_lint
-Current size: 73159
-Current attributes: 836C00000001680264000376736E6C000000016E1000D1D2A7D6DDFD1195CB180993C76FD2CD6A6A
-Current compilation info: 836C0000000468026400076F7074696F6E736C0000000768026400036377646B00222F636C656172636173652F6F74702F657274732F6C69622F7374646C69622F73726368026400066F75746469726B002A2F636C656172636173652F6F74702F657274732F6C69622F7374646C69622F7372632F2E2E2F6562696E6802640001696B002D2F636C656172636173652F6F74702F657274732F6C69622F7374646C69622F7372632F2E2E2F696E636C7564656802640001696B00372F636C656172636173652F6F74702F657274732F6C69622F7374646C69622F7372632F2E2E2F2E2E2F6B65726E656C2F696E636C7564656400107761726E5F756E757365645F7661727364000A64656275675F696E666F6400107761726E5F756E757365645F766172736A680264000776657273696F6E6B0005342E322E31680264000474696D65680662000007D3610C6112610B612C61156802640006736F757263656B002F2F636C656172636173652F6F74702F657274732F6C69622F7374646C69622F7372632F65726C5F6C696E742E65726C6A
-=mod:ordsets
-Current size: 3257
-Current attributes: 836C00000002680264000376736E6C000000016E1000FD39D8FD846511128F5670BA28600F676A680264000A646570726563617465646C0000000468026400076E65775F7365746100680264000B7365745F746F5F6C6973746101680264000B6C6973745F746F5F7365746101680264000673756273657461026A6A
-Current compilation info: 836C0000000468026400076F7074696F6E736C0000000768026400036377646B00222F636C656172636173652F6F74702F657274732F6C69622F7374646C69622F73726368026400066F75746469726B002A2F636C656172636173652F6F74702F657274732F6C69622F7374646C69622F7372632F2E2E2F6562696E6802640001696B002D2F636C656172636173652F6F74702F657274732F6C69622F7374646C69622F7372632F2E2E2F696E636C7564656802640001696B00372F636C656172636173652F6F74702F657274732F6C69622F7374646C69622F7372632F2E2E2F2E2E2F6B65726E656C2F696E636C7564656400107761726E5F756E757365645F7661727364000A64656275675F696E666F6400107761726E5F756E757365645F766172736A680264000776657273696F6E6B0005342E322E31680264000474696D65680662000007D3610C6112610B612E61256802640006736F757263656B002E2F636C656172636173652F6F74702F657274732F6C69622F7374646C69622F7372632F6F7264736574732E65726C6A
-=mod:dict
-Current size: 15637
-Current attributes: 836C00000002680264000376736E6C000000016E1000BC846E7EF85045A5D76190CE9B1AE97C6A680264000A646570726563617465646C00000002680264000C646963745F746F5F6C6973746101680264000C6C6973745F746F5F6469637461016A6A
-Current compilation info: 836C0000000468026400076F7074696F6E736C0000000768026400036377646B00222F636C656172636173652F6F74702F657274732F6C69622F7374646C69622F73726368026400066F75746469726B002A2F636C656172636173652F6F74702F657274732F6C69622F7374646C69622F7372632F2E2E2F6562696E6802640001696B002D2F636C656172636173652F6F74702F657274732F6C69622F7374646C69622F7372632F2E2E2F696E636C7564656802640001696B00372F636C656172636173652F6F74702F657274732F6C69622F7374646C69622F7372632F2E2E2F2E2E2F6B65726E656C2F696E636C7564656400107761726E5F756E757365645F7661727364000A64656275675F696E666F6400107761726E5F756E757365645F766172736A680264000776657273696F6E6B0005342E322E31680264000474696D65680662000007D3610C6112610B612B61356802640006736F757263656B002B2F636C656172636173652F6F74702F657274732F6C69622F7374646C69622F7372632F646963742E65726C6A
-=mod:otp_internal
-Current size: 7133
-Current attributes: 836C00000001680264000376736E6C000000016E1000DC494F64DE590AFC4919DFEB0EB026B66A6A
-Current compilation info: 836C0000000468026400076F7074696F6E736C0000000768026400036377646B00222F636C656172636173652F6F74702F657274732F6C69622F7374646C69622F73726368026400066F75746469726B002A2F636C656172636173652F6F74702F657274732F6C69622F7374646C69622F7372632F2E2E2F6562696E6802640001696B002D2F636C656172636173652F6F74702F657274732F6C69622F7374646C69622F7372632F2E2E2F696E636C7564656802640001696B00372F636C656172636173652F6F74702F657274732F6C69622F7374646C69622F7372632F2E2E2F2E2E2F6B65726E656C2F696E636C7564656400107761726E5F756E757365645F7661727364000A64656275675F696E666F6400107761726E5F756E757365645F766172736A680264000776657273696F6E6B0005342E322E31680264000474696D65680662000007D3610C6112610B612E61206802640006736F757263656B00332F636C656172636173652F6F74702F657274732F6C69622F7374646C69622F7372632F6F74705F696E7465726E616C2E65726C6A
-=mod:user_default
-Current size: 1261
-Current attributes: 836C00000002680264000376736E6C000000016E1000505078ACD9B84D514FC6DA2BE249E6756A6802640006617574686F726C0000000164001765656973686E6E406565692E6572696373736F6E2E73656A6A
-Current compilation info: 836C0000000468026400076F7074696F6E736C0000000368026400036377646B00112F686F6D652F736972692F65726C616E6768026400066F75746469726B00112F686F6D652F736972692F65726C616E676400107761726E5F756E757365645F766172736A680264000776657273696F6E6B0005342E322E32680264000474696D65680662000007D461036116610D612C61126802640006736F757263656B00222F686F6D652F736972692F65726C616E672F757365725F64656661756C742E65726C6A
-=mod:tt
-Current size: 2959
-Current attributes: 836C00000002680264000376736E6C000000016E10001D71FD5A55D3BCBF06BFEDF2426C3C386A6802640006617574686F726C0000000164001765656973686E6E406565692E6572696373736F6E2E73656A6A
-Current compilation info: 836C0000000468026400076F7074696F6E736C0000000368026400036377646B00112F686F6D652F736972692F65726C616E6768026400066F75746469726B00112F686F6D652F736972692F65726C616E676400107761726E5F756E757365645F766172736A680264000776657273696F6E6B0005342E322E32680264000474696D65680662000007D461036116610D612B610C6802640006736F757263656B00182F686F6D652F736972692F65726C616E672F74742E65726C6A
-=mod:distel
-Current size: 18214
-Current attributes: 836C00000002680264000376736E6C000000016E1000CC9C9EF141459249C1CCA00993B2E29A6A6802640006617574686F726C000000016400116C756B6540626C75657461696C2E636F6D6A6A
-Current compilation info: 836C0000000368026400076F7074696F6E736C0000000664000276336400107761726E5F756E757365645F7661727364000A64656275675F696E666F68026400066F75746469726B00046562696E68026400036377646B001C2F6C6469736B2F736972692F746F6F6C732F64697374656C2D332E3164000A6578706F72745F616C6C6A680264000776657273696F6E6B0003342E31680264000474696D65680662000007D2610B6114610B610361336A
-=mod:crashdump_viewer
-Current size: 125756
-Current attributes: 836C00000001680264000376736E6C000000016E10002DC5D9D96190A2D5F27FAC3FA3D5C7956A6A
-Current compilation info: 836C0000000468026400076F7074696F6E736C0000000868026400036377646B00212F636C656172636173652F6F74702F746F6F6C732F6F627365727665722F73726368026400066F75746469726B00292F636C656172636173652F6F74702F746F6F6C732F6F627365727665722F7372632F2E2E2F6562696E6802640001696B002C2F636C656172636173652F6F74702F746F6F6C732F6F627365727665722F7372632F2E2E2F696E636C7564656802640001696B00322F636C656172636173652F6F74702F746F6F6C732F6F627365727665722F7372632F2E2E2F2E2E2F65742F696E636C7564656802640001696B003F2F636C656172636173652F6F74702F746F6F6C732F6F627365727665722F7372632F2E2E2F2E2E2F2E2E2F6C69627261726965732F65742F696E636C75646564000A64656275675F696E666F6400107761726E5F756E757365645F76617273680264000F70617273655F7472616E73666F726D64000C6D735F7472616E73666F726D6A680264000776657273696F6E6B0005342E322E32680264000474696D65680662000007D4610461146108611B61366802640006736F757263656B00362F636C656172636173652F6F74702F746F6F6C732F6F627365727665722F7372632F637261736864756D705F7669657765722E65726C6A
-=mod:webtool
-Current size: 29229
-Current attributes: 836C00000002680264000376736E6C000000016E10008AEEF06B60527A3390CBC2C98083CC0A6A68026400096265686176696F75726C0000000164000A67656E5F7365727665726A6A
-Current compilation info: 836C0000000468026400076F7074696F6E736C0000000568026400036377646B00202F636C656172636173652F6F74702F746F6F6C732F776562746F6F6C2F73726368026400066F75746469726B00282F636C656172636173652F6F74702F746F6F6C732F776562746F6F6C2F7372632F2E2E2F6562696E64000A64656275675F696E666F6400107761726E5F756E757365645F76617273680264000F70617273655F7472616E73666F726D64000C6D735F7472616E73666F726D6A680264000776657273696F6E6B0005342E322E32680264000474696D65680662000007D46104610661086106612D6802640006736F757263656B002C2F636C656172636173652F6F74702F746F6F6C732F776562746F6F6C2F7372632F776562746F6F6C2E65726C6A
-=mod:gen_tcp
-Current size: 3574
-Current attributes: 836C00000001680264000376736E6C000000016E1000C965E4EAFDAA94D7F21EDCBE30B21E7B6A6A
-Current compilation info: 836C0000000468026400076F7074696F6E736C0000000568026400036377646B00222F636C656172636173652F6F74702F657274732F6C69622F6B65726E656C2F73726368026400066F75746469726B002A2F636C656172636173652F6F74702F657274732F6C69622F6B65726E656C2F7372632F2E2E2F6562696E6802640001696B002D2F636C656172636173652F6F74702F657274732F6C69622F6B65726E656C2F7372632F2E2E2F696E636C75646564000A64656275675F696E666F6400107761726E5F756E757365645F766172736A680264000776657273696F6E6B0005342E322E31680264000474696D65680662000007D3610C6112610B613161316802640006736F757263656B002E2F636C656172636173652F6F74702F657274732F6C69622F6B65726E656C2F7372632F67656E5F7463702E65726C6A
-=mod:inet_tcp
-Current size: 2743
-Current attributes: 836C00000001680264000376736E6C000000016E1000C4AFE0B49768E4CF78B2C42EA1D3DB7F6A6A
-Current compilation info: 836C0000000468026400076F7074696F6E736C0000000568026400036377646B00222F636C656172636173652F6F74702F657274732F6C69622F6B65726E656C2F73726368026400066F75746469726B002A2F636C656172636173652F6F74702F657274732F6C69622F6B65726E656C2F7372632F2E2E2F6562696E6802640001696B002D2F636C656172636173652F6F74702F657274732F6C69622F6B65726E656C2F7372632F2E2E2F696E636C75646564000A64656275675F696E666F6400107761726E5F756E757365645F766172736A680264000776657273696F6E6B0005342E322E31680264000474696D65680662000007D3610C6112610B6132612B6802640006736F757263656B002F2F636C656172636173652F6F74702F657274732F6C69622F6B65726E656C2F7372632F696E65745F7463702E65726C6A
-=mod:inet_gethost_native
-Current size: 15611
-Current attributes: 836C00000002680264000376736E6C000000016E10005D8CD4277D0BD2425B9C26036AE314506A68026400096265686176696F75726C0000000164001173757065727669736F725F6272696467656A6A
-Current compilation info: 836C0000000468026400076F7074696F6E736C0000000568026400036377646B00222F636C656172636173652F6F74702F657274732F6C69622F6B65726E656C2F73726368026400066F75746469726B002A2F636C656172636173652F6F74702F657274732F6C69622F6B65726E656C2F7372632F2E2E2F6562696E6802640001696B002D2F636C656172636173652F6F74702F657274732F6C69622F6B65726E656C2F7372632F2E2E2F696E636C75646564000A64656275675F696E666F6400107761726E5F756E757365645F766172736A680264000776657273696F6E6B0005342E322E31680264000474696D65680662000007D3610C6112610B613261206802640006736F757263656B003A2F636C656172636173652F6F74702F657274732F6C69622F6B65726E656C2F7372632F696E65745F676574686F73745F6E61746976652E65726C6A
-=mod:filelib
-Current size: 7202
-Current attributes: 836C00000001680264000376736E6C000000016E10007B42AA23FF99DF2CD9D586635B77556A6A6A
-Current compilation info: 836C0000000468026400076F7074696F6E736C0000000768026400036377646B00222F636C656172636173652F6F74702F657274732F6C69622F7374646C69622F73726368026400066F75746469726B002A2F636C656172636173652F6F74702F657274732F6C69622F7374646C69622F7372632F2E2E2F6562696E6802640001696B002D2F636C656172636173652F6F74702F657274732F6C69622F7374646C69622F7372632F2E2E2F696E636C7564656802640001696B00372F636C656172636173652F6F74702F657274732F6C69622F7374646C69622F7372632F2E2E2F2E2E2F6B65726E656C2F696E636C7564656400107761726E5F756E757365645F7661727364000A64656275675F696E666F6400107761726E5F756E757365645F766172736A680264000776657273696F6E6B0005342E322E31680264000474696D65680662000007D3610C6112610B612D61266802640006736F757263656B002E2F636C656172636173652F6F74702F657274732F6C69622F7374646C69622F7372632F66696C656C69622E65726C6A
-=mod:httpd_util
-Current size: 24068
-Current attributes: 836C00000002680264000376736E6C000000016E10008D99E096221B88D542E52CB9C8377F6D6A68026400076170705F76736E6B000B696E6574732D332E302E376A
-Current compilation info: 836C0000000468026400076F7074696F6E736C0000000868036400016464001164656661756C745F766572626F7369747964000773696C656E636568036400016464000F5345525645525F534F4654574152456B000B696E6574732F332E302E3768026400036377646B00222F636C656172636173652F6F74702F6C69627261726965732F696E6574732F73726368026400066F75746469726B002A2F636C656172636173652F6F74702F6C69627261726965732F696E6574732F7372632F2E2E2F6562696E6804640009617474726962757465640006696E736572746400076170705F76736E6B000B696E6574732D332E302E37680264000F70617273655F7472616E73666F726D6400127379735F7072655F6174747269627574657364000A64656275675F696E666F6400107761726E5F756E757365645F766172736A680264000776657273696F6E6B0005342E322E32680264000474696D65680662000007D46104611561066128613B6802640006736F757263656B00312F636C656172636173652F6F74702F6C69627261726965732F696E6574732F7372632F68747470645F7574696C2E65726C6A
-=mod:webtool_sup
-Current size: 695
-Current attributes: 836C00000002680264000376736E6C000000016E1000FA5449E12816CF3AD0A3085BB26CDB9B6A68026400096265686176696F75726C0000000164000A73757065727669736F726A6A
-Current compilation info: 836C0000000468026400076F7074696F6E736C0000000468026400036377646B00202F636C656172636173652F6F74702F746F6F6C732F776562746F6F6C2F73726368026400066F75746469726B00282F636C656172636173652F6F74702F746F6F6C732F776562746F6F6C2F7372632F2E2E2F6562696E64000A64656275675F696E666F6400107761726E5F756E757365645F766172736A680264000776657273696F6E6B0005342E322E32680264000474696D65680662000007D4610461066108610761236802640006736F757263656B00302F636C656172636173652F6F74702F746F6F6C732F776562746F6F6C2F7372632F776562746F6F6C5F7375702E65726C6A
-=mod:httpd_conf
-Current size: 33659
-Current attributes: 836C00000002680264000376736E6C000000016E1000E3198FBDC73BC48CB7D0C1C762B8F1AB6A68026400076170705F76736E6B000B696E6574732D332E302E376A
-Current compilation info: 836C0000000468026400076F7074696F6E736C0000000868036400016464001164656661756C745F766572626F7369747964000773696C656E636568036400016464000F5345525645525F534F4654574152456B000B696E6574732F332E302E3768026400036377646B00222F636C656172636173652F6F74702F6C69627261726965732F696E6574732F73726368026400066F75746469726B002A2F636C656172636173652F6F74702F6C69627261726965732F696E6574732F7372632F2E2E2F6562696E6804640009617474726962757465640006696E736572746400076170705F76736E6B000B696E6574732D332E302E37680264000F70617273655F7472616E73666F726D6400127379735F7072655F6174747269627574657364000A64656275675F696E666F6400107761726E5F756E757365645F766172736A680264000776657273696F6E6B0005342E322E32680264000474696D65680662000007D4610461156106612861116802640006736F757263656B00312F636C656172636173652F6F74702F6C69627261726965732F696E6574732F7372632F68747470645F636F6E662E65726C6A
-=mod:regexp
-Current size: 13698
-Current attributes: 836C00000001680264000376736E6C000000016E10009DD44F3D02F8328BE3ABF4DDA89E0CAE6A6A
-Current compilation info: 836C0000000468026400076F7074696F6E736C0000000768026400036377646B00222F636C656172636173652F6F74702F657274732F6C69622F7374646C69622F73726368026400066F75746469726B002A2F636C656172636173652F6F74702F657274732F6C69622F7374646C69622F7372632F2E2E2F6562696E6802640001696B002D2F636C656172636173652F6F74702F657274732F6C69622F7374646C69622F7372632F2E2E2F696E636C7564656802640001696B00372F636C656172636173652F6F74702F657274732F6C69622F7374646C69622F7372632F2E2E2F2E2E2F6B65726E656C2F696E636C7564656400107761726E5F756E757365645F7661727364000A64656275675F696E666F6400107761726E5F756E757365645F766172736A680264000776657273696F6E6B0005342E322E31680264000474696D65680662000007D3610C6112610B612E61376802640006736F757263656B002D2F636C656172636173652F6F74702F657274732F6C69622F7374646C69622F7372632F7265676578702E65726C6A
-=mod:string
-Current size: 7740
-Current attributes: 836C00000002680264000376736E6C000000016E10005521DDF38903D46D7C53DB864266F7456A680264000A646570726563617465646C00000007680264000C72655F73685F746F5F61776B6101680264000872655F70617273656101680264000872655F6D617463686102680264000672655F7375626103680264000772655F677375626103680264000872655F73706C697461026802640005696E64657861026A6A
-Current compilation info: 836C0000000468026400076F7074696F6E736C0000000768026400036377646B00222F636C656172636173652F6F74702F657274732F6C69622F7374646C69622F73726368026400066F75746469726B002A2F636C656172636173652F6F74702F657274732F6C69622F7374646C69622F7372632F2E2E2F6562696E6802640001696B002D2F636C656172636173652F6F74702F657274732F6C69622F7374646C69622F7372632F2E2E2F696E636C7564656802640001696B00372F636C656172636173652F6F74702F657274732F6C69622F7374646C69622F7372632F2E2E2F2E2E2F6B65726E656C2F696E636C7564656400107761726E5F756E757365645F7661727364000A64656275675F696E666F6400107761726E5F756E757365645F766172736A680264000776657273696F6E6B0005342E322E31680264000474696D65680662000007D3610C6112610B612F610F6802640006736F757263656B002D2F636C656172636173652F6F74702F657274732F6C69622F7374646C69622F7372632F737472696E672E65726C6A
-=mod:httpd
-Current size: 7563
-Current attributes: 836C00000002680264000376736E6C000000016E1000BFD190D951EB3CAD2CC72ADEF20886906A68026400076170705F76736E6B000B696E6574732D332E302E376A
-Current compilation info: 836C0000000468026400076F7074696F6E736C0000000868036400016464001164656661756C745F766572626F7369747964000773696C656E636568036400016464000F5345525645525F534F4654574152456B000B696E6574732F332E302E3768026400036377646B00222F636C656172636173652F6F74702F6C69627261726965732F696E6574732F73726368026400066F75746469726B002A2F636C656172636173652F6F74702F6C69627261726965732F696E6574732F7372632F2E2E2F6562696E6804640009617474726962757465640006696E736572746400076170705F76736E6B000B696E6574732D332E302E37680264000F70617273655F7472616E73666F726D6400127379735F7072655F6174747269627574657364000A64656275675F696E666F6400107761726E5F756E757365645F766172736A680264000776657273696F6E6B0005342E322E32680264000474696D65680662000007D4610461156106612861036802640006736F757263656B002C2F636C656172636173652F6F74702F6C69627261726965732F696E6574732F7372632F68747470642E65726C6A
-=mod:httpd_sup
-Current size: 4068
-Current attributes: 836C00000003680264000376736E6C000000016E10007FA5C790118F18F3D20A2BFAF0229F0A6A68026400076170705F76736E6B000B696E6574732D332E302E3768026400096265686176696F75726C0000000164000A73757065727669736F726A6A
-Current compilation info: 836C0000000468026400076F7074696F6E736C0000000868036400016464001164656661756C745F766572626F7369747964000773696C656E636568036400016464000F5345525645525F534F4654574152456B000B696E6574732F332E302E3768026400036377646B00222F636C656172636173652F6F74702F6C69627261726965732F696E6574732F73726368026400066F75746469726B002A2F636C656172636173652F6F74702F6C69627261726965732F696E6574732F7372632F2E2E2F6562696E6804640009617474726962757465640006696E736572746400076170705F76736E6B000B696E6574732D332E302E37680264000F70617273655F7472616E73666F726D6400127379735F7072655F6174747269627574657364000A64656275675F696E666F6400107761726E5F756E757365645F766172736A680264000776657273696F6E6B0005342E322E32680264000474696D65680662000007D4610461156106612861366802640006736F757263656B00302F636C656172636173652F6F74702F6C69627261726965732F696E6574732F7372632F68747470645F7375702E65726C6A
-=mod:httpd_acceptor_sup
-Current size: 2161
-Current attributes: 836C00000003680264000376736E6C000000016E10003E6F9289B64C13F1EC8A1184BACF055F6A68026400076170705F76736E6B000B696E6574732D332E302E3768026400096265686176696F75726C0000000164000A73757065727669736F726A6A
-Current compilation info: 836C0000000468026400076F7074696F6E736C0000000868036400016464001164656661756C745F766572626F7369747964000773696C656E636568036400016464000F5345525645525F534F4654574152456B000B696E6574732F332E302E3768026400036377646B00222F636C656172636173652F6F74702F6C69627261726965732F696E6574732F73726368026400066F75746469726B002A2F636C656172636173652F6F74702F6C69627261726965732F696E6574732F7372632F2E2E2F6562696E6804640009617474726962757465640006696E736572746400076170705F76736E6B000B696E6574732D332E302E37680264000F70617273655F7472616E73666F726D6400127379735F7072655F6174747269627574657364000A64656275675F696E666F6400107761726E5F756E757365645F766172736A680264000776657273696F6E6B0005342E322E32680264000474696D65680662000007D46104611561066128610C6802640006736F757263656B00392F636C656172636173652F6F74702F6C69627261726965732F696E6574732F7372632F68747470645F6163636570746F725F7375702E65726C6A
-=mod:httpd_verbosity
-Current size: 2672
-Current attributes: 836C00000002680264000376736E6C000000016E100018B6F407D391872421748F87877DAAF36A68026400076170705F76736E6B000B696E6574732D332E302E376A
-Current compilation info: 836C0000000468026400076F7074696F6E736C0000000868036400016464001164656661756C745F766572626F7369747964000773696C656E636568036400016464000F5345525645525F534F4654574152456B000B696E6574732F332E302E3768026400036377646B00222F636C656172636173652F6F74702F6C69627261726965732F696E6574732F73726368026400066F75746469726B002A2F636C656172636173652F6F74702F6C69627261726965732F696E6574732F7372632F2E2E2F6562696E6804640009617474726962757465640006696E736572746400076170705F76736E6B000B696E6574732D332E302E37680264000F70617273655F7472616E73666F726D6400127379735F7072655F6174747269627574657364000A64656275675F696E666F6400107761726E5F756E757365645F766172736A680264000776657273696F6E6B0005342E322E32680264000474696D65680662000007D4610461156106612961036802640006736F757263656B00362F636C656172636173652F6F74702F6C69627261726965732F696E6574732F7372632F68747470645F766572626F736974792E65726C6A
-=mod:timer
-Current size: 8223
-Current attributes: 836C00000001680264000376736E6C000000016E10001D0D64DB1B923D1B3B9497655C43B4AD6A6A
-Current compilation info: 836C0000000468026400076F7074696F6E736C0000000768026400036377646B00222F636C656172636173652F6F74702F657274732F6C69622F7374646C69622F73726368026400066F75746469726B002A2F636C656172636173652F6F74702F657274732F6C69622F7374646C69622F7372632F2E2E2F6562696E6802640001696B002D2F636C656172636173652F6F74702F657274732F6C69622F7374646C69622F7372632F2E2E2F696E636C7564656802640001696B00372F636C656172636173652F6F74702F657274732F6C69622F7374646C69622F7372632F2E2E2F2E2E2F6B65726E656C2F696E636C7564656400107761726E5F756E757365645F7661727364000A64656275675F696E666F6400107761726E5F756E757365645F766172736A680264000776657273696F6E6B0005342E322E31680264000474696D65680662000007D3610C6112610B612F611A6802640006736F757263656B002C2F636C656172636173652F6F74702F657274732F6C69622F7374646C69622F7372632F74696D65722E65726C6A
-=mod:httpd_misc_sup
-Current size: 2066
-Current attributes: 836C00000003680264000376736E6C000000016E100092342F38AC16C074DDC21532FBFB52C26A68026400076170705F76736E6B000B696E6574732D332E302E3768026400096265686176696F75726C0000000164000A73757065727669736F726A6A
-Current compilation info: 836C0000000468026400076F7074696F6E736C0000000868036400016464001164656661756C745F766572626F7369747964000773696C656E636568036400016464000F5345525645525F534F4654574152456B000B696E6574732F332E302E3768026400036377646B00222F636C656172636173652F6F74702F6C69627261726965732F696E6574732F73726368026400066F75746469726B002A2F636C656172636173652F6F74702F6C69627261726965732F696E6574732F7372632F2E2E2F6562696E6804640009617474726962757465640006696E736572746400076170705F76736E6B000B696E6574732D332E302E37680264000F70617273655F7472616E73666F726D6400127379735F7072655F6174747269627574657364000A64656275675F696E666F6400107761726E5F756E757365645F766172736A680264000776657273696F6E6B0005342E322E32680264000474696D65680662000007D46104611561066128611F6802640006736F757263656B00352F636C656172636173652F6F74702F6C69627261726965732F696E6574732F7372632F68747470645F6D6973635F7375702E65726C6A
-=mod:httpd_manager
-Current size: 28916
-Current attributes: 836C00000003680264000376736E6C000000016E100013F7A1E6A4B6407A0A1892A794EE10A36A68026400076170705F76736E6B000B696E6574732D332E302E3768026400096265686176696F75726C0000000164000A67656E5F7365727665726A6A
-Current compilation info: 836C0000000468026400076F7074696F6E736C0000000868036400016464001164656661756C745F766572626F7369747964000773696C656E636568036400016464000F5345525645525F534F4654574152456B000B696E6574732F332E302E3768026400036377646B00222F636C656172636173652F6F74702F6C69627261726965732F696E6574732F73726368026400066F75746469726B002A2F636C656172636173652F6F74702F6C69627261726965732F696E6574732F7372632F2E2E2F6562696E6804640009617474726962757465640006696E736572746400076170705F76736E6B000B696E6574732D332E302E37680264000F70617273655F7472616E73666F726D6400127379735F7072655F6174747269627574657364000A64656275675F696E666F6400107761726E5F756E757365645F766172736A680264000776657273696F6E6B0005342E322E32680264000474696D65680662000007D46104611561066128611B6802640006736F757263656B00342F636C656172636173652F6F74702F6C69627261726965732F696E6574732F7372632F68747470645F6D616E616765722E65726C6A
-=mod:mod_alias
-Current size: 6720
-Current attributes: 836C00000002680264000376736E6C000000016E10002F35C36060B4AC45474440381D146AB96A68026400076170705F76736E6B000B696E6574732D332E302E376A
-Current compilation info: 836C0000000468026400076F7074696F6E736C0000000868036400016464001164656661756C745F766572626F7369747964000773696C656E636568036400016464000F5345525645525F534F4654574152456B000B696E6574732F332E302E3768026400036377646B00222F636C656172636173652F6F74702F6C69627261726965732F696E6574732F73726368026400066F75746469726B002A2F636C656172636173652F6F74702F6C69627261726965732F696E6574732F7372632F2E2E2F6562696E6804640009617474726962757465640006696E736572746400076170705F76736E6B000B696E6574732D332E302E37680264000F70617273655F7472616E73666F726D6400127379735F7072655F6174747269627574657364000A64656275675F696E666F6400107761726E5F756E757365645F766172736A680264000776657273696F6E6B0005342E322E32680264000474696D65680662000007D4610461156106612961106802640006736F757263656B00302F636C656172636173652F6F74702F6C69627261726965732F696E6574732F7372632F6D6F645F616C6961732E65726C6A
-=mod:mod_auth
-Current size: 25168
-Current attributes: 836C00000002680264000376736E6C000000016E100083F3CA0C7A3E7B5E19A635A7F916595D6A68026400076170705F76736E6B000B696E6574732D332E302E376A
-Current compilation info: 836C0000000468026400076F7074696F6E736C0000000868036400016464001164656661756C745F766572626F7369747964000773696C656E636568036400016464000F5345525645525F534F4654574152456B000B696E6574732F332E302E3768026400036377646B00222F636C656172636173652F6F74702F6C69627261726965732F696E6574732F73726368026400066F75746469726B002A2F636C656172636173652F6F74702F6C69627261726965732F696E6574732F7372632F2E2E2F6562696E6804640009617474726962757465640006696E736572746400076170705F76736E6B000B696E6574732D332E302E37680264000F70617273655F7472616E73666F726D6400127379735F7072655F6174747269627574657364000A64656275675F696E666F6400107761726E5F756E757365645F766172736A680264000776657273696F6E6B0005342E322E32680264000474696D65680662000007D4610461156106612961166802640006736F757263656B002F2F636C656172636173652F6F74702F6C69627261726965732F696E6574732F7372632F6D6F645F617574682E65726C6A
-=mod:mod_esi
-Current size: 22534
-Current attributes: 836C00000002680264000376736E6C000000016E1000513E3FF733E1E6592B86CB55B9C14E086A68026400076170705F76736E6B000B696E6574732D332E302E376A
-Current compilation info: 836C0000000468026400076F7074696F6E736C0000000868036400016464001164656661756C745F766572626F7369747964000773696C656E636568036400016464000F5345525645525F534F4654574152456B000B696E6574732F332E302E3768026400036377646B00222F636C656172636173652F6F74702F6C69627261726965732F696E6574732F73726368026400066F75746469726B002A2F636C656172636173652F6F74702F6C69627261726965732F696E6574732F7372632F2E2E2F6562696E6804640009617474726962757465640006696E736572746400076170705F76736E6B000B696E6574732D332E302E37680264000F70617273655F7472616E73666F726D6400127379735F7072655F6174747269627574657364000A64656275675F696E666F6400107761726E5F756E757365645F766172736A680264000776657273696F6E6B0005342E322E32680264000474696D65680662000007D4610461156106612A61026802640006736F757263656B002E2F636C656172636173652F6F74702F6C69627261726965732F696E6574732F7372632F6D6F645F6573692E65726C6A
-=mod:mod_actions
-Current size: 3625
-Current attributes: 836C00000002680264000376736E6C000000016E10008E5437921662830490CA76DFF88548966A68026400076170705F76736E6B000B696E6574732D332E302E376A
-Current compilation info: 836C0000000468026400076F7074696F6E736C0000000868036400016464001164656661756C745F766572626F7369747964000773696C656E636568036400016464000F5345525645525F534F4654574152456B000B696E6574732F332E302E3768026400036377646B00222F636C656172636173652F6F74702F6C69627261726965732F696E6574732F73726368026400066F75746469726B002A2F636C656172636173652F6F74702F6C69627261726965732F696E6574732F7372632F2E2E2F6562696E6804640009617474726962757465640006696E736572746400076170705F76736E6B000B696E6574732D332E302E37680264000F70617273655F7472616E73666F726D6400127379735F7072655F6174747269627574657364000A64656275675F696E666F6400107761726E5F756E757365645F766172736A680264000776657273696F6E6B0005342E322E32680264000474696D65680662000007D46104611561066129610C6802640006736F757263656B00322F636C656172636173652F6F74702F6C69627261726965732F696E6574732F7372632F6D6F645F616374696F6E732E65726C6A
-=mod:mod_cgi
-Current size: 25891
-Current attributes: 836C00000002680264000376736E6C000000016E1000F91D405488188F1BD25110B4ED9EE8786A68026400076170705F76736E6B000B696E6574732D332E302E376A
-Current compilation info: 836C0000000468026400076F7074696F6E736C0000000868036400016464001164656661756C745F766572626F7369747964000773696C656E636568036400016464000F5345525645525F534F4654574152456B000B696E6574732F332E302E3768026400036377646B00222F636C656172636173652F6F74702F6C69627261726965732F696E6574732F73726368026400066F75746469726B002A2F636C656172636173652F6F74702F6C69627261726965732F696E6574732F7372632F2E2E2F6562696E6804640009617474726962757465640006696E736572746400076170705F76736E6B000B696E6574732D332E302E37680264000F70617273655F7472616E73666F726D6400127379735F7072655F6174747269627574657364000A64656275675F696E666F6400107761726E5F756E757365645F766172736A680264000776657273696F6E6B0005342E322E32680264000474696D65680662000007D4610461156106612961306802640006736F757263656B002E2F636C656172636173652F6F74702F6C69627261726965732F696E6574732F7372632F6D6F645F6367692E65726C6A
-=mod:mod_include
-Current size: 34923
-Current attributes: 836C00000002680264000376736E6C000000016E1000B9CCE88D63DD6AC49D5DF533C46B97D56A68026400076170705F76736E6B000B696E6574732D332E302E376A
-Current compilation info: 836C0000000468026400076F7074696F6E736C0000000868036400016464001164656661756C745F766572626F7369747964000773696C656E636568036400016464000F5345525645525F534F4654574152456B000B696E6574732F332E302E3768026400036377646B00222F636C656172636173652F6F74702F6C69627261726965732F696E6574732F73726368026400066F75746469726B002A2F636C656172636173652F6F74702F6C69627261726965732F696E6574732F7372632F2E2E2F6562696E6804640009617474726962757465640006696E736572746400076170705F76736E6B000B696E6574732D332E302E37680264000F70617273655F7472616E73666F726D6400127379735F7072655F6174747269627574657364000A64656275675F696E666F6400107761726E5F756E757365645F766172736A680264000776657273696F6E6B0005342E322E32680264000474696D65680662000007D4610461156106612A61176802640006736F757263656B00322F636C656172636173652F6F74702F6C69627261726965732F696E6574732F7372632F6D6F645F696E636C7564652E65726C6A
-=mod:mod_dir
-Current size: 13488
-Current attributes: 836C00000002680264000376736E6C000000016E1000EF620CB4B5DE5586ED681347496DA1C86A68026400076170705F76736E6B000B696E6574732D332E302E376A
-Current compilation info: 836C0000000468026400076F7074696F6E736C0000000868036400016464001164656661756C745F766572626F7369747964000773696C656E636568036400016464000F5345525645525F534F4654574152456B000B696E6574732F332E302E3768026400036377646B00222F636C656172636173652F6F74702F6C69627261726965732F696E6574732F73726368026400066F75746469726B002A2F636C656172636173652F6F74702F6C69627261726965732F696E6574732F7372632F2E2E2F6562696E6804640009617474726962757465640006696E736572746400076170705F76736E6B000B696E6574732D332E302E37680264000F70617273655F7472616E73666F726D6400127379735F7072655F6174747269627574657364000A64656275675F696E666F6400107761726E5F756E757365645F766172736A680264000776657273696F6E6B0005342E322E32680264000474696D65680662000007D4610461156106612961356802640006736F757263656B002E2F636C656172636173652F6F74702F6C69627261726965732F696E6574732F7372632F6D6F645F6469722E65726C6A
-=mod:mod_get
-Current size: 4672
-Current attributes: 836C00000002680264000376736E6C000000016E1000AD2730B6BE6AF875A500AF4857C4D7F86A68026400076170705F76736E6B000B696E6574732D332E302E376A
-Current compilation info: 836C0000000468026400076F7074696F6E736C0000000868036400016464001164656661756C745F766572626F7369747964000773696C656E636568036400016464000F5345525645525F534F4654574152456B000B696E6574732F332E302E3768026400036377646B00222F636C656172636173652F6F74702F6C69627261726965732F696E6574732F73726368026400066F75746469726B002A2F636C656172636173652F6F74702F6C69627261726965732F696E6574732F7372632F2E2E2F6562696E6804640009617474726962757465640006696E736572746400076170705F76736E6B000B696E6574732D332E302E37680264000F70617273655F7472616E73666F726D6400127379735F7072655F6174747269627574657364000A64656275675F696E666F6400107761726E5F756E757365645F766172736A680264000776657273696F6E6B0005342E322E32680264000474696D65680662000007D4610461156106612A61076802640006736F757263656B002E2F636C656172636173652F6F74702F6C69627261726965732F696E6574732F7372632F6D6F645F6765742E65726C6A
-=mod:mod_head
-Current size: 3074
-Current attributes: 836C00000002680264000376736E6C000000016E1000CAF803B9FA6A28D4153BC109B00D7DF96A68026400076170705F76736E6B000B696E6574732D332E302E376A
-Current compilation info: 836C0000000468026400076F7074696F6E736C0000000868036400016464001164656661756C745F766572626F7369747964000773696C656E636568036400016464000F5345525645525F534F4654574152456B000B696E6574732F332E302E3768026400036377646B00222F636C656172636173652F6F74702F6C69627261726965732F696E6574732F73726368026400066F75746469726B002A2F636C656172636173652F6F74702F6C69627261726965732F696E6574732F7372632F2E2E2F6562696E6804640009617474726962757465640006696E736572746400076170705F76736E6B000B696E6574732D332E302E37680264000F70617273655F7472616E73666F726D6400127379735F7072655F6174747269627574657364000A64656275675F696E666F6400107761726E5F756E757365645F766172736A680264000776657273696F6E6B0005342E322E32680264000474696D65680662000007D4610461156106612A610B6802640006736F757263656B002F2F636C656172636173652F6F74702F6C69627261726965732F696E6574732F7372632F6D6F645F686561642E65726C6A
-=mod:mod_log
-Current size: 8546
-Current attributes: 836C00000002680264000376736E6C000000016E1000F9664B54861260DEA081249379219AF86A68026400076170705F76736E6B000B696E6574732D332E302E376A
-Current compilation info: 836C0000000468026400076F7074696F6E736C0000000868036400016464001164656661756C745F766572626F7369747964000773696C656E636568036400016464000F5345525645525F534F4654574152456B000B696E6574732F332E302E3768026400036377646B00222F636C656172636173652F6F74702F6C69627261726965732F696E6574732F73726368026400066F75746469726B002A2F636C656172636173652F6F74702F6C69627261726965732F696E6574732F7372632F2E2E2F6562696E6804640009617474726962757465640006696E736572746400076170705F76736E6B000B696E6574732D332E302E37680264000F70617273655F7472616E73666F726D6400127379735F7072655F6174747269627574657364000A64656275675F696E666F6400107761726E5F756E757365645F766172736A680264000776657273696F6E6B0005342E322E32680264000474696D65680662000007D4610461156106612A611B6802640006736F757263656B002E2F636C656172636173652F6F74702F6C69627261726965732F696E6574732F7372632F6D6F645F6C6F672E65726C6A
-=mod:mod_disk_log
-Current size: 15160
-Current attributes: 836C00000002680264000376736E6C000000016E1000DDA1E88A9C423A2866B56425DF36F5C66A68026400076170705F76736E6B000B696E6574732D332E302E376A
-Current compilation info: 836C0000000468026400076F7074696F6E736C0000000868036400016464001164656661756C745F766572626F7369747964000773696C656E636568036400016464000F5345525645525F534F4654574152456B000B696E6574732F332E302E3768026400036377646B00222F636C656172636173652F6F74702F6C69627261726965732F696E6574732F73726368026400066F75746469726B002A2F636C656172636173652F6F74702F6C69627261726965732F696E6574732F7372632F2E2E2F6562696E6804640009617474726962757465640006696E736572746400076170705F76736E6B000B696E6574732D332E302E37680264000F70617273655F7472616E73666F726D6400127379735F7072655F6174747269627574657364000A64656275675F696E666F6400107761726E5F756E757365645F766172736A680264000776657273696F6E6B0005342E322E32680264000474696D65680662000007D4610461156106612961396802640006736F757263656B00332F636C656172636173652F6F74702F6C69627261726965732F696E6574732F7372632F6D6F645F6469736B5F6C6F672E65726C6A
-=mod:httpd_socket
-Current size: 7426
-Current attributes: 836C00000002680264000376736E6C000000016E1000B831219096661E4D2E200A07C4A9A7776A68026400076170705F76736E6B000B696E6574732D332E302E376A
-Current compilation info: 836C0000000468026400076F7074696F6E736C0000000868036400016464001164656661756C745F766572626F7369747964000773696C656E636568036400016464000F5345525645525F534F4654574152456B000B696E6574732F332E302E3768026400036377646B00222F636C656172636173652F6F74702F6C69627261726965732F696E6574732F73726368026400066F75746469726B002A2F636C656172636173652F6F74702F6C69627261726965732F696E6574732F7372632F2E2E2F6562696E6804640009617474726962757465640006696E736572746400076170705F76736E6B000B696E6574732D332E302E37680264000F70617273655F7472616E73666F726D6400127379735F7072655F6174747269627574657364000A64656275675F696E666F6400107761726E5F756E757365645F766172736A680264000776657273696F6E6B0005342E322E32680264000474696D65680662000007D4610461156106612861326802640006736F757263656B00332F636C656172636173652F6F74702F6C69627261726965732F696E6574732F7372632F68747470645F736F636B65742E65726C6A
-=mod:httpd_acceptor
-Current size: 4472
-Current attributes: 836C00000002680264000376736E6C000000016E1000A501686DF4E4053E7D978E0CA162BEC56A68026400076170705F76736E6B000B696E6574732D332E302E376A
-Current compilation info: 836C0000000468026400076F7074696F6E736C0000000868036400016464001164656661756C745F766572626F7369747964000773696C656E636568036400016464000F5345525645525F534F4654574152456B000B696E6574732F332E302E3768026400036377646B00222F636C656172636173652F6F74702F6C69627261726965732F696E6574732F73726368026400066F75746469726B002A2F636C656172636173652F6F74702F6C69627261726965732F696E6574732F7372632F2E2E2F6562696E6804640009617474726962757465640006696E736572746400076170705F76736E6B000B696E6574732D332E302E37680264000F70617273655F7472616E73666F726D6400127379735F7072655F6174747269627574657364000A64656275675F696E666F6400107761726E5F756E757365645F766172736A680264000776657273696F6E6B0005342E322E32680264000474696D65680662000007D4610461156106612861076802640006736F757263656B00352F636C656172636173652F6F74702F6C69627261726965732F696E6574732F7372632F68747470645F6163636570746F722E65726C6A
-=mod:io_lib_pretty
-Current size: 8171
-Current attributes: 836C00000001680264000376736E6C000000016E1000CD397E11D2D380D02A4BC6EE309B98CB6A6A
-Current compilation info: 836C0000000468026400076F7074696F6E736C0000000768026400036377646B00222F636C656172636173652F6F74702F657274732F6C69622F7374646C69622F73726368026400066F75746469726B002A2F636C656172636173652F6F74702F657274732F6C69622F7374646C69622F7372632F2E2E2F6562696E6802640001696B002D2F636C656172636173652F6F74702F657274732F6C69622F7374646C69622F7372632F2E2E2F696E636C7564656802640001696B00372F636C656172636173652F6F74702F657274732F6C69622F7374646C69622F7372632F2E2E2F2E2E2F6B65726E656C2F696E636C7564656400107761726E5F756E757365645F7661727364000A64656275675F696E666F6400107761726E5F756E757365645F766172736A680264000776657273696F6E6B0005342E322E31680264000474696D65680662000007D3610C6112610B612E610C6802640006736F757263656B00342F636C656172636173652F6F74702F657274732F6C69622F7374646C69622F7372632F696F5F6C69625F7072657474792E65726C6A
-=mod:httpd_request_handler
-Current size: 26393
-Current attributes: 836C00000002680264000376736E6C000000016E100021C280A5EB5B9CCD00A2C418A341202A6A68026400076170705F76736E6B000B696E6574732D332E302E376A
-Current compilation info: 836C0000000468026400076F7074696F6E736C0000000868036400016464001164656661756C745F766572626F7369747964000773696C656E636568036400016464000F5345525645525F534F4654574152456B000B696E6574732F332E302E3768026400036377646B00222F636C656172636173652F6F74702F6C69627261726965732F696E6574732F73726368026400066F75746469726B002A2F636C656172636173652F6F74702F6C69627261726965732F696E6574732F7372632F2E2E2F6562696E6804640009617474726962757465640006696E736572746400076170705F76736E6B000B696E6574732D332E302E37680264000F70617273655F7472616E73666F726D6400127379735F7072655F6174747269627574657364000A64656275675F696E666F6400107761726E5F756E757365645F766172736A680264000776657273696F6E6B0005342E322E32680264000474696D65680662000007D4610461156106612861296802640006736F757263656B003C2F636C656172636173652F6F74702F6C69627261726965732F696E6574732F7372632F68747470645F726571756573745F68616E646C65722E65726C6A
-=mod:calendar
-Current size: 7158
-Current attributes: 836C00000002680264000376736E6C000000016E10008C44498546709037F8D72DA4AF8B7FB76A680264000A646570726563617465646C00000001680264001C6C6F63616C5F74696D655F746F5F756E6976657273616C5F74696D6561016A6A
-Current compilation info: 836C0000000468026400076F7074696F6E736C0000000768026400036377646B00222F636C656172636173652F6F74702F657274732F6C69622F7374646C69622F73726368026400066F75746469726B002A2F636C656172636173652F6F74702F657274732F6C69622F7374646C69622F7372632F2E2E2F6562696E6802640001696B002D2F636C656172636173652F6F74702F657274732F6C69622F7374646C69622F7372632F2E2E2F696E636C7564656802640001696B00372F636C656172636173652F6F74702F657274732F6C69622F7374646C69622F7372632F2E2E2F2E2E2F6B65726E656C2F696E636C7564656400107761726E5F756E757365645F7661727364000A64656275675F696E666F6400107761726E5F756E757365645F766172736A680264000776657273696F6E6B0005342E322E31680264000474696D65680662000007D3610C6112610B612B61166802640006736F757263656B002F2F636C656172636173652F6F74702F657274732F6C69622F7374646C69622F7372632F63616C656E6461722E65726C6A
-=mod:httpd_parse
-Current size: 9977
-Current attributes: 836C00000002680264000376736E6C000000016E1000174653BAA652261FEB44FFDED99E50B76A68026400076170705F76736E6B000B696E6574732D332E302E376A
-Current compilation info: 836C0000000468026400076F7074696F6E736C0000000868036400016464001164656661756C745F766572626F7369747964000773696C656E636568036400016464000F5345525645525F534F4654574152456B000B696E6574732F332E302E3768026400036377646B00222F636C656172636173652F6F74702F6C69627261726965732F696E6574732F73726368026400066F75746469726B002A2F636C656172636173652F6F74702F6C69627261726965732F696E6574732F7372632F2E2E2F6562696E6804640009617474726962757465640006696E736572746400076170705F76736E6B000B696E6574732D332E302E37680264000F70617273655F7472616E73666F726D6400127379735F7072655F6174747269627574657364000A64656275675F696E666F6400107761726E5F756E757365645F766172736A680264000776657273696F6E6B0005342E322E32680264000474696D65680662000007D4610461156106612861246802640006736F757263656B00322F636C656172636173652F6F74702F6C69627261726965732F696E6574732F7372632F68747470645F70617273652E65726C6A
-=mod:httpd_response
-Current size: 13535
-Current attributes: 836C00000002680264000376736E6C000000016E1000785B247D894BA08A40D814EF11F848976A68026400076170705F76736E6B000B696E6574732D332E302E376A
-Current compilation info: 836C0000000468026400076F7074696F6E736C0000000868036400016464001164656661756C745F766572626F7369747964000773696C656E636568036400016464000F5345525645525F534F4654574152456B000B696E6574732F332E302E3768026400036377646B00222F636C656172636173652F6F74702F6C69627261726965732F696E6574732F73726368026400066F75746469726B002A2F636C656172636173652F6F74702F6C69627261726965732F696E6574732F7372632F2E2E2F6562696E6804640009617474726962757465640006696E736572746400076170705F76736E6B000B696E6574732D332E302E37680264000F70617273655F7472616E73666F726D6400127379735F7072655F6174747269627574657364000A64656275675F696E666F6400107761726E5F756E757365645F766172736A680264000776657273696F6E6B0005342E322E32680264000474696D65680662000007D46104611561066128612D6802640006736F757263656B00352F636C656172636173652F6F74702F6C69627261726965732F696E6574732F7372632F68747470645F726573706F6E73652E65726C6A
-=mod:crashdump_viewer_html
-Current size: 68343
-Current attributes: 836C00000001680264000376736E6C000000016E1000AE414770FDB0806C5583FF8D6D71DC766A6A
-Current compilation info: 836C0000000468026400076F7074696F6E736C0000000768026400036377646B00212F636C656172636173652F6F74702F746F6F6C732F6F627365727665722F73726368026400066F75746469726B00292F636C656172636173652F6F74702F746F6F6C732F6F627365727665722F7372632F2E2E2F6562696E6802640001696B002C2F636C656172636173652F6F74702F746F6F6C732F6F627365727665722F7372632F2E2E2F696E636C7564656802640001696B00322F636C656172636173652F6F74702F746F6F6C732F6F627365727665722F7372632F2E2E2F2E2E2F65742F696E636C7564656802640001696B003F2F636C656172636173652F6F74702F746F6F6C732F6F627365727665722F7372632F2E2E2F2E2E2F2E2E2F6C69627261726965732F65742F696E636C75646564000A64656275675F696E666F6400107761726E5F756E757365645F766172736A680264000776657273696F6E6B0005342E322E32680264000474696D65680662000007D4610461146108611C61026802640006736F757263656B003B2F636C656172636173652F6F74702F746F6F6C732F6F627365727665722F7372632F637261736864756D705F7669657765725F68746D6C2E65726C6A
-=mod:crashdump_translate
-Current size: 89840
-Current attributes: 836C00000001680264000376736E6C000000016E100038F332287181E933A76CEF4799BDB6416A6A
-Current compilation info: 836C0000000468026400076F7074696F6E736C0000000668026400036377646B00212F636C656172636173652F6F74702F746F6F6C732F6F627365727665722F73726368026400066F75746469726B00292F636C656172636173652F6F74702F746F6F6C732F6F627365727665722F7372632F2E2E2F6562696E6802640001696B002C2F636C656172636173652F6F74702F746F6F6C732F6F627365727665722F7372632F2E2E2F696E636C7564656802640001696B00322F636C656172636173652F6F74702F746F6F6C732F6F627365727665722F7372632F2E2E2F2E2E2F65742F696E636C7564656802640001696B003F2F636C656172636173652F6F74702F746F6F6C732F6F627365727665722F7372632F2E2E2F2E2E2F2E2E2F6C69627261726965732F65742F696E636C75646564000A64656275675F696E666F6A680264000776657273696F6E6B0005342E322E32680264000474696D65680662000007D461046115610B611661106802640006736F757263656B00392F636C656172636173652F6F74702F746F6F6C732F6F627365727665722F7372632F637261736864756D705F7472616E736C6174652E65726C6A
-=fun
-Module: crashdump_viewer_html
-Uniq: 9122590
-Index: 0
-Address: 526308
-Native_address: bcefc
-Refc: 1
-=fun
-Module: global
-Uniq: 77168418
-Index: 14
-Address: 26541c
-Native_address: bcf04
-Refc: 1
-=fun
-Module: inet_parse
-Uniq: 88083515
-Index: 9
-Address: 284c30
-Native_address: bcefc
-Refc: 1
-=fun
-Module: inet_db
-Uniq: 36747896
-Index: 4
-Address: 26df84
-Native_address: bcefc
-Refc: 1
-=fun
-Module: global
-Uniq: 80395734
-Index: 8
-Address: 265838
-Native_address: bcef4
-Refc: 1
-=fun
-Module: erl_eval
-Uniq: 103184573
-Index: 5
-Address: 2fa59c
-Native_address: bce80
-Refc: 1
-=fun
-Module: erl_lint
-Uniq: 88265811
-Index: 24
-Address: 34f6a0
-Native_address: bcefc
-Refc: 1
-=fun
-Module: global_group
-Uniq: 9644262
-Index: 2
-Address: 292cec
-Native_address: bcef4
-Refc: 1
-=fun
-Module: net_kernel
-Uniq: 100885585
-Index: 0
-Address: 29eb2c
-Native_address: bcefc
-Refc: 1
-=fun
-Module: inet_db
-Uniq: 128335479
-Index: 6
-Address: 26de84
-Native_address: bcef4
-Refc: 1
-=fun
-Module: erl_prim_loader
-Uniq: 42988083
-Index: 1
-Address: 210c14
-Native_address: bcf04
-Refc: 1
-=fun
-Module: dict
-Uniq: 7105125
-Index: 7
-Address: 354f84
-Native_address: bcefc
-Refc: 1
-=fun
-Module: application_controller
-Uniq: 29030584
-Index: 8
-Address: 234978
-Native_address: bcefc
-Refc: 1
-=fun
-Module: inet_parse
-Uniq: 29214351
-Index: 2
-Address: 285660
-Native_address: bcefc
-Refc: 1
-=fun
-Module: inet_config
-Uniq: 5158633
-Index: 4
-Address: 274034
-Native_address: bcefc
-Refc: 1
-=fun
-Module: erl_lint
-Uniq: 74624950
-Index: 25
-Address: 34f63c
-Native_address: bcefc
-Refc: 1
-=fun
-Module: code_server
-Uniq: 6477018
-Index: 3
-Address: 2adb6c
-Native_address: bcefc
-Refc: 1
-=fun
-Module: c
-Uniq: 117885138
-Index: 7
-Address: 2ffff8
-Native_address: bcefc
-Refc: 1
-=fun
-Module: dict
-Uniq: 47566924
-Index: 6
-Address: 354fb8
-Native_address: bcefc
-Refc: 1
-=fun
-Module: erl_scan
-Uniq: 114637756
-Index: 12
-Address: 313c60
-Native_address: bced4
-Refc: 1
-=fun
-Module: erl_scan
-Uniq: 121316204
-Index: 31
-Address: 313a68
-Native_address: bced4
-Refc: 1
-=fun
-Module: code_server
-Uniq: 61363639
-Index: 12
-Address: 2ad6a4
-Native_address: bcefc
-Refc: 1
-=fun
-Module: inet_config
-Uniq: 116208699
-Index: 3
-Address: 274094
-Native_address: bcefc
-Refc: 1
-=fun
-Module: global_group
-Uniq: 113750737
-Index: 0
-Address: 292d54
-Native_address: bcefc
-Refc: 1
-=fun
-Module: gen_event
-Uniq: 12853672
-Index: 0
-Address: 222e74
-Native_address: bcefc
-Refc: 1
-=fun
-Module: webtool
-Uniq: 108046357
-Index: 12
-Address: 4ab0b0
-Native_address: bcefc
-Refc: 1
-=fun
-Module: erl_lint
-Uniq: 111569299
-Index: 47
-Address: 34e80c
-Native_address: bcef4
-Refc: 1
-=fun
-Module: erl_eval
-Uniq: 20108653
-Index: 15
-Address: 2f9f94
-Native_address: bcea4
-Refc: 1
-=fun
-Module: erl_scan
-Uniq: 45252965
-Index: 15
-Address: 313c0c
-Native_address: bced4
-Refc: 1
-=fun
-Module: webtool
-Uniq: 12437425
-Index: 9
-Address: 4ab3e0
-Native_address: bcefc
-Refc: 1
-=fun
-Module: erl_lint
-Uniq: 30942993
-Index: 22
-Address: 34f6ec
-Native_address: bcef4
-Refc: 1
-=fun
-Module: erl_parse
-Uniq: 93430337
-Index: 3
-Address: 33b100
-Native_address: bcefc
-Refc: 1
-=fun
-Module: erl_parse
-Uniq: 6604883
-Index: 2
-Address: 33b16c
-Native_address: bcefc
-Refc: 1
-=fun
-Module: rpc
-Uniq: 36867745
-Index: 5
-Address: 255e28
-Native_address: bcefc
-Refc: 1
-=fun
-Module: inet_parse
-Uniq: 90563105
-Index: 1
-Address: 285708
-Native_address: bcefc
-Refc: 1
-=fun
-Module: inet_db
-Uniq: 18519297
-Index: 7
-Address: 26ddfc
-Native_address: bcef4
-Refc: 1
-=fun
-Module: crashdump_viewer
-Uniq: 8058975
-Index: 16
-Address: 4a36b4
-Native_address: bcefc
-Refc: 1
-=fun
-Module: inet
-Uniq: 30694569
-Index: 7
-Address: 27d018
-Native_address: bcefc
-Refc: 1
-=fun
-Module: inet_config
-Uniq: 76933943
-Index: 0
-Address: 2741b4
-Native_address: bcefc
-Refc: 1
-=fun
-Module: crashdump_viewer
-Uniq: 9033258
-Index: 6
-Address: 4a4690
-Native_address: bcefc
-Refc: 1
-=fun
-Module: crashdump_viewer
-Uniq: 74851752
-Index: 5
-Address: 4a4798
-Native_address: bcef4
-Refc: 1
-=fun
-Module: global
-Uniq: 50855382
-Index: 4
-Address: 2659a8
-Native_address: bcefc
-Refc: 1
-=fun
-Module: erl_lint
-Uniq: 39211582
-Index: 52
-Address: 34e504
-Native_address: bceec
-Refc: 1
-=fun
-Module: file_server
-Uniq: 77665472
-Index: 0
-Address: 2a0dec
-Native_address: bcf04
-Refc: 1
-=fun
-Module: erl_eval
-Uniq: 57487277
-Index: 8
-Address: 2fa3c4
-Native_address: bce94
-Refc: 1
-=fun
-Module: webtool
-Uniq: 87386575
-Index: 11
-Address: 4ab1c8
-Native_address: bcefc
-Refc: 1
-=fun
-Module: crashdump_viewer
-Uniq: 58991950
-Index: 8
-Address: 4a4338
-Native_address: bcefc
-Refc: 1
-=fun
-Module: crashdump_viewer
-Uniq: 118859163
-Index: 17
-Address: 4a34d4
-Native_address: bcefc
-Refc: 1
-=fun
-Module: dict
-Uniq: 38265609
-Index: 12
-Address: 354dec
-Native_address: bcefc
-Refc: 1
-=fun
-Module: supervisor
-Uniq: 56903339
-Index: 1
-Address: 2527c4
-Native_address: bcefc
-Refc: 1
-=fun
-Module: inet_hosts
-Uniq: 129504763
-Index: 0
-Address: 28aae8
-Native_address: bcefc
-Refc: 1
-=fun
-Module: dict
-Uniq: 44817307
-Index: 10
-Address: 354e3c
-Native_address: bceec
-Refc: 1
-=fun
-Module: erl_lint
-Uniq: 52856894
-Index: 41
-Address: 34eb70
-Native_address: bcef4
-Refc: 1
-=fun
-Module: erl_lint
-Uniq: 22623360
-Index: 23
-Address: 34f5d4
-Native_address: bceec
-Refc: 1
-=fun
-Module: orddict
-Uniq: 34963136
-Index: 0
-Address: 2fbbbc
-Native_address: bcef4
-Refc: 1
-=fun
-Module: erlang
-Uniq: 24496633
-Index: 0
-Address: 213744
-Native_address: bcef4
-Refc: 1
-=fun
-Module: erl_eval
-Uniq: 99313855
-Index: 27
-Address: 2f9914
-Native_address: bcef4
-Refc: 1
-=fun
-Module: httpd_util
-Uniq: 99137703
-Index: 3
-Address: 4b5dfc
-Native_address: bcefc
-Refc: 1
-=fun
-Module: gen_event
-Uniq: 124043500
-Index: 3
-Address: 222b84
-Native_address: bcefc
-Refc: 1
-=fun
-Module: erl_scan
-Uniq: 102650878
-Index: 22
-Address: 313b48
-Native_address: bced4
-Refc: 1
-=fun
-Module: erl_lint
-Uniq: 13333720
-Index: 12
-Address: 34fb2c
-Native_address: bcef4
-Refc: 1
-=fun
-Module: global_group
-Uniq: 133457
-Index: 5
-Address: 292a80
-Native_address: bcefc
-Refc: 1
-=fun
-Module: net_kernel
-Uniq: 64640983
-Index: 4
-Address: 29e944
-Native_address: bcefc
-Refc: 1
-=fun
-Module: rpc
-Uniq: 7580218
-Index: 2
-Address: 255f08
-Native_address: bcf04
-Refc: 1
-=fun
-Module: erl_lint
-Uniq: 131850870
-Index: 59
-Address: 34e6b8
-Native_address: bcef4
-Refc: 1
-=fun
-Module: inet_parse
-Uniq: 56617403
-Index: 10
-Address: 284b40
-Native_address: bcefc
-Refc: 1
-=fun
-Module: webtool
-Uniq: 108680306
-Index: 4
-Address: 4ab5e0
-Native_address: bcefc
-Refc: 1
-=fun
-Module: inet_db
-Uniq: 90880071
-Index: 2
-Address: 26e150
-Native_address: bcefc
-Refc: 1
-=fun
-Module: file_io_server
-Uniq: 23980778
-Index: 0
-Address: 30ac30
-Native_address: bcf04
-Refc: 1
-=fun
-Module: erl_eval
-Uniq: 12006418
-Index: 19
-Address: 2f9d54
-Native_address: bce80
-Refc: 1
-=fun
-Module: crashdump_viewer_html
-Uniq: 81701030
-Index: 8
-Address: 526228
-Native_address: bcefc
-Refc: 1
-=fun
-Module: crashdump_viewer
-Uniq: 71013875
-Index: 1
-Address: 4a4ddc
-Native_address: bcf04
-Refc: 1
-=fun
-Module: distel
-Uniq: 87740845
-Index: 2
-Address: 35c0e0
-Native_address: bcf04
-Refc: 1
-=fun
-Module: erl_eval
-Uniq: 90782401
-Index: 17
-Address: 2f9e8c
-Native_address: bced4
-Refc: 1
-=fun
-Module: shell
-Uniq: 133882676
-Index: 6
-Address: 2e52ac
-Native_address: bcef4
-Refc: 1
-=fun
-Module: inet_parse
-Uniq: 105698088
-Index: 3
-Address: 2855b4
-Native_address: bcefc
-Refc: 1
-=fun
-Module: inet
-Uniq: 58370899
-Index: 0
-Address: 27d370
-Native_address: bcefc
-Refc: 1
-=fun
-Module: erl_eval
-Uniq: 15274536
-Index: 25
-Address: 2f9a94
-Native_address: bcef4
-Refc: 1
-=fun
-Module: supervisor
-Uniq: 94349557
-Index: 0
-Address: 252844
-Native_address: bcefc
-Refc: 1
-=fun
-Module: erl_parse
-Uniq: 33328185
-Index: 1
-Address: 33b1d8
-Native_address: bcef4
-Refc: 1
-=fun
-Module: erl_scan
-Uniq: 86971387
-Index: 16
-Address: 313db0
-Native_address: bced4
-Refc: 1
-=fun
-Module: erl_lint
-Uniq: 53364473
-Index: 38
-Address: 34ee84
-Native_address: bcefc
-Refc: 1
-=fun
-Module: webtool
-Uniq: 128145687
-Index: 0
-Address: 4ab944
-Native_address: bcee4
-Refc: 1
-=fun
-Module: c
-Uniq: 98651404
-Index: 10
-Address: 2fff20
-Native_address: bcefc
-Refc: 1
-=fun
-Module: erl_scan
-Uniq: 78224618
-Index: 0
-Address: 313dcc
-Native_address: bced4
-Refc: 1
-=fun
-Module: shell
-Uniq: 40779085
-Index: 11
-Address: 2e50c8
-Native_address: bcef4
-Refc: 1
-=fun
-Module: c
-Uniq: 93517350
-Index: 4
-Address: 300090
-Native_address: bcefc
-Refc: 1
-=fun
-Module: application_controller
-Uniq: 58551291
-Index: 0
-Address: 234f14
-Native_address: bcefc
-Refc: 1
-=fun
-Module: crashdump_viewer_html
-Uniq: 10055518
-Index: 17
-Address: 526170
-Native_address: bcefc
-Refc: 1
-=fun
-Module: erl_scan
-Uniq: 15795706
-Index: 19
-Address: 313bd4
-Native_address: bced4
-Refc: 1
-=fun
-Module: erl_scan
-Uniq: 31129467
-Index: 13
-Address: 313c44
-Native_address: bced4
-Refc: 1
-=fun
-Module: old_file_server
-Uniq: 115635393
-Index: 0
-Address: 2a1a4c
-Native_address: bcf04
-Refc: 2
-=fun
-Module: erl_eval
-Uniq: 65839696
-Index: 22
-Address: 2f9c00
-Native_address: bcef4
-Refc: 1
-=fun
-Module: erl_scan
-Uniq: 69275064
-Index: 28
-Address: 313aa0
-Native_address: bced4
-Refc: 1
-=fun
-Module: dict
-Uniq: 55938066
-Index: 11
-Address: 354d6c
-Native_address: bceec
-Refc: 1
-=fun
-Module: supervisor
-Uniq: 22323433
-Index: 3
-Address: 252688
-Native_address: bcefc
-Refc: 1
-=fun
-Module: erl_scan
-Uniq: 129726129
-Index: 29
-Address: 313abc
-Native_address: bced4
-Refc: 1
-=fun
-Module: dict
-Uniq: 84346832
-Index: 0
-Address: 3550fc
-Native_address: bceec
-Refc: 1
-=fun
-Module: shell
-Uniq: 102096820
-Index: 7
-Address: 2e5290
-Native_address: bcefc
-Refc: 1
-=fun
-Module: inet
-Uniq: 70385762
-Index: 11
-Address: 27cf44
-Native_address: bcefc
-Refc: 1
-=fun
-Module: mod_cgi
-Uniq: 1483038
-Index: 0
-Address: 4ec2e8
-Native_address: bcefc
-Refc: 1
-=fun
-Module: dict
-Uniq: 3664813
-Index: 1
-Address: 3550b4
-Native_address: bcef4
-Refc: 1
-=fun
-Module: inet
-Uniq: 131143671
-Index: 6
-Address: 27d08c
-Native_address: bcef4
-Refc: 1
-=fun
-Module: inet_config
-Uniq: 46286977
-Index: 2
-Address: 2740b0
-Native_address: bcefc
-Refc: 1
-=fun
-Module: mod_esi
-Uniq: 49099432
-Index: 0
-Address: 4e522c
-Native_address: bcefc
-Refc: 1
-=fun
-Module: application_master
-Uniq: 95764905
-Index: 2
-Address: 24aaa8
-Native_address: bcefc
-Refc: 1
-=fun
-Module: packages
-Uniq: 62890926
-Index: 0
-Address: 2ae814
-Native_address: bcef4
-Refc: 1
-=fun
-Module: erl_scan
-Uniq: 41564771
-Index: 35
-Address: 3139f8
-Native_address: bced4
-Refc: 1
-=fun
-Module: crashdump_viewer
-Uniq: 95490768
-Index: 0
-Address: 4a4dc0
-Native_address: bcf04
-Refc: 1
-=fun
-Module: erl_scan
-Uniq: 121559432
-Index: 3
-Address: 313d78
-Native_address: bced4
-Refc: 1
-=fun
-Module: httpd_conf
-Uniq: 21152662
-Index: 0
-Address: 4be5a0
-Native_address: bcefc
-Refc: 1
-=fun
-Module: net_kernel
-Uniq: 41630916
-Index: 5
-Address: 29e914
-Native_address: bcefc
-Refc: 1
-=fun
-Module: erl_scan
-Uniq: 19747201
-Index: 5
-Address: 313d24
-Native_address: bced4
-Refc: 1
-=fun
-Module: erl_lint
-Uniq: 100584837
-Index: 36
-Address: 34f0f4
-Native_address: bcef4
-Refc: 1
-=fun
-Module: erl_lint
-Uniq: 64635712
-Index: 15
-Address: 34f94c
-Native_address: bcef4
-Refc: 1
-=fun
-Module: net_kernel
-Uniq: 46398361
-Index: 3
-Address: 29e9a4
-Native_address: bcefc
-Refc: 1
-=fun
-Module: erl_scan
-Uniq: 86699817
-Index: 27
-Address: 313b2c
-Native_address: bced4
-Refc: 1
-=fun
-Module: distel
-Uniq: 40869731
-Index: 0
-Address: 35c12c
-Native_address: bcf04
-Refc: 1
-=fun
-Module: inet
-Uniq: 83701641
-Index: 1
-Address: 27d33c
-Native_address: bcefc
-Refc: 1
-=fun
-Module: mod_auth
-Uniq: 85845790
-Index: 0
-Address: 4dfd84
-Native_address: bcefc
-Refc: 1
-=fun
-Module: shell
-Uniq: 101292714
-Index: 9
-Address: 2e519c
-Native_address: bcefc
-Refc: 1
-=fun
-Module: global
-Uniq: 134173702
-Index: 1
-Address: 265b68
-Native_address: bcefc
-Refc: 1
-=fun
-Module: code_server
-Uniq: 92433687
-Index: 6
-Address: 2ad9f4
-Native_address: bcef4
-Refc: 1
-=fun
-Module: dict
-Uniq: 62315241
-Index: 8
-Address: 354f38
-Native_address: bcefc
-Refc: 1
-=fun
-Module: global
-Uniq: 11615541
-Index: 12
-Address: 265530
-Native_address: bcefc
-Refc: 1
-=fun
-Module: hipe_unified_loader
-Uniq: 11160090
-Index: 2
-Address: 2b6bb4
-Native_address: bcef4
-Refc: 1
-=fun
-Module: application_controller
-Uniq: 12116524
-Index: 15
-Address: 2342c4
-Native_address: bcef4
-Refc: 1
-=fun
-Module: mod_log
-Uniq: 61620901
-Index: 2
-Address: 4fc670
-Native_address: bcefc
-Refc: 1
-=fun
-Module: crashdump_viewer
-Uniq: 23665189
-Index: 12
-Address: 4a3b94
-Native_address: bcefc
-Refc: 1
-=fun
-Module: c
-Uniq: 43844413
-Index: 0
-Address: 300100
-Native_address: bcefc
-Refc: 1
-=fun
-Module: erl_scan
-Uniq: 100514258
-Index: 6
-Address: 313d08
-Native_address: bced4
-Refc: 1
-=fun
-Module: erl_lint
-Uniq: 54271286
-Index: 17
-Address: 34f8a0
-Native_address: bcefc
-Refc: 1
-=fun
-Module: inet_db
-Uniq: 47017252
-Index: 3
-Address: 26dfa0
-Native_address: bcefc
-Refc: 1
-=fun
-Module: crashdump_viewer
-Uniq: 1228304
-Index: 7
-Address: 4a45a4
-Native_address: bcefc
-Refc: 1
-=fun
-Module: global
-Uniq: 127131470
-Index: 10
-Address: 2655a0
-Native_address: bcefc
-Refc: 1
-=fun
-Module: file_server
-Uniq: 22638227
-Index: 1
-Address: 2a0e20
-Native_address: bcf04
-Refc: 1
-=fun
-Module: code_server
-Uniq: 112704920
-Index: 15
-Address: 2ad488
-Native_address: bcefc
-Refc: 1
-=fun
-Module: erl_eval
-Uniq: 88302875
-Index: 2
-Address: 2fa76c
-Native_address: bceb4
-Refc: 1
-=fun
-Module: inet_hosts
-Uniq: 85808984
-Index: 1
-Address: 28ab18
-Native_address: bcefc
-Refc: 1
-=fun
-Module: erl_parse
-Uniq: 106391799
-Index: 0
-Address: 33b22c
-Native_address: bcefc
-Refc: 1
-=fun
-Module: inet
-Uniq: 25830519
-Index: 5
-Address: 27d0c0
-Native_address: bcefc
-Refc: 1
-=fun
-Module: shell
-Uniq: 110491036
-Index: 1
-Address: 2e5398
-Native_address: bcef4
-Refc: 1
-=fun
-Module: crashdump_viewer_html
-Uniq: 13128736
-Index: 5
-Address: 52627c
-Native_address: bcefc
-Refc: 1
-=fun
-Module: erl_scan
-Uniq: 84644982
-Index: 21
-Address: 313b9c
-Native_address: bced4
-Refc: 1
-=fun
-Module: erl_lint
-Uniq: 120577486
-Index: 3
-Address: 34fffc
-Native_address: bcefc
-Refc: 1
-=fun
-Module: erl_lint
-Uniq: 4504456
-Index: 44
-Address: 34e938
-Native_address: bceec
-Refc: 1
-=fun
-Module: mod_disk_log
-Uniq: 28754183
-Index: 0
-Address: 500140
-Native_address: bcefc
-Refc: 1
-=fun
-Module: erl_scan
-Uniq: 88043334
-Index: 14
-Address: 313c28
-Native_address: bced4
-Refc: 1
-=fun
-Module: code_server
-Uniq: 61592373
-Index: 0
-Address: 2adc28
-Native_address: bcf04
-Refc: 1
-=fun
-Module: erl_scan
-Uniq: 74468346
-Index: 26
-Address: 313ad8
-Native_address: bced4
-Refc: 1
-=fun
-Module: erl_eval
-Uniq: 69896253
-Index: 21
-Address: 2f9c40
-Native_address: bce80
-Refc: 1
-=fun
-Module: global_group
-Uniq: 59656873
-Index: 4
-Address: 292ac0
-Native_address: bcefc
-Refc: 1
-=fun
-Module: crashdump_viewer
-Uniq: 103891261
-Index: 2
-Address: 4a4d70
-Native_address: bcefc
-Refc: 1
-=fun
-Module: httpd_util
-Uniq: 89619733
-Index: 0
-Address: 4b5e64
-Native_address: bcefc
-Refc: 1
-=fun
-Module: shell
-Uniq: 133201466
-Index: 10
-Address: 2e5180
-Native_address: bceec
-Refc: 1
-=fun
-Module: webtool
-Uniq: 32159369
-Index: 2
-Address: 4ab820
-Native_address: bcefc
-Refc: 1
-=fun
-Module: code_server
-Uniq: 76861396
-Index: 2
-Address: 2adbb0
-Native_address: bcefc
-Refc: 1
-=fun
-Module: mod_log
-Uniq: 48206487
-Index: 0
-Address: 4fc6f0
-Native_address: bcefc
-Refc: 1
-=fun
-Module: erl_lint
-Uniq: 118996551
-Index: 28
-Address: 34f384
-Native_address: bcefc
-Refc: 1
-=fun
-Module: erl_lint
-Uniq: 12593774
-Index: 50
-Address: 34e60c
-Native_address: bcef4
-Refc: 1
-=fun
-Module: httpd_request_handler
-Uniq: 48542841
-Index: 1
-Address: 50e88c
-Native_address: bcefc
-Refc: 1
-=fun
-Module: crashdump_viewer
-Uniq: 56178490
-Index: 9
-Address: 4a420c
-Native_address: bcefc
-Refc: 1
-=fun
-Module: distel
-Uniq: 88212576
-Index: 4
-Address: 35bf44
-Native_address: bcefc
-Refc: 1
-=fun
-Module: erl_lint
-Uniq: 79562132
-Index: 29
-Address: 34f368
-Native_address: bcefc
-Refc: 1
-=fun
-Module: erl_lint
-Uniq: 129524917
-Index: 32
-Address: 34f2c0
-Native_address: bcefc
-Refc: 1
-=fun
-Module: erl_eval
-Uniq: 54029891
-Index: 23
-Address: 2f9af0
-Native_address: bcefc
-Refc: 1
-=fun
-Module: inet
-Uniq: 108872092
-Index: 4
-Address: 27d0f0
-Native_address: bcef4
-Refc: 1
-=fun
-Module: application_controller
-Uniq: 40905124
-Index: 6
-Address: 234ac0
-Native_address: bcef4
-Refc: 1
-=fun
-Module: code_server
-Uniq: 50124876
-Index: 10
-Address: 2ad760
-Native_address: bcefc
-Refc: 1
-=fun
-Module: erl_lint
-Uniq: 791358
-Index: 48
-Address: 34e7b0
-Native_address: bcef4
-Refc: 1
-=fun
-Module: erl_scan
-Uniq: 18404828
-Index: 24
-Address: 313af4
-Native_address: bced4
-Refc: 1
-=fun
-Module: httpd_util
-Uniq: 13278653
-Index: 1
-Address: 4b5e48
-Native_address: bcefc
-Refc: 1
-=fun
-Module: inet_parse
-Uniq: 110307423
-Index: 13
-Address: 284a7c
-Native_address: bcefc
-Refc: 1
-=fun
-Module: rpc
-Uniq: 99592247
-Index: 0
-Address: 256118
-Native_address: bcf04
-Refc: 1
-=fun
-Module: global
-Uniq: 99918211
-Index: 2
-Address: 265af4
-Native_address: bcefc
-Refc: 1
-=fun
-Module: erl_lint
-Uniq: 71442319
-Index: 27
-Address: 34f510
-Native_address: bcef4
-Refc: 1
-=fun
-Module: erl_eval
-Uniq: 7612785
-Index: 13
-Address: 2fa0fc
-Native_address: bce80
-Refc: 1
-=fun
-Module: crashdump_viewer
-Uniq: 56095795
-Index: 15
-Address: 4a38a0
-Native_address: bcefc
-Refc: 1
-=fun
-Module: erl_scan
-Uniq: 23626796
-Index: 25
-Address: 313b10
-Native_address: bced4
-Refc: 1
-=fun
-Module: file_server
-Uniq: 126074974
-Index: 2
-Address: 2a0cac
-Native_address: bcef4
-Refc: 1
-=fun
-Module: inet_config
-Uniq: 104278122
-Index: 1
-Address: 274154
-Native_address: bcefc
-Refc: 1
-=fun
-Module: sys
-Uniq: 90854051
-Index: 0
-Address: 240344
-Native_address: bcefc
-Refc: 1
-=fun
-Module: erl_scan
-Uniq: 113334594
-Index: 2
-Address: 313d5c
-Native_address: bced4
-Refc: 1
-=fun
-Module: inet_parse
-Uniq: 8832142
-Index: 7
-Address: 284e30
-Native_address: bcefc
-Refc: 1
-=fun
-Module: erl_lint
-Uniq: 9159706
-Index: 42
-Address: 34eb54
-Native_address: bceec
-Refc: 1
-=fun
-Module: inet_db
-Uniq: 123946665
-Index: 8
-Address: 26e494
-Native_address: bcefc
-Refc: 1
-=fun
-Module: crashdump_viewer_html
-Uniq: 3149789
-Index: 1
-Address: 5262d0
-Native_address: bcefc
-Refc: 1
-=fun
-Module: c
-Uniq: 48288621
-Index: 11
-Address: 2ffed8
-Native_address: bcefc
-Refc: 1
-=fun
-Module: crashdump_viewer
-Uniq: 8953292
-Index: 20
-Address: 4a4d54
-Native_address: bcee4
-Refc: 1
-=fun
-Module: erl_lint
-Uniq: 9632158
-Index: 4
-Address: 34ff88
-Native_address: bcefc
-Refc: 1
-=fun
-Module: net_kernel
-Uniq: 31111567
-Index: 7
-Address: 29e8c8
-Native_address: bcef4
-Refc: 1
-=fun
-Module: erl_eval
-Uniq: 85307443
-Index: 10
-Address: 2fa29c
-Native_address: bcec4
-Refc: 1
-=fun
-Module: erl_scan
-Uniq: 104417191
-Index: 7
-Address: 313cd0
-Native_address: bced4
-Refc: 1
-=fun
-Module: dict
-Uniq: 43625777
-Index: 5
-Address: 354fec
-Native_address: bcefc
-Refc: 1
-=fun
-Module: webtool
-Uniq: 92698798
-Index: 3
-Address: 4ab780
-Native_address: bcefc
-Refc: 1
-=fun
-Module: erl_eval
-Uniq: 39074546
-Index: 6
-Address: 2fa54c
-Native_address: bcefc
-Refc: 1
-=fun
-Module: application_controller
-Uniq: 71451126
-Index: 5
-Address: 234b98
-Native_address: bcefc
-Refc: 1
-=fun
-Module: c
-Uniq: 122084387
-Index: 6
-Address: 300038
-Native_address: bcefc
-Refc: 1
-=fun
-Module: inet_parse
-Uniq: 9625924
-Index: 14
-Address: 284a60
-Native_address: bcefc
-Refc: 1
-=fun
-Module: erl_scan
-Uniq: 128777368
-Index: 11
-Address: 313c7c
-Native_address: bced4
-Refc: 1
-=fun
-Module: webtool
-Uniq: 10203723
-Index: 7
-Address: 4ab4f8
-Native_address: bcefc
-Refc: 1
-=fun
-Module: erl_scan
-Uniq: 35032400
-Index: 10
-Address: 313c98
-Native_address: bced4
-Refc: 1
-=fun
-Module: erl_scan
-Uniq: 17252586
-Index: 34
-Address: 313a14
-Native_address: bced4
-Refc: 1
-=fun
-Module: code_server
-Uniq: 7177165
-Index: 11
-Address: 2ad734
-Native_address: bcefc
-Refc: 1
-=fun
-Module: crashdump_viewer
-Uniq: 115778175
-Index: 3
-Address: 4a4930
-Native_address: bcefc
-Refc: 1
-=fun
-Module: erl_lint
-Uniq: 96440880
-Index: 51
-Address: 34e590
-Native_address: bcefc
-Refc: 1
-=fun
-Module: hipe_unified_loader
-Uniq: 68275407
-Index: 0
-Address: 2b7340
-Native_address: bcefc
-Refc: 1
-=fun
-Module: erl_eval
-Uniq: 88854488
-Index: 16
-Address: 2f9f04
-Native_address: bcebc
-Refc: 1
-=fun
-Module: global
-Uniq: 26353848
-Index: 13
-Address: 2654e8
-Native_address: bcf04
-Refc: 3
-=fun
-Module: global
-Uniq: 93414722
-Index: 11
-Address: 265568
-Native_address: bcefc
-Refc: 1
-=fun
-Module: erl_lint
-Uniq: 11194189
-Index: 60
-Address: 34fe0c
-Native_address: bcef4
-Refc: 1
-=fun
-Module: c
-Uniq: 125189992
-Index: 8
-Address: 2fffdc
-Native_address: bcefc
-Refc: 1
-=fun
-Module: dict
-Uniq: 112472016
-Index: 2
-Address: 355088
-Native_address: bceec
-Refc: 1
-=fun
-Module: shell
-Uniq: 104426442
-Index: 5
-Address: 2e52e0
-Native_address: bceec
-Refc: 1
-=fun
-Module: global
-Uniq: 17426458
-Index: 0
-Address: 265bc4
-Native_address: bcefc
-Refc: 1
-=fun
-Module: code_server
-Uniq: 81191039
-Index: 5
-Address: 2ada48
-Native_address: bcef4
-Refc: 1
-=fun
-Module: inet_parse
-Uniq: 71765042
-Index: 5
-Address: 284f74
-Native_address: bcefc
-Refc: 1
-=fun
-Module: init
-Uniq: 85855821
-Index: 2
-Address: 1fa298
-Native_address: bcefc
-Refc: 1
-=fun
-Module: crashdump_viewer
-Uniq: 70586122
-Index: 10
-Address: 4a3fe4
-Native_address: bcefc
-Refc: 1
-=fun
-Module: erl_lint
-Uniq: 87067911
-Index: 49
-Address: 34e708
-Native_address: bcef4
-Refc: 1
-=fun
-Module: distel
-Uniq: 63126735
-Index: 1
-Address: 35c0fc
-Native_address: bcf04
-Refc: 1
-=fun
-Module: c
-Uniq: 58270309
-Index: 1
-Address: 3000e4
-Native_address: bcefc
-Refc: 1
-=fun
-Module: ets
-Uniq: 80538457
-Index: 1
-Address: 2bc1a0
-Native_address: bcefc
-Refc: 1
-=fun
-Module: erl_lint
-Uniq: 69827241
-Index: 9
-Address: 34fd70
-Native_address: bcef4
-Refc: 1
-=fun
-Module: dict
-Uniq: 103968752
-Index: 3
-Address: 355054
-Native_address: bcefc
-Refc: 1
-=fun
-Module: erl_lint
-Uniq: 117175573
-Index: 21
-Address: 34f728
-Native_address: bcef4
-Refc: 1
-=fun
-Module: shell
-Uniq: 57865450
-Index: 2
-Address: 2e537c
-Native_address: bcef4
-Refc: 1
-=fun
-Module: erl_scan
-Uniq: 14705965
-Index: 20
-Address: 313b80
-Native_address: bced4
-Refc: 1
-=fun
-Module: webtool
-Uniq: 85360931
-Index: 6
-Address: 4ab56c
-Native_address: bcefc
-Refc: 1
-=fun
-Module: kernel_config
-Uniq: 41755598
-Index: 0
-Address: 2d9e20
-Native_address: bcefc
-Refc: 1
-=fun
-Module: erl_lint
-Uniq: 7110547
-Index: 37
-Address: 34ef14
-Native_address: bcef4
-Refc: 1
-=fun
-Module: application_controller
-Uniq: 28091577
-Index: 16
-Address: 234244
-Native_address: bcef4
-Refc: 2
-=fun
-Module: code_server
-Uniq: 96448152
-Index: 14
-Address: 2ad4e4
-Native_address: bcefc
-Refc: 1
-=fun
-Module: crashdump_viewer
-Uniq: 40177568
-Index: 13
-Address: 4a39a4
-Native_address: bcefc
-Refc: 1
-=fun
-Module: erl_lint
-Uniq: 31948320
-Index: 58
-Address: 34dfdc
-Native_address: bcef4
-Refc: 1
-=fun
-Module: global
-Uniq: 54153760
-Index: 7
-Address: 265854
-Native_address: bcefc
-Refc: 1
-=fun
-Module: crashdump_viewer_html
-Uniq: 60156260
-Index: 3
-Address: 5262b4
-Native_address: bcefc
-Refc: 1
-=fun
-Module: erl_lint
-Uniq: 1010616
-Index: 2
-Address: 350064
-Native_address: bcef4
-Refc: 1
-=fun
-Module: init
-Uniq: 96784459
-Index: 1
-Address: 1fa2b4
-Native_address: bcefc
-Refc: 1
-=fun
-Module: erl_scan
-Uniq: 48691771
-Index: 18
-Address: 313bb8
-Native_address: bced4
-Refc: 1
-=fun
-Module: global
-Uniq: 26895060
-Index: 9
-Address: 265710
-Native_address: bcefc
-Refc: 1
-=fun
-Module: code_server
-Uniq: 109625093
-Index: 7
-Address: 2ad8fc
-Native_address: bcef4
-Refc: 1
-=fun
-Module: erl_lint
-Uniq: 59436171
-Index: 1
-Address: 3500dc
-Native_address: bcef4
-Refc: 1
-=fun
-Module: dict
-Uniq: 92768306
-Index: 9
-Address: 354f04
-Native_address: bcefc
-Refc: 1
-=fun
-Module: global_group
-Uniq: 106430008
-Index: 3
-Address: 292b38
-Native_address: bcefc
-Refc: 1
-=fun
-Module: init
-Uniq: 79749196
-Index: 6
-Address: 1fa01c
-Native_address: bceec
-Refc: 1
-=fun
-Module: erl_eval
-Uniq: 6014929
-Index: 9
-Address: 2fa324
-Native_address: bceac
-Refc: 1
-=fun
-Module: application_controller
-Uniq: 57051922
-Index: 7
-Address: 234a28
-Native_address: bcef4
-Refc: 1
-=fun
-Module: net_kernel
-Uniq: 77043468
-Index: 6
-Address: 29e8e4
-Native_address: bcefc
-Refc: 1
-=fun
-Module: crashdump_viewer_html
-Uniq: 36176045
-Index: 9
-Address: 52620c
-Native_address: bcefc
-Refc: 1
-=fun
-Module: rpc
-Uniq: 35862809
-Index: 3
-Address: 255edc
-Native_address: bcefc
-Refc: 1
-=fun
-Module: inet_parse
-Uniq: 113649451
-Index: 4
-Address: 2850a0
-Native_address: bcefc
-Refc: 1
-=fun
-Module: global
-Uniq: 67943969
-Index: 5
-Address: 2658f4
-Native_address: bcefc
-Refc: 1
-=fun
-Module: crashdump_viewer_html
-Uniq: 109003032
-Index: 16
-Address: 5260d0
-Native_address: bcefc
-Refc: 1
-=fun
-Module: crashdump_viewer_html
-Uniq: 104711447
-Index: 13
-Address: 525f5c
-Native_address: bcefc
-Refc: 1
-=fun
-Module: inet
-Uniq: 107666872
-Index: 9
-Address: 27cfb0
-Native_address: bcefc
-Refc: 1
-=fun
-Module: crashdump_viewer_html
-Uniq: 89410000
-Index: 10
-Address: 5261f0
-Native_address: bcefc
-Refc: 1
-=fun
-Module: inet_parse
-Uniq: 47356870
-Index: 11
-Address: 284ab4
-Native_address: bcefc
-Refc: 1
-=fun
-Module: erl_lint
-Uniq: 17873449
-Index: 56
-Address: 34e1e8
-Native_address: bcef4
-Refc: 1
-=fun
-Module: erl_lint
-Uniq: 8839441
-Index: 33
-Address: 34f25c
-Native_address: bcefc
-Refc: 1
-=fun
-Module: gen_event
-Uniq: 82513204
-Index: 2
-Address: 222c18
-Native_address: bcefc
-Refc: 1
-=fun
-Module: application_master
-Uniq: 5973059
-Index: 0
-Address: 24ab7c
-Native_address: bcefc
-Refc: 1
-=fun
-Module: inet_gethost_native
-Uniq: 127832132
-Index: 0
-Address: 4b065c
-Native_address: bcefc
-Refc: 2
-=fun
-Module: crashdump_viewer_html
-Uniq: 39322658
-Index: 14
-Address: 525f40
-Native_address: bcefc
-Refc: 1
-=fun
-Module: gen_server
-Uniq: 100284021
-Index: 0
-Address: 23d288
-Native_address: bcf04
-Refc: 1
-=fun
-Module: inet_parse
-Uniq: 17430070
-Index: 12
-Address: 284a98
-Native_address: bcefc
-Refc: 1
-=fun
-Module: init
-Uniq: 97509773
-Index: 3
-Address: 1fa27c
-Native_address: bcefc
-Refc: 1
-=fun
-Module: distel
-Uniq: 32364818
-Index: 3
-Address: 35c050
-Native_address: bcefc
-Refc: 1
-=fun
-Module: erl_scan
-Uniq: 58576084
-Index: 32
-Address: 313a4c
-Native_address: bced4
-Refc: 1
-=fun
-Module: crashdump_viewer
-Uniq: 38384851
-Index: 14
-Address: 4a3988
-Native_address: bceec
-Refc: 1
-=fun
-Module: application_controller
-Uniq: 14139883
-Index: 4
-Address: 234d78
-Native_address: bcefc
-Refc: 1
-=fun
-Module: erl_eval
-Uniq: 122590256
-Index: 0
-Address: 2fa8b4
-Native_address: bcef4
-Refc: 1
-=fun
-Module: erl_eval
-Uniq: 14705629
-Index: 11
-Address: 2fa22c
-Native_address: bcedc
-Refc: 1
-=fun
-Module: erl_eval
-Uniq: 9273769
-Index: 4
-Address: 2fa684
-Native_address: bcee4
-Refc: 1
-=fun
-Module: crashdump_viewer_html
-Uniq: 87950142
-Index: 11
-Address: 5261d4
-Native_address: bcefc
-Refc: 1
-=fun
-Module: mod_log
-Uniq: 54913678
-Index: 1
-Address: 4fc6b0
-Native_address: bcefc
-Refc: 1
-=fun
-Module: inet_db
-Uniq: 28370334
-Index: 0
-Address: 26e4b0
-Native_address: bcefc
-Refc: 1
-=fun
-Module: erl_lint
-Uniq: 24927227
-Index: 40
-Address: 34ed4c
-Native_address: bceec
-Refc: 1
-=fun
-Module: erl_scan
-Uniq: 105437500
-Index: 33
-Address: 313a30
-Native_address: bced4
-Refc: 1
-=fun
-Module: application_controller
-Uniq: 10921695
-Index: 1
-Address: 234eac
-Native_address: bcefc
-Refc: 1
-=fun
-Module: erl_lint
-Uniq: 112431564
-Index: 55
-Address: 34e22c
-Native_address: bceec
-Refc: 1
-=fun
-Module: webtool
-Uniq: 129460863
-Index: 5
-Address: 4ab5c4
-Native_address: bcefc
-Refc: 1
-=fun
-Module: inet
-Uniq: 89001648
-Index: 3
-Address: 27d2ec
-Native_address: bcefc
-Refc: 1
-=fun
-Module: inet
-Uniq: 36199507
-Index: 8
-Address: 27cfe4
-Native_address: bcefc
-Refc: 1
-=fun
-Module: crashdump_viewer_html
-Uniq: 35620771
-Index: 2
-Address: 5262ec
-Native_address: bcefc
-Refc: 1
-=fun
-Module: erl_eval
-Uniq: 83214871
-Index: 18
-Address: 2f9e34
-Native_address: bceec
-Refc: 1
-=fun
-Module: code_server
-Uniq: 122455383
-Index: 1
-Address: 2adc0c
-Native_address: bcf04
-Refc: 1
-=fun
-Module: erl_lint
-Uniq: 22389488
-Index: 31
-Address: 34f1b8
-Native_address: bceec
-Refc: 1
-=fun
-Module: erl_eval
-Uniq: 41869059
-Index: 12
-Address: 2fa1d4
-Native_address: bcef4
-Refc: 1
-=fun
-Module: erl_lint
-Uniq: 18130505
-Index: 45
-Address: 34e904
-Native_address: bcefc
-Refc: 1
-=fun
-Module: hipe_unified_loader
-Uniq: 107414126
-Index: 1
-Address: 2b706c
-Native_address: bcefc
-Refc: 1
-=fun
-Module: erl_eval
-Uniq: 116638945
-Index: 28
-Address: 2f98f8
-Native_address: bcefc
-Refc: 1
-=fun
-Module: application_controller
-Uniq: 48465762
-Index: 9
-Address: 2348c8
-Native_address: bcefc
-Refc: 1
-=fun
-Module: httpd_request_handler
-Uniq: 87633852
-Index: 0
-Address: 50e97c
-Native_address: bcefc
-Refc: 1
-=fun
-Module: webtool
-Uniq: 28213098
-Index: 8
-Address: 4ab42c
-Native_address: bcefc
-Refc: 1
-=fun
-Module: gen_event
-Uniq: 123630574
-Index: 4
-Address: 222b58
-Native_address: bcefc
-Refc: 1
-=fun
-Module: dict
-Uniq: 127425508
-Index: 13
-Address: 354eb4
-Native_address: bcefc
-Refc: 1
-=fun
-Module: code_server
-Uniq: 95048118
-Index: 16
-Address: 2ad46c
-Native_address: bcef4
-Refc: 1
-=fun
-Module: erl_lint
-Uniq: 108661978
-Index: 19
-Address: 34f75c
-Native_address: bcefc
-Refc: 1
-=fun
-Module: erl_lint
-Uniq: 21272619
-Index: 13
-Address: 34fad8
-Native_address: bcef4
-Refc: 1
-=fun
-Module: erl_scan
-Uniq: 29943747
-Index: 17
-Address: 313bf0
-Native_address: bced4
-Refc: 1
-=fun
-Module: erl_scan
-Uniq: 120240397
-Index: 4
-Address: 313d94
-Native_address: bced4
-Refc: 1
-=fun
-Module: erl_lint
-Uniq: 124060676
-Index: 0
-Address: 350124
-Native_address: bcef4
-Refc: 1
-=fun
-Module: crashdump_viewer_html
-Uniq: 100975346
-Index: 6
-Address: 526260
-Native_address: bcefc
-Refc: 1
-=fun
-Module: code_server
-Uniq: 61421476
-Index: 4
-Address: 2ada9c
-Native_address: bcef4
-Refc: 1
-=fun
-Module: erl_lint
-Uniq: 45197232
-Index: 7
-Address: 34fe5c
-Native_address: bcef4
-Refc: 1
-=fun
-Module: crashdump_viewer_html
-Uniq: 3151900
-Index: 15
-Address: 525f24
-Native_address: bcefc
-Refc: 1
-=fun
-Module: httpd_util
-Uniq: 77509245
-Index: 2
-Address: 4b5e2c
-Native_address: bcefc
-Refc: 1
-=fun
-Module: code_server
-Uniq: 94110229
-Index: 8
-Address: 2ad7e4
-Native_address: bcef4
-Refc: 3
-=fun
-Module: rpc
-Uniq: 101217130
-Index: 1
-Address: 2560c4
-Native_address: bcf04
-Refc: 1
-=fun
-Module: lists
-Uniq: 103647452
-Index: 0
-Address: 244b7c
-Native_address: bcefc
-Refc: 1
-=fun
-Module: code_server
-Uniq: 37841211
-Index: 9
-Address: 2ad77c
-Native_address: bcef4
-Refc: 1
-=fun
-Module: erl_lint
-Uniq: 40109251
-Index: 54
-Address: 34e2b4
-Native_address: bcef4
-Refc: 1
-=fun
-Module: init
-Uniq: 98012300
-Index: 0
-Address: 1fa2d0
-Native_address: bcefc
-Refc: 1
-=fun
-Module: webtool
-Uniq: 73604759
-Index: 10
-Address: 4ab270
-Native_address: bcefc
-Refc: 1
-=fun
-Module: erl_scan
-Uniq: 12042434
-Index: 1
-Address: 313d40
-Native_address: bced4
-Refc: 1
-=fun
-Module: shell
-Uniq: 127137775
-Index: 4
-Address: 2e531c
-Native_address: bcf04
-Refc: 1
-=fun
-Module: inet
-Uniq: 45498037
-Index: 12
-Address: 27cec0
-Native_address: bcefc
-Refc: 1
-=fun
-Module: erl_lint
-Uniq: 122441107
-Index: 34
-Address: 34f1d4
-Native_address: bcefc
-Refc: 1
-=fun
-Module: erl_lint
-Uniq: 70933889
-Index: 46
-Address: 34e8d0
-Native_address: bcef4
-Refc: 1
-=fun
-Module: inet
-Uniq: 69850797
-Index: 2
-Address: 27d308
-Native_address: bcefc
-Refc: 1
-=fun
-Module: application_controller
-Uniq: 103965539
-Index: 13
-Address: 234684
-Native_address: bcefc
-Refc: 1
-=fun
-Module: erl_scan
-Uniq: 29979659
-Index: 30
-Address: 313a84
-Native_address: bced4
-Refc: 1
-=fun
-Module: erl_lint
-Uniq: 17148721
-Index: 20
-Address: 34f778
-Native_address: bcefc
-Refc: 1
-=fun
-Module: httpd_response
-Uniq: 100673049
-Index: 0
-Address: 5165dc
-Native_address: bcefc
-Refc: 1
-=fun
-Module: inet_gethost_native
-Uniq: 10508176
-Index: 1
-Address: 4b04dc
-Native_address: bcefc
-Refc: 1
-=fun
-Module: erl_lint
-Uniq: 32476064
-Index: 57
-Address: 34e1c4
-Native_address: bcef4
-Refc: 1
-=fun
-Module: erl_scan
-Uniq: 74835078
-Index: 9
-Address: 313cec
-Native_address: bced4
-Refc: 1
-=fun
-Module: crashdump_viewer
-Uniq: 60689814
-Index: 19
-Address: 4a3b78
-Native_address: bceec
-Refc: 1
-=fun
-Module: erl_lint
-Uniq: 39269715
-Index: 5
-Address: 34ff14
-Native_address: bcef4
-Refc: 1
-=fun
-Module: shell
-Uniq: 112923172
-Index: 0
-Address: 2e5404
-Native_address: bcf04
-Refc: 1
-=fun
-Module: erl_eval
-Uniq: 43010824
-Index: 14
-Address: 2fa03c
-Native_address: bce8c
-Refc: 1
-=fun
-Module: global
-Uniq: 82495254
-Index: 3
-Address: 265ac8
-Native_address: bcefc
-Refc: 1
-=fun
-Module: shell
-Uniq: 48568081
-Index: 8
-Address: 2e5220
-Native_address: bcefc
-Refc: 1
-=fun
-Module: init
-Uniq: 77236637
-Index: 7
-Address: 1fa000
-Native_address: bcf04
-Refc: 1
-=fun
-Module: erl_eval
-Uniq: 109386574
-Index: 1
-Address: 2fa804
-Native_address: bce9c
-Refc: 1
-=fun
-Module: erl_lint
-Uniq: 42613220
-Index: 14
-Address: 34f980
-Native_address: bcef4
-Refc: 1
-=fun
-Module: erl_scan
-Uniq: 67093144
-Index: 23
-Address: 313b64
-Native_address: bced4
-Refc: 1
-=fun
-Module: erl_lint
-Uniq: 86833790
-Index: 11
-Address: 34fbe8
-Native_address: bcefc
-Refc: 1
-=fun
-Module: net_kernel
-Uniq: 6344855
-Index: 1
-Address: 29eabc
-Native_address: bcefc
-Refc: 1
-=fun
-Module: erl_lint
-Uniq: 5149749
-Index: 35
-Address: 34f220
-Native_address: bcefc
-Refc: 1
-=fun
-Module: init
-Uniq: 93451769
-Index: 5
-Address: 1fa120
-Native_address: bcefc
-Refc: 1
-=fun
-Module: application_controller
-Uniq: 117428568
-Index: 11
-Address: 234758
-Native_address: bcefc
-Refc: 1
-=fun
-Module: crashdump_viewer_html
-Uniq: 15225890
-Index: 4
-Address: 526298
-Native_address: bcefc
-Refc: 1
-=fun
-Module: application_controller
-Uniq: 120760477
-Index: 2
-Address: 234cdc
-Native_address: bcefc
-Refc: 1
-=fun
-Module: c
-Uniq: 88561919
-Index: 3
-Address: 3000ac
-Native_address: bcefc
-Refc: 1
-=fun
-Module: erl_scan
-Uniq: 108931174
-Index: 8
-Address: 313cb4
-Native_address: bced4
-Refc: 1
-=fun
-Module: rpc
-Uniq: 122901192
-Index: 4
-Address: 255e44
-Native_address: bcf04
-Refc: 1
-=fun
-Module: erl_lint
-Uniq: 32985930
-Index: 10
-Address: 34fc40
-Native_address: bcef4
-Refc: 1
-=fun
-Module: global_group
-Uniq: 97968498
-Index: 1
-Address: 292b7c
-Native_address: bcef4
-Refc: 1
-=fun
-Module: crashdump_viewer
-Uniq: 45671671
-Index: 18
-Address: 4a32d0
-Native_address: bcefc
-Refc: 1
-=fun
-Module: erl_eval
-Uniq: 117968056
-Index: 3
-Address: 2fa6ec
-Native_address: bcecc
-Refc: 1
-=fun
-Module: init
-Uniq: 108717591
-Index: 4
-Address: 1fa194
-Native_address: bcf04
-Refc: 1
-=fun
-Module: supervisor
-Uniq: 15091954
-Index: 2
-Address: 2526dc
-Native_address: bcefc
-Refc: 1
-=fun
-Module: global
-Uniq: 65707495
-Index: 6
-Address: 2658a4
-Native_address: bcefc
-Refc: 1
-=fun
-Module: code_server
-Uniq: 34473969
-Index: 17
-Address: 2ad450
-Native_address: bcef4
-Refc: 2
-=fun
-Module: crashdump_viewer_html
-Uniq: 124296602
-Index: 7
-Address: 526244
-Native_address: bcefc
-Refc: 1
-=fun
-Module: global
-Uniq: 23074707
-Index: 15
-Address: 265460
-Native_address: bcefc
-Refc: 1
-=fun
-Module: inet
-Uniq: 25972856
-Index: 10
-Address: 27cf74
-Native_address: bcefc
-Refc: 1
-=fun
-Module: erl_eval
-Uniq: 43110452
-Index: 24
-Address: 2f9ad4
-Native_address: bceec
-Refc: 1
-=fun
-Module: code_server
-Uniq: 106445918
-Index: 13
-Address: 2ad660
-Native_address: bcefc
-Refc: 1
-=fun
-Module: crashdump_viewer_html
-Uniq: 116071286
-Index: 12
-Address: 5261b8
-Native_address: bcefc
-Refc: 1
-=fun
-Module: inet_parse
-Uniq: 130814477
-Index: 8
-Address: 284cfc
-Native_address: bcefc
-Refc: 1
-=fun
-Module: erl_lint
-Uniq: 121017037
-Index: 39
-Address: 34ed80
-Native_address: bcef4
-Refc: 1
-=fun
-Module: ets
-Uniq: 104895267
-Index: 0
-Address: 2bc1bc
-Native_address: bcefc
-Refc: 1
-=fun
-Module: crashdump_viewer
-Uniq: 104682437
-Index: 11
-Address: 4a3de0
-Native_address: bcefc
-Refc: 1
-=fun
-Module: erl_lint
-Uniq: 70248777
-Index: 30
-Address: 34f30c
-Native_address: bcefc
-Refc: 1
-=fun
-Module: c
-Uniq: 13274975
-Index: 5
-Address: 300074
-Native_address: bcef4
-Refc: 1
-=fun
-Module: erl_lint
-Uniq: 98442771
-Index: 53
-Address: 34e2d0
-Native_address: bceec
-Refc: 1
-=fun
-Module: erl_eval
-Uniq: 69829006
-Index: 7
-Address: 2fa47c
-Native_address: bce80
-Refc: 1
-=fun
-Module: old_file_server
-Uniq: 36444943
-Index: 1
-Address: 2a1a80
-Native_address: bcf04
-Refc: 1
-=fun
-Module: erl_lint
-Uniq: 58719455
-Index: 26
-Address: 34f5f0
-Native_address: bcefc
-Refc: 1
-=fun
-Module: timer
-Uniq: 42505885
-Index: 0
-Address: 4cd62c
-Native_address: bcefc
-Refc: 1
-=fun
-Module: erl_eval
-Uniq: 54682479
-Index: 20
-Address: 2f9d08
-Native_address: bcf04
-Refc: 1
-=fun
-Module: gen_event
-Uniq: 86070332
-Index: 1
-Address: 222d7c
-Native_address: bcefc
-Refc: 1
-=fun
-Module: c
-Uniq: 54728136
-Index: 9
-Address: 2fff68
-Native_address: bcefc
-Refc: 1
-=fun
-Module: application_controller
-Uniq: 16474219
-Index: 3
-Address: 234c60
-Native_address: bcefc
-Refc: 1
-=fun
-Module: application_controller
-Uniq: 108831556
-Index: 10
-Address: 234810
-Native_address: bcefc
-Refc: 1
-=fun
-Module: erl_lint
-Uniq: 72053761
-Index: 16
-Address: 34f8ec
-Native_address: bcef4
-Refc: 1
-=fun
-Module: net_kernel
-Uniq: 65127616
-Index: 2
-Address: 29ea04
-Native_address: bcefc
-Refc: 1
-=fun
-Module: application_controller
-Uniq: 126167637
-Index: 14
-Address: 234640
-Native_address: bcef4
-Refc: 1
-=fun
-Module: inet_parse
-Uniq: 113704917
-Index: 0
-Address: 285788
-Native_address: bcefc
-Refc: 1
-=fun
-Module: mod_disk_log
-Uniq: 75279647
-Index: 1
-Address: 500100
-Native_address: bcefc
-Refc: 1
-=fun
-Module: inet_db
-Uniq: 119218247
-Index: 5
-Address: 26df68
-Native_address: bcef4
-Refc: 1
-=fun
-Module: httpd_util
-Uniq: 85690044
-Index: 4
-Address: 4b5d6c
-Native_address: bcefc
-Refc: 1
-=fun
-Module: inet_db
-Uniq: 53075592
-Index: 1
-Address: 26e16c
-Native_address: bcefc
-Refc: 1
-=fun
-Module: c
-Uniq: 39490182
-Index: 2
-Address: 3000c8
-Native_address: bcefc
-Refc: 1
-=fun
-Module: application_controller
-Uniq: 75189006
-Index: 12
-Address: 234714
-Native_address: bcef4
-Refc: 1
-=fun
-Module: erl_lint
-Uniq: 14980808
-Index: 43
-Address: 34eb38
-Native_address: bceec
-Refc: 1
-=fun
-Module: crashdump_viewer
-Uniq: 16463468
-Index: 4
-Address: 4a4914
-Native_address: bcee4
-Refc: 1
-=fun
-Module: dict
-Uniq: 99965326
-Index: 4
-Address: 355020
-Native_address: bcefc
-Refc: 1
-=fun
-Module: inet_parse
-Uniq: 36900786
-Index: 6
-Address: 284f3c
-Native_address: bcefc
-Refc: 1
-=fun
-Module: erl_lint
-Uniq: 45447147
-Index: 18
-Address: 34f794
-Native_address: bcef4
-Refc: 1
-=fun
-Module: erl_lint
-Uniq: 32353825
-Index: 6
-Address: 34fe78
-Native_address: bcef4
-Refc: 1
-=fun
-Module: erl_lint
-Uniq: 134052338
-Index: 8
-Address: 34fdc0
-Native_address: bceec
-Refc: 1
-=fun
-Module: application_master
-Uniq: 23840924
-Index: 1
-Address: 24aae0
-Native_address: bcefc
-Refc: 1
-=fun
-Module: webtool
-Uniq: 108282500
-Index: 1
-Address: 4ab918
-Native_address: bcefc
-Refc: 1
-=fun
-Module: erl_prim_loader
-Uniq: 31081110
-Index: 0
-Address: 210c68
-Native_address: bcf04
-Refc: 1
-=fun
-Module: erl_eval
-Uniq: 54275742
-Index: 26
-Address: 2f9a4c
-Native_address: bcef4
-Refc: 1
-=fun
-Module: shell
-Uniq: 45083091
-Index: 3
-Address: 2e5350
-Native_address: bcf04
-Refc: 3
-=proc_stack:<0.0.0>
-3a48bc:SReturn addr 0x156F90 (<terminate process normally>)
-y0:H371264
-=proc_heap:<0.0.0>
-371264:t9:A5:state,H3710D8,N,N,H3710F4,P<0.1.0>,H37128C,H3710FC,N
-3710FC:t2:H371138,H371140
-371140:lI80|H371194
-371194:lI49|H3711E0
-3711E0:lI48|H371204
-371204:lI66|N
-371138:lI79|H37118C
-37118C:lI84|H3711D8
-3711D8:lI80|H3711FC
-3711FC:lI32|H37120C
-37120C:lI32|H371214
-371214:lI65|H37121C
-37121C:lI80|H371224
-371224:lI78|H37122C
-37122C:lI32|H371234
-371234:lI49|H37123C
-37123C:lI56|H371244
-371244:lI49|H37124C
-37124C:lI32|H371254
-371254:lI48|H37125C
-37125C:lI49|N
-37128C:t2:A7:started,A7:started
-3710F4:lH371124|H371130
-371124:t2:A16:application_controller,P<0.5.0>
-371130:lH371178|H371184
-371178:t2:AC:error_logger,P<0.4.0>
-371184:lH3711CC|N
-3711CC:t2:AF:erl_prim_loader,P<0.2.0>
-3710D8:lH3710E0|H3710EC
-3710E0:t2:A5:-root,H371108
-371108:lH371148|N
-371148:Yh13:2F636C656172636173652F6F74702F65727473
-3710EC:lH371110|H37111C
-371110:t2:A9:-progname,H371164
-371164:lH37119C|N
-37119C:Yh1D:2F636C656172636173652F6F74702F657274732F62696E2F6365726C20
-37111C:lH37116C|N
-37116C:t2:A5:-home,H3711C4
-3711C4:lH3711E8|N
-3711E8:YhA:2F686F6D652F73697269
-=proc_stack:<0.2.0>
-38eca8:SReturn addr 0x156F90 (<terminate process normally>)
-y0:H367D20
-y1:P<0.1.0>
-y2:H367D28
-y3:A8:infinity
-=proc_heap:<0.2.0>
-367D20:lH367D48|H367D50
-367D48:lI47|H367D58
-367D58:lI99|H367D68
-367D68:lI108|H367D78
-367D78:lI101|H367D88
-367D88:lI97|H367D98
-367D98:lI114|H367DA8
-367DA8:lI99|H367DB8
-367DB8:lI97|H367DC8
-367DC8:lI115|H367DD8
-367DD8:lI101|H367DE8
-367DE8:lI47|H367DF8
-367DF8:lI111|H367E08
-367E08:lI116|H367E18
-367E18:lI112|H367E28
-367E28:lI47|H367E38
-367E38:lI101|H367E48
-367E48:lI114|H367E58
-367E58:lI116|H367E68
-367E68:lI115|H367E78
-367E78:lI47|H367E88
-367E88:lI108|H367E98
-367E98:lI105|H367EA8
-367EA8:lI98|H367EB8
-367EB8:lI47|H367EC8
-367EC8:lI107|H367ED8
-367ED8:lI101|H367EE8
-367EE8:lI114|H367EF8
-367EF8:lI110|H367F08
-367F08:lI101|H367F18
-367F18:lI108|H367F28
-367F28:lI47|H367F38
-367F38:lI101|H367F48
-367F48:lI98|H367F58
-367F58:lI105|H367F68
-367F68:lI110|N
-367D50:lH367D60|N
-367D60:lI47|H367D70
-367D70:lI99|H367D80
-367D80:lI108|H367D90
-367D90:lI101|H367DA0
-367DA0:lI97|H367DB0
-367DB0:lI114|H367DC0
-367DC0:lI99|H367DD0
-367DD0:lI97|H367DE0
-367DE0:lI115|H367DF0
-367DF0:lI101|H367E00
-367E00:lI47|H367E10
-367E10:lI111|H367E20
-367E20:lI116|H367E30
-367E30:lI112|H367E40
-367E40:lI47|H367E50
-367E50:lI101|H367E60
-367E60:lI114|H367E70
-367E70:lI116|H367E80
-367E80:lI115|H367E90
-367E90:lI47|H367EA0
-367EA0:lI108|H367EB0
-367EB0:lI105|H367EC0
-367EC0:lI98|H367ED0
-367ED0:lI47|H367EE0
-367EE0:lI115|H367EF0
-367EF0:lI116|H367F00
-367F00:lI100|H367F10
-367F10:lI108|H367F20
-367F20:lI105|H367F30
-367F30:lI98|H367F40
-367F40:lI47|H367F50
-367F50:lI101|H367F60
-367F60:lI98|H367F70
-367F70:lI105|H367F78
-367F78:lI110|N
-367D28:t7:A5:state,A5:efile,N,A4:none,p<0.2>,A8:infinity,A5:false
-=proc_dictionary:<0.4.0>
-H3AC588
-H3AC594
-=proc_stack:<0.4.0>
-3b2f14:SReturn addr 0x225860 (proc_lib:init_p/5 + 164)
-y0:N
-y1:H3B21E8
-y2:AC:error_logger
-y3:P<0.1.0>
-3b2f28:SReturn addr 0x156F90 (<terminate process normally>)
-y0:SCatch 0x225860 (proc_lib:init_p/5 + 164)
-y1:A3:gen
-y2:A7:init_it
-y3:H3AC5A8
-=proc_heap:<0.4.0>
-3B21E8:lH3B2144|H3B21E0
-3B2144:t5:A7:handler,AC:error_logger,A5:false,N,A5:false
-3B21E0:lH3B21BC|N
-3B21BC:t5:A7:handler,A12:error_logger_tty_h,A5:false,H3AC610,A5:false
-3AC610:t2:P<0.21.0>,AC:error_logger
-3AC5A8:lA9:gen_event|H3AC5E8
-3AC5E8:lP<0.1.0>|H3AC608
-3AC608:lP<0.1.0>|H3AC61C
-3AC61C:lH3AC624|H3AC630
-3AC624:t2:A5:local,AC:error_logger
-3AC630:lN|H3AC638
-3AC638:lN|H3AC640
-3AC640:lN|N
-3AC588:t2:AD:$initial_call,H3AC5B0
-3AC5B0:t3:A3:gen,A7:init_it,H3AC5A8
-3AC594:t2:AA:$ancestors,H3AC5C0
-3AC5C0:lP<0.1.0>|N
-=proc_dictionary:<0.5.0>
-H372E4C
-H372E58
-=proc_stack:<0.5.0>
-374704:SReturn addr 0x225860 (proc_lib:init_p/5 + 164)
-y0:N
-y1:A8:infinity
-y2:A16:application_controller
-y3:H3739F4
-y4:A16:application_controller
-y5:P<0.1.0>
-374720:SReturn addr 0x156F90 (<terminate process normally>)
-y0:SCatch 0x225860 (proc_lib:init_p/5 + 164)
-y1:A3:gen
-y2:A7:init_it
-y3:H372ED0
-=proc_heap:<0.5.0>
-3739F4:t9:A5:state,N,N,N,H373914,N,H373928,N,N
-373928:lH37391C|H372F54
-37391C:t2:A6:stdlib,A9:permanent
-372F54:lH372F90|N
-372F90:t2:A6:kernel,A9:permanent
-373914:lH373908|H372F4C
-373908:t2:A6:stdlib,A9:undefined
-372F4C:lH372F84|N
-372F84:t2:A6:kernel,P<0.7.0>
-372ED0:lAA:gen_server|H372F5C
-372F5C:lP<0.1.0>|H372F9C
-372F9C:lP<0.1.0>|H372FC4
-372FC4:lH372FEC|H372FF8
-372FEC:t2:A5:local,A16:application_controller
-372FF8:lA16:application_controller|H373018
-373018:lH373038|H373048
-373038:t3:AB:application,A6:kernel,H373060
-373060:lH373078|H373084
-373078:t2:AB:description,H37309C
-37309C:lI69|H3730C8
-3730C8:lI82|H3730FC
-3730FC:lI84|H373130
-373130:lI83|H37316C
-37316C:lI32|H3731A8
-3731A8:lI32|H3731E4
-3731E4:lI67|H373220
-373220:lI88|H37325C
-37325C:lI67|H37329C
-37329C:lI32|H3732D0
-3732D0:lI49|H3732FC
-3732FC:lI51|H373328
-373328:lI56|H373348
-373348:lI32|H373368
-373368:lI49|H373388
-373388:lI48|N
-373084:lH3730A4|H3730B0
-3730A4:t2:A3:vsn,H3730D0
-3730D0:lI50|H373104
-373104:lI46|H373138
-373138:lI57|N
-3730B0:lH3730D8|H3730E4
-3730D8:t2:A2:id,N
-3730E4:lH37310C|H373118
-37310C:t2:A7:modules,H373140
-373140:lAB:application|H373174
-373174:lA16:application_controller|H3731B0
-3731B0:lA12:application_master|H3731EC
-3731EC:lA13:application_starter|H373228
-373228:lA4:auth|H373264
-373264:lA4:code|H3732A4
-3732A4:lA8:code_aux|H3732D8
-3732D8:lA8:packages|H373304
-373304:lAB:code_server|H373330
-373330:lA9:dist_util|H373350
-373350:lAF:erl_boot_server|H373370
-373370:lA10:erl_distribution|H373390
-373390:lAF:erl_prim_loader|H3733A8
-3733A8:lA9:erl_reply|H3733C0
-3733C0:lA6:erlang|H3733D8
-3733D8:lAD:error_handler|H3733F0
-3733F0:lAC:error_logger|H373408
-373408:lA4:file|H373420
-373420:lAB:file_server|H373438
-373438:lAF:old_file_server|H373450
-373450:lAE:file_io_server|H373468
-373468:lA9:prim_file|H373480
-373480:lA6:global|H373498
-373498:lAC:global_group|H3734B0
-3734B0:lAD:global_search|H3734C8
-3734C8:lA5:group|H3734E0
-3734E0:lA5:heart|H3734F8
-3734F8:lA13:hipe_unified_loader|H373510
-373510:lA11:hipe_sparc_loader|H373520
-373520:lAF:hipe_x86_loader|H373530
-373530:lA9:inet6_tcp|H373540
-373540:lAE:inet6_tcp_dist|H373550
-373550:lA9:inet6_udp|H373560
-373560:lAB:inet_config|H373570
-373570:lAA:inet_hosts|H373580
-373580:lA13:inet_gethost_native|H373590
-373590:lAD:inet_tcp_dist|H3735A0
-3735A0:lA4:init|H3735B0
-3735B0:lA6:kernel|H3735C0
-3735C0:lAD:kernel_config|H3735D0
-3735D0:lA3:net|H3735E0
-3735E0:lA7:net_adm|H3735F0
-3735F0:lAA:net_kernel|H373600
-373600:lA2:os|H373610
-373610:lA8:ram_file|H373620
-373620:lA3:rpc|H373630
-373630:lA4:user|H373640
-373640:lA8:user_drv|H373650
-373650:lA8:user_sup|H373660
-373660:lA8:disk_log|H373670
-373670:lAA:disk_log_1|H373680
-373680:lAF:disk_log_server|H373690
-373690:lAC:disk_log_sup|H3736A0
-3736A0:lA7:dist_ac|H3736B0
-3736B0:lA8:erl_ddll|H3736C0
-3736C0:lA8:erl_epmd|H3736D0
-3736D0:lAA:erts_debug|H3736E0
-3736E0:lA7:gen_tcp|H3736F0
-3736F0:lA7:gen_udp|H373700
-373700:lA9:prim_inet|H373708
-373708:lA4:inet|H373710
-373710:lA7:inet_db|H373718
-373718:lA8:inet_dns|H373720
-373720:lAA:inet_parse|H373728
-373728:lA8:inet_res|H373730
-373730:lA8:inet_tcp|H373738
-373738:lA8:inet_udp|H373740
-373740:lA3:pg2|H373748
-373748:lA9:seq_trace|H373750
-373750:lA6:socks5|H373758
-373758:lAB:socks5_auth|H373760
-373760:lAA:socks5_tcp|H373768
-373768:lAA:socks5_udp|H373770
-373770:lAF:wrap_log_reader|H373778
-373778:lA4:zlib|H373780
-373780:lA9:otp_ring0|N
-373118:lH373148|H373154
-373148:t2:AA:registered,H37317C
-37317C:lA16:application_controller|H3731B8
-3731B8:lA9:erl_reply|H3731F4
-3731F4:lA4:auth|H373230
-373230:lAB:boot_server|H37326C
-37326C:lAB:code_server|H3732AC
-3732AC:lAF:disk_log_server|H3732E0
-3732E0:lAC:disk_log_sup|H37330C
-37330C:lAF:erl_prim_loader|H373338
-373338:lAC:error_logger|H373358
-373358:lAB:file_server|H373378
-373378:lAD:file_server_2|H373398
-373398:lAF:fixtable_server|H3733B0
-3733B0:lAC:global_group|H3733C8
-3733C8:lA12:global_name_server|H3733E0
-3733E0:lA5:heart|H3733F8
-3733F8:lA4:init|H373410
-373410:lAD:kernel_config|H373428
-373428:lAA:kernel_sup|H373440
-373440:lAA:net_kernel|H373458
-373458:lA7:net_sup|H373470
-373470:lA3:rex|H373488
-373488:lA4:user|H3734A0
-3734A0:lA9:os_server|H3734B8
-3734B8:lAB:ddll_server|H3734D0
-3734D0:lA8:erl_epmd|H3734E8
-3734E8:lA7:inet_db|H373500
-373500:lA3:pg2|N
-373154:lH373184|H373190
-373184:t2:AC:applications,N
-373190:lH3731C0|H3731CC
-3731C0:t2:A15:included_applications,N
-3731CC:lH3731FC|H373208
-3731FC:t2:A3:env,H373238
-373238:lH373274|N
-373274:t2:AC:error_logger,A3:tty
-373208:lH373240|H37324C
-373240:t2:AC:start_phases,A9:undefined
-37324C:lH373280|H37328C
-373280:t2:A4:maxT,A8:infinity
-37328C:lH3732B4|H3732C0
-3732B4:t2:A4:maxP,A8:infinity
-3732C0:lH3732E8|N
-3732E8:t2:A3:mod,H373314
-373314:t2:A6:kernel,N
-373048:lN|N
-372E4C:t2:AD:$initial_call,H372EE4
-372EE4:t3:A3:gen,A7:init_it,H372ED0
-372E58:t2:AA:$ancestors,H372EF4
-372EF4:lP<0.1.0>|N
-=proc_dictionary:<0.7.0>
-H369B78
-H369B5C
-=proc_stack:<0.7.0>
-369d64:SReturn addr 0x225860 (proc_lib:init_p/5 + 164)
-y0:H369C2C
-y1:P<0.5.0>
-369d70:SReturn addr 0x156F90 (<terminate process normally>)
-y0:SCatch 0x225860 (proc_lib:init_p/5 + 164)
-y1:A12:application_master
-y2:A4:init
-y3:H369B2C
-=proc_heap:<0.7.0>
-369C2C:t6:A5:state,P<0.8.0>,H3697B0,N,I0,P<0.0.0>
-3697B0:t9:A9:appl_data,A6:kernel,H369B14,A9:undefined,H3697D8,H369A3C,N,A8:infinity,A8:infinity
-369A3C:lAB:application|H369A34
-369A34:lA16:application_controller|H369A2C
-369A2C:lA12:application_master|H369A24
-369A24:lA13:application_starter|H369A1C
-369A1C:lA4:auth|H369A14
-369A14:lA4:code|H369A0C
-369A0C:lA8:code_aux|H369A04
-369A04:lA8:packages|H3699FC
-3699FC:lAB:code_server|H3699F4
-3699F4:lA9:dist_util|H3699EC
-3699EC:lAF:erl_boot_server|H3699E4
-3699E4:lA10:erl_distribution|H3699DC
-3699DC:lAF:erl_prim_loader|H3699D4
-3699D4:lA9:erl_reply|H3699CC
-3699CC:lA6:erlang|H3699C4
-3699C4:lAD:error_handler|H3699BC
-3699BC:lAC:error_logger|H3699B4
-3699B4:lA4:file|H3699AC
-3699AC:lAB:file_server|H3699A4
-3699A4:lAF:old_file_server|H36999C
-36999C:lAE:file_io_server|H369994
-369994:lA9:prim_file|H36998C
-36998C:lA6:global|H369984
-369984:lAC:global_group|H36997C
-36997C:lAD:global_search|H369974
-369974:lA5:group|H36996C
-36996C:lA5:heart|H369964
-369964:lA13:hipe_unified_loader|H36995C
-36995C:lA11:hipe_sparc_loader|H369954
-369954:lAF:hipe_x86_loader|H36994C
-36994C:lA9:inet6_tcp|H369944
-369944:lAE:inet6_tcp_dist|H36993C
-36993C:lA9:inet6_udp|H369934
-369934:lAB:inet_config|H36992C
-36992C:lAA:inet_hosts|H369924
-369924:lA13:inet_gethost_native|H36991C
-36991C:lAD:inet_tcp_dist|H369914
-369914:lA4:init|H36990C
-36990C:lA6:kernel|H369904
-369904:lAD:kernel_config|H3698FC
-3698FC:lA3:net|H3698F4
-3698F4:lA7:net_adm|H3698EC
-3698EC:lAA:net_kernel|H3698E4
-3698E4:lA2:os|H3698DC
-3698DC:lA8:ram_file|H3698D4
-3698D4:lA3:rpc|H3698CC
-3698CC:lA4:user|H3698C4
-3698C4:lA8:user_drv|H3698BC
-3698BC:lA8:user_sup|H3698B4
-3698B4:lA8:disk_log|H3698AC
-3698AC:lAA:disk_log_1|H3698A4
-3698A4:lAF:disk_log_server|H36989C
-36989C:lAC:disk_log_sup|H369894
-369894:lA7:dist_ac|H36988C
-36988C:lA8:erl_ddll|H369884
-369884:lA8:erl_epmd|H36987C
-36987C:lAA:erts_debug|H369874
-369874:lA7:gen_tcp|H36986C
-36986C:lA7:gen_udp|H369864
-369864:lA9:prim_inet|H36985C
-36985C:lA4:inet|H369854
-369854:lA7:inet_db|H36984C
-36984C:lA8:inet_dns|H369844
-369844:lAA:inet_parse|H36983C
-36983C:lA8:inet_res|H369834
-369834:lA8:inet_tcp|H36982C
-36982C:lA8:inet_udp|H369824
-369824:lA3:pg2|H36981C
-36981C:lA9:seq_trace|H369814
-369814:lA6:socks5|H36980C
-36980C:lAB:socks5_auth|H369804
-369804:lAA:socks5_tcp|H3697FC
-3697FC:lAA:socks5_udp|H3697F4
-3697F4:lAF:wrap_log_reader|H3697EC
-3697EC:lA4:zlib|H3697E4
-3697E4:lA9:otp_ring0|N
-3697D8:t2:A6:kernel,N
-369B14:lA16:application_controller|H369B0C
-369B0C:lA9:erl_reply|H369B04
-369B04:lA4:auth|H369AFC
-369AFC:lAB:boot_server|H369AF4
-369AF4:lAB:code_server|H369AEC
-369AEC:lAF:disk_log_server|H369AE4
-369AE4:lAC:disk_log_sup|H369ADC
-369ADC:lAF:erl_prim_loader|H369AD4
-369AD4:lAC:error_logger|H369ACC
-369ACC:lAB:file_server|H369AC4
-369AC4:lAD:file_server_2|H369ABC
-369ABC:lAF:fixtable_server|H369AB4
-369AB4:lAC:global_group|H369AAC
-369AAC:lA12:global_name_server|H369AA4
-369AA4:lA5:heart|H369A9C
-369A9C:lA4:init|H369A94
-369A94:lAD:kernel_config|H369A8C
-369A8C:lAA:kernel_sup|H369A84
-369A84:lAA:net_kernel|H369A7C
-369A7C:lA7:net_sup|H369A74
-369A74:lA3:rex|H369A6C
-369A6C:lA4:user|H369A64
-369A64:lA9:os_server|H369A5C
-369A5C:lAB:ddll_server|H369A54
-369A54:lA8:erl_epmd|H369A4C
-369A4C:lA7:inet_db|H369A44
-369A44:lA3:pg2|N
-369B2C:lP<0.5.0>|H369B24
-369B24:lP<0.6.0>|H3697A8
-3697A8:lH3697B0|H369B1C
-369B1C:lA6:normal|N
-369B78:t2:AD:$initial_call,H369B68
-369B68:t3:A12:application_master,A4:init,H369B2C
-369B5C:t2:AA:$ancestors,H369B54
-369B54:lP<0.6.0>|N
-=proc_stack:<0.8.0>
-384ec0:SReturn addr 0x156F90 (<terminate process normally>)
-y0:H384BDC
-y1:A6:kernel
-y2:P<0.9.0>
-y3:P<0.7.0>
-=proc_heap:<0.8.0>
-384BDC:t2:A5:state,A3:tty
-=proc_dictionary:<0.9.0>
-H376850
-H37685C
-=proc_stack:<0.9.0>
-36bde8:SReturn addr 0x225860 (proc_lib:init_p/5 + 164)
-y0:N
-y1:A8:infinity
-y2:AA:supervisor
-y3:H36B8E8
-y4:AA:kernel_sup
-y5:P<0.8.0>
-36be04:SReturn addr 0x156F90 (<terminate process normally>)
-y0:SCatch 0x225860 (proc_lib:init_p/5 + 164)
-y1:A3:gen
-y2:A7:init_it
-y3:H3768D4
-=proc_heap:<0.9.0>
-36B8E8:tA:A5:state,H376868,AB:one_for_all,H36B8D4,N,I0,I1,N,A6:kernel,N
-36B8D4:lH36B8B0|H36B6E8
-36B8B0:t8:A5:child,P<0.24.0>,AF:kernel_safe_sup,H376BF0,A9:permanent,A8:infinity,AA:supervisor,H376C00
-376C00:lA6:kernel|N
-376BF0:t3:AA:supervisor,AA:start_link,H376C08
-376C08:lH376C10|H376C1C
-376C10:t2:A5:local,AF:kernel_safe_sup
-376C1C:lA6:kernel|H376C24
-376C24:lA4:safe|N
-36B6E8:lH36B6C4|H36B490
-36B6C4:t8:A5:child,P<0.23.0>,AD:kernel_config,H376BB4,A9:permanent,I2000,A6:worker,H376BC4
-376BC4:lAD:kernel_config|N
-376BB4:t3:AD:kernel_config,AA:start_link,N
-36B490:lH36B498|H36B4BC
-36B498:t8:A5:child,P<0.19.0>,A4:user,H376B70,A9:temporary,I2000,AA:supervisor,H376B80
-376B80:lA8:user_sup|N
-376B70:t3:A8:user_sup,A5:start,N
-36B4BC:lH36B4C4|H376CB0
-36B4C4:t8:A5:child,P<0.18.0>,AB:code_server,H376B0C,A9:permanent,I2000,A6:worker,H376B1C
-376B1C:lA4:code|N
-376B0C:t3:A4:code,AA:start_link,N
-376CB0:lH376CB8|H376CDC
-376CB8:t8:A5:child,P<0.17.0>,AB:file_server,H376AB8,A9:permanent,I2000,A6:worker,H376AC8
-376AC8:lAF:old_file_server|N
-376AB8:t3:AF:old_file_server,AA:start_link,N
-376CDC:lH376CE4|H376C2C
-376CE4:t8:A5:child,P<0.16.0>,AD:file_server_2,H376A58,A9:permanent,I2000,A6:worker,H376A68
-376A68:lA4:file|H376AB0
-376AB0:lAB:file_server|H376B04
-376B04:lAE:file_io_server|H376B68
-376B68:lA9:prim_file|N
-376A58:t3:AB:file_server,AA:start_link,N
-376C2C:lH376C34|H376C58
-376C34:t8:A5:child,P<0.15.0>,AC:global_group,H3769F4,A9:permanent,I2000,A6:worker,H376A04
-376A04:lAC:global_group|N
-3769F4:t3:AC:global_group,AA:start_link,N
-376C58:lH376C60|H376C84
-376C60:t8:A5:child,A9:undefined,A7:net_sup,H37696C,A9:permanent,A8:infinity,AA:supervisor,H37697C
-37697C:lA10:erl_distribution|N
-37696C:t3:A10:erl_distribution,AA:start_link,N
-376C84:lH376C8C|H3768A0
-376C8C:t8:A5:child,P<0.14.0>,A7:inet_db,H3768F4,A9:permanent,I2000,A6:worker,H376904
-376904:lA7:inet_db|N
-3768F4:t3:A7:inet_db,AA:start_link,N
-3768A0:lH376938|H37695C
-376938:t8:A5:child,P<0.11.0>,A12:global_name_server,H3769B0,A9:permanent,I2000,A6:worker,H3769C0
-3769C0:lA6:global|N
-3769B0:t3:A6:global,AA:start_link,N
-37695C:lH3769C8|N
-3769C8:t8:A5:child,P<0.10.0>,A3:rex,H376A38,A9:permanent,I2000,A6:worker,H376A48
-376A48:lA3:rpc|N
-376A38:t3:A3:rpc,AA:start_link,N
-376868:t2:A5:local,AA:kernel_sup
-3768D4:lAA:gen_server|H376964
-376964:lP<0.8.0>|H3769EC
-3769EC:lP<0.8.0>|H376A50
-376A50:lH376A9C|H376AA8
-376A9C:t2:A5:local,AA:kernel_sup
-376AA8:lAA:supervisor|H376AFC
-376AFC:lH376B50|H376B60
-376B50:t3:H376868,A6:kernel,N
-376B60:lN|N
-376850:t2:AD:$initial_call,H3768DC
-3768DC:t3:A3:gen,A7:init_it,H3768D4
-37685C:t2:AA:$ancestors,H3768EC
-3768EC:lP<0.8.0>|N
-=proc_dictionary:<0.10.0>
-H367A10
-H3679F4
-=proc_stack:<0.10.0>
-367cec:SReturn addr 0x225860 (proc_lib:init_p/5 + 164)
-y0:N
-y1:A8:infinity
-y2:A3:rpc
-y3:H367AA8
-y4:A3:rex
-y5:P<0.9.0>
-367d08:SReturn addr 0x156F90 (<terminate process normally>)
-y0:SCatch 0x225860 (proc_lib:init_p/5 + 164)
-y1:A3:gen
-y2:A7:init_it
-y3:H3679C4
-=proc_heap:<0.10.0>
-367AA8:t2:I0,A3:nil
-3679C4:lAA:gen_server|H3679BC
-3679BC:lP<0.9.0>|H3679B4
-3679B4:lP<0.9.0>|H367988
-367988:lH367990|H3679AC
-367990:t2:A5:local,A3:rex
-3679AC:lA3:rpc|H3679A4
-3679A4:lN|H36799C
-36799C:lN|N
-367A10:t2:AD:$initial_call,H367A00
-367A00:t3:A3:gen,A7:init_it,H3679C4
-3679F4:t2:AA:$ancestors,H3679EC
-3679EC:lAA:kernel_sup|H3679CC
-3679CC:lP<0.8.0>|N
-=proc_dictionary:<0.11.0>
-H36ADD8
-H36ADBC
-=proc_stack:<0.11.0>
-36b0b4:SReturn addr 0x225860 (proc_lib:init_p/5 + 164)
-y0:N
-y1:A8:infinity
-y2:A6:global
-y3:H36AF0C
-y4:A12:global_name_server
-y5:P<0.9.0>
-36b0d0:SReturn addr 0x156F90 (<terminate process normally>)
-y0:SCatch 0x225860 (proc_lib:init_p/5 + 164)
-y1:A3:gen
-y2:A7:init_it
-y3:H36AD8C
-=proc_heap:<0.11.0>
-36AF0C:t9:A5:state,A4:true,N,N,N,N,AD:nonode@nohost,P<0.12.0>,P<0.13.0>
-36AD8C:lAA:gen_server|H36AD84
-36AD84:lP<0.9.0>|H36AD7C
-36AD7C:lP<0.9.0>|H36AD50
-36AD50:lH36AD58|H36AD74
-36AD58:t2:A5:local,A12:global_name_server
-36AD74:lA6:global|H36AD6C
-36AD6C:lN|H36AD64
-36AD64:lN|N
-36ADD8:t2:AD:$initial_call,H36ADC8
-36ADC8:t3:A3:gen,A7:init_it,H36AD8C
-36ADBC:t2:AA:$ancestors,H36ADB4
-36ADB4:lAA:kernel_sup|H36AD94
-36AD94:lP<0.8.0>|N
-=proc_stack:<0.12.0>
-36921c:SReturn addr 0x261184 (global:init_the_locker/1 + 112)
-y0:N
-y1:N
-y2:N
-y3:N
-y4:N
-y5:N
-y6:A8:infinity
-y7:H368EB0
-y8:P<0.11.0>
-369244:SReturn addr 0x156F90 (<terminate process normally>)
-y0:N
-=proc_heap:<0.12.0>
-368EB0:t3:A5:multi,A9:undefined,N
-=proc_stack:<0.13.0>
-3695d0:SReturn addr 0x2651AC (global:loop_the_deleter/1 + 36)
-y0:A8:infinity
-y1:N
-y2:P<0.11.0>
-3695e0:SReturn addr 0x2654F8 (global:'-start_the_deleter/1-fun-0-'/1 + 20)
-y0:N
-y1:N
-y2:P<0.11.0>
-3695f0:SReturn addr 0x156F90 (<terminate process normally>)
-=proc_heap:<0.13.0>
-=proc_dictionary:<0.14.0>
-H36A998
-H36A9A4
-=proc_stack:<0.14.0>
-372e0c:SReturn addr 0x225860 (proc_lib:init_p/5 + 164)
-y0:N
-y1:A8:infinity
-y2:A7:inet_db
-y3:H36A9B0
-y4:A7:inet_db
-y5:P<0.9.0>
-372e28:SReturn addr 0x156F90 (<terminate process normally>)
-y0:SCatch 0x225860 (proc_lib:init_p/5 + 164)
-y1:A3:gen
-y2:A7:init_it
-y3:H36A9C8
-=proc_heap:<0.14.0>
-36A9B0:t5:A5:state,A7:inet_db,AA:inet_cache,AA:inet_hosts,H36A9E8
-36A9E8:E21:8372000364000D6E6F6E6F6465406E6F686F737400000000060000000000000000
-36A9C8:lAA:gen_server|H36A9F8
-36A9F8:lP<0.9.0>|H36AA08
-36AA08:lP<0.9.0>|H36AA10
-36AA10:lH36AA18|H36AA24
-36AA18:t2:A5:local,A7:inet_db
-36AA24:lA7:inet_db|H36AA2C
-36AA2C:lN|H36AA34
-36AA34:lN|N
-36A998:t2:AD:$initial_call,H36A9D0
-36A9D0:t3:A3:gen,A7:init_it,H36A9C8
-36A9A4:t2:AA:$ancestors,H36A9E0
-36A9E0:lAA:kernel_sup|H36AA00
-36AA00:lP<0.8.0>|N
-=proc_dictionary:<0.15.0>
-H372788
-H3727F8
-H37276C
-H37280C
-H372820
-=proc_stack:<0.15.0>
-372a64:SReturn addr 0x225860 (proc_lib:init_p/5 + 164)
-y0:N
-y1:A8:infinity
-y2:AC:global_group
-y3:H3728C8
-y4:AC:global_group
-y5:P<0.9.0>
-372a80:SReturn addr 0x156F90 (<terminate process normally>)
-y0:SCatch 0x225860 (proc_lib:init_p/5 + 164)
-y1:A3:gen
-y2:A7:init_it
-y3:H37273C
-=proc_heap:<0.15.0>
-3728C8:tC:A5:state,A7:no_conf,A4:true,N,N,N,N,N,AD:nonode@nohost,N,A6:normal,A6:normal
-37273C:lAA:gen_server|H372734
-372734:lP<0.9.0>|H37272C
-37272C:lP<0.9.0>|H372700
-372700:lH372708|H372724
-372708:t2:A5:local,AC:global_group
-372724:lAC:global_group|H37271C
-37271C:lN|H372714
-372714:lN|N
-372788:t2:AD:$initial_call,H372778
-372778:t3:A3:gen,A7:init_it,H37273C
-3727F8:t2:A10:registered_names,H3727F0
-3727F0:lA9:undefined|N
-37276C:t2:AA:$ancestors,H372764
-372764:lAA:kernel_sup|H372744
-372744:lP<0.8.0>|N
-37280C:t2:A4:send,H372804
-372804:lA9:undefined|N
-372820:t2:AC:whereis_name,H372818
-372818:lA9:undefined|N
-=proc_dictionary:<0.16.0>
-H37B918
-H37B924
-=proc_stack:<0.16.0>
-3d303c:SReturn addr 0x225860 (proc_lib:init_p/5 + 164)
-y0:N
-y1:A8:infinity
-y2:AB:file_server
-y3:p<0.4>
-y4:AD:file_server_2
-y5:P<0.9.0>
-3d3058:SReturn addr 0x156F90 (<terminate process normally>)
-y0:SCatch 0x225860 (proc_lib:init_p/5 + 164)
-y1:A3:gen
-y2:A7:init_it
-y3:H37B930
-=proc_heap:<0.16.0>
-37B930:lAA:gen_server|H37B950
-37B950:lP<0.9.0>|H37B960
-37B960:lP<0.9.0>|H37B968
-37B968:lH37B970|H37B97C
-37B970:t2:A5:local,AD:file_server_2
-37B97C:lAB:file_server|H37B984
-37B984:lN|H37B98C
-37B98C:lN|N
-37B918:t2:AD:$initial_call,H37B938
-37B938:t3:A3:gen,A7:init_it,H37B930
-37B924:t2:AA:$ancestors,H37B948
-37B948:lAA:kernel_sup|H37B958
-37B958:lP<0.8.0>|N
-=proc_stack:<0.17.0>
-3763cc:SReturn addr 0x156F90 (<terminate process normally>)
-y0:H376084
-y1:P<0.16.0>
-y2:P<0.9.0>
-=proc_heap:<0.17.0>
-376084:E21:8372000364000D6E6F6E6F6465406E6F686F737400000000160000000000000000
-=proc_stack:<0.18.0>
-3b98e8:SReturn addr 0x156F90 (<terminate process normally>)
-y0:H38AE84
-y1:P<0.9.0>
-=proc_heap:<0.18.0>
-38AE84:t8:A5:state,P<0.9.0>,H3873BC,H38AEB8,I9,I10,A8:no_cache,AB:interactive
-38AEB8:lH3873D4|H38AEE0
-3873D4:lI46|N
-38AEE0:lH3873EC|H38AF10
-3873EC:lI47|H387404
-387404:lI99|H387424
-387424:lI108|H38744C
-38744C:lI101|H38747C
-38747C:lI97|H3874B4
-3874B4:lI114|H3874F4
-3874F4:lI99|H38753C
-38753C:lI97|H38758C
-38758C:lI115|H3875E4
-3875E4:lI101|H387644
-387644:lI47|H3876AC
-3876AC:lI111|H38771C
-38771C:lI116|H387794
-387794:lI112|H387814
-387814:lI47|H38789C
-38789C:lI101|H38792C
-38792C:lI114|H3879BC
-3879BC:lI116|H387A54
-387A54:lI115|H387AF4
-387AF4:lI47|H387B9C
-387B9C:lI108|H387C4C
-387C4C:lI105|H387D04
-387D04:lI98|H387DC4
-387DC4:lI47|H387E8C
-387E8C:lI107|H387F5C
-387F5C:lI101|H388034
-388034:lI114|H388114
-388114:lI110|H3881FC
-3881FC:lI101|H3882EC
-3882EC:lI108|H3883E4
-3883E4:lI47|H3884E4
-3884E4:lI101|H3885EC
-3885EC:lI98|H3886FC
-3886FC:lI105|H388814
-388814:lI110|N
-38AF10:lH38740C|H38AF48
-38740C:lI47|H38742C
-38742C:lI99|H387454
-387454:lI108|H387484
-387484:lI101|H3874BC
-3874BC:lI97|H3874FC
-3874FC:lI114|H387544
-387544:lI99|H387594
-387594:lI97|H3875EC
-3875EC:lI115|H38764C
-38764C:lI101|H3876B4
-3876B4:lI47|H387724
-387724:lI111|H38779C
-38779C:lI116|H38781C
-38781C:lI112|H3878A4
-3878A4:lI47|H387934
-387934:lI101|H3879C4
-3879C4:lI114|H387A5C
-387A5C:lI116|H387AFC
-387AFC:lI115|H387BA4
-387BA4:lI47|H387C54
-387C54:lI108|H387D0C
-387D0C:lI105|H387DCC
-387DCC:lI98|H387E94
-387E94:lI47|H387F64
-387F64:lI115|H38803C
-38803C:lI116|H38811C
-38811C:lI100|H388204
-388204:lI108|H3882F4
-3882F4:lI105|H3883EC
-3883EC:lI98|H3884EC
-3884EC:lI47|H3885F4
-3885F4:lI101|H388704
-388704:lI98|H38881C
-38881C:lI105|H38892C
-38892C:lI110|N
-38AF48:lH387434|H38AF70
-387434:lI47|H38745C
-38745C:lI99|H38748C
-38748C:lI108|H3874C4
-3874C4:lI101|H387504
-387504:lI97|H38754C
-38754C:lI114|H38759C
-38759C:lI99|H3875F4
-3875F4:lI97|H387654
-387654:lI115|H3876BC
-3876BC:lI101|H38772C
-38772C:lI47|H3877A4
-3877A4:lI111|H387824
-387824:lI116|H3878AC
-3878AC:lI112|H38793C
-38793C:lI47|H3879CC
-3879CC:lI101|H387A64
-387A64:lI114|H387B04
-387B04:lI116|H387BAC
-387BAC:lI115|H387C5C
-387C5C:lI47|H387D14
-387D14:lI108|H387DD4
-387DD4:lI105|H387E9C
-387E9C:lI98|H387F6C
-387F6C:lI47|H388044
-388044:lI119|H388124
-388124:lI101|H38820C
-38820C:lI98|H3882FC
-3882FC:lI116|H3883F4
-3883F4:lI111|H3884F4
-3884F4:lI111|H3885FC
-3885FC:lI108|H38870C
-38870C:lI47|H388824
-388824:lI101|H388934
-388934:lI98|H388A44
-388A44:lI105|H388B54
-388B54:lI110|N
-38AF70:lH387464|H38AF98
-387464:lI47|H387494
-387494:lI99|H3874CC
-3874CC:lI108|H38750C
-38750C:lI101|H387554
-387554:lI97|H3875A4
-3875A4:lI114|H3875FC
-3875FC:lI99|H38765C
-38765C:lI97|H3876C4
-3876C4:lI115|H387734
-387734:lI101|H3877AC
-3877AC:lI47|H38782C
-38782C:lI111|H3878B4
-3878B4:lI116|H387944
-387944:lI112|H3879D4
-3879D4:lI47|H387A6C
-387A6C:lI101|H387B0C
-387B0C:lI114|H387BB4
-387BB4:lI116|H387C64
-387C64:lI115|H387D1C
-387D1C:lI47|H387DDC
-387DDC:lI108|H387EA4
-387EA4:lI105|H387F74
-387F74:lI98|H38804C
-38804C:lI47|H38812C
-38812C:lI116|H388214
-388214:lI118|H388304
-388304:lI47|H3883FC
-3883FC:lI101|H3884FC
-3884FC:lI98|H388604
-388604:lI105|H388714
-388714:lI110|N
-38AF98:lH38749C|H38AFC0
-38749C:lI47|H3874D4
-3874D4:lI99|H387514
-387514:lI108|H38755C
-38755C:lI101|H3875AC
-3875AC:lI97|H387604
-387604:lI114|H387664
-387664:lI99|H3876CC
-3876CC:lI97|H38773C
-38773C:lI115|H3877B4
-3877B4:lI101|H387834
-387834:lI47|H3878BC
-3878BC:lI111|H38794C
-38794C:lI116|H3879DC
-3879DC:lI112|H387A74
-387A74:lI47|H387B14
-387B14:lI101|H387BBC
-387BBC:lI114|H387C6C
-387C6C:lI116|H387D24
-387D24:lI115|H387DE4
-387DE4:lI47|H387EAC
-387EAC:lI108|H387F7C
-387F7C:lI105|H388054
-388054:lI98|H388134
-388134:lI47|H38821C
-38821C:lI116|H38830C
-38830C:lI115|H388404
-388404:lI112|H388504
-388504:lI47|H38860C
-38860C:lI101|H38871C
-38871C:lI98|H38882C
-38882C:lI105|H38893C
-38893C:lI110|N
-38AFC0:lH3874DC|H38AFE8
-3874DC:lI47|H38751C
-38751C:lI99|H387564
-387564:lI108|H3875B4
-3875B4:lI101|H38760C
-38760C:lI97|H38766C
-38766C:lI114|H3876D4
-3876D4:lI99|H387744
-387744:lI97|H3877BC
-3877BC:lI115|H38783C
-38783C:lI101|H3878C4
-3878C4:lI47|H387954
-387954:lI111|H3879E4
-3879E4:lI116|H387A7C
-387A7C:lI112|H387B1C
-387B1C:lI47|H387BC4
-387BC4:lI101|H387C74
-387C74:lI114|H387D2C
-387D2C:lI116|H387DEC
-387DEC:lI115|H387EB4
-387EB4:lI47|H387F84
-387F84:lI108|H38805C
-38805C:lI105|H38813C
-38813C:lI98|H388224
-388224:lI47|H388314
-388314:lI116|H38840C
-38840C:lI111|H38850C
-38850C:lI111|H388614
-388614:lI108|H388724
-388724:lI115|H388834
-388834:lI47|H388944
-388944:lI101|H388A4C
-388A4C:lI98|H388B5C
-388B5C:lI105|H388C6C
-388C6C:lI110|N
-38AFE8:lH387524|H38B008
-387524:lI47|H38756C
-38756C:lI99|H3875BC
-3875BC:lI108|H387614
-387614:lI101|H387674
-387674:lI97|H3876DC
-3876DC:lI114|H38774C
-38774C:lI99|H3877C4
-3877C4:lI97|H387844
-387844:lI115|H3878CC
-3878CC:lI101|H38795C
-38795C:lI47|H3879EC
-3879EC:lI111|H387A84
-387A84:lI116|H387B24
-387B24:lI112|H387BCC
-387BCC:lI47|H387C7C
-387C7C:lI101|H387D34
-387D34:lI114|H387DF4
-387DF4:lI116|H387EBC
-387EBC:lI115|H387F8C
-387F8C:lI47|H388064
-388064:lI108|H388144
-388144:lI105|H38822C
-38822C:lI98|H38831C
-38831C:lI47|H388414
-388414:lI116|H388514
-388514:lI111|H38861C
-38861C:lI111|H38872C
-38872C:lI108|H38883C
-38883C:lI98|H38894C
-38894C:lI97|H388A54
-388A54:lI114|H388B64
-388B64:lI47|H388C74
-388C74:lI101|H388D84
-388D84:lI98|H388E9C
-388E9C:lI105|H388FB4
-388FB4:lI110|N
-38B008:lH387574|H38B018
-387574:lI47|H3875C4
-3875C4:lI99|H38761C
-38761C:lI108|H38767C
-38767C:lI101|H3876E4
-3876E4:lI97|H387754
-387754:lI114|H3877CC
-3877CC:lI99|H38784C
-38784C:lI97|H3878D4
-3878D4:lI115|H387964
-387964:lI101|H3879F4
-3879F4:lI47|H387A8C
-387A8C:lI111|H387B2C
-387B2C:lI116|H387BD4
-387BD4:lI112|H387C84
-387C84:lI47|H387D3C
-387D3C:lI101|H387DFC
-387DFC:lI114|H387EC4
-387EC4:lI116|H387F94
-387F94:lI115|H38806C
-38806C:lI47|H38814C
-38814C:lI108|H388234
-388234:lI105|H388324
-388324:lI98|H38841C
-38841C:lI47|H38851C
-38851C:lI116|H388624
-388624:lI101|H388734
-388734:lI115|H388844
-388844:lI116|H388954
-388954:lI95|H388A5C
-388A5C:lI115|H388B6C
-388B6C:lI101|H388C7C
-388C7C:lI114|H388D8C
-388D8C:lI118|H388EA4
-388EA4:lI101|H388FBC
-388FBC:lI114|H3890D4
-3890D4:lI47|H3891EC
-3891EC:lI101|H3892FC
-3892FC:lI98|H38940C
-38940C:lI105|H38951C
-38951C:lI110|N
-38B018:lH3875CC|H38AE7C
-3875CC:lI47|H387624
-387624:lI99|H387684
-387684:lI108|H3876EC
-3876EC:lI101|H38775C
-38775C:lI97|H3877D4
-3877D4:lI114|H387854
-387854:lI99|H3878DC
-3878DC:lI97|H38796C
-38796C:lI115|H3879FC
-3879FC:lI101|H387A94
-387A94:lI47|H387B34
-387B34:lI111|H387BDC
-387BDC:lI116|H387C8C
-387C8C:lI112|H387D44
-387D44:lI47|H387E04
-387E04:lI101|H387ECC
-387ECC:lI114|H387F9C
-387F9C:lI116|H388074
-388074:lI115|H388154
-388154:lI47|H38823C
-38823C:lI108|H38832C
-38832C:lI105|H388424
-388424:lI98|H388524
-388524:lI47|H38862C
-38862C:lI115|H38873C
-38873C:lI115|H38884C
-38884C:lI108|H38895C
-38895C:lI47|H388A64
-388A64:lI101|H388B74
-388B74:lI98|H388C84
-388C84:lI105|H388D94
-388D94:lI110|N
-38AE7C:lH38762C|H38AEB0
-38762C:lI47|H38768C
-38768C:lI99|H3876F4
-3876F4:lI108|H387764
-387764:lI101|H3877DC
-3877DC:lI97|H38785C
-38785C:lI114|H3878E4
-3878E4:lI99|H387974
-387974:lI97|H387A04
-387A04:lI115|H387A9C
-387A9C:lI101|H387B3C
-387B3C:lI47|H387BE4
-387BE4:lI111|H387C94
-387C94:lI116|H387D4C
-387D4C:lI112|H387E0C
-387E0C:lI47|H387ED4
-387ED4:lI101|H387FA4
-387FA4:lI114|H38807C
-38807C:lI116|H38815C
-38815C:lI115|H388244
-388244:lI47|H388334
-388334:lI108|H38842C
-38842C:lI105|H38852C
-38852C:lI98|H388634
-388634:lI47|H388744
-388744:lI115|H388854
-388854:lI110|H388964
-388964:lI109|H388A6C
-388A6C:lI112|H388B7C
-388B7C:lI47|H388C8C
-388C8C:lI101|H388D9C
-388D9C:lI98|H388EAC
-388EAC:lI105|H388FC4
-388FC4:lI110|N
-38AEB0:lH387694|H38AED8
-387694:lI47|H3876FC
-3876FC:lI99|H38776C
-38776C:lI108|H3877E4
-3877E4:lI101|H387864
-387864:lI97|H3878EC
-3878EC:lI114|H38797C
-38797C:lI99|H387A0C
-387A0C:lI97|H387AA4
-387AA4:lI115|H387B44
-387B44:lI101|H387BEC
-387BEC:lI47|H387C9C
-387C9C:lI111|H387D54
-387D54:lI116|H387E14
-387E14:lI112|H387EDC
-387EDC:lI47|H387FAC
-387FAC:lI101|H388084
-388084:lI114|H388164
-388164:lI116|H38824C
-38824C:lI115|H38833C
-38833C:lI47|H388434
-388434:lI108|H388534
-388534:lI105|H38863C
-38863C:lI98|H38874C
-38874C:lI47|H38885C
-38885C:lI115|H38896C
-38896C:lI97|H388A74
-388A74:lI115|H388B84
-388B84:lI108|H388C94
-388C94:lI47|H388DA4
-388DA4:lI101|H388EB4
-388EB4:lI98|H388FCC
-388FCC:lI105|H3890DC
-3890DC:lI110|N
-38AED8:lH387704|H38AF08
-387704:lI47|H387774
-387774:lI99|H3877EC
-3877EC:lI108|H38786C
-38786C:lI101|H3878F4
-3878F4:lI97|H387984
-387984:lI114|H387A14
-387A14:lI99|H387AAC
-387AAC:lI97|H387B4C
-387B4C:lI115|H387BF4
-387BF4:lI101|H387CA4
-387CA4:lI47|H387D5C
-387D5C:lI111|H387E1C
-387E1C:lI116|H387EE4
-387EE4:lI112|H387FB4
-387FB4:lI47|H38808C
-38808C:lI101|H38816C
-38816C:lI114|H388254
-388254:lI116|H388344
-388344:lI115|H38843C
-38843C:lI47|H38853C
-38853C:lI108|H388644
-388644:lI105|H388754
-388754:lI98|H388864
-388864:lI47|H388974
-388974:lI114|H388A7C
-388A7C:lI117|H388B8C
-388B8C:lI110|H388C9C
-388C9C:lI116|H388DAC
-388DAC:lI105|H388EBC
-388EBC:lI109|H388FD4
-388FD4:lI101|H3890E4
-3890E4:lI95|H3891F4
-3891F4:lI116|H389304
-389304:lI111|H389414
-389414:lI111|H389524
-389524:lI108|H389624
-389624:lI115|H38971C
-38971C:lI47|H389814
-389814:lI101|H38990C
-38990C:lI98|H389A04
-389A04:lI105|H389AE4
-389AE4:lI110|N
-38AF08:lH38777C|H38AF40
-38777C:lI47|H3877F4
-3877F4:lI99|H387874
-387874:lI108|H3878FC
-3878FC:lI101|H38798C
-38798C:lI97|H387A1C
-387A1C:lI114|H387AB4
-387AB4:lI99|H387B54
-387B54:lI97|H387BFC
-387BFC:lI115|H387CAC
-387CAC:lI101|H387D64
-387D64:lI47|H387E24
-387E24:lI111|H387EEC
-387EEC:lI116|H387FBC
-387FBC:lI112|H388094
-388094:lI47|H388174
-388174:lI101|H38825C
-38825C:lI114|H38834C
-38834C:lI116|H388444
-388444:lI115|H388544
-388544:lI47|H38864C
-38864C:lI108|H38875C
-38875C:lI105|H38886C
-38886C:lI98|H38897C
-38897C:lI47|H388A84
-388A84:lI114|H388B94
-388B94:lI115|H388CA4
-388CA4:lI104|H388DB4
-388DB4:lI101|H388EC4
-388EC4:lI108|H388FDC
-388FDC:lI108|H3890EC
-3890EC:lI47|H3891FC
-3891FC:lI101|H38930C
-38930C:lI98|H38941C
-38941C:lI105|H38952C
-38952C:lI110|N
-38AF40:lH3877FC|H38AF68
-3877FC:lI47|H38787C
-38787C:lI99|H387904
-387904:lI108|H387994
-387994:lI101|H387A24
-387A24:lI97|H387ABC
-387ABC:lI114|H387B5C
-387B5C:lI99|H387C04
-387C04:lI97|H387CB4
-387CB4:lI115|H387D6C
-387D6C:lI101|H387E2C
-387E2C:lI47|H387EF4
-387EF4:lI111|H387FC4
-387FC4:lI116|H38809C
-38809C:lI112|H38817C
-38817C:lI47|H388264
-388264:lI101|H388354
-388354:lI114|H38844C
-38844C:lI116|H38854C
-38854C:lI115|H388654
-388654:lI47|H388764
-388764:lI108|H388874
-388874:lI105|H388984
-388984:lI98|H388A8C
-388A8C:lI47|H388B9C
-388B9C:lI112|H388CAC
-388CAC:lI109|H388DBC
-388DBC:lI97|H388ECC
-388ECC:lI110|H388FE4
-388FE4:lI47|H3890F4
-3890F4:lI101|H389204
-389204:lI98|H389314
-389314:lI105|H389424
-389424:lI110|N
-38AF68:lH387884|H38AF90
-387884:lI47|H38790C
-38790C:lI99|H38799C
-38799C:lI108|H387A2C
-387A2C:lI101|H387AC4
-387AC4:lI97|H387B64
-387B64:lI114|H387C0C
-387C0C:lI99|H387CBC
-387CBC:lI97|H387D74
-387D74:lI115|H387E34
-387E34:lI101|H387EFC
-387EFC:lI47|H387FCC
-387FCC:lI111|H3880A4
-3880A4:lI116|H388184
-388184:lI112|H38826C
-38826C:lI47|H38835C
-38835C:lI101|H388454
-388454:lI114|H388554
-388554:lI116|H38865C
-38865C:lI115|H38876C
-38876C:lI47|H38887C
-38887C:lI108|H38898C
-38898C:lI105|H388A94
-388A94:lI98|H388BA4
-388BA4:lI47|H388CB4
-388CB4:lI112|H388DC4
-388DC4:lI97|H388ED4
-388ED4:lI114|H388FEC
-388FEC:lI115|H3890FC
-3890FC:lI101|H38920C
-38920C:lI116|H38931C
-38931C:lI111|H38942C
-38942C:lI111|H389534
-389534:lI108|H38962C
-38962C:lI115|H389724
-389724:lI47|H38981C
-38981C:lI101|H389914
-389914:lI98|H389A0C
-389A0C:lI105|H389AEC
-389AEC:lI110|N
-38AF90:lH387914|H38AFB8
-387914:lI47|H3879A4
-3879A4:lI99|H387A34
-387A34:lI108|H387ACC
-387ACC:lI101|H387B6C
-387B6C:lI97|H387C14
-387C14:lI114|H387CC4
-387CC4:lI99|H387D7C
-387D7C:lI97|H387E3C
-387E3C:lI115|H387F04
-387F04:lI101|H387FD4
-387FD4:lI47|H3880AC
-3880AC:lI111|H38818C
-38818C:lI116|H388274
-388274:lI112|H388364
-388364:lI47|H38845C
-38845C:lI101|H38855C
-38855C:lI114|H388664
-388664:lI116|H388774
-388774:lI115|H388884
-388884:lI47|H388994
-388994:lI108|H388A9C
-388A9C:lI105|H388BAC
-388BAC:lI98|H388CBC
-388CBC:lI47|H388DCC
-388DCC:lI111|H388EDC
-388EDC:lI116|H388FF4
-388FF4:lI112|H389104
-389104:lI95|H389214
-389214:lI109|H389324
-389324:lI105|H389434
-389434:lI98|H38953C
-38953C:lI115|H389634
-389634:lI47|H38972C
-38972C:lI101|H389824
-389824:lI98|H38991C
-38991C:lI105|H389A14
-389A14:lI110|N
-38AFB8:lH3879AC|H38AFE0
-3879AC:lI47|H387A3C
-387A3C:lI99|H387AD4
-387AD4:lI108|H387B74
-387B74:lI101|H387C1C
-387C1C:lI97|H387CCC
-387CCC:lI114|H387D84
-387D84:lI99|H387E44
-387E44:lI97|H387F0C
-387F0C:lI115|H387FDC
-387FDC:lI101|H3880B4
-3880B4:lI47|H388194
-388194:lI111|H38827C
-38827C:lI116|H38836C
-38836C:lI112|H388464
-388464:lI47|H388564
-388564:lI101|H38866C
-38866C:lI114|H38877C
-38877C:lI116|H38888C
-38888C:lI115|H38899C
-38899C:lI47|H388AA4
-388AA4:lI108|H388BB4
-388BB4:lI105|H388CC4
-388CC4:lI98|H388DD4
-388DD4:lI47|H388EE4
-388EE4:lI111|H388FFC
-388FFC:lI115|H38910C
-38910C:lI95|H38921C
-38921C:lI109|H38932C
-38932C:lI111|H38943C
-38943C:lI110|H389544
-389544:lI47|H38963C
-38963C:lI101|H389734
-389734:lI98|H38982C
-38982C:lI105|H389924
-389924:lI110|N
-38AFE0:lH387A44|H38B000
-387A44:lI47|H387ADC
-387ADC:lI99|H387B7C
-387B7C:lI108|H387C24
-387C24:lI101|H387CD4
-387CD4:lI97|H387D8C
-387D8C:lI114|H387E4C
-387E4C:lI99|H387F14
-387F14:lI97|H387FE4
-387FE4:lI115|H3880BC
-3880BC:lI101|H38819C
-38819C:lI47|H388284
-388284:lI111|H388374
-388374:lI116|H38846C
-38846C:lI112|H38856C
-38856C:lI47|H388674
-388674:lI101|H388784
-388784:lI114|H388894
-388894:lI116|H3889A4
-3889A4:lI115|H388AAC
-388AAC:lI47|H388BBC
-388BBC:lI108|H388CCC
-388CCC:lI105|H388DDC
-388DDC:lI98|H388EEC
-388EEC:lI47|H389004
-389004:lI111|H389114
-389114:lI114|H389224
-389224:lI98|H389334
-389334:lI101|H389444
-389444:lI114|H38954C
-38954C:lI47|H389644
-389644:lI101|H38973C
-38973C:lI98|H389834
-389834:lI105|H38992C
-38992C:lI110|N
-38B000:lH387AE4|H38B010
-387AE4:lI47|H387B84
-387B84:lI99|H387C2C
-387C2C:lI108|H387CDC
-387CDC:lI101|H387D94
-387D94:lI97|H387E54
-387E54:lI114|H387F1C
-387F1C:lI99|H387FEC
-387FEC:lI97|H3880C4
-3880C4:lI115|H3881A4
-3881A4:lI101|H38828C
-38828C:lI47|H38837C
-38837C:lI111|H388474
-388474:lI116|H388574
-388574:lI112|H38867C
-38867C:lI47|H38878C
-38878C:lI101|H38889C
-38889C:lI114|H3889AC
-3889AC:lI116|H388AB4
-388AB4:lI115|H388BC4
-388BC4:lI47|H388CD4
-388CD4:lI108|H388DE4
-388DE4:lI105|H388EF4
-388EF4:lI98|H38900C
-38900C:lI47|H38911C
-38911C:lI111|H38922C
-38922C:lI100|H38933C
-38933C:lI98|H38944C
-38944C:lI99|H389554
-389554:lI47|H38964C
-38964C:lI101|H389744
-389744:lI98|H38983C
-38983C:lI105|H389934
-389934:lI110|N
-38B010:lH387B8C|H38B020
-387B8C:lI47|H387C34
-387C34:lI99|H387CE4
-387CE4:lI108|H387D9C
-387D9C:lI101|H387E5C
-387E5C:lI97|H387F24
-387F24:lI114|H387FF4
-387FF4:lI99|H3880CC
-3880CC:lI97|H3881AC
-3881AC:lI115|H388294
-388294:lI101|H388384
-388384:lI47|H38847C
-38847C:lI111|H38857C
-38857C:lI116|H388684
-388684:lI112|H388794
-388794:lI47|H3888A4
-3888A4:lI101|H3889B4
-3889B4:lI114|H388ABC
-388ABC:lI116|H388BCC
-388BCC:lI115|H388CDC
-388CDC:lI47|H388DEC
-388DEC:lI108|H388EFC
-388EFC:lI105|H389014
-389014:lI98|H389124
-389124:lI47|H389234
-389234:lI111|H389344
-389344:lI98|H389454
-389454:lI115|H38955C
-38955C:lI101|H389654
-389654:lI114|H38974C
-38974C:lI118|H389844
-389844:lI101|H38993C
-38993C:lI114|H389A1C
-389A1C:lI47|H389AF4
-389AF4:lI101|H389BBC
-389BBC:lI98|H389C84
-389C84:lI105|H389D4C
-389D4C:lI110|N
-38B020:lH387C3C|H38B028
-387C3C:lI47|H387CEC
-387CEC:lI99|H387DA4
-387DA4:lI108|H387E64
-387E64:lI101|H387F2C
-387F2C:lI97|H387FFC
-387FFC:lI114|H3880D4
-3880D4:lI99|H3881B4
-3881B4:lI97|H38829C
-38829C:lI115|H38838C
-38838C:lI101|H388484
-388484:lI47|H388584
-388584:lI111|H38868C
-38868C:lI116|H38879C
-38879C:lI112|H3888AC
-3888AC:lI47|H3889BC
-3889BC:lI101|H388AC4
-388AC4:lI114|H388BD4
-388BD4:lI116|H388CE4
-388CE4:lI115|H388DF4
-388DF4:lI47|H388F04
-388F04:lI108|H38901C
-38901C:lI105|H38912C
-38912C:lI98|H38923C
-38923C:lI47|H38934C
-38934C:lI109|H38945C
-38945C:lI110|H389564
-389564:lI101|H38965C
-38965C:lI115|H389754
-389754:lI105|H38984C
-38984C:lI97|H389944
-389944:lI95|H389A24
-389A24:lI115|H389AFC
-389AFC:lI101|H389BC4
-389BC4:lI115|H389C8C
-389C8C:lI115|H389D54
-389D54:lI105|H389E14
-389E14:lI111|H389ECC
-389ECC:lI110|H389F7C
-389F7C:lI47|H38A01C
-38A01C:lI101|H38A0AC
-38A0AC:lI98|H38A12C
-38A12C:lI105|H38A19C
-38A19C:lI110|N
-38B028:lH387CF4|H38B030
-387CF4:lI47|H387DAC
-387DAC:lI99|H387E6C
-387E6C:lI108|H387F34
-387F34:lI101|H388004
-388004:lI97|H3880DC
-3880DC:lI114|H3881BC
-3881BC:lI99|H3882A4
-3882A4:lI97|H388394
-388394:lI115|H38848C
-38848C:lI101|H38858C
-38858C:lI47|H388694
-388694:lI111|H3887A4
-3887A4:lI116|H3888B4
-3888B4:lI112|H3889C4
-3889C4:lI47|H388ACC
-388ACC:lI101|H388BDC
-388BDC:lI114|H388CEC
-388CEC:lI116|H388DFC
-388DFC:lI115|H388F0C
-388F0C:lI47|H389024
-389024:lI108|H389134
-389134:lI105|H389244
-389244:lI98|H389354
-389354:lI47|H389464
-389464:lI109|H38956C
-38956C:lI110|H389664
-389664:lI101|H38975C
-38975C:lI115|H389854
-389854:lI105|H38994C
-38994C:lI97|H389A2C
-389A2C:lI47|H389B04
-389B04:lI101|H389BCC
-389BCC:lI98|H389C94
-389C94:lI105|H389D5C
-389D5C:lI110|N
-38B030:lH387DB4|H38B038
-387DB4:lI47|H387E74
-387E74:lI99|H387F3C
-387F3C:lI108|H38800C
-38800C:lI101|H3880E4
-3880E4:lI97|H3881C4
-3881C4:lI114|H3882AC
-3882AC:lI99|H38839C
-38839C:lI97|H388494
-388494:lI115|H388594
-388594:lI101|H38869C
-38869C:lI47|H3887AC
-3887AC:lI111|H3888BC
-3888BC:lI116|H3889CC
-3889CC:lI112|H388AD4
-388AD4:lI47|H388BE4
-388BE4:lI101|H388CF4
-388CF4:lI114|H388E04
-388E04:lI116|H388F14
-388F14:lI115|H38902C
-38902C:lI47|H38913C
-38913C:lI108|H38924C
-38924C:lI105|H38935C
-38935C:lI98|H38946C
-38946C:lI47|H389574
-389574:lI109|H38966C
-38966C:lI110|H389764
-389764:lI101|H38985C
-38985C:lI109|H389954
-389954:lI111|H389A34
-389A34:lI115|H389B0C
-389B0C:lI121|H389BD4
-389BD4:lI110|H389C9C
-389C9C:lI101|H389D64
-389D64:lI47|H389E1C
-389E1C:lI101|H389ED4
-389ED4:lI98|H389F84
-389F84:lI105|H38A024
-38A024:lI110|N
-38B038:lH387E7C|H38B040
-387E7C:lI47|H387F44
-387F44:lI99|H388014
-388014:lI108|H3880EC
-3880EC:lI101|H3881CC
-3881CC:lI97|H3882B4
-3882B4:lI114|H3883A4
-3883A4:lI99|H38849C
-38849C:lI97|H38859C
-38859C:lI115|H3886A4
-3886A4:lI101|H3887B4
-3887B4:lI47|H3888C4
-3888C4:lI111|H3889D4
-3889D4:lI116|H388ADC
-388ADC:lI112|H388BEC
-388BEC:lI47|H388CFC
-388CFC:lI101|H388E0C
-388E0C:lI114|H388F1C
-388F1C:lI116|H389034
-389034:lI115|H389144
-389144:lI47|H389254
-389254:lI108|H389364
-389364:lI105|H389474
-389474:lI98|H38957C
-38957C:lI47|H389674
-389674:lI109|H38976C
-38976C:lI101|H389864
-389864:lI103|H38995C
-38995C:lI97|H389A3C
-389A3C:lI99|H389B14
-389B14:lI111|H389BDC
-389BDC:lI47|H389CA4
-389CA4:lI101|H389D6C
-389D6C:lI98|H389E24
-389E24:lI105|H389EDC
-389EDC:lI110|N
-38B040:lH387F4C|H38B048
-387F4C:lI47|H38801C
-38801C:lI99|H3880F4
-3880F4:lI108|H3881D4
-3881D4:lI101|H3882BC
-3882BC:lI97|H3883AC
-3883AC:lI114|H3884A4
-3884A4:lI99|H3885A4
-3885A4:lI97|H3886AC
-3886AC:lI115|H3887BC
-3887BC:lI101|H3888CC
-3888CC:lI47|H3889DC
-3889DC:lI111|H388AE4
-388AE4:lI116|H388BF4
-388BF4:lI112|H388D04
-388D04:lI47|H388E14
-388E14:lI101|H388F24
-388F24:lI114|H38903C
-38903C:lI116|H38914C
-38914C:lI115|H38925C
-38925C:lI47|H38936C
-38936C:lI108|H38947C
-38947C:lI105|H389584
-389584:lI98|H38967C
-38967C:lI47|H389774
-389774:lI106|H38986C
-38986C:lI105|H389964
-389964:lI110|H389A44
-389A44:lI116|H389B1C
-389B1C:lI101|H389BE4
-389BE4:lI114|H389CAC
-389CAC:lI102|H389D74
-389D74:lI97|H389E2C
-389E2C:lI99|H389EE4
-389EE4:lI101|N
-38B048:lH388024|H38B050
-388024:lI47|H3880FC
-3880FC:lI99|H3881DC
-3881DC:lI108|H3882C4
-3882C4:lI101|H3883B4
-3883B4:lI97|H3884AC
-3884AC:lI114|H3885AC
-3885AC:lI99|H3886B4
-3886B4:lI97|H3887C4
-3887C4:lI115|H3888D4
-3888D4:lI101|H3889E4
-3889E4:lI47|H388AEC
-388AEC:lI111|H388BFC
-388BFC:lI116|H388D0C
-388D0C:lI112|H388E1C
-388E1C:lI47|H388F2C
-388F2C:lI101|H389044
-389044:lI114|H389154
-389154:lI116|H389264
-389264:lI115|H389374
-389374:lI47|H389484
-389484:lI108|H38958C
-38958C:lI105|H389684
-389684:lI98|H38977C
-38977C:lI47|H389874
-389874:lI105|H38996C
-38996C:lI110|H389A4C
-389A4C:lI101|H389B24
-389B24:lI116|H389BEC
-389BEC:lI115|H389CB4
-389CB4:lI47|H389D7C
-389D7C:lI101|H389E34
-389E34:lI98|H389EEC
-389EEC:lI105|H389F8C
-389F8C:lI110|N
-38B050:lH388104|H38B058
-388104:lI47|H3881E4
-3881E4:lI99|H3882CC
-3882CC:lI108|H3883BC
-3883BC:lI101|H3884B4
-3884B4:lI97|H3885B4
-3885B4:lI114|H3886BC
-3886BC:lI99|H3887CC
-3887CC:lI97|H3888DC
-3888DC:lI115|H3889EC
-3889EC:lI101|H388AF4
-388AF4:lI47|H388C04
-388C04:lI111|H388D14
-388D14:lI116|H388E24
-388E24:lI112|H388F34
-388F34:lI47|H38904C
-38904C:lI101|H38915C
-38915C:lI114|H38926C
-38926C:lI116|H38937C
-38937C:lI115|H38948C
-38948C:lI47|H389594
-389594:lI108|H38968C
-38968C:lI105|H389784
-389784:lI98|H38987C
-38987C:lI47|H389974
-389974:lI105|H389A54
-389A54:lI99|H389B2C
-389B2C:lI47|H389BF4
-389BF4:lI101|H389CBC
-389CBC:lI98|H389D84
-389D84:lI105|H389E3C
-389E3C:lI110|N
-38B058:lH3881EC|H38B060
-3881EC:lI47|H3882D4
-3882D4:lI99|H3883C4
-3883C4:lI108|H3884BC
-3884BC:lI101|H3885BC
-3885BC:lI97|H3886C4
-3886C4:lI114|H3887D4
-3887D4:lI99|H3888E4
-3888E4:lI97|H3889F4
-3889F4:lI115|H388AFC
-388AFC:lI101|H388C0C
-388C0C:lI47|H388D1C
-388D1C:lI111|H388E2C
-388E2C:lI116|H388F3C
-388F3C:lI112|H389054
-389054:lI47|H389164
-389164:lI101|H389274
-389274:lI114|H389384
-389384:lI116|H389494
-389494:lI115|H38959C
-38959C:lI47|H389694
-389694:lI108|H38978C
-38978C:lI105|H389884
-389884:lI98|H38997C
-38997C:lI47|H389A5C
-389A5C:lI104|H389B34
-389B34:lI105|H389BFC
-389BFC:lI112|H389CC4
-389CC4:lI101|H389D8C
-389D8C:lI47|H389E44
-389E44:lI101|H389EF4
-389EF4:lI98|H389F94
-389F94:lI105|H38A02C
-38A02C:lI110|N
-38B060:lH3882DC|H38B068
-3882DC:lI47|H3883CC
-3883CC:lI99|H3884C4
-3884C4:lI108|H3885C4
-3885C4:lI101|H3886CC
-3886CC:lI97|H3887DC
-3887DC:lI114|H3888EC
-3888EC:lI99|H3889FC
-3889FC:lI97|H388B04
-388B04:lI115|H388C14
-388C14:lI101|H388D24
-388D24:lI47|H388E34
-388E34:lI111|H388F44
-388F44:lI116|H38905C
-38905C:lI112|H38916C
-38916C:lI47|H38927C
-38927C:lI101|H38938C
-38938C:lI114|H38949C
-38949C:lI116|H3895A4
-3895A4:lI115|H38969C
-38969C:lI47|H389794
-389794:lI108|H38988C
-38988C:lI105|H389984
-389984:lI98|H389A64
-389A64:lI47|H389B3C
-389B3C:lI103|H389C04
-389C04:lI115|H389CCC
-389CCC:lI47|H389D94
-389D94:lI101|H389E4C
-389E4C:lI98|H389EFC
-389EFC:lI105|H389F9C
-389F9C:lI110|N
-38B068:lH3883D4|H38B070
-3883D4:lI47|H3884CC
-3884CC:lI99|H3885CC
-3885CC:lI108|H3886D4
-3886D4:lI101|H3887E4
-3887E4:lI97|H3888F4
-3888F4:lI114|H388A04
-388A04:lI99|H388B0C
-388B0C:lI97|H388C1C
-388C1C:lI115|H388D2C
-388D2C:lI101|H388E3C
-388E3C:lI47|H388F4C
-388F4C:lI111|H389064
-389064:lI116|H389174
-389174:lI112|H389284
-389284:lI47|H389394
-389394:lI101|H3894A4
-3894A4:lI114|H3895AC
-3895AC:lI116|H3896A4
-3896A4:lI115|H38979C
-38979C:lI47|H389894
-389894:lI108|H38998C
-38998C:lI105|H389A6C
-389A6C:lI98|H389B44
-389B44:lI47|H389C0C
-389C0C:lI101|H389CD4
-389CD4:lI118|H389D9C
-389D9C:lI97|H389E54
-389E54:lI47|H389F04
-389F04:lI101|H389FA4
-389FA4:lI98|H38A034
-38A034:lI105|H38A0B4
-38A0B4:lI110|N
-38B070:lH3884D4|H38B078
-3884D4:lI47|H3885D4
-3885D4:lI99|H3886DC
-3886DC:lI108|H3887EC
-3887EC:lI101|H3888FC
-3888FC:lI97|H388A0C
-388A0C:lI114|H388B14
-388B14:lI99|H388C24
-388C24:lI97|H388D34
-388D34:lI115|H388E44
-388E44:lI101|H388F54
-388F54:lI47|H38906C
-38906C:lI111|H38917C
-38917C:lI116|H38928C
-38928C:lI112|H38939C
-38939C:lI47|H3894AC
-3894AC:lI101|H3895B4
-3895B4:lI114|H3896AC
-3896AC:lI116|H3897A4
-3897A4:lI115|H38989C
-38989C:lI47|H389994
-389994:lI108|H389A74
-389A74:lI105|H389B4C
-389B4C:lI98|H389C14
-389C14:lI47|H389CDC
-389CDC:lI101|H389DA4
-389DA4:lI116|H389E5C
-389E5C:lI47|H389F0C
-389F0C:lI101|H389FAC
-389FAC:lI98|H38A03C
-38A03C:lI105|H38A0BC
-38A0BC:lI110|N
-38B078:lH3885DC|H38B080
-3885DC:lI47|H3886E4
-3886E4:lI99|H3887F4
-3887F4:lI108|H388904
-388904:lI101|H388A14
-388A14:lI97|H388B1C
-388B1C:lI114|H388C2C
-388C2C:lI99|H388D3C
-388D3C:lI97|H388E4C
-388E4C:lI115|H388F5C
-388F5C:lI101|H389074
-389074:lI47|H389184
-389184:lI111|H389294
-389294:lI116|H3893A4
-3893A4:lI112|H3894B4
-3894B4:lI47|H3895BC
-3895BC:lI101|H3896B4
-3896B4:lI114|H3897AC
-3897AC:lI116|H3898A4
-3898A4:lI115|H38999C
-38999C:lI47|H389A7C
-389A7C:lI108|H389B54
-389B54:lI105|H389C1C
-389C1C:lI98|H389CE4
-389CE4:lI47|H389DAC
-389DAC:lI101|H389E64
-389E64:lI114|H389F14
-389F14:lI108|H389FB4
-389FB4:lI95|H38A044
-38A044:lI105|H38A0C4
-38A0C4:lI110|H38A134
-38A134:lI116|H38A1A4
-38A1A4:lI101|H38A20C
-38A20C:lI114|H38A274
-38A274:lI102|H38A2DC
-38A2DC:lI97|H38A344
-38A344:lI99|H38A3AC
-38A3AC:lI101|N
-38B080:lH3886EC|H38B088
-3886EC:lI47|H3887FC
-3887FC:lI99|H38890C
-38890C:lI108|H388A1C
-388A1C:lI101|H388B24
-388B24:lI97|H388C34
-388C34:lI114|H388D44
-388D44:lI99|H388E54
-388E54:lI97|H388F64
-388F64:lI115|H38907C
-38907C:lI101|H38918C
-38918C:lI47|H38929C
-38929C:lI111|H3893AC
-3893AC:lI116|H3894BC
-3894BC:lI112|H3895C4
-3895C4:lI47|H3896BC
-3896BC:lI101|H3897B4
-3897B4:lI114|H3898AC
-3898AC:lI116|H3899A4
-3899A4:lI115|H389A84
-389A84:lI47|H389B5C
-389B5C:lI108|H389C24
-389C24:lI105|H389CEC
-389CEC:lI98|H389DB4
-389DB4:lI47|H389E6C
-389E6C:lI100|H389F1C
-389F1C:lI101|H389FBC
-389FBC:lI98|H38A04C
-38A04C:lI117|H38A0CC
-38A0CC:lI103|H38A13C
-38A13C:lI103|H38A1AC
-38A1AC:lI101|H38A214
-38A214:lI114|H38A27C
-38A27C:lI47|H38A2E4
-38A2E4:lI101|H38A34C
-38A34C:lI98|H38A3B4
-38A3B4:lI105|H38A414
-38A414:lI110|N
-38B088:lH388804|H38B090
-388804:lI47|H388914
-388914:lI99|H388A24
-388A24:lI108|H388B2C
-388B2C:lI101|H388C3C
-388C3C:lI97|H388D4C
-388D4C:lI114|H388E5C
-388E5C:lI99|H388F6C
-388F6C:lI97|H389084
-389084:lI115|H389194
-389194:lI101|H3892A4
-3892A4:lI47|H3893B4
-3893B4:lI111|H3894C4
-3894C4:lI116|H3895CC
-3895CC:lI112|H3896C4
-3896C4:lI47|H3897BC
-3897BC:lI101|H3898B4
-3898B4:lI114|H3899AC
-3899AC:lI116|H389A8C
-389A8C:lI115|H389B64
-389B64:lI47|H389C2C
-389C2C:lI108|H389CF4
-389CF4:lI105|H389DBC
-389DBC:lI98|H389E74
-389E74:lI47|H389F24
-389F24:lI99|H389FC4
-389FC4:lI114|H38A054
-38A054:lI121|H38A0D4
-38A0D4:lI112|H38A144
-38A144:lI116|H38A1B4
-38A1B4:lI111|H38A21C
-38A21C:lI47|H38A284
-38A284:lI101|H38A2EC
-38A2EC:lI98|H38A354
-38A354:lI105|H38A3BC
-38A3BC:lI110|N
-38B090:lH38891C|H38B098
-38891C:lI47|H388A2C
-388A2C:lI99|H388B34
-388B34:lI108|H388C44
-388C44:lI101|H388D54
-388D54:lI97|H388E64
-388E64:lI114|H388F74
-388F74:lI99|H38908C
-38908C:lI97|H38919C
-38919C:lI115|H3892AC
-3892AC:lI101|H3893BC
-3893BC:lI47|H3894CC
-3894CC:lI111|H3895D4
-3895D4:lI116|H3896CC
-3896CC:lI112|H3897C4
-3897C4:lI47|H3898BC
-3898BC:lI101|H3899B4
-3899B4:lI114|H389A94
-389A94:lI116|H389B6C
-389B6C:lI115|H389C34
-389C34:lI47|H389CFC
-389CFC:lI108|H389DC4
-389DC4:lI105|H389E7C
-389E7C:lI98|H389F2C
-389F2C:lI47|H389FCC
-389FCC:lI99|H38A05C
-38A05C:lI111|H38A0DC
-38A0DC:lI115|H38A14C
-38A14C:lI84|H38A1BC
-38A1BC:lI114|H38A224
-38A224:lI97|H38A28C
-38A28C:lI110|H38A2F4
-38A2F4:lI115|H38A35C
-38A35C:lI97|H38A3C4
-38A3C4:lI99|H38A41C
-38A41C:lI116|H38A46C
-38A46C:lI105|H38A4BC
-38A4BC:lI111|H38A50C
-38A50C:lI110|H38A554
-38A554:lI115|H38A59C
-38A59C:lI47|H38A5E4
-38A5E4:lI101|H38A62C
-38A62C:lI98|H38A66C
-38A66C:lI105|H38A6A4
-38A6A4:lI110|N
-38B098:lH388A34|H38B0A0
-388A34:lI47|H388B3C
-388B3C:lI99|H388C4C
-388C4C:lI108|H388D5C
-388D5C:lI101|H388E6C
-388E6C:lI97|H388F7C
-388F7C:lI114|H389094
-389094:lI99|H3891A4
-3891A4:lI97|H3892B4
-3892B4:lI115|H3893C4
-3893C4:lI101|H3894D4
-3894D4:lI47|H3895DC
-3895DC:lI111|H3896D4
-3896D4:lI116|H3897CC
-3897CC:lI112|H3898C4
-3898C4:lI47|H3899BC
-3899BC:lI101|H389A9C
-389A9C:lI114|H389B74
-389B74:lI116|H389C3C
-389C3C:lI115|H389D04
-389D04:lI47|H389DCC
-389DCC:lI108|H389E84
-389E84:lI105|H389F34
-389F34:lI98|H389FD4
-389FD4:lI47|H38A064
-38A064:lI99|H38A0E4
-38A0E4:lI111|H38A154
-38A154:lI115|H38A1C4
-38A1C4:lI84|H38A22C
-38A22C:lI105|H38A294
-38A294:lI109|H38A2FC
-38A2FC:lI101|H38A364
-38A364:lI47|H38A3CC
-38A3CC:lI101|H38A424
-38A424:lI98|H38A474
-38A474:lI105|H38A4C4
-38A4C4:lI110|N
-38B0A0:lH388B44|H38B0A8
-388B44:lI47|H388C54
-388C54:lI99|H388D64
-388D64:lI108|H388E74
-388E74:lI101|H388F84
-388F84:lI97|H38909C
-38909C:lI114|H3891AC
-3891AC:lI99|H3892BC
-3892BC:lI97|H3893CC
-3893CC:lI115|H3894DC
-3894DC:lI101|H3895E4
-3895E4:lI47|H3896DC
-3896DC:lI111|H3897D4
-3897D4:lI116|H3898CC
-3898CC:lI112|H3899C4
-3899C4:lI47|H389AA4
-389AA4:lI101|H389B7C
-389B7C:lI114|H389C44
-389C44:lI116|H389D0C
-389D0C:lI115|H389DD4
-389DD4:lI47|H389E8C
-389E8C:lI108|H389F3C
-389F3C:lI105|H389FDC
-389FDC:lI98|H38A06C
-38A06C:lI47|H38A0EC
-38A0EC:lI99|H38A15C
-38A15C:lI111|H38A1CC
-38A1CC:lI115|H38A234
-38A234:lI80|H38A29C
-38A29C:lI114|H38A304
-38A304:lI111|H38A36C
-38A36C:lI112|H38A3D4
-38A3D4:lI101|H38A42C
-38A42C:lI114|H38A47C
-38A47C:lI116|H38A4CC
-38A4CC:lI121|H38A514
-38A514:lI47|H38A55C
-38A55C:lI101|H38A5A4
-38A5A4:lI98|H38A5EC
-38A5EC:lI105|H38A634
-38A634:lI110|N
-38B0A8:lH388C5C|H38B0B0
-388C5C:lI47|H388D6C
-388D6C:lI99|H388E7C
-388E7C:lI108|H388F8C
-388F8C:lI101|H3890A4
-3890A4:lI97|H3891B4
-3891B4:lI114|H3892C4
-3892C4:lI99|H3893D4
-3893D4:lI97|H3894E4
-3894E4:lI115|H3895EC
-3895EC:lI101|H3896E4
-3896E4:lI47|H3897DC
-3897DC:lI111|H3898D4
-3898D4:lI116|H3899CC
-3899CC:lI112|H389AAC
-389AAC:lI47|H389B84
-389B84:lI101|H389C4C
-389C4C:lI114|H389D14
-389D14:lI116|H389DDC
-389DDC:lI115|H389E94
-389E94:lI47|H389F44
-389F44:lI108|H389FE4
-389FE4:lI105|H38A074
-38A074:lI98|H38A0F4
-38A0F4:lI47|H38A164
-38A164:lI99|H38A1D4
-38A1D4:lI111|H38A23C
-38A23C:lI115|H38A2A4
-38A2A4:lI78|H38A30C
-38A30C:lI111|H38A374
-38A374:lI116|H38A3DC
-38A3DC:lI105|H38A434
-38A434:lI102|H38A484
-38A484:lI105|H38A4D4
-38A4D4:lI99|H38A51C
-38A51C:lI97|H38A564
-38A564:lI116|H38A5AC
-38A5AC:lI105|H38A5F4
-38A5F4:lI111|H38A63C
-38A63C:lI110|H38A674
-38A674:lI47|H38A6AC
-38A6AC:lI101|H38A6D4
-38A6D4:lI98|H38A6EC
-38A6EC:lI105|H38A704
-38A704:lI110|N
-38B0B0:lH388D74|H38B0B8
-388D74:lI47|H388E84
-388E84:lI99|H388F94
-388F94:lI108|H3890AC
-3890AC:lI101|H3891BC
-3891BC:lI97|H3892CC
-3892CC:lI114|H3893DC
-3893DC:lI99|H3894EC
-3894EC:lI97|H3895F4
-3895F4:lI115|H3896EC
-3896EC:lI101|H3897E4
-3897E4:lI47|H3898DC
-3898DC:lI111|H3899D4
-3899D4:lI116|H389AB4
-389AB4:lI112|H389B8C
-389B8C:lI47|H389C54
-389C54:lI101|H389D1C
-389D1C:lI114|H389DE4
-389DE4:lI116|H389E9C
-389E9C:lI115|H389F4C
-389F4C:lI47|H389FEC
-389FEC:lI108|H38A07C
-38A07C:lI105|H38A0FC
-38A0FC:lI98|H38A16C
-38A16C:lI47|H38A1DC
-38A1DC:lI99|H38A244
-38A244:lI111|H38A2AC
-38A2AC:lI115|H38A314
-38A314:lI70|H38A37C
-38A37C:lI105|H38A3E4
-38A3E4:lI108|H38A43C
-38A43C:lI101|H38A48C
-38A48C:lI84|H38A4DC
-38A4DC:lI114|H38A524
-38A524:lI97|H38A56C
-38A56C:lI110|H38A5B4
-38A5B4:lI115|H38A5FC
-38A5FC:lI102|H38A644
-38A644:lI101|H38A67C
-38A67C:lI114|H38A6B4
-38A6B4:lI47|H38A6DC
-38A6DC:lI101|H38A6F4
-38A6F4:lI98|H38A70C
-38A70C:lI105|H38A71C
-38A71C:lI110|N
-38B0B8:lH388E8C|H38B0C0
-388E8C:lI47|H388F9C
-388F9C:lI99|H3890B4
-3890B4:lI108|H3891C4
-3891C4:lI101|H3892D4
-3892D4:lI97|H3893E4
-3893E4:lI114|H3894F4
-3894F4:lI99|H3895FC
-3895FC:lI97|H3896F4
-3896F4:lI115|H3897EC
-3897EC:lI101|H3898E4
-3898E4:lI47|H3899DC
-3899DC:lI111|H389ABC
-389ABC:lI116|H389B94
-389B94:lI112|H389C5C
-389C5C:lI47|H389D24
-389D24:lI101|H389DEC
-389DEC:lI114|H389EA4
-389EA4:lI116|H389F54
-389F54:lI115|H389FF4
-389FF4:lI47|H38A084
-38A084:lI108|H38A104
-38A104:lI105|H38A174
-38A174:lI98|H38A1E4
-38A1E4:lI47|H38A24C
-38A24C:lI99|H38A2B4
-38A2B4:lI111|H38A31C
-38A31C:lI115|H38A384
-38A384:lI69|H38A3EC
-38A3EC:lI118|H38A444
-38A444:lI101|H38A494
-38A494:lI110|H38A4E4
-38A4E4:lI116|H38A52C
-38A52C:lI68|H38A574
-38A574:lI111|H38A5BC
-38A5BC:lI109|H38A604
-38A604:lI97|H38A64C
-38A64C:lI105|H38A684
-38A684:lI110|H38A6BC
-38A6BC:lI47|H38A6E4
-38A6E4:lI101|H38A6FC
-38A6FC:lI98|H38A714
-38A714:lI105|H38A724
-38A724:lI110|N
-38B0C0:lH388FA4|H38B0C8
-388FA4:lI47|H3890BC
-3890BC:lI99|H3891CC
-3891CC:lI108|H3892DC
-3892DC:lI101|H3893EC
-3893EC:lI97|H3894FC
-3894FC:lI114|H389604
-389604:lI99|H3896FC
-3896FC:lI97|H3897F4
-3897F4:lI115|H3898EC
-3898EC:lI101|H3899E4
-3899E4:lI47|H389AC4
-389AC4:lI111|H389B9C
-389B9C:lI116|H389C64
-389C64:lI112|H389D2C
-389D2C:lI47|H389DF4
-389DF4:lI101|H389EAC
-389EAC:lI114|H389F5C
-389F5C:lI116|H389FFC
-389FFC:lI115|H38A08C
-38A08C:lI47|H38A10C
-38A10C:lI108|H38A17C
-38A17C:lI105|H38A1EC
-38A1EC:lI98|H38A254
-38A254:lI47|H38A2BC
-38A2BC:lI99|H38A324
-38A324:lI111|H38A38C
-38A38C:lI115|H38A3F4
-38A3F4:lI69|H38A44C
-38A44C:lI118|H38A49C
-38A49C:lI101|H38A4EC
-38A4EC:lI110|H38A534
-38A534:lI116|H38A57C
-38A57C:lI47|H38A5C4
-38A5C4:lI101|H38A60C
-38A60C:lI98|H38A654
-38A654:lI105|H38A68C
-38A68C:lI110|N
-38B0C8:lH3890C4|H38B0D0
-3890C4:lI47|H3891D4
-3891D4:lI99|H3892E4
-3892E4:lI108|H3893F4
-3893F4:lI101|H389504
-389504:lI97|H38960C
-38960C:lI114|H389704
-389704:lI99|H3897FC
-3897FC:lI97|H3898F4
-3898F4:lI115|H3899EC
-3899EC:lI101|H389ACC
-389ACC:lI47|H389BA4
-389BA4:lI111|H389C6C
-389C6C:lI116|H389D34
-389D34:lI112|H389DFC
-389DFC:lI47|H389EB4
-389EB4:lI101|H389F64
-389F64:lI114|H38A004
-38A004:lI116|H38A094
-38A094:lI115|H38A114
-38A114:lI47|H38A184
-38A184:lI108|H38A1F4
-38A1F4:lI105|H38A25C
-38A25C:lI98|H38A2C4
-38A2C4:lI47|H38A32C
-38A32C:lI99|H38A394
-38A394:lI111|H38A3FC
-38A3FC:lI109|H38A454
-38A454:lI112|H38A4A4
-38A4A4:lI105|H38A4F4
-38A4F4:lI108|H38A53C
-38A53C:lI101|H38A584
-38A584:lI114|H38A5CC
-38A5CC:lI47|H38A614
-38A614:lI101|H38A65C
-38A65C:lI98|H38A694
-38A694:lI105|H38A6C4
-38A6C4:lI110|N
-38B0D0:lH3891DC|H38B0D8
-3891DC:lI47|H3892EC
-3892EC:lI99|H3893FC
-3893FC:lI108|H38950C
-38950C:lI101|H389614
-389614:lI97|H38970C
-38970C:lI114|H389804
-389804:lI99|H3898FC
-3898FC:lI97|H3899F4
-3899F4:lI115|H389AD4
-389AD4:lI101|H389BAC
-389BAC:lI47|H389C74
-389C74:lI111|H389D3C
-389D3C:lI116|H389E04
-389E04:lI112|H389EBC
-389EBC:lI47|H389F6C
-389F6C:lI101|H38A00C
-38A00C:lI114|H38A09C
-38A09C:lI116|H38A11C
-38A11C:lI115|H38A18C
-38A18C:lI47|H38A1FC
-38A1FC:lI108|H38A264
-38A264:lI105|H38A2CC
-38A2CC:lI98|H38A334
-38A334:lI47|H38A39C
-38A39C:lI97|H38A404
-38A404:lI115|H38A45C
-38A45C:lI110|H38A4AC
-38A4AC:lI49|H38A4FC
-38A4FC:lI47|H38A544
-38A544:lI101|H38A58C
-38A58C:lI98|H38A5D4
-38A5D4:lI105|H38A61C
-38A61C:lI110|N
-38B0D8:lH3892F4|H38B0E0
-3892F4:lI47|H389404
-389404:lI99|H389514
-389514:lI108|H38961C
-38961C:lI101|H389714
-389714:lI97|H38980C
-38980C:lI114|H389904
-389904:lI99|H3899FC
-3899FC:lI97|H389ADC
-389ADC:lI115|H389BB4
-389BB4:lI101|H389C7C
-389C7C:lI47|H389D44
-389D44:lI111|H389E0C
-389E0C:lI116|H389EC4
-389EC4:lI112|H389F74
-389F74:lI47|H38A014
-38A014:lI101|H38A0A4
-38A0A4:lI114|H38A124
-38A124:lI116|H38A194
-38A194:lI115|H38A204
-38A204:lI47|H38A26C
-38A26C:lI108|H38A2D4
-38A2D4:lI105|H38A33C
-38A33C:lI98|H38A3A4
-38A3A4:lI47|H38A40C
-38A40C:lI97|H38A464
-38A464:lI112|H38A4B4
-38A4B4:lI112|H38A504
-38A504:lI109|H38A54C
-38A54C:lI111|H38A594
-38A594:lI110|H38A5DC
-38A5DC:lI47|H38A624
-38A624:lI101|H38A664
-38A664:lI98|H38A69C
-38A69C:lI105|H38A6CC
-38A6CC:lI110|N
-38B0E0:lH38AA88|H38B0E8
-38AA88:lI47|H38AA90
-38AA90:lI104|H38AA98
-38AA98:lI111|H38AAA0
-38AAA0:lI109|H38AAA8
-38AAA8:lI101|H38AAB0
-38AAB0:lI47|H38AAB8
-38AAB8:lI115|H38AAC0
-38AAC0:lI105|H38AAC8
-38AAC8:lI114|H38AAD0
-38AAD0:lI105|H38AAD8
-38AAD8:lI47|H38AAE0
-38AAE0:lI101|H38AAE8
-38AAE8:lI114|H38AAF0
-38AAF0:lI108|H38AAF8
-38AAF8:lI97|H38AB00
-38AB00:lI110|H38AB08
-38AB08:lI103|N
-38B0E8:lH38AB1C|H38B0F0
-38AB1C:lI47|H38AB2C
-38AB2C:lI104|H38AB4C
-38AB4C:lI111|H38AB74
-38AB74:lI109|H38ABA4
-38ABA4:lI101|H38ABC4
-38ABC4:lI47|H38ABE4
-38ABE4:lI115|H38AC04
-38AC04:lI105|H38AC24
-38AC24:lI114|H38AC3C
-38AC3C:lI105|H38AC44
-38AC44:lI47|H38AC4C
-38AC4C:lI116|H38AC54
-38AC54:lI111|H38AC5C
-38AC5C:lI111|H38AC64
-38AC64:lI108|H38AC6C
-38AC6C:lI115|H38AC74
-38AC74:lI47|H38AC7C
-38AC7C:lI100|H38AC84
-38AC84:lI105|H38AC8C
-38AC8C:lI115|H38AC94
-38AC94:lI116|H38AC9C
-38AC9C:lI101|H38ACA4
-38ACA4:lI108|H38ACAC
-38ACAC:lI47|H38ACB4
-38ACB4:lI101|H38ACBC
-38ACBC:lI98|H38ACC4
-38ACC4:lI105|H38ACCC
-38ACCC:lI110|N
-38B0F0:lH38B0F8|N
-38B0F8:lI47|H38B100
-38B100:lI104|H38B108
-38B108:lI111|H38B110
-38B110:lI109|H38B118
-38B118:lI101|H38B120
-38B120:lI47|H38B128
-38B128:lI115|H38B130
-38B130:lI105|H38B138
-38B138:lI114|H38B140
-38B140:lI105|H38B148
-38B148:lI47|H38B150
-38B150:lI79|H38B158
-38B158:lI84|H38B160
-38B160:lI80|H38B168
-38B168:lI47|H38B170
-38B170:lI103|H38B178
-38B178:lI112|H38B180
-38B180:lI114|H38B188
-38B188:lI115|H38B190
-38B190:lI95|H38B198
-38B198:lI116|H38B1A0
-38B1A0:lI114|H38B1A8
-38B1A8:lI97|H38B1B0
-38B1B0:lI99|H38B1B8
-38B1B8:lI101|H38B1C0
-38B1C0:lI47|H38B1C8
-38B1C8:lI106|H38B1D0
-38B1D0:lI97|H38B1D8
-38B1D8:lI110|N
-3873BC:lI47|H3873CC
-3873CC:lI99|H3873E4
-3873E4:lI108|H3873FC
-3873FC:lI101|H38741C
-38741C:lI97|H387444
-387444:lI114|H387474
-387474:lI99|H3874AC
-3874AC:lI97|H3874EC
-3874EC:lI115|H387534
-387534:lI101|H387584
-387584:lI47|H3875DC
-3875DC:lI111|H38763C
-38763C:lI116|H3876A4
-3876A4:lI112|H387714
-387714:lI47|H38778C
-38778C:lI101|H38780C
-38780C:lI114|H387894
-387894:lI116|H387924
-387924:lI115|N
-=proc_dictionary:<0.19.0>
-H370244
-H370250
-=proc_stack:<0.19.0>
-36b45c:SReturn addr 0x225860 (proc_lib:init_p/5 + 164)
-y0:N
-y1:A8:infinity
-y2:A11:supervisor_bridge
-y3:H36B17C
-y4:P<0.19.0>
-y5:P<0.9.0>
-36b478:SReturn addr 0x156F90 (<terminate process normally>)
-y0:SCatch 0x225860 (proc_lib:init_p/5 + 164)
-y1:A3:gen
-y2:A7:init_it
-y3:H37025C
-=proc_heap:<0.19.0>
-36B17C:t5:A5:state,A8:user_sup,P<0.21.0>,P<0.21.0>,H370238
-370238:t2:P<0.19.0>,A8:user_sup
-37025C:lAA:gen_server|H37027C
-37027C:lP<0.9.0>|H37028C
-37028C:lP<0.9.0>|H370294
-370294:lA11:supervisor_bridge|H37029C
-37029C:lH3702A4|H3702AC
-3702A4:lA8:user_sup|H3702B4
-3702B4:lN|H3702BC
-3702BC:lA4:self|N
-3702AC:lN|N
-370244:t2:AD:$initial_call,H370264
-370264:t3:A3:gen,A7:init_it,H37025C
-370250:t2:AA:$ancestors,H370274
-370274:lAA:kernel_sup|H370284
-370284:lP<0.8.0>|N
-=proc_dictionary:<0.20.0>
-H36F8A8
-=proc_stack:<0.20.0>
-36a714:SReturn addr 0x156F90 (<terminate process normally>)
-y0:N
-y1:N
-y2:H36F8C4
-y3:P<0.21.0>
-y4:P<0.22.0>
-y5:p<0.72>
-y6:p<0.72>
-=proc_heap:<0.20.0>
-36F8C4:t4:I3,I2,P<0.22.0>,H36F8F0
-36F8F0:lH36F900|H36F910
-36F900:t3:I1,P<0.21.0>,H36F920
-36F920:t0:
-36F910:lH36F924|N
-36F924:t3:I2,P<0.22.0>,H36F93C
-36F93C:t3:A5:shell,A5:start,N
-36F8A8:t2:A3:eof,A5:false
-=proc_dictionary:<0.21.0>
-H3709DC
-H3709D0
-H3709F8
-=proc_stack:<0.21.0>
-370d1c:SReturn addr 0x156F90 (<terminate process normally>)
-y0:N
-y1:A9:undefined
-y2:P<0.20.0>
-=proc_heap:<0.21.0>
-3709DC:t2:AB:line_buffer,N
-3709D0:t2:AB:kill_buffer,N
-3709F8:t2:A9:read_mode,A4:list
-=proc_dictionary:<0.22.0>
-H370D44
-H370D60
-H370D7C
-H370D38
-=proc_stack:<0.22.0>
-374a88:SReturn addr 0x2CE718 (group:get_chars_loop/7 + 80)
-y0:N
-y1:N
-y2:A8:infinity
-y3:H374A00
-y4:P<0.20.0>
-y5:H374A28
-374aa4:SReturn addr 0x2CDC18 (group:io_request/5 + 48)
-y0:H37499C
-y1:A6:io_lib
-y2:A9:get_until
-y3:H3748B8
-y4:P<0.20.0>
-y5:A5:start
-374ac0:SReturn addr 0x2CDB2C (group:server_loop/3 + 372)
-y0:P<0.49.0>
-y1:P<0.22.0>
-374acc:SReturn addr 0x156F90 (<terminate process normally>)
-y0:N
-y1:P<0.25.0>
-y2:P<0.20.0>
-=proc_heap:<0.22.0>
-374A00:t4:A4:line,H37499C,H3749A4,A4:none
-3749A4:t2:N,N
-37499C:lI50|H374994
-374994:lI62|H37498C
-37498C:lI32|N
-374A28:t4:A5:stack,H370D58,H374A24,N
-374A24:t0:
-370D58:lH370D74|N
-370D74:lI99|H370D88
-370D88:lI114|H370D90
-370D90:lI97|H370D98
-370D98:lI115|H370DA0
-370DA0:lI104|H370DA8
-370DA8:lI100|H370DB0
-370DB0:lI117|H370DB8
-370DB8:lI109|H370DC0
-370DC0:lI112|H370DC8
-370DC8:lI95|H370DD0
-370DD0:lI118|H370DD8
-370DD8:lI105|H370DE0
-370DE0:lI101|H370DE8
-370DE8:lI119|H370DF0
-370DF0:lI101|H370DF8
-370DF8:lI114|H370E00
-370E00:lI58|H370E08
-370E08:lI115|H370E10
-370E10:lI116|H370E18
-370E18:lI97|H370E20
-370E20:lI114|H370E28
-370E28:lI116|H370E30
-370E30:lI40|H370E38
-370E38:lI41|H370E40
-370E40:lI46|H370E48
-370E48:lI10|N
-3748B8:t3:A8:erl_scan,A6:tokens,H3748B0
-3748B0:lI1|N
-370D44:t2:AB:line_buffer,H370D58
-370D60:t2:A5:shell,P<0.25.0>
-370D7C:t2:AB:kill_buffer,N
-370D38:t2:A9:read_mode,A4:list
-=proc_dictionary:<0.23.0>
-H376464
-H376448
-=proc_stack:<0.23.0>
-376754:SReturn addr 0x225860 (proc_lib:init_p/5 + 164)
-y0:N
-y1:A8:infinity
-y2:AD:kernel_config
-y3:N
-y4:P<0.23.0>
-y5:P<0.9.0>
-376770:SReturn addr 0x156F90 (<terminate process normally>)
-y0:SCatch 0x225860 (proc_lib:init_p/5 + 164)
-y1:A3:gen
-y2:A7:init_it
-y3:H376418
-=proc_heap:<0.23.0>
-376418:lAA:gen_server|H376410
-376410:lP<0.9.0>|H376408
-376408:lP<0.9.0>|H376400
-376400:lAD:kernel_config|H3763F8
-3763F8:lN|H3763F0
-3763F0:lN|N
-376464:t2:AD:$initial_call,H376454
-376454:t3:A3:gen,A7:init_it,H376418
-376448:t2:AA:$ancestors,H376440
-376440:lAA:kernel_sup|H376420
-376420:lP<0.8.0>|N
-=proc_dictionary:<0.24.0>
-H3705E0
-H3705EC
-=proc_stack:<0.24.0>
-36f38c:SReturn addr 0x225860 (proc_lib:init_p/5 + 164)
-y0:N
-y1:A8:infinity
-y2:AA:supervisor
-y3:H36F018
-y4:AF:kernel_safe_sup
-y5:P<0.9.0>
-36f3a8:SReturn addr 0x156F90 (<terminate process normally>)
-y0:SCatch 0x225860 (proc_lib:init_p/5 + 164)
-y1:A3:gen
-y2:A7:init_it
-y3:H37063C
-=proc_heap:<0.24.0>
-36F018:tA:A5:state,H370644,AB:one_for_one,H36F044,N,I4,I3600,N,A6:kernel,A4:safe
-36F044:lH36F04C|N
-36F04C:t8:A5:child,P<0.31.0>,A17:inet_gethost_native_sup,H370650,A9:temporary,I1000,A6:worker,H370660
-370660:lA13:inet_gethost_native|N
-370650:t3:A13:inet_gethost_native,AA:start_link,N
-370644:t2:A5:local,AF:kernel_safe_sup
-37063C:lAA:gen_server|H3706AC
-3706AC:lP<0.9.0>|H3706BC
-3706BC:lP<0.9.0>|H3706C4
-3706C4:lH3706CC|H3706D8
-3706CC:t2:A5:local,AF:kernel_safe_sup
-3706D8:lAA:supervisor|H3706E0
-3706E0:lH3706E8|H3706F8
-3706E8:t3:H370644,A6:kernel,A4:safe
-3706F8:lN|N
-3705E0:t2:AD:$initial_call,H370668
-370668:t3:A3:gen,A7:init_it,H37063C
-3705EC:t2:AA:$ancestors,H370678
-370678:lAA:kernel_sup|H3706B4
-3706B4:lP<0.8.0>|N
-=proc_dictionary:<0.25.0>
-H36E304
-H36E31C
-=proc_stack:<0.25.0>
-36e610:SReturn addr 0x2E06FC (shell:server_loop/6 + 140)
-y0:N
-y1:N
-y2:P<0.27.0>
-y3:P<0.49.0>
-36e624:SReturn addr 0x156F90 (<terminate process normally>)
-y0:N
-y1:N
-y2:I2
-y3:I1
-y4:N
-y5:N
-y6:N
-y7:I20
-y8:I20
-=proc_heap:<0.25.0>
-36E304:t2:H36E2F8,H36E2A8
-36E2A8:lH36E2B0|N
-36E2B0:t4:A4:call,I1,H36E2C4,N
-36E2C4:t4:A6:remote,I1,H36E2D8,H36E2E8
-36E2E8:t3:A4:atom,I1,A5:start
-36E2D8:t3:A4:atom,I1,A10:crashdump_viewer
-36E2F8:t2:A7:command,I1
-36E31C:t2:H36E310,A2:ok
-36E310:t2:A6:result,I1
-=proc_stack:<0.27.0>
-3bda3c:SReturn addr 0x156F90 (<terminate process normally>)
-y0:N
-y1:N
-y2:P<0.25.0>
-=proc_heap:<0.27.0>
-=proc_dictionary:<0.31.0>
-H36DA24
-H36DA08
-=proc_stack:<0.31.0>
-36dcd4:SReturn addr 0x225860 (proc_lib:init_p/5 + 164)
-y0:N
-y1:A8:infinity
-y2:A11:supervisor_bridge
-y3:H36DB68
-y4:A17:inet_gethost_native_sup
-y5:P<0.24.0>
-36dcf0:SReturn addr 0x156F90 (<terminate process normally>)
-y0:SCatch 0x225860 (proc_lib:init_p/5 + 164)
-y1:A3:gen
-y2:A7:init_it
-y3:H36D9D0
-=proc_heap:<0.31.0>
-36DB68:t5:A5:state,A13:inet_gethost_native,P<0.32.0>,P<0.32.0>,H36D994
-36D994:t2:A5:local,A17:inet_gethost_native_sup
-36D9D0:lAA:gen_server|H36D9C8
-36D9C8:lP<0.24.0>|H36D9C0
-36D9C0:lP<0.24.0>|H36D970
-36D970:lH36D980|H36D9B8
-36D980:t2:A5:local,A17:inet_gethost_native_sup
-36D9B8:lA11:supervisor_bridge|H36D978
-36D978:lH36D9A8|H36D9B0
-36D9A8:lA13:inet_gethost_native|H36D9A0
-36D9A0:lN|H36D98C
-36D98C:lH36D994|N
-36D9B0:lN|N
-36DA24:t2:AD:$initial_call,H36DA14
-36DA14:t3:A3:gen,A7:init_it,H36D9D0
-36DA08:t2:AA:$ancestors,H36DA00
-36DA00:lAF:kernel_safe_sup|H36D9E0
-36D9E0:lAA:kernel_sup|H36D9D8
-36D9D8:lP<0.8.0>|N
-=proc_dictionary:<0.32.0>
-H36CFD4
-H36D0BC
-=proc_stack:<0.32.0>
-36d12c:SReturn addr 0x156F90 (<terminate process normally>)
-y0:H36CF18
-=proc_heap:<0.32.0>
-36CF18:t8:A5:state,p<0.105>,I8000,I11,I12,P<0.31.0>,I4,H36CEF0
-36CEF0:t9:AA:statistics,I0,I0,I0,I0,I0,I0,I0,I0
-36CFD4:t2:A3:rid,I1
-36D0BC:t2:AC:num_requests,I0
-=proc_dictionary:<0.33.0>
-H3905C4
-H3905D0
-=proc_stack:<0.33.0>
-3ceee4:SReturn addr 0x225860 (proc_lib:init_p/5 + 164)
-y0:N
-y1:A8:infinity
-y2:A7:webtool
-y3:H3C8570
-y4:A8:web_tool
-y5:P<0.33.0>
-3cef00:SReturn addr 0x156F90 (<terminate process normally>)
-y0:SCatch 0x225860 (proc_lib:init_p/5 + 164)
-y1:A3:gen
-y2:A7:init_it
-y3:H3905FC
-=proc_heap:<0.33.0>
-3C8570:t6:A5:state,H3905EC,I13,P<0.41.0>,H3905F4,H3C85D4
-3C85D4:lA10:crashdump_viewer|N
-3905F4:lH390650|H39065C
-390650:t2:A4:port,I8888
-39065C:lH3906C8|H3906D4
-3906C8:t2:AC:bind_address,H390760
-390760:t4:I127,I0,I0,I1
-3906D4:lH390774|H390780
-390774:t2:AB:server_name,H39082C
-39082C:lI108|H390908
-390908:lI111|H3909DC
-3909DC:lI99|H390AC0
-390AC0:lI97|H390B98
-390B98:lI108|H390C78
-390C78:lI104|H390D58
-390D58:lI111|H390E2C
-390E2C:lI115|H390F10
-390F10:lI116|N
-390780:lH390834|H390840
-390834:t2:AE:max_header_siz,I1024
-390840:lH390910|H39091C
-390910:t2:A11:max_header_action,A8:reply414
-39091C:lH3909E4|H3909F0
-3909E4:t2:A8:com_type,A7:ip_comm
-3909F0:lH390AC8|H390AD4
-390AC8:t2:A7:modules,H390BA0
-390BA0:lA9:mod_alias|H390C80
-390C80:lA8:mod_auth|H390D60
-390D60:lA7:mod_esi|H390E34
-390E34:lAB:mod_actions|H390F18
-390F18:lA7:mod_cgi|H390FF4
-390FF4:lAB:mod_include|H3910D8
-3910D8:lA7:mod_dir|H3911B4
-3911B4:lA7:mod_get|H3912A0
-3912A0:lA8:mod_head|H39139C
-39139C:lA7:mod_log|H3914A0
-3914A0:lAC:mod_disk_log|N
-390AD4:lH390BA8|H390BB4
-390BA8:t2:AF:directory_index,H390C88
-390C88:lH390D68|N
-390D68:lI105|H390E3C
-390E3C:lI110|H390F20
-390F20:lI100|H390FFC
-390FFC:lI101|H3910E0
-3910E0:lI120|H3911BC
-3911BC:lI46|H3912A8
-3912A8:lI104|H3913A4
-3913A4:lI116|H3914A8
-3914A8:lI109|H39159C
-39159C:lI108|N
-390BB4:lH390C90|N
-390C90:t2:AC:default_type,H390D70
-390D70:lI116|H390E44
-390E44:lI101|H390F28
-390F28:lI120|H391004
-391004:lI116|H3910E8
-3910E8:lI47|H3911C4
-3911C4:lI112|H3912B0
-3912B0:lI108|H3913AC
-3913AC:lI97|H3914B0
-3914B0:lI105|H3915A4
-3915A4:lI110|N
-3905EC:lI47|H390648
-390648:lI99|H3906C0
-3906C0:lI108|H390758
-390758:lI101|H390824
-390824:lI97|H390900
-390900:lI114|H3909D4
-3909D4:lI99|H390AB8
-390AB8:lI97|H390B90
-390B90:lI115|H390C70
-390C70:lI101|H390D50
-390D50:lI47|H390E24
-390E24:lI111|H390F08
-390F08:lI116|H390FEC
-390FEC:lI112|H3910D0
-3910D0:lI47|H3911AC
-3911AC:lI101|H391298
-391298:lI114|H391394
-391394:lI116|H391498
-391498:lI115|H391594
-391594:lI47|H391680
-391680:lI108|H39175C
-39175C:lI105|H391840
-391840:lI98|H391924
-391924:lI47|H3919F8
-3919F8:lI119|H391AC4
-391AC4:lI101|H391B90
-391B90:lI98|H391C54
-391C54:lI116|H391D18
-391D18:lI111|H391DD4
-391DD4:lI111|H391E90
-391E90:lI108|H391F5C
-391F5C:lI47|H392030
-392030:lI112|H3920EC
-3920EC:lI114|H3921A8
-3921A8:lI105|H392264
-392264:lI118|N
-3905FC:lAA:gen_server|H390664
-390664:lP<0.27.0>|H3906DC
-3906DC:lA4:self|H390788
-390788:lH390848|H390854
-390848:t2:A5:local,A8:web_tool
-390854:lA7:webtool|H390924
-390924:lH3909F8|H390A04
-3909F8:t2:H3905EC,H3905F4
-390A04:lN|N
-3905C4:t2:AD:$initial_call,H390614
-390614:t3:A3:gen,A7:init_it,H3905FC
-3905D0:t2:AA:$ancestors,H390624
-390624:lP<0.27.0>|N
-=proc_dictionary:<0.41.0>
-H36DF0C
-H36DF18
-=proc_stack:<0.41.0>
-36eda4:SReturn addr 0x225860 (proc_lib:init_p/5 + 164)
-y0:N
-y1:A8:infinity
-y2:AA:supervisor
-y3:H36EA3C
-y4:A6:websup
-y5:P<0.33.0>
-36edc0:SReturn addr 0x156F90 (<terminate process normally>)
-y0:SCatch 0x225860 (proc_lib:init_p/5 + 164)
-y1:A3:gen
-y2:A7:init_it
-y3:H36DF24
-=proc_heap:<0.41.0>
-36EA3C:tA:A5:state,H36DF2C,AB:one_for_one,H36EA68,N,I100,I10,N,AB:webtool_sup,N
-36EA68:lH36EA70|N
-36EA70:t8:A5:child,P<0.48.0>,H36DF38,H36DF44,A9:permanent,I100,A6:worker,H36DF54
-36DF54:lA10:crashdump_viewer|N
-36DF44:t3:A10:crashdump_viewer,AA:start_link,N
-36DF38:t2:A5:local,A17:crashdump_viewer_server
-36DF2C:t2:A5:local,A6:websup
-36DF24:lAA:gen_server|H36DF84
-36DF84:lP<0.33.0>|H36DF94
-36DF94:lP<0.33.0>|H36DF9C
-36DF9C:lH36DFA4|H36DFB0
-36DFA4:t2:A5:local,A6:websup
-36DFB0:lAA:supervisor|H36DFB8
-36DFB8:lH36DFC0|H36DFD0
-36DFC0:t3:H36DF2C,AB:webtool_sup,N
-36DFD0:lN|N
-36DF0C:t2:AD:$initial_call,H36DF6C
-36DF6C:t3:A3:gen,A7:init_it,H36DF24
-36DF18:t2:AA:$ancestors,H36DF7C
-36DF7C:lA8:web_tool|H36DF8C
-36DF8C:lP<0.27.0>|N
-=proc_dictionary:<0.43.0>
-H39D940
-H39D94C
-=proc_stack:<0.43.0>
-3a42ac:SReturn addr 0x225860 (proc_lib:init_p/5 + 164)
-y0:N
-y1:A8:infinity
-y2:AA:supervisor
-y3:H3A3E34
-y4:A1A:httpd_sup__127_0_0_1__8888
-y5:P<0.33.0>
-3a42c8:SReturn addr 0x156F90 (<terminate process normally>)
-y0:SCatch 0x225860 (proc_lib:init_p/5 + 164)
-y1:A3:gen
-y2:A7:init_it
-y3:H39D9CC
-=proc_heap:<0.43.0>
-3A3E34:tA:A5:state,H39D960,AB:one_for_one,H3A3E20,N,I0,I1,N,A9:httpd_sup,H39DA88
-39DA88:lA9:undefined|H39DB18
-39DB18:lH39DB50|H39DB58
-39DB50:lH39DB88|H39DB94
-39DB88:t2:AB:server_root,H39DBD0
-39DBD0:lI47|H39DC0C
-39DC0C:lI99|H39DC50
-39DC50:lI108|H39DC84
-39DC84:lI101|H39DCC4
-39DCC4:lI97|H39DD28
-39DD28:lI114|H39DD90
-39DD90:lI99|H39DE00
-39DE00:lI97|H39DE78
-39DE78:lI115|H39DF00
-39DF00:lI101|H39DF90
-39DF90:lI47|H39E038
-39E038:lI111|H39E0E8
-39E0E8:lI116|H39E1AC
-39E1AC:lI112|H39E288
-39E288:lI47|H39E37C
-39E37C:lI101|H39E478
-39E478:lI114|H39E580
-39E580:lI116|H39E69C
-39E69C:lI115|H39E7B0
-39E7B0:lI47|H39E8C4
-39E8C4:lI108|H39E9D8
-39E9D8:lI105|H39EACC
-39EACC:lI98|H39EBC0
-39EBC0:lI47|H39ECB4
-39ECB4:lI119|H39EDA8
-39EDA8:lI101|H39EE7C
-39EE7C:lI98|H39EF50
-39EF50:lI116|H39F02C
-39F02C:lI111|H39F110
-39F110:lI111|H39F1E4
-39F1E4:lI108|H39F2B0
-39F2B0:lI47|H39F36C
-39F36C:lI112|H39F430
-39F430:lI114|H39F4FC
-39F4FC:lI105|H39F5C0
-39F5C0:lI118|H39F694
-39F694:lI47|H39F768
-39F768:lI114|H39F83C
-39F83C:lI111|H39F920
-39F920:lI111|H39F9FC
-39F9FC:lI116|N
-39DB94:lH39DBD8|H39DBE4
-39DBD8:t2:AD:document_root,H39DC14
-39DC14:lI47|H39DC58
-39DC58:lI99|H39DC8C
-39DC8C:lI108|H39DCCC
-39DCCC:lI101|H39DD30
-39DD30:lI97|H39DD98
-39DD98:lI114|H39DE08
-39DE08:lI99|H39DE80
-39DE80:lI97|H39DF08
-39DF08:lI115|H39DF98
-39DF98:lI101|H39E040
-39E040:lI47|H39E0F0
-39E0F0:lI111|H39E1B4
-39E1B4:lI116|H39E290
-39E290:lI112|H39E384
-39E384:lI47|H39E480
-39E480:lI101|H39E588
-39E588:lI114|H39E6A4
-39E6A4:lI116|H39E7B8
-39E7B8:lI115|H39E8CC
-39E8CC:lI47|H39E9E0
-39E9E0:lI108|H39EAD4
-39EAD4:lI105|H39EBC8
-39EBC8:lI98|H39ECBC
-39ECBC:lI47|H39EDB0
-39EDB0:lI119|H39EE84
-39EE84:lI101|H39EF58
-39EF58:lI98|H39F034
-39F034:lI116|H39F118
-39F118:lI111|H39F1EC
-39F1EC:lI111|H39F2B8
-39F2B8:lI108|H39F374
-39F374:lI47|H39F438
-39F438:lI112|H39F504
-39F504:lI114|H39F5C8
-39F5C8:lI105|H39F69C
-39F69C:lI118|H39F770
-39F770:lI47|H39F844
-39F844:lI114|H39F928
-39F928:lI111|H39FA04
-39FA04:lI111|H39FAD8
-39FAD8:lI116|H39FBB4
-39FBB4:lI47|H39FC80
-39FC80:lI100|H39FD44
-39FD44:lI111|H39FE10
-39FE10:lI99|N
-39DBE4:lH39DC1C|H39DC28
-39DC1C:t2:AA:mime_types,H39DC60
-39DC60:lH39DC94|H39DCA0
-39DC94:t2:H39DCD4,H39DCDC
-39DCDC:lI120|H39DD40
-39DD40:lI45|H39DDA8
-39DDA8:lI119|H39DE10
-39DE10:lI111|H39DE88
-39DE88:lI114|H39DF10
-39DF10:lI108|H39DFA0
-39DFA0:lI100|H39E048
-39E048:lI47|H39E0F8
-39E0F8:lI120|H39E1BC
-39E1BC:lI45|H39E298
-39E298:lI118|H39E38C
-39E38C:lI114|H39E488
-39E488:lI109|H39E590
-39E590:lI108|N
-39DCD4:lI119|H39DD38
-39DD38:lI114|H39DDA0
-39DDA0:lI108|N
-39DCA0:lH39DCE4|H39DCF0
-39DCE4:t2:H39DD48,H39DD50
-39DD50:lI120|H39DDB8
-39DDB8:lI45|H39DE20
-39DE20:lI119|H39DE98
-39DE98:lI111|H39DF18
-39DF18:lI114|H39DFA8
-39DFA8:lI108|H39E050
-39E050:lI100|H39E100
-39E100:lI47|H39E1C4
-39E1C4:lI120|H39E2A0
-39E2A0:lI45|H39E394
-39E394:lI118|H39E490
-39E490:lI114|H39E598
-39E598:lI109|H39E6AC
-39E6AC:lI108|N
-39DD48:lI118|H39DDB0
-39DDB0:lI114|H39DE18
-39DE18:lI109|H39DE90
-39DE90:lI108|N
-39DCF0:lH39DD58|H39DD64
-39DD58:t2:H39DDC0,H39DDC8
-39DDC8:lI120|H39DE30
-39DE30:lI45|H39DEA8
-39DEA8:lI99|H39DF20
-39DF20:lI111|H39DFB0
-39DFB0:lI110|H39E058
-39E058:lI102|H39E108
-39E108:lI101|H39E1CC
-39E1CC:lI114|H39E2A8
-39E2A8:lI101|H39E39C
-39E39C:lI110|H39E498
-39E498:lI99|H39E5A0
-39E5A0:lI101|H39E6B4
-39E6B4:lI47|H39E7C0
-39E7C0:lI120|H39E8D4
-39E8D4:lI45|H39E9E8
-39E9E8:lI99|H39EADC
-39EADC:lI111|H39EBD0
-39EBD0:lI111|H39ECC4
-39ECC4:lI108|H39EDB8
-39EDB8:lI116|H39EE8C
-39EE8C:lI97|H39EF60
-39EF60:lI108|H39F03C
-39F03C:lI107|N
-39DDC0:lI105|H39DE28
-39DE28:lI99|H39DEA0
-39DEA0:lI101|N
-39DD64:lH39DDD0|H39DDDC
-39DDD0:t2:H39DE38,H39DE40
-39DE40:lI118|H39DEB8
-39DEB8:lI105|H39DF30
-39DF30:lI100|H39DFC0
-39DFC0:lI101|H39E068
-39E068:lI111|H39E110
-39E110:lI47|H39E1D4
-39E1D4:lI120|H39E2B0
-39E2B0:lI45|H39E3A4
-39E3A4:lI115|H39E4A0
-39E4A0:lI103|H39E5A8
-39E5A8:lI105|H39E6BC
-39E6BC:lI45|H39E7C8
-39E7C8:lI109|H39E8DC
-39E8DC:lI111|H39E9F0
-39E9F0:lI118|H39EAE4
-39EAE4:lI105|H39EBD8
-39EBD8:lI101|N
-39DE38:lI109|H39DEB0
-39DEB0:lI111|H39DF28
-39DF28:lI118|H39DFB8
-39DFB8:lI105|H39E060
-39E060:lI101|N
-39DDDC:lH39DE48|H39DE54
-39DE48:t2:H39DEC0,H39DEC8
-39DEC8:lI118|H39DF40
-39DF40:lI105|H39DFD0
-39DFD0:lI100|H39E070
-39E070:lI101|H39E118
-39E118:lI111|H39E1DC
-39E1DC:lI47|H39E2B8
-39E2B8:lI120|H39E3AC
-39E3AC:lI45|H39E4A8
-39E4A8:lI109|H39E5B0
-39E5B0:lI115|H39E6C4
-39E6C4:lI118|H39E7D0
-39E7D0:lI105|H39E8E4
-39E8E4:lI100|H39E9F8
-39E9F8:lI101|H39EAEC
-39EAEC:lI111|N
-39DEC0:lI97|H39DF38
-39DF38:lI118|H39DFC8
-39DFC8:lI105|N
-39DE54:lH39DED0|H39DEDC
-39DED0:t2:H39DF48,H39DF50
-39DF50:lI118|H39DFE0
-39DFE0:lI105|H39E078
-39E078:lI100|H39E120
-39E120:lI101|H39E1E4
-39E1E4:lI111|H39E2C0
-39E2C0:lI47|H39E3B4
-39E3B4:lI113|H39E4B0
-39E4B0:lI117|H39E5B8
-39E5B8:lI105|H39E6CC
-39E6CC:lI99|H39E7D8
-39E7D8:lI107|H39E8EC
-39E8EC:lI116|H39EA00
-39EA00:lI105|H39EAF4
-39EAF4:lI109|H39EBE0
-39EBE0:lI101|N
-39DF48:lI113|H39DFD8
-39DFD8:lI116|N
-39DEDC:lH39DF58|H39DF64
-39DF58:t2:H39DFE8,H39DFF0
-39DFF0:lI118|H39E088
-39E088:lI105|H39E130
-39E130:lI100|H39E1EC
-39E1EC:lI101|H39E2C8
-39E2C8:lI111|H39E3BC
-39E3BC:lI47|H39E4B8
-39E4B8:lI113|H39E5C0
-39E5C0:lI117|H39E6D4
-39E6D4:lI105|H39E7E0
-39E7E0:lI99|H39E8F4
-39E8F4:lI107|H39EA08
-39EA08:lI116|H39EAFC
-39EAFC:lI105|H39EBE8
-39EBE8:lI109|H39ECCC
-39ECCC:lI101|N
-39DFE8:lI109|H39E080
-39E080:lI111|H39E128
-39E128:lI118|N
-39DF64:lH39DFF8|H39E004
-39DFF8:t2:H39E090,H39E098
-39E098:lI118|H39E140
-39E140:lI105|H39E1FC
-39E1FC:lI100|H39E2D8
-39E2D8:lI101|H39E3C4
-39E3C4:lI111|H39E4C0
-39E4C0:lI47|H39E5C8
-39E5C8:lI109|H39E6DC
-39E6DC:lI112|H39E7E8
-39E7E8:lI101|H39E8FC
-39E8FC:lI103|N
-39E090:lI109|H39E138
-39E138:lI112|H39E1F4
-39E1F4:lI101|H39E2D0
-39E2D0:lI103|N
-39E004:lH39E0A0|H39E0AC
-39E0A0:t2:H39E148,H39E150
-39E150:lI118|H39E20C
-39E20C:lI105|H39E2E8
-39E2E8:lI100|H39E3CC
-39E3CC:lI101|H39E4C8
-39E4C8:lI111|H39E5D0
-39E5D0:lI47|H39E6E4
-39E6E4:lI109|H39E7F0
-39E7F0:lI112|H39E904
-39E904:lI101|H39EA10
-39EA10:lI103|N
-39E148:lI109|H39E204
-39E204:lI112|H39E2E0
-39E2E0:lI103|N
-39E0AC:lH39E158|H39E164
-39E158:t2:H39E214,H39E21C
-39E21C:lI118|H39E2F8
-39E2F8:lI105|H39E3DC
-39E3DC:lI100|H39E4D0
-39E4D0:lI101|H39E5D8
-39E5D8:lI111|H39E6EC
-39E6EC:lI47|H39E7F8
-39E7F8:lI109|H39E90C
-39E90C:lI112|H39EA18
-39EA18:lI101|H39EB04
-39EB04:lI103|N
-39E214:lI109|H39E2F0
-39E2F0:lI112|H39E3D4
-39E3D4:lI101|N
-39E164:lH39E224|H39E230
-39E224:t2:H39E300,H39E308
-39E308:lI116|H39E3EC
-39E3EC:lI101|H39E4E0
-39E4E0:lI120|H39E5E8
-39E5E8:lI116|H39E6F4
-39E6F4:lI47|H39E800
-39E800:lI120|H39E914
-39E914:lI45|H39EA20
-39EA20:lI115|H39EB0C
-39EB0C:lI103|H39EBF0
-39EBF0:lI109|H39ECD4
-39ECD4:lI108|N
-39E300:lI115|H39E3E4
-39E3E4:lI103|H39E4D8
-39E4D8:lI109|H39E5E0
-39E5E0:lI108|N
-39E230:lH39E310|H39E31C
-39E310:t2:H39E3F4,H39E3FC
-39E3FC:lI116|H39E4F0
-39E4F0:lI101|H39E5F8
-39E5F8:lI120|H39E6FC
-39E6FC:lI116|H39E808
-39E808:lI47|H39E91C
-39E91C:lI120|H39EA28
-39EA28:lI45|H39EB14
-39EB14:lI115|H39EBF8
-39EBF8:lI103|H39ECDC
-39ECDC:lI109|H39EDC0
-39EDC0:lI108|N
-39E3F4:lI115|H39E4E8
-39E4E8:lI103|H39E5F0
-39E5F0:lI109|N
-39E31C:lH39E404|H39E410
-39E404:t2:H39E4F8,H39E500
-39E500:lI116|H39E608
-39E608:lI101|H39E70C
-39E70C:lI120|H39E810
-39E810:lI116|H39E924
-39E924:lI47|H39EA30
-39EA30:lI120|H39EB1C
-39EB1C:lI45|H39EC00
-39EC00:lI115|H39ECE4
-39ECE4:lI101|H39EDC8
-39EDC8:lI116|H39EE94
-39EE94:lI101|H39EF68
-39EF68:lI120|H39F044
-39F044:lI116|N
-39E4F8:lI101|H39E600
-39E600:lI116|H39E704
-39E704:lI120|N
-39E410:lH39E508|H39E514
-39E508:t2:H39E610,H39E618
-39E618:lI116|H39E71C
-39E71C:lI101|H39E820
-39E820:lI120|H39E92C
-39E92C:lI116|H39EA38
-39EA38:lI47|H39EB24
-39EB24:lI116|H39EC08
-39EC08:lI97|H39ECEC
-39ECEC:lI98|H39EDD0
-39EDD0:lI45|H39EE9C
-39EE9C:lI115|H39EF70
-39EF70:lI101|H39F04C
-39F04C:lI112|H39F120
-39F120:lI97|H39F1F4
-39F1F4:lI114|H39F2C0
-39F2C0:lI97|H39F37C
-39F37C:lI116|H39F440
-39F440:lI101|H39F50C
-39F50C:lI100|H39F5D0
-39F5D0:lI45|H39F6A4
-39F6A4:lI118|H39F778
-39F778:lI97|H39F84C
-39F84C:lI108|H39F930
-39F930:lI117|H39FA0C
-39FA0C:lI101|H39FAE0
-39FAE0:lI115|N
-39E610:lI116|H39E714
-39E714:lI115|H39E818
-39E818:lI118|N
-39E514:lH39E620|H39E62C
-39E620:t2:H39E724,H39E72C
-39E72C:lI116|H39E830
-39E830:lI101|H39E93C
-39E93C:lI120|H39EA40
-39EA40:lI116|H39EB2C
-39EB2C:lI47|H39EC10
-39EC10:lI114|H39ECF4
-39ECF4:lI105|H39EDD8
-39EDD8:lI99|H39EEA4
-39EEA4:lI104|H39EF78
-39EF78:lI116|H39F054
-39F054:lI101|H39F128
-39F128:lI120|H39F1FC
-39F1FC:lI116|N
-39E724:lI114|H39E828
-39E828:lI116|H39E934
-39E934:lI120|N
-39E62C:lH39E734|H39E740
-39E734:t2:H39E838,H39E840
-39E840:lI116|H39E94C
-39E94C:lI101|H39EA50
-39EA50:lI120|H39EB34
-39EB34:lI116|H39EC18
-39EC18:lI47|H39ECFC
-39ECFC:lI112|H39EDE0
-39EDE0:lI108|H39EEAC
-39EEAC:lI97|H39EF80
-39EF80:lI105|H39F05C
-39F05C:lI110|N
-39E838:lI116|H39E944
-39E944:lI120|H39EA48
-39EA48:lI116|N
-39E740:lH39E848|H39E854
-39E848:t2:H39E954,H39E95C
-39E95C:lI116|H39EA60
-39EA60:lI101|H39EB44
-39EB44:lI120|H39EC28
-39EC28:lI116|H39ED0C
-39ED0C:lI47|H39EDE8
-39EDE8:lI120|H39EEB4
-39EEB4:lI45|H39EF88
-39EF88:lI115|H39F064
-39F064:lI101|H39F130
-39F130:lI114|H39F204
-39F204:lI118|H39F2C8
-39F2C8:lI101|H39F384
-39F384:lI114|H39F448
-39F448:lI45|H39F514
-39F514:lI112|H39F5D8
-39F5D8:lI97|H39F6AC
-39F6AC:lI114|H39F780
-39F780:lI115|H39F854
-39F854:lI101|H39F938
-39F938:lI100|H39FA14
-39FA14:lI45|H39FAE8
-39FAE8:lI104|H39FBBC
-39FBBC:lI116|H39FC88
-39FC88:lI109|H39FD4C
-39FD4C:lI108|N
-39E954:lI115|H39EA58
-39EA58:lI104|H39EB3C
-39EB3C:lI116|H39EC20
-39EC20:lI109|H39ED04
-39ED04:lI108|N
-39E854:lH39E964|H39E970
-39E964:t2:H39EA68,H39EA70
-39EA70:lI116|H39EB54
-39EB54:lI101|H39EC38
-39EC38:lI120|H39ED1C
-39ED1C:lI116|H39EDF0
-39EDF0:lI47|H39EEBC
-39EEBC:lI104|H39EF90
-39EF90:lI116|H39F06C
-39F06C:lI109|H39F138
-39F138:lI108|N
-39EA68:lI104|H39EB4C
-39EB4C:lI116|H39EC30
-39EC30:lI109|H39ED14
-39ED14:lI108|N
-39E970:lH39EA78|H39EA84
-39EA78:t2:H39EB5C,H39EB64
-39EB64:lI116|H39EC48
-39EC48:lI101|H39ED2C
-39ED2C:lI120|H39EDF8
-39EDF8:lI116|H39EEC4
-39EEC4:lI47|H39EF98
-39EF98:lI104|H39F074
-39F074:lI116|H39F140
-39F140:lI109|H39F20C
-39F20C:lI108|N
-39EB5C:lI104|H39EC40
-39EC40:lI116|H39ED24
-39ED24:lI109|N
-39EA84:lH39EB6C|H39EB78
-39EB6C:t2:H39EC50,H39EC58
-39EC58:lI105|H39ED3C
-39ED3C:lI109|H39EE08
-39EE08:lI97|H39EECC
-39EECC:lI103|H39EFA0
-39EFA0:lI101|H39F07C
-39F07C:lI47|H39F148
-39F148:lI120|H39F214
-39F214:lI45|H39F2D0
-39F2D0:lI120|H39F38C
-39F38C:lI119|H39F450
-39F450:lI105|H39F51C
-39F51C:lI110|H39F5E0
-39F5E0:lI100|H39F6B4
-39F6B4:lI111|H39F788
-39F788:lI119|H39F85C
-39F85C:lI100|H39F940
-39F940:lI117|H39FA1C
-39FA1C:lI109|H39FAF0
-39FAF0:lI112|N
-39EC50:lI120|H39ED34
-39ED34:lI119|H39EE00
-39EE00:lI100|N
-39EB78:lH39EC60|H39EC6C
-39EC60:t2:H39ED44,H39ED4C
-39ED4C:lI105|H39EE18
-39EE18:lI109|H39EEDC
-39EEDC:lI97|H39EFA8
-39EFA8:lI103|H39F084
-39F084:lI101|H39F150
-39F150:lI47|H39F21C
-39F21C:lI120|H39F2D8
-39F2D8:lI45|H39F394
-39F394:lI120|H39F458
-39F458:lI112|H39F524
-39F524:lI105|H39F5E8
-39F5E8:lI120|H39F6BC
-39F6BC:lI109|H39F790
-39F790:lI97|H39F864
-39F864:lI112|N
-39ED44:lI120|H39EE10
-39EE10:lI112|H39EED4
-39EED4:lI109|N
-39EC6C:lH39ED54|H39ED60
-39ED54:t2:H39EE20,H39EE28
-39EE28:lI105|H39EEEC
-39EEEC:lI109|H39EFB8
-39EFB8:lI97|H39F08C
-39F08C:lI103|H39F158
-39F158:lI101|H39F224
-39F224:lI47|H39F2E0
-39F2E0:lI120|H39F39C
-39F39C:lI45|H39F460
-39F460:lI120|H39F52C
-39F52C:lI98|H39F5F0
-39F5F0:lI105|H39F6C4
-39F6C4:lI116|H39F798
-39F798:lI109|H39F86C
-39F86C:lI97|H39F948
-39F948:lI112|N
-39EE20:lI120|H39EEE4
-39EEE4:lI98|H39EFB0
-39EFB0:lI109|N
-39ED60:lH39EE30|H39EE3C
-39EE30:t2:H39EEF4,H39EEFC
-39EEFC:lI105|H39EFC8
-39EFC8:lI109|H39F09C
-39F09C:lI97|H39F160
-39F160:lI103|H39F22C
-39F22C:lI101|H39F2E8
-39F2E8:lI47|H39F3A4
-39F3A4:lI120|H39F468
-39F468:lI45|H39F534
-39F534:lI114|H39F5F8
-39F5F8:lI103|H39F6CC
-39F6CC:lI98|N
-39EEF4:lI114|H39EFC0
-39EFC0:lI103|H39F094
-39F094:lI98|N
-39EE3C:lH39EF04|H39EF10
-39EF04:t2:H39EFD0,H39EFD8
-39EFD8:lI105|H39F0AC
-39F0AC:lI109|H39F170
-39F170:lI97|H39F234
-39F234:lI103|H39F2F0
-39F2F0:lI101|H39F3AC
-39F3AC:lI47|H39F470
-39F470:lI120|H39F53C
-39F53C:lI45|H39F600
-39F600:lI112|H39F6D4
-39F6D4:lI111|H39F7A0
-39F7A0:lI114|H39F874
-39F874:lI116|H39F950
-39F950:lI97|H39FA24
-39FA24:lI98|H39FAF8
-39FAF8:lI108|H39FBC4
-39FBC4:lI101|H39FC90
-39FC90:lI45|H39FD54
-39FD54:lI112|H39FE18
-39FE18:lI105|H39FECC
-39FECC:lI120|H39FF88
-39FF88:lI109|H3A003C
-3A003C:lI97|H3A00E8
-3A00E8:lI112|N
-39EFD0:lI112|H39F0A4
-39F0A4:lI112|H39F168
-39F168:lI109|N
-39EF10:lH39EFE0|H39EFEC
-39EFE0:t2:H39F0B4,H39F0BC
-39F0BC:lI105|H39F180
-39F180:lI109|H39F244
-39F244:lI97|H39F2F8
-39F2F8:lI103|H39F3B4
-39F3B4:lI101|H39F478
-39F478:lI47|H39F544
-39F544:lI120|H39F608
-39F608:lI45|H39F6DC
-39F6DC:lI112|H39F7A8
-39F7A8:lI111|H39F87C
-39F87C:lI114|H39F958
-39F958:lI116|H39FA2C
-39FA2C:lI97|H39FB00
-39FB00:lI98|H39FBCC
-39FBCC:lI108|H39FC98
-39FC98:lI101|H39FD5C
-39FD5C:lI45|H39FE20
-39FE20:lI103|H39FED4
-39FED4:lI114|H39FF90
-39FF90:lI97|H3A0044
-3A0044:lI121|H3A00F0
-3A00F0:lI109|H3A0194
-3A0194:lI97|H3A0248
-3A0248:lI112|N
-39F0B4:lI112|H39F178
-39F178:lI103|H39F23C
-39F23C:lI109|N
-39EFEC:lH39F0C4|H39F0D0
-39F0C4:t2:H39F188,H39F190
-39F190:lI105|H39F254
-39F254:lI109|H39F308
-39F308:lI97|H39F3BC
-39F3BC:lI103|H39F480
-39F480:lI101|H39F54C
-39F54C:lI47|H39F610
-39F610:lI120|H39F6E4
-39F6E4:lI45|H39F7B0
-39F7B0:lI112|H39F884
-39F884:lI111|H39F960
-39F960:lI114|H39FA34
-39FA34:lI116|H39FB08
-39FB08:lI97|H39FBD4
-39FBD4:lI98|H39FCA0
-39FCA0:lI108|H39FD64
-39FD64:lI101|H39FE28
-39FE28:lI45|H39FEDC
-39FEDC:lI98|H39FF98
-39FF98:lI105|H3A004C
-3A004C:lI116|H3A00F8
-3A00F8:lI109|H3A019C
-3A019C:lI97|H3A0250
-3A0250:lI112|N
-39F188:lI112|H39F24C
-39F24C:lI98|H39F300
-39F300:lI109|N
-39F0D0:lH39F198|H39F1A4
-39F198:t2:H39F25C,H39F264
-39F264:lI105|H39F318
-39F318:lI109|H39F3CC
-39F3CC:lI97|H39F488
-39F488:lI103|H39F554
-39F554:lI101|H39F618
-39F618:lI47|H39F6EC
-39F6EC:lI120|H39F7B8
-39F7B8:lI45|H39F88C
-39F88C:lI112|H39F968
-39F968:lI111|H39FA3C
-39FA3C:lI114|H39FB10
-39FB10:lI116|H39FBDC
-39FBDC:lI97|H39FCA8
-39FCA8:lI98|H39FD6C
-39FD6C:lI108|H39FE30
-39FE30:lI101|H39FEE4
-39FEE4:lI45|H39FFA0
-39FFA0:lI97|H3A0054
-3A0054:lI110|H3A0100
-3A0100:lI121|H3A01A4
-3A01A4:lI109|H3A0258
-3A0258:lI97|H3A0304
-3A0304:lI112|N
-39F25C:lI112|H39F310
-39F310:lI110|H39F3C4
-39F3C4:lI109|N
-39F1A4:lH39F26C|H39F278
-39F26C:t2:H39F320,H39F328
-39F328:lI105|H39F3DC
-39F3DC:lI109|H39F498
-39F498:lI97|H39F55C
-39F55C:lI103|H39F620
-39F620:lI101|H39F6F4
-39F6F4:lI47|H39F7C0
-39F7C0:lI120|H39F894
-39F894:lI45|H39F970
-39F970:lI99|H39FA44
-39FA44:lI109|H39FB18
-39FB18:lI117|H39FBE4
-39FBE4:lI45|H39FCB0
-39FCB0:lI114|H39FD74
-39FD74:lI97|H39FE38
-39FE38:lI115|H39FEEC
-39FEEC:lI116|H39FFA8
-39FFA8:lI101|H3A005C
-3A005C:lI114|N
-39F320:lI114|H39F3D4
-39F3D4:lI97|H39F490
-39F490:lI115|N
-39F278:lH39F330|H39F33C
-39F330:t2:H39F3E4,H39F3EC
-39F3EC:lI105|H39F4A8
-39F4A8:lI109|H39F56C
-39F56C:lI97|H39F630
-39F630:lI103|H39F6FC
-39F6FC:lI101|H39F7C8
-39F7C8:lI47|H39F89C
-39F89C:lI116|H39F978
-39F978:lI105|H39FA4C
-39FA4C:lI102|H39FB20
-39FB20:lI102|N
-39F3E4:lI116|H39F4A0
-39F4A0:lI105|H39F564
-39F564:lI102|H39F628
-39F628:lI102|N
-39F33C:lH39F3F4|H39F400
-39F3F4:t2:H39F4B0,H39F4B8
-39F4B8:lI105|H39F57C
-39F57C:lI109|H39F640
-39F640:lI97|H39F704
-39F704:lI103|H39F7D0
-39F7D0:lI101|H39F8A4
-39F8A4:lI47|H39F980
-39F980:lI116|H39FA54
-39FA54:lI105|H39FB28
-39FB28:lI102|H39FBEC
-39FBEC:lI102|N
-39F4B0:lI116|H39F574
-39F574:lI105|H39F638
-39F638:lI102|N
-39F400:lH39F4C0|H39F4CC
-39F4C0:t2:H39F584,H39F58C
-39F58C:lI105|H39F650
-39F650:lI109|H39F714
-39F714:lI97|H39F7D8
-39F7D8:lI103|H39F8AC
-39F8AC:lI101|H39F988
-39F988:lI47|H39FA5C
-39FA5C:lI112|H39FB30
-39FB30:lI110|H39FBF4
-39FBF4:lI103|N
-39F584:lI112|H39F648
-39F648:lI110|H39F70C
-39F70C:lI103|N
-39F4CC:lH39F594|H39F5A0
-39F594:t2:H39F658,H39F660
-39F660:lI105|H39F724
-39F724:lI109|H39F7E8
-39F7E8:lI97|H39F8BC
-39F8BC:lI103|H39F990
-39F990:lI101|H39FA64
-39FA64:lI47|H39FB38
-39FB38:lI106|H39FBFC
-39FBFC:lI112|H39FCB8
-39FCB8:lI101|H39FD7C
-39FD7C:lI103|N
-39F658:lI106|H39F71C
-39F71C:lI112|H39F7E0
-39F7E0:lI101|H39F8B4
-39F8B4:lI103|N
-39F5A0:lH39F668|H39F674
-39F668:t2:H39F72C,H39F734
-39F734:lI105|H39F7F8
-39F7F8:lI109|H39F8CC
-39F8CC:lI97|H39F998
-39F998:lI103|H39FA6C
-39FA6C:lI101|H39FB40
-39FB40:lI47|H39FC04
-39FC04:lI106|H39FCC0
-39FCC0:lI112|H39FD84
-39FD84:lI101|H39FE40
-39FE40:lI103|N
-39F72C:lI106|H39F7F0
-39F7F0:lI112|H39F8C4
-39F8C4:lI103|N
-39F674:lH39F73C|H39F748
-39F73C:t2:H39F800,H39F808
-39F808:lI105|H39F8DC
-39F8DC:lI109|H39F9A8
-39F9A8:lI97|H39FA74
-39FA74:lI103|H39FB48
-39FB48:lI101|H39FC0C
-39FC0C:lI47|H39FCC8
-39FCC8:lI106|H39FD8C
-39FD8C:lI112|H39FE48
-39FE48:lI101|H39FEF4
-39FEF4:lI103|N
-39F800:lI106|H39F8D4
-39F8D4:lI112|H39F9A0
-39F9A0:lI101|N
-39F748:lH39F810|H39F81C
-39F810:t2:H39F8E4,H39F8EC
-39F8EC:lI105|H39F9B8
-39F9B8:lI109|H39FA84
-39FA84:lI97|H39FB50
-39FB50:lI103|H39FC14
-39FC14:lI101|H39FCD0
-39FCD0:lI47|H39FD94
-39FD94:lI105|H39FE50
-39FE50:lI101|H39FEFC
-39FEFC:lI102|N
-39F8E4:lI105|H39F9B0
-39F9B0:lI101|H39FA7C
-39FA7C:lI102|N
-39F81C:lH39F8F4|H39F900
-39F8F4:t2:H39F9C0,H39F9C8
-39F9C8:lI105|H39FA94
-39FA94:lI109|H39FB60
-39FB60:lI97|H39FC1C
-39FC1C:lI103|H39FCD8
-39FCD8:lI101|H39FD9C
-39FD9C:lI47|H39FE58
-39FE58:lI103|H39FF04
-39FF04:lI105|H39FFB0
-39FFB0:lI102|N
-39F9C0:lI103|H39FA8C
-39FA8C:lI105|H39FB58
-39FB58:lI102|N
-39F900:lH39F9D0|H39F9DC
-39F9D0:t2:H39FA9C,H39FAA4
-39FAA4:lI99|H39FB70
-39FB70:lI104|H39FC2C
-39FC2C:lI101|H39FCE0
-39FCE0:lI109|H39FDA4
-39FDA4:lI105|H39FE60
-39FE60:lI99|H39FF0C
-39FF0C:lI97|H39FFB8
-39FFB8:lI108|H3A0064
-3A0064:lI47|H3A0108
-3A0108:lI120|H3A01AC
-3A01AC:lI45|H3A0260
-3A0260:lI112|H3A030C
-3A030C:lI100|H3A03B8
-3A03B8:lI98|N
-39FA9C:lI112|H39FB68
-39FB68:lI100|H39FC24
-39FC24:lI98|N
-39F9DC:lH39FAAC|H39FAB8
-39FAAC:t2:H39FB78,H39FB80
-39FB80:lI99|H39FC3C
-39FC3C:lI104|H39FCF0
-39FCF0:lI101|H39FDAC
-39FDAC:lI109|H39FE68
-39FE68:lI105|H39FF14
-39FF14:lI99|H39FFC0
-39FFC0:lI97|H3A006C
-3A006C:lI108|H3A0110
-3A0110:lI47|H3A01B4
-3A01B4:lI120|H3A0268
-3A0268:lI45|H3A0314
-3A0314:lI112|H3A03C0
-3A03C0:lI100|H3A0454
-3A0454:lI98|N
-39FB78:lI120|H39FC34
-39FC34:lI121|H39FCE8
-39FCE8:lI122|N
-39FAB8:lH39FB88|H39FB94
-39FB88:t2:H39FC44,H39FC4C
-39FC4C:lI97|H39FD00
-39FD00:lI117|H39FDBC
-39FDBC:lI100|H39FE70
-39FE70:lI105|H39FF1C
-39FF1C:lI111|H39FFC8
-39FFC8:lI47|H3A0074
-3A0074:lI120|H3A0118
-3A0118:lI45|H3A01BC
-3A01BC:lI119|H3A0270
-3A0270:lI97|H3A031C
-3A031C:lI118|N
-39FC44:lI119|H39FCF8
-39FCF8:lI97|H39FDB4
-39FDB4:lI118|N
-39FB94:lH39FC54|H39FC60
-39FC54:t2:H39FD08,H39FD10
-39FD10:lI97|H39FDCC
-39FDCC:lI117|H39FE78
-39FE78:lI100|H39FF24
-39FF24:lI105|H39FFD0
-39FFD0:lI111|H3A007C
-3A007C:lI47|H3A0120
-3A0120:lI120|H3A01C4
-3A01C4:lI45|H3A0278
-3A0278:lI114|H3A0324
-3A0324:lI101|H3A03C8
-3A03C8:lI97|H3A045C
-3A045C:lI108|H3A04F8
-3A04F8:lI97|H3A059C
-3A059C:lI117|H3A0648
-3A0648:lI100|H3A06F4
-3A06F4:lI105|H3A07A0
-3A07A0:lI111|N
-39FD08:lI114|H39FDC4
-39FDC4:lI97|N
-39FC60:lH39FD18|H39FD24
-39FD18:t2:H39FDD4,H39FDDC
-39FDDC:lI97|H39FE88
-39FE88:lI117|H39FF34
-39FF34:lI100|H39FFD8
-39FFD8:lI105|H3A0084
-3A0084:lI111|H3A0128
-3A0128:lI47|H3A01CC
-3A01CC:lI120|H3A0280
-3A0280:lI45|H3A032C
-3A032C:lI112|H3A03D0
-3A03D0:lI110|H3A0464
-3A0464:lI45|H3A0500
-3A0500:lI114|H3A05A4
-3A05A4:lI101|H3A0650
-3A0650:lI97|H3A06FC
-3A06FC:lI108|H3A07A8
-3A07A8:lI97|H3A0844
-3A0844:lI117|H3A08D0
-3A08D0:lI100|H3A0964
-3A0964:lI105|H3A09F8
-3A09F8:lI111|H3A0A94
-3A0A94:lI45|H3A0B40
-3A0B40:lI112|H3A0BEC
-3A0BEC:lI108|H3A0CA8
-3A0CA8:lI117|H3A0D64
-3A0D64:lI103|H3A0E18
-3A0E18:lI105|H3A0ECC
-3A0ECC:lI110|N
-39FDD4:lI114|H39FE80
-39FE80:lI112|H39FF2C
-39FF2C:lI109|N
-39FD24:lH39FDE4|H39FDF0
-39FDE4:t2:H39FE90,H39FE98
-39FE98:lI97|H39FF44
-39FF44:lI117|H39FFE8
-39FFE8:lI100|H3A008C
-3A008C:lI105|H3A0130
-3A0130:lI111|H3A01D4
-3A01D4:lI47|H3A0288
-3A0288:lI120|H3A0334
-3A0334:lI45|H3A03D8
-3A03D8:lI112|H3A046C
-3A046C:lI110|H3A0508
-3A0508:lI45|H3A05AC
-3A05AC:lI114|H3A0658
-3A0658:lI101|H3A0704
-3A0704:lI97|H3A07B0
-3A07B0:lI108|H3A084C
-3A084C:lI97|H3A08D8
-3A08D8:lI117|H3A096C
-3A096C:lI100|H3A0A00
-3A0A00:lI105|H3A0A9C
-3A0A9C:lI111|N
-39FE90:lI114|H39FF3C
-39FF3C:lI97|H39FFE0
-39FFE0:lI109|N
-39FDF0:lH39FEA0|H39FEAC
-39FEA0:t2:H39FF4C,H39FF54
-39FF54:lI97|H39FFF8
-39FFF8:lI117|H3A009C
-3A009C:lI100|H3A0138
-3A0138:lI105|H3A01DC
-3A01DC:lI111|H3A0290
-3A0290:lI47|H3A033C
-3A033C:lI120|H3A03E0
-3A03E0:lI45|H3A0474
-3A0474:lI97|H3A0510
-3A0510:lI105|H3A05B4
-3A05B4:lI102|H3A0660
-3A0660:lI102|N
-39FF4C:lI97|H39FFF0
-39FFF0:lI105|H3A0094
-3A0094:lI102|N
-39FEAC:lH39FF5C|H39FF68
-39FF5C:t2:H3A0000,H3A0008
-3A0008:lI97|H3A00AC
-3A00AC:lI117|H3A0148
-3A0148:lI100|H3A01EC
-3A01EC:lI105|H3A0298
-3A0298:lI111|H3A0344
-3A0344:lI47|H3A03E8
-3A03E8:lI120|H3A047C
-3A047C:lI45|H3A0518
-3A0518:lI97|H3A05BC
-3A05BC:lI105|H3A0668
-3A0668:lI102|H3A070C
-3A070C:lI102|N
-3A0000:lI97|H3A00A4
-3A00A4:lI105|H3A0140
-3A0140:lI102|H3A01E4
-3A01E4:lI102|N
-39FF68:lH3A0010|H3A001C
-3A0010:t2:H3A00B4,H3A00BC
-3A00BC:lI97|H3A0158
-3A0158:lI117|H3A01FC
-3A01FC:lI100|H3A02A8
-3A02A8:lI105|H3A034C
-3A034C:lI111|H3A03F0
-3A03F0:lI47|H3A0484
-3A0484:lI120|H3A0520
-3A0520:lI45|H3A05C4
-3A05C4:lI97|H3A0670
-3A0670:lI105|H3A0714
-3A0714:lI102|H3A07B8
-3A07B8:lI102|N
-3A00B4:lI97|H3A0150
-3A0150:lI105|H3A01F4
-3A01F4:lI102|H3A02A0
-3A02A0:lI99|N
-3A001C:lH3A00C4|H3A00D0
-3A00C4:t2:H3A0160,H3A0168
-3A0168:lI97|H3A020C
-3A020C:lI117|H3A02B8
-3A02B8:lI100|H3A035C
-3A035C:lI105|H3A03F8
-3A03F8:lI111|H3A048C
-3A048C:lI47|H3A0528
-3A0528:lI109|H3A05CC
-3A05CC:lI112|H3A0678
-3A0678:lI101|H3A071C
-3A071C:lI103|N
-3A0160:lI109|H3A0204
-3A0204:lI112|H3A02B0
-3A02B0:lI103|H3A0354
-3A0354:lI97|N
-3A00D0:lH3A0170|H3A017C
-3A0170:t2:H3A0214,H3A021C
-3A021C:lI97|H3A02C8
-3A02C8:lI117|H3A036C
-3A036C:lI100|H3A0400
-3A0400:lI105|H3A0494
-3A0494:lI111|H3A0530
-3A0530:lI47|H3A05D4
-3A05D4:lI109|H3A0680
-3A0680:lI112|H3A0724
-3A0724:lI101|H3A07C0
-3A07C0:lI103|N
-3A0214:lI109|H3A02C0
-3A02C0:lI112|H3A0364
-3A0364:lI50|N
-3A017C:lH3A0224|H3A0230
-3A0224:t2:H3A02D0,H3A02D8
-3A02D8:lI97|H3A037C
-3A037C:lI117|H3A0408
-3A0408:lI100|H3A049C
-3A049C:lI105|H3A0538
-3A0538:lI111|H3A05DC
-3A05DC:lI47|H3A0688
-3A0688:lI98|H3A072C
-3A072C:lI97|H3A07C8
-3A07C8:lI115|H3A0854
-3A0854:lI105|H3A08E0
-3A08E0:lI99|N
-3A02D0:lI97|H3A0374
-3A0374:lI117|N
-3A0230:lH3A02E0|H3A02EC
-3A02E0:t2:H3A0384,H3A038C
-3A038C:lI97|H3A0418
-3A0418:lI117|H3A04AC
-3A04AC:lI100|H3A0540
-3A0540:lI105|H3A05E4
-3A05E4:lI111|H3A0690
-3A0690:lI47|H3A0734
-3A0734:lI98|H3A07D0
-3A07D0:lI97|H3A085C
-3A085C:lI115|H3A08E8
-3A08E8:lI105|H3A0974
-3A0974:lI99|N
-3A0384:lI115|H3A0410
-3A0410:lI110|H3A04A4
-3A04A4:lI100|N
-3A02EC:lH3A0394|H3A03A0
-3A0394:t2:H3A0420,H3A0428
-3A0428:lI97|H3A04BC
-3A04BC:lI112|H3A0550
-3A0550:lI112|H3A05EC
-3A05EC:lI108|H3A0698
-3A0698:lI105|H3A073C
-3A073C:lI99|H3A07D8
-3A07D8:lI97|H3A0864
-3A0864:lI116|H3A08F0
-3A08F0:lI105|H3A097C
-3A097C:lI111|H3A0A08
-3A0A08:lI110|H3A0AA4
-3A0AA4:lI47|H3A0B48
-3A0B48:lI122|H3A0BF4
-3A0BF4:lI105|H3A0CB0
-3A0CB0:lI112|N
-3A0420:lI122|H3A04B4
-3A04B4:lI105|H3A0548
-3A0548:lI112|N
-3A03A0:lH3A0430|H3A043C
-3A0430:t2:H3A04C4,H3A04CC
-3A04CC:lI97|H3A0560
-3A0560:lI112|H3A05FC
-3A05FC:lI112|H3A06A0
-3A06A0:lI108|H3A0744
-3A0744:lI105|H3A07E0
-3A07E0:lI99|H3A086C
-3A086C:lI97|H3A08F8
-3A08F8:lI116|H3A0984
-3A0984:lI105|H3A0A10
-3A0A10:lI111|H3A0AAC
-3A0AAC:lI110|H3A0B50
-3A0B50:lI47|H3A0BFC
-3A0BFC:lI120|H3A0CB8
-3A0CB8:lI45|H3A0D6C
-3A0D6C:lI119|H3A0E20
-3A0E20:lI97|H3A0ED4
-3A0ED4:lI105|H3A0F90
-3A0F90:lI115|H3A105C
-3A105C:lI45|H3A1130
-3A1130:lI115|H3A1204
-3A1204:lI111|H3A12D0
-3A12D0:lI117|H3A13A4
-3A13A4:lI114|H3A1480
-3A1480:lI99|H3A1564
-3A1564:lI101|N
-3A04C4:lI115|H3A0558
-3A0558:lI114|H3A05F4
-3A05F4:lI99|N
-3A043C:lH3A04D4|H3A04E0
-3A04D4:t2:H3A0568,H3A0570
-3A0570:lI97|H3A060C
-3A060C:lI112|H3A06B0
-3A06B0:lI112|H3A0754
-3A0754:lI108|H3A07F0
-3A07F0:lI105|H3A0874
-3A0874:lI99|H3A0900
-3A0900:lI97|H3A098C
-3A098C:lI116|H3A0A18
-3A0A18:lI105|H3A0AB4
-3A0AB4:lI111|H3A0B58
-3A0B58:lI110|H3A0C04
-3A0C04:lI47|H3A0CC0
-3A0CC0:lI120|H3A0D74
-3A0D74:lI45|H3A0E28
-3A0E28:lI117|H3A0EDC
-3A0EDC:lI115|H3A0F98
-3A0F98:lI116|H3A1064
-3A1064:lI97|H3A1138
-3A1138:lI114|N
-3A0568:lI117|H3A0604
-3A0604:lI115|H3A06A8
-3A06A8:lI116|H3A074C
-3A074C:lI97|H3A07E8
-3A07E8:lI114|N
-3A04E0:lH3A0578|H3A0584
-3A0578:t2:H3A0614,H3A061C
-3A061C:lI97|H3A06C0
-3A06C0:lI112|H3A075C
-3A075C:lI112|H3A07F8
-3A07F8:lI108|H3A087C
-3A087C:lI105|H3A0908
-3A0908:lI99|H3A0994
-3A0994:lI97|H3A0A20
-3A0A20:lI116|H3A0ABC
-3A0ABC:lI105|H3A0B60
-3A0B60:lI111|H3A0C0C
-3A0C0C:lI110|H3A0CC8
-3A0CC8:lI47|H3A0D7C
-3A0D7C:lI120|H3A0E30
-3A0E30:lI45|H3A0EE4
-3A0EE4:lI116|H3A0FA0
-3A0FA0:lI114|H3A106C
-3A106C:lI111|H3A1140
-3A1140:lI102|H3A120C
-3A120C:lI102|H3A12D8
-3A12D8:lI45|H3A13AC
-3A13AC:lI109|H3A1488
-3A1488:lI115|N
-3A0614:lI109|H3A06B8
-3A06B8:lI115|N
-3A0584:lH3A0624|H3A0630
-3A0624:t2:H3A06C8,H3A06D0
-3A06D0:lI97|H3A076C
-3A076C:lI112|H3A0800
-3A0800:lI112|H3A0884
-3A0884:lI108|H3A0910
-3A0910:lI105|H3A099C
-3A099C:lI99|H3A0A28
-3A0A28:lI97|H3A0AC4
-3A0AC4:lI116|H3A0B68
-3A0B68:lI105|H3A0C14
-3A0C14:lI111|H3A0CD0
-3A0CD0:lI110|H3A0D84
-3A0D84:lI47|H3A0E38
-3A0E38:lI120|H3A0EEC
-3A0EEC:lI45|H3A0FA8
-3A0FA8:lI116|H3A1074
-3A1074:lI114|H3A1148
-3A1148:lI111|H3A1214
-3A1214:lI102|H3A12E0
-3A12E0:lI102|H3A13B4
-3A13B4:lI45|H3A1490
-3A1490:lI109|H3A156C
-3A156C:lI101|N
-3A06C8:lI109|H3A0764
-3A0764:lI101|N
-3A0630:lH3A06D8|H3A06E4
-3A06D8:t2:H3A0774,H3A077C
-3A077C:lI97|H3A0810
-3A0810:lI112|H3A0894
-3A0894:lI112|H3A0918
-3A0918:lI108|H3A09A4
-3A09A4:lI105|H3A0A30
-3A0A30:lI99|H3A0ACC
-3A0ACC:lI97|H3A0B70
-3A0B70:lI116|H3A0C1C
-3A0C1C:lI105|H3A0CD8
-3A0CD8:lI111|H3A0D8C
-3A0D8C:lI110|H3A0E40
-3A0E40:lI47|H3A0EF4
-3A0EF4:lI120|H3A0FB0
-3A0FB0:lI45|H3A107C
-3A107C:lI116|H3A1150
-3A1150:lI114|H3A121C
-3A121C:lI111|H3A12E8
-3A12E8:lI102|H3A13BC
-3A13BC:lI102|H3A1498
-3A1498:lI45|H3A1574
-3A1574:lI109|H3A1648
-3A1648:lI97|H3A171C
-3A171C:lI110|N
-3A0774:lI109|H3A0808
-3A0808:lI97|H3A088C
-3A088C:lI110|N
-3A06E4:lH3A0784|H3A0790
-3A0784:t2:H3A0818,H3A0820
-3A0820:lI97|H3A089C
-3A089C:lI112|H3A0920
-3A0920:lI112|H3A09AC
-3A09AC:lI108|H3A0A38
-3A0A38:lI105|H3A0AD4
-3A0AD4:lI99|H3A0B78
-3A0B78:lI97|H3A0C24
-3A0C24:lI116|H3A0CE0
-3A0CE0:lI105|H3A0D94
-3A0D94:lI111|H3A0E48
-3A0E48:lI110|H3A0EFC
-3A0EFC:lI47|H3A0FB8
-3A0FB8:lI120|H3A1084
-3A1084:lI45|H3A1158
-3A1158:lI116|H3A1224
-3A1224:lI114|H3A12F0
-3A12F0:lI111|H3A13C4
-3A13C4:lI102|H3A14A0
-3A14A0:lI102|N
-3A0818:lI116|N
-3A0790:lH3A0828|H3A0834
-3A0828:t2:H3A08A4,H3A08AC
-3A08AC:lI97|H3A0930
-3A0930:lI112|H3A09B4
-3A09B4:lI112|H3A0A40
-3A0A40:lI108|H3A0ADC
-3A0ADC:lI105|H3A0B80
-3A0B80:lI99|H3A0C2C
-3A0C2C:lI97|H3A0CE8
-3A0CE8:lI116|H3A0D9C
-3A0D9C:lI105|H3A0E50
-3A0E50:lI111|H3A0F04
-3A0F04:lI110|H3A0FC0
-3A0FC0:lI47|H3A108C
-3A108C:lI120|H3A1160
-3A1160:lI45|H3A122C
-3A122C:lI116|H3A12F8
-3A12F8:lI114|H3A13CC
-3A13CC:lI111|H3A14A8
-3A14A8:lI102|H3A157C
-3A157C:lI102|N
-3A08A4:lI116|H3A0928
-3A0928:lI114|N
-3A0834:lH3A08B4|H3A08C0
-3A08B4:t2:H3A0938,H3A0940
-3A0940:lI97|H3A09C4
-3A09C4:lI112|H3A0A50
-3A0A50:lI112|H3A0AEC
-3A0AEC:lI108|H3A0B88
-3A0B88:lI105|H3A0C34
-3A0C34:lI99|H3A0CF0
-3A0CF0:lI97|H3A0DA4
-3A0DA4:lI116|H3A0E58
-3A0E58:lI105|H3A0F0C
-3A0F0C:lI111|H3A0FC8
-3A0FC8:lI110|H3A1094
-3A1094:lI47|H3A1168
-3A1168:lI120|H3A1234
-3A1234:lI45|H3A1300
-3A1300:lI116|H3A13D4
-3A13D4:lI114|H3A14B0
-3A14B0:lI111|H3A1584
-3A1584:lI102|H3A1650
-3A1650:lI102|N
-3A0938:lI114|H3A09BC
-3A09BC:lI111|H3A0A48
-3A0A48:lI102|H3A0AE4
-3A0AE4:lI102|N
-3A08C0:lH3A0948|H3A0954
-3A0948:t2:H3A09CC,H3A09D4
-3A09D4:lI97|H3A0A60
-3A0A60:lI112|H3A0AFC
-3A0AFC:lI112|H3A0B98
-3A0B98:lI108|H3A0C44
-3A0C44:lI105|H3A0D00
-3A0D00:lI99|H3A0DB4
-3A0DB4:lI97|H3A0E60
-3A0E60:lI116|H3A0F14
-3A0F14:lI105|H3A0FD0
-3A0FD0:lI111|H3A109C
-3A109C:lI110|H3A1170
-3A1170:lI47|H3A123C
-3A123C:lI120|H3A1308
-3A1308:lI45|H3A13DC
-3A13DC:lI116|H3A14B8
-3A14B8:lI101|H3A158C
-3A158C:lI120|H3A1658
-3A1658:lI105|H3A1724
-3A1724:lI110|H3A17E8
-3A17E8:lI102|H3A18AC
-3A18AC:lI111|N
-3A09CC:lI116|H3A0A58
-3A0A58:lI101|H3A0AF4
-3A0AF4:lI120|H3A0B90
-3A0B90:lI105|H3A0C3C
-3A0C3C:lI110|H3A0CF8
-3A0CF8:lI102|H3A0DAC
-3A0DAC:lI111|N
-3A0954:lH3A09DC|H3A09E8
-3A09DC:t2:H3A0A68,H3A0A70
-3A0A70:lI97|H3A0B0C
-3A0B0C:lI112|H3A0BA8
-3A0BA8:lI112|H3A0C54
-3A0C54:lI108|H3A0D08
-3A0D08:lI105|H3A0DBC
-3A0DBC:lI99|H3A0E68
-3A0E68:lI97|H3A0F1C
-3A0F1C:lI116|H3A0FD8
-3A0FD8:lI105|H3A10A4
-3A10A4:lI111|H3A1178
-3A1178:lI110|H3A1244
-3A1244:lI47|H3A1310
-3A1310:lI120|H3A13E4
-3A13E4:lI45|H3A14C0
-3A14C0:lI116|H3A1594
-3A1594:lI101|H3A1660
-3A1660:lI120|H3A172C
-3A172C:lI105|H3A17F0
-3A17F0:lI110|H3A18B4
-3A18B4:lI102|H3A1970
-3A1970:lI111|N
-3A0A68:lI116|H3A0B04
-3A0B04:lI101|H3A0BA0
-3A0BA0:lI120|H3A0C4C
-3A0C4C:lI105|N
-3A09E8:lH3A0A78|H3A0A84
-3A0A78:t2:H3A0B14,H3A0B1C
-3A0B1C:lI97|H3A0BB8
-3A0BB8:lI112|H3A0C64
-3A0C64:lI112|H3A0D10
-3A0D10:lI108|H3A0DC4
-3A0DC4:lI105|H3A0E70
-3A0E70:lI99|H3A0F24
-3A0F24:lI97|H3A0FE0
-3A0FE0:lI116|H3A10AC
-3A10AC:lI105|H3A1180
-3A1180:lI111|H3A124C
-3A124C:lI110|H3A1318
-3A1318:lI47|H3A13EC
-3A13EC:lI120|H3A14C8
-3A14C8:lI45|H3A159C
-3A159C:lI116|H3A1668
-3A1668:lI101|H3A1734
-3A1734:lI120|N
-3A0B14:lI116|H3A0BB0
-3A0BB0:lI101|H3A0C5C
-3A0C5C:lI120|N
-3A0A84:lH3A0B24|H3A0B30
-3A0B24:t2:H3A0BC0,H3A0BC8
-3A0BC8:lI97|H3A0C74
-3A0C74:lI112|H3A0D20
-3A0D20:lI112|H3A0DCC
-3A0DCC:lI108|H3A0E78
-3A0E78:lI105|H3A0F2C
-3A0F2C:lI99|H3A0FE8
-3A0FE8:lI97|H3A10B4
-3A10B4:lI116|H3A1188
-3A1188:lI105|H3A1254
-3A1254:lI111|H3A1320
-3A1320:lI110|H3A13F4
-3A13F4:lI47|H3A14D0
-3A14D0:lI120|H3A15A4
-3A15A4:lI45|H3A1670
-3A1670:lI116|H3A173C
-3A173C:lI99|H3A17F8
-3A17F8:lI108|N
-3A0BC0:lI116|H3A0C6C
-3A0C6C:lI99|H3A0D18
-3A0D18:lI108|N
-3A0B30:lH3A0BD0|H3A0BDC
-3A0BD0:t2:H3A0C7C,H3A0C84
-3A0C84:lI97|H3A0D30
-3A0D30:lI112|H3A0DDC
-3A0DDC:lI112|H3A0E80
-3A0E80:lI108|H3A0F34
-3A0F34:lI105|H3A0FF0
-3A0FF0:lI99|H3A10BC
-3A10BC:lI97|H3A1190
-3A1190:lI116|H3A125C
-3A125C:lI105|H3A1328
-3A1328:lI111|H3A13FC
-3A13FC:lI110|H3A14D8
-3A14D8:lI47|H3A15AC
-3A15AC:lI120|H3A1678
-3A1678:lI45|H3A1744
-3A1744:lI116|H3A1800
-3A1800:lI97|H3A18BC
-3A18BC:lI114|N
-3A0C7C:lI116|H3A0D28
-3A0D28:lI97|H3A0DD4
-3A0DD4:lI114|N
-3A0BDC:lH3A0C8C|H3A0C98
-3A0C8C:t2:H3A0D38,H3A0D40
-3A0D40:lI97|H3A0DEC
-3A0DEC:lI112|H3A0E90
-3A0E90:lI112|H3A0F44
-3A0F44:lI108|H3A1000
-3A1000:lI105|H3A10CC
-3A10CC:lI99|H3A1198
-3A1198:lI97|H3A1264
-3A1264:lI116|H3A1330
-3A1330:lI105|H3A1404
-3A1404:lI111|H3A14E0
-3A14E0:lI110|H3A15B4
-3A15B4:lI47|H3A1680
-3A1680:lI120|H3A174C
-3A174C:lI45|H3A1808
-3A1808:lI115|H3A18C4
-3A18C4:lI118|H3A1978
-3A1978:lI52|H3A1A2C
-3A1A2C:lI99|H3A1AE0
-3A1AE0:lI114|H3A1BA4
-3A1BA4:lI99|N
-3A0D38:lI115|H3A0DE4
-3A0DE4:lI118|H3A0E88
-3A0E88:lI52|H3A0F3C
-3A0F3C:lI99|H3A0FF8
-3A0FF8:lI114|H3A10C4
-3A10C4:lI99|N
-3A0C98:lH3A0D48|H3A0D54
-3A0D48:t2:H3A0DF4,H3A0DFC
-3A0DFC:lI97|H3A0EA0
-3A0EA0:lI112|H3A0F54
-3A0F54:lI112|H3A1010
-3A1010:lI108|H3A10DC
-3A10DC:lI105|H3A11A8
-3A11A8:lI99|H3A1274
-3A1274:lI97|H3A1338
-3A1338:lI116|H3A140C
-3A140C:lI105|H3A14E8
-3A14E8:lI111|H3A15BC
-3A15BC:lI110|H3A1688
-3A1688:lI47|H3A1754
-3A1754:lI120|H3A1810
-3A1810:lI45|H3A18CC
-3A18CC:lI115|H3A1980
-3A1980:lI118|H3A1A34
-3A1A34:lI52|H3A1AE8
-3A1AE8:lI99|H3A1BAC
-3A1BAC:lI112|H3A1C78
-3A1C78:lI105|H3A1D3C
-3A1D3C:lI111|N
-3A0DF4:lI115|H3A0E98
-3A0E98:lI118|H3A0F4C
-3A0F4C:lI52|H3A1008
-3A1008:lI99|H3A10D4
-3A10D4:lI112|H3A11A0
-3A11A0:lI105|H3A126C
-3A126C:lI111|N
-3A0D54:lH3A0E04|H3A0E10
-3A0E04:t2:H3A0EA8,H3A0EB0
-3A0EB0:lI97|H3A0F64
-3A0F64:lI112|H3A1020
-3A1020:lI112|H3A10E4
-3A10E4:lI108|H3A11B0
-3A11B0:lI105|H3A127C
-3A127C:lI99|H3A1340
-3A1340:lI97|H3A1414
-3A1414:lI116|H3A14F0
-3A14F0:lI105|H3A15C4
-3A15C4:lI111|H3A1690
-3A1690:lI110|H3A175C
-3A175C:lI47|H3A1818
-3A1818:lI120|H3A18D4
-3A18D4:lI45|H3A1988
-3A1988:lI115|H3A1A3C
-3A1A3C:lI116|H3A1AF0
-3A1AF0:lI117|H3A1BB4
-3A1BB4:lI102|H3A1C80
-3A1C80:lI102|H3A1D44
-3A1D44:lI105|H3A1E00
-3A1E00:lI116|N
-3A0EA8:lI115|H3A0F5C
-3A0F5C:lI105|H3A1018
-3A1018:lI116|N
-3A0E10:lH3A0EB8|H3A0EC4
-3A0EB8:t2:H3A0F6C,H3A0F74
-3A0F74:lI97|H3A1030
-3A1030:lI112|H3A10F4
-3A10F4:lI112|H3A11C0
-3A11C0:lI108|H3A1284
-3A1284:lI105|H3A1348
-3A1348:lI99|H3A141C
-3A141C:lI97|H3A14F8
-3A14F8:lI116|H3A15CC
-3A15CC:lI105|H3A1698
-3A1698:lI111|H3A1764
-3A1764:lI110|H3A1820
-3A1820:lI47|H3A18DC
-3A18DC:lI120|H3A1990
-3A1990:lI45|H3A1A44
-3A1A44:lI115|H3A1AF8
-3A1AF8:lI104|H3A1BBC
-3A1BBC:lI97|H3A1C88
-3A1C88:lI114|N
-3A0F6C:lI115|H3A1028
-3A1028:lI104|H3A10EC
-3A10EC:lI97|H3A11B8
-3A11B8:lI114|N
-3A0EC4:lH3A0F7C|H3A0F88
-3A0F7C:t2:H3A1038,H3A1040
-3A1040:lI97|H3A1104
-3A1104:lI112|H3A11C8
-3A11C8:lI112|H3A128C
-3A128C:lI108|H3A1350
-3A1350:lI105|H3A1424
-3A1424:lI99|H3A1500
-3A1500:lI97|H3A15D4
-3A15D4:lI116|H3A16A0
-3A16A0:lI105|H3A176C
-3A176C:lI111|H3A1828
-3A1828:lI110|H3A18E4
-3A18E4:lI47|H3A1998
-3A1998:lI120|H3A1A4C
-3A1A4C:lI45|H3A1B00
-3A1B00:lI115|H3A1BC4
-3A1BC4:lI104|N
-3A1038:lI115|H3A10FC
-3A10FC:lI104|N
-3A0F88:lH3A1048|H3A1054
-3A1048:t2:H3A110C,H3A1114
-3A1114:lI97|H3A11D8
-3A11D8:lI112|H3A1294
-3A1294:lI112|H3A1358
-3A1358:lI108|H3A142C
-3A142C:lI105|H3A1508
-3A1508:lI99|H3A15DC
-3A15DC:lI97|H3A16A8
-3A16A8:lI116|H3A1774
-3A1774:lI105|H3A1830
-3A1830:lI111|H3A18EC
-3A18EC:lI110|H3A19A0
-3A19A0:lI47|H3A1A54
-3A1A54:lI120|H3A1B08
-3A1B08:lI45|H3A1BCC
-3A1BCC:lI110|H3A1C90
-3A1C90:lI101|H3A1D4C
-3A1D4C:lI116|H3A1E08
-3A1E08:lI99|H3A1EC4
-3A1EC4:lI100|H3A1F88
-3A1F88:lI102|N
-3A110C:lI110|H3A11D0
-3A11D0:lI99|N
-3A1054:lH3A111C|H3A1128
-3A111C:t2:H3A11E0,H3A11E8
-3A11E8:lI97|H3A12A4
-3A12A4:lI112|H3A1368
-3A1368:lI112|H3A1434
-3A1434:lI108|H3A1510
-3A1510:lI105|H3A15E4
-3A15E4:lI99|H3A16B0
-3A16B0:lI97|H3A177C
-3A177C:lI116|H3A1838
-3A1838:lI105|H3A18F4
-3A18F4:lI111|H3A19A8
-3A19A8:lI110|H3A1A5C
-3A1A5C:lI47|H3A1B10
-3A1B10:lI120|H3A1BD4
-3A1BD4:lI45|H3A1C98
-3A1C98:lI110|H3A1D54
-3A1D54:lI101|H3A1E10
-3A1E10:lI116|H3A1ECC
-3A1ECC:lI99|H3A1F90
-3A1F90:lI100|H3A2044
-3A2044:lI102|N
-3A11E0:lI99|H3A129C
-3A129C:lI100|H3A1360
-3A1360:lI102|N
-3A1128:lH3A11F0|H3A11FC
-3A11F0:t2:H3A12AC,H3A12B4
-3A12B4:lI97|H3A1378
-3A1378:lI112|H3A1444
-3A1444:lI112|H3A1518
-3A1518:lI108|H3A15EC
-3A15EC:lI105|H3A16B8
-3A16B8:lI99|H3A1784
-3A1784:lI97|H3A1840
-3A1840:lI116|H3A18FC
-3A18FC:lI105|H3A19B0
-3A19B0:lI111|H3A1A64
-3A1A64:lI110|H3A1B18
-3A1B18:lI47|H3A1BDC
-3A1BDC:lI120|H3A1CA0
-3A1CA0:lI45|H3A1D5C
-3A1D5C:lI109|H3A1E18
-3A1E18:lI105|H3A1ED4
-3A1ED4:lI102|N
-3A12AC:lI109|H3A1370
-3A1370:lI105|H3A143C
-3A143C:lI102|N
-3A11FC:lH3A12BC|H3A12C8
-3A12BC:t2:H3A1380,H3A1388
-3A1388:lI97|H3A1454
-3A1454:lI112|H3A1528
-3A1528:lI112|H3A15FC
-3A15FC:lI108|H3A16C8
-3A16C8:lI105|H3A178C
-3A178C:lI99|H3A1848
-3A1848:lI97|H3A1904
-3A1904:lI116|H3A19B8
-3A19B8:lI105|H3A1A6C
-3A1A6C:lI111|H3A1B20
-3A1B20:lI110|H3A1BE4
-3A1BE4:lI47|H3A1CA8
-3A1CA8:lI120|H3A1D64
-3A1D64:lI45|H3A1E20
-3A1E20:lI108|H3A1EDC
-3A1EDC:lI97|H3A1F98
-3A1F98:lI116|H3A204C
-3A204C:lI101|H3A2108
-3A2108:lI120|N
-3A1380:lI108|H3A144C
-3A144C:lI97|H3A1520
-3A1520:lI116|H3A15F4
-3A15F4:lI101|H3A16C0
-3A16C0:lI120|N
-3A12C8:lH3A1390|H3A139C
-3A1390:t2:H3A145C,H3A1464
-3A1464:lI97|H3A1538
-3A1538:lI112|H3A160C
-3A160C:lI112|H3A16D0
-3A16D0:lI108|H3A1794
-3A1794:lI105|H3A1850
-3A1850:lI99|H3A190C
-3A190C:lI97|H3A19C0
-3A19C0:lI116|H3A1A74
-3A1A74:lI105|H3A1B28
-3A1B28:lI111|H3A1BEC
-3A1BEC:lI110|H3A1CB0
-3A1CB0:lI47|H3A1D6C
-3A1D6C:lI120|H3A1E28
-3A1E28:lI45|H3A1EE4
-3A1EE4:lI107|H3A1FA0
-3A1FA0:lI111|H3A2054
-3A2054:lI97|H3A2110
-3A2110:lI110|N
-3A145C:lI115|H3A1530
-3A1530:lI107|H3A1604
-3A1604:lI112|N
-3A139C:lH3A146C|H3A1478
-3A146C:t2:H3A1540,H3A1548
-3A1548:lI97|H3A161C
-3A161C:lI112|H3A16E0
-3A16E0:lI112|H3A179C
-3A179C:lI108|H3A1858
-3A1858:lI105|H3A1914
-3A1914:lI99|H3A19C8
-3A19C8:lI97|H3A1A7C
-3A1A7C:lI116|H3A1B30
-3A1B30:lI105|H3A1BF4
-3A1BF4:lI111|H3A1CB8
-3A1CB8:lI110|H3A1D74
-3A1D74:lI47|H3A1E30
-3A1E30:lI120|H3A1EEC
-3A1EEC:lI45|H3A1FA8
-3A1FA8:lI107|H3A205C
-3A205C:lI111|H3A2118
-3A2118:lI97|H3A21CC
-3A21CC:lI110|N
-3A1540:lI115|H3A1614
-3A1614:lI107|H3A16D8
-3A16D8:lI100|N
-3A1478:lH3A1550|H3A155C
-3A1550:t2:H3A1624,H3A162C
-3A162C:lI97|H3A16F0
-3A16F0:lI112|H3A17AC
-3A17AC:lI112|H3A1860
-3A1860:lI108|H3A191C
-3A191C:lI105|H3A19D0
-3A19D0:lI99|H3A1A84
-3A1A84:lI97|H3A1B38
-3A1B38:lI116|H3A1BFC
-3A1BFC:lI105|H3A1CC0
-3A1CC0:lI111|H3A1D7C
-3A1D7C:lI110|H3A1E38
-3A1E38:lI47|H3A1EF4
-3A1EF4:lI120|H3A1FB0
-3A1FB0:lI45|H3A2064
-3A2064:lI107|H3A2120
-3A2120:lI111|H3A21D4
-3A21D4:lI97|H3A2288
-3A2288:lI110|N
-3A1624:lI115|H3A16E8
-3A16E8:lI107|H3A17A4
-3A17A4:lI116|N
-3A155C:lH3A1634|H3A1640
-3A1634:t2:H3A16F8,H3A1700
-3A1700:lI97|H3A17BC
-3A17BC:lI112|H3A1870
-3A1870:lI112|H3A1924
-3A1924:lI108|H3A19D8
-3A19D8:lI105|H3A1A8C
-3A1A8C:lI99|H3A1B40
-3A1B40:lI97|H3A1C04
-3A1C04:lI116|H3A1CC8
-3A1CC8:lI105|H3A1D84
-3A1D84:lI111|H3A1E40
-3A1E40:lI110|H3A1EFC
-3A1EFC:lI47|H3A1FB8
-3A1FB8:lI120|H3A206C
-3A206C:lI45|H3A2128
-3A2128:lI107|H3A21DC
-3A21DC:lI111|H3A2290
-3A2290:lI97|H3A234C
-3A234C:lI110|N
-3A16F8:lI115|H3A17B4
-3A17B4:lI107|H3A1868
-3A1868:lI109|N
-3A1640:lH3A1708|H3A1714
-3A1708:t2:H3A17C4,H3A17CC
-3A17CC:lI97|H3A1880
-3A1880:lI112|H3A1934
-3A1934:lI112|H3A19E0
-3A19E0:lI108|H3A1A94
-3A1A94:lI105|H3A1B48
-3A1B48:lI99|H3A1C0C
-3A1C0C:lI97|H3A1CD0
-3A1CD0:lI116|H3A1D8C
-3A1D8C:lI105|H3A1E48
-3A1E48:lI111|H3A1F04
-3A1F04:lI110|H3A1FC0
-3A1FC0:lI47|H3A2074
-3A2074:lI120|H3A2130
-3A2130:lI45|H3A21E4
-3A21E4:lI104|H3A2298
-3A2298:lI116|H3A2354
-3A2354:lI116|H3A2410
-3A2410:lI112|H3A24C4
-3A24C4:lI100|H3A2580
-3A2580:lI45|H3A263C
-3A263C:lI99|H3A2700
-3A2700:lI103|H3A27BC
-3A27BC:lI105|N
-3A17C4:lI99|H3A1878
-3A1878:lI103|H3A192C
-3A192C:lI105|N
-3A1714:lH3A17D4|H3A17E0
-3A17D4:t2:H3A1888,H3A1890
-3A1890:lI97|H3A1944
-3A1944:lI112|H3A19F0
-3A19F0:lI112|H3A1A9C
-3A1A9C:lI108|H3A1B50
-3A1B50:lI105|H3A1C14
-3A1C14:lI99|H3A1CD8
-3A1CD8:lI97|H3A1D94
-3A1D94:lI116|H3A1E50
-3A1E50:lI105|H3A1F0C
-3A1F0C:lI111|H3A1FC8
-3A1FC8:lI110|H3A207C
-3A207C:lI47|H3A2138
-3A2138:lI120|H3A21EC
-3A21EC:lI45|H3A22A0
-3A22A0:lI104|H3A235C
-3A235C:lI100|H3A2418
-3A2418:lI102|N
-3A1888:lI104|H3A193C
-3A193C:lI100|H3A19E8
-3A19E8:lI102|N
-3A17E0:lH3A1898|H3A18A4
-3A1898:t2:H3A194C,H3A1954
-3A1954:lI97|H3A1A00
-3A1A00:lI112|H3A1AA4
-3A1AA4:lI112|H3A1B58
-3A1B58:lI108|H3A1C1C
-3A1C1C:lI105|H3A1CE0
-3A1CE0:lI99|H3A1D9C
-3A1D9C:lI97|H3A1E58
-3A1E58:lI116|H3A1F14
-3A1F14:lI105|H3A1FD0
-3A1FD0:lI111|H3A2084
-3A2084:lI110|H3A2140
-3A2140:lI47|H3A21F4
-3A21F4:lI120|H3A22A8
-3A22A8:lI45|H3A2364
-3A2364:lI103|H3A2420
-3A2420:lI122|H3A24CC
-3A24CC:lI105|H3A2588
-3A2588:lI112|N
-3A194C:lI103|H3A19F8
-3A19F8:lI122|N
-3A18A4:lH3A195C|H3A1968
-3A195C:t2:H3A1A08,H3A1A10
-3A1A10:lI97|H3A1AB4
-3A1AB4:lI112|H3A1B68
-3A1B68:lI112|H3A1C2C
-3A1C2C:lI108|H3A1CE8
-3A1CE8:lI105|H3A1DA4
-3A1DA4:lI99|H3A1E60
-3A1E60:lI97|H3A1F1C
-3A1F1C:lI116|H3A1FD8
-3A1FD8:lI105|H3A208C
-3A208C:lI111|H3A2148
-3A2148:lI110|H3A21FC
-3A21FC:lI47|H3A22B0
-3A22B0:lI120|H3A236C
-3A236C:lI45|H3A2428
-3A2428:lI103|H3A24D4
-3A24D4:lI116|H3A2590
-3A2590:lI97|H3A2644
-3A2644:lI114|N
-3A1A08:lI103|H3A1AAC
-3A1AAC:lI116|H3A1B60
-3A1B60:lI97|H3A1C24
-3A1C24:lI114|N
-3A1968:lH3A1A18|H3A1A24
-3A1A18:t2:H3A1ABC,H3A1AC4
-3A1AC4:lI97|H3A1B78
-3A1B78:lI112|H3A1C3C
-3A1C3C:lI112|H3A1CF0
-3A1CF0:lI108|H3A1DAC
-3A1DAC:lI105|H3A1E68
-3A1E68:lI99|H3A1F24
-3A1F24:lI97|H3A1FE0
-3A1FE0:lI116|H3A2094
-3A2094:lI105|H3A2150
-3A2150:lI111|H3A2204
-3A2204:lI110|H3A22B8
-3A22B8:lI47|H3A2374
-3A2374:lI120|H3A2430
-3A2430:lI45|H3A24DC
-3A24DC:lI100|H3A2598
-3A2598:lI118|H3A264C
-3A264C:lI105|N
-3A1ABC:lI100|H3A1B70
-3A1B70:lI118|H3A1C34
-3A1C34:lI105|N
-3A1A24:lH3A1ACC|H3A1AD8
-3A1ACC:t2:H3A1B80,H3A1B88
-3A1B88:lI97|H3A1C4C
-3A1C4C:lI112|H3A1D00
-3A1D00:lI112|H3A1DB4
-3A1DB4:lI108|H3A1E70
-3A1E70:lI105|H3A1F2C
-3A1F2C:lI99|H3A1FE8
-3A1FE8:lI97|H3A209C
-3A209C:lI116|H3A2158
-3A2158:lI105|H3A220C
-3A220C:lI111|H3A22C0
-3A22C0:lI110|H3A237C
-3A237C:lI47|H3A2438
-3A2438:lI120|H3A24E4
-3A24E4:lI45|H3A25A0
-3A25A0:lI100|H3A2654
-3A2654:lI105|H3A2708
-3A2708:lI114|H3A27C4
-3A27C4:lI101|H3A2880
-3A2880:lI99|H3A2944
-3A2944:lI116|H3A2A10
-3A2A10:lI111|H3A2ADC
-3A2ADC:lI114|N
-3A1B80:lI100|H3A1C44
-3A1C44:lI99|H3A1CF8
-3A1CF8:lI114|N
-3A1AD8:lH3A1B90|H3A1B9C
-3A1B90:t2:H3A1C54,H3A1C5C
-3A1C5C:lI97|H3A1D10
-3A1D10:lI112|H3A1DC4
-3A1DC4:lI112|H3A1E78
-3A1E78:lI108|H3A1F34
-3A1F34:lI105|H3A1FF0
-3A1FF0:lI99|H3A20A4
-3A20A4:lI97|H3A2160
-3A2160:lI116|H3A2214
-3A2214:lI105|H3A22C8
-3A22C8:lI111|H3A2384
-3A2384:lI110|H3A2440
-3A2440:lI47|H3A24EC
-3A24EC:lI120|H3A25A8
-3A25A8:lI45|H3A265C
-3A265C:lI100|H3A2710
-3A2710:lI105|H3A27CC
-3A27CC:lI114|H3A2888
-3A2888:lI101|H3A294C
-3A294C:lI99|H3A2A18
-3A2A18:lI116|H3A2AE4
-3A2AE4:lI111|H3A2BB0
-3A2BB0:lI114|N
-3A1C54:lI100|H3A1D08
-3A1D08:lI105|H3A1DBC
-3A1DBC:lI114|N
-3A1B9C:lH3A1C64|H3A1C70
-3A1C64:t2:H3A1D18,H3A1D20
-3A1D20:lI97|H3A1DD4
-3A1DD4:lI112|H3A1E88
-3A1E88:lI112|H3A1F3C
-3A1F3C:lI108|H3A1FF8
-3A1FF8:lI105|H3A20AC
-3A20AC:lI99|H3A2168
-3A2168:lI97|H3A221C
-3A221C:lI116|H3A22D0
-3A22D0:lI105|H3A238C
-3A238C:lI111|H3A2448
-3A2448:lI110|H3A24F4
-3A24F4:lI47|H3A25B0
-3A25B0:lI120|H3A2664
-3A2664:lI45|H3A2718
-3A2718:lI100|H3A27D4
-3A27D4:lI105|H3A2890
-3A2890:lI114|H3A2954
-3A2954:lI101|H3A2A20
-3A2A20:lI99|H3A2AEC
-3A2AEC:lI116|H3A2BB8
-3A2BB8:lI111|H3A2C74
-3A2C74:lI114|N
-3A1D18:lI100|H3A1DCC
-3A1DCC:lI120|H3A1E80
-3A1E80:lI114|N
-3A1C70:lH3A1D28|H3A1D34
-3A1D28:t2:H3A1DDC,H3A1DE4
-3A1DE4:lI97|H3A1E98
-3A1E98:lI112|H3A1F4C
-3A1F4C:lI112|H3A2000
-3A2000:lI108|H3A20B4
-3A20B4:lI105|H3A2170
-3A2170:lI99|H3A2224
-3A2224:lI97|H3A22D8
-3A22D8:lI116|H3A2394
-3A2394:lI105|H3A2450
-3A2450:lI111|H3A24FC
-3A24FC:lI110|H3A25B8
-3A25B8:lI47|H3A266C
-3A266C:lI120|H3A2720
-3A2720:lI45|H3A27DC
-3A27DC:lI99|H3A2898
-3A2898:lI115|H3A295C
-3A295C:lI104|N
-3A1DDC:lI99|H3A1E90
-3A1E90:lI115|H3A1F44
-3A1F44:lI104|N
-3A1D34:lH3A1DEC|H3A1DF8
-3A1DEC:t2:H3A1EA0,H3A1EA8
-3A1EA8:lI97|H3A1F5C
-3A1F5C:lI112|H3A2010
-3A2010:lI112|H3A20C4
-3A20C4:lI108|H3A2178
-3A2178:lI105|H3A222C
-3A222C:lI99|H3A22E0
-3A22E0:lI97|H3A239C
-3A239C:lI116|H3A2458
-3A2458:lI105|H3A2504
-3A2504:lI111|H3A25C0
-3A25C0:lI110|H3A2674
-3A2674:lI47|H3A2728
-3A2728:lI120|H3A27E4
-3A27E4:lI45|H3A28A0
-3A28A0:lI99|H3A2964
-3A2964:lI112|H3A2A28
-3A2A28:lI105|H3A2AF4
-3A2AF4:lI111|N
-3A1EA0:lI99|H3A1F54
-3A1F54:lI112|H3A2008
-3A2008:lI105|H3A20BC
-3A20BC:lI111|N
-3A1DF8:lH3A1EB0|H3A1EBC
-3A1EB0:t2:H3A1F64,H3A1F6C
-3A1F6C:lI97|H3A2018
-3A2018:lI112|H3A20CC
-3A20CC:lI112|H3A2180
-3A2180:lI108|H3A2234
-3A2234:lI105|H3A22E8
-3A22E8:lI99|H3A23A4
-3A23A4:lI97|H3A2460
-3A2460:lI116|H3A250C
-3A250C:lI105|H3A25C8
-3A25C8:lI111|H3A267C
-3A267C:lI110|H3A2730
-3A2730:lI47|H3A27EC
-3A27EC:lI120|H3A28A8
-3A28A8:lI45|H3A296C
-3A296C:lI99|H3A2A30
-3A2A30:lI111|H3A2AFC
-3A2AFC:lI109|H3A2BC0
-3A2BC0:lI112|H3A2C7C
-3A2C7C:lI114|H3A2D2C
-3A2D2C:lI101|H3A2DD4
-3A2DD4:lI115|H3A2E6C
-3A2E6C:lI115|N
-3A1F64:lI90|N
-3A1EBC:lH3A1F74|H3A1F80
-3A1F74:t2:H3A2020,H3A2028
-3A2028:lI97|H3A20DC
-3A20DC:lI112|H3A2190
-3A2190:lI112|H3A223C
-3A223C:lI108|H3A22F0
-3A22F0:lI105|H3A23AC
-3A23AC:lI99|H3A2468
-3A2468:lI97|H3A2514
-3A2514:lI116|H3A25D0
-3A25D0:lI105|H3A2684
-3A2684:lI111|H3A2738
-3A2738:lI110|H3A27F4
-3A27F4:lI47|H3A28B0
-3A28B0:lI120|H3A2974
-3A2974:lI45|H3A2A38
-3A2A38:lI99|H3A2B04
-3A2B04:lI100|H3A2BC8
-3A2BC8:lI108|H3A2C84
-3A2C84:lI105|H3A2D34
-3A2D34:lI110|H3A2DDC
-3A2DDC:lI107|N
-3A2020:lI118|H3A20D4
-3A20D4:lI99|H3A2188
-3A2188:lI100|N
-3A1F80:lH3A2030|H3A203C
-3A2030:t2:H3A20E4,H3A20EC
-3A20EC:lI97|H3A21A0
-3A21A0:lI112|H3A224C
-3A224C:lI112|H3A2300
-3A2300:lI108|H3A23BC
-3A23BC:lI105|H3A2470
-3A2470:lI99|H3A251C
-3A251C:lI97|H3A25D8
-3A25D8:lI116|H3A268C
-3A268C:lI105|H3A2740
-3A2740:lI111|H3A27FC
-3A27FC:lI110|H3A28B8
-3A28B8:lI47|H3A297C
-3A297C:lI120|H3A2A40
-3A2A40:lI45|H3A2B0C
-3A2B0C:lI98|H3A2BD0
-3A2BD0:lI99|H3A2C8C
-3A2C8C:lI112|H3A2D3C
-3A2D3C:lI105|H3A2DE4
-3A2DE4:lI111|N
-3A20E4:lI98|H3A2198
-3A2198:lI99|H3A2244
-3A2244:lI112|H3A22F8
-3A22F8:lI105|H3A23B4
-3A23B4:lI111|N
-3A203C:lH3A20F4|H3A2100
-3A20F4:t2:H3A21A8,H3A21B0
-3A21B0:lI97|H3A225C
-3A225C:lI112|H3A2310
-3A2310:lI112|H3A23C4
-3A23C4:lI108|H3A2478
-3A2478:lI105|H3A2524
-3A2524:lI99|H3A25E0
-3A25E0:lI97|H3A2694
-3A2694:lI116|H3A2748
-3A2748:lI105|H3A2804
-3A2804:lI111|H3A28C0
-3A28C0:lI110|H3A2984
-3A2984:lI47|H3A2A48
-3A2A48:lI114|H3A2B14
-3A2B14:lI116|H3A2BD8
-3A2BD8:lI102|N
-3A21A8:lI114|H3A2254
-3A2254:lI116|H3A2308
-3A2308:lI102|N
-3A2100:lH3A21B8|H3A21C4
-3A21B8:t2:H3A2264,H3A226C
-3A226C:lI97|H3A2320
-3A2320:lI112|H3A23D4
-3A23D4:lI112|H3A2480
-3A2480:lI108|H3A252C
-3A252C:lI105|H3A25E8
-3A25E8:lI99|H3A269C
-3A269C:lI97|H3A2750
-3A2750:lI116|H3A280C
-3A280C:lI105|H3A28C8
-3A28C8:lI111|H3A298C
-3A298C:lI110|H3A2A50
-3A2A50:lI47|H3A2B1C
-3A2B1C:lI112|H3A2BE0
-3A2BE0:lI111|H3A2C94
-3A2C94:lI119|H3A2D44
-3A2D44:lI101|H3A2DEC
-3A2DEC:lI114|H3A2E74
-3A2E74:lI112|H3A2EEC
-3A2EEC:lI111|H3A2F64
-3A2F64:lI105|H3A2FD4
-3A2FD4:lI110|H3A303C
-3A303C:lI116|N
-3A2264:lI112|H3A2318
-3A2318:lI112|H3A23CC
-3A23CC:lI116|N
-3A21C4:lH3A2274|H3A2280
-3A2274:t2:H3A2328,H3A2330
-3A2330:lI97|H3A23E4
-3A23E4:lI112|H3A2488
-3A2488:lI112|H3A2534
-3A2534:lI108|H3A25F0
-3A25F0:lI105|H3A26A4
-3A26A4:lI99|H3A2758
-3A2758:lI97|H3A2814
-3A2814:lI116|H3A28D0
-3A28D0:lI105|H3A2994
-3A2994:lI111|H3A2A58
-3A2A58:lI110|H3A2B24
-3A2B24:lI47|H3A2BE8
-3A2BE8:lI112|H3A2C9C
-3A2C9C:lI111|H3A2D4C
-3A2D4C:lI115|H3A2DF4
-3A2DF4:lI116|H3A2E7C
-3A2E7C:lI115|H3A2EF4
-3A2EF4:lI99|H3A2F6C
-3A2F6C:lI114|H3A2FDC
-3A2FDC:lI105|H3A3044
-3A3044:lI112|H3A30A4
-3A30A4:lI116|N
-3A2328:lI97|H3A23DC
-3A23DC:lI105|N
-3A2280:lH3A2338|H3A2344
-3A2338:t2:H3A23EC,H3A23F4
-3A23F4:lI97|H3A2498
-3A2498:lI112|H3A2544
-3A2544:lI112|H3A25F8
-3A25F8:lI108|H3A26AC
-3A26AC:lI105|H3A2760
-3A2760:lI99|H3A281C
-3A281C:lI97|H3A28D8
-3A28D8:lI116|H3A299C
-3A299C:lI105|H3A2A60
-3A2A60:lI111|H3A2B2C
-3A2B2C:lI110|H3A2BF0
-3A2BF0:lI47|H3A2CA4
-3A2CA4:lI112|H3A2D54
-3A2D54:lI111|H3A2DFC
-3A2DFC:lI115|H3A2E84
-3A2E84:lI116|H3A2EFC
-3A2EFC:lI115|H3A2F74
-3A2F74:lI99|H3A2FE4
-3A2FE4:lI114|H3A304C
-3A304C:lI105|H3A30AC
-3A30AC:lI112|H3A3104
-3A3104:lI116|N
-3A23EC:lI101|H3A2490
-3A2490:lI112|H3A253C
-3A253C:lI115|N
-3A2344:lH3A23FC|H3A2408
-3A23FC:t2:H3A24A0,H3A24A8
-3A24A8:lI97|H3A2554
-3A2554:lI112|H3A2600
-3A2600:lI112|H3A26B4
-3A26B4:lI108|H3A2768
-3A2768:lI105|H3A2824
-3A2824:lI99|H3A28E0
-3A28E0:lI97|H3A29A4
-3A29A4:lI116|H3A2A68
-3A2A68:lI105|H3A2B34
-3A2B34:lI111|H3A2BF8
-3A2BF8:lI110|H3A2CAC
-3A2CAC:lI47|H3A2D5C
-3A2D5C:lI112|H3A2E04
-3A2E04:lI111|H3A2E8C
-3A2E8C:lI115|H3A2F04
-3A2F04:lI116|H3A2F7C
-3A2F7C:lI115|H3A2FEC
-3A2FEC:lI99|H3A3054
-3A3054:lI114|H3A30B4
-3A30B4:lI105|H3A310C
-3A310C:lI112|H3A315C
-3A315C:lI116|N
-3A24A0:lI112|H3A254C
-3A254C:lI115|N
-3A2408:lH3A24B0|H3A24BC
-3A24B0:t2:H3A255C,H3A2564
-3A2564:lI97|H3A2610
-3A2610:lI112|H3A26C4
-3A26C4:lI112|H3A2770
-3A2770:lI108|H3A282C
-3A282C:lI105|H3A28E8
-3A28E8:lI99|H3A29AC
-3A29AC:lI97|H3A2A70
-3A2A70:lI116|H3A2B3C
-3A2B3C:lI105|H3A2C00
-3A2C00:lI111|H3A2CB4
-3A2CB4:lI110|H3A2D64
-3A2D64:lI47|H3A2E0C
-3A2E0C:lI112|H3A2E94
-3A2E94:lI100|H3A2F0C
-3A2F0C:lI102|N
-3A255C:lI112|H3A2608
-3A2608:lI100|H3A26BC
-3A26BC:lI102|N
-3A24BC:lH3A256C|H3A2578
-3A256C:t2:H3A2618,H3A2620
-3A2620:lI97|H3A26D4
-3A26D4:lI112|H3A2780
-3A2780:lI112|H3A2834
-3A2834:lI108|H3A28F0
-3A28F0:lI105|H3A29B4
-3A29B4:lI99|H3A2A78
-3A2A78:lI97|H3A2B44
-3A2B44:lI116|H3A2C08
-3A2C08:lI105|H3A2CBC
-3A2CBC:lI111|H3A2D6C
-3A2D6C:lI110|H3A2E14
-3A2E14:lI47|H3A2E9C
-3A2E9C:lI111|H3A2F14
-3A2F14:lI100|H3A2F84
-3A2F84:lI97|N
-3A2618:lI111|H3A26CC
-3A26CC:lI100|H3A2778
-3A2778:lI97|N
-3A2578:lH3A2628|H3A2634
-3A2628:t2:H3A26DC,H3A26E4
-3A26E4:lI97|H3A2790
-3A2790:lI112|H3A2844
-3A2844:lI112|H3A28F8
-3A28F8:lI108|H3A29BC
-3A29BC:lI105|H3A2A80
-3A2A80:lI99|H3A2B4C
-3A2B4C:lI97|H3A2C10
-3A2C10:lI116|H3A2CC4
-3A2CC4:lI105|H3A2D74
-3A2D74:lI111|H3A2E1C
-3A2E1C:lI110|H3A2EA4
-3A2EA4:lI47|H3A2F1C
-3A2F1C:lI111|H3A2F8C
-3A2F8C:lI99|H3A2FF4
-3A2FF4:lI116|H3A305C
-3A305C:lI101|H3A30BC
-3A30BC:lI116|H3A3114
-3A3114:lI45|H3A3164
-3A3164:lI115|H3A31AC
-3A31AC:lI116|H3A31F4
-3A31F4:lI114|H3A323C
-3A323C:lI101|H3A3284
-3A3284:lI97|H3A32CC
-3A32CC:lI109|N
-3A26DC:lI98|H3A2788
-3A2788:lI105|H3A283C
-3A283C:lI110|N
-3A2634:lH3A26EC|H3A26F8
-3A26EC:t2:H3A2798,H3A27A0
-3A27A0:lI97|H3A2854
-3A2854:lI112|H3A2908
-3A2908:lI112|H3A29C4
-3A29C4:lI108|H3A2A88
-3A2A88:lI105|H3A2B54
-3A2B54:lI99|H3A2C18
-3A2C18:lI97|H3A2CCC
-3A2CCC:lI116|H3A2D7C
-3A2D7C:lI105|H3A2E24
-3A2E24:lI111|H3A2EAC
-3A2EAC:lI110|H3A2F24
-3A2F24:lI47|H3A2F94
-3A2F94:lI111|H3A2FFC
-3A2FFC:lI99|H3A3064
-3A3064:lI116|H3A30C4
-3A30C4:lI101|H3A311C
-3A311C:lI116|H3A316C
-3A316C:lI45|H3A31B4
-3A31B4:lI115|H3A31FC
-3A31FC:lI116|H3A3244
-3A3244:lI114|H3A328C
-3A328C:lI101|H3A32D4
-3A32D4:lI97|H3A3314
-3A3314:lI109|N
-3A2798:lI100|H3A284C
-3A284C:lI109|H3A2900
-3A2900:lI115|N
-3A26F8:lH3A27A8|H3A27B4
-3A27A8:t2:H3A285C,H3A2864
-3A2864:lI97|H3A2918
-3A2918:lI112|H3A29D4
-3A29D4:lI112|H3A2A90
-3A2A90:lI108|H3A2B5C
-3A2B5C:lI105|H3A2C20
-3A2C20:lI99|H3A2CD4
-3A2CD4:lI97|H3A2D84
-3A2D84:lI116|H3A2E2C
-3A2E2C:lI105|H3A2EB4
-3A2EB4:lI111|H3A2F2C
-3A2F2C:lI110|H3A2F9C
-3A2F9C:lI47|H3A3004
-3A3004:lI111|H3A306C
-3A306C:lI99|H3A30CC
-3A30CC:lI116|H3A3124
-3A3124:lI101|H3A3174
-3A3174:lI116|H3A31BC
-3A31BC:lI45|H3A3204
-3A3204:lI115|H3A324C
-3A324C:lI116|H3A3294
-3A3294:lI114|H3A32DC
-3A32DC:lI101|H3A331C
-3A331C:lI97|H3A334C
-3A334C:lI109|N
-3A285C:lI108|H3A2910
-3A2910:lI104|H3A29CC
-3A29CC:lI97|N
-3A27B4:lH3A286C|H3A2878
-3A286C:t2:H3A2920,H3A2928
-3A2928:lI97|H3A29E4
-3A29E4:lI112|H3A2AA0
-3A2AA0:lI112|H3A2B64
-3A2B64:lI108|H3A2C28
-3A2C28:lI105|H3A2CDC
-3A2CDC:lI99|H3A2D8C
-3A2D8C:lI97|H3A2E34
-3A2E34:lI116|H3A2EBC
-3A2EBC:lI105|H3A2F34
-3A2F34:lI111|H3A2FA4
-3A2FA4:lI110|H3A300C
-3A300C:lI47|H3A3074
-3A3074:lI111|H3A30D4
-3A30D4:lI99|H3A312C
-3A312C:lI116|H3A317C
-3A317C:lI101|H3A31C4
-3A31C4:lI116|H3A320C
-3A320C:lI45|H3A3254
-3A3254:lI115|H3A329C
-3A329C:lI116|H3A32E4
-3A32E4:lI114|H3A3324
-3A3324:lI101|H3A3354
-3A3354:lI97|H3A337C
-3A337C:lI109|N
-3A2920:lI108|H3A29DC
-3A29DC:lI122|H3A2A98
-3A2A98:lI104|N
-3A2878:lH3A2930|H3A293C
-3A2930:t2:H3A29EC,H3A29F4
-3A29F4:lI97|H3A2AB0
-3A2AB0:lI112|H3A2B74
-3A2B74:lI112|H3A2C30
-3A2C30:lI108|H3A2CE4
-3A2CE4:lI105|H3A2D94
-3A2D94:lI99|H3A2E3C
-3A2E3C:lI97|H3A2EC4
-3A2EC4:lI116|H3A2F3C
-3A2F3C:lI105|H3A2FAC
-3A2FAC:lI111|H3A3014
-3A3014:lI110|H3A307C
-3A307C:lI47|H3A30DC
-3A30DC:lI111|H3A3134
-3A3134:lI99|H3A3184
-3A3184:lI116|H3A31CC
-3A31CC:lI101|H3A3214
-3A3214:lI116|H3A325C
-3A325C:lI45|H3A32A4
-3A32A4:lI115|H3A32EC
-3A32EC:lI116|H3A332C
-3A332C:lI114|H3A335C
-3A335C:lI101|H3A3384
-3A3384:lI97|H3A33A4
-3A33A4:lI109|N
-3A29EC:lI101|H3A2AA8
-3A2AA8:lI120|H3A2B6C
-3A2B6C:lI101|N
-3A293C:lH3A29FC|H3A2A08
-3A29FC:t2:H3A2AB8,H3A2AC0
-3A2AC0:lI97|H3A2B84
-3A2B84:lI112|H3A2C40
-3A2C40:lI112|H3A2CF4
-3A2CF4:lI108|H3A2DA4
-3A2DA4:lI105|H3A2E44
-3A2E44:lI99|H3A2ECC
-3A2ECC:lI97|H3A2F44
-3A2F44:lI116|H3A2FB4
-3A2FB4:lI105|H3A301C
-3A301C:lI111|H3A3084
-3A3084:lI110|H3A30E4
-3A30E4:lI47|H3A313C
-3A313C:lI111|H3A318C
-3A318C:lI99|H3A31D4
-3A31D4:lI116|H3A321C
-3A321C:lI101|H3A3264
-3A3264:lI116|H3A32AC
-3A32AC:lI45|H3A32F4
-3A32F4:lI115|H3A3334
-3A3334:lI116|H3A3364
-3A3364:lI114|H3A338C
-3A338C:lI101|H3A33AC
-3A33AC:lI97|H3A33C4
-3A33C4:lI109|N
-3A2AB8:lI99|H3A2B7C
-3A2B7C:lI108|H3A2C38
-3A2C38:lI97|H3A2CEC
-3A2CEC:lI115|H3A2D9C
-3A2D9C:lI115|N
-3A2A08:lH3A2AC8|H3A2AD4
-3A2AC8:t2:H3A2B8C,H3A2B94
-3A2B94:lI97|H3A2C50
-3A2C50:lI112|H3A2D04
-3A2D04:lI112|H3A2DAC
-3A2DAC:lI108|H3A2E4C
-3A2E4C:lI105|H3A2ED4
-3A2ED4:lI99|H3A2F4C
-3A2F4C:lI97|H3A2FBC
-3A2FBC:lI116|H3A3024
-3A3024:lI105|H3A308C
-3A308C:lI111|H3A30EC
-3A30EC:lI110|H3A3144
-3A3144:lI47|H3A3194
-3A3194:lI109|H3A31DC
-3A31DC:lI115|H3A3224
-3A3224:lI119|H3A326C
-3A326C:lI111|H3A32B4
-3A32B4:lI114|H3A32FC
-3A32FC:lI100|N
-3A2B8C:lI100|H3A2C48
-3A2C48:lI111|H3A2CFC
-3A2CFC:lI99|N
-3A2AD4:lH3A2B9C|H3A2BA8
-3A2B9C:t2:H3A2C58,H3A2C60
-3A2C60:lI97|H3A2D14
-3A2D14:lI112|H3A2DBC
-3A2DBC:lI112|H3A2E54
-3A2E54:lI108|H3A2EDC
-3A2EDC:lI105|H3A2F54
-3A2F54:lI99|H3A2FC4
-3A2FC4:lI97|H3A302C
-3A302C:lI116|H3A3094
-3A3094:lI105|H3A30F4
-3A30F4:lI111|H3A314C
-3A314C:lI110|H3A319C
-3A319C:lI47|H3A31E4
-3A31E4:lI109|H3A322C
-3A322C:lI97|H3A3274
-3A3274:lI99|H3A32BC
-3A32BC:lI45|H3A3304
-3A3304:lI99|H3A333C
-3A333C:lI111|H3A336C
-3A336C:lI109|H3A3394
-3A3394:lI112|H3A33B4
-3A33B4:lI97|H3A33CC
-3A33CC:lI99|H3A33DC
-3A33DC:lI116|H3A33EC
-3A33EC:lI112|H3A33FC
-3A33FC:lI114|H3A340C
-3A340C:lI111|N
-3A2C58:lI99|H3A2D0C
-3A2D0C:lI112|H3A2DB4
-3A2DB4:lI116|N
-3A2BA8:lH3A2C68|N
-3A2C68:t2:H3A2D1C,H3A2D24
-3A2D24:lI97|H3A2DCC
-3A2DCC:lI112|H3A2E64
-3A2E64:lI112|H3A2EE4
-3A2EE4:lI108|H3A2F5C
-3A2F5C:lI105|H3A2FCC
-3A2FCC:lI99|H3A3034
-3A3034:lI97|H3A309C
-3A309C:lI116|H3A30FC
-3A30FC:lI105|H3A3154
-3A3154:lI111|H3A31A4
-3A31A4:lI110|H3A31EC
-3A31EC:lI47|H3A3234
-3A3234:lI109|H3A327C
-3A327C:lI97|H3A32C4
-3A32C4:lI99|H3A330C
-3A330C:lI45|H3A3344
-3A3344:lI98|H3A3374
-3A3374:lI105|H3A339C
-3A339C:lI110|H3A33BC
-3A33BC:lI104|H3A33D4
-3A33D4:lI101|H3A33E4
-3A33E4:lI120|H3A33F4
-3A33F4:lI52|H3A3404
-3A3404:lI48|N
-3A2D1C:lI104|H3A2DC4
-3A2DC4:lI113|H3A2E5C
-3A2E5C:lI120|N
-39DC28:lH39DC68|H39DC74
-39DC68:t2:A4:port,I8888
-39DC74:lH39DCA8|H39DCB4
-39DCA8:t2:AC:bind_address,H39DCF8
-39DCF8:t4:I127,I0,I0,I1
-39DCB4:lH39DD0C|H39DD18
-39DD0C:t2:AB:server_name,H39DD6C
-39DD6C:lI108|H39DDE4
-39DDE4:lI111|H39DE5C
-39DE5C:lI99|H39DEE4
-39DEE4:lI97|H39DF6C
-39DF6C:lI108|H39E00C
-39E00C:lI104|H39E0B4
-39E0B4:lI111|H39E16C
-39E16C:lI115|H39E238
-39E238:lI116|N
-39DD18:lH39DD74|H39DD80
-39DD74:t2:AE:max_header_siz,I1024
-39DD80:lH39DDEC|H39DDF8
-39DDEC:t2:A11:max_header_action,A8:reply414
-39DDF8:lH39DE64|H39DE70
-39DE64:t2:A8:com_type,A7:ip_comm
-39DE70:lH39DEEC|H39DEF8
-39DEEC:t2:A7:modules,H39DF74
-39DF74:lA9:mod_alias|H39E014
-39E014:lA8:mod_auth|H39E0BC
-39E0BC:lA7:mod_esi|H39E174
-39E174:lAB:mod_actions|H39E240
-39E240:lA7:mod_cgi|H39E324
-39E324:lAB:mod_include|H39E418
-39E418:lA7:mod_dir|H39E51C
-39E51C:lA7:mod_get|H39E634
-39E634:lA8:mod_head|H39E748
-39E748:lA7:mod_log|H39E85C
-39E85C:lAC:mod_disk_log|N
-39DEF8:lH39DF7C|H39DF88
-39DF7C:t2:AF:directory_index,H39E01C
-39E01C:lH39E0C4|N
-39E0C4:lI105|H39E17C
-39E17C:lI110|H39E248
-39E248:lI100|H39E32C
-39E32C:lI101|H39E420
-39E420:lI120|H39E524
-39E524:lI46|H39E63C
-39E63C:lI104|H39E750
-39E750:lI116|H39E864
-39E864:lI109|H39E978
-39E978:lI108|N
-39DF88:lH39E024|H39E030
-39E024:t2:AC:default_type,H39E0CC
-39E0CC:lI116|H39E184
-39E184:lI101|H39E250
-39E250:lI120|H39E334
-39E334:lI116|H39E428
-39E428:lI47|H39E52C
-39E52C:lI112|H39E644
-39E644:lI108|H39E758
-39E758:lI97|H39E86C
-39E86C:lI105|H39E980
-39E980:lI110|N
-39E030:lH39E0D4|H39E0E0
-39E0D4:t2:A10:erl_script_alias,H39E18C
-39E18C:t2:H39E258,H39E260
-39E260:lH39E344|N
-39E344:lI119|H39E438
-39E438:lI101|H39E53C
-39E53C:lI98|H39E654
-39E654:lI116|H39E768
-39E768:lI111|H39E87C
-39E87C:lI111|H39E990
-39E990:lI108|N
-39E258:lI47|H39E33C
-39E33C:lI119|H39E430
-39E430:lI101|H39E534
-39E534:lI98|H39E64C
-39E64C:lI116|H39E760
-39E760:lI111|H39E874
-39E874:lI111|H39E988
-39E988:lI108|N
-39E0E0:lH39E198|H39E1A4
-39E198:t2:A5:alias,H39E268
-39E268:t2:H39E34C,H39E354
-39E354:lI47|H39E448
-39E448:lI99|H39E54C
-39E54C:lI108|H39E664
-39E664:lI101|H39E778
-39E778:lI97|H39E88C
-39E88C:lI114|H39E9A0
-39E9A0:lI99|H39EA94
-39EA94:lI97|H39EB88
-39EB88:lI115|H39EC7C
-39EC7C:lI101|H39ED70
-39ED70:lI47|H39EE4C
-39EE4C:lI111|H39EF20
-39EF20:lI116|H39EFFC
-39EFFC:lI112|H39F0E0
-39F0E0:lI47|H39F1B4
-39F1B4:lI101|H39F288
-39F288:lI114|H39F344
-39F344:lI116|H39F408
-39F408:lI115|H39F4D4
-39F4D4:lI47|H39F5A8
-39F5A8:lI108|H39F67C
-39F67C:lI105|H39F750
-39F750:lI98|H39F824
-39F824:lI47|H39F908
-39F908:lI111|H39F9E4
-39F9E4:lI98|H39FAC0
-39FAC0:lI115|H39FB9C
-39FB9C:lI101|H39FC68
-39FC68:lI114|H39FD2C
-39FD2C:lI118|H39FDF8
-39FDF8:lI101|H39FEB4
-39FEB4:lI114|H39FF70
-39FF70:lI47|H3A0024
-3A0024:lI112|H3A00D8
-3A00D8:lI114|H3A0184
-3A0184:lI105|H3A0238
-3A0238:lI118|H3A02F4
-3A02F4:lI47|H3A03A8
-3A03A8:lI99|H3A0444
-3A0444:lI114|H3A04E8
-3A04E8:lI97|H3A058C
-3A058C:lI115|H3A0638
-3A0638:lI104|H3A06EC
-3A06EC:lI100|H3A0798
-3A0798:lI117|H3A083C
-3A083C:lI109|H3A08C8
-3A08C8:lI112|H3A095C
-3A095C:lI95|H3A09F0
-3A09F0:lI118|H3A0A8C
-3A0A8C:lI105|H3A0B38
-3A0B38:lI101|H3A0BE4
-3A0BE4:lI119|H3A0CA0
-3A0CA0:lI101|H3A0D5C
-3A0D5C:lI114|N
-39E34C:lI47|H39E440
-39E440:lI99|H39E544
-39E544:lI114|H39E65C
-39E65C:lI97|H39E770
-39E770:lI115|H39E884
-39E884:lI104|H39E998
-39E998:lI100|H39EA8C
-39EA8C:lI117|H39EB80
-39EB80:lI109|H39EC74
-39EC74:lI112|H39ED68
-39ED68:lI95|H39EE44
-39EE44:lI118|H39EF18
-39EF18:lI105|H39EFF4
-39EFF4:lI101|H39F0D8
-39F0D8:lI119|H39F1AC
-39F1AC:lI101|H39F280
-39F280:lI114|N
-39E1A4:lH39E274|H39E280
-39E274:t2:A5:alias,H39E35C
-39E35C:t2:H39E450,H39E458
-39E458:lI47|H39E55C
-39E55C:lI99|H39E674
-39E674:lI108|H39E788
-39E788:lI101|H39E89C
-39E89C:lI97|H39E9B0
-39E9B0:lI114|H39EAA4
-39EAA4:lI99|H39EB98
-39EB98:lI97|H39EC8C
-39EC8C:lI115|H39ED80
-39ED80:lI101|H39EE5C
-39EE5C:lI47|H39EF30
-39EF30:lI111|H39F00C
-39F00C:lI116|H39F0F0
-39F0F0:lI112|H39F1C4
-39F1C4:lI47|H39F298
-39F298:lI101|H39F354
-39F354:lI114|H39F418
-39F418:lI116|H39F4E4
-39F4E4:lI115|H39F5B0
-39F5B0:lI47|H39F684
-39F684:lI101|H39F758
-39F758:lI114|H39F82C
-39F82C:lI116|H39F910
-39F910:lI115|H39F9EC
-39F9EC:lI47|H39FAC8
-39FAC8:lI100|H39FBA4
-39FBA4:lI111|H39FC70
-39FC70:lI99|H39FD34
-39FD34:lI47|H39FE00
-39FE00:lI104|H39FEBC
-39FEBC:lI116|H39FF78
-39FF78:lI109|H3A002C
-3A002C:lI108|N
-39E450:lI47|H39E554
-39E554:lI99|H39E66C
-39E66C:lI114|H39E780
-39E780:lI97|H39E894
-39E894:lI115|H39E9A8
-39E9A8:lI104|H39EA9C
-39EA9C:lI100|H39EB90
-39EB90:lI117|H39EC84
-39EC84:lI109|H39ED78
-39ED78:lI112|H39EE54
-39EE54:lI95|H39EF28
-39EF28:lI101|H39F004
-39F004:lI114|H39F0E8
-39F0E8:lI116|H39F1BC
-39F1BC:lI115|H39F290
-39F290:lI95|H39F34C
-39F34C:lI100|H39F410
-39F410:lI111|H39F4DC
-39F4DC:lI99|N
-39E280:lH39E368|H39E374
-39E368:t2:A5:alias,H39E460
-39E460:t2:H39E564,H39E56C
-39E56C:lI47|H39E684
-39E684:lI99|H39E798
-39E798:lI108|H39E8AC
-39E8AC:lI101|H39E9C0
-39E9C0:lI97|H39EAB4
-39EAB4:lI114|H39EBA8
-39EBA8:lI99|H39EC9C
-39EC9C:lI97|H39ED90
-39ED90:lI115|H39EE6C
-39EE6C:lI101|H39EF40
-39EF40:lI47|H39F01C
-39F01C:lI111|H39F100
-39F100:lI116|H39F1D4
-39F1D4:lI112|H39F2A0
-39F2A0:lI47|H39F35C
-39F35C:lI101|H39F420
-39F420:lI114|H39F4EC
-39F4EC:lI116|H39F5B8
-39F5B8:lI115|H39F68C
-39F68C:lI47|H39F760
-39F760:lI108|H39F834
-39F834:lI105|H39F918
-39F918:lI98|H39F9F4
-39F9F4:lI47|H39FAD0
-39FAD0:lI111|H39FBAC
-39FBAC:lI98|H39FC78
-39FC78:lI115|H39FD3C
-39FD3C:lI101|H39FE08
-39FE08:lI114|H39FEC4
-39FEC4:lI118|H39FF80
-39FF80:lI101|H3A0034
-3A0034:lI114|H3A00E0
-3A00E0:lI47|H3A018C
-3A018C:lI100|H3A0240
-3A0240:lI111|H3A02FC
-3A02FC:lI99|H3A03B0
-3A03B0:lI47|H3A044C
-3A044C:lI104|H3A04F0
-3A04F0:lI116|H3A0594
-3A0594:lI109|H3A0640
-3A0640:lI108|N
-39E564:lI47|H39E67C
-39E67C:lI99|H39E790
-39E790:lI114|H39E8A4
-39E8A4:lI97|H39E9B8
-39E9B8:lI115|H39EAAC
-39EAAC:lI104|H39EBA0
-39EBA0:lI100|H39EC94
-39EC94:lI117|H39ED88
-39ED88:lI109|H39EE64
-39EE64:lI112|H39EF38
-39EF38:lI95|H39F014
-39F014:lI100|H39F0F8
-39F0F8:lI111|H39F1CC
-39F1CC:lI99|N
-39E374:lH39E46C|N
-39E46C:t2:A10:erl_script_alias,H39E574
-39E574:t2:H39E68C,H39E694
-39E694:lH39E7A8|N
-39E7A8:lI99|H39E8BC
-39E8BC:lI114|H39E9D0
-39E9D0:lI97|H39EAC4
-39EAC4:lI115|H39EBB8
-39EBB8:lI104|H39ECAC
-39ECAC:lI100|H39EDA0
-39EDA0:lI117|H39EE74
-39EE74:lI109|H39EF48
-39EF48:lI112|H39F024
-39F024:lI95|H39F108
-39F108:lI118|H39F1DC
-39F1DC:lI105|H39F2A8
-39F2A8:lI101|H39F364
-39F364:lI119|H39F428
-39F428:lI101|H39F4F4
-39F4F4:lI114|N
-39E68C:lI47|H39E7A0
-39E7A0:lI99|H39E8B4
-39E8B4:lI100|H39E9C8
-39E9C8:lI118|H39EABC
-39EABC:lI95|H39EBB0
-39EBB0:lI101|H39ECA4
-39ECA4:lI114|H39ED98
-39ED98:lI108|N
-39DB58:lN|H39DB9C
-39DB9C:lH39D9FC|H39DBEC
-39D9FC:t4:I127,I0,I0,I1
-39DBEC:lI8888|N
-3A3E20:lH3A3DFC|H3A3704
-3A3DFC:t8:A5:child,P<0.46.0>,H39DAC8,H39DAD8,A9:permanent,I2000,A6:worker,H39DAE8
-39DAE8:lAD:httpd_manager|H39DB38
-39DB38:lAA:gen_server|N
-39DAD8:t3:AD:httpd_manager,AA:start_link,H39DB30
-39DB30:lA9:undefined|H39DB78
-39DB78:lH39DB50|H39DBC0
-39DBC0:lN|N
-39DAC8:t3:AD:httpd_manager,H39D9FC,I8888
-3A3704:lH3A36E0|H39D998
-3A36E0:t8:A5:child,P<0.45.0>,H39DA18,H39DA28,A9:permanent,I2000,AA:supervisor,H39DA38
-39DA38:lAE:httpd_misc_sup|H39DAC0
-39DAC0:lAA:supervisor|N
-39DA28:t3:AE:httpd_misc_sup,A5:start,H39D958
-39D958:lH39D9FC|H39DA10
-39DA10:lI8888|H39DAB8
-39DAB8:lA7:silence|N
-39DA18:t3:AE:httpd_misc_sup,H39D9FC,I8888
-39D998:lH39DA64|N
-39DA64:t8:A5:child,P<0.44.0>,H39DAF0,H39DB00,A9:permanent,I2000,AA:supervisor,H39DB10
-39DB10:lA12:httpd_acceptor_sup|H39DB48
-39DB48:lAA:supervisor|N
-39DB00:t3:A12:httpd_acceptor_sup,A5:start,H39DB40
-39DB40:lH39D9FC|H39DB80
-39DB80:lI8888|H39DBC8
-39DBC8:lA7:silence|N
-39DAF0:t3:A12:httpd_acceptor_sup,H39D9FC,I8888
-39D960:t2:A5:local,A1A:httpd_sup__127_0_0_1__8888
-39D9CC:lAA:gen_server|H39DA90
-39DA90:lP<0.33.0>|H39DB20
-39DB20:lP<0.33.0>|H39DB60
-39DB60:lH39DBA4|H39DBB0
-39DBA4:t2:A5:local,A1A:httpd_sup__127_0_0_1__8888
-39DBB0:lAA:supervisor|H39DBF4
-39DBF4:lH39DC30|H39DC40
-39DC30:t3:H39D960,A9:httpd_sup,H39DA88
-39DC40:lN|N
-39D940:t2:AD:$initial_call,H39D9E4
-39D9E4:t3:A3:gen,A7:init_it,H39D9CC
-39D94C:t2:AA:$ancestors,H39D9F4
-39D9F4:lA8:web_tool|H39DAB0
-39DAB0:lP<0.27.0>|N
-=proc_dictionary:<0.44.0>
-H3756A8
-H3756B4
-H3756C0
-H3756CC
-=proc_stack:<0.44.0>
-36c194:SReturn addr 0x225860 (proc_lib:init_p/5 + 164)
-y0:N
-y1:A8:infinity
-y2:AA:supervisor
-y3:H36C030
-y4:A1E:httpd_acc_sup__127_0_0_1__8888
-y5:P<0.43.0>
-36c1b0:SReturn addr 0x156F90 (<terminate process normally>)
-y0:SCatch 0x225860 (proc_lib:init_p/5 + 164)
-y1:A3:gen
-y2:A7:init_it
-y3:H375710
-=proc_heap:<0.44.0>
-36C030:tA:A5:state,H3756D8,AB:one_for_one,H36C028,N,I500,I100,N,A12:httpd_acceptor_sup,H375730
-375730:lA7:silence|N
-36C028:lH36C004|N
-36C004:t8:A5:child,P<0.47.0>,H36BE80,H36BE90,A9:permanent,I1000,A6:worker,H36BEA0
-36BEA0:lAE:httpd_acceptor|N
-36BE90:t3:AE:httpd_acceptor,AA:start_link,H36BEE8
-36BEE8:lP<0.46.0>|H36BEF0
-36BEF0:lA7:ip_comm|H36BEF8
-36BEF8:lH36BF00|H36BF14
-36BF00:t4:I127,I0,I0,I1
-36BF14:lI8888|H36BF1C
-36BF1C:lA1B:httpd_conf__127_0_0_1__8888|H36BF24
-36BF24:lA7:silence|N
-36BE80:t3:AE:httpd_acceptor,H36BED4,I8888
-36BED4:t4:I127,I0,I0,I1
-3756D8:t2:A5:local,A1E:httpd_acc_sup__127_0_0_1__8888
-375710:lAA:gen_server|H375738
-375738:lP<0.43.0>|H375748
-375748:lP<0.43.0>|H375758
-375758:lH375760|H37576C
-375760:t2:A5:local,A1E:httpd_acc_sup__127_0_0_1__8888
-37576C:lAA:supervisor|H375774
-375774:lH37577C|H37578C
-37577C:t3:H3756D8,A12:httpd_acceptor_sup,H375730
-37578C:lN|N
-3756A8:t2:AD:$initial_call,H375718
-375718:t3:A3:gen,A7:init_it,H375710
-3756B4:t2:A9:verbosity,A7:silence
-3756C0:t2:AA:$ancestors,H375728
-375728:lA1A:httpd_sup__127_0_0_1__8888|H375740
-375740:lA8:web_tool|H375750
-375750:lP<0.27.0>|N
-3756CC:t2:A5:sname,A7:acc_sup
-=proc_dictionary:<0.45.0>
-H36F484
-H36F4F4
-H36F468
-H36F500
-=proc_stack:<0.45.0>
-36f734:SReturn addr 0x225860 (proc_lib:init_p/5 + 164)
-y0:N
-y1:A8:infinity
-y2:AA:supervisor
-y3:H36F5D0
-y4:A1F:httpd_misc_sup__127_0_0_1__8888
-y5:P<0.43.0>
-36f750:SReturn addr 0x156F90 (<terminate process normally>)
-y0:SCatch 0x225860 (proc_lib:init_p/5 + 164)
-y1:A3:gen
-y2:A7:init_it
-y3:H36F430
-=proc_heap:<0.45.0>
-36F5D0:tA:A5:state,H36F3FC,AB:one_for_one,N,N,I0,I1,N,AE:httpd_misc_sup,H36F408
-36F408:lA7:silence|N
-36F3FC:t2:A5:local,A1F:httpd_misc_sup__127_0_0_1__8888
-36F430:lAA:gen_server|H36F428
-36F428:lP<0.43.0>|H36F420
-36F420:lP<0.43.0>|H36F3D0
-36F3D0:lH36F3E0|H36F418
-36F3E0:t2:A5:local,A1F:httpd_misc_sup__127_0_0_1__8888
-36F418:lAA:supervisor|H36F3D8
-36F3D8:lH36F3EC|H36F410
-36F3EC:t3:H36F3FC,AE:httpd_misc_sup,H36F408
-36F410:lN|N
-36F484:t2:AD:$initial_call,H36F474
-36F474:t3:A3:gen,A7:init_it,H36F430
-36F4F4:t2:A9:verbosity,A7:silence
-36F468:t2:AA:$ancestors,H36F460
-36F460:lA1A:httpd_sup__127_0_0_1__8888|H36F440
-36F440:lA8:web_tool|H36F438
-36F438:lP<0.27.0>|N
-36F500:t2:A5:sname,A8:misc_sup
-=proc_dictionary:<0.46.0>
-H3BDA50
-H3BDA5C
-H3BDAC8
-H3BDB28
-H3BDB9C
-H3BDC00
-H3BDADC
-H3BDB3C
-=proc_stack:<0.46.0>
-39d8f4:SReturn addr 0x225860 (proc_lib:init_p/5 + 164)
-y0:N
-y1:A8:infinity
-y2:AD:httpd_manager
-y3:H39D5A4
-y4:A16:httpd__127_0_0_1__8888
-y5:P<0.43.0>
-39d910:SReturn addr 0x156F90 (<terminate process normally>)
-y0:SCatch 0x225860 (proc_lib:init_p/5 + 164)
-y1:A3:gen
-y2:A7:init_it
-y3:H3BDAB0
-=proc_heap:<0.46.0>
-39D5A4:t9:A5:state,A7:ip_comm,A9:undefined,A1B:httpd_conf__127_0_0_1__8888,N,A9:unblocked,A9:undefined,A9:undefined,H39D430
-39D430:lH39BF40|H39D428
-39BF40:t2:A8:max_conn,I1
-39D428:lH39BC80|H39D420
-39BC80:t2:AF:last_heavy_load,A5:never
-39D420:lH39D414|N
-39D414:t2:AF:last_connection,H39D408
-39D408:t2:H39D3E8,H39D3F8
-39D3F8:t3:I11,I22,I34
-39D3E8:t3:I2004,I4,I21
-3BDAB0:lAA:gen_server|H3BDB20
-3BDB20:lP<0.43.0>|H3BDB94
-3BDB94:lP<0.43.0>|H3BDBF8
-3BDBF8:lH3BDC48|H3BDC54
-3BDC48:t2:A5:local,A16:httpd__127_0_0_1__8888
-3BDC54:lAD:httpd_manager|H3BDCAC
-3BDCAC:lH3BDD14|H3BDD1C
-3BDD14:lA9:undefined|H3BDD9C
-3BDD9C:lH3BDA84|H3BDE2C
-3BDA84:lH3BDAF0|H3BDAFC
-3BDAF0:t2:AB:server_root,H3BDB48
-3BDB48:lI47|H3BDBB0
-3BDBB0:lI99|H3BDC0C
-3BDC0C:lI108|H3BDC64
-3BDC64:lI101|H3BDCBC
-3BDCBC:lI97|H3BDD2C
-3BDD2C:lI114|H3BDDA4
-3BDDA4:lI99|H3BDE34
-3BDE34:lI97|H3BDED4
-3BDED4:lI115|H3BDF90
-3BDF90:lI101|H3BE054
-3BE054:lI47|H3BE128
-3BE128:lI111|H3BE204
-3BE204:lI116|H3BE2EC
-3BE2EC:lI112|H3BE3E0
-3BE3E0:lI47|H3BE4E4
-3BE4E4:lI101|H3BE5E8
-3BE5E8:lI114|H3BE6EC
-3BE6EC:lI116|H3BE7E0
-3BE7E0:lI115|H3BE8CC
-3BE8CC:lI47|H3BE9B8
-3BE9B8:lI108|H3BEAAC
-3BEAAC:lI105|H3BEB98
-3BEB98:lI98|H3BEC84
-3BEC84:lI47|H3BED70
-3BED70:lI119|H3BEE5C
-3BEE5C:lI101|H3BEF30
-3BEF30:lI98|H3BEFFC
-3BEFFC:lI116|H3BF0C8
-3BF0C8:lI111|H3BF19C
-3BF19C:lI111|H3BF260
-3BF260:lI108|H3BF314
-3BF314:lI47|H3BF3C0
-3BF3C0:lI112|H3BF474
-3BF474:lI114|H3BF530
-3BF530:lI105|H3BF5F4
-3BF5F4:lI118|H3BF6C8
-3BF6C8:lI47|H3BF79C
-3BF79C:lI114|H3BF870
-3BF870:lI111|H3BF954
-3BF954:lI111|H3BFA30
-3BFA30:lI116|N
-3BDAFC:lH3BDB50|H3BDB5C
-3BDB50:t2:AD:document_root,H3BDBB8
-3BDBB8:lI47|H3BDC14
-3BDC14:lI99|H3BDC6C
-3BDC6C:lI108|H3BDCC4
-3BDCC4:lI101|H3BDD34
-3BDD34:lI97|H3BDDAC
-3BDDAC:lI114|H3BDE3C
-3BDE3C:lI99|H3BDEDC
-3BDEDC:lI97|H3BDF98
-3BDF98:lI115|H3BE05C
-3BE05C:lI101|H3BE130
-3BE130:lI47|H3BE20C
-3BE20C:lI111|H3BE2F4
-3BE2F4:lI116|H3BE3E8
-3BE3E8:lI112|H3BE4EC
-3BE4EC:lI47|H3BE5F0
-3BE5F0:lI101|H3BE6F4
-3BE6F4:lI114|H3BE7E8
-3BE7E8:lI116|H3BE8D4
-3BE8D4:lI115|H3BE9C0
-3BE9C0:lI47|H3BEAB4
-3BEAB4:lI108|H3BEBA0
-3BEBA0:lI105|H3BEC8C
-3BEC8C:lI98|H3BED78
-3BED78:lI47|H3BEE64
-3BEE64:lI119|H3BEF38
-3BEF38:lI101|H3BF004
-3BF004:lI98|H3BF0D0
-3BF0D0:lI116|H3BF1A4
-3BF1A4:lI111|H3BF268
-3BF268:lI111|H3BF31C
-3BF31C:lI108|H3BF3C8
-3BF3C8:lI47|H3BF47C
-3BF47C:lI112|H3BF538
-3BF538:lI114|H3BF5FC
-3BF5FC:lI105|H3BF6D0
-3BF6D0:lI118|H3BF7A4
-3BF7A4:lI47|H3BF878
-3BF878:lI114|H3BF95C
-3BF95C:lI111|H3BFA38
-3BFA38:lI111|H3BFB0C
-3BFB0C:lI116|H3BFBE8
-3BFBE8:lI47|H3BFCB4
-3BFCB4:lI100|H3BFD78
-3BFD78:lI111|H3BFE3C
-3BFE3C:lI99|N
-3BDB5C:lH3BDBC0|H3BDBCC
-3BDBC0:t2:AA:mime_types,H3BDC1C
-3BDC1C:lH3BDC74|H3BDC80
-3BDC74:t2:H3BDCCC,H3BDCD4
-3BDCD4:lI120|H3BDD44
-3BDD44:lI45|H3BDDBC
-3BDDBC:lI119|H3BDE44
-3BDE44:lI111|H3BDEE4
-3BDEE4:lI114|H3BDFA0
-3BDFA0:lI108|H3BE064
-3BE064:lI100|H3BE138
-3BE138:lI47|H3BE214
-3BE214:lI120|H3BE2FC
-3BE2FC:lI45|H3BE3F0
-3BE3F0:lI118|H3BE4F4
-3BE4F4:lI114|H3BE5F8
-3BE5F8:lI109|H3BE6FC
-3BE6FC:lI108|N
-3BDCCC:lI119|H3BDD3C
-3BDD3C:lI114|H3BDDB4
-3BDDB4:lI108|N
-3BDC80:lH3BDCDC|H3BDCE8
-3BDCDC:t2:H3BDD4C,H3BDD54
-3BDD54:lI120|H3BDDCC
-3BDDCC:lI45|H3BDE54
-3BDE54:lI119|H3BDEF4
-3BDEF4:lI111|H3BDFA8
-3BDFA8:lI114|H3BE06C
-3BE06C:lI108|H3BE140
-3BE140:lI100|H3BE21C
-3BE21C:lI47|H3BE304
-3BE304:lI120|H3BE3F8
-3BE3F8:lI45|H3BE4FC
-3BE4FC:lI118|H3BE600
-3BE600:lI114|H3BE704
-3BE704:lI109|H3BE7F0
-3BE7F0:lI108|N
-3BDD4C:lI118|H3BDDC4
-3BDDC4:lI114|H3BDE4C
-3BDE4C:lI109|H3BDEEC
-3BDEEC:lI108|N
-3BDCE8:lH3BDD5C|H3BDD68
-3BDD5C:t2:H3BDDD4,H3BDDDC
-3BDDDC:lI120|H3BDE64
-3BDE64:lI45|H3BDF04
-3BDF04:lI99|H3BDFB0
-3BDFB0:lI111|H3BE074
-3BE074:lI110|H3BE148
-3BE148:lI102|H3BE224
-3BE224:lI101|H3BE30C
-3BE30C:lI114|H3BE400
-3BE400:lI101|H3BE504
-3BE504:lI110|H3BE608
-3BE608:lI99|H3BE70C
-3BE70C:lI101|H3BE7F8
-3BE7F8:lI47|H3BE8DC
-3BE8DC:lI120|H3BE9C8
-3BE9C8:lI45|H3BEABC
-3BEABC:lI99|H3BEBA8
-3BEBA8:lI111|H3BEC94
-3BEC94:lI111|H3BED80
-3BED80:lI108|H3BEE6C
-3BEE6C:lI116|H3BEF40
-3BEF40:lI97|H3BF00C
-3BF00C:lI108|H3BF0D8
-3BF0D8:lI107|N
-3BDDD4:lI105|H3BDE5C
-3BDE5C:lI99|H3BDEFC
-3BDEFC:lI101|N
-3BDD68:lH3BDDE4|H3BDDF0
-3BDDE4:t2:H3BDE6C,H3BDE74
-3BDE74:lI118|H3BDF14
-3BDF14:lI105|H3BDFC0
-3BDFC0:lI100|H3BE084
-3BE084:lI101|H3BE158
-3BE158:lI111|H3BE22C
-3BE22C:lI47|H3BE314
-3BE314:lI120|H3BE408
-3BE408:lI45|H3BE50C
-3BE50C:lI115|H3BE610
-3BE610:lI103|H3BE714
-3BE714:lI105|H3BE800
-3BE800:lI45|H3BE8E4
-3BE8E4:lI109|H3BE9D0
-3BE9D0:lI111|H3BEAC4
-3BEAC4:lI118|H3BEBB0
-3BEBB0:lI105|H3BEC9C
-3BEC9C:lI101|N
-3BDE6C:lI109|H3BDF0C
-3BDF0C:lI111|H3BDFB8
-3BDFB8:lI118|H3BE07C
-3BE07C:lI105|H3BE150
-3BE150:lI101|N
-3BDDF0:lH3BDE7C|H3BDE88
-3BDE7C:t2:H3BDF1C,H3BDF24
-3BDF24:lI118|H3BDFD0
-3BDFD0:lI105|H3BE094
-3BE094:lI100|H3BE160
-3BE160:lI101|H3BE234
-3BE234:lI111|H3BE31C
-3BE31C:lI47|H3BE410
-3BE410:lI120|H3BE514
-3BE514:lI45|H3BE618
-3BE618:lI109|H3BE71C
-3BE71C:lI115|H3BE808
-3BE808:lI118|H3BE8EC
-3BE8EC:lI105|H3BE9D8
-3BE9D8:lI100|H3BEACC
-3BEACC:lI101|H3BEBB8
-3BEBB8:lI111|N
-3BDF1C:lI97|H3BDFC8
-3BDFC8:lI118|H3BE08C
-3BE08C:lI105|N
-3BDE88:lH3BDF2C|H3BDF38
-3BDF2C:t2:H3BDFD8,H3BDFE0
-3BDFE0:lI118|H3BE0A4
-3BE0A4:lI105|H3BE168
-3BE168:lI100|H3BE23C
-3BE23C:lI101|H3BE324
-3BE324:lI111|H3BE418
-3BE418:lI47|H3BE51C
-3BE51C:lI113|H3BE620
-3BE620:lI117|H3BE724
-3BE724:lI105|H3BE810
-3BE810:lI99|H3BE8F4
-3BE8F4:lI107|H3BE9E0
-3BE9E0:lI116|H3BEAD4
-3BEAD4:lI105|H3BEBC0
-3BEBC0:lI109|H3BECA4
-3BECA4:lI101|N
-3BDFD8:lI113|H3BE09C
-3BE09C:lI116|N
-3BDF38:lH3BDFE8|H3BDFF4
-3BDFE8:t2:H3BE0AC,H3BE0B4
-3BE0B4:lI118|H3BE178
-3BE178:lI105|H3BE24C
-3BE24C:lI100|H3BE32C
-3BE32C:lI101|H3BE420
-3BE420:lI111|H3BE524
-3BE524:lI47|H3BE628
-3BE628:lI113|H3BE72C
-3BE72C:lI117|H3BE818
-3BE818:lI105|H3BE8FC
-3BE8FC:lI99|H3BE9E8
-3BE9E8:lI107|H3BEADC
-3BEADC:lI116|H3BEBC8
-3BEBC8:lI105|H3BECAC
-3BECAC:lI109|H3BED88
-3BED88:lI101|N
-3BE0AC:lI109|H3BE170
-3BE170:lI111|H3BE244
-3BE244:lI118|N
-3BDFF4:lH3BE0BC|H3BE0C8
-3BE0BC:t2:H3BE180,H3BE188
-3BE188:lI118|H3BE25C
-3BE25C:lI105|H3BE33C
-3BE33C:lI100|H3BE430
-3BE430:lI101|H3BE52C
-3BE52C:lI111|H3BE630
-3BE630:lI47|H3BE734
-3BE734:lI109|H3BE820
-3BE820:lI112|H3BE904
-3BE904:lI101|H3BE9F0
-3BE9F0:lI103|N
-3BE180:lI109|H3BE254
-3BE254:lI112|H3BE334
-3BE334:lI101|H3BE428
-3BE428:lI103|N
-3BE0C8:lH3BE190|H3BE19C
-3BE190:t2:H3BE264,H3BE26C
-3BE26C:lI118|H3BE34C
-3BE34C:lI105|H3BE440
-3BE440:lI100|H3BE534
-3BE534:lI101|H3BE638
-3BE638:lI111|H3BE73C
-3BE73C:lI47|H3BE828
-3BE828:lI109|H3BE90C
-3BE90C:lI112|H3BE9F8
-3BE9F8:lI101|H3BEAE4
-3BEAE4:lI103|N
-3BE264:lI109|H3BE344
-3BE344:lI112|H3BE438
-3BE438:lI103|N
-3BE19C:lH3BE274|H3BE280
-3BE274:t2:H3BE354,H3BE35C
-3BE35C:lI118|H3BE450
-3BE450:lI105|H3BE544
-3BE544:lI100|H3BE640
-3BE640:lI101|H3BE744
-3BE744:lI111|H3BE830
-3BE830:lI47|H3BE914
-3BE914:lI109|H3BEA00
-3BEA00:lI112|H3BEAEC
-3BEAEC:lI101|H3BEBD0
-3BEBD0:lI103|N
-3BE354:lI109|H3BE448
-3BE448:lI112|H3BE53C
-3BE53C:lI101|N
-3BE280:lH3BE364|H3BE370
-3BE364:t2:H3BE458,H3BE460
-3BE460:lI116|H3BE554
-3BE554:lI101|H3BE650
-3BE650:lI120|H3BE754
-3BE754:lI116|H3BE838
-3BE838:lI47|H3BE91C
-3BE91C:lI120|H3BEA08
-3BEA08:lI45|H3BEAF4
-3BEAF4:lI115|H3BEBD8
-3BEBD8:lI103|H3BECB4
-3BECB4:lI109|H3BED90
-3BED90:lI108|N
-3BE458:lI115|H3BE54C
-3BE54C:lI103|H3BE648
-3BE648:lI109|H3BE74C
-3BE74C:lI108|N
-3BE370:lH3BE468|H3BE474
-3BE468:t2:H3BE55C,H3BE564
-3BE564:lI116|H3BE660
-3BE660:lI101|H3BE764
-3BE764:lI120|H3BE840
-3BE840:lI116|H3BE924
-3BE924:lI47|H3BEA10
-3BEA10:lI120|H3BEAFC
-3BEAFC:lI45|H3BEBE0
-3BEBE0:lI115|H3BECBC
-3BECBC:lI103|H3BED98
-3BED98:lI109|H3BEE74
-3BEE74:lI108|N
-3BE55C:lI115|H3BE658
-3BE658:lI103|H3BE75C
-3BE75C:lI109|N
-3BE474:lH3BE56C|H3BE578
-3BE56C:t2:H3BE668,H3BE670
-3BE670:lI116|H3BE774
-3BE774:lI101|H3BE850
-3BE850:lI120|H3BE92C
-3BE92C:lI116|H3BEA18
-3BEA18:lI47|H3BEB04
-3BEB04:lI120|H3BEBE8
-3BEBE8:lI45|H3BECC4
-3BECC4:lI115|H3BEDA0
-3BEDA0:lI101|H3BEE7C
-3BEE7C:lI116|H3BEF48
-3BEF48:lI101|H3BF014
-3BF014:lI120|H3BF0E0
-3BF0E0:lI116|N
-3BE668:lI101|H3BE76C
-3BE76C:lI116|H3BE848
-3BE848:lI120|N
-3BE578:lH3BE678|H3BE684
-3BE678:t2:H3BE77C,H3BE784
-3BE784:lI116|H3BE860
-3BE860:lI101|H3BE93C
-3BE93C:lI120|H3BEA20
-3BEA20:lI116|H3BEB0C
-3BEB0C:lI47|H3BEBF0
-3BEBF0:lI116|H3BECCC
-3BECCC:lI97|H3BEDA8
-3BEDA8:lI98|H3BEE84
-3BEE84:lI45|H3BEF50
-3BEF50:lI115|H3BF01C
-3BF01C:lI101|H3BF0E8
-3BF0E8:lI112|H3BF1AC
-3BF1AC:lI97|H3BF270
-3BF270:lI114|H3BF324
-3BF324:lI97|H3BF3D0
-3BF3D0:lI116|H3BF484
-3BF484:lI101|H3BF540
-3BF540:lI100|H3BF604
-3BF604:lI45|H3BF6D8
-3BF6D8:lI118|H3BF7AC
-3BF7AC:lI97|H3BF880
-3BF880:lI108|H3BF964
-3BF964:lI117|H3BFA40
-3BFA40:lI101|H3BFB14
-3BFB14:lI115|N
-3BE77C:lI116|H3BE858
-3BE858:lI115|H3BE934
-3BE934:lI118|N
-3BE684:lH3BE78C|H3BE798
-3BE78C:t2:H3BE868,H3BE870
-3BE870:lI116|H3BE94C
-3BE94C:lI101|H3BEA30
-3BEA30:lI120|H3BEB14
-3BEB14:lI116|H3BEBF8
-3BEBF8:lI47|H3BECD4
-3BECD4:lI114|H3BEDB0
-3BEDB0:lI105|H3BEE8C
-3BEE8C:lI99|H3BEF58
-3BEF58:lI104|H3BF024
-3BF024:lI116|H3BF0F0
-3BF0F0:lI101|H3BF1B4
-3BF1B4:lI120|H3BF278
-3BF278:lI116|N
-3BE868:lI114|H3BE944
-3BE944:lI116|H3BEA28
-3BEA28:lI120|N
-3BE798:lH3BE878|H3BE884
-3BE878:t2:H3BE954,H3BE95C
-3BE95C:lI116|H3BEA40
-3BEA40:lI101|H3BEB24
-3BEB24:lI120|H3BEC00
-3BEC00:lI116|H3BECDC
-3BECDC:lI47|H3BEDB8
-3BEDB8:lI112|H3BEE94
-3BEE94:lI108|H3BEF60
-3BEF60:lI97|H3BF02C
-3BF02C:lI105|H3BF0F8
-3BF0F8:lI110|N
-3BE954:lI116|H3BEA38
-3BEA38:lI120|H3BEB1C
-3BEB1C:lI116|N
-3BE884:lH3BE964|H3BE970
-3BE964:t2:H3BEA48,H3BEA50
-3BEA50:lI116|H3BEB34
-3BEB34:lI101|H3BEC10
-3BEC10:lI120|H3BECEC
-3BECEC:lI116|H3BEDC8
-3BEDC8:lI47|H3BEE9C
-3BEE9C:lI120|H3BEF68
-3BEF68:lI45|H3BF034
-3BF034:lI115|H3BF100
-3BF100:lI101|H3BF1BC
-3BF1BC:lI114|H3BF280
-3BF280:lI118|H3BF32C
-3BF32C:lI101|H3BF3D8
-3BF3D8:lI114|H3BF48C
-3BF48C:lI45|H3BF548
-3BF548:lI112|H3BF60C
-3BF60C:lI97|H3BF6E0
-3BF6E0:lI114|H3BF7B4
-3BF7B4:lI115|H3BF888
-3BF888:lI101|H3BF96C
-3BF96C:lI100|H3BFA48
-3BFA48:lI45|H3BFB1C
-3BFB1C:lI104|H3BFBF0
-3BFBF0:lI116|H3BFCBC
-3BFCBC:lI109|H3BFD80
-3BFD80:lI108|N
-3BEA48:lI115|H3BEB2C
-3BEB2C:lI104|H3BEC08
-3BEC08:lI116|H3BECE4
-3BECE4:lI109|H3BEDC0
-3BEDC0:lI108|N
-3BE970:lH3BEA58|H3BEA64
-3BEA58:t2:H3BEB3C,H3BEB44
-3BEB44:lI116|H3BEC20
-3BEC20:lI101|H3BECFC
-3BECFC:lI120|H3BEDD8
-3BEDD8:lI116|H3BEEA4
-3BEEA4:lI47|H3BEF70
-3BEF70:lI104|H3BF03C
-3BF03C:lI116|H3BF108
-3BF108:lI109|H3BF1C4
-3BF1C4:lI108|N
-3BEB3C:lI104|H3BEC18
-3BEC18:lI116|H3BECF4
-3BECF4:lI109|H3BEDD0
-3BEDD0:lI108|N
-3BEA64:lH3BEB4C|H3BEB58
-3BEB4C:t2:H3BEC28,H3BEC30
-3BEC30:lI116|H3BED0C
-3BED0C:lI101|H3BEDE8
-3BEDE8:lI120|H3BEEAC
-3BEEAC:lI116|H3BEF78
-3BEF78:lI47|H3BF044
-3BF044:lI104|H3BF110
-3BF110:lI116|H3BF1CC
-3BF1CC:lI109|H3BF288
-3BF288:lI108|N
-3BEC28:lI104|H3BED04
-3BED04:lI116|H3BEDE0
-3BEDE0:lI109|N
-3BEB58:lH3BEC38|H3BEC44
-3BEC38:t2:H3BED14,H3BED1C
-3BED1C:lI105|H3BEDF8
-3BEDF8:lI109|H3BEEBC
-3BEEBC:lI97|H3BEF80
-3BEF80:lI103|H3BF04C
-3BF04C:lI101|H3BF118
-3BF118:lI47|H3BF1D4
-3BF1D4:lI120|H3BF290
-3BF290:lI45|H3BF334
-3BF334:lI120|H3BF3E0
-3BF3E0:lI119|H3BF494
-3BF494:lI105|H3BF550
-3BF550:lI110|H3BF614
-3BF614:lI100|H3BF6E8
-3BF6E8:lI111|H3BF7BC
-3BF7BC:lI119|H3BF890
-3BF890:lI100|H3BF974
-3BF974:lI117|H3BFA50
-3BFA50:lI109|H3BFB24
-3BFB24:lI112|N
-3BED14:lI120|H3BEDF0
-3BEDF0:lI119|H3BEEB4
-3BEEB4:lI100|N
-3BEC44:lH3BED24|H3BED30
-3BED24:t2:H3BEE00,H3BEE08
-3BEE08:lI105|H3BEECC
-3BEECC:lI109|H3BEF90
-3BEF90:lI97|H3BF054
-3BF054:lI103|H3BF120
-3BF120:lI101|H3BF1DC
-3BF1DC:lI47|H3BF298
-3BF298:lI120|H3BF33C
-3BF33C:lI45|H3BF3E8
-3BF3E8:lI120|H3BF49C
-3BF49C:lI112|H3BF558
-3BF558:lI105|H3BF61C
-3BF61C:lI120|H3BF6F0
-3BF6F0:lI109|H3BF7C4
-3BF7C4:lI97|H3BF898
-3BF898:lI112|N
-3BEE00:lI120|H3BEEC4
-3BEEC4:lI112|H3BEF88
-3BEF88:lI109|N
-3BED30:lH3BEE10|H3BEE1C
-3BEE10:t2:H3BEED4,H3BEEDC
-3BEEDC:lI105|H3BEFA0
-3BEFA0:lI109|H3BF064
-3BF064:lI97|H3BF128
-3BF128:lI103|H3BF1E4
-3BF1E4:lI101|H3BF2A0
-3BF2A0:lI47|H3BF344
-3BF344:lI120|H3BF3F0
-3BF3F0:lI45|H3BF4A4
-3BF4A4:lI120|H3BF560
-3BF560:lI98|H3BF624
-3BF624:lI105|H3BF6F8
-3BF6F8:lI116|H3BF7CC
-3BF7CC:lI109|H3BF8A0
-3BF8A0:lI97|H3BF97C
-3BF97C:lI112|N
-3BEED4:lI120|H3BEF98
-3BEF98:lI98|H3BF05C
-3BF05C:lI109|N
-3BEE1C:lH3BEEE4|H3BEEF0
-3BEEE4:t2:H3BEFA8,H3BEFB0
-3BEFB0:lI105|H3BF074
-3BF074:lI109|H3BF138
-3BF138:lI97|H3BF1EC
-3BF1EC:lI103|H3BF2A8
-3BF2A8:lI101|H3BF34C
-3BF34C:lI47|H3BF3F8
-3BF3F8:lI120|H3BF4AC
-3BF4AC:lI45|H3BF568
-3BF568:lI114|H3BF62C
-3BF62C:lI103|H3BF700
-3BF700:lI98|N
-3BEFA8:lI114|H3BF06C
-3BF06C:lI103|H3BF130
-3BF130:lI98|N
-3BEEF0:lH3BEFB8|H3BEFC4
-3BEFB8:t2:H3BF07C,H3BF084
-3BF084:lI105|H3BF148
-3BF148:lI109|H3BF1FC
-3BF1FC:lI97|H3BF2B0
-3BF2B0:lI103|H3BF354
-3BF354:lI101|H3BF400
-3BF400:lI47|H3BF4B4
-3BF4B4:lI120|H3BF570
-3BF570:lI45|H3BF634
-3BF634:lI112|H3BF708
-3BF708:lI111|H3BF7D4
-3BF7D4:lI114|H3BF8A8
-3BF8A8:lI116|H3BF984
-3BF984:lI97|H3BFA58
-3BFA58:lI98|H3BFB2C
-3BFB2C:lI108|H3BFBF8
-3BFBF8:lI101|H3BFCC4
-3BFCC4:lI45|H3BFD88
-3BFD88:lI112|H3BFE44
-3BFE44:lI105|H3BFEF0
-3BFEF0:lI120|H3BFFA4
-3BFFA4:lI109|H3C0050
-3C0050:lI97|H3C00FC
-3C00FC:lI112|N
-3BF07C:lI112|H3BF140
-3BF140:lI112|H3BF1F4
-3BF1F4:lI109|N
-3BEFC4:lH3BF08C|H3BF098
-3BF08C:t2:H3BF150,H3BF158
-3BF158:lI105|H3BF20C
-3BF20C:lI109|H3BF2C0
-3BF2C0:lI97|H3BF35C
-3BF35C:lI103|H3BF408
-3BF408:lI101|H3BF4BC
-3BF4BC:lI47|H3BF578
-3BF578:lI120|H3BF63C
-3BF63C:lI45|H3BF710
-3BF710:lI112|H3BF7DC
-3BF7DC:lI111|H3BF8B0
-3BF8B0:lI114|H3BF98C
-3BF98C:lI116|H3BFA60
-3BFA60:lI97|H3BFB34
-3BFB34:lI98|H3BFC00
-3BFC00:lI108|H3BFCCC
-3BFCCC:lI101|H3BFD90
-3BFD90:lI45|H3BFE4C
-3BFE4C:lI103|H3BFEF8
-3BFEF8:lI114|H3BFFAC
-3BFFAC:lI97|H3C0058
-3C0058:lI121|H3C0104
-3C0104:lI109|H3C01A8
-3C01A8:lI97|H3C025C
-3C025C:lI112|N
-3BF150:lI112|H3BF204
-3BF204:lI103|H3BF2B8
-3BF2B8:lI109|N
-3BF098:lH3BF160|H3BF16C
-3BF160:t2:H3BF214,H3BF21C
-3BF21C:lI105|H3BF2D0
-3BF2D0:lI109|H3BF36C
-3BF36C:lI97|H3BF410
-3BF410:lI103|H3BF4C4
-3BF4C4:lI101|H3BF580
-3BF580:lI47|H3BF644
-3BF644:lI120|H3BF718
-3BF718:lI45|H3BF7E4
-3BF7E4:lI112|H3BF8B8
-3BF8B8:lI111|H3BF994
-3BF994:lI114|H3BFA68
-3BFA68:lI116|H3BFB3C
-3BFB3C:lI97|H3BFC08
-3BFC08:lI98|H3BFCD4
-3BFCD4:lI108|H3BFD98
-3BFD98:lI101|H3BFE54
-3BFE54:lI45|H3BFF00
-3BFF00:lI98|H3BFFB4
-3BFFB4:lI105|H3C0060
-3C0060:lI116|H3C010C
-3C010C:lI109|H3C01B0
-3C01B0:lI97|H3C0264
-3C0264:lI112|N
-3BF214:lI112|H3BF2C8
-3BF2C8:lI98|H3BF364
-3BF364:lI109|N
-3BF16C:lH3BF224|H3BF230
-3BF224:t2:H3BF2D8,H3BF2E0
-3BF2E0:lI105|H3BF37C
-3BF37C:lI109|H3BF420
-3BF420:lI97|H3BF4CC
-3BF4CC:lI103|H3BF588
-3BF588:lI101|H3BF64C
-3BF64C:lI47|H3BF720
-3BF720:lI120|H3BF7EC
-3BF7EC:lI45|H3BF8C0
-3BF8C0:lI112|H3BF99C
-3BF99C:lI111|H3BFA70
-3BFA70:lI114|H3BFB44
-3BFB44:lI116|H3BFC10
-3BFC10:lI97|H3BFCDC
-3BFCDC:lI98|H3BFDA0
-3BFDA0:lI108|H3BFE5C
-3BFE5C:lI101|H3BFF08
-3BFF08:lI45|H3BFFBC
-3BFFBC:lI97|H3C0068
-3C0068:lI110|H3C0114
-3C0114:lI121|H3C01B8
-3C01B8:lI109|H3C026C
-3C026C:lI97|H3C0318
-3C0318:lI112|N
-3BF2D8:lI112|H3BF374
-3BF374:lI110|H3BF418
-3BF418:lI109|N
-3BF230:lH3BF2E8|H3BF2F4
-3BF2E8:t2:H3BF384,H3BF38C
-3BF38C:lI105|H3BF430
-3BF430:lI109|H3BF4DC
-3BF4DC:lI97|H3BF590
-3BF590:lI103|H3BF654
-3BF654:lI101|H3BF728
-3BF728:lI47|H3BF7F4
-3BF7F4:lI120|H3BF8C8
-3BF8C8:lI45|H3BF9A4
-3BF9A4:lI99|H3BFA78
-3BFA78:lI109|H3BFB4C
-3BFB4C:lI117|H3BFC18
-3BFC18:lI45|H3BFCE4
-3BFCE4:lI114|H3BFDA8
-3BFDA8:lI97|H3BFE64
-3BFE64:lI115|H3BFF10
-3BFF10:lI116|H3BFFC4
-3BFFC4:lI101|H3C0070
-3C0070:lI114|N
-3BF384:lI114|H3BF428
-3BF428:lI97|H3BF4D4
-3BF4D4:lI115|N
-3BF2F4:lH3BF394|H3BF3A0
-3BF394:t2:H3BF438,H3BF440
-3BF440:lI105|H3BF4EC
-3BF4EC:lI109|H3BF5A0
-3BF5A0:lI97|H3BF664
-3BF664:lI103|H3BF730
-3BF730:lI101|H3BF7FC
-3BF7FC:lI47|H3BF8D0
-3BF8D0:lI116|H3BF9AC
-3BF9AC:lI105|H3BFA80
-3BFA80:lI102|H3BFB54
-3BFB54:lI102|N
-3BF438:lI116|H3BF4E4
-3BF4E4:lI105|H3BF598
-3BF598:lI102|H3BF65C
-3BF65C:lI102|N
-3BF3A0:lH3BF448|H3BF454
-3BF448:t2:H3BF4F4,H3BF4FC
-3BF4FC:lI105|H3BF5B0
-3BF5B0:lI109|H3BF674
-3BF674:lI97|H3BF738
-3BF738:lI103|H3BF804
-3BF804:lI101|H3BF8D8
-3BF8D8:lI47|H3BF9B4
-3BF9B4:lI116|H3BFA88
-3BFA88:lI105|H3BFB5C
-3BFB5C:lI102|H3BFC20
-3BFC20:lI102|N
-3BF4F4:lI116|H3BF5A8
-3BF5A8:lI105|H3BF66C
-3BF66C:lI102|N
-3BF454:lH3BF504|H3BF510
-3BF504:t2:H3BF5B8,H3BF5C0
-3BF5C0:lI105|H3BF684
-3BF684:lI109|H3BF748
-3BF748:lI97|H3BF80C
-3BF80C:lI103|H3BF8E0
-3BF8E0:lI101|H3BF9BC
-3BF9BC:lI47|H3BFA90
-3BFA90:lI112|H3BFB64
-3BFB64:lI110|H3BFC28
-3BFC28:lI103|N
-3BF5B8:lI112|H3BF67C
-3BF67C:lI110|H3BF740
-3BF740:lI103|N
-3BF510:lH3BF5C8|H3BF5D4
-3BF5C8:t2:H3BF68C,H3BF694
-3BF694:lI105|H3BF758
-3BF758:lI109|H3BF81C
-3BF81C:lI97|H3BF8F0
-3BF8F0:lI103|H3BF9C4
-3BF9C4:lI101|H3BFA98
-3BFA98:lI47|H3BFB6C
-3BFB6C:lI106|H3BFC30
-3BFC30:lI112|H3BFCEC
-3BFCEC:lI101|H3BFDB0
-3BFDB0:lI103|N
-3BF68C:lI106|H3BF750
-3BF750:lI112|H3BF814
-3BF814:lI101|H3BF8E8
-3BF8E8:lI103|N
-3BF5D4:lH3BF69C|H3BF6A8
-3BF69C:t2:H3BF760,H3BF768
-3BF768:lI105|H3BF82C
-3BF82C:lI109|H3BF900
-3BF900:lI97|H3BF9CC
-3BF9CC:lI103|H3BFAA0
-3BFAA0:lI101|H3BFB74
-3BFB74:lI47|H3BFC38
-3BFC38:lI106|H3BFCF4
-3BFCF4:lI112|H3BFDB8
-3BFDB8:lI101|H3BFE6C
-3BFE6C:lI103|N
-3BF760:lI106|H3BF824
-3BF824:lI112|H3BF8F8
-3BF8F8:lI103|N
-3BF6A8:lH3BF770|H3BF77C
-3BF770:t2:H3BF834,H3BF83C
-3BF83C:lI105|H3BF910
-3BF910:lI109|H3BF9DC
-3BF9DC:lI97|H3BFAA8
-3BFAA8:lI103|H3BFB7C
-3BFB7C:lI101|H3BFC40
-3BFC40:lI47|H3BFCFC
-3BFCFC:lI106|H3BFDC0
-3BFDC0:lI112|H3BFE74
-3BFE74:lI101|H3BFF18
-3BFF18:lI103|N
-3BF834:lI106|H3BF908
-3BF908:lI112|H3BF9D4
-3BF9D4:lI101|N
-3BF77C:lH3BF844|H3BF850
-3BF844:t2:H3BF918,H3BF920
-3BF920:lI105|H3BF9EC
-3BF9EC:lI109|H3BFAB8
-3BFAB8:lI97|H3BFB84
-3BFB84:lI103|H3BFC48
-3BFC48:lI101|H3BFD04
-3BFD04:lI47|H3BFDC8
-3BFDC8:lI105|H3BFE7C
-3BFE7C:lI101|H3BFF20
-3BFF20:lI102|N
-3BF918:lI105|H3BF9E4
-3BF9E4:lI101|H3BFAB0
-3BFAB0:lI102|N
-3BF850:lH3BF928|H3BF934
-3BF928:t2:H3BF9F4,H3BF9FC
-3BF9FC:lI105|H3BFAC8
-3BFAC8:lI109|H3BFB94
-3BFB94:lI97|H3BFC50
-3BFC50:lI103|H3BFD0C
-3BFD0C:lI101|H3BFDD0
-3BFDD0:lI47|H3BFE84
-3BFE84:lI103|H3BFF28
-3BFF28:lI105|H3BFFCC
-3BFFCC:lI102|N
-3BF9F4:lI103|H3BFAC0
-3BFAC0:lI105|H3BFB8C
-3BFB8C:lI102|N
-3BF934:lH3BFA04|H3BFA10
-3BFA04:t2:H3BFAD0,H3BFAD8
-3BFAD8:lI99|H3BFBA4
-3BFBA4:lI104|H3BFC60
-3BFC60:lI101|H3BFD14
-3BFD14:lI109|H3BFDD8
-3BFDD8:lI105|H3BFE8C
-3BFE8C:lI99|H3BFF30
-3BFF30:lI97|H3BFFD4
-3BFFD4:lI108|H3C0078
-3C0078:lI47|H3C011C
-3C011C:lI120|H3C01C0
-3C01C0:lI45|H3C0274
-3C0274:lI112|H3C0320
-3C0320:lI100|H3C03CC
-3C03CC:lI98|N
-3BFAD0:lI112|H3BFB9C
-3BFB9C:lI100|H3BFC58
-3BFC58:lI98|N
-3BFA10:lH3BFAE0|H3BFAEC
-3BFAE0:t2:H3BFBAC,H3BFBB4
-3BFBB4:lI99|H3BFC70
-3BFC70:lI104|H3BFD24
-3BFD24:lI101|H3BFDE0
-3BFDE0:lI109|H3BFE94
-3BFE94:lI105|H3BFF38
-3BFF38:lI99|H3BFFDC
-3BFFDC:lI97|H3C0080
-3C0080:lI108|H3C0124
-3C0124:lI47|H3C01C8
-3C01C8:lI120|H3C027C
-3C027C:lI45|H3C0328
-3C0328:lI112|H3C03D4
-3C03D4:lI100|H3C0460
-3C0460:lI98|N
-3BFBAC:lI120|H3BFC68
-3BFC68:lI121|H3BFD1C
-3BFD1C:lI122|N
-3BFAEC:lH3BFBBC|H3BFBC8
-3BFBBC:t2:H3BFC78,H3BFC80
-3BFC80:lI97|H3BFD34
-3BFD34:lI117|H3BFDF0
-3BFDF0:lI100|H3BFE9C
-3BFE9C:lI105|H3BFF40
-3BFF40:lI111|H3BFFE4
-3BFFE4:lI47|H3C0088
-3C0088:lI120|H3C012C
-3C012C:lI45|H3C01D0
-3C01D0:lI119|H3C0284
-3C0284:lI97|H3C0330
-3C0330:lI118|N
-3BFC78:lI119|H3BFD2C
-3BFD2C:lI97|H3BFDE8
-3BFDE8:lI118|N
-3BFBC8:lH3BFC88|H3BFC94
-3BFC88:t2:H3BFD3C,H3BFD44
-3BFD44:lI97|H3BFE00
-3BFE00:lI117|H3BFEA4
-3BFEA4:lI100|H3BFF48
-3BFF48:lI105|H3BFFEC
-3BFFEC:lI111|H3C0090
-3C0090:lI47|H3C0134
-3C0134:lI120|H3C01D8
-3C01D8:lI45|H3C028C
-3C028C:lI114|H3C0338
-3C0338:lI101|H3C03DC
-3C03DC:lI97|H3C0468
-3C0468:lI108|H3C04FC
-3C04FC:lI97|H3C0598
-3C0598:lI117|H3C063C
-3C063C:lI100|H3C06E8
-3C06E8:lI105|H3C0794
-3C0794:lI111|N
-3BFD3C:lI114|H3BFDF8
-3BFDF8:lI97|N
-3BFC94:lH3BFD4C|H3BFD58
-3BFD4C:t2:H3BFE08,H3BFE10
-3BFE10:lI97|H3BFEB4
-3BFEB4:lI117|H3BFF58
-3BFF58:lI100|H3BFFF4
-3BFFF4:lI105|H3C0098
-3C0098:lI111|H3C013C
-3C013C:lI47|H3C01E0
-3C01E0:lI120|H3C0294
-3C0294:lI45|H3C0340
-3C0340:lI112|H3C03E4
-3C03E4:lI110|H3C0470
-3C0470:lI45|H3C0504
-3C0504:lI114|H3C05A0
-3C05A0:lI101|H3C0644
-3C0644:lI97|H3C06F0
-3C06F0:lI108|H3C079C
-3C079C:lI97|H3C0838
-3C0838:lI117|H3C08C4
-3C08C4:lI100|H3C0958
-3C0958:lI105|H3C09EC
-3C09EC:lI111|H3C0A88
-3C0A88:lI45|H3C0B2C
-3C0B2C:lI112|H3C0BD0
-3C0BD0:lI108|H3C0C84
-3C0C84:lI117|H3C0D38
-3C0D38:lI103|H3C0DEC
-3C0DEC:lI105|H3C0EA0
-3C0EA0:lI110|N
-3BFE08:lI114|H3BFEAC
-3BFEAC:lI112|H3BFF50
-3BFF50:lI109|N
-3BFD58:lH3BFE18|H3BFE24
-3BFE18:t2:H3BFEBC,H3BFEC4
-3BFEC4:lI97|H3BFF68
-3BFF68:lI117|H3C0004
-3C0004:lI100|H3C00A0
-3C00A0:lI105|H3C0144
-3C0144:lI111|H3C01E8
-3C01E8:lI47|H3C029C
-3C029C:lI120|H3C0348
-3C0348:lI45|H3C03EC
-3C03EC:lI112|H3C0478
-3C0478:lI110|H3C050C
-3C050C:lI45|H3C05A8
-3C05A8:lI114|H3C064C
-3C064C:lI101|H3C06F8
-3C06F8:lI97|H3C07A4
-3C07A4:lI108|H3C0840
-3C0840:lI97|H3C08CC
-3C08CC:lI117|H3C0960
-3C0960:lI100|H3C09F4
-3C09F4:lI105|H3C0A90
-3C0A90:lI111|N
-3BFEBC:lI114|H3BFF60
-3BFF60:lI97|H3BFFFC
-3BFFFC:lI109|N
-3BFE24:lH3BFECC|H3BFED8
-3BFECC:t2:H3BFF70,H3BFF78
-3BFF78:lI97|H3C0014
-3C0014:lI117|H3C00B0
-3C00B0:lI100|H3C014C
-3C014C:lI105|H3C01F0
-3C01F0:lI111|H3C02A4
-3C02A4:lI47|H3C0350
-3C0350:lI120|H3C03F4
-3C03F4:lI45|H3C0480
-3C0480:lI97|H3C0514
-3C0514:lI105|H3C05B0
-3C05B0:lI102|H3C0654
-3C0654:lI102|N
-3BFF70:lI97|H3C000C
-3C000C:lI105|H3C00A8
-3C00A8:lI102|N
-3BFED8:lH3BFF80|H3BFF8C
-3BFF80:t2:H3C001C,H3C0024
-3C0024:lI97|H3C00C0
-3C00C0:lI117|H3C015C
-3C015C:lI100|H3C0200
-3C0200:lI105|H3C02AC
-3C02AC:lI111|H3C0358
-3C0358:lI47|H3C03FC
-3C03FC:lI120|H3C0488
-3C0488:lI45|H3C051C
-3C051C:lI97|H3C05B8
-3C05B8:lI105|H3C065C
-3C065C:lI102|H3C0700
-3C0700:lI102|N
-3C001C:lI97|H3C00B8
-3C00B8:lI105|H3C0154
-3C0154:lI102|H3C01F8
-3C01F8:lI102|N
-3BFF8C:lH3C002C|H3C0038
-3C002C:t2:H3C00C8,H3C00D0
-3C00D0:lI97|H3C016C
-3C016C:lI117|H3C0210
-3C0210:lI100|H3C02BC
-3C02BC:lI105|H3C0360
-3C0360:lI111|H3C0404
-3C0404:lI47|H3C0490
-3C0490:lI120|H3C0524
-3C0524:lI45|H3C05C0
-3C05C0:lI97|H3C0664
-3C0664:lI105|H3C0708
-3C0708:lI102|H3C07AC
-3C07AC:lI102|N
-3C00C8:lI97|H3C0164
-3C0164:lI105|H3C0208
-3C0208:lI102|H3C02B4
-3C02B4:lI99|N
-3C0038:lH3C00D8|H3C00E4
-3C00D8:t2:H3C0174,H3C017C
-3C017C:lI97|H3C0220
-3C0220:lI117|H3C02CC
-3C02CC:lI100|H3C0370
-3C0370:lI105|H3C040C
-3C040C:lI111|H3C0498
-3C0498:lI47|H3C052C
-3C052C:lI109|H3C05C8
-3C05C8:lI112|H3C066C
-3C066C:lI101|H3C0710
-3C0710:lI103|N
-3C0174:lI109|H3C0218
-3C0218:lI112|H3C02C4
-3C02C4:lI103|H3C0368
-3C0368:lI97|N
-3C00E4:lH3C0184|H3C0190
-3C0184:t2:H3C0228,H3C0230
-3C0230:lI97|H3C02DC
-3C02DC:lI117|H3C0380
-3C0380:lI100|H3C0414
-3C0414:lI105|H3C04A0
-3C04A0:lI111|H3C0534
-3C0534:lI47|H3C05D0
-3C05D0:lI109|H3C0674
-3C0674:lI112|H3C0718
-3C0718:lI101|H3C07B4
-3C07B4:lI103|N
-3C0228:lI109|H3C02D4
-3C02D4:lI112|H3C0378
-3C0378:lI50|N
-3C0190:lH3C0238|H3C0244
-3C0238:t2:H3C02E4,H3C02EC
-3C02EC:lI97|H3C0390
-3C0390:lI117|H3C041C
-3C041C:lI100|H3C04A8
-3C04A8:lI105|H3C053C
-3C053C:lI111|H3C05D8
-3C05D8:lI47|H3C067C
-3C067C:lI98|H3C0720
-3C0720:lI97|H3C07BC
-3C07BC:lI115|H3C0848
-3C0848:lI105|H3C08D4
-3C08D4:lI99|N
-3C02E4:lI97|H3C0388
-3C0388:lI117|N
-3C0244:lH3C02F4|H3C0300
-3C02F4:t2:H3C0398,H3C03A0
-3C03A0:lI97|H3C042C
-3C042C:lI117|H3C04B8
-3C04B8:lI100|H3C0544
-3C0544:lI105|H3C05E0
-3C05E0:lI111|H3C0684
-3C0684:lI47|H3C0728
-3C0728:lI98|H3C07C4
-3C07C4:lI97|H3C0850
-3C0850:lI115|H3C08DC
-3C08DC:lI105|H3C0968
-3C0968:lI99|N
-3C0398:lI115|H3C0424
-3C0424:lI110|H3C04B0
-3C04B0:lI100|N
-3C0300:lH3C03A8|H3C03B4
-3C03A8:t2:H3C0434,H3C043C
-3C043C:lI97|H3C04C8
-3C04C8:lI112|H3C0554
-3C0554:lI112|H3C05E8
-3C05E8:lI108|H3C068C
-3C068C:lI105|H3C0730
-3C0730:lI99|H3C07CC
-3C07CC:lI97|H3C0858
-3C0858:lI116|H3C08E4
-3C08E4:lI105|H3C0970
-3C0970:lI111|H3C09FC
-3C09FC:lI110|H3C0A98
-3C0A98:lI47|H3C0B34
-3C0B34:lI122|H3C0BD8
-3C0BD8:lI105|H3C0C8C
-3C0C8C:lI112|N
-3C0434:lI122|H3C04C0
-3C04C0:lI105|H3C054C
-3C054C:lI112|N
-3C03B4:lH3C0444|H3C0450
-3C0444:t2:H3C04D0,H3C04D8
-3C04D8:lI97|H3C0564
-3C0564:lI112|H3C05F8
-3C05F8:lI112|H3C0694
-3C0694:lI108|H3C0738
-3C0738:lI105|H3C07D4
-3C07D4:lI99|H3C0860
-3C0860:lI97|H3C08EC
-3C08EC:lI116|H3C0978
-3C0978:lI105|H3C0A04
-3C0A04:lI111|H3C0AA0
-3C0AA0:lI110|H3C0B3C
-3C0B3C:lI47|H3C0BE0
-3C0BE0:lI120|H3C0C94
-3C0C94:lI45|H3C0D40
-3C0D40:lI119|H3C0DF4
-3C0DF4:lI97|H3C0EA8
-3C0EA8:lI105|H3C0F64
-3C0F64:lI115|H3C1030
-3C1030:lI45|H3C1104
-3C1104:lI115|H3C11D8
-3C11D8:lI111|H3C12A4
-3C12A4:lI117|H3C1378
-3C1378:lI114|H3C1454
-3C1454:lI99|H3C1538
-3C1538:lI101|N
-3C04D0:lI115|H3C055C
-3C055C:lI114|H3C05F0
-3C05F0:lI99|N
-3C0450:lH3C04E0|H3C04EC
-3C04E0:t2:H3C056C,H3C0574
-3C0574:lI97|H3C0608
-3C0608:lI112|H3C06A4
-3C06A4:lI112|H3C0748
-3C0748:lI108|H3C07E4
-3C07E4:lI105|H3C0868
-3C0868:lI99|H3C08F4
-3C08F4:lI97|H3C0980
-3C0980:lI116|H3C0A0C
-3C0A0C:lI105|H3C0AA8
-3C0AA8:lI111|H3C0B44
-3C0B44:lI110|H3C0BE8
-3C0BE8:lI47|H3C0C9C
-3C0C9C:lI120|H3C0D48
-3C0D48:lI45|H3C0DFC
-3C0DFC:lI117|H3C0EB0
-3C0EB0:lI115|H3C0F6C
-3C0F6C:lI116|H3C1038
-3C1038:lI97|H3C110C
-3C110C:lI114|N
-3C056C:lI117|H3C0600
-3C0600:lI115|H3C069C
-3C069C:lI116|H3C0740
-3C0740:lI97|H3C07DC
-3C07DC:lI114|N
-3C04EC:lH3C057C|H3C0588
-3C057C:t2:H3C0610,H3C0618
-3C0618:lI97|H3C06B4
-3C06B4:lI112|H3C0750
-3C0750:lI112|H3C07EC
-3C07EC:lI108|H3C0870
-3C0870:lI105|H3C08FC
-3C08FC:lI99|H3C0988
-3C0988:lI97|H3C0A14
-3C0A14:lI116|H3C0AB0
-3C0AB0:lI105|H3C0B4C
-3C0B4C:lI111|H3C0BF0
-3C0BF0:lI110|H3C0CA4
-3C0CA4:lI47|H3C0D50
-3C0D50:lI120|H3C0E04
-3C0E04:lI45|H3C0EB8
-3C0EB8:lI116|H3C0F74
-3C0F74:lI114|H3C1040
-3C1040:lI111|H3C1114
-3C1114:lI102|H3C11E0
-3C11E0:lI102|H3C12AC
-3C12AC:lI45|H3C1380
-3C1380:lI109|H3C145C
-3C145C:lI115|N
-3C0610:lI109|H3C06AC
-3C06AC:lI115|N
-3C0588:lH3C0620|H3C062C
-3C0620:t2:H3C06BC,H3C06C4
-3C06C4:lI97|H3C0760
-3C0760:lI112|H3C07F4
-3C07F4:lI112|H3C0878
-3C0878:lI108|H3C0904
-3C0904:lI105|H3C0990
-3C0990:lI99|H3C0A1C
-3C0A1C:lI97|H3C0AB8
-3C0AB8:lI116|H3C0B54
-3C0B54:lI105|H3C0BF8
-3C0BF8:lI111|H3C0CAC
-3C0CAC:lI110|H3C0D58
-3C0D58:lI47|H3C0E0C
-3C0E0C:lI120|H3C0EC0
-3C0EC0:lI45|H3C0F7C
-3C0F7C:lI116|H3C1048
-3C1048:lI114|H3C111C
-3C111C:lI111|H3C11E8
-3C11E8:lI102|H3C12B4
-3C12B4:lI102|H3C1388
-3C1388:lI45|H3C1464
-3C1464:lI109|H3C1540
-3C1540:lI101|N
-3C06BC:lI109|H3C0758
-3C0758:lI101|N
-3C062C:lH3C06CC|H3C06D8
-3C06CC:t2:H3C0768,H3C0770
-3C0770:lI97|H3C0804
-3C0804:lI112|H3C0888
-3C0888:lI112|H3C090C
-3C090C:lI108|H3C0998
-3C0998:lI105|H3C0A24
-3C0A24:lI99|H3C0AC0
-3C0AC0:lI97|H3C0B5C
-3C0B5C:lI116|H3C0C00
-3C0C00:lI105|H3C0CB4
-3C0CB4:lI111|H3C0D60
-3C0D60:lI110|H3C0E14
-3C0E14:lI47|H3C0EC8
-3C0EC8:lI120|H3C0F84
-3C0F84:lI45|H3C1050
-3C1050:lI116|H3C1124
-3C1124:lI114|H3C11F0
-3C11F0:lI111|H3C12BC
-3C12BC:lI102|H3C1390
-3C1390:lI102|H3C146C
-3C146C:lI45|H3C1548
-3C1548:lI109|H3C161C
-3C161C:lI97|H3C16F0
-3C16F0:lI110|N
-3C0768:lI109|H3C07FC
-3C07FC:lI97|H3C0880
-3C0880:lI110|N
-3C06D8:lH3C0778|H3C0784
-3C0778:t2:H3C080C,H3C0814
-3C0814:lI97|H3C0890
-3C0890:lI112|H3C0914
-3C0914:lI112|H3C09A0
-3C09A0:lI108|H3C0A2C
-3C0A2C:lI105|H3C0AC8
-3C0AC8:lI99|H3C0B64
-3C0B64:lI97|H3C0C08
-3C0C08:lI116|H3C0CBC
-3C0CBC:lI105|H3C0D68
-3C0D68:lI111|H3C0E1C
-3C0E1C:lI110|H3C0ED0
-3C0ED0:lI47|H3C0F8C
-3C0F8C:lI120|H3C1058
-3C1058:lI45|H3C112C
-3C112C:lI116|H3C11F8
-3C11F8:lI114|H3C12C4
-3C12C4:lI111|H3C1398
-3C1398:lI102|H3C1474
-3C1474:lI102|N
-3C080C:lI116|N
-3C0784:lH3C081C|H3C0828
-3C081C:t2:H3C0898,H3C08A0
-3C08A0:lI97|H3C0924
-3C0924:lI112|H3C09A8
-3C09A8:lI112|H3C0A34
-3C0A34:lI108|H3C0AD0
-3C0AD0:lI105|H3C0B6C
-3C0B6C:lI99|H3C0C10
-3C0C10:lI97|H3C0CC4
-3C0CC4:lI116|H3C0D70
-3C0D70:lI105|H3C0E24
-3C0E24:lI111|H3C0ED8
-3C0ED8:lI110|H3C0F94
-3C0F94:lI47|H3C1060
-3C1060:lI120|H3C1134
-3C1134:lI45|H3C1200
-3C1200:lI116|H3C12CC
-3C12CC:lI114|H3C13A0
-3C13A0:lI111|H3C147C
-3C147C:lI102|H3C1550
-3C1550:lI102|N
-3C0898:lI116|H3C091C
-3C091C:lI114|N
-3C0828:lH3C08A8|H3C08B4
-3C08A8:t2:H3C092C,H3C0934
-3C0934:lI97|H3C09B8
-3C09B8:lI112|H3C0A44
-3C0A44:lI112|H3C0AE0
-3C0AE0:lI108|H3C0B74
-3C0B74:lI105|H3C0C18
-3C0C18:lI99|H3C0CCC
-3C0CCC:lI97|H3C0D78
-3C0D78:lI116|H3C0E2C
-3C0E2C:lI105|H3C0EE0
-3C0EE0:lI111|H3C0F9C
-3C0F9C:lI110|H3C1068
-3C1068:lI47|H3C113C
-3C113C:lI120|H3C1208
-3C1208:lI45|H3C12D4
-3C12D4:lI116|H3C13A8
-3C13A8:lI114|H3C1484
-3C1484:lI111|H3C1558
-3C1558:lI102|H3C1624
-3C1624:lI102|N
-3C092C:lI114|H3C09B0
-3C09B0:lI111|H3C0A3C
-3C0A3C:lI102|H3C0AD8
-3C0AD8:lI102|N
-3C08B4:lH3C093C|H3C0948
-3C093C:t2:H3C09C0,H3C09C8
-3C09C8:lI97|H3C0A54
-3C0A54:lI112|H3C0AF0
-3C0AF0:lI112|H3C0B84
-3C0B84:lI108|H3C0C28
-3C0C28:lI105|H3C0CDC
-3C0CDC:lI99|H3C0D88
-3C0D88:lI97|H3C0E34
-3C0E34:lI116|H3C0EE8
-3C0EE8:lI105|H3C0FA4
-3C0FA4:lI111|H3C1070
-3C1070:lI110|H3C1144
-3C1144:lI47|H3C1210
-3C1210:lI120|H3C12DC
-3C12DC:lI45|H3C13B0
-3C13B0:lI116|H3C148C
-3C148C:lI101|H3C1560
-3C1560:lI120|H3C162C
-3C162C:lI105|H3C16F8
-3C16F8:lI110|H3C17BC
-3C17BC:lI102|H3C1880
-3C1880:lI111|N
-3C09C0:lI116|H3C0A4C
-3C0A4C:lI101|H3C0AE8
-3C0AE8:lI120|H3C0B7C
-3C0B7C:lI105|H3C0C20
-3C0C20:lI110|H3C0CD4
-3C0CD4:lI102|H3C0D80
-3C0D80:lI111|N
-3C0948:lH3C09D0|H3C09DC
-3C09D0:t2:H3C0A5C,H3C0A64
-3C0A64:lI97|H3C0B00
-3C0B00:lI112|H3C0B94
-3C0B94:lI112|H3C0C38
-3C0C38:lI108|H3C0CE4
-3C0CE4:lI105|H3C0D90
-3C0D90:lI99|H3C0E3C
-3C0E3C:lI97|H3C0EF0
-3C0EF0:lI116|H3C0FAC
-3C0FAC:lI105|H3C1078
-3C1078:lI111|H3C114C
-3C114C:lI110|H3C1218
-3C1218:lI47|H3C12E4
-3C12E4:lI120|H3C13B8
-3C13B8:lI45|H3C1494
-3C1494:lI116|H3C1568
-3C1568:lI101|H3C1634
-3C1634:lI120|H3C1700
-3C1700:lI105|H3C17C4
-3C17C4:lI110|H3C1888
-3C1888:lI102|H3C1944
-3C1944:lI111|N
-3C0A5C:lI116|H3C0AF8
-3C0AF8:lI101|H3C0B8C
-3C0B8C:lI120|H3C0C30
-3C0C30:lI105|N
-3C09DC:lH3C0A6C|H3C0A78
-3C0A6C:t2:H3C0B08,H3C0B10
-3C0B10:lI97|H3C0BA4
-3C0BA4:lI112|H3C0C48
-3C0C48:lI112|H3C0CEC
-3C0CEC:lI108|H3C0D98
-3C0D98:lI105|H3C0E44
-3C0E44:lI99|H3C0EF8
-3C0EF8:lI97|H3C0FB4
-3C0FB4:lI116|H3C1080
-3C1080:lI105|H3C1154
-3C1154:lI111|H3C1220
-3C1220:lI110|H3C12EC
-3C12EC:lI47|H3C13C0
-3C13C0:lI120|H3C149C
-3C149C:lI45|H3C1570
-3C1570:lI116|H3C163C
-3C163C:lI101|H3C1708
-3C1708:lI120|N
-3C0B08:lI116|H3C0B9C
-3C0B9C:lI101|H3C0C40
-3C0C40:lI120|N
-3C0A78:lH3C0B18|H3C0B24
-3C0B18:t2:H3C0BAC,H3C0BB4
-3C0BB4:lI97|H3C0C58
-3C0C58:lI112|H3C0CFC
-3C0CFC:lI112|H3C0DA0
-3C0DA0:lI108|H3C0E4C
-3C0E4C:lI105|H3C0F00
-3C0F00:lI99|H3C0FBC
-3C0FBC:lI97|H3C1088
-3C1088:lI116|H3C115C
-3C115C:lI105|H3C1228
-3C1228:lI111|H3C12F4
-3C12F4:lI110|H3C13C8
-3C13C8:lI47|H3C14A4
-3C14A4:lI120|H3C1578
-3C1578:lI45|H3C1644
-3C1644:lI116|H3C1710
-3C1710:lI99|H3C17CC
-3C17CC:lI108|N
-3C0BAC:lI116|H3C0C50
-3C0C50:lI99|H3C0CF4
-3C0CF4:lI108|N
-3C0B24:lH3C0BBC|H3C0BC8
-3C0BBC:t2:H3C0C60,H3C0C68
-3C0C68:lI97|H3C0D0C
-3C0D0C:lI112|H3C0DB0
-3C0DB0:lI112|H3C0E54
-3C0E54:lI108|H3C0F08
-3C0F08:lI105|H3C0FC4
-3C0FC4:lI99|H3C1090
-3C1090:lI97|H3C1164
-3C1164:lI116|H3C1230
-3C1230:lI105|H3C12FC
-3C12FC:lI111|H3C13D0
-3C13D0:lI110|H3C14AC
-3C14AC:lI47|H3C1580
-3C1580:lI120|H3C164C
-3C164C:lI45|H3C1718
-3C1718:lI116|H3C17D4
-3C17D4:lI97|H3C1890
-3C1890:lI114|N
-3C0C60:lI116|H3C0D04
-3C0D04:lI97|H3C0DA8
-3C0DA8:lI114|N
-3C0BC8:lH3C0C70|H3C0C7C
-3C0C70:t2:H3C0D14,H3C0D1C
-3C0D1C:lI97|H3C0DC0
-3C0DC0:lI112|H3C0E64
-3C0E64:lI112|H3C0F18
-3C0F18:lI108|H3C0FD4
-3C0FD4:lI105|H3C10A0
-3C10A0:lI99|H3C116C
-3C116C:lI97|H3C1238
-3C1238:lI116|H3C1304
-3C1304:lI105|H3C13D8
-3C13D8:lI111|H3C14B4
-3C14B4:lI110|H3C1588
-3C1588:lI47|H3C1654
-3C1654:lI120|H3C1720
-3C1720:lI45|H3C17DC
-3C17DC:lI115|H3C1898
-3C1898:lI118|H3C194C
-3C194C:lI52|H3C1A00
-3C1A00:lI99|H3C1AB4
-3C1AB4:lI114|H3C1B78
-3C1B78:lI99|N
-3C0D14:lI115|H3C0DB8
-3C0DB8:lI118|H3C0E5C
-3C0E5C:lI52|H3C0F10
-3C0F10:lI99|H3C0FCC
-3C0FCC:lI114|H3C1098
-3C1098:lI99|N
-3C0C7C:lH3C0D24|H3C0D30
-3C0D24:t2:H3C0DC8,H3C0DD0
-3C0DD0:lI97|H3C0E74
-3C0E74:lI112|H3C0F28
-3C0F28:lI112|H3C0FE4
-3C0FE4:lI108|H3C10B0
-3C10B0:lI105|H3C117C
-3C117C:lI99|H3C1248
-3C1248:lI97|H3C130C
-3C130C:lI116|H3C13E0
-3C13E0:lI105|H3C14BC
-3C14BC:lI111|H3C1590
-3C1590:lI110|H3C165C
-3C165C:lI47|H3C1728
-3C1728:lI120|H3C17E4
-3C17E4:lI45|H3C18A0
-3C18A0:lI115|H3C1954
-3C1954:lI118|H3C1A08
-3C1A08:lI52|H3C1ABC
-3C1ABC:lI99|H3C1B80
-3C1B80:lI112|H3C1C4C
-3C1C4C:lI105|H3C1D10
-3C1D10:lI111|N
-3C0DC8:lI115|H3C0E6C
-3C0E6C:lI118|H3C0F20
-3C0F20:lI52|H3C0FDC
-3C0FDC:lI99|H3C10A8
-3C10A8:lI112|H3C1174
-3C1174:lI105|H3C1240
-3C1240:lI111|N
-3C0D30:lH3C0DD8|H3C0DE4
-3C0DD8:t2:H3C0E7C,H3C0E84
-3C0E84:lI97|H3C0F38
-3C0F38:lI112|H3C0FF4
-3C0FF4:lI112|H3C10B8
-3C10B8:lI108|H3C1184
-3C1184:lI105|H3C1250
-3C1250:lI99|H3C1314
-3C1314:lI97|H3C13E8
-3C13E8:lI116|H3C14C4
-3C14C4:lI105|H3C1598
-3C1598:lI111|H3C1664
-3C1664:lI110|H3C1730
-3C1730:lI47|H3C17EC
-3C17EC:lI120|H3C18A8
-3C18A8:lI45|H3C195C
-3C195C:lI115|H3C1A10
-3C1A10:lI116|H3C1AC4
-3C1AC4:lI117|H3C1B88
-3C1B88:lI102|H3C1C54
-3C1C54:lI102|H3C1D18
-3C1D18:lI105|H3C1DD4
-3C1DD4:lI116|N
-3C0E7C:lI115|H3C0F30
-3C0F30:lI105|H3C0FEC
-3C0FEC:lI116|N
-3C0DE4:lH3C0E8C|H3C0E98
-3C0E8C:t2:H3C0F40,H3C0F48
-3C0F48:lI97|H3C1004
-3C1004:lI112|H3C10C8
-3C10C8:lI112|H3C1194
-3C1194:lI108|H3C1258
-3C1258:lI105|H3C131C
-3C131C:lI99|H3C13F0
-3C13F0:lI97|H3C14CC
-3C14CC:lI116|H3C15A0
-3C15A0:lI105|H3C166C
-3C166C:lI111|H3C1738
-3C1738:lI110|H3C17F4
-3C17F4:lI47|H3C18B0
-3C18B0:lI120|H3C1964
-3C1964:lI45|H3C1A18
-3C1A18:lI115|H3C1ACC
-3C1ACC:lI104|H3C1B90
-3C1B90:lI97|H3C1C5C
-3C1C5C:lI114|N
-3C0F40:lI115|H3C0FFC
-3C0FFC:lI104|H3C10C0
-3C10C0:lI97|H3C118C
-3C118C:lI114|N
-3C0E98:lH3C0F50|H3C0F5C
-3C0F50:t2:H3C100C,H3C1014
-3C1014:lI97|H3C10D8
-3C10D8:lI112|H3C119C
-3C119C:lI112|H3C1260
-3C1260:lI108|H3C1324
-3C1324:lI105|H3C13F8
-3C13F8:lI99|H3C14D4
-3C14D4:lI97|H3C15A8
-3C15A8:lI116|H3C1674
-3C1674:lI105|H3C1740
-3C1740:lI111|H3C17FC
-3C17FC:lI110|H3C18B8
-3C18B8:lI47|H3C196C
-3C196C:lI120|H3C1A20
-3C1A20:lI45|H3C1AD4
-3C1AD4:lI115|H3C1B98
-3C1B98:lI104|N
-3C100C:lI115|H3C10D0
-3C10D0:lI104|N
-3C0F5C:lH3C101C|H3C1028
-3C101C:t2:H3C10E0,H3C10E8
-3C10E8:lI97|H3C11AC
-3C11AC:lI112|H3C1268
-3C1268:lI112|H3C132C
-3C132C:lI108|H3C1400
-3C1400:lI105|H3C14DC
-3C14DC:lI99|H3C15B0
-3C15B0:lI97|H3C167C
-3C167C:lI116|H3C1748
-3C1748:lI105|H3C1804
-3C1804:lI111|H3C18C0
-3C18C0:lI110|H3C1974
-3C1974:lI47|H3C1A28
-3C1A28:lI120|H3C1ADC
-3C1ADC:lI45|H3C1BA0
-3C1BA0:lI110|H3C1C64
-3C1C64:lI101|H3C1D20
-3C1D20:lI116|H3C1DDC
-3C1DDC:lI99|H3C1E98
-3C1E98:lI100|H3C1F5C
-3C1F5C:lI102|N
-3C10E0:lI110|H3C11A4
-3C11A4:lI99|N
-3C1028:lH3C10F0|H3C10FC
-3C10F0:t2:H3C11B4,H3C11BC
-3C11BC:lI97|H3C1278
-3C1278:lI112|H3C133C
-3C133C:lI112|H3C1408
-3C1408:lI108|H3C14E4
-3C14E4:lI105|H3C15B8
-3C15B8:lI99|H3C1684
-3C1684:lI97|H3C1750
-3C1750:lI116|H3C180C
-3C180C:lI105|H3C18C8
-3C18C8:lI111|H3C197C
-3C197C:lI110|H3C1A30
-3C1A30:lI47|H3C1AE4
-3C1AE4:lI120|H3C1BA8
-3C1BA8:lI45|H3C1C6C
-3C1C6C:lI110|H3C1D28
-3C1D28:lI101|H3C1DE4
-3C1DE4:lI116|H3C1EA0
-3C1EA0:lI99|H3C1F64
-3C1F64:lI100|H3C2018
-3C2018:lI102|N
-3C11B4:lI99|H3C1270
-3C1270:lI100|H3C1334
-3C1334:lI102|N
-3C10FC:lH3C11C4|H3C11D0
-3C11C4:t2:H3C1280,H3C1288
-3C1288:lI97|H3C134C
-3C134C:lI112|H3C1418
-3C1418:lI112|H3C14EC
-3C14EC:lI108|H3C15C0
-3C15C0:lI105|H3C168C
-3C168C:lI99|H3C1758
-3C1758:lI97|H3C1814
-3C1814:lI116|H3C18D0
-3C18D0:lI105|H3C1984
-3C1984:lI111|H3C1A38
-3C1A38:lI110|H3C1AEC
-3C1AEC:lI47|H3C1BB0
-3C1BB0:lI120|H3C1C74
-3C1C74:lI45|H3C1D30
-3C1D30:lI109|H3C1DEC
-3C1DEC:lI105|H3C1EA8
-3C1EA8:lI102|N
-3C1280:lI109|H3C1344
-3C1344:lI105|H3C1410
-3C1410:lI102|N
-3C11D0:lH3C1290|H3C129C
-3C1290:t2:H3C1354,H3C135C
-3C135C:lI97|H3C1428
-3C1428:lI112|H3C14FC
-3C14FC:lI112|H3C15D0
-3C15D0:lI108|H3C169C
-3C169C:lI105|H3C1760
-3C1760:lI99|H3C181C
-3C181C:lI97|H3C18D8
-3C18D8:lI116|H3C198C
-3C198C:lI105|H3C1A40
-3C1A40:lI111|H3C1AF4
-3C1AF4:lI110|H3C1BB8
-3C1BB8:lI47|H3C1C7C
-3C1C7C:lI120|H3C1D38
-3C1D38:lI45|H3C1DF4
-3C1DF4:lI108|H3C1EB0
-3C1EB0:lI97|H3C1F6C
-3C1F6C:lI116|H3C2020
-3C2020:lI101|H3C20DC
-3C20DC:lI120|N
-3C1354:lI108|H3C1420
-3C1420:lI97|H3C14F4
-3C14F4:lI116|H3C15C8
-3C15C8:lI101|H3C1694
-3C1694:lI120|N
-3C129C:lH3C1364|H3C1370
-3C1364:t2:H3C1430,H3C1438
-3C1438:lI97|H3C150C
-3C150C:lI112|H3C15E0
-3C15E0:lI112|H3C16A4
-3C16A4:lI108|H3C1768
-3C1768:lI105|H3C1824
-3C1824:lI99|H3C18E0
-3C18E0:lI97|H3C1994
-3C1994:lI116|H3C1A48
-3C1A48:lI105|H3C1AFC
-3C1AFC:lI111|H3C1BC0
-3C1BC0:lI110|H3C1C84
-3C1C84:lI47|H3C1D40
-3C1D40:lI120|H3C1DFC
-3C1DFC:lI45|H3C1EB8
-3C1EB8:lI107|H3C1F74
-3C1F74:lI111|H3C2028
-3C2028:lI97|H3C20E4
-3C20E4:lI110|N
-3C1430:lI115|H3C1504
-3C1504:lI107|H3C15D8
-3C15D8:lI112|N
-3C1370:lH3C1440|H3C144C
-3C1440:t2:H3C1514,H3C151C
-3C151C:lI97|H3C15F0
-3C15F0:lI112|H3C16B4
-3C16B4:lI112|H3C1770
-3C1770:lI108|H3C182C
-3C182C:lI105|H3C18E8
-3C18E8:lI99|H3C199C
-3C199C:lI97|H3C1A50
-3C1A50:lI116|H3C1B04
-3C1B04:lI105|H3C1BC8
-3C1BC8:lI111|H3C1C8C
-3C1C8C:lI110|H3C1D48
-3C1D48:lI47|H3C1E04
-3C1E04:lI120|H3C1EC0
-3C1EC0:lI45|H3C1F7C
-3C1F7C:lI107|H3C2030
-3C2030:lI111|H3C20EC
-3C20EC:lI97|H3C21A0
-3C21A0:lI110|N
-3C1514:lI115|H3C15E8
-3C15E8:lI107|H3C16AC
-3C16AC:lI100|N
-3C144C:lH3C1524|H3C1530
-3C1524:t2:H3C15F8,H3C1600
-3C1600:lI97|H3C16C4
-3C16C4:lI112|H3C1780
-3C1780:lI112|H3C1834
-3C1834:lI108|H3C18F0
-3C18F0:lI105|H3C19A4
-3C19A4:lI99|H3C1A58
-3C1A58:lI97|H3C1B0C
-3C1B0C:lI116|H3C1BD0
-3C1BD0:lI105|H3C1C94
-3C1C94:lI111|H3C1D50
-3C1D50:lI110|H3C1E0C
-3C1E0C:lI47|H3C1EC8
-3C1EC8:lI120|H3C1F84
-3C1F84:lI45|H3C2038
-3C2038:lI107|H3C20F4
-3C20F4:lI111|H3C21A8
-3C21A8:lI97|H3C225C
-3C225C:lI110|N
-3C15F8:lI115|H3C16BC
-3C16BC:lI107|H3C1778
-3C1778:lI116|N
-3C1530:lH3C1608|H3C1614
-3C1608:t2:H3C16CC,H3C16D4
-3C16D4:lI97|H3C1790
-3C1790:lI112|H3C1844
-3C1844:lI112|H3C18F8
-3C18F8:lI108|H3C19AC
-3C19AC:lI105|H3C1A60
-3C1A60:lI99|H3C1B14
-3C1B14:lI97|H3C1BD8
-3C1BD8:lI116|H3C1C9C
-3C1C9C:lI105|H3C1D58
-3C1D58:lI111|H3C1E14
-3C1E14:lI110|H3C1ED0
-3C1ED0:lI47|H3C1F8C
-3C1F8C:lI120|H3C2040
-3C2040:lI45|H3C20FC
-3C20FC:lI107|H3C21B0
-3C21B0:lI111|H3C2264
-3C2264:lI97|H3C2320
-3C2320:lI110|N
-3C16CC:lI115|H3C1788
-3C1788:lI107|H3C183C
-3C183C:lI109|N
-3C1614:lH3C16DC|H3C16E8
-3C16DC:t2:H3C1798,H3C17A0
-3C17A0:lI97|H3C1854
-3C1854:lI112|H3C1908
-3C1908:lI112|H3C19B4
-3C19B4:lI108|H3C1A68
-3C1A68:lI105|H3C1B1C
-3C1B1C:lI99|H3C1BE0
-3C1BE0:lI97|H3C1CA4
-3C1CA4:lI116|H3C1D60
-3C1D60:lI105|H3C1E1C
-3C1E1C:lI111|H3C1ED8
-3C1ED8:lI110|H3C1F94
-3C1F94:lI47|H3C2048
-3C2048:lI120|H3C2104
-3C2104:lI45|H3C21B8
-3C21B8:lI104|H3C226C
-3C226C:lI116|H3C2328
-3C2328:lI116|H3C23E4
-3C23E4:lI112|H3C2498
-3C2498:lI100|H3C2554
-3C2554:lI45|H3C2610
-3C2610:lI99|H3C26D4
-3C26D4:lI103|H3C2790
-3C2790:lI105|N
-3C1798:lI99|H3C184C
-3C184C:lI103|H3C1900
-3C1900:lI105|N
-3C16E8:lH3C17A8|H3C17B4
-3C17A8:t2:H3C185C,H3C1864
-3C1864:lI97|H3C1918
-3C1918:lI112|H3C19C4
-3C19C4:lI112|H3C1A70
-3C1A70:lI108|H3C1B24
-3C1B24:lI105|H3C1BE8
-3C1BE8:lI99|H3C1CAC
-3C1CAC:lI97|H3C1D68
-3C1D68:lI116|H3C1E24
-3C1E24:lI105|H3C1EE0
-3C1EE0:lI111|H3C1F9C
-3C1F9C:lI110|H3C2050
-3C2050:lI47|H3C210C
-3C210C:lI120|H3C21C0
-3C21C0:lI45|H3C2274
-3C2274:lI104|H3C2330
-3C2330:lI100|H3C23EC
-3C23EC:lI102|N
-3C185C:lI104|H3C1910
-3C1910:lI100|H3C19BC
-3C19BC:lI102|N
-3C17B4:lH3C186C|H3C1878
-3C186C:t2:H3C1920,H3C1928
-3C1928:lI97|H3C19D4
-3C19D4:lI112|H3C1A78
-3C1A78:lI112|H3C1B2C
-3C1B2C:lI108|H3C1BF0
-3C1BF0:lI105|H3C1CB4
-3C1CB4:lI99|H3C1D70
-3C1D70:lI97|H3C1E2C
-3C1E2C:lI116|H3C1EE8
-3C1EE8:lI105|H3C1FA4
-3C1FA4:lI111|H3C2058
-3C2058:lI110|H3C2114
-3C2114:lI47|H3C21C8
-3C21C8:lI120|H3C227C
-3C227C:lI45|H3C2338
-3C2338:lI103|H3C23F4
-3C23F4:lI122|H3C24A0
-3C24A0:lI105|H3C255C
-3C255C:lI112|N
-3C1920:lI103|H3C19CC
-3C19CC:lI122|N
-3C1878:lH3C1930|H3C193C
-3C1930:t2:H3C19DC,H3C19E4
-3C19E4:lI97|H3C1A88
-3C1A88:lI112|H3C1B3C
-3C1B3C:lI112|H3C1C00
-3C1C00:lI108|H3C1CBC
-3C1CBC:lI105|H3C1D78
-3C1D78:lI99|H3C1E34
-3C1E34:lI97|H3C1EF0
-3C1EF0:lI116|H3C1FAC
-3C1FAC:lI105|H3C2060
-3C2060:lI111|H3C211C
-3C211C:lI110|H3C21D0
-3C21D0:lI47|H3C2284
-3C2284:lI120|H3C2340
-3C2340:lI45|H3C23FC
-3C23FC:lI103|H3C24A8
-3C24A8:lI116|H3C2564
-3C2564:lI97|H3C2618
-3C2618:lI114|N
-3C19DC:lI103|H3C1A80
-3C1A80:lI116|H3C1B34
-3C1B34:lI97|H3C1BF8
-3C1BF8:lI114|N
-3C193C:lH3C19EC|H3C19F8
-3C19EC:t2:H3C1A90,H3C1A98
-3C1A98:lI97|H3C1B4C
-3C1B4C:lI112|H3C1C10
-3C1C10:lI112|H3C1CC4
-3C1CC4:lI108|H3C1D80
-3C1D80:lI105|H3C1E3C
-3C1E3C:lI99|H3C1EF8
-3C1EF8:lI97|H3C1FB4
-3C1FB4:lI116|H3C2068
-3C2068:lI105|H3C2124
-3C2124:lI111|H3C21D8
-3C21D8:lI110|H3C228C
-3C228C:lI47|H3C2348
-3C2348:lI120|H3C2404
-3C2404:lI45|H3C24B0
-3C24B0:lI100|H3C256C
-3C256C:lI118|H3C2620
-3C2620:lI105|N
-3C1A90:lI100|H3C1B44
-3C1B44:lI118|H3C1C08
-3C1C08:lI105|N
-3C19F8:lH3C1AA0|H3C1AAC
-3C1AA0:t2:H3C1B54,H3C1B5C
-3C1B5C:lI97|H3C1C20
-3C1C20:lI112|H3C1CD4
-3C1CD4:lI112|H3C1D88
-3C1D88:lI108|H3C1E44
-3C1E44:lI105|H3C1F00
-3C1F00:lI99|H3C1FBC
-3C1FBC:lI97|H3C2070
-3C2070:lI116|H3C212C
-3C212C:lI105|H3C21E0
-3C21E0:lI111|H3C2294
-3C2294:lI110|H3C2350
-3C2350:lI47|H3C240C
-3C240C:lI120|H3C24B8
-3C24B8:lI45|H3C2574
-3C2574:lI100|H3C2628
-3C2628:lI105|H3C26DC
-3C26DC:lI114|H3C2798
-3C2798:lI101|H3C2854
-3C2854:lI99|H3C2918
-3C2918:lI116|H3C29E4
-3C29E4:lI111|H3C2AB0
-3C2AB0:lI114|N
-3C1B54:lI100|H3C1C18
-3C1C18:lI99|H3C1CCC
-3C1CCC:lI114|N
-3C1AAC:lH3C1B64|H3C1B70
-3C1B64:t2:H3C1C28,H3C1C30
-3C1C30:lI97|H3C1CE4
-3C1CE4:lI112|H3C1D98
-3C1D98:lI112|H3C1E4C
-3C1E4C:lI108|H3C1F08
-3C1F08:lI105|H3C1FC4
-3C1FC4:lI99|H3C2078
-3C2078:lI97|H3C2134
-3C2134:lI116|H3C21E8
-3C21E8:lI105|H3C229C
-3C229C:lI111|H3C2358
-3C2358:lI110|H3C2414
-3C2414:lI47|H3C24C0
-3C24C0:lI120|H3C257C
-3C257C:lI45|H3C2630
-3C2630:lI100|H3C26E4
-3C26E4:lI105|H3C27A0
-3C27A0:lI114|H3C285C
-3C285C:lI101|H3C2920
-3C2920:lI99|H3C29EC
-3C29EC:lI116|H3C2AB8
-3C2AB8:lI111|H3C2B84
-3C2B84:lI114|N
-3C1C28:lI100|H3C1CDC
-3C1CDC:lI105|H3C1D90
-3C1D90:lI114|N
-3C1B70:lH3C1C38|H3C1C44
-3C1C38:t2:H3C1CEC,H3C1CF4
-3C1CF4:lI97|H3C1DA8
-3C1DA8:lI112|H3C1E5C
-3C1E5C:lI112|H3C1F10
-3C1F10:lI108|H3C1FCC
-3C1FCC:lI105|H3C2080
-3C2080:lI99|H3C213C
-3C213C:lI97|H3C21F0
-3C21F0:lI116|H3C22A4
-3C22A4:lI105|H3C2360
-3C2360:lI111|H3C241C
-3C241C:lI110|H3C24C8
-3C24C8:lI47|H3C2584
-3C2584:lI120|H3C2638
-3C2638:lI45|H3C26EC
-3C26EC:lI100|H3C27A8
-3C27A8:lI105|H3C2864
-3C2864:lI114|H3C2928
-3C2928:lI101|H3C29F4
-3C29F4:lI99|H3C2AC0
-3C2AC0:lI116|H3C2B8C
-3C2B8C:lI111|H3C2C48
-3C2C48:lI114|N
-3C1CEC:lI100|H3C1DA0
-3C1DA0:lI120|H3C1E54
-3C1E54:lI114|N
-3C1C44:lH3C1CFC|H3C1D08
-3C1CFC:t2:H3C1DB0,H3C1DB8
-3C1DB8:lI97|H3C1E6C
-3C1E6C:lI112|H3C1F20
-3C1F20:lI112|H3C1FD4
-3C1FD4:lI108|H3C2088
-3C2088:lI105|H3C2144
-3C2144:lI99|H3C21F8
-3C21F8:lI97|H3C22AC
-3C22AC:lI116|H3C2368
-3C2368:lI105|H3C2424
-3C2424:lI111|H3C24D0
-3C24D0:lI110|H3C258C
-3C258C:lI47|H3C2640
-3C2640:lI120|H3C26F4
-3C26F4:lI45|H3C27B0
-3C27B0:lI99|H3C286C
-3C286C:lI115|H3C2930
-3C2930:lI104|N
-3C1DB0:lI99|H3C1E64
-3C1E64:lI115|H3C1F18
-3C1F18:lI104|N
-3C1D08:lH3C1DC0|H3C1DCC
-3C1DC0:t2:H3C1E74,H3C1E7C
-3C1E7C:lI97|H3C1F30
-3C1F30:lI112|H3C1FE4
-3C1FE4:lI112|H3C2098
-3C2098:lI108|H3C214C
-3C214C:lI105|H3C2200
-3C2200:lI99|H3C22B4
-3C22B4:lI97|H3C2370
-3C2370:lI116|H3C242C
-3C242C:lI105|H3C24D8
-3C24D8:lI111|H3C2594
-3C2594:lI110|H3C2648
-3C2648:lI47|H3C26FC
-3C26FC:lI120|H3C27B8
-3C27B8:lI45|H3C2874
-3C2874:lI99|H3C2938
-3C2938:lI112|H3C29FC
-3C29FC:lI105|H3C2AC8
-3C2AC8:lI111|N
-3C1E74:lI99|H3C1F28
-3C1F28:lI112|H3C1FDC
-3C1FDC:lI105|H3C2090
-3C2090:lI111|N
-3C1DCC:lH3C1E84|H3C1E90
-3C1E84:t2:H3C1F38,H3C1F40
-3C1F40:lI97|H3C1FEC
-3C1FEC:lI112|H3C20A0
-3C20A0:lI112|H3C2154
-3C2154:lI108|H3C2208
-3C2208:lI105|H3C22BC
-3C22BC:lI99|H3C2378
-3C2378:lI97|H3C2434
-3C2434:lI116|H3C24E0
-3C24E0:lI105|H3C259C
-3C259C:lI111|H3C2650
-3C2650:lI110|H3C2704
-3C2704:lI47|H3C27C0
-3C27C0:lI120|H3C287C
-3C287C:lI45|H3C2940
-3C2940:lI99|H3C2A04
-3C2A04:lI111|H3C2AD0
-3C2AD0:lI109|H3C2B94
-3C2B94:lI112|H3C2C50
-3C2C50:lI114|H3C2D00
-3C2D00:lI101|H3C2DA8
-3C2DA8:lI115|H3C2E40
-3C2E40:lI115|N
-3C1F38:lI90|N
-3C1E90:lH3C1F48|H3C1F54
-3C1F48:t2:H3C1FF4,H3C1FFC
-3C1FFC:lI97|H3C20B0
-3C20B0:lI112|H3C2164
-3C2164:lI112|H3C2210
-3C2210:lI108|H3C22C4
-3C22C4:lI105|H3C2380
-3C2380:lI99|H3C243C
-3C243C:lI97|H3C24E8
-3C24E8:lI116|H3C25A4
-3C25A4:lI105|H3C2658
-3C2658:lI111|H3C270C
-3C270C:lI110|H3C27C8
-3C27C8:lI47|H3C2884
-3C2884:lI120|H3C2948
-3C2948:lI45|H3C2A0C
-3C2A0C:lI99|H3C2AD8
-3C2AD8:lI100|H3C2B9C
-3C2B9C:lI108|H3C2C58
-3C2C58:lI105|H3C2D08
-3C2D08:lI110|H3C2DB0
-3C2DB0:lI107|N
-3C1FF4:lI118|H3C20A8
-3C20A8:lI99|H3C215C
-3C215C:lI100|N
-3C1F54:lH3C2004|H3C2010
-3C2004:t2:H3C20B8,H3C20C0
-3C20C0:lI97|H3C2174
-3C2174:lI112|H3C2220
-3C2220:lI112|H3C22D4
-3C22D4:lI108|H3C2390
-3C2390:lI105|H3C2444
-3C2444:lI99|H3C24F0
-3C24F0:lI97|H3C25AC
-3C25AC:lI116|H3C2660
-3C2660:lI105|H3C2714
-3C2714:lI111|H3C27D0
-3C27D0:lI110|H3C288C
-3C288C:lI47|H3C2950
-3C2950:lI120|H3C2A14
-3C2A14:lI45|H3C2AE0
-3C2AE0:lI98|H3C2BA4
-3C2BA4:lI99|H3C2C60
-3C2C60:lI112|H3C2D10
-3C2D10:lI105|H3C2DB8
-3C2DB8:lI111|N
-3C20B8:lI98|H3C216C
-3C216C:lI99|H3C2218
-3C2218:lI112|H3C22CC
-3C22CC:lI105|H3C2388
-3C2388:lI111|N
-3C2010:lH3C20C8|H3C20D4
-3C20C8:t2:H3C217C,H3C2184
-3C2184:lI97|H3C2230
-3C2230:lI112|H3C22E4
-3C22E4:lI112|H3C2398
-3C2398:lI108|H3C244C
-3C244C:lI105|H3C24F8
-3C24F8:lI99|H3C25B4
-3C25B4:lI97|H3C2668
-3C2668:lI116|H3C271C
-3C271C:lI105|H3C27D8
-3C27D8:lI111|H3C2894
-3C2894:lI110|H3C2958
-3C2958:lI47|H3C2A1C
-3C2A1C:lI114|H3C2AE8
-3C2AE8:lI116|H3C2BAC
-3C2BAC:lI102|N
-3C217C:lI114|H3C2228
-3C2228:lI116|H3C22DC
-3C22DC:lI102|N
-3C20D4:lH3C218C|H3C2198
-3C218C:t2:H3C2238,H3C2240
-3C2240:lI97|H3C22F4
-3C22F4:lI112|H3C23A8
-3C23A8:lI112|H3C2454
-3C2454:lI108|H3C2500
-3C2500:lI105|H3C25BC
-3C25BC:lI99|H3C2670
-3C2670:lI97|H3C2724
-3C2724:lI116|H3C27E0
-3C27E0:lI105|H3C289C
-3C289C:lI111|H3C2960
-3C2960:lI110|H3C2A24
-3C2A24:lI47|H3C2AF0
-3C2AF0:lI112|H3C2BB4
-3C2BB4:lI111|H3C2C68
-3C2C68:lI119|H3C2D18
-3C2D18:lI101|H3C2DC0
-3C2DC0:lI114|H3C2E48
-3C2E48:lI112|H3C2EC0
-3C2EC0:lI111|H3C2F38
-3C2F38:lI105|H3C2FA8
-3C2FA8:lI110|H3C3010
-3C3010:lI116|N
-3C2238:lI112|H3C22EC
-3C22EC:lI112|H3C23A0
-3C23A0:lI116|N
-3C2198:lH3C2248|H3C2254
-3C2248:t2:H3C22FC,H3C2304
-3C2304:lI97|H3C23B8
-3C23B8:lI112|H3C245C
-3C245C:lI112|H3C2508
-3C2508:lI108|H3C25C4
-3C25C4:lI105|H3C2678
-3C2678:lI99|H3C272C
-3C272C:lI97|H3C27E8
-3C27E8:lI116|H3C28A4
-3C28A4:lI105|H3C2968
-3C2968:lI111|H3C2A2C
-3C2A2C:lI110|H3C2AF8
-3C2AF8:lI47|H3C2BBC
-3C2BBC:lI112|H3C2C70
-3C2C70:lI111|H3C2D20
-3C2D20:lI115|H3C2DC8
-3C2DC8:lI116|H3C2E50
-3C2E50:lI115|H3C2EC8
-3C2EC8:lI99|H3C2F40
-3C2F40:lI114|H3C2FB0
-3C2FB0:lI105|H3C3018
-3C3018:lI112|H3C3078
-3C3078:lI116|N
-3C22FC:lI97|H3C23B0
-3C23B0:lI105|N
-3C2254:lH3C230C|H3C2318
-3C230C:t2:H3C23C0,H3C23C8
-3C23C8:lI97|H3C246C
-3C246C:lI112|H3C2518
-3C2518:lI112|H3C25CC
-3C25CC:lI108|H3C2680
-3C2680:lI105|H3C2734
-3C2734:lI99|H3C27F0
-3C27F0:lI97|H3C28AC
-3C28AC:lI116|H3C2970
-3C2970:lI105|H3C2A34
-3C2A34:lI111|H3C2B00
-3C2B00:lI110|H3C2BC4
-3C2BC4:lI47|H3C2C78
-3C2C78:lI112|H3C2D28
-3C2D28:lI111|H3C2DD0
-3C2DD0:lI115|H3C2E58
-3C2E58:lI116|H3C2ED0
-3C2ED0:lI115|H3C2F48
-3C2F48:lI99|H3C2FB8
-3C2FB8:lI114|H3C3020
-3C3020:lI105|H3C3080
-3C3080:lI112|H3C30D8
-3C30D8:lI116|N
-3C23C0:lI101|H3C2464
-3C2464:lI112|H3C2510
-3C2510:lI115|N
-3C2318:lH3C23D0|H3C23DC
-3C23D0:t2:H3C2474,H3C247C
-3C247C:lI97|H3C2528
-3C2528:lI112|H3C25D4
-3C25D4:lI112|H3C2688
-3C2688:lI108|H3C273C
-3C273C:lI105|H3C27F8
-3C27F8:lI99|H3C28B4
-3C28B4:lI97|H3C2978
-3C2978:lI116|H3C2A3C
-3C2A3C:lI105|H3C2B08
-3C2B08:lI111|H3C2BCC
-3C2BCC:lI110|H3C2C80
-3C2C80:lI47|H3C2D30
-3C2D30:lI112|H3C2DD8
-3C2DD8:lI111|H3C2E60
-3C2E60:lI115|H3C2ED8
-3C2ED8:lI116|H3C2F50
-3C2F50:lI115|H3C2FC0
-3C2FC0:lI99|H3C3028
-3C3028:lI114|H3C3088
-3C3088:lI105|H3C30E0
-3C30E0:lI112|H3C3130
-3C3130:lI116|N
-3C2474:lI112|H3C2520
-3C2520:lI115|N
-3C23DC:lH3C2484|H3C2490
-3C2484:t2:H3C2530,H3C2538
-3C2538:lI97|H3C25E4
-3C25E4:lI112|H3C2698
-3C2698:lI112|H3C2744
-3C2744:lI108|H3C2800
-3C2800:lI105|H3C28BC
-3C28BC:lI99|H3C2980
-3C2980:lI97|H3C2A44
-3C2A44:lI116|H3C2B10
-3C2B10:lI105|H3C2BD4
-3C2BD4:lI111|H3C2C88
-3C2C88:lI110|H3C2D38
-3C2D38:lI47|H3C2DE0
-3C2DE0:lI112|H3C2E68
-3C2E68:lI100|H3C2EE0
-3C2EE0:lI102|N
-3C2530:lI112|H3C25DC
-3C25DC:lI100|H3C2690
-3C2690:lI102|N
-3C2490:lH3C2540|H3C254C
-3C2540:t2:H3C25EC,H3C25F4
-3C25F4:lI97|H3C26A8
-3C26A8:lI112|H3C2754
-3C2754:lI112|H3C2808
-3C2808:lI108|H3C28C4
-3C28C4:lI105|H3C2988
-3C2988:lI99|H3C2A4C
-3C2A4C:lI97|H3C2B18
-3C2B18:lI116|H3C2BDC
-3C2BDC:lI105|H3C2C90
-3C2C90:lI111|H3C2D40
-3C2D40:lI110|H3C2DE8
-3C2DE8:lI47|H3C2E70
-3C2E70:lI111|H3C2EE8
-3C2EE8:lI100|H3C2F58
-3C2F58:lI97|N
-3C25EC:lI111|H3C26A0
-3C26A0:lI100|H3C274C
-3C274C:lI97|N
-3C254C:lH3C25FC|H3C2608
-3C25FC:t2:H3C26B0,H3C26B8
-3C26B8:lI97|H3C2764
-3C2764:lI112|H3C2818
-3C2818:lI112|H3C28CC
-3C28CC:lI108|H3C2990
-3C2990:lI105|H3C2A54
-3C2A54:lI99|H3C2B20
-3C2B20:lI97|H3C2BE4
-3C2BE4:lI116|H3C2C98
-3C2C98:lI105|H3C2D48
-3C2D48:lI111|H3C2DF0
-3C2DF0:lI110|H3C2E78
-3C2E78:lI47|H3C2EF0
-3C2EF0:lI111|H3C2F60
-3C2F60:lI99|H3C2FC8
-3C2FC8:lI116|H3C3030
-3C3030:lI101|H3C3090
-3C3090:lI116|H3C30E8
-3C30E8:lI45|H3C3138
-3C3138:lI115|H3C3180
-3C3180:lI116|H3C31C8
-3C31C8:lI114|H3C3210
-3C3210:lI101|H3C3258
-3C3258:lI97|H3C32A0
-3C32A0:lI109|N
-3C26B0:lI98|H3C275C
-3C275C:lI105|H3C2810
-3C2810:lI110|N
-3C2608:lH3C26C0|H3C26CC
-3C26C0:t2:H3C276C,H3C2774
-3C2774:lI97|H3C2828
-3C2828:lI112|H3C28DC
-3C28DC:lI112|H3C2998
-3C2998:lI108|H3C2A5C
-3C2A5C:lI105|H3C2B28
-3C2B28:lI99|H3C2BEC
-3C2BEC:lI97|H3C2CA0
-3C2CA0:lI116|H3C2D50
-3C2D50:lI105|H3C2DF8
-3C2DF8:lI111|H3C2E80
-3C2E80:lI110|H3C2EF8
-3C2EF8:lI47|H3C2F68
-3C2F68:lI111|H3C2FD0
-3C2FD0:lI99|H3C3038
-3C3038:lI116|H3C3098
-3C3098:lI101|H3C30F0
-3C30F0:lI116|H3C3140
-3C3140:lI45|H3C3188
-3C3188:lI115|H3C31D0
-3C31D0:lI116|H3C3218
-3C3218:lI114|H3C3260
-3C3260:lI101|H3C32A8
-3C32A8:lI97|H3C32E8
-3C32E8:lI109|N
-3C276C:lI100|H3C2820
-3C2820:lI109|H3C28D4
-3C28D4:lI115|N
-3C26CC:lH3C277C|H3C2788
-3C277C:t2:H3C2830,H3C2838
-3C2838:lI97|H3C28EC
-3C28EC:lI112|H3C29A8
-3C29A8:lI112|H3C2A64
-3C2A64:lI108|H3C2B30
-3C2B30:lI105|H3C2BF4
-3C2BF4:lI99|H3C2CA8
-3C2CA8:lI97|H3C2D58
-3C2D58:lI116|H3C2E00
-3C2E00:lI105|H3C2E88
-3C2E88:lI111|H3C2F00
-3C2F00:lI110|H3C2F70
-3C2F70:lI47|H3C2FD8
-3C2FD8:lI111|H3C3040
-3C3040:lI99|H3C30A0
-3C30A0:lI116|H3C30F8
-3C30F8:lI101|H3C3148
-3C3148:lI116|H3C3190
-3C3190:lI45|H3C31D8
-3C31D8:lI115|H3C3220
-3C3220:lI116|H3C3268
-3C3268:lI114|H3C32B0
-3C32B0:lI101|H3C32F0
-3C32F0:lI97|H3C3320
-3C3320:lI109|N
-3C2830:lI108|H3C28E4
-3C28E4:lI104|H3C29A0
-3C29A0:lI97|N
-3C2788:lH3C2840|H3C284C
-3C2840:t2:H3C28F4,H3C28FC
-3C28FC:lI97|H3C29B8
-3C29B8:lI112|H3C2A74
-3C2A74:lI112|H3C2B38
-3C2B38:lI108|H3C2BFC
-3C2BFC:lI105|H3C2CB0
-3C2CB0:lI99|H3C2D60
-3C2D60:lI97|H3C2E08
-3C2E08:lI116|H3C2E90
-3C2E90:lI105|H3C2F08
-3C2F08:lI111|H3C2F78
-3C2F78:lI110|H3C2FE0
-3C2FE0:lI47|H3C3048
-3C3048:lI111|H3C30A8
-3C30A8:lI99|H3C3100
-3C3100:lI116|H3C3150
-3C3150:lI101|H3C3198
-3C3198:lI116|H3C31E0
-3C31E0:lI45|H3C3228
-3C3228:lI115|H3C3270
-3C3270:lI116|H3C32B8
-3C32B8:lI114|H3C32F8
-3C32F8:lI101|H3C3328
-3C3328:lI97|H3C3350
-3C3350:lI109|N
-3C28F4:lI108|H3C29B0
-3C29B0:lI122|H3C2A6C
-3C2A6C:lI104|N
-3C284C:lH3C2904|H3C2910
-3C2904:t2:H3C29C0,H3C29C8
-3C29C8:lI97|H3C2A84
-3C2A84:lI112|H3C2B48
-3C2B48:lI112|H3C2C04
-3C2C04:lI108|H3C2CB8
-3C2CB8:lI105|H3C2D68
-3C2D68:lI99|H3C2E10
-3C2E10:lI97|H3C2E98
-3C2E98:lI116|H3C2F10
-3C2F10:lI105|H3C2F80
-3C2F80:lI111|H3C2FE8
-3C2FE8:lI110|H3C3050
-3C3050:lI47|H3C30B0
-3C30B0:lI111|H3C3108
-3C3108:lI99|H3C3158
-3C3158:lI116|H3C31A0
-3C31A0:lI101|H3C31E8
-3C31E8:lI116|H3C3230
-3C3230:lI45|H3C3278
-3C3278:lI115|H3C32C0
-3C32C0:lI116|H3C3300
-3C3300:lI114|H3C3330
-3C3330:lI101|H3C3358
-3C3358:lI97|H3C3378
-3C3378:lI109|N
-3C29C0:lI101|H3C2A7C
-3C2A7C:lI120|H3C2B40
-3C2B40:lI101|N
-3C2910:lH3C29D0|H3C29DC
-3C29D0:t2:H3C2A8C,H3C2A94
-3C2A94:lI97|H3C2B58
-3C2B58:lI112|H3C2C14
-3C2C14:lI112|H3C2CC8
-3C2CC8:lI108|H3C2D78
-3C2D78:lI105|H3C2E18
-3C2E18:lI99|H3C2EA0
-3C2EA0:lI97|H3C2F18
-3C2F18:lI116|H3C2F88
-3C2F88:lI105|H3C2FF0
-3C2FF0:lI111|H3C3058
-3C3058:lI110|H3C30B8
-3C30B8:lI47|H3C3110
-3C3110:lI111|H3C3160
-3C3160:lI99|H3C31A8
-3C31A8:lI116|H3C31F0
-3C31F0:lI101|H3C3238
-3C3238:lI116|H3C3280
-3C3280:lI45|H3C32C8
-3C32C8:lI115|H3C3308
-3C3308:lI116|H3C3338
-3C3338:lI114|H3C3360
-3C3360:lI101|H3C3380
-3C3380:lI97|H3C3398
-3C3398:lI109|N
-3C2A8C:lI99|H3C2B50
-3C2B50:lI108|H3C2C0C
-3C2C0C:lI97|H3C2CC0
-3C2CC0:lI115|H3C2D70
-3C2D70:lI115|N
-3C29DC:lH3C2A9C|H3C2AA8
-3C2A9C:t2:H3C2B60,H3C2B68
-3C2B68:lI97|H3C2C24
-3C2C24:lI112|H3C2CD8
-3C2CD8:lI112|H3C2D80
-3C2D80:lI108|H3C2E20
-3C2E20:lI105|H3C2EA8
-3C2EA8:lI99|H3C2F20
-3C2F20:lI97|H3C2F90
-3C2F90:lI116|H3C2FF8
-3C2FF8:lI105|H3C3060
-3C3060:lI111|H3C30C0
-3C30C0:lI110|H3C3118
-3C3118:lI47|H3C3168
-3C3168:lI109|H3C31B0
-3C31B0:lI115|H3C31F8
-3C31F8:lI119|H3C3240
-3C3240:lI111|H3C3288
-3C3288:lI114|H3C32D0
-3C32D0:lI100|N
-3C2B60:lI100|H3C2C1C
-3C2C1C:lI111|H3C2CD0
-3C2CD0:lI99|N
-3C2AA8:lH3C2B70|H3C2B7C
-3C2B70:t2:H3C2C2C,H3C2C34
-3C2C34:lI97|H3C2CE8
-3C2CE8:lI112|H3C2D90
-3C2D90:lI112|H3C2E28
-3C2E28:lI108|H3C2EB0
-3C2EB0:lI105|H3C2F28
-3C2F28:lI99|H3C2F98
-3C2F98:lI97|H3C3000
-3C3000:lI116|H3C3068
-3C3068:lI105|H3C30C8
-3C30C8:lI111|H3C3120
-3C3120:lI110|H3C3170
-3C3170:lI47|H3C31B8
-3C31B8:lI109|H3C3200
-3C3200:lI97|H3C3248
-3C3248:lI99|H3C3290
-3C3290:lI45|H3C32D8
-3C32D8:lI99|H3C3310
-3C3310:lI111|H3C3340
-3C3340:lI109|H3C3368
-3C3368:lI112|H3C3388
-3C3388:lI97|H3C33A0
-3C33A0:lI99|H3C33B0
-3C33B0:lI116|H3C33C0
-3C33C0:lI112|H3C33D0
-3C33D0:lI114|H3C33E0
-3C33E0:lI111|N
-3C2C2C:lI99|H3C2CE0
-3C2CE0:lI112|H3C2D88
-3C2D88:lI116|N
-3C2B7C:lH3C2C3C|N
-3C2C3C:t2:H3C2CF0,H3C2CF8
-3C2CF8:lI97|H3C2DA0
-3C2DA0:lI112|H3C2E38
-3C2E38:lI112|H3C2EB8
-3C2EB8:lI108|H3C2F30
-3C2F30:lI105|H3C2FA0
-3C2FA0:lI99|H3C3008
-3C3008:lI97|H3C3070
-3C3070:lI116|H3C30D0
-3C30D0:lI105|H3C3128
-3C3128:lI111|H3C3178
-3C3178:lI110|H3C31C0
-3C31C0:lI47|H3C3208
-3C3208:lI109|H3C3250
-3C3250:lI97|H3C3298
-3C3298:lI99|H3C32E0
-3C32E0:lI45|H3C3318
-3C3318:lI98|H3C3348
-3C3348:lI105|H3C3370
-3C3370:lI110|H3C3390
-3C3390:lI104|H3C33A8
-3C33A8:lI101|H3C33B8
-3C33B8:lI120|H3C33C8
-3C33C8:lI52|H3C33D8
-3C33D8:lI48|N
-3C2CF0:lI104|H3C2D98
-3C2D98:lI113|H3C2E30
-3C2E30:lI120|N
-3BDBCC:lH3BDA78|H3BDA8C
-3BDA78:t2:A4:port,I8888
-3BDA8C:lH3BDB04|H3BDB10
-3BDB04:t2:AC:bind_address,H3BDB64
-3BDB64:t4:I127,I0,I0,I1
-3BDB10:lH3BDB78|H3BDB84
-3BDB78:t2:AB:server_name,H3BDBD4
-3BDBD4:lI108|H3BDC24
-3BDC24:lI111|H3BDC88
-3BDC88:lI99|H3BDCF0
-3BDCF0:lI97|H3BDD70
-3BDD70:lI108|H3BDDF8
-3BDDF8:lI104|H3BDE90
-3BDE90:lI111|H3BDF40
-3BDF40:lI115|H3BDFFC
-3BDFFC:lI116|N
-3BDB84:lH3BDBDC|H3BDBE8
-3BDBDC:t2:AE:max_header_siz,I1024
-3BDBE8:lH3BDC2C|H3BDC38
-3BDC2C:t2:A11:max_header_action,A8:reply414
-3BDC38:lH3BDC90|H3BDC9C
-3BDC90:t2:A8:com_type,A7:ip_comm
-3BDC9C:lH3BDCF8|H3BDD04
-3BDCF8:t2:A7:modules,H3BDD78
-3BDD78:lA9:mod_alias|H3BDE00
-3BDE00:lA8:mod_auth|H3BDE98
-3BDE98:lA7:mod_esi|H3BDF48
-3BDF48:lAB:mod_actions|H3BE004
-3BE004:lA7:mod_cgi|H3BE0D0
-3BE0D0:lAB:mod_include|H3BE1A4
-3BE1A4:lA7:mod_dir|H3BE288
-3BE288:lA7:mod_get|H3BE378
-3BE378:lA8:mod_head|H3BE47C
-3BE47C:lA7:mod_log|H3BE580
-3BE580:lAC:mod_disk_log|N
-3BDD04:lH3BDD80|H3BDD8C
-3BDD80:t2:AF:directory_index,H3BDE08
-3BDE08:lH3BDEA0|N
-3BDEA0:lI105|H3BDF50
-3BDF50:lI110|H3BE00C
-3BE00C:lI100|H3BE0D8
-3BE0D8:lI101|H3BE1AC
-3BE1AC:lI120|H3BE290
-3BE290:lI46|H3BE380
-3BE380:lI104|H3BE484
-3BE484:lI116|H3BE588
-3BE588:lI109|H3BE68C
-3BE68C:lI108|N
-3BDD8C:lH3BDE10|H3BDE1C
-3BDE10:t2:AC:default_type,H3BDEA8
-3BDEA8:lI116|H3BDF58
-3BDF58:lI101|H3BE014
-3BE014:lI120|H3BE0E0
-3BE0E0:lI116|H3BE1B4
-3BE1B4:lI47|H3BE298
-3BE298:lI112|H3BE388
-3BE388:lI108|H3BE48C
-3BE48C:lI97|H3BE590
-3BE590:lI105|H3BE694
-3BE694:lI110|N
-3BDE1C:lH3BDEB0|H3BDEBC
-3BDEB0:t2:A10:erl_script_alias,H3BDF60
-3BDF60:t2:H3BE01C,H3BE024
-3BE024:lH3BE0F0|N
-3BE0F0:lI119|H3BE1C4
-3BE1C4:lI101|H3BE2A8
-3BE2A8:lI98|H3BE398
-3BE398:lI116|H3BE49C
-3BE49C:lI111|H3BE5A0
-3BE5A0:lI111|H3BE6A4
-3BE6A4:lI108|N
-3BE01C:lI47|H3BE0E8
-3BE0E8:lI119|H3BE1BC
-3BE1BC:lI101|H3BE2A0
-3BE2A0:lI98|H3BE390
-3BE390:lI116|H3BE494
-3BE494:lI111|H3BE598
-3BE598:lI111|H3BE69C
-3BE69C:lI108|N
-3BDEBC:lH3BDF6C|H3BDF78
-3BDF6C:t2:A5:alias,H3BE02C
-3BE02C:t2:H3BE0F8,H3BE100
-3BE100:lI47|H3BE1D4
-3BE1D4:lI99|H3BE2B8
-3BE2B8:lI108|H3BE3A8
-3BE3A8:lI101|H3BE4AC
-3BE4AC:lI97|H3BE5B0
-3BE5B0:lI114|H3BE6B4
-3BE6B4:lI99|H3BE7A8
-3BE7A8:lI97|H3BE894
-3BE894:lI115|H3BE980
-3BE980:lI101|H3BEA74
-3BEA74:lI47|H3BEB68
-3BEB68:lI111|H3BEC54
-3BEC54:lI116|H3BED40
-3BED40:lI112|H3BEE2C
-3BEE2C:lI47|H3BEF00
-3BEF00:lI101|H3BEFD4
-3BEFD4:lI114|H3BF0A0
-3BF0A0:lI116|H3BF174
-3BF174:lI115|H3BF238
-3BF238:lI47|H3BF2FC
-3BF2FC:lI108|H3BF3A8
-3BF3A8:lI105|H3BF45C
-3BF45C:lI98|H3BF518
-3BF518:lI47|H3BF5DC
-3BF5DC:lI111|H3BF6B0
-3BF6B0:lI98|H3BF784
-3BF784:lI115|H3BF858
-3BF858:lI101|H3BF93C
-3BF93C:lI114|H3BFA18
-3BFA18:lI118|H3BFAF4
-3BFAF4:lI101|H3BFBD0
-3BFBD0:lI114|H3BFC9C
-3BFC9C:lI47|H3BFD60
-3BFD60:lI112|H3BFE2C
-3BFE2C:lI114|H3BFEE0
-3BFEE0:lI105|H3BFF94
-3BFF94:lI118|H3C0040
-3C0040:lI47|H3C00EC
-3C00EC:lI99|H3C0198
-3C0198:lI114|H3C024C
-3C024C:lI97|H3C0308
-3C0308:lI115|H3C03BC
-3C03BC:lI104|H3C0458
-3C0458:lI100|H3C04F4
-3C04F4:lI117|H3C0590
-3C0590:lI109|H3C0634
-3C0634:lI112|H3C06E0
-3C06E0:lI95|H3C078C
-3C078C:lI118|H3C0830
-3C0830:lI105|H3C08BC
-3C08BC:lI101|H3C0950
-3C0950:lI119|H3C09E4
-3C09E4:lI101|H3C0A80
-3C0A80:lI114|N
-3BE0F8:lI47|H3BE1CC
-3BE1CC:lI99|H3BE2B0
-3BE2B0:lI114|H3BE3A0
-3BE3A0:lI97|H3BE4A4
-3BE4A4:lI115|H3BE5A8
-3BE5A8:lI104|H3BE6AC
-3BE6AC:lI100|H3BE7A0
-3BE7A0:lI117|H3BE88C
-3BE88C:lI109|H3BE978
-3BE978:lI112|H3BEA6C
-3BEA6C:lI95|H3BEB60
-3BEB60:lI118|H3BEC4C
-3BEC4C:lI105|H3BED38
-3BED38:lI101|H3BEE24
-3BEE24:lI119|H3BEEF8
-3BEEF8:lI101|H3BEFCC
-3BEFCC:lI114|N
-3BDF78:lH3BE038|H3BE044
-3BE038:t2:A5:alias,H3BE108
-3BE108:t2:H3BE1DC,H3BE1E4
-3BE1E4:lI47|H3BE2C8
-3BE2C8:lI99|H3BE3B8
-3BE3B8:lI108|H3BE4BC
-3BE4BC:lI101|H3BE5C0
-3BE5C0:lI97|H3BE6C4
-3BE6C4:lI114|H3BE7B8
-3BE7B8:lI99|H3BE8A4
-3BE8A4:lI97|H3BE990
-3BE990:lI115|H3BEA84
-3BEA84:lI101|H3BEB78
-3BEB78:lI47|H3BEC64
-3BEC64:lI111|H3BED50
-3BED50:lI116|H3BEE3C
-3BEE3C:lI112|H3BEF10
-3BEF10:lI47|H3BEFE4
-3BEFE4:lI101|H3BF0B0
-3BF0B0:lI114|H3BF184
-3BF184:lI116|H3BF248
-3BF248:lI115|H3BF304
-3BF304:lI47|H3BF3B0
-3BF3B0:lI101|H3BF464
-3BF464:lI114|H3BF520
-3BF520:lI116|H3BF5E4
-3BF5E4:lI115|H3BF6B8
-3BF6B8:lI47|H3BF78C
-3BF78C:lI100|H3BF860
-3BF860:lI111|H3BF944
-3BF944:lI99|H3BFA20
-3BFA20:lI47|H3BFAFC
-3BFAFC:lI104|H3BFBD8
-3BFBD8:lI116|H3BFCA4
-3BFCA4:lI109|H3BFD68
-3BFD68:lI108|N
-3BE1DC:lI47|H3BE2C0
-3BE2C0:lI99|H3BE3B0
-3BE3B0:lI114|H3BE4B4
-3BE4B4:lI97|H3BE5B8
-3BE5B8:lI115|H3BE6BC
-3BE6BC:lI104|H3BE7B0
-3BE7B0:lI100|H3BE89C
-3BE89C:lI117|H3BE988
-3BE988:lI109|H3BEA7C
-3BEA7C:lI112|H3BEB70
-3BEB70:lI95|H3BEC5C
-3BEC5C:lI101|H3BED48
-3BED48:lI114|H3BEE34
-3BEE34:lI116|H3BEF08
-3BEF08:lI115|H3BEFDC
-3BEFDC:lI95|H3BF0A8
-3BF0A8:lI100|H3BF17C
-3BF17C:lI111|H3BF240
-3BF240:lI99|N
-3BE044:lH3BE114|H3BE120
-3BE114:t2:A5:alias,H3BE1EC
-3BE1EC:t2:H3BE2D0,H3BE2D8
-3BE2D8:lI47|H3BE3C8
-3BE3C8:lI99|H3BE4CC
-3BE4CC:lI108|H3BE5D0
-3BE5D0:lI101|H3BE6D4
-3BE6D4:lI97|H3BE7C8
-3BE7C8:lI114|H3BE8B4
-3BE8B4:lI99|H3BE9A0
-3BE9A0:lI97|H3BEA94
-3BEA94:lI115|H3BEB88
-3BEB88:lI101|H3BEC74
-3BEC74:lI47|H3BED60
-3BED60:lI111|H3BEE4C
-3BEE4C:lI116|H3BEF20
-3BEF20:lI112|H3BEFEC
-3BEFEC:lI47|H3BF0B8
-3BF0B8:lI101|H3BF18C
-3BF18C:lI114|H3BF250
-3BF250:lI116|H3BF30C
-3BF30C:lI115|H3BF3B8
-3BF3B8:lI47|H3BF46C
-3BF46C:lI108|H3BF528
-3BF528:lI105|H3BF5EC
-3BF5EC:lI98|H3BF6C0
-3BF6C0:lI47|H3BF794
-3BF794:lI111|H3BF868
-3BF868:lI98|H3BF94C
-3BF94C:lI115|H3BFA28
-3BFA28:lI101|H3BFB04
-3BFB04:lI114|H3BFBE0
-3BFBE0:lI118|H3BFCAC
-3BFCAC:lI101|H3BFD70
-3BFD70:lI114|H3BFE34
-3BFE34:lI47|H3BFEE8
-3BFEE8:lI100|H3BFF9C
-3BFF9C:lI111|H3C0048
-3C0048:lI99|H3C00F4
-3C00F4:lI47|H3C01A0
-3C01A0:lI104|H3C0254
-3C0254:lI116|H3C0310
-3C0310:lI109|H3C03C4
-3C03C4:lI108|N
-3BE2D0:lI47|H3BE3C0
-3BE3C0:lI99|H3BE4C4
-3BE4C4:lI114|H3BE5C8
-3BE5C8:lI97|H3BE6CC
-3BE6CC:lI115|H3BE7C0
-3BE7C0:lI104|H3BE8AC
-3BE8AC:lI100|H3BE998
-3BE998:lI117|H3BEA8C
-3BEA8C:lI109|H3BEB80
-3BEB80:lI112|H3BEC6C
-3BEC6C:lI95|H3BED58
-3BED58:lI100|H3BEE44
-3BEE44:lI111|H3BEF18
-3BEF18:lI99|N
-3BE120:lH3BE1F8|N
-3BE1F8:t2:A10:erl_script_alias,H3BE2E0
-3BE2E0:t2:H3BE3D0,H3BE3D8
-3BE3D8:lH3BE4DC|N
-3BE4DC:lI99|H3BE5E0
-3BE5E0:lI114|H3BE6E4
-3BE6E4:lI97|H3BE7D8
-3BE7D8:lI115|H3BE8C4
-3BE8C4:lI104|H3BE9B0
-3BE9B0:lI100|H3BEAA4
-3BEAA4:lI117|H3BEB90
-3BEB90:lI109|H3BEC7C
-3BEC7C:lI112|H3BED68
-3BED68:lI95|H3BEE54
-3BEE54:lI118|H3BEF28
-3BEF28:lI105|H3BEFF4
-3BEFF4:lI101|H3BF0C0
-3BF0C0:lI119|H3BF194
-3BF194:lI101|H3BF258
-3BF258:lI114|N
-3BE3D0:lI47|H3BE4D4
-3BE4D4:lI99|H3BE5D8
-3BE5D8:lI100|H3BE6DC
-3BE6DC:lI118|H3BE7D0
-3BE7D0:lI95|H3BE8BC
-3BE8BC:lI101|H3BE9A8
-3BE9A8:lI114|H3BEA9C
-3BEA9C:lI108|N
-3BDE2C:lH3BDA9C|H3BDECC
-3BDA9C:t4:I127,I0,I0,I1
-3BDECC:lI8888|H3BDF88
-3BDF88:lN|N
-3BDD1C:lN|N
-3BDA50:t2:AD:$initial_call,H3BDAB8
-3BDAB8:t3:A3:gen,A7:init_it,H3BDAB0
-3BDA5C:t2:A9:verbosity,A7:silence
-3BDAC8:t2:AE:auth_verbosity,A7:silence
-3BDB28:t2:A12:security_verbosity,A7:silence
-3BDB9C:t2:A12:acceptor_verbosity,A7:silence
-3BDC00:t2:AA:$ancestors,H3BDC5C
-3BDC5C:lA1A:httpd_sup__127_0_0_1__8888|H3BDCB4
-3BDCB4:lA8:web_tool|H3BDD24
-3BDD24:lP<0.27.0>|N
-3BDADC:t2:A19:request_handler_verbosity,A7:silence
-3BDB3C:t2:A5:sname,A3:man
-=proc_dictionary:<0.47.0>
-H36E688
-H36E694
-H36E6A0
-H36E6AC
-=proc_stack:<0.47.0>
-36c520:SReturn addr 0x362C9C (inet_tcp:accept/2 + 20)
-y0:I5
-y1:p<0.161>
-y2:p<0.141>
-36c530:SReturn addr 0x500C5C (httpd_socket:accept/3 + 280)
-y0:N
-36c538:SReturn addr 0x502BFC (httpd_acceptor:acceptor/4 + 164)
-y0:N
-36c540:SReturn addr 0x225860 (proc_lib:init_p/5 + 164)
-y0:SCatch 0x502BFC (httpd_acceptor:acceptor/4 + 164)
-y1:P<0.46.0>
-y2:A7:ip_comm
-y3:p<0.141>
-y4:A1B:httpd_conf__127_0_0_1__8888
-36c558:SReturn addr 0x156F90 (<terminate process normally>)
-y0:SCatch 0x225860 (proc_lib:init_p/5 + 164)
-y1:AE:httpd_acceptor
-y2:A8:acceptor
-y3:H36E6C8
-=proc_heap:<0.47.0>
-36E6C8:lP<0.44.0>|H36E724
-36E724:lP<0.46.0>|H36E748
-36E748:lA7:ip_comm|H36E760
-36E760:lH36E6D0|H36E778
-36E6D0:t4:I127,I0,I0,I1
-36E778:lI8888|H36E788
-36E788:lA1B:httpd_conf__127_0_0_1__8888|H36E798
-36E798:lA7:silence|N
-36E688:t2:AD:$initial_call,H36E6F0
-36E6F0:t3:AE:httpd_acceptor,A8:acceptor,H36E6C8
-36E694:t2:A9:verbosity,A7:silence
-36E6A0:t2:AA:$ancestors,H36E700
-36E700:lA1E:httpd_acc_sup__127_0_0_1__8888|H36E72C
-36E72C:lA1A:httpd_sup__127_0_0_1__8888|H36E750
-36E750:lA8:web_tool|H36E768
-36E768:lP<0.27.0>|N
-36E6AC:t2:A5:sname,A3:acc
-=proc_dictionary:<0.48.0>
-H385E48
-H385E54
-=proc_stack:<0.48.0>
-3ac1bc:SReturn addr 0x225860 (proc_lib:init_p/5 + 164)
-y0:N
-y1:A8:infinity
-y2:A10:crashdump_viewer
-y3:H3AB280
-y4:A17:crashdump_viewer_server
-y5:P<0.41.0>
-3ac1d8:SReturn addr 0x156F90 (<terminate process normally>)
-y0:SCatch 0x225860 (proc_lib:init_p/5 + 164)
-y1:A3:gen
-y2:A7:init_it
-y3:H385E90
-=proc_heap:<0.48.0>
-3AB280:t8:A5:state,A9:undefined,A9:undefined,A9:undefined,A5:false,I4,A9:undefined,P<0.56.0>
-385E90:lAA:gen_server|H385ED8
-385ED8:lP<0.41.0>|H385F10
-385F10:lP<0.41.0>|H385F58
-385F58:lH385FA8|H385FB4
-385FA8:t2:A5:local,A17:crashdump_viewer_server
-385FB4:lA10:crashdump_viewer|H386014
-386014:lN|H38606C
-38606C:lN|N
-385E48:t2:AD:$initial_call,H385EB0
-385EB0:t3:A3:gen,A7:init_it,H385E90
-385E54:t2:AA:$ancestors,H385EC0
-385EC0:lA6:websup|H385F08
-385F08:lA8:web_tool|H385F50
-385F50:lP<0.27.0>|N
-=proc_stack:<0.49.0>
-36a114:SReturn addr 0x30174C (io:parse_erl_exprs/3 + 92)
-y0:H369E10
-y1:P<0.22.0>
-36a120:SReturn addr 0x2E5360 (shell:'-get_command/4-fun-0-'/1 + 20)
-y0:N
-36a128:SReturn addr 0x156F90 (<terminate process normally>)
-=proc_heap:<0.49.0>
-369E10:E21:8372000364000D6E6F6E6F6465406E6F686F737400000001330000000000000000
-=atoms
-http_cache_control
-copy_word
-drop_line
-copy_line
-write_rest_of_line
-drop_to_empty_line
-read_to_empty_line_reverse
-set_pos
-read_line_backwards
-jumped
-jump_to_empty_line_or_eof
-get_pos
-translate_atoms
-translate_fun
-translate_funs
-translate_loaded_modules2
-translate_loaded_modules_totals
-translate_loaded_modules
-translate_links
-get_all_creations
-translate_node_info2
-translate_node_info
-translate_dist_info2
-translate_dist_info
-get_msg
-translate_timers
-translate_ets
-translate_ets_tables
-do_translate_sl_alloc_r7_r8
-translate_sl_alloc_r7_r8
-translate_sl_alloc_line
-do_translate_sl_alloc
-translate_sl_alloc
-translate_memory_and_allocated_area_r9b
-translate_allocated_areas
-translate_internal_table_line
-translate_index_table
-translate_hash_table
-translate_internal_tables
-translate_ports
-write_last_calls
-write_msg_q_stuff
-translate_process
-translate_processes
-erts_vsn
-translate_summary
-'Send'
-erl_crash_dump
-internal_tables
-mods
-zombies
-http_content_length
-http_content_type
-'-procs_summary_body/5-fun-0-'
-'-expanded_memory_body/2-fun-0-'
-'-expanded_memory_body/2-fun-1-'
-'-expanded_memory_body/2-fun-2-'
-'-ports_body/3-fun-0-'
-'-ets_tables_body/4-fun-0-'
-'-internal_ets_tables_table/1-fun-0-'
-'-timers_body/3-fun-0-'
-'-make_nodes_table/2-fun-0-'
-'-loaded_mods_body/5-fun-0-'
-'-funs_body/3-fun-0-'
-'-memory_body/3-fun-0-'
-'-allocated_areas_body/3-fun-0-'
-'-allocator_info_body/3-fun-0-'
-'-allocator_info_body/3-fun-1-'
-'-allocator_info_body/3-fun-2-'
-'-hash_tables_body/3-fun-0-'
-'-index_tables_body/3-fun-0-'
-enter_write_file
-replace_insrt
-'$insrt'
-special
-initial
-pretty_format
-heading
-to_gt_noreverse
-to_gt
-href_proc_port
-br
-font
-h2
-h1
-img
-href
-pre
-em
-td
-th
-tr
-frame
-frameset
-html_header
-index_tables_table
-index_tables_body
-hash_tables_table
-hash_tables_body
-allocator_info_body
-allocated_areas_table
-allocated_areas_body
-memory_table
-memory_body
-atoms_body
-funs_table
-funs_body
-loaded_mod_details_body
-loaded_mods_table
-loaded_mods_body
-format_extra_info
-format_links_and_monitors
-to_end_par
-break_lines_creation
-maybe_refcount
-nodes_table_row
-nodes_table_heading
-make_nodes_table
-nodes_body
-timers_table
-timers_body
-internal_ets_tables_table1
-internal_ets_tables_table
-ets_tables_table
-ets_tables_body
-ports_table
-ports_body
-expanded_binary_body
-dict_table
-stackdump_table
-msgq_table
-expanded_memory_body
-link_to_read_memory
-display_or_link_to_expand
-proc_details_body
-procs_summary_table
-summary_table_head
-procs_summary_body
-pretty_info_body
-info_body
-error_body
-general_info_body
-format_title
-format_picture
-format_item
-arentState
-format_items
-menu_body
-filename_body
-start_page_frameset
-get_translated_filename_frame_body
-read_file_frame_body
-welcome_body
-http_
-http_te
-http_connection
-http_if_modified_since
-http_referer
-http_accept_encoding
-http_accept
-http_host
-http_user_agent
-'-create_header1/3-fun-0-'
-send_response_old
-transform
-mapfilter
-create_header1
-accept_ranges
-cache_control
-pragma
-trailer
-etag
-retry_after
-content_encoding
-content_language
-content_location
-content_MD5
-content_range
-expires
-transfer_encoding
-get_connection
-bad_args
-send_header
-get_body
-traverse_modules
-formatAbsoluteURI
-removeServer
-formatRequestUri
-tagup_header
-verify_request
-split_lines
-find_content_type
-maybe_remove_nl
-get_persistens
-df
-dm
-dy
-year_day_to_date2
-year_day_to_date
-dty
-day_to_year
-valid_date1
-valid_date
-universal_time_to_local_time
-time_to_seconds
-seconds_to_time
-seconds_to_daystime
-now_to_local_time
-now_to_universal_time
-now_to_datetime
-last_day_of_the_month1
-last_day_of_the_month
-is_leap_year1
-is_leap_year
-gregorian_seconds_to_datetime
-gregorian_days_to_date
-date_to_gregorian_days
-'-parse_trailers/1-lc^0/1-0-'
-'-read_trailer_end/4-fun-0-'
-'-read_trailer_end/4-lc^0/1-0-'
-'-remove_newline/1-fun-0-'
-remove_newline
-close_sleep
-unknown_size
-send_read_status
-handle_read_error
-transfer_coding
-expect
-getTrailerField
-read_trailer
-get_chunk_size
-read_chunked_entity_body
-read_chunk_trailer
-read_trailer_end
-parse_trailers
-parse_chunk_trailer
-body_to_big
-parse_chunked_entity_body
-parse_chunk_size
-read_chunked_entity
-etimedout
-body_too_long
-unknown_coding
-chunked
-read_entity_body2
-no_expect_header
-http_1_0_expect_header
-read_entity_body
-header_too_long
-hsplit \ No newline at end of file
diff --git a/lib/observer/test/crashdump_viewer_SUITE_data/r10b_dump.trunc.50atoms b/lib/observer/test/crashdump_viewer_SUITE_data/r10b_dump.trunc.50atoms
deleted file mode 100644
index 78e301a6c7..0000000000
--- a/lib/observer/test/crashdump_viewer_SUITE_data/r10b_dump.trunc.50atoms
+++ /dev/null
@@ -1,13085 +0,0 @@
-=erl_crash_dump:0.1
-Wed Apr 21 13:22:44 2004
-Slogan: eheap_alloc: Cannot allocate 785672 bytes of memory (of type "heap").
-System version: Erlang (BEAM) emulator version 5.4 [source] [hipe] [threads:0]
-Compiled: Thu Dec 18 14:07:45 2003
-Atoms: 5614
-=memory
-total: 653336887
-processes: 1768396
-processes_used: 1765460
-system: 651568491
-atom: 244837
-atom_used: 237116
-binary: 648618369
-code: 2158413
-ets: 225620
-=hash_table:atom_tab
-size: 4813
-used: 3304
-objs: 5614
-depth: 7
-=index_table:atom_tab
-size: 5700
-limit: 1048576
-used: 5614
-rate: 100
-=hash_table:module_code
-size: 97
-used: 69
-objs: 107
-depth: 5
-=index_table:module_code
-size: 110
-limit: 65536
-used: 107
-rate: 10
-=hash_table:export_list
-size: 2411
-used: 1674
-objs: 2843
-depth: 6
-=index_table:export_list
-size: 2900
-limit: 65536
-used: 2843
-rate: 100
-=hash_table:process_reg
-size: 47
-used: 16
-objs: 23
-depth: 3
-=hash_table:fun_table
-size: 397
-used: 261
-objs: 400
-depth: 4
-=hash_table:node_table
-size: 11
-used: 1
-objs: 1
-depth: 1
-=hash_table:dist_table
-size: 11
-used: 1
-objs: 1
-depth: 1
-=allocated_areas
-processes: 1765460 1768396
-ets: 225620
-sys_misc: 24634
-static: 295033
-atom_space: 65544 57967
-binary: 648618369
-atom_table: 42141
-module_table: 920
-export_table: 21336
-register_table: 252
-fun_table: 1650
-module_refs: 1024
-loaded_code: 1968915
-dist_table: 159
-node_table: 131
-bits_bufs_size: 19
-bif_timer: 13392
-link_lh: 0
-dist_buf: 0
-proc: 15080 13576
-atom_entry: 137152 137008
-export_entry: 138448 137632
-module_entry: 4872 4352
-reg_proc: 1000 592
-link_nh: 2464 2080
-link_sh: 832 192
-proc_list: 24 24
-fun_entry: 22584 22584
-db_tab: 1632 1632
-=allocator:sys_alloc
-option e: true
-option m: libc
-=allocator:temp_alloc
-versions: 0.9 2.1
-option e: true
-option sbct: 524288
-option asbcst: 4145152
-option rsbcst: 90
-option rsbcmt: 80
-option mmbcs: 65536
-option mmsbc: 256
-option mmmbc: 10
-option lmbcs: 5242880
-option smbcs: 1048576
-option mbcgs: 10
-option as: af
-mbcs blocks: 0 9 9
-mbcs blocks size: 0 35376 35376
-mbcs carriers: 1 1 1
-mbcs mseg carriers: 0
-mbcs sys_alloc carriers: 1
-mbcs carriers size: 65568 65568 65568
-mbcs mseg carriers size: 0
-mbcs sys_alloc carriers size: 65568
-sbcs blocks: 0 0 0
-sbcs blocks size: 0 0 0
-sbcs carriers: 0 0 0
-sbcs mseg carriers: 0
-sbcs sys_alloc carriers: 0
-sbcs carriers size: 0 0 0
-sbcs mseg carriers size: 0
-sbcs sys_alloc carriers size: 0
-temp_alloc calls: 6155
-temp_free calls: 6155
-temp_realloc calls: 29
-mseg_alloc calls: 0
-mseg_dealloc calls: 0
-mseg_realloc calls: 0
-sys_alloc calls: 1
-sys_free calls: 0
-sys_realloc calls: 0
-=allocator:sl_alloc
-option e: false
-=allocator:std_alloc
-option e: false
-=allocator:ll_alloc
-versions: 0.9 2.1
-option e: true
-option sbct: 4294967295
-option asbcst: 0
-option rsbcst: 0
-option rsbcmt: 0
-option mmbcs: 2097152
-option mmsbc: 0
-option mmmbc: 0
-option lmbcs: 5242880
-option smbcs: 1048576
-option mbcgs: 10
-option as: aobf
-mbcs blocks: 592 592 592
-mbcs blocks size: 2838520 2863304 2863304
-mbcs carriers: 2 2 2
-mbcs mseg carriers: 0
-mbcs sys_alloc carriers: 2
-mbcs carriers size: 3145760 3145760 3145760
-mbcs mseg carriers size: 0
-mbcs sys_alloc carriers size: 3145760
-sbcs blocks: 0 0 0
-sbcs blocks size: 0 0 0
-sbcs carriers: 0 0 0
-sbcs mseg carriers: 0
-sbcs sys_alloc carriers: 0
-sbcs carriers size: 0 0 0
-sbcs mseg carriers size: 0
-sbcs sys_alloc carriers size: 0
-ll_alloc calls: 592
-ll_free calls: 0
-ll_realloc calls: 235
-mseg_alloc calls: 0
-mseg_dealloc calls: 0
-mseg_realloc calls: 0
-sys_alloc calls: 2
-sys_free calls: 0
-sys_realloc calls: 0
-=allocator:eheap_alloc
-versions: 2.1 2.1
-option e: true
-option sbct: 524288
-option asbcst: 4145152
-option rsbcst: 50
-option rsbcmt: 80
-option mmbcs: 524288
-option mmsbc: 256
-option mmmbc: 10
-option lmbcs: 5242880
-option smbcs: 1048576
-option mbcgs: 10
-option mbsd: 3
-option as: gf
-mbcs blocks: 56 102 102
-mbcs blocks size: 833280 1638920 1638920
-mbcs carriers: 2 3 3
-mbcs mseg carriers: 1
-mbcs sys_alloc carriers: 1
-mbcs carriers size: 1998880 3047456 3047456
-mbcs mseg carriers size: 1474560
-mbcs sys_alloc carriers size: 524320
-sbcs blocks: 0 0 0
-sbcs blocks size: 0 0 0
-sbcs carriers: 0 0 0
-sbcs mseg carriers: 0
-sbcs sys_alloc carriers: 0
-sbcs carriers size: 0 0 0
-sbcs mseg carriers size: 0
-sbcs sys_alloc carriers size: 0
-eheap_alloc calls: 6971
-eheap_free calls: 6914
-eheap_realloc calls: 461
-mseg_alloc calls: 16
-mseg_dealloc calls: 14
-mseg_realloc calls: 0
-sys_alloc calls: 3
-sys_free calls: 0
-sys_realloc calls: 0
-=allocator:binary_alloc
-option e: false
-=allocator:ets_alloc
-option e: false
-=allocator:fix_alloc
-option e: true
-proc: 15080 13576
-atom_entry: 137152 137008
-export_entry: 138448 137632
-module_entry: 4872 4352
-reg_proc: 1000 592
-link_nh: 2464 2080
-link_sh: 832 192
-proc_list: 24 24
-fun_entry: 22584 22584
-db_tab: 1632 1632
-=allocator:mseg_alloc
-version: 0.9
-option amcbf: 4194304
-option rmcbf: 20
-option mcs: 5
-option cci: 1000
-cached_segments: 0
-cache_hits: 13
-segments: 2
-segments_watermark: 2
-mseg_alloc calls: 16
-mseg_dealloc calls: 14
-mseg_realloc calls: 0
-mseg_create calls: 4
-mseg_destroy calls: 1
-mseg_clear_cache calls: 6
-mseg_check_cache calls: 2
-=allocator:alloc_util
-option mmc: 1024
-option ycs: 1048576
-=allocator:instr
-option m: false
-option s: false
-option t: false
-=proc:<0.0.0>
-State: Waiting
-Name: init
-Spawned as: otp_ring0:start/2
-Spawned by: []
-Started: Wed Apr 21 13:22:07 2004
-Message queue length: 0
-Number of heap fragments: 0
-Heap fragment data: 0
-Link list: [<0.5.0>,<0.4.0>,<0.2.0>]
-Reductions: 3851
-Stack+heap: 377
-OldHeap: 610
-Heap unused: 53
-OldHeap unused: 610
-Program counter: 0x1f496c (init:loop/1 + 20)
-CP: 0x156f90 (<terminate process normally>)
-arity = 0
-=proc:<0.2.0>
-State: Waiting
-Name: erl_prim_loader
-Spawned as: erlang:apply/2
-Spawned by: <0.1.0>
-Started: Wed Apr 21 13:22:07 2004
-Message queue length: 0
-Number of heap fragments: 0
-Heap fragment data: 0
-Link list: [<0.0.0>,#Port<0.2>]
-Reductions: 201036
-Stack+heap: 987
-OldHeap: 987
-Heap unused: 923
-OldHeap unused: 987
-Program counter: 0x20cc94 (erl_prim_loader:loop/3 + 52)
-CP: 0x156f90 (<terminate process normally>)
-arity = 0
-=proc:<0.4.0>
-State: Waiting
-Name: error_logger
-Spawned as: proc_lib:init_p/5
-Spawned by: <0.1.0>
-Started: Wed Apr 21 13:22:07 2004
-Message queue length: 0
-Number of heap fragments: 0
-Heap fragment data: 0
-Link list: [<0.21.0>,<0.0.0>]
-Reductions: 296
-Stack+heap: 6765
-OldHeap: 0
-Heap unused: 851
-OldHeap unused: 0
-Program counter: 0x21f5b8 (gen_event:loop/4 + 40)
-CP: 0x225860 (proc_lib:init_p/5 + 164)
-arity = 0
-=proc:<0.5.0>
-State: Waiting
-Name: application_controller
-Spawned as: proc_lib:init_p/5
-Spawned by: <0.1.0>
-Started: Wed Apr 21 13:22:07 2004
-Message queue length: 0
-Number of heap fragments: 0
-Heap fragment data: 0
-Link list: [<0.7.0>,<0.0.0>]
-Reductions: 1508
-Stack+heap: 1597
-OldHeap: 0
-Heap unused: 835
-OldHeap unused: 0
-Program counter: 0x239d50 (gen_server:loop/6 + 52)
-CP: 0x225860 (proc_lib:init_p/5 + 164)
-arity = 0
-=proc:<0.7.0>
-State: Waiting
-Spawned as: proc_lib:init_p/5
-Spawned by: <0.6.0>
-Started: Wed Apr 21 13:22:07 2004
-Message queue length: 0
-Number of heap fragments: 0
-Heap fragment data: 0
-Link list: [<0.8.0>,<0.5.0>]
-Reductions: 23
-Stack+heap: 377
-OldHeap: 0
-Heap unused: 79
-OldHeap unused: 0
-Program counter: 0x248d04 (application_master:main_loop/2 + 28)
-CP: 0x225860 (proc_lib:init_p/5 + 164)
-arity = 0
-=proc:<0.8.0>
-State: Waiting
-Spawned as: application_master:start_it/4
-Spawned by: <0.7.0>
-Started: Wed Apr 21 13:22:07 2004
-Message queue length: 0
-Number of heap fragments: 0
-Heap fragment data: 0
-Link list: [<0.9.0>,<0.7.0>]
-Reductions: 91
-Stack+heap: 233
-OldHeap: 0
-Heap unused: 177
-OldHeap unused: 0
-Program counter: 0x24a26c (application_master:loop_it/4 + 40)
-CP: 0x156f90 (<terminate process normally>)
-arity = 0
-=proc:<0.9.0>
-State: Waiting
-Name: kernel_sup
-Spawned as: proc_lib:init_p/5
-Spawned by: <0.8.0>
-Started: Wed Apr 21 13:22:07 2004
-Message queue length: 0
-Number of heap fragments: 0
-Heap fragment data: 0
-Link list: [<0.24.0>,<0.23.0>,<0.19.0>,<0.18.0>,<0.17.0>,<0.16.0>,<0.15.0>,<0.14.0>,<0.11.0>,<0.10.0>,<0.8.0>]
-Reductions: 7402
-Stack+heap: 610
-OldHeap: 987
-Heap unused: 311
-OldHeap unused: 987
-Program counter: 0x239d50 (gen_server:loop/6 + 52)
-CP: 0x225860 (proc_lib:init_p/5 + 164)
-arity = 0
-=proc:<0.10.0>
-State: Waiting
-Name: rex
-Spawned as: proc_lib:init_p/5
-Spawned by: <0.9.0>
-Started: Wed Apr 21 13:22:07 2004
-Message queue length: 0
-Number of heap fragments: 0
-Heap fragment data: 0
-Link list: [<0.9.0>]
-Reductions: 44
-Stack+heap: 233
-OldHeap: 0
-Heap unused: 144
-OldHeap unused: 0
-Program counter: 0x239d50 (gen_server:loop/6 + 52)
-CP: 0x225860 (proc_lib:init_p/5 + 164)
-arity = 0
-=proc:<0.11.0>
-State: Waiting
-Name: global_name_server
-Spawned as: proc_lib:init_p/5
-Spawned by: <0.9.0>
-Started: Wed Apr 21 13:22:07 2004
-Message queue length: 0
-Number of heap fragments: 0
-Heap fragment data: 0
-Link list: [<0.13.0>,<0.12.0>,<0.9.0>]
-Reductions: 47
-Stack+heap: 233
-OldHeap: 0
-Heap unused: 98
-OldHeap unused: 0
-Program counter: 0x239d50 (gen_server:loop/6 + 52)
-CP: 0x225860 (proc_lib:init_p/5 + 164)
-arity = 0
-=proc:<0.12.0>
-State: Waiting
-Spawned as: global:init_the_locker/1
-Spawned by: <0.11.0>
-Started: Wed Apr 21 13:22:07 2004
-Message queue length: 0
-Number of heap fragments: 0
-Heap fragment data: 0
-Link list: [<0.11.0>]
-Reductions: 3
-Stack+heap: 233
-OldHeap: 0
-Heap unused: 227
-OldHeap unused: 0
-Program counter: 0x261340 (global:loop_the_locker/2 + 92)
-CP: 0x261184 (global:init_the_locker/1 + 112)
-arity = 0
-=proc:<0.13.0>
-State: Waiting
-Spawned as: erlang:apply/2
-Spawned by: <0.11.0>
-Started: Wed Apr 21 13:22:07 2004
-Message queue length: 0
-Number of heap fragments: 0
-Heap fragment data: 0
-Link list: [<0.11.0>]
-Reductions: 4
-Stack+heap: 233
-OldHeap: 0
-Heap unused: 221
-OldHeap unused: 0
-Program counter: 0x265288 (global:collect_deletions/2 + 76)
-CP: 0x2651ac (global:loop_the_deleter/1 + 36)
-arity = 0
-=proc:<0.14.0>
-State: Waiting
-Name: inet_db
-Spawned as: proc_lib:init_p/5
-Spawned by: <0.9.0>
-Started: Wed Apr 21 13:22:07 2004
-Message queue length: 0
-Number of heap fragments: 0
-Heap fragment data: 0
-Link list: [<0.9.0>]
-Reductions: 376
-Stack+heap: 233
-OldHeap: 233
-Heap unused: 30
-OldHeap unused: 233
-Program counter: 0x239d50 (gen_server:loop/6 + 52)
-CP: 0x225860 (proc_lib:init_p/5 + 164)
-arity = 0
-=proc:<0.15.0>
-State: Waiting
-Name: global_group
-Spawned as: proc_lib:init_p/5
-Spawned by: <0.9.0>
-Started: Wed Apr 21 13:22:07 2004
-Message queue length: 0
-Number of heap fragments: 0
-Heap fragment data: 0
-Link list: [<0.9.0>]
-Reductions: 71
-Stack+heap: 233
-OldHeap: 0
-Heap unused: 92
-OldHeap unused: 0
-Program counter: 0x239d50 (gen_server:loop/6 + 52)
-CP: 0x225860 (proc_lib:init_p/5 + 164)
-arity = 0
-=proc:<0.16.0>
-State: Waiting
-Name: file_server_2
-Spawned as: proc_lib:init_p/5
-Spawned by: <0.9.0>
-Started: Wed Apr 21 13:22:07 2004
-Message queue length: 0
-Number of heap fragments: 1
-Heap fragment data: 119
-Link list: [{from,<0.17.0>,#Ref<0.0.0.22>},#Port<0.4>,<0.9.0>]
-Reductions: 83605
-Stack+heap: 4181
-OldHeap: 4181
-Heap unused: 1720
-OldHeap unused: 4181
-Program counter: 0x239d50 (gen_server:loop/6 + 52)
-CP: 0x225860 (proc_lib:init_p/5 + 164)
-arity = 0
-=proc:<0.17.0>
-State: Waiting
-Name: file_server
-Spawned as: erlang:apply/2
-Spawned by: <0.9.0>
-Started: Wed Apr 21 13:22:07 2004
-Message queue length: 0
-Number of heap fragments: 0
-Heap fragment data: 0
-Link list: [{to,<0.16.0>,#Ref<0.0.0.22>},<0.9.0>]
-Reductions: 12
-Stack+heap: 233
-OldHeap: 0
-Heap unused: 207
-OldHeap unused: 0
-Program counter: 0x2a18e8 (old_file_server:relay_loop/3 + 32)
-CP: 0x156f90 (<terminate process normally>)
-arity = 0
-=proc:<0.18.0>
-State: Waiting
-Name: code_server
-Spawned as: erlang:apply/2
-Spawned by: <0.9.0>
-Started: Wed Apr 21 13:22:07 2004
-Message queue length: 0
-Number of heap fragments: 0
-Heap fragment data: 0
-Link list: [<0.9.0>]
-Reductions: 108900
-Stack+heap: 6765
-OldHeap: 6765
-Heap unused: 4389
-OldHeap unused: 6765
-Program counter: 0x2a6e64 (code_server:loop/1 + 64)
-CP: 0x156f90 (<terminate process normally>)
-arity = 0
-=proc:<0.19.0>
-State: Waiting
-Spawned as: proc_lib:init_p/5
-Spawned by: <0.9.0>
-Started: Wed Apr 21 13:22:08 2004
-Message queue length: 0
-Number of heap fragments: 0
-Heap fragment data: 0
-Link list: [<0.21.0>,<0.9.0>]
-Reductions: 74
-Stack+heap: 233
-OldHeap: 233
-Heap unused: 180
-OldHeap unused: 233
-Program counter: 0x239d50 (gen_server:loop/6 + 52)
-CP: 0x225860 (proc_lib:init_p/5 + 164)
-arity = 0
-=proc:<0.20.0>
-State: Waiting
-Spawned as: user_drv:server/2
-Spawned by: <0.19.0>
-Started: Wed Apr 21 13:22:08 2004
-Message queue length: 0
-Number of heap fragments: 0
-Heap fragment data: 0
-Link list: [<0.22.0>,<0.21.0>,#Port<0.72>]
-Reductions: 596
-Stack+heap: 233
-OldHeap: 377
-Heap unused: 214
-OldHeap unused: 377
-Program counter: 0x2ca4e0 (user_drv:server_loop/5 + 56)
-CP: 0x156f90 (<terminate process normally>)
-arity = 0
-=proc:<0.21.0>
-State: Waiting
-Name: user
-Spawned as: group:server/2
-Spawned by: <0.20.0>
-Started: Wed Apr 21 13:22:08 2004
-Message queue length: 0
-Number of heap fragments: 0
-Heap fragment data: 0
-Link list: [<0.4.0>,<0.19.0>,<0.20.0>]
-Reductions: 26
-Stack+heap: 233
-OldHeap: 0
-Heap unused: 202
-OldHeap unused: 0
-Program counter: 0x2cd9d8 (group:server_loop/3 + 32)
-CP: 0x156f90 (<terminate process normally>)
-arity = 0
-=proc:<0.22.0>
-State: Waiting
-Spawned as: group:server/2
-Spawned by: <0.20.0>
-Started: Wed Apr 21 13:22:08 2004
-Message queue length: 0
-Number of heap fragments: 0
-Heap fragment data: 0
-Link list: [{from,<0.49.0>,#Ref<0.0.0.307>},<0.25.0>,<0.20.0>]
-Reductions: 1244
-Stack+heap: 233
-OldHeap: 233
-Heap unused: 40
-OldHeap unused: 233
-Program counter: 0x2cf238 (group:get_line1/3 + 1652)
-CP: 0x2cf230 (group:get_line1/3 + 1644)
-arity = 0
-=proc:<0.23.0>
-State: Waiting
-Spawned as: proc_lib:init_p/5
-Spawned by: <0.9.0>
-Started: Wed Apr 21 13:22:08 2004
-Message queue length: 0
-Number of heap fragments: 0
-Heap fragment data: 0
-Link list: [<0.9.0>]
-Reductions: 45
-Stack+heap: 233
-OldHeap: 0
-Heap unused: 63
-OldHeap unused: 0
-Program counter: 0x239d50 (gen_server:loop/6 + 52)
-CP: 0x225860 (proc_lib:init_p/5 + 164)
-arity = 0
-=proc:<0.24.0>
-State: Waiting
-Name: kernel_safe_sup
-Spawned as: proc_lib:init_p/5
-Spawned by: <0.9.0>
-Started: Wed Apr 21 13:22:08 2004
-Message queue length: 0
-Number of heap fragments: 0
-Heap fragment data: 0
-Link list: [<0.31.0>,<0.9.0>]
-Reductions: 133
-Stack+heap: 233
-OldHeap: 233
-Heap unused: 198
-OldHeap unused: 233
-Program counter: 0x239d50 (gen_server:loop/6 + 52)
-CP: 0x225860 (proc_lib:init_p/5 + 164)
-arity = 0
-=proc:<0.25.0>
-State: Waiting
-Spawned as: erlang:apply/2
-Spawned by: <0.22.0>
-Started: Wed Apr 21 13:22:08 2004
-Message queue length: 0
-Number of heap fragments: 0
-Heap fragment data: 0
-Link list: [<0.49.0>,<0.27.0>,<0.22.0>]
-Reductions: 161
-Stack+heap: 233
-OldHeap: 0
-Heap unused: 169
-OldHeap unused: 0
-Program counter: 0x2e0d00 (shell:get_command1/4 + 40)
-CP: 0x2e06fc (shell:server_loop/6 + 140)
-arity = 0
-=proc:<0.27.0>
-State: Waiting
-Spawned as: erlang:apply/2
-Spawned by: <0.25.0>
-Started: Wed Apr 21 13:22:08 2004
-Message queue length: 0
-Number of heap fragments: 0
-Heap fragment data: 0
-Link list: [<0.25.0>]
-Reductions: 506
-Stack+heap: 4181
-OldHeap: 0
-Heap unused: 1131
-OldHeap unused: 0
-Program counter: 0x2e2bbc (shell:eval_loop/2 + 32)
-CP: 0x156f90 (<terminate process normally>)
-arity = 0
-=proc:<0.31.0>
-State: Waiting
-Name: inet_gethost_native_sup
-Spawned as: proc_lib:init_p/5
-Spawned by: <0.24.0>
-Started: Wed Apr 21 13:22:17 2004
-Message queue length: 0
-Number of heap fragments: 0
-Heap fragment data: 0
-Link list: [<0.32.0>,<0.24.0>]
-Reductions: 49
-Stack+heap: 233
-OldHeap: 0
-Heap unused: 87
-OldHeap unused: 0
-Program counter: 0x239d50 (gen_server:loop/6 + 52)
-CP: 0x225860 (proc_lib:init_p/5 + 164)
-arity = 0
-=proc:<0.32.0>
-State: Waiting
-Name: inet_gethost_native
-Spawned as: inet_gethost_native:server_init/2
-Spawned by: <0.31.0>
-Started: Wed Apr 21 13:22:17 2004
-Message queue length: 0
-Number of heap fragments: 1
-Heap fragment data: 118
-Link list: [#Port<0.105>,<0.31.0>]
-Reductions: 65
-Stack+heap: 233
-OldHeap: 0
-Heap unused: 13
-OldHeap unused: 0
-Program counter: 0x4ad840 (inet_gethost_native:main_loop/1 + 20)
-CP: 0x156f90 (<terminate process normally>)
-arity = 0
-=proc:<0.33.0>
-State: Waiting
-Name: web_tool
-Spawned as: proc_lib:init_p/5
-Spawned by: <0.27.0>
-Started: Wed Apr 21 13:22:17 2004
-Message queue length: 0
-Number of heap fragments: 0
-Heap fragment data: 0
-Link list: [<0.41.0>]
-Reductions: 131773
-Stack+heap: 6765
-OldHeap: 6765
-Heap unused: 2941
-OldHeap unused: 6765
-Program counter: 0x239d50 (gen_server:loop/6 + 52)
-CP: 0x225860 (proc_lib:init_p/5 + 164)
-arity = 0
-=proc:<0.41.0>
-State: Waiting
-Name: websup
-Spawned as: proc_lib:init_p/5
-Spawned by: <0.33.0>
-Started: Wed Apr 21 13:22:17 2004
-Message queue length: 0
-Number of heap fragments: 0
-Heap fragment data: 0
-Link list: [<0.48.0>,<0.33.0>]
-Reductions: 118
-Stack+heap: 233
-OldHeap: 233
-Heap unused: 205
-OldHeap unused: 233
-Program counter: 0x239d50 (gen_server:loop/6 + 52)
-CP: 0x225860 (proc_lib:init_p/5 + 164)
-arity = 0
-=proc:<0.43.0>
-State: Waiting
-Name: httpd_sup__127_0_0_1__8888
-Spawned as: proc_lib:init_p/5
-Spawned by: <0.33.0>
-Started: Wed Apr 21 13:22:17 2004
-Message queue length: 0
-Number of heap fragments: 0
-Heap fragment data: 0
-Link list: [<0.46.0>,<0.45.0>,<0.44.0>]
-Reductions: 1220
-Stack+heap: 6765
-OldHeap: 0
-Heap unused: 277
-OldHeap unused: 0
-Program counter: 0x239d50 (gen_server:loop/6 + 52)
-CP: 0x225860 (proc_lib:init_p/5 + 164)
-arity = 0
-=proc:<0.44.0>
-State: Waiting
-Name: httpd_acc_sup__127_0_0_1__8888
-Spawned as: proc_lib:init_p/5
-Spawned by: <0.43.0>
-Started: Wed Apr 21 13:22:17 2004
-Message queue length: 0
-Number of heap fragments: 0
-Heap fragment data: 0
-Link list: [<0.47.0>,<0.43.0>]
-Reductions: 147
-Stack+heap: 233
-OldHeap: 233
-Heap unused: 77
-OldHeap unused: 233
-Program counter: 0x239d50 (gen_server:loop/6 + 52)
-CP: 0x225860 (proc_lib:init_p/5 + 164)
-arity = 0
-=proc:<0.45.0>
-State: Waiting
-Name: httpd_misc_sup__127_0_0_1__8888
-Spawned as: proc_lib:init_p/5
-Spawned by: <0.43.0>
-Started: Wed Apr 21 13:22:17 2004
-Message queue length: 0
-Number of heap fragments: 0
-Heap fragment data: 0
-Link list: [<0.43.0>]
-Reductions: 52
-Stack+heap: 233
-OldHeap: 0
-Heap unused: 80
-OldHeap unused: 0
-Program counter: 0x239d50 (gen_server:loop/6 + 52)
-CP: 0x225860 (proc_lib:init_p/5 + 164)
-arity = 0
-=proc:<0.46.0>
-State: Waiting
-Name: httpd__127_0_0_1__8888
-Spawned as: proc_lib:init_p/5
-Spawned by: <0.43.0>
-Started: Wed Apr 21 13:22:17 2004
-Message queue length: 0
-Number of heap fragments: 0
-Heap fragment data: 0
-Link list: [<0.43.0>]
-Reductions: 2905
-Stack+heap: 6765
-OldHeap: 10946
-Heap unused: 138
-OldHeap unused: 10946
-Program counter: 0x239d50 (gen_server:loop/6 + 52)
-CP: 0x225860 (proc_lib:init_p/5 + 164)
-arity = 0
-=proc:<0.47.0>
-State: Waiting
-Spawned as: proc_lib:init_p/5
-Spawned by: <0.44.0>
-Started: Wed Apr 21 13:22:18 2004
-Message queue length: 0
-Number of heap fragments: 0
-Heap fragment data: 0
-Link list: [#Port<0.161>,#Port<0.141>,<0.44.0>]
-Reductions: 874
-Stack+heap: 233
-OldHeap: 233
-Heap unused: 190
-OldHeap unused: 233
-Program counter: 0x1fe798 (prim_inet:accept0/2 + 96)
-CP: 0x1feb04 (prim_inet:async_accept/2 + 380)
-arity = 0
-=proc:<0.48.0>
-State: Waiting
-Name: crashdump_viewer_server
-Spawned as: proc_lib:init_p/5
-Spawned by: <0.41.0>
-Started: Wed Apr 21 13:22:18 2004
-Message queue length: 0
-Number of heap fragments: 0
-Heap fragment data: 0
-Link list: [<0.56.0>,<0.41.0>]
-Reductions: 1913
-Stack+heap: 987
-OldHeap: 987
-Heap unused: 524
-OldHeap unused: 987
-Program counter: 0x239d50 (gen_server:loop/6 + 52)
-CP: 0x225860 (proc_lib:init_p/5 + 164)
-arity = 0
-=proc:<0.49.0>
-State: Waiting
-Spawned as: erlang:apply/2
-Spawned by: <0.25.0>
-Started: Wed Apr 21 13:22:18 2004
-Message queue length: 0
-Number of heap fragments: 0
-Heap fragment data: 0
-Link list: [{to,<0.22.0>,#Ref<0.0.0.307>},<0.25.0>]
-Reductions: 15
-Stack+heap: 233
-OldHeap: 0
-Heap unused: 190
-OldHeap unused: 0
-Program counter: 0x301d58 (io:wait_io_mon_reply/2 + 28)
-CP: 0x30174c (io:parse_erl_exprs/3 + 92)
-arity = 0
-=proc:<0.56.0>
-State: Garbing
-Spawned as: erlang:apply/2
-Last scheduled in for: erlang:garbage_collect/0
-Spawned by: <0.48.0>
-Started: Wed Apr 21 13:22:27 2004
-Message queue length: 0
-Number of heap fragments: 1
-Heap fragment data: 121
-Link list: [#Port<0.158>,#Port<0.157>,<0.48.0>]
-Reductions: 2420470
-Stack+heap: 121393
-OldHeap: 0
-Heap unused: 22172
-OldHeap unused: 0
-New heap start: FE5768E0
-New heap top: FE5D7734
-Stack top: FE5ED130
-Stack end: FE5ED1A4
-Old heap start: 0
-Old heap top: 0
-Old heap end: 0
-Program counter: 0x1a4980 (unknown function)
-CP: 0x20710c (prim_file:read/2 + 436)
-=port:#Port<0.1>
-Slot: 1
-Connected: #Port<0.0>
-Port controls linked-in driver: async
-=port:#Port<0.2>
-Slot: 2
-Connected: <0.2.0>
-Links: <0.2.0>
-Port controls linked-in driver: efile
-=port:#Port<0.4>
-Slot: 4
-Connected: <0.16.0>
-Links: <0.16.0>
-Port controls linked-in driver: efile
-=port:#Port<0.72>
-Slot: 72
-Connected: <0.20.0>
-Links: <0.20.0>
-Port controls linked-in driver: tty_sl -c -e
-=port:#Port<0.105>
-Slot: 105
-Connected: <0.32.0>
-Links: <0.32.0>
-Port controls external process: inet_gethost 4
-=port:#Port<0.141>
-Slot: 141
-Connected: <0.47.0>
-Links: <0.47.0>
-Port controls linked-in driver: tcp_inet
-=port:#Port<0.157>
-Slot: 157
-Connected: <0.56.0>
-Links: <0.56.0>
-Port controls linked-in driver: efile
-=port:#Port<0.158>
-Slot: 158
-Connected: <0.56.0>
-Links: <0.56.0>
-Port controls linked-in driver: efile
-=port:#Port<0.161>
-Slot: 161
-Connected: <0.47.0>
-Links: <0.47.0>
-Port controls linked-in driver: tcp_inet
-=ets:<0.18.0>
-Slot: 9
-Table: 9
-Name: code
-Buckets: 256
-Objects: 289
-Words: 14108
-=ets:<0.18.0>
-Slot: 10
-Table: 10
-Name: code_names
-Buckets: 256
-Objects: 47
-Words: 4334
-=ets:<0.32.0>
-Slot: 11
-Table: 11
-Name: ign_requests
-Buckets: 256
-Objects: 0
-Words: 277
-=ets:<0.32.0>
-Slot: 12
-Table: 12
-Name: ign_req_index
-Buckets: 256
-Objects: 0
-Words: 277
-=ets:<0.33.0>
-Slot: 13
-Table: 13
-Name: app_data
-Buckets: 256
-Objects: 7
-Words: 952
-=ets:<0.46.0>
-Slot: 15
-Table: 15
-Name: httpd_mime__127_0_0_1__8888
-Buckets: 256
-Objects: 105
-Words: 5742
-=ets:<0.11.0>
-Slot: 84
-Table: global_names
-Name: global_names
-Buckets: 256
-Objects: 0
-Words: 277
-=ets:<0.11.0>
-Slot: 95
-Table: global_locks
-Name: global_locks
-Buckets: 256
-Objects: 0
-Words: 277
-=ets:<0.11.0>
-Slot: 96
-Table: global_names_ext
-Name: global_names_ext
-Buckets: 256
-Objects: 0
-Words: 277
-=ets:<0.14.0>
-Slot: 316
-Table: inet_cache
-Name: inet_cache
-Buckets: 256
-Objects: 0
-Words: 277
-=ets:<0.48.0>
-Slot: 340
-Table: cdv_menu_table
-Name: cdv_menu_table
-Buckets: 256
-Objects: 0
-Words: 277
-=ets:<0.48.0>
-Slot: 341
-Table: cdv_dump_index_table
-Name: cdv_dump_index_table
-Buckets: 256
-Objects: 0
-Words: 277
-=ets:<0.48.0>
-Slot: 342
-Table: cdv_decode_heap_table
-Name: cdv_decode_heap_table
-Buckets: 256
-Objects: 0
-Words: 277
-=ets:<0.16.0>
-Slot: 780
-Table: file_io_servers
-Name: file_io_servers
-Buckets: 256
-Objects: 0
-Words: 277
-=ets:<0.46.0>
-Slot: 984
-Table: httpd_conf__127_0_0_1__8888
-Name: httpd_conf__127_0_0_1__8888
-Buckets: 256
-Objects: 17
-Words: 1176
-=ets:<0.14.0>
-Slot: 1342
-Table: inet_hosts
-Name: inet_hosts
-Buckets: 256
-Objects: 4
-Words: 421
-=ets:<0.14.0>
-Slot: 1362
-Table: inet_db
-Name: inet_db
-Buckets: 256
-Objects: 20
-Words: 671
-=ets:<0.5.0>
-Slot: 1655
-Table: ac_tab
-Name: ac_tab
-Buckets: 256
-Objects: 6
-Words: 843
-=timer:<0.14.0>
-Message: refresh_timeout
-Time left: 3565692 ms
-=node:'nonode@nohost'
-=no_distribution
-=loaded_modules
-Current code: 1968915
-Old code: 0
-=mod:otp_ring0
-Current size: 489
-=mod:init
-Current size: 30110
-=mod:prim_inet
-Current size: 35532
-=mod:prim_file
-Current size: 24965
-=mod:erl_prim_loader
-Current size: 19607
-=mod:erlang
-Current size: 11137
-=mod:error_handler
-Current size: 2389
-Current attributes: 836C00000001680264000376736E6C000000016E100030769A34345F26EF6D3433254FF2AE576A6A
-Current compilation info: 836C0000000468026400076F7074696F6E736C0000000568026400036377646B00222F636C656172636173652F6F74702F657274732F6C69622F6B65726E656C2F73726368026400066F75746469726B002A2F636C656172636173652F6F74702F657274732F6C69622F6B65726E656C2F7372632F2E2E2F6562696E6802640001696B002D2F636C656172636173652F6F74702F657274732F6C69622F6B65726E656C2F7372632F2E2E2F696E636C75646564000A64656275675F696E666F6400107761726E5F756E757365645F766172736A680264000776657273696F6E6B0005342E322E31680264000474696D65680662000007D3610C6112610B613161216802640006736F757263656B00342F636C656172636173652F6F74702F657274732F6C69622F6B65726E656C2F7372632F6572726F725F68616E646C65722E65726C6A
-=mod:heart
-Current size: 6687
-Current attributes: 836C00000001680264000376736E6C000000016E10003094F7BECF345494DDBB4D7186E694186A6A
-Current compilation info: 836C0000000468026400076F7074696F6E736C0000000568026400036377646B00222F636C656172636173652F6F74702F657274732F6C69622F6B65726E656C2F73726368026400066F75746469726B002A2F636C656172636173652F6F74702F657274732F6C69622F6B65726E656C2F7372632F2E2E2F6562696E6802640001696B002D2F636C656172636173652F6F74702F657274732F6C69622F6B65726E656C2F7372632F2E2E2F696E636C75646564000A64656275675F696E666F6400107761726E5F756E757365645F766172736A680264000776657273696F6E6B0005342E322E31680264000474696D65680662000007D3610C6112610B613261086802640006736F757263656B002C2F636C656172636173652F6F74702F657274732F6C69622F6B65726E656C2F7372632F68656172742E65726C6A
-=mod:error_logger
-Current size: 7051
-Current attributes: 836C00000001680264000376736E6C000000016E10004E3347F841DEAE2EB6A74389E6E127146A6A
-Current compilation info: 836C0000000468026400076F7074696F6E736C0000000568026400036377646B00222F636C656172636173652F6F74702F657274732F6C69622F6B65726E656C2F73726368026400066F75746469726B002A2F636C656172636173652F6F74702F657274732F6C69622F6B65726E656C2F7372632F2E2E2F6562696E6802640001696B002D2F636C656172636173652F6F74702F657274732F6C69622F6B65726E656C2F7372632F2E2E2F696E636C75646564000A64656275675F696E666F6400107761726E5F756E757365645F766172736A680264000776657273696F6E6B0005342E322E31680264000474696D65680662000007D3610C6112610B613161246802640006736F757263656B00332F636C656172636173652F6F74702F657274732F6C69622F6B65726E656C2F7372632F6572726F725F6C6F676765722E65726C6A
-=mod:gen_event
-Current size: 18288
-Current attributes: 836C00000001680264000376736E6C000000016E1000336F22DF1EA75E0EA4AE65D3B8C34F946A6A
-Current compilation info: 836C0000000468026400076F7074696F6E736C0000000768026400036377646B00222F636C656172636173652F6F74702F657274732F6C69622F7374646C69622F73726368026400066F75746469726B002A2F636C656172636173652F6F74702F657274732F6C69622F7374646C69622F7372632F2E2E2F6562696E6802640001696B002D2F636C656172636173652F6F74702F657274732F6C69622F7374646C69622F7372632F2E2E2F696E636C7564656802640001696B00372F636C656172636173652F6F74702F657274732F6C69622F7374646C69622F7372632F2E2E2F2E2E2F6B65726E656C2F696E636C7564656400107761726E5F756E757365645F7661727364000A64656275675F696E666F6400107761726E5F756E757365645F766172736A680264000776657273696F6E6B0005342E322E31680264000474696D65680662000007D3610C6112610B612D61346802640006736F757263656B00302F636C656172636173652F6F74702F657274732F6C69622F7374646C69622F7372632F67656E5F6576656E742E65726C6A
-=mod:gen
-Current size: 7129
-Current attributes: 836C00000001680264000376736E6C000000016E10007BE6AEB66EF48D8B33323C89C9936A526A6A
-Current compilation info: 836C0000000468026400076F7074696F6E736C0000000768026400036377646B00222F636C656172636173652F6F74702F657274732F6C69622F7374646C69622F73726368026400066F75746469726B002A2F636C656172636173652F6F74702F657274732F6C69622F7374646C69622F7372632F2E2E2F6562696E6802640001696B002D2F636C656172636173652F6F74702F657274732F6C69622F7374646C69622F7372632F2E2E2F696E636C7564656802640001696B00372F636C656172636173652F6F74702F657274732F6C69622F7374646C69622F7372632F2E2E2F2E2E2F6B65726E656C2F696E636C7564656400107761726E5F756E757365645F7661727364000A64656275675F696E666F6400107761726E5F756E757365645F766172736A680264000776657273696F6E6B0005342E322E31680264000474696D65680662000007D3610C6112610B612D61316802640006736F757263656B002A2F636C656172636173652F6F74702F657274732F6C69622F7374646C69622F7372632F67656E2E65726C6A
-=mod:proc_lib
-Current size: 11658
-Current attributes: 836C00000001680264000376736E6C000000016E10005C589A8C9BD2E1F2E895E765CAE983406A6A
-Current compilation info: 836C0000000468026400076F7074696F6E736C0000000768026400036377646B00222F636C656172636173652F6F74702F657274732F6C69622F7374646C69622F73726368026400066F75746469726B002A2F636C656172636173652F6F74702F657274732F6C69622F7374646C69622F7372632F2E2E2F6562696E6802640001696B002D2F636C656172636173652F6F74702F657274732F6C69622F7374646C69622F7372632F2E2E2F696E636C7564656802640001696B00372F636C656172636173652F6F74702F657274732F6C69622F7374646C69622F7372632F2E2E2F2E2E2F6B65726E656C2F696E636C7564656400107761726E5F756E757365645F7661727364000A64656275675F696E666F6400107761726E5F756E757365645F766172736A680264000776657273696F6E6B0005342E322E31680264000474696D65680662000007D3610C6112610B612E612D6802640006736F757263656B002F2F636C656172636173652F6F74702F657274732F6C69622F7374646C69622F7372632F70726F635F6C69622E65726C6A
-=mod:application_controller
-Current size: 55249
-Current attributes: 836C00000002680264000376736E6C000000016E10003372E1AB0410565065FA086086A721316A68026400096265686176696F75726C0000000164000A67656E5F7365727665726A6A
-Current compilation info: 836C0000000468026400076F7074696F6E736C0000000568026400036377646B00222F636C656172636173652F6F74702F657274732F6C69622F6B65726E656C2F73726368026400066F75746469726B002A2F636C656172636173652F6F74702F657274732F6C69622F6B65726E656C2F7372632F2E2E2F6562696E6802640001696B002D2F636C656172636173652F6F74702F657274732F6C69622F6B65726E656C2F7372632F2E2E2F696E636C75646564000A64656275675F696E666F6400107761726E5F756E757365645F766172736A680264000776657273696F6E6B0005342E322E31680264000474696D65680662000007D3610C6112610B613061246802640006736F757263656B003D2F636C656172636173652F6F74702F657274732F6C69622F6B65726E656C2F7372632F6170706C69636174696F6E5F636F6E74726F6C6C65722E65726C6A
-=mod:gen_server
-Current size: 18728
-Current attributes: 836C00000001680264000376736E6C000000016E10004C5E93533036DAC7698FC4112F59CF236A6A
-Current compilation info: 836C0000000468026400076F7074696F6E736C0000000768026400036377646B00222F636C656172636173652F6F74702F657274732F6C69622F7374646C69622F73726368026400066F75746469726B002A2F636C656172636173652F6F74702F657274732F6C69622F7374646C69622F7372632F2E2E2F6562696E6802640001696B002D2F636C656172636173652F6F74702F657274732F6C69622F7374646C69622F7372632F2E2E2F696E636C7564656802640001696B00372F636C656172636173652F6F74702F657274732F6C69622F7374646C69622F7372632F2E2E2F2E2E2F6B65726E656C2F696E636C7564656400107761726E5F756E757365645F7661727364000A64656275675F696E666F6400107761726E5F756E757365645F766172736A680264000776657273696F6E6B0005342E322E31680264000474696D65680662000007D3610C6112610B612D61396802640006736F757263656B00312F636C656172636173652F6F74702F657274732F6C69622F7374646C69622F7372632F67656E5F7365727665722E65726C6A
-=mod:sys
-Current size: 11589
-Current attributes: 836C00000001680264000376736E6C000000016E1000E12B0E8267551204BD5924BAB9629ADF6A6A
-Current compilation info: 836C0000000468026400076F7074696F6E736C0000000768026400036377646B00222F636C656172636173652F6F74702F657274732F6C69622F7374646C69622F73726368026400066F75746469726B002A2F636C656172636173652F6F74702F657274732F6C69622F7374646C69622F7372632F2E2E2F6562696E6802640001696B002D2F636C656172636173652F6F74702F657274732F6C69622F7374646C69622F7372632F2E2E2F696E636C7564656802640001696B00372F636C656172636173652F6F74702F657274732F6C69622F7374646C69622F7372632F2E2E2F2E2E2F6B65726E656C2F696E636C7564656400107761726E5F756E757365645F7661727364000A64656275675F696E666F6400107761726E5F756E757365645F766172736A680264000776657273696F6E6B0005342E322E31680264000474696D65680662000007D3610C6112610B612F61176802640006736F757263656B002A2F636C656172636173652F6F74702F657274732F6C69622F7374646C69622F7372632F7379732E65726C6A
-=mod:lists
-Current size: 18638
-Current attributes: 836C00000002680264000376736E6C000000016E10001E95B32C30E4CDAF0BDD1ABA58CBB5F36A680264000A646570726563617465646C0000000B68026400066B65796D617061046802640003616C6C61036802640003616E79610368026400036D617061036802640007666C61746D617061036802640005666F6C646C61046802640005666F6C64726104680264000666696C746572610368026400086D6170666F6C646C610468026400086D6170666F6C647261046802640007666F726561636861036A6A
-Current compilation info: 836C0000000468026400076F7074696F6E736C0000000768026400036377646B00222F636C656172636173652F6F74702F657274732F6C69622F7374646C69622F73726368026400066F75746469726B002A2F636C656172636173652F6F74702F657274732F6C69622F7374646C69622F7372632F2E2E2F6562696E6802640001696B002D2F636C656172636173652F6F74702F657274732F6C69622F7374646C69622F7372632F2E2E2F696E636C7564656802640001696B00372F636C656172636173652F6F74702F657274732F6C69622F7374646C69622F7372632F2E2E2F2E2E2F6B65726E656C2F696E636C7564656400107761726E5F756E757365645F7661727364000A64656275675F696E666F6400107761726E5F756E757365645F766172736A680264000776657273696F6E6B0005342E322E31680264000474696D65680662000007D3610C6112610B612E61116802640006736F757263656B002C2F636C656172636173652F6F74702F657274732F6C69622F7374646C69622F7372632F6C697374732E65726C6A
-=mod:application
-Current size: 2666
-Current attributes: 836C00000001680264000376736E6C000000016E1000C0C5A7B67B306300FEFF9D91AA50ECB36A6A
-Current compilation info: 836C0000000468026400076F7074696F6E736C0000000568026400036377646B00222F636C656172636173652F6F74702F657274732F6C69622F6B65726E656C2F73726368026400066F75746469726B002A2F636C656172636173652F6F74702F657274732F6C69622F6B65726E656C2F7372632F2E2E2F6562696E6802640001696B002D2F636C656172636173652F6F74702F657274732F6C69622F6B65726E656C2F7372632F2E2E2F696E636C75646564000A64656275675F696E666F6400107761726E5F756E757365645F766172736A680264000776657273696F6E6B0005342E322E31680264000474696D65680662000007D3610C6112610B6130611F6802640006736F757263656B00322F636C656172636173652F6F74702F657274732F6C69622F6B65726E656C2F7372632F6170706C69636174696F6E2E65726C6A
-=mod:application_master
-Current size: 10912
-Current attributes: 836C00000001680264000376736E6C000000016E1000360420F5CEB80AD7DD51B3A8A0E2AFA26A6A
-Current compilation info: 836C0000000468026400076F7074696F6E736C0000000568026400036377646B00222F636C656172636173652F6F74702F657274732F6C69622F6B65726E656C2F73726368026400066F75746469726B002A2F636C656172636173652F6F74702F657274732F6C69622F6B65726E656C2F7372632F2E2E2F6562696E6802640001696B002D2F636C656172636173652F6F74702F657274732F6C69622F6B65726E656C2F7372632F2E2E2F696E636C75646564000A64656275675F696E666F6400107761726E5F756E757365645F766172736A680264000776657273696F6E6B0005342E322E31680264000474696D65680662000007D3610C6112610B613061266802640006736F757263656B00392F636C656172636173652F6F74702F657274732F6C69622F6B65726E656C2F7372632F6170706C69636174696F6E5F6D61737465722E65726C6A
-=mod:kernel
-Current size: 7639
-Current attributes: 836C00000002680264000376736E6C000000016E10004D418ACCB0F948D4D3CA6B9A81B462746A68026400096265686176696F75726C0000000164000A73757065727669736F726A6A
-Current compilation info: 836C0000000468026400076F7074696F6E736C0000000568026400036377646B00222F636C656172636173652F6F74702F657274732F6C69622F6B65726E656C2F73726368026400066F75746469726B002A2F636C656172636173652F6F74702F657274732F6C69622F6B65726E656C2F7372632F2E2E2F6562696E6802640001696B002D2F636C656172636173652F6F74702F657274732F6C69622F6B65726E656C2F7372632F2E2E2F696E636C75646564000A64656275675F696E666F6400107761726E5F756E757365645F766172736A680264000776657273696F6E6B0005342E322E31680264000474696D65680662000007D3610C6112610B613261336802640006736F757263656B002D2F636C656172636173652F6F74702F657274732F6C69622F6B65726E656C2F7372632F6B65726E656C2E65726C6A
-=mod:supervisor
-Current size: 24469
-Current attributes: 836C00000002680264000376736E6C000000016E1000979F65727577135484BE0892A35087CC6A68026400096265686176696F75726C0000000164000A67656E5F7365727665726A6A
-Current compilation info: 836C0000000468026400076F7074696F6E736C0000000768026400036377646B00222F636C656172636173652F6F74702F657274732F6C69622F7374646C69622F73726368026400066F75746469726B002A2F636C656172636173652F6F74702F657274732F6C69622F7374646C69622F7372632F2E2E2F6562696E6802640001696B002D2F636C656172636173652F6F74702F657274732F6C69622F7374646C69622F7372632F2E2E2F696E636C7564656802640001696B00372F636C656172636173652F6F74702F657274732F6C69622F7374646C69622F7372632F2E2E2F2E2E2F6B65726E656C2F696E636C7564656400107761726E5F756E757365645F7661727364000A64656275675F696E666F6400107761726E5F756E757365645F766172736A680264000776657273696F6E6B0005342E322E31680264000474696D65680662000007D3610C6112610B612F61126802640006736F757263656B00312F636C656172636173652F6F74702F657274732F6C69622F7374646C69622F7372632F73757065727669736F722E65726C6A
-=mod:rpc
-Current size: 14539
-Current attributes: 836C00000002680264000376736E6C000000016E10008C5D6242D36B3201E3B11E82D5E1581E6A68026400096265686176696F75726C0000000164000A67656E5F7365727665726A6A
-Current compilation info: 836C0000000468026400076F7074696F6E736C0000000568026400036377646B00222F636C656172636173652F6F74702F657274732F6C69622F6B65726E656C2F73726368026400066F75746469726B002A2F636C656172636173652F6F74702F657274732F6C69622F6B65726E656C2F7372632F2E2E2F6562696E6802640001696B002D2F636C656172636173652F6F74702F657274732F6C69622F6B65726E656C2F7372632F2E2E2F696E636C75646564000A64656275675F696E666F6400107761726E5F756E757365645F766172736A680264000776657273696F6E6B0005342E322E31680264000474696D65680662000007D3610C6112610B6133610F6802640006736F757263656B002A2F636C656172636173652F6F74702F657274732F6C69622F6B65726E656C2F7372632F7270632E65726C6A
-=mod:gb_trees
-Current size: 8274
-Current attributes: 836C00000001680264000376736E6C000000016E1000094BEFDE7B866EF2CB6FCD895AC2EE056A6A
-Current compilation info: 836C0000000468026400076F7074696F6E736C0000000768026400036377646B00222F636C656172636173652F6F74702F657274732F6C69622F7374646C69622F73726368026400066F75746469726B002A2F636C656172636173652F6F74702F657274732F6C69622F7374646C69622F7372632F2E2E2F6562696E6802640001696B002D2F636C656172636173652F6F74702F657274732F6C69622F7374646C69622F7372632F2E2E2F696E636C7564656802640001696B00372F636C656172636173652F6F74702F657274732F6C69622F7374646C69622F7372632F2E2E2F2E2E2F6B65726E656C2F696E636C7564656400107761726E5F756E757365645F7661727364000A64656275675F696E666F6400107761726E5F756E757365645F766172736A680264000776657273696F6E6B0005342E322E31680264000474696D65680662000007D3610C6112610B612D612B6802640006736F757263656B002F2F636C656172636173652F6F74702F657274732F6C69622F7374646C69622F7372632F67625F74726565732E65726C6A
-=mod:global
-Current size: 40753
-Current attributes: 836C00000002680264000376736E6C000000016E10001D02C89BDE6CB2052F099894683C14CA6A68026400096265686176696F75726C0000000164000A67656E5F7365727665726A6A
-Current compilation info: 836C0000000468026400076F7074696F6E736C0000000568026400036377646B00222F636C656172636173652F6F74702F657274732F6C69622F6B65726E656C2F73726368026400066F75746469726B002A2F636C656172636173652F6F74702F657274732F6C69622F6B65726E656C2F7372632F2E2E2F6562696E6802640001696B002D2F636C656172636173652F6F74702F657274732F6C69622F6B65726E656C2F7372632F2E2E2F696E636C75646564000A64656275675F696E666F6400107761726E5F756E757365645F766172736A680264000776657273696F6E6B0005342E322E31680264000474696D65680662000007D3610C6112610B613161386802640006736F757263656B002D2F636C656172636173652F6F74702F657274732F6C69622F6B65726E656C2F7372632F676C6F62616C2E65726C6A
-=mod:inet_db
-Current size: 34555
-Current attributes: 836C00000001680264000376736E6C000000016E1000C1CF6A6F2E83D4EBC23D2CCECBF376226A6A
-Current compilation info: 836C0000000468026400076F7074696F6E736C0000000568026400036377646B00222F636C656172636173652F6F74702F657274732F6C69622F6B65726E656C2F73726368026400066F75746469726B002A2F636C656172636173652F6F74702F657274732F6C69622F6B65726E656C2F7372632F2E2E2F6562696E6802640001696B002D2F636C656172636173652F6F74702F657274732F6C69622F6B65726E656C2F7372632F2E2E2F696E636C75646564000A64656275675F696E666F6400107761726E5F756E757365645F766172736A680264000776657273696F6E6B0005342E322E31680264000474696D65680662000007D3610C6112610B6132611A6802640006736F757263656B002E2F636C656172636173652F6F74702F657274732F6C69622F6B65726E656C2F7372632F696E65745F64622E65726C6A
-=mod:inet_config
-Current size: 13575
-Current attributes: 836C00000001680264000376736E6C000000016E1000650F6571C03BC9C16BB7973A747565066A6A
-Current compilation info: 836C0000000468026400076F7074696F6E736C0000000568026400036377646B00222F636C656172636173652F6F74702F657274732F6C69622F6B65726E656C2F73726368026400066F75746469726B002A2F636C656172636173652F6F74702F657274732F6C69622F6B65726E656C2F7372632F2E2E2F6562696E6802640001696B002D2F636C656172636173652F6F74702F657274732F6C69622F6B65726E656C2F7372632F2E2E2F696E636C75646564000A64656275675F696E666F6400107761726E5F756E757365645F766172736A680264000776657273696F6E6B0005342E322E31680264000474696D65680662000007D3610C6112610B613261166802640006736F757263656B00322F636C656172636173652F6F74702F657274732F6C69622F6B65726E656C2F7372632F696E65745F636F6E6669672E65726C6A
-=mod:os
-Current size: 5997
-Current attributes: 836C00000001680264000376736E6C000000016E100017144CD766A604A9DFBA0B58C8FCA78B6A6A
-Current compilation info: 836C0000000468026400076F7074696F6E736C0000000568026400036377646B00222F636C656172636173652F6F74702F657274732F6C69622F6B65726E656C2F73726368026400066F75746469726B002A2F636C656172636173652F6F74702F657274732F6C69622F6B65726E656C2F7372632F2E2E2F6562696E6802640001696B002D2F636C656172636173652F6F74702F657274732F6C69622F6B65726E656C2F7372632F2E2E2F696E636C75646564000A64656275675F696E666F6400107761726E5F756E757365645F766172736A680264000776657273696F6E6B0005342E322E31680264000474696D65680662000007D3610C6112610B613361056802640006736F757263656B00292F636C656172636173652F6F74702F657274732F6C69622F6B65726E656C2F7372632F6F732E65726C6A
-=mod:inet_udp
-Current size: 2451
-Current attributes: 836C00000001680264000376736E6C000000016E1000ACB163E87A687A6683B50B331C6E289B6A6A
-Current compilation info: 836C0000000468026400076F7074696F6E736C0000000568026400036377646B00222F636C656172636173652F6F74702F657274732F6C69622F6B65726E656C2F73726368026400066F75746469726B002A2F636C656172636173652F6F74702F657274732F6C69622F6B65726E656C2F7372632F2E2E2F6562696E6802640001696B002D2F636C656172636173652F6F74702F657274732F6C69622F6B65726E656C2F7372632F2E2E2F696E636C75646564000A64656275675F696E666F6400107761726E5F756E757365645F766172736A680264000776657273696F6E6B0005342E322E31680264000474696D65680662000007D3610C6112610B613261306802640006736F757263656B002F2F636C656172636173652F6F74702F657274732F6C69622F6B65726E656C2F7372632F696E65745F7564702E65726C6A
-=mod:inet
-Current size: 28288
-Current attributes: 836C00000001680264000376736E6C000000016E10009B9AD400F0BAF6AAF17A4788A4EFF11E6A6A
-Current compilation info: 836C0000000468026400076F7074696F6E736C0000000568026400036377646B00222F636C656172636173652F6F74702F657274732F6C69622F6B65726E656C2F73726368026400066F75746469726B002A2F636C656172636173652F6F74702F657274732F6C69622F6B65726E656C2F7372632F2E2E2F6562696E6802640001696B002D2F636C656172636173652F6F74702F657274732F6C69622F6B65726E656C2F7372632F2E2E2F696E636C75646564000A64656275675F696E666F6400107761726E5F756E757365645F766172736A680264000776657273696F6E6B0005342E322E31680264000474696D65680662000007D3610C6112610B6132610C6802640006736F757263656B002B2F636C656172636173652F6F74702F657274732F6C69622F6B65726E656C2F7372632F696E65742E65726C6A
-=mod:inet_parse
-Current size: 21928
-Current attributes: 836C00000001680264000376736E6C000000016E1000E0E65454C096847749930EDC1C53C80B6A6A
-Current compilation info: 836C0000000468026400076F7074696F6E736C0000000568026400036377646B00222F636C656172636173652F6F74702F657274732F6C69622F6B65726E656C2F73726368026400066F75746469726B002A2F636C656172636173652F6F74702F657274732F6C69622F6B65726E656C2F7372632F2E2E2F6562696E6802640001696B002D2F636C656172636173652F6F74702F657274732F6C69622F6B65726E656C2F7372632F2E2E2F696E636C75646564000A64656275675F696E666F6400107761726E5F756E757365645F766172736A680264000776657273696F6E6B0005342E322E31680264000474696D65680662000007D3610C6112610B613261266802640006736F757263656B00312F636C656172636173652F6F74702F657274732F6C69622F6B65726E656C2F7372632F696E65745F70617273652E65726C6A
-=mod:filename
-Current size: 17411
-Current attributes: 836C00000001680264000376736E6C000000016E100068085214F459D51A3E08819BF8D7698A6A6A
-Current compilation info: 836C0000000468026400076F7074696F6E736C0000000768026400036377646B00222F636C656172636173652F6F74702F657274732F6C69622F7374646C69622F73726368026400066F75746469726B002A2F636C656172636173652F6F74702F657274732F6C69622F7374646C69622F7372632F2E2E2F6562696E6802640001696B002D2F636C656172636173652F6F74702F657274732F6C69622F7374646C69622F7372632F2E2E2F696E636C7564656802640001696B00372F636C656172636173652F6F74702F657274732F6C69622F7374646C69622F7372632F2E2E2F2E2E2F6B65726E656C2F696E636C7564656400107761726E5F756E757365645F7661727364000A64656275675F696E666F6400107761726E5F756E757365645F766172736A680264000776657273696F6E6B0005342E322E31680264000474696D65680662000007D3610C6112610B612D61296802640006736F757263656B002F2F636C656172636173652F6F74702F657274732F6C69622F7374646C69622F7372632F66696C656E616D652E65726C6A
-=mod:inet_hosts
-Current size: 3745
-Current attributes: 836C00000001680264000376736E6C000000016E1000E7430304E86230057150DEE5D279881F6A6A
-Current compilation info: 836C0000000468026400076F7074696F6E736C0000000568026400036377646B00222F636C656172636173652F6F74702F657274732F6C69622F6B65726E656C2F73726368026400066F75746469726B002A2F636C656172636173652F6F74702F657274732F6C69622F6B65726E656C2F7372632F2E2E2F6562696E6802640001696B002D2F636C656172636173652F6F74702F657274732F6C69622F6B65726E656C2F7372632F2E2E2F696E636C75646564000A64656275675F696E666F6400107761726E5F756E757365645F766172736A680264000776657273696F6E6B0005342E322E31680264000474696D65680662000007D3610C6112610B613261226802640006736F757263656B00312F636C656172636173652F6F74702F657274732F6C69622F6B65726E656C2F7372632F696E65745F686F7374732E65726C6A
-=mod:erl_distribution
-Current size: 2512
-Current attributes: 836C00000002680264000376736E6C000000016E1000CDE49D63ACA767E0D49679657E99D2046A68026400096265686176696F75726C0000000164000A73757065727669736F726A6A
-Current compilation info: 836C0000000468026400076F7074696F6E736C0000000568026400036377646B00222F636C656172636173652F6F74702F657274732F6C69622F6B65726E656C2F73726368026400066F75746469726B002A2F636C656172636173652F6F74702F657274732F6C69622F6B65726E656C2F7372632F2E2E2F6562696E6802640001696B002D2F636C656172636173652F6F74702F657274732F6C69622F6B65726E656C2F7372632F2E2E2F696E636C75646564000A64656275675F696E666F6400107761726E5F756E757365645F766172736A680264000776657273696F6E6B0005342E322E31680264000474696D65680662000007D3610C6112610B613161186802640006736F757263656B00372F636C656172636173652F6F74702F657274732F6C69622F6B65726E656C2F7372632F65726C5F646973747269627574696F6E2E65726C6A
-=mod:global_group
-Current size: 30960
-Current attributes: 836C00000002680264000376736E6C000000016E10008ECE759E5920988CA3ACFF34B32F86736A68026400096265686176696F75726C0000000164000A67656E5F7365727665726A6A
-Current compilation info: 836C0000000468026400076F7074696F6E736C0000000568026400036377646B00222F636C656172636173652F6F74702F657274732F6C69622F6B65726E656C2F73726368026400066F75746469726B002A2F636C656172636173652F6F74702F657274732F6C69622F6B65726E656C2F7372632F2E2E2F6562696E6802640001696B002D2F636C656172636173652F6F74702F657274732F6C69622F6B65726E656C2F7372632F2E2E2F696E636C75646564000A64656275675F696E666F6400107761726E5F756E757365645F766172736A680264000776657273696F6E6B0005342E322E31680264000474696D65680662000007D3610C6112610B6131613B6802640006736F757263656B00332F636C656172636173652F6F74702F657274732F6C69622F6B65726E656C2F7372632F676C6F62616C5F67726F75702E65726C6A
-=mod:net_kernel
-Current size: 37648
-Current attributes: 836C00000002680264000376736E6C000000016E1000967CE7DE41F9B39906CCCF3225E6E5286A68026400096265686176696F75726C0000000164000A67656E5F7365727665726A6A
-Current compilation info: 836C0000000468026400076F7074696F6E736C0000000568026400036377646B00222F636C656172636173652F6F74702F657274732F6C69622F6B65726E656C2F73726368026400066F75746469726B002A2F636C656172636173652F6F74702F657274732F6C69622F6B65726E656C2F7372632F2E2E2F6562696E6802640001696B002D2F636C656172636173652F6F74702F657274732F6C69622F6B65726E656C2F7372632F2E2E2F696E636C75646564000A64656275675F696E666F6400107761726E5F756E757365645F766172736A680264000776657273696F6E6B0005342E322E31680264000474696D65680662000007D3610C6112610B613361026802640006736F757263656B00312F636C656172636173652F6F74702F657274732F6C69622F6B65726E656C2F7372632F6E65745F6B65726E656C2E65726C6A
-=mod:file_server
-Current size: 8372
-Current attributes: 836C00000002680264000376736E6C000000016E1000EF90906EC6204204AC0A77C4A25B65236A68026400096265686176696F75726C0000000164000A67656E5F7365727665726A6A
-Current compilation info: 836C0000000468026400076F7074696F6E736C0000000568026400036377646B00222F636C656172636173652F6F74702F657274732F6C69622F6B65726E656C2F73726368026400066F75746469726B002A2F636C656172636173652F6F74702F657274732F6C69622F6B65726E656C2F7372632F2E2E2F6562696E6802640001696B002D2F636C656172636173652F6F74702F657274732F6C69622F6B65726E656C2F7372632F2E2E2F696E636C75646564000A64656275675F696E666F6400107761726E5F756E757365645F766172736A680264000776657273696F6E6B0005342E322E31680264000474696D65680662000007D3610C6112610B6131612D6802640006736F757263656B00322F636C656172636173652F6F74702F657274732F6C69622F6B65726E656C2F7372632F66696C655F7365727665722E65726C6A
-=mod:old_file_server
-Current size: 3074
-Current attributes: 836C00000001680264000376736E6C000000016E1000C802085DD76D4EFBA6A8F528FECB94B36A6A
-Current compilation info: 836C0000000468026400076F7074696F6E736C0000000568026400036377646B00222F636C656172636173652F6F74702F657274732F6C69622F6B65726E656C2F73726368026400066F75746469726B002A2F636C656172636173652F6F74702F657274732F6C69622F6B65726E656C2F7372632F2E2E2F6562696E6802640001696B002D2F636C656172636173652F6F74702F657274732F6C69622F6B65726E656C2F7372632F2E2E2F696E636C75646564000A64656275675F696E666F6400107761726E5F756E757365645F766172736A680264000776657273696F6E6B0005342E322E31680264000474696D65680662000007D3610C6112610B6131612F6802640006736F757263656B00362F636C656172636173652F6F74702F657274732F6C69622F6B65726E656C2F7372632F6F6C645F66696C655F7365727665722E65726C6A
-=mod:code
-Current size: 7419
-Current attributes: 836C00000001680264000376736E6C000000016E1000AE618E3041C8E3807A3719CD5140DF5E6A6A
-Current compilation info: 836C0000000468026400076F7074696F6E736C0000000568026400036377646B00222F636C656172636173652F6F74702F657274732F6C69622F6B65726E656C2F73726368026400066F75746469726B002A2F636C656172636173652F6F74702F657274732F6C69622F6B65726E656C2F7372632F2E2E2F6562696E6802640001696B002D2F636C656172636173652F6F74702F657274732F6C69622F6B65726E656C2F7372632F2E2E2F696E636C75646564000A64656275675F696E666F6400107761726E5F756E757365645F766172736A680264000776657273696F6E6B0005342E322E31680264000474696D65680662000007D3610C6112610B6130612E6802640006736F757263656B002B2F636C656172636173652F6F74702F657274732F6C69622F6B65726E656C2F7372632F636F64652E65726C6A
-=mod:code_server
-Current size: 30811
-Current attributes: 836C00000001680264000376736E6C000000016E0F00BFB96248C2CA8601B4CB7F543F52E26A6A
-Current compilation info: 836C0000000468026400076F7074696F6E736C0000000568026400036377646B00222F636C656172636173652F6F74702F657274732F6C69622F6B65726E656C2F73726368026400066F75746469726B002A2F636C656172636173652F6F74702F657274732F6C69622F6B65726E656C2F7372632F2E2E2F6562696E6802640001696B002D2F636C656172636173652F6F74702F657274732F6C69622F6B65726E656C2F7372632F2E2E2F696E636C75646564000A64656275675F696E666F6400107761726E5F756E757365645F766172736A680264000776657273696F6E6B0005342E322E31680264000474696D65680662000007D3610C6112610B613061346802640006736F757263656B00322F636C656172636173652F6F74702F657274732F6C69622F6B65726E656C2F7372632F636F64655F7365727665722E65726C6A
-=mod:code_aux
-Current size: 1736
-Current attributes: 836C00000001680264000376736E6C000000016E10007A90DB53FCCECD52504F20E7A3B6BAE26A6A
-Current compilation info: 836C0000000468026400076F7074696F6E736C0000000568026400036377646B00222F636C656172636173652F6F74702F657274732F6C69622F6B65726E656C2F73726368026400066F75746469726B002A2F636C656172636173652F6F74702F657274732F6C69622F6B65726E656C2F7372632F2E2E2F6562696E6802640001696B002D2F636C656172636173652F6F74702F657274732F6C69622F6B65726E656C2F7372632F2E2E2F696E636C75646564000A64656275675F696E666F6400107761726E5F756E757365645F766172736A680264000776657273696F6E6B0005342E322E31680264000474696D65680662000007D3610C6112610B613061316802640006736F757263656B002F2F636C656172636173652F6F74702F657274732F6C69622F6B65726E656C2F7372632F636F64655F6175782E65726C6A
-=mod:packages
-Current size: 3119
-Current attributes: 836C00000001680264000376736E6C000000016E1000044DC8EEB65F178AE23EF2465E1954496A6A
-Current compilation info: 836C0000000468026400076F7074696F6E736C0000000568026400036377646B00222F636C656172636173652F6F74702F657274732F6C69622F6B65726E656C2F73726368026400066F75746469726B002A2F636C656172636173652F6F74702F657274732F6C69622F6B65726E656C2F7372632F2E2E2F6562696E6802640001696B002D2F636C656172636173652F6F74702F657274732F6C69622F6B65726E656C2F7372632F2E2E2F696E636C75646564000A64656275675F696E666F6400107761726E5F756E757365645F766172736A680264000776657273696F6E6B0005342E322E31680264000474696D65680662000007D3610C6112610B613361076802640006736F757263656B002F2F636C656172636173652F6F74702F657274732F6C69622F6B65726E656C2F7372632F7061636B616765732E65726C6A
-=mod:hipe_unified_loader
-Current size: 37330
-Current attributes: 836C00000001680264000376736E6C000000016E1000DABD57945702E56F4B3AA7B7B19C1D166A6A
-Current compilation info: 836C0000000468026400076F7074696F6E736C0000000568026400036377646B00222F636C656172636173652F6F74702F657274732F6C69622F6B65726E656C2F73726368026400066F75746469726B002A2F636C656172636173652F6F74702F657274732F6C69622F6B65726E656C2F7372632F2E2E2F6562696E6802640001696B002D2F636C656172636173652F6F74702F657274732F6C69622F6B65726E656C2F7372632F2E2E2F696E636C75646564000A64656275675F696E666F6400107761726E5F756E757365645F766172736A680264000776657273696F6E6B0005342E322E31680264000474696D65680662000007D3610C6112610B613361326802640006736F757263656B003A2F636C656172636173652F6F74702F657274732F6C69622F6B65726E656C2F7372632F686970655F756E69666965645F6C6F616465722E65726C6A
-=mod:hipe_sparc_loader
-Current size: 1821
-Current attributes: 836C00000001680264000376736E6C000000016E1000582BC55E9FADFF879C2C45D25A6CB7E56A6A
-Current compilation info: 836C0000000468026400076F7074696F6E736C0000000868026400036377646B00222F636C656172636173652F6F74702F657274732F6C69622F6B65726E656C2F73726368026400066F75746469726B002A2F636C656172636173652F6F74702F657274732F6C69622F6B65726E656C2F7372632F2E2E2F6562696E6802640001696B002D2F636C656172636173652F6F74702F657274732F6C69622F6B65726E656C2F7372632F2E2E2F696E636C7564656802640001696B00322F636C656172636173652F6F74702F657274732F6C69622F6B65726E656C2F7372632F2E2E2F2E2E2F686970652F6D61696E6802640001696B00312F636C656172636173652F6F74702F657274732F6C69622F6B65726E656C2F7372632F2E2E2F2E2E2F686970652F72746C6802640001696B00332F636C656172636173652F6F74702F657274732F6C69622F6B65726E656C2F7372632F2E2E2F2E2E2F686970652F737061726364000A64656275675F696E666F6400107761726E5F756E757365645F766172736A680264000776657273696F6E6B0005342E322E31680264000474696D65680662000007D3610C6112610B6133612B6802640006736F757263656B00382F636C656172636173652F6F74702F657274732F6C69622F6B65726E656C2F7372632F686970655F73706172635F6C6F616465722E65726C6A
-=mod:ets
-Current size: 16577
-Current attributes: 836C00000002680264000376736E6C000000016E100033D982AC91129E5FC35E0AC3337A4EB56A680264000A646570726563617465646C0000000168026400086669787461626C6561026A6A
-Current compilation info: 836C0000000468026400076F7074696F6E736C0000000768026400036377646B00222F636C656172636173652F6F74702F657274732F6C69622F7374646C69622F73726368026400066F75746469726B002A2F636C656172636173652F6F74702F657274732F6C69622F7374646C69622F7372632F2E2E2F6562696E6802640001696B002D2F636C656172636173652F6F74702F657274732F6C69622F7374646C69622F7372632F2E2E2F696E636C7564656802640001696B00372F636C656172636173652F6F74702F657274732F6C69622F7374646C69622F7372632F2E2E2F2E2E2F6B65726E656C2F696E636C7564656400107761726E5F756E757365645F7661727364000A64656275675F696E666F6400107761726E5F756E757365645F766172736A680264000776657273696F6E6B0005342E322E31680264000474696D65680662000007D3610C6112610B612D611C6802640006736F757263656B002A2F636C656172636173652F6F74702F657274732F6C69622F7374646C69622F7372632F6574732E65726C6A
-=mod:lists_sort
-Current size: 38692
-Current attributes: 836C00000001680264000376736E6C000000016E1000E17EC92FA9AA3199DD71701C215044616A6A
-Current compilation info: 836C0000000468026400076F7074696F6E736C0000000B68026400036377646B00222F636C656172636173652F6F74702F657274732F6C69622F7374646C69622F73726368026400066F75746469726B002A2F636C656172636173652F6F74702F657274732F6C69622F7374646C69622F7372632F2E2E2F6562696E6802640001696B002D2F636C656172636173652F6F74702F657274732F6C69622F7374646C69622F7372632F2E2E2F696E636C7564656802640001696B00372F636C656172636173652F6F74702F657274732F6C69622F7374646C69622F7372632F2E2E2F2E2E2F6B65726E656C2F696E636C7564656400107761726E5F756E757365645F7661727364000A64656275675F696E666F6400107761726E5F756E757365645F766172736802640006696E6C696E656C0000000468026400096D65726765335F3132610768026400096D65726765335F32316107680264000A726D65726765335F31326107680264000A726D65726765335F323161076A6802640006696E6C696E656C00000004680264000A756D65726765335F31326108680264000A756D65726765335F32316108680264000C72756D65726765335F3132616107680264000C72756D65726765335F31326261086A6802640006696E6C696E656C00000004680264000C6B65796D65726765335F3132610C680264000C6B65796D65726765335F3231610C680264000D726B65796D65726765335F3132610C680264000D726B65796D65726765335F3231610C6A6802640006696E6C696E656C00000006680264000D756B65796D65726765335F3132610D680264000D756B65796D65726765335F3231610D680264000F72756B65796D65726765335F313261610B680264000F72756B65796D65726765335F323161610D680264000F72756B65796D65726765335F313262610D680264000F72756B65796D65726765335F323162610C6A6A680264000776657273696F6E6B0005342E322E31680264000474696D65680662000007D3610C6112610B612E61166802640006736F757263656B00312F636C656172636173652F6F74702F657274732F6C69622F7374646C69622F7372632F6C697374735F736F72742E65726C6A
-=mod:user_sup
-Current size: 2355
-Current attributes: 836C00000002680264000376736E6C000000016E100074BA860804CB4D60D6908C705E6544BD6A68026400096265686176696F75726C0000000164001173757065727669736F725F6272696467656A6A
-Current compilation info: 836C0000000468026400076F7074696F6E736C0000000568026400036377646B00222F636C656172636173652F6F74702F657274732F6C69622F6B65726E656C2F73726368026400066F75746469726B002A2F636C656172636173652F6F74702F657274732F6C69622F6B65726E656C2F7372632F2E2E2F6562696E6802640001696B002D2F636C656172636173652F6F74702F657274732F6C69622F6B65726E656C2F7372632F2E2E2F696E636C75646564000A64656275675F696E666F6400107761726E5F756E757365645F766172736A680264000776657273696F6E6B0005342E322E31680264000474696D65680662000007D3610C6112610B613361246802640006736F757263656B002F2F636C656172636173652F6F74702F657274732F6C69622F6B65726E656C2F7372632F757365725F7375702E65726C6A
-=mod:supervisor_bridge
-Current size: 2944
-Current attributes: 836C00000002680264000376736E6C000000016E10001590DDC10CF8A9D09763CDB7479678ED6A68026400096265686176696F75726C0000000164000A67656E5F7365727665726A6A
-Current compilation info: 836C0000000468026400076F7074696F6E736C0000000768026400036377646B00222F636C656172636173652F6F74702F657274732F6C69622F7374646C69622F73726368026400066F75746469726B002A2F636C656172636173652F6F74702F657274732F6C69622F7374646C69622F7372632F2E2E2F6562696E6802640001696B002D2F636C656172636173652F6F74702F657274732F6C69622F7374646C69622F7372632F2E2E2F696E636C7564656802640001696B00372F636C656172636173652F6F74702F657274732F6C69622F7374646C69622F7372632F2E2E2F2E2E2F6B65726E656C2F696E636C7564656400107761726E5F756E757365645F7661727364000A64656275675F696E666F6400107761726E5F756E757365645F766172736A680264000776657273696F6E6B0005342E322E31680264000474696D65680662000007D3610C6112610B612F61156802640006736F757263656B00382F636C656172636173652F6F74702F657274732F6C69622F7374646C69622F7372632F73757065727669736F725F6272696467652E65726C6A
-=mod:user_drv
-Current size: 14630
-Current attributes: 836C00000001680264000376736E6C000000016E1000F29F3B193A1EB1ADA9975D97E51BF0E86A6A
-Current compilation info: 836C0000000468026400076F7074696F6E736C0000000568026400036377646B00222F636C656172636173652F6F74702F657274732F6C69622F6B65726E656C2F73726368026400066F75746469726B002A2F636C656172636173652F6F74702F657274732F6C69622F6B65726E656C2F7372632F2E2E2F6562696E6802640001696B002D2F636C656172636173652F6F74702F657274732F6C69622F6B65726E656C2F7372632F2E2E2F696E636C75646564000A64656275675F696E666F6400107761726E5F756E757365645F766172736A680264000776657273696F6E6B0005342E322E31680264000474696D65680662000007D3610C6112610B613361216802640006736F757263656B002F2F636C656172636173652F6F74702F657274732F6C69622F6B65726E656C2F7372632F757365725F6472762E65726C6A
-=mod:group
-Current size: 10165
-Current attributes: 836C00000001680264000376736E6C000000016E1000F6427D0DA330BBFAD5D4C19058516FF36A6A
-Current compilation info: 836C0000000468026400076F7074696F6E736C0000000568026400036377646B00222F636C656172636173652F6F74702F657274732F6C69622F6B65726E656C2F73726368026400066F75746469726B002A2F636C656172636173652F6F74702F657274732F6C69622F6B65726E656C2F7372632F2E2E2F6562696E6802640001696B002D2F636C656172636173652F6F74702F657274732F6C69622F6B65726E656C2F7372632F2E2E2F696E636C75646564000A64656275675F696E666F6400107761726E5F756E757365645F766172736A680264000776657273696F6E6B0005342E322E31680264000474696D65680662000007D3610C6112610B613261066802640006736F757263656B002C2F636C656172636173652F6F74702F657274732F6C69622F6B65726E656C2F7372632F67726F75702E65726C6A
-=mod:io_lib
-Current size: 12601
-Current attributes: 836C00000002680264000376736E6C000000016E10004160DD78F37EE7C72F7C5B6A751DB7F56A680264000A646570726563617465646C0000000468026400047363616E610168026400047363616E610268026400047363616E6103680264000D72657365727665645F776F726461016A6A
-Current compilation info: 836C0000000468026400076F7074696F6E736C0000000768026400036377646B00222F636C656172636173652F6F74702F657274732F6C69622F7374646C69622F73726368026400066F75746469726B002A2F636C656172636173652F6F74702F657274732F6C69622F7374646C69622F7372632F2E2E2F6562696E6802640001696B002D2F636C656172636173652F6F74702F657274732F6C69622F7374646C69622F7372632F2E2E2F696E636C7564656802640001696B00372F636C656172636173652F6F74702F657274732F6C69622F7374646C69622F7372632F2E2E2F2E2E2F6B65726E656C2F696E636C7564656400107761726E5F756E757365645F7661727364000A64656275675F696E666F6400107761726E5F756E757365645F766172736A680264000776657273696F6E6B0005342E322E31680264000474696D65680662000007D3610C6112610B612E61036802640006736F757263656B002D2F636C656172636173652F6F74702F657274732F6C69622F7374646C69622F7372632F696F5F6C69622E65726C6A
-=mod:edlin
-Current size: 18178
-Current attributes: 836C00000001680264000376736E6C000000016E100035D752FCBA8ED7F4D26990EF3E6A1A526A6A
-Current compilation info: 836C0000000468026400076F7074696F6E736C0000000768026400036377646B00222F636C656172636173652F6F74702F657274732F6C69622F7374646C69622F73726368026400066F75746469726B002A2F636C656172636173652F6F74702F657274732F6C69622F7374646C69622F7372632F2E2E2F6562696E6802640001696B002D2F636C656172636173652F6F74702F657274732F6C69622F7374646C69622F7372632F2E2E2F696E636C7564656802640001696B00372F636C656172636173652F6F74702F657274732F6C69622F7374646C69622F7372632F2E2E2F2E2E2F6B65726E656C2F696E636C7564656400107761726E5F756E757365645F7661727364000A64656275675F696E666F6400107761726E5F756E757365645F766172736A680264000776657273696F6E6B0005342E322E31680264000474696D65680662000007D3610C6112610B612C61016802640006736F757263656B002C2F636C656172636173652F6F74702F657274732F6C69622F7374646C69622F7372632F65646C696E2E65726C6A
-=mod:io_lib_format
-Current size: 16189
-Current attributes: 836C00000001680264000376736E6C000000016E10004F382F327C456F83F33C3D5EBFBD87906A6A
-Current compilation info: 836C0000000468026400076F7074696F6E736C0000000768026400036377646B00222F636C656172636173652F6F74702F657274732F6C69622F7374646C69622F73726368026400066F75746469726B002A2F636C656172636173652F6F74702F657274732F6C69622F7374646C69622F7372632F2E2E2F6562696E6802640001696B002D2F636C656172636173652F6F74702F657274732F6C69622F7374646C69622F7372632F2E2E2F696E636C7564656802640001696B00372F636C656172636173652F6F74702F657274732F6C69622F7374646C69622F7372632F2E2E2F2E2E2F6B65726E656C2F696E636C7564656400107761726E5F756E757365645F7661727364000A64656275675F696E666F6400107761726E5F756E757365645F766172736A680264000776657273696F6E6B0005342E322E31680264000474696D65680662000007D3610C6112610B612E61066802640006736F757263656B00342F636C656172636173652F6F74702F657274732F6C69622F7374646C69622F7372632F696F5F6C69625F666F726D61742E65726C6A
-=mod:kernel_config
-Current size: 3295
-Current attributes: 836C00000002680264000376736E6C000000016E100077B8EE6C9E95FBBE5DB0371F6DB235226A68026400096265686176696F75726C0000000164000A67656E5F7365727665726A6A
-Current compilation info: 836C0000000468026400076F7074696F6E736C0000000568026400036377646B00222F636C656172636173652F6F74702F657274732F6C69622F6B65726E656C2F73726368026400066F75746469726B002A2F636C656172636173652F6F74702F657274732F6C69622F6B65726E656C2F7372632F2E2E2F6562696E6802640001696B002D2F636C656172636173652F6F74702F657274732F6C69622F6B65726E656C2F7372632F2E2E2F696E636C75646564000A64656275675F696E666F6400107761726E5F756E757365645F766172736A680264000776657273696F6E6B0005342E322E31680264000474696D65680662000007D3610C6112610B613261356802640006736F757263656B00342F636C656172636173652F6F74702F657274732F6C69622F6B65726E656C2F7372632F6B65726E656C5F636F6E6669672E65726C6A
-=mod:shell
-Current size: 22571
-Current attributes: 836C00000001680264000376736E6C000000016E10007D1354325618EB98A5BD4E8F41E6A0226A6A
-Current compilation info: 836C0000000468026400076F7074696F6E736C0000000768026400036377646B00222F636C656172636173652F6F74702F657274732F6C69622F7374646C69622F73726368026400066F75746469726B002A2F636C656172636173652F6F74702F657274732F6C69622F7374646C69622F7372632F2E2E2F6562696E6802640001696B002D2F636C656172636173652F6F74702F657274732F6C69622F7374646C69622F7372632F2E2E2F696E636C7564656802640001696B00372F636C656172636173652F6F74702F657274732F6C69622F7374646C69622F7372632F2E2E2F2E2E2F6B65726E656C2F696E636C7564656400107761726E5F756E757365645F7661727364000A64656275675F696E666F6400107761726E5F756E757365645F766172736A680264000776657273696F6E6B0005342E322E31680264000474696D65680662000007D3610C6112610B612F61016802640006736F757263656B002C2F636C656172636173652F6F74702F657274732F6C69622F7374646C69622F7372632F7368656C6C2E65726C6A
-=mod:error_logger_tty_h
-Current size: 7773
-Current attributes: 836C00000002680264000376736E6C000000016E10001502D55D6C1777F07E2E05CDD91D16986A68026400096265686176696F75726C0000000164000967656E5F6576656E746A6A
-Current compilation info: 836C0000000468026400076F7074696F6E736C0000000768026400036377646B00222F636C656172636173652F6F74702F657274732F6C69622F7374646C69622F73726368026400066F75746469726B002A2F636C656172636173652F6F74702F657274732F6C69622F7374646C69622F7372632F2E2E2F6562696E6802640001696B002D2F636C656172636173652F6F74702F657274732F6C69622F7374646C69622F7372632F2E2E2F696E636C7564656802640001696B00372F636C656172636173652F6F74702F657274732F6C69622F7374646C69622F7372632F2E2E2F2E2E2F6B65726E656C2F696E636C7564656400107761726E5F756E757365645F7661727364000A64656275675F696E666F6400107761726E5F756E757365645F766172736A680264000776657273696F6E6B0005342E322E31680264000474696D65680662000007D3610C6112610B612D61196802640006736F757263656B00392F636C656172636173652F6F74702F657274732F6C69622F7374646C69622F7372632F6572726F725F6C6F676765725F7474795F682E65726C6A
-=mod:erl_eval
-Current size: 33481
-Current attributes: 836C00000002680264000376736E6C000000016E1000D06903753C86BBC49A5CBD789CCB09B66A680264000A646570726563617465646C00000004680264000373657161026802640003736571610368026400086172675F6C697374610268026400086172675F6C69737461036A6A
-Current compilation info: 836C0000000468026400076F7074696F6E736C0000000768026400036377646B00222F636C656172636173652F6F74702F657274732F6C69622F7374646C69622F73726368026400066F75746469726B002A2F636C656172636173652F6F74702F657274732F6C69622F7374646C69622F7372632F2E2E2F6562696E6802640001696B002D2F636C656172636173652F6F74702F657274732F6C69622F7374646C69622F7372632F2E2E2F696E636C7564656802640001696B00372F636C656172636173652F6F74702F657274732F6C69622F7374646C69622F7372632F2E2E2F2E2E2F6B65726E656C2F696E636C7564656400107761726E5F756E757365645F7661727364000A64656275675F696E666F6400107761726E5F756E757365645F766172736A680264000776657273696F6E6B0005342E322E31680264000474696D65680662000007D3610C6112610B612C610D6802640006736F757263656B002F2F636C656172636173652F6F74702F657274732F6C69622F7374646C69622F7372632F65726C5F6576616C2E65726C6A
-=mod:orddict
-Current size: 4872
-Current attributes: 836C00000002680264000376736E6C000000016E100078DCF69F3949D79BC54168266A3ABF566A680264000A646570726563617465646C00000002680264000C646963745F746F5F6C6973746101680264000C6C6973745F746F5F6469637461016A6A
-Current compilation info: 836C0000000468026400076F7074696F6E736C0000000768026400036377646B00222F636C656172636173652F6F74702F657274732F6C69622F7374646C69622F73726368026400066F75746469726B002A2F636C656172636173652F6F74702F657274732F6C69622F7374646C69622F7372632F2E2E2F6562696E6802640001696B002D2F636C656172636173652F6F74702F657274732F6C69622F7374646C69622F7372632F2E2E2F696E636C7564656802640001696B00372F636C656172636173652F6F74702F657274732F6C69622F7374646C69622F7372632F2E2E2F2E2E2F6B65726E656C2F696E636C7564656400107761726E5F756E757365645F7661727364000A64656275675F696E666F6400107761726E5F756E757365645F766172736A680264000776657273696F6E6B0005342E322E31680264000474696D65680662000007D3610C6112610B612E61236802640006736F757263656B002E2F636C656172636173652F6F74702F657274732F6C69622F7374646C69622F7372632F6F7264646963742E65726C6A
-=mod:c
-Current size: 19555
-Current attributes: 836C00000001680264000376736E6C000000016E10003FACCF5DE16ABBC988ABF0811980C33B6A6A
-Current compilation info: 836C0000000468026400076F7074696F6E736C0000000768026400036377646B00222F636C656172636173652F6F74702F657274732F6C69622F7374646C69622F73726368026400066F75746469726B002A2F636C656172636173652F6F74702F657274732F6C69622F7374646C69622F7372632F2E2E2F6562696E6802640001696B002D2F636C656172636173652F6F74702F657274732F6C69622F7374646C69622F7372632F2E2E2F696E636C7564656802640001696B00372F636C656172636173652F6F74702F657274732F6C69622F7374646C69622F7372632F2E2E2F2E2E2F6B65726E656C2F696E636C7564656400107761726E5F756E757365645F7661727364000A64656275675F696E666F6400107761726E5F756E757365645F766172736A680264000776657273696F6E6B0005342E322E31680264000474696D65680662000007D3610C6112610B612B61136802640006736F757263656B00282F636C656172636173652F6F74702F657274732F6C69622F7374646C69622F7372632F632E65726C6A
-=mod:io
-Current size: 7417
-Current attributes: 836C00000002680264000376736E6C000000016E1000E2F2A6094B3C3D945865225D0620E7546A680264000A646570726563617465646C00000007680264000B70617273655F65787072736102680264000C7363616E5F65726C5F7365716101680264000C7363616E5F65726C5F7365716102680264000C7363616E5F65726C5F7365716103680264000D70617273655F65726C5F7365716101680264000D70617273655F65726C5F7365716102680264000D70617273655F65726C5F73657161036A6A
-Current compilation info: 836C0000000468026400076F7074696F6E736C0000000768026400036377646B00222F636C656172636173652F6F74702F657274732F6C69622F7374646C69622F73726368026400066F75746469726B002A2F636C656172636173652F6F74702F657274732F6C69622F7374646C69622F7372632F2E2E2F6562696E6802640001696B002D2F636C656172636173652F6F74702F657274732F6C69622F7374646C69622F7372632F2E2E2F696E636C7564656802640001696B00372F636C656172636173652F6F74702F657274732F6C69622F7374646C69622F7372632F2E2E2F2E2E2F6B65726E656C2F696E636C7564656400107761726E5F756E757365645F7661727364000A64656275675F696E666F6400107761726E5F756E757365645F766172736A680264000776657273696F6E6B0005342E322E31680264000474696D65680662000007D3610C6112610B612E61006802640006736F757263656B00292F636C656172636173652F6F74702F657274732F6C69622F7374646C69622F7372632F696F2E65726C6A
-=mod:file
-Current size: 20795
-Current attributes: 836C00000002680264000376736E6C000000016E1000D291AF77EE8B08B792B7FE99274504506A680264000A646570726563617465646C00000001680264000966696C655F696E666F61016A6A
-Current compilation info: 836C0000000468026400076F7074696F6E736C0000000568026400036377646B00222F636C656172636173652F6F74702F657274732F6C69622F6B65726E656C2F73726368026400066F75746469726B002A2F636C656172636173652F6F74702F657274732F6C69622F6B65726E656C2F7372632F2E2E2F6562696E6802640001696B002D2F636C656172636173652F6F74702F657274732F6C69622F6B65726E656C2F7372632F2E2E2F696E636C75646564000A64656275675F696E666F6400107761726E5F756E757365645F766172736A680264000776657273696F6E6B0005342E322E31680264000474696D65680662000007D3610C6112610B613161276802640006736F757263656B002B2F636C656172636173652F6F74702F657274732F6C69622F6B65726E656C2F7372632F66696C652E65726C6A
-=mod:file_io_server
-Current size: 12071
-Current attributes: 836C00000001680264000376736E6C000000016E1000A5A8C4E2B2646855AD5C617CB216CB966A6A
-Current compilation info: 836C0000000468026400076F7074696F6E736C0000000568026400036377646B00222F636C656172636173652F6F74702F657274732F6C69622F6B65726E656C2F73726368026400066F75746469726B002A2F636C656172636173652F6F74702F657274732F6C69622F6B65726E656C2F7372632F2E2E2F6562696E6802640001696B002D2F636C656172636173652F6F74702F657274732F6C69622F6B65726E656C2F7372632F2E2E2F696E636C75646564000A64656275675F696E666F6400107761726E5F756E757365645F766172736A680264000776657273696F6E6B0005342E322E31680264000474696D65680662000007D3610C6112610B6131612A6802640006736F757263656B00352F636C656172636173652F6F74702F657274732F6C69622F6B65726E656C2F7372632F66696C655F696F5F7365727665722E65726C6A
-=mod:erl_scan
-Current size: 21891
-Current attributes: 836C00000001680264000376736E6C000000016E100094F386F0C378B258E5D9CEADD4F03B6A6A6A
-Current compilation info: 836C0000000468026400076F7074696F6E736C0000000768026400036377646B00222F636C656172636173652F6F74702F657274732F6C69622F7374646C69622F73726368026400066F75746469726B002A2F636C656172636173652F6F74702F657274732F6C69622F7374646C69622F7372632F2E2E2F6562696E6802640001696B002D2F636C656172636173652F6F74702F657274732F6C69622F7374646C69622F7372632F2E2E2F696E636C7564656802640001696B00372F636C656172636173652F6F74702F657274732F6C69622F7374646C69622F7372632F2E2E2F2E2E2F6B65726E656C2F696E636C7564656400107761726E5F756E757365645F7661727364000A64656275675F696E666F6400107761726E5F756E757365645F766172736A680264000776657273696F6E6B0005342E322E31680264000474696D65680662000007D3610C6112610B612D61116802640006736F757263656B002F2F636C656172636173652F6F74702F657274732F6C69622F7374646C69622F7372632F65726C5F7363616E2E65726C6A
-=mod:erl_parse
-Current size: 161233
-Current attributes: 836C00000001680264000376736E6C000000016E10000E8CBC32C293BFC1FBC721CE918062236A6A
-Current compilation info: 836C0000000468026400076F7074696F6E736C0000000968026400036377646B00222F636C656172636173652F6F74702F657274732F6C69622F7374646C69622F73726368026400066F75746469726B002A2F636C656172636173652F6F74702F657274732F6C69622F7374646C69622F7372632F2E2E2F6562696E6802640001696B002D2F636C656172636173652F6F74702F657274732F6C69622F7374646C69622F7372632F2E2E2F696E636C7564656802640001696B00372F636C656172636173652F6F74702F657274732F6C69622F7374646C69622F7372632F2E2E2F2E2E2F6B65726E656C2F696E636C7564656400107761726E5F756E757365645F7661727364000A64656275675F696E666F6400107761726E5F756E757365645F76617273640006696E6C696E656802640004686970656C000000016802640008726567616C6C6F6364000B6C696E6561725F7363616E6A6A680264000776657273696F6E6B0005342E322E31680264000474696D65680662000007D3610C6112610B612D61076802640006736F757263656B00302F636C656172636173652F6F74702F657274732F6C69622F7374646C69622F7372632F65726C5F70617273652E65726C6A
-=mod:erl_lint
-Current size: 73159
-Current attributes: 836C00000001680264000376736E6C000000016E1000D1D2A7D6DDFD1195CB180993C76FD2CD6A6A
-Current compilation info: 836C0000000468026400076F7074696F6E736C0000000768026400036377646B00222F636C656172636173652F6F74702F657274732F6C69622F7374646C69622F73726368026400066F75746469726B002A2F636C656172636173652F6F74702F657274732F6C69622F7374646C69622F7372632F2E2E2F6562696E6802640001696B002D2F636C656172636173652F6F74702F657274732F6C69622F7374646C69622F7372632F2E2E2F696E636C7564656802640001696B00372F636C656172636173652F6F74702F657274732F6C69622F7374646C69622F7372632F2E2E2F2E2E2F6B65726E656C2F696E636C7564656400107761726E5F756E757365645F7661727364000A64656275675F696E666F6400107761726E5F756E757365645F766172736A680264000776657273696F6E6B0005342E322E31680264000474696D65680662000007D3610C6112610B612C61156802640006736F757263656B002F2F636C656172636173652F6F74702F657274732F6C69622F7374646C69622F7372632F65726C5F6C696E742E65726C6A
-=mod:ordsets
-Current size: 3257
-Current attributes: 836C00000002680264000376736E6C000000016E1000FD39D8FD846511128F5670BA28600F676A680264000A646570726563617465646C0000000468026400076E65775F7365746100680264000B7365745F746F5F6C6973746101680264000B6C6973745F746F5F7365746101680264000673756273657461026A6A
-Current compilation info: 836C0000000468026400076F7074696F6E736C0000000768026400036377646B00222F636C656172636173652F6F74702F657274732F6C69622F7374646C69622F73726368026400066F75746469726B002A2F636C656172636173652F6F74702F657274732F6C69622F7374646C69622F7372632F2E2E2F6562696E6802640001696B002D2F636C656172636173652F6F74702F657274732F6C69622F7374646C69622F7372632F2E2E2F696E636C7564656802640001696B00372F636C656172636173652F6F74702F657274732F6C69622F7374646C69622F7372632F2E2E2F2E2E2F6B65726E656C2F696E636C7564656400107761726E5F756E757365645F7661727364000A64656275675F696E666F6400107761726E5F756E757365645F766172736A680264000776657273696F6E6B0005342E322E31680264000474696D65680662000007D3610C6112610B612E61256802640006736F757263656B002E2F636C656172636173652F6F74702F657274732F6C69622F7374646C69622F7372632F6F7264736574732E65726C6A
-=mod:dict
-Current size: 15637
-Current attributes: 836C00000002680264000376736E6C000000016E1000BC846E7EF85045A5D76190CE9B1AE97C6A680264000A646570726563617465646C00000002680264000C646963745F746F5F6C6973746101680264000C6C6973745F746F5F6469637461016A6A
-Current compilation info: 836C0000000468026400076F7074696F6E736C0000000768026400036377646B00222F636C656172636173652F6F74702F657274732F6C69622F7374646C69622F73726368026400066F75746469726B002A2F636C656172636173652F6F74702F657274732F6C69622F7374646C69622F7372632F2E2E2F6562696E6802640001696B002D2F636C656172636173652F6F74702F657274732F6C69622F7374646C69622F7372632F2E2E2F696E636C7564656802640001696B00372F636C656172636173652F6F74702F657274732F6C69622F7374646C69622F7372632F2E2E2F2E2E2F6B65726E656C2F696E636C7564656400107761726E5F756E757365645F7661727364000A64656275675F696E666F6400107761726E5F756E757365645F766172736A680264000776657273696F6E6B0005342E322E31680264000474696D65680662000007D3610C6112610B612B61356802640006736F757263656B002B2F636C656172636173652F6F74702F657274732F6C69622F7374646C69622F7372632F646963742E65726C6A
-=mod:otp_internal
-Current size: 7133
-Current attributes: 836C00000001680264000376736E6C000000016E1000DC494F64DE590AFC4919DFEB0EB026B66A6A
-Current compilation info: 836C0000000468026400076F7074696F6E736C0000000768026400036377646B00222F636C656172636173652F6F74702F657274732F6C69622F7374646C69622F73726368026400066F75746469726B002A2F636C656172636173652F6F74702F657274732F6C69622F7374646C69622F7372632F2E2E2F6562696E6802640001696B002D2F636C656172636173652F6F74702F657274732F6C69622F7374646C69622F7372632F2E2E2F696E636C7564656802640001696B00372F636C656172636173652F6F74702F657274732F6C69622F7374646C69622F7372632F2E2E2F2E2E2F6B65726E656C2F696E636C7564656400107761726E5F756E757365645F7661727364000A64656275675F696E666F6400107761726E5F756E757365645F766172736A680264000776657273696F6E6B0005342E322E31680264000474696D65680662000007D3610C6112610B612E61206802640006736F757263656B00332F636C656172636173652F6F74702F657274732F6C69622F7374646C69622F7372632F6F74705F696E7465726E616C2E65726C6A
-=mod:user_default
-Current size: 1261
-Current attributes: 836C00000002680264000376736E6C000000016E1000505078ACD9B84D514FC6DA2BE249E6756A6802640006617574686F726C0000000164001765656973686E6E406565692E6572696373736F6E2E73656A6A
-Current compilation info: 836C0000000468026400076F7074696F6E736C0000000368026400036377646B00112F686F6D652F736972692F65726C616E6768026400066F75746469726B00112F686F6D652F736972692F65726C616E676400107761726E5F756E757365645F766172736A680264000776657273696F6E6B0005342E322E32680264000474696D65680662000007D461036116610D612C61126802640006736F757263656B00222F686F6D652F736972692F65726C616E672F757365725F64656661756C742E65726C6A
-=mod:tt
-Current size: 2959
-Current attributes: 836C00000002680264000376736E6C000000016E10001D71FD5A55D3BCBF06BFEDF2426C3C386A6802640006617574686F726C0000000164001765656973686E6E406565692E6572696373736F6E2E73656A6A
-Current compilation info: 836C0000000468026400076F7074696F6E736C0000000368026400036377646B00112F686F6D652F736972692F65726C616E6768026400066F75746469726B00112F686F6D652F736972692F65726C616E676400107761726E5F756E757365645F766172736A680264000776657273696F6E6B0005342E322E32680264000474696D65680662000007D461036116610D612B610C6802640006736F757263656B00182F686F6D652F736972692F65726C616E672F74742E65726C6A
-=mod:distel
-Current size: 18214
-Current attributes: 836C00000002680264000376736E6C000000016E1000CC9C9EF141459249C1CCA00993B2E29A6A6802640006617574686F726C000000016400116C756B6540626C75657461696C2E636F6D6A6A
-Current compilation info: 836C0000000368026400076F7074696F6E736C0000000664000276336400107761726E5F756E757365645F7661727364000A64656275675F696E666F68026400066F75746469726B00046562696E68026400036377646B001C2F6C6469736B2F736972692F746F6F6C732F64697374656C2D332E3164000A6578706F72745F616C6C6A680264000776657273696F6E6B0003342E31680264000474696D65680662000007D2610B6114610B610361336A
-=mod:crashdump_viewer
-Current size: 125756
-Current attributes: 836C00000001680264000376736E6C000000016E10002DC5D9D96190A2D5F27FAC3FA3D5C7956A6A
-Current compilation info: 836C0000000468026400076F7074696F6E736C0000000868026400036377646B00212F636C656172636173652F6F74702F746F6F6C732F6F627365727665722F73726368026400066F75746469726B00292F636C656172636173652F6F74702F746F6F6C732F6F627365727665722F7372632F2E2E2F6562696E6802640001696B002C2F636C656172636173652F6F74702F746F6F6C732F6F627365727665722F7372632F2E2E2F696E636C7564656802640001696B00322F636C656172636173652F6F74702F746F6F6C732F6F627365727665722F7372632F2E2E2F2E2E2F65742F696E636C7564656802640001696B003F2F636C656172636173652F6F74702F746F6F6C732F6F627365727665722F7372632F2E2E2F2E2E2F2E2E2F6C69627261726965732F65742F696E636C75646564000A64656275675F696E666F6400107761726E5F756E757365645F76617273680264000F70617273655F7472616E73666F726D64000C6D735F7472616E73666F726D6A680264000776657273696F6E6B0005342E322E32680264000474696D65680662000007D4610461146108611B61366802640006736F757263656B00362F636C656172636173652F6F74702F746F6F6C732F6F627365727665722F7372632F637261736864756D705F7669657765722E65726C6A
-=mod:webtool
-Current size: 29229
-Current attributes: 836C00000002680264000376736E6C000000016E10008AEEF06B60527A3390CBC2C98083CC0A6A68026400096265686176696F75726C0000000164000A67656E5F7365727665726A6A
-Current compilation info: 836C0000000468026400076F7074696F6E736C0000000568026400036377646B00202F636C656172636173652F6F74702F746F6F6C732F776562746F6F6C2F73726368026400066F75746469726B00282F636C656172636173652F6F74702F746F6F6C732F776562746F6F6C2F7372632F2E2E2F6562696E64000A64656275675F696E666F6400107761726E5F756E757365645F76617273680264000F70617273655F7472616E73666F726D64000C6D735F7472616E73666F726D6A680264000776657273696F6E6B0005342E322E32680264000474696D65680662000007D46104610661086106612D6802640006736F757263656B002C2F636C656172636173652F6F74702F746F6F6C732F776562746F6F6C2F7372632F776562746F6F6C2E65726C6A
-=mod:gen_tcp
-Current size: 3574
-Current attributes: 836C00000001680264000376736E6C000000016E1000C965E4EAFDAA94D7F21EDCBE30B21E7B6A6A
-Current compilation info: 836C0000000468026400076F7074696F6E736C0000000568026400036377646B00222F636C656172636173652F6F74702F657274732F6C69622F6B65726E656C2F73726368026400066F75746469726B002A2F636C656172636173652F6F74702F657274732F6C69622F6B65726E656C2F7372632F2E2E2F6562696E6802640001696B002D2F636C656172636173652F6F74702F657274732F6C69622F6B65726E656C2F7372632F2E2E2F696E636C75646564000A64656275675F696E666F6400107761726E5F756E757365645F766172736A680264000776657273696F6E6B0005342E322E31680264000474696D65680662000007D3610C6112610B613161316802640006736F757263656B002E2F636C656172636173652F6F74702F657274732F6C69622F6B65726E656C2F7372632F67656E5F7463702E65726C6A
-=mod:inet_tcp
-Current size: 2743
-Current attributes: 836C00000001680264000376736E6C000000016E1000C4AFE0B49768E4CF78B2C42EA1D3DB7F6A6A
-Current compilation info: 836C0000000468026400076F7074696F6E736C0000000568026400036377646B00222F636C656172636173652F6F74702F657274732F6C69622F6B65726E656C2F73726368026400066F75746469726B002A2F636C656172636173652F6F74702F657274732F6C69622F6B65726E656C2F7372632F2E2E2F6562696E6802640001696B002D2F636C656172636173652F6F74702F657274732F6C69622F6B65726E656C2F7372632F2E2E2F696E636C75646564000A64656275675F696E666F6400107761726E5F756E757365645F766172736A680264000776657273696F6E6B0005342E322E31680264000474696D65680662000007D3610C6112610B6132612B6802640006736F757263656B002F2F636C656172636173652F6F74702F657274732F6C69622F6B65726E656C2F7372632F696E65745F7463702E65726C6A
-=mod:inet_gethost_native
-Current size: 15611
-Current attributes: 836C00000002680264000376736E6C000000016E10005D8CD4277D0BD2425B9C26036AE314506A68026400096265686176696F75726C0000000164001173757065727669736F725F6272696467656A6A
-Current compilation info: 836C0000000468026400076F7074696F6E736C0000000568026400036377646B00222F636C656172636173652F6F74702F657274732F6C69622F6B65726E656C2F73726368026400066F75746469726B002A2F636C656172636173652F6F74702F657274732F6C69622F6B65726E656C2F7372632F2E2E2F6562696E6802640001696B002D2F636C656172636173652F6F74702F657274732F6C69622F6B65726E656C2F7372632F2E2E2F696E636C75646564000A64656275675F696E666F6400107761726E5F756E757365645F766172736A680264000776657273696F6E6B0005342E322E31680264000474696D65680662000007D3610C6112610B613261206802640006736F757263656B003A2F636C656172636173652F6F74702F657274732F6C69622F6B65726E656C2F7372632F696E65745F676574686F73745F6E61746976652E65726C6A
-=mod:filelib
-Current size: 7202
-Current attributes: 836C00000001680264000376736E6C000000016E10007B42AA23FF99DF2CD9D586635B77556A6A6A
-Current compilation info: 836C0000000468026400076F7074696F6E736C0000000768026400036377646B00222F636C656172636173652F6F74702F657274732F6C69622F7374646C69622F73726368026400066F75746469726B002A2F636C656172636173652F6F74702F657274732F6C69622F7374646C69622F7372632F2E2E2F6562696E6802640001696B002D2F636C656172636173652F6F74702F657274732F6C69622F7374646C69622F7372632F2E2E2F696E636C7564656802640001696B00372F636C656172636173652F6F74702F657274732F6C69622F7374646C69622F7372632F2E2E2F2E2E2F6B65726E656C2F696E636C7564656400107761726E5F756E757365645F7661727364000A64656275675F696E666F6400107761726E5F756E757365645F766172736A680264000776657273696F6E6B0005342E322E31680264000474696D65680662000007D3610C6112610B612D61266802640006736F757263656B002E2F636C656172636173652F6F74702F657274732F6C69622F7374646C69622F7372632F66696C656C69622E65726C6A
-=mod:httpd_util
-Current size: 24068
-Current attributes: 836C00000002680264000376736E6C000000016E10008D99E096221B88D542E52CB9C8377F6D6A68026400076170705F76736E6B000B696E6574732D332E302E376A
-Current compilation info: 836C0000000468026400076F7074696F6E736C0000000868036400016464001164656661756C745F766572626F7369747964000773696C656E636568036400016464000F5345525645525F534F4654574152456B000B696E6574732F332E302E3768026400036377646B00222F636C656172636173652F6F74702F6C69627261726965732F696E6574732F73726368026400066F75746469726B002A2F636C656172636173652F6F74702F6C69627261726965732F696E6574732F7372632F2E2E2F6562696E6804640009617474726962757465640006696E736572746400076170705F76736E6B000B696E6574732D332E302E37680264000F70617273655F7472616E73666F726D6400127379735F7072655F6174747269627574657364000A64656275675F696E666F6400107761726E5F756E757365645F766172736A680264000776657273696F6E6B0005342E322E32680264000474696D65680662000007D46104611561066128613B6802640006736F757263656B00312F636C656172636173652F6F74702F6C69627261726965732F696E6574732F7372632F68747470645F7574696C2E65726C6A
-=mod:webtool_sup
-Current size: 695
-Current attributes: 836C00000002680264000376736E6C000000016E1000FA5449E12816CF3AD0A3085BB26CDB9B6A68026400096265686176696F75726C0000000164000A73757065727669736F726A6A
-Current compilation info: 836C0000000468026400076F7074696F6E736C0000000468026400036377646B00202F636C656172636173652F6F74702F746F6F6C732F776562746F6F6C2F73726368026400066F75746469726B00282F636C656172636173652F6F74702F746F6F6C732F776562746F6F6C2F7372632F2E2E2F6562696E64000A64656275675F696E666F6400107761726E5F756E757365645F766172736A680264000776657273696F6E6B0005342E322E32680264000474696D65680662000007D4610461066108610761236802640006736F757263656B00302F636C656172636173652F6F74702F746F6F6C732F776562746F6F6C2F7372632F776562746F6F6C5F7375702E65726C6A
-=mod:httpd_conf
-Current size: 33659
-Current attributes: 836C00000002680264000376736E6C000000016E1000E3198FBDC73BC48CB7D0C1C762B8F1AB6A68026400076170705F76736E6B000B696E6574732D332E302E376A
-Current compilation info: 836C0000000468026400076F7074696F6E736C0000000868036400016464001164656661756C745F766572626F7369747964000773696C656E636568036400016464000F5345525645525F534F4654574152456B000B696E6574732F332E302E3768026400036377646B00222F636C656172636173652F6F74702F6C69627261726965732F696E6574732F73726368026400066F75746469726B002A2F636C656172636173652F6F74702F6C69627261726965732F696E6574732F7372632F2E2E2F6562696E6804640009617474726962757465640006696E736572746400076170705F76736E6B000B696E6574732D332E302E37680264000F70617273655F7472616E73666F726D6400127379735F7072655F6174747269627574657364000A64656275675F696E666F6400107761726E5F756E757365645F766172736A680264000776657273696F6E6B0005342E322E32680264000474696D65680662000007D4610461156106612861116802640006736F757263656B00312F636C656172636173652F6F74702F6C69627261726965732F696E6574732F7372632F68747470645F636F6E662E65726C6A
-=mod:regexp
-Current size: 13698
-Current attributes: 836C00000001680264000376736E6C000000016E10009DD44F3D02F8328BE3ABF4DDA89E0CAE6A6A
-Current compilation info: 836C0000000468026400076F7074696F6E736C0000000768026400036377646B00222F636C656172636173652F6F74702F657274732F6C69622F7374646C69622F73726368026400066F75746469726B002A2F636C656172636173652F6F74702F657274732F6C69622F7374646C69622F7372632F2E2E2F6562696E6802640001696B002D2F636C656172636173652F6F74702F657274732F6C69622F7374646C69622F7372632F2E2E2F696E636C7564656802640001696B00372F636C656172636173652F6F74702F657274732F6C69622F7374646C69622F7372632F2E2E2F2E2E2F6B65726E656C2F696E636C7564656400107761726E5F756E757365645F7661727364000A64656275675F696E666F6400107761726E5F756E757365645F766172736A680264000776657273696F6E6B0005342E322E31680264000474696D65680662000007D3610C6112610B612E61376802640006736F757263656B002D2F636C656172636173652F6F74702F657274732F6C69622F7374646C69622F7372632F7265676578702E65726C6A
-=mod:string
-Current size: 7740
-Current attributes: 836C00000002680264000376736E6C000000016E10005521DDF38903D46D7C53DB864266F7456A680264000A646570726563617465646C00000007680264000C72655F73685F746F5F61776B6101680264000872655F70617273656101680264000872655F6D617463686102680264000672655F7375626103680264000772655F677375626103680264000872655F73706C697461026802640005696E64657861026A6A
-Current compilation info: 836C0000000468026400076F7074696F6E736C0000000768026400036377646B00222F636C656172636173652F6F74702F657274732F6C69622F7374646C69622F73726368026400066F75746469726B002A2F636C656172636173652F6F74702F657274732F6C69622F7374646C69622F7372632F2E2E2F6562696E6802640001696B002D2F636C656172636173652F6F74702F657274732F6C69622F7374646C69622F7372632F2E2E2F696E636C7564656802640001696B00372F636C656172636173652F6F74702F657274732F6C69622F7374646C69622F7372632F2E2E2F2E2E2F6B65726E656C2F696E636C7564656400107761726E5F756E757365645F7661727364000A64656275675F696E666F6400107761726E5F756E757365645F766172736A680264000776657273696F6E6B0005342E322E31680264000474696D65680662000007D3610C6112610B612F610F6802640006736F757263656B002D2F636C656172636173652F6F74702F657274732F6C69622F7374646C69622F7372632F737472696E672E65726C6A
-=mod:httpd
-Current size: 7563
-Current attributes: 836C00000002680264000376736E6C000000016E1000BFD190D951EB3CAD2CC72ADEF20886906A68026400076170705F76736E6B000B696E6574732D332E302E376A
-Current compilation info: 836C0000000468026400076F7074696F6E736C0000000868036400016464001164656661756C745F766572626F7369747964000773696C656E636568036400016464000F5345525645525F534F4654574152456B000B696E6574732F332E302E3768026400036377646B00222F636C656172636173652F6F74702F6C69627261726965732F696E6574732F73726368026400066F75746469726B002A2F636C656172636173652F6F74702F6C69627261726965732F696E6574732F7372632F2E2E2F6562696E6804640009617474726962757465640006696E736572746400076170705F76736E6B000B696E6574732D332E302E37680264000F70617273655F7472616E73666F726D6400127379735F7072655F6174747269627574657364000A64656275675F696E666F6400107761726E5F756E757365645F766172736A680264000776657273696F6E6B0005342E322E32680264000474696D65680662000007D4610461156106612861036802640006736F757263656B002C2F636C656172636173652F6F74702F6C69627261726965732F696E6574732F7372632F68747470642E65726C6A
-=mod:httpd_sup
-Current size: 4068
-Current attributes: 836C00000003680264000376736E6C000000016E10007FA5C790118F18F3D20A2BFAF0229F0A6A68026400076170705F76736E6B000B696E6574732D332E302E3768026400096265686176696F75726C0000000164000A73757065727669736F726A6A
-Current compilation info: 836C0000000468026400076F7074696F6E736C0000000868036400016464001164656661756C745F766572626F7369747964000773696C656E636568036400016464000F5345525645525F534F4654574152456B000B696E6574732F332E302E3768026400036377646B00222F636C656172636173652F6F74702F6C69627261726965732F696E6574732F73726368026400066F75746469726B002A2F636C656172636173652F6F74702F6C69627261726965732F696E6574732F7372632F2E2E2F6562696E6804640009617474726962757465640006696E736572746400076170705F76736E6B000B696E6574732D332E302E37680264000F70617273655F7472616E73666F726D6400127379735F7072655F6174747269627574657364000A64656275675F696E666F6400107761726E5F756E757365645F766172736A680264000776657273696F6E6B0005342E322E32680264000474696D65680662000007D4610461156106612861366802640006736F757263656B00302F636C656172636173652F6F74702F6C69627261726965732F696E6574732F7372632F68747470645F7375702E65726C6A
-=mod:httpd_acceptor_sup
-Current size: 2161
-Current attributes: 836C00000003680264000376736E6C000000016E10003E6F9289B64C13F1EC8A1184BACF055F6A68026400076170705F76736E6B000B696E6574732D332E302E3768026400096265686176696F75726C0000000164000A73757065727669736F726A6A
-Current compilation info: 836C0000000468026400076F7074696F6E736C0000000868036400016464001164656661756C745F766572626F7369747964000773696C656E636568036400016464000F5345525645525F534F4654574152456B000B696E6574732F332E302E3768026400036377646B00222F636C656172636173652F6F74702F6C69627261726965732F696E6574732F73726368026400066F75746469726B002A2F636C656172636173652F6F74702F6C69627261726965732F696E6574732F7372632F2E2E2F6562696E6804640009617474726962757465640006696E736572746400076170705F76736E6B000B696E6574732D332E302E37680264000F70617273655F7472616E73666F726D6400127379735F7072655F6174747269627574657364000A64656275675F696E666F6400107761726E5F756E757365645F766172736A680264000776657273696F6E6B0005342E322E32680264000474696D65680662000007D46104611561066128610C6802640006736F757263656B00392F636C656172636173652F6F74702F6C69627261726965732F696E6574732F7372632F68747470645F6163636570746F725F7375702E65726C6A
-=mod:httpd_verbosity
-Current size: 2672
-Current attributes: 836C00000002680264000376736E6C000000016E100018B6F407D391872421748F87877DAAF36A68026400076170705F76736E6B000B696E6574732D332E302E376A
-Current compilation info: 836C0000000468026400076F7074696F6E736C0000000868036400016464001164656661756C745F766572626F7369747964000773696C656E636568036400016464000F5345525645525F534F4654574152456B000B696E6574732F332E302E3768026400036377646B00222F636C656172636173652F6F74702F6C69627261726965732F696E6574732F73726368026400066F75746469726B002A2F636C656172636173652F6F74702F6C69627261726965732F696E6574732F7372632F2E2E2F6562696E6804640009617474726962757465640006696E736572746400076170705F76736E6B000B696E6574732D332E302E37680264000F70617273655F7472616E73666F726D6400127379735F7072655F6174747269627574657364000A64656275675F696E666F6400107761726E5F756E757365645F766172736A680264000776657273696F6E6B0005342E322E32680264000474696D65680662000007D4610461156106612961036802640006736F757263656B00362F636C656172636173652F6F74702F6C69627261726965732F696E6574732F7372632F68747470645F766572626F736974792E65726C6A
-=mod:timer
-Current size: 8223
-Current attributes: 836C00000001680264000376736E6C000000016E10001D0D64DB1B923D1B3B9497655C43B4AD6A6A
-Current compilation info: 836C0000000468026400076F7074696F6E736C0000000768026400036377646B00222F636C656172636173652F6F74702F657274732F6C69622F7374646C69622F73726368026400066F75746469726B002A2F636C656172636173652F6F74702F657274732F6C69622F7374646C69622F7372632F2E2E2F6562696E6802640001696B002D2F636C656172636173652F6F74702F657274732F6C69622F7374646C69622F7372632F2E2E2F696E636C7564656802640001696B00372F636C656172636173652F6F74702F657274732F6C69622F7374646C69622F7372632F2E2E2F2E2E2F6B65726E656C2F696E636C7564656400107761726E5F756E757365645F7661727364000A64656275675F696E666F6400107761726E5F756E757365645F766172736A680264000776657273696F6E6B0005342E322E31680264000474696D65680662000007D3610C6112610B612F611A6802640006736F757263656B002C2F636C656172636173652F6F74702F657274732F6C69622F7374646C69622F7372632F74696D65722E65726C6A
-=mod:httpd_misc_sup
-Current size: 2066
-Current attributes: 836C00000003680264000376736E6C000000016E100092342F38AC16C074DDC21532FBFB52C26A68026400076170705F76736E6B000B696E6574732D332E302E3768026400096265686176696F75726C0000000164000A73757065727669736F726A6A
-Current compilation info: 836C0000000468026400076F7074696F6E736C0000000868036400016464001164656661756C745F766572626F7369747964000773696C656E636568036400016464000F5345525645525F534F4654574152456B000B696E6574732F332E302E3768026400036377646B00222F636C656172636173652F6F74702F6C69627261726965732F696E6574732F73726368026400066F75746469726B002A2F636C656172636173652F6F74702F6C69627261726965732F696E6574732F7372632F2E2E2F6562696E6804640009617474726962757465640006696E736572746400076170705F76736E6B000B696E6574732D332E302E37680264000F70617273655F7472616E73666F726D6400127379735F7072655F6174747269627574657364000A64656275675F696E666F6400107761726E5F756E757365645F766172736A680264000776657273696F6E6B0005342E322E32680264000474696D65680662000007D46104611561066128611F6802640006736F757263656B00352F636C656172636173652F6F74702F6C69627261726965732F696E6574732F7372632F68747470645F6D6973635F7375702E65726C6A
-=mod:httpd_manager
-Current size: 28916
-Current attributes: 836C00000003680264000376736E6C000000016E100013F7A1E6A4B6407A0A1892A794EE10A36A68026400076170705F76736E6B000B696E6574732D332E302E3768026400096265686176696F75726C0000000164000A67656E5F7365727665726A6A
-Current compilation info: 836C0000000468026400076F7074696F6E736C0000000868036400016464001164656661756C745F766572626F7369747964000773696C656E636568036400016464000F5345525645525F534F4654574152456B000B696E6574732F332E302E3768026400036377646B00222F636C656172636173652F6F74702F6C69627261726965732F696E6574732F73726368026400066F75746469726B002A2F636C656172636173652F6F74702F6C69627261726965732F696E6574732F7372632F2E2E2F6562696E6804640009617474726962757465640006696E736572746400076170705F76736E6B000B696E6574732D332E302E37680264000F70617273655F7472616E73666F726D6400127379735F7072655F6174747269627574657364000A64656275675F696E666F6400107761726E5F756E757365645F766172736A680264000776657273696F6E6B0005342E322E32680264000474696D65680662000007D46104611561066128611B6802640006736F757263656B00342F636C656172636173652F6F74702F6C69627261726965732F696E6574732F7372632F68747470645F6D616E616765722E65726C6A
-=mod:mod_alias
-Current size: 6720
-Current attributes: 836C00000002680264000376736E6C000000016E10002F35C36060B4AC45474440381D146AB96A68026400076170705F76736E6B000B696E6574732D332E302E376A
-Current compilation info: 836C0000000468026400076F7074696F6E736C0000000868036400016464001164656661756C745F766572626F7369747964000773696C656E636568036400016464000F5345525645525F534F4654574152456B000B696E6574732F332E302E3768026400036377646B00222F636C656172636173652F6F74702F6C69627261726965732F696E6574732F73726368026400066F75746469726B002A2F636C656172636173652F6F74702F6C69627261726965732F696E6574732F7372632F2E2E2F6562696E6804640009617474726962757465640006696E736572746400076170705F76736E6B000B696E6574732D332E302E37680264000F70617273655F7472616E73666F726D6400127379735F7072655F6174747269627574657364000A64656275675F696E666F6400107761726E5F756E757365645F766172736A680264000776657273696F6E6B0005342E322E32680264000474696D65680662000007D4610461156106612961106802640006736F757263656B00302F636C656172636173652F6F74702F6C69627261726965732F696E6574732F7372632F6D6F645F616C6961732E65726C6A
-=mod:mod_auth
-Current size: 25168
-Current attributes: 836C00000002680264000376736E6C000000016E100083F3CA0C7A3E7B5E19A635A7F916595D6A68026400076170705F76736E6B000B696E6574732D332E302E376A
-Current compilation info: 836C0000000468026400076F7074696F6E736C0000000868036400016464001164656661756C745F766572626F7369747964000773696C656E636568036400016464000F5345525645525F534F4654574152456B000B696E6574732F332E302E3768026400036377646B00222F636C656172636173652F6F74702F6C69627261726965732F696E6574732F73726368026400066F75746469726B002A2F636C656172636173652F6F74702F6C69627261726965732F696E6574732F7372632F2E2E2F6562696E6804640009617474726962757465640006696E736572746400076170705F76736E6B000B696E6574732D332E302E37680264000F70617273655F7472616E73666F726D6400127379735F7072655F6174747269627574657364000A64656275675F696E666F6400107761726E5F756E757365645F766172736A680264000776657273696F6E6B0005342E322E32680264000474696D65680662000007D4610461156106612961166802640006736F757263656B002F2F636C656172636173652F6F74702F6C69627261726965732F696E6574732F7372632F6D6F645F617574682E65726C6A
-=mod:mod_esi
-Current size: 22534
-Current attributes: 836C00000002680264000376736E6C000000016E1000513E3FF733E1E6592B86CB55B9C14E086A68026400076170705F76736E6B000B696E6574732D332E302E376A
-Current compilation info: 836C0000000468026400076F7074696F6E736C0000000868036400016464001164656661756C745F766572626F7369747964000773696C656E636568036400016464000F5345525645525F534F4654574152456B000B696E6574732F332E302E3768026400036377646B00222F636C656172636173652F6F74702F6C69627261726965732F696E6574732F73726368026400066F75746469726B002A2F636C656172636173652F6F74702F6C69627261726965732F696E6574732F7372632F2E2E2F6562696E6804640009617474726962757465640006696E736572746400076170705F76736E6B000B696E6574732D332E302E37680264000F70617273655F7472616E73666F726D6400127379735F7072655F6174747269627574657364000A64656275675F696E666F6400107761726E5F756E757365645F766172736A680264000776657273696F6E6B0005342E322E32680264000474696D65680662000007D4610461156106612A61026802640006736F757263656B002E2F636C656172636173652F6F74702F6C69627261726965732F696E6574732F7372632F6D6F645F6573692E65726C6A
-=mod:mod_actions
-Current size: 3625
-Current attributes: 836C00000002680264000376736E6C000000016E10008E5437921662830490CA76DFF88548966A68026400076170705F76736E6B000B696E6574732D332E302E376A
-Current compilation info: 836C0000000468026400076F7074696F6E736C0000000868036400016464001164656661756C745F766572626F7369747964000773696C656E636568036400016464000F5345525645525F534F4654574152456B000B696E6574732F332E302E3768026400036377646B00222F636C656172636173652F6F74702F6C69627261726965732F696E6574732F73726368026400066F75746469726B002A2F636C656172636173652F6F74702F6C69627261726965732F696E6574732F7372632F2E2E2F6562696E6804640009617474726962757465640006696E736572746400076170705F76736E6B000B696E6574732D332E302E37680264000F70617273655F7472616E73666F726D6400127379735F7072655F6174747269627574657364000A64656275675F696E666F6400107761726E5F756E757365645F766172736A680264000776657273696F6E6B0005342E322E32680264000474696D65680662000007D46104611561066129610C6802640006736F757263656B00322F636C656172636173652F6F74702F6C69627261726965732F696E6574732F7372632F6D6F645F616374696F6E732E65726C6A
-=mod:mod_cgi
-Current size: 25891
-Current attributes: 836C00000002680264000376736E6C000000016E1000F91D405488188F1BD25110B4ED9EE8786A68026400076170705F76736E6B000B696E6574732D332E302E376A
-Current compilation info: 836C0000000468026400076F7074696F6E736C0000000868036400016464001164656661756C745F766572626F7369747964000773696C656E636568036400016464000F5345525645525F534F4654574152456B000B696E6574732F332E302E3768026400036377646B00222F636C656172636173652F6F74702F6C69627261726965732F696E6574732F73726368026400066F75746469726B002A2F636C656172636173652F6F74702F6C69627261726965732F696E6574732F7372632F2E2E2F6562696E6804640009617474726962757465640006696E736572746400076170705F76736E6B000B696E6574732D332E302E37680264000F70617273655F7472616E73666F726D6400127379735F7072655F6174747269627574657364000A64656275675F696E666F6400107761726E5F756E757365645F766172736A680264000776657273696F6E6B0005342E322E32680264000474696D65680662000007D4610461156106612961306802640006736F757263656B002E2F636C656172636173652F6F74702F6C69627261726965732F696E6574732F7372632F6D6F645F6367692E65726C6A
-=mod:mod_include
-Current size: 34923
-Current attributes: 836C00000002680264000376736E6C000000016E1000B9CCE88D63DD6AC49D5DF533C46B97D56A68026400076170705F76736E6B000B696E6574732D332E302E376A
-Current compilation info: 836C0000000468026400076F7074696F6E736C0000000868036400016464001164656661756C745F766572626F7369747964000773696C656E636568036400016464000F5345525645525F534F4654574152456B000B696E6574732F332E302E3768026400036377646B00222F636C656172636173652F6F74702F6C69627261726965732F696E6574732F73726368026400066F75746469726B002A2F636C656172636173652F6F74702F6C69627261726965732F696E6574732F7372632F2E2E2F6562696E6804640009617474726962757465640006696E736572746400076170705F76736E6B000B696E6574732D332E302E37680264000F70617273655F7472616E73666F726D6400127379735F7072655F6174747269627574657364000A64656275675F696E666F6400107761726E5F756E757365645F766172736A680264000776657273696F6E6B0005342E322E32680264000474696D65680662000007D4610461156106612A61176802640006736F757263656B00322F636C656172636173652F6F74702F6C69627261726965732F696E6574732F7372632F6D6F645F696E636C7564652E65726C6A
-=mod:mod_dir
-Current size: 13488
-Current attributes: 836C00000002680264000376736E6C000000016E1000EF620CB4B5DE5586ED681347496DA1C86A68026400076170705F76736E6B000B696E6574732D332E302E376A
-Current compilation info: 836C0000000468026400076F7074696F6E736C0000000868036400016464001164656661756C745F766572626F7369747964000773696C656E636568036400016464000F5345525645525F534F4654574152456B000B696E6574732F332E302E3768026400036377646B00222F636C656172636173652F6F74702F6C69627261726965732F696E6574732F73726368026400066F75746469726B002A2F636C656172636173652F6F74702F6C69627261726965732F696E6574732F7372632F2E2E2F6562696E6804640009617474726962757465640006696E736572746400076170705F76736E6B000B696E6574732D332E302E37680264000F70617273655F7472616E73666F726D6400127379735F7072655F6174747269627574657364000A64656275675F696E666F6400107761726E5F756E757365645F766172736A680264000776657273696F6E6B0005342E322E32680264000474696D65680662000007D4610461156106612961356802640006736F757263656B002E2F636C656172636173652F6F74702F6C69627261726965732F696E6574732F7372632F6D6F645F6469722E65726C6A
-=mod:mod_get
-Current size: 4672
-Current attributes: 836C00000002680264000376736E6C000000016E1000AD2730B6BE6AF875A500AF4857C4D7F86A68026400076170705F76736E6B000B696E6574732D332E302E376A
-Current compilation info: 836C0000000468026400076F7074696F6E736C0000000868036400016464001164656661756C745F766572626F7369747964000773696C656E636568036400016464000F5345525645525F534F4654574152456B000B696E6574732F332E302E3768026400036377646B00222F636C656172636173652F6F74702F6C69627261726965732F696E6574732F73726368026400066F75746469726B002A2F636C656172636173652F6F74702F6C69627261726965732F696E6574732F7372632F2E2E2F6562696E6804640009617474726962757465640006696E736572746400076170705F76736E6B000B696E6574732D332E302E37680264000F70617273655F7472616E73666F726D6400127379735F7072655F6174747269627574657364000A64656275675F696E666F6400107761726E5F756E757365645F766172736A680264000776657273696F6E6B0005342E322E32680264000474696D65680662000007D4610461156106612A61076802640006736F757263656B002E2F636C656172636173652F6F74702F6C69627261726965732F696E6574732F7372632F6D6F645F6765742E65726C6A
-=mod:mod_head
-Current size: 3074
-Current attributes: 836C00000002680264000376736E6C000000016E1000CAF803B9FA6A28D4153BC109B00D7DF96A68026400076170705F76736E6B000B696E6574732D332E302E376A
-Current compilation info: 836C0000000468026400076F7074696F6E736C0000000868036400016464001164656661756C745F766572626F7369747964000773696C656E636568036400016464000F5345525645525F534F4654574152456B000B696E6574732F332E302E3768026400036377646B00222F636C656172636173652F6F74702F6C69627261726965732F696E6574732F73726368026400066F75746469726B002A2F636C656172636173652F6F74702F6C69627261726965732F696E6574732F7372632F2E2E2F6562696E6804640009617474726962757465640006696E736572746400076170705F76736E6B000B696E6574732D332E302E37680264000F70617273655F7472616E73666F726D6400127379735F7072655F6174747269627574657364000A64656275675F696E666F6400107761726E5F756E757365645F766172736A680264000776657273696F6E6B0005342E322E32680264000474696D65680662000007D4610461156106612A610B6802640006736F757263656B002F2F636C656172636173652F6F74702F6C69627261726965732F696E6574732F7372632F6D6F645F686561642E65726C6A
-=mod:mod_log
-Current size: 8546
-Current attributes: 836C00000002680264000376736E6C000000016E1000F9664B54861260DEA081249379219AF86A68026400076170705F76736E6B000B696E6574732D332E302E376A
-Current compilation info: 836C0000000468026400076F7074696F6E736C0000000868036400016464001164656661756C745F766572626F7369747964000773696C656E636568036400016464000F5345525645525F534F4654574152456B000B696E6574732F332E302E3768026400036377646B00222F636C656172636173652F6F74702F6C69627261726965732F696E6574732F73726368026400066F75746469726B002A2F636C656172636173652F6F74702F6C69627261726965732F696E6574732F7372632F2E2E2F6562696E6804640009617474726962757465640006696E736572746400076170705F76736E6B000B696E6574732D332E302E37680264000F70617273655F7472616E73666F726D6400127379735F7072655F6174747269627574657364000A64656275675F696E666F6400107761726E5F756E757365645F766172736A680264000776657273696F6E6B0005342E322E32680264000474696D65680662000007D4610461156106612A611B6802640006736F757263656B002E2F636C656172636173652F6F74702F6C69627261726965732F696E6574732F7372632F6D6F645F6C6F672E65726C6A
-=mod:mod_disk_log
-Current size: 15160
-Current attributes: 836C00000002680264000376736E6C000000016E1000DDA1E88A9C423A2866B56425DF36F5C66A68026400076170705F76736E6B000B696E6574732D332E302E376A
-Current compilation info: 836C0000000468026400076F7074696F6E736C0000000868036400016464001164656661756C745F766572626F7369747964000773696C656E636568036400016464000F5345525645525F534F4654574152456B000B696E6574732F332E302E3768026400036377646B00222F636C656172636173652F6F74702F6C69627261726965732F696E6574732F73726368026400066F75746469726B002A2F636C656172636173652F6F74702F6C69627261726965732F696E6574732F7372632F2E2E2F6562696E6804640009617474726962757465640006696E736572746400076170705F76736E6B000B696E6574732D332E302E37680264000F70617273655F7472616E73666F726D6400127379735F7072655F6174747269627574657364000A64656275675F696E666F6400107761726E5F756E757365645F766172736A680264000776657273696F6E6B0005342E322E32680264000474696D65680662000007D4610461156106612961396802640006736F757263656B00332F636C656172636173652F6F74702F6C69627261726965732F696E6574732F7372632F6D6F645F6469736B5F6C6F672E65726C6A
-=mod:httpd_socket
-Current size: 7426
-Current attributes: 836C00000002680264000376736E6C000000016E1000B831219096661E4D2E200A07C4A9A7776A68026400076170705F76736E6B000B696E6574732D332E302E376A
-Current compilation info: 836C0000000468026400076F7074696F6E736C0000000868036400016464001164656661756C745F766572626F7369747964000773696C656E636568036400016464000F5345525645525F534F4654574152456B000B696E6574732F332E302E3768026400036377646B00222F636C656172636173652F6F74702F6C69627261726965732F696E6574732F73726368026400066F75746469726B002A2F636C656172636173652F6F74702F6C69627261726965732F696E6574732F7372632F2E2E2F6562696E6804640009617474726962757465640006696E736572746400076170705F76736E6B000B696E6574732D332E302E37680264000F70617273655F7472616E73666F726D6400127379735F7072655F6174747269627574657364000A64656275675F696E666F6400107761726E5F756E757365645F766172736A680264000776657273696F6E6B0005342E322E32680264000474696D65680662000007D4610461156106612861326802640006736F757263656B00332F636C656172636173652F6F74702F6C69627261726965732F696E6574732F7372632F68747470645F736F636B65742E65726C6A
-=mod:httpd_acceptor
-Current size: 4472
-Current attributes: 836C00000002680264000376736E6C000000016E1000A501686DF4E4053E7D978E0CA162BEC56A68026400076170705F76736E6B000B696E6574732D332E302E376A
-Current compilation info: 836C0000000468026400076F7074696F6E736C0000000868036400016464001164656661756C745F766572626F7369747964000773696C656E636568036400016464000F5345525645525F534F4654574152456B000B696E6574732F332E302E3768026400036377646B00222F636C656172636173652F6F74702F6C69627261726965732F696E6574732F73726368026400066F75746469726B002A2F636C656172636173652F6F74702F6C69627261726965732F696E6574732F7372632F2E2E2F6562696E6804640009617474726962757465640006696E736572746400076170705F76736E6B000B696E6574732D332E302E37680264000F70617273655F7472616E73666F726D6400127379735F7072655F6174747269627574657364000A64656275675F696E666F6400107761726E5F756E757365645F766172736A680264000776657273696F6E6B0005342E322E32680264000474696D65680662000007D4610461156106612861076802640006736F757263656B00352F636C656172636173652F6F74702F6C69627261726965732F696E6574732F7372632F68747470645F6163636570746F722E65726C6A
-=mod:io_lib_pretty
-Current size: 8171
-Current attributes: 836C00000001680264000376736E6C000000016E1000CD397E11D2D380D02A4BC6EE309B98CB6A6A
-Current compilation info: 836C0000000468026400076F7074696F6E736C0000000768026400036377646B00222F636C656172636173652F6F74702F657274732F6C69622F7374646C69622F73726368026400066F75746469726B002A2F636C656172636173652F6F74702F657274732F6C69622F7374646C69622F7372632F2E2E2F6562696E6802640001696B002D2F636C656172636173652F6F74702F657274732F6C69622F7374646C69622F7372632F2E2E2F696E636C7564656802640001696B00372F636C656172636173652F6F74702F657274732F6C69622F7374646C69622F7372632F2E2E2F2E2E2F6B65726E656C2F696E636C7564656400107761726E5F756E757365645F7661727364000A64656275675F696E666F6400107761726E5F756E757365645F766172736A680264000776657273696F6E6B0005342E322E31680264000474696D65680662000007D3610C6112610B612E610C6802640006736F757263656B00342F636C656172636173652F6F74702F657274732F6C69622F7374646C69622F7372632F696F5F6C69625F7072657474792E65726C6A
-=mod:httpd_request_handler
-Current size: 26393
-Current attributes: 836C00000002680264000376736E6C000000016E100021C280A5EB5B9CCD00A2C418A341202A6A68026400076170705F76736E6B000B696E6574732D332E302E376A
-Current compilation info: 836C0000000468026400076F7074696F6E736C0000000868036400016464001164656661756C745F766572626F7369747964000773696C656E636568036400016464000F5345525645525F534F4654574152456B000B696E6574732F332E302E3768026400036377646B00222F636C656172636173652F6F74702F6C69627261726965732F696E6574732F73726368026400066F75746469726B002A2F636C656172636173652F6F74702F6C69627261726965732F696E6574732F7372632F2E2E2F6562696E6804640009617474726962757465640006696E736572746400076170705F76736E6B000B696E6574732D332E302E37680264000F70617273655F7472616E73666F726D6400127379735F7072655F6174747269627574657364000A64656275675F696E666F6400107761726E5F756E757365645F766172736A680264000776657273696F6E6B0005342E322E32680264000474696D65680662000007D4610461156106612861296802640006736F757263656B003C2F636C656172636173652F6F74702F6C69627261726965732F696E6574732F7372632F68747470645F726571756573745F68616E646C65722E65726C6A
-=mod:calendar
-Current size: 7158
-Current attributes: 836C00000002680264000376736E6C000000016E10008C44498546709037F8D72DA4AF8B7FB76A680264000A646570726563617465646C00000001680264001C6C6F63616C5F74696D655F746F5F756E6976657273616C5F74696D6561016A6A
-Current compilation info: 836C0000000468026400076F7074696F6E736C0000000768026400036377646B00222F636C656172636173652F6F74702F657274732F6C69622F7374646C69622F73726368026400066F75746469726B002A2F636C656172636173652F6F74702F657274732F6C69622F7374646C69622F7372632F2E2E2F6562696E6802640001696B002D2F636C656172636173652F6F74702F657274732F6C69622F7374646C69622F7372632F2E2E2F696E636C7564656802640001696B00372F636C656172636173652F6F74702F657274732F6C69622F7374646C69622F7372632F2E2E2F2E2E2F6B65726E656C2F696E636C7564656400107761726E5F756E757365645F7661727364000A64656275675F696E666F6400107761726E5F756E757365645F766172736A680264000776657273696F6E6B0005342E322E31680264000474696D65680662000007D3610C6112610B612B61166802640006736F757263656B002F2F636C656172636173652F6F74702F657274732F6C69622F7374646C69622F7372632F63616C656E6461722E65726C6A
-=mod:httpd_parse
-Current size: 9977
-Current attributes: 836C00000002680264000376736E6C000000016E1000174653BAA652261FEB44FFDED99E50B76A68026400076170705F76736E6B000B696E6574732D332E302E376A
-Current compilation info: 836C0000000468026400076F7074696F6E736C0000000868036400016464001164656661756C745F766572626F7369747964000773696C656E636568036400016464000F5345525645525F534F4654574152456B000B696E6574732F332E302E3768026400036377646B00222F636C656172636173652F6F74702F6C69627261726965732F696E6574732F73726368026400066F75746469726B002A2F636C656172636173652F6F74702F6C69627261726965732F696E6574732F7372632F2E2E2F6562696E6804640009617474726962757465640006696E736572746400076170705F76736E6B000B696E6574732D332E302E37680264000F70617273655F7472616E73666F726D6400127379735F7072655F6174747269627574657364000A64656275675F696E666F6400107761726E5F756E757365645F766172736A680264000776657273696F6E6B0005342E322E32680264000474696D65680662000007D4610461156106612861246802640006736F757263656B00322F636C656172636173652F6F74702F6C69627261726965732F696E6574732F7372632F68747470645F70617273652E65726C6A
-=mod:httpd_response
-Current size: 13535
-Current attributes: 836C00000002680264000376736E6C000000016E1000785B247D894BA08A40D814EF11F848976A68026400076170705F76736E6B000B696E6574732D332E302E376A
-Current compilation info: 836C0000000468026400076F7074696F6E736C0000000868036400016464001164656661756C745F766572626F7369747964000773696C656E636568036400016464000F5345525645525F534F4654574152456B000B696E6574732F332E302E3768026400036377646B00222F636C656172636173652F6F74702F6C69627261726965732F696E6574732F73726368026400066F75746469726B002A2F636C656172636173652F6F74702F6C69627261726965732F696E6574732F7372632F2E2E2F6562696E6804640009617474726962757465640006696E736572746400076170705F76736E6B000B696E6574732D332E302E37680264000F70617273655F7472616E73666F726D6400127379735F7072655F6174747269627574657364000A64656275675F696E666F6400107761726E5F756E757365645F766172736A680264000776657273696F6E6B0005342E322E32680264000474696D65680662000007D46104611561066128612D6802640006736F757263656B00352F636C656172636173652F6F74702F6C69627261726965732F696E6574732F7372632F68747470645F726573706F6E73652E65726C6A
-=mod:crashdump_viewer_html
-Current size: 68343
-Current attributes: 836C00000001680264000376736E6C000000016E1000AE414770FDB0806C5583FF8D6D71DC766A6A
-Current compilation info: 836C0000000468026400076F7074696F6E736C0000000768026400036377646B00212F636C656172636173652F6F74702F746F6F6C732F6F627365727665722F73726368026400066F75746469726B00292F636C656172636173652F6F74702F746F6F6C732F6F627365727665722F7372632F2E2E2F6562696E6802640001696B002C2F636C656172636173652F6F74702F746F6F6C732F6F627365727665722F7372632F2E2E2F696E636C7564656802640001696B00322F636C656172636173652F6F74702F746F6F6C732F6F627365727665722F7372632F2E2E2F2E2E2F65742F696E636C7564656802640001696B003F2F636C656172636173652F6F74702F746F6F6C732F6F627365727665722F7372632F2E2E2F2E2E2F2E2E2F6C69627261726965732F65742F696E636C75646564000A64656275675F696E666F6400107761726E5F756E757365645F766172736A680264000776657273696F6E6B0005342E322E32680264000474696D65680662000007D4610461146108611C61026802640006736F757263656B003B2F636C656172636173652F6F74702F746F6F6C732F6F627365727665722F7372632F637261736864756D705F7669657765725F68746D6C2E65726C6A
-=mod:crashdump_translate
-Current size: 89840
-Current attributes: 836C00000001680264000376736E6C000000016E100038F332287181E933A76CEF4799BDB6416A6A
-Current compilation info: 836C0000000468026400076F7074696F6E736C0000000668026400036377646B00212F636C656172636173652F6F74702F746F6F6C732F6F627365727665722F73726368026400066F75746469726B00292F636C656172636173652F6F74702F746F6F6C732F6F627365727665722F7372632F2E2E2F6562696E6802640001696B002C2F636C656172636173652F6F74702F746F6F6C732F6F627365727665722F7372632F2E2E2F696E636C7564656802640001696B00322F636C656172636173652F6F74702F746F6F6C732F6F627365727665722F7372632F2E2E2F2E2E2F65742F696E636C7564656802640001696B003F2F636C656172636173652F6F74702F746F6F6C732F6F627365727665722F7372632F2E2E2F2E2E2F2E2E2F6C69627261726965732F65742F696E636C75646564000A64656275675F696E666F6A680264000776657273696F6E6B0005342E322E32680264000474696D65680662000007D461046115610B611661106802640006736F757263656B00392F636C656172636173652F6F74702F746F6F6C732F6F627365727665722F7372632F637261736864756D705F7472616E736C6174652E65726C6A
-=fun
-Module: crashdump_viewer_html
-Uniq: 9122590
-Index: 0
-Address: 526308
-Native_address: bcefc
-Refc: 1
-=fun
-Module: global
-Uniq: 77168418
-Index: 14
-Address: 26541c
-Native_address: bcf04
-Refc: 1
-=fun
-Module: inet_parse
-Uniq: 88083515
-Index: 9
-Address: 284c30
-Native_address: bcefc
-Refc: 1
-=fun
-Module: inet_db
-Uniq: 36747896
-Index: 4
-Address: 26df84
-Native_address: bcefc
-Refc: 1
-=fun
-Module: global
-Uniq: 80395734
-Index: 8
-Address: 265838
-Native_address: bcef4
-Refc: 1
-=fun
-Module: erl_eval
-Uniq: 103184573
-Index: 5
-Address: 2fa59c
-Native_address: bce80
-Refc: 1
-=fun
-Module: erl_lint
-Uniq: 88265811
-Index: 24
-Address: 34f6a0
-Native_address: bcefc
-Refc: 1
-=fun
-Module: global_group
-Uniq: 9644262
-Index: 2
-Address: 292cec
-Native_address: bcef4
-Refc: 1
-=fun
-Module: net_kernel
-Uniq: 100885585
-Index: 0
-Address: 29eb2c
-Native_address: bcefc
-Refc: 1
-=fun
-Module: inet_db
-Uniq: 128335479
-Index: 6
-Address: 26de84
-Native_address: bcef4
-Refc: 1
-=fun
-Module: erl_prim_loader
-Uniq: 42988083
-Index: 1
-Address: 210c14
-Native_address: bcf04
-Refc: 1
-=fun
-Module: dict
-Uniq: 7105125
-Index: 7
-Address: 354f84
-Native_address: bcefc
-Refc: 1
-=fun
-Module: application_controller
-Uniq: 29030584
-Index: 8
-Address: 234978
-Native_address: bcefc
-Refc: 1
-=fun
-Module: inet_parse
-Uniq: 29214351
-Index: 2
-Address: 285660
-Native_address: bcefc
-Refc: 1
-=fun
-Module: inet_config
-Uniq: 5158633
-Index: 4
-Address: 274034
-Native_address: bcefc
-Refc: 1
-=fun
-Module: erl_lint
-Uniq: 74624950
-Index: 25
-Address: 34f63c
-Native_address: bcefc
-Refc: 1
-=fun
-Module: code_server
-Uniq: 6477018
-Index: 3
-Address: 2adb6c
-Native_address: bcefc
-Refc: 1
-=fun
-Module: c
-Uniq: 117885138
-Index: 7
-Address: 2ffff8
-Native_address: bcefc
-Refc: 1
-=fun
-Module: dict
-Uniq: 47566924
-Index: 6
-Address: 354fb8
-Native_address: bcefc
-Refc: 1
-=fun
-Module: erl_scan
-Uniq: 114637756
-Index: 12
-Address: 313c60
-Native_address: bced4
-Refc: 1
-=fun
-Module: erl_scan
-Uniq: 121316204
-Index: 31
-Address: 313a68
-Native_address: bced4
-Refc: 1
-=fun
-Module: code_server
-Uniq: 61363639
-Index: 12
-Address: 2ad6a4
-Native_address: bcefc
-Refc: 1
-=fun
-Module: inet_config
-Uniq: 116208699
-Index: 3
-Address: 274094
-Native_address: bcefc
-Refc: 1
-=fun
-Module: global_group
-Uniq: 113750737
-Index: 0
-Address: 292d54
-Native_address: bcefc
-Refc: 1
-=fun
-Module: gen_event
-Uniq: 12853672
-Index: 0
-Address: 222e74
-Native_address: bcefc
-Refc: 1
-=fun
-Module: webtool
-Uniq: 108046357
-Index: 12
-Address: 4ab0b0
-Native_address: bcefc
-Refc: 1
-=fun
-Module: erl_lint
-Uniq: 111569299
-Index: 47
-Address: 34e80c
-Native_address: bcef4
-Refc: 1
-=fun
-Module: erl_eval
-Uniq: 20108653
-Index: 15
-Address: 2f9f94
-Native_address: bcea4
-Refc: 1
-=fun
-Module: erl_scan
-Uniq: 45252965
-Index: 15
-Address: 313c0c
-Native_address: bced4
-Refc: 1
-=fun
-Module: webtool
-Uniq: 12437425
-Index: 9
-Address: 4ab3e0
-Native_address: bcefc
-Refc: 1
-=fun
-Module: erl_lint
-Uniq: 30942993
-Index: 22
-Address: 34f6ec
-Native_address: bcef4
-Refc: 1
-=fun
-Module: erl_parse
-Uniq: 93430337
-Index: 3
-Address: 33b100
-Native_address: bcefc
-Refc: 1
-=fun
-Module: erl_parse
-Uniq: 6604883
-Index: 2
-Address: 33b16c
-Native_address: bcefc
-Refc: 1
-=fun
-Module: rpc
-Uniq: 36867745
-Index: 5
-Address: 255e28
-Native_address: bcefc
-Refc: 1
-=fun
-Module: inet_parse
-Uniq: 90563105
-Index: 1
-Address: 285708
-Native_address: bcefc
-Refc: 1
-=fun
-Module: inet_db
-Uniq: 18519297
-Index: 7
-Address: 26ddfc
-Native_address: bcef4
-Refc: 1
-=fun
-Module: crashdump_viewer
-Uniq: 8058975
-Index: 16
-Address: 4a36b4
-Native_address: bcefc
-Refc: 1
-=fun
-Module: inet
-Uniq: 30694569
-Index: 7
-Address: 27d018
-Native_address: bcefc
-Refc: 1
-=fun
-Module: inet_config
-Uniq: 76933943
-Index: 0
-Address: 2741b4
-Native_address: bcefc
-Refc: 1
-=fun
-Module: crashdump_viewer
-Uniq: 9033258
-Index: 6
-Address: 4a4690
-Native_address: bcefc
-Refc: 1
-=fun
-Module: crashdump_viewer
-Uniq: 74851752
-Index: 5
-Address: 4a4798
-Native_address: bcef4
-Refc: 1
-=fun
-Module: global
-Uniq: 50855382
-Index: 4
-Address: 2659a8
-Native_address: bcefc
-Refc: 1
-=fun
-Module: erl_lint
-Uniq: 39211582
-Index: 52
-Address: 34e504
-Native_address: bceec
-Refc: 1
-=fun
-Module: file_server
-Uniq: 77665472
-Index: 0
-Address: 2a0dec
-Native_address: bcf04
-Refc: 1
-=fun
-Module: erl_eval
-Uniq: 57487277
-Index: 8
-Address: 2fa3c4
-Native_address: bce94
-Refc: 1
-=fun
-Module: webtool
-Uniq: 87386575
-Index: 11
-Address: 4ab1c8
-Native_address: bcefc
-Refc: 1
-=fun
-Module: crashdump_viewer
-Uniq: 58991950
-Index: 8
-Address: 4a4338
-Native_address: bcefc
-Refc: 1
-=fun
-Module: crashdump_viewer
-Uniq: 118859163
-Index: 17
-Address: 4a34d4
-Native_address: bcefc
-Refc: 1
-=fun
-Module: dict
-Uniq: 38265609
-Index: 12
-Address: 354dec
-Native_address: bcefc
-Refc: 1
-=fun
-Module: supervisor
-Uniq: 56903339
-Index: 1
-Address: 2527c4
-Native_address: bcefc
-Refc: 1
-=fun
-Module: inet_hosts
-Uniq: 129504763
-Index: 0
-Address: 28aae8
-Native_address: bcefc
-Refc: 1
-=fun
-Module: dict
-Uniq: 44817307
-Index: 10
-Address: 354e3c
-Native_address: bceec
-Refc: 1
-=fun
-Module: erl_lint
-Uniq: 52856894
-Index: 41
-Address: 34eb70
-Native_address: bcef4
-Refc: 1
-=fun
-Module: erl_lint
-Uniq: 22623360
-Index: 23
-Address: 34f5d4
-Native_address: bceec
-Refc: 1
-=fun
-Module: orddict
-Uniq: 34963136
-Index: 0
-Address: 2fbbbc
-Native_address: bcef4
-Refc: 1
-=fun
-Module: erlang
-Uniq: 24496633
-Index: 0
-Address: 213744
-Native_address: bcef4
-Refc: 1
-=fun
-Module: erl_eval
-Uniq: 99313855
-Index: 27
-Address: 2f9914
-Native_address: bcef4
-Refc: 1
-=fun
-Module: httpd_util
-Uniq: 99137703
-Index: 3
-Address: 4b5dfc
-Native_address: bcefc
-Refc: 1
-=fun
-Module: gen_event
-Uniq: 124043500
-Index: 3
-Address: 222b84
-Native_address: bcefc
-Refc: 1
-=fun
-Module: erl_scan
-Uniq: 102650878
-Index: 22
-Address: 313b48
-Native_address: bced4
-Refc: 1
-=fun
-Module: erl_lint
-Uniq: 13333720
-Index: 12
-Address: 34fb2c
-Native_address: bcef4
-Refc: 1
-=fun
-Module: global_group
-Uniq: 133457
-Index: 5
-Address: 292a80
-Native_address: bcefc
-Refc: 1
-=fun
-Module: net_kernel
-Uniq: 64640983
-Index: 4
-Address: 29e944
-Native_address: bcefc
-Refc: 1
-=fun
-Module: rpc
-Uniq: 7580218
-Index: 2
-Address: 255f08
-Native_address: bcf04
-Refc: 1
-=fun
-Module: erl_lint
-Uniq: 131850870
-Index: 59
-Address: 34e6b8
-Native_address: bcef4
-Refc: 1
-=fun
-Module: inet_parse
-Uniq: 56617403
-Index: 10
-Address: 284b40
-Native_address: bcefc
-Refc: 1
-=fun
-Module: webtool
-Uniq: 108680306
-Index: 4
-Address: 4ab5e0
-Native_address: bcefc
-Refc: 1
-=fun
-Module: inet_db
-Uniq: 90880071
-Index: 2
-Address: 26e150
-Native_address: bcefc
-Refc: 1
-=fun
-Module: file_io_server
-Uniq: 23980778
-Index: 0
-Address: 30ac30
-Native_address: bcf04
-Refc: 1
-=fun
-Module: erl_eval
-Uniq: 12006418
-Index: 19
-Address: 2f9d54
-Native_address: bce80
-Refc: 1
-=fun
-Module: crashdump_viewer_html
-Uniq: 81701030
-Index: 8
-Address: 526228
-Native_address: bcefc
-Refc: 1
-=fun
-Module: crashdump_viewer
-Uniq: 71013875
-Index: 1
-Address: 4a4ddc
-Native_address: bcf04
-Refc: 1
-=fun
-Module: distel
-Uniq: 87740845
-Index: 2
-Address: 35c0e0
-Native_address: bcf04
-Refc: 1
-=fun
-Module: erl_eval
-Uniq: 90782401
-Index: 17
-Address: 2f9e8c
-Native_address: bced4
-Refc: 1
-=fun
-Module: shell
-Uniq: 133882676
-Index: 6
-Address: 2e52ac
-Native_address: bcef4
-Refc: 1
-=fun
-Module: inet_parse
-Uniq: 105698088
-Index: 3
-Address: 2855b4
-Native_address: bcefc
-Refc: 1
-=fun
-Module: inet
-Uniq: 58370899
-Index: 0
-Address: 27d370
-Native_address: bcefc
-Refc: 1
-=fun
-Module: erl_eval
-Uniq: 15274536
-Index: 25
-Address: 2f9a94
-Native_address: bcef4
-Refc: 1
-=fun
-Module: supervisor
-Uniq: 94349557
-Index: 0
-Address: 252844
-Native_address: bcefc
-Refc: 1
-=fun
-Module: erl_parse
-Uniq: 33328185
-Index: 1
-Address: 33b1d8
-Native_address: bcef4
-Refc: 1
-=fun
-Module: erl_scan
-Uniq: 86971387
-Index: 16
-Address: 313db0
-Native_address: bced4
-Refc: 1
-=fun
-Module: erl_lint
-Uniq: 53364473
-Index: 38
-Address: 34ee84
-Native_address: bcefc
-Refc: 1
-=fun
-Module: webtool
-Uniq: 128145687
-Index: 0
-Address: 4ab944
-Native_address: bcee4
-Refc: 1
-=fun
-Module: c
-Uniq: 98651404
-Index: 10
-Address: 2fff20
-Native_address: bcefc
-Refc: 1
-=fun
-Module: erl_scan
-Uniq: 78224618
-Index: 0
-Address: 313dcc
-Native_address: bced4
-Refc: 1
-=fun
-Module: shell
-Uniq: 40779085
-Index: 11
-Address: 2e50c8
-Native_address: bcef4
-Refc: 1
-=fun
-Module: c
-Uniq: 93517350
-Index: 4
-Address: 300090
-Native_address: bcefc
-Refc: 1
-=fun
-Module: application_controller
-Uniq: 58551291
-Index: 0
-Address: 234f14
-Native_address: bcefc
-Refc: 1
-=fun
-Module: crashdump_viewer_html
-Uniq: 10055518
-Index: 17
-Address: 526170
-Native_address: bcefc
-Refc: 1
-=fun
-Module: erl_scan
-Uniq: 15795706
-Index: 19
-Address: 313bd4
-Native_address: bced4
-Refc: 1
-=fun
-Module: erl_scan
-Uniq: 31129467
-Index: 13
-Address: 313c44
-Native_address: bced4
-Refc: 1
-=fun
-Module: old_file_server
-Uniq: 115635393
-Index: 0
-Address: 2a1a4c
-Native_address: bcf04
-Refc: 2
-=fun
-Module: erl_eval
-Uniq: 65839696
-Index: 22
-Address: 2f9c00
-Native_address: bcef4
-Refc: 1
-=fun
-Module: erl_scan
-Uniq: 69275064
-Index: 28
-Address: 313aa0
-Native_address: bced4
-Refc: 1
-=fun
-Module: dict
-Uniq: 55938066
-Index: 11
-Address: 354d6c
-Native_address: bceec
-Refc: 1
-=fun
-Module: supervisor
-Uniq: 22323433
-Index: 3
-Address: 252688
-Native_address: bcefc
-Refc: 1
-=fun
-Module: erl_scan
-Uniq: 129726129
-Index: 29
-Address: 313abc
-Native_address: bced4
-Refc: 1
-=fun
-Module: dict
-Uniq: 84346832
-Index: 0
-Address: 3550fc
-Native_address: bceec
-Refc: 1
-=fun
-Module: shell
-Uniq: 102096820
-Index: 7
-Address: 2e5290
-Native_address: bcefc
-Refc: 1
-=fun
-Module: inet
-Uniq: 70385762
-Index: 11
-Address: 27cf44
-Native_address: bcefc
-Refc: 1
-=fun
-Module: mod_cgi
-Uniq: 1483038
-Index: 0
-Address: 4ec2e8
-Native_address: bcefc
-Refc: 1
-=fun
-Module: dict
-Uniq: 3664813
-Index: 1
-Address: 3550b4
-Native_address: bcef4
-Refc: 1
-=fun
-Module: inet
-Uniq: 131143671
-Index: 6
-Address: 27d08c
-Native_address: bcef4
-Refc: 1
-=fun
-Module: inet_config
-Uniq: 46286977
-Index: 2
-Address: 2740b0
-Native_address: bcefc
-Refc: 1
-=fun
-Module: mod_esi
-Uniq: 49099432
-Index: 0
-Address: 4e522c
-Native_address: bcefc
-Refc: 1
-=fun
-Module: application_master
-Uniq: 95764905
-Index: 2
-Address: 24aaa8
-Native_address: bcefc
-Refc: 1
-=fun
-Module: packages
-Uniq: 62890926
-Index: 0
-Address: 2ae814
-Native_address: bcef4
-Refc: 1
-=fun
-Module: erl_scan
-Uniq: 41564771
-Index: 35
-Address: 3139f8
-Native_address: bced4
-Refc: 1
-=fun
-Module: crashdump_viewer
-Uniq: 95490768
-Index: 0
-Address: 4a4dc0
-Native_address: bcf04
-Refc: 1
-=fun
-Module: erl_scan
-Uniq: 121559432
-Index: 3
-Address: 313d78
-Native_address: bced4
-Refc: 1
-=fun
-Module: httpd_conf
-Uniq: 21152662
-Index: 0
-Address: 4be5a0
-Native_address: bcefc
-Refc: 1
-=fun
-Module: net_kernel
-Uniq: 41630916
-Index: 5
-Address: 29e914
-Native_address: bcefc
-Refc: 1
-=fun
-Module: erl_scan
-Uniq: 19747201
-Index: 5
-Address: 313d24
-Native_address: bced4
-Refc: 1
-=fun
-Module: erl_lint
-Uniq: 100584837
-Index: 36
-Address: 34f0f4
-Native_address: bcef4
-Refc: 1
-=fun
-Module: erl_lint
-Uniq: 64635712
-Index: 15
-Address: 34f94c
-Native_address: bcef4
-Refc: 1
-=fun
-Module: net_kernel
-Uniq: 46398361
-Index: 3
-Address: 29e9a4
-Native_address: bcefc
-Refc: 1
-=fun
-Module: erl_scan
-Uniq: 86699817
-Index: 27
-Address: 313b2c
-Native_address: bced4
-Refc: 1
-=fun
-Module: distel
-Uniq: 40869731
-Index: 0
-Address: 35c12c
-Native_address: bcf04
-Refc: 1
-=fun
-Module: inet
-Uniq: 83701641
-Index: 1
-Address: 27d33c
-Native_address: bcefc
-Refc: 1
-=fun
-Module: mod_auth
-Uniq: 85845790
-Index: 0
-Address: 4dfd84
-Native_address: bcefc
-Refc: 1
-=fun
-Module: shell
-Uniq: 101292714
-Index: 9
-Address: 2e519c
-Native_address: bcefc
-Refc: 1
-=fun
-Module: global
-Uniq: 134173702
-Index: 1
-Address: 265b68
-Native_address: bcefc
-Refc: 1
-=fun
-Module: code_server
-Uniq: 92433687
-Index: 6
-Address: 2ad9f4
-Native_address: bcef4
-Refc: 1
-=fun
-Module: dict
-Uniq: 62315241
-Index: 8
-Address: 354f38
-Native_address: bcefc
-Refc: 1
-=fun
-Module: global
-Uniq: 11615541
-Index: 12
-Address: 265530
-Native_address: bcefc
-Refc: 1
-=fun
-Module: hipe_unified_loader
-Uniq: 11160090
-Index: 2
-Address: 2b6bb4
-Native_address: bcef4
-Refc: 1
-=fun
-Module: application_controller
-Uniq: 12116524
-Index: 15
-Address: 2342c4
-Native_address: bcef4
-Refc: 1
-=fun
-Module: mod_log
-Uniq: 61620901
-Index: 2
-Address: 4fc670
-Native_address: bcefc
-Refc: 1
-=fun
-Module: crashdump_viewer
-Uniq: 23665189
-Index: 12
-Address: 4a3b94
-Native_address: bcefc
-Refc: 1
-=fun
-Module: c
-Uniq: 43844413
-Index: 0
-Address: 300100
-Native_address: bcefc
-Refc: 1
-=fun
-Module: erl_scan
-Uniq: 100514258
-Index: 6
-Address: 313d08
-Native_address: bced4
-Refc: 1
-=fun
-Module: erl_lint
-Uniq: 54271286
-Index: 17
-Address: 34f8a0
-Native_address: bcefc
-Refc: 1
-=fun
-Module: inet_db
-Uniq: 47017252
-Index: 3
-Address: 26dfa0
-Native_address: bcefc
-Refc: 1
-=fun
-Module: crashdump_viewer
-Uniq: 1228304
-Index: 7
-Address: 4a45a4
-Native_address: bcefc
-Refc: 1
-=fun
-Module: global
-Uniq: 127131470
-Index: 10
-Address: 2655a0
-Native_address: bcefc
-Refc: 1
-=fun
-Module: file_server
-Uniq: 22638227
-Index: 1
-Address: 2a0e20
-Native_address: bcf04
-Refc: 1
-=fun
-Module: code_server
-Uniq: 112704920
-Index: 15
-Address: 2ad488
-Native_address: bcefc
-Refc: 1
-=fun
-Module: erl_eval
-Uniq: 88302875
-Index: 2
-Address: 2fa76c
-Native_address: bceb4
-Refc: 1
-=fun
-Module: inet_hosts
-Uniq: 85808984
-Index: 1
-Address: 28ab18
-Native_address: bcefc
-Refc: 1
-=fun
-Module: erl_parse
-Uniq: 106391799
-Index: 0
-Address: 33b22c
-Native_address: bcefc
-Refc: 1
-=fun
-Module: inet
-Uniq: 25830519
-Index: 5
-Address: 27d0c0
-Native_address: bcefc
-Refc: 1
-=fun
-Module: shell
-Uniq: 110491036
-Index: 1
-Address: 2e5398
-Native_address: bcef4
-Refc: 1
-=fun
-Module: crashdump_viewer_html
-Uniq: 13128736
-Index: 5
-Address: 52627c
-Native_address: bcefc
-Refc: 1
-=fun
-Module: erl_scan
-Uniq: 84644982
-Index: 21
-Address: 313b9c
-Native_address: bced4
-Refc: 1
-=fun
-Module: erl_lint
-Uniq: 120577486
-Index: 3
-Address: 34fffc
-Native_address: bcefc
-Refc: 1
-=fun
-Module: erl_lint
-Uniq: 4504456
-Index: 44
-Address: 34e938
-Native_address: bceec
-Refc: 1
-=fun
-Module: mod_disk_log
-Uniq: 28754183
-Index: 0
-Address: 500140
-Native_address: bcefc
-Refc: 1
-=fun
-Module: erl_scan
-Uniq: 88043334
-Index: 14
-Address: 313c28
-Native_address: bced4
-Refc: 1
-=fun
-Module: code_server
-Uniq: 61592373
-Index: 0
-Address: 2adc28
-Native_address: bcf04
-Refc: 1
-=fun
-Module: erl_scan
-Uniq: 74468346
-Index: 26
-Address: 313ad8
-Native_address: bced4
-Refc: 1
-=fun
-Module: erl_eval
-Uniq: 69896253
-Index: 21
-Address: 2f9c40
-Native_address: bce80
-Refc: 1
-=fun
-Module: global_group
-Uniq: 59656873
-Index: 4
-Address: 292ac0
-Native_address: bcefc
-Refc: 1
-=fun
-Module: crashdump_viewer
-Uniq: 103891261
-Index: 2
-Address: 4a4d70
-Native_address: bcefc
-Refc: 1
-=fun
-Module: httpd_util
-Uniq: 89619733
-Index: 0
-Address: 4b5e64
-Native_address: bcefc
-Refc: 1
-=fun
-Module: shell
-Uniq: 133201466
-Index: 10
-Address: 2e5180
-Native_address: bceec
-Refc: 1
-=fun
-Module: webtool
-Uniq: 32159369
-Index: 2
-Address: 4ab820
-Native_address: bcefc
-Refc: 1
-=fun
-Module: code_server
-Uniq: 76861396
-Index: 2
-Address: 2adbb0
-Native_address: bcefc
-Refc: 1
-=fun
-Module: mod_log
-Uniq: 48206487
-Index: 0
-Address: 4fc6f0
-Native_address: bcefc
-Refc: 1
-=fun
-Module: erl_lint
-Uniq: 118996551
-Index: 28
-Address: 34f384
-Native_address: bcefc
-Refc: 1
-=fun
-Module: erl_lint
-Uniq: 12593774
-Index: 50
-Address: 34e60c
-Native_address: bcef4
-Refc: 1
-=fun
-Module: httpd_request_handler
-Uniq: 48542841
-Index: 1
-Address: 50e88c
-Native_address: bcefc
-Refc: 1
-=fun
-Module: crashdump_viewer
-Uniq: 56178490
-Index: 9
-Address: 4a420c
-Native_address: bcefc
-Refc: 1
-=fun
-Module: distel
-Uniq: 88212576
-Index: 4
-Address: 35bf44
-Native_address: bcefc
-Refc: 1
-=fun
-Module: erl_lint
-Uniq: 79562132
-Index: 29
-Address: 34f368
-Native_address: bcefc
-Refc: 1
-=fun
-Module: erl_lint
-Uniq: 129524917
-Index: 32
-Address: 34f2c0
-Native_address: bcefc
-Refc: 1
-=fun
-Module: erl_eval
-Uniq: 54029891
-Index: 23
-Address: 2f9af0
-Native_address: bcefc
-Refc: 1
-=fun
-Module: inet
-Uniq: 108872092
-Index: 4
-Address: 27d0f0
-Native_address: bcef4
-Refc: 1
-=fun
-Module: application_controller
-Uniq: 40905124
-Index: 6
-Address: 234ac0
-Native_address: bcef4
-Refc: 1
-=fun
-Module: code_server
-Uniq: 50124876
-Index: 10
-Address: 2ad760
-Native_address: bcefc
-Refc: 1
-=fun
-Module: erl_lint
-Uniq: 791358
-Index: 48
-Address: 34e7b0
-Native_address: bcef4
-Refc: 1
-=fun
-Module: erl_scan
-Uniq: 18404828
-Index: 24
-Address: 313af4
-Native_address: bced4
-Refc: 1
-=fun
-Module: httpd_util
-Uniq: 13278653
-Index: 1
-Address: 4b5e48
-Native_address: bcefc
-Refc: 1
-=fun
-Module: inet_parse
-Uniq: 110307423
-Index: 13
-Address: 284a7c
-Native_address: bcefc
-Refc: 1
-=fun
-Module: rpc
-Uniq: 99592247
-Index: 0
-Address: 256118
-Native_address: bcf04
-Refc: 1
-=fun
-Module: global
-Uniq: 99918211
-Index: 2
-Address: 265af4
-Native_address: bcefc
-Refc: 1
-=fun
-Module: erl_lint
-Uniq: 71442319
-Index: 27
-Address: 34f510
-Native_address: bcef4
-Refc: 1
-=fun
-Module: erl_eval
-Uniq: 7612785
-Index: 13
-Address: 2fa0fc
-Native_address: bce80
-Refc: 1
-=fun
-Module: crashdump_viewer
-Uniq: 56095795
-Index: 15
-Address: 4a38a0
-Native_address: bcefc
-Refc: 1
-=fun
-Module: erl_scan
-Uniq: 23626796
-Index: 25
-Address: 313b10
-Native_address: bced4
-Refc: 1
-=fun
-Module: file_server
-Uniq: 126074974
-Index: 2
-Address: 2a0cac
-Native_address: bcef4
-Refc: 1
-=fun
-Module: inet_config
-Uniq: 104278122
-Index: 1
-Address: 274154
-Native_address: bcefc
-Refc: 1
-=fun
-Module: sys
-Uniq: 90854051
-Index: 0
-Address: 240344
-Native_address: bcefc
-Refc: 1
-=fun
-Module: erl_scan
-Uniq: 113334594
-Index: 2
-Address: 313d5c
-Native_address: bced4
-Refc: 1
-=fun
-Module: inet_parse
-Uniq: 8832142
-Index: 7
-Address: 284e30
-Native_address: bcefc
-Refc: 1
-=fun
-Module: erl_lint
-Uniq: 9159706
-Index: 42
-Address: 34eb54
-Native_address: bceec
-Refc: 1
-=fun
-Module: inet_db
-Uniq: 123946665
-Index: 8
-Address: 26e494
-Native_address: bcefc
-Refc: 1
-=fun
-Module: crashdump_viewer_html
-Uniq: 3149789
-Index: 1
-Address: 5262d0
-Native_address: bcefc
-Refc: 1
-=fun
-Module: c
-Uniq: 48288621
-Index: 11
-Address: 2ffed8
-Native_address: bcefc
-Refc: 1
-=fun
-Module: crashdump_viewer
-Uniq: 8953292
-Index: 20
-Address: 4a4d54
-Native_address: bcee4
-Refc: 1
-=fun
-Module: erl_lint
-Uniq: 9632158
-Index: 4
-Address: 34ff88
-Native_address: bcefc
-Refc: 1
-=fun
-Module: net_kernel
-Uniq: 31111567
-Index: 7
-Address: 29e8c8
-Native_address: bcef4
-Refc: 1
-=fun
-Module: erl_eval
-Uniq: 85307443
-Index: 10
-Address: 2fa29c
-Native_address: bcec4
-Refc: 1
-=fun
-Module: erl_scan
-Uniq: 104417191
-Index: 7
-Address: 313cd0
-Native_address: bced4
-Refc: 1
-=fun
-Module: dict
-Uniq: 43625777
-Index: 5
-Address: 354fec
-Native_address: bcefc
-Refc: 1
-=fun
-Module: webtool
-Uniq: 92698798
-Index: 3
-Address: 4ab780
-Native_address: bcefc
-Refc: 1
-=fun
-Module: erl_eval
-Uniq: 39074546
-Index: 6
-Address: 2fa54c
-Native_address: bcefc
-Refc: 1
-=fun
-Module: application_controller
-Uniq: 71451126
-Index: 5
-Address: 234b98
-Native_address: bcefc
-Refc: 1
-=fun
-Module: c
-Uniq: 122084387
-Index: 6
-Address: 300038
-Native_address: bcefc
-Refc: 1
-=fun
-Module: inet_parse
-Uniq: 9625924
-Index: 14
-Address: 284a60
-Native_address: bcefc
-Refc: 1
-=fun
-Module: erl_scan
-Uniq: 128777368
-Index: 11
-Address: 313c7c
-Native_address: bced4
-Refc: 1
-=fun
-Module: webtool
-Uniq: 10203723
-Index: 7
-Address: 4ab4f8
-Native_address: bcefc
-Refc: 1
-=fun
-Module: erl_scan
-Uniq: 35032400
-Index: 10
-Address: 313c98
-Native_address: bced4
-Refc: 1
-=fun
-Module: erl_scan
-Uniq: 17252586
-Index: 34
-Address: 313a14
-Native_address: bced4
-Refc: 1
-=fun
-Module: code_server
-Uniq: 7177165
-Index: 11
-Address: 2ad734
-Native_address: bcefc
-Refc: 1
-=fun
-Module: crashdump_viewer
-Uniq: 115778175
-Index: 3
-Address: 4a4930
-Native_address: bcefc
-Refc: 1
-=fun
-Module: erl_lint
-Uniq: 96440880
-Index: 51
-Address: 34e590
-Native_address: bcefc
-Refc: 1
-=fun
-Module: hipe_unified_loader
-Uniq: 68275407
-Index: 0
-Address: 2b7340
-Native_address: bcefc
-Refc: 1
-=fun
-Module: erl_eval
-Uniq: 88854488
-Index: 16
-Address: 2f9f04
-Native_address: bcebc
-Refc: 1
-=fun
-Module: global
-Uniq: 26353848
-Index: 13
-Address: 2654e8
-Native_address: bcf04
-Refc: 3
-=fun
-Module: global
-Uniq: 93414722
-Index: 11
-Address: 265568
-Native_address: bcefc
-Refc: 1
-=fun
-Module: erl_lint
-Uniq: 11194189
-Index: 60
-Address: 34fe0c
-Native_address: bcef4
-Refc: 1
-=fun
-Module: c
-Uniq: 125189992
-Index: 8
-Address: 2fffdc
-Native_address: bcefc
-Refc: 1
-=fun
-Module: dict
-Uniq: 112472016
-Index: 2
-Address: 355088
-Native_address: bceec
-Refc: 1
-=fun
-Module: shell
-Uniq: 104426442
-Index: 5
-Address: 2e52e0
-Native_address: bceec
-Refc: 1
-=fun
-Module: global
-Uniq: 17426458
-Index: 0
-Address: 265bc4
-Native_address: bcefc
-Refc: 1
-=fun
-Module: code_server
-Uniq: 81191039
-Index: 5
-Address: 2ada48
-Native_address: bcef4
-Refc: 1
-=fun
-Module: inet_parse
-Uniq: 71765042
-Index: 5
-Address: 284f74
-Native_address: bcefc
-Refc: 1
-=fun
-Module: init
-Uniq: 85855821
-Index: 2
-Address: 1fa298
-Native_address: bcefc
-Refc: 1
-=fun
-Module: crashdump_viewer
-Uniq: 70586122
-Index: 10
-Address: 4a3fe4
-Native_address: bcefc
-Refc: 1
-=fun
-Module: erl_lint
-Uniq: 87067911
-Index: 49
-Address: 34e708
-Native_address: bcef4
-Refc: 1
-=fun
-Module: distel
-Uniq: 63126735
-Index: 1
-Address: 35c0fc
-Native_address: bcf04
-Refc: 1
-=fun
-Module: c
-Uniq: 58270309
-Index: 1
-Address: 3000e4
-Native_address: bcefc
-Refc: 1
-=fun
-Module: ets
-Uniq: 80538457
-Index: 1
-Address: 2bc1a0
-Native_address: bcefc
-Refc: 1
-=fun
-Module: erl_lint
-Uniq: 69827241
-Index: 9
-Address: 34fd70
-Native_address: bcef4
-Refc: 1
-=fun
-Module: dict
-Uniq: 103968752
-Index: 3
-Address: 355054
-Native_address: bcefc
-Refc: 1
-=fun
-Module: erl_lint
-Uniq: 117175573
-Index: 21
-Address: 34f728
-Native_address: bcef4
-Refc: 1
-=fun
-Module: shell
-Uniq: 57865450
-Index: 2
-Address: 2e537c
-Native_address: bcef4
-Refc: 1
-=fun
-Module: erl_scan
-Uniq: 14705965
-Index: 20
-Address: 313b80
-Native_address: bced4
-Refc: 1
-=fun
-Module: webtool
-Uniq: 85360931
-Index: 6
-Address: 4ab56c
-Native_address: bcefc
-Refc: 1
-=fun
-Module: kernel_config
-Uniq: 41755598
-Index: 0
-Address: 2d9e20
-Native_address: bcefc
-Refc: 1
-=fun
-Module: erl_lint
-Uniq: 7110547
-Index: 37
-Address: 34ef14
-Native_address: bcef4
-Refc: 1
-=fun
-Module: application_controller
-Uniq: 28091577
-Index: 16
-Address: 234244
-Native_address: bcef4
-Refc: 2
-=fun
-Module: code_server
-Uniq: 96448152
-Index: 14
-Address: 2ad4e4
-Native_address: bcefc
-Refc: 1
-=fun
-Module: crashdump_viewer
-Uniq: 40177568
-Index: 13
-Address: 4a39a4
-Native_address: bcefc
-Refc: 1
-=fun
-Module: erl_lint
-Uniq: 31948320
-Index: 58
-Address: 34dfdc
-Native_address: bcef4
-Refc: 1
-=fun
-Module: global
-Uniq: 54153760
-Index: 7
-Address: 265854
-Native_address: bcefc
-Refc: 1
-=fun
-Module: crashdump_viewer_html
-Uniq: 60156260
-Index: 3
-Address: 5262b4
-Native_address: bcefc
-Refc: 1
-=fun
-Module: erl_lint
-Uniq: 1010616
-Index: 2
-Address: 350064
-Native_address: bcef4
-Refc: 1
-=fun
-Module: init
-Uniq: 96784459
-Index: 1
-Address: 1fa2b4
-Native_address: bcefc
-Refc: 1
-=fun
-Module: erl_scan
-Uniq: 48691771
-Index: 18
-Address: 313bb8
-Native_address: bced4
-Refc: 1
-=fun
-Module: global
-Uniq: 26895060
-Index: 9
-Address: 265710
-Native_address: bcefc
-Refc: 1
-=fun
-Module: code_server
-Uniq: 109625093
-Index: 7
-Address: 2ad8fc
-Native_address: bcef4
-Refc: 1
-=fun
-Module: erl_lint
-Uniq: 59436171
-Index: 1
-Address: 3500dc
-Native_address: bcef4
-Refc: 1
-=fun
-Module: dict
-Uniq: 92768306
-Index: 9
-Address: 354f04
-Native_address: bcefc
-Refc: 1
-=fun
-Module: global_group
-Uniq: 106430008
-Index: 3
-Address: 292b38
-Native_address: bcefc
-Refc: 1
-=fun
-Module: init
-Uniq: 79749196
-Index: 6
-Address: 1fa01c
-Native_address: bceec
-Refc: 1
-=fun
-Module: erl_eval
-Uniq: 6014929
-Index: 9
-Address: 2fa324
-Native_address: bceac
-Refc: 1
-=fun
-Module: application_controller
-Uniq: 57051922
-Index: 7
-Address: 234a28
-Native_address: bcef4
-Refc: 1
-=fun
-Module: net_kernel
-Uniq: 77043468
-Index: 6
-Address: 29e8e4
-Native_address: bcefc
-Refc: 1
-=fun
-Module: crashdump_viewer_html
-Uniq: 36176045
-Index: 9
-Address: 52620c
-Native_address: bcefc
-Refc: 1
-=fun
-Module: rpc
-Uniq: 35862809
-Index: 3
-Address: 255edc
-Native_address: bcefc
-Refc: 1
-=fun
-Module: inet_parse
-Uniq: 113649451
-Index: 4
-Address: 2850a0
-Native_address: bcefc
-Refc: 1
-=fun
-Module: global
-Uniq: 67943969
-Index: 5
-Address: 2658f4
-Native_address: bcefc
-Refc: 1
-=fun
-Module: crashdump_viewer_html
-Uniq: 109003032
-Index: 16
-Address: 5260d0
-Native_address: bcefc
-Refc: 1
-=fun
-Module: crashdump_viewer_html
-Uniq: 104711447
-Index: 13
-Address: 525f5c
-Native_address: bcefc
-Refc: 1
-=fun
-Module: inet
-Uniq: 107666872
-Index: 9
-Address: 27cfb0
-Native_address: bcefc
-Refc: 1
-=fun
-Module: crashdump_viewer_html
-Uniq: 89410000
-Index: 10
-Address: 5261f0
-Native_address: bcefc
-Refc: 1
-=fun
-Module: inet_parse
-Uniq: 47356870
-Index: 11
-Address: 284ab4
-Native_address: bcefc
-Refc: 1
-=fun
-Module: erl_lint
-Uniq: 17873449
-Index: 56
-Address: 34e1e8
-Native_address: bcef4
-Refc: 1
-=fun
-Module: erl_lint
-Uniq: 8839441
-Index: 33
-Address: 34f25c
-Native_address: bcefc
-Refc: 1
-=fun
-Module: gen_event
-Uniq: 82513204
-Index: 2
-Address: 222c18
-Native_address: bcefc
-Refc: 1
-=fun
-Module: application_master
-Uniq: 5973059
-Index: 0
-Address: 24ab7c
-Native_address: bcefc
-Refc: 1
-=fun
-Module: inet_gethost_native
-Uniq: 127832132
-Index: 0
-Address: 4b065c
-Native_address: bcefc
-Refc: 2
-=fun
-Module: crashdump_viewer_html
-Uniq: 39322658
-Index: 14
-Address: 525f40
-Native_address: bcefc
-Refc: 1
-=fun
-Module: gen_server
-Uniq: 100284021
-Index: 0
-Address: 23d288
-Native_address: bcf04
-Refc: 1
-=fun
-Module: inet_parse
-Uniq: 17430070
-Index: 12
-Address: 284a98
-Native_address: bcefc
-Refc: 1
-=fun
-Module: init
-Uniq: 97509773
-Index: 3
-Address: 1fa27c
-Native_address: bcefc
-Refc: 1
-=fun
-Module: distel
-Uniq: 32364818
-Index: 3
-Address: 35c050
-Native_address: bcefc
-Refc: 1
-=fun
-Module: erl_scan
-Uniq: 58576084
-Index: 32
-Address: 313a4c
-Native_address: bced4
-Refc: 1
-=fun
-Module: crashdump_viewer
-Uniq: 38384851
-Index: 14
-Address: 4a3988
-Native_address: bceec
-Refc: 1
-=fun
-Module: application_controller
-Uniq: 14139883
-Index: 4
-Address: 234d78
-Native_address: bcefc
-Refc: 1
-=fun
-Module: erl_eval
-Uniq: 122590256
-Index: 0
-Address: 2fa8b4
-Native_address: bcef4
-Refc: 1
-=fun
-Module: erl_eval
-Uniq: 14705629
-Index: 11
-Address: 2fa22c
-Native_address: bcedc
-Refc: 1
-=fun
-Module: erl_eval
-Uniq: 9273769
-Index: 4
-Address: 2fa684
-Native_address: bcee4
-Refc: 1
-=fun
-Module: crashdump_viewer_html
-Uniq: 87950142
-Index: 11
-Address: 5261d4
-Native_address: bcefc
-Refc: 1
-=fun
-Module: mod_log
-Uniq: 54913678
-Index: 1
-Address: 4fc6b0
-Native_address: bcefc
-Refc: 1
-=fun
-Module: inet_db
-Uniq: 28370334
-Index: 0
-Address: 26e4b0
-Native_address: bcefc
-Refc: 1
-=fun
-Module: erl_lint
-Uniq: 24927227
-Index: 40
-Address: 34ed4c
-Native_address: bceec
-Refc: 1
-=fun
-Module: erl_scan
-Uniq: 105437500
-Index: 33
-Address: 313a30
-Native_address: bced4
-Refc: 1
-=fun
-Module: application_controller
-Uniq: 10921695
-Index: 1
-Address: 234eac
-Native_address: bcefc
-Refc: 1
-=fun
-Module: erl_lint
-Uniq: 112431564
-Index: 55
-Address: 34e22c
-Native_address: bceec
-Refc: 1
-=fun
-Module: webtool
-Uniq: 129460863
-Index: 5
-Address: 4ab5c4
-Native_address: bcefc
-Refc: 1
-=fun
-Module: inet
-Uniq: 89001648
-Index: 3
-Address: 27d2ec
-Native_address: bcefc
-Refc: 1
-=fun
-Module: inet
-Uniq: 36199507
-Index: 8
-Address: 27cfe4
-Native_address: bcefc
-Refc: 1
-=fun
-Module: crashdump_viewer_html
-Uniq: 35620771
-Index: 2
-Address: 5262ec
-Native_address: bcefc
-Refc: 1
-=fun
-Module: erl_eval
-Uniq: 83214871
-Index: 18
-Address: 2f9e34
-Native_address: bceec
-Refc: 1
-=fun
-Module: code_server
-Uniq: 122455383
-Index: 1
-Address: 2adc0c
-Native_address: bcf04
-Refc: 1
-=fun
-Module: erl_lint
-Uniq: 22389488
-Index: 31
-Address: 34f1b8
-Native_address: bceec
-Refc: 1
-=fun
-Module: erl_eval
-Uniq: 41869059
-Index: 12
-Address: 2fa1d4
-Native_address: bcef4
-Refc: 1
-=fun
-Module: erl_lint
-Uniq: 18130505
-Index: 45
-Address: 34e904
-Native_address: bcefc
-Refc: 1
-=fun
-Module: hipe_unified_loader
-Uniq: 107414126
-Index: 1
-Address: 2b706c
-Native_address: bcefc
-Refc: 1
-=fun
-Module: erl_eval
-Uniq: 116638945
-Index: 28
-Address: 2f98f8
-Native_address: bcefc
-Refc: 1
-=fun
-Module: application_controller
-Uniq: 48465762
-Index: 9
-Address: 2348c8
-Native_address: bcefc
-Refc: 1
-=fun
-Module: httpd_request_handler
-Uniq: 87633852
-Index: 0
-Address: 50e97c
-Native_address: bcefc
-Refc: 1
-=fun
-Module: webtool
-Uniq: 28213098
-Index: 8
-Address: 4ab42c
-Native_address: bcefc
-Refc: 1
-=fun
-Module: gen_event
-Uniq: 123630574
-Index: 4
-Address: 222b58
-Native_address: bcefc
-Refc: 1
-=fun
-Module: dict
-Uniq: 127425508
-Index: 13
-Address: 354eb4
-Native_address: bcefc
-Refc: 1
-=fun
-Module: code_server
-Uniq: 95048118
-Index: 16
-Address: 2ad46c
-Native_address: bcef4
-Refc: 1
-=fun
-Module: erl_lint
-Uniq: 108661978
-Index: 19
-Address: 34f75c
-Native_address: bcefc
-Refc: 1
-=fun
-Module: erl_lint
-Uniq: 21272619
-Index: 13
-Address: 34fad8
-Native_address: bcef4
-Refc: 1
-=fun
-Module: erl_scan
-Uniq: 29943747
-Index: 17
-Address: 313bf0
-Native_address: bced4
-Refc: 1
-=fun
-Module: erl_scan
-Uniq: 120240397
-Index: 4
-Address: 313d94
-Native_address: bced4
-Refc: 1
-=fun
-Module: erl_lint
-Uniq: 124060676
-Index: 0
-Address: 350124
-Native_address: bcef4
-Refc: 1
-=fun
-Module: crashdump_viewer_html
-Uniq: 100975346
-Index: 6
-Address: 526260
-Native_address: bcefc
-Refc: 1
-=fun
-Module: code_server
-Uniq: 61421476
-Index: 4
-Address: 2ada9c
-Native_address: bcef4
-Refc: 1
-=fun
-Module: erl_lint
-Uniq: 45197232
-Index: 7
-Address: 34fe5c
-Native_address: bcef4
-Refc: 1
-=fun
-Module: crashdump_viewer_html
-Uniq: 3151900
-Index: 15
-Address: 525f24
-Native_address: bcefc
-Refc: 1
-=fun
-Module: httpd_util
-Uniq: 77509245
-Index: 2
-Address: 4b5e2c
-Native_address: bcefc
-Refc: 1
-=fun
-Module: code_server
-Uniq: 94110229
-Index: 8
-Address: 2ad7e4
-Native_address: bcef4
-Refc: 3
-=fun
-Module: rpc
-Uniq: 101217130
-Index: 1
-Address: 2560c4
-Native_address: bcf04
-Refc: 1
-=fun
-Module: lists
-Uniq: 103647452
-Index: 0
-Address: 244b7c
-Native_address: bcefc
-Refc: 1
-=fun
-Module: code_server
-Uniq: 37841211
-Index: 9
-Address: 2ad77c
-Native_address: bcef4
-Refc: 1
-=fun
-Module: erl_lint
-Uniq: 40109251
-Index: 54
-Address: 34e2b4
-Native_address: bcef4
-Refc: 1
-=fun
-Module: init
-Uniq: 98012300
-Index: 0
-Address: 1fa2d0
-Native_address: bcefc
-Refc: 1
-=fun
-Module: webtool
-Uniq: 73604759
-Index: 10
-Address: 4ab270
-Native_address: bcefc
-Refc: 1
-=fun
-Module: erl_scan
-Uniq: 12042434
-Index: 1
-Address: 313d40
-Native_address: bced4
-Refc: 1
-=fun
-Module: shell
-Uniq: 127137775
-Index: 4
-Address: 2e531c
-Native_address: bcf04
-Refc: 1
-=fun
-Module: inet
-Uniq: 45498037
-Index: 12
-Address: 27cec0
-Native_address: bcefc
-Refc: 1
-=fun
-Module: erl_lint
-Uniq: 122441107
-Index: 34
-Address: 34f1d4
-Native_address: bcefc
-Refc: 1
-=fun
-Module: erl_lint
-Uniq: 70933889
-Index: 46
-Address: 34e8d0
-Native_address: bcef4
-Refc: 1
-=fun
-Module: inet
-Uniq: 69850797
-Index: 2
-Address: 27d308
-Native_address: bcefc
-Refc: 1
-=fun
-Module: application_controller
-Uniq: 103965539
-Index: 13
-Address: 234684
-Native_address: bcefc
-Refc: 1
-=fun
-Module: erl_scan
-Uniq: 29979659
-Index: 30
-Address: 313a84
-Native_address: bced4
-Refc: 1
-=fun
-Module: erl_lint
-Uniq: 17148721
-Index: 20
-Address: 34f778
-Native_address: bcefc
-Refc: 1
-=fun
-Module: httpd_response
-Uniq: 100673049
-Index: 0
-Address: 5165dc
-Native_address: bcefc
-Refc: 1
-=fun
-Module: inet_gethost_native
-Uniq: 10508176
-Index: 1
-Address: 4b04dc
-Native_address: bcefc
-Refc: 1
-=fun
-Module: erl_lint
-Uniq: 32476064
-Index: 57
-Address: 34e1c4
-Native_address: bcef4
-Refc: 1
-=fun
-Module: erl_scan
-Uniq: 74835078
-Index: 9
-Address: 313cec
-Native_address: bced4
-Refc: 1
-=fun
-Module: crashdump_viewer
-Uniq: 60689814
-Index: 19
-Address: 4a3b78
-Native_address: bceec
-Refc: 1
-=fun
-Module: erl_lint
-Uniq: 39269715
-Index: 5
-Address: 34ff14
-Native_address: bcef4
-Refc: 1
-=fun
-Module: shell
-Uniq: 112923172
-Index: 0
-Address: 2e5404
-Native_address: bcf04
-Refc: 1
-=fun
-Module: erl_eval
-Uniq: 43010824
-Index: 14
-Address: 2fa03c
-Native_address: bce8c
-Refc: 1
-=fun
-Module: global
-Uniq: 82495254
-Index: 3
-Address: 265ac8
-Native_address: bcefc
-Refc: 1
-=fun
-Module: shell
-Uniq: 48568081
-Index: 8
-Address: 2e5220
-Native_address: bcefc
-Refc: 1
-=fun
-Module: init
-Uniq: 77236637
-Index: 7
-Address: 1fa000
-Native_address: bcf04
-Refc: 1
-=fun
-Module: erl_eval
-Uniq: 109386574
-Index: 1
-Address: 2fa804
-Native_address: bce9c
-Refc: 1
-=fun
-Module: erl_lint
-Uniq: 42613220
-Index: 14
-Address: 34f980
-Native_address: bcef4
-Refc: 1
-=fun
-Module: erl_scan
-Uniq: 67093144
-Index: 23
-Address: 313b64
-Native_address: bced4
-Refc: 1
-=fun
-Module: erl_lint
-Uniq: 86833790
-Index: 11
-Address: 34fbe8
-Native_address: bcefc
-Refc: 1
-=fun
-Module: net_kernel
-Uniq: 6344855
-Index: 1
-Address: 29eabc
-Native_address: bcefc
-Refc: 1
-=fun
-Module: erl_lint
-Uniq: 5149749
-Index: 35
-Address: 34f220
-Native_address: bcefc
-Refc: 1
-=fun
-Module: init
-Uniq: 93451769
-Index: 5
-Address: 1fa120
-Native_address: bcefc
-Refc: 1
-=fun
-Module: application_controller
-Uniq: 117428568
-Index: 11
-Address: 234758
-Native_address: bcefc
-Refc: 1
-=fun
-Module: crashdump_viewer_html
-Uniq: 15225890
-Index: 4
-Address: 526298
-Native_address: bcefc
-Refc: 1
-=fun
-Module: application_controller
-Uniq: 120760477
-Index: 2
-Address: 234cdc
-Native_address: bcefc
-Refc: 1
-=fun
-Module: c
-Uniq: 88561919
-Index: 3
-Address: 3000ac
-Native_address: bcefc
-Refc: 1
-=fun
-Module: erl_scan
-Uniq: 108931174
-Index: 8
-Address: 313cb4
-Native_address: bced4
-Refc: 1
-=fun
-Module: rpc
-Uniq: 122901192
-Index: 4
-Address: 255e44
-Native_address: bcf04
-Refc: 1
-=fun
-Module: erl_lint
-Uniq: 32985930
-Index: 10
-Address: 34fc40
-Native_address: bcef4
-Refc: 1
-=fun
-Module: global_group
-Uniq: 97968498
-Index: 1
-Address: 292b7c
-Native_address: bcef4
-Refc: 1
-=fun
-Module: crashdump_viewer
-Uniq: 45671671
-Index: 18
-Address: 4a32d0
-Native_address: bcefc
-Refc: 1
-=fun
-Module: erl_eval
-Uniq: 117968056
-Index: 3
-Address: 2fa6ec
-Native_address: bcecc
-Refc: 1
-=fun
-Module: init
-Uniq: 108717591
-Index: 4
-Address: 1fa194
-Native_address: bcf04
-Refc: 1
-=fun
-Module: supervisor
-Uniq: 15091954
-Index: 2
-Address: 2526dc
-Native_address: bcefc
-Refc: 1
-=fun
-Module: global
-Uniq: 65707495
-Index: 6
-Address: 2658a4
-Native_address: bcefc
-Refc: 1
-=fun
-Module: code_server
-Uniq: 34473969
-Index: 17
-Address: 2ad450
-Native_address: bcef4
-Refc: 2
-=fun
-Module: crashdump_viewer_html
-Uniq: 124296602
-Index: 7
-Address: 526244
-Native_address: bcefc
-Refc: 1
-=fun
-Module: global
-Uniq: 23074707
-Index: 15
-Address: 265460
-Native_address: bcefc
-Refc: 1
-=fun
-Module: inet
-Uniq: 25972856
-Index: 10
-Address: 27cf74
-Native_address: bcefc
-Refc: 1
-=fun
-Module: erl_eval
-Uniq: 43110452
-Index: 24
-Address: 2f9ad4
-Native_address: bceec
-Refc: 1
-=fun
-Module: code_server
-Uniq: 106445918
-Index: 13
-Address: 2ad660
-Native_address: bcefc
-Refc: 1
-=fun
-Module: crashdump_viewer_html
-Uniq: 116071286
-Index: 12
-Address: 5261b8
-Native_address: bcefc
-Refc: 1
-=fun
-Module: inet_parse
-Uniq: 130814477
-Index: 8
-Address: 284cfc
-Native_address: bcefc
-Refc: 1
-=fun
-Module: erl_lint
-Uniq: 121017037
-Index: 39
-Address: 34ed80
-Native_address: bcef4
-Refc: 1
-=fun
-Module: ets
-Uniq: 104895267
-Index: 0
-Address: 2bc1bc
-Native_address: bcefc
-Refc: 1
-=fun
-Module: crashdump_viewer
-Uniq: 104682437
-Index: 11
-Address: 4a3de0
-Native_address: bcefc
-Refc: 1
-=fun
-Module: erl_lint
-Uniq: 70248777
-Index: 30
-Address: 34f30c
-Native_address: bcefc
-Refc: 1
-=fun
-Module: c
-Uniq: 13274975
-Index: 5
-Address: 300074
-Native_address: bcef4
-Refc: 1
-=fun
-Module: erl_lint
-Uniq: 98442771
-Index: 53
-Address: 34e2d0
-Native_address: bceec
-Refc: 1
-=fun
-Module: erl_eval
-Uniq: 69829006
-Index: 7
-Address: 2fa47c
-Native_address: bce80
-Refc: 1
-=fun
-Module: old_file_server
-Uniq: 36444943
-Index: 1
-Address: 2a1a80
-Native_address: bcf04
-Refc: 1
-=fun
-Module: erl_lint
-Uniq: 58719455
-Index: 26
-Address: 34f5f0
-Native_address: bcefc
-Refc: 1
-=fun
-Module: timer
-Uniq: 42505885
-Index: 0
-Address: 4cd62c
-Native_address: bcefc
-Refc: 1
-=fun
-Module: erl_eval
-Uniq: 54682479
-Index: 20
-Address: 2f9d08
-Native_address: bcf04
-Refc: 1
-=fun
-Module: gen_event
-Uniq: 86070332
-Index: 1
-Address: 222d7c
-Native_address: bcefc
-Refc: 1
-=fun
-Module: c
-Uniq: 54728136
-Index: 9
-Address: 2fff68
-Native_address: bcefc
-Refc: 1
-=fun
-Module: application_controller
-Uniq: 16474219
-Index: 3
-Address: 234c60
-Native_address: bcefc
-Refc: 1
-=fun
-Module: application_controller
-Uniq: 108831556
-Index: 10
-Address: 234810
-Native_address: bcefc
-Refc: 1
-=fun
-Module: erl_lint
-Uniq: 72053761
-Index: 16
-Address: 34f8ec
-Native_address: bcef4
-Refc: 1
-=fun
-Module: net_kernel
-Uniq: 65127616
-Index: 2
-Address: 29ea04
-Native_address: bcefc
-Refc: 1
-=fun
-Module: application_controller
-Uniq: 126167637
-Index: 14
-Address: 234640
-Native_address: bcef4
-Refc: 1
-=fun
-Module: inet_parse
-Uniq: 113704917
-Index: 0
-Address: 285788
-Native_address: bcefc
-Refc: 1
-=fun
-Module: mod_disk_log
-Uniq: 75279647
-Index: 1
-Address: 500100
-Native_address: bcefc
-Refc: 1
-=fun
-Module: inet_db
-Uniq: 119218247
-Index: 5
-Address: 26df68
-Native_address: bcef4
-Refc: 1
-=fun
-Module: httpd_util
-Uniq: 85690044
-Index: 4
-Address: 4b5d6c
-Native_address: bcefc
-Refc: 1
-=fun
-Module: inet_db
-Uniq: 53075592
-Index: 1
-Address: 26e16c
-Native_address: bcefc
-Refc: 1
-=fun
-Module: c
-Uniq: 39490182
-Index: 2
-Address: 3000c8
-Native_address: bcefc
-Refc: 1
-=fun
-Module: application_controller
-Uniq: 75189006
-Index: 12
-Address: 234714
-Native_address: bcef4
-Refc: 1
-=fun
-Module: erl_lint
-Uniq: 14980808
-Index: 43
-Address: 34eb38
-Native_address: bceec
-Refc: 1
-=fun
-Module: crashdump_viewer
-Uniq: 16463468
-Index: 4
-Address: 4a4914
-Native_address: bcee4
-Refc: 1
-=fun
-Module: dict
-Uniq: 99965326
-Index: 4
-Address: 355020
-Native_address: bcefc
-Refc: 1
-=fun
-Module: inet_parse
-Uniq: 36900786
-Index: 6
-Address: 284f3c
-Native_address: bcefc
-Refc: 1
-=fun
-Module: erl_lint
-Uniq: 45447147
-Index: 18
-Address: 34f794
-Native_address: bcef4
-Refc: 1
-=fun
-Module: erl_lint
-Uniq: 32353825
-Index: 6
-Address: 34fe78
-Native_address: bcef4
-Refc: 1
-=fun
-Module: erl_lint
-Uniq: 134052338
-Index: 8
-Address: 34fdc0
-Native_address: bceec
-Refc: 1
-=fun
-Module: application_master
-Uniq: 23840924
-Index: 1
-Address: 24aae0
-Native_address: bcefc
-Refc: 1
-=fun
-Module: webtool
-Uniq: 108282500
-Index: 1
-Address: 4ab918
-Native_address: bcefc
-Refc: 1
-=fun
-Module: erl_prim_loader
-Uniq: 31081110
-Index: 0
-Address: 210c68
-Native_address: bcf04
-Refc: 1
-=fun
-Module: erl_eval
-Uniq: 54275742
-Index: 26
-Address: 2f9a4c
-Native_address: bcef4
-Refc: 1
-=fun
-Module: shell
-Uniq: 45083091
-Index: 3
-Address: 2e5350
-Native_address: bcf04
-Refc: 3
-=proc_stack:<0.0.0>
-3a48bc:SReturn addr 0x156F90 (<terminate process normally>)
-y0:H371264
-=proc_heap:<0.0.0>
-371264:t9:A5:state,H3710D8,N,N,H3710F4,P<0.1.0>,H37128C,H3710FC,N
-3710FC:t2:H371138,H371140
-371140:lI80|H371194
-371194:lI49|H3711E0
-3711E0:lI48|H371204
-371204:lI66|N
-371138:lI79|H37118C
-37118C:lI84|H3711D8
-3711D8:lI80|H3711FC
-3711FC:lI32|H37120C
-37120C:lI32|H371214
-371214:lI65|H37121C
-37121C:lI80|H371224
-371224:lI78|H37122C
-37122C:lI32|H371234
-371234:lI49|H37123C
-37123C:lI56|H371244
-371244:lI49|H37124C
-37124C:lI32|H371254
-371254:lI48|H37125C
-37125C:lI49|N
-37128C:t2:A7:started,A7:started
-3710F4:lH371124|H371130
-371124:t2:A16:application_controller,P<0.5.0>
-371130:lH371178|H371184
-371178:t2:AC:error_logger,P<0.4.0>
-371184:lH3711CC|N
-3711CC:t2:AF:erl_prim_loader,P<0.2.0>
-3710D8:lH3710E0|H3710EC
-3710E0:t2:A5:-root,H371108
-371108:lH371148|N
-371148:Yh13:2F636C656172636173652F6F74702F65727473
-3710EC:lH371110|H37111C
-371110:t2:A9:-progname,H371164
-371164:lH37119C|N
-37119C:Yh1D:2F636C656172636173652F6F74702F657274732F62696E2F6365726C20
-37111C:lH37116C|N
-37116C:t2:A5:-home,H3711C4
-3711C4:lH3711E8|N
-3711E8:YhA:2F686F6D652F73697269
-=proc_stack:<0.2.0>
-38eca8:SReturn addr 0x156F90 (<terminate process normally>)
-y0:H367D20
-y1:P<0.1.0>
-y2:H367D28
-y3:A8:infinity
-=proc_heap:<0.2.0>
-367D20:lH367D48|H367D50
-367D48:lI47|H367D58
-367D58:lI99|H367D68
-367D68:lI108|H367D78
-367D78:lI101|H367D88
-367D88:lI97|H367D98
-367D98:lI114|H367DA8
-367DA8:lI99|H367DB8
-367DB8:lI97|H367DC8
-367DC8:lI115|H367DD8
-367DD8:lI101|H367DE8
-367DE8:lI47|H367DF8
-367DF8:lI111|H367E08
-367E08:lI116|H367E18
-367E18:lI112|H367E28
-367E28:lI47|H367E38
-367E38:lI101|H367E48
-367E48:lI114|H367E58
-367E58:lI116|H367E68
-367E68:lI115|H367E78
-367E78:lI47|H367E88
-367E88:lI108|H367E98
-367E98:lI105|H367EA8
-367EA8:lI98|H367EB8
-367EB8:lI47|H367EC8
-367EC8:lI107|H367ED8
-367ED8:lI101|H367EE8
-367EE8:lI114|H367EF8
-367EF8:lI110|H367F08
-367F08:lI101|H367F18
-367F18:lI108|H367F28
-367F28:lI47|H367F38
-367F38:lI101|H367F48
-367F48:lI98|H367F58
-367F58:lI105|H367F68
-367F68:lI110|N
-367D50:lH367D60|N
-367D60:lI47|H367D70
-367D70:lI99|H367D80
-367D80:lI108|H367D90
-367D90:lI101|H367DA0
-367DA0:lI97|H367DB0
-367DB0:lI114|H367DC0
-367DC0:lI99|H367DD0
-367DD0:lI97|H367DE0
-367DE0:lI115|H367DF0
-367DF0:lI101|H367E00
-367E00:lI47|H367E10
-367E10:lI111|H367E20
-367E20:lI116|H367E30
-367E30:lI112|H367E40
-367E40:lI47|H367E50
-367E50:lI101|H367E60
-367E60:lI114|H367E70
-367E70:lI116|H367E80
-367E80:lI115|H367E90
-367E90:lI47|H367EA0
-367EA0:lI108|H367EB0
-367EB0:lI105|H367EC0
-367EC0:lI98|H367ED0
-367ED0:lI47|H367EE0
-367EE0:lI115|H367EF0
-367EF0:lI116|H367F00
-367F00:lI100|H367F10
-367F10:lI108|H367F20
-367F20:lI105|H367F30
-367F30:lI98|H367F40
-367F40:lI47|H367F50
-367F50:lI101|H367F60
-367F60:lI98|H367F70
-367F70:lI105|H367F78
-367F78:lI110|N
-367D28:t7:A5:state,A5:efile,N,A4:none,p<0.2>,A8:infinity,A5:false
-=proc_dictionary:<0.4.0>
-H3AC588
-H3AC594
-=proc_stack:<0.4.0>
-3b2f14:SReturn addr 0x225860 (proc_lib:init_p/5 + 164)
-y0:N
-y1:H3B21E8
-y2:AC:error_logger
-y3:P<0.1.0>
-3b2f28:SReturn addr 0x156F90 (<terminate process normally>)
-y0:SCatch 0x225860 (proc_lib:init_p/5 + 164)
-y1:A3:gen
-y2:A7:init_it
-y3:H3AC5A8
-=proc_heap:<0.4.0>
-3B21E8:lH3B2144|H3B21E0
-3B2144:t5:A7:handler,AC:error_logger,A5:false,N,A5:false
-3B21E0:lH3B21BC|N
-3B21BC:t5:A7:handler,A12:error_logger_tty_h,A5:false,H3AC610,A5:false
-3AC610:t2:P<0.21.0>,AC:error_logger
-3AC5A8:lA9:gen_event|H3AC5E8
-3AC5E8:lP<0.1.0>|H3AC608
-3AC608:lP<0.1.0>|H3AC61C
-3AC61C:lH3AC624|H3AC630
-3AC624:t2:A5:local,AC:error_logger
-3AC630:lN|H3AC638
-3AC638:lN|H3AC640
-3AC640:lN|N
-3AC588:t2:AD:$initial_call,H3AC5B0
-3AC5B0:t3:A3:gen,A7:init_it,H3AC5A8
-3AC594:t2:AA:$ancestors,H3AC5C0
-3AC5C0:lP<0.1.0>|N
-=proc_dictionary:<0.5.0>
-H372E4C
-H372E58
-=proc_stack:<0.5.0>
-374704:SReturn addr 0x225860 (proc_lib:init_p/5 + 164)
-y0:N
-y1:A8:infinity
-y2:A16:application_controller
-y3:H3739F4
-y4:A16:application_controller
-y5:P<0.1.0>
-374720:SReturn addr 0x156F90 (<terminate process normally>)
-y0:SCatch 0x225860 (proc_lib:init_p/5 + 164)
-y1:A3:gen
-y2:A7:init_it
-y3:H372ED0
-=proc_heap:<0.5.0>
-3739F4:t9:A5:state,N,N,N,H373914,N,H373928,N,N
-373928:lH37391C|H372F54
-37391C:t2:A6:stdlib,A9:permanent
-372F54:lH372F90|N
-372F90:t2:A6:kernel,A9:permanent
-373914:lH373908|H372F4C
-373908:t2:A6:stdlib,A9:undefined
-372F4C:lH372F84|N
-372F84:t2:A6:kernel,P<0.7.0>
-372ED0:lAA:gen_server|H372F5C
-372F5C:lP<0.1.0>|H372F9C
-372F9C:lP<0.1.0>|H372FC4
-372FC4:lH372FEC|H372FF8
-372FEC:t2:A5:local,A16:application_controller
-372FF8:lA16:application_controller|H373018
-373018:lH373038|H373048
-373038:t3:AB:application,A6:kernel,H373060
-373060:lH373078|H373084
-373078:t2:AB:description,H37309C
-37309C:lI69|H3730C8
-3730C8:lI82|H3730FC
-3730FC:lI84|H373130
-373130:lI83|H37316C
-37316C:lI32|H3731A8
-3731A8:lI32|H3731E4
-3731E4:lI67|H373220
-373220:lI88|H37325C
-37325C:lI67|H37329C
-37329C:lI32|H3732D0
-3732D0:lI49|H3732FC
-3732FC:lI51|H373328
-373328:lI56|H373348
-373348:lI32|H373368
-373368:lI49|H373388
-373388:lI48|N
-373084:lH3730A4|H3730B0
-3730A4:t2:A3:vsn,H3730D0
-3730D0:lI50|H373104
-373104:lI46|H373138
-373138:lI57|N
-3730B0:lH3730D8|H3730E4
-3730D8:t2:A2:id,N
-3730E4:lH37310C|H373118
-37310C:t2:A7:modules,H373140
-373140:lAB:application|H373174
-373174:lA16:application_controller|H3731B0
-3731B0:lA12:application_master|H3731EC
-3731EC:lA13:application_starter|H373228
-373228:lA4:auth|H373264
-373264:lA4:code|H3732A4
-3732A4:lA8:code_aux|H3732D8
-3732D8:lA8:packages|H373304
-373304:lAB:code_server|H373330
-373330:lA9:dist_util|H373350
-373350:lAF:erl_boot_server|H373370
-373370:lA10:erl_distribution|H373390
-373390:lAF:erl_prim_loader|H3733A8
-3733A8:lA9:erl_reply|H3733C0
-3733C0:lA6:erlang|H3733D8
-3733D8:lAD:error_handler|H3733F0
-3733F0:lAC:error_logger|H373408
-373408:lA4:file|H373420
-373420:lAB:file_server|H373438
-373438:lAF:old_file_server|H373450
-373450:lAE:file_io_server|H373468
-373468:lA9:prim_file|H373480
-373480:lA6:global|H373498
-373498:lAC:global_group|H3734B0
-3734B0:lAD:global_search|H3734C8
-3734C8:lA5:group|H3734E0
-3734E0:lA5:heart|H3734F8
-3734F8:lA13:hipe_unified_loader|H373510
-373510:lA11:hipe_sparc_loader|H373520
-373520:lAF:hipe_x86_loader|H373530
-373530:lA9:inet6_tcp|H373540
-373540:lAE:inet6_tcp_dist|H373550
-373550:lA9:inet6_udp|H373560
-373560:lAB:inet_config|H373570
-373570:lAA:inet_hosts|H373580
-373580:lA13:inet_gethost_native|H373590
-373590:lAD:inet_tcp_dist|H3735A0
-3735A0:lA4:init|H3735B0
-3735B0:lA6:kernel|H3735C0
-3735C0:lAD:kernel_config|H3735D0
-3735D0:lA3:net|H3735E0
-3735E0:lA7:net_adm|H3735F0
-3735F0:lAA:net_kernel|H373600
-373600:lA2:os|H373610
-373610:lA8:ram_file|H373620
-373620:lA3:rpc|H373630
-373630:lA4:user|H373640
-373640:lA8:user_drv|H373650
-373650:lA8:user_sup|H373660
-373660:lA8:disk_log|H373670
-373670:lAA:disk_log_1|H373680
-373680:lAF:disk_log_server|H373690
-373690:lAC:disk_log_sup|H3736A0
-3736A0:lA7:dist_ac|H3736B0
-3736B0:lA8:erl_ddll|H3736C0
-3736C0:lA8:erl_epmd|H3736D0
-3736D0:lAA:erts_debug|H3736E0
-3736E0:lA7:gen_tcp|H3736F0
-3736F0:lA7:gen_udp|H373700
-373700:lA9:prim_inet|H373708
-373708:lA4:inet|H373710
-373710:lA7:inet_db|H373718
-373718:lA8:inet_dns|H373720
-373720:lAA:inet_parse|H373728
-373728:lA8:inet_res|H373730
-373730:lA8:inet_tcp|H373738
-373738:lA8:inet_udp|H373740
-373740:lA3:pg2|H373748
-373748:lA9:seq_trace|H373750
-373750:lA6:socks5|H373758
-373758:lAB:socks5_auth|H373760
-373760:lAA:socks5_tcp|H373768
-373768:lAA:socks5_udp|H373770
-373770:lAF:wrap_log_reader|H373778
-373778:lA4:zlib|H373780
-373780:lA9:otp_ring0|N
-373118:lH373148|H373154
-373148:t2:AA:registered,H37317C
-37317C:lA16:application_controller|H3731B8
-3731B8:lA9:erl_reply|H3731F4
-3731F4:lA4:auth|H373230
-373230:lAB:boot_server|H37326C
-37326C:lAB:code_server|H3732AC
-3732AC:lAF:disk_log_server|H3732E0
-3732E0:lAC:disk_log_sup|H37330C
-37330C:lAF:erl_prim_loader|H373338
-373338:lAC:error_logger|H373358
-373358:lAB:file_server|H373378
-373378:lAD:file_server_2|H373398
-373398:lAF:fixtable_server|H3733B0
-3733B0:lAC:global_group|H3733C8
-3733C8:lA12:global_name_server|H3733E0
-3733E0:lA5:heart|H3733F8
-3733F8:lA4:init|H373410
-373410:lAD:kernel_config|H373428
-373428:lAA:kernel_sup|H373440
-373440:lAA:net_kernel|H373458
-373458:lA7:net_sup|H373470
-373470:lA3:rex|H373488
-373488:lA4:user|H3734A0
-3734A0:lA9:os_server|H3734B8
-3734B8:lAB:ddll_server|H3734D0
-3734D0:lA8:erl_epmd|H3734E8
-3734E8:lA7:inet_db|H373500
-373500:lA3:pg2|N
-373154:lH373184|H373190
-373184:t2:AC:applications,N
-373190:lH3731C0|H3731CC
-3731C0:t2:A15:included_applications,N
-3731CC:lH3731FC|H373208
-3731FC:t2:A3:env,H373238
-373238:lH373274|N
-373274:t2:AC:error_logger,A3:tty
-373208:lH373240|H37324C
-373240:t2:AC:start_phases,A9:undefined
-37324C:lH373280|H37328C
-373280:t2:A4:maxT,A8:infinity
-37328C:lH3732B4|H3732C0
-3732B4:t2:A4:maxP,A8:infinity
-3732C0:lH3732E8|N
-3732E8:t2:A3:mod,H373314
-373314:t2:A6:kernel,N
-373048:lN|N
-372E4C:t2:AD:$initial_call,H372EE4
-372EE4:t3:A3:gen,A7:init_it,H372ED0
-372E58:t2:AA:$ancestors,H372EF4
-372EF4:lP<0.1.0>|N
-=proc_dictionary:<0.7.0>
-H369B78
-H369B5C
-=proc_stack:<0.7.0>
-369d64:SReturn addr 0x225860 (proc_lib:init_p/5 + 164)
-y0:H369C2C
-y1:P<0.5.0>
-369d70:SReturn addr 0x156F90 (<terminate process normally>)
-y0:SCatch 0x225860 (proc_lib:init_p/5 + 164)
-y1:A12:application_master
-y2:A4:init
-y3:H369B2C
-=proc_heap:<0.7.0>
-369C2C:t6:A5:state,P<0.8.0>,H3697B0,N,I0,P<0.0.0>
-3697B0:t9:A9:appl_data,A6:kernel,H369B14,A9:undefined,H3697D8,H369A3C,N,A8:infinity,A8:infinity
-369A3C:lAB:application|H369A34
-369A34:lA16:application_controller|H369A2C
-369A2C:lA12:application_master|H369A24
-369A24:lA13:application_starter|H369A1C
-369A1C:lA4:auth|H369A14
-369A14:lA4:code|H369A0C
-369A0C:lA8:code_aux|H369A04
-369A04:lA8:packages|H3699FC
-3699FC:lAB:code_server|H3699F4
-3699F4:lA9:dist_util|H3699EC
-3699EC:lAF:erl_boot_server|H3699E4
-3699E4:lA10:erl_distribution|H3699DC
-3699DC:lAF:erl_prim_loader|H3699D4
-3699D4:lA9:erl_reply|H3699CC
-3699CC:lA6:erlang|H3699C4
-3699C4:lAD:error_handler|H3699BC
-3699BC:lAC:error_logger|H3699B4
-3699B4:lA4:file|H3699AC
-3699AC:lAB:file_server|H3699A4
-3699A4:lAF:old_file_server|H36999C
-36999C:lAE:file_io_server|H369994
-369994:lA9:prim_file|H36998C
-36998C:lA6:global|H369984
-369984:lAC:global_group|H36997C
-36997C:lAD:global_search|H369974
-369974:lA5:group|H36996C
-36996C:lA5:heart|H369964
-369964:lA13:hipe_unified_loader|H36995C
-36995C:lA11:hipe_sparc_loader|H369954
-369954:lAF:hipe_x86_loader|H36994C
-36994C:lA9:inet6_tcp|H369944
-369944:lAE:inet6_tcp_dist|H36993C
-36993C:lA9:inet6_udp|H369934
-369934:lAB:inet_config|H36992C
-36992C:lAA:inet_hosts|H369924
-369924:lA13:inet_gethost_native|H36991C
-36991C:lAD:inet_tcp_dist|H369914
-369914:lA4:init|H36990C
-36990C:lA6:kernel|H369904
-369904:lAD:kernel_config|H3698FC
-3698FC:lA3:net|H3698F4
-3698F4:lA7:net_adm|H3698EC
-3698EC:lAA:net_kernel|H3698E4
-3698E4:lA2:os|H3698DC
-3698DC:lA8:ram_file|H3698D4
-3698D4:lA3:rpc|H3698CC
-3698CC:lA4:user|H3698C4
-3698C4:lA8:user_drv|H3698BC
-3698BC:lA8:user_sup|H3698B4
-3698B4:lA8:disk_log|H3698AC
-3698AC:lAA:disk_log_1|H3698A4
-3698A4:lAF:disk_log_server|H36989C
-36989C:lAC:disk_log_sup|H369894
-369894:lA7:dist_ac|H36988C
-36988C:lA8:erl_ddll|H369884
-369884:lA8:erl_epmd|H36987C
-36987C:lAA:erts_debug|H369874
-369874:lA7:gen_tcp|H36986C
-36986C:lA7:gen_udp|H369864
-369864:lA9:prim_inet|H36985C
-36985C:lA4:inet|H369854
-369854:lA7:inet_db|H36984C
-36984C:lA8:inet_dns|H369844
-369844:lAA:inet_parse|H36983C
-36983C:lA8:inet_res|H369834
-369834:lA8:inet_tcp|H36982C
-36982C:lA8:inet_udp|H369824
-369824:lA3:pg2|H36981C
-36981C:lA9:seq_trace|H369814
-369814:lA6:socks5|H36980C
-36980C:lAB:socks5_auth|H369804
-369804:lAA:socks5_tcp|H3697FC
-3697FC:lAA:socks5_udp|H3697F4
-3697F4:lAF:wrap_log_reader|H3697EC
-3697EC:lA4:zlib|H3697E4
-3697E4:lA9:otp_ring0|N
-3697D8:t2:A6:kernel,N
-369B14:lA16:application_controller|H369B0C
-369B0C:lA9:erl_reply|H369B04
-369B04:lA4:auth|H369AFC
-369AFC:lAB:boot_server|H369AF4
-369AF4:lAB:code_server|H369AEC
-369AEC:lAF:disk_log_server|H369AE4
-369AE4:lAC:disk_log_sup|H369ADC
-369ADC:lAF:erl_prim_loader|H369AD4
-369AD4:lAC:error_logger|H369ACC
-369ACC:lAB:file_server|H369AC4
-369AC4:lAD:file_server_2|H369ABC
-369ABC:lAF:fixtable_server|H369AB4
-369AB4:lAC:global_group|H369AAC
-369AAC:lA12:global_name_server|H369AA4
-369AA4:lA5:heart|H369A9C
-369A9C:lA4:init|H369A94
-369A94:lAD:kernel_config|H369A8C
-369A8C:lAA:kernel_sup|H369A84
-369A84:lAA:net_kernel|H369A7C
-369A7C:lA7:net_sup|H369A74
-369A74:lA3:rex|H369A6C
-369A6C:lA4:user|H369A64
-369A64:lA9:os_server|H369A5C
-369A5C:lAB:ddll_server|H369A54
-369A54:lA8:erl_epmd|H369A4C
-369A4C:lA7:inet_db|H369A44
-369A44:lA3:pg2|N
-369B2C:lP<0.5.0>|H369B24
-369B24:lP<0.6.0>|H3697A8
-3697A8:lH3697B0|H369B1C
-369B1C:lA6:normal|N
-369B78:t2:AD:$initial_call,H369B68
-369B68:t3:A12:application_master,A4:init,H369B2C
-369B5C:t2:AA:$ancestors,H369B54
-369B54:lP<0.6.0>|N
-=proc_stack:<0.8.0>
-384ec0:SReturn addr 0x156F90 (<terminate process normally>)
-y0:H384BDC
-y1:A6:kernel
-y2:P<0.9.0>
-y3:P<0.7.0>
-=proc_heap:<0.8.0>
-384BDC:t2:A5:state,A3:tty
-=proc_dictionary:<0.9.0>
-H376850
-H37685C
-=proc_stack:<0.9.0>
-36bde8:SReturn addr 0x225860 (proc_lib:init_p/5 + 164)
-y0:N
-y1:A8:infinity
-y2:AA:supervisor
-y3:H36B8E8
-y4:AA:kernel_sup
-y5:P<0.8.0>
-36be04:SReturn addr 0x156F90 (<terminate process normally>)
-y0:SCatch 0x225860 (proc_lib:init_p/5 + 164)
-y1:A3:gen
-y2:A7:init_it
-y3:H3768D4
-=proc_heap:<0.9.0>
-36B8E8:tA:A5:state,H376868,AB:one_for_all,H36B8D4,N,I0,I1,N,A6:kernel,N
-36B8D4:lH36B8B0|H36B6E8
-36B8B0:t8:A5:child,P<0.24.0>,AF:kernel_safe_sup,H376BF0,A9:permanent,A8:infinity,AA:supervisor,H376C00
-376C00:lA6:kernel|N
-376BF0:t3:AA:supervisor,AA:start_link,H376C08
-376C08:lH376C10|H376C1C
-376C10:t2:A5:local,AF:kernel_safe_sup
-376C1C:lA6:kernel|H376C24
-376C24:lA4:safe|N
-36B6E8:lH36B6C4|H36B490
-36B6C4:t8:A5:child,P<0.23.0>,AD:kernel_config,H376BB4,A9:permanent,I2000,A6:worker,H376BC4
-376BC4:lAD:kernel_config|N
-376BB4:t3:AD:kernel_config,AA:start_link,N
-36B490:lH36B498|H36B4BC
-36B498:t8:A5:child,P<0.19.0>,A4:user,H376B70,A9:temporary,I2000,AA:supervisor,H376B80
-376B80:lA8:user_sup|N
-376B70:t3:A8:user_sup,A5:start,N
-36B4BC:lH36B4C4|H376CB0
-36B4C4:t8:A5:child,P<0.18.0>,AB:code_server,H376B0C,A9:permanent,I2000,A6:worker,H376B1C
-376B1C:lA4:code|N
-376B0C:t3:A4:code,AA:start_link,N
-376CB0:lH376CB8|H376CDC
-376CB8:t8:A5:child,P<0.17.0>,AB:file_server,H376AB8,A9:permanent,I2000,A6:worker,H376AC8
-376AC8:lAF:old_file_server|N
-376AB8:t3:AF:old_file_server,AA:start_link,N
-376CDC:lH376CE4|H376C2C
-376CE4:t8:A5:child,P<0.16.0>,AD:file_server_2,H376A58,A9:permanent,I2000,A6:worker,H376A68
-376A68:lA4:file|H376AB0
-376AB0:lAB:file_server|H376B04
-376B04:lAE:file_io_server|H376B68
-376B68:lA9:prim_file|N
-376A58:t3:AB:file_server,AA:start_link,N
-376C2C:lH376C34|H376C58
-376C34:t8:A5:child,P<0.15.0>,AC:global_group,H3769F4,A9:permanent,I2000,A6:worker,H376A04
-376A04:lAC:global_group|N
-3769F4:t3:AC:global_group,AA:start_link,N
-376C58:lH376C60|H376C84
-376C60:t8:A5:child,A9:undefined,A7:net_sup,H37696C,A9:permanent,A8:infinity,AA:supervisor,H37697C
-37697C:lA10:erl_distribution|N
-37696C:t3:A10:erl_distribution,AA:start_link,N
-376C84:lH376C8C|H3768A0
-376C8C:t8:A5:child,P<0.14.0>,A7:inet_db,H3768F4,A9:permanent,I2000,A6:worker,H376904
-376904:lA7:inet_db|N
-3768F4:t3:A7:inet_db,AA:start_link,N
-3768A0:lH376938|H37695C
-376938:t8:A5:child,P<0.11.0>,A12:global_name_server,H3769B0,A9:permanent,I2000,A6:worker,H3769C0
-3769C0:lA6:global|N
-3769B0:t3:A6:global,AA:start_link,N
-37695C:lH3769C8|N
-3769C8:t8:A5:child,P<0.10.0>,A3:rex,H376A38,A9:permanent,I2000,A6:worker,H376A48
-376A48:lA3:rpc|N
-376A38:t3:A3:rpc,AA:start_link,N
-376868:t2:A5:local,AA:kernel_sup
-3768D4:lAA:gen_server|H376964
-376964:lP<0.8.0>|H3769EC
-3769EC:lP<0.8.0>|H376A50
-376A50:lH376A9C|H376AA8
-376A9C:t2:A5:local,AA:kernel_sup
-376AA8:lAA:supervisor|H376AFC
-376AFC:lH376B50|H376B60
-376B50:t3:H376868,A6:kernel,N
-376B60:lN|N
-376850:t2:AD:$initial_call,H3768DC
-3768DC:t3:A3:gen,A7:init_it,H3768D4
-37685C:t2:AA:$ancestors,H3768EC
-3768EC:lP<0.8.0>|N
-=proc_dictionary:<0.10.0>
-H367A10
-H3679F4
-=proc_stack:<0.10.0>
-367cec:SReturn addr 0x225860 (proc_lib:init_p/5 + 164)
-y0:N
-y1:A8:infinity
-y2:A3:rpc
-y3:H367AA8
-y4:A3:rex
-y5:P<0.9.0>
-367d08:SReturn addr 0x156F90 (<terminate process normally>)
-y0:SCatch 0x225860 (proc_lib:init_p/5 + 164)
-y1:A3:gen
-y2:A7:init_it
-y3:H3679C4
-=proc_heap:<0.10.0>
-367AA8:t2:I0,A3:nil
-3679C4:lAA:gen_server|H3679BC
-3679BC:lP<0.9.0>|H3679B4
-3679B4:lP<0.9.0>|H367988
-367988:lH367990|H3679AC
-367990:t2:A5:local,A3:rex
-3679AC:lA3:rpc|H3679A4
-3679A4:lN|H36799C
-36799C:lN|N
-367A10:t2:AD:$initial_call,H367A00
-367A00:t3:A3:gen,A7:init_it,H3679C4
-3679F4:t2:AA:$ancestors,H3679EC
-3679EC:lAA:kernel_sup|H3679CC
-3679CC:lP<0.8.0>|N
-=proc_dictionary:<0.11.0>
-H36ADD8
-H36ADBC
-=proc_stack:<0.11.0>
-36b0b4:SReturn addr 0x225860 (proc_lib:init_p/5 + 164)
-y0:N
-y1:A8:infinity
-y2:A6:global
-y3:H36AF0C
-y4:A12:global_name_server
-y5:P<0.9.0>
-36b0d0:SReturn addr 0x156F90 (<terminate process normally>)
-y0:SCatch 0x225860 (proc_lib:init_p/5 + 164)
-y1:A3:gen
-y2:A7:init_it
-y3:H36AD8C
-=proc_heap:<0.11.0>
-36AF0C:t9:A5:state,A4:true,N,N,N,N,AD:nonode@nohost,P<0.12.0>,P<0.13.0>
-36AD8C:lAA:gen_server|H36AD84
-36AD84:lP<0.9.0>|H36AD7C
-36AD7C:lP<0.9.0>|H36AD50
-36AD50:lH36AD58|H36AD74
-36AD58:t2:A5:local,A12:global_name_server
-36AD74:lA6:global|H36AD6C
-36AD6C:lN|H36AD64
-36AD64:lN|N
-36ADD8:t2:AD:$initial_call,H36ADC8
-36ADC8:t3:A3:gen,A7:init_it,H36AD8C
-36ADBC:t2:AA:$ancestors,H36ADB4
-36ADB4:lAA:kernel_sup|H36AD94
-36AD94:lP<0.8.0>|N
-=proc_stack:<0.12.0>
-36921c:SReturn addr 0x261184 (global:init_the_locker/1 + 112)
-y0:N
-y1:N
-y2:N
-y3:N
-y4:N
-y5:N
-y6:A8:infinity
-y7:H368EB0
-y8:P<0.11.0>
-369244:SReturn addr 0x156F90 (<terminate process normally>)
-y0:N
-=proc_heap:<0.12.0>
-368EB0:t3:A5:multi,A9:undefined,N
-=proc_stack:<0.13.0>
-3695d0:SReturn addr 0x2651AC (global:loop_the_deleter/1 + 36)
-y0:A8:infinity
-y1:N
-y2:P<0.11.0>
-3695e0:SReturn addr 0x2654F8 (global:'-start_the_deleter/1-fun-0-'/1 + 20)
-y0:N
-y1:N
-y2:P<0.11.0>
-3695f0:SReturn addr 0x156F90 (<terminate process normally>)
-=proc_heap:<0.13.0>
-=proc_dictionary:<0.14.0>
-H36A998
-H36A9A4
-=proc_stack:<0.14.0>
-372e0c:SReturn addr 0x225860 (proc_lib:init_p/5 + 164)
-y0:N
-y1:A8:infinity
-y2:A7:inet_db
-y3:H36A9B0
-y4:A7:inet_db
-y5:P<0.9.0>
-372e28:SReturn addr 0x156F90 (<terminate process normally>)
-y0:SCatch 0x225860 (proc_lib:init_p/5 + 164)
-y1:A3:gen
-y2:A7:init_it
-y3:H36A9C8
-=proc_heap:<0.14.0>
-36A9B0:t5:A5:state,A7:inet_db,AA:inet_cache,AA:inet_hosts,H36A9E8
-36A9E8:E21:8372000364000D6E6F6E6F6465406E6F686F737400000000060000000000000000
-36A9C8:lAA:gen_server|H36A9F8
-36A9F8:lP<0.9.0>|H36AA08
-36AA08:lP<0.9.0>|H36AA10
-36AA10:lH36AA18|H36AA24
-36AA18:t2:A5:local,A7:inet_db
-36AA24:lA7:inet_db|H36AA2C
-36AA2C:lN|H36AA34
-36AA34:lN|N
-36A998:t2:AD:$initial_call,H36A9D0
-36A9D0:t3:A3:gen,A7:init_it,H36A9C8
-36A9A4:t2:AA:$ancestors,H36A9E0
-36A9E0:lAA:kernel_sup|H36AA00
-36AA00:lP<0.8.0>|N
-=proc_dictionary:<0.15.0>
-H372788
-H3727F8
-H37276C
-H37280C
-H372820
-=proc_stack:<0.15.0>
-372a64:SReturn addr 0x225860 (proc_lib:init_p/5 + 164)
-y0:N
-y1:A8:infinity
-y2:AC:global_group
-y3:H3728C8
-y4:AC:global_group
-y5:P<0.9.0>
-372a80:SReturn addr 0x156F90 (<terminate process normally>)
-y0:SCatch 0x225860 (proc_lib:init_p/5 + 164)
-y1:A3:gen
-y2:A7:init_it
-y3:H37273C
-=proc_heap:<0.15.0>
-3728C8:tC:A5:state,A7:no_conf,A4:true,N,N,N,N,N,AD:nonode@nohost,N,A6:normal,A6:normal
-37273C:lAA:gen_server|H372734
-372734:lP<0.9.0>|H37272C
-37272C:lP<0.9.0>|H372700
-372700:lH372708|H372724
-372708:t2:A5:local,AC:global_group
-372724:lAC:global_group|H37271C
-37271C:lN|H372714
-372714:lN|N
-372788:t2:AD:$initial_call,H372778
-372778:t3:A3:gen,A7:init_it,H37273C
-3727F8:t2:A10:registered_names,H3727F0
-3727F0:lA9:undefined|N
-37276C:t2:AA:$ancestors,H372764
-372764:lAA:kernel_sup|H372744
-372744:lP<0.8.0>|N
-37280C:t2:A4:send,H372804
-372804:lA9:undefined|N
-372820:t2:AC:whereis_name,H372818
-372818:lA9:undefined|N
-=proc_dictionary:<0.16.0>
-H37B918
-H37B924
-=proc_stack:<0.16.0>
-3d303c:SReturn addr 0x225860 (proc_lib:init_p/5 + 164)
-y0:N
-y1:A8:infinity
-y2:AB:file_server
-y3:p<0.4>
-y4:AD:file_server_2
-y5:P<0.9.0>
-3d3058:SReturn addr 0x156F90 (<terminate process normally>)
-y0:SCatch 0x225860 (proc_lib:init_p/5 + 164)
-y1:A3:gen
-y2:A7:init_it
-y3:H37B930
-=proc_heap:<0.16.0>
-37B930:lAA:gen_server|H37B950
-37B950:lP<0.9.0>|H37B960
-37B960:lP<0.9.0>|H37B968
-37B968:lH37B970|H37B97C
-37B970:t2:A5:local,AD:file_server_2
-37B97C:lAB:file_server|H37B984
-37B984:lN|H37B98C
-37B98C:lN|N
-37B918:t2:AD:$initial_call,H37B938
-37B938:t3:A3:gen,A7:init_it,H37B930
-37B924:t2:AA:$ancestors,H37B948
-37B948:lAA:kernel_sup|H37B958
-37B958:lP<0.8.0>|N
-=proc_stack:<0.17.0>
-3763cc:SReturn addr 0x156F90 (<terminate process normally>)
-y0:H376084
-y1:P<0.16.0>
-y2:P<0.9.0>
-=proc_heap:<0.17.0>
-376084:E21:8372000364000D6E6F6E6F6465406E6F686F737400000000160000000000000000
-=proc_stack:<0.18.0>
-3b98e8:SReturn addr 0x156F90 (<terminate process normally>)
-y0:H38AE84
-y1:P<0.9.0>
-=proc_heap:<0.18.0>
-38AE84:t8:A5:state,P<0.9.0>,H3873BC,H38AEB8,I9,I10,A8:no_cache,AB:interactive
-38AEB8:lH3873D4|H38AEE0
-3873D4:lI46|N
-38AEE0:lH3873EC|H38AF10
-3873EC:lI47|H387404
-387404:lI99|H387424
-387424:lI108|H38744C
-38744C:lI101|H38747C
-38747C:lI97|H3874B4
-3874B4:lI114|H3874F4
-3874F4:lI99|H38753C
-38753C:lI97|H38758C
-38758C:lI115|H3875E4
-3875E4:lI101|H387644
-387644:lI47|H3876AC
-3876AC:lI111|H38771C
-38771C:lI116|H387794
-387794:lI112|H387814
-387814:lI47|H38789C
-38789C:lI101|H38792C
-38792C:lI114|H3879BC
-3879BC:lI116|H387A54
-387A54:lI115|H387AF4
-387AF4:lI47|H387B9C
-387B9C:lI108|H387C4C
-387C4C:lI105|H387D04
-387D04:lI98|H387DC4
-387DC4:lI47|H387E8C
-387E8C:lI107|H387F5C
-387F5C:lI101|H388034
-388034:lI114|H388114
-388114:lI110|H3881FC
-3881FC:lI101|H3882EC
-3882EC:lI108|H3883E4
-3883E4:lI47|H3884E4
-3884E4:lI101|H3885EC
-3885EC:lI98|H3886FC
-3886FC:lI105|H388814
-388814:lI110|N
-38AF10:lH38740C|H38AF48
-38740C:lI47|H38742C
-38742C:lI99|H387454
-387454:lI108|H387484
-387484:lI101|H3874BC
-3874BC:lI97|H3874FC
-3874FC:lI114|H387544
-387544:lI99|H387594
-387594:lI97|H3875EC
-3875EC:lI115|H38764C
-38764C:lI101|H3876B4
-3876B4:lI47|H387724
-387724:lI111|H38779C
-38779C:lI116|H38781C
-38781C:lI112|H3878A4
-3878A4:lI47|H387934
-387934:lI101|H3879C4
-3879C4:lI114|H387A5C
-387A5C:lI116|H387AFC
-387AFC:lI115|H387BA4
-387BA4:lI47|H387C54
-387C54:lI108|H387D0C
-387D0C:lI105|H387DCC
-387DCC:lI98|H387E94
-387E94:lI47|H387F64
-387F64:lI115|H38803C
-38803C:lI116|H38811C
-38811C:lI100|H388204
-388204:lI108|H3882F4
-3882F4:lI105|H3883EC
-3883EC:lI98|H3884EC
-3884EC:lI47|H3885F4
-3885F4:lI101|H388704
-388704:lI98|H38881C
-38881C:lI105|H38892C
-38892C:lI110|N
-38AF48:lH387434|H38AF70
-387434:lI47|H38745C
-38745C:lI99|H38748C
-38748C:lI108|H3874C4
-3874C4:lI101|H387504
-387504:lI97|H38754C
-38754C:lI114|H38759C
-38759C:lI99|H3875F4
-3875F4:lI97|H387654
-387654:lI115|H3876BC
-3876BC:lI101|H38772C
-38772C:lI47|H3877A4
-3877A4:lI111|H387824
-387824:lI116|H3878AC
-3878AC:lI112|H38793C
-38793C:lI47|H3879CC
-3879CC:lI101|H387A64
-387A64:lI114|H387B04
-387B04:lI116|H387BAC
-387BAC:lI115|H387C5C
-387C5C:lI47|H387D14
-387D14:lI108|H387DD4
-387DD4:lI105|H387E9C
-387E9C:lI98|H387F6C
-387F6C:lI47|H388044
-388044:lI119|H388124
-388124:lI101|H38820C
-38820C:lI98|H3882FC
-3882FC:lI116|H3883F4
-3883F4:lI111|H3884F4
-3884F4:lI111|H3885FC
-3885FC:lI108|H38870C
-38870C:lI47|H388824
-388824:lI101|H388934
-388934:lI98|H388A44
-388A44:lI105|H388B54
-388B54:lI110|N
-38AF70:lH387464|H38AF98
-387464:lI47|H387494
-387494:lI99|H3874CC
-3874CC:lI108|H38750C
-38750C:lI101|H387554
-387554:lI97|H3875A4
-3875A4:lI114|H3875FC
-3875FC:lI99|H38765C
-38765C:lI97|H3876C4
-3876C4:lI115|H387734
-387734:lI101|H3877AC
-3877AC:lI47|H38782C
-38782C:lI111|H3878B4
-3878B4:lI116|H387944
-387944:lI112|H3879D4
-3879D4:lI47|H387A6C
-387A6C:lI101|H387B0C
-387B0C:lI114|H387BB4
-387BB4:lI116|H387C64
-387C64:lI115|H387D1C
-387D1C:lI47|H387DDC
-387DDC:lI108|H387EA4
-387EA4:lI105|H387F74
-387F74:lI98|H38804C
-38804C:lI47|H38812C
-38812C:lI116|H388214
-388214:lI118|H388304
-388304:lI47|H3883FC
-3883FC:lI101|H3884FC
-3884FC:lI98|H388604
-388604:lI105|H388714
-388714:lI110|N
-38AF98:lH38749C|H38AFC0
-38749C:lI47|H3874D4
-3874D4:lI99|H387514
-387514:lI108|H38755C
-38755C:lI101|H3875AC
-3875AC:lI97|H387604
-387604:lI114|H387664
-387664:lI99|H3876CC
-3876CC:lI97|H38773C
-38773C:lI115|H3877B4
-3877B4:lI101|H387834
-387834:lI47|H3878BC
-3878BC:lI111|H38794C
-38794C:lI116|H3879DC
-3879DC:lI112|H387A74
-387A74:lI47|H387B14
-387B14:lI101|H387BBC
-387BBC:lI114|H387C6C
-387C6C:lI116|H387D24
-387D24:lI115|H387DE4
-387DE4:lI47|H387EAC
-387EAC:lI108|H387F7C
-387F7C:lI105|H388054
-388054:lI98|H388134
-388134:lI47|H38821C
-38821C:lI116|H38830C
-38830C:lI115|H388404
-388404:lI112|H388504
-388504:lI47|H38860C
-38860C:lI101|H38871C
-38871C:lI98|H38882C
-38882C:lI105|H38893C
-38893C:lI110|N
-38AFC0:lH3874DC|H38AFE8
-3874DC:lI47|H38751C
-38751C:lI99|H387564
-387564:lI108|H3875B4
-3875B4:lI101|H38760C
-38760C:lI97|H38766C
-38766C:lI114|H3876D4
-3876D4:lI99|H387744
-387744:lI97|H3877BC
-3877BC:lI115|H38783C
-38783C:lI101|H3878C4
-3878C4:lI47|H387954
-387954:lI111|H3879E4
-3879E4:lI116|H387A7C
-387A7C:lI112|H387B1C
-387B1C:lI47|H387BC4
-387BC4:lI101|H387C74
-387C74:lI114|H387D2C
-387D2C:lI116|H387DEC
-387DEC:lI115|H387EB4
-387EB4:lI47|H387F84
-387F84:lI108|H38805C
-38805C:lI105|H38813C
-38813C:lI98|H388224
-388224:lI47|H388314
-388314:lI116|H38840C
-38840C:lI111|H38850C
-38850C:lI111|H388614
-388614:lI108|H388724
-388724:lI115|H388834
-388834:lI47|H388944
-388944:lI101|H388A4C
-388A4C:lI98|H388B5C
-388B5C:lI105|H388C6C
-388C6C:lI110|N
-38AFE8:lH387524|H38B008
-387524:lI47|H38756C
-38756C:lI99|H3875BC
-3875BC:lI108|H387614
-387614:lI101|H387674
-387674:lI97|H3876DC
-3876DC:lI114|H38774C
-38774C:lI99|H3877C4
-3877C4:lI97|H387844
-387844:lI115|H3878CC
-3878CC:lI101|H38795C
-38795C:lI47|H3879EC
-3879EC:lI111|H387A84
-387A84:lI116|H387B24
-387B24:lI112|H387BCC
-387BCC:lI47|H387C7C
-387C7C:lI101|H387D34
-387D34:lI114|H387DF4
-387DF4:lI116|H387EBC
-387EBC:lI115|H387F8C
-387F8C:lI47|H388064
-388064:lI108|H388144
-388144:lI105|H38822C
-38822C:lI98|H38831C
-38831C:lI47|H388414
-388414:lI116|H388514
-388514:lI111|H38861C
-38861C:lI111|H38872C
-38872C:lI108|H38883C
-38883C:lI98|H38894C
-38894C:lI97|H388A54
-388A54:lI114|H388B64
-388B64:lI47|H388C74
-388C74:lI101|H388D84
-388D84:lI98|H388E9C
-388E9C:lI105|H388FB4
-388FB4:lI110|N
-38B008:lH387574|H38B018
-387574:lI47|H3875C4
-3875C4:lI99|H38761C
-38761C:lI108|H38767C
-38767C:lI101|H3876E4
-3876E4:lI97|H387754
-387754:lI114|H3877CC
-3877CC:lI99|H38784C
-38784C:lI97|H3878D4
-3878D4:lI115|H387964
-387964:lI101|H3879F4
-3879F4:lI47|H387A8C
-387A8C:lI111|H387B2C
-387B2C:lI116|H387BD4
-387BD4:lI112|H387C84
-387C84:lI47|H387D3C
-387D3C:lI101|H387DFC
-387DFC:lI114|H387EC4
-387EC4:lI116|H387F94
-387F94:lI115|H38806C
-38806C:lI47|H38814C
-38814C:lI108|H388234
-388234:lI105|H388324
-388324:lI98|H38841C
-38841C:lI47|H38851C
-38851C:lI116|H388624
-388624:lI101|H388734
-388734:lI115|H388844
-388844:lI116|H388954
-388954:lI95|H388A5C
-388A5C:lI115|H388B6C
-388B6C:lI101|H388C7C
-388C7C:lI114|H388D8C
-388D8C:lI118|H388EA4
-388EA4:lI101|H388FBC
-388FBC:lI114|H3890D4
-3890D4:lI47|H3891EC
-3891EC:lI101|H3892FC
-3892FC:lI98|H38940C
-38940C:lI105|H38951C
-38951C:lI110|N
-38B018:lH3875CC|H38AE7C
-3875CC:lI47|H387624
-387624:lI99|H387684
-387684:lI108|H3876EC
-3876EC:lI101|H38775C
-38775C:lI97|H3877D4
-3877D4:lI114|H387854
-387854:lI99|H3878DC
-3878DC:lI97|H38796C
-38796C:lI115|H3879FC
-3879FC:lI101|H387A94
-387A94:lI47|H387B34
-387B34:lI111|H387BDC
-387BDC:lI116|H387C8C
-387C8C:lI112|H387D44
-387D44:lI47|H387E04
-387E04:lI101|H387ECC
-387ECC:lI114|H387F9C
-387F9C:lI116|H388074
-388074:lI115|H388154
-388154:lI47|H38823C
-38823C:lI108|H38832C
-38832C:lI105|H388424
-388424:lI98|H388524
-388524:lI47|H38862C
-38862C:lI115|H38873C
-38873C:lI115|H38884C
-38884C:lI108|H38895C
-38895C:lI47|H388A64
-388A64:lI101|H388B74
-388B74:lI98|H388C84
-388C84:lI105|H388D94
-388D94:lI110|N
-38AE7C:lH38762C|H38AEB0
-38762C:lI47|H38768C
-38768C:lI99|H3876F4
-3876F4:lI108|H387764
-387764:lI101|H3877DC
-3877DC:lI97|H38785C
-38785C:lI114|H3878E4
-3878E4:lI99|H387974
-387974:lI97|H387A04
-387A04:lI115|H387A9C
-387A9C:lI101|H387B3C
-387B3C:lI47|H387BE4
-387BE4:lI111|H387C94
-387C94:lI116|H387D4C
-387D4C:lI112|H387E0C
-387E0C:lI47|H387ED4
-387ED4:lI101|H387FA4
-387FA4:lI114|H38807C
-38807C:lI116|H38815C
-38815C:lI115|H388244
-388244:lI47|H388334
-388334:lI108|H38842C
-38842C:lI105|H38852C
-38852C:lI98|H388634
-388634:lI47|H388744
-388744:lI115|H388854
-388854:lI110|H388964
-388964:lI109|H388A6C
-388A6C:lI112|H388B7C
-388B7C:lI47|H388C8C
-388C8C:lI101|H388D9C
-388D9C:lI98|H388EAC
-388EAC:lI105|H388FC4
-388FC4:lI110|N
-38AEB0:lH387694|H38AED8
-387694:lI47|H3876FC
-3876FC:lI99|H38776C
-38776C:lI108|H3877E4
-3877E4:lI101|H387864
-387864:lI97|H3878EC
-3878EC:lI114|H38797C
-38797C:lI99|H387A0C
-387A0C:lI97|H387AA4
-387AA4:lI115|H387B44
-387B44:lI101|H387BEC
-387BEC:lI47|H387C9C
-387C9C:lI111|H387D54
-387D54:lI116|H387E14
-387E14:lI112|H387EDC
-387EDC:lI47|H387FAC
-387FAC:lI101|H388084
-388084:lI114|H388164
-388164:lI116|H38824C
-38824C:lI115|H38833C
-38833C:lI47|H388434
-388434:lI108|H388534
-388534:lI105|H38863C
-38863C:lI98|H38874C
-38874C:lI47|H38885C
-38885C:lI115|H38896C
-38896C:lI97|H388A74
-388A74:lI115|H388B84
-388B84:lI108|H388C94
-388C94:lI47|H388DA4
-388DA4:lI101|H388EB4
-388EB4:lI98|H388FCC
-388FCC:lI105|H3890DC
-3890DC:lI110|N
-38AED8:lH387704|H38AF08
-387704:lI47|H387774
-387774:lI99|H3877EC
-3877EC:lI108|H38786C
-38786C:lI101|H3878F4
-3878F4:lI97|H387984
-387984:lI114|H387A14
-387A14:lI99|H387AAC
-387AAC:lI97|H387B4C
-387B4C:lI115|H387BF4
-387BF4:lI101|H387CA4
-387CA4:lI47|H387D5C
-387D5C:lI111|H387E1C
-387E1C:lI116|H387EE4
-387EE4:lI112|H387FB4
-387FB4:lI47|H38808C
-38808C:lI101|H38816C
-38816C:lI114|H388254
-388254:lI116|H388344
-388344:lI115|H38843C
-38843C:lI47|H38853C
-38853C:lI108|H388644
-388644:lI105|H388754
-388754:lI98|H388864
-388864:lI47|H388974
-388974:lI114|H388A7C
-388A7C:lI117|H388B8C
-388B8C:lI110|H388C9C
-388C9C:lI116|H388DAC
-388DAC:lI105|H388EBC
-388EBC:lI109|H388FD4
-388FD4:lI101|H3890E4
-3890E4:lI95|H3891F4
-3891F4:lI116|H389304
-389304:lI111|H389414
-389414:lI111|H389524
-389524:lI108|H389624
-389624:lI115|H38971C
-38971C:lI47|H389814
-389814:lI101|H38990C
-38990C:lI98|H389A04
-389A04:lI105|H389AE4
-389AE4:lI110|N
-38AF08:lH38777C|H38AF40
-38777C:lI47|H3877F4
-3877F4:lI99|H387874
-387874:lI108|H3878FC
-3878FC:lI101|H38798C
-38798C:lI97|H387A1C
-387A1C:lI114|H387AB4
-387AB4:lI99|H387B54
-387B54:lI97|H387BFC
-387BFC:lI115|H387CAC
-387CAC:lI101|H387D64
-387D64:lI47|H387E24
-387E24:lI111|H387EEC
-387EEC:lI116|H387FBC
-387FBC:lI112|H388094
-388094:lI47|H388174
-388174:lI101|H38825C
-38825C:lI114|H38834C
-38834C:lI116|H388444
-388444:lI115|H388544
-388544:lI47|H38864C
-38864C:lI108|H38875C
-38875C:lI105|H38886C
-38886C:lI98|H38897C
-38897C:lI47|H388A84
-388A84:lI114|H388B94
-388B94:lI115|H388CA4
-388CA4:lI104|H388DB4
-388DB4:lI101|H388EC4
-388EC4:lI108|H388FDC
-388FDC:lI108|H3890EC
-3890EC:lI47|H3891FC
-3891FC:lI101|H38930C
-38930C:lI98|H38941C
-38941C:lI105|H38952C
-38952C:lI110|N
-38AF40:lH3877FC|H38AF68
-3877FC:lI47|H38787C
-38787C:lI99|H387904
-387904:lI108|H387994
-387994:lI101|H387A24
-387A24:lI97|H387ABC
-387ABC:lI114|H387B5C
-387B5C:lI99|H387C04
-387C04:lI97|H387CB4
-387CB4:lI115|H387D6C
-387D6C:lI101|H387E2C
-387E2C:lI47|H387EF4
-387EF4:lI111|H387FC4
-387FC4:lI116|H38809C
-38809C:lI112|H38817C
-38817C:lI47|H388264
-388264:lI101|H388354
-388354:lI114|H38844C
-38844C:lI116|H38854C
-38854C:lI115|H388654
-388654:lI47|H388764
-388764:lI108|H388874
-388874:lI105|H388984
-388984:lI98|H388A8C
-388A8C:lI47|H388B9C
-388B9C:lI112|H388CAC
-388CAC:lI109|H388DBC
-388DBC:lI97|H388ECC
-388ECC:lI110|H388FE4
-388FE4:lI47|H3890F4
-3890F4:lI101|H389204
-389204:lI98|H389314
-389314:lI105|H389424
-389424:lI110|N
-38AF68:lH387884|H38AF90
-387884:lI47|H38790C
-38790C:lI99|H38799C
-38799C:lI108|H387A2C
-387A2C:lI101|H387AC4
-387AC4:lI97|H387B64
-387B64:lI114|H387C0C
-387C0C:lI99|H387CBC
-387CBC:lI97|H387D74
-387D74:lI115|H387E34
-387E34:lI101|H387EFC
-387EFC:lI47|H387FCC
-387FCC:lI111|H3880A4
-3880A4:lI116|H388184
-388184:lI112|H38826C
-38826C:lI47|H38835C
-38835C:lI101|H388454
-388454:lI114|H388554
-388554:lI116|H38865C
-38865C:lI115|H38876C
-38876C:lI47|H38887C
-38887C:lI108|H38898C
-38898C:lI105|H388A94
-388A94:lI98|H388BA4
-388BA4:lI47|H388CB4
-388CB4:lI112|H388DC4
-388DC4:lI97|H388ED4
-388ED4:lI114|H388FEC
-388FEC:lI115|H3890FC
-3890FC:lI101|H38920C
-38920C:lI116|H38931C
-38931C:lI111|H38942C
-38942C:lI111|H389534
-389534:lI108|H38962C
-38962C:lI115|H389724
-389724:lI47|H38981C
-38981C:lI101|H389914
-389914:lI98|H389A0C
-389A0C:lI105|H389AEC
-389AEC:lI110|N
-38AF90:lH387914|H38AFB8
-387914:lI47|H3879A4
-3879A4:lI99|H387A34
-387A34:lI108|H387ACC
-387ACC:lI101|H387B6C
-387B6C:lI97|H387C14
-387C14:lI114|H387CC4
-387CC4:lI99|H387D7C
-387D7C:lI97|H387E3C
-387E3C:lI115|H387F04
-387F04:lI101|H387FD4
-387FD4:lI47|H3880AC
-3880AC:lI111|H38818C
-38818C:lI116|H388274
-388274:lI112|H388364
-388364:lI47|H38845C
-38845C:lI101|H38855C
-38855C:lI114|H388664
-388664:lI116|H388774
-388774:lI115|H388884
-388884:lI47|H388994
-388994:lI108|H388A9C
-388A9C:lI105|H388BAC
-388BAC:lI98|H388CBC
-388CBC:lI47|H388DCC
-388DCC:lI111|H388EDC
-388EDC:lI116|H388FF4
-388FF4:lI112|H389104
-389104:lI95|H389214
-389214:lI109|H389324
-389324:lI105|H389434
-389434:lI98|H38953C
-38953C:lI115|H389634
-389634:lI47|H38972C
-38972C:lI101|H389824
-389824:lI98|H38991C
-38991C:lI105|H389A14
-389A14:lI110|N
-38AFB8:lH3879AC|H38AFE0
-3879AC:lI47|H387A3C
-387A3C:lI99|H387AD4
-387AD4:lI108|H387B74
-387B74:lI101|H387C1C
-387C1C:lI97|H387CCC
-387CCC:lI114|H387D84
-387D84:lI99|H387E44
-387E44:lI97|H387F0C
-387F0C:lI115|H387FDC
-387FDC:lI101|H3880B4
-3880B4:lI47|H388194
-388194:lI111|H38827C
-38827C:lI116|H38836C
-38836C:lI112|H388464
-388464:lI47|H388564
-388564:lI101|H38866C
-38866C:lI114|H38877C
-38877C:lI116|H38888C
-38888C:lI115|H38899C
-38899C:lI47|H388AA4
-388AA4:lI108|H388BB4
-388BB4:lI105|H388CC4
-388CC4:lI98|H388DD4
-388DD4:lI47|H388EE4
-388EE4:lI111|H388FFC
-388FFC:lI115|H38910C
-38910C:lI95|H38921C
-38921C:lI109|H38932C
-38932C:lI111|H38943C
-38943C:lI110|H389544
-389544:lI47|H38963C
-38963C:lI101|H389734
-389734:lI98|H38982C
-38982C:lI105|H389924
-389924:lI110|N
-38AFE0:lH387A44|H38B000
-387A44:lI47|H387ADC
-387ADC:lI99|H387B7C
-387B7C:lI108|H387C24
-387C24:lI101|H387CD4
-387CD4:lI97|H387D8C
-387D8C:lI114|H387E4C
-387E4C:lI99|H387F14
-387F14:lI97|H387FE4
-387FE4:lI115|H3880BC
-3880BC:lI101|H38819C
-38819C:lI47|H388284
-388284:lI111|H388374
-388374:lI116|H38846C
-38846C:lI112|H38856C
-38856C:lI47|H388674
-388674:lI101|H388784
-388784:lI114|H388894
-388894:lI116|H3889A4
-3889A4:lI115|H388AAC
-388AAC:lI47|H388BBC
-388BBC:lI108|H388CCC
-388CCC:lI105|H388DDC
-388DDC:lI98|H388EEC
-388EEC:lI47|H389004
-389004:lI111|H389114
-389114:lI114|H389224
-389224:lI98|H389334
-389334:lI101|H389444
-389444:lI114|H38954C
-38954C:lI47|H389644
-389644:lI101|H38973C
-38973C:lI98|H389834
-389834:lI105|H38992C
-38992C:lI110|N
-38B000:lH387AE4|H38B010
-387AE4:lI47|H387B84
-387B84:lI99|H387C2C
-387C2C:lI108|H387CDC
-387CDC:lI101|H387D94
-387D94:lI97|H387E54
-387E54:lI114|H387F1C
-387F1C:lI99|H387FEC
-387FEC:lI97|H3880C4
-3880C4:lI115|H3881A4
-3881A4:lI101|H38828C
-38828C:lI47|H38837C
-38837C:lI111|H388474
-388474:lI116|H388574
-388574:lI112|H38867C
-38867C:lI47|H38878C
-38878C:lI101|H38889C
-38889C:lI114|H3889AC
-3889AC:lI116|H388AB4
-388AB4:lI115|H388BC4
-388BC4:lI47|H388CD4
-388CD4:lI108|H388DE4
-388DE4:lI105|H388EF4
-388EF4:lI98|H38900C
-38900C:lI47|H38911C
-38911C:lI111|H38922C
-38922C:lI100|H38933C
-38933C:lI98|H38944C
-38944C:lI99|H389554
-389554:lI47|H38964C
-38964C:lI101|H389744
-389744:lI98|H38983C
-38983C:lI105|H389934
-389934:lI110|N
-38B010:lH387B8C|H38B020
-387B8C:lI47|H387C34
-387C34:lI99|H387CE4
-387CE4:lI108|H387D9C
-387D9C:lI101|H387E5C
-387E5C:lI97|H387F24
-387F24:lI114|H387FF4
-387FF4:lI99|H3880CC
-3880CC:lI97|H3881AC
-3881AC:lI115|H388294
-388294:lI101|H388384
-388384:lI47|H38847C
-38847C:lI111|H38857C
-38857C:lI116|H388684
-388684:lI112|H388794
-388794:lI47|H3888A4
-3888A4:lI101|H3889B4
-3889B4:lI114|H388ABC
-388ABC:lI116|H388BCC
-388BCC:lI115|H388CDC
-388CDC:lI47|H388DEC
-388DEC:lI108|H388EFC
-388EFC:lI105|H389014
-389014:lI98|H389124
-389124:lI47|H389234
-389234:lI111|H389344
-389344:lI98|H389454
-389454:lI115|H38955C
-38955C:lI101|H389654
-389654:lI114|H38974C
-38974C:lI118|H389844
-389844:lI101|H38993C
-38993C:lI114|H389A1C
-389A1C:lI47|H389AF4
-389AF4:lI101|H389BBC
-389BBC:lI98|H389C84
-389C84:lI105|H389D4C
-389D4C:lI110|N
-38B020:lH387C3C|H38B028
-387C3C:lI47|H387CEC
-387CEC:lI99|H387DA4
-387DA4:lI108|H387E64
-387E64:lI101|H387F2C
-387F2C:lI97|H387FFC
-387FFC:lI114|H3880D4
-3880D4:lI99|H3881B4
-3881B4:lI97|H38829C
-38829C:lI115|H38838C
-38838C:lI101|H388484
-388484:lI47|H388584
-388584:lI111|H38868C
-38868C:lI116|H38879C
-38879C:lI112|H3888AC
-3888AC:lI47|H3889BC
-3889BC:lI101|H388AC4
-388AC4:lI114|H388BD4
-388BD4:lI116|H388CE4
-388CE4:lI115|H388DF4
-388DF4:lI47|H388F04
-388F04:lI108|H38901C
-38901C:lI105|H38912C
-38912C:lI98|H38923C
-38923C:lI47|H38934C
-38934C:lI109|H38945C
-38945C:lI110|H389564
-389564:lI101|H38965C
-38965C:lI115|H389754
-389754:lI105|H38984C
-38984C:lI97|H389944
-389944:lI95|H389A24
-389A24:lI115|H389AFC
-389AFC:lI101|H389BC4
-389BC4:lI115|H389C8C
-389C8C:lI115|H389D54
-389D54:lI105|H389E14
-389E14:lI111|H389ECC
-389ECC:lI110|H389F7C
-389F7C:lI47|H38A01C
-38A01C:lI101|H38A0AC
-38A0AC:lI98|H38A12C
-38A12C:lI105|H38A19C
-38A19C:lI110|N
-38B028:lH387CF4|H38B030
-387CF4:lI47|H387DAC
-387DAC:lI99|H387E6C
-387E6C:lI108|H387F34
-387F34:lI101|H388004
-388004:lI97|H3880DC
-3880DC:lI114|H3881BC
-3881BC:lI99|H3882A4
-3882A4:lI97|H388394
-388394:lI115|H38848C
-38848C:lI101|H38858C
-38858C:lI47|H388694
-388694:lI111|H3887A4
-3887A4:lI116|H3888B4
-3888B4:lI112|H3889C4
-3889C4:lI47|H388ACC
-388ACC:lI101|H388BDC
-388BDC:lI114|H388CEC
-388CEC:lI116|H388DFC
-388DFC:lI115|H388F0C
-388F0C:lI47|H389024
-389024:lI108|H389134
-389134:lI105|H389244
-389244:lI98|H389354
-389354:lI47|H389464
-389464:lI109|H38956C
-38956C:lI110|H389664
-389664:lI101|H38975C
-38975C:lI115|H389854
-389854:lI105|H38994C
-38994C:lI97|H389A2C
-389A2C:lI47|H389B04
-389B04:lI101|H389BCC
-389BCC:lI98|H389C94
-389C94:lI105|H389D5C
-389D5C:lI110|N
-38B030:lH387DB4|H38B038
-387DB4:lI47|H387E74
-387E74:lI99|H387F3C
-387F3C:lI108|H38800C
-38800C:lI101|H3880E4
-3880E4:lI97|H3881C4
-3881C4:lI114|H3882AC
-3882AC:lI99|H38839C
-38839C:lI97|H388494
-388494:lI115|H388594
-388594:lI101|H38869C
-38869C:lI47|H3887AC
-3887AC:lI111|H3888BC
-3888BC:lI116|H3889CC
-3889CC:lI112|H388AD4
-388AD4:lI47|H388BE4
-388BE4:lI101|H388CF4
-388CF4:lI114|H388E04
-388E04:lI116|H388F14
-388F14:lI115|H38902C
-38902C:lI47|H38913C
-38913C:lI108|H38924C
-38924C:lI105|H38935C
-38935C:lI98|H38946C
-38946C:lI47|H389574
-389574:lI109|H38966C
-38966C:lI110|H389764
-389764:lI101|H38985C
-38985C:lI109|H389954
-389954:lI111|H389A34
-389A34:lI115|H389B0C
-389B0C:lI121|H389BD4
-389BD4:lI110|H389C9C
-389C9C:lI101|H389D64
-389D64:lI47|H389E1C
-389E1C:lI101|H389ED4
-389ED4:lI98|H389F84
-389F84:lI105|H38A024
-38A024:lI110|N
-38B038:lH387E7C|H38B040
-387E7C:lI47|H387F44
-387F44:lI99|H388014
-388014:lI108|H3880EC
-3880EC:lI101|H3881CC
-3881CC:lI97|H3882B4
-3882B4:lI114|H3883A4
-3883A4:lI99|H38849C
-38849C:lI97|H38859C
-38859C:lI115|H3886A4
-3886A4:lI101|H3887B4
-3887B4:lI47|H3888C4
-3888C4:lI111|H3889D4
-3889D4:lI116|H388ADC
-388ADC:lI112|H388BEC
-388BEC:lI47|H388CFC
-388CFC:lI101|H388E0C
-388E0C:lI114|H388F1C
-388F1C:lI116|H389034
-389034:lI115|H389144
-389144:lI47|H389254
-389254:lI108|H389364
-389364:lI105|H389474
-389474:lI98|H38957C
-38957C:lI47|H389674
-389674:lI109|H38976C
-38976C:lI101|H389864
-389864:lI103|H38995C
-38995C:lI97|H389A3C
-389A3C:lI99|H389B14
-389B14:lI111|H389BDC
-389BDC:lI47|H389CA4
-389CA4:lI101|H389D6C
-389D6C:lI98|H389E24
-389E24:lI105|H389EDC
-389EDC:lI110|N
-38B040:lH387F4C|H38B048
-387F4C:lI47|H38801C
-38801C:lI99|H3880F4
-3880F4:lI108|H3881D4
-3881D4:lI101|H3882BC
-3882BC:lI97|H3883AC
-3883AC:lI114|H3884A4
-3884A4:lI99|H3885A4
-3885A4:lI97|H3886AC
-3886AC:lI115|H3887BC
-3887BC:lI101|H3888CC
-3888CC:lI47|H3889DC
-3889DC:lI111|H388AE4
-388AE4:lI116|H388BF4
-388BF4:lI112|H388D04
-388D04:lI47|H388E14
-388E14:lI101|H388F24
-388F24:lI114|H38903C
-38903C:lI116|H38914C
-38914C:lI115|H38925C
-38925C:lI47|H38936C
-38936C:lI108|H38947C
-38947C:lI105|H389584
-389584:lI98|H38967C
-38967C:lI47|H389774
-389774:lI106|H38986C
-38986C:lI105|H389964
-389964:lI110|H389A44
-389A44:lI116|H389B1C
-389B1C:lI101|H389BE4
-389BE4:lI114|H389CAC
-389CAC:lI102|H389D74
-389D74:lI97|H389E2C
-389E2C:lI99|H389EE4
-389EE4:lI101|N
-38B048:lH388024|H38B050
-388024:lI47|H3880FC
-3880FC:lI99|H3881DC
-3881DC:lI108|H3882C4
-3882C4:lI101|H3883B4
-3883B4:lI97|H3884AC
-3884AC:lI114|H3885AC
-3885AC:lI99|H3886B4
-3886B4:lI97|H3887C4
-3887C4:lI115|H3888D4
-3888D4:lI101|H3889E4
-3889E4:lI47|H388AEC
-388AEC:lI111|H388BFC
-388BFC:lI116|H388D0C
-388D0C:lI112|H388E1C
-388E1C:lI47|H388F2C
-388F2C:lI101|H389044
-389044:lI114|H389154
-389154:lI116|H389264
-389264:lI115|H389374
-389374:lI47|H389484
-389484:lI108|H38958C
-38958C:lI105|H389684
-389684:lI98|H38977C
-38977C:lI47|H389874
-389874:lI105|H38996C
-38996C:lI110|H389A4C
-389A4C:lI101|H389B24
-389B24:lI116|H389BEC
-389BEC:lI115|H389CB4
-389CB4:lI47|H389D7C
-389D7C:lI101|H389E34
-389E34:lI98|H389EEC
-389EEC:lI105|H389F8C
-389F8C:lI110|N
-38B050:lH388104|H38B058
-388104:lI47|H3881E4
-3881E4:lI99|H3882CC
-3882CC:lI108|H3883BC
-3883BC:lI101|H3884B4
-3884B4:lI97|H3885B4
-3885B4:lI114|H3886BC
-3886BC:lI99|H3887CC
-3887CC:lI97|H3888DC
-3888DC:lI115|H3889EC
-3889EC:lI101|H388AF4
-388AF4:lI47|H388C04
-388C04:lI111|H388D14
-388D14:lI116|H388E24
-388E24:lI112|H388F34
-388F34:lI47|H38904C
-38904C:lI101|H38915C
-38915C:lI114|H38926C
-38926C:lI116|H38937C
-38937C:lI115|H38948C
-38948C:lI47|H389594
-389594:lI108|H38968C
-38968C:lI105|H389784
-389784:lI98|H38987C
-38987C:lI47|H389974
-389974:lI105|H389A54
-389A54:lI99|H389B2C
-389B2C:lI47|H389BF4
-389BF4:lI101|H389CBC
-389CBC:lI98|H389D84
-389D84:lI105|H389E3C
-389E3C:lI110|N
-38B058:lH3881EC|H38B060
-3881EC:lI47|H3882D4
-3882D4:lI99|H3883C4
-3883C4:lI108|H3884BC
-3884BC:lI101|H3885BC
-3885BC:lI97|H3886C4
-3886C4:lI114|H3887D4
-3887D4:lI99|H3888E4
-3888E4:lI97|H3889F4
-3889F4:lI115|H388AFC
-388AFC:lI101|H388C0C
-388C0C:lI47|H388D1C
-388D1C:lI111|H388E2C
-388E2C:lI116|H388F3C
-388F3C:lI112|H389054
-389054:lI47|H389164
-389164:lI101|H389274
-389274:lI114|H389384
-389384:lI116|H389494
-389494:lI115|H38959C
-38959C:lI47|H389694
-389694:lI108|H38978C
-38978C:lI105|H389884
-389884:lI98|H38997C
-38997C:lI47|H389A5C
-389A5C:lI104|H389B34
-389B34:lI105|H389BFC
-389BFC:lI112|H389CC4
-389CC4:lI101|H389D8C
-389D8C:lI47|H389E44
-389E44:lI101|H389EF4
-389EF4:lI98|H389F94
-389F94:lI105|H38A02C
-38A02C:lI110|N
-38B060:lH3882DC|H38B068
-3882DC:lI47|H3883CC
-3883CC:lI99|H3884C4
-3884C4:lI108|H3885C4
-3885C4:lI101|H3886CC
-3886CC:lI97|H3887DC
-3887DC:lI114|H3888EC
-3888EC:lI99|H3889FC
-3889FC:lI97|H388B04
-388B04:lI115|H388C14
-388C14:lI101|H388D24
-388D24:lI47|H388E34
-388E34:lI111|H388F44
-388F44:lI116|H38905C
-38905C:lI112|H38916C
-38916C:lI47|H38927C
-38927C:lI101|H38938C
-38938C:lI114|H38949C
-38949C:lI116|H3895A4
-3895A4:lI115|H38969C
-38969C:lI47|H389794
-389794:lI108|H38988C
-38988C:lI105|H389984
-389984:lI98|H389A64
-389A64:lI47|H389B3C
-389B3C:lI103|H389C04
-389C04:lI115|H389CCC
-389CCC:lI47|H389D94
-389D94:lI101|H389E4C
-389E4C:lI98|H389EFC
-389EFC:lI105|H389F9C
-389F9C:lI110|N
-38B068:lH3883D4|H38B070
-3883D4:lI47|H3884CC
-3884CC:lI99|H3885CC
-3885CC:lI108|H3886D4
-3886D4:lI101|H3887E4
-3887E4:lI97|H3888F4
-3888F4:lI114|H388A04
-388A04:lI99|H388B0C
-388B0C:lI97|H388C1C
-388C1C:lI115|H388D2C
-388D2C:lI101|H388E3C
-388E3C:lI47|H388F4C
-388F4C:lI111|H389064
-389064:lI116|H389174
-389174:lI112|H389284
-389284:lI47|H389394
-389394:lI101|H3894A4
-3894A4:lI114|H3895AC
-3895AC:lI116|H3896A4
-3896A4:lI115|H38979C
-38979C:lI47|H389894
-389894:lI108|H38998C
-38998C:lI105|H389A6C
-389A6C:lI98|H389B44
-389B44:lI47|H389C0C
-389C0C:lI101|H389CD4
-389CD4:lI118|H389D9C
-389D9C:lI97|H389E54
-389E54:lI47|H389F04
-389F04:lI101|H389FA4
-389FA4:lI98|H38A034
-38A034:lI105|H38A0B4
-38A0B4:lI110|N
-38B070:lH3884D4|H38B078
-3884D4:lI47|H3885D4
-3885D4:lI99|H3886DC
-3886DC:lI108|H3887EC
-3887EC:lI101|H3888FC
-3888FC:lI97|H388A0C
-388A0C:lI114|H388B14
-388B14:lI99|H388C24
-388C24:lI97|H388D34
-388D34:lI115|H388E44
-388E44:lI101|H388F54
-388F54:lI47|H38906C
-38906C:lI111|H38917C
-38917C:lI116|H38928C
-38928C:lI112|H38939C
-38939C:lI47|H3894AC
-3894AC:lI101|H3895B4
-3895B4:lI114|H3896AC
-3896AC:lI116|H3897A4
-3897A4:lI115|H38989C
-38989C:lI47|H389994
-389994:lI108|H389A74
-389A74:lI105|H389B4C
-389B4C:lI98|H389C14
-389C14:lI47|H389CDC
-389CDC:lI101|H389DA4
-389DA4:lI116|H389E5C
-389E5C:lI47|H389F0C
-389F0C:lI101|H389FAC
-389FAC:lI98|H38A03C
-38A03C:lI105|H38A0BC
-38A0BC:lI110|N
-38B078:lH3885DC|H38B080
-3885DC:lI47|H3886E4
-3886E4:lI99|H3887F4
-3887F4:lI108|H388904
-388904:lI101|H388A14
-388A14:lI97|H388B1C
-388B1C:lI114|H388C2C
-388C2C:lI99|H388D3C
-388D3C:lI97|H388E4C
-388E4C:lI115|H388F5C
-388F5C:lI101|H389074
-389074:lI47|H389184
-389184:lI111|H389294
-389294:lI116|H3893A4
-3893A4:lI112|H3894B4
-3894B4:lI47|H3895BC
-3895BC:lI101|H3896B4
-3896B4:lI114|H3897AC
-3897AC:lI116|H3898A4
-3898A4:lI115|H38999C
-38999C:lI47|H389A7C
-389A7C:lI108|H389B54
-389B54:lI105|H389C1C
-389C1C:lI98|H389CE4
-389CE4:lI47|H389DAC
-389DAC:lI101|H389E64
-389E64:lI114|H389F14
-389F14:lI108|H389FB4
-389FB4:lI95|H38A044
-38A044:lI105|H38A0C4
-38A0C4:lI110|H38A134
-38A134:lI116|H38A1A4
-38A1A4:lI101|H38A20C
-38A20C:lI114|H38A274
-38A274:lI102|H38A2DC
-38A2DC:lI97|H38A344
-38A344:lI99|H38A3AC
-38A3AC:lI101|N
-38B080:lH3886EC|H38B088
-3886EC:lI47|H3887FC
-3887FC:lI99|H38890C
-38890C:lI108|H388A1C
-388A1C:lI101|H388B24
-388B24:lI97|H388C34
-388C34:lI114|H388D44
-388D44:lI99|H388E54
-388E54:lI97|H388F64
-388F64:lI115|H38907C
-38907C:lI101|H38918C
-38918C:lI47|H38929C
-38929C:lI111|H3893AC
-3893AC:lI116|H3894BC
-3894BC:lI112|H3895C4
-3895C4:lI47|H3896BC
-3896BC:lI101|H3897B4
-3897B4:lI114|H3898AC
-3898AC:lI116|H3899A4
-3899A4:lI115|H389A84
-389A84:lI47|H389B5C
-389B5C:lI108|H389C24
-389C24:lI105|H389CEC
-389CEC:lI98|H389DB4
-389DB4:lI47|H389E6C
-389E6C:lI100|H389F1C
-389F1C:lI101|H389FBC
-389FBC:lI98|H38A04C
-38A04C:lI117|H38A0CC
-38A0CC:lI103|H38A13C
-38A13C:lI103|H38A1AC
-38A1AC:lI101|H38A214
-38A214:lI114|H38A27C
-38A27C:lI47|H38A2E4
-38A2E4:lI101|H38A34C
-38A34C:lI98|H38A3B4
-38A3B4:lI105|H38A414
-38A414:lI110|N
-38B088:lH388804|H38B090
-388804:lI47|H388914
-388914:lI99|H388A24
-388A24:lI108|H388B2C
-388B2C:lI101|H388C3C
-388C3C:lI97|H388D4C
-388D4C:lI114|H388E5C
-388E5C:lI99|H388F6C
-388F6C:lI97|H389084
-389084:lI115|H389194
-389194:lI101|H3892A4
-3892A4:lI47|H3893B4
-3893B4:lI111|H3894C4
-3894C4:lI116|H3895CC
-3895CC:lI112|H3896C4
-3896C4:lI47|H3897BC
-3897BC:lI101|H3898B4
-3898B4:lI114|H3899AC
-3899AC:lI116|H389A8C
-389A8C:lI115|H389B64
-389B64:lI47|H389C2C
-389C2C:lI108|H389CF4
-389CF4:lI105|H389DBC
-389DBC:lI98|H389E74
-389E74:lI47|H389F24
-389F24:lI99|H389FC4
-389FC4:lI114|H38A054
-38A054:lI121|H38A0D4
-38A0D4:lI112|H38A144
-38A144:lI116|H38A1B4
-38A1B4:lI111|H38A21C
-38A21C:lI47|H38A284
-38A284:lI101|H38A2EC
-38A2EC:lI98|H38A354
-38A354:lI105|H38A3BC
-38A3BC:lI110|N
-38B090:lH38891C|H38B098
-38891C:lI47|H388A2C
-388A2C:lI99|H388B34
-388B34:lI108|H388C44
-388C44:lI101|H388D54
-388D54:lI97|H388E64
-388E64:lI114|H388F74
-388F74:lI99|H38908C
-38908C:lI97|H38919C
-38919C:lI115|H3892AC
-3892AC:lI101|H3893BC
-3893BC:lI47|H3894CC
-3894CC:lI111|H3895D4
-3895D4:lI116|H3896CC
-3896CC:lI112|H3897C4
-3897C4:lI47|H3898BC
-3898BC:lI101|H3899B4
-3899B4:lI114|H389A94
-389A94:lI116|H389B6C
-389B6C:lI115|H389C34
-389C34:lI47|H389CFC
-389CFC:lI108|H389DC4
-389DC4:lI105|H389E7C
-389E7C:lI98|H389F2C
-389F2C:lI47|H389FCC
-389FCC:lI99|H38A05C
-38A05C:lI111|H38A0DC
-38A0DC:lI115|H38A14C
-38A14C:lI84|H38A1BC
-38A1BC:lI114|H38A224
-38A224:lI97|H38A28C
-38A28C:lI110|H38A2F4
-38A2F4:lI115|H38A35C
-38A35C:lI97|H38A3C4
-38A3C4:lI99|H38A41C
-38A41C:lI116|H38A46C
-38A46C:lI105|H38A4BC
-38A4BC:lI111|H38A50C
-38A50C:lI110|H38A554
-38A554:lI115|H38A59C
-38A59C:lI47|H38A5E4
-38A5E4:lI101|H38A62C
-38A62C:lI98|H38A66C
-38A66C:lI105|H38A6A4
-38A6A4:lI110|N
-38B098:lH388A34|H38B0A0
-388A34:lI47|H388B3C
-388B3C:lI99|H388C4C
-388C4C:lI108|H388D5C
-388D5C:lI101|H388E6C
-388E6C:lI97|H388F7C
-388F7C:lI114|H389094
-389094:lI99|H3891A4
-3891A4:lI97|H3892B4
-3892B4:lI115|H3893C4
-3893C4:lI101|H3894D4
-3894D4:lI47|H3895DC
-3895DC:lI111|H3896D4
-3896D4:lI116|H3897CC
-3897CC:lI112|H3898C4
-3898C4:lI47|H3899BC
-3899BC:lI101|H389A9C
-389A9C:lI114|H389B74
-389B74:lI116|H389C3C
-389C3C:lI115|H389D04
-389D04:lI47|H389DCC
-389DCC:lI108|H389E84
-389E84:lI105|H389F34
-389F34:lI98|H389FD4
-389FD4:lI47|H38A064
-38A064:lI99|H38A0E4
-38A0E4:lI111|H38A154
-38A154:lI115|H38A1C4
-38A1C4:lI84|H38A22C
-38A22C:lI105|H38A294
-38A294:lI109|H38A2FC
-38A2FC:lI101|H38A364
-38A364:lI47|H38A3CC
-38A3CC:lI101|H38A424
-38A424:lI98|H38A474
-38A474:lI105|H38A4C4
-38A4C4:lI110|N
-38B0A0:lH388B44|H38B0A8
-388B44:lI47|H388C54
-388C54:lI99|H388D64
-388D64:lI108|H388E74
-388E74:lI101|H388F84
-388F84:lI97|H38909C
-38909C:lI114|H3891AC
-3891AC:lI99|H3892BC
-3892BC:lI97|H3893CC
-3893CC:lI115|H3894DC
-3894DC:lI101|H3895E4
-3895E4:lI47|H3896DC
-3896DC:lI111|H3897D4
-3897D4:lI116|H3898CC
-3898CC:lI112|H3899C4
-3899C4:lI47|H389AA4
-389AA4:lI101|H389B7C
-389B7C:lI114|H389C44
-389C44:lI116|H389D0C
-389D0C:lI115|H389DD4
-389DD4:lI47|H389E8C
-389E8C:lI108|H389F3C
-389F3C:lI105|H389FDC
-389FDC:lI98|H38A06C
-38A06C:lI47|H38A0EC
-38A0EC:lI99|H38A15C
-38A15C:lI111|H38A1CC
-38A1CC:lI115|H38A234
-38A234:lI80|H38A29C
-38A29C:lI114|H38A304
-38A304:lI111|H38A36C
-38A36C:lI112|H38A3D4
-38A3D4:lI101|H38A42C
-38A42C:lI114|H38A47C
-38A47C:lI116|H38A4CC
-38A4CC:lI121|H38A514
-38A514:lI47|H38A55C
-38A55C:lI101|H38A5A4
-38A5A4:lI98|H38A5EC
-38A5EC:lI105|H38A634
-38A634:lI110|N
-38B0A8:lH388C5C|H38B0B0
-388C5C:lI47|H388D6C
-388D6C:lI99|H388E7C
-388E7C:lI108|H388F8C
-388F8C:lI101|H3890A4
-3890A4:lI97|H3891B4
-3891B4:lI114|H3892C4
-3892C4:lI99|H3893D4
-3893D4:lI97|H3894E4
-3894E4:lI115|H3895EC
-3895EC:lI101|H3896E4
-3896E4:lI47|H3897DC
-3897DC:lI111|H3898D4
-3898D4:lI116|H3899CC
-3899CC:lI112|H389AAC
-389AAC:lI47|H389B84
-389B84:lI101|H389C4C
-389C4C:lI114|H389D14
-389D14:lI116|H389DDC
-389DDC:lI115|H389E94
-389E94:lI47|H389F44
-389F44:lI108|H389FE4
-389FE4:lI105|H38A074
-38A074:lI98|H38A0F4
-38A0F4:lI47|H38A164
-38A164:lI99|H38A1D4
-38A1D4:lI111|H38A23C
-38A23C:lI115|H38A2A4
-38A2A4:lI78|H38A30C
-38A30C:lI111|H38A374
-38A374:lI116|H38A3DC
-38A3DC:lI105|H38A434
-38A434:lI102|H38A484
-38A484:lI105|H38A4D4
-38A4D4:lI99|H38A51C
-38A51C:lI97|H38A564
-38A564:lI116|H38A5AC
-38A5AC:lI105|H38A5F4
-38A5F4:lI111|H38A63C
-38A63C:lI110|H38A674
-38A674:lI47|H38A6AC
-38A6AC:lI101|H38A6D4
-38A6D4:lI98|H38A6EC
-38A6EC:lI105|H38A704
-38A704:lI110|N
-38B0B0:lH388D74|H38B0B8
-388D74:lI47|H388E84
-388E84:lI99|H388F94
-388F94:lI108|H3890AC
-3890AC:lI101|H3891BC
-3891BC:lI97|H3892CC
-3892CC:lI114|H3893DC
-3893DC:lI99|H3894EC
-3894EC:lI97|H3895F4
-3895F4:lI115|H3896EC
-3896EC:lI101|H3897E4
-3897E4:lI47|H3898DC
-3898DC:lI111|H3899D4
-3899D4:lI116|H389AB4
-389AB4:lI112|H389B8C
-389B8C:lI47|H389C54
-389C54:lI101|H389D1C
-389D1C:lI114|H389DE4
-389DE4:lI116|H389E9C
-389E9C:lI115|H389F4C
-389F4C:lI47|H389FEC
-389FEC:lI108|H38A07C
-38A07C:lI105|H38A0FC
-38A0FC:lI98|H38A16C
-38A16C:lI47|H38A1DC
-38A1DC:lI99|H38A244
-38A244:lI111|H38A2AC
-38A2AC:lI115|H38A314
-38A314:lI70|H38A37C
-38A37C:lI105|H38A3E4
-38A3E4:lI108|H38A43C
-38A43C:lI101|H38A48C
-38A48C:lI84|H38A4DC
-38A4DC:lI114|H38A524
-38A524:lI97|H38A56C
-38A56C:lI110|H38A5B4
-38A5B4:lI115|H38A5FC
-38A5FC:lI102|H38A644
-38A644:lI101|H38A67C
-38A67C:lI114|H38A6B4
-38A6B4:lI47|H38A6DC
-38A6DC:lI101|H38A6F4
-38A6F4:lI98|H38A70C
-38A70C:lI105|H38A71C
-38A71C:lI110|N
-38B0B8:lH388E8C|H38B0C0
-388E8C:lI47|H388F9C
-388F9C:lI99|H3890B4
-3890B4:lI108|H3891C4
-3891C4:lI101|H3892D4
-3892D4:lI97|H3893E4
-3893E4:lI114|H3894F4
-3894F4:lI99|H3895FC
-3895FC:lI97|H3896F4
-3896F4:lI115|H3897EC
-3897EC:lI101|H3898E4
-3898E4:lI47|H3899DC
-3899DC:lI111|H389ABC
-389ABC:lI116|H389B94
-389B94:lI112|H389C5C
-389C5C:lI47|H389D24
-389D24:lI101|H389DEC
-389DEC:lI114|H389EA4
-389EA4:lI116|H389F54
-389F54:lI115|H389FF4
-389FF4:lI47|H38A084
-38A084:lI108|H38A104
-38A104:lI105|H38A174
-38A174:lI98|H38A1E4
-38A1E4:lI47|H38A24C
-38A24C:lI99|H38A2B4
-38A2B4:lI111|H38A31C
-38A31C:lI115|H38A384
-38A384:lI69|H38A3EC
-38A3EC:lI118|H38A444
-38A444:lI101|H38A494
-38A494:lI110|H38A4E4
-38A4E4:lI116|H38A52C
-38A52C:lI68|H38A574
-38A574:lI111|H38A5BC
-38A5BC:lI109|H38A604
-38A604:lI97|H38A64C
-38A64C:lI105|H38A684
-38A684:lI110|H38A6BC
-38A6BC:lI47|H38A6E4
-38A6E4:lI101|H38A6FC
-38A6FC:lI98|H38A714
-38A714:lI105|H38A724
-38A724:lI110|N
-38B0C0:lH388FA4|H38B0C8
-388FA4:lI47|H3890BC
-3890BC:lI99|H3891CC
-3891CC:lI108|H3892DC
-3892DC:lI101|H3893EC
-3893EC:lI97|H3894FC
-3894FC:lI114|H389604
-389604:lI99|H3896FC
-3896FC:lI97|H3897F4
-3897F4:lI115|H3898EC
-3898EC:lI101|H3899E4
-3899E4:lI47|H389AC4
-389AC4:lI111|H389B9C
-389B9C:lI116|H389C64
-389C64:lI112|H389D2C
-389D2C:lI47|H389DF4
-389DF4:lI101|H389EAC
-389EAC:lI114|H389F5C
-389F5C:lI116|H389FFC
-389FFC:lI115|H38A08C
-38A08C:lI47|H38A10C
-38A10C:lI108|H38A17C
-38A17C:lI105|H38A1EC
-38A1EC:lI98|H38A254
-38A254:lI47|H38A2BC
-38A2BC:lI99|H38A324
-38A324:lI111|H38A38C
-38A38C:lI115|H38A3F4
-38A3F4:lI69|H38A44C
-38A44C:lI118|H38A49C
-38A49C:lI101|H38A4EC
-38A4EC:lI110|H38A534
-38A534:lI116|H38A57C
-38A57C:lI47|H38A5C4
-38A5C4:lI101|H38A60C
-38A60C:lI98|H38A654
-38A654:lI105|H38A68C
-38A68C:lI110|N
-38B0C8:lH3890C4|H38B0D0
-3890C4:lI47|H3891D4
-3891D4:lI99|H3892E4
-3892E4:lI108|H3893F4
-3893F4:lI101|H389504
-389504:lI97|H38960C
-38960C:lI114|H389704
-389704:lI99|H3897FC
-3897FC:lI97|H3898F4
-3898F4:lI115|H3899EC
-3899EC:lI101|H389ACC
-389ACC:lI47|H389BA4
-389BA4:lI111|H389C6C
-389C6C:lI116|H389D34
-389D34:lI112|H389DFC
-389DFC:lI47|H389EB4
-389EB4:lI101|H389F64
-389F64:lI114|H38A004
-38A004:lI116|H38A094
-38A094:lI115|H38A114
-38A114:lI47|H38A184
-38A184:lI108|H38A1F4
-38A1F4:lI105|H38A25C
-38A25C:lI98|H38A2C4
-38A2C4:lI47|H38A32C
-38A32C:lI99|H38A394
-38A394:lI111|H38A3FC
-38A3FC:lI109|H38A454
-38A454:lI112|H38A4A4
-38A4A4:lI105|H38A4F4
-38A4F4:lI108|H38A53C
-38A53C:lI101|H38A584
-38A584:lI114|H38A5CC
-38A5CC:lI47|H38A614
-38A614:lI101|H38A65C
-38A65C:lI98|H38A694
-38A694:lI105|H38A6C4
-38A6C4:lI110|N
-38B0D0:lH3891DC|H38B0D8
-3891DC:lI47|H3892EC
-3892EC:lI99|H3893FC
-3893FC:lI108|H38950C
-38950C:lI101|H389614
-389614:lI97|H38970C
-38970C:lI114|H389804
-389804:lI99|H3898FC
-3898FC:lI97|H3899F4
-3899F4:lI115|H389AD4
-389AD4:lI101|H389BAC
-389BAC:lI47|H389C74
-389C74:lI111|H389D3C
-389D3C:lI116|H389E04
-389E04:lI112|H389EBC
-389EBC:lI47|H389F6C
-389F6C:lI101|H38A00C
-38A00C:lI114|H38A09C
-38A09C:lI116|H38A11C
-38A11C:lI115|H38A18C
-38A18C:lI47|H38A1FC
-38A1FC:lI108|H38A264
-38A264:lI105|H38A2CC
-38A2CC:lI98|H38A334
-38A334:lI47|H38A39C
-38A39C:lI97|H38A404
-38A404:lI115|H38A45C
-38A45C:lI110|H38A4AC
-38A4AC:lI49|H38A4FC
-38A4FC:lI47|H38A544
-38A544:lI101|H38A58C
-38A58C:lI98|H38A5D4
-38A5D4:lI105|H38A61C
-38A61C:lI110|N
-38B0D8:lH3892F4|H38B0E0
-3892F4:lI47|H389404
-389404:lI99|H389514
-389514:lI108|H38961C
-38961C:lI101|H389714
-389714:lI97|H38980C
-38980C:lI114|H389904
-389904:lI99|H3899FC
-3899FC:lI97|H389ADC
-389ADC:lI115|H389BB4
-389BB4:lI101|H389C7C
-389C7C:lI47|H389D44
-389D44:lI111|H389E0C
-389E0C:lI116|H389EC4
-389EC4:lI112|H389F74
-389F74:lI47|H38A014
-38A014:lI101|H38A0A4
-38A0A4:lI114|H38A124
-38A124:lI116|H38A194
-38A194:lI115|H38A204
-38A204:lI47|H38A26C
-38A26C:lI108|H38A2D4
-38A2D4:lI105|H38A33C
-38A33C:lI98|H38A3A4
-38A3A4:lI47|H38A40C
-38A40C:lI97|H38A464
-38A464:lI112|H38A4B4
-38A4B4:lI112|H38A504
-38A504:lI109|H38A54C
-38A54C:lI111|H38A594
-38A594:lI110|H38A5DC
-38A5DC:lI47|H38A624
-38A624:lI101|H38A664
-38A664:lI98|H38A69C
-38A69C:lI105|H38A6CC
-38A6CC:lI110|N
-38B0E0:lH38AA88|H38B0E8
-38AA88:lI47|H38AA90
-38AA90:lI104|H38AA98
-38AA98:lI111|H38AAA0
-38AAA0:lI109|H38AAA8
-38AAA8:lI101|H38AAB0
-38AAB0:lI47|H38AAB8
-38AAB8:lI115|H38AAC0
-38AAC0:lI105|H38AAC8
-38AAC8:lI114|H38AAD0
-38AAD0:lI105|H38AAD8
-38AAD8:lI47|H38AAE0
-38AAE0:lI101|H38AAE8
-38AAE8:lI114|H38AAF0
-38AAF0:lI108|H38AAF8
-38AAF8:lI97|H38AB00
-38AB00:lI110|H38AB08
-38AB08:lI103|N
-38B0E8:lH38AB1C|H38B0F0
-38AB1C:lI47|H38AB2C
-38AB2C:lI104|H38AB4C
-38AB4C:lI111|H38AB74
-38AB74:lI109|H38ABA4
-38ABA4:lI101|H38ABC4
-38ABC4:lI47|H38ABE4
-38ABE4:lI115|H38AC04
-38AC04:lI105|H38AC24
-38AC24:lI114|H38AC3C
-38AC3C:lI105|H38AC44
-38AC44:lI47|H38AC4C
-38AC4C:lI116|H38AC54
-38AC54:lI111|H38AC5C
-38AC5C:lI111|H38AC64
-38AC64:lI108|H38AC6C
-38AC6C:lI115|H38AC74
-38AC74:lI47|H38AC7C
-38AC7C:lI100|H38AC84
-38AC84:lI105|H38AC8C
-38AC8C:lI115|H38AC94
-38AC94:lI116|H38AC9C
-38AC9C:lI101|H38ACA4
-38ACA4:lI108|H38ACAC
-38ACAC:lI47|H38ACB4
-38ACB4:lI101|H38ACBC
-38ACBC:lI98|H38ACC4
-38ACC4:lI105|H38ACCC
-38ACCC:lI110|N
-38B0F0:lH38B0F8|N
-38B0F8:lI47|H38B100
-38B100:lI104|H38B108
-38B108:lI111|H38B110
-38B110:lI109|H38B118
-38B118:lI101|H38B120
-38B120:lI47|H38B128
-38B128:lI115|H38B130
-38B130:lI105|H38B138
-38B138:lI114|H38B140
-38B140:lI105|H38B148
-38B148:lI47|H38B150
-38B150:lI79|H38B158
-38B158:lI84|H38B160
-38B160:lI80|H38B168
-38B168:lI47|H38B170
-38B170:lI103|H38B178
-38B178:lI112|H38B180
-38B180:lI114|H38B188
-38B188:lI115|H38B190
-38B190:lI95|H38B198
-38B198:lI116|H38B1A0
-38B1A0:lI114|H38B1A8
-38B1A8:lI97|H38B1B0
-38B1B0:lI99|H38B1B8
-38B1B8:lI101|H38B1C0
-38B1C0:lI47|H38B1C8
-38B1C8:lI106|H38B1D0
-38B1D0:lI97|H38B1D8
-38B1D8:lI110|N
-3873BC:lI47|H3873CC
-3873CC:lI99|H3873E4
-3873E4:lI108|H3873FC
-3873FC:lI101|H38741C
-38741C:lI97|H387444
-387444:lI114|H387474
-387474:lI99|H3874AC
-3874AC:lI97|H3874EC
-3874EC:lI115|H387534
-387534:lI101|H387584
-387584:lI47|H3875DC
-3875DC:lI111|H38763C
-38763C:lI116|H3876A4
-3876A4:lI112|H387714
-387714:lI47|H38778C
-38778C:lI101|H38780C
-38780C:lI114|H387894
-387894:lI116|H387924
-387924:lI115|N
-=proc_dictionary:<0.19.0>
-H370244
-H370250
-=proc_stack:<0.19.0>
-36b45c:SReturn addr 0x225860 (proc_lib:init_p/5 + 164)
-y0:N
-y1:A8:infinity
-y2:A11:supervisor_bridge
-y3:H36B17C
-y4:P<0.19.0>
-y5:P<0.9.0>
-36b478:SReturn addr 0x156F90 (<terminate process normally>)
-y0:SCatch 0x225860 (proc_lib:init_p/5 + 164)
-y1:A3:gen
-y2:A7:init_it
-y3:H37025C
-=proc_heap:<0.19.0>
-36B17C:t5:A5:state,A8:user_sup,P<0.21.0>,P<0.21.0>,H370238
-370238:t2:P<0.19.0>,A8:user_sup
-37025C:lAA:gen_server|H37027C
-37027C:lP<0.9.0>|H37028C
-37028C:lP<0.9.0>|H370294
-370294:lA11:supervisor_bridge|H37029C
-37029C:lH3702A4|H3702AC
-3702A4:lA8:user_sup|H3702B4
-3702B4:lN|H3702BC
-3702BC:lA4:self|N
-3702AC:lN|N
-370244:t2:AD:$initial_call,H370264
-370264:t3:A3:gen,A7:init_it,H37025C
-370250:t2:AA:$ancestors,H370274
-370274:lAA:kernel_sup|H370284
-370284:lP<0.8.0>|N
-=proc_dictionary:<0.20.0>
-H36F8A8
-=proc_stack:<0.20.0>
-36a714:SReturn addr 0x156F90 (<terminate process normally>)
-y0:N
-y1:N
-y2:H36F8C4
-y3:P<0.21.0>
-y4:P<0.22.0>
-y5:p<0.72>
-y6:p<0.72>
-=proc_heap:<0.20.0>
-36F8C4:t4:I3,I2,P<0.22.0>,H36F8F0
-36F8F0:lH36F900|H36F910
-36F900:t3:I1,P<0.21.0>,H36F920
-36F920:t0:
-36F910:lH36F924|N
-36F924:t3:I2,P<0.22.0>,H36F93C
-36F93C:t3:A5:shell,A5:start,N
-36F8A8:t2:A3:eof,A5:false
-=proc_dictionary:<0.21.0>
-H3709DC
-H3709D0
-H3709F8
-=proc_stack:<0.21.0>
-370d1c:SReturn addr 0x156F90 (<terminate process normally>)
-y0:N
-y1:A9:undefined
-y2:P<0.20.0>
-=proc_heap:<0.21.0>
-3709DC:t2:AB:line_buffer,N
-3709D0:t2:AB:kill_buffer,N
-3709F8:t2:A9:read_mode,A4:list
-=proc_dictionary:<0.22.0>
-H370D44
-H370D60
-H370D7C
-H370D38
-=proc_stack:<0.22.0>
-374a88:SReturn addr 0x2CE718 (group:get_chars_loop/7 + 80)
-y0:N
-y1:N
-y2:A8:infinity
-y3:H374A00
-y4:P<0.20.0>
-y5:H374A28
-374aa4:SReturn addr 0x2CDC18 (group:io_request/5 + 48)
-y0:H37499C
-y1:A6:io_lib
-y2:A9:get_until
-y3:H3748B8
-y4:P<0.20.0>
-y5:A5:start
-374ac0:SReturn addr 0x2CDB2C (group:server_loop/3 + 372)
-y0:P<0.49.0>
-y1:P<0.22.0>
-374acc:SReturn addr 0x156F90 (<terminate process normally>)
-y0:N
-y1:P<0.25.0>
-y2:P<0.20.0>
-=proc_heap:<0.22.0>
-374A00:t4:A4:line,H37499C,H3749A4,A4:none
-3749A4:t2:N,N
-37499C:lI50|H374994
-374994:lI62|H37498C
-37498C:lI32|N
-374A28:t4:A5:stack,H370D58,H374A24,N
-374A24:t0:
-370D58:lH370D74|N
-370D74:lI99|H370D88
-370D88:lI114|H370D90
-370D90:lI97|H370D98
-370D98:lI115|H370DA0
-370DA0:lI104|H370DA8
-370DA8:lI100|H370DB0
-370DB0:lI117|H370DB8
-370DB8:lI109|H370DC0
-370DC0:lI112|H370DC8
-370DC8:lI95|H370DD0
-370DD0:lI118|H370DD8
-370DD8:lI105|H370DE0
-370DE0:lI101|H370DE8
-370DE8:lI119|H370DF0
-370DF0:lI101|H370DF8
-370DF8:lI114|H370E00
-370E00:lI58|H370E08
-370E08:lI115|H370E10
-370E10:lI116|H370E18
-370E18:lI97|H370E20
-370E20:lI114|H370E28
-370E28:lI116|H370E30
-370E30:lI40|H370E38
-370E38:lI41|H370E40
-370E40:lI46|H370E48
-370E48:lI10|N
-3748B8:t3:A8:erl_scan,A6:tokens,H3748B0
-3748B0:lI1|N
-370D44:t2:AB:line_buffer,H370D58
-370D60:t2:A5:shell,P<0.25.0>
-370D7C:t2:AB:kill_buffer,N
-370D38:t2:A9:read_mode,A4:list
-=proc_dictionary:<0.23.0>
-H376464
-H376448
-=proc_stack:<0.23.0>
-376754:SReturn addr 0x225860 (proc_lib:init_p/5 + 164)
-y0:N
-y1:A8:infinity
-y2:AD:kernel_config
-y3:N
-y4:P<0.23.0>
-y5:P<0.9.0>
-376770:SReturn addr 0x156F90 (<terminate process normally>)
-y0:SCatch 0x225860 (proc_lib:init_p/5 + 164)
-y1:A3:gen
-y2:A7:init_it
-y3:H376418
-=proc_heap:<0.23.0>
-376418:lAA:gen_server|H376410
-376410:lP<0.9.0>|H376408
-376408:lP<0.9.0>|H376400
-376400:lAD:kernel_config|H3763F8
-3763F8:lN|H3763F0
-3763F0:lN|N
-376464:t2:AD:$initial_call,H376454
-376454:t3:A3:gen,A7:init_it,H376418
-376448:t2:AA:$ancestors,H376440
-376440:lAA:kernel_sup|H376420
-376420:lP<0.8.0>|N
-=proc_dictionary:<0.24.0>
-H3705E0
-H3705EC
-=proc_stack:<0.24.0>
-36f38c:SReturn addr 0x225860 (proc_lib:init_p/5 + 164)
-y0:N
-y1:A8:infinity
-y2:AA:supervisor
-y3:H36F018
-y4:AF:kernel_safe_sup
-y5:P<0.9.0>
-36f3a8:SReturn addr 0x156F90 (<terminate process normally>)
-y0:SCatch 0x225860 (proc_lib:init_p/5 + 164)
-y1:A3:gen
-y2:A7:init_it
-y3:H37063C
-=proc_heap:<0.24.0>
-36F018:tA:A5:state,H370644,AB:one_for_one,H36F044,N,I4,I3600,N,A6:kernel,A4:safe
-36F044:lH36F04C|N
-36F04C:t8:A5:child,P<0.31.0>,A17:inet_gethost_native_sup,H370650,A9:temporary,I1000,A6:worker,H370660
-370660:lA13:inet_gethost_native|N
-370650:t3:A13:inet_gethost_native,AA:start_link,N
-370644:t2:A5:local,AF:kernel_safe_sup
-37063C:lAA:gen_server|H3706AC
-3706AC:lP<0.9.0>|H3706BC
-3706BC:lP<0.9.0>|H3706C4
-3706C4:lH3706CC|H3706D8
-3706CC:t2:A5:local,AF:kernel_safe_sup
-3706D8:lAA:supervisor|H3706E0
-3706E0:lH3706E8|H3706F8
-3706E8:t3:H370644,A6:kernel,A4:safe
-3706F8:lN|N
-3705E0:t2:AD:$initial_call,H370668
-370668:t3:A3:gen,A7:init_it,H37063C
-3705EC:t2:AA:$ancestors,H370678
-370678:lAA:kernel_sup|H3706B4
-3706B4:lP<0.8.0>|N
-=proc_dictionary:<0.25.0>
-H36E304
-H36E31C
-=proc_stack:<0.25.0>
-36e610:SReturn addr 0x2E06FC (shell:server_loop/6 + 140)
-y0:N
-y1:N
-y2:P<0.27.0>
-y3:P<0.49.0>
-36e624:SReturn addr 0x156F90 (<terminate process normally>)
-y0:N
-y1:N
-y2:I2
-y3:I1
-y4:N
-y5:N
-y6:N
-y7:I20
-y8:I20
-=proc_heap:<0.25.0>
-36E304:t2:H36E2F8,H36E2A8
-36E2A8:lH36E2B0|N
-36E2B0:t4:A4:call,I1,H36E2C4,N
-36E2C4:t4:A6:remote,I1,H36E2D8,H36E2E8
-36E2E8:t3:A4:atom,I1,A5:start
-36E2D8:t3:A4:atom,I1,A10:crashdump_viewer
-36E2F8:t2:A7:command,I1
-36E31C:t2:H36E310,A2:ok
-36E310:t2:A6:result,I1
-=proc_stack:<0.27.0>
-3bda3c:SReturn addr 0x156F90 (<terminate process normally>)
-y0:N
-y1:N
-y2:P<0.25.0>
-=proc_heap:<0.27.0>
-=proc_dictionary:<0.31.0>
-H36DA24
-H36DA08
-=proc_stack:<0.31.0>
-36dcd4:SReturn addr 0x225860 (proc_lib:init_p/5 + 164)
-y0:N
-y1:A8:infinity
-y2:A11:supervisor_bridge
-y3:H36DB68
-y4:A17:inet_gethost_native_sup
-y5:P<0.24.0>
-36dcf0:SReturn addr 0x156F90 (<terminate process normally>)
-y0:SCatch 0x225860 (proc_lib:init_p/5 + 164)
-y1:A3:gen
-y2:A7:init_it
-y3:H36D9D0
-=proc_heap:<0.31.0>
-36DB68:t5:A5:state,A13:inet_gethost_native,P<0.32.0>,P<0.32.0>,H36D994
-36D994:t2:A5:local,A17:inet_gethost_native_sup
-36D9D0:lAA:gen_server|H36D9C8
-36D9C8:lP<0.24.0>|H36D9C0
-36D9C0:lP<0.24.0>|H36D970
-36D970:lH36D980|H36D9B8
-36D980:t2:A5:local,A17:inet_gethost_native_sup
-36D9B8:lA11:supervisor_bridge|H36D978
-36D978:lH36D9A8|H36D9B0
-36D9A8:lA13:inet_gethost_native|H36D9A0
-36D9A0:lN|H36D98C
-36D98C:lH36D994|N
-36D9B0:lN|N
-36DA24:t2:AD:$initial_call,H36DA14
-36DA14:t3:A3:gen,A7:init_it,H36D9D0
-36DA08:t2:AA:$ancestors,H36DA00
-36DA00:lAF:kernel_safe_sup|H36D9E0
-36D9E0:lAA:kernel_sup|H36D9D8
-36D9D8:lP<0.8.0>|N
-=proc_dictionary:<0.32.0>
-H36CFD4
-H36D0BC
-=proc_stack:<0.32.0>
-36d12c:SReturn addr 0x156F90 (<terminate process normally>)
-y0:H36CF18
-=proc_heap:<0.32.0>
-36CF18:t8:A5:state,p<0.105>,I8000,I11,I12,P<0.31.0>,I4,H36CEF0
-36CEF0:t9:AA:statistics,I0,I0,I0,I0,I0,I0,I0,I0
-36CFD4:t2:A3:rid,I1
-36D0BC:t2:AC:num_requests,I0
-=proc_dictionary:<0.33.0>
-H3905C4
-H3905D0
-=proc_stack:<0.33.0>
-3ceee4:SReturn addr 0x225860 (proc_lib:init_p/5 + 164)
-y0:N
-y1:A8:infinity
-y2:A7:webtool
-y3:H3C8570
-y4:A8:web_tool
-y5:P<0.33.0>
-3cef00:SReturn addr 0x156F90 (<terminate process normally>)
-y0:SCatch 0x225860 (proc_lib:init_p/5 + 164)
-y1:A3:gen
-y2:A7:init_it
-y3:H3905FC
-=proc_heap:<0.33.0>
-3C8570:t6:A5:state,H3905EC,I13,P<0.41.0>,H3905F4,H3C85D4
-3C85D4:lA10:crashdump_viewer|N
-3905F4:lH390650|H39065C
-390650:t2:A4:port,I8888
-39065C:lH3906C8|H3906D4
-3906C8:t2:AC:bind_address,H390760
-390760:t4:I127,I0,I0,I1
-3906D4:lH390774|H390780
-390774:t2:AB:server_name,H39082C
-39082C:lI108|H390908
-390908:lI111|H3909DC
-3909DC:lI99|H390AC0
-390AC0:lI97|H390B98
-390B98:lI108|H390C78
-390C78:lI104|H390D58
-390D58:lI111|H390E2C
-390E2C:lI115|H390F10
-390F10:lI116|N
-390780:lH390834|H390840
-390834:t2:AE:max_header_siz,I1024
-390840:lH390910|H39091C
-390910:t2:A11:max_header_action,A8:reply414
-39091C:lH3909E4|H3909F0
-3909E4:t2:A8:com_type,A7:ip_comm
-3909F0:lH390AC8|H390AD4
-390AC8:t2:A7:modules,H390BA0
-390BA0:lA9:mod_alias|H390C80
-390C80:lA8:mod_auth|H390D60
-390D60:lA7:mod_esi|H390E34
-390E34:lAB:mod_actions|H390F18
-390F18:lA7:mod_cgi|H390FF4
-390FF4:lAB:mod_include|H3910D8
-3910D8:lA7:mod_dir|H3911B4
-3911B4:lA7:mod_get|H3912A0
-3912A0:lA8:mod_head|H39139C
-39139C:lA7:mod_log|H3914A0
-3914A0:lAC:mod_disk_log|N
-390AD4:lH390BA8|H390BB4
-390BA8:t2:AF:directory_index,H390C88
-390C88:lH390D68|N
-390D68:lI105|H390E3C
-390E3C:lI110|H390F20
-390F20:lI100|H390FFC
-390FFC:lI101|H3910E0
-3910E0:lI120|H3911BC
-3911BC:lI46|H3912A8
-3912A8:lI104|H3913A4
-3913A4:lI116|H3914A8
-3914A8:lI109|H39159C
-39159C:lI108|N
-390BB4:lH390C90|N
-390C90:t2:AC:default_type,H390D70
-390D70:lI116|H390E44
-390E44:lI101|H390F28
-390F28:lI120|H391004
-391004:lI116|H3910E8
-3910E8:lI47|H3911C4
-3911C4:lI112|H3912B0
-3912B0:lI108|H3913AC
-3913AC:lI97|H3914B0
-3914B0:lI105|H3915A4
-3915A4:lI110|N
-3905EC:lI47|H390648
-390648:lI99|H3906C0
-3906C0:lI108|H390758
-390758:lI101|H390824
-390824:lI97|H390900
-390900:lI114|H3909D4
-3909D4:lI99|H390AB8
-390AB8:lI97|H390B90
-390B90:lI115|H390C70
-390C70:lI101|H390D50
-390D50:lI47|H390E24
-390E24:lI111|H390F08
-390F08:lI116|H390FEC
-390FEC:lI112|H3910D0
-3910D0:lI47|H3911AC
-3911AC:lI101|H391298
-391298:lI114|H391394
-391394:lI116|H391498
-391498:lI115|H391594
-391594:lI47|H391680
-391680:lI108|H39175C
-39175C:lI105|H391840
-391840:lI98|H391924
-391924:lI47|H3919F8
-3919F8:lI119|H391AC4
-391AC4:lI101|H391B90
-391B90:lI98|H391C54
-391C54:lI116|H391D18
-391D18:lI111|H391DD4
-391DD4:lI111|H391E90
-391E90:lI108|H391F5C
-391F5C:lI47|H392030
-392030:lI112|H3920EC
-3920EC:lI114|H3921A8
-3921A8:lI105|H392264
-392264:lI118|N
-3905FC:lAA:gen_server|H390664
-390664:lP<0.27.0>|H3906DC
-3906DC:lA4:self|H390788
-390788:lH390848|H390854
-390848:t2:A5:local,A8:web_tool
-390854:lA7:webtool|H390924
-390924:lH3909F8|H390A04
-3909F8:t2:H3905EC,H3905F4
-390A04:lN|N
-3905C4:t2:AD:$initial_call,H390614
-390614:t3:A3:gen,A7:init_it,H3905FC
-3905D0:t2:AA:$ancestors,H390624
-390624:lP<0.27.0>|N
-=proc_dictionary:<0.41.0>
-H36DF0C
-H36DF18
-=proc_stack:<0.41.0>
-36eda4:SReturn addr 0x225860 (proc_lib:init_p/5 + 164)
-y0:N
-y1:A8:infinity
-y2:AA:supervisor
-y3:H36EA3C
-y4:A6:websup
-y5:P<0.33.0>
-36edc0:SReturn addr 0x156F90 (<terminate process normally>)
-y0:SCatch 0x225860 (proc_lib:init_p/5 + 164)
-y1:A3:gen
-y2:A7:init_it
-y3:H36DF24
-=proc_heap:<0.41.0>
-36EA3C:tA:A5:state,H36DF2C,AB:one_for_one,H36EA68,N,I100,I10,N,AB:webtool_sup,N
-36EA68:lH36EA70|N
-36EA70:t8:A5:child,P<0.48.0>,H36DF38,H36DF44,A9:permanent,I100,A6:worker,H36DF54
-36DF54:lA10:crashdump_viewer|N
-36DF44:t3:A10:crashdump_viewer,AA:start_link,N
-36DF38:t2:A5:local,A17:crashdump_viewer_server
-36DF2C:t2:A5:local,A6:websup
-36DF24:lAA:gen_server|H36DF84
-36DF84:lP<0.33.0>|H36DF94
-36DF94:lP<0.33.0>|H36DF9C
-36DF9C:lH36DFA4|H36DFB0
-36DFA4:t2:A5:local,A6:websup
-36DFB0:lAA:supervisor|H36DFB8
-36DFB8:lH36DFC0|H36DFD0
-36DFC0:t3:H36DF2C,AB:webtool_sup,N
-36DFD0:lN|N
-36DF0C:t2:AD:$initial_call,H36DF6C
-36DF6C:t3:A3:gen,A7:init_it,H36DF24
-36DF18:t2:AA:$ancestors,H36DF7C
-36DF7C:lA8:web_tool|H36DF8C
-36DF8C:lP<0.27.0>|N
-=proc_dictionary:<0.43.0>
-H39D940
-H39D94C
-=proc_stack:<0.43.0>
-3a42ac:SReturn addr 0x225860 (proc_lib:init_p/5 + 164)
-y0:N
-y1:A8:infinity
-y2:AA:supervisor
-y3:H3A3E34
-y4:A1A:httpd_sup__127_0_0_1__8888
-y5:P<0.33.0>
-3a42c8:SReturn addr 0x156F90 (<terminate process normally>)
-y0:SCatch 0x225860 (proc_lib:init_p/5 + 164)
-y1:A3:gen
-y2:A7:init_it
-y3:H39D9CC
-=proc_heap:<0.43.0>
-3A3E34:tA:A5:state,H39D960,AB:one_for_one,H3A3E20,N,I0,I1,N,A9:httpd_sup,H39DA88
-39DA88:lA9:undefined|H39DB18
-39DB18:lH39DB50|H39DB58
-39DB50:lH39DB88|H39DB94
-39DB88:t2:AB:server_root,H39DBD0
-39DBD0:lI47|H39DC0C
-39DC0C:lI99|H39DC50
-39DC50:lI108|H39DC84
-39DC84:lI101|H39DCC4
-39DCC4:lI97|H39DD28
-39DD28:lI114|H39DD90
-39DD90:lI99|H39DE00
-39DE00:lI97|H39DE78
-39DE78:lI115|H39DF00
-39DF00:lI101|H39DF90
-39DF90:lI47|H39E038
-39E038:lI111|H39E0E8
-39E0E8:lI116|H39E1AC
-39E1AC:lI112|H39E288
-39E288:lI47|H39E37C
-39E37C:lI101|H39E478
-39E478:lI114|H39E580
-39E580:lI116|H39E69C
-39E69C:lI115|H39E7B0
-39E7B0:lI47|H39E8C4
-39E8C4:lI108|H39E9D8
-39E9D8:lI105|H39EACC
-39EACC:lI98|H39EBC0
-39EBC0:lI47|H39ECB4
-39ECB4:lI119|H39EDA8
-39EDA8:lI101|H39EE7C
-39EE7C:lI98|H39EF50
-39EF50:lI116|H39F02C
-39F02C:lI111|H39F110
-39F110:lI111|H39F1E4
-39F1E4:lI108|H39F2B0
-39F2B0:lI47|H39F36C
-39F36C:lI112|H39F430
-39F430:lI114|H39F4FC
-39F4FC:lI105|H39F5C0
-39F5C0:lI118|H39F694
-39F694:lI47|H39F768
-39F768:lI114|H39F83C
-39F83C:lI111|H39F920
-39F920:lI111|H39F9FC
-39F9FC:lI116|N
-39DB94:lH39DBD8|H39DBE4
-39DBD8:t2:AD:document_root,H39DC14
-39DC14:lI47|H39DC58
-39DC58:lI99|H39DC8C
-39DC8C:lI108|H39DCCC
-39DCCC:lI101|H39DD30
-39DD30:lI97|H39DD98
-39DD98:lI114|H39DE08
-39DE08:lI99|H39DE80
-39DE80:lI97|H39DF08
-39DF08:lI115|H39DF98
-39DF98:lI101|H39E040
-39E040:lI47|H39E0F0
-39E0F0:lI111|H39E1B4
-39E1B4:lI116|H39E290
-39E290:lI112|H39E384
-39E384:lI47|H39E480
-39E480:lI101|H39E588
-39E588:lI114|H39E6A4
-39E6A4:lI116|H39E7B8
-39E7B8:lI115|H39E8CC
-39E8CC:lI47|H39E9E0
-39E9E0:lI108|H39EAD4
-39EAD4:lI105|H39EBC8
-39EBC8:lI98|H39ECBC
-39ECBC:lI47|H39EDB0
-39EDB0:lI119|H39EE84
-39EE84:lI101|H39EF58
-39EF58:lI98|H39F034
-39F034:lI116|H39F118
-39F118:lI111|H39F1EC
-39F1EC:lI111|H39F2B8
-39F2B8:lI108|H39F374
-39F374:lI47|H39F438
-39F438:lI112|H39F504
-39F504:lI114|H39F5C8
-39F5C8:lI105|H39F69C
-39F69C:lI118|H39F770
-39F770:lI47|H39F844
-39F844:lI114|H39F928
-39F928:lI111|H39FA04
-39FA04:lI111|H39FAD8
-39FAD8:lI116|H39FBB4
-39FBB4:lI47|H39FC80
-39FC80:lI100|H39FD44
-39FD44:lI111|H39FE10
-39FE10:lI99|N
-39DBE4:lH39DC1C|H39DC28
-39DC1C:t2:AA:mime_types,H39DC60
-39DC60:lH39DC94|H39DCA0
-39DC94:t2:H39DCD4,H39DCDC
-39DCDC:lI120|H39DD40
-39DD40:lI45|H39DDA8
-39DDA8:lI119|H39DE10
-39DE10:lI111|H39DE88
-39DE88:lI114|H39DF10
-39DF10:lI108|H39DFA0
-39DFA0:lI100|H39E048
-39E048:lI47|H39E0F8
-39E0F8:lI120|H39E1BC
-39E1BC:lI45|H39E298
-39E298:lI118|H39E38C
-39E38C:lI114|H39E488
-39E488:lI109|H39E590
-39E590:lI108|N
-39DCD4:lI119|H39DD38
-39DD38:lI114|H39DDA0
-39DDA0:lI108|N
-39DCA0:lH39DCE4|H39DCF0
-39DCE4:t2:H39DD48,H39DD50
-39DD50:lI120|H39DDB8
-39DDB8:lI45|H39DE20
-39DE20:lI119|H39DE98
-39DE98:lI111|H39DF18
-39DF18:lI114|H39DFA8
-39DFA8:lI108|H39E050
-39E050:lI100|H39E100
-39E100:lI47|H39E1C4
-39E1C4:lI120|H39E2A0
-39E2A0:lI45|H39E394
-39E394:lI118|H39E490
-39E490:lI114|H39E598
-39E598:lI109|H39E6AC
-39E6AC:lI108|N
-39DD48:lI118|H39DDB0
-39DDB0:lI114|H39DE18
-39DE18:lI109|H39DE90
-39DE90:lI108|N
-39DCF0:lH39DD58|H39DD64
-39DD58:t2:H39DDC0,H39DDC8
-39DDC8:lI120|H39DE30
-39DE30:lI45|H39DEA8
-39DEA8:lI99|H39DF20
-39DF20:lI111|H39DFB0
-39DFB0:lI110|H39E058
-39E058:lI102|H39E108
-39E108:lI101|H39E1CC
-39E1CC:lI114|H39E2A8
-39E2A8:lI101|H39E39C
-39E39C:lI110|H39E498
-39E498:lI99|H39E5A0
-39E5A0:lI101|H39E6B4
-39E6B4:lI47|H39E7C0
-39E7C0:lI120|H39E8D4
-39E8D4:lI45|H39E9E8
-39E9E8:lI99|H39EADC
-39EADC:lI111|H39EBD0
-39EBD0:lI111|H39ECC4
-39ECC4:lI108|H39EDB8
-39EDB8:lI116|H39EE8C
-39EE8C:lI97|H39EF60
-39EF60:lI108|H39F03C
-39F03C:lI107|N
-39DDC0:lI105|H39DE28
-39DE28:lI99|H39DEA0
-39DEA0:lI101|N
-39DD64:lH39DDD0|H39DDDC
-39DDD0:t2:H39DE38,H39DE40
-39DE40:lI118|H39DEB8
-39DEB8:lI105|H39DF30
-39DF30:lI100|H39DFC0
-39DFC0:lI101|H39E068
-39E068:lI111|H39E110
-39E110:lI47|H39E1D4
-39E1D4:lI120|H39E2B0
-39E2B0:lI45|H39E3A4
-39E3A4:lI115|H39E4A0
-39E4A0:lI103|H39E5A8
-39E5A8:lI105|H39E6BC
-39E6BC:lI45|H39E7C8
-39E7C8:lI109|H39E8DC
-39E8DC:lI111|H39E9F0
-39E9F0:lI118|H39EAE4
-39EAE4:lI105|H39EBD8
-39EBD8:lI101|N
-39DE38:lI109|H39DEB0
-39DEB0:lI111|H39DF28
-39DF28:lI118|H39DFB8
-39DFB8:lI105|H39E060
-39E060:lI101|N
-39DDDC:lH39DE48|H39DE54
-39DE48:t2:H39DEC0,H39DEC8
-39DEC8:lI118|H39DF40
-39DF40:lI105|H39DFD0
-39DFD0:lI100|H39E070
-39E070:lI101|H39E118
-39E118:lI111|H39E1DC
-39E1DC:lI47|H39E2B8
-39E2B8:lI120|H39E3AC
-39E3AC:lI45|H39E4A8
-39E4A8:lI109|H39E5B0
-39E5B0:lI115|H39E6C4
-39E6C4:lI118|H39E7D0
-39E7D0:lI105|H39E8E4
-39E8E4:lI100|H39E9F8
-39E9F8:lI101|H39EAEC
-39EAEC:lI111|N
-39DEC0:lI97|H39DF38
-39DF38:lI118|H39DFC8
-39DFC8:lI105|N
-39DE54:lH39DED0|H39DEDC
-39DED0:t2:H39DF48,H39DF50
-39DF50:lI118|H39DFE0
-39DFE0:lI105|H39E078
-39E078:lI100|H39E120
-39E120:lI101|H39E1E4
-39E1E4:lI111|H39E2C0
-39E2C0:lI47|H39E3B4
-39E3B4:lI113|H39E4B0
-39E4B0:lI117|H39E5B8
-39E5B8:lI105|H39E6CC
-39E6CC:lI99|H39E7D8
-39E7D8:lI107|H39E8EC
-39E8EC:lI116|H39EA00
-39EA00:lI105|H39EAF4
-39EAF4:lI109|H39EBE0
-39EBE0:lI101|N
-39DF48:lI113|H39DFD8
-39DFD8:lI116|N
-39DEDC:lH39DF58|H39DF64
-39DF58:t2:H39DFE8,H39DFF0
-39DFF0:lI118|H39E088
-39E088:lI105|H39E130
-39E130:lI100|H39E1EC
-39E1EC:lI101|H39E2C8
-39E2C8:lI111|H39E3BC
-39E3BC:lI47|H39E4B8
-39E4B8:lI113|H39E5C0
-39E5C0:lI117|H39E6D4
-39E6D4:lI105|H39E7E0
-39E7E0:lI99|H39E8F4
-39E8F4:lI107|H39EA08
-39EA08:lI116|H39EAFC
-39EAFC:lI105|H39EBE8
-39EBE8:lI109|H39ECCC
-39ECCC:lI101|N
-39DFE8:lI109|H39E080
-39E080:lI111|H39E128
-39E128:lI118|N
-39DF64:lH39DFF8|H39E004
-39DFF8:t2:H39E090,H39E098
-39E098:lI118|H39E140
-39E140:lI105|H39E1FC
-39E1FC:lI100|H39E2D8
-39E2D8:lI101|H39E3C4
-39E3C4:lI111|H39E4C0
-39E4C0:lI47|H39E5C8
-39E5C8:lI109|H39E6DC
-39E6DC:lI112|H39E7E8
-39E7E8:lI101|H39E8FC
-39E8FC:lI103|N
-39E090:lI109|H39E138
-39E138:lI112|H39E1F4
-39E1F4:lI101|H39E2D0
-39E2D0:lI103|N
-39E004:lH39E0A0|H39E0AC
-39E0A0:t2:H39E148,H39E150
-39E150:lI118|H39E20C
-39E20C:lI105|H39E2E8
-39E2E8:lI100|H39E3CC
-39E3CC:lI101|H39E4C8
-39E4C8:lI111|H39E5D0
-39E5D0:lI47|H39E6E4
-39E6E4:lI109|H39E7F0
-39E7F0:lI112|H39E904
-39E904:lI101|H39EA10
-39EA10:lI103|N
-39E148:lI109|H39E204
-39E204:lI112|H39E2E0
-39E2E0:lI103|N
-39E0AC:lH39E158|H39E164
-39E158:t2:H39E214,H39E21C
-39E21C:lI118|H39E2F8
-39E2F8:lI105|H39E3DC
-39E3DC:lI100|H39E4D0
-39E4D0:lI101|H39E5D8
-39E5D8:lI111|H39E6EC
-39E6EC:lI47|H39E7F8
-39E7F8:lI109|H39E90C
-39E90C:lI112|H39EA18
-39EA18:lI101|H39EB04
-39EB04:lI103|N
-39E214:lI109|H39E2F0
-39E2F0:lI112|H39E3D4
-39E3D4:lI101|N
-39E164:lH39E224|H39E230
-39E224:t2:H39E300,H39E308
-39E308:lI116|H39E3EC
-39E3EC:lI101|H39E4E0
-39E4E0:lI120|H39E5E8
-39E5E8:lI116|H39E6F4
-39E6F4:lI47|H39E800
-39E800:lI120|H39E914
-39E914:lI45|H39EA20
-39EA20:lI115|H39EB0C
-39EB0C:lI103|H39EBF0
-39EBF0:lI109|H39ECD4
-39ECD4:lI108|N
-39E300:lI115|H39E3E4
-39E3E4:lI103|H39E4D8
-39E4D8:lI109|H39E5E0
-39E5E0:lI108|N
-39E230:lH39E310|H39E31C
-39E310:t2:H39E3F4,H39E3FC
-39E3FC:lI116|H39E4F0
-39E4F0:lI101|H39E5F8
-39E5F8:lI120|H39E6FC
-39E6FC:lI116|H39E808
-39E808:lI47|H39E91C
-39E91C:lI120|H39EA28
-39EA28:lI45|H39EB14
-39EB14:lI115|H39EBF8
-39EBF8:lI103|H39ECDC
-39ECDC:lI109|H39EDC0
-39EDC0:lI108|N
-39E3F4:lI115|H39E4E8
-39E4E8:lI103|H39E5F0
-39E5F0:lI109|N
-39E31C:lH39E404|H39E410
-39E404:t2:H39E4F8,H39E500
-39E500:lI116|H39E608
-39E608:lI101|H39E70C
-39E70C:lI120|H39E810
-39E810:lI116|H39E924
-39E924:lI47|H39EA30
-39EA30:lI120|H39EB1C
-39EB1C:lI45|H39EC00
-39EC00:lI115|H39ECE4
-39ECE4:lI101|H39EDC8
-39EDC8:lI116|H39EE94
-39EE94:lI101|H39EF68
-39EF68:lI120|H39F044
-39F044:lI116|N
-39E4F8:lI101|H39E600
-39E600:lI116|H39E704
-39E704:lI120|N
-39E410:lH39E508|H39E514
-39E508:t2:H39E610,H39E618
-39E618:lI116|H39E71C
-39E71C:lI101|H39E820
-39E820:lI120|H39E92C
-39E92C:lI116|H39EA38
-39EA38:lI47|H39EB24
-39EB24:lI116|H39EC08
-39EC08:lI97|H39ECEC
-39ECEC:lI98|H39EDD0
-39EDD0:lI45|H39EE9C
-39EE9C:lI115|H39EF70
-39EF70:lI101|H39F04C
-39F04C:lI112|H39F120
-39F120:lI97|H39F1F4
-39F1F4:lI114|H39F2C0
-39F2C0:lI97|H39F37C
-39F37C:lI116|H39F440
-39F440:lI101|H39F50C
-39F50C:lI100|H39F5D0
-39F5D0:lI45|H39F6A4
-39F6A4:lI118|H39F778
-39F778:lI97|H39F84C
-39F84C:lI108|H39F930
-39F930:lI117|H39FA0C
-39FA0C:lI101|H39FAE0
-39FAE0:lI115|N
-39E610:lI116|H39E714
-39E714:lI115|H39E818
-39E818:lI118|N
-39E514:lH39E620|H39E62C
-39E620:t2:H39E724,H39E72C
-39E72C:lI116|H39E830
-39E830:lI101|H39E93C
-39E93C:lI120|H39EA40
-39EA40:lI116|H39EB2C
-39EB2C:lI47|H39EC10
-39EC10:lI114|H39ECF4
-39ECF4:lI105|H39EDD8
-39EDD8:lI99|H39EEA4
-39EEA4:lI104|H39EF78
-39EF78:lI116|H39F054
-39F054:lI101|H39F128
-39F128:lI120|H39F1FC
-39F1FC:lI116|N
-39E724:lI114|H39E828
-39E828:lI116|H39E934
-39E934:lI120|N
-39E62C:lH39E734|H39E740
-39E734:t2:H39E838,H39E840
-39E840:lI116|H39E94C
-39E94C:lI101|H39EA50
-39EA50:lI120|H39EB34
-39EB34:lI116|H39EC18
-39EC18:lI47|H39ECFC
-39ECFC:lI112|H39EDE0
-39EDE0:lI108|H39EEAC
-39EEAC:lI97|H39EF80
-39EF80:lI105|H39F05C
-39F05C:lI110|N
-39E838:lI116|H39E944
-39E944:lI120|H39EA48
-39EA48:lI116|N
-39E740:lH39E848|H39E854
-39E848:t2:H39E954,H39E95C
-39E95C:lI116|H39EA60
-39EA60:lI101|H39EB44
-39EB44:lI120|H39EC28
-39EC28:lI116|H39ED0C
-39ED0C:lI47|H39EDE8
-39EDE8:lI120|H39EEB4
-39EEB4:lI45|H39EF88
-39EF88:lI115|H39F064
-39F064:lI101|H39F130
-39F130:lI114|H39F204
-39F204:lI118|H39F2C8
-39F2C8:lI101|H39F384
-39F384:lI114|H39F448
-39F448:lI45|H39F514
-39F514:lI112|H39F5D8
-39F5D8:lI97|H39F6AC
-39F6AC:lI114|H39F780
-39F780:lI115|H39F854
-39F854:lI101|H39F938
-39F938:lI100|H39FA14
-39FA14:lI45|H39FAE8
-39FAE8:lI104|H39FBBC
-39FBBC:lI116|H39FC88
-39FC88:lI109|H39FD4C
-39FD4C:lI108|N
-39E954:lI115|H39EA58
-39EA58:lI104|H39EB3C
-39EB3C:lI116|H39EC20
-39EC20:lI109|H39ED04
-39ED04:lI108|N
-39E854:lH39E964|H39E970
-39E964:t2:H39EA68,H39EA70
-39EA70:lI116|H39EB54
-39EB54:lI101|H39EC38
-39EC38:lI120|H39ED1C
-39ED1C:lI116|H39EDF0
-39EDF0:lI47|H39EEBC
-39EEBC:lI104|H39EF90
-39EF90:lI116|H39F06C
-39F06C:lI109|H39F138
-39F138:lI108|N
-39EA68:lI104|H39EB4C
-39EB4C:lI116|H39EC30
-39EC30:lI109|H39ED14
-39ED14:lI108|N
-39E970:lH39EA78|H39EA84
-39EA78:t2:H39EB5C,H39EB64
-39EB64:lI116|H39EC48
-39EC48:lI101|H39ED2C
-39ED2C:lI120|H39EDF8
-39EDF8:lI116|H39EEC4
-39EEC4:lI47|H39EF98
-39EF98:lI104|H39F074
-39F074:lI116|H39F140
-39F140:lI109|H39F20C
-39F20C:lI108|N
-39EB5C:lI104|H39EC40
-39EC40:lI116|H39ED24
-39ED24:lI109|N
-39EA84:lH39EB6C|H39EB78
-39EB6C:t2:H39EC50,H39EC58
-39EC58:lI105|H39ED3C
-39ED3C:lI109|H39EE08
-39EE08:lI97|H39EECC
-39EECC:lI103|H39EFA0
-39EFA0:lI101|H39F07C
-39F07C:lI47|H39F148
-39F148:lI120|H39F214
-39F214:lI45|H39F2D0
-39F2D0:lI120|H39F38C
-39F38C:lI119|H39F450
-39F450:lI105|H39F51C
-39F51C:lI110|H39F5E0
-39F5E0:lI100|H39F6B4
-39F6B4:lI111|H39F788
-39F788:lI119|H39F85C
-39F85C:lI100|H39F940
-39F940:lI117|H39FA1C
-39FA1C:lI109|H39FAF0
-39FAF0:lI112|N
-39EC50:lI120|H39ED34
-39ED34:lI119|H39EE00
-39EE00:lI100|N
-39EB78:lH39EC60|H39EC6C
-39EC60:t2:H39ED44,H39ED4C
-39ED4C:lI105|H39EE18
-39EE18:lI109|H39EEDC
-39EEDC:lI97|H39EFA8
-39EFA8:lI103|H39F084
-39F084:lI101|H39F150
-39F150:lI47|H39F21C
-39F21C:lI120|H39F2D8
-39F2D8:lI45|H39F394
-39F394:lI120|H39F458
-39F458:lI112|H39F524
-39F524:lI105|H39F5E8
-39F5E8:lI120|H39F6BC
-39F6BC:lI109|H39F790
-39F790:lI97|H39F864
-39F864:lI112|N
-39ED44:lI120|H39EE10
-39EE10:lI112|H39EED4
-39EED4:lI109|N
-39EC6C:lH39ED54|H39ED60
-39ED54:t2:H39EE20,H39EE28
-39EE28:lI105|H39EEEC
-39EEEC:lI109|H39EFB8
-39EFB8:lI97|H39F08C
-39F08C:lI103|H39F158
-39F158:lI101|H39F224
-39F224:lI47|H39F2E0
-39F2E0:lI120|H39F39C
-39F39C:lI45|H39F460
-39F460:lI120|H39F52C
-39F52C:lI98|H39F5F0
-39F5F0:lI105|H39F6C4
-39F6C4:lI116|H39F798
-39F798:lI109|H39F86C
-39F86C:lI97|H39F948
-39F948:lI112|N
-39EE20:lI120|H39EEE4
-39EEE4:lI98|H39EFB0
-39EFB0:lI109|N
-39ED60:lH39EE30|H39EE3C
-39EE30:t2:H39EEF4,H39EEFC
-39EEFC:lI105|H39EFC8
-39EFC8:lI109|H39F09C
-39F09C:lI97|H39F160
-39F160:lI103|H39F22C
-39F22C:lI101|H39F2E8
-39F2E8:lI47|H39F3A4
-39F3A4:lI120|H39F468
-39F468:lI45|H39F534
-39F534:lI114|H39F5F8
-39F5F8:lI103|H39F6CC
-39F6CC:lI98|N
-39EEF4:lI114|H39EFC0
-39EFC0:lI103|H39F094
-39F094:lI98|N
-39EE3C:lH39EF04|H39EF10
-39EF04:t2:H39EFD0,H39EFD8
-39EFD8:lI105|H39F0AC
-39F0AC:lI109|H39F170
-39F170:lI97|H39F234
-39F234:lI103|H39F2F0
-39F2F0:lI101|H39F3AC
-39F3AC:lI47|H39F470
-39F470:lI120|H39F53C
-39F53C:lI45|H39F600
-39F600:lI112|H39F6D4
-39F6D4:lI111|H39F7A0
-39F7A0:lI114|H39F874
-39F874:lI116|H39F950
-39F950:lI97|H39FA24
-39FA24:lI98|H39FAF8
-39FAF8:lI108|H39FBC4
-39FBC4:lI101|H39FC90
-39FC90:lI45|H39FD54
-39FD54:lI112|H39FE18
-39FE18:lI105|H39FECC
-39FECC:lI120|H39FF88
-39FF88:lI109|H3A003C
-3A003C:lI97|H3A00E8
-3A00E8:lI112|N
-39EFD0:lI112|H39F0A4
-39F0A4:lI112|H39F168
-39F168:lI109|N
-39EF10:lH39EFE0|H39EFEC
-39EFE0:t2:H39F0B4,H39F0BC
-39F0BC:lI105|H39F180
-39F180:lI109|H39F244
-39F244:lI97|H39F2F8
-39F2F8:lI103|H39F3B4
-39F3B4:lI101|H39F478
-39F478:lI47|H39F544
-39F544:lI120|H39F608
-39F608:lI45|H39F6DC
-39F6DC:lI112|H39F7A8
-39F7A8:lI111|H39F87C
-39F87C:lI114|H39F958
-39F958:lI116|H39FA2C
-39FA2C:lI97|H39FB00
-39FB00:lI98|H39FBCC
-39FBCC:lI108|H39FC98
-39FC98:lI101|H39FD5C
-39FD5C:lI45|H39FE20
-39FE20:lI103|H39FED4
-39FED4:lI114|H39FF90
-39FF90:lI97|H3A0044
-3A0044:lI121|H3A00F0
-3A00F0:lI109|H3A0194
-3A0194:lI97|H3A0248
-3A0248:lI112|N
-39F0B4:lI112|H39F178
-39F178:lI103|H39F23C
-39F23C:lI109|N
-39EFEC:lH39F0C4|H39F0D0
-39F0C4:t2:H39F188,H39F190
-39F190:lI105|H39F254
-39F254:lI109|H39F308
-39F308:lI97|H39F3BC
-39F3BC:lI103|H39F480
-39F480:lI101|H39F54C
-39F54C:lI47|H39F610
-39F610:lI120|H39F6E4
-39F6E4:lI45|H39F7B0
-39F7B0:lI112|H39F884
-39F884:lI111|H39F960
-39F960:lI114|H39FA34
-39FA34:lI116|H39FB08
-39FB08:lI97|H39FBD4
-39FBD4:lI98|H39FCA0
-39FCA0:lI108|H39FD64
-39FD64:lI101|H39FE28
-39FE28:lI45|H39FEDC
-39FEDC:lI98|H39FF98
-39FF98:lI105|H3A004C
-3A004C:lI116|H3A00F8
-3A00F8:lI109|H3A019C
-3A019C:lI97|H3A0250
-3A0250:lI112|N
-39F188:lI112|H39F24C
-39F24C:lI98|H39F300
-39F300:lI109|N
-39F0D0:lH39F198|H39F1A4
-39F198:t2:H39F25C,H39F264
-39F264:lI105|H39F318
-39F318:lI109|H39F3CC
-39F3CC:lI97|H39F488
-39F488:lI103|H39F554
-39F554:lI101|H39F618
-39F618:lI47|H39F6EC
-39F6EC:lI120|H39F7B8
-39F7B8:lI45|H39F88C
-39F88C:lI112|H39F968
-39F968:lI111|H39FA3C
-39FA3C:lI114|H39FB10
-39FB10:lI116|H39FBDC
-39FBDC:lI97|H39FCA8
-39FCA8:lI98|H39FD6C
-39FD6C:lI108|H39FE30
-39FE30:lI101|H39FEE4
-39FEE4:lI45|H39FFA0
-39FFA0:lI97|H3A0054
-3A0054:lI110|H3A0100
-3A0100:lI121|H3A01A4
-3A01A4:lI109|H3A0258
-3A0258:lI97|H3A0304
-3A0304:lI112|N
-39F25C:lI112|H39F310
-39F310:lI110|H39F3C4
-39F3C4:lI109|N
-39F1A4:lH39F26C|H39F278
-39F26C:t2:H39F320,H39F328
-39F328:lI105|H39F3DC
-39F3DC:lI109|H39F498
-39F498:lI97|H39F55C
-39F55C:lI103|H39F620
-39F620:lI101|H39F6F4
-39F6F4:lI47|H39F7C0
-39F7C0:lI120|H39F894
-39F894:lI45|H39F970
-39F970:lI99|H39FA44
-39FA44:lI109|H39FB18
-39FB18:lI117|H39FBE4
-39FBE4:lI45|H39FCB0
-39FCB0:lI114|H39FD74
-39FD74:lI97|H39FE38
-39FE38:lI115|H39FEEC
-39FEEC:lI116|H39FFA8
-39FFA8:lI101|H3A005C
-3A005C:lI114|N
-39F320:lI114|H39F3D4
-39F3D4:lI97|H39F490
-39F490:lI115|N
-39F278:lH39F330|H39F33C
-39F330:t2:H39F3E4,H39F3EC
-39F3EC:lI105|H39F4A8
-39F4A8:lI109|H39F56C
-39F56C:lI97|H39F630
-39F630:lI103|H39F6FC
-39F6FC:lI101|H39F7C8
-39F7C8:lI47|H39F89C
-39F89C:lI116|H39F978
-39F978:lI105|H39FA4C
-39FA4C:lI102|H39FB20
-39FB20:lI102|N
-39F3E4:lI116|H39F4A0
-39F4A0:lI105|H39F564
-39F564:lI102|H39F628
-39F628:lI102|N
-39F33C:lH39F3F4|H39F400
-39F3F4:t2:H39F4B0,H39F4B8
-39F4B8:lI105|H39F57C
-39F57C:lI109|H39F640
-39F640:lI97|H39F704
-39F704:lI103|H39F7D0
-39F7D0:lI101|H39F8A4
-39F8A4:lI47|H39F980
-39F980:lI116|H39FA54
-39FA54:lI105|H39FB28
-39FB28:lI102|H39FBEC
-39FBEC:lI102|N
-39F4B0:lI116|H39F574
-39F574:lI105|H39F638
-39F638:lI102|N
-39F400:lH39F4C0|H39F4CC
-39F4C0:t2:H39F584,H39F58C
-39F58C:lI105|H39F650
-39F650:lI109|H39F714
-39F714:lI97|H39F7D8
-39F7D8:lI103|H39F8AC
-39F8AC:lI101|H39F988
-39F988:lI47|H39FA5C
-39FA5C:lI112|H39FB30
-39FB30:lI110|H39FBF4
-39FBF4:lI103|N
-39F584:lI112|H39F648
-39F648:lI110|H39F70C
-39F70C:lI103|N
-39F4CC:lH39F594|H39F5A0
-39F594:t2:H39F658,H39F660
-39F660:lI105|H39F724
-39F724:lI109|H39F7E8
-39F7E8:lI97|H39F8BC
-39F8BC:lI103|H39F990
-39F990:lI101|H39FA64
-39FA64:lI47|H39FB38
-39FB38:lI106|H39FBFC
-39FBFC:lI112|H39FCB8
-39FCB8:lI101|H39FD7C
-39FD7C:lI103|N
-39F658:lI106|H39F71C
-39F71C:lI112|H39F7E0
-39F7E0:lI101|H39F8B4
-39F8B4:lI103|N
-39F5A0:lH39F668|H39F674
-39F668:t2:H39F72C,H39F734
-39F734:lI105|H39F7F8
-39F7F8:lI109|H39F8CC
-39F8CC:lI97|H39F998
-39F998:lI103|H39FA6C
-39FA6C:lI101|H39FB40
-39FB40:lI47|H39FC04
-39FC04:lI106|H39FCC0
-39FCC0:lI112|H39FD84
-39FD84:lI101|H39FE40
-39FE40:lI103|N
-39F72C:lI106|H39F7F0
-39F7F0:lI112|H39F8C4
-39F8C4:lI103|N
-39F674:lH39F73C|H39F748
-39F73C:t2:H39F800,H39F808
-39F808:lI105|H39F8DC
-39F8DC:lI109|H39F9A8
-39F9A8:lI97|H39FA74
-39FA74:lI103|H39FB48
-39FB48:lI101|H39FC0C
-39FC0C:lI47|H39FCC8
-39FCC8:lI106|H39FD8C
-39FD8C:lI112|H39FE48
-39FE48:lI101|H39FEF4
-39FEF4:lI103|N
-39F800:lI106|H39F8D4
-39F8D4:lI112|H39F9A0
-39F9A0:lI101|N
-39F748:lH39F810|H39F81C
-39F810:t2:H39F8E4,H39F8EC
-39F8EC:lI105|H39F9B8
-39F9B8:lI109|H39FA84
-39FA84:lI97|H39FB50
-39FB50:lI103|H39FC14
-39FC14:lI101|H39FCD0
-39FCD0:lI47|H39FD94
-39FD94:lI105|H39FE50
-39FE50:lI101|H39FEFC
-39FEFC:lI102|N
-39F8E4:lI105|H39F9B0
-39F9B0:lI101|H39FA7C
-39FA7C:lI102|N
-39F81C:lH39F8F4|H39F900
-39F8F4:t2:H39F9C0,H39F9C8
-39F9C8:lI105|H39FA94
-39FA94:lI109|H39FB60
-39FB60:lI97|H39FC1C
-39FC1C:lI103|H39FCD8
-39FCD8:lI101|H39FD9C
-39FD9C:lI47|H39FE58
-39FE58:lI103|H39FF04
-39FF04:lI105|H39FFB0
-39FFB0:lI102|N
-39F9C0:lI103|H39FA8C
-39FA8C:lI105|H39FB58
-39FB58:lI102|N
-39F900:lH39F9D0|H39F9DC
-39F9D0:t2:H39FA9C,H39FAA4
-39FAA4:lI99|H39FB70
-39FB70:lI104|H39FC2C
-39FC2C:lI101|H39FCE0
-39FCE0:lI109|H39FDA4
-39FDA4:lI105|H39FE60
-39FE60:lI99|H39FF0C
-39FF0C:lI97|H39FFB8
-39FFB8:lI108|H3A0064
-3A0064:lI47|H3A0108
-3A0108:lI120|H3A01AC
-3A01AC:lI45|H3A0260
-3A0260:lI112|H3A030C
-3A030C:lI100|H3A03B8
-3A03B8:lI98|N
-39FA9C:lI112|H39FB68
-39FB68:lI100|H39FC24
-39FC24:lI98|N
-39F9DC:lH39FAAC|H39FAB8
-39FAAC:t2:H39FB78,H39FB80
-39FB80:lI99|H39FC3C
-39FC3C:lI104|H39FCF0
-39FCF0:lI101|H39FDAC
-39FDAC:lI109|H39FE68
-39FE68:lI105|H39FF14
-39FF14:lI99|H39FFC0
-39FFC0:lI97|H3A006C
-3A006C:lI108|H3A0110
-3A0110:lI47|H3A01B4
-3A01B4:lI120|H3A0268
-3A0268:lI45|H3A0314
-3A0314:lI112|H3A03C0
-3A03C0:lI100|H3A0454
-3A0454:lI98|N
-39FB78:lI120|H39FC34
-39FC34:lI121|H39FCE8
-39FCE8:lI122|N
-39FAB8:lH39FB88|H39FB94
-39FB88:t2:H39FC44,H39FC4C
-39FC4C:lI97|H39FD00
-39FD00:lI117|H39FDBC
-39FDBC:lI100|H39FE70
-39FE70:lI105|H39FF1C
-39FF1C:lI111|H39FFC8
-39FFC8:lI47|H3A0074
-3A0074:lI120|H3A0118
-3A0118:lI45|H3A01BC
-3A01BC:lI119|H3A0270
-3A0270:lI97|H3A031C
-3A031C:lI118|N
-39FC44:lI119|H39FCF8
-39FCF8:lI97|H39FDB4
-39FDB4:lI118|N
-39FB94:lH39FC54|H39FC60
-39FC54:t2:H39FD08,H39FD10
-39FD10:lI97|H39FDCC
-39FDCC:lI117|H39FE78
-39FE78:lI100|H39FF24
-39FF24:lI105|H39FFD0
-39FFD0:lI111|H3A007C
-3A007C:lI47|H3A0120
-3A0120:lI120|H3A01C4
-3A01C4:lI45|H3A0278
-3A0278:lI114|H3A0324
-3A0324:lI101|H3A03C8
-3A03C8:lI97|H3A045C
-3A045C:lI108|H3A04F8
-3A04F8:lI97|H3A059C
-3A059C:lI117|H3A0648
-3A0648:lI100|H3A06F4
-3A06F4:lI105|H3A07A0
-3A07A0:lI111|N
-39FD08:lI114|H39FDC4
-39FDC4:lI97|N
-39FC60:lH39FD18|H39FD24
-39FD18:t2:H39FDD4,H39FDDC
-39FDDC:lI97|H39FE88
-39FE88:lI117|H39FF34
-39FF34:lI100|H39FFD8
-39FFD8:lI105|H3A0084
-3A0084:lI111|H3A0128
-3A0128:lI47|H3A01CC
-3A01CC:lI120|H3A0280
-3A0280:lI45|H3A032C
-3A032C:lI112|H3A03D0
-3A03D0:lI110|H3A0464
-3A0464:lI45|H3A0500
-3A0500:lI114|H3A05A4
-3A05A4:lI101|H3A0650
-3A0650:lI97|H3A06FC
-3A06FC:lI108|H3A07A8
-3A07A8:lI97|H3A0844
-3A0844:lI117|H3A08D0
-3A08D0:lI100|H3A0964
-3A0964:lI105|H3A09F8
-3A09F8:lI111|H3A0A94
-3A0A94:lI45|H3A0B40
-3A0B40:lI112|H3A0BEC
-3A0BEC:lI108|H3A0CA8
-3A0CA8:lI117|H3A0D64
-3A0D64:lI103|H3A0E18
-3A0E18:lI105|H3A0ECC
-3A0ECC:lI110|N
-39FDD4:lI114|H39FE80
-39FE80:lI112|H39FF2C
-39FF2C:lI109|N
-39FD24:lH39FDE4|H39FDF0
-39FDE4:t2:H39FE90,H39FE98
-39FE98:lI97|H39FF44
-39FF44:lI117|H39FFE8
-39FFE8:lI100|H3A008C
-3A008C:lI105|H3A0130
-3A0130:lI111|H3A01D4
-3A01D4:lI47|H3A0288
-3A0288:lI120|H3A0334
-3A0334:lI45|H3A03D8
-3A03D8:lI112|H3A046C
-3A046C:lI110|H3A0508
-3A0508:lI45|H3A05AC
-3A05AC:lI114|H3A0658
-3A0658:lI101|H3A0704
-3A0704:lI97|H3A07B0
-3A07B0:lI108|H3A084C
-3A084C:lI97|H3A08D8
-3A08D8:lI117|H3A096C
-3A096C:lI100|H3A0A00
-3A0A00:lI105|H3A0A9C
-3A0A9C:lI111|N
-39FE90:lI114|H39FF3C
-39FF3C:lI97|H39FFE0
-39FFE0:lI109|N
-39FDF0:lH39FEA0|H39FEAC
-39FEA0:t2:H39FF4C,H39FF54
-39FF54:lI97|H39FFF8
-39FFF8:lI117|H3A009C
-3A009C:lI100|H3A0138
-3A0138:lI105|H3A01DC
-3A01DC:lI111|H3A0290
-3A0290:lI47|H3A033C
-3A033C:lI120|H3A03E0
-3A03E0:lI45|H3A0474
-3A0474:lI97|H3A0510
-3A0510:lI105|H3A05B4
-3A05B4:lI102|H3A0660
-3A0660:lI102|N
-39FF4C:lI97|H39FFF0
-39FFF0:lI105|H3A0094
-3A0094:lI102|N
-39FEAC:lH39FF5C|H39FF68
-39FF5C:t2:H3A0000,H3A0008
-3A0008:lI97|H3A00AC
-3A00AC:lI117|H3A0148
-3A0148:lI100|H3A01EC
-3A01EC:lI105|H3A0298
-3A0298:lI111|H3A0344
-3A0344:lI47|H3A03E8
-3A03E8:lI120|H3A047C
-3A047C:lI45|H3A0518
-3A0518:lI97|H3A05BC
-3A05BC:lI105|H3A0668
-3A0668:lI102|H3A070C
-3A070C:lI102|N
-3A0000:lI97|H3A00A4
-3A00A4:lI105|H3A0140
-3A0140:lI102|H3A01E4
-3A01E4:lI102|N
-39FF68:lH3A0010|H3A001C
-3A0010:t2:H3A00B4,H3A00BC
-3A00BC:lI97|H3A0158
-3A0158:lI117|H3A01FC
-3A01FC:lI100|H3A02A8
-3A02A8:lI105|H3A034C
-3A034C:lI111|H3A03F0
-3A03F0:lI47|H3A0484
-3A0484:lI120|H3A0520
-3A0520:lI45|H3A05C4
-3A05C4:lI97|H3A0670
-3A0670:lI105|H3A0714
-3A0714:lI102|H3A07B8
-3A07B8:lI102|N
-3A00B4:lI97|H3A0150
-3A0150:lI105|H3A01F4
-3A01F4:lI102|H3A02A0
-3A02A0:lI99|N
-3A001C:lH3A00C4|H3A00D0
-3A00C4:t2:H3A0160,H3A0168
-3A0168:lI97|H3A020C
-3A020C:lI117|H3A02B8
-3A02B8:lI100|H3A035C
-3A035C:lI105|H3A03F8
-3A03F8:lI111|H3A048C
-3A048C:lI47|H3A0528
-3A0528:lI109|H3A05CC
-3A05CC:lI112|H3A0678
-3A0678:lI101|H3A071C
-3A071C:lI103|N
-3A0160:lI109|H3A0204
-3A0204:lI112|H3A02B0
-3A02B0:lI103|H3A0354
-3A0354:lI97|N
-3A00D0:lH3A0170|H3A017C
-3A0170:t2:H3A0214,H3A021C
-3A021C:lI97|H3A02C8
-3A02C8:lI117|H3A036C
-3A036C:lI100|H3A0400
-3A0400:lI105|H3A0494
-3A0494:lI111|H3A0530
-3A0530:lI47|H3A05D4
-3A05D4:lI109|H3A0680
-3A0680:lI112|H3A0724
-3A0724:lI101|H3A07C0
-3A07C0:lI103|N
-3A0214:lI109|H3A02C0
-3A02C0:lI112|H3A0364
-3A0364:lI50|N
-3A017C:lH3A0224|H3A0230
-3A0224:t2:H3A02D0,H3A02D8
-3A02D8:lI97|H3A037C
-3A037C:lI117|H3A0408
-3A0408:lI100|H3A049C
-3A049C:lI105|H3A0538
-3A0538:lI111|H3A05DC
-3A05DC:lI47|H3A0688
-3A0688:lI98|H3A072C
-3A072C:lI97|H3A07C8
-3A07C8:lI115|H3A0854
-3A0854:lI105|H3A08E0
-3A08E0:lI99|N
-3A02D0:lI97|H3A0374
-3A0374:lI117|N
-3A0230:lH3A02E0|H3A02EC
-3A02E0:t2:H3A0384,H3A038C
-3A038C:lI97|H3A0418
-3A0418:lI117|H3A04AC
-3A04AC:lI100|H3A0540
-3A0540:lI105|H3A05E4
-3A05E4:lI111|H3A0690
-3A0690:lI47|H3A0734
-3A0734:lI98|H3A07D0
-3A07D0:lI97|H3A085C
-3A085C:lI115|H3A08E8
-3A08E8:lI105|H3A0974
-3A0974:lI99|N
-3A0384:lI115|H3A0410
-3A0410:lI110|H3A04A4
-3A04A4:lI100|N
-3A02EC:lH3A0394|H3A03A0
-3A0394:t2:H3A0420,H3A0428
-3A0428:lI97|H3A04BC
-3A04BC:lI112|H3A0550
-3A0550:lI112|H3A05EC
-3A05EC:lI108|H3A0698
-3A0698:lI105|H3A073C
-3A073C:lI99|H3A07D8
-3A07D8:lI97|H3A0864
-3A0864:lI116|H3A08F0
-3A08F0:lI105|H3A097C
-3A097C:lI111|H3A0A08
-3A0A08:lI110|H3A0AA4
-3A0AA4:lI47|H3A0B48
-3A0B48:lI122|H3A0BF4
-3A0BF4:lI105|H3A0CB0
-3A0CB0:lI112|N
-3A0420:lI122|H3A04B4
-3A04B4:lI105|H3A0548
-3A0548:lI112|N
-3A03A0:lH3A0430|H3A043C
-3A0430:t2:H3A04C4,H3A04CC
-3A04CC:lI97|H3A0560
-3A0560:lI112|H3A05FC
-3A05FC:lI112|H3A06A0
-3A06A0:lI108|H3A0744
-3A0744:lI105|H3A07E0
-3A07E0:lI99|H3A086C
-3A086C:lI97|H3A08F8
-3A08F8:lI116|H3A0984
-3A0984:lI105|H3A0A10
-3A0A10:lI111|H3A0AAC
-3A0AAC:lI110|H3A0B50
-3A0B50:lI47|H3A0BFC
-3A0BFC:lI120|H3A0CB8
-3A0CB8:lI45|H3A0D6C
-3A0D6C:lI119|H3A0E20
-3A0E20:lI97|H3A0ED4
-3A0ED4:lI105|H3A0F90
-3A0F90:lI115|H3A105C
-3A105C:lI45|H3A1130
-3A1130:lI115|H3A1204
-3A1204:lI111|H3A12D0
-3A12D0:lI117|H3A13A4
-3A13A4:lI114|H3A1480
-3A1480:lI99|H3A1564
-3A1564:lI101|N
-3A04C4:lI115|H3A0558
-3A0558:lI114|H3A05F4
-3A05F4:lI99|N
-3A043C:lH3A04D4|H3A04E0
-3A04D4:t2:H3A0568,H3A0570
-3A0570:lI97|H3A060C
-3A060C:lI112|H3A06B0
-3A06B0:lI112|H3A0754
-3A0754:lI108|H3A07F0
-3A07F0:lI105|H3A0874
-3A0874:lI99|H3A0900
-3A0900:lI97|H3A098C
-3A098C:lI116|H3A0A18
-3A0A18:lI105|H3A0AB4
-3A0AB4:lI111|H3A0B58
-3A0B58:lI110|H3A0C04
-3A0C04:lI47|H3A0CC0
-3A0CC0:lI120|H3A0D74
-3A0D74:lI45|H3A0E28
-3A0E28:lI117|H3A0EDC
-3A0EDC:lI115|H3A0F98
-3A0F98:lI116|H3A1064
-3A1064:lI97|H3A1138
-3A1138:lI114|N
-3A0568:lI117|H3A0604
-3A0604:lI115|H3A06A8
-3A06A8:lI116|H3A074C
-3A074C:lI97|H3A07E8
-3A07E8:lI114|N
-3A04E0:lH3A0578|H3A0584
-3A0578:t2:H3A0614,H3A061C
-3A061C:lI97|H3A06C0
-3A06C0:lI112|H3A075C
-3A075C:lI112|H3A07F8
-3A07F8:lI108|H3A087C
-3A087C:lI105|H3A0908
-3A0908:lI99|H3A0994
-3A0994:lI97|H3A0A20
-3A0A20:lI116|H3A0ABC
-3A0ABC:lI105|H3A0B60
-3A0B60:lI111|H3A0C0C
-3A0C0C:lI110|H3A0CC8
-3A0CC8:lI47|H3A0D7C
-3A0D7C:lI120|H3A0E30
-3A0E30:lI45|H3A0EE4
-3A0EE4:lI116|H3A0FA0
-3A0FA0:lI114|H3A106C
-3A106C:lI111|H3A1140
-3A1140:lI102|H3A120C
-3A120C:lI102|H3A12D8
-3A12D8:lI45|H3A13AC
-3A13AC:lI109|H3A1488
-3A1488:lI115|N
-3A0614:lI109|H3A06B8
-3A06B8:lI115|N
-3A0584:lH3A0624|H3A0630
-3A0624:t2:H3A06C8,H3A06D0
-3A06D0:lI97|H3A076C
-3A076C:lI112|H3A0800
-3A0800:lI112|H3A0884
-3A0884:lI108|H3A0910
-3A0910:lI105|H3A099C
-3A099C:lI99|H3A0A28
-3A0A28:lI97|H3A0AC4
-3A0AC4:lI116|H3A0B68
-3A0B68:lI105|H3A0C14
-3A0C14:lI111|H3A0CD0
-3A0CD0:lI110|H3A0D84
-3A0D84:lI47|H3A0E38
-3A0E38:lI120|H3A0EEC
-3A0EEC:lI45|H3A0FA8
-3A0FA8:lI116|H3A1074
-3A1074:lI114|H3A1148
-3A1148:lI111|H3A1214
-3A1214:lI102|H3A12E0
-3A12E0:lI102|H3A13B4
-3A13B4:lI45|H3A1490
-3A1490:lI109|H3A156C
-3A156C:lI101|N
-3A06C8:lI109|H3A0764
-3A0764:lI101|N
-3A0630:lH3A06D8|H3A06E4
-3A06D8:t2:H3A0774,H3A077C
-3A077C:lI97|H3A0810
-3A0810:lI112|H3A0894
-3A0894:lI112|H3A0918
-3A0918:lI108|H3A09A4
-3A09A4:lI105|H3A0A30
-3A0A30:lI99|H3A0ACC
-3A0ACC:lI97|H3A0B70
-3A0B70:lI116|H3A0C1C
-3A0C1C:lI105|H3A0CD8
-3A0CD8:lI111|H3A0D8C
-3A0D8C:lI110|H3A0E40
-3A0E40:lI47|H3A0EF4
-3A0EF4:lI120|H3A0FB0
-3A0FB0:lI45|H3A107C
-3A107C:lI116|H3A1150
-3A1150:lI114|H3A121C
-3A121C:lI111|H3A12E8
-3A12E8:lI102|H3A13BC
-3A13BC:lI102|H3A1498
-3A1498:lI45|H3A1574
-3A1574:lI109|H3A1648
-3A1648:lI97|H3A171C
-3A171C:lI110|N
-3A0774:lI109|H3A0808
-3A0808:lI97|H3A088C
-3A088C:lI110|N
-3A06E4:lH3A0784|H3A0790
-3A0784:t2:H3A0818,H3A0820
-3A0820:lI97|H3A089C
-3A089C:lI112|H3A0920
-3A0920:lI112|H3A09AC
-3A09AC:lI108|H3A0A38
-3A0A38:lI105|H3A0AD4
-3A0AD4:lI99|H3A0B78
-3A0B78:lI97|H3A0C24
-3A0C24:lI116|H3A0CE0
-3A0CE0:lI105|H3A0D94
-3A0D94:lI111|H3A0E48
-3A0E48:lI110|H3A0EFC
-3A0EFC:lI47|H3A0FB8
-3A0FB8:lI120|H3A1084
-3A1084:lI45|H3A1158
-3A1158:lI116|H3A1224
-3A1224:lI114|H3A12F0
-3A12F0:lI111|H3A13C4
-3A13C4:lI102|H3A14A0
-3A14A0:lI102|N
-3A0818:lI116|N
-3A0790:lH3A0828|H3A0834
-3A0828:t2:H3A08A4,H3A08AC
-3A08AC:lI97|H3A0930
-3A0930:lI112|H3A09B4
-3A09B4:lI112|H3A0A40
-3A0A40:lI108|H3A0ADC
-3A0ADC:lI105|H3A0B80
-3A0B80:lI99|H3A0C2C
-3A0C2C:lI97|H3A0CE8
-3A0CE8:lI116|H3A0D9C
-3A0D9C:lI105|H3A0E50
-3A0E50:lI111|H3A0F04
-3A0F04:lI110|H3A0FC0
-3A0FC0:lI47|H3A108C
-3A108C:lI120|H3A1160
-3A1160:lI45|H3A122C
-3A122C:lI116|H3A12F8
-3A12F8:lI114|H3A13CC
-3A13CC:lI111|H3A14A8
-3A14A8:lI102|H3A157C
-3A157C:lI102|N
-3A08A4:lI116|H3A0928
-3A0928:lI114|N
-3A0834:lH3A08B4|H3A08C0
-3A08B4:t2:H3A0938,H3A0940
-3A0940:lI97|H3A09C4
-3A09C4:lI112|H3A0A50
-3A0A50:lI112|H3A0AEC
-3A0AEC:lI108|H3A0B88
-3A0B88:lI105|H3A0C34
-3A0C34:lI99|H3A0CF0
-3A0CF0:lI97|H3A0DA4
-3A0DA4:lI116|H3A0E58
-3A0E58:lI105|H3A0F0C
-3A0F0C:lI111|H3A0FC8
-3A0FC8:lI110|H3A1094
-3A1094:lI47|H3A1168
-3A1168:lI120|H3A1234
-3A1234:lI45|H3A1300
-3A1300:lI116|H3A13D4
-3A13D4:lI114|H3A14B0
-3A14B0:lI111|H3A1584
-3A1584:lI102|H3A1650
-3A1650:lI102|N
-3A0938:lI114|H3A09BC
-3A09BC:lI111|H3A0A48
-3A0A48:lI102|H3A0AE4
-3A0AE4:lI102|N
-3A08C0:lH3A0948|H3A0954
-3A0948:t2:H3A09CC,H3A09D4
-3A09D4:lI97|H3A0A60
-3A0A60:lI112|H3A0AFC
-3A0AFC:lI112|H3A0B98
-3A0B98:lI108|H3A0C44
-3A0C44:lI105|H3A0D00
-3A0D00:lI99|H3A0DB4
-3A0DB4:lI97|H3A0E60
-3A0E60:lI116|H3A0F14
-3A0F14:lI105|H3A0FD0
-3A0FD0:lI111|H3A109C
-3A109C:lI110|H3A1170
-3A1170:lI47|H3A123C
-3A123C:lI120|H3A1308
-3A1308:lI45|H3A13DC
-3A13DC:lI116|H3A14B8
-3A14B8:lI101|H3A158C
-3A158C:lI120|H3A1658
-3A1658:lI105|H3A1724
-3A1724:lI110|H3A17E8
-3A17E8:lI102|H3A18AC
-3A18AC:lI111|N
-3A09CC:lI116|H3A0A58
-3A0A58:lI101|H3A0AF4
-3A0AF4:lI120|H3A0B90
-3A0B90:lI105|H3A0C3C
-3A0C3C:lI110|H3A0CF8
-3A0CF8:lI102|H3A0DAC
-3A0DAC:lI111|N
-3A0954:lH3A09DC|H3A09E8
-3A09DC:t2:H3A0A68,H3A0A70
-3A0A70:lI97|H3A0B0C
-3A0B0C:lI112|H3A0BA8
-3A0BA8:lI112|H3A0C54
-3A0C54:lI108|H3A0D08
-3A0D08:lI105|H3A0DBC
-3A0DBC:lI99|H3A0E68
-3A0E68:lI97|H3A0F1C
-3A0F1C:lI116|H3A0FD8
-3A0FD8:lI105|H3A10A4
-3A10A4:lI111|H3A1178
-3A1178:lI110|H3A1244
-3A1244:lI47|H3A1310
-3A1310:lI120|H3A13E4
-3A13E4:lI45|H3A14C0
-3A14C0:lI116|H3A1594
-3A1594:lI101|H3A1660
-3A1660:lI120|H3A172C
-3A172C:lI105|H3A17F0
-3A17F0:lI110|H3A18B4
-3A18B4:lI102|H3A1970
-3A1970:lI111|N
-3A0A68:lI116|H3A0B04
-3A0B04:lI101|H3A0BA0
-3A0BA0:lI120|H3A0C4C
-3A0C4C:lI105|N
-3A09E8:lH3A0A78|H3A0A84
-3A0A78:t2:H3A0B14,H3A0B1C
-3A0B1C:lI97|H3A0BB8
-3A0BB8:lI112|H3A0C64
-3A0C64:lI112|H3A0D10
-3A0D10:lI108|H3A0DC4
-3A0DC4:lI105|H3A0E70
-3A0E70:lI99|H3A0F24
-3A0F24:lI97|H3A0FE0
-3A0FE0:lI116|H3A10AC
-3A10AC:lI105|H3A1180
-3A1180:lI111|H3A124C
-3A124C:lI110|H3A1318
-3A1318:lI47|H3A13EC
-3A13EC:lI120|H3A14C8
-3A14C8:lI45|H3A159C
-3A159C:lI116|H3A1668
-3A1668:lI101|H3A1734
-3A1734:lI120|N
-3A0B14:lI116|H3A0BB0
-3A0BB0:lI101|H3A0C5C
-3A0C5C:lI120|N
-3A0A84:lH3A0B24|H3A0B30
-3A0B24:t2:H3A0BC0,H3A0BC8
-3A0BC8:lI97|H3A0C74
-3A0C74:lI112|H3A0D20
-3A0D20:lI112|H3A0DCC
-3A0DCC:lI108|H3A0E78
-3A0E78:lI105|H3A0F2C
-3A0F2C:lI99|H3A0FE8
-3A0FE8:lI97|H3A10B4
-3A10B4:lI116|H3A1188
-3A1188:lI105|H3A1254
-3A1254:lI111|H3A1320
-3A1320:lI110|H3A13F4
-3A13F4:lI47|H3A14D0
-3A14D0:lI120|H3A15A4
-3A15A4:lI45|H3A1670
-3A1670:lI116|H3A173C
-3A173C:lI99|H3A17F8
-3A17F8:lI108|N
-3A0BC0:lI116|H3A0C6C
-3A0C6C:lI99|H3A0D18
-3A0D18:lI108|N
-3A0B30:lH3A0BD0|H3A0BDC
-3A0BD0:t2:H3A0C7C,H3A0C84
-3A0C84:lI97|H3A0D30
-3A0D30:lI112|H3A0DDC
-3A0DDC:lI112|H3A0E80
-3A0E80:lI108|H3A0F34
-3A0F34:lI105|H3A0FF0
-3A0FF0:lI99|H3A10BC
-3A10BC:lI97|H3A1190
-3A1190:lI116|H3A125C
-3A125C:lI105|H3A1328
-3A1328:lI111|H3A13FC
-3A13FC:lI110|H3A14D8
-3A14D8:lI47|H3A15AC
-3A15AC:lI120|H3A1678
-3A1678:lI45|H3A1744
-3A1744:lI116|H3A1800
-3A1800:lI97|H3A18BC
-3A18BC:lI114|N
-3A0C7C:lI116|H3A0D28
-3A0D28:lI97|H3A0DD4
-3A0DD4:lI114|N
-3A0BDC:lH3A0C8C|H3A0C98
-3A0C8C:t2:H3A0D38,H3A0D40
-3A0D40:lI97|H3A0DEC
-3A0DEC:lI112|H3A0E90
-3A0E90:lI112|H3A0F44
-3A0F44:lI108|H3A1000
-3A1000:lI105|H3A10CC
-3A10CC:lI99|H3A1198
-3A1198:lI97|H3A1264
-3A1264:lI116|H3A1330
-3A1330:lI105|H3A1404
-3A1404:lI111|H3A14E0
-3A14E0:lI110|H3A15B4
-3A15B4:lI47|H3A1680
-3A1680:lI120|H3A174C
-3A174C:lI45|H3A1808
-3A1808:lI115|H3A18C4
-3A18C4:lI118|H3A1978
-3A1978:lI52|H3A1A2C
-3A1A2C:lI99|H3A1AE0
-3A1AE0:lI114|H3A1BA4
-3A1BA4:lI99|N
-3A0D38:lI115|H3A0DE4
-3A0DE4:lI118|H3A0E88
-3A0E88:lI52|H3A0F3C
-3A0F3C:lI99|H3A0FF8
-3A0FF8:lI114|H3A10C4
-3A10C4:lI99|N
-3A0C98:lH3A0D48|H3A0D54
-3A0D48:t2:H3A0DF4,H3A0DFC
-3A0DFC:lI97|H3A0EA0
-3A0EA0:lI112|H3A0F54
-3A0F54:lI112|H3A1010
-3A1010:lI108|H3A10DC
-3A10DC:lI105|H3A11A8
-3A11A8:lI99|H3A1274
-3A1274:lI97|H3A1338
-3A1338:lI116|H3A140C
-3A140C:lI105|H3A14E8
-3A14E8:lI111|H3A15BC
-3A15BC:lI110|H3A1688
-3A1688:lI47|H3A1754
-3A1754:lI120|H3A1810
-3A1810:lI45|H3A18CC
-3A18CC:lI115|H3A1980
-3A1980:lI118|H3A1A34
-3A1A34:lI52|H3A1AE8
-3A1AE8:lI99|H3A1BAC
-3A1BAC:lI112|H3A1C78
-3A1C78:lI105|H3A1D3C
-3A1D3C:lI111|N
-3A0DF4:lI115|H3A0E98
-3A0E98:lI118|H3A0F4C
-3A0F4C:lI52|H3A1008
-3A1008:lI99|H3A10D4
-3A10D4:lI112|H3A11A0
-3A11A0:lI105|H3A126C
-3A126C:lI111|N
-3A0D54:lH3A0E04|H3A0E10
-3A0E04:t2:H3A0EA8,H3A0EB0
-3A0EB0:lI97|H3A0F64
-3A0F64:lI112|H3A1020
-3A1020:lI112|H3A10E4
-3A10E4:lI108|H3A11B0
-3A11B0:lI105|H3A127C
-3A127C:lI99|H3A1340
-3A1340:lI97|H3A1414
-3A1414:lI116|H3A14F0
-3A14F0:lI105|H3A15C4
-3A15C4:lI111|H3A1690
-3A1690:lI110|H3A175C
-3A175C:lI47|H3A1818
-3A1818:lI120|H3A18D4
-3A18D4:lI45|H3A1988
-3A1988:lI115|H3A1A3C
-3A1A3C:lI116|H3A1AF0
-3A1AF0:lI117|H3A1BB4
-3A1BB4:lI102|H3A1C80
-3A1C80:lI102|H3A1D44
-3A1D44:lI105|H3A1E00
-3A1E00:lI116|N
-3A0EA8:lI115|H3A0F5C
-3A0F5C:lI105|H3A1018
-3A1018:lI116|N
-3A0E10:lH3A0EB8|H3A0EC4
-3A0EB8:t2:H3A0F6C,H3A0F74
-3A0F74:lI97|H3A1030
-3A1030:lI112|H3A10F4
-3A10F4:lI112|H3A11C0
-3A11C0:lI108|H3A1284
-3A1284:lI105|H3A1348
-3A1348:lI99|H3A141C
-3A141C:lI97|H3A14F8
-3A14F8:lI116|H3A15CC
-3A15CC:lI105|H3A1698
-3A1698:lI111|H3A1764
-3A1764:lI110|H3A1820
-3A1820:lI47|H3A18DC
-3A18DC:lI120|H3A1990
-3A1990:lI45|H3A1A44
-3A1A44:lI115|H3A1AF8
-3A1AF8:lI104|H3A1BBC
-3A1BBC:lI97|H3A1C88
-3A1C88:lI114|N
-3A0F6C:lI115|H3A1028
-3A1028:lI104|H3A10EC
-3A10EC:lI97|H3A11B8
-3A11B8:lI114|N
-3A0EC4:lH3A0F7C|H3A0F88
-3A0F7C:t2:H3A1038,H3A1040
-3A1040:lI97|H3A1104
-3A1104:lI112|H3A11C8
-3A11C8:lI112|H3A128C
-3A128C:lI108|H3A1350
-3A1350:lI105|H3A1424
-3A1424:lI99|H3A1500
-3A1500:lI97|H3A15D4
-3A15D4:lI116|H3A16A0
-3A16A0:lI105|H3A176C
-3A176C:lI111|H3A1828
-3A1828:lI110|H3A18E4
-3A18E4:lI47|H3A1998
-3A1998:lI120|H3A1A4C
-3A1A4C:lI45|H3A1B00
-3A1B00:lI115|H3A1BC4
-3A1BC4:lI104|N
-3A1038:lI115|H3A10FC
-3A10FC:lI104|N
-3A0F88:lH3A1048|H3A1054
-3A1048:t2:H3A110C,H3A1114
-3A1114:lI97|H3A11D8
-3A11D8:lI112|H3A1294
-3A1294:lI112|H3A1358
-3A1358:lI108|H3A142C
-3A142C:lI105|H3A1508
-3A1508:lI99|H3A15DC
-3A15DC:lI97|H3A16A8
-3A16A8:lI116|H3A1774
-3A1774:lI105|H3A1830
-3A1830:lI111|H3A18EC
-3A18EC:lI110|H3A19A0
-3A19A0:lI47|H3A1A54
-3A1A54:lI120|H3A1B08
-3A1B08:lI45|H3A1BCC
-3A1BCC:lI110|H3A1C90
-3A1C90:lI101|H3A1D4C
-3A1D4C:lI116|H3A1E08
-3A1E08:lI99|H3A1EC4
-3A1EC4:lI100|H3A1F88
-3A1F88:lI102|N
-3A110C:lI110|H3A11D0
-3A11D0:lI99|N
-3A1054:lH3A111C|H3A1128
-3A111C:t2:H3A11E0,H3A11E8
-3A11E8:lI97|H3A12A4
-3A12A4:lI112|H3A1368
-3A1368:lI112|H3A1434
-3A1434:lI108|H3A1510
-3A1510:lI105|H3A15E4
-3A15E4:lI99|H3A16B0
-3A16B0:lI97|H3A177C
-3A177C:lI116|H3A1838
-3A1838:lI105|H3A18F4
-3A18F4:lI111|H3A19A8
-3A19A8:lI110|H3A1A5C
-3A1A5C:lI47|H3A1B10
-3A1B10:lI120|H3A1BD4
-3A1BD4:lI45|H3A1C98
-3A1C98:lI110|H3A1D54
-3A1D54:lI101|H3A1E10
-3A1E10:lI116|H3A1ECC
-3A1ECC:lI99|H3A1F90
-3A1F90:lI100|H3A2044
-3A2044:lI102|N
-3A11E0:lI99|H3A129C
-3A129C:lI100|H3A1360
-3A1360:lI102|N
-3A1128:lH3A11F0|H3A11FC
-3A11F0:t2:H3A12AC,H3A12B4
-3A12B4:lI97|H3A1378
-3A1378:lI112|H3A1444
-3A1444:lI112|H3A1518
-3A1518:lI108|H3A15EC
-3A15EC:lI105|H3A16B8
-3A16B8:lI99|H3A1784
-3A1784:lI97|H3A1840
-3A1840:lI116|H3A18FC
-3A18FC:lI105|H3A19B0
-3A19B0:lI111|H3A1A64
-3A1A64:lI110|H3A1B18
-3A1B18:lI47|H3A1BDC
-3A1BDC:lI120|H3A1CA0
-3A1CA0:lI45|H3A1D5C
-3A1D5C:lI109|H3A1E18
-3A1E18:lI105|H3A1ED4
-3A1ED4:lI102|N
-3A12AC:lI109|H3A1370
-3A1370:lI105|H3A143C
-3A143C:lI102|N
-3A11FC:lH3A12BC|H3A12C8
-3A12BC:t2:H3A1380,H3A1388
-3A1388:lI97|H3A1454
-3A1454:lI112|H3A1528
-3A1528:lI112|H3A15FC
-3A15FC:lI108|H3A16C8
-3A16C8:lI105|H3A178C
-3A178C:lI99|H3A1848
-3A1848:lI97|H3A1904
-3A1904:lI116|H3A19B8
-3A19B8:lI105|H3A1A6C
-3A1A6C:lI111|H3A1B20
-3A1B20:lI110|H3A1BE4
-3A1BE4:lI47|H3A1CA8
-3A1CA8:lI120|H3A1D64
-3A1D64:lI45|H3A1E20
-3A1E20:lI108|H3A1EDC
-3A1EDC:lI97|H3A1F98
-3A1F98:lI116|H3A204C
-3A204C:lI101|H3A2108
-3A2108:lI120|N
-3A1380:lI108|H3A144C
-3A144C:lI97|H3A1520
-3A1520:lI116|H3A15F4
-3A15F4:lI101|H3A16C0
-3A16C0:lI120|N
-3A12C8:lH3A1390|H3A139C
-3A1390:t2:H3A145C,H3A1464
-3A1464:lI97|H3A1538
-3A1538:lI112|H3A160C
-3A160C:lI112|H3A16D0
-3A16D0:lI108|H3A1794
-3A1794:lI105|H3A1850
-3A1850:lI99|H3A190C
-3A190C:lI97|H3A19C0
-3A19C0:lI116|H3A1A74
-3A1A74:lI105|H3A1B28
-3A1B28:lI111|H3A1BEC
-3A1BEC:lI110|H3A1CB0
-3A1CB0:lI47|H3A1D6C
-3A1D6C:lI120|H3A1E28
-3A1E28:lI45|H3A1EE4
-3A1EE4:lI107|H3A1FA0
-3A1FA0:lI111|H3A2054
-3A2054:lI97|H3A2110
-3A2110:lI110|N
-3A145C:lI115|H3A1530
-3A1530:lI107|H3A1604
-3A1604:lI112|N
-3A139C:lH3A146C|H3A1478
-3A146C:t2:H3A1540,H3A1548
-3A1548:lI97|H3A161C
-3A161C:lI112|H3A16E0
-3A16E0:lI112|H3A179C
-3A179C:lI108|H3A1858
-3A1858:lI105|H3A1914
-3A1914:lI99|H3A19C8
-3A19C8:lI97|H3A1A7C
-3A1A7C:lI116|H3A1B30
-3A1B30:lI105|H3A1BF4
-3A1BF4:lI111|H3A1CB8
-3A1CB8:lI110|H3A1D74
-3A1D74:lI47|H3A1E30
-3A1E30:lI120|H3A1EEC
-3A1EEC:lI45|H3A1FA8
-3A1FA8:lI107|H3A205C
-3A205C:lI111|H3A2118
-3A2118:lI97|H3A21CC
-3A21CC:lI110|N
-3A1540:lI115|H3A1614
-3A1614:lI107|H3A16D8
-3A16D8:lI100|N
-3A1478:lH3A1550|H3A155C
-3A1550:t2:H3A1624,H3A162C
-3A162C:lI97|H3A16F0
-3A16F0:lI112|H3A17AC
-3A17AC:lI112|H3A1860
-3A1860:lI108|H3A191C
-3A191C:lI105|H3A19D0
-3A19D0:lI99|H3A1A84
-3A1A84:lI97|H3A1B38
-3A1B38:lI116|H3A1BFC
-3A1BFC:lI105|H3A1CC0
-3A1CC0:lI111|H3A1D7C
-3A1D7C:lI110|H3A1E38
-3A1E38:lI47|H3A1EF4
-3A1EF4:lI120|H3A1FB0
-3A1FB0:lI45|H3A2064
-3A2064:lI107|H3A2120
-3A2120:lI111|H3A21D4
-3A21D4:lI97|H3A2288
-3A2288:lI110|N
-3A1624:lI115|H3A16E8
-3A16E8:lI107|H3A17A4
-3A17A4:lI116|N
-3A155C:lH3A1634|H3A1640
-3A1634:t2:H3A16F8,H3A1700
-3A1700:lI97|H3A17BC
-3A17BC:lI112|H3A1870
-3A1870:lI112|H3A1924
-3A1924:lI108|H3A19D8
-3A19D8:lI105|H3A1A8C
-3A1A8C:lI99|H3A1B40
-3A1B40:lI97|H3A1C04
-3A1C04:lI116|H3A1CC8
-3A1CC8:lI105|H3A1D84
-3A1D84:lI111|H3A1E40
-3A1E40:lI110|H3A1EFC
-3A1EFC:lI47|H3A1FB8
-3A1FB8:lI120|H3A206C
-3A206C:lI45|H3A2128
-3A2128:lI107|H3A21DC
-3A21DC:lI111|H3A2290
-3A2290:lI97|H3A234C
-3A234C:lI110|N
-3A16F8:lI115|H3A17B4
-3A17B4:lI107|H3A1868
-3A1868:lI109|N
-3A1640:lH3A1708|H3A1714
-3A1708:t2:H3A17C4,H3A17CC
-3A17CC:lI97|H3A1880
-3A1880:lI112|H3A1934
-3A1934:lI112|H3A19E0
-3A19E0:lI108|H3A1A94
-3A1A94:lI105|H3A1B48
-3A1B48:lI99|H3A1C0C
-3A1C0C:lI97|H3A1CD0
-3A1CD0:lI116|H3A1D8C
-3A1D8C:lI105|H3A1E48
-3A1E48:lI111|H3A1F04
-3A1F04:lI110|H3A1FC0
-3A1FC0:lI47|H3A2074
-3A2074:lI120|H3A2130
-3A2130:lI45|H3A21E4
-3A21E4:lI104|H3A2298
-3A2298:lI116|H3A2354
-3A2354:lI116|H3A2410
-3A2410:lI112|H3A24C4
-3A24C4:lI100|H3A2580
-3A2580:lI45|H3A263C
-3A263C:lI99|H3A2700
-3A2700:lI103|H3A27BC
-3A27BC:lI105|N
-3A17C4:lI99|H3A1878
-3A1878:lI103|H3A192C
-3A192C:lI105|N
-3A1714:lH3A17D4|H3A17E0
-3A17D4:t2:H3A1888,H3A1890
-3A1890:lI97|H3A1944
-3A1944:lI112|H3A19F0
-3A19F0:lI112|H3A1A9C
-3A1A9C:lI108|H3A1B50
-3A1B50:lI105|H3A1C14
-3A1C14:lI99|H3A1CD8
-3A1CD8:lI97|H3A1D94
-3A1D94:lI116|H3A1E50
-3A1E50:lI105|H3A1F0C
-3A1F0C:lI111|H3A1FC8
-3A1FC8:lI110|H3A207C
-3A207C:lI47|H3A2138
-3A2138:lI120|H3A21EC
-3A21EC:lI45|H3A22A0
-3A22A0:lI104|H3A235C
-3A235C:lI100|H3A2418
-3A2418:lI102|N
-3A1888:lI104|H3A193C
-3A193C:lI100|H3A19E8
-3A19E8:lI102|N
-3A17E0:lH3A1898|H3A18A4
-3A1898:t2:H3A194C,H3A1954
-3A1954:lI97|H3A1A00
-3A1A00:lI112|H3A1AA4
-3A1AA4:lI112|H3A1B58
-3A1B58:lI108|H3A1C1C
-3A1C1C:lI105|H3A1CE0
-3A1CE0:lI99|H3A1D9C
-3A1D9C:lI97|H3A1E58
-3A1E58:lI116|H3A1F14
-3A1F14:lI105|H3A1FD0
-3A1FD0:lI111|H3A2084
-3A2084:lI110|H3A2140
-3A2140:lI47|H3A21F4
-3A21F4:lI120|H3A22A8
-3A22A8:lI45|H3A2364
-3A2364:lI103|H3A2420
-3A2420:lI122|H3A24CC
-3A24CC:lI105|H3A2588
-3A2588:lI112|N
-3A194C:lI103|H3A19F8
-3A19F8:lI122|N
-3A18A4:lH3A195C|H3A1968
-3A195C:t2:H3A1A08,H3A1A10
-3A1A10:lI97|H3A1AB4
-3A1AB4:lI112|H3A1B68
-3A1B68:lI112|H3A1C2C
-3A1C2C:lI108|H3A1CE8
-3A1CE8:lI105|H3A1DA4
-3A1DA4:lI99|H3A1E60
-3A1E60:lI97|H3A1F1C
-3A1F1C:lI116|H3A1FD8
-3A1FD8:lI105|H3A208C
-3A208C:lI111|H3A2148
-3A2148:lI110|H3A21FC
-3A21FC:lI47|H3A22B0
-3A22B0:lI120|H3A236C
-3A236C:lI45|H3A2428
-3A2428:lI103|H3A24D4
-3A24D4:lI116|H3A2590
-3A2590:lI97|H3A2644
-3A2644:lI114|N
-3A1A08:lI103|H3A1AAC
-3A1AAC:lI116|H3A1B60
-3A1B60:lI97|H3A1C24
-3A1C24:lI114|N
-3A1968:lH3A1A18|H3A1A24
-3A1A18:t2:H3A1ABC,H3A1AC4
-3A1AC4:lI97|H3A1B78
-3A1B78:lI112|H3A1C3C
-3A1C3C:lI112|H3A1CF0
-3A1CF0:lI108|H3A1DAC
-3A1DAC:lI105|H3A1E68
-3A1E68:lI99|H3A1F24
-3A1F24:lI97|H3A1FE0
-3A1FE0:lI116|H3A2094
-3A2094:lI105|H3A2150
-3A2150:lI111|H3A2204
-3A2204:lI110|H3A22B8
-3A22B8:lI47|H3A2374
-3A2374:lI120|H3A2430
-3A2430:lI45|H3A24DC
-3A24DC:lI100|H3A2598
-3A2598:lI118|H3A264C
-3A264C:lI105|N
-3A1ABC:lI100|H3A1B70
-3A1B70:lI118|H3A1C34
-3A1C34:lI105|N
-3A1A24:lH3A1ACC|H3A1AD8
-3A1ACC:t2:H3A1B80,H3A1B88
-3A1B88:lI97|H3A1C4C
-3A1C4C:lI112|H3A1D00
-3A1D00:lI112|H3A1DB4
-3A1DB4:lI108|H3A1E70
-3A1E70:lI105|H3A1F2C
-3A1F2C:lI99|H3A1FE8
-3A1FE8:lI97|H3A209C
-3A209C:lI116|H3A2158
-3A2158:lI105|H3A220C
-3A220C:lI111|H3A22C0
-3A22C0:lI110|H3A237C
-3A237C:lI47|H3A2438
-3A2438:lI120|H3A24E4
-3A24E4:lI45|H3A25A0
-3A25A0:lI100|H3A2654
-3A2654:lI105|H3A2708
-3A2708:lI114|H3A27C4
-3A27C4:lI101|H3A2880
-3A2880:lI99|H3A2944
-3A2944:lI116|H3A2A10
-3A2A10:lI111|H3A2ADC
-3A2ADC:lI114|N
-3A1B80:lI100|H3A1C44
-3A1C44:lI99|H3A1CF8
-3A1CF8:lI114|N
-3A1AD8:lH3A1B90|H3A1B9C
-3A1B90:t2:H3A1C54,H3A1C5C
-3A1C5C:lI97|H3A1D10
-3A1D10:lI112|H3A1DC4
-3A1DC4:lI112|H3A1E78
-3A1E78:lI108|H3A1F34
-3A1F34:lI105|H3A1FF0
-3A1FF0:lI99|H3A20A4
-3A20A4:lI97|H3A2160
-3A2160:lI116|H3A2214
-3A2214:lI105|H3A22C8
-3A22C8:lI111|H3A2384
-3A2384:lI110|H3A2440
-3A2440:lI47|H3A24EC
-3A24EC:lI120|H3A25A8
-3A25A8:lI45|H3A265C
-3A265C:lI100|H3A2710
-3A2710:lI105|H3A27CC
-3A27CC:lI114|H3A2888
-3A2888:lI101|H3A294C
-3A294C:lI99|H3A2A18
-3A2A18:lI116|H3A2AE4
-3A2AE4:lI111|H3A2BB0
-3A2BB0:lI114|N
-3A1C54:lI100|H3A1D08
-3A1D08:lI105|H3A1DBC
-3A1DBC:lI114|N
-3A1B9C:lH3A1C64|H3A1C70
-3A1C64:t2:H3A1D18,H3A1D20
-3A1D20:lI97|H3A1DD4
-3A1DD4:lI112|H3A1E88
-3A1E88:lI112|H3A1F3C
-3A1F3C:lI108|H3A1FF8
-3A1FF8:lI105|H3A20AC
-3A20AC:lI99|H3A2168
-3A2168:lI97|H3A221C
-3A221C:lI116|H3A22D0
-3A22D0:lI105|H3A238C
-3A238C:lI111|H3A2448
-3A2448:lI110|H3A24F4
-3A24F4:lI47|H3A25B0
-3A25B0:lI120|H3A2664
-3A2664:lI45|H3A2718
-3A2718:lI100|H3A27D4
-3A27D4:lI105|H3A2890
-3A2890:lI114|H3A2954
-3A2954:lI101|H3A2A20
-3A2A20:lI99|H3A2AEC
-3A2AEC:lI116|H3A2BB8
-3A2BB8:lI111|H3A2C74
-3A2C74:lI114|N
-3A1D18:lI100|H3A1DCC
-3A1DCC:lI120|H3A1E80
-3A1E80:lI114|N
-3A1C70:lH3A1D28|H3A1D34
-3A1D28:t2:H3A1DDC,H3A1DE4
-3A1DE4:lI97|H3A1E98
-3A1E98:lI112|H3A1F4C
-3A1F4C:lI112|H3A2000
-3A2000:lI108|H3A20B4
-3A20B4:lI105|H3A2170
-3A2170:lI99|H3A2224
-3A2224:lI97|H3A22D8
-3A22D8:lI116|H3A2394
-3A2394:lI105|H3A2450
-3A2450:lI111|H3A24FC
-3A24FC:lI110|H3A25B8
-3A25B8:lI47|H3A266C
-3A266C:lI120|H3A2720
-3A2720:lI45|H3A27DC
-3A27DC:lI99|H3A2898
-3A2898:lI115|H3A295C
-3A295C:lI104|N
-3A1DDC:lI99|H3A1E90
-3A1E90:lI115|H3A1F44
-3A1F44:lI104|N
-3A1D34:lH3A1DEC|H3A1DF8
-3A1DEC:t2:H3A1EA0,H3A1EA8
-3A1EA8:lI97|H3A1F5C
-3A1F5C:lI112|H3A2010
-3A2010:lI112|H3A20C4
-3A20C4:lI108|H3A2178
-3A2178:lI105|H3A222C
-3A222C:lI99|H3A22E0
-3A22E0:lI97|H3A239C
-3A239C:lI116|H3A2458
-3A2458:lI105|H3A2504
-3A2504:lI111|H3A25C0
-3A25C0:lI110|H3A2674
-3A2674:lI47|H3A2728
-3A2728:lI120|H3A27E4
-3A27E4:lI45|H3A28A0
-3A28A0:lI99|H3A2964
-3A2964:lI112|H3A2A28
-3A2A28:lI105|H3A2AF4
-3A2AF4:lI111|N
-3A1EA0:lI99|H3A1F54
-3A1F54:lI112|H3A2008
-3A2008:lI105|H3A20BC
-3A20BC:lI111|N
-3A1DF8:lH3A1EB0|H3A1EBC
-3A1EB0:t2:H3A1F64,H3A1F6C
-3A1F6C:lI97|H3A2018
-3A2018:lI112|H3A20CC
-3A20CC:lI112|H3A2180
-3A2180:lI108|H3A2234
-3A2234:lI105|H3A22E8
-3A22E8:lI99|H3A23A4
-3A23A4:lI97|H3A2460
-3A2460:lI116|H3A250C
-3A250C:lI105|H3A25C8
-3A25C8:lI111|H3A267C
-3A267C:lI110|H3A2730
-3A2730:lI47|H3A27EC
-3A27EC:lI120|H3A28A8
-3A28A8:lI45|H3A296C
-3A296C:lI99|H3A2A30
-3A2A30:lI111|H3A2AFC
-3A2AFC:lI109|H3A2BC0
-3A2BC0:lI112|H3A2C7C
-3A2C7C:lI114|H3A2D2C
-3A2D2C:lI101|H3A2DD4
-3A2DD4:lI115|H3A2E6C
-3A2E6C:lI115|N
-3A1F64:lI90|N
-3A1EBC:lH3A1F74|H3A1F80
-3A1F74:t2:H3A2020,H3A2028
-3A2028:lI97|H3A20DC
-3A20DC:lI112|H3A2190
-3A2190:lI112|H3A223C
-3A223C:lI108|H3A22F0
-3A22F0:lI105|H3A23AC
-3A23AC:lI99|H3A2468
-3A2468:lI97|H3A2514
-3A2514:lI116|H3A25D0
-3A25D0:lI105|H3A2684
-3A2684:lI111|H3A2738
-3A2738:lI110|H3A27F4
-3A27F4:lI47|H3A28B0
-3A28B0:lI120|H3A2974
-3A2974:lI45|H3A2A38
-3A2A38:lI99|H3A2B04
-3A2B04:lI100|H3A2BC8
-3A2BC8:lI108|H3A2C84
-3A2C84:lI105|H3A2D34
-3A2D34:lI110|H3A2DDC
-3A2DDC:lI107|N
-3A2020:lI118|H3A20D4
-3A20D4:lI99|H3A2188
-3A2188:lI100|N
-3A1F80:lH3A2030|H3A203C
-3A2030:t2:H3A20E4,H3A20EC
-3A20EC:lI97|H3A21A0
-3A21A0:lI112|H3A224C
-3A224C:lI112|H3A2300
-3A2300:lI108|H3A23BC
-3A23BC:lI105|H3A2470
-3A2470:lI99|H3A251C
-3A251C:lI97|H3A25D8
-3A25D8:lI116|H3A268C
-3A268C:lI105|H3A2740
-3A2740:lI111|H3A27FC
-3A27FC:lI110|H3A28B8
-3A28B8:lI47|H3A297C
-3A297C:lI120|H3A2A40
-3A2A40:lI45|H3A2B0C
-3A2B0C:lI98|H3A2BD0
-3A2BD0:lI99|H3A2C8C
-3A2C8C:lI112|H3A2D3C
-3A2D3C:lI105|H3A2DE4
-3A2DE4:lI111|N
-3A20E4:lI98|H3A2198
-3A2198:lI99|H3A2244
-3A2244:lI112|H3A22F8
-3A22F8:lI105|H3A23B4
-3A23B4:lI111|N
-3A203C:lH3A20F4|H3A2100
-3A20F4:t2:H3A21A8,H3A21B0
-3A21B0:lI97|H3A225C
-3A225C:lI112|H3A2310
-3A2310:lI112|H3A23C4
-3A23C4:lI108|H3A2478
-3A2478:lI105|H3A2524
-3A2524:lI99|H3A25E0
-3A25E0:lI97|H3A2694
-3A2694:lI116|H3A2748
-3A2748:lI105|H3A2804
-3A2804:lI111|H3A28C0
-3A28C0:lI110|H3A2984
-3A2984:lI47|H3A2A48
-3A2A48:lI114|H3A2B14
-3A2B14:lI116|H3A2BD8
-3A2BD8:lI102|N
-3A21A8:lI114|H3A2254
-3A2254:lI116|H3A2308
-3A2308:lI102|N
-3A2100:lH3A21B8|H3A21C4
-3A21B8:t2:H3A2264,H3A226C
-3A226C:lI97|H3A2320
-3A2320:lI112|H3A23D4
-3A23D4:lI112|H3A2480
-3A2480:lI108|H3A252C
-3A252C:lI105|H3A25E8
-3A25E8:lI99|H3A269C
-3A269C:lI97|H3A2750
-3A2750:lI116|H3A280C
-3A280C:lI105|H3A28C8
-3A28C8:lI111|H3A298C
-3A298C:lI110|H3A2A50
-3A2A50:lI47|H3A2B1C
-3A2B1C:lI112|H3A2BE0
-3A2BE0:lI111|H3A2C94
-3A2C94:lI119|H3A2D44
-3A2D44:lI101|H3A2DEC
-3A2DEC:lI114|H3A2E74
-3A2E74:lI112|H3A2EEC
-3A2EEC:lI111|H3A2F64
-3A2F64:lI105|H3A2FD4
-3A2FD4:lI110|H3A303C
-3A303C:lI116|N
-3A2264:lI112|H3A2318
-3A2318:lI112|H3A23CC
-3A23CC:lI116|N
-3A21C4:lH3A2274|H3A2280
-3A2274:t2:H3A2328,H3A2330
-3A2330:lI97|H3A23E4
-3A23E4:lI112|H3A2488
-3A2488:lI112|H3A2534
-3A2534:lI108|H3A25F0
-3A25F0:lI105|H3A26A4
-3A26A4:lI99|H3A2758
-3A2758:lI97|H3A2814
-3A2814:lI116|H3A28D0
-3A28D0:lI105|H3A2994
-3A2994:lI111|H3A2A58
-3A2A58:lI110|H3A2B24
-3A2B24:lI47|H3A2BE8
-3A2BE8:lI112|H3A2C9C
-3A2C9C:lI111|H3A2D4C
-3A2D4C:lI115|H3A2DF4
-3A2DF4:lI116|H3A2E7C
-3A2E7C:lI115|H3A2EF4
-3A2EF4:lI99|H3A2F6C
-3A2F6C:lI114|H3A2FDC
-3A2FDC:lI105|H3A3044
-3A3044:lI112|H3A30A4
-3A30A4:lI116|N
-3A2328:lI97|H3A23DC
-3A23DC:lI105|N
-3A2280:lH3A2338|H3A2344
-3A2338:t2:H3A23EC,H3A23F4
-3A23F4:lI97|H3A2498
-3A2498:lI112|H3A2544
-3A2544:lI112|H3A25F8
-3A25F8:lI108|H3A26AC
-3A26AC:lI105|H3A2760
-3A2760:lI99|H3A281C
-3A281C:lI97|H3A28D8
-3A28D8:lI116|H3A299C
-3A299C:lI105|H3A2A60
-3A2A60:lI111|H3A2B2C
-3A2B2C:lI110|H3A2BF0
-3A2BF0:lI47|H3A2CA4
-3A2CA4:lI112|H3A2D54
-3A2D54:lI111|H3A2DFC
-3A2DFC:lI115|H3A2E84
-3A2E84:lI116|H3A2EFC
-3A2EFC:lI115|H3A2F74
-3A2F74:lI99|H3A2FE4
-3A2FE4:lI114|H3A304C
-3A304C:lI105|H3A30AC
-3A30AC:lI112|H3A3104
-3A3104:lI116|N
-3A23EC:lI101|H3A2490
-3A2490:lI112|H3A253C
-3A253C:lI115|N
-3A2344:lH3A23FC|H3A2408
-3A23FC:t2:H3A24A0,H3A24A8
-3A24A8:lI97|H3A2554
-3A2554:lI112|H3A2600
-3A2600:lI112|H3A26B4
-3A26B4:lI108|H3A2768
-3A2768:lI105|H3A2824
-3A2824:lI99|H3A28E0
-3A28E0:lI97|H3A29A4
-3A29A4:lI116|H3A2A68
-3A2A68:lI105|H3A2B34
-3A2B34:lI111|H3A2BF8
-3A2BF8:lI110|H3A2CAC
-3A2CAC:lI47|H3A2D5C
-3A2D5C:lI112|H3A2E04
-3A2E04:lI111|H3A2E8C
-3A2E8C:lI115|H3A2F04
-3A2F04:lI116|H3A2F7C
-3A2F7C:lI115|H3A2FEC
-3A2FEC:lI99|H3A3054
-3A3054:lI114|H3A30B4
-3A30B4:lI105|H3A310C
-3A310C:lI112|H3A315C
-3A315C:lI116|N
-3A24A0:lI112|H3A254C
-3A254C:lI115|N
-3A2408:lH3A24B0|H3A24BC
-3A24B0:t2:H3A255C,H3A2564
-3A2564:lI97|H3A2610
-3A2610:lI112|H3A26C4
-3A26C4:lI112|H3A2770
-3A2770:lI108|H3A282C
-3A282C:lI105|H3A28E8
-3A28E8:lI99|H3A29AC
-3A29AC:lI97|H3A2A70
-3A2A70:lI116|H3A2B3C
-3A2B3C:lI105|H3A2C00
-3A2C00:lI111|H3A2CB4
-3A2CB4:lI110|H3A2D64
-3A2D64:lI47|H3A2E0C
-3A2E0C:lI112|H3A2E94
-3A2E94:lI100|H3A2F0C
-3A2F0C:lI102|N
-3A255C:lI112|H3A2608
-3A2608:lI100|H3A26BC
-3A26BC:lI102|N
-3A24BC:lH3A256C|H3A2578
-3A256C:t2:H3A2618,H3A2620
-3A2620:lI97|H3A26D4
-3A26D4:lI112|H3A2780
-3A2780:lI112|H3A2834
-3A2834:lI108|H3A28F0
-3A28F0:lI105|H3A29B4
-3A29B4:lI99|H3A2A78
-3A2A78:lI97|H3A2B44
-3A2B44:lI116|H3A2C08
-3A2C08:lI105|H3A2CBC
-3A2CBC:lI111|H3A2D6C
-3A2D6C:lI110|H3A2E14
-3A2E14:lI47|H3A2E9C
-3A2E9C:lI111|H3A2F14
-3A2F14:lI100|H3A2F84
-3A2F84:lI97|N
-3A2618:lI111|H3A26CC
-3A26CC:lI100|H3A2778
-3A2778:lI97|N
-3A2578:lH3A2628|H3A2634
-3A2628:t2:H3A26DC,H3A26E4
-3A26E4:lI97|H3A2790
-3A2790:lI112|H3A2844
-3A2844:lI112|H3A28F8
-3A28F8:lI108|H3A29BC
-3A29BC:lI105|H3A2A80
-3A2A80:lI99|H3A2B4C
-3A2B4C:lI97|H3A2C10
-3A2C10:lI116|H3A2CC4
-3A2CC4:lI105|H3A2D74
-3A2D74:lI111|H3A2E1C
-3A2E1C:lI110|H3A2EA4
-3A2EA4:lI47|H3A2F1C
-3A2F1C:lI111|H3A2F8C
-3A2F8C:lI99|H3A2FF4
-3A2FF4:lI116|H3A305C
-3A305C:lI101|H3A30BC
-3A30BC:lI116|H3A3114
-3A3114:lI45|H3A3164
-3A3164:lI115|H3A31AC
-3A31AC:lI116|H3A31F4
-3A31F4:lI114|H3A323C
-3A323C:lI101|H3A3284
-3A3284:lI97|H3A32CC
-3A32CC:lI109|N
-3A26DC:lI98|H3A2788
-3A2788:lI105|H3A283C
-3A283C:lI110|N
-3A2634:lH3A26EC|H3A26F8
-3A26EC:t2:H3A2798,H3A27A0
-3A27A0:lI97|H3A2854
-3A2854:lI112|H3A2908
-3A2908:lI112|H3A29C4
-3A29C4:lI108|H3A2A88
-3A2A88:lI105|H3A2B54
-3A2B54:lI99|H3A2C18
-3A2C18:lI97|H3A2CCC
-3A2CCC:lI116|H3A2D7C
-3A2D7C:lI105|H3A2E24
-3A2E24:lI111|H3A2EAC
-3A2EAC:lI110|H3A2F24
-3A2F24:lI47|H3A2F94
-3A2F94:lI111|H3A2FFC
-3A2FFC:lI99|H3A3064
-3A3064:lI116|H3A30C4
-3A30C4:lI101|H3A311C
-3A311C:lI116|H3A316C
-3A316C:lI45|H3A31B4
-3A31B4:lI115|H3A31FC
-3A31FC:lI116|H3A3244
-3A3244:lI114|H3A328C
-3A328C:lI101|H3A32D4
-3A32D4:lI97|H3A3314
-3A3314:lI109|N
-3A2798:lI100|H3A284C
-3A284C:lI109|H3A2900
-3A2900:lI115|N
-3A26F8:lH3A27A8|H3A27B4
-3A27A8:t2:H3A285C,H3A2864
-3A2864:lI97|H3A2918
-3A2918:lI112|H3A29D4
-3A29D4:lI112|H3A2A90
-3A2A90:lI108|H3A2B5C
-3A2B5C:lI105|H3A2C20
-3A2C20:lI99|H3A2CD4
-3A2CD4:lI97|H3A2D84
-3A2D84:lI116|H3A2E2C
-3A2E2C:lI105|H3A2EB4
-3A2EB4:lI111|H3A2F2C
-3A2F2C:lI110|H3A2F9C
-3A2F9C:lI47|H3A3004
-3A3004:lI111|H3A306C
-3A306C:lI99|H3A30CC
-3A30CC:lI116|H3A3124
-3A3124:lI101|H3A3174
-3A3174:lI116|H3A31BC
-3A31BC:lI45|H3A3204
-3A3204:lI115|H3A324C
-3A324C:lI116|H3A3294
-3A3294:lI114|H3A32DC
-3A32DC:lI101|H3A331C
-3A331C:lI97|H3A334C
-3A334C:lI109|N
-3A285C:lI108|H3A2910
-3A2910:lI104|H3A29CC
-3A29CC:lI97|N
-3A27B4:lH3A286C|H3A2878
-3A286C:t2:H3A2920,H3A2928
-3A2928:lI97|H3A29E4
-3A29E4:lI112|H3A2AA0
-3A2AA0:lI112|H3A2B64
-3A2B64:lI108|H3A2C28
-3A2C28:lI105|H3A2CDC
-3A2CDC:lI99|H3A2D8C
-3A2D8C:lI97|H3A2E34
-3A2E34:lI116|H3A2EBC
-3A2EBC:lI105|H3A2F34
-3A2F34:lI111|H3A2FA4
-3A2FA4:lI110|H3A300C
-3A300C:lI47|H3A3074
-3A3074:lI111|H3A30D4
-3A30D4:lI99|H3A312C
-3A312C:lI116|H3A317C
-3A317C:lI101|H3A31C4
-3A31C4:lI116|H3A320C
-3A320C:lI45|H3A3254
-3A3254:lI115|H3A329C
-3A329C:lI116|H3A32E4
-3A32E4:lI114|H3A3324
-3A3324:lI101|H3A3354
-3A3354:lI97|H3A337C
-3A337C:lI109|N
-3A2920:lI108|H3A29DC
-3A29DC:lI122|H3A2A98
-3A2A98:lI104|N
-3A2878:lH3A2930|H3A293C
-3A2930:t2:H3A29EC,H3A29F4
-3A29F4:lI97|H3A2AB0
-3A2AB0:lI112|H3A2B74
-3A2B74:lI112|H3A2C30
-3A2C30:lI108|H3A2CE4
-3A2CE4:lI105|H3A2D94
-3A2D94:lI99|H3A2E3C
-3A2E3C:lI97|H3A2EC4
-3A2EC4:lI116|H3A2F3C
-3A2F3C:lI105|H3A2FAC
-3A2FAC:lI111|H3A3014
-3A3014:lI110|H3A307C
-3A307C:lI47|H3A30DC
-3A30DC:lI111|H3A3134
-3A3134:lI99|H3A3184
-3A3184:lI116|H3A31CC
-3A31CC:lI101|H3A3214
-3A3214:lI116|H3A325C
-3A325C:lI45|H3A32A4
-3A32A4:lI115|H3A32EC
-3A32EC:lI116|H3A332C
-3A332C:lI114|H3A335C
-3A335C:lI101|H3A3384
-3A3384:lI97|H3A33A4
-3A33A4:lI109|N
-3A29EC:lI101|H3A2AA8
-3A2AA8:lI120|H3A2B6C
-3A2B6C:lI101|N
-3A293C:lH3A29FC|H3A2A08
-3A29FC:t2:H3A2AB8,H3A2AC0
-3A2AC0:lI97|H3A2B84
-3A2B84:lI112|H3A2C40
-3A2C40:lI112|H3A2CF4
-3A2CF4:lI108|H3A2DA4
-3A2DA4:lI105|H3A2E44
-3A2E44:lI99|H3A2ECC
-3A2ECC:lI97|H3A2F44
-3A2F44:lI116|H3A2FB4
-3A2FB4:lI105|H3A301C
-3A301C:lI111|H3A3084
-3A3084:lI110|H3A30E4
-3A30E4:lI47|H3A313C
-3A313C:lI111|H3A318C
-3A318C:lI99|H3A31D4
-3A31D4:lI116|H3A321C
-3A321C:lI101|H3A3264
-3A3264:lI116|H3A32AC
-3A32AC:lI45|H3A32F4
-3A32F4:lI115|H3A3334
-3A3334:lI116|H3A3364
-3A3364:lI114|H3A338C
-3A338C:lI101|H3A33AC
-3A33AC:lI97|H3A33C4
-3A33C4:lI109|N
-3A2AB8:lI99|H3A2B7C
-3A2B7C:lI108|H3A2C38
-3A2C38:lI97|H3A2CEC
-3A2CEC:lI115|H3A2D9C
-3A2D9C:lI115|N
-3A2A08:lH3A2AC8|H3A2AD4
-3A2AC8:t2:H3A2B8C,H3A2B94
-3A2B94:lI97|H3A2C50
-3A2C50:lI112|H3A2D04
-3A2D04:lI112|H3A2DAC
-3A2DAC:lI108|H3A2E4C
-3A2E4C:lI105|H3A2ED4
-3A2ED4:lI99|H3A2F4C
-3A2F4C:lI97|H3A2FBC
-3A2FBC:lI116|H3A3024
-3A3024:lI105|H3A308C
-3A308C:lI111|H3A30EC
-3A30EC:lI110|H3A3144
-3A3144:lI47|H3A3194
-3A3194:lI109|H3A31DC
-3A31DC:lI115|H3A3224
-3A3224:lI119|H3A326C
-3A326C:lI111|H3A32B4
-3A32B4:lI114|H3A32FC
-3A32FC:lI100|N
-3A2B8C:lI100|H3A2C48
-3A2C48:lI111|H3A2CFC
-3A2CFC:lI99|N
-3A2AD4:lH3A2B9C|H3A2BA8
-3A2B9C:t2:H3A2C58,H3A2C60
-3A2C60:lI97|H3A2D14
-3A2D14:lI112|H3A2DBC
-3A2DBC:lI112|H3A2E54
-3A2E54:lI108|H3A2EDC
-3A2EDC:lI105|H3A2F54
-3A2F54:lI99|H3A2FC4
-3A2FC4:lI97|H3A302C
-3A302C:lI116|H3A3094
-3A3094:lI105|H3A30F4
-3A30F4:lI111|H3A314C
-3A314C:lI110|H3A319C
-3A319C:lI47|H3A31E4
-3A31E4:lI109|H3A322C
-3A322C:lI97|H3A3274
-3A3274:lI99|H3A32BC
-3A32BC:lI45|H3A3304
-3A3304:lI99|H3A333C
-3A333C:lI111|H3A336C
-3A336C:lI109|H3A3394
-3A3394:lI112|H3A33B4
-3A33B4:lI97|H3A33CC
-3A33CC:lI99|H3A33DC
-3A33DC:lI116|H3A33EC
-3A33EC:lI112|H3A33FC
-3A33FC:lI114|H3A340C
-3A340C:lI111|N
-3A2C58:lI99|H3A2D0C
-3A2D0C:lI112|H3A2DB4
-3A2DB4:lI116|N
-3A2BA8:lH3A2C68|N
-3A2C68:t2:H3A2D1C,H3A2D24
-3A2D24:lI97|H3A2DCC
-3A2DCC:lI112|H3A2E64
-3A2E64:lI112|H3A2EE4
-3A2EE4:lI108|H3A2F5C
-3A2F5C:lI105|H3A2FCC
-3A2FCC:lI99|H3A3034
-3A3034:lI97|H3A309C
-3A309C:lI116|H3A30FC
-3A30FC:lI105|H3A3154
-3A3154:lI111|H3A31A4
-3A31A4:lI110|H3A31EC
-3A31EC:lI47|H3A3234
-3A3234:lI109|H3A327C
-3A327C:lI97|H3A32C4
-3A32C4:lI99|H3A330C
-3A330C:lI45|H3A3344
-3A3344:lI98|H3A3374
-3A3374:lI105|H3A339C
-3A339C:lI110|H3A33BC
-3A33BC:lI104|H3A33D4
-3A33D4:lI101|H3A33E4
-3A33E4:lI120|H3A33F4
-3A33F4:lI52|H3A3404
-3A3404:lI48|N
-3A2D1C:lI104|H3A2DC4
-3A2DC4:lI113|H3A2E5C
-3A2E5C:lI120|N
-39DC28:lH39DC68|H39DC74
-39DC68:t2:A4:port,I8888
-39DC74:lH39DCA8|H39DCB4
-39DCA8:t2:AC:bind_address,H39DCF8
-39DCF8:t4:I127,I0,I0,I1
-39DCB4:lH39DD0C|H39DD18
-39DD0C:t2:AB:server_name,H39DD6C
-39DD6C:lI108|H39DDE4
-39DDE4:lI111|H39DE5C
-39DE5C:lI99|H39DEE4
-39DEE4:lI97|H39DF6C
-39DF6C:lI108|H39E00C
-39E00C:lI104|H39E0B4
-39E0B4:lI111|H39E16C
-39E16C:lI115|H39E238
-39E238:lI116|N
-39DD18:lH39DD74|H39DD80
-39DD74:t2:AE:max_header_siz,I1024
-39DD80:lH39DDEC|H39DDF8
-39DDEC:t2:A11:max_header_action,A8:reply414
-39DDF8:lH39DE64|H39DE70
-39DE64:t2:A8:com_type,A7:ip_comm
-39DE70:lH39DEEC|H39DEF8
-39DEEC:t2:A7:modules,H39DF74
-39DF74:lA9:mod_alias|H39E014
-39E014:lA8:mod_auth|H39E0BC
-39E0BC:lA7:mod_esi|H39E174
-39E174:lAB:mod_actions|H39E240
-39E240:lA7:mod_cgi|H39E324
-39E324:lAB:mod_include|H39E418
-39E418:lA7:mod_dir|H39E51C
-39E51C:lA7:mod_get|H39E634
-39E634:lA8:mod_head|H39E748
-39E748:lA7:mod_log|H39E85C
-39E85C:lAC:mod_disk_log|N
-39DEF8:lH39DF7C|H39DF88
-39DF7C:t2:AF:directory_index,H39E01C
-39E01C:lH39E0C4|N
-39E0C4:lI105|H39E17C
-39E17C:lI110|H39E248
-39E248:lI100|H39E32C
-39E32C:lI101|H39E420
-39E420:lI120|H39E524
-39E524:lI46|H39E63C
-39E63C:lI104|H39E750
-39E750:lI116|H39E864
-39E864:lI109|H39E978
-39E978:lI108|N
-39DF88:lH39E024|H39E030
-39E024:t2:AC:default_type,H39E0CC
-39E0CC:lI116|H39E184
-39E184:lI101|H39E250
-39E250:lI120|H39E334
-39E334:lI116|H39E428
-39E428:lI47|H39E52C
-39E52C:lI112|H39E644
-39E644:lI108|H39E758
-39E758:lI97|H39E86C
-39E86C:lI105|H39E980
-39E980:lI110|N
-39E030:lH39E0D4|H39E0E0
-39E0D4:t2:A10:erl_script_alias,H39E18C
-39E18C:t2:H39E258,H39E260
-39E260:lH39E344|N
-39E344:lI119|H39E438
-39E438:lI101|H39E53C
-39E53C:lI98|H39E654
-39E654:lI116|H39E768
-39E768:lI111|H39E87C
-39E87C:lI111|H39E990
-39E990:lI108|N
-39E258:lI47|H39E33C
-39E33C:lI119|H39E430
-39E430:lI101|H39E534
-39E534:lI98|H39E64C
-39E64C:lI116|H39E760
-39E760:lI111|H39E874
-39E874:lI111|H39E988
-39E988:lI108|N
-39E0E0:lH39E198|H39E1A4
-39E198:t2:A5:alias,H39E268
-39E268:t2:H39E34C,H39E354
-39E354:lI47|H39E448
-39E448:lI99|H39E54C
-39E54C:lI108|H39E664
-39E664:lI101|H39E778
-39E778:lI97|H39E88C
-39E88C:lI114|H39E9A0
-39E9A0:lI99|H39EA94
-39EA94:lI97|H39EB88
-39EB88:lI115|H39EC7C
-39EC7C:lI101|H39ED70
-39ED70:lI47|H39EE4C
-39EE4C:lI111|H39EF20
-39EF20:lI116|H39EFFC
-39EFFC:lI112|H39F0E0
-39F0E0:lI47|H39F1B4
-39F1B4:lI101|H39F288
-39F288:lI114|H39F344
-39F344:lI116|H39F408
-39F408:lI115|H39F4D4
-39F4D4:lI47|H39F5A8
-39F5A8:lI108|H39F67C
-39F67C:lI105|H39F750
-39F750:lI98|H39F824
-39F824:lI47|H39F908
-39F908:lI111|H39F9E4
-39F9E4:lI98|H39FAC0
-39FAC0:lI115|H39FB9C
-39FB9C:lI101|H39FC68
-39FC68:lI114|H39FD2C
-39FD2C:lI118|H39FDF8
-39FDF8:lI101|H39FEB4
-39FEB4:lI114|H39FF70
-39FF70:lI47|H3A0024
-3A0024:lI112|H3A00D8
-3A00D8:lI114|H3A0184
-3A0184:lI105|H3A0238
-3A0238:lI118|H3A02F4
-3A02F4:lI47|H3A03A8
-3A03A8:lI99|H3A0444
-3A0444:lI114|H3A04E8
-3A04E8:lI97|H3A058C
-3A058C:lI115|H3A0638
-3A0638:lI104|H3A06EC
-3A06EC:lI100|H3A0798
-3A0798:lI117|H3A083C
-3A083C:lI109|H3A08C8
-3A08C8:lI112|H3A095C
-3A095C:lI95|H3A09F0
-3A09F0:lI118|H3A0A8C
-3A0A8C:lI105|H3A0B38
-3A0B38:lI101|H3A0BE4
-3A0BE4:lI119|H3A0CA0
-3A0CA0:lI101|H3A0D5C
-3A0D5C:lI114|N
-39E34C:lI47|H39E440
-39E440:lI99|H39E544
-39E544:lI114|H39E65C
-39E65C:lI97|H39E770
-39E770:lI115|H39E884
-39E884:lI104|H39E998
-39E998:lI100|H39EA8C
-39EA8C:lI117|H39EB80
-39EB80:lI109|H39EC74
-39EC74:lI112|H39ED68
-39ED68:lI95|H39EE44
-39EE44:lI118|H39EF18
-39EF18:lI105|H39EFF4
-39EFF4:lI101|H39F0D8
-39F0D8:lI119|H39F1AC
-39F1AC:lI101|H39F280
-39F280:lI114|N
-39E1A4:lH39E274|H39E280
-39E274:t2:A5:alias,H39E35C
-39E35C:t2:H39E450,H39E458
-39E458:lI47|H39E55C
-39E55C:lI99|H39E674
-39E674:lI108|H39E788
-39E788:lI101|H39E89C
-39E89C:lI97|H39E9B0
-39E9B0:lI114|H39EAA4
-39EAA4:lI99|H39EB98
-39EB98:lI97|H39EC8C
-39EC8C:lI115|H39ED80
-39ED80:lI101|H39EE5C
-39EE5C:lI47|H39EF30
-39EF30:lI111|H39F00C
-39F00C:lI116|H39F0F0
-39F0F0:lI112|H39F1C4
-39F1C4:lI47|H39F298
-39F298:lI101|H39F354
-39F354:lI114|H39F418
-39F418:lI116|H39F4E4
-39F4E4:lI115|H39F5B0
-39F5B0:lI47|H39F684
-39F684:lI101|H39F758
-39F758:lI114|H39F82C
-39F82C:lI116|H39F910
-39F910:lI115|H39F9EC
-39F9EC:lI47|H39FAC8
-39FAC8:lI100|H39FBA4
-39FBA4:lI111|H39FC70
-39FC70:lI99|H39FD34
-39FD34:lI47|H39FE00
-39FE00:lI104|H39FEBC
-39FEBC:lI116|H39FF78
-39FF78:lI109|H3A002C
-3A002C:lI108|N
-39E450:lI47|H39E554
-39E554:lI99|H39E66C
-39E66C:lI114|H39E780
-39E780:lI97|H39E894
-39E894:lI115|H39E9A8
-39E9A8:lI104|H39EA9C
-39EA9C:lI100|H39EB90
-39EB90:lI117|H39EC84
-39EC84:lI109|H39ED78
-39ED78:lI112|H39EE54
-39EE54:lI95|H39EF28
-39EF28:lI101|H39F004
-39F004:lI114|H39F0E8
-39F0E8:lI116|H39F1BC
-39F1BC:lI115|H39F290
-39F290:lI95|H39F34C
-39F34C:lI100|H39F410
-39F410:lI111|H39F4DC
-39F4DC:lI99|N
-39E280:lH39E368|H39E374
-39E368:t2:A5:alias,H39E460
-39E460:t2:H39E564,H39E56C
-39E56C:lI47|H39E684
-39E684:lI99|H39E798
-39E798:lI108|H39E8AC
-39E8AC:lI101|H39E9C0
-39E9C0:lI97|H39EAB4
-39EAB4:lI114|H39EBA8
-39EBA8:lI99|H39EC9C
-39EC9C:lI97|H39ED90
-39ED90:lI115|H39EE6C
-39EE6C:lI101|H39EF40
-39EF40:lI47|H39F01C
-39F01C:lI111|H39F100
-39F100:lI116|H39F1D4
-39F1D4:lI112|H39F2A0
-39F2A0:lI47|H39F35C
-39F35C:lI101|H39F420
-39F420:lI114|H39F4EC
-39F4EC:lI116|H39F5B8
-39F5B8:lI115|H39F68C
-39F68C:lI47|H39F760
-39F760:lI108|H39F834
-39F834:lI105|H39F918
-39F918:lI98|H39F9F4
-39F9F4:lI47|H39FAD0
-39FAD0:lI111|H39FBAC
-39FBAC:lI98|H39FC78
-39FC78:lI115|H39FD3C
-39FD3C:lI101|H39FE08
-39FE08:lI114|H39FEC4
-39FEC4:lI118|H39FF80
-39FF80:lI101|H3A0034
-3A0034:lI114|H3A00E0
-3A00E0:lI47|H3A018C
-3A018C:lI100|H3A0240
-3A0240:lI111|H3A02FC
-3A02FC:lI99|H3A03B0
-3A03B0:lI47|H3A044C
-3A044C:lI104|H3A04F0
-3A04F0:lI116|H3A0594
-3A0594:lI109|H3A0640
-3A0640:lI108|N
-39E564:lI47|H39E67C
-39E67C:lI99|H39E790
-39E790:lI114|H39E8A4
-39E8A4:lI97|H39E9B8
-39E9B8:lI115|H39EAAC
-39EAAC:lI104|H39EBA0
-39EBA0:lI100|H39EC94
-39EC94:lI117|H39ED88
-39ED88:lI109|H39EE64
-39EE64:lI112|H39EF38
-39EF38:lI95|H39F014
-39F014:lI100|H39F0F8
-39F0F8:lI111|H39F1CC
-39F1CC:lI99|N
-39E374:lH39E46C|N
-39E46C:t2:A10:erl_script_alias,H39E574
-39E574:t2:H39E68C,H39E694
-39E694:lH39E7A8|N
-39E7A8:lI99|H39E8BC
-39E8BC:lI114|H39E9D0
-39E9D0:lI97|H39EAC4
-39EAC4:lI115|H39EBB8
-39EBB8:lI104|H39ECAC
-39ECAC:lI100|H39EDA0
-39EDA0:lI117|H39EE74
-39EE74:lI109|H39EF48
-39EF48:lI112|H39F024
-39F024:lI95|H39F108
-39F108:lI118|H39F1DC
-39F1DC:lI105|H39F2A8
-39F2A8:lI101|H39F364
-39F364:lI119|H39F428
-39F428:lI101|H39F4F4
-39F4F4:lI114|N
-39E68C:lI47|H39E7A0
-39E7A0:lI99|H39E8B4
-39E8B4:lI100|H39E9C8
-39E9C8:lI118|H39EABC
-39EABC:lI95|H39EBB0
-39EBB0:lI101|H39ECA4
-39ECA4:lI114|H39ED98
-39ED98:lI108|N
-39DB58:lN|H39DB9C
-39DB9C:lH39D9FC|H39DBEC
-39D9FC:t4:I127,I0,I0,I1
-39DBEC:lI8888|N
-3A3E20:lH3A3DFC|H3A3704
-3A3DFC:t8:A5:child,P<0.46.0>,H39DAC8,H39DAD8,A9:permanent,I2000,A6:worker,H39DAE8
-39DAE8:lAD:httpd_manager|H39DB38
-39DB38:lAA:gen_server|N
-39DAD8:t3:AD:httpd_manager,AA:start_link,H39DB30
-39DB30:lA9:undefined|H39DB78
-39DB78:lH39DB50|H39DBC0
-39DBC0:lN|N
-39DAC8:t3:AD:httpd_manager,H39D9FC,I8888
-3A3704:lH3A36E0|H39D998
-3A36E0:t8:A5:child,P<0.45.0>,H39DA18,H39DA28,A9:permanent,I2000,AA:supervisor,H39DA38
-39DA38:lAE:httpd_misc_sup|H39DAC0
-39DAC0:lAA:supervisor|N
-39DA28:t3:AE:httpd_misc_sup,A5:start,H39D958
-39D958:lH39D9FC|H39DA10
-39DA10:lI8888|H39DAB8
-39DAB8:lA7:silence|N
-39DA18:t3:AE:httpd_misc_sup,H39D9FC,I8888
-39D998:lH39DA64|N
-39DA64:t8:A5:child,P<0.44.0>,H39DAF0,H39DB00,A9:permanent,I2000,AA:supervisor,H39DB10
-39DB10:lA12:httpd_acceptor_sup|H39DB48
-39DB48:lAA:supervisor|N
-39DB00:t3:A12:httpd_acceptor_sup,A5:start,H39DB40
-39DB40:lH39D9FC|H39DB80
-39DB80:lI8888|H39DBC8
-39DBC8:lA7:silence|N
-39DAF0:t3:A12:httpd_acceptor_sup,H39D9FC,I8888
-39D960:t2:A5:local,A1A:httpd_sup__127_0_0_1__8888
-39D9CC:lAA:gen_server|H39DA90
-39DA90:lP<0.33.0>|H39DB20
-39DB20:lP<0.33.0>|H39DB60
-39DB60:lH39DBA4|H39DBB0
-39DBA4:t2:A5:local,A1A:httpd_sup__127_0_0_1__8888
-39DBB0:lAA:supervisor|H39DBF4
-39DBF4:lH39DC30|H39DC40
-39DC30:t3:H39D960,A9:httpd_sup,H39DA88
-39DC40:lN|N
-39D940:t2:AD:$initial_call,H39D9E4
-39D9E4:t3:A3:gen,A7:init_it,H39D9CC
-39D94C:t2:AA:$ancestors,H39D9F4
-39D9F4:lA8:web_tool|H39DAB0
-39DAB0:lP<0.27.0>|N
-=proc_dictionary:<0.44.0>
-H3756A8
-H3756B4
-H3756C0
-H3756CC
-=proc_stack:<0.44.0>
-36c194:SReturn addr 0x225860 (proc_lib:init_p/5 + 164)
-y0:N
-y1:A8:infinity
-y2:AA:supervisor
-y3:H36C030
-y4:A1E:httpd_acc_sup__127_0_0_1__8888
-y5:P<0.43.0>
-36c1b0:SReturn addr 0x156F90 (<terminate process normally>)
-y0:SCatch 0x225860 (proc_lib:init_p/5 + 164)
-y1:A3:gen
-y2:A7:init_it
-y3:H375710
-=proc_heap:<0.44.0>
-36C030:tA:A5:state,H3756D8,AB:one_for_one,H36C028,N,I500,I100,N,A12:httpd_acceptor_sup,H375730
-375730:lA7:silence|N
-36C028:lH36C004|N
-36C004:t8:A5:child,P<0.47.0>,H36BE80,H36BE90,A9:permanent,I1000,A6:worker,H36BEA0
-36BEA0:lAE:httpd_acceptor|N
-36BE90:t3:AE:httpd_acceptor,AA:start_link,H36BEE8
-36BEE8:lP<0.46.0>|H36BEF0
-36BEF0:lA7:ip_comm|H36BEF8
-36BEF8:lH36BF00|H36BF14
-36BF00:t4:I127,I0,I0,I1
-36BF14:lI8888|H36BF1C
-36BF1C:lA1B:httpd_conf__127_0_0_1__8888|H36BF24
-36BF24:lA7:silence|N
-36BE80:t3:AE:httpd_acceptor,H36BED4,I8888
-36BED4:t4:I127,I0,I0,I1
-3756D8:t2:A5:local,A1E:httpd_acc_sup__127_0_0_1__8888
-375710:lAA:gen_server|H375738
-375738:lP<0.43.0>|H375748
-375748:lP<0.43.0>|H375758
-375758:lH375760|H37576C
-375760:t2:A5:local,A1E:httpd_acc_sup__127_0_0_1__8888
-37576C:lAA:supervisor|H375774
-375774:lH37577C|H37578C
-37577C:t3:H3756D8,A12:httpd_acceptor_sup,H375730
-37578C:lN|N
-3756A8:t2:AD:$initial_call,H375718
-375718:t3:A3:gen,A7:init_it,H375710
-3756B4:t2:A9:verbosity,A7:silence
-3756C0:t2:AA:$ancestors,H375728
-375728:lA1A:httpd_sup__127_0_0_1__8888|H375740
-375740:lA8:web_tool|H375750
-375750:lP<0.27.0>|N
-3756CC:t2:A5:sname,A7:acc_sup
-=proc_dictionary:<0.45.0>
-H36F484
-H36F4F4
-H36F468
-H36F500
-=proc_stack:<0.45.0>
-36f734:SReturn addr 0x225860 (proc_lib:init_p/5 + 164)
-y0:N
-y1:A8:infinity
-y2:AA:supervisor
-y3:H36F5D0
-y4:A1F:httpd_misc_sup__127_0_0_1__8888
-y5:P<0.43.0>
-36f750:SReturn addr 0x156F90 (<terminate process normally>)
-y0:SCatch 0x225860 (proc_lib:init_p/5 + 164)
-y1:A3:gen
-y2:A7:init_it
-y3:H36F430
-=proc_heap:<0.45.0>
-36F5D0:tA:A5:state,H36F3FC,AB:one_for_one,N,N,I0,I1,N,AE:httpd_misc_sup,H36F408
-36F408:lA7:silence|N
-36F3FC:t2:A5:local,A1F:httpd_misc_sup__127_0_0_1__8888
-36F430:lAA:gen_server|H36F428
-36F428:lP<0.43.0>|H36F420
-36F420:lP<0.43.0>|H36F3D0
-36F3D0:lH36F3E0|H36F418
-36F3E0:t2:A5:local,A1F:httpd_misc_sup__127_0_0_1__8888
-36F418:lAA:supervisor|H36F3D8
-36F3D8:lH36F3EC|H36F410
-36F3EC:t3:H36F3FC,AE:httpd_misc_sup,H36F408
-36F410:lN|N
-36F484:t2:AD:$initial_call,H36F474
-36F474:t3:A3:gen,A7:init_it,H36F430
-36F4F4:t2:A9:verbosity,A7:silence
-36F468:t2:AA:$ancestors,H36F460
-36F460:lA1A:httpd_sup__127_0_0_1__8888|H36F440
-36F440:lA8:web_tool|H36F438
-36F438:lP<0.27.0>|N
-36F500:t2:A5:sname,A8:misc_sup
-=proc_dictionary:<0.46.0>
-H3BDA50
-H3BDA5C
-H3BDAC8
-H3BDB28
-H3BDB9C
-H3BDC00
-H3BDADC
-H3BDB3C
-=proc_stack:<0.46.0>
-39d8f4:SReturn addr 0x225860 (proc_lib:init_p/5 + 164)
-y0:N
-y1:A8:infinity
-y2:AD:httpd_manager
-y3:H39D5A4
-y4:A16:httpd__127_0_0_1__8888
-y5:P<0.43.0>
-39d910:SReturn addr 0x156F90 (<terminate process normally>)
-y0:SCatch 0x225860 (proc_lib:init_p/5 + 164)
-y1:A3:gen
-y2:A7:init_it
-y3:H3BDAB0
-=proc_heap:<0.46.0>
-39D5A4:t9:A5:state,A7:ip_comm,A9:undefined,A1B:httpd_conf__127_0_0_1__8888,N,A9:unblocked,A9:undefined,A9:undefined,H39D430
-39D430:lH39BF40|H39D428
-39BF40:t2:A8:max_conn,I1
-39D428:lH39BC80|H39D420
-39BC80:t2:AF:last_heavy_load,A5:never
-39D420:lH39D414|N
-39D414:t2:AF:last_connection,H39D408
-39D408:t2:H39D3E8,H39D3F8
-39D3F8:t3:I11,I22,I34
-39D3E8:t3:I2004,I4,I21
-3BDAB0:lAA:gen_server|H3BDB20
-3BDB20:lP<0.43.0>|H3BDB94
-3BDB94:lP<0.43.0>|H3BDBF8
-3BDBF8:lH3BDC48|H3BDC54
-3BDC48:t2:A5:local,A16:httpd__127_0_0_1__8888
-3BDC54:lAD:httpd_manager|H3BDCAC
-3BDCAC:lH3BDD14|H3BDD1C
-3BDD14:lA9:undefined|H3BDD9C
-3BDD9C:lH3BDA84|H3BDE2C
-3BDA84:lH3BDAF0|H3BDAFC
-3BDAF0:t2:AB:server_root,H3BDB48
-3BDB48:lI47|H3BDBB0
-3BDBB0:lI99|H3BDC0C
-3BDC0C:lI108|H3BDC64
-3BDC64:lI101|H3BDCBC
-3BDCBC:lI97|H3BDD2C
-3BDD2C:lI114|H3BDDA4
-3BDDA4:lI99|H3BDE34
-3BDE34:lI97|H3BDED4
-3BDED4:lI115|H3BDF90
-3BDF90:lI101|H3BE054
-3BE054:lI47|H3BE128
-3BE128:lI111|H3BE204
-3BE204:lI116|H3BE2EC
-3BE2EC:lI112|H3BE3E0
-3BE3E0:lI47|H3BE4E4
-3BE4E4:lI101|H3BE5E8
-3BE5E8:lI114|H3BE6EC
-3BE6EC:lI116|H3BE7E0
-3BE7E0:lI115|H3BE8CC
-3BE8CC:lI47|H3BE9B8
-3BE9B8:lI108|H3BEAAC
-3BEAAC:lI105|H3BEB98
-3BEB98:lI98|H3BEC84
-3BEC84:lI47|H3BED70
-3BED70:lI119|H3BEE5C
-3BEE5C:lI101|H3BEF30
-3BEF30:lI98|H3BEFFC
-3BEFFC:lI116|H3BF0C8
-3BF0C8:lI111|H3BF19C
-3BF19C:lI111|H3BF260
-3BF260:lI108|H3BF314
-3BF314:lI47|H3BF3C0
-3BF3C0:lI112|H3BF474
-3BF474:lI114|H3BF530
-3BF530:lI105|H3BF5F4
-3BF5F4:lI118|H3BF6C8
-3BF6C8:lI47|H3BF79C
-3BF79C:lI114|H3BF870
-3BF870:lI111|H3BF954
-3BF954:lI111|H3BFA30
-3BFA30:lI116|N
-3BDAFC:lH3BDB50|H3BDB5C
-3BDB50:t2:AD:document_root,H3BDBB8
-3BDBB8:lI47|H3BDC14
-3BDC14:lI99|H3BDC6C
-3BDC6C:lI108|H3BDCC4
-3BDCC4:lI101|H3BDD34
-3BDD34:lI97|H3BDDAC
-3BDDAC:lI114|H3BDE3C
-3BDE3C:lI99|H3BDEDC
-3BDEDC:lI97|H3BDF98
-3BDF98:lI115|H3BE05C
-3BE05C:lI101|H3BE130
-3BE130:lI47|H3BE20C
-3BE20C:lI111|H3BE2F4
-3BE2F4:lI116|H3BE3E8
-3BE3E8:lI112|H3BE4EC
-3BE4EC:lI47|H3BE5F0
-3BE5F0:lI101|H3BE6F4
-3BE6F4:lI114|H3BE7E8
-3BE7E8:lI116|H3BE8D4
-3BE8D4:lI115|H3BE9C0
-3BE9C0:lI47|H3BEAB4
-3BEAB4:lI108|H3BEBA0
-3BEBA0:lI105|H3BEC8C
-3BEC8C:lI98|H3BED78
-3BED78:lI47|H3BEE64
-3BEE64:lI119|H3BEF38
-3BEF38:lI101|H3BF004
-3BF004:lI98|H3BF0D0
-3BF0D0:lI116|H3BF1A4
-3BF1A4:lI111|H3BF268
-3BF268:lI111|H3BF31C
-3BF31C:lI108|H3BF3C8
-3BF3C8:lI47|H3BF47C
-3BF47C:lI112|H3BF538
-3BF538:lI114|H3BF5FC
-3BF5FC:lI105|H3BF6D0
-3BF6D0:lI118|H3BF7A4
-3BF7A4:lI47|H3BF878
-3BF878:lI114|H3BF95C
-3BF95C:lI111|H3BFA38
-3BFA38:lI111|H3BFB0C
-3BFB0C:lI116|H3BFBE8
-3BFBE8:lI47|H3BFCB4
-3BFCB4:lI100|H3BFD78
-3BFD78:lI111|H3BFE3C
-3BFE3C:lI99|N
-3BDB5C:lH3BDBC0|H3BDBCC
-3BDBC0:t2:AA:mime_types,H3BDC1C
-3BDC1C:lH3BDC74|H3BDC80
-3BDC74:t2:H3BDCCC,H3BDCD4
-3BDCD4:lI120|H3BDD44
-3BDD44:lI45|H3BDDBC
-3BDDBC:lI119|H3BDE44
-3BDE44:lI111|H3BDEE4
-3BDEE4:lI114|H3BDFA0
-3BDFA0:lI108|H3BE064
-3BE064:lI100|H3BE138
-3BE138:lI47|H3BE214
-3BE214:lI120|H3BE2FC
-3BE2FC:lI45|H3BE3F0
-3BE3F0:lI118|H3BE4F4
-3BE4F4:lI114|H3BE5F8
-3BE5F8:lI109|H3BE6FC
-3BE6FC:lI108|N
-3BDCCC:lI119|H3BDD3C
-3BDD3C:lI114|H3BDDB4
-3BDDB4:lI108|N
-3BDC80:lH3BDCDC|H3BDCE8
-3BDCDC:t2:H3BDD4C,H3BDD54
-3BDD54:lI120|H3BDDCC
-3BDDCC:lI45|H3BDE54
-3BDE54:lI119|H3BDEF4
-3BDEF4:lI111|H3BDFA8
-3BDFA8:lI114|H3BE06C
-3BE06C:lI108|H3BE140
-3BE140:lI100|H3BE21C
-3BE21C:lI47|H3BE304
-3BE304:lI120|H3BE3F8
-3BE3F8:lI45|H3BE4FC
-3BE4FC:lI118|H3BE600
-3BE600:lI114|H3BE704
-3BE704:lI109|H3BE7F0
-3BE7F0:lI108|N
-3BDD4C:lI118|H3BDDC4
-3BDDC4:lI114|H3BDE4C
-3BDE4C:lI109|H3BDEEC
-3BDEEC:lI108|N
-3BDCE8:lH3BDD5C|H3BDD68
-3BDD5C:t2:H3BDDD4,H3BDDDC
-3BDDDC:lI120|H3BDE64
-3BDE64:lI45|H3BDF04
-3BDF04:lI99|H3BDFB0
-3BDFB0:lI111|H3BE074
-3BE074:lI110|H3BE148
-3BE148:lI102|H3BE224
-3BE224:lI101|H3BE30C
-3BE30C:lI114|H3BE400
-3BE400:lI101|H3BE504
-3BE504:lI110|H3BE608
-3BE608:lI99|H3BE70C
-3BE70C:lI101|H3BE7F8
-3BE7F8:lI47|H3BE8DC
-3BE8DC:lI120|H3BE9C8
-3BE9C8:lI45|H3BEABC
-3BEABC:lI99|H3BEBA8
-3BEBA8:lI111|H3BEC94
-3BEC94:lI111|H3BED80
-3BED80:lI108|H3BEE6C
-3BEE6C:lI116|H3BEF40
-3BEF40:lI97|H3BF00C
-3BF00C:lI108|H3BF0D8
-3BF0D8:lI107|N
-3BDDD4:lI105|H3BDE5C
-3BDE5C:lI99|H3BDEFC
-3BDEFC:lI101|N
-3BDD68:lH3BDDE4|H3BDDF0
-3BDDE4:t2:H3BDE6C,H3BDE74
-3BDE74:lI118|H3BDF14
-3BDF14:lI105|H3BDFC0
-3BDFC0:lI100|H3BE084
-3BE084:lI101|H3BE158
-3BE158:lI111|H3BE22C
-3BE22C:lI47|H3BE314
-3BE314:lI120|H3BE408
-3BE408:lI45|H3BE50C
-3BE50C:lI115|H3BE610
-3BE610:lI103|H3BE714
-3BE714:lI105|H3BE800
-3BE800:lI45|H3BE8E4
-3BE8E4:lI109|H3BE9D0
-3BE9D0:lI111|H3BEAC4
-3BEAC4:lI118|H3BEBB0
-3BEBB0:lI105|H3BEC9C
-3BEC9C:lI101|N
-3BDE6C:lI109|H3BDF0C
-3BDF0C:lI111|H3BDFB8
-3BDFB8:lI118|H3BE07C
-3BE07C:lI105|H3BE150
-3BE150:lI101|N
-3BDDF0:lH3BDE7C|H3BDE88
-3BDE7C:t2:H3BDF1C,H3BDF24
-3BDF24:lI118|H3BDFD0
-3BDFD0:lI105|H3BE094
-3BE094:lI100|H3BE160
-3BE160:lI101|H3BE234
-3BE234:lI111|H3BE31C
-3BE31C:lI47|H3BE410
-3BE410:lI120|H3BE514
-3BE514:lI45|H3BE618
-3BE618:lI109|H3BE71C
-3BE71C:lI115|H3BE808
-3BE808:lI118|H3BE8EC
-3BE8EC:lI105|H3BE9D8
-3BE9D8:lI100|H3BEACC
-3BEACC:lI101|H3BEBB8
-3BEBB8:lI111|N
-3BDF1C:lI97|H3BDFC8
-3BDFC8:lI118|H3BE08C
-3BE08C:lI105|N
-3BDE88:lH3BDF2C|H3BDF38
-3BDF2C:t2:H3BDFD8,H3BDFE0
-3BDFE0:lI118|H3BE0A4
-3BE0A4:lI105|H3BE168
-3BE168:lI100|H3BE23C
-3BE23C:lI101|H3BE324
-3BE324:lI111|H3BE418
-3BE418:lI47|H3BE51C
-3BE51C:lI113|H3BE620
-3BE620:lI117|H3BE724
-3BE724:lI105|H3BE810
-3BE810:lI99|H3BE8F4
-3BE8F4:lI107|H3BE9E0
-3BE9E0:lI116|H3BEAD4
-3BEAD4:lI105|H3BEBC0
-3BEBC0:lI109|H3BECA4
-3BECA4:lI101|N
-3BDFD8:lI113|H3BE09C
-3BE09C:lI116|N
-3BDF38:lH3BDFE8|H3BDFF4
-3BDFE8:t2:H3BE0AC,H3BE0B4
-3BE0B4:lI118|H3BE178
-3BE178:lI105|H3BE24C
-3BE24C:lI100|H3BE32C
-3BE32C:lI101|H3BE420
-3BE420:lI111|H3BE524
-3BE524:lI47|H3BE628
-3BE628:lI113|H3BE72C
-3BE72C:lI117|H3BE818
-3BE818:lI105|H3BE8FC
-3BE8FC:lI99|H3BE9E8
-3BE9E8:lI107|H3BEADC
-3BEADC:lI116|H3BEBC8
-3BEBC8:lI105|H3BECAC
-3BECAC:lI109|H3BED88
-3BED88:lI101|N
-3BE0AC:lI109|H3BE170
-3BE170:lI111|H3BE244
-3BE244:lI118|N
-3BDFF4:lH3BE0BC|H3BE0C8
-3BE0BC:t2:H3BE180,H3BE188
-3BE188:lI118|H3BE25C
-3BE25C:lI105|H3BE33C
-3BE33C:lI100|H3BE430
-3BE430:lI101|H3BE52C
-3BE52C:lI111|H3BE630
-3BE630:lI47|H3BE734
-3BE734:lI109|H3BE820
-3BE820:lI112|H3BE904
-3BE904:lI101|H3BE9F0
-3BE9F0:lI103|N
-3BE180:lI109|H3BE254
-3BE254:lI112|H3BE334
-3BE334:lI101|H3BE428
-3BE428:lI103|N
-3BE0C8:lH3BE190|H3BE19C
-3BE190:t2:H3BE264,H3BE26C
-3BE26C:lI118|H3BE34C
-3BE34C:lI105|H3BE440
-3BE440:lI100|H3BE534
-3BE534:lI101|H3BE638
-3BE638:lI111|H3BE73C
-3BE73C:lI47|H3BE828
-3BE828:lI109|H3BE90C
-3BE90C:lI112|H3BE9F8
-3BE9F8:lI101|H3BEAE4
-3BEAE4:lI103|N
-3BE264:lI109|H3BE344
-3BE344:lI112|H3BE438
-3BE438:lI103|N
-3BE19C:lH3BE274|H3BE280
-3BE274:t2:H3BE354,H3BE35C
-3BE35C:lI118|H3BE450
-3BE450:lI105|H3BE544
-3BE544:lI100|H3BE640
-3BE640:lI101|H3BE744
-3BE744:lI111|H3BE830
-3BE830:lI47|H3BE914
-3BE914:lI109|H3BEA00
-3BEA00:lI112|H3BEAEC
-3BEAEC:lI101|H3BEBD0
-3BEBD0:lI103|N
-3BE354:lI109|H3BE448
-3BE448:lI112|H3BE53C
-3BE53C:lI101|N
-3BE280:lH3BE364|H3BE370
-3BE364:t2:H3BE458,H3BE460
-3BE460:lI116|H3BE554
-3BE554:lI101|H3BE650
-3BE650:lI120|H3BE754
-3BE754:lI116|H3BE838
-3BE838:lI47|H3BE91C
-3BE91C:lI120|H3BEA08
-3BEA08:lI45|H3BEAF4
-3BEAF4:lI115|H3BEBD8
-3BEBD8:lI103|H3BECB4
-3BECB4:lI109|H3BED90
-3BED90:lI108|N
-3BE458:lI115|H3BE54C
-3BE54C:lI103|H3BE648
-3BE648:lI109|H3BE74C
-3BE74C:lI108|N
-3BE370:lH3BE468|H3BE474
-3BE468:t2:H3BE55C,H3BE564
-3BE564:lI116|H3BE660
-3BE660:lI101|H3BE764
-3BE764:lI120|H3BE840
-3BE840:lI116|H3BE924
-3BE924:lI47|H3BEA10
-3BEA10:lI120|H3BEAFC
-3BEAFC:lI45|H3BEBE0
-3BEBE0:lI115|H3BECBC
-3BECBC:lI103|H3BED98
-3BED98:lI109|H3BEE74
-3BEE74:lI108|N
-3BE55C:lI115|H3BE658
-3BE658:lI103|H3BE75C
-3BE75C:lI109|N
-3BE474:lH3BE56C|H3BE578
-3BE56C:t2:H3BE668,H3BE670
-3BE670:lI116|H3BE774
-3BE774:lI101|H3BE850
-3BE850:lI120|H3BE92C
-3BE92C:lI116|H3BEA18
-3BEA18:lI47|H3BEB04
-3BEB04:lI120|H3BEBE8
-3BEBE8:lI45|H3BECC4
-3BECC4:lI115|H3BEDA0
-3BEDA0:lI101|H3BEE7C
-3BEE7C:lI116|H3BEF48
-3BEF48:lI101|H3BF014
-3BF014:lI120|H3BF0E0
-3BF0E0:lI116|N
-3BE668:lI101|H3BE76C
-3BE76C:lI116|H3BE848
-3BE848:lI120|N
-3BE578:lH3BE678|H3BE684
-3BE678:t2:H3BE77C,H3BE784
-3BE784:lI116|H3BE860
-3BE860:lI101|H3BE93C
-3BE93C:lI120|H3BEA20
-3BEA20:lI116|H3BEB0C
-3BEB0C:lI47|H3BEBF0
-3BEBF0:lI116|H3BECCC
-3BECCC:lI97|H3BEDA8
-3BEDA8:lI98|H3BEE84
-3BEE84:lI45|H3BEF50
-3BEF50:lI115|H3BF01C
-3BF01C:lI101|H3BF0E8
-3BF0E8:lI112|H3BF1AC
-3BF1AC:lI97|H3BF270
-3BF270:lI114|H3BF324
-3BF324:lI97|H3BF3D0
-3BF3D0:lI116|H3BF484
-3BF484:lI101|H3BF540
-3BF540:lI100|H3BF604
-3BF604:lI45|H3BF6D8
-3BF6D8:lI118|H3BF7AC
-3BF7AC:lI97|H3BF880
-3BF880:lI108|H3BF964
-3BF964:lI117|H3BFA40
-3BFA40:lI101|H3BFB14
-3BFB14:lI115|N
-3BE77C:lI116|H3BE858
-3BE858:lI115|H3BE934
-3BE934:lI118|N
-3BE684:lH3BE78C|H3BE798
-3BE78C:t2:H3BE868,H3BE870
-3BE870:lI116|H3BE94C
-3BE94C:lI101|H3BEA30
-3BEA30:lI120|H3BEB14
-3BEB14:lI116|H3BEBF8
-3BEBF8:lI47|H3BECD4
-3BECD4:lI114|H3BEDB0
-3BEDB0:lI105|H3BEE8C
-3BEE8C:lI99|H3BEF58
-3BEF58:lI104|H3BF024
-3BF024:lI116|H3BF0F0
-3BF0F0:lI101|H3BF1B4
-3BF1B4:lI120|H3BF278
-3BF278:lI116|N
-3BE868:lI114|H3BE944
-3BE944:lI116|H3BEA28
-3BEA28:lI120|N
-3BE798:lH3BE878|H3BE884
-3BE878:t2:H3BE954,H3BE95C
-3BE95C:lI116|H3BEA40
-3BEA40:lI101|H3BEB24
-3BEB24:lI120|H3BEC00
-3BEC00:lI116|H3BECDC
-3BECDC:lI47|H3BEDB8
-3BEDB8:lI112|H3BEE94
-3BEE94:lI108|H3BEF60
-3BEF60:lI97|H3BF02C
-3BF02C:lI105|H3BF0F8
-3BF0F8:lI110|N
-3BE954:lI116|H3BEA38
-3BEA38:lI120|H3BEB1C
-3BEB1C:lI116|N
-3BE884:lH3BE964|H3BE970
-3BE964:t2:H3BEA48,H3BEA50
-3BEA50:lI116|H3BEB34
-3BEB34:lI101|H3BEC10
-3BEC10:lI120|H3BECEC
-3BECEC:lI116|H3BEDC8
-3BEDC8:lI47|H3BEE9C
-3BEE9C:lI120|H3BEF68
-3BEF68:lI45|H3BF034
-3BF034:lI115|H3BF100
-3BF100:lI101|H3BF1BC
-3BF1BC:lI114|H3BF280
-3BF280:lI118|H3BF32C
-3BF32C:lI101|H3BF3D8
-3BF3D8:lI114|H3BF48C
-3BF48C:lI45|H3BF548
-3BF548:lI112|H3BF60C
-3BF60C:lI97|H3BF6E0
-3BF6E0:lI114|H3BF7B4
-3BF7B4:lI115|H3BF888
-3BF888:lI101|H3BF96C
-3BF96C:lI100|H3BFA48
-3BFA48:lI45|H3BFB1C
-3BFB1C:lI104|H3BFBF0
-3BFBF0:lI116|H3BFCBC
-3BFCBC:lI109|H3BFD80
-3BFD80:lI108|N
-3BEA48:lI115|H3BEB2C
-3BEB2C:lI104|H3BEC08
-3BEC08:lI116|H3BECE4
-3BECE4:lI109|H3BEDC0
-3BEDC0:lI108|N
-3BE970:lH3BEA58|H3BEA64
-3BEA58:t2:H3BEB3C,H3BEB44
-3BEB44:lI116|H3BEC20
-3BEC20:lI101|H3BECFC
-3BECFC:lI120|H3BEDD8
-3BEDD8:lI116|H3BEEA4
-3BEEA4:lI47|H3BEF70
-3BEF70:lI104|H3BF03C
-3BF03C:lI116|H3BF108
-3BF108:lI109|H3BF1C4
-3BF1C4:lI108|N
-3BEB3C:lI104|H3BEC18
-3BEC18:lI116|H3BECF4
-3BECF4:lI109|H3BEDD0
-3BEDD0:lI108|N
-3BEA64:lH3BEB4C|H3BEB58
-3BEB4C:t2:H3BEC28,H3BEC30
-3BEC30:lI116|H3BED0C
-3BED0C:lI101|H3BEDE8
-3BEDE8:lI120|H3BEEAC
-3BEEAC:lI116|H3BEF78
-3BEF78:lI47|H3BF044
-3BF044:lI104|H3BF110
-3BF110:lI116|H3BF1CC
-3BF1CC:lI109|H3BF288
-3BF288:lI108|N
-3BEC28:lI104|H3BED04
-3BED04:lI116|H3BEDE0
-3BEDE0:lI109|N
-3BEB58:lH3BEC38|H3BEC44
-3BEC38:t2:H3BED14,H3BED1C
-3BED1C:lI105|H3BEDF8
-3BEDF8:lI109|H3BEEBC
-3BEEBC:lI97|H3BEF80
-3BEF80:lI103|H3BF04C
-3BF04C:lI101|H3BF118
-3BF118:lI47|H3BF1D4
-3BF1D4:lI120|H3BF290
-3BF290:lI45|H3BF334
-3BF334:lI120|H3BF3E0
-3BF3E0:lI119|H3BF494
-3BF494:lI105|H3BF550
-3BF550:lI110|H3BF614
-3BF614:lI100|H3BF6E8
-3BF6E8:lI111|H3BF7BC
-3BF7BC:lI119|H3BF890
-3BF890:lI100|H3BF974
-3BF974:lI117|H3BFA50
-3BFA50:lI109|H3BFB24
-3BFB24:lI112|N
-3BED14:lI120|H3BEDF0
-3BEDF0:lI119|H3BEEB4
-3BEEB4:lI100|N
-3BEC44:lH3BED24|H3BED30
-3BED24:t2:H3BEE00,H3BEE08
-3BEE08:lI105|H3BEECC
-3BEECC:lI109|H3BEF90
-3BEF90:lI97|H3BF054
-3BF054:lI103|H3BF120
-3BF120:lI101|H3BF1DC
-3BF1DC:lI47|H3BF298
-3BF298:lI120|H3BF33C
-3BF33C:lI45|H3BF3E8
-3BF3E8:lI120|H3BF49C
-3BF49C:lI112|H3BF558
-3BF558:lI105|H3BF61C
-3BF61C:lI120|H3BF6F0
-3BF6F0:lI109|H3BF7C4
-3BF7C4:lI97|H3BF898
-3BF898:lI112|N
-3BEE00:lI120|H3BEEC4
-3BEEC4:lI112|H3BEF88
-3BEF88:lI109|N
-3BED30:lH3BEE10|H3BEE1C
-3BEE10:t2:H3BEED4,H3BEEDC
-3BEEDC:lI105|H3BEFA0
-3BEFA0:lI109|H3BF064
-3BF064:lI97|H3BF128
-3BF128:lI103|H3BF1E4
-3BF1E4:lI101|H3BF2A0
-3BF2A0:lI47|H3BF344
-3BF344:lI120|H3BF3F0
-3BF3F0:lI45|H3BF4A4
-3BF4A4:lI120|H3BF560
-3BF560:lI98|H3BF624
-3BF624:lI105|H3BF6F8
-3BF6F8:lI116|H3BF7CC
-3BF7CC:lI109|H3BF8A0
-3BF8A0:lI97|H3BF97C
-3BF97C:lI112|N
-3BEED4:lI120|H3BEF98
-3BEF98:lI98|H3BF05C
-3BF05C:lI109|N
-3BEE1C:lH3BEEE4|H3BEEF0
-3BEEE4:t2:H3BEFA8,H3BEFB0
-3BEFB0:lI105|H3BF074
-3BF074:lI109|H3BF138
-3BF138:lI97|H3BF1EC
-3BF1EC:lI103|H3BF2A8
-3BF2A8:lI101|H3BF34C
-3BF34C:lI47|H3BF3F8
-3BF3F8:lI120|H3BF4AC
-3BF4AC:lI45|H3BF568
-3BF568:lI114|H3BF62C
-3BF62C:lI103|H3BF700
-3BF700:lI98|N
-3BEFA8:lI114|H3BF06C
-3BF06C:lI103|H3BF130
-3BF130:lI98|N
-3BEEF0:lH3BEFB8|H3BEFC4
-3BEFB8:t2:H3BF07C,H3BF084
-3BF084:lI105|H3BF148
-3BF148:lI109|H3BF1FC
-3BF1FC:lI97|H3BF2B0
-3BF2B0:lI103|H3BF354
-3BF354:lI101|H3BF400
-3BF400:lI47|H3BF4B4
-3BF4B4:lI120|H3BF570
-3BF570:lI45|H3BF634
-3BF634:lI112|H3BF708
-3BF708:lI111|H3BF7D4
-3BF7D4:lI114|H3BF8A8
-3BF8A8:lI116|H3BF984
-3BF984:lI97|H3BFA58
-3BFA58:lI98|H3BFB2C
-3BFB2C:lI108|H3BFBF8
-3BFBF8:lI101|H3BFCC4
-3BFCC4:lI45|H3BFD88
-3BFD88:lI112|H3BFE44
-3BFE44:lI105|H3BFEF0
-3BFEF0:lI120|H3BFFA4
-3BFFA4:lI109|H3C0050
-3C0050:lI97|H3C00FC
-3C00FC:lI112|N
-3BF07C:lI112|H3BF140
-3BF140:lI112|H3BF1F4
-3BF1F4:lI109|N
-3BEFC4:lH3BF08C|H3BF098
-3BF08C:t2:H3BF150,H3BF158
-3BF158:lI105|H3BF20C
-3BF20C:lI109|H3BF2C0
-3BF2C0:lI97|H3BF35C
-3BF35C:lI103|H3BF408
-3BF408:lI101|H3BF4BC
-3BF4BC:lI47|H3BF578
-3BF578:lI120|H3BF63C
-3BF63C:lI45|H3BF710
-3BF710:lI112|H3BF7DC
-3BF7DC:lI111|H3BF8B0
-3BF8B0:lI114|H3BF98C
-3BF98C:lI116|H3BFA60
-3BFA60:lI97|H3BFB34
-3BFB34:lI98|H3BFC00
-3BFC00:lI108|H3BFCCC
-3BFCCC:lI101|H3BFD90
-3BFD90:lI45|H3BFE4C
-3BFE4C:lI103|H3BFEF8
-3BFEF8:lI114|H3BFFAC
-3BFFAC:lI97|H3C0058
-3C0058:lI121|H3C0104
-3C0104:lI109|H3C01A8
-3C01A8:lI97|H3C025C
-3C025C:lI112|N
-3BF150:lI112|H3BF204
-3BF204:lI103|H3BF2B8
-3BF2B8:lI109|N
-3BF098:lH3BF160|H3BF16C
-3BF160:t2:H3BF214,H3BF21C
-3BF21C:lI105|H3BF2D0
-3BF2D0:lI109|H3BF36C
-3BF36C:lI97|H3BF410
-3BF410:lI103|H3BF4C4
-3BF4C4:lI101|H3BF580
-3BF580:lI47|H3BF644
-3BF644:lI120|H3BF718
-3BF718:lI45|H3BF7E4
-3BF7E4:lI112|H3BF8B8
-3BF8B8:lI111|H3BF994
-3BF994:lI114|H3BFA68
-3BFA68:lI116|H3BFB3C
-3BFB3C:lI97|H3BFC08
-3BFC08:lI98|H3BFCD4
-3BFCD4:lI108|H3BFD98
-3BFD98:lI101|H3BFE54
-3BFE54:lI45|H3BFF00
-3BFF00:lI98|H3BFFB4
-3BFFB4:lI105|H3C0060
-3C0060:lI116|H3C010C
-3C010C:lI109|H3C01B0
-3C01B0:lI97|H3C0264
-3C0264:lI112|N
-3BF214:lI112|H3BF2C8
-3BF2C8:lI98|H3BF364
-3BF364:lI109|N
-3BF16C:lH3BF224|H3BF230
-3BF224:t2:H3BF2D8,H3BF2E0
-3BF2E0:lI105|H3BF37C
-3BF37C:lI109|H3BF420
-3BF420:lI97|H3BF4CC
-3BF4CC:lI103|H3BF588
-3BF588:lI101|H3BF64C
-3BF64C:lI47|H3BF720
-3BF720:lI120|H3BF7EC
-3BF7EC:lI45|H3BF8C0
-3BF8C0:lI112|H3BF99C
-3BF99C:lI111|H3BFA70
-3BFA70:lI114|H3BFB44
-3BFB44:lI116|H3BFC10
-3BFC10:lI97|H3BFCDC
-3BFCDC:lI98|H3BFDA0
-3BFDA0:lI108|H3BFE5C
-3BFE5C:lI101|H3BFF08
-3BFF08:lI45|H3BFFBC
-3BFFBC:lI97|H3C0068
-3C0068:lI110|H3C0114
-3C0114:lI121|H3C01B8
-3C01B8:lI109|H3C026C
-3C026C:lI97|H3C0318
-3C0318:lI112|N
-3BF2D8:lI112|H3BF374
-3BF374:lI110|H3BF418
-3BF418:lI109|N
-3BF230:lH3BF2E8|H3BF2F4
-3BF2E8:t2:H3BF384,H3BF38C
-3BF38C:lI105|H3BF430
-3BF430:lI109|H3BF4DC
-3BF4DC:lI97|H3BF590
-3BF590:lI103|H3BF654
-3BF654:lI101|H3BF728
-3BF728:lI47|H3BF7F4
-3BF7F4:lI120|H3BF8C8
-3BF8C8:lI45|H3BF9A4
-3BF9A4:lI99|H3BFA78
-3BFA78:lI109|H3BFB4C
-3BFB4C:lI117|H3BFC18
-3BFC18:lI45|H3BFCE4
-3BFCE4:lI114|H3BFDA8
-3BFDA8:lI97|H3BFE64
-3BFE64:lI115|H3BFF10
-3BFF10:lI116|H3BFFC4
-3BFFC4:lI101|H3C0070
-3C0070:lI114|N
-3BF384:lI114|H3BF428
-3BF428:lI97|H3BF4D4
-3BF4D4:lI115|N
-3BF2F4:lH3BF394|H3BF3A0
-3BF394:t2:H3BF438,H3BF440
-3BF440:lI105|H3BF4EC
-3BF4EC:lI109|H3BF5A0
-3BF5A0:lI97|H3BF664
-3BF664:lI103|H3BF730
-3BF730:lI101|H3BF7FC
-3BF7FC:lI47|H3BF8D0
-3BF8D0:lI116|H3BF9AC
-3BF9AC:lI105|H3BFA80
-3BFA80:lI102|H3BFB54
-3BFB54:lI102|N
-3BF438:lI116|H3BF4E4
-3BF4E4:lI105|H3BF598
-3BF598:lI102|H3BF65C
-3BF65C:lI102|N
-3BF3A0:lH3BF448|H3BF454
-3BF448:t2:H3BF4F4,H3BF4FC
-3BF4FC:lI105|H3BF5B0
-3BF5B0:lI109|H3BF674
-3BF674:lI97|H3BF738
-3BF738:lI103|H3BF804
-3BF804:lI101|H3BF8D8
-3BF8D8:lI47|H3BF9B4
-3BF9B4:lI116|H3BFA88
-3BFA88:lI105|H3BFB5C
-3BFB5C:lI102|H3BFC20
-3BFC20:lI102|N
-3BF4F4:lI116|H3BF5A8
-3BF5A8:lI105|H3BF66C
-3BF66C:lI102|N
-3BF454:lH3BF504|H3BF510
-3BF504:t2:H3BF5B8,H3BF5C0
-3BF5C0:lI105|H3BF684
-3BF684:lI109|H3BF748
-3BF748:lI97|H3BF80C
-3BF80C:lI103|H3BF8E0
-3BF8E0:lI101|H3BF9BC
-3BF9BC:lI47|H3BFA90
-3BFA90:lI112|H3BFB64
-3BFB64:lI110|H3BFC28
-3BFC28:lI103|N
-3BF5B8:lI112|H3BF67C
-3BF67C:lI110|H3BF740
-3BF740:lI103|N
-3BF510:lH3BF5C8|H3BF5D4
-3BF5C8:t2:H3BF68C,H3BF694
-3BF694:lI105|H3BF758
-3BF758:lI109|H3BF81C
-3BF81C:lI97|H3BF8F0
-3BF8F0:lI103|H3BF9C4
-3BF9C4:lI101|H3BFA98
-3BFA98:lI47|H3BFB6C
-3BFB6C:lI106|H3BFC30
-3BFC30:lI112|H3BFCEC
-3BFCEC:lI101|H3BFDB0
-3BFDB0:lI103|N
-3BF68C:lI106|H3BF750
-3BF750:lI112|H3BF814
-3BF814:lI101|H3BF8E8
-3BF8E8:lI103|N
-3BF5D4:lH3BF69C|H3BF6A8
-3BF69C:t2:H3BF760,H3BF768
-3BF768:lI105|H3BF82C
-3BF82C:lI109|H3BF900
-3BF900:lI97|H3BF9CC
-3BF9CC:lI103|H3BFAA0
-3BFAA0:lI101|H3BFB74
-3BFB74:lI47|H3BFC38
-3BFC38:lI106|H3BFCF4
-3BFCF4:lI112|H3BFDB8
-3BFDB8:lI101|H3BFE6C
-3BFE6C:lI103|N
-3BF760:lI106|H3BF824
-3BF824:lI112|H3BF8F8
-3BF8F8:lI103|N
-3BF6A8:lH3BF770|H3BF77C
-3BF770:t2:H3BF834,H3BF83C
-3BF83C:lI105|H3BF910
-3BF910:lI109|H3BF9DC
-3BF9DC:lI97|H3BFAA8
-3BFAA8:lI103|H3BFB7C
-3BFB7C:lI101|H3BFC40
-3BFC40:lI47|H3BFCFC
-3BFCFC:lI106|H3BFDC0
-3BFDC0:lI112|H3BFE74
-3BFE74:lI101|H3BFF18
-3BFF18:lI103|N
-3BF834:lI106|H3BF908
-3BF908:lI112|H3BF9D4
-3BF9D4:lI101|N
-3BF77C:lH3BF844|H3BF850
-3BF844:t2:H3BF918,H3BF920
-3BF920:lI105|H3BF9EC
-3BF9EC:lI109|H3BFAB8
-3BFAB8:lI97|H3BFB84
-3BFB84:lI103|H3BFC48
-3BFC48:lI101|H3BFD04
-3BFD04:lI47|H3BFDC8
-3BFDC8:lI105|H3BFE7C
-3BFE7C:lI101|H3BFF20
-3BFF20:lI102|N
-3BF918:lI105|H3BF9E4
-3BF9E4:lI101|H3BFAB0
-3BFAB0:lI102|N
-3BF850:lH3BF928|H3BF934
-3BF928:t2:H3BF9F4,H3BF9FC
-3BF9FC:lI105|H3BFAC8
-3BFAC8:lI109|H3BFB94
-3BFB94:lI97|H3BFC50
-3BFC50:lI103|H3BFD0C
-3BFD0C:lI101|H3BFDD0
-3BFDD0:lI47|H3BFE84
-3BFE84:lI103|H3BFF28
-3BFF28:lI105|H3BFFCC
-3BFFCC:lI102|N
-3BF9F4:lI103|H3BFAC0
-3BFAC0:lI105|H3BFB8C
-3BFB8C:lI102|N
-3BF934:lH3BFA04|H3BFA10
-3BFA04:t2:H3BFAD0,H3BFAD8
-3BFAD8:lI99|H3BFBA4
-3BFBA4:lI104|H3BFC60
-3BFC60:lI101|H3BFD14
-3BFD14:lI109|H3BFDD8
-3BFDD8:lI105|H3BFE8C
-3BFE8C:lI99|H3BFF30
-3BFF30:lI97|H3BFFD4
-3BFFD4:lI108|H3C0078
-3C0078:lI47|H3C011C
-3C011C:lI120|H3C01C0
-3C01C0:lI45|H3C0274
-3C0274:lI112|H3C0320
-3C0320:lI100|H3C03CC
-3C03CC:lI98|N
-3BFAD0:lI112|H3BFB9C
-3BFB9C:lI100|H3BFC58
-3BFC58:lI98|N
-3BFA10:lH3BFAE0|H3BFAEC
-3BFAE0:t2:H3BFBAC,H3BFBB4
-3BFBB4:lI99|H3BFC70
-3BFC70:lI104|H3BFD24
-3BFD24:lI101|H3BFDE0
-3BFDE0:lI109|H3BFE94
-3BFE94:lI105|H3BFF38
-3BFF38:lI99|H3BFFDC
-3BFFDC:lI97|H3C0080
-3C0080:lI108|H3C0124
-3C0124:lI47|H3C01C8
-3C01C8:lI120|H3C027C
-3C027C:lI45|H3C0328
-3C0328:lI112|H3C03D4
-3C03D4:lI100|H3C0460
-3C0460:lI98|N
-3BFBAC:lI120|H3BFC68
-3BFC68:lI121|H3BFD1C
-3BFD1C:lI122|N
-3BFAEC:lH3BFBBC|H3BFBC8
-3BFBBC:t2:H3BFC78,H3BFC80
-3BFC80:lI97|H3BFD34
-3BFD34:lI117|H3BFDF0
-3BFDF0:lI100|H3BFE9C
-3BFE9C:lI105|H3BFF40
-3BFF40:lI111|H3BFFE4
-3BFFE4:lI47|H3C0088
-3C0088:lI120|H3C012C
-3C012C:lI45|H3C01D0
-3C01D0:lI119|H3C0284
-3C0284:lI97|H3C0330
-3C0330:lI118|N
-3BFC78:lI119|H3BFD2C
-3BFD2C:lI97|H3BFDE8
-3BFDE8:lI118|N
-3BFBC8:lH3BFC88|H3BFC94
-3BFC88:t2:H3BFD3C,H3BFD44
-3BFD44:lI97|H3BFE00
-3BFE00:lI117|H3BFEA4
-3BFEA4:lI100|H3BFF48
-3BFF48:lI105|H3BFFEC
-3BFFEC:lI111|H3C0090
-3C0090:lI47|H3C0134
-3C0134:lI120|H3C01D8
-3C01D8:lI45|H3C028C
-3C028C:lI114|H3C0338
-3C0338:lI101|H3C03DC
-3C03DC:lI97|H3C0468
-3C0468:lI108|H3C04FC
-3C04FC:lI97|H3C0598
-3C0598:lI117|H3C063C
-3C063C:lI100|H3C06E8
-3C06E8:lI105|H3C0794
-3C0794:lI111|N
-3BFD3C:lI114|H3BFDF8
-3BFDF8:lI97|N
-3BFC94:lH3BFD4C|H3BFD58
-3BFD4C:t2:H3BFE08,H3BFE10
-3BFE10:lI97|H3BFEB4
-3BFEB4:lI117|H3BFF58
-3BFF58:lI100|H3BFFF4
-3BFFF4:lI105|H3C0098
-3C0098:lI111|H3C013C
-3C013C:lI47|H3C01E0
-3C01E0:lI120|H3C0294
-3C0294:lI45|H3C0340
-3C0340:lI112|H3C03E4
-3C03E4:lI110|H3C0470
-3C0470:lI45|H3C0504
-3C0504:lI114|H3C05A0
-3C05A0:lI101|H3C0644
-3C0644:lI97|H3C06F0
-3C06F0:lI108|H3C079C
-3C079C:lI97|H3C0838
-3C0838:lI117|H3C08C4
-3C08C4:lI100|H3C0958
-3C0958:lI105|H3C09EC
-3C09EC:lI111|H3C0A88
-3C0A88:lI45|H3C0B2C
-3C0B2C:lI112|H3C0BD0
-3C0BD0:lI108|H3C0C84
-3C0C84:lI117|H3C0D38
-3C0D38:lI103|H3C0DEC
-3C0DEC:lI105|H3C0EA0
-3C0EA0:lI110|N
-3BFE08:lI114|H3BFEAC
-3BFEAC:lI112|H3BFF50
-3BFF50:lI109|N
-3BFD58:lH3BFE18|H3BFE24
-3BFE18:t2:H3BFEBC,H3BFEC4
-3BFEC4:lI97|H3BFF68
-3BFF68:lI117|H3C0004
-3C0004:lI100|H3C00A0
-3C00A0:lI105|H3C0144
-3C0144:lI111|H3C01E8
-3C01E8:lI47|H3C029C
-3C029C:lI120|H3C0348
-3C0348:lI45|H3C03EC
-3C03EC:lI112|H3C0478
-3C0478:lI110|H3C050C
-3C050C:lI45|H3C05A8
-3C05A8:lI114|H3C064C
-3C064C:lI101|H3C06F8
-3C06F8:lI97|H3C07A4
-3C07A4:lI108|H3C0840
-3C0840:lI97|H3C08CC
-3C08CC:lI117|H3C0960
-3C0960:lI100|H3C09F4
-3C09F4:lI105|H3C0A90
-3C0A90:lI111|N
-3BFEBC:lI114|H3BFF60
-3BFF60:lI97|H3BFFFC
-3BFFFC:lI109|N
-3BFE24:lH3BFECC|H3BFED8
-3BFECC:t2:H3BFF70,H3BFF78
-3BFF78:lI97|H3C0014
-3C0014:lI117|H3C00B0
-3C00B0:lI100|H3C014C
-3C014C:lI105|H3C01F0
-3C01F0:lI111|H3C02A4
-3C02A4:lI47|H3C0350
-3C0350:lI120|H3C03F4
-3C03F4:lI45|H3C0480
-3C0480:lI97|H3C0514
-3C0514:lI105|H3C05B0
-3C05B0:lI102|H3C0654
-3C0654:lI102|N
-3BFF70:lI97|H3C000C
-3C000C:lI105|H3C00A8
-3C00A8:lI102|N
-3BFED8:lH3BFF80|H3BFF8C
-3BFF80:t2:H3C001C,H3C0024
-3C0024:lI97|H3C00C0
-3C00C0:lI117|H3C015C
-3C015C:lI100|H3C0200
-3C0200:lI105|H3C02AC
-3C02AC:lI111|H3C0358
-3C0358:lI47|H3C03FC
-3C03FC:lI120|H3C0488
-3C0488:lI45|H3C051C
-3C051C:lI97|H3C05B8
-3C05B8:lI105|H3C065C
-3C065C:lI102|H3C0700
-3C0700:lI102|N
-3C001C:lI97|H3C00B8
-3C00B8:lI105|H3C0154
-3C0154:lI102|H3C01F8
-3C01F8:lI102|N
-3BFF8C:lH3C002C|H3C0038
-3C002C:t2:H3C00C8,H3C00D0
-3C00D0:lI97|H3C016C
-3C016C:lI117|H3C0210
-3C0210:lI100|H3C02BC
-3C02BC:lI105|H3C0360
-3C0360:lI111|H3C0404
-3C0404:lI47|H3C0490
-3C0490:lI120|H3C0524
-3C0524:lI45|H3C05C0
-3C05C0:lI97|H3C0664
-3C0664:lI105|H3C0708
-3C0708:lI102|H3C07AC
-3C07AC:lI102|N
-3C00C8:lI97|H3C0164
-3C0164:lI105|H3C0208
-3C0208:lI102|H3C02B4
-3C02B4:lI99|N
-3C0038:lH3C00D8|H3C00E4
-3C00D8:t2:H3C0174,H3C017C
-3C017C:lI97|H3C0220
-3C0220:lI117|H3C02CC
-3C02CC:lI100|H3C0370
-3C0370:lI105|H3C040C
-3C040C:lI111|H3C0498
-3C0498:lI47|H3C052C
-3C052C:lI109|H3C05C8
-3C05C8:lI112|H3C066C
-3C066C:lI101|H3C0710
-3C0710:lI103|N
-3C0174:lI109|H3C0218
-3C0218:lI112|H3C02C4
-3C02C4:lI103|H3C0368
-3C0368:lI97|N
-3C00E4:lH3C0184|H3C0190
-3C0184:t2:H3C0228,H3C0230
-3C0230:lI97|H3C02DC
-3C02DC:lI117|H3C0380
-3C0380:lI100|H3C0414
-3C0414:lI105|H3C04A0
-3C04A0:lI111|H3C0534
-3C0534:lI47|H3C05D0
-3C05D0:lI109|H3C0674
-3C0674:lI112|H3C0718
-3C0718:lI101|H3C07B4
-3C07B4:lI103|N
-3C0228:lI109|H3C02D4
-3C02D4:lI112|H3C0378
-3C0378:lI50|N
-3C0190:lH3C0238|H3C0244
-3C0238:t2:H3C02E4,H3C02EC
-3C02EC:lI97|H3C0390
-3C0390:lI117|H3C041C
-3C041C:lI100|H3C04A8
-3C04A8:lI105|H3C053C
-3C053C:lI111|H3C05D8
-3C05D8:lI47|H3C067C
-3C067C:lI98|H3C0720
-3C0720:lI97|H3C07BC
-3C07BC:lI115|H3C0848
-3C0848:lI105|H3C08D4
-3C08D4:lI99|N
-3C02E4:lI97|H3C0388
-3C0388:lI117|N
-3C0244:lH3C02F4|H3C0300
-3C02F4:t2:H3C0398,H3C03A0
-3C03A0:lI97|H3C042C
-3C042C:lI117|H3C04B8
-3C04B8:lI100|H3C0544
-3C0544:lI105|H3C05E0
-3C05E0:lI111|H3C0684
-3C0684:lI47|H3C0728
-3C0728:lI98|H3C07C4
-3C07C4:lI97|H3C0850
-3C0850:lI115|H3C08DC
-3C08DC:lI105|H3C0968
-3C0968:lI99|N
-3C0398:lI115|H3C0424
-3C0424:lI110|H3C04B0
-3C04B0:lI100|N
-3C0300:lH3C03A8|H3C03B4
-3C03A8:t2:H3C0434,H3C043C
-3C043C:lI97|H3C04C8
-3C04C8:lI112|H3C0554
-3C0554:lI112|H3C05E8
-3C05E8:lI108|H3C068C
-3C068C:lI105|H3C0730
-3C0730:lI99|H3C07CC
-3C07CC:lI97|H3C0858
-3C0858:lI116|H3C08E4
-3C08E4:lI105|H3C0970
-3C0970:lI111|H3C09FC
-3C09FC:lI110|H3C0A98
-3C0A98:lI47|H3C0B34
-3C0B34:lI122|H3C0BD8
-3C0BD8:lI105|H3C0C8C
-3C0C8C:lI112|N
-3C0434:lI122|H3C04C0
-3C04C0:lI105|H3C054C
-3C054C:lI112|N
-3C03B4:lH3C0444|H3C0450
-3C0444:t2:H3C04D0,H3C04D8
-3C04D8:lI97|H3C0564
-3C0564:lI112|H3C05F8
-3C05F8:lI112|H3C0694
-3C0694:lI108|H3C0738
-3C0738:lI105|H3C07D4
-3C07D4:lI99|H3C0860
-3C0860:lI97|H3C08EC
-3C08EC:lI116|H3C0978
-3C0978:lI105|H3C0A04
-3C0A04:lI111|H3C0AA0
-3C0AA0:lI110|H3C0B3C
-3C0B3C:lI47|H3C0BE0
-3C0BE0:lI120|H3C0C94
-3C0C94:lI45|H3C0D40
-3C0D40:lI119|H3C0DF4
-3C0DF4:lI97|H3C0EA8
-3C0EA8:lI105|H3C0F64
-3C0F64:lI115|H3C1030
-3C1030:lI45|H3C1104
-3C1104:lI115|H3C11D8
-3C11D8:lI111|H3C12A4
-3C12A4:lI117|H3C1378
-3C1378:lI114|H3C1454
-3C1454:lI99|H3C1538
-3C1538:lI101|N
-3C04D0:lI115|H3C055C
-3C055C:lI114|H3C05F0
-3C05F0:lI99|N
-3C0450:lH3C04E0|H3C04EC
-3C04E0:t2:H3C056C,H3C0574
-3C0574:lI97|H3C0608
-3C0608:lI112|H3C06A4
-3C06A4:lI112|H3C0748
-3C0748:lI108|H3C07E4
-3C07E4:lI105|H3C0868
-3C0868:lI99|H3C08F4
-3C08F4:lI97|H3C0980
-3C0980:lI116|H3C0A0C
-3C0A0C:lI105|H3C0AA8
-3C0AA8:lI111|H3C0B44
-3C0B44:lI110|H3C0BE8
-3C0BE8:lI47|H3C0C9C
-3C0C9C:lI120|H3C0D48
-3C0D48:lI45|H3C0DFC
-3C0DFC:lI117|H3C0EB0
-3C0EB0:lI115|H3C0F6C
-3C0F6C:lI116|H3C1038
-3C1038:lI97|H3C110C
-3C110C:lI114|N
-3C056C:lI117|H3C0600
-3C0600:lI115|H3C069C
-3C069C:lI116|H3C0740
-3C0740:lI97|H3C07DC
-3C07DC:lI114|N
-3C04EC:lH3C057C|H3C0588
-3C057C:t2:H3C0610,H3C0618
-3C0618:lI97|H3C06B4
-3C06B4:lI112|H3C0750
-3C0750:lI112|H3C07EC
-3C07EC:lI108|H3C0870
-3C0870:lI105|H3C08FC
-3C08FC:lI99|H3C0988
-3C0988:lI97|H3C0A14
-3C0A14:lI116|H3C0AB0
-3C0AB0:lI105|H3C0B4C
-3C0B4C:lI111|H3C0BF0
-3C0BF0:lI110|H3C0CA4
-3C0CA4:lI47|H3C0D50
-3C0D50:lI120|H3C0E04
-3C0E04:lI45|H3C0EB8
-3C0EB8:lI116|H3C0F74
-3C0F74:lI114|H3C1040
-3C1040:lI111|H3C1114
-3C1114:lI102|H3C11E0
-3C11E0:lI102|H3C12AC
-3C12AC:lI45|H3C1380
-3C1380:lI109|H3C145C
-3C145C:lI115|N
-3C0610:lI109|H3C06AC
-3C06AC:lI115|N
-3C0588:lH3C0620|H3C062C
-3C0620:t2:H3C06BC,H3C06C4
-3C06C4:lI97|H3C0760
-3C0760:lI112|H3C07F4
-3C07F4:lI112|H3C0878
-3C0878:lI108|H3C0904
-3C0904:lI105|H3C0990
-3C0990:lI99|H3C0A1C
-3C0A1C:lI97|H3C0AB8
-3C0AB8:lI116|H3C0B54
-3C0B54:lI105|H3C0BF8
-3C0BF8:lI111|H3C0CAC
-3C0CAC:lI110|H3C0D58
-3C0D58:lI47|H3C0E0C
-3C0E0C:lI120|H3C0EC0
-3C0EC0:lI45|H3C0F7C
-3C0F7C:lI116|H3C1048
-3C1048:lI114|H3C111C
-3C111C:lI111|H3C11E8
-3C11E8:lI102|H3C12B4
-3C12B4:lI102|H3C1388
-3C1388:lI45|H3C1464
-3C1464:lI109|H3C1540
-3C1540:lI101|N
-3C06BC:lI109|H3C0758
-3C0758:lI101|N
-3C062C:lH3C06CC|H3C06D8
-3C06CC:t2:H3C0768,H3C0770
-3C0770:lI97|H3C0804
-3C0804:lI112|H3C0888
-3C0888:lI112|H3C090C
-3C090C:lI108|H3C0998
-3C0998:lI105|H3C0A24
-3C0A24:lI99|H3C0AC0
-3C0AC0:lI97|H3C0B5C
-3C0B5C:lI116|H3C0C00
-3C0C00:lI105|H3C0CB4
-3C0CB4:lI111|H3C0D60
-3C0D60:lI110|H3C0E14
-3C0E14:lI47|H3C0EC8
-3C0EC8:lI120|H3C0F84
-3C0F84:lI45|H3C1050
-3C1050:lI116|H3C1124
-3C1124:lI114|H3C11F0
-3C11F0:lI111|H3C12BC
-3C12BC:lI102|H3C1390
-3C1390:lI102|H3C146C
-3C146C:lI45|H3C1548
-3C1548:lI109|H3C161C
-3C161C:lI97|H3C16F0
-3C16F0:lI110|N
-3C0768:lI109|H3C07FC
-3C07FC:lI97|H3C0880
-3C0880:lI110|N
-3C06D8:lH3C0778|H3C0784
-3C0778:t2:H3C080C,H3C0814
-3C0814:lI97|H3C0890
-3C0890:lI112|H3C0914
-3C0914:lI112|H3C09A0
-3C09A0:lI108|H3C0A2C
-3C0A2C:lI105|H3C0AC8
-3C0AC8:lI99|H3C0B64
-3C0B64:lI97|H3C0C08
-3C0C08:lI116|H3C0CBC
-3C0CBC:lI105|H3C0D68
-3C0D68:lI111|H3C0E1C
-3C0E1C:lI110|H3C0ED0
-3C0ED0:lI47|H3C0F8C
-3C0F8C:lI120|H3C1058
-3C1058:lI45|H3C112C
-3C112C:lI116|H3C11F8
-3C11F8:lI114|H3C12C4
-3C12C4:lI111|H3C1398
-3C1398:lI102|H3C1474
-3C1474:lI102|N
-3C080C:lI116|N
-3C0784:lH3C081C|H3C0828
-3C081C:t2:H3C0898,H3C08A0
-3C08A0:lI97|H3C0924
-3C0924:lI112|H3C09A8
-3C09A8:lI112|H3C0A34
-3C0A34:lI108|H3C0AD0
-3C0AD0:lI105|H3C0B6C
-3C0B6C:lI99|H3C0C10
-3C0C10:lI97|H3C0CC4
-3C0CC4:lI116|H3C0D70
-3C0D70:lI105|H3C0E24
-3C0E24:lI111|H3C0ED8
-3C0ED8:lI110|H3C0F94
-3C0F94:lI47|H3C1060
-3C1060:lI120|H3C1134
-3C1134:lI45|H3C1200
-3C1200:lI116|H3C12CC
-3C12CC:lI114|H3C13A0
-3C13A0:lI111|H3C147C
-3C147C:lI102|H3C1550
-3C1550:lI102|N
-3C0898:lI116|H3C091C
-3C091C:lI114|N
-3C0828:lH3C08A8|H3C08B4
-3C08A8:t2:H3C092C,H3C0934
-3C0934:lI97|H3C09B8
-3C09B8:lI112|H3C0A44
-3C0A44:lI112|H3C0AE0
-3C0AE0:lI108|H3C0B74
-3C0B74:lI105|H3C0C18
-3C0C18:lI99|H3C0CCC
-3C0CCC:lI97|H3C0D78
-3C0D78:lI116|H3C0E2C
-3C0E2C:lI105|H3C0EE0
-3C0EE0:lI111|H3C0F9C
-3C0F9C:lI110|H3C1068
-3C1068:lI47|H3C113C
-3C113C:lI120|H3C1208
-3C1208:lI45|H3C12D4
-3C12D4:lI116|H3C13A8
-3C13A8:lI114|H3C1484
-3C1484:lI111|H3C1558
-3C1558:lI102|H3C1624
-3C1624:lI102|N
-3C092C:lI114|H3C09B0
-3C09B0:lI111|H3C0A3C
-3C0A3C:lI102|H3C0AD8
-3C0AD8:lI102|N
-3C08B4:lH3C093C|H3C0948
-3C093C:t2:H3C09C0,H3C09C8
-3C09C8:lI97|H3C0A54
-3C0A54:lI112|H3C0AF0
-3C0AF0:lI112|H3C0B84
-3C0B84:lI108|H3C0C28
-3C0C28:lI105|H3C0CDC
-3C0CDC:lI99|H3C0D88
-3C0D88:lI97|H3C0E34
-3C0E34:lI116|H3C0EE8
-3C0EE8:lI105|H3C0FA4
-3C0FA4:lI111|H3C1070
-3C1070:lI110|H3C1144
-3C1144:lI47|H3C1210
-3C1210:lI120|H3C12DC
-3C12DC:lI45|H3C13B0
-3C13B0:lI116|H3C148C
-3C148C:lI101|H3C1560
-3C1560:lI120|H3C162C
-3C162C:lI105|H3C16F8
-3C16F8:lI110|H3C17BC
-3C17BC:lI102|H3C1880
-3C1880:lI111|N
-3C09C0:lI116|H3C0A4C
-3C0A4C:lI101|H3C0AE8
-3C0AE8:lI120|H3C0B7C
-3C0B7C:lI105|H3C0C20
-3C0C20:lI110|H3C0CD4
-3C0CD4:lI102|H3C0D80
-3C0D80:lI111|N
-3C0948:lH3C09D0|H3C09DC
-3C09D0:t2:H3C0A5C,H3C0A64
-3C0A64:lI97|H3C0B00
-3C0B00:lI112|H3C0B94
-3C0B94:lI112|H3C0C38
-3C0C38:lI108|H3C0CE4
-3C0CE4:lI105|H3C0D90
-3C0D90:lI99|H3C0E3C
-3C0E3C:lI97|H3C0EF0
-3C0EF0:lI116|H3C0FAC
-3C0FAC:lI105|H3C1078
-3C1078:lI111|H3C114C
-3C114C:lI110|H3C1218
-3C1218:lI47|H3C12E4
-3C12E4:lI120|H3C13B8
-3C13B8:lI45|H3C1494
-3C1494:lI116|H3C1568
-3C1568:lI101|H3C1634
-3C1634:lI120|H3C1700
-3C1700:lI105|H3C17C4
-3C17C4:lI110|H3C1888
-3C1888:lI102|H3C1944
-3C1944:lI111|N
-3C0A5C:lI116|H3C0AF8
-3C0AF8:lI101|H3C0B8C
-3C0B8C:lI120|H3C0C30
-3C0C30:lI105|N
-3C09DC:lH3C0A6C|H3C0A78
-3C0A6C:t2:H3C0B08,H3C0B10
-3C0B10:lI97|H3C0BA4
-3C0BA4:lI112|H3C0C48
-3C0C48:lI112|H3C0CEC
-3C0CEC:lI108|H3C0D98
-3C0D98:lI105|H3C0E44
-3C0E44:lI99|H3C0EF8
-3C0EF8:lI97|H3C0FB4
-3C0FB4:lI116|H3C1080
-3C1080:lI105|H3C1154
-3C1154:lI111|H3C1220
-3C1220:lI110|H3C12EC
-3C12EC:lI47|H3C13C0
-3C13C0:lI120|H3C149C
-3C149C:lI45|H3C1570
-3C1570:lI116|H3C163C
-3C163C:lI101|H3C1708
-3C1708:lI120|N
-3C0B08:lI116|H3C0B9C
-3C0B9C:lI101|H3C0C40
-3C0C40:lI120|N
-3C0A78:lH3C0B18|H3C0B24
-3C0B18:t2:H3C0BAC,H3C0BB4
-3C0BB4:lI97|H3C0C58
-3C0C58:lI112|H3C0CFC
-3C0CFC:lI112|H3C0DA0
-3C0DA0:lI108|H3C0E4C
-3C0E4C:lI105|H3C0F00
-3C0F00:lI99|H3C0FBC
-3C0FBC:lI97|H3C1088
-3C1088:lI116|H3C115C
-3C115C:lI105|H3C1228
-3C1228:lI111|H3C12F4
-3C12F4:lI110|H3C13C8
-3C13C8:lI47|H3C14A4
-3C14A4:lI120|H3C1578
-3C1578:lI45|H3C1644
-3C1644:lI116|H3C1710
-3C1710:lI99|H3C17CC
-3C17CC:lI108|N
-3C0BAC:lI116|H3C0C50
-3C0C50:lI99|H3C0CF4
-3C0CF4:lI108|N
-3C0B24:lH3C0BBC|H3C0BC8
-3C0BBC:t2:H3C0C60,H3C0C68
-3C0C68:lI97|H3C0D0C
-3C0D0C:lI112|H3C0DB0
-3C0DB0:lI112|H3C0E54
-3C0E54:lI108|H3C0F08
-3C0F08:lI105|H3C0FC4
-3C0FC4:lI99|H3C1090
-3C1090:lI97|H3C1164
-3C1164:lI116|H3C1230
-3C1230:lI105|H3C12FC
-3C12FC:lI111|H3C13D0
-3C13D0:lI110|H3C14AC
-3C14AC:lI47|H3C1580
-3C1580:lI120|H3C164C
-3C164C:lI45|H3C1718
-3C1718:lI116|H3C17D4
-3C17D4:lI97|H3C1890
-3C1890:lI114|N
-3C0C60:lI116|H3C0D04
-3C0D04:lI97|H3C0DA8
-3C0DA8:lI114|N
-3C0BC8:lH3C0C70|H3C0C7C
-3C0C70:t2:H3C0D14,H3C0D1C
-3C0D1C:lI97|H3C0DC0
-3C0DC0:lI112|H3C0E64
-3C0E64:lI112|H3C0F18
-3C0F18:lI108|H3C0FD4
-3C0FD4:lI105|H3C10A0
-3C10A0:lI99|H3C116C
-3C116C:lI97|H3C1238
-3C1238:lI116|H3C1304
-3C1304:lI105|H3C13D8
-3C13D8:lI111|H3C14B4
-3C14B4:lI110|H3C1588
-3C1588:lI47|H3C1654
-3C1654:lI120|H3C1720
-3C1720:lI45|H3C17DC
-3C17DC:lI115|H3C1898
-3C1898:lI118|H3C194C
-3C194C:lI52|H3C1A00
-3C1A00:lI99|H3C1AB4
-3C1AB4:lI114|H3C1B78
-3C1B78:lI99|N
-3C0D14:lI115|H3C0DB8
-3C0DB8:lI118|H3C0E5C
-3C0E5C:lI52|H3C0F10
-3C0F10:lI99|H3C0FCC
-3C0FCC:lI114|H3C1098
-3C1098:lI99|N
-3C0C7C:lH3C0D24|H3C0D30
-3C0D24:t2:H3C0DC8,H3C0DD0
-3C0DD0:lI97|H3C0E74
-3C0E74:lI112|H3C0F28
-3C0F28:lI112|H3C0FE4
-3C0FE4:lI108|H3C10B0
-3C10B0:lI105|H3C117C
-3C117C:lI99|H3C1248
-3C1248:lI97|H3C130C
-3C130C:lI116|H3C13E0
-3C13E0:lI105|H3C14BC
-3C14BC:lI111|H3C1590
-3C1590:lI110|H3C165C
-3C165C:lI47|H3C1728
-3C1728:lI120|H3C17E4
-3C17E4:lI45|H3C18A0
-3C18A0:lI115|H3C1954
-3C1954:lI118|H3C1A08
-3C1A08:lI52|H3C1ABC
-3C1ABC:lI99|H3C1B80
-3C1B80:lI112|H3C1C4C
-3C1C4C:lI105|H3C1D10
-3C1D10:lI111|N
-3C0DC8:lI115|H3C0E6C
-3C0E6C:lI118|H3C0F20
-3C0F20:lI52|H3C0FDC
-3C0FDC:lI99|H3C10A8
-3C10A8:lI112|H3C1174
-3C1174:lI105|H3C1240
-3C1240:lI111|N
-3C0D30:lH3C0DD8|H3C0DE4
-3C0DD8:t2:H3C0E7C,H3C0E84
-3C0E84:lI97|H3C0F38
-3C0F38:lI112|H3C0FF4
-3C0FF4:lI112|H3C10B8
-3C10B8:lI108|H3C1184
-3C1184:lI105|H3C1250
-3C1250:lI99|H3C1314
-3C1314:lI97|H3C13E8
-3C13E8:lI116|H3C14C4
-3C14C4:lI105|H3C1598
-3C1598:lI111|H3C1664
-3C1664:lI110|H3C1730
-3C1730:lI47|H3C17EC
-3C17EC:lI120|H3C18A8
-3C18A8:lI45|H3C195C
-3C195C:lI115|H3C1A10
-3C1A10:lI116|H3C1AC4
-3C1AC4:lI117|H3C1B88
-3C1B88:lI102|H3C1C54
-3C1C54:lI102|H3C1D18
-3C1D18:lI105|H3C1DD4
-3C1DD4:lI116|N
-3C0E7C:lI115|H3C0F30
-3C0F30:lI105|H3C0FEC
-3C0FEC:lI116|N
-3C0DE4:lH3C0E8C|H3C0E98
-3C0E8C:t2:H3C0F40,H3C0F48
-3C0F48:lI97|H3C1004
-3C1004:lI112|H3C10C8
-3C10C8:lI112|H3C1194
-3C1194:lI108|H3C1258
-3C1258:lI105|H3C131C
-3C131C:lI99|H3C13F0
-3C13F0:lI97|H3C14CC
-3C14CC:lI116|H3C15A0
-3C15A0:lI105|H3C166C
-3C166C:lI111|H3C1738
-3C1738:lI110|H3C17F4
-3C17F4:lI47|H3C18B0
-3C18B0:lI120|H3C1964
-3C1964:lI45|H3C1A18
-3C1A18:lI115|H3C1ACC
-3C1ACC:lI104|H3C1B90
-3C1B90:lI97|H3C1C5C
-3C1C5C:lI114|N
-3C0F40:lI115|H3C0FFC
-3C0FFC:lI104|H3C10C0
-3C10C0:lI97|H3C118C
-3C118C:lI114|N
-3C0E98:lH3C0F50|H3C0F5C
-3C0F50:t2:H3C100C,H3C1014
-3C1014:lI97|H3C10D8
-3C10D8:lI112|H3C119C
-3C119C:lI112|H3C1260
-3C1260:lI108|H3C1324
-3C1324:lI105|H3C13F8
-3C13F8:lI99|H3C14D4
-3C14D4:lI97|H3C15A8
-3C15A8:lI116|H3C1674
-3C1674:lI105|H3C1740
-3C1740:lI111|H3C17FC
-3C17FC:lI110|H3C18B8
-3C18B8:lI47|H3C196C
-3C196C:lI120|H3C1A20
-3C1A20:lI45|H3C1AD4
-3C1AD4:lI115|H3C1B98
-3C1B98:lI104|N
-3C100C:lI115|H3C10D0
-3C10D0:lI104|N
-3C0F5C:lH3C101C|H3C1028
-3C101C:t2:H3C10E0,H3C10E8
-3C10E8:lI97|H3C11AC
-3C11AC:lI112|H3C1268
-3C1268:lI112|H3C132C
-3C132C:lI108|H3C1400
-3C1400:lI105|H3C14DC
-3C14DC:lI99|H3C15B0
-3C15B0:lI97|H3C167C
-3C167C:lI116|H3C1748
-3C1748:lI105|H3C1804
-3C1804:lI111|H3C18C0
-3C18C0:lI110|H3C1974
-3C1974:lI47|H3C1A28
-3C1A28:lI120|H3C1ADC
-3C1ADC:lI45|H3C1BA0
-3C1BA0:lI110|H3C1C64
-3C1C64:lI101|H3C1D20
-3C1D20:lI116|H3C1DDC
-3C1DDC:lI99|H3C1E98
-3C1E98:lI100|H3C1F5C
-3C1F5C:lI102|N
-3C10E0:lI110|H3C11A4
-3C11A4:lI99|N
-3C1028:lH3C10F0|H3C10FC
-3C10F0:t2:H3C11B4,H3C11BC
-3C11BC:lI97|H3C1278
-3C1278:lI112|H3C133C
-3C133C:lI112|H3C1408
-3C1408:lI108|H3C14E4
-3C14E4:lI105|H3C15B8
-3C15B8:lI99|H3C1684
-3C1684:lI97|H3C1750
-3C1750:lI116|H3C180C
-3C180C:lI105|H3C18C8
-3C18C8:lI111|H3C197C
-3C197C:lI110|H3C1A30
-3C1A30:lI47|H3C1AE4
-3C1AE4:lI120|H3C1BA8
-3C1BA8:lI45|H3C1C6C
-3C1C6C:lI110|H3C1D28
-3C1D28:lI101|H3C1DE4
-3C1DE4:lI116|H3C1EA0
-3C1EA0:lI99|H3C1F64
-3C1F64:lI100|H3C2018
-3C2018:lI102|N
-3C11B4:lI99|H3C1270
-3C1270:lI100|H3C1334
-3C1334:lI102|N
-3C10FC:lH3C11C4|H3C11D0
-3C11C4:t2:H3C1280,H3C1288
-3C1288:lI97|H3C134C
-3C134C:lI112|H3C1418
-3C1418:lI112|H3C14EC
-3C14EC:lI108|H3C15C0
-3C15C0:lI105|H3C168C
-3C168C:lI99|H3C1758
-3C1758:lI97|H3C1814
-3C1814:lI116|H3C18D0
-3C18D0:lI105|H3C1984
-3C1984:lI111|H3C1A38
-3C1A38:lI110|H3C1AEC
-3C1AEC:lI47|H3C1BB0
-3C1BB0:lI120|H3C1C74
-3C1C74:lI45|H3C1D30
-3C1D30:lI109|H3C1DEC
-3C1DEC:lI105|H3C1EA8
-3C1EA8:lI102|N
-3C1280:lI109|H3C1344
-3C1344:lI105|H3C1410
-3C1410:lI102|N
-3C11D0:lH3C1290|H3C129C
-3C1290:t2:H3C1354,H3C135C
-3C135C:lI97|H3C1428
-3C1428:lI112|H3C14FC
-3C14FC:lI112|H3C15D0
-3C15D0:lI108|H3C169C
-3C169C:lI105|H3C1760
-3C1760:lI99|H3C181C
-3C181C:lI97|H3C18D8
-3C18D8:lI116|H3C198C
-3C198C:lI105|H3C1A40
-3C1A40:lI111|H3C1AF4
-3C1AF4:lI110|H3C1BB8
-3C1BB8:lI47|H3C1C7C
-3C1C7C:lI120|H3C1D38
-3C1D38:lI45|H3C1DF4
-3C1DF4:lI108|H3C1EB0
-3C1EB0:lI97|H3C1F6C
-3C1F6C:lI116|H3C2020
-3C2020:lI101|H3C20DC
-3C20DC:lI120|N
-3C1354:lI108|H3C1420
-3C1420:lI97|H3C14F4
-3C14F4:lI116|H3C15C8
-3C15C8:lI101|H3C1694
-3C1694:lI120|N
-3C129C:lH3C1364|H3C1370
-3C1364:t2:H3C1430,H3C1438
-3C1438:lI97|H3C150C
-3C150C:lI112|H3C15E0
-3C15E0:lI112|H3C16A4
-3C16A4:lI108|H3C1768
-3C1768:lI105|H3C1824
-3C1824:lI99|H3C18E0
-3C18E0:lI97|H3C1994
-3C1994:lI116|H3C1A48
-3C1A48:lI105|H3C1AFC
-3C1AFC:lI111|H3C1BC0
-3C1BC0:lI110|H3C1C84
-3C1C84:lI47|H3C1D40
-3C1D40:lI120|H3C1DFC
-3C1DFC:lI45|H3C1EB8
-3C1EB8:lI107|H3C1F74
-3C1F74:lI111|H3C2028
-3C2028:lI97|H3C20E4
-3C20E4:lI110|N
-3C1430:lI115|H3C1504
-3C1504:lI107|H3C15D8
-3C15D8:lI112|N
-3C1370:lH3C1440|H3C144C
-3C1440:t2:H3C1514,H3C151C
-3C151C:lI97|H3C15F0
-3C15F0:lI112|H3C16B4
-3C16B4:lI112|H3C1770
-3C1770:lI108|H3C182C
-3C182C:lI105|H3C18E8
-3C18E8:lI99|H3C199C
-3C199C:lI97|H3C1A50
-3C1A50:lI116|H3C1B04
-3C1B04:lI105|H3C1BC8
-3C1BC8:lI111|H3C1C8C
-3C1C8C:lI110|H3C1D48
-3C1D48:lI47|H3C1E04
-3C1E04:lI120|H3C1EC0
-3C1EC0:lI45|H3C1F7C
-3C1F7C:lI107|H3C2030
-3C2030:lI111|H3C20EC
-3C20EC:lI97|H3C21A0
-3C21A0:lI110|N
-3C1514:lI115|H3C15E8
-3C15E8:lI107|H3C16AC
-3C16AC:lI100|N
-3C144C:lH3C1524|H3C1530
-3C1524:t2:H3C15F8,H3C1600
-3C1600:lI97|H3C16C4
-3C16C4:lI112|H3C1780
-3C1780:lI112|H3C1834
-3C1834:lI108|H3C18F0
-3C18F0:lI105|H3C19A4
-3C19A4:lI99|H3C1A58
-3C1A58:lI97|H3C1B0C
-3C1B0C:lI116|H3C1BD0
-3C1BD0:lI105|H3C1C94
-3C1C94:lI111|H3C1D50
-3C1D50:lI110|H3C1E0C
-3C1E0C:lI47|H3C1EC8
-3C1EC8:lI120|H3C1F84
-3C1F84:lI45|H3C2038
-3C2038:lI107|H3C20F4
-3C20F4:lI111|H3C21A8
-3C21A8:lI97|H3C225C
-3C225C:lI110|N
-3C15F8:lI115|H3C16BC
-3C16BC:lI107|H3C1778
-3C1778:lI116|N
-3C1530:lH3C1608|H3C1614
-3C1608:t2:H3C16CC,H3C16D4
-3C16D4:lI97|H3C1790
-3C1790:lI112|H3C1844
-3C1844:lI112|H3C18F8
-3C18F8:lI108|H3C19AC
-3C19AC:lI105|H3C1A60
-3C1A60:lI99|H3C1B14
-3C1B14:lI97|H3C1BD8
-3C1BD8:lI116|H3C1C9C
-3C1C9C:lI105|H3C1D58
-3C1D58:lI111|H3C1E14
-3C1E14:lI110|H3C1ED0
-3C1ED0:lI47|H3C1F8C
-3C1F8C:lI120|H3C2040
-3C2040:lI45|H3C20FC
-3C20FC:lI107|H3C21B0
-3C21B0:lI111|H3C2264
-3C2264:lI97|H3C2320
-3C2320:lI110|N
-3C16CC:lI115|H3C1788
-3C1788:lI107|H3C183C
-3C183C:lI109|N
-3C1614:lH3C16DC|H3C16E8
-3C16DC:t2:H3C1798,H3C17A0
-3C17A0:lI97|H3C1854
-3C1854:lI112|H3C1908
-3C1908:lI112|H3C19B4
-3C19B4:lI108|H3C1A68
-3C1A68:lI105|H3C1B1C
-3C1B1C:lI99|H3C1BE0
-3C1BE0:lI97|H3C1CA4
-3C1CA4:lI116|H3C1D60
-3C1D60:lI105|H3C1E1C
-3C1E1C:lI111|H3C1ED8
-3C1ED8:lI110|H3C1F94
-3C1F94:lI47|H3C2048
-3C2048:lI120|H3C2104
-3C2104:lI45|H3C21B8
-3C21B8:lI104|H3C226C
-3C226C:lI116|H3C2328
-3C2328:lI116|H3C23E4
-3C23E4:lI112|H3C2498
-3C2498:lI100|H3C2554
-3C2554:lI45|H3C2610
-3C2610:lI99|H3C26D4
-3C26D4:lI103|H3C2790
-3C2790:lI105|N
-3C1798:lI99|H3C184C
-3C184C:lI103|H3C1900
-3C1900:lI105|N
-3C16E8:lH3C17A8|H3C17B4
-3C17A8:t2:H3C185C,H3C1864
-3C1864:lI97|H3C1918
-3C1918:lI112|H3C19C4
-3C19C4:lI112|H3C1A70
-3C1A70:lI108|H3C1B24
-3C1B24:lI105|H3C1BE8
-3C1BE8:lI99|H3C1CAC
-3C1CAC:lI97|H3C1D68
-3C1D68:lI116|H3C1E24
-3C1E24:lI105|H3C1EE0
-3C1EE0:lI111|H3C1F9C
-3C1F9C:lI110|H3C2050
-3C2050:lI47|H3C210C
-3C210C:lI120|H3C21C0
-3C21C0:lI45|H3C2274
-3C2274:lI104|H3C2330
-3C2330:lI100|H3C23EC
-3C23EC:lI102|N
-3C185C:lI104|H3C1910
-3C1910:lI100|H3C19BC
-3C19BC:lI102|N
-3C17B4:lH3C186C|H3C1878
-3C186C:t2:H3C1920,H3C1928
-3C1928:lI97|H3C19D4
-3C19D4:lI112|H3C1A78
-3C1A78:lI112|H3C1B2C
-3C1B2C:lI108|H3C1BF0
-3C1BF0:lI105|H3C1CB4
-3C1CB4:lI99|H3C1D70
-3C1D70:lI97|H3C1E2C
-3C1E2C:lI116|H3C1EE8
-3C1EE8:lI105|H3C1FA4
-3C1FA4:lI111|H3C2058
-3C2058:lI110|H3C2114
-3C2114:lI47|H3C21C8
-3C21C8:lI120|H3C227C
-3C227C:lI45|H3C2338
-3C2338:lI103|H3C23F4
-3C23F4:lI122|H3C24A0
-3C24A0:lI105|H3C255C
-3C255C:lI112|N
-3C1920:lI103|H3C19CC
-3C19CC:lI122|N
-3C1878:lH3C1930|H3C193C
-3C1930:t2:H3C19DC,H3C19E4
-3C19E4:lI97|H3C1A88
-3C1A88:lI112|H3C1B3C
-3C1B3C:lI112|H3C1C00
-3C1C00:lI108|H3C1CBC
-3C1CBC:lI105|H3C1D78
-3C1D78:lI99|H3C1E34
-3C1E34:lI97|H3C1EF0
-3C1EF0:lI116|H3C1FAC
-3C1FAC:lI105|H3C2060
-3C2060:lI111|H3C211C
-3C211C:lI110|H3C21D0
-3C21D0:lI47|H3C2284
-3C2284:lI120|H3C2340
-3C2340:lI45|H3C23FC
-3C23FC:lI103|H3C24A8
-3C24A8:lI116|H3C2564
-3C2564:lI97|H3C2618
-3C2618:lI114|N
-3C19DC:lI103|H3C1A80
-3C1A80:lI116|H3C1B34
-3C1B34:lI97|H3C1BF8
-3C1BF8:lI114|N
-3C193C:lH3C19EC|H3C19F8
-3C19EC:t2:H3C1A90,H3C1A98
-3C1A98:lI97|H3C1B4C
-3C1B4C:lI112|H3C1C10
-3C1C10:lI112|H3C1CC4
-3C1CC4:lI108|H3C1D80
-3C1D80:lI105|H3C1E3C
-3C1E3C:lI99|H3C1EF8
-3C1EF8:lI97|H3C1FB4
-3C1FB4:lI116|H3C2068
-3C2068:lI105|H3C2124
-3C2124:lI111|H3C21D8
-3C21D8:lI110|H3C228C
-3C228C:lI47|H3C2348
-3C2348:lI120|H3C2404
-3C2404:lI45|H3C24B0
-3C24B0:lI100|H3C256C
-3C256C:lI118|H3C2620
-3C2620:lI105|N
-3C1A90:lI100|H3C1B44
-3C1B44:lI118|H3C1C08
-3C1C08:lI105|N
-3C19F8:lH3C1AA0|H3C1AAC
-3C1AA0:t2:H3C1B54,H3C1B5C
-3C1B5C:lI97|H3C1C20
-3C1C20:lI112|H3C1CD4
-3C1CD4:lI112|H3C1D88
-3C1D88:lI108|H3C1E44
-3C1E44:lI105|H3C1F00
-3C1F00:lI99|H3C1FBC
-3C1FBC:lI97|H3C2070
-3C2070:lI116|H3C212C
-3C212C:lI105|H3C21E0
-3C21E0:lI111|H3C2294
-3C2294:lI110|H3C2350
-3C2350:lI47|H3C240C
-3C240C:lI120|H3C24B8
-3C24B8:lI45|H3C2574
-3C2574:lI100|H3C2628
-3C2628:lI105|H3C26DC
-3C26DC:lI114|H3C2798
-3C2798:lI101|H3C2854
-3C2854:lI99|H3C2918
-3C2918:lI116|H3C29E4
-3C29E4:lI111|H3C2AB0
-3C2AB0:lI114|N
-3C1B54:lI100|H3C1C18
-3C1C18:lI99|H3C1CCC
-3C1CCC:lI114|N
-3C1AAC:lH3C1B64|H3C1B70
-3C1B64:t2:H3C1C28,H3C1C30
-3C1C30:lI97|H3C1CE4
-3C1CE4:lI112|H3C1D98
-3C1D98:lI112|H3C1E4C
-3C1E4C:lI108|H3C1F08
-3C1F08:lI105|H3C1FC4
-3C1FC4:lI99|H3C2078
-3C2078:lI97|H3C2134
-3C2134:lI116|H3C21E8
-3C21E8:lI105|H3C229C
-3C229C:lI111|H3C2358
-3C2358:lI110|H3C2414
-3C2414:lI47|H3C24C0
-3C24C0:lI120|H3C257C
-3C257C:lI45|H3C2630
-3C2630:lI100|H3C26E4
-3C26E4:lI105|H3C27A0
-3C27A0:lI114|H3C285C
-3C285C:lI101|H3C2920
-3C2920:lI99|H3C29EC
-3C29EC:lI116|H3C2AB8
-3C2AB8:lI111|H3C2B84
-3C2B84:lI114|N
-3C1C28:lI100|H3C1CDC
-3C1CDC:lI105|H3C1D90
-3C1D90:lI114|N
-3C1B70:lH3C1C38|H3C1C44
-3C1C38:t2:H3C1CEC,H3C1CF4
-3C1CF4:lI97|H3C1DA8
-3C1DA8:lI112|H3C1E5C
-3C1E5C:lI112|H3C1F10
-3C1F10:lI108|H3C1FCC
-3C1FCC:lI105|H3C2080
-3C2080:lI99|H3C213C
-3C213C:lI97|H3C21F0
-3C21F0:lI116|H3C22A4
-3C22A4:lI105|H3C2360
-3C2360:lI111|H3C241C
-3C241C:lI110|H3C24C8
-3C24C8:lI47|H3C2584
-3C2584:lI120|H3C2638
-3C2638:lI45|H3C26EC
-3C26EC:lI100|H3C27A8
-3C27A8:lI105|H3C2864
-3C2864:lI114|H3C2928
-3C2928:lI101|H3C29F4
-3C29F4:lI99|H3C2AC0
-3C2AC0:lI116|H3C2B8C
-3C2B8C:lI111|H3C2C48
-3C2C48:lI114|N
-3C1CEC:lI100|H3C1DA0
-3C1DA0:lI120|H3C1E54
-3C1E54:lI114|N
-3C1C44:lH3C1CFC|H3C1D08
-3C1CFC:t2:H3C1DB0,H3C1DB8
-3C1DB8:lI97|H3C1E6C
-3C1E6C:lI112|H3C1F20
-3C1F20:lI112|H3C1FD4
-3C1FD4:lI108|H3C2088
-3C2088:lI105|H3C2144
-3C2144:lI99|H3C21F8
-3C21F8:lI97|H3C22AC
-3C22AC:lI116|H3C2368
-3C2368:lI105|H3C2424
-3C2424:lI111|H3C24D0
-3C24D0:lI110|H3C258C
-3C258C:lI47|H3C2640
-3C2640:lI120|H3C26F4
-3C26F4:lI45|H3C27B0
-3C27B0:lI99|H3C286C
-3C286C:lI115|H3C2930
-3C2930:lI104|N
-3C1DB0:lI99|H3C1E64
-3C1E64:lI115|H3C1F18
-3C1F18:lI104|N
-3C1D08:lH3C1DC0|H3C1DCC
-3C1DC0:t2:H3C1E74,H3C1E7C
-3C1E7C:lI97|H3C1F30
-3C1F30:lI112|H3C1FE4
-3C1FE4:lI112|H3C2098
-3C2098:lI108|H3C214C
-3C214C:lI105|H3C2200
-3C2200:lI99|H3C22B4
-3C22B4:lI97|H3C2370
-3C2370:lI116|H3C242C
-3C242C:lI105|H3C24D8
-3C24D8:lI111|H3C2594
-3C2594:lI110|H3C2648
-3C2648:lI47|H3C26FC
-3C26FC:lI120|H3C27B8
-3C27B8:lI45|H3C2874
-3C2874:lI99|H3C2938
-3C2938:lI112|H3C29FC
-3C29FC:lI105|H3C2AC8
-3C2AC8:lI111|N
-3C1E74:lI99|H3C1F28
-3C1F28:lI112|H3C1FDC
-3C1FDC:lI105|H3C2090
-3C2090:lI111|N
-3C1DCC:lH3C1E84|H3C1E90
-3C1E84:t2:H3C1F38,H3C1F40
-3C1F40:lI97|H3C1FEC
-3C1FEC:lI112|H3C20A0
-3C20A0:lI112|H3C2154
-3C2154:lI108|H3C2208
-3C2208:lI105|H3C22BC
-3C22BC:lI99|H3C2378
-3C2378:lI97|H3C2434
-3C2434:lI116|H3C24E0
-3C24E0:lI105|H3C259C
-3C259C:lI111|H3C2650
-3C2650:lI110|H3C2704
-3C2704:lI47|H3C27C0
-3C27C0:lI120|H3C287C
-3C287C:lI45|H3C2940
-3C2940:lI99|H3C2A04
-3C2A04:lI111|H3C2AD0
-3C2AD0:lI109|H3C2B94
-3C2B94:lI112|H3C2C50
-3C2C50:lI114|H3C2D00
-3C2D00:lI101|H3C2DA8
-3C2DA8:lI115|H3C2E40
-3C2E40:lI115|N
-3C1F38:lI90|N
-3C1E90:lH3C1F48|H3C1F54
-3C1F48:t2:H3C1FF4,H3C1FFC
-3C1FFC:lI97|H3C20B0
-3C20B0:lI112|H3C2164
-3C2164:lI112|H3C2210
-3C2210:lI108|H3C22C4
-3C22C4:lI105|H3C2380
-3C2380:lI99|H3C243C
-3C243C:lI97|H3C24E8
-3C24E8:lI116|H3C25A4
-3C25A4:lI105|H3C2658
-3C2658:lI111|H3C270C
-3C270C:lI110|H3C27C8
-3C27C8:lI47|H3C2884
-3C2884:lI120|H3C2948
-3C2948:lI45|H3C2A0C
-3C2A0C:lI99|H3C2AD8
-3C2AD8:lI100|H3C2B9C
-3C2B9C:lI108|H3C2C58
-3C2C58:lI105|H3C2D08
-3C2D08:lI110|H3C2DB0
-3C2DB0:lI107|N
-3C1FF4:lI118|H3C20A8
-3C20A8:lI99|H3C215C
-3C215C:lI100|N
-3C1F54:lH3C2004|H3C2010
-3C2004:t2:H3C20B8,H3C20C0
-3C20C0:lI97|H3C2174
-3C2174:lI112|H3C2220
-3C2220:lI112|H3C22D4
-3C22D4:lI108|H3C2390
-3C2390:lI105|H3C2444
-3C2444:lI99|H3C24F0
-3C24F0:lI97|H3C25AC
-3C25AC:lI116|H3C2660
-3C2660:lI105|H3C2714
-3C2714:lI111|H3C27D0
-3C27D0:lI110|H3C288C
-3C288C:lI47|H3C2950
-3C2950:lI120|H3C2A14
-3C2A14:lI45|H3C2AE0
-3C2AE0:lI98|H3C2BA4
-3C2BA4:lI99|H3C2C60
-3C2C60:lI112|H3C2D10
-3C2D10:lI105|H3C2DB8
-3C2DB8:lI111|N
-3C20B8:lI98|H3C216C
-3C216C:lI99|H3C2218
-3C2218:lI112|H3C22CC
-3C22CC:lI105|H3C2388
-3C2388:lI111|N
-3C2010:lH3C20C8|H3C20D4
-3C20C8:t2:H3C217C,H3C2184
-3C2184:lI97|H3C2230
-3C2230:lI112|H3C22E4
-3C22E4:lI112|H3C2398
-3C2398:lI108|H3C244C
-3C244C:lI105|H3C24F8
-3C24F8:lI99|H3C25B4
-3C25B4:lI97|H3C2668
-3C2668:lI116|H3C271C
-3C271C:lI105|H3C27D8
-3C27D8:lI111|H3C2894
-3C2894:lI110|H3C2958
-3C2958:lI47|H3C2A1C
-3C2A1C:lI114|H3C2AE8
-3C2AE8:lI116|H3C2BAC
-3C2BAC:lI102|N
-3C217C:lI114|H3C2228
-3C2228:lI116|H3C22DC
-3C22DC:lI102|N
-3C20D4:lH3C218C|H3C2198
-3C218C:t2:H3C2238,H3C2240
-3C2240:lI97|H3C22F4
-3C22F4:lI112|H3C23A8
-3C23A8:lI112|H3C2454
-3C2454:lI108|H3C2500
-3C2500:lI105|H3C25BC
-3C25BC:lI99|H3C2670
-3C2670:lI97|H3C2724
-3C2724:lI116|H3C27E0
-3C27E0:lI105|H3C289C
-3C289C:lI111|H3C2960
-3C2960:lI110|H3C2A24
-3C2A24:lI47|H3C2AF0
-3C2AF0:lI112|H3C2BB4
-3C2BB4:lI111|H3C2C68
-3C2C68:lI119|H3C2D18
-3C2D18:lI101|H3C2DC0
-3C2DC0:lI114|H3C2E48
-3C2E48:lI112|H3C2EC0
-3C2EC0:lI111|H3C2F38
-3C2F38:lI105|H3C2FA8
-3C2FA8:lI110|H3C3010
-3C3010:lI116|N
-3C2238:lI112|H3C22EC
-3C22EC:lI112|H3C23A0
-3C23A0:lI116|N
-3C2198:lH3C2248|H3C2254
-3C2248:t2:H3C22FC,H3C2304
-3C2304:lI97|H3C23B8
-3C23B8:lI112|H3C245C
-3C245C:lI112|H3C2508
-3C2508:lI108|H3C25C4
-3C25C4:lI105|H3C2678
-3C2678:lI99|H3C272C
-3C272C:lI97|H3C27E8
-3C27E8:lI116|H3C28A4
-3C28A4:lI105|H3C2968
-3C2968:lI111|H3C2A2C
-3C2A2C:lI110|H3C2AF8
-3C2AF8:lI47|H3C2BBC
-3C2BBC:lI112|H3C2C70
-3C2C70:lI111|H3C2D20
-3C2D20:lI115|H3C2DC8
-3C2DC8:lI116|H3C2E50
-3C2E50:lI115|H3C2EC8
-3C2EC8:lI99|H3C2F40
-3C2F40:lI114|H3C2FB0
-3C2FB0:lI105|H3C3018
-3C3018:lI112|H3C3078
-3C3078:lI116|N
-3C22FC:lI97|H3C23B0
-3C23B0:lI105|N
-3C2254:lH3C230C|H3C2318
-3C230C:t2:H3C23C0,H3C23C8
-3C23C8:lI97|H3C246C
-3C246C:lI112|H3C2518
-3C2518:lI112|H3C25CC
-3C25CC:lI108|H3C2680
-3C2680:lI105|H3C2734
-3C2734:lI99|H3C27F0
-3C27F0:lI97|H3C28AC
-3C28AC:lI116|H3C2970
-3C2970:lI105|H3C2A34
-3C2A34:lI111|H3C2B00
-3C2B00:lI110|H3C2BC4
-3C2BC4:lI47|H3C2C78
-3C2C78:lI112|H3C2D28
-3C2D28:lI111|H3C2DD0
-3C2DD0:lI115|H3C2E58
-3C2E58:lI116|H3C2ED0
-3C2ED0:lI115|H3C2F48
-3C2F48:lI99|H3C2FB8
-3C2FB8:lI114|H3C3020
-3C3020:lI105|H3C3080
-3C3080:lI112|H3C30D8
-3C30D8:lI116|N
-3C23C0:lI101|H3C2464
-3C2464:lI112|H3C2510
-3C2510:lI115|N
-3C2318:lH3C23D0|H3C23DC
-3C23D0:t2:H3C2474,H3C247C
-3C247C:lI97|H3C2528
-3C2528:lI112|H3C25D4
-3C25D4:lI112|H3C2688
-3C2688:lI108|H3C273C
-3C273C:lI105|H3C27F8
-3C27F8:lI99|H3C28B4
-3C28B4:lI97|H3C2978
-3C2978:lI116|H3C2A3C
-3C2A3C:lI105|H3C2B08
-3C2B08:lI111|H3C2BCC
-3C2BCC:lI110|H3C2C80
-3C2C80:lI47|H3C2D30
-3C2D30:lI112|H3C2DD8
-3C2DD8:lI111|H3C2E60
-3C2E60:lI115|H3C2ED8
-3C2ED8:lI116|H3C2F50
-3C2F50:lI115|H3C2FC0
-3C2FC0:lI99|H3C3028
-3C3028:lI114|H3C3088
-3C3088:lI105|H3C30E0
-3C30E0:lI112|H3C3130
-3C3130:lI116|N
-3C2474:lI112|H3C2520
-3C2520:lI115|N
-3C23DC:lH3C2484|H3C2490
-3C2484:t2:H3C2530,H3C2538
-3C2538:lI97|H3C25E4
-3C25E4:lI112|H3C2698
-3C2698:lI112|H3C2744
-3C2744:lI108|H3C2800
-3C2800:lI105|H3C28BC
-3C28BC:lI99|H3C2980
-3C2980:lI97|H3C2A44
-3C2A44:lI116|H3C2B10
-3C2B10:lI105|H3C2BD4
-3C2BD4:lI111|H3C2C88
-3C2C88:lI110|H3C2D38
-3C2D38:lI47|H3C2DE0
-3C2DE0:lI112|H3C2E68
-3C2E68:lI100|H3C2EE0
-3C2EE0:lI102|N
-3C2530:lI112|H3C25DC
-3C25DC:lI100|H3C2690
-3C2690:lI102|N
-3C2490:lH3C2540|H3C254C
-3C2540:t2:H3C25EC,H3C25F4
-3C25F4:lI97|H3C26A8
-3C26A8:lI112|H3C2754
-3C2754:lI112|H3C2808
-3C2808:lI108|H3C28C4
-3C28C4:lI105|H3C2988
-3C2988:lI99|H3C2A4C
-3C2A4C:lI97|H3C2B18
-3C2B18:lI116|H3C2BDC
-3C2BDC:lI105|H3C2C90
-3C2C90:lI111|H3C2D40
-3C2D40:lI110|H3C2DE8
-3C2DE8:lI47|H3C2E70
-3C2E70:lI111|H3C2EE8
-3C2EE8:lI100|H3C2F58
-3C2F58:lI97|N
-3C25EC:lI111|H3C26A0
-3C26A0:lI100|H3C274C
-3C274C:lI97|N
-3C254C:lH3C25FC|H3C2608
-3C25FC:t2:H3C26B0,H3C26B8
-3C26B8:lI97|H3C2764
-3C2764:lI112|H3C2818
-3C2818:lI112|H3C28CC
-3C28CC:lI108|H3C2990
-3C2990:lI105|H3C2A54
-3C2A54:lI99|H3C2B20
-3C2B20:lI97|H3C2BE4
-3C2BE4:lI116|H3C2C98
-3C2C98:lI105|H3C2D48
-3C2D48:lI111|H3C2DF0
-3C2DF0:lI110|H3C2E78
-3C2E78:lI47|H3C2EF0
-3C2EF0:lI111|H3C2F60
-3C2F60:lI99|H3C2FC8
-3C2FC8:lI116|H3C3030
-3C3030:lI101|H3C3090
-3C3090:lI116|H3C30E8
-3C30E8:lI45|H3C3138
-3C3138:lI115|H3C3180
-3C3180:lI116|H3C31C8
-3C31C8:lI114|H3C3210
-3C3210:lI101|H3C3258
-3C3258:lI97|H3C32A0
-3C32A0:lI109|N
-3C26B0:lI98|H3C275C
-3C275C:lI105|H3C2810
-3C2810:lI110|N
-3C2608:lH3C26C0|H3C26CC
-3C26C0:t2:H3C276C,H3C2774
-3C2774:lI97|H3C2828
-3C2828:lI112|H3C28DC
-3C28DC:lI112|H3C2998
-3C2998:lI108|H3C2A5C
-3C2A5C:lI105|H3C2B28
-3C2B28:lI99|H3C2BEC
-3C2BEC:lI97|H3C2CA0
-3C2CA0:lI116|H3C2D50
-3C2D50:lI105|H3C2DF8
-3C2DF8:lI111|H3C2E80
-3C2E80:lI110|H3C2EF8
-3C2EF8:lI47|H3C2F68
-3C2F68:lI111|H3C2FD0
-3C2FD0:lI99|H3C3038
-3C3038:lI116|H3C3098
-3C3098:lI101|H3C30F0
-3C30F0:lI116|H3C3140
-3C3140:lI45|H3C3188
-3C3188:lI115|H3C31D0
-3C31D0:lI116|H3C3218
-3C3218:lI114|H3C3260
-3C3260:lI101|H3C32A8
-3C32A8:lI97|H3C32E8
-3C32E8:lI109|N
-3C276C:lI100|H3C2820
-3C2820:lI109|H3C28D4
-3C28D4:lI115|N
-3C26CC:lH3C277C|H3C2788
-3C277C:t2:H3C2830,H3C2838
-3C2838:lI97|H3C28EC
-3C28EC:lI112|H3C29A8
-3C29A8:lI112|H3C2A64
-3C2A64:lI108|H3C2B30
-3C2B30:lI105|H3C2BF4
-3C2BF4:lI99|H3C2CA8
-3C2CA8:lI97|H3C2D58
-3C2D58:lI116|H3C2E00
-3C2E00:lI105|H3C2E88
-3C2E88:lI111|H3C2F00
-3C2F00:lI110|H3C2F70
-3C2F70:lI47|H3C2FD8
-3C2FD8:lI111|H3C3040
-3C3040:lI99|H3C30A0
-3C30A0:lI116|H3C30F8
-3C30F8:lI101|H3C3148
-3C3148:lI116|H3C3190
-3C3190:lI45|H3C31D8
-3C31D8:lI115|H3C3220
-3C3220:lI116|H3C3268
-3C3268:lI114|H3C32B0
-3C32B0:lI101|H3C32F0
-3C32F0:lI97|H3C3320
-3C3320:lI109|N
-3C2830:lI108|H3C28E4
-3C28E4:lI104|H3C29A0
-3C29A0:lI97|N
-3C2788:lH3C2840|H3C284C
-3C2840:t2:H3C28F4,H3C28FC
-3C28FC:lI97|H3C29B8
-3C29B8:lI112|H3C2A74
-3C2A74:lI112|H3C2B38
-3C2B38:lI108|H3C2BFC
-3C2BFC:lI105|H3C2CB0
-3C2CB0:lI99|H3C2D60
-3C2D60:lI97|H3C2E08
-3C2E08:lI116|H3C2E90
-3C2E90:lI105|H3C2F08
-3C2F08:lI111|H3C2F78
-3C2F78:lI110|H3C2FE0
-3C2FE0:lI47|H3C3048
-3C3048:lI111|H3C30A8
-3C30A8:lI99|H3C3100
-3C3100:lI116|H3C3150
-3C3150:lI101|H3C3198
-3C3198:lI116|H3C31E0
-3C31E0:lI45|H3C3228
-3C3228:lI115|H3C3270
-3C3270:lI116|H3C32B8
-3C32B8:lI114|H3C32F8
-3C32F8:lI101|H3C3328
-3C3328:lI97|H3C3350
-3C3350:lI109|N
-3C28F4:lI108|H3C29B0
-3C29B0:lI122|H3C2A6C
-3C2A6C:lI104|N
-3C284C:lH3C2904|H3C2910
-3C2904:t2:H3C29C0,H3C29C8
-3C29C8:lI97|H3C2A84
-3C2A84:lI112|H3C2B48
-3C2B48:lI112|H3C2C04
-3C2C04:lI108|H3C2CB8
-3C2CB8:lI105|H3C2D68
-3C2D68:lI99|H3C2E10
-3C2E10:lI97|H3C2E98
-3C2E98:lI116|H3C2F10
-3C2F10:lI105|H3C2F80
-3C2F80:lI111|H3C2FE8
-3C2FE8:lI110|H3C3050
-3C3050:lI47|H3C30B0
-3C30B0:lI111|H3C3108
-3C3108:lI99|H3C3158
-3C3158:lI116|H3C31A0
-3C31A0:lI101|H3C31E8
-3C31E8:lI116|H3C3230
-3C3230:lI45|H3C3278
-3C3278:lI115|H3C32C0
-3C32C0:lI116|H3C3300
-3C3300:lI114|H3C3330
-3C3330:lI101|H3C3358
-3C3358:lI97|H3C3378
-3C3378:lI109|N
-3C29C0:lI101|H3C2A7C
-3C2A7C:lI120|H3C2B40
-3C2B40:lI101|N
-3C2910:lH3C29D0|H3C29DC
-3C29D0:t2:H3C2A8C,H3C2A94
-3C2A94:lI97|H3C2B58
-3C2B58:lI112|H3C2C14
-3C2C14:lI112|H3C2CC8
-3C2CC8:lI108|H3C2D78
-3C2D78:lI105|H3C2E18
-3C2E18:lI99|H3C2EA0
-3C2EA0:lI97|H3C2F18
-3C2F18:lI116|H3C2F88
-3C2F88:lI105|H3C2FF0
-3C2FF0:lI111|H3C3058
-3C3058:lI110|H3C30B8
-3C30B8:lI47|H3C3110
-3C3110:lI111|H3C3160
-3C3160:lI99|H3C31A8
-3C31A8:lI116|H3C31F0
-3C31F0:lI101|H3C3238
-3C3238:lI116|H3C3280
-3C3280:lI45|H3C32C8
-3C32C8:lI115|H3C3308
-3C3308:lI116|H3C3338
-3C3338:lI114|H3C3360
-3C3360:lI101|H3C3380
-3C3380:lI97|H3C3398
-3C3398:lI109|N
-3C2A8C:lI99|H3C2B50
-3C2B50:lI108|H3C2C0C
-3C2C0C:lI97|H3C2CC0
-3C2CC0:lI115|H3C2D70
-3C2D70:lI115|N
-3C29DC:lH3C2A9C|H3C2AA8
-3C2A9C:t2:H3C2B60,H3C2B68
-3C2B68:lI97|H3C2C24
-3C2C24:lI112|H3C2CD8
-3C2CD8:lI112|H3C2D80
-3C2D80:lI108|H3C2E20
-3C2E20:lI105|H3C2EA8
-3C2EA8:lI99|H3C2F20
-3C2F20:lI97|H3C2F90
-3C2F90:lI116|H3C2FF8
-3C2FF8:lI105|H3C3060
-3C3060:lI111|H3C30C0
-3C30C0:lI110|H3C3118
-3C3118:lI47|H3C3168
-3C3168:lI109|H3C31B0
-3C31B0:lI115|H3C31F8
-3C31F8:lI119|H3C3240
-3C3240:lI111|H3C3288
-3C3288:lI114|H3C32D0
-3C32D0:lI100|N
-3C2B60:lI100|H3C2C1C
-3C2C1C:lI111|H3C2CD0
-3C2CD0:lI99|N
-3C2AA8:lH3C2B70|H3C2B7C
-3C2B70:t2:H3C2C2C,H3C2C34
-3C2C34:lI97|H3C2CE8
-3C2CE8:lI112|H3C2D90
-3C2D90:lI112|H3C2E28
-3C2E28:lI108|H3C2EB0
-3C2EB0:lI105|H3C2F28
-3C2F28:lI99|H3C2F98
-3C2F98:lI97|H3C3000
-3C3000:lI116|H3C3068
-3C3068:lI105|H3C30C8
-3C30C8:lI111|H3C3120
-3C3120:lI110|H3C3170
-3C3170:lI47|H3C31B8
-3C31B8:lI109|H3C3200
-3C3200:lI97|H3C3248
-3C3248:lI99|H3C3290
-3C3290:lI45|H3C32D8
-3C32D8:lI99|H3C3310
-3C3310:lI111|H3C3340
-3C3340:lI109|H3C3368
-3C3368:lI112|H3C3388
-3C3388:lI97|H3C33A0
-3C33A0:lI99|H3C33B0
-3C33B0:lI116|H3C33C0
-3C33C0:lI112|H3C33D0
-3C33D0:lI114|H3C33E0
-3C33E0:lI111|N
-3C2C2C:lI99|H3C2CE0
-3C2CE0:lI112|H3C2D88
-3C2D88:lI116|N
-3C2B7C:lH3C2C3C|N
-3C2C3C:t2:H3C2CF0,H3C2CF8
-3C2CF8:lI97|H3C2DA0
-3C2DA0:lI112|H3C2E38
-3C2E38:lI112|H3C2EB8
-3C2EB8:lI108|H3C2F30
-3C2F30:lI105|H3C2FA0
-3C2FA0:lI99|H3C3008
-3C3008:lI97|H3C3070
-3C3070:lI116|H3C30D0
-3C30D0:lI105|H3C3128
-3C3128:lI111|H3C3178
-3C3178:lI110|H3C31C0
-3C31C0:lI47|H3C3208
-3C3208:lI109|H3C3250
-3C3250:lI97|H3C3298
-3C3298:lI99|H3C32E0
-3C32E0:lI45|H3C3318
-3C3318:lI98|H3C3348
-3C3348:lI105|H3C3370
-3C3370:lI110|H3C3390
-3C3390:lI104|H3C33A8
-3C33A8:lI101|H3C33B8
-3C33B8:lI120|H3C33C8
-3C33C8:lI52|H3C33D8
-3C33D8:lI48|N
-3C2CF0:lI104|H3C2D98
-3C2D98:lI113|H3C2E30
-3C2E30:lI120|N
-3BDBCC:lH3BDA78|H3BDA8C
-3BDA78:t2:A4:port,I8888
-3BDA8C:lH3BDB04|H3BDB10
-3BDB04:t2:AC:bind_address,H3BDB64
-3BDB64:t4:I127,I0,I0,I1
-3BDB10:lH3BDB78|H3BDB84
-3BDB78:t2:AB:server_name,H3BDBD4
-3BDBD4:lI108|H3BDC24
-3BDC24:lI111|H3BDC88
-3BDC88:lI99|H3BDCF0
-3BDCF0:lI97|H3BDD70
-3BDD70:lI108|H3BDDF8
-3BDDF8:lI104|H3BDE90
-3BDE90:lI111|H3BDF40
-3BDF40:lI115|H3BDFFC
-3BDFFC:lI116|N
-3BDB84:lH3BDBDC|H3BDBE8
-3BDBDC:t2:AE:max_header_siz,I1024
-3BDBE8:lH3BDC2C|H3BDC38
-3BDC2C:t2:A11:max_header_action,A8:reply414
-3BDC38:lH3BDC90|H3BDC9C
-3BDC90:t2:A8:com_type,A7:ip_comm
-3BDC9C:lH3BDCF8|H3BDD04
-3BDCF8:t2:A7:modules,H3BDD78
-3BDD78:lA9:mod_alias|H3BDE00
-3BDE00:lA8:mod_auth|H3BDE98
-3BDE98:lA7:mod_esi|H3BDF48
-3BDF48:lAB:mod_actions|H3BE004
-3BE004:lA7:mod_cgi|H3BE0D0
-3BE0D0:lAB:mod_include|H3BE1A4
-3BE1A4:lA7:mod_dir|H3BE288
-3BE288:lA7:mod_get|H3BE378
-3BE378:lA8:mod_head|H3BE47C
-3BE47C:lA7:mod_log|H3BE580
-3BE580:lAC:mod_disk_log|N
-3BDD04:lH3BDD80|H3BDD8C
-3BDD80:t2:AF:directory_index,H3BDE08
-3BDE08:lH3BDEA0|N
-3BDEA0:lI105|H3BDF50
-3BDF50:lI110|H3BE00C
-3BE00C:lI100|H3BE0D8
-3BE0D8:lI101|H3BE1AC
-3BE1AC:lI120|H3BE290
-3BE290:lI46|H3BE380
-3BE380:lI104|H3BE484
-3BE484:lI116|H3BE588
-3BE588:lI109|H3BE68C
-3BE68C:lI108|N
-3BDD8C:lH3BDE10|H3BDE1C
-3BDE10:t2:AC:default_type,H3BDEA8
-3BDEA8:lI116|H3BDF58
-3BDF58:lI101|H3BE014
-3BE014:lI120|H3BE0E0
-3BE0E0:lI116|H3BE1B4
-3BE1B4:lI47|H3BE298
-3BE298:lI112|H3BE388
-3BE388:lI108|H3BE48C
-3BE48C:lI97|H3BE590
-3BE590:lI105|H3BE694
-3BE694:lI110|N
-3BDE1C:lH3BDEB0|H3BDEBC
-3BDEB0:t2:A10:erl_script_alias,H3BDF60
-3BDF60:t2:H3BE01C,H3BE024
-3BE024:lH3BE0F0|N
-3BE0F0:lI119|H3BE1C4
-3BE1C4:lI101|H3BE2A8
-3BE2A8:lI98|H3BE398
-3BE398:lI116|H3BE49C
-3BE49C:lI111|H3BE5A0
-3BE5A0:lI111|H3BE6A4
-3BE6A4:lI108|N
-3BE01C:lI47|H3BE0E8
-3BE0E8:lI119|H3BE1BC
-3BE1BC:lI101|H3BE2A0
-3BE2A0:lI98|H3BE390
-3BE390:lI116|H3BE494
-3BE494:lI111|H3BE598
-3BE598:lI111|H3BE69C
-3BE69C:lI108|N
-3BDEBC:lH3BDF6C|H3BDF78
-3BDF6C:t2:A5:alias,H3BE02C
-3BE02C:t2:H3BE0F8,H3BE100
-3BE100:lI47|H3BE1D4
-3BE1D4:lI99|H3BE2B8
-3BE2B8:lI108|H3BE3A8
-3BE3A8:lI101|H3BE4AC
-3BE4AC:lI97|H3BE5B0
-3BE5B0:lI114|H3BE6B4
-3BE6B4:lI99|H3BE7A8
-3BE7A8:lI97|H3BE894
-3BE894:lI115|H3BE980
-3BE980:lI101|H3BEA74
-3BEA74:lI47|H3BEB68
-3BEB68:lI111|H3BEC54
-3BEC54:lI116|H3BED40
-3BED40:lI112|H3BEE2C
-3BEE2C:lI47|H3BEF00
-3BEF00:lI101|H3BEFD4
-3BEFD4:lI114|H3BF0A0
-3BF0A0:lI116|H3BF174
-3BF174:lI115|H3BF238
-3BF238:lI47|H3BF2FC
-3BF2FC:lI108|H3BF3A8
-3BF3A8:lI105|H3BF45C
-3BF45C:lI98|H3BF518
-3BF518:lI47|H3BF5DC
-3BF5DC:lI111|H3BF6B0
-3BF6B0:lI98|H3BF784
-3BF784:lI115|H3BF858
-3BF858:lI101|H3BF93C
-3BF93C:lI114|H3BFA18
-3BFA18:lI118|H3BFAF4
-3BFAF4:lI101|H3BFBD0
-3BFBD0:lI114|H3BFC9C
-3BFC9C:lI47|H3BFD60
-3BFD60:lI112|H3BFE2C
-3BFE2C:lI114|H3BFEE0
-3BFEE0:lI105|H3BFF94
-3BFF94:lI118|H3C0040
-3C0040:lI47|H3C00EC
-3C00EC:lI99|H3C0198
-3C0198:lI114|H3C024C
-3C024C:lI97|H3C0308
-3C0308:lI115|H3C03BC
-3C03BC:lI104|H3C0458
-3C0458:lI100|H3C04F4
-3C04F4:lI117|H3C0590
-3C0590:lI109|H3C0634
-3C0634:lI112|H3C06E0
-3C06E0:lI95|H3C078C
-3C078C:lI118|H3C0830
-3C0830:lI105|H3C08BC
-3C08BC:lI101|H3C0950
-3C0950:lI119|H3C09E4
-3C09E4:lI101|H3C0A80
-3C0A80:lI114|N
-3BE0F8:lI47|H3BE1CC
-3BE1CC:lI99|H3BE2B0
-3BE2B0:lI114|H3BE3A0
-3BE3A0:lI97|H3BE4A4
-3BE4A4:lI115|H3BE5A8
-3BE5A8:lI104|H3BE6AC
-3BE6AC:lI100|H3BE7A0
-3BE7A0:lI117|H3BE88C
-3BE88C:lI109|H3BE978
-3BE978:lI112|H3BEA6C
-3BEA6C:lI95|H3BEB60
-3BEB60:lI118|H3BEC4C
-3BEC4C:lI105|H3BED38
-3BED38:lI101|H3BEE24
-3BEE24:lI119|H3BEEF8
-3BEEF8:lI101|H3BEFCC
-3BEFCC:lI114|N
-3BDF78:lH3BE038|H3BE044
-3BE038:t2:A5:alias,H3BE108
-3BE108:t2:H3BE1DC,H3BE1E4
-3BE1E4:lI47|H3BE2C8
-3BE2C8:lI99|H3BE3B8
-3BE3B8:lI108|H3BE4BC
-3BE4BC:lI101|H3BE5C0
-3BE5C0:lI97|H3BE6C4
-3BE6C4:lI114|H3BE7B8
-3BE7B8:lI99|H3BE8A4
-3BE8A4:lI97|H3BE990
-3BE990:lI115|H3BEA84
-3BEA84:lI101|H3BEB78
-3BEB78:lI47|H3BEC64
-3BEC64:lI111|H3BED50
-3BED50:lI116|H3BEE3C
-3BEE3C:lI112|H3BEF10
-3BEF10:lI47|H3BEFE4
-3BEFE4:lI101|H3BF0B0
-3BF0B0:lI114|H3BF184
-3BF184:lI116|H3BF248
-3BF248:lI115|H3BF304
-3BF304:lI47|H3BF3B0
-3BF3B0:lI101|H3BF464
-3BF464:lI114|H3BF520
-3BF520:lI116|H3BF5E4
-3BF5E4:lI115|H3BF6B8
-3BF6B8:lI47|H3BF78C
-3BF78C:lI100|H3BF860
-3BF860:lI111|H3BF944
-3BF944:lI99|H3BFA20
-3BFA20:lI47|H3BFAFC
-3BFAFC:lI104|H3BFBD8
-3BFBD8:lI116|H3BFCA4
-3BFCA4:lI109|H3BFD68
-3BFD68:lI108|N
-3BE1DC:lI47|H3BE2C0
-3BE2C0:lI99|H3BE3B0
-3BE3B0:lI114|H3BE4B4
-3BE4B4:lI97|H3BE5B8
-3BE5B8:lI115|H3BE6BC
-3BE6BC:lI104|H3BE7B0
-3BE7B0:lI100|H3BE89C
-3BE89C:lI117|H3BE988
-3BE988:lI109|H3BEA7C
-3BEA7C:lI112|H3BEB70
-3BEB70:lI95|H3BEC5C
-3BEC5C:lI101|H3BED48
-3BED48:lI114|H3BEE34
-3BEE34:lI116|H3BEF08
-3BEF08:lI115|H3BEFDC
-3BEFDC:lI95|H3BF0A8
-3BF0A8:lI100|H3BF17C
-3BF17C:lI111|H3BF240
-3BF240:lI99|N
-3BE044:lH3BE114|H3BE120
-3BE114:t2:A5:alias,H3BE1EC
-3BE1EC:t2:H3BE2D0,H3BE2D8
-3BE2D8:lI47|H3BE3C8
-3BE3C8:lI99|H3BE4CC
-3BE4CC:lI108|H3BE5D0
-3BE5D0:lI101|H3BE6D4
-3BE6D4:lI97|H3BE7C8
-3BE7C8:lI114|H3BE8B4
-3BE8B4:lI99|H3BE9A0
-3BE9A0:lI97|H3BEA94
-3BEA94:lI115|H3BEB88
-3BEB88:lI101|H3BEC74
-3BEC74:lI47|H3BED60
-3BED60:lI111|H3BEE4C
-3BEE4C:lI116|H3BEF20
-3BEF20:lI112|H3BEFEC
-3BEFEC:lI47|H3BF0B8
-3BF0B8:lI101|H3BF18C
-3BF18C:lI114|H3BF250
-3BF250:lI116|H3BF30C
-3BF30C:lI115|H3BF3B8
-3BF3B8:lI47|H3BF46C
-3BF46C:lI108|H3BF528
-3BF528:lI105|H3BF5EC
-3BF5EC:lI98|H3BF6C0
-3BF6C0:lI47|H3BF794
-3BF794:lI111|H3BF868
-3BF868:lI98|H3BF94C
-3BF94C:lI115|H3BFA28
-3BFA28:lI101|H3BFB04
-3BFB04:lI114|H3BFBE0
-3BFBE0:lI118|H3BFCAC
-3BFCAC:lI101|H3BFD70
-3BFD70:lI114|H3BFE34
-3BFE34:lI47|H3BFEE8
-3BFEE8:lI100|H3BFF9C
-3BFF9C:lI111|H3C0048
-3C0048:lI99|H3C00F4
-3C00F4:lI47|H3C01A0
-3C01A0:lI104|H3C0254
-3C0254:lI116|H3C0310
-3C0310:lI109|H3C03C4
-3C03C4:lI108|N
-3BE2D0:lI47|H3BE3C0
-3BE3C0:lI99|H3BE4C4
-3BE4C4:lI114|H3BE5C8
-3BE5C8:lI97|H3BE6CC
-3BE6CC:lI115|H3BE7C0
-3BE7C0:lI104|H3BE8AC
-3BE8AC:lI100|H3BE998
-3BE998:lI117|H3BEA8C
-3BEA8C:lI109|H3BEB80
-3BEB80:lI112|H3BEC6C
-3BEC6C:lI95|H3BED58
-3BED58:lI100|H3BEE44
-3BEE44:lI111|H3BEF18
-3BEF18:lI99|N
-3BE120:lH3BE1F8|N
-3BE1F8:t2:A10:erl_script_alias,H3BE2E0
-3BE2E0:t2:H3BE3D0,H3BE3D8
-3BE3D8:lH3BE4DC|N
-3BE4DC:lI99|H3BE5E0
-3BE5E0:lI114|H3BE6E4
-3BE6E4:lI97|H3BE7D8
-3BE7D8:lI115|H3BE8C4
-3BE8C4:lI104|H3BE9B0
-3BE9B0:lI100|H3BEAA4
-3BEAA4:lI117|H3BEB90
-3BEB90:lI109|H3BEC7C
-3BEC7C:lI112|H3BED68
-3BED68:lI95|H3BEE54
-3BEE54:lI118|H3BEF28
-3BEF28:lI105|H3BEFF4
-3BEFF4:lI101|H3BF0C0
-3BF0C0:lI119|H3BF194
-3BF194:lI101|H3BF258
-3BF258:lI114|N
-3BE3D0:lI47|H3BE4D4
-3BE4D4:lI99|H3BE5D8
-3BE5D8:lI100|H3BE6DC
-3BE6DC:lI118|H3BE7D0
-3BE7D0:lI95|H3BE8BC
-3BE8BC:lI101|H3BE9A8
-3BE9A8:lI114|H3BEA9C
-3BEA9C:lI108|N
-3BDE2C:lH3BDA9C|H3BDECC
-3BDA9C:t4:I127,I0,I0,I1
-3BDECC:lI8888|H3BDF88
-3BDF88:lN|N
-3BDD1C:lN|N
-3BDA50:t2:AD:$initial_call,H3BDAB8
-3BDAB8:t3:A3:gen,A7:init_it,H3BDAB0
-3BDA5C:t2:A9:verbosity,A7:silence
-3BDAC8:t2:AE:auth_verbosity,A7:silence
-3BDB28:t2:A12:security_verbosity,A7:silence
-3BDB9C:t2:A12:acceptor_verbosity,A7:silence
-3BDC00:t2:AA:$ancestors,H3BDC5C
-3BDC5C:lA1A:httpd_sup__127_0_0_1__8888|H3BDCB4
-3BDCB4:lA8:web_tool|H3BDD24
-3BDD24:lP<0.27.0>|N
-3BDADC:t2:A19:request_handler_verbosity,A7:silence
-3BDB3C:t2:A5:sname,A3:man
-=proc_dictionary:<0.47.0>
-H36E688
-H36E694
-H36E6A0
-H36E6AC
-=proc_stack:<0.47.0>
-36c520:SReturn addr 0x362C9C (inet_tcp:accept/2 + 20)
-y0:I5
-y1:p<0.161>
-y2:p<0.141>
-36c530:SReturn addr 0x500C5C (httpd_socket:accept/3 + 280)
-y0:N
-36c538:SReturn addr 0x502BFC (httpd_acceptor:acceptor/4 + 164)
-y0:N
-36c540:SReturn addr 0x225860 (proc_lib:init_p/5 + 164)
-y0:SCatch 0x502BFC (httpd_acceptor:acceptor/4 + 164)
-y1:P<0.46.0>
-y2:A7:ip_comm
-y3:p<0.141>
-y4:A1B:httpd_conf__127_0_0_1__8888
-36c558:SReturn addr 0x156F90 (<terminate process normally>)
-y0:SCatch 0x225860 (proc_lib:init_p/5 + 164)
-y1:AE:httpd_acceptor
-y2:A8:acceptor
-y3:H36E6C8
-=proc_heap:<0.47.0>
-36E6C8:lP<0.44.0>|H36E724
-36E724:lP<0.46.0>|H36E748
-36E748:lA7:ip_comm|H36E760
-36E760:lH36E6D0|H36E778
-36E6D0:t4:I127,I0,I0,I1
-36E778:lI8888|H36E788
-36E788:lA1B:httpd_conf__127_0_0_1__8888|H36E798
-36E798:lA7:silence|N
-36E688:t2:AD:$initial_call,H36E6F0
-36E6F0:t3:AE:httpd_acceptor,A8:acceptor,H36E6C8
-36E694:t2:A9:verbosity,A7:silence
-36E6A0:t2:AA:$ancestors,H36E700
-36E700:lA1E:httpd_acc_sup__127_0_0_1__8888|H36E72C
-36E72C:lA1A:httpd_sup__127_0_0_1__8888|H36E750
-36E750:lA8:web_tool|H36E768
-36E768:lP<0.27.0>|N
-36E6AC:t2:A5:sname,A3:acc
-=proc_dictionary:<0.48.0>
-H385E48
-H385E54
-=proc_stack:<0.48.0>
-3ac1bc:SReturn addr 0x225860 (proc_lib:init_p/5 + 164)
-y0:N
-y1:A8:infinity
-y2:A10:crashdump_viewer
-y3:H3AB280
-y4:A17:crashdump_viewer_server
-y5:P<0.41.0>
-3ac1d8:SReturn addr 0x156F90 (<terminate process normally>)
-y0:SCatch 0x225860 (proc_lib:init_p/5 + 164)
-y1:A3:gen
-y2:A7:init_it
-y3:H385E90
-=proc_heap:<0.48.0>
-3AB280:t8:A5:state,A9:undefined,A9:undefined,A9:undefined,A5:false,I4,A9:undefined,P<0.56.0>
-385E90:lAA:gen_server|H385ED8
-385ED8:lP<0.41.0>|H385F10
-385F10:lP<0.41.0>|H385F58
-385F58:lH385FA8|H385FB4
-385FA8:t2:A5:local,A17:crashdump_viewer_server
-385FB4:lA10:crashdump_viewer|H386014
-386014:lN|H38606C
-38606C:lN|N
-385E48:t2:AD:$initial_call,H385EB0
-385EB0:t3:A3:gen,A7:init_it,H385E90
-385E54:t2:AA:$ancestors,H385EC0
-385EC0:lA6:websup|H385F08
-385F08:lA8:web_tool|H385F50
-385F50:lP<0.27.0>|N
-=proc_stack:<0.49.0>
-36a114:SReturn addr 0x30174C (io:parse_erl_exprs/3 + 92)
-y0:H369E10
-y1:P<0.22.0>
-36a120:SReturn addr 0x2E5360 (shell:'-get_command/4-fun-0-'/1 + 20)
-y0:N
-36a128:SReturn addr 0x156F90 (<terminate process normally>)
-=proc_heap:<0.49.0>
-369E10:E21:8372000364000D6E6F6E6F6465406E6F686F737400000001330000000000000000
-=atoms
-http_cache_control
-copy_word
-drop_line
-copy_line
-write_rest_of_line
-drop_to_empty_line
-read_to_empty_line_reverse
-set_pos
-read_line_backwards
-jumped
-jump_to_empty_line_or_eof
-get_pos
-translate_atoms
-translate_fun
-translate_funs
-translate_loaded_modules2
-translate_loaded_modules_totals
-translate_loaded_modules
-translate_links
-get_all_creations
-translate_node_info2
-translate_node_info
-translate_dist_info2
-translate_dist_info
-get_msg
-translate_timers
-translate_ets
-translate_ets_tables
-do_translate_sl_alloc_r7_r8
-translate_sl_alloc_r7_r8
-translate_sl_alloc_line
-do_translate_sl_alloc
-translate_sl_alloc
-translate_memory_and_allocated_area_r9b
-translate_allocated_areas
-translate_internal_table_line
-translate_index_table
-translate_hash_table
-translate_internal_tables
-translate_ports
-write_last_calls
-write_msg_q_stuff
-translate_process
-translate_processes
-erts_vsn
-translate_summary
-'Send'
-erl_crash_dump
-internal_tables
-mods
diff --git a/lib/observer/test/crashdump_viewer_SUITE_data/r10b_dump.trunc.noatoms b/lib/observer/test/crashdump_viewer_SUITE_data/r10b_dump.trunc.noatoms
deleted file mode 100644
index 9f20ef3e44..0000000000
--- a/lib/observer/test/crashdump_viewer_SUITE_data/r10b_dump.trunc.noatoms
+++ /dev/null
@@ -1,13035 +0,0 @@
-=erl_crash_dump:0.1
-Wed Apr 21 13:22:44 2004
-Slogan: eheap_alloc: Cannot allocate 785672 bytes of memory (of type "heap").
-System version: Erlang (BEAM) emulator version 5.4 [source] [hipe] [threads:0]
-Compiled: Thu Dec 18 14:07:45 2003
-Atoms: 5614
-=memory
-total: 653336887
-processes: 1768396
-processes_used: 1765460
-system: 651568491
-atom: 244837
-atom_used: 237116
-binary: 648618369
-code: 2158413
-ets: 225620
-=hash_table:atom_tab
-size: 4813
-used: 3304
-objs: 5614
-depth: 7
-=index_table:atom_tab
-size: 5700
-limit: 1048576
-used: 5614
-rate: 100
-=hash_table:module_code
-size: 97
-used: 69
-objs: 107
-depth: 5
-=index_table:module_code
-size: 110
-limit: 65536
-used: 107
-rate: 10
-=hash_table:export_list
-size: 2411
-used: 1674
-objs: 2843
-depth: 6
-=index_table:export_list
-size: 2900
-limit: 65536
-used: 2843
-rate: 100
-=hash_table:process_reg
-size: 47
-used: 16
-objs: 23
-depth: 3
-=hash_table:fun_table
-size: 397
-used: 261
-objs: 400
-depth: 4
-=hash_table:node_table
-size: 11
-used: 1
-objs: 1
-depth: 1
-=hash_table:dist_table
-size: 11
-used: 1
-objs: 1
-depth: 1
-=allocated_areas
-processes: 1765460 1768396
-ets: 225620
-sys_misc: 24634
-static: 295033
-atom_space: 65544 57967
-binary: 648618369
-atom_table: 42141
-module_table: 920
-export_table: 21336
-register_table: 252
-fun_table: 1650
-module_refs: 1024
-loaded_code: 1968915
-dist_table: 159
-node_table: 131
-bits_bufs_size: 19
-bif_timer: 13392
-link_lh: 0
-dist_buf: 0
-proc: 15080 13576
-atom_entry: 137152 137008
-export_entry: 138448 137632
-module_entry: 4872 4352
-reg_proc: 1000 592
-link_nh: 2464 2080
-link_sh: 832 192
-proc_list: 24 24
-fun_entry: 22584 22584
-db_tab: 1632 1632
-=allocator:sys_alloc
-option e: true
-option m: libc
-=allocator:temp_alloc
-versions: 0.9 2.1
-option e: true
-option sbct: 524288
-option asbcst: 4145152
-option rsbcst: 90
-option rsbcmt: 80
-option mmbcs: 65536
-option mmsbc: 256
-option mmmbc: 10
-option lmbcs: 5242880
-option smbcs: 1048576
-option mbcgs: 10
-option as: af
-mbcs blocks: 0 9 9
-mbcs blocks size: 0 35376 35376
-mbcs carriers: 1 1 1
-mbcs mseg carriers: 0
-mbcs sys_alloc carriers: 1
-mbcs carriers size: 65568 65568 65568
-mbcs mseg carriers size: 0
-mbcs sys_alloc carriers size: 65568
-sbcs blocks: 0 0 0
-sbcs blocks size: 0 0 0
-sbcs carriers: 0 0 0
-sbcs mseg carriers: 0
-sbcs sys_alloc carriers: 0
-sbcs carriers size: 0 0 0
-sbcs mseg carriers size: 0
-sbcs sys_alloc carriers size: 0
-temp_alloc calls: 6155
-temp_free calls: 6155
-temp_realloc calls: 29
-mseg_alloc calls: 0
-mseg_dealloc calls: 0
-mseg_realloc calls: 0
-sys_alloc calls: 1
-sys_free calls: 0
-sys_realloc calls: 0
-=allocator:sl_alloc
-option e: false
-=allocator:std_alloc
-option e: false
-=allocator:ll_alloc
-versions: 0.9 2.1
-option e: true
-option sbct: 4294967295
-option asbcst: 0
-option rsbcst: 0
-option rsbcmt: 0
-option mmbcs: 2097152
-option mmsbc: 0
-option mmmbc: 0
-option lmbcs: 5242880
-option smbcs: 1048576
-option mbcgs: 10
-option as: aobf
-mbcs blocks: 592 592 592
-mbcs blocks size: 2838520 2863304 2863304
-mbcs carriers: 2 2 2
-mbcs mseg carriers: 0
-mbcs sys_alloc carriers: 2
-mbcs carriers size: 3145760 3145760 3145760
-mbcs mseg carriers size: 0
-mbcs sys_alloc carriers size: 3145760
-sbcs blocks: 0 0 0
-sbcs blocks size: 0 0 0
-sbcs carriers: 0 0 0
-sbcs mseg carriers: 0
-sbcs sys_alloc carriers: 0
-sbcs carriers size: 0 0 0
-sbcs mseg carriers size: 0
-sbcs sys_alloc carriers size: 0
-ll_alloc calls: 592
-ll_free calls: 0
-ll_realloc calls: 235
-mseg_alloc calls: 0
-mseg_dealloc calls: 0
-mseg_realloc calls: 0
-sys_alloc calls: 2
-sys_free calls: 0
-sys_realloc calls: 0
-=allocator:eheap_alloc
-versions: 2.1 2.1
-option e: true
-option sbct: 524288
-option asbcst: 4145152
-option rsbcst: 50
-option rsbcmt: 80
-option mmbcs: 524288
-option mmsbc: 256
-option mmmbc: 10
-option lmbcs: 5242880
-option smbcs: 1048576
-option mbcgs: 10
-option mbsd: 3
-option as: gf
-mbcs blocks: 56 102 102
-mbcs blocks size: 833280 1638920 1638920
-mbcs carriers: 2 3 3
-mbcs mseg carriers: 1
-mbcs sys_alloc carriers: 1
-mbcs carriers size: 1998880 3047456 3047456
-mbcs mseg carriers size: 1474560
-mbcs sys_alloc carriers size: 524320
-sbcs blocks: 0 0 0
-sbcs blocks size: 0 0 0
-sbcs carriers: 0 0 0
-sbcs mseg carriers: 0
-sbcs sys_alloc carriers: 0
-sbcs carriers size: 0 0 0
-sbcs mseg carriers size: 0
-sbcs sys_alloc carriers size: 0
-eheap_alloc calls: 6971
-eheap_free calls: 6914
-eheap_realloc calls: 461
-mseg_alloc calls: 16
-mseg_dealloc calls: 14
-mseg_realloc calls: 0
-sys_alloc calls: 3
-sys_free calls: 0
-sys_realloc calls: 0
-=allocator:binary_alloc
-option e: false
-=allocator:ets_alloc
-option e: false
-=allocator:fix_alloc
-option e: true
-proc: 15080 13576
-atom_entry: 137152 137008
-export_entry: 138448 137632
-module_entry: 4872 4352
-reg_proc: 1000 592
-link_nh: 2464 2080
-link_sh: 832 192
-proc_list: 24 24
-fun_entry: 22584 22584
-db_tab: 1632 1632
-=allocator:mseg_alloc
-version: 0.9
-option amcbf: 4194304
-option rmcbf: 20
-option mcs: 5
-option cci: 1000
-cached_segments: 0
-cache_hits: 13
-segments: 2
-segments_watermark: 2
-mseg_alloc calls: 16
-mseg_dealloc calls: 14
-mseg_realloc calls: 0
-mseg_create calls: 4
-mseg_destroy calls: 1
-mseg_clear_cache calls: 6
-mseg_check_cache calls: 2
-=allocator:alloc_util
-option mmc: 1024
-option ycs: 1048576
-=allocator:instr
-option m: false
-option s: false
-option t: false
-=proc:<0.0.0>
-State: Waiting
-Name: init
-Spawned as: otp_ring0:start/2
-Spawned by: []
-Started: Wed Apr 21 13:22:07 2004
-Message queue length: 0
-Number of heap fragments: 0
-Heap fragment data: 0
-Link list: [<0.5.0>,<0.4.0>,<0.2.0>]
-Reductions: 3851
-Stack+heap: 377
-OldHeap: 610
-Heap unused: 53
-OldHeap unused: 610
-Program counter: 0x1f496c (init:loop/1 + 20)
-CP: 0x156f90 (<terminate process normally>)
-arity = 0
-=proc:<0.2.0>
-State: Waiting
-Name: erl_prim_loader
-Spawned as: erlang:apply/2
-Spawned by: <0.1.0>
-Started: Wed Apr 21 13:22:07 2004
-Message queue length: 0
-Number of heap fragments: 0
-Heap fragment data: 0
-Link list: [<0.0.0>,#Port<0.2>]
-Reductions: 201036
-Stack+heap: 987
-OldHeap: 987
-Heap unused: 923
-OldHeap unused: 987
-Program counter: 0x20cc94 (erl_prim_loader:loop/3 + 52)
-CP: 0x156f90 (<terminate process normally>)
-arity = 0
-=proc:<0.4.0>
-State: Waiting
-Name: error_logger
-Spawned as: proc_lib:init_p/5
-Spawned by: <0.1.0>
-Started: Wed Apr 21 13:22:07 2004
-Message queue length: 0
-Number of heap fragments: 0
-Heap fragment data: 0
-Link list: [<0.21.0>,<0.0.0>]
-Reductions: 296
-Stack+heap: 6765
-OldHeap: 0
-Heap unused: 851
-OldHeap unused: 0
-Program counter: 0x21f5b8 (gen_event:loop/4 + 40)
-CP: 0x225860 (proc_lib:init_p/5 + 164)
-arity = 0
-=proc:<0.5.0>
-State: Waiting
-Name: application_controller
-Spawned as: proc_lib:init_p/5
-Spawned by: <0.1.0>
-Started: Wed Apr 21 13:22:07 2004
-Message queue length: 0
-Number of heap fragments: 0
-Heap fragment data: 0
-Link list: [<0.7.0>,<0.0.0>]
-Reductions: 1508
-Stack+heap: 1597
-OldHeap: 0
-Heap unused: 835
-OldHeap unused: 0
-Program counter: 0x239d50 (gen_server:loop/6 + 52)
-CP: 0x225860 (proc_lib:init_p/5 + 164)
-arity = 0
-=proc:<0.7.0>
-State: Waiting
-Spawned as: proc_lib:init_p/5
-Spawned by: <0.6.0>
-Started: Wed Apr 21 13:22:07 2004
-Message queue length: 0
-Number of heap fragments: 0
-Heap fragment data: 0
-Link list: [<0.8.0>,<0.5.0>]
-Reductions: 23
-Stack+heap: 377
-OldHeap: 0
-Heap unused: 79
-OldHeap unused: 0
-Program counter: 0x248d04 (application_master:main_loop/2 + 28)
-CP: 0x225860 (proc_lib:init_p/5 + 164)
-arity = 0
-=proc:<0.8.0>
-State: Waiting
-Spawned as: application_master:start_it/4
-Spawned by: <0.7.0>
-Started: Wed Apr 21 13:22:07 2004
-Message queue length: 0
-Number of heap fragments: 0
-Heap fragment data: 0
-Link list: [<0.9.0>,<0.7.0>]
-Reductions: 91
-Stack+heap: 233
-OldHeap: 0
-Heap unused: 177
-OldHeap unused: 0
-Program counter: 0x24a26c (application_master:loop_it/4 + 40)
-CP: 0x156f90 (<terminate process normally>)
-arity = 0
-=proc:<0.9.0>
-State: Waiting
-Name: kernel_sup
-Spawned as: proc_lib:init_p/5
-Spawned by: <0.8.0>
-Started: Wed Apr 21 13:22:07 2004
-Message queue length: 0
-Number of heap fragments: 0
-Heap fragment data: 0
-Link list: [<0.24.0>,<0.23.0>,<0.19.0>,<0.18.0>,<0.17.0>,<0.16.0>,<0.15.0>,<0.14.0>,<0.11.0>,<0.10.0>,<0.8.0>]
-Reductions: 7402
-Stack+heap: 610
-OldHeap: 987
-Heap unused: 311
-OldHeap unused: 987
-Program counter: 0x239d50 (gen_server:loop/6 + 52)
-CP: 0x225860 (proc_lib:init_p/5 + 164)
-arity = 0
-=proc:<0.10.0>
-State: Waiting
-Name: rex
-Spawned as: proc_lib:init_p/5
-Spawned by: <0.9.0>
-Started: Wed Apr 21 13:22:07 2004
-Message queue length: 0
-Number of heap fragments: 0
-Heap fragment data: 0
-Link list: [<0.9.0>]
-Reductions: 44
-Stack+heap: 233
-OldHeap: 0
-Heap unused: 144
-OldHeap unused: 0
-Program counter: 0x239d50 (gen_server:loop/6 + 52)
-CP: 0x225860 (proc_lib:init_p/5 + 164)
-arity = 0
-=proc:<0.11.0>
-State: Waiting
-Name: global_name_server
-Spawned as: proc_lib:init_p/5
-Spawned by: <0.9.0>
-Started: Wed Apr 21 13:22:07 2004
-Message queue length: 0
-Number of heap fragments: 0
-Heap fragment data: 0
-Link list: [<0.13.0>,<0.12.0>,<0.9.0>]
-Reductions: 47
-Stack+heap: 233
-OldHeap: 0
-Heap unused: 98
-OldHeap unused: 0
-Program counter: 0x239d50 (gen_server:loop/6 + 52)
-CP: 0x225860 (proc_lib:init_p/5 + 164)
-arity = 0
-=proc:<0.12.0>
-State: Waiting
-Spawned as: global:init_the_locker/1
-Spawned by: <0.11.0>
-Started: Wed Apr 21 13:22:07 2004
-Message queue length: 0
-Number of heap fragments: 0
-Heap fragment data: 0
-Link list: [<0.11.0>]
-Reductions: 3
-Stack+heap: 233
-OldHeap: 0
-Heap unused: 227
-OldHeap unused: 0
-Program counter: 0x261340 (global:loop_the_locker/2 + 92)
-CP: 0x261184 (global:init_the_locker/1 + 112)
-arity = 0
-=proc:<0.13.0>
-State: Waiting
-Spawned as: erlang:apply/2
-Spawned by: <0.11.0>
-Started: Wed Apr 21 13:22:07 2004
-Message queue length: 0
-Number of heap fragments: 0
-Heap fragment data: 0
-Link list: [<0.11.0>]
-Reductions: 4
-Stack+heap: 233
-OldHeap: 0
-Heap unused: 221
-OldHeap unused: 0
-Program counter: 0x265288 (global:collect_deletions/2 + 76)
-CP: 0x2651ac (global:loop_the_deleter/1 + 36)
-arity = 0
-=proc:<0.14.0>
-State: Waiting
-Name: inet_db
-Spawned as: proc_lib:init_p/5
-Spawned by: <0.9.0>
-Started: Wed Apr 21 13:22:07 2004
-Message queue length: 0
-Number of heap fragments: 0
-Heap fragment data: 0
-Link list: [<0.9.0>]
-Reductions: 376
-Stack+heap: 233
-OldHeap: 233
-Heap unused: 30
-OldHeap unused: 233
-Program counter: 0x239d50 (gen_server:loop/6 + 52)
-CP: 0x225860 (proc_lib:init_p/5 + 164)
-arity = 0
-=proc:<0.15.0>
-State: Waiting
-Name: global_group
-Spawned as: proc_lib:init_p/5
-Spawned by: <0.9.0>
-Started: Wed Apr 21 13:22:07 2004
-Message queue length: 0
-Number of heap fragments: 0
-Heap fragment data: 0
-Link list: [<0.9.0>]
-Reductions: 71
-Stack+heap: 233
-OldHeap: 0
-Heap unused: 92
-OldHeap unused: 0
-Program counter: 0x239d50 (gen_server:loop/6 + 52)
-CP: 0x225860 (proc_lib:init_p/5 + 164)
-arity = 0
-=proc:<0.16.0>
-State: Waiting
-Name: file_server_2
-Spawned as: proc_lib:init_p/5
-Spawned by: <0.9.0>
-Started: Wed Apr 21 13:22:07 2004
-Message queue length: 0
-Number of heap fragments: 1
-Heap fragment data: 119
-Link list: [{from,<0.17.0>,#Ref<0.0.0.22>},#Port<0.4>,<0.9.0>]
-Reductions: 83605
-Stack+heap: 4181
-OldHeap: 4181
-Heap unused: 1720
-OldHeap unused: 4181
-Program counter: 0x239d50 (gen_server:loop/6 + 52)
-CP: 0x225860 (proc_lib:init_p/5 + 164)
-arity = 0
-=proc:<0.17.0>
-State: Waiting
-Name: file_server
-Spawned as: erlang:apply/2
-Spawned by: <0.9.0>
-Started: Wed Apr 21 13:22:07 2004
-Message queue length: 0
-Number of heap fragments: 0
-Heap fragment data: 0
-Link list: [{to,<0.16.0>,#Ref<0.0.0.22>},<0.9.0>]
-Reductions: 12
-Stack+heap: 233
-OldHeap: 0
-Heap unused: 207
-OldHeap unused: 0
-Program counter: 0x2a18e8 (old_file_server:relay_loop/3 + 32)
-CP: 0x156f90 (<terminate process normally>)
-arity = 0
-=proc:<0.18.0>
-State: Waiting
-Name: code_server
-Spawned as: erlang:apply/2
-Spawned by: <0.9.0>
-Started: Wed Apr 21 13:22:07 2004
-Message queue length: 0
-Number of heap fragments: 0
-Heap fragment data: 0
-Link list: [<0.9.0>]
-Reductions: 108900
-Stack+heap: 6765
-OldHeap: 6765
-Heap unused: 4389
-OldHeap unused: 6765
-Program counter: 0x2a6e64 (code_server:loop/1 + 64)
-CP: 0x156f90 (<terminate process normally>)
-arity = 0
-=proc:<0.19.0>
-State: Waiting
-Spawned as: proc_lib:init_p/5
-Spawned by: <0.9.0>
-Started: Wed Apr 21 13:22:08 2004
-Message queue length: 0
-Number of heap fragments: 0
-Heap fragment data: 0
-Link list: [<0.21.0>,<0.9.0>]
-Reductions: 74
-Stack+heap: 233
-OldHeap: 233
-Heap unused: 180
-OldHeap unused: 233
-Program counter: 0x239d50 (gen_server:loop/6 + 52)
-CP: 0x225860 (proc_lib:init_p/5 + 164)
-arity = 0
-=proc:<0.20.0>
-State: Waiting
-Spawned as: user_drv:server/2
-Spawned by: <0.19.0>
-Started: Wed Apr 21 13:22:08 2004
-Message queue length: 0
-Number of heap fragments: 0
-Heap fragment data: 0
-Link list: [<0.22.0>,<0.21.0>,#Port<0.72>]
-Reductions: 596
-Stack+heap: 233
-OldHeap: 377
-Heap unused: 214
-OldHeap unused: 377
-Program counter: 0x2ca4e0 (user_drv:server_loop/5 + 56)
-CP: 0x156f90 (<terminate process normally>)
-arity = 0
-=proc:<0.21.0>
-State: Waiting
-Name: user
-Spawned as: group:server/2
-Spawned by: <0.20.0>
-Started: Wed Apr 21 13:22:08 2004
-Message queue length: 0
-Number of heap fragments: 0
-Heap fragment data: 0
-Link list: [<0.4.0>,<0.19.0>,<0.20.0>]
-Reductions: 26
-Stack+heap: 233
-OldHeap: 0
-Heap unused: 202
-OldHeap unused: 0
-Program counter: 0x2cd9d8 (group:server_loop/3 + 32)
-CP: 0x156f90 (<terminate process normally>)
-arity = 0
-=proc:<0.22.0>
-State: Waiting
-Spawned as: group:server/2
-Spawned by: <0.20.0>
-Started: Wed Apr 21 13:22:08 2004
-Message queue length: 0
-Number of heap fragments: 0
-Heap fragment data: 0
-Link list: [{from,<0.49.0>,#Ref<0.0.0.307>},<0.25.0>,<0.20.0>]
-Reductions: 1244
-Stack+heap: 233
-OldHeap: 233
-Heap unused: 40
-OldHeap unused: 233
-Program counter: 0x2cf238 (group:get_line1/3 + 1652)
-CP: 0x2cf230 (group:get_line1/3 + 1644)
-arity = 0
-=proc:<0.23.0>
-State: Waiting
-Spawned as: proc_lib:init_p/5
-Spawned by: <0.9.0>
-Started: Wed Apr 21 13:22:08 2004
-Message queue length: 0
-Number of heap fragments: 0
-Heap fragment data: 0
-Link list: [<0.9.0>]
-Reductions: 45
-Stack+heap: 233
-OldHeap: 0
-Heap unused: 63
-OldHeap unused: 0
-Program counter: 0x239d50 (gen_server:loop/6 + 52)
-CP: 0x225860 (proc_lib:init_p/5 + 164)
-arity = 0
-=proc:<0.24.0>
-State: Waiting
-Name: kernel_safe_sup
-Spawned as: proc_lib:init_p/5
-Spawned by: <0.9.0>
-Started: Wed Apr 21 13:22:08 2004
-Message queue length: 0
-Number of heap fragments: 0
-Heap fragment data: 0
-Link list: [<0.31.0>,<0.9.0>]
-Reductions: 133
-Stack+heap: 233
-OldHeap: 233
-Heap unused: 198
-OldHeap unused: 233
-Program counter: 0x239d50 (gen_server:loop/6 + 52)
-CP: 0x225860 (proc_lib:init_p/5 + 164)
-arity = 0
-=proc:<0.25.0>
-State: Waiting
-Spawned as: erlang:apply/2
-Spawned by: <0.22.0>
-Started: Wed Apr 21 13:22:08 2004
-Message queue length: 0
-Number of heap fragments: 0
-Heap fragment data: 0
-Link list: [<0.49.0>,<0.27.0>,<0.22.0>]
-Reductions: 161
-Stack+heap: 233
-OldHeap: 0
-Heap unused: 169
-OldHeap unused: 0
-Program counter: 0x2e0d00 (shell:get_command1/4 + 40)
-CP: 0x2e06fc (shell:server_loop/6 + 140)
-arity = 0
-=proc:<0.27.0>
-State: Waiting
-Spawned as: erlang:apply/2
-Spawned by: <0.25.0>
-Started: Wed Apr 21 13:22:08 2004
-Message queue length: 0
-Number of heap fragments: 0
-Heap fragment data: 0
-Link list: [<0.25.0>]
-Reductions: 506
-Stack+heap: 4181
-OldHeap: 0
-Heap unused: 1131
-OldHeap unused: 0
-Program counter: 0x2e2bbc (shell:eval_loop/2 + 32)
-CP: 0x156f90 (<terminate process normally>)
-arity = 0
-=proc:<0.31.0>
-State: Waiting
-Name: inet_gethost_native_sup
-Spawned as: proc_lib:init_p/5
-Spawned by: <0.24.0>
-Started: Wed Apr 21 13:22:17 2004
-Message queue length: 0
-Number of heap fragments: 0
-Heap fragment data: 0
-Link list: [<0.32.0>,<0.24.0>]
-Reductions: 49
-Stack+heap: 233
-OldHeap: 0
-Heap unused: 87
-OldHeap unused: 0
-Program counter: 0x239d50 (gen_server:loop/6 + 52)
-CP: 0x225860 (proc_lib:init_p/5 + 164)
-arity = 0
-=proc:<0.32.0>
-State: Waiting
-Name: inet_gethost_native
-Spawned as: inet_gethost_native:server_init/2
-Spawned by: <0.31.0>
-Started: Wed Apr 21 13:22:17 2004
-Message queue length: 0
-Number of heap fragments: 1
-Heap fragment data: 118
-Link list: [#Port<0.105>,<0.31.0>]
-Reductions: 65
-Stack+heap: 233
-OldHeap: 0
-Heap unused: 13
-OldHeap unused: 0
-Program counter: 0x4ad840 (inet_gethost_native:main_loop/1 + 20)
-CP: 0x156f90 (<terminate process normally>)
-arity = 0
-=proc:<0.33.0>
-State: Waiting
-Name: web_tool
-Spawned as: proc_lib:init_p/5
-Spawned by: <0.27.0>
-Started: Wed Apr 21 13:22:17 2004
-Message queue length: 0
-Number of heap fragments: 0
-Heap fragment data: 0
-Link list: [<0.41.0>]
-Reductions: 131773
-Stack+heap: 6765
-OldHeap: 6765
-Heap unused: 2941
-OldHeap unused: 6765
-Program counter: 0x239d50 (gen_server:loop/6 + 52)
-CP: 0x225860 (proc_lib:init_p/5 + 164)
-arity = 0
-=proc:<0.41.0>
-State: Waiting
-Name: websup
-Spawned as: proc_lib:init_p/5
-Spawned by: <0.33.0>
-Started: Wed Apr 21 13:22:17 2004
-Message queue length: 0
-Number of heap fragments: 0
-Heap fragment data: 0
-Link list: [<0.48.0>,<0.33.0>]
-Reductions: 118
-Stack+heap: 233
-OldHeap: 233
-Heap unused: 205
-OldHeap unused: 233
-Program counter: 0x239d50 (gen_server:loop/6 + 52)
-CP: 0x225860 (proc_lib:init_p/5 + 164)
-arity = 0
-=proc:<0.43.0>
-State: Waiting
-Name: httpd_sup__127_0_0_1__8888
-Spawned as: proc_lib:init_p/5
-Spawned by: <0.33.0>
-Started: Wed Apr 21 13:22:17 2004
-Message queue length: 0
-Number of heap fragments: 0
-Heap fragment data: 0
-Link list: [<0.46.0>,<0.45.0>,<0.44.0>]
-Reductions: 1220
-Stack+heap: 6765
-OldHeap: 0
-Heap unused: 277
-OldHeap unused: 0
-Program counter: 0x239d50 (gen_server:loop/6 + 52)
-CP: 0x225860 (proc_lib:init_p/5 + 164)
-arity = 0
-=proc:<0.44.0>
-State: Waiting
-Name: httpd_acc_sup__127_0_0_1__8888
-Spawned as: proc_lib:init_p/5
-Spawned by: <0.43.0>
-Started: Wed Apr 21 13:22:17 2004
-Message queue length: 0
-Number of heap fragments: 0
-Heap fragment data: 0
-Link list: [<0.47.0>,<0.43.0>]
-Reductions: 147
-Stack+heap: 233
-OldHeap: 233
-Heap unused: 77
-OldHeap unused: 233
-Program counter: 0x239d50 (gen_server:loop/6 + 52)
-CP: 0x225860 (proc_lib:init_p/5 + 164)
-arity = 0
-=proc:<0.45.0>
-State: Waiting
-Name: httpd_misc_sup__127_0_0_1__8888
-Spawned as: proc_lib:init_p/5
-Spawned by: <0.43.0>
-Started: Wed Apr 21 13:22:17 2004
-Message queue length: 0
-Number of heap fragments: 0
-Heap fragment data: 0
-Link list: [<0.43.0>]
-Reductions: 52
-Stack+heap: 233
-OldHeap: 0
-Heap unused: 80
-OldHeap unused: 0
-Program counter: 0x239d50 (gen_server:loop/6 + 52)
-CP: 0x225860 (proc_lib:init_p/5 + 164)
-arity = 0
-=proc:<0.46.0>
-State: Waiting
-Name: httpd__127_0_0_1__8888
-Spawned as: proc_lib:init_p/5
-Spawned by: <0.43.0>
-Started: Wed Apr 21 13:22:17 2004
-Message queue length: 0
-Number of heap fragments: 0
-Heap fragment data: 0
-Link list: [<0.43.0>]
-Reductions: 2905
-Stack+heap: 6765
-OldHeap: 10946
-Heap unused: 138
-OldHeap unused: 10946
-Program counter: 0x239d50 (gen_server:loop/6 + 52)
-CP: 0x225860 (proc_lib:init_p/5 + 164)
-arity = 0
-=proc:<0.47.0>
-State: Waiting
-Spawned as: proc_lib:init_p/5
-Spawned by: <0.44.0>
-Started: Wed Apr 21 13:22:18 2004
-Message queue length: 0
-Number of heap fragments: 0
-Heap fragment data: 0
-Link list: [#Port<0.161>,#Port<0.141>,<0.44.0>]
-Reductions: 874
-Stack+heap: 233
-OldHeap: 233
-Heap unused: 190
-OldHeap unused: 233
-Program counter: 0x1fe798 (prim_inet:accept0/2 + 96)
-CP: 0x1feb04 (prim_inet:async_accept/2 + 380)
-arity = 0
-=proc:<0.48.0>
-State: Waiting
-Name: crashdump_viewer_server
-Spawned as: proc_lib:init_p/5
-Spawned by: <0.41.0>
-Started: Wed Apr 21 13:22:18 2004
-Message queue length: 0
-Number of heap fragments: 0
-Heap fragment data: 0
-Link list: [<0.56.0>,<0.41.0>]
-Reductions: 1913
-Stack+heap: 987
-OldHeap: 987
-Heap unused: 524
-OldHeap unused: 987
-Program counter: 0x239d50 (gen_server:loop/6 + 52)
-CP: 0x225860 (proc_lib:init_p/5 + 164)
-arity = 0
-=proc:<0.49.0>
-State: Waiting
-Spawned as: erlang:apply/2
-Spawned by: <0.25.0>
-Started: Wed Apr 21 13:22:18 2004
-Message queue length: 0
-Number of heap fragments: 0
-Heap fragment data: 0
-Link list: [{to,<0.22.0>,#Ref<0.0.0.307>},<0.25.0>]
-Reductions: 15
-Stack+heap: 233
-OldHeap: 0
-Heap unused: 190
-OldHeap unused: 0
-Program counter: 0x301d58 (io:wait_io_mon_reply/2 + 28)
-CP: 0x30174c (io:parse_erl_exprs/3 + 92)
-arity = 0
-=proc:<0.56.0>
-State: Garbing
-Spawned as: erlang:apply/2
-Last scheduled in for: erlang:garbage_collect/0
-Spawned by: <0.48.0>
-Started: Wed Apr 21 13:22:27 2004
-Message queue length: 0
-Number of heap fragments: 1
-Heap fragment data: 121
-Link list: [#Port<0.158>,#Port<0.157>,<0.48.0>]
-Reductions: 2420470
-Stack+heap: 121393
-OldHeap: 0
-Heap unused: 22172
-OldHeap unused: 0
-New heap start: FE5768E0
-New heap top: FE5D7734
-Stack top: FE5ED130
-Stack end: FE5ED1A4
-Old heap start: 0
-Old heap top: 0
-Old heap end: 0
-Program counter: 0x1a4980 (unknown function)
-CP: 0x20710c (prim_file:read/2 + 436)
-=port:#Port<0.1>
-Slot: 1
-Connected: #Port<0.0>
-Port controls linked-in driver: async
-=port:#Port<0.2>
-Slot: 2
-Connected: <0.2.0>
-Links: <0.2.0>
-Port controls linked-in driver: efile
-=port:#Port<0.4>
-Slot: 4
-Connected: <0.16.0>
-Links: <0.16.0>
-Port controls linked-in driver: efile
-=port:#Port<0.72>
-Slot: 72
-Connected: <0.20.0>
-Links: <0.20.0>
-Port controls linked-in driver: tty_sl -c -e
-=port:#Port<0.105>
-Slot: 105
-Connected: <0.32.0>
-Links: <0.32.0>
-Port controls external process: inet_gethost 4
-=port:#Port<0.141>
-Slot: 141
-Connected: <0.47.0>
-Links: <0.47.0>
-Port controls linked-in driver: tcp_inet
-=port:#Port<0.157>
-Slot: 157
-Connected: <0.56.0>
-Links: <0.56.0>
-Port controls linked-in driver: efile
-=port:#Port<0.158>
-Slot: 158
-Connected: <0.56.0>
-Links: <0.56.0>
-Port controls linked-in driver: efile
-=port:#Port<0.161>
-Slot: 161
-Connected: <0.47.0>
-Links: <0.47.0>
-Port controls linked-in driver: tcp_inet
-=ets:<0.18.0>
-Slot: 9
-Table: 9
-Name: code
-Buckets: 256
-Objects: 289
-Words: 14108
-=ets:<0.18.0>
-Slot: 10
-Table: 10
-Name: code_names
-Buckets: 256
-Objects: 47
-Words: 4334
-=ets:<0.32.0>
-Slot: 11
-Table: 11
-Name: ign_requests
-Buckets: 256
-Objects: 0
-Words: 277
-=ets:<0.32.0>
-Slot: 12
-Table: 12
-Name: ign_req_index
-Buckets: 256
-Objects: 0
-Words: 277
-=ets:<0.33.0>
-Slot: 13
-Table: 13
-Name: app_data
-Buckets: 256
-Objects: 7
-Words: 952
-=ets:<0.46.0>
-Slot: 15
-Table: 15
-Name: httpd_mime__127_0_0_1__8888
-Buckets: 256
-Objects: 105
-Words: 5742
-=ets:<0.11.0>
-Slot: 84
-Table: global_names
-Name: global_names
-Buckets: 256
-Objects: 0
-Words: 277
-=ets:<0.11.0>
-Slot: 95
-Table: global_locks
-Name: global_locks
-Buckets: 256
-Objects: 0
-Words: 277
-=ets:<0.11.0>
-Slot: 96
-Table: global_names_ext
-Name: global_names_ext
-Buckets: 256
-Objects: 0
-Words: 277
-=ets:<0.14.0>
-Slot: 316
-Table: inet_cache
-Name: inet_cache
-Buckets: 256
-Objects: 0
-Words: 277
-=ets:<0.48.0>
-Slot: 340
-Table: cdv_menu_table
-Name: cdv_menu_table
-Buckets: 256
-Objects: 0
-Words: 277
-=ets:<0.48.0>
-Slot: 341
-Table: cdv_dump_index_table
-Name: cdv_dump_index_table
-Buckets: 256
-Objects: 0
-Words: 277
-=ets:<0.48.0>
-Slot: 342
-Table: cdv_decode_heap_table
-Name: cdv_decode_heap_table
-Buckets: 256
-Objects: 0
-Words: 277
-=ets:<0.16.0>
-Slot: 780
-Table: file_io_servers
-Name: file_io_servers
-Buckets: 256
-Objects: 0
-Words: 277
-=ets:<0.46.0>
-Slot: 984
-Table: httpd_conf__127_0_0_1__8888
-Name: httpd_conf__127_0_0_1__8888
-Buckets: 256
-Objects: 17
-Words: 1176
-=ets:<0.14.0>
-Slot: 1342
-Table: inet_hosts
-Name: inet_hosts
-Buckets: 256
-Objects: 4
-Words: 421
-=ets:<0.14.0>
-Slot: 1362
-Table: inet_db
-Name: inet_db
-Buckets: 256
-Objects: 20
-Words: 671
-=ets:<0.5.0>
-Slot: 1655
-Table: ac_tab
-Name: ac_tab
-Buckets: 256
-Objects: 6
-Words: 843
-=timer:<0.14.0>
-Message: refresh_timeout
-Time left: 3565692 ms
-=node:'nonode@nohost'
-=no_distribution
-=loaded_modules
-Current code: 1968915
-Old code: 0
-=mod:otp_ring0
-Current size: 489
-=mod:init
-Current size: 30110
-=mod:prim_inet
-Current size: 35532
-=mod:prim_file
-Current size: 24965
-=mod:erl_prim_loader
-Current size: 19607
-=mod:erlang
-Current size: 11137
-=mod:error_handler
-Current size: 2389
-Current attributes: 836C00000001680264000376736E6C000000016E100030769A34345F26EF6D3433254FF2AE576A6A
-Current compilation info: 836C0000000468026400076F7074696F6E736C0000000568026400036377646B00222F636C656172636173652F6F74702F657274732F6C69622F6B65726E656C2F73726368026400066F75746469726B002A2F636C656172636173652F6F74702F657274732F6C69622F6B65726E656C2F7372632F2E2E2F6562696E6802640001696B002D2F636C656172636173652F6F74702F657274732F6C69622F6B65726E656C2F7372632F2E2E2F696E636C75646564000A64656275675F696E666F6400107761726E5F756E757365645F766172736A680264000776657273696F6E6B0005342E322E31680264000474696D65680662000007D3610C6112610B613161216802640006736F757263656B00342F636C656172636173652F6F74702F657274732F6C69622F6B65726E656C2F7372632F6572726F725F68616E646C65722E65726C6A
-=mod:heart
-Current size: 6687
-Current attributes: 836C00000001680264000376736E6C000000016E10003094F7BECF345494DDBB4D7186E694186A6A
-Current compilation info: 836C0000000468026400076F7074696F6E736C0000000568026400036377646B00222F636C656172636173652F6F74702F657274732F6C69622F6B65726E656C2F73726368026400066F75746469726B002A2F636C656172636173652F6F74702F657274732F6C69622F6B65726E656C2F7372632F2E2E2F6562696E6802640001696B002D2F636C656172636173652F6F74702F657274732F6C69622F6B65726E656C2F7372632F2E2E2F696E636C75646564000A64656275675F696E666F6400107761726E5F756E757365645F766172736A680264000776657273696F6E6B0005342E322E31680264000474696D65680662000007D3610C6112610B613261086802640006736F757263656B002C2F636C656172636173652F6F74702F657274732F6C69622F6B65726E656C2F7372632F68656172742E65726C6A
-=mod:error_logger
-Current size: 7051
-Current attributes: 836C00000001680264000376736E6C000000016E10004E3347F841DEAE2EB6A74389E6E127146A6A
-Current compilation info: 836C0000000468026400076F7074696F6E736C0000000568026400036377646B00222F636C656172636173652F6F74702F657274732F6C69622F6B65726E656C2F73726368026400066F75746469726B002A2F636C656172636173652F6F74702F657274732F6C69622F6B65726E656C2F7372632F2E2E2F6562696E6802640001696B002D2F636C656172636173652F6F74702F657274732F6C69622F6B65726E656C2F7372632F2E2E2F696E636C75646564000A64656275675F696E666F6400107761726E5F756E757365645F766172736A680264000776657273696F6E6B0005342E322E31680264000474696D65680662000007D3610C6112610B613161246802640006736F757263656B00332F636C656172636173652F6F74702F657274732F6C69622F6B65726E656C2F7372632F6572726F725F6C6F676765722E65726C6A
-=mod:gen_event
-Current size: 18288
-Current attributes: 836C00000001680264000376736E6C000000016E1000336F22DF1EA75E0EA4AE65D3B8C34F946A6A
-Current compilation info: 836C0000000468026400076F7074696F6E736C0000000768026400036377646B00222F636C656172636173652F6F74702F657274732F6C69622F7374646C69622F73726368026400066F75746469726B002A2F636C656172636173652F6F74702F657274732F6C69622F7374646C69622F7372632F2E2E2F6562696E6802640001696B002D2F636C656172636173652F6F74702F657274732F6C69622F7374646C69622F7372632F2E2E2F696E636C7564656802640001696B00372F636C656172636173652F6F74702F657274732F6C69622F7374646C69622F7372632F2E2E2F2E2E2F6B65726E656C2F696E636C7564656400107761726E5F756E757365645F7661727364000A64656275675F696E666F6400107761726E5F756E757365645F766172736A680264000776657273696F6E6B0005342E322E31680264000474696D65680662000007D3610C6112610B612D61346802640006736F757263656B00302F636C656172636173652F6F74702F657274732F6C69622F7374646C69622F7372632F67656E5F6576656E742E65726C6A
-=mod:gen
-Current size: 7129
-Current attributes: 836C00000001680264000376736E6C000000016E10007BE6AEB66EF48D8B33323C89C9936A526A6A
-Current compilation info: 836C0000000468026400076F7074696F6E736C0000000768026400036377646B00222F636C656172636173652F6F74702F657274732F6C69622F7374646C69622F73726368026400066F75746469726B002A2F636C656172636173652F6F74702F657274732F6C69622F7374646C69622F7372632F2E2E2F6562696E6802640001696B002D2F636C656172636173652F6F74702F657274732F6C69622F7374646C69622F7372632F2E2E2F696E636C7564656802640001696B00372F636C656172636173652F6F74702F657274732F6C69622F7374646C69622F7372632F2E2E2F2E2E2F6B65726E656C2F696E636C7564656400107761726E5F756E757365645F7661727364000A64656275675F696E666F6400107761726E5F756E757365645F766172736A680264000776657273696F6E6B0005342E322E31680264000474696D65680662000007D3610C6112610B612D61316802640006736F757263656B002A2F636C656172636173652F6F74702F657274732F6C69622F7374646C69622F7372632F67656E2E65726C6A
-=mod:proc_lib
-Current size: 11658
-Current attributes: 836C00000001680264000376736E6C000000016E10005C589A8C9BD2E1F2E895E765CAE983406A6A
-Current compilation info: 836C0000000468026400076F7074696F6E736C0000000768026400036377646B00222F636C656172636173652F6F74702F657274732F6C69622F7374646C69622F73726368026400066F75746469726B002A2F636C656172636173652F6F74702F657274732F6C69622F7374646C69622F7372632F2E2E2F6562696E6802640001696B002D2F636C656172636173652F6F74702F657274732F6C69622F7374646C69622F7372632F2E2E2F696E636C7564656802640001696B00372F636C656172636173652F6F74702F657274732F6C69622F7374646C69622F7372632F2E2E2F2E2E2F6B65726E656C2F696E636C7564656400107761726E5F756E757365645F7661727364000A64656275675F696E666F6400107761726E5F756E757365645F766172736A680264000776657273696F6E6B0005342E322E31680264000474696D65680662000007D3610C6112610B612E612D6802640006736F757263656B002F2F636C656172636173652F6F74702F657274732F6C69622F7374646C69622F7372632F70726F635F6C69622E65726C6A
-=mod:application_controller
-Current size: 55249
-Current attributes: 836C00000002680264000376736E6C000000016E10003372E1AB0410565065FA086086A721316A68026400096265686176696F75726C0000000164000A67656E5F7365727665726A6A
-Current compilation info: 836C0000000468026400076F7074696F6E736C0000000568026400036377646B00222F636C656172636173652F6F74702F657274732F6C69622F6B65726E656C2F73726368026400066F75746469726B002A2F636C656172636173652F6F74702F657274732F6C69622F6B65726E656C2F7372632F2E2E2F6562696E6802640001696B002D2F636C656172636173652F6F74702F657274732F6C69622F6B65726E656C2F7372632F2E2E2F696E636C75646564000A64656275675F696E666F6400107761726E5F756E757365645F766172736A680264000776657273696F6E6B0005342E322E31680264000474696D65680662000007D3610C6112610B613061246802640006736F757263656B003D2F636C656172636173652F6F74702F657274732F6C69622F6B65726E656C2F7372632F6170706C69636174696F6E5F636F6E74726F6C6C65722E65726C6A
-=mod:gen_server
-Current size: 18728
-Current attributes: 836C00000001680264000376736E6C000000016E10004C5E93533036DAC7698FC4112F59CF236A6A
-Current compilation info: 836C0000000468026400076F7074696F6E736C0000000768026400036377646B00222F636C656172636173652F6F74702F657274732F6C69622F7374646C69622F73726368026400066F75746469726B002A2F636C656172636173652F6F74702F657274732F6C69622F7374646C69622F7372632F2E2E2F6562696E6802640001696B002D2F636C656172636173652F6F74702F657274732F6C69622F7374646C69622F7372632F2E2E2F696E636C7564656802640001696B00372F636C656172636173652F6F74702F657274732F6C69622F7374646C69622F7372632F2E2E2F2E2E2F6B65726E656C2F696E636C7564656400107761726E5F756E757365645F7661727364000A64656275675F696E666F6400107761726E5F756E757365645F766172736A680264000776657273696F6E6B0005342E322E31680264000474696D65680662000007D3610C6112610B612D61396802640006736F757263656B00312F636C656172636173652F6F74702F657274732F6C69622F7374646C69622F7372632F67656E5F7365727665722E65726C6A
-=mod:sys
-Current size: 11589
-Current attributes: 836C00000001680264000376736E6C000000016E1000E12B0E8267551204BD5924BAB9629ADF6A6A
-Current compilation info: 836C0000000468026400076F7074696F6E736C0000000768026400036377646B00222F636C656172636173652F6F74702F657274732F6C69622F7374646C69622F73726368026400066F75746469726B002A2F636C656172636173652F6F74702F657274732F6C69622F7374646C69622F7372632F2E2E2F6562696E6802640001696B002D2F636C656172636173652F6F74702F657274732F6C69622F7374646C69622F7372632F2E2E2F696E636C7564656802640001696B00372F636C656172636173652F6F74702F657274732F6C69622F7374646C69622F7372632F2E2E2F2E2E2F6B65726E656C2F696E636C7564656400107761726E5F756E757365645F7661727364000A64656275675F696E666F6400107761726E5F756E757365645F766172736A680264000776657273696F6E6B0005342E322E31680264000474696D65680662000007D3610C6112610B612F61176802640006736F757263656B002A2F636C656172636173652F6F74702F657274732F6C69622F7374646C69622F7372632F7379732E65726C6A
-=mod:lists
-Current size: 18638
-Current attributes: 836C00000002680264000376736E6C000000016E10001E95B32C30E4CDAF0BDD1ABA58CBB5F36A680264000A646570726563617465646C0000000B68026400066B65796D617061046802640003616C6C61036802640003616E79610368026400036D617061036802640007666C61746D617061036802640005666F6C646C61046802640005666F6C64726104680264000666696C746572610368026400086D6170666F6C646C610468026400086D6170666F6C647261046802640007666F726561636861036A6A
-Current compilation info: 836C0000000468026400076F7074696F6E736C0000000768026400036377646B00222F636C656172636173652F6F74702F657274732F6C69622F7374646C69622F73726368026400066F75746469726B002A2F636C656172636173652F6F74702F657274732F6C69622F7374646C69622F7372632F2E2E2F6562696E6802640001696B002D2F636C656172636173652F6F74702F657274732F6C69622F7374646C69622F7372632F2E2E2F696E636C7564656802640001696B00372F636C656172636173652F6F74702F657274732F6C69622F7374646C69622F7372632F2E2E2F2E2E2F6B65726E656C2F696E636C7564656400107761726E5F756E757365645F7661727364000A64656275675F696E666F6400107761726E5F756E757365645F766172736A680264000776657273696F6E6B0005342E322E31680264000474696D65680662000007D3610C6112610B612E61116802640006736F757263656B002C2F636C656172636173652F6F74702F657274732F6C69622F7374646C69622F7372632F6C697374732E65726C6A
-=mod:application
-Current size: 2666
-Current attributes: 836C00000001680264000376736E6C000000016E1000C0C5A7B67B306300FEFF9D91AA50ECB36A6A
-Current compilation info: 836C0000000468026400076F7074696F6E736C0000000568026400036377646B00222F636C656172636173652F6F74702F657274732F6C69622F6B65726E656C2F73726368026400066F75746469726B002A2F636C656172636173652F6F74702F657274732F6C69622F6B65726E656C2F7372632F2E2E2F6562696E6802640001696B002D2F636C656172636173652F6F74702F657274732F6C69622F6B65726E656C2F7372632F2E2E2F696E636C75646564000A64656275675F696E666F6400107761726E5F756E757365645F766172736A680264000776657273696F6E6B0005342E322E31680264000474696D65680662000007D3610C6112610B6130611F6802640006736F757263656B00322F636C656172636173652F6F74702F657274732F6C69622F6B65726E656C2F7372632F6170706C69636174696F6E2E65726C6A
-=mod:application_master
-Current size: 10912
-Current attributes: 836C00000001680264000376736E6C000000016E1000360420F5CEB80AD7DD51B3A8A0E2AFA26A6A
-Current compilation info: 836C0000000468026400076F7074696F6E736C0000000568026400036377646B00222F636C656172636173652F6F74702F657274732F6C69622F6B65726E656C2F73726368026400066F75746469726B002A2F636C656172636173652F6F74702F657274732F6C69622F6B65726E656C2F7372632F2E2E2F6562696E6802640001696B002D2F636C656172636173652F6F74702F657274732F6C69622F6B65726E656C2F7372632F2E2E2F696E636C75646564000A64656275675F696E666F6400107761726E5F756E757365645F766172736A680264000776657273696F6E6B0005342E322E31680264000474696D65680662000007D3610C6112610B613061266802640006736F757263656B00392F636C656172636173652F6F74702F657274732F6C69622F6B65726E656C2F7372632F6170706C69636174696F6E5F6D61737465722E65726C6A
-=mod:kernel
-Current size: 7639
-Current attributes: 836C00000002680264000376736E6C000000016E10004D418ACCB0F948D4D3CA6B9A81B462746A68026400096265686176696F75726C0000000164000A73757065727669736F726A6A
-Current compilation info: 836C0000000468026400076F7074696F6E736C0000000568026400036377646B00222F636C656172636173652F6F74702F657274732F6C69622F6B65726E656C2F73726368026400066F75746469726B002A2F636C656172636173652F6F74702F657274732F6C69622F6B65726E656C2F7372632F2E2E2F6562696E6802640001696B002D2F636C656172636173652F6F74702F657274732F6C69622F6B65726E656C2F7372632F2E2E2F696E636C75646564000A64656275675F696E666F6400107761726E5F756E757365645F766172736A680264000776657273696F6E6B0005342E322E31680264000474696D65680662000007D3610C6112610B613261336802640006736F757263656B002D2F636C656172636173652F6F74702F657274732F6C69622F6B65726E656C2F7372632F6B65726E656C2E65726C6A
-=mod:supervisor
-Current size: 24469
-Current attributes: 836C00000002680264000376736E6C000000016E1000979F65727577135484BE0892A35087CC6A68026400096265686176696F75726C0000000164000A67656E5F7365727665726A6A
-Current compilation info: 836C0000000468026400076F7074696F6E736C0000000768026400036377646B00222F636C656172636173652F6F74702F657274732F6C69622F7374646C69622F73726368026400066F75746469726B002A2F636C656172636173652F6F74702F657274732F6C69622F7374646C69622F7372632F2E2E2F6562696E6802640001696B002D2F636C656172636173652F6F74702F657274732F6C69622F7374646C69622F7372632F2E2E2F696E636C7564656802640001696B00372F636C656172636173652F6F74702F657274732F6C69622F7374646C69622F7372632F2E2E2F2E2E2F6B65726E656C2F696E636C7564656400107761726E5F756E757365645F7661727364000A64656275675F696E666F6400107761726E5F756E757365645F766172736A680264000776657273696F6E6B0005342E322E31680264000474696D65680662000007D3610C6112610B612F61126802640006736F757263656B00312F636C656172636173652F6F74702F657274732F6C69622F7374646C69622F7372632F73757065727669736F722E65726C6A
-=mod:rpc
-Current size: 14539
-Current attributes: 836C00000002680264000376736E6C000000016E10008C5D6242D36B3201E3B11E82D5E1581E6A68026400096265686176696F75726C0000000164000A67656E5F7365727665726A6A
-Current compilation info: 836C0000000468026400076F7074696F6E736C0000000568026400036377646B00222F636C656172636173652F6F74702F657274732F6C69622F6B65726E656C2F73726368026400066F75746469726B002A2F636C656172636173652F6F74702F657274732F6C69622F6B65726E656C2F7372632F2E2E2F6562696E6802640001696B002D2F636C656172636173652F6F74702F657274732F6C69622F6B65726E656C2F7372632F2E2E2F696E636C75646564000A64656275675F696E666F6400107761726E5F756E757365645F766172736A680264000776657273696F6E6B0005342E322E31680264000474696D65680662000007D3610C6112610B6133610F6802640006736F757263656B002A2F636C656172636173652F6F74702F657274732F6C69622F6B65726E656C2F7372632F7270632E65726C6A
-=mod:gb_trees
-Current size: 8274
-Current attributes: 836C00000001680264000376736E6C000000016E1000094BEFDE7B866EF2CB6FCD895AC2EE056A6A
-Current compilation info: 836C0000000468026400076F7074696F6E736C0000000768026400036377646B00222F636C656172636173652F6F74702F657274732F6C69622F7374646C69622F73726368026400066F75746469726B002A2F636C656172636173652F6F74702F657274732F6C69622F7374646C69622F7372632F2E2E2F6562696E6802640001696B002D2F636C656172636173652F6F74702F657274732F6C69622F7374646C69622F7372632F2E2E2F696E636C7564656802640001696B00372F636C656172636173652F6F74702F657274732F6C69622F7374646C69622F7372632F2E2E2F2E2E2F6B65726E656C2F696E636C7564656400107761726E5F756E757365645F7661727364000A64656275675F696E666F6400107761726E5F756E757365645F766172736A680264000776657273696F6E6B0005342E322E31680264000474696D65680662000007D3610C6112610B612D612B6802640006736F757263656B002F2F636C656172636173652F6F74702F657274732F6C69622F7374646C69622F7372632F67625F74726565732E65726C6A
-=mod:global
-Current size: 40753
-Current attributes: 836C00000002680264000376736E6C000000016E10001D02C89BDE6CB2052F099894683C14CA6A68026400096265686176696F75726C0000000164000A67656E5F7365727665726A6A
-Current compilation info: 836C0000000468026400076F7074696F6E736C0000000568026400036377646B00222F636C656172636173652F6F74702F657274732F6C69622F6B65726E656C2F73726368026400066F75746469726B002A2F636C656172636173652F6F74702F657274732F6C69622F6B65726E656C2F7372632F2E2E2F6562696E6802640001696B002D2F636C656172636173652F6F74702F657274732F6C69622F6B65726E656C2F7372632F2E2E2F696E636C75646564000A64656275675F696E666F6400107761726E5F756E757365645F766172736A680264000776657273696F6E6B0005342E322E31680264000474696D65680662000007D3610C6112610B613161386802640006736F757263656B002D2F636C656172636173652F6F74702F657274732F6C69622F6B65726E656C2F7372632F676C6F62616C2E65726C6A
-=mod:inet_db
-Current size: 34555
-Current attributes: 836C00000001680264000376736E6C000000016E1000C1CF6A6F2E83D4EBC23D2CCECBF376226A6A
-Current compilation info: 836C0000000468026400076F7074696F6E736C0000000568026400036377646B00222F636C656172636173652F6F74702F657274732F6C69622F6B65726E656C2F73726368026400066F75746469726B002A2F636C656172636173652F6F74702F657274732F6C69622F6B65726E656C2F7372632F2E2E2F6562696E6802640001696B002D2F636C656172636173652F6F74702F657274732F6C69622F6B65726E656C2F7372632F2E2E2F696E636C75646564000A64656275675F696E666F6400107761726E5F756E757365645F766172736A680264000776657273696F6E6B0005342E322E31680264000474696D65680662000007D3610C6112610B6132611A6802640006736F757263656B002E2F636C656172636173652F6F74702F657274732F6C69622F6B65726E656C2F7372632F696E65745F64622E65726C6A
-=mod:inet_config
-Current size: 13575
-Current attributes: 836C00000001680264000376736E6C000000016E1000650F6571C03BC9C16BB7973A747565066A6A
-Current compilation info: 836C0000000468026400076F7074696F6E736C0000000568026400036377646B00222F636C656172636173652F6F74702F657274732F6C69622F6B65726E656C2F73726368026400066F75746469726B002A2F636C656172636173652F6F74702F657274732F6C69622F6B65726E656C2F7372632F2E2E2F6562696E6802640001696B002D2F636C656172636173652F6F74702F657274732F6C69622F6B65726E656C2F7372632F2E2E2F696E636C75646564000A64656275675F696E666F6400107761726E5F756E757365645F766172736A680264000776657273696F6E6B0005342E322E31680264000474696D65680662000007D3610C6112610B613261166802640006736F757263656B00322F636C656172636173652F6F74702F657274732F6C69622F6B65726E656C2F7372632F696E65745F636F6E6669672E65726C6A
-=mod:os
-Current size: 5997
-Current attributes: 836C00000001680264000376736E6C000000016E100017144CD766A604A9DFBA0B58C8FCA78B6A6A
-Current compilation info: 836C0000000468026400076F7074696F6E736C0000000568026400036377646B00222F636C656172636173652F6F74702F657274732F6C69622F6B65726E656C2F73726368026400066F75746469726B002A2F636C656172636173652F6F74702F657274732F6C69622F6B65726E656C2F7372632F2E2E2F6562696E6802640001696B002D2F636C656172636173652F6F74702F657274732F6C69622F6B65726E656C2F7372632F2E2E2F696E636C75646564000A64656275675F696E666F6400107761726E5F756E757365645F766172736A680264000776657273696F6E6B0005342E322E31680264000474696D65680662000007D3610C6112610B613361056802640006736F757263656B00292F636C656172636173652F6F74702F657274732F6C69622F6B65726E656C2F7372632F6F732E65726C6A
-=mod:inet_udp
-Current size: 2451
-Current attributes: 836C00000001680264000376736E6C000000016E1000ACB163E87A687A6683B50B331C6E289B6A6A
-Current compilation info: 836C0000000468026400076F7074696F6E736C0000000568026400036377646B00222F636C656172636173652F6F74702F657274732F6C69622F6B65726E656C2F73726368026400066F75746469726B002A2F636C656172636173652F6F74702F657274732F6C69622F6B65726E656C2F7372632F2E2E2F6562696E6802640001696B002D2F636C656172636173652F6F74702F657274732F6C69622F6B65726E656C2F7372632F2E2E2F696E636C75646564000A64656275675F696E666F6400107761726E5F756E757365645F766172736A680264000776657273696F6E6B0005342E322E31680264000474696D65680662000007D3610C6112610B613261306802640006736F757263656B002F2F636C656172636173652F6F74702F657274732F6C69622F6B65726E656C2F7372632F696E65745F7564702E65726C6A
-=mod:inet
-Current size: 28288
-Current attributes: 836C00000001680264000376736E6C000000016E10009B9AD400F0BAF6AAF17A4788A4EFF11E6A6A
-Current compilation info: 836C0000000468026400076F7074696F6E736C0000000568026400036377646B00222F636C656172636173652F6F74702F657274732F6C69622F6B65726E656C2F73726368026400066F75746469726B002A2F636C656172636173652F6F74702F657274732F6C69622F6B65726E656C2F7372632F2E2E2F6562696E6802640001696B002D2F636C656172636173652F6F74702F657274732F6C69622F6B65726E656C2F7372632F2E2E2F696E636C75646564000A64656275675F696E666F6400107761726E5F756E757365645F766172736A680264000776657273696F6E6B0005342E322E31680264000474696D65680662000007D3610C6112610B6132610C6802640006736F757263656B002B2F636C656172636173652F6F74702F657274732F6C69622F6B65726E656C2F7372632F696E65742E65726C6A
-=mod:inet_parse
-Current size: 21928
-Current attributes: 836C00000001680264000376736E6C000000016E1000E0E65454C096847749930EDC1C53C80B6A6A
-Current compilation info: 836C0000000468026400076F7074696F6E736C0000000568026400036377646B00222F636C656172636173652F6F74702F657274732F6C69622F6B65726E656C2F73726368026400066F75746469726B002A2F636C656172636173652F6F74702F657274732F6C69622F6B65726E656C2F7372632F2E2E2F6562696E6802640001696B002D2F636C656172636173652F6F74702F657274732F6C69622F6B65726E656C2F7372632F2E2E2F696E636C75646564000A64656275675F696E666F6400107761726E5F756E757365645F766172736A680264000776657273696F6E6B0005342E322E31680264000474696D65680662000007D3610C6112610B613261266802640006736F757263656B00312F636C656172636173652F6F74702F657274732F6C69622F6B65726E656C2F7372632F696E65745F70617273652E65726C6A
-=mod:filename
-Current size: 17411
-Current attributes: 836C00000001680264000376736E6C000000016E100068085214F459D51A3E08819BF8D7698A6A6A
-Current compilation info: 836C0000000468026400076F7074696F6E736C0000000768026400036377646B00222F636C656172636173652F6F74702F657274732F6C69622F7374646C69622F73726368026400066F75746469726B002A2F636C656172636173652F6F74702F657274732F6C69622F7374646C69622F7372632F2E2E2F6562696E6802640001696B002D2F636C656172636173652F6F74702F657274732F6C69622F7374646C69622F7372632F2E2E2F696E636C7564656802640001696B00372F636C656172636173652F6F74702F657274732F6C69622F7374646C69622F7372632F2E2E2F2E2E2F6B65726E656C2F696E636C7564656400107761726E5F756E757365645F7661727364000A64656275675F696E666F6400107761726E5F756E757365645F766172736A680264000776657273696F6E6B0005342E322E31680264000474696D65680662000007D3610C6112610B612D61296802640006736F757263656B002F2F636C656172636173652F6F74702F657274732F6C69622F7374646C69622F7372632F66696C656E616D652E65726C6A
-=mod:inet_hosts
-Current size: 3745
-Current attributes: 836C00000001680264000376736E6C000000016E1000E7430304E86230057150DEE5D279881F6A6A
-Current compilation info: 836C0000000468026400076F7074696F6E736C0000000568026400036377646B00222F636C656172636173652F6F74702F657274732F6C69622F6B65726E656C2F73726368026400066F75746469726B002A2F636C656172636173652F6F74702F657274732F6C69622F6B65726E656C2F7372632F2E2E2F6562696E6802640001696B002D2F636C656172636173652F6F74702F657274732F6C69622F6B65726E656C2F7372632F2E2E2F696E636C75646564000A64656275675F696E666F6400107761726E5F756E757365645F766172736A680264000776657273696F6E6B0005342E322E31680264000474696D65680662000007D3610C6112610B613261226802640006736F757263656B00312F636C656172636173652F6F74702F657274732F6C69622F6B65726E656C2F7372632F696E65745F686F7374732E65726C6A
-=mod:erl_distribution
-Current size: 2512
-Current attributes: 836C00000002680264000376736E6C000000016E1000CDE49D63ACA767E0D49679657E99D2046A68026400096265686176696F75726C0000000164000A73757065727669736F726A6A
-Current compilation info: 836C0000000468026400076F7074696F6E736C0000000568026400036377646B00222F636C656172636173652F6F74702F657274732F6C69622F6B65726E656C2F73726368026400066F75746469726B002A2F636C656172636173652F6F74702F657274732F6C69622F6B65726E656C2F7372632F2E2E2F6562696E6802640001696B002D2F636C656172636173652F6F74702F657274732F6C69622F6B65726E656C2F7372632F2E2E2F696E636C75646564000A64656275675F696E666F6400107761726E5F756E757365645F766172736A680264000776657273696F6E6B0005342E322E31680264000474696D65680662000007D3610C6112610B613161186802640006736F757263656B00372F636C656172636173652F6F74702F657274732F6C69622F6B65726E656C2F7372632F65726C5F646973747269627574696F6E2E65726C6A
-=mod:global_group
-Current size: 30960
-Current attributes: 836C00000002680264000376736E6C000000016E10008ECE759E5920988CA3ACFF34B32F86736A68026400096265686176696F75726C0000000164000A67656E5F7365727665726A6A
-Current compilation info: 836C0000000468026400076F7074696F6E736C0000000568026400036377646B00222F636C656172636173652F6F74702F657274732F6C69622F6B65726E656C2F73726368026400066F75746469726B002A2F636C656172636173652F6F74702F657274732F6C69622F6B65726E656C2F7372632F2E2E2F6562696E6802640001696B002D2F636C656172636173652F6F74702F657274732F6C69622F6B65726E656C2F7372632F2E2E2F696E636C75646564000A64656275675F696E666F6400107761726E5F756E757365645F766172736A680264000776657273696F6E6B0005342E322E31680264000474696D65680662000007D3610C6112610B6131613B6802640006736F757263656B00332F636C656172636173652F6F74702F657274732F6C69622F6B65726E656C2F7372632F676C6F62616C5F67726F75702E65726C6A
-=mod:net_kernel
-Current size: 37648
-Current attributes: 836C00000002680264000376736E6C000000016E1000967CE7DE41F9B39906CCCF3225E6E5286A68026400096265686176696F75726C0000000164000A67656E5F7365727665726A6A
-Current compilation info: 836C0000000468026400076F7074696F6E736C0000000568026400036377646B00222F636C656172636173652F6F74702F657274732F6C69622F6B65726E656C2F73726368026400066F75746469726B002A2F636C656172636173652F6F74702F657274732F6C69622F6B65726E656C2F7372632F2E2E2F6562696E6802640001696B002D2F636C656172636173652F6F74702F657274732F6C69622F6B65726E656C2F7372632F2E2E2F696E636C75646564000A64656275675F696E666F6400107761726E5F756E757365645F766172736A680264000776657273696F6E6B0005342E322E31680264000474696D65680662000007D3610C6112610B613361026802640006736F757263656B00312F636C656172636173652F6F74702F657274732F6C69622F6B65726E656C2F7372632F6E65745F6B65726E656C2E65726C6A
-=mod:file_server
-Current size: 8372
-Current attributes: 836C00000002680264000376736E6C000000016E1000EF90906EC6204204AC0A77C4A25B65236A68026400096265686176696F75726C0000000164000A67656E5F7365727665726A6A
-Current compilation info: 836C0000000468026400076F7074696F6E736C0000000568026400036377646B00222F636C656172636173652F6F74702F657274732F6C69622F6B65726E656C2F73726368026400066F75746469726B002A2F636C656172636173652F6F74702F657274732F6C69622F6B65726E656C2F7372632F2E2E2F6562696E6802640001696B002D2F636C656172636173652F6F74702F657274732F6C69622F6B65726E656C2F7372632F2E2E2F696E636C75646564000A64656275675F696E666F6400107761726E5F756E757365645F766172736A680264000776657273696F6E6B0005342E322E31680264000474696D65680662000007D3610C6112610B6131612D6802640006736F757263656B00322F636C656172636173652F6F74702F657274732F6C69622F6B65726E656C2F7372632F66696C655F7365727665722E65726C6A
-=mod:old_file_server
-Current size: 3074
-Current attributes: 836C00000001680264000376736E6C000000016E1000C802085DD76D4EFBA6A8F528FECB94B36A6A
-Current compilation info: 836C0000000468026400076F7074696F6E736C0000000568026400036377646B00222F636C656172636173652F6F74702F657274732F6C69622F6B65726E656C2F73726368026400066F75746469726B002A2F636C656172636173652F6F74702F657274732F6C69622F6B65726E656C2F7372632F2E2E2F6562696E6802640001696B002D2F636C656172636173652F6F74702F657274732F6C69622F6B65726E656C2F7372632F2E2E2F696E636C75646564000A64656275675F696E666F6400107761726E5F756E757365645F766172736A680264000776657273696F6E6B0005342E322E31680264000474696D65680662000007D3610C6112610B6131612F6802640006736F757263656B00362F636C656172636173652F6F74702F657274732F6C69622F6B65726E656C2F7372632F6F6C645F66696C655F7365727665722E65726C6A
-=mod:code
-Current size: 7419
-Current attributes: 836C00000001680264000376736E6C000000016E1000AE618E3041C8E3807A3719CD5140DF5E6A6A
-Current compilation info: 836C0000000468026400076F7074696F6E736C0000000568026400036377646B00222F636C656172636173652F6F74702F657274732F6C69622F6B65726E656C2F73726368026400066F75746469726B002A2F636C656172636173652F6F74702F657274732F6C69622F6B65726E656C2F7372632F2E2E2F6562696E6802640001696B002D2F636C656172636173652F6F74702F657274732F6C69622F6B65726E656C2F7372632F2E2E2F696E636C75646564000A64656275675F696E666F6400107761726E5F756E757365645F766172736A680264000776657273696F6E6B0005342E322E31680264000474696D65680662000007D3610C6112610B6130612E6802640006736F757263656B002B2F636C656172636173652F6F74702F657274732F6C69622F6B65726E656C2F7372632F636F64652E65726C6A
-=mod:code_server
-Current size: 30811
-Current attributes: 836C00000001680264000376736E6C000000016E0F00BFB96248C2CA8601B4CB7F543F52E26A6A
-Current compilation info: 836C0000000468026400076F7074696F6E736C0000000568026400036377646B00222F636C656172636173652F6F74702F657274732F6C69622F6B65726E656C2F73726368026400066F75746469726B002A2F636C656172636173652F6F74702F657274732F6C69622F6B65726E656C2F7372632F2E2E2F6562696E6802640001696B002D2F636C656172636173652F6F74702F657274732F6C69622F6B65726E656C2F7372632F2E2E2F696E636C75646564000A64656275675F696E666F6400107761726E5F756E757365645F766172736A680264000776657273696F6E6B0005342E322E31680264000474696D65680662000007D3610C6112610B613061346802640006736F757263656B00322F636C656172636173652F6F74702F657274732F6C69622F6B65726E656C2F7372632F636F64655F7365727665722E65726C6A
-=mod:code_aux
-Current size: 1736
-Current attributes: 836C00000001680264000376736E6C000000016E10007A90DB53FCCECD52504F20E7A3B6BAE26A6A
-Current compilation info: 836C0000000468026400076F7074696F6E736C0000000568026400036377646B00222F636C656172636173652F6F74702F657274732F6C69622F6B65726E656C2F73726368026400066F75746469726B002A2F636C656172636173652F6F74702F657274732F6C69622F6B65726E656C2F7372632F2E2E2F6562696E6802640001696B002D2F636C656172636173652F6F74702F657274732F6C69622F6B65726E656C2F7372632F2E2E2F696E636C75646564000A64656275675F696E666F6400107761726E5F756E757365645F766172736A680264000776657273696F6E6B0005342E322E31680264000474696D65680662000007D3610C6112610B613061316802640006736F757263656B002F2F636C656172636173652F6F74702F657274732F6C69622F6B65726E656C2F7372632F636F64655F6175782E65726C6A
-=mod:packages
-Current size: 3119
-Current attributes: 836C00000001680264000376736E6C000000016E1000044DC8EEB65F178AE23EF2465E1954496A6A
-Current compilation info: 836C0000000468026400076F7074696F6E736C0000000568026400036377646B00222F636C656172636173652F6F74702F657274732F6C69622F6B65726E656C2F73726368026400066F75746469726B002A2F636C656172636173652F6F74702F657274732F6C69622F6B65726E656C2F7372632F2E2E2F6562696E6802640001696B002D2F636C656172636173652F6F74702F657274732F6C69622F6B65726E656C2F7372632F2E2E2F696E636C75646564000A64656275675F696E666F6400107761726E5F756E757365645F766172736A680264000776657273696F6E6B0005342E322E31680264000474696D65680662000007D3610C6112610B613361076802640006736F757263656B002F2F636C656172636173652F6F74702F657274732F6C69622F6B65726E656C2F7372632F7061636B616765732E65726C6A
-=mod:hipe_unified_loader
-Current size: 37330
-Current attributes: 836C00000001680264000376736E6C000000016E1000DABD57945702E56F4B3AA7B7B19C1D166A6A
-Current compilation info: 836C0000000468026400076F7074696F6E736C0000000568026400036377646B00222F636C656172636173652F6F74702F657274732F6C69622F6B65726E656C2F73726368026400066F75746469726B002A2F636C656172636173652F6F74702F657274732F6C69622F6B65726E656C2F7372632F2E2E2F6562696E6802640001696B002D2F636C656172636173652F6F74702F657274732F6C69622F6B65726E656C2F7372632F2E2E2F696E636C75646564000A64656275675F696E666F6400107761726E5F756E757365645F766172736A680264000776657273696F6E6B0005342E322E31680264000474696D65680662000007D3610C6112610B613361326802640006736F757263656B003A2F636C656172636173652F6F74702F657274732F6C69622F6B65726E656C2F7372632F686970655F756E69666965645F6C6F616465722E65726C6A
-=mod:hipe_sparc_loader
-Current size: 1821
-Current attributes: 836C00000001680264000376736E6C000000016E1000582BC55E9FADFF879C2C45D25A6CB7E56A6A
-Current compilation info: 836C0000000468026400076F7074696F6E736C0000000868026400036377646B00222F636C656172636173652F6F74702F657274732F6C69622F6B65726E656C2F73726368026400066F75746469726B002A2F636C656172636173652F6F74702F657274732F6C69622F6B65726E656C2F7372632F2E2E2F6562696E6802640001696B002D2F636C656172636173652F6F74702F657274732F6C69622F6B65726E656C2F7372632F2E2E2F696E636C7564656802640001696B00322F636C656172636173652F6F74702F657274732F6C69622F6B65726E656C2F7372632F2E2E2F2E2E2F686970652F6D61696E6802640001696B00312F636C656172636173652F6F74702F657274732F6C69622F6B65726E656C2F7372632F2E2E2F2E2E2F686970652F72746C6802640001696B00332F636C656172636173652F6F74702F657274732F6C69622F6B65726E656C2F7372632F2E2E2F2E2E2F686970652F737061726364000A64656275675F696E666F6400107761726E5F756E757365645F766172736A680264000776657273696F6E6B0005342E322E31680264000474696D65680662000007D3610C6112610B6133612B6802640006736F757263656B00382F636C656172636173652F6F74702F657274732F6C69622F6B65726E656C2F7372632F686970655F73706172635F6C6F616465722E65726C6A
-=mod:ets
-Current size: 16577
-Current attributes: 836C00000002680264000376736E6C000000016E100033D982AC91129E5FC35E0AC3337A4EB56A680264000A646570726563617465646C0000000168026400086669787461626C6561026A6A
-Current compilation info: 836C0000000468026400076F7074696F6E736C0000000768026400036377646B00222F636C656172636173652F6F74702F657274732F6C69622F7374646C69622F73726368026400066F75746469726B002A2F636C656172636173652F6F74702F657274732F6C69622F7374646C69622F7372632F2E2E2F6562696E6802640001696B002D2F636C656172636173652F6F74702F657274732F6C69622F7374646C69622F7372632F2E2E2F696E636C7564656802640001696B00372F636C656172636173652F6F74702F657274732F6C69622F7374646C69622F7372632F2E2E2F2E2E2F6B65726E656C2F696E636C7564656400107761726E5F756E757365645F7661727364000A64656275675F696E666F6400107761726E5F756E757365645F766172736A680264000776657273696F6E6B0005342E322E31680264000474696D65680662000007D3610C6112610B612D611C6802640006736F757263656B002A2F636C656172636173652F6F74702F657274732F6C69622F7374646C69622F7372632F6574732E65726C6A
-=mod:lists_sort
-Current size: 38692
-Current attributes: 836C00000001680264000376736E6C000000016E1000E17EC92FA9AA3199DD71701C215044616A6A
-Current compilation info: 836C0000000468026400076F7074696F6E736C0000000B68026400036377646B00222F636C656172636173652F6F74702F657274732F6C69622F7374646C69622F73726368026400066F75746469726B002A2F636C656172636173652F6F74702F657274732F6C69622F7374646C69622F7372632F2E2E2F6562696E6802640001696B002D2F636C656172636173652F6F74702F657274732F6C69622F7374646C69622F7372632F2E2E2F696E636C7564656802640001696B00372F636C656172636173652F6F74702F657274732F6C69622F7374646C69622F7372632F2E2E2F2E2E2F6B65726E656C2F696E636C7564656400107761726E5F756E757365645F7661727364000A64656275675F696E666F6400107761726E5F756E757365645F766172736802640006696E6C696E656C0000000468026400096D65726765335F3132610768026400096D65726765335F32316107680264000A726D65726765335F31326107680264000A726D65726765335F323161076A6802640006696E6C696E656C00000004680264000A756D65726765335F31326108680264000A756D65726765335F32316108680264000C72756D65726765335F3132616107680264000C72756D65726765335F31326261086A6802640006696E6C696E656C00000004680264000C6B65796D65726765335F3132610C680264000C6B65796D65726765335F3231610C680264000D726B65796D65726765335F3132610C680264000D726B65796D65726765335F3231610C6A6802640006696E6C696E656C00000006680264000D756B65796D65726765335F3132610D680264000D756B65796D65726765335F3231610D680264000F72756B65796D65726765335F313261610B680264000F72756B65796D65726765335F323161610D680264000F72756B65796D65726765335F313262610D680264000F72756B65796D65726765335F323162610C6A6A680264000776657273696F6E6B0005342E322E31680264000474696D65680662000007D3610C6112610B612E61166802640006736F757263656B00312F636C656172636173652F6F74702F657274732F6C69622F7374646C69622F7372632F6C697374735F736F72742E65726C6A
-=mod:user_sup
-Current size: 2355
-Current attributes: 836C00000002680264000376736E6C000000016E100074BA860804CB4D60D6908C705E6544BD6A68026400096265686176696F75726C0000000164001173757065727669736F725F6272696467656A6A
-Current compilation info: 836C0000000468026400076F7074696F6E736C0000000568026400036377646B00222F636C656172636173652F6F74702F657274732F6C69622F6B65726E656C2F73726368026400066F75746469726B002A2F636C656172636173652F6F74702F657274732F6C69622F6B65726E656C2F7372632F2E2E2F6562696E6802640001696B002D2F636C656172636173652F6F74702F657274732F6C69622F6B65726E656C2F7372632F2E2E2F696E636C75646564000A64656275675F696E666F6400107761726E5F756E757365645F766172736A680264000776657273696F6E6B0005342E322E31680264000474696D65680662000007D3610C6112610B613361246802640006736F757263656B002F2F636C656172636173652F6F74702F657274732F6C69622F6B65726E656C2F7372632F757365725F7375702E65726C6A
-=mod:supervisor_bridge
-Current size: 2944
-Current attributes: 836C00000002680264000376736E6C000000016E10001590DDC10CF8A9D09763CDB7479678ED6A68026400096265686176696F75726C0000000164000A67656E5F7365727665726A6A
-Current compilation info: 836C0000000468026400076F7074696F6E736C0000000768026400036377646B00222F636C656172636173652F6F74702F657274732F6C69622F7374646C69622F73726368026400066F75746469726B002A2F636C656172636173652F6F74702F657274732F6C69622F7374646C69622F7372632F2E2E2F6562696E6802640001696B002D2F636C656172636173652F6F74702F657274732F6C69622F7374646C69622F7372632F2E2E2F696E636C7564656802640001696B00372F636C656172636173652F6F74702F657274732F6C69622F7374646C69622F7372632F2E2E2F2E2E2F6B65726E656C2F696E636C7564656400107761726E5F756E757365645F7661727364000A64656275675F696E666F6400107761726E5F756E757365645F766172736A680264000776657273696F6E6B0005342E322E31680264000474696D65680662000007D3610C6112610B612F61156802640006736F757263656B00382F636C656172636173652F6F74702F657274732F6C69622F7374646C69622F7372632F73757065727669736F725F6272696467652E65726C6A
-=mod:user_drv
-Current size: 14630
-Current attributes: 836C00000001680264000376736E6C000000016E1000F29F3B193A1EB1ADA9975D97E51BF0E86A6A
-Current compilation info: 836C0000000468026400076F7074696F6E736C0000000568026400036377646B00222F636C656172636173652F6F74702F657274732F6C69622F6B65726E656C2F73726368026400066F75746469726B002A2F636C656172636173652F6F74702F657274732F6C69622F6B65726E656C2F7372632F2E2E2F6562696E6802640001696B002D2F636C656172636173652F6F74702F657274732F6C69622F6B65726E656C2F7372632F2E2E2F696E636C75646564000A64656275675F696E666F6400107761726E5F756E757365645F766172736A680264000776657273696F6E6B0005342E322E31680264000474696D65680662000007D3610C6112610B613361216802640006736F757263656B002F2F636C656172636173652F6F74702F657274732F6C69622F6B65726E656C2F7372632F757365725F6472762E65726C6A
-=mod:group
-Current size: 10165
-Current attributes: 836C00000001680264000376736E6C000000016E1000F6427D0DA330BBFAD5D4C19058516FF36A6A
-Current compilation info: 836C0000000468026400076F7074696F6E736C0000000568026400036377646B00222F636C656172636173652F6F74702F657274732F6C69622F6B65726E656C2F73726368026400066F75746469726B002A2F636C656172636173652F6F74702F657274732F6C69622F6B65726E656C2F7372632F2E2E2F6562696E6802640001696B002D2F636C656172636173652F6F74702F657274732F6C69622F6B65726E656C2F7372632F2E2E2F696E636C75646564000A64656275675F696E666F6400107761726E5F756E757365645F766172736A680264000776657273696F6E6B0005342E322E31680264000474696D65680662000007D3610C6112610B613261066802640006736F757263656B002C2F636C656172636173652F6F74702F657274732F6C69622F6B65726E656C2F7372632F67726F75702E65726C6A
-=mod:io_lib
-Current size: 12601
-Current attributes: 836C00000002680264000376736E6C000000016E10004160DD78F37EE7C72F7C5B6A751DB7F56A680264000A646570726563617465646C0000000468026400047363616E610168026400047363616E610268026400047363616E6103680264000D72657365727665645F776F726461016A6A
-Current compilation info: 836C0000000468026400076F7074696F6E736C0000000768026400036377646B00222F636C656172636173652F6F74702F657274732F6C69622F7374646C69622F73726368026400066F75746469726B002A2F636C656172636173652F6F74702F657274732F6C69622F7374646C69622F7372632F2E2E2F6562696E6802640001696B002D2F636C656172636173652F6F74702F657274732F6C69622F7374646C69622F7372632F2E2E2F696E636C7564656802640001696B00372F636C656172636173652F6F74702F657274732F6C69622F7374646C69622F7372632F2E2E2F2E2E2F6B65726E656C2F696E636C7564656400107761726E5F756E757365645F7661727364000A64656275675F696E666F6400107761726E5F756E757365645F766172736A680264000776657273696F6E6B0005342E322E31680264000474696D65680662000007D3610C6112610B612E61036802640006736F757263656B002D2F636C656172636173652F6F74702F657274732F6C69622F7374646C69622F7372632F696F5F6C69622E65726C6A
-=mod:edlin
-Current size: 18178
-Current attributes: 836C00000001680264000376736E6C000000016E100035D752FCBA8ED7F4D26990EF3E6A1A526A6A
-Current compilation info: 836C0000000468026400076F7074696F6E736C0000000768026400036377646B00222F636C656172636173652F6F74702F657274732F6C69622F7374646C69622F73726368026400066F75746469726B002A2F636C656172636173652F6F74702F657274732F6C69622F7374646C69622F7372632F2E2E2F6562696E6802640001696B002D2F636C656172636173652F6F74702F657274732F6C69622F7374646C69622F7372632F2E2E2F696E636C7564656802640001696B00372F636C656172636173652F6F74702F657274732F6C69622F7374646C69622F7372632F2E2E2F2E2E2F6B65726E656C2F696E636C7564656400107761726E5F756E757365645F7661727364000A64656275675F696E666F6400107761726E5F756E757365645F766172736A680264000776657273696F6E6B0005342E322E31680264000474696D65680662000007D3610C6112610B612C61016802640006736F757263656B002C2F636C656172636173652F6F74702F657274732F6C69622F7374646C69622F7372632F65646C696E2E65726C6A
-=mod:io_lib_format
-Current size: 16189
-Current attributes: 836C00000001680264000376736E6C000000016E10004F382F327C456F83F33C3D5EBFBD87906A6A
-Current compilation info: 836C0000000468026400076F7074696F6E736C0000000768026400036377646B00222F636C656172636173652F6F74702F657274732F6C69622F7374646C69622F73726368026400066F75746469726B002A2F636C656172636173652F6F74702F657274732F6C69622F7374646C69622F7372632F2E2E2F6562696E6802640001696B002D2F636C656172636173652F6F74702F657274732F6C69622F7374646C69622F7372632F2E2E2F696E636C7564656802640001696B00372F636C656172636173652F6F74702F657274732F6C69622F7374646C69622F7372632F2E2E2F2E2E2F6B65726E656C2F696E636C7564656400107761726E5F756E757365645F7661727364000A64656275675F696E666F6400107761726E5F756E757365645F766172736A680264000776657273696F6E6B0005342E322E31680264000474696D65680662000007D3610C6112610B612E61066802640006736F757263656B00342F636C656172636173652F6F74702F657274732F6C69622F7374646C69622F7372632F696F5F6C69625F666F726D61742E65726C6A
-=mod:kernel_config
-Current size: 3295
-Current attributes: 836C00000002680264000376736E6C000000016E100077B8EE6C9E95FBBE5DB0371F6DB235226A68026400096265686176696F75726C0000000164000A67656E5F7365727665726A6A
-Current compilation info: 836C0000000468026400076F7074696F6E736C0000000568026400036377646B00222F636C656172636173652F6F74702F657274732F6C69622F6B65726E656C2F73726368026400066F75746469726B002A2F636C656172636173652F6F74702F657274732F6C69622F6B65726E656C2F7372632F2E2E2F6562696E6802640001696B002D2F636C656172636173652F6F74702F657274732F6C69622F6B65726E656C2F7372632F2E2E2F696E636C75646564000A64656275675F696E666F6400107761726E5F756E757365645F766172736A680264000776657273696F6E6B0005342E322E31680264000474696D65680662000007D3610C6112610B613261356802640006736F757263656B00342F636C656172636173652F6F74702F657274732F6C69622F6B65726E656C2F7372632F6B65726E656C5F636F6E6669672E65726C6A
-=mod:shell
-Current size: 22571
-Current attributes: 836C00000001680264000376736E6C000000016E10007D1354325618EB98A5BD4E8F41E6A0226A6A
-Current compilation info: 836C0000000468026400076F7074696F6E736C0000000768026400036377646B00222F636C656172636173652F6F74702F657274732F6C69622F7374646C69622F73726368026400066F75746469726B002A2F636C656172636173652F6F74702F657274732F6C69622F7374646C69622F7372632F2E2E2F6562696E6802640001696B002D2F636C656172636173652F6F74702F657274732F6C69622F7374646C69622F7372632F2E2E2F696E636C7564656802640001696B00372F636C656172636173652F6F74702F657274732F6C69622F7374646C69622F7372632F2E2E2F2E2E2F6B65726E656C2F696E636C7564656400107761726E5F756E757365645F7661727364000A64656275675F696E666F6400107761726E5F756E757365645F766172736A680264000776657273696F6E6B0005342E322E31680264000474696D65680662000007D3610C6112610B612F61016802640006736F757263656B002C2F636C656172636173652F6F74702F657274732F6C69622F7374646C69622F7372632F7368656C6C2E65726C6A
-=mod:error_logger_tty_h
-Current size: 7773
-Current attributes: 836C00000002680264000376736E6C000000016E10001502D55D6C1777F07E2E05CDD91D16986A68026400096265686176696F75726C0000000164000967656E5F6576656E746A6A
-Current compilation info: 836C0000000468026400076F7074696F6E736C0000000768026400036377646B00222F636C656172636173652F6F74702F657274732F6C69622F7374646C69622F73726368026400066F75746469726B002A2F636C656172636173652F6F74702F657274732F6C69622F7374646C69622F7372632F2E2E2F6562696E6802640001696B002D2F636C656172636173652F6F74702F657274732F6C69622F7374646C69622F7372632F2E2E2F696E636C7564656802640001696B00372F636C656172636173652F6F74702F657274732F6C69622F7374646C69622F7372632F2E2E2F2E2E2F6B65726E656C2F696E636C7564656400107761726E5F756E757365645F7661727364000A64656275675F696E666F6400107761726E5F756E757365645F766172736A680264000776657273696F6E6B0005342E322E31680264000474696D65680662000007D3610C6112610B612D61196802640006736F757263656B00392F636C656172636173652F6F74702F657274732F6C69622F7374646C69622F7372632F6572726F725F6C6F676765725F7474795F682E65726C6A
-=mod:erl_eval
-Current size: 33481
-Current attributes: 836C00000002680264000376736E6C000000016E1000D06903753C86BBC49A5CBD789CCB09B66A680264000A646570726563617465646C00000004680264000373657161026802640003736571610368026400086172675F6C697374610268026400086172675F6C69737461036A6A
-Current compilation info: 836C0000000468026400076F7074696F6E736C0000000768026400036377646B00222F636C656172636173652F6F74702F657274732F6C69622F7374646C69622F73726368026400066F75746469726B002A2F636C656172636173652F6F74702F657274732F6C69622F7374646C69622F7372632F2E2E2F6562696E6802640001696B002D2F636C656172636173652F6F74702F657274732F6C69622F7374646C69622F7372632F2E2E2F696E636C7564656802640001696B00372F636C656172636173652F6F74702F657274732F6C69622F7374646C69622F7372632F2E2E2F2E2E2F6B65726E656C2F696E636C7564656400107761726E5F756E757365645F7661727364000A64656275675F696E666F6400107761726E5F756E757365645F766172736A680264000776657273696F6E6B0005342E322E31680264000474696D65680662000007D3610C6112610B612C610D6802640006736F757263656B002F2F636C656172636173652F6F74702F657274732F6C69622F7374646C69622F7372632F65726C5F6576616C2E65726C6A
-=mod:orddict
-Current size: 4872
-Current attributes: 836C00000002680264000376736E6C000000016E100078DCF69F3949D79BC54168266A3ABF566A680264000A646570726563617465646C00000002680264000C646963745F746F5F6C6973746101680264000C6C6973745F746F5F6469637461016A6A
-Current compilation info: 836C0000000468026400076F7074696F6E736C0000000768026400036377646B00222F636C656172636173652F6F74702F657274732F6C69622F7374646C69622F73726368026400066F75746469726B002A2F636C656172636173652F6F74702F657274732F6C69622F7374646C69622F7372632F2E2E2F6562696E6802640001696B002D2F636C656172636173652F6F74702F657274732F6C69622F7374646C69622F7372632F2E2E2F696E636C7564656802640001696B00372F636C656172636173652F6F74702F657274732F6C69622F7374646C69622F7372632F2E2E2F2E2E2F6B65726E656C2F696E636C7564656400107761726E5F756E757365645F7661727364000A64656275675F696E666F6400107761726E5F756E757365645F766172736A680264000776657273696F6E6B0005342E322E31680264000474696D65680662000007D3610C6112610B612E61236802640006736F757263656B002E2F636C656172636173652F6F74702F657274732F6C69622F7374646C69622F7372632F6F7264646963742E65726C6A
-=mod:c
-Current size: 19555
-Current attributes: 836C00000001680264000376736E6C000000016E10003FACCF5DE16ABBC988ABF0811980C33B6A6A
-Current compilation info: 836C0000000468026400076F7074696F6E736C0000000768026400036377646B00222F636C656172636173652F6F74702F657274732F6C69622F7374646C69622F73726368026400066F75746469726B002A2F636C656172636173652F6F74702F657274732F6C69622F7374646C69622F7372632F2E2E2F6562696E6802640001696B002D2F636C656172636173652F6F74702F657274732F6C69622F7374646C69622F7372632F2E2E2F696E636C7564656802640001696B00372F636C656172636173652F6F74702F657274732F6C69622F7374646C69622F7372632F2E2E2F2E2E2F6B65726E656C2F696E636C7564656400107761726E5F756E757365645F7661727364000A64656275675F696E666F6400107761726E5F756E757365645F766172736A680264000776657273696F6E6B0005342E322E31680264000474696D65680662000007D3610C6112610B612B61136802640006736F757263656B00282F636C656172636173652F6F74702F657274732F6C69622F7374646C69622F7372632F632E65726C6A
-=mod:io
-Current size: 7417
-Current attributes: 836C00000002680264000376736E6C000000016E1000E2F2A6094B3C3D945865225D0620E7546A680264000A646570726563617465646C00000007680264000B70617273655F65787072736102680264000C7363616E5F65726C5F7365716101680264000C7363616E5F65726C5F7365716102680264000C7363616E5F65726C5F7365716103680264000D70617273655F65726C5F7365716101680264000D70617273655F65726C5F7365716102680264000D70617273655F65726C5F73657161036A6A
-Current compilation info: 836C0000000468026400076F7074696F6E736C0000000768026400036377646B00222F636C656172636173652F6F74702F657274732F6C69622F7374646C69622F73726368026400066F75746469726B002A2F636C656172636173652F6F74702F657274732F6C69622F7374646C69622F7372632F2E2E2F6562696E6802640001696B002D2F636C656172636173652F6F74702F657274732F6C69622F7374646C69622F7372632F2E2E2F696E636C7564656802640001696B00372F636C656172636173652F6F74702F657274732F6C69622F7374646C69622F7372632F2E2E2F2E2E2F6B65726E656C2F696E636C7564656400107761726E5F756E757365645F7661727364000A64656275675F696E666F6400107761726E5F756E757365645F766172736A680264000776657273696F6E6B0005342E322E31680264000474696D65680662000007D3610C6112610B612E61006802640006736F757263656B00292F636C656172636173652F6F74702F657274732F6C69622F7374646C69622F7372632F696F2E65726C6A
-=mod:file
-Current size: 20795
-Current attributes: 836C00000002680264000376736E6C000000016E1000D291AF77EE8B08B792B7FE99274504506A680264000A646570726563617465646C00000001680264000966696C655F696E666F61016A6A
-Current compilation info: 836C0000000468026400076F7074696F6E736C0000000568026400036377646B00222F636C656172636173652F6F74702F657274732F6C69622F6B65726E656C2F73726368026400066F75746469726B002A2F636C656172636173652F6F74702F657274732F6C69622F6B65726E656C2F7372632F2E2E2F6562696E6802640001696B002D2F636C656172636173652F6F74702F657274732F6C69622F6B65726E656C2F7372632F2E2E2F696E636C75646564000A64656275675F696E666F6400107761726E5F756E757365645F766172736A680264000776657273696F6E6B0005342E322E31680264000474696D65680662000007D3610C6112610B613161276802640006736F757263656B002B2F636C656172636173652F6F74702F657274732F6C69622F6B65726E656C2F7372632F66696C652E65726C6A
-=mod:file_io_server
-Current size: 12071
-Current attributes: 836C00000001680264000376736E6C000000016E1000A5A8C4E2B2646855AD5C617CB216CB966A6A
-Current compilation info: 836C0000000468026400076F7074696F6E736C0000000568026400036377646B00222F636C656172636173652F6F74702F657274732F6C69622F6B65726E656C2F73726368026400066F75746469726B002A2F636C656172636173652F6F74702F657274732F6C69622F6B65726E656C2F7372632F2E2E2F6562696E6802640001696B002D2F636C656172636173652F6F74702F657274732F6C69622F6B65726E656C2F7372632F2E2E2F696E636C75646564000A64656275675F696E666F6400107761726E5F756E757365645F766172736A680264000776657273696F6E6B0005342E322E31680264000474696D65680662000007D3610C6112610B6131612A6802640006736F757263656B00352F636C656172636173652F6F74702F657274732F6C69622F6B65726E656C2F7372632F66696C655F696F5F7365727665722E65726C6A
-=mod:erl_scan
-Current size: 21891
-Current attributes: 836C00000001680264000376736E6C000000016E100094F386F0C378B258E5D9CEADD4F03B6A6A6A
-Current compilation info: 836C0000000468026400076F7074696F6E736C0000000768026400036377646B00222F636C656172636173652F6F74702F657274732F6C69622F7374646C69622F73726368026400066F75746469726B002A2F636C656172636173652F6F74702F657274732F6C69622F7374646C69622F7372632F2E2E2F6562696E6802640001696B002D2F636C656172636173652F6F74702F657274732F6C69622F7374646C69622F7372632F2E2E2F696E636C7564656802640001696B00372F636C656172636173652F6F74702F657274732F6C69622F7374646C69622F7372632F2E2E2F2E2E2F6B65726E656C2F696E636C7564656400107761726E5F756E757365645F7661727364000A64656275675F696E666F6400107761726E5F756E757365645F766172736A680264000776657273696F6E6B0005342E322E31680264000474696D65680662000007D3610C6112610B612D61116802640006736F757263656B002F2F636C656172636173652F6F74702F657274732F6C69622F7374646C69622F7372632F65726C5F7363616E2E65726C6A
-=mod:erl_parse
-Current size: 161233
-Current attributes: 836C00000001680264000376736E6C000000016E10000E8CBC32C293BFC1FBC721CE918062236A6A
-Current compilation info: 836C0000000468026400076F7074696F6E736C0000000968026400036377646B00222F636C656172636173652F6F74702F657274732F6C69622F7374646C69622F73726368026400066F75746469726B002A2F636C656172636173652F6F74702F657274732F6C69622F7374646C69622F7372632F2E2E2F6562696E6802640001696B002D2F636C656172636173652F6F74702F657274732F6C69622F7374646C69622F7372632F2E2E2F696E636C7564656802640001696B00372F636C656172636173652F6F74702F657274732F6C69622F7374646C69622F7372632F2E2E2F2E2E2F6B65726E656C2F696E636C7564656400107761726E5F756E757365645F7661727364000A64656275675F696E666F6400107761726E5F756E757365645F76617273640006696E6C696E656802640004686970656C000000016802640008726567616C6C6F6364000B6C696E6561725F7363616E6A6A680264000776657273696F6E6B0005342E322E31680264000474696D65680662000007D3610C6112610B612D61076802640006736F757263656B00302F636C656172636173652F6F74702F657274732F6C69622F7374646C69622F7372632F65726C5F70617273652E65726C6A
-=mod:erl_lint
-Current size: 73159
-Current attributes: 836C00000001680264000376736E6C000000016E1000D1D2A7D6DDFD1195CB180993C76FD2CD6A6A
-Current compilation info: 836C0000000468026400076F7074696F6E736C0000000768026400036377646B00222F636C656172636173652F6F74702F657274732F6C69622F7374646C69622F73726368026400066F75746469726B002A2F636C656172636173652F6F74702F657274732F6C69622F7374646C69622F7372632F2E2E2F6562696E6802640001696B002D2F636C656172636173652F6F74702F657274732F6C69622F7374646C69622F7372632F2E2E2F696E636C7564656802640001696B00372F636C656172636173652F6F74702F657274732F6C69622F7374646C69622F7372632F2E2E2F2E2E2F6B65726E656C2F696E636C7564656400107761726E5F756E757365645F7661727364000A64656275675F696E666F6400107761726E5F756E757365645F766172736A680264000776657273696F6E6B0005342E322E31680264000474696D65680662000007D3610C6112610B612C61156802640006736F757263656B002F2F636C656172636173652F6F74702F657274732F6C69622F7374646C69622F7372632F65726C5F6C696E742E65726C6A
-=mod:ordsets
-Current size: 3257
-Current attributes: 836C00000002680264000376736E6C000000016E1000FD39D8FD846511128F5670BA28600F676A680264000A646570726563617465646C0000000468026400076E65775F7365746100680264000B7365745F746F5F6C6973746101680264000B6C6973745F746F5F7365746101680264000673756273657461026A6A
-Current compilation info: 836C0000000468026400076F7074696F6E736C0000000768026400036377646B00222F636C656172636173652F6F74702F657274732F6C69622F7374646C69622F73726368026400066F75746469726B002A2F636C656172636173652F6F74702F657274732F6C69622F7374646C69622F7372632F2E2E2F6562696E6802640001696B002D2F636C656172636173652F6F74702F657274732F6C69622F7374646C69622F7372632F2E2E2F696E636C7564656802640001696B00372F636C656172636173652F6F74702F657274732F6C69622F7374646C69622F7372632F2E2E2F2E2E2F6B65726E656C2F696E636C7564656400107761726E5F756E757365645F7661727364000A64656275675F696E666F6400107761726E5F756E757365645F766172736A680264000776657273696F6E6B0005342E322E31680264000474696D65680662000007D3610C6112610B612E61256802640006736F757263656B002E2F636C656172636173652F6F74702F657274732F6C69622F7374646C69622F7372632F6F7264736574732E65726C6A
-=mod:dict
-Current size: 15637
-Current attributes: 836C00000002680264000376736E6C000000016E1000BC846E7EF85045A5D76190CE9B1AE97C6A680264000A646570726563617465646C00000002680264000C646963745F746F5F6C6973746101680264000C6C6973745F746F5F6469637461016A6A
-Current compilation info: 836C0000000468026400076F7074696F6E736C0000000768026400036377646B00222F636C656172636173652F6F74702F657274732F6C69622F7374646C69622F73726368026400066F75746469726B002A2F636C656172636173652F6F74702F657274732F6C69622F7374646C69622F7372632F2E2E2F6562696E6802640001696B002D2F636C656172636173652F6F74702F657274732F6C69622F7374646C69622F7372632F2E2E2F696E636C7564656802640001696B00372F636C656172636173652F6F74702F657274732F6C69622F7374646C69622F7372632F2E2E2F2E2E2F6B65726E656C2F696E636C7564656400107761726E5F756E757365645F7661727364000A64656275675F696E666F6400107761726E5F756E757365645F766172736A680264000776657273696F6E6B0005342E322E31680264000474696D65680662000007D3610C6112610B612B61356802640006736F757263656B002B2F636C656172636173652F6F74702F657274732F6C69622F7374646C69622F7372632F646963742E65726C6A
-=mod:otp_internal
-Current size: 7133
-Current attributes: 836C00000001680264000376736E6C000000016E1000DC494F64DE590AFC4919DFEB0EB026B66A6A
-Current compilation info: 836C0000000468026400076F7074696F6E736C0000000768026400036377646B00222F636C656172636173652F6F74702F657274732F6C69622F7374646C69622F73726368026400066F75746469726B002A2F636C656172636173652F6F74702F657274732F6C69622F7374646C69622F7372632F2E2E2F6562696E6802640001696B002D2F636C656172636173652F6F74702F657274732F6C69622F7374646C69622F7372632F2E2E2F696E636C7564656802640001696B00372F636C656172636173652F6F74702F657274732F6C69622F7374646C69622F7372632F2E2E2F2E2E2F6B65726E656C2F696E636C7564656400107761726E5F756E757365645F7661727364000A64656275675F696E666F6400107761726E5F756E757365645F766172736A680264000776657273696F6E6B0005342E322E31680264000474696D65680662000007D3610C6112610B612E61206802640006736F757263656B00332F636C656172636173652F6F74702F657274732F6C69622F7374646C69622F7372632F6F74705F696E7465726E616C2E65726C6A
-=mod:user_default
-Current size: 1261
-Current attributes: 836C00000002680264000376736E6C000000016E1000505078ACD9B84D514FC6DA2BE249E6756A6802640006617574686F726C0000000164001765656973686E6E406565692E6572696373736F6E2E73656A6A
-Current compilation info: 836C0000000468026400076F7074696F6E736C0000000368026400036377646B00112F686F6D652F736972692F65726C616E6768026400066F75746469726B00112F686F6D652F736972692F65726C616E676400107761726E5F756E757365645F766172736A680264000776657273696F6E6B0005342E322E32680264000474696D65680662000007D461036116610D612C61126802640006736F757263656B00222F686F6D652F736972692F65726C616E672F757365725F64656661756C742E65726C6A
-=mod:tt
-Current size: 2959
-Current attributes: 836C00000002680264000376736E6C000000016E10001D71FD5A55D3BCBF06BFEDF2426C3C386A6802640006617574686F726C0000000164001765656973686E6E406565692E6572696373736F6E2E73656A6A
-Current compilation info: 836C0000000468026400076F7074696F6E736C0000000368026400036377646B00112F686F6D652F736972692F65726C616E6768026400066F75746469726B00112F686F6D652F736972692F65726C616E676400107761726E5F756E757365645F766172736A680264000776657273696F6E6B0005342E322E32680264000474696D65680662000007D461036116610D612B610C6802640006736F757263656B00182F686F6D652F736972692F65726C616E672F74742E65726C6A
-=mod:distel
-Current size: 18214
-Current attributes: 836C00000002680264000376736E6C000000016E1000CC9C9EF141459249C1CCA00993B2E29A6A6802640006617574686F726C000000016400116C756B6540626C75657461696C2E636F6D6A6A
-Current compilation info: 836C0000000368026400076F7074696F6E736C0000000664000276336400107761726E5F756E757365645F7661727364000A64656275675F696E666F68026400066F75746469726B00046562696E68026400036377646B001C2F6C6469736B2F736972692F746F6F6C732F64697374656C2D332E3164000A6578706F72745F616C6C6A680264000776657273696F6E6B0003342E31680264000474696D65680662000007D2610B6114610B610361336A
-=mod:crashdump_viewer
-Current size: 125756
-Current attributes: 836C00000001680264000376736E6C000000016E10002DC5D9D96190A2D5F27FAC3FA3D5C7956A6A
-Current compilation info: 836C0000000468026400076F7074696F6E736C0000000868026400036377646B00212F636C656172636173652F6F74702F746F6F6C732F6F627365727665722F73726368026400066F75746469726B00292F636C656172636173652F6F74702F746F6F6C732F6F627365727665722F7372632F2E2E2F6562696E6802640001696B002C2F636C656172636173652F6F74702F746F6F6C732F6F627365727665722F7372632F2E2E2F696E636C7564656802640001696B00322F636C656172636173652F6F74702F746F6F6C732F6F627365727665722F7372632F2E2E2F2E2E2F65742F696E636C7564656802640001696B003F2F636C656172636173652F6F74702F746F6F6C732F6F627365727665722F7372632F2E2E2F2E2E2F2E2E2F6C69627261726965732F65742F696E636C75646564000A64656275675F696E666F6400107761726E5F756E757365645F76617273680264000F70617273655F7472616E73666F726D64000C6D735F7472616E73666F726D6A680264000776657273696F6E6B0005342E322E32680264000474696D65680662000007D4610461146108611B61366802640006736F757263656B00362F636C656172636173652F6F74702F746F6F6C732F6F627365727665722F7372632F637261736864756D705F7669657765722E65726C6A
-=mod:webtool
-Current size: 29229
-Current attributes: 836C00000002680264000376736E6C000000016E10008AEEF06B60527A3390CBC2C98083CC0A6A68026400096265686176696F75726C0000000164000A67656E5F7365727665726A6A
-Current compilation info: 836C0000000468026400076F7074696F6E736C0000000568026400036377646B00202F636C656172636173652F6F74702F746F6F6C732F776562746F6F6C2F73726368026400066F75746469726B00282F636C656172636173652F6F74702F746F6F6C732F776562746F6F6C2F7372632F2E2E2F6562696E64000A64656275675F696E666F6400107761726E5F756E757365645F76617273680264000F70617273655F7472616E73666F726D64000C6D735F7472616E73666F726D6A680264000776657273696F6E6B0005342E322E32680264000474696D65680662000007D46104610661086106612D6802640006736F757263656B002C2F636C656172636173652F6F74702F746F6F6C732F776562746F6F6C2F7372632F776562746F6F6C2E65726C6A
-=mod:gen_tcp
-Current size: 3574
-Current attributes: 836C00000001680264000376736E6C000000016E1000C965E4EAFDAA94D7F21EDCBE30B21E7B6A6A
-Current compilation info: 836C0000000468026400076F7074696F6E736C0000000568026400036377646B00222F636C656172636173652F6F74702F657274732F6C69622F6B65726E656C2F73726368026400066F75746469726B002A2F636C656172636173652F6F74702F657274732F6C69622F6B65726E656C2F7372632F2E2E2F6562696E6802640001696B002D2F636C656172636173652F6F74702F657274732F6C69622F6B65726E656C2F7372632F2E2E2F696E636C75646564000A64656275675F696E666F6400107761726E5F756E757365645F766172736A680264000776657273696F6E6B0005342E322E31680264000474696D65680662000007D3610C6112610B613161316802640006736F757263656B002E2F636C656172636173652F6F74702F657274732F6C69622F6B65726E656C2F7372632F67656E5F7463702E65726C6A
-=mod:inet_tcp
-Current size: 2743
-Current attributes: 836C00000001680264000376736E6C000000016E1000C4AFE0B49768E4CF78B2C42EA1D3DB7F6A6A
-Current compilation info: 836C0000000468026400076F7074696F6E736C0000000568026400036377646B00222F636C656172636173652F6F74702F657274732F6C69622F6B65726E656C2F73726368026400066F75746469726B002A2F636C656172636173652F6F74702F657274732F6C69622F6B65726E656C2F7372632F2E2E2F6562696E6802640001696B002D2F636C656172636173652F6F74702F657274732F6C69622F6B65726E656C2F7372632F2E2E2F696E636C75646564000A64656275675F696E666F6400107761726E5F756E757365645F766172736A680264000776657273696F6E6B0005342E322E31680264000474696D65680662000007D3610C6112610B6132612B6802640006736F757263656B002F2F636C656172636173652F6F74702F657274732F6C69622F6B65726E656C2F7372632F696E65745F7463702E65726C6A
-=mod:inet_gethost_native
-Current size: 15611
-Current attributes: 836C00000002680264000376736E6C000000016E10005D8CD4277D0BD2425B9C26036AE314506A68026400096265686176696F75726C0000000164001173757065727669736F725F6272696467656A6A
-Current compilation info: 836C0000000468026400076F7074696F6E736C0000000568026400036377646B00222F636C656172636173652F6F74702F657274732F6C69622F6B65726E656C2F73726368026400066F75746469726B002A2F636C656172636173652F6F74702F657274732F6C69622F6B65726E656C2F7372632F2E2E2F6562696E6802640001696B002D2F636C656172636173652F6F74702F657274732F6C69622F6B65726E656C2F7372632F2E2E2F696E636C75646564000A64656275675F696E666F6400107761726E5F756E757365645F766172736A680264000776657273696F6E6B0005342E322E31680264000474696D65680662000007D3610C6112610B613261206802640006736F757263656B003A2F636C656172636173652F6F74702F657274732F6C69622F6B65726E656C2F7372632F696E65745F676574686F73745F6E61746976652E65726C6A
-=mod:filelib
-Current size: 7202
-Current attributes: 836C00000001680264000376736E6C000000016E10007B42AA23FF99DF2CD9D586635B77556A6A6A
-Current compilation info: 836C0000000468026400076F7074696F6E736C0000000768026400036377646B00222F636C656172636173652F6F74702F657274732F6C69622F7374646C69622F73726368026400066F75746469726B002A2F636C656172636173652F6F74702F657274732F6C69622F7374646C69622F7372632F2E2E2F6562696E6802640001696B002D2F636C656172636173652F6F74702F657274732F6C69622F7374646C69622F7372632F2E2E2F696E636C7564656802640001696B00372F636C656172636173652F6F74702F657274732F6C69622F7374646C69622F7372632F2E2E2F2E2E2F6B65726E656C2F696E636C7564656400107761726E5F756E757365645F7661727364000A64656275675F696E666F6400107761726E5F756E757365645F766172736A680264000776657273696F6E6B0005342E322E31680264000474696D65680662000007D3610C6112610B612D61266802640006736F757263656B002E2F636C656172636173652F6F74702F657274732F6C69622F7374646C69622F7372632F66696C656C69622E65726C6A
-=mod:httpd_util
-Current size: 24068
-Current attributes: 836C00000002680264000376736E6C000000016E10008D99E096221B88D542E52CB9C8377F6D6A68026400076170705F76736E6B000B696E6574732D332E302E376A
-Current compilation info: 836C0000000468026400076F7074696F6E736C0000000868036400016464001164656661756C745F766572626F7369747964000773696C656E636568036400016464000F5345525645525F534F4654574152456B000B696E6574732F332E302E3768026400036377646B00222F636C656172636173652F6F74702F6C69627261726965732F696E6574732F73726368026400066F75746469726B002A2F636C656172636173652F6F74702F6C69627261726965732F696E6574732F7372632F2E2E2F6562696E6804640009617474726962757465640006696E736572746400076170705F76736E6B000B696E6574732D332E302E37680264000F70617273655F7472616E73666F726D6400127379735F7072655F6174747269627574657364000A64656275675F696E666F6400107761726E5F756E757365645F766172736A680264000776657273696F6E6B0005342E322E32680264000474696D65680662000007D46104611561066128613B6802640006736F757263656B00312F636C656172636173652F6F74702F6C69627261726965732F696E6574732F7372632F68747470645F7574696C2E65726C6A
-=mod:webtool_sup
-Current size: 695
-Current attributes: 836C00000002680264000376736E6C000000016E1000FA5449E12816CF3AD0A3085BB26CDB9B6A68026400096265686176696F75726C0000000164000A73757065727669736F726A6A
-Current compilation info: 836C0000000468026400076F7074696F6E736C0000000468026400036377646B00202F636C656172636173652F6F74702F746F6F6C732F776562746F6F6C2F73726368026400066F75746469726B00282F636C656172636173652F6F74702F746F6F6C732F776562746F6F6C2F7372632F2E2E2F6562696E64000A64656275675F696E666F6400107761726E5F756E757365645F766172736A680264000776657273696F6E6B0005342E322E32680264000474696D65680662000007D4610461066108610761236802640006736F757263656B00302F636C656172636173652F6F74702F746F6F6C732F776562746F6F6C2F7372632F776562746F6F6C5F7375702E65726C6A
-=mod:httpd_conf
-Current size: 33659
-Current attributes: 836C00000002680264000376736E6C000000016E1000E3198FBDC73BC48CB7D0C1C762B8F1AB6A68026400076170705F76736E6B000B696E6574732D332E302E376A
-Current compilation info: 836C0000000468026400076F7074696F6E736C0000000868036400016464001164656661756C745F766572626F7369747964000773696C656E636568036400016464000F5345525645525F534F4654574152456B000B696E6574732F332E302E3768026400036377646B00222F636C656172636173652F6F74702F6C69627261726965732F696E6574732F73726368026400066F75746469726B002A2F636C656172636173652F6F74702F6C69627261726965732F696E6574732F7372632F2E2E2F6562696E6804640009617474726962757465640006696E736572746400076170705F76736E6B000B696E6574732D332E302E37680264000F70617273655F7472616E73666F726D6400127379735F7072655F6174747269627574657364000A64656275675F696E666F6400107761726E5F756E757365645F766172736A680264000776657273696F6E6B0005342E322E32680264000474696D65680662000007D4610461156106612861116802640006736F757263656B00312F636C656172636173652F6F74702F6C69627261726965732F696E6574732F7372632F68747470645F636F6E662E65726C6A
-=mod:regexp
-Current size: 13698
-Current attributes: 836C00000001680264000376736E6C000000016E10009DD44F3D02F8328BE3ABF4DDA89E0CAE6A6A
-Current compilation info: 836C0000000468026400076F7074696F6E736C0000000768026400036377646B00222F636C656172636173652F6F74702F657274732F6C69622F7374646C69622F73726368026400066F75746469726B002A2F636C656172636173652F6F74702F657274732F6C69622F7374646C69622F7372632F2E2E2F6562696E6802640001696B002D2F636C656172636173652F6F74702F657274732F6C69622F7374646C69622F7372632F2E2E2F696E636C7564656802640001696B00372F636C656172636173652F6F74702F657274732F6C69622F7374646C69622F7372632F2E2E2F2E2E2F6B65726E656C2F696E636C7564656400107761726E5F756E757365645F7661727364000A64656275675F696E666F6400107761726E5F756E757365645F766172736A680264000776657273696F6E6B0005342E322E31680264000474696D65680662000007D3610C6112610B612E61376802640006736F757263656B002D2F636C656172636173652F6F74702F657274732F6C69622F7374646C69622F7372632F7265676578702E65726C6A
-=mod:string
-Current size: 7740
-Current attributes: 836C00000002680264000376736E6C000000016E10005521DDF38903D46D7C53DB864266F7456A680264000A646570726563617465646C00000007680264000C72655F73685F746F5F61776B6101680264000872655F70617273656101680264000872655F6D617463686102680264000672655F7375626103680264000772655F677375626103680264000872655F73706C697461026802640005696E64657861026A6A
-Current compilation info: 836C0000000468026400076F7074696F6E736C0000000768026400036377646B00222F636C656172636173652F6F74702F657274732F6C69622F7374646C69622F73726368026400066F75746469726B002A2F636C656172636173652F6F74702F657274732F6C69622F7374646C69622F7372632F2E2E2F6562696E6802640001696B002D2F636C656172636173652F6F74702F657274732F6C69622F7374646C69622F7372632F2E2E2F696E636C7564656802640001696B00372F636C656172636173652F6F74702F657274732F6C69622F7374646C69622F7372632F2E2E2F2E2E2F6B65726E656C2F696E636C7564656400107761726E5F756E757365645F7661727364000A64656275675F696E666F6400107761726E5F756E757365645F766172736A680264000776657273696F6E6B0005342E322E31680264000474696D65680662000007D3610C6112610B612F610F6802640006736F757263656B002D2F636C656172636173652F6F74702F657274732F6C69622F7374646C69622F7372632F737472696E672E65726C6A
-=mod:httpd
-Current size: 7563
-Current attributes: 836C00000002680264000376736E6C000000016E1000BFD190D951EB3CAD2CC72ADEF20886906A68026400076170705F76736E6B000B696E6574732D332E302E376A
-Current compilation info: 836C0000000468026400076F7074696F6E736C0000000868036400016464001164656661756C745F766572626F7369747964000773696C656E636568036400016464000F5345525645525F534F4654574152456B000B696E6574732F332E302E3768026400036377646B00222F636C656172636173652F6F74702F6C69627261726965732F696E6574732F73726368026400066F75746469726B002A2F636C656172636173652F6F74702F6C69627261726965732F696E6574732F7372632F2E2E2F6562696E6804640009617474726962757465640006696E736572746400076170705F76736E6B000B696E6574732D332E302E37680264000F70617273655F7472616E73666F726D6400127379735F7072655F6174747269627574657364000A64656275675F696E666F6400107761726E5F756E757365645F766172736A680264000776657273696F6E6B0005342E322E32680264000474696D65680662000007D4610461156106612861036802640006736F757263656B002C2F636C656172636173652F6F74702F6C69627261726965732F696E6574732F7372632F68747470642E65726C6A
-=mod:httpd_sup
-Current size: 4068
-Current attributes: 836C00000003680264000376736E6C000000016E10007FA5C790118F18F3D20A2BFAF0229F0A6A68026400076170705F76736E6B000B696E6574732D332E302E3768026400096265686176696F75726C0000000164000A73757065727669736F726A6A
-Current compilation info: 836C0000000468026400076F7074696F6E736C0000000868036400016464001164656661756C745F766572626F7369747964000773696C656E636568036400016464000F5345525645525F534F4654574152456B000B696E6574732F332E302E3768026400036377646B00222F636C656172636173652F6F74702F6C69627261726965732F696E6574732F73726368026400066F75746469726B002A2F636C656172636173652F6F74702F6C69627261726965732F696E6574732F7372632F2E2E2F6562696E6804640009617474726962757465640006696E736572746400076170705F76736E6B000B696E6574732D332E302E37680264000F70617273655F7472616E73666F726D6400127379735F7072655F6174747269627574657364000A64656275675F696E666F6400107761726E5F756E757365645F766172736A680264000776657273696F6E6B0005342E322E32680264000474696D65680662000007D4610461156106612861366802640006736F757263656B00302F636C656172636173652F6F74702F6C69627261726965732F696E6574732F7372632F68747470645F7375702E65726C6A
-=mod:httpd_acceptor_sup
-Current size: 2161
-Current attributes: 836C00000003680264000376736E6C000000016E10003E6F9289B64C13F1EC8A1184BACF055F6A68026400076170705F76736E6B000B696E6574732D332E302E3768026400096265686176696F75726C0000000164000A73757065727669736F726A6A
-Current compilation info: 836C0000000468026400076F7074696F6E736C0000000868036400016464001164656661756C745F766572626F7369747964000773696C656E636568036400016464000F5345525645525F534F4654574152456B000B696E6574732F332E302E3768026400036377646B00222F636C656172636173652F6F74702F6C69627261726965732F696E6574732F73726368026400066F75746469726B002A2F636C656172636173652F6F74702F6C69627261726965732F696E6574732F7372632F2E2E2F6562696E6804640009617474726962757465640006696E736572746400076170705F76736E6B000B696E6574732D332E302E37680264000F70617273655F7472616E73666F726D6400127379735F7072655F6174747269627574657364000A64656275675F696E666F6400107761726E5F756E757365645F766172736A680264000776657273696F6E6B0005342E322E32680264000474696D65680662000007D46104611561066128610C6802640006736F757263656B00392F636C656172636173652F6F74702F6C69627261726965732F696E6574732F7372632F68747470645F6163636570746F725F7375702E65726C6A
-=mod:httpd_verbosity
-Current size: 2672
-Current attributes: 836C00000002680264000376736E6C000000016E100018B6F407D391872421748F87877DAAF36A68026400076170705F76736E6B000B696E6574732D332E302E376A
-Current compilation info: 836C0000000468026400076F7074696F6E736C0000000868036400016464001164656661756C745F766572626F7369747964000773696C656E636568036400016464000F5345525645525F534F4654574152456B000B696E6574732F332E302E3768026400036377646B00222F636C656172636173652F6F74702F6C69627261726965732F696E6574732F73726368026400066F75746469726B002A2F636C656172636173652F6F74702F6C69627261726965732F696E6574732F7372632F2E2E2F6562696E6804640009617474726962757465640006696E736572746400076170705F76736E6B000B696E6574732D332E302E37680264000F70617273655F7472616E73666F726D6400127379735F7072655F6174747269627574657364000A64656275675F696E666F6400107761726E5F756E757365645F766172736A680264000776657273696F6E6B0005342E322E32680264000474696D65680662000007D4610461156106612961036802640006736F757263656B00362F636C656172636173652F6F74702F6C69627261726965732F696E6574732F7372632F68747470645F766572626F736974792E65726C6A
-=mod:timer
-Current size: 8223
-Current attributes: 836C00000001680264000376736E6C000000016E10001D0D64DB1B923D1B3B9497655C43B4AD6A6A
-Current compilation info: 836C0000000468026400076F7074696F6E736C0000000768026400036377646B00222F636C656172636173652F6F74702F657274732F6C69622F7374646C69622F73726368026400066F75746469726B002A2F636C656172636173652F6F74702F657274732F6C69622F7374646C69622F7372632F2E2E2F6562696E6802640001696B002D2F636C656172636173652F6F74702F657274732F6C69622F7374646C69622F7372632F2E2E2F696E636C7564656802640001696B00372F636C656172636173652F6F74702F657274732F6C69622F7374646C69622F7372632F2E2E2F2E2E2F6B65726E656C2F696E636C7564656400107761726E5F756E757365645F7661727364000A64656275675F696E666F6400107761726E5F756E757365645F766172736A680264000776657273696F6E6B0005342E322E31680264000474696D65680662000007D3610C6112610B612F611A6802640006736F757263656B002C2F636C656172636173652F6F74702F657274732F6C69622F7374646C69622F7372632F74696D65722E65726C6A
-=mod:httpd_misc_sup
-Current size: 2066
-Current attributes: 836C00000003680264000376736E6C000000016E100092342F38AC16C074DDC21532FBFB52C26A68026400076170705F76736E6B000B696E6574732D332E302E3768026400096265686176696F75726C0000000164000A73757065727669736F726A6A
-Current compilation info: 836C0000000468026400076F7074696F6E736C0000000868036400016464001164656661756C745F766572626F7369747964000773696C656E636568036400016464000F5345525645525F534F4654574152456B000B696E6574732F332E302E3768026400036377646B00222F636C656172636173652F6F74702F6C69627261726965732F696E6574732F73726368026400066F75746469726B002A2F636C656172636173652F6F74702F6C69627261726965732F696E6574732F7372632F2E2E2F6562696E6804640009617474726962757465640006696E736572746400076170705F76736E6B000B696E6574732D332E302E37680264000F70617273655F7472616E73666F726D6400127379735F7072655F6174747269627574657364000A64656275675F696E666F6400107761726E5F756E757365645F766172736A680264000776657273696F6E6B0005342E322E32680264000474696D65680662000007D46104611561066128611F6802640006736F757263656B00352F636C656172636173652F6F74702F6C69627261726965732F696E6574732F7372632F68747470645F6D6973635F7375702E65726C6A
-=mod:httpd_manager
-Current size: 28916
-Current attributes: 836C00000003680264000376736E6C000000016E100013F7A1E6A4B6407A0A1892A794EE10A36A68026400076170705F76736E6B000B696E6574732D332E302E3768026400096265686176696F75726C0000000164000A67656E5F7365727665726A6A
-Current compilation info: 836C0000000468026400076F7074696F6E736C0000000868036400016464001164656661756C745F766572626F7369747964000773696C656E636568036400016464000F5345525645525F534F4654574152456B000B696E6574732F332E302E3768026400036377646B00222F636C656172636173652F6F74702F6C69627261726965732F696E6574732F73726368026400066F75746469726B002A2F636C656172636173652F6F74702F6C69627261726965732F696E6574732F7372632F2E2E2F6562696E6804640009617474726962757465640006696E736572746400076170705F76736E6B000B696E6574732D332E302E37680264000F70617273655F7472616E73666F726D6400127379735F7072655F6174747269627574657364000A64656275675F696E666F6400107761726E5F756E757365645F766172736A680264000776657273696F6E6B0005342E322E32680264000474696D65680662000007D46104611561066128611B6802640006736F757263656B00342F636C656172636173652F6F74702F6C69627261726965732F696E6574732F7372632F68747470645F6D616E616765722E65726C6A
-=mod:mod_alias
-Current size: 6720
-Current attributes: 836C00000002680264000376736E6C000000016E10002F35C36060B4AC45474440381D146AB96A68026400076170705F76736E6B000B696E6574732D332E302E376A
-Current compilation info: 836C0000000468026400076F7074696F6E736C0000000868036400016464001164656661756C745F766572626F7369747964000773696C656E636568036400016464000F5345525645525F534F4654574152456B000B696E6574732F332E302E3768026400036377646B00222F636C656172636173652F6F74702F6C69627261726965732F696E6574732F73726368026400066F75746469726B002A2F636C656172636173652F6F74702F6C69627261726965732F696E6574732F7372632F2E2E2F6562696E6804640009617474726962757465640006696E736572746400076170705F76736E6B000B696E6574732D332E302E37680264000F70617273655F7472616E73666F726D6400127379735F7072655F6174747269627574657364000A64656275675F696E666F6400107761726E5F756E757365645F766172736A680264000776657273696F6E6B0005342E322E32680264000474696D65680662000007D4610461156106612961106802640006736F757263656B00302F636C656172636173652F6F74702F6C69627261726965732F696E6574732F7372632F6D6F645F616C6961732E65726C6A
-=mod:mod_auth
-Current size: 25168
-Current attributes: 836C00000002680264000376736E6C000000016E100083F3CA0C7A3E7B5E19A635A7F916595D6A68026400076170705F76736E6B000B696E6574732D332E302E376A
-Current compilation info: 836C0000000468026400076F7074696F6E736C0000000868036400016464001164656661756C745F766572626F7369747964000773696C656E636568036400016464000F5345525645525F534F4654574152456B000B696E6574732F332E302E3768026400036377646B00222F636C656172636173652F6F74702F6C69627261726965732F696E6574732F73726368026400066F75746469726B002A2F636C656172636173652F6F74702F6C69627261726965732F696E6574732F7372632F2E2E2F6562696E6804640009617474726962757465640006696E736572746400076170705F76736E6B000B696E6574732D332E302E37680264000F70617273655F7472616E73666F726D6400127379735F7072655F6174747269627574657364000A64656275675F696E666F6400107761726E5F756E757365645F766172736A680264000776657273696F6E6B0005342E322E32680264000474696D65680662000007D4610461156106612961166802640006736F757263656B002F2F636C656172636173652F6F74702F6C69627261726965732F696E6574732F7372632F6D6F645F617574682E65726C6A
-=mod:mod_esi
-Current size: 22534
-Current attributes: 836C00000002680264000376736E6C000000016E1000513E3FF733E1E6592B86CB55B9C14E086A68026400076170705F76736E6B000B696E6574732D332E302E376A
-Current compilation info: 836C0000000468026400076F7074696F6E736C0000000868036400016464001164656661756C745F766572626F7369747964000773696C656E636568036400016464000F5345525645525F534F4654574152456B000B696E6574732F332E302E3768026400036377646B00222F636C656172636173652F6F74702F6C69627261726965732F696E6574732F73726368026400066F75746469726B002A2F636C656172636173652F6F74702F6C69627261726965732F696E6574732F7372632F2E2E2F6562696E6804640009617474726962757465640006696E736572746400076170705F76736E6B000B696E6574732D332E302E37680264000F70617273655F7472616E73666F726D6400127379735F7072655F6174747269627574657364000A64656275675F696E666F6400107761726E5F756E757365645F766172736A680264000776657273696F6E6B0005342E322E32680264000474696D65680662000007D4610461156106612A61026802640006736F757263656B002E2F636C656172636173652F6F74702F6C69627261726965732F696E6574732F7372632F6D6F645F6573692E65726C6A
-=mod:mod_actions
-Current size: 3625
-Current attributes: 836C00000002680264000376736E6C000000016E10008E5437921662830490CA76DFF88548966A68026400076170705F76736E6B000B696E6574732D332E302E376A
-Current compilation info: 836C0000000468026400076F7074696F6E736C0000000868036400016464001164656661756C745F766572626F7369747964000773696C656E636568036400016464000F5345525645525F534F4654574152456B000B696E6574732F332E302E3768026400036377646B00222F636C656172636173652F6F74702F6C69627261726965732F696E6574732F73726368026400066F75746469726B002A2F636C656172636173652F6F74702F6C69627261726965732F696E6574732F7372632F2E2E2F6562696E6804640009617474726962757465640006696E736572746400076170705F76736E6B000B696E6574732D332E302E37680264000F70617273655F7472616E73666F726D6400127379735F7072655F6174747269627574657364000A64656275675F696E666F6400107761726E5F756E757365645F766172736A680264000776657273696F6E6B0005342E322E32680264000474696D65680662000007D46104611561066129610C6802640006736F757263656B00322F636C656172636173652F6F74702F6C69627261726965732F696E6574732F7372632F6D6F645F616374696F6E732E65726C6A
-=mod:mod_cgi
-Current size: 25891
-Current attributes: 836C00000002680264000376736E6C000000016E1000F91D405488188F1BD25110B4ED9EE8786A68026400076170705F76736E6B000B696E6574732D332E302E376A
-Current compilation info: 836C0000000468026400076F7074696F6E736C0000000868036400016464001164656661756C745F766572626F7369747964000773696C656E636568036400016464000F5345525645525F534F4654574152456B000B696E6574732F332E302E3768026400036377646B00222F636C656172636173652F6F74702F6C69627261726965732F696E6574732F73726368026400066F75746469726B002A2F636C656172636173652F6F74702F6C69627261726965732F696E6574732F7372632F2E2E2F6562696E6804640009617474726962757465640006696E736572746400076170705F76736E6B000B696E6574732D332E302E37680264000F70617273655F7472616E73666F726D6400127379735F7072655F6174747269627574657364000A64656275675F696E666F6400107761726E5F756E757365645F766172736A680264000776657273696F6E6B0005342E322E32680264000474696D65680662000007D4610461156106612961306802640006736F757263656B002E2F636C656172636173652F6F74702F6C69627261726965732F696E6574732F7372632F6D6F645F6367692E65726C6A
-=mod:mod_include
-Current size: 34923
-Current attributes: 836C00000002680264000376736E6C000000016E1000B9CCE88D63DD6AC49D5DF533C46B97D56A68026400076170705F76736E6B000B696E6574732D332E302E376A
-Current compilation info: 836C0000000468026400076F7074696F6E736C0000000868036400016464001164656661756C745F766572626F7369747964000773696C656E636568036400016464000F5345525645525F534F4654574152456B000B696E6574732F332E302E3768026400036377646B00222F636C656172636173652F6F74702F6C69627261726965732F696E6574732F73726368026400066F75746469726B002A2F636C656172636173652F6F74702F6C69627261726965732F696E6574732F7372632F2E2E2F6562696E6804640009617474726962757465640006696E736572746400076170705F76736E6B000B696E6574732D332E302E37680264000F70617273655F7472616E73666F726D6400127379735F7072655F6174747269627574657364000A64656275675F696E666F6400107761726E5F756E757365645F766172736A680264000776657273696F6E6B0005342E322E32680264000474696D65680662000007D4610461156106612A61176802640006736F757263656B00322F636C656172636173652F6F74702F6C69627261726965732F696E6574732F7372632F6D6F645F696E636C7564652E65726C6A
-=mod:mod_dir
-Current size: 13488
-Current attributes: 836C00000002680264000376736E6C000000016E1000EF620CB4B5DE5586ED681347496DA1C86A68026400076170705F76736E6B000B696E6574732D332E302E376A
-Current compilation info: 836C0000000468026400076F7074696F6E736C0000000868036400016464001164656661756C745F766572626F7369747964000773696C656E636568036400016464000F5345525645525F534F4654574152456B000B696E6574732F332E302E3768026400036377646B00222F636C656172636173652F6F74702F6C69627261726965732F696E6574732F73726368026400066F75746469726B002A2F636C656172636173652F6F74702F6C69627261726965732F696E6574732F7372632F2E2E2F6562696E6804640009617474726962757465640006696E736572746400076170705F76736E6B000B696E6574732D332E302E37680264000F70617273655F7472616E73666F726D6400127379735F7072655F6174747269627574657364000A64656275675F696E666F6400107761726E5F756E757365645F766172736A680264000776657273696F6E6B0005342E322E32680264000474696D65680662000007D4610461156106612961356802640006736F757263656B002E2F636C656172636173652F6F74702F6C69627261726965732F696E6574732F7372632F6D6F645F6469722E65726C6A
-=mod:mod_get
-Current size: 4672
-Current attributes: 836C00000002680264000376736E6C000000016E1000AD2730B6BE6AF875A500AF4857C4D7F86A68026400076170705F76736E6B000B696E6574732D332E302E376A
-Current compilation info: 836C0000000468026400076F7074696F6E736C0000000868036400016464001164656661756C745F766572626F7369747964000773696C656E636568036400016464000F5345525645525F534F4654574152456B000B696E6574732F332E302E3768026400036377646B00222F636C656172636173652F6F74702F6C69627261726965732F696E6574732F73726368026400066F75746469726B002A2F636C656172636173652F6F74702F6C69627261726965732F696E6574732F7372632F2E2E2F6562696E6804640009617474726962757465640006696E736572746400076170705F76736E6B000B696E6574732D332E302E37680264000F70617273655F7472616E73666F726D6400127379735F7072655F6174747269627574657364000A64656275675F696E666F6400107761726E5F756E757365645F766172736A680264000776657273696F6E6B0005342E322E32680264000474696D65680662000007D4610461156106612A61076802640006736F757263656B002E2F636C656172636173652F6F74702F6C69627261726965732F696E6574732F7372632F6D6F645F6765742E65726C6A
-=mod:mod_head
-Current size: 3074
-Current attributes: 836C00000002680264000376736E6C000000016E1000CAF803B9FA6A28D4153BC109B00D7DF96A68026400076170705F76736E6B000B696E6574732D332E302E376A
-Current compilation info: 836C0000000468026400076F7074696F6E736C0000000868036400016464001164656661756C745F766572626F7369747964000773696C656E636568036400016464000F5345525645525F534F4654574152456B000B696E6574732F332E302E3768026400036377646B00222F636C656172636173652F6F74702F6C69627261726965732F696E6574732F73726368026400066F75746469726B002A2F636C656172636173652F6F74702F6C69627261726965732F696E6574732F7372632F2E2E2F6562696E6804640009617474726962757465640006696E736572746400076170705F76736E6B000B696E6574732D332E302E37680264000F70617273655F7472616E73666F726D6400127379735F7072655F6174747269627574657364000A64656275675F696E666F6400107761726E5F756E757365645F766172736A680264000776657273696F6E6B0005342E322E32680264000474696D65680662000007D4610461156106612A610B6802640006736F757263656B002F2F636C656172636173652F6F74702F6C69627261726965732F696E6574732F7372632F6D6F645F686561642E65726C6A
-=mod:mod_log
-Current size: 8546
-Current attributes: 836C00000002680264000376736E6C000000016E1000F9664B54861260DEA081249379219AF86A68026400076170705F76736E6B000B696E6574732D332E302E376A
-Current compilation info: 836C0000000468026400076F7074696F6E736C0000000868036400016464001164656661756C745F766572626F7369747964000773696C656E636568036400016464000F5345525645525F534F4654574152456B000B696E6574732F332E302E3768026400036377646B00222F636C656172636173652F6F74702F6C69627261726965732F696E6574732F73726368026400066F75746469726B002A2F636C656172636173652F6F74702F6C69627261726965732F696E6574732F7372632F2E2E2F6562696E6804640009617474726962757465640006696E736572746400076170705F76736E6B000B696E6574732D332E302E37680264000F70617273655F7472616E73666F726D6400127379735F7072655F6174747269627574657364000A64656275675F696E666F6400107761726E5F756E757365645F766172736A680264000776657273696F6E6B0005342E322E32680264000474696D65680662000007D4610461156106612A611B6802640006736F757263656B002E2F636C656172636173652F6F74702F6C69627261726965732F696E6574732F7372632F6D6F645F6C6F672E65726C6A
-=mod:mod_disk_log
-Current size: 15160
-Current attributes: 836C00000002680264000376736E6C000000016E1000DDA1E88A9C423A2866B56425DF36F5C66A68026400076170705F76736E6B000B696E6574732D332E302E376A
-Current compilation info: 836C0000000468026400076F7074696F6E736C0000000868036400016464001164656661756C745F766572626F7369747964000773696C656E636568036400016464000F5345525645525F534F4654574152456B000B696E6574732F332E302E3768026400036377646B00222F636C656172636173652F6F74702F6C69627261726965732F696E6574732F73726368026400066F75746469726B002A2F636C656172636173652F6F74702F6C69627261726965732F696E6574732F7372632F2E2E2F6562696E6804640009617474726962757465640006696E736572746400076170705F76736E6B000B696E6574732D332E302E37680264000F70617273655F7472616E73666F726D6400127379735F7072655F6174747269627574657364000A64656275675F696E666F6400107761726E5F756E757365645F766172736A680264000776657273696F6E6B0005342E322E32680264000474696D65680662000007D4610461156106612961396802640006736F757263656B00332F636C656172636173652F6F74702F6C69627261726965732F696E6574732F7372632F6D6F645F6469736B5F6C6F672E65726C6A
-=mod:httpd_socket
-Current size: 7426
-Current attributes: 836C00000002680264000376736E6C000000016E1000B831219096661E4D2E200A07C4A9A7776A68026400076170705F76736E6B000B696E6574732D332E302E376A
-Current compilation info: 836C0000000468026400076F7074696F6E736C0000000868036400016464001164656661756C745F766572626F7369747964000773696C656E636568036400016464000F5345525645525F534F4654574152456B000B696E6574732F332E302E3768026400036377646B00222F636C656172636173652F6F74702F6C69627261726965732F696E6574732F73726368026400066F75746469726B002A2F636C656172636173652F6F74702F6C69627261726965732F696E6574732F7372632F2E2E2F6562696E6804640009617474726962757465640006696E736572746400076170705F76736E6B000B696E6574732D332E302E37680264000F70617273655F7472616E73666F726D6400127379735F7072655F6174747269627574657364000A64656275675F696E666F6400107761726E5F756E757365645F766172736A680264000776657273696F6E6B0005342E322E32680264000474696D65680662000007D4610461156106612861326802640006736F757263656B00332F636C656172636173652F6F74702F6C69627261726965732F696E6574732F7372632F68747470645F736F636B65742E65726C6A
-=mod:httpd_acceptor
-Current size: 4472
-Current attributes: 836C00000002680264000376736E6C000000016E1000A501686DF4E4053E7D978E0CA162BEC56A68026400076170705F76736E6B000B696E6574732D332E302E376A
-Current compilation info: 836C0000000468026400076F7074696F6E736C0000000868036400016464001164656661756C745F766572626F7369747964000773696C656E636568036400016464000F5345525645525F534F4654574152456B000B696E6574732F332E302E3768026400036377646B00222F636C656172636173652F6F74702F6C69627261726965732F696E6574732F73726368026400066F75746469726B002A2F636C656172636173652F6F74702F6C69627261726965732F696E6574732F7372632F2E2E2F6562696E6804640009617474726962757465640006696E736572746400076170705F76736E6B000B696E6574732D332E302E37680264000F70617273655F7472616E73666F726D6400127379735F7072655F6174747269627574657364000A64656275675F696E666F6400107761726E5F756E757365645F766172736A680264000776657273696F6E6B0005342E322E32680264000474696D65680662000007D4610461156106612861076802640006736F757263656B00352F636C656172636173652F6F74702F6C69627261726965732F696E6574732F7372632F68747470645F6163636570746F722E65726C6A
-=mod:io_lib_pretty
-Current size: 8171
-Current attributes: 836C00000001680264000376736E6C000000016E1000CD397E11D2D380D02A4BC6EE309B98CB6A6A
-Current compilation info: 836C0000000468026400076F7074696F6E736C0000000768026400036377646B00222F636C656172636173652F6F74702F657274732F6C69622F7374646C69622F73726368026400066F75746469726B002A2F636C656172636173652F6F74702F657274732F6C69622F7374646C69622F7372632F2E2E2F6562696E6802640001696B002D2F636C656172636173652F6F74702F657274732F6C69622F7374646C69622F7372632F2E2E2F696E636C7564656802640001696B00372F636C656172636173652F6F74702F657274732F6C69622F7374646C69622F7372632F2E2E2F2E2E2F6B65726E656C2F696E636C7564656400107761726E5F756E757365645F7661727364000A64656275675F696E666F6400107761726E5F756E757365645F766172736A680264000776657273696F6E6B0005342E322E31680264000474696D65680662000007D3610C6112610B612E610C6802640006736F757263656B00342F636C656172636173652F6F74702F657274732F6C69622F7374646C69622F7372632F696F5F6C69625F7072657474792E65726C6A
-=mod:httpd_request_handler
-Current size: 26393
-Current attributes: 836C00000002680264000376736E6C000000016E100021C280A5EB5B9CCD00A2C418A341202A6A68026400076170705F76736E6B000B696E6574732D332E302E376A
-Current compilation info: 836C0000000468026400076F7074696F6E736C0000000868036400016464001164656661756C745F766572626F7369747964000773696C656E636568036400016464000F5345525645525F534F4654574152456B000B696E6574732F332E302E3768026400036377646B00222F636C656172636173652F6F74702F6C69627261726965732F696E6574732F73726368026400066F75746469726B002A2F636C656172636173652F6F74702F6C69627261726965732F696E6574732F7372632F2E2E2F6562696E6804640009617474726962757465640006696E736572746400076170705F76736E6B000B696E6574732D332E302E37680264000F70617273655F7472616E73666F726D6400127379735F7072655F6174747269627574657364000A64656275675F696E666F6400107761726E5F756E757365645F766172736A680264000776657273696F6E6B0005342E322E32680264000474696D65680662000007D4610461156106612861296802640006736F757263656B003C2F636C656172636173652F6F74702F6C69627261726965732F696E6574732F7372632F68747470645F726571756573745F68616E646C65722E65726C6A
-=mod:calendar
-Current size: 7158
-Current attributes: 836C00000002680264000376736E6C000000016E10008C44498546709037F8D72DA4AF8B7FB76A680264000A646570726563617465646C00000001680264001C6C6F63616C5F74696D655F746F5F756E6976657273616C5F74696D6561016A6A
-Current compilation info: 836C0000000468026400076F7074696F6E736C0000000768026400036377646B00222F636C656172636173652F6F74702F657274732F6C69622F7374646C69622F73726368026400066F75746469726B002A2F636C656172636173652F6F74702F657274732F6C69622F7374646C69622F7372632F2E2E2F6562696E6802640001696B002D2F636C656172636173652F6F74702F657274732F6C69622F7374646C69622F7372632F2E2E2F696E636C7564656802640001696B00372F636C656172636173652F6F74702F657274732F6C69622F7374646C69622F7372632F2E2E2F2E2E2F6B65726E656C2F696E636C7564656400107761726E5F756E757365645F7661727364000A64656275675F696E666F6400107761726E5F756E757365645F766172736A680264000776657273696F6E6B0005342E322E31680264000474696D65680662000007D3610C6112610B612B61166802640006736F757263656B002F2F636C656172636173652F6F74702F657274732F6C69622F7374646C69622F7372632F63616C656E6461722E65726C6A
-=mod:httpd_parse
-Current size: 9977
-Current attributes: 836C00000002680264000376736E6C000000016E1000174653BAA652261FEB44FFDED99E50B76A68026400076170705F76736E6B000B696E6574732D332E302E376A
-Current compilation info: 836C0000000468026400076F7074696F6E736C0000000868036400016464001164656661756C745F766572626F7369747964000773696C656E636568036400016464000F5345525645525F534F4654574152456B000B696E6574732F332E302E3768026400036377646B00222F636C656172636173652F6F74702F6C69627261726965732F696E6574732F73726368026400066F75746469726B002A2F636C656172636173652F6F74702F6C69627261726965732F696E6574732F7372632F2E2E2F6562696E6804640009617474726962757465640006696E736572746400076170705F76736E6B000B696E6574732D332E302E37680264000F70617273655F7472616E73666F726D6400127379735F7072655F6174747269627574657364000A64656275675F696E666F6400107761726E5F756E757365645F766172736A680264000776657273696F6E6B0005342E322E32680264000474696D65680662000007D4610461156106612861246802640006736F757263656B00322F636C656172636173652F6F74702F6C69627261726965732F696E6574732F7372632F68747470645F70617273652E65726C6A
-=mod:httpd_response
-Current size: 13535
-Current attributes: 836C00000002680264000376736E6C000000016E1000785B247D894BA08A40D814EF11F848976A68026400076170705F76736E6B000B696E6574732D332E302E376A
-Current compilation info: 836C0000000468026400076F7074696F6E736C0000000868036400016464001164656661756C745F766572626F7369747964000773696C656E636568036400016464000F5345525645525F534F4654574152456B000B696E6574732F332E302E3768026400036377646B00222F636C656172636173652F6F74702F6C69627261726965732F696E6574732F73726368026400066F75746469726B002A2F636C656172636173652F6F74702F6C69627261726965732F696E6574732F7372632F2E2E2F6562696E6804640009617474726962757465640006696E736572746400076170705F76736E6B000B696E6574732D332E302E37680264000F70617273655F7472616E73666F726D6400127379735F7072655F6174747269627574657364000A64656275675F696E666F6400107761726E5F756E757365645F766172736A680264000776657273696F6E6B0005342E322E32680264000474696D65680662000007D46104611561066128612D6802640006736F757263656B00352F636C656172636173652F6F74702F6C69627261726965732F696E6574732F7372632F68747470645F726573706F6E73652E65726C6A
-=mod:crashdump_viewer_html
-Current size: 68343
-Current attributes: 836C00000001680264000376736E6C000000016E1000AE414770FDB0806C5583FF8D6D71DC766A6A
-Current compilation info: 836C0000000468026400076F7074696F6E736C0000000768026400036377646B00212F636C656172636173652F6F74702F746F6F6C732F6F627365727665722F73726368026400066F75746469726B00292F636C656172636173652F6F74702F746F6F6C732F6F627365727665722F7372632F2E2E2F6562696E6802640001696B002C2F636C656172636173652F6F74702F746F6F6C732F6F627365727665722F7372632F2E2E2F696E636C7564656802640001696B00322F636C656172636173652F6F74702F746F6F6C732F6F627365727665722F7372632F2E2E2F2E2E2F65742F696E636C7564656802640001696B003F2F636C656172636173652F6F74702F746F6F6C732F6F627365727665722F7372632F2E2E2F2E2E2F2E2E2F6C69627261726965732F65742F696E636C75646564000A64656275675F696E666F6400107761726E5F756E757365645F766172736A680264000776657273696F6E6B0005342E322E32680264000474696D65680662000007D4610461146108611C61026802640006736F757263656B003B2F636C656172636173652F6F74702F746F6F6C732F6F627365727665722F7372632F637261736864756D705F7669657765725F68746D6C2E65726C6A
-=mod:crashdump_translate
-Current size: 89840
-Current attributes: 836C00000001680264000376736E6C000000016E100038F332287181E933A76CEF4799BDB6416A6A
-Current compilation info: 836C0000000468026400076F7074696F6E736C0000000668026400036377646B00212F636C656172636173652F6F74702F746F6F6C732F6F627365727665722F73726368026400066F75746469726B00292F636C656172636173652F6F74702F746F6F6C732F6F627365727665722F7372632F2E2E2F6562696E6802640001696B002C2F636C656172636173652F6F74702F746F6F6C732F6F627365727665722F7372632F2E2E2F696E636C7564656802640001696B00322F636C656172636173652F6F74702F746F6F6C732F6F627365727665722F7372632F2E2E2F2E2E2F65742F696E636C7564656802640001696B003F2F636C656172636173652F6F74702F746F6F6C732F6F627365727665722F7372632F2E2E2F2E2E2F2E2E2F6C69627261726965732F65742F696E636C75646564000A64656275675F696E666F6A680264000776657273696F6E6B0005342E322E32680264000474696D65680662000007D461046115610B611661106802640006736F757263656B00392F636C656172636173652F6F74702F746F6F6C732F6F627365727665722F7372632F637261736864756D705F7472616E736C6174652E65726C6A
-=fun
-Module: crashdump_viewer_html
-Uniq: 9122590
-Index: 0
-Address: 526308
-Native_address: bcefc
-Refc: 1
-=fun
-Module: global
-Uniq: 77168418
-Index: 14
-Address: 26541c
-Native_address: bcf04
-Refc: 1
-=fun
-Module: inet_parse
-Uniq: 88083515
-Index: 9
-Address: 284c30
-Native_address: bcefc
-Refc: 1
-=fun
-Module: inet_db
-Uniq: 36747896
-Index: 4
-Address: 26df84
-Native_address: bcefc
-Refc: 1
-=fun
-Module: global
-Uniq: 80395734
-Index: 8
-Address: 265838
-Native_address: bcef4
-Refc: 1
-=fun
-Module: erl_eval
-Uniq: 103184573
-Index: 5
-Address: 2fa59c
-Native_address: bce80
-Refc: 1
-=fun
-Module: erl_lint
-Uniq: 88265811
-Index: 24
-Address: 34f6a0
-Native_address: bcefc
-Refc: 1
-=fun
-Module: global_group
-Uniq: 9644262
-Index: 2
-Address: 292cec
-Native_address: bcef4
-Refc: 1
-=fun
-Module: net_kernel
-Uniq: 100885585
-Index: 0
-Address: 29eb2c
-Native_address: bcefc
-Refc: 1
-=fun
-Module: inet_db
-Uniq: 128335479
-Index: 6
-Address: 26de84
-Native_address: bcef4
-Refc: 1
-=fun
-Module: erl_prim_loader
-Uniq: 42988083
-Index: 1
-Address: 210c14
-Native_address: bcf04
-Refc: 1
-=fun
-Module: dict
-Uniq: 7105125
-Index: 7
-Address: 354f84
-Native_address: bcefc
-Refc: 1
-=fun
-Module: application_controller
-Uniq: 29030584
-Index: 8
-Address: 234978
-Native_address: bcefc
-Refc: 1
-=fun
-Module: inet_parse
-Uniq: 29214351
-Index: 2
-Address: 285660
-Native_address: bcefc
-Refc: 1
-=fun
-Module: inet_config
-Uniq: 5158633
-Index: 4
-Address: 274034
-Native_address: bcefc
-Refc: 1
-=fun
-Module: erl_lint
-Uniq: 74624950
-Index: 25
-Address: 34f63c
-Native_address: bcefc
-Refc: 1
-=fun
-Module: code_server
-Uniq: 6477018
-Index: 3
-Address: 2adb6c
-Native_address: bcefc
-Refc: 1
-=fun
-Module: c
-Uniq: 117885138
-Index: 7
-Address: 2ffff8
-Native_address: bcefc
-Refc: 1
-=fun
-Module: dict
-Uniq: 47566924
-Index: 6
-Address: 354fb8
-Native_address: bcefc
-Refc: 1
-=fun
-Module: erl_scan
-Uniq: 114637756
-Index: 12
-Address: 313c60
-Native_address: bced4
-Refc: 1
-=fun
-Module: erl_scan
-Uniq: 121316204
-Index: 31
-Address: 313a68
-Native_address: bced4
-Refc: 1
-=fun
-Module: code_server
-Uniq: 61363639
-Index: 12
-Address: 2ad6a4
-Native_address: bcefc
-Refc: 1
-=fun
-Module: inet_config
-Uniq: 116208699
-Index: 3
-Address: 274094
-Native_address: bcefc
-Refc: 1
-=fun
-Module: global_group
-Uniq: 113750737
-Index: 0
-Address: 292d54
-Native_address: bcefc
-Refc: 1
-=fun
-Module: gen_event
-Uniq: 12853672
-Index: 0
-Address: 222e74
-Native_address: bcefc
-Refc: 1
-=fun
-Module: webtool
-Uniq: 108046357
-Index: 12
-Address: 4ab0b0
-Native_address: bcefc
-Refc: 1
-=fun
-Module: erl_lint
-Uniq: 111569299
-Index: 47
-Address: 34e80c
-Native_address: bcef4
-Refc: 1
-=fun
-Module: erl_eval
-Uniq: 20108653
-Index: 15
-Address: 2f9f94
-Native_address: bcea4
-Refc: 1
-=fun
-Module: erl_scan
-Uniq: 45252965
-Index: 15
-Address: 313c0c
-Native_address: bced4
-Refc: 1
-=fun
-Module: webtool
-Uniq: 12437425
-Index: 9
-Address: 4ab3e0
-Native_address: bcefc
-Refc: 1
-=fun
-Module: erl_lint
-Uniq: 30942993
-Index: 22
-Address: 34f6ec
-Native_address: bcef4
-Refc: 1
-=fun
-Module: erl_parse
-Uniq: 93430337
-Index: 3
-Address: 33b100
-Native_address: bcefc
-Refc: 1
-=fun
-Module: erl_parse
-Uniq: 6604883
-Index: 2
-Address: 33b16c
-Native_address: bcefc
-Refc: 1
-=fun
-Module: rpc
-Uniq: 36867745
-Index: 5
-Address: 255e28
-Native_address: bcefc
-Refc: 1
-=fun
-Module: inet_parse
-Uniq: 90563105
-Index: 1
-Address: 285708
-Native_address: bcefc
-Refc: 1
-=fun
-Module: inet_db
-Uniq: 18519297
-Index: 7
-Address: 26ddfc
-Native_address: bcef4
-Refc: 1
-=fun
-Module: crashdump_viewer
-Uniq: 8058975
-Index: 16
-Address: 4a36b4
-Native_address: bcefc
-Refc: 1
-=fun
-Module: inet
-Uniq: 30694569
-Index: 7
-Address: 27d018
-Native_address: bcefc
-Refc: 1
-=fun
-Module: inet_config
-Uniq: 76933943
-Index: 0
-Address: 2741b4
-Native_address: bcefc
-Refc: 1
-=fun
-Module: crashdump_viewer
-Uniq: 9033258
-Index: 6
-Address: 4a4690
-Native_address: bcefc
-Refc: 1
-=fun
-Module: crashdump_viewer
-Uniq: 74851752
-Index: 5
-Address: 4a4798
-Native_address: bcef4
-Refc: 1
-=fun
-Module: global
-Uniq: 50855382
-Index: 4
-Address: 2659a8
-Native_address: bcefc
-Refc: 1
-=fun
-Module: erl_lint
-Uniq: 39211582
-Index: 52
-Address: 34e504
-Native_address: bceec
-Refc: 1
-=fun
-Module: file_server
-Uniq: 77665472
-Index: 0
-Address: 2a0dec
-Native_address: bcf04
-Refc: 1
-=fun
-Module: erl_eval
-Uniq: 57487277
-Index: 8
-Address: 2fa3c4
-Native_address: bce94
-Refc: 1
-=fun
-Module: webtool
-Uniq: 87386575
-Index: 11
-Address: 4ab1c8
-Native_address: bcefc
-Refc: 1
-=fun
-Module: crashdump_viewer
-Uniq: 58991950
-Index: 8
-Address: 4a4338
-Native_address: bcefc
-Refc: 1
-=fun
-Module: crashdump_viewer
-Uniq: 118859163
-Index: 17
-Address: 4a34d4
-Native_address: bcefc
-Refc: 1
-=fun
-Module: dict
-Uniq: 38265609
-Index: 12
-Address: 354dec
-Native_address: bcefc
-Refc: 1
-=fun
-Module: supervisor
-Uniq: 56903339
-Index: 1
-Address: 2527c4
-Native_address: bcefc
-Refc: 1
-=fun
-Module: inet_hosts
-Uniq: 129504763
-Index: 0
-Address: 28aae8
-Native_address: bcefc
-Refc: 1
-=fun
-Module: dict
-Uniq: 44817307
-Index: 10
-Address: 354e3c
-Native_address: bceec
-Refc: 1
-=fun
-Module: erl_lint
-Uniq: 52856894
-Index: 41
-Address: 34eb70
-Native_address: bcef4
-Refc: 1
-=fun
-Module: erl_lint
-Uniq: 22623360
-Index: 23
-Address: 34f5d4
-Native_address: bceec
-Refc: 1
-=fun
-Module: orddict
-Uniq: 34963136
-Index: 0
-Address: 2fbbbc
-Native_address: bcef4
-Refc: 1
-=fun
-Module: erlang
-Uniq: 24496633
-Index: 0
-Address: 213744
-Native_address: bcef4
-Refc: 1
-=fun
-Module: erl_eval
-Uniq: 99313855
-Index: 27
-Address: 2f9914
-Native_address: bcef4
-Refc: 1
-=fun
-Module: httpd_util
-Uniq: 99137703
-Index: 3
-Address: 4b5dfc
-Native_address: bcefc
-Refc: 1
-=fun
-Module: gen_event
-Uniq: 124043500
-Index: 3
-Address: 222b84
-Native_address: bcefc
-Refc: 1
-=fun
-Module: erl_scan
-Uniq: 102650878
-Index: 22
-Address: 313b48
-Native_address: bced4
-Refc: 1
-=fun
-Module: erl_lint
-Uniq: 13333720
-Index: 12
-Address: 34fb2c
-Native_address: bcef4
-Refc: 1
-=fun
-Module: global_group
-Uniq: 133457
-Index: 5
-Address: 292a80
-Native_address: bcefc
-Refc: 1
-=fun
-Module: net_kernel
-Uniq: 64640983
-Index: 4
-Address: 29e944
-Native_address: bcefc
-Refc: 1
-=fun
-Module: rpc
-Uniq: 7580218
-Index: 2
-Address: 255f08
-Native_address: bcf04
-Refc: 1
-=fun
-Module: erl_lint
-Uniq: 131850870
-Index: 59
-Address: 34e6b8
-Native_address: bcef4
-Refc: 1
-=fun
-Module: inet_parse
-Uniq: 56617403
-Index: 10
-Address: 284b40
-Native_address: bcefc
-Refc: 1
-=fun
-Module: webtool
-Uniq: 108680306
-Index: 4
-Address: 4ab5e0
-Native_address: bcefc
-Refc: 1
-=fun
-Module: inet_db
-Uniq: 90880071
-Index: 2
-Address: 26e150
-Native_address: bcefc
-Refc: 1
-=fun
-Module: file_io_server
-Uniq: 23980778
-Index: 0
-Address: 30ac30
-Native_address: bcf04
-Refc: 1
-=fun
-Module: erl_eval
-Uniq: 12006418
-Index: 19
-Address: 2f9d54
-Native_address: bce80
-Refc: 1
-=fun
-Module: crashdump_viewer_html
-Uniq: 81701030
-Index: 8
-Address: 526228
-Native_address: bcefc
-Refc: 1
-=fun
-Module: crashdump_viewer
-Uniq: 71013875
-Index: 1
-Address: 4a4ddc
-Native_address: bcf04
-Refc: 1
-=fun
-Module: distel
-Uniq: 87740845
-Index: 2
-Address: 35c0e0
-Native_address: bcf04
-Refc: 1
-=fun
-Module: erl_eval
-Uniq: 90782401
-Index: 17
-Address: 2f9e8c
-Native_address: bced4
-Refc: 1
-=fun
-Module: shell
-Uniq: 133882676
-Index: 6
-Address: 2e52ac
-Native_address: bcef4
-Refc: 1
-=fun
-Module: inet_parse
-Uniq: 105698088
-Index: 3
-Address: 2855b4
-Native_address: bcefc
-Refc: 1
-=fun
-Module: inet
-Uniq: 58370899
-Index: 0
-Address: 27d370
-Native_address: bcefc
-Refc: 1
-=fun
-Module: erl_eval
-Uniq: 15274536
-Index: 25
-Address: 2f9a94
-Native_address: bcef4
-Refc: 1
-=fun
-Module: supervisor
-Uniq: 94349557
-Index: 0
-Address: 252844
-Native_address: bcefc
-Refc: 1
-=fun
-Module: erl_parse
-Uniq: 33328185
-Index: 1
-Address: 33b1d8
-Native_address: bcef4
-Refc: 1
-=fun
-Module: erl_scan
-Uniq: 86971387
-Index: 16
-Address: 313db0
-Native_address: bced4
-Refc: 1
-=fun
-Module: erl_lint
-Uniq: 53364473
-Index: 38
-Address: 34ee84
-Native_address: bcefc
-Refc: 1
-=fun
-Module: webtool
-Uniq: 128145687
-Index: 0
-Address: 4ab944
-Native_address: bcee4
-Refc: 1
-=fun
-Module: c
-Uniq: 98651404
-Index: 10
-Address: 2fff20
-Native_address: bcefc
-Refc: 1
-=fun
-Module: erl_scan
-Uniq: 78224618
-Index: 0
-Address: 313dcc
-Native_address: bced4
-Refc: 1
-=fun
-Module: shell
-Uniq: 40779085
-Index: 11
-Address: 2e50c8
-Native_address: bcef4
-Refc: 1
-=fun
-Module: c
-Uniq: 93517350
-Index: 4
-Address: 300090
-Native_address: bcefc
-Refc: 1
-=fun
-Module: application_controller
-Uniq: 58551291
-Index: 0
-Address: 234f14
-Native_address: bcefc
-Refc: 1
-=fun
-Module: crashdump_viewer_html
-Uniq: 10055518
-Index: 17
-Address: 526170
-Native_address: bcefc
-Refc: 1
-=fun
-Module: erl_scan
-Uniq: 15795706
-Index: 19
-Address: 313bd4
-Native_address: bced4
-Refc: 1
-=fun
-Module: erl_scan
-Uniq: 31129467
-Index: 13
-Address: 313c44
-Native_address: bced4
-Refc: 1
-=fun
-Module: old_file_server
-Uniq: 115635393
-Index: 0
-Address: 2a1a4c
-Native_address: bcf04
-Refc: 2
-=fun
-Module: erl_eval
-Uniq: 65839696
-Index: 22
-Address: 2f9c00
-Native_address: bcef4
-Refc: 1
-=fun
-Module: erl_scan
-Uniq: 69275064
-Index: 28
-Address: 313aa0
-Native_address: bced4
-Refc: 1
-=fun
-Module: dict
-Uniq: 55938066
-Index: 11
-Address: 354d6c
-Native_address: bceec
-Refc: 1
-=fun
-Module: supervisor
-Uniq: 22323433
-Index: 3
-Address: 252688
-Native_address: bcefc
-Refc: 1
-=fun
-Module: erl_scan
-Uniq: 129726129
-Index: 29
-Address: 313abc
-Native_address: bced4
-Refc: 1
-=fun
-Module: dict
-Uniq: 84346832
-Index: 0
-Address: 3550fc
-Native_address: bceec
-Refc: 1
-=fun
-Module: shell
-Uniq: 102096820
-Index: 7
-Address: 2e5290
-Native_address: bcefc
-Refc: 1
-=fun
-Module: inet
-Uniq: 70385762
-Index: 11
-Address: 27cf44
-Native_address: bcefc
-Refc: 1
-=fun
-Module: mod_cgi
-Uniq: 1483038
-Index: 0
-Address: 4ec2e8
-Native_address: bcefc
-Refc: 1
-=fun
-Module: dict
-Uniq: 3664813
-Index: 1
-Address: 3550b4
-Native_address: bcef4
-Refc: 1
-=fun
-Module: inet
-Uniq: 131143671
-Index: 6
-Address: 27d08c
-Native_address: bcef4
-Refc: 1
-=fun
-Module: inet_config
-Uniq: 46286977
-Index: 2
-Address: 2740b0
-Native_address: bcefc
-Refc: 1
-=fun
-Module: mod_esi
-Uniq: 49099432
-Index: 0
-Address: 4e522c
-Native_address: bcefc
-Refc: 1
-=fun
-Module: application_master
-Uniq: 95764905
-Index: 2
-Address: 24aaa8
-Native_address: bcefc
-Refc: 1
-=fun
-Module: packages
-Uniq: 62890926
-Index: 0
-Address: 2ae814
-Native_address: bcef4
-Refc: 1
-=fun
-Module: erl_scan
-Uniq: 41564771
-Index: 35
-Address: 3139f8
-Native_address: bced4
-Refc: 1
-=fun
-Module: crashdump_viewer
-Uniq: 95490768
-Index: 0
-Address: 4a4dc0
-Native_address: bcf04
-Refc: 1
-=fun
-Module: erl_scan
-Uniq: 121559432
-Index: 3
-Address: 313d78
-Native_address: bced4
-Refc: 1
-=fun
-Module: httpd_conf
-Uniq: 21152662
-Index: 0
-Address: 4be5a0
-Native_address: bcefc
-Refc: 1
-=fun
-Module: net_kernel
-Uniq: 41630916
-Index: 5
-Address: 29e914
-Native_address: bcefc
-Refc: 1
-=fun
-Module: erl_scan
-Uniq: 19747201
-Index: 5
-Address: 313d24
-Native_address: bced4
-Refc: 1
-=fun
-Module: erl_lint
-Uniq: 100584837
-Index: 36
-Address: 34f0f4
-Native_address: bcef4
-Refc: 1
-=fun
-Module: erl_lint
-Uniq: 64635712
-Index: 15
-Address: 34f94c
-Native_address: bcef4
-Refc: 1
-=fun
-Module: net_kernel
-Uniq: 46398361
-Index: 3
-Address: 29e9a4
-Native_address: bcefc
-Refc: 1
-=fun
-Module: erl_scan
-Uniq: 86699817
-Index: 27
-Address: 313b2c
-Native_address: bced4
-Refc: 1
-=fun
-Module: distel
-Uniq: 40869731
-Index: 0
-Address: 35c12c
-Native_address: bcf04
-Refc: 1
-=fun
-Module: inet
-Uniq: 83701641
-Index: 1
-Address: 27d33c
-Native_address: bcefc
-Refc: 1
-=fun
-Module: mod_auth
-Uniq: 85845790
-Index: 0
-Address: 4dfd84
-Native_address: bcefc
-Refc: 1
-=fun
-Module: shell
-Uniq: 101292714
-Index: 9
-Address: 2e519c
-Native_address: bcefc
-Refc: 1
-=fun
-Module: global
-Uniq: 134173702
-Index: 1
-Address: 265b68
-Native_address: bcefc
-Refc: 1
-=fun
-Module: code_server
-Uniq: 92433687
-Index: 6
-Address: 2ad9f4
-Native_address: bcef4
-Refc: 1
-=fun
-Module: dict
-Uniq: 62315241
-Index: 8
-Address: 354f38
-Native_address: bcefc
-Refc: 1
-=fun
-Module: global
-Uniq: 11615541
-Index: 12
-Address: 265530
-Native_address: bcefc
-Refc: 1
-=fun
-Module: hipe_unified_loader
-Uniq: 11160090
-Index: 2
-Address: 2b6bb4
-Native_address: bcef4
-Refc: 1
-=fun
-Module: application_controller
-Uniq: 12116524
-Index: 15
-Address: 2342c4
-Native_address: bcef4
-Refc: 1
-=fun
-Module: mod_log
-Uniq: 61620901
-Index: 2
-Address: 4fc670
-Native_address: bcefc
-Refc: 1
-=fun
-Module: crashdump_viewer
-Uniq: 23665189
-Index: 12
-Address: 4a3b94
-Native_address: bcefc
-Refc: 1
-=fun
-Module: c
-Uniq: 43844413
-Index: 0
-Address: 300100
-Native_address: bcefc
-Refc: 1
-=fun
-Module: erl_scan
-Uniq: 100514258
-Index: 6
-Address: 313d08
-Native_address: bced4
-Refc: 1
-=fun
-Module: erl_lint
-Uniq: 54271286
-Index: 17
-Address: 34f8a0
-Native_address: bcefc
-Refc: 1
-=fun
-Module: inet_db
-Uniq: 47017252
-Index: 3
-Address: 26dfa0
-Native_address: bcefc
-Refc: 1
-=fun
-Module: crashdump_viewer
-Uniq: 1228304
-Index: 7
-Address: 4a45a4
-Native_address: bcefc
-Refc: 1
-=fun
-Module: global
-Uniq: 127131470
-Index: 10
-Address: 2655a0
-Native_address: bcefc
-Refc: 1
-=fun
-Module: file_server
-Uniq: 22638227
-Index: 1
-Address: 2a0e20
-Native_address: bcf04
-Refc: 1
-=fun
-Module: code_server
-Uniq: 112704920
-Index: 15
-Address: 2ad488
-Native_address: bcefc
-Refc: 1
-=fun
-Module: erl_eval
-Uniq: 88302875
-Index: 2
-Address: 2fa76c
-Native_address: bceb4
-Refc: 1
-=fun
-Module: inet_hosts
-Uniq: 85808984
-Index: 1
-Address: 28ab18
-Native_address: bcefc
-Refc: 1
-=fun
-Module: erl_parse
-Uniq: 106391799
-Index: 0
-Address: 33b22c
-Native_address: bcefc
-Refc: 1
-=fun
-Module: inet
-Uniq: 25830519
-Index: 5
-Address: 27d0c0
-Native_address: bcefc
-Refc: 1
-=fun
-Module: shell
-Uniq: 110491036
-Index: 1
-Address: 2e5398
-Native_address: bcef4
-Refc: 1
-=fun
-Module: crashdump_viewer_html
-Uniq: 13128736
-Index: 5
-Address: 52627c
-Native_address: bcefc
-Refc: 1
-=fun
-Module: erl_scan
-Uniq: 84644982
-Index: 21
-Address: 313b9c
-Native_address: bced4
-Refc: 1
-=fun
-Module: erl_lint
-Uniq: 120577486
-Index: 3
-Address: 34fffc
-Native_address: bcefc
-Refc: 1
-=fun
-Module: erl_lint
-Uniq: 4504456
-Index: 44
-Address: 34e938
-Native_address: bceec
-Refc: 1
-=fun
-Module: mod_disk_log
-Uniq: 28754183
-Index: 0
-Address: 500140
-Native_address: bcefc
-Refc: 1
-=fun
-Module: erl_scan
-Uniq: 88043334
-Index: 14
-Address: 313c28
-Native_address: bced4
-Refc: 1
-=fun
-Module: code_server
-Uniq: 61592373
-Index: 0
-Address: 2adc28
-Native_address: bcf04
-Refc: 1
-=fun
-Module: erl_scan
-Uniq: 74468346
-Index: 26
-Address: 313ad8
-Native_address: bced4
-Refc: 1
-=fun
-Module: erl_eval
-Uniq: 69896253
-Index: 21
-Address: 2f9c40
-Native_address: bce80
-Refc: 1
-=fun
-Module: global_group
-Uniq: 59656873
-Index: 4
-Address: 292ac0
-Native_address: bcefc
-Refc: 1
-=fun
-Module: crashdump_viewer
-Uniq: 103891261
-Index: 2
-Address: 4a4d70
-Native_address: bcefc
-Refc: 1
-=fun
-Module: httpd_util
-Uniq: 89619733
-Index: 0
-Address: 4b5e64
-Native_address: bcefc
-Refc: 1
-=fun
-Module: shell
-Uniq: 133201466
-Index: 10
-Address: 2e5180
-Native_address: bceec
-Refc: 1
-=fun
-Module: webtool
-Uniq: 32159369
-Index: 2
-Address: 4ab820
-Native_address: bcefc
-Refc: 1
-=fun
-Module: code_server
-Uniq: 76861396
-Index: 2
-Address: 2adbb0
-Native_address: bcefc
-Refc: 1
-=fun
-Module: mod_log
-Uniq: 48206487
-Index: 0
-Address: 4fc6f0
-Native_address: bcefc
-Refc: 1
-=fun
-Module: erl_lint
-Uniq: 118996551
-Index: 28
-Address: 34f384
-Native_address: bcefc
-Refc: 1
-=fun
-Module: erl_lint
-Uniq: 12593774
-Index: 50
-Address: 34e60c
-Native_address: bcef4
-Refc: 1
-=fun
-Module: httpd_request_handler
-Uniq: 48542841
-Index: 1
-Address: 50e88c
-Native_address: bcefc
-Refc: 1
-=fun
-Module: crashdump_viewer
-Uniq: 56178490
-Index: 9
-Address: 4a420c
-Native_address: bcefc
-Refc: 1
-=fun
-Module: distel
-Uniq: 88212576
-Index: 4
-Address: 35bf44
-Native_address: bcefc
-Refc: 1
-=fun
-Module: erl_lint
-Uniq: 79562132
-Index: 29
-Address: 34f368
-Native_address: bcefc
-Refc: 1
-=fun
-Module: erl_lint
-Uniq: 129524917
-Index: 32
-Address: 34f2c0
-Native_address: bcefc
-Refc: 1
-=fun
-Module: erl_eval
-Uniq: 54029891
-Index: 23
-Address: 2f9af0
-Native_address: bcefc
-Refc: 1
-=fun
-Module: inet
-Uniq: 108872092
-Index: 4
-Address: 27d0f0
-Native_address: bcef4
-Refc: 1
-=fun
-Module: application_controller
-Uniq: 40905124
-Index: 6
-Address: 234ac0
-Native_address: bcef4
-Refc: 1
-=fun
-Module: code_server
-Uniq: 50124876
-Index: 10
-Address: 2ad760
-Native_address: bcefc
-Refc: 1
-=fun
-Module: erl_lint
-Uniq: 791358
-Index: 48
-Address: 34e7b0
-Native_address: bcef4
-Refc: 1
-=fun
-Module: erl_scan
-Uniq: 18404828
-Index: 24
-Address: 313af4
-Native_address: bced4
-Refc: 1
-=fun
-Module: httpd_util
-Uniq: 13278653
-Index: 1
-Address: 4b5e48
-Native_address: bcefc
-Refc: 1
-=fun
-Module: inet_parse
-Uniq: 110307423
-Index: 13
-Address: 284a7c
-Native_address: bcefc
-Refc: 1
-=fun
-Module: rpc
-Uniq: 99592247
-Index: 0
-Address: 256118
-Native_address: bcf04
-Refc: 1
-=fun
-Module: global
-Uniq: 99918211
-Index: 2
-Address: 265af4
-Native_address: bcefc
-Refc: 1
-=fun
-Module: erl_lint
-Uniq: 71442319
-Index: 27
-Address: 34f510
-Native_address: bcef4
-Refc: 1
-=fun
-Module: erl_eval
-Uniq: 7612785
-Index: 13
-Address: 2fa0fc
-Native_address: bce80
-Refc: 1
-=fun
-Module: crashdump_viewer
-Uniq: 56095795
-Index: 15
-Address: 4a38a0
-Native_address: bcefc
-Refc: 1
-=fun
-Module: erl_scan
-Uniq: 23626796
-Index: 25
-Address: 313b10
-Native_address: bced4
-Refc: 1
-=fun
-Module: file_server
-Uniq: 126074974
-Index: 2
-Address: 2a0cac
-Native_address: bcef4
-Refc: 1
-=fun
-Module: inet_config
-Uniq: 104278122
-Index: 1
-Address: 274154
-Native_address: bcefc
-Refc: 1
-=fun
-Module: sys
-Uniq: 90854051
-Index: 0
-Address: 240344
-Native_address: bcefc
-Refc: 1
-=fun
-Module: erl_scan
-Uniq: 113334594
-Index: 2
-Address: 313d5c
-Native_address: bced4
-Refc: 1
-=fun
-Module: inet_parse
-Uniq: 8832142
-Index: 7
-Address: 284e30
-Native_address: bcefc
-Refc: 1
-=fun
-Module: erl_lint
-Uniq: 9159706
-Index: 42
-Address: 34eb54
-Native_address: bceec
-Refc: 1
-=fun
-Module: inet_db
-Uniq: 123946665
-Index: 8
-Address: 26e494
-Native_address: bcefc
-Refc: 1
-=fun
-Module: crashdump_viewer_html
-Uniq: 3149789
-Index: 1
-Address: 5262d0
-Native_address: bcefc
-Refc: 1
-=fun
-Module: c
-Uniq: 48288621
-Index: 11
-Address: 2ffed8
-Native_address: bcefc
-Refc: 1
-=fun
-Module: crashdump_viewer
-Uniq: 8953292
-Index: 20
-Address: 4a4d54
-Native_address: bcee4
-Refc: 1
-=fun
-Module: erl_lint
-Uniq: 9632158
-Index: 4
-Address: 34ff88
-Native_address: bcefc
-Refc: 1
-=fun
-Module: net_kernel
-Uniq: 31111567
-Index: 7
-Address: 29e8c8
-Native_address: bcef4
-Refc: 1
-=fun
-Module: erl_eval
-Uniq: 85307443
-Index: 10
-Address: 2fa29c
-Native_address: bcec4
-Refc: 1
-=fun
-Module: erl_scan
-Uniq: 104417191
-Index: 7
-Address: 313cd0
-Native_address: bced4
-Refc: 1
-=fun
-Module: dict
-Uniq: 43625777
-Index: 5
-Address: 354fec
-Native_address: bcefc
-Refc: 1
-=fun
-Module: webtool
-Uniq: 92698798
-Index: 3
-Address: 4ab780
-Native_address: bcefc
-Refc: 1
-=fun
-Module: erl_eval
-Uniq: 39074546
-Index: 6
-Address: 2fa54c
-Native_address: bcefc
-Refc: 1
-=fun
-Module: application_controller
-Uniq: 71451126
-Index: 5
-Address: 234b98
-Native_address: bcefc
-Refc: 1
-=fun
-Module: c
-Uniq: 122084387
-Index: 6
-Address: 300038
-Native_address: bcefc
-Refc: 1
-=fun
-Module: inet_parse
-Uniq: 9625924
-Index: 14
-Address: 284a60
-Native_address: bcefc
-Refc: 1
-=fun
-Module: erl_scan
-Uniq: 128777368
-Index: 11
-Address: 313c7c
-Native_address: bced4
-Refc: 1
-=fun
-Module: webtool
-Uniq: 10203723
-Index: 7
-Address: 4ab4f8
-Native_address: bcefc
-Refc: 1
-=fun
-Module: erl_scan
-Uniq: 35032400
-Index: 10
-Address: 313c98
-Native_address: bced4
-Refc: 1
-=fun
-Module: erl_scan
-Uniq: 17252586
-Index: 34
-Address: 313a14
-Native_address: bced4
-Refc: 1
-=fun
-Module: code_server
-Uniq: 7177165
-Index: 11
-Address: 2ad734
-Native_address: bcefc
-Refc: 1
-=fun
-Module: crashdump_viewer
-Uniq: 115778175
-Index: 3
-Address: 4a4930
-Native_address: bcefc
-Refc: 1
-=fun
-Module: erl_lint
-Uniq: 96440880
-Index: 51
-Address: 34e590
-Native_address: bcefc
-Refc: 1
-=fun
-Module: hipe_unified_loader
-Uniq: 68275407
-Index: 0
-Address: 2b7340
-Native_address: bcefc
-Refc: 1
-=fun
-Module: erl_eval
-Uniq: 88854488
-Index: 16
-Address: 2f9f04
-Native_address: bcebc
-Refc: 1
-=fun
-Module: global
-Uniq: 26353848
-Index: 13
-Address: 2654e8
-Native_address: bcf04
-Refc: 3
-=fun
-Module: global
-Uniq: 93414722
-Index: 11
-Address: 265568
-Native_address: bcefc
-Refc: 1
-=fun
-Module: erl_lint
-Uniq: 11194189
-Index: 60
-Address: 34fe0c
-Native_address: bcef4
-Refc: 1
-=fun
-Module: c
-Uniq: 125189992
-Index: 8
-Address: 2fffdc
-Native_address: bcefc
-Refc: 1
-=fun
-Module: dict
-Uniq: 112472016
-Index: 2
-Address: 355088
-Native_address: bceec
-Refc: 1
-=fun
-Module: shell
-Uniq: 104426442
-Index: 5
-Address: 2e52e0
-Native_address: bceec
-Refc: 1
-=fun
-Module: global
-Uniq: 17426458
-Index: 0
-Address: 265bc4
-Native_address: bcefc
-Refc: 1
-=fun
-Module: code_server
-Uniq: 81191039
-Index: 5
-Address: 2ada48
-Native_address: bcef4
-Refc: 1
-=fun
-Module: inet_parse
-Uniq: 71765042
-Index: 5
-Address: 284f74
-Native_address: bcefc
-Refc: 1
-=fun
-Module: init
-Uniq: 85855821
-Index: 2
-Address: 1fa298
-Native_address: bcefc
-Refc: 1
-=fun
-Module: crashdump_viewer
-Uniq: 70586122
-Index: 10
-Address: 4a3fe4
-Native_address: bcefc
-Refc: 1
-=fun
-Module: erl_lint
-Uniq: 87067911
-Index: 49
-Address: 34e708
-Native_address: bcef4
-Refc: 1
-=fun
-Module: distel
-Uniq: 63126735
-Index: 1
-Address: 35c0fc
-Native_address: bcf04
-Refc: 1
-=fun
-Module: c
-Uniq: 58270309
-Index: 1
-Address: 3000e4
-Native_address: bcefc
-Refc: 1
-=fun
-Module: ets
-Uniq: 80538457
-Index: 1
-Address: 2bc1a0
-Native_address: bcefc
-Refc: 1
-=fun
-Module: erl_lint
-Uniq: 69827241
-Index: 9
-Address: 34fd70
-Native_address: bcef4
-Refc: 1
-=fun
-Module: dict
-Uniq: 103968752
-Index: 3
-Address: 355054
-Native_address: bcefc
-Refc: 1
-=fun
-Module: erl_lint
-Uniq: 117175573
-Index: 21
-Address: 34f728
-Native_address: bcef4
-Refc: 1
-=fun
-Module: shell
-Uniq: 57865450
-Index: 2
-Address: 2e537c
-Native_address: bcef4
-Refc: 1
-=fun
-Module: erl_scan
-Uniq: 14705965
-Index: 20
-Address: 313b80
-Native_address: bced4
-Refc: 1
-=fun
-Module: webtool
-Uniq: 85360931
-Index: 6
-Address: 4ab56c
-Native_address: bcefc
-Refc: 1
-=fun
-Module: kernel_config
-Uniq: 41755598
-Index: 0
-Address: 2d9e20
-Native_address: bcefc
-Refc: 1
-=fun
-Module: erl_lint
-Uniq: 7110547
-Index: 37
-Address: 34ef14
-Native_address: bcef4
-Refc: 1
-=fun
-Module: application_controller
-Uniq: 28091577
-Index: 16
-Address: 234244
-Native_address: bcef4
-Refc: 2
-=fun
-Module: code_server
-Uniq: 96448152
-Index: 14
-Address: 2ad4e4
-Native_address: bcefc
-Refc: 1
-=fun
-Module: crashdump_viewer
-Uniq: 40177568
-Index: 13
-Address: 4a39a4
-Native_address: bcefc
-Refc: 1
-=fun
-Module: erl_lint
-Uniq: 31948320
-Index: 58
-Address: 34dfdc
-Native_address: bcef4
-Refc: 1
-=fun
-Module: global
-Uniq: 54153760
-Index: 7
-Address: 265854
-Native_address: bcefc
-Refc: 1
-=fun
-Module: crashdump_viewer_html
-Uniq: 60156260
-Index: 3
-Address: 5262b4
-Native_address: bcefc
-Refc: 1
-=fun
-Module: erl_lint
-Uniq: 1010616
-Index: 2
-Address: 350064
-Native_address: bcef4
-Refc: 1
-=fun
-Module: init
-Uniq: 96784459
-Index: 1
-Address: 1fa2b4
-Native_address: bcefc
-Refc: 1
-=fun
-Module: erl_scan
-Uniq: 48691771
-Index: 18
-Address: 313bb8
-Native_address: bced4
-Refc: 1
-=fun
-Module: global
-Uniq: 26895060
-Index: 9
-Address: 265710
-Native_address: bcefc
-Refc: 1
-=fun
-Module: code_server
-Uniq: 109625093
-Index: 7
-Address: 2ad8fc
-Native_address: bcef4
-Refc: 1
-=fun
-Module: erl_lint
-Uniq: 59436171
-Index: 1
-Address: 3500dc
-Native_address: bcef4
-Refc: 1
-=fun
-Module: dict
-Uniq: 92768306
-Index: 9
-Address: 354f04
-Native_address: bcefc
-Refc: 1
-=fun
-Module: global_group
-Uniq: 106430008
-Index: 3
-Address: 292b38
-Native_address: bcefc
-Refc: 1
-=fun
-Module: init
-Uniq: 79749196
-Index: 6
-Address: 1fa01c
-Native_address: bceec
-Refc: 1
-=fun
-Module: erl_eval
-Uniq: 6014929
-Index: 9
-Address: 2fa324
-Native_address: bceac
-Refc: 1
-=fun
-Module: application_controller
-Uniq: 57051922
-Index: 7
-Address: 234a28
-Native_address: bcef4
-Refc: 1
-=fun
-Module: net_kernel
-Uniq: 77043468
-Index: 6
-Address: 29e8e4
-Native_address: bcefc
-Refc: 1
-=fun
-Module: crashdump_viewer_html
-Uniq: 36176045
-Index: 9
-Address: 52620c
-Native_address: bcefc
-Refc: 1
-=fun
-Module: rpc
-Uniq: 35862809
-Index: 3
-Address: 255edc
-Native_address: bcefc
-Refc: 1
-=fun
-Module: inet_parse
-Uniq: 113649451
-Index: 4
-Address: 2850a0
-Native_address: bcefc
-Refc: 1
-=fun
-Module: global
-Uniq: 67943969
-Index: 5
-Address: 2658f4
-Native_address: bcefc
-Refc: 1
-=fun
-Module: crashdump_viewer_html
-Uniq: 109003032
-Index: 16
-Address: 5260d0
-Native_address: bcefc
-Refc: 1
-=fun
-Module: crashdump_viewer_html
-Uniq: 104711447
-Index: 13
-Address: 525f5c
-Native_address: bcefc
-Refc: 1
-=fun
-Module: inet
-Uniq: 107666872
-Index: 9
-Address: 27cfb0
-Native_address: bcefc
-Refc: 1
-=fun
-Module: crashdump_viewer_html
-Uniq: 89410000
-Index: 10
-Address: 5261f0
-Native_address: bcefc
-Refc: 1
-=fun
-Module: inet_parse
-Uniq: 47356870
-Index: 11
-Address: 284ab4
-Native_address: bcefc
-Refc: 1
-=fun
-Module: erl_lint
-Uniq: 17873449
-Index: 56
-Address: 34e1e8
-Native_address: bcef4
-Refc: 1
-=fun
-Module: erl_lint
-Uniq: 8839441
-Index: 33
-Address: 34f25c
-Native_address: bcefc
-Refc: 1
-=fun
-Module: gen_event
-Uniq: 82513204
-Index: 2
-Address: 222c18
-Native_address: bcefc
-Refc: 1
-=fun
-Module: application_master
-Uniq: 5973059
-Index: 0
-Address: 24ab7c
-Native_address: bcefc
-Refc: 1
-=fun
-Module: inet_gethost_native
-Uniq: 127832132
-Index: 0
-Address: 4b065c
-Native_address: bcefc
-Refc: 2
-=fun
-Module: crashdump_viewer_html
-Uniq: 39322658
-Index: 14
-Address: 525f40
-Native_address: bcefc
-Refc: 1
-=fun
-Module: gen_server
-Uniq: 100284021
-Index: 0
-Address: 23d288
-Native_address: bcf04
-Refc: 1
-=fun
-Module: inet_parse
-Uniq: 17430070
-Index: 12
-Address: 284a98
-Native_address: bcefc
-Refc: 1
-=fun
-Module: init
-Uniq: 97509773
-Index: 3
-Address: 1fa27c
-Native_address: bcefc
-Refc: 1
-=fun
-Module: distel
-Uniq: 32364818
-Index: 3
-Address: 35c050
-Native_address: bcefc
-Refc: 1
-=fun
-Module: erl_scan
-Uniq: 58576084
-Index: 32
-Address: 313a4c
-Native_address: bced4
-Refc: 1
-=fun
-Module: crashdump_viewer
-Uniq: 38384851
-Index: 14
-Address: 4a3988
-Native_address: bceec
-Refc: 1
-=fun
-Module: application_controller
-Uniq: 14139883
-Index: 4
-Address: 234d78
-Native_address: bcefc
-Refc: 1
-=fun
-Module: erl_eval
-Uniq: 122590256
-Index: 0
-Address: 2fa8b4
-Native_address: bcef4
-Refc: 1
-=fun
-Module: erl_eval
-Uniq: 14705629
-Index: 11
-Address: 2fa22c
-Native_address: bcedc
-Refc: 1
-=fun
-Module: erl_eval
-Uniq: 9273769
-Index: 4
-Address: 2fa684
-Native_address: bcee4
-Refc: 1
-=fun
-Module: crashdump_viewer_html
-Uniq: 87950142
-Index: 11
-Address: 5261d4
-Native_address: bcefc
-Refc: 1
-=fun
-Module: mod_log
-Uniq: 54913678
-Index: 1
-Address: 4fc6b0
-Native_address: bcefc
-Refc: 1
-=fun
-Module: inet_db
-Uniq: 28370334
-Index: 0
-Address: 26e4b0
-Native_address: bcefc
-Refc: 1
-=fun
-Module: erl_lint
-Uniq: 24927227
-Index: 40
-Address: 34ed4c
-Native_address: bceec
-Refc: 1
-=fun
-Module: erl_scan
-Uniq: 105437500
-Index: 33
-Address: 313a30
-Native_address: bced4
-Refc: 1
-=fun
-Module: application_controller
-Uniq: 10921695
-Index: 1
-Address: 234eac
-Native_address: bcefc
-Refc: 1
-=fun
-Module: erl_lint
-Uniq: 112431564
-Index: 55
-Address: 34e22c
-Native_address: bceec
-Refc: 1
-=fun
-Module: webtool
-Uniq: 129460863
-Index: 5
-Address: 4ab5c4
-Native_address: bcefc
-Refc: 1
-=fun
-Module: inet
-Uniq: 89001648
-Index: 3
-Address: 27d2ec
-Native_address: bcefc
-Refc: 1
-=fun
-Module: inet
-Uniq: 36199507
-Index: 8
-Address: 27cfe4
-Native_address: bcefc
-Refc: 1
-=fun
-Module: crashdump_viewer_html
-Uniq: 35620771
-Index: 2
-Address: 5262ec
-Native_address: bcefc
-Refc: 1
-=fun
-Module: erl_eval
-Uniq: 83214871
-Index: 18
-Address: 2f9e34
-Native_address: bceec
-Refc: 1
-=fun
-Module: code_server
-Uniq: 122455383
-Index: 1
-Address: 2adc0c
-Native_address: bcf04
-Refc: 1
-=fun
-Module: erl_lint
-Uniq: 22389488
-Index: 31
-Address: 34f1b8
-Native_address: bceec
-Refc: 1
-=fun
-Module: erl_eval
-Uniq: 41869059
-Index: 12
-Address: 2fa1d4
-Native_address: bcef4
-Refc: 1
-=fun
-Module: erl_lint
-Uniq: 18130505
-Index: 45
-Address: 34e904
-Native_address: bcefc
-Refc: 1
-=fun
-Module: hipe_unified_loader
-Uniq: 107414126
-Index: 1
-Address: 2b706c
-Native_address: bcefc
-Refc: 1
-=fun
-Module: erl_eval
-Uniq: 116638945
-Index: 28
-Address: 2f98f8
-Native_address: bcefc
-Refc: 1
-=fun
-Module: application_controller
-Uniq: 48465762
-Index: 9
-Address: 2348c8
-Native_address: bcefc
-Refc: 1
-=fun
-Module: httpd_request_handler
-Uniq: 87633852
-Index: 0
-Address: 50e97c
-Native_address: bcefc
-Refc: 1
-=fun
-Module: webtool
-Uniq: 28213098
-Index: 8
-Address: 4ab42c
-Native_address: bcefc
-Refc: 1
-=fun
-Module: gen_event
-Uniq: 123630574
-Index: 4
-Address: 222b58
-Native_address: bcefc
-Refc: 1
-=fun
-Module: dict
-Uniq: 127425508
-Index: 13
-Address: 354eb4
-Native_address: bcefc
-Refc: 1
-=fun
-Module: code_server
-Uniq: 95048118
-Index: 16
-Address: 2ad46c
-Native_address: bcef4
-Refc: 1
-=fun
-Module: erl_lint
-Uniq: 108661978
-Index: 19
-Address: 34f75c
-Native_address: bcefc
-Refc: 1
-=fun
-Module: erl_lint
-Uniq: 21272619
-Index: 13
-Address: 34fad8
-Native_address: bcef4
-Refc: 1
-=fun
-Module: erl_scan
-Uniq: 29943747
-Index: 17
-Address: 313bf0
-Native_address: bced4
-Refc: 1
-=fun
-Module: erl_scan
-Uniq: 120240397
-Index: 4
-Address: 313d94
-Native_address: bced4
-Refc: 1
-=fun
-Module: erl_lint
-Uniq: 124060676
-Index: 0
-Address: 350124
-Native_address: bcef4
-Refc: 1
-=fun
-Module: crashdump_viewer_html
-Uniq: 100975346
-Index: 6
-Address: 526260
-Native_address: bcefc
-Refc: 1
-=fun
-Module: code_server
-Uniq: 61421476
-Index: 4
-Address: 2ada9c
-Native_address: bcef4
-Refc: 1
-=fun
-Module: erl_lint
-Uniq: 45197232
-Index: 7
-Address: 34fe5c
-Native_address: bcef4
-Refc: 1
-=fun
-Module: crashdump_viewer_html
-Uniq: 3151900
-Index: 15
-Address: 525f24
-Native_address: bcefc
-Refc: 1
-=fun
-Module: httpd_util
-Uniq: 77509245
-Index: 2
-Address: 4b5e2c
-Native_address: bcefc
-Refc: 1
-=fun
-Module: code_server
-Uniq: 94110229
-Index: 8
-Address: 2ad7e4
-Native_address: bcef4
-Refc: 3
-=fun
-Module: rpc
-Uniq: 101217130
-Index: 1
-Address: 2560c4
-Native_address: bcf04
-Refc: 1
-=fun
-Module: lists
-Uniq: 103647452
-Index: 0
-Address: 244b7c
-Native_address: bcefc
-Refc: 1
-=fun
-Module: code_server
-Uniq: 37841211
-Index: 9
-Address: 2ad77c
-Native_address: bcef4
-Refc: 1
-=fun
-Module: erl_lint
-Uniq: 40109251
-Index: 54
-Address: 34e2b4
-Native_address: bcef4
-Refc: 1
-=fun
-Module: init
-Uniq: 98012300
-Index: 0
-Address: 1fa2d0
-Native_address: bcefc
-Refc: 1
-=fun
-Module: webtool
-Uniq: 73604759
-Index: 10
-Address: 4ab270
-Native_address: bcefc
-Refc: 1
-=fun
-Module: erl_scan
-Uniq: 12042434
-Index: 1
-Address: 313d40
-Native_address: bced4
-Refc: 1
-=fun
-Module: shell
-Uniq: 127137775
-Index: 4
-Address: 2e531c
-Native_address: bcf04
-Refc: 1
-=fun
-Module: inet
-Uniq: 45498037
-Index: 12
-Address: 27cec0
-Native_address: bcefc
-Refc: 1
-=fun
-Module: erl_lint
-Uniq: 122441107
-Index: 34
-Address: 34f1d4
-Native_address: bcefc
-Refc: 1
-=fun
-Module: erl_lint
-Uniq: 70933889
-Index: 46
-Address: 34e8d0
-Native_address: bcef4
-Refc: 1
-=fun
-Module: inet
-Uniq: 69850797
-Index: 2
-Address: 27d308
-Native_address: bcefc
-Refc: 1
-=fun
-Module: application_controller
-Uniq: 103965539
-Index: 13
-Address: 234684
-Native_address: bcefc
-Refc: 1
-=fun
-Module: erl_scan
-Uniq: 29979659
-Index: 30
-Address: 313a84
-Native_address: bced4
-Refc: 1
-=fun
-Module: erl_lint
-Uniq: 17148721
-Index: 20
-Address: 34f778
-Native_address: bcefc
-Refc: 1
-=fun
-Module: httpd_response
-Uniq: 100673049
-Index: 0
-Address: 5165dc
-Native_address: bcefc
-Refc: 1
-=fun
-Module: inet_gethost_native
-Uniq: 10508176
-Index: 1
-Address: 4b04dc
-Native_address: bcefc
-Refc: 1
-=fun
-Module: erl_lint
-Uniq: 32476064
-Index: 57
-Address: 34e1c4
-Native_address: bcef4
-Refc: 1
-=fun
-Module: erl_scan
-Uniq: 74835078
-Index: 9
-Address: 313cec
-Native_address: bced4
-Refc: 1
-=fun
-Module: crashdump_viewer
-Uniq: 60689814
-Index: 19
-Address: 4a3b78
-Native_address: bceec
-Refc: 1
-=fun
-Module: erl_lint
-Uniq: 39269715
-Index: 5
-Address: 34ff14
-Native_address: bcef4
-Refc: 1
-=fun
-Module: shell
-Uniq: 112923172
-Index: 0
-Address: 2e5404
-Native_address: bcf04
-Refc: 1
-=fun
-Module: erl_eval
-Uniq: 43010824
-Index: 14
-Address: 2fa03c
-Native_address: bce8c
-Refc: 1
-=fun
-Module: global
-Uniq: 82495254
-Index: 3
-Address: 265ac8
-Native_address: bcefc
-Refc: 1
-=fun
-Module: shell
-Uniq: 48568081
-Index: 8
-Address: 2e5220
-Native_address: bcefc
-Refc: 1
-=fun
-Module: init
-Uniq: 77236637
-Index: 7
-Address: 1fa000
-Native_address: bcf04
-Refc: 1
-=fun
-Module: erl_eval
-Uniq: 109386574
-Index: 1
-Address: 2fa804
-Native_address: bce9c
-Refc: 1
-=fun
-Module: erl_lint
-Uniq: 42613220
-Index: 14
-Address: 34f980
-Native_address: bcef4
-Refc: 1
-=fun
-Module: erl_scan
-Uniq: 67093144
-Index: 23
-Address: 313b64
-Native_address: bced4
-Refc: 1
-=fun
-Module: erl_lint
-Uniq: 86833790
-Index: 11
-Address: 34fbe8
-Native_address: bcefc
-Refc: 1
-=fun
-Module: net_kernel
-Uniq: 6344855
-Index: 1
-Address: 29eabc
-Native_address: bcefc
-Refc: 1
-=fun
-Module: erl_lint
-Uniq: 5149749
-Index: 35
-Address: 34f220
-Native_address: bcefc
-Refc: 1
-=fun
-Module: init
-Uniq: 93451769
-Index: 5
-Address: 1fa120
-Native_address: bcefc
-Refc: 1
-=fun
-Module: application_controller
-Uniq: 117428568
-Index: 11
-Address: 234758
-Native_address: bcefc
-Refc: 1
-=fun
-Module: crashdump_viewer_html
-Uniq: 15225890
-Index: 4
-Address: 526298
-Native_address: bcefc
-Refc: 1
-=fun
-Module: application_controller
-Uniq: 120760477
-Index: 2
-Address: 234cdc
-Native_address: bcefc
-Refc: 1
-=fun
-Module: c
-Uniq: 88561919
-Index: 3
-Address: 3000ac
-Native_address: bcefc
-Refc: 1
-=fun
-Module: erl_scan
-Uniq: 108931174
-Index: 8
-Address: 313cb4
-Native_address: bced4
-Refc: 1
-=fun
-Module: rpc
-Uniq: 122901192
-Index: 4
-Address: 255e44
-Native_address: bcf04
-Refc: 1
-=fun
-Module: erl_lint
-Uniq: 32985930
-Index: 10
-Address: 34fc40
-Native_address: bcef4
-Refc: 1
-=fun
-Module: global_group
-Uniq: 97968498
-Index: 1
-Address: 292b7c
-Native_address: bcef4
-Refc: 1
-=fun
-Module: crashdump_viewer
-Uniq: 45671671
-Index: 18
-Address: 4a32d0
-Native_address: bcefc
-Refc: 1
-=fun
-Module: erl_eval
-Uniq: 117968056
-Index: 3
-Address: 2fa6ec
-Native_address: bcecc
-Refc: 1
-=fun
-Module: init
-Uniq: 108717591
-Index: 4
-Address: 1fa194
-Native_address: bcf04
-Refc: 1
-=fun
-Module: supervisor
-Uniq: 15091954
-Index: 2
-Address: 2526dc
-Native_address: bcefc
-Refc: 1
-=fun
-Module: global
-Uniq: 65707495
-Index: 6
-Address: 2658a4
-Native_address: bcefc
-Refc: 1
-=fun
-Module: code_server
-Uniq: 34473969
-Index: 17
-Address: 2ad450
-Native_address: bcef4
-Refc: 2
-=fun
-Module: crashdump_viewer_html
-Uniq: 124296602
-Index: 7
-Address: 526244
-Native_address: bcefc
-Refc: 1
-=fun
-Module: global
-Uniq: 23074707
-Index: 15
-Address: 265460
-Native_address: bcefc
-Refc: 1
-=fun
-Module: inet
-Uniq: 25972856
-Index: 10
-Address: 27cf74
-Native_address: bcefc
-Refc: 1
-=fun
-Module: erl_eval
-Uniq: 43110452
-Index: 24
-Address: 2f9ad4
-Native_address: bceec
-Refc: 1
-=fun
-Module: code_server
-Uniq: 106445918
-Index: 13
-Address: 2ad660
-Native_address: bcefc
-Refc: 1
-=fun
-Module: crashdump_viewer_html
-Uniq: 116071286
-Index: 12
-Address: 5261b8
-Native_address: bcefc
-Refc: 1
-=fun
-Module: inet_parse
-Uniq: 130814477
-Index: 8
-Address: 284cfc
-Native_address: bcefc
-Refc: 1
-=fun
-Module: erl_lint
-Uniq: 121017037
-Index: 39
-Address: 34ed80
-Native_address: bcef4
-Refc: 1
-=fun
-Module: ets
-Uniq: 104895267
-Index: 0
-Address: 2bc1bc
-Native_address: bcefc
-Refc: 1
-=fun
-Module: crashdump_viewer
-Uniq: 104682437
-Index: 11
-Address: 4a3de0
-Native_address: bcefc
-Refc: 1
-=fun
-Module: erl_lint
-Uniq: 70248777
-Index: 30
-Address: 34f30c
-Native_address: bcefc
-Refc: 1
-=fun
-Module: c
-Uniq: 13274975
-Index: 5
-Address: 300074
-Native_address: bcef4
-Refc: 1
-=fun
-Module: erl_lint
-Uniq: 98442771
-Index: 53
-Address: 34e2d0
-Native_address: bceec
-Refc: 1
-=fun
-Module: erl_eval
-Uniq: 69829006
-Index: 7
-Address: 2fa47c
-Native_address: bce80
-Refc: 1
-=fun
-Module: old_file_server
-Uniq: 36444943
-Index: 1
-Address: 2a1a80
-Native_address: bcf04
-Refc: 1
-=fun
-Module: erl_lint
-Uniq: 58719455
-Index: 26
-Address: 34f5f0
-Native_address: bcefc
-Refc: 1
-=fun
-Module: timer
-Uniq: 42505885
-Index: 0
-Address: 4cd62c
-Native_address: bcefc
-Refc: 1
-=fun
-Module: erl_eval
-Uniq: 54682479
-Index: 20
-Address: 2f9d08
-Native_address: bcf04
-Refc: 1
-=fun
-Module: gen_event
-Uniq: 86070332
-Index: 1
-Address: 222d7c
-Native_address: bcefc
-Refc: 1
-=fun
-Module: c
-Uniq: 54728136
-Index: 9
-Address: 2fff68
-Native_address: bcefc
-Refc: 1
-=fun
-Module: application_controller
-Uniq: 16474219
-Index: 3
-Address: 234c60
-Native_address: bcefc
-Refc: 1
-=fun
-Module: application_controller
-Uniq: 108831556
-Index: 10
-Address: 234810
-Native_address: bcefc
-Refc: 1
-=fun
-Module: erl_lint
-Uniq: 72053761
-Index: 16
-Address: 34f8ec
-Native_address: bcef4
-Refc: 1
-=fun
-Module: net_kernel
-Uniq: 65127616
-Index: 2
-Address: 29ea04
-Native_address: bcefc
-Refc: 1
-=fun
-Module: application_controller
-Uniq: 126167637
-Index: 14
-Address: 234640
-Native_address: bcef4
-Refc: 1
-=fun
-Module: inet_parse
-Uniq: 113704917
-Index: 0
-Address: 285788
-Native_address: bcefc
-Refc: 1
-=fun
-Module: mod_disk_log
-Uniq: 75279647
-Index: 1
-Address: 500100
-Native_address: bcefc
-Refc: 1
-=fun
-Module: inet_db
-Uniq: 119218247
-Index: 5
-Address: 26df68
-Native_address: bcef4
-Refc: 1
-=fun
-Module: httpd_util
-Uniq: 85690044
-Index: 4
-Address: 4b5d6c
-Native_address: bcefc
-Refc: 1
-=fun
-Module: inet_db
-Uniq: 53075592
-Index: 1
-Address: 26e16c
-Native_address: bcefc
-Refc: 1
-=fun
-Module: c
-Uniq: 39490182
-Index: 2
-Address: 3000c8
-Native_address: bcefc
-Refc: 1
-=fun
-Module: application_controller
-Uniq: 75189006
-Index: 12
-Address: 234714
-Native_address: bcef4
-Refc: 1
-=fun
-Module: erl_lint
-Uniq: 14980808
-Index: 43
-Address: 34eb38
-Native_address: bceec
-Refc: 1
-=fun
-Module: crashdump_viewer
-Uniq: 16463468
-Index: 4
-Address: 4a4914
-Native_address: bcee4
-Refc: 1
-=fun
-Module: dict
-Uniq: 99965326
-Index: 4
-Address: 355020
-Native_address: bcefc
-Refc: 1
-=fun
-Module: inet_parse
-Uniq: 36900786
-Index: 6
-Address: 284f3c
-Native_address: bcefc
-Refc: 1
-=fun
-Module: erl_lint
-Uniq: 45447147
-Index: 18
-Address: 34f794
-Native_address: bcef4
-Refc: 1
-=fun
-Module: erl_lint
-Uniq: 32353825
-Index: 6
-Address: 34fe78
-Native_address: bcef4
-Refc: 1
-=fun
-Module: erl_lint
-Uniq: 134052338
-Index: 8
-Address: 34fdc0
-Native_address: bceec
-Refc: 1
-=fun
-Module: application_master
-Uniq: 23840924
-Index: 1
-Address: 24aae0
-Native_address: bcefc
-Refc: 1
-=fun
-Module: webtool
-Uniq: 108282500
-Index: 1
-Address: 4ab918
-Native_address: bcefc
-Refc: 1
-=fun
-Module: erl_prim_loader
-Uniq: 31081110
-Index: 0
-Address: 210c68
-Native_address: bcf04
-Refc: 1
-=fun
-Module: erl_eval
-Uniq: 54275742
-Index: 26
-Address: 2f9a4c
-Native_address: bcef4
-Refc: 1
-=fun
-Module: shell
-Uniq: 45083091
-Index: 3
-Address: 2e5350
-Native_address: bcf04
-Refc: 3
-=proc_stack:<0.0.0>
-3a48bc:SReturn addr 0x156F90 (<terminate process normally>)
-y0:H371264
-=proc_heap:<0.0.0>
-371264:t9:A5:state,H3710D8,N,N,H3710F4,P<0.1.0>,H37128C,H3710FC,N
-3710FC:t2:H371138,H371140
-371140:lI80|H371194
-371194:lI49|H3711E0
-3711E0:lI48|H371204
-371204:lI66|N
-371138:lI79|H37118C
-37118C:lI84|H3711D8
-3711D8:lI80|H3711FC
-3711FC:lI32|H37120C
-37120C:lI32|H371214
-371214:lI65|H37121C
-37121C:lI80|H371224
-371224:lI78|H37122C
-37122C:lI32|H371234
-371234:lI49|H37123C
-37123C:lI56|H371244
-371244:lI49|H37124C
-37124C:lI32|H371254
-371254:lI48|H37125C
-37125C:lI49|N
-37128C:t2:A7:started,A7:started
-3710F4:lH371124|H371130
-371124:t2:A16:application_controller,P<0.5.0>
-371130:lH371178|H371184
-371178:t2:AC:error_logger,P<0.4.0>
-371184:lH3711CC|N
-3711CC:t2:AF:erl_prim_loader,P<0.2.0>
-3710D8:lH3710E0|H3710EC
-3710E0:t2:A5:-root,H371108
-371108:lH371148|N
-371148:Yh13:2F636C656172636173652F6F74702F65727473
-3710EC:lH371110|H37111C
-371110:t2:A9:-progname,H371164
-371164:lH37119C|N
-37119C:Yh1D:2F636C656172636173652F6F74702F657274732F62696E2F6365726C20
-37111C:lH37116C|N
-37116C:t2:A5:-home,H3711C4
-3711C4:lH3711E8|N
-3711E8:YhA:2F686F6D652F73697269
-=proc_stack:<0.2.0>
-38eca8:SReturn addr 0x156F90 (<terminate process normally>)
-y0:H367D20
-y1:P<0.1.0>
-y2:H367D28
-y3:A8:infinity
-=proc_heap:<0.2.0>
-367D20:lH367D48|H367D50
-367D48:lI47|H367D58
-367D58:lI99|H367D68
-367D68:lI108|H367D78
-367D78:lI101|H367D88
-367D88:lI97|H367D98
-367D98:lI114|H367DA8
-367DA8:lI99|H367DB8
-367DB8:lI97|H367DC8
-367DC8:lI115|H367DD8
-367DD8:lI101|H367DE8
-367DE8:lI47|H367DF8
-367DF8:lI111|H367E08
-367E08:lI116|H367E18
-367E18:lI112|H367E28
-367E28:lI47|H367E38
-367E38:lI101|H367E48
-367E48:lI114|H367E58
-367E58:lI116|H367E68
-367E68:lI115|H367E78
-367E78:lI47|H367E88
-367E88:lI108|H367E98
-367E98:lI105|H367EA8
-367EA8:lI98|H367EB8
-367EB8:lI47|H367EC8
-367EC8:lI107|H367ED8
-367ED8:lI101|H367EE8
-367EE8:lI114|H367EF8
-367EF8:lI110|H367F08
-367F08:lI101|H367F18
-367F18:lI108|H367F28
-367F28:lI47|H367F38
-367F38:lI101|H367F48
-367F48:lI98|H367F58
-367F58:lI105|H367F68
-367F68:lI110|N
-367D50:lH367D60|N
-367D60:lI47|H367D70
-367D70:lI99|H367D80
-367D80:lI108|H367D90
-367D90:lI101|H367DA0
-367DA0:lI97|H367DB0
-367DB0:lI114|H367DC0
-367DC0:lI99|H367DD0
-367DD0:lI97|H367DE0
-367DE0:lI115|H367DF0
-367DF0:lI101|H367E00
-367E00:lI47|H367E10
-367E10:lI111|H367E20
-367E20:lI116|H367E30
-367E30:lI112|H367E40
-367E40:lI47|H367E50
-367E50:lI101|H367E60
-367E60:lI114|H367E70
-367E70:lI116|H367E80
-367E80:lI115|H367E90
-367E90:lI47|H367EA0
-367EA0:lI108|H367EB0
-367EB0:lI105|H367EC0
-367EC0:lI98|H367ED0
-367ED0:lI47|H367EE0
-367EE0:lI115|H367EF0
-367EF0:lI116|H367F00
-367F00:lI100|H367F10
-367F10:lI108|H367F20
-367F20:lI105|H367F30
-367F30:lI98|H367F40
-367F40:lI47|H367F50
-367F50:lI101|H367F60
-367F60:lI98|H367F70
-367F70:lI105|H367F78
-367F78:lI110|N
-367D28:t7:A5:state,A5:efile,N,A4:none,p<0.2>,A8:infinity,A5:false
-=proc_dictionary:<0.4.0>
-H3AC588
-H3AC594
-=proc_stack:<0.4.0>
-3b2f14:SReturn addr 0x225860 (proc_lib:init_p/5 + 164)
-y0:N
-y1:H3B21E8
-y2:AC:error_logger
-y3:P<0.1.0>
-3b2f28:SReturn addr 0x156F90 (<terminate process normally>)
-y0:SCatch 0x225860 (proc_lib:init_p/5 + 164)
-y1:A3:gen
-y2:A7:init_it
-y3:H3AC5A8
-=proc_heap:<0.4.0>
-3B21E8:lH3B2144|H3B21E0
-3B2144:t5:A7:handler,AC:error_logger,A5:false,N,A5:false
-3B21E0:lH3B21BC|N
-3B21BC:t5:A7:handler,A12:error_logger_tty_h,A5:false,H3AC610,A5:false
-3AC610:t2:P<0.21.0>,AC:error_logger
-3AC5A8:lA9:gen_event|H3AC5E8
-3AC5E8:lP<0.1.0>|H3AC608
-3AC608:lP<0.1.0>|H3AC61C
-3AC61C:lH3AC624|H3AC630
-3AC624:t2:A5:local,AC:error_logger
-3AC630:lN|H3AC638
-3AC638:lN|H3AC640
-3AC640:lN|N
-3AC588:t2:AD:$initial_call,H3AC5B0
-3AC5B0:t3:A3:gen,A7:init_it,H3AC5A8
-3AC594:t2:AA:$ancestors,H3AC5C0
-3AC5C0:lP<0.1.0>|N
-=proc_dictionary:<0.5.0>
-H372E4C
-H372E58
-=proc_stack:<0.5.0>
-374704:SReturn addr 0x225860 (proc_lib:init_p/5 + 164)
-y0:N
-y1:A8:infinity
-y2:A16:application_controller
-y3:H3739F4
-y4:A16:application_controller
-y5:P<0.1.0>
-374720:SReturn addr 0x156F90 (<terminate process normally>)
-y0:SCatch 0x225860 (proc_lib:init_p/5 + 164)
-y1:A3:gen
-y2:A7:init_it
-y3:H372ED0
-=proc_heap:<0.5.0>
-3739F4:t9:A5:state,N,N,N,H373914,N,H373928,N,N
-373928:lH37391C|H372F54
-37391C:t2:A6:stdlib,A9:permanent
-372F54:lH372F90|N
-372F90:t2:A6:kernel,A9:permanent
-373914:lH373908|H372F4C
-373908:t2:A6:stdlib,A9:undefined
-372F4C:lH372F84|N
-372F84:t2:A6:kernel,P<0.7.0>
-372ED0:lAA:gen_server|H372F5C
-372F5C:lP<0.1.0>|H372F9C
-372F9C:lP<0.1.0>|H372FC4
-372FC4:lH372FEC|H372FF8
-372FEC:t2:A5:local,A16:application_controller
-372FF8:lA16:application_controller|H373018
-373018:lH373038|H373048
-373038:t3:AB:application,A6:kernel,H373060
-373060:lH373078|H373084
-373078:t2:AB:description,H37309C
-37309C:lI69|H3730C8
-3730C8:lI82|H3730FC
-3730FC:lI84|H373130
-373130:lI83|H37316C
-37316C:lI32|H3731A8
-3731A8:lI32|H3731E4
-3731E4:lI67|H373220
-373220:lI88|H37325C
-37325C:lI67|H37329C
-37329C:lI32|H3732D0
-3732D0:lI49|H3732FC
-3732FC:lI51|H373328
-373328:lI56|H373348
-373348:lI32|H373368
-373368:lI49|H373388
-373388:lI48|N
-373084:lH3730A4|H3730B0
-3730A4:t2:A3:vsn,H3730D0
-3730D0:lI50|H373104
-373104:lI46|H373138
-373138:lI57|N
-3730B0:lH3730D8|H3730E4
-3730D8:t2:A2:id,N
-3730E4:lH37310C|H373118
-37310C:t2:A7:modules,H373140
-373140:lAB:application|H373174
-373174:lA16:application_controller|H3731B0
-3731B0:lA12:application_master|H3731EC
-3731EC:lA13:application_starter|H373228
-373228:lA4:auth|H373264
-373264:lA4:code|H3732A4
-3732A4:lA8:code_aux|H3732D8
-3732D8:lA8:packages|H373304
-373304:lAB:code_server|H373330
-373330:lA9:dist_util|H373350
-373350:lAF:erl_boot_server|H373370
-373370:lA10:erl_distribution|H373390
-373390:lAF:erl_prim_loader|H3733A8
-3733A8:lA9:erl_reply|H3733C0
-3733C0:lA6:erlang|H3733D8
-3733D8:lAD:error_handler|H3733F0
-3733F0:lAC:error_logger|H373408
-373408:lA4:file|H373420
-373420:lAB:file_server|H373438
-373438:lAF:old_file_server|H373450
-373450:lAE:file_io_server|H373468
-373468:lA9:prim_file|H373480
-373480:lA6:global|H373498
-373498:lAC:global_group|H3734B0
-3734B0:lAD:global_search|H3734C8
-3734C8:lA5:group|H3734E0
-3734E0:lA5:heart|H3734F8
-3734F8:lA13:hipe_unified_loader|H373510
-373510:lA11:hipe_sparc_loader|H373520
-373520:lAF:hipe_x86_loader|H373530
-373530:lA9:inet6_tcp|H373540
-373540:lAE:inet6_tcp_dist|H373550
-373550:lA9:inet6_udp|H373560
-373560:lAB:inet_config|H373570
-373570:lAA:inet_hosts|H373580
-373580:lA13:inet_gethost_native|H373590
-373590:lAD:inet_tcp_dist|H3735A0
-3735A0:lA4:init|H3735B0
-3735B0:lA6:kernel|H3735C0
-3735C0:lAD:kernel_config|H3735D0
-3735D0:lA3:net|H3735E0
-3735E0:lA7:net_adm|H3735F0
-3735F0:lAA:net_kernel|H373600
-373600:lA2:os|H373610
-373610:lA8:ram_file|H373620
-373620:lA3:rpc|H373630
-373630:lA4:user|H373640
-373640:lA8:user_drv|H373650
-373650:lA8:user_sup|H373660
-373660:lA8:disk_log|H373670
-373670:lAA:disk_log_1|H373680
-373680:lAF:disk_log_server|H373690
-373690:lAC:disk_log_sup|H3736A0
-3736A0:lA7:dist_ac|H3736B0
-3736B0:lA8:erl_ddll|H3736C0
-3736C0:lA8:erl_epmd|H3736D0
-3736D0:lAA:erts_debug|H3736E0
-3736E0:lA7:gen_tcp|H3736F0
-3736F0:lA7:gen_udp|H373700
-373700:lA9:prim_inet|H373708
-373708:lA4:inet|H373710
-373710:lA7:inet_db|H373718
-373718:lA8:inet_dns|H373720
-373720:lAA:inet_parse|H373728
-373728:lA8:inet_res|H373730
-373730:lA8:inet_tcp|H373738
-373738:lA8:inet_udp|H373740
-373740:lA3:pg2|H373748
-373748:lA9:seq_trace|H373750
-373750:lA6:socks5|H373758
-373758:lAB:socks5_auth|H373760
-373760:lAA:socks5_tcp|H373768
-373768:lAA:socks5_udp|H373770
-373770:lAF:wrap_log_reader|H373778
-373778:lA4:zlib|H373780
-373780:lA9:otp_ring0|N
-373118:lH373148|H373154
-373148:t2:AA:registered,H37317C
-37317C:lA16:application_controller|H3731B8
-3731B8:lA9:erl_reply|H3731F4
-3731F4:lA4:auth|H373230
-373230:lAB:boot_server|H37326C
-37326C:lAB:code_server|H3732AC
-3732AC:lAF:disk_log_server|H3732E0
-3732E0:lAC:disk_log_sup|H37330C
-37330C:lAF:erl_prim_loader|H373338
-373338:lAC:error_logger|H373358
-373358:lAB:file_server|H373378
-373378:lAD:file_server_2|H373398
-373398:lAF:fixtable_server|H3733B0
-3733B0:lAC:global_group|H3733C8
-3733C8:lA12:global_name_server|H3733E0
-3733E0:lA5:heart|H3733F8
-3733F8:lA4:init|H373410
-373410:lAD:kernel_config|H373428
-373428:lAA:kernel_sup|H373440
-373440:lAA:net_kernel|H373458
-373458:lA7:net_sup|H373470
-373470:lA3:rex|H373488
-373488:lA4:user|H3734A0
-3734A0:lA9:os_server|H3734B8
-3734B8:lAB:ddll_server|H3734D0
-3734D0:lA8:erl_epmd|H3734E8
-3734E8:lA7:inet_db|H373500
-373500:lA3:pg2|N
-373154:lH373184|H373190
-373184:t2:AC:applications,N
-373190:lH3731C0|H3731CC
-3731C0:t2:A15:included_applications,N
-3731CC:lH3731FC|H373208
-3731FC:t2:A3:env,H373238
-373238:lH373274|N
-373274:t2:AC:error_logger,A3:tty
-373208:lH373240|H37324C
-373240:t2:AC:start_phases,A9:undefined
-37324C:lH373280|H37328C
-373280:t2:A4:maxT,A8:infinity
-37328C:lH3732B4|H3732C0
-3732B4:t2:A4:maxP,A8:infinity
-3732C0:lH3732E8|N
-3732E8:t2:A3:mod,H373314
-373314:t2:A6:kernel,N
-373048:lN|N
-372E4C:t2:AD:$initial_call,H372EE4
-372EE4:t3:A3:gen,A7:init_it,H372ED0
-372E58:t2:AA:$ancestors,H372EF4
-372EF4:lP<0.1.0>|N
-=proc_dictionary:<0.7.0>
-H369B78
-H369B5C
-=proc_stack:<0.7.0>
-369d64:SReturn addr 0x225860 (proc_lib:init_p/5 + 164)
-y0:H369C2C
-y1:P<0.5.0>
-369d70:SReturn addr 0x156F90 (<terminate process normally>)
-y0:SCatch 0x225860 (proc_lib:init_p/5 + 164)
-y1:A12:application_master
-y2:A4:init
-y3:H369B2C
-=proc_heap:<0.7.0>
-369C2C:t6:A5:state,P<0.8.0>,H3697B0,N,I0,P<0.0.0>
-3697B0:t9:A9:appl_data,A6:kernel,H369B14,A9:undefined,H3697D8,H369A3C,N,A8:infinity,A8:infinity
-369A3C:lAB:application|H369A34
-369A34:lA16:application_controller|H369A2C
-369A2C:lA12:application_master|H369A24
-369A24:lA13:application_starter|H369A1C
-369A1C:lA4:auth|H369A14
-369A14:lA4:code|H369A0C
-369A0C:lA8:code_aux|H369A04
-369A04:lA8:packages|H3699FC
-3699FC:lAB:code_server|H3699F4
-3699F4:lA9:dist_util|H3699EC
-3699EC:lAF:erl_boot_server|H3699E4
-3699E4:lA10:erl_distribution|H3699DC
-3699DC:lAF:erl_prim_loader|H3699D4
-3699D4:lA9:erl_reply|H3699CC
-3699CC:lA6:erlang|H3699C4
-3699C4:lAD:error_handler|H3699BC
-3699BC:lAC:error_logger|H3699B4
-3699B4:lA4:file|H3699AC
-3699AC:lAB:file_server|H3699A4
-3699A4:lAF:old_file_server|H36999C
-36999C:lAE:file_io_server|H369994
-369994:lA9:prim_file|H36998C
-36998C:lA6:global|H369984
-369984:lAC:global_group|H36997C
-36997C:lAD:global_search|H369974
-369974:lA5:group|H36996C
-36996C:lA5:heart|H369964
-369964:lA13:hipe_unified_loader|H36995C
-36995C:lA11:hipe_sparc_loader|H369954
-369954:lAF:hipe_x86_loader|H36994C
-36994C:lA9:inet6_tcp|H369944
-369944:lAE:inet6_tcp_dist|H36993C
-36993C:lA9:inet6_udp|H369934
-369934:lAB:inet_config|H36992C
-36992C:lAA:inet_hosts|H369924
-369924:lA13:inet_gethost_native|H36991C
-36991C:lAD:inet_tcp_dist|H369914
-369914:lA4:init|H36990C
-36990C:lA6:kernel|H369904
-369904:lAD:kernel_config|H3698FC
-3698FC:lA3:net|H3698F4
-3698F4:lA7:net_adm|H3698EC
-3698EC:lAA:net_kernel|H3698E4
-3698E4:lA2:os|H3698DC
-3698DC:lA8:ram_file|H3698D4
-3698D4:lA3:rpc|H3698CC
-3698CC:lA4:user|H3698C4
-3698C4:lA8:user_drv|H3698BC
-3698BC:lA8:user_sup|H3698B4
-3698B4:lA8:disk_log|H3698AC
-3698AC:lAA:disk_log_1|H3698A4
-3698A4:lAF:disk_log_server|H36989C
-36989C:lAC:disk_log_sup|H369894
-369894:lA7:dist_ac|H36988C
-36988C:lA8:erl_ddll|H369884
-369884:lA8:erl_epmd|H36987C
-36987C:lAA:erts_debug|H369874
-369874:lA7:gen_tcp|H36986C
-36986C:lA7:gen_udp|H369864
-369864:lA9:prim_inet|H36985C
-36985C:lA4:inet|H369854
-369854:lA7:inet_db|H36984C
-36984C:lA8:inet_dns|H369844
-369844:lAA:inet_parse|H36983C
-36983C:lA8:inet_res|H369834
-369834:lA8:inet_tcp|H36982C
-36982C:lA8:inet_udp|H369824
-369824:lA3:pg2|H36981C
-36981C:lA9:seq_trace|H369814
-369814:lA6:socks5|H36980C
-36980C:lAB:socks5_auth|H369804
-369804:lAA:socks5_tcp|H3697FC
-3697FC:lAA:socks5_udp|H3697F4
-3697F4:lAF:wrap_log_reader|H3697EC
-3697EC:lA4:zlib|H3697E4
-3697E4:lA9:otp_ring0|N
-3697D8:t2:A6:kernel,N
-369B14:lA16:application_controller|H369B0C
-369B0C:lA9:erl_reply|H369B04
-369B04:lA4:auth|H369AFC
-369AFC:lAB:boot_server|H369AF4
-369AF4:lAB:code_server|H369AEC
-369AEC:lAF:disk_log_server|H369AE4
-369AE4:lAC:disk_log_sup|H369ADC
-369ADC:lAF:erl_prim_loader|H369AD4
-369AD4:lAC:error_logger|H369ACC
-369ACC:lAB:file_server|H369AC4
-369AC4:lAD:file_server_2|H369ABC
-369ABC:lAF:fixtable_server|H369AB4
-369AB4:lAC:global_group|H369AAC
-369AAC:lA12:global_name_server|H369AA4
-369AA4:lA5:heart|H369A9C
-369A9C:lA4:init|H369A94
-369A94:lAD:kernel_config|H369A8C
-369A8C:lAA:kernel_sup|H369A84
-369A84:lAA:net_kernel|H369A7C
-369A7C:lA7:net_sup|H369A74
-369A74:lA3:rex|H369A6C
-369A6C:lA4:user|H369A64
-369A64:lA9:os_server|H369A5C
-369A5C:lAB:ddll_server|H369A54
-369A54:lA8:erl_epmd|H369A4C
-369A4C:lA7:inet_db|H369A44
-369A44:lA3:pg2|N
-369B2C:lP<0.5.0>|H369B24
-369B24:lP<0.6.0>|H3697A8
-3697A8:lH3697B0|H369B1C
-369B1C:lA6:normal|N
-369B78:t2:AD:$initial_call,H369B68
-369B68:t3:A12:application_master,A4:init,H369B2C
-369B5C:t2:AA:$ancestors,H369B54
-369B54:lP<0.6.0>|N
-=proc_stack:<0.8.0>
-384ec0:SReturn addr 0x156F90 (<terminate process normally>)
-y0:H384BDC
-y1:A6:kernel
-y2:P<0.9.0>
-y3:P<0.7.0>
-=proc_heap:<0.8.0>
-384BDC:t2:A5:state,A3:tty
-=proc_dictionary:<0.9.0>
-H376850
-H37685C
-=proc_stack:<0.9.0>
-36bde8:SReturn addr 0x225860 (proc_lib:init_p/5 + 164)
-y0:N
-y1:A8:infinity
-y2:AA:supervisor
-y3:H36B8E8
-y4:AA:kernel_sup
-y5:P<0.8.0>
-36be04:SReturn addr 0x156F90 (<terminate process normally>)
-y0:SCatch 0x225860 (proc_lib:init_p/5 + 164)
-y1:A3:gen
-y2:A7:init_it
-y3:H3768D4
-=proc_heap:<0.9.0>
-36B8E8:tA:A5:state,H376868,AB:one_for_all,H36B8D4,N,I0,I1,N,A6:kernel,N
-36B8D4:lH36B8B0|H36B6E8
-36B8B0:t8:A5:child,P<0.24.0>,AF:kernel_safe_sup,H376BF0,A9:permanent,A8:infinity,AA:supervisor,H376C00
-376C00:lA6:kernel|N
-376BF0:t3:AA:supervisor,AA:start_link,H376C08
-376C08:lH376C10|H376C1C
-376C10:t2:A5:local,AF:kernel_safe_sup
-376C1C:lA6:kernel|H376C24
-376C24:lA4:safe|N
-36B6E8:lH36B6C4|H36B490
-36B6C4:t8:A5:child,P<0.23.0>,AD:kernel_config,H376BB4,A9:permanent,I2000,A6:worker,H376BC4
-376BC4:lAD:kernel_config|N
-376BB4:t3:AD:kernel_config,AA:start_link,N
-36B490:lH36B498|H36B4BC
-36B498:t8:A5:child,P<0.19.0>,A4:user,H376B70,A9:temporary,I2000,AA:supervisor,H376B80
-376B80:lA8:user_sup|N
-376B70:t3:A8:user_sup,A5:start,N
-36B4BC:lH36B4C4|H376CB0
-36B4C4:t8:A5:child,P<0.18.0>,AB:code_server,H376B0C,A9:permanent,I2000,A6:worker,H376B1C
-376B1C:lA4:code|N
-376B0C:t3:A4:code,AA:start_link,N
-376CB0:lH376CB8|H376CDC
-376CB8:t8:A5:child,P<0.17.0>,AB:file_server,H376AB8,A9:permanent,I2000,A6:worker,H376AC8
-376AC8:lAF:old_file_server|N
-376AB8:t3:AF:old_file_server,AA:start_link,N
-376CDC:lH376CE4|H376C2C
-376CE4:t8:A5:child,P<0.16.0>,AD:file_server_2,H376A58,A9:permanent,I2000,A6:worker,H376A68
-376A68:lA4:file|H376AB0
-376AB0:lAB:file_server|H376B04
-376B04:lAE:file_io_server|H376B68
-376B68:lA9:prim_file|N
-376A58:t3:AB:file_server,AA:start_link,N
-376C2C:lH376C34|H376C58
-376C34:t8:A5:child,P<0.15.0>,AC:global_group,H3769F4,A9:permanent,I2000,A6:worker,H376A04
-376A04:lAC:global_group|N
-3769F4:t3:AC:global_group,AA:start_link,N
-376C58:lH376C60|H376C84
-376C60:t8:A5:child,A9:undefined,A7:net_sup,H37696C,A9:permanent,A8:infinity,AA:supervisor,H37697C
-37697C:lA10:erl_distribution|N
-37696C:t3:A10:erl_distribution,AA:start_link,N
-376C84:lH376C8C|H3768A0
-376C8C:t8:A5:child,P<0.14.0>,A7:inet_db,H3768F4,A9:permanent,I2000,A6:worker,H376904
-376904:lA7:inet_db|N
-3768F4:t3:A7:inet_db,AA:start_link,N
-3768A0:lH376938|H37695C
-376938:t8:A5:child,P<0.11.0>,A12:global_name_server,H3769B0,A9:permanent,I2000,A6:worker,H3769C0
-3769C0:lA6:global|N
-3769B0:t3:A6:global,AA:start_link,N
-37695C:lH3769C8|N
-3769C8:t8:A5:child,P<0.10.0>,A3:rex,H376A38,A9:permanent,I2000,A6:worker,H376A48
-376A48:lA3:rpc|N
-376A38:t3:A3:rpc,AA:start_link,N
-376868:t2:A5:local,AA:kernel_sup
-3768D4:lAA:gen_server|H376964
-376964:lP<0.8.0>|H3769EC
-3769EC:lP<0.8.0>|H376A50
-376A50:lH376A9C|H376AA8
-376A9C:t2:A5:local,AA:kernel_sup
-376AA8:lAA:supervisor|H376AFC
-376AFC:lH376B50|H376B60
-376B50:t3:H376868,A6:kernel,N
-376B60:lN|N
-376850:t2:AD:$initial_call,H3768DC
-3768DC:t3:A3:gen,A7:init_it,H3768D4
-37685C:t2:AA:$ancestors,H3768EC
-3768EC:lP<0.8.0>|N
-=proc_dictionary:<0.10.0>
-H367A10
-H3679F4
-=proc_stack:<0.10.0>
-367cec:SReturn addr 0x225860 (proc_lib:init_p/5 + 164)
-y0:N
-y1:A8:infinity
-y2:A3:rpc
-y3:H367AA8
-y4:A3:rex
-y5:P<0.9.0>
-367d08:SReturn addr 0x156F90 (<terminate process normally>)
-y0:SCatch 0x225860 (proc_lib:init_p/5 + 164)
-y1:A3:gen
-y2:A7:init_it
-y3:H3679C4
-=proc_heap:<0.10.0>
-367AA8:t2:I0,A3:nil
-3679C4:lAA:gen_server|H3679BC
-3679BC:lP<0.9.0>|H3679B4
-3679B4:lP<0.9.0>|H367988
-367988:lH367990|H3679AC
-367990:t2:A5:local,A3:rex
-3679AC:lA3:rpc|H3679A4
-3679A4:lN|H36799C
-36799C:lN|N
-367A10:t2:AD:$initial_call,H367A00
-367A00:t3:A3:gen,A7:init_it,H3679C4
-3679F4:t2:AA:$ancestors,H3679EC
-3679EC:lAA:kernel_sup|H3679CC
-3679CC:lP<0.8.0>|N
-=proc_dictionary:<0.11.0>
-H36ADD8
-H36ADBC
-=proc_stack:<0.11.0>
-36b0b4:SReturn addr 0x225860 (proc_lib:init_p/5 + 164)
-y0:N
-y1:A8:infinity
-y2:A6:global
-y3:H36AF0C
-y4:A12:global_name_server
-y5:P<0.9.0>
-36b0d0:SReturn addr 0x156F90 (<terminate process normally>)
-y0:SCatch 0x225860 (proc_lib:init_p/5 + 164)
-y1:A3:gen
-y2:A7:init_it
-y3:H36AD8C
-=proc_heap:<0.11.0>
-36AF0C:t9:A5:state,A4:true,N,N,N,N,AD:nonode@nohost,P<0.12.0>,P<0.13.0>
-36AD8C:lAA:gen_server|H36AD84
-36AD84:lP<0.9.0>|H36AD7C
-36AD7C:lP<0.9.0>|H36AD50
-36AD50:lH36AD58|H36AD74
-36AD58:t2:A5:local,A12:global_name_server
-36AD74:lA6:global|H36AD6C
-36AD6C:lN|H36AD64
-36AD64:lN|N
-36ADD8:t2:AD:$initial_call,H36ADC8
-36ADC8:t3:A3:gen,A7:init_it,H36AD8C
-36ADBC:t2:AA:$ancestors,H36ADB4
-36ADB4:lAA:kernel_sup|H36AD94
-36AD94:lP<0.8.0>|N
-=proc_stack:<0.12.0>
-36921c:SReturn addr 0x261184 (global:init_the_locker/1 + 112)
-y0:N
-y1:N
-y2:N
-y3:N
-y4:N
-y5:N
-y6:A8:infinity
-y7:H368EB0
-y8:P<0.11.0>
-369244:SReturn addr 0x156F90 (<terminate process normally>)
-y0:N
-=proc_heap:<0.12.0>
-368EB0:t3:A5:multi,A9:undefined,N
-=proc_stack:<0.13.0>
-3695d0:SReturn addr 0x2651AC (global:loop_the_deleter/1 + 36)
-y0:A8:infinity
-y1:N
-y2:P<0.11.0>
-3695e0:SReturn addr 0x2654F8 (global:'-start_the_deleter/1-fun-0-'/1 + 20)
-y0:N
-y1:N
-y2:P<0.11.0>
-3695f0:SReturn addr 0x156F90 (<terminate process normally>)
-=proc_heap:<0.13.0>
-=proc_dictionary:<0.14.0>
-H36A998
-H36A9A4
-=proc_stack:<0.14.0>
-372e0c:SReturn addr 0x225860 (proc_lib:init_p/5 + 164)
-y0:N
-y1:A8:infinity
-y2:A7:inet_db
-y3:H36A9B0
-y4:A7:inet_db
-y5:P<0.9.0>
-372e28:SReturn addr 0x156F90 (<terminate process normally>)
-y0:SCatch 0x225860 (proc_lib:init_p/5 + 164)
-y1:A3:gen
-y2:A7:init_it
-y3:H36A9C8
-=proc_heap:<0.14.0>
-36A9B0:t5:A5:state,A7:inet_db,AA:inet_cache,AA:inet_hosts,H36A9E8
-36A9E8:E21:8372000364000D6E6F6E6F6465406E6F686F737400000000060000000000000000
-36A9C8:lAA:gen_server|H36A9F8
-36A9F8:lP<0.9.0>|H36AA08
-36AA08:lP<0.9.0>|H36AA10
-36AA10:lH36AA18|H36AA24
-36AA18:t2:A5:local,A7:inet_db
-36AA24:lA7:inet_db|H36AA2C
-36AA2C:lN|H36AA34
-36AA34:lN|N
-36A998:t2:AD:$initial_call,H36A9D0
-36A9D0:t3:A3:gen,A7:init_it,H36A9C8
-36A9A4:t2:AA:$ancestors,H36A9E0
-36A9E0:lAA:kernel_sup|H36AA00
-36AA00:lP<0.8.0>|N
-=proc_dictionary:<0.15.0>
-H372788
-H3727F8
-H37276C
-H37280C
-H372820
-=proc_stack:<0.15.0>
-372a64:SReturn addr 0x225860 (proc_lib:init_p/5 + 164)
-y0:N
-y1:A8:infinity
-y2:AC:global_group
-y3:H3728C8
-y4:AC:global_group
-y5:P<0.9.0>
-372a80:SReturn addr 0x156F90 (<terminate process normally>)
-y0:SCatch 0x225860 (proc_lib:init_p/5 + 164)
-y1:A3:gen
-y2:A7:init_it
-y3:H37273C
-=proc_heap:<0.15.0>
-3728C8:tC:A5:state,A7:no_conf,A4:true,N,N,N,N,N,AD:nonode@nohost,N,A6:normal,A6:normal
-37273C:lAA:gen_server|H372734
-372734:lP<0.9.0>|H37272C
-37272C:lP<0.9.0>|H372700
-372700:lH372708|H372724
-372708:t2:A5:local,AC:global_group
-372724:lAC:global_group|H37271C
-37271C:lN|H372714
-372714:lN|N
-372788:t2:AD:$initial_call,H372778
-372778:t3:A3:gen,A7:init_it,H37273C
-3727F8:t2:A10:registered_names,H3727F0
-3727F0:lA9:undefined|N
-37276C:t2:AA:$ancestors,H372764
-372764:lAA:kernel_sup|H372744
-372744:lP<0.8.0>|N
-37280C:t2:A4:send,H372804
-372804:lA9:undefined|N
-372820:t2:AC:whereis_name,H372818
-372818:lA9:undefined|N
-=proc_dictionary:<0.16.0>
-H37B918
-H37B924
-=proc_stack:<0.16.0>
-3d303c:SReturn addr 0x225860 (proc_lib:init_p/5 + 164)
-y0:N
-y1:A8:infinity
-y2:AB:file_server
-y3:p<0.4>
-y4:AD:file_server_2
-y5:P<0.9.0>
-3d3058:SReturn addr 0x156F90 (<terminate process normally>)
-y0:SCatch 0x225860 (proc_lib:init_p/5 + 164)
-y1:A3:gen
-y2:A7:init_it
-y3:H37B930
-=proc_heap:<0.16.0>
-37B930:lAA:gen_server|H37B950
-37B950:lP<0.9.0>|H37B960
-37B960:lP<0.9.0>|H37B968
-37B968:lH37B970|H37B97C
-37B970:t2:A5:local,AD:file_server_2
-37B97C:lAB:file_server|H37B984
-37B984:lN|H37B98C
-37B98C:lN|N
-37B918:t2:AD:$initial_call,H37B938
-37B938:t3:A3:gen,A7:init_it,H37B930
-37B924:t2:AA:$ancestors,H37B948
-37B948:lAA:kernel_sup|H37B958
-37B958:lP<0.8.0>|N
-=proc_stack:<0.17.0>
-3763cc:SReturn addr 0x156F90 (<terminate process normally>)
-y0:H376084
-y1:P<0.16.0>
-y2:P<0.9.0>
-=proc_heap:<0.17.0>
-376084:E21:8372000364000D6E6F6E6F6465406E6F686F737400000000160000000000000000
-=proc_stack:<0.18.0>
-3b98e8:SReturn addr 0x156F90 (<terminate process normally>)
-y0:H38AE84
-y1:P<0.9.0>
-=proc_heap:<0.18.0>
-38AE84:t8:A5:state,P<0.9.0>,H3873BC,H38AEB8,I9,I10,A8:no_cache,AB:interactive
-38AEB8:lH3873D4|H38AEE0
-3873D4:lI46|N
-38AEE0:lH3873EC|H38AF10
-3873EC:lI47|H387404
-387404:lI99|H387424
-387424:lI108|H38744C
-38744C:lI101|H38747C
-38747C:lI97|H3874B4
-3874B4:lI114|H3874F4
-3874F4:lI99|H38753C
-38753C:lI97|H38758C
-38758C:lI115|H3875E4
-3875E4:lI101|H387644
-387644:lI47|H3876AC
-3876AC:lI111|H38771C
-38771C:lI116|H387794
-387794:lI112|H387814
-387814:lI47|H38789C
-38789C:lI101|H38792C
-38792C:lI114|H3879BC
-3879BC:lI116|H387A54
-387A54:lI115|H387AF4
-387AF4:lI47|H387B9C
-387B9C:lI108|H387C4C
-387C4C:lI105|H387D04
-387D04:lI98|H387DC4
-387DC4:lI47|H387E8C
-387E8C:lI107|H387F5C
-387F5C:lI101|H388034
-388034:lI114|H388114
-388114:lI110|H3881FC
-3881FC:lI101|H3882EC
-3882EC:lI108|H3883E4
-3883E4:lI47|H3884E4
-3884E4:lI101|H3885EC
-3885EC:lI98|H3886FC
-3886FC:lI105|H388814
-388814:lI110|N
-38AF10:lH38740C|H38AF48
-38740C:lI47|H38742C
-38742C:lI99|H387454
-387454:lI108|H387484
-387484:lI101|H3874BC
-3874BC:lI97|H3874FC
-3874FC:lI114|H387544
-387544:lI99|H387594
-387594:lI97|H3875EC
-3875EC:lI115|H38764C
-38764C:lI101|H3876B4
-3876B4:lI47|H387724
-387724:lI111|H38779C
-38779C:lI116|H38781C
-38781C:lI112|H3878A4
-3878A4:lI47|H387934
-387934:lI101|H3879C4
-3879C4:lI114|H387A5C
-387A5C:lI116|H387AFC
-387AFC:lI115|H387BA4
-387BA4:lI47|H387C54
-387C54:lI108|H387D0C
-387D0C:lI105|H387DCC
-387DCC:lI98|H387E94
-387E94:lI47|H387F64
-387F64:lI115|H38803C
-38803C:lI116|H38811C
-38811C:lI100|H388204
-388204:lI108|H3882F4
-3882F4:lI105|H3883EC
-3883EC:lI98|H3884EC
-3884EC:lI47|H3885F4
-3885F4:lI101|H388704
-388704:lI98|H38881C
-38881C:lI105|H38892C
-38892C:lI110|N
-38AF48:lH387434|H38AF70
-387434:lI47|H38745C
-38745C:lI99|H38748C
-38748C:lI108|H3874C4
-3874C4:lI101|H387504
-387504:lI97|H38754C
-38754C:lI114|H38759C
-38759C:lI99|H3875F4
-3875F4:lI97|H387654
-387654:lI115|H3876BC
-3876BC:lI101|H38772C
-38772C:lI47|H3877A4
-3877A4:lI111|H387824
-387824:lI116|H3878AC
-3878AC:lI112|H38793C
-38793C:lI47|H3879CC
-3879CC:lI101|H387A64
-387A64:lI114|H387B04
-387B04:lI116|H387BAC
-387BAC:lI115|H387C5C
-387C5C:lI47|H387D14
-387D14:lI108|H387DD4
-387DD4:lI105|H387E9C
-387E9C:lI98|H387F6C
-387F6C:lI47|H388044
-388044:lI119|H388124
-388124:lI101|H38820C
-38820C:lI98|H3882FC
-3882FC:lI116|H3883F4
-3883F4:lI111|H3884F4
-3884F4:lI111|H3885FC
-3885FC:lI108|H38870C
-38870C:lI47|H388824
-388824:lI101|H388934
-388934:lI98|H388A44
-388A44:lI105|H388B54
-388B54:lI110|N
-38AF70:lH387464|H38AF98
-387464:lI47|H387494
-387494:lI99|H3874CC
-3874CC:lI108|H38750C
-38750C:lI101|H387554
-387554:lI97|H3875A4
-3875A4:lI114|H3875FC
-3875FC:lI99|H38765C
-38765C:lI97|H3876C4
-3876C4:lI115|H387734
-387734:lI101|H3877AC
-3877AC:lI47|H38782C
-38782C:lI111|H3878B4
-3878B4:lI116|H387944
-387944:lI112|H3879D4
-3879D4:lI47|H387A6C
-387A6C:lI101|H387B0C
-387B0C:lI114|H387BB4
-387BB4:lI116|H387C64
-387C64:lI115|H387D1C
-387D1C:lI47|H387DDC
-387DDC:lI108|H387EA4
-387EA4:lI105|H387F74
-387F74:lI98|H38804C
-38804C:lI47|H38812C
-38812C:lI116|H388214
-388214:lI118|H388304
-388304:lI47|H3883FC
-3883FC:lI101|H3884FC
-3884FC:lI98|H388604
-388604:lI105|H388714
-388714:lI110|N
-38AF98:lH38749C|H38AFC0
-38749C:lI47|H3874D4
-3874D4:lI99|H387514
-387514:lI108|H38755C
-38755C:lI101|H3875AC
-3875AC:lI97|H387604
-387604:lI114|H387664
-387664:lI99|H3876CC
-3876CC:lI97|H38773C
-38773C:lI115|H3877B4
-3877B4:lI101|H387834
-387834:lI47|H3878BC
-3878BC:lI111|H38794C
-38794C:lI116|H3879DC
-3879DC:lI112|H387A74
-387A74:lI47|H387B14
-387B14:lI101|H387BBC
-387BBC:lI114|H387C6C
-387C6C:lI116|H387D24
-387D24:lI115|H387DE4
-387DE4:lI47|H387EAC
-387EAC:lI108|H387F7C
-387F7C:lI105|H388054
-388054:lI98|H388134
-388134:lI47|H38821C
-38821C:lI116|H38830C
-38830C:lI115|H388404
-388404:lI112|H388504
-388504:lI47|H38860C
-38860C:lI101|H38871C
-38871C:lI98|H38882C
-38882C:lI105|H38893C
-38893C:lI110|N
-38AFC0:lH3874DC|H38AFE8
-3874DC:lI47|H38751C
-38751C:lI99|H387564
-387564:lI108|H3875B4
-3875B4:lI101|H38760C
-38760C:lI97|H38766C
-38766C:lI114|H3876D4
-3876D4:lI99|H387744
-387744:lI97|H3877BC
-3877BC:lI115|H38783C
-38783C:lI101|H3878C4
-3878C4:lI47|H387954
-387954:lI111|H3879E4
-3879E4:lI116|H387A7C
-387A7C:lI112|H387B1C
-387B1C:lI47|H387BC4
-387BC4:lI101|H387C74
-387C74:lI114|H387D2C
-387D2C:lI116|H387DEC
-387DEC:lI115|H387EB4
-387EB4:lI47|H387F84
-387F84:lI108|H38805C
-38805C:lI105|H38813C
-38813C:lI98|H388224
-388224:lI47|H388314
-388314:lI116|H38840C
-38840C:lI111|H38850C
-38850C:lI111|H388614
-388614:lI108|H388724
-388724:lI115|H388834
-388834:lI47|H388944
-388944:lI101|H388A4C
-388A4C:lI98|H388B5C
-388B5C:lI105|H388C6C
-388C6C:lI110|N
-38AFE8:lH387524|H38B008
-387524:lI47|H38756C
-38756C:lI99|H3875BC
-3875BC:lI108|H387614
-387614:lI101|H387674
-387674:lI97|H3876DC
-3876DC:lI114|H38774C
-38774C:lI99|H3877C4
-3877C4:lI97|H387844
-387844:lI115|H3878CC
-3878CC:lI101|H38795C
-38795C:lI47|H3879EC
-3879EC:lI111|H387A84
-387A84:lI116|H387B24
-387B24:lI112|H387BCC
-387BCC:lI47|H387C7C
-387C7C:lI101|H387D34
-387D34:lI114|H387DF4
-387DF4:lI116|H387EBC
-387EBC:lI115|H387F8C
-387F8C:lI47|H388064
-388064:lI108|H388144
-388144:lI105|H38822C
-38822C:lI98|H38831C
-38831C:lI47|H388414
-388414:lI116|H388514
-388514:lI111|H38861C
-38861C:lI111|H38872C
-38872C:lI108|H38883C
-38883C:lI98|H38894C
-38894C:lI97|H388A54
-388A54:lI114|H388B64
-388B64:lI47|H388C74
-388C74:lI101|H388D84
-388D84:lI98|H388E9C
-388E9C:lI105|H388FB4
-388FB4:lI110|N
-38B008:lH387574|H38B018
-387574:lI47|H3875C4
-3875C4:lI99|H38761C
-38761C:lI108|H38767C
-38767C:lI101|H3876E4
-3876E4:lI97|H387754
-387754:lI114|H3877CC
-3877CC:lI99|H38784C
-38784C:lI97|H3878D4
-3878D4:lI115|H387964
-387964:lI101|H3879F4
-3879F4:lI47|H387A8C
-387A8C:lI111|H387B2C
-387B2C:lI116|H387BD4
-387BD4:lI112|H387C84
-387C84:lI47|H387D3C
-387D3C:lI101|H387DFC
-387DFC:lI114|H387EC4
-387EC4:lI116|H387F94
-387F94:lI115|H38806C
-38806C:lI47|H38814C
-38814C:lI108|H388234
-388234:lI105|H388324
-388324:lI98|H38841C
-38841C:lI47|H38851C
-38851C:lI116|H388624
-388624:lI101|H388734
-388734:lI115|H388844
-388844:lI116|H388954
-388954:lI95|H388A5C
-388A5C:lI115|H388B6C
-388B6C:lI101|H388C7C
-388C7C:lI114|H388D8C
-388D8C:lI118|H388EA4
-388EA4:lI101|H388FBC
-388FBC:lI114|H3890D4
-3890D4:lI47|H3891EC
-3891EC:lI101|H3892FC
-3892FC:lI98|H38940C
-38940C:lI105|H38951C
-38951C:lI110|N
-38B018:lH3875CC|H38AE7C
-3875CC:lI47|H387624
-387624:lI99|H387684
-387684:lI108|H3876EC
-3876EC:lI101|H38775C
-38775C:lI97|H3877D4
-3877D4:lI114|H387854
-387854:lI99|H3878DC
-3878DC:lI97|H38796C
-38796C:lI115|H3879FC
-3879FC:lI101|H387A94
-387A94:lI47|H387B34
-387B34:lI111|H387BDC
-387BDC:lI116|H387C8C
-387C8C:lI112|H387D44
-387D44:lI47|H387E04
-387E04:lI101|H387ECC
-387ECC:lI114|H387F9C
-387F9C:lI116|H388074
-388074:lI115|H388154
-388154:lI47|H38823C
-38823C:lI108|H38832C
-38832C:lI105|H388424
-388424:lI98|H388524
-388524:lI47|H38862C
-38862C:lI115|H38873C
-38873C:lI115|H38884C
-38884C:lI108|H38895C
-38895C:lI47|H388A64
-388A64:lI101|H388B74
-388B74:lI98|H388C84
-388C84:lI105|H388D94
-388D94:lI110|N
-38AE7C:lH38762C|H38AEB0
-38762C:lI47|H38768C
-38768C:lI99|H3876F4
-3876F4:lI108|H387764
-387764:lI101|H3877DC
-3877DC:lI97|H38785C
-38785C:lI114|H3878E4
-3878E4:lI99|H387974
-387974:lI97|H387A04
-387A04:lI115|H387A9C
-387A9C:lI101|H387B3C
-387B3C:lI47|H387BE4
-387BE4:lI111|H387C94
-387C94:lI116|H387D4C
-387D4C:lI112|H387E0C
-387E0C:lI47|H387ED4
-387ED4:lI101|H387FA4
-387FA4:lI114|H38807C
-38807C:lI116|H38815C
-38815C:lI115|H388244
-388244:lI47|H388334
-388334:lI108|H38842C
-38842C:lI105|H38852C
-38852C:lI98|H388634
-388634:lI47|H388744
-388744:lI115|H388854
-388854:lI110|H388964
-388964:lI109|H388A6C
-388A6C:lI112|H388B7C
-388B7C:lI47|H388C8C
-388C8C:lI101|H388D9C
-388D9C:lI98|H388EAC
-388EAC:lI105|H388FC4
-388FC4:lI110|N
-38AEB0:lH387694|H38AED8
-387694:lI47|H3876FC
-3876FC:lI99|H38776C
-38776C:lI108|H3877E4
-3877E4:lI101|H387864
-387864:lI97|H3878EC
-3878EC:lI114|H38797C
-38797C:lI99|H387A0C
-387A0C:lI97|H387AA4
-387AA4:lI115|H387B44
-387B44:lI101|H387BEC
-387BEC:lI47|H387C9C
-387C9C:lI111|H387D54
-387D54:lI116|H387E14
-387E14:lI112|H387EDC
-387EDC:lI47|H387FAC
-387FAC:lI101|H388084
-388084:lI114|H388164
-388164:lI116|H38824C
-38824C:lI115|H38833C
-38833C:lI47|H388434
-388434:lI108|H388534
-388534:lI105|H38863C
-38863C:lI98|H38874C
-38874C:lI47|H38885C
-38885C:lI115|H38896C
-38896C:lI97|H388A74
-388A74:lI115|H388B84
-388B84:lI108|H388C94
-388C94:lI47|H388DA4
-388DA4:lI101|H388EB4
-388EB4:lI98|H388FCC
-388FCC:lI105|H3890DC
-3890DC:lI110|N
-38AED8:lH387704|H38AF08
-387704:lI47|H387774
-387774:lI99|H3877EC
-3877EC:lI108|H38786C
-38786C:lI101|H3878F4
-3878F4:lI97|H387984
-387984:lI114|H387A14
-387A14:lI99|H387AAC
-387AAC:lI97|H387B4C
-387B4C:lI115|H387BF4
-387BF4:lI101|H387CA4
-387CA4:lI47|H387D5C
-387D5C:lI111|H387E1C
-387E1C:lI116|H387EE4
-387EE4:lI112|H387FB4
-387FB4:lI47|H38808C
-38808C:lI101|H38816C
-38816C:lI114|H388254
-388254:lI116|H388344
-388344:lI115|H38843C
-38843C:lI47|H38853C
-38853C:lI108|H388644
-388644:lI105|H388754
-388754:lI98|H388864
-388864:lI47|H388974
-388974:lI114|H388A7C
-388A7C:lI117|H388B8C
-388B8C:lI110|H388C9C
-388C9C:lI116|H388DAC
-388DAC:lI105|H388EBC
-388EBC:lI109|H388FD4
-388FD4:lI101|H3890E4
-3890E4:lI95|H3891F4
-3891F4:lI116|H389304
-389304:lI111|H389414
-389414:lI111|H389524
-389524:lI108|H389624
-389624:lI115|H38971C
-38971C:lI47|H389814
-389814:lI101|H38990C
-38990C:lI98|H389A04
-389A04:lI105|H389AE4
-389AE4:lI110|N
-38AF08:lH38777C|H38AF40
-38777C:lI47|H3877F4
-3877F4:lI99|H387874
-387874:lI108|H3878FC
-3878FC:lI101|H38798C
-38798C:lI97|H387A1C
-387A1C:lI114|H387AB4
-387AB4:lI99|H387B54
-387B54:lI97|H387BFC
-387BFC:lI115|H387CAC
-387CAC:lI101|H387D64
-387D64:lI47|H387E24
-387E24:lI111|H387EEC
-387EEC:lI116|H387FBC
-387FBC:lI112|H388094
-388094:lI47|H388174
-388174:lI101|H38825C
-38825C:lI114|H38834C
-38834C:lI116|H388444
-388444:lI115|H388544
-388544:lI47|H38864C
-38864C:lI108|H38875C
-38875C:lI105|H38886C
-38886C:lI98|H38897C
-38897C:lI47|H388A84
-388A84:lI114|H388B94
-388B94:lI115|H388CA4
-388CA4:lI104|H388DB4
-388DB4:lI101|H388EC4
-388EC4:lI108|H388FDC
-388FDC:lI108|H3890EC
-3890EC:lI47|H3891FC
-3891FC:lI101|H38930C
-38930C:lI98|H38941C
-38941C:lI105|H38952C
-38952C:lI110|N
-38AF40:lH3877FC|H38AF68
-3877FC:lI47|H38787C
-38787C:lI99|H387904
-387904:lI108|H387994
-387994:lI101|H387A24
-387A24:lI97|H387ABC
-387ABC:lI114|H387B5C
-387B5C:lI99|H387C04
-387C04:lI97|H387CB4
-387CB4:lI115|H387D6C
-387D6C:lI101|H387E2C
-387E2C:lI47|H387EF4
-387EF4:lI111|H387FC4
-387FC4:lI116|H38809C
-38809C:lI112|H38817C
-38817C:lI47|H388264
-388264:lI101|H388354
-388354:lI114|H38844C
-38844C:lI116|H38854C
-38854C:lI115|H388654
-388654:lI47|H388764
-388764:lI108|H388874
-388874:lI105|H388984
-388984:lI98|H388A8C
-388A8C:lI47|H388B9C
-388B9C:lI112|H388CAC
-388CAC:lI109|H388DBC
-388DBC:lI97|H388ECC
-388ECC:lI110|H388FE4
-388FE4:lI47|H3890F4
-3890F4:lI101|H389204
-389204:lI98|H389314
-389314:lI105|H389424
-389424:lI110|N
-38AF68:lH387884|H38AF90
-387884:lI47|H38790C
-38790C:lI99|H38799C
-38799C:lI108|H387A2C
-387A2C:lI101|H387AC4
-387AC4:lI97|H387B64
-387B64:lI114|H387C0C
-387C0C:lI99|H387CBC
-387CBC:lI97|H387D74
-387D74:lI115|H387E34
-387E34:lI101|H387EFC
-387EFC:lI47|H387FCC
-387FCC:lI111|H3880A4
-3880A4:lI116|H388184
-388184:lI112|H38826C
-38826C:lI47|H38835C
-38835C:lI101|H388454
-388454:lI114|H388554
-388554:lI116|H38865C
-38865C:lI115|H38876C
-38876C:lI47|H38887C
-38887C:lI108|H38898C
-38898C:lI105|H388A94
-388A94:lI98|H388BA4
-388BA4:lI47|H388CB4
-388CB4:lI112|H388DC4
-388DC4:lI97|H388ED4
-388ED4:lI114|H388FEC
-388FEC:lI115|H3890FC
-3890FC:lI101|H38920C
-38920C:lI116|H38931C
-38931C:lI111|H38942C
-38942C:lI111|H389534
-389534:lI108|H38962C
-38962C:lI115|H389724
-389724:lI47|H38981C
-38981C:lI101|H389914
-389914:lI98|H389A0C
-389A0C:lI105|H389AEC
-389AEC:lI110|N
-38AF90:lH387914|H38AFB8
-387914:lI47|H3879A4
-3879A4:lI99|H387A34
-387A34:lI108|H387ACC
-387ACC:lI101|H387B6C
-387B6C:lI97|H387C14
-387C14:lI114|H387CC4
-387CC4:lI99|H387D7C
-387D7C:lI97|H387E3C
-387E3C:lI115|H387F04
-387F04:lI101|H387FD4
-387FD4:lI47|H3880AC
-3880AC:lI111|H38818C
-38818C:lI116|H388274
-388274:lI112|H388364
-388364:lI47|H38845C
-38845C:lI101|H38855C
-38855C:lI114|H388664
-388664:lI116|H388774
-388774:lI115|H388884
-388884:lI47|H388994
-388994:lI108|H388A9C
-388A9C:lI105|H388BAC
-388BAC:lI98|H388CBC
-388CBC:lI47|H388DCC
-388DCC:lI111|H388EDC
-388EDC:lI116|H388FF4
-388FF4:lI112|H389104
-389104:lI95|H389214
-389214:lI109|H389324
-389324:lI105|H389434
-389434:lI98|H38953C
-38953C:lI115|H389634
-389634:lI47|H38972C
-38972C:lI101|H389824
-389824:lI98|H38991C
-38991C:lI105|H389A14
-389A14:lI110|N
-38AFB8:lH3879AC|H38AFE0
-3879AC:lI47|H387A3C
-387A3C:lI99|H387AD4
-387AD4:lI108|H387B74
-387B74:lI101|H387C1C
-387C1C:lI97|H387CCC
-387CCC:lI114|H387D84
-387D84:lI99|H387E44
-387E44:lI97|H387F0C
-387F0C:lI115|H387FDC
-387FDC:lI101|H3880B4
-3880B4:lI47|H388194
-388194:lI111|H38827C
-38827C:lI116|H38836C
-38836C:lI112|H388464
-388464:lI47|H388564
-388564:lI101|H38866C
-38866C:lI114|H38877C
-38877C:lI116|H38888C
-38888C:lI115|H38899C
-38899C:lI47|H388AA4
-388AA4:lI108|H388BB4
-388BB4:lI105|H388CC4
-388CC4:lI98|H388DD4
-388DD4:lI47|H388EE4
-388EE4:lI111|H388FFC
-388FFC:lI115|H38910C
-38910C:lI95|H38921C
-38921C:lI109|H38932C
-38932C:lI111|H38943C
-38943C:lI110|H389544
-389544:lI47|H38963C
-38963C:lI101|H389734
-389734:lI98|H38982C
-38982C:lI105|H389924
-389924:lI110|N
-38AFE0:lH387A44|H38B000
-387A44:lI47|H387ADC
-387ADC:lI99|H387B7C
-387B7C:lI108|H387C24
-387C24:lI101|H387CD4
-387CD4:lI97|H387D8C
-387D8C:lI114|H387E4C
-387E4C:lI99|H387F14
-387F14:lI97|H387FE4
-387FE4:lI115|H3880BC
-3880BC:lI101|H38819C
-38819C:lI47|H388284
-388284:lI111|H388374
-388374:lI116|H38846C
-38846C:lI112|H38856C
-38856C:lI47|H388674
-388674:lI101|H388784
-388784:lI114|H388894
-388894:lI116|H3889A4
-3889A4:lI115|H388AAC
-388AAC:lI47|H388BBC
-388BBC:lI108|H388CCC
-388CCC:lI105|H388DDC
-388DDC:lI98|H388EEC
-388EEC:lI47|H389004
-389004:lI111|H389114
-389114:lI114|H389224
-389224:lI98|H389334
-389334:lI101|H389444
-389444:lI114|H38954C
-38954C:lI47|H389644
-389644:lI101|H38973C
-38973C:lI98|H389834
-389834:lI105|H38992C
-38992C:lI110|N
-38B000:lH387AE4|H38B010
-387AE4:lI47|H387B84
-387B84:lI99|H387C2C
-387C2C:lI108|H387CDC
-387CDC:lI101|H387D94
-387D94:lI97|H387E54
-387E54:lI114|H387F1C
-387F1C:lI99|H387FEC
-387FEC:lI97|H3880C4
-3880C4:lI115|H3881A4
-3881A4:lI101|H38828C
-38828C:lI47|H38837C
-38837C:lI111|H388474
-388474:lI116|H388574
-388574:lI112|H38867C
-38867C:lI47|H38878C
-38878C:lI101|H38889C
-38889C:lI114|H3889AC
-3889AC:lI116|H388AB4
-388AB4:lI115|H388BC4
-388BC4:lI47|H388CD4
-388CD4:lI108|H388DE4
-388DE4:lI105|H388EF4
-388EF4:lI98|H38900C
-38900C:lI47|H38911C
-38911C:lI111|H38922C
-38922C:lI100|H38933C
-38933C:lI98|H38944C
-38944C:lI99|H389554
-389554:lI47|H38964C
-38964C:lI101|H389744
-389744:lI98|H38983C
-38983C:lI105|H389934
-389934:lI110|N
-38B010:lH387B8C|H38B020
-387B8C:lI47|H387C34
-387C34:lI99|H387CE4
-387CE4:lI108|H387D9C
-387D9C:lI101|H387E5C
-387E5C:lI97|H387F24
-387F24:lI114|H387FF4
-387FF4:lI99|H3880CC
-3880CC:lI97|H3881AC
-3881AC:lI115|H388294
-388294:lI101|H388384
-388384:lI47|H38847C
-38847C:lI111|H38857C
-38857C:lI116|H388684
-388684:lI112|H388794
-388794:lI47|H3888A4
-3888A4:lI101|H3889B4
-3889B4:lI114|H388ABC
-388ABC:lI116|H388BCC
-388BCC:lI115|H388CDC
-388CDC:lI47|H388DEC
-388DEC:lI108|H388EFC
-388EFC:lI105|H389014
-389014:lI98|H389124
-389124:lI47|H389234
-389234:lI111|H389344
-389344:lI98|H389454
-389454:lI115|H38955C
-38955C:lI101|H389654
-389654:lI114|H38974C
-38974C:lI118|H389844
-389844:lI101|H38993C
-38993C:lI114|H389A1C
-389A1C:lI47|H389AF4
-389AF4:lI101|H389BBC
-389BBC:lI98|H389C84
-389C84:lI105|H389D4C
-389D4C:lI110|N
-38B020:lH387C3C|H38B028
-387C3C:lI47|H387CEC
-387CEC:lI99|H387DA4
-387DA4:lI108|H387E64
-387E64:lI101|H387F2C
-387F2C:lI97|H387FFC
-387FFC:lI114|H3880D4
-3880D4:lI99|H3881B4
-3881B4:lI97|H38829C
-38829C:lI115|H38838C
-38838C:lI101|H388484
-388484:lI47|H388584
-388584:lI111|H38868C
-38868C:lI116|H38879C
-38879C:lI112|H3888AC
-3888AC:lI47|H3889BC
-3889BC:lI101|H388AC4
-388AC4:lI114|H388BD4
-388BD4:lI116|H388CE4
-388CE4:lI115|H388DF4
-388DF4:lI47|H388F04
-388F04:lI108|H38901C
-38901C:lI105|H38912C
-38912C:lI98|H38923C
-38923C:lI47|H38934C
-38934C:lI109|H38945C
-38945C:lI110|H389564
-389564:lI101|H38965C
-38965C:lI115|H389754
-389754:lI105|H38984C
-38984C:lI97|H389944
-389944:lI95|H389A24
-389A24:lI115|H389AFC
-389AFC:lI101|H389BC4
-389BC4:lI115|H389C8C
-389C8C:lI115|H389D54
-389D54:lI105|H389E14
-389E14:lI111|H389ECC
-389ECC:lI110|H389F7C
-389F7C:lI47|H38A01C
-38A01C:lI101|H38A0AC
-38A0AC:lI98|H38A12C
-38A12C:lI105|H38A19C
-38A19C:lI110|N
-38B028:lH387CF4|H38B030
-387CF4:lI47|H387DAC
-387DAC:lI99|H387E6C
-387E6C:lI108|H387F34
-387F34:lI101|H388004
-388004:lI97|H3880DC
-3880DC:lI114|H3881BC
-3881BC:lI99|H3882A4
-3882A4:lI97|H388394
-388394:lI115|H38848C
-38848C:lI101|H38858C
-38858C:lI47|H388694
-388694:lI111|H3887A4
-3887A4:lI116|H3888B4
-3888B4:lI112|H3889C4
-3889C4:lI47|H388ACC
-388ACC:lI101|H388BDC
-388BDC:lI114|H388CEC
-388CEC:lI116|H388DFC
-388DFC:lI115|H388F0C
-388F0C:lI47|H389024
-389024:lI108|H389134
-389134:lI105|H389244
-389244:lI98|H389354
-389354:lI47|H389464
-389464:lI109|H38956C
-38956C:lI110|H389664
-389664:lI101|H38975C
-38975C:lI115|H389854
-389854:lI105|H38994C
-38994C:lI97|H389A2C
-389A2C:lI47|H389B04
-389B04:lI101|H389BCC
-389BCC:lI98|H389C94
-389C94:lI105|H389D5C
-389D5C:lI110|N
-38B030:lH387DB4|H38B038
-387DB4:lI47|H387E74
-387E74:lI99|H387F3C
-387F3C:lI108|H38800C
-38800C:lI101|H3880E4
-3880E4:lI97|H3881C4
-3881C4:lI114|H3882AC
-3882AC:lI99|H38839C
-38839C:lI97|H388494
-388494:lI115|H388594
-388594:lI101|H38869C
-38869C:lI47|H3887AC
-3887AC:lI111|H3888BC
-3888BC:lI116|H3889CC
-3889CC:lI112|H388AD4
-388AD4:lI47|H388BE4
-388BE4:lI101|H388CF4
-388CF4:lI114|H388E04
-388E04:lI116|H388F14
-388F14:lI115|H38902C
-38902C:lI47|H38913C
-38913C:lI108|H38924C
-38924C:lI105|H38935C
-38935C:lI98|H38946C
-38946C:lI47|H389574
-389574:lI109|H38966C
-38966C:lI110|H389764
-389764:lI101|H38985C
-38985C:lI109|H389954
-389954:lI111|H389A34
-389A34:lI115|H389B0C
-389B0C:lI121|H389BD4
-389BD4:lI110|H389C9C
-389C9C:lI101|H389D64
-389D64:lI47|H389E1C
-389E1C:lI101|H389ED4
-389ED4:lI98|H389F84
-389F84:lI105|H38A024
-38A024:lI110|N
-38B038:lH387E7C|H38B040
-387E7C:lI47|H387F44
-387F44:lI99|H388014
-388014:lI108|H3880EC
-3880EC:lI101|H3881CC
-3881CC:lI97|H3882B4
-3882B4:lI114|H3883A4
-3883A4:lI99|H38849C
-38849C:lI97|H38859C
-38859C:lI115|H3886A4
-3886A4:lI101|H3887B4
-3887B4:lI47|H3888C4
-3888C4:lI111|H3889D4
-3889D4:lI116|H388ADC
-388ADC:lI112|H388BEC
-388BEC:lI47|H388CFC
-388CFC:lI101|H388E0C
-388E0C:lI114|H388F1C
-388F1C:lI116|H389034
-389034:lI115|H389144
-389144:lI47|H389254
-389254:lI108|H389364
-389364:lI105|H389474
-389474:lI98|H38957C
-38957C:lI47|H389674
-389674:lI109|H38976C
-38976C:lI101|H389864
-389864:lI103|H38995C
-38995C:lI97|H389A3C
-389A3C:lI99|H389B14
-389B14:lI111|H389BDC
-389BDC:lI47|H389CA4
-389CA4:lI101|H389D6C
-389D6C:lI98|H389E24
-389E24:lI105|H389EDC
-389EDC:lI110|N
-38B040:lH387F4C|H38B048
-387F4C:lI47|H38801C
-38801C:lI99|H3880F4
-3880F4:lI108|H3881D4
-3881D4:lI101|H3882BC
-3882BC:lI97|H3883AC
-3883AC:lI114|H3884A4
-3884A4:lI99|H3885A4
-3885A4:lI97|H3886AC
-3886AC:lI115|H3887BC
-3887BC:lI101|H3888CC
-3888CC:lI47|H3889DC
-3889DC:lI111|H388AE4
-388AE4:lI116|H388BF4
-388BF4:lI112|H388D04
-388D04:lI47|H388E14
-388E14:lI101|H388F24
-388F24:lI114|H38903C
-38903C:lI116|H38914C
-38914C:lI115|H38925C
-38925C:lI47|H38936C
-38936C:lI108|H38947C
-38947C:lI105|H389584
-389584:lI98|H38967C
-38967C:lI47|H389774
-389774:lI106|H38986C
-38986C:lI105|H389964
-389964:lI110|H389A44
-389A44:lI116|H389B1C
-389B1C:lI101|H389BE4
-389BE4:lI114|H389CAC
-389CAC:lI102|H389D74
-389D74:lI97|H389E2C
-389E2C:lI99|H389EE4
-389EE4:lI101|N
-38B048:lH388024|H38B050
-388024:lI47|H3880FC
-3880FC:lI99|H3881DC
-3881DC:lI108|H3882C4
-3882C4:lI101|H3883B4
-3883B4:lI97|H3884AC
-3884AC:lI114|H3885AC
-3885AC:lI99|H3886B4
-3886B4:lI97|H3887C4
-3887C4:lI115|H3888D4
-3888D4:lI101|H3889E4
-3889E4:lI47|H388AEC
-388AEC:lI111|H388BFC
-388BFC:lI116|H388D0C
-388D0C:lI112|H388E1C
-388E1C:lI47|H388F2C
-388F2C:lI101|H389044
-389044:lI114|H389154
-389154:lI116|H389264
-389264:lI115|H389374
-389374:lI47|H389484
-389484:lI108|H38958C
-38958C:lI105|H389684
-389684:lI98|H38977C
-38977C:lI47|H389874
-389874:lI105|H38996C
-38996C:lI110|H389A4C
-389A4C:lI101|H389B24
-389B24:lI116|H389BEC
-389BEC:lI115|H389CB4
-389CB4:lI47|H389D7C
-389D7C:lI101|H389E34
-389E34:lI98|H389EEC
-389EEC:lI105|H389F8C
-389F8C:lI110|N
-38B050:lH388104|H38B058
-388104:lI47|H3881E4
-3881E4:lI99|H3882CC
-3882CC:lI108|H3883BC
-3883BC:lI101|H3884B4
-3884B4:lI97|H3885B4
-3885B4:lI114|H3886BC
-3886BC:lI99|H3887CC
-3887CC:lI97|H3888DC
-3888DC:lI115|H3889EC
-3889EC:lI101|H388AF4
-388AF4:lI47|H388C04
-388C04:lI111|H388D14
-388D14:lI116|H388E24
-388E24:lI112|H388F34
-388F34:lI47|H38904C
-38904C:lI101|H38915C
-38915C:lI114|H38926C
-38926C:lI116|H38937C
-38937C:lI115|H38948C
-38948C:lI47|H389594
-389594:lI108|H38968C
-38968C:lI105|H389784
-389784:lI98|H38987C
-38987C:lI47|H389974
-389974:lI105|H389A54
-389A54:lI99|H389B2C
-389B2C:lI47|H389BF4
-389BF4:lI101|H389CBC
-389CBC:lI98|H389D84
-389D84:lI105|H389E3C
-389E3C:lI110|N
-38B058:lH3881EC|H38B060
-3881EC:lI47|H3882D4
-3882D4:lI99|H3883C4
-3883C4:lI108|H3884BC
-3884BC:lI101|H3885BC
-3885BC:lI97|H3886C4
-3886C4:lI114|H3887D4
-3887D4:lI99|H3888E4
-3888E4:lI97|H3889F4
-3889F4:lI115|H388AFC
-388AFC:lI101|H388C0C
-388C0C:lI47|H388D1C
-388D1C:lI111|H388E2C
-388E2C:lI116|H388F3C
-388F3C:lI112|H389054
-389054:lI47|H389164
-389164:lI101|H389274
-389274:lI114|H389384
-389384:lI116|H389494
-389494:lI115|H38959C
-38959C:lI47|H389694
-389694:lI108|H38978C
-38978C:lI105|H389884
-389884:lI98|H38997C
-38997C:lI47|H389A5C
-389A5C:lI104|H389B34
-389B34:lI105|H389BFC
-389BFC:lI112|H389CC4
-389CC4:lI101|H389D8C
-389D8C:lI47|H389E44
-389E44:lI101|H389EF4
-389EF4:lI98|H389F94
-389F94:lI105|H38A02C
-38A02C:lI110|N
-38B060:lH3882DC|H38B068
-3882DC:lI47|H3883CC
-3883CC:lI99|H3884C4
-3884C4:lI108|H3885C4
-3885C4:lI101|H3886CC
-3886CC:lI97|H3887DC
-3887DC:lI114|H3888EC
-3888EC:lI99|H3889FC
-3889FC:lI97|H388B04
-388B04:lI115|H388C14
-388C14:lI101|H388D24
-388D24:lI47|H388E34
-388E34:lI111|H388F44
-388F44:lI116|H38905C
-38905C:lI112|H38916C
-38916C:lI47|H38927C
-38927C:lI101|H38938C
-38938C:lI114|H38949C
-38949C:lI116|H3895A4
-3895A4:lI115|H38969C
-38969C:lI47|H389794
-389794:lI108|H38988C
-38988C:lI105|H389984
-389984:lI98|H389A64
-389A64:lI47|H389B3C
-389B3C:lI103|H389C04
-389C04:lI115|H389CCC
-389CCC:lI47|H389D94
-389D94:lI101|H389E4C
-389E4C:lI98|H389EFC
-389EFC:lI105|H389F9C
-389F9C:lI110|N
-38B068:lH3883D4|H38B070
-3883D4:lI47|H3884CC
-3884CC:lI99|H3885CC
-3885CC:lI108|H3886D4
-3886D4:lI101|H3887E4
-3887E4:lI97|H3888F4
-3888F4:lI114|H388A04
-388A04:lI99|H388B0C
-388B0C:lI97|H388C1C
-388C1C:lI115|H388D2C
-388D2C:lI101|H388E3C
-388E3C:lI47|H388F4C
-388F4C:lI111|H389064
-389064:lI116|H389174
-389174:lI112|H389284
-389284:lI47|H389394
-389394:lI101|H3894A4
-3894A4:lI114|H3895AC
-3895AC:lI116|H3896A4
-3896A4:lI115|H38979C
-38979C:lI47|H389894
-389894:lI108|H38998C
-38998C:lI105|H389A6C
-389A6C:lI98|H389B44
-389B44:lI47|H389C0C
-389C0C:lI101|H389CD4
-389CD4:lI118|H389D9C
-389D9C:lI97|H389E54
-389E54:lI47|H389F04
-389F04:lI101|H389FA4
-389FA4:lI98|H38A034
-38A034:lI105|H38A0B4
-38A0B4:lI110|N
-38B070:lH3884D4|H38B078
-3884D4:lI47|H3885D4
-3885D4:lI99|H3886DC
-3886DC:lI108|H3887EC
-3887EC:lI101|H3888FC
-3888FC:lI97|H388A0C
-388A0C:lI114|H388B14
-388B14:lI99|H388C24
-388C24:lI97|H388D34
-388D34:lI115|H388E44
-388E44:lI101|H388F54
-388F54:lI47|H38906C
-38906C:lI111|H38917C
-38917C:lI116|H38928C
-38928C:lI112|H38939C
-38939C:lI47|H3894AC
-3894AC:lI101|H3895B4
-3895B4:lI114|H3896AC
-3896AC:lI116|H3897A4
-3897A4:lI115|H38989C
-38989C:lI47|H389994
-389994:lI108|H389A74
-389A74:lI105|H389B4C
-389B4C:lI98|H389C14
-389C14:lI47|H389CDC
-389CDC:lI101|H389DA4
-389DA4:lI116|H389E5C
-389E5C:lI47|H389F0C
-389F0C:lI101|H389FAC
-389FAC:lI98|H38A03C
-38A03C:lI105|H38A0BC
-38A0BC:lI110|N
-38B078:lH3885DC|H38B080
-3885DC:lI47|H3886E4
-3886E4:lI99|H3887F4
-3887F4:lI108|H388904
-388904:lI101|H388A14
-388A14:lI97|H388B1C
-388B1C:lI114|H388C2C
-388C2C:lI99|H388D3C
-388D3C:lI97|H388E4C
-388E4C:lI115|H388F5C
-388F5C:lI101|H389074
-389074:lI47|H389184
-389184:lI111|H389294
-389294:lI116|H3893A4
-3893A4:lI112|H3894B4
-3894B4:lI47|H3895BC
-3895BC:lI101|H3896B4
-3896B4:lI114|H3897AC
-3897AC:lI116|H3898A4
-3898A4:lI115|H38999C
-38999C:lI47|H389A7C
-389A7C:lI108|H389B54
-389B54:lI105|H389C1C
-389C1C:lI98|H389CE4
-389CE4:lI47|H389DAC
-389DAC:lI101|H389E64
-389E64:lI114|H389F14
-389F14:lI108|H389FB4
-389FB4:lI95|H38A044
-38A044:lI105|H38A0C4
-38A0C4:lI110|H38A134
-38A134:lI116|H38A1A4
-38A1A4:lI101|H38A20C
-38A20C:lI114|H38A274
-38A274:lI102|H38A2DC
-38A2DC:lI97|H38A344
-38A344:lI99|H38A3AC
-38A3AC:lI101|N
-38B080:lH3886EC|H38B088
-3886EC:lI47|H3887FC
-3887FC:lI99|H38890C
-38890C:lI108|H388A1C
-388A1C:lI101|H388B24
-388B24:lI97|H388C34
-388C34:lI114|H388D44
-388D44:lI99|H388E54
-388E54:lI97|H388F64
-388F64:lI115|H38907C
-38907C:lI101|H38918C
-38918C:lI47|H38929C
-38929C:lI111|H3893AC
-3893AC:lI116|H3894BC
-3894BC:lI112|H3895C4
-3895C4:lI47|H3896BC
-3896BC:lI101|H3897B4
-3897B4:lI114|H3898AC
-3898AC:lI116|H3899A4
-3899A4:lI115|H389A84
-389A84:lI47|H389B5C
-389B5C:lI108|H389C24
-389C24:lI105|H389CEC
-389CEC:lI98|H389DB4
-389DB4:lI47|H389E6C
-389E6C:lI100|H389F1C
-389F1C:lI101|H389FBC
-389FBC:lI98|H38A04C
-38A04C:lI117|H38A0CC
-38A0CC:lI103|H38A13C
-38A13C:lI103|H38A1AC
-38A1AC:lI101|H38A214
-38A214:lI114|H38A27C
-38A27C:lI47|H38A2E4
-38A2E4:lI101|H38A34C
-38A34C:lI98|H38A3B4
-38A3B4:lI105|H38A414
-38A414:lI110|N
-38B088:lH388804|H38B090
-388804:lI47|H388914
-388914:lI99|H388A24
-388A24:lI108|H388B2C
-388B2C:lI101|H388C3C
-388C3C:lI97|H388D4C
-388D4C:lI114|H388E5C
-388E5C:lI99|H388F6C
-388F6C:lI97|H389084
-389084:lI115|H389194
-389194:lI101|H3892A4
-3892A4:lI47|H3893B4
-3893B4:lI111|H3894C4
-3894C4:lI116|H3895CC
-3895CC:lI112|H3896C4
-3896C4:lI47|H3897BC
-3897BC:lI101|H3898B4
-3898B4:lI114|H3899AC
-3899AC:lI116|H389A8C
-389A8C:lI115|H389B64
-389B64:lI47|H389C2C
-389C2C:lI108|H389CF4
-389CF4:lI105|H389DBC
-389DBC:lI98|H389E74
-389E74:lI47|H389F24
-389F24:lI99|H389FC4
-389FC4:lI114|H38A054
-38A054:lI121|H38A0D4
-38A0D4:lI112|H38A144
-38A144:lI116|H38A1B4
-38A1B4:lI111|H38A21C
-38A21C:lI47|H38A284
-38A284:lI101|H38A2EC
-38A2EC:lI98|H38A354
-38A354:lI105|H38A3BC
-38A3BC:lI110|N
-38B090:lH38891C|H38B098
-38891C:lI47|H388A2C
-388A2C:lI99|H388B34
-388B34:lI108|H388C44
-388C44:lI101|H388D54
-388D54:lI97|H388E64
-388E64:lI114|H388F74
-388F74:lI99|H38908C
-38908C:lI97|H38919C
-38919C:lI115|H3892AC
-3892AC:lI101|H3893BC
-3893BC:lI47|H3894CC
-3894CC:lI111|H3895D4
-3895D4:lI116|H3896CC
-3896CC:lI112|H3897C4
-3897C4:lI47|H3898BC
-3898BC:lI101|H3899B4
-3899B4:lI114|H389A94
-389A94:lI116|H389B6C
-389B6C:lI115|H389C34
-389C34:lI47|H389CFC
-389CFC:lI108|H389DC4
-389DC4:lI105|H389E7C
-389E7C:lI98|H389F2C
-389F2C:lI47|H389FCC
-389FCC:lI99|H38A05C
-38A05C:lI111|H38A0DC
-38A0DC:lI115|H38A14C
-38A14C:lI84|H38A1BC
-38A1BC:lI114|H38A224
-38A224:lI97|H38A28C
-38A28C:lI110|H38A2F4
-38A2F4:lI115|H38A35C
-38A35C:lI97|H38A3C4
-38A3C4:lI99|H38A41C
-38A41C:lI116|H38A46C
-38A46C:lI105|H38A4BC
-38A4BC:lI111|H38A50C
-38A50C:lI110|H38A554
-38A554:lI115|H38A59C
-38A59C:lI47|H38A5E4
-38A5E4:lI101|H38A62C
-38A62C:lI98|H38A66C
-38A66C:lI105|H38A6A4
-38A6A4:lI110|N
-38B098:lH388A34|H38B0A0
-388A34:lI47|H388B3C
-388B3C:lI99|H388C4C
-388C4C:lI108|H388D5C
-388D5C:lI101|H388E6C
-388E6C:lI97|H388F7C
-388F7C:lI114|H389094
-389094:lI99|H3891A4
-3891A4:lI97|H3892B4
-3892B4:lI115|H3893C4
-3893C4:lI101|H3894D4
-3894D4:lI47|H3895DC
-3895DC:lI111|H3896D4
-3896D4:lI116|H3897CC
-3897CC:lI112|H3898C4
-3898C4:lI47|H3899BC
-3899BC:lI101|H389A9C
-389A9C:lI114|H389B74
-389B74:lI116|H389C3C
-389C3C:lI115|H389D04
-389D04:lI47|H389DCC
-389DCC:lI108|H389E84
-389E84:lI105|H389F34
-389F34:lI98|H389FD4
-389FD4:lI47|H38A064
-38A064:lI99|H38A0E4
-38A0E4:lI111|H38A154
-38A154:lI115|H38A1C4
-38A1C4:lI84|H38A22C
-38A22C:lI105|H38A294
-38A294:lI109|H38A2FC
-38A2FC:lI101|H38A364
-38A364:lI47|H38A3CC
-38A3CC:lI101|H38A424
-38A424:lI98|H38A474
-38A474:lI105|H38A4C4
-38A4C4:lI110|N
-38B0A0:lH388B44|H38B0A8
-388B44:lI47|H388C54
-388C54:lI99|H388D64
-388D64:lI108|H388E74
-388E74:lI101|H388F84
-388F84:lI97|H38909C
-38909C:lI114|H3891AC
-3891AC:lI99|H3892BC
-3892BC:lI97|H3893CC
-3893CC:lI115|H3894DC
-3894DC:lI101|H3895E4
-3895E4:lI47|H3896DC
-3896DC:lI111|H3897D4
-3897D4:lI116|H3898CC
-3898CC:lI112|H3899C4
-3899C4:lI47|H389AA4
-389AA4:lI101|H389B7C
-389B7C:lI114|H389C44
-389C44:lI116|H389D0C
-389D0C:lI115|H389DD4
-389DD4:lI47|H389E8C
-389E8C:lI108|H389F3C
-389F3C:lI105|H389FDC
-389FDC:lI98|H38A06C
-38A06C:lI47|H38A0EC
-38A0EC:lI99|H38A15C
-38A15C:lI111|H38A1CC
-38A1CC:lI115|H38A234
-38A234:lI80|H38A29C
-38A29C:lI114|H38A304
-38A304:lI111|H38A36C
-38A36C:lI112|H38A3D4
-38A3D4:lI101|H38A42C
-38A42C:lI114|H38A47C
-38A47C:lI116|H38A4CC
-38A4CC:lI121|H38A514
-38A514:lI47|H38A55C
-38A55C:lI101|H38A5A4
-38A5A4:lI98|H38A5EC
-38A5EC:lI105|H38A634
-38A634:lI110|N
-38B0A8:lH388C5C|H38B0B0
-388C5C:lI47|H388D6C
-388D6C:lI99|H388E7C
-388E7C:lI108|H388F8C
-388F8C:lI101|H3890A4
-3890A4:lI97|H3891B4
-3891B4:lI114|H3892C4
-3892C4:lI99|H3893D4
-3893D4:lI97|H3894E4
-3894E4:lI115|H3895EC
-3895EC:lI101|H3896E4
-3896E4:lI47|H3897DC
-3897DC:lI111|H3898D4
-3898D4:lI116|H3899CC
-3899CC:lI112|H389AAC
-389AAC:lI47|H389B84
-389B84:lI101|H389C4C
-389C4C:lI114|H389D14
-389D14:lI116|H389DDC
-389DDC:lI115|H389E94
-389E94:lI47|H389F44
-389F44:lI108|H389FE4
-389FE4:lI105|H38A074
-38A074:lI98|H38A0F4
-38A0F4:lI47|H38A164
-38A164:lI99|H38A1D4
-38A1D4:lI111|H38A23C
-38A23C:lI115|H38A2A4
-38A2A4:lI78|H38A30C
-38A30C:lI111|H38A374
-38A374:lI116|H38A3DC
-38A3DC:lI105|H38A434
-38A434:lI102|H38A484
-38A484:lI105|H38A4D4
-38A4D4:lI99|H38A51C
-38A51C:lI97|H38A564
-38A564:lI116|H38A5AC
-38A5AC:lI105|H38A5F4
-38A5F4:lI111|H38A63C
-38A63C:lI110|H38A674
-38A674:lI47|H38A6AC
-38A6AC:lI101|H38A6D4
-38A6D4:lI98|H38A6EC
-38A6EC:lI105|H38A704
-38A704:lI110|N
-38B0B0:lH388D74|H38B0B8
-388D74:lI47|H388E84
-388E84:lI99|H388F94
-388F94:lI108|H3890AC
-3890AC:lI101|H3891BC
-3891BC:lI97|H3892CC
-3892CC:lI114|H3893DC
-3893DC:lI99|H3894EC
-3894EC:lI97|H3895F4
-3895F4:lI115|H3896EC
-3896EC:lI101|H3897E4
-3897E4:lI47|H3898DC
-3898DC:lI111|H3899D4
-3899D4:lI116|H389AB4
-389AB4:lI112|H389B8C
-389B8C:lI47|H389C54
-389C54:lI101|H389D1C
-389D1C:lI114|H389DE4
-389DE4:lI116|H389E9C
-389E9C:lI115|H389F4C
-389F4C:lI47|H389FEC
-389FEC:lI108|H38A07C
-38A07C:lI105|H38A0FC
-38A0FC:lI98|H38A16C
-38A16C:lI47|H38A1DC
-38A1DC:lI99|H38A244
-38A244:lI111|H38A2AC
-38A2AC:lI115|H38A314
-38A314:lI70|H38A37C
-38A37C:lI105|H38A3E4
-38A3E4:lI108|H38A43C
-38A43C:lI101|H38A48C
-38A48C:lI84|H38A4DC
-38A4DC:lI114|H38A524
-38A524:lI97|H38A56C
-38A56C:lI110|H38A5B4
-38A5B4:lI115|H38A5FC
-38A5FC:lI102|H38A644
-38A644:lI101|H38A67C
-38A67C:lI114|H38A6B4
-38A6B4:lI47|H38A6DC
-38A6DC:lI101|H38A6F4
-38A6F4:lI98|H38A70C
-38A70C:lI105|H38A71C
-38A71C:lI110|N
-38B0B8:lH388E8C|H38B0C0
-388E8C:lI47|H388F9C
-388F9C:lI99|H3890B4
-3890B4:lI108|H3891C4
-3891C4:lI101|H3892D4
-3892D4:lI97|H3893E4
-3893E4:lI114|H3894F4
-3894F4:lI99|H3895FC
-3895FC:lI97|H3896F4
-3896F4:lI115|H3897EC
-3897EC:lI101|H3898E4
-3898E4:lI47|H3899DC
-3899DC:lI111|H389ABC
-389ABC:lI116|H389B94
-389B94:lI112|H389C5C
-389C5C:lI47|H389D24
-389D24:lI101|H389DEC
-389DEC:lI114|H389EA4
-389EA4:lI116|H389F54
-389F54:lI115|H389FF4
-389FF4:lI47|H38A084
-38A084:lI108|H38A104
-38A104:lI105|H38A174
-38A174:lI98|H38A1E4
-38A1E4:lI47|H38A24C
-38A24C:lI99|H38A2B4
-38A2B4:lI111|H38A31C
-38A31C:lI115|H38A384
-38A384:lI69|H38A3EC
-38A3EC:lI118|H38A444
-38A444:lI101|H38A494
-38A494:lI110|H38A4E4
-38A4E4:lI116|H38A52C
-38A52C:lI68|H38A574
-38A574:lI111|H38A5BC
-38A5BC:lI109|H38A604
-38A604:lI97|H38A64C
-38A64C:lI105|H38A684
-38A684:lI110|H38A6BC
-38A6BC:lI47|H38A6E4
-38A6E4:lI101|H38A6FC
-38A6FC:lI98|H38A714
-38A714:lI105|H38A724
-38A724:lI110|N
-38B0C0:lH388FA4|H38B0C8
-388FA4:lI47|H3890BC
-3890BC:lI99|H3891CC
-3891CC:lI108|H3892DC
-3892DC:lI101|H3893EC
-3893EC:lI97|H3894FC
-3894FC:lI114|H389604
-389604:lI99|H3896FC
-3896FC:lI97|H3897F4
-3897F4:lI115|H3898EC
-3898EC:lI101|H3899E4
-3899E4:lI47|H389AC4
-389AC4:lI111|H389B9C
-389B9C:lI116|H389C64
-389C64:lI112|H389D2C
-389D2C:lI47|H389DF4
-389DF4:lI101|H389EAC
-389EAC:lI114|H389F5C
-389F5C:lI116|H389FFC
-389FFC:lI115|H38A08C
-38A08C:lI47|H38A10C
-38A10C:lI108|H38A17C
-38A17C:lI105|H38A1EC
-38A1EC:lI98|H38A254
-38A254:lI47|H38A2BC
-38A2BC:lI99|H38A324
-38A324:lI111|H38A38C
-38A38C:lI115|H38A3F4
-38A3F4:lI69|H38A44C
-38A44C:lI118|H38A49C
-38A49C:lI101|H38A4EC
-38A4EC:lI110|H38A534
-38A534:lI116|H38A57C
-38A57C:lI47|H38A5C4
-38A5C4:lI101|H38A60C
-38A60C:lI98|H38A654
-38A654:lI105|H38A68C
-38A68C:lI110|N
-38B0C8:lH3890C4|H38B0D0
-3890C4:lI47|H3891D4
-3891D4:lI99|H3892E4
-3892E4:lI108|H3893F4
-3893F4:lI101|H389504
-389504:lI97|H38960C
-38960C:lI114|H389704
-389704:lI99|H3897FC
-3897FC:lI97|H3898F4
-3898F4:lI115|H3899EC
-3899EC:lI101|H389ACC
-389ACC:lI47|H389BA4
-389BA4:lI111|H389C6C
-389C6C:lI116|H389D34
-389D34:lI112|H389DFC
-389DFC:lI47|H389EB4
-389EB4:lI101|H389F64
-389F64:lI114|H38A004
-38A004:lI116|H38A094
-38A094:lI115|H38A114
-38A114:lI47|H38A184
-38A184:lI108|H38A1F4
-38A1F4:lI105|H38A25C
-38A25C:lI98|H38A2C4
-38A2C4:lI47|H38A32C
-38A32C:lI99|H38A394
-38A394:lI111|H38A3FC
-38A3FC:lI109|H38A454
-38A454:lI112|H38A4A4
-38A4A4:lI105|H38A4F4
-38A4F4:lI108|H38A53C
-38A53C:lI101|H38A584
-38A584:lI114|H38A5CC
-38A5CC:lI47|H38A614
-38A614:lI101|H38A65C
-38A65C:lI98|H38A694
-38A694:lI105|H38A6C4
-38A6C4:lI110|N
-38B0D0:lH3891DC|H38B0D8
-3891DC:lI47|H3892EC
-3892EC:lI99|H3893FC
-3893FC:lI108|H38950C
-38950C:lI101|H389614
-389614:lI97|H38970C
-38970C:lI114|H389804
-389804:lI99|H3898FC
-3898FC:lI97|H3899F4
-3899F4:lI115|H389AD4
-389AD4:lI101|H389BAC
-389BAC:lI47|H389C74
-389C74:lI111|H389D3C
-389D3C:lI116|H389E04
-389E04:lI112|H389EBC
-389EBC:lI47|H389F6C
-389F6C:lI101|H38A00C
-38A00C:lI114|H38A09C
-38A09C:lI116|H38A11C
-38A11C:lI115|H38A18C
-38A18C:lI47|H38A1FC
-38A1FC:lI108|H38A264
-38A264:lI105|H38A2CC
-38A2CC:lI98|H38A334
-38A334:lI47|H38A39C
-38A39C:lI97|H38A404
-38A404:lI115|H38A45C
-38A45C:lI110|H38A4AC
-38A4AC:lI49|H38A4FC
-38A4FC:lI47|H38A544
-38A544:lI101|H38A58C
-38A58C:lI98|H38A5D4
-38A5D4:lI105|H38A61C
-38A61C:lI110|N
-38B0D8:lH3892F4|H38B0E0
-3892F4:lI47|H389404
-389404:lI99|H389514
-389514:lI108|H38961C
-38961C:lI101|H389714
-389714:lI97|H38980C
-38980C:lI114|H389904
-389904:lI99|H3899FC
-3899FC:lI97|H389ADC
-389ADC:lI115|H389BB4
-389BB4:lI101|H389C7C
-389C7C:lI47|H389D44
-389D44:lI111|H389E0C
-389E0C:lI116|H389EC4
-389EC4:lI112|H389F74
-389F74:lI47|H38A014
-38A014:lI101|H38A0A4
-38A0A4:lI114|H38A124
-38A124:lI116|H38A194
-38A194:lI115|H38A204
-38A204:lI47|H38A26C
-38A26C:lI108|H38A2D4
-38A2D4:lI105|H38A33C
-38A33C:lI98|H38A3A4
-38A3A4:lI47|H38A40C
-38A40C:lI97|H38A464
-38A464:lI112|H38A4B4
-38A4B4:lI112|H38A504
-38A504:lI109|H38A54C
-38A54C:lI111|H38A594
-38A594:lI110|H38A5DC
-38A5DC:lI47|H38A624
-38A624:lI101|H38A664
-38A664:lI98|H38A69C
-38A69C:lI105|H38A6CC
-38A6CC:lI110|N
-38B0E0:lH38AA88|H38B0E8
-38AA88:lI47|H38AA90
-38AA90:lI104|H38AA98
-38AA98:lI111|H38AAA0
-38AAA0:lI109|H38AAA8
-38AAA8:lI101|H38AAB0
-38AAB0:lI47|H38AAB8
-38AAB8:lI115|H38AAC0
-38AAC0:lI105|H38AAC8
-38AAC8:lI114|H38AAD0
-38AAD0:lI105|H38AAD8
-38AAD8:lI47|H38AAE0
-38AAE0:lI101|H38AAE8
-38AAE8:lI114|H38AAF0
-38AAF0:lI108|H38AAF8
-38AAF8:lI97|H38AB00
-38AB00:lI110|H38AB08
-38AB08:lI103|N
-38B0E8:lH38AB1C|H38B0F0
-38AB1C:lI47|H38AB2C
-38AB2C:lI104|H38AB4C
-38AB4C:lI111|H38AB74
-38AB74:lI109|H38ABA4
-38ABA4:lI101|H38ABC4
-38ABC4:lI47|H38ABE4
-38ABE4:lI115|H38AC04
-38AC04:lI105|H38AC24
-38AC24:lI114|H38AC3C
-38AC3C:lI105|H38AC44
-38AC44:lI47|H38AC4C
-38AC4C:lI116|H38AC54
-38AC54:lI111|H38AC5C
-38AC5C:lI111|H38AC64
-38AC64:lI108|H38AC6C
-38AC6C:lI115|H38AC74
-38AC74:lI47|H38AC7C
-38AC7C:lI100|H38AC84
-38AC84:lI105|H38AC8C
-38AC8C:lI115|H38AC94
-38AC94:lI116|H38AC9C
-38AC9C:lI101|H38ACA4
-38ACA4:lI108|H38ACAC
-38ACAC:lI47|H38ACB4
-38ACB4:lI101|H38ACBC
-38ACBC:lI98|H38ACC4
-38ACC4:lI105|H38ACCC
-38ACCC:lI110|N
-38B0F0:lH38B0F8|N
-38B0F8:lI47|H38B100
-38B100:lI104|H38B108
-38B108:lI111|H38B110
-38B110:lI109|H38B118
-38B118:lI101|H38B120
-38B120:lI47|H38B128
-38B128:lI115|H38B130
-38B130:lI105|H38B138
-38B138:lI114|H38B140
-38B140:lI105|H38B148
-38B148:lI47|H38B150
-38B150:lI79|H38B158
-38B158:lI84|H38B160
-38B160:lI80|H38B168
-38B168:lI47|H38B170
-38B170:lI103|H38B178
-38B178:lI112|H38B180
-38B180:lI114|H38B188
-38B188:lI115|H38B190
-38B190:lI95|H38B198
-38B198:lI116|H38B1A0
-38B1A0:lI114|H38B1A8
-38B1A8:lI97|H38B1B0
-38B1B0:lI99|H38B1B8
-38B1B8:lI101|H38B1C0
-38B1C0:lI47|H38B1C8
-38B1C8:lI106|H38B1D0
-38B1D0:lI97|H38B1D8
-38B1D8:lI110|N
-3873BC:lI47|H3873CC
-3873CC:lI99|H3873E4
-3873E4:lI108|H3873FC
-3873FC:lI101|H38741C
-38741C:lI97|H387444
-387444:lI114|H387474
-387474:lI99|H3874AC
-3874AC:lI97|H3874EC
-3874EC:lI115|H387534
-387534:lI101|H387584
-387584:lI47|H3875DC
-3875DC:lI111|H38763C
-38763C:lI116|H3876A4
-3876A4:lI112|H387714
-387714:lI47|H38778C
-38778C:lI101|H38780C
-38780C:lI114|H387894
-387894:lI116|H387924
-387924:lI115|N
-=proc_dictionary:<0.19.0>
-H370244
-H370250
-=proc_stack:<0.19.0>
-36b45c:SReturn addr 0x225860 (proc_lib:init_p/5 + 164)
-y0:N
-y1:A8:infinity
-y2:A11:supervisor_bridge
-y3:H36B17C
-y4:P<0.19.0>
-y5:P<0.9.0>
-36b478:SReturn addr 0x156F90 (<terminate process normally>)
-y0:SCatch 0x225860 (proc_lib:init_p/5 + 164)
-y1:A3:gen
-y2:A7:init_it
-y3:H37025C
-=proc_heap:<0.19.0>
-36B17C:t5:A5:state,A8:user_sup,P<0.21.0>,P<0.21.0>,H370238
-370238:t2:P<0.19.0>,A8:user_sup
-37025C:lAA:gen_server|H37027C
-37027C:lP<0.9.0>|H37028C
-37028C:lP<0.9.0>|H370294
-370294:lA11:supervisor_bridge|H37029C
-37029C:lH3702A4|H3702AC
-3702A4:lA8:user_sup|H3702B4
-3702B4:lN|H3702BC
-3702BC:lA4:self|N
-3702AC:lN|N
-370244:t2:AD:$initial_call,H370264
-370264:t3:A3:gen,A7:init_it,H37025C
-370250:t2:AA:$ancestors,H370274
-370274:lAA:kernel_sup|H370284
-370284:lP<0.8.0>|N
-=proc_dictionary:<0.20.0>
-H36F8A8
-=proc_stack:<0.20.0>
-36a714:SReturn addr 0x156F90 (<terminate process normally>)
-y0:N
-y1:N
-y2:H36F8C4
-y3:P<0.21.0>
-y4:P<0.22.0>
-y5:p<0.72>
-y6:p<0.72>
-=proc_heap:<0.20.0>
-36F8C4:t4:I3,I2,P<0.22.0>,H36F8F0
-36F8F0:lH36F900|H36F910
-36F900:t3:I1,P<0.21.0>,H36F920
-36F920:t0:
-36F910:lH36F924|N
-36F924:t3:I2,P<0.22.0>,H36F93C
-36F93C:t3:A5:shell,A5:start,N
-36F8A8:t2:A3:eof,A5:false
-=proc_dictionary:<0.21.0>
-H3709DC
-H3709D0
-H3709F8
-=proc_stack:<0.21.0>
-370d1c:SReturn addr 0x156F90 (<terminate process normally>)
-y0:N
-y1:A9:undefined
-y2:P<0.20.0>
-=proc_heap:<0.21.0>
-3709DC:t2:AB:line_buffer,N
-3709D0:t2:AB:kill_buffer,N
-3709F8:t2:A9:read_mode,A4:list
-=proc_dictionary:<0.22.0>
-H370D44
-H370D60
-H370D7C
-H370D38
-=proc_stack:<0.22.0>
-374a88:SReturn addr 0x2CE718 (group:get_chars_loop/7 + 80)
-y0:N
-y1:N
-y2:A8:infinity
-y3:H374A00
-y4:P<0.20.0>
-y5:H374A28
-374aa4:SReturn addr 0x2CDC18 (group:io_request/5 + 48)
-y0:H37499C
-y1:A6:io_lib
-y2:A9:get_until
-y3:H3748B8
-y4:P<0.20.0>
-y5:A5:start
-374ac0:SReturn addr 0x2CDB2C (group:server_loop/3 + 372)
-y0:P<0.49.0>
-y1:P<0.22.0>
-374acc:SReturn addr 0x156F90 (<terminate process normally>)
-y0:N
-y1:P<0.25.0>
-y2:P<0.20.0>
-=proc_heap:<0.22.0>
-374A00:t4:A4:line,H37499C,H3749A4,A4:none
-3749A4:t2:N,N
-37499C:lI50|H374994
-374994:lI62|H37498C
-37498C:lI32|N
-374A28:t4:A5:stack,H370D58,H374A24,N
-374A24:t0:
-370D58:lH370D74|N
-370D74:lI99|H370D88
-370D88:lI114|H370D90
-370D90:lI97|H370D98
-370D98:lI115|H370DA0
-370DA0:lI104|H370DA8
-370DA8:lI100|H370DB0
-370DB0:lI117|H370DB8
-370DB8:lI109|H370DC0
-370DC0:lI112|H370DC8
-370DC8:lI95|H370DD0
-370DD0:lI118|H370DD8
-370DD8:lI105|H370DE0
-370DE0:lI101|H370DE8
-370DE8:lI119|H370DF0
-370DF0:lI101|H370DF8
-370DF8:lI114|H370E00
-370E00:lI58|H370E08
-370E08:lI115|H370E10
-370E10:lI116|H370E18
-370E18:lI97|H370E20
-370E20:lI114|H370E28
-370E28:lI116|H370E30
-370E30:lI40|H370E38
-370E38:lI41|H370E40
-370E40:lI46|H370E48
-370E48:lI10|N
-3748B8:t3:A8:erl_scan,A6:tokens,H3748B0
-3748B0:lI1|N
-370D44:t2:AB:line_buffer,H370D58
-370D60:t2:A5:shell,P<0.25.0>
-370D7C:t2:AB:kill_buffer,N
-370D38:t2:A9:read_mode,A4:list
-=proc_dictionary:<0.23.0>
-H376464
-H376448
-=proc_stack:<0.23.0>
-376754:SReturn addr 0x225860 (proc_lib:init_p/5 + 164)
-y0:N
-y1:A8:infinity
-y2:AD:kernel_config
-y3:N
-y4:P<0.23.0>
-y5:P<0.9.0>
-376770:SReturn addr 0x156F90 (<terminate process normally>)
-y0:SCatch 0x225860 (proc_lib:init_p/5 + 164)
-y1:A3:gen
-y2:A7:init_it
-y3:H376418
-=proc_heap:<0.23.0>
-376418:lAA:gen_server|H376410
-376410:lP<0.9.0>|H376408
-376408:lP<0.9.0>|H376400
-376400:lAD:kernel_config|H3763F8
-3763F8:lN|H3763F0
-3763F0:lN|N
-376464:t2:AD:$initial_call,H376454
-376454:t3:A3:gen,A7:init_it,H376418
-376448:t2:AA:$ancestors,H376440
-376440:lAA:kernel_sup|H376420
-376420:lP<0.8.0>|N
-=proc_dictionary:<0.24.0>
-H3705E0
-H3705EC
-=proc_stack:<0.24.0>
-36f38c:SReturn addr 0x225860 (proc_lib:init_p/5 + 164)
-y0:N
-y1:A8:infinity
-y2:AA:supervisor
-y3:H36F018
-y4:AF:kernel_safe_sup
-y5:P<0.9.0>
-36f3a8:SReturn addr 0x156F90 (<terminate process normally>)
-y0:SCatch 0x225860 (proc_lib:init_p/5 + 164)
-y1:A3:gen
-y2:A7:init_it
-y3:H37063C
-=proc_heap:<0.24.0>
-36F018:tA:A5:state,H370644,AB:one_for_one,H36F044,N,I4,I3600,N,A6:kernel,A4:safe
-36F044:lH36F04C|N
-36F04C:t8:A5:child,P<0.31.0>,A17:inet_gethost_native_sup,H370650,A9:temporary,I1000,A6:worker,H370660
-370660:lA13:inet_gethost_native|N
-370650:t3:A13:inet_gethost_native,AA:start_link,N
-370644:t2:A5:local,AF:kernel_safe_sup
-37063C:lAA:gen_server|H3706AC
-3706AC:lP<0.9.0>|H3706BC
-3706BC:lP<0.9.0>|H3706C4
-3706C4:lH3706CC|H3706D8
-3706CC:t2:A5:local,AF:kernel_safe_sup
-3706D8:lAA:supervisor|H3706E0
-3706E0:lH3706E8|H3706F8
-3706E8:t3:H370644,A6:kernel,A4:safe
-3706F8:lN|N
-3705E0:t2:AD:$initial_call,H370668
-370668:t3:A3:gen,A7:init_it,H37063C
-3705EC:t2:AA:$ancestors,H370678
-370678:lAA:kernel_sup|H3706B4
-3706B4:lP<0.8.0>|N
-=proc_dictionary:<0.25.0>
-H36E304
-H36E31C
-=proc_stack:<0.25.0>
-36e610:SReturn addr 0x2E06FC (shell:server_loop/6 + 140)
-y0:N
-y1:N
-y2:P<0.27.0>
-y3:P<0.49.0>
-36e624:SReturn addr 0x156F90 (<terminate process normally>)
-y0:N
-y1:N
-y2:I2
-y3:I1
-y4:N
-y5:N
-y6:N
-y7:I20
-y8:I20
-=proc_heap:<0.25.0>
-36E304:t2:H36E2F8,H36E2A8
-36E2A8:lH36E2B0|N
-36E2B0:t4:A4:call,I1,H36E2C4,N
-36E2C4:t4:A6:remote,I1,H36E2D8,H36E2E8
-36E2E8:t3:A4:atom,I1,A5:start
-36E2D8:t3:A4:atom,I1,A10:crashdump_viewer
-36E2F8:t2:A7:command,I1
-36E31C:t2:H36E310,A2:ok
-36E310:t2:A6:result,I1
-=proc_stack:<0.27.0>
-3bda3c:SReturn addr 0x156F90 (<terminate process normally>)
-y0:N
-y1:N
-y2:P<0.25.0>
-=proc_heap:<0.27.0>
-=proc_dictionary:<0.31.0>
-H36DA24
-H36DA08
-=proc_stack:<0.31.0>
-36dcd4:SReturn addr 0x225860 (proc_lib:init_p/5 + 164)
-y0:N
-y1:A8:infinity
-y2:A11:supervisor_bridge
-y3:H36DB68
-y4:A17:inet_gethost_native_sup
-y5:P<0.24.0>
-36dcf0:SReturn addr 0x156F90 (<terminate process normally>)
-y0:SCatch 0x225860 (proc_lib:init_p/5 + 164)
-y1:A3:gen
-y2:A7:init_it
-y3:H36D9D0
-=proc_heap:<0.31.0>
-36DB68:t5:A5:state,A13:inet_gethost_native,P<0.32.0>,P<0.32.0>,H36D994
-36D994:t2:A5:local,A17:inet_gethost_native_sup
-36D9D0:lAA:gen_server|H36D9C8
-36D9C8:lP<0.24.0>|H36D9C0
-36D9C0:lP<0.24.0>|H36D970
-36D970:lH36D980|H36D9B8
-36D980:t2:A5:local,A17:inet_gethost_native_sup
-36D9B8:lA11:supervisor_bridge|H36D978
-36D978:lH36D9A8|H36D9B0
-36D9A8:lA13:inet_gethost_native|H36D9A0
-36D9A0:lN|H36D98C
-36D98C:lH36D994|N
-36D9B0:lN|N
-36DA24:t2:AD:$initial_call,H36DA14
-36DA14:t3:A3:gen,A7:init_it,H36D9D0
-36DA08:t2:AA:$ancestors,H36DA00
-36DA00:lAF:kernel_safe_sup|H36D9E0
-36D9E0:lAA:kernel_sup|H36D9D8
-36D9D8:lP<0.8.0>|N
-=proc_dictionary:<0.32.0>
-H36CFD4
-H36D0BC
-=proc_stack:<0.32.0>
-36d12c:SReturn addr 0x156F90 (<terminate process normally>)
-y0:H36CF18
-=proc_heap:<0.32.0>
-36CF18:t8:A5:state,p<0.105>,I8000,I11,I12,P<0.31.0>,I4,H36CEF0
-36CEF0:t9:AA:statistics,I0,I0,I0,I0,I0,I0,I0,I0
-36CFD4:t2:A3:rid,I1
-36D0BC:t2:AC:num_requests,I0
-=proc_dictionary:<0.33.0>
-H3905C4
-H3905D0
-=proc_stack:<0.33.0>
-3ceee4:SReturn addr 0x225860 (proc_lib:init_p/5 + 164)
-y0:N
-y1:A8:infinity
-y2:A7:webtool
-y3:H3C8570
-y4:A8:web_tool
-y5:P<0.33.0>
-3cef00:SReturn addr 0x156F90 (<terminate process normally>)
-y0:SCatch 0x225860 (proc_lib:init_p/5 + 164)
-y1:A3:gen
-y2:A7:init_it
-y3:H3905FC
-=proc_heap:<0.33.0>
-3C8570:t6:A5:state,H3905EC,I13,P<0.41.0>,H3905F4,H3C85D4
-3C85D4:lA10:crashdump_viewer|N
-3905F4:lH390650|H39065C
-390650:t2:A4:port,I8888
-39065C:lH3906C8|H3906D4
-3906C8:t2:AC:bind_address,H390760
-390760:t4:I127,I0,I0,I1
-3906D4:lH390774|H390780
-390774:t2:AB:server_name,H39082C
-39082C:lI108|H390908
-390908:lI111|H3909DC
-3909DC:lI99|H390AC0
-390AC0:lI97|H390B98
-390B98:lI108|H390C78
-390C78:lI104|H390D58
-390D58:lI111|H390E2C
-390E2C:lI115|H390F10
-390F10:lI116|N
-390780:lH390834|H390840
-390834:t2:AE:max_header_siz,I1024
-390840:lH390910|H39091C
-390910:t2:A11:max_header_action,A8:reply414
-39091C:lH3909E4|H3909F0
-3909E4:t2:A8:com_type,A7:ip_comm
-3909F0:lH390AC8|H390AD4
-390AC8:t2:A7:modules,H390BA0
-390BA0:lA9:mod_alias|H390C80
-390C80:lA8:mod_auth|H390D60
-390D60:lA7:mod_esi|H390E34
-390E34:lAB:mod_actions|H390F18
-390F18:lA7:mod_cgi|H390FF4
-390FF4:lAB:mod_include|H3910D8
-3910D8:lA7:mod_dir|H3911B4
-3911B4:lA7:mod_get|H3912A0
-3912A0:lA8:mod_head|H39139C
-39139C:lA7:mod_log|H3914A0
-3914A0:lAC:mod_disk_log|N
-390AD4:lH390BA8|H390BB4
-390BA8:t2:AF:directory_index,H390C88
-390C88:lH390D68|N
-390D68:lI105|H390E3C
-390E3C:lI110|H390F20
-390F20:lI100|H390FFC
-390FFC:lI101|H3910E0
-3910E0:lI120|H3911BC
-3911BC:lI46|H3912A8
-3912A8:lI104|H3913A4
-3913A4:lI116|H3914A8
-3914A8:lI109|H39159C
-39159C:lI108|N
-390BB4:lH390C90|N
-390C90:t2:AC:default_type,H390D70
-390D70:lI116|H390E44
-390E44:lI101|H390F28
-390F28:lI120|H391004
-391004:lI116|H3910E8
-3910E8:lI47|H3911C4
-3911C4:lI112|H3912B0
-3912B0:lI108|H3913AC
-3913AC:lI97|H3914B0
-3914B0:lI105|H3915A4
-3915A4:lI110|N
-3905EC:lI47|H390648
-390648:lI99|H3906C0
-3906C0:lI108|H390758
-390758:lI101|H390824
-390824:lI97|H390900
-390900:lI114|H3909D4
-3909D4:lI99|H390AB8
-390AB8:lI97|H390B90
-390B90:lI115|H390C70
-390C70:lI101|H390D50
-390D50:lI47|H390E24
-390E24:lI111|H390F08
-390F08:lI116|H390FEC
-390FEC:lI112|H3910D0
-3910D0:lI47|H3911AC
-3911AC:lI101|H391298
-391298:lI114|H391394
-391394:lI116|H391498
-391498:lI115|H391594
-391594:lI47|H391680
-391680:lI108|H39175C
-39175C:lI105|H391840
-391840:lI98|H391924
-391924:lI47|H3919F8
-3919F8:lI119|H391AC4
-391AC4:lI101|H391B90
-391B90:lI98|H391C54
-391C54:lI116|H391D18
-391D18:lI111|H391DD4
-391DD4:lI111|H391E90
-391E90:lI108|H391F5C
-391F5C:lI47|H392030
-392030:lI112|H3920EC
-3920EC:lI114|H3921A8
-3921A8:lI105|H392264
-392264:lI118|N
-3905FC:lAA:gen_server|H390664
-390664:lP<0.27.0>|H3906DC
-3906DC:lA4:self|H390788
-390788:lH390848|H390854
-390848:t2:A5:local,A8:web_tool
-390854:lA7:webtool|H390924
-390924:lH3909F8|H390A04
-3909F8:t2:H3905EC,H3905F4
-390A04:lN|N
-3905C4:t2:AD:$initial_call,H390614
-390614:t3:A3:gen,A7:init_it,H3905FC
-3905D0:t2:AA:$ancestors,H390624
-390624:lP<0.27.0>|N
-=proc_dictionary:<0.41.0>
-H36DF0C
-H36DF18
-=proc_stack:<0.41.0>
-36eda4:SReturn addr 0x225860 (proc_lib:init_p/5 + 164)
-y0:N
-y1:A8:infinity
-y2:AA:supervisor
-y3:H36EA3C
-y4:A6:websup
-y5:P<0.33.0>
-36edc0:SReturn addr 0x156F90 (<terminate process normally>)
-y0:SCatch 0x225860 (proc_lib:init_p/5 + 164)
-y1:A3:gen
-y2:A7:init_it
-y3:H36DF24
-=proc_heap:<0.41.0>
-36EA3C:tA:A5:state,H36DF2C,AB:one_for_one,H36EA68,N,I100,I10,N,AB:webtool_sup,N
-36EA68:lH36EA70|N
-36EA70:t8:A5:child,P<0.48.0>,H36DF38,H36DF44,A9:permanent,I100,A6:worker,H36DF54
-36DF54:lA10:crashdump_viewer|N
-36DF44:t3:A10:crashdump_viewer,AA:start_link,N
-36DF38:t2:A5:local,A17:crashdump_viewer_server
-36DF2C:t2:A5:local,A6:websup
-36DF24:lAA:gen_server|H36DF84
-36DF84:lP<0.33.0>|H36DF94
-36DF94:lP<0.33.0>|H36DF9C
-36DF9C:lH36DFA4|H36DFB0
-36DFA4:t2:A5:local,A6:websup
-36DFB0:lAA:supervisor|H36DFB8
-36DFB8:lH36DFC0|H36DFD0
-36DFC0:t3:H36DF2C,AB:webtool_sup,N
-36DFD0:lN|N
-36DF0C:t2:AD:$initial_call,H36DF6C
-36DF6C:t3:A3:gen,A7:init_it,H36DF24
-36DF18:t2:AA:$ancestors,H36DF7C
-36DF7C:lA8:web_tool|H36DF8C
-36DF8C:lP<0.27.0>|N
-=proc_dictionary:<0.43.0>
-H39D940
-H39D94C
-=proc_stack:<0.43.0>
-3a42ac:SReturn addr 0x225860 (proc_lib:init_p/5 + 164)
-y0:N
-y1:A8:infinity
-y2:AA:supervisor
-y3:H3A3E34
-y4:A1A:httpd_sup__127_0_0_1__8888
-y5:P<0.33.0>
-3a42c8:SReturn addr 0x156F90 (<terminate process normally>)
-y0:SCatch 0x225860 (proc_lib:init_p/5 + 164)
-y1:A3:gen
-y2:A7:init_it
-y3:H39D9CC
-=proc_heap:<0.43.0>
-3A3E34:tA:A5:state,H39D960,AB:one_for_one,H3A3E20,N,I0,I1,N,A9:httpd_sup,H39DA88
-39DA88:lA9:undefined|H39DB18
-39DB18:lH39DB50|H39DB58
-39DB50:lH39DB88|H39DB94
-39DB88:t2:AB:server_root,H39DBD0
-39DBD0:lI47|H39DC0C
-39DC0C:lI99|H39DC50
-39DC50:lI108|H39DC84
-39DC84:lI101|H39DCC4
-39DCC4:lI97|H39DD28
-39DD28:lI114|H39DD90
-39DD90:lI99|H39DE00
-39DE00:lI97|H39DE78
-39DE78:lI115|H39DF00
-39DF00:lI101|H39DF90
-39DF90:lI47|H39E038
-39E038:lI111|H39E0E8
-39E0E8:lI116|H39E1AC
-39E1AC:lI112|H39E288
-39E288:lI47|H39E37C
-39E37C:lI101|H39E478
-39E478:lI114|H39E580
-39E580:lI116|H39E69C
-39E69C:lI115|H39E7B0
-39E7B0:lI47|H39E8C4
-39E8C4:lI108|H39E9D8
-39E9D8:lI105|H39EACC
-39EACC:lI98|H39EBC0
-39EBC0:lI47|H39ECB4
-39ECB4:lI119|H39EDA8
-39EDA8:lI101|H39EE7C
-39EE7C:lI98|H39EF50
-39EF50:lI116|H39F02C
-39F02C:lI111|H39F110
-39F110:lI111|H39F1E4
-39F1E4:lI108|H39F2B0
-39F2B0:lI47|H39F36C
-39F36C:lI112|H39F430
-39F430:lI114|H39F4FC
-39F4FC:lI105|H39F5C0
-39F5C0:lI118|H39F694
-39F694:lI47|H39F768
-39F768:lI114|H39F83C
-39F83C:lI111|H39F920
-39F920:lI111|H39F9FC
-39F9FC:lI116|N
-39DB94:lH39DBD8|H39DBE4
-39DBD8:t2:AD:document_root,H39DC14
-39DC14:lI47|H39DC58
-39DC58:lI99|H39DC8C
-39DC8C:lI108|H39DCCC
-39DCCC:lI101|H39DD30
-39DD30:lI97|H39DD98
-39DD98:lI114|H39DE08
-39DE08:lI99|H39DE80
-39DE80:lI97|H39DF08
-39DF08:lI115|H39DF98
-39DF98:lI101|H39E040
-39E040:lI47|H39E0F0
-39E0F0:lI111|H39E1B4
-39E1B4:lI116|H39E290
-39E290:lI112|H39E384
-39E384:lI47|H39E480
-39E480:lI101|H39E588
-39E588:lI114|H39E6A4
-39E6A4:lI116|H39E7B8
-39E7B8:lI115|H39E8CC
-39E8CC:lI47|H39E9E0
-39E9E0:lI108|H39EAD4
-39EAD4:lI105|H39EBC8
-39EBC8:lI98|H39ECBC
-39ECBC:lI47|H39EDB0
-39EDB0:lI119|H39EE84
-39EE84:lI101|H39EF58
-39EF58:lI98|H39F034
-39F034:lI116|H39F118
-39F118:lI111|H39F1EC
-39F1EC:lI111|H39F2B8
-39F2B8:lI108|H39F374
-39F374:lI47|H39F438
-39F438:lI112|H39F504
-39F504:lI114|H39F5C8
-39F5C8:lI105|H39F69C
-39F69C:lI118|H39F770
-39F770:lI47|H39F844
-39F844:lI114|H39F928
-39F928:lI111|H39FA04
-39FA04:lI111|H39FAD8
-39FAD8:lI116|H39FBB4
-39FBB4:lI47|H39FC80
-39FC80:lI100|H39FD44
-39FD44:lI111|H39FE10
-39FE10:lI99|N
-39DBE4:lH39DC1C|H39DC28
-39DC1C:t2:AA:mime_types,H39DC60
-39DC60:lH39DC94|H39DCA0
-39DC94:t2:H39DCD4,H39DCDC
-39DCDC:lI120|H39DD40
-39DD40:lI45|H39DDA8
-39DDA8:lI119|H39DE10
-39DE10:lI111|H39DE88
-39DE88:lI114|H39DF10
-39DF10:lI108|H39DFA0
-39DFA0:lI100|H39E048
-39E048:lI47|H39E0F8
-39E0F8:lI120|H39E1BC
-39E1BC:lI45|H39E298
-39E298:lI118|H39E38C
-39E38C:lI114|H39E488
-39E488:lI109|H39E590
-39E590:lI108|N
-39DCD4:lI119|H39DD38
-39DD38:lI114|H39DDA0
-39DDA0:lI108|N
-39DCA0:lH39DCE4|H39DCF0
-39DCE4:t2:H39DD48,H39DD50
-39DD50:lI120|H39DDB8
-39DDB8:lI45|H39DE20
-39DE20:lI119|H39DE98
-39DE98:lI111|H39DF18
-39DF18:lI114|H39DFA8
-39DFA8:lI108|H39E050
-39E050:lI100|H39E100
-39E100:lI47|H39E1C4
-39E1C4:lI120|H39E2A0
-39E2A0:lI45|H39E394
-39E394:lI118|H39E490
-39E490:lI114|H39E598
-39E598:lI109|H39E6AC
-39E6AC:lI108|N
-39DD48:lI118|H39DDB0
-39DDB0:lI114|H39DE18
-39DE18:lI109|H39DE90
-39DE90:lI108|N
-39DCF0:lH39DD58|H39DD64
-39DD58:t2:H39DDC0,H39DDC8
-39DDC8:lI120|H39DE30
-39DE30:lI45|H39DEA8
-39DEA8:lI99|H39DF20
-39DF20:lI111|H39DFB0
-39DFB0:lI110|H39E058
-39E058:lI102|H39E108
-39E108:lI101|H39E1CC
-39E1CC:lI114|H39E2A8
-39E2A8:lI101|H39E39C
-39E39C:lI110|H39E498
-39E498:lI99|H39E5A0
-39E5A0:lI101|H39E6B4
-39E6B4:lI47|H39E7C0
-39E7C0:lI120|H39E8D4
-39E8D4:lI45|H39E9E8
-39E9E8:lI99|H39EADC
-39EADC:lI111|H39EBD0
-39EBD0:lI111|H39ECC4
-39ECC4:lI108|H39EDB8
-39EDB8:lI116|H39EE8C
-39EE8C:lI97|H39EF60
-39EF60:lI108|H39F03C
-39F03C:lI107|N
-39DDC0:lI105|H39DE28
-39DE28:lI99|H39DEA0
-39DEA0:lI101|N
-39DD64:lH39DDD0|H39DDDC
-39DDD0:t2:H39DE38,H39DE40
-39DE40:lI118|H39DEB8
-39DEB8:lI105|H39DF30
-39DF30:lI100|H39DFC0
-39DFC0:lI101|H39E068
-39E068:lI111|H39E110
-39E110:lI47|H39E1D4
-39E1D4:lI120|H39E2B0
-39E2B0:lI45|H39E3A4
-39E3A4:lI115|H39E4A0
-39E4A0:lI103|H39E5A8
-39E5A8:lI105|H39E6BC
-39E6BC:lI45|H39E7C8
-39E7C8:lI109|H39E8DC
-39E8DC:lI111|H39E9F0
-39E9F0:lI118|H39EAE4
-39EAE4:lI105|H39EBD8
-39EBD8:lI101|N
-39DE38:lI109|H39DEB0
-39DEB0:lI111|H39DF28
-39DF28:lI118|H39DFB8
-39DFB8:lI105|H39E060
-39E060:lI101|N
-39DDDC:lH39DE48|H39DE54
-39DE48:t2:H39DEC0,H39DEC8
-39DEC8:lI118|H39DF40
-39DF40:lI105|H39DFD0
-39DFD0:lI100|H39E070
-39E070:lI101|H39E118
-39E118:lI111|H39E1DC
-39E1DC:lI47|H39E2B8
-39E2B8:lI120|H39E3AC
-39E3AC:lI45|H39E4A8
-39E4A8:lI109|H39E5B0
-39E5B0:lI115|H39E6C4
-39E6C4:lI118|H39E7D0
-39E7D0:lI105|H39E8E4
-39E8E4:lI100|H39E9F8
-39E9F8:lI101|H39EAEC
-39EAEC:lI111|N
-39DEC0:lI97|H39DF38
-39DF38:lI118|H39DFC8
-39DFC8:lI105|N
-39DE54:lH39DED0|H39DEDC
-39DED0:t2:H39DF48,H39DF50
-39DF50:lI118|H39DFE0
-39DFE0:lI105|H39E078
-39E078:lI100|H39E120
-39E120:lI101|H39E1E4
-39E1E4:lI111|H39E2C0
-39E2C0:lI47|H39E3B4
-39E3B4:lI113|H39E4B0
-39E4B0:lI117|H39E5B8
-39E5B8:lI105|H39E6CC
-39E6CC:lI99|H39E7D8
-39E7D8:lI107|H39E8EC
-39E8EC:lI116|H39EA00
-39EA00:lI105|H39EAF4
-39EAF4:lI109|H39EBE0
-39EBE0:lI101|N
-39DF48:lI113|H39DFD8
-39DFD8:lI116|N
-39DEDC:lH39DF58|H39DF64
-39DF58:t2:H39DFE8,H39DFF0
-39DFF0:lI118|H39E088
-39E088:lI105|H39E130
-39E130:lI100|H39E1EC
-39E1EC:lI101|H39E2C8
-39E2C8:lI111|H39E3BC
-39E3BC:lI47|H39E4B8
-39E4B8:lI113|H39E5C0
-39E5C0:lI117|H39E6D4
-39E6D4:lI105|H39E7E0
-39E7E0:lI99|H39E8F4
-39E8F4:lI107|H39EA08
-39EA08:lI116|H39EAFC
-39EAFC:lI105|H39EBE8
-39EBE8:lI109|H39ECCC
-39ECCC:lI101|N
-39DFE8:lI109|H39E080
-39E080:lI111|H39E128
-39E128:lI118|N
-39DF64:lH39DFF8|H39E004
-39DFF8:t2:H39E090,H39E098
-39E098:lI118|H39E140
-39E140:lI105|H39E1FC
-39E1FC:lI100|H39E2D8
-39E2D8:lI101|H39E3C4
-39E3C4:lI111|H39E4C0
-39E4C0:lI47|H39E5C8
-39E5C8:lI109|H39E6DC
-39E6DC:lI112|H39E7E8
-39E7E8:lI101|H39E8FC
-39E8FC:lI103|N
-39E090:lI109|H39E138
-39E138:lI112|H39E1F4
-39E1F4:lI101|H39E2D0
-39E2D0:lI103|N
-39E004:lH39E0A0|H39E0AC
-39E0A0:t2:H39E148,H39E150
-39E150:lI118|H39E20C
-39E20C:lI105|H39E2E8
-39E2E8:lI100|H39E3CC
-39E3CC:lI101|H39E4C8
-39E4C8:lI111|H39E5D0
-39E5D0:lI47|H39E6E4
-39E6E4:lI109|H39E7F0
-39E7F0:lI112|H39E904
-39E904:lI101|H39EA10
-39EA10:lI103|N
-39E148:lI109|H39E204
-39E204:lI112|H39E2E0
-39E2E0:lI103|N
-39E0AC:lH39E158|H39E164
-39E158:t2:H39E214,H39E21C
-39E21C:lI118|H39E2F8
-39E2F8:lI105|H39E3DC
-39E3DC:lI100|H39E4D0
-39E4D0:lI101|H39E5D8
-39E5D8:lI111|H39E6EC
-39E6EC:lI47|H39E7F8
-39E7F8:lI109|H39E90C
-39E90C:lI112|H39EA18
-39EA18:lI101|H39EB04
-39EB04:lI103|N
-39E214:lI109|H39E2F0
-39E2F0:lI112|H39E3D4
-39E3D4:lI101|N
-39E164:lH39E224|H39E230
-39E224:t2:H39E300,H39E308
-39E308:lI116|H39E3EC
-39E3EC:lI101|H39E4E0
-39E4E0:lI120|H39E5E8
-39E5E8:lI116|H39E6F4
-39E6F4:lI47|H39E800
-39E800:lI120|H39E914
-39E914:lI45|H39EA20
-39EA20:lI115|H39EB0C
-39EB0C:lI103|H39EBF0
-39EBF0:lI109|H39ECD4
-39ECD4:lI108|N
-39E300:lI115|H39E3E4
-39E3E4:lI103|H39E4D8
-39E4D8:lI109|H39E5E0
-39E5E0:lI108|N
-39E230:lH39E310|H39E31C
-39E310:t2:H39E3F4,H39E3FC
-39E3FC:lI116|H39E4F0
-39E4F0:lI101|H39E5F8
-39E5F8:lI120|H39E6FC
-39E6FC:lI116|H39E808
-39E808:lI47|H39E91C
-39E91C:lI120|H39EA28
-39EA28:lI45|H39EB14
-39EB14:lI115|H39EBF8
-39EBF8:lI103|H39ECDC
-39ECDC:lI109|H39EDC0
-39EDC0:lI108|N
-39E3F4:lI115|H39E4E8
-39E4E8:lI103|H39E5F0
-39E5F0:lI109|N
-39E31C:lH39E404|H39E410
-39E404:t2:H39E4F8,H39E500
-39E500:lI116|H39E608
-39E608:lI101|H39E70C
-39E70C:lI120|H39E810
-39E810:lI116|H39E924
-39E924:lI47|H39EA30
-39EA30:lI120|H39EB1C
-39EB1C:lI45|H39EC00
-39EC00:lI115|H39ECE4
-39ECE4:lI101|H39EDC8
-39EDC8:lI116|H39EE94
-39EE94:lI101|H39EF68
-39EF68:lI120|H39F044
-39F044:lI116|N
-39E4F8:lI101|H39E600
-39E600:lI116|H39E704
-39E704:lI120|N
-39E410:lH39E508|H39E514
-39E508:t2:H39E610,H39E618
-39E618:lI116|H39E71C
-39E71C:lI101|H39E820
-39E820:lI120|H39E92C
-39E92C:lI116|H39EA38
-39EA38:lI47|H39EB24
-39EB24:lI116|H39EC08
-39EC08:lI97|H39ECEC
-39ECEC:lI98|H39EDD0
-39EDD0:lI45|H39EE9C
-39EE9C:lI115|H39EF70
-39EF70:lI101|H39F04C
-39F04C:lI112|H39F120
-39F120:lI97|H39F1F4
-39F1F4:lI114|H39F2C0
-39F2C0:lI97|H39F37C
-39F37C:lI116|H39F440
-39F440:lI101|H39F50C
-39F50C:lI100|H39F5D0
-39F5D0:lI45|H39F6A4
-39F6A4:lI118|H39F778
-39F778:lI97|H39F84C
-39F84C:lI108|H39F930
-39F930:lI117|H39FA0C
-39FA0C:lI101|H39FAE0
-39FAE0:lI115|N
-39E610:lI116|H39E714
-39E714:lI115|H39E818
-39E818:lI118|N
-39E514:lH39E620|H39E62C
-39E620:t2:H39E724,H39E72C
-39E72C:lI116|H39E830
-39E830:lI101|H39E93C
-39E93C:lI120|H39EA40
-39EA40:lI116|H39EB2C
-39EB2C:lI47|H39EC10
-39EC10:lI114|H39ECF4
-39ECF4:lI105|H39EDD8
-39EDD8:lI99|H39EEA4
-39EEA4:lI104|H39EF78
-39EF78:lI116|H39F054
-39F054:lI101|H39F128
-39F128:lI120|H39F1FC
-39F1FC:lI116|N
-39E724:lI114|H39E828
-39E828:lI116|H39E934
-39E934:lI120|N
-39E62C:lH39E734|H39E740
-39E734:t2:H39E838,H39E840
-39E840:lI116|H39E94C
-39E94C:lI101|H39EA50
-39EA50:lI120|H39EB34
-39EB34:lI116|H39EC18
-39EC18:lI47|H39ECFC
-39ECFC:lI112|H39EDE0
-39EDE0:lI108|H39EEAC
-39EEAC:lI97|H39EF80
-39EF80:lI105|H39F05C
-39F05C:lI110|N
-39E838:lI116|H39E944
-39E944:lI120|H39EA48
-39EA48:lI116|N
-39E740:lH39E848|H39E854
-39E848:t2:H39E954,H39E95C
-39E95C:lI116|H39EA60
-39EA60:lI101|H39EB44
-39EB44:lI120|H39EC28
-39EC28:lI116|H39ED0C
-39ED0C:lI47|H39EDE8
-39EDE8:lI120|H39EEB4
-39EEB4:lI45|H39EF88
-39EF88:lI115|H39F064
-39F064:lI101|H39F130
-39F130:lI114|H39F204
-39F204:lI118|H39F2C8
-39F2C8:lI101|H39F384
-39F384:lI114|H39F448
-39F448:lI45|H39F514
-39F514:lI112|H39F5D8
-39F5D8:lI97|H39F6AC
-39F6AC:lI114|H39F780
-39F780:lI115|H39F854
-39F854:lI101|H39F938
-39F938:lI100|H39FA14
-39FA14:lI45|H39FAE8
-39FAE8:lI104|H39FBBC
-39FBBC:lI116|H39FC88
-39FC88:lI109|H39FD4C
-39FD4C:lI108|N
-39E954:lI115|H39EA58
-39EA58:lI104|H39EB3C
-39EB3C:lI116|H39EC20
-39EC20:lI109|H39ED04
-39ED04:lI108|N
-39E854:lH39E964|H39E970
-39E964:t2:H39EA68,H39EA70
-39EA70:lI116|H39EB54
-39EB54:lI101|H39EC38
-39EC38:lI120|H39ED1C
-39ED1C:lI116|H39EDF0
-39EDF0:lI47|H39EEBC
-39EEBC:lI104|H39EF90
-39EF90:lI116|H39F06C
-39F06C:lI109|H39F138
-39F138:lI108|N
-39EA68:lI104|H39EB4C
-39EB4C:lI116|H39EC30
-39EC30:lI109|H39ED14
-39ED14:lI108|N
-39E970:lH39EA78|H39EA84
-39EA78:t2:H39EB5C,H39EB64
-39EB64:lI116|H39EC48
-39EC48:lI101|H39ED2C
-39ED2C:lI120|H39EDF8
-39EDF8:lI116|H39EEC4
-39EEC4:lI47|H39EF98
-39EF98:lI104|H39F074
-39F074:lI116|H39F140
-39F140:lI109|H39F20C
-39F20C:lI108|N
-39EB5C:lI104|H39EC40
-39EC40:lI116|H39ED24
-39ED24:lI109|N
-39EA84:lH39EB6C|H39EB78
-39EB6C:t2:H39EC50,H39EC58
-39EC58:lI105|H39ED3C
-39ED3C:lI109|H39EE08
-39EE08:lI97|H39EECC
-39EECC:lI103|H39EFA0
-39EFA0:lI101|H39F07C
-39F07C:lI47|H39F148
-39F148:lI120|H39F214
-39F214:lI45|H39F2D0
-39F2D0:lI120|H39F38C
-39F38C:lI119|H39F450
-39F450:lI105|H39F51C
-39F51C:lI110|H39F5E0
-39F5E0:lI100|H39F6B4
-39F6B4:lI111|H39F788
-39F788:lI119|H39F85C
-39F85C:lI100|H39F940
-39F940:lI117|H39FA1C
-39FA1C:lI109|H39FAF0
-39FAF0:lI112|N
-39EC50:lI120|H39ED34
-39ED34:lI119|H39EE00
-39EE00:lI100|N
-39EB78:lH39EC60|H39EC6C
-39EC60:t2:H39ED44,H39ED4C
-39ED4C:lI105|H39EE18
-39EE18:lI109|H39EEDC
-39EEDC:lI97|H39EFA8
-39EFA8:lI103|H39F084
-39F084:lI101|H39F150
-39F150:lI47|H39F21C
-39F21C:lI120|H39F2D8
-39F2D8:lI45|H39F394
-39F394:lI120|H39F458
-39F458:lI112|H39F524
-39F524:lI105|H39F5E8
-39F5E8:lI120|H39F6BC
-39F6BC:lI109|H39F790
-39F790:lI97|H39F864
-39F864:lI112|N
-39ED44:lI120|H39EE10
-39EE10:lI112|H39EED4
-39EED4:lI109|N
-39EC6C:lH39ED54|H39ED60
-39ED54:t2:H39EE20,H39EE28
-39EE28:lI105|H39EEEC
-39EEEC:lI109|H39EFB8
-39EFB8:lI97|H39F08C
-39F08C:lI103|H39F158
-39F158:lI101|H39F224
-39F224:lI47|H39F2E0
-39F2E0:lI120|H39F39C
-39F39C:lI45|H39F460
-39F460:lI120|H39F52C
-39F52C:lI98|H39F5F0
-39F5F0:lI105|H39F6C4
-39F6C4:lI116|H39F798
-39F798:lI109|H39F86C
-39F86C:lI97|H39F948
-39F948:lI112|N
-39EE20:lI120|H39EEE4
-39EEE4:lI98|H39EFB0
-39EFB0:lI109|N
-39ED60:lH39EE30|H39EE3C
-39EE30:t2:H39EEF4,H39EEFC
-39EEFC:lI105|H39EFC8
-39EFC8:lI109|H39F09C
-39F09C:lI97|H39F160
-39F160:lI103|H39F22C
-39F22C:lI101|H39F2E8
-39F2E8:lI47|H39F3A4
-39F3A4:lI120|H39F468
-39F468:lI45|H39F534
-39F534:lI114|H39F5F8
-39F5F8:lI103|H39F6CC
-39F6CC:lI98|N
-39EEF4:lI114|H39EFC0
-39EFC0:lI103|H39F094
-39F094:lI98|N
-39EE3C:lH39EF04|H39EF10
-39EF04:t2:H39EFD0,H39EFD8
-39EFD8:lI105|H39F0AC
-39F0AC:lI109|H39F170
-39F170:lI97|H39F234
-39F234:lI103|H39F2F0
-39F2F0:lI101|H39F3AC
-39F3AC:lI47|H39F470
-39F470:lI120|H39F53C
-39F53C:lI45|H39F600
-39F600:lI112|H39F6D4
-39F6D4:lI111|H39F7A0
-39F7A0:lI114|H39F874
-39F874:lI116|H39F950
-39F950:lI97|H39FA24
-39FA24:lI98|H39FAF8
-39FAF8:lI108|H39FBC4
-39FBC4:lI101|H39FC90
-39FC90:lI45|H39FD54
-39FD54:lI112|H39FE18
-39FE18:lI105|H39FECC
-39FECC:lI120|H39FF88
-39FF88:lI109|H3A003C
-3A003C:lI97|H3A00E8
-3A00E8:lI112|N
-39EFD0:lI112|H39F0A4
-39F0A4:lI112|H39F168
-39F168:lI109|N
-39EF10:lH39EFE0|H39EFEC
-39EFE0:t2:H39F0B4,H39F0BC
-39F0BC:lI105|H39F180
-39F180:lI109|H39F244
-39F244:lI97|H39F2F8
-39F2F8:lI103|H39F3B4
-39F3B4:lI101|H39F478
-39F478:lI47|H39F544
-39F544:lI120|H39F608
-39F608:lI45|H39F6DC
-39F6DC:lI112|H39F7A8
-39F7A8:lI111|H39F87C
-39F87C:lI114|H39F958
-39F958:lI116|H39FA2C
-39FA2C:lI97|H39FB00
-39FB00:lI98|H39FBCC
-39FBCC:lI108|H39FC98
-39FC98:lI101|H39FD5C
-39FD5C:lI45|H39FE20
-39FE20:lI103|H39FED4
-39FED4:lI114|H39FF90
-39FF90:lI97|H3A0044
-3A0044:lI121|H3A00F0
-3A00F0:lI109|H3A0194
-3A0194:lI97|H3A0248
-3A0248:lI112|N
-39F0B4:lI112|H39F178
-39F178:lI103|H39F23C
-39F23C:lI109|N
-39EFEC:lH39F0C4|H39F0D0
-39F0C4:t2:H39F188,H39F190
-39F190:lI105|H39F254
-39F254:lI109|H39F308
-39F308:lI97|H39F3BC
-39F3BC:lI103|H39F480
-39F480:lI101|H39F54C
-39F54C:lI47|H39F610
-39F610:lI120|H39F6E4
-39F6E4:lI45|H39F7B0
-39F7B0:lI112|H39F884
-39F884:lI111|H39F960
-39F960:lI114|H39FA34
-39FA34:lI116|H39FB08
-39FB08:lI97|H39FBD4
-39FBD4:lI98|H39FCA0
-39FCA0:lI108|H39FD64
-39FD64:lI101|H39FE28
-39FE28:lI45|H39FEDC
-39FEDC:lI98|H39FF98
-39FF98:lI105|H3A004C
-3A004C:lI116|H3A00F8
-3A00F8:lI109|H3A019C
-3A019C:lI97|H3A0250
-3A0250:lI112|N
-39F188:lI112|H39F24C
-39F24C:lI98|H39F300
-39F300:lI109|N
-39F0D0:lH39F198|H39F1A4
-39F198:t2:H39F25C,H39F264
-39F264:lI105|H39F318
-39F318:lI109|H39F3CC
-39F3CC:lI97|H39F488
-39F488:lI103|H39F554
-39F554:lI101|H39F618
-39F618:lI47|H39F6EC
-39F6EC:lI120|H39F7B8
-39F7B8:lI45|H39F88C
-39F88C:lI112|H39F968
-39F968:lI111|H39FA3C
-39FA3C:lI114|H39FB10
-39FB10:lI116|H39FBDC
-39FBDC:lI97|H39FCA8
-39FCA8:lI98|H39FD6C
-39FD6C:lI108|H39FE30
-39FE30:lI101|H39FEE4
-39FEE4:lI45|H39FFA0
-39FFA0:lI97|H3A0054
-3A0054:lI110|H3A0100
-3A0100:lI121|H3A01A4
-3A01A4:lI109|H3A0258
-3A0258:lI97|H3A0304
-3A0304:lI112|N
-39F25C:lI112|H39F310
-39F310:lI110|H39F3C4
-39F3C4:lI109|N
-39F1A4:lH39F26C|H39F278
-39F26C:t2:H39F320,H39F328
-39F328:lI105|H39F3DC
-39F3DC:lI109|H39F498
-39F498:lI97|H39F55C
-39F55C:lI103|H39F620
-39F620:lI101|H39F6F4
-39F6F4:lI47|H39F7C0
-39F7C0:lI120|H39F894
-39F894:lI45|H39F970
-39F970:lI99|H39FA44
-39FA44:lI109|H39FB18
-39FB18:lI117|H39FBE4
-39FBE4:lI45|H39FCB0
-39FCB0:lI114|H39FD74
-39FD74:lI97|H39FE38
-39FE38:lI115|H39FEEC
-39FEEC:lI116|H39FFA8
-39FFA8:lI101|H3A005C
-3A005C:lI114|N
-39F320:lI114|H39F3D4
-39F3D4:lI97|H39F490
-39F490:lI115|N
-39F278:lH39F330|H39F33C
-39F330:t2:H39F3E4,H39F3EC
-39F3EC:lI105|H39F4A8
-39F4A8:lI109|H39F56C
-39F56C:lI97|H39F630
-39F630:lI103|H39F6FC
-39F6FC:lI101|H39F7C8
-39F7C8:lI47|H39F89C
-39F89C:lI116|H39F978
-39F978:lI105|H39FA4C
-39FA4C:lI102|H39FB20
-39FB20:lI102|N
-39F3E4:lI116|H39F4A0
-39F4A0:lI105|H39F564
-39F564:lI102|H39F628
-39F628:lI102|N
-39F33C:lH39F3F4|H39F400
-39F3F4:t2:H39F4B0,H39F4B8
-39F4B8:lI105|H39F57C
-39F57C:lI109|H39F640
-39F640:lI97|H39F704
-39F704:lI103|H39F7D0
-39F7D0:lI101|H39F8A4
-39F8A4:lI47|H39F980
-39F980:lI116|H39FA54
-39FA54:lI105|H39FB28
-39FB28:lI102|H39FBEC
-39FBEC:lI102|N
-39F4B0:lI116|H39F574
-39F574:lI105|H39F638
-39F638:lI102|N
-39F400:lH39F4C0|H39F4CC
-39F4C0:t2:H39F584,H39F58C
-39F58C:lI105|H39F650
-39F650:lI109|H39F714
-39F714:lI97|H39F7D8
-39F7D8:lI103|H39F8AC
-39F8AC:lI101|H39F988
-39F988:lI47|H39FA5C
-39FA5C:lI112|H39FB30
-39FB30:lI110|H39FBF4
-39FBF4:lI103|N
-39F584:lI112|H39F648
-39F648:lI110|H39F70C
-39F70C:lI103|N
-39F4CC:lH39F594|H39F5A0
-39F594:t2:H39F658,H39F660
-39F660:lI105|H39F724
-39F724:lI109|H39F7E8
-39F7E8:lI97|H39F8BC
-39F8BC:lI103|H39F990
-39F990:lI101|H39FA64
-39FA64:lI47|H39FB38
-39FB38:lI106|H39FBFC
-39FBFC:lI112|H39FCB8
-39FCB8:lI101|H39FD7C
-39FD7C:lI103|N
-39F658:lI106|H39F71C
-39F71C:lI112|H39F7E0
-39F7E0:lI101|H39F8B4
-39F8B4:lI103|N
-39F5A0:lH39F668|H39F674
-39F668:t2:H39F72C,H39F734
-39F734:lI105|H39F7F8
-39F7F8:lI109|H39F8CC
-39F8CC:lI97|H39F998
-39F998:lI103|H39FA6C
-39FA6C:lI101|H39FB40
-39FB40:lI47|H39FC04
-39FC04:lI106|H39FCC0
-39FCC0:lI112|H39FD84
-39FD84:lI101|H39FE40
-39FE40:lI103|N
-39F72C:lI106|H39F7F0
-39F7F0:lI112|H39F8C4
-39F8C4:lI103|N
-39F674:lH39F73C|H39F748
-39F73C:t2:H39F800,H39F808
-39F808:lI105|H39F8DC
-39F8DC:lI109|H39F9A8
-39F9A8:lI97|H39FA74
-39FA74:lI103|H39FB48
-39FB48:lI101|H39FC0C
-39FC0C:lI47|H39FCC8
-39FCC8:lI106|H39FD8C
-39FD8C:lI112|H39FE48
-39FE48:lI101|H39FEF4
-39FEF4:lI103|N
-39F800:lI106|H39F8D4
-39F8D4:lI112|H39F9A0
-39F9A0:lI101|N
-39F748:lH39F810|H39F81C
-39F810:t2:H39F8E4,H39F8EC
-39F8EC:lI105|H39F9B8
-39F9B8:lI109|H39FA84
-39FA84:lI97|H39FB50
-39FB50:lI103|H39FC14
-39FC14:lI101|H39FCD0
-39FCD0:lI47|H39FD94
-39FD94:lI105|H39FE50
-39FE50:lI101|H39FEFC
-39FEFC:lI102|N
-39F8E4:lI105|H39F9B0
-39F9B0:lI101|H39FA7C
-39FA7C:lI102|N
-39F81C:lH39F8F4|H39F900
-39F8F4:t2:H39F9C0,H39F9C8
-39F9C8:lI105|H39FA94
-39FA94:lI109|H39FB60
-39FB60:lI97|H39FC1C
-39FC1C:lI103|H39FCD8
-39FCD8:lI101|H39FD9C
-39FD9C:lI47|H39FE58
-39FE58:lI103|H39FF04
-39FF04:lI105|H39FFB0
-39FFB0:lI102|N
-39F9C0:lI103|H39FA8C
-39FA8C:lI105|H39FB58
-39FB58:lI102|N
-39F900:lH39F9D0|H39F9DC
-39F9D0:t2:H39FA9C,H39FAA4
-39FAA4:lI99|H39FB70
-39FB70:lI104|H39FC2C
-39FC2C:lI101|H39FCE0
-39FCE0:lI109|H39FDA4
-39FDA4:lI105|H39FE60
-39FE60:lI99|H39FF0C
-39FF0C:lI97|H39FFB8
-39FFB8:lI108|H3A0064
-3A0064:lI47|H3A0108
-3A0108:lI120|H3A01AC
-3A01AC:lI45|H3A0260
-3A0260:lI112|H3A030C
-3A030C:lI100|H3A03B8
-3A03B8:lI98|N
-39FA9C:lI112|H39FB68
-39FB68:lI100|H39FC24
-39FC24:lI98|N
-39F9DC:lH39FAAC|H39FAB8
-39FAAC:t2:H39FB78,H39FB80
-39FB80:lI99|H39FC3C
-39FC3C:lI104|H39FCF0
-39FCF0:lI101|H39FDAC
-39FDAC:lI109|H39FE68
-39FE68:lI105|H39FF14
-39FF14:lI99|H39FFC0
-39FFC0:lI97|H3A006C
-3A006C:lI108|H3A0110
-3A0110:lI47|H3A01B4
-3A01B4:lI120|H3A0268
-3A0268:lI45|H3A0314
-3A0314:lI112|H3A03C0
-3A03C0:lI100|H3A0454
-3A0454:lI98|N
-39FB78:lI120|H39FC34
-39FC34:lI121|H39FCE8
-39FCE8:lI122|N
-39FAB8:lH39FB88|H39FB94
-39FB88:t2:H39FC44,H39FC4C
-39FC4C:lI97|H39FD00
-39FD00:lI117|H39FDBC
-39FDBC:lI100|H39FE70
-39FE70:lI105|H39FF1C
-39FF1C:lI111|H39FFC8
-39FFC8:lI47|H3A0074
-3A0074:lI120|H3A0118
-3A0118:lI45|H3A01BC
-3A01BC:lI119|H3A0270
-3A0270:lI97|H3A031C
-3A031C:lI118|N
-39FC44:lI119|H39FCF8
-39FCF8:lI97|H39FDB4
-39FDB4:lI118|N
-39FB94:lH39FC54|H39FC60
-39FC54:t2:H39FD08,H39FD10
-39FD10:lI97|H39FDCC
-39FDCC:lI117|H39FE78
-39FE78:lI100|H39FF24
-39FF24:lI105|H39FFD0
-39FFD0:lI111|H3A007C
-3A007C:lI47|H3A0120
-3A0120:lI120|H3A01C4
-3A01C4:lI45|H3A0278
-3A0278:lI114|H3A0324
-3A0324:lI101|H3A03C8
-3A03C8:lI97|H3A045C
-3A045C:lI108|H3A04F8
-3A04F8:lI97|H3A059C
-3A059C:lI117|H3A0648
-3A0648:lI100|H3A06F4
-3A06F4:lI105|H3A07A0
-3A07A0:lI111|N
-39FD08:lI114|H39FDC4
-39FDC4:lI97|N
-39FC60:lH39FD18|H39FD24
-39FD18:t2:H39FDD4,H39FDDC
-39FDDC:lI97|H39FE88
-39FE88:lI117|H39FF34
-39FF34:lI100|H39FFD8
-39FFD8:lI105|H3A0084
-3A0084:lI111|H3A0128
-3A0128:lI47|H3A01CC
-3A01CC:lI120|H3A0280
-3A0280:lI45|H3A032C
-3A032C:lI112|H3A03D0
-3A03D0:lI110|H3A0464
-3A0464:lI45|H3A0500
-3A0500:lI114|H3A05A4
-3A05A4:lI101|H3A0650
-3A0650:lI97|H3A06FC
-3A06FC:lI108|H3A07A8
-3A07A8:lI97|H3A0844
-3A0844:lI117|H3A08D0
-3A08D0:lI100|H3A0964
-3A0964:lI105|H3A09F8
-3A09F8:lI111|H3A0A94
-3A0A94:lI45|H3A0B40
-3A0B40:lI112|H3A0BEC
-3A0BEC:lI108|H3A0CA8
-3A0CA8:lI117|H3A0D64
-3A0D64:lI103|H3A0E18
-3A0E18:lI105|H3A0ECC
-3A0ECC:lI110|N
-39FDD4:lI114|H39FE80
-39FE80:lI112|H39FF2C
-39FF2C:lI109|N
-39FD24:lH39FDE4|H39FDF0
-39FDE4:t2:H39FE90,H39FE98
-39FE98:lI97|H39FF44
-39FF44:lI117|H39FFE8
-39FFE8:lI100|H3A008C
-3A008C:lI105|H3A0130
-3A0130:lI111|H3A01D4
-3A01D4:lI47|H3A0288
-3A0288:lI120|H3A0334
-3A0334:lI45|H3A03D8
-3A03D8:lI112|H3A046C
-3A046C:lI110|H3A0508
-3A0508:lI45|H3A05AC
-3A05AC:lI114|H3A0658
-3A0658:lI101|H3A0704
-3A0704:lI97|H3A07B0
-3A07B0:lI108|H3A084C
-3A084C:lI97|H3A08D8
-3A08D8:lI117|H3A096C
-3A096C:lI100|H3A0A00
-3A0A00:lI105|H3A0A9C
-3A0A9C:lI111|N
-39FE90:lI114|H39FF3C
-39FF3C:lI97|H39FFE0
-39FFE0:lI109|N
-39FDF0:lH39FEA0|H39FEAC
-39FEA0:t2:H39FF4C,H39FF54
-39FF54:lI97|H39FFF8
-39FFF8:lI117|H3A009C
-3A009C:lI100|H3A0138
-3A0138:lI105|H3A01DC
-3A01DC:lI111|H3A0290
-3A0290:lI47|H3A033C
-3A033C:lI120|H3A03E0
-3A03E0:lI45|H3A0474
-3A0474:lI97|H3A0510
-3A0510:lI105|H3A05B4
-3A05B4:lI102|H3A0660
-3A0660:lI102|N
-39FF4C:lI97|H39FFF0
-39FFF0:lI105|H3A0094
-3A0094:lI102|N
-39FEAC:lH39FF5C|H39FF68
-39FF5C:t2:H3A0000,H3A0008
-3A0008:lI97|H3A00AC
-3A00AC:lI117|H3A0148
-3A0148:lI100|H3A01EC
-3A01EC:lI105|H3A0298
-3A0298:lI111|H3A0344
-3A0344:lI47|H3A03E8
-3A03E8:lI120|H3A047C
-3A047C:lI45|H3A0518
-3A0518:lI97|H3A05BC
-3A05BC:lI105|H3A0668
-3A0668:lI102|H3A070C
-3A070C:lI102|N
-3A0000:lI97|H3A00A4
-3A00A4:lI105|H3A0140
-3A0140:lI102|H3A01E4
-3A01E4:lI102|N
-39FF68:lH3A0010|H3A001C
-3A0010:t2:H3A00B4,H3A00BC
-3A00BC:lI97|H3A0158
-3A0158:lI117|H3A01FC
-3A01FC:lI100|H3A02A8
-3A02A8:lI105|H3A034C
-3A034C:lI111|H3A03F0
-3A03F0:lI47|H3A0484
-3A0484:lI120|H3A0520
-3A0520:lI45|H3A05C4
-3A05C4:lI97|H3A0670
-3A0670:lI105|H3A0714
-3A0714:lI102|H3A07B8
-3A07B8:lI102|N
-3A00B4:lI97|H3A0150
-3A0150:lI105|H3A01F4
-3A01F4:lI102|H3A02A0
-3A02A0:lI99|N
-3A001C:lH3A00C4|H3A00D0
-3A00C4:t2:H3A0160,H3A0168
-3A0168:lI97|H3A020C
-3A020C:lI117|H3A02B8
-3A02B8:lI100|H3A035C
-3A035C:lI105|H3A03F8
-3A03F8:lI111|H3A048C
-3A048C:lI47|H3A0528
-3A0528:lI109|H3A05CC
-3A05CC:lI112|H3A0678
-3A0678:lI101|H3A071C
-3A071C:lI103|N
-3A0160:lI109|H3A0204
-3A0204:lI112|H3A02B0
-3A02B0:lI103|H3A0354
-3A0354:lI97|N
-3A00D0:lH3A0170|H3A017C
-3A0170:t2:H3A0214,H3A021C
-3A021C:lI97|H3A02C8
-3A02C8:lI117|H3A036C
-3A036C:lI100|H3A0400
-3A0400:lI105|H3A0494
-3A0494:lI111|H3A0530
-3A0530:lI47|H3A05D4
-3A05D4:lI109|H3A0680
-3A0680:lI112|H3A0724
-3A0724:lI101|H3A07C0
-3A07C0:lI103|N
-3A0214:lI109|H3A02C0
-3A02C0:lI112|H3A0364
-3A0364:lI50|N
-3A017C:lH3A0224|H3A0230
-3A0224:t2:H3A02D0,H3A02D8
-3A02D8:lI97|H3A037C
-3A037C:lI117|H3A0408
-3A0408:lI100|H3A049C
-3A049C:lI105|H3A0538
-3A0538:lI111|H3A05DC
-3A05DC:lI47|H3A0688
-3A0688:lI98|H3A072C
-3A072C:lI97|H3A07C8
-3A07C8:lI115|H3A0854
-3A0854:lI105|H3A08E0
-3A08E0:lI99|N
-3A02D0:lI97|H3A0374
-3A0374:lI117|N
-3A0230:lH3A02E0|H3A02EC
-3A02E0:t2:H3A0384,H3A038C
-3A038C:lI97|H3A0418
-3A0418:lI117|H3A04AC
-3A04AC:lI100|H3A0540
-3A0540:lI105|H3A05E4
-3A05E4:lI111|H3A0690
-3A0690:lI47|H3A0734
-3A0734:lI98|H3A07D0
-3A07D0:lI97|H3A085C
-3A085C:lI115|H3A08E8
-3A08E8:lI105|H3A0974
-3A0974:lI99|N
-3A0384:lI115|H3A0410
-3A0410:lI110|H3A04A4
-3A04A4:lI100|N
-3A02EC:lH3A0394|H3A03A0
-3A0394:t2:H3A0420,H3A0428
-3A0428:lI97|H3A04BC
-3A04BC:lI112|H3A0550
-3A0550:lI112|H3A05EC
-3A05EC:lI108|H3A0698
-3A0698:lI105|H3A073C
-3A073C:lI99|H3A07D8
-3A07D8:lI97|H3A0864
-3A0864:lI116|H3A08F0
-3A08F0:lI105|H3A097C
-3A097C:lI111|H3A0A08
-3A0A08:lI110|H3A0AA4
-3A0AA4:lI47|H3A0B48
-3A0B48:lI122|H3A0BF4
-3A0BF4:lI105|H3A0CB0
-3A0CB0:lI112|N
-3A0420:lI122|H3A04B4
-3A04B4:lI105|H3A0548
-3A0548:lI112|N
-3A03A0:lH3A0430|H3A043C
-3A0430:t2:H3A04C4,H3A04CC
-3A04CC:lI97|H3A0560
-3A0560:lI112|H3A05FC
-3A05FC:lI112|H3A06A0
-3A06A0:lI108|H3A0744
-3A0744:lI105|H3A07E0
-3A07E0:lI99|H3A086C
-3A086C:lI97|H3A08F8
-3A08F8:lI116|H3A0984
-3A0984:lI105|H3A0A10
-3A0A10:lI111|H3A0AAC
-3A0AAC:lI110|H3A0B50
-3A0B50:lI47|H3A0BFC
-3A0BFC:lI120|H3A0CB8
-3A0CB8:lI45|H3A0D6C
-3A0D6C:lI119|H3A0E20
-3A0E20:lI97|H3A0ED4
-3A0ED4:lI105|H3A0F90
-3A0F90:lI115|H3A105C
-3A105C:lI45|H3A1130
-3A1130:lI115|H3A1204
-3A1204:lI111|H3A12D0
-3A12D0:lI117|H3A13A4
-3A13A4:lI114|H3A1480
-3A1480:lI99|H3A1564
-3A1564:lI101|N
-3A04C4:lI115|H3A0558
-3A0558:lI114|H3A05F4
-3A05F4:lI99|N
-3A043C:lH3A04D4|H3A04E0
-3A04D4:t2:H3A0568,H3A0570
-3A0570:lI97|H3A060C
-3A060C:lI112|H3A06B0
-3A06B0:lI112|H3A0754
-3A0754:lI108|H3A07F0
-3A07F0:lI105|H3A0874
-3A0874:lI99|H3A0900
-3A0900:lI97|H3A098C
-3A098C:lI116|H3A0A18
-3A0A18:lI105|H3A0AB4
-3A0AB4:lI111|H3A0B58
-3A0B58:lI110|H3A0C04
-3A0C04:lI47|H3A0CC0
-3A0CC0:lI120|H3A0D74
-3A0D74:lI45|H3A0E28
-3A0E28:lI117|H3A0EDC
-3A0EDC:lI115|H3A0F98
-3A0F98:lI116|H3A1064
-3A1064:lI97|H3A1138
-3A1138:lI114|N
-3A0568:lI117|H3A0604
-3A0604:lI115|H3A06A8
-3A06A8:lI116|H3A074C
-3A074C:lI97|H3A07E8
-3A07E8:lI114|N
-3A04E0:lH3A0578|H3A0584
-3A0578:t2:H3A0614,H3A061C
-3A061C:lI97|H3A06C0
-3A06C0:lI112|H3A075C
-3A075C:lI112|H3A07F8
-3A07F8:lI108|H3A087C
-3A087C:lI105|H3A0908
-3A0908:lI99|H3A0994
-3A0994:lI97|H3A0A20
-3A0A20:lI116|H3A0ABC
-3A0ABC:lI105|H3A0B60
-3A0B60:lI111|H3A0C0C
-3A0C0C:lI110|H3A0CC8
-3A0CC8:lI47|H3A0D7C
-3A0D7C:lI120|H3A0E30
-3A0E30:lI45|H3A0EE4
-3A0EE4:lI116|H3A0FA0
-3A0FA0:lI114|H3A106C
-3A106C:lI111|H3A1140
-3A1140:lI102|H3A120C
-3A120C:lI102|H3A12D8
-3A12D8:lI45|H3A13AC
-3A13AC:lI109|H3A1488
-3A1488:lI115|N
-3A0614:lI109|H3A06B8
-3A06B8:lI115|N
-3A0584:lH3A0624|H3A0630
-3A0624:t2:H3A06C8,H3A06D0
-3A06D0:lI97|H3A076C
-3A076C:lI112|H3A0800
-3A0800:lI112|H3A0884
-3A0884:lI108|H3A0910
-3A0910:lI105|H3A099C
-3A099C:lI99|H3A0A28
-3A0A28:lI97|H3A0AC4
-3A0AC4:lI116|H3A0B68
-3A0B68:lI105|H3A0C14
-3A0C14:lI111|H3A0CD0
-3A0CD0:lI110|H3A0D84
-3A0D84:lI47|H3A0E38
-3A0E38:lI120|H3A0EEC
-3A0EEC:lI45|H3A0FA8
-3A0FA8:lI116|H3A1074
-3A1074:lI114|H3A1148
-3A1148:lI111|H3A1214
-3A1214:lI102|H3A12E0
-3A12E0:lI102|H3A13B4
-3A13B4:lI45|H3A1490
-3A1490:lI109|H3A156C
-3A156C:lI101|N
-3A06C8:lI109|H3A0764
-3A0764:lI101|N
-3A0630:lH3A06D8|H3A06E4
-3A06D8:t2:H3A0774,H3A077C
-3A077C:lI97|H3A0810
-3A0810:lI112|H3A0894
-3A0894:lI112|H3A0918
-3A0918:lI108|H3A09A4
-3A09A4:lI105|H3A0A30
-3A0A30:lI99|H3A0ACC
-3A0ACC:lI97|H3A0B70
-3A0B70:lI116|H3A0C1C
-3A0C1C:lI105|H3A0CD8
-3A0CD8:lI111|H3A0D8C
-3A0D8C:lI110|H3A0E40
-3A0E40:lI47|H3A0EF4
-3A0EF4:lI120|H3A0FB0
-3A0FB0:lI45|H3A107C
-3A107C:lI116|H3A1150
-3A1150:lI114|H3A121C
-3A121C:lI111|H3A12E8
-3A12E8:lI102|H3A13BC
-3A13BC:lI102|H3A1498
-3A1498:lI45|H3A1574
-3A1574:lI109|H3A1648
-3A1648:lI97|H3A171C
-3A171C:lI110|N
-3A0774:lI109|H3A0808
-3A0808:lI97|H3A088C
-3A088C:lI110|N
-3A06E4:lH3A0784|H3A0790
-3A0784:t2:H3A0818,H3A0820
-3A0820:lI97|H3A089C
-3A089C:lI112|H3A0920
-3A0920:lI112|H3A09AC
-3A09AC:lI108|H3A0A38
-3A0A38:lI105|H3A0AD4
-3A0AD4:lI99|H3A0B78
-3A0B78:lI97|H3A0C24
-3A0C24:lI116|H3A0CE0
-3A0CE0:lI105|H3A0D94
-3A0D94:lI111|H3A0E48
-3A0E48:lI110|H3A0EFC
-3A0EFC:lI47|H3A0FB8
-3A0FB8:lI120|H3A1084
-3A1084:lI45|H3A1158
-3A1158:lI116|H3A1224
-3A1224:lI114|H3A12F0
-3A12F0:lI111|H3A13C4
-3A13C4:lI102|H3A14A0
-3A14A0:lI102|N
-3A0818:lI116|N
-3A0790:lH3A0828|H3A0834
-3A0828:t2:H3A08A4,H3A08AC
-3A08AC:lI97|H3A0930
-3A0930:lI112|H3A09B4
-3A09B4:lI112|H3A0A40
-3A0A40:lI108|H3A0ADC
-3A0ADC:lI105|H3A0B80
-3A0B80:lI99|H3A0C2C
-3A0C2C:lI97|H3A0CE8
-3A0CE8:lI116|H3A0D9C
-3A0D9C:lI105|H3A0E50
-3A0E50:lI111|H3A0F04
-3A0F04:lI110|H3A0FC0
-3A0FC0:lI47|H3A108C
-3A108C:lI120|H3A1160
-3A1160:lI45|H3A122C
-3A122C:lI116|H3A12F8
-3A12F8:lI114|H3A13CC
-3A13CC:lI111|H3A14A8
-3A14A8:lI102|H3A157C
-3A157C:lI102|N
-3A08A4:lI116|H3A0928
-3A0928:lI114|N
-3A0834:lH3A08B4|H3A08C0
-3A08B4:t2:H3A0938,H3A0940
-3A0940:lI97|H3A09C4
-3A09C4:lI112|H3A0A50
-3A0A50:lI112|H3A0AEC
-3A0AEC:lI108|H3A0B88
-3A0B88:lI105|H3A0C34
-3A0C34:lI99|H3A0CF0
-3A0CF0:lI97|H3A0DA4
-3A0DA4:lI116|H3A0E58
-3A0E58:lI105|H3A0F0C
-3A0F0C:lI111|H3A0FC8
-3A0FC8:lI110|H3A1094
-3A1094:lI47|H3A1168
-3A1168:lI120|H3A1234
-3A1234:lI45|H3A1300
-3A1300:lI116|H3A13D4
-3A13D4:lI114|H3A14B0
-3A14B0:lI111|H3A1584
-3A1584:lI102|H3A1650
-3A1650:lI102|N
-3A0938:lI114|H3A09BC
-3A09BC:lI111|H3A0A48
-3A0A48:lI102|H3A0AE4
-3A0AE4:lI102|N
-3A08C0:lH3A0948|H3A0954
-3A0948:t2:H3A09CC,H3A09D4
-3A09D4:lI97|H3A0A60
-3A0A60:lI112|H3A0AFC
-3A0AFC:lI112|H3A0B98
-3A0B98:lI108|H3A0C44
-3A0C44:lI105|H3A0D00
-3A0D00:lI99|H3A0DB4
-3A0DB4:lI97|H3A0E60
-3A0E60:lI116|H3A0F14
-3A0F14:lI105|H3A0FD0
-3A0FD0:lI111|H3A109C
-3A109C:lI110|H3A1170
-3A1170:lI47|H3A123C
-3A123C:lI120|H3A1308
-3A1308:lI45|H3A13DC
-3A13DC:lI116|H3A14B8
-3A14B8:lI101|H3A158C
-3A158C:lI120|H3A1658
-3A1658:lI105|H3A1724
-3A1724:lI110|H3A17E8
-3A17E8:lI102|H3A18AC
-3A18AC:lI111|N
-3A09CC:lI116|H3A0A58
-3A0A58:lI101|H3A0AF4
-3A0AF4:lI120|H3A0B90
-3A0B90:lI105|H3A0C3C
-3A0C3C:lI110|H3A0CF8
-3A0CF8:lI102|H3A0DAC
-3A0DAC:lI111|N
-3A0954:lH3A09DC|H3A09E8
-3A09DC:t2:H3A0A68,H3A0A70
-3A0A70:lI97|H3A0B0C
-3A0B0C:lI112|H3A0BA8
-3A0BA8:lI112|H3A0C54
-3A0C54:lI108|H3A0D08
-3A0D08:lI105|H3A0DBC
-3A0DBC:lI99|H3A0E68
-3A0E68:lI97|H3A0F1C
-3A0F1C:lI116|H3A0FD8
-3A0FD8:lI105|H3A10A4
-3A10A4:lI111|H3A1178
-3A1178:lI110|H3A1244
-3A1244:lI47|H3A1310
-3A1310:lI120|H3A13E4
-3A13E4:lI45|H3A14C0
-3A14C0:lI116|H3A1594
-3A1594:lI101|H3A1660
-3A1660:lI120|H3A172C
-3A172C:lI105|H3A17F0
-3A17F0:lI110|H3A18B4
-3A18B4:lI102|H3A1970
-3A1970:lI111|N
-3A0A68:lI116|H3A0B04
-3A0B04:lI101|H3A0BA0
-3A0BA0:lI120|H3A0C4C
-3A0C4C:lI105|N
-3A09E8:lH3A0A78|H3A0A84
-3A0A78:t2:H3A0B14,H3A0B1C
-3A0B1C:lI97|H3A0BB8
-3A0BB8:lI112|H3A0C64
-3A0C64:lI112|H3A0D10
-3A0D10:lI108|H3A0DC4
-3A0DC4:lI105|H3A0E70
-3A0E70:lI99|H3A0F24
-3A0F24:lI97|H3A0FE0
-3A0FE0:lI116|H3A10AC
-3A10AC:lI105|H3A1180
-3A1180:lI111|H3A124C
-3A124C:lI110|H3A1318
-3A1318:lI47|H3A13EC
-3A13EC:lI120|H3A14C8
-3A14C8:lI45|H3A159C
-3A159C:lI116|H3A1668
-3A1668:lI101|H3A1734
-3A1734:lI120|N
-3A0B14:lI116|H3A0BB0
-3A0BB0:lI101|H3A0C5C
-3A0C5C:lI120|N
-3A0A84:lH3A0B24|H3A0B30
-3A0B24:t2:H3A0BC0,H3A0BC8
-3A0BC8:lI97|H3A0C74
-3A0C74:lI112|H3A0D20
-3A0D20:lI112|H3A0DCC
-3A0DCC:lI108|H3A0E78
-3A0E78:lI105|H3A0F2C
-3A0F2C:lI99|H3A0FE8
-3A0FE8:lI97|H3A10B4
-3A10B4:lI116|H3A1188
-3A1188:lI105|H3A1254
-3A1254:lI111|H3A1320
-3A1320:lI110|H3A13F4
-3A13F4:lI47|H3A14D0
-3A14D0:lI120|H3A15A4
-3A15A4:lI45|H3A1670
-3A1670:lI116|H3A173C
-3A173C:lI99|H3A17F8
-3A17F8:lI108|N
-3A0BC0:lI116|H3A0C6C
-3A0C6C:lI99|H3A0D18
-3A0D18:lI108|N
-3A0B30:lH3A0BD0|H3A0BDC
-3A0BD0:t2:H3A0C7C,H3A0C84
-3A0C84:lI97|H3A0D30
-3A0D30:lI112|H3A0DDC
-3A0DDC:lI112|H3A0E80
-3A0E80:lI108|H3A0F34
-3A0F34:lI105|H3A0FF0
-3A0FF0:lI99|H3A10BC
-3A10BC:lI97|H3A1190
-3A1190:lI116|H3A125C
-3A125C:lI105|H3A1328
-3A1328:lI111|H3A13FC
-3A13FC:lI110|H3A14D8
-3A14D8:lI47|H3A15AC
-3A15AC:lI120|H3A1678
-3A1678:lI45|H3A1744
-3A1744:lI116|H3A1800
-3A1800:lI97|H3A18BC
-3A18BC:lI114|N
-3A0C7C:lI116|H3A0D28
-3A0D28:lI97|H3A0DD4
-3A0DD4:lI114|N
-3A0BDC:lH3A0C8C|H3A0C98
-3A0C8C:t2:H3A0D38,H3A0D40
-3A0D40:lI97|H3A0DEC
-3A0DEC:lI112|H3A0E90
-3A0E90:lI112|H3A0F44
-3A0F44:lI108|H3A1000
-3A1000:lI105|H3A10CC
-3A10CC:lI99|H3A1198
-3A1198:lI97|H3A1264
-3A1264:lI116|H3A1330
-3A1330:lI105|H3A1404
-3A1404:lI111|H3A14E0
-3A14E0:lI110|H3A15B4
-3A15B4:lI47|H3A1680
-3A1680:lI120|H3A174C
-3A174C:lI45|H3A1808
-3A1808:lI115|H3A18C4
-3A18C4:lI118|H3A1978
-3A1978:lI52|H3A1A2C
-3A1A2C:lI99|H3A1AE0
-3A1AE0:lI114|H3A1BA4
-3A1BA4:lI99|N
-3A0D38:lI115|H3A0DE4
-3A0DE4:lI118|H3A0E88
-3A0E88:lI52|H3A0F3C
-3A0F3C:lI99|H3A0FF8
-3A0FF8:lI114|H3A10C4
-3A10C4:lI99|N
-3A0C98:lH3A0D48|H3A0D54
-3A0D48:t2:H3A0DF4,H3A0DFC
-3A0DFC:lI97|H3A0EA0
-3A0EA0:lI112|H3A0F54
-3A0F54:lI112|H3A1010
-3A1010:lI108|H3A10DC
-3A10DC:lI105|H3A11A8
-3A11A8:lI99|H3A1274
-3A1274:lI97|H3A1338
-3A1338:lI116|H3A140C
-3A140C:lI105|H3A14E8
-3A14E8:lI111|H3A15BC
-3A15BC:lI110|H3A1688
-3A1688:lI47|H3A1754
-3A1754:lI120|H3A1810
-3A1810:lI45|H3A18CC
-3A18CC:lI115|H3A1980
-3A1980:lI118|H3A1A34
-3A1A34:lI52|H3A1AE8
-3A1AE8:lI99|H3A1BAC
-3A1BAC:lI112|H3A1C78
-3A1C78:lI105|H3A1D3C
-3A1D3C:lI111|N
-3A0DF4:lI115|H3A0E98
-3A0E98:lI118|H3A0F4C
-3A0F4C:lI52|H3A1008
-3A1008:lI99|H3A10D4
-3A10D4:lI112|H3A11A0
-3A11A0:lI105|H3A126C
-3A126C:lI111|N
-3A0D54:lH3A0E04|H3A0E10
-3A0E04:t2:H3A0EA8,H3A0EB0
-3A0EB0:lI97|H3A0F64
-3A0F64:lI112|H3A1020
-3A1020:lI112|H3A10E4
-3A10E4:lI108|H3A11B0
-3A11B0:lI105|H3A127C
-3A127C:lI99|H3A1340
-3A1340:lI97|H3A1414
-3A1414:lI116|H3A14F0
-3A14F0:lI105|H3A15C4
-3A15C4:lI111|H3A1690
-3A1690:lI110|H3A175C
-3A175C:lI47|H3A1818
-3A1818:lI120|H3A18D4
-3A18D4:lI45|H3A1988
-3A1988:lI115|H3A1A3C
-3A1A3C:lI116|H3A1AF0
-3A1AF0:lI117|H3A1BB4
-3A1BB4:lI102|H3A1C80
-3A1C80:lI102|H3A1D44
-3A1D44:lI105|H3A1E00
-3A1E00:lI116|N
-3A0EA8:lI115|H3A0F5C
-3A0F5C:lI105|H3A1018
-3A1018:lI116|N
-3A0E10:lH3A0EB8|H3A0EC4
-3A0EB8:t2:H3A0F6C,H3A0F74
-3A0F74:lI97|H3A1030
-3A1030:lI112|H3A10F4
-3A10F4:lI112|H3A11C0
-3A11C0:lI108|H3A1284
-3A1284:lI105|H3A1348
-3A1348:lI99|H3A141C
-3A141C:lI97|H3A14F8
-3A14F8:lI116|H3A15CC
-3A15CC:lI105|H3A1698
-3A1698:lI111|H3A1764
-3A1764:lI110|H3A1820
-3A1820:lI47|H3A18DC
-3A18DC:lI120|H3A1990
-3A1990:lI45|H3A1A44
-3A1A44:lI115|H3A1AF8
-3A1AF8:lI104|H3A1BBC
-3A1BBC:lI97|H3A1C88
-3A1C88:lI114|N
-3A0F6C:lI115|H3A1028
-3A1028:lI104|H3A10EC
-3A10EC:lI97|H3A11B8
-3A11B8:lI114|N
-3A0EC4:lH3A0F7C|H3A0F88
-3A0F7C:t2:H3A1038,H3A1040
-3A1040:lI97|H3A1104
-3A1104:lI112|H3A11C8
-3A11C8:lI112|H3A128C
-3A128C:lI108|H3A1350
-3A1350:lI105|H3A1424
-3A1424:lI99|H3A1500
-3A1500:lI97|H3A15D4
-3A15D4:lI116|H3A16A0
-3A16A0:lI105|H3A176C
-3A176C:lI111|H3A1828
-3A1828:lI110|H3A18E4
-3A18E4:lI47|H3A1998
-3A1998:lI120|H3A1A4C
-3A1A4C:lI45|H3A1B00
-3A1B00:lI115|H3A1BC4
-3A1BC4:lI104|N
-3A1038:lI115|H3A10FC
-3A10FC:lI104|N
-3A0F88:lH3A1048|H3A1054
-3A1048:t2:H3A110C,H3A1114
-3A1114:lI97|H3A11D8
-3A11D8:lI112|H3A1294
-3A1294:lI112|H3A1358
-3A1358:lI108|H3A142C
-3A142C:lI105|H3A1508
-3A1508:lI99|H3A15DC
-3A15DC:lI97|H3A16A8
-3A16A8:lI116|H3A1774
-3A1774:lI105|H3A1830
-3A1830:lI111|H3A18EC
-3A18EC:lI110|H3A19A0
-3A19A0:lI47|H3A1A54
-3A1A54:lI120|H3A1B08
-3A1B08:lI45|H3A1BCC
-3A1BCC:lI110|H3A1C90
-3A1C90:lI101|H3A1D4C
-3A1D4C:lI116|H3A1E08
-3A1E08:lI99|H3A1EC4
-3A1EC4:lI100|H3A1F88
-3A1F88:lI102|N
-3A110C:lI110|H3A11D0
-3A11D0:lI99|N
-3A1054:lH3A111C|H3A1128
-3A111C:t2:H3A11E0,H3A11E8
-3A11E8:lI97|H3A12A4
-3A12A4:lI112|H3A1368
-3A1368:lI112|H3A1434
-3A1434:lI108|H3A1510
-3A1510:lI105|H3A15E4
-3A15E4:lI99|H3A16B0
-3A16B0:lI97|H3A177C
-3A177C:lI116|H3A1838
-3A1838:lI105|H3A18F4
-3A18F4:lI111|H3A19A8
-3A19A8:lI110|H3A1A5C
-3A1A5C:lI47|H3A1B10
-3A1B10:lI120|H3A1BD4
-3A1BD4:lI45|H3A1C98
-3A1C98:lI110|H3A1D54
-3A1D54:lI101|H3A1E10
-3A1E10:lI116|H3A1ECC
-3A1ECC:lI99|H3A1F90
-3A1F90:lI100|H3A2044
-3A2044:lI102|N
-3A11E0:lI99|H3A129C
-3A129C:lI100|H3A1360
-3A1360:lI102|N
-3A1128:lH3A11F0|H3A11FC
-3A11F0:t2:H3A12AC,H3A12B4
-3A12B4:lI97|H3A1378
-3A1378:lI112|H3A1444
-3A1444:lI112|H3A1518
-3A1518:lI108|H3A15EC
-3A15EC:lI105|H3A16B8
-3A16B8:lI99|H3A1784
-3A1784:lI97|H3A1840
-3A1840:lI116|H3A18FC
-3A18FC:lI105|H3A19B0
-3A19B0:lI111|H3A1A64
-3A1A64:lI110|H3A1B18
-3A1B18:lI47|H3A1BDC
-3A1BDC:lI120|H3A1CA0
-3A1CA0:lI45|H3A1D5C
-3A1D5C:lI109|H3A1E18
-3A1E18:lI105|H3A1ED4
-3A1ED4:lI102|N
-3A12AC:lI109|H3A1370
-3A1370:lI105|H3A143C
-3A143C:lI102|N
-3A11FC:lH3A12BC|H3A12C8
-3A12BC:t2:H3A1380,H3A1388
-3A1388:lI97|H3A1454
-3A1454:lI112|H3A1528
-3A1528:lI112|H3A15FC
-3A15FC:lI108|H3A16C8
-3A16C8:lI105|H3A178C
-3A178C:lI99|H3A1848
-3A1848:lI97|H3A1904
-3A1904:lI116|H3A19B8
-3A19B8:lI105|H3A1A6C
-3A1A6C:lI111|H3A1B20
-3A1B20:lI110|H3A1BE4
-3A1BE4:lI47|H3A1CA8
-3A1CA8:lI120|H3A1D64
-3A1D64:lI45|H3A1E20
-3A1E20:lI108|H3A1EDC
-3A1EDC:lI97|H3A1F98
-3A1F98:lI116|H3A204C
-3A204C:lI101|H3A2108
-3A2108:lI120|N
-3A1380:lI108|H3A144C
-3A144C:lI97|H3A1520
-3A1520:lI116|H3A15F4
-3A15F4:lI101|H3A16C0
-3A16C0:lI120|N
-3A12C8:lH3A1390|H3A139C
-3A1390:t2:H3A145C,H3A1464
-3A1464:lI97|H3A1538
-3A1538:lI112|H3A160C
-3A160C:lI112|H3A16D0
-3A16D0:lI108|H3A1794
-3A1794:lI105|H3A1850
-3A1850:lI99|H3A190C
-3A190C:lI97|H3A19C0
-3A19C0:lI116|H3A1A74
-3A1A74:lI105|H3A1B28
-3A1B28:lI111|H3A1BEC
-3A1BEC:lI110|H3A1CB0
-3A1CB0:lI47|H3A1D6C
-3A1D6C:lI120|H3A1E28
-3A1E28:lI45|H3A1EE4
-3A1EE4:lI107|H3A1FA0
-3A1FA0:lI111|H3A2054
-3A2054:lI97|H3A2110
-3A2110:lI110|N
-3A145C:lI115|H3A1530
-3A1530:lI107|H3A1604
-3A1604:lI112|N
-3A139C:lH3A146C|H3A1478
-3A146C:t2:H3A1540,H3A1548
-3A1548:lI97|H3A161C
-3A161C:lI112|H3A16E0
-3A16E0:lI112|H3A179C
-3A179C:lI108|H3A1858
-3A1858:lI105|H3A1914
-3A1914:lI99|H3A19C8
-3A19C8:lI97|H3A1A7C
-3A1A7C:lI116|H3A1B30
-3A1B30:lI105|H3A1BF4
-3A1BF4:lI111|H3A1CB8
-3A1CB8:lI110|H3A1D74
-3A1D74:lI47|H3A1E30
-3A1E30:lI120|H3A1EEC
-3A1EEC:lI45|H3A1FA8
-3A1FA8:lI107|H3A205C
-3A205C:lI111|H3A2118
-3A2118:lI97|H3A21CC
-3A21CC:lI110|N
-3A1540:lI115|H3A1614
-3A1614:lI107|H3A16D8
-3A16D8:lI100|N
-3A1478:lH3A1550|H3A155C
-3A1550:t2:H3A1624,H3A162C
-3A162C:lI97|H3A16F0
-3A16F0:lI112|H3A17AC
-3A17AC:lI112|H3A1860
-3A1860:lI108|H3A191C
-3A191C:lI105|H3A19D0
-3A19D0:lI99|H3A1A84
-3A1A84:lI97|H3A1B38
-3A1B38:lI116|H3A1BFC
-3A1BFC:lI105|H3A1CC0
-3A1CC0:lI111|H3A1D7C
-3A1D7C:lI110|H3A1E38
-3A1E38:lI47|H3A1EF4
-3A1EF4:lI120|H3A1FB0
-3A1FB0:lI45|H3A2064
-3A2064:lI107|H3A2120
-3A2120:lI111|H3A21D4
-3A21D4:lI97|H3A2288
-3A2288:lI110|N
-3A1624:lI115|H3A16E8
-3A16E8:lI107|H3A17A4
-3A17A4:lI116|N
-3A155C:lH3A1634|H3A1640
-3A1634:t2:H3A16F8,H3A1700
-3A1700:lI97|H3A17BC
-3A17BC:lI112|H3A1870
-3A1870:lI112|H3A1924
-3A1924:lI108|H3A19D8
-3A19D8:lI105|H3A1A8C
-3A1A8C:lI99|H3A1B40
-3A1B40:lI97|H3A1C04
-3A1C04:lI116|H3A1CC8
-3A1CC8:lI105|H3A1D84
-3A1D84:lI111|H3A1E40
-3A1E40:lI110|H3A1EFC
-3A1EFC:lI47|H3A1FB8
-3A1FB8:lI120|H3A206C
-3A206C:lI45|H3A2128
-3A2128:lI107|H3A21DC
-3A21DC:lI111|H3A2290
-3A2290:lI97|H3A234C
-3A234C:lI110|N
-3A16F8:lI115|H3A17B4
-3A17B4:lI107|H3A1868
-3A1868:lI109|N
-3A1640:lH3A1708|H3A1714
-3A1708:t2:H3A17C4,H3A17CC
-3A17CC:lI97|H3A1880
-3A1880:lI112|H3A1934
-3A1934:lI112|H3A19E0
-3A19E0:lI108|H3A1A94
-3A1A94:lI105|H3A1B48
-3A1B48:lI99|H3A1C0C
-3A1C0C:lI97|H3A1CD0
-3A1CD0:lI116|H3A1D8C
-3A1D8C:lI105|H3A1E48
-3A1E48:lI111|H3A1F04
-3A1F04:lI110|H3A1FC0
-3A1FC0:lI47|H3A2074
-3A2074:lI120|H3A2130
-3A2130:lI45|H3A21E4
-3A21E4:lI104|H3A2298
-3A2298:lI116|H3A2354
-3A2354:lI116|H3A2410
-3A2410:lI112|H3A24C4
-3A24C4:lI100|H3A2580
-3A2580:lI45|H3A263C
-3A263C:lI99|H3A2700
-3A2700:lI103|H3A27BC
-3A27BC:lI105|N
-3A17C4:lI99|H3A1878
-3A1878:lI103|H3A192C
-3A192C:lI105|N
-3A1714:lH3A17D4|H3A17E0
-3A17D4:t2:H3A1888,H3A1890
-3A1890:lI97|H3A1944
-3A1944:lI112|H3A19F0
-3A19F0:lI112|H3A1A9C
-3A1A9C:lI108|H3A1B50
-3A1B50:lI105|H3A1C14
-3A1C14:lI99|H3A1CD8
-3A1CD8:lI97|H3A1D94
-3A1D94:lI116|H3A1E50
-3A1E50:lI105|H3A1F0C
-3A1F0C:lI111|H3A1FC8
-3A1FC8:lI110|H3A207C
-3A207C:lI47|H3A2138
-3A2138:lI120|H3A21EC
-3A21EC:lI45|H3A22A0
-3A22A0:lI104|H3A235C
-3A235C:lI100|H3A2418
-3A2418:lI102|N
-3A1888:lI104|H3A193C
-3A193C:lI100|H3A19E8
-3A19E8:lI102|N
-3A17E0:lH3A1898|H3A18A4
-3A1898:t2:H3A194C,H3A1954
-3A1954:lI97|H3A1A00
-3A1A00:lI112|H3A1AA4
-3A1AA4:lI112|H3A1B58
-3A1B58:lI108|H3A1C1C
-3A1C1C:lI105|H3A1CE0
-3A1CE0:lI99|H3A1D9C
-3A1D9C:lI97|H3A1E58
-3A1E58:lI116|H3A1F14
-3A1F14:lI105|H3A1FD0
-3A1FD0:lI111|H3A2084
-3A2084:lI110|H3A2140
-3A2140:lI47|H3A21F4
-3A21F4:lI120|H3A22A8
-3A22A8:lI45|H3A2364
-3A2364:lI103|H3A2420
-3A2420:lI122|H3A24CC
-3A24CC:lI105|H3A2588
-3A2588:lI112|N
-3A194C:lI103|H3A19F8
-3A19F8:lI122|N
-3A18A4:lH3A195C|H3A1968
-3A195C:t2:H3A1A08,H3A1A10
-3A1A10:lI97|H3A1AB4
-3A1AB4:lI112|H3A1B68
-3A1B68:lI112|H3A1C2C
-3A1C2C:lI108|H3A1CE8
-3A1CE8:lI105|H3A1DA4
-3A1DA4:lI99|H3A1E60
-3A1E60:lI97|H3A1F1C
-3A1F1C:lI116|H3A1FD8
-3A1FD8:lI105|H3A208C
-3A208C:lI111|H3A2148
-3A2148:lI110|H3A21FC
-3A21FC:lI47|H3A22B0
-3A22B0:lI120|H3A236C
-3A236C:lI45|H3A2428
-3A2428:lI103|H3A24D4
-3A24D4:lI116|H3A2590
-3A2590:lI97|H3A2644
-3A2644:lI114|N
-3A1A08:lI103|H3A1AAC
-3A1AAC:lI116|H3A1B60
-3A1B60:lI97|H3A1C24
-3A1C24:lI114|N
-3A1968:lH3A1A18|H3A1A24
-3A1A18:t2:H3A1ABC,H3A1AC4
-3A1AC4:lI97|H3A1B78
-3A1B78:lI112|H3A1C3C
-3A1C3C:lI112|H3A1CF0
-3A1CF0:lI108|H3A1DAC
-3A1DAC:lI105|H3A1E68
-3A1E68:lI99|H3A1F24
-3A1F24:lI97|H3A1FE0
-3A1FE0:lI116|H3A2094
-3A2094:lI105|H3A2150
-3A2150:lI111|H3A2204
-3A2204:lI110|H3A22B8
-3A22B8:lI47|H3A2374
-3A2374:lI120|H3A2430
-3A2430:lI45|H3A24DC
-3A24DC:lI100|H3A2598
-3A2598:lI118|H3A264C
-3A264C:lI105|N
-3A1ABC:lI100|H3A1B70
-3A1B70:lI118|H3A1C34
-3A1C34:lI105|N
-3A1A24:lH3A1ACC|H3A1AD8
-3A1ACC:t2:H3A1B80,H3A1B88
-3A1B88:lI97|H3A1C4C
-3A1C4C:lI112|H3A1D00
-3A1D00:lI112|H3A1DB4
-3A1DB4:lI108|H3A1E70
-3A1E70:lI105|H3A1F2C
-3A1F2C:lI99|H3A1FE8
-3A1FE8:lI97|H3A209C
-3A209C:lI116|H3A2158
-3A2158:lI105|H3A220C
-3A220C:lI111|H3A22C0
-3A22C0:lI110|H3A237C
-3A237C:lI47|H3A2438
-3A2438:lI120|H3A24E4
-3A24E4:lI45|H3A25A0
-3A25A0:lI100|H3A2654
-3A2654:lI105|H3A2708
-3A2708:lI114|H3A27C4
-3A27C4:lI101|H3A2880
-3A2880:lI99|H3A2944
-3A2944:lI116|H3A2A10
-3A2A10:lI111|H3A2ADC
-3A2ADC:lI114|N
-3A1B80:lI100|H3A1C44
-3A1C44:lI99|H3A1CF8
-3A1CF8:lI114|N
-3A1AD8:lH3A1B90|H3A1B9C
-3A1B90:t2:H3A1C54,H3A1C5C
-3A1C5C:lI97|H3A1D10
-3A1D10:lI112|H3A1DC4
-3A1DC4:lI112|H3A1E78
-3A1E78:lI108|H3A1F34
-3A1F34:lI105|H3A1FF0
-3A1FF0:lI99|H3A20A4
-3A20A4:lI97|H3A2160
-3A2160:lI116|H3A2214
-3A2214:lI105|H3A22C8
-3A22C8:lI111|H3A2384
-3A2384:lI110|H3A2440
-3A2440:lI47|H3A24EC
-3A24EC:lI120|H3A25A8
-3A25A8:lI45|H3A265C
-3A265C:lI100|H3A2710
-3A2710:lI105|H3A27CC
-3A27CC:lI114|H3A2888
-3A2888:lI101|H3A294C
-3A294C:lI99|H3A2A18
-3A2A18:lI116|H3A2AE4
-3A2AE4:lI111|H3A2BB0
-3A2BB0:lI114|N
-3A1C54:lI100|H3A1D08
-3A1D08:lI105|H3A1DBC
-3A1DBC:lI114|N
-3A1B9C:lH3A1C64|H3A1C70
-3A1C64:t2:H3A1D18,H3A1D20
-3A1D20:lI97|H3A1DD4
-3A1DD4:lI112|H3A1E88
-3A1E88:lI112|H3A1F3C
-3A1F3C:lI108|H3A1FF8
-3A1FF8:lI105|H3A20AC
-3A20AC:lI99|H3A2168
-3A2168:lI97|H3A221C
-3A221C:lI116|H3A22D0
-3A22D0:lI105|H3A238C
-3A238C:lI111|H3A2448
-3A2448:lI110|H3A24F4
-3A24F4:lI47|H3A25B0
-3A25B0:lI120|H3A2664
-3A2664:lI45|H3A2718
-3A2718:lI100|H3A27D4
-3A27D4:lI105|H3A2890
-3A2890:lI114|H3A2954
-3A2954:lI101|H3A2A20
-3A2A20:lI99|H3A2AEC
-3A2AEC:lI116|H3A2BB8
-3A2BB8:lI111|H3A2C74
-3A2C74:lI114|N
-3A1D18:lI100|H3A1DCC
-3A1DCC:lI120|H3A1E80
-3A1E80:lI114|N
-3A1C70:lH3A1D28|H3A1D34
-3A1D28:t2:H3A1DDC,H3A1DE4
-3A1DE4:lI97|H3A1E98
-3A1E98:lI112|H3A1F4C
-3A1F4C:lI112|H3A2000
-3A2000:lI108|H3A20B4
-3A20B4:lI105|H3A2170
-3A2170:lI99|H3A2224
-3A2224:lI97|H3A22D8
-3A22D8:lI116|H3A2394
-3A2394:lI105|H3A2450
-3A2450:lI111|H3A24FC
-3A24FC:lI110|H3A25B8
-3A25B8:lI47|H3A266C
-3A266C:lI120|H3A2720
-3A2720:lI45|H3A27DC
-3A27DC:lI99|H3A2898
-3A2898:lI115|H3A295C
-3A295C:lI104|N
-3A1DDC:lI99|H3A1E90
-3A1E90:lI115|H3A1F44
-3A1F44:lI104|N
-3A1D34:lH3A1DEC|H3A1DF8
-3A1DEC:t2:H3A1EA0,H3A1EA8
-3A1EA8:lI97|H3A1F5C
-3A1F5C:lI112|H3A2010
-3A2010:lI112|H3A20C4
-3A20C4:lI108|H3A2178
-3A2178:lI105|H3A222C
-3A222C:lI99|H3A22E0
-3A22E0:lI97|H3A239C
-3A239C:lI116|H3A2458
-3A2458:lI105|H3A2504
-3A2504:lI111|H3A25C0
-3A25C0:lI110|H3A2674
-3A2674:lI47|H3A2728
-3A2728:lI120|H3A27E4
-3A27E4:lI45|H3A28A0
-3A28A0:lI99|H3A2964
-3A2964:lI112|H3A2A28
-3A2A28:lI105|H3A2AF4
-3A2AF4:lI111|N
-3A1EA0:lI99|H3A1F54
-3A1F54:lI112|H3A2008
-3A2008:lI105|H3A20BC
-3A20BC:lI111|N
-3A1DF8:lH3A1EB0|H3A1EBC
-3A1EB0:t2:H3A1F64,H3A1F6C
-3A1F6C:lI97|H3A2018
-3A2018:lI112|H3A20CC
-3A20CC:lI112|H3A2180
-3A2180:lI108|H3A2234
-3A2234:lI105|H3A22E8
-3A22E8:lI99|H3A23A4
-3A23A4:lI97|H3A2460
-3A2460:lI116|H3A250C
-3A250C:lI105|H3A25C8
-3A25C8:lI111|H3A267C
-3A267C:lI110|H3A2730
-3A2730:lI47|H3A27EC
-3A27EC:lI120|H3A28A8
-3A28A8:lI45|H3A296C
-3A296C:lI99|H3A2A30
-3A2A30:lI111|H3A2AFC
-3A2AFC:lI109|H3A2BC0
-3A2BC0:lI112|H3A2C7C
-3A2C7C:lI114|H3A2D2C
-3A2D2C:lI101|H3A2DD4
-3A2DD4:lI115|H3A2E6C
-3A2E6C:lI115|N
-3A1F64:lI90|N
-3A1EBC:lH3A1F74|H3A1F80
-3A1F74:t2:H3A2020,H3A2028
-3A2028:lI97|H3A20DC
-3A20DC:lI112|H3A2190
-3A2190:lI112|H3A223C
-3A223C:lI108|H3A22F0
-3A22F0:lI105|H3A23AC
-3A23AC:lI99|H3A2468
-3A2468:lI97|H3A2514
-3A2514:lI116|H3A25D0
-3A25D0:lI105|H3A2684
-3A2684:lI111|H3A2738
-3A2738:lI110|H3A27F4
-3A27F4:lI47|H3A28B0
-3A28B0:lI120|H3A2974
-3A2974:lI45|H3A2A38
-3A2A38:lI99|H3A2B04
-3A2B04:lI100|H3A2BC8
-3A2BC8:lI108|H3A2C84
-3A2C84:lI105|H3A2D34
-3A2D34:lI110|H3A2DDC
-3A2DDC:lI107|N
-3A2020:lI118|H3A20D4
-3A20D4:lI99|H3A2188
-3A2188:lI100|N
-3A1F80:lH3A2030|H3A203C
-3A2030:t2:H3A20E4,H3A20EC
-3A20EC:lI97|H3A21A0
-3A21A0:lI112|H3A224C
-3A224C:lI112|H3A2300
-3A2300:lI108|H3A23BC
-3A23BC:lI105|H3A2470
-3A2470:lI99|H3A251C
-3A251C:lI97|H3A25D8
-3A25D8:lI116|H3A268C
-3A268C:lI105|H3A2740
-3A2740:lI111|H3A27FC
-3A27FC:lI110|H3A28B8
-3A28B8:lI47|H3A297C
-3A297C:lI120|H3A2A40
-3A2A40:lI45|H3A2B0C
-3A2B0C:lI98|H3A2BD0
-3A2BD0:lI99|H3A2C8C
-3A2C8C:lI112|H3A2D3C
-3A2D3C:lI105|H3A2DE4
-3A2DE4:lI111|N
-3A20E4:lI98|H3A2198
-3A2198:lI99|H3A2244
-3A2244:lI112|H3A22F8
-3A22F8:lI105|H3A23B4
-3A23B4:lI111|N
-3A203C:lH3A20F4|H3A2100
-3A20F4:t2:H3A21A8,H3A21B0
-3A21B0:lI97|H3A225C
-3A225C:lI112|H3A2310
-3A2310:lI112|H3A23C4
-3A23C4:lI108|H3A2478
-3A2478:lI105|H3A2524
-3A2524:lI99|H3A25E0
-3A25E0:lI97|H3A2694
-3A2694:lI116|H3A2748
-3A2748:lI105|H3A2804
-3A2804:lI111|H3A28C0
-3A28C0:lI110|H3A2984
-3A2984:lI47|H3A2A48
-3A2A48:lI114|H3A2B14
-3A2B14:lI116|H3A2BD8
-3A2BD8:lI102|N
-3A21A8:lI114|H3A2254
-3A2254:lI116|H3A2308
-3A2308:lI102|N
-3A2100:lH3A21B8|H3A21C4
-3A21B8:t2:H3A2264,H3A226C
-3A226C:lI97|H3A2320
-3A2320:lI112|H3A23D4
-3A23D4:lI112|H3A2480
-3A2480:lI108|H3A252C
-3A252C:lI105|H3A25E8
-3A25E8:lI99|H3A269C
-3A269C:lI97|H3A2750
-3A2750:lI116|H3A280C
-3A280C:lI105|H3A28C8
-3A28C8:lI111|H3A298C
-3A298C:lI110|H3A2A50
-3A2A50:lI47|H3A2B1C
-3A2B1C:lI112|H3A2BE0
-3A2BE0:lI111|H3A2C94
-3A2C94:lI119|H3A2D44
-3A2D44:lI101|H3A2DEC
-3A2DEC:lI114|H3A2E74
-3A2E74:lI112|H3A2EEC
-3A2EEC:lI111|H3A2F64
-3A2F64:lI105|H3A2FD4
-3A2FD4:lI110|H3A303C
-3A303C:lI116|N
-3A2264:lI112|H3A2318
-3A2318:lI112|H3A23CC
-3A23CC:lI116|N
-3A21C4:lH3A2274|H3A2280
-3A2274:t2:H3A2328,H3A2330
-3A2330:lI97|H3A23E4
-3A23E4:lI112|H3A2488
-3A2488:lI112|H3A2534
-3A2534:lI108|H3A25F0
-3A25F0:lI105|H3A26A4
-3A26A4:lI99|H3A2758
-3A2758:lI97|H3A2814
-3A2814:lI116|H3A28D0
-3A28D0:lI105|H3A2994
-3A2994:lI111|H3A2A58
-3A2A58:lI110|H3A2B24
-3A2B24:lI47|H3A2BE8
-3A2BE8:lI112|H3A2C9C
-3A2C9C:lI111|H3A2D4C
-3A2D4C:lI115|H3A2DF4
-3A2DF4:lI116|H3A2E7C
-3A2E7C:lI115|H3A2EF4
-3A2EF4:lI99|H3A2F6C
-3A2F6C:lI114|H3A2FDC
-3A2FDC:lI105|H3A3044
-3A3044:lI112|H3A30A4
-3A30A4:lI116|N
-3A2328:lI97|H3A23DC
-3A23DC:lI105|N
-3A2280:lH3A2338|H3A2344
-3A2338:t2:H3A23EC,H3A23F4
-3A23F4:lI97|H3A2498
-3A2498:lI112|H3A2544
-3A2544:lI112|H3A25F8
-3A25F8:lI108|H3A26AC
-3A26AC:lI105|H3A2760
-3A2760:lI99|H3A281C
-3A281C:lI97|H3A28D8
-3A28D8:lI116|H3A299C
-3A299C:lI105|H3A2A60
-3A2A60:lI111|H3A2B2C
-3A2B2C:lI110|H3A2BF0
-3A2BF0:lI47|H3A2CA4
-3A2CA4:lI112|H3A2D54
-3A2D54:lI111|H3A2DFC
-3A2DFC:lI115|H3A2E84
-3A2E84:lI116|H3A2EFC
-3A2EFC:lI115|H3A2F74
-3A2F74:lI99|H3A2FE4
-3A2FE4:lI114|H3A304C
-3A304C:lI105|H3A30AC
-3A30AC:lI112|H3A3104
-3A3104:lI116|N
-3A23EC:lI101|H3A2490
-3A2490:lI112|H3A253C
-3A253C:lI115|N
-3A2344:lH3A23FC|H3A2408
-3A23FC:t2:H3A24A0,H3A24A8
-3A24A8:lI97|H3A2554
-3A2554:lI112|H3A2600
-3A2600:lI112|H3A26B4
-3A26B4:lI108|H3A2768
-3A2768:lI105|H3A2824
-3A2824:lI99|H3A28E0
-3A28E0:lI97|H3A29A4
-3A29A4:lI116|H3A2A68
-3A2A68:lI105|H3A2B34
-3A2B34:lI111|H3A2BF8
-3A2BF8:lI110|H3A2CAC
-3A2CAC:lI47|H3A2D5C
-3A2D5C:lI112|H3A2E04
-3A2E04:lI111|H3A2E8C
-3A2E8C:lI115|H3A2F04
-3A2F04:lI116|H3A2F7C
-3A2F7C:lI115|H3A2FEC
-3A2FEC:lI99|H3A3054
-3A3054:lI114|H3A30B4
-3A30B4:lI105|H3A310C
-3A310C:lI112|H3A315C
-3A315C:lI116|N
-3A24A0:lI112|H3A254C
-3A254C:lI115|N
-3A2408:lH3A24B0|H3A24BC
-3A24B0:t2:H3A255C,H3A2564
-3A2564:lI97|H3A2610
-3A2610:lI112|H3A26C4
-3A26C4:lI112|H3A2770
-3A2770:lI108|H3A282C
-3A282C:lI105|H3A28E8
-3A28E8:lI99|H3A29AC
-3A29AC:lI97|H3A2A70
-3A2A70:lI116|H3A2B3C
-3A2B3C:lI105|H3A2C00
-3A2C00:lI111|H3A2CB4
-3A2CB4:lI110|H3A2D64
-3A2D64:lI47|H3A2E0C
-3A2E0C:lI112|H3A2E94
-3A2E94:lI100|H3A2F0C
-3A2F0C:lI102|N
-3A255C:lI112|H3A2608
-3A2608:lI100|H3A26BC
-3A26BC:lI102|N
-3A24BC:lH3A256C|H3A2578
-3A256C:t2:H3A2618,H3A2620
-3A2620:lI97|H3A26D4
-3A26D4:lI112|H3A2780
-3A2780:lI112|H3A2834
-3A2834:lI108|H3A28F0
-3A28F0:lI105|H3A29B4
-3A29B4:lI99|H3A2A78
-3A2A78:lI97|H3A2B44
-3A2B44:lI116|H3A2C08
-3A2C08:lI105|H3A2CBC
-3A2CBC:lI111|H3A2D6C
-3A2D6C:lI110|H3A2E14
-3A2E14:lI47|H3A2E9C
-3A2E9C:lI111|H3A2F14
-3A2F14:lI100|H3A2F84
-3A2F84:lI97|N
-3A2618:lI111|H3A26CC
-3A26CC:lI100|H3A2778
-3A2778:lI97|N
-3A2578:lH3A2628|H3A2634
-3A2628:t2:H3A26DC,H3A26E4
-3A26E4:lI97|H3A2790
-3A2790:lI112|H3A2844
-3A2844:lI112|H3A28F8
-3A28F8:lI108|H3A29BC
-3A29BC:lI105|H3A2A80
-3A2A80:lI99|H3A2B4C
-3A2B4C:lI97|H3A2C10
-3A2C10:lI116|H3A2CC4
-3A2CC4:lI105|H3A2D74
-3A2D74:lI111|H3A2E1C
-3A2E1C:lI110|H3A2EA4
-3A2EA4:lI47|H3A2F1C
-3A2F1C:lI111|H3A2F8C
-3A2F8C:lI99|H3A2FF4
-3A2FF4:lI116|H3A305C
-3A305C:lI101|H3A30BC
-3A30BC:lI116|H3A3114
-3A3114:lI45|H3A3164
-3A3164:lI115|H3A31AC
-3A31AC:lI116|H3A31F4
-3A31F4:lI114|H3A323C
-3A323C:lI101|H3A3284
-3A3284:lI97|H3A32CC
-3A32CC:lI109|N
-3A26DC:lI98|H3A2788
-3A2788:lI105|H3A283C
-3A283C:lI110|N
-3A2634:lH3A26EC|H3A26F8
-3A26EC:t2:H3A2798,H3A27A0
-3A27A0:lI97|H3A2854
-3A2854:lI112|H3A2908
-3A2908:lI112|H3A29C4
-3A29C4:lI108|H3A2A88
-3A2A88:lI105|H3A2B54
-3A2B54:lI99|H3A2C18
-3A2C18:lI97|H3A2CCC
-3A2CCC:lI116|H3A2D7C
-3A2D7C:lI105|H3A2E24
-3A2E24:lI111|H3A2EAC
-3A2EAC:lI110|H3A2F24
-3A2F24:lI47|H3A2F94
-3A2F94:lI111|H3A2FFC
-3A2FFC:lI99|H3A3064
-3A3064:lI116|H3A30C4
-3A30C4:lI101|H3A311C
-3A311C:lI116|H3A316C
-3A316C:lI45|H3A31B4
-3A31B4:lI115|H3A31FC
-3A31FC:lI116|H3A3244
-3A3244:lI114|H3A328C
-3A328C:lI101|H3A32D4
-3A32D4:lI97|H3A3314
-3A3314:lI109|N
-3A2798:lI100|H3A284C
-3A284C:lI109|H3A2900
-3A2900:lI115|N
-3A26F8:lH3A27A8|H3A27B4
-3A27A8:t2:H3A285C,H3A2864
-3A2864:lI97|H3A2918
-3A2918:lI112|H3A29D4
-3A29D4:lI112|H3A2A90
-3A2A90:lI108|H3A2B5C
-3A2B5C:lI105|H3A2C20
-3A2C20:lI99|H3A2CD4
-3A2CD4:lI97|H3A2D84
-3A2D84:lI116|H3A2E2C
-3A2E2C:lI105|H3A2EB4
-3A2EB4:lI111|H3A2F2C
-3A2F2C:lI110|H3A2F9C
-3A2F9C:lI47|H3A3004
-3A3004:lI111|H3A306C
-3A306C:lI99|H3A30CC
-3A30CC:lI116|H3A3124
-3A3124:lI101|H3A3174
-3A3174:lI116|H3A31BC
-3A31BC:lI45|H3A3204
-3A3204:lI115|H3A324C
-3A324C:lI116|H3A3294
-3A3294:lI114|H3A32DC
-3A32DC:lI101|H3A331C
-3A331C:lI97|H3A334C
-3A334C:lI109|N
-3A285C:lI108|H3A2910
-3A2910:lI104|H3A29CC
-3A29CC:lI97|N
-3A27B4:lH3A286C|H3A2878
-3A286C:t2:H3A2920,H3A2928
-3A2928:lI97|H3A29E4
-3A29E4:lI112|H3A2AA0
-3A2AA0:lI112|H3A2B64
-3A2B64:lI108|H3A2C28
-3A2C28:lI105|H3A2CDC
-3A2CDC:lI99|H3A2D8C
-3A2D8C:lI97|H3A2E34
-3A2E34:lI116|H3A2EBC
-3A2EBC:lI105|H3A2F34
-3A2F34:lI111|H3A2FA4
-3A2FA4:lI110|H3A300C
-3A300C:lI47|H3A3074
-3A3074:lI111|H3A30D4
-3A30D4:lI99|H3A312C
-3A312C:lI116|H3A317C
-3A317C:lI101|H3A31C4
-3A31C4:lI116|H3A320C
-3A320C:lI45|H3A3254
-3A3254:lI115|H3A329C
-3A329C:lI116|H3A32E4
-3A32E4:lI114|H3A3324
-3A3324:lI101|H3A3354
-3A3354:lI97|H3A337C
-3A337C:lI109|N
-3A2920:lI108|H3A29DC
-3A29DC:lI122|H3A2A98
-3A2A98:lI104|N
-3A2878:lH3A2930|H3A293C
-3A2930:t2:H3A29EC,H3A29F4
-3A29F4:lI97|H3A2AB0
-3A2AB0:lI112|H3A2B74
-3A2B74:lI112|H3A2C30
-3A2C30:lI108|H3A2CE4
-3A2CE4:lI105|H3A2D94
-3A2D94:lI99|H3A2E3C
-3A2E3C:lI97|H3A2EC4
-3A2EC4:lI116|H3A2F3C
-3A2F3C:lI105|H3A2FAC
-3A2FAC:lI111|H3A3014
-3A3014:lI110|H3A307C
-3A307C:lI47|H3A30DC
-3A30DC:lI111|H3A3134
-3A3134:lI99|H3A3184
-3A3184:lI116|H3A31CC
-3A31CC:lI101|H3A3214
-3A3214:lI116|H3A325C
-3A325C:lI45|H3A32A4
-3A32A4:lI115|H3A32EC
-3A32EC:lI116|H3A332C
-3A332C:lI114|H3A335C
-3A335C:lI101|H3A3384
-3A3384:lI97|H3A33A4
-3A33A4:lI109|N
-3A29EC:lI101|H3A2AA8
-3A2AA8:lI120|H3A2B6C
-3A2B6C:lI101|N
-3A293C:lH3A29FC|H3A2A08
-3A29FC:t2:H3A2AB8,H3A2AC0
-3A2AC0:lI97|H3A2B84
-3A2B84:lI112|H3A2C40
-3A2C40:lI112|H3A2CF4
-3A2CF4:lI108|H3A2DA4
-3A2DA4:lI105|H3A2E44
-3A2E44:lI99|H3A2ECC
-3A2ECC:lI97|H3A2F44
-3A2F44:lI116|H3A2FB4
-3A2FB4:lI105|H3A301C
-3A301C:lI111|H3A3084
-3A3084:lI110|H3A30E4
-3A30E4:lI47|H3A313C
-3A313C:lI111|H3A318C
-3A318C:lI99|H3A31D4
-3A31D4:lI116|H3A321C
-3A321C:lI101|H3A3264
-3A3264:lI116|H3A32AC
-3A32AC:lI45|H3A32F4
-3A32F4:lI115|H3A3334
-3A3334:lI116|H3A3364
-3A3364:lI114|H3A338C
-3A338C:lI101|H3A33AC
-3A33AC:lI97|H3A33C4
-3A33C4:lI109|N
-3A2AB8:lI99|H3A2B7C
-3A2B7C:lI108|H3A2C38
-3A2C38:lI97|H3A2CEC
-3A2CEC:lI115|H3A2D9C
-3A2D9C:lI115|N
-3A2A08:lH3A2AC8|H3A2AD4
-3A2AC8:t2:H3A2B8C,H3A2B94
-3A2B94:lI97|H3A2C50
-3A2C50:lI112|H3A2D04
-3A2D04:lI112|H3A2DAC
-3A2DAC:lI108|H3A2E4C
-3A2E4C:lI105|H3A2ED4
-3A2ED4:lI99|H3A2F4C
-3A2F4C:lI97|H3A2FBC
-3A2FBC:lI116|H3A3024
-3A3024:lI105|H3A308C
-3A308C:lI111|H3A30EC
-3A30EC:lI110|H3A3144
-3A3144:lI47|H3A3194
-3A3194:lI109|H3A31DC
-3A31DC:lI115|H3A3224
-3A3224:lI119|H3A326C
-3A326C:lI111|H3A32B4
-3A32B4:lI114|H3A32FC
-3A32FC:lI100|N
-3A2B8C:lI100|H3A2C48
-3A2C48:lI111|H3A2CFC
-3A2CFC:lI99|N
-3A2AD4:lH3A2B9C|H3A2BA8
-3A2B9C:t2:H3A2C58,H3A2C60
-3A2C60:lI97|H3A2D14
-3A2D14:lI112|H3A2DBC
-3A2DBC:lI112|H3A2E54
-3A2E54:lI108|H3A2EDC
-3A2EDC:lI105|H3A2F54
-3A2F54:lI99|H3A2FC4
-3A2FC4:lI97|H3A302C
-3A302C:lI116|H3A3094
-3A3094:lI105|H3A30F4
-3A30F4:lI111|H3A314C
-3A314C:lI110|H3A319C
-3A319C:lI47|H3A31E4
-3A31E4:lI109|H3A322C
-3A322C:lI97|H3A3274
-3A3274:lI99|H3A32BC
-3A32BC:lI45|H3A3304
-3A3304:lI99|H3A333C
-3A333C:lI111|H3A336C
-3A336C:lI109|H3A3394
-3A3394:lI112|H3A33B4
-3A33B4:lI97|H3A33CC
-3A33CC:lI99|H3A33DC
-3A33DC:lI116|H3A33EC
-3A33EC:lI112|H3A33FC
-3A33FC:lI114|H3A340C
-3A340C:lI111|N
-3A2C58:lI99|H3A2D0C
-3A2D0C:lI112|H3A2DB4
-3A2DB4:lI116|N
-3A2BA8:lH3A2C68|N
-3A2C68:t2:H3A2D1C,H3A2D24
-3A2D24:lI97|H3A2DCC
-3A2DCC:lI112|H3A2E64
-3A2E64:lI112|H3A2EE4
-3A2EE4:lI108|H3A2F5C
-3A2F5C:lI105|H3A2FCC
-3A2FCC:lI99|H3A3034
-3A3034:lI97|H3A309C
-3A309C:lI116|H3A30FC
-3A30FC:lI105|H3A3154
-3A3154:lI111|H3A31A4
-3A31A4:lI110|H3A31EC
-3A31EC:lI47|H3A3234
-3A3234:lI109|H3A327C
-3A327C:lI97|H3A32C4
-3A32C4:lI99|H3A330C
-3A330C:lI45|H3A3344
-3A3344:lI98|H3A3374
-3A3374:lI105|H3A339C
-3A339C:lI110|H3A33BC
-3A33BC:lI104|H3A33D4
-3A33D4:lI101|H3A33E4
-3A33E4:lI120|H3A33F4
-3A33F4:lI52|H3A3404
-3A3404:lI48|N
-3A2D1C:lI104|H3A2DC4
-3A2DC4:lI113|H3A2E5C
-3A2E5C:lI120|N
-39DC28:lH39DC68|H39DC74
-39DC68:t2:A4:port,I8888
-39DC74:lH39DCA8|H39DCB4
-39DCA8:t2:AC:bind_address,H39DCF8
-39DCF8:t4:I127,I0,I0,I1
-39DCB4:lH39DD0C|H39DD18
-39DD0C:t2:AB:server_name,H39DD6C
-39DD6C:lI108|H39DDE4
-39DDE4:lI111|H39DE5C
-39DE5C:lI99|H39DEE4
-39DEE4:lI97|H39DF6C
-39DF6C:lI108|H39E00C
-39E00C:lI104|H39E0B4
-39E0B4:lI111|H39E16C
-39E16C:lI115|H39E238
-39E238:lI116|N
-39DD18:lH39DD74|H39DD80
-39DD74:t2:AE:max_header_siz,I1024
-39DD80:lH39DDEC|H39DDF8
-39DDEC:t2:A11:max_header_action,A8:reply414
-39DDF8:lH39DE64|H39DE70
-39DE64:t2:A8:com_type,A7:ip_comm
-39DE70:lH39DEEC|H39DEF8
-39DEEC:t2:A7:modules,H39DF74
-39DF74:lA9:mod_alias|H39E014
-39E014:lA8:mod_auth|H39E0BC
-39E0BC:lA7:mod_esi|H39E174
-39E174:lAB:mod_actions|H39E240
-39E240:lA7:mod_cgi|H39E324
-39E324:lAB:mod_include|H39E418
-39E418:lA7:mod_dir|H39E51C
-39E51C:lA7:mod_get|H39E634
-39E634:lA8:mod_head|H39E748
-39E748:lA7:mod_log|H39E85C
-39E85C:lAC:mod_disk_log|N
-39DEF8:lH39DF7C|H39DF88
-39DF7C:t2:AF:directory_index,H39E01C
-39E01C:lH39E0C4|N
-39E0C4:lI105|H39E17C
-39E17C:lI110|H39E248
-39E248:lI100|H39E32C
-39E32C:lI101|H39E420
-39E420:lI120|H39E524
-39E524:lI46|H39E63C
-39E63C:lI104|H39E750
-39E750:lI116|H39E864
-39E864:lI109|H39E978
-39E978:lI108|N
-39DF88:lH39E024|H39E030
-39E024:t2:AC:default_type,H39E0CC
-39E0CC:lI116|H39E184
-39E184:lI101|H39E250
-39E250:lI120|H39E334
-39E334:lI116|H39E428
-39E428:lI47|H39E52C
-39E52C:lI112|H39E644
-39E644:lI108|H39E758
-39E758:lI97|H39E86C
-39E86C:lI105|H39E980
-39E980:lI110|N
-39E030:lH39E0D4|H39E0E0
-39E0D4:t2:A10:erl_script_alias,H39E18C
-39E18C:t2:H39E258,H39E260
-39E260:lH39E344|N
-39E344:lI119|H39E438
-39E438:lI101|H39E53C
-39E53C:lI98|H39E654
-39E654:lI116|H39E768
-39E768:lI111|H39E87C
-39E87C:lI111|H39E990
-39E990:lI108|N
-39E258:lI47|H39E33C
-39E33C:lI119|H39E430
-39E430:lI101|H39E534
-39E534:lI98|H39E64C
-39E64C:lI116|H39E760
-39E760:lI111|H39E874
-39E874:lI111|H39E988
-39E988:lI108|N
-39E0E0:lH39E198|H39E1A4
-39E198:t2:A5:alias,H39E268
-39E268:t2:H39E34C,H39E354
-39E354:lI47|H39E448
-39E448:lI99|H39E54C
-39E54C:lI108|H39E664
-39E664:lI101|H39E778
-39E778:lI97|H39E88C
-39E88C:lI114|H39E9A0
-39E9A0:lI99|H39EA94
-39EA94:lI97|H39EB88
-39EB88:lI115|H39EC7C
-39EC7C:lI101|H39ED70
-39ED70:lI47|H39EE4C
-39EE4C:lI111|H39EF20
-39EF20:lI116|H39EFFC
-39EFFC:lI112|H39F0E0
-39F0E0:lI47|H39F1B4
-39F1B4:lI101|H39F288
-39F288:lI114|H39F344
-39F344:lI116|H39F408
-39F408:lI115|H39F4D4
-39F4D4:lI47|H39F5A8
-39F5A8:lI108|H39F67C
-39F67C:lI105|H39F750
-39F750:lI98|H39F824
-39F824:lI47|H39F908
-39F908:lI111|H39F9E4
-39F9E4:lI98|H39FAC0
-39FAC0:lI115|H39FB9C
-39FB9C:lI101|H39FC68
-39FC68:lI114|H39FD2C
-39FD2C:lI118|H39FDF8
-39FDF8:lI101|H39FEB4
-39FEB4:lI114|H39FF70
-39FF70:lI47|H3A0024
-3A0024:lI112|H3A00D8
-3A00D8:lI114|H3A0184
-3A0184:lI105|H3A0238
-3A0238:lI118|H3A02F4
-3A02F4:lI47|H3A03A8
-3A03A8:lI99|H3A0444
-3A0444:lI114|H3A04E8
-3A04E8:lI97|H3A058C
-3A058C:lI115|H3A0638
-3A0638:lI104|H3A06EC
-3A06EC:lI100|H3A0798
-3A0798:lI117|H3A083C
-3A083C:lI109|H3A08C8
-3A08C8:lI112|H3A095C
-3A095C:lI95|H3A09F0
-3A09F0:lI118|H3A0A8C
-3A0A8C:lI105|H3A0B38
-3A0B38:lI101|H3A0BE4
-3A0BE4:lI119|H3A0CA0
-3A0CA0:lI101|H3A0D5C
-3A0D5C:lI114|N
-39E34C:lI47|H39E440
-39E440:lI99|H39E544
-39E544:lI114|H39E65C
-39E65C:lI97|H39E770
-39E770:lI115|H39E884
-39E884:lI104|H39E998
-39E998:lI100|H39EA8C
-39EA8C:lI117|H39EB80
-39EB80:lI109|H39EC74
-39EC74:lI112|H39ED68
-39ED68:lI95|H39EE44
-39EE44:lI118|H39EF18
-39EF18:lI105|H39EFF4
-39EFF4:lI101|H39F0D8
-39F0D8:lI119|H39F1AC
-39F1AC:lI101|H39F280
-39F280:lI114|N
-39E1A4:lH39E274|H39E280
-39E274:t2:A5:alias,H39E35C
-39E35C:t2:H39E450,H39E458
-39E458:lI47|H39E55C
-39E55C:lI99|H39E674
-39E674:lI108|H39E788
-39E788:lI101|H39E89C
-39E89C:lI97|H39E9B0
-39E9B0:lI114|H39EAA4
-39EAA4:lI99|H39EB98
-39EB98:lI97|H39EC8C
-39EC8C:lI115|H39ED80
-39ED80:lI101|H39EE5C
-39EE5C:lI47|H39EF30
-39EF30:lI111|H39F00C
-39F00C:lI116|H39F0F0
-39F0F0:lI112|H39F1C4
-39F1C4:lI47|H39F298
-39F298:lI101|H39F354
-39F354:lI114|H39F418
-39F418:lI116|H39F4E4
-39F4E4:lI115|H39F5B0
-39F5B0:lI47|H39F684
-39F684:lI101|H39F758
-39F758:lI114|H39F82C
-39F82C:lI116|H39F910
-39F910:lI115|H39F9EC
-39F9EC:lI47|H39FAC8
-39FAC8:lI100|H39FBA4
-39FBA4:lI111|H39FC70
-39FC70:lI99|H39FD34
-39FD34:lI47|H39FE00
-39FE00:lI104|H39FEBC
-39FEBC:lI116|H39FF78
-39FF78:lI109|H3A002C
-3A002C:lI108|N
-39E450:lI47|H39E554
-39E554:lI99|H39E66C
-39E66C:lI114|H39E780
-39E780:lI97|H39E894
-39E894:lI115|H39E9A8
-39E9A8:lI104|H39EA9C
-39EA9C:lI100|H39EB90
-39EB90:lI117|H39EC84
-39EC84:lI109|H39ED78
-39ED78:lI112|H39EE54
-39EE54:lI95|H39EF28
-39EF28:lI101|H39F004
-39F004:lI114|H39F0E8
-39F0E8:lI116|H39F1BC
-39F1BC:lI115|H39F290
-39F290:lI95|H39F34C
-39F34C:lI100|H39F410
-39F410:lI111|H39F4DC
-39F4DC:lI99|N
-39E280:lH39E368|H39E374
-39E368:t2:A5:alias,H39E460
-39E460:t2:H39E564,H39E56C
-39E56C:lI47|H39E684
-39E684:lI99|H39E798
-39E798:lI108|H39E8AC
-39E8AC:lI101|H39E9C0
-39E9C0:lI97|H39EAB4
-39EAB4:lI114|H39EBA8
-39EBA8:lI99|H39EC9C
-39EC9C:lI97|H39ED90
-39ED90:lI115|H39EE6C
-39EE6C:lI101|H39EF40
-39EF40:lI47|H39F01C
-39F01C:lI111|H39F100
-39F100:lI116|H39F1D4
-39F1D4:lI112|H39F2A0
-39F2A0:lI47|H39F35C
-39F35C:lI101|H39F420
-39F420:lI114|H39F4EC
-39F4EC:lI116|H39F5B8
-39F5B8:lI115|H39F68C
-39F68C:lI47|H39F760
-39F760:lI108|H39F834
-39F834:lI105|H39F918
-39F918:lI98|H39F9F4
-39F9F4:lI47|H39FAD0
-39FAD0:lI111|H39FBAC
-39FBAC:lI98|H39FC78
-39FC78:lI115|H39FD3C
-39FD3C:lI101|H39FE08
-39FE08:lI114|H39FEC4
-39FEC4:lI118|H39FF80
-39FF80:lI101|H3A0034
-3A0034:lI114|H3A00E0
-3A00E0:lI47|H3A018C
-3A018C:lI100|H3A0240
-3A0240:lI111|H3A02FC
-3A02FC:lI99|H3A03B0
-3A03B0:lI47|H3A044C
-3A044C:lI104|H3A04F0
-3A04F0:lI116|H3A0594
-3A0594:lI109|H3A0640
-3A0640:lI108|N
-39E564:lI47|H39E67C
-39E67C:lI99|H39E790
-39E790:lI114|H39E8A4
-39E8A4:lI97|H39E9B8
-39E9B8:lI115|H39EAAC
-39EAAC:lI104|H39EBA0
-39EBA0:lI100|H39EC94
-39EC94:lI117|H39ED88
-39ED88:lI109|H39EE64
-39EE64:lI112|H39EF38
-39EF38:lI95|H39F014
-39F014:lI100|H39F0F8
-39F0F8:lI111|H39F1CC
-39F1CC:lI99|N
-39E374:lH39E46C|N
-39E46C:t2:A10:erl_script_alias,H39E574
-39E574:t2:H39E68C,H39E694
-39E694:lH39E7A8|N
-39E7A8:lI99|H39E8BC
-39E8BC:lI114|H39E9D0
-39E9D0:lI97|H39EAC4
-39EAC4:lI115|H39EBB8
-39EBB8:lI104|H39ECAC
-39ECAC:lI100|H39EDA0
-39EDA0:lI117|H39EE74
-39EE74:lI109|H39EF48
-39EF48:lI112|H39F024
-39F024:lI95|H39F108
-39F108:lI118|H39F1DC
-39F1DC:lI105|H39F2A8
-39F2A8:lI101|H39F364
-39F364:lI119|H39F428
-39F428:lI101|H39F4F4
-39F4F4:lI114|N
-39E68C:lI47|H39E7A0
-39E7A0:lI99|H39E8B4
-39E8B4:lI100|H39E9C8
-39E9C8:lI118|H39EABC
-39EABC:lI95|H39EBB0
-39EBB0:lI101|H39ECA4
-39ECA4:lI114|H39ED98
-39ED98:lI108|N
-39DB58:lN|H39DB9C
-39DB9C:lH39D9FC|H39DBEC
-39D9FC:t4:I127,I0,I0,I1
-39DBEC:lI8888|N
-3A3E20:lH3A3DFC|H3A3704
-3A3DFC:t8:A5:child,P<0.46.0>,H39DAC8,H39DAD8,A9:permanent,I2000,A6:worker,H39DAE8
-39DAE8:lAD:httpd_manager|H39DB38
-39DB38:lAA:gen_server|N
-39DAD8:t3:AD:httpd_manager,AA:start_link,H39DB30
-39DB30:lA9:undefined|H39DB78
-39DB78:lH39DB50|H39DBC0
-39DBC0:lN|N
-39DAC8:t3:AD:httpd_manager,H39D9FC,I8888
-3A3704:lH3A36E0|H39D998
-3A36E0:t8:A5:child,P<0.45.0>,H39DA18,H39DA28,A9:permanent,I2000,AA:supervisor,H39DA38
-39DA38:lAE:httpd_misc_sup|H39DAC0
-39DAC0:lAA:supervisor|N
-39DA28:t3:AE:httpd_misc_sup,A5:start,H39D958
-39D958:lH39D9FC|H39DA10
-39DA10:lI8888|H39DAB8
-39DAB8:lA7:silence|N
-39DA18:t3:AE:httpd_misc_sup,H39D9FC,I8888
-39D998:lH39DA64|N
-39DA64:t8:A5:child,P<0.44.0>,H39DAF0,H39DB00,A9:permanent,I2000,AA:supervisor,H39DB10
-39DB10:lA12:httpd_acceptor_sup|H39DB48
-39DB48:lAA:supervisor|N
-39DB00:t3:A12:httpd_acceptor_sup,A5:start,H39DB40
-39DB40:lH39D9FC|H39DB80
-39DB80:lI8888|H39DBC8
-39DBC8:lA7:silence|N
-39DAF0:t3:A12:httpd_acceptor_sup,H39D9FC,I8888
-39D960:t2:A5:local,A1A:httpd_sup__127_0_0_1__8888
-39D9CC:lAA:gen_server|H39DA90
-39DA90:lP<0.33.0>|H39DB20
-39DB20:lP<0.33.0>|H39DB60
-39DB60:lH39DBA4|H39DBB0
-39DBA4:t2:A5:local,A1A:httpd_sup__127_0_0_1__8888
-39DBB0:lAA:supervisor|H39DBF4
-39DBF4:lH39DC30|H39DC40
-39DC30:t3:H39D960,A9:httpd_sup,H39DA88
-39DC40:lN|N
-39D940:t2:AD:$initial_call,H39D9E4
-39D9E4:t3:A3:gen,A7:init_it,H39D9CC
-39D94C:t2:AA:$ancestors,H39D9F4
-39D9F4:lA8:web_tool|H39DAB0
-39DAB0:lP<0.27.0>|N
-=proc_dictionary:<0.44.0>
-H3756A8
-H3756B4
-H3756C0
-H3756CC
-=proc_stack:<0.44.0>
-36c194:SReturn addr 0x225860 (proc_lib:init_p/5 + 164)
-y0:N
-y1:A8:infinity
-y2:AA:supervisor
-y3:H36C030
-y4:A1E:httpd_acc_sup__127_0_0_1__8888
-y5:P<0.43.0>
-36c1b0:SReturn addr 0x156F90 (<terminate process normally>)
-y0:SCatch 0x225860 (proc_lib:init_p/5 + 164)
-y1:A3:gen
-y2:A7:init_it
-y3:H375710
-=proc_heap:<0.44.0>
-36C030:tA:A5:state,H3756D8,AB:one_for_one,H36C028,N,I500,I100,N,A12:httpd_acceptor_sup,H375730
-375730:lA7:silence|N
-36C028:lH36C004|N
-36C004:t8:A5:child,P<0.47.0>,H36BE80,H36BE90,A9:permanent,I1000,A6:worker,H36BEA0
-36BEA0:lAE:httpd_acceptor|N
-36BE90:t3:AE:httpd_acceptor,AA:start_link,H36BEE8
-36BEE8:lP<0.46.0>|H36BEF0
-36BEF0:lA7:ip_comm|H36BEF8
-36BEF8:lH36BF00|H36BF14
-36BF00:t4:I127,I0,I0,I1
-36BF14:lI8888|H36BF1C
-36BF1C:lA1B:httpd_conf__127_0_0_1__8888|H36BF24
-36BF24:lA7:silence|N
-36BE80:t3:AE:httpd_acceptor,H36BED4,I8888
-36BED4:t4:I127,I0,I0,I1
-3756D8:t2:A5:local,A1E:httpd_acc_sup__127_0_0_1__8888
-375710:lAA:gen_server|H375738
-375738:lP<0.43.0>|H375748
-375748:lP<0.43.0>|H375758
-375758:lH375760|H37576C
-375760:t2:A5:local,A1E:httpd_acc_sup__127_0_0_1__8888
-37576C:lAA:supervisor|H375774
-375774:lH37577C|H37578C
-37577C:t3:H3756D8,A12:httpd_acceptor_sup,H375730
-37578C:lN|N
-3756A8:t2:AD:$initial_call,H375718
-375718:t3:A3:gen,A7:init_it,H375710
-3756B4:t2:A9:verbosity,A7:silence
-3756C0:t2:AA:$ancestors,H375728
-375728:lA1A:httpd_sup__127_0_0_1__8888|H375740
-375740:lA8:web_tool|H375750
-375750:lP<0.27.0>|N
-3756CC:t2:A5:sname,A7:acc_sup
-=proc_dictionary:<0.45.0>
-H36F484
-H36F4F4
-H36F468
-H36F500
-=proc_stack:<0.45.0>
-36f734:SReturn addr 0x225860 (proc_lib:init_p/5 + 164)
-y0:N
-y1:A8:infinity
-y2:AA:supervisor
-y3:H36F5D0
-y4:A1F:httpd_misc_sup__127_0_0_1__8888
-y5:P<0.43.0>
-36f750:SReturn addr 0x156F90 (<terminate process normally>)
-y0:SCatch 0x225860 (proc_lib:init_p/5 + 164)
-y1:A3:gen
-y2:A7:init_it
-y3:H36F430
-=proc_heap:<0.45.0>
-36F5D0:tA:A5:state,H36F3FC,AB:one_for_one,N,N,I0,I1,N,AE:httpd_misc_sup,H36F408
-36F408:lA7:silence|N
-36F3FC:t2:A5:local,A1F:httpd_misc_sup__127_0_0_1__8888
-36F430:lAA:gen_server|H36F428
-36F428:lP<0.43.0>|H36F420
-36F420:lP<0.43.0>|H36F3D0
-36F3D0:lH36F3E0|H36F418
-36F3E0:t2:A5:local,A1F:httpd_misc_sup__127_0_0_1__8888
-36F418:lAA:supervisor|H36F3D8
-36F3D8:lH36F3EC|H36F410
-36F3EC:t3:H36F3FC,AE:httpd_misc_sup,H36F408
-36F410:lN|N
-36F484:t2:AD:$initial_call,H36F474
-36F474:t3:A3:gen,A7:init_it,H36F430
-36F4F4:t2:A9:verbosity,A7:silence
-36F468:t2:AA:$ancestors,H36F460
-36F460:lA1A:httpd_sup__127_0_0_1__8888|H36F440
-36F440:lA8:web_tool|H36F438
-36F438:lP<0.27.0>|N
-36F500:t2:A5:sname,A8:misc_sup
-=proc_dictionary:<0.46.0>
-H3BDA50
-H3BDA5C
-H3BDAC8
-H3BDB28
-H3BDB9C
-H3BDC00
-H3BDADC
-H3BDB3C
-=proc_stack:<0.46.0>
-39d8f4:SReturn addr 0x225860 (proc_lib:init_p/5 + 164)
-y0:N
-y1:A8:infinity
-y2:AD:httpd_manager
-y3:H39D5A4
-y4:A16:httpd__127_0_0_1__8888
-y5:P<0.43.0>
-39d910:SReturn addr 0x156F90 (<terminate process normally>)
-y0:SCatch 0x225860 (proc_lib:init_p/5 + 164)
-y1:A3:gen
-y2:A7:init_it
-y3:H3BDAB0
-=proc_heap:<0.46.0>
-39D5A4:t9:A5:state,A7:ip_comm,A9:undefined,A1B:httpd_conf__127_0_0_1__8888,N,A9:unblocked,A9:undefined,A9:undefined,H39D430
-39D430:lH39BF40|H39D428
-39BF40:t2:A8:max_conn,I1
-39D428:lH39BC80|H39D420
-39BC80:t2:AF:last_heavy_load,A5:never
-39D420:lH39D414|N
-39D414:t2:AF:last_connection,H39D408
-39D408:t2:H39D3E8,H39D3F8
-39D3F8:t3:I11,I22,I34
-39D3E8:t3:I2004,I4,I21
-3BDAB0:lAA:gen_server|H3BDB20
-3BDB20:lP<0.43.0>|H3BDB94
-3BDB94:lP<0.43.0>|H3BDBF8
-3BDBF8:lH3BDC48|H3BDC54
-3BDC48:t2:A5:local,A16:httpd__127_0_0_1__8888
-3BDC54:lAD:httpd_manager|H3BDCAC
-3BDCAC:lH3BDD14|H3BDD1C
-3BDD14:lA9:undefined|H3BDD9C
-3BDD9C:lH3BDA84|H3BDE2C
-3BDA84:lH3BDAF0|H3BDAFC
-3BDAF0:t2:AB:server_root,H3BDB48
-3BDB48:lI47|H3BDBB0
-3BDBB0:lI99|H3BDC0C
-3BDC0C:lI108|H3BDC64
-3BDC64:lI101|H3BDCBC
-3BDCBC:lI97|H3BDD2C
-3BDD2C:lI114|H3BDDA4
-3BDDA4:lI99|H3BDE34
-3BDE34:lI97|H3BDED4
-3BDED4:lI115|H3BDF90
-3BDF90:lI101|H3BE054
-3BE054:lI47|H3BE128
-3BE128:lI111|H3BE204
-3BE204:lI116|H3BE2EC
-3BE2EC:lI112|H3BE3E0
-3BE3E0:lI47|H3BE4E4
-3BE4E4:lI101|H3BE5E8
-3BE5E8:lI114|H3BE6EC
-3BE6EC:lI116|H3BE7E0
-3BE7E0:lI115|H3BE8CC
-3BE8CC:lI47|H3BE9B8
-3BE9B8:lI108|H3BEAAC
-3BEAAC:lI105|H3BEB98
-3BEB98:lI98|H3BEC84
-3BEC84:lI47|H3BED70
-3BED70:lI119|H3BEE5C
-3BEE5C:lI101|H3BEF30
-3BEF30:lI98|H3BEFFC
-3BEFFC:lI116|H3BF0C8
-3BF0C8:lI111|H3BF19C
-3BF19C:lI111|H3BF260
-3BF260:lI108|H3BF314
-3BF314:lI47|H3BF3C0
-3BF3C0:lI112|H3BF474
-3BF474:lI114|H3BF530
-3BF530:lI105|H3BF5F4
-3BF5F4:lI118|H3BF6C8
-3BF6C8:lI47|H3BF79C
-3BF79C:lI114|H3BF870
-3BF870:lI111|H3BF954
-3BF954:lI111|H3BFA30
-3BFA30:lI116|N
-3BDAFC:lH3BDB50|H3BDB5C
-3BDB50:t2:AD:document_root,H3BDBB8
-3BDBB8:lI47|H3BDC14
-3BDC14:lI99|H3BDC6C
-3BDC6C:lI108|H3BDCC4
-3BDCC4:lI101|H3BDD34
-3BDD34:lI97|H3BDDAC
-3BDDAC:lI114|H3BDE3C
-3BDE3C:lI99|H3BDEDC
-3BDEDC:lI97|H3BDF98
-3BDF98:lI115|H3BE05C
-3BE05C:lI101|H3BE130
-3BE130:lI47|H3BE20C
-3BE20C:lI111|H3BE2F4
-3BE2F4:lI116|H3BE3E8
-3BE3E8:lI112|H3BE4EC
-3BE4EC:lI47|H3BE5F0
-3BE5F0:lI101|H3BE6F4
-3BE6F4:lI114|H3BE7E8
-3BE7E8:lI116|H3BE8D4
-3BE8D4:lI115|H3BE9C0
-3BE9C0:lI47|H3BEAB4
-3BEAB4:lI108|H3BEBA0
-3BEBA0:lI105|H3BEC8C
-3BEC8C:lI98|H3BED78
-3BED78:lI47|H3BEE64
-3BEE64:lI119|H3BEF38
-3BEF38:lI101|H3BF004
-3BF004:lI98|H3BF0D0
-3BF0D0:lI116|H3BF1A4
-3BF1A4:lI111|H3BF268
-3BF268:lI111|H3BF31C
-3BF31C:lI108|H3BF3C8
-3BF3C8:lI47|H3BF47C
-3BF47C:lI112|H3BF538
-3BF538:lI114|H3BF5FC
-3BF5FC:lI105|H3BF6D0
-3BF6D0:lI118|H3BF7A4
-3BF7A4:lI47|H3BF878
-3BF878:lI114|H3BF95C
-3BF95C:lI111|H3BFA38
-3BFA38:lI111|H3BFB0C
-3BFB0C:lI116|H3BFBE8
-3BFBE8:lI47|H3BFCB4
-3BFCB4:lI100|H3BFD78
-3BFD78:lI111|H3BFE3C
-3BFE3C:lI99|N
-3BDB5C:lH3BDBC0|H3BDBCC
-3BDBC0:t2:AA:mime_types,H3BDC1C
-3BDC1C:lH3BDC74|H3BDC80
-3BDC74:t2:H3BDCCC,H3BDCD4
-3BDCD4:lI120|H3BDD44
-3BDD44:lI45|H3BDDBC
-3BDDBC:lI119|H3BDE44
-3BDE44:lI111|H3BDEE4
-3BDEE4:lI114|H3BDFA0
-3BDFA0:lI108|H3BE064
-3BE064:lI100|H3BE138
-3BE138:lI47|H3BE214
-3BE214:lI120|H3BE2FC
-3BE2FC:lI45|H3BE3F0
-3BE3F0:lI118|H3BE4F4
-3BE4F4:lI114|H3BE5F8
-3BE5F8:lI109|H3BE6FC
-3BE6FC:lI108|N
-3BDCCC:lI119|H3BDD3C
-3BDD3C:lI114|H3BDDB4
-3BDDB4:lI108|N
-3BDC80:lH3BDCDC|H3BDCE8
-3BDCDC:t2:H3BDD4C,H3BDD54
-3BDD54:lI120|H3BDDCC
-3BDDCC:lI45|H3BDE54
-3BDE54:lI119|H3BDEF4
-3BDEF4:lI111|H3BDFA8
-3BDFA8:lI114|H3BE06C
-3BE06C:lI108|H3BE140
-3BE140:lI100|H3BE21C
-3BE21C:lI47|H3BE304
-3BE304:lI120|H3BE3F8
-3BE3F8:lI45|H3BE4FC
-3BE4FC:lI118|H3BE600
-3BE600:lI114|H3BE704
-3BE704:lI109|H3BE7F0
-3BE7F0:lI108|N
-3BDD4C:lI118|H3BDDC4
-3BDDC4:lI114|H3BDE4C
-3BDE4C:lI109|H3BDEEC
-3BDEEC:lI108|N
-3BDCE8:lH3BDD5C|H3BDD68
-3BDD5C:t2:H3BDDD4,H3BDDDC
-3BDDDC:lI120|H3BDE64
-3BDE64:lI45|H3BDF04
-3BDF04:lI99|H3BDFB0
-3BDFB0:lI111|H3BE074
-3BE074:lI110|H3BE148
-3BE148:lI102|H3BE224
-3BE224:lI101|H3BE30C
-3BE30C:lI114|H3BE400
-3BE400:lI101|H3BE504
-3BE504:lI110|H3BE608
-3BE608:lI99|H3BE70C
-3BE70C:lI101|H3BE7F8
-3BE7F8:lI47|H3BE8DC
-3BE8DC:lI120|H3BE9C8
-3BE9C8:lI45|H3BEABC
-3BEABC:lI99|H3BEBA8
-3BEBA8:lI111|H3BEC94
-3BEC94:lI111|H3BED80
-3BED80:lI108|H3BEE6C
-3BEE6C:lI116|H3BEF40
-3BEF40:lI97|H3BF00C
-3BF00C:lI108|H3BF0D8
-3BF0D8:lI107|N
-3BDDD4:lI105|H3BDE5C
-3BDE5C:lI99|H3BDEFC
-3BDEFC:lI101|N
-3BDD68:lH3BDDE4|H3BDDF0
-3BDDE4:t2:H3BDE6C,H3BDE74
-3BDE74:lI118|H3BDF14
-3BDF14:lI105|H3BDFC0
-3BDFC0:lI100|H3BE084
-3BE084:lI101|H3BE158
-3BE158:lI111|H3BE22C
-3BE22C:lI47|H3BE314
-3BE314:lI120|H3BE408
-3BE408:lI45|H3BE50C
-3BE50C:lI115|H3BE610
-3BE610:lI103|H3BE714
-3BE714:lI105|H3BE800
-3BE800:lI45|H3BE8E4
-3BE8E4:lI109|H3BE9D0
-3BE9D0:lI111|H3BEAC4
-3BEAC4:lI118|H3BEBB0
-3BEBB0:lI105|H3BEC9C
-3BEC9C:lI101|N
-3BDE6C:lI109|H3BDF0C
-3BDF0C:lI111|H3BDFB8
-3BDFB8:lI118|H3BE07C
-3BE07C:lI105|H3BE150
-3BE150:lI101|N
-3BDDF0:lH3BDE7C|H3BDE88
-3BDE7C:t2:H3BDF1C,H3BDF24
-3BDF24:lI118|H3BDFD0
-3BDFD0:lI105|H3BE094
-3BE094:lI100|H3BE160
-3BE160:lI101|H3BE234
-3BE234:lI111|H3BE31C
-3BE31C:lI47|H3BE410
-3BE410:lI120|H3BE514
-3BE514:lI45|H3BE618
-3BE618:lI109|H3BE71C
-3BE71C:lI115|H3BE808
-3BE808:lI118|H3BE8EC
-3BE8EC:lI105|H3BE9D8
-3BE9D8:lI100|H3BEACC
-3BEACC:lI101|H3BEBB8
-3BEBB8:lI111|N
-3BDF1C:lI97|H3BDFC8
-3BDFC8:lI118|H3BE08C
-3BE08C:lI105|N
-3BDE88:lH3BDF2C|H3BDF38
-3BDF2C:t2:H3BDFD8,H3BDFE0
-3BDFE0:lI118|H3BE0A4
-3BE0A4:lI105|H3BE168
-3BE168:lI100|H3BE23C
-3BE23C:lI101|H3BE324
-3BE324:lI111|H3BE418
-3BE418:lI47|H3BE51C
-3BE51C:lI113|H3BE620
-3BE620:lI117|H3BE724
-3BE724:lI105|H3BE810
-3BE810:lI99|H3BE8F4
-3BE8F4:lI107|H3BE9E0
-3BE9E0:lI116|H3BEAD4
-3BEAD4:lI105|H3BEBC0
-3BEBC0:lI109|H3BECA4
-3BECA4:lI101|N
-3BDFD8:lI113|H3BE09C
-3BE09C:lI116|N
-3BDF38:lH3BDFE8|H3BDFF4
-3BDFE8:t2:H3BE0AC,H3BE0B4
-3BE0B4:lI118|H3BE178
-3BE178:lI105|H3BE24C
-3BE24C:lI100|H3BE32C
-3BE32C:lI101|H3BE420
-3BE420:lI111|H3BE524
-3BE524:lI47|H3BE628
-3BE628:lI113|H3BE72C
-3BE72C:lI117|H3BE818
-3BE818:lI105|H3BE8FC
-3BE8FC:lI99|H3BE9E8
-3BE9E8:lI107|H3BEADC
-3BEADC:lI116|H3BEBC8
-3BEBC8:lI105|H3BECAC
-3BECAC:lI109|H3BED88
-3BED88:lI101|N
-3BE0AC:lI109|H3BE170
-3BE170:lI111|H3BE244
-3BE244:lI118|N
-3BDFF4:lH3BE0BC|H3BE0C8
-3BE0BC:t2:H3BE180,H3BE188
-3BE188:lI118|H3BE25C
-3BE25C:lI105|H3BE33C
-3BE33C:lI100|H3BE430
-3BE430:lI101|H3BE52C
-3BE52C:lI111|H3BE630
-3BE630:lI47|H3BE734
-3BE734:lI109|H3BE820
-3BE820:lI112|H3BE904
-3BE904:lI101|H3BE9F0
-3BE9F0:lI103|N
-3BE180:lI109|H3BE254
-3BE254:lI112|H3BE334
-3BE334:lI101|H3BE428
-3BE428:lI103|N
-3BE0C8:lH3BE190|H3BE19C
-3BE190:t2:H3BE264,H3BE26C
-3BE26C:lI118|H3BE34C
-3BE34C:lI105|H3BE440
-3BE440:lI100|H3BE534
-3BE534:lI101|H3BE638
-3BE638:lI111|H3BE73C
-3BE73C:lI47|H3BE828
-3BE828:lI109|H3BE90C
-3BE90C:lI112|H3BE9F8
-3BE9F8:lI101|H3BEAE4
-3BEAE4:lI103|N
-3BE264:lI109|H3BE344
-3BE344:lI112|H3BE438
-3BE438:lI103|N
-3BE19C:lH3BE274|H3BE280
-3BE274:t2:H3BE354,H3BE35C
-3BE35C:lI118|H3BE450
-3BE450:lI105|H3BE544
-3BE544:lI100|H3BE640
-3BE640:lI101|H3BE744
-3BE744:lI111|H3BE830
-3BE830:lI47|H3BE914
-3BE914:lI109|H3BEA00
-3BEA00:lI112|H3BEAEC
-3BEAEC:lI101|H3BEBD0
-3BEBD0:lI103|N
-3BE354:lI109|H3BE448
-3BE448:lI112|H3BE53C
-3BE53C:lI101|N
-3BE280:lH3BE364|H3BE370
-3BE364:t2:H3BE458,H3BE460
-3BE460:lI116|H3BE554
-3BE554:lI101|H3BE650
-3BE650:lI120|H3BE754
-3BE754:lI116|H3BE838
-3BE838:lI47|H3BE91C
-3BE91C:lI120|H3BEA08
-3BEA08:lI45|H3BEAF4
-3BEAF4:lI115|H3BEBD8
-3BEBD8:lI103|H3BECB4
-3BECB4:lI109|H3BED90
-3BED90:lI108|N
-3BE458:lI115|H3BE54C
-3BE54C:lI103|H3BE648
-3BE648:lI109|H3BE74C
-3BE74C:lI108|N
-3BE370:lH3BE468|H3BE474
-3BE468:t2:H3BE55C,H3BE564
-3BE564:lI116|H3BE660
-3BE660:lI101|H3BE764
-3BE764:lI120|H3BE840
-3BE840:lI116|H3BE924
-3BE924:lI47|H3BEA10
-3BEA10:lI120|H3BEAFC
-3BEAFC:lI45|H3BEBE0
-3BEBE0:lI115|H3BECBC
-3BECBC:lI103|H3BED98
-3BED98:lI109|H3BEE74
-3BEE74:lI108|N
-3BE55C:lI115|H3BE658
-3BE658:lI103|H3BE75C
-3BE75C:lI109|N
-3BE474:lH3BE56C|H3BE578
-3BE56C:t2:H3BE668,H3BE670
-3BE670:lI116|H3BE774
-3BE774:lI101|H3BE850
-3BE850:lI120|H3BE92C
-3BE92C:lI116|H3BEA18
-3BEA18:lI47|H3BEB04
-3BEB04:lI120|H3BEBE8
-3BEBE8:lI45|H3BECC4
-3BECC4:lI115|H3BEDA0
-3BEDA0:lI101|H3BEE7C
-3BEE7C:lI116|H3BEF48
-3BEF48:lI101|H3BF014
-3BF014:lI120|H3BF0E0
-3BF0E0:lI116|N
-3BE668:lI101|H3BE76C
-3BE76C:lI116|H3BE848
-3BE848:lI120|N
-3BE578:lH3BE678|H3BE684
-3BE678:t2:H3BE77C,H3BE784
-3BE784:lI116|H3BE860
-3BE860:lI101|H3BE93C
-3BE93C:lI120|H3BEA20
-3BEA20:lI116|H3BEB0C
-3BEB0C:lI47|H3BEBF0
-3BEBF0:lI116|H3BECCC
-3BECCC:lI97|H3BEDA8
-3BEDA8:lI98|H3BEE84
-3BEE84:lI45|H3BEF50
-3BEF50:lI115|H3BF01C
-3BF01C:lI101|H3BF0E8
-3BF0E8:lI112|H3BF1AC
-3BF1AC:lI97|H3BF270
-3BF270:lI114|H3BF324
-3BF324:lI97|H3BF3D0
-3BF3D0:lI116|H3BF484
-3BF484:lI101|H3BF540
-3BF540:lI100|H3BF604
-3BF604:lI45|H3BF6D8
-3BF6D8:lI118|H3BF7AC
-3BF7AC:lI97|H3BF880
-3BF880:lI108|H3BF964
-3BF964:lI117|H3BFA40
-3BFA40:lI101|H3BFB14
-3BFB14:lI115|N
-3BE77C:lI116|H3BE858
-3BE858:lI115|H3BE934
-3BE934:lI118|N
-3BE684:lH3BE78C|H3BE798
-3BE78C:t2:H3BE868,H3BE870
-3BE870:lI116|H3BE94C
-3BE94C:lI101|H3BEA30
-3BEA30:lI120|H3BEB14
-3BEB14:lI116|H3BEBF8
-3BEBF8:lI47|H3BECD4
-3BECD4:lI114|H3BEDB0
-3BEDB0:lI105|H3BEE8C
-3BEE8C:lI99|H3BEF58
-3BEF58:lI104|H3BF024
-3BF024:lI116|H3BF0F0
-3BF0F0:lI101|H3BF1B4
-3BF1B4:lI120|H3BF278
-3BF278:lI116|N
-3BE868:lI114|H3BE944
-3BE944:lI116|H3BEA28
-3BEA28:lI120|N
-3BE798:lH3BE878|H3BE884
-3BE878:t2:H3BE954,H3BE95C
-3BE95C:lI116|H3BEA40
-3BEA40:lI101|H3BEB24
-3BEB24:lI120|H3BEC00
-3BEC00:lI116|H3BECDC
-3BECDC:lI47|H3BEDB8
-3BEDB8:lI112|H3BEE94
-3BEE94:lI108|H3BEF60
-3BEF60:lI97|H3BF02C
-3BF02C:lI105|H3BF0F8
-3BF0F8:lI110|N
-3BE954:lI116|H3BEA38
-3BEA38:lI120|H3BEB1C
-3BEB1C:lI116|N
-3BE884:lH3BE964|H3BE970
-3BE964:t2:H3BEA48,H3BEA50
-3BEA50:lI116|H3BEB34
-3BEB34:lI101|H3BEC10
-3BEC10:lI120|H3BECEC
-3BECEC:lI116|H3BEDC8
-3BEDC8:lI47|H3BEE9C
-3BEE9C:lI120|H3BEF68
-3BEF68:lI45|H3BF034
-3BF034:lI115|H3BF100
-3BF100:lI101|H3BF1BC
-3BF1BC:lI114|H3BF280
-3BF280:lI118|H3BF32C
-3BF32C:lI101|H3BF3D8
-3BF3D8:lI114|H3BF48C
-3BF48C:lI45|H3BF548
-3BF548:lI112|H3BF60C
-3BF60C:lI97|H3BF6E0
-3BF6E0:lI114|H3BF7B4
-3BF7B4:lI115|H3BF888
-3BF888:lI101|H3BF96C
-3BF96C:lI100|H3BFA48
-3BFA48:lI45|H3BFB1C
-3BFB1C:lI104|H3BFBF0
-3BFBF0:lI116|H3BFCBC
-3BFCBC:lI109|H3BFD80
-3BFD80:lI108|N
-3BEA48:lI115|H3BEB2C
-3BEB2C:lI104|H3BEC08
-3BEC08:lI116|H3BECE4
-3BECE4:lI109|H3BEDC0
-3BEDC0:lI108|N
-3BE970:lH3BEA58|H3BEA64
-3BEA58:t2:H3BEB3C,H3BEB44
-3BEB44:lI116|H3BEC20
-3BEC20:lI101|H3BECFC
-3BECFC:lI120|H3BEDD8
-3BEDD8:lI116|H3BEEA4
-3BEEA4:lI47|H3BEF70
-3BEF70:lI104|H3BF03C
-3BF03C:lI116|H3BF108
-3BF108:lI109|H3BF1C4
-3BF1C4:lI108|N
-3BEB3C:lI104|H3BEC18
-3BEC18:lI116|H3BECF4
-3BECF4:lI109|H3BEDD0
-3BEDD0:lI108|N
-3BEA64:lH3BEB4C|H3BEB58
-3BEB4C:t2:H3BEC28,H3BEC30
-3BEC30:lI116|H3BED0C
-3BED0C:lI101|H3BEDE8
-3BEDE8:lI120|H3BEEAC
-3BEEAC:lI116|H3BEF78
-3BEF78:lI47|H3BF044
-3BF044:lI104|H3BF110
-3BF110:lI116|H3BF1CC
-3BF1CC:lI109|H3BF288
-3BF288:lI108|N
-3BEC28:lI104|H3BED04
-3BED04:lI116|H3BEDE0
-3BEDE0:lI109|N
-3BEB58:lH3BEC38|H3BEC44
-3BEC38:t2:H3BED14,H3BED1C
-3BED1C:lI105|H3BEDF8
-3BEDF8:lI109|H3BEEBC
-3BEEBC:lI97|H3BEF80
-3BEF80:lI103|H3BF04C
-3BF04C:lI101|H3BF118
-3BF118:lI47|H3BF1D4
-3BF1D4:lI120|H3BF290
-3BF290:lI45|H3BF334
-3BF334:lI120|H3BF3E0
-3BF3E0:lI119|H3BF494
-3BF494:lI105|H3BF550
-3BF550:lI110|H3BF614
-3BF614:lI100|H3BF6E8
-3BF6E8:lI111|H3BF7BC
-3BF7BC:lI119|H3BF890
-3BF890:lI100|H3BF974
-3BF974:lI117|H3BFA50
-3BFA50:lI109|H3BFB24
-3BFB24:lI112|N
-3BED14:lI120|H3BEDF0
-3BEDF0:lI119|H3BEEB4
-3BEEB4:lI100|N
-3BEC44:lH3BED24|H3BED30
-3BED24:t2:H3BEE00,H3BEE08
-3BEE08:lI105|H3BEECC
-3BEECC:lI109|H3BEF90
-3BEF90:lI97|H3BF054
-3BF054:lI103|H3BF120
-3BF120:lI101|H3BF1DC
-3BF1DC:lI47|H3BF298
-3BF298:lI120|H3BF33C
-3BF33C:lI45|H3BF3E8
-3BF3E8:lI120|H3BF49C
-3BF49C:lI112|H3BF558
-3BF558:lI105|H3BF61C
-3BF61C:lI120|H3BF6F0
-3BF6F0:lI109|H3BF7C4
-3BF7C4:lI97|H3BF898
-3BF898:lI112|N
-3BEE00:lI120|H3BEEC4
-3BEEC4:lI112|H3BEF88
-3BEF88:lI109|N
-3BED30:lH3BEE10|H3BEE1C
-3BEE10:t2:H3BEED4,H3BEEDC
-3BEEDC:lI105|H3BEFA0
-3BEFA0:lI109|H3BF064
-3BF064:lI97|H3BF128
-3BF128:lI103|H3BF1E4
-3BF1E4:lI101|H3BF2A0
-3BF2A0:lI47|H3BF344
-3BF344:lI120|H3BF3F0
-3BF3F0:lI45|H3BF4A4
-3BF4A4:lI120|H3BF560
-3BF560:lI98|H3BF624
-3BF624:lI105|H3BF6F8
-3BF6F8:lI116|H3BF7CC
-3BF7CC:lI109|H3BF8A0
-3BF8A0:lI97|H3BF97C
-3BF97C:lI112|N
-3BEED4:lI120|H3BEF98
-3BEF98:lI98|H3BF05C
-3BF05C:lI109|N
-3BEE1C:lH3BEEE4|H3BEEF0
-3BEEE4:t2:H3BEFA8,H3BEFB0
-3BEFB0:lI105|H3BF074
-3BF074:lI109|H3BF138
-3BF138:lI97|H3BF1EC
-3BF1EC:lI103|H3BF2A8
-3BF2A8:lI101|H3BF34C
-3BF34C:lI47|H3BF3F8
-3BF3F8:lI120|H3BF4AC
-3BF4AC:lI45|H3BF568
-3BF568:lI114|H3BF62C
-3BF62C:lI103|H3BF700
-3BF700:lI98|N
-3BEFA8:lI114|H3BF06C
-3BF06C:lI103|H3BF130
-3BF130:lI98|N
-3BEEF0:lH3BEFB8|H3BEFC4
-3BEFB8:t2:H3BF07C,H3BF084
-3BF084:lI105|H3BF148
-3BF148:lI109|H3BF1FC
-3BF1FC:lI97|H3BF2B0
-3BF2B0:lI103|H3BF354
-3BF354:lI101|H3BF400
-3BF400:lI47|H3BF4B4
-3BF4B4:lI120|H3BF570
-3BF570:lI45|H3BF634
-3BF634:lI112|H3BF708
-3BF708:lI111|H3BF7D4
-3BF7D4:lI114|H3BF8A8
-3BF8A8:lI116|H3BF984
-3BF984:lI97|H3BFA58
-3BFA58:lI98|H3BFB2C
-3BFB2C:lI108|H3BFBF8
-3BFBF8:lI101|H3BFCC4
-3BFCC4:lI45|H3BFD88
-3BFD88:lI112|H3BFE44
-3BFE44:lI105|H3BFEF0
-3BFEF0:lI120|H3BFFA4
-3BFFA4:lI109|H3C0050
-3C0050:lI97|H3C00FC
-3C00FC:lI112|N
-3BF07C:lI112|H3BF140
-3BF140:lI112|H3BF1F4
-3BF1F4:lI109|N
-3BEFC4:lH3BF08C|H3BF098
-3BF08C:t2:H3BF150,H3BF158
-3BF158:lI105|H3BF20C
-3BF20C:lI109|H3BF2C0
-3BF2C0:lI97|H3BF35C
-3BF35C:lI103|H3BF408
-3BF408:lI101|H3BF4BC
-3BF4BC:lI47|H3BF578
-3BF578:lI120|H3BF63C
-3BF63C:lI45|H3BF710
-3BF710:lI112|H3BF7DC
-3BF7DC:lI111|H3BF8B0
-3BF8B0:lI114|H3BF98C
-3BF98C:lI116|H3BFA60
-3BFA60:lI97|H3BFB34
-3BFB34:lI98|H3BFC00
-3BFC00:lI108|H3BFCCC
-3BFCCC:lI101|H3BFD90
-3BFD90:lI45|H3BFE4C
-3BFE4C:lI103|H3BFEF8
-3BFEF8:lI114|H3BFFAC
-3BFFAC:lI97|H3C0058
-3C0058:lI121|H3C0104
-3C0104:lI109|H3C01A8
-3C01A8:lI97|H3C025C
-3C025C:lI112|N
-3BF150:lI112|H3BF204
-3BF204:lI103|H3BF2B8
-3BF2B8:lI109|N
-3BF098:lH3BF160|H3BF16C
-3BF160:t2:H3BF214,H3BF21C
-3BF21C:lI105|H3BF2D0
-3BF2D0:lI109|H3BF36C
-3BF36C:lI97|H3BF410
-3BF410:lI103|H3BF4C4
-3BF4C4:lI101|H3BF580
-3BF580:lI47|H3BF644
-3BF644:lI120|H3BF718
-3BF718:lI45|H3BF7E4
-3BF7E4:lI112|H3BF8B8
-3BF8B8:lI111|H3BF994
-3BF994:lI114|H3BFA68
-3BFA68:lI116|H3BFB3C
-3BFB3C:lI97|H3BFC08
-3BFC08:lI98|H3BFCD4
-3BFCD4:lI108|H3BFD98
-3BFD98:lI101|H3BFE54
-3BFE54:lI45|H3BFF00
-3BFF00:lI98|H3BFFB4
-3BFFB4:lI105|H3C0060
-3C0060:lI116|H3C010C
-3C010C:lI109|H3C01B0
-3C01B0:lI97|H3C0264
-3C0264:lI112|N
-3BF214:lI112|H3BF2C8
-3BF2C8:lI98|H3BF364
-3BF364:lI109|N
-3BF16C:lH3BF224|H3BF230
-3BF224:t2:H3BF2D8,H3BF2E0
-3BF2E0:lI105|H3BF37C
-3BF37C:lI109|H3BF420
-3BF420:lI97|H3BF4CC
-3BF4CC:lI103|H3BF588
-3BF588:lI101|H3BF64C
-3BF64C:lI47|H3BF720
-3BF720:lI120|H3BF7EC
-3BF7EC:lI45|H3BF8C0
-3BF8C0:lI112|H3BF99C
-3BF99C:lI111|H3BFA70
-3BFA70:lI114|H3BFB44
-3BFB44:lI116|H3BFC10
-3BFC10:lI97|H3BFCDC
-3BFCDC:lI98|H3BFDA0
-3BFDA0:lI108|H3BFE5C
-3BFE5C:lI101|H3BFF08
-3BFF08:lI45|H3BFFBC
-3BFFBC:lI97|H3C0068
-3C0068:lI110|H3C0114
-3C0114:lI121|H3C01B8
-3C01B8:lI109|H3C026C
-3C026C:lI97|H3C0318
-3C0318:lI112|N
-3BF2D8:lI112|H3BF374
-3BF374:lI110|H3BF418
-3BF418:lI109|N
-3BF230:lH3BF2E8|H3BF2F4
-3BF2E8:t2:H3BF384,H3BF38C
-3BF38C:lI105|H3BF430
-3BF430:lI109|H3BF4DC
-3BF4DC:lI97|H3BF590
-3BF590:lI103|H3BF654
-3BF654:lI101|H3BF728
-3BF728:lI47|H3BF7F4
-3BF7F4:lI120|H3BF8C8
-3BF8C8:lI45|H3BF9A4
-3BF9A4:lI99|H3BFA78
-3BFA78:lI109|H3BFB4C
-3BFB4C:lI117|H3BFC18
-3BFC18:lI45|H3BFCE4
-3BFCE4:lI114|H3BFDA8
-3BFDA8:lI97|H3BFE64
-3BFE64:lI115|H3BFF10
-3BFF10:lI116|H3BFFC4
-3BFFC4:lI101|H3C0070
-3C0070:lI114|N
-3BF384:lI114|H3BF428
-3BF428:lI97|H3BF4D4
-3BF4D4:lI115|N
-3BF2F4:lH3BF394|H3BF3A0
-3BF394:t2:H3BF438,H3BF440
-3BF440:lI105|H3BF4EC
-3BF4EC:lI109|H3BF5A0
-3BF5A0:lI97|H3BF664
-3BF664:lI103|H3BF730
-3BF730:lI101|H3BF7FC
-3BF7FC:lI47|H3BF8D0
-3BF8D0:lI116|H3BF9AC
-3BF9AC:lI105|H3BFA80
-3BFA80:lI102|H3BFB54
-3BFB54:lI102|N
-3BF438:lI116|H3BF4E4
-3BF4E4:lI105|H3BF598
-3BF598:lI102|H3BF65C
-3BF65C:lI102|N
-3BF3A0:lH3BF448|H3BF454
-3BF448:t2:H3BF4F4,H3BF4FC
-3BF4FC:lI105|H3BF5B0
-3BF5B0:lI109|H3BF674
-3BF674:lI97|H3BF738
-3BF738:lI103|H3BF804
-3BF804:lI101|H3BF8D8
-3BF8D8:lI47|H3BF9B4
-3BF9B4:lI116|H3BFA88
-3BFA88:lI105|H3BFB5C
-3BFB5C:lI102|H3BFC20
-3BFC20:lI102|N
-3BF4F4:lI116|H3BF5A8
-3BF5A8:lI105|H3BF66C
-3BF66C:lI102|N
-3BF454:lH3BF504|H3BF510
-3BF504:t2:H3BF5B8,H3BF5C0
-3BF5C0:lI105|H3BF684
-3BF684:lI109|H3BF748
-3BF748:lI97|H3BF80C
-3BF80C:lI103|H3BF8E0
-3BF8E0:lI101|H3BF9BC
-3BF9BC:lI47|H3BFA90
-3BFA90:lI112|H3BFB64
-3BFB64:lI110|H3BFC28
-3BFC28:lI103|N
-3BF5B8:lI112|H3BF67C
-3BF67C:lI110|H3BF740
-3BF740:lI103|N
-3BF510:lH3BF5C8|H3BF5D4
-3BF5C8:t2:H3BF68C,H3BF694
-3BF694:lI105|H3BF758
-3BF758:lI109|H3BF81C
-3BF81C:lI97|H3BF8F0
-3BF8F0:lI103|H3BF9C4
-3BF9C4:lI101|H3BFA98
-3BFA98:lI47|H3BFB6C
-3BFB6C:lI106|H3BFC30
-3BFC30:lI112|H3BFCEC
-3BFCEC:lI101|H3BFDB0
-3BFDB0:lI103|N
-3BF68C:lI106|H3BF750
-3BF750:lI112|H3BF814
-3BF814:lI101|H3BF8E8
-3BF8E8:lI103|N
-3BF5D4:lH3BF69C|H3BF6A8
-3BF69C:t2:H3BF760,H3BF768
-3BF768:lI105|H3BF82C
-3BF82C:lI109|H3BF900
-3BF900:lI97|H3BF9CC
-3BF9CC:lI103|H3BFAA0
-3BFAA0:lI101|H3BFB74
-3BFB74:lI47|H3BFC38
-3BFC38:lI106|H3BFCF4
-3BFCF4:lI112|H3BFDB8
-3BFDB8:lI101|H3BFE6C
-3BFE6C:lI103|N
-3BF760:lI106|H3BF824
-3BF824:lI112|H3BF8F8
-3BF8F8:lI103|N
-3BF6A8:lH3BF770|H3BF77C
-3BF770:t2:H3BF834,H3BF83C
-3BF83C:lI105|H3BF910
-3BF910:lI109|H3BF9DC
-3BF9DC:lI97|H3BFAA8
-3BFAA8:lI103|H3BFB7C
-3BFB7C:lI101|H3BFC40
-3BFC40:lI47|H3BFCFC
-3BFCFC:lI106|H3BFDC0
-3BFDC0:lI112|H3BFE74
-3BFE74:lI101|H3BFF18
-3BFF18:lI103|N
-3BF834:lI106|H3BF908
-3BF908:lI112|H3BF9D4
-3BF9D4:lI101|N
-3BF77C:lH3BF844|H3BF850
-3BF844:t2:H3BF918,H3BF920
-3BF920:lI105|H3BF9EC
-3BF9EC:lI109|H3BFAB8
-3BFAB8:lI97|H3BFB84
-3BFB84:lI103|H3BFC48
-3BFC48:lI101|H3BFD04
-3BFD04:lI47|H3BFDC8
-3BFDC8:lI105|H3BFE7C
-3BFE7C:lI101|H3BFF20
-3BFF20:lI102|N
-3BF918:lI105|H3BF9E4
-3BF9E4:lI101|H3BFAB0
-3BFAB0:lI102|N
-3BF850:lH3BF928|H3BF934
-3BF928:t2:H3BF9F4,H3BF9FC
-3BF9FC:lI105|H3BFAC8
-3BFAC8:lI109|H3BFB94
-3BFB94:lI97|H3BFC50
-3BFC50:lI103|H3BFD0C
-3BFD0C:lI101|H3BFDD0
-3BFDD0:lI47|H3BFE84
-3BFE84:lI103|H3BFF28
-3BFF28:lI105|H3BFFCC
-3BFFCC:lI102|N
-3BF9F4:lI103|H3BFAC0
-3BFAC0:lI105|H3BFB8C
-3BFB8C:lI102|N
-3BF934:lH3BFA04|H3BFA10
-3BFA04:t2:H3BFAD0,H3BFAD8
-3BFAD8:lI99|H3BFBA4
-3BFBA4:lI104|H3BFC60
-3BFC60:lI101|H3BFD14
-3BFD14:lI109|H3BFDD8
-3BFDD8:lI105|H3BFE8C
-3BFE8C:lI99|H3BFF30
-3BFF30:lI97|H3BFFD4
-3BFFD4:lI108|H3C0078
-3C0078:lI47|H3C011C
-3C011C:lI120|H3C01C0
-3C01C0:lI45|H3C0274
-3C0274:lI112|H3C0320
-3C0320:lI100|H3C03CC
-3C03CC:lI98|N
-3BFAD0:lI112|H3BFB9C
-3BFB9C:lI100|H3BFC58
-3BFC58:lI98|N
-3BFA10:lH3BFAE0|H3BFAEC
-3BFAE0:t2:H3BFBAC,H3BFBB4
-3BFBB4:lI99|H3BFC70
-3BFC70:lI104|H3BFD24
-3BFD24:lI101|H3BFDE0
-3BFDE0:lI109|H3BFE94
-3BFE94:lI105|H3BFF38
-3BFF38:lI99|H3BFFDC
-3BFFDC:lI97|H3C0080
-3C0080:lI108|H3C0124
-3C0124:lI47|H3C01C8
-3C01C8:lI120|H3C027C
-3C027C:lI45|H3C0328
-3C0328:lI112|H3C03D4
-3C03D4:lI100|H3C0460
-3C0460:lI98|N
-3BFBAC:lI120|H3BFC68
-3BFC68:lI121|H3BFD1C
-3BFD1C:lI122|N
-3BFAEC:lH3BFBBC|H3BFBC8
-3BFBBC:t2:H3BFC78,H3BFC80
-3BFC80:lI97|H3BFD34
-3BFD34:lI117|H3BFDF0
-3BFDF0:lI100|H3BFE9C
-3BFE9C:lI105|H3BFF40
-3BFF40:lI111|H3BFFE4
-3BFFE4:lI47|H3C0088
-3C0088:lI120|H3C012C
-3C012C:lI45|H3C01D0
-3C01D0:lI119|H3C0284
-3C0284:lI97|H3C0330
-3C0330:lI118|N
-3BFC78:lI119|H3BFD2C
-3BFD2C:lI97|H3BFDE8
-3BFDE8:lI118|N
-3BFBC8:lH3BFC88|H3BFC94
-3BFC88:t2:H3BFD3C,H3BFD44
-3BFD44:lI97|H3BFE00
-3BFE00:lI117|H3BFEA4
-3BFEA4:lI100|H3BFF48
-3BFF48:lI105|H3BFFEC
-3BFFEC:lI111|H3C0090
-3C0090:lI47|H3C0134
-3C0134:lI120|H3C01D8
-3C01D8:lI45|H3C028C
-3C028C:lI114|H3C0338
-3C0338:lI101|H3C03DC
-3C03DC:lI97|H3C0468
-3C0468:lI108|H3C04FC
-3C04FC:lI97|H3C0598
-3C0598:lI117|H3C063C
-3C063C:lI100|H3C06E8
-3C06E8:lI105|H3C0794
-3C0794:lI111|N
-3BFD3C:lI114|H3BFDF8
-3BFDF8:lI97|N
-3BFC94:lH3BFD4C|H3BFD58
-3BFD4C:t2:H3BFE08,H3BFE10
-3BFE10:lI97|H3BFEB4
-3BFEB4:lI117|H3BFF58
-3BFF58:lI100|H3BFFF4
-3BFFF4:lI105|H3C0098
-3C0098:lI111|H3C013C
-3C013C:lI47|H3C01E0
-3C01E0:lI120|H3C0294
-3C0294:lI45|H3C0340
-3C0340:lI112|H3C03E4
-3C03E4:lI110|H3C0470
-3C0470:lI45|H3C0504
-3C0504:lI114|H3C05A0
-3C05A0:lI101|H3C0644
-3C0644:lI97|H3C06F0
-3C06F0:lI108|H3C079C
-3C079C:lI97|H3C0838
-3C0838:lI117|H3C08C4
-3C08C4:lI100|H3C0958
-3C0958:lI105|H3C09EC
-3C09EC:lI111|H3C0A88
-3C0A88:lI45|H3C0B2C
-3C0B2C:lI112|H3C0BD0
-3C0BD0:lI108|H3C0C84
-3C0C84:lI117|H3C0D38
-3C0D38:lI103|H3C0DEC
-3C0DEC:lI105|H3C0EA0
-3C0EA0:lI110|N
-3BFE08:lI114|H3BFEAC
-3BFEAC:lI112|H3BFF50
-3BFF50:lI109|N
-3BFD58:lH3BFE18|H3BFE24
-3BFE18:t2:H3BFEBC,H3BFEC4
-3BFEC4:lI97|H3BFF68
-3BFF68:lI117|H3C0004
-3C0004:lI100|H3C00A0
-3C00A0:lI105|H3C0144
-3C0144:lI111|H3C01E8
-3C01E8:lI47|H3C029C
-3C029C:lI120|H3C0348
-3C0348:lI45|H3C03EC
-3C03EC:lI112|H3C0478
-3C0478:lI110|H3C050C
-3C050C:lI45|H3C05A8
-3C05A8:lI114|H3C064C
-3C064C:lI101|H3C06F8
-3C06F8:lI97|H3C07A4
-3C07A4:lI108|H3C0840
-3C0840:lI97|H3C08CC
-3C08CC:lI117|H3C0960
-3C0960:lI100|H3C09F4
-3C09F4:lI105|H3C0A90
-3C0A90:lI111|N
-3BFEBC:lI114|H3BFF60
-3BFF60:lI97|H3BFFFC
-3BFFFC:lI109|N
-3BFE24:lH3BFECC|H3BFED8
-3BFECC:t2:H3BFF70,H3BFF78
-3BFF78:lI97|H3C0014
-3C0014:lI117|H3C00B0
-3C00B0:lI100|H3C014C
-3C014C:lI105|H3C01F0
-3C01F0:lI111|H3C02A4
-3C02A4:lI47|H3C0350
-3C0350:lI120|H3C03F4
-3C03F4:lI45|H3C0480
-3C0480:lI97|H3C0514
-3C0514:lI105|H3C05B0
-3C05B0:lI102|H3C0654
-3C0654:lI102|N
-3BFF70:lI97|H3C000C
-3C000C:lI105|H3C00A8
-3C00A8:lI102|N
-3BFED8:lH3BFF80|H3BFF8C
-3BFF80:t2:H3C001C,H3C0024
-3C0024:lI97|H3C00C0
-3C00C0:lI117|H3C015C
-3C015C:lI100|H3C0200
-3C0200:lI105|H3C02AC
-3C02AC:lI111|H3C0358
-3C0358:lI47|H3C03FC
-3C03FC:lI120|H3C0488
-3C0488:lI45|H3C051C
-3C051C:lI97|H3C05B8
-3C05B8:lI105|H3C065C
-3C065C:lI102|H3C0700
-3C0700:lI102|N
-3C001C:lI97|H3C00B8
-3C00B8:lI105|H3C0154
-3C0154:lI102|H3C01F8
-3C01F8:lI102|N
-3BFF8C:lH3C002C|H3C0038
-3C002C:t2:H3C00C8,H3C00D0
-3C00D0:lI97|H3C016C
-3C016C:lI117|H3C0210
-3C0210:lI100|H3C02BC
-3C02BC:lI105|H3C0360
-3C0360:lI111|H3C0404
-3C0404:lI47|H3C0490
-3C0490:lI120|H3C0524
-3C0524:lI45|H3C05C0
-3C05C0:lI97|H3C0664
-3C0664:lI105|H3C0708
-3C0708:lI102|H3C07AC
-3C07AC:lI102|N
-3C00C8:lI97|H3C0164
-3C0164:lI105|H3C0208
-3C0208:lI102|H3C02B4
-3C02B4:lI99|N
-3C0038:lH3C00D8|H3C00E4
-3C00D8:t2:H3C0174,H3C017C
-3C017C:lI97|H3C0220
-3C0220:lI117|H3C02CC
-3C02CC:lI100|H3C0370
-3C0370:lI105|H3C040C
-3C040C:lI111|H3C0498
-3C0498:lI47|H3C052C
-3C052C:lI109|H3C05C8
-3C05C8:lI112|H3C066C
-3C066C:lI101|H3C0710
-3C0710:lI103|N
-3C0174:lI109|H3C0218
-3C0218:lI112|H3C02C4
-3C02C4:lI103|H3C0368
-3C0368:lI97|N
-3C00E4:lH3C0184|H3C0190
-3C0184:t2:H3C0228,H3C0230
-3C0230:lI97|H3C02DC
-3C02DC:lI117|H3C0380
-3C0380:lI100|H3C0414
-3C0414:lI105|H3C04A0
-3C04A0:lI111|H3C0534
-3C0534:lI47|H3C05D0
-3C05D0:lI109|H3C0674
-3C0674:lI112|H3C0718
-3C0718:lI101|H3C07B4
-3C07B4:lI103|N
-3C0228:lI109|H3C02D4
-3C02D4:lI112|H3C0378
-3C0378:lI50|N
-3C0190:lH3C0238|H3C0244
-3C0238:t2:H3C02E4,H3C02EC
-3C02EC:lI97|H3C0390
-3C0390:lI117|H3C041C
-3C041C:lI100|H3C04A8
-3C04A8:lI105|H3C053C
-3C053C:lI111|H3C05D8
-3C05D8:lI47|H3C067C
-3C067C:lI98|H3C0720
-3C0720:lI97|H3C07BC
-3C07BC:lI115|H3C0848
-3C0848:lI105|H3C08D4
-3C08D4:lI99|N
-3C02E4:lI97|H3C0388
-3C0388:lI117|N
-3C0244:lH3C02F4|H3C0300
-3C02F4:t2:H3C0398,H3C03A0
-3C03A0:lI97|H3C042C
-3C042C:lI117|H3C04B8
-3C04B8:lI100|H3C0544
-3C0544:lI105|H3C05E0
-3C05E0:lI111|H3C0684
-3C0684:lI47|H3C0728
-3C0728:lI98|H3C07C4
-3C07C4:lI97|H3C0850
-3C0850:lI115|H3C08DC
-3C08DC:lI105|H3C0968
-3C0968:lI99|N
-3C0398:lI115|H3C0424
-3C0424:lI110|H3C04B0
-3C04B0:lI100|N
-3C0300:lH3C03A8|H3C03B4
-3C03A8:t2:H3C0434,H3C043C
-3C043C:lI97|H3C04C8
-3C04C8:lI112|H3C0554
-3C0554:lI112|H3C05E8
-3C05E8:lI108|H3C068C
-3C068C:lI105|H3C0730
-3C0730:lI99|H3C07CC
-3C07CC:lI97|H3C0858
-3C0858:lI116|H3C08E4
-3C08E4:lI105|H3C0970
-3C0970:lI111|H3C09FC
-3C09FC:lI110|H3C0A98
-3C0A98:lI47|H3C0B34
-3C0B34:lI122|H3C0BD8
-3C0BD8:lI105|H3C0C8C
-3C0C8C:lI112|N
-3C0434:lI122|H3C04C0
-3C04C0:lI105|H3C054C
-3C054C:lI112|N
-3C03B4:lH3C0444|H3C0450
-3C0444:t2:H3C04D0,H3C04D8
-3C04D8:lI97|H3C0564
-3C0564:lI112|H3C05F8
-3C05F8:lI112|H3C0694
-3C0694:lI108|H3C0738
-3C0738:lI105|H3C07D4
-3C07D4:lI99|H3C0860
-3C0860:lI97|H3C08EC
-3C08EC:lI116|H3C0978
-3C0978:lI105|H3C0A04
-3C0A04:lI111|H3C0AA0
-3C0AA0:lI110|H3C0B3C
-3C0B3C:lI47|H3C0BE0
-3C0BE0:lI120|H3C0C94
-3C0C94:lI45|H3C0D40
-3C0D40:lI119|H3C0DF4
-3C0DF4:lI97|H3C0EA8
-3C0EA8:lI105|H3C0F64
-3C0F64:lI115|H3C1030
-3C1030:lI45|H3C1104
-3C1104:lI115|H3C11D8
-3C11D8:lI111|H3C12A4
-3C12A4:lI117|H3C1378
-3C1378:lI114|H3C1454
-3C1454:lI99|H3C1538
-3C1538:lI101|N
-3C04D0:lI115|H3C055C
-3C055C:lI114|H3C05F0
-3C05F0:lI99|N
-3C0450:lH3C04E0|H3C04EC
-3C04E0:t2:H3C056C,H3C0574
-3C0574:lI97|H3C0608
-3C0608:lI112|H3C06A4
-3C06A4:lI112|H3C0748
-3C0748:lI108|H3C07E4
-3C07E4:lI105|H3C0868
-3C0868:lI99|H3C08F4
-3C08F4:lI97|H3C0980
-3C0980:lI116|H3C0A0C
-3C0A0C:lI105|H3C0AA8
-3C0AA8:lI111|H3C0B44
-3C0B44:lI110|H3C0BE8
-3C0BE8:lI47|H3C0C9C
-3C0C9C:lI120|H3C0D48
-3C0D48:lI45|H3C0DFC
-3C0DFC:lI117|H3C0EB0
-3C0EB0:lI115|H3C0F6C
-3C0F6C:lI116|H3C1038
-3C1038:lI97|H3C110C
-3C110C:lI114|N
-3C056C:lI117|H3C0600
-3C0600:lI115|H3C069C
-3C069C:lI116|H3C0740
-3C0740:lI97|H3C07DC
-3C07DC:lI114|N
-3C04EC:lH3C057C|H3C0588
-3C057C:t2:H3C0610,H3C0618
-3C0618:lI97|H3C06B4
-3C06B4:lI112|H3C0750
-3C0750:lI112|H3C07EC
-3C07EC:lI108|H3C0870
-3C0870:lI105|H3C08FC
-3C08FC:lI99|H3C0988
-3C0988:lI97|H3C0A14
-3C0A14:lI116|H3C0AB0
-3C0AB0:lI105|H3C0B4C
-3C0B4C:lI111|H3C0BF0
-3C0BF0:lI110|H3C0CA4
-3C0CA4:lI47|H3C0D50
-3C0D50:lI120|H3C0E04
-3C0E04:lI45|H3C0EB8
-3C0EB8:lI116|H3C0F74
-3C0F74:lI114|H3C1040
-3C1040:lI111|H3C1114
-3C1114:lI102|H3C11E0
-3C11E0:lI102|H3C12AC
-3C12AC:lI45|H3C1380
-3C1380:lI109|H3C145C
-3C145C:lI115|N
-3C0610:lI109|H3C06AC
-3C06AC:lI115|N
-3C0588:lH3C0620|H3C062C
-3C0620:t2:H3C06BC,H3C06C4
-3C06C4:lI97|H3C0760
-3C0760:lI112|H3C07F4
-3C07F4:lI112|H3C0878
-3C0878:lI108|H3C0904
-3C0904:lI105|H3C0990
-3C0990:lI99|H3C0A1C
-3C0A1C:lI97|H3C0AB8
-3C0AB8:lI116|H3C0B54
-3C0B54:lI105|H3C0BF8
-3C0BF8:lI111|H3C0CAC
-3C0CAC:lI110|H3C0D58
-3C0D58:lI47|H3C0E0C
-3C0E0C:lI120|H3C0EC0
-3C0EC0:lI45|H3C0F7C
-3C0F7C:lI116|H3C1048
-3C1048:lI114|H3C111C
-3C111C:lI111|H3C11E8
-3C11E8:lI102|H3C12B4
-3C12B4:lI102|H3C1388
-3C1388:lI45|H3C1464
-3C1464:lI109|H3C1540
-3C1540:lI101|N
-3C06BC:lI109|H3C0758
-3C0758:lI101|N
-3C062C:lH3C06CC|H3C06D8
-3C06CC:t2:H3C0768,H3C0770
-3C0770:lI97|H3C0804
-3C0804:lI112|H3C0888
-3C0888:lI112|H3C090C
-3C090C:lI108|H3C0998
-3C0998:lI105|H3C0A24
-3C0A24:lI99|H3C0AC0
-3C0AC0:lI97|H3C0B5C
-3C0B5C:lI116|H3C0C00
-3C0C00:lI105|H3C0CB4
-3C0CB4:lI111|H3C0D60
-3C0D60:lI110|H3C0E14
-3C0E14:lI47|H3C0EC8
-3C0EC8:lI120|H3C0F84
-3C0F84:lI45|H3C1050
-3C1050:lI116|H3C1124
-3C1124:lI114|H3C11F0
-3C11F0:lI111|H3C12BC
-3C12BC:lI102|H3C1390
-3C1390:lI102|H3C146C
-3C146C:lI45|H3C1548
-3C1548:lI109|H3C161C
-3C161C:lI97|H3C16F0
-3C16F0:lI110|N
-3C0768:lI109|H3C07FC
-3C07FC:lI97|H3C0880
-3C0880:lI110|N
-3C06D8:lH3C0778|H3C0784
-3C0778:t2:H3C080C,H3C0814
-3C0814:lI97|H3C0890
-3C0890:lI112|H3C0914
-3C0914:lI112|H3C09A0
-3C09A0:lI108|H3C0A2C
-3C0A2C:lI105|H3C0AC8
-3C0AC8:lI99|H3C0B64
-3C0B64:lI97|H3C0C08
-3C0C08:lI116|H3C0CBC
-3C0CBC:lI105|H3C0D68
-3C0D68:lI111|H3C0E1C
-3C0E1C:lI110|H3C0ED0
-3C0ED0:lI47|H3C0F8C
-3C0F8C:lI120|H3C1058
-3C1058:lI45|H3C112C
-3C112C:lI116|H3C11F8
-3C11F8:lI114|H3C12C4
-3C12C4:lI111|H3C1398
-3C1398:lI102|H3C1474
-3C1474:lI102|N
-3C080C:lI116|N
-3C0784:lH3C081C|H3C0828
-3C081C:t2:H3C0898,H3C08A0
-3C08A0:lI97|H3C0924
-3C0924:lI112|H3C09A8
-3C09A8:lI112|H3C0A34
-3C0A34:lI108|H3C0AD0
-3C0AD0:lI105|H3C0B6C
-3C0B6C:lI99|H3C0C10
-3C0C10:lI97|H3C0CC4
-3C0CC4:lI116|H3C0D70
-3C0D70:lI105|H3C0E24
-3C0E24:lI111|H3C0ED8
-3C0ED8:lI110|H3C0F94
-3C0F94:lI47|H3C1060
-3C1060:lI120|H3C1134
-3C1134:lI45|H3C1200
-3C1200:lI116|H3C12CC
-3C12CC:lI114|H3C13A0
-3C13A0:lI111|H3C147C
-3C147C:lI102|H3C1550
-3C1550:lI102|N
-3C0898:lI116|H3C091C
-3C091C:lI114|N
-3C0828:lH3C08A8|H3C08B4
-3C08A8:t2:H3C092C,H3C0934
-3C0934:lI97|H3C09B8
-3C09B8:lI112|H3C0A44
-3C0A44:lI112|H3C0AE0
-3C0AE0:lI108|H3C0B74
-3C0B74:lI105|H3C0C18
-3C0C18:lI99|H3C0CCC
-3C0CCC:lI97|H3C0D78
-3C0D78:lI116|H3C0E2C
-3C0E2C:lI105|H3C0EE0
-3C0EE0:lI111|H3C0F9C
-3C0F9C:lI110|H3C1068
-3C1068:lI47|H3C113C
-3C113C:lI120|H3C1208
-3C1208:lI45|H3C12D4
-3C12D4:lI116|H3C13A8
-3C13A8:lI114|H3C1484
-3C1484:lI111|H3C1558
-3C1558:lI102|H3C1624
-3C1624:lI102|N
-3C092C:lI114|H3C09B0
-3C09B0:lI111|H3C0A3C
-3C0A3C:lI102|H3C0AD8
-3C0AD8:lI102|N
-3C08B4:lH3C093C|H3C0948
-3C093C:t2:H3C09C0,H3C09C8
-3C09C8:lI97|H3C0A54
-3C0A54:lI112|H3C0AF0
-3C0AF0:lI112|H3C0B84
-3C0B84:lI108|H3C0C28
-3C0C28:lI105|H3C0CDC
-3C0CDC:lI99|H3C0D88
-3C0D88:lI97|H3C0E34
-3C0E34:lI116|H3C0EE8
-3C0EE8:lI105|H3C0FA4
-3C0FA4:lI111|H3C1070
-3C1070:lI110|H3C1144
-3C1144:lI47|H3C1210
-3C1210:lI120|H3C12DC
-3C12DC:lI45|H3C13B0
-3C13B0:lI116|H3C148C
-3C148C:lI101|H3C1560
-3C1560:lI120|H3C162C
-3C162C:lI105|H3C16F8
-3C16F8:lI110|H3C17BC
-3C17BC:lI102|H3C1880
-3C1880:lI111|N
-3C09C0:lI116|H3C0A4C
-3C0A4C:lI101|H3C0AE8
-3C0AE8:lI120|H3C0B7C
-3C0B7C:lI105|H3C0C20
-3C0C20:lI110|H3C0CD4
-3C0CD4:lI102|H3C0D80
-3C0D80:lI111|N
-3C0948:lH3C09D0|H3C09DC
-3C09D0:t2:H3C0A5C,H3C0A64
-3C0A64:lI97|H3C0B00
-3C0B00:lI112|H3C0B94
-3C0B94:lI112|H3C0C38
-3C0C38:lI108|H3C0CE4
-3C0CE4:lI105|H3C0D90
-3C0D90:lI99|H3C0E3C
-3C0E3C:lI97|H3C0EF0
-3C0EF0:lI116|H3C0FAC
-3C0FAC:lI105|H3C1078
-3C1078:lI111|H3C114C
-3C114C:lI110|H3C1218
-3C1218:lI47|H3C12E4
-3C12E4:lI120|H3C13B8
-3C13B8:lI45|H3C1494
-3C1494:lI116|H3C1568
-3C1568:lI101|H3C1634
-3C1634:lI120|H3C1700
-3C1700:lI105|H3C17C4
-3C17C4:lI110|H3C1888
-3C1888:lI102|H3C1944
-3C1944:lI111|N
-3C0A5C:lI116|H3C0AF8
-3C0AF8:lI101|H3C0B8C
-3C0B8C:lI120|H3C0C30
-3C0C30:lI105|N
-3C09DC:lH3C0A6C|H3C0A78
-3C0A6C:t2:H3C0B08,H3C0B10
-3C0B10:lI97|H3C0BA4
-3C0BA4:lI112|H3C0C48
-3C0C48:lI112|H3C0CEC
-3C0CEC:lI108|H3C0D98
-3C0D98:lI105|H3C0E44
-3C0E44:lI99|H3C0EF8
-3C0EF8:lI97|H3C0FB4
-3C0FB4:lI116|H3C1080
-3C1080:lI105|H3C1154
-3C1154:lI111|H3C1220
-3C1220:lI110|H3C12EC
-3C12EC:lI47|H3C13C0
-3C13C0:lI120|H3C149C
-3C149C:lI45|H3C1570
-3C1570:lI116|H3C163C
-3C163C:lI101|H3C1708
-3C1708:lI120|N
-3C0B08:lI116|H3C0B9C
-3C0B9C:lI101|H3C0C40
-3C0C40:lI120|N
-3C0A78:lH3C0B18|H3C0B24
-3C0B18:t2:H3C0BAC,H3C0BB4
-3C0BB4:lI97|H3C0C58
-3C0C58:lI112|H3C0CFC
-3C0CFC:lI112|H3C0DA0
-3C0DA0:lI108|H3C0E4C
-3C0E4C:lI105|H3C0F00
-3C0F00:lI99|H3C0FBC
-3C0FBC:lI97|H3C1088
-3C1088:lI116|H3C115C
-3C115C:lI105|H3C1228
-3C1228:lI111|H3C12F4
-3C12F4:lI110|H3C13C8
-3C13C8:lI47|H3C14A4
-3C14A4:lI120|H3C1578
-3C1578:lI45|H3C1644
-3C1644:lI116|H3C1710
-3C1710:lI99|H3C17CC
-3C17CC:lI108|N
-3C0BAC:lI116|H3C0C50
-3C0C50:lI99|H3C0CF4
-3C0CF4:lI108|N
-3C0B24:lH3C0BBC|H3C0BC8
-3C0BBC:t2:H3C0C60,H3C0C68
-3C0C68:lI97|H3C0D0C
-3C0D0C:lI112|H3C0DB0
-3C0DB0:lI112|H3C0E54
-3C0E54:lI108|H3C0F08
-3C0F08:lI105|H3C0FC4
-3C0FC4:lI99|H3C1090
-3C1090:lI97|H3C1164
-3C1164:lI116|H3C1230
-3C1230:lI105|H3C12FC
-3C12FC:lI111|H3C13D0
-3C13D0:lI110|H3C14AC
-3C14AC:lI47|H3C1580
-3C1580:lI120|H3C164C
-3C164C:lI45|H3C1718
-3C1718:lI116|H3C17D4
-3C17D4:lI97|H3C1890
-3C1890:lI114|N
-3C0C60:lI116|H3C0D04
-3C0D04:lI97|H3C0DA8
-3C0DA8:lI114|N
-3C0BC8:lH3C0C70|H3C0C7C
-3C0C70:t2:H3C0D14,H3C0D1C
-3C0D1C:lI97|H3C0DC0
-3C0DC0:lI112|H3C0E64
-3C0E64:lI112|H3C0F18
-3C0F18:lI108|H3C0FD4
-3C0FD4:lI105|H3C10A0
-3C10A0:lI99|H3C116C
-3C116C:lI97|H3C1238
-3C1238:lI116|H3C1304
-3C1304:lI105|H3C13D8
-3C13D8:lI111|H3C14B4
-3C14B4:lI110|H3C1588
-3C1588:lI47|H3C1654
-3C1654:lI120|H3C1720
-3C1720:lI45|H3C17DC
-3C17DC:lI115|H3C1898
-3C1898:lI118|H3C194C
-3C194C:lI52|H3C1A00
-3C1A00:lI99|H3C1AB4
-3C1AB4:lI114|H3C1B78
-3C1B78:lI99|N
-3C0D14:lI115|H3C0DB8
-3C0DB8:lI118|H3C0E5C
-3C0E5C:lI52|H3C0F10
-3C0F10:lI99|H3C0FCC
-3C0FCC:lI114|H3C1098
-3C1098:lI99|N
-3C0C7C:lH3C0D24|H3C0D30
-3C0D24:t2:H3C0DC8,H3C0DD0
-3C0DD0:lI97|H3C0E74
-3C0E74:lI112|H3C0F28
-3C0F28:lI112|H3C0FE4
-3C0FE4:lI108|H3C10B0
-3C10B0:lI105|H3C117C
-3C117C:lI99|H3C1248
-3C1248:lI97|H3C130C
-3C130C:lI116|H3C13E0
-3C13E0:lI105|H3C14BC
-3C14BC:lI111|H3C1590
-3C1590:lI110|H3C165C
-3C165C:lI47|H3C1728
-3C1728:lI120|H3C17E4
-3C17E4:lI45|H3C18A0
-3C18A0:lI115|H3C1954
-3C1954:lI118|H3C1A08
-3C1A08:lI52|H3C1ABC
-3C1ABC:lI99|H3C1B80
-3C1B80:lI112|H3C1C4C
-3C1C4C:lI105|H3C1D10
-3C1D10:lI111|N
-3C0DC8:lI115|H3C0E6C
-3C0E6C:lI118|H3C0F20
-3C0F20:lI52|H3C0FDC
-3C0FDC:lI99|H3C10A8
-3C10A8:lI112|H3C1174
-3C1174:lI105|H3C1240
-3C1240:lI111|N
-3C0D30:lH3C0DD8|H3C0DE4
-3C0DD8:t2:H3C0E7C,H3C0E84
-3C0E84:lI97|H3C0F38
-3C0F38:lI112|H3C0FF4
-3C0FF4:lI112|H3C10B8
-3C10B8:lI108|H3C1184
-3C1184:lI105|H3C1250
-3C1250:lI99|H3C1314
-3C1314:lI97|H3C13E8
-3C13E8:lI116|H3C14C4
-3C14C4:lI105|H3C1598
-3C1598:lI111|H3C1664
-3C1664:lI110|H3C1730
-3C1730:lI47|H3C17EC
-3C17EC:lI120|H3C18A8
-3C18A8:lI45|H3C195C
-3C195C:lI115|H3C1A10
-3C1A10:lI116|H3C1AC4
-3C1AC4:lI117|H3C1B88
-3C1B88:lI102|H3C1C54
-3C1C54:lI102|H3C1D18
-3C1D18:lI105|H3C1DD4
-3C1DD4:lI116|N
-3C0E7C:lI115|H3C0F30
-3C0F30:lI105|H3C0FEC
-3C0FEC:lI116|N
-3C0DE4:lH3C0E8C|H3C0E98
-3C0E8C:t2:H3C0F40,H3C0F48
-3C0F48:lI97|H3C1004
-3C1004:lI112|H3C10C8
-3C10C8:lI112|H3C1194
-3C1194:lI108|H3C1258
-3C1258:lI105|H3C131C
-3C131C:lI99|H3C13F0
-3C13F0:lI97|H3C14CC
-3C14CC:lI116|H3C15A0
-3C15A0:lI105|H3C166C
-3C166C:lI111|H3C1738
-3C1738:lI110|H3C17F4
-3C17F4:lI47|H3C18B0
-3C18B0:lI120|H3C1964
-3C1964:lI45|H3C1A18
-3C1A18:lI115|H3C1ACC
-3C1ACC:lI104|H3C1B90
-3C1B90:lI97|H3C1C5C
-3C1C5C:lI114|N
-3C0F40:lI115|H3C0FFC
-3C0FFC:lI104|H3C10C0
-3C10C0:lI97|H3C118C
-3C118C:lI114|N
-3C0E98:lH3C0F50|H3C0F5C
-3C0F50:t2:H3C100C,H3C1014
-3C1014:lI97|H3C10D8
-3C10D8:lI112|H3C119C
-3C119C:lI112|H3C1260
-3C1260:lI108|H3C1324
-3C1324:lI105|H3C13F8
-3C13F8:lI99|H3C14D4
-3C14D4:lI97|H3C15A8
-3C15A8:lI116|H3C1674
-3C1674:lI105|H3C1740
-3C1740:lI111|H3C17FC
-3C17FC:lI110|H3C18B8
-3C18B8:lI47|H3C196C
-3C196C:lI120|H3C1A20
-3C1A20:lI45|H3C1AD4
-3C1AD4:lI115|H3C1B98
-3C1B98:lI104|N
-3C100C:lI115|H3C10D0
-3C10D0:lI104|N
-3C0F5C:lH3C101C|H3C1028
-3C101C:t2:H3C10E0,H3C10E8
-3C10E8:lI97|H3C11AC
-3C11AC:lI112|H3C1268
-3C1268:lI112|H3C132C
-3C132C:lI108|H3C1400
-3C1400:lI105|H3C14DC
-3C14DC:lI99|H3C15B0
-3C15B0:lI97|H3C167C
-3C167C:lI116|H3C1748
-3C1748:lI105|H3C1804
-3C1804:lI111|H3C18C0
-3C18C0:lI110|H3C1974
-3C1974:lI47|H3C1A28
-3C1A28:lI120|H3C1ADC
-3C1ADC:lI45|H3C1BA0
-3C1BA0:lI110|H3C1C64
-3C1C64:lI101|H3C1D20
-3C1D20:lI116|H3C1DDC
-3C1DDC:lI99|H3C1E98
-3C1E98:lI100|H3C1F5C
-3C1F5C:lI102|N
-3C10E0:lI110|H3C11A4
-3C11A4:lI99|N
-3C1028:lH3C10F0|H3C10FC
-3C10F0:t2:H3C11B4,H3C11BC
-3C11BC:lI97|H3C1278
-3C1278:lI112|H3C133C
-3C133C:lI112|H3C1408
-3C1408:lI108|H3C14E4
-3C14E4:lI105|H3C15B8
-3C15B8:lI99|H3C1684
-3C1684:lI97|H3C1750
-3C1750:lI116|H3C180C
-3C180C:lI105|H3C18C8
-3C18C8:lI111|H3C197C
-3C197C:lI110|H3C1A30
-3C1A30:lI47|H3C1AE4
-3C1AE4:lI120|H3C1BA8
-3C1BA8:lI45|H3C1C6C
-3C1C6C:lI110|H3C1D28
-3C1D28:lI101|H3C1DE4
-3C1DE4:lI116|H3C1EA0
-3C1EA0:lI99|H3C1F64
-3C1F64:lI100|H3C2018
-3C2018:lI102|N
-3C11B4:lI99|H3C1270
-3C1270:lI100|H3C1334
-3C1334:lI102|N
-3C10FC:lH3C11C4|H3C11D0
-3C11C4:t2:H3C1280,H3C1288
-3C1288:lI97|H3C134C
-3C134C:lI112|H3C1418
-3C1418:lI112|H3C14EC
-3C14EC:lI108|H3C15C0
-3C15C0:lI105|H3C168C
-3C168C:lI99|H3C1758
-3C1758:lI97|H3C1814
-3C1814:lI116|H3C18D0
-3C18D0:lI105|H3C1984
-3C1984:lI111|H3C1A38
-3C1A38:lI110|H3C1AEC
-3C1AEC:lI47|H3C1BB0
-3C1BB0:lI120|H3C1C74
-3C1C74:lI45|H3C1D30
-3C1D30:lI109|H3C1DEC
-3C1DEC:lI105|H3C1EA8
-3C1EA8:lI102|N
-3C1280:lI109|H3C1344
-3C1344:lI105|H3C1410
-3C1410:lI102|N
-3C11D0:lH3C1290|H3C129C
-3C1290:t2:H3C1354,H3C135C
-3C135C:lI97|H3C1428
-3C1428:lI112|H3C14FC
-3C14FC:lI112|H3C15D0
-3C15D0:lI108|H3C169C
-3C169C:lI105|H3C1760
-3C1760:lI99|H3C181C
-3C181C:lI97|H3C18D8
-3C18D8:lI116|H3C198C
-3C198C:lI105|H3C1A40
-3C1A40:lI111|H3C1AF4
-3C1AF4:lI110|H3C1BB8
-3C1BB8:lI47|H3C1C7C
-3C1C7C:lI120|H3C1D38
-3C1D38:lI45|H3C1DF4
-3C1DF4:lI108|H3C1EB0
-3C1EB0:lI97|H3C1F6C
-3C1F6C:lI116|H3C2020
-3C2020:lI101|H3C20DC
-3C20DC:lI120|N
-3C1354:lI108|H3C1420
-3C1420:lI97|H3C14F4
-3C14F4:lI116|H3C15C8
-3C15C8:lI101|H3C1694
-3C1694:lI120|N
-3C129C:lH3C1364|H3C1370
-3C1364:t2:H3C1430,H3C1438
-3C1438:lI97|H3C150C
-3C150C:lI112|H3C15E0
-3C15E0:lI112|H3C16A4
-3C16A4:lI108|H3C1768
-3C1768:lI105|H3C1824
-3C1824:lI99|H3C18E0
-3C18E0:lI97|H3C1994
-3C1994:lI116|H3C1A48
-3C1A48:lI105|H3C1AFC
-3C1AFC:lI111|H3C1BC0
-3C1BC0:lI110|H3C1C84
-3C1C84:lI47|H3C1D40
-3C1D40:lI120|H3C1DFC
-3C1DFC:lI45|H3C1EB8
-3C1EB8:lI107|H3C1F74
-3C1F74:lI111|H3C2028
-3C2028:lI97|H3C20E4
-3C20E4:lI110|N
-3C1430:lI115|H3C1504
-3C1504:lI107|H3C15D8
-3C15D8:lI112|N
-3C1370:lH3C1440|H3C144C
-3C1440:t2:H3C1514,H3C151C
-3C151C:lI97|H3C15F0
-3C15F0:lI112|H3C16B4
-3C16B4:lI112|H3C1770
-3C1770:lI108|H3C182C
-3C182C:lI105|H3C18E8
-3C18E8:lI99|H3C199C
-3C199C:lI97|H3C1A50
-3C1A50:lI116|H3C1B04
-3C1B04:lI105|H3C1BC8
-3C1BC8:lI111|H3C1C8C
-3C1C8C:lI110|H3C1D48
-3C1D48:lI47|H3C1E04
-3C1E04:lI120|H3C1EC0
-3C1EC0:lI45|H3C1F7C
-3C1F7C:lI107|H3C2030
-3C2030:lI111|H3C20EC
-3C20EC:lI97|H3C21A0
-3C21A0:lI110|N
-3C1514:lI115|H3C15E8
-3C15E8:lI107|H3C16AC
-3C16AC:lI100|N
-3C144C:lH3C1524|H3C1530
-3C1524:t2:H3C15F8,H3C1600
-3C1600:lI97|H3C16C4
-3C16C4:lI112|H3C1780
-3C1780:lI112|H3C1834
-3C1834:lI108|H3C18F0
-3C18F0:lI105|H3C19A4
-3C19A4:lI99|H3C1A58
-3C1A58:lI97|H3C1B0C
-3C1B0C:lI116|H3C1BD0
-3C1BD0:lI105|H3C1C94
-3C1C94:lI111|H3C1D50
-3C1D50:lI110|H3C1E0C
-3C1E0C:lI47|H3C1EC8
-3C1EC8:lI120|H3C1F84
-3C1F84:lI45|H3C2038
-3C2038:lI107|H3C20F4
-3C20F4:lI111|H3C21A8
-3C21A8:lI97|H3C225C
-3C225C:lI110|N
-3C15F8:lI115|H3C16BC
-3C16BC:lI107|H3C1778
-3C1778:lI116|N
-3C1530:lH3C1608|H3C1614
-3C1608:t2:H3C16CC,H3C16D4
-3C16D4:lI97|H3C1790
-3C1790:lI112|H3C1844
-3C1844:lI112|H3C18F8
-3C18F8:lI108|H3C19AC
-3C19AC:lI105|H3C1A60
-3C1A60:lI99|H3C1B14
-3C1B14:lI97|H3C1BD8
-3C1BD8:lI116|H3C1C9C
-3C1C9C:lI105|H3C1D58
-3C1D58:lI111|H3C1E14
-3C1E14:lI110|H3C1ED0
-3C1ED0:lI47|H3C1F8C
-3C1F8C:lI120|H3C2040
-3C2040:lI45|H3C20FC
-3C20FC:lI107|H3C21B0
-3C21B0:lI111|H3C2264
-3C2264:lI97|H3C2320
-3C2320:lI110|N
-3C16CC:lI115|H3C1788
-3C1788:lI107|H3C183C
-3C183C:lI109|N
-3C1614:lH3C16DC|H3C16E8
-3C16DC:t2:H3C1798,H3C17A0
-3C17A0:lI97|H3C1854
-3C1854:lI112|H3C1908
-3C1908:lI112|H3C19B4
-3C19B4:lI108|H3C1A68
-3C1A68:lI105|H3C1B1C
-3C1B1C:lI99|H3C1BE0
-3C1BE0:lI97|H3C1CA4
-3C1CA4:lI116|H3C1D60
-3C1D60:lI105|H3C1E1C
-3C1E1C:lI111|H3C1ED8
-3C1ED8:lI110|H3C1F94
-3C1F94:lI47|H3C2048
-3C2048:lI120|H3C2104
-3C2104:lI45|H3C21B8
-3C21B8:lI104|H3C226C
-3C226C:lI116|H3C2328
-3C2328:lI116|H3C23E4
-3C23E4:lI112|H3C2498
-3C2498:lI100|H3C2554
-3C2554:lI45|H3C2610
-3C2610:lI99|H3C26D4
-3C26D4:lI103|H3C2790
-3C2790:lI105|N
-3C1798:lI99|H3C184C
-3C184C:lI103|H3C1900
-3C1900:lI105|N
-3C16E8:lH3C17A8|H3C17B4
-3C17A8:t2:H3C185C,H3C1864
-3C1864:lI97|H3C1918
-3C1918:lI112|H3C19C4
-3C19C4:lI112|H3C1A70
-3C1A70:lI108|H3C1B24
-3C1B24:lI105|H3C1BE8
-3C1BE8:lI99|H3C1CAC
-3C1CAC:lI97|H3C1D68
-3C1D68:lI116|H3C1E24
-3C1E24:lI105|H3C1EE0
-3C1EE0:lI111|H3C1F9C
-3C1F9C:lI110|H3C2050
-3C2050:lI47|H3C210C
-3C210C:lI120|H3C21C0
-3C21C0:lI45|H3C2274
-3C2274:lI104|H3C2330
-3C2330:lI100|H3C23EC
-3C23EC:lI102|N
-3C185C:lI104|H3C1910
-3C1910:lI100|H3C19BC
-3C19BC:lI102|N
-3C17B4:lH3C186C|H3C1878
-3C186C:t2:H3C1920,H3C1928
-3C1928:lI97|H3C19D4
-3C19D4:lI112|H3C1A78
-3C1A78:lI112|H3C1B2C
-3C1B2C:lI108|H3C1BF0
-3C1BF0:lI105|H3C1CB4
-3C1CB4:lI99|H3C1D70
-3C1D70:lI97|H3C1E2C
-3C1E2C:lI116|H3C1EE8
-3C1EE8:lI105|H3C1FA4
-3C1FA4:lI111|H3C2058
-3C2058:lI110|H3C2114
-3C2114:lI47|H3C21C8
-3C21C8:lI120|H3C227C
-3C227C:lI45|H3C2338
-3C2338:lI103|H3C23F4
-3C23F4:lI122|H3C24A0
-3C24A0:lI105|H3C255C
-3C255C:lI112|N
-3C1920:lI103|H3C19CC
-3C19CC:lI122|N
-3C1878:lH3C1930|H3C193C
-3C1930:t2:H3C19DC,H3C19E4
-3C19E4:lI97|H3C1A88
-3C1A88:lI112|H3C1B3C
-3C1B3C:lI112|H3C1C00
-3C1C00:lI108|H3C1CBC
-3C1CBC:lI105|H3C1D78
-3C1D78:lI99|H3C1E34
-3C1E34:lI97|H3C1EF0
-3C1EF0:lI116|H3C1FAC
-3C1FAC:lI105|H3C2060
-3C2060:lI111|H3C211C
-3C211C:lI110|H3C21D0
-3C21D0:lI47|H3C2284
-3C2284:lI120|H3C2340
-3C2340:lI45|H3C23FC
-3C23FC:lI103|H3C24A8
-3C24A8:lI116|H3C2564
-3C2564:lI97|H3C2618
-3C2618:lI114|N
-3C19DC:lI103|H3C1A80
-3C1A80:lI116|H3C1B34
-3C1B34:lI97|H3C1BF8
-3C1BF8:lI114|N
-3C193C:lH3C19EC|H3C19F8
-3C19EC:t2:H3C1A90,H3C1A98
-3C1A98:lI97|H3C1B4C
-3C1B4C:lI112|H3C1C10
-3C1C10:lI112|H3C1CC4
-3C1CC4:lI108|H3C1D80
-3C1D80:lI105|H3C1E3C
-3C1E3C:lI99|H3C1EF8
-3C1EF8:lI97|H3C1FB4
-3C1FB4:lI116|H3C2068
-3C2068:lI105|H3C2124
-3C2124:lI111|H3C21D8
-3C21D8:lI110|H3C228C
-3C228C:lI47|H3C2348
-3C2348:lI120|H3C2404
-3C2404:lI45|H3C24B0
-3C24B0:lI100|H3C256C
-3C256C:lI118|H3C2620
-3C2620:lI105|N
-3C1A90:lI100|H3C1B44
-3C1B44:lI118|H3C1C08
-3C1C08:lI105|N
-3C19F8:lH3C1AA0|H3C1AAC
-3C1AA0:t2:H3C1B54,H3C1B5C
-3C1B5C:lI97|H3C1C20
-3C1C20:lI112|H3C1CD4
-3C1CD4:lI112|H3C1D88
-3C1D88:lI108|H3C1E44
-3C1E44:lI105|H3C1F00
-3C1F00:lI99|H3C1FBC
-3C1FBC:lI97|H3C2070
-3C2070:lI116|H3C212C
-3C212C:lI105|H3C21E0
-3C21E0:lI111|H3C2294
-3C2294:lI110|H3C2350
-3C2350:lI47|H3C240C
-3C240C:lI120|H3C24B8
-3C24B8:lI45|H3C2574
-3C2574:lI100|H3C2628
-3C2628:lI105|H3C26DC
-3C26DC:lI114|H3C2798
-3C2798:lI101|H3C2854
-3C2854:lI99|H3C2918
-3C2918:lI116|H3C29E4
-3C29E4:lI111|H3C2AB0
-3C2AB0:lI114|N
-3C1B54:lI100|H3C1C18
-3C1C18:lI99|H3C1CCC
-3C1CCC:lI114|N
-3C1AAC:lH3C1B64|H3C1B70
-3C1B64:t2:H3C1C28,H3C1C30
-3C1C30:lI97|H3C1CE4
-3C1CE4:lI112|H3C1D98
-3C1D98:lI112|H3C1E4C
-3C1E4C:lI108|H3C1F08
-3C1F08:lI105|H3C1FC4
-3C1FC4:lI99|H3C2078
-3C2078:lI97|H3C2134
-3C2134:lI116|H3C21E8
-3C21E8:lI105|H3C229C
-3C229C:lI111|H3C2358
-3C2358:lI110|H3C2414
-3C2414:lI47|H3C24C0
-3C24C0:lI120|H3C257C
-3C257C:lI45|H3C2630
-3C2630:lI100|H3C26E4
-3C26E4:lI105|H3C27A0
-3C27A0:lI114|H3C285C
-3C285C:lI101|H3C2920
-3C2920:lI99|H3C29EC
-3C29EC:lI116|H3C2AB8
-3C2AB8:lI111|H3C2B84
-3C2B84:lI114|N
-3C1C28:lI100|H3C1CDC
-3C1CDC:lI105|H3C1D90
-3C1D90:lI114|N
-3C1B70:lH3C1C38|H3C1C44
-3C1C38:t2:H3C1CEC,H3C1CF4
-3C1CF4:lI97|H3C1DA8
-3C1DA8:lI112|H3C1E5C
-3C1E5C:lI112|H3C1F10
-3C1F10:lI108|H3C1FCC
-3C1FCC:lI105|H3C2080
-3C2080:lI99|H3C213C
-3C213C:lI97|H3C21F0
-3C21F0:lI116|H3C22A4
-3C22A4:lI105|H3C2360
-3C2360:lI111|H3C241C
-3C241C:lI110|H3C24C8
-3C24C8:lI47|H3C2584
-3C2584:lI120|H3C2638
-3C2638:lI45|H3C26EC
-3C26EC:lI100|H3C27A8
-3C27A8:lI105|H3C2864
-3C2864:lI114|H3C2928
-3C2928:lI101|H3C29F4
-3C29F4:lI99|H3C2AC0
-3C2AC0:lI116|H3C2B8C
-3C2B8C:lI111|H3C2C48
-3C2C48:lI114|N
-3C1CEC:lI100|H3C1DA0
-3C1DA0:lI120|H3C1E54
-3C1E54:lI114|N
-3C1C44:lH3C1CFC|H3C1D08
-3C1CFC:t2:H3C1DB0,H3C1DB8
-3C1DB8:lI97|H3C1E6C
-3C1E6C:lI112|H3C1F20
-3C1F20:lI112|H3C1FD4
-3C1FD4:lI108|H3C2088
-3C2088:lI105|H3C2144
-3C2144:lI99|H3C21F8
-3C21F8:lI97|H3C22AC
-3C22AC:lI116|H3C2368
-3C2368:lI105|H3C2424
-3C2424:lI111|H3C24D0
-3C24D0:lI110|H3C258C
-3C258C:lI47|H3C2640
-3C2640:lI120|H3C26F4
-3C26F4:lI45|H3C27B0
-3C27B0:lI99|H3C286C
-3C286C:lI115|H3C2930
-3C2930:lI104|N
-3C1DB0:lI99|H3C1E64
-3C1E64:lI115|H3C1F18
-3C1F18:lI104|N
-3C1D08:lH3C1DC0|H3C1DCC
-3C1DC0:t2:H3C1E74,H3C1E7C
-3C1E7C:lI97|H3C1F30
-3C1F30:lI112|H3C1FE4
-3C1FE4:lI112|H3C2098
-3C2098:lI108|H3C214C
-3C214C:lI105|H3C2200
-3C2200:lI99|H3C22B4
-3C22B4:lI97|H3C2370
-3C2370:lI116|H3C242C
-3C242C:lI105|H3C24D8
-3C24D8:lI111|H3C2594
-3C2594:lI110|H3C2648
-3C2648:lI47|H3C26FC
-3C26FC:lI120|H3C27B8
-3C27B8:lI45|H3C2874
-3C2874:lI99|H3C2938
-3C2938:lI112|H3C29FC
-3C29FC:lI105|H3C2AC8
-3C2AC8:lI111|N
-3C1E74:lI99|H3C1F28
-3C1F28:lI112|H3C1FDC
-3C1FDC:lI105|H3C2090
-3C2090:lI111|N
-3C1DCC:lH3C1E84|H3C1E90
-3C1E84:t2:H3C1F38,H3C1F40
-3C1F40:lI97|H3C1FEC
-3C1FEC:lI112|H3C20A0
-3C20A0:lI112|H3C2154
-3C2154:lI108|H3C2208
-3C2208:lI105|H3C22BC
-3C22BC:lI99|H3C2378
-3C2378:lI97|H3C2434
-3C2434:lI116|H3C24E0
-3C24E0:lI105|H3C259C
-3C259C:lI111|H3C2650
-3C2650:lI110|H3C2704
-3C2704:lI47|H3C27C0
-3C27C0:lI120|H3C287C
-3C287C:lI45|H3C2940
-3C2940:lI99|H3C2A04
-3C2A04:lI111|H3C2AD0
-3C2AD0:lI109|H3C2B94
-3C2B94:lI112|H3C2C50
-3C2C50:lI114|H3C2D00
-3C2D00:lI101|H3C2DA8
-3C2DA8:lI115|H3C2E40
-3C2E40:lI115|N
-3C1F38:lI90|N
-3C1E90:lH3C1F48|H3C1F54
-3C1F48:t2:H3C1FF4,H3C1FFC
-3C1FFC:lI97|H3C20B0
-3C20B0:lI112|H3C2164
-3C2164:lI112|H3C2210
-3C2210:lI108|H3C22C4
-3C22C4:lI105|H3C2380
-3C2380:lI99|H3C243C
-3C243C:lI97|H3C24E8
-3C24E8:lI116|H3C25A4
-3C25A4:lI105|H3C2658
-3C2658:lI111|H3C270C
-3C270C:lI110|H3C27C8
-3C27C8:lI47|H3C2884
-3C2884:lI120|H3C2948
-3C2948:lI45|H3C2A0C
-3C2A0C:lI99|H3C2AD8
-3C2AD8:lI100|H3C2B9C
-3C2B9C:lI108|H3C2C58
-3C2C58:lI105|H3C2D08
-3C2D08:lI110|H3C2DB0
-3C2DB0:lI107|N
-3C1FF4:lI118|H3C20A8
-3C20A8:lI99|H3C215C
-3C215C:lI100|N
-3C1F54:lH3C2004|H3C2010
-3C2004:t2:H3C20B8,H3C20C0
-3C20C0:lI97|H3C2174
-3C2174:lI112|H3C2220
-3C2220:lI112|H3C22D4
-3C22D4:lI108|H3C2390
-3C2390:lI105|H3C2444
-3C2444:lI99|H3C24F0
-3C24F0:lI97|H3C25AC
-3C25AC:lI116|H3C2660
-3C2660:lI105|H3C2714
-3C2714:lI111|H3C27D0
-3C27D0:lI110|H3C288C
-3C288C:lI47|H3C2950
-3C2950:lI120|H3C2A14
-3C2A14:lI45|H3C2AE0
-3C2AE0:lI98|H3C2BA4
-3C2BA4:lI99|H3C2C60
-3C2C60:lI112|H3C2D10
-3C2D10:lI105|H3C2DB8
-3C2DB8:lI111|N
-3C20B8:lI98|H3C216C
-3C216C:lI99|H3C2218
-3C2218:lI112|H3C22CC
-3C22CC:lI105|H3C2388
-3C2388:lI111|N
-3C2010:lH3C20C8|H3C20D4
-3C20C8:t2:H3C217C,H3C2184
-3C2184:lI97|H3C2230
-3C2230:lI112|H3C22E4
-3C22E4:lI112|H3C2398
-3C2398:lI108|H3C244C
-3C244C:lI105|H3C24F8
-3C24F8:lI99|H3C25B4
-3C25B4:lI97|H3C2668
-3C2668:lI116|H3C271C
-3C271C:lI105|H3C27D8
-3C27D8:lI111|H3C2894
-3C2894:lI110|H3C2958
-3C2958:lI47|H3C2A1C
-3C2A1C:lI114|H3C2AE8
-3C2AE8:lI116|H3C2BAC
-3C2BAC:lI102|N
-3C217C:lI114|H3C2228
-3C2228:lI116|H3C22DC
-3C22DC:lI102|N
-3C20D4:lH3C218C|H3C2198
-3C218C:t2:H3C2238,H3C2240
-3C2240:lI97|H3C22F4
-3C22F4:lI112|H3C23A8
-3C23A8:lI112|H3C2454
-3C2454:lI108|H3C2500
-3C2500:lI105|H3C25BC
-3C25BC:lI99|H3C2670
-3C2670:lI97|H3C2724
-3C2724:lI116|H3C27E0
-3C27E0:lI105|H3C289C
-3C289C:lI111|H3C2960
-3C2960:lI110|H3C2A24
-3C2A24:lI47|H3C2AF0
-3C2AF0:lI112|H3C2BB4
-3C2BB4:lI111|H3C2C68
-3C2C68:lI119|H3C2D18
-3C2D18:lI101|H3C2DC0
-3C2DC0:lI114|H3C2E48
-3C2E48:lI112|H3C2EC0
-3C2EC0:lI111|H3C2F38
-3C2F38:lI105|H3C2FA8
-3C2FA8:lI110|H3C3010
-3C3010:lI116|N
-3C2238:lI112|H3C22EC
-3C22EC:lI112|H3C23A0
-3C23A0:lI116|N
-3C2198:lH3C2248|H3C2254
-3C2248:t2:H3C22FC,H3C2304
-3C2304:lI97|H3C23B8
-3C23B8:lI112|H3C245C
-3C245C:lI112|H3C2508
-3C2508:lI108|H3C25C4
-3C25C4:lI105|H3C2678
-3C2678:lI99|H3C272C
-3C272C:lI97|H3C27E8
-3C27E8:lI116|H3C28A4
-3C28A4:lI105|H3C2968
-3C2968:lI111|H3C2A2C
-3C2A2C:lI110|H3C2AF8
-3C2AF8:lI47|H3C2BBC
-3C2BBC:lI112|H3C2C70
-3C2C70:lI111|H3C2D20
-3C2D20:lI115|H3C2DC8
-3C2DC8:lI116|H3C2E50
-3C2E50:lI115|H3C2EC8
-3C2EC8:lI99|H3C2F40
-3C2F40:lI114|H3C2FB0
-3C2FB0:lI105|H3C3018
-3C3018:lI112|H3C3078
-3C3078:lI116|N
-3C22FC:lI97|H3C23B0
-3C23B0:lI105|N
-3C2254:lH3C230C|H3C2318
-3C230C:t2:H3C23C0,H3C23C8
-3C23C8:lI97|H3C246C
-3C246C:lI112|H3C2518
-3C2518:lI112|H3C25CC
-3C25CC:lI108|H3C2680
-3C2680:lI105|H3C2734
-3C2734:lI99|H3C27F0
-3C27F0:lI97|H3C28AC
-3C28AC:lI116|H3C2970
-3C2970:lI105|H3C2A34
-3C2A34:lI111|H3C2B00
-3C2B00:lI110|H3C2BC4
-3C2BC4:lI47|H3C2C78
-3C2C78:lI112|H3C2D28
-3C2D28:lI111|H3C2DD0
-3C2DD0:lI115|H3C2E58
-3C2E58:lI116|H3C2ED0
-3C2ED0:lI115|H3C2F48
-3C2F48:lI99|H3C2FB8
-3C2FB8:lI114|H3C3020
-3C3020:lI105|H3C3080
-3C3080:lI112|H3C30D8
-3C30D8:lI116|N
-3C23C0:lI101|H3C2464
-3C2464:lI112|H3C2510
-3C2510:lI115|N
-3C2318:lH3C23D0|H3C23DC
-3C23D0:t2:H3C2474,H3C247C
-3C247C:lI97|H3C2528
-3C2528:lI112|H3C25D4
-3C25D4:lI112|H3C2688
-3C2688:lI108|H3C273C
-3C273C:lI105|H3C27F8
-3C27F8:lI99|H3C28B4
-3C28B4:lI97|H3C2978
-3C2978:lI116|H3C2A3C
-3C2A3C:lI105|H3C2B08
-3C2B08:lI111|H3C2BCC
-3C2BCC:lI110|H3C2C80
-3C2C80:lI47|H3C2D30
-3C2D30:lI112|H3C2DD8
-3C2DD8:lI111|H3C2E60
-3C2E60:lI115|H3C2ED8
-3C2ED8:lI116|H3C2F50
-3C2F50:lI115|H3C2FC0
-3C2FC0:lI99|H3C3028
-3C3028:lI114|H3C3088
-3C3088:lI105|H3C30E0
-3C30E0:lI112|H3C3130
-3C3130:lI116|N
-3C2474:lI112|H3C2520
-3C2520:lI115|N
-3C23DC:lH3C2484|H3C2490
-3C2484:t2:H3C2530,H3C2538
-3C2538:lI97|H3C25E4
-3C25E4:lI112|H3C2698
-3C2698:lI112|H3C2744
-3C2744:lI108|H3C2800
-3C2800:lI105|H3C28BC
-3C28BC:lI99|H3C2980
-3C2980:lI97|H3C2A44
-3C2A44:lI116|H3C2B10
-3C2B10:lI105|H3C2BD4
-3C2BD4:lI111|H3C2C88
-3C2C88:lI110|H3C2D38
-3C2D38:lI47|H3C2DE0
-3C2DE0:lI112|H3C2E68
-3C2E68:lI100|H3C2EE0
-3C2EE0:lI102|N
-3C2530:lI112|H3C25DC
-3C25DC:lI100|H3C2690
-3C2690:lI102|N
-3C2490:lH3C2540|H3C254C
-3C2540:t2:H3C25EC,H3C25F4
-3C25F4:lI97|H3C26A8
-3C26A8:lI112|H3C2754
-3C2754:lI112|H3C2808
-3C2808:lI108|H3C28C4
-3C28C4:lI105|H3C2988
-3C2988:lI99|H3C2A4C
-3C2A4C:lI97|H3C2B18
-3C2B18:lI116|H3C2BDC
-3C2BDC:lI105|H3C2C90
-3C2C90:lI111|H3C2D40
-3C2D40:lI110|H3C2DE8
-3C2DE8:lI47|H3C2E70
-3C2E70:lI111|H3C2EE8
-3C2EE8:lI100|H3C2F58
-3C2F58:lI97|N
-3C25EC:lI111|H3C26A0
-3C26A0:lI100|H3C274C
-3C274C:lI97|N
-3C254C:lH3C25FC|H3C2608
-3C25FC:t2:H3C26B0,H3C26B8
-3C26B8:lI97|H3C2764
-3C2764:lI112|H3C2818
-3C2818:lI112|H3C28CC
-3C28CC:lI108|H3C2990
-3C2990:lI105|H3C2A54
-3C2A54:lI99|H3C2B20
-3C2B20:lI97|H3C2BE4
-3C2BE4:lI116|H3C2C98
-3C2C98:lI105|H3C2D48
-3C2D48:lI111|H3C2DF0
-3C2DF0:lI110|H3C2E78
-3C2E78:lI47|H3C2EF0
-3C2EF0:lI111|H3C2F60
-3C2F60:lI99|H3C2FC8
-3C2FC8:lI116|H3C3030
-3C3030:lI101|H3C3090
-3C3090:lI116|H3C30E8
-3C30E8:lI45|H3C3138
-3C3138:lI115|H3C3180
-3C3180:lI116|H3C31C8
-3C31C8:lI114|H3C3210
-3C3210:lI101|H3C3258
-3C3258:lI97|H3C32A0
-3C32A0:lI109|N
-3C26B0:lI98|H3C275C
-3C275C:lI105|H3C2810
-3C2810:lI110|N
-3C2608:lH3C26C0|H3C26CC
-3C26C0:t2:H3C276C,H3C2774
-3C2774:lI97|H3C2828
-3C2828:lI112|H3C28DC
-3C28DC:lI112|H3C2998
-3C2998:lI108|H3C2A5C
-3C2A5C:lI105|H3C2B28
-3C2B28:lI99|H3C2BEC
-3C2BEC:lI97|H3C2CA0
-3C2CA0:lI116|H3C2D50
-3C2D50:lI105|H3C2DF8
-3C2DF8:lI111|H3C2E80
-3C2E80:lI110|H3C2EF8
-3C2EF8:lI47|H3C2F68
-3C2F68:lI111|H3C2FD0
-3C2FD0:lI99|H3C3038
-3C3038:lI116|H3C3098
-3C3098:lI101|H3C30F0
-3C30F0:lI116|H3C3140
-3C3140:lI45|H3C3188
-3C3188:lI115|H3C31D0
-3C31D0:lI116|H3C3218
-3C3218:lI114|H3C3260
-3C3260:lI101|H3C32A8
-3C32A8:lI97|H3C32E8
-3C32E8:lI109|N
-3C276C:lI100|H3C2820
-3C2820:lI109|H3C28D4
-3C28D4:lI115|N
-3C26CC:lH3C277C|H3C2788
-3C277C:t2:H3C2830,H3C2838
-3C2838:lI97|H3C28EC
-3C28EC:lI112|H3C29A8
-3C29A8:lI112|H3C2A64
-3C2A64:lI108|H3C2B30
-3C2B30:lI105|H3C2BF4
-3C2BF4:lI99|H3C2CA8
-3C2CA8:lI97|H3C2D58
-3C2D58:lI116|H3C2E00
-3C2E00:lI105|H3C2E88
-3C2E88:lI111|H3C2F00
-3C2F00:lI110|H3C2F70
-3C2F70:lI47|H3C2FD8
-3C2FD8:lI111|H3C3040
-3C3040:lI99|H3C30A0
-3C30A0:lI116|H3C30F8
-3C30F8:lI101|H3C3148
-3C3148:lI116|H3C3190
-3C3190:lI45|H3C31D8
-3C31D8:lI115|H3C3220
-3C3220:lI116|H3C3268
-3C3268:lI114|H3C32B0
-3C32B0:lI101|H3C32F0
-3C32F0:lI97|H3C3320
-3C3320:lI109|N
-3C2830:lI108|H3C28E4
-3C28E4:lI104|H3C29A0
-3C29A0:lI97|N
-3C2788:lH3C2840|H3C284C
-3C2840:t2:H3C28F4,H3C28FC
-3C28FC:lI97|H3C29B8
-3C29B8:lI112|H3C2A74
-3C2A74:lI112|H3C2B38
-3C2B38:lI108|H3C2BFC
-3C2BFC:lI105|H3C2CB0
-3C2CB0:lI99|H3C2D60
-3C2D60:lI97|H3C2E08
-3C2E08:lI116|H3C2E90
-3C2E90:lI105|H3C2F08
-3C2F08:lI111|H3C2F78
-3C2F78:lI110|H3C2FE0
-3C2FE0:lI47|H3C3048
-3C3048:lI111|H3C30A8
-3C30A8:lI99|H3C3100
-3C3100:lI116|H3C3150
-3C3150:lI101|H3C3198
-3C3198:lI116|H3C31E0
-3C31E0:lI45|H3C3228
-3C3228:lI115|H3C3270
-3C3270:lI116|H3C32B8
-3C32B8:lI114|H3C32F8
-3C32F8:lI101|H3C3328
-3C3328:lI97|H3C3350
-3C3350:lI109|N
-3C28F4:lI108|H3C29B0
-3C29B0:lI122|H3C2A6C
-3C2A6C:lI104|N
-3C284C:lH3C2904|H3C2910
-3C2904:t2:H3C29C0,H3C29C8
-3C29C8:lI97|H3C2A84
-3C2A84:lI112|H3C2B48
-3C2B48:lI112|H3C2C04
-3C2C04:lI108|H3C2CB8
-3C2CB8:lI105|H3C2D68
-3C2D68:lI99|H3C2E10
-3C2E10:lI97|H3C2E98
-3C2E98:lI116|H3C2F10
-3C2F10:lI105|H3C2F80
-3C2F80:lI111|H3C2FE8
-3C2FE8:lI110|H3C3050
-3C3050:lI47|H3C30B0
-3C30B0:lI111|H3C3108
-3C3108:lI99|H3C3158
-3C3158:lI116|H3C31A0
-3C31A0:lI101|H3C31E8
-3C31E8:lI116|H3C3230
-3C3230:lI45|H3C3278
-3C3278:lI115|H3C32C0
-3C32C0:lI116|H3C3300
-3C3300:lI114|H3C3330
-3C3330:lI101|H3C3358
-3C3358:lI97|H3C3378
-3C3378:lI109|N
-3C29C0:lI101|H3C2A7C
-3C2A7C:lI120|H3C2B40
-3C2B40:lI101|N
-3C2910:lH3C29D0|H3C29DC
-3C29D0:t2:H3C2A8C,H3C2A94
-3C2A94:lI97|H3C2B58
-3C2B58:lI112|H3C2C14
-3C2C14:lI112|H3C2CC8
-3C2CC8:lI108|H3C2D78
-3C2D78:lI105|H3C2E18
-3C2E18:lI99|H3C2EA0
-3C2EA0:lI97|H3C2F18
-3C2F18:lI116|H3C2F88
-3C2F88:lI105|H3C2FF0
-3C2FF0:lI111|H3C3058
-3C3058:lI110|H3C30B8
-3C30B8:lI47|H3C3110
-3C3110:lI111|H3C3160
-3C3160:lI99|H3C31A8
-3C31A8:lI116|H3C31F0
-3C31F0:lI101|H3C3238
-3C3238:lI116|H3C3280
-3C3280:lI45|H3C32C8
-3C32C8:lI115|H3C3308
-3C3308:lI116|H3C3338
-3C3338:lI114|H3C3360
-3C3360:lI101|H3C3380
-3C3380:lI97|H3C3398
-3C3398:lI109|N
-3C2A8C:lI99|H3C2B50
-3C2B50:lI108|H3C2C0C
-3C2C0C:lI97|H3C2CC0
-3C2CC0:lI115|H3C2D70
-3C2D70:lI115|N
-3C29DC:lH3C2A9C|H3C2AA8
-3C2A9C:t2:H3C2B60,H3C2B68
-3C2B68:lI97|H3C2C24
-3C2C24:lI112|H3C2CD8
-3C2CD8:lI112|H3C2D80
-3C2D80:lI108|H3C2E20
-3C2E20:lI105|H3C2EA8
-3C2EA8:lI99|H3C2F20
-3C2F20:lI97|H3C2F90
-3C2F90:lI116|H3C2FF8
-3C2FF8:lI105|H3C3060
-3C3060:lI111|H3C30C0
-3C30C0:lI110|H3C3118
-3C3118:lI47|H3C3168
-3C3168:lI109|H3C31B0
-3C31B0:lI115|H3C31F8
-3C31F8:lI119|H3C3240
-3C3240:lI111|H3C3288
-3C3288:lI114|H3C32D0
-3C32D0:lI100|N
-3C2B60:lI100|H3C2C1C
-3C2C1C:lI111|H3C2CD0
-3C2CD0:lI99|N
-3C2AA8:lH3C2B70|H3C2B7C
-3C2B70:t2:H3C2C2C,H3C2C34
-3C2C34:lI97|H3C2CE8
-3C2CE8:lI112|H3C2D90
-3C2D90:lI112|H3C2E28
-3C2E28:lI108|H3C2EB0
-3C2EB0:lI105|H3C2F28
-3C2F28:lI99|H3C2F98
-3C2F98:lI97|H3C3000
-3C3000:lI116|H3C3068
-3C3068:lI105|H3C30C8
-3C30C8:lI111|H3C3120
-3C3120:lI110|H3C3170
-3C3170:lI47|H3C31B8
-3C31B8:lI109|H3C3200
-3C3200:lI97|H3C3248
-3C3248:lI99|H3C3290
-3C3290:lI45|H3C32D8
-3C32D8:lI99|H3C3310
-3C3310:lI111|H3C3340
-3C3340:lI109|H3C3368
-3C3368:lI112|H3C3388
-3C3388:lI97|H3C33A0
-3C33A0:lI99|H3C33B0
-3C33B0:lI116|H3C33C0
-3C33C0:lI112|H3C33D0
-3C33D0:lI114|H3C33E0
-3C33E0:lI111|N
-3C2C2C:lI99|H3C2CE0
-3C2CE0:lI112|H3C2D88
-3C2D88:lI116|N
-3C2B7C:lH3C2C3C|N
-3C2C3C:t2:H3C2CF0,H3C2CF8
-3C2CF8:lI97|H3C2DA0
-3C2DA0:lI112|H3C2E38
-3C2E38:lI112|H3C2EB8
-3C2EB8:lI108|H3C2F30
-3C2F30:lI105|H3C2FA0
-3C2FA0:lI99|H3C3008
-3C3008:lI97|H3C3070
-3C3070:lI116|H3C30D0
-3C30D0:lI105|H3C3128
-3C3128:lI111|H3C3178
-3C3178:lI110|H3C31C0
-3C31C0:lI47|H3C3208
-3C3208:lI109|H3C3250
-3C3250:lI97|H3C3298
-3C3298:lI99|H3C32E0
-3C32E0:lI45|H3C3318
-3C3318:lI98|H3C3348
-3C3348:lI105|H3C3370
-3C3370:lI110|H3C3390
-3C3390:lI104|H3C33A8
-3C33A8:lI101|H3C33B8
-3C33B8:lI120|H3C33C8
-3C33C8:lI52|H3C33D8
-3C33D8:lI48|N
-3C2CF0:lI104|H3C2D98
-3C2D98:lI113|H3C2E30
-3C2E30:lI120|N
-3BDBCC:lH3BDA78|H3BDA8C
-3BDA78:t2:A4:port,I8888
-3BDA8C:lH3BDB04|H3BDB10
-3BDB04:t2:AC:bind_address,H3BDB64
-3BDB64:t4:I127,I0,I0,I1
-3BDB10:lH3BDB78|H3BDB84
-3BDB78:t2:AB:server_name,H3BDBD4
-3BDBD4:lI108|H3BDC24
-3BDC24:lI111|H3BDC88
-3BDC88:lI99|H3BDCF0
-3BDCF0:lI97|H3BDD70
-3BDD70:lI108|H3BDDF8
-3BDDF8:lI104|H3BDE90
-3BDE90:lI111|H3BDF40
-3BDF40:lI115|H3BDFFC
-3BDFFC:lI116|N
-3BDB84:lH3BDBDC|H3BDBE8
-3BDBDC:t2:AE:max_header_siz,I1024
-3BDBE8:lH3BDC2C|H3BDC38
-3BDC2C:t2:A11:max_header_action,A8:reply414
-3BDC38:lH3BDC90|H3BDC9C
-3BDC90:t2:A8:com_type,A7:ip_comm
-3BDC9C:lH3BDCF8|H3BDD04
-3BDCF8:t2:A7:modules,H3BDD78
-3BDD78:lA9:mod_alias|H3BDE00
-3BDE00:lA8:mod_auth|H3BDE98
-3BDE98:lA7:mod_esi|H3BDF48
-3BDF48:lAB:mod_actions|H3BE004
-3BE004:lA7:mod_cgi|H3BE0D0
-3BE0D0:lAB:mod_include|H3BE1A4
-3BE1A4:lA7:mod_dir|H3BE288
-3BE288:lA7:mod_get|H3BE378
-3BE378:lA8:mod_head|H3BE47C
-3BE47C:lA7:mod_log|H3BE580
-3BE580:lAC:mod_disk_log|N
-3BDD04:lH3BDD80|H3BDD8C
-3BDD80:t2:AF:directory_index,H3BDE08
-3BDE08:lH3BDEA0|N
-3BDEA0:lI105|H3BDF50
-3BDF50:lI110|H3BE00C
-3BE00C:lI100|H3BE0D8
-3BE0D8:lI101|H3BE1AC
-3BE1AC:lI120|H3BE290
-3BE290:lI46|H3BE380
-3BE380:lI104|H3BE484
-3BE484:lI116|H3BE588
-3BE588:lI109|H3BE68C
-3BE68C:lI108|N
-3BDD8C:lH3BDE10|H3BDE1C
-3BDE10:t2:AC:default_type,H3BDEA8
-3BDEA8:lI116|H3BDF58
-3BDF58:lI101|H3BE014
-3BE014:lI120|H3BE0E0
-3BE0E0:lI116|H3BE1B4
-3BE1B4:lI47|H3BE298
-3BE298:lI112|H3BE388
-3BE388:lI108|H3BE48C
-3BE48C:lI97|H3BE590
-3BE590:lI105|H3BE694
-3BE694:lI110|N
-3BDE1C:lH3BDEB0|H3BDEBC
-3BDEB0:t2:A10:erl_script_alias,H3BDF60
-3BDF60:t2:H3BE01C,H3BE024
-3BE024:lH3BE0F0|N
-3BE0F0:lI119|H3BE1C4
-3BE1C4:lI101|H3BE2A8
-3BE2A8:lI98|H3BE398
-3BE398:lI116|H3BE49C
-3BE49C:lI111|H3BE5A0
-3BE5A0:lI111|H3BE6A4
-3BE6A4:lI108|N
-3BE01C:lI47|H3BE0E8
-3BE0E8:lI119|H3BE1BC
-3BE1BC:lI101|H3BE2A0
-3BE2A0:lI98|H3BE390
-3BE390:lI116|H3BE494
-3BE494:lI111|H3BE598
-3BE598:lI111|H3BE69C
-3BE69C:lI108|N
-3BDEBC:lH3BDF6C|H3BDF78
-3BDF6C:t2:A5:alias,H3BE02C
-3BE02C:t2:H3BE0F8,H3BE100
-3BE100:lI47|H3BE1D4
-3BE1D4:lI99|H3BE2B8
-3BE2B8:lI108|H3BE3A8
-3BE3A8:lI101|H3BE4AC
-3BE4AC:lI97|H3BE5B0
-3BE5B0:lI114|H3BE6B4
-3BE6B4:lI99|H3BE7A8
-3BE7A8:lI97|H3BE894
-3BE894:lI115|H3BE980
-3BE980:lI101|H3BEA74
-3BEA74:lI47|H3BEB68
-3BEB68:lI111|H3BEC54
-3BEC54:lI116|H3BED40
-3BED40:lI112|H3BEE2C
-3BEE2C:lI47|H3BEF00
-3BEF00:lI101|H3BEFD4
-3BEFD4:lI114|H3BF0A0
-3BF0A0:lI116|H3BF174
-3BF174:lI115|H3BF238
-3BF238:lI47|H3BF2FC
-3BF2FC:lI108|H3BF3A8
-3BF3A8:lI105|H3BF45C
-3BF45C:lI98|H3BF518
-3BF518:lI47|H3BF5DC
-3BF5DC:lI111|H3BF6B0
-3BF6B0:lI98|H3BF784
-3BF784:lI115|H3BF858
-3BF858:lI101|H3BF93C
-3BF93C:lI114|H3BFA18
-3BFA18:lI118|H3BFAF4
-3BFAF4:lI101|H3BFBD0
-3BFBD0:lI114|H3BFC9C
-3BFC9C:lI47|H3BFD60
-3BFD60:lI112|H3BFE2C
-3BFE2C:lI114|H3BFEE0
-3BFEE0:lI105|H3BFF94
-3BFF94:lI118|H3C0040
-3C0040:lI47|H3C00EC
-3C00EC:lI99|H3C0198
-3C0198:lI114|H3C024C
-3C024C:lI97|H3C0308
-3C0308:lI115|H3C03BC
-3C03BC:lI104|H3C0458
-3C0458:lI100|H3C04F4
-3C04F4:lI117|H3C0590
-3C0590:lI109|H3C0634
-3C0634:lI112|H3C06E0
-3C06E0:lI95|H3C078C
-3C078C:lI118|H3C0830
-3C0830:lI105|H3C08BC
-3C08BC:lI101|H3C0950
-3C0950:lI119|H3C09E4
-3C09E4:lI101|H3C0A80
-3C0A80:lI114|N
-3BE0F8:lI47|H3BE1CC
-3BE1CC:lI99|H3BE2B0
-3BE2B0:lI114|H3BE3A0
-3BE3A0:lI97|H3BE4A4
-3BE4A4:lI115|H3BE5A8
-3BE5A8:lI104|H3BE6AC
-3BE6AC:lI100|H3BE7A0
-3BE7A0:lI117|H3BE88C
-3BE88C:lI109|H3BE978
-3BE978:lI112|H3BEA6C
-3BEA6C:lI95|H3BEB60
-3BEB60:lI118|H3BEC4C
-3BEC4C:lI105|H3BED38
-3BED38:lI101|H3BEE24
-3BEE24:lI119|H3BEEF8
-3BEEF8:lI101|H3BEFCC
-3BEFCC:lI114|N
-3BDF78:lH3BE038|H3BE044
-3BE038:t2:A5:alias,H3BE108
-3BE108:t2:H3BE1DC,H3BE1E4
-3BE1E4:lI47|H3BE2C8
-3BE2C8:lI99|H3BE3B8
-3BE3B8:lI108|H3BE4BC
-3BE4BC:lI101|H3BE5C0
-3BE5C0:lI97|H3BE6C4
-3BE6C4:lI114|H3BE7B8
-3BE7B8:lI99|H3BE8A4
-3BE8A4:lI97|H3BE990
-3BE990:lI115|H3BEA84
-3BEA84:lI101|H3BEB78
-3BEB78:lI47|H3BEC64
-3BEC64:lI111|H3BED50
-3BED50:lI116|H3BEE3C
-3BEE3C:lI112|H3BEF10
-3BEF10:lI47|H3BEFE4
-3BEFE4:lI101|H3BF0B0
-3BF0B0:lI114|H3BF184
-3BF184:lI116|H3BF248
-3BF248:lI115|H3BF304
-3BF304:lI47|H3BF3B0
-3BF3B0:lI101|H3BF464
-3BF464:lI114|H3BF520
-3BF520:lI116|H3BF5E4
-3BF5E4:lI115|H3BF6B8
-3BF6B8:lI47|H3BF78C
-3BF78C:lI100|H3BF860
-3BF860:lI111|H3BF944
-3BF944:lI99|H3BFA20
-3BFA20:lI47|H3BFAFC
-3BFAFC:lI104|H3BFBD8
-3BFBD8:lI116|H3BFCA4
-3BFCA4:lI109|H3BFD68
-3BFD68:lI108|N
-3BE1DC:lI47|H3BE2C0
-3BE2C0:lI99|H3BE3B0
-3BE3B0:lI114|H3BE4B4
-3BE4B4:lI97|H3BE5B8
-3BE5B8:lI115|H3BE6BC
-3BE6BC:lI104|H3BE7B0
-3BE7B0:lI100|H3BE89C
-3BE89C:lI117|H3BE988
-3BE988:lI109|H3BEA7C
-3BEA7C:lI112|H3BEB70
-3BEB70:lI95|H3BEC5C
-3BEC5C:lI101|H3BED48
-3BED48:lI114|H3BEE34
-3BEE34:lI116|H3BEF08
-3BEF08:lI115|H3BEFDC
-3BEFDC:lI95|H3BF0A8
-3BF0A8:lI100|H3BF17C
-3BF17C:lI111|H3BF240
-3BF240:lI99|N
-3BE044:lH3BE114|H3BE120
-3BE114:t2:A5:alias,H3BE1EC
-3BE1EC:t2:H3BE2D0,H3BE2D8
-3BE2D8:lI47|H3BE3C8
-3BE3C8:lI99|H3BE4CC
-3BE4CC:lI108|H3BE5D0
-3BE5D0:lI101|H3BE6D4
-3BE6D4:lI97|H3BE7C8
-3BE7C8:lI114|H3BE8B4
-3BE8B4:lI99|H3BE9A0
-3BE9A0:lI97|H3BEA94
-3BEA94:lI115|H3BEB88
-3BEB88:lI101|H3BEC74
-3BEC74:lI47|H3BED60
-3BED60:lI111|H3BEE4C
-3BEE4C:lI116|H3BEF20
-3BEF20:lI112|H3BEFEC
-3BEFEC:lI47|H3BF0B8
-3BF0B8:lI101|H3BF18C
-3BF18C:lI114|H3BF250
-3BF250:lI116|H3BF30C
-3BF30C:lI115|H3BF3B8
-3BF3B8:lI47|H3BF46C
-3BF46C:lI108|H3BF528
-3BF528:lI105|H3BF5EC
-3BF5EC:lI98|H3BF6C0
-3BF6C0:lI47|H3BF794
-3BF794:lI111|H3BF868
-3BF868:lI98|H3BF94C
-3BF94C:lI115|H3BFA28
-3BFA28:lI101|H3BFB04
-3BFB04:lI114|H3BFBE0
-3BFBE0:lI118|H3BFCAC
-3BFCAC:lI101|H3BFD70
-3BFD70:lI114|H3BFE34
-3BFE34:lI47|H3BFEE8
-3BFEE8:lI100|H3BFF9C
-3BFF9C:lI111|H3C0048
-3C0048:lI99|H3C00F4
-3C00F4:lI47|H3C01A0
-3C01A0:lI104|H3C0254
-3C0254:lI116|H3C0310
-3C0310:lI109|H3C03C4
-3C03C4:lI108|N
-3BE2D0:lI47|H3BE3C0
-3BE3C0:lI99|H3BE4C4
-3BE4C4:lI114|H3BE5C8
-3BE5C8:lI97|H3BE6CC
-3BE6CC:lI115|H3BE7C0
-3BE7C0:lI104|H3BE8AC
-3BE8AC:lI100|H3BE998
-3BE998:lI117|H3BEA8C
-3BEA8C:lI109|H3BEB80
-3BEB80:lI112|H3BEC6C
-3BEC6C:lI95|H3BED58
-3BED58:lI100|H3BEE44
-3BEE44:lI111|H3BEF18
-3BEF18:lI99|N
-3BE120:lH3BE1F8|N
-3BE1F8:t2:A10:erl_script_alias,H3BE2E0
-3BE2E0:t2:H3BE3D0,H3BE3D8
-3BE3D8:lH3BE4DC|N
-3BE4DC:lI99|H3BE5E0
-3BE5E0:lI114|H3BE6E4
-3BE6E4:lI97|H3BE7D8
-3BE7D8:lI115|H3BE8C4
-3BE8C4:lI104|H3BE9B0
-3BE9B0:lI100|H3BEAA4
-3BEAA4:lI117|H3BEB90
-3BEB90:lI109|H3BEC7C
-3BEC7C:lI112|H3BED68
-3BED68:lI95|H3BEE54
-3BEE54:lI118|H3BEF28
-3BEF28:lI105|H3BEFF4
-3BEFF4:lI101|H3BF0C0
-3BF0C0:lI119|H3BF194
-3BF194:lI101|H3BF258
-3BF258:lI114|N
-3BE3D0:lI47|H3BE4D4
-3BE4D4:lI99|H3BE5D8
-3BE5D8:lI100|H3BE6DC
-3BE6DC:lI118|H3BE7D0
-3BE7D0:lI95|H3BE8BC
-3BE8BC:lI101|H3BE9A8
-3BE9A8:lI114|H3BEA9C
-3BEA9C:lI108|N
-3BDE2C:lH3BDA9C|H3BDECC
-3BDA9C:t4:I127,I0,I0,I1
-3BDECC:lI8888|H3BDF88
-3BDF88:lN|N
-3BDD1C:lN|N
-3BDA50:t2:AD:$initial_call,H3BDAB8
-3BDAB8:t3:A3:gen,A7:init_it,H3BDAB0
-3BDA5C:t2:A9:verbosity,A7:silence
-3BDAC8:t2:AE:auth_verbosity,A7:silence
-3BDB28:t2:A12:security_verbosity,A7:silence
-3BDB9C:t2:A12:acceptor_verbosity,A7:silence
-3BDC00:t2:AA:$ancestors,H3BDC5C
-3BDC5C:lA1A:httpd_sup__127_0_0_1__8888|H3BDCB4
-3BDCB4:lA8:web_tool|H3BDD24
-3BDD24:lP<0.27.0>|N
-3BDADC:t2:A19:request_handler_verbosity,A7:silence
-3BDB3C:t2:A5:sname,A3:man
-=proc_dictionary:<0.47.0>
-H36E688
-H36E694
-H36E6A0
-H36E6AC
-=proc_stack:<0.47.0>
-36c520:SReturn addr 0x362C9C (inet_tcp:accept/2 + 20)
-y0:I5
-y1:p<0.161>
-y2:p<0.141>
-36c530:SReturn addr 0x500C5C (httpd_socket:accept/3 + 280)
-y0:N
-36c538:SReturn addr 0x502BFC (httpd_acceptor:acceptor/4 + 164)
-y0:N
-36c540:SReturn addr 0x225860 (proc_lib:init_p/5 + 164)
-y0:SCatch 0x502BFC (httpd_acceptor:acceptor/4 + 164)
-y1:P<0.46.0>
-y2:A7:ip_comm
-y3:p<0.141>
-y4:A1B:httpd_conf__127_0_0_1__8888
-36c558:SReturn addr 0x156F90 (<terminate process normally>)
-y0:SCatch 0x225860 (proc_lib:init_p/5 + 164)
-y1:AE:httpd_acceptor
-y2:A8:acceptor
-y3:H36E6C8
-=proc_heap:<0.47.0>
-36E6C8:lP<0.44.0>|H36E724
-36E724:lP<0.46.0>|H36E748
-36E748:lA7:ip_comm|H36E760
-36E760:lH36E6D0|H36E778
-36E6D0:t4:I127,I0,I0,I1
-36E778:lI8888|H36E788
-36E788:lA1B:httpd_conf__127_0_0_1__8888|H36E798
-36E798:lA7:silence|N
-36E688:t2:AD:$initial_call,H36E6F0
-36E6F0:t3:AE:httpd_acceptor,A8:acceptor,H36E6C8
-36E694:t2:A9:verbosity,A7:silence
-36E6A0:t2:AA:$ancestors,H36E700
-36E700:lA1E:httpd_acc_sup__127_0_0_1__8888|H36E72C
-36E72C:lA1A:httpd_sup__127_0_0_1__8888|H36E750
-36E750:lA8:web_tool|H36E768
-36E768:lP<0.27.0>|N
-36E6AC:t2:A5:sname,A3:acc
-=proc_dictionary:<0.48.0>
-H385E48
-H385E54
-=proc_stack:<0.48.0>
-3ac1bc:SReturn addr 0x225860 (proc_lib:init_p/5 + 164)
-y0:N
-y1:A8:infinity
-y2:A10:crashdump_viewer
-y3:H3AB280
-y4:A17:crashdump_viewer_server
-y5:P<0.41.0>
-3ac1d8:SReturn addr 0x156F90 (<terminate process normally>)
-y0:SCatch 0x225860 (proc_lib:init_p/5 + 164)
-y1:A3:gen
-y2:A7:init_it
-y3:H385E90
-=proc_heap:<0.48.0>
-3AB280:t8:A5:state,A9:undefined,A9:undefined,A9:undefined,A5:false,I4,A9:undefined,P<0.56.0>
-385E90:lAA:gen_server|H385ED8
-385ED8:lP<0.41.0>|H385F10
-385F10:lP<0.41.0>|H385F58
-385F58:lH385FA8|H385FB4
-385FA8:t2:A5:local,A17:crashdump_viewer_server
-385FB4:lA10:crashdump_viewer|H386014
-386014:lN|H38606C
-38606C:lN|N
-385E48:t2:AD:$initial_call,H385EB0
-385EB0:t3:A3:gen,A7:init_it,H385E90
-385E54:t2:AA:$ancestors,H385EC0
-385EC0:lA6:websup|H385F08
-385F08:lA8:web_tool|H385F50
-385F50:lP<0.27.0>|N
-=proc_stack:<0.49.0>
-36a114:SReturn addr 0x30174C (io:parse_erl_exprs/3 + 92)
-y0:H369E10
-y1:P<0.22.0>
-36a120:SReturn addr 0x2E5360 (shell:'-get_command/4-fun-0-'/1 + 20)
-y0:N
-36a128:SReturn addr 0x156F90 (<terminate process normally>)
-=proc_heap:<0.49.0>
-369E10:E21:8372000364000D6E6F6E6F6465406E6F686F737400000001330000000000000000
-=atoms
diff --git a/lib/observer/test/observer_SUITE.erl b/lib/observer/test/observer_SUITE.erl
index b6665cb70b..5cf719acb1 100644
--- a/lib/observer/test/observer_SUITE.erl
+++ b/lib/observer/test/observer_SUITE.erl
@@ -1,7 +1,7 @@
%%
%% %CopyrightBegin%
%%
-%% Copyright Ericsson AB 2006-2013. All Rights Reserved.
+%% Copyright Ericsson AB 2006-2014. 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
@@ -19,34 +19,35 @@
-module(observer_SUITE).
-include_lib("test_server/include/test_server.hrl").
+-include_lib("wx/include/wx.hrl").
+-include_lib("observer/src/observer_tv.hrl").
%% Test server specific exports
--export([all/0, suite/0,groups/0,init_per_suite/1, end_per_suite/1,
- init_per_group/2,end_per_group/2]).
--export([init_per_testcase/2, end_per_testcase/2]).
+-export([all/0, suite/0,groups/0]).
+-export([init_per_testcase/2, end_per_testcase/2,
+ init_per_group/2, end_per_group/2,
+ init_per_suite/1, end_per_suite/1
+ ]).
%% Test cases
--export([app_file/1]).
+-export([app_file/1, appup_file/1,
+ basic/1, process_win/1, table_win/1
+ ]).
%% Default timetrap timeout (set in init_per_testcase)
-define(default_timeout, ?t:minutes(1)).
-init_per_testcase(_Case, Config) ->
- Dog = ?t:timetrap(?default_timeout),
- [{watchdog, Dog} | Config].
-
-end_per_testcase(_Case, Config) ->
- Dog = ?config(watchdog, Config),
- ?t:timetrap_cancel(Dog),
- ok.
-
suite() -> [{ct_hooks,[ts_install_cth]}].
-all() ->
- [app_file].
+all() ->
+ [app_file, appup_file, {group, gui}].
-groups() ->
- [].
+groups() ->
+ [{gui, [],
+ [basic
+ , process_win, table_win
+ ]
+ }].
init_per_suite(Config) ->
Config.
@@ -54,12 +55,40 @@ init_per_suite(Config) ->
end_per_suite(_Config) ->
ok.
-init_per_group(_GroupName, Config) ->
- Config.
+init_per_testcase(_Case, Config) ->
+ Dog = ?t:timetrap(?default_timeout),
+ [{watchdog, Dog} | Config].
-end_per_group(_GroupName, Config) ->
- Config.
+end_per_testcase(_Case, Config) ->
+ Dog = ?config(watchdog, Config),
+ ?t:timetrap_cancel(Dog),
+ ok.
+init_per_group(gui, Config) ->
+ try
+ case os:type() of
+ {unix,darwin} ->
+ exit("Can not test on MacOSX");
+ {unix, _} ->
+ io:format("DISPLAY ~s~n", [os:getenv("DISPLAY")]),
+ case ct:get_config(xserver, none) of
+ none -> ignore;
+ Server -> os:putenv("DISPLAY", Server)
+ end;
+ _ -> ignore
+ end,
+ wx:new(),
+ wx:destroy(),
+ Config
+ catch
+ _:undef ->
+ {skipped, "No wx compiled for this platform"};
+ _:Reason ->
+ SkipReason = io_lib:format("Start wx failed: ~p", [Reason]),
+ {skipped, lists:flatten(SkipReason)}
+ end.
+end_per_group(_, _) ->
+ ok.
app_file(suite) ->
[];
@@ -68,3 +97,182 @@ app_file(doc) ->
app_file(Config) when is_list(Config) ->
?line ok = ?t:app_test(observer),
ok.
+
+%% Testing .appup file
+appup_file(Config) when is_list(Config) ->
+ ok = ?t:appup_test(observer).
+
+-define(DBG(Foo), io:format("~p: ~p~n",[?LINE, catch Foo])).
+
+basic(suite) -> [];
+basic(doc) -> [""];
+basic(Config) when is_list(Config) ->
+ timer:send_after(100, "foobar"), %% Otherwise the timer sever gets added to procs
+ ProcsBefore = processes(),
+ NumProcsBefore = length(ProcsBefore),
+
+ ok = observer:start(),
+ Notebook = setup_whitebox_testing(),
+
+ io:format("Notebook ~p~n",[Notebook]),
+ Count = wxNotebook:getPageCount(Notebook),
+ true = Count >= 6,
+ 0 = wxNotebook:getSelection(Notebook),
+ timer:sleep(500),
+ Check = fun(N, TestMore) ->
+ TestMore andalso
+ test_page(wxNotebook:getPageText(Notebook, N),
+ wxNotebook:getCurrentPage(Notebook)),
+ timer:sleep(200),
+ ok = wxNotebook:advanceSelection(Notebook)
+ end,
+ %% Just verify that we can toogle trough all pages
+ [_|_] = [Check(N, false) || N <- lists:seq(1, Count)],
+ %% Cause it to resize
+ Frame = get_top_level_parent(Notebook),
+ {W,H} = wxWindow:getSize(Frame),
+ wxWindow:setSize(Frame, W+10, H+10),
+ [_|_] = [Check(N, true) || N <- lists:seq(0, Count-1)],
+
+ ok = observer:stop(),
+ timer:sleep(2000), %% stop is async
+ ProcsAfter = processes(),
+ NumProcsAfter = length(ProcsAfter),
+ if NumProcsAfter=/=NumProcsBefore ->
+ ct:log("Before but not after:~n~p~n",
+ [[{P,process_info(P)} || P <- ProcsBefore -- ProcsAfter]]),
+ ct:log("After but not before:~n~p~n",
+ [[{P,process_info(P)} || P <- ProcsAfter -- ProcsBefore]]),
+ ct:fail("leaking processes");
+ true ->
+ ok
+ end,
+ ok.
+
+test_page("Load Charts" ++ _, _Window) ->
+ %% Just let it display some info and hopefully it doesn't crash
+ timer:sleep(2000),
+ ok;
+test_page("Applications" ++ _, _Window) ->
+ ok = application:start(mnesia),
+ timer:sleep(1000), %% Give it time to refresh
+ Active = get_active(),
+ FakeEv = #wx{event=#wxCommand{type=command_listbox_selected, cmdString="mnesia"}},
+ Active ! FakeEv,
+ timer:sleep(1000), %% Give it time to refresh
+ ok = application:stop(mnesia),
+ timer:sleep(1000), %% Give it time to refresh
+ ok;
+
+test_page("Processes" ++ _, _Window) ->
+ timer:sleep(500), %% Give it time to refresh
+ Active = get_active(),
+ ChangeSort = fun(N) ->
+ FakeEv = #wx{event=#wxList{type=command_list_col_click, col=N}},
+ Active ! FakeEv,
+ timer:sleep(200)
+ end,
+ [ChangeSort(N) || N <- lists:seq(1,5) ++ [0]],
+ Focus = #wx{event=#wxList{type=command_list_item_focused, itemIndex=2}},
+ Active ! Focus,
+ Activate = #wx{event=#wxList{type=command_list_item_activated}},
+ Active ! Activate,
+ timer:sleep(1000), %% Give it time to refresh
+ ok;
+
+test_page(_Title = "Table" ++ _, _Window) ->
+ Tables = [ets:new(list_to_atom("Test-" ++ [C]), [public]) || C <- lists:seq($A, $Z)],
+ Table = lists:nth(3, Tables),
+ ets:insert(Table, [{N,100-N} || N <- lists:seq(1,100)]),
+
+ Active = get_active(),
+ Active ! refresh_interval,
+ ChangeSort = fun(N) ->
+ FakeEv = #wx{event=#wxList{type=command_list_col_click, col=N}},
+ Active ! FakeEv,
+ timer:sleep(200)
+ end,
+ [ChangeSort(N) || N <- lists:seq(1,5) ++ [0]],
+ timer:sleep(1000),
+ Focus = #wx{event=#wxList{type=command_list_item_selected, itemIndex=2}},
+ Active ! Focus,
+ Activate = #wx{event=#wxList{type=command_list_item_activated, itemIndex=2}},
+ Active ! Activate,
+
+ Info = 407, %% whitebox...
+ Active ! #wx{id=Info},
+ timer:sleep(1000),
+ ok;
+
+test_page(Title, Window) ->
+ io:format("Page ~p: ~p~n", [Title, Window]),
+ %% Just let it display some info and hopefully it doesn't crash
+ timer:sleep(1000),
+ ok.
+
+
+process_win(suite) -> [];
+process_win(doc) -> [""];
+process_win(Config) when is_list(Config) ->
+ ok = observer:start(),
+ ObserverNB = setup_whitebox_testing(),
+ Parent = get_top_level_parent(ObserverNB),
+ Frame = observer_procinfo:start(self(), Parent, self()),
+ PIPid = wx_object:get_pid(Frame),
+ PIPid ! {get_debug_info, self()},
+ Notebook = receive {procinfo_debug, NB} -> NB end,
+ Count = wxNotebook:getPageCount(Notebook),
+ Check = fun(_N) ->
+ ok = wxNotebook:advanceSelection(Notebook),
+ timer:sleep(400)
+ end,
+ [_|_] = [Check(N) || N <- lists:seq(1, Count)],
+ PIPid ! #wx{event=#wxClose{type=close_window}},
+ observer:stop(),
+ ok.
+
+table_win(suite) -> [];
+table_win(doc) -> [""];
+table_win(Config) when is_list(Config) ->
+ Tables = [ets:new(list_to_atom("Test-" ++ [C]), [public]) || C <- lists:seq($A, $Z)],
+ Table = lists:nth(3, Tables),
+ ets:insert(Table, [{N,100-N} || N <- lists:seq(1,100)]),
+ ok = observer:start(),
+ Notebook = setup_whitebox_testing(),
+ Parent = get_top_level_parent(Notebook),
+ TObj = observer_tv_table:start_link(Parent, [{node,node()}, {type,ets}, {table,#tab{name=foo, id=Table}}]),
+ %% Modal can not test edit..
+ %% TPid = wx_object:get_pid(TObj),
+ %% TPid ! #wx{event=#wxList{type=command_list_item_activated, itemIndex=12}},
+ timer:sleep(3000),
+ wx_object:get_pid(TObj) ! #wx{event=#wxClose{type=close_window}},
+ observer:stop(),
+ ok.
+
+
+%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
+
+get_top_level_parent(Window) ->
+ Parent = wxWindow:getParent(Window),
+ case wx:is_null(Parent) of
+ true -> Window;
+ false -> get_top_level_parent(Parent)
+ end.
+
+setup_whitebox_testing() ->
+ %% So that if we die observer exists
+ link(whereis(observer)),
+ {Env, Notebook, _Active} = get_observer_debug(),
+ wx:set_env(Env),
+ Notebook.
+
+get_active() ->
+ {_, _, Active} = get_observer_debug(),
+ Active.
+
+get_observer_debug() ->
+ observer ! {get_debug_info, self()},
+ receive
+ {observer_debug, Env, Notebook, Active} ->
+ {Env, Notebook, Active}
+ end.
diff --git a/lib/observer/vsn.mk b/lib/observer/vsn.mk
index f48809a839..a6300eeb18 100644
--- a/lib/observer/vsn.mk
+++ b/lib/observer/vsn.mk
@@ -1 +1 @@
-OBSERVER_VSN = 1.3.1.2
+OBSERVER_VSN = 2.0
diff --git a/lib/odbc/aclocal.m4 b/lib/odbc/aclocal.m4
index 46b30a16b3..ed492d55ff 100644
--- a/lib/odbc/aclocal.m4
+++ b/lib/odbc/aclocal.m4
@@ -74,6 +74,21 @@ AC_ARG_VAR(erl_xcomp_clock_gettime_cpu_time, [clock_gettime() can be used for re
AC_ARG_VAR(erl_xcomp_after_morecore_hook, [__after_morecore_hook can track malloc()s core memory usage: yes|no (only used when cross compiling)])
AC_ARG_VAR(erl_xcomp_dlsym_brk_wrappers, [dlsym(RTLD_NEXT, _) brk wrappers can track malloc()s core memory usage: yes|no (only used when cross compiling)])
+dnl Cross compilation variables for OSE
+AC_ARG_VAR(erl_xcomp_ose_ldflags_pass1, [Linker flags for the OSE module (pass 1) (only used when cross compiling for OSE)])
+AC_ARG_VAR(erl_xcomp_ose_ldflags_pass2, [Linker flags for the OSE module (pass 2) (only used when cross compiling for OSE)])
+AC_ARG_VAR(erl_xcomp_ose_OSEROOT, [OSE installation root directory (only used when cross compiling for OSE)])
+AC_ARG_VAR(erl_xcomp_ose_STRIP, [Strip utility shipped with the OSE distribution(only used when cross compiling for OSE)])
+AC_ARG_VAR(erl_xcomp_ose_LM_POST_LINK, [OSE postlink tool (only used when cross compiling for OSE)])
+AC_ARG_VAR(erl_xcomp_ose_LM_SET_CONF, [Sets the configuration for an OSE load module (only used when cross compiling for OSE)])
+AC_ARG_VAR(erl_xcomp_ose_LM_ELF_SIZE, [Prints the section size information for an OSE load module (only used when cross compiling for OSE)])
+AC_ARG_VAR(erl_xcomp_ose_LM_LCF, [OSE load module linker configuration file (only used when cross compiling for OSE)])
+AC_ARG_VAR(erl_xcomp_ose_BEAM_LM_CONF, [BEAM OSE load module default configuration file (only used when cross compiling for OSE)])
+AC_ARG_VAR(erl_xcomp_ose_EPMD_LM_CONF, [EPMD OSE load module default configuration file (only used when cross compiling for OSE)])
+AC_ARG_VAR(erl_xcomp_ose_RUN_ERL_LM_CONF, [run_erl_lm OSE load module default configuration file (only used when cross compiling for OSE)])
+AC_ARG_VAR(erl_xcomp_ose_CONFD, [OSE confd source file])
+AC_ARG_VAR(erl_xcomp_ose_CRT0_LM, [OSE crt0 lm source file])
+
])
AC_DEFUN(ERL_XCOMP_SYSROOT_INIT,
@@ -488,6 +503,8 @@ AC_CACHE_VAL(ac_cv_sys_ipv6_support,
#ifdef __WIN32__
#include <winsock2.h>
#include <ws2tcpip.h>
+#elif __OSE__
+#error "no ipv6"
#else
#include <netinet/in.h>
#endif],
@@ -500,6 +517,8 @@ else
#ifdef __WIN32__
#include <winsock2.h>
#include <ws2tcpip.h>
+#elif __OSE__
+#error "no ipv6"
#else
#include <netinet/in.h>
#endif],
@@ -728,6 +747,12 @@ if test "X$host_os" = "Xwin32"; then
THR_LIBS=
THR_LIB_NAME=win32_threads
THR_LIB_TYPE=win32_threads
+elif test "X$host_os" = "Xose"; then
+ AC_MSG_RESULT(yes)
+ THR_DEFS="-DOSE_THREADS"
+ THR_LIBS=
+ THR_LIB_NAME=ose_threads
+ THR_LIB_TYPE=ose_threads
else
AC_MSG_RESULT(no)
THR_DEFS=
@@ -1078,9 +1103,22 @@ case "$THR_LIB_NAME" in
test "$ethr_have_native_atomics" = "yes" && ethr_have_native_spinlock=yes
;;
- pthread)
- ETHR_THR_LIB_BASE_DIR=pthread
- AC_DEFINE(ETHR_PTHREADS, 1, [Define if you have pthreads])
+ pthread|ose_threads)
+ case "$THR_LIB_NAME" in
+ pthread)
+ ETHR_THR_LIB_BASE_DIR=pthread
+ AC_DEFINE(ETHR_PTHREADS, 1, [Define if you have pthreads])
+ ;;
+ ose_threads)
+ AC_DEFINE(ETHR_OSE_THREADS, 1,
+ [Define if you have OSE style threads])
+ ETHR_THR_LIB_BASE_DIR=ose
+ AC_CHECK_HEADER(ose_spi/ose_spi.h,
+ AC_DEFINE(HAVE_OSE_SPI_H, 1,
+ [Define if you have the "ose_spi/ose_spi.h" header file.]))
+ ;;
+ esac
+ if test "x$THR_LIB_NAME" = "xpthread"; then
case $host_os in
openbsd*)
# The default stack size is insufficient for our needs
@@ -1139,6 +1177,7 @@ case "$THR_LIB_NAME" in
*) ;;
esac
+ fi
dnl We sometimes need ETHR_DEFS in order to find certain headers
dnl (at least for pthread.h on osf1).
saved_cppflags="$CPPFLAGS"
@@ -1151,7 +1190,6 @@ case "$THR_LIB_NAME" in
dnl
dnl Check for headers
dnl
-
AC_CHECK_HEADER(pthread.h, \
AC_DEFINE(ETHR_HAVE_PTHREAD_H, 1, \
[Define if you have the <pthread.h> header file.]))
@@ -1184,7 +1222,7 @@ case "$THR_LIB_NAME" in
dnl
dnl Check for functions
dnl
-
+ if test "x$THR_LIB_NAME" = "xpthread"; then
AC_CHECK_FUNC(pthread_spin_lock, \
[ethr_have_native_spinlock=yes \
AC_DEFINE(ETHR_HAVE_PTHREAD_SPIN_LOCK, 1, \
@@ -1311,6 +1349,8 @@ case "$THR_LIB_NAME" in
AC_MSG_RESULT([$linux_futex])
test $linux_futex = yes && AC_DEFINE(ETHR_HAVE_LINUX_FUTEX, 1, [Define if you have a linux futex implementation.])
+ fi
+
AC_CHECK_SIZEOF(int)
AC_CHECK_SIZEOF(long)
AC_CHECK_SIZEOF(long long)
diff --git a/lib/odbc/c_src/odbcserver.c b/lib/odbc/c_src/odbcserver.c
index 8de81a30ae..b4655ce373 100644
--- a/lib/odbc/c_src/odbcserver.c
+++ b/lib/odbc/c_src/odbcserver.c
@@ -98,6 +98,7 @@
/* ----------------------------- INCLUDES ------------------------------*/
+#include <ctype.h>
#include <stdlib.h>
#include <string.h>
#include <stdio.h>
diff --git a/lib/odbc/configure.in b/lib/odbc/configure.in
index 531ad84fb9..f86146759c 100644
--- a/lib/odbc/configure.in
+++ b/lib/odbc/configure.in
@@ -1,7 +1,7 @@
dnl
dnl %CopyrightBegin%
dnl
-dnl Copyright Ericsson AB 2005-2013. All Rights Reserved.
+dnl Copyright Ericsson AB 2005-2014. All Rights Reserved.
dnl
dnl The contents of this file are subject to the Erlang Public License,
dnl Version 1.1, (the "License"); you may not use this file except in
@@ -105,7 +105,12 @@ AC_CHECK_FUNC(gethostbyname, , AC_CHECK_LIB(nsl, main, [LIBS="$LIBS -lnsl"]))
dnl Checks for header files.
AC_HEADER_STDC
AC_CHECK_HEADERS([fcntl.h netdb.h stdlib.h string.h sys/socket.h winsock2.h])
-AC_CHECK_HEADERS([sql.h, sqlext.h], [odbc_required_headers=yes], [odbc_required_headers=no])
+AC_CHECK_HEADERS([windows.h])
+AC_CHECK_HEADERS([sql.h sqlext.h], [odbc_required_headers=yes], [odbc_required_headers=no],
+[[#ifdef HAVE_WINDOWS_H
+ # include <windows.h>
+ #endif
+ ]])
dnl Checks for typedefs, structures, and compiler characteristics.
AC_C_CONST
@@ -131,7 +136,7 @@ AC_SUBST(THR_LIBS)
odbc_lib_link_success=no
AC_SUBST(TARGET_FLAGS)
case $host_os in
- darwin*)
+ darwin1[[0-2]].*|darwin[[0-9]].*)
TARGET_FLAGS="-DUNIX"
if test ! -d "$with_odbc" || test "$with_odbc" = "yes"; then
ODBC_LIB= -L"/usr/lib"
diff --git a/lib/odbc/doc/src/notes.xml b/lib/odbc/doc/src/notes.xml
index 2551637001..0ba2b1ff3f 100644
--- a/lib/odbc/doc/src/notes.xml
+++ b/lib/odbc/doc/src/notes.xml
@@ -31,7 +31,73 @@
<p>This document describes the changes made to the odbc application.
</p>
- <section><title>ODBC 2.10.18</title>
+ <section><title>ODBC 2.10.20</title>
+
+ <section><title>Fixed Bugs and Malfunctions</title>
+ <list>
+ <item>
+ <p>
+ Application upgrade (appup) files are corrected for the
+ following applications: </p>
+ <p>
+ <c>asn1, common_test, compiler, crypto, debugger,
+ dialyzer, edoc, eldap, erl_docgen, et, eunit, gs, hipe,
+ inets, observer, odbc, os_mon, otp_mibs, parsetools,
+ percept, public_key, reltool, runtime_tools, ssh,
+ syntax_tools, test_server, tools, typer, webtool, wx,
+ xmerl</c></p>
+ <p>
+ A new test utility for testing appup files is added to
+ test_server. This is now used by most applications in
+ OTP.</p>
+ <p>
+ (Thanks to Tobias Schlager)</p>
+ <p>
+ Own Id: OTP-11744</p>
+ </item>
+ </list>
+ </section>
+
+
+ <section><title>Improvements and New Features</title>
+ <list>
+ <item>
+ <p>
+ Removed warnings at compile time by adding missing
+ include file (Thanks to Anthony Ramine)</p>
+ <p>
+ Own Id: OTP-11569</p>
+ </item>
+ <item>
+ <p>
+ Apple has removed iODBC in OS X 10.9 Mavericks, but
+ forgot to remove all binaries, adopt configure so that
+ will be possible to build odbc with own installation.</p>
+ <p>
+ Own Id: OTP-11630</p>
+ </item>
+ </list>
+ </section>
+
+</section>
+
+<section><title>ODBC 2.10.19</title>
+
+ <section><title>Fixed Bugs and Malfunctions</title>
+ <list>
+ <item>
+ <p>
+ Updated configure test for header files sql.h and
+ sqlext.h to function correctly on windows.</p>
+ <p>
+ Own Id: OTP-11574</p>
+ </item>
+ </list>
+ </section>
+
+</section>
+
+<section><title>ODBC 2.10.18</title>
<section><title>Improvements and New Features</title>
<list>
diff --git a/lib/odbc/src/odbc.app.src b/lib/odbc/src/odbc.app.src
index 5229b28c08..b2c5775de2 100644
--- a/lib/odbc/src/odbc.app.src
+++ b/lib/odbc/src/odbc.app.src
@@ -11,5 +11,6 @@
]},
{applications, [kernel, stdlib]},
{env,[]},
- {mod, {odbc_app, []}}]}.
+ {mod, {odbc_app, []}},
+ {runtime_dependencies, ["stdlib-2.0","kernel-3.0","erts-6.0"]}]}.
diff --git a/lib/odbc/src/odbc.appup.src b/lib/odbc/src/odbc.appup.src
index c7c83ea079..bf8872eae4 100644
--- a/lib/odbc/src/odbc.appup.src
+++ b/lib/odbc/src/odbc.appup.src
@@ -1,8 +1,24 @@
%% -*- erlang -*-
+%% %CopyrightBegin%
+%%
+%% Copyright Ericsson AB 2014. 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%
{"%VSN%",
[
- {<<"2\\.*">>, [{restart_application, odbc}]}
+ {<<"2\\..*">>, [{restart_application, odbc}]}
],
[
- {<<"2\\.*">>, [{restart_application, odbc}]}
+ {<<"2\\..*">>, [{restart_application, odbc}]}
]}.
diff --git a/lib/odbc/test/odbc_start_SUITE.erl b/lib/odbc/test/odbc_start_SUITE.erl
index e3a3440559..a7bb1d0ffe 100644
--- a/lib/odbc/test/odbc_start_SUITE.erl
+++ b/lib/odbc/test/odbc_start_SUITE.erl
@@ -109,8 +109,8 @@ suite() -> [{ct_hooks,[ts_install_cth]}].
all() ->
case odbc_test_lib:odbc_check() of
- ok -> [start];
- Other -> {skip, Other}
+ ok -> [app, appup, start];
+ Other -> [app, appup]
end.
groups() ->
@@ -127,6 +127,14 @@ end_per_group(_GroupName, Config) ->
%% Test cases starts here.
%%--------------------------------------------------------------------
+%% Test that the odbc app file is ok
+app(Config) when is_list(Config) ->
+ ok = ?t:app_test(odbc).
+
+%% Test that the odbc appup file is ok
+appup(Config) when is_list(Config) ->
+ ok = ?t:appup_test(odbc).
+
start(doc) ->
["Test start/stop of odbc"];
start(suite) ->
diff --git a/lib/odbc/vsn.mk b/lib/odbc/vsn.mk
index 6ac83a7718..1af4751248 100644
--- a/lib/odbc/vsn.mk
+++ b/lib/odbc/vsn.mk
@@ -1 +1 @@
-ODBC_VSN = 2.10.18
+ODBC_VSN = 2.10.20
diff --git a/lib/orber/doc/src/notes.xml b/lib/orber/doc/src/notes.xml
index c4d13a5a2f..93dc403c47 100644
--- a/lib/orber/doc/src/notes.xml
+++ b/lib/orber/doc/src/notes.xml
@@ -33,7 +33,26 @@
</header>
- <section><title>Orber 3.6.26.1</title>
+ <section><title>Orber 3.6.27</title>
+
+ <section><title>Fixed Bugs and Malfunctions</title>
+ <list>
+ <item>
+ <p>
+ Some local implementations of removing the last element
+ from a list are replaced by <c>lists:droplast/1</c>. Note
+ that this requires at least <c>stdlib-2.0</c>, which is
+ the stdlib version delivered in OTP 17.0. (Thanks to Hans
+ Svensson)</p>
+ <p>
+ Own Id: OTP-11678</p>
+ </item>
+ </list>
+ </section>
+
+</section>
+
+<section><title>Orber 3.6.26.1</title>
<section><title>Improvements and New Features</title>
<list>
diff --git a/lib/orber/src/Makefile b/lib/orber/src/Makefile
index 1c6781e5fd..d96350f4d5 100644
--- a/lib/orber/src/Makefile
+++ b/lib/orber/src/Makefile
@@ -21,9 +21,6 @@ include $(ERL_TOP)/make/target.mk
include $(ERL_TOP)/make/$(TARGET)/otp.mk
-# To get hold of SYSTEM_VSN (e.g. R9C).
-#include $(ERL_TOP)/erts/vsn.mk
-
# ----------------------------------------------------
# Application version
# ----------------------------------------------------
diff --git a/lib/orber/src/orber.app.src b/lib/orber/src/orber.app.src
index 88df4162b6..30bd90347d 100644
--- a/lib/orber/src/orber.app.src
+++ b/lib/orber/src/orber.app.src
@@ -103,7 +103,9 @@
orber_iiop_pm, orber_env]},
{applications, [stdlib, kernel, mnesia]},
{env, []},
- {mod, {orber, []}}
+ {mod, {orber, []}},
+ {runtime_dependencies, ["stdlib-2.0","ssl-5.3.4","mnesia-4.12","kernel-3.0",
+ "inets-5.10","erts-6.0"]}
]}.
diff --git a/lib/orber/src/orber_interceptors.erl b/lib/orber/src/orber_interceptors.erl
index 407823ea79..62870b35b5 100644
--- a/lib/orber/src/orber_interceptors.erl
+++ b/lib/orber/src/orber_interceptors.erl
@@ -112,7 +112,7 @@ pop_system_message_interceptor(out) ->
[{_, []}] ->
ok;
[{_, Interceptors}] ->
- ets:insert(orber_interceptors, {message_out_interceptors, remove_last_element(Interceptors)});
+ ets:insert(orber_interceptors, {message_out_interceptors, lists:droplast(Interceptors)});
_ ->
corba:raise(#'INTERNAL'{completion_status=?COMPLETED_NO})
end.
@@ -151,12 +151,3 @@ apply_message_interceptors([], F, ObjRef, Bytes) ->
apply_message_interceptors([M | Rest], F, ObjRef, Bytes) ->
apply_message_interceptors(Rest, F, ObjRef, apply(M, F, [ObjRef, Bytes])).
-
-remove_last_element([]) ->
- [];
-remove_last_element([M]) ->
- [];
-remove_last_element([M |Tail]) ->
- remove_last_element([Tail]).
-
-
diff --git a/lib/orber/vsn.mk b/lib/orber/vsn.mk
index 7bbebc65dc..3ea64b1ff6 100644
--- a/lib/orber/vsn.mk
+++ b/lib/orber/vsn.mk
@@ -1,2 +1,2 @@
-ORBER_VSN = 3.6.26.1
+ORBER_VSN = 3.6.27
diff --git a/lib/os_mon/c_src/memsup.c b/lib/os_mon/c_src/memsup.c
index b5114d10ed..409db84aa7 100644
--- a/lib/os_mon/c_src/memsup.c
+++ b/lib/os_mon/c_src/memsup.c
@@ -324,7 +324,7 @@ get_mem_procfs(memory_ext *me){
/* arch specific functions */
-#if defined(__linux__) /* ifdef SYSINFO */
+#if defined(__linux__) && !defined(__ANDROID__)/* ifdef SYSINFO */
/* sysinfo does not include cached memory which is a problem. */
static int
get_extended_mem_sysinfo(memory_ext *me) {
@@ -395,8 +395,12 @@ get_extended_mem_sgi(memory_ext *me) {
static void
get_extended_mem(memory_ext *me) {
+/* android */
+#if defined(__ANDROID__)
+ if (get_mem_procfs(me)) return;
+
/* linux */
-#if defined(__linux__)
+#elif defined(__linux__)
if (get_mem_procfs(me)) return;
if (get_extended_mem_sysinfo(me)) return;
diff --git a/lib/os_mon/doc/src/notes.xml b/lib/os_mon/doc/src/notes.xml
index 3a7d7793d4..5ac04d4f42 100644
--- a/lib/os_mon/doc/src/notes.xml
+++ b/lib/os_mon/doc/src/notes.xml
@@ -30,6 +30,48 @@
</header>
<p>This document describes the changes made to the OS_Mon application.</p>
+<section><title>Os_Mon 2.2.15</title>
+
+ <section><title>Fixed Bugs and Malfunctions</title>
+ <list>
+ <item>
+ <p>
+ Application upgrade (appup) files are corrected for the
+ following applications: </p>
+ <p>
+ <c>asn1, common_test, compiler, crypto, debugger,
+ dialyzer, edoc, eldap, erl_docgen, et, eunit, gs, hipe,
+ inets, observer, odbc, os_mon, otp_mibs, parsetools,
+ percept, public_key, reltool, runtime_tools, ssh,
+ syntax_tools, test_server, tools, typer, webtool, wx,
+ xmerl</c></p>
+ <p>
+ A new test utility for testing appup files is added to
+ test_server. This is now used by most applications in
+ OTP.</p>
+ <p>
+ (Thanks to Tobias Schlager)</p>
+ <p>
+ Own Id: OTP-11744</p>
+ </item>
+ </list>
+ </section>
+
+
+ <section><title>Improvements and New Features</title>
+ <list>
+ <item>
+ <p>
+ Calls to erlang:open_port/2 with 'spawn' are updated to
+ handle space in the command path.</p>
+ <p>
+ Own Id: OTP-10842</p>
+ </item>
+ </list>
+ </section>
+
+</section>
+
<section><title>Os_Mon 2.2.14</title>
<section><title>Fixed Bugs and Malfunctions</title>
diff --git a/lib/os_mon/src/os_mon.app.src b/lib/os_mon/src/os_mon.app.src
index 15bbd2663c..cc08cebe3d 100644
--- a/lib/os_mon/src/os_mon.app.src
+++ b/lib/os_mon/src/os_mon.app.src
@@ -29,4 +29,7 @@
{start_disksup, true},
{start_memsup, true},
{start_os_sup, false}]},
- {mod, {os_mon, []}}]}.
+ {mod, {os_mon, []}},
+ {runtime_dependencies, ["stdlib-2.0","snmp-4.25.1","sasl-2.4",
+ "otp_mibs-1.0.9","mnesia-4.12","kernel-3.0",
+ "erts-6.0"]}]}.
diff --git a/lib/os_mon/src/os_mon.appup.src b/lib/os_mon/src/os_mon.appup.src
index f8e09a7d87..480f5d9511 100644
--- a/lib/os_mon/src/os_mon.appup.src
+++ b/lib/os_mon/src/os_mon.appup.src
@@ -1,7 +1,7 @@
-%%
+%% -*- erlang -*-
%% %CopyrightBegin%
%%
-%% Copyright Ericsson AB 2001-2009. All Rights Reserved.
+%% Copyright Ericsson AB 2001-2014. 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
@@ -16,26 +16,7 @@
%%
%% %CopyrightEnd%
%%
-
{"%VSN%",
- [
- {"2.1",
- [{load_module, cpu_sup},
- {load_module, disksup},
- {load_module, memsup},
- {load_module, os_mon},
- {load_module, os_mon_mib}]},
- {"2.1.1",
- [{load_module, os_mon_mib}]}
- ],
- [
- {"2.1",
- [{load_module, cpu_sup},
- {load_module, disksup},
- {load_module, memsup},
- {load_module, os_mon},
- {load_module, os_mon_mib}]},
- {"2.1.1",
- [{load_module, os_mon_mib}]}
- ]
+ [{<<".*">>,[{restart_application, os_mon}]}],
+ [{<<".*">>,[{restart_application, os_mon}]}]
}.
diff --git a/lib/os_mon/test/cpu_sup_SUITE.erl b/lib/os_mon/test/cpu_sup_SUITE.erl
index e0382cb0c7..9f58e043db 100644
--- a/lib/os_mon/test/cpu_sup_SUITE.erl
+++ b/lib/os_mon/test/cpu_sup_SUITE.erl
@@ -1,7 +1,7 @@
%%
%% %CopyrightBegin%
%%
-%% Copyright Ericsson AB 2002-2011. All Rights Reserved.
+%% Copyright Ericsson AB 2002-2014. 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
@@ -257,8 +257,8 @@ port(Config) when is_list(Config) ->
terminate(suite) ->
[];
terminate(Config) when is_list(Config) ->
- ?line ok = application:set_env(os_mon, start_cpu_sup, false),
- ?line ok = supervisor:terminate_child(os_mon_sup, cpu_sup),
+ ok = application:set_env(os_mon, start_cpu_sup, false),
+ _ = supervisor:terminate_child(os_mon_sup, cpu_sup),
ok.
unavailable(suite) ->
diff --git a/lib/os_mon/test/disksup_SUITE.erl b/lib/os_mon/test/disksup_SUITE.erl
index 9c65d8b692..94661cfa77 100644
--- a/lib/os_mon/test/disksup_SUITE.erl
+++ b/lib/os_mon/test/disksup_SUITE.erl
@@ -1,7 +1,7 @@
%%
%% %CopyrightBegin%
%%
-%% Copyright Ericsson AB 1996-2011. All Rights Reserved.
+%% Copyright Ericsson AB 1996-2014. 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
@@ -350,15 +350,16 @@ otp_5910(doc) ->
otp_5910(Config) when is_list(Config) ->
%% Make sure disksup sets at least one alarm
- Data = disksup:get_disk_data(),
+ Data = lists:sort(disksup:get_disk_data()),
Threshold0 = disksup:get_almost_full_threshold(),
Threshold = case over_threshold(Data, Threshold0) of
- 0 ->
- [{_Id,_Kbyte,Cap}|_] = Data,
- ok = disksup:set_almost_full_threshold((Cap-1)/100),
- Cap-1;
- _N -> Threshold0
- end,
+ 0 ->
+ [{_Id,_Kbyte,Cap}|_] = Data,
+ io:format("Data ~p Threshold ~p ~n",[Data, Cap-1]),
+ ok = disksup:set_almost_full_threshold((Cap-1)/100),
+ Cap-1;
+ _N -> Threshold0
+ end,
ok = application:set_env(os_mon, disk_almost_full_threshold, Threshold/100),
disksup ! timeout, % force a disk check
Data2 = disksup:get_disk_data(),
diff --git a/lib/os_mon/test/os_mon_SUITE.erl b/lib/os_mon/test/os_mon_SUITE.erl
index f074657d4c..08ad8436dd 100644
--- a/lib/os_mon/test/os_mon_SUITE.erl
+++ b/lib/os_mon/test/os_mon_SUITE.erl
@@ -25,7 +25,7 @@
-export([init_per_testcase/2, end_per_testcase/2]).
%% Test cases
--export([app_file/1, config/1]).
+-export([app_file/1, appup_file/1, config/1]).
%% Default timetrap timeout (set in init_per_testcase)
-define(default_timeout, ?t:minutes(1)).
@@ -43,8 +43,8 @@ suite() -> [{ct_hooks,[ts_install_cth]}].
all() ->
case test_server:os_type() of
- {unix, sunos} -> [app_file, config];
- _OS -> [app_file]
+ {unix, sunos} -> [app_file, appup_file, config];
+ _OS -> [app_file, appup_file]
end.
groups() ->
@@ -71,6 +71,9 @@ app_file(Config) when is_list(Config) ->
?line ok = test_server:app_test(os_mon),
ok.
+appup_file(Config) when is_list(Config) ->
+ ok = test_server:appup_test(os_mon).
+
config(suite) ->
[];
config(doc) ->
diff --git a/lib/os_mon/vsn.mk b/lib/os_mon/vsn.mk
index e9e90729f2..74397c2bc6 100644
--- a/lib/os_mon/vsn.mk
+++ b/lib/os_mon/vsn.mk
@@ -1 +1 @@
-OS_MON_VSN = 2.2.14
+OS_MON_VSN = 2.2.15
diff --git a/lib/ose/Makefile b/lib/ose/Makefile
new file mode 100644
index 0000000000..2959f04c3e
--- /dev/null
+++ b/lib/ose/Makefile
@@ -0,0 +1,36 @@
+#
+# %CopyrightBegin%
+#
+# Copyright Ericsson AB 1996-2009. 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%
+#
+include $(ERL_TOP)/make/target.mk
+include $(ERL_TOP)/make/$(TARGET)/otp.mk
+
+#
+# Macros
+#
+
+SUB_DIRECTORIES = src doc/src
+
+include vsn.mk
+VSN = $(OSE_VSN)
+
+SPECIAL_TARGETS =
+
+#
+# Default Subdir Targets
+#
+include $(ERL_TOP)/make/otp_subdir.mk
diff --git a/lib/ose/doc/html/.gitignore b/lib/ose/doc/html/.gitignore
new file mode 100644
index 0000000000..e69de29bb2
--- /dev/null
+++ b/lib/ose/doc/html/.gitignore
diff --git a/lib/ose/doc/man3/.gitignore b/lib/ose/doc/man3/.gitignore
new file mode 100644
index 0000000000..e69de29bb2
--- /dev/null
+++ b/lib/ose/doc/man3/.gitignore
diff --git a/lib/ose/doc/man6/.gitignore b/lib/ose/doc/man6/.gitignore
new file mode 100644
index 0000000000..e69de29bb2
--- /dev/null
+++ b/lib/ose/doc/man6/.gitignore
diff --git a/lib/ose/doc/pdf/.gitignore b/lib/ose/doc/pdf/.gitignore
new file mode 100644
index 0000000000..e69de29bb2
--- /dev/null
+++ b/lib/ose/doc/pdf/.gitignore
diff --git a/lib/ose/doc/src/.gitignore b/lib/ose/doc/src/.gitignore
new file mode 100644
index 0000000000..860e9e703e
--- /dev/null
+++ b/lib/ose/doc/src/.gitignore
@@ -0,0 +1 @@
+ose.xml
diff --git a/lib/ose/doc/src/Makefile b/lib/ose/doc/src/Makefile
new file mode 100644
index 0000000000..dd58029064
--- /dev/null
+++ b/lib/ose/doc/src/Makefile
@@ -0,0 +1,132 @@
+#
+# %CopyrightBegin%
+#
+# Copyright Ericsson AB 1997-2012. 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%
+#
+include $(ERL_TOP)/make/target.mk
+include $(ERL_TOP)/make/$(TARGET)/otp.mk
+
+# ----------------------------------------------------
+# Application version
+# ----------------------------------------------------
+include ../../vsn.mk
+VSN=$(OSE_VSN)
+APPLICATION=ose
+
+# ----------------------------------------------------
+# Release directory specification
+# ----------------------------------------------------
+RELSYSDIR = $(RELEASE_PATH)/lib/$(APPLICATION)-$(VSN)
+
+# ----------------------------------------------------
+# Help application directory specification
+# ----------------------------------------------------
+EDOC_DIR = $(ERL_TOP)/lib/edoc
+SYNTAX_TOOLS_DIR = $(ERL_TOP)/lib/syntax_tools
+
+# ----------------------------------------------------
+# Target Specs
+# ----------------------------------------------------
+XML_APPLICATION_FILES = ref_man.xml
+
+XML_REF3_FILES = \
+ ose.xml \
+ ose_erl_driver.xml
+
+XML_REF6_FILES = ose_app.xml
+
+XML_PART_FILES = part.xml
+XML_CHAPTER_FILES = notes.xml ose_intro.xml ose_signals_chapter.xml
+
+BOOK_FILES = book.xml
+
+XML_FILES = \
+ $(BOOK_FILES) $(XML_CHAPTER_FILES) \
+ $(XML_PART_FILES) $(XML_REF3_FILES) $(XML_REF6_FILES) \
+ $(XML_APPLICATION_FILES)
+
+# ----------------------------------------------------
+
+HTML_FILES = $(XML_APPLICATION_FILES:%.xml=$(HTMLDIR)/%.html) \
+ $(XML_PART_FILES:%.xml=$(HTMLDIR)/%.html)
+
+INFO_FILE = ../../info
+
+MAN3_FILES = $(XML_REF3_FILES:%.xml=$(MAN3DIR)/%.3)
+MAN6_FILES = $(XML_REF6_FILES:%_app.xml=$(MAN6DIR)/%.6)
+
+HTML_REF_MAN_FILE = $(HTMLDIR)/index.html
+
+TOP_PDF_FILE = $(PDFDIR)/$(APPLICATION)-$(VSN).pdf
+
+SPECS_FILES =
+
+TOP_SPECS_FILE =
+
+# ----------------------------------------------------
+# FLAGS
+# ----------------------------------------------------
+XML_FLAGS +=
+
+SPECS_FLAGS = -I../../include -I../../../kernel/include
+
+OSE_SRC_DIR = ../../src
+
+# ----------------------------------------------------
+# Targets
+# ----------------------------------------------------
+docs: man pdf html
+
+$(TOP_PDF_FILE): $(XML_FILES)
+
+pdf: $(TOP_PDF_FILE)
+
+html: $(HTML_REF_MAN_FILE)
+
+man: $(MAN3_FILES) $(MAN6_FILES)
+
+ose.xml: $(OSE_SRC_DIR)/ose.erl
+ escript $(DOCGEN)/priv/bin/xml_from_edoc.escript\
+ $(OSE_SRC_DIR)/$(@:%.xml=%.erl)
+
+debug opt:
+
+clean clean_docs:
+ rm -rf $(HTMLDIR)/*
+ rm -f $(MAN3DIR)/*
+ rm -f $(MAN6DIR)/*
+ rm -f $(TOP_PDF_FILE) $(TOP_PDF_FILE:%.pdf=%.fo)
+ rm -f $(SPECDIR)/*
+ rm -f errs core *~
+
+# ----------------------------------------------------
+# Release Target
+# ----------------------------------------------------
+include $(ERL_TOP)/make/otp_release_targets.mk
+
+release_docs_spec: docs
+ $(INSTALL_DIR) "$(RELSYSDIR)/doc/pdf"
+ $(INSTALL_DATA) $(TOP_PDF_FILE) "$(RELSYSDIR)/doc/pdf"
+ $(INSTALL_DIR) "$(RELSYSDIR)/doc/html"
+ $(INSTALL_DATA) $(HTMLDIR)/* \
+ "$(RELSYSDIR)/doc/html"
+ $(INSTALL_DATA) $(INFO_FILE) "$(RELSYSDIR)"
+ $(INSTALL_DIR) "$(RELEASE_PATH)/man/man3"
+ $(INSTALL_DATA) $(MAN3DIR)/* "$(RELEASE_PATH)/man/man3"
+ $(INSTALL_DIR) "$(RELEASE_PATH)/man/man6"
+ $(INSTALL_DATA) $(MAN6_FILES) "$(RELEASE_PATH)/man/man6"
+
+release_spec:
diff --git a/lib/ose/doc/src/book.xml b/lib/ose/doc/src/book.xml
new file mode 100644
index 0000000000..485806e05b
--- /dev/null
+++ b/lib/ose/doc/src/book.xml
@@ -0,0 +1,48 @@
+<?xml version="1.0" encoding="utf-8" ?>
+<!DOCTYPE book SYSTEM "book.dtd">
+
+<book xmlns:xi="http://www.w3.org/2001/XInclude">
+ <header titlestyle="normal">
+ <copyright>
+ <year>2014</year><year>2014</year>
+ <holder>Ericsson AB. All Rights Reserved.</holder>
+ </copyright>
+ <legalnotice>
+ 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.
+
+ </legalnotice>
+
+ <title>OSE</title>
+ <prepared>Lukas Larsson</prepared>
+ <docno></docno>
+ <date>2014-01-08</date>
+ <rev>1.0</rev>
+ <file>book.xml</file>
+ </header>
+ <insidecover>
+ </insidecover>
+ <pagetext>OSE</pagetext>
+ <preamble>
+ <contents level="2"></contents>
+ </preamble>
+ <parts>
+ <xi:include href="part.xml"/>
+ </parts>
+ <applications>
+ <xi:include href="ref_man.xml"/>
+ </applications>
+ <releasenotes>
+ <xi:include href="notes.xml"/>
+ </releasenotes>
+ <listofterms></listofterms>
+ <index></index>
+</book>
diff --git a/lib/ose/doc/src/notes.xml b/lib/ose/doc/src/notes.xml
new file mode 100644
index 0000000000..760b92feed
--- /dev/null
+++ b/lib/ose/doc/src/notes.xml
@@ -0,0 +1,33 @@
+<?xml version="1.0" encoding="utf-8" ?>
+<!DOCTYPE chapter SYSTEM "chapter.dtd">
+
+<chapter>
+ <header>
+ <copyright>
+ <year>2014</year><year>2014</year>
+ <holder>Ericsson AB. All Rights Reserved.</holder>
+ </copyright>
+ <legalnotice>
+ 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.
+
+ </legalnotice>
+
+ <title>OSE Release Notes</title>
+ <prepared></prepared>
+ <docno></docno>
+ <date></date>
+ <rev></rev>
+ <file>notes.xml</file>
+ </header>
+ <p>This document describes the changes made to the OSE application.</p>
+
+</chapter>
diff --git a/lib/ose/doc/src/ose_app.xml b/lib/ose/doc/src/ose_app.xml
new file mode 100644
index 0000000000..e40656fd7b
--- /dev/null
+++ b/lib/ose/doc/src/ose_app.xml
@@ -0,0 +1,37 @@
+<?xml version="1.0" encoding="utf-8" ?>
+<!DOCTYPE appref SYSTEM "appref.dtd">
+
+<appref>
+ <header>
+ <copyright>
+ <year>2014</year><year>2014</year>
+ <holder>Ericsson AB. All Rights Reserved.</holder>
+ </copyright>
+ <legalnotice>
+ 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.
+
+ </legalnotice>
+
+ <title>Enea OSE</title>
+ <prepared></prepared>
+ <docno></docno>
+ <date></date>
+ <rev></rev>
+ </header>
+ <app>ose</app>
+ <appsummary>The OSE Application</appsummary>
+ <description>
+ <p>The OSE application contains modules and documentation that only
+ applies when running Erlang/OTP on Enea OSE.</p>
+ </description>
+
+</appref>
diff --git a/lib/ose/doc/src/ose_erl_driver.xml b/lib/ose/doc/src/ose_erl_driver.xml
new file mode 100644
index 0000000000..1d89d7aeea
--- /dev/null
+++ b/lib/ose/doc/src/ose_erl_driver.xml
@@ -0,0 +1,110 @@
+<?xml version="1.0" encoding="utf-8" ?>
+<!DOCTYPE cref SYSTEM "cref.dtd">
+
+<cref>
+ <header>
+ <copyright>
+ <year>2013</year><year>2014</year>
+ <holder>Ericsson AB. All Rights Reserved.</holder>
+ </copyright>
+ <legalnotice>
+ 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.
+
+ </legalnotice>
+
+ <title>erl_driver for Enea OSE</title>
+ <prepared>Lukas Larsson</prepared>
+ <docno></docno>
+ <date>2014-01-08</date>
+ <rev>A</rev>
+ <file>ose_erl_driver.xml</file>
+ </header>
+ <lib>ose_erl_driver</lib>
+ <libsummary>Linked-in drivers in Enea OSE</libsummary>
+ <description>
+ <p>Writing Linked-in drivers that also work on Enea OSE is very similar for
+ how you would do it for Unix. The difference from Unix is that
+ driver_select, ready_input and ready_output all work with signals
+ instead of file descriptors. This means that the driver_select is
+ used to specify which type of signal should trigger calls to
+ ready_input/ready_output. The functions described below are available
+ to driver programmers on Enea OSE to facilitate this.
+ </p>
+ </description>
+ <section>
+ <title>DATA TYPES</title>
+
+ <taglist>
+ <tag><marker id="union_SIGNAL"/>union SIGNAL</tag>
+ <item>See the Enea OSE SPI documentation for a description.</item>
+ <tag><marker id="SIGSELECT"/>SIGSELECT</tag>
+ <item>See the Enea OSE SPI documentation for a description.</item>
+ <tag><marker id="ErlDrvEvent"/>ErlDrvEvent</tag>
+ <item>The <c>ErlDrvEvent</c> is a handle to a signal number and id combination. It is passed to <seealso marker="erts:erl_driver#driver_select">driver_select(3)</seealso>.</item>
+ <tag><marker id="ErlDrvOseEventId"/>ErlDrvOseEventId</tag>
+ <item>This is the id used to associate a specific signal to a
+ certain driver instance. </item>
+ </taglist>
+ </section>
+ <funcs>
+ <func>
+ <name><ret>union SIGNAL *</ret><nametext>erl_drv_ose_get_signal(ErlDrvEvent drv_event)</nametext></name>
+ <desc>
+ <marker id="erl_drv_ose_get_signal"></marker>
+ <p>Fetch the next signal associated with <c>drv_event</c>.
+ Signals will be returned in the order which they were received and
+ when no more signals are available <c>NULL</c> will be returned.
+ Use this function in the ready_input/ready_output callbacks
+ to get signals.</p>
+ </desc>
+ </func>
+ <func>
+ <name><ret>ErlDrvEvent</ret><nametext>erl_drv_ose_event_alloc(SIGSELECT signo, ErlDrvOseEventId id, ErlDrvOseEventId (*resolve_signal)(union SIGNAL* sig), void *extra)</nametext></name>
+ <desc>
+ <marker id="erl_drv_ose_event_alloc"></marker>
+ <p>Create a new <c>ErlDrvEvent</c> associated with <c>signo</c>,
+ <c>id</c> and uses the <c>resolve_signal</c> function to extract
+ the <c>id</c> from a signal with <c>signo</c>. The <c>extra</c>
+ parameter can be used for additional data. See
+ <seealso marker="ose_signals_chapter#driver">
+ Signals in a Linked-in driver</seealso> in the OSE User's Guide.
+ </p>
+ </desc>
+ </func>
+ <func>
+ <name><ret>void</ret><nametext>erl_drv_ose_event_free(ErlDrvEvent drv_event)</nametext></name>
+ <desc>
+ <marker id="erl_drv_ose_event_free"></marker>
+ <p>Free a <c>ErlDrvEvent</c>. This should always be done in the
+ <seealso marker="erts:driver_entry#stop_select">stop_select</seealso>
+ callback when the event is no longer being used.</p>
+ </desc>
+ </func>
+ <func>
+ <name><ret>void</ret><nametext>erl_drv_ose_event_fetch(ErlDrvEvent drv_event, SIGSELECT *signo, ErlDrvOseEventId *id, void **extra)</nametext></name>
+ <desc>
+ <marker id="erl_drv_ose_event_fetch"></marker>
+ <p>Write the signal number, id and any extra data associated with <c>drv_event</c>
+ into <c>*signo</c> and <c>*id</c> respectively. <c>NULL</c> can be
+ also passed as <c>signo</c> or <c>id</c> in order to ignore that field.
+ </p>
+ </desc>
+ </func>
+ </funcs>
+ <section>
+ <title>SEE ALSO</title>
+ <p>
+ <seealso marker="erts:driver_entry">driver_entry(3)</seealso>,
+ <seealso marker="erts:erl_driver">erl_driver(3)</seealso>
+ </p>
+ </section>
+</cref>
diff --git a/lib/ose/doc/src/ose_intro.xml b/lib/ose/doc/src/ose_intro.xml
new file mode 100644
index 0000000000..b5e3ef8b33
--- /dev/null
+++ b/lib/ose/doc/src/ose_intro.xml
@@ -0,0 +1,153 @@
+<?xml version="1.0" encoding="utf-8" ?>
+<!DOCTYPE chapter SYSTEM "chapter.dtd">
+
+<chapter>
+ <header>
+ <copyright>
+ <year>2013</year><year>2014</year>
+ <holder>Ericsson AB. All Rights Reserved.</holder>
+ </copyright>
+ <legalnotice>
+ 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.
+
+ </legalnotice>
+
+ <title>Introduction</title>
+ <prepared>Lukas Larsson</prepared>
+ <docno></docno>
+ <date>2014-01-08</date>
+ <rev>A</rev>
+ <file>ose_intro.xml</file>
+ </header>
+
+ <section>
+ <title>Features</title>
+ </section>
+
+ <section>
+ <title>Starting Erlang/OTP</title>
+ <p>
+ Starting Erlang/OTP on OSE is not as simple as on Unix/Windows (yet).
+ First of all you have to explicitly use the beam (or beam.smp) executables
+ found in erts-X.Y.Z/bin as the load module that you run. This in turn
+ means that you have to supply the raw beam arguments to the emulator
+ when starting. Fortunately <c>erl</c> on Unix/Windows has a
+ undocumented flag called <c>-emu_args_exit</c> that can be used to
+ figure out what the arguments to beam look like. For example:</p>
+ <code># erl +Mut false +A 10 +S 4:4 +Muycs256 +P 2096 +Q 2096 -emu_args_exit
+-Mut
+false
+-A
+10
+-S
+4:4
+-Muycs256
+-P
+2096
+-Q
+2096
+--
+-root
+/usr/local/lib/erlang
+-progname
+erl
+--
+-home
+/home/erlang
+--</code>
+ <p>
+ The arguments are printed on seperate lines to make it possible to know
+ what has to be quoted with &quot;. Each line is one quotable unit.
+ So taking the arguments above you can supply them to pm_create or
+ just execute directly on the command line. For example:</p>
+ <code>rtose@acp3400> pm_install erlang /mst/erlang/erts-6.0/bin/beam.smp
+rtose@acp3400> pm_create -c ARGV="-Mut false -A 10 -S 4:4 -Muycs256 -P 2096 -Q 2099 -- -root /mst/erlang -progname erl -- -home /mst/erlang --" erlang
+pid: 0x110059
+rtose@acp3400> pm_start 0x110059</code>
+ <p>
+ Also note that since we are running erl to figure out the arguments on a
+ seperate machine the paths have to be updated. In the example above
+ <c>/usr/local/lib/erlang</c> was replaced by <c>/mst/erlang/</c>. The
+ goal is to in future releases not have to do the special argument handling
+ but for now (OTP 17.0) you have to do it.
+ </p>
+ <note>
+ Because of a limitation in the way the OSE handles stdio when starting
+ load modules using pm_install/create the Erlang shell only reads every
+ other command from stdin. However if you start Erlang using run_erl
+ you do not have this problem. So it is highly recommended that you
+ start Erlang using run_erl.
+ </note>
+ </section>
+
+ <section>
+ <title>run_erl and to_erl</title>
+ <p>
+ In OSE run_erl and to_erl are combined into a single load module called
+ run_erl_lm. Installing and starting the load module will add two new
+ shell commands called run_erl and to_erl. They work in exactly the same
+ way as the unix variants of run_erl and to_erl, except that the read
+ and write pipes have to be placed under the /pipe vm. One additional
+ option also exists to run_erl on ose:
+ <taglist>
+ <tag><c>-block Name</c></tag>
+ <item>The name of the install handle and block that will be created/used by
+ installing and exectuting the first part of the command. If nothing
+ if given the basename of the load module will be used for this value.
+ Example:
+ <code>pm_install erlang /path/to/erlang/vm/beam.smp
+run_erl -daemon -block erlang /pipe/ /mst/erlang_logs/ "beam.smp -A 1 -- -root /mst/erlang -- -home /mst --"</code>
+ </item>
+ </taglist>
+ The same argument munching as when starting Erlang/OTP without run_erl
+ has to be done. If <c>-daemon</c> is given then all error printouts
+ are sent to the ramlog.
+ See also
+ <seealso marker="erts:run_erl">run_erl</seealso> for more details.
+ </p>
+ <p>
+ Below is an example of how to get started with <c>run_erl_lm</c>.
+ <code>rtose@acp3400> pm_install run_erl_lm /mst/erlang/erts-6.0/bin/run_erl_lm
+rtose@acp3400> pm_create run_erl_lm
+pid: 0x1c005d
+rtose@acp3400> pm_start 0x1c005d
+rtose@acp3400> mkdir /mst/erlang_log
+rtose@acp3400> run_erl -daemon /pipe/ /mst/erlang_log/ "/mst/erlang/erts-6.0/bin/beam.smp -A 1 -- -root /mst/erlang -- -home /mst --"
+rtose@acp3400> to_erl
+Attaching to /pipe/erlang.pipe.1 (^C to exit)
+os:type().
+{ose,release}
+2>
+'to_erl' terminated.</code>
+ Note that Ctrl-C is used instead of Ctrl-D to exit the to_erl shell.
+ </p>
+ </section>
+
+ <section>
+ <title>epmd</title>
+ <p>
+ In OSE epmd will not be started automatically so if you want to use
+ Erlang distribution you have to manually start epmd.
+ </p>
+ </section>
+
+ <section>
+ <title>VM Process Priorities</title>
+ <p>
+ It is possible to set the priorities you want for the OSE processes that
+ thr emulator creates in the lmconf. An example of how to do it can be
+ found in the default lmconf file in
+ $ERL_TOP/erts/emulator/sys/ose/beam.lmconf.
+ </p>
+ </section>
+
+</chapter>
diff --git a/lib/ose/doc/src/ose_signals_chapter.xml b/lib/ose/doc/src/ose_signals_chapter.xml
new file mode 100644
index 0000000000..ff501777cc
--- /dev/null
+++ b/lib/ose/doc/src/ose_signals_chapter.xml
@@ -0,0 +1,239 @@
+<?xml version="1.0" encoding="utf-8" ?>
+<!DOCTYPE chapter SYSTEM "chapter.dtd">
+
+<chapter>
+ <header>
+ <copyright>
+ <year>2013</year><year>2014</year>
+ <holder>Ericsson AB. All Rights Reserved.</holder>
+ </copyright>
+ <legalnotice>
+ 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.
+
+ </legalnotice>
+
+ <title>Interacting with Enea OSE</title>
+ <prepared>Lukas Larsson</prepared>
+ <docno></docno>
+ <date>2014-01-08</date>
+ <rev>A</rev>
+ <file>ose_signals_chapter.xml</file>
+ </header>
+
+ <marker id="introduction"></marker>
+ <section>
+ <title>Introduction</title>
+ <p>The main way which programs on Enea OSE interact is through the
+ usage of message passing, much the same way as Erlang processes
+ communicate. There are two ways in which an Erlang programmer can
+ interact with the signals sent from other Enea OSE processes; either
+ through the provided <c>ose</c> module, or by writing a custom linked-in
+ driver. This User's Guide describes and provides examples for both
+ approaches.
+ </p>
+ </section>
+
+ <marker id="erlang"></marker>
+ <section>
+ <title>Signals in Erlang</title>
+ <p>Erlang/OTP on OSE provides a erlang module called
+ <seealso marker="ose:ose">ose</seealso> that can be used to interact
+ with other OSE processes using message passing. The api in the module
+ is very similar to the native OSE api, so for details of how the
+ functions work please refer to the official OSE documenation. Below
+ is an example usage of the API.
+ </p>
+ <code>1> P1 = ose:open("p1").
+#Port&gt;0.344>
+2> ose:hunt(P1,"p2").
+{#Port&gt;0.344>,1}
+3> P2 = ose:open("p2").
+#Port&gt;0.355>
+4> flush().
+Shell got {mailbox_up,#Port&gt;0.344>,{#Port&gt;0.344>,1},852189}
+ok
+5> ose:listen(P1,[1234]).
+ok
+6> ose:send(P2,ose:get_id(P1),1234,&gt;&gt;"hello">>).
+ok
+7> flush().
+Shell got {message,#Port&gt;0.344>,{852189,1245316,1234,&gt;&gt;"hello">>}}
+ok</code>
+ </section>
+
+ <marker id="driver"></marker>
+ <section>
+ <title>Signals in a Linked-in driver</title>
+ <p>
+ Writing Linked-in drivers for OSE is very similar to how it is done
+ for Unix/Windows. It is only the way in which the driver subscribes
+ and consumed external events that is different. In Unix (and Windows)
+ file descriptiors (and Event Objects) are used to select on. On OSE
+ we use signals to deliver the same functionality. There are two large
+ differences between a signal and an fd.
+ </p>
+ <p>
+ In OSE it is not possible for a signal number to be a unique identifier
+ for a resource in the same way as an fd is. For example; let's say we
+ implement a driver that does an asynchronous hunt that uses signal
+ number 1234 as the hunt_sig. If we want to be able to have multiple
+ hunt ports running at the same time we have to have someway of routing
+ the signal to the correct port. This is achieved by supplying a secondary
+ id that can be retrieved through the meta-data or payload of the signal,
+ e.g:
+ <code>ErlDrvEvent event = erl_drv_ose_event_alloc(1234,port,resolver);</code>
+ The event you get back from
+ <seealso marker="ose_erl_driver#erl_drv_ose_event_alloc">
+ erl_drv_ose_event_alloc</seealso> can then be used by
+ <seealso marker="erts:erl_driver#driver_select">driver_select</seealso>
+ to subscribe to signals. The first argument is just the signal number
+ that we are interested in. The second is the id that we choose to use,
+ in this case the port id that we got in the
+ <seealso marker="erts:driver_entry#start">start</seealso> callback is
+ used. The third argument is a function pointer to a function that can
+ be used to figure out the id from a given signal. The fourth argument can
+ point to any additional data you might want to associate with the event.
+ There is a complete. You can examine the data contained in the event with
+ <seealso marker="ose_erl_driver#erl_drv_ose_event_fetch">erl_drv_ose_event_fetch</seealso>
+ , eg:
+ <code>erl_drv_ose_event_fetch(event, &amp;signal, &amp;port, (void **)&amp;extra);</code>
+ example of what this could look like in
+ <seealso marker="#example">the next section</seealso>.
+ <note>It is very important to issue the driver_select call before
+ any of the signals you are interested in are sent. If driver_select
+ is called after the signal is sent, there is a high probability that it
+ will be lost.</note>
+ </p>
+ <p>
+ The other difference from unix is that in OSE the payload of the event
+ (i.e. the signal data) is already received when the ready_output/input
+ callbacks are called. This means that you access the data of a signal
+ by calling <seealso marker="ose_erl_driver#erl_drv_ose_get_signal">
+ erl_drv_ose_get_signal</seealso>. Additionally multiple signals might be
+ associated with the event, so you should call
+ <seealso marker="ose_erl_driver#erl_drv_ose_get_signal">
+ erl_drv_ose_get_signal</seealso> until <c>NULL</c> is returned.
+ </p>
+ </section>
+
+ <marker id="example"></marker>
+ <section>
+ <title>Example Linked-in driver</title>
+<code>#include "erl_driver.h"
+#include "ose.h"
+
+struct huntsig {
+ SIGSELECT signo;
+ ErlDrvPort port;
+};
+
+union SIGNAL {
+ SIGSELECT signo;
+ struct huntsig;
+}
+
+/* Here we have to get the id from the signal. In this case we use the
+ port id since we have control over the data structure of the signal.
+ It is however possible to use anything in here. The only restriction
+ is that the same id has to be used for all signals of the same number.*/
+ErlDrvOseEventId resolver(union SIGNAL *sig) {
+ return (ErlDrvOseEventId)sig->huntsig.port;
+}
+
+static int drv_init(void) { return 0; };
+
+static ErlDrvData drv_start(ErlDrvPort port, char *command) {
+ return (ErlDrvData)port;
+}
+
+static ErlDrvSSizeT control(ErlDrvData driver_data, unsigned int cmd,
+ char *buf, ErlDrvSizeT len,
+ char **rbuf, ErlDrvSizeT rlen) {
+ ErlDrvPort port = (ErlDrvPort)driver_data;
+
+ /* An example of extra data to associate with the event */
+ char *extra_data = driver_alloc(80);
+ snprintf("extra_data, "Event, sig_no: 1234, and port: %d", port);
+
+ /* Create a new event to select on */
+ ErlDrvOseEvent evt = erl_drv_ose_event_alloc(1234,port,resolver, extra_data);
+
+ /* Make sure to do the select call _BEFORE_ the signal arrives.
+ The signal might get lost if the hunt call is done before the
+ select. */
+ driver_select(port,evt,ERL_DRV_READ|ERL_DRV_USE,1);
+
+ union SIGNAL *sig = alloc(sizeof(union SIGNAL),1234);
+ sig->huntsig.port = port;
+ hunt("testprocess",0,NULL,&amp;sig);
+ return 0;
+}
+
+static void ready_input(ErlDrvData driver_data, ErlDrvEvent evt) {
+ char *extra_data;
+ /* Get the first signal payload from the event */
+ union SIGNAL *sig = erl_drv_ose_get_signal(evt);
+ ErlDrvPort port = (ErlDrvPort)driver_data;
+ while (sig != NULL) {
+ if (sig->signo == 1234) {
+ /* Print out the string we added as the extra parameter */
+ erl_drv_ose_event_fetch(evt, NULL, NULL, (void **)&amp;extra_data);
+ printf("We've received: %s\n", extra_data);
+
+ /* If it is our signal we send a message with the sender of the signal
+ to the controlling erlang process */
+ ErlDrvTermData reply[] = { ERL_DRV_UINT, (ErlDrvUInt)sender(&amp;sig) };
+ erl_drv_send_term(port,reply,sizeof(reply) / sizeof(reply[0]));
+ }
+
+ /* Cleanup the signal and deselect on the event.
+ Note that the event itself has to be free'd in the stop_select
+ callback. */
+ free_buf(&amp;sig);
+ driver_select(port,evt,ERL_DRV_READ|ERL_DRV_USE,0);
+
+ /* There could be more than one signal waiting in this event, so
+ we have to loop until sig == NULL */
+ sig = erl_drv_ose_get_signal(evt);
+ }
+}
+
+static void stop_select(ErlDrvEvent event, void *reserved)
+{
+ /* Free the extra_data */
+ erl_drv_ose_event_fetch(evt, NULL, NULL, (void **)&amp;extra_data);
+ driver_free(extra_data);
+
+ /* Free the event itself */
+ erl_drv_ose_event_free(event);
+}
+
+/**
+ * Setup the driver entry for the Erlang runtime
+ **/
+ErlDrvEntry ose_signal_driver_entry = {
+ .init = drv_init,
+ .start = drv_start,
+ .stop = drv_stop,
+ .ready_input = ready_input,
+ .driver_name = DRIVER_NAME,
+ .control = control,
+ .extended_marker = ERL_DRV_EXTENDED_MARKER,
+ .major_version = ERL_DRV_EXTENDED_MAJOR_VERSION,
+ .minor_version = ERL_DRV_EXTENDED_MINOR_VERSION,
+ .driver_flags = ERL_DRV_FLAG_USE_PORT_LOCKING,
+ .stop_select = stop_select
+};
+</code>
+ </section>
+
+</chapter>
diff --git a/lib/ose/doc/src/part.xml b/lib/ose/doc/src/part.xml
new file mode 100644
index 0000000000..250bb11f96
--- /dev/null
+++ b/lib/ose/doc/src/part.xml
@@ -0,0 +1,38 @@
+<?xml version="1.0" encoding="utf-8" ?>
+<!DOCTYPE part SYSTEM "part.dtd">
+
+<part xmlns:xi="http://www.w3.org/2001/XInclude">
+ <header>
+ <copyright>
+ <year>2014</year>
+ <year>2014</year>
+ <holder>Ericsson AB, All Rights Reserved</holder>
+ </copyright>
+ <legalnotice>
+ 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.
+
+ The Initial Developer of the Original Code is Ericsson AB.
+ </legalnotice>
+
+ <title>OSE User's Guide</title>
+ <prepared>Lukas Larsson</prepared>
+ <docno></docno>
+ <date>2014-01-08</date>
+ <rev>1.0</rev>
+ <file>part.xml</file>
+ </header>
+ <description>
+ <p><em>OSE</em>.</p>
+ </description>
+ <xi:include href="ose_intro.xml"/>
+ <xi:include href="ose_signals_chapter.xml"/>
+</part>
diff --git a/lib/ose/doc/src/ref_man.xml b/lib/ose/doc/src/ref_man.xml
new file mode 100644
index 0000000000..54c1182fcb
--- /dev/null
+++ b/lib/ose/doc/src/ref_man.xml
@@ -0,0 +1,39 @@
+<?xml version="1.0" encoding="utf-8" ?>
+<!DOCTYPE application SYSTEM "application.dtd">
+
+<application xmlns:xi="http://www.w3.org/2001/XInclude">
+ <header>
+ <copyright>
+ <year>2014</year><year>2014</year>
+ <holder>Ericsson AB. All Rights Reserved.</holder>
+ </copyright>
+ <legalnotice>
+ 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.
+
+ </legalnotice>
+
+ <title>OSE Reference Manual</title>
+ <prepared>Lukas Larsson</prepared>
+ <docno></docno>
+ <date>2014-01-08</date>
+ <rev>1.0</rev>
+ <file>ref_man.xml</file>
+ </header>
+ <description>
+ <p>The Standard Erlang Libraries application, <em>STDLIB</em>,
+ contains modules for manipulating lists, strings and files etc.</p>
+ <br></br>
+ </description>
+ <xi:include href="ose_app.xml"/>
+ <xi:include href="ose.xml"/>
+ <xi:include href="ose_erl_driver.xml"/>
+</application>
diff --git a/lib/ose/ebin/.gitignore b/lib/ose/ebin/.gitignore
new file mode 100644
index 0000000000..e69de29bb2
--- /dev/null
+++ b/lib/ose/ebin/.gitignore
diff --git a/lib/ose/include/.gitignore b/lib/ose/include/.gitignore
new file mode 100644
index 0000000000..e69de29bb2
--- /dev/null
+++ b/lib/ose/include/.gitignore
diff --git a/lib/ose/info b/lib/ose/info
new file mode 100644
index 0000000000..85c07dbe82
--- /dev/null
+++ b/lib/ose/info
@@ -0,0 +1,2 @@
+group: misc Miscellaneous Applications
+short: Description of Enea OSE specific functionality
diff --git a/lib/ose/src/Makefile b/lib/ose/src/Makefile
new file mode 100644
index 0000000000..88f89578fb
--- /dev/null
+++ b/lib/ose/src/Makefile
@@ -0,0 +1,106 @@
+#
+# %CopyrightBegin%
+#
+# Copyright Ericsson AB 1996-2013. 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%
+#
+
+include $(ERL_TOP)/make/target.mk
+include $(ERL_TOP)/make/$(TARGET)/otp.mk
+
+# ----------------------------------------------------
+# Application version
+# ----------------------------------------------------
+include ../vsn.mk
+VSN=$(OSE_VSN)
+
+# ----------------------------------------------------
+# Release directory specification
+# ----------------------------------------------------
+RELSYSDIR = $(RELEASE_PATH)/lib/ose-$(VSN)
+
+# ----------------------------------------------------
+# Target Specs
+# ----------------------------------------------------
+MODULES= \
+ ose
+
+HRL_FILES=
+
+INTERNAL_HRL_FILES=
+
+ERL_FILES= $(MODULES:%=%.erl)
+
+TARGET_FILES= $(MODULES:%=$(EBIN)/%.$(EMULATOR)) $(APP_TARGET) $(APPUP_TARGET)
+
+APP_FILE= ose.app
+
+APP_SRC= $(APP_FILE).src
+APP_TARGET= $(EBIN)/$(APP_FILE)
+
+APPUP_FILE= ose.appup
+
+APPUP_SRC= $(APPUP_FILE).src
+APPUP_TARGET= $(EBIN)/$(APPUP_FILE)
+
+# ----------------------------------------------------
+# FLAGS
+# ----------------------------------------------------
+
+ifeq ($(NATIVE_LIBS_ENABLED),yes)
+ERL_COMPILE_FLAGS += +native
+endif
+ERL_COMPILE_FLAGS += -I../include -I../../kernel/include -Werror
+
+# ----------------------------------------------------
+# Targets
+# ----------------------------------------------------
+
+debug opt: $(TARGET_FILES)
+
+clean:
+ rm -f $(TARGET_FILES)
+ rm -f core
+ rm -f erl_parse.erl
+
+docs:
+
+# ----------------------------------------------------
+# Special Build Targets
+# ----------------------------------------------------
+
+$(APP_TARGET): $(APP_SRC) ../vsn.mk
+ $(vsn_verbose)sed -e 's;%VSN%;$(VSN);' $< > $@
+
+$(APPUP_TARGET): $(APPUP_SRC) ../vsn.mk
+ $(vsn_verbose)sed -e 's;%VSN%;$(VSN);' $< > $@
+
+# ----------------------------------------------------
+# Release Target
+# ----------------------------------------------------
+include $(ERL_TOP)/make/otp_release_targets.mk
+
+release_spec: opt
+ $(INSTALL_DIR) "$(RELSYSDIR)/src"
+ $(INSTALL_DATA) $(ERL_FILES) "$(RELSYSDIR)/src"
+ $(INSTALL_DIR) "$(RELSYSDIR)/include"
+ $(INSTALL_DIR) "$(RELSYSDIR)/ebin"
+ $(INSTALL_DATA) $(TARGET_FILES) "$(RELSYSDIR)/ebin"
+
+release_docs_spec:
+
+# ----------------------------------------------------
+# Dependencies -- alphabetically, please
+# ----------------------------------------------------
diff --git a/lib/crypto/src/crypto_app.erl b/lib/ose/src/ose.app.src
index f1ea1406e4..60699c369b 100644
--- a/lib/crypto/src/crypto_app.erl
+++ b/lib/ose/src/ose.app.src
@@ -1,39 +1,27 @@
+%% This is an -*- erlang -*- file.
%%
%% %CopyrightBegin%
-%%
-%% Copyright Ericsson AB 1999-2009. All Rights Reserved.
-%%
+%%
+%% Copyright Ericsson AB 1996-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%
-%%
-
-%% Purpose : Application master for CRYPTO.
-
--module(crypto_app).
-
--behaviour(application).
-
--export([start/2, stop/1]).
-
-%% start/2(Type, StartArgs) -> {ok, Pid} | {ok, Pid, State} |
-%% {error, Reason}
%%
-start(_Type, _StartArgs) ->
- crypto_sup:start_link().
-
-%% stop(State) -> void()
+%% %CopyrightEnd%
%%
-stop(_State) ->
- ok.
-
-
+{application, ose,
+ [{description, "Enea OSE specific modules"},
+ {vsn, "%VSN%"},
+ {modules, [ose]},
+ {registered,[]},
+ {applications, [stdlib,kernel]},
+ {env, []},
+ {runtime_dependencies, ["stdlib-2.0","erts-6.0"]}]}.
diff --git a/lib/kernel/test/code_SUITE_data/calendar.erl b/lib/ose/src/ose.appup.src
index c1a4a1c12a..6654efde16 100644
--- a/lib/kernel/test/code_SUITE_data/calendar.erl
+++ b/lib/ose/src/ose.appup.src
@@ -1,23 +1,22 @@
-%%
+%% -*- erlang -*-
%% %CopyrightBegin%
-%%
-%% Copyright Ericsson AB 1997-2009. All Rights Reserved.
-%%
+%%
+%% Copyright Ericsson AB 1999-2013. 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(calendar).
--export([test/1]).
-
-test(apa) ->
- {error, this_function_should_not_be_called}.
+%% %CopyrightEnd%
+{"%VSN%",
+ [
+ ],
+ [
+ ]}.
diff --git a/lib/ose/src/ose.erl b/lib/ose/src/ose.erl
new file mode 100644
index 0000000000..77f11addf9
--- /dev/null
+++ b/lib/ose/src/ose.erl
@@ -0,0 +1,452 @@
+%%
+%% %CopyrightBegin%
+%%
+%% Copyright Ericsson AB 2013. 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%
+%%
+%% @doc Interface module for OSE messaging and process monitoring from Erlang
+%%
+%% For each mailbox created through {@link open/1} a OSE phantom process with
+%% that name is started. Since phantom processes are used the memory footprint
+%% of each mailbox is quite small.
+%%
+%% To receive messages you first have to subscribe to the specific message
+%% numbers that you are interested in with {@link listen/2}. The messages
+%% will be sent to the Erlang process that created the mailbox.
+%%
+%% @end
+%%
+-module(ose).
+
+%%==============================================================================
+%% Exported API
+%%==============================================================================
+-export([open/1,
+ close/1,
+ get_id/1,
+ get_name/2,
+ hunt/2,
+ dehunt/2,
+ attach/2,
+ detach/2,
+ send/4,
+ send/5,
+ listen/2
+ ]).
+
+%%==============================================================================
+%% Types
+%%==============================================================================
+-opaque mailbox() :: port().
+%% Mailbox handle. Implemented as an erlang port.
+
+-opaque mailbox_id() :: integer().
+%% Mailbox ID, this is the same as the process id of an OSE process.
+%% An integer.
+
+-type message_number() :: 0..4294967295.
+%% OSE Signal number
+
+-opaque hunt_ref() :: {mailbox(),integer()}.
+%% Reference from a hunt request. This term will be included
+%% in a successful hunt response.
+
+-opaque attach_ref() :: {mailbox(),integer()}.
+%% Reference from an attach request. This term will be included
+%% in the term returned when the attached mailbox disappears.
+
+-export_type([mailbox_id/0,
+ message_number/0,
+ mailbox/0,
+ hunt_ref/0,
+ attach_ref/0]).
+
+%%==============================================================================
+%% Defines
+%%==============================================================================
+-define(DRIVER_NAME, "ose_signal_drv").
+-define(GET_SPID, 1).
+-define(GET_NAME, 2).
+-define(HUNT, 100).
+-define(DEHUNT, 101).
+-define(ATTACH, 102).
+-define(DETACH, 103).
+-define(SEND, 104).
+-define(SEND_W_S, 105).
+-define(LISTEN, 106).
+-define(OPEN, 200).
+
+-define(INT_32BIT(Int),(is_integer(Int) andalso (Int >= 0) andalso (Int < (1 bsl 32)))).
+
+%%==============================================================================
+%% API functions
+%%==============================================================================
+
+%%------------------------------------------------------------------------------
+%% @doc Create a mailbox with the given name and return a port that handles
+%% the mailbox.
+%%
+%% An OSE phantom process with the given name will be created that will send any
+%% messages sent through this mailbox. Any messages sent to the new OSE process
+%% will automatically be converted to an Erlang message and sent to the Erlang
+%% process that calls this function. See {@link listen/2} for details about the
+%% format of the message sent.
+%%
+%% The caller gets linked to the created mailbox.
+%%
+%% raises: `badarg' | `system_limit'
+%%
+%% @see listen/2
+%% @end
+%%------------------------------------------------------------------------------
+-spec open(Name) -> Port when
+ Name :: iodata(),
+ Port :: mailbox().
+open(Name) ->
+ try open_port({spawn_driver,?DRIVER_NAME}, [binary]) of
+ Port ->
+ try port_command(Port,[?OPEN,Name]) of
+ true ->
+ receive
+ {ose_drv_reply,Port,{error,Error}} ->
+ close(Port),
+ erlang:error(Error,[Name]);
+ {ose_drv_reply,Port,ok} ->
+ Port
+ end
+ catch
+ error:badarg -> close(Port),erlang:error(badarg,[Name])
+ end
+ catch
+ error:badarg -> erlang:error(badarg,[Name])
+ end.
+
+%%------------------------------------------------------------------------------
+%% @doc Close a mailbox
+%%
+%% This kills the OSE phantom process associated with this mailbox.
+%%
+%% Will also consume any ``{'EXIT',Port,_}'' message from the port that comes
+%% due to the port closing when the calling process traps exits.
+%%
+%% raises: `badarg'
+%% @end
+%%------------------------------------------------------------------------------
+-spec close(Port) -> ok when
+ Port :: mailbox().
+close(Port) when is_port(Port) ->
+ %% Copied from prim_inet
+ case erlang:process_info(self(), trap_exit) of
+ {trap_exit,true} ->
+ link(Port),
+ catch erlang:port_close(Port),
+ receive {'EXIT',Port,_} -> ok end;
+ {trap_exit,false} ->
+ catch erlang:port_close(Port),
+ ok
+ end;
+close(NotPort) ->
+ erlang:error(badarg,[NotPort]).
+
+%%------------------------------------------------------------------------------
+%% @doc Get the mailbox id for the given port.
+%%
+%% The mailbox id is the same as the OSE process id of the OSE phantom process
+%% that this mailbox represents.
+%%
+%% raises: `badarg'
+%% @end
+%%------------------------------------------------------------------------------
+-spec get_id(Port) -> Pid when
+ Port :: mailbox(),
+ Pid :: mailbox_id().
+get_id(Port) ->
+ try port_control(Port, ?GET_SPID, <<>>) of
+ <<Spid:32>> -> Spid
+ catch error:_Error ->
+ erlang:error(badarg,[Port])
+ end.
+
+%%------------------------------------------------------------------------------
+%% @doc Get the mailbox name for the given mailbox id.
+%%
+%% The mailbox name is the name of the OSE process with process id Pid.
+%%
+%% This call will fail with badarg if the underlying system does not support
+%% getting the name from a process id.
+%%
+%% raises: `badarg'
+%% @end
+%%------------------------------------------------------------------------------
+-spec get_name(Port, Pid) -> Name | undefined when
+ Port :: mailbox(),
+ Pid :: mailbox_id(),
+ Name :: binary().
+get_name(Port, Pid) when ?INT_32BIT(Pid) ->
+ try port_control(Port, ?GET_NAME, <<Pid:32>>) of
+ [] -> undefined;
+ Res -> Res
+ catch error:_Error ->
+ erlang:error(badarg,[Port,Pid])
+ end;
+get_name(Port, Pid) ->
+ erlang:error(badarg,[Port,Pid]).
+
+
+%%------------------------------------------------------------------------------
+%% @doc Hunt for OSE process by name.
+%%
+%% Will send `{mailbox_up, Port, Ref, MboxId}'
+%% to the calling process when the OSE process becomes available.
+%%
+%% Returns a reference term that can be used to cancel the hunt
+%% using {@link dehunt/2}.
+%%
+%% raises: `badarg'
+%%
+%% @end
+%%------------------------------------------------------------------------------
+-spec hunt(Port, HuntPath) -> Ref when
+ Port :: mailbox(),
+ HuntPath :: iodata(),
+ Ref :: hunt_ref().
+hunt(Port, HuntPath) ->
+ try port_command(Port, [?HUNT,HuntPath]) of
+ true ->
+ receive
+ {ose_drv_reply,Port,{error,Error}} ->
+ erlang:error(Error,[Port,HuntPath]);
+ {ose_drv_reply,Port,Ref} ->
+ Ref
+ end
+ catch error:_Error ->
+ erlang:error(badarg,[Port,HuntPath])
+ end.
+
+%%------------------------------------------------------------------------------
+%% @doc Stop hunting for OSE process.
+%%
+%% If a message for this hunt has been sent but not received
+%% by the calling process, it is removed from the message queue.
+%% Note that this only works if the same process that did
+%% the hunt does the dehunt.
+%%
+%% raises: `badarg'
+%%
+%% @see hunt/2
+%% @end
+%%------------------------------------------------------------------------------
+-spec dehunt(Port, Ref) -> ok when
+ Port :: mailbox(),
+ Ref :: hunt_ref().
+dehunt(Port, {Port,Ref}) when ?INT_32BIT(Ref) ->
+ try port_command(Port, <<?DEHUNT:8, Ref:32>>) of
+ true ->
+ receive
+ {ose_drv_reply,Port,{error,enoent}} ->
+ %% enoent could mean that it is in the message queue
+ receive
+ {mailbox_up, Port, {Port,Ref}, _} ->
+ ok
+ after 0 ->
+ ok
+ end;
+ {ose_drv_reply,Port,ok} ->
+ ok
+ end
+ catch error:_Error ->
+ erlang:error(badarg,[Port,{Port,Ref}])
+ end;
+dehunt(Port,Ref) ->
+ erlang:error(badarg,[Port,Ref]).
+
+%%------------------------------------------------------------------------------
+%% @doc Attach to an OSE process.
+%%
+%% Will send `{mailbox_down, Port, Ref, MboxId}'
+%% to the calling process if the OSE process exits.
+%%
+%% Returns a reference that can be used to cancel the attachment
+%% using {@link detach/2}.
+%%
+%% raises: `badarg' | `enomem'
+%%
+%% @end
+%%------------------------------------------------------------------------------
+-spec attach(Port,Pid) -> Ref when
+ Port :: mailbox(),
+ Pid :: mailbox_id(),
+ Ref :: attach_ref().
+attach(Port, Spid) when ?INT_32BIT(Spid) ->
+ try port_command(Port, <<?ATTACH:8, Spid:32>>) of
+ true ->
+ receive
+ {ose_drv_reply,Port,{error,Error}} ->
+ erlang:error(Error,[Port,Spid]);
+ {ose_drv_reply,Port,Ref} ->
+ Ref
+ end
+ catch error:_Error ->
+ erlang:error(badarg,[Port,Spid])
+ end;
+attach(Port,Spid) ->
+ erlang:error(badarg,[Port,Spid]).
+
+
+%%------------------------------------------------------------------------------
+%% @doc Remove attachment to an OSE process.
+%%
+%% If a message for this monitor has been sent but not received
+%% by the calling process, it is removed from the message queue.
+%% Note that this only works of the same process
+%% that did the attach does the detach.
+%%
+%% raises: `badarg'
+%%
+%% @see attach/2
+%% @end
+%%------------------------------------------------------------------------------
+-spec detach(Port,Ref) -> ok when
+ Port :: mailbox(),
+ Ref :: attach_ref().
+detach(Port, {Port,Ref} ) when ?INT_32BIT(Ref) ->
+ try port_command(Port, <<?DETACH:8, Ref:32>>) of
+ true ->
+ receive
+ {ose_drv_reply,Port,{error,enoent}} ->
+ %% enoent could mean that it is in the message queue
+ receive
+ {mailbox_down,Port,{Port,Ref},_} ->
+ ok
+ after 0 ->
+ ok
+ end;
+ {ose_drv_reply,Port,ok} ->
+ ok
+ end
+ catch error:_Error ->
+ erlang:error(badarg,[Port,{Port,Ref}])
+ end;
+detach(Port,Ref) ->
+ erlang:error(badarg,[Port,Ref]).
+
+%%------------------------------------------------------------------------------
+%% @doc Send an OSE message.
+%%
+%% The message is sent from the OSE process' own ID that is: `get_id(Port)'.
+%%
+%% raises: `badarg'
+%%
+%% @see send/5
+%% @end
+%%------------------------------------------------------------------------------
+-spec send(Port,Pid,SigNo,SigData) -> ok when
+ Port :: mailbox(),
+ Pid :: mailbox_id(),
+ SigNo :: message_number(),
+ SigData :: iodata().
+send(Port, Spid, SigNo, SigData) when ?INT_32BIT(Spid), ?INT_32BIT(SigNo) ->
+ try erlang:port_command(Port, [<<?SEND:8, Spid:32, SigNo:32>>, SigData]) of
+ true -> ok
+ catch error:_Error ->
+ erlang:error(badarg,[Port,Spid,SigNo,SigData])
+ end;
+send(Port,Spid,SigNo,SigData) ->
+ erlang:error(badarg,[Port,Spid,SigNo,SigData]).
+
+
+%%------------------------------------------------------------------------------
+%% @doc Send an OSE message with different sender.
+%%
+%% As {@link send/4} but the sender will be `SenderPid'.
+%%
+%% raises: `badarg'
+%%
+%% @see send/4
+%% @end
+%%------------------------------------------------------------------------------
+-spec send(Port,Pid,SenderPid,SigNo,SigData) -> ok when
+ Port :: mailbox(),
+ Pid :: mailbox_id(),
+ SenderPid :: mailbox_id(),
+ SigNo :: message_number(),
+ SigData :: iodata().
+send(Port, Spid, SenderPid, SigNo, SigData)
+ when ?INT_32BIT(Spid), ?INT_32BIT(SenderPid), ?INT_32BIT(SigNo) ->
+ try erlang:port_command(Port, [<<?SEND_W_S:8, Spid:32, SenderPid:32,
+ SigNo:32>>, SigData]) of
+ true -> ok
+ catch error:_Error ->
+ erlang:error(badarg,[Port,Spid,SenderPid,SigNo,SigData])
+ end;
+send(Port,Spid,SenderPid,SigNo,SigData) ->
+ erlang:error(badarg,[Port,Spid,SenderPid,SigNo,SigData]).
+
+%%------------------------------------------------------------------------------
+%% @doc Start listening for specified OSE signal numbers.
+%%
+%% The mailbox will send `{message,Port,{FromMboxId,ToMboxId,MsgNo,MsgData}}'
+%% to the process that created the mailbox when an OSE message with any
+%% of the specified `SigNos' arrives.
+%%
+%% Repeated calls to listen will replace the current set of signal numbers to
+%% listen to. i.e
+%%
+%% ```1>ose:listen(MsgB,[1234,12345]).
+%% ok
+%% 2> ose:listen(MsgB,[1234,123456]).
+%% ok.'''
+%%
+%% The above will first listen for signals with numbers 1234 and 12345, and then
+%% replace that with only listening to 1234 and 123456.
+%%
+%% With the current implementation it is not possible to listen to all signal
+%% numbers.
+%%
+%% raises: `badarg' | `enomem'
+%%
+%% @end
+%%------------------------------------------------------------------------------
+-spec listen(Port, SigNos) -> ok when
+ Port :: mailbox(),
+ SigNos :: list(message_number()).
+listen(Port, SigNos) when is_list(SigNos) ->
+ USSigNos = lists:usort(SigNos),
+ BinSigNos = try
+ << <<SigNo:32>> ||
+ SigNo <- USSigNos,
+ ?INT_32BIT(SigNo) orelse erlang:error(badarg)
+ >>
+ catch _:_ ->
+ erlang:error(badarg,[Port,SigNos])
+ end,
+ try port_command(Port, [?LISTEN, BinSigNos]) of
+ true ->
+ receive
+ {ose_drv_reply,Port,{error,Error}} ->
+ erlang:error(Error,[Port,SigNos]);
+ {ose_drv_reply,Port,Else} ->
+ Else
+ end
+ catch error:_Error ->
+ erlang:error(badarg,[Port,SigNos])
+ end;
+listen(Port, SigNos) ->
+ erlang:error(badarg,[Port,SigNos]).
+
+
+%%%=============================================================================
+%%% Internal functions
+%%%=============================================================================
diff --git a/lib/ose/test/Makefile b/lib/ose/test/Makefile
new file mode 100644
index 0000000000..7e2080ba38
--- /dev/null
+++ b/lib/ose/test/Makefile
@@ -0,0 +1,67 @@
+include $(ERL_TOP)/make/target.mk
+include $(ERL_TOP)/make/$(TARGET)/otp.mk
+
+# ----------------------------------------------------
+# Target Specs
+# ----------------------------------------------------
+
+MODULES= \
+ ose_SUITE
+
+ERL_FILES= $(MODULES:%=%.erl)
+
+TARGET_FILES= $(MODULES:%=$(EBIN)/%.$(EMULATOR))
+
+INSTALL_PROGS= $(TARGET_FILES)
+
+# ----------------------------------------------------
+# Release directory specification
+# ----------------------------------------------------
+RELSYSDIR = $(RELEASE_PATH)/ose_test
+
+# ----------------------------------------------------
+# FLAGS
+# ----------------------------------------------------
+
+ERL_MAKE_FLAGS +=
+ERL_COMPILE_FLAGS += -I$(ERL_TOP)/lib/test_server/include \
+ -I$(ERL_TOP)/lib/kernel/include
+
+EBIN = .
+
+EMAKEFILE=Emakefile
+COVERFILE=ose.cover
+
+# ----------------------------------------------------
+# Targets
+# ----------------------------------------------------
+
+make_emakefile:
+ $(ERL_TOP)/make/make_emakefile $(ERL_COMPILE_FLAGS) -o$(EBIN) $(MODULES) \
+ > $(EMAKEFILE)
+
+tests debug opt: make_emakefile
+ erl $(ERL_MAKE_FLAGS) -make
+
+clean:
+ rm -f $(EMAKEFILE)
+ rm -f $(TARGET_FILES)
+ rm -f core
+
+docs:
+
+# ----------------------------------------------------
+# Release Target
+# ----------------------------------------------------
+include $(ERL_TOP)/make/otp_release_targets.mk
+
+release_spec: opt
+
+release_tests_spec: make_emakefile
+ $(INSTALL_DIR) "$(RELSYSDIR)"
+ $(INSTALL_DATA) ose.spec $(EMAKEFILE) \
+ $(ERL_FILES) $(COVERFILE) "$(RELSYSDIR)"
+ chmod -R u+w "$(RELSYSDIR)"
+ @tar cf - *_SUITE_data | (cd "$(RELSYSDIR)"; tar xf -)
+
+release_docs_spec:
diff --git a/lib/ose/test/ose.cover b/lib/ose/test/ose.cover
new file mode 100644
index 0000000000..7b846cfaf6
--- /dev/null
+++ b/lib/ose/test/ose.cover
@@ -0,0 +1,2 @@
+%% -*- erlang -*-
+{incl_app,ose,details}.
diff --git a/lib/ose/test/ose.spec b/lib/ose/test/ose.spec
new file mode 100644
index 0000000000..c897e8cd16
--- /dev/null
+++ b/lib/ose/test/ose.spec
@@ -0,0 +1 @@
+{suites,"../ose_test",all}.
diff --git a/lib/ose/test/ose_SUITE.erl b/lib/ose/test/ose_SUITE.erl
new file mode 100644
index 0000000000..7e81b19894
--- /dev/null
+++ b/lib/ose/test/ose_SUITE.erl
@@ -0,0 +1,765 @@
+%%
+%% %CopyrightBegin%
+%%
+%% Copyright Ericsson AB 1998-2013. 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(ose_SUITE).
+
+%-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([
+ basic/1,stress/1,multi_msg_numbers/1,multi_mailboxes/1,
+ hunt/1,multi_hunt/1,dehunt/1,multi_dehunt/1,
+ attach/1,multi_attach/1,detach/1,multi_detach/1,
+ open_errors/1,close_errors/1,get_id_errors/1,get_name_errors/1,
+ hunt_errors/1,dehunt_errors/1,attach_errors/1,detach_errors/1,
+ send_errors/1,send_w_s_errors/1,listen_errors/1
+ ]).
+
+-define(INTERFACE,ose).
+
+
+init_per_testcase(_Func, Config) ->
+ Config.
+end_per_testcase(_Func, _Config) ->
+ ok.
+
+suite() -> [{timeout,{30,seconds}}].
+
+all() ->
+ [
+ basic,stress,multi_msg_numbers,multi_mailboxes,
+ hunt,multi_hunt,dehunt,multi_dehunt,
+ attach,multi_attach,detach,multi_detach,
+
+ open_errors,close_errors,get_id_errors,get_name_errors,
+ hunt_errors,dehunt_errors,attach_errors,detach_errors,
+ send_errors,send_w_s_errors,listen_errors
+ ].
+
+groups() ->
+ [].
+
+init_per_suite(Config) ->
+ case os:type() of
+ {ose,_} ->
+ Config;
+ _Else ->
+ {skip,"Only run on OSE"}
+ end.
+
+end_per_suite(_Config) ->
+ ok.
+
+init_per_group(_GroupName, Config) ->
+ Config.
+
+end_per_group(_GroupName, Config) ->
+ Config.
+
+basic(_Config) ->
+
+ [P1,P2] = multi_open(2,[42]),
+ P1Id = ?INTERFACE:get_id(P1),
+ P2Id = ?INTERFACE:get_id(P2),
+
+ ok = ?INTERFACE:send(P2,P1Id,42,<<"ping">>),
+ receive
+ {message,P1,V1} ->
+ {P2Id,P1Id,42,<<"ping">>} = V1,
+ ?INTERFACE:send(P1,P2Id,42,<<"pong">>);
+ Else1 ->
+ ct:fail({got_wrong_message,Else1})
+ end,
+
+ receive
+ {message,P2,V2} ->
+ {P1Id,P2Id,42,<<"pong">>} = V2;
+ Else2 ->
+ ct:fail({got_wrong_message,Else2})
+ end,
+
+ ?INTERFACE:close(P1),
+ ?INTERFACE:close(P2).
+
+%% Send 1000 messages and see if we can cope and that msg order is preserved
+stress(_Config) ->
+
+ Iterations = 1000,
+
+ [P1,P2] = multi_open(2,[42]),
+ P1Id = ?INTERFACE:get_id(P1),
+ P2Id = ?INTERFACE:get_id(P2),
+
+ spawn(fun() ->
+ n(fun(N) ->
+ Msg = [<<"ping">>|integer_to_list(N)],
+ ?INTERFACE:send(P2,P1Id,42,Msg)
+ end,Iterations)
+ end),
+ timer:sleep(100),
+ n(fun(N) ->
+ receive
+ {message,P1,Value} ->
+ Int = integer_to_binary(N),
+ {P2Id,P1Id,42,<<"ping",Int/binary>>} = Value,
+ ok;
+ Else ->
+ ct:fail({got_wrong_message,Else})
+ end
+ end,Iterations),
+
+ ?INTERFACE:close(P1),
+ ?INTERFACE:close(P2).
+
+%% Listen to 1000 different message numbers and send some random messages
+multi_msg_numbers(_Config) ->
+
+ Iterations = 100,
+
+ [P1,P2] = multi_open(2,lists:seq(2000,3000)),
+ P1Id = ?INTERFACE:get_id(P1),
+
+ n(fun(_) ->
+ Num = random:uniform(1000)+2000,
+ ?INTERFACE:send(P2,P1Id,Num,<<"ping",(integer_to_binary(Num))/binary>>)
+ end,Iterations),
+
+ n(fun(_) ->
+ receive
+ {message,P1,{_,_,Id,<<"ping",Num/binary>>}} when Id > 2000;
+ Id =< 3000 ->
+ Id = binary_to_integer(Num),
+ ok;
+ Else ->
+ ct:fail({got_wrong_message,Else})
+ end
+ end,Iterations),
+
+ ?INTERFACE:close(P1),
+ ?INTERFACE:close(P2).
+
+
+%% Create 100 mailboxes and send messages to them
+multi_mailboxes(_Config) ->
+
+ Mailboxes = 100,
+
+ [P1|MBs] = multi_open(Mailboxes,[42]),
+
+ [?INTERFACE:send(P1,?INTERFACE:get_id(P),42,[<<"ping">>,?INTERFACE:get_name(P,?INTERFACE:get_id(P))]) || P <- MBs],
+
+ [receive
+ {message,P,Value} ->
+ Name = ?INTERFACE:get_name(P,?INTERFACE:get_id(P)),
+ {_,_,42,<<"ping",Name/binary>>} = Value,
+ ok
+ end || P <- MBs],
+
+ [?INTERFACE:close(P) || P <- [P1|MBs]],
+ ok.
+
+hunt(_Config) ->
+ [P1,P2] = multi_open(2,[]),
+
+ Ref = ?INTERFACE:hunt(P1,"p2"),
+ receive
+ {mailbox_up,P1,Ref,Pid} ->
+ Pid = ?INTERFACE:get_id(P2),
+ ?INTERFACE:close(P1),
+ ?INTERFACE:close(P2);
+ Else ->
+ ct:fail({got_wrong_message,Else,Ref})
+ end.
+
+multi_hunt(_Config) ->
+
+ Iterations = 100,
+
+ P = ?INTERFACE:open("p"),
+
+ Refs = [?INTERFACE:hunt(P,"p"++integer_to_list(N))|| N <- lists:seq(1,Iterations)],
+
+ Pids = [begin
+ Prt = ?INTERFACE:open("p"++integer_to_list(N)),
+ Pid = ?INTERFACE:get_id(Prt),
+ ?INTERFACE:close(Prt),
+ Pid
+ end || N <- lists:seq(1,Iterations)],
+
+ [receive
+ {mailbox_up,P,Ref,Pid} ->
+ ok
+ after 10 ->
+ ct:fail({did_not_get,Pid,Ref})
+ end || {Pid,Ref} <- lists:zip(Pids,Refs)],
+ ?INTERFACE:close(P).
+
+
+dehunt(_Config) ->
+ [P1] = multi_open(1,[]),
+ Ref = ?INTERFACE:hunt(P1,"p2"),
+ receive
+ _Else -> ct:fail({got,_Else})
+ after 1000 ->
+ ok
+ end,
+ P2 = ?INTERFACE:open("p2"),
+
+ % Make sure any messages are sent
+ receive after 10 -> ok end,
+
+ ok = ?INTERFACE:dehunt(P1,Ref),
+
+ % Make sure no messages are received
+ receive
+ _Else2 -> ct:fail({got,_Else2})
+ after 1000 ->
+ ?INTERFACE:close(P1),
+ ?INTERFACE:close(P2)
+ end.
+
+%%%
+%%% This testcase basically:
+%%% spawn 10 processes that in parallel
+%%% adds some hunts for different OSE processes
+%%% maybe create hunted OSE process
+%%% dehunt half of the hunts
+%%% create more hunts
+%%% if not created create hunted OSE process
+%%% veryify that all expected hunt messages are received
+%%% verify that all processes exited correctly
+%%%
+%%% This complex test is done to make sure that the internal handling
+%%% of dehunt works as expected.
+%%%
+multi_dehunt(_Config) ->
+ [P1] = multi_open(1,[]),
+
+ Scenario =
+ fun(Iterations) ->
+
+ Hunted = "p"++integer_to_list(Iterations),
+ %% Start a couple of hunts
+ Refs = [?INTERFACE:hunt(P1,Hunted) || _ <- lists:seq(1,Iterations)],
+
+ %% We alternate if the process is opened before or after the dehunt
+ P2O = if Iterations rem 2 == 0 ->
+ ?INTERFACE:open(Hunted);
+ true ->
+ undefined
+ end,
+
+ %% Remove half of them
+ {RemRefs,_} = lists:mapfoldl(fun(Ref,Acc) when Acc rem 2 == 0 ->
+ ok = ?INTERFACE:dehunt(P1,Ref),
+ {[],Acc+1};
+ (Ref,Acc) ->
+ {Ref,Acc+1}
+ end,0,Refs),
+
+ %% Add some new ones
+ NewRefs = [?INTERFACE:hunt(P1,Hunted)
+ || _ <- lists:seq(1,Iterations div 4)]
+ ++ lists:flatten(RemRefs),
+
+ P2 = if P2O == undefined ->
+ ?INTERFACE:open(Hunted);
+ true ->
+ P2O
+ end,
+ P2Id = ?INTERFACE:get_id(P2),
+
+ %% Receive all the expected ones
+ lists:foreach(fun(Ref) ->
+ receive
+ {mailbox_up,P1,Ref,P2Id} ->
+ ok
+ after 1000 ->
+ io:format("Flush: ~p~n",[flush()]),
+ io:format("~p~n",[{Iterations,{did_not_get, Ref}}]),
+ ok = Ref
+ end
+ end,NewRefs),
+
+ %% Check that no other have arrived
+ receive
+ _Else ->
+ io:format("Flush: ~p~n",[flush()]),
+ io:format("~p~n",[{Iterations,{got, _Else}}]),
+ ok = _Else
+ after 100 ->
+ ok
+ end,
+ ?INTERFACE:close(P2)
+ end,
+
+ Self = self(),
+
+ n(fun(N) ->
+ spawn(fun() -> Self !
+ Scenario(N*25)
+ end),
+ ok
+ end,10),
+
+ n(fun(_N) ->
+ receive ok -> ok
+ after 60000 -> ct:fail(failed)
+ end
+ end,10),
+ ?INTERFACE:close(P1).
+
+attach(_Config) ->
+ [P1,P2] = multi_open(2,[]),
+
+ P2Id = ?INTERFACE:get_id(P2),
+ Ref = ?INTERFACE:attach(P1,P2Id),
+ ?INTERFACE:close(P2),
+ receive
+ {mailbox_down,P1,Ref,P2Id} ->
+ ?INTERFACE:close(P1);
+ _Else ->
+ ct:fail({got,_Else, {P1,Ref,P2Id}})
+ after 1000 ->
+ ct:fail({did_not_get,P1,Ref,P2Id})
+ end.
+
+multi_attach(_Config) ->
+
+ Iterations = 100,
+
+ [P1|Pids] = multi_open(Iterations,[]),
+
+ Refs = [{?INTERFACE:get_id(Pid),?INTERFACE:attach(P1,?INTERFACE:get_id(Pid))} || Pid <- Pids],
+
+ [?INTERFACE:close(Pid) || Pid <- Pids],
+
+ [receive
+ {mailbox_down,P1,Ref,Pid} ->
+ ok
+ after 10000 ->
+ ct:fail({did_not_get,Pid,Ref})
+ end || {Pid,Ref} <- Refs],
+ ?INTERFACE:close(P1).
+
+detach(_Config) ->
+ [P1,P2] = multi_open(2,[]),
+ P2Id = ?INTERFACE:get_id(P2),
+ Ref = ?INTERFACE:attach(P1,P2Id),
+ receive
+ _Else -> ct:fail({got,_Else})
+ after 100 ->
+ ok
+ end,
+
+ ?INTERFACE:close(P2),
+
+ % Make sure any messages are sent
+ receive after 10 -> ok end,
+
+ ?INTERFACE:detach(P1,Ref),
+
+ % Make sure no messages are received
+ receive
+ _Else2 -> ct:fail({got,_Else2})
+ after 1000 ->
+ ?INTERFACE:close(P1)
+ end.
+
+%%%
+%%% This testcase basically:
+%%% spawn 10 processes that in parallel
+%%% adds some attach for different OSE processes
+%%% maybe close OSE process
+%%% dehunt half of the hunts
+%%% create more hunts
+%%% if not closed close attached OSE process
+%%% veryify that all expected attach messages are received
+%%% verify that all processes exited correctly
+%%%
+%%% This complex test is done to make sure that the internal handling
+%%% of dehunt works as expected.
+%%%
+multi_detach(_Config) ->
+ [P1] = multi_open(1,[]),
+
+ Scenario =
+ fun(Iterations) ->
+
+ Attached = ?INTERFACE:open("p"++integer_to_list(Iterations)),
+ AttachedId = ?INTERFACE:get_id(Attached),
+ %% Start a couple of attachs
+ Refs = [?INTERFACE:attach(P1,AttachedId) || _ <- lists:seq(1,Iterations)],
+
+ %% We alternate if the process is closed before or after the detach
+ P2O = if Iterations rem 2 == 0 ->
+ ?INTERFACE:close(Attached);
+ true ->
+ undefined
+ end,
+
+ %% Remove half of them
+ {RemRefs,_} = lists:mapfoldl(fun(Ref,Acc) when Acc rem 2 == 0 ->
+ ok = ?INTERFACE:detach(P1,Ref),
+ {[],Acc+1};
+ (Ref,Acc) ->
+ {Ref,Acc+1}
+ end,0,Refs),
+
+ %% Add some new ones
+ NewRefs = [?INTERFACE:attach(P1,AttachedId)
+ || _ <- lists:seq(1,Iterations div 4)]
+ ++ lists:flatten(RemRefs),
+
+ if P2O == undefined ->
+ ?INTERFACE:close(Attached);
+ true ->
+ P2O
+ end,
+
+ %% Receive all the expected ones
+ lists:foreach(fun(Ref) ->
+ receive
+ {mailbox_down,P1,Ref,AttachedId} ->
+ ok
+ after 1000 ->
+ io:format("Flush: ~p~n",[flush()]),
+ io:format("~p~n",[{Iterations,{did_not_get, Ref}}]),
+ ok = Ref
+ end
+ end,NewRefs),
+
+ %% Check that no other have arrived
+ receive
+ _Else ->
+ io:format("Flush: ~p~n",[flush()]),
+ io:format("~p~n",[{Iterations,{got, _Else}}]),
+ ok = _Else
+ after 100 ->
+ ok
+ end
+ end,
+
+ Self = self(),
+
+ n(fun(N) ->
+ spawn(fun() -> Self !
+ Scenario(N*5)
+ end),
+ ok
+ end,10),
+
+ n(fun(_N) ->
+ receive ok -> ok
+ after 60000 -> ct:fail(failed)
+ end
+ end,10),
+ ?INTERFACE:close(P1).
+
+
+open_errors(_Config) ->
+ {'EXIT',{badarg,[{?INTERFACE,open,[inval],_}|_]}} =
+ (catch ?INTERFACE:open(inval)),
+ {'EXIT',{badarg,[{?INTERFACE,open,[["p"|1]],_}|_]}} =
+ (catch ?INTERFACE:open(["p"|1])),
+ {'EXIT',{badarg,[{?INTERFACE,open,[["p",1234]],_}|_]}} =
+ (catch ?INTERFACE:open(["p",1234])),
+
+ ok.
+
+close_errors(_Config) ->
+ {'EXIT',{badarg,[{?INTERFACE,close,[inval],_}|_]}} =
+ (catch ?INTERFACE:close(inval)),
+
+ P1 = ?INTERFACE:open("p1"),
+ ok = ?INTERFACE:close(P1),
+ ok = ?INTERFACE:close(P1).
+
+
+get_id_errors(_Config) ->
+ {'EXIT',{badarg,[{?INTERFACE,get_id,[inval],_}|_]}} =
+ (catch ?INTERFACE:get_id(inval)),
+
+ P1 = ?INTERFACE:open("p1"),
+ ok = ?INTERFACE:close(P1),
+ {'EXIT',{badarg,[{?INTERFACE,get_id,[P1],_}|_]}} =
+ (catch ?INTERFACE:get_id(P1)),
+
+ ok.
+
+get_name_errors(_Config) ->
+ P1 = ?INTERFACE:open("p1"),
+ {'EXIT',{badarg,[{?INTERFACE,get_name,[P1,inval],_}|_]}} =
+ (catch ?INTERFACE:get_name(P1,inval)),
+
+ undefined = ?INTERFACE:get_name(P1,1234),
+
+ P2 = ?INTERFACE:open("p2"),
+ P2Id = ?INTERFACE:get_id(P2),
+ ok = ?INTERFACE:close(P1),
+ {'EXIT',{badarg,[{?INTERFACE,get_name,[P1,P2Id],_}|_]}} =
+ (catch ?INTERFACE:get_name(P1,P2Id)),
+ ?INTERFACE:close(P2),
+
+ P3 = ?INTERFACE:open([255]),
+ <<255>> = ?INTERFACE:get_name(P3, ?INTERFACE:get_id(P3)),
+ ?INTERFACE:close(P3),
+
+ ok.
+
+hunt_errors(_Config) ->
+
+ {'EXIT',{badarg,[{?INTERFACE,hunt,[inval,"hello"],_}|_]}} =
+ (catch ?INTERFACE:hunt(inval,"hello")),
+
+ P1 = ?INTERFACE:open("p1"),
+ {'EXIT',{badarg,[{?INTERFACE,hunt,[P1,["hello",12345]],_}|_]}} =
+ (catch ?INTERFACE:hunt(P1,["hello",12345])),
+
+ P2 = ?INTERFACE:open(<<255>>),
+ P2Pid = ?INTERFACE:get_id(P2),
+ Ref = ?INTERFACE:hunt(P1,[255]),
+ receive
+ {mailbox_up,P1,Ref,P2Pid} ->
+ ok;
+ Else ->
+ ct:fail({got,Else,{mailbox_up,P1,Ref,P2Pid}})
+ after 150 ->
+ ct:fail({did_not_get,{mailbox_up,P1,Ref,P2Pid}})
+ end,
+
+ ok = ?INTERFACE:close(P1),
+ ok = ?INTERFACE:close(P2),
+ {'EXIT',{badarg,[{?INTERFACE,hunt,[P1,["hello"]],_}|_]}} =
+ (catch ?INTERFACE:hunt(P1,["hello"])),
+
+ ok.
+
+dehunt_errors(_Config) ->
+ P1 = ?INTERFACE:open("p1"),
+ Ref = ?INTERFACE:hunt(P1,"p2"),
+
+ {'EXIT',{badarg,[{?INTERFACE,dehunt,[inval,Ref],_}|_]}} =
+ (catch ?INTERFACE:dehunt(inval,Ref)),
+
+ {'EXIT',{badarg,[{?INTERFACE,dehunt,[P1,inval],_}|_]}} =
+ (catch ?INTERFACE:dehunt(P1,inval)),
+
+ ok = ?INTERFACE:dehunt(P1,Ref),
+ ok = ?INTERFACE:dehunt(P1,Ref),
+
+ ok = ?INTERFACE:close(P1),
+
+ {'EXIT',{badarg,[{?INTERFACE,dehunt,[P1,Ref],_}|_]}} =
+ (catch ?INTERFACE:dehunt(P1,Ref)),
+
+ case ?INTERFACE of
+ ose -> ok;
+ _ ->
+ P2 = ?INTERFACE:open("p2"),
+ ok = ?INTERFACE:close(P2)
+ end,
+
+ receive
+ Else -> ct:fail({got,Else})
+ after 100 ->
+ ok
+ end.
+
+attach_errors(_Config) ->
+ P1 = ?INTERFACE:open("p1"),
+ P2 = ?INTERFACE:open("p2"),
+ P2Id = ?INTERFACE:get_id(P2),
+
+ {'EXIT',{badarg,[{?INTERFACE,attach,[inval,P2Id],_}|_]}} =
+ (catch ?INTERFACE:attach(inval,P2Id)),
+
+ {'EXIT',{badarg,[{?INTERFACE,attach,[P1,[12345]],_}|_]}} =
+ (catch ?INTERFACE:attach(P1,[12345])),
+
+ ok = ?INTERFACE:close(P1),
+ ok = ?INTERFACE:close(P2),
+ {'EXIT',{badarg,[{?INTERFACE,attach,[P1,P2Id],_}|_]}} =
+ (catch ?INTERFACE:attach(P1,P2Id)),
+
+ ok.
+
+detach_errors(_Config) ->
+ P1 = ?INTERFACE:open("p1"),
+ P2 = ?INTERFACE:open("p2"),
+ P2Id = ?INTERFACE:get_id(P2),
+
+ Ref = ?INTERFACE:attach(P1,P2Id),
+
+ {'EXIT',{badarg,[{?INTERFACE,detach,[inval,Ref],_}|_]}} =
+ (catch ?INTERFACE:detach(inval,Ref)),
+
+ {'EXIT',{badarg,[{?INTERFACE,detach,[P1,inval],_}|_]}} =
+ (catch ?INTERFACE:detach(P1,inval)),
+
+ ok = ?INTERFACE:detach(P1,Ref),
+ ok = ?INTERFACE:detach(P1,Ref),
+
+ case ?INTERFACE of
+ ose -> ok;
+ _ ->
+ ok = ?INTERFACE:close(P1)
+ end,
+
+ ok = ?INTERFACE:close(P2),
+ ok = ?INTERFACE:close(P1),
+
+ {'EXIT',{badarg,[{?INTERFACE,detach,[P1,Ref],_}|_]}} =
+ (catch ?INTERFACE:detach(P1,Ref)),
+
+ receive
+ Else -> ct:fail({got,Else})
+ after 100 ->
+ ok
+ end.
+
+send_errors(_Config) ->
+ P1 = ?INTERFACE:open("p1"),
+ P2 = ?INTERFACE:open("p2"),
+ P2Id = ?INTERFACE:get_id(P2),
+
+ {'EXIT',{badarg,[{?INTERFACE,send,[inval,P2Id,42,"hello"],_}|_]}} =
+ (catch ?INTERFACE:send(inval,P2Id,42,"hello")),
+ {'EXIT',{badarg,[{?INTERFACE,send,[P1,inval,42,"hello"],_}|_]}} =
+ (catch ?INTERFACE:send(P1,inval,42,"hello")),
+ {'EXIT',{badarg,[{?INTERFACE,send,[P1,P2Id,inval,"hello"],_}|_]}} =
+ (catch ?INTERFACE:send(P1,P2Id,inval,"hello")),
+ {'EXIT',{badarg,[{?INTERFACE,send,[P1,P2Id,42,inval],_}|_]}} =
+ (catch ?INTERFACE:send(P1,P2Id,42,inval)),
+
+ ok = ?INTERFACE:close(P2),
+ ok = ?INTERFACE:send(P1,P2Id,42,"hello"),
+ ok = ?INTERFACE:close(P1),
+
+ {'EXIT',{badarg,[{?INTERFACE,send,[P1,P2Id,42,"hello"],_}|_]}} =
+ (catch ?INTERFACE:send(P1,P2Id,42,"hello")),
+
+ receive
+ Else -> ct:fail({got,Else})
+ after 100 ->
+ ok
+ end.
+
+send_w_s_errors(_Config) ->
+ P1 = ?INTERFACE:open("p1"),
+ P1Id = ?INTERFACE:get_id(P1),
+ P2 = ?INTERFACE:open("p2"),
+ P2Id = ?INTERFACE:get_id(P2),
+ P3 = ?INTERFACE:open("p3"),
+ P3Id = ?INTERFACE:get_id(P3),
+
+ {'EXIT',{badarg,[{?INTERFACE,send,[inval,P2Id,P1Id,42,"hello"],_}|_]}} =
+ (catch ?INTERFACE:send(inval,P2Id,P1Id,42,"hello")),
+ {'EXIT',{badarg,[{?INTERFACE,send,[P2,-1,P1Id,42,"hello"],_}|_]}} =
+ (catch ?INTERFACE:send(P2,-1,P1Id,42,"hello")),
+ {'EXIT',{badarg,[{?INTERFACE,send,[P2,P2Id,1 bsl 32,42,"hello"],_}|_]}} =
+ (catch ?INTERFACE:send(P2,P2Id,1 bsl 32,42,"hello")),
+ {'EXIT',{badarg,[{?INTERFACE,send,[P2,P2Id,P1Id,inval,"hello"],_}|_]}} =
+ (catch ?INTERFACE:send(P2,P2Id,P1Id,inval,"hello")),
+ {'EXIT',{badarg,[{?INTERFACE,send,[P2,P2Id,P1Id,42,inval],_}|_]}} =
+ (catch ?INTERFACE:send(P2,P2Id,P1Id,42,inval)),
+
+ ok = ?INTERFACE:close(P3),
+ ok = ?INTERFACE:send(P2,P3Id,P1Id,42,"hello"),
+
+ ok = ?INTERFACE:close(P1),
+ ok = ?INTERFACE:send(P2,P2Id,P1Id,42,"hello"),
+ ok = ?INTERFACE:close(P2),
+
+ {'EXIT',{badarg,[{?INTERFACE,send,[P1,P2Id,P1Id,42,"hello"],_}|_]}} =
+ (catch ?INTERFACE:send(P1,P2Id,P1Id,42,"hello")),
+
+ receive
+ Else -> ct:fail({got,Else})
+ after 100 ->
+ ok
+ end.
+
+listen_errors(_Config) ->
+
+ P1 = ?INTERFACE:open("p1"),
+ P1Id = ?INTERFACE:get_id(P1),
+
+ {'EXIT',{badarg,[{?INTERFACE,listen,[inval,[42]],_}|_]}} =
+ (catch ?INTERFACE:listen(inval,[42])),
+ {'EXIT',{badarg,[{?INTERFACE,listen,[P1,inval],_}|_]}} =
+ (catch ?INTERFACE:listen(P1,inval)),
+ {'EXIT',{badarg,[{?INTERFACE,listen,[P1,[1 bsl 33]],_}|_]}} =
+ (catch ?INTERFACE:listen(P1,[1 bsl 33])),
+
+ ok = ?INTERFACE:listen(P1,[42,42,42,42,42,42,42,42,42,42,42,42,42]),
+
+ case ?INTERFACE of
+ ose -> ok;
+ _ ->
+ ?INTERFACE:send(P1,P1Id,42,"hello"),
+ timer:sleep(50),
+ ?INTERFACE:listen(P1,[]),
+ ?INTERFACE:send(P1,P1Id,42,"hello2"),
+
+ receive
+ {message,P1,42,"hello"} -> ok
+ end,
+
+ receive
+ Else -> ct:fail({got,Else})
+ after 100 ->
+ ok
+ end
+ end,
+
+ ok = ?INTERFACE:close(P1),
+ {'EXIT',{badarg,[{?INTERFACE,listen,[P1,[42]],_}|_]}} =
+ (catch ?INTERFACE:listen(P1,[42])),
+
+ ok.
+
+%%
+%% Internal functions
+%%
+multi_open(N,ListenNums) ->
+ multi_open(N,ListenNums,[]).
+
+multi_open(0,_,Acc) ->
+ Acc;
+multi_open(N,ListenNums,Acc) ->
+ P = ?INTERFACE:open("p"++integer_to_list(N)),
+ ok = ?INTERFACE:listen(P,ListenNums),
+ multi_open(N-1,ListenNums,[P|Acc]).
+
+n(_F,0) ->
+ ok;
+n(F,N) ->
+ ok = F(N),
+ n(F,N-1).
+
+
+flush() ->
+ receive
+ Msg ->
+ [Msg|flush()]
+ after 0 ->
+ []
+ end.
diff --git a/lib/ose/vsn.mk b/lib/ose/vsn.mk
new file mode 100644
index 0000000000..78ffa4d496
--- /dev/null
+++ b/lib/ose/vsn.mk
@@ -0,0 +1 @@
+OSE_VSN = 1.0
diff --git a/lib/otp_mibs/doc/src/notes.xml b/lib/otp_mibs/doc/src/notes.xml
index 0c13fb2349..391c82b1c5 100644
--- a/lib/otp_mibs/doc/src/notes.xml
+++ b/lib/otp_mibs/doc/src/notes.xml
@@ -31,6 +31,55 @@
<p>This document describes the changes made to the OTP_Mibs
application.</p>
+<section><title>Otp_Mibs 1.0.9</title>
+
+ <section><title>Fixed Bugs and Malfunctions</title>
+ <list>
+ <item>
+ <p>
+ Add type based integer value truncation/reset.</p>
+ <p>
+ This fixes errors when querying e.g. the
+ erlNodeReductions, erlNodeInBytes and erlNodeOutBytes
+ objects in long-running Erlang/OTP systems.</p>
+ <p>
+ Update types of applicable MIB objects to 64bit based
+ types.</p>
+ <p>
+ Potential incompatibility: Type change of Counter32 to
+ Counter64 in OTP-MIB.mib</p>
+ <p>
+ (Thanks to Tobias Schlager)</p>
+ <p>
+ *** POTENTIAL INCOMPATIBILITY ***</p>
+ <p>
+ Own Id: OTP-11203</p>
+ </item>
+ <item>
+ <p>
+ Application upgrade (appup) files are corrected for the
+ following applications: </p>
+ <p>
+ <c>asn1, common_test, compiler, crypto, debugger,
+ dialyzer, edoc, eldap, erl_docgen, et, eunit, gs, hipe,
+ inets, observer, odbc, os_mon, otp_mibs, parsetools,
+ percept, public_key, reltool, runtime_tools, ssh,
+ syntax_tools, test_server, tools, typer, webtool, wx,
+ xmerl</c></p>
+ <p>
+ A new test utility for testing appup files is added to
+ test_server. This is now used by most applications in
+ OTP.</p>
+ <p>
+ (Thanks to Tobias Schlager)</p>
+ <p>
+ Own Id: OTP-11744</p>
+ </item>
+ </list>
+ </section>
+
+</section>
+
<section><title>Otp_Mibs 1.0.8</title>
<section><title>Improvements and New Features</title>
diff --git a/lib/otp_mibs/src/otp_mibs.app.src b/lib/otp_mibs/src/otp_mibs.app.src
index b177af0709..ebc656b0b2 100644
--- a/lib/otp_mibs/src/otp_mibs.app.src
+++ b/lib/otp_mibs/src/otp_mibs.app.src
@@ -23,5 +23,7 @@
{modules, [otp_mib]},
{registered, []},
{applications, [kernel, stdlib, snmp]},
- {env,[]}]}.
+ {env,[]},
+ {runtime_dependencies, ["stdlib-2.0","snmp-4.25.1","mnesia-4.12",
+ "kernel-3.0","erts-6.0"]}]}.
diff --git a/lib/otp_mibs/src/otp_mibs.appup.src b/lib/otp_mibs/src/otp_mibs.appup.src
index 5e99dfe325..fd5ce1e391 100644
--- a/lib/otp_mibs/src/otp_mibs.appup.src
+++ b/lib/otp_mibs/src/otp_mibs.appup.src
@@ -1,7 +1,7 @@
-%%
+%% -*- erlang -*-
%% %CopyrightBegin%
%%
-%% Copyright Ericsson AB 2003-2009. All Rights Reserved.
+%% Copyright Ericsson AB 2003-2014. 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
@@ -15,6 +15,7 @@
%% under the License.
%%
%% %CopyrightEnd%
-%%
-
-{"%VSN%",[],[]}.
+{"%VSN%",
+ [{<<".*">>,[{restart_application, otp_mibs}]}],
+ [{<<".*">>,[{restart_application, otp_mibs}]}]
+}.
diff --git a/lib/otp_mibs/test/otp_mibs_SUITE.erl b/lib/otp_mibs/test/otp_mibs_SUITE.erl
index 5fd52ac2ac..5376c54210 100644
--- a/lib/otp_mibs/test/otp_mibs_SUITE.erl
+++ b/lib/otp_mibs/test/otp_mibs_SUITE.erl
@@ -45,7 +45,7 @@
end_per_testcase/2]).
% Test cases must be exported.
--export([nt_basic_types/1, nt_high_reduction_count/1]).
+-export([app/1, appup/1, nt_basic_types/1, nt_high_reduction_count/1]).
-define(TRAP_UDP, 5000).
-define(AGENT_UDP, 4000).
@@ -75,9 +75,10 @@ end_per_testcase(_Case, Config) when is_list(Config) ->
suite() -> [{ct_hooks,[ts_install_cth]}, {require, snmp_mgr_agent, snmp}].
-all() -> [{group, node_table}].
+all() -> [{group, app}, {group, node_table}].
-groups() -> [{node_table, [], [nt_basic_types, nt_high_reduction_count]}].
+groups() -> [{app, [], [app, appup]},
+ {node_table, [], [nt_basic_types, nt_high_reduction_count]}].
init_per_group(_GroupName, Config) -> Config.
@@ -118,6 +119,14 @@ end_per_suite(Config) ->
%% Test cases
%%---------------------------------------------------------------------
+%% Test that the otp_mibs app file is ok
+app(Config) when is_list(Config) ->
+ ok = ?t:app_test(otp_mibs).
+
+%% Test that the otp_mibs appup file is ok
+appup(Config) when is_list(Config) ->
+ ok = ?t:appup_test(otp_mibs).
+
nt_basic_types(suite) ->
[];
nt_basic_types(doc) ->
diff --git a/lib/otp_mibs/vsn.mk b/lib/otp_mibs/vsn.mk
index 96d3088224..98db21c132 100644
--- a/lib/otp_mibs/vsn.mk
+++ b/lib/otp_mibs/vsn.mk
@@ -1,4 +1,4 @@
-OTP_MIBS_VSN = 1.0.8
+OTP_MIBS_VSN = 1.0.9
# Note: The branch 'otp_mibs' is defunct as of otp_mibs-1.0.4 and
# should NOT be used again.
diff --git a/lib/parsetools/doc/src/notes.xml b/lib/parsetools/doc/src/notes.xml
index 929daedf74..a8368740da 100644
--- a/lib/parsetools/doc/src/notes.xml
+++ b/lib/parsetools/doc/src/notes.xml
@@ -30,6 +30,42 @@
</header>
<p>This document describes the changes made to the Parsetools application.</p>
+<section><title>Parsetools 2.0.11</title>
+
+ <section><title>Fixed Bugs and Malfunctions</title>
+ <list>
+ <item>
+ <p>
+ Application upgrade (appup) files are corrected for the
+ following applications: </p>
+ <p>
+ <c>asn1, common_test, compiler, crypto, debugger,
+ dialyzer, edoc, eldap, erl_docgen, et, eunit, gs, hipe,
+ inets, observer, odbc, os_mon, otp_mibs, parsetools,
+ percept, public_key, reltool, runtime_tools, ssh,
+ syntax_tools, test_server, tools, typer, webtool, wx,
+ xmerl</c></p>
+ <p>
+ A new test utility for testing appup files is added to
+ test_server. This is now used by most applications in
+ OTP.</p>
+ <p>
+ (Thanks to Tobias Schlager)</p>
+ <p>
+ Own Id: OTP-11744</p>
+ </item>
+ <item>
+ <p>
+ A Yecc example has been updated in the documentation
+ (Thanks to Pierre Fenoll.)</p>
+ <p>
+ Own Id: OTP-11749</p>
+ </item>
+ </list>
+ </section>
+
+</section>
+
<section><title>Parsetools 2.0.10</title>
<section><title>Fixed Bugs and Malfunctions</title>
diff --git a/lib/parsetools/doc/src/yecc.xml b/lib/parsetools/doc/src/yecc.xml
index 380cac967a..7298e09c2c 100644
--- a/lib/parsetools/doc/src/yecc.xml
+++ b/lib/parsetools/doc/src/yecc.xml
@@ -425,9 +425,9 @@ myparser:parse_and_scan({Mod, Tokenizer, Args}) </code>
Nonterminals E T F.
Terminals '+' '*' '(' ')' number.
Rootsymbol E.
-E -> E '+' T: ['$2', '$1', '$3'].
+E -> E '+' T: {'$2', '$1', '$3'}.
E -> T : '$1'.
-T -> T '*' F: ['$2', '$1', '$3'].
+T -> T '*' F: {'$2', '$1', '$3'}.
T -> F : '$1'.
F -> '(' E ')' : '$2'.
F -> number : '$1'. </code>
@@ -438,8 +438,8 @@ Terminals '+' '*' '(' ')' number.
Rootsymbol E.
Left 100 '+'.
Left 200 '*'.
-E -> E '+' E : ['$2', '$1', '$3'].
-E -> E '*' E : ['$2', '$1', '$3'].
+E -> E '+' E : {'$2', '$1', '$3'}.
+E -> E '*' E : {'$2', '$1', '$3'}.
E -> '(' E ')' : '$2'.
E -> number : '$1'. </code>
<p>3. An overloaded minus operator:</p>
diff --git a/lib/parsetools/src/parsetools.app.src b/lib/parsetools/src/parsetools.app.src
index af62fc4f6b..9eeb8fcc05 100644
--- a/lib/parsetools/src/parsetools.app.src
+++ b/lib/parsetools/src/parsetools.app.src
@@ -11,7 +11,8 @@
{applications, [kernel,stdlib]},
{env, [{file_util_search_methods,[{"", ""}, {"ebin", "esrc"}, {"ebin", "src"}]}
]
- }
+ },
+ {runtime_dependencies, ["stdlib-2.0","kernel-3.0","erts-6.0"]}
]
}.
diff --git a/lib/parsetools/src/parsetools.appup.src b/lib/parsetools/src/parsetools.appup.src
index 54a63833e6..0e02099893 100644
--- a/lib/parsetools/src/parsetools.appup.src
+++ b/lib/parsetools/src/parsetools.appup.src
@@ -1 +1,21 @@
-{"%VSN%",[],[]}.
+%% -*- erlang -*-
+%% %CopyrightBegin%
+%%
+%% Copyright Ericsson AB 2014. 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%
+{"%VSN%",
+ [{<<".*">>,[{restart_application, parsetools}]}],
+ [{<<".*">>,[{restart_application, parsetools}]}]
+}.
diff --git a/lib/parsetools/src/yecc.erl b/lib/parsetools/src/yecc.erl
index b698beb558..f4657663e6 100644
--- a/lib/parsetools/src/yecc.erl
+++ b/lib/parsetools/src/yecc.erl
@@ -1,7 +1,7 @@
%%
%% %CopyrightBegin%
%%
-%% Copyright Ericsson AB 1996-2013. All Rights Reserved.
+%% Copyright Ericsson AB 1996-2014. 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
@@ -423,7 +423,7 @@ infile(Parent, Infilex, Options) ->
end,
case {St#yecc.errors, werror(St)} of
{[], false} -> ok;
- _ -> _ = file:delete(St#yecc.outfile)
+ _ -> _ = file:delete(St#yecc.outfile), ok
end,
Parent ! {self(), yecc_ret(St)}.
diff --git a/lib/parsetools/test/Makefile b/lib/parsetools/test/Makefile
index 6455f6ade7..7c7cc13965 100644
--- a/lib/parsetools/test/Makefile
+++ b/lib/parsetools/test/Makefile
@@ -20,6 +20,7 @@ include $(ERL_TOP)/make/target.mk
include $(ERL_TOP)/make/$(TARGET)/otp.mk
MODULES = \
+ app_SUITE \
leex_SUITE \
yecc_SUITE
diff --git a/lib/parsetools/test/app_SUITE.erl b/lib/parsetools/test/app_SUITE.erl
new file mode 100644
index 0000000000..88ac95e311
--- /dev/null
+++ b/lib/parsetools/test/app_SUITE.erl
@@ -0,0 +1,50 @@
+%% ``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 via the world wide web 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.
+%%
+%% The Initial Developer of the Original Code is Ericsson Utvecklings AB.
+%% Portions created by Ericsson are Copyright 1999, Ericsson Utvecklings
+%% AB. All Rights Reserved.''
+%%
+-module(app_SUITE).
+
+-compile([export_all]).
+-include_lib("common_test/include/ct.hrl").
+
+suite() ->
+ [{ct_hooks, [ts_install_cth]}].
+
+all() ->
+ [app, appup].
+
+groups() ->
+ [].
+
+init_per_suite(Config) ->
+ Config.
+
+end_per_suite(_Config) ->
+ ok.
+
+init_per_group(_GroupName, Config) ->
+ Config.
+
+end_per_group(_GroupName, Config) ->
+ Config.
+
+app() ->
+ [{doc, "Test that the parsetools app file is ok"}].
+app(Config) when is_list(Config) ->
+ ok = ?t:app_test(parsetools).
+
+appup() ->
+ [{doc, "Test that the parsetools appup file is ok"}].
+appup(Config) when is_list(Config) ->
+ ok = ?t:appup_test(parsetools).
diff --git a/lib/parsetools/vsn.mk b/lib/parsetools/vsn.mk
index d62962c54a..8fd7422c1c 100644
--- a/lib/parsetools/vsn.mk
+++ b/lib/parsetools/vsn.mk
@@ -1 +1 @@
-PARSETOOLS_VSN = 2.0.10
+PARSETOOLS_VSN = 2.0.11
diff --git a/lib/percept/doc/src/notes.xml b/lib/percept/doc/src/notes.xml
index 3cead186c4..bae999ed1a 100644
--- a/lib/percept/doc/src/notes.xml
+++ b/lib/percept/doc/src/notes.xml
@@ -32,6 +32,35 @@
</header>
<p>This document describes the changes made to the Percept application.</p>
+<section><title>Percept 0.8.9</title>
+
+ <section><title>Fixed Bugs and Malfunctions</title>
+ <list>
+ <item>
+ <p>
+ Application upgrade (appup) files are corrected for the
+ following applications: </p>
+ <p>
+ <c>asn1, common_test, compiler, crypto, debugger,
+ dialyzer, edoc, eldap, erl_docgen, et, eunit, gs, hipe,
+ inets, observer, odbc, os_mon, otp_mibs, parsetools,
+ percept, public_key, reltool, runtime_tools, ssh,
+ syntax_tools, test_server, tools, typer, webtool, wx,
+ xmerl</c></p>
+ <p>
+ A new test utility for testing appup files is added to
+ test_server. This is now used by most applications in
+ OTP.</p>
+ <p>
+ (Thanks to Tobias Schlager)</p>
+ <p>
+ Own Id: OTP-11744</p>
+ </item>
+ </list>
+ </section>
+
+</section>
+
<section><title>Percept 0.8.8.2</title>
<section><title>Improvements and New Features</title>
diff --git a/lib/percept/src/percept.app.src b/lib/percept/src/percept.app.src
index cf4a9fc438..f8991ee577 100644
--- a/lib/percept/src/percept.app.src
+++ b/lib/percept/src/percept.app.src
@@ -35,7 +35,9 @@
]},
{registered, [percept_db,percept_port]},
{applications, [kernel,stdlib]},
- {env,[]}
+ {env,[]},
+ {runtime_dependencies, ["stdlib-2.0","runtime_tools-1.8.14","kernel-3.0",
+ "inets-5.10","erts-6.0"]}
]}.
diff --git a/lib/percept/src/percept.appup.src b/lib/percept/src/percept.appup.src
index 4fc2852878..23e67f772f 100644
--- a/lib/percept/src/percept.appup.src
+++ b/lib/percept/src/percept.appup.src
@@ -1,7 +1,7 @@
-%%
+%% -*- erlang -*-
%% %CopyrightBegin%
%%
-%% Copyright Ericsson AB 2007-2009. All Rights Reserved.
+%% Copyright Ericsson AB 2007-2014. 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
@@ -15,7 +15,7 @@
%% under the License.
%%
%% %CopyrightEnd%
-%%
-
-{"%VSN%",[],[]}.
-
+{"%VSN%",
+ [{<<".*">>,[{restart_application, percept}]}],
+ [{<<".*">>,[{restart_application, percept}]}]
+}.
diff --git a/lib/percept/test/percept_SUITE.erl b/lib/percept/test/percept_SUITE.erl
index e415d92a04..aea2462b2e 100644
--- a/lib/percept/test/percept_SUITE.erl
+++ b/lib/percept/test/percept_SUITE.erl
@@ -27,6 +27,8 @@
%% Test cases
-export([
+ app/1,
+ appup/1,
profile/1,
analyze/1,
analyze_dist/1,
@@ -54,7 +56,7 @@ end_per_testcase(_Case, Config) ->
suite() -> [{ct_hooks,[ts_install_cth]}].
all() ->
- [webserver, profile, analyze, analyze_dist].
+ [app, appup, webserver, profile, analyze, analyze_dist].
groups() ->
[].
@@ -70,6 +72,14 @@ end_per_group(_GroupName, Config) ->
%% Tests
%%----------------------------------------------------------------------
+%% Test that the percept app file is ok
+app(Config) when is_list(Config) ->
+ ok = ?t:app_test(percept).
+
+%% Test that the percept appup file is ok
+appup(Config) when is_list(Config) ->
+ ok = ?t:appup_test(percept).
+
webserver(suite) ->
[];
webserver(doc) ->
diff --git a/lib/percept/vsn.mk b/lib/percept/vsn.mk
index 99729c11e2..935a9d1336 100644
--- a/lib/percept/vsn.mk
+++ b/lib/percept/vsn.mk
@@ -1 +1 @@
-PERCEPT_VSN = 0.8.8.2
+PERCEPT_VSN = 0.8.9
diff --git a/lib/public_key/asn1/Makefile b/lib/public_key/asn1/Makefile
index a4e36c7293..c1b3bc866d 100644
--- a/lib/public_key/asn1/Makefile
+++ b/lib/public_key/asn1/Makefile
@@ -41,7 +41,7 @@ RELSYSDIR = $(RELEASE_PATH)/lib/public_key-$(VSN)
ASN_TOP = OTP-PUB-KEY PKCS-FRAME
ASN_MODULES = PKIX1Explicit88 PKIX1Implicit88 PKIX1Algorithms88 \
PKIXAttributeCertificate PKCS-1 PKCS-3 PKCS-7 PKCS-8 PKCS-10 PKCS5v2-0 OTP-PKIX \
- InformationFramework
+ InformationFramework RFC5639
ASN_ASNS = $(ASN_MODULES:%=%.asn1)
ASN_ERLS = $(ASN_TOP:%=%.erl)
ASN_HRLS = $(ASN_TOP:%=%.hrl)
@@ -116,7 +116,8 @@ OTP-PUB-KEY.asn1db: PKIX1Algorithms88.asn1 \
PKCS-7.asn1\
PKCS-10.asn1\
InformationFramework.asn1\
- OTP-PKIX.asn1
+ OTP-PKIX.asn1 \
+ RFC5639.asn1
$(EBIN)/PKCS-FRAME.beam: PKCS-FRAME.erl PKCS-FRAME.hrl
PKCS-FRAME.erl PKCS-FRAME.hrl: PKCS-FRAME.asn1db
diff --git a/lib/public_key/asn1/OTP-PUB-KEY.set.asn b/lib/public_key/asn1/OTP-PUB-KEY.set.asn
index e94f428e4b..b3f3ccdb77 100644
--- a/lib/public_key/asn1/OTP-PUB-KEY.set.asn
+++ b/lib/public_key/asn1/OTP-PUB-KEY.set.asn
@@ -9,3 +9,4 @@ DSS.asn1
ECPrivateKey.asn1
PKCS-7.asn1
PKCS-10.asn1
+RFC5639.asn1
diff --git a/lib/public_key/asn1/RFC5639.asn1 b/lib/public_key/asn1/RFC5639.asn1
new file mode 100644
index 0000000000..85b8533132
--- /dev/null
+++ b/lib/public_key/asn1/RFC5639.asn1
@@ -0,0 +1,27 @@
+RFC5639 {iso(1) identified-organization(3) teletrust(36) algorithm(3) signature-algorithm(3) ecSign(2) 8} DEFINITIONS EXPLICIT TAGS ::=
+
+BEGIN
+
+ecStdCurvesAndGeneration OBJECT IDENTIFIER::= {iso(1)
+ identified-organization(3) teletrust(36) algorithm(3) signature-algorithm(3) ecSign(2) 8}
+
+ellipticCurveRFC5639 OBJECT IDENTIFIER ::= {ecStdCurvesAndGeneration 1}
+
+versionOne OBJECT IDENTIFIER ::= {ellipticCurveRFC5639 1}
+
+brainpoolP160r1 OBJECT IDENTIFIER ::= {versionOne 1}
+brainpoolP160t1 OBJECT IDENTIFIER ::= {versionOne 2}
+brainpoolP192r1 OBJECT IDENTIFIER ::= {versionOne 3}
+brainpoolP192t1 OBJECT IDENTIFIER ::= {versionOne 4}
+brainpoolP224r1 OBJECT IDENTIFIER ::= {versionOne 5}
+brainpoolP224t1 OBJECT IDENTIFIER ::= {versionOne 6}
+brainpoolP256r1 OBJECT IDENTIFIER ::= {versionOne 7}
+brainpoolP256t1 OBJECT IDENTIFIER ::= {versionOne 8}
+brainpoolP320r1 OBJECT IDENTIFIER ::= {versionOne 9}
+brainpoolP320t1 OBJECT IDENTIFIER ::= {versionOne 10}
+brainpoolP384r1 OBJECT IDENTIFIER ::= {versionOne 11}
+brainpoolP384t1 OBJECT IDENTIFIER ::= {versionOne 12}
+brainpoolP512r1 OBJECT IDENTIFIER ::= {versionOne 13}
+brainpoolP512t1 OBJECT IDENTIFIER ::= {versionOne 14}
+
+END
diff --git a/lib/public_key/doc/src/cert_records.xml b/lib/public_key/doc/src/cert_records.xml
index 79e5cb219d..397c13b463 100644
--- a/lib/public_key/doc/src/cert_records.xml
+++ b/lib/public_key/doc/src/cert_records.xml
@@ -5,7 +5,7 @@
<header>
<copyright>
<year>2008</year>
- <year>2013</year>
+ <year>2014</year>
<holder>Ericsson AB, All Rights Reserved</holder>
</copyright>
<legalnotice>
@@ -39,7 +39,7 @@
The intent is to describe the data types and not to specify the meaning of each
component for this we refer you to <url
href="http://www.ietf.org/rfc/rfc5280.txt">RFC 5280</url> and
- <url href="http://www.rsa.com/rsalabs/node.asp?id=2124">PKCS-10</url>.
+ <url href="http://www.ietf.org/rfc/rfc5967.txt">PKCS-10</url>.
</p>
<p>Use the following include directive to get access to the
diff --git a/lib/public_key/doc/src/notes.xml b/lib/public_key/doc/src/notes.xml
index 1dce718ea3..592d3c797d 100644
--- a/lib/public_key/doc/src/notes.xml
+++ b/lib/public_key/doc/src/notes.xml
@@ -34,6 +34,70 @@
<file>notes.xml</file>
</header>
+<section><title>Public_Key 0.22</title>
+
+ <section><title>Fixed Bugs and Malfunctions</title>
+ <list>
+ <item>
+ <p>
+ Fix incorrect dialyzer spec and types, also enhance
+ documentation. </p>
+ <p>
+ Thanks to Ayaz Tuncer.</p>
+ <p>
+ Own Id: OTP-11627</p>
+ </item>
+ <item>
+ <p>
+ Application upgrade (appup) files are corrected for the
+ following applications: </p>
+ <p>
+ <c>asn1, common_test, compiler, crypto, debugger,
+ dialyzer, edoc, eldap, erl_docgen, et, eunit, gs, hipe,
+ inets, observer, odbc, os_mon, otp_mibs, parsetools,
+ percept, public_key, reltool, runtime_tools, ssh,
+ syntax_tools, test_server, tools, typer, webtool, wx,
+ xmerl</c></p>
+ <p>
+ A new test utility for testing appup files is added to
+ test_server. This is now used by most applications in
+ OTP.</p>
+ <p>
+ (Thanks to Tobias Schlager)</p>
+ <p>
+ Own Id: OTP-11744</p>
+ </item>
+ </list>
+ </section>
+
+
+ <section><title>Improvements and New Features</title>
+ <list>
+ <item>
+ <p>
+ Moved elliptic curve definition from the crypto
+ NIF/OpenSSL into Erlang code, adds the RFC-5639 brainpool
+ curves and makes TLS use them (RFC-7027).</p>
+ <p>
+ Thanks to Andreas Schultz</p>
+ <p>
+ Own Id: OTP-11578</p>
+ </item>
+ <item>
+ <p>
+ Handle v1 CRLs, with no extensions and fixes issues with
+ IDP (Issuing Distribution Point) comparison during CRL
+ validation. </p>
+ <p>
+ Thanks to Andrew Thompson</p>
+ <p>
+ Own Id: OTP-11761</p>
+ </item>
+ </list>
+ </section>
+
+</section>
+
<section><title>Public_Key 0.21</title>
<section><title>Improvements and New Features</title>
diff --git a/lib/public_key/doc/src/part.xml b/lib/public_key/doc/src/part.xml
index 51e628aa90..73146c8e2a 100644
--- a/lib/public_key/doc/src/part.xml
+++ b/lib/public_key/doc/src/part.xml
@@ -5,7 +5,7 @@
<header>
<copyright>
<year>2008</year>
- <year>2013</year>
+ <year>2014</year>
<holder>Ericsson AB, All Rights Reserved</holder>
</copyright>
<legalnotice>
@@ -34,7 +34,7 @@
<p> This application provides an API to public key infrastructure
from <url href="http://www.ietf.org/rfc/rfc5280.txt">RFC
5280</url> (X.509 certificates) and public key formats defined by
- the <url href="http://www.rsa.com/rsalabs/node.asp?id=2124">
+ the <url href="http://en.wikipedia.org/wiki/PKCS">
PKCS-standard</url></p>
</description>
<xi:include href="introduction.xml"/>
diff --git a/lib/public_key/doc/src/public_key.xml b/lib/public_key/doc/src/public_key.xml
index 002f641f1d..8e93f562d4 100644
--- a/lib/public_key/doc/src/public_key.xml
+++ b/lib/public_key/doc/src/public_key.xml
@@ -5,7 +5,7 @@
<header>
<copyright>
<year>2008</year>
- <year>2013</year>
+ <year>2014</year>
<holder>Ericsson AB, All Rights Reserved</holder>
</copyright>
<legalnotice>
@@ -48,12 +48,12 @@
<item>Supports <url href="http://www.ietf.org/rfc/rfc5280.txt">RFC 5280 </url> -
Internet X.509 Public Key Infrastructure Certificate and Certificate Revocation List (CRL) Profile </item>
- <item>Supports <url href="http://www.rsa.com/rsalabs/node.asp?id=2125"> PKCS-1 </url> - RSA Cryptography Standard </item>
+ <item>Supports <url href="http://www.ietf.org/rfc/rfc3447.txt"> PKCS-1 </url> - RSA Cryptography Standard </item>
<item>Supports <url href="http://csrc.nist.gov/publications/fips/fips186-3/fips_186-3.pdf"> DSS</url>- Digital Signature Standard (DSA - Digital Signature Algorithm)</item>
- <item>Supports <url href="http://www.rsa.com/rsalabs/node.asp?id=2126"> PKCS-3 </url> - Diffie-Hellman Key Agreement Standard </item>
- <item>Supports <url href="http://www.rsa.com/rsalabs/node.asp?id=2127"> PKCS-5</url> - Password-Based Cryptography Standard </item>
- <item>Supports <url href="http://www.rsa.com/rsalabs/node.asp?id=2130"> PKCS-8</url> - Private-Key Information Syntax Standard</item>
- <item>Supports <url href="http://www.rsa.com/rsalabs/node.asp?id=2132"> PKCS-10</url> - Certification Request Syntax Standard</item>
+ <item>Supports <url href="http://www.emc.com/emc-plus/rsa-labs/standards-initiatives/pkcs-3-diffie-hellman-key-agreement-standar.htm"> PKCS-3 </url> - Diffie-Hellman Key Agreement Standard </item>
+ <item>Supports <url href="http://www.ietf.org/rfc/rfc2898.txt"> PKCS-5</url> - Password-Based Cryptography Standard </item>
+ <item>Supports <url href="http://www.ietf.org/rfc/rfc5208.txt"> PKCS-8</url> - Private-Key Information Syntax Standard</item>
+ <item>Supports <url href="http://www.ietf.org/rfc/rfc5967.txt"> PKCS-10</url> - Certification Request Syntax Standard</item>
</list>
</section>
@@ -71,7 +71,7 @@
<p>Use the following include directive to get access to the
records and constant macros described here and in the User's Guide.</p>
- <code> -include_lib("public_key/include/public_key.hrl"). </code>
+ <code> -include_lib("public_key/include/public_key.hrl").</code>
<p><em>Data Types </em></p>
@@ -84,44 +84,49 @@
<p><code>der_encoded() = binary()</code></p>
<p><code>pki_asn1_type() = 'Certificate' | 'RSAPrivateKey'| 'RSAPublicKey' |
- 'DSAPrivateKey' | 'DSAPublicKey' | 'DHParameter' | 'SubjectPublicKeyInfo' |
- 'PrivateKeyInfo' | 'CertificationRequest' | 'ECPrivateKey'|
- 'EcpkParameters'</code></p>
+ 'DSAPrivateKey' | 'DSAPublicKey' | 'DHParameter' |
+ 'SubjectPublicKeyInfo' | 'PrivateKeyInfo' |
+ 'CertificationRequest' | 'ECPrivateKey' | 'EcpkParameters'</code></p>
<p><code>pem_entry () = {pki_asn1_type(), binary(), %% DER or encrypted DER
- not_encrypted | cipher_info()} </code></p>
+ not_encrypted | cipher_info()}</code></p>
- <p><code>cipher_info() = {"RC2-CBC | "DES-CBC" | "DES-EDE3-CBC", crypto:rand_bytes(8)} |
- 'PBES2-params'} </code></p>
+ <p><code>cipher_info() = {"RC2-CBC | "DES-CBC" | "DES-EDE3-CBC",
+ crypto:rand_bytes(8)} | 'PBES2-params'}</code></p>
+ <p><code>public_key() = rsa_public_key() | dsa_public_key() | ec_public_key()</code></p>
+ <p><code>private_key() = rsa_private_key() | dsa_private_key() | ec_private_key()</code></p>
<p><code>rsa_public_key() = #'RSAPublicKey'{}</code></p>
- <p><code>rsa_private_key() = #'RSAPrivateKey'{} </code></p>
+ <p><code>rsa_private_key() = #'RSAPrivateKey'{}</code></p>
- <p><code>dsa_public_key() = {integer(), #'Dss-Parms'{}} </code></p>
+ <p><code>dsa_public_key() = {integer(), #'Dss-Parms'{}}</code></p>
<p><code>dsa_private_key() = #'DSAPrivateKey'{}</code></p>
- <p><code>ec_public_key() = {#'ECPoint'{}, #'EcpkParameters'{} | {namedCurve, oid()}} </code></p>
+ <p><code>ec_public_key() = {#'ECPoint'{}, #'EcpkParameters'{} |
+ {namedCurve, oid()}}</code></p>
<p><code>ec_private_key() = #'ECPrivateKey'{}</code></p>
- <p><code> public_crypt_options() = [{rsa_pad, rsa_padding()}]. </code></p>
+ <p><code>public_crypt_options() = [{rsa_pad, rsa_padding()}].</code></p>
- <p><code> rsa_padding() = 'rsa_pkcs1_padding' | 'rsa_pkcs1_oaep_padding'
- | 'rsa_no_padding'</code></p>
+ <p><code>rsa_padding() = 'rsa_pkcs1_padding' | 'rsa_pkcs1_oaep_padding' |
+ 'rsa_no_padding'</code></p>
- <p><code> rsa_digest_type() = 'md5' | 'sha' | 'sha224' | 'sha256' | 'sha384' | 'sha512' </code></p>
+ <p><code>rsa_digest_type() = 'md5' | 'sha' | 'sha224' | 'sha256' | 'sha384' |
+ 'sha512'</code></p>
- <p><code> dss_digest_type() = 'sha' </code></p>
+ <p><code>dss_digest_type() = 'sha'</code></p>
- <p><code> ecdsa_digest_type() = 'sha'| 'sha224' | 'sha256' | 'sha384' | 'sha512' </code></p>
+ <p><code>ecdsa_digest_type() = 'sha'| 'sha224' | 'sha256' | 'sha384' | 'sha512'</code></p>
- <p><code> crl_reason() = unspecified | keyCompromise | cACompromise | affiliationChanged | superseded | cessationOfOperation | certificateHold | privilegeWithdrawn | aACompromise
- </code></p>
+ <p><code>crl_reason() = unspecified | keyCompromise | cACompromise |
+ affiliationChanged | superseded | cessationOfOperation |
+ certificateHold | privilegeWithdrawn | aACompromise</code></p>
- <p><code> ssh_file() = openssh_public_key | rfc4716_public_key |
- known_hosts | auth_keys </code></p>
+ <p><code>ssh_file() = openssh_public_key | rfc4716_public_key | known_hosts |
+ auth_keys</code></p>
<!-- <p><code>policy_tree() = [Root, Children]</code></p> -->
@@ -430,7 +435,7 @@
constructing the input to this function and that should be run through the <c>verify_fun</c>.</d>
<v> CertChain = [der_encode()]</v>
<d>A list of DER encoded certificates in trust order ending with the peer certificate.</d>
- <v> Options = proplists:proplists()</v>
+ <v> Options = proplists:proplist()</v>
<v>PublicKeyInfo = {?'rsaEncryption' | ?'id-dsa',
rsa_public_key() | integer(), 'NULL' | 'Dss-Parms'{}}</v>
<v> PolicyTree = term() </v>
@@ -456,11 +461,14 @@
<p>The fun should be defined as:</p>
<code>
-fun(OtpCert :: #'OTPCertificate'{}, Event :: {bad_cert, Reason :: atom()} |
- {extension, #'Extension'{}},
+fun(OtpCert :: #'OTPCertificate'{},
+ Event :: {bad_cert, Reason :: atom()} |
+ {extension, #'Extension'{}},
InitialUserState :: term()) ->
- {valid, UserState :: term()} | {valid_peer, UserState :: term()} |
- {fail, Reason :: term()} | {unknown, UserState :: term()}.
+ {valid, UserState :: term()} |
+ {valid_peer, UserState :: term()} |
+ {fail, Reason :: term()} |
+ {unknown, UserState :: term()}.
</code>
<p>If the verify callback fun returns {fail, Reason}, the
@@ -492,7 +500,7 @@ fun(OtpCert :: #'OTPCertificate'{}, Event :: {bad_cert, Reason :: atom()} |
<type>
<v> OTPCertificate = #'OTPCertificate'{}</v>
<v> DPAndCRLs = [{DP::#'DistributionPoint'{} ,CRL::#'CertificateList'{}}] </v>
- <v> Options = proplists:proplists()</v>
+ <v> Options = proplists:proplist()</v>
<v> CRLStatus() = valid | {bad_cert, revocation_status_undetermined} |
{bad_cert, {revoked, crl_reason()}}</v>
</type>
@@ -506,7 +514,8 @@ fun(OtpCert :: #'OTPCertificate'{}, Event :: {bad_cert, Reason :: atom()} |
<item>
<p>The fun has the following type spec:</p>
- <code> fun(#'DistributionPoint'{}, #'CertificateList'{}) -> #'CertificateList'{}</code>
+ <code> fun(#'DistributionPoint'{}, #'CertificateList'{}) ->
+ #'CertificateList'{}</code>
<p>The fun should use the information in the distribution point to acesses
the lates possible version of the CRL. If this fun is not specified
@@ -514,6 +523,21 @@ fun(OtpCert :: #'OTPCertificate'{}, Event :: {bad_cert, Reason :: atom()} |
</p>
<code> fun(_DP, CRL) -> CRL end</code>
</item>
+
+ <tag>{issuer_fun, fun()}</tag>
+ <item>
+ <p>The fun has the following type spec:</p>
+
+ <code>
+fun(#'DistributionPoint'{}, #'CertificateList'{},
+ {rdnSequence,[#'AttributeTypeAndValue'{}]}, term()) ->
+ {ok, #'OTPCertificate'{}, [der_encoded]}</code>
+
+ <p>The fun should return the root certificate and certificate chain
+ that has signed the CRL.
+ </p>
+ <code> fun(DP, CRL, Issuer, UserState) -> {ok, RootCert, CertChain}</code>
+ </item>
</taglist>
</desc>
</func>
diff --git a/lib/public_key/include/public_key.hrl b/lib/public_key/include/public_key.hrl
index 1e882e76ee..c6394115e3 100644
--- a/lib/public_key/include/public_key.hrl
+++ b/lib/public_key/include/public_key.hrl
@@ -1,7 +1,7 @@
%%
%% %CopyrightBegin%
%%
-%% Copyright Ericsson AB 2008-2013. All Rights Reserved.
+%% Copyright Ericsson AB 2008-2014. 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
@@ -76,7 +76,6 @@
point
}).
-
-define(unspecified, 0).
-define(keyCompromise, 1).
-define(cACompromise, 2).
@@ -88,22 +87,4 @@
-define(privilegeWithdrawn, 9).
-define(aACompromise, 10).
--type public_key() :: rsa_public_key() | dsa_public_key().
--type rsa_public_key() :: #'RSAPublicKey'{}.
--type rsa_private_key() :: #'RSAPrivateKey'{}.
--type dsa_private_key() :: #'DSAPrivateKey'{}.
--type dsa_public_key() :: {integer(), #'Dss-Parms'{}}.
--type ec_public_key() :: {#'ECPoint'{},{namedCurve, Oid::tuple()} | #'ECParameters'{}}.
--type ec_private_key() :: #'ECPrivateKey'{}.
--type der_encoded() :: binary().
--type decrypt_der() :: binary().
--type pki_asn1_type() :: 'Certificate' | 'RSAPrivateKey' | 'RSAPublicKey'
- | 'DSAPrivateKey' | 'DSAPublicKey' | 'DHParameter'
- | 'SubjectPublicKeyInfo' | 'CertificationRequest' | 'CertificateList'.
--type pem_entry() :: {pki_asn1_type(), binary(), %% DER or Encrypted DER
- not_encrypted | {Cipher :: string(), Salt :: binary()}}.
--type asn1_type() :: atom(). %% see "OTP-PUB-KEY.hrl
--type ssh_file() :: openssh_public_key | rfc4716_public_key | known_hosts |
- auth_keys.
-
-endif. % -ifdef(public_key).
diff --git a/lib/public_key/src/pubkey_cert.erl b/lib/public_key/src/pubkey_cert.erl
index dc8d68c78f..ae517ca642 100644
--- a/lib/public_key/src/pubkey_cert.erl
+++ b/lib/public_key/src/pubkey_cert.erl
@@ -319,6 +319,8 @@ verify_fun(Otpcert, Result, UserState0, VerifyFun) ->
%%
%% Description: Extracts a specific extension from a list of extensions.
%%--------------------------------------------------------------------
+select_extension(_, asn1_NOVALUE) ->
+ undefined;
select_extension(_, []) ->
undefined;
select_extension(Id, [#'Extension'{extnID = Id} = Extension | _]) ->
@@ -342,8 +344,11 @@ match_name(uniformResourceIdentifier, URI, [PermittedName | Rest]) ->
incomplete ->
false;
{_, _, Host, _, _} ->
- match_name(fun is_valid_host_or_domain/2, Host,
- PermittedName, Rest)
+ PN = case split_uri(PermittedName) of
+ {_, _, PNhost, _, _} -> PNhost;
+ _X -> PermittedName
+ end,
+ match_name(fun is_valid_host_or_domain/2, Host, PN, Rest)
end;
match_name(emailAddress, Name, [PermittedName | Rest]) ->
@@ -511,10 +516,10 @@ is_dir_name2(Value, Value) -> true;
is_dir_name2({printableString, Value1}, {printableString, Value2}) ->
string:to_lower(strip_spaces(Value1)) =:=
string:to_lower(strip_spaces(Value2));
-is_dir_name2({utf8String, Value1}, String) -> %% BUGBUG FIX UTF8 conv
- is_dir_name2({printableString, binary_to_list(Value1)}, String);
-is_dir_name2(String, {utf8String, Value1}) -> %% BUGBUG FIX UTF8 conv
- is_dir_name2(String, {printableString, binary_to_list(Value1)});
+is_dir_name2({utf8String, Value1}, String) ->
+ is_dir_name2({printableString, unicode:characters_to_list(Value1)}, String);
+is_dir_name2(String, {utf8String, Value1}) ->
+ is_dir_name2(String, {printableString, unicode:characters_to_list(Value1)});
is_dir_name2(_, _) ->
false.
diff --git a/lib/public_key/src/pubkey_cert_records.erl b/lib/public_key/src/pubkey_cert_records.erl
index fdd89aa70d..9a8e49f265 100644
--- a/lib/public_key/src/pubkey_cert_records.erl
+++ b/lib/public_key/src/pubkey_cert_records.erl
@@ -1,7 +1,7 @@
%%
%% %CopyrightBegin%
%%
-%% Copyright Ericsson AB 2008-2013. All Rights Reserved.
+%% Copyright Ericsson AB 2008-2014. 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
@@ -99,7 +99,7 @@ transform(Other,_) ->
Other.
%%--------------------------------------------------------------------
--spec supportedPublicKeyAlgorithms(Oid::tuple()) -> asn1_type().
+-spec supportedPublicKeyAlgorithms(Oid::tuple()) -> public_key:asn1_type().
%%
%% Description: Returns the public key type for an algorithm
%% identifier tuple as found in SubjectPublicKeyInfo.
@@ -147,6 +147,20 @@ namedCurves(?'sect163r1') -> sect163r1;
namedCurves(?'sect163k1') -> sect163k1;
namedCurves(?'secp256r1') -> secp256r1;
namedCurves(?'secp192r1') -> secp192r1;
+namedCurves(?'brainpoolP160r1') -> brainpoolP160r1;
+namedCurves(?'brainpoolP160t1') -> brainpoolP160t1;
+namedCurves(?'brainpoolP192r1') -> brainpoolP192r1;
+namedCurves(?'brainpoolP192t1') -> brainpoolP192t1;
+namedCurves(?'brainpoolP224r1') -> brainpoolP224r1;
+namedCurves(?'brainpoolP224t1') -> brainpoolP224t1;
+namedCurves(?'brainpoolP256r1') -> brainpoolP256r1;
+namedCurves(?'brainpoolP256t1') -> brainpoolP256t1;
+namedCurves(?'brainpoolP320r1') -> brainpoolP320r1;
+namedCurves(?'brainpoolP320t1') -> brainpoolP320t1;
+namedCurves(?'brainpoolP384r1') -> brainpoolP384r1;
+namedCurves(?'brainpoolP384t1') -> brainpoolP384t1;
+namedCurves(?'brainpoolP512r1') -> brainpoolP512r1;
+namedCurves(?'brainpoolP512t1') -> brainpoolP512t1;
namedCurves(sect571r1) -> ?'sect571r1';
namedCurves(sect571k1) -> ?'sect571k1';
@@ -180,7 +194,21 @@ namedCurves(sect239k1) -> ?'sect239k1';
namedCurves(sect163r1) -> ?'sect163r1';
namedCurves(sect163k1) -> ?'sect163k1';
namedCurves(secp256r1) -> ?'secp256r1';
-namedCurves(secp192r1) -> ?'secp192r1'.
+namedCurves(secp192r1) -> ?'secp192r1';
+namedCurves(brainpoolP160r1) -> ?'brainpoolP160r1';
+namedCurves(brainpoolP160t1) -> ?'brainpoolP160t1';
+namedCurves(brainpoolP192r1) -> ?'brainpoolP192r1';
+namedCurves(brainpoolP192t1) -> ?'brainpoolP192t1';
+namedCurves(brainpoolP224r1) -> ?'brainpoolP224r1';
+namedCurves(brainpoolP224t1) -> ?'brainpoolP224t1';
+namedCurves(brainpoolP256r1) -> ?'brainpoolP256r1';
+namedCurves(brainpoolP256t1) -> ?'brainpoolP256t1';
+namedCurves(brainpoolP320r1) -> ?'brainpoolP320r1';
+namedCurves(brainpoolP320t1) -> ?'brainpoolP320t1';
+namedCurves(brainpoolP384r1) -> ?'brainpoolP384r1';
+namedCurves(brainpoolP384t1) -> ?'brainpoolP384t1';
+namedCurves(brainpoolP512r1) -> ?'brainpoolP512r1';
+namedCurves(brainpoolP512t1) -> ?'brainpoolP512t1'.
%%--------------------------------------------------------------------
%%% Internal functions
diff --git a/lib/public_key/src/pubkey_crl.erl b/lib/public_key/src/pubkey_crl.erl
index eaba5bfa1b..f0df4bc3f2 100644
--- a/lib/public_key/src/pubkey_crl.erl
+++ b/lib/public_key/src/pubkey_crl.erl
@@ -39,7 +39,13 @@ validate(OtpCert, OtherDPCRLs, DP, {DerCRL, CRL}, {DerDeltaCRL, DeltaCRL},
CertIssuer = TBSCert#'OTPTBSCertificate'.issuer,
TBSCRL = CRL#'CertificateList'.tbsCertList,
CRLIssuer = TBSCRL#'TBSCertList'.issuer,
- AltNames = subject_alt_names(TBSCert#'OTPTBSCertificate'.extensions),
+ AltNames = case pubkey_cert:select_extension(?'id-ce-subjectAltName',
+ TBSCert#'OTPTBSCertificate'.extensions) of
+ undefined ->
+ [];
+ Ext ->
+ Ext#'Extension'.extnValue
+ end,
revoked_status(DP, IDP, {directoryName, CRLIssuer},
[ {directoryName, CertIssuer} | AltNames], SerialNumber, Revoked,
DeltaRevoked, RevokedState1);
@@ -397,16 +403,18 @@ verify_dp_name(IDPNames, DPorIssuerNames) ->
match_one([], _) ->
false;
match_one([{Type, Name} | Names], CandidateNames) ->
- Candidates = [NameName || {NameType, NameName} <- CandidateNames, NameType == Type],
+ Candidates = [NameName || {NameType, NameName} <- CandidateNames,
+ NameType == Type],
case Candidates of
[] ->
false;
- [_|_] -> case pubkey_cert:match_name(Type, Name, Candidates) of
- true ->
- true;
- false ->
- match_one(Names, CandidateNames)
- end
+ [_|_] ->
+ case pubkey_cert:match_name(Type, Name, Candidates) of
+ true ->
+ true;
+ false ->
+ match_one(Names, CandidateNames)
+ end
end.
verify_dp_bools(TBSCert, IDP) ->
@@ -664,6 +672,8 @@ verify_extensions([#'TBSCertList_revokedCertificates_SEQOF'{crlEntryExtensions =
verify_extensions(pubkey_cert:extensions_list(Ext)) and verify_extensions(Rest);
verify_extensions([]) ->
true;
+verify_extensions(asn1_NOVALUE) ->
+ true;
verify_extensions([#'Extension'{critical = true, extnID = Id} | Rest]) ->
case lists:member(Id, [?'id-ce-authorityKeyIdentifier',
?'id-ce-issuerAltName',
@@ -689,13 +699,3 @@ authority_key_identifier(Extensions) ->
Enc = extension_value(?'id-ce-authorityKeyIdentifier',
'AuthorityKeyIdentifier', Extensions),
pubkey_cert_records:transform(Enc, decode).
-
-subject_alt_names(Extensions) ->
- Enc = extension_value(?'id-ce-subjectAltName',
- 'GeneralNames', Extensions),
- case Enc of
- undefined ->
- [];
- _ ->
- pubkey_cert_records:transform(Enc, decode)
- end.
diff --git a/lib/public_key/src/pubkey_pem.erl b/lib/public_key/src/pubkey_pem.erl
index c0a0de815b..3a1653d989 100644
--- a/lib/public_key/src/pubkey_pem.erl
+++ b/lib/public_key/src/pubkey_pem.erl
@@ -1,7 +1,7 @@
%%
%% %CopyrightBegin%
%%
-%% Copyright Ericsson AB 2008-2013. All Rights Reserved.
+%% Copyright Ericsson AB 2008-2014. 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
@@ -51,7 +51,7 @@
%%====================================================================
%%--------------------------------------------------------------------
--spec decode(binary()) -> [pem_entry()].
+-spec decode(binary()) -> [public_key:pem_entry()].
%%
%% Description: Decodes a PEM binary.
%%--------------------------------------------------------------------
@@ -59,7 +59,7 @@ decode(Bin) ->
decode_pem_entries(split_bin(Bin), []).
%%--------------------------------------------------------------------
--spec encode([pem_entry()]) -> iolist().
+-spec encode([public_key:pem_entry()]) -> iolist().
%%
%% Description: Encodes a list of PEM entries.
%%--------------------------------------------------------------------
@@ -67,7 +67,7 @@ encode(PemEntries) ->
encode_pem_entries(PemEntries).
%%--------------------------------------------------------------------
--spec decipher({pki_asn1_type(), DerEncrypted::binary(),
+-spec decipher({public_key:pki_asn1_type(), DerEncrypted::binary(),
{Cipher :: string(), Salt :: iodata() | #'PBES2-params'{}}},
string()) -> Der::binary().
%%
diff --git a/lib/public_key/src/pubkey_ssh.erl b/lib/public_key/src/pubkey_ssh.erl
index 41280b9e14..0522ea6ac3 100644
--- a/lib/public_key/src/pubkey_ssh.erl
+++ b/lib/public_key/src/pubkey_ssh.erl
@@ -1,7 +1,7 @@
%%
%% %CopyrightBegin%
%%
-%% Copyright Ericsson AB 2011-2013. All Rights Reserved.
+%% Copyright Ericsson AB 2011-2014. 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
@@ -35,7 +35,8 @@
%%====================================================================
%%--------------------------------------------------------------------
--spec decode(binary(), public_key | ssh_file()) -> [{public_key(), Attributes::list()}].
+-spec decode(binary(), public_key | public_key:ssh_file()) ->
+ [{public_key:public_key(), Attributes::list()}].
%%
%% Description: Decodes a ssh file-binary.
%%--------------------------------------------------------------------
@@ -52,7 +53,7 @@ decode(Bin, Type) ->
openssh_decode(Bin, Type).
%%--------------------------------------------------------------------
--spec encode([{public_key(), Attributes::list()}], ssh_file()) ->
+-spec encode([{public_key:public_key(), Attributes::list()}], public_key:ssh_file()) ->
binary().
%%
%% Description: Encodes a list of ssh file entries.
diff --git a/lib/public_key/src/public_key.app.src b/lib/public_key/src/public_key.app.src
index 736a778a4b..88ef07c5a6 100644
--- a/lib/public_key/src/public_key.app.src
+++ b/lib/public_key/src/public_key.app.src
@@ -13,7 +13,9 @@
]},
{applications, [asn1, crypto, kernel, stdlib]},
{registered, []},
- {env, []}
+ {env, []},
+ {runtime_dependencies, ["stdlib-2.0","kernel-3.0","erts-6.0","crypto-3.3",
+ "asn1-3.0"]}
]
}.
diff --git a/lib/public_key/src/public_key.appup.src b/lib/public_key/src/public_key.appup.src
index aacd3b866d..5278732c87 100644
--- a/lib/public_key/src/public_key.appup.src
+++ b/lib/public_key/src/public_key.appup.src
@@ -1,8 +1,21 @@
%% -*- erlang -*-
+%% %CopyrightBegin%
+%%
+%% Copyright Ericsson AB 2014. 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%
{"%VSN%",
- [
- {<<"0\\.*">>, [{restart_application, public_key}]}
- ],
- [
- {<<"0\\.*">>, [{restart_application, public_key}]}
- ]}.
+ [{<<".*">>,[{restart_application, public_key}]}],
+ [{<<".*">>,[{restart_application, public_key}]}]
+}.
diff --git a/lib/public_key/src/public_key.erl b/lib/public_key/src/public_key.erl
index ceecbcc7f2..a732455aa7 100644
--- a/lib/public_key/src/public_key.erl
+++ b/lib/public_key/src/public_key.erl
@@ -1,7 +1,7 @@
%%
%% %CopyrightBegin%
%%
-%% Copyright Ericsson AB 2008-2013. All Rights Reserved.
+%% Copyright Ericsson AB 2008-2014. 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
@@ -49,6 +49,27 @@
pkix_crls_validate/3
]).
+-export_type([public_key/0, private_key/0, pem_entry/0,
+ pki_asn1_type/0, asn1_type/0, ssh_file/0, der_encoded/0]).
+
+-type public_key() :: rsa_public_key() | dsa_public_key() | ec_public_key().
+-type private_key() :: rsa_private_key() | dsa_private_key() | ec_private_key().
+
+-type rsa_public_key() :: #'RSAPublicKey'{}.
+-type rsa_private_key() :: #'RSAPrivateKey'{}.
+-type dsa_private_key() :: #'DSAPrivateKey'{}.
+-type dsa_public_key() :: {integer(), #'Dss-Parms'{}}.
+-type ec_public_key() :: {#'ECPoint'{},{namedCurve, Oid::tuple()} | #'ECParameters'{}}.
+-type ec_private_key() :: #'ECPrivateKey'{}.
+-type der_encoded() :: binary().
+-type pki_asn1_type() :: 'Certificate' | 'RSAPrivateKey' | 'RSAPublicKey'
+ | 'DSAPrivateKey' | 'DSAPublicKey' | 'DHParameter'
+ | 'SubjectPublicKeyInfo' | 'CertificationRequest' | 'CertificateList'.
+-type pem_entry() :: {pki_asn1_type(), binary(), %% DER or Encrypted DER
+ not_encrypted | {Cipher :: string(), Salt :: binary()}}.
+-type asn1_type() :: atom(). %% see "OTP-PUB-KEY.hrl
+-type ssh_file() :: openssh_public_key | rfc4716_public_key | known_hosts |
+ auth_keys.
-type rsa_padding() :: 'rsa_pkcs1_padding' | 'rsa_pkcs1_oaep_padding'
| 'rsa_no_padding'.
-type public_crypt_options() :: [{rsa_pad, rsa_padding()}].
diff --git a/lib/public_key/test/public_key_SUITE.erl b/lib/public_key/test/public_key_SUITE.erl
index d3e9bf7cf6..163f5f4413 100644
--- a/lib/public_key/test/public_key_SUITE.erl
+++ b/lib/public_key/test/public_key_SUITE.erl
@@ -36,7 +36,7 @@
suite() -> [{ct_hooks,[ts_install_cth]}].
all() ->
- [app,
+ [app, appup,
{group, pem_decode_encode},
{group, ssh_public_key_decode_encode},
encrypt_decrypt,
@@ -95,6 +95,13 @@ app(Config) when is_list(Config) ->
%%--------------------------------------------------------------------
+appup() ->
+ [{doc, "Test that the public_key appup file is ok"}].
+appup(Config) when is_list(Config) ->
+ ok = ?t:appup_test(public_key).
+
+%%--------------------------------------------------------------------
+
dsa_pem() ->
[{doc, "DSA PEM-file decode/encode"}].
dsa_pem(Config) when is_list(Config) ->
diff --git a/lib/public_key/vsn.mk b/lib/public_key/vsn.mk
index 3473757c5f..f0450918aa 100644
--- a/lib/public_key/vsn.mk
+++ b/lib/public_key/vsn.mk
@@ -1 +1 @@
-PUBLIC_KEY_VSN = 0.21
+PUBLIC_KEY_VSN = 0.22
diff --git a/lib/reltool/doc/src/notes.xml b/lib/reltool/doc/src/notes.xml
index df81418677..969af2d745 100644
--- a/lib/reltool/doc/src/notes.xml
+++ b/lib/reltool/doc/src/notes.xml
@@ -37,7 +37,53 @@
thus constitutes one section in this document. The title of each
section is the version number of Reltool.</p>
- <section><title>Reltool 0.6.4.1</title>
+ <section><title>Reltool 0.6.5</title>
+
+ <section><title>Fixed Bugs and Malfunctions</title>
+ <list>
+ <item>
+ <p>
+ When adding a regexp to a filter in reltool using
+ {add,Regexp}, and the existing regexp was undefined,
+ reltool would crash since it got an improper list. This
+ has been corrected. (Thanks to Håkan Mattsson)</p>
+ <p>
+ Own Id: OTP-11591</p>
+ </item>
+ <item>
+ <p>
+ Adapted reltool test server to common test usage of
+ tc_status. (Note that this code is not used by OTP daily
+ test runs.) (Thanks to Håkan Mattsson)</p>
+ <p>
+ Own Id: OTP-11592</p>
+ </item>
+ <item>
+ <p>
+ Application upgrade (appup) files are corrected for the
+ following applications: </p>
+ <p>
+ <c>asn1, common_test, compiler, crypto, debugger,
+ dialyzer, edoc, eldap, erl_docgen, et, eunit, gs, hipe,
+ inets, observer, odbc, os_mon, otp_mibs, parsetools,
+ percept, public_key, reltool, runtime_tools, ssh,
+ syntax_tools, test_server, tools, typer, webtool, wx,
+ xmerl</c></p>
+ <p>
+ A new test utility for testing appup files is added to
+ test_server. This is now used by most applications in
+ OTP.</p>
+ <p>
+ (Thanks to Tobias Schlager)</p>
+ <p>
+ Own Id: OTP-11744</p>
+ </item>
+ </list>
+ </section>
+
+</section>
+
+<section><title>Reltool 0.6.4.1</title>
<section><title>Improvements and New Features</title>
<list>
diff --git a/lib/reltool/src/reltool.app.src b/lib/reltool/src/reltool.app.src
index 4188f341f1..65fcf4aae5 100644
--- a/lib/reltool/src/reltool.app.src
+++ b/lib/reltool/src/reltool.app.src
@@ -34,5 +34,7 @@
]},
{registered, []},
{applications, [stdlib, kernel]},
- {env, []}
+ {env, []},
+ {runtime_dependencies, ["wx-1.2","tools-2.6.14","stdlib-2.0","sasl-2.4",
+ "kernel-3.0","erts-6.0"]}
]}.
diff --git a/lib/reltool/src/reltool.appup.src b/lib/reltool/src/reltool.appup.src
index c02edd2afb..79ecdbd392 100644
--- a/lib/reltool/src/reltool.appup.src
+++ b/lib/reltool/src/reltool.appup.src
@@ -1,8 +1,7 @@
-%% This is an -*- erlang -*- file.
-%%
+%% -*- erlang -*-
%% %CopyrightBegin%
%%
-%% Copyright Ericsson AB 2010. All Rights Reserved.
+%% Copyright Ericsson AB 2010-2014. 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
@@ -16,7 +15,7 @@
%% under the License.
%%
%% %CopyrightEnd%
-
{"%VSN%",
- [ ]
+ [{<<".*">>,[{restart_application, reltool}]}],
+ [{<<".*">>,[{restart_application, reltool}]}]
}.
diff --git a/lib/reltool/src/reltool.hrl b/lib/reltool/src/reltool.hrl
index f0d8b38519..56161a152a 100644
--- a/lib/reltool/src/reltool.hrl
+++ b/lib/reltool/src/reltool.hrl
@@ -164,7 +164,8 @@
applications = [] :: [app_name()],
env = [] :: [{atom(), term()}],
mod = undefined :: {mod_name(), [term()]} | undefined,
- start_phases = undefined :: [{atom(), term()}] | undefined
+ start_phases = undefined :: [{atom(), term()}] | undefined,
+ runtime_dependencies = [] :: [string()]
}).
-record(regexp, {source, compiled}).
diff --git a/lib/reltool/src/reltool_server.erl b/lib/reltool/src/reltool_server.erl
index 97785ca7f8..98eeed5c27 100644
--- a/lib/reltool/src/reltool_server.erl
+++ b/lib/reltool/src/reltool_server.erl
@@ -1125,6 +1125,9 @@ parse_app_info(File, [{Key, Val} | KeyVals], AI, Status) ->
start_phases ->
parse_app_info(File, KeyVals, AI#app_info{start_phases = Val},
Status);
+ runtime_dependencies ->
+ parse_app_info(File, KeyVals, AI#app_info{runtime_dependencies = Val},
+ Status);
_ ->
Status2 =
reltool_utils:add_warning("Unexpected item ~p in app file ~tp.",
diff --git a/lib/reltool/src/reltool_utils.erl b/lib/reltool/src/reltool_utils.erl
index 9af8f6bae8..5a3f34506d 100644
--- a/lib/reltool/src/reltool_utils.erl
+++ b/lib/reltool/src/reltool_utils.erl
@@ -589,6 +589,8 @@ throw_error(Format, Args) ->
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
+decode_regexps(Key, Regexps, undefined) ->
+ decode_regexps(Key, Regexps, []);
decode_regexps(Key, {add, Regexps}, Old) when is_list(Regexps) ->
do_decode_regexps(Key, Regexps, Old);
decode_regexps(_Key, {del, Regexps}, Old) when is_list(Regexps) ->
diff --git a/lib/reltool/test/reltool_app_SUITE.erl b/lib/reltool/test/reltool_app_SUITE.erl
index a6e00cde08..9abc7fea41 100644
--- a/lib/reltool/test/reltool_app_SUITE.erl
+++ b/lib/reltool/test/reltool_app_SUITE.erl
@@ -26,6 +26,7 @@
-compile(export_all).
-include("reltool_test_lib.hrl").
+-include_lib("common_test/include/ct.hrl").
t() -> reltool_test_lib:t(?MODULE).
@@ -64,7 +65,7 @@ end_per_testcase(Func,Config) ->
suite() -> [{ct_hooks,[ts_install_cth]}].
all() ->
- [fields, modules, export_all, app_depend, undef_funcs].
+ [fields, modules, export_all, app_depend, undef_funcs, appup].
groups() ->
[].
@@ -290,3 +291,9 @@ key1search(Key, L) ->
{value, {Key, Value}} ->
Value
end.
+
+%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
+
+%% Test that the reltool appup file is ok
+appup(Config) when is_list(Config) ->
+ ok = ?t:appup_test(reltool).
diff --git a/lib/reltool/test/reltool_server_SUITE.erl b/lib/reltool/test/reltool_server_SUITE.erl
index feeac9e099..b3b7afd1a9 100644
--- a/lib/reltool/test/reltool_server_SUITE.erl
+++ b/lib/reltool/test/reltool_server_SUITE.erl
@@ -1,7 +1,7 @@
%%
%% %CopyrightBegin%
%%
-%% Copyright Ericsson AB 2009-2013. All Rights Reserved.
+%% Copyright Ericsson AB 2009-2014. 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
@@ -143,7 +143,8 @@ all() ->
mod_incl_cond_derived,
use_selected_vsn,
use_selected_vsn_relative_path,
- non_standard_vsn_id].
+ non_standard_vsn_id,
+ undefined_regexp].
groups() ->
[].
@@ -1204,14 +1205,9 @@ create_slim(Config) ->
RootDir = code:root_dir(),
Erl = filename:join([RootDir, "bin", "erl"]),
- EscapedQuote =
- case os:type() of
- {win32,_} -> "\\\"";
- _ -> "\""
- end,
Args = ["-boot_var", "RELTOOL_EXT_LIB", TargetLibDir,
"-boot", filename:join(TargetRelVsnDir,RelName),
- "-sasl", "releases_dir", EscapedQuote++TargetRelDir++EscapedQuote],
+ "-sasl", "releases_dir", "\""++TargetRelDir++"\""],
{ok, Node} = ?msym({ok, _}, start_node(?NODE_NAME, Erl, Args)),
?msym(RootDir, rpc:call(Node, code, root_dir, [])),
wait_for_app(Node,sasl,50),
@@ -2506,6 +2502,12 @@ non_standard_vsn_id(Config) ->
reltool_server:get_app(Pid2,b)),
ok.
+%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
+undefined_regexp(_Config) ->
+ ?msym({ok,_},
+ reltool:get_config([{sys,[{app,asn1,[{excl_app_filters,
+ {add, ["^priv"]}}]}]}])),
+ ok.
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
%% Library functions
diff --git a/lib/reltool/test/reltool_test_lib.erl b/lib/reltool/test/reltool_test_lib.erl
index 3485365ed9..fa12f19aa7 100644
--- a/lib/reltool/test/reltool_test_lib.erl
+++ b/lib/reltool/test/reltool_test_lib.erl
@@ -1,7 +1,7 @@
%%
%% %CopyrightBegin%
%%
-%% Copyright Ericsson AB 2009-2013. All Rights Reserved.
+%% Copyright Ericsson AB 2009-2014. All Rights Reserved.
%%
%% The contents of this file are subject to the Erlang Public License,
%% Version 1.1, (the "License"); you may not use this file except in
@@ -20,12 +20,13 @@
-compile(export_all).
-include("reltool_test_lib.hrl").
+-define(timeout, 20). % minutes
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
init_per_suite(Config) when is_list(Config)->
global:register_name(reltool_global_logger, group_leader()),
- incr_timetrap(Config, 10).
+ incr_timetrap(Config, ?timeout).
end_per_suite(Config) when is_list(Config)->
global:unregister_name(reltool_global_logger),
@@ -51,7 +52,7 @@ set_kill_timer(Config) ->
Time =
case lookup_config(tc_timeout, Config) of
[] ->
- timer:minutes(10);
+ timer:minutes(?timeout);
ConfigTime when is_integer(ConfigTime) ->
ConfigTime
end,
@@ -258,8 +259,8 @@ run_test([{Module, TC} | Rest], Config) ->
true ->
[do_run_test(Module, TC, NewConfig)]
end,
- Module:end_per_suite(NewConfig),
- Res ++ run_test(Rest, NewConfig);
+ CommonTestRes = worst_res(Res),
+ Res ++ run_test(Rest, [{tc_status,CommonTestRes}|NewConfig]);
Error ->
?error("Test suite skipped: ~w~n", [Error]),
[{skipped, Error}]
@@ -267,6 +268,36 @@ run_test([{Module, TC} | Rest], Config) ->
run_test([], _Config) ->
[].
+worst_res(Res) ->
+ NewRes = [{dummy, {ok,dummy, dummy}} | Res],
+ [{_,WorstRes}|_] = lists:sort(fun compare_res/2, NewRes),
+ common_test_res(WorstRes).
+
+common_test_res(ok) ->
+ ok;
+common_test_res({Res,_,Reason}) ->
+ common_test_res({Res,Reason});
+common_test_res({Res,Reason}) ->
+ case Res of
+ ok -> ok;
+ skip -> {skipped, Reason};
+ skipped -> {skipped, Reason};
+ failed -> {failed, Reason};
+ crash -> {failed, Reason}
+ end.
+
+% crash < failed < skip < ok
+compare_res({_,{ResA,_,_}},{_,{ResB,_,_}}) ->
+ res_to_int(ResA) < res_to_int(ResB).
+
+res_to_int(Res) ->
+ case Res of
+ ok -> 4;
+ skip -> 3;
+ failed -> 2;
+ crash -> 1
+ end.
+
do_run_test(Module, all, Config) ->
All = [{Module, Test} || Test <- Module:all()],
run_test(All, Config);
@@ -290,9 +321,10 @@ eval_test_case(Mod, Fun, Config) ->
test_case_evaluator(Mod, Fun, [Config]) ->
NewConfig = Mod:init_per_testcase(Fun, Config),
- R = apply(Mod, Fun, [NewConfig]),
- Mod:end_per_testcase(Fun, NewConfig),
- exit({test_case_ok, R}).
+ Res = apply(Mod, Fun, [NewConfig]),
+ CommonTestRes = common_test_res(Res),
+ Mod:end_per_testcase(Fun, [{tc_status,CommonTestRes}|NewConfig]),
+ exit({test_case_ok, Res}).
wait_for_evaluator(Pid, Mod, Fun, Config) ->
receive
@@ -307,13 +339,17 @@ wait_for_evaluator(Pid, Mod, Fun, Config) ->
{'EXIT', Pid, {skipped, Reason}} ->
log("<WARNING> Test case ~w skipped, because ~p~n",
[{Mod, Fun}, Reason]),
- Mod:end_per_testcase(Fun, Config),
- {skip, {Mod, Fun}, Reason};
+ Res = {skipped, {Mod, Fun}, Reason},
+ CommonTestRes = common_test_res(Res),
+ Mod:end_per_testcase(Fun, [{tc_status,CommonTestRes}|Config]),
+ Res;
{'EXIT', Pid, Reason} ->
log("<ERROR> Eval process ~w exited, because\n\t~p~n",
[{Mod, Fun}, Reason]),
- Mod:end_per_testcase(Fun, Config),
- {crash, {Mod, Fun}, Reason}
+ Res = {crash, {Mod, Fun}, Reason},
+ CommonTestRes = common_test_res(Res),
+ Mod:end_per_testcase(Fun, [{tc_status,CommonTestRes}|Config]),
+ Res
end.
flush() ->
diff --git a/lib/reltool/vsn.mk b/lib/reltool/vsn.mk
index 16ec570d22..163b77dfa0 100644
--- a/lib/reltool/vsn.mk
+++ b/lib/reltool/vsn.mk
@@ -1 +1 @@
-RELTOOL_VSN = 0.6.4.1
+RELTOOL_VSN = 0.6.5
diff --git a/lib/runtime_tools/c_src/Makefile.in b/lib/runtime_tools/c_src/Makefile.in
index d315a90e18..d46b4997f7 100644
--- a/lib/runtime_tools/c_src/Makefile.in
+++ b/lib/runtime_tools/c_src/Makefile.in
@@ -21,11 +21,6 @@ include $(ERL_TOP)/make/$(TARGET)/otp.mk
include $(ERL_TOP)/make/$(TARGET)/otp_ded.mk
# ----------------------------------------------------
-# Items from top-level configure
-# ----------------------------------------------------
-DTRACE_ENABLED=@DTRACE_ENABLED@
-DTRACE_ENABLED_2STEP=@DTRACE_ENABLED_2STEP@
-# ----------------------------------------------------
# Application version
# ----------------------------------------------------
include ../vsn.mk
@@ -106,30 +101,14 @@ endif
_create_dirs := $(shell mkdir -p $(OBJDIR) $(LIBDIR))
+ifneq ($(findstring ose,$(TARGET)),ose)
debug opt valgrind: $(SOLIBS) $(OBJDIR) $(LIBDIR) $(NIF_LIB)
-
-ifdef DTRACE_ENABLED
-DTRACE_USER_HEADER=$(OBJDIR)/dtrace_user.h
-$(OBJDIR)/dtrace_user.h: ./dtrace_user.d
- $(dtrace_verbose)dtrace -h -C $(INCLUDES) \
- -s ./dtrace_user.d \
- -o ./dtrace_user.tmp
- $(V_at)sed -e '/^#define[ ]*ERLANG_[A-Z0-9_]*(.*)/y/ABCDEFGHIJKLMNOPQRSTUVWXYZ/abcdefghijklmnopqrstuvwxyz/' ./dtrace_user.tmp > $@
- $(V_at)rm ./dtrace_user.tmp
else
-DTRACE_USER_HEADER=
+# We do not build this on OSE
+debug opt valgrind:
endif
-DTRACE_OBJS =
-ifdef DTRACE_ENABLED_2STEP
-DTRACE_OBJS += $(OBJDIR)/dtrace_user.o
-$(OBJDIR)/dtrace_user.o: $(before_DTrace_OBJS) $(OBJDIR)/dtrace_user.h
- $(dtrace_verbose)dtrace -G -C \
- -s ./dtrace_user.d \
- -o $@ $(before_DTrace_OBJS)
-endif
-
-DYNTRACE_OBJS = $(before_DTrace_OBJS) $(DTRACE_OBJS)
+DYNTRACE_OBJS = $(before_DTrace_OBJS)
$(OBJDIR):
-@mkdir -p $(OBJDIR)
@@ -137,7 +116,7 @@ $(OBJDIR):
$(LIBDIR):
-@mkdir -p $(LIBDIR)
-$(OBJDIR)/dyntrace$(TYPEMARKER).o: dyntrace.c $(DTRACE_USER_HEADER)
+$(OBJDIR)/dyntrace$(TYPEMARKER).o: dyntrace.c
$(V_at)$(INSTALL_DIR) $(OBJDIR)
$(V_CC) -c -o $@ $(ALL_CFLAGS) $<
@@ -179,8 +158,10 @@ include $(ERL_TOP)/make/otp_release_targets.mk
release_spec: opt
$(INSTALL_DIR) "$(RELSYSDIR)/priv/obj"
$(INSTALL_DIR) "$(RELSYSDIR)/priv/lib"
+ifneq ($(findstring ose,$(TARGET)),ose)
$(INSTALL_PROGRAM) $(DYNTRACE_OBJS) "$(RELSYSDIR)/priv/obj"
$(INSTALL_PROGRAM) $(NIF_LIB) $(SOLIBS) "$(RELSYSDIR)/priv/lib"
+endif
release_docs_spec:
diff --git a/lib/runtime_tools/c_src/dyntrace.c b/lib/runtime_tools/c_src/dyntrace.c
index eef03afd1c..18f91cd7e7 100644
--- a/lib/runtime_tools/c_src/dyntrace.c
+++ b/lib/runtime_tools/c_src/dyntrace.c
@@ -30,9 +30,6 @@
#if defined(USE_DYNAMIC_TRACE) && (defined(USE_DTRACE) || defined(USE_SYSTEMTAP))
#define HAVE_USE_DTRACE 1
#endif
-#ifdef HAVE_USE_DTRACE
-#include "dtrace_user.h"
-#endif
void dtrace_nifenv_str(ErlNifEnv *env, char *process_buf);
void get_string_maybe(ErlNifEnv *env, const ERL_NIF_TERM term, char **ptr, char *buf, int bufsiz);
diff --git a/lib/runtime_tools/doc/specs/.gitignore b/lib/runtime_tools/doc/specs/.gitignore
new file mode 100644
index 0000000000..322eebcb06
--- /dev/null
+++ b/lib/runtime_tools/doc/specs/.gitignore
@@ -0,0 +1 @@
+specs_*.xml
diff --git a/lib/runtime_tools/doc/src/Makefile b/lib/runtime_tools/doc/src/Makefile
index 51d93df418..07c63197e9 100644
--- a/lib/runtime_tools/doc/src/Makefile
+++ b/lib/runtime_tools/doc/src/Makefile
@@ -40,7 +40,7 @@ RELSYSDIR = $(RELEASE_PATH)/lib/$(APPLICATION)-$(VSN)
# Target Specs
# ----------------------------------------------------
XML_APPLICATION_FILES = ref_man.xml
-XML_REF3_FILES = dbg.xml dyntrace.xml erts_alloc_config.xml
+XML_REF3_FILES = dbg.xml dyntrace.xml erts_alloc_config.xml system_information.xml
XML_REF6_FILES = runtime_tools_app.xml
XML_PART_FILES = part_notes.xml part_notes_history.xml part.xml
@@ -71,12 +71,20 @@ HTML_REF_MAN_FILE = $(HTMLDIR)/index.html
TOP_PDF_FILE = $(PDFDIR)/$(APPLICATION)-$(VSN).pdf
+SPECS_FILES = $(XML_REF3_FILES:%.xml=$(SPECDIR)/specs_%.xml)
+
+TOP_SPECS_FILE = specs.xml
+
# ----------------------------------------------------
# FLAGS
# ----------------------------------------------------
XML_FLAGS +=
DVIPS_FLAGS +=
+SPECS_ESRC = ../../src
+
+SPECS_FLAGS = -I../../include -I../../../kernel/src
+
# ----------------------------------------------------
# Targets
# ----------------------------------------------------
diff --git a/lib/runtime_tools/doc/src/dbg.xml b/lib/runtime_tools/doc/src/dbg.xml
index bf1a7621fd..d31ccd834d 100644
--- a/lib/runtime_tools/doc/src/dbg.xml
+++ b/lib/runtime_tools/doc/src/dbg.xml
@@ -1024,7 +1024,7 @@ hello</pre>
</desc>
</func>
<func>
- <name>stop() -> stopped</name>
+ <name>stop() -> ok</name>
<fsummary>Stop the <c>dbg</c>server and the tracing of all processes.</fsummary>
<desc>
<p>Stops the <c>dbg</c> server and clears all trace flags for
@@ -1035,7 +1035,7 @@ hello</pre>
</desc>
</func>
<func>
- <name>stop_clear() -> stopped</name>
+ <name>stop_clear() -> ok</name>
<fsummary>Stop the <c>dbg</c>server and the tracing of all processes, and clears trace patterns.</fsummary>
<desc>
<p>Same as stop/0, but also clears all trace patterns on local
diff --git a/lib/runtime_tools/doc/src/notes.xml b/lib/runtime_tools/doc/src/notes.xml
index 32b7d168f5..9b026aee11 100644
--- a/lib/runtime_tools/doc/src/notes.xml
+++ b/lib/runtime_tools/doc/src/notes.xml
@@ -31,6 +31,95 @@
<p>This document describes the changes made to the Runtime_Tools
application.</p>
+<section><title>Runtime_Tools 1.8.14</title>
+
+ <section><title>Fixed Bugs and Malfunctions</title>
+ <list>
+ <item>
+ <p>
+ The documentation for the return value of
+ dbg:{stop,stop_clear} functions are now correct (Thanks
+ to Luca Favatella)</p>
+ <p>
+ Own Id: OTP-11603</p>
+ </item>
+ <item>
+ <p>
+ Fix DTrace build on Illumos. (Thanks to Ryan Zezeski.)</p>
+ <p>
+ Own Id: OTP-11622</p>
+ </item>
+ <item>
+ <p>
+ Do not turn off scheduler_wall_time, as it can interfere
+ with other applications usage.</p>
+ <p>
+ Own Id: OTP-11693 Aux Id: seq12528 </p>
+ </item>
+ <item>
+ <p>
+ Application upgrade (appup) files are corrected for the
+ following applications: </p>
+ <p>
+ <c>asn1, common_test, compiler, crypto, debugger,
+ dialyzer, edoc, eldap, erl_docgen, et, eunit, gs, hipe,
+ inets, observer, odbc, os_mon, otp_mibs, parsetools,
+ percept, public_key, reltool, runtime_tools, ssh,
+ syntax_tools, test_server, tools, typer, webtool, wx,
+ xmerl</c></p>
+ <p>
+ A new test utility for testing appup files is added to
+ test_server. This is now used by most applications in
+ OTP.</p>
+ <p>
+ (Thanks to Tobias Schlager)</p>
+ <p>
+ Own Id: OTP-11744</p>
+ </item>
+ </list>
+ </section>
+
+
+ <section><title>Improvements and New Features</title>
+ <list>
+ <item>
+ <p>
+ Allow install path to have unicode characters.</p>
+ <p>
+ Own Id: OTP-10877</p>
+ </item>
+ <item>
+ <p>
+ The <c>erts_alloc_config</c> tool has been updated to
+ produce configurations that better fit todays SMP support
+ in the VM.</p>
+ <p>
+ Own Id: OTP-11662</p>
+ </item>
+ <item>
+ <p>
+ The <seealso
+ marker="kernel:app"><c>app</c></seealso>-file key
+ <seealso
+ marker="kernel:app#runtime_dependencies"><c>runtime_dependencies</c></seealso>
+ has been introduced.</p>
+ <p>
+ Runtime dependencies have been added to all app-files in
+ OTP. Note that these may not be completely correct during
+ OTP 17, but this is actively being worked on.</p>
+ <p>
+ The function <seealso
+ marker="runtime_tools:system_information#sanity_check/0"><c>system_information:sanity_check/0</c></seealso>
+ will verify all declared runtime dependencies in the
+ system when called.</p>
+ <p>
+ Own Id: OTP-11773</p>
+ </item>
+ </list>
+ </section>
+
+</section>
+
<section><title>Runtime_Tools 1.8.13</title>
<section><title>Fixed Bugs and Malfunctions</title>
diff --git a/lib/runtime_tools/doc/src/ref_man.xml b/lib/runtime_tools/doc/src/ref_man.xml
index 6017f3cdaa..25fa97896b 100644
--- a/lib/runtime_tools/doc/src/ref_man.xml
+++ b/lib/runtime_tools/doc/src/ref_man.xml
@@ -35,5 +35,6 @@
<xi:include href="dbg.xml"/>
<xi:include href="dyntrace.xml"/>
<xi:include href="erts_alloc_config.xml"/>
+ <xi:include href="system_information.xml"/>
</application>
diff --git a/lib/runtime_tools/doc/src/specs.xml b/lib/runtime_tools/doc/src/specs.xml
new file mode 100644
index 0000000000..d4c3c9dfe6
--- /dev/null
+++ b/lib/runtime_tools/doc/src/specs.xml
@@ -0,0 +1,4 @@
+<?xml version="1.0" encoding="utf-8" ?>
+<specs xmlns:xi="http://www.w3.org/2001/XInclude">
+ <xi:include href="../specs/specs_system_information.xml"/>
+</specs>
diff --git a/lib/runtime_tools/doc/src/system_information.xml b/lib/runtime_tools/doc/src/system_information.xml
new file mode 100644
index 0000000000..b586334ae7
--- /dev/null
+++ b/lib/runtime_tools/doc/src/system_information.xml
@@ -0,0 +1,98 @@
+<?xml version="1.0" encoding="utf-8" ?>
+<!DOCTYPE erlref SYSTEM "erlref.dtd">
+
+<erlref>
+ <header>
+ <copyright>
+ <year>2014</year>
+ <holder>Ericsson AB. All Rights Reserved.</holder>
+ </copyright>
+ <legalnotice>
+ 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.
+
+ </legalnotice>
+
+ <title></title>
+ <prepared></prepared>
+ <responsible></responsible>
+ <docno>1</docno>
+ <approved></approved>
+ <checked></checked>
+ <date></date>
+ <rev></rev>
+ <file>system_information.xml</file>
+ </header>
+ <module>system_information</module>
+ <modulesummary>System Information</modulesummary>
+ <description>
+ <p></p>
+ </description>
+ <funcs>
+ <func>
+ <name name="sanity_check" arity="0"/>
+ <fsummary>Perform a sanity check</fsummary>
+ <desc>
+ <p>Performs a sanity check on the system. If no issues
+ were found, <c>ok</c> is returned. If issues were
+ found, <c>{failed, <anno>Failures</anno>}</c> is
+ returned. All failures found will be part of the
+ <c><anno>Failures</anno></c> list. Currently defined
+ <c><anno>Failure</anno></c> elements in the
+ <c><anno>Failures</anno></c> list:</p>
+ <taglist>
+ <tag><c><anno>InvalidAppFile</anno></c></tag>
+ <item><p>An application has an invalid <c>.app</c> file. The
+ second element identifies the application which has the
+ invalid <c>.app</c> file.</p></item>
+ <tag><c><anno>InvalidApplicationVersion</anno></c></tag>
+ <item><p>An application has an invalid application version.
+ The second element identifies the application version that
+ is invalid.</p></item>
+ <tag><c><anno>MissingRuntimeDependencies</anno></c></tag>
+ <item><p>An application is missing
+ <seealso marker="kernel:app#runtime_dependencies">runtime
+ dependencies</seealso>. The second element identifies the
+ application (with version) that has missing dependencies.
+ The third element contains the missing dependencies.</p>
+ <p>Note that this check use application versions that
+ are loaded, or will be loaded when used. You might have
+ application versions that satisfies all dependencies
+ installed in the system, but if those are not loaded this
+ check will fail. The system will of course also fail when
+ used like this. This may happen when you have multiple
+ <seealso marker="doc/system_principles:versions">branched
+ versions</seealso> of the same application installed in the
+ system, but you do not use a
+ <seealso marker="doc/system_principles:system_principles#BOOTSCRIPT">boot
+ script</seealso> identifing the correct application version.</p>
+ </item>
+ </taglist>
+ <p>Currently the sanity check is limited to verifying
+ runtime dependencies found in the <c>.app</c> files of
+ all applications. More checks will be introduced in the
+ future. This implies that the return type <em>will</em>
+ change in the future.</p>
+ <note><p>An <c>ok</c> return value only means that
+ <c>sanity_check/0</c> did not find any issues, <em>not</em>
+ that no issues exist.</p></note>
+ </desc>
+ </func>
+ <func>
+ <name name="to_file" arity="1"/>
+ <fsummary>Write miscellaneous system information to file</fsummary>
+ <desc><p>Writes miscellaneous system information to file. This
+ information will typically be requested by the Erlang/OTP team
+ at Ericsson AB when reporting an issue.</p></desc>
+ </func>
+ </funcs>
+ </erlref>
+
diff --git a/lib/runtime_tools/src/dbg.erl b/lib/runtime_tools/src/dbg.erl
index f0086e8cc7..186563ab74 100644
--- a/lib/runtime_tools/src/dbg.erl
+++ b/lib/runtime_tools/src/dbg.erl
@@ -1786,12 +1786,12 @@ h(get_tracer) ->
" - Returns the process or port to which all trace messages are sent."]);
h(stop) ->
help_display(
- ["stop() -> stopped",
+ ["stop() -> ok",
" - Stops the dbg server and the tracing of all processes.",
" Does not clear any trace patterns."]);
h(stop_clear) ->
help_display(
- ["stop_clear() -> stopped",
+ ["stop_clear() -> ok",
" - Stops the dbg server and the tracing of all processes,",
" and clears all trace patterns."]).
diff --git a/lib/runtime_tools/src/erts_alloc_config.erl b/lib/runtime_tools/src/erts_alloc_config.erl
index 284e88d4a7..b9a26dc0dc 100644
--- a/lib/runtime_tools/src/erts_alloc_config.erl
+++ b/lib/runtime_tools/src/erts_alloc_config.erl
@@ -39,6 +39,8 @@
need_config_change,
alloc_util,
instances,
+ strategy,
+ acul,
low_mbc_blocks_size,
high_mbc_blocks_size,
sbct,
@@ -54,8 +56,6 @@
-define(SERVER, '__erts_alloc_config__').
--define(MAX_ALLOCATOR_INSTANCES, 16).
-
-define(KB, 1024).
-define(MB, 1048576).
@@ -99,23 +99,11 @@
{ets_alloc, 131072},
{fix_alloc, 131072},
{eheap_alloc, 524288},
- {ll_alloc, 2097152},
+ {ll_alloc, 131072},
{sl_alloc, 131072},
{temp_alloc, 131072},
{driver_alloc, 131072}]).
--define(MMMBC_DEFAULTS,
- [{binary_alloc, 10},
- {std_alloc, 10},
- {ets_alloc, 10},
- {fix_alloc, 10},
- {eheap_alloc, 10},
- {ll_alloc, 0},
- {sl_alloc, 10},
- {temp_alloc, 10},
- {driver_alloc, 10}]).
-
-
%%%
%%% Exported interface
%%%
@@ -230,20 +218,72 @@ server_loop(State) ->
end,
server_loop(NewState).
-allocator_instances(temp_alloc) ->
- erlang:system_info(schedulers) + 1;
-allocator_instances(ll_alloc) ->
+carrier_migration_support(aoff) ->
+ true;
+carrier_migration_support(aoffcbf) ->
+ true;
+carrier_migration_support(aoffcaobf) ->
+ true;
+carrier_migration_support(_) ->
+ false.
+
+allocator_instances(ll_alloc, Strategy) ->
+ case carrier_migration_support(Strategy) of
+ true -> erlang:system_info(schedulers);
+ false -> 1
+ end;
+allocator_instances(_A, undefined) ->
1;
-allocator_instances(_Allocator) ->
- case erlang:system_info(schedulers) of
- Schdlrs when Schdlrs =< ?MAX_ALLOCATOR_INSTANCES -> Schdlrs;
- _Schdlrs -> ?MAX_ALLOCATOR_INSTANCES
+allocator_instances(_A, _Strategy) ->
+ erlang:system_info(schedulers).
+
+strategy(temp_alloc, _AI) ->
+ af;
+strategy(A, AI) ->
+ try
+ {A, OptList} = lists:keyfind(A, 1, AI),
+ {as, S} = lists:keyfind(as, 1, OptList),
+ S
+ catch
+ _ : _ ->
+ undefined
+ end.
+
+strategy_str(af) ->
+ "A fit";
+strategy_str(gf) ->
+ "Good fit";
+strategy_str(bf) ->
+ "Best fit";
+strategy_str(aobf) ->
+ "Address order best fit";
+strategy_str(aoff) ->
+ "Address order first fit";
+strategy_str(aoffcbf) ->
+ "Address order first fit carrier best fit";
+strategy_str(aoffcaobf) ->
+ "Address order first fit carrier adress order best fit".
+
+default_acul(A, S) ->
+ case carrier_migration_support(S) of
+ false ->
+ 0;
+ true ->
+ case A of
+ ll_alloc -> 85;
+ eheap_alloc -> 45;
+ _ -> 60
+ end
end.
-
+
make_state() ->
+ {_, _, _, AI} = erlang:system_info(allocator),
#state{alloc = lists:map(fun (A) ->
+ S = strategy(A, AI),
#alloc{name = A,
- instances = allocator_instances(A)}
+ strategy = S,
+ acul = default_acul(A, S),
+ instances = allocator_instances(A, S)}
end,
?ALLOCATORS)}.
@@ -345,7 +385,7 @@ do_save_scenario(AlcList) ->
conf_size(Bytes) when is_integer(Bytes), Bytes < 0 ->
exit({bad_value, Bytes});
conf_size(Bytes) when is_integer(Bytes), Bytes < 1*?MB ->
- ?ROUNDUP(?B2KB(Bytes), 128);
+ ?ROUNDUP(?B2KB(Bytes), 256);
conf_size(Bytes) when is_integer(Bytes), Bytes < 10*?MB ->
?ROUNDUP(?B2KB(Bytes), ?B2KB(1*?MB));
conf_size(Bytes) when is_integer(Bytes), Bytes < 100*?MB ->
@@ -376,28 +416,25 @@ mmbcs(#conf{format_to = FTO},
temp_alloc -> BlocksSize;
_ -> BlocksSize div Insts
end,
- case BS > default_mmbcs(A, Insts) of
- true ->
+ DefMMBCS = default_mmbcs(A, Insts),
+ case {Insts, BS > DefMMBCS} of
+ {1, true} ->
MMBCS = conf_size(BS),
fc(FTO, "Main mbc size of ~p kilobytes.", [MMBCS]),
format(FTO, " +M~cmmbcs ~p~n", [alloc_char(A), MMBCS]);
- false ->
+ _ ->
+ MMBCS = ?B2KB(DefMMBCS),
+ fc(FTO, "Main mbc size of ~p kilobytes.", [MMBCS]),
+ format(FTO, " +M~cmmbcs ~p~n", [alloc_char(A), MMBCS]),
ok
end.
-smbcs_lmbcs_mmmbc(#conf{format_to = FTO},
- #alloc{name = A, instances = Insts, segments = Segments}) ->
- MMMBC = case {A, Insts} of
- {_, 1} -> Segments#segment.number;
- {temp_alloc, _} -> Segments#segment.number;
- _ -> (Segments#segment.number div Insts) + 1
- end,
+smbcs_lmbcs(#conf{format_to = FTO},
+ #alloc{name = A, segments = Segments}) ->
MBCS = Segments#segment.size,
AC = alloc_char(A),
fc(FTO, "Mseg mbc size of ~p kilobytes.", [MBCS]),
format(FTO, " +M~csmbcs ~p +M~clmbcs ~p~n", [AC, MBCS, AC, MBCS]),
- fc(FTO, "Max ~p mseg mbcs.", [MMMBC]),
- format(FTO, " +M~cmmmbc ~p~n", [AC, MMMBC]),
ok.
alloc_char(binary_alloc) -> $B;
@@ -462,6 +499,8 @@ au_conf_alloc(#conf{format_to = FTO} = Conf,
#alloc{name = A,
alloc_util = true,
instances = Insts,
+ acul = Acul,
+ strategy = Strategy,
low_mbc_blocks_size = Low,
high_mbc_blocks_size = High} = Alc) ->
fcp(FTO, "Usage of mbcs: ~p - ~p kilobytes", [?B2KB(Low), ?B2KB(High)]),
@@ -470,31 +509,49 @@ au_conf_alloc(#conf{format_to = FTO} = Conf,
fc(FTO, "One instance used."),
format(FTO, " +M~ct false~n", [alloc_char(A)]);
_ ->
- fc(FTO, "~p instances used.",
+ fc(FTO, "~p + 1 instances used.",
[Insts]),
- format(FTO, " +M~ct true~n", [alloc_char(A)])
- end,
+ format(FTO, " +M~ct true~n", [alloc_char(A)]),
+ case Strategy of
+ undefined ->
+ ok;
+ _ ->
+ fc(FTO, "Allocation strategy: ~s.",
+ [strategy_str(Strategy)]),
+ format(FTO, " +M~cas ~s~n", [alloc_char(A),
+ atom_to_list(Strategy)])
+ end,
+ case carrier_migration_support(Strategy) of
+ false ->
+ ok;
+ true ->
+ fc(FTO, "Abandon carrier utilization limit of ~p%.", [Acul]),
+ format(FTO, " +M~cacul ~p~n", [alloc_char(A), Acul])
+ end
+ end,
mmbcs(Conf, Alc),
- smbcs_lmbcs_mmmbc(Conf, Alc),
+ smbcs_lmbcs(Conf, Alc),
sbct(Conf, Alc).
-large_growth(Low, High) ->
- High - Low >= ?LARGE_GROWTH_ABS_LIMIT.
-
calc_seg_size(Growth, Segs) ->
conf_size(round(Growth*?FRAG_FACT*?GROWTH_SEG_FACT) div Segs).
calc_growth_segments(Conf, AlcList0) ->
- CalcSmall = fun (#alloc{name = ll_alloc} = Alc, Acc) ->
- {Alc#alloc{segments = #segment{size = 0,
+ CalcSmall = fun (#alloc{name = ll_alloc, instances = 1} = Alc, Acc) ->
+ {Alc#alloc{segments = #segment{size = conf_size(0),
number = 0}},
Acc};
(#alloc{alloc_util = true,
- low_mbc_blocks_size = Low,
+ instances = Insts,
+ low_mbc_blocks_size = LowMBC,
high_mbc_blocks_size = High} = Alc,
{SL, AL}) ->
+ Low = case Insts of
+ 1 -> LowMBC;
+ _ -> 0
+ end,
Growth = High - Low,
- case large_growth(Low, High) of
+ case Growth >= ?LARGE_GROWTH_ABS_LIMIT of
true ->
{Alc, {SL, AL+1}};
false ->
@@ -522,8 +579,13 @@ calc_growth_segments(Conf, AlcList0) ->
end,
CalcLarge = fun (#alloc{alloc_util = true,
segments = undefined,
- low_mbc_blocks_size = Low,
+ instances = Insts,
+ low_mbc_blocks_size = LowMBC,
high_mbc_blocks_size = High} = Alc) ->
+ Low = case Insts of
+ 1 -> LowMBC;
+ _ -> 0
+ end,
Growth = High - Low,
SegSize = calc_seg_size(Growth,
SegsPerAlloc),
@@ -560,15 +622,10 @@ format_header(FTO) ->
case erlang:system_info(schedulers) of
1 -> ok;
Schdlrs ->
- MinSchdlrs = case Schdlrs > ?MAX_ALLOCATOR_INSTANCES of
- true -> ?MAX_ALLOCATOR_INSTANCES;
- false -> Schdlrs
- end,
fcp(FTO,
"NOTE: This configuration was made for ~p schedulers. "
- "It is very important that at least ~p schedulers "
- "are used.",
- [Schdlrs, MinSchdlrs])
+ "It is very important that ~p schedulers are used.",
+ [Schdlrs, Schdlrs])
end,
fcp(FTO,
"This configuration is intended as a suggestion and "
diff --git a/lib/runtime_tools/src/observer_backend.erl b/lib/runtime_tools/src/observer_backend.erl
index 202129c61a..fea0854042 100644
--- a/lib/runtime_tools/src/observer_backend.erl
+++ b/lib/runtime_tools/src/observer_backend.erl
@@ -1,7 +1,7 @@
%%
%% %CopyrightBegin%
%%
-%% Copyright Ericsson AB 2002-2013. All Rights Reserved.
+%% Copyright Ericsson AB 2002-2014. 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
@@ -53,6 +53,13 @@ sys_info() ->
Mem -> Mem
catch _:_ -> []
end,
+
+ SchedulersOnline = erlang:system_info(schedulers_online),
+ SchedulersAvailable = case erlang:system_info(multi_scheduling) of
+ enabled -> SchedulersOnline;
+ _ -> 1
+ end,
+
{{_,Input},{_,Output}} = erlang:statistics(io),
[{process_count, erlang:system_info(process_count)},
{process_limit, erlang:system_info(process_limit)},
@@ -60,9 +67,13 @@ sys_info() ->
{run_queue, erlang:statistics(run_queue)},
{io_input, Input},
{io_output, Output},
+
{logical_processors, erlang:system_info(logical_processors)},
- {logical_processors_available, erlang:system_info(logical_processors_available)},
{logical_processors_online, erlang:system_info(logical_processors_online)},
+ {logical_processors_available, erlang:system_info(logical_processors_available)},
+ {schedulers, erlang:system_info(schedulers)},
+ {schedulers_online, SchedulersOnline},
+ {schedulers_available, SchedulersAvailable},
{otp_release, erlang:system_info(otp_release)},
{version, erlang:system_info(version)},
@@ -216,12 +227,14 @@ fetch_stats(Parent, Time) ->
fetch_stats_loop(Parent, Time) ->
erlang:system_flag(scheduler_wall_time, true),
receive
- _Msg -> erlang:system_flag(scheduler_wall_time, false)
+ _Msg ->
+ %% erlang:system_flag(scheduler_wall_time, false)
+ ok
after Time ->
_M = Parent ! {stats, 1,
erlang:statistics(scheduler_wall_time),
erlang:statistics(io),
- erlang:memory()},
+ try erlang:memory() catch _:_ -> [] end},
fetch_stats_loop(Parent, Time)
end.
%%
@@ -233,17 +246,6 @@ etop_collect(Collector) ->
%% utilization in etop). Next time the flag will be true and then
%% there will be a measurement.
SchedulerWallTime = erlang:statistics(scheduler_wall_time),
-
- %% Turn off the flag while collecting data per process etc.
- case erlang:system_flag(scheduler_wall_time,false) of
- false ->
- %% First time and the flag was false - start a monitoring
- %% process to set the flag back to false when etop is stopped.
- spawn(fun() -> flag_holder_proc(Collector) end);
- _ ->
- ok
- end,
-
ProcInfo = etop_collect(processes(), []),
Collector ! {self(),#etop_info{now = now(),
@@ -253,13 +255,22 @@ etop_collect(Collector) ->
memi = etop_memi(),
procinfo = ProcInfo
}},
+
+ case SchedulerWallTime of
+ undefined ->
+ spawn(fun() -> flag_holder_proc(Collector) end);
+ _ ->
+ ok
+ end,
+
erlang:system_flag(scheduler_wall_time,true).
flag_holder_proc(Collector) ->
Ref = erlang:monitor(process,Collector),
receive
{'DOWN',Ref,_,_,_} ->
- erlang:system_flag(scheduler_wall_time,false)
+ %% erlang:system_flag(scheduler_wall_time,false)
+ ok
end.
etop_memi() ->
diff --git a/lib/runtime_tools/src/runtime_tools.app.src b/lib/runtime_tools/src/runtime_tools.app.src
index d46cfe1f32..0a70802c08 100644
--- a/lib/runtime_tools/src/runtime_tools.app.src
+++ b/lib/runtime_tools/src/runtime_tools.app.src
@@ -25,6 +25,8 @@
{registered, [runtime_tools_sup]},
{applications, [kernel, stdlib]},
{env, []},
- {mod, {runtime_tools, []}}]}.
+ {mod, {runtime_tools, []}},
+ {runtime_dependencies, ["stdlib-2.0","mnesia-4.12","kernel-3.0",
+ "erts-6.0"]}]}.
diff --git a/lib/runtime_tools/src/runtime_tools.appup.src b/lib/runtime_tools/src/runtime_tools.appup.src
index 7a435e9b22..0c2bab316f 100644
--- a/lib/runtime_tools/src/runtime_tools.appup.src
+++ b/lib/runtime_tools/src/runtime_tools.appup.src
@@ -1,7 +1,7 @@
-%%
+%% -*- erlang -*-
%% %CopyrightBegin%
%%
-%% Copyright Ericsson AB 2001-2009. All Rights Reserved.
+%% Copyright Ericsson AB 2001-2014. 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
@@ -15,5 +15,7 @@
%% under the License.
%%
%% %CopyrightEnd%
-%%
-{"%VSN%",[],[]}.
+{"%VSN%",
+ [{<<".*">>,[{restart_application, runtime_tools}]}],
+ [{<<".*">>,[{restart_application, runtime_tools}]}]
+}.
diff --git a/lib/runtime_tools/src/system_information.erl b/lib/runtime_tools/src/system_information.erl
index 1d4b878d79..f541d6e449 100644
--- a/lib/runtime_tools/src/system_information.erl
+++ b/lib/runtime_tools/src/system_information.erl
@@ -39,7 +39,8 @@
application/1, application/2,
environment/0, environment/1,
module/1, module/2,
- modules/1
+ modules/1,
+ sanity_check/0
]).
%% gen_server callbacks
@@ -85,9 +86,14 @@ report() -> [
{erts_compile_info, erlang:system_info(compile_info)},
{beam_dynamic_libraries, get_dynamic_libraries()},
{environment_erts, os_getenv_erts_specific()},
- {environment, [split_env(Env) || Env <- os:getenv()]}
+ {environment, [split_env(Env) || Env <- os:getenv()]},
+ {sanity_check, sanity_check()}
].
+-spec to_file(FileName) -> ok | {error, Reason} when
+ FileName :: file:name_all(),
+ Reason :: file:posix() | badarg | terminated | system_limit.
+
to_file(File) ->
file:write_file(File, iolist_to_binary([
io_lib:format("{system_information_version, ~p}.~n", [
@@ -130,6 +136,27 @@ module(M, Opts) when is_atom(M), is_list(Opts) ->
modules(Opt) when is_atom(Opt) ->
gen_server:call(?SERVER, {modules, Opt}).
+
+-spec sanity_check() -> ok | {failed, Failures} when
+ Application :: atom(),
+ ApplicationVersion :: string(),
+ MissingRuntimeDependencies :: {missing_runtime_dependencies,
+ ApplicationVersion,
+ [ApplicationVersion]},
+ InvalidApplicationVersion :: {invalid_application_version,
+ ApplicationVersion},
+ InvalidAppFile :: {invalid_app_file, Application},
+ Failure :: MissingRuntimeDependencies
+ | InvalidApplicationVersion
+ | InvalidAppFile,
+ Failures :: [Failure].
+
+sanity_check() ->
+ case check_runtime_dependencies() of
+ [] -> ok;
+ Issues -> {failed, Issues}
+ end.
+
%%===================================================================
%% gen_server callbacks
%%===================================================================
@@ -280,7 +307,7 @@ print_environments([],_) ->
print_environment({_Key, false},_) -> ok;
print_environment({Key, Value},_) ->
- io:format(" - ~s = ~s~n", [Key, Value]).
+ io:format(" - ~s = ~ts~n", [Key, Value]).
print_modules_from_code(M, [Info|Ms], Opts) ->
print_module_from_code(M, Info),
@@ -292,14 +319,14 @@ print_modules_from_code(_, [], _) ->
ok.
print_module_from_code(M, {Path, [{M,ModInfo}]}) ->
- io:format(" from path \"~s\" (no application):~n", [Path]),
+ io:format(" from path \"~ts\" (no application):~n", [Path]),
io:format(" - compiler: ~s~n", [get_value([compiler], ModInfo)]),
io:format(" - md5: ~s~n", [get_value([md5], ModInfo)]),
io:format(" - native: ~w~n", [get_value([native], ModInfo)]),
io:format(" - loaded: ~w~n", [get_value([loaded], ModInfo)]),
ok;
print_module_from_code(M, {App,Vsn,Path,[{M,ModInfo}]}) ->
- io:format(" from path \"~s\" (~w-~s):~n", [Path,App,Vsn]),
+ io:format(" from path \"~ts\" (~w-~s):~n", [Path,App,Vsn]),
io:format(" - compiler: ~s~n", [get_value([compiler], ModInfo)]),
io:format(" - md5: ~s~n", [get_value([md5], ModInfo)]),
io:format(" - native: ~w~n", [get_value([native], ModInfo)]),
@@ -457,6 +484,8 @@ get_application_from_path(Path) ->
{description, proplists:get_value(description, Info, [])},
{vsn, proplists:get_value(vsn, Info, [])},
{path, Path},
+ {runtime_dependencies,
+ proplists:get_value(runtime_dependencies, Info, [])},
{modules, get_modules_from_path(Path)}
]}
end.
@@ -552,3 +581,252 @@ get_beam_name() ->
Value -> Value
end,
Beam ++ Type ++ Flavor.
+
+%% Check runtime dependencies...
+
+vsnstr2vsn(VsnStr) ->
+ list_to_tuple(lists:map(fun (Part) ->
+ list_to_integer(Part)
+ end,
+ string:tokens(VsnStr, "."))).
+
+rtdepstrs2rtdeps([]) ->
+ [];
+rtdepstrs2rtdeps([RTDep | RTDeps]) ->
+ [AppStr, VsnStr] = string:tokens(RTDep, "-"),
+ [{list_to_atom(AppStr), vsnstr2vsn(VsnStr)} | rtdepstrs2rtdeps(RTDeps)].
+
+build_app_table([], AppTab) ->
+ AppTab;
+build_app_table([App | Apps], AppTab0) ->
+ AppTab1 = try
+ %% We may have multiple application versions installed
+ %% of the same application! It is therefore important
+ %% to look up the application version that actually will
+ %% be used via code server.
+ AppFile = code:where_is_file(atom_to_list(App) ++ ".app"),
+ {ok, [{application, App, Info}]} = file:consult(AppFile),
+ VsnStr = proplists:get_value(vsn, Info),
+ Vsn = vsnstr2vsn(VsnStr),
+ RTDepStrs = proplists:get_value(runtime_dependencies,
+ Info, []),
+ RTDeps = rtdepstrs2rtdeps(RTDepStrs),
+ gb_trees:insert(App, {Vsn, RTDeps}, AppTab0)
+ catch
+ _ : _ ->
+ AppTab0
+ end,
+ build_app_table(Apps, AppTab1).
+
+meets_min_req(Vsn, Vsn) ->
+ true;
+meets_min_req({X}, VsnReq) ->
+ meets_min_req({X, 0, 0}, VsnReq);
+meets_min_req({X, Y}, VsnReq) ->
+ meets_min_req({X, Y, 0}, VsnReq);
+meets_min_req(Vsn, {X}) ->
+ meets_min_req(Vsn, {X, 0, 0});
+meets_min_req(Vsn, {X, Y}) ->
+ meets_min_req(Vsn, {X, Y, 0});
+meets_min_req({X, _Y, _Z}, {XReq, _YReq, _ZReq}) when X > XReq ->
+ true;
+meets_min_req({X, Y, _Z}, {X, YReq, _ZReq}) when Y > YReq ->
+ true;
+meets_min_req({X, Y, Z}, {X, Y, ZReq}) when Z > ZReq ->
+ true;
+meets_min_req({_X, _Y, _Z}, {_XReq, _YReq, _ZReq}) ->
+ false;
+meets_min_req(Vsn, VsnReq) ->
+ gp_meets_min_req(mk_gp_vsn_list(Vsn), mk_gp_vsn_list(VsnReq)).
+
+gp_meets_min_req([X, Y, Z | _Vs], [X, Y, Z]) ->
+ true;
+gp_meets_min_req([X, Y, Z | _Vs], [XReq, YReq, ZReq]) ->
+ meets_min_req({X, Y, Z}, {XReq, YReq, ZReq});
+gp_meets_min_req([X, Y, Z | Vs], [X, Y, Z | VReqs]) ->
+ gp_meets_min_req_tail(Vs, VReqs);
+gp_meets_min_req(_Vsn, _VReq) ->
+ %% Versions on different version branches, i.e., the minimum
+ %% required functionality is not included in Vsn.
+ false.
+
+gp_meets_min_req_tail([V | Vs], [V | VReqs]) ->
+ gp_meets_min_req_tail(Vs, VReqs);
+gp_meets_min_req_tail([], []) ->
+ true;
+gp_meets_min_req_tail([_V | _Vs], []) ->
+ true;
+gp_meets_min_req_tail([V | _Vs], [VReq]) when V > VReq ->
+ true;
+gp_meets_min_req_tail(_Vs, _VReqs) ->
+ %% Versions on different version branches, i.e., the minimum
+ %% required functionality is not included in Vsn.
+ false.
+
+mk_gp_vsn_list(Vsn) ->
+ [X, Y, Z | Tail] = tuple_to_list(Vsn),
+ [X, Y, Z | remove_trailing_zeroes(Tail)].
+
+remove_trailing_zeroes([]) ->
+ [];
+remove_trailing_zeroes([0 | Vs]) ->
+ case remove_trailing_zeroes(Vs) of
+ [] -> [];
+ NewVs -> [0 | NewVs]
+ end;
+remove_trailing_zeroes([V | Vs]) ->
+ [V | remove_trailing_zeroes(Vs)].
+
+mk_app_vsn_str({App, Vsn}) ->
+ mk_app_vsn_str(App, Vsn).
+
+mk_app_vsn_str(App, Vsn) ->
+ VsnList = tuple_to_list(Vsn),
+ lists:flatten([atom_to_list(App),
+ $-,
+ integer_to_list(hd(VsnList)),
+ lists:map(fun (Part) ->
+ [$., integer_to_list(Part)]
+ end, tl(VsnList))]).
+
+otp_17_0_vsns_orddict() ->
+ [{asn1,{3,0}},
+ {common_test,{1,8}},
+ {compiler,{5,0}},
+ {cosEvent,{2,1,15}},
+ {cosEventDomain,{1,1,14}},
+ {cosFileTransfer,{1,1,16}},
+ {cosNotification,{1,1,21}},
+ {cosProperty,{1,1,17}},
+ {cosTime,{1,1,14}},
+ {cosTransactions,{1,2,14}},
+ {crypto,{3,3}},
+ {debugger,{4,0}},
+ {dialyzer,{2,7}},
+ {diameter,{1,6}},
+ {edoc,{0,7,13}},
+ {eldap,{1,0,3}},
+ {erl_docgen,{0,3,5}},
+ {erl_interface,{3,7,16}},
+ {erts,{6,0}},
+ {et,{1,5}},
+ {eunit,{2,2,7}},
+ {gs,{1,5,16}},
+ {hipe,{3,10,3}},
+ {ic,{4,3,5}},
+ {inets,{5,10}},
+ {jinterface,{1,5,9}},
+ {kernel,{3,0}},
+ {megaco,{3,17,1}},
+ {mnesia,{4,12}},
+ {observer,{2,0}},
+ {odbc,{2,10,20}},
+ {orber,{3,6,27}},
+ {os_mon,{2,2,15}},
+ {ose,{1,0}},
+ {otp_mibs,{1,0,9}},
+ {parsetools,{2,0,11}},
+ {percept,{0,8,9}},
+ {public_key,{0,22}},
+ {reltool,{0,6,5}},
+ {runtime_tools,{1,8,14}},
+ {sasl,{2,4}},
+ {snmp,{4,25,1}},
+ {ssh,{3,0,1}},
+ {ssl,{5,3,4}},
+ {stdlib,{2,0}},
+ {syntax_tools,{1,6,14}},
+ {test_server,{3,7}},
+ {tools,{2,6,14}},
+ {typer,{0,9,6}},
+ {webtool,{0,8,10}},
+ {wx,{1,2}},
+ {xmerl,{1,3,7}}].
+
+otp_17_0_vsns_tab() ->
+ gb_trees:from_orddict(otp_17_0_vsns_orddict()).
+
+check_runtime_dependency({App, DepVsn}, AppTab) ->
+ case gb_trees:lookup(App, AppTab) of
+ none ->
+ false;
+ {value, {Vsn, _}} ->
+ meets_min_req(Vsn, DepVsn)
+ end.
+
+check_runtime_dependencies(App, AppTab, OtpMinVsnTab) ->
+ case gb_trees:lookup(App, AppTab) of
+ none ->
+ [{invalid_app_file, App}];
+ {value, {Vsn, RTDeps}} ->
+ RTD = case lists:foldl(
+ fun (RTDep, Acc) ->
+ case check_runtime_dependency(RTDep, AppTab) of
+ true ->
+ Acc;
+ false ->
+ [mk_app_vsn_str(RTDep) | Acc]
+ end
+ end,
+ [],
+ RTDeps) of
+ [] ->
+ [];
+ MissingDeps ->
+ [{missing_runtime_dependencies,
+ mk_app_vsn_str(App, Vsn),
+ MissingDeps}]
+ end,
+ case gb_trees:lookup(App, OtpMinVsnTab) of
+ none ->
+ RTD;
+ {value, MinVsn} ->
+ case meets_min_req(Vsn, MinVsn) of
+ true ->
+ RTD;
+ false ->
+ [{invalid_application_version,
+ mk_app_vsn_str(App, Vsn)} | RTD]
+ end
+ end
+ end.
+
+app_file_to_app(AF) ->
+ list_to_atom(filename:basename(AF, ".app")).
+
+get_apps() ->
+ get_apps(code:get_path(), []).
+
+get_apps([], Apps) ->
+ lists:usort(Apps);
+get_apps([Path|Paths], Apps) ->
+ case filelib:wildcard(filename:join(Path, "*.app")) of
+ [] ->
+ %% Not app or invalid app
+ get_apps(Paths, Apps);
+ [AppFile] ->
+ get_apps(Paths, [app_file_to_app(AppFile) | Apps]);
+ [_AppFile| _] = AppFiles ->
+ %% Strange with multple .app files... Lets put them
+ %% all in the list and see what we get...
+ lists:map(fun (AF) ->
+ app_file_to_app(AF)
+ end, AppFiles) ++ Apps
+ end.
+
+check_runtime_dependencies() ->
+ OtpMinVsnTab = otp_17_0_vsns_tab(),
+ Apps = get_apps(),
+ AppTab = build_app_table(Apps, gb_trees:empty()),
+ lists:foldl(fun (App, Acc) ->
+ case check_runtime_dependencies(App,
+ AppTab,
+ OtpMinVsnTab) of
+ [] -> Acc;
+ Issues -> Issues ++ Acc
+ end
+ end,
+ [],
+ Apps).
+
+%% End of runtime dependency checks
diff --git a/lib/runtime_tools/test/runtime_tools_SUITE.erl b/lib/runtime_tools/test/runtime_tools_SUITE.erl
index 62497ab527..48ed810918 100644
--- a/lib/runtime_tools/test/runtime_tools_SUITE.erl
+++ b/lib/runtime_tools/test/runtime_tools_SUITE.erl
@@ -25,7 +25,7 @@
-export([init_per_testcase/2, end_per_testcase/2]).
%% Test cases
--export([app_file/1, start_stop_app/1]).
+-export([app_file/1, appup_file/1, start_stop_app/1]).
%% Default timetrap timeout (set in init_per_testcase)
-define(default_timeout, ?t:minutes(1)).
@@ -43,6 +43,7 @@ suite() -> [{ct_hooks,[ts_install_cth]}].
all() ->
[app_file,
+ appup_file,
start_stop_app].
groups() ->
@@ -65,6 +66,9 @@ app_file(_Config) ->
?line ok = ?t:app_test(runtime_tools),
ok.
+appup_file(_Config) ->
+ ok = ?t:appup_test(runtime_tools).
+
start_stop_app(_Config) ->
ok = application:start(runtime_tools),
Sup = whereis(runtime_tools_sup),
diff --git a/lib/runtime_tools/test/system_information_SUITE.erl b/lib/runtime_tools/test/system_information_SUITE.erl
index fb9455a30f..53d20060e7 100644
--- a/lib/runtime_tools/test/system_information_SUITE.erl
+++ b/lib/runtime_tools/test/system_information_SUITE.erl
@@ -33,6 +33,7 @@
api_report/1,
api_to_file/1,
api_from_file/1,
+ sanity_check/1,
%% server
api_start_stop/1,
validate_server_interface/1
@@ -84,7 +85,8 @@ all() -> [
api_to_file,
api_from_file,
api_start_stop,
- validate_server_interface
+ validate_server_interface,
+ sanity_check
].
@@ -262,6 +264,9 @@ validate_server_interface(Config) ->
ok = system_information:stop(),
ok.
+sanity_check(Config) when is_list(Config) ->
+ ok = system_information:sanity_check().
+
%% aux
@@ -288,7 +293,8 @@ validate_report(Report) ->
erts_compile_info,
beam_dynamic_libraries,
environment_erts,
- environment
+ environment,
+ sanity_check
], Report).
ensure_report_keys([], _) -> ok;
diff --git a/lib/runtime_tools/test/system_information_SUITE_data/information_test_report.dat b/lib/runtime_tools/test/system_information_SUITE_data/information_test_report.dat
index 0900eadd4a..18938372a3 100644
--- a/lib/runtime_tools/test/system_information_SUITE_data/information_test_report.dat
+++ b/lib/runtime_tools/test/system_information_SUITE_data/information_test_report.dat
@@ -9870,4 +9870,5 @@
{"MANPATH",
"/usr/local/man:/usr/share/man:/usr/X11R6/man:/opt/gnome/share/man"},
{"LESSKEY","/etc/lesskey.bin"},
- {"LC_PAPER","sv_SE.UTF-8"}]}]}.
+ {"LC_PAPER","sv_SE.UTF-8"}]},
+ {sanity_check,ok}]}.
diff --git a/lib/runtime_tools/vsn.mk b/lib/runtime_tools/vsn.mk
index c282661a61..32953dfc5a 100644
--- a/lib/runtime_tools/vsn.mk
+++ b/lib/runtime_tools/vsn.mk
@@ -1 +1 @@
-RUNTIME_TOOLS_VSN = 1.8.13
+RUNTIME_TOOLS_VSN = 1.8.14
diff --git a/lib/sasl/doc/src/appup.xml b/lib/sasl/doc/src/appup.xml
index 85fcbed3ba..95f315d269 100644
--- a/lib/sasl/doc/src/appup.xml
+++ b/lib/sasl/doc/src/appup.xml
@@ -4,7 +4,7 @@
<fileref>
<header>
<copyright>
- <year>1997</year><year>2013</year>
+ <year>1997</year><year>2014</year>
<holder>Ericsson AB. All Rights Reserved.</holder>
</copyright>
<legalnotice>
@@ -84,6 +84,9 @@
version identifier must be specified as a binary, e.g.</p>
<code type="none">&lt;&lt;"2\\.1\\.[0-9]+">></code>
<p>will match all versions <c>2.1.x</c>, where x is any number.</p>
+ <p>Note that the regular expression must match the complete
+ version string, so the above example will work for for
+ e.g. <c>2.1.1</c>, but not for <c>2.1.1.1</c></p>
</section>
<section>
@@ -339,7 +342,7 @@ restart_new_emulator
version of erts, kernel, stdlib and sasl are used when the
emulator restarts. Only one <c>restart_new_emulator</c>
instruction is allowed in the relup, and it shall be placed
- first. <seealso marker="systools#make_relup/3">systools:make_relup3,4</seealso>
+ first. <seealso marker="systools#make_relup/3">systools:make_relup/3,4</seealso>
will ensure this when the relup is generated. The rest of the
relup script is executed after the restart as a part of the boot
script.</p>
@@ -347,11 +350,25 @@ restart_new_emulator
completed. To programatically find out if the upgrade is
complete,
call <seealso marker="release_handler#which_releases/0">
- release_handler:which_releases</seealso> and check if the
+ release_handler:which_releases/0,1</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
is completed. Otherwise, the old emulator is started in case of
an emulator restart.</p>
+ <warning>
+ <p>As stated above, the <c>restart_new_emulator</c>
+ instruction causes the emulator to be restarted with new
+ versions of <c>erts</c>, <c>kernel</c>, <c>stdlib</c> and
+ <c>sasl</c>. All other applications, however, will at startup
+ be running their old versions in this new emulator. In most
+ cases this is no problem, but every now and then there will be
+ incompatible changes to the core applications which may cause
+ trouble in this setting. Such incompatible changes (when
+ functions are removed) are normally preceded by a deprecation
+ over two major releases. To make sure your application is not
+ crashed by an incompatible change, always remove any call to
+ deprecated functions as soon as possible.</p>
+ </warning>
<pre>
restart_emulator
</pre>
diff --git a/lib/sasl/doc/src/notes.xml b/lib/sasl/doc/src/notes.xml
index 09d97cbe7b..2928a12d22 100644
--- a/lib/sasl/doc/src/notes.xml
+++ b/lib/sasl/doc/src/notes.xml
@@ -30,6 +30,64 @@
</header>
<p>This document describes the changes made to the SASL application.</p>
+<section><title>SASL 2.4</title>
+
+ <section><title>Fixed Bugs and Malfunctions</title>
+ <list>
+ <item>
+ <p>
+ The upgrade instruction 'restart_application' would
+ earlier ignore the restart type configured in the .rel
+ file and always restart the application as permanent.
+ This is now changed, and the restart type from the .rel
+ file is used. If restart type is 'load', the application
+ will only be loaded and not started. If the restart type
+ is 'none', the application will not be loaded nor
+ started, but all modules in the application will be
+ loaded. (Thanks to Tobias Schlager for reporting this
+ problem)</p>
+ <p>
+ *** POTENTIAL INCOMPATIBILITY ***</p>
+ <p>
+ Own Id: OTP-11716</p>
+ </item>
+ <item>
+ <p>
+ If <c>systools:make_script/2</c> failed with reason
+ <c>duplicate_modules</c>, and the <c>silent</c> flag was
+ not used, a crash with reason <c>function_clause</c>
+ would occur when <c>systools</c> tried to format the
+ error message. This has been corrected. (Thanks to
+ Jean-Sébastien Pédron)</p>
+ <p>
+ Own Id: OTP-11819</p>
+ </item>
+ </list>
+ </section>
+
+
+ <section><title>Improvements and New Features</title>
+ <list>
+ <item>
+ <p>
+ Calls to erlang:open_port/2 with 'spawn' are updated to
+ handle space in the command path.</p>
+ <p>
+ Own Id: OTP-10842</p>
+ </item>
+ <item>
+ <p>
+ Some more documentation is added to explain the behavior
+ when an upgrade includes new versions of ERTS, Kernel,
+ STDLIB or SASL.</p>
+ <p>
+ Own Id: OTP-11717</p>
+ </item>
+ </list>
+ </section>
+
+</section>
+
<section><title>SASL 2.3.4</title>
<section><title>Fixed Bugs and Malfunctions</title>
diff --git a/lib/sasl/examples/src/target_system.erl b/lib/sasl/examples/src/target_system.erl
index fb9e9aaaaf..a0ae016791 100644
--- a/lib/sasl/examples/src/target_system.erl
+++ b/lib/sasl/examples/src/target_system.erl
@@ -1,7 +1,7 @@
%%
%% %CopyrightBegin%
%%
-%% Copyright Ericsson AB 2011-2013. All Rights Reserved.
+%% Copyright Ericsson AB 2011-2014. 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
@@ -65,7 +65,7 @@ create(RelFileName,SystoolsOpts) ->
[RelFileName, RelFileName]),
make_script(RelFileName,SystoolsOpts),
- TarFileName = filename:join(Dir,RelFileName ++ ".tar.gz"),
+ TarFileName = RelFileName ++ ".tar.gz",
io:fwrite("Creating tar file ~tp ...~n", [TarFileName]),
make_tar(RelFileName,SystoolsOpts),
@@ -100,6 +100,12 @@ create(RelFileName,SystoolsOpts) ->
copy_file(filename:join([ErtsBinDir, "to_erl"]),
filename:join([TmpBinDir, "to_erl"]), [preserve]),
+ %% This is needed if 'start' script created from 'start.src' shall
+ %% be used as it points out this directory as log dir for 'run_erl'
+ TmpLogDir = filename:join([TmpDir, "log"]),
+ io:fwrite("Creating temporary directory ~tp ...~n", [TmpLogDir]),
+ ok = file:make_dir(TmpLogDir),
+
StartErlDataFile = filename:join([TmpDir, "releases", "start_erl.data"]),
io:fwrite("Creating ~tp ...~n", [StartErlDataFile]),
StartErlData = io_lib:fwrite("~s ~s~n", [ErtsVsn, RelVsn]),
@@ -115,6 +121,7 @@ create(RelFileName,SystoolsOpts) ->
erl_tar:add(Tar, filename:join(TmpDir,ErtsDir), ErtsDir, []),
erl_tar:add(Tar, filename:join(TmpDir,"releases"), "releases", []),
erl_tar:add(Tar, filename:join(TmpDir,"lib"), "lib", []),
+ erl_tar:add(Tar, filename:join(TmpDir,"log"), "log", []),
erl_tar:close(Tar),
%% file:set_cwd(Cwd),
io:fwrite("Removing directory ~tp ...~n",[TmpDir]),
@@ -136,6 +143,11 @@ install(RelFileName, RootDir) ->
subst_src_scripts(["erl", "start", "start_erl"], ErtsBinDir, BinDir,
[{"FINAL_ROOTDIR", RootDir}, {"EMU", "beam"}],
[preserve]),
+ %%! Workaround for pre OTP 17.0: start.src and start_erl.src did
+ %%! not have correct permissions, so the above 'preserve' option did not help
+ ok = file:change_mode(filename:join(BinDir,"start"),8#0755),
+ ok = file:change_mode(filename:join(BinDir,"start_erl"),8#0755),
+
io:fwrite("Creating the RELEASES file ...\n"),
create_RELEASES(RootDir, filename:join([RootDir, "releases",
filename:basename(RelFileName)])).
diff --git a/lib/sasl/src/sasl.app.src b/lib/sasl/src/sasl.app.src
index 8c814cfaf5..8e95197a2a 100644
--- a/lib/sasl/src/sasl.app.src
+++ b/lib/sasl/src/sasl.app.src
@@ -44,5 +44,7 @@
{applications, [kernel, stdlib]},
{env, [{sasl_error_logger, tty},
{errlog_type, all}]},
- {mod, {sasl, []}}]}.
+ {mod, {sasl, []}},
+ {runtime_dependencies, ["tools-2.6.14","stdlib-2.0","kernel-3.0",
+ "erts-6.0"]}]}.
diff --git a/lib/sasl/src/sasl.appup.src b/lib/sasl/src/sasl.appup.src
index 0c4d80a74f..e789853eea 100644
--- a/lib/sasl/src/sasl.appup.src
+++ b/lib/sasl/src/sasl.appup.src
@@ -1,7 +1,7 @@
%% -*- erlang -*-
%% %CopyrightBegin%
%%
-%% Copyright Ericsson AB 1999-2013. All Rights Reserved.
+%% Copyright Ericsson AB 1999-2014. 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
@@ -16,12 +16,10 @@
%%
%% %CopyrightEnd%
{"%VSN%",
- %% Up from - max two major revisions back
+ %% Up from - max one major revision back
[{<<"2\\.4(\\.[0-9]+)*">>,[restart_new_emulator]}, %% R17
- {<<"2\\.3(\\.[0-9]+)*">>,[restart_new_emulator]}, %% R16
- {<<"2\\.2(\\.[0-9]+)*">>,[restart_new_emulator]}], %% R15
- %% Down to - max two major revisions back
+ {<<"2\\.3(\\.[0-9]+)*">>,[restart_new_emulator]}], %% R16
+ %% Down to - max one major revision back
[{<<"2\\.4(\\.[0-9]+)*">>,[restart_new_emulator]}, %% R17
- {<<"2\\.3(\\.[0-9]+)*">>,[restart_new_emulator]}, %% R16
- {<<"2\\.2(\\.[0-9]+)*">>,[restart_new_emulator]}] %% R15
+ {<<"2\\.3(\\.[0-9]+)*">>,[restart_new_emulator]}] %% R16
}.
diff --git a/lib/sasl/src/systools_make.erl b/lib/sasl/src/systools_make.erl
index 3d370a93a5..e5da797efb 100644
--- a/lib/sasl/src/systools_make.erl
+++ b/lib/sasl/src/systools_make.erl
@@ -2233,7 +2233,7 @@ format_error({undefined_applications,Apps}) ->
io_lib:format("Undefined applications: ~p~n",[Apps]);
format_error({duplicate_modules,Dups}) ->
io_lib:format("Duplicated modules: ~n~ts",
- [map(fun({{Mod,_,App1,_,_},{Mod,_,App2,_,_}}) ->
+ [map(fun({{Mod,App1,_},{Mod,App2,_}}) ->
io_lib:format("\t~w specified in ~w and ~w~n",
[Mod,App1,App2])
end, Dups)]);
diff --git a/lib/sasl/src/systools_rc.erl b/lib/sasl/src/systools_rc.erl
index 54c327410d..76f753c3d0 100644
--- a/lib/sasl/src/systools_rc.erl
+++ b/lib/sasl/src/systools_rc.erl
@@ -1,7 +1,7 @@
%%
%% %CopyrightBegin%
%%
-%% Copyright Ericsson AB 1996-2013. All Rights Reserved.
+%% Copyright Ericsson AB 1996-2014. 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
@@ -365,14 +365,22 @@ translate_application_instrs(Script, Appls, PreAppls) ->
case lists:keysearch(Appl, #application.name, Appls) of
{value, PostApplication} ->
PostMods = PostApplication#application.modules,
+ Type = PostApplication#application.type,
+ Apply =
+ case Type of
+ none -> [];
+ load -> [{apply, {application, load,
+ [Appl]}}];
+ _ -> [{apply, {application, start,
+ [Appl, Type]}}]
+ end,
[{apply, {application, stop, [Appl]}}] ++
[{remove, {M, brutal_purge, brutal_purge}}
|| M <- PreMods] ++
[{purge, PreMods}] ++
[{add_module, M, []} || M <- PostMods] ++
- [{apply, {application, start,
- [Appl, permanent]}}];
+ Apply;
false ->
throw({error, {no_such_application, Appl}})
end;
diff --git a/lib/sasl/test/release_handler_SUITE.erl b/lib/sasl/test/release_handler_SUITE.erl
index a3db2b23db..bd7414fbb4 100644
--- a/lib/sasl/test/release_handler_SUITE.erl
+++ b/lib/sasl/test/release_handler_SUITE.erl
@@ -1,7 +1,7 @@
%%
%% %CopyrightBegin%
%%
-%% Copyright Ericsson AB 2011-2013. All Rights Reserved.
+%% Copyright Ericsson AB 2011-2014. 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
@@ -667,6 +667,9 @@ release_handler_which_releases(Conf) ->
ok.
+release_handler_which_releases(cleanup,_Conf) ->
+ stop_node(node_name(release_handler_which_releases)).
+
%%-----------------------------------------------------------------
%% Ticket: OTP-2740
%% Slogan: vsn not numeric doesn't work so good in release_handling
@@ -1365,6 +1368,9 @@ upgrade_supervisor(Conf) when is_list(Conf) ->
ok.
+upgrade_supervisor(cleanup,_Condf) ->
+ stop_node(node_name(upgrade_supervisor)).
+
%% Check that if the supervisor fails, then the upgrade is rolled back
%% and an ok error message is returned
upgrade_supervisor_fail(Conf) when is_list(Conf) ->
@@ -1404,18 +1410,41 @@ upgrade_supervisor_fail(Conf) when is_list(Conf) ->
{error,{code_change_failed,_Pid,a_sup,_Vsn,
{error,{invalid_shutdown,brutal_kil}}}} =
- rpc:call(Node, release_handler, install_release, [RelVsn2]),
-
- %% Check that the upgrade is terminated - normally this would mean
- %% rollback, but since this testcase is very simplified the node
- %% is not started with heart supervision and will therefore not be
- %% restarted. So we just check that the node goes down.
+ rpc:call(Node, release_handler, install_release,
+ [RelVsn2, [{error_action,reboot}]]),
+
+ %% Check that the upgrade is terminated - normally this would be a
+ %% rollback, but
+ %%
+ %% 1. Default rollback is done with init:restart(), which does not
+ %% reboot the emulator, it only restarts the system inside the
+ %% running erlang node.
+ %%
+ %% 2. This does not work well on a slave node since, if timing is
+ %% right (bad), the slave node will get the nodedown from its
+ %% master (because distribution is terminated as part of
+ %% init:restart()) and then it will do halt() and thus never be
+ %% restarted (see slave:wloop/1)
+ %%
+ %% 3. Sometimes, though, init:restart() will manage to finish its
+ %% job before the nodedown is received, making the node
+ %% actually restart - in which case it might very well confuse
+ %% the next test case.
+ %%
+ %% 4. So, to avoid unstability we use {error_action,reboot} above,
+ %% to ensure that the node is actually stopped. Of course, in a
+ %% real system this must be used together with heart
+ %% supervision, and then the node will be restarted anyway. But
+ %% here in this simple test case we are satisfied to see that
+ %% the node terminates.
receive {nodedown,Node} -> ok
after 10000 -> ct:fail(failed_upgrade_never_restarted_node)
end,
ok.
+upgrade_supervisor_fail(cleanup,_Condf) ->
+ stop_node(node_name(upgrade_supervisor_fail)).
%% Test upgrade and downgrade of applications
eval_appup(Conf) when is_list(Conf) ->
@@ -1781,37 +1810,46 @@ otp_10463_upgrade_script_regexp(_Config) ->
ok.
no_dot_erlang(Conf) ->
- PrivDir = priv_dir(Conf),
+ PrivDir = ?config(data_dir,Conf),
{ok, OrigWd} = file:get_cwd(),
try
ok = file:set_cwd(PrivDir),
- Erl = filename:join([code:root_dir(),"bin","erl"]),
- Args = " -noinput -run io put_chars \"TESTOK\" -run erlang halt",
+ {ok, Wd} = file:get_cwd(),
+ io:format("Dir ~ts~n", [Wd]),
+
+ Erl0 = filename:join([code:root_dir(),"bin","erl"]),
+ Erl = filename:nativename(Erl0),
+ Quote = "\"",
+ Args = " -noinput -run c pwd -run erlang halt",
ok = file:write_file(".erlang", <<"io:put_chars(\"DOT_ERLANG_READ\\n\").\n">>),
- case os:cmd(Erl ++ Args) of
+ CMD1 = Quote ++ Erl ++ Quote ++ Args ,
+ case os:cmd(CMD1) of
"DOT_ERLANG_READ" ++ _ -> ok;
Other1 ->
- io:format("Failed: ~ts~n",[Erl ++ Args]),
+ io:format("Failed: ~ts~n",[CMD1]),
io:format("Expected: ~s ++ _~n",["DOT_ERLANG_READ "]),
io:format("Got: ~ts~n",[Other1]),
- exit(failed_to_start, test_error)
+ exit({failed_to_start, test_error})
end,
NO_DOT_ERL = " -boot no_dot_erlang",
- case os:cmd(Erl ++ NO_DOT_ERL ++ Args) of
- "TESTOK" ++ _ -> ok;
- Other2 ->
- io:format("Failed: ~ts~n",[Erl ++ Args]),
+ CMD2 = Quote ++ Erl ++ Quote ++ NO_DOT_ERL ++ Args,
+ case lists:prefix(Wd, Other2 = os:cmd(CMD2)) of
+ true -> ok;
+ false ->
+ io:format("Failed: ~ts~n",[CMD2]),
io:format("Expected: ~s~n",["TESTOK"]),
io:format("Got: ~ts~n",[Other2]),
- exit(failed_to_start, no_dot_erlang)
+ exit({failed_to_start, no_dot_erlang})
end
after
_ = file:delete(".erlang"),
- ok = file:set_cwd(OrigWd)
+ ok = file:set_cwd(OrigWd),
+ ok
end.
+
%%%=================================================================
%%% Misceleaneous functions
%%%=================================================================
@@ -2254,8 +2292,8 @@ create_p1g(Conf,TargetDir) ->
ok.
fix_version(SystemLib,App) ->
- FromVsn = vsn(App,current),
- ToVsn = vsn(App,old),
+ FromVsn = re:replace(vsn(App,current),"\\.","\\\\.",[{return,binary}]),
+ ToVsn = re:replace(vsn(App,old),"\\.","\\\\.",[{return,binary}]),
Rootname = filename:join([SystemLib,app_dir(App,old),ebin,atom_to_list(App)]),
AppFile = Rootname ++ ".app",
@@ -2408,9 +2446,28 @@ check_gg_info(Node,OtherAlive,OtherDead,Synced) ->
?t:format("~ncheck_gg_info failed for ~p: ~p~nwhen GGI was: ~p~n"
"and GI was: ~p~n",
[Node,E,GGI,GI]),
+ %% An attempt to find out if it is only a timing issue
+ %% that makes this fail every now and then:
+ try_again_check(Node,GGI,GI,1),
?t:fail("check_gg_info failed")
end.
+try_again_check(_Node,_GGI,_GI,6) ->
+ ok;
+try_again_check(Node,GGI,GI,N) ->
+ timer:sleep(1000),
+ case {rpc:call(Node,global_group,info,[]),
+ rpc:call(Node,global,info,[])} of
+ {GGI,GI} ->
+ ?t:format("~nAfter one more sek, GGI and GI are still the same"),
+ try_again_check(Node,GGI,GI,N+1);
+ {NewGGI,NewGI} ->
+ ?t:format("~nAfter one more sek:~nNew GGI: ~p~nNew GI: ~p~n",
+ [NewGGI,NewGI]),
+ try_again_check(Node,NewGGI,NewGI,N+1)
+ end.
+
+
do_check_gg_info(OtherAlive,OtherDead,Synced,GGI,GI) ->
{_,gg1} = lists:keyfind(own_group_name,1,GGI),
{_,synced} = lists:keyfind(state,1,GGI),
@@ -2554,7 +2611,7 @@ start_nodes(Conf,Snames,Tag) ->
start_node_unix(Sname,NodeDir) ->
Script = filename:join([NodeDir,"bin","start"]),
- ?t:format("Starting ~p: ~tp~n", [Sname,Script]),
+ ?t:format("Starting ~p: ~ts~n", [Sname,Script]),
case rh_test_lib:cmd(Script,[],[{"NODENAME",atom_to_list(Sname)}]) of
ok ->
{ok,node_name(Sname)};
diff --git a/lib/sasl/test/sasl_SUITE.erl b/lib/sasl/test/sasl_SUITE.erl
index e8f6a4a2eb..e91d220daf 100644
--- a/lib/sasl/test/sasl_SUITE.erl
+++ b/lib/sasl/test/sasl_SUITE.erl
@@ -1,7 +1,7 @@
%%
%% %CopyrightBegin%
%%
-%% Copyright Ericsson AB 2011-2013. All Rights Reserved.
+%% Copyright Ericsson AB 2011-2014. 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
@@ -19,11 +19,6 @@
-module(sasl_SUITE).
-include_lib("common_test/include/ct.hrl").
-
-%% Default timetrap timeout (set in init_per_testcase).
--define(default_timeout, ?t:minutes(1)).
--define(application, sasl).
-
%% Test server specific exports
-export([all/0,groups/0,init_per_group/2,end_per_group/2]).
-export([init_per_testcase/2, end_per_testcase/2]).
@@ -34,7 +29,7 @@
log_mf_h_env/1]).
all() ->
- [app_test, appup_test, log_mf_h_env].
+ [log_mf_h_env, app_test, appup_test].
groups() ->
[].
@@ -47,68 +42,88 @@ end_per_group(_GroupName, Config) ->
init_per_testcase(_Case, Config) ->
- Dog=test_server:timetrap(?default_timeout),
- [{watchdog, Dog}|Config].
-end_per_testcase(_Case, Config) ->
- Dog=?config(watchdog, Config),
- test_server:timetrap_cancel(Dog),
+ Config.
+end_per_testcase(_Case, _Config) ->
ok.
app_test(Config) when is_list(Config) ->
?t:app_test(sasl, allow),
ok.
-%% Test that appup allows upgrade from/downgrade to a maximum of two
-%% major releases back.
+%% Test that appup allows upgrade from/downgrade to a maximum of one
+%% major release back.
appup_test(_Config) ->
- application:load(sasl),
- {sasl,_,SaslVsn} = lists:keyfind(sasl,1,application:loaded_applications()),
- Ebin = filename:join(code:lib_dir(sasl),ebin),
- {ok,[{SaslVsn,UpFrom,DownTo}=Appup]} =
- file:consult(filename:join(Ebin,"sasl.appup")),
- ct:log("~p~n",[Appup]),
- {OkVsns,NokVsns} = create_test_vsns(SaslVsn),
+ appup_tests(sasl,create_test_vsns(sasl)).
+
+appup_tests(_App,{[],[]}) ->
+ {skip,"no previous releases available"};
+appup_tests(App,{OkVsns,NokVsns}) ->
+ application:load(App),
+ {_,_,Vsn} = lists:keyfind(App,1,application:loaded_applications()),
+ AppupFileName = atom_to_list(App) ++ ".appup",
+ AppupFile = filename:join([code:lib_dir(App),ebin,AppupFileName]),
+ {ok,[{Vsn,UpFrom,DownTo}=AppupScript]} = file:consult(AppupFile),
+ ct:log("~p~n",[AppupScript]),
+ ct:log("Testing ok versions: ~p~n",[OkVsns]),
check_appup(OkVsns,UpFrom,{ok,[restart_new_emulator]}),
check_appup(OkVsns,DownTo,{ok,[restart_new_emulator]}),
+ ct:log("Testing not ok versions: ~p~n",[NokVsns]),
check_appup(NokVsns,UpFrom,error),
check_appup(NokVsns,DownTo,error),
ok.
-create_test_vsns(Current) ->
- [XStr,YStr|Rest] = string:tokens(Current,"."),
- X = list_to_integer(XStr),
- Y = list_to_integer(YStr),
- SecondMajor = vsn(X,Y-2),
- SecondMinor = SecondMajor ++ ".1.3",
- FirstMajor = vsn(X,Y-1),
- FirstMinor = FirstMajor ++ ".57",
- ThisMajor = vsn(X,Y),
- This =
- case Rest of
- [] ->
- [];
- ["1"] ->
- [ThisMajor];
- _ ->
- ThisMinor = ThisMajor ++ ".1",
- [ThisMajor,ThisMinor]
+create_test_vsns(App) ->
+ ThisMajor = erlang:system_info(otp_release),
+ FirstMajor = previous_major(ThisMajor),
+ SecondMajor = previous_major(FirstMajor),
+ Ok = app_vsn(App,[ThisMajor,FirstMajor]),
+ Nok0 = app_vsn(App,[SecondMajor]),
+ Nok = case Ok of
+ [Ok1|_] ->
+ [Ok1 ++ ",1" | Nok0]; % illegal
+ _ ->
+ Nok0
+ end,
+ {Ok,Nok}.
+
+previous_major("17") ->
+ "r16b";
+previous_major("r16b") ->
+ "r15b";
+previous_major(Rel) ->
+ integer_to_list(list_to_integer(Rel)-1).
+
+app_vsn(App,[R|Rs]) ->
+ OldRel =
+ case test_server:is_release_available(R) of
+ true ->
+ {release,R};
+ false ->
+ case ct:get_config({otp_releases,list_to_atom(R)}) of
+ undefined ->
+ false;
+ Prog0 ->
+ case os:find_executable(Prog0) of
+ false ->
+ false;
+ Prog ->
+ {prog,Prog}
+ end
+ end
end,
- OkVsns = This ++ [FirstMajor, FirstMinor, SecondMajor, SecondMinor],
-
- ThirdMajor = vsn(X,Y-3),
- ThirdMinor = ThirdMajor ++ ".10.12",
- Illegal = ThisMajor ++ ",1",
- Newer1Major = vsn(X,Y+1),
- Newer1Minor = Newer1Major ++ ".1",
- Newer2Major = ThisMajor ++ "1",
- NokVsns = [ThirdMajor,ThirdMinor,
- Illegal,
- Newer1Major,Newer1Minor,
- Newer2Major],
- {OkVsns,NokVsns}.
-
-vsn(X,Y) ->
- integer_to_list(X) ++ "." ++ integer_to_list(Y).
+ case OldRel of
+ false ->
+ app_vsn(App,Rs);
+ _ ->
+ {ok,N} = test_server:start_node(prevrel,peer,[{erl,[OldRel]}]),
+ _ = rpc:call(N,application,load,[App]),
+ As = rpc:call(N,application,loaded_applications,[]),
+ {_,_,V} = lists:keyfind(App,1,As),
+ test_server:stop_node(N),
+ [V|app_vsn(App,Rs)]
+ end;
+app_vsn(_App,[]) ->
+ [].
check_appup([Vsn|Vsns],Instrs,Expected) ->
case systools_relup:appup_search_for_version(Vsn, Instrs) of
@@ -119,7 +134,6 @@ check_appup([],_,_) ->
ok.
-
%% OTP-9185 - fail sasl start if some but not all log_mf_h env vars
%% are given.
log_mf_h_env(Config) ->
diff --git a/lib/sasl/test/systools_SUITE.erl b/lib/sasl/test/systools_SUITE.erl
index e3f6933476..49a4303e0b 100644
--- a/lib/sasl/test/systools_SUITE.erl
+++ b/lib/sasl/test/systools_SUITE.erl
@@ -1,7 +1,7 @@
%%
%% %CopyrightBegin%
%%
-%% Copyright Ericsson AB 2012-2013. All Rights Reserved.
+%% Copyright Ericsson AB 2012-2014. 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
@@ -47,6 +47,7 @@
abnormal_script/1, src_tests_script/1, crazy_script/1,
included_script/1, included_override_script/1,
included_fail_script/1, included_bug_script/1, exref_script/1,
+ duplicate_modules_script/1,
otp_3065_circular_dependenies/1, included_and_used_sort_script/1]).
-export([tar_options/1, normal_tar/1, no_mod_vsn_tar/1, system_files_tar/1,
system_files_tar/2, invalid_system_files_tar/1,
@@ -84,6 +85,7 @@ groups() ->
src_tests_script, crazy_script,
included_script, included_override_script,
included_fail_script, included_bug_script, exref_script,
+ duplicate_modules_script,
otp_3065_circular_dependenies, included_and_used_sort_script]},
{tar, [],
[tar_options, normal_tar, no_mod_vsn_tar, system_files_tar,
@@ -822,6 +824,33 @@ no_hipe({ok, Value}) ->
{ok, Value}
end.
+%% duplicate_modules_script: Check that make_script rejects two
+%% applications providing the same module.
+duplicate_modules_script(Config) when is_list(Config) ->
+ {ok, OldDir} = file:get_cwd(),
+
+ {LatestDir, LatestName} = create_script(duplicate_modules,Config),
+
+ DataDir = filename:absname(?copydir),
+
+ ok = file:set_cwd(LatestDir),
+ LibDir = fname([DataDir, d_duplicate_modules, lib]),
+ P = [fname([LibDir, 'app1-1.0', ebin]),
+ fname([LibDir, 'app2-1.0', ebin])],
+
+ %% Check wrong app vsn
+ error = systools:make_script(LatestName, [{path, P}]),
+ {error,
+ systools_make,
+ {duplicate_modules, [
+ {{myapp,app1,_}, {myapp,app2,_}}
+ ]
+ }
+ } = systools:make_script(LatestName, [silent, {path, P}]),
+
+ ok = file:set_cwd(OldDir),
+ ok.
+
%% tar_options: Check illegal tar options.
tar_options(Config) when is_list(Config) ->
{'EXIT',{{badarg,[{path,["Path",12,"Another"]}]}, _}} =
@@ -1586,9 +1615,19 @@ no_sasl_relup(Config) when is_list(Config) ->
%% make_relup: Check that application start type is used in relup
app_start_type_relup(Config) when is_list(Config) ->
+ %% This might fail if some applications are not available, if so
+ %% skip the test case.
+ try create_script(latest_app_start_type2,Config) of
+ {Dir2,Name2} ->
+ app_start_type_relup(Dir2,Name2,Config)
+ catch throw:{error,Reason} ->
+ {skip,Reason}
+ end.
+
+app_start_type_relup(Dir2,Name2,Config) ->
PrivDir = ?config(priv_dir, Config),
{Dir1,Name1} = create_script(latest_app_start_type1,Config),
- {Dir2,Name2} = create_script(latest_app_start_type2,Config),
+
Release1 = filename:join(Dir1,Name1),
Release2 = filename:join(Dir2,Name2),
@@ -2186,7 +2225,10 @@ create_script(current_all_future_sasl,Config) ->
do_create_script(current_all_future_sasl,Config,current,Apps);
create_script({unicode,RelVsn},Config) ->
Apps = core_apps(current) ++ [{ua,"1.0"}],
- do_create_script(unicode,RelVsn,Config,current,Apps).
+ do_create_script(unicode,RelVsn,Config,current,Apps);
+create_script(duplicate_modules,Config) ->
+ Apps = core_apps(current) ++ [{app1,"1.0"},{app2,"1.0"}],
+ do_create_script(duplicate_modules,Config,current,Apps).
do_create_script(Id,Config,ErtsVsn,AppVsns) ->
@@ -2210,9 +2252,13 @@ app_vsns(AppVsns) ->
[{App,app_vsn(App,Vsn)} || {App,Vsn} <- AppVsns] ++
[{App,app_vsn(App,Vsn),Type} || {App,Vsn,Type} <- AppVsns].
app_vsn(App,current) ->
- application:load(App),
- {ok,Vsn} = application:get_key(App,vsn),
- Vsn;
+ case application:load(App) of
+ Ok when Ok==ok; Ok=={error,{already_loaded,App}} ->
+ {ok,Vsn} = application:get_key(App,vsn),
+ Vsn;
+ Error ->
+ throw(Error)
+ end;
app_vsn(_App,Vsn) ->
Vsn.
diff --git a/lib/sasl/test/systools_SUITE_data/d_duplicate_modules/lib/app1-1.0/ebin/app1.app b/lib/sasl/test/systools_SUITE_data/d_duplicate_modules/lib/app1-1.0/ebin/app1.app
new file mode 100644
index 0000000000..dea9257f2f
--- /dev/null
+++ b/lib/sasl/test/systools_SUITE_data/d_duplicate_modules/lib/app1-1.0/ebin/app1.app
@@ -0,0 +1,7 @@
+{application, app1,
+ [{description, "Application 1"},
+ {vsn, "1.0"},
+ {modules, [myapp]},
+ {registered, []},
+ {applications, []},
+ {env, []}]}.
diff --git a/lib/sasl/test/systools_SUITE_data/d_duplicate_modules/lib/app1-1.0/src/myapp.erl b/lib/sasl/test/systools_SUITE_data/d_duplicate_modules/lib/app1-1.0/src/myapp.erl
new file mode 100644
index 0000000000..bf2ab7c79c
--- /dev/null
+++ b/lib/sasl/test/systools_SUITE_data/d_duplicate_modules/lib/app1-1.0/src/myapp.erl
@@ -0,0 +1,2 @@
+-module(myapp).
+-vsn("1.0").
diff --git a/lib/sasl/test/systools_SUITE_data/d_duplicate_modules/lib/app2-1.0/ebin/app2.app b/lib/sasl/test/systools_SUITE_data/d_duplicate_modules/lib/app2-1.0/ebin/app2.app
new file mode 100644
index 0000000000..476750d8b2
--- /dev/null
+++ b/lib/sasl/test/systools_SUITE_data/d_duplicate_modules/lib/app2-1.0/ebin/app2.app
@@ -0,0 +1,7 @@
+{application, app2,
+ [{description, "Application 2"},
+ {vsn, "1.0"},
+ {modules, [myapp]},
+ {registered, []},
+ {applications, []},
+ {env, []}]}.
diff --git a/lib/sasl/test/systools_SUITE_data/d_duplicate_modules/lib/app2-1.0/src/myapp.erl b/lib/sasl/test/systools_SUITE_data/d_duplicate_modules/lib/app2-1.0/src/myapp.erl
new file mode 100644
index 0000000000..bf2ab7c79c
--- /dev/null
+++ b/lib/sasl/test/systools_SUITE_data/d_duplicate_modules/lib/app2-1.0/src/myapp.erl
@@ -0,0 +1,2 @@
+-module(myapp).
+-vsn("1.0").
diff --git a/lib/sasl/test/systools_rc_SUITE.erl b/lib/sasl/test/systools_rc_SUITE.erl
index 0cb6e63cf3..5efab7c028 100644
--- a/lib/sasl/test/systools_rc_SUITE.erl
+++ b/lib/sasl/test/systools_rc_SUITE.erl
@@ -1,7 +1,7 @@
%%
%% %CopyrightBegin%
%%
-%% Copyright Ericsson AB 2010-2012. All Rights Reserved.
+%% Copyright Ericsson AB 2010-2014. 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
@@ -436,25 +436,19 @@ translate(Config) when is_list(Config) ->
translate_app(Config) when is_list(Config) ->
PreApps =
- [#application{name = test,
- description = "TEST",
- vsn = "1.0",
- modules = [foo,bar,baz],
- regs = [],
- mod = {sasl, []}},
+ [Test = #application{name = test,
+ description = "TEST",
+ vsn = "1.0",
+ modules = [foo,bar,baz],
+ regs = [],
+ mod = {sasl, []}},
#application{name = pelle,
description = "PELLE",
vsn = "1.0",
modules = [pelle, kalle],
regs = [],
mod = {pelle, []}}],
- Apps =
- [#application{name = test,
- description = "TEST",
- vsn = "1.0",
- modules = [foo,bar,baz],
- regs = [],
- mod = {sasl, []}}],
+ Apps = [Test],
%% Simple translation (1)
Up1 = [{add_module, foo},
{add_module, bar}],
@@ -475,6 +469,56 @@ translate_app(Config) when is_list(Config) ->
{load,{baz,brutal_purge,brutal_purge}},
{apply,{application,start,[test,permanent]}}] = X2,
+ %% Translate add_application with different restart types
+ %% permanent
+ Up2_1 = [{add_application, test, permanent}],
+ {ok, X2_1} = systools_rc:translate_scripts([Up2_1], Apps, []),
+ [{load_object_code,{test,"1.0",[foo,bar,baz]}},
+ point_of_no_return,
+ {load,{foo,brutal_purge,brutal_purge}},
+ {load,{bar,brutal_purge,brutal_purge}},
+ {load,{baz,brutal_purge,brutal_purge}},
+ {apply,{application,start,[test,permanent]}}] = X2_1,
+
+ %% transient
+ Up2_2 = [{add_application, test, transient}],
+ {ok, X2_2} = systools_rc:translate_scripts([Up2_2], Apps, []),
+ [{load_object_code,{test,"1.0",[foo,bar,baz]}},
+ point_of_no_return,
+ {load,{foo,brutal_purge,brutal_purge}},
+ {load,{bar,brutal_purge,brutal_purge}},
+ {load,{baz,brutal_purge,brutal_purge}},
+ {apply,{application,start,[test,transient]}}] = X2_2,
+
+ %% temporary
+ Up2_3 = [{add_application, test, temporary}],
+ {ok, X2_3} = systools_rc:translate_scripts([Up2_3], Apps, []),
+ [{load_object_code,{test,"1.0",[foo,bar,baz]}},
+ point_of_no_return,
+ {load,{foo,brutal_purge,brutal_purge}},
+ {load,{bar,brutal_purge,brutal_purge}},
+ {load,{baz,brutal_purge,brutal_purge}},
+ {apply,{application,start,[test,temporary]}}] = X2_3,
+
+ %% load
+ Up2_4 = [{add_application, test, load}],
+ {ok, X2_4} = systools_rc:translate_scripts([Up2_4], Apps, []),
+ [{load_object_code,{test,"1.0",[foo,bar,baz]}},
+ point_of_no_return,
+ {load,{foo,brutal_purge,brutal_purge}},
+ {load,{bar,brutal_purge,brutal_purge}},
+ {load,{baz,brutal_purge,brutal_purge}},
+ {apply,{application,load,[test]}}] = X2_4,
+
+ %% none
+ Up2_5 = [{add_application, test, none}],
+ {ok, X2_5} = systools_rc:translate_scripts([Up2_5], Apps, []),
+ [{load_object_code,{test,"1.0",[foo,bar,baz]}},
+ point_of_no_return,
+ {load,{foo,brutal_purge,brutal_purge}},
+ {load,{bar,brutal_purge,brutal_purge}},
+ {load,{baz,brutal_purge,brutal_purge}}] = X2_5,
+
%% Simple translation (3)
Up3 = [{remove_application, pelle}],
{ok, X3} = systools_rc:translate_scripts([Up3], Apps, PreApps),
@@ -484,6 +528,102 @@ translate_app(Config) when is_list(Config) ->
{remove,{kalle,brutal_purge,brutal_purge}},
{purge,[pelle,kalle]},
{apply,{application,unload,[pelle]}}] = X3,
+
+ %% Simple translation (4)
+ Up4 = [{restart_application, test}],
+ {ok, X4} = systools_rc:translate_scripts([Up4], Apps, PreApps),
+ [{load_object_code,{test,"1.0",[foo,bar,baz]}},
+ point_of_no_return,
+ {apply,{application,stop,[test]}},
+ {remove,{foo,brutal_purge,brutal_purge}},
+ {remove,{bar,brutal_purge,brutal_purge}},
+ {remove,{baz,brutal_purge,brutal_purge}},
+ {purge,[foo,bar,baz]},
+ {load,{foo,brutal_purge,brutal_purge}},
+ {load,{bar,brutal_purge,brutal_purge}},
+ {load,{baz,brutal_purge,brutal_purge}},
+ {apply,{application,start,[test,permanent]}}] = X4,
+
+ %% Translate restart_application with different restart types
+ %% permanent
+ {ok, X4_1} = systools_rc:translate_scripts([Up4],
+ [Test#application{type=permanent}],
+ [Test]),
+ [{load_object_code,{test,"1.0",[foo,bar,baz]}},
+ point_of_no_return,
+ {apply,{application,stop,[test]}},
+ {remove,{foo,brutal_purge,brutal_purge}},
+ {remove,{bar,brutal_purge,brutal_purge}},
+ {remove,{baz,brutal_purge,brutal_purge}},
+ {purge,[foo,bar,baz]},
+ {load,{foo,brutal_purge,brutal_purge}},
+ {load,{bar,brutal_purge,brutal_purge}},
+ {load,{baz,brutal_purge,brutal_purge}},
+ {apply,{application,start,[test,permanent]}}] = X4_1,
+
+ %% transient
+ {ok, X4_2} = systools_rc:translate_scripts([Up4],
+ [Test#application{type=transient}],
+ [Test]),
+ [{load_object_code,{test,"1.0",[foo,bar,baz]}},
+ point_of_no_return,
+ {apply,{application,stop,[test]}},
+ {remove,{foo,brutal_purge,brutal_purge}},
+ {remove,{bar,brutal_purge,brutal_purge}},
+ {remove,{baz,brutal_purge,brutal_purge}},
+ {purge,[foo,bar,baz]},
+ {load,{foo,brutal_purge,brutal_purge}},
+ {load,{bar,brutal_purge,brutal_purge}},
+ {load,{baz,brutal_purge,brutal_purge}},
+ {apply,{application,start,[test,transient]}}] = X4_2,
+
+ %% temporary
+ {ok, X4_3} = systools_rc:translate_scripts([Up4],
+ [Test#application{type=temporary}],
+ [Test]),
+ [{load_object_code,{test,"1.0",[foo,bar,baz]}},
+ point_of_no_return,
+ {apply,{application,stop,[test]}},
+ {remove,{foo,brutal_purge,brutal_purge}},
+ {remove,{bar,brutal_purge,brutal_purge}},
+ {remove,{baz,brutal_purge,brutal_purge}},
+ {purge,[foo,bar,baz]},
+ {load,{foo,brutal_purge,brutal_purge}},
+ {load,{bar,brutal_purge,brutal_purge}},
+ {load,{baz,brutal_purge,brutal_purge}},
+ {apply,{application,start,[test,temporary]}}] = X4_3,
+
+ %% load
+ {ok, X4_4} = systools_rc:translate_scripts([Up4],
+ [Test#application{type=load}],
+ [Test]),
+ [{load_object_code,{test,"1.0",[foo,bar,baz]}},
+ point_of_no_return,
+ {apply,{application,stop,[test]}},
+ {remove,{foo,brutal_purge,brutal_purge}},
+ {remove,{bar,brutal_purge,brutal_purge}},
+ {remove,{baz,brutal_purge,brutal_purge}},
+ {purge,[foo,bar,baz]},
+ {load,{foo,brutal_purge,brutal_purge}},
+ {load,{bar,brutal_purge,brutal_purge}},
+ {load,{baz,brutal_purge,brutal_purge}},
+ {apply,{application,load,[test]}}] = X4_4,
+
+ %% none
+ {ok, X4_5} = systools_rc:translate_scripts([Up4],
+ [Test#application{type=none}],
+ [Test]),
+ [{load_object_code,{test,"1.0",[foo,bar,baz]}},
+ point_of_no_return,
+ {apply,{application,stop,[test]}},
+ {remove,{foo,brutal_purge,brutal_purge}},
+ {remove,{bar,brutal_purge,brutal_purge}},
+ {remove,{baz,brutal_purge,brutal_purge}},
+ {purge,[foo,bar,baz]},
+ {load,{foo,brutal_purge,brutal_purge}},
+ {load,{bar,brutal_purge,brutal_purge}},
+ {load,{baz,brutal_purge,brutal_purge}}] = X4_5,
+
ok.
diff --git a/lib/sasl/test/test_lib.hrl b/lib/sasl/test/test_lib.hrl
index 37aa44c198..c8a4e92f24 100644
--- a/lib/sasl/test/test_lib.hrl
+++ b/lib/sasl/test/test_lib.hrl
@@ -1,3 +1,3 @@
-define(ertsvsn,"4.4").
--define(kernelvsn,"2.15.3").
--define(stdlibvsn,"1.18.3").
+-define(kernelvsn,"2.16.4").
+-define(stdlibvsn,"1.19.4").
diff --git a/lib/snmp/doc/src/notes.xml b/lib/snmp/doc/src/notes.xml
index d213b67052..06674095f2 100644
--- a/lib/snmp/doc/src/notes.xml
+++ b/lib/snmp/doc/src/notes.xml
@@ -4,7 +4,7 @@
<chapter>
<header>
<copyright>
- <year>1996</year><year>2013</year>
+ <year>1996</year><year>2014</year>
<holder>Ericsson AB. All Rights Reserved.</holder>
</copyright>
<legalnotice>
@@ -33,6 +33,109 @@
</header>
+ <section><title>SNMP 4.25.1</title>
+
+ <section><title>Fixed Bugs and Malfunctions</title>
+ <list>
+ <item>
+ <p>
+ Application upgrade (appup) files are corrected for the
+ following applications: </p>
+ <p>
+ <c>asn1, common_test, compiler, crypto, debugger,
+ dialyzer, edoc, eldap, erl_docgen, et, eunit, gs, hipe,
+ inets, observer, odbc, os_mon, otp_mibs, parsetools,
+ percept, public_key, reltool, runtime_tools, ssh,
+ syntax_tools, test_server, tools, typer, webtool, wx,
+ xmerl</c></p>
+ <p>
+ A new test utility for testing appup files is added to
+ test_server. This is now used by most applications in
+ OTP.</p>
+ <p>
+ (Thanks to Tobias Schlager)</p>
+ <p>
+ Own Id: OTP-11744</p>
+ </item>
+ </list>
+ </section>
+
+</section>
+
+<section>
+ <title>SNMP Development Toolkit 4.25.0.1</title>
+ <p>Version 4.25.0.1 supports code replacement in runtime from/to
+ version 4.25, 4.24.2, 4.24.1 and 4.24. </p>
+
+ <section>
+ <title>Improvements and new features</title>
+<!--
+ <p>-</p>
+-->
+
+ <list type="bulleted">
+ <item>
+ <p>Updated doc files to utf8. </p>
+ <p>Own Id: OTP-10907</p>
+ </item>
+
+ <item>
+ <p>Fixed test suite to support UTF-8 paths. </p>
+ <p>Own Id: OTP-10877</p>
+ </item>
+
+ </list>
+
+ </section>
+
+ <section>
+ <title>Fixed Bugs and Malfunctions</title>
+ <p>-</p>
+
+<!--
+ <list type="bulleted">
+ <item>
+ <p>Wrong block cypher type used for AES ('aes_cbf128'
+ instead of 'aes_cfb128') when performing AES block
+ encrypt/decrypt which breaks SNMP usmAesCfb128Protocol
+ in agent and manager. </p>
+ <p>Own Id: OTP-11412</p>
+ </item>
+
+ <item>
+ <p>[manager] When performing the AES encryption, invalid values for
+ the EngineBoots and EngineTime was used. </p>
+ <p>The values of the local agent was used, which would have produced
+ "some" values if an agent was actually running.
+ If not it would have caused a crash. </p>
+ <p>Own Id: OTP-11413</p>
+ </item>
+
+ </list>
+-->
+
+ </section>
+
+ <section>
+ <title>Incompatibilities</title>
+ <p>-</p>
+
+<!--
+ <list type="bulleted">
+ <item>
+ <p>[manager] The old Addr-and-Port based API functions, previously
+ long deprecated and marked for deletion in R16B, has now been
+ removed. </p>
+ <p>Own Id: OTP-10027</p>
+ </item>
+
+ </list>
+-->
+ </section>
+
+ </section> <!-- 4.25.0.1 -->
+
+
<section>
<title>SNMP Development Toolkit 4.25</title>
<p>Version 4.25 supports code replacement in runtime from/to
diff --git a/lib/snmp/doc/src/snmpa_mib_data.xml b/lib/snmp/doc/src/snmpa_mib_data.xml
index c1ea0a91f9..95a33e603e 100644
--- a/lib/snmp/doc/src/snmpa_mib_data.xml
+++ b/lib/snmp/doc/src/snmpa_mib_data.xml
@@ -1,10 +1,10 @@
-<?xml version="1.0" encoding="iso-8859-1" ?>
+<?xml version="1.0" encoding="utf-8" ?>
<!DOCTYPE erlref SYSTEM "erlref.dtd">
<erlref>
<header>
<copyright>
- <year>2013</year><year>2013</year>
+ <year>2013</year><year>2014</year>
<holder>Ericsson AB. All Rights Reserved.</holder>
</copyright>
<legalnotice>
diff --git a/lib/snmp/doc/src/snmpa_mib_storage.xml b/lib/snmp/doc/src/snmpa_mib_storage.xml
index a857ce79e8..791fbc80fe 100644
--- a/lib/snmp/doc/src/snmpa_mib_storage.xml
+++ b/lib/snmp/doc/src/snmpa_mib_storage.xml
@@ -1,10 +1,10 @@
-<?xml version="1.0" encoding="iso-8859-1" ?>
+<?xml version="1.0" encoding="utf-8" ?>
<!DOCTYPE erlref SYSTEM "erlref.dtd">
<erlref>
<header>
<copyright>
- <year>2013</year><year>2013</year>
+ <year>2013</year><year>2014</year>
<holder>Ericsson AB. All Rights Reserved.</holder>
</copyright>
<legalnotice>
diff --git a/lib/snmp/src/app/snmp.app.src b/lib/snmp/src/app/snmp.app.src
index 904d17954b..cbd292e4c3 100644
--- a/lib/snmp/src/app/snmp.app.src
+++ b/lib/snmp/src/app/snmp.app.src
@@ -136,4 +136,6 @@
%% configuration and use), and in that case mnesia must also be started,
%% before snmp.
{applications, [kernel, stdlib]},
- {mod, {snmp_app, []}}]}.
+ {mod, {snmp_app, []}},
+ {runtime_dependencies, ["stdlib-2.0","runtime_tools-1.8.14","mnesia-4.12",
+ "kernel-3.0","erts-6.0","crypto-3.3"]}]}.
diff --git a/lib/snmp/src/app/snmp.appup.src b/lib/snmp/src/app/snmp.appup.src
index fa4b72ab68..babc33e6a5 100644
--- a/lib/snmp/src/app/snmp.appup.src
+++ b/lib/snmp/src/app/snmp.appup.src
@@ -1,7 +1,7 @@
%%
%% %CopyrightBegin%
%%
-%% Copyright Ericsson AB 1999-2013. All Rights Reserved.
+%% Copyright Ericsson AB 1999-2014. 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
@@ -28,11 +28,10 @@
%% {update, snmpa_local_db, soft, soft_purge, soft_purge, []}
%% {add_module, snmpm_net_if_mt}
[
+ {"4.25", [{restart_application, snmp}]},
{"4.24.2", [{restart_application, snmp}]},
{"4.24.1", [{restart_application, snmp}]},
- {"4.24", [{restart_application, snmp}]},
- {"4.23.1", [{restart_application, snmp}]},
- {"4.23", [{restart_application, snmp}]}
+ {"4.24", [{restart_application, snmp}]}
],
%% ------D o w n g r a d e ---------------------------------------------------
@@ -41,11 +40,10 @@
%% {remove, {snmpm_net_if_mt, soft_purge, soft_purge}}
[
+ {"4.25", [{restart_application, snmp}]},
{"4.24.2", [{restart_application, snmp}]},
{"4.24.1", [{restart_application, snmp}]},
- {"4.24", [{restart_application, snmp}]},
- {"4.23.1", [{restart_application, snmp}]},
- {"4.23", [{restart_application, snmp}]}
+ {"4.24", [{restart_application, snmp}]}
]
}.
diff --git a/lib/snmp/test/Makefile b/lib/snmp/test/Makefile
index f22b7ea8ee..7bc9dd07d4 100644
--- a/lib/snmp/test/Makefile
+++ b/lib/snmp/test/Makefile
@@ -93,10 +93,10 @@ ifeq ($(SNMP_DEBUG),e)
SNMP_FLAGS += -Dsnmp_error
endif
ifeq ($(SNMP_DEBUG),l)
- SNMP_FLAGS += -Dsnmp_log
+ SNMP_FLAGS += -Dsnmp_error -Dsnmp_log
endif
ifeq ($(SNMP_DEBUG),d)
- SNMP_FLAGS += -Dsnmp_debug
+ SNMP_FLAGS += -Dsnmp_error -Dsnmp_log -Dsnmp_debug
endif
ifeq ($(DONT_USE_TS),true)
diff --git a/lib/snmp/test/modules.mk b/lib/snmp/test/modules.mk
index 3d658bf8e8..fd8315ec4d 100644
--- a/lib/snmp/test/modules.mk
+++ b/lib/snmp/test/modules.mk
@@ -2,7 +2,7 @@
# %CopyrightBegin%
#
-# Copyright Ericsson AB 2004-2012. All Rights Reserved.
+# Copyright Ericsson AB 2004-2014. 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
@@ -42,6 +42,7 @@ TEST_UTIL_MODULES = \
snmp_test_manager \
snmp_test_mgr \
snmp_test_mgr_misc \
+ snmp_test_mgr_counter_server \
sa \
klas3 \
test1 \
diff --git a/lib/snmp/test/snmp_agent_test.erl b/lib/snmp/test/snmp_agent_test.erl
index 50336fcf6e..2a9f2e842d 100644
--- a/lib/snmp/test/snmp_agent_test.erl
+++ b/lib/snmp/test/snmp_agent_test.erl
@@ -19,10 +19,6 @@
-module(snmp_agent_test).
-%% TODO
-%% * Test fault-tolerance (kill master etc)
-%%
-
-export([
all/0,
groups/0,
@@ -41,7 +37,7 @@
v1_processing/1,
big/1,
big2/1,
- loop_mib/1,
+ loop_mib_1/1,
api/1,
subagent/1,
mnesia/1,
@@ -394,8 +390,9 @@
usm_read/0,
usm_del_user/0,
usm_bad/0,
- loop_mib_1/0,
- loop_mib_2/0,
+ loop_mib_1_test/0,
+ loop_mib_2_test/0,
+ loop_mib_3_test/0,
otp_1129_i/1,
otp_1162_test/0,
otp_1131_test/0,
@@ -546,8 +543,9 @@ groups() ->
init_per_suite(Config0) when is_list(Config0) ->
- ?DBG("init_per_suite -> entry with"
- "~n Config0: ~p", [Config0]),
+ p("init_per_suite -> entry with"
+ "~n Config: ~p"
+ "~n Nodes: ~p", [Config0, erlang:nodes()]),
Config1 = snmp_test_lib:init_suite_top_dir(?MODULE, Config0),
Config2 = snmp_test_lib:fix_data_dir(Config1),
@@ -558,16 +556,32 @@ init_per_suite(Config0) when is_list(Config0) ->
Config3 = [{mib_dir, MibDir}, {std_mib_dir, StdMibDir} | Config2],
- ?DBG("init_per_suite -> end with"
- "~n Config3: ~p", [Config3]),
+ snmp_test_mgr_counter_server:start(),
+
+ p("init_per_suite -> end when"
+ "~n Config: ~p"
+ "~n Nodes: ~p", [Config3, erlang:nodes()]),
Config3.
end_per_suite(Config) when is_list(Config) ->
- ?DBG("end_per_suite -> entry with"
- "~n Config: ~p", [Config]),
+ p("end_per_suite -> entry with"
+ "~n Config: ~p"
+ "~n Nodes: ~p", [Config, erlang:nodes()]),
+
+ case snmp_test_mgr_counter_server:stop() of
+ {ok, _Counters} ->
+ p("end_per_suite -> sucessfully stopped counter server"
+ "~n Counters: ~p", [_Counters]);
+
+ {error, Reason} ->
+ p("end_per_suite -> failed stopping counter server"
+ "~n Reason: ~p", [Reason])
+ end,
+ p("end_per_suite -> end when"
+ "~n Nodes: ~p", [erlang:nodes()]),
Config.
@@ -675,10 +689,16 @@ end_per_group(_GroupName, Config) ->
%% ---- Init Per TestCase ----
init_per_testcase(Case, Config) when is_list(Config) ->
- ?DBG("init_per_testcase -> entry with"
- "~n Config: ~p", [Config]),
+ p("init_per_testcase -> entry with"
+ "~n Config: ~p"
+ "~n Nodes: ~p", [Config, erlang:nodes()]),
- init_per_testcase1(Case, Config).
+ Result = init_per_testcase1(Case, Config),
+
+ p("init_per_testcase -> done when"
+ "~n Result: ~p"
+ "~n Nodes: ~p", [Result, erlang:nodes()]),
+ Result.
init_per_testcase1(otp8395 = Case, Config) when is_list(Config) ->
?DBG("init_per_testcase1 -> entry with"
@@ -719,12 +739,18 @@ init_per_testcase1(_Case, Config) when is_list(Config) ->
%% ---- End Per TestCase ----
end_per_testcase(Case, Config) when is_list(Config) ->
- ?DBG("end_per_testcase -> entry with"
- "~n Config: ~p", [Config]),
+ p("end_per_testcase -> entry with"
+ "~n Config: ~p"
+ "~n Nodes: ~p", [Config, erlang:nodes()]),
display_log(Config),
- end_per_testcase1(Case, Config).
+ Result = end_per_testcase1(Case, Config),
+
+ p("end_per_testcase -> done with"
+ "~n Result: ~p"
+ "~n Nodes: ~p", [Result, erlang:nodes()]),
+ Result.
end_per_testcase1(otp8395, Config) when is_list(Config) ->
otp8395({fin, Config});
@@ -1173,7 +1199,7 @@ mse_simple(X) -> ?P(mse_simple), simple(X).
mse_v1_processing(X) -> ?P(mse_v1_processing), v1_processing(X).
mse_big(X) -> ?P(mse_big), big(X).
mse_big2(X) -> ?P(mse_big2), big2(X).
-mse_loop_mib(X) -> ?P(mse_loop_mib), loop_mib(X).
+mse_loop_mib(X) -> ?P(mse_loop_mib), loop_mib_1(X).
mse_api(X) -> ?P(mse_api), api(X).
mse_sa_register(X) -> ?P(mse_sa_register), sa_register(X).
mse_v1_trap(X) -> ?P(mse_v1_trap), v1_trap(X).
@@ -1194,7 +1220,7 @@ msd_simple(X) -> ?P(msd_simple), simple(X).
msd_v1_processing(X) -> ?P(msd_v1_processing), v1_processing(X).
msd_big(X) -> ?P(msd_big), big(X).
msd_big2(X) -> ?P(msd_big2), big2(X).
-msd_loop_mib(X) -> ?P(msd_loop_mib), loop_mib(X).
+msd_loop_mib(X) -> ?P(msd_loop_mib), loop_mib_1(X).
msd_api(X) -> ?P(msd_api), api(X).
msd_sa_register(X) -> ?P(msd_sa_register), sa_register(X).
msd_v1_trap(X) -> ?P(msd_v1_trap), v1_trap(X).
@@ -1215,7 +1241,7 @@ msm_simple(X) -> ?P(msm_simple), simple(X).
msm_v1_processing(X) -> ?P(msm_v1_processing), v1_processing(X).
msm_big(X) -> ?P(msm_big2), big(X).
msm_big2(X) -> ?P(msm_loop_mib), big2(X).
-msm_loop_mib(X) -> ?P(msm_loop_mib), loop_mib(X).
+msm_loop_mib(X) -> ?P(msm_loop_mib), loop_mib_1(X).
msm_api(X) -> ?P(msm_api), api(X).
msm_sa_register(X) -> ?P(msm_sa_register), sa_register(X).
msm_v1_trap(X) -> ?P(msm_v1_trap), v1_trap(X).
@@ -1524,11 +1550,11 @@ app_info(Config) when is_list(Config) ->
false ->
"undefined"
end,
- io:format("Root dir: ~s~n"
- "SNMP: Application dir: ~s~n"
- " Application ver: ~s~n"
- "SSL: Application dir: ~s~n"
- "CRYPTO: Application dir: ~s~n",
+ io:format("Root dir: ~ts~n"
+ "SNMP: Application dir: ~ts~n"
+ " Application ver: ~ts~n"
+ "SSL: Application dir: ~ts~n"
+ "CRYPTO: Application dir: ~ts~n",
[code:root_dir(), SnmpDir, AppVsn, SslDir, CryptoDir]),
ok.
@@ -1618,7 +1644,7 @@ v1_cases() ->
v1_processing,
big,
big2,
- loop_mib,
+ loop_mib_1,
api,
subagent,
mnesia,
@@ -2095,9 +2121,9 @@ await_dummy_manager_started(Pid) ->
{ok,Pid,Port};
{'EXIT', Pid, Reason} ->
{error, Pid, Reason};
- O ->
+ _O ->
?LOG("dummy_manager_start -> received unknown message:"
- "~n ~p",[O]),
+ "~n ~p",[_O]),
await_dummy_manager_started(Pid)
end.
@@ -2120,16 +2146,16 @@ dummy_manager_send_trap2(Pid) ->
dummy_manager_await_trap2_ack() ->
?DBG("dummy_manager_await_trap2 -> entry",[]),
receive
- {received_trap,Trap} ->
- ?LOG("dummy_manager_await_trap2 -> received trap: ~p",[Trap]),
+ {received_trap, _Trap} ->
+ ?LOG("dummy_manager_await_trap2 -> received trap: ~p", [_Trap]),
%% Note:
%% Without this sleep the v2_inform_i testcase failes! There
%% is no relation between these two test cases as far as I
%% able to figure out...
?SLEEP(60000),
ok;
- O ->
- ?ERR("dummy_manager_await_trap2 -> unexpected message: ~p",[O]),
+ _O ->
+ ?ERR("dummy_manager_await_trap2 -> unexpected message: ~p",[_O]),
ok
after 10000 ->
?ERR("dummy_manager_await_trap2 -> timeout",[]),
@@ -2155,32 +2181,34 @@ dummy_manager_loop(P,S,MA) ->
"~n Trap: ~p",[Trap]),
snmpa:send_trap(MA, Trap, "standard trap"),
dummy_manager_loop(P,S,MA);
- {udp, _UdpId, Ip, UdpPort, Bytes} ->
+ {udp, _UdpId, _Ip, _UdpPort, Bytes} ->
?LOG("dummy_manager_loop -> received upd message"
"~n from: ~p:~p"
"~n size: ~p",
- [Ip, UdpPort, dummy_manager_message_sz(Bytes)]),
+ [_Ip, _UdpPort, dummy_manager_message_sz(Bytes)]),
R = dummy_manager_handle_message(Bytes),
- ?DBG("dummy_manager_loop -> R: ~p",[R]),
+ ?DBG("dummy_manager_loop -> R: ~p", [R]),
P ! R,
- dummy_manager_loop(P,S,MA);
+ dummy_manager_loop(P, S, MA);
stop ->
?DBG("dummy_manager_loop -> received stop request",[]),
P ! {dummy_manager_stopping, self()},
gen_udp:close(S),
exit(normal);
- O ->
+ _O ->
?LOG("dummy_manager_loop -> received unknown message:"
- "~n ~p",[O]),
- dummy_manager_loop(P,S,MA)
+ "~n ~p", [_O]),
+ dummy_manager_loop(P, S, MA)
end.
+-ifdef(snmp_log).
dummy_manager_message_sz(B) when is_binary(B) ->
size(B);
dummy_manager_message_sz(L) when is_list(L) ->
length(L);
dummy_manager_message_sz(_) ->
undefined.
+-endif.
dummy_manager_handle_message(Bytes) ->
case (catch snmp_pdus:dec_message(Bytes)) of
@@ -3398,11 +3426,11 @@ simple_standard_test() ->
db_notify_client(suite) -> [];
db_notify_client(Config) when is_list(Config) ->
?P(db_notify_client),
- {SaNode, MgrNode, MibDir} = init_case(Config),
+ {_SaNode, _MgrNode, _MibDir} = init_case(Config),
?DBG("db_notify_client -> case initiated: "
"~n SaNode: ~p"
"~n MgrNode: ~p"
- "~n MibDir: ~p", [SaNode, MgrNode, MibDir]),
+ "~n MibDir: ~p", [_SaNode, _MgrNode, _MibDir]),
?DBG("db_notify_client -> maximize verbosity", []),
snmpa_local_db:verbosity(trace),
Self = self(),
@@ -4153,8 +4181,8 @@ ma_v2_inform1(MA) ->
CmdExp =
fun(ok) ->
ok;
- ({ok, Val}) ->
- ?DBG("ma_v2_inform -> [cmd2] Val: ~p", [Val]),
+ ({ok, _Val}) ->
+ ?DBG("ma_v2_inform -> [cmd2] Val: ~p", [_Val]),
ok;
({error, Id, Extra}) ->
{error, {unexpected, Id, Extra}};
@@ -4189,10 +4217,10 @@ ma_v2_inform1(MA) ->
CmdSnmpTargets =
fun(T) ->
receive
- {snmp_targets, T, [Addr]} ->
+ {snmp_targets, T, [_Addr]} ->
?DBG("ma_v2_inform1 -> "
"received expected snmp_targets "
- "~n with receiver: ~p",[Addr]),
+ "~n with receiver: ~p", [_Addr]),
ok;
{snmp_targets, T, Addrs} ->
?ERR("ma_v2_inform1 -> "
@@ -4210,16 +4238,16 @@ ma_v2_inform1(MA) ->
Cmd06 =
fun() ->
receive
- {snmp_notification, Tag03, {got_response, Addr}} ->
+ {snmp_notification, Tag03, {got_response, _Addr}} ->
?DBG("ma_v2_inform1 -> "
"received expected snmp_notification "
- "[with manager response] from: ~n ~p",[Addr]),
+ "[with manager response] from: ~n ~p", [_Addr]),
ok;
- {snmp_notification, Tag03, {no_response, Addr}} ->
+ {snmp_notification, Tag03, {no_response, _Addr}} ->
?ERR("ma_v2_inform1 -> "
"received unexpected snmp_notification "
"[without manager response] from: ~n ~p",
- [Addr]),
+ [_Addr]),
{error, no_response}
after
20000 ->
@@ -4249,16 +4277,16 @@ ma_v2_inform1(MA) ->
Cmd10 =
fun() ->
receive
- {snmp_notification, Tag07, {got_response, Addr}} ->
+ {snmp_notification, Tag07, {got_response, _Addr}} ->
?ERR("ma_v2_inform1 -> "
"received unexpected snmp_notification "
- "[with manager response] from: ~n ~p", [Addr]),
+ "[with manager response] from: ~n ~p", [_Addr]),
{error, got_response};
- {snmp_notification, Tag07, {no_response, Addr}} ->
+ {snmp_notification, Tag07, {no_response, _Addr}} ->
?DBG("ma_v2_inform1 -> "
"received expected snmp_notification "
"[without manager response] from: ~n ~p",
- [Addr]),
+ [_Addr]),
ok
after
240000 ->
@@ -4302,8 +4330,8 @@ ma_v2_inform2(MA) ->
CmdExp =
fun(ok) ->
ok;
- ({ok, Val}) ->
- ?DBG("ma_v2_inform -> [cmd2] Val: ~p", [Val]),
+ ({ok, _Val}) ->
+ ?DBG("ma_v2_inform -> [cmd2] Val: ~p", [_Val]),
ok;
({error, Id, Extra}) ->
{error, {unexpected, Id, Extra}};
@@ -4383,8 +4411,8 @@ ma_v2_inform3(MA) ->
"~n send notification: testTrapv22", [MA]),
CmdExpectInform =
- fun(No, Response) ->
- ?DBG("CmdExpectInform -> ~p: ~n~p", [No, Response]),
+ fun(_No, Response) ->
+ ?DBG("CmdExpectInform -> ~p: ~n~p", [_No, Response]),
?expect2({inform, Response},
[{[sysUpTime, 0], any},
{[snmpTrapOID, 0], ?system ++ [0,1]}])
@@ -4393,8 +4421,8 @@ ma_v2_inform3(MA) ->
CmdExp =
fun(ok) ->
ok;
- ({ok, Val}) ->
- ?DBG("CmdExp -> Val: ~p", [Val]),
+ ({ok, _Val}) ->
+ ?DBG("CmdExp -> Val: ~p", [_Val]),
ok;
({error, Id, Extra}) ->
{error, {unexpected, Id, Extra}};
@@ -4505,17 +4533,17 @@ delivery_info(Tag, Address, DeliveryResult, Extra) ->
command_handler([]) ->
ok;
-command_handler([{No, Desc, Cmd}|Rest]) ->
- ?LOG("command_handler -> command ~w: ~n ~s", [No, Desc]),
+command_handler([{_No, _Desc, Cmd}|Rest]) ->
+ ?LOG("command_handler -> command ~w: ~n ~s", [_No, _Desc]),
case (catch Cmd()) of
ok ->
- ?LOG("command_handler -> ~w: ok",[No]),
+ ?LOG("command_handler -> ~w: ok", [_No]),
command_handler(Rest);
{error, Reason} ->
- ?ERR("command_handler -> ~w error: ~n~p",[No, Reason]),
+ ?ERR("command_handler -> ~w error: ~n~p", [_No, Reason]),
?line ?FAIL(Reason);
Error ->
- ?ERR("command_handler -> ~w unexpected: ~n~p",[No, Error]),
+ ?ERR("command_handler -> ~w unexpected: ~n~p", [_No, Error]),
?line ?FAIL({unexpected_command_result, Error})
end.
@@ -5516,57 +5544,59 @@ usm_bad() ->
%% works.
%% Load all std mibs that are not loaded by default.
%%-----------------------------------------------------------------
-loop_mib(suite) -> [];
-loop_mib(Config) when is_list(Config) ->
- ?P(loop_mib),
- ?LOG("loop_mib -> initiate case",[]),
+loop_mib_1(suite) -> [];
+loop_mib_1(Config) when is_list(Config) ->
+ ?P(loop_mib_1),
+ ?LOG("loop_mib_1 -> initiate case",[]),
%% snmpa:verbosity(master_agent,debug),
%% snmpa:verbosity(mib_server,info),
- {SaNode, MgrNode, MibDir} = init_case(Config),
- ?DBG("loop_mib -> ~n"
+ {_SaNode, _MgrNode, _MibDir} = init_case(Config),
+ ?DBG("loop_mib_1 -> ~n"
"\tSaNode: ~p~n"
"\tMgrNode: ~p~n"
- "\tMibDir: ~p",[SaNode, MgrNode, MibDir]),
- ?DBG("loop_mib -> load mib SNMP-COMMUNITY-MIB",[]),
+ "\tMibDir: ~p", [_SaNode, _MgrNode, _MibDir]),
+ ?DBG("loop_mib_1 -> load mib SNMP-COMMUNITY-MIB",[]),
?line load_master_std("SNMP-COMMUNITY-MIB"),
- ?DBG("loop_mib -> load mib SNMP-MPD-MIB",[]),
+ ?DBG("loop_mib_1 -> load mib SNMP-MPD-MIB",[]),
?line load_master_std("SNMP-MPD-MIB"),
- ?DBG("loop_mib -> load mib SNMP-TARGET-MIB",[]),
+ ?DBG("loop_mib_1 -> load mib SNMP-TARGET-MIB",[]),
?line load_master_std("SNMP-TARGET-MIB"),
- ?DBG("loop_mib -> load mib SNMP-NOTIFICATION-MIB",[]),
+ ?DBG("loop_mib_1 -> load mib SNMP-NOTIFICATION-MIB",[]),
?line load_master_std("SNMP-NOTIFICATION-MIB"),
- ?DBG("loop_mib -> load mib SNMP-FRAMEWORK-MIB",[]),
+ ?DBG("loop_mib_1 -> load mib SNMP-FRAMEWORK-MIB",[]),
?line load_master_std("SNMP-FRAMEWORK-MIB"),
- ?DBG("loop_mib -> load mib SNMP-VIEW-BASED-ACM-MIB",[]),
+ ?DBG("loop_mib_1 -> load mib SNMP-VIEW-BASED-ACM-MIB",[]),
?line load_master_std("SNMP-VIEW-BASED-ACM-MIB"),
- ?DBG("loop_mib -> try",[]),
- try_test(loop_mib_1),
- ?DBG("loop_mib -> unload mib SNMP-COMMUNITY-MIB",[]),
+ ?DBG("loop_mib_1 -> try",[]),
+
+ try_test(loop_mib_1_test),
+
+ ?DBG("loop_mib_1 -> unload mib SNMP-COMMUNITY-MIB",[]),
?line unload_master("SNMP-COMMUNITY-MIB"),
- ?DBG("loop_mib -> unload mib SNMP-MPD-MIB",[]),
+ ?DBG("loop_mib_1 -> unload mib SNMP-MPD-MIB",[]),
?line unload_master("SNMP-MPD-MIB"),
- ?DBG("loop_mib -> unload mib SNMP-TARGET-MIB",[]),
+ ?DBG("loop_mib_1 -> unload mib SNMP-TARGET-MIB",[]),
?line unload_master("SNMP-TARGET-MIB"),
- ?DBG("loop_mib -> unload mib SNMP-NOTIFICATION-MIB",[]),
+ ?DBG("loop_mib_1 -> unload mib SNMP-NOTIFICATION-MIB",[]),
?line unload_master("SNMP-NOTIFICATION-MIB"),
- ?DBG("loop_mib -> unload mib SNMP-FRAMEWORK-MIB",[]),
+ ?DBG("loop_mib_1 -> unload mib SNMP-FRAMEWORK-MIB",[]),
?line unload_master("SNMP-FRAMEWORK-MIB"),
- ?DBG("loop_mib -> unload mib SNMP-VIEW-BASED-ACM-MIB",[]),
+ ?DBG("loop_mib_1 -> unload mib SNMP-VIEW-BASED-ACM-MIB",[]),
?line unload_master("SNMP-VIEW-BASED-ACM-MIB"),
%% snmpa:verbosity(master_agent,log),
%% snmpa:verbosity(mib_server,silence),
- ?LOG("loop_mib -> done",[]).
+ ?LOG("loop_mib_1 -> done",[]).
loop_mib_2(suite) -> [];
loop_mib_2(Config) when is_list(Config) ->
?P(loop_mib_2),
?LOG("loop_mib_2 -> initiate case",[]),
- {SaNode, MgrNode, MibDir} = init_case(Config),
- ?DBG("loop_mib_2 -> ~n"
+ {_SaNode, _MgrNode, _MibDir} = init_case(Config),
+ ?DBG("do_loop_mib_2 -> ~n"
"\tSaNode: ~p~n"
"\tMgrNode: ~p~n"
- "\tMibDir: ~p",[SaNode, MgrNode, MibDir]),
+ "\tMibDir: ~p", [_SaNode, _MgrNode, _MibDir]),
?DBG("loop_mib_2 -> load mibs",[]),
?line load_master_std("SNMP-COMMUNITY-MIB"),
?line load_master_std("SNMP-MPD-MIB"),
@@ -5574,7 +5604,9 @@ loop_mib_2(Config) when is_list(Config) ->
?line load_master_std("SNMP-NOTIFICATION-MIB"),
?line load_master_std("SNMP-FRAMEWORK-MIB"),
?line load_master_std("SNMP-VIEW-BASED-ACM-MIB"),
- try_test(loop_mib_2),
+
+ try_test(loop_mib_2_test),
+
?DBG("loop_mib_2 -> unload mibs",[]),
?line unload_master("SNMP-COMMUNITY-MIB"),
?line unload_master("SNMP-MPD-MIB"),
@@ -5589,18 +5621,18 @@ loop_mib_3(suite) -> [];
loop_mib_3(Config) when is_list(Config) ->
?P(loop_mib_3),
?LOG("loop_mib_3 -> initiate case",[]),
- {SaNode, MgrNode, MibDir} = init_case(Config),
+ {_SaNode, _MgrNode, _MibDir} = init_case(Config),
?DBG("loop_mib_3 -> ~n"
"\tSaNode: ~p~n"
"\tMgrNode: ~p~n"
- "\tMibDir: ~p",[SaNode, MgrNode, MibDir]),
+ "\tMibDir: ~p", [_SaNode, _MgrNode, _MibDir]),
?DBG("loop_mib_3 -> load mibs",[]),
?line load_master_std("SNMP-TARGET-MIB"),
?line load_master_std("SNMP-NOTIFICATION-MIB"),
?line load_master_std("SNMP-VIEW-BASED-ACM-MIB"),
?line load_master_std("SNMP-USER-BASED-SM-MIB"),
- try_test(loop_mib_2),
+ try_test(loop_mib_3_test),
?DBG("loop_mib_3 -> unload mibs",[]),
?line unload_master("SNMP-TARGET-MIB"),
@@ -5611,17 +5643,16 @@ loop_mib_3(Config) when is_list(Config) ->
%% Req. As many mibs all possible
-loop_mib_1() ->
- ?DBG("loop_mib_1 -> entry",[]),
+loop_mib_1_test() ->
+ ?DBG("loop_mib_1_test -> entry",[]),
N = loop_it_1([1,1], 0),
io:format(user, "found ~w varibles\n", [N]),
?line N = if N < 100 -> 100;
true -> N
end.
-
loop_it_1(Oid, N) ->
- ?DBG("loop_it_1 -> entry with~n"
+ ?DBG("loop_it_1_test -> entry with~n"
"\tOid: ~p~n"
"\tN: ~p",[Oid,N]),
case get_next_req([Oid]) of
@@ -5629,13 +5660,13 @@ loop_it_1(Oid, N) ->
error_status = noError,
error_index = 0,
varbinds = [#varbind{oid = NOid,
- value = Value}]} when NOid > Oid ->
- ?DBG("loop_it_1 -> "
+ value = _Value}]} when NOid > Oid ->
+ ?DBG("loop_it_1_test -> "
"~n NOid: ~p"
- "~n Value: ~p",[NOid, Value]),
- ?line [Value2] = get_req(1, [NOid]), % must not be same
- ?DBG("loop_it_1 -> "
- "~n Value2: ~p",[Value2]),
+ "~n Value: ~p", [NOid, _Value]),
+ ?line [_Value2] = get_req(1, [NOid]), % must not be same
+ ?DBG("loop_it_1_test -> "
+ "~n Value2: ~p", [_Value2]),
loop_it_1(NOid, N+1);
#pdu{type = 'get-response',
@@ -5648,7 +5679,7 @@ loop_it_1(Oid, N) ->
error_status = noSuchName,
error_index = 1,
varbinds = [_]} ->
- ?DBG("loop_it_1 -> done: ~p",[N]),
+ ?DBG("loop_it_1_test -> done: ~p",[N]),
N;
#pdu{type = 'get-response',
@@ -5669,14 +5700,13 @@ loop_it_1(Oid, N) ->
%% Req. As many mibs all possible
-loop_mib_2() ->
- ?DBG("loop_mib_1 -> entry",[]),
+loop_mib_2_test() ->
+ ?DBG("loop_mib_2_test -> entry",[]),
N = loop_it_2([1,1], 0),
io:format(user, "found ~w varibles\n", [N]),
?line N = if N < 100 -> 100;
true -> N
end.
-
loop_it_2(Oid, N) ->
?DBG("loop_it_2 -> entry with"
@@ -5686,22 +5716,22 @@ loop_it_2(Oid, N) ->
#pdu{type = 'get-response',
error_status = noError,
error_index = 0,
- varbinds = [#varbind{oid = NOid, value = endOfMibView}]} ->
+ varbinds = [#varbind{oid = _NOid, value = endOfMibView}]} ->
?DBG("loop_it_2 -> "
- "~n NOid: ~p",[NOid]),
+ "~n NOid: ~p", [_NOid]),
N;
#pdu{type = 'get-response',
error_status = noError,
error_index = 0,
varbinds = [#varbind{oid = NOid,
- value = Value}]} when NOid > Oid ->
+ value = _Value}]} when NOid > Oid ->
?DBG("loop_it_2 -> "
"~n NOid: ~p"
- "~n Value: ~p",[NOid, Value]),
- ?line [Value2] = get_req(1, [NOid]), % must not be same
+ "~n Value: ~p", [NOid, _Value]),
+ ?line [_Value2] = get_req(1, [NOid]), % must not be same
?DBG("loop_it_2 -> "
- "~n Value2: ~p",[Value2]),
+ "~n Value2: ~p", [_Value2]),
loop_it_2(NOid, N+1);
#pdu{type = 'get-response',
@@ -5744,6 +5774,10 @@ loop_it_2(Oid, N) ->
end.
+loop_mib_3_test() ->
+ ?DBG("loop_mib_3_test -> entry",[]),
+ loop_mib_2_test().
+
%%%-----------------------------------------------------------------
%%% Testing of reported bugs and other tickets.
@@ -6611,16 +6645,16 @@ otp8395(Config) when is_list(Config) ->
AgentNode = ?config(agent_node, Config),
AgentLogDir = ?config(agent_log_dir, Config),
OutFile = join([AgentLogDir, "otp8395.txt"]),
- {ok, LogInfo} = rpc:call(AgentNode, snmpa, log_info, []),
- ?DBG("otp8395 -> LogInfo: ~p", [LogInfo]),
+ {ok, _LogInfo} = rpc:call(AgentNode, snmpa, log_info, []),
+ ?DBG("otp8395 -> LogInfo: ~p", [_LogInfo]),
%% SyncRes = rpc:call(AgentNode, snmp, log_sync, [?audit_trail_log_name]),
%% ?DBG("otp8395 -> SyncRes: ~p", [SyncRes]),
ok = agent_log_validation(AgentNode),
- LTTRes =
+ _LTTRes =
rpc:call(AgentNode, snmpa, log_to_txt, [AgentLogDir, [], OutFile]),
- ?DBG("otp8395 -> LTTRes: ~p", [LTTRes]),
+ ?DBG("otp8395 -> LTTRes: ~p", [_LTTRes]),
?SLEEP(1000),
?DBG("otp8395 -> done", []),
@@ -6941,10 +6975,10 @@ stop_stdalone_agent(Pid) when (node(Pid) =/= node()) ->
MRef = erlang:monitor(process, Pid),
rpc:call(node(Pid), ?MODULE, stop_stdalone_agent, [Pid]),
receive
- {'DOWN', MRef, process, Pid, Info} ->
+ {'DOWN', MRef, process, Pid, _Info} ->
?DBG("received expected DOWN message "
"regarding snmp agent supervisor: "
- "~n Info: ~p", [Info]),
+ "~n Info: ~p", [_Info]),
ok
after 5000 ->
?DBG("no DOWN message "
@@ -7003,9 +7037,9 @@ do_info(MaNode) ->
tree_size_bytes,
db_memory]}],
verify_info(Info, Keys),
- OldInfo = snmpa:old_info_format(Info),
- ?DBG("info_test1 -> OldInfo: ~n~p", [OldInfo]),
- verify_old_info(OldInfo),
+ %% OldInfo = snmpa:old_info_format(Info),
+ %% ?DBG("info_test1 -> OldInfo: ~n~p", [OldInfo]),
+ %% verify_old_info(OldInfo),
ok.
verify_info([], []) ->
@@ -7048,20 +7082,20 @@ verify_subinfo(Info0, [Key|Keys]) ->
verify_subinfo(Info, Keys)
end.
-verify_old_info(Info) ->
- Keys = [vsns, subagents, loaded_mibs,
- tree_size_bytes, process_memory, db_memory],
- verify_old_info(Keys, Info).
-
-verify_old_info([], _) ->
- ok;
-verify_old_info([Key|Keys], Info) ->
- case lists:keymember(Key, 1, Info) of
- true ->
- verify_old_info(Keys, Info);
- false ->
- ?FAIL({missing_old_info, Key})
- end.
+%% verify_old_info(Info) ->
+%% Keys = [vsns, subagents, loaded_mibs,
+%% tree_size_bytes, process_memory, db_memory],
+%% verify_old_info(Keys, Info).
+
+%% verify_old_info([], _) ->
+%% ok;
+%% verify_old_info([Key|Keys], Info) ->
+%% case lists:keymember(Key, 1, Info) of
+%% true ->
+%% verify_old_info(Keys, Info);
+%% false ->
+%% ?FAIL({missing_old_info, Key})
+%% end.
%% Index String - string used in index
is(S) -> [length(S) | S].
diff --git a/lib/snmp/test/snmp_agent_test_lib.erl b/lib/snmp/test/snmp_agent_test_lib.erl
index 122289c28e..d7109253f7 100644
--- a/lib/snmp/test/snmp_agent_test_lib.erl
+++ b/lib/snmp/test/snmp_agent_test_lib.erl
@@ -299,10 +299,10 @@ call(N,M,F,A) ->
"~n Loc: ~p", [Rn, Loc]),
put(test_server_loc, Loc),
exit(Rn);
- {done, Ret, Zed} ->
+ {done, Ret, _Zed} ->
?DBG("call -> done:"
"~n Ret: ~p"
- "~n Zed: ~p", [Ret, Zed]),
+ "~n Zed: ~p", [Ret, _Zed]),
case Ret of
{error, Reason} ->
exit(Reason);
@@ -338,8 +338,8 @@ run(Mod, Func, Args, Opts) ->
CtxEngineID = snmp_misc:get_option(context_engine_id, Opts, EngineID),
Community = snmp_misc:get_option(community, Opts, "all-rights"),
?DBG("run -> start crypto app",[]),
- Crypto = ?CRYPTO_START(),
- ?DBG("run -> Crypto: ~p", [Crypto]),
+ _CryptoRes = ?CRYPTO_START(),
+ ?DBG("run -> Crypto: ~p", [_CryptoRes]),
catch snmp_test_mgr:stop(), % If we had a running mgr from a failed case
StdM = join(code:priv_dir(snmp), "mibs") ++ "/",
Vsn = get(vsn),
@@ -676,9 +676,9 @@ stop_agent(Config) when is_list(Config) ->
(catch process_info(Sup)),
(catch process_info(Par))]),
- Info = agent_info(Sup),
+ _Info = agent_info(Sup),
?DBG("stop_agent -> Agent info: "
- "~n ~p", [Info]),
+ "~n ~p", [_Info]),
stop_sup(Sup, Par),
@@ -1303,10 +1303,10 @@ get_req(Id, Vars) ->
{ok, Val} ->
?DBG("get_req -> response: ~p",[Val]),
Val;
- {error, _, {ExpFmt, ExpArg}, {ActFmt, ActArg}} ->
+ {error, _, {_ExpFmt, ExpArg}, {_ActFmt, ActArg}} ->
?DBG("get_req -> error for ~p: "
- "~n " ++ ExpFmt ++
- "~n " ++ ActFmt,
+ "~n " ++ _ExpFmt ++
+ "~n " ++ _ActFmt,
[Id] ++ ExpArg ++ ActArg),
exit({unexpected_response, ExpArg, ActArg});
Error ->
@@ -1527,9 +1527,9 @@ rewrite_target_addr_conf(Dir, NewPort) ->
case file:read_file_info(TAFile) of
{ok, _} ->
ok;
- {error, R} ->
+ {error, _R} ->
?ERR("failure reading file info of "
- "target address config file: ~p",[R]),
+ "target address config file: ~p", [_R]),
ok
end,
diff --git a/lib/snmp/test/snmp_appup_test.erl b/lib/snmp/test/snmp_appup_test.erl
index 99994a2410..021d42a978 100644
--- a/lib/snmp/test/snmp_appup_test.erl
+++ b/lib/snmp/test/snmp_appup_test.erl
@@ -63,33 +63,9 @@ end_per_group(_GroupName, Config) ->
init_per_suite(suite) -> [];
init_per_suite(doc) -> [];
init_per_suite(Config) when is_list(Config) ->
- PrivDir = ?config(priv_dir, Config),
- TopDir = filename:join(PrivDir, appup),
- case file:make_dir(TopDir) of
- ok ->
- ok;
- Error ->
- fail({failed_creating_subsuite_top_dir, Error})
- end,
- AppFile = file_name(?APPLICATION, ".app"),
- AppupFile = file_name(?APPLICATION, ".appup"),
- [{app_file, AppFile},
- {appup_file, AppupFile},
- {appup_topdir, TopDir} | Config].
+ Config.
-file_name(App, Ext) ->
- Env = init:get_arguments(),
- LibDir =
- case lists:keysearch(clearcase, 1, Env) of
- false ->
- code:lib_dir(App);
- _ ->
- ".."
- end,
- filename:join([LibDir, "ebin", atom_to_list(App) ++ Ext]).
-
-
end_per_suite(suite) -> [];
end_per_suite(doc) -> [];
end_per_suite(Config) when is_list(Config) ->
@@ -108,467 +84,6 @@ end_per_testcase(_Case, Config) when is_list(Config) ->
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
-appup_file(suite) ->
- [];
-appup_file(doc) ->
- "Perform a simple check of the appup file";
+%% Perform a simple check of the appup file
appup_file(Config) when is_list(Config) ->
- AppupFile = key1search(appup_file, Config),
- AppFile = key1search(app_file, Config),
- Modules = modules(AppFile),
- check_appup(AppupFile, Modules).
-
-modules(File) ->
- case file:consult(File) of
- {ok, [{application,snmp,Info}]} ->
- case lists:keysearch(modules,1,Info) of
- {value, {modules, Modules}} ->
- Modules;
- false ->
- fail({bad_appinfo, Info})
- end;
- Error ->
- fail({bad_appfile, Error, File})
- end.
-
-
-check_appup(AppupFile, Modules) ->
- case file:consult(AppupFile) of
- {ok, [{V, UpFrom, DownTo}]} ->
- check_appup(V, UpFrom, DownTo, Modules);
- Else ->
- fail({bad_appupfile, Else})
- end.
-
-
-check_appup(V, UpFrom, DownTo, Modules) ->
- check_version(V),
- check_depends(up, UpFrom, Modules),
- check_depends(down, DownTo, Modules),
- check_module_subset(up, UpFrom),
- check_module_subset(down, DownTo),
- ok.
-
-check_depends(_, [], _) ->
- ok;
-check_depends(UpDown, [Dep|Deps], Modules) ->
- check_depend(UpDown, Dep, Modules),
- check_depends(UpDown, Deps, Modules).
-
-
-check_depend(up = UpDown, {add_application, ?APPLICATION} = Instr, Modules) ->
- d("check_instructions(~w) -> entry with"
- "~n Instruction: ~p"
- "~n Modules: ~p", [UpDown, Instr, Modules]),
- ok;
-check_depend(down = UpDown, {remove_application, ?APPLICATION} = Instr,
- Modules) ->
- d("check_instructions(~w) -> entry with"
- "~n Instruction: ~p"
- "~n Modules: ~p", [UpDown, Instr, Modules]),
- ok;
-check_depend(UpDown, {V, Instructions}, Modules) ->
- d("check_instructions(~w) -> entry with"
- "~n V: ~p"
- "~n Modules: ~p", [UpDown, V, Modules]),
- check_version(V),
- case check_instructions(UpDown,
- Instructions, Instructions, [], [], Modules) of
- {_Good, []} ->
- ok;
- {_, Bad} ->
- fail({bad_instructions, Bad, UpDown})
- end.
-
-
-check_instructions(_, [], _, Good, Bad, _) ->
- {lists:reverse(Good), lists:reverse(Bad)};
-check_instructions(UpDown, [Instr|Instrs], AllInstr, Good, Bad, Modules) ->
- d("check_instructions(~w) -> entry with"
- "~n Instr: ~p", [UpDown,Instr]),
- case (catch check_instruction(UpDown, Instr, AllInstr, Modules)) of
- ok ->
- check_instructions(UpDown, Instrs, AllInstr,
- [Instr|Good], Bad, Modules);
- {error, Reason} ->
- check_instructions(UpDown, Instrs, AllInstr, Good,
- [{Instr, Reason}|Bad], Modules)
- end;
-check_instructions(UpDown, Instructions, _, _, _, _) ->
- fail({bad_instructions, {UpDown, Instructions}}).
-
-check_instruction(_, {restart_application, ?APPLICATION}, _, _Modules) ->
- d("check_instruction -> entry when restart_application instruction"),
- ok;
-
-%% A new module is added
-check_instruction(up, {add_module, Module}, _, Modules)
- when is_atom(Module) ->
- d("check_instruction -> entry when up-add_module instruction with"
- "~n Module: ~p", [Module]),
- check_module(Module, Modules);
-
-%% An old module is re-added
-check_instruction(down, {add_module, Module}, _, Modules)
- when is_atom(Module) ->
- d("check_instruction -> entry when down-add_module instruction with"
- "~n Module: ~p", [Module]),
- case (catch check_module(Module, Modules)) of
- {error, {unknown_module, Module, Modules}} ->
- ok;
- ok ->
- error({existing_readded_module, Module})
- end;
-
-check_instruction(up, {delete_module, Module}, _, Modules)
- when is_atom(Module) ->
- d("check_instruction -> entry when up-delete_module instruction with"
- "~n Module: ~p", [Module]),
- case (catch check_module(Module, Modules)) of
- {error, {unknown_module, Module, Modules}} ->
- ok;
- ok ->
- error({module_cannot_be_deleted, Module})
- end;
-
-%% An new module is deleted
-check_instruction(down, {delete_module, Module}, _, Modules)
- when is_atom(Module) ->
- d("check_instruction -> entry when down-delete_module instruction with"
- "~n Module: ~p", [Module]),
- check_module(Module, Modules);
-
-%% Removing a module on upgrade:
-%% - the module has been removed from the app-file.
-%% - check that no module depends on this (removed) module
-check_instruction(up, {remove, {Module, Pre, Post}}, _, Modules)
- when is_atom(Module) and is_atom(Pre) and is_atom(Post) ->
- d("check_instruction -> entry when up-remove instruction with"
- "~n Module: ~p"
- "~n Pre: ~p"
- "~n Post: ~p", [Module, Pre, Post]),
- case (catch check_module(Module, Modules)) of
- {error, {unknown_module, Module, Modules}} ->
- check_purge(Pre),
- check_purge(Post);
- ok ->
- error({existing_removed_module, Module})
- end;
-
-%% Removing a module on downgrade: the module exist
-%% in the app-file.
-check_instruction(down, {remove, {Module, Pre, Post}}, AllInstr, Modules)
- when is_atom(Module) and is_atom(Pre) and is_atom(Post) ->
- d("check_instruction -> entry when down-remove instruction with"
- "~n Module: ~p"
- "~n Pre: ~p"
- "~n Post: ~p", [Module, Pre, Post]),
- case (catch check_module(Module, Modules)) of
- ok ->
- check_purge(Pre),
- check_purge(Post),
- check_no_remove_depends(Module, AllInstr);
- {error, {unknown_module, Module, Modules}} ->
- error({nonexisting_removed_module, Module})
- end;
-
-check_instruction(_, {load_module, Module, Pre, Post, Depend},
- AllInstr, Modules)
- when is_atom(Module) and
- is_atom(Pre) and
- is_atom(Post) and
- is_list(Depend) ->
- d("check_instruction -> entry when load_module instruction with"
- "~n Module: ~p"
- "~n Pre: ~p"
- "~n Post: ~p"
- "~n Depend: ~p", [Module, Pre, Post, Depend]),
- check_module(Module, Modules),
- check_module_depend(Module, Depend, Modules),
- check_module_depend(Module, Depend, updated_modules(AllInstr, [])),
- check_purge(Pre),
- check_purge(Post);
-
-check_instruction(_, {update, Module, Change, Pre, Post, Depend},
- AllInstr, Modules)
- when is_atom(Module) and
- is_atom(Pre) and
- is_atom(Post) and
- is_list(Depend) ->
- d("check_instruction -> entry when update instruction with"
- "~n Module: ~p"
- "~n Change: ~p"
- "~n Pre: ~p"
- "~n Post: ~p"
- "~n Depend: ~p", [Module, Change, Pre, Post, Depend]),
- check_module(Module, Modules),
- check_module_depend(Module, Depend, Modules),
- check_module_depend(Module, Depend, updated_modules(AllInstr, [])),
- check_change(Change),
- check_purge(Pre),
- check_purge(Post);
-
-check_instruction(_, {update, Module, supervisor}, _, Modules)
- when is_atom(Module) ->
- d("check_instruction -> entry when supervisor update instruction with"
- "~n Module: ~p", [Module]),
- check_module(Module, Modules);
-
-check_instruction(_, {apply, {Module, Function, Args}}, _, _Modules)
- when is_atom(Module) and is_atom(Function) and is_list(Args) ->
- d("check_instruction -> entry when apply instruction with"
- "~n Module: ~p"
- "~n Function: ~p"
- "~n Args: ~p", [Module, Function, Args]),
- check_apply(Module, Function, Args);
-
-check_instruction(_, Instr, _AllInstr, _Modules) ->
- error({error, {unknown_instruction, Instr}}).
-
-%% If Module X depends on Module Y, then module Y must have an update
-%% instruction of some sort (otherwise the depend is faulty).
-updated_modules([], Modules) ->
- d("updated_modules -> entry when done with"
- "~n Modules: ~p", [Modules]),
- Modules;
-updated_modules([Instr|Instrs], Modules) ->
- d("updated_modules -> entry with"
- "~n Instr: ~p"
- "~n Modules: ~p", [Instr,Modules]),
- case instruction_module(Instr) of
- {module, Module} ->
- d("updated_modules -> Module: ~p", [Module]),
- updated_modules(Instrs, [Module|Modules]);
- no_module ->
- updated_modules(Instrs, Modules)
- end.
-
-instruction_module({add_module, Module}) ->
- {module, Module};
-instruction_module({delete_module, Module}) ->
- {module, Module};
-instruction_module({remove, {Module, _, _}}) ->
- {module, Module};
-instruction_module({load_module, Module, _, _, _}) ->
- {module, Module};
-instruction_module({update, Module, _, _, _, _}) ->
- {module, Module};
-instruction_module({update, Module, _}) ->
- {module, Module};
-instruction_module({apply, {_, _, _}}) ->
- no_module;
-instruction_module(Instr) ->
- d("instruction_module -> entry when unknown instruction with"
- "~n Instr: ~p", [Instr]),
- error({error, {unknown_instruction, Instr}}).
-
-
-%% Check that the modules handled in an instruction set for version X
-%% is a subset of the instruction set for version X-1.
-check_module_subset(Direction, Instructions) ->
- d("check_module_subset(~w) -> entry when"
- "~n Instructions: ~p", [Direction,Instructions]),
- do_check_module_subset(modules_of(Instructions)).
-
-do_check_module_subset([]) ->
- ok;
-do_check_module_subset([_]) ->
- ok;
-do_check_module_subset([{_V1, Mods1}|T]) ->
- d("do_check_module_subset -> entry with"
- "~n V1: ~s"
- "~n Mods1: ~p", [_V1, Mods1]),
- {V2, Mods2} = hd(T),
- d("do_check_module_subset -> "
- "~n V2: ~s"
- "~n Mods2: ~p", [V2, Mods2]),
- %% Check that the modules in V1 is a subset of V2
- case do_check_module_subset2(Mods1, Mods2) of
- ok ->
- do_check_module_subset(T);
- {error, Modules} ->
- fail({subset_missing_instructions, V2, Modules})
- end.
-
-do_check_module_subset2(_Mods1, [{restart_application, ?APPLICATION}]) ->
- ok;
-do_check_module_subset2(Mods1, Mods2) ->
- do_check_module_subset2(Mods1, Mods2, []).
-
-do_check_module_subset2([], _, []) ->
- ok;
-do_check_module_subset2([], _, Acc) ->
- {error, lists:reverse(Acc)};
-do_check_module_subset2([Mod|Mods], Mods2, Acc) ->
- case lists:member(Mod, Mods2) of
- true ->
- do_check_module_subset2(Mods, Mods2, Acc);
- false ->
- do_check_module_subset2(Mods, Mods2, [Mod|Acc])
- end.
-
-
-modules_of(Instructions) ->
- modules_of(Instructions, []).
-
-modules_of([], Acc) ->
- lists:reverse(Acc);
-modules_of([{_V,[{restart_application, ?APPLICATION}]}|T], Acc) ->
- modules_of(T, Acc);
-modules_of([{V,Instructions}|T], Acc) ->
- Mods = modules_of2(Instructions, []),
- modules_of(T, [{V, Mods}|Acc]).
-
-modules_of2([], Acc) ->
- lists:reverse(Acc);
-modules_of2([Instr|Instructions], Acc) ->
- d("module_of -> entry with"
- "~n Instr: ~p", [Instr]),
- case module_of(Instr) of
- {value, Mod} ->
- d("module_of -> Mod: ~p", [Mod]),
- modules_of2(Instructions, [Mod|Acc]);
- false ->
- modules_of2(Instructions, Acc)
- end.
-
-module_of({add_module, Module}) ->
- {value, Module};
-module_of({delete_module, Module}) ->
- {value, Module};
-module_of({remove, {Module, _Pre, _Post}}) ->
- {value, Module};
-module_of({load_module, Module, _Pre, _Post, _Depend}) ->
- {value, Module};
-module_of({update, Module, _Change, _Pre, _Post, _Depend}) ->
- {value, Module};
-module_of({update, Module, supervisor}) ->
- {value, Module};
-module_of(_) ->
- false.
-
-
-%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
-
-check_version(V) when is_list(V) ->
- ok;
-check_version(V) ->
- error({bad_version, V}).
-
-
-check_module(M, Modules) when is_atom(M) ->
- case lists:member(M, Modules) of
- true ->
- ok;
- false ->
- error({unknown_module, M, Modules})
- end;
-check_module(M, _) ->
- error({bad_module, M}).
-
-
-check_module_depend(M, [], _) when is_atom(M) ->
- ok;
-check_module_depend(M, Deps, Modules) when is_atom(M) and is_list(Deps) ->
- case [Dep || Dep <- Deps, lists:member(Dep, Modules) == false] of
- [] ->
- ok;
- Unknown ->
- error({unknown_depend_modules, Unknown})
- end;
-check_module_depend(_M, D, _Modules) ->
- error({bad_depend, D}).
-
-
-check_no_remove_depends(_Module, []) ->
- ok;
-check_no_remove_depends(Module, [Instr|Instrs]) ->
- check_no_remove_depend(Module, Instr),
- check_no_remove_depends(Module, Instrs).
-
-check_no_remove_depend(Module, {load_module, Mod, _Pre, _Post, Depend}) ->
- case lists:member(Module, Depend) of
- true ->
- error({removed_module_in_depend, load_module, Mod, Module});
- false ->
- ok
- end;
-check_no_remove_depend(Module, {update, Mod, _Change, _Pre, _Post, Depend}) ->
- case lists:member(Module, Depend) of
- true ->
- error({removed_module_in_depend, update, Mod, Module});
- false ->
- ok
- end;
-check_no_remove_depend(_, _) ->
- ok.
-
-
-check_change(soft) ->
- ok;
-check_change({advanced, _Something}) ->
- ok;
-check_change(Change) ->
- error({bad_change, Change}).
-
-
-check_purge(soft_purge) ->
- ok;
-check_purge(brutal_purge) ->
- ok;
-check_purge(Purge) ->
- error({bad_purge, Purge}).
-
-check_apply(Module, Function, Args) ->
- case (catch Module:module_info()) of
- Info when is_list(Info) ->
- check_exported(Function, Args, Info);
- {'EXIT', {undef, _}} ->
- error({not_existing_module, Module})
- end.
-
-check_exported(Function, Args, Info) ->
- case lists:keysearch(exports, 1, Info) of
- {value, {exports, FuncList}} ->
- Arity = length(Args),
- Arities = [A || {F, A} <- FuncList, F == Function],
- case lists:member(Arity, Arities) of
- true ->
- ok;
- false ->
- fail({not_exported_function, Function, Arity})
- end;
- _ ->
- error({bad_export, Info})
- end.
-
-
-%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
-
-error(Reason) ->
- throw({error, Reason}).
-
-fail(Reason) ->
- exit({suite_failed, Reason}).
-
-key1search(Key, L) ->
- case lists:keysearch(Key, 1, L) of
- undefined ->
- fail({not_found, Key, L});
- {value, {Key, Value}} ->
- Value
- end.
-
-%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
-
-d(F) ->
- d(F, []).
-
-d(F, A) ->
- d(true, F, A).
-
-d(true, F, A) ->
- io:format(F ++ "~n", A);
-d(_, _, _) ->
- ok.
-
+ ok = ?t:appup_test(snmp).
diff --git a/lib/snmp/test/snmp_manager_test.erl b/lib/snmp/test/snmp_manager_test.erl
index 5fe18980bc..3a654a2805 100644
--- a/lib/snmp/test/snmp_manager_test.erl
+++ b/lib/snmp/test/snmp_manager_test.erl
@@ -1,7 +1,7 @@
%%
%% %CopyrightBegin%
%%
-%% Copyright Ericsson AB 2003-2013. All Rights Reserved.
+%% Copyright Ericsson AB 2003-2014. 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
@@ -139,6 +139,8 @@
-define(NS_TIMEOUT, 10000).
+-define(DEFAULT_MNESIA_DEBUG, none).
+
%%----------------------------------------------------------------------
%% Records
@@ -173,7 +175,9 @@ end_per_suite(Config) when is_list(Config) ->
init_per_testcase(Case, Config) when is_list(Config) ->
- io:format(user, "~n~n*** INIT ~w:~w ***~n~n", [?MODULE,Case]),
+ io:format(user, "~n~n*** INIT ~w:~w ***~n~n", [?MODULE, Case]),
+ p(Case, "init_per_testcase begin when"
+ "~n Nodes: ~p~n~n", [erlang:nodes()]),
%% This version of the API, based on Addr and Port, has been deprecated
DeprecatedApiCases =
[
@@ -187,16 +191,25 @@ init_per_testcase(Case, Config) when is_list(Config) ->
simple_async_get_bulk1,
misc_async1
],
- case lists:member(Case, DeprecatedApiCases) of
- true ->
- %% ?SKIP(api_no_longer_supported);
- {skip, api_no_longer_supported};
- false ->
- init_per_testcase2(Case, Config)
- end.
+ Result =
+ case lists:member(Case, DeprecatedApiCases) of
+ true ->
+ %% ?SKIP(api_no_longer_supported);
+ {skip, api_no_longer_supported};
+ false ->
+ init_per_testcase2(Case, Config)
+ end,
+ p(Case, "init_per_testcase end when"
+ "~n Nodes: ~p"
+ "~n Result: ~p"
+ "~n~n", [Result, erlang:nodes()]),
+ Result.
init_per_testcase2(Case, Config) ->
- ?DBG("init_per_testcase2 -> ~p", [erlang:nodes()]),
+ ?DBG("init_per_testcase2 -> "
+ "~n Case: ~p"
+ "~n Config: ~p"
+ "~n Nodes: ~p", [Case, Config, erlang:nodes()]),
CaseTopDir = snmp_test_lib:init_testcase_top_dir(Case, Config),
@@ -314,6 +327,8 @@ init_per_testcase3(Case, Config) ->
end.
end_per_testcase(Case, Config) when is_list(Config) ->
+ p(Case, "end_per_testcase begin when"
+ "~n Nodes: ~p~n~n", [erlang:nodes()]),
?DBG("fin [~w] Nodes [1]: ~p", [Case, erlang:nodes()]),
Dog = ?config(watchdog, Config),
?WD_STOP(Dog),
@@ -322,6 +337,8 @@ end_per_testcase(Case, Config) when is_list(Config) ->
?DBG("fin [~w] Nodes [2]: ~p", [Case, erlang:nodes()]),
%% TopDir = ?config(top_dir, Conf2),
%% ?DEL_DIR(TopDir),
+ p(Case, "end_per_testcase end when"
+ "~n Nodes: ~p~n~n", [erlang:nodes()]),
Conf2.
end_per_testcase2(Case, Config) ->
@@ -428,10 +445,10 @@ groups() ->
{request_tests, [],
[
{group, get_tests},
- {group, get_next_tests},
+ {group, get_next_tests},
{group, set_tests},
- {group, bulk_tests},
- {group, misc_request_tests}
+ {group, bulk_tests},
+ {group, misc_request_tests}
]
},
{request_tests_mt, [],
@@ -5303,34 +5320,59 @@ init_manager(AutoInform, Config) ->
?line Node = start_manager_node(),
+ %% The point with this (try catch block) is to be
+ %% able to do some cleanup in case we fail to
+ %% start some of the apps. That is, if we fail to
+ %% start the apps (mnesia, crypto and snmp agent)
+ %% we stop the (agent) node!
- %% --
- %% Start and initiate crypto on manager node
- %%
-
- ?line ok = init_crypto(Node),
+ try
+ begin
- %%
- %% Write manager config
- %%
+ %% --
+ %% Start and initiate crypto on manager node
+ %%
+
+ ?line ok = init_crypto(Node),
+
+ %%
+ %% Write manager config
+ %%
+
+ ?line ok = write_manager_config(Config),
+
+ IRB = case AutoInform of
+ true ->
+ auto;
+ _ ->
+ user
+ end,
+ Conf = [{manager_node, Node}, {irb, IRB} | Config],
+ Vsns = [v1,v2,v3],
+ start_manager(Node, Vsns, Conf)
+ end
+ catch
+ T:E ->
+ StackTrace = ?STACK(),
+ p("Failure during manager start: "
+ "~n Error Type: ~p"
+ "~n Error: ~p"
+ "~n StackTrace: ~p", [T, E, StackTrace]),
+ %% And now, *try* to cleanup
+ (catch stop_node(Node)),
+ ?FAIL({failed_starting_manager, T, E, StackTrace})
+ end.
- ?line ok = write_manager_config(Config),
-
- IRB = case AutoInform of
- true ->
- auto;
- _ ->
- user
- end,
- Conf = [{manager_node, Node}, {irb, IRB} | Config],
- Vsns = [v1,v2,v3],
- start_manager(Node, Vsns, Conf).
-
fin_manager(Config) ->
Node = ?config(manager_node, Config),
- stop_manager(Node, Config),
- fin_crypto(Node),
- stop_node(Node),
+ StopMgrRes = stop_manager(Node),
+ StopCryptoRes = fin_crypto(Node),
+ StopNode = stop_node(Node),
+ p("fin_agent -> stop apps and (mgr node ~p) node results: "
+ "~n SNMP Mgr: ~p"
+ "~n Crypto: ~p"
+ "~n Node: ~p",
+ [Node, StopMgrRes, StopCryptoRes, StopNode]),
Config.
@@ -5352,52 +5394,93 @@ init_agent(Config) ->
?line Node = start_agent_node(),
+ %% The point with this (try catch block) is to be
+ %% able to do some cleanup in case we fail to
+ %% start some of the apps. That is, if we fail to
+ %% start the apps (mnesia, crypto and snmp agent)
+ %% we stop the (agent) node!
- %% --
- %% Start and initiate mnesia on agent node
- %%
-
- ?line ok = init_mnesia(Node, Dir),
-
-
- %% --
- %% Start and initiate crypto on agent node
- %%
-
- ?line ok = init_crypto(Node),
-
-
- %%
- %% Write agent config
- %%
-
- Vsns = [v1,v2],
- ?line ok = write_agent_config(Vsns, Config),
-
- Conf = [{agent_node, Node},
- {mib_dir, MibDir} | Config],
+ try
+ begin
+
+ %% --
+ %% Start and initiate mnesia on agent node
+ %%
+
+ ?line ok = init_mnesia(Node, Dir, ?config(mnesia_debug, Config)),
+
+
+ %% --
+ %% Start and initiate crypto on agent node
+ %%
+
+ ?line ok = init_crypto(Node),
+
+
+ %%
+ %% Write agent config
+ %%
+
+ Vsns = [v1,v2],
+ ?line ok = write_agent_config(Vsns, Config),
+
+ Conf = [{agent_node, Node},
+ {mib_dir, MibDir} | Config],
- %%
- %% Start the agent
- %%
-
- start_agent(Node, Vsns, Conf).
+ %%
+ %% Start the agent
+ %%
+
+ start_agent(Node, Vsns, Conf)
+ end
+ catch
+ T:E ->
+ StackTrace = ?STACK(),
+ p("Failure during agent start: "
+ "~n Error Type: ~p"
+ "~n Error: ~p"
+ "~n StackTrace: ~p", [T, E, StackTrace]),
+ %% And now, *try* to cleanup
+ (catch stop_node(Node)),
+ ?FAIL({failed_starting_agent, T, E, StackTrace})
+ end.
+
fin_agent(Config) ->
Node = ?config(agent_node, Config),
- stop_agent(Node, Config),
- fin_crypto(Node),
- fin_mnesia(Node),
- stop_node(Node),
+ StopAgentRes = stop_agent(Node),
+ StopCryptoRes = fin_crypto(Node),
+ StopMnesiaRes = fin_mnesia(Node),
+ StopNode = stop_node(Node),
+ p("fin_agent -> stop apps and (agent node ~p) node results: "
+ "~n SNMP Agent: ~p"
+ "~n Crypto: ~p"
+ "~n Mnesia: ~p"
+ "~n Node: ~p",
+ [Node, StopAgentRes, StopCryptoRes, StopMnesiaRes, StopNode]),
Config.
-init_mnesia(Node, Dir) ->
+init_mnesia(Node, Dir, MnesiaDebug)
+ when ((MnesiaDebug =/= none) andalso
+ (MnesiaDebug =/= debug) andalso (MnesiaDebug =/= trace)) ->
+ init_mnesia(Node, Dir, ?DEFAULT_MNESIA_DEBUG);
+init_mnesia(Node, Dir, MnesiaDebug) ->
?DBG("init_mnesia -> load application mnesia", []),
?line ok = load_mnesia(Node),
?DBG("init_mnesia -> application mnesia: set_env dir: ~n~p",[Dir]),
?line ok = set_mnesia_env(Node, dir, filename:join(Dir, "mnesia")),
+ %% Just in case, only set (known to be) valid values for debug
+ if
+ ((MnesiaDebug =:= debug) orelse (MnesiaDebug =:= trace)) ->
+ ?DBG("init_mnesia -> application mnesia: set_env debug: ~w",
+ [MnesiaDebug]),
+ ?line ok = set_mnesia_env(Node, debug, MnesiaDebug);
+ true ->
+ ok
+ end,
+
?DBG("init_mnesia -> create mnesia schema",[]),
?line case create_schema(Node) of
ok ->
@@ -5434,25 +5517,89 @@ fin_crypto(Node) ->
%% -- Misc application wrapper functions --
-load_app(Node, App) when (Node =:= node()) andalso is_atom(App) ->
- application:load(App);
-load_app(Node, App) when is_atom(App) ->
- rcall(Node, application, load, [App]).
-
-start_app(Node, App) when (Node =:= node()) andalso is_atom(App) ->
- application:start(App);
+load_app(Node, App) ->
+ VerifySuccess = fun(ok) ->
+ ok;
+ ({error, {already_loaded, LoadedApp}}) when (LoadedApp =:= App) ->
+ ok;
+ ({error, Reason}) ->
+ p("failed loading app ~w on ~p: "
+ "~n ~p", [App, Node, Reason]),
+ ?FAIL({failed_load, Node, App, Reason})
+ end,
+ do_load_app(Node, App, VerifySuccess).
+
+do_load_app(Node, App, VerifySuccess)
+ when (Node =:= node()) andalso is_atom(App) ->
+ %% Local app
+ exec(fun() -> application:load(App) end, VerifySuccess);
+do_load_app(Node, App, VerifySuccess) ->
+ %% Remote app
+ exec(fun() -> rcall(Node, application, load, [App]) end, VerifySuccess).
+
+
start_app(Node, App) ->
- rcall(Node, application, start, [App]).
+ VerifySuccess = fun(ok) ->
+ ok;
+ ({error, {already_started, LoadedApp}}) when (LoadedApp =:= App) ->
+ ok;
+ ({error, Reason}) ->
+ p("failed starting app ~w on ~p: "
+ "~n ~p", [App, Node, Reason]),
+ ?FAIL({failed_start, Node, App, Reason})
+ end,
+ start_app(Node, App, VerifySuccess).
+
+start_app(Node, App, VerifySuccess)
+ when (Node =:= node()) andalso is_atom(App) ->
+ exec(fun() -> application:start(App) end, VerifySuccess);
+start_app(Node, App, VerifySuccess) ->
+ exec(fun() -> rcall(Node, application, start, [App]) end, VerifySuccess).
+
+
+stop_app(Node, App) ->
+ VerifySuccess = fun(ok) ->
+ ok;
+ ({error, {not_started, LoadedApp}}) when (LoadedApp =:= App) ->
+ ok;
+ ({error, Reason}) ->
+ p("failed stopping app ~w on ~p: "
+ "~n ~p", [App, Node, Reason]),
+ ?FAIL({failed_stop, Node, App, Reason})
+ end,
+ stop_app(Node, App, VerifySuccess).
+
+stop_app(Node, App, VerifySuccess)
+ when (Node =:= node()) andalso is_atom(App) ->
+ exec(fun() -> application:stop(App) end, VerifySuccess);
+stop_app(Node, App, VerifySuccess) when is_atom(App) ->
+ exec(fun() -> rcall(Node, application, stop, [App]) end, VerifySuccess).
+
+
+set_app_env(Node, App, Key, Val) ->
+ VerifySuccess = fun(ok) ->
+ ok;
+ ({error, Reason}) ->
+ p("failed setting app ~w env on ~p"
+ "~n Key: ~p"
+ "~n Val: ~p"
+ "~n Reason: ~p"
+ "~n ~p", [App, Node, Key, Val, Reason]),
+ ?FAIL({failed_set_app_env,
+ Node, App, Key, Val, Reason})
+ end,
+ set_app_env(Node, App, Key, Val, VerifySuccess).
-stop_app(Node, App) when (Node =:= node()) andalso is_atom(App) ->
- application:stop(App);
-stop_app(Node, App) when is_atom(App) ->
- rcall(Node, application, stop, [App]).
+set_app_env(Node, App, Key, Val, VerifySuccess)
+ when (Node =:= node()) andalso is_atom(App) ->
+ exec(fun() -> application:set_env(App, Key, Val) end, VerifySuccess);
+set_app_env(Node, App, Key, Val, VerifySuccess) when is_atom(App) ->
+ exec(fun() -> rcall(Node, application, set_env, [App, Key, Val]) end,
+ VerifySuccess).
-set_app_env(Node, App, Key, Val) when (Node =:= node()) andalso is_atom(App) ->
- application:set_env(App, Key, Val);
-set_app_env(Node, App, Key, Val) when is_atom(App) ->
- rcall(Node, application, set_env, [App, Key, Val]).
+
+exec(Cmd, VerifySuccess) ->
+ VerifySuccess(Cmd()).
%% -- Misc snmp wrapper functions --
@@ -5900,9 +6047,9 @@ start_manager(Node, Vsns, Conf0, _Opts) ->
Conf0.
-stop_manager(Node, Conf) ->
- stop_snmp(Node),
- Conf.
+stop_manager(Node) ->
+ stop_snmp(Node).
+
%% -- Misc agent wrapper functions --
@@ -5951,9 +6098,8 @@ start_agent(Node, Vsns, Conf0, _Opts) ->
?line ok = start_snmp(Node),
Conf0.
-stop_agent(Node, Conf) ->
- stop_snmp(Node),
- Conf.
+stop_agent(Node) ->
+ stop_snmp(Node).
agent_load_mib(Node, Mib) ->
rcall(Node, snmpa, load_mibs, [[Mib]]).
@@ -6015,17 +6161,18 @@ stop_node(Node) ->
rpc:cast(Node, erlang, halt, []),
await_stopped(Node, 5).
-await_stopped(_, 0) ->
+await_stopped(Node, 0) ->
+ p("await_stopped -> ~p still exist: giving up", [Node]),
ok;
await_stopped(Node, N) ->
Nodes = erlang:nodes(),
case lists:member(Node, Nodes) of
true ->
- ?DBG("[~w] ~p still exist", [N, Node]),
+ p("await_stopped -> ~p still exist: ~w", [Node, N]),
?SLEEP(1000),
await_stopped(Node, N-1);
false ->
- ?DBG("[~w] ~p gone", [N, Node]),
+ p("await_stopped -> ~p gone: ~w", [Node, N]),
ok
end.
@@ -6271,7 +6418,7 @@ p(F, A) ->
p(TName, F, A) ->
io:format("*** [~w][~s] ***"
- "~n" ++ F ++ "~n", [TName, formated_timestamp()|A]).
+ "~n " ++ F ++ "~n", [TName, formated_timestamp()|A]).
formated_timestamp() ->
snmp_test_lib:formated_timestamp().
diff --git a/lib/snmp/test/snmp_test_manager.erl b/lib/snmp/test/snmp_test_manager.erl
index 925ae77ab5..6d8673eecd 100644
--- a/lib/snmp/test/snmp_test_manager.erl
+++ b/lib/snmp/test/snmp_test_manager.erl
@@ -56,7 +56,7 @@
-export([init/1, handle_call/3, handle_cast/2, handle_info/2,
code_change/3, terminate/2]).
--record(state, {mgr, parent, req, agent_target_name}).
+-record(state, {parent, req, agent_target_name}).
-define(SERVER, ?MODULE).
-define(USER, ?MODULE).
@@ -130,10 +130,10 @@ init([Parent, Opts]) ->
do_init(Opts) ->
{MgrDir, MgrConf, MgrOpts, AgentTargetName, AgentConf} = parse_opts(Opts),
ok = snmp_config:write_manager_config(MgrDir, "", MgrConf),
- {ok, Pid} = snmpm:start_link(MgrOpts),
+ ok = snmpm:start_link(MgrOpts),
ok = snmpm:register_user(?USER, ?MODULE, self()),
ok = snmpm:register_agent(?USER, AgentTargetName, AgentConf),
- {ok, #state{mgr = Pid, agent_target_name = AgentTargetName}}.
+ {ok, #state{agent_target_name = AgentTargetName}}.
parse_opts(Opts) ->
diff --git a/lib/snmp/test/snmp_test_mgr.erl b/lib/snmp/test/snmp_test_mgr.erl
index 40fcbce8f1..d4eb00ff91 100644
--- a/lib/snmp/test/snmp_test_mgr.erl
+++ b/lib/snmp/test/snmp_test_mgr.erl
@@ -657,7 +657,8 @@ make_vb(Oid) ->
#varbind{oid = Oid, variabletype = 'NULL', value = 'NULL'}.
make_request_id() ->
- random:uniform(16#FFFFFFF-1).
+ %% random:uniform(16#FFFFFFF-1).
+ snmp_test_mgr_counter_server:increment(mgr_request_id, 1, 1, 2147483647).
echo_pdu(PDU, MiniMIB) ->
io:format("~s", [snmp_misc:format_pdu(PDU, MiniMIB)]).
diff --git a/lib/snmp/test/snmp_test_mgr_counter_server.erl b/lib/snmp/test/snmp_test_mgr_counter_server.erl
new file mode 100644
index 0000000000..db31e0380b
--- /dev/null
+++ b/lib/snmp/test/snmp_test_mgr_counter_server.erl
@@ -0,0 +1,152 @@
+%%
+%% %CopyrightBegin%
+%%
+%% Copyright Ericsson AB 2014-2014. 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%
+%%
+
+%%
+%% The reason for this (test) counter server is that the
+%% agent test suite is implemented in such a way that the
+%% agent is started once and then used for several test cases.
+%% Each request is given a request id which *was* generated using
+%% random! It is therefor possible, although unlikely, that a
+%% request may get a request id that has recently been used,
+%% which will cause the agent to silently reject the request.
+%% For this reason, we start this server at the start of the
+%% agent suite and stop it at the end and all request ids are
+%% generated by this server.
+%%
+
+-module(snmp_test_mgr_counter_server).
+
+-export([start/0, stop/0, increment/4]).
+
+-define(SERVER, ?MODULE).
+-define(TAB, snmp_test_mgr_counter_tab).
+
+
+%%%-------------------------------------------------------------------
+%%% API
+%%%-------------------------------------------------------------------
+
+-spec start() -> ok.
+
+start() ->
+ Parent = self(),
+ ReqIdServer = spawn(fun() -> init(Parent) end),
+ receive
+ {ReqIdServer, ok} ->
+ ok;
+ {ReqIdServer, {error, Reason}} ->
+ exit({failed_starting_counter_server, Reason})
+ after 5000 ->
+ exit(ReqIdServer, kill), % Cleanup, just in case
+ exit({failed_starting_counter_server, timeout})
+ end.
+
+-spec stop() -> {ok, Counters :: list()} | {error, Reason :: term()}.
+
+stop() ->
+ request(stop).
+
+
+-spec increment(Counter :: atom(),
+ Initial :: non_neg_integer(),
+ Increment :: pos_integer(),
+ Max :: pos_integer()) ->
+ Next :: pos_integer().
+
+increment(Counter, Initial, Increment, Max) ->
+ Request = {increment, Counter, Initial, Increment, Max},
+ case request(Request) of
+ {ok, ReqId} ->
+ ReqId;
+ {error, Reason} ->
+ exit(Reason)
+ end.
+
+
+request(Request) ->
+ Id = make_ref(),
+ Msg = {self(), Id, Request},
+ try
+ begin
+ global:send(?SERVER, Msg),
+ receive
+ {reply, Id, Reply} ->
+ {ok, Reply}
+ end
+ end
+ catch
+ T:E ->
+ {error, {T, E}}
+ end.
+
+
+%%%-------------------------------------------------------------------
+%%% Internal functions
+%%%-------------------------------------------------------------------
+
+init(Parent) ->
+ p("starting"),
+ case global:register_name(?SERVER, self()) of
+ yes ->
+ p("name registration ok"),
+ Parent ! {self(), ok};
+ no ->
+ p("name registration failed"),
+ Parent ! {self(), registration_failed},
+ exit(registration_failed)
+ end,
+ ets:new(?TAB, [set, named_table, {keypos, 1}]),
+ loop().
+
+loop() ->
+ receive
+ {From, Id, {increment, Counter, Initial, Increment, Max}} ->
+ Position = 2,
+ Threshold = Max,
+ SetValue = Initial,
+ UpdateOp = {Position, Increment, Threshold, SetValue},
+ NextVal =
+ try ets:update_counter(?TAB, Counter, UpdateOp) of
+ Next when is_integer(Next) ->
+ p("increment ~w: (next) ~w", [Counter, Next]),
+ Next
+ catch
+ error:badarg ->
+ %% Oups, first time
+ p("increment ~w: (initial) ~w", [Counter, Initial]),
+ ets:insert(?TAB, {Counter, Initial}),
+ Initial
+ end,
+ From ! {reply, Id, NextVal},
+ loop();
+
+ {From, Id, stop} ->
+ p("stop"),
+ Counters = ets:tab2list(?TAB),
+ From ! {reply, Id, Counters},
+ exit(normal)
+ end.
+
+
+p(F) ->
+ p(F, []).
+
+p(F, A) ->
+ io:format("*** [~s] COUNTER-SERVER [~w] " ++ F ++ "~n",
+ [snmp_test_lib:formated_timestamp(), self() | A]).
diff --git a/lib/snmp/vsn.mk b/lib/snmp/vsn.mk
index 70f7c2b19a..04c3cc9392 100644
--- a/lib/snmp/vsn.mk
+++ b/lib/snmp/vsn.mk
@@ -2,7 +2,7 @@
# %CopyrightBegin%
#
-# Copyright Ericsson AB 1997-2013. All Rights Reserved.
+# Copyright Ericsson AB 1997-2014. 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
@@ -18,6 +18,6 @@
# %CopyrightEnd%
APPLICATION = snmp
-SNMP_VSN = 4.25
+SNMP_VSN = 4.25.1
PRE_VSN =
APP_VSN = "$(APPLICATION)-$(SNMP_VSN)$(PRE_VSN)"
diff --git a/lib/ssh/doc/src/notes.xml b/lib/ssh/doc/src/notes.xml
index 0d88cbda7a..84d5e5c86e 100644
--- a/lib/ssh/doc/src/notes.xml
+++ b/lib/ssh/doc/src/notes.xml
@@ -4,7 +4,7 @@
<chapter>
<header>
<copyright>
- <year>2004</year><year>2013</year>
+ <year>2004</year><year>2014</year>
<holder>Ericsson AB. All Rights Reserved.</holder>
</copyright>
<legalnotice>
@@ -29,6 +29,176 @@
<file>notes.xml</file>
</header>
+<section><title>Ssh 3.0.2</title>
+
+ <section><title>Fixed Bugs and Malfunctions</title>
+ <list>
+ <item>
+ <p>
+ Fixed timeout bug in ssh:connect.</p>
+ <p>
+ Own Id: OTP-11908</p>
+ </item>
+ </list>
+ </section>
+
+
+ <section><title>Improvements and New Features</title>
+ <list>
+ <item>
+ <p>
+ Option <c>max_sessions</c> added to
+ <c>ssh:daemon/{2,3}</c>. This option, if set, limits the
+ number of simultaneous connections accepted by the
+ daemon.</p>
+ <p>
+ Own Id: OTP-11885</p>
+ </item>
+ </list>
+ </section>
+
+</section>
+
+<section><title>Ssh 3.0.1</title>
+
+ <section><title>Fixed Bugs and Malfunctions</title>
+ <list>
+ <item>
+ <p>
+ Fixes the problem that ssh_cli in some cases could delay
+ the prompt if a tty was not requested by the client.</p>
+ <p>
+ Own Id: OTP-10732</p>
+ </item>
+ <item>
+ <p>
+ The variable NewCol is now correctly calculated allowing
+ for tab-completion of function calls even when preceded
+ with blank space (Thanks to Alexander Demidenko)</p>
+ <p>
+ Own Id: OTP-11566</p>
+ </item>
+ <item>
+ <p>
+ Fix incorrect dialyzer spec and types, also enhance
+ documentation. </p>
+ <p>
+ Thanks to Ayaz Tuncer.</p>
+ <p>
+ Own Id: OTP-11627</p>
+ </item>
+ <item>
+ <p>
+ Fixed a bug when ssh:exec executes a linux command on a
+ linux ssh daemon. If the result is sent back from
+ standard error, the length information was not stripped
+ off correctly.</p>
+ <p>
+ Own Id: OTP-11667</p>
+ </item>
+ <item>
+ <p>
+ Fixed a bug with the ssh file 'known_hosts' which made
+ the file grow with many equal entries.</p>
+ <p>
+ Own Id: OTP-11671</p>
+ </item>
+ <item>
+ <p>
+ Some local implementations of removing the last element
+ from a list are replaced by <c>lists:droplast/1</c>. Note
+ that this requires at least <c>stdlib-2.0</c>, which is
+ the stdlib version delivered in OTP 17.0. (Thanks to Hans
+ Svensson)</p>
+ <p>
+ Own Id: OTP-11678</p>
+ </item>
+ <item>
+ <p>
+ Bug fix for <c>ssh:daemon/2,3</c> so that the failfun is
+ called when it should.</p>
+ <p>
+ Own Id: OTP-11680</p>
+ </item>
+ <item>
+ <p>
+ Fixed bug which crashed ssh when SSH_MSG_KEX_DH_GEX_GROUP
+ is received. This could cause a vm-crash for eheap_alloc
+ during garbage collect.</p>
+ <p>
+ Own Id: OTP-11696 Aux Id: 12547, 12532 </p>
+ </item>
+ <item>
+ <p>
+ Fixes a bug that breaks keyboard-interactive
+ authentication. Thanks to Simon Cornish for reporting and
+ suggesting a fix.</p>
+ <p>
+ Own Id: OTP-11698</p>
+ </item>
+ <item>
+ <p>
+ dialyzer specs are now correct for <c>ssh:start/0</c>,
+ <c>ssh:start/1</c>, <c>ssh:stop/0</c> and
+ <c>ssh_connection_handler:open_channel/5</c>. (Thanks to
+ Johannes Weißl )</p>
+ <p>
+ Own Id: OTP-11705</p>
+ </item>
+ <item>
+ <p>
+ Application upgrade (appup) files are corrected for the
+ following applications: </p>
+ <p>
+ <c>asn1, common_test, compiler, crypto, debugger,
+ dialyzer, edoc, eldap, erl_docgen, et, eunit, gs, hipe,
+ inets, observer, odbc, os_mon, otp_mibs, parsetools,
+ percept, public_key, reltool, runtime_tools, ssh,
+ syntax_tools, test_server, tools, typer, webtool, wx,
+ xmerl</c></p>
+ <p>
+ A new test utility for testing appup files is added to
+ test_server. This is now used by most applications in
+ OTP.</p>
+ <p>
+ (Thanks to Tobias Schlager)</p>
+ <p>
+ Own Id: OTP-11744</p>
+ </item>
+ <item>
+ <p>
+ Fixed dialyzer warning for <c>ssh_connection:send</c>.</p>
+ <p>
+ Own Id: OTP-11821</p>
+ </item>
+ <item>
+ <p>
+ <c>ssh:daemon/2,3</c> : Added options
+ <c>negotiation_timeout</c> and <c>parallel_login</c> to
+ tune the authentication behaviour.</p>
+ <p>
+ Own Id: OTP-11823</p>
+ </item>
+ </list>
+ </section>
+
+
+ <section><title>Improvements and New Features</title>
+ <list>
+ <item>
+ <p>
+ Ssh now fully supports unicode filenames, filecontents,
+ shell and cli. Please note that the underlying os and
+ emulator must also give support for unicode. You may want
+ to start the emulator with "<c>erl +fnu</c>" on Linux.</p>
+ <p>
+ Own Id: OTP-10953</p>
+ </item>
+ </list>
+ </section>
+
+</section>
+
<section><title>Ssh 3.0</title>
<section><title>Fixed Bugs and Malfunctions</title>
diff --git a/lib/ssh/doc/src/ssh.xml b/lib/ssh/doc/src/ssh.xml
index 679ef9bc19..5a141ced3c 100644
--- a/lib/ssh/doc/src/ssh.xml
+++ b/lib/ssh/doc/src/ssh.xml
@@ -38,6 +38,8 @@
<item>Supported SSH version is 2.0 </item>
<item>Supported MAC algorithms: hmac-sha1</item>
<item>Supported encryption algorithms: aes128-cb and 3des-cbc</item>
+ <item>Supports unicode filenames if the emulator and the underlaying OS supports it. See the DESCRIPTION section in <seealso marker="kernel:file">file</seealso> for information about this subject</item>
+ <item>Supports unicode in shell and cli</item>
</list>
</section>
@@ -302,6 +304,36 @@
<c><![CDATA[true]]></c> if the password is valid and
<c><![CDATA[false]]></c> otherwise.</p>
</item>
+
+ <tag><c><![CDATA[{negotiation_timeout, integer()}]]></c></tag>
+ <item>
+ <p>Max time in milliseconds for the authentication negotiation. The default value is 2 minutes. If the client fails to login within this time, the connection is closed.
+ </p>
+ </item>
+
+ <tag><c><![CDATA[{max_sessions, pos_integer()}]]></c></tag>
+ <item>
+ <p>The maximum number of simultaneous sessions that are accepted at any time for this daemon. This includes sessions that are being authorized. So if set to <c>N</c>, and <c>N</c> clients have connected but not started the login process, the <c>N+1</c> connection attempt will be aborted. If <c>N</c> connections are authenticated and still logged in, no more loggins will be accepted until one of the existing ones log out.
+ </p>
+ <p>The counter is per listening port, so if two daemons are started, one with <c>{max_sessions,N}</c> and the other with <c>{max_sessions,M}</c> there will be in total <c>N+M</c> connections accepted for the whole ssh application.
+ </p>
+ <p>Note that if <c>parallel_login</c> is <c>false</c>, only one client at a time may be in the authentication phase.
+ </p>
+ <p>As default, the option is not set. This means that the number is not limited.
+ </p>
+ </item>
+
+ <tag><c><![CDATA[{parallel_login, boolean()}]]></c></tag>
+ <item>
+ <p>If set to false (the default value), only one login is handled a time. If set to true, an unlimited number of login attempts will be allowed simultanously.
+ </p>
+ <p>If the <c>max_sessions</c> option is set to <c>N</c> and <c>parallel_login</c> is set to <c>true</c>, the max number of simultaneous login attempts at any time is limited to <c>N-K</c> where <c>K</c> is the number of authenticated connections present at this daemon.
+ </p>
+ <warning>
+ <p>Do not enable <c>parallel_logins</c> without protecting the server by other means, for example the <c>max_sessions</c> option or a firewall configuration. If set to <c>true</c>, there is no protection against DOS attacks.</p>
+ </warning>
+ </item>
+
<tag><c><![CDATA[{key_cb, atom()}]]></c></tag>
<item>
<p>Module implementing the behaviour <seealso marker="ssh_server_key_api">ssh_server_key_api</seealso>.
@@ -365,8 +397,11 @@
</func>
<func>
- <name>stop() -> ok </name>
+ <name>stop() -> ok | {error, Reason}</name>
<fsummary>Stops the SSH application.</fsummary>
+ <type>
+ <v>Reason = term()</v>
+ </type>
<desc>
<p>Stops the SSH application. See also
<seealso marker="kernel:application">application(3)</seealso></p>
diff --git a/lib/ssh/doc/src/using_ssh.xml b/lib/ssh/doc/src/using_ssh.xml
index 4d73366f5e..9ab71260d3 100644
--- a/lib/ssh/doc/src/using_ssh.xml
+++ b/lib/ssh/doc/src/using_ssh.xml
@@ -33,7 +33,7 @@
all needed applications (crypto, public_key and ssh). All examples
are run in an Erlang shell, or in a bash shell using openssh to
illustrate how the erlang ssh application can be used. The
- exampels are run as the user otptest on a local network where the
+ examples are run as the user otptest on a local network where the
user is authorized to login in over ssh to the host "tarlop". If
nothing else is stated it is persumed that the otptest user has an
entry in tarlop's authorized_keys file (may log in via ssh without
@@ -88,7 +88,7 @@
[...]
</code>
- <p>Create the file /tmp/otptest_user/.ssh/authrized_keys and add the content
+ <p>Create the file /tmp/otptest_user/.ssh/authorized_keys and add the content
of /tmp/otptest_user/.ssh/id_rsa.pub Now we can do</p>
<code type="erl">
diff --git a/lib/ssh/src/ssh.app.src b/lib/ssh/src/ssh.app.src
index 74d7293be0..e0a51b3574 100644
--- a/lib/ssh/src/ssh.app.src
+++ b/lib/ssh/src/ssh.app.src
@@ -38,6 +38,8 @@
{registered, []},
{applications, [kernel, stdlib, crypto, public_key]},
{env, []},
- {mod, {ssh_app, []}}]}.
+ {mod, {ssh_app, []}},
+ {runtime_dependencies, ["stdlib-2.0","public_key-0.22","kernel-3.0",
+ "erts-6.0","crypto-3.3"]}]}.
diff --git a/lib/ssh/src/ssh.appup.src b/lib/ssh/src/ssh.appup.src
index 32f7cc470b..42eb2167e0 100644
--- a/lib/ssh/src/ssh.appup.src
+++ b/lib/ssh/src/ssh.appup.src
@@ -1,7 +1,7 @@
-%%
+%% -*- erlang -*-
%% %CopyrightBegin%
%%
-%% Copyright Ericsson AB 2004-2013. All Rights Reserved.
+%% Copyright Ericsson AB 2004-2014. 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
@@ -19,13 +19,13 @@
{"%VSN%",
[
- {<<"2.1\\.*">>, [{restart_application, ssh}]},
- {<<"2.0\\.*">>, [{restart_application, ssh}]},
- {<<"1\\.*">>, [{restart_application, ssh}]}
+ {"3.0.1", [{load_module, ssh, soft_purge, soft_purge, []},
+ {load_module, ssh_acceptor, soft_purge, soft_purge, []}]},
+ {<<".*">>, [{restart_application, ssh}]}
],
[
- {<<"2.1\\.*">>,[{restart_application, ssh}]},
- {<<"2.0\\.*">>, [{restart_application, ssh}]},
- {<<"1\\.*">>, [{restart_application, ssh}]}
+ {"3.0.1", [{load_module, ssh, soft_purge, soft_purge, []},
+ {load_module, ssh_acceptor, soft_purge, soft_purge, []}]},
+ {<<".*">>, [{restart_application, ssh}]}
]
}.
diff --git a/lib/ssh/src/ssh.erl b/lib/ssh/src/ssh.erl
index 2685b1553b..240de69eff 100644
--- a/lib/ssh/src/ssh.erl
+++ b/lib/ssh/src/ssh.erl
@@ -1,7 +1,7 @@
-%%
+%
%% %CopyrightBegin%
%%
-%% Copyright Ericsson AB 2004-2013. All Rights Reserved.
+%% Copyright Ericsson AB 2004-2014. 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
@@ -32,8 +32,8 @@
shell/1, shell/2, shell/3]).
%%--------------------------------------------------------------------
--spec start() -> ok.
--spec start(permanent | transient | temporary) -> ok.
+-spec start() -> ok | {error, term()}.
+-spec start(permanent | transient | temporary) -> ok | {error, term()}.
%%
%% Description: Starts the ssh application. Default type
%% is temporary. see application(3)
@@ -51,7 +51,7 @@ start(Type) ->
application:start(ssh, Type).
%%--------------------------------------------------------------------
--spec stop() -> ok.
+-spec stop() -> ok | {error, term()}.
%%
%% Description: Stops the ssh application.
%%--------------------------------------------------------------------
@@ -59,8 +59,8 @@ stop() ->
application:stop(ssh).
%%--------------------------------------------------------------------
--spec connect(string(), integer(), proplists:proplists()) -> {ok, pid()} | {error, term()}.
--spec connect(string(), integer(), proplists:proplists(), timeout()) -> {ok, pid()} | {error, term()}.
+-spec connect(string(), integer(), proplists:proplist()) -> {ok, pid()} | {error, term()}.
+-spec connect(string(), integer(), proplists:proplist(), timeout()) -> {ok, pid()} | {error, term()}.
%%
%% Description: Starts an ssh connection.
%%--------------------------------------------------------------------
@@ -73,8 +73,9 @@ connect(Host, Port, Options, Timeout) ->
{SocketOptions, SshOptions} ->
{_, Transport, _} = TransportOpts =
proplists:get_value(transport, Options, {tcp, gen_tcp, tcp_closed}),
+ ConnectionTimeout = proplists:get_value(connect_timeout, Options, infinity),
Inet = proplists:get_value(inet, SshOptions, inet),
- try Transport:connect(Host, Port, [ {active, false}, Inet | SocketOptions], Timeout) of
+ try Transport:connect(Host, Port, [ {active, false}, Inet | SocketOptions], ConnectionTimeout) of
{ok, Socket} ->
Opts = [{user_pid, self()}, {host, Host} | fix_idle_time(SshOptions)],
ssh_connection_handler:start_connection(client, Socket, Opts, Timeout);
@@ -332,6 +333,14 @@ handle_option([{idle_time, _} = Opt | Rest], SocketOptions, SshOptions) ->
handle_option(Rest, SocketOptions, [handle_ssh_option(Opt) | SshOptions]);
handle_option([{rekey_limit, _} = Opt|Rest], SocketOptions, SshOptions) ->
handle_option(Rest, SocketOptions, [handle_ssh_option(Opt) | SshOptions]);
+handle_option([{max_sessions, _} = Opt|Rest], SocketOptions, SshOptions) ->
+ handle_option(Rest, SocketOptions, [handle_ssh_option(Opt) | SshOptions]);
+handle_option([{negotiation_timeout, _} = Opt|Rest], SocketOptions, SshOptions) ->
+ handle_option(Rest, SocketOptions, [handle_ssh_option(Opt) | SshOptions]);
+handle_option([{parallel_login, _} = Opt|Rest], SocketOptions, SshOptions) ->
+ handle_option(Rest, SocketOptions, [handle_ssh_option(Opt) | SshOptions]);
+handle_option([parallel_login|Rest], SocketOptions, SshOptions) ->
+ handle_option(Rest, SocketOptions, [handle_ssh_option({parallel_login,true}) | SshOptions]);
handle_option([Opt | Rest], SocketOptions, SshOptions) ->
handle_option(Rest, [handle_inet_option(Opt) | SocketOptions], SshOptions).
@@ -360,6 +369,12 @@ handle_ssh_option({pref_public_key_algs, Value} = Opt) when is_list(Value), leng
end;
handle_ssh_option({connect_timeout, Value} = Opt) when is_integer(Value); Value == infinity ->
Opt;
+handle_ssh_option({max_sessions, Value} = Opt) when is_integer(Value), Value>0 ->
+ Opt;
+handle_ssh_option({negotiation_timeout, Value} = Opt) when is_integer(Value); Value == infinity ->
+ Opt;
+handle_ssh_option({parallel_login, Value} = Opt) when Value==true ; Value==false ->
+ Opt;
handle_ssh_option({user, Value} = Opt) when is_list(Value) ->
Opt;
handle_ssh_option({dsa_pass_phrase, Value} = Opt) when is_list(Value) ->
diff --git a/lib/ssh/src/ssh.hrl b/lib/ssh/src/ssh.hrl
index 94ced9da6f..0c4d34f89c 100644
--- a/lib/ssh/src/ssh.hrl
+++ b/lib/ssh/src/ssh.hrl
@@ -54,6 +54,7 @@
-define(uint32(X), << ?UINT32(X) >> ).
-define(uint64(X), << ?UINT64(X) >> ).
-define(string(X), << ?STRING(list_to_binary(X)) >> ).
+-define(string_utf8(X), << ?STRING(unicode:characters_to_binary(X)) >> ).
-define(binary(X), << ?STRING(X) >>).
-define(SSH_CIPHER_NONE, 0).
diff --git a/lib/ssh/src/ssh_acceptor.erl b/lib/ssh/src/ssh_acceptor.erl
index 91905b2eaf..7302196674 100644
--- a/lib/ssh/src/ssh_acceptor.erl
+++ b/lib/ssh/src/ssh_acceptor.erl
@@ -80,15 +80,36 @@ acceptor_loop(Callback, Port, Address, Opts, ListenSocket, AcceptTimeout) ->
ListenSocket, AcceptTimeout)
end.
-handle_connection(_Callback, Address, Port, Options, Socket) ->
+handle_connection(Callback, Address, Port, Options, Socket) ->
SystemSup = ssh_system_sup:system_supervisor(Address, Port),
- {ok, SubSysSup} = ssh_system_sup:start_subsystem(SystemSup, Options),
- ConnectionSup = ssh_subsystem_sup:connection_supervisor(SubSysSup),
- ssh_connection_handler:start_connection(server, Socket,
- [{supervisors, [{system_sup, SystemSup},
- {subsystem_sup, SubSysSup},
- {connection_sup, ConnectionSup}]}
- | Options], infinity).
+ SSHopts = proplists:get_value(ssh_opts, Options, []),
+ MaxSessions = proplists:get_value(max_sessions,SSHopts,infinity),
+ case number_of_connections(SystemSup) < MaxSessions of
+ true ->
+ {ok, SubSysSup} = ssh_system_sup:start_subsystem(SystemSup, Options),
+ ConnectionSup = ssh_subsystem_sup:connection_supervisor(SubSysSup),
+ Timeout = proplists:get_value(negotiation_timeout, SSHopts, 2*60*1000),
+ ssh_connection_handler:start_connection(server, Socket,
+ [{supervisors, [{system_sup, SystemSup},
+ {subsystem_sup, SubSysSup},
+ {connection_sup, ConnectionSup}]}
+ | Options], Timeout);
+ false ->
+ Callback:close(Socket),
+ IPstr = if is_tuple(Address) -> inet:ntoa(Address);
+ true -> Address
+ end,
+ Str = try io_lib:format('~s:~p',[IPstr,Port])
+ catch _:_ -> "port "++integer_to_list(Port)
+ end,
+ error_logger:info_report("Ssh login attempt to "++Str++" denied due to option "
+ "max_sessions limits to "++ io_lib:write(MaxSessions) ++
+ " sessions."
+ ),
+ {error,max_sessions}
+ end.
+
+
handle_error(timeout) ->
ok;
@@ -114,3 +135,10 @@ handle_error(Reason) ->
String = lists:flatten(io_lib:format("Accept error: ~p", [Reason])),
error_logger:error_report(String),
exit({accept_failed, String}).
+
+
+number_of_connections(SystemSup) ->
+ length([X ||
+ {R,X,supervisor,[ssh_subsystem_sup]} <- supervisor:which_children(SystemSup),
+ is_reference(R)
+ ]).
diff --git a/lib/ssh/src/ssh_auth.erl b/lib/ssh/src/ssh_auth.erl
index 1fa3df847f..45fd907383 100644
--- a/lib/ssh/src/ssh_auth.erl
+++ b/lib/ssh/src/ssh_auth.erl
@@ -83,7 +83,7 @@ password_msg([#ssh{opts = Opts, io_cb = IoCb,
method = "password",
data =
<<?BOOLEAN(?FALSE),
- ?STRING(list_to_binary(Password))>>},
+ ?STRING(unicode:characters_to_binary(Password))>>},
Ssh)
end.
@@ -190,14 +190,13 @@ handle_userauth_request(#ssh_msg_userauth_request{user = User,
data = Data}, _,
#ssh{opts = Opts} = Ssh) ->
<<_:8, ?UINT32(Sz), BinPwd:Sz/binary>> = Data,
- Password = binary_to_list(BinPwd),
-
+ Password = unicode:characters_to_list(BinPwd),
case check_password(User, Password, Opts) of
true ->
{authorized, User,
ssh_transport:ssh_packet(#ssh_msg_userauth_success{}, Ssh)};
false ->
- {not_authorized, {User, {passwd, Password}},
+ {not_authorized, {User, {error,"Bad user or password"}},
ssh_transport:ssh_packet(#ssh_msg_userauth_failure{
authentications = "",
partial_success = false}, Ssh)}
@@ -229,7 +228,7 @@ handle_userauth_request(#ssh_msg_userauth_request{user = User,
ssh_transport:ssh_packet(
#ssh_msg_userauth_success{}, Ssh)};
false ->
- {not_authorized, {User, {error, "Invalid signature"}},
+ {not_authorized, {User, undefined},
ssh_transport:ssh_packet(#ssh_msg_userauth_failure{
authentications="publickey,password",
partial_success = false}, Ssh)}
@@ -352,7 +351,7 @@ verify_sig(SessionId, User, Service, Alg, KeyBlob, SigWLen, Opts) ->
build_sig_data(SessionId, User, Service, KeyBlob, Alg) ->
Sig = [?binary(SessionId),
?SSH_MSG_USERAUTH_REQUEST,
- ?string(User),
+ ?string_utf8(User),
?string(Service),
?binary(<<"publickey">>),
?TRUE,
diff --git a/lib/ssh/src/ssh_bits.erl b/lib/ssh/src/ssh_bits.erl
index 2b0241cb83..8aaff93b9f 100644
--- a/lib/ssh/src/ssh_bits.erl
+++ b/lib/ssh/src/ssh_bits.erl
@@ -116,6 +116,10 @@ enc(Xs, [string|Ts], Offset) ->
X0 = hd(Xs),
Y = ?string(X0),
[Y | enc(tl(Xs),Ts,Offset+size(Y))];
+enc(Xs, [string_utf8|Ts], Offset) ->
+ X0 = hd(Xs),
+ Y = ?string_utf8(X0),
+ [Y | enc(tl(Xs),Ts,Offset+size(Y))];
enc(Xs, [binary|Ts], Offset) ->
X0 = hd(Xs),
Y = ?binary(X0),
diff --git a/lib/ssh/src/ssh_cli.erl b/lib/ssh/src/ssh_cli.erl
index 2c8e515a14..77453e8fd7 100644
--- a/lib/ssh/src/ssh_cli.erl
+++ b/lib/ssh/src/ssh_cli.erl
@@ -170,10 +170,19 @@ handle_msg({Group, get_unicode_state}, State) ->
{ok, State};
handle_msg({Group, tty_geometry}, #state{group = Group,
- pty = #ssh_pty{width=Width,
- height=Height}
+ pty = Pty
} = State) ->
- Group ! {self(),tty_geometry,{Width,Height}},
+ case Pty of
+ #ssh_pty{width=Width,height=Height} ->
+ Group ! {self(),tty_geometry,{Width,Height}};
+ _ ->
+ %% This is a dirty fix of the problem with the otp ssh:shell
+ %% client. That client will not allocate a tty, but someone
+ %% asks for the tty_geometry just before every erlang prompt.
+ %% If that question is not answered, there is a 2 sec timeout
+ %% Until the prompt is seen by the user at the client side ...
+ Group ! {self(),tty_geometry,{0,0}}
+ end,
{ok,State};
handle_msg({Group, Req}, #state{group = Group, buf = Buf, pty = Pty,
@@ -349,7 +358,7 @@ delete_chars(N, {Buf, BufTail, Col}, Tty) when N > 0 ->
{Buf, NewBufTail, Col}};
delete_chars(N, {Buf, BufTail, Col}, Tty) -> % N < 0
NewBuf = nthtail(-N, Buf),
- NewCol = Col + N,
+ NewCol = case Col + N of V when V >= 0 -> V; _ -> 0 end,
M1 = move_cursor(Col, NewCol, Tty),
M2 = move_cursor(NewCol + length(BufTail) - N, NewCol, Tty),
{[M1, BufTail, lists:duplicate(-N, $ ) | M2],
diff --git a/lib/ssh/src/ssh_connection.erl b/lib/ssh/src/ssh_connection.erl
index 03dddae3c8..b377614949 100644
--- a/lib/ssh/src/ssh_connection.erl
+++ b/lib/ssh/src/ssh_connection.erl
@@ -271,10 +271,36 @@ cancel_tcpip_forward(ConnectionHandler, BindIP, Port) ->
%%--------------------------------------------------------------------
%%% Internal API
%%--------------------------------------------------------------------
+l2b(L) when is_integer(hd(L)) ->
+ try list_to_binary(L)
+ of
+ B -> B
+ catch
+ _:_ ->
+ unicode:characters_to_binary(L)
+ end;
+l2b([H|T]) ->
+ << (l2b(H))/binary, (l2b(T))/binary >>;
+l2b(B) when is_binary(B) ->
+ B;
+l2b([]) ->
+ <<>>.
+
+
+
channel_data(ChannelId, DataType, Data, Connection, From)
when is_list(Data)->
channel_data(ChannelId, DataType,
- list_to_binary(Data), Connection, From);
+%% list_to_binary(Data), Connection, From);
+ l2b(Data), Connection, From);
+ %% try list_to_binary(Data)
+ %% of
+ %% B -> B
+ %% catch
+ %% _:_ -> io:format('BAD BINARY: ~p~n',[Data]),
+ %% unicode:characters_to_binary(Data)
+ %% end,
+ %% Connection, From);
channel_data(ChannelId, DataType, Data,
#connection{channel_cache = Cache} = Connection,
diff --git a/lib/ssh/src/ssh_connection_handler.erl b/lib/ssh/src/ssh_connection_handler.erl
index 3462b98172..06866392da 100644
--- a/lib/ssh/src/ssh_connection_handler.erl
+++ b/lib/ssh/src/ssh_connection_handler.erl
@@ -110,8 +110,16 @@ start_connection(server = Role, Socket, Options, Timeout) ->
{ok, Pid} = ssh_connection_sup:start_child(ConnectionSup, [Role, Socket, Opts]),
{_, Callback, _} = proplists:get_value(transport, Options, {tcp, gen_tcp, tcp_closed}),
socket_control(Socket, Pid, Callback),
- Ref = erlang:monitor(process, Pid),
- handshake(Pid, Ref, Timeout)
+ case proplists:get_value(parallel_login, Opts, false) of
+ true ->
+ spawn(fun() ->
+ Ref = erlang:monitor(process, Pid),
+ handshake(Pid, Ref, Timeout)
+ end);
+ false ->
+ Ref = erlang:monitor(process, Pid),
+ handshake(Pid, Ref, Timeout)
+ end
catch
exit:{noproc, _} ->
{error, ssh_not_started};
@@ -157,7 +165,7 @@ init([Role, Socket, SshOpts]) ->
%%--------------------------------------------------------------------
-spec open_channel(pid(), string(), iodata(), integer(), integer(),
- timeout()) -> {open, channel_id()} | {open_error, term(), string(), string()}.
+ timeout()) -> {open, channel_id()} | {error, term()}.
%%--------------------------------------------------------------------
open_channel(ConnectionHandler, ChannelType, ChannelSpecificData,
InitialWindowSize,
@@ -206,7 +214,7 @@ global_request(ConnectionHandler, Type, false = Reply, Data) ->
send_all_state_event(ConnectionHandler, {global_request, self(), Type, Reply, Data}).
%%--------------------------------------------------------------------
--spec send(pid(), channel_id(), integer(), iolist(), timeout()) ->
+-spec send(pid(), channel_id(), integer(), iodata(), timeout()) ->
ok | {error, timeout} | {error, closed}.
%%--------------------------------------------------------------------
send(ConnectionHandler, ChannelId, Type, Data, Timeout) ->
@@ -1474,8 +1482,7 @@ ssh_channel_info([ _ | Rest], Channel, Acc) ->
log_error(Reason) ->
Report = io_lib:format("Erlang ssh connection handler failed with reason: "
- "~p ~n, Stacktace: ~p ~n"
- "please report this to [email protected] \n",
+ "~p ~n, Stacktrace: ~p ~n",
[Reason, erlang:get_stacktrace()]),
error_logger:error_report(Report),
"Internal error".
diff --git a/lib/ssh/src/ssh_file.erl b/lib/ssh/src/ssh_file.erl
index 21cdedc156..5692138a8a 100644
--- a/lib/ssh/src/ssh_file.erl
+++ b/lib/ssh/src/ssh_file.erl
@@ -65,7 +65,7 @@ is_auth_key(Key, User,Opts) ->
%% Used by client
is_host_key(Key, PeerName, Algorithm, Opts) ->
- case lookup_host_key(PeerName, Algorithm, Opts) of
+ case lookup_host_key(Key, PeerName, Algorithm, Opts) of
{ok, Key} ->
true;
_ ->
@@ -121,9 +121,9 @@ decode_ssh_file(Pem, Password) ->
%% return {ok, Key(s)} or {error, not_found}
%%
-lookup_host_key(Host, Alg, Opts) ->
+lookup_host_key(KeyToMatch, Host, Alg, Opts) ->
Host1 = replace_localhost(Host),
- do_lookup_host_key(Host1, Alg, Opts).
+ do_lookup_host_key(KeyToMatch, Host1, Alg, Opts).
add_host_key(Host, Key, Opts) ->
@@ -204,10 +204,10 @@ replace_localhost("localhost") ->
replace_localhost(Host) ->
Host.
-do_lookup_host_key(Host, Alg, Opts) ->
+do_lookup_host_key(KeyToMatch, Host, Alg, Opts) ->
case file:open(file_name(user, "known_hosts", Opts), [read, binary]) of
{ok, Fd} ->
- Res = lookup_host_key_fd(Fd, Host, Alg),
+ Res = lookup_host_key_fd(Fd, KeyToMatch, Host, Alg),
file:close(Fd),
{ok, Res};
{error, enoent} -> {error, not_found};
@@ -228,16 +228,16 @@ identity_pass_phrase('ssh-rsa') ->
identity_pass_phrase("ssh-rsa") ->
rsa_pass_phrase.
-lookup_host_key_fd(Fd, Host, KeyType) ->
+lookup_host_key_fd(Fd, KeyToMatch, Host, KeyType) ->
case io:get_line(Fd, '') of
eof ->
{error, not_found};
Line ->
case ssh_decode_line(Line, known_hosts) of
[{Key, Attributes}] ->
- handle_host(Fd, Host, proplists:get_value(hostnames, Attributes), Key, KeyType);
+ handle_host(Fd, KeyToMatch, Host, proplists:get_value(hostnames, Attributes), Key, KeyType);
[] ->
- lookup_host_key_fd(Fd, Host, KeyType)
+ lookup_host_key_fd(Fd, KeyToMatch, Host, KeyType)
end
end.
@@ -248,13 +248,13 @@ ssh_decode_line(Line, Type) ->
[]
end.
-handle_host(Fd, Host, HostList, Key, KeyType) ->
+handle_host(Fd, KeyToMatch, Host, HostList, Key, KeyType) ->
Host1 = host_name(Host),
- case lists:member(Host1, HostList) and key_match(Key, KeyType) of
- true ->
+ case lists:member(Host1, HostList) andalso key_match(Key, KeyType) of
+ true when KeyToMatch == Key ->
Key;
- false ->
- lookup_host_key_fd(Fd, Host, KeyType)
+ _ ->
+ lookup_host_key_fd(Fd, KeyToMatch, Host, KeyType)
end.
host_name(Atom) when is_atom(Atom) ->
diff --git a/lib/ssh/src/ssh_io.erl b/lib/ssh/src/ssh_io.erl
index 832b144db9..35336bce8b 100644
--- a/lib/ssh/src/ssh_io.erl
+++ b/lib/ssh/src/ssh_io.erl
@@ -81,6 +81,8 @@ format(Fmt, Args) ->
trim(Line) when is_list(Line) ->
lists:reverse(trim1(lists:reverse(trim1(Line))));
+trim(Line) when is_binary(Line) ->
+ trim(unicode:characters_to_list(Line));
trim(Other) -> Other.
trim1([$\s|Cs]) -> trim(Cs);
diff --git a/lib/ssh/src/ssh_message.erl b/lib/ssh/src/ssh_message.erl
index 7bd0375521..8d6c77c0ed 100644
--- a/lib/ssh/src/ssh_message.erl
+++ b/lib/ssh/src/ssh_message.erl
@@ -120,7 +120,7 @@ encode(#ssh_msg_userauth_request{
data = Data
}) ->
ssh_bits:encode([?SSH_MSG_USERAUTH_REQUEST, User, Service, Method, Data],
- [byte, string, string, string, '...']);
+ [byte, string_utf8, string, string, '...']);
encode(#ssh_msg_userauth_failure{
authentications = Auths,
partial_success = Bool
@@ -135,7 +135,7 @@ encode(#ssh_msg_userauth_banner{
language = Lang
}) ->
ssh_bits:encode([?SSH_MSG_USERAUTH_BANNER, Banner, Lang],
- [byte, string, string]);
+ [byte, string_utf8, string]);
encode(#ssh_msg_userauth_pk_ok{
algorithm_name = Alg,
@@ -315,8 +315,8 @@ decode(<<?BYTE(?SSH_MSG_CHANNEL_DATA), ?UINT32(Recipient), ?UINT32(Len), Data:Le
recipient_channel = Recipient,
data = Data
};
-decode(<<?BYTE(?SSH_MSG_CHANNEL_EXTENDED_DATA), ?UINT32(Recipient),
- ?UINT32(DataType), Data/binary>>) ->
+decode(<<?BYTE(?SSH_MSG_CHANNEL_EXTENDED_DATA), ?UINT32(Recipient),
+ ?UINT32(DataType), ?UINT32(Len), Data:Len/binary>>) ->
#ssh_msg_channel_extended_data{
recipient_channel = Recipient,
data_type_code = DataType,
@@ -380,27 +380,30 @@ decode(<<?BYTE(?SSH_MSG_USERAUTH_BANNER),
language = Lang
};
+decode(<<?BYTE(?SSH_MSG_USERAUTH_INFO_REQUEST), ?UINT32(Len0), Name:Len0/binary,
+ ?UINT32(Len1), Inst:Len1/binary, ?UINT32(Len2), Lang:Len2/binary,
+ ?UINT32(NumPromtps), Data/binary>>) ->
+ #ssh_msg_userauth_info_request{
+ name = Name,
+ instruction = Inst,
+ language_tag = Lang,
+ num_prompts = NumPromtps,
+ data = Data};
+
+%%% Unhandled message, also masked by same 1:st byte value as ?SSH_MSG_USERAUTH_INFO_REQUEST:
decode(<<?BYTE(?SSH_MSG_USERAUTH_PK_OK), ?UINT32(Len), Alg:Len/binary, KeyBlob/binary>>) ->
#ssh_msg_userauth_pk_ok{
algorithm_name = Alg,
key_blob = KeyBlob
};
+%%% Unhandled message, also masked by same 1:st byte value as ?SSH_MSG_USERAUTH_INFO_REQUEST:
decode(<<?BYTE(?SSH_MSG_USERAUTH_PASSWD_CHANGEREQ), ?UINT32(Len0), Prompt:Len0/binary,
?UINT32(Len1), Lang:Len1/binary>>) ->
#ssh_msg_userauth_passwd_changereq{
prompt = Prompt,
languge = Lang
};
-decode(<<?BYTE(?SSH_MSG_USERAUTH_INFO_REQUEST), ?UINT32(Len0), Name:Len0/binary,
- ?UINT32(Len1), Inst:Len1/binary, ?UINT32(Len2), Lang:Len2/binary,
- ?UINT32(NumPromtps), Data/binary>>) ->
- #ssh_msg_userauth_info_request{
- name = Name,
- instruction = Inst,
- language_tag = Lang,
- num_prompts = NumPromtps,
- data = Data};
decode(<<?BYTE(?SSH_MSG_USERAUTH_INFO_RESPONSE), ?UINT32(Num), Data/binary>>) ->
#ssh_msg_userauth_info_response{
@@ -424,8 +427,9 @@ decode(<<?BYTE(?SSH_MSG_KEX_DH_GEX_REQUEST_OLD), ?UINT32(N)>>) ->
#ssh_msg_kex_dh_gex_request_old{
n = N
};
-decode(<<?BYTE(?SSH_MSG_KEX_DH_GEX_GROUP), ?UINT32(Len0), Prime:Len0/big-signed-integer,
- ?UINT32(Len1), Generator:Len1/big-signed-integer>>) ->
+decode(<<?BYTE(?SSH_MSG_KEX_DH_GEX_GROUP),
+ ?UINT32(Len0), Prime:Len0/big-signed-integer-unit:8,
+ ?UINT32(Len1), Generator:Len1/big-signed-integer-unit:8>>) ->
#ssh_msg_kex_dh_gex_group{
p = Prime,
g = Generator
diff --git a/lib/ssh/src/ssh_sftp.erl b/lib/ssh/src/ssh_sftp.erl
index 10167a9223..0ea2366ac7 100644
--- a/lib/ssh/src/ssh_sftp.erl
+++ b/lib/ssh/src/ssh_sftp.erl
@@ -352,7 +352,7 @@ write_file(Pid, Name, List) ->
write_file(Pid, Name, List, ?FILEOP_TIMEOUT).
write_file(Pid, Name, List, FileOpTimeout) when is_list(List) ->
- write_file(Pid, Name, list_to_binary(List), FileOpTimeout);
+ write_file(Pid, Name, unicode:characters_to_binary(List), FileOpTimeout);
write_file(Pid, Name, Bin, FileOpTimeout) ->
case open(Pid, Name, [write, binary], FileOpTimeout) of
{ok, Handle} ->
@@ -514,7 +514,7 @@ do_handle_call({pread,Async,Handle,At,Length}, From, State) ->
case get_mode(Handle, State2) of
binary -> {{ok,Data}, State2};
text ->
- {{ok,binary_to_list(Data)}, State2}
+ {{ok,unicode:characters_to_list(Data)}, State2}
end;
(Rep, State2) ->
{Rep, State2}
@@ -535,8 +535,7 @@ do_handle_call({read,Async,Handle,Length}, From, State) ->
fun({ok,Data}, State2) ->
case get_mode(Handle, State2) of
binary -> {{ok,Data}, State2};
- text ->
- {{ok,binary_to_list(Data)}, State2}
+ text -> {{ok,binary_to_list(Data)}, State2}
end;
(Rep, State2) -> {Rep, State2}
end);
diff --git a/lib/ssh/src/ssh_sftpd.erl b/lib/ssh/src/ssh_sftpd.erl
index 174ca0126b..52665635f0 100644
--- a/lib/ssh/src/ssh_sftpd.erl
+++ b/lib/ssh/src/ssh_sftpd.erl
@@ -214,8 +214,7 @@ handle_op(?SSH_FXP_INIT, Version, B, State) when is_binary(B) ->
handle_op(?SSH_FXP_REALPATH, ReqId,
<<?UINT32(Rlen), RPath:Rlen/binary>>,
State0) ->
- RelPath0 = binary_to_list(RPath),
- RelPath = relate_file_name(RelPath0, State0, _Canonicalize=false),
+ RelPath = relate_file_name(RPath, State0, _Canonicalize=false),
{Res, State} = resolve_symlinks(RelPath, State0),
case Res of
{ok, AbsPath} ->
@@ -231,7 +230,7 @@ handle_op(?SSH_FXP_OPENDIR, ReqId,
<<?UINT32(RLen), RPath:RLen/binary>>,
State0 = #state{xf = #ssh_xfer{vsn = Vsn},
file_handler = FileMod, file_state = FS0}) ->
- RelPath = binary_to_list(RPath),
+ RelPath = unicode:characters_to_list(RPath),
AbsPath = relate_file_name(RelPath, State0),
XF = State0#state.xf,
@@ -312,9 +311,8 @@ handle_op(?SSH_FXP_WRITE, ReqId,
?SSH_FX_INVALID_HANDLE),
State
end;
-handle_op(?SSH_FXP_READLINK, ReqId, <<?UINT32(PLen), BPath:PLen/binary>>,
+handle_op(?SSH_FXP_READLINK, ReqId, <<?UINT32(PLen), RelPath:PLen/binary>>,
State = #state{file_handler = FileMod, file_state = FS0}) ->
- RelPath = binary_to_list(BPath),
AbsPath = relate_file_name(RelPath, State),
{Res, FS1} = FileMod:read_link(AbsPath, FS0),
case Res of
@@ -524,10 +522,10 @@ close_our_file({_,Fd}, FileMod, FS0) ->
%%% stat: do the stat
stat(Vsn, ReqId, Data, State, F) when Vsn =< 3->
<<?UINT32(BLen), BPath:BLen/binary>> = Data,
- stat(ReqId, binary_to_list(BPath), State, F);
+ stat(ReqId, unicode:characters_to_list(BPath), State, F);
stat(Vsn, ReqId, Data, State, F) when Vsn >= 4->
<<?UINT32(BLen), BPath:BLen/binary, ?UINT32(_Flags)>> = Data,
- stat(ReqId, binary_to_list(BPath), State, F).
+ stat(ReqId, unicode:characters_to_list(BPath), State, F).
fstat(Vsn, ReqId, Data, State) when Vsn =< 3->
<<?UINT32(HLen), Handle:HLen/binary>> = Data,
@@ -609,13 +607,13 @@ decode_4_acess([]) ->
open(Vsn, ReqId, Data, State) when Vsn =< 3 ->
<<?UINT32(BLen), BPath:BLen/binary, ?UINT32(PFlags),
_Attrs/binary>> = Data,
- Path = binary_to_list(BPath),
+ Path = unicode:characters_to_list(BPath),
Flags = ssh_xfer:decode_open_flags(Vsn, PFlags),
do_open(ReqId, State, Path, Flags);
open(Vsn, ReqId, Data, State) when Vsn >= 4 ->
<<?UINT32(BLen), BPath:BLen/binary, ?UINT32(Access),
?UINT32(PFlags), _Attrs/binary>> = Data,
- Path = binary_to_list(BPath),
+ Path = unicode:characters_to_list(BPath),
FlagBits = ssh_xfer:decode_open_flags(Vsn, PFlags),
AcessBits = ssh_xfer:decode_ace_mask(Access),
%% TODO: This is to make sure the Access flags are not ignored
@@ -675,7 +673,7 @@ resolve_symlinks_2(["." | RestPath], State0, LinkCnt, AccPath) ->
resolve_symlinks_2([".." | RestPath], State0, LinkCnt, AccPath) ->
%% Remove the last path component
AccPathComps0 = filename:split(AccPath),
- Path = case lists:reverse(tl(lists:reverse(AccPathComps0))) of
+ Path = case lists:droplast(AccPathComps0) of
[] ->
"";
AccPathComps ->
@@ -712,7 +710,7 @@ relate_file_name(File, State) ->
relate_file_name(File, State, _Canonicalize=true).
relate_file_name(File, State, Canonicalize) when is_binary(File) ->
- relate_file_name(binary_to_list(File), State, Canonicalize);
+ relate_file_name(unicode:characters_to_list(File), State, Canonicalize);
relate_file_name(File, #state{cwd = CWD, root = ""}, Canonicalize) ->
relate_filename_to_path(File, CWD, Canonicalize);
relate_file_name(File, #state{root = Root}, Canonicalize) ->
diff --git a/lib/ssh/src/ssh_xfer.erl b/lib/ssh/src/ssh_xfer.erl
index e18e18a9a9..63d01fd9de 100644
--- a/lib/ssh/src/ssh_xfer.erl
+++ b/lib/ssh/src/ssh_xfer.erl
@@ -72,7 +72,6 @@ protocol_version_request(XF) ->
open(XF, ReqID, FileName, Access, Flags, Attrs) ->
Vsn = XF#ssh_xfer.vsn,
- FileName1 = unicode:characters_to_binary(FileName),
MBits = if Vsn >= 5 ->
M = encode_ace_mask(Access),
?uint32(M);
@@ -82,7 +81,7 @@ open(XF, ReqID, FileName, Access, Flags, Attrs) ->
F = encode_open_flags(Flags),
xf_request(XF,?SSH_FXP_OPEN,
[?uint32(ReqID),
- ?binary(FileName1),
+ ?string_utf8(FileName),
MBits,
?uint32(F),
encode_ATTR(Vsn,Attrs)]).
@@ -90,7 +89,7 @@ open(XF, ReqID, FileName, Access, Flags, Attrs) ->
opendir(XF, ReqID, DirName) ->
xf_request(XF, ?SSH_FXP_OPENDIR,
[?uint32(ReqID),
- ?string(DirName)]).
+ ?string_utf8(DirName)]).
close(XF, ReqID, Handle) ->
@@ -127,13 +126,11 @@ write(XF,ReqID, Handle, Offset, Data) ->
remove(XF, ReqID, File) ->
xf_request(XF, ?SSH_FXP_REMOVE,
[?uint32(ReqID),
- ?string(File)]).
+ ?string_utf8(File)]).
%% Rename a file/directory
-rename(XF, ReqID, Old, New, Flags) ->
+rename(XF, ReqID, OldPath, NewPath, Flags) ->
Vsn = XF#ssh_xfer.vsn,
- OldPath = unicode:characters_to_binary(Old),
- NewPath = unicode:characters_to_binary(New),
FlagBits
= if Vsn >= 5 ->
F0 = encode_rename_flags(Flags),
@@ -143,30 +140,27 @@ rename(XF, ReqID, Old, New, Flags) ->
end,
xf_request(XF, ?SSH_FXP_RENAME,
[?uint32(ReqID),
- ?binary(OldPath),
- ?binary(NewPath),
+ ?string_utf8(OldPath),
+ ?string_utf8(NewPath),
FlagBits]).
%% Create directory
mkdir(XF, ReqID, Path, Attrs) ->
- Path1 = unicode:characters_to_binary(Path),
xf_request(XF, ?SSH_FXP_MKDIR,
[?uint32(ReqID),
- ?binary(Path1),
+ ?string_utf8(Path),
encode_ATTR(XF#ssh_xfer.vsn, Attrs)]).
%% Remove a directory
rmdir(XF, ReqID, Dir) ->
- Dir1 = unicode:characters_to_binary(Dir),
xf_request(XF, ?SSH_FXP_RMDIR,
[?uint32(ReqID),
- ?binary(Dir1)]).
+ ?string_utf8(Dir)]).
%% Stat file
stat(XF, ReqID, Path, Flags) ->
- Path1 = unicode:characters_to_binary(Path),
Vsn = XF#ssh_xfer.vsn,
AttrFlags = if Vsn >= 5 ->
F = encode_attr_flags(Vsn, Flags),
@@ -176,13 +170,12 @@ stat(XF, ReqID, Path, Flags) ->
end,
xf_request(XF, ?SSH_FXP_STAT,
[?uint32(ReqID),
- ?binary(Path1),
+ ?string_utf8(Path),
AttrFlags]).
%% Stat file - follow symbolic links
lstat(XF, ReqID, Path, Flags) ->
- Path1 = unicode:characters_to_binary(Path),
Vsn = XF#ssh_xfer.vsn,
AttrFlags = if Vsn >= 5 ->
F = encode_attr_flags(Vsn, Flags),
@@ -192,7 +185,7 @@ lstat(XF, ReqID, Path, Flags) ->
end,
xf_request(XF, ?SSH_FXP_LSTAT,
[?uint32(ReqID),
- ?binary(Path1),
+ ?string_utf8(Path),
AttrFlags]).
%% Stat open file
@@ -211,10 +204,9 @@ fstat(XF, ReqID, Handle, Flags) ->
%% Modify file attributes
setstat(XF, ReqID, Path, Attrs) ->
- Path1 = unicode:characters_to_binary(Path),
xf_request(XF, ?SSH_FXP_SETSTAT,
[?uint32(ReqID),
- ?binary(Path1),
+ ?string_utf8(Path),
encode_ATTR(XF#ssh_xfer.vsn, Attrs)]).
@@ -227,10 +219,9 @@ fsetstat(XF, ReqID, Handle, Attrs) ->
%% Read a symbolic link
readlink(XF, ReqID, Path) ->
- Path1 = unicode:characters_to_binary(Path),
xf_request(XF, ?SSH_FXP_READLINK,
[?uint32(ReqID),
- ?binary(Path1)]).
+ ?string_utf8(Path)]).
%% Create a symbolic link
@@ -244,10 +235,9 @@ symlink(XF, ReqID, LinkPath, TargetPath) ->
%% Convert a path into a 'canonical' form
realpath(XF, ReqID, Path) ->
- Path1 = unicode:characters_to_binary(Path),
xf_request(XF, ?SSH_FXP_REALPATH,
[?uint32(ReqID),
- ?binary(Path1)]).
+ ?string_utf8(Path)]).
extended(XF, ReqID, Request, Data) ->
xf_request(XF, ?SSH_FXP_EXTENDED,
@@ -296,7 +286,10 @@ xf_send_names(#ssh_xfer{cm = CM, channel = Channel, vsn = Vsn},
Count = length(NamesAndAttrs),
{Data, Len} = encode_names(Vsn, NamesAndAttrs),
Size = 1 + 4 + 4 + Len,
- ToSend = [<<?UINT32(Size), ?SSH_FXP_NAME, ?UINT32(ReqId), ?UINT32(Count)>>,
+ ToSend = [<<?UINT32(Size),
+ ?SSH_FXP_NAME,
+ ?UINT32(ReqId),
+ ?UINT32(Count)>>,
Data],
ssh_connection:send(CM, Channel, ToSend).
@@ -818,25 +811,27 @@ decode_names(_Vsn, 0, _Data) ->
decode_names(Vsn, I, <<?UINT32(Len), FileName:Len/binary,
?UINT32(LLen), _LongName:LLen/binary,
Tail/binary>>) when Vsn =< 3 ->
- Name = binary_to_list(FileName),
+ Name = unicode:characters_to_list(FileName),
{A, Tail2} = decode_ATTR(Vsn, Tail),
[{Name, A} | decode_names(Vsn, I-1, Tail2)];
decode_names(Vsn, I, <<?UINT32(Len), FileName:Len/binary,
Tail/binary>>) when Vsn >= 4 ->
- Name = binary_to_list(FileName),
+ Name = unicode:characters_to_list(FileName),
{A, Tail2} = decode_ATTR(Vsn, Tail),
[{Name, A} | decode_names(Vsn, I-1, Tail2)].
encode_names(Vsn, NamesAndAttrs) ->
lists:mapfoldl(fun(N, L) -> encode_name(Vsn, N, L) end, 0, NamesAndAttrs).
-encode_name(Vsn, {Name,Attr}, Len) when Vsn =< 3 ->
+encode_name(Vsn, {NameUC,Attr}, Len) when Vsn =< 3 ->
+ Name = binary_to_list(unicode:characters_to_binary(NameUC)),
NLen = length(Name),
EncAttr = encode_ATTR(Vsn, Attr),
ALen = size(EncAttr),
NewLen = Len + NLen*2 + 4 + 4 + ALen,
{[<<?UINT32(NLen)>>, Name, <<?UINT32(NLen)>>, Name, EncAttr], NewLen};
-encode_name(Vsn, {Name,Attr}, Len) when Vsn >= 4 ->
+encode_name(Vsn, {NameUC,Attr}, Len) when Vsn >= 4 ->
+ Name = binary_to_list(unicode:characters_to_binary(NameUC)),
NLen = length(Name),
EncAttr = encode_ATTR(Vsn, Attr),
ALen = size(EncAttr),
@@ -851,9 +846,9 @@ encode_acl_items([ACE|As]) ->
Type = encode_ace_type(ACE#ssh_xfer_ace.type),
Flag = encode_ace_flag(ACE#ssh_xfer_ace.flag),
Mask = encode_ace_mask(ACE#ssh_xfer_ace.mask),
- Who = list_to_binary(ACE#ssh_xfer_ace.who),
+ Who = ACE#ssh_xfer_ace.who,
[?uint32(Type), ?uint32(Flag), ?uint32(Mask),
- ?binary(Who) | encode_acl_items(As)];
+ ?string_utf8(Who) | encode_acl_items(As)];
encode_acl_items([]) ->
[].
@@ -872,7 +867,7 @@ decode_acl_items(I, <<?UINT32(Type),
[#ssh_xfer_ace { type = decode_ace_type(Type),
flag = decode_ace_flag(Flag),
mask = decode_ace_mask(Mask),
- who = binary_to_list(BWho)} | Acc]).
+ who = unicode:characters_to_list(BWho)} | Acc]).
encode_extensions(Exts) ->
Count = length(Exts),
diff --git a/lib/ssh/test/ssh_basic_SUITE.erl b/lib/ssh/test/ssh_basic_SUITE.erl
index b4e3871efd..ba38c1da40 100644
--- a/lib/ssh/test/ssh_basic_SUITE.erl
+++ b/lib/ssh/test/ssh_basic_SUITE.erl
@@ -1,7 +1,7 @@
%%
%% %CopyrightBegin%
%%
-%% Copyright Ericsson AB 2008-2013. All Rights Reserved.
+%% Copyright Ericsson AB 2008-2014. 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
@@ -38,6 +38,7 @@ suite() ->
all() ->
[app_test,
+ appup_test,
{group, dsa_key},
{group, rsa_key},
{group, dsa_pass_key},
@@ -46,21 +47,28 @@ all() ->
daemon_already_started,
server_password_option,
server_userpassword_option,
- double_close].
+ double_close,
+ ssh_connect_timeout,
+ ssh_connect_arg4_timeout,
+ {group, hardening_tests}
+ ].
groups() ->
[{dsa_key, [], basic_tests()},
{rsa_key, [], basic_tests()},
{dsa_pass_key, [], [pass_phrase]},
{rsa_pass_key, [], [pass_phrase]},
- {internal_error, [], [internal_error]}
+ {internal_error, [], [internal_error]},
+ {hardening_tests, [], [max_sessions]}
].
+
basic_tests() ->
[send, close, peername_sockname,
exec, exec_compressed, shell, cli, known_hosts,
idle_time, rekey, openssh_zlib_basic_test].
+
%%--------------------------------------------------------------------
init_per_suite(Config) ->
case catch crypto:start() of
@@ -73,6 +81,8 @@ end_per_suite(_Config) ->
ssh:stop(),
crypto:stop().
%%--------------------------------------------------------------------
+init_per_group(hardening_tests, Config) ->
+ init_per_group(dsa_key, Config);
init_per_group(dsa_key, Config) ->
DataDir = ?config(data_dir, Config),
PrivDir = ?config(priv_dir, Config),
@@ -102,6 +112,8 @@ init_per_group(internal_error, Config) ->
init_per_group(_, Config) ->
Config.
+end_per_group(hardening_tests, Config) ->
+ end_per_group(dsa_key, Config);
end_per_group(dsa_key, Config) ->
PrivDir = ?config(priv_dir, Config),
ssh_test_lib:clean_dsa(PrivDir),
@@ -150,6 +162,11 @@ app_test(Config) when is_list(Config) ->
?t:app_test(ssh),
ok.
%%--------------------------------------------------------------------
+appup_test() ->
+ [{doc, "Appup file consistency test."}].
+appup_test(Config) when is_list(Config) ->
+ ok = ?t:appup_test(ssh).
+%%--------------------------------------------------------------------
misc_ssh_options() ->
[{doc, "Test that we can set some misc options not tested elsewhere, "
"some options not yet present are not decided if we should support or "
@@ -614,6 +631,86 @@ double_close(Config) when is_list(Config) ->
ok = ssh:close(CM).
%%--------------------------------------------------------------------
+ssh_connect_timeout() ->
+ [{doc, "Test connect_timeout option in ssh:connect/4"}].
+ssh_connect_timeout(_Config) ->
+ ConnTimeout = 2000,
+ {error,{faked_transport,connect,TimeoutToTransport}} =
+ ssh:connect("localhost", 12345,
+ [{transport,{tcp,?MODULE,tcp_closed}},
+ {connect_timeout,ConnTimeout}],
+ 1000),
+ case TimeoutToTransport of
+ ConnTimeout -> ok;
+ Other ->
+ ct:log("connect_timeout is ~p but transport received ~p",[ConnTimeout,Other]),
+ {fail,"ssh:connect/4 wrong connect_timeout received in transport"}
+ end.
+
+%% Help for the test above
+connect(_Host, _Port, _Opts, Timeout) ->
+ {error, {faked_transport,connect,Timeout}}.
+
+
+%%--------------------------------------------------------------------
+ssh_connect_arg4_timeout() ->
+ [{doc, "Test fourth argument in ssh:connect/4"}].
+ssh_connect_arg4_timeout(_Config) ->
+ Timeout = 1000,
+ Parent = self(),
+ %% start the server
+ Server = spawn(fun() ->
+ {ok,Sl} = gen_tcp:listen(0,[]),
+ {ok,{_,Port}} = inet:sockname(Sl),
+ Parent ! {port,self(),Port},
+ Rsa = gen_tcp:accept(Sl),
+ ct:log("Server gen_tcp:accept got ~p",[Rsa]),
+ receive after 2*Timeout -> ok end %% let client timeout first
+ end),
+
+ %% Get listening port
+ Port = receive
+ {port,Server,ServerPort} -> ServerPort
+ end,
+
+ %% try to connect with a timeout, but "supervise" it
+ Client = spawn(fun() ->
+ T0 = now(),
+ Rc = ssh:connect("localhost",Port,[],Timeout),
+ ct:log("Client ssh:connect got ~p",[Rc]),
+ Parent ! {done,self(),Rc,T0}
+ end),
+
+ %% Wait for client reaction on the connection try:
+ receive
+ {done, Client, {error,_E}, T0} ->
+ Msp = ms_passed(T0, now()),
+ exit(Server,hasta_la_vista___baby),
+ Low = 0.9*Timeout,
+ High = 1.1*Timeout,
+ ct:log("Timeout limits: ~p--~p, timeout was ~p, expected ~p",[Low,High,Msp,Timeout]),
+ if
+ Low<Msp, Msp<High -> ok;
+ true -> {fail, "timeout not within limits"}
+ end;
+ {done, Client, {ok,_Ref}, _T0} ->
+ {fail,"ssh-connected ???"}
+ after
+ 5000 ->
+ exit(Server,hasta_la_vista___baby),
+ exit(Client,hasta_la_vista___baby),
+ {fail, "Didn't timeout"}
+ end.
+
+
+%% Help function
+%% N2-N1
+ms_passed(N1={_,_,M1}, N2={_,_,M2}) ->
+ {0,{0,Min,Sec}} = calendar:time_difference(calendar:now_to_local_time(N1),
+ calendar:now_to_local_time(N2)),
+ 1000 * (Min*60 + Sec + (M2-M1)/1000000).
+
+%%--------------------------------------------------------------------
openssh_zlib_basic_test() ->
[{doc, "Test basic connection with openssh_zlib"}].
@@ -633,6 +730,49 @@ openssh_zlib_basic_test(Config) ->
ssh:stop_daemon(Pid).
%%--------------------------------------------------------------------
+
+max_sessions(Config) ->
+ SystemDir = filename:join(?config(priv_dir, Config), system),
+ UserDir = ?config(priv_dir, Config),
+ MaxSessions = 2,
+ {Pid, Host, Port} = ssh_test_lib:daemon([{system_dir, SystemDir},
+ {user_dir, UserDir},
+ {user_passwords, [{"carni", "meat"}]},
+ {parallel_login, true},
+ {max_sessions, MaxSessions}
+ ]),
+
+ Connect = fun() ->
+ R=ssh_test_lib:connect(Host, Port, [{silently_accept_hosts, true},
+ {user_dir, UserDir},
+ {user_interaction, false},
+ {user, "carni"},
+ {password, "meat"}
+ ]),
+ ct:log("Connection ~p up",[R])
+ end,
+
+ try [Connect() || _ <- lists:seq(1,MaxSessions)]
+ of
+ _ ->
+ ct:pal("Expect Info Report:",[]),
+ try Connect()
+ of
+ _ConnectionRef ->
+ ssh:stop_daemon(Pid),
+ {fail,"Too many connections accepted"}
+ catch
+ error:{badmatch,{error,"Connection closed"}} ->
+ ssh:stop_daemon(Pid),
+ ok
+ end
+ catch
+ error:{badmatch,{error,"Connection closed"}} ->
+ ssh:stop_daemon(Pid),
+ {fail,"Too few connections accepted"}
+ end.
+
+%%--------------------------------------------------------------------
%% Internal functions ------------------------------------------------
%%--------------------------------------------------------------------
diff --git a/lib/ssh/test/ssh_test_lib.erl b/lib/ssh/test/ssh_test_lib.erl
index 6ed3dfa68c..00c25bf394 100644
--- a/lib/ssh/test/ssh_test_lib.erl
+++ b/lib/ssh/test/ssh_test_lib.erl
@@ -63,8 +63,13 @@ daemon(Host, Port, Options) ->
Error
end.
+
+
start_shell(Port, IOServer, UserDir) ->
- spawn_link(?MODULE, init_shell, [Port, IOServer, [{user_dir, UserDir}]]).
+ start_shell(Port, IOServer, UserDir, []).
+
+start_shell(Port, IOServer, UserDir, Options) ->
+ spawn_link(?MODULE, init_shell, [Port, IOServer, [{user_dir, UserDir}|Options]]).
start_shell(Port, IOServer) ->
spawn_link(?MODULE, init_shell, [Port, IOServer, []]).
@@ -91,18 +96,23 @@ loop_io_server(TestCase, Buff0) ->
{input, TestCase, Line} ->
loop_io_server(TestCase, Buff0 ++ [Line]);
{io_request, From, ReplyAs, Request} ->
+%%ct:pal("~p",[{io_request, From, ReplyAs, Request}]),
{ok, Reply, Buff} = io_request(Request, TestCase, From,
ReplyAs, Buff0),
+%%ct:pal("io_request(~p)-->~p",[Request,{ok, Reply, Buff}]),
io_reply(From, ReplyAs, Reply),
loop_io_server(TestCase, Buff);
{'EXIT',_, _} ->
- erlang:display('EXIT'),
+ erlang:display('ssh_test_lib:loop_io_server/2 EXIT'),
ok
end.
io_request({put_chars, Chars}, TestCase, _, _, Buff) ->
reply(TestCase, Chars),
{ok, ok, Buff};
+io_request({put_chars, unicode, Chars}, TestCase, _, _, Buff) when is_binary(Chars) ->
+ reply(TestCase, Chars),
+ {ok, ok, Buff};
io_request({put_chars, Enc, Chars}, TestCase, _, _, Buff) ->
reply(TestCase, unicode:characters_to_binary(Chars,Enc,latin1)),
{ok, ok, Buff};
@@ -120,11 +130,13 @@ io_request({get_line, _Enc,_}, _, _, _, [Line | Buff]) ->
io_reply(_, _, []) ->
ok;
io_reply(From, ReplyAs, Reply) ->
+%%ct:pal("io_reply ~p sending ~p ! ~p",[self(),From, {io_reply, ReplyAs, Reply}]),
From ! {io_reply, ReplyAs, Reply}.
reply(_, []) ->
ok;
reply(TestCase, Result) ->
+%%ct:pal("reply ~p sending ~p ! ~p",[self(), TestCase, Result]),
TestCase ! Result.
receive_exec_result(Msg) ->
diff --git a/lib/ssh/test/ssh_unicode_SUITE.erl b/lib/ssh/test/ssh_unicode_SUITE.erl
new file mode 100644
index 0000000000..cc916673b3
--- /dev/null
+++ b/lib/ssh/test/ssh_unicode_SUITE.erl
@@ -0,0 +1,587 @@
+%%
+%% %CopyrightBegin%
+%%
+%% Copyright Ericsson AB 2005-2014. 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%
+%%
+
+%% gerl +fnu
+%% ct:run_test([{suite,"ssh_unicode_SUITE"}, {logdir,"LOG"}]).
+
+-module(ssh_unicode_SUITE).
+
+%% Note: This directive should only be used in test suites.
+-compile(export_all).
+
+-include_lib("common_test/include/ct.hrl").
+-include_lib("kernel/include/file.hrl").
+
+% Default timetrap timeout
+-define(default_timeout, ?t:minutes(1)).
+
+-define(USER, "åke高兴").
+-define(PASSWD, "ärlig日本じん").
+-define('sftp.txt', "sftp瑞点.txt").
+-define('test.txt', "testハンス.txt").
+-define('link_test.txt', "link_test語.txt").
+
+-define(bindata, unicode:characters_to_binary("foobar å 一二三四いちにさんち") ).
+
+-define(NEWLINE, <<"\r\n">>).
+
+%%--------------------------------------------------------------------
+%% Common Test interface functions -----------------------------------
+%%--------------------------------------------------------------------
+
+%% suite() ->
+%% [{ct_hooks,[ts_install_cth]}].
+
+all() ->
+ [{group, sftp},
+ {group, shell}
+ ].
+
+
+init_per_suite(Config) ->
+ case {file:native_name_encoding(), (catch crypto:start())} of
+ {utf8, ok} ->
+ ssh:start(),
+ Config;
+ {utf8, _} ->
+ {skip,"Could not start crypto!"};
+ _ ->
+ {skip,"Not unicode filename enabled emulator"}
+ end.
+
+end_per_suite(Config) ->
+ ssh:stop(),
+ crypto:stop(),
+ Config.
+
+%%--------------------------------------------------------------------
+groups() ->
+ [{shell, [], [shell_no_unicode, shell_unicode_string]},
+ {sftp, [], [open_close_file, open_close_dir, read_file, read_dir,
+ write_file, rename_file, mk_rm_dir, remove_file, links,
+ retrieve_attributes, set_attributes, async_read, async_read_bin,
+ async_write
+ %% , position, pos_read, pos_write
+ ]}].
+
+init_per_group(Group, Config) when Group==sftp
+ ; Group==shell ->
+ PrivDir = ?config(priv_dir, Config),
+ SysDir = ?config(data_dir, Config),
+ Sftpd =
+ ssh_test_lib:daemon([{system_dir, SysDir},
+ {user_dir, PrivDir},
+ {user_passwords, [{?USER, ?PASSWD}]}]),
+ [{group,Group}, {sftpd, Sftpd} | Config];
+
+init_per_group(Group, Config) ->
+ [{group,Group} | Config].
+
+
+end_per_group(erlang_server, Config) ->
+ Config;
+end_per_group(_, Config) ->
+ Config.
+
+%%--------------------------------------------------------------------
+init_per_testcase(_Case, Config) ->
+ prep(Config),
+ TmpConfig0 = lists:keydelete(watchdog, 1, Config),
+ TmpConfig = lists:keydelete(sftp, 1, TmpConfig0),
+ Dog = ct:timetrap(?default_timeout),
+
+ case ?config(group, Config) of
+ sftp ->
+ {_Pid, Host, Port} = ?config(sftpd, Config),
+ {ok, ChannelPid, Connection} =
+ ssh_sftp:start_channel(Host, Port,
+ [{user, ?USER},
+ {password, ?PASSWD},
+ {user_interaction, false},
+ {silently_accept_hosts, true}]),
+ Sftp = {ChannelPid, Connection},
+ [{sftp, Sftp}, {watchdog, Dog} | TmpConfig];
+ shell ->
+ UserDir = ?config(priv_dir, Config),
+ process_flag(trap_exit, true),
+ {_Pid, _Host, Port} = ?config(sftpd, Config),
+ ct:sleep(500),
+ IO = ssh_test_lib:start_io_server(),
+ Shell = ssh_test_lib:start_shell(Port, IO, UserDir,
+ [{silently_accept_hosts, true},
+ {user,?USER},{password,?PASSWD}]),
+%%ct:pal("IO=~p, Shell=~p, self()=~p",[IO,Shell,self()]),
+ wait_for_erlang_first_line([{io,IO}, {shell,Shell} | Config])
+ end.
+
+
+wait_for_erlang_first_line(Config) ->
+ receive
+ {'EXIT', _, _} ->
+ {fail,no_ssh_connection};
+ <<"Eshell ",_/binary>> = ErlShellStart ->
+%% ct:pal("Erlang shell start: ~p~n", [ErlShellStart]),
+ Config;
+ Other ->
+ ct:pal("Unexpected answer from ssh server: ~p",[Other]),
+ {fail,unexpected_answer}
+ after 10000 ->
+ ct:pal("No answer from ssh-server"),
+ {fail,timeout}
+ end.
+
+
+
+end_per_testcase(rename_file, Config) ->
+ PrivDir = ?config(priv_dir, Config),
+ NewFileName = filename:join(PrivDir, ?'test.txt'),
+ file:delete(NewFileName),
+ end_per_testcase(Config);
+end_per_testcase(_TC, Config) ->
+ end_per_testcase(Config).
+
+end_per_testcase(Config) ->
+ catch exit(?config(shell,Config), kill),
+ case ?config(sftp, Config) of
+ {Sftp, Connection} ->
+ ssh_sftp:stop_channel(Sftp),
+ ssh:close(Connection);
+ _ ->
+ ok
+ end.
+
+%%--------------------------------------------------------------------
+%% Test Cases --------------------------------------------------------
+
+-define(chk_expected(Received,Expected),
+ (fun(R_,E_) when R_==E_ -> ok;
+ (R_,E_) -> ct:pal("Expected: ~p~nReceived: ~p~n", [E_,R_]),
+ E_ = R_
+ end)(Received,Expected)).
+
+-define(receive_chk(Ref,Expected),
+ (fun(E__) ->
+ receive
+ {async_reply, Ref, Received} when Received==E__ ->
+ ?chk_expected(Received, E__);
+ {async_reply, Ref, Received} when Received=/=E__ ->
+ ct:pal("Expected: ~p~nReceived: ~p~n", [E__,Received]),
+ E__ = Received;
+ Msg ->
+ ct:pal("Expected (Ref=~p): ~p", [Ref,E__]),
+ ct:fail(Msg)
+ end
+ end)(Expected)).
+
+%%--------------------------------------------------------------------
+
+
+open_close_file() ->
+ [{doc, "Test API functions open/3 and close/2"}].
+open_close_file(Config) when is_list(Config) ->
+ PrivDir = ?config(priv_dir, Config),
+ FileName = filename:join(PrivDir, ?'sftp.txt'),
+ {Sftp, _} = ?config(sftp, Config),
+
+ lists:foreach(
+ fun(Mode) ->
+ ct:log("Mode: ~p",[Mode]),
+ %% list_dir(PrivDir),
+ ok = open_close_file(Sftp, FileName, Mode)
+ end,
+ [
+ [read],
+ [write],
+ [write, creat],
+ [write, trunc],
+ [append],
+ [read, binary]
+ ]).
+
+open_close_file(Server, File, Mode) ->
+ {ok, Handle} = ssh_sftp:open(Server, File, Mode),
+ ok = ssh_sftp:close(Server, Handle).
+
+%%--------------------------------------------------------------------
+open_close_dir() ->
+ [{doc, "Test API functions opendir/2 and close/2"}].
+open_close_dir(Config) when is_list(Config) ->
+ PrivDir = ?config(priv_dir, Config),
+ {Sftp, _} = ?config(sftp, Config),
+ FileName = filename:join(PrivDir, ?'sftp.txt'),
+
+ {ok, Handle} = ssh_sftp:opendir(Sftp, PrivDir),
+ ok = ssh_sftp:close(Sftp, Handle),
+ {error, _} = ssh_sftp:opendir(Sftp, FileName).
+
+%%--------------------------------------------------------------------
+read_file() ->
+ [{doc, "Test API funtion read_file/2"}].
+read_file(Config) when is_list(Config) ->
+ PrivDir = ?config(priv_dir, Config),
+ FileName = filename:join(PrivDir, ?'sftp.txt'),
+ {Sftp, _} = ?config(sftp, Config),
+ ?chk_expected(ssh_sftp:read_file(Sftp,FileName), file:read_file(FileName)).
+
+%%--------------------------------------------------------------------
+read_dir() ->
+ [{doc,"Test API function list_dir/2"}].
+read_dir(Config) when is_list(Config) ->
+ PrivDir = ?config(priv_dir, Config),
+ {Sftp, _} = ?config(sftp, Config),
+ {ok, Files} = ssh_sftp:list_dir(Sftp, PrivDir),
+ ct:pal("sftp list dir: ~ts~n", [Files]).
+
+%%--------------------------------------------------------------------
+write_file() ->
+ [{doc, "Test API function write_file/2"}].
+write_file(Config) when is_list(Config) ->
+ PrivDir = ?config(priv_dir, Config),
+ FileName = filename:join(PrivDir, ?'sftp.txt'),
+ {Sftp, _} = ?config(sftp, Config),
+ ok = ssh_sftp:write_file(Sftp, FileName, [?bindata]),
+ ?chk_expected(file:read_file(FileName), {ok,?bindata}).
+
+%%--------------------------------------------------------------------
+remove_file() ->
+ [{doc,"Test API function delete/2"}].
+remove_file(Config) when is_list(Config) ->
+ PrivDir = ?config(priv_dir, Config),
+ FileName = filename:join(PrivDir, ?'sftp.txt'),
+ {Sftp, _} = ?config(sftp, Config),
+
+ {ok, Files} = ssh_sftp:list_dir(Sftp, PrivDir),
+ true = lists:member(filename:basename(FileName), Files),
+ ok = ssh_sftp:delete(Sftp, FileName),
+ {ok, NewFiles} = ssh_sftp:list_dir(Sftp, PrivDir),
+ false = lists:member(filename:basename(FileName), NewFiles),
+ {error, _} = ssh_sftp:delete(Sftp, FileName).
+%%--------------------------------------------------------------------
+rename_file() ->
+ [{doc, "Test API function rename_file/2"}].
+rename_file(Config) when is_list(Config) ->
+ PrivDir = ?config(priv_dir, Config),
+ FileName = filename:join(PrivDir, ?'sftp.txt'),
+ NewFileName = filename:join(PrivDir, ?'test.txt'),
+
+ {Sftp, _} = ?config(sftp, Config),
+ {ok, Files} = ssh_sftp:list_dir(Sftp, PrivDir),
+ ct:pal("FileName: ~ts~nFiles: ~ts~n", [FileName, [[$\n,$ ,F]||F<-Files] ]),
+ true = lists:member(filename:basename(FileName), Files),
+ false = lists:member(filename:basename(NewFileName), Files),
+ ok = ssh_sftp:rename(Sftp, FileName, NewFileName),
+ {ok, NewFiles} = ssh_sftp:list_dir(Sftp, PrivDir),
+ ct:pal("FileName: ~ts, Files: ~ts~n", [FileName, [[$\n,F]||F<-NewFiles] ]),
+
+ false = lists:member(filename:basename(FileName), NewFiles),
+ true = lists:member(filename:basename(NewFileName), NewFiles).
+
+%%--------------------------------------------------------------------
+mk_rm_dir() ->
+ [{doc,"Test API functions make_dir/2, del_dir/2"}].
+mk_rm_dir(Config) when is_list(Config) ->
+ PrivDir = ?config(priv_dir, Config),
+ {Sftp, _} = ?config(sftp, Config),
+
+ DirName = filename:join(PrivDir, "test"),
+ ok = ssh_sftp:make_dir(Sftp, DirName),
+ ok = ssh_sftp:del_dir(Sftp, DirName),
+ NewDirName = filename:join(PrivDir, "foo/bar"),
+ {error, _} = ssh_sftp:make_dir(Sftp, NewDirName),
+ {error, _} = ssh_sftp:del_dir(Sftp, PrivDir).
+
+%%--------------------------------------------------------------------
+links() ->
+ [{doc,"Tests API function make_symlink/3"}].
+links(Config) when is_list(Config) ->
+ case os:type() of
+ {win32, _} ->
+ {skip, "Links are not fully supported by windows"};
+ _ ->
+ {Sftp, _} = ?config(sftp, Config),
+ PrivDir = ?config(priv_dir, Config),
+ FileName = filename:join(PrivDir, ?'sftp.txt'),
+ LinkFileName = filename:join(PrivDir, ?'link_test.txt'),
+
+ ok = ssh_sftp:make_symlink(Sftp, LinkFileName, FileName),
+ {ok, FileName} = ssh_sftp:read_link(Sftp, LinkFileName)
+ end.
+
+%%--------------------------------------------------------------------
+retrieve_attributes() ->
+ [{doc, "Test API function read_file_info/3"}].
+retrieve_attributes(Config) when is_list(Config) ->
+ PrivDir = ?config(priv_dir, Config),
+ FileName = filename:join(PrivDir, ?'sftp.txt'),
+
+ {Sftp, _} = ?config(sftp, Config),
+ {ok, FileInfo} = ssh_sftp:read_file_info(Sftp, FileName),
+ {ok, NewFileInfo} = file:read_file_info(FileName),
+
+ %% TODO comparison. There are some differences now is that ok?
+ ct:pal("SFTP: ~p~nFILE: ~p~n", [FileInfo, NewFileInfo]).
+
+%%--------------------------------------------------------------------
+set_attributes() ->
+ [{doc,"Test API function write_file_info/3"}].
+set_attributes(Config) when is_list(Config) ->
+ PrivDir = ?config(priv_dir, Config),
+ FileName = filename:join(PrivDir, ?'test.txt'),
+
+ {Sftp, _} = ?config(sftp, Config),
+ {ok,Fd} = file:open(FileName, write),
+ io:put_chars(Fd,"foo"),
+ ok = ssh_sftp:write_file_info(Sftp, FileName, #file_info{mode=8#400}),
+ {error, eacces} = file:write_file(FileName, "hello again"),
+ ssh_sftp:write_file_info(Sftp, FileName, #file_info{mode=8#600}),
+ ok = file:write_file(FileName, "hello again").
+
+%%--------------------------------------------------------------------
+
+async_read() ->
+ [{doc,"Test API aread/3"}].
+async_read(Config) when is_list(Config) ->
+ do_async_read(Config, false).
+
+async_read_bin() ->
+ [{doc,"Test API aread/3"}].
+async_read_bin(Config) when is_list(Config) ->
+ do_async_read(Config, true).
+
+do_async_read(Config, BinaryFlag) ->
+ {Sftp, _} = ?config(sftp, Config),
+ PrivDir = ?config(priv_dir, Config),
+ FileName = filename:join(PrivDir, ?'sftp.txt'),
+ {ok,ExpDataBin} = file:read_file(FileName),
+ ExpData = case BinaryFlag of
+ true -> ExpDataBin;
+ false -> binary_to_list(ExpDataBin)
+ end,
+ {ok, Handle} = ssh_sftp:open(Sftp, FileName, [read|case BinaryFlag of
+ true -> [binary];
+ false -> []
+ end]),
+ {async, Ref} = ssh_sftp:aread(Sftp, Handle, 20),
+ ?receive_chk(Ref, {ok,ExpData}).
+
+%%--------------------------------------------------------------------
+async_write() ->
+ [{doc,"Test API awrite/3"}].
+async_write(Config) when is_list(Config) ->
+ {Sftp, _} = ?config(sftp, Config),
+ PrivDir = ?config(priv_dir, Config),
+ FileName = filename:join(PrivDir, ?'test.txt'),
+ {ok, Handle} = ssh_sftp:open(Sftp, FileName, [write]),
+ Expected = ?bindata,
+ {async, Ref} = ssh_sftp:awrite(Sftp, Handle, Expected),
+
+ receive
+ {async_reply, Ref, ok} ->
+ {ok, Data} = file:read_file(FileName),
+ ?chk_expected(Data, Expected);
+ Msg ->
+ ct:fail(Msg)
+ end.
+
+%%--------------------------------------------------------------------
+
+position() ->
+ [{doc, "Test API functions position/3"}].
+position(Config) when is_list(Config) ->
+ PrivDir = ?config(priv_dir, Config),
+ FileName = filename:join(PrivDir, ?'test.txt'),
+ {Sftp, _} = ?config(sftp, Config),
+
+ Data = list_to_binary("1234567890"),
+ ssh_sftp:write_file(Sftp, FileName, [Data]),
+ {ok, Handle} = ssh_sftp:open(Sftp, FileName, [read]),
+
+ {ok, 3} = ssh_sftp:position(Sftp, Handle, {bof, 3}),
+ {ok, "4"} = ssh_sftp:read(Sftp, Handle, 1),
+
+ {ok, 10} = ssh_sftp:position(Sftp, Handle, eof),
+ eof = ssh_sftp:read(Sftp, Handle, 1),
+
+ {ok, 6} = ssh_sftp:position(Sftp, Handle, {bof, 6}),
+ {ok, "7"} = ssh_sftp:read(Sftp, Handle, 1),
+
+ {ok, 9} = ssh_sftp:position(Sftp, Handle, {cur, 2}),
+ {ok, "0"} = ssh_sftp:read(Sftp, Handle, 1),
+
+ {ok, 0} = ssh_sftp:position(Sftp, Handle, bof),
+ {ok, "1"} = ssh_sftp:read(Sftp, Handle, 1),
+
+ {ok, 1} = ssh_sftp:position(Sftp, Handle, cur),
+ {ok, "2"} = ssh_sftp:read(Sftp, Handle, 1).
+
+%%--------------------------------------------------------------------
+pos_read() ->
+ [{doc,"Test API functions pread/3 and apread/3"}].
+pos_read(Config) when is_list(Config) ->
+ PrivDir = ?config(priv_dir, Config),
+ FileName = filename:join(PrivDir, ?'test.txt'),
+ {Sftp, _} = ?config(sftp, Config),
+ Data = ?bindata,
+ ssh_sftp:write_file(Sftp, FileName, [Data]),
+
+ {ok, Handle} = ssh_sftp:open(Sftp, FileName, [read]),
+ {async, Ref} = ssh_sftp:apread(Sftp, Handle, {bof,5}, 4),
+
+ ?receive_chk(Ref, {ok,binary_part(Data,5,4)}),
+ ?chk_expected(ssh_sftp:pread(Sftp,Handle,{bof,4},4), {ok,binary_part(Data,4,4)}).
+
+
+%%--------------------------------------------------------------------
+pos_write() ->
+ [{doc,"Test API functions pwrite/4 and apwrite/4"}].
+pos_write(Config) when is_list(Config) ->
+ PrivDir = ?config(priv_dir, Config),
+ FileName = filename:join(PrivDir, ?'test.txt'),
+ {Sftp, _} = ?config(sftp, Config),
+
+ {ok, Handle} = ssh_sftp:open(Sftp, FileName, [write]),
+
+ Data = unicode:characters_to_list("再见"),
+ ssh_sftp:write_file(Sftp, FileName, [Data]),
+
+ NewData = unicode:characters_to_list(" さようなら"),
+ {async, Ref} = ssh_sftp:apwrite(Sftp, Handle, {bof, 2}, NewData),
+ ?receive_chk(Ref, ok),
+
+ ok = ssh_sftp:pwrite(Sftp, Handle, eof, unicode:characters_to_list(" adjö ")),
+
+ ?chk_expected(ssh_sftp:read_file(Sftp,FileName),
+ {ok,unicode:characters_to_binary("再见 さようなら adjö ")}).
+
+%%--------------------------------------------------------------------
+sftp_nonexistent_subsystem() ->
+ [{doc, "Try to execute sftp subsystem on a server that does not support it"}].
+sftp_nonexistent_subsystem(Config) when is_list(Config) ->
+ {_,Host, Port} = ?config(sftpd, Config),
+ {error,"server failed to start sftp subsystem"} =
+ ssh_sftp:start_channel(Host, Port,
+ [{user_interaction, false},
+ {user, ?USER},
+ {password, ?PASSWD},
+ {silently_accept_hosts, true}]).
+
+%%--------------------------------------------------------------------
+shell_no_unicode(Config) ->
+ do_shell(?config(io,Config),
+ [new_prompt,
+ {type,"io:format(\"hej ~p~n\",[42])."},
+ {expect,"hej 42"}
+ ]).
+
+%%--------------------------------------------------------------------
+shell_unicode_string(Config) ->
+ do_shell(?config(io,Config),
+ [new_prompt,
+ {type,"io:format(\"こにちわ~ts~n\",[\"四二\"])."},
+ {expect,"こにちわ四二"},
+ {expect,"ok"}
+ ]).
+
+%%--------------------------------------------------------------------
+%% Internal functions ------------------------------------------------
+%%--------------------------------------------------------------------
+prep(Config) ->
+ PrivDir = ?config(priv_dir, Config),
+ TestFile = filename:join(PrivDir, ?'sftp.txt'),
+ TestFile1 = filename:join(PrivDir, ?'test.txt'),
+ TestLink = filename:join(PrivDir, ?'link_test.txt'),
+
+ file:delete(TestFile),
+ file:delete(TestFile1),
+ file:delete(TestLink),
+
+ %% Initial config
+ DataDir = ?config(data_dir, Config),
+ FileName = filename:join(DataDir, ?'sftp.txt'),
+ {ok,_BytesCopied} = file:copy(FileName, TestFile),
+ Mode = 8#00400 bor 8#00200 bor 8#00040, % read & write owner, read group
+ {ok, FileInfo} = file:read_file_info(TestFile),
+ ok = file:write_file_info(TestFile,
+ FileInfo#file_info{mode = Mode}).
+
+
+%% list_dir(Dir) ->
+%% ct:pal("prep/1: ls(~p):~n~p~n~ts",[Dir, file:list_dir(Dir),
+%% begin
+%% {ok,DL} = file:list_dir(Dir),
+%% [[$\n|FN] || FN <- DL]
+%% end]).
+
+
+%%--------------------------------------------------------------------
+do_shell(IO, List) -> do_shell(IO, 0, List).
+
+do_shell(IO, N, [new_prompt|More]) ->
+ do_shell(IO, N+1, More);
+
+do_shell(IO, N, Ops=[{Order,Arg}|More]) ->
+ receive
+ X = <<"\r\n">> ->
+%% ct:pal("Skip newline ~p",[X]),
+ do_shell(IO, N, Ops);
+
+ <<P1,"> ">> when (P1-$0)==N ->
+ do_shell_prompt(IO, N, Order, Arg, More);
+
+ <<P1,P2,"> ">> when (P1-$0)*10 + (P2-$0) == N ->
+ do_shell_prompt(IO, N, Order, Arg, More);
+
+ Err when element(1,Err)==error ->
+ ct:fail("do_shell error: ~p~n",[Err]);
+
+ RecBin when Order==expect ; Order==expect_echo ->
+%% ct:pal("received ~p",[RecBin]),
+ RecStr = string:strip(unicode:characters_to_list(RecBin)),
+ ExpStr = string:strip(Arg),
+ case lists:prefix(ExpStr, RecStr) of
+ true when Order==expect ->
+ ct:pal("Matched ~ts",[RecStr]),
+ do_shell(IO, N, More);
+ true when Order==expect_echo ->
+ ct:pal("Matched echo ~ts",[RecStr]),
+ do_shell(IO, N, More);
+ false ->
+ ct:fail("*** Expected ~p, but got ~p",[string:strip(ExpStr),RecStr])
+ end
+ after 10000 ->
+ case Order of
+ expect -> ct:fail("timeout, expected ~p",[string:strip(Arg)]);
+ type -> ct:fail("timeout, no prompt")
+ end
+ end;
+
+do_shell(_, _, []) ->
+ ok.
+
+
+do_shell_prompt(IO, N, type, Str, More) ->
+%% ct:pal("Matched prompt ~p to trigger sending of next line to server",[N]),
+ IO ! {input, self(), Str++"\r\n"},
+ ct:pal("Promt '~p> ', Sent ~ts",[N,Str++"\r\n"]),
+ do_shell(IO, N, [{expect_echo,Str}|More]); % expect echo of the sent line
+do_shell_prompt(IO, N, Op, Str, More) ->
+%% ct:pal("Matched prompt ~p",[N]),
+ do_shell(IO, N, [{Op,Str}|More]).
+
+%%--------------------------------------------------------------------
diff --git a/lib/ssh/test/ssh_unicode_SUITE_data/sftp.txt b/lib/ssh/test/ssh_unicode_SUITE_data/sftp.txt
new file mode 100644
index 0000000000..3eaaddca21
--- /dev/null
+++ b/lib/ssh/test/ssh_unicode_SUITE_data/sftp.txt
@@ -0,0 +1 @@
+åäöÅÄÖ瑞語
diff --git a/lib/ssh/test/ssh_unicode_SUITE_data/sftp瑞点.txt b/lib/ssh/test/ssh_unicode_SUITE_data/sftp瑞点.txt
new file mode 100644
index 0000000000..3eaaddca21
--- /dev/null
+++ b/lib/ssh/test/ssh_unicode_SUITE_data/sftp瑞点.txt
@@ -0,0 +1 @@
+åäöÅÄÖ瑞語
diff --git a/lib/ssh/test/ssh_unicode_SUITE_data/ssh_host_dsa_key b/lib/ssh/test/ssh_unicode_SUITE_data/ssh_host_dsa_key
new file mode 100644
index 0000000000..51ab6fbd88
--- /dev/null
+++ b/lib/ssh/test/ssh_unicode_SUITE_data/ssh_host_dsa_key
@@ -0,0 +1,13 @@
+-----BEGIN DSA PRIVATE KEY-----
+MIIBuwIBAAKBgQCClaHzE2ul0gKSUxah5W0W8UiJLy4hXngKEqpaUq9SSdVdY2LK
+wVfKH1gt5iuaf1FfzOhsIC9G/GLnjYttXZc92cv/Gfe3gR+s0ni2++MX+T++mE/Q
+diltXv/Hp27PybS67SmiFW7I+RWnT2OKlMPtw2oUuKeztCe5UWjaj/y5FQIVAPLA
+l9RpiU30Z87NRAHY3NTRaqtrAoGANMRxw8UfdtNVR0CrQj3AgPaXOGE4d+G4Gp4X
+skvnCHycSVAjtYxebUkzUzt5Q6f/IabuLUdge3gXrc8BetvrcKbp+XZgM0/Vj2CF
+Ymmy3in6kzGZq7Fw1sZaku6AOU8vLa5woBT2vAcHLLT1bLAzj7viL048T6MfjrOP
+ef8nHvACgYBhDWFQJ1mf99sg92LalVq1dHLmVXb3PTJDfCO/Gz5NFmj9EZbAtdah
+/XcF3DeRF+eEoz48wQF/ExVxSMIhLdL+o+ElpVhlM7Yii+T7dPhkQfEul6zZXu+U
+ykSTXYUbtsfTNRFQGBW2/GfnEc0mnIxfn9v10NEWMzlq5z9wT9P0CgIVAN4wtL5W
+Lv62jKcdskxNyz2NQoBx
+-----END DSA PRIVATE KEY-----
+
diff --git a/lib/ssh/test/ssh_unicode_SUITE_data/ssh_host_dsa_key.pub b/lib/ssh/test/ssh_unicode_SUITE_data/ssh_host_dsa_key.pub
new file mode 100644
index 0000000000..4dbb1305b0
--- /dev/null
+++ b/lib/ssh/test/ssh_unicode_SUITE_data/ssh_host_dsa_key.pub
@@ -0,0 +1,11 @@
+---- BEGIN SSH2 PUBLIC KEY ----
+AAAAB3NzaC1kc3MAAACBAIKVofMTa6XSApJTFqHlbRbxSIkvLiFeeAoSqlpSr1JJ1V1j
+YsrBV8ofWC3mK5p/UV/M6GwgL0b8YueNi21dlz3Zy/8Z97eBH6zSeLb74xf5P76YT9B2
+KW1e/8enbs/JtLrtKaIVbsj5FadPY4qUw+3DahS4p7O0J7lRaNqP/LkVAAAAFQDywJfU
+aYlN9GfOzUQB2NzU0WqrawAAAIA0xHHDxR9201VHQKtCPcCA9pc4YTh34bganheyS+cI
+fJxJUCO1jF5tSTNTO3lDp/8hpu4tR2B7eBetzwF62+twpun5dmAzT9WPYIViabLeKfqT
+MZmrsXDWxlqS7oA5Ty8trnCgFPa8BwcstPVssDOPu+IvTjxPox+Os495/yce8AAAAIBh
+DWFQJ1mf99sg92LalVq1dHLmVXb3PTJDfCO/Gz5NFmj9EZbAtdah/XcF3DeRF+eEoz48
+wQF/ExVxSMIhLdL+o+ElpVhlM7Yii+T7dPhkQfEul6zZXu+UykSTXYUbtsfTNRFQGBW2
+/GfnEc0mnIxfn9v10NEWMzlq5z9wT9P0Cg==
+---- END SSH2 PUBLIC KEY ----
diff --git a/lib/ssh/vsn.mk b/lib/ssh/vsn.mk
index 8186f39888..40ed27d8f5 100644
--- a/lib/ssh/vsn.mk
+++ b/lib/ssh/vsn.mk
@@ -1,5 +1,5 @@
#-*-makefile-*- ; force emacs to enter makefile-mode
-SSH_VSN = 3.0
+SSH_VSN = 3.0.2
APP_VSN = "ssh-$(SSH_VSN)"
diff --git a/lib/ssl/doc/src/notes.xml b/lib/ssl/doc/src/notes.xml
index fb32ccec7b..c61b2a9c2f 100644
--- a/lib/ssl/doc/src/notes.xml
+++ b/lib/ssl/doc/src/notes.xml
@@ -25,7 +25,198 @@
<file>notes.xml</file>
</header>
<p>This document describes the changes made to the SSL application.</p>
- <section><title>SSL 5.3.2</title>
+ <section><title>SSL 5.3.4</title>
+
+ <section><title>Fixed Bugs and Malfunctions</title>
+ <list>
+ <item>
+ <p>
+ Fix incorrect dialyzer spec and types, also enhance
+ documentation. </p>
+ <p>
+ Thanks to Ayaz Tuncer.</p>
+ <p>
+ Own Id: OTP-11627</p>
+ </item>
+ <item>
+ <p>
+ Fix possible mismatch between SSL/TLS version and default
+ ciphers. Could happen when you specified SSL/TLS-version
+ in optionlist to listen or accept.</p>
+ <p>
+ Own Id: OTP-11712</p>
+ </item>
+ <item>
+ <p>
+ Application upgrade (appup) files are corrected for the
+ following applications: </p>
+ <p>
+ <c>asn1, common_test, compiler, crypto, debugger,
+ dialyzer, edoc, eldap, erl_docgen, et, eunit, gs, hipe,
+ inets, observer, odbc, os_mon, otp_mibs, parsetools,
+ percept, public_key, reltool, runtime_tools, ssh,
+ syntax_tools, test_server, tools, typer, webtool, wx,
+ xmerl</c></p>
+ <p>
+ A new test utility for testing appup files is added to
+ test_server. This is now used by most applications in
+ OTP.</p>
+ <p>
+ (Thanks to Tobias Schlager)</p>
+ <p>
+ Own Id: OTP-11744</p>
+ </item>
+ </list>
+ </section>
+
+
+ <section><title>Improvements and New Features</title>
+ <list>
+ <item>
+ <p>
+ Moved elliptic curve definition from the crypto
+ NIF/OpenSSL into Erlang code, adds the RFC-5639 brainpool
+ curves and makes TLS use them (RFC-7027).</p>
+ <p>
+ Thanks to Andreas Schultz</p>
+ <p>
+ Own Id: OTP-11578</p>
+ </item>
+ <item>
+ <p>
+ Unicode adaptations</p>
+ <p>
+ Own Id: OTP-11620</p>
+ </item>
+ <item>
+ <p>
+ Added option honor_cipher_order. This instructs the
+ server to prefer its own cipher ordering rather than the
+ client's and can help protect against things like BEAST
+ while maintaining compatability with clients which only
+ support older ciphers. </p>
+ <p>
+ Thanks to Andrew Thompson for the implementation, and
+ Andreas Schultz for the test cases.</p>
+ <p>
+ Own Id: OTP-11621</p>
+ </item>
+ <item>
+ <p>
+ Replace boolean checking in validate_option with
+ is_boolean guard. </p>
+ <p>
+ Thanks to Andreas Schultz.</p>
+ <p>
+ Own Id: OTP-11634</p>
+ </item>
+ <item>
+ <p>
+ Some function specs are corrected or moved and some edoc
+ comments are corrected in order to allow use of edoc.
+ (Thanks to Pierre Fenoll)</p>
+ <p>
+ Own Id: OTP-11702</p>
+ </item>
+ <item>
+ <p>
+ Correct clean up of certificate database when certs are
+ inputed in pure DER format.The incorrect code could cause
+ a memory leek when certs where inputed in DER. Thanks to
+ Bernard Duggan for reporting this.</p>
+ <p>
+ Own Id: OTP-11733</p>
+ </item>
+ <item>
+ <p>
+ Improved documentation of the cacertfile option</p>
+ <p>
+ Own Id: OTP-11759 Aux Id: seq12535 </p>
+ </item>
+ <item>
+ <p>
+ Avoid next protocol negotiation failure due to incorrect
+ option format.</p>
+ <p>
+ Own Id: OTP-11760</p>
+ </item>
+ <item>
+ <p>
+ Handle v1 CRLs, with no extensions and fixes issues with
+ IDP (Issuing Distribution Point) comparison during CRL
+ validation. </p>
+ <p>
+ Thanks to Andrew Thompson</p>
+ <p>
+ Own Id: OTP-11761</p>
+ </item>
+ <item>
+ <p>
+ Server now ignores client ECC curves that it does not
+ support instead of crashing. </p>
+ <p>
+ Thanks to Danil Zagoskin for reporting the issue and
+ suggesting a solution.</p>
+ <p>
+ Own Id: OTP-11780</p>
+ </item>
+ <item>
+ <p>
+ Handle SNI (Server Name Indication) alert
+ unrecognized_name and gracefully deal with unexpected
+ alerts. </p>
+ <p>
+ Thanks to Masatake Daimon for reporting this.</p>
+ <p>
+ Own Id: OTP-11815</p>
+ </item>
+ <item>
+ <p>
+ Add possibility to specify ssl options when calling
+ ssl:ssl_accept</p>
+ <p>
+ Own Id: OTP-11837</p>
+ </item>
+ </list>
+ </section>
+
+</section>
+
+<section><title>SSL 5.3.3</title>
+
+ <section><title>Fixed Bugs and Malfunctions</title>
+ <list>
+ <item>
+ <p>
+ Add missing validation of the server_name_indication
+ option and test for its explicit use. It was not possible
+ to set or disable the default server_name_indication as
+ the validation of the option was missing.</p>
+ <p>
+ Own Id: OTP-11567</p>
+ </item>
+ <item>
+ <p>
+ Elliptic curve selection in server mode now properly
+ selects a curve suggested by the client, if possible, and
+ the fallback alternative is changed to a more widely
+ supported curve.</p>
+ <p>
+ Own Id: OTP-11575</p>
+ </item>
+ <item>
+ <p>
+ Bug in the TLS hello extension handling caused the server
+ to behave as it did not understand secure renegotiation.</p>
+ <p>
+ Own Id: OTP-11595</p>
+ </item>
+ </list>
+ </section>
+
+</section>
+
+<section><title>SSL 5.3.2</title>
<section><title>Fixed Bugs and Malfunctions</title>
<list>
diff --git a/lib/ssl/doc/src/ssl.xml b/lib/ssl/doc/src/ssl.xml
index 80ef419fb7..ffee4bd1af 100644
--- a/lib/ssl/doc/src/ssl.xml
+++ b/lib/ssl/doc/src/ssl.xml
@@ -4,7 +4,7 @@
<erlref>
<header>
<copyright>
- <year>1999</year><year>2013</year>
+ <year>1999</year><year>2014</year>
<holder>Ericsson AB. All Rights Reserved.</holder>
</copyright>
<legalnotice>
@@ -184,12 +184,6 @@
<item> The DER encoded trusted certificates. If this option
is supplied it will override the cacertfile option.</item>
- <tag>{cacertfile, path()}</tag>
- <item>Path to file containing PEM encoded
- CA certificates (trusted certificates used for verifying a peer
- certificate). May be omitted if you do not want to verify
- the peer.</item>
-
<tag>{ciphers, ciphers()}</tag>
<item>The cipher suites that should be supported. The function
<c>cipher_suites/0</c> can be used to find all ciphers that are
@@ -354,7 +348,13 @@ fun(srp, Username :: string(), UserState :: term()) ->
<item>Specifies if client should try to reuse sessions
when possible.
</item>
-
+
+ <tag>{cacertfile, path()}</tag>
+ <item>The path to a file containing PEM encoded CA certificates. The CA
+ certificates are used during server authentication and when building the
+ client certificate chain.
+ </item>
+
<tag>{client_preferred_next_protocols, {Precedence :: server | client, ClientPrefs :: [binary()]}}</tag>
<tag>{client_preferred_next_protocols, {Precedence :: server | client, ClientPrefs :: [binary()], Default :: binary()}}</tag>
<item>
@@ -403,7 +403,17 @@ fun(srp, Username :: string(), UserState :: term()) ->
meaning in the server than in the client.</p>
<taglist>
-
+
+ <tag>{cacertfile, path()}</tag>
+ <item>The path to a file containing PEM encoded CA
+ certificates. The CA certificates are used to build the server
+ certificate chain, and for client authentication. Also the CAs
+ are used in the list of acceptable client CAs passed to the
+ client when a certificate is requested. May be omitted if there
+ is no need to verify the client and if there are not any
+ intermediate CAs for the server certificate.
+ </item>
+
<tag>{dh, der_encoded()}</tag>
<item>The DER encoded Diffie Hellman parameters. If this option
is supplied it will override the dhfile option.
@@ -460,6 +470,10 @@ fun(srp, Username :: string(), UserState :: term()) ->
</item>
<tag>{log_alert, boolean()}</tag>
<item>If false, error reports will not be displayed.</item>
+ <tag>{honor_cipher_order, boolean()}</tag>
+ <item>If true, use the server's preference for cipher selection. If false
+ (the default), use the client's preference.
+ </item>
</taglist>
</section>
@@ -754,39 +768,45 @@ fun(srp, Username :: string(), UserState :: term()) ->
</func>
<func>
- <name>ssl_accept(ListenSocket) -> </name>
- <name>ssl_accept(ListenSocket, Timeout) -> ok | {error, Reason}</name>
- <fsummary>Perform server-side SSL handshake</fsummary>
+ <name>ssl_accept(Socket) -> </name>
+ <name>ssl_accept(Socket, Timeout) -> ok | {error, Reason}</name>
+ <fsummary>Perform server-side SSL/TLS handshake</fsummary>
<type>
- <v>ListenSocket = sslsocket()</v>
+ <v>Socket = sslsocket()</v>
<v>Timeout = integer()</v>
<v>Reason = term()</v>
</type>
<desc>
- <p>The <c>ssl_accept</c> function establish the SSL connection
- on the server side. It should be called directly after
- <c>transport_accept</c>, in the spawned server-loop.</p>
+ <p> Performs the SSL/TLS server-side handshake <c>Socket</c> is a socket as returned
+ by <seealso
+ marker="#transport_accept-2">ssl:transport_accept/[1,2]</seealso>
+ </p>
</desc>
</func>
<func>
- <name>ssl_accept(ListenSocket, SslOptions) -> </name>
- <name>ssl_accept(ListenSocket, SslOptions, Timeout) -> {ok, Socket} | {error, Reason}</name>
- <fsummary>Perform server-side SSL handshake</fsummary>
+ <name>ssl_accept(Socket, SslOptions) -> </name>
+ <name>ssl_accept(Socket, SslOptions, Timeout) -> {ok, Socket} | ok | {error, Reason}</name>
+ <fsummary>Perform server-side SSL/TLS handshake</fsummary>
<type>
- <v>ListenSocket = socket()</v>
+ <v>Socket = socket() | sslsocket() </v>
<v>SslOptions = ssloptions()</v>
<v>Timeout = integer()</v>
<v>Reason = term()</v>
</type>
<desc>
- <p> Upgrades a gen_tcp, or
- equivalent, socket to an ssl socket i.e. performs the
- ssl server-side handshake.</p>
+ <p> If <c>Socket</c> is a socket() - upgrades a gen_tcp, or equivalent, socket to an ssl socket
+ i.e. performs the SSL/TLS server-side handshake and returns the ssl socket.
+ </p>
+
<warning><p>Note that the listen socket should be in {active, false} mode
before telling the client that the server is ready to upgrade
- and calling this function, otherwise the upgrade may
+ by calling this function, otherwise the upgrade may
or may not succeed depending on timing.</p></warning>
+
+ <p> If <c>Socket</c> is an sslsocket() - provides additional SSL/TLS options to those specified in <seealso
+ marker="#listen-2">ssl:listen/2 </seealso> and then performs the SSL/TLS handshake.
+ </p>
</desc>
</func>
@@ -828,33 +848,38 @@ fun(srp, Username :: string(), UserState :: term()) ->
</func>
<func>
- <name>transport_accept(Socket) -></name>
- <name>transport_accept(Socket, Timeout) ->
+ <name>transport_accept(ListenSocket) -></name>
+ <name>transport_accept(ListenSocket, Timeout) ->
{ok, NewSocket} | {error, Reason}</name>
<fsummary>Accept an incoming connection and
prepare for <c>ssl_accept</c></fsummary>
<type>
- <v>Socket = NewSocket = sslsocket()</v>
+ <v>ListenSocket = NewSocket = sslsocket()</v>
<v>Timeout = integer()</v>
<v>Reason = reason()</v>
</type>
<desc>
<p>Accepts an incoming connection request on a listen socket.
- <c>ListenSocket</c> must be a socket returned from
- <c>listen/2</c>. The socket returned should be passed to
- <c>ssl_accept</c> to complete ssl handshaking and
- establishing the connection.</p>
+ <c>ListenSocket</c> must be a socket returned from
+ <seealso
+ marker="#listen-2"> ssl:listen/2</seealso>.
+ The socket returned should be passed to
+ <seealso marker="#ssl_accept-2"> ssl:ssl_accept[2,3]</seealso>
+ to complete handshaking i.e
+ establishing the SSL/TLS connection.</p>
<warning>
- <p>The socket returned can only be used with <c>ssl_accept</c>,
- no traffic can be sent or received before that call.</p>
+ <p>The socket returned can only be used with
+ <seealso marker="#ssl_accept-2"> ssl:ssl_accept[2,3]</seealso>
+ no traffic can be sent or received before that call.</p>
</warning>
<p>The accepted socket inherits the options set for
- <c>ListenSocket</c> in <c>listen/2</c>.</p>
+ <c>ListenSocket</c> in <seealso
+ marker="#listen-2"> ssl:listen/2</seealso>.</p>
<p>The default
- value for <c>Timeout</c> is <c>infinity</c>. If
- <c>Timeout</c> is specified, and no connection is accepted
- within the given time, <c>{error, timeout}</c> is
- returned.</p>
+ value for <c>Timeout</c> is <c>infinity</c>. If
+ <c>Timeout</c> is specified, and no connection is accepted
+ within the given time, <c>{error, timeout}</c> is
+ returned.</p>
</desc>
</func>
diff --git a/lib/ssl/internal_doc/ssl-implementation.txt b/lib/ssl/internal_doc/ssl-implementation.txt
deleted file mode 100644
index e5d6ac8cd0..0000000000
--- a/lib/ssl/internal_doc/ssl-implementation.txt
+++ /dev/null
@@ -1,52 +0,0 @@
-
-Important modules:
-
- module behaviour children
- ------ ---------
- ssl_app application ssl_sup
- ssl_sup supervisor ssl_server, ssl_broker_sup
- ssl_server gen_server -
- ssl_broker_sup supervisor ssl_broker
- ssl_broker gen_server -
-
-The ssl_server controls a port program that implements the SSL functionality.
-That port program uses the OpenSSL package.
-
-Each socket has a corresponding broker (listen, accept or connect). A broker
-is created and supervised by the ssl_broker_sup.
-
-All communication is between a user and a broker. The broker communicates
-with the ssl_server, that sends its commands to the port program and handles
-the port program responses, that are distributed to users through the
-brokers.
-
-There is a distinction between commands and data flow between the ssl_server
-and the port program. Each established connection between the user and the
-outside world consists of a local erlang socket (owned by the broker) that
-is read from and written to by the broker. At the other end of the local
-connection is a local socket in the port program.
-
-The "real" socket that connects to the outside world is in the port program
-(including listen sockets). The main purpose of the port program is to
-shuffle data between local sockets and outside world sockets, and detect and
-propagate read and write errors (including detection of closed sockets) to
-the ssl_server.
-
-There is documentation in the ssl_broker.erl module.
-
-There is also documentation in the esock.c and esock_openssl.c files.
-
-The ssl_pem.erl, ssl_pkix.erl and ssl_base64.erl modules are support
-modules for reading SSL certificates. Modules for parsing certificates
-are generated from ASN.1 modules in the `pkix' directory.
-
-The `examples' directory contains functions for generating certificates.
-Those certificates are used in the test suites.
-
-
-
-
-
-
-
-
diff --git a/lib/ssl/src/Makefile b/lib/ssl/src/Makefile
index 131b615277..7c4c8ec2cc 100644
--- a/lib/ssl/src/Makefile
+++ b/lib/ssl/src/Makefile
@@ -1,7 +1,7 @@
#
# %CopyrightBegin%
#
-# Copyright Ericsson AB 1999-2013. All Rights Reserved.
+# Copyright Ericsson AB 1999-2014. 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
@@ -66,6 +66,7 @@ MODULES= \
ssl_session \
ssl_session_cache \
ssl_socket \
+ ssl_listen_tracker_sup \
tls_record \
dtls_record \
ssl_record \
diff --git a/lib/ssl/src/dtls.erl b/lib/ssl/src/dtls.erl
index 1cad9560b5..780bddeb10 100644
--- a/lib/ssl/src/dtls.erl
+++ b/lib/ssl/src/dtls.erl
@@ -31,25 +31,29 @@
handshake/1, handshake/2, handshake/3]).
%%--------------------------------------------------------------------
+%%
+%% Description: Connect to a DTLS server.
+%%--------------------------------------------------------------------
+
-spec connect(host() | port(), [connect_option()]) -> {ok, #sslsocket{}} |
{error, reason()}.
+
+connect(Socket, Options) when is_port(Socket) ->
+ connect(Socket, Options, infinity).
+
-spec connect(host() | port(), [connect_option()] | inet:port_number(),
timeout() | list()) ->
{ok, #sslsocket{}} | {error, reason()}.
--spec connect(host() | port(), inet:port_number(), list(), timeout()) ->
- {ok, #sslsocket{}} | {error, reason()}.
-
-%%
-%% Description: Connect to an DTLS server.
-%%--------------------------------------------------------------------
-connect(Socket, Options) when is_port(Socket) ->
- connect(Socket, Options, infinity).
connect(Socket, SslOptions, Timeout) when is_port(Socket) ->
DTLSOpts = [{protocol, dtls} | SslOptions],
ssl:connect(Socket, DTLSOpts, Timeout);
connect(Host, Port, Options) ->
connect(Host, Port, Options, infinity).
+
+-spec connect(host() | port(), inet:port_number(), list(), timeout()) ->
+ {ok, #sslsocket{}} | {error, reason()}.
+
connect(Host, Port, Options, Timeout) ->
DTLSOpts = [{protocol, dtls} | Options],
ssl:connect(Host, Port, DTLSOpts, Timeout).
@@ -65,38 +69,44 @@ listen(Port, Options) ->
ssl:listen(Port, DTLSOpts).
%%--------------------------------------------------------------------
--spec accept(#sslsocket{}) -> {ok, #sslsocket{}} |
- {error, reason()}.
--spec accept(#sslsocket{}, timeout()) -> {ok, #sslsocket{}} |
- {error, reason()}.
%%
%% Description: Performs transport accept on an ssl listen socket
%%--------------------------------------------------------------------
+-spec accept(#sslsocket{}) -> {ok, #sslsocket{}} |
+ {error, reason()}.
accept(ListenSocket) ->
accept(ListenSocket, infinity).
+
+-spec accept(#sslsocket{}, timeout()) -> {ok, #sslsocket{}} |
+ {error, reason()}.
accept(Socket, Timeout) ->
ssl:transport_accept(Socket, Timeout).
%%--------------------------------------------------------------------
--spec handshake(#sslsocket{}) -> ok | {error, reason()}.
--spec handshake(#sslsocket{} | port(), timeout()| [ssl_option()
- | transport_option()]) ->
- ok | {ok, #sslsocket{}} | {error, reason()}.
--spec handshake(port(), [ssl_option()| transport_option()], timeout()) ->
- {ok, #sslsocket{}} | {error, reason()}.
%%
%% Description: Performs accept on an ssl listen socket. e.i. performs
%% ssl handshake.
%%--------------------------------------------------------------------
+-spec handshake(#sslsocket{}) -> ok | {error, reason()}.
+
handshake(ListenSocket) ->
handshake(ListenSocket, infinity).
+
+-spec handshake(#sslsocket{} | port(), timeout()| [ssl_option()
+ | transport_option()]) ->
+ ok | {ok, #sslsocket{}} | {error, reason()}.
+
handshake(#sslsocket{} = Socket, Timeout) ->
ssl:ssl_accept(Socket, Timeout);
handshake(ListenSocket, SslOptions) when is_port(ListenSocket) ->
handshake(ListenSocket, SslOptions, infinity).
+
+-spec handshake(port(), [ssl_option()| transport_option()], timeout()) ->
+ {ok, #sslsocket{}} | {error, reason()}.
+
handshake(Socket, SslOptions, Timeout) when is_port(Socket) ->
ssl:ssl_accept(Socket, SslOptions, Timeout).
diff --git a/lib/ssl/src/dtls_connection.erl b/lib/ssl/src/dtls_connection.erl
index da2e076856..508983ddac 100644
--- a/lib/ssl/src/dtls_connection.erl
+++ b/lib/ssl/src/dtls_connection.erl
@@ -1,7 +1,7 @@
%%
%% %CopyrightBegin%
%%
-%% Copyright Ericsson AB 2013-2013. All Rights Reserved.
+%% Copyright Ericsson AB 2013-2014. All Rights Reserved.
%%
%% The contents of this file are subject to the Erlang Public License,
%% Version 1.1, (the "License"); you may not use this file except in
@@ -20,222 +20,515 @@
%% Internal application API
-%%====================================================================
+-behaviour(gen_fsm).
+
+-include("dtls_connection.hrl").
+-include("dtls_handshake.hrl").
+-include("ssl_alert.hrl").
+-include("dtls_record.hrl").
+-include("ssl_cipher.hrl").
+-include("ssl_api.hrl").
+-include("ssl_internal.hrl").
+-include("ssl_srp.hrl").
+-include_lib("public_key/include/public_key.hrl").
+
%% Internal application API
-%%====================================================================
+%% Setup
+-export([start_fsm/8]).
+
+%% State transition handling
+-export([next_record/1, next_state/4%,
+ %%next_state_connection/2
+ ]).
+
+%% Handshake handling
+-export([%%renegotiate/1,
+ send_handshake/2, send_change_cipher/2]).
+
+%% Alert and close handling
+-export([send_alert/2, handle_own_alert/4, %%handle_close_alert/3,
+ handle_normal_shutdown/3
+ %%handle_unexpected_message/3,
+ %%alert_user/5, alert_user/8
+ ]).
+
+%% Data handling
+-export([%%write_application_data/3,
+ read_application_data/2%%,
+%% passive_receive/2, next_record_if_active/1
+ ]).
+
+%% Called by tls_connection_sup
+-export([start_link/7]).
+%% gen_fsm callbacks
+-export([init/1, hello/2, certify/2, cipher/2,
+ abbreviated/2, connection/2, handle_event/3,
+ handle_sync_event/4, handle_info/3, terminate/3, code_change/4]).
-%% %%====================================================================
-%% %% State functions
-%% %%====================================================================
-
-%% -spec hello(start | #hello_request{} | #client_hello{} | #server_hello{} | term(),
-%% #state{}) -> gen_fsm_state_return().
-%% %%--------------------------------------------------------------------
-%% hello(start, #state{host = Host, port = Port, role = client,
-%% ssl_options = SslOpts,
-%% session = #session{own_certificate = Cert} = Session0,
-%% session_cache = Cache, session_cache_cb = CacheCb,
-%% connection_states = ConnectionStates0,
-%% renegotiation = {Renegotiation, _},
-%% client_cookie = Cookie} = State0) ->
-%% Hello = dtls_handshake:client_hello(Host, Port, Cookie, ConnectionStates0, SslOpts,
-%% Cache, CacheCb, Renegotiation, Cert),
-
-%% Version = Hello#client_hello.client_version,
-%% State1 = State0#state{negotiated_version = Version, %% Requested version
-%% session =
-%% Session0#session{session_id = Hello#client_hello.session_id},
-%% dtls_handshake_history = ssl_handshake:init_handshake_history()},
-
-%% State2 = send_flight(Hello, waiting, State1),
-
-%% {Record, State} = next_record(State2),
-%% next_state(hello, hello, Record, State);
-
-%% hello(start, #state{role = server} = State0) ->
-%% {Record, State} = next_record(State0),
-%% next_state(hello, hello, Record, State);
-
-%% hello(#hello_request{}, #state{role = client} = State0) ->
-%% {Record, State} = next_record(State0),
-%% next_state(hello, hello, Record, State);
-
-%% hello(#server_hello{cipher_suite = CipherSuite,
-%% compression_method = Compression} = Hello,
-%% #state{session = #session{session_id = OldId},
-%% connection_states = ConnectionStates0,
-%% role = client,
-%% negotiated_version = ReqVersion,
-%% renegotiation = {Renegotiation, _},
-%% ssl_options = SslOptions} = State1) ->
-%% State0 = flight_done(State1),
-%% case ssl_handshake:hello(Hello, SslOptions, ConnectionStates0, Renegotiation) of
-%% #alert{} = Alert ->
-%% handle_own_alert(Alert, ReqVersion, hello, State0);
-%% {Version, NewId, ConnectionStates, NextProtocol} ->
-%% {KeyAlgorithm, _, _, _} =
-%% ssl_cipher:suite_definition(CipherSuite),
-
-%% PremasterSecret = make_premaster_secret(ReqVersion, KeyAlgorithm),
-
-%% NewNextProtocol = case NextProtocol of
-%% undefined ->
-%% State0#state.next_protocol;
-%% _ ->
-%% NextProtocol
-%% end,
-
-%% State = State0#state{key_algorithm = KeyAlgorithm,
-%% hashsign_algorithm = default_hashsign(Version, KeyAlgorithm),
-%% negotiated_version = Version,
-%% connection_states = ConnectionStates,
-%% premaster_secret = PremasterSecret,
-%% expecting_next_protocol_negotiation = NextProtocol =/= undefined,
-%% next_protocol = NewNextProtocol},
-
-%% case ssl_session:is_new(OldId, NewId) of
-%% true ->
-%% handle_new_session(NewId, CipherSuite, Compression,
-%% State#state{connection_states = ConnectionStates});
-%% false ->
-%% handle_resumed_session(NewId, State#state{connection_states = ConnectionStates})
-%% end
-%% end;
-
-%% hello(#hello_verify_request{cookie = Cookie},
-%% #state{host = Host, port = Port,
-%% session = #session{own_certificate = Cert},
-%% session_cache = Cache, session_cache_cb = CacheCb,
-%% ssl_options = SslOpts,
-%% connection_states = ConnectionStates0,
-%% renegotiation = {Renegotiation, _}} = State0) ->
-%% Hello = ssl_handshake:client_hello(Host, Port, Cookie, ConnectionStates0, SslOpts,
-%% Cache, CacheCb, Renegotiation, Cert),
-%% State1 = State0#state{
-%% tls_handshake_history = ssl_handshake:init_handshake_history(),
-%% client_cookie = Cookie},
-%% State2 = send_flight(Hello, waiting, State1),
-
-%% {Record, State} = next_record(State2),
-%% next_state(hello, hello, Record, State);
-
-
-%% %%--------------------------------------------------------------------
-%% -spec abbreviated(#hello_request{} | #finished{} | term(),
-%% #state{}) -> gen_fsm_state_return().
-%% %%--------------------------------------------------------------------
-
-%% abbreviated(timeout, State) ->
-%% { next_state, abbreviated, State, hibernate };
-
-%% abbreviated(Msg, State) ->
-%% handle_unexpected_message(Msg, abbreviated, State).
-
-%% %%--------------------------------------------------------------------
-%% -spec certify(#hello_request{} | #certificate{} | #server_key_exchange{} |
-%% #certificate_request{} | #server_hello_done{} | #client_key_exchange{} | term(),
-%% #state{}) -> gen_fsm_state_return().
-%% %%--------------------------------------------------------------------
-
-
-%% certify(timeout, State) ->
-%% { next_state, certify, State, hibernate };
-
-%% certify(Msg, State) ->
-%% handle_unexpected_message(Msg, certify, State).
-
-
-%% %%--------------------------------------------------------------------
-%% -spec cipher(#hello_request{} | #certificate_verify{} | #finished{} | term(),
-%% #state{}) -> gen_fsm_state_return().
-%% %%--------------------------------------------------------------------
-
-%% cipher(timeout, State) ->
-%% { next_state, cipher, State, hibernate };
-
-%% cipher(Msg, State) ->
-%% handle_unexpected_message(Msg, cipher, State).
-
-%% %%--------------------------------------------------------------------
-%% -spec connection(#hello_request{} | #client_hello{} | term(),
-%% #state{}) -> gen_fsm_state_return().
-%% %%--------------------------------------------------------------------
-
-%% connection(timeout, State) ->
-%% {next_state, connection, State, hibernate};
-
-%% connection(Msg, State) ->
-%% handle_unexpected_message(Msg, connection, State).
-
-%% %%--------------------------------------------------------------------
-%% %%% Internal functions
-%% %%--------------------------------------------------------------------
-%% handle_unexpected_message(Msg, Info, #state{negotiated_version = Version} = State) ->
-%% Alert = ?ALERT_REC(?FATAL,?UNEXPECTED_MESSAGE),
-%% handle_own_alert(Alert, Version, {Info, Msg}, State).
-
-%% send_flight(HandshakeRec, FlightState, State) ->
-%% send_flight(FlightState, buffer_flight(HandshakeRec, State)).
-
-%% send_flight(FlightState, State = #state{negotiated_version = Version,
-%% flight_buffer = Buffer}) ->
-
-%% State1 = do_send_flight(queue:to_list(Buffer), [], State),
-%% finish_send_flight(Version, FlightState, State1).
-
-%% resend_flight(State = #state{negotiated_version = Version,
-%% flight_state = FlightState,
-%% flight_buffer = Buffer})
-%% when FlightState == finished; FlightState == waiting ->
-%% State1 = do_send_flight(queue:to_list(Buffer), [], State),
-%% finish_send_flight(Version, FlightState, State1);
-
-%% resend_flight(State) ->
-%% State.
-
-%% flight_done(State) ->
-%% cancel_dtls_retransmit_timer(State#state{flight_state = done,
-%% flight_buffer = undefined}).
-
-%% do_send_flight([], BinMsgs, State = #state{transport_cb = Transport, socket = Socket}) ->
-%% Transport:send(Socket, lists:reverse(BinMsgs)),
-%% State;
-%% do_send_flight([{Epoch, MsgSeq, HandshakeRec}|T], BinMsgs0,
-%% State = #state{negotiated_version = Version,
-%% connection_states = ConnectionStates0}) ->
-%% CS0 = ssl_record:connection_state_by_epoch(ConnectionStates0, Epoch, write),
-%% {BinMsgs, CS1} = encode_handshake_rec(HandshakeRec, Version, MsgSeq, BinMsgs0, CS0),
-%% ConnectionStates1 = ssl_record:set_connection_state_by_epoch(ConnectionStates0, CS1, write),
-%% do_send_flight(T, BinMsgs, State#state{connection_states = ConnectionStates1}).
-
-%% cancel_dtls_retransmit_timer(State = #state{dtls_retransmit_timer = TimerRef}) ->
-%% cancel_timer(TimerRef),
-%% State#state{dtls_retransmit_timer = undefined}.
-
-%% rearm_dtls_retransmit_timer(State = #state{dtls_retransmit_timer = undefined}) ->
-%% TimerRef = erlang:start_timer(1000, self(), dtls_retransmit),
-%% State#state{dtls_retransmit_timer = TimerRef};
-%% rearm_dtls_retransmit_timer(State) ->
-%% State.
-
-%% finish_send_flight({254, _}, waiting, State) ->
-%% TimerRef = erlang:start_timer(1000, self(), dtls_retransmit),
-%% State#state{
-%% dtls_retransmit_timer = TimerRef,
-%% last_retransmit = timestamp(),
-%% flight_state = waiting};
-
-%% finish_send_flight(_, FlightState, State) ->
-%% State#state{flight_state = FlightState}.
-
-%% timestamp() ->
-%% {Mega, Sec, Micro} = erlang:now(),
-%% Mega * 1000000 * 1000 + Sec * 1000 + (Micro div 1000).
-
-%% encode_handshake_rec(HandshakeRec, Version, MsgSeq, BinMsgs0, CS0) ->
-%% {_, Fragments} = ssl_handshake:encode_handshake(HandshakeRec, Version, MsgSeq, 1400),
-%% lists:foldl(fun(F, {Bin, C0}) ->
-%% {B, C1} = ssl_record:encode_handshake(F, Version, C0),
-%% {[B|Bin], C1} end, {BinMsgs0, CS0}, Fragments).
+%%====================================================================
+%% Internal application API
+%%====================================================================
+start_fsm(Role, Host, Port, Socket, {#ssl_options{erl_dist = false},_} = Opts,
+ User, {CbModule, _,_, _} = CbInfo,
+ Timeout) ->
+ try
+ {ok, Pid} = dtls_connection_sup:start_child([Role, Host, Port, Socket,
+ Opts, User, CbInfo]),
+ {ok, SslSocket} = ssl_connection:socket_control(?MODULE, Socket, Pid, CbModule),
+ ok = ssl_connection:handshake(SslSocket, Timeout),
+ {ok, SslSocket}
+ catch
+ error:{badmatch, {error, _} = Error} ->
+ Error
+ end;
+
+start_fsm(Role, Host, Port, Socket, {#ssl_options{erl_dist = true},_} = Opts,
+ User, {CbModule, _,_, _} = CbInfo,
+ Timeout) ->
+ try
+ {ok, Pid} = dtls_connection_sup:start_child_dist([Role, Host, Port, Socket,
+ Opts, User, CbInfo]),
+ {ok, SslSocket} = ssl_connection:socket_control(?MODULE, Socket, Pid, CbModule),
+ ok = ssl_connection:handshake(SslSocket, Timeout),
+ {ok, SslSocket}
+ catch
+ error:{badmatch, {error, _} = Error} ->
+ Error
+ end.
+
+send_handshake(Handshake, #state{negotiated_version = Version,
+ tls_handshake_history = Hist0,
+ connection_states = ConnectionStates0} = State0) ->
+ {BinHandshake, ConnectionStates, Hist} =
+ encode_handshake(Handshake, Version, ConnectionStates0, Hist0),
+ send_flight(BinHandshake, State0#state{connection_states = ConnectionStates,
+ tls_handshake_history = Hist
+ }).
+
+send_alert(Alert, #state{negotiated_version = Version,
+ socket = Socket,
+ transport_cb = Transport,
+ connection_states = ConnectionStates0} = State0) ->
+ {BinMsg, ConnectionStates} =
+ ssl_alert:encode(Alert, Version, ConnectionStates0),
+ Transport:send(Socket, BinMsg),
+ State0#state{connection_states = ConnectionStates}.
+
+send_change_cipher(Msg, #state{connection_states = ConnectionStates0,
+ socket = Socket,
+ negotiated_version = Version,
+ transport_cb = Transport} = State0) ->
+ {BinChangeCipher, ConnectionStates} =
+ encode_change_cipher(Msg, Version, ConnectionStates0),
+ Transport:send(Socket, BinChangeCipher),
+ State0#state{connection_states = ConnectionStates}.
+
+%%====================================================================
+%% tls_connection_sup API
+%%====================================================================
+
+%%--------------------------------------------------------------------
+-spec start_link(atom(), host(), inet:port_number(), port(), list(), pid(), tuple()) ->
+ {ok, pid()} | ignore | {error, reason()}.
+%%
+%% Description: Creates a gen_fsm process which calls Module:init/1 to
+%% initialize. To ensure a synchronized start-up procedure, this function
+%% does not return until Module:init/1 has returned.
+%%--------------------------------------------------------------------
+start_link(Role, Host, Port, Socket, Options, User, CbInfo) ->
+ {ok, proc_lib:spawn_link(?MODULE, init, [[Role, Host, Port, Socket, Options, User, CbInfo]])}.
+
+init([Role, Host, Port, Socket, {SSLOpts0, _} = Options, User, CbInfo]) ->
+ process_flag(trap_exit, true),
+ State0 = initial_state(Role, Host, Port, Socket, Options, User, CbInfo),
+ Handshake = ssl_handshake:init_handshake_history(),
+ TimeStamp = calendar:datetime_to_gregorian_seconds({date(), time()}),
+ try ssl_config:init(SSLOpts0, Role) of
+ {ok, Ref, CertDbHandle, FileRefHandle, CacheHandle, OwnCert, Key, DHParams} ->
+ Session = State0#state.session,
+ State = State0#state{
+ tls_handshake_history = Handshake,
+ session = Session#session{own_certificate = OwnCert,
+ time_stamp = TimeStamp},
+ file_ref_db = FileRefHandle,
+ cert_db_ref = Ref,
+ cert_db = CertDbHandle,
+ session_cache = CacheHandle,
+ private_key = Key,
+ diffie_hellman_params = DHParams},
+ gen_fsm:enter_loop(?MODULE, [], hello, State, get_timeout(State))
+ catch
+ throw:Error ->
+ gen_fsm:enter_loop(?MODULE, [], error, {Error,State0}, get_timeout(State0))
+ end.
+
+%%--------------------------------------------------------------------
+%% Description:There should be one instance of this function for each
+%% possible state name. Whenever a gen_fsm receives an event sent
+%% using gen_fsm:send_event/2, the instance of this function with the
+%% same name as the current state name StateName is called to handle
+%% the event. It is also called if a timeout occurs.
+%%
+hello(start, #state{host = Host, port = Port, role = client,
+ ssl_options = SslOpts,
+ session = #session{own_certificate = Cert} = Session0,
+ session_cache = Cache, session_cache_cb = CacheCb,
+ transport_cb = Transport, socket = Socket,
+ connection_states = ConnectionStates0,
+ renegotiation = {Renegotiation, _}} = State0) ->
+ Hello = dtls_handshake:client_hello(Host, Port, ConnectionStates0, SslOpts,
+ Cache, CacheCb, Renegotiation, Cert),
+
+ Version = Hello#client_hello.client_version,
+ Handshake0 = ssl_handshake:init_handshake_history(),
+ {BinMsg, ConnectionStates, Handshake} =
+ encode_handshake(Hello, Version, ConnectionStates0, Handshake0),
+ Transport:send(Socket, BinMsg),
+ State1 = State0#state{connection_states = ConnectionStates,
+ negotiated_version = Version, %% Requested version
+ session =
+ Session0#session{session_id = Hello#client_hello.session_id},
+ tls_handshake_history = Handshake},
+ {Record, State} = next_record(State1),
+ next_state(hello, hello, Record, State);
+
+hello(Hello = #client_hello{client_version = ClientVersion,
+ extensions = #hello_extensions{hash_signs = HashSigns}},
+ State = #state{connection_states = ConnectionStates0,
+ port = Port, session = #session{own_certificate = Cert} = Session0,
+ renegotiation = {Renegotiation, _},
+ session_cache = Cache,
+ session_cache_cb = CacheCb,
+ ssl_options = SslOpts}) ->
+ case dtls_handshake:hello(Hello, SslOpts, {Port, Session0, Cache, CacheCb,
+ ConnectionStates0, Cert}, Renegotiation) of
+ {Version, {Type, Session},
+ ConnectionStates,
+ #hello_extensions{ec_point_formats = EcPointFormats,
+ elliptic_curves = EllipticCurves} = ServerHelloExt} ->
+ HashSign = ssl_handshake:select_hashsign(HashSigns, Cert,
+ dtls_v1:corresponding_tls_version(Version)),
+ ssl_connection:hello({common_client_hello, Type, ServerHelloExt, HashSign},
+ State#state{connection_states = ConnectionStates,
+ negotiated_version = Version,
+ session = Session,
+ client_ecc = {EllipticCurves, EcPointFormats}}, ?MODULE);
+ #alert{} = Alert ->
+ handle_own_alert(Alert, ClientVersion, hello, State)
+ end;
+hello(Hello,
+ #state{connection_states = ConnectionStates0,
+ negotiated_version = ReqVersion,
+ role = client,
+ renegotiation = {Renegotiation, _},
+ ssl_options = SslOptions} = State) ->
+ case dtls_handshake:hello(Hello, SslOptions, ConnectionStates0, Renegotiation) of
+ #alert{} = Alert ->
+ handle_own_alert(Alert, ReqVersion, hello, State);
+ {Version, NewId, ConnectionStates, NextProtocol} ->
+ ssl_connection:handle_session(Hello,
+ Version, NewId, ConnectionStates, NextProtocol, State)
+ end;
+
+hello(Msg, State) ->
+ ssl_connection:hello(Msg, State, ?MODULE).
+
+abbreviated(Msg, State) ->
+ ssl_connection:abbreviated(Msg, State, ?MODULE).
+
+certify(Msg, State) ->
+ ssl_connection:certify(Msg, State, ?MODULE).
+
+cipher(Msg, State) ->
+ ssl_connection:cipher(Msg, State, ?MODULE).
+
+connection(#hello_request{}, #state{host = Host, port = Port,
+ session = #session{own_certificate = Cert} = Session0,
+ session_cache = Cache, session_cache_cb = CacheCb,
+ ssl_options = SslOpts,
+ connection_states = ConnectionStates0,
+ renegotiation = {Renegotiation, _}} = State0) ->
+ Hello = dtls_handshake:client_hello(Host, Port, ConnectionStates0, SslOpts,
+ Cache, CacheCb, Renegotiation, Cert),
+ %% TODO DTLS version State1 = send_handshake(Hello, State0),
+ State1 = State0,
+ {Record, State} =
+ next_record(
+ State1#state{session = Session0#session{session_id
+ = Hello#client_hello.session_id}}),
+ next_state(connection, hello, Record, State);
+
+connection(#client_hello{} = Hello, #state{role = server, allow_renegotiate = true} = State) ->
+ %% Mitigate Computational DoS attack
+ %% http://www.educatedguesswork.org/2011/10/ssltls_and_computational_dos.html
+ %% http://www.thc.org/thc-ssl-dos/ Rather than disabling client
+ %% initiated renegotiation we will disallow many client initiated
+ %% renegotiations immediately after each other.
+ erlang:send_after(?WAIT_TO_ALLOW_RENEGOTIATION, self(), allow_renegotiate),
+ hello(Hello, State#state{allow_renegotiate = false});
+
+connection(#client_hello{}, #state{role = server, allow_renegotiate = false} = State0) ->
+ Alert = ?ALERT_REC(?WARNING, ?NO_RENEGOTIATION),
+ State = send_alert(Alert, State0),
+ next_state_connection(connection, State);
+
+connection(Msg, State) ->
+ ssl_connection:connection(Msg, State, tls_connection).
+
+%%--------------------------------------------------------------------
+%% Description: Whenever a gen_fsm receives an event sent using
+%% gen_fsm:send_all_state_event/2, this function is called to handle
+%% the event. Not currently used!
+%%--------------------------------------------------------------------
+handle_event(_Event, StateName, State) ->
+ {next_state, StateName, State, get_timeout(State)}.
+
+%%--------------------------------------------------------------------
+%% Description: Whenever a gen_fsm receives an event sent using
+%% gen_fsm:sync_send_all_state_event/2,3, this function is called to handle
+%% the event.
+%%--------------------------------------------------------------------
+handle_sync_event(Event, From, StateName, State) ->
+ ssl_connection:handle_sync_event(Event, From, StateName, State).
+
+%%--------------------------------------------------------------------
+%% Description: This function is called by a gen_fsm when it receives any
+%% other message than a synchronous or asynchronous event
+%% (or a system message).
+%%--------------------------------------------------------------------
+
+%% raw data from socket, unpack records
+handle_info({Protocol, _, Data}, StateName,
+ #state{data_tag = Protocol} = State0) ->
+ %% Simplify for now to avoid dialzer warnings before implementation is compleate
+ %% case next_tls_record(Data, State0) of
+ %% {Record, State} ->
+ %% next_state(StateName, StateName, Record, State);
+ %% #alert{} = Alert ->
+ %% handle_normal_shutdown(Alert, StateName, State0),
+ %% {stop, {shutdown, own_alert}, State0}
+ %% end;
+ {Record, State} = next_tls_record(Data, State0),
+ next_state(StateName, StateName, Record, State);
+
+handle_info({CloseTag, Socket}, StateName,
+ #state{socket = Socket, close_tag = CloseTag,
+ negotiated_version = _Version} = State) ->
+ handle_normal_shutdown(?ALERT_REC(?FATAL, ?CLOSE_NOTIFY), StateName, State),
+ {stop, {shutdown, transport_closed}, State};
+
+handle_info(Msg, StateName, State) ->
+ ssl_connection:handle_info(Msg, StateName, State).
+
+%%--------------------------------------------------------------------
+%% Description:This function is called by a gen_fsm when it is about
+%% to terminate. It should be the opposite of Module:init/1 and do any
+%% necessary cleaning up. When it returns, the gen_fsm terminates with
+%% Reason. The return value is ignored.
+%%--------------------------------------------------------------------
+terminate(Reason, StateName, State) ->
+ ssl_connection:terminate(Reason, StateName, State).
+
+%%--------------------------------------------------------------------
+%% code_change(OldVsn, StateName, State, Extra) -> {ok, StateName, NewState}
+%% Description: Convert process state when code is changed
+%%--------------------------------------------------------------------
+code_change(_OldVsn, StateName, State, _Extra) ->
+ {ok, StateName, State}.
+
+%%--------------------------------------------------------------------
+%%% Internal functions
+%%--------------------------------------------------------------------
+encode_handshake(Handshake, Version, ConnectionStates0, Hist0) ->
+ Seq = sequence(ConnectionStates0),
+ {EncHandshake, FragmentedHandshake} = dtls_handshake:encode_handshake(Handshake, Version,
+ Seq),
+ Hist = ssl_handshake:update_handshake_history(Hist0, EncHandshake),
+ {Encoded, ConnectionStates} =
+ dtls_record:encode_handshake(FragmentedHandshake,
+ Version, ConnectionStates0),
+ {Encoded, ConnectionStates, Hist}.
+
+next_record(#state{%%flight = #flight{state = finished},
+ protocol_buffers =
+ #protocol_buffers{dtls_packets = [], dtls_cipher_texts = [CT | Rest]}
+ = Buffers,
+ connection_states = ConnStates0} = State) ->
+ case dtls_record:decode_cipher_text(CT, ConnStates0) of
+ {Plain, ConnStates} ->
+ {Plain, State#state{protocol_buffers =
+ Buffers#protocol_buffers{dtls_cipher_texts = Rest},
+ connection_states = ConnStates}};
+ #alert{} = Alert ->
+ {Alert, State}
+ end;
+next_record(#state{socket = Socket,
+ transport_cb = Transport} = State) -> %% when FlightState =/= finished
+ ssl_socket:setopts(Transport, Socket, [{active,once}]),
+ {no_record, State};
+
+
+next_record(State) ->
+ {no_record, State}.
+
+next_state(Current,_, #alert{} = Alert, #state{negotiated_version = Version} = State) ->
+ handle_own_alert(Alert, Version, Current, State);
+
+next_state(_,Next, no_record, State) ->
+ {next_state, Next, State, get_timeout(State)};
+
+%% next_state(_,Next, #ssl_tls{type = ?ALERT, fragment = EncAlerts}, State) ->
+%% Alerts = decode_alerts(EncAlerts),
+%% handle_alerts(Alerts, {next_state, Next, State, get_timeout(State)});
+
+next_state(Current, Next, #ssl_tls{type = ?HANDSHAKE, fragment = Data},
+ State0 = #state{protocol_buffers =
+ #protocol_buffers{dtls_handshake_buffer = Buf0} = Buffers,
+ negotiated_version = Version}) ->
+ Handle =
+ fun({#hello_request{} = Packet, _}, {next_state, connection = SName, State}) ->
+ %% This message should not be included in handshake
+ %% message hashes. Starts new handshake (renegotiation)
+ Hs0 = ssl_handshake:init_handshake_history(),
+ ?MODULE:SName(Packet, State#state{tls_handshake_history=Hs0,
+ renegotiation = {true, peer}});
+ ({#hello_request{} = Packet, _}, {next_state, SName, State}) ->
+ %% This message should not be included in handshake
+ %% message hashes. Already in negotiation so it will be ignored!
+ ?MODULE:SName(Packet, State);
+ ({#client_hello{} = Packet, Raw}, {next_state, connection = SName, State}) ->
+ Version = Packet#client_hello.client_version,
+ Hs0 = ssl_handshake:init_handshake_history(),
+ Hs1 = ssl_handshake:update_handshake_history(Hs0, Raw),
+ ?MODULE:SName(Packet, State#state{tls_handshake_history=Hs1,
+ renegotiation = {true, peer}});
+ ({Packet, Raw}, {next_state, SName, State = #state{tls_handshake_history=Hs0}}) ->
+ Hs1 = ssl_handshake:update_handshake_history(Hs0, Raw),
+ ?MODULE:SName(Packet, State#state{tls_handshake_history=Hs1});
+ (_, StopState) -> StopState
+ end,
+ try
+ {Packets, Buf} = tls_handshake:get_tls_handshake(Version,Data,Buf0),
+ State = State0#state{protocol_buffers =
+ Buffers#protocol_buffers{dtls_packets = Packets,
+ dtls_handshake_buffer = Buf}},
+ handle_dtls_handshake(Handle, Next, State)
+ catch throw:#alert{} = Alert ->
+ handle_own_alert(Alert, Version, Current, State0)
+ end;
+
+next_state(_, StateName, #ssl_tls{type = ?APPLICATION_DATA, fragment = Data}, State0) ->
+ %% Simplify for now to avoid dialzer warnings before implementation is compleate
+ %% case read_application_data(Data, State0) of
+ %% Stop = {stop,_,_} ->
+ %% Stop;
+ %% {Record, State} ->
+ %% next_state(StateName, StateName, Record, State)
+ %% end;
+ {Record, State} = read_application_data(Data, State0),
+ next_state(StateName, StateName, Record, State);
+
+next_state(Current, Next, #ssl_tls{type = ?CHANGE_CIPHER_SPEC, fragment = <<1>>} =
+ _ChangeCipher,
+ #state{connection_states = ConnectionStates0} = State0) ->
+ ConnectionStates1 =
+ ssl_record:activate_pending_connection_state(ConnectionStates0, read),
+ {Record, State} = next_record(State0#state{connection_states = ConnectionStates1}),
+ next_state(Current, Next, Record, State);
+next_state(Current, Next, #ssl_tls{type = _Unknown}, State0) ->
+ %% Ignore unknown type
+ {Record, State} = next_record(State0),
+ next_state(Current, Next, Record, State).
+
+handle_dtls_handshake(Handle, StateName,
+ #state{protocol_buffers =
+ #protocol_buffers{dtls_packets = [Packet]} = Buffers} = State) ->
+ FsmReturn = {next_state, StateName, State#state{protocol_buffers =
+ Buffers#protocol_buffers{dtls_packets = []}}},
+ Handle(Packet, FsmReturn);
+
+handle_dtls_handshake(Handle, StateName,
+ #state{protocol_buffers =
+ #protocol_buffers{dtls_packets = [Packet | Packets]} = Buffers} =
+ State0) ->
+ FsmReturn = {next_state, StateName, State0#state{protocol_buffers =
+ Buffers#protocol_buffers{dtls_packets =
+ Packets}}},
+ case Handle(Packet, FsmReturn) of
+ {next_state, NextStateName, State, _Timeout} ->
+ handle_dtls_handshake(Handle, NextStateName, State);
+ {stop, _,_} = Stop ->
+ Stop
+ end.
+
+
+send_flight(Fragments, #state{transport_cb = Transport, socket = Socket,
+ protocol_buffers = _PBuffers} = State) ->
+ Transport:send(Socket, Fragments),
+ %% Start retransmission
+ %% State#state{protocol_buffers =
+ %% (PBuffers#protocol_buffers){ #flight{state = waiting}}}}.
+ State.
+
+handle_own_alert(_,_,_, State) -> %% Place holder
+ {stop, {shutdown, own_alert}, State}.
+
+handle_normal_shutdown(_, _, _State) -> %% Place holder
+ ok.
+
+encode_change_cipher(#change_cipher_spec{}, Version, ConnectionStates) ->
+ dtls_record:encode_change_cipher_spec(Version, ConnectionStates).
+
+initial_state(Role, Host, Port, Socket, {SSLOptions, SocketOptions}, User,
+ {CbModule, DataTag, CloseTag, ErrorTag}) ->
+ ConnectionStates = ssl_record:init_connection_states(Role),
+
+ SessionCacheCb = case application:get_env(ssl, session_cb) of
+ {ok, Cb} when is_atom(Cb) ->
+ Cb;
+ _ ->
+ ssl_session_cache
+ end,
+
+ Monitor = erlang:monitor(process, User),
+
+ #state{socket_options = SocketOptions,
+ %% We do not want to save the password in the state so that
+ %% could be written in the clear into error logs.
+ ssl_options = SSLOptions#ssl_options{password = undefined},
+ session = #session{is_resumable = new},
+ transport_cb = CbModule,
+ data_tag = DataTag,
+ close_tag = CloseTag,
+ error_tag = ErrorTag,
+ role = Role,
+ host = Host,
+ port = Port,
+ socket = Socket,
+ connection_states = ConnectionStates,
+ protocol_buffers = #protocol_buffers{},
+ user_application = {Monitor, User},
+ user_data_buffer = <<>>,
+ session_cache_cb = SessionCacheCb,
+ renegotiation = {false, first},
+ start_or_recv_from = undefined,
+ send_queue = queue:new(),
+ protocol_cb = ?MODULE
+ }.
+read_application_data(_,State) ->
+ {#ssl_tls{fragment = <<"place holder">>}, State}.
+
+next_tls_record(_, State) ->
+ {#ssl_tls{fragment = <<"place holder">>}, State}.
+
+get_timeout(_) -> %% Place holder
+ infinity.
+
+next_state_connection(_, State) -> %% Place holder
+ {next_state, connection, State, get_timeout(State)}.
+
+sequence(_) ->
+ %%TODO real imp
+ 1.
diff --git a/lib/ssl/src/dtls_connection.hrl b/lib/ssl/src/dtls_connection.hrl
index b8dff479d5..08707dc8de 100644
--- a/lib/ssl/src/dtls_connection.hrl
+++ b/lib/ssl/src/dtls_connection.hrl
@@ -1,7 +1,7 @@
%%
%% %CopyrightBegin%
%%
-%% Copyright Ericsson AB 2013-2013. All Rights Reserved.
+%% Copyright Ericsson AB 2013-2014. 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
@@ -28,24 +28,19 @@
-include("ssl_connection.hrl").
-record(protocol_buffers, {
- dtls_packets = [] ::[binary()], % Not yet handled decode ssl/tls packets.
- dtls_record_buffer :: binary(), % Buffer of incomplete records
- dtls_handshake_buffer :: binary(), % Buffer of incomplete handshakes
- dtls_cipher_texts :: [binary()],
- dtls_cipher_texts_next :: [binary()] % Received for Epoch not yet active
+ dtls_packets = [], %%::[binary()], % Not yet handled decode ssl/tls packets.
+ dtls_record_buffer = <<>>, %%:: binary(), % Buffer of incomplete records
+ dtls_handshake_buffer = <<>>, %%:: binary(), % Buffer of incomplete handshakes
+ dtls_cipher_texts = [], %%:: [binary()],
+ dtls_cipher_texts_next %%:: [binary()] % Received for Epoch not yet active
}).
-record(flight, {
last_retransmit,
last_read_seq,
msl_timer,
- flight_state,
- flight_buffer, % buffer of not yet ACKed TLS records
- }).
-
--record(message_sequences, {
- read = 0,
- write = 0
+ state,
+ buffer % buffer of not yet ACKed TLS records
}).
-endif. % -ifdef(dtls_connection).
diff --git a/lib/ssl/src/dtls_connection_sup.erl b/lib/ssl/src/dtls_connection_sup.erl
index 9fe545be18..0b4711cfb4 100644
--- a/lib/ssl/src/dtls_connection_sup.erl
+++ b/lib/ssl/src/dtls_connection_sup.erl
@@ -1,7 +1,7 @@
%%
%% %CopyrightBegin%
%%
-%% Copyright Ericsson AB 2007-2013. All Rights Reserved.
+%% Copyright Ericsson AB 2007-2014. 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
@@ -26,8 +26,8 @@
-behaviour(supervisor).
%% API
--export([start_link/0]).
--export([start_child/1]).
+-export([start_link/0, start_link_dist/0]).
+-export([start_child/1, start_child_dist/1]).
%% Supervisor callback
-export([init/1]).
@@ -38,8 +38,14 @@
start_link() ->
supervisor:start_link({local, ?MODULE}, ?MODULE, []).
+start_link_dist() ->
+ supervisor:start_link({local, dtls_connection_sup_dist}, ?MODULE, []).
+
start_child(Args) ->
supervisor:start_child(?MODULE, Args).
+
+start_child_dist(Args) ->
+ supervisor:start_child(dtls_connection_sup_dist, Args).
%%%=========================================================================
%%% Supervisor callback
diff --git a/lib/ssl/src/dtls_handshake.erl b/lib/ssl/src/dtls_handshake.erl
index 5db2434753..31d525b295 100644
--- a/lib/ssl/src/dtls_handshake.erl
+++ b/lib/ssl/src/dtls_handshake.erl
@@ -1,7 +1,7 @@
%%
%% %CopyrightBegin%
%%
-%% Copyright Ericsson AB 2013-2013. All Rights Reserved.
+%% Copyright Ericsson AB 2013-2014. All Rights Reserved.
%%
%% The contents of this file are subject to the Erlang Public License,
%% Version 1.1, (the "License"); you may not use this file except in
@@ -20,11 +20,15 @@
-include("dtls_handshake.hrl").
-include("dtls_record.hrl").
-include("ssl_internal.hrl").
+-include("ssl_alert.hrl").
--export([client_hello/8, client_hello/9, hello/3,
+-export([client_hello/8, client_hello/9, hello/4,
get_dtls_handshake/2,
- dtls_handshake_new_flight/1, dtls_handshake_new_epoch/1,
- encode_handshake/4]).
+ %%dtls_handshake_new_flight/1, dtls_handshake_new_epoch/1,
+ encode_handshake/3]).
+
+-type dtls_handshake() :: #client_hello{} | #hello_verify_request{} |
+ ssl_handshake:ssl_handshake().
%%====================================================================
%% Internal application API
@@ -54,12 +58,12 @@ client_hello(Host, Port, Cookie, ConnectionStates,
ciphers = UserSuites
} = SslOpts,
Cache, CacheCb, Renegotiation, OwnCert) ->
- Version = dtls_record:highest_protocol_version(Versions),
+ Version = dtls_record:highest_protocol_version(Versions),
Pending = ssl_record:pending_connection_state(ConnectionStates, read),
SecParams = Pending#connection_state.security_parameters,
CipherSuites = ssl_handshake:available_suites(UserSuites, Version),
- Extensions = ssl_handshake:client_hello_extensions(Host, Version, CipherSuites,
+ Extensions = ssl_handshake:client_hello_extensions(Host, dtls_v1:corresponding_tls_version(Version), CipherSuites,
SslOpts, ConnectionStates, Renegotiation),
Id = ssl_session:client_id({Host, Port, SslOpts}, Cache, CacheCb, OwnCert),
@@ -73,163 +77,197 @@ client_hello(Host, Port, Cookie, ConnectionStates,
extensions = Extensions
}.
-hello(Address, Port,
- #ssl_tls{epoch = _Epoch, record_seq = _Seq,
- version = Version} = Record) ->
- {[{Hello, _}], _, _} =
- get_dtls_handshake(Record,
- dtls_handshake_new_flight(undefined)),
- #client_hello{client_version = {Major, Minor},
- random = Random,
- session_id = SessionId,
- cipher_suites = CipherSuites,
- compression_methods = CompressionMethods} = Hello,
- CookieData = [address_to_bin(Address, Port),
- <<?BYTE(Major), ?BYTE(Minor)>>,
- Random, SessionId, CipherSuites, CompressionMethods],
- Cookie = crypto:hmac(sha, <<"secret">>, CookieData),
-
- case Hello of
- #client_hello{cookie = Cookie} ->
- accept;
- _ ->
- %% generate HelloVerifyRequest
- HelloVerifyRequest = encode_handshake(#hello_verify_request{protocol_version = Version,
- cookie = Cookie},
- Version, 0, 1400),
- {reply, HelloVerifyRequest}
- end.
+hello(#server_hello{server_version = Version, random = Random,
+ cipher_suite = CipherSuite,
+ compression_method = Compression,
+ session_id = SessionId, extensions = HelloExt},
+ #ssl_options{versions = SupportedVersions} = SslOpt,
+ ConnectionStates0, Renegotiation) ->
+ case dtls_record:is_acceptable_version(Version, SupportedVersions) of
+ true ->
+ handle_server_hello_extensions(Version, SessionId, Random, CipherSuite,
+ Compression, HelloExt, SslOpt, ConnectionStates0, Renegotiation);
+ false ->
+ ?ALERT_REC(?FATAL, ?PROTOCOL_VERSION)
+ end;
-%%--------------------------------------------------------------------
-encode_handshake(Package, Version, MsgSeq, Mss) ->
- {MsgType, Bin} = enc_hs(Package, Version),
+hello(#client_hello{client_version = ClientVersion}, _Options, {_,_,_,_,ConnectionStates,_}, _Renegotiation) ->
+ %% Return correct typ to make dialyzer happy until we have time to make the real imp.
+ {ClientVersion, {new, #session{}}, ConnectionStates, #hello_extensions{}}.
+
+%% hello(Address, Port,
+%% #ssl_tls{epoch = _Epoch, sequence_number = _Seq,
+%% version = Version} = Record) ->
+%% case get_dtls_handshake(Record,
+%% dtls_handshake_new_flight(undefined)) of
+%% {[Hello | _], _} ->
+%% hello(Address, Port, Version, Hello);
+%% {retransmit, HandshakeState} ->
+%% {retransmit, HandshakeState}
+%% end.
+
+%% hello(Address, Port, Version, Hello) ->
+%% #client_hello{client_version = {Major, Minor},
+%% random = Random,
+%% session_id = SessionId,
+%% cipher_suites = CipherSuites,
+%% compression_methods = CompressionMethods} = Hello,
+%% CookieData = [address_to_bin(Address, Port),
+%% <<?BYTE(Major), ?BYTE(Minor)>>,
+%% Random, SessionId, CipherSuites, CompressionMethods],
+%% Cookie = crypto:hmac(sha, <<"secret">>, CookieData),
+
+%% case Hello of
+%% #client_hello{cookie = Cookie} ->
+%% accept;
+%% _ ->
+%% %% generate HelloVerifyRequest
+%% HelloVerifyRequest = enc_hs(#hello_verify_request{protocol_version = Version,
+%% cookie = Cookie},
+%% Version, 0, 1400),
+%% {reply, HelloVerifyRequest}
+%% end.
+
+%% %%--------------------------------------------------------------------
+encode_handshake(Handshake, Version, MsgSeq) ->
+ {MsgType, Bin} = enc_handshake(Handshake, Version),
Len = byte_size(Bin),
- HsHistory = [MsgType, ?uint24(Len), ?uint16(MsgSeq), ?uint24(0), ?uint24(Len), Bin],
- BinMsg = dtls_split_handshake(Mss, MsgType, Len, MsgSeq, Bin, 0, []),
- {HsHistory, BinMsg}.
+ EncHandshake = [MsgType, ?uint24(Len), ?uint16(MsgSeq), ?uint24(0), ?uint24(Len), Bin],
+ FragmentedHandshake = dtls_fragment(erlang:iolist_size(EncHandshake), MsgType, Len, MsgSeq, Bin, 0, []),
+ {EncHandshake, FragmentedHandshake}.
-%--------------------------------------------------------------------
+%%--------------------------------------------------------------------
-spec get_dtls_handshake(#ssl_tls{}, #dtls_hs_state{} | binary()) ->
- {[dtls_handshake()], #dtls_hs_state{}} | {retransmit, #dtls_hs_state{}}.
-%
-% Description: Given a DTLS state and new data from ssl_record, collects
-% and returns it as a list of handshake messages, also returns a new
-% DTLS state
-%--------------------------------------------------------------------
-% get_dtls_handshake(Record, <<>>) ->
-% get_dtls_handshake_aux(Record, dtls_hs_state_init());
+ {[dtls_handshake()], #dtls_hs_state{}} | {retransmit, #dtls_hs_state{}}.
+%%
+%% Description: Given a DTLS state and new data from ssl_record, collects
+%% and returns it as a list of handshake messages, also returns a new
+%% DTLS state
+%%--------------------------------------------------------------------
+get_dtls_handshake(Record, <<>>) ->
+ get_dtls_handshake_aux(Record, #dtls_hs_state{}); %% Init handshake state!?
get_dtls_handshake(Record, HsState) ->
get_dtls_handshake_aux(Record, HsState).
-%--------------------------------------------------------------------
--spec dtls_handshake_new_epoch(#dtls_hs_state{}) -> #dtls_hs_state{}.
-%
-% Description: Reset the DTLS decoder state for a new Epoch
-%--------------------------------------------------------------------
-% dtls_handshake_new_epoch(<<>>) ->
-% dtls_hs_state_init();
-dtls_handshake_new_epoch(HsState) ->
- HsState#dtls_hs_state{highest_record_seq = 0,
- starting_read_seq = HsState#dtls_hs_state.current_read_seq,
- fragments = gb_trees:empty(), completed = []}.
-
-%--------------------------------------------------------------------
--spec dtls_handshake_new_flight(integer() | undefined) -> #dtls_hs_state{}.
-%
-% Description: Init the DTLS decoder state for a new Flight
-dtls_handshake_new_flight(ExpectedReadReq) ->
- #dtls_hs_state{current_read_seq = ExpectedReadReq,
- highest_record_seq = 0,
- starting_read_seq = 0,
- fragments = gb_trees:empty(), completed = []}.
+%% %%--------------------------------------------------------------------
+%% -spec dtls_handshake_new_epoch(#dtls_hs_state{}) -> #dtls_hs_state{}.
+%% %%
+%% %% Description: Reset the DTLS decoder state for a new Epoch
+%% %%--------------------------------------------------------------------
+%% dtls_handshake_new_epoch(<<>>) ->
+%% dtls_hs_state_init();
+%% dtls_handshake_new_epoch(HsState) ->
+%% HsState#dtls_hs_state{highest_record_seq = 0,
+%% starting_read_seq = HsState#dtls_hs_state.current_read_seq,
+%% fragments = gb_trees:empty(), completed = []}.
+
+%% %--------------------------------------------------------------------
+%% -spec dtls_handshake_new_flight(integer() | undefined) -> #dtls_hs_state{}.
+%% %
+%% % Description: Init the DTLS decoder state for a new Flight
+%% dtls_handshake_new_flight(ExpectedReadReq) ->
+%% #dtls_hs_state{current_read_seq = ExpectedReadReq,
+%% highest_record_seq = 0,
+%% starting_read_seq = 0,
+%% fragments = gb_trees:empty(), completed = []}.
%%--------------------------------------------------------------------
%%% Internal functions
%%--------------------------------------------------------------------
+handle_server_hello_extensions(Version, SessionId, Random, CipherSuite,
+ Compression, HelloExt, SslOpt, ConnectionStates0, Renegotiation) ->
+ case ssl_handshake:handle_server_hello_extensions(dtls_record, Random, CipherSuite,
+ Compression, HelloExt, Version,
+ SslOpt, ConnectionStates0, Renegotiation) of
+ #alert{} = Alert ->
+ Alert;
+ {ConnectionStates, Protocol} ->
+ {Version, SessionId, ConnectionStates, Protocol}
+ end.
-dtls_split_handshake(Mss, MsgType, Len, MsgSeq, Bin, Offset, Acc)
+dtls_fragment(Mss, MsgType, Len, MsgSeq, Bin, Offset, Acc)
when byte_size(Bin) + 12 < Mss ->
FragmentLen = byte_size(Bin),
BinMsg = [MsgType, ?uint24(Len), ?uint16(MsgSeq), ?uint24(Offset), ?uint24(FragmentLen), Bin],
lists:reverse([BinMsg|Acc]);
-dtls_split_handshake(Mss, MsgType, Len, MsgSeq, Bin, Offset, Acc) ->
+dtls_fragment(Mss, MsgType, Len, MsgSeq, Bin, Offset, Acc) ->
FragmentLen = Mss - 12,
<<Fragment:FragmentLen/bytes, Rest/binary>> = Bin,
BinMsg = [MsgType, ?uint24(Len), ?uint16(MsgSeq), ?uint24(Offset), ?uint24(FragmentLen), Fragment],
- dtls_split_handshake(Mss, MsgType, Len, MsgSeq, Rest, Offset + FragmentLen, [BinMsg|Acc]).
+ dtls_fragment(Mss, MsgType, Len, MsgSeq, Rest, Offset + FragmentLen, [BinMsg|Acc]).
get_dtls_handshake_aux(#ssl_tls{version = Version,
- record_seq = SeqNo,
- fragment = Data}, HsState) ->
+ sequence_number = SeqNo,
+ fragment = Data}, HsState) ->
get_dtls_handshake_aux(Version, SeqNo, Data, HsState).
get_dtls_handshake_aux(Version, SeqNo,
- <<?BYTE(Type), ?UINT24(Length),
- ?UINT16(MessageSeq),
- ?UINT24(FragmentOffset), ?UINT24(FragmentLength),
- Body:FragmentLength/binary, Rest/binary>>,
- HsState0) ->
+ <<?BYTE(Type), ?UINT24(Length),
+ ?UINT16(MessageSeq),
+ ?UINT24(FragmentOffset), ?UINT24(FragmentLength),
+ Body:FragmentLength/binary, Rest/binary>>,
+ HsState0) ->
case reassemble_dtls_fragment(SeqNo, Type, Length, MessageSeq,
- FragmentOffset, FragmentLength,
- Body, HsState0) of
- {retransmit, HsState1} ->
- case Rest of
- <<>> ->
- {retransmit, HsState1};
- _ ->
- get_dtls_handshake_aux(Version, SeqNo, Rest, HsState1)
- end;
- {HsState1, HighestSeqNo, MsgBody} ->
- HsState2 = dec_dtls_fragment(Version, HighestSeqNo, Type, Length, MessageSeq, MsgBody, HsState1),
- HsState3 = process_dtls_fragments(Version, HsState2),
- get_dtls_handshake_aux(Version, SeqNo, Rest, HsState3);
- HsState2 ->
- HsState3 = process_dtls_fragments(Version, HsState2),
- get_dtls_handshake_aux(Version, SeqNo, Rest, HsState3)
- end;
+ FragmentOffset, FragmentLength,
+ Body, HsState0) of
+ {retransmit, HsState1} ->
+ case Rest of
+ <<>> ->
+ {retransmit, HsState1};
+ _ ->
+ get_dtls_handshake_aux(Version, SeqNo, Rest, HsState1)
+ end;
+ {HsState1, HighestSeqNo, MsgBody} ->
+ HsState2 = dec_dtls_fragment(Version, HighestSeqNo, Type, Length, MessageSeq, MsgBody, HsState1),
+ HsState3 = process_dtls_fragments(Version, HsState2),
+ get_dtls_handshake_aux(Version, SeqNo, Rest, HsState3);
+ HsState2 ->
+ HsState3 = process_dtls_fragments(Version, HsState2),
+ get_dtls_handshake_aux(Version, SeqNo, Rest, HsState3)
+ end;
get_dtls_handshake_aux(_Version, _SeqNo, <<>>, HsState) ->
- {lists:reverse(HsState#dtls_hs_state.completed),
- HsState#dtls_hs_state{completed = []}}.
+ {lists:reverse(HsState#dtls_hs_state.completed),
+ HsState#dtls_hs_state{completed = []}}.
dec_dtls_fragment(Version, SeqNo, Type, Length, MessageSeq, MsgBody,
- HsState = #dtls_hs_state{highest_record_seq = HighestSeqNo, completed = Acc}) ->
+ HsState = #dtls_hs_state{highest_record_seq = HighestSeqNo, completed = Acc}) ->
Raw = <<?BYTE(Type), ?UINT24(Length), ?UINT16(MessageSeq), ?UINT24(0), ?UINT24(Length), MsgBody/binary>>,
H = decode_handshake(Version, Type, MsgBody),
HsState#dtls_hs_state{completed = [{H,Raw}|Acc], highest_record_seq = erlang:max(HighestSeqNo, SeqNo)}.
process_dtls_fragments(Version,
- HsState0 = #dtls_hs_state{current_read_seq = CurrentReadSeq,
- fragments = Fragments0}) ->
+ HsState0 = #dtls_hs_state{current_read_seq = CurrentReadSeq,
+ fragments = Fragments0}) ->
case gb_trees:is_empty(Fragments0) of
- true ->
- HsState0;
- _ ->
- case gb_trees:smallest(Fragments0) of
- {CurrentReadSeq, {SeqNo, Type, Length, CurrentReadSeq, {Length, [{0, Length}], MsgBody}}} ->
- HsState1 = dtls_hs_state_process_seq(HsState0),
- HsState2 = dec_dtls_fragment(Version, SeqNo, Type, Length, CurrentReadSeq, MsgBody, HsState1),
- process_dtls_fragments(Version, HsState2);
- _ ->
- HsState0
- end
- end.
+ true ->
+ HsState0;
+ _ ->
+ case gb_trees:smallest(Fragments0) of
+ {CurrentReadSeq, {SeqNo, Type, Length, CurrentReadSeq, {Length, [{0, Length}], MsgBody}}} ->
+ HsState1 = dtls_hs_state_process_seq(HsState0),
+ HsState2 = dec_dtls_fragment(Version, SeqNo, Type, Length, CurrentReadSeq, MsgBody, HsState1),
+ process_dtls_fragments(Version, HsState2);
+ _ ->
+ HsState0
+ end
+ end.
dtls_hs_state_process_seq(HsState0 = #dtls_hs_state{current_read_seq = CurrentReadSeq,
- fragments = Fragments0}) ->
+ fragments = Fragments0}) ->
Fragments1 = gb_trees:delete_any(CurrentReadSeq, Fragments0),
HsState0#dtls_hs_state{current_read_seq = CurrentReadSeq + 1,
- fragments = Fragments1}.
+ fragments = Fragments1}.
dtls_hs_state_add_fragment(MessageSeq, Fragment, HsState0 = #dtls_hs_state{fragments = Fragments0}) ->
Fragments1 = gb_trees:enter(MessageSeq, Fragment, Fragments0),
HsState0#dtls_hs_state{fragments = Fragments1}.
reassemble_dtls_fragment(SeqNo, Type, Length, MessageSeq, 0, Length,
- Body, HsState0 = #dtls_hs_state{current_read_seq = undefined})
+ Body, HsState0 = #dtls_hs_state{current_read_seq = undefined})
when Type == ?CLIENT_HELLO;
Type == ?SERVER_HELLO;
- Type == ?HELLO_VERIFY_REQUEST ->
+ Type == ?HELLO_VERIFY_REQUEST ->
%% First message, should be client hello
%% return the current message and set the next expected Sequence
%%
@@ -245,8 +283,8 @@ reassemble_dtls_fragment(_SeqNo, _Type, Length, _MessageSeq, _, Length,
HsState;
reassemble_dtls_fragment(SeqNo, _Type, Length, MessageSeq, 0, Length,
- Body, HsState0 =
- #dtls_hs_state{starting_read_seq = StartingReadSeq})
+ Body, HsState0 =
+ #dtls_hs_state{starting_read_seq = StartingReadSeq})
when MessageSeq < StartingReadSeq ->
%% this has to be the start of a new flight, let it through
%%
@@ -257,69 +295,69 @@ reassemble_dtls_fragment(SeqNo, _Type, Length, MessageSeq, 0, Length,
{HsState, SeqNo, Body};
reassemble_dtls_fragment(_SeqNo, _Type, Length, MessageSeq, 0, Length,
- _Body, HsState =
- #dtls_hs_state{current_read_seq = CurrentReadSeq})
+ _Body, HsState =
+ #dtls_hs_state{current_read_seq = CurrentReadSeq})
when MessageSeq < CurrentReadSeq ->
{retransmit, HsState};
reassemble_dtls_fragment(_SeqNo, _Type, Length, MessageSeq, 0, Length,
- _Body, HsState = #dtls_hs_state{current_read_seq = CurrentReadSeq})
+ _Body, HsState = #dtls_hs_state{current_read_seq = CurrentReadSeq})
when MessageSeq < CurrentReadSeq ->
HsState;
reassemble_dtls_fragment(SeqNo, _Type, Length, MessageSeq, 0, Length,
- Body, HsState0 = #dtls_hs_state{current_read_seq = MessageSeq}) ->
+ Body, HsState0 = #dtls_hs_state{current_read_seq = MessageSeq}) ->
%% Message fully contained and it's the current seq
HsState1 = dtls_hs_state_process_seq(HsState0),
{HsState1, SeqNo, Body};
reassemble_dtls_fragment(SeqNo, Type, Length, MessageSeq, 0, Length,
- Body, HsState) ->
+ Body, HsState) ->
%% Message fully contained and it's the NOT the current seq -> buffer
Fragment = {SeqNo, Type, Length, MessageSeq,
- dtls_fragment_init(Length, 0, Length, Body)},
+ dtls_fragment_init(Length, 0, Length, Body)},
dtls_hs_state_add_fragment(MessageSeq, Fragment, HsState);
reassemble_dtls_fragment(_SeqNo, _Type, Length, MessageSeq, FragmentOffset, FragmentLength,
- _Body,
- HsState = #dtls_hs_state{current_read_seq = CurrentReadSeq})
+ _Body,
+ HsState = #dtls_hs_state{current_read_seq = CurrentReadSeq})
when FragmentOffset + FragmentLength == Length andalso MessageSeq == (CurrentReadSeq - 1) ->
{retransmit, HsState};
reassemble_dtls_fragment(_SeqNo, _Type, _Length, MessageSeq, _FragmentOffset, _FragmentLength,
- _Body,
- HsState = #dtls_hs_state{current_read_seq = CurrentReadSeq})
+ _Body,
+ HsState = #dtls_hs_state{current_read_seq = CurrentReadSeq})
when MessageSeq < CurrentReadSeq ->
HsState;
reassemble_dtls_fragment(SeqNo, Type, Length, MessageSeq,
- FragmentOffset, FragmentLength,
- Body,
- HsState = #dtls_hs_state{fragments = Fragments0}) ->
+ FragmentOffset, FragmentLength,
+ Body,
+ HsState = #dtls_hs_state{fragments = Fragments0}) ->
case gb_trees:lookup(MessageSeq, Fragments0) of
- {value, Fragment} ->
- dtls_fragment_reassemble(SeqNo, Type, Length, MessageSeq,
- FragmentOffset, FragmentLength,
- Body, Fragment, HsState);
- none ->
- dtls_fragment_start(SeqNo, Type, Length, MessageSeq,
- FragmentOffset, FragmentLength,
- Body, HsState)
+ {value, Fragment} ->
+ dtls_fragment_reassemble(SeqNo, Type, Length, MessageSeq,
+ FragmentOffset, FragmentLength,
+ Body, Fragment, HsState);
+ none ->
+ dtls_fragment_start(SeqNo, Type, Length, MessageSeq,
+ FragmentOffset, FragmentLength,
+ Body, HsState)
end.
dtls_fragment_start(SeqNo, Type, Length, MessageSeq,
- FragmentOffset, FragmentLength,
- Body, HsState = #dtls_hs_state{fragments = Fragments0}) ->
+ FragmentOffset, FragmentLength,
+ Body, HsState = #dtls_hs_state{fragments = Fragments0}) ->
Fragment = {SeqNo, Type, Length, MessageSeq,
- dtls_fragment_init(Length, FragmentOffset, FragmentLength, Body)},
- Fragments1 = gb_trees:insert(MessageSeq, Fragment, Fragments0),
+ dtls_fragment_init(Length, FragmentOffset, FragmentLength, Body)},
+ Fragments1 = gb_trees:insert(MessageSeq, Fragment, Fragments0),
HsState#dtls_hs_state{fragments = Fragments1}.
dtls_fragment_reassemble(SeqNo, Type, Length, MessageSeq,
FragmentOffset, FragmentLength,
- Body,
- {LastSeqNo, Type, Length, MessageSeq, FragBuffer0},
- HsState = #dtls_hs_state{fragments = Fragments0}) ->
+ Body,
+ {LastSeqNo, Type, Length, MessageSeq, FragBuffer0},
+ HsState = #dtls_hs_state{fragments = Fragments0}) ->
FragBuffer1 = dtls_fragment_add(FragBuffer0, FragmentOffset, FragmentLength, Body),
Fragment = {erlang:max(SeqNo, LastSeqNo), Type, Length, MessageSeq, FragBuffer1},
Fragments1 = gb_trees:enter(MessageSeq, Fragment, Fragments0),
@@ -328,8 +366,8 @@ dtls_fragment_reassemble(SeqNo, Type, Length, MessageSeq,
%% Type, Length or Seq mismatch, drop everything...
%% Note: the RFC is not clear on how to handle this...
dtls_fragment_reassemble(_SeqNo, _Type, _Length, MessageSeq,
- _FragmentOffset, _FragmentLength, _Body, _Fragment,
- HsState = #dtls_hs_state{fragments = Fragments0}) ->
+ _FragmentOffset, _FragmentLength, _Body, _Fragment,
+ HsState = #dtls_hs_state{fragments = Fragments0}) ->
Fragments1 = gb_trees:delete_any(MessageSeq, Fragments0),
HsState#dtls_hs_state{fragments = Fragments1}.
@@ -360,7 +398,7 @@ merge_fragment_list(Rest = [{HStart, _HEnd}|_], Frag = {_FStart, FEnd}, Acc)
lists:reverse(Acc) ++ [Frag|Rest];
merge_fragment_list([{HStart, HEnd}|Rest], _Frag = {FStart, FEnd}, Acc)
- when
+ when
FStart =< HEnd orelse FEnd >= HStart ->
Start = erlang:min(HStart, FStart),
End = erlang:max(HEnd, FEnd),
@@ -370,20 +408,20 @@ merge_fragment_list([{HStart, HEnd}|Rest], _Frag = {FStart, FEnd}, Acc)
add_fragment(List, {FragmentOffset, FragmentLength}) ->
merge_fragment_list(List, {FragmentOffset, FragmentOffset + FragmentLength}, []).
-enc_hs(#hello_verify_request{protocol_version = {Major, Minor},
- cookie = Cookie}, _Version) ->
- CookieLength = byte_size(Cookie),
+enc_handshake(#hello_verify_request{protocol_version = {Major, Minor},
+ cookie = Cookie}, _Version) ->
+ CookieLength = byte_size(Cookie),
{?HELLO_VERIFY_REQUEST, <<?BYTE(Major), ?BYTE(Minor),
- ?BYTE(CookieLength),
- Cookie/binary>>};
-
-enc_hs(#client_hello{client_version = {Major, Minor},
- random = Random,
- session_id = SessionID,
- cookie = Cookie,
- cipher_suites = CipherSuites,
- compression_methods = CompMethods,
- extensions = HelloExtensions}, Version) ->
+ ?BYTE(CookieLength),
+ Cookie/binary>>};
+
+enc_handshake(#client_hello{client_version = {Major, Minor},
+ random = Random,
+ session_id = SessionID,
+ cookie = Cookie,
+ cipher_suites = CipherSuites,
+ compression_methods = CompMethods,
+ extensions = HelloExtensions}, Version) ->
SIDLength = byte_size(SessionID),
BinCookie = enc_client_hello_cookie(Version, Cookie),
BinCompMethods = list_to_binary(CompMethods),
@@ -391,13 +429,13 @@ enc_hs(#client_hello{client_version = {Major, Minor},
BinCipherSuites = list_to_binary(CipherSuites),
CsLength = byte_size(BinCipherSuites),
ExtensionsBin = ssl_handshake:encode_hello_extensions(HelloExtensions),
-
+
{?CLIENT_HELLO, <<?BYTE(Major), ?BYTE(Minor), Random:32/binary,
- ?BYTE(SIDLength), SessionID/binary,
- BinCookie/binary,
- ?UINT16(CsLength), BinCipherSuites/binary,
- ?BYTE(CmLength), BinCompMethods/binary, ExtensionsBin/binary>>};
-enc_hs(HandshakeMsg, Version) ->
+ ?BYTE(SIDLength), SessionID/binary,
+ BinCookie/binary,
+ ?UINT16(CsLength), BinCipherSuites/binary,
+ ?BYTE(CmLength), BinCompMethods/binary, ExtensionsBin/binary>>};
+enc_handshake(HandshakeMsg, Version) ->
ssl_handshake:encode_handshake(HandshakeMsg, Version).
enc_client_hello_cookie(_, <<>>) ->
@@ -407,26 +445,26 @@ enc_client_hello_cookie(_, Cookie) ->
<<?BYTE(CookieLength), Cookie/binary>>.
decode_handshake(_Version, ?CLIENT_HELLO, <<?BYTE(Major), ?BYTE(Minor), Random:32/binary,
- ?BYTE(SID_length), Session_ID:SID_length/binary,
- ?BYTE(Cookie_length), Cookie:Cookie_length/binary,
- ?UINT16(Cs_length), CipherSuites:Cs_length/binary,
- ?BYTE(Cm_length), Comp_methods:Cm_length/binary,
- Extensions/binary>>) ->
-
+ ?BYTE(SID_length), Session_ID:SID_length/binary,
+ ?BYTE(Cookie_length), Cookie:Cookie_length/binary,
+ ?UINT16(Cs_length), CipherSuites:Cs_length/binary,
+ ?BYTE(Cm_length), Comp_methods:Cm_length/binary,
+ Extensions/binary>>) ->
+
DecodedExtensions = ssl_handshake:decode_hello_extensions(Extensions),
-
+
#client_hello{
client_version = {Major,Minor},
random = Random,
- session_id = Session_ID,
+ session_id = Session_ID,
cookie = Cookie,
cipher_suites = ssl_handshake:decode_suites('2_bytes', CipherSuites),
compression_methods = Comp_methods,
extensions = DecodedExtensions
- };
+ };
decode_handshake(_Version, ?HELLO_VERIFY_REQUEST, <<?BYTE(Major), ?BYTE(Minor),
- ?BYTE(CookieLength), Cookie:CookieLength/binary>>) ->
+ ?BYTE(CookieLength), Cookie:CookieLength/binary>>) ->
#hello_verify_request{
protocol_version = {Major,Minor},
@@ -434,7 +472,7 @@ decode_handshake(_Version, ?HELLO_VERIFY_REQUEST, <<?BYTE(Major), ?BYTE(Minor),
decode_handshake(Version, Tag, Msg) ->
ssl_handshake:decode_handshake(Version, Tag, Msg).
-address_to_bin({A,B,C,D}, Port) ->
- <<0:80,16#ffff:16,A,B,C,D,Port:16>>;
-address_to_bin({A,B,C,D,E,F,G,H}, Port) ->
- <<A:16,B:16,C:16,D:16,E:16,F:16,G:16,H:16,Port:16>>.
+%% address_to_bin({A,B,C,D}, Port) ->
+%% <<0:80,16#ffff:16,A,B,C,D,Port:16>>;
+%% address_to_bin({A,B,C,D,E,F,G,H}, Port) ->
+%% <<A:16,B:16,C:16,D:16,E:16,F:16,G:16,H:16,Port:16>>.
diff --git a/lib/ssl/src/dtls_handshake.hrl b/lib/ssl/src/dtls_handshake.hrl
index 5bdf45f627..3b57575b6d 100644
--- a/lib/ssl/src/dtls_handshake.hrl
+++ b/lib/ssl/src/dtls_handshake.hrl
@@ -1,7 +1,7 @@
%%
%% %CopyrightBegin%
%%
-%% Copyright Ericsson AB 2013-2013. All Rights Reserved.
+%% Copyright Ericsson AB 2013-2014. 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
@@ -53,6 +53,4 @@
completed
}).
--type dtls_handshake() :: #client_hello{} | #hello_verify_request{} | ssl_handshake().
-
-endif. % -ifdef(dtls_handshake).
diff --git a/lib/ssl/src/dtls_record.erl b/lib/ssl/src/dtls_record.erl
index b0a7976864..a7bbb6bc40 100644
--- a/lib/ssl/src/dtls_record.erl
+++ b/lib/ssl/src/dtls_record.erl
@@ -1,7 +1,7 @@
%%
%% %CopyrightBegin%
%%
-%% Copyright Ericsson AB 2013-2013. All Rights Reserved.
+%% Copyright Ericsson AB 2013-2014. 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
@@ -35,7 +35,7 @@
-export([decode_cipher_text/2]).
%% Encoding
--export([encode_plain_text/4]).
+-export([encode_plain_text/4, encode_handshake/3, encode_change_cipher_spec/2]).
%% Protocol version handling
-export([protocol_version/1, lowest_protocol_version/2,
@@ -46,6 +46,11 @@
-export([init_connection_state_seq/2, current_connection_state_epoch/2,
set_connection_state_by_epoch/3, connection_state_by_epoch/3]).
+-export_type([dtls_version/0, dtls_atom_version/0]).
+
+-type dtls_version() :: ssl_record:ssl_version().
+-type dtls_atom_version() :: dtlsv1 | 'dtlsv1.2'.
+
-compile(inline).
%%====================================================================
@@ -70,7 +75,7 @@ get_dtls_records_aux(<<?BYTE(?APPLICATION_DATA),?BYTE(MajVer),?BYTE(MinVer),
Acc) ->
get_dtls_records_aux(Rest, [#ssl_tls{type = ?APPLICATION_DATA,
version = {MajVer, MinVer},
- epoch = Epoch, record_seq = SequenceNumber,
+ epoch = Epoch, sequence_number = SequenceNumber,
fragment = Data} | Acc]);
get_dtls_records_aux(<<?BYTE(?HANDSHAKE),?BYTE(MajVer),?BYTE(MinVer),
?UINT16(Epoch), ?UINT48(SequenceNumber),
@@ -78,7 +83,7 @@ get_dtls_records_aux(<<?BYTE(?HANDSHAKE),?BYTE(MajVer),?BYTE(MinVer),
Data:Length/binary, Rest/binary>>, Acc) when MajVer >= 128 ->
get_dtls_records_aux(Rest, [#ssl_tls{type = ?HANDSHAKE,
version = {MajVer, MinVer},
- epoch = Epoch, record_seq = SequenceNumber,
+ epoch = Epoch, sequence_number = SequenceNumber,
fragment = Data} | Acc]);
get_dtls_records_aux(<<?BYTE(?ALERT),?BYTE(MajVer),?BYTE(MinVer),
?UINT16(Epoch), ?UINT48(SequenceNumber),
@@ -86,7 +91,7 @@ get_dtls_records_aux(<<?BYTE(?ALERT),?BYTE(MajVer),?BYTE(MinVer),
Rest/binary>>, Acc) ->
get_dtls_records_aux(Rest, [#ssl_tls{type = ?ALERT,
version = {MajVer, MinVer},
- epoch = Epoch, record_seq = SequenceNumber,
+ epoch = Epoch, sequence_number = SequenceNumber,
fragment = Data} | Acc]);
get_dtls_records_aux(<<?BYTE(?CHANGE_CIPHER_SPEC),?BYTE(MajVer),?BYTE(MinVer),
?UINT16(Epoch), ?UINT48(SequenceNumber),
@@ -94,7 +99,7 @@ get_dtls_records_aux(<<?BYTE(?CHANGE_CIPHER_SPEC),?BYTE(MajVer),?BYTE(MinVer),
Acc) ->
get_dtls_records_aux(Rest, [#ssl_tls{type = ?CHANGE_CIPHER_SPEC,
version = {MajVer, MinVer},
- epoch = Epoch, record_seq = SequenceNumber,
+ epoch = Epoch, sequence_number = SequenceNumber,
fragment = Data} | Acc]);
get_dtls_records_aux(<<0:1, _CT:7, ?BYTE(_MajVer), ?BYTE(_MinVer),
@@ -125,14 +130,15 @@ encode_plain_text(Type, Version, Data,
{Comp, CompS1} = ssl_record:compress(CompAlg, Data, CompS0),
WriteState1 = WriteState0#connection_state{compression_state = CompS1},
MacHash = calc_mac_hash(WriteState1, Type, Version, Epoch, Seq, Comp),
- {CipherFragment, WriteState} = ssl_record:cipher(Version, Comp, WriteState1, MacHash),
+ {CipherFragment, WriteState} = ssl_record:cipher(dtls_v1:corresponding_tls_version(Version),
+ Comp, WriteState1, MacHash),
CipherText = encode_tls_cipher_text(Type, Version, Epoch, Seq, CipherFragment),
{CipherText, ConnectionStates#connection_states{current_write =
WriteState#connection_state{sequence_number = Seq +1}}}.
decode_cipher_text(#ssl_tls{type = Type, version = Version,
epoch = Epoch,
- record_seq = Seq,
+ sequence_number = Seq,
fragment = CipherFragment} = CipherText,
#connection_states{current_read =
#connection_state{compression_state = CompressionS0,
@@ -141,7 +147,7 @@ decode_cipher_text(#ssl_tls{type = Type, version = Version,
CompressAlg = SecParams#security_parameters.compression_algorithm,
{PlainFragment, Mac, ReadState1} = ssl_record:decipher(dtls_v1:corresponding_tls_version(Version),
CipherFragment, ReadState0),
- MacHash = calc_mac_hash(Type, Version, Epoch, Seq, PlainFragment, ReadState1),
+ MacHash = calc_mac_hash(ReadState1, Type, Version, Epoch, Seq, PlainFragment),
case ssl_record:is_correct_mac(Mac, MacHash) of
true ->
{Plain, CompressionS1} = ssl_record:uncompress(CompressAlg,
@@ -153,10 +159,27 @@ decode_cipher_text(#ssl_tls{type = Type, version = Version,
false ->
?ALERT_REC(?FATAL, ?BAD_RECORD_MAC)
end.
+%%--------------------------------------------------------------------
+-spec encode_handshake(iolist(), dtls_version(), #connection_states{}) ->
+ {iolist(), #connection_states{}}.
+%%
+%% Description: Encodes a handshake message to send on the ssl-socket.
+%%--------------------------------------------------------------------
+encode_handshake(Frag, Version, ConnectionStates) ->
+ encode_plain_text(?HANDSHAKE, Version, Frag, ConnectionStates).
+
+%%--------------------------------------------------------------------
+-spec encode_change_cipher_spec(dtls_version(), #connection_states{}) ->
+ {iolist(), #connection_states{}}.
+%%
+%% Description: Encodes a change_cipher_spec-message to send on the ssl socket.
+%%--------------------------------------------------------------------
+encode_change_cipher_spec(Version, ConnectionStates) ->
+ encode_plain_text(?CHANGE_CIPHER_SPEC, Version, <<1:8>>, ConnectionStates).
%%--------------------------------------------------------------------
--spec protocol_version(tls_atom_version() | tls_version()) ->
- tls_version() | tls_atom_version().
+-spec protocol_version(dtls_atom_version() | dtls_version()) ->
+ dtls_version() | dtls_atom_version().
%%
%% Description: Creates a protocol version record from a version atom
%% or vice versa.
@@ -170,7 +193,7 @@ protocol_version({254, 253}) ->
protocol_version({254, 255}) ->
dtlsv1.
%%--------------------------------------------------------------------
--spec lowest_protocol_version(tls_version(), tls_version()) -> tls_version().
+-spec lowest_protocol_version(dtls_version(), dtls_version()) -> dtls_version().
%%
%% Description: Lowes protocol version of two given versions
%%--------------------------------------------------------------------
@@ -183,7 +206,7 @@ lowest_protocol_version(Version = {M,_}, {N, _}) when M > N ->
lowest_protocol_version(_,Version) ->
Version.
%%--------------------------------------------------------------------
--spec highest_protocol_version([tls_version()]) -> tls_version().
+-spec highest_protocol_version([dtls_version()]) -> dtls_version().
%%
%% Description: Highest protocol version present in a list
%%--------------------------------------------------------------------
@@ -203,7 +226,7 @@ highest_protocol_version(_, [Version | Rest]) ->
%%--------------------------------------------------------------------
--spec supported_protocol_versions() -> [tls_version()].
+-spec supported_protocol_versions() -> [dtls_version()].
%%
%% Description: Protocol versions supported
%%--------------------------------------------------------------------
@@ -234,7 +257,7 @@ supported_connection_protocol_versions([]) ->
?ALL_DATAGRAM_SUPPORTED_VERSIONS.
%%--------------------------------------------------------------------
--spec is_acceptable_version(tls_version(), Supported :: [tls_version()]) -> boolean().
+-spec is_acceptable_version(dtls_version(), Supported :: [dtls_version()]) -> boolean().
%%
%% Description: ssl version 2 is not acceptable security risks are too big.
%%
@@ -244,7 +267,7 @@ is_acceptable_version(Version, Versions) ->
%%--------------------------------------------------------------------
--spec init_connection_state_seq(tls_version(), #connection_states{}) ->
+-spec init_connection_state_seq(dtls_version(), #connection_states{}) ->
#connection_state{}.
%%
%% Description: Copy the read sequence number to the write sequence number
@@ -343,5 +366,5 @@ calc_mac_hash(#connection_state{mac_secret = MacSecret,
Length, Fragment).
mac_hash(Version, MacAlg, MacSecret, SeqNo, Type, Length, Fragment) ->
- dtls_v1:mac_hash(MacAlg, MacSecret, SeqNo, Type, Version,
+ dtls_v1:mac_hash(Version, MacAlg, MacSecret, SeqNo, Type,
Length, Fragment).
diff --git a/lib/ssl/src/dtls_record.hrl b/lib/ssl/src/dtls_record.hrl
index e935d84bdf..edb77fb2b1 100644
--- a/lib/ssl/src/dtls_record.hrl
+++ b/lib/ssl/src/dtls_record.hrl
@@ -1,7 +1,7 @@
%%
%% %CopyrightBegin%
%%
-%% Copyright Ericsson AB 2013-2013. All Rights Reserved.
+%% Copyright Ericsson AB 2013-2014. 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
@@ -28,16 +28,15 @@
-include("ssl_record.hrl"). %% Common TLS and DTLS records and Constantes
-%% Used to handle tls_plain_text, tls_compressed and tls_cipher_text
+%% Used to handle dtls_plain_text, dtls_compressed and dtls_cipher_text
-record(ssl_tls, {
type,
version,
- record_seq, % used in plain_text
- epoch, % used in plain_text
- message_seq,
- fragment_offset,
- fragment_length,
+ epoch,
+ sequence_number,
+ offset,
+ length,
fragment
}).
diff --git a/lib/ssl/src/dtls_v1.erl b/lib/ssl/src/dtls_v1.erl
index 6e41641483..5a7ab32887 100644
--- a/lib/ssl/src/dtls_v1.erl
+++ b/lib/ssl/src/dtls_v1.erl
@@ -1,7 +1,7 @@
%%
%% %CopyrightBegin%
%%
-%% Copyright Ericsson AB 2013-2013. All Rights Reserved.
+%% Copyright Ericsson AB 2013-2014. 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
@@ -22,7 +22,7 @@
-export([suites/1, mac_hash/7, ecc_curves/1, corresponding_tls_version/1]).
--spec suites(Minor:: 253|255) -> [cipher_suite()].
+-spec suites(Minor:: 253|255) -> [ssl_cipher:cipher_suite()].
suites(Minor) ->
tls_v1:suites(corresponding_minor_tls_version(Minor)).
diff --git a/lib/ssl/src/ssl.app.src b/lib/ssl/src/ssl.app.src
index 68ebc49e4a..36681e2897 100644
--- a/lib/ssl/src/ssl.app.src
+++ b/lib/ssl/src/ssl.app.src
@@ -28,6 +28,7 @@
ssl_srp_primes,
ssl_alert,
ssl_socket,
+ ssl_listen_tracker_sup,
%% Erlang Distribution over SSL/TLS
inet_tls_dist,
ssl_tls_dist_proxy,
@@ -47,6 +48,8 @@
{registered, [ssl_sup, ssl_manager]},
{applications, [crypto, public_key, kernel, stdlib]},
{env, []},
- {mod, {ssl_app, []}}]}.
+ {mod, {ssl_app, []}},
+ {runtime_dependencies, ["stdlib-2.0","public_key-0.22","kernel-3.0",
+ "erts-6.0","crypto-3.3"]}]}.
diff --git a/lib/ssl/src/ssl.appup.src b/lib/ssl/src/ssl.appup.src
index c090b6ebfb..b713f86c1e 100644
--- a/lib/ssl/src/ssl.appup.src
+++ b/lib/ssl/src/ssl.appup.src
@@ -1,19 +1,16 @@
%% -*- erlang -*-
{"%VSN%",
[
- {<<"5.3\\*">>, [{restart_application, ssl}]},
- {<<"5.2\\*">>, [{restart_application, ssl}]},
- {<<"5.1\\*">>, [{restart_application, ssl}]},
- {<<"5.0\\*">>, [{restart_application, ssl}]},
- {<<"4\\.*">>, [{restart_application, ssl}]},
- {<<"3\\.*">>, [{restart_application, ssl}]}
+ {<<"5\\.3\\.[1-4]($|\\..*)">>, [{restart_application, ssl}]},
+ {<<"5\\.[0-2]($|\\..*)">>, [{restart_application, ssl}]},
+ {<<"4\\..*">>, [{restart_application, ssl}]},
+ {<<"3\\..*">>, [{restart_application, ssl}]}
],
[
- {<<"5.3\\*">>, [{restart_application, ssl}]},
- {<<"5.2\\*">>, [{restart_application, ssl}]},
- {<<"5.1\\*">>, [{restart_application, ssl}]},
- {<<"5.0\\*">>, [{restart_application, ssl}]},
- {<<"4\\.*">>, [{restart_application, ssl}]},
- {<<"3\\.*">>, [{restart_application, ssl}]}
- ]}.
+ {<<"5\\.3\\.[1-4]($|\\..*)">>, [{restart_application, ssl}]},
+ {<<"5\\.[0-2]($|\\..*)">>, [{restart_application, ssl}]},
+ {<<"4\\..*">>, [{restart_application, ssl}]},
+ {<<"3\\..*">>, [{restart_application, ssl}]}
+ ]
+}.
diff --git a/lib/ssl/src/ssl.erl b/lib/ssl/src/ssl.erl
index cff842cb2f..be1041ca13 100644
--- a/lib/ssl/src/ssl.erl
+++ b/lib/ssl/src/ssl.erl
@@ -1,7 +1,7 @@
%%
%% %CopyrightBegin%
%%
-%% Copyright Ericsson AB 1999-2013. All Rights Reserved.
+%% Copyright Ericsson AB 1999-2014. 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
@@ -97,17 +97,17 @@ connect(Socket, SslOptions) when is_port(Socket) ->
connect(Socket, SslOptions0, Timeout) when is_port(Socket) ->
{Transport,_,_,_} = proplists:get_value(cb_info, SslOptions0,
{gen_tcp, tcp, tcp_closed, tcp_error}),
- EmulatedOptions = emulated_options(),
+ EmulatedOptions = ssl_socket:emulated_options(),
{ok, SocketValues} = ssl_socket:getopts(Transport, Socket, EmulatedOptions),
- try handle_options(SslOptions0 ++ SocketValues, client) of
+ try handle_options(SslOptions0 ++ SocketValues) of
{ok, #config{transport_info = CbInfo, ssl = SslOptions, emulated = EmOpts,
connection_cb = ConnectionCb}} ->
- ok = ssl_socket:setopts(Transport, Socket, internal_inet_values()),
+ ok = ssl_socket:setopts(Transport, Socket, ssl_socket:internal_inet_values()),
case ssl_socket:peername(Transport, Socket) of
{ok, {Address, Port}} ->
ssl_connection:connect(ConnectionCb, Address, Port, Socket,
- {SslOptions, EmOpts},
+ {SslOptions, emulated_socket_options(EmOpts, #socket_options{}), undefined},
self(), CbInfo, Timeout);
{error, Error} ->
{error, Error}
@@ -121,7 +121,7 @@ connect(Host, Port, Options) ->
connect(Host, Port, Options, infinity).
connect(Host, Port, Options, Timeout) ->
- try handle_options(Options, client) of
+ try handle_options(Options) of
{ok, Config} ->
do_connect(Host,Port,Config,Timeout)
catch
@@ -139,12 +139,15 @@ listen(_Port, []) ->
{error, nooptions};
listen(Port, Options0) ->
try
- {ok, Config} = handle_options(Options0, server),
+ {ok, Config} = handle_options(Options0),
ConnectionCb = connection_cb(Options0),
- #config{transport_info = {Transport, _, _, _}, inet_user = Options, connection_cb = ConnectionCb} = Config,
+ #config{transport_info = {Transport, _, _, _}, inet_user = Options, connection_cb = ConnectionCb,
+ ssl = SslOpts, emulated = EmOpts} = Config,
case Transport:listen(Port, Options) of
{ok, ListenSocket} ->
- {ok, #sslsocket{pid = {ListenSocket, Config}}};
+ ok = ssl_socket:setopts(Transport, ListenSocket, ssl_socket:internal_inet_values()),
+ {ok, Tracker} = ssl_socket:inherit_tracker(ListenSocket, EmOpts, SslOpts),
+ {ok, #sslsocket{pid = {ListenSocket, Config#config{emulated = Tracker}}}};
Err = {error, _} ->
Err
end
@@ -164,25 +167,20 @@ transport_accept(ListenSocket) ->
transport_accept(ListenSocket, infinity).
transport_accept(#sslsocket{pid = {ListenSocket,
- #config{transport_info = CbInfo,
+ #config{transport_info = {Transport,_,_, _} =CbInfo,
connection_cb = ConnectionCb,
- ssl = SslOpts}}}, Timeout) ->
- %% The setopt could have been invoked on the listen socket
- %% and options should be inherited.
- EmOptions = emulated_options(),
- {Transport,_,_, _} = CbInfo,
- {ok, SocketValues} = ssl_socket:getopts(Transport, ListenSocket, EmOptions),
- ok = ssl_socket:setopts(Transport, ListenSocket, internal_inet_values()),
+ ssl = SslOpts,
+ emulated = Tracker}}}, Timeout) ->
case Transport:accept(ListenSocket, Timeout) of
{ok, Socket} ->
- ok = ssl_socket:setopts(Transport, ListenSocket, SocketValues),
+ {ok, EmOpts} = ssl_socket:get_emulated_opts(Tracker),
{ok, Port} = ssl_socket:port(Transport, Socket),
ConnArgs = [server, "localhost", Port, Socket,
- {SslOpts, socket_options(SocketValues)}, self(), CbInfo],
+ {SslOpts, emulated_socket_options(EmOpts, #socket_options{}), Tracker}, self(), CbInfo],
ConnectionSup = connection_sup(ConnectionCb),
case ConnectionSup:start_child(ConnArgs) of
{ok, Pid} ->
- ssl_connection:socket_control(ConnectionCb, Socket, Pid, Transport);
+ ssl_connection:socket_control(ConnectionCb, Socket, Pid, Transport, Tracker);
{error, Reason} ->
{error, Reason}
end;
@@ -195,7 +193,8 @@ transport_accept(#sslsocket{pid = {ListenSocket,
-spec ssl_accept(#sslsocket{} | port(), timeout()| [ssl_option()
| transport_option()]) ->
ok | {ok, #sslsocket{}} | {error, reason()}.
--spec ssl_accept(port(), [ssl_option()| transport_option()], timeout()) ->
+
+-spec ssl_accept(#sslsocket{} | port(), [ssl_option()] | [ssl_option()| transport_option()], timeout()) ->
{ok, #sslsocket{}} | {error, reason()}.
%%
%% Description: Performs accept on an ssl listen socket. e.i. performs
@@ -210,19 +209,29 @@ ssl_accept(#sslsocket{} = Socket, Timeout) ->
ssl_accept(ListenSocket, SslOptions) when is_port(ListenSocket) ->
ssl_accept(ListenSocket, SslOptions, infinity).
+ssl_accept(#sslsocket{} = Socket, [], Timeout) ->
+ ssl_accept(#sslsocket{} = Socket, Timeout);
+ssl_accept(#sslsocket{fd = {_, _, _, Tracker}} = Socket, SslOpts0, Timeout) ->
+ try
+ {ok, EmOpts, InheritedSslOpts} = ssl_socket:get_all_opts(Tracker),
+ SslOpts = handle_options(SslOpts0, InheritedSslOpts),
+ ssl_connection:handshake(Socket, {SslOpts, emulated_socket_options(EmOpts, #socket_options{})}, Timeout)
+ catch
+ Error = {error, _Reason} -> Error
+ end;
ssl_accept(Socket, SslOptions, Timeout) when is_port(Socket) ->
{Transport,_,_,_} =
proplists:get_value(cb_info, SslOptions, {gen_tcp, tcp, tcp_closed, tcp_error}),
- EmulatedOptions = emulated_options(),
+ EmulatedOptions = ssl_socket:emulated_options(),
{ok, SocketValues} = ssl_socket:getopts(Transport, Socket, EmulatedOptions),
ConnetionCb = connection_cb(SslOptions),
- try handle_options(SslOptions ++ SocketValues, server) of
+ try handle_options(SslOptions ++ SocketValues) of
{ok, #config{transport_info = CbInfo, ssl = SslOpts, emulated = EmOpts}} ->
- ok = ssl_socket:setopts(Transport, Socket, internal_inet_values()),
+ ok = ssl_socket:setopts(Transport, Socket, ssl_socket:internal_inet_values()),
{ok, Port} = ssl_socket:port(Transport, Socket),
ssl_connection:ssl_accept(ConnetionCb, Port, Socket,
- {SslOpts, EmOpts},
- self(), CbInfo, Timeout)
+ {SslOpts, emulated_socket_options(EmOpts, #socket_options{}), undefined},
+ self(), CbInfo, Timeout)
catch
Error = {error, _Reason} -> Error
end.
@@ -276,7 +285,7 @@ controlling_process(#sslsocket{pid = {Listen,
Transport:controlling_process(Listen, NewOwner).
%%--------------------------------------------------------------------
--spec connection_info(#sslsocket{}) -> {ok, {tls_atom_version(), erl_cipher_suite()}} |
+-spec connection_info(#sslsocket{}) -> {ok, {tls_record:tls_atom_version(), ssl_cipher:erl_cipher_suite()}} |
{error, reason()}.
%%
%% Description: Returns ssl protocol and cipher used for the connection
@@ -291,7 +300,7 @@ connection_info(#sslsocket{pid = {Listen, _}}) when is_port(Listen) ->
%%
%% Description: same as inet:peername/1.
%%--------------------------------------------------------------------
-peername(#sslsocket{pid = Pid, fd = {Transport, Socket, _}}) when is_pid(Pid)->
+peername(#sslsocket{pid = Pid, fd = {Transport, Socket, _, _}}) when is_pid(Pid)->
ssl_socket:peername(Transport, Socket);
peername(#sslsocket{pid = {ListenSocket, #config{transport_info = {Transport,_,_,_}}}}) ->
ssl_socket:peername(Transport, ListenSocket). %% Will return {error, enotconn}
@@ -312,7 +321,7 @@ peercert(#sslsocket{pid = {Listen, _}}) when is_port(Listen) ->
{error, enotconn}.
%%--------------------------------------------------------------------
--spec suite_definition(cipher_suite()) -> erl_cipher_suite().
+-spec suite_definition(ssl_cipher:cipher_suite()) -> ssl_cipher:erl_cipher_suite().
%%
%% Description: Return erlang cipher suite definition.
%%--------------------------------------------------------------------
@@ -330,28 +339,29 @@ negotiated_next_protocol(#sslsocket{pid = Pid}) ->
ssl_connection:negotiated_next_protocol(Pid).
%%--------------------------------------------------------------------
--spec cipher_suites() -> [erl_cipher_suite()].
--spec cipher_suites(erlang | openssl | all) -> [erl_cipher_suite()] | [string()].
+-spec cipher_suites() -> [ssl_cipher:erl_cipher_suite()].
+-spec cipher_suites(erlang | openssl | all) -> [ssl_cipher:erl_cipher_suite()] | [string()].
%% Description: Returns all supported cipher suites.
%%--------------------------------------------------------------------
cipher_suites() ->
cipher_suites(erlang).
-
+
cipher_suites(erlang) ->
Version = tls_record:highest_protocol_version([]),
- [suite_definition(S) || S <- ssl_cipher:suites(Version)];
-
+ ssl_cipher:filter_suites([suite_definition(S)
+ || S <- ssl_cipher:suites(Version)]);
cipher_suites(openssl) ->
Version = tls_record:highest_protocol_version([]),
- [ssl_cipher:openssl_suite_name(S) || S <- ssl_cipher:suites(Version)];
+ [ssl_cipher:openssl_suite_name(S)
+ || S <- ssl_cipher:filter_suites(ssl_cipher:suites(Version))];
cipher_suites(all) ->
Version = tls_record:highest_protocol_version([]),
- Supported = ssl_cipher:suites(Version)
- ++ ssl_cipher:anonymous_suites()
+ Supported = ssl_cipher:all_suites(Version)
+ ++ ssl_cipher:anonymous_suites(Version)
++ ssl_cipher:psk_suites(Version)
++ ssl_cipher:srp_suites(),
- [suite_definition(S) || S <- Supported].
+ ssl_cipher:filter_suites([suite_definition(S) || S <- Supported]).
%%--------------------------------------------------------------------
-spec getopts(#sslsocket{}, [gen_tcp:option_name()]) ->
@@ -361,7 +371,7 @@ cipher_suites(all) ->
%%--------------------------------------------------------------------
getopts(#sslsocket{pid = Pid}, OptionTags) when is_pid(Pid), is_list(OptionTags) ->
ssl_connection:get_opts(Pid, OptionTags);
-getopts(#sslsocket{pid = {ListenSocket, #config{transport_info = {Transport,_,_,_}}}},
+getopts(#sslsocket{pid = {_, #config{transport_info = {Transport,_,_,_}}}} = ListenSocket,
OptionTags) when is_list(OptionTags) ->
try ssl_socket:getopts(Transport, ListenSocket, OptionTags) of
{ok, _} = Result ->
@@ -369,8 +379,8 @@ getopts(#sslsocket{pid = {ListenSocket, #config{transport_info = {Transport,_,_
{error, InetError} ->
{error, {options, {socket_options, OptionTags, InetError}}}
catch
- _:_ ->
- {error, {options, {socket_options, OptionTags}}}
+ _:Error ->
+ {error, {options, {socket_options, OptionTags, Error}}}
end;
getopts(#sslsocket{}, OptionTags) ->
{error, {options, {socket_options, OptionTags}}}.
@@ -390,7 +400,7 @@ setopts(#sslsocket{pid = Pid}, Options0) when is_pid(Pid), is_list(Options0) ->
{error, {options, {not_a_proplist, Options0}}}
end;
-setopts(#sslsocket{pid = {ListenSocket, #config{transport_info = {Transport,_,_,_}}}}, Options) when is_list(Options) ->
+setopts(#sslsocket{pid = {_, #config{transport_info = {Transport,_,_,_}}}} = ListenSocket, Options) when is_list(Options) ->
try ssl_socket:setopts(Transport, ListenSocket, Options) of
ok ->
ok;
@@ -419,10 +429,10 @@ shutdown(#sslsocket{pid = Pid}, How) ->
%%
%% Description: Same as inet:sockname/1
%%--------------------------------------------------------------------
-sockname(#sslsocket{pid = {Listen, #config{transport_info = {Transport,_, _, _}}}}) when is_port(Listen) ->
+sockname(#sslsocket{pid = {Listen, #config{transport_info = {Transport, _, _, _}}}}) when is_port(Listen) ->
ssl_socket:sockname(Transport, Listen);
-sockname(#sslsocket{pid = Pid, fd = {Transport, Socket, _}}) when is_pid(Pid) ->
+sockname(#sslsocket{pid = Pid, fd = {Transport, Socket, _, _}}) when is_pid(Pid) ->
ssl_socket:sockname(Transport, Socket).
%%---------------------------------------------------------------
@@ -437,8 +447,8 @@ session_info(#sslsocket{pid = {Listen,_}}) when is_port(Listen) ->
{error, enotconn}.
%%---------------------------------------------------------------
--spec versions() -> [{ssl_app, string()} | {supported, [tls_atom_version()]} |
- {available, [tls_atom_version()]}].
+-spec versions() -> [{ssl_app, string()} | {supported, [tls_record:tls_atom_version()]} |
+ {available, [tls_record:tls_atom_version()]}].
%%
%% Description: Returns a list of relevant versions.
%%--------------------------------------------------------------------
@@ -541,7 +551,8 @@ do_connect(Address, Port,
{Transport, _, _, _} = CbInfo,
try Transport:connect(Address, Port, SocketOpts, Timeout) of
{ok, Socket} ->
- ssl_connection:connect(ConnetionCb, Address, Port, Socket, {SslOpts,EmOpts},
+ ssl_connection:connect(ConnetionCb, Address, Port, Socket,
+ {SslOpts, emulated_socket_options(EmOpts, #socket_options{}), undefined},
self(), CbInfo, Timeout);
{error, Reason} ->
{error, Reason}
@@ -554,93 +565,96 @@ do_connect(Address, Port,
{error, {options, {socket_options, UserOpts}}}
end.
-handle_options(Opts0, _Role) ->
+%% Handle extra ssl options given to ssl_accept
+handle_options(Opts0, #ssl_options{protocol = Protocol, cacerts = CaCerts0,
+ cacertfile = CaCertFile0} = InheritedSslOpts) ->
+ RecordCB = record_cb(Protocol),
+ CaCerts = handle_option(cacerts, Opts0, CaCerts0),
+ {Verify, FailIfNoPeerCert, CaCertDefault, VerifyFun} = handle_verify_options(Opts0, CaCerts),
+ CaCertFile = case proplists:get_value(cacertfile, Opts0, CaCertFile0) of
+ undefined ->
+ CaCertDefault;
+ CAFile ->
+ CAFile
+ end,
+ NewVerifyOpts = InheritedSslOpts#ssl_options{cacerts = CaCerts,
+ cacertfile = CaCertFile,
+ verify = Verify,
+ verify_fun = VerifyFun,
+ fail_if_no_peer_cert = FailIfNoPeerCert},
+ SslOpts1 = lists:foldl(fun(Key, PropList) ->
+ proplists:delete(Key, PropList)
+ end, Opts0, [cacerts, cacertfile, verify, verify_fun, fail_if_no_peer_cert]),
+ case handle_option(versions, SslOpts1, []) of
+ [] ->
+ new_ssl_options(SslOpts1, NewVerifyOpts, RecordCB);
+ Value ->
+ Versions = [RecordCB:protocol_version(Vsn) || Vsn <- Value],
+ new_ssl_options(proplists:delete(versions, SslOpts1),
+ NewVerifyOpts#ssl_options{versions = Versions}, record_cb(Protocol))
+ end.
+
+%% Handle all options in listen and connect
+handle_options(Opts0) ->
Opts = proplists:expand([{binary, [{mode, binary}]},
{list, [{mode, list}]}], Opts0),
- ReuseSessionFun = fun(_, _, _, _) -> true end,
+ assert_proplist(Opts),
+ RecordCb = record_cb(Opts),
- DefaultVerifyNoneFun =
- {fun(_,{bad_cert, _}, UserState) ->
- {valid, UserState};
- (_,{extension, _}, UserState) ->
- {unknown, UserState};
- (_, valid, UserState) ->
- {valid, UserState};
- (_, valid_peer, UserState) ->
- {valid, UserState}
- end, []},
-
- VerifyNoneFun = handle_option(verify_fun, Opts, DefaultVerifyNoneFun),
-
- UserFailIfNoPeerCert = handle_option(fail_if_no_peer_cert, Opts, false),
- UserVerifyFun = handle_option(verify_fun, Opts, undefined),
+ ReuseSessionFun = fun(_, _, _, _) -> true end,
CaCerts = handle_option(cacerts, Opts, undefined),
- {Verify, FailIfNoPeerCert, CaCertDefault, VerifyFun} =
- %% Handle 0, 1, 2 for backwards compatibility
- case proplists:get_value(verify, Opts, verify_none) of
- 0 ->
- {verify_none, false,
- ca_cert_default(verify_none, VerifyNoneFun, CaCerts), VerifyNoneFun};
- 1 ->
- {verify_peer, false,
- ca_cert_default(verify_peer, UserVerifyFun, CaCerts), UserVerifyFun};
- 2 ->
- {verify_peer, true,
- ca_cert_default(verify_peer, UserVerifyFun, CaCerts), UserVerifyFun};
- verify_none ->
- {verify_none, false,
- ca_cert_default(verify_none, VerifyNoneFun, CaCerts), VerifyNoneFun};
- verify_peer ->
- {verify_peer, UserFailIfNoPeerCert,
- ca_cert_default(verify_peer, UserVerifyFun, CaCerts), UserVerifyFun};
- Value ->
- throw({error, {options, {verify, Value}}})
- end,
-
+ {Verify, FailIfNoPeerCert, CaCertDefault, VerifyFun} = handle_verify_options(Opts, CaCerts),
+
CertFile = handle_option(certfile, Opts, <<>>),
-
+
+ RecordCb = record_cb(Opts),
+
Versions = case handle_option(versions, Opts, []) of
[] ->
- tls_record:supported_protocol_versions();
+ RecordCb:supported_protocol_versions();
Vsns ->
- [tls_record:protocol_version(Vsn) || Vsn <- Vsns]
+ [RecordCb:protocol_version(Vsn) || Vsn <- Vsns]
end,
SSLOptions = #ssl_options{
- versions = Versions,
- verify = validate_option(verify, Verify),
- verify_fun = VerifyFun,
- fail_if_no_peer_cert = FailIfNoPeerCert,
- verify_client_once = handle_option(verify_client_once, Opts, false),
- depth = handle_option(depth, Opts, 1),
- cert = handle_option(cert, Opts, undefined),
- certfile = CertFile,
- key = handle_option(key, Opts, undefined),
- keyfile = handle_option(keyfile, Opts, CertFile),
- password = handle_option(password, Opts, ""),
- cacerts = CaCerts,
- cacertfile = handle_option(cacertfile, Opts, CaCertDefault),
- dh = handle_option(dh, Opts, undefined),
- dhfile = handle_option(dhfile, Opts, undefined),
- user_lookup_fun = handle_option(user_lookup_fun, Opts, undefined),
- psk_identity = handle_option(psk_identity, Opts, undefined),
- srp_identity = handle_option(srp_identity, Opts, undefined),
- ciphers = handle_option(ciphers, Opts, []),
- %% Server side option
- reuse_session = handle_option(reuse_session, Opts, ReuseSessionFun),
- reuse_sessions = handle_option(reuse_sessions, Opts, true),
- secure_renegotiate = handle_option(secure_renegotiate, Opts, false),
- renegotiate_at = handle_option(renegotiate_at, Opts, ?DEFAULT_RENEGOTIATE_AT),
- hibernate_after = handle_option(hibernate_after, Opts, undefined),
- erl_dist = handle_option(erl_dist, Opts, false),
- next_protocols_advertised =
+ versions = Versions,
+ verify = validate_option(verify, Verify),
+ verify_fun = VerifyFun,
+ fail_if_no_peer_cert = FailIfNoPeerCert,
+ verify_client_once = handle_option(verify_client_once, Opts, false),
+ depth = handle_option(depth, Opts, 1),
+ cert = handle_option(cert, Opts, undefined),
+ certfile = CertFile,
+ key = handle_option(key, Opts, undefined),
+ keyfile = handle_option(keyfile, Opts, CertFile),
+ password = handle_option(password, Opts, ""),
+ cacerts = CaCerts,
+ cacertfile = handle_option(cacertfile, Opts, CaCertDefault),
+ dh = handle_option(dh, Opts, undefined),
+ dhfile = handle_option(dhfile, Opts, undefined),
+ user_lookup_fun = handle_option(user_lookup_fun, Opts, undefined),
+ psk_identity = handle_option(psk_identity, Opts, undefined),
+ srp_identity = handle_option(srp_identity, Opts, undefined),
+ ciphers = handle_cipher_option(proplists:get_value(ciphers, Opts, []),
+ RecordCb:highest_protocol_version(Versions)),
+ %% Server side option
+ reuse_session = handle_option(reuse_session, Opts, ReuseSessionFun),
+ reuse_sessions = handle_option(reuse_sessions, Opts, true),
+ secure_renegotiate = handle_option(secure_renegotiate, Opts, false),
+ renegotiate_at = handle_option(renegotiate_at, Opts, ?DEFAULT_RENEGOTIATE_AT),
+ hibernate_after = handle_option(hibernate_after, Opts, undefined),
+ erl_dist = handle_option(erl_dist, Opts, false),
+ next_protocols_advertised =
handle_option(next_protocols_advertised, Opts, undefined),
- next_protocol_selector =
+ next_protocol_selector =
make_next_protocol_selector(
handle_option(client_preferred_next_protocols, Opts, undefined)),
- log_alert = handle_option(log_alert, Opts, true)
- },
+ log_alert = handle_option(log_alert, Opts, true),
+ server_name_indication = handle_option(server_name_indication, Opts, undefined),
+ honor_cipher_order = handle_option(honor_cipher_order, Opts, false),
+ protocol = proplists:get_value(protocol, Opts, tls)
+ },
CbInfo = proplists:get_value(cb_info, Opts, {gen_tcp, tcp, tcp_closed, tcp_error}),
SslOptions = [protocol, versions, verify, verify_fun,
@@ -651,16 +665,17 @@ handle_options(Opts0, _Role) ->
reuse_session, reuse_sessions, ssl_imp,
cb_info, renegotiate_at, secure_renegotiate, hibernate_after,
erl_dist, next_protocols_advertised,
- client_preferred_next_protocols, log_alert],
+ client_preferred_next_protocols, log_alert,
+ server_name_indication, honor_cipher_order],
SockOpts = lists:foldl(fun(Key, PropList) ->
proplists:delete(Key, PropList)
end, Opts, SslOptions),
- {SSLsock, Emulated} = emulated_options(SockOpts),
+ {Sock, Emulated} = emulated_options(SockOpts),
ConnetionCb = connection_cb(Opts),
- {ok, #config{ssl = SSLOptions, emulated = Emulated, inet_ssl = SSLsock,
+ {ok, #config{ssl = SSLOptions, emulated = Emulated, inet_ssl = Sock,
inet_user = SockOpts, transport_info = CbInfo, connection_cb = ConnetionCb
}}.
@@ -694,11 +709,9 @@ validate_option(verify_fun, Fun) when is_function(Fun) ->
end, Fun};
validate_option(verify_fun, {Fun, _} = Value) when is_function(Fun) ->
Value;
-validate_option(fail_if_no_peer_cert, Value)
- when Value == true; Value == false ->
+validate_option(fail_if_no_peer_cert, Value) when is_boolean(Value) ->
Value;
-validate_option(verify_client_once, Value)
- when Value == true; Value == false ->
+validate_option(verify_client_once, Value) when is_boolean(Value) ->
Value;
validate_option(depth, Value) when is_integer(Value),
Value >= 0, Value =< 255->
@@ -711,7 +724,7 @@ validate_option(certfile, undefined = Value) ->
validate_option(certfile, Value) when is_binary(Value) ->
Value;
validate_option(certfile, Value) when is_list(Value) ->
- list_to_binary(Value);
+ binary_filename(Value);
validate_option(key, undefined) ->
undefined;
@@ -728,7 +741,7 @@ validate_option(keyfile, undefined) ->
validate_option(keyfile, Value) when is_binary(Value) ->
Value;
validate_option(keyfile, Value) when is_list(Value), Value =/= "" ->
- list_to_binary(Value);
+ binary_filename(Value);
validate_option(password, Value) when is_list(Value) ->
Value;
@@ -742,7 +755,7 @@ validate_option(cacertfile, undefined) ->
validate_option(cacertfile, Value) when is_binary(Value) ->
Value;
validate_option(cacertfile, Value) when is_list(Value), Value =/= ""->
- list_to_binary(Value);
+ binary_filename(Value);
validate_option(dh, Value) when Value == undefined;
is_binary(Value) ->
Value;
@@ -751,12 +764,12 @@ validate_option(dhfile, undefined = Value) ->
validate_option(dhfile, Value) when is_binary(Value) ->
Value;
validate_option(dhfile, Value) when is_list(Value), Value =/= "" ->
- list_to_binary(Value);
+ binary_filename(Value);
validate_option(psk_identity, undefined) ->
undefined;
validate_option(psk_identity, Identity)
when is_list(Identity), Identity =/= "", length(Identity) =< 65535 ->
- list_to_binary(Identity);
+ binary_filename(Identity);
validate_option(user_lookup_fun, undefined) ->
undefined;
validate_option(user_lookup_fun, {Fun, _} = Value) when is_function(Fun, 3) ->
@@ -765,25 +778,15 @@ validate_option(srp_identity, undefined) ->
undefined;
validate_option(srp_identity, {Username, Password})
when is_list(Username), is_list(Password), Username =/= "", length(Username) =< 255 ->
- {list_to_binary(Username), list_to_binary(Password)};
+ {unicode:characters_to_binary(Username),
+ unicode:characters_to_binary(Password)};
-validate_option(ciphers, Value) when is_list(Value) ->
- Version = tls_record:highest_protocol_version([]),
- try cipher_suites(Version, Value)
- catch
- exit:_ ->
- throw({error, {options, {ciphers, Value}}});
- error:_->
- throw({error, {options, {ciphers, Value}}})
- end;
validate_option(reuse_session, Value) when is_function(Value) ->
Value;
-validate_option(reuse_sessions, Value) when Value == true;
- Value == false ->
+validate_option(reuse_sessions, Value) when is_boolean(Value) ->
Value;
-validate_option(secure_renegotiate, Value) when Value == true;
- Value == false ->
+validate_option(secure_renegotiate, Value) when is_boolean(Value) ->
Value;
validate_option(renegotiate_at, Value) when is_integer(Value) ->
erlang:min(Value, ?DEFAULT_RENEGOTIATE_AT);
@@ -792,8 +795,7 @@ validate_option(hibernate_after, undefined) ->
undefined;
validate_option(hibernate_after, Value) when is_integer(Value), Value >= 0 ->
Value;
-validate_option(erl_dist,Value) when Value == true;
- Value == false ->
+validate_option(erl_dist,Value) when is_boolean(Value) ->
Value;
validate_option(client_preferred_next_protocols = Opt, {Precedence, PreferredProtocols} = Value)
when is_list(PreferredProtocols) ->
@@ -819,8 +821,7 @@ validate_option(client_preferred_next_protocols = Opt, {Precedence, PreferredPro
validate_option(client_preferred_next_protocols, undefined) ->
undefined;
-validate_option(log_alert, Value) when Value == true;
- Value == false ->
+validate_option(log_alert, Value) when is_boolean(Value) ->
Value;
validate_option(next_protocols_advertised = Opt, Value) when is_list(Value) ->
case tls_record:highest_protocol_version([]) of
@@ -833,6 +834,14 @@ validate_option(next_protocols_advertised = Opt, Value) when is_list(Value) ->
validate_option(next_protocols_advertised, undefined) ->
undefined;
+validate_option(server_name_indication, Value) when is_list(Value) ->
+ Value;
+validate_option(server_name_indication, disable) ->
+ disable;
+validate_option(server_name_indication, undefined) ->
+ undefined;
+validate_option(honor_cipher_order, Value) when is_boolean(Value) ->
+ Value;
validate_option(Opt, Value) ->
throw({error, {options, {Opt, Value}}}).
@@ -892,74 +901,72 @@ ca_cert_default(verify_peer, {Fun,_}, _) when is_function(Fun) ->
%% some trusted certs.
ca_cert_default(verify_peer, undefined, _) ->
"".
-
-emulated_options() ->
- [mode, packet, active, header, packet_size].
-
-internal_inet_values() ->
- [{packet_size,0},{packet, 0},{header, 0},{active, false},{mode,binary}].
-
-socket_options(InetValues) ->
- #socket_options{
- mode = proplists:get_value(mode, InetValues, lists),
- header = proplists:get_value(header, InetValues, 0),
- active = proplists:get_value(active, InetValues, active),
- packet = proplists:get_value(packet, InetValues, 0),
- packet_size = proplists:get_value(packet_size, InetValues)
- }.
-
emulated_options(Opts) ->
- emulated_options(Opts, internal_inet_values(), #socket_options{}).
-
-emulated_options([{mode,Opt}|Opts], Inet, Emulated) ->
- validate_inet_option(mode,Opt),
- emulated_options(Opts, Inet, Emulated#socket_options{mode=Opt});
-emulated_options([{header,Opt}|Opts], Inet, Emulated) ->
- validate_inet_option(header,Opt),
- emulated_options(Opts, Inet, Emulated#socket_options{header=Opt});
-emulated_options([{active,Opt}|Opts], Inet, Emulated) ->
- validate_inet_option(active,Opt),
- emulated_options(Opts, Inet, Emulated#socket_options{active=Opt});
-emulated_options([{packet,Opt}|Opts], Inet, Emulated) ->
- validate_inet_option(packet,Opt),
- emulated_options(Opts, Inet, Emulated#socket_options{packet=Opt});
-emulated_options([{packet_size,Opt}|Opts], Inet, Emulated) ->
- validate_inet_option(packet_size,Opt),
- emulated_options(Opts, Inet, Emulated#socket_options{packet_size=Opt});
+ emulated_options(Opts, ssl_socket:internal_inet_values(), ssl_socket:default_inet_values()).
+
+emulated_options([{mode, Value} = Opt |Opts], Inet, Emulated) ->
+ validate_inet_option(mode, Value),
+ emulated_options(Opts, Inet, [Opt | proplists:delete(mode, Emulated)]);
+emulated_options([{header, Value} = Opt | Opts], Inet, Emulated) ->
+ validate_inet_option(header, Value),
+ emulated_options(Opts, Inet, [Opt | proplists:delete(header, Emulated)]);
+emulated_options([{active, Value} = Opt |Opts], Inet, Emulated) ->
+ validate_inet_option(active, Value),
+ emulated_options(Opts, Inet, [Opt | proplists:delete(active, Emulated)]);
+emulated_options([{packet, Value} = Opt |Opts], Inet, Emulated) ->
+ validate_inet_option(packet, Value),
+ emulated_options(Opts, Inet, [Opt | proplists:delete(packet, Emulated)]);
+emulated_options([{packet_size, Value} = Opt | Opts], Inet, Emulated) ->
+ validate_inet_option(packet_size, Value),
+ emulated_options(Opts, Inet, [Opt | proplists:delete(packet_size, Emulated)]);
emulated_options([Opt|Opts], Inet, Emulated) ->
emulated_options(Opts, [Opt|Inet], Emulated);
emulated_options([], Inet,Emulated) ->
{Inet, Emulated}.
-cipher_suites(Version, []) ->
- ssl_cipher:suites(Version);
-cipher_suites(Version, [{_,_,_,_}| _] = Ciphers0) -> %% Backwards compatibility
+handle_cipher_option(Value, Version) when is_list(Value) ->
+ try binary_cipher_suites(Version, Value) of
+ Suites ->
+ Suites
+ catch
+ exit:_ ->
+ throw({error, {options, {ciphers, Value}}});
+ error:_->
+ throw({error, {options, {ciphers, Value}}})
+ end.
+
+binary_cipher_suites(Version, []) ->
+ %% Defaults to all supported suites that does
+ %% not require explicit configuration
+ ssl_cipher:filter_suites(ssl_cipher:suites(Version));
+binary_cipher_suites(Version, [{_,_,_,_}| _] = Ciphers0) -> %% Backwards compatibility
Ciphers = [{KeyExchange, Cipher, Hash} || {KeyExchange, Cipher, Hash, _} <- Ciphers0],
- cipher_suites(Version, Ciphers);
-cipher_suites(Version, [{_,_,_}| _] = Ciphers0) ->
+ binary_cipher_suites(Version, Ciphers);
+binary_cipher_suites(Version, [{_,_,_}| _] = Ciphers0) ->
Ciphers = [ssl_cipher:suite(C) || C <- Ciphers0],
- cipher_suites(Version, Ciphers);
+ binary_cipher_suites(Version, Ciphers);
-cipher_suites(Version, [Cipher0 | _] = Ciphers0) when is_binary(Cipher0) ->
- Supported0 = ssl_cipher:suites(Version)
+binary_cipher_suites(Version, [Cipher0 | _] = Ciphers0) when is_binary(Cipher0) ->
+ All = ssl_cipher:suites(Version)
++ ssl_cipher:anonymous_suites()
++ ssl_cipher:psk_suites(Version)
++ ssl_cipher:srp_suites(),
- Supported = ssl_cipher:filter_suites(Supported0),
- case [Cipher || Cipher <- Ciphers0, lists:member(Cipher, Supported)] of
+ case [Cipher || Cipher <- Ciphers0, lists:member(Cipher, All)] of
[] ->
- Supported;
+ %% Defaults to all supported suites that does
+ %% not require explicit configuration
+ ssl_cipher:filter_suites(ssl_cipher:suites(Version));
Ciphers ->
Ciphers
end;
-cipher_suites(Version, [Head | _] = Ciphers0) when is_list(Head) ->
+binary_cipher_suites(Version, [Head | _] = Ciphers0) when is_list(Head) ->
%% Format: ["RC4-SHA","RC4-MD5"]
Ciphers = [ssl_cipher:openssl_suite(C) || C <- Ciphers0],
- cipher_suites(Version, Ciphers);
-cipher_suites(Version, Ciphers0) ->
+ binary_cipher_suites(Version, Ciphers);
+binary_cipher_suites(Version, Ciphers0) ->
%% Format: "RC4-SHA:RC4-MD5"
Ciphers = [ssl_cipher:openssl_suite(C) || C <- string:tokens(Ciphers0, ":")],
- cipher_suites(Version, Ciphers).
+ binary_cipher_suites(Version, Ciphers).
unexpected_format(Error) ->
lists:flatten(io_lib:format("Unexpected error: ~p", [Error])).
@@ -1027,7 +1034,139 @@ connection_cb(dtls) ->
connection_cb(Opts) ->
connection_cb(proplists:get_value(protocol, Opts, tls)).
+record_cb(tls) ->
+ tls_record;
+record_cb(dtls) ->
+ dtls_record;
+record_cb(Opts) ->
+ record_cb(proplists:get_value(protocol, Opts, tls)).
+
connection_sup(tls_connection) ->
tls_connection_sup;
connection_sup(dtls_connection) ->
dtls_connection_sup.
+
+binary_filename(FileName) ->
+ Enc = file:native_name_encoding(),
+ unicode:characters_to_binary(FileName, unicode, Enc).
+
+assert_proplist([]) ->
+ true;
+assert_proplist([{Key,_} | Rest]) when is_atom(Key) ->
+ assert_proplist(Rest);
+%% Handle exceptions
+assert_proplist([inet | Rest]) ->
+ assert_proplist(Rest);
+assert_proplist([inet6 | Rest]) ->
+ assert_proplist(Rest);
+assert_proplist([Value | _]) ->
+ throw({option_not_a_key_value_tuple, Value}).
+
+emulated_socket_options(InetValues, #socket_options{
+ mode = Mode,
+ header = Header,
+ active = Active,
+ packet = Packet,
+ packet_size = Size}) ->
+ #socket_options{
+ mode = proplists:get_value(mode, InetValues, Mode),
+ header = proplists:get_value(header, InetValues, Header),
+ active = proplists:get_value(active, InetValues, Active),
+ packet = proplists:get_value(packet, InetValues, Packet),
+ packet_size = proplists:get_value(packet_size, InetValues, Size)
+ }.
+
+new_ssl_options([], #ssl_options{} = Opts, _) ->
+ Opts;
+new_ssl_options([{verify_client_once, Value} | Rest], #ssl_options{} = Opts, RecordCB) ->
+ new_ssl_options(Rest, Opts#ssl_options{verify_client_once = validate_option(verify_client_once, Value)}, RecordCB);
+new_ssl_options([{depth, Value} | Rest], #ssl_options{} = Opts, RecordCB) ->
+ new_ssl_options(Rest, Opts#ssl_options{depth = validate_option(depth, Value)}, RecordCB);
+new_ssl_options([{cert, Value} | Rest], #ssl_options{} = Opts, RecordCB) ->
+ new_ssl_options(Rest, Opts#ssl_options{cert = validate_option(cert, Value)}, RecordCB);
+new_ssl_options([{certfile, Value} | Rest], #ssl_options{} = Opts, RecordCB) ->
+ new_ssl_options(Rest, Opts#ssl_options{certfile = validate_option(certfile, Value)}, RecordCB);
+new_ssl_options([{key, Value} | Rest], #ssl_options{} = Opts, RecordCB) ->
+ new_ssl_options(Rest, Opts#ssl_options{key = validate_option(key, Value)}, RecordCB);
+new_ssl_options([{keyfile, Value} | Rest], #ssl_options{} = Opts, RecordCB) ->
+ new_ssl_options(Rest, Opts#ssl_options{keyfile = validate_option(keyfile, Value)}, RecordCB);
+new_ssl_options([{password, Value} | Rest], #ssl_options{} = Opts, RecordCB) ->
+ new_ssl_options(Rest, Opts#ssl_options{password = validate_option(password, Value)}, RecordCB);
+new_ssl_options([{dh, Value} | Rest], #ssl_options{} = Opts, RecordCB) ->
+ new_ssl_options(Rest, Opts#ssl_options{dh = validate_option(dh, Value)}, RecordCB);
+new_ssl_options([{dhfile, Value} | Rest], #ssl_options{} = Opts, RecordCB) ->
+ new_ssl_options(Rest, Opts#ssl_options{dhfile = validate_option(dhfile, Value)}, RecordCB);
+new_ssl_options([{user_lookup_fun, Value} | Rest], #ssl_options{} = Opts, RecordCB) ->
+ new_ssl_options(Rest, Opts#ssl_options{user_lookup_fun = validate_option(user_lookup_fun, Value)}, RecordCB);
+new_ssl_options([{psk_identity, Value} | Rest], #ssl_options{} = Opts, RecordCB) ->
+ new_ssl_options(Rest, Opts#ssl_options{psk_identity = validate_option(psk_identity, Value)}, RecordCB);
+new_ssl_options([{srp_identity, Value} | Rest], #ssl_options{} = Opts, RecordCB) ->
+ new_ssl_options(Rest, Opts#ssl_options{srp_identity = validate_option(srp_identity, Value)}, RecordCB);
+new_ssl_options([{ciphers, Value} | Rest], #ssl_options{versions = Versions} = Opts, RecordCB) ->
+ Ciphers = handle_cipher_option(Value, RecordCB:highest_protocol_version(Versions)),
+ new_ssl_options(Rest,
+ Opts#ssl_options{ciphers = Ciphers}, RecordCB);
+new_ssl_options([{reuse_session, Value} | Rest], #ssl_options{} = Opts, RecordCB) ->
+ new_ssl_options(Rest, Opts#ssl_options{reuse_session = validate_option(reuse_session, Value)}, RecordCB);
+new_ssl_options([{reuse_sessions, Value} | Rest], #ssl_options{} = Opts, RecordCB) ->
+ new_ssl_options(Rest, Opts#ssl_options{reuse_sessions = validate_option(reuse_sessions, Value)}, RecordCB);
+new_ssl_options([{ssl_imp, _Value} | Rest], #ssl_options{} = Opts, RecordCB) -> %% Not used backwards compatibility
+ new_ssl_options(Rest, Opts, RecordCB);
+new_ssl_options([{renegotiate_at, Value} | Rest], #ssl_options{} = Opts, RecordCB) ->
+ new_ssl_options(Rest, Opts#ssl_options{ renegotiate_at = validate_option(renegotiate_at, Value)}, RecordCB);
+new_ssl_options([{secure_renegotiate, Value} | Rest], #ssl_options{} = Opts, RecordCB) ->
+ new_ssl_options(Rest, Opts#ssl_options{secure_renegotiate = validate_option(secure_renegotiate, Value)}, RecordCB);
+new_ssl_options([{hibernate_after, Value} | Rest], #ssl_options{} = Opts, RecordCB) ->
+ new_ssl_options(Rest, Opts#ssl_options{hibernate_after = validate_option(hibernate_after, Value)}, RecordCB);
+new_ssl_options([{next_protocols_advertised, Value} | Rest], #ssl_options{} = Opts, RecordCB) ->
+ new_ssl_options(Rest, Opts#ssl_options{next_protocols_advertised = validate_option(next_protocols_advertised, Value)}, RecordCB);
+new_ssl_options([{client_preferred_next_protocols, Value} | Rest], #ssl_options{} = Opts, RecordCB) ->
+ new_ssl_options(Rest, Opts#ssl_options{next_protocol_selector =
+ make_next_protocol_selector(validate_option(client_preferred_next_protocols, Value))}, RecordCB);
+new_ssl_options([{log_alert, Value} | Rest], #ssl_options{} = Opts, RecordCB) ->
+ new_ssl_options(Rest, Opts#ssl_options{log_alert = validate_option(log_alert, Value)}, RecordCB);
+new_ssl_options([{server_name_indication, Value} | Rest], #ssl_options{} = Opts, RecordCB) ->
+ new_ssl_options(Rest, Opts#ssl_options{server_name_indication = validate_option(server_name_indication, Value)}, RecordCB);
+new_ssl_options([{honor_cipher_order, Value} | Rest], #ssl_options{} = Opts, RecordCB) ->
+ new_ssl_options(Rest, Opts#ssl_options{honor_cipher_order = validate_option(honor_cipher_order, Value)}, RecordCB);
+new_ssl_options([{Key, Value} | _Rest], #ssl_options{}, _) ->
+ throw({error, {options, {Key, Value}}}).
+
+
+handle_verify_options(Opts, CaCerts) ->
+ DefaultVerifyNoneFun =
+ {fun(_,{bad_cert, _}, UserState) ->
+ {valid, UserState};
+ (_,{extension, _}, UserState) ->
+ {unknown, UserState};
+ (_, valid, UserState) ->
+ {valid, UserState};
+ (_, valid_peer, UserState) ->
+ {valid, UserState}
+ end, []},
+ VerifyNoneFun = handle_option(verify_fun, Opts, DefaultVerifyNoneFun),
+
+ UserFailIfNoPeerCert = handle_option(fail_if_no_peer_cert, Opts, false),
+ UserVerifyFun = handle_option(verify_fun, Opts, undefined),
+
+
+ %% Handle 0, 1, 2 for backwards compatibility
+ case proplists:get_value(verify, Opts, verify_none) of
+ 0 ->
+ {verify_none, false,
+ ca_cert_default(verify_none, VerifyNoneFun, CaCerts), VerifyNoneFun};
+ 1 ->
+ {verify_peer, false,
+ ca_cert_default(verify_peer, UserVerifyFun, CaCerts), UserVerifyFun};
+ 2 ->
+ {verify_peer, true,
+ ca_cert_default(verify_peer, UserVerifyFun, CaCerts), UserVerifyFun};
+ verify_none ->
+ {verify_none, false,
+ ca_cert_default(verify_none, VerifyNoneFun, CaCerts), VerifyNoneFun};
+ verify_peer ->
+ {verify_peer, UserFailIfNoPeerCert,
+ ca_cert_default(verify_peer, UserVerifyFun, CaCerts), UserVerifyFun};
+ Value ->
+ throw({error, {options, {verify, Value}}})
+ end.
diff --git a/lib/ssl/src/ssl_alert.erl b/lib/ssl/src/ssl_alert.erl
index 5c842b4d19..78dc98bc25 100644
--- a/lib/ssl/src/ssl_alert.erl
+++ b/lib/ssl/src/ssl_alert.erl
@@ -1,7 +1,7 @@
%%
%% %CopyrightBegin%
%%
-%% Copyright Ericsson AB 2007-2013. All Rights Reserved.
+%% Copyright Ericsson AB 2007-2014. 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
@@ -31,22 +31,31 @@
-include("ssl_record.hrl").
-include("ssl_internal.hrl").
--export([encode/3, alert_txt/1, reason_code/2]).
+-export([encode/3, decode/1, alert_txt/1, reason_code/2]).
%%====================================================================
%% Internal application API
%%====================================================================
%%--------------------------------------------------------------------
--spec encode(#alert{}, tls_version(), #connection_states{}) ->
+-spec encode(#alert{}, ssl_record:ssl_version(), #connection_states{}) ->
{iolist(), #connection_states{}}.
%%
-%% Description:
+%% Description: Encodes an alert
%%--------------------------------------------------------------------
encode(#alert{} = Alert, Version, ConnectionStates) ->
ssl_record:encode_alert_record(Alert, Version, ConnectionStates).
%%--------------------------------------------------------------------
+-spec decode(binary()) -> [#alert{}] | #alert{}.
+%%
+%% Description: Decode alert(s), will return a singel own alert if peer
+%% sends garbage or too many warning alerts.
+%%--------------------------------------------------------------------
+decode(Bin) ->
+ decode(Bin, [], 0).
+
+%%--------------------------------------------------------------------
-spec reason_code(#alert{}, client | server) -> closed | {essl, string()}.
%%
%% Description: Returns the error reason that will be returned to the
@@ -71,6 +80,22 @@ alert_txt(#alert{level = Level, description = Description, where = {Mod,Line}})
%%--------------------------------------------------------------------
%%% Internal functions
%%--------------------------------------------------------------------
+
+%% It is very unlikely that an correct implementation will send more than one alert at the time
+%% So it there is more than 10 warning alerts we consider it an error
+decode(<<?BYTE(Level), ?BYTE(_), _/binary>>, _, N) when Level == ?WARNING, N > ?MAX_ALERTS ->
+ ?ALERT_REC(?FATAL, ?DECODE_ERROR);
+decode(<<?BYTE(Level), ?BYTE(Description), Rest/binary>>, Acc, N) when Level == ?WARNING ->
+ Alert = ?ALERT_REC(Level, Description),
+ decode(Rest, [Alert | Acc], N + 1);
+decode(<<?BYTE(Level), ?BYTE(Description), _Rest/binary>>, Acc, _) when Level == ?FATAL->
+ Alert = ?ALERT_REC(Level, Description),
+ lists:reverse([Alert | Acc]); %% No need to decode rest fatal alert will end the connection
+decode(<<?BYTE(_Level), _/binary>>, _, _) ->
+ ?ALERT_REC(?FATAL, ?ILLEGAL_PARAMETER);
+decode(<<>>, Acc, _) ->
+ lists:reverse(Acc, []).
+
level_txt(?WARNING) ->
"Warning:";
level_txt(?FATAL) ->
@@ -124,5 +149,17 @@ description_txt(?USER_CANCELED) ->
"user canceled";
description_txt(?NO_RENEGOTIATION) ->
"no renegotiation";
+description_txt(?UNSUPPORTED_EXTENSION) ->
+ "unsupported extension";
+description_txt(?CERTIFICATE_UNOBTAINABLE) ->
+ "certificate unobtainable";
+description_txt(?UNRECOGNISED_NAME) ->
+ "unrecognised name";
+description_txt(?BAD_CERTIFICATE_STATUS_RESPONSE) ->
+ "bad certificate status response";
+description_txt(?BAD_CERTIFICATE_HASH_VALUE) ->
+ "bad certificate hash value";
description_txt(?UNKNOWN_PSK_IDENTITY) ->
- "unknown psk identity".
+ "unknown psk identity";
+description_txt(Enum) ->
+ lists:flatten(io_lib:format("unsupported/unknown alert: ~p", [Enum])).
diff --git a/lib/ssl/src/ssl_alert.hrl b/lib/ssl/src/ssl_alert.hrl
index 2a8a91aefa..f4f1d74264 100644
--- a/lib/ssl/src/ssl_alert.hrl
+++ b/lib/ssl/src/ssl_alert.hrl
@@ -1,7 +1,7 @@
%%
%% %CopyrightBegin%
%%
-%% Copyright Ericsson AB 2007-2012. All Rights Reserved.
+%% Copyright Ericsson AB 2007-2014. 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
@@ -48,7 +48,7 @@
%% unsupported_certificate(43),
%% certificate_revoked(44),
%% certificate_expired(45),
- %% certificate_unknown(46),
+%% certificate_unknown(46),
%% illegal_parameter(47),
%% unknown_ca(48),
%% access_denied(49),
@@ -60,6 +60,13 @@
%% internal_error(80),
%% user_canceled(90),
%% no_renegotiation(100),
+%% RFC 4366
+%% unsupported_extension(110),
+%% certificate_unobtainable(111),
+%% unrecognized_name(112),
+%% bad_certificate_status_response(113),
+%% bad_certificate_hash_value(114),
+%% RFC 4366
%% unknown_psk_identity(115),
%% (255)
%% } AlertDescription;
@@ -88,10 +95,17 @@
-define(INTERNAL_ERROR, 80).
-define(USER_CANCELED, 90).
-define(NO_RENEGOTIATION, 100).
+-define(UNSUPPORTED_EXTENSION, 110).
+-define(CERTIFICATE_UNOBTAINABLE, 111).
+-define(UNRECOGNISED_NAME, 112).
+-define(BAD_CERTIFICATE_STATUS_RESPONSE, 113).
+-define(BAD_CERTIFICATE_HASH_VALUE, 114).
-define(UNKNOWN_PSK_IDENTITY, 115).
-define(ALERT_REC(Level,Desc), #alert{level=Level,description=Desc,where={?FILE, ?LINE}}).
+-define(MAX_ALERTS, 10).
+
%% Alert
-record(alert, {
level,
diff --git a/lib/ssl/src/ssl_api.hrl b/lib/ssl/src/ssl_api.hrl
index 607991750f..22185ff60a 100644
--- a/lib/ssl/src/ssl_api.hrl
+++ b/lib/ssl/src/ssl_api.hrl
@@ -1,7 +1,7 @@
%%
%% %CopyrightBegin%
%%
-%% Copyright Ericsson AB 2013-2013. All Rights Reserved.
+%% Copyright Ericsson AB 2013-2014. 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
@@ -24,8 +24,6 @@
%% Visible in API
-export_type([connect_option/0, listen_option/0, ssl_option/0, transport_option/0,
- erl_cipher_suite/0, %% From ssl_cipher.hrl
- tls_atom_version/0, %% From ssl_internal.hrl
prf_random/0, sslsocket/0]).
@@ -39,23 +37,24 @@
-type listen_option() :: socket_listen_option() | ssl_option() | transport_option().
-type socket_listen_option() :: gen_tcp:listen_option().
--type ssl_option() :: {verify, verify_type()} |
- {verify_fun, {fun(), InitialUserState::term()}} |
- {fail_if_no_peer_cert, boolean()} | {depth, integer()} |
- {cert, Der::binary()} | {certfile, path()} | {key, Der::binary()} |
- {keyfile, path()} | {password, string()} | {cacerts, [Der::binary()]} |
- {cacertfile, path()} | {dh, Der::binary()} | {dhfile, path()} |
- {user_lookup_fun, {fun(), InitialUserState::term()}} |
- {psk_identity, string()} |
- {srp_identity, {string(), string()}} |
- {ciphers, ciphers()} | {ssl_imp, ssl_imp()} | {reuse_sessions, boolean()} |
- {reuse_session, fun()} | {hibernate_after, integer()|undefined} |
- {next_protocols_advertised, list(binary())} |
- {client_preferred_next_protocols, binary(), client | server, list(binary())}.
+-type ssl_option() :: {versions, ssl_record:ssl_atom_version()} |
+ {verify, verify_type()} |
+ {verify_fun, {fun(), InitialUserState::term()}} |
+ {fail_if_no_peer_cert, boolean()} | {depth, integer()} |
+ {cert, Der::binary()} | {certfile, path()} | {key, Der::binary()} |
+ {keyfile, path()} | {password, string()} | {cacerts, [Der::binary()]} |
+ {cacertfile, path()} | {dh, Der::binary()} | {dhfile, path()} |
+ {user_lookup_fun, {fun(), InitialUserState::term()}} |
+ {psk_identity, string()} |
+ {srp_identity, {string(), string()}} |
+ {ciphers, ciphers()} | {ssl_imp, ssl_imp()} | {reuse_sessions, boolean()} |
+ {reuse_session, fun()} | {hibernate_after, integer()|undefined} |
+ {next_protocols_advertised, list(binary())} |
+ {client_preferred_next_protocols, binary(), client | server, list(binary())}.
-type verify_type() :: verify_none | verify_peer.
-type path() :: string().
--type ciphers() :: [erl_cipher_suite()] |
+-type ciphers() :: [ssl_cipher:erl_cipher_suite()] |
string(). % (according to old API)
-type ssl_imp() :: new | old.
diff --git a/lib/ssl/src/ssl_cipher.erl b/lib/ssl/src/ssl_cipher.erl
index b2077c662a..72467ea2a0 100644
--- a/lib/ssl/src/ssl_cipher.erl
+++ b/lib/ssl/src/ssl_cipher.erl
@@ -1,7 +1,7 @@
%%
%% %CopyrightBegin%
%%
-%% Copyright Ericsson AB 2007-2013. All Rights Reserved.
+%% Copyright Ericsson AB 2007-2014. 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
@@ -34,10 +34,26 @@
-export([security_parameters/2, security_parameters/3, suite_definition/1,
decipher/5, cipher/5,
- suite/1, suites/1, ec_keyed_suites/0, anonymous_suites/0, psk_suites/1, srp_suites/0,
+ suite/1, suites/1, all_suites/1,
+ ec_keyed_suites/0, anonymous_suites/0, psk_suites/1, srp_suites/0,
openssl_suite/1, openssl_suite_name/1, filter/2, filter_suites/1,
hash_algorithm/1, sign_algorithm/1, is_acceptable_hash/2]).
+-export_type([cipher_suite/0,
+ erl_cipher_suite/0, openssl_cipher_suite/0,
+ key_algo/0]).
+
+-type cipher() :: null |rc4_128 | idea_cbc | des40_cbc | des_cbc | '3des_ede_cbc'
+ | aes_128_cbc | aes_256_cbc.
+-type hash() :: null | sha | md5 | sha224 | sha256 | sha384 | sha512.
+-type key_algo() :: null | rsa | dhe_rsa | dhe_dss | ecdhe_ecdsa| ecdh_ecdsa | ecdh_rsa| srp_rsa| srp_dss | psk | dhe_psk | rsa_psk | dh_anon | ecdh_anon | srp_anon.
+-type erl_cipher_suite() :: {key_algo(), cipher(), hash()}.
+-type int_cipher_suite() :: {key_algo(), cipher(), hash(), hash() | default_prf}.
+-type cipher_suite() :: binary().
+-type cipher_enum() :: integer().
+-type openssl_cipher_suite() :: string().
+
+
-compile(inline).
%%--------------------------------------------------------------------
@@ -51,7 +67,7 @@ security_parameters(?TLS_NULL_WITH_NULL_NULL = CipherSuite, SecParams) ->
security_parameters(undefined, CipherSuite, SecParams).
%%--------------------------------------------------------------------
--spec security_parameters(tls_version() | undefined, cipher_suite(), #security_parameters{}) ->
+-spec security_parameters(ssl_record:ssl_version() | undefined, cipher_suite(), #security_parameters{}) ->
#security_parameters{}.
%%
%% Description: Returns a security parameters record where the
@@ -72,7 +88,7 @@ security_parameters(Version, CipherSuite, SecParams) ->
hash_size = hash_size(Hash)}.
%%--------------------------------------------------------------------
--spec cipher(cipher_enum(), #cipher_state{}, binary(), iolist(), tls_version()) ->
+-spec cipher(cipher_enum(), #cipher_state{}, binary(), iodata(), ssl_record:ssl_version()) ->
{binary(), #cipher_state{}}.
%%
%% Description: Encrypts the data and the MAC using chipher described
@@ -127,7 +143,7 @@ block_cipher(Fun, BlockSz, #cipher_state{key=Key, iv=IV} = CS0,
{T, CS0#cipher_state{iv=NextIV}}.
%%--------------------------------------------------------------------
--spec decipher(cipher_enum(), integer(), #cipher_state{}, binary(), tls_version()) ->
+-spec decipher(cipher_enum(), integer(), #cipher_state{}, binary(), ssl_record:ssl_version()) ->
{binary(), binary(), #cipher_state{}} | #alert{}.
%%
%% Description: Decrypts the data and the MAC using cipher described
@@ -200,7 +216,7 @@ block_decipher(Fun, #cipher_state{key=Key, iv=IV} = CipherState0,
?ALERT_REC(?FATAL, ?BAD_RECORD_MAC)
end.
%%--------------------------------------------------------------------
--spec suites(tls_version()) -> [cipher_suite()].
+-spec suites(ssl_record:ssl_version()) -> [cipher_suite()].
%%
%% Description: Returns a list of supported cipher suites.
%%--------------------------------------------------------------------
@@ -209,6 +225,11 @@ suites({3, 0}) ->
suites({3, N}) ->
tls_v1:suites(N).
+all_suites(Version) ->
+ suites(Version)
+ ++ ssl_cipher:anonymous_suites()
+ ++ ssl_cipher:psk_suites(Version)
+ ++ ssl_cipher:srp_suites().
%%--------------------------------------------------------------------
-spec anonymous_suites() -> [cipher_suite()].
%%
@@ -229,7 +250,7 @@ anonymous_suites() ->
?TLS_ECDH_anon_WITH_AES_256_CBC_SHA].
%%--------------------------------------------------------------------
--spec psk_suites(tls_version() | integer()) -> [cipher_suite()].
+-spec psk_suites(ssl_record:ssl_version() | integer()) -> [cipher_suite()].
%%
%% Description: Returns a list of the PSK cipher suites, only supported
%% if explicitly set by user.
@@ -998,7 +1019,8 @@ openssl_suite_name(Cipher) ->
%%--------------------------------------------------------------------
-spec filter(undefined | binary(), [cipher_suite()]) -> [cipher_suite()].
%%
-%% Description: .
+%% Description: Select the cipher suites that can be used together with the
+%% supplied certificate. (Server side functionality)
%%-------------------------------------------------------------------
filter(undefined, Ciphers) ->
Ciphers;
@@ -1032,7 +1054,7 @@ filter(DerCert, Ciphers) ->
%%--------------------------------------------------------------------
-spec filter_suites([cipher_suite()]) -> [cipher_suite()].
%%
-%% Description: filter suites for algorithms
+%% Description: Filter suites for algorithms supported by crypto.
%%-------------------------------------------------------------------
filter_suites(Suites = [{_,_,_}|_]) ->
Algos = crypto:supports(),
diff --git a/lib/ssl/src/ssl_cipher.hrl b/lib/ssl/src/ssl_cipher.hrl
index 62a5269def..3ce9c19aa9 100644
--- a/lib/ssl/src/ssl_cipher.hrl
+++ b/lib/ssl/src/ssl_cipher.hrl
@@ -1,7 +1,7 @@
%%
%% %CopyrightBegin%
%%
-%% Copyright Ericsson AB 2007-2013. All Rights Reserved.
+%% Copyright Ericsson AB 2007-2014. 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
@@ -26,16 +26,6 @@
-ifndef(ssl_cipher).
-define(ssl_cipher, true).
--type cipher() :: null |rc4_128 | idea_cbc | des40_cbc | des_cbc | '3des_ede_cbc'
- | aes_128_cbc | aes_256_cbc.
--type hash() :: null | sha | md5 | sha224 | sha256 | sha384 | sha512.
--type key_algo() :: null | rsa | dhe_rsa | dhe_dss | ecdhe_ecdsa| ecdh_ecdsa | ecdh_rsa| srp_rsa| srp_dss | psk | dhe_psk | rsa_psk | dh_anon | ecdh_anon | srp_anon.
--type erl_cipher_suite() :: {key_algo(), cipher(), hash()}.
--type int_cipher_suite() :: {key_algo(), cipher(), hash(), hash() | default_prf}.
--type cipher_suite() :: binary().
--type cipher_enum() :: integer().
--type openssl_cipher_suite() :: string().
-
%%% SSL cipher protocol %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
-define(CHANGE_CIPHER_SPEC_PROTO, 1). % _PROTO to not clash with
% SSL record protocol
diff --git a/lib/ssl/src/ssl_connection.erl b/lib/ssl/src/ssl_connection.erl
index b7c1b9e8d0..34006612a2 100644
--- a/lib/ssl/src/ssl_connection.erl
+++ b/lib/ssl/src/ssl_connection.erl
@@ -1,7 +1,7 @@
%%
%% %CopyrightBegin%
%%
-%% Copyright Ericsson AB 2013-2013. All Rights Reserved.
+%% Copyright Ericsson AB 2013-2014. 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
@@ -36,8 +36,8 @@
-include_lib("public_key/include/public_key.hrl").
%% Setup
--export([connect/8, ssl_accept/7, handshake/2,
- socket_control/4]).
+-export([connect/8, ssl_accept/7, handshake/2, handshake/3,
+ socket_control/4, socket_control/5]).
%% User Events
-export([send/2, recv/3, close/1, shutdown/2,
@@ -50,7 +50,8 @@
%% SSL FSM state functions
-export([hello/3, abbreviated/3, certify/3, cipher/3, connection/3]).
%% SSL all state functions
--export([handle_sync_event/4, handle_info/3, terminate/3]).
+-export([handle_sync_event/4, handle_info/3, terminate/3, format_status/2]).
+
%%====================================================================
%% Internal application API
@@ -99,6 +100,20 @@ handshake(#sslsocket{pid = Pid}, Timeout) ->
Error ->
Error
end.
+
+%%--------------------------------------------------------------------
+-spec handshake(#sslsocket{}, #ssl_options{}, timeout()) -> ok | {error, reason()}.
+%%
+%% Description: Starts ssl handshake with some new options
+%%--------------------------------------------------------------------
+handshake(#sslsocket{pid = Pid}, SslOptions, Timeout) ->
+ case sync_send_all_state_event(Pid, {start, SslOptions, Timeout}) of
+ connected ->
+ ok;
+ Error ->
+ Error
+ end.
+
%--------------------------------------------------------------------
-spec socket_control(tls_connection | dtls_connection, port(), pid(), atom()) ->
{ok, #sslsocket{}} | {error, reason()}.
@@ -106,9 +121,16 @@ handshake(#sslsocket{pid = Pid}, Timeout) ->
%% Description: Set the ssl process to own the accept socket
%%--------------------------------------------------------------------
socket_control(Connection, Socket, Pid, Transport) ->
+ socket_control(Connection, Socket, Pid, Transport, undefined).
+
+%--------------------------------------------------------------------
+-spec socket_control(tls_connection | dtls_connection, port(), pid(), atom(), pid()| undefined) ->
+ {ok, #sslsocket{}} | {error, reason()}.
+%%--------------------------------------------------------------------
+socket_control(Connection, Socket, Pid, Transport, ListenTracker) ->
case Transport:controlling_process(Socket, Pid) of
ok ->
- {ok, ssl_socket:socket(Pid, Transport, Socket, Connection)};
+ {ok, ssl_socket:socket(Pid, Transport, Socket, Connection, ListenTracker)};
{error, Reason} ->
{error, Reason}
end.
@@ -275,12 +297,11 @@ hello(#hello_request{}, #state{role = client} = State0, Connection) ->
{Record, State} = Connection:next_record(State0),
Connection:next_state(hello, hello, Record, State);
-hello({common_client_hello, Type, ServerHelloExt, HashSign},
- #state{session = #session{cipher_suite = CipherSuite},
- negotiated_version = Version} = State, Connection) ->
- {KeyAlg, _, _, _} = ssl_cipher:suite_definition(CipherSuite),
- NegotiatedHashSign = negotiated_hashsign(HashSign, KeyAlg, Version),
+hello({common_client_hello, Type, ServerHelloExt, NegotiatedHashSign},
+ State, Connection) ->
do_server_hello(Type, ServerHelloExt,
+ %% Note NegotiatedHashSign is only negotiated for real if
+ %% if TLS version is at least TLS-1.2
State#state{hashsign_algorithm = NegotiatedHashSign}, Connection);
hello(timeout, State, _) ->
@@ -417,7 +438,8 @@ certify(#server_key_exchange{exchange_keys = Keys},
calculate_secret(Params#server_key_params.params,
State#state{hashsign_algorithm = HashSign}, Connection);
false ->
- ?ALERT_REC(?FATAL, ?DECRYPT_ERROR)
+ Connection:handle_own_alert(?ALERT_REC(?FATAL, ?DECRYPT_ERROR),
+ Version, certify, State)
end
end;
@@ -426,8 +448,9 @@ certify(#server_key_exchange{} = Msg,
Connection:handle_unexpected_message(Msg, certify_server_keyexchange, State);
certify(#certificate_request{hashsign_algorithms = HashSigns},
- #state{session = #session{own_certificate = Cert}} = State0, Connection) ->
- HashSign = ssl_handshake:select_hashsign(HashSigns, Cert),
+ #state{session = #session{own_certificate = Cert},
+ negotiated_version = Version} = State0, Connection) ->
+ HashSign = ssl_handshake:select_hashsign(HashSigns, Cert, Version),
{Record, State} = Connection:next_record(State0#state{client_certificate_requested = true}),
Connection:next_state(certify, certify, Record,
State#state{cert_hashsign_algorithm = HashSign});
@@ -544,7 +567,7 @@ cipher(#certificate_verify{signature = Signature, hashsign_algorithm = CertHashS
tls_handshake_history = Handshake
} = State0, Connection) ->
- HashSign = ssl_handshake:select_cert_hashsign(CertHashSign, Algo, Version),
+ HashSign = ssl_handshake:select_hashsign_algs(CertHashSign, Algo, Version),
case ssl_handshake:certificate_verify(Signature, PublicKeyInfo,
Version, HashSign, MasterSecret, Handshake) of
valid ->
@@ -586,7 +609,7 @@ cipher(#finished{verify_data = Data} = Finished,
cipher(#next_protocol{selected_protocol = SelectedProtocol},
#state{role = server, expecting_next_protocol_negotiation = true} = State0, Connection) ->
{Record, State} = Connection:next_record(State0#state{next_protocol = SelectedProtocol}),
- Connection:next_state(cipher, cipher, Record, State);
+ Connection:next_state(cipher, cipher, Record, State#state{expecting_next_protocol_negotiation = false});
cipher(timeout, State, _) ->
{next_state, cipher, State, hibernate};
@@ -626,12 +649,27 @@ handle_sync_event({application_data, Data}, From, StateName,
State#state{send_queue = queue:in({From, Data}, Queue)},
get_timeout(State)};
-handle_sync_event({start, Timeout}, StartFrom, hello, #state{protocol_cb = Connection} = State) ->
- Timer = start_or_recv_cancel_timer(Timeout, StartFrom),
- Connection:hello(start, State#state{start_or_recv_from = StartFrom,
- timer = Timer});
+handle_sync_event({start, Timeout}, StartFrom, hello, #state{role = Role,
+ protocol_cb = Connection,
+ ssl_options = SSLOpts} = State0) ->
+ try
+ State = ssl_config(SSLOpts, Role, State0),
+ Timer = start_or_recv_cancel_timer(Timeout, StartFrom),
+ Connection:hello(start, State#state{start_or_recv_from = StartFrom,
+ timer = Timer})
+ catch throw:Error ->
+ {stop, normal, {error, Error}, State0}
+ end;
-%% The two clauses below could happen if a server upgrades a socket in
+handle_sync_event({start, {Opts, EmOpts}, Timeout}, From, StateName, State) ->
+ try
+ handle_sync_event({start, Timeout}, From, StateName, State#state{socket_options = EmOpts,
+ ssl_options = Opts})
+ catch throw:Error ->
+ {stop, normal, {error, Error}, State}
+ end;
+
+%% These two clauses below could happen if a server upgrades a socket in
%% active mode. Note that in this case we are lucky that
%% controlling_process has been evalueated before receiving handshake
%% messages from client. The server should put the socket in passive
@@ -641,13 +679,16 @@ handle_sync_event({start, Timeout}, StartFrom, hello, #state{protocol_cb = Conne
%% they upgrade an active socket.
handle_sync_event({start,_}, _, connection, State) ->
{reply, connected, connection, State, get_timeout(State)};
-handle_sync_event({start,_}, _From, error, {Error, State = #state{}}) ->
- {stop, {shutdown, Error}, {error, Error}, State};
-handle_sync_event({start, Timeout}, StartFrom, StateName, State) ->
- Timer = start_or_recv_cancel_timer(Timeout, StartFrom),
- {next_state, StateName, State#state{start_or_recv_from = StartFrom,
- timer = Timer}, get_timeout(State)};
+handle_sync_event({start, Timeout}, StartFrom, StateName, #state{role = Role, ssl_options = SslOpts} = State0) ->
+ try
+ State = ssl_config(SslOpts, Role, State0),
+ Timer = start_or_recv_cancel_timer(Timeout, StartFrom),
+ {next_state, StateName, State#state{start_or_recv_from = StartFrom,
+ timer = Timer}, get_timeout(State)}
+ catch throw:Error ->
+ {stop, normal, {error, Error}, State0}
+ end;
handle_sync_event(close, _, StateName, #state{protocol_cb = Connection} = State) ->
%% Run terminate before returning
@@ -655,7 +696,6 @@ handle_sync_event(close, _, StateName, #state{protocol_cb = Connection} = State)
%% as intended.
(catch Connection:terminate(user_close, StateName, State)),
{stop, normal, ok, State#state{terminated = true}};
-
handle_sync_event({shutdown, How0}, _, StateName,
#state{transport_cb = Transport,
negotiated_version = Version,
@@ -677,13 +717,14 @@ handle_sync_event({shutdown, How0}, _, StateName,
Error ->
{stop, normal, Error, State}
end;
-
+handle_sync_event({recv, _N, _Timeout}, _RecvFrom, StateName,
+ #state{socket_options = #socket_options{active = Active}} = State) when Active =/= false ->
+ {reply, {error, einval}, StateName, State, get_timeout(State)};
handle_sync_event({recv, N, Timeout}, RecvFrom, connection = StateName,
#state{protocol_cb = Connection} = State0) ->
Timer = start_or_recv_cancel_timer(Timeout, RecvFrom),
Connection:passive_receive(State0#state{bytes_to_read = N,
start_or_recv_from = RecvFrom, timer = Timer}, StateName);
-
%% Doing renegotiate wait with handling request until renegotiate is
%% finished. Will be handled by next_state_is_connection/2.
handle_sync_event({recv, N, Timeout}, RecvFrom, StateName, State) ->
@@ -691,26 +732,22 @@ handle_sync_event({recv, N, Timeout}, RecvFrom, StateName, State) ->
{next_state, StateName, State#state{bytes_to_read = N, start_or_recv_from = RecvFrom,
timer = Timer},
get_timeout(State)};
-
handle_sync_event({new_user, User}, _From, StateName,
State =#state{user_application = {OldMon, _}}) ->
NewMon = erlang:monitor(process, User),
erlang:demonitor(OldMon, [flush]),
{reply, ok, StateName, State#state{user_application = {NewMon,User}},
get_timeout(State)};
-
handle_sync_event({get_opts, OptTags}, _From, StateName,
#state{socket = Socket,
transport_cb = Transport,
socket_options = SockOpts} = State) ->
OptsReply = get_socket_opts(Transport, Socket, OptTags, SockOpts, []),
{reply, OptsReply, StateName, State, get_timeout(State)};
-
handle_sync_event(negotiated_next_protocol, _From, StateName, #state{next_protocol = undefined} = State) ->
{reply, {error, next_protocol_not_negotiated}, StateName, State, get_timeout(State)};
handle_sync_event(negotiated_next_protocol, _From, StateName, #state{next_protocol = NextProtocol} = State) ->
{reply, {ok, NextProtocol}, StateName, State, get_timeout(State)};
-
handle_sync_event({set_opts, Opts0}, _From, StateName0,
#state{socket_options = Opts1,
protocol_cb = Connection,
@@ -749,13 +786,10 @@ handle_sync_event({set_opts, Opts0}, _From, StateName0,
end
end
end;
-
handle_sync_event(renegotiate, From, connection, #state{protocol_cb = Connection} = State) ->
Connection:renegotiate(State#state{renegotiation = {true, From}});
-
handle_sync_event(renegotiate, _, StateName, State) ->
{reply, {error, already_renegotiating}, StateName, State, get_timeout(State)};
-
handle_sync_event({prf, Secret, Label, Seed, WantedLength}, _, StateName,
#state{connection_states = ConnectionStates,
negotiated_version = Version} = State) ->
@@ -781,7 +815,6 @@ handle_sync_event({prf, Secret, Label, Seed, WantedLength}, _, StateName,
error:Reason -> {error, Reason}
end,
{reply, Reply, StateName, State, get_timeout(State)};
-
handle_sync_event(info, _, StateName,
#state{negotiated_version = Version,
session = #session{cipher_suite = Suite}} = State) ->
@@ -789,14 +822,12 @@ handle_sync_event(info, _, StateName,
AtomVersion = tls_record:protocol_version(Version),
{reply, {ok, {AtomVersion, ssl:suite_definition(Suite)}},
StateName, State, get_timeout(State)};
-
handle_sync_event(session_info, _, StateName,
#state{session = #session{session_id = Id,
cipher_suite = Suite}} = State) ->
{reply, [{session_id, Id},
{cipher_suite, ssl:suite_definition(Suite)}],
StateName, State, get_timeout(State)};
-
handle_sync_event(peer_certificate, _, StateName,
#state{session = #session{peer_certificate = Cert}}
= State) ->
@@ -806,8 +837,9 @@ handle_info({ErrorTag, Socket, econnaborted}, StateName,
#state{socket = Socket, transport_cb = Transport,
start_or_recv_from = StartFrom, role = Role,
protocol_cb = Connection,
- error_tag = ErrorTag} = State) when StateName =/= connection ->
- Connection:alert_user(Transport, Socket, StartFrom, ?ALERT_REC(?FATAL, ?CLOSE_NOTIFY), Role),
+ error_tag = ErrorTag,
+ tracker = Tracker} = State) when StateName =/= connection ->
+ Connection:alert_user(Transport, Tracker,Socket, StartFrom, ?ALERT_REC(?FATAL, ?CLOSE_NOTIFY), Role),
{stop, normal, State};
handle_info({ErrorTag, Socket, Reason}, StateName, #state{socket = Socket,
@@ -857,7 +889,6 @@ terminate(_, _, #state{terminated = true}) ->
%% we want to guarantee that Transport:close has been called
%% when ssl:close/1 returns.
ok;
-
terminate({shutdown, transport_closed}, StateName, #state{send_queue = SendQueue,
renegotiation = Renegotiate} = State) ->
handle_unrecv_data(StateName, State),
@@ -870,7 +901,6 @@ terminate({shutdown, own_alert}, _StateName, #state{send_queue = SendQueue,
handle_trusted_certs_db(State),
notify_senders(SendQueue),
notify_renegotiater(Renegotiate);
-
terminate(Reason, connection, #state{negotiated_version = Version,
protocol_cb = Connection,
connection_states = ConnectionStates,
@@ -887,7 +917,6 @@ terminate(Reason, connection, #state{negotiated_version = Version,
_ ->
ok
end;
-
terminate(_Reason, _StateName, #state{transport_cb = Transport,
socket = Socket, send_queue = SendQueue,
renegotiation = Renegotiate} = State) ->
@@ -896,9 +925,50 @@ terminate(_Reason, _StateName, #state{transport_cb = Transport,
notify_renegotiater(Renegotiate),
Transport:close(Socket).
+format_status(normal, [_, State]) ->
+ [{data, [{"StateData", State}]}];
+format_status(terminate, [_, State]) ->
+ SslOptions = (State#state.ssl_options),
+ NewOptions = SslOptions#ssl_options{password = "***",
+ cert = "***",
+ cacerts = "***",
+ key = "***",
+ dh = "***",
+ psk_identity = "***",
+ srp_identity = "***"},
+ [{data, [{"StateData", State#state{connection_states = "***",
+ protocol_buffers = "***",
+ user_data_buffer = "***",
+ tls_handshake_history = "***",
+ session = "***",
+ private_key = "***",
+ diffie_hellman_params = "***",
+ diffie_hellman_keys = "***",
+ srp_params = "***",
+ srp_keys = "***",
+ premaster_secret = "***",
+ ssl_options = NewOptions
+ }}]}].
%%--------------------------------------------------------------------
%%% Internal functions
%%--------------------------------------------------------------------
+ssl_config(Opts, Role, State) ->
+ {ok, Ref, CertDbHandle, FileRefHandle, CacheHandle, OwnCert, Key, DHParams} =
+ ssl_config:init(Opts, Role),
+ Handshake = ssl_handshake:init_handshake_history(),
+ TimeStamp = calendar:datetime_to_gregorian_seconds({date(), time()}),
+ Session = State#state.session,
+ State#state{tls_handshake_history = Handshake,
+ session = Session#session{own_certificate = OwnCert,
+ time_stamp = TimeStamp},
+ file_ref_db = FileRefHandle,
+ cert_db_ref = Ref,
+ cert_db = CertDbHandle,
+ session_cache = CacheHandle,
+ private_key = Key,
+ diffie_hellman_params = DHParams,
+ ssl_options = Opts}.
+
do_server_hello(Type, #hello_extensions{next_protocol_negotiation = NextProtocols} =
ServerHelloExt,
#state{negotiated_version = Version,
@@ -1540,64 +1610,10 @@ cipher_role(server, Data, Session, #state{connection_states = ConnectionStates0
session = Session}, cipher, Connection),
Connection:next_state_connection(cipher, ack_connection(State#state{session = Session})).
-negotiated_hashsign(undefined, Algo, Version) ->
- default_hashsign(Version, Algo);
-negotiated_hashsign(HashSign = {_, _}, _, _) ->
- HashSign.
-
-%% RFC 5246, Sect. 7.4.1.4.1. Signature Algorithms
-%% If the client does not send the signature_algorithms extension, the
-%% server MUST do the following:
-%%
-%% - If the negotiated key exchange algorithm is one of (RSA, DHE_RSA,
-%% DH_RSA, RSA_PSK, ECDH_RSA, ECDHE_RSA), behave as if client had
-%% sent the value {sha1,rsa}.
-%%
-%% - If the negotiated key exchange algorithm is one of (DHE_DSS,
-%% DH_DSS), behave as if the client had sent the value {sha1,dsa}.
-%%
-%% - If the negotiated key exchange algorithm is one of (ECDH_ECDSA,
-%% ECDHE_ECDSA), behave as if the client had sent value {sha1,ecdsa}.
-
-default_hashsign(_Version = {Major, Minor}, KeyExchange)
- when Major >= 3 andalso Minor >= 3 andalso
- (KeyExchange == rsa orelse
- KeyExchange == dhe_rsa orelse
- KeyExchange == dh_rsa orelse
- KeyExchange == ecdhe_rsa orelse
- KeyExchange == ecdh_rsa orelse
- KeyExchange == srp_rsa) ->
- {sha, rsa};
-default_hashsign(_Version, KeyExchange)
- when KeyExchange == rsa;
- KeyExchange == dhe_rsa;
- KeyExchange == dh_rsa;
- KeyExchange == ecdhe_rsa;
- KeyExchange == ecdh_rsa;
- KeyExchange == srp_rsa ->
- {md5sha, rsa};
-default_hashsign(_Version, KeyExchange)
- when KeyExchange == ecdhe_ecdsa;
- KeyExchange == ecdh_ecdsa ->
- {sha, ecdsa};
-default_hashsign(_Version, KeyExchange)
- when KeyExchange == dhe_dss;
- KeyExchange == dh_dss;
- KeyExchange == srp_dss ->
- {sha, dsa};
-default_hashsign(_Version, KeyExchange)
- when KeyExchange == dh_anon;
- KeyExchange == ecdh_anon;
- KeyExchange == psk;
- KeyExchange == dhe_psk;
- KeyExchange == rsa_psk;
- KeyExchange == srp_anon ->
- {null, anon}.
-
select_curve(#state{client_ecc = {[Curve|_], _}}) ->
{namedCurve, Curve};
select_curve(_) ->
- {namedCurve, ?secp256k1}.
+ {namedCurve, ?secp256r1}.
is_anonymous(Algo) when Algo == dh_anon;
Algo == ecdh_anon;
@@ -1757,12 +1773,12 @@ handle_unrecv_data(StateName, #state{socket = Socket, transport_cb = Transport,
Connection:handle_close_alert(Data, StateName, State)
end.
-handle_trusted_certs_db(#state{ssl_options = #ssl_options{cacertfile = <<>>}}) ->
+handle_trusted_certs_db(#state{ssl_options = #ssl_options{cacertfile = <<>>, cacerts = []}}) ->
%% No trusted certs specified
ok;
handle_trusted_certs_db(#state{cert_db_ref = Ref,
cert_db = CertDb,
- ssl_options = #ssl_options{cacertfile = undefined}}) ->
+ ssl_options = #ssl_options{cacertfile = <<>>}}) ->
%% Certs provided as DER directly can not be shared
%% with other connections and it is safe to delete them when the connection ends.
ssl_pkix_db:remove_trusted_certs(Ref, CertDb);
@@ -1854,3 +1870,15 @@ make_premaster_secret({MajVer, MinVer}, rsa) ->
<<?BYTE(MajVer), ?BYTE(MinVer), Rand/binary>>;
make_premaster_secret(_, _) ->
undefined.
+
+negotiated_hashsign(undefined, Alg, Version) ->
+ %% Not negotiated choose default
+ case is_anonymous(Alg) of
+ true ->
+ {null, anon};
+ false ->
+ ssl_handshake:select_hashsign_algs(Alg, Version)
+ end;
+negotiated_hashsign(HashSign = {_, _}, _, _) ->
+ HashSign.
+
diff --git a/lib/ssl/src/ssl_connection.hrl b/lib/ssl/src/ssl_connection.hrl
index 27489ca325..592889b177 100644
--- a/lib/ssl/src/ssl_connection.hrl
+++ b/lib/ssl/src/ssl_connection.hrl
@@ -2,7 +2,7 @@
%%
%% %CopyrightBegin%
%%
-%% Copyright Ericsson AB 2013-2013. All Rights Reserved.
+%% Copyright Ericsson AB 2013-2014. 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
@@ -41,24 +41,24 @@
data_tag :: atom(), % ex tcp.
close_tag :: atom(), % ex tcp_closed
error_tag :: atom(), % ex tcp_error
- host :: string() | inet:ipaddress(),
+ host :: string() | inet:ip_address(),
port :: integer(),
socket :: port(),
ssl_options :: #ssl_options{},
socket_options :: #socket_options{},
connection_states :: #connection_states{},
protocol_buffers :: term(), %% #protocol_buffers{} from tls_record.hrl or dtls_recor.hrl
- tls_handshake_history ::tls_handshake_history(),
+ tls_handshake_history :: ssl_handshake:ssl_handshake_history(),
cert_db :: reference(),
session :: #session{},
session_cache :: db_handle(),
session_cache_cb :: atom(),
- negotiated_version :: tls_version(),
+ negotiated_version :: ssl_record:ssl_version(),
client_certificate_requested = false :: boolean(),
- key_algorithm :: key_algo(),
+ key_algorithm :: ssl_cipher:key_algo(),
hashsign_algorithm = {undefined, undefined},
cert_hashsign_algorithm,
- public_key_info ::public_key_info(),
+ public_key_info ::ssl_handshake:public_key_info(),
private_key ::public_key:private_key(),
diffie_hellman_params, % PKIX: #'DHParameter'{} relevant for server side
diffie_hellman_keys, % {PublicKey, PrivateKey}
@@ -73,12 +73,13 @@
renegotiation :: undefined | {boolean(), From::term() | internal | peer},
start_or_recv_from :: term(),
timer :: undefined | reference(), % start_or_recive_timer
- send_queue :: queue(),
+ send_queue :: queue:queue(),
terminated = false ::boolean(),
allow_renegotiate = true ::boolean(),
expecting_next_protocol_negotiation = false ::boolean(),
next_protocol = undefined :: undefined | binary(),
- client_ecc % {Curves, PointFmt}
+ client_ecc, % {Curves, PointFmt}
+ tracker :: pid() %% Tracker process for listen socket
}).
-define(DEFAULT_DIFFIE_HELLMAN_PARAMS,
diff --git a/lib/ssl/src/ssl_dist_sup.erl b/lib/ssl/src/ssl_dist_sup.erl
index 22614a2d34..58efeaf892 100644
--- a/lib/ssl/src/ssl_dist_sup.erl
+++ b/lib/ssl/src/ssl_dist_sup.erl
@@ -1,7 +1,7 @@
%%
%% %CopyrightBegin%
%%
-%% Copyright Ericsson AB 2011-2013. All Rights Reserved.
+%% Copyright Ericsson AB 2011-2014. 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
@@ -45,9 +45,11 @@ start_link() ->
init([]) ->
SessionCertManager = session_and_cert_manager_child_spec(),
ConnetionManager = connection_manager_child_spec(),
+ ListenOptionsTracker = listen_options_tracker_child_spec(),
ProxyServer = proxy_server_child_spec(),
- {ok, {{one_for_all, 10, 3600}, [SessionCertManager, ConnetionManager,
+ {ok, {{one_for_all, 10, 3600}, [SessionCertManager, ConnetionManager,
+ ListenOptionsTracker,
ProxyServer]}}.
%%--------------------------------------------------------------------
@@ -68,7 +70,7 @@ connection_manager_child_spec() ->
StartFunc = {tls_connection_sup, start_link_dist, []},
Restart = permanent,
Shutdown = 4000,
- Modules = [ssl_connection],
+ Modules = [tls_connection_sup],
Type = supervisor,
{Name, StartFunc, Restart, Shutdown, Type, Modules}.
@@ -81,3 +83,11 @@ proxy_server_child_spec() ->
Type = worker,
{Name, StartFunc, Restart, Shutdown, Type, Modules}.
+listen_options_tracker_child_spec() ->
+ Name = ssl_socket_dist,
+ StartFunc = {ssl_listen_tracker_sup, start_link_dist, []},
+ Restart = permanent,
+ Shutdown = 4000,
+ Modules = [ssl_socket],
+ Type = supervisor,
+ {Name, StartFunc, Restart, Shutdown, Type, Modules}.
diff --git a/lib/ssl/src/ssl_handshake.erl b/lib/ssl/src/ssl_handshake.erl
index da72ffc043..fc67d2c28d 100644
--- a/lib/ssl/src/ssl_handshake.erl
+++ b/lib/ssl/src/ssl_handshake.erl
@@ -1,7 +1,7 @@
%%
%% %CopyrightBegin%
%%
-%% Copyright Ericsson AB 2013-2013. All Rights Reserved.
+%% Copyright Ericsson AB 2013-2014. 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
@@ -31,6 +31,18 @@
-include("ssl_srp.hrl").
-include_lib("public_key/include/public_key.hrl").
+-export_type([ssl_handshake/0, ssl_handshake_history/0,
+ public_key_info/0, oid/0]).
+
+-type oid() :: tuple().
+-type public_key_params() :: #'Dss-Parms'{} | {namedCurve, oid()} | #'ECParameters'{} | term().
+-type public_key_info() :: {oid(), #'RSAPublicKey'{} | integer() | #'ECPoint'{}, public_key_params()}.
+-type ssl_handshake_history() :: {[binary()], [binary()]}.
+
+-type ssl_handshake() :: #server_hello{} | #server_hello_done{} | #certificate{} | #certificate_request{} |
+ #client_key_exchange{} | #finished{} | #certificate_verify{} |
+ #hello_request{} | #next_protocol{}.
+
%% Handshake messages
-export([hello_request/0, server_hello/4, server_hello_done/0,
certificate/4, certificate_request/4, key_exchange/3,
@@ -56,12 +68,13 @@
%% Extensions handling
-export([client_hello_extensions/6,
- handle_client_hello_extensions/8, %% Returns server hello extensions
+ handle_client_hello_extensions/9, %% Returns server hello extensions
handle_server_hello_extensions/9, select_curve/2
]).
%% MISC
--export([select_version/3, prf/5, select_hashsign/2, select_cert_hashsign/3,
+-export([select_version/3, prf/5, select_hashsign/3,
+ select_hashsign_algs/2, select_hashsign_algs/3,
premaster_secret/2, premaster_secret/3, premaster_secret/4]).
%%====================================================================
@@ -80,7 +93,7 @@ hello_request() ->
#hello_request{}.
%%--------------------------------------------------------------------
--spec server_hello(#session{}, tls_version(), #connection_states{},
+-spec server_hello(#session{}, ssl_record:ssl_version(), #connection_states{},
#hello_extensions{}) -> #server_hello{}.
%%
%% Description: Creates a server hello message.
@@ -164,8 +177,8 @@ next_protocol(SelectedProtocol) ->
%%--------------------------------------------------------------------
-spec client_certificate_verify(undefined | der_cert(), binary(),
- tls_version(), term(), private_key(),
- tls_handshake_history()) ->
+ ssl_record:ssl_version(), term(), public_key:private_key(),
+ ssl_handshake_history()) ->
#certificate_verify{} | ignore | #alert{}.
%%
%% Description: Creates a certificate_verify message, called by the client.
@@ -188,7 +201,7 @@ client_certificate_verify(OwnCert, MasterSecret, Version,
end.
%%--------------------------------------------------------------------
--spec certificate_request(erl_cipher_suite(), db_handle(), certdb_ref(), tls_version()) ->
+-spec certificate_request(ssl_cipher:erl_cipher_suite(), db_handle(), certdb_ref(), ssl_record:ssl_version()) ->
#certificate_request{}.
%%
%% Description: Creates a certificate_request message, called by the server.
@@ -203,16 +216,16 @@ certificate_request(CipherSuite, CertDbHandle, CertDbRef, Version) ->
certificate_authorities = Authorities
}.
%%--------------------------------------------------------------------
--spec key_exchange(client | server, tls_version(),
+-spec key_exchange(client | server, ssl_record:ssl_version(),
{premaster_secret, binary(), public_key_info()} |
{dh, binary()} |
{dh, {binary(), binary()}, #'DHParameter'{}, {HashAlgo::atom(), SignAlgo::atom()},
- binary(), binary(), private_key()} |
+ binary(), binary(), public_key:private_key()} |
{ecdh, #'ECPrivateKey'{}} |
{psk, binary()} |
{dhe_psk, binary(), binary()} |
{srp, {binary(), binary()}, #srp_user{}, {HashAlgo::atom(), SignAlgo::atom()},
- binary(), binary(), private_key()}) ->
+ binary(), binary(), public_key:private_key()}) ->
#client_key_exchange{} | #server_key_exchange{}.
%%
@@ -304,7 +317,7 @@ key_exchange(server, Version, {srp, {PublicKey, _},
ClientRandom, ServerRandom, PrivateKey).
%%--------------------------------------------------------------------
--spec finished(tls_version(), client | server, integer(), binary(), tls_handshake_history()) ->
+-spec finished(ssl_record:ssl_version(), client | server, integer(), binary(), ssl_handshake_history()) ->
#finished{}.
%%
%% Description: Creates a handshake finished message
@@ -315,8 +328,7 @@ finished(Version, Role, PrfAlgo, MasterSecret, {Handshake, _}) -> % use the curr
%% ---------- Handle handshake messages ----------
-verify_server_key(#server_key_params{params = Params,
- params_bin = EncParams,
+verify_server_key(#server_key_params{params_bin = EncParams,
signature = Signature},
HashSign = {HashAlgo, _},
ConnectionStates, Version, PubKeyInfo) ->
@@ -332,8 +344,8 @@ verify_server_key(#server_key_params{params = Params,
verify_signature(Version, Hash, HashSign, Signature, PubKeyInfo).
%%--------------------------------------------------------------------
--spec certificate_verify(binary(), public_key_info(), tls_version(), term(),
- binary(), tls_handshake_history()) -> valid | #alert{}.
+-spec certificate_verify(binary(), public_key_info(), ssl_record:ssl_version(), term(),
+ binary(), ssl_handshake_history()) -> valid | #alert{}.
%%
%% Description: Checks that the certificate_verify message is valid.
%%--------------------------------------------------------------------
@@ -347,7 +359,7 @@ certificate_verify(Signature, PublicKeyInfo, Version,
?ALERT_REC(?FATAL, ?BAD_CERTIFICATE)
end.
%%--------------------------------------------------------------------
--spec verify_signature(tls_version(), binary(), {term(), term()}, binary(),
+-spec verify_signature(ssl_record:ssl_version(), binary(), {term(), term()}, binary(),
public_key_info()) -> true | false.
%%
%% Description: Checks that a public_key signature is valid.
@@ -427,8 +439,8 @@ certify(#certificate{asn1_certificates = ASN1Certs}, CertDbHandle, CertDbRef,
end.
%%--------------------------------------------------------------------
--spec verify_connection(tls_version(), #finished{}, client | server, integer(), binary(),
- tls_handshake_history()) -> verified | #alert{}.
+-spec verify_connection(ssl_record:ssl_version(), #finished{}, client | server, integer(), binary(),
+ ssl_handshake_history()) -> verified | #alert{}.
%%
%% Description: Checks the ssl handshake finished message to verify
%% the connection.
@@ -444,7 +456,7 @@ verify_connection(Version, #finished{verify_data = Data},
end.
%%--------------------------------------------------------------------
--spec init_handshake_history() -> tls_handshake_history().
+-spec init_handshake_history() -> ssl_handshake_history().
%%
%% Description: Initialize the empty handshake history buffer.
@@ -453,8 +465,8 @@ init_handshake_history() ->
{[], []}.
%%--------------------------------------------------------------------
--spec update_handshake_history(tls_handshake_history(), Data ::term()) ->
- tls_handshake_history().
+-spec update_handshake_history(ssl_handshake:ssl_handshake_history(), Data ::term()) ->
+ ssl_handshake:ssl_handshake_history().
%%
%% Description: Update the handshake history buffer with Data.
%%--------------------------------------------------------------------
@@ -568,7 +580,7 @@ server_key_exchange_hash(md5sha, Value) ->
server_key_exchange_hash(Hash, Value) ->
crypto:hash(Hash, Value).
%%--------------------------------------------------------------------
--spec prf(tls_version(), binary(), binary(), [binary()], non_neg_integer()) ->
+-spec prf(ssl_record:ssl_version(), binary(), binary(), [binary()], non_neg_integer()) ->
{ok, binary()} | {error, undefined}.
%%
%% Description: use the TLS PRF to generate key material
@@ -579,23 +591,25 @@ prf({3,1}, Secret, Label, Seed, WantedLength) ->
{ok, tls_v1:prf(?MD5SHA, Secret, Label, Seed, WantedLength)};
prf({3,_N}, Secret, Label, Seed, WantedLength) ->
{ok, tls_v1:prf(?SHA256, Secret, Label, Seed, WantedLength)}.
+
+
%%--------------------------------------------------------------------
--spec select_hashsign(#hash_sign_algos{}| undefined, undefined | binary()) ->
- [{atom(), atom()}] | undefined.
+-spec select_hashsign(#hash_sign_algos{}| undefined, undefined | binary(), ssl_record:ssl_version()) ->
+ {atom(), atom()} | undefined.
%%
%% Description:
%%--------------------------------------------------------------------
-select_hashsign(_, undefined) ->
+select_hashsign(_, undefined, _Version) ->
{null, anon};
-select_hashsign(undefined, Cert) ->
+select_hashsign(undefined, Cert, Version) ->
#'OTPCertificate'{tbsCertificate = TBSCert} = public_key:pkix_decode_cert(Cert, otp),
#'OTPSubjectPublicKeyInfo'{algorithm = {_,Algo, _}} = TBSCert#'OTPTBSCertificate'.subjectPublicKeyInfo,
- select_cert_hashsign(undefined, Algo, {undefined, undefined});
-select_hashsign(#hash_sign_algos{hash_sign_algos = HashSigns}, Cert) ->
+ select_hashsign_algs(undefined, Algo, Version);
+select_hashsign(#hash_sign_algos{hash_sign_algos = HashSigns}, Cert, Version) ->
#'OTPCertificate'{tbsCertificate = TBSCert} =public_key:pkix_decode_cert(Cert, otp),
#'OTPSubjectPublicKeyInfo'{algorithm = {_,Algo, _}} = TBSCert#'OTPTBSCertificate'.subjectPublicKeyInfo,
- DefaultHashSign = {_, Sign} = select_cert_hashsign(undefined, Algo, {undefined, undefined}),
+ DefaultHashSign = {_, Sign} = select_hashsign_algs(undefined, Algo, Version),
case lists:filter(fun({sha, dsa}) ->
true;
({_, dsa}) ->
@@ -611,28 +625,61 @@ select_hashsign(#hash_sign_algos{hash_sign_algos = HashSigns}, Cert) ->
[HashSign| _] ->
HashSign
end.
+
%%--------------------------------------------------------------------
--spec select_cert_hashsign(#hash_sign_algos{}| undefined, oid(), tls_version() | {undefined, undefined}) ->
+-spec select_hashsign_algs(#hash_sign_algos{}| undefined, oid(), ssl_record:ssl_version()) ->
{atom(), atom()}.
+%% Description: For TLS 1.2 hash function and signature algorithm pairs can be
+%% negotiated with the signature_algorithms extension,
+%% for previous versions always use appropriate defaults.
+%% RFC 5246, Sect. 7.4.1.4.1. Signature Algorithms
+%% If the client does not send the signature_algorithms extension, the
+%% server MUST do the following: (e.i defaults for TLS 1.2)
+%%
+%% - If the negotiated key exchange algorithm is one of (RSA, DHE_RSA,
+%% DH_RSA, RSA_PSK, ECDH_RSA, ECDHE_RSA), behave as if client had
+%% sent the value {sha1,rsa}.
%%
-%% Description: For TLS 1.2 selected cert_hash_sign will be recived
-%% in the handshake message, for previous versions use appropriate defaults.
-%% This function is also used by select_hashsign to extract
-%% the alogrithm of the server cert key.
+%% - If the negotiated key exchange algorithm is one of (DHE_DSS,
+%% DH_DSS), behave as if the client had sent the value {sha1,dsa}.
+%%
+%% - If the negotiated key exchange algorithm is one of (ECDH_ECDSA,
+%% ECDHE_ECDSA), behave as if the client had sent value {sha1,ecdsa}.
+
%%--------------------------------------------------------------------
-select_cert_hashsign(HashSign, _, {Major, Minor}) when HashSign =/= undefined andalso
+select_hashsign_algs(HashSign, _, {Major, Minor}) when HashSign =/= undefined andalso
Major >= 3 andalso Minor >= 3 ->
HashSign;
-select_cert_hashsign(undefined,?'id-ecPublicKey', _) ->
+select_hashsign_algs(undefined, ?rsaEncryption, {Major, Minor}) when Major >= 3 andalso Minor >= 3 ->
+ {sha, rsa};
+select_hashsign_algs(undefined,?'id-ecPublicKey', _) ->
{sha, ecdsa};
-select_cert_hashsign(undefined, ?rsaEncryption, _) ->
+select_hashsign_algs(undefined, ?rsaEncryption, _) ->
{md5sha, rsa};
-select_cert_hashsign(undefined, ?'id-dsa', _) ->
+select_hashsign_algs(undefined, ?'id-dsa', _) ->
{sha, dsa}.
+-spec select_hashsign_algs(atom(), ssl_record:ssl_version()) -> {atom(), atom()}.
+%% Wrap function to keep the knowledge of the default values in
+%% one place only
+select_hashsign_algs(Alg, Version) when (Alg == rsa orelse
+ Alg == dhe_rsa orelse
+ Alg == dh_rsa orelse
+ Alg == ecdhe_rsa orelse
+ Alg == ecdh_rsa orelse
+ Alg == srp_rsa) ->
+ select_hashsign_algs(undefined, ?rsaEncryption, Version);
+select_hashsign_algs(Alg, Version) when (Alg == dhe_dss orelse
+ Alg == dh_dss orelse
+ Alg == srp_dss) ->
+ select_hashsign_algs(undefined, ?'id-dsa', Version);
+select_hashsign_algs(Alg, Version) when (Alg == ecdhe_ecdsa orelse
+ Alg == ecdh_ecdsa) ->
+ select_hashsign_algs(undefined, ?'id-ecPublicKey', Version).
+
%%--------------------------------------------------------------------
--spec master_secret(atom(), tls_version(), #session{} | binary(), #connection_states{},
+-spec master_secret(atom(), ssl_record:ssl_version(), #session{} | binary(), #connection_states{},
client | server) -> {binary(), #connection_states{}} | #alert{}.
%%
%% Description: Sets or calculates the master secret and calculate keys,
@@ -817,7 +864,7 @@ enc_server_key_exchange(Version, Params, {HashAlgo, SignAlgo},
end.
%%--------------------------------------------------------------------
--spec decode_client_key(binary(), key_algo(), tls_version()) ->
+-spec decode_client_key(binary(), ssl_cipher:key_algo(), ssl_record:ssl_version()) ->
#encrypted_premaster_secret{}
| #client_diffie_hellman_public{}
| #client_ec_diffie_hellman_public{}
@@ -832,7 +879,7 @@ decode_client_key(ClientKey, Type, Version) ->
dec_client_key(ClientKey, key_exchange_alg(Type), Version).
%%--------------------------------------------------------------------
--spec decode_server_key(binary(), key_algo(), tls_version()) ->
+-spec decode_server_key(binary(), ssl_cipher:key_algo(), ssl_record:ssl_version()) ->
#server_key_params{}.
%%
%% Description: Decode server_key data and return appropriate type
@@ -1006,12 +1053,9 @@ decode_suites('3_bytes', Dec) ->
%%-------------Cipeher suite handling --------------------------------
available_suites(UserSuites, Version) ->
- case UserSuites of
- [] ->
- ssl_cipher:suites(Version);
- _ ->
- UserSuites
- end.
+ lists:filtermap(fun(Suite) ->
+ lists:member(Suite, ssl_cipher:all_suites(Version))
+ end, UserSuites).
available_suites(ServerCert, UserSuites, Version, Curve) ->
ssl_cipher:filter(ServerCert, available_suites(UserSuites, Version))
@@ -1029,14 +1073,15 @@ cipher_suites(Suites, true) ->
select_session(SuggestedSessionId, CipherSuites, Compressions, Port, #session{ecc = ECCCurve} =
Session, Version,
- #ssl_options{ciphers = UserSuites} = SslOpts, Cache, CacheCb, Cert) ->
+ #ssl_options{ciphers = UserSuites, honor_cipher_order = HCO} = SslOpts,
+ Cache, CacheCb, Cert) ->
{SessionId, Resumed} = ssl_session:server_id(Port, SuggestedSessionId,
SslOpts, Cert,
Cache, CacheCb),
case Resumed of
undefined ->
Suites = available_suites(Cert, UserSuites, Version, ECCCurve),
- CipherSuite = select_cipher_suite(CipherSuites, Suites),
+ CipherSuite = select_cipher_suite(CipherSuites, Suites, HCO),
Compression = select_compression(Compressions),
{new, Session#session{session_id = SessionId,
cipher_suite = CipherSuite,
@@ -1088,17 +1133,19 @@ certificate_authorities_from_db(CertDbHandle, CertDbRef) ->
%%-------------Extension handling --------------------------------
-handle_client_hello_extensions(RecordCB, Random,
- #hello_extensions{renegotiation_info = Info,
- srp = SRP,
- ec_point_formats = ECCFormat,
- next_protocol_negotiation = NextProtocolNegotiation}, Version,
- #ssl_options{secure_renegotiate = SecureRenegotation} = Opts,
- #session{cipher_suite = CipherSuite, compression_method = Compression} = Session0,
- ConnectionStates0, Renegotiation) ->
+handle_client_hello_extensions(RecordCB, Random, ClientCipherSuites,
+ #hello_extensions{renegotiation_info = Info,
+ srp = SRP,
+ ec_point_formats = ECCFormat,
+ next_protocol_negotiation = NextProtocolNegotiation}, Version,
+ #ssl_options{secure_renegotiate = SecureRenegotation} = Opts,
+ #session{cipher_suite = NegotiatedCipherSuite,
+ compression_method = Compression} = Session0,
+ ConnectionStates0, Renegotiation) ->
Session = handle_srp_extension(SRP, Session0),
ConnectionStates = handle_renegotiation_extension(server, RecordCB, Version, Info,
- Random, CipherSuite, Compression,
+ Random, NegotiatedCipherSuite,
+ ClientCipherSuites, Compression,
ConnectionStates0, Renegotiation, SecureRenegotation),
ProtocolsToAdvertise = handle_next_protocol_extension(NextProtocolNegotiation, Renegotiation, Opts),
@@ -1117,7 +1164,8 @@ handle_server_hello_extensions(RecordCB, Random, CipherSuite, Compression,
#ssl_options{secure_renegotiate = SecureRenegotation,
next_protocol_selector = NextProtoSelector},
ConnectionStates0, Renegotiation) ->
- ConnectionStates = handle_renegotiation_extension(client, RecordCB, Version, Info, Random, CipherSuite,
+ ConnectionStates = handle_renegotiation_extension(client, RecordCB, Version, Info, Random,
+ CipherSuite, undefined,
Compression, ConnectionStates0,
Renegotiation, SecureRenegotation),
case handle_next_protocol(NextProtocolNegotiation, NextProtoSelector, Renegotiation) of
@@ -1287,7 +1335,7 @@ select_curve(#elliptic_curves{elliptic_curve_list = ClientCurves},
select_curve(undefined, _) ->
%% Client did not send ECC extension use default curve if
%% ECC cipher is negotiated
- {namedCurve, ?secp256k1};
+ {namedCurve, ?secp256r1};
select_curve(_, []) ->
no_curve;
select_curve(Curves, [Curve| Rest]) ->
@@ -1415,15 +1463,16 @@ calc_master_secret({3,0}, _PrfAlgo, PremasterSecret, ClientRandom, ServerRandom)
calc_master_secret({3,_}, PrfAlgo, PremasterSecret, ClientRandom, ServerRandom) ->
tls_v1:master_secret(PrfAlgo, PremasterSecret, ClientRandom, ServerRandom).
-handle_renegotiation_extension(Role, RecordCB, Version, Info, Random, CipherSuite, Compression,
+handle_renegotiation_extension(Role, RecordCB, Version, Info, Random, NegotiatedCipherSuite,
+ ClientCipherSuites, Compression,
ConnectionStates0, Renegotiation, SecureRenegotation) ->
case handle_renegotiation_info(RecordCB, Role, Info, ConnectionStates0,
Renegotiation, SecureRenegotation,
- [CipherSuite]) of
+ ClientCipherSuites) of
{ok, ConnectionStates} ->
hello_pending_connection_states(RecordCB, Role,
Version,
- CipherSuite,
+ NegotiatedCipherSuite,
Random,
Compression,
ConnectionStates);
@@ -1650,7 +1699,16 @@ dec_hello_extensions(<<?UINT16(?SIGNATURE_ALGORITHMS_EXT), ?UINT16(Len),
dec_hello_extensions(<<?UINT16(?ELLIPTIC_CURVES_EXT), ?UINT16(Len),
ExtData:Len/binary, Rest/binary>>, Acc) ->
<<?UINT16(_), EllipticCurveList/binary>> = ExtData,
- EllipticCurves = [tls_v1:enum_to_oid(X) || <<X:16>> <= EllipticCurveList],
+ %% Ignore unknown curves
+ Pick = fun(Enum) ->
+ case tls_v1:enum_to_oid(Enum) of
+ undefined ->
+ false;
+ Oid ->
+ {true, Oid}
+ end
+ end,
+ EllipticCurves = lists:filtermap(Pick, [ECC || <<ECC:16>> <= EllipticCurveList]),
dec_hello_extensions(Rest, Acc#hello_extensions{elliptic_curves =
#elliptic_curves{elliptic_curve_list =
EllipticCurves}});
@@ -1792,6 +1850,11 @@ handle_srp_extension(#srp{username = Username}, Session) ->
%%-------------Misc --------------------------------
+select_cipher_suite(CipherSuites, Suites, false) ->
+ select_cipher_suite(CipherSuites, Suites);
+select_cipher_suite(CipherSuites, Suites, true) ->
+ select_cipher_suite(Suites, CipherSuites).
+
select_cipher_suite([], _) ->
no_suite;
select_cipher_suite([Suite | ClientSuites], SupportedSuites) ->
diff --git a/lib/ssl/src/ssl_handshake.hrl b/lib/ssl/src/ssl_handshake.hrl
index 75160526b9..80284faef0 100644
--- a/lib/ssl/src/ssl_handshake.hrl
+++ b/lib/ssl/src/ssl_handshake.hrl
@@ -1,7 +1,7 @@
%%
%% %CopyrightBegin%
%%
-%% Copyright Ericsson AB 2007-2013. All Rights Reserved.
+%% Copyright Ericsson AB 2007-2014. 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
@@ -352,18 +352,4 @@
hostname = undefined
}).
-%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
-%% Dialyzer types
-%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
-
--type oid() :: tuple().
--type public_key_params() :: #'Dss-Parms'{} | {namedCurve, oid()} | #'ECParameters'{} | term().
--type public_key_info() :: {oid(), #'RSAPublicKey'{} | integer() | #'ECPoint'{}, public_key_params()}.
--type tls_handshake_history() :: {[binary()], [binary()]}.
-
--type ssl_handshake() :: #server_hello{} | #server_hello_done{} | #certificate{} | #certificate_request{} |
- #client_key_exchange{} | #finished{} | #certificate_verify{} |
- #hello_request{} | #next_protocol{}.
-
-
-endif. % -ifdef(ssl_handshake).
diff --git a/lib/ssl/src/ssl_internal.hrl b/lib/ssl/src/ssl_internal.hrl
index 0186f9fca2..fd0d87bd5f 100644
--- a/lib/ssl/src/ssl_internal.hrl
+++ b/lib/ssl/src/ssl_internal.hrl
@@ -1,7 +1,7 @@
%%
%% %CopyrightBegin%
%%
-%% Copyright Ericsson AB 2007-2013. All Rights Reserved.
+%% Copyright Ericsson AB 2007-2014. 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
@@ -30,12 +30,9 @@
-type from() :: term().
-type host() :: inet:ip_address() | inet:hostname().
-type session_id() :: 0 | binary().
--type tls_version() :: {integer(), integer()}.
--type tls_atom_version() :: sslv3 | tlsv1 | 'tlsv1.1' | 'tlsv1.2'.
-type certdb_ref() :: reference().
-type db_handle() :: term().
-type der_cert() :: binary().
--type private_key() :: #'RSAPrivateKey'{} | #'DSAPrivateKey'{} | #'ECPrivateKey'{}.
-type issuer() :: tuple().
-type serialnumber() :: integer().
-type cert_key() :: {reference(), integer(), issuer()}.
@@ -74,7 +71,7 @@
-record(ssl_options, {
protocol :: tls | dtls,
- versions :: ['tlsv1.2' | 'tlsv1.1' | tlsv1 | sslv3] | ['dtlsv1.2' | dtlsv1],
+ versions :: [ssl_record:ssl_version()], %% ssl_record:atom_version() in API
verify :: verify_none | verify_peer,
verify_fun, %%:: fun(CertVerifyErrors::term()) -> boolean(),
fail_if_no_peer_cert :: boolean(),
@@ -83,13 +80,13 @@
validate_extensions_fun,
depth :: integer(),
certfile :: binary(),
- cert :: der_encoded(),
+ cert :: public_key:der_encoded(),
keyfile :: binary(),
- key :: {'RSAPrivateKey' | 'DSAPrivateKey' | 'ECPrivateKey' | 'PrivateKeyInfo', der_encoded()},
+ key :: {'RSAPrivateKey' | 'DSAPrivateKey' | 'ECPrivateKey' | 'PrivateKeyInfo', public_key:der_encoded()},
password :: string(),
- cacerts :: [der_encoded()],
+ cacerts :: [public_key:der_encoded()],
cacertfile :: binary(),
- dh :: der_encoded(),
+ dh :: public_key:der_encoded(),
dhfile :: binary(),
user_lookup_fun, % server option, fun to lookup the user
psk_identity :: binary(),
@@ -104,7 +101,6 @@
reuse_sessions :: boolean(),
renegotiate_at,
secure_renegotiate,
- debug,
%% undefined if not hibernating, or number of ms of
%% inactivity after which ssl_connection will go into
%% hibernation
@@ -114,17 +110,12 @@
next_protocols_advertised = undefined, %% [binary()],
next_protocol_selector = undefined, %% fun([binary()]) -> binary())
log_alert :: boolean(),
- server_name_indication = undefined
+ server_name_indication = undefined,
+ %% Should the server prefer its own cipher order over the one provided by
+ %% the client?
+ honor_cipher_order = false
}).
--record(config, {ssl, %% SSL parameters
- inet_user, %% User set inet options
- emulated, %% #socket_option{} emulated
- inet_ssl, %% inet options for internal ssl socket
- transport_info, %% Callback info
- connection_cb
- }).
-
-record(socket_options,
{
mode = list,
@@ -134,6 +125,15 @@
active = true
}).
+-record(config, {ssl, %% SSL parameters
+ inet_user, %% User set inet options
+ emulated, %% Emulated option list or "inherit_tracker" pid
+ inet_ssl, %% inet options for internal ssl socket
+ transport_info, %% Callback info
+ connection_cb
+ }).
+
+
-type state_name() :: hello | abbreviated | certify | cipher | connection.
-type gen_fsm_state_return() :: {next_state, state_name(), term()} |
{next_state, state_name(), term(), timeout()} |
diff --git a/lib/ssl/src/ssl_listen_tracker_sup.erl b/lib/ssl/src/ssl_listen_tracker_sup.erl
new file mode 100644
index 0000000000..29f40e846d
--- /dev/null
+++ b/lib/ssl/src/ssl_listen_tracker_sup.erl
@@ -0,0 +1,71 @@
+%%
+%% %CopyrightBegin%
+%%
+%% Copyright Ericsson AB 2014-2014. 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%
+%%
+
+%%
+%%----------------------------------------------------------------------
+%% Purpose: Supervisor for a listen options tracker
+%%----------------------------------------------------------------------
+-module(ssl_listen_tracker_sup).
+
+-behaviour(supervisor).
+
+%% API
+-export([start_link/0, start_link_dist/0]).
+-export([start_child/1, start_child_dist/1]).
+
+%% Supervisor callback
+-export([init/1]).
+
+%%%=========================================================================
+%%% API
+%%%=========================================================================
+start_link() ->
+ supervisor:start_link({local, tracker_name(normal)}, ?MODULE, []).
+
+start_link_dist() ->
+ supervisor:start_link({local, tracker_name(dist)}, ?MODULE, []).
+
+start_child(Args) ->
+ supervisor:start_child(tracker_name(normal), Args).
+
+start_child_dist(Args) ->
+ supervisor:start_child(tracker_name(dist), Args).
+
+%%%=========================================================================
+%%% Supervisor callback
+%%%=========================================================================
+init(_O) ->
+ RestartStrategy = simple_one_for_one,
+ MaxR = 0,
+ MaxT = 3600,
+
+ Name = undefined, % As simple_one_for_one is used.
+ StartFunc = {ssl_socket, start_link, []},
+ Restart = temporary, % E.g. should not be restarted
+ Shutdown = 4000,
+ Modules = [ssl_socket],
+ Type = worker,
+
+ ChildSpec = {Name, StartFunc, Restart, Shutdown, Type, Modules},
+ {ok, {{RestartStrategy, MaxR, MaxT}, [ChildSpec]}}.
+
+tracker_name(normal) ->
+ ?MODULE;
+tracker_name(dist) ->
+ list_to_atom(atom_to_list(?MODULE) ++ "dist").
diff --git a/lib/ssl/src/ssl_manager.erl b/lib/ssl/src/ssl_manager.erl
index 4d5eaeb607..66dfdf86a9 100644
--- a/lib/ssl/src/ssl_manager.erl
+++ b/lib/ssl/src/ssl_manager.erl
@@ -1,7 +1,7 @@
%%
%% %CopyrightBegin%
%%
-%% Copyright Ericsson AB 2007-2013. All Rights Reserved.
+%% Copyright Ericsson AB 2007-2014. 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
@@ -52,8 +52,8 @@
last_delay_timer = {undefined, undefined}%% Keep for testing purposes
}).
--define('24H_in_msec', 8640000).
--define('24H_in_sec', 8640).
+-define('24H_in_msec', 86400000).
+-define('24H_in_sec', 86400).
-define(GEN_UNIQUE_ID_MAX_TRIES, 10).
-define(SESSION_VALIDATION_INTERVAL, 60000).
-define(CLEAR_PEM_CACHE, 120000).
@@ -167,27 +167,27 @@ clean_cert_db(Ref, File) ->
ok.
%%--------------------------------------------------------------------
--spec register_session(inet:port_number(), #session{}) -> ok.
--spec register_session(host(), inet:port_number(), #session{}) -> ok.
%%
%% Description: Make the session available for reuse.
%%--------------------------------------------------------------------
+-spec register_session(host(), inet:port_number(), #session{}) -> ok.
register_session(Host, Port, Session) ->
cast({register_session, Host, Port, Session}).
+-spec register_session(inet:port_number(), #session{}) -> ok.
register_session(Port, Session) ->
cast({register_session, Port, Session}).
%%--------------------------------------------------------------------
--spec invalidate_session(inet:port_number(), #session{}) -> ok.
--spec invalidate_session(host(), inet:port_number(), #session{}) -> ok.
%%
%% Description: Make the session unavailable for reuse. After
%% a the session has been marked "is_resumable = false" for some while
%% it will be safe to remove the data from the session database.
%%--------------------------------------------------------------------
+-spec invalidate_session(host(), inet:port_number(), #session{}) -> ok.
invalidate_session(Host, Port, Session) ->
cast({invalidate_session, Host, Port, Session}).
+-spec invalidate_session(inet:port_number(), #session{}) -> ok.
invalidate_session(Port, Session) ->
cast({invalidate_session, Port, Session}).
@@ -282,8 +282,13 @@ handle_cast({register_session, Host, Port, Session},
session_cache_cb = CacheCb} = State) ->
TimeStamp = calendar:datetime_to_gregorian_seconds({date(), time()}),
NewSession = Session#session{time_stamp = TimeStamp},
- CacheCb:update(Cache, {{Host, Port},
- NewSession#session.session_id}, NewSession),
+ case CacheCb:select_session(Cache, {Host, Port}) of
+ no_session ->
+ CacheCb:update(Cache, {{Host, Port},
+ NewSession#session.session_id}, NewSession);
+ Sessions ->
+ register_unique_session(Sessions, NewSession, CacheCb, Cache, {Host, Port})
+ end,
{noreply, State};
handle_cast({register_session, Port, Session},
@@ -494,3 +499,34 @@ clean_cert_db(Ref, CertDb, RefDb, PemCache, File) ->
_ ->
ok
end.
+
+%% Do not let dumb clients create a gigantic session table
+register_unique_session(Sessions, Session, CacheCb, Cache, PartialKey) ->
+ case exists_equivalent(Session , Sessions) of
+ true ->
+ ok;
+ false ->
+ CacheCb:update(Cache, {PartialKey,
+ Session#session.session_id}, Session)
+ end.
+
+exists_equivalent(_, []) ->
+ false;
+exists_equivalent(#session{
+ peer_certificate = PeerCert,
+ own_certificate = OwnCert,
+ compression_method = Compress,
+ cipher_suite = CipherSuite,
+ srp_username = SRP,
+ ecc = ECC} ,
+ [#session{
+ peer_certificate = PeerCert,
+ own_certificate = OwnCert,
+ compression_method = Compress,
+ cipher_suite = CipherSuite,
+ srp_username = SRP,
+ ecc = ECC} | _]) ->
+ true;
+exists_equivalent(Session, [ _ | Rest]) ->
+ exists_equivalent(Session, Rest).
+
diff --git a/lib/ssl/src/ssl_pkix_db.erl b/lib/ssl/src/ssl_pkix_db.erl
index 9de50c8f26..e59aba0618 100644
--- a/lib/ssl/src/ssl_pkix_db.erl
+++ b/lib/ssl/src/ssl_pkix_db.erl
@@ -115,17 +115,17 @@ add_trusted_certs(_Pid, File, [CertsDb, RefDb, PemChache] = Db) ->
new_trusted_cert_entry({MD5, File}, Db)
end.
%%--------------------------------------------------------------------
--spec cache_pem_file({binary(), binary()}, [db_handle()]) -> {ok, term()}.
--spec cache_pem_file(reference(), {binary(), binary()}, [db_handle()]) -> {ok, term()}.
%%
%% Description: Cache file as binary in DB
%%--------------------------------------------------------------------
+-spec cache_pem_file({binary(), binary()}, [db_handle()]) -> {ok, term()}.
cache_pem_file({MD5, File}, [_CertsDb, _RefDb, PemChache]) ->
{ok, PemBin} = file:read_file(File),
Content = public_key:pem_decode(PemBin),
insert(MD5, Content, PemChache),
{ok, Content}.
+-spec cache_pem_file(reference(), {binary(), binary()}, [db_handle()]) -> {ok, term()}.
cache_pem_file(Ref, {MD5, File}, [_CertsDb, _RefDb, PemChache]) ->
{ok, PemBin} = file:read_file(File),
Content = public_key:pem_decode(PemBin),
diff --git a/lib/ssl/src/ssl_record.erl b/lib/ssl/src/ssl_record.erl
index 018c8befe0..7337225bc4 100644
--- a/lib/ssl/src/ssl_record.erl
+++ b/lib/ssl/src/ssl_record.erl
@@ -1,7 +1,7 @@
%%
%% %CopyrightBegin%
%%
-%% Copyright Ericsson AB 2013-2013. All Rights Reserved.
+%% Copyright Ericsson AB 2013-2014. 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
@@ -50,6 +50,11 @@
%% Payload encryption/decryption
-export([cipher/4, decipher/3, is_correct_mac/2]).
+-export_type([ssl_version/0, ssl_atom_version/0]).
+
+-type ssl_version() :: {integer(), integer()}.
+-type ssl_atom_version() :: tls_record:tls_atom_version().
+
%%====================================================================
%% Internal application API
%%====================================================================
@@ -299,7 +304,7 @@ set_pending_cipher_state(#connection_states{pending_read = Read,
%%--------------------------------------------------------------------
--spec encode_handshake(iolist(), tls_version(), #connection_states{}) ->
+-spec encode_handshake(iolist(), ssl_version(), #connection_states{}) ->
{iolist(), #connection_states{}}.
%%
%% Description: Encodes a handshake message to send on the ssl-socket.
@@ -308,7 +313,7 @@ encode_handshake(Frag, Version, ConnectionStates) ->
encode_plain_text(?HANDSHAKE, Version, Frag, ConnectionStates).
%%--------------------------------------------------------------------
--spec encode_alert_record(#alert{}, tls_version(), #connection_states{}) ->
+-spec encode_alert_record(#alert{}, ssl_version(), #connection_states{}) ->
{iolist(), #connection_states{}}.
%%
%% Description: Encodes an alert message to send on the ssl-socket.
@@ -319,7 +324,7 @@ encode_alert_record(#alert{level = Level, description = Description},
ConnectionStates).
%%--------------------------------------------------------------------
--spec encode_change_cipher_spec(tls_version(), #connection_states{}) ->
+-spec encode_change_cipher_spec(ssl_version(), #connection_states{}) ->
{iolist(), #connection_states{}}.
%%
%% Description: Encodes a change_cipher_spec-message to send on the ssl socket.
@@ -328,7 +333,7 @@ encode_change_cipher_spec(Version, ConnectionStates) ->
encode_plain_text(?CHANGE_CIPHER_SPEC, Version, <<1:8>>, ConnectionStates).
%%--------------------------------------------------------------------
--spec encode_data(binary(), tls_version(), #connection_states{}) ->
+-spec encode_data(binary(), ssl_version(), #connection_states{}) ->
{iolist(), #connection_states{}}.
%%
%% Description: Encodes data to send on the ssl-socket.
@@ -356,7 +361,7 @@ compressions() ->
[?byte(?NULL)].
%%--------------------------------------------------------------------
--spec cipher(tls_version(), iolist(), #connection_state{}, MacHash::binary()) ->
+-spec cipher(ssl_version(), iodata(), #connection_state{}, MacHash::binary()) ->
{CipherFragment::binary(), #connection_state{}}.
%%
%% Description: Payload encryption
@@ -372,7 +377,7 @@ cipher(Version, Fragment,
ssl_cipher:cipher(BulkCipherAlgo, CipherS0, MacHash, Fragment, Version),
{CipherFragment, WriteState0#connection_state{cipher_state = CipherS1}}.
%%--------------------------------------------------------------------
--spec decipher(tls_version(), binary(), #connection_state{}) -> {binary(), binary(), #connection_state{}}.
+-spec decipher(ssl_version(), binary(), #connection_state{}) -> {binary(), binary(), #connection_state{}} | #alert{}.
%%
%% Description: Payload decryption
%%--------------------------------------------------------------------
diff --git a/lib/ssl/src/ssl_record.hrl b/lib/ssl/src/ssl_record.hrl
index c17fa53a62..6aab35d6da 100644
--- a/lib/ssl/src/ssl_record.hrl
+++ b/lib/ssl/src/ssl_record.hrl
@@ -1,7 +1,7 @@
%%
%% %CopyrightBegin%
%%
-%% Copyright Ericsson AB 2007-2013. All Rights Reserved.
+%% Copyright Ericsson AB 2007-2014. All Rights Reserved.
%%
%% The contents of this file are subject to the Erlang Public License,
%% Version 1.1, (the "License"); you may not use this file except in
@@ -20,7 +20,7 @@
%%
%%----------------------------------------------------------------------
%% Purpose: Record and constant defenitions for the SSL-record protocol
-%% see RFC 2246
+% see RFC 2246
%%----------------------------------------------------------------------
-ifndef(ssl_record).
@@ -70,7 +70,7 @@
-define(INITIAL_BYTES, 5).
--define(MAX_SEQENCE_NUMBER, 18446744073709552000). %% math:pow(2, 64) - 1 = 1.8446744073709552e19
+-define(MAX_SEQENCE_NUMBER, 18446744073709551615). %% (1 bsl 64) - 1 = 18446744073709551615
%% Sequence numbers can not wrap so when max is about to be reached we should renegotiate.
%% We will renegotiate a little before so that there will be sequence numbers left
%% for the rehandshake and a little data. Currently we decided to renegotiate a little more
diff --git a/lib/ssl/src/ssl_socket.erl b/lib/ssl/src/ssl_socket.erl
index 1b6e637cd3..55eb569b20 100644
--- a/lib/ssl/src/ssl_socket.erl
+++ b/lib/ssl/src/ssl_socket.erl
@@ -1,20 +1,73 @@
+%%
+%% %CopyrightBegin%
+%%
+%% Copyright Ericsson AB 1998-2014. 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(ssl_socket).
+-behaviour(gen_server).
+
-include("ssl_internal.hrl").
-include("ssl_api.hrl").
--export([socket/4, setopts/3, getopts/3, peername/2, sockname/2, port/2]).
+-export([socket/5, setopts/3, getopts/3, peername/2, sockname/2, port/2]).
+-export([emulated_options/0, internal_inet_values/0, default_inet_values/0,
+ init/1, start_link/3, terminate/2, inherit_tracker/3, get_emulated_opts/1,
+ set_emulated_opts/2, get_all_opts/1, handle_call/3, handle_cast/2,
+ handle_info/2, code_change/3]).
+
+-record(state, {
+ emulated_opts,
+ port,
+ ssl_opts
+ }).
-socket(Pid, Transport, Socket, ConnectionCb) ->
+%%--------------------------------------------------------------------
+%%% Internal API
+%%--------------------------------------------------------------------
+socket(Pid, Transport, Socket, ConnectionCb, Tracker) ->
#sslsocket{pid = Pid,
%% "The name "fd" is keept for backwards compatibility
- fd = {Transport, Socket, ConnectionCb}}.
-
+ fd = {Transport, Socket, ConnectionCb, Tracker}}.
+setopts(gen_tcp, #sslsocket{pid = {ListenSocket, #config{emulated = Tracker}}}, Options) ->
+ {SockOpts, EmulatedOpts} = split_options(Options),
+ ok = set_emulated_opts(Tracker, EmulatedOpts),
+ inet:setopts(ListenSocket, SockOpts);
+setopts(_, #sslsocket{pid = {ListenSocket, #config{transport_info = {Transport,_,_,_},
+ emulated = Tracker}}}, Options) ->
+ {SockOpts, EmulatedOpts} = split_options(Options),
+ ok = set_emulated_opts(Tracker, EmulatedOpts),
+ Transport:setopts(ListenSocket, SockOpts);
+%%% Following clauses will not be called for emulated options, they are handled in the connection process
setopts(gen_tcp, Socket, Options) ->
inet:setopts(Socket, Options);
setopts(Transport, Socket, Options) ->
Transport:setopts(Socket, Options).
+getopts(gen_tcp, #sslsocket{pid = {ListenSocket, #config{emulated = Tracker}}}, Options) ->
+ {SockOptNames, EmulatedOptNames} = split_options(Options),
+ EmulatedOpts = get_emulated_opts(Tracker, EmulatedOptNames),
+ SocketOpts = get_socket_opts(ListenSocket, SockOptNames, inet),
+ {ok, EmulatedOpts ++ SocketOpts};
+getopts(Transport, #sslsocket{pid = {ListenSocket, #config{emulated = Tracker}}}, Options) ->
+ {SockOptNames, EmulatedOptNames} = split_options(Options),
+ EmulatedOpts = get_emulated_opts(Tracker, EmulatedOptNames),
+ SocketOpts = get_socket_opts(ListenSocket, SockOptNames, Transport),
+ {ok, EmulatedOpts ++ SocketOpts};
+%%% Following clauses will not be called for emulated options, they are handled in the connection process
getopts(gen_tcp, Socket, Options) ->
inet:getopts(Socket, Options);
getopts(Transport, Socket, Options) ->
@@ -34,3 +87,151 @@ port(gen_tcp, Socket) ->
inet:port(Socket);
port(Transport, Socket) ->
Transport:port(Socket).
+
+emulated_options() ->
+ [mode, packet, active, header, packet_size].
+
+internal_inet_values() ->
+ [{packet_size,0}, {packet, 0}, {header, 0}, {active, false}, {mode,binary}].
+
+default_inet_values() ->
+ [{packet_size, 0}, {packet,0}, {header, 0}, {active, true}, {mode, list}].
+
+inherit_tracker(ListenSocket, EmOpts, #ssl_options{erl_dist = false} = SslOpts) ->
+ ssl_listen_tracker_sup:start_child([ListenSocket, EmOpts, SslOpts]);
+inherit_tracker(ListenSocket, EmOpts, #ssl_options{erl_dist = true} = SslOpts) ->
+ ssl_listen_tracker_sup:start_child_dist([ListenSocket, EmOpts, SslOpts]).
+
+get_emulated_opts(TrackerPid) ->
+ call(TrackerPid, get_emulated_opts).
+set_emulated_opts(TrackerPid, InetValues) ->
+ call(TrackerPid, {set_emulated_opts, InetValues}).
+get_all_opts(TrackerPid) ->
+ call(TrackerPid, get_all_opts).
+
+%%====================================================================
+%% ssl_listen_tracker_sup API
+%%====================================================================
+
+start_link(Port, SockOpts, SslOpts) ->
+ gen_server:start_link(?MODULE, [Port, SockOpts, SslOpts], []).
+
+%%--------------------------------------------------------------------
+-spec init(list()) -> {ok, #state{}}.
+%% Possible return values not used now.
+%% | {ok, #state{}, timeout()} | ignore | {stop, term()}.
+%%
+%% Description: Initiates the server
+%%--------------------------------------------------------------------
+init([Port, Opts, SslOpts]) ->
+ process_flag(trap_exit, true),
+ true = link(Port),
+ {ok, #state{emulated_opts = Opts, port = Port, ssl_opts = SslOpts}}.
+
+%%--------------------------------------------------------------------
+-spec handle_call(msg(), from(), #state{}) -> {reply, reply(), #state{}}.
+%% Possible return values not used now.
+%% {reply, reply(), #state{}, timeout()} |
+%% {noreply, #state{}} |
+%% {noreply, #state{}, timeout()} |
+%% {stop, reason(), reply(), #state{}} |
+%% {stop, reason(), #state{}}.
+%%
+%% Description: Handling call messages
+%%--------------------------------------------------------------------
+handle_call({set_emulated_opts, Opts0}, _From,
+ #state{emulated_opts = Opts1} = State) ->
+ Opts = do_set_emulated_opts(Opts0, Opts1),
+ {reply, ok, State#state{emulated_opts = Opts}};
+handle_call(get_emulated_opts, _From,
+ #state{emulated_opts = Opts} = State) ->
+ {reply, {ok, Opts}, State};
+handle_call(get_all_opts, _From,
+ #state{emulated_opts = EmOpts,
+ ssl_opts = SslOpts} = State) ->
+ {reply, {ok, EmOpts, SslOpts}, State}.
+
+%%--------------------------------------------------------------------
+-spec handle_cast(msg(), #state{}) -> {noreply, #state{}}.
+%% Possible return values not used now.
+%% | {noreply, #state{}, timeout()} |
+%% {stop, reason(), #state{}}.
+%%
+%% Description: Handling cast messages
+%%--------------------------------------------------------------------
+handle_cast(_, State)->
+ {noreply, State}.
+
+%%--------------------------------------------------------------------
+-spec handle_info(msg(), #state{}) -> {stop, reason(), #state{}}.
+%% Possible return values not used now.
+%% {noreply, #state{}}.
+%% |{noreply, #state{}, timeout()} |
+%%
+%%
+%% Description: Handling all non call/cast messages
+%%-------------------------------------------------------------------
+handle_info({'EXIT', Port, _}, #state{port = Port} = State) ->
+ {stop, normal, State}.
+
+
+%%--------------------------------------------------------------------
+-spec terminate(reason(), #state{}) -> ok.
+%%
+%% Description: This function is called by a gen_server when it is about to
+%% terminate. It should be the opposite of Module:init/1 and do any necessary
+%% cleaning up. When it returns, the gen_server terminates with Reason.
+%% The return value is ignored.
+%%--------------------------------------------------------------------
+terminate(_Reason, _State) ->
+ ok.
+
+%%--------------------------------------------------------------------
+-spec code_change(term(), #state{}, list()) -> {ok, #state{}}.
+%%
+%% Description: Convert process state when code is changed
+%%--------------------------------------------------------------------
+code_change(_OldVsn, State, _Extra) ->
+ {ok, State}.
+
+%%--------------------------------------------------------------------
+%%% Internal functions
+%%--------------------------------------------------------------------
+call(Pid, Msg) ->
+ gen_server:call(Pid, Msg, infinity).
+
+split_options(Opts) ->
+ split_options(Opts, emulated_options(), [], []).
+split_options([], _, SocketOpts, EmuOpts) ->
+ {SocketOpts, EmuOpts};
+split_options([{Name, _} = Opt | Opts], Emu, SocketOpts, EmuOpts) ->
+ case lists:member(Name, Emu) of
+ true ->
+ split_options(Opts, Emu, SocketOpts, [Opt | EmuOpts]);
+ false ->
+ split_options(Opts, Emu, [Opt | SocketOpts], EmuOpts)
+ end;
+split_options([Name | Opts], Emu, SocketOptNames, EmuOptNames) ->
+ case lists:member(Name, Emu) of
+ true ->
+ split_options(Opts, Emu, SocketOptNames, [Name | EmuOptNames]);
+ false ->
+ split_options(Opts, Emu, [Name | SocketOptNames], EmuOptNames)
+ end.
+
+do_set_emulated_opts([], Opts) ->
+ Opts;
+do_set_emulated_opts([{Name,_} = Opt | Rest], Opts) ->
+ do_set_emulated_opts(Rest, [Opt | proplists:delete(Name, Opts)]).
+
+get_socket_opts(_, [], _) ->
+ [];
+get_socket_opts(ListenSocket, SockOptNames, Cb) ->
+ {ok, Opts} = Cb:getopts(ListenSocket, SockOptNames),
+ Opts.
+
+get_emulated_opts(TrackerPid, EmOptNames) ->
+ {ok, EmOpts} = get_emulated_opts(TrackerPid),
+ lists:map(fun(Name) -> {value, Value} = lists:keysearch(Name, 1, EmOpts),
+ Value end,
+ EmOptNames).
diff --git a/lib/ssl/src/ssl_sup.erl b/lib/ssl/src/ssl_sup.erl
index 77b40a7b38..7cccf8d5a5 100644
--- a/lib/ssl/src/ssl_sup.erl
+++ b/lib/ssl/src/ssl_sup.erl
@@ -1,7 +1,7 @@
%%
%% %CopyrightBegin%
%%
-%% Copyright Ericsson AB 1998-2013. All Rights Reserved.
+%% Copyright Ericsson AB 1998-2014. 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
@@ -47,8 +47,10 @@ init([]) ->
TLSConnetionManager = tls_connection_manager_child_spec(),
%% Not supported yet
%%DTLSConnetionManager = tls_connection_manager_child_spec(),
-
- {ok, {{one_for_all, 10, 3600}, [SessionCertManager, TLSConnetionManager]}}.
+ %% Handles emulated options so that they inherited by the accept socket, even when setopts is performed on
+ %% the listen socket
+ ListenOptionsTracker = listen_options_tracker_child_spec(),
+ {ok, {{one_for_all, 10, 3600}, [SessionCertManager, TLSConnetionManager, ListenOptionsTracker]}}.
manager_opts() ->
@@ -85,19 +87,30 @@ tls_connection_manager_child_spec() ->
StartFunc = {tls_connection_sup, start_link, []},
Restart = permanent,
Shutdown = 4000,
- Modules = [tls_connection, ssl_connection],
+ Modules = [tls_connection_sup],
Type = supervisor,
{Name, StartFunc, Restart, Shutdown, Type, Modules}.
-dtls_connection_manager_child_spec() ->
- Name = dtls_connection,
- StartFunc = {dtls_connection_sup, start_link, []},
+%% dtls_connection_manager_child_spec() ->
+%% Name = dtls_connection,
+%% StartFunc = {dtls_connection_sup, start_link, []},
+%% Restart = permanent,
+%% Shutdown = 4000,
+%% Modules = [dtls_connection, ssl_connection],
+%% Type = supervisor,
+%% {Name, StartFunc, Restart, Shutdown, Type, Modules}.
+
+
+listen_options_tracker_child_spec() ->
+ Name = ssl_socket,
+ StartFunc = {ssl_listen_tracker_sup, start_link, []},
Restart = permanent,
Shutdown = 4000,
- Modules = [dtls_connection, ssl_connection],
+ Modules = [ssl_socket],
Type = supervisor,
{Name, StartFunc, Restart, Shutdown, Type, Modules}.
+
session_cb_init_args() ->
case application:get_env(ssl, session_cb_init_args) of
{ok, Args} when is_list(Args) ->
diff --git a/lib/ssl/src/ssl_v3.erl b/lib/ssl/src/ssl_v3.erl
index d477b3df81..68f7f5dee2 100644
--- a/lib/ssl/src/ssl_v3.erl
+++ b/lib/ssl/src/ssl_v3.erl
@@ -1,7 +1,7 @@
%%
%% %CopyrightBegin%
%%
-%% Copyright Ericsson AB 2007-2013. All Rights Reserved.
+%% Copyright Ericsson AB 2007-2014. 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
@@ -130,7 +130,7 @@ setup_keys(MasterSecret, ServerRandom, ClientRandom, HS, KML, _EKML, IVS) ->
{ClientWriteMacSecret, ServerWriteMacSecret, ClientWriteKey,
ServerWriteKey, ClientIV, ServerIV}.
--spec suites() -> [cipher_suite()].
+-spec suites() -> [ssl_cipher:cipher_suite()].
suites() ->
[
diff --git a/lib/ssl/src/tls.erl b/lib/ssl/src/tls.erl
index 3e7b2db9c2..c829129250 100644
--- a/lib/ssl/src/tls.erl
+++ b/lib/ssl/src/tls.erl
@@ -30,25 +30,29 @@
handshake/1, handshake/2, handshake/3]).
%%--------------------------------------------------------------------
--spec connect(host() | port(), [connect_option()]) -> {ok, #sslsocket{}} |
- {error, reason()}.
--spec connect(host() | port(), [connect_option()] | inet:port_number(),
- timeout() | list()) ->
- {ok, #sslsocket{}} | {error, reason()}.
--spec connect(host() | port(), inet:port_number(), list(), timeout()) ->
- {ok, #sslsocket{}} | {error, reason()}.
-
%%
%% Description: Connect to an TLS server.
%%--------------------------------------------------------------------
+-spec connect(host() | port(), [connect_option()]) -> {ok, #sslsocket{}} |
+ {error, reason()}.
+
connect(Socket, Options) when is_port(Socket) ->
connect(Socket, Options, infinity).
+
+-spec connect(host() | port(), [connect_option()] | inet:port_number(),
+ timeout() | list()) ->
+ {ok, #sslsocket{}} | {error, reason()}.
+
connect(Socket, SslOptions, Timeout) when is_port(Socket) ->
TLSOpts = [{protocol, tls} | SslOptions],
ssl:connect(Socket, TLSOpts, Timeout);
connect(Host, Port, Options) ->
connect(Host, Port, Options, infinity).
+
+-spec connect(host() | port(), inet:port_number(), list(), timeout()) ->
+ {ok, #sslsocket{}} | {error, reason()}.
+
connect(Host, Port, Options, Timeout) ->
TLSOpts = [{protocol, tls} | Options],
ssl:connect(Host, Port, TLSOpts, Timeout).
@@ -64,39 +68,44 @@ listen(Port, Options) ->
ssl:listen(Port, TLSOpts).
%%--------------------------------------------------------------------
--spec accept(#sslsocket{}) -> {ok, #sslsocket{}} |
- {error, reason()}.
--spec accept(#sslsocket{}, timeout()) -> {ok, #sslsocket{}} |
- {error, reason()}.
%%
%% Description: Performs transport accept on an ssl listen socket
%%--------------------------------------------------------------------
+-spec accept(#sslsocket{}) -> {ok, #sslsocket{}} |
+ {error, reason()}.
accept(ListenSocket) ->
accept(ListenSocket, infinity).
+
+-spec accept(#sslsocket{}, timeout()) -> {ok, #sslsocket{}} |
+ {error, reason()}.
accept(Socket, Timeout) ->
ssl:transport_accept(Socket, Timeout).
%%--------------------------------------------------------------------
--spec handshake(#sslsocket{}) -> ok | {error, reason()}.
--spec handshake(#sslsocket{} | port(), timeout()| [ssl_option()
- | transport_option()]) ->
- ok | {ok, #sslsocket{}} | {error, reason()}.
--spec handshake(port(), [ssl_option()| transport_option()], timeout()) ->
- {ok, #sslsocket{}} | {error, reason()}.
%%
%% Description: Performs accept on an ssl listen socket. e.i. performs
%% ssl handshake.
%%--------------------------------------------------------------------
+-spec handshake(#sslsocket{}) -> ok | {error, reason()}.
+
handshake(ListenSocket) ->
handshake(ListenSocket, infinity).
+-spec handshake(#sslsocket{} | port(), timeout()| [ssl_option()
+ | transport_option()]) ->
+ ok | {ok, #sslsocket{}} | {error, reason()}.
+
handshake(#sslsocket{} = Socket, Timeout) ->
ssl:ssl_accept(Socket, Timeout);
handshake(ListenSocket, SslOptions) when is_port(ListenSocket) ->
handshake(ListenSocket, SslOptions, infinity).
+
+-spec handshake(port(), [ssl_option()| transport_option()], timeout()) ->
+ {ok, #sslsocket{}} | {error, reason()}.
+
handshake(Socket, SslOptions, Timeout) when is_port(Socket) ->
ssl:ssl_accept(Socket, SslOptions, Timeout).
diff --git a/lib/ssl/src/tls_connection.erl b/lib/ssl/src/tls_connection.erl
index 8e6f80da1e..2ab085321a 100644
--- a/lib/ssl/src/tls_connection.erl
+++ b/lib/ssl/src/tls_connection.erl
@@ -1,7 +1,7 @@
%%
%% %CopyrightBegin%
%%
-%% Copyright Ericsson AB 2007-2013. All Rights Reserved.
+%% Copyright Ericsson AB 2007-2014. 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
@@ -53,7 +53,7 @@
%% Alert and close handling
-export([send_alert/2, handle_own_alert/4, handle_close_alert/3,
handle_normal_shutdown/3, handle_unexpected_message/3,
- workaround_transport_delivery_problems/2, alert_user/5, alert_user/8
+ workaround_transport_delivery_problems/2, alert_user/6, alert_user/9
]).
%% Data handling
@@ -66,18 +66,18 @@
%% gen_fsm callbacks
-export([init/1, hello/2, certify/2, cipher/2,
abbreviated/2, connection/2, handle_event/3,
- handle_sync_event/4, handle_info/3, terminate/3, code_change/4]).
+ handle_sync_event/4, handle_info/3, terminate/3, code_change/4, format_status/2]).
%%====================================================================
%% Internal application API
%%====================================================================
-start_fsm(Role, Host, Port, Socket, {#ssl_options{erl_dist = false},_} = Opts,
+start_fsm(Role, Host, Port, Socket, {#ssl_options{erl_dist = false},_, Tracker} = Opts,
User, {CbModule, _,_, _} = CbInfo,
Timeout) ->
try
{ok, Pid} = tls_connection_sup:start_child([Role, Host, Port, Socket,
Opts, User, CbInfo]),
- {ok, SslSocket} = ssl_connection:socket_control(?MODULE, Socket, Pid, CbModule),
+ {ok, SslSocket} = ssl_connection:socket_control(?MODULE, Socket, Pid, CbModule, Tracker),
ok = ssl_connection:handshake(SslSocket, Timeout),
{ok, SslSocket}
catch
@@ -85,13 +85,13 @@ start_fsm(Role, Host, Port, Socket, {#ssl_options{erl_dist = false},_} = Opts,
Error
end;
-start_fsm(Role, Host, Port, Socket, {#ssl_options{erl_dist = true},_} = Opts,
+start_fsm(Role, Host, Port, Socket, {#ssl_options{erl_dist = true},_, Tracker} = Opts,
User, {CbModule, _,_, _} = CbInfo,
Timeout) ->
try
{ok, Pid} = tls_connection_sup:start_child_dist([Role, Host, Port, Socket,
Opts, User, CbInfo]),
- {ok, SslSocket} = ssl_connection:socket_control(?MODULE, Socket, Pid, CbModule),
+ {ok, SslSocket} = ssl_connection:socket_control(?MODULE, Socket, Pid, CbModule, Tracker),
ok = ssl_connection:handshake(SslSocket, Timeout),
{ok, SslSocket}
catch
@@ -144,29 +144,10 @@ send_change_cipher(Msg, #state{connection_states = ConnectionStates0,
start_link(Role, Host, Port, Socket, Options, User, CbInfo) ->
{ok, proc_lib:spawn_link(?MODULE, init, [[Role, Host, Port, Socket, Options, User, CbInfo]])}.
-init([Role, Host, Port, Socket, {SSLOpts0, _} = Options, User, CbInfo]) ->
+init([Role, Host, Port, Socket, Options, User, CbInfo]) ->
process_flag(trap_exit, true),
- State0 = initial_state(Role, Host, Port, Socket, Options, User, CbInfo),
- Handshake = ssl_handshake:init_handshake_history(),
- TimeStamp = calendar:datetime_to_gregorian_seconds({date(), time()}),
- try ssl_config:init(SSLOpts0, Role) of
- {ok, Ref, CertDbHandle, FileRefHandle, CacheHandle, OwnCert, Key, DHParams} ->
- Session = State0#state.session,
- State = State0#state{
- tls_handshake_history = Handshake,
- session = Session#session{own_certificate = OwnCert,
- time_stamp = TimeStamp},
- file_ref_db = FileRefHandle,
- cert_db_ref = Ref,
- cert_db = CertDbHandle,
- session_cache = CacheHandle,
- private_key = Key,
- diffie_hellman_params = DHParams},
- gen_fsm:enter_loop(?MODULE, [], hello, State, get_timeout(State))
- catch
- throw:Error ->
- gen_fsm:enter_loop(?MODULE, [], error, {Error,State0}, get_timeout(State0))
- end.
+ State = initial_state(Role, Host, Port, Socket, Options, User, CbInfo),
+ gen_fsm:enter_loop(?MODULE, [], hello, State, get_timeout(State)).
%%--------------------------------------------------------------------
%% Description:There should be one instance of this function for each
@@ -199,20 +180,20 @@ hello(start, #state{host = Host, port = Port, role = client,
next_state(hello, hello, Record, State);
hello(Hello = #client_hello{client_version = ClientVersion,
- extensions = #hello_extensions{hash_signs = HashSigns}},
+ extensions = #hello_extensions{hash_signs = HashSigns,
+ ec_point_formats = EcPointFormats,
+ elliptic_curves = EllipticCurves}},
State = #state{connection_states = ConnectionStates0,
port = Port, session = #session{own_certificate = Cert} = Session0,
renegotiation = {Renegotiation, _},
session_cache = Cache,
session_cache_cb = CacheCb,
ssl_options = SslOpts}) ->
- HashSign = ssl_handshake:select_hashsign(HashSigns, Cert),
case tls_handshake:hello(Hello, SslOpts, {Port, Session0, Cache, CacheCb,
ConnectionStates0, Cert}, Renegotiation) of
{Version, {Type, Session},
- ConnectionStates,
- #hello_extensions{ec_point_formats = EcPointFormats,
- elliptic_curves = EllipticCurves} = ServerHelloExt} ->
+ ConnectionStates, ServerHelloExt} ->
+ HashSign = ssl_handshake:select_hashsign(HashSigns, Cert, Version),
ssl_connection:hello({common_client_hello, Type, ServerHelloExt, HashSign},
State#state{connection_states = ConnectionStates,
negotiated_version = Version,
@@ -342,8 +323,7 @@ handle_info(Msg, StateName, State) ->
%% Reason. The return value is ignored.
%%--------------------------------------------------------------------
terminate(Reason, StateName, State) ->
- ssl_connection:terminate(Reason, StateName, State).
-
+ catch ssl_connection:terminate(Reason, StateName, State).
%%--------------------------------------------------------------------
%% code_change(OldVsn, StateName, State, Extra) -> {ok, StateName, NewState}
@@ -352,6 +332,9 @@ terminate(Reason, StateName, State) ->
code_change(_OldVsn, StateName, State, _Extra) ->
{ok, StateName, State}.
+format_status(Type, Data) ->
+ ssl_connection:format_status(Type, Data).
+
%%--------------------------------------------------------------------
%%% Internal functions
%%--------------------------------------------------------------------
@@ -362,22 +345,13 @@ encode_handshake(Handshake, Version, ConnectionStates0, Hist0) ->
ssl_record:encode_handshake(Frag, Version, ConnectionStates0),
{Encoded, ConnectionStates, Hist}.
-
encode_change_cipher(#change_cipher_spec{}, Version, ConnectionStates) ->
ssl_record:encode_change_cipher_spec(Version, ConnectionStates).
-
-
decode_alerts(Bin) ->
- decode_alerts(Bin, []).
-
-decode_alerts(<<?BYTE(Level), ?BYTE(Description), Rest/binary>>, Acc) ->
- A = ?ALERT_REC(Level, Description),
- decode_alerts(Rest, [A | Acc]);
-decode_alerts(<<>>, Acc) ->
- lists:reverse(Acc, []).
+ ssl_alert:decode(Bin).
-initial_state(Role, Host, Port, Socket, {SSLOptions, SocketOptions}, User,
+initial_state(Role, Host, Port, Socket, {SSLOptions, SocketOptions, Tracker}, User,
{CbModule, DataTag, CloseTag, ErrorTag}) ->
ConnectionStates = ssl_record:init_connection_states(Role),
@@ -391,9 +365,7 @@ initial_state(Role, Host, Port, Socket, {SSLOptions, SocketOptions}, User,
Monitor = erlang:monitor(process, User),
#state{socket_options = SocketOptions,
- %% We do not want to save the password in the state so that
- %% could be written in the clear into error logs.
- ssl_options = SSLOptions#ssl_options{password = undefined},
+ ssl_options = SSLOptions,
session = #session{is_resumable = new},
transport_cb = CbModule,
data_tag = DataTag,
@@ -411,7 +383,8 @@ initial_state(Role, Host, Port, Socket, {SSLOptions, SocketOptions}, User,
renegotiation = {false, first},
start_or_recv_from = undefined,
send_queue = queue:new(),
- protocol_cb = ?MODULE
+ protocol_cb = ?MODULE,
+ tracker = Tracker
}.
next_state(Current,_, #alert{} = Alert, #state{negotiated_version = Version} = State) ->
@@ -420,10 +393,13 @@ next_state(Current,_, #alert{} = Alert, #state{negotiated_version = Version} = S
next_state(_,Next, no_record, State) ->
{next_state, Next, State, get_timeout(State)};
-next_state(_,Next, #ssl_tls{type = ?ALERT, fragment = EncAlerts}, State) ->
- Alerts = decode_alerts(EncAlerts),
- handle_alerts(Alerts, {next_state, Next, State, get_timeout(State)});
-
+next_state(Current, Next, #ssl_tls{type = ?ALERT, fragment = EncAlerts}, #state{negotiated_version = Version} = State) ->
+ case decode_alerts(EncAlerts) of
+ Alerts = [_|_] ->
+ handle_alerts(Alerts, {next_state, Next, State, get_timeout(State)});
+ #alert{} = Alert ->
+ handle_own_alert(Alert, Version, Current, State)
+ end;
next_state(Current, Next, #ssl_tls{type = ?HANDSHAKE, fragment = Data},
State0 = #state{protocol_buffers =
#protocol_buffers{tls_handshake_buffer = Buf0} = Buffers,
@@ -513,7 +489,7 @@ next_record(State) ->
next_record_if_active(State =
#state{socket_options =
- #socket_options{active = false}}) ->
+ #socket_options{active = false}}) ->
{no_record ,State};
next_record_if_active(State) ->
@@ -577,7 +553,8 @@ read_application_data(Data, #state{user_application = {_Mon, Pid},
bytes_to_read = BytesToRead,
start_or_recv_from = RecvFrom,
timer = Timer,
- user_data_buffer = Buffer0} = State0) ->
+ user_data_buffer = Buffer0,
+ tracker = Tracker} = State0) ->
Buffer1 = if
Buffer0 =:= <<>> -> Data;
Data =:= <<>> -> Buffer0;
@@ -585,7 +562,7 @@ read_application_data(Data, #state{user_application = {_Mon, Pid},
end,
case get_data(SOpts, BytesToRead, Buffer1) of
{ok, ClientData, Buffer} -> % Send data
- SocketOpt = deliver_app_data(Transport, Socket, SOpts, ClientData, Pid, RecvFrom),
+ SocketOpt = deliver_app_data(Transport, Socket, SOpts, ClientData, Pid, RecvFrom, Tracker),
cancel_timer(Timer),
State = State0#state{user_data_buffer = Buffer,
start_or_recv_from = undefined,
@@ -606,7 +583,7 @@ read_application_data(Data, #state{user_application = {_Mon, Pid},
{passive, Buffer} ->
next_record_if_active(State0#state{user_data_buffer = Buffer});
{error,_Reason} -> %% Invalid packet in packet mode
- deliver_packet_error(Transport, Socket, SOpts, Buffer1, Pid, RecvFrom),
+ deliver_packet_error(Transport, Socket, SOpts, Buffer1, Pid, RecvFrom, Tracker),
{stop, normal, State0}
end.
@@ -661,8 +638,8 @@ decode_packet(Type, Buffer, PacketOpts) ->
%% HTTP headers using the {packet, httph} option, we don't do any automatic
%% switching of states.
deliver_app_data(Transport, Socket, SOpts = #socket_options{active=Active, packet=Type},
- Data, Pid, From) ->
- send_or_reply(Active, Pid, From, format_reply(Transport, Socket, SOpts, Data)),
+ Data, Pid, From, Tracker) ->
+ send_or_reply(Active, Pid, From, format_reply(Transport, Socket, SOpts, Data, Tracker)),
SO = case Data of
{P, _, _, _} when ((P =:= http_request) or (P =:= http_response)),
((Type =:= http) or (Type =:= http_bin)) ->
@@ -682,20 +659,20 @@ deliver_app_data(Transport, Socket, SOpts = #socket_options{active=Active, packe
end.
format_reply(_, _,#socket_options{active = false, mode = Mode, packet = Packet,
- header = Header}, Data) ->
+ header = Header}, Data, _) ->
{ok, do_format_reply(Mode, Packet, Header, Data)};
format_reply(Transport, Socket, #socket_options{active = _, mode = Mode, packet = Packet,
- header = Header}, Data) ->
- {ssl, ssl_socket:socket(self(), Transport, Socket, ?MODULE),
+ header = Header}, Data, Tracker) ->
+ {ssl, ssl_socket:socket(self(), Transport, Socket, ?MODULE, Tracker),
do_format_reply(Mode, Packet, Header, Data)}.
-deliver_packet_error(Transport, Socket, SO= #socket_options{active = Active}, Data, Pid, From) ->
- send_or_reply(Active, Pid, From, format_packet_error(Transport, Socket, SO, Data)).
+deliver_packet_error(Transport, Socket, SO= #socket_options{active = Active}, Data, Pid, From, Tracker) ->
+ send_or_reply(Active, Pid, From, format_packet_error(Transport, Socket, SO, Data, Tracker)).
-format_packet_error(_, _,#socket_options{active = false, mode = Mode}, Data) ->
+format_packet_error(_, _,#socket_options{active = false, mode = Mode}, Data, _) ->
{error, {invalid_packet, do_format_reply(Mode, raw, 0, Data)}};
-format_packet_error(Transport, Socket, #socket_options{active = _, mode = Mode}, Data) ->
- {ssl_error, ssl_socket:socket(self(), Transport, Socket, ?MODULE),
+format_packet_error(Transport, Socket, #socket_options{active = _, mode = Mode}, Data, Tracker) ->
+ {ssl_error, ssl_socket:socket(self(), Transport, Socket, ?MODULE, Tracker),
{invalid_packet, do_format_reply(Mode, raw, 0, Data)}}.
do_format_reply(binary, _, N, Data) when N > 0 -> % Header mode
@@ -751,7 +728,11 @@ handle_tls_handshake(Handle, StateName,
handle_tls_handshake(Handle, NextStateName, State);
{stop, _,_} = Stop ->
Stop
- end.
+ end;
+
+handle_tls_handshake(_Handle, _StateName, #state{}) ->
+ throw(?ALERT_REC(?FATAL, ?HANDSHAKE_FAILURE)).
+
write_application_data(Data0, From,
#state{socket = Socket,
negotiated_version = Version,
@@ -835,10 +816,10 @@ handle_alert(#alert{level = ?FATAL} = Alert, StateName,
#state{socket = Socket, transport_cb = Transport,
ssl_options = SslOpts, start_or_recv_from = From, host = Host,
port = Port, session = Session, user_application = {_Mon, Pid},
- role = Role, socket_options = Opts} = State) ->
+ role = Role, socket_options = Opts, tracker = Tracker} = State) ->
invalidate_session(Role, Host, Port, Session),
log_alert(SslOpts#ssl_options.log_alert, StateName, Alert),
- alert_user(Transport, Socket, StateName, Opts, Pid, From, Alert, Role),
+ alert_user(Transport, Tracker, Socket, StateName, Opts, Pid, From, Alert, Role),
{stop, normal, State};
handle_alert(#alert{level = ?WARNING, description = ?CLOSE_NOTIFY} = Alert,
@@ -859,36 +840,37 @@ handle_alert(#alert{level = ?WARNING, description = ?NO_RENEGOTIATION} = Alert,
{Record, State} = next_record(State0),
next_state(StateName, connection, Record, State);
-handle_alert(#alert{level = ?WARNING, description = ?USER_CANCELED} = Alert, StateName,
+%% Gracefully log and ignore all other warning alerts
+handle_alert(#alert{level = ?WARNING} = Alert, StateName,
#state{ssl_options = SslOpts} = State0) ->
log_alert(SslOpts#ssl_options.log_alert, StateName, Alert),
{Record, State} = next_record(State0),
next_state(StateName, StateName, Record, State).
-alert_user(Transport, Socket, connection, Opts, Pid, From, Alert, Role) ->
- alert_user(Transport,Socket, Opts#socket_options.active, Pid, From, Alert, Role);
-alert_user(Transport, Socket,_, _, _, From, Alert, Role) ->
- alert_user(Transport, Socket, From, Alert, Role).
+alert_user(Transport, Tracker, Socket, connection, Opts, Pid, From, Alert, Role) ->
+ alert_user(Transport, Tracker, Socket, Opts#socket_options.active, Pid, From, Alert, Role);
+alert_user(Transport, Tracker, Socket,_, _, _, From, Alert, Role) ->
+ alert_user(Transport, Tracker, Socket, From, Alert, Role).
-alert_user(Transport, Socket, From, Alert, Role) ->
- alert_user(Transport, Socket, false, no_pid, From, Alert, Role).
+alert_user(Transport, Tracker, Socket, From, Alert, Role) ->
+ alert_user(Transport, Tracker, Socket, false, no_pid, From, Alert, Role).
-alert_user(_,_, false = Active, Pid, From, Alert, Role) ->
+alert_user(_, _, _, false = Active, Pid, From, Alert, Role) ->
%% If there is an outstanding ssl_accept | recv
%% From will be defined and send_or_reply will
%% send the appropriate error message.
ReasonCode = ssl_alert:reason_code(Alert, Role),
send_or_reply(Active, Pid, From, {error, ReasonCode});
-alert_user(Transport, Socket, Active, Pid, From, Alert, Role) ->
+alert_user(Transport, Tracker, Socket, Active, Pid, From, Alert, Role) ->
case ssl_alert:reason_code(Alert, Role) of
closed ->
send_or_reply(Active, Pid, From,
{ssl_closed, ssl_socket:socket(self(),
- Transport, Socket, ?MODULE)});
+ Transport, Socket, ?MODULE, Tracker)});
ReasonCode ->
send_or_reply(Active, Pid, From,
{ssl_error, ssl_socket:socket(self(),
- Transport, Socket, ?MODULE), ReasonCode})
+ Transport, Socket, ?MODULE, Tracker), ReasonCode})
end.
log_alert(true, Info, Alert) ->
@@ -921,15 +903,17 @@ handle_own_alert(Alert, Version, StateName,
handle_normal_shutdown(Alert, _, #state{socket = Socket,
transport_cb = Transport,
start_or_recv_from = StartFrom,
+ tracker = Tracker,
role = Role, renegotiation = {false, first}}) ->
- alert_user(Transport, Socket, StartFrom, Alert, Role);
+ alert_user(Transport, Tracker,Socket, StartFrom, Alert, Role);
handle_normal_shutdown(Alert, StateName, #state{socket = Socket,
socket_options = Opts,
transport_cb = Transport,
user_application = {_Mon, Pid},
+ tracker = Tracker,
start_or_recv_from = RecvFrom, role = Role}) ->
- alert_user(Transport, Socket, StateName, Opts, Pid, RecvFrom, Alert, Role).
+ alert_user(Transport, Tracker, Socket, StateName, Opts, Pid, RecvFrom, Alert, Role).
handle_unexpected_message(Msg, Info, #state{negotiated_version = Version} = State) ->
Alert = ?ALERT_REC(?FATAL,?UNEXPECTED_MESSAGE),
diff --git a/lib/ssl/src/tls_connection_sup.erl b/lib/ssl/src/tls_connection_sup.erl
index 6f0d8a7262..7a637c212a 100644
--- a/lib/ssl/src/tls_connection_sup.erl
+++ b/lib/ssl/src/tls_connection_sup.erl
@@ -1,7 +1,7 @@
%%
%% %CopyrightBegin%
%%
-%% Copyright Ericsson AB 2007-2013. All Rights Reserved.
+%% Copyright Ericsson AB 2007-2014. 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
@@ -59,7 +59,7 @@ init(_O) ->
StartFunc = {tls_connection, start_link, []},
Restart = temporary, % E.g. should not be restarted
Shutdown = 4000,
- Modules = [tls_connection],
+ Modules = [tls_connection, ssl_connection],
Type = worker,
ChildSpec = {Name, StartFunc, Restart, Shutdown, Type, Modules},
diff --git a/lib/ssl/src/tls_handshake.erl b/lib/ssl/src/tls_handshake.erl
index 003614b448..183cabcfcd 100644
--- a/lib/ssl/src/tls_handshake.erl
+++ b/lib/ssl/src/tls_handshake.erl
@@ -1,7 +1,7 @@
%%
%% %CopyrightBegin%
%%
-%% Copyright Ericsson AB 2007-2013. All Rights Reserved.
+%% Copyright Ericsson AB 2007-2014. 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
@@ -33,6 +33,8 @@
-export([client_hello/8, hello/4,
get_tls_handshake/3, encode_handshake/2, decode_handshake/3]).
+-type tls_handshake() :: #client_hello{} | ssl_handshake:ssl_handshake().
+
%%====================================================================
%% Internal application API
%%====================================================================
@@ -52,9 +54,9 @@ client_hello(Host, Port, ConnectionStates,
Pending = ssl_record:pending_connection_state(ConnectionStates, read),
SecParams = Pending#connection_state.security_parameters,
CipherSuites = ssl_handshake:available_suites(UserSuites, Version),
-
- Extensions = ssl_handshake:client_hello_extensions(Host, Version, CipherSuites,
- SslOpts, ConnectionStates, Renegotiation),
+ Extensions = ssl_handshake:client_hello_extensions(Host, Version,
+ CipherSuites,
+ SslOpts, ConnectionStates, Renegotiation),
Id = ssl_session:client_id({Host, Port, SslOpts}, Cache, CacheCb, OwnCert),
@@ -71,11 +73,11 @@ client_hello(Host, Port, ConnectionStates,
#connection_states{} | {inet:port_number(), #session{}, db_handle(),
atom(), #connection_states{}, binary() | undefined},
boolean()) ->
- {tls_version(), session_id(), #connection_states{}, binary() | undefined}|
- {tls_version(), {resumed | new, #session{}}, #connection_states{},
- [binary()] | undefined,
- [oid()] | undefined, [oid()] | undefined} |
- #alert{}.
+ {tls_record:tls_version(), session_id(), #connection_states{}, binary() | undefined}|
+ {tls_record:tls_version(), {resumed | new, #session{}}, #connection_states{},
+ [binary()] | undefined,
+ [ssl_handshake:oid()] | undefined, [ssl_handshake:oid()] | undefined} |
+ #alert{}.
%%
%% Description: Handles a recieved hello message
%%--------------------------------------------------------------------
@@ -87,8 +89,8 @@ hello(#server_hello{server_version = Version, random = Random,
ConnectionStates0, Renegotiation) ->
case tls_record:is_acceptable_version(Version, SupportedVersions) of
true ->
- handle_hello_extensions(Version, SessionId, Random, CipherSuite,
- Compression, HelloExt, SslOpt, ConnectionStates0, Renegotiation);
+ handle_server_hello_extensions(Version, SessionId, Random, CipherSuite,
+ Compression, HelloExt, SslOpt, ConnectionStates0, Renegotiation);
false ->
?ALERT_REC(?FATAL, ?PROTOCOL_VERSION)
end;
@@ -113,16 +115,16 @@ hello(#client_hello{client_version = ClientVersion,
no_suite ->
?ALERT_REC(?FATAL, ?INSUFFICIENT_SECURITY);
_ ->
- handle_hello_extensions(Version, Type, Random, HelloExt,
- SslOpts, Session1, ConnectionStates0,
- Renegotiation)
+ handle_client_hello_extensions(Version, Type, Random, CipherSuites, HelloExt,
+ SslOpts, Session1, ConnectionStates0,
+ Renegotiation)
end;
false ->
?ALERT_REC(?FATAL, ?PROTOCOL_VERSION)
end.
%%--------------------------------------------------------------------
--spec encode_handshake(tls_handshake(), tls_version()) -> iolist().
+-spec encode_handshake(tls_handshake(), tls_record:tls_version()) -> iolist().
%%
%% Description: Encode a handshake packet
%%--------------------------------------------------------------------x
@@ -132,7 +134,7 @@ encode_handshake(Package, Version) ->
[MsgType, ?uint24(Len), Bin].
%%--------------------------------------------------------------------
--spec get_tls_handshake(tls_version(), binary(), binary() | iolist()) ->
+-spec get_tls_handshake(tls_record:tls_version(), binary(), binary() | iolist()) ->
{[tls_handshake()], binary()}.
%%
%% Description: Given buffered and new data from ssl_record, collects
@@ -217,8 +219,10 @@ enc_handshake(HandshakeMsg, Version) ->
ssl_handshake:encode_handshake(HandshakeMsg, Version).
-handle_hello_extensions(Version, Type, Random, HelloExt, SslOpts, Session0, ConnectionStates0, Renegotiation) ->
- try ssl_handshake:handle_client_hello_extensions(tls_record, Random, HelloExt, Version, SslOpts,
+handle_client_hello_extensions(Version, Type, Random, CipherSuites,
+ HelloExt, SslOpts, Session0, ConnectionStates0, Renegotiation) ->
+ try ssl_handshake:handle_client_hello_extensions(tls_record, Random, CipherSuites,
+ HelloExt, Version, SslOpts,
Session0, ConnectionStates0, Renegotiation) of
{Session, ConnectionStates, ServerHelloExt} ->
{Version, {Type, Session}, ConnectionStates, ServerHelloExt}
@@ -227,7 +231,7 @@ handle_hello_extensions(Version, Type, Random, HelloExt, SslOpts, Session0, Conn
end.
-handle_hello_extensions(Version, SessionId, Random, CipherSuite,
+handle_server_hello_extensions(Version, SessionId, Random, CipherSuite,
Compression, HelloExt, SslOpt, ConnectionStates0, Renegotiation) ->
case ssl_handshake:handle_server_hello_extensions(tls_record, Random, CipherSuite,
Compression, HelloExt, Version,
diff --git a/lib/ssl/src/tls_handshake.hrl b/lib/ssl/src/tls_handshake.hrl
index dbe930cb90..1646e5b6f2 100644
--- a/lib/ssl/src/tls_handshake.hrl
+++ b/lib/ssl/src/tls_handshake.hrl
@@ -1,7 +1,7 @@
%%
%% %CopyrightBegin%
%%
-%% Copyright Ericsson AB 2013-2013. All Rights Reserved.
+%% Copyright Ericsson AB 2013-2014. 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
@@ -37,6 +37,4 @@
extensions
}).
--type tls_handshake() :: #client_hello{} | ssl_handshake().
-
-endif. % -ifdef(tls_handshake).
diff --git a/lib/ssl/src/tls_record.erl b/lib/ssl/src/tls_record.erl
index 88107557a0..f50ea22f39 100644
--- a/lib/ssl/src/tls_record.erl
+++ b/lib/ssl/src/tls_record.erl
@@ -1,7 +1,7 @@
%%
%% %CopyrightBegin%
%%
-%% Copyright Ericsson AB 2007-2013. All Rights Reserved.
+%% Copyright Ericsson AB 2007-2014. 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
@@ -44,6 +44,11 @@
highest_protocol_version/1, supported_protocol_versions/0,
is_acceptable_version/1, is_acceptable_version/2]).
+-export_type([tls_version/0, tls_atom_version/0]).
+
+-type tls_version() :: ssl_record:ssl_version().
+-type tls_atom_version() :: sslv3 | tlsv1 | 'tlsv1.1' | 'tlsv1.2'.
+
-compile(inline).
%%====================================================================
@@ -149,21 +154,24 @@ decode_cipher_text(#ssl_tls{type = Type, version = Version,
sequence_number = Seq,
security_parameters = SecParams} = ReadState0,
CompressAlg = SecParams#security_parameters.compression_algorithm,
- {PlainFragment, Mac, ReadState1} = ssl_record:decipher(Version, CipherFragment, ReadState0),
- MacHash = calc_mac_hash(Type, Version, PlainFragment, ReadState1),
- case ssl_record:is_correct_mac(Mac, MacHash) of
- true ->
- {Plain, CompressionS1} = ssl_record:uncompress(CompressAlg,
- PlainFragment, CompressionS0),
- ConnnectionStates = ConnnectionStates0#connection_states{
- current_read = ReadState1#connection_state{
- sequence_number = Seq + 1,
- compression_state = CompressionS1}},
- {CipherText#ssl_tls{fragment = Plain}, ConnnectionStates};
- false ->
- ?ALERT_REC(?FATAL, ?BAD_RECORD_MAC)
- end.
-
+ case ssl_record:decipher(Version, CipherFragment, ReadState0) of
+ {PlainFragment, Mac, ReadState1} ->
+ MacHash = calc_mac_hash(Type, Version, PlainFragment, ReadState1),
+ case ssl_record:is_correct_mac(Mac, MacHash) of
+ true ->
+ {Plain, CompressionS1} = ssl_record:uncompress(CompressAlg,
+ PlainFragment, CompressionS0),
+ ConnnectionStates = ConnnectionStates0#connection_states{
+ current_read = ReadState1#connection_state{
+ sequence_number = Seq + 1,
+ compression_state = CompressionS1}},
+ {CipherText#ssl_tls{fragment = Plain}, ConnnectionStates};
+ false ->
+ ?ALERT_REC(?FATAL, ?BAD_RECORD_MAC)
+ end;
+ #alert{} = Alert ->
+ Alert
+ end.
%%--------------------------------------------------------------------
-spec protocol_version(tls_atom_version() | tls_version()) ->
tls_version() | tls_atom_version().
@@ -262,18 +270,18 @@ supported_protocol_versions([_|_] = Vsns) ->
Vsns.
%%--------------------------------------------------------------------
--spec is_acceptable_version(tls_version()) -> boolean().
--spec is_acceptable_version(tls_version(), Supported :: [tls_version()]) -> boolean().
%%
%% Description: ssl version 2 is not acceptable security risks are too big.
%%
%%--------------------------------------------------------------------
+-spec is_acceptable_version(tls_version()) -> boolean().
is_acceptable_version({N,_})
when N >= ?LOWEST_MAJOR_SUPPORTED_VERSION ->
true;
is_acceptable_version(_) ->
false.
+-spec is_acceptable_version(tls_version(), Supported :: [tls_version()]) -> boolean().
is_acceptable_version({N,_} = Version, Versions)
when N >= ?LOWEST_MAJOR_SUPPORTED_VERSION ->
lists:member(Version, Versions);
diff --git a/lib/ssl/src/tls_v1.erl b/lib/ssl/src/tls_v1.erl
index 2395e98642..7a5f9c1b38 100644
--- a/lib/ssl/src/tls_v1.erl
+++ b/lib/ssl/src/tls_v1.erl
@@ -1,7 +1,7 @@
%%
%% %CopyrightBegin%
%%
-%% Copyright Ericsson AB 2007-2013. All Rights Reserved.
+%% Copyright Ericsson AB 2007-2014. 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
@@ -166,7 +166,7 @@ setup_keys(Version, PrfAlgo, MasterSecret, ServerRandom, ClientRandom, HashSize,
{ClientWriteMacSecret, ServerWriteMacSecret, ClientWriteKey,
ServerWriteKey, ClientIV, ServerIV}.
--spec mac_hash(integer(), binary(), integer(), integer(), tls_version(),
+-spec mac_hash(integer(), binary(), integer(), integer(), tls_record:tls_version(),
integer(), binary()) -> binary().
mac_hash(Method, Mac_write_secret, Seq_num, Type, {Major, Minor},
@@ -181,25 +181,9 @@ mac_hash(Method, Mac_write_secret, Seq_num, Type, {Major, Minor},
Fragment]),
Mac.
--spec suites(1|2|3) -> [cipher_suite()].
-
-suites(Minor) when Minor == 1; Minor == 2->
- case sufficent_ec_support() of
- true ->
- all_suites(Minor);
- false ->
- no_ec_suites(Minor)
- end;
-
-suites(Minor) when Minor == 3 ->
- case sufficent_ec_support() of
- true ->
- all_suites(3) ++ all_suites(2);
- false ->
- no_ec_suites(3) ++ no_ec_suites(2)
- end.
-
-all_suites(Minor) when Minor == 1; Minor == 2->
+-spec suites(1|2|3) -> [ssl_cipher:cipher_suite()].
+
+suites(Minor) when Minor == 1; Minor == 2 ->
[
?TLS_ECDHE_ECDSA_WITH_AES_256_CBC_SHA,
?TLS_ECDHE_RSA_WITH_AES_256_CBC_SHA,
@@ -235,7 +219,7 @@ all_suites(Minor) when Minor == 1; Minor == 2->
?TLS_RSA_WITH_DES_CBC_SHA
];
-all_suites(3) ->
+suites(3) ->
[
?TLS_ECDHE_ECDSA_WITH_AES_256_CBC_SHA384,
?TLS_ECDHE_RSA_WITH_AES_256_CBC_SHA384,
@@ -254,33 +238,7 @@ all_suites(3) ->
?TLS_DHE_RSA_WITH_AES_128_CBC_SHA256,
?TLS_DHE_DSS_WITH_AES_128_CBC_SHA256,
?TLS_RSA_WITH_AES_128_CBC_SHA256
- ].
-
-no_ec_suites(Minor) when Minor == 1; Minor == 2->
- [
- ?TLS_DHE_RSA_WITH_AES_256_CBC_SHA,
- ?TLS_DHE_DSS_WITH_AES_256_CBC_SHA,
- ?TLS_RSA_WITH_AES_256_CBC_SHA,
- ?TLS_DHE_RSA_WITH_3DES_EDE_CBC_SHA,
- ?TLS_DHE_DSS_WITH_3DES_EDE_CBC_SHA,
- ?TLS_RSA_WITH_3DES_EDE_CBC_SHA,
- ?TLS_DHE_RSA_WITH_AES_128_CBC_SHA,
- ?TLS_DHE_DSS_WITH_AES_128_CBC_SHA,
- ?TLS_RSA_WITH_AES_128_CBC_SHA,
- ?TLS_RSA_WITH_RC4_128_SHA,
- ?TLS_RSA_WITH_RC4_128_MD5,
- ?TLS_DHE_RSA_WITH_DES_CBC_SHA,
- ?TLS_RSA_WITH_DES_CBC_SHA
- ];
-no_ec_suites(3) ->
- [
- ?TLS_DHE_RSA_WITH_AES_256_CBC_SHA256,
- ?TLS_DHE_DSS_WITH_AES_256_CBC_SHA256,
- ?TLS_RSA_WITH_AES_256_CBC_SHA256,
- ?TLS_DHE_RSA_WITH_AES_128_CBC_SHA256,
- ?TLS_DHE_DSS_WITH_AES_128_CBC_SHA256,
- ?TLS_RSA_WITH_AES_128_CBC_SHA256
- ].
+ ] ++ suites(2).
%%--------------------------------------------------------------------
%%% Internal functions
@@ -368,11 +326,19 @@ finished_label(server) ->
%% list ECC curves in prefered order
ecc_curves(_Minor) ->
- [?sect571r1,?sect571k1,?secp521r1,?sect409k1,?sect409r1,
- ?secp384r1,?sect283k1,?sect283r1,?secp256k1,?secp256r1,
- ?sect239k1,?sect233k1,?sect233r1,?secp224k1,?secp224r1,
- ?sect193r1,?sect193r2,?secp192k1,?secp192r1,?sect163k1,
- ?sect163r1,?sect163r2,?secp160k1,?secp160r1,?secp160r2].
+ TLSCurves = [sect571r1,sect571k1,secp521r1,brainpoolP512r1,
+ sect409k1,sect409r1,brainpoolP384r1,secp384r1,
+ sect283k1,sect283r1,brainpoolP256r1,secp256k1,secp256r1,
+ sect239k1,sect233k1,sect233r1,secp224k1,secp224r1,
+ sect193r1,sect193r2,secp192k1,secp192r1,sect163k1,
+ sect163r1,sect163r2,secp160k1,secp160r1,secp160r2],
+ CryptoCurves = crypto:ec_curves(),
+ lists:foldr(fun(Curve, Curves) ->
+ case proplists:get_bool(Curve, CryptoCurves) of
+ true -> [pubkey_cert_records:namedCurves(Curve)|Curves];
+ false -> Curves
+ end
+ end, [], TLSCurves).
%% ECC curves from draft-ietf-tls-ecc-12.txt (Oct. 17, 2005)
oid_to_enum(?sect163k1) -> 1;
@@ -399,7 +365,10 @@ oid_to_enum(?secp224r1) -> 21;
oid_to_enum(?secp256k1) -> 22;
oid_to_enum(?secp256r1) -> 23;
oid_to_enum(?secp384r1) -> 24;
-oid_to_enum(?secp521r1) -> 25.
+oid_to_enum(?secp521r1) -> 25;
+oid_to_enum(?brainpoolP256r1) -> 26;
+oid_to_enum(?brainpoolP384r1) -> 27;
+oid_to_enum(?brainpoolP512r1) -> 28.
enum_to_oid(1) -> ?sect163k1;
enum_to_oid(2) -> ?sect163r1;
@@ -425,8 +394,9 @@ enum_to_oid(21) -> ?secp224r1;
enum_to_oid(22) -> ?secp256k1;
enum_to_oid(23) -> ?secp256r1;
enum_to_oid(24) -> ?secp384r1;
-enum_to_oid(25) -> ?secp521r1.
-
-sufficent_ec_support() ->
- CryptoSupport = crypto:supports(),
- proplists:get_bool(ecdh, proplists:get_value(public_keys, CryptoSupport)).
+enum_to_oid(25) -> ?secp521r1;
+enum_to_oid(26) -> ?brainpoolP256r1;
+enum_to_oid(27) -> ?brainpoolP384r1;
+enum_to_oid(28) -> ?brainpoolP512r1;
+enum_to_oid(_) ->
+ undefined.
diff --git a/lib/ssl/test/Makefile b/lib/ssl/test/Makefile
index 244eb5ce0a..2f8ff6f04e 100644
--- a/lib/ssl/test/Makefile
+++ b/lib/ssl/test/Makefile
@@ -39,6 +39,7 @@ MODULES = \
ssl_basic_SUITE \
ssl_cipher_SUITE \
ssl_certificate_verify_SUITE\
+ ssl_crl_SUITE\
ssl_dist_SUITE \
ssl_handshake_SUITE \
ssl_npn_hello_SUITE \
diff --git a/lib/ssl/test/make_certs.erl b/lib/ssl/test/make_certs.erl
index 4603a9f846..15a7e118ff 100644
--- a/lib/ssl/test/make_certs.erl
+++ b/lib/ssl/test/make_certs.erl
@@ -18,23 +18,71 @@
%%
-module(make_certs).
+-compile([export_all]).
--export([all/2]).
+%-export([all/1, all/2, rootCA/2, intermediateCA/3, endusers/3, enduser/3, revoke/3, gencrl/2, verify/3]).
--record(dn, {commonName,
+-record(config, {commonName,
organizationalUnitName = "Erlang OTP",
organizationName = "Ericsson AB",
localityName = "Stockholm",
countryName = "SE",
- emailAddress = "[email protected]"}).
+ emailAddress = "[email protected]",
+ default_bits = 2048,
+ v2_crls = true,
+ ecc_certs = false,
+ issuing_distribution_point = false,
+ crl_port = 8000,
+ openssl_cmd = "openssl"}).
+
+
+default_config() ->
+ #config{}.
+
+make_config(Args) ->
+ make_config(Args, #config{}).
+
+make_config([], C) ->
+ C;
+make_config([{organizationalUnitName, Name}|T], C) when is_list(Name) ->
+ make_config(T, C#config{organizationalUnitName = Name});
+make_config([{organizationName, Name}|T], C) when is_list(Name) ->
+ make_config(T, C#config{organizationName = Name});
+make_config([{localityName, Name}|T], C) when is_list(Name) ->
+ make_config(T, C#config{localityName = Name});
+make_config([{countryName, Name}|T], C) when is_list(Name) ->
+ make_config(T, C#config{countryName = Name});
+make_config([{emailAddress, Name}|T], C) when is_list(Name) ->
+ make_config(T, C#config{emailAddress = Name});
+make_config([{default_bits, Bits}|T], C) when is_integer(Bits) ->
+ make_config(T, C#config{default_bits = Bits});
+make_config([{v2_crls, Bool}|T], C) when is_boolean(Bool) ->
+ make_config(T, C#config{v2_crls = Bool});
+make_config([{crl_port, Port}|T], C) when is_integer(Port) ->
+ make_config(T, C#config{crl_port = Port});
+make_config([{ecc_certs, Bool}|T], C) when is_boolean(Bool) ->
+ make_config(T, C#config{ecc_certs = Bool});
+make_config([{issuing_distribution_point, Bool}|T], C) when is_boolean(Bool) ->
+ make_config(T, C#config{issuing_distribution_point = Bool});
+make_config([{openssl_cmd, Cmd}|T], C) when is_list(Cmd) ->
+ make_config(T, C#config{openssl_cmd = Cmd}).
+
+
+all([DataDir, PrivDir]) ->
+ all(DataDir, PrivDir).
all(DataDir, PrivDir) ->
- OpenSSLCmd = "openssl",
+ all(DataDir, PrivDir, #config{}).
+
+all(DataDir, PrivDir, C) when is_list(C) ->
+ all(DataDir, PrivDir, make_config(C));
+all(DataDir, PrivDir, C = #config{}) ->
+ ok = filelib:ensure_dir(filename:join(PrivDir, "erlangCA")),
create_rnd(DataDir, PrivDir), % For all requests
- rootCA(PrivDir, OpenSSLCmd, "erlangCA"),
- intermediateCA(PrivDir, OpenSSLCmd, "otpCA", "erlangCA"),
- endusers(PrivDir, OpenSSLCmd, "otpCA", ["client", "server"]),
- collect_certs(PrivDir, ["erlangCA", "otpCA"], ["client", "server"]),
+ rootCA(PrivDir, "erlangCA", C),
+ intermediateCA(PrivDir, "otpCA", "erlangCA", C),
+ endusers(PrivDir, "otpCA", ["client", "server", "revoked"], C),
+ endusers(PrivDir, "erlangCA", ["localhost"], C),
%% Create keycert files
SDir = filename:join([PrivDir, "server"]),
SC = filename:join([SDir, "cert.pem"]),
@@ -46,7 +94,14 @@ all(DataDir, PrivDir) ->
CK = filename:join([CDir, "key.pem"]),
CKC = filename:join([CDir, "keycert.pem"]),
append_files([CK, CC], CKC),
- remove_rnd(PrivDir).
+ RDir = filename:join([PrivDir, "revoked"]),
+ RC = filename:join([RDir, "cert.pem"]),
+ RK = filename:join([RDir, "key.pem"]),
+ RKC = filename:join([RDir, "keycert.pem"]),
+ revoke(PrivDir, "otpCA", "revoked", C),
+ append_files([RK, RC], RKC),
+ remove_rnd(PrivDir),
+ {ok, C}.
append_files(FileNames, ResultFileName) ->
{ok, ResultFile} = file:open(ResultFileName, [write]),
@@ -59,111 +114,176 @@ do_append_files([F|Fs], RF) ->
ok = file:write(RF, Data),
do_append_files(Fs, RF).
-rootCA(Root, OpenSSLCmd, Name) ->
- create_ca_dir(Root, Name, ca_cnf(Name)),
- DN = #dn{commonName = Name},
- create_self_signed_cert(Root, OpenSSLCmd, Name, req_cnf(DN)),
- ok.
+rootCA(Root, Name, C) ->
+ create_ca_dir(Root, Name, ca_cnf(C#config{commonName = Name})),
+ create_self_signed_cert(Root, Name, req_cnf(C#config{commonName = Name}), C),
+ file:copy(filename:join([Root, Name, "cert.pem"]), filename:join([Root, Name, "cacerts.pem"])),
+ gencrl(Root, Name, C).
-intermediateCA(Root, OpenSSLCmd, CA, ParentCA) ->
- CA = "otpCA",
- create_ca_dir(Root, CA, ca_cnf(CA)),
+intermediateCA(Root, CA, ParentCA, C) ->
+ create_ca_dir(Root, CA, ca_cnf(C#config{commonName = CA})),
CARoot = filename:join([Root, CA]),
- DN = #dn{commonName = CA},
CnfFile = filename:join([CARoot, "req.cnf"]),
- file:write_file(CnfFile, req_cnf(DN)),
+ file:write_file(CnfFile, req_cnf(C#config{commonName = CA})),
KeyFile = filename:join([CARoot, "private", "key.pem"]),
ReqFile = filename:join([CARoot, "req.pem"]),
- create_req(Root, OpenSSLCmd, CnfFile, KeyFile, ReqFile),
+ create_req(Root, CnfFile, KeyFile, ReqFile, C),
CertFile = filename:join([CARoot, "cert.pem"]),
- sign_req(Root, OpenSSLCmd, ParentCA, "ca_cert", ReqFile, CertFile).
-
-endusers(Root, OpenSSLCmd, CA, Users) ->
- lists:foreach(fun(User) -> enduser(Root, OpenSSLCmd, CA, User) end, Users).
-
-enduser(Root, OpenSSLCmd, CA, User) ->
+ sign_req(Root, ParentCA, "ca_cert", ReqFile, CertFile, C),
+ CACertsFile = filename:join(CARoot, "cacerts.pem"),
+ file:copy(filename:join([Root, ParentCA, "cacerts.pem"]), CACertsFile),
+ %% append this CA's cert to the cacerts file
+ {ok, Bin} = file:read_file(CertFile),
+ {ok, FD} = file:open(CACertsFile, [append]),
+ file:write(FD, ["\n", Bin]),
+ file:close(FD),
+ gencrl(Root, CA, C).
+
+endusers(Root, CA, Users, C) ->
+ [enduser(Root, CA, User, C) || User <- Users].
+
+enduser(Root, CA, User, C) ->
UsrRoot = filename:join([Root, User]),
file:make_dir(UsrRoot),
CnfFile = filename:join([UsrRoot, "req.cnf"]),
- DN = #dn{commonName = User},
- file:write_file(CnfFile, req_cnf(DN)),
+ file:write_file(CnfFile, req_cnf(C#config{commonName = User})),
KeyFile = filename:join([UsrRoot, "key.pem"]),
ReqFile = filename:join([UsrRoot, "req.pem"]),
- create_req(Root, OpenSSLCmd, CnfFile, KeyFile, ReqFile),
+ create_req(Root, CnfFile, KeyFile, ReqFile, C),
+ %create_req(Root, CnfFile, KeyFile, ReqFile),
CertFileAllUsage = filename:join([UsrRoot, "cert.pem"]),
- sign_req(Root, OpenSSLCmd, CA, "user_cert", ReqFile, CertFileAllUsage),
+ sign_req(Root, CA, "user_cert", ReqFile, CertFileAllUsage, C),
CertFileDigitalSigOnly = filename:join([UsrRoot, "digital_signature_only_cert.pem"]),
- sign_req(Root, OpenSSLCmd, CA, "user_cert_digital_signature_only", ReqFile, CertFileDigitalSigOnly).
-
-collect_certs(Root, CAs, Users) ->
- Bins = lists:foldr(
- fun(CA, Acc) ->
- File = filename:join([Root, CA, "cert.pem"]),
- {ok, Bin} = file:read_file(File),
- [Bin, "\n" | Acc]
- end, [], CAs),
- lists:foreach(
- fun(User) ->
- File = filename:join([Root, User, "cacerts.pem"]),
- file:write_file(File, Bins)
- end, Users).
+ sign_req(Root, CA, "user_cert_digital_signature_only", ReqFile, CertFileDigitalSigOnly, C),
+ CACertsFile = filename:join(UsrRoot, "cacerts.pem"),
+ file:copy(filename:join([Root, CA, "cacerts.pem"]), CACertsFile),
+ ok.
+
+revoke(Root, CA, User, C) ->
+ UsrCert = filename:join([Root, User, "cert.pem"]),
+ CACnfFile = filename:join([Root, CA, "ca.cnf"]),
+ Cmd = [C#config.openssl_cmd, " ca"
+ " -revoke ", UsrCert,
+ [" -crl_reason keyCompromise" || C#config.v2_crls ],
+ " -config ", CACnfFile],
+ Env = [{"ROOTDIR", filename:absname(Root)}],
+ cmd(Cmd, Env),
+ gencrl(Root, CA, C).
+
+gencrl(Root, CA, C) ->
+ CACnfFile = filename:join([Root, CA, "ca.cnf"]),
+ CACRLFile = filename:join([Root, CA, "crl.pem"]),
+ Cmd = [C#config.openssl_cmd, " ca"
+ " -gencrl ",
+ " -crlhours 24",
+ " -out ", CACRLFile,
+ " -config ", CACnfFile],
+ Env = [{"ROOTDIR", filename:absname(Root)}],
+ cmd(Cmd, Env).
-create_self_signed_cert(Root, OpenSSLCmd, CAName, Cnf) ->
+verify(Root, CA, User, C) ->
+ CAFile = filename:join([Root, User, "cacerts.pem"]),
+ CACRLFile = filename:join([Root, CA, "crl.pem"]),
+ CertFile = filename:join([Root, User, "cert.pem"]),
+ Cmd = [C#config.openssl_cmd, " verify"
+ " -CAfile ", CAFile,
+ " -CRLfile ", CACRLFile, %% this is undocumented, but seems to work
+ " -crl_check ",
+ CertFile],
+ Env = [{"ROOTDIR", filename:absname(Root)}],
+ try cmd(Cmd, Env) catch
+ exit:{eval_cmd, _, _} ->
+ invalid
+ end.
+
+create_self_signed_cert(Root, CAName, Cnf, C = #config{ecc_certs = true}) ->
CARoot = filename:join([Root, CAName]),
CnfFile = filename:join([CARoot, "req.cnf"]),
file:write_file(CnfFile, Cnf),
KeyFile = filename:join([CARoot, "private", "key.pem"]),
CertFile = filename:join([CARoot, "cert.pem"]),
- Cmd = [OpenSSLCmd, " req"
+ Cmd = [C#config.openssl_cmd, " ecparam"
+ " -out ", KeyFile,
+ " -name secp521r1 ",
+ %" -name sect283k1 ",
+ " -genkey "],
+ Env = [{"ROOTDIR", filename:absname(Root)}],
+ cmd(Cmd, Env),
+
+ Cmd2 = [C#config.openssl_cmd, " req"
" -new"
" -x509"
" -config ", CnfFile,
- " -keyout ", KeyFile,
+ " -key ", KeyFile,
+ " -outform PEM ",
" -out ", CertFile],
- Env = [{"ROOTDIR", Root}],
- cmd(Cmd, Env),
- fix_key_file(OpenSSLCmd, KeyFile).
-
-% openssl 1.0 generates key files in pkcs8 format by default and we don't handle this format
-fix_key_file(OpenSSLCmd, KeyFile) ->
- KeyFileTmp = KeyFile ++ ".tmp",
- Cmd = [OpenSSLCmd, " rsa",
- " -in ",
- KeyFile,
- " -out ",
- KeyFileTmp],
- cmd(Cmd, []),
- ok = file:rename(KeyFileTmp, KeyFile).
+ cmd(Cmd2, Env);
+create_self_signed_cert(Root, CAName, Cnf, C) ->
+ CARoot = filename:join([Root, CAName]),
+ CnfFile = filename:join([CARoot, "req.cnf"]),
+ file:write_file(CnfFile, Cnf),
+ KeyFile = filename:join([CARoot, "private", "key.pem"]),
+ CertFile = filename:join([CARoot, "cert.pem"]),
+ Cmd = [C#config.openssl_cmd, " req"
+ " -new"
+ " -x509"
+ " -config ", CnfFile,
+ " -keyout ", KeyFile,
+ " -outform PEM",
+ " -out ", CertFile],
+ Env = [{"ROOTDIR", filename:absname(Root)}],
+ cmd(Cmd, Env).
+
create_ca_dir(Root, CAName, Cnf) ->
CARoot = filename:join([Root, CAName]),
+ ok = filelib:ensure_dir(CARoot),
file:make_dir(CARoot),
create_dirs(CARoot, ["certs", "crl", "newcerts", "private"]),
create_rnd(Root, filename:join([CAName, "private"])),
create_files(CARoot, [{"serial", "01\n"},
+ {"crlnumber", "01"},
{"index.txt", ""},
{"ca.cnf", Cnf}]).
-create_req(Root, OpenSSLCmd, CnfFile, KeyFile, ReqFile) ->
- Cmd = [OpenSSLCmd, " req"
+create_req(Root, CnfFile, KeyFile, ReqFile, C = #config{ecc_certs = true}) ->
+ Cmd = [C#config.openssl_cmd, " ecparam"
+ " -out ", KeyFile,
+ " -name secp521r1 ",
+ %" -name sect283k1 ",
+ " -genkey "],
+ Env = [{"ROOTDIR", filename:absname(Root)}],
+ cmd(Cmd, Env),
+ Cmd2 = [C#config.openssl_cmd, " req"
+ " -new ",
+ " -key ", KeyFile,
+ " -outform PEM ",
+ " -out ", ReqFile,
+ " -config ", CnfFile],
+ cmd(Cmd2, Env);
+ %fix_key_file(KeyFile).
+create_req(Root, CnfFile, KeyFile, ReqFile, C) ->
+ Cmd = [C#config.openssl_cmd, " req"
" -new"
" -config ", CnfFile,
+ " -outform PEM ",
" -keyout ", KeyFile,
" -out ", ReqFile],
- Env = [{"ROOTDIR", Root}],
- cmd(Cmd, Env),
- fix_key_file(OpenSSLCmd, KeyFile).
+ Env = [{"ROOTDIR", filename:absname(Root)}],
+ cmd(Cmd, Env).
+ %fix_key_file(KeyFile).
+
-sign_req(Root, OpenSSLCmd, CA, CertType, ReqFile, CertFile) ->
+sign_req(Root, CA, CertType, ReqFile, CertFile, C) ->
CACnfFile = filename:join([Root, CA, "ca.cnf"]),
- Cmd = [OpenSSLCmd, " ca"
+ Cmd = [C#config.openssl_cmd, " ca"
" -batch"
" -notext"
" -config ", CACnfFile,
" -extensions ", CertType,
" -in ", ReqFile,
" -out ", CertFile],
- Env = [{"ROOTDIR", Root}],
+ Env = [{"ROOTDIR", filename:absname(Root)}],
cmd(Cmd, Env).
%%
@@ -194,19 +314,19 @@ cmd(Cmd, Env) ->
FCmd = lists:flatten(Cmd),
Port = open_port({spawn, FCmd}, [stream, eof, exit_status, stderr_to_stdout,
{env, Env}]),
- eval_cmd(Port).
+ eval_cmd(Port, FCmd).
-eval_cmd(Port) ->
+eval_cmd(Port, Cmd) ->
receive
{Port, {data, _}} ->
- eval_cmd(Port);
+ eval_cmd(Port, Cmd);
{Port, eof} ->
ok
end,
receive
{Port, {exit_status, Status}} when Status /= 0 ->
%% io:fwrite("exit status: ~w~n", [Status]),
- exit({eval_cmd, Status})
+ exit({eval_cmd, Cmd, Status})
after 0 ->
ok
end.
@@ -215,7 +335,7 @@ eval_cmd(Port) ->
%% Contents of configuration files
%%
-req_cnf(DN) ->
+req_cnf(C) ->
["# Purpose: Configuration for requests (end users and CAs)."
"\n"
"ROOTDIR = $ENV::ROOTDIR\n"
@@ -224,10 +344,10 @@ req_cnf(DN) ->
"[req]\n"
"input_password = secret\n"
"output_password = secret\n"
- "default_bits = 1024\n"
+ "default_bits = ", integer_to_list(C#config.default_bits), "\n"
"RANDFILE = $ROOTDIR/RAND\n"
"encrypt_key = no\n"
- "default_md = sha1\n"
+ "default_md = md5\n"
"#string_mask = pkix\n"
"x509_extensions = ca_ext\n"
"prompt = no\n"
@@ -235,12 +355,12 @@ req_cnf(DN) ->
"\n"
"[name]\n"
- "commonName = ", DN#dn.commonName, "\n"
- "organizationalUnitName = ", DN#dn.organizationalUnitName, "\n"
- "organizationName = ", DN#dn.organizationName, "\n"
- "localityName = ", DN#dn.localityName, "\n"
- "countryName = ", DN#dn.countryName, "\n"
- "emailAddress = ", DN#dn.emailAddress, "\n"
+ "commonName = ", C#config.commonName, "\n"
+ "organizationalUnitName = ", C#config.organizationalUnitName, "\n"
+ "organizationName = ", C#config.organizationName, "\n"
+ "localityName = ", C#config.localityName, "\n"
+ "countryName = ", C#config.countryName, "\n"
+ "emailAddress = ", C#config.emailAddress, "\n"
"\n"
"[ca_ext]\n"
@@ -249,8 +369,7 @@ req_cnf(DN) ->
"subjectKeyIdentifier = hash\n"
"subjectAltName = email:copy\n"].
-
-ca_cnf(CA) ->
+ca_cnf(C) ->
["# Purpose: Configuration for CAs.\n"
"\n"
"ROOTDIR = $ENV::ROOTDIR\n"
@@ -258,21 +377,23 @@ ca_cnf(CA) ->
"\n"
"[ca]\n"
- "dir = $ROOTDIR/", CA, "\n"
+ "dir = $ROOTDIR/", C#config.commonName, "\n"
"certs = $dir/certs\n"
"crl_dir = $dir/crl\n"
"database = $dir/index.txt\n"
"new_certs_dir = $dir/newcerts\n"
"certificate = $dir/cert.pem\n"
"serial = $dir/serial\n"
- "crl = $dir/crl.pem\n"
+ "crl = $dir/crl.pem\n",
+ ["crlnumber = $dir/crlnumber\n" || C#config.v2_crls],
"private_key = $dir/private/key.pem\n"
"RANDFILE = $dir/private/RAND\n"
"\n"
- "x509_extensions = user_cert\n"
+ "x509_extensions = user_cert\n",
+ ["crl_extensions = crl_ext\n" || C#config.v2_crls],
"unique_subject = no\n"
"default_days = 3600\n"
- "default_md = sha1\n"
+ "default_md = md5\n"
"preserve = no\n"
"policy = policy_match\n"
"\n"
@@ -286,6 +407,13 @@ ca_cnf(CA) ->
"emailAddress = supplied\n"
"\n"
+ "[crl_ext]\n"
+ "authorityKeyIdentifier=keyid:always,issuer:always\n",
+ ["issuingDistributionPoint=critical, @idpsec\n" || C#config.issuing_distribution_point],
+
+ "[idpsec]\n"
+ "fullname=URI:http://localhost:8000/",C#config.commonName,"/crl.pem\n"
+
"[user_cert]\n"
"basicConstraints = CA:false\n"
"keyUsage = nonRepudiation, digitalSignature, keyEncipherment\n"
@@ -293,6 +421,12 @@ ca_cnf(CA) ->
"authorityKeyIdentifier = keyid,issuer:always\n"
"subjectAltName = email:copy\n"
"issuerAltName = issuer:copy\n"
+ "crlDistributionPoints=@crl_section\n"
+
+ "[crl_section]\n"
+ %% intentionally invalid
+ "URI.1=http://localhost/",C#config.commonName,"/crl.pem\n"
+ "URI.2=http://localhost:",integer_to_list(C#config.crl_port),"/",C#config.commonName,"/crl.pem\n"
"\n"
"[user_cert_digital_signature_only]\n"
@@ -310,4 +444,7 @@ ca_cnf(CA) ->
"subjectKeyIdentifier = hash\n"
"authorityKeyIdentifier = keyid:always,issuer:always\n"
"subjectAltName = email:copy\n"
- "issuerAltName = issuer:copy\n"].
+ "issuerAltName = issuer:copy\n"
+ "crlDistributionPoints=@crl_section\n"
+ ].
+
diff --git a/lib/ssl/test/ssl_basic_SUITE.erl b/lib/ssl/test/ssl_basic_SUITE.erl
index 54029ebe6d..2f440f1f3c 100644
--- a/lib/ssl/test/ssl_basic_SUITE.erl
+++ b/lib/ssl/test/ssl_basic_SUITE.erl
@@ -1,7 +1,7 @@
%%
%% %CopyrightBegin%
%%
-%% Copyright Ericsson AB 2007-2013. All Rights Reserved.
+%% Copyright Ericsson AB 2007-2014. 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
@@ -84,8 +84,10 @@ all_versions_groups ()->
basic_tests() ->
[app,
+ appup,
alerts,
send_close,
+ version_option,
connect_twice,
connect_dist,
clear_pem_cache
@@ -94,6 +96,7 @@ basic_tests() ->
options_tests() ->
[der_input,
misc_ssl_options,
+ ssl_options_not_proplist,
socket_options,
invalid_inet_get_option,
invalid_inet_get_option_not_list,
@@ -110,7 +113,13 @@ options_tests() ->
empty_protocol_versions,
ipv6,
reuseaddr,
- tcp_reuseaddr].
+ tcp_reuseaddr,
+ honor_server_cipher_order,
+ honor_client_cipher_order,
+ ciphersuite_vs_version,
+ unordered_protocol_versions_server,
+ unordered_protocol_versions_client
+].
api_tests() ->
[connection_info,
@@ -130,7 +139,10 @@ api_tests() ->
listen_socket,
ssl_accept_timeout,
ssl_recv_timeout,
- versions_option
+ versions_option,
+ server_name_indication_option,
+ accept_pool,
+ new_options_in_accept
].
session_tests() ->
@@ -143,6 +155,7 @@ session_tests() ->
renegotiate_tests() ->
[client_renegotiate,
server_renegotiate,
+ client_secure_renegotiate,
client_renegotiate_reused_session,
server_renegotiate_reused_session,
client_no_wrap_sequence_number,
@@ -178,7 +191,11 @@ error_handling_tests()->
tcp_error_propagation_in_active_mode,
tcp_connect,
tcp_connect_big,
- close_transport_accept
+ close_transport_accept,
+ recv_active,
+ recv_active_once,
+ recv_error_handling,
+ dont_crash_on_handshake_garbage
].
rizzo_tests() ->
@@ -231,6 +248,14 @@ end_per_group(_GroupName, Config) ->
Config.
%%--------------------------------------------------------------------
+init_per_testcase(Case, Config) when Case == unordered_protocol_versions_client;
+ Case == unordered_protocol_versions_server->
+ case proplists:get_value(supported, ssl:versions()) of
+ ['tlsv1.2' | _] ->
+ Config;
+ _ ->
+ {skip, "TLS 1.2 need but not supported on this platform"}
+ end;
init_per_testcase(no_authority_key_identifier, Config) ->
%% Clear cach so that root cert will not
%% be found.
@@ -286,6 +311,11 @@ app() ->
app(Config) when is_list(Config) ->
ok = ?t:app_test(ssl).
%%--------------------------------------------------------------------
+appup() ->
+ [{doc, "Test that the ssl appup file is ok"}].
+appup(Config) when is_list(Config) ->
+ ok = ?t:appup_test(ssl).
+%%--------------------------------------------------------------------
alerts() ->
[{doc, "Test ssl_alert:alert_txt/1"}].
alerts(Config) when is_list(Config) ->
@@ -296,7 +326,11 @@ alerts(Config) when is_list(Config) ->
?ILLEGAL_PARAMETER, ?UNKNOWN_CA, ?ACCESS_DENIED, ?DECODE_ERROR,
?DECRYPT_ERROR, ?EXPORT_RESTRICTION, ?PROTOCOL_VERSION,
?INSUFFICIENT_SECURITY, ?INTERNAL_ERROR, ?USER_CANCELED,
- ?NO_RENEGOTIATION],
+ ?NO_RENEGOTIATION, ?UNSUPPORTED_EXTENSION, ?CERTIFICATE_UNOBTAINABLE,
+ ?UNRECOGNISED_NAME, ?BAD_CERTIFICATE_STATUS_RESPONSE,
+ ?BAD_CERTIFICATE_HASH_VALUE, ?UNKNOWN_PSK_IDENTITY,
+ 255 %% Unsupported/unknow alert will result in a description too
+ ],
Alerts = [?ALERT_REC(?WARNING, ?CLOSE_NOTIFY) |
[?ALERT_REC(?FATAL, Desc) || Desc <- Descriptions]],
lists:foreach(fun(Alert) ->
@@ -308,6 +342,38 @@ alerts(Config) when is_list(Config) ->
end
end, Alerts).
%%--------------------------------------------------------------------
+new_options_in_accept() ->
+ [{doc,"Test that you can set ssl options in ssl_accept/3 and not tcp upgrade"}].
+new_options_in_accept(Config) when is_list(Config) ->
+ ClientOpts = ?config(client_opts, Config),
+ ServerOpts0 = ?config(server_dsa_opts, Config),
+ [_ , _ | ServerSslOpts] = ?config(server_opts, Config), %% Remove non ssl opts
+ {ClientNode, ServerNode, Hostname} = ssl_test_lib:run_where(Config),
+ Server = ssl_test_lib:start_server([{node, ServerNode}, {port, 0},
+ {from, self()},
+ {ssl_extra_opts, [{versions, [sslv3]},
+ {ciphers,[{rsa,rc4_128,sha}]} | ServerSslOpts]}, %% To be set in ssl_accept/3
+ {mfa, {?MODULE, connection_info_result, []}},
+ {options, proplists:delete(cacertfile, ServerOpts0)}]),
+
+ Port = ssl_test_lib:inet_port(Server),
+ Client = ssl_test_lib:start_client([{node, ClientNode}, {port, Port},
+ {host, Hostname},
+ {from, self()},
+ {mfa, {?MODULE, connection_info_result, []}},
+ {options, [{versions, [sslv3]} | ClientOpts]}]),
+
+ ct:log("Testcase ~p, Client ~p Server ~p ~n",
+ [self(), Client, Server]),
+
+ ServerMsg = ClientMsg = {ok, {sslv3, {rsa, rc4_128, sha}}},
+
+ ssl_test_lib:check_result(Server, ServerMsg, Client, ClientMsg),
+
+ ssl_test_lib:close(Server),
+ ssl_test_lib:close(Client).
+%%--------------------------------------------------------------------
+
connection_info() ->
[{doc,"Test the API function ssl:connection_info/1"}].
connection_info(Config) when is_list(Config) ->
@@ -347,6 +413,7 @@ protocol_versions() ->
protocol_versions(Config) when is_list(Config) ->
basic_test(Config).
+
%%--------------------------------------------------------------------
empty_protocol_versions() ->
[{doc,"Test to set an empty list of protocol versions in app environment."}].
@@ -978,7 +1045,7 @@ misc_ssl_options(Config) when is_list(Config) ->
ServerOpts = ?config(server_opts, Config),
{ClientNode, ServerNode, Hostname} = ssl_test_lib:run_where(Config),
- %% Chek that ssl options not tested elsewhere are filtered away e.i. not passed to inet.
+ %% Check that ssl options not tested elsewhere are filtered away e.i. not passed to inet.
TestOpts = [{depth, 1},
{key, undefined},
{password, []},
@@ -1006,6 +1073,17 @@ misc_ssl_options(Config) when is_list(Config) ->
ssl_test_lib:close(Client).
%%--------------------------------------------------------------------
+ssl_options_not_proplist() ->
+ [{doc,"Test what happens if an option is not a key value tuple"}].
+
+ssl_options_not_proplist(Config) when is_list(Config) ->
+ BadOption = {client_preferred_next_protocols,
+ client, [<<"spdy/3">>,<<"http/1.1">>], <<"http/1.1">>},
+ {option_not_a_key_value_tuple, BadOption} =
+ ssl:connect("twitter.com", 443, [binary, {active, false},
+ BadOption]).
+
+%%--------------------------------------------------------------------
versions() ->
[{doc,"Test API function versions/0"}].
@@ -1067,6 +1145,13 @@ send_close(Config) when is_list(Config) ->
{error, _} = ssl:send(SslS, "Hello world").
%%--------------------------------------------------------------------
+version_option() ->
+ [{doc, "Use version option and do no specify ciphers list. Bug specified incorrect ciphers"}].
+version_option(Config) when is_list(Config) ->
+ Versions = proplists:get_value(supported, ssl:versions()),
+ [version_option_test(Config, Version) || Version <- Versions].
+
+%%--------------------------------------------------------------------
close_transport_accept() ->
[{doc,"Tests closing ssl socket when waiting on ssl:transport_accept/1"}].
@@ -1087,6 +1172,57 @@ close_transport_accept(Config) when is_list(Config) ->
Other ->
exit({?LINE, Other})
end.
+%%--------------------------------------------------------------------
+recv_active() ->
+ [{doc,"Test recv on active socket"}].
+
+recv_active(Config) when is_list(Config) ->
+ ClientOpts = ?config(client_opts, Config),
+ ServerOpts = ?config(server_opts, Config),
+ {ClientNode, ServerNode, Hostname} = ssl_test_lib:run_where(Config),
+ Server =
+ ssl_test_lib:start_server([{node, ServerNode}, {port, 0},
+ {from, self()},
+ {mfa, {?MODULE, try_recv_active, []}},
+ {options, [{active, true} | ServerOpts]}]),
+ Port = ssl_test_lib:inet_port(Server),
+ Client =
+ ssl_test_lib:start_client([{node, ClientNode}, {port, Port},
+ {host, Hostname},
+ {from, self()},
+ {mfa, {?MODULE, try_recv_active, []}},
+ {options, [{active, true} | ClientOpts]}]),
+
+ ssl_test_lib:check_result(Server, ok, Client, ok),
+
+ ssl_test_lib:close(Server),
+ ssl_test_lib:close(Client).
+
+%%--------------------------------------------------------------------
+recv_active_once() ->
+ [{doc,"Test recv on active socket"}].
+
+recv_active_once(Config) when is_list(Config) ->
+ ClientOpts = ?config(client_opts, Config),
+ ServerOpts = ?config(server_opts, Config),
+ {ClientNode, ServerNode, Hostname} = ssl_test_lib:run_where(Config),
+ Server =
+ ssl_test_lib:start_server([{node, ServerNode}, {port, 0},
+ {from, self()},
+ {mfa, {?MODULE, try_recv_active_once, []}},
+ {options, [{active, once} | ServerOpts]}]),
+ Port = ssl_test_lib:inet_port(Server),
+ Client =
+ ssl_test_lib:start_client([{node, ClientNode}, {port, Port},
+ {host, Hostname},
+ {from, self()},
+ {mfa, {?MODULE, try_recv_active_once, []}},
+ {options, [{active, once} | ClientOpts]}]),
+
+ ssl_test_lib:check_result(Server, ok, Client, ok),
+
+ ssl_test_lib:close(Server),
+ ssl_test_lib:close(Client).
%%--------------------------------------------------------------------
dh_params() ->
@@ -1110,7 +1246,7 @@ dh_params(Config) when is_list(Config) ->
{from, self()},
{mfa, {ssl_test_lib, send_recv_result_active, []}},
{options,
- [{ciphers,[{dhe_rsa,aes_256_cbc,sha,ignore}]} |
+ [{ciphers,[{dhe_rsa,aes_256_cbc,sha}]} |
ClientOpts]}]),
ssl_test_lib:check_result(Server, ok, Client, ok),
@@ -1209,7 +1345,7 @@ tcp_connect() ->
tcp_connect(Config) when is_list(Config) ->
ServerOpts = ?config(server_opts, Config),
{_, ServerNode, Hostname} = ssl_test_lib:run_where(Config),
- TcpOpts = [binary, {reuseaddr, true}],
+ TcpOpts = [binary, {reuseaddr, true}, {active, false}],
Server = ssl_test_lib:start_upgrade_server_error([{node, ServerNode}, {port, 0},
{from, self()},
@@ -1978,6 +2114,37 @@ client_renegotiate(Config) when is_list(Config) ->
ssl_test_lib:close(Client).
%%--------------------------------------------------------------------
+client_secure_renegotiate() ->
+ [{doc,"Test ssl:renegotiate/1 on client."}].
+client_secure_renegotiate(Config) when is_list(Config) ->
+ ServerOpts = ?config(server_opts, Config),
+ ClientOpts = ?config(client_opts, Config),
+
+ {ClientNode, ServerNode, Hostname} = ssl_test_lib:run_where(Config),
+
+ Data = "From erlang to erlang",
+
+ Server =
+ ssl_test_lib:start_server([{node, ServerNode}, {port, 0},
+ {from, self()},
+ {mfa, {?MODULE, erlang_ssl_receive, [Data]}},
+ {options, [{secure_renegotiate, true} | ServerOpts]}]),
+ Port = ssl_test_lib:inet_port(Server),
+
+ Client = ssl_test_lib:start_client([{node, ClientNode}, {port, Port},
+ {host, Hostname},
+ {from, self()},
+ {mfa, {?MODULE,
+ renegotiate, [Data]}},
+ {options, [{reuse_sessions, false},
+ {secure_renegotiate, true}| ClientOpts]}]),
+
+ ssl_test_lib:check_result(Client, ok, Server, ok),
+ ssl_test_lib:close(Server),
+ ssl_test_lib:close(Client).
+
+
+%%--------------------------------------------------------------------
server_renegotiate() ->
[{doc,"Test ssl:renegotiate/1 on server."}].
server_renegotiate(Config) when is_list(Config) ->
@@ -2164,7 +2331,14 @@ der_input(Config) when is_list(Config) ->
ssl_test_lib:check_result(Server, ok, Client, ok),
ssl_test_lib:close(Server),
- ssl_test_lib:close(Client).
+ ssl_test_lib:close(Client),
+
+ {status, _, _, StatusInfo} = sys:get_status(whereis(ssl_manager)),
+ [_, _,_, _, Prop] = StatusInfo,
+ State = ssl_test_lib:state(Prop),
+ [CADb | _] = element(5, State),
+ [] = ets:tab2list(CADb).
+
%%--------------------------------------------------------------------
der_input_opts(Opts) ->
Certfile = proplists:get_value(certfile, Opts),
@@ -2410,6 +2584,126 @@ tcp_reuseaddr(Config) when is_list(Config) ->
%%--------------------------------------------------------------------
+honor_server_cipher_order() ->
+ [{doc,"Test API honor server cipher order."}].
+honor_server_cipher_order(Config) when is_list(Config) ->
+ ClientCiphers = [{rsa, aes_128_cbc, sha}, {rsa, aes_256_cbc, sha}],
+ ServerCiphers = [{rsa, aes_256_cbc, sha}, {rsa, aes_128_cbc, sha}],
+honor_cipher_order(Config, true, ServerCiphers, ClientCiphers, {rsa, aes_256_cbc, sha}).
+
+honor_client_cipher_order() ->
+ [{doc,"Test API honor server cipher order."}].
+honor_client_cipher_order(Config) when is_list(Config) ->
+ ClientCiphers = [{rsa, aes_128_cbc, sha}, {rsa, aes_256_cbc, sha}],
+ ServerCiphers = [{rsa, aes_256_cbc, sha}, {rsa, aes_128_cbc, sha}],
+honor_cipher_order(Config, false, ServerCiphers, ClientCiphers, {rsa, aes_128_cbc, sha}).
+
+honor_cipher_order(Config, Honor, ServerCiphers, ClientCiphers, Expected) ->
+ ClientOpts = ?config(client_opts, Config),
+ ServerOpts = ?config(server_opts, Config),
+
+ {ClientNode, ServerNode, Hostname} = ssl_test_lib:run_where(Config),
+
+ Server = ssl_test_lib:start_server([{node, ServerNode}, {port, 0},
+ {from, self()},
+ {mfa, {?MODULE, connection_info_result, []}},
+ {options, [{ciphers, ServerCiphers}, {honor_cipher_order, Honor}
+ | ServerOpts]}]),
+ Port = ssl_test_lib:inet_port(Server),
+ Client = ssl_test_lib:start_client([{node, ClientNode}, {port, Port},
+ {host, Hostname},
+ {from, self()},
+ {mfa, {?MODULE, connection_info_result, []}},
+ {options, [{ciphers, ClientCiphers}, {honor_cipher_order, Honor}
+ | ClientOpts]}]),
+
+ Version =
+ tls_record:protocol_version(tls_record:highest_protocol_version([])),
+
+ ServerMsg = ClientMsg = {ok, {Version, Expected}},
+
+ ssl_test_lib:check_result(Server, ServerMsg, Client, ClientMsg),
+
+ ssl_test_lib:close(Server),
+ ssl_test_lib:close(Client).
+
+%%--------------------------------------------------------------------
+ciphersuite_vs_version(Config) when is_list(Config) ->
+
+ {_ClientNode, ServerNode, Hostname} = ssl_test_lib:run_where(Config),
+ ServerOpts = ?config(server_opts, Config),
+
+ Server = ssl_test_lib:start_server_error([{node, ServerNode}, {port, 0},
+ {from, self()},
+ {options, ServerOpts}]),
+ Port = ssl_test_lib:inet_port(Server),
+
+ {ok, Socket} = gen_tcp:connect(Hostname, Port, [binary, {active, false}]),
+ ok = gen_tcp:send(Socket,
+ <<22, 3,0, 49:16, % handshake, SSL 3.0, length
+ 1, 45:24, % client_hello, length
+ 3,0, % SSL 3.0
+ 16#deadbeef:256, % 32 'random' bytes = 256 bits
+ 0, % no session ID
+ %% three cipher suites -- null, one with sha256 hash and one with sha hash
+ 6:16, 0,255, 0,61, 0,57,
+ 1, 0 % no compression
+ >>),
+ {ok, <<22, RecMajor:8, RecMinor:8, _RecLen:16, 2, HelloLen:24>>} = gen_tcp:recv(Socket, 9, 10000),
+ {ok, <<HelloBin:HelloLen/binary>>} = gen_tcp:recv(Socket, HelloLen, 5000),
+ ServerHello = tls_handshake:decode_handshake({RecMajor, RecMinor}, 2, HelloBin),
+ case ServerHello of
+ #server_hello{server_version = {3,0}, cipher_suite = <<0,57>>} ->
+ ok;
+ _ ->
+ ct:fail({unexpected_server_hello, ServerHello})
+ end.
+
+%%--------------------------------------------------------------------
+
+dont_crash_on_handshake_garbage() ->
+ [{doc, "Ensure SSL server worker thows an alert on garbage during handshake "
+ "instead of crashing and exposing state to user code"}].
+
+dont_crash_on_handshake_garbage(Config) ->
+ ServerOpts = ?config(server_opts, Config),
+
+ {_ClientNode, ServerNode, Hostname} = ssl_test_lib:run_where(Config),
+
+ Server = ssl_test_lib:start_server([{node, ServerNode}, {port, 0},
+ {from, self()},
+ {mfa, {ssl_test_lib, send_recv_result_active, []}},
+ {options, ServerOpts}]),
+ unlink(Server), monitor(process, Server),
+ Port = ssl_test_lib:inet_port(Server),
+
+ {ok, Socket} = gen_tcp:connect(Hostname, Port, [binary, {active, false}]),
+
+ % Send hello and garbage record
+ ok = gen_tcp:send(Socket,
+ [<<22, 3,3, 49:16, 1, 45:24, 3,3, % client_hello
+ 16#deadbeef:256, % 32 'random' bytes = 256 bits
+ 0, 6:16, 0,255, 0,61, 0,57, 1, 0 >>, % some hello values
+
+ <<22, 3,3, 5:16, 92,64,37,228,209>> % garbage
+ ]),
+ % Send unexpected change_cipher_spec
+ ok = gen_tcp:send(Socket, <<20, 0,0,12, 111,40,244,7,137,224,16,109,197,110,249,152>>),
+
+ % Ensure we receive an alert, not sudden disconnect
+ {ok, <<21, _/binary>>} = drop_handshakes(Socket, 1000).
+
+drop_handshakes(Socket, Timeout) ->
+ {ok, <<RecType:8, _RecMajor:8, _RecMinor:8, RecLen:16>> = Header} = gen_tcp:recv(Socket, 5, Timeout),
+ {ok, <<Frag:RecLen/binary>>} = gen_tcp:recv(Socket, RecLen, Timeout),
+ case RecType of
+ 22 -> drop_handshakes(Socket, Timeout);
+ _ -> {ok, <<Header/binary, Frag/binary>>}
+ end.
+
+
+%%--------------------------------------------------------------------
+
hibernate() ->
[{doc,"Check that an SSL connection that is started with option "
"{hibernate_after, 1000} indeed hibernates after 1000ms of "
@@ -2804,6 +3098,145 @@ versions_option(Config) when is_list(Config) ->
end,
ssl_test_lib:check_result(ErrClient, {error, {tls_alert, "protocol version"}}).
+
+
+%%--------------------------------------------------------------------
+unordered_protocol_versions_server() ->
+ [{doc,"Test that the highest protocol is selected even"
+ " when it is not first in the versions list."}].
+
+unordered_protocol_versions_server(Config) when is_list(Config) ->
+ ClientOpts = ?config(client_opts, Config),
+ ServerOpts = ?config(server_opts, Config),
+
+ {ClientNode, ServerNode, Hostname} = ssl_test_lib:run_where(Config),
+ Server = ssl_test_lib:start_server([{node, ServerNode}, {port, 0},
+ {from, self()},
+ {mfa, {?MODULE, connection_info_result, []}},
+ {options, [{versions, ['tlsv1.1', 'tlsv1.2']} | ServerOpts]}]),
+ Port = ssl_test_lib:inet_port(Server),
+
+ Client = ssl_test_lib:start_client([{node, ClientNode}, {port, Port},
+ {host, Hostname},
+ {from, self()},
+ {mfa, {?MODULE, connection_info_result, []}},
+ {options, ClientOpts}]),
+ CipherSuite = first_rsa_suite(ssl:cipher_suites()),
+ ServerMsg = ClientMsg = {ok, {'tlsv1.2', CipherSuite}},
+ ssl_test_lib:check_result(Server, ServerMsg, Client, ClientMsg).
+
+%%--------------------------------------------------------------------
+unordered_protocol_versions_client() ->
+ [{doc,"Test that the highest protocol is selected even"
+ " when it is not first in the versions list."}].
+
+unordered_protocol_versions_client(Config) when is_list(Config) ->
+ ClientOpts = ?config(client_opts, Config),
+ ServerOpts = ?config(server_opts, Config),
+
+ {ClientNode, ServerNode, Hostname} = ssl_test_lib:run_where(Config),
+ Server = ssl_test_lib:start_server([{node, ServerNode}, {port, 0},
+ {from, self()},
+ {mfa, {?MODULE, connection_info_result, []}},
+ {options, ServerOpts }]),
+ Port = ssl_test_lib:inet_port(Server),
+
+ Client = ssl_test_lib:start_client([{node, ClientNode}, {port, Port},
+ {host, Hostname},
+ {from, self()},
+ {mfa, {?MODULE, connection_info_result, []}},
+ {options, [{versions, ['tlsv1.1', 'tlsv1.2']} | ClientOpts]}]),
+
+ CipherSuite = first_rsa_suite(ssl:cipher_suites()),
+ ServerMsg = ClientMsg = {ok, {'tlsv1.2', CipherSuite}},
+ ssl_test_lib:check_result(Server, ServerMsg, Client, ClientMsg).
+
+%%--------------------------------------------------------------------
+
+server_name_indication_option() ->
+ [{doc,"Test API server_name_indication option to connect."}].
+server_name_indication_option(Config) when is_list(Config) ->
+ ClientOpts = ?config(client_opts, Config),
+ ServerOpts = ?config(server_opts, Config),
+
+ {ClientNode, ServerNode, Hostname} = ssl_test_lib:run_where(Config),
+ Server = ssl_test_lib:start_server([{node, ServerNode}, {port, 0},
+ {from, self()},
+ {mfa, {ssl_test_lib, send_recv_result_active, []}},
+ {options, ServerOpts}]),
+ Port = ssl_test_lib:inet_port(Server),
+
+ Client0 = ssl_test_lib:start_client([{node, ClientNode}, {port, Port},
+ {host, Hostname},
+ {from, self()},
+ {mfa, {ssl_test_lib, send_recv_result_active, []}},
+ {options,
+ [{server_name_indication, disable} |
+ ClientOpts]}
+ ]),
+
+ ssl_test_lib:check_result(Server, ok, Client0, ok),
+ Server ! listen,
+
+ Client1 = ssl_test_lib:start_client([{node, ClientNode}, {port, Port},
+ {host, Hostname},
+ {from, self()},
+ {mfa, {ssl_test_lib, send_recv_result_active, []}},
+ {options,
+ [{server_name_indication, Hostname} | ClientOpts]
+ }]),
+ ssl_test_lib:check_result(Server, ok, Client1, ok),
+ ssl_test_lib:close(Server),
+ ssl_test_lib:close(Client0),
+ ssl_test_lib:close(Client1).
+%%--------------------------------------------------------------------
+
+accept_pool() ->
+ [{doc,"Test having an accept pool."}].
+accept_pool(Config) when is_list(Config) ->
+ ClientOpts = ?config(client_opts, Config),
+ ServerOpts = ?config(server_opts, Config),
+
+ {ClientNode, ServerNode, Hostname} = ssl_test_lib:run_where(Config),
+ Server0 = ssl_test_lib:start_server([{node, ServerNode}, {port, 0},
+ {from, self()},
+ {accepters, 3},
+ {mfa, {ssl_test_lib, send_recv_result_active, []}},
+ {options, ServerOpts}]),
+ Port = ssl_test_lib:inet_port(Server0),
+ [Server1, Server2] = ssl_test_lib:accepters(2),
+
+ Client0 = ssl_test_lib:start_client([{node, ClientNode}, {port, Port},
+ {host, Hostname},
+ {from, self()},
+ {mfa, {ssl_test_lib, send_recv_result_active, []}},
+ {options, ClientOpts}
+ ]),
+
+ Client1 = ssl_test_lib:start_client([{node, ClientNode}, {port, Port},
+ {host, Hostname},
+ {from, self()},
+ {mfa, {ssl_test_lib, send_recv_result_active, []}},
+ {options, ClientOpts}
+ ]),
+
+ Client2 = ssl_test_lib:start_client([{node, ClientNode}, {port, Port},
+ {host, Hostname},
+ {from, self()},
+ {mfa, {ssl_test_lib, send_recv_result_active, []}},
+ {options, ClientOpts}
+ ]),
+
+ ssl_test_lib:check_ok([Server0, Server1, Server2, Client0, Client1, Client2]),
+
+ ssl_test_lib:close(Server0),
+ ssl_test_lib:close(Server1),
+ ssl_test_lib:close(Server2),
+ ssl_test_lib:close(Client0),
+ ssl_test_lib:close(Client1),
+ ssl_test_lib:close(Client2).
+
+
%%--------------------------------------------------------------------
%% Internal functions ------------------------------------------------
%%--------------------------------------------------------------------
@@ -3263,7 +3696,7 @@ run_suites(Ciphers, Version, Config, Type) ->
Result = lists:map(fun(Cipher) ->
cipher(Cipher, Version, Config, ClientOpts, ServerOpts) end,
- Ciphers),
+ ssl_test_lib:filter_suites(Ciphers)),
case lists:flatten(Result) of
[] ->
ok;
@@ -3314,6 +3747,10 @@ cipher(CipherSuite, Version, Config, ClientOpts, ServerOpts) ->
connection_info_result(Socket) ->
ssl:connection_info(Socket).
+version_info_result(Socket) ->
+ {ok, {Version, _}} = ssl:connection_info(Socket),
+ {ok, Version}.
+
connect_dist_s(S) ->
Msg = term_to_binary({erlang,term}),
ok = ssl:send(S, Msg).
@@ -3366,3 +3803,47 @@ shutdown_both_result(Socket, client) ->
peername_result(S) ->
ssl:peername(S).
+
+version_option_test(Config, Version) ->
+ ClientOpts = ?config(client_opts, Config),
+ ServerOpts = ?config(server_opts, Config),
+ {ClientNode, ServerNode, Hostname} = ssl_test_lib:run_where(Config),
+ Server =
+ ssl_test_lib:start_server([{node, ServerNode}, {port, 0},
+ {from, self()},
+ {mfa, {ssl_test_lib, send_recv_result, []}},
+ {options, [{active, false}, {versions, [Version]}| ServerOpts]}]),
+ Port = ssl_test_lib:inet_port(Server),
+ Client =
+ ssl_test_lib:start_client([{node, ClientNode}, {port, Port},
+ {host, Hostname},
+ {from, self()},
+ {mfa, {ssl_test_lib, send_recv_result, []}},
+ {options, [{active, false}, {versions, [Version]}| ClientOpts]}]),
+
+ ct:log("Testcase ~p, Client ~p Server ~p ~n",
+ [self(), Client, Server]),
+
+ ssl_test_lib:check_result(Server, ok, Client, ok),
+
+ ssl_test_lib:close(Server),
+ ssl_test_lib:close(Client).
+
+try_recv_active(Socket) ->
+ ssl:send(Socket, "Hello world"),
+ {error, einval} = ssl:recv(Socket, 11),
+ ok.
+try_recv_active_once(Socket) ->
+ {error, einval} = ssl:recv(Socket, 11),
+ ok.
+
+first_rsa_suite([{ecdhe_rsa, _, _} = Suite | _]) ->
+ Suite;
+first_rsa_suite([{dhe_rsa, _, _} = Suite| _]) ->
+ Suite;
+first_rsa_suite([{rsa, _, _} = Suite| _]) ->
+ Suite;
+first_rsa_suite([_ | Rest]) ->
+ first_rsa_suite(Rest).
+
+
diff --git a/lib/ssl/test/ssl_crl_SUITE.erl b/lib/ssl/test/ssl_crl_SUITE.erl
new file mode 100644
index 0000000000..bad0949ec4
--- /dev/null
+++ b/lib/ssl/test/ssl_crl_SUITE.erl
@@ -0,0 +1,542 @@
+%%
+%% %CopyrightBegin%
+%%
+%% Copyright Ericsson AB 2008-2013. 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(ssl_crl_SUITE).
+
+%% Note: This directive should only be used in test suites.
+-compile(export_all).
+
+-include_lib("common_test/include/ct.hrl").
+-include_lib("public_key/include/public_key.hrl").
+
+-define(TIMEOUT, 120000).
+-define(LONG_TIMEOUT, 600000).
+-define(SLEEP, 1000).
+-define(OPENSSL_RENEGOTIATE, "R\n").
+-define(OPENSSL_QUIT, "Q\n").
+-define(OPENSSL_GARBAGE, "P\n").
+-define(EXPIRE, 10).
+
+%%--------------------------------------------------------------------
+%% Common Test interface functions -----------------------------------
+%%--------------------------------------------------------------------
+
+suite() -> [{ct_hooks,[ts_install_cth]}].
+
+all() ->
+ [
+ {group, basic},
+ {group, v1_crl},
+ {group, idp_crl}
+ ].
+
+groups() ->
+ [{basic, [], basic_tests()},
+ {v1_crl, [], v1_crl_tests()},
+ {idp_crl, [], idp_crl_tests()}].
+
+basic_tests() ->
+ [crl_verify_valid, crl_verify_revoked].
+
+v1_crl_tests() ->
+ [crl_verify_valid, crl_verify_revoked].
+
+idp_crl_tests() ->
+ [crl_verify_valid, crl_verify_revoked].
+
+%%%================================================================
+%%% Suite init/end
+
+init_per_suite(Config0) ->
+ Dog = ct:timetrap(?LONG_TIMEOUT *2),
+ case os:find_executable("openssl") of
+ false ->
+ {skip, "Openssl not found"};
+ _ ->
+ TLSVersion = ?config(tls_version, Config0),
+ OpenSSL_version = (catch os:cmd("openssl version")),
+ ct:log("TLS version: ~p~nOpenSSL version: ~p~n~n~p:module_info(): ~p~n~nssl:module_info(): ~p~n",
+ [TLSVersion, OpenSSL_version, ?MODULE, ?MODULE:module_info(), ssl:module_info()]),
+ case ssl_test_lib:enough_openssl_crl_support(OpenSSL_version) of
+ false ->
+ {skip, io_lib:format("Bad openssl version: ~p",[OpenSSL_version])};
+ _ ->
+ catch crypto:stop(),
+ try crypto:start() of
+ ok ->
+ ssl:start(),
+ {ok, Hostname0} = inet:gethostname(),
+ IPfamily =
+ case lists:member(list_to_atom(Hostname0), ct:get_config(ipv6_hosts,[])) of
+ true -> inet6;
+ false -> inet
+ end,
+ [{ipfamily,IPfamily}, {watchdog, Dog}, {openssl_version,OpenSSL_version} | Config0]
+ catch _C:_E ->
+ ct:log("crypto:start() caught ~p:~p",[_C,_E]),
+ {skip, "Crypto did not start"}
+ end
+ end
+ end.
+
+end_per_suite(_Config) ->
+ ssl:stop(),
+ application:stop(crypto).
+
+%%%================================================================
+%%% Group init/end
+
+init_per_group(Group, Config) ->
+ ssl:start(),
+ inets:start(),
+ CertDir = filename:join(?config(priv_dir, Config), Group),
+ DataDir = ?config(data_dir, Config),
+ ServerRoot = make_dir_path([?config(priv_dir,Config), Group, tmp]),
+ %% start a HTTP server to serve the CRLs
+ {ok, Httpd} = inets:start(httpd, [{ipfamily, ?config(ipfamily,Config)},
+ {server_name, "localhost"}, {port, 0},
+ {server_root, ServerRoot},
+ {document_root, CertDir},
+ {modules, [mod_get]}
+ ]),
+ [{port,Port}] = httpd:info(Httpd, [port]),
+ ct:log("~p:~p~nHTTPD IP family=~p, port=~p~n", [?MODULE, ?LINE, ?config(ipfamily,Config), Port]),
+ CertOpts = [{crl_port,Port}|cert_opts(Group)],
+ Result = make_certs:all(DataDir, CertDir, CertOpts),
+ ct:log("~p:~p~nmake_certs:all(~n DataDir=~p,~n CertDir=~p,~n ServerRoot=~p~n Opts=~p~n) returned ~p~n", [?MODULE,?LINE,DataDir, CertDir, ServerRoot, CertOpts, Result]),
+ [{make_cert_result, Result}, {cert_dir, CertDir}, {httpd, Httpd} | Config].
+
+cert_opts(v1_crl) -> [{v2_crls, false}];
+cert_opts(idp_crl) -> [{issuing_distribution_point, true}];
+cert_opts(_) -> [].
+
+make_dir_path(PathComponents) ->
+ lists:foldl(fun(F,P0) -> file:make_dir(P=filename:join(P0,F)), P end,
+ "",
+ PathComponents).
+
+
+end_per_group(_GroupName, Config) ->
+ case ?config(httpd, Config) of
+ undefined -> ok;
+ Pid ->
+ ct:log("Stop httpd ~p",[Pid]),
+ ok = inets:stop(httpd, Pid)
+ ,ct:log("Stopped",[])
+ end,
+ inets:stop(),
+ Config.
+
+%%%================================================================
+%%% Test cases
+
+crl_verify_valid() ->
+ [{doc,"Verify a simple valid CRL chain"}].
+crl_verify_valid(Config) when is_list(Config) ->
+ process_flag(trap_exit, true),
+ PrivDir = ?config(cert_dir, Config),
+ ServerOpts = [{keyfile, filename:join([PrivDir, "server", "key.pem"])},
+ {certfile, filename:join([PrivDir, "server", "cert.pem"])},
+ {cacertfile, filename:join([PrivDir, "server", "cacerts.pem"])}],
+
+ {ClientNode, ServerNode, Hostname} = ssl_test_lib:run_where(Config),
+ Data = "From openssl to erlang",
+
+ Server = ssl_test_lib:start_server([{node, ServerNode}, {port, 0},
+ {from, self()},
+ {mfa, {?MODULE, erlang_ssl_receive, [Data]}},
+ %{mfa, {ssl_test_lib, no_result, []}},
+ {options, ServerOpts}]),
+ ct:log("~p:~p~nreturn from ssl_test_lib:start_server:~n~p",[?MODULE,?LINE,Server]),
+ Port = ssl_test_lib:inet_port(Server),
+
+ CACerts = load_cert(filename:join([PrivDir, "erlangCA", "cacerts.pem"])),
+
+ ClientOpts = [{cacerts, CACerts},
+ {verify, verify_peer},
+ {verify_fun, {fun validate_function/3, {CACerts, []}}}],
+
+
+ ct:log("~p:~p~ncalling ssl_test_lib:start_client",[?MODULE,?LINE]),
+ Client = ssl_test_lib:start_client([{node, ClientNode}, {port, Port},
+ {host, Hostname},
+ {from, self()},
+ {mfa, {?MODULE,
+ erlang_ssl_send, [Data]}},
+ %{mfa, {ssl_test_lib, no_result, []}},
+ {options, ClientOpts}]),
+ ct:log("~p:~p~nreturn from ssl_test_lib:start_client:~n~p",[?MODULE,?LINE,Client]),
+
+ ssl_test_lib:check_result(Client, ok, Server, ok),
+
+ %% Clean close down! Server needs to be closed first !!
+ ssl_test_lib:close(Server),
+ ssl_test_lib:close(Client),
+ process_flag(trap_exit, false).
+
+crl_verify_revoked() ->
+ [{doc,"Verify a simple valid CRL chain"}].
+crl_verify_revoked(Config) when is_list(Config) ->
+ process_flag(trap_exit, true),
+ PrivDir = ?config(cert_dir, Config),
+ ServerOpts = [{keyfile, filename:join([PrivDir, "revoked", "key.pem"])},
+ {certfile, filename:join([PrivDir, "revoked", "cert.pem"])},
+ {cacertfile, filename:join([PrivDir, "revoked", "cacerts.pem"])}],
+ ct:log("~p:~p~nserver opts ~p~n", [?MODULE,?LINE, ServerOpts]),
+
+ {ClientNode, ServerNode, Hostname} = ssl_test_lib:run_where(Config),
+
+ Server = ssl_test_lib:start_server([{node, ServerNode}, {port, 0},
+ {from, self()},
+ %{mfa, {?MODULE, erlang_ssl_receive, [Data]}},
+ {mfa, {ssl_test_lib, no_result, []}},
+ {options, ServerOpts}]),
+ Port = ssl_test_lib:inet_port(Server),
+
+ CACerts = load_cert(filename:join([PrivDir, "erlangCA", "cacerts.pem"])),
+ ClientOpts = [{cacerts, CACerts},
+ {verify, verify_peer},
+ {verify_fun, {fun validate_function/3, {CACerts, []}}}],
+
+ {connect_failed, _} = ssl_test_lib:start_client([{node, ClientNode}, {port, Port},
+ {host, Hostname},
+ {from, self()},
+ %{mfa, {?MODULE,
+ %erlang_ssl_receive, [Data]}},
+ {mfa, {ssl_test_lib, no_result, []}},
+ {options, ClientOpts}]),
+
+ %% Clean close down! Server needs to be closed first !!
+ ssl_test_lib:close(Server),
+ process_flag(trap_exit, false).
+
+%%%================================================================
+%%% Lib
+
+erlang_ssl_receive(Socket, Data) ->
+ ct:log("~p:~p~nConnection info: ~p~n",
+ [?MODULE,?LINE, ssl:connection_info(Socket)]),
+ receive
+ {ssl, Socket, Data} ->
+ ct:log("~p:~p~nReceived ~p~n",[?MODULE,?LINE, Data]),
+ %% open_ssl server sometimes hangs waiting in blocking read
+ ssl:send(Socket, "Got it"),
+ ok;
+ {ssl, Socket, Byte} when length(Byte) == 1 ->
+ erlang_ssl_receive(Socket, tl(Data));
+ {Port, {data,Debug}} when is_port(Port) ->
+ ct:log("~p:~p~nopenssl ~s~n",[?MODULE,?LINE, Debug]),
+ erlang_ssl_receive(Socket,Data);
+ Other ->
+ ct:fail({unexpected_message, Other})
+ after 4000 ->
+ ct:fail({did_not_get, Data})
+ end.
+
+
+erlang_ssl_send(Socket, Data) ->
+ ct:log("~p:~p~nConnection info: ~p~n",
+ [?MODULE,?LINE, ssl:connection_info(Socket)]),
+ ssl:send(Socket, Data),
+ ok.
+
+load_certs(undefined) ->
+ undefined;
+load_certs(CertDir) ->
+ case file:list_dir(CertDir) of
+ {ok, Certs} ->
+ load_certs(lists:map(fun(Cert) -> filename:join(CertDir, Cert)
+ end, Certs), []);
+ {error, _} ->
+ undefined
+ end.
+
+load_certs([], Acc) ->
+ ct:log("~p:~p~nSuccessfully loaded ~p CA certificates~n", [?MODULE,?LINE, length(Acc)]),
+ Acc;
+load_certs([Cert|Certs], Acc) ->
+ case filelib:is_dir(Cert) of
+ true ->
+ load_certs(Certs, Acc);
+ _ ->
+ %ct:log("~p:~p~nLoading certificate ~p~n", [?MODULE,?LINE, Cert]),
+ load_certs(Certs, load_cert(Cert) ++ Acc)
+ end.
+
+load_cert(Cert) ->
+ {ok, Bin} = file:read_file(Cert),
+ case filename:extension(Cert) of
+ ".der" ->
+ %% no decoding necessary
+ [Bin];
+ _ ->
+ %% assume PEM otherwise
+ Contents = public_key:pem_decode(Bin),
+ [DER || {Type, DER, Cipher} <- Contents, Type == 'Certificate', Cipher == 'not_encrypted']
+ end.
+
+%% @doc Validator function for SSL negotiation.
+%%
+validate_function(Cert, valid_peer, State) ->
+ ct:log("~p:~p~nvaliding peer ~p with ~p intermediate certs~n",
+ [?MODULE,?LINE, get_common_name(Cert),
+ length(element(2, State))]),
+ %% peer certificate validated, now check the CRL
+ Res = (catch check_crl(Cert, State)),
+ ct:log("~p:~p~nCRL validate result for ~p: ~p~n",
+ [?MODULE,?LINE, get_common_name(Cert), Res]),
+ {Res, State};
+validate_function(Cert, valid, {TrustedCAs, IntermediateCerts}=State) ->
+ case public_key:pkix_is_self_signed(Cert) of
+ true ->
+ ct:log("~p:~p~nroot certificate~n",[?MODULE,?LINE]),
+ %% this is a root cert, no CRL
+ {valid, {TrustedCAs, [Cert|IntermediateCerts]}};
+ false ->
+ %% check is valid CA certificate, add to the list of
+ %% intermediates
+ Res = (catch check_crl(Cert, State)),
+ ct:log("~p:~p~nCRL intermediate CA validate result for ~p: ~p~n",
+ [?MODULE,?LINE, get_common_name(Cert), Res]),
+ {Res, {TrustedCAs, [Cert|IntermediateCerts]}}
+ end;
+validate_function(_Cert, _Event, State) ->
+ %ct:log("~p:~p~nignoring event ~p~n", [?MODULE,?LINE, _Event]),
+ {valid, State}.
+
+%% @doc Given a certificate, find CRL distribution points for the given
+%% certificate, fetch, and attempt to validate each CRL through
+%% issuer_function/4.
+%%
+check_crl(Cert, State) ->
+ %% pull the CRL distribution point(s) out of the certificate, if any
+ ct:log("~p:~p~ncheck_crl(~n Cert=~p,~nState=~p~n)",[?MODULE,?LINE,Cert,State]),
+ case pubkey_cert:select_extension(
+ ?'id-ce-cRLDistributionPoints',
+ pubkey_cert:extensions_list(Cert#'OTPCertificate'.tbsCertificate#'OTPTBSCertificate'.extensions)) of
+ undefined ->
+ ct:log("~p:~p~nno CRL distribution points for ~p~n",
+ [?MODULE,?LINE, get_common_name(Cert)]),
+ %% fail; we can't validate if there's no CRL
+ no_crl;
+ CRLExtension ->
+ ct:log("~p:~p~nCRLExtension=~p)",[?MODULE,?LINE,CRLExtension]),
+ CRLDistPoints = CRLExtension#'Extension'.extnValue,
+ DPointsAndCRLs = lists:foldl(fun(Point, Acc) ->
+ %% try to read the CRL over http or from a
+ %% local file
+ case fetch_point(Point) of
+ not_available ->
+ ct:log("~p:~p~nfetch_point returned~n~p~n)",[?MODULE,?LINE,not_available]),
+ Acc;
+ Res ->
+ ct:log("~p:~p~nfetch_point returned~n~p~n)",[?MODULE,?LINE,Res]),
+ [{Point, Res} | Acc]
+ end
+ end, [], CRLDistPoints),
+ public_key:pkix_crls_validate(Cert,
+ DPointsAndCRLs,
+ [{issuer_fun,
+ {fun issuer_function/4, State}}])
+ end.
+
+%% @doc Given a list of distribution points for CRLs, certificates and
+%% both trusted and intermediary certificates, attempt to build and
+%% authority chain back via build_chain to verify that it is valid.
+%%
+issuer_function(_DP, CRL, _Issuer, {TrustedCAs, IntermediateCerts}) ->
+ %% XXX the 'Issuer' we get passed here is the AuthorityKeyIdentifier,
+ %% which we are not currently smart enough to understand
+ %% Read the CA certs out of the file
+ ct:log("~p:~p~nissuer_function(~nCRL=~p,~nLast param=~p)",[?MODULE,?LINE,CRL, {TrustedCAs, IntermediateCerts}]),
+ Certs = [public_key:pkix_decode_cert(DER, otp) || DER <- TrustedCAs],
+ %% get the real issuer out of the CRL
+ Issuer = public_key:pkix_normalize_name(
+ pubkey_cert_records:transform(
+ CRL#'CertificateList'.tbsCertList#'TBSCertList'.issuer, decode)),
+ %% assume certificates are ordered from root to tip
+ case find_issuer(Issuer, IntermediateCerts ++ Certs) of
+ undefined ->
+ ct:log("~p:~p~nunable to find certificate matching CRL issuer ~p~n",
+ [?MODULE,?LINE, Issuer]),
+ error;
+ IssuerCert ->
+ ct:log("~p:~p~nIssuerCert=~p~n)",[?MODULE,?LINE,IssuerCert]),
+ case build_chain({public_key:pkix_encode('OTPCertificate',
+ IssuerCert,
+ otp),
+ IssuerCert}, IntermediateCerts, Certs, []) of
+ undefined ->
+ error;
+ {OTPCert, Path} ->
+ {ok, OTPCert, Path}
+ end
+ end.
+
+%% @doc Attempt to build authority chain back using intermediary
+%% certificates, falling back on trusted certificates if the
+%% intermediary chain of certificates does not fully extend to the
+%% root.
+%%
+%% Returns: {RootCA :: #OTPCertificate{}, Chain :: [der_encoded()]}
+%%
+build_chain({DER, Cert}, IntCerts, TrustedCerts, Acc) ->
+ %% check if this cert is self-signed, if it is, we've reached the
+ %% root of the chain
+ Issuer = public_key:pkix_normalize_name(
+ Cert#'OTPCertificate'.tbsCertificate#'OTPTBSCertificate'.issuer),
+ Subject = public_key:pkix_normalize_name(
+ Cert#'OTPCertificate'.tbsCertificate#'OTPTBSCertificate'.subject),
+ case Issuer == Subject of
+ true ->
+ case find_issuer(Issuer, TrustedCerts) of
+ undefined ->
+ ct:log("~p:~p~nself-signed certificate is NOT trusted~n",[?MODULE,?LINE]),
+ undefined;
+ TrustedCert ->
+ %% return the cert from the trusted list, to prevent
+ %% issuer spoofing
+ {TrustedCert,
+ [public_key:pkix_encode(
+ 'OTPCertificate', TrustedCert, otp)|Acc]}
+ end;
+ false ->
+ Match = lists:foldl(
+ fun(C, undefined) ->
+ S = public_key:pkix_normalize_name(C#'OTPCertificate'.tbsCertificate#'OTPTBSCertificate'.subject),
+ %% compare the subject to the current issuer
+ case Issuer == S of
+ true ->
+ %% we've found our man
+ {public_key:pkix_encode('OTPCertificate', C, otp), C};
+ false ->
+ undefined
+ end;
+ (_E, A) ->
+ %% already matched
+ A
+ end, undefined, IntCerts),
+ case Match of
+ undefined when IntCerts /= TrustedCerts ->
+ %% continue the chain by using the trusted CAs
+ ct:log("~p:~p~nRan out of intermediate certs, switching to trusted certs~n",[?MODULE,?LINE]),
+ build_chain({DER, Cert}, TrustedCerts, TrustedCerts, Acc);
+ undefined ->
+ ct:log("Can't construct chain of trust beyond ~p~n",
+ [?MODULE,?LINE, get_common_name(Cert)]),
+ %% can't find the current cert's issuer
+ undefined;
+ Match ->
+ build_chain(Match, IntCerts, TrustedCerts, [DER|Acc])
+ end
+ end.
+
+%% @doc Given a certificate and a list of trusted or intermediary
+%% certificates, attempt to find a match in the list or bail with
+%% undefined.
+find_issuer(Issuer, Certs) ->
+ lists:foldl(
+ fun(OTPCert, undefined) ->
+ %% check if this certificate matches the issuer
+ Normal = public_key:pkix_normalize_name(
+ OTPCert#'OTPCertificate'.tbsCertificate#'OTPTBSCertificate'.subject),
+ case Normal == Issuer of
+ true ->
+ OTPCert;
+ false ->
+ undefined
+ end;
+ (_E, Acc) ->
+ %% already found a match
+ Acc
+ end, undefined, Certs).
+
+%% @doc Find distribution points for a given CRL and then attempt to
+%% fetch the CRL from the first available.
+fetch_point(#'DistributionPoint'{distributionPoint={fullName, Names}}) ->
+ Decoded = [{NameType,
+ pubkey_cert_records:transform(Name, decode)}
+ || {NameType, Name} <- Names],
+ ct:log("~p:~p~ncall fetch(~nDecoded=~p~n)",[?MODULE,?LINE,Decoded]),
+ fetch(Decoded).
+
+%% @doc Given a list of locations to retrieve a CRL from, attempt to
+%% retrieve either from a file or http resource and bail as soon as
+%% it can be found.
+%%
+%% Currently, only hand a armored PEM or DER encoded file, with
+%% defaulting to DER.
+%%
+fetch([]) ->
+ not_available;
+fetch([{uniformResourceIdentifier, "http"++_=URL}|Rest]) ->
+ ct:log("~p:~p~ngetting CRL from ~p~n", [?MODULE,?LINE, URL]),
+ case httpc:request(get, {URL, []}, [], [{body_format, binary}]) of
+ {ok, {_Status, _Headers, Body}} ->
+ case Body of
+ <<"-----BEGIN", _/binary>> ->
+ ct:log("~p:~p~npublic_key:pem_decode,~nBody=~p~n)",[?MODULE,?LINE,Body]),
+ [{'CertificateList',
+ DER, _}=CertList] = public_key:pem_decode(Body),
+ ct:log("~p:~p~npublic_key:pem_entry_decode,~nCertList=~p~n)",[?MODULE,?LINE,CertList]),
+ {DER, public_key:pem_entry_decode(CertList)};
+ _ ->
+ ct:log("~p:~p~npublic_key:pem_entry_decode,~nBody=~p~n)",[?MODULE,?LINE,{'CertificateList', Body, not_encrypted}]),
+ %% assume DER encoded
+ try
+ public_key:pem_entry_decode({'CertificateList', Body, not_encrypted})
+ of
+ CertList -> {Body, CertList}
+ catch
+ _C:_E ->
+ ct:log("~p:~p~nfailed DER assumption~nRest=~p", [?MODULE,?LINE,Rest]),
+ fetch(Rest)
+ end
+ end;
+ {error, _Reason} ->
+ ct:log("~p:~p~nfailed to get CRL ~p~n", [?MODULE,?LINE, _Reason]),
+ fetch(Rest);
+ Other ->
+ ct:log("~p:~p~nreally failed to get CRL ~p~n", [?MODULE,?LINE, Other]),
+ fetch(Rest)
+ end;
+fetch([Loc|Rest]) ->
+ %% unsupported CRL location
+ ct:log("~p:~p~nunable to fetch CRL from unsupported location ~p~n",
+ [?MODULE,?LINE, Loc]),
+ fetch(Rest).
+
+%% get the common name attribute out of an OTPCertificate record
+get_common_name(OTPCert) ->
+ %% You'd think there'd be an easier way than this giant mess, but I
+ %% couldn't find one.
+ {rdnSequence, Subject} = OTPCert#'OTPCertificate'.tbsCertificate#'OTPTBSCertificate'.subject,
+ case [Attribute#'AttributeTypeAndValue'.value || [Attribute] <- Subject,
+ Attribute#'AttributeTypeAndValue'.type == ?'id-at-commonName'] of
+ [Att] ->
+ case Att of
+ {teletexString, Str} -> Str;
+ {printableString, Str} -> Str;
+ {utf8String, Bin} -> binary_to_list(Bin)
+ end;
+ _ ->
+ unknown
+ end.
+
diff --git a/lib/ssl/test/ssl_dist_SUITE.erl b/lib/ssl/test/ssl_dist_SUITE.erl
index d3b523ca8c..1a1b2af8d4 100644
--- a/lib/ssl/test/ssl_dist_SUITE.erl
+++ b/lib/ssl/test/ssl_dist_SUITE.erl
@@ -324,7 +324,7 @@ start_ssl_node_raw(Name, Args) ->
[binary, {packet, 4}, {active, false}]),
{ok, ListenPort} = inet:port(LSock),
CmdLine = mk_node_cmdline(ListenPort, Name, Args),
- ?t:format("Attempting to start ssl node ~s: ~s~n", [Name, CmdLine]),
+ ?t:format("Attempting to start ssl node ~ts: ~ts~n", [Name, CmdLine]),
case open_port({spawn, CmdLine}, []) of
Port when is_port(Port) ->
unlink(Port),
diff --git a/lib/ssl/test/ssl_handshake_SUITE.erl b/lib/ssl/test/ssl_handshake_SUITE.erl
index 7e8e8d2611..5f36842f9e 100644
--- a/lib/ssl/test/ssl_handshake_SUITE.erl
+++ b/lib/ssl/test/ssl_handshake_SUITE.erl
@@ -1,7 +1,7 @@
%%
%% %CopyrightBegin%
%%
-%% Copyright Ericsson AB 2008-2013. All Rights Reserved.
+%% Copyright Ericsson AB 2008-2014. 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
@@ -26,6 +26,7 @@
-include_lib("common_test/include/ct.hrl").
-include("ssl_internal.hrl").
-include("tls_handshake.hrl").
+-include_lib("public_key/include/public_key.hrl").
%%--------------------------------------------------------------------
%% Common Test interface functions -----------------------------------
@@ -34,8 +35,10 @@ suite() -> [{ct_hooks,[ts_install_cth]}].
all() -> [decode_hello_handshake,
decode_single_hello_extension_correctly,
+ decode_supported_elliptic_curves_hello_extension_correctly,
decode_unknown_hello_extension_correctly,
- encode_single_hello_sni_extension_correctly].
+ encode_single_hello_sni_extension_correctly,
+ select_proper_tls_1_2_rsa_default_hashsign].
%%--------------------------------------------------------------------
%% Test Cases --------------------------------------------------------
@@ -67,6 +70,17 @@ decode_single_hello_extension_correctly(_Config) ->
#renegotiation_info{renegotiated_connection = <<0>>}
= Extensions#hello_extensions.renegotiation_info.
+decode_supported_elliptic_curves_hello_extension_correctly(_Config) ->
+ % List of supported and unsupported curves (RFC4492:S5.1.1)
+ ClientEllipticCurves = [0, tls_v1:oid_to_enum(?sect233k1), 37, tls_v1:oid_to_enum(?sect193r2), 16#badc],
+ % Construct extension binary - modified version of ssl_handshake:encode_hello_extensions([#elliptic_curves{}], _)
+ EllipticCurveList = << <<X:16>> || X <- ClientEllipticCurves>>,
+ ListLen = byte_size(EllipticCurveList),
+ Len = ListLen + 2,
+ Extension = <<?UINT16(?ELLIPTIC_CURVES_EXT), ?UINT16(Len), ?UINT16(ListLen), EllipticCurveList/binary>>,
+ % after decoding we should see only valid curves
+ #hello_extensions{elliptic_curves = DecodedCurves} = ssl_handshake:decode_hello_extensions(Extension),
+ #elliptic_curves{elliptic_curve_list = [?sect233k1, ?sect193r2]} = DecodedCurves.
decode_unknown_hello_extension_correctly(_Config) ->
FourByteUnknown = <<16#CA,16#FE, ?UINT16(4), 3, 0, 1, 2>>,
@@ -83,3 +97,11 @@ encode_single_hello_sni_extension_correctly(_Config) ->
HelloExt = <<ExtSize:16/unsigned-big-integer, SNI/binary>>,
Encoded = ssl_handshake:encode_hello_extensions(Exts),
HelloExt = Encoded.
+
+select_proper_tls_1_2_rsa_default_hashsign(_Config) ->
+ % RFC 5246 section 7.4.1.4.1 tells to use {sha1,rsa} as default signature_algorithm for RSA key exchanges
+ {sha, rsa} = ssl_handshake:select_hashsign_algs(undefined, ?rsaEncryption, {3,3}),
+ % Older versions use MD5/SHA1 combination
+ {md5sha, rsa} = ssl_handshake:select_hashsign_algs(undefined, ?rsaEncryption, {3,2}),
+ {md5sha, rsa} = ssl_handshake:select_hashsign_algs(undefined, ?rsaEncryption, {3,0}).
+
diff --git a/lib/ssl/test/ssl_test_lib.erl b/lib/ssl/test/ssl_test_lib.erl
index 74fadc0cc7..150b5037d7 100644
--- a/lib/ssl/test/ssl_test_lib.erl
+++ b/lib/ssl/test/ssl_test_lib.erl
@@ -1,7 +1,7 @@
%%
%% %CopyrightBegin%
%%
-%% Copyright Ericsson AB 2008-2013. All Rights Reserved.
+%% Copyright Ericsson AB 2008-2014. 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
@@ -60,14 +60,23 @@ run_server(Opts) ->
Options = proplists:get_value(options, Opts),
Pid = proplists:get_value(from, Opts),
Transport = proplists:get_value(transport, Opts, ssl),
- ct:log("ssl:listen(~p, ~p)~n", [Port, Options]),
+ ct:log("~p:~p~nssl:listen(~p, ~p)~n", [?MODULE,?LINE, Port, Options]),
{ok, ListenSocket} = rpc:call(Node, Transport, listen, [Port, Options]),
Pid ! {listen, up},
send_selected_port(Pid, Port, ListenSocket),
run_server(ListenSocket, Opts).
run_server(ListenSocket, Opts) ->
- do_run_server(ListenSocket, connect(ListenSocket, Opts), Opts).
+ Accepters = proplists:get_value(accepters, Opts, 1),
+ run_server(ListenSocket, Opts, Accepters).
+
+run_server(ListenSocket, Opts, 1) ->
+ do_run_server(ListenSocket, connect(ListenSocket, Opts), Opts);
+run_server(ListenSocket, Opts, N) ->
+ Pid = proplists:get_value(from, Opts),
+ Server = spawn(?MODULE, run_server, [ListenSocket, Opts, 1]),
+ Pid ! {accepter, N, Server},
+ run_server(ListenSocket, Opts, N-1).
do_run_server(_, {error, timeout} = Result, Opts) ->
Pid = proplists:get_value(from, Opts),
@@ -78,13 +87,13 @@ do_run_server(ListenSocket, AcceptSocket, Opts) ->
Pid = proplists:get_value(from, Opts),
Transport = proplists:get_value(transport, Opts, ssl),
{Module, Function, Args} = proplists:get_value(mfa, Opts),
- ct:log("Server: apply(~p,~p,~p)~n",
- [Module, Function, [AcceptSocket | Args]]),
+ ct:log("~p:~p~nServer: apply(~p,~p,~p)~n",
+ [?MODULE,?LINE, Module, Function, [AcceptSocket | Args]]),
case rpc:call(Node, Module, Function, [AcceptSocket | Args]) of
no_result_msg ->
ok;
Msg ->
- ct:log("Server Msg: ~p ~n", [Msg]),
+ ct:log("~p:~p~nServer Msg: ~p ~n", [?MODULE,?LINE, Msg]),
Pid ! {self(), Msg}
end,
receive
@@ -93,10 +102,10 @@ do_run_server(ListenSocket, AcceptSocket, Opts) ->
{listen, MFA} ->
run_server(ListenSocket, [MFA | proplists:delete(mfa, Opts)]);
close ->
- ct:log("Server closing ~p ~n", [self()]),
+ ct:log("~p:~p~nServer closing ~p ~n", [?MODULE,?LINE, self()]),
Result = rpc:call(Node, Transport, close, [AcceptSocket], 500),
Result1 = rpc:call(Node, Transport, close, [ListenSocket], 500),
- ct:log("Result ~p : ~p ~n", [Result, Result1]);
+ ct:log("~p:~p~nResult ~p : ~p ~n", [?MODULE,?LINE, Result, Result1]);
{ssl_closed, _} ->
ok
end.
@@ -106,7 +115,8 @@ connect(#sslsocket{} = ListenSocket, Opts) ->
Node = proplists:get_value(node, Opts),
ReconnectTimes = proplists:get_value(reconnect_times, Opts, 0),
Timeout = proplists:get_value(timeout, Opts, infinity),
- AcceptSocket = connect(ListenSocket, Node, 1 + ReconnectTimes, dummy, Timeout),
+ SslOpts = proplists:get_value(ssl_extra_opts, Opts, []),
+ AcceptSocket = connect(ListenSocket, Node, 1 + ReconnectTimes, dummy, Timeout, SslOpts),
case ReconnectTimes of
0 ->
AcceptSocket;
@@ -116,27 +126,35 @@ connect(#sslsocket{} = ListenSocket, Opts) ->
end;
connect(ListenSocket, Opts) ->
Node = proplists:get_value(node, Opts),
- ct:log("gen_tcp:accept(~p)~n", [ListenSocket]),
+ ct:log("~p:~p~ngen_tcp:accept(~p)~n", [?MODULE,?LINE, ListenSocket]),
{ok, AcceptSocket} = rpc:call(Node, gen_tcp, accept,
[ListenSocket]),
AcceptSocket.
-connect(_, _, 0, AcceptSocket, _) ->
+connect(_, _, 0, AcceptSocket, _, _) ->
AcceptSocket;
-connect(ListenSocket, Node, N, _, Timeout) ->
+
+connect(ListenSocket, Node, N, _, Timeout, []) ->
ct:log("ssl:transport_accept(~p)~n", [ListenSocket]),
{ok, AcceptSocket} = rpc:call(Node, ssl, transport_accept,
[ListenSocket]),
- ct:log("ssl:ssl_accept(~p, ~p)~n", [AcceptSocket, Timeout]),
+ ct:log("~p:~p~nssl:ssl_accept(~p, ~p)~n", [?MODULE,?LINE, AcceptSocket, Timeout]),
case rpc:call(Node, ssl, ssl_accept, [AcceptSocket, Timeout]) of
ok ->
- connect(ListenSocket, Node, N-1, AcceptSocket, Timeout);
+ connect(ListenSocket, Node, N-1, AcceptSocket, Timeout, []);
Result ->
+ ct:log("~p:~p~nssl:ssl_accept@~p ret ~p",[?MODULE,?LINE, Node,Result]),
Result
- end.
+ end;
+connect(ListenSocket, Node, _, _, Timeout, Opts) ->
+ ct:log("ssl:transport_accept(~p)~n", [ListenSocket]),
+ {ok, AcceptSocket} = rpc:call(Node, ssl, transport_accept,
+ [ListenSocket]),
+ ct:log("ssl:ssl_accept(~p,~p, ~p)~n", [AcceptSocket, Opts, Timeout]),
+ rpc:call(Node, ssl, ssl_accept, [AcceptSocket, Opts, Timeout]),
+ AcceptSocket.
-
remove_close_msg(0) ->
ok;
remove_close_msg(ReconnectTimes) ->
@@ -146,15 +164,21 @@ remove_close_msg(ReconnectTimes) ->
end.
start_client(Args) ->
- Result = spawn_link(?MODULE, run_client, [lists:delete(return_socket, Args)]),
+ Result = spawn_link(?MODULE, run_client_init, [lists:delete(return_socket, Args)]),
receive
- { connected, Socket } ->
- case lists:member(return_socket, Args) of
- true -> { Result, Socket };
- false -> Result
- end
+ {connected, Socket} ->
+ case lists:member(return_socket, Args) of
+ true -> {Result, Socket};
+ false -> Result
+ end;
+ {connect_failed, Reason} ->
+ {connect_failed, Reason}
end.
+run_client_init(Opts) ->
+ put(retries, 0),
+ run_client(Opts).
+
run_client(Opts) ->
Node = proplists:get_value(node, Opts),
Host = proplists:get_value(host, Opts),
@@ -162,70 +186,72 @@ run_client(Opts) ->
Pid = proplists:get_value(from, Opts),
Transport = proplists:get_value(transport, Opts, ssl),
Options = proplists:get_value(options, Opts),
- ct:log("ssl:connect(~p, ~p, ~p)~n", [Host, Port, Options]),
+ ct:log("~p:~p~n~p:connect(~p, ~p)@~p~n", [?MODULE,?LINE, Transport, Host, Port, Node]),
case rpc:call(Node, Transport, connect, [Host, Port, Options]) of
{ok, Socket} ->
- Pid ! { connected, Socket },
- ct:log("Client: connected~n", []),
+ Pid ! {connected, Socket},
+ ct:log("~p:~p~nClient: connected~n", [?MODULE,?LINE]),
%% In special cases we want to know the client port, it will
%% be indicated by sending {port, 0} in options list!
send_selected_port(Pid, proplists:get_value(port, Options), Socket),
{Module, Function, Args} = proplists:get_value(mfa, Opts),
- ct:log("Client: apply(~p,~p,~p)~n",
- [Module, Function, [Socket | Args]]),
+ ct:log("~p:~p~nClient: apply(~p,~p,~p)~n",
+ [?MODULE,?LINE, Module, Function, [Socket | Args]]),
case rpc:call(Node, Module, Function, [Socket | Args]) of
no_result_msg ->
ok;
Msg ->
- ct:log("Client Msg: ~p ~n", [Msg]),
+ ct:log("~p:~p~nClient Msg: ~p ~n", [?MODULE,?LINE, Msg]),
Pid ! {self(), Msg}
end,
receive
close ->
- ct:log("Client closing~n", []),
+ ct:log("~p:~p~nClient closing~n", [?MODULE,?LINE]),
rpc:call(Node, Transport, close, [Socket]);
{ssl_closed, Socket} ->
ok;
{gen_tcp, closed} ->
ok
end;
+ {error, econnrefused = Reason} ->
+ case get(retries) of
+ N when N < 5 ->
+ ct:log("~p:~p~neconnrefused retries=~p sleep ~p",[?MODULE,?LINE, N,?SLEEP]),
+ put(retries, N+1),
+ ct:sleep(?SLEEP),
+ run_client(Opts);
+ _ ->
+ ct:log("~p:~p~nClient faild several times: connection failed: ~p ~n", [?MODULE,?LINE, Reason]),
+ Pid ! {self(), {error, Reason}}
+ end;
{error, Reason} ->
- ct:log("Client: connection failed: ~p ~n", [Reason]),
- Pid ! {self(), {error, Reason}}
+ ct:log("~p:~p~nClient: connection failed: ~p ~n", [?MODULE,?LINE, Reason]),
+ Pid ! {connect_failed, Reason};
+ {badrpc,BadRPC} ->
+ ct:log("~p:~p~nBad rpc: ~p",[?MODULE,?LINE, BadRPC]),
+ Pid ! {connect_failed, {badrpc,BadRPC}}
end.
close(Pid) ->
- ct:log("Close ~p ~n", [Pid]),
+ ct:log("~p:~p~nClose ~p ~n", [?MODULE,?LINE, Pid]),
Monitor = erlang:monitor(process, Pid),
Pid ! close,
receive
{'DOWN', Monitor, process, Pid, Reason} ->
erlang:demonitor(Monitor),
- ct:log("Pid: ~p down due to:~p ~n", [Pid, Reason])
+ ct:log("~p:~p~nPid: ~p down due to:~p ~n", [?MODULE,?LINE, Pid, Reason])
end.
check_result(Server, ServerMsg, Client, ClientMsg) ->
receive
- {Server, ServerMsg} ->
- receive
- {Client, ClientMsg} ->
- ok;
- Unexpected ->
- Reason = {{expected, {Client, ClientMsg}},
- {got, Unexpected}},
- ct:fail(Reason)
- end;
- {Client, ClientMsg} ->
- receive
- {Server, ServerMsg} ->
- ok;
- Unexpected ->
- Reason = {{expected, {Server, ClientMsg}},
- {got, Unexpected}},
- ct:fail(Reason)
- end;
+ {Server, ServerMsg} ->
+ check_result(Client, ClientMsg);
+
+ {Client, ClientMsg} ->
+ check_result(Server, ServerMsg);
+
{Port, {data,Debug}} when is_port(Port) ->
- io:format("openssl ~s~n",[Debug]),
+ ct:log("~p:~p~nopenssl ~s~n",[?MODULE,?LINE, Debug]),
check_result(Server, ServerMsg, Client, ClientMsg);
Unexpected ->
@@ -239,7 +265,7 @@ check_result(Pid, Msg) ->
{Pid, Msg} ->
ok;
{Port, {data,Debug}} when is_port(Port) ->
- io:format("openssl ~s~n",[Debug]),
+ ct:log("~p:~p~nopenssl ~s~n",[?MODULE,?LINE, Debug]),
check_result(Pid,Msg);
Unexpected ->
Reason = {{expected, {Pid, Msg}},
@@ -264,19 +290,28 @@ wait_for_result(Server, ServerMsg, Client, ClientMsg) ->
%% Unexpected
end;
{Port, {data,Debug}} when is_port(Port) ->
- io:format("openssl ~s~n",[Debug]),
+ ct:log("~p:~p~nopenssl ~s~n",[?MODULE,?LINE, Debug]),
wait_for_result(Server, ServerMsg, Client, ClientMsg)
%% Unexpected ->
%% Unexpected
end.
-
+check_ok([]) ->
+ ok;
+check_ok(Pids) ->
+ receive
+ {Pid, ok} ->
+ check_ok(lists:delete(Pid, Pids));
+ Other ->
+ ct:fail({expected, {"pid()", ok}, got, Other})
+ end.
+
wait_for_result(Pid, Msg) ->
receive
{Pid, Msg} ->
ok;
{Port, {data,Debug}} when is_port(Port) ->
- io:format("openssl ~s~n",[Debug]),
+ ct:log("~p:~p~nopenssl ~s~n",[?MODULE,?LINE, Debug]),
wait_for_result(Pid,Msg)
%% Unexpected ->
%% Unexpected
@@ -501,33 +536,33 @@ run_upgrade_server(Opts) ->
SslOptions = proplists:get_value(ssl_options, Opts),
Pid = proplists:get_value(from, Opts),
- ct:log("gen_tcp:listen(~p, ~p)~n", [Port, TcpOptions]),
+ ct:log("~p:~p~ngen_tcp:listen(~p, ~p)~n", [?MODULE,?LINE, Port, TcpOptions]),
{ok, ListenSocket} = rpc:call(Node, gen_tcp, listen, [Port, TcpOptions]),
Pid ! {listen, up},
send_selected_port(Pid, Port, ListenSocket),
- ct:log("gen_tcp:accept(~p)~n", [ListenSocket]),
+ ct:log("~p:~p~ngen_tcp:accept(~p)~n", [?MODULE,?LINE, ListenSocket]),
{ok, AcceptSocket} = rpc:call(Node, gen_tcp, accept, [ListenSocket]),
try
{ok, SslAcceptSocket} = case TimeOut of
infinity ->
- ct:log("ssl:ssl_accept(~p, ~p)~n",
- [AcceptSocket, SslOptions]),
+ ct:log("~p:~p~nssl:ssl_accept(~p, ~p)~n",
+ [?MODULE,?LINE, AcceptSocket, SslOptions]),
rpc:call(Node, ssl, ssl_accept,
[AcceptSocket, SslOptions]);
_ ->
- ct:log("ssl:ssl_accept(~p, ~p, ~p)~n",
- [AcceptSocket, SslOptions, TimeOut]),
+ ct:log("~p:~p~nssl:ssl_accept(~p, ~p, ~p)~n",
+ [?MODULE,?LINE, AcceptSocket, SslOptions, TimeOut]),
rpc:call(Node, ssl, ssl_accept,
[AcceptSocket, SslOptions, TimeOut])
end,
{Module, Function, Args} = proplists:get_value(mfa, Opts),
Msg = rpc:call(Node, Module, Function, [SslAcceptSocket | Args]),
- ct:log("Upgrade Server Msg: ~p ~n", [Msg]),
+ ct:log("~p:~p~nUpgrade Server Msg: ~p ~n", [?MODULE,?LINE, Msg]),
Pid ! {self(), Msg},
receive
close ->
- ct:log("Upgrade Server closing~n", []),
+ ct:log("~p:~p~nUpgrade Server closing~n", [?MODULE,?LINE]),
rpc:call(Node, ssl, close, [SslAcceptSocket])
end
catch error:{badmatch, Error} ->
@@ -545,24 +580,24 @@ run_upgrade_client(Opts) ->
TcpOptions = proplists:get_value(tcp_options, Opts),
SslOptions = proplists:get_value(ssl_options, Opts),
- ct:log("gen_tcp:connect(~p, ~p, ~p)~n",
- [Host, Port, TcpOptions]),
+ ct:log("~p:~p~ngen_tcp:connect(~p, ~p, ~p)~n",
+ [?MODULE,?LINE, Host, Port, TcpOptions]),
{ok, Socket} = rpc:call(Node, gen_tcp, connect, [Host, Port, TcpOptions]),
send_selected_port(Pid, Port, Socket),
- ct:log("ssl:connect(~p, ~p)~n", [Socket, SslOptions]),
+ ct:log("~p:~p~nssl:connect(~p, ~p)~n", [?MODULE,?LINE, Socket, SslOptions]),
{ok, SslSocket} = rpc:call(Node, ssl, connect, [Socket, SslOptions]),
{Module, Function, Args} = proplists:get_value(mfa, Opts),
- ct:log("apply(~p, ~p, ~p)~n",
- [Module, Function, [SslSocket | Args]]),
+ ct:log("~p:~p~napply(~p, ~p, ~p)~n",
+ [?MODULE,?LINE, Module, Function, [SslSocket | Args]]),
Msg = rpc:call(Node, Module, Function, [SslSocket | Args]),
- ct:log("Upgrade Client Msg: ~p ~n", [Msg]),
+ ct:log("~p:~p~nUpgrade Client Msg: ~p ~n", [?MODULE,?LINE, Msg]),
Pid ! {self(), Msg},
receive
close ->
- ct:log("Upgrade Client closing~n", []),
+ ct:log("~p:~p~nUpgrade Client closing~n", [?MODULE,?LINE]),
rpc:call(Node, ssl, close, [SslSocket])
end.
@@ -581,21 +616,21 @@ run_upgrade_server_error(Opts) ->
SslOptions = proplists:get_value(ssl_options, Opts),
Pid = proplists:get_value(from, Opts),
- ct:log("gen_tcp:listen(~p, ~p)~n", [Port, TcpOptions]),
+ ct:log("~p:~p~ngen_tcp:listen(~p, ~p)~n", [?MODULE,?LINE, Port, TcpOptions]),
{ok, ListenSocket} = rpc:call(Node, gen_tcp, listen, [Port, TcpOptions]),
Pid ! {listen, up},
send_selected_port(Pid, Port, ListenSocket),
- ct:log("gen_tcp:accept(~p)~n", [ListenSocket]),
+ ct:log("~p:~p~ngen_tcp:accept(~p)~n", [?MODULE,?LINE, ListenSocket]),
{ok, AcceptSocket} = rpc:call(Node, gen_tcp, accept, [ListenSocket]),
Error = case TimeOut of
infinity ->
- ct:log("ssl:ssl_accept(~p, ~p)~n",
- [AcceptSocket, SslOptions]),
+ ct:log("~p:~p~nssl:ssl_accept(~p, ~p)~n",
+ [?MODULE,?LINE, AcceptSocket, SslOptions]),
rpc:call(Node, ssl, ssl_accept,
[AcceptSocket, SslOptions]);
_ ->
- ct:log("ssl:ssl_accept(~p, ~p, ~p)~n",
- [AcceptSocket, SslOptions, TimeOut]),
+ ct:log("~p:~p~nssl:ssl_accept(~p, ~p, ~p)~n",
+ [?MODULE,?LINE, AcceptSocket, SslOptions, TimeOut]),
rpc:call(Node, ssl, ssl_accept,
[AcceptSocket, SslOptions, TimeOut])
end,
@@ -614,26 +649,26 @@ run_server_error(Opts) ->
Options = proplists:get_value(options, Opts),
Pid = proplists:get_value(from, Opts),
Transport = proplists:get_value(transport, Opts, ssl),
- ct:log("ssl:listen(~p, ~p)~n", [Port, Options]),
+ ct:log("~p:~p~nssl:listen(~p, ~p)~n", [?MODULE,?LINE, Port, Options]),
case rpc:call(Node, Transport, listen, [Port, Options]) of
{ok, #sslsocket{} = ListenSocket} ->
%% To make sure error_client will
%% get {error, closed} and not {error, connection_refused}
Pid ! {listen, up},
send_selected_port(Pid, Port, ListenSocket),
- ct:log("ssl:transport_accept(~p)~n", [ListenSocket]),
+ ct:log("~p:~p~nssl:transport_accept(~p)~n", [?MODULE,?LINE, ListenSocket]),
case rpc:call(Node, Transport, transport_accept, [ListenSocket]) of
{error, _} = Error ->
Pid ! {self(), Error};
{ok, AcceptSocket} ->
- ct:log("ssl:ssl_accept(~p)~n", [AcceptSocket]),
+ ct:log("~p:~p~nssl:ssl_accept(~p)~n", [?MODULE,?LINE, AcceptSocket]),
Error = rpc:call(Node, ssl, ssl_accept, [AcceptSocket]),
Pid ! {self(), Error}
end;
{ok, ListenSocket} ->
Pid ! {listen, up},
send_selected_port(Pid, Port, ListenSocket),
- ct:log("~p:accept(~p)~n", [Transport, ListenSocket]),
+ ct:log("~p:~p~n~p:accept(~p)~n", [?MODULE,?LINE, Transport, ListenSocket]),
case rpc:call(Node, Transport, accept, [ListenSocket]) of
{error, _} = Error ->
Pid ! {self(), Error}
@@ -655,10 +690,21 @@ run_client_error(Opts) ->
Pid = proplists:get_value(from, Opts),
Transport = proplists:get_value(transport, Opts, ssl),
Options = proplists:get_value(options, Opts),
- ct:log("ssl:connect(~p, ~p, ~p)~n", [Host, Port, Options]),
+ ct:log("~p:~p~nssl:connect(~p, ~p, ~p)~n", [?MODULE,?LINE, Host, Port, Options]),
Error = rpc:call(Node, Transport, connect, [Host, Port, Options]),
Pid ! {self(), Error}.
+accepters(N) ->
+ accepters([], N).
+
+accepters(Acc, 0) ->
+ Acc;
+accepters(Acc, N) ->
+ receive
+ {accepter, _, Server} ->
+ accepters([Server| Acc], N-1)
+ end.
+
inet_port(Pid) when is_pid(Pid)->
receive
{Pid, {port, Port}} ->
@@ -826,25 +872,34 @@ psk_suites() ->
{psk, '3des_ede_cbc', sha},
{psk, aes_128_cbc, sha},
{psk, aes_256_cbc, sha},
+ {psk, aes_128_cbc, sha256},
+ {psk, aes_256_cbc, sha384},
{dhe_psk, rc4_128, sha},
{dhe_psk, '3des_ede_cbc', sha},
{dhe_psk, aes_128_cbc, sha},
{dhe_psk, aes_256_cbc, sha},
+ {dhe_psk, aes_128_cbc, sha256},
+ {dhe_psk, aes_256_cbc, sha384},
{rsa_psk, rc4_128, sha},
{rsa_psk, '3des_ede_cbc', sha},
{rsa_psk, aes_128_cbc, sha},
- {rsa_psk, aes_256_cbc, sha}],
+ {rsa_psk, aes_256_cbc, sha},
+ {rsa_psk, aes_128_cbc, sha256},
+ {rsa_psk, aes_256_cbc, sha384}
+],
ssl_cipher:filter_suites(Suites).
psk_anon_suites() ->
- [{psk, rc4_128, sha},
- {psk, '3des_ede_cbc', sha},
- {psk, aes_128_cbc, sha},
- {psk, aes_256_cbc, sha},
- {dhe_psk, rc4_128, sha},
- {dhe_psk, '3des_ede_cbc', sha},
- {dhe_psk, aes_128_cbc, sha},
- {dhe_psk, aes_256_cbc, sha}].
+ Suites =
+ [{psk, rc4_128, sha},
+ {psk, '3des_ede_cbc', sha},
+ {psk, aes_128_cbc, sha},
+ {psk, aes_256_cbc, sha},
+ {dhe_psk, rc4_128, sha},
+ {dhe_psk, '3des_ede_cbc', sha},
+ {dhe_psk, aes_128_cbc, sha},
+ {dhe_psk, aes_256_cbc, sha}],
+ ssl_cipher:filter_suites(Suites).
srp_suites() ->
Suites =
@@ -857,9 +912,11 @@ srp_suites() ->
ssl_cipher:filter_suites(Suites).
srp_anon_suites() ->
- [{srp_anon, '3des_ede_cbc', sha},
- {srp_anon, aes_128_cbc, sha},
- {srp_anon, aes_256_cbc, sha}].
+ Suites =
+ [{srp_anon, '3des_ede_cbc', sha},
+ {srp_anon, aes_128_cbc, sha},
+ {srp_anon, aes_256_cbc, sha}],
+ ssl_cipher:filter_suites(Suites).
srp_dss_suites() ->
Suites =
@@ -878,7 +935,7 @@ der_to_pem(File, Entries) ->
cipher_result(Socket, Result) ->
Result = ssl:connection_info(Socket),
- ct:log("Successfull connect: ~p~n", [Result]),
+ ct:log("~p:~p~nSuccessfull connect: ~p~n", [?MODULE,?LINE, Result]),
%% Importante to send two packets here
%% to properly test "cipher state" handling
ssl:send(Socket, "Hello\n"),
@@ -1047,10 +1104,13 @@ check_sane_openssl_version(Version) ->
true
end.
+enough_openssl_crl_support("OpenSSL 0." ++ _) -> false;
+enough_openssl_crl_support(_) -> true.
+
wait_for_openssl_server() ->
receive
{Port, {data, Debug}} when is_port(Port) ->
- ct:log("openssl ~s~n",[Debug]),
+ ct:log("~p:~p~nopenssl ~s~n",[?MODULE,?LINE, Debug]),
%% openssl has started make sure
%% it will be in accept. Parsing
%% output is too error prone. (Even
@@ -1066,3 +1126,13 @@ version_flag('tlsv1.2') ->
" -tls1_2 ";
version_flag(sslv3) ->
" -ssl3 ".
+
+filter_suites(Ciphers0) ->
+ Version = tls_record:highest_protocol_version([]),
+ Supported0 = ssl_cipher:suites(Version)
+ ++ ssl_cipher:anonymous_suites()
+ ++ ssl_cipher:psk_suites(Version)
+ ++ ssl_cipher:srp_suites(),
+ Supported1 = ssl_cipher:filter_suites(Supported0),
+ Supported2 = [ssl:suite_definition(S) || S <- Supported1],
+ [Cipher || Cipher <- Ciphers0, lists:member(Cipher, Supported2)].
diff --git a/lib/ssl/test/ssl_to_openssl_SUITE.erl b/lib/ssl/test/ssl_to_openssl_SUITE.erl
index 21f0172dba..d36e441c7a 100644
--- a/lib/ssl/test/ssl_to_openssl_SUITE.erl
+++ b/lib/ssl/test/ssl_to_openssl_SUITE.erl
@@ -1,7 +1,7 @@
%%
%% %CopyrightBegin%
%%
-%% Copyright Ericsson AB 2008-2013. All Rights Reserved.
+%% Copyright Ericsson AB 2008-2014. 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
@@ -154,22 +154,31 @@ special_init(TestCase, Config)
TestCase == erlang_client_openssl_server_nowrap_seqnum;
TestCase == erlang_server_openssl_client_nowrap_seqnum
->
- check_sane_openssl_renegotaite(Config);
+ {ok, Version} = application:get_env(ssl, protocol_version),
+ check_sane_openssl_renegotaite(Config, Version);
special_init(ssl2_erlang_server_openssl_client, Config) ->
check_sane_openssl_sslv2(Config);
special_init(TestCase, Config)
when TestCase == erlang_client_openssl_server_npn;
- TestCase == erlang_server_openssl_client_npn;
- TestCase == erlang_server_openssl_client_npn_renegotiate;
- TestCase == erlang_client_openssl_server_npn_renegotiate;
+ TestCase == erlang_server_openssl_client_npn;
TestCase == erlang_server_openssl_client_npn_only_server;
TestCase == erlang_server_openssl_client_npn_only_client;
TestCase == erlang_client_openssl_server_npn_only_client;
TestCase == erlang_client_openssl_server_npn_only_server ->
check_openssl_npn_support(Config);
+special_init(TestCase, Config)
+ when TestCase == erlang_server_openssl_client_npn_renegotiate;
+ TestCase == erlang_client_openssl_server_npn_renegotiate ->
+ {ok, Version} = application:get_env(ssl, protocol_version),
+ case check_sane_openssl_renegotaite(Config, Version) of
+ {skip, _} = Skip ->
+ Skip;
+ _ ->
+ check_openssl_npn_support(Config)
+ end;
special_init(_, Config) ->
Config.
@@ -239,7 +248,7 @@ basic_erlang_server_openssl_client(Config) when is_list(Config) ->
Port = ssl_test_lib:inet_port(Server),
Cmd = "openssl s_client -port " ++ integer_to_list(Port) ++
- " -host localhost",
+ " -host localhost" ++ workaround_openssl_s_clinent(),
ct:log("openssl cmd: ~p~n", [Cmd]),
@@ -903,8 +912,16 @@ ssl2_erlang_server_openssl_client(Config) when is_list(Config) ->
{'EXIT', OpenSslPort, _} = Exit ->
ct:log("Received: ~p ~n", [Exit]),
ok
-
end,
+ receive
+ {'EXIT', _, _} = UnkownExit ->
+ Msg = lists:flatten(io_lib:format("Received: ~p ~n", [UnkownExit])),
+ ct:log(Msg),
+ ct:comment(Msg),
+ ok
+ after 0 ->
+ ok
+ end,
ssl_test_lib:check_result(Server, {error, {tls_alert, "protocol version"}}),
process_flag(trap_exit, false).
@@ -1315,8 +1332,25 @@ check_openssl_npn_support(Config) ->
Config
end.
+check_sane_openssl_renegotaite(Config, Version) when Version == 'tlsv1.1';
+ Version == 'tlsv1.2' ->
+ case os:cmd("openssl version") of
+ "OpenSSL 1.0.1c" ++ _ ->
+ {skip, "Known renegotiation bug in OpenSSL"};
+ "OpenSSL 1.0.1b" ++ _ ->
+ {skip, "Known renegotiation bug in OpenSSL"};
+ "OpenSSL 1.0.1a" ++ _ ->
+ {skip, "Known renegotiation bug in OpenSSL"};
+ "OpenSSL 1.0.1 " ++ _ ->
+ {skip, "Known renegotiation bug in OpenSSL"};
+ _ ->
+ check_sane_openssl_renegotaite(Config)
+ end;
+check_sane_openssl_renegotaite(Config, _) ->
+ check_sane_openssl_renegotaite(Config).
+
check_sane_openssl_renegotaite(Config) ->
- case os:cmd("openssl version") of
+ case os:cmd("openssl version") of
"OpenSSL 0.9.8" ++ _ ->
{skip, "Known renegotiation bug in OpenSSL"};
"OpenSSL 0.9.7" ++ _ ->
@@ -1349,3 +1383,20 @@ supports_sslv2(Port) ->
true
end.
+workaround_openssl_s_clinent() ->
+ %% http://bugs.debian.org/cgi-bin/bugreport.cgi?bug=683159
+ %% https://bugs.archlinux.org/task/33919
+ %% Bug seems to manifests it self if TLS version is not
+ %% explicitly specified
+ case os:cmd("openssl version") of
+ "OpenSSL 1.0.1c" ++ _ ->
+ " -no_tls1_2 ";
+ "OpenSSL 1.0.1d" ++ _ ->
+ " -no_tls1_2 ";
+ "OpenSSL 1.0.1e" ++ _ ->
+ " -no_tls1_2 ";
+ "OpenSSL 1.0.1f" ++ _ ->
+ " -no_tls1_2 ";
+ _ ->
+ ""
+ end.
diff --git a/lib/ssl/vsn.mk b/lib/ssl/vsn.mk
index a2dd3f5930..004cacf7fc 100644
--- a/lib/ssl/vsn.mk
+++ b/lib/ssl/vsn.mk
@@ -1 +1 @@
-SSL_VSN = 5.3.2
+SSL_VSN = 5.3.5
diff --git a/lib/stdlib/doc/src/Makefile b/lib/stdlib/doc/src/Makefile
index 6f1e61e70c..ff77c3eea0 100644
--- a/lib/stdlib/doc/src/Makefile
+++ b/lib/stdlib/doc/src/Makefile
@@ -71,6 +71,7 @@ XML_REF3_FILES = \
lib.xml \
lists.xml \
log_mf_h.xml \
+ maps.xml \
math.xml \
ms_transform.xml \
orddict.xml \
diff --git a/lib/stdlib/doc/src/array.xml b/lib/stdlib/doc/src/array.xml
index b0b3aa6dc1..b03a2fa0cc 100644
--- a/lib/stdlib/doc/src/array.xml
+++ b/lib/stdlib/doc/src/array.xml
@@ -3,7 +3,7 @@
<erlref>
<header>
<copyright>
- <year>2007</year><year>2013</year>
+ <year>2007</year><year>2014</year>
<holder>Ericsson AB. All Rights Reserved.</holder>
</copyright>
<legalnotice>
@@ -84,7 +84,7 @@ the default value cannot be confused with the values of set entries.</p>
{'EXIT',{badarg,_}} = (catch array:get(18, A3)).</pre></description>
<datatypes>
<datatype>
- <name><marker id="type-array">array()</marker></name>
+ <name name="array" n_vars="1"/>
<desc>
<p>A functional, extendible array. The representation is
not documented and is subject to change without notice. Note that
@@ -92,6 +92,12 @@ the default value cannot be confused with the values of set entries.</p>
</desc>
</datatype>
<datatype>
+ <name name="array" n_vars="0"/>
+ <desc>
+ <p><c>array()</c> is equivalent to <c>array(term())</c>.</p>
+ </desc>
+ </datatype>
+ <datatype>
<name name="array_indx"/>
</datatype>
<datatype>
@@ -189,7 +195,7 @@ the default value cannot be confused with the values of set entries.</p>
<desc><marker id="from_orddict-2"/>
-<p>Convert an ordered list of pairs <c>{Index, Value}</c> to a
+<p>Convert an ordered list of pairs <c>{Index, <anno>Value</anno>}</c> to a
corresponding extendible array. <c><anno>Default</anno></c> is used as the value for
uninitialized entries of the array. If <c><anno>Orddict</anno></c> is not a proper,
ordered list of pairs whose first elements are nonnegative
@@ -455,7 +461,7 @@ cannot be changed once the array has been created.</p>
<desc><marker id="sparse_to_orddict-1"/>
-<p>Convert the array to an ordered list of pairs <c>{Index, Value}</c>,
+<p>Convert the array to an ordered list of pairs <c>{Index, <anno>Value</anno>}</c>,
skipping default-valued entries.
</p>
<p><em>See also:</em> <seealso marker="#to_orddict-1">to_orddict/1</seealso>.</p>
@@ -476,7 +482,7 @@ cannot be changed once the array has been created.</p>
<desc><marker id="to_orddict-1"/>
-<p>Convert the array to an ordered list of pairs <c>{Index, Value}</c>.
+<p>Convert the array to an ordered list of pairs <c>{Index, <anno>Value</anno>}</c>.
</p>
<p><em>See also:</em> <seealso marker="#from_orddict-2">from_orddict/2</seealso>, <seealso marker="#sparse_to_orddict-1">sparse_to_orddict/1</seealso>.</p>
</desc></func></funcs>
diff --git a/lib/stdlib/doc/src/dict.xml b/lib/stdlib/doc/src/dict.xml
index 6ff81b56ee..942fd1f45e 100644
--- a/lib/stdlib/doc/src/dict.xml
+++ b/lib/stdlib/doc/src/dict.xml
@@ -4,7 +4,7 @@
<erlref>
<header>
<copyright>
- <year>1996</year><year>2013</year>
+ <year>1996</year><year>2014</year>
<holder>Ericsson AB. All Rights Reserved.</holder>
</copyright>
<legalnotice>
@@ -41,9 +41,15 @@
<datatypes>
<datatype>
- <name><marker id="type-dict">dict()</marker></name>
+ <name name="dict" n_vars="2"/>
<desc><p>Dictionary as returned by <c>new/0</c>.</p></desc>
</datatype>
+ <datatype>
+ <name name="dict" n_vars="0"/>
+ <desc>
+ <p><c>dict()</c> is equivalent to <c>dict(term(), term())</c>.</p>
+ </desc>
+ </datatype>
</datatypes>
<funcs>
<func>
diff --git a/lib/stdlib/doc/src/digraph.xml b/lib/stdlib/doc/src/digraph.xml
index c5d5707f4f..9b9b48584b 100644
--- a/lib/stdlib/doc/src/digraph.xml
+++ b/lib/stdlib/doc/src/digraph.xml
@@ -4,7 +4,7 @@
<erlref>
<header>
<copyright>
- <year>1996</year><year>2013</year>
+ <year>1996</year><year>2014</year>
<holder>Ericsson AB. All Rights Reserved.</holder>
</copyright>
<legalnotice>
@@ -98,7 +98,7 @@
<name name="d_protection"/>
</datatype>
<datatype>
- <name><marker id="type-digraph">digraph()</marker></name>
+ <name name="graph"/>
<desc><p>A digraph as returned by <c>new/0,1</c>.</p></desc>
</datatype>
<datatype>
diff --git a/lib/stdlib/doc/src/epp.xml b/lib/stdlib/doc/src/epp.xml
index cf33530395..452341f7d2 100644
--- a/lib/stdlib/doc/src/epp.xml
+++ b/lib/stdlib/doc/src/epp.xml
@@ -4,7 +4,7 @@
<erlref>
<header>
<copyright>
- <year>1996</year><year>2013</year>
+ <year>1996</year><year>2014</year>
<holder>Ericsson AB. All Rights Reserved.</holder>
</copyright>
<legalnotice>
@@ -46,8 +46,10 @@
valid encodings are <c>Latin-1</c> and <c>UTF-8</c> where the
case of the characters can be chosen freely. Examples:</p>
<pre>
-%% coding: utf-8
-%% For this file we have chosen encoding = Latin-1
+%% coding: utf-8</pre>
+ <pre>
+%% For this file we have chosen encoding = Latin-1</pre>
+ <pre>
%% -*- coding: latin-1 -*-</pre>
</description>
<datatypes>
@@ -64,11 +66,29 @@
</datatypes>
<funcs>
<func>
+ <name name="open" arity="1"/>
+ <fsummary>Open a file for preprocessing</fsummary>
+ <desc>
+ <p>Opens a file for preprocessing.</p>
+ <p>If <c>extra</c> is given in
+ <c><anno>Options</anno></c>, the return value will be
+ <c>{ok, <anno>Epp</anno>, <anno>Extra</anno>}</c> instead
+ of <c>{ok, <anno>Epp</anno>}</c>.</p>
+ </desc>
+ </func>
+ <func>
<name name="open" arity="2"/>
+ <fsummary>Open a file for preprocessing</fsummary>
+ <desc>
+ <p>Equivalent to <c>epp:open([{name, FileName}, {includes, IncludePath}])</c>.</p>
+ </desc>
+ </func>
+ <func>
<name name="open" arity="3"/>
<fsummary>Open a file for preprocessing</fsummary>
<desc>
- <p>Opens a file for preprocessing.</p>
+ <p>Equivalent to <c>epp:open([{name, FileName}, {includes, IncludePath},
+ {macros, PredefMacros}])</c>.</p>
</desc>
</func>
<func>
@@ -89,12 +109,24 @@
</desc>
</func>
<func>
- <name name="parse_file" arity="3"/>
+ <name name="parse_file" arity="2"/>
<fsummary>Preprocess and parse an Erlang source file</fsummary>
<desc>
<p>Preprocesses and parses an Erlang source file.
- Note that the tuple <c>{eof, <anno>Line</anno>}</c> returned at end-of-file is
- included as a "form".</p>
+ Note that the tuple <c>{eof, <anno>Line</anno>}</c> returned
+ at end-of-file is included as a "form".</p>
+ <p>If <c>extra</c> is given in
+ <c><anno>Options</anno></c>, the return value will be
+ <c>{ok, [<anno>Form</anno>], <anno>Extra</anno>}</c> instead
+ of <c>{ok, [<anno>Form</anno>]}</c>.</p>
+ </desc>
+ </func>
+ <func>
+ <name name="parse_file" arity="3"/>
+ <fsummary>Preprocess and parse an Erlang source file</fsummary>
+ <desc>
+ <p>Equivalent to <c>epp:parse_file(FileName, [{includes, IncludePath},
+ {macros, PredefMacros}])</c>.</p>
</desc>
</func>
<func>
@@ -111,7 +143,7 @@
<p>Returns a string representation of an encoding. The string
is recognized by <c>read_encoding/1,2</c>,
<c>read_encoding_from_binary/1,2</c>, and
- <c>set_encoding/1</c> as a valid encoding.</p>
+ <c>set_encoding/1,2</c> as a valid encoding.</p>
</desc>
</func>
<func>
@@ -157,6 +189,22 @@
</desc>
</func>
<func>
+ <name name="set_encoding" arity="2"/>
+ <fsummary>Read and set the encoding of an IO device</fsummary>
+ <desc>
+ <p>Reads the <seealso marker="#encoding">encoding</seealso> from
+ an IO device and sets the encoding of the device
+ accordingly. The position of the IO device referenced by
+ <c><anno>File</anno></c> is not affected. If no valid
+ encoding can be read from the IO device the encoding of the
+ IO device is set to the
+ <seealso marker="#encoding">encoding</seealso> given by
+ <c><anno>Default</anno></c>.</p>
+ <p>Returns the read encoding, or <c>none</c> if no valid
+ encoding was found.</p>
+ </desc>
+ </func>
+ <func>
<name name="format_error" arity="1"/>
<fsummary>Format an error descriptor</fsummary>
<desc>
diff --git a/lib/stdlib/doc/src/erl_parse.xml b/lib/stdlib/doc/src/erl_parse.xml
index 2d5aff3c6c..cf0bff48cd 100644
--- a/lib/stdlib/doc/src/erl_parse.xml
+++ b/lib/stdlib/doc/src/erl_parse.xml
@@ -4,7 +4,7 @@
<erlref>
<header>
<copyright>
- <year>1996</year><year>2013</year>
+ <year>1996</year><year>2014</year>
<holder>Ericsson AB. All Rights Reserved.</holder>
</copyright>
<legalnotice>
@@ -173,6 +173,7 @@
</func>
<func>
<name name="abstract" arity="2"/>
+ <type name="encoding_func"/>
<fsummary>Convert an Erlang term into an abstract form</fsummary>
<desc>
<p>Converts the Erlang data structure <c><anno>Data</anno></c> into an
@@ -183,7 +184,12 @@
selecting which integer lists will be considered
as strings. The default is to use the encoding returned by
<seealso marker="epp#default_encoding/0">
- <c>epp:default_encoding/0</c></seealso></p>
+ <c>epp:default_encoding/0</c></seealso>.
+ The value <c>none</c> means that no integer lists will be
+ considered as strings. The <c>encoding_func()</c> will be
+ called with one integer of a list at a time, and if it
+ returns <c>true</c> for every integer the list will be
+ considered a string.</p>
</desc>
</func>
</funcs>
diff --git a/lib/stdlib/doc/src/erl_tar.xml b/lib/stdlib/doc/src/erl_tar.xml
index f81e36f810..7f25f5b7bc 100644
--- a/lib/stdlib/doc/src/erl_tar.xml
+++ b/lib/stdlib/doc/src/erl_tar.xml
@@ -35,10 +35,11 @@
<modulesummary>Unix 'tar' utility for reading and writing tar archives</modulesummary>
<description>
<p>The <c>erl_tar</c> module archives and extract files to and from
- a tar file. The tar file format is the POSIX extended tar file format
- specified in IEEE Std 1003.1 and ISO/IEC&nbsp;9945-1. That is the same
- format as used by <c>tar</c> program on Solaris, but is not the same
- as used by the GNU tar program.</p>
+ a tar file. <c>erl_tar</c> supports the <c>ustar</c> format
+ (IEEE Std 1003.1 and ISO/IEC&nbsp;9945-1). All modern <c>tar</c>
+ programs (including GNU tar) can read this format. To ensure that
+ that GNU tar produces a tar file that <c>erl_tar</c> can read,
+ give the <c>--format=ustar</c> option to GNU tar.</p>
<p>By convention, the name of a tar file should end in "<c>.tar</c>".
To abide to the convention, you'll need to add "<c>.tar</c>" yourself
to the name.</p>
@@ -65,6 +66,20 @@
</description>
<section>
+ <title>UNICODE SUPPORT</title>
+ <p>If <seealso
+ marker="kernel:file#native_name_encoding/0">file:native_name_encoding/0</seealso>
+ returns <c>utf8</c>, path names will be encoded in UTF-8 when
+ creating tar files and path names will be assumed to be encoded in
+ UTF-8 when extracting tar files.</p>
+
+ <p>If <seealso
+ marker="kernel:file#native_name_encoding/0">file:native_name_encoding/0</seealso>
+ returns <c>latin1</c>, no translation of path names will be
+ done.</p>
+ </section>
+
+ <section>
<title>LIMITATIONS</title>
<p>For maximum compatibility, it is safe to archive files with names
up to 100 characters in length. Such tar files can generally be
@@ -112,8 +127,8 @@
<fsummary>Add a file to an open tar file</fsummary>
<type>
<v>TarDescriptor = term()</v>
- <v>FilenameOrBin = Filename()|binary()</v>
- <v>Filename = filename()()</v>
+ <v>FilenameOrBin = filename()|binary()</v>
+ <v>Filename = filename()</v>
<v>NameInArchive = filename()</v>
<v>Options = [Option]</v>
<v>Option = dereference|verbose</v>
diff --git a/lib/stdlib/doc/src/ets.xml b/lib/stdlib/doc/src/ets.xml
index 21cf8e4149..3df24bf688 100644
--- a/lib/stdlib/doc/src/ets.xml
+++ b/lib/stdlib/doc/src/ets.xml
@@ -4,7 +4,7 @@
<erlref>
<header>
<copyright>
- <year>1996</year><year>2013</year>
+ <year>1996</year><year>2014</year>
<holder>Ericsson AB. All Rights Reserved.</holder>
</copyright>
<legalnotice>
@@ -171,6 +171,10 @@
<p>Returns a list of all tables at the node. Named tables are
given by their names, unnamed tables are given by their
table identifiers.</p>
+ <p>There is no guarantee of consistency in the returned list. Tables created
+ or deleted by other processes "during" the ets:all() call may or may
+ not be included in the list. Only tables created/deleted <em>before</em>
+ ets:all() is called are guaranteed to be included/excluded.</p>
</desc>
</func>
<func>
diff --git a/lib/stdlib/doc/src/gb_sets.xml b/lib/stdlib/doc/src/gb_sets.xml
index 8ca95df8fc..ea96c14472 100644
--- a/lib/stdlib/doc/src/gb_sets.xml
+++ b/lib/stdlib/doc/src/gb_sets.xml
@@ -4,7 +4,7 @@
<erlref>
<header>
<copyright>
- <year>2001</year><year>2013</year>
+ <year>2001</year><year>2014</year>
<holder>Ericsson AB. All Rights Reserved.</holder>
</copyright>
<legalnotice>
@@ -115,28 +115,40 @@
<datatypes>
<datatype>
- <name><marker id="type-gb_set">gb_set()</marker></name>
+ <name name="set" n_vars="1"/>
<desc><p>A GB set.</p></desc>
</datatype>
<datatype>
- <name name="iter"/>
+ <name name="set" n_vars="0"/>
+ <desc>
+ <p><c>set()</c> is equivalent to <c>set(term())</c>.</p>
+ </desc>
+ </datatype>
+ <datatype>
+ <name name="iter" n_vars="1"/>
<desc><p>A GB set iterator.</p></desc>
</datatype>
+ <datatype>
+ <name name="iter" n_vars="0"/>
+ <desc>
+ <p><c>iter()</c> is equivalent to <c>iter(term())</c>.</p>
+ </desc>
+ </datatype>
</datatypes>
<funcs>
<func>
<name name="add" arity="2"/>
<name name="add_element" arity="2"/>
- <fsummary>Add a (possibly existing) element to a gb_set</fsummary>
+ <fsummary>Add a (possibly existing) element to a set</fsummary>
<desc>
- <p>Returns a new gb_set formed from <c><anno>Set1</anno></c> with
+ <p>Returns a new set formed from <c><anno>Set1</anno></c> with
<c><anno>Element</anno></c> inserted. If <c><anno>Element</anno></c> is already an
element in <c><anno>Set1</anno></c>, nothing is changed.</p>
</desc>
</func>
<func>
<name name="balance" arity="1"/>
- <fsummary>Rebalance tree representation of a gb_set</fsummary>
+ <fsummary>Rebalance tree representation of a set</fsummary>
<desc>
<p>Rebalances the tree representation of <c><anno>Set1</anno></c>. Note that
this is rarely necessary, but may be motivated when a large
@@ -148,9 +160,9 @@
</func>
<func>
<name name="delete" arity="2"/>
- <fsummary>Remove an element from a gb_set</fsummary>
+ <fsummary>Remove an element from a set</fsummary>
<desc>
- <p>Returns a new gb_set formed from <c><anno>Set1</anno></c> with
+ <p>Returns a new set formed from <c><anno>Set1</anno></c> with
<c><anno>Element</anno></c> removed. Assumes that <c><anno>Element</anno></c> is present
in <c><anno>Set1</anno></c>.</p>
</desc>
@@ -158,9 +170,9 @@
<func>
<name name="delete_any" arity="2"/>
<name name="del_element" arity="2"/>
- <fsummary>Remove a (possibly non-existing) element from a gb_set</fsummary>
+ <fsummary>Remove a (possibly non-existing) element from a set</fsummary>
<desc>
- <p>Returns a new gb_set formed from <c><anno>Set1</anno></c> with
+ <p>Returns a new set formed from <c><anno>Set1</anno></c> with
<c><anno>Element</anno></c> removed. If <c><anno>Element</anno></c> is not an element
in <c><anno>Set1</anno></c>, nothing is changed.</p>
</desc>
@@ -168,7 +180,7 @@
<func>
<name name="difference" arity="2"/>
<name name="subtract" arity="2"/>
- <fsummary>Return the difference of two gb_sets</fsummary>
+ <fsummary>Return the difference of two sets</fsummary>
<desc>
<p>Returns only the elements of <c><anno>Set1</anno></c> which are not also
elements of <c><anno>Set2</anno></c>.</p>
@@ -177,14 +189,14 @@
<func>
<name name="empty" arity="0"/>
<name name="new" arity="0"/>
- <fsummary>Return an empty gb_set</fsummary>
+ <fsummary>Return an empty set</fsummary>
<desc>
- <p>Returns a new empty gb_set.</p>
+ <p>Returns a new empty set.</p>
</desc>
</func>
<func>
<name name="filter" arity="2"/>
- <fsummary>Filter gb_set elements</fsummary>
+ <fsummary>Filter set elements</fsummary>
<desc>
<p>Filters elements in <c><anno>Set1</anno></c> using predicate function
<c><anno>Pred</anno></c>.</p>
@@ -192,7 +204,7 @@
</func>
<func>
<name name="fold" arity="3"/>
- <fsummary>Fold over gb_set elements</fsummary>
+ <fsummary>Fold over set elements</fsummary>
<desc>
<p>Folds <c><anno>Function</anno></c> over every element in <c><anno>Set</anno></c>
returning the final value of the accumulator.</p>
@@ -200,46 +212,46 @@
</func>
<func>
<name name="from_list" arity="1"/>
- <fsummary>Convert a list into a gb_set</fsummary>
+ <fsummary>Convert a list into a set</fsummary>
<desc>
- <p>Returns a gb_set of the elements in <c><anno>List</anno></c>, where
+ <p>Returns a set of the elements in <c><anno>List</anno></c>, where
<c><anno>List</anno></c> may be unordered and contain duplicates.</p>
</desc>
</func>
<func>
<name name="from_ordset" arity="1"/>
- <fsummary>Make a gb_set from an ordset list</fsummary>
+ <fsummary>Make a set from an ordset list</fsummary>
<desc>
- <p>Turns an ordered-set list <c><anno>List</anno></c> into a gb_set. The list
+ <p>Turns an ordered-set list <c><anno>List</anno></c> into a set. The list
must not contain duplicates.</p>
</desc>
</func>
<func>
<name name="insert" arity="2"/>
- <fsummary>Add a new element to a gb_set</fsummary>
+ <fsummary>Add a new element to a set</fsummary>
<desc>
- <p>Returns a new gb_set formed from <c><anno>Set1</anno></c> with
+ <p>Returns a new set formed from <c><anno>Set1</anno></c> with
<c><anno>Element</anno></c> inserted. Assumes that <c><anno>Element</anno></c> is not
present in <c><anno>Set1</anno></c>.</p>
</desc>
</func>
<func>
<name name="intersection" arity="2"/>
- <fsummary>Return the intersection of two gb_sets</fsummary>
+ <fsummary>Return the intersection of two sets</fsummary>
<desc>
<p>Returns the intersection of <c><anno>Set1</anno></c> and <c><anno>Set2</anno></c>.</p>
</desc>
</func>
<func>
<name name="intersection" arity="1"/>
- <fsummary>Return the intersection of a list of gb_sets</fsummary>
+ <fsummary>Return the intersection of a list of sets</fsummary>
<desc>
- <p>Returns the intersection of the non-empty list of gb_sets.</p>
+ <p>Returns the intersection of the non-empty list of sets.</p>
</desc>
</func>
<func>
<name name="is_disjoint" arity="2"/>
- <fsummary>Check whether two gb_sets are disjoint</fsummary>
+ <fsummary>Check whether two sets are disjoint</fsummary>
<desc>
<p>Returns <c>true</c> if <c><anno>Set1</anno></c> and
<c><anno>Set2</anno></c> are disjoint (have no elements in common),
@@ -248,7 +260,7 @@
</func>
<func>
<name name="is_empty" arity="1"/>
- <fsummary>Test for empty gb_set</fsummary>
+ <fsummary>Test for empty set</fsummary>
<desc>
<p>Returns <c>true</c> if <c><anno>Set</anno></c> is an empty set, and
<c>false</c> otherwise.</p>
@@ -257,7 +269,7 @@
<func>
<name name="is_member" arity="2"/>
<name name="is_element" arity="2"/>
- <fsummary>Test for membership of a gb_set</fsummary>
+ <fsummary>Test for membership of a set</fsummary>
<desc>
<p>Returns <c>true</c> if <c><anno>Element</anno></c> is an element of
<c><anno>Set</anno></c>, otherwise <c>false</c>.</p>
@@ -265,9 +277,9 @@
</func>
<func>
<name name="is_set" arity="1"/>
- <fsummary>Test for a gb_set</fsummary>
+ <fsummary>Test for a set</fsummary>
<desc>
- <p>Returns <c>true</c> if <c><anno>Term</anno></c> appears to be a gb_set,
+ <p>Returns <c>true</c> if <c><anno>Term</anno></c> appears to be a set,
otherwise <c>false</c>.</p>
</desc>
</func>
@@ -281,7 +293,7 @@
</func>
<func>
<name name="iterator" arity="1"/>
- <fsummary>Return an iterator for a gb_set</fsummary>
+ <fsummary>Return an iterator for a set</fsummary>
<desc>
<p>Returns an iterator that can be used for traversing the
entries of <c><anno>Set</anno></c>; see <c>next/1</c>. The implementation
@@ -303,7 +315,7 @@
</func>
<func>
<name name="next" arity="1"/>
- <fsummary>Traverse a gb_set with an iterator</fsummary>
+ <fsummary>Traverse a set with an iterator</fsummary>
<desc>
<p>Returns <c>{<anno>Element</anno>, <anno>Iter2</anno>}</c> where <c><anno>Element</anno></c> is the
smallest element referred to by the iterator <c><anno>Iter1</anno></c>,
@@ -314,14 +326,14 @@
</func>
<func>
<name name="singleton" arity="1"/>
- <fsummary>Return a gb_set with one element</fsummary>
+ <fsummary>Return a set with one element</fsummary>
<desc>
- <p>Returns a gb_set containing only the element <c><anno>Element</anno></c>.</p>
+ <p>Returns a set containing only the element <c><anno>Element</anno></c>.</p>
</desc>
</func>
<func>
<name name="size" arity="1"/>
- <fsummary>Return the number of elements in a gb_set</fsummary>
+ <fsummary>Return the number of elements in a set</fsummary>
<desc>
<p>Returns the number of elements in <c><anno>Set</anno></c>.</p>
</desc>
@@ -356,24 +368,24 @@
</func>
<func>
<name name="to_list" arity="1"/>
- <fsummary>Convert a gb_set into a list</fsummary>
+ <fsummary>Convert a set into a list</fsummary>
<desc>
<p>Returns the elements of <c><anno>Set</anno></c> as a list.</p>
</desc>
</func>
<func>
<name name="union" arity="2"/>
- <fsummary>Return the union of two gb_sets</fsummary>
+ <fsummary>Return the union of two sets</fsummary>
<desc>
- <p>Returns the merged (union) gb_set of <c><anno>Set1</anno></c> and
+ <p>Returns the merged (union) set of <c><anno>Set1</anno></c> and
<c><anno>Set2</anno></c>.</p>
</desc>
</func>
<func>
<name name="union" arity="1"/>
- <fsummary>Return the union of a list of gb_sets</fsummary>
+ <fsummary>Return the union of a list of sets</fsummary>
<desc>
- <p>Returns the merged (union) gb_set of the list of gb_sets.</p>
+ <p>Returns the merged (union) set of the list of sets.</p>
</desc>
</func>
</funcs>
diff --git a/lib/stdlib/doc/src/gb_trees.xml b/lib/stdlib/doc/src/gb_trees.xml
index 57e60eacb7..b2f237e1d7 100644
--- a/lib/stdlib/doc/src/gb_trees.xml
+++ b/lib/stdlib/doc/src/gb_trees.xml
@@ -4,7 +4,7 @@
<erlref>
<header>
<copyright>
- <year>2001</year><year>2013</year>
+ <year>2001</year><year>2014</year>
<holder>Ericsson AB. All Rights Reserved.</holder>
</copyright>
<legalnotice>
@@ -59,13 +59,25 @@
<datatypes>
<datatype>
- <name><marker id="type-gb_tree">gb_tree()</marker></name>
+ <name name="tree" n_vars="2"/>
<desc><p>A GB tree.</p></desc>
</datatype>
<datatype>
- <name name="iter"/>
+ <name name="tree" n_vars="0"/>
+ <desc>
+ <p><c>tree()</c> is equivalent to <c>tree(term(), term())</c>.</p>
+ </desc>
+ </datatype>
+ <datatype>
+ <name name="iter" n_vars="2"/>
<desc><p>A GB tree iterator.</p></desc>
</datatype>
+ <datatype>
+ <name name="iter" n_vars="0"/>
+ <desc>
+ <p><c>iter()</c> is equivalent to <c>iter(term(), term())</c>.</p>
+ </desc>
+ </datatype>
</datatypes>
<funcs>
<func>
@@ -108,9 +120,9 @@
<name name="enter" arity="3"/>
<fsummary>Insert or update key with value in a tree</fsummary>
<desc>
- <p>Inserts <c><anno>Key</anno></c> with value <c><anno>Val</anno></c> into <c><anno>Tree1</anno></c> if
+ <p>Inserts <c><anno>Key</anno></c> with value <c><anno>Value</anno></c> into <c><anno>Tree1</anno></c> if
the key is not present in the tree, otherwise updates
- <c><anno>Key</anno></c> to value <c><anno>Val</anno></c> in <c><anno>Tree1</anno></c>. Returns the
+ <c><anno>Key</anno></c> to value <c><anno>Value</anno></c> in <c><anno>Tree1</anno></c>. Returns the
new tree.</p>
</desc>
</func>
@@ -135,7 +147,7 @@
<name name="insert" arity="3"/>
<fsummary>Insert a new key and value in a tree</fsummary>
<desc>
- <p>Inserts <c><anno>Key</anno></c> with value <c><anno>Val</anno></c> into <c><anno>Tree1</anno></c>;
+ <p>Inserts <c><anno>Key</anno></c> with value <c><anno>Value</anno></c> into <c><anno>Tree1</anno></c>;
returns the new tree. Assumes that the key is not present in
the tree, crashes otherwise.</p>
</desc>
@@ -181,8 +193,8 @@
<name name="largest" arity="1"/>
<fsummary>Return largest key and value</fsummary>
<desc>
- <p>Returns <c>{<anno>Key</anno>, <anno>Val</anno>}</c>, where <c><anno>Key</anno></c> is the largest
- key in <c><anno>Tree</anno></c>, and <c><anno>Val</anno></c> is the value associated
+ <p>Returns <c>{<anno>Key</anno>, <anno>Value</anno>}</c>, where <c><anno>Key</anno></c> is the largest
+ key in <c><anno>Tree</anno></c>, and <c><anno>Value</anno></c> is the value associated
with this key. Assumes that the tree is nonempty.</p>
</desc>
</func>
@@ -191,7 +203,7 @@
<fsummary>Look up a key in a tree</fsummary>
<desc>
<p>Looks up <c><anno>Key</anno></c> in <c><anno>Tree</anno></c>; returns
- <c>{value, <anno>Val</anno>}</c>, or <c>none</c> if <c><anno>Key</anno></c> is not
+ <c>{value, <anno>Value</anno>}</c>, or <c>none</c> if <c><anno>Key</anno></c> is not
present.</p>
</desc>
</func>
@@ -207,7 +219,7 @@
<name name="next" arity="1"/>
<fsummary>Traverse a tree with an iterator</fsummary>
<desc>
- <p>Returns <c>{<anno>Key</anno>, <anno>Val</anno>, <anno>Iter2</anno>}</c> where <c><anno>Key</anno></c> is the
+ <p>Returns <c>{<anno>Key</anno>, <anno>Value</anno>, <anno>Iter2</anno>}</c> where <c><anno>Key</anno></c> is the
smallest key referred to by the iterator <c><anno>Iter1</anno></c>, and
<c><anno>Iter2</anno></c> is the new iterator to be used for
traversing the remaining nodes, or the atom <c>none</c> if no
@@ -225,8 +237,8 @@
<name name="smallest" arity="1"/>
<fsummary>Return smallest key and value</fsummary>
<desc>
- <p>Returns <c>{<anno>Key</anno>, <anno>Val</anno>}</c>, where <c><anno>Key</anno></c> is the smallest
- key in <c><anno>Tree</anno></c>, and <c><anno>Val</anno></c> is the value associated
+ <p>Returns <c>{<anno>Key</anno>, <anno>Value</anno>}</c>, where <c><anno>Key</anno></c> is the smallest
+ key in <c><anno>Tree</anno></c>, and <c><anno>Value</anno></c> is the value associated
with this key. Assumes that the tree is nonempty.</p>
</desc>
</func>
@@ -234,8 +246,8 @@
<name name="take_largest" arity="1"/>
<fsummary>Extract largest key and value</fsummary>
<desc>
- <p>Returns <c>{<anno>Key</anno>, <anno>Val</anno>, <anno>Tree2</anno>}</c>, where <c><anno>Key</anno></c> is the
- largest key in <c><anno>Tree1</anno></c>, <c><anno>Val</anno></c> is the value
+ <p>Returns <c>{<anno>Key</anno>, <anno>Value</anno>, <anno>Tree2</anno>}</c>, where <c><anno>Key</anno></c> is the
+ largest key in <c><anno>Tree1</anno></c>, <c><anno>Value</anno></c> is the value
associated with this key, and <c><anno>Tree2</anno></c> is this tree with
the corresponding node deleted. Assumes that the tree is
nonempty.</p>
@@ -245,8 +257,8 @@
<name name="take_smallest" arity="1"/>
<fsummary>Extract smallest key and value</fsummary>
<desc>
- <p>Returns <c>{<anno>Key</anno>, <anno>Val</anno>, <anno>Tree2</anno>}</c>, where <c><anno>Key</anno></c> is the
- smallest key in <c><anno>Tree1</anno></c>, <c><anno>Val</anno></c> is the value
+ <p>Returns <c>{<anno>Key</anno>, <anno>Value</anno>, <anno>Tree2</anno>}</c>, where <c><anno>Key</anno></c> is the
+ smallest key in <c><anno>Tree1</anno></c>, <c><anno>Value</anno></c> is the value
associated with this key, and <c><anno>Tree2</anno></c> is this tree with
the corresponding node deleted. Assumes that the tree is
nonempty.</p>
@@ -263,7 +275,7 @@
<name name="update" arity="3"/>
<fsummary>Update a key to new value in a tree</fsummary>
<desc>
- <p>Updates <c><anno>Key</anno></c> to value <c><anno>Val</anno></c> in <c><anno>Tree1</anno></c>;
+ <p>Updates <c><anno>Key</anno></c> to value <c><anno>Value</anno></c> in <c><anno>Tree1</anno></c>;
returns the new tree. Assumes that the key is present in the
tree.</p>
</desc>
diff --git a/lib/stdlib/doc/src/lists.xml b/lib/stdlib/doc/src/lists.xml
index 251a383cf8..ee3c51c62c 100644
--- a/lib/stdlib/doc/src/lists.xml
+++ b/lib/stdlib/doc/src/lists.xml
@@ -123,6 +123,14 @@
</desc>
</func>
<func>
+ <name name="droplast" arity="1"/>
+ <fsummary>Drop the last element of a list</fsummary>
+ <desc>
+ <p>Drops the last element of a <c><anno>List</anno></c>. The list should
+ be non-empty, otherwise the function will crash with a <c>function_clause</c></p>
+ </desc>
+ </func>
+ <func>
<name name="dropwhile" arity="2"/>
<fsummary>Drop elements from a list while a predicate is true</fsummary>
<desc>
diff --git a/lib/stdlib/doc/src/maps.xml b/lib/stdlib/doc/src/maps.xml
new file mode 100644
index 0000000000..b37f7fd7fd
--- /dev/null
+++ b/lib/stdlib/doc/src/maps.xml
@@ -0,0 +1,338 @@
+<?xml version="1.0" encoding="utf-8" ?>
+<!DOCTYPE erlref SYSTEM "erlref.dtd">
+
+<erlref>
+ <header>
+ <copyright>
+ <year>2013</year><year>2014</year>
+ <holder>Ericsson AB. All Rights Reserved.</holder>
+ </copyright>
+ <legalnotice>
+ 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.
+ </legalnotice>
+ <title>maps</title>
+ <prepared>Björn-Egil Dahlberg</prepared>
+ <docno>1</docno>
+ <date>2014-02-28</date>
+ <rev>A</rev>
+ </header>
+ <module>maps</module>
+ <modulesummary>Maps Processing Functions</modulesummary>
+ <description>
+ <p>This module contains functions for maps processing.</p>
+ </description>
+ <funcs>
+
+ <func>
+ <name name="find" arity="2"/>
+ <fsummary></fsummary>
+ <desc>
+ <p>
+ Returns a tuple <c>{ok, Value}</c> where <c><anno>Value</anno></c> is the value associated with <c><anno>Key</anno></c>,
+ or <c>error</c> if no value is associated with <c><anno>Key</anno></c> in <c><anno>Map</anno></c>.
+ </p>
+ <p>Example:</p>
+ <code type="none">
+> Map = #{"hi" => 42},
+ Key = "hi",
+ maps:find(Key,Map).
+{ok,42} </code>
+ </desc>
+ </func>
+
+ <func>
+ <name name="fold" arity="3"/>
+ <fsummary></fsummary>
+ <desc>
+ <p>
+ Calls <c>F(K, V, AccIn)</c> for every <c><anno>K</anno></c> to value <c><anno>V</anno></c>
+ association in <c><anno>Map</anno></c> in
+ arbitrary order. The function <c>fun F/3</c> must return a new accumulator
+ which is passed to the next successive call. <c>maps:fold/3</c> returns the final
+ value of the accumulator. The initial accumulator value <c><anno>Init</anno></c> is returned if
+ the map is empty.
+ </p>
+ <p>Example:</p>
+ <code type="none">
+> Fun = fun(K,V,AccIn) when is_list(K) -> AccIn + V end,
+ Map = #{"k1" => 1, "k2" => 2, "k3" => 3},
+ maps:fold(Fun,0,Map).
+6</code>
+ </desc>
+ </func>
+
+ <func>
+ <name name="from_list" arity="1"/>
+ <fsummary></fsummary>
+ <desc>
+ <p>
+ The function takes a list of key-value tuples elements and builds a
+ map. The associations may be in any order and both keys and values in the
+ association may be of any term. If the same key appears more than once,
+ the latter (rightmost) value is used and the previous values are ignored.
+ </p>
+ <p>Example:</p>
+ <code type="none">
+> List = [{"a",ignored},{1337,"value two"},{42,value_three},{"a",1}],
+ maps:from_list(List).
+#{42 => value_three,1337 => "value two","a" => 1}</code>
+ </desc>
+ </func>
+
+ <func>
+ <name name="get" arity="2"/>
+ <fsummary></fsummary>
+ <desc>
+ <p>
+ Returns the value <c><anno>Value</anno></c> associated with <c><anno>Key</anno></c> if
+ <c><anno>Map</anno></c> contains <c><anno>Key</anno></c>.
+ If no value is associated with <c><anno>Key</anno></c> then the call will
+ fail with an exception.
+ </p>
+ <p>Example:</p>
+ <code type="none">
+> Key = 1337,
+ Map = #{42 => value_two,1337 => "value one","a" => 1},
+ maps:get(Key,Map).
+"value one"</code>
+ </desc>
+ </func>
+
+ <func>
+ <name name="get" arity="3"/>
+ <fsummary></fsummary>
+ <desc>
+ <p>
+ Returns the value <c><anno>Value</anno></c> associated with <c><anno>Key</anno></c> if
+ <c><anno>Map</anno></c> contains <c><anno>Key</anno></c>.
+ If no value is associated with <c><anno>Key</anno></c> then returns <c><anno>Default</anno></c>.
+ </p>
+ <p>Example:</p>
+ <code type="none">
+> Map = #{ key1 => val1, key2 => val2 }.
+#{key1 => val1,key2 => val2}
+> maps:get(key1, Map, "Default value").
+val1
+> maps:get(key3, Map, "Default value").
+"Default value"</code>
+ </desc>
+ </func>
+
+ <func>
+ <name name="is_key" arity="2"/>
+ <fsummary></fsummary>
+ <desc>
+ <p>
+ Returns <c>true</c> if map <c><anno>Map</anno></c> contains <c><anno>Key</anno></c> and returns
+ <c>false</c> if it does not contain the <c><anno>Key</anno></c>.
+ The function will fail with an exception if <c><anno>Map</anno></c> is not a Map.
+ </p>
+ <p>Example:</p>
+ <code type="none">
+> Map = #{"42" => value}.
+#{"42"> => value}
+> maps:is_key("42",Map).
+true
+> maps:is_key(value,Map).
+false</code>
+ </desc>
+ </func>
+
+ <func>
+ <name name="keys" arity="1"/>
+ <fsummary></fsummary>
+ <desc>
+ <p>
+ Returns a complete list of keys, in arbitrary order, which resides within <c><anno>Map</anno></c>.
+ </p>
+ <p>Example:</p>
+ <code type="none">
+> Map = #{42 => value_three,1337 => "value two","a" => 1},
+ maps:keys(Map).
+[42,1337,"a"]</code>
+ </desc>
+ </func>
+
+ <func>
+ <name name="map" arity="2"/>
+ <fsummary></fsummary>
+ <desc>
+ <p>
+ The function produces a new map <c><anno>Map2</anno></c> by calling the function <c>fun F(K, V1)</c> for
+ every <c><anno>K</anno></c> to value <c><anno>V1</anno></c> association in <c><anno>Map1</anno></c> in arbitrary order.
+ The function <c>fun F/2</c> must return the value <c><anno>V2</anno></c> to be associated with key <c><anno>K</anno></c> for
+ the new map <c><anno>Map2</anno></c>.
+ </p>
+ <p>Example:</p>
+ <code type="none">
+> Fun = fun(K,V1) when is_list(K) -> V1*2 end,
+ Map = #{"k1" => 1, "k2" => 2, "k3" => 3},
+ maps:map(Fun,Map).
+#{"k1" => 2,"k2" => 4,"k3" => 6}</code>
+ </desc>
+ </func>
+
+ <func>
+ <name name="merge" arity="2"/>
+ <fsummary></fsummary>
+ <desc>
+ <p>
+ Merges two maps into a single map <c><anno>Map3</anno></c>. If two keys exists in both maps the
+ value in <c><anno>Map1</anno></c> will be superseded by the value in <c><anno>Map2</anno></c>.
+ </p>
+ <p>Example:</p>
+ <code type="none">
+> Map1 = #{a => "value_one", b => "value_two"},
+ Map2 = #{a => 1, c => 2},
+ maps:merge(Map1,Map2).
+#{a => 1,b => "value_two",c => 2}</code>
+ </desc>
+ </func>
+
+ <func>
+ <name name="new" arity="0"/>
+ <fsummary></fsummary>
+ <desc>
+ <p>
+ Returns a new empty map.
+ </p>
+ <p>Example:</p>
+ <code type="none">
+> maps:new().
+#{}</code>
+ </desc>
+ </func>
+
+ <func>
+ <name name="put" arity="3"/>
+ <fsummary></fsummary>
+ <desc>
+ <p>
+ Associates <c><anno>Key</anno></c> with value <c><anno>Value</anno></c> and inserts the association into map <c>Map2</c>.
+ If key <c><anno>Key</anno></c> already exists in map <c><anno>Map1</anno></c>, the old associated value is
+ replaced by value <c><anno>Value</anno></c>. The function returns a new map <c><anno>Map2</anno></c> containing the new association and
+ the old associations in <c><anno>Map1</anno></c>.
+ </p>
+ <p>Example:</p>
+ <code type="none">
+> Map = #{"a" => 1}.
+#{"a" => 1}
+> maps:put("a", 42, Map).
+#{"a" => 42}
+> maps:put("b", 1337, Map).
+#{"a" => 1,"b" => 1337}</code>
+ </desc>
+ </func>
+
+ <func>
+ <name name="remove" arity="2"/>
+ <fsummary></fsummary>
+ <desc>
+ <p>
+ The function removes the <c><anno>Key</anno></c>, if it exists, and its associated value from
+ <c><anno>Map1</anno></c> and returns a new map <c><anno>Map2</anno></c> without key <c><anno>Key</anno></c>.
+ </p>
+ <p>Example:</p>
+ <code type="none">
+> Map = #{"a" => 1}.
+#{"a" => 1}
+> maps:remove("a",Map).
+#{}
+> maps:remove("b",Map).
+#{"a" => 1}</code>
+ </desc>
+ </func>
+
+ <func>
+ <name name="size" arity="1"/>
+ <fsummary></fsummary>
+ <desc>
+ <p>
+ The function returns the number of key-value associations in the <c><anno>Map</anno></c>.
+ This operation happens in constant time.
+ </p>
+ <p>Example:</p>
+ <code type="none">
+> Map = #{42 => value_two,1337 => "value one","a" => 1},
+ maps:size(Map).
+3</code>
+ </desc>
+ </func>
+
+ <func>
+ <name name="to_list" arity="1"/>
+ <fsummary></fsummary>
+ <desc>
+ <p>
+ The fuction returns a list of pairs representing the key-value associations of <c><anno>Map</anno></c>,
+ where the pairs, <c>[{K1,V1}, ..., {Kn,Vn}]</c>, are returned in arbitrary order.
+ </p>
+ <p>Example:</p>
+ <code type="none">
+> Map = #{42 => value_three,1337 => "value two","a" => 1},
+ maps:to_list(Map).
+[{42,value_three},{1337,"value two"},{"a",1}]</code>
+ </desc>
+ </func>
+
+ <func>
+ <name name="update" arity="3"/>
+ <fsummary></fsummary>
+ <desc>
+ <p>
+ If <c><anno>Key</anno></c> exists in <c><anno>Map1</anno></c> the old associated value is
+ replaced by value <c><anno>Value</anno></c>. The function returns a new map <c><anno>Map2</anno></c> containing
+ the new associated value. If <c><anno>Key</anno></c> does not exist in <c><anno>Map1</anno></c> an exception is
+ generated.
+ </p>
+ <p>Example:</p>
+ <code type="none">
+> Map = #{"a" => 1}.
+#{"a" => 1}
+> maps:update("a", 42, Map).
+#{"a" => 42}</code>
+ </desc>
+ </func>
+
+ <func>
+ <name name="values" arity="1"/>
+ <fsummary></fsummary>
+ <desc>
+ <p>
+ Returns a complete list of values, in arbitrary order, contained in map <c>M</c>.
+ </p>
+ <p>Example:</p>
+ <code type="none">
+> Map = #{42 => value_three,1337 => "value two","a" => 1},
+ maps:values(Map).
+[value_three,"value two",1]</code>
+ </desc>
+ </func>
+
+ <func>
+ <name name="without" arity="2"/>
+ <fsummary></fsummary>
+ <desc>
+ <p>
+ Returns a new map <c><anno>Map2</anno></c> without the keys <c>K1</c> through <c>Kn</c> and their associated values from map <c><anno>Map1</anno></c>.
+ Any key in <c><anno>Ks</anno></c> that does not exist in <c><anno>Map1</anno></c> are ignored.
+ </p>
+ <p>Example:</p>
+ <code type="none">
+> Map = #{42 => value_three,1337 => "value two","a" => 1},
+ Ks = ["a",42,"other key"],
+ maps:without(Ks,Map).
+#{1337 => "value two"}</code>
+ </desc>
+ </func>
+ </funcs>
+</erlref>
diff --git a/lib/stdlib/doc/src/notes.xml b/lib/stdlib/doc/src/notes.xml
index e94a4d6a55..15e6fdfa9f 100644
--- a/lib/stdlib/doc/src/notes.xml
+++ b/lib/stdlib/doc/src/notes.xml
@@ -30,6 +30,390 @@
</header>
<p>This document describes the changes made to the STDLIB application.</p>
+<section><title>STDLIB 2.0</title>
+
+ <section><title>Fixed Bugs and Malfunctions</title>
+ <list>
+ <item>
+ <p>
+ The option dupnames did not work as intended in re. When
+ looking for names with {capture, [Name, ...]}, re:run
+ returned a random instance of the match for that name,
+ instead of the leftmost matching instance, which was what
+ the documentation stated. This is now corrected to adhere
+ to the documentation. The option {capture,all_names}
+ along with a re:inspect/2 function is also added to
+ further help in using named subpatterns.</p>
+ <p>
+ Own Id: OTP-11205</p>
+ </item>
+ <item>
+ <p>
+ If option 'binary' was set for standard_input, then c:i()
+ would hang if the output was more than one page long -
+ i.e. then input after "(c)ontinue (q)uit --&gt;" could
+ not be read. This has been corrected. (Thanks to José
+ Valim)</p>
+ <p>
+ Own Id: OTP-11589</p>
+ </item>
+ <item>
+ <p>
+ stdlib/lists: Add function droplast/1 This functions
+ drops the last element of a non-empty list. lists:last/1
+ and lists:droplast/1 are the dual of hd/1 and tl/1 but
+ for the end of a list. (Thanks to Hans Svensson)</p>
+ <p>
+ Own Id: OTP-11677</p>
+ </item>
+ <item>
+ <p>
+ Allow all auto imports to be suppressed at once.
+ Introducing the no_auto_import attribute:
+ -compile(no_auto_import). Useful for code generation
+ tools that always use the qualified function names and
+ want to avoid the auto imported functions clashing with
+ local ones. (Thanks to José Valim.)</p>
+ <p>
+ Own Id: OTP-11682</p>
+ </item>
+ <item>
+ <p>
+ supervisor_bridge does no longer report normal
+ termination of children. The reason is that in some
+ cases, for instance when the restart strategy is
+ simple_one_for_one, the log could be completely
+ overloaded with reports about normally terminating
+ processes. (Thanks to Artem Ocheredko)</p>
+ <p>
+ Own Id: OTP-11685</p>
+ </item>
+ <item>
+ <p> The type annotations for alternative registries using
+ the {via, Module, Name} syntax for sup_name() and
+ sup_ref() in the supervisor module are now consistent
+ with the documentation. Dialyzer should no longer
+ complain about valid supervisor:start_link() and
+ supervisor:start_child() calls. (Thanks to Caleb
+ Helbling.) </p>
+ <p>
+ Own Id: OTP-11707</p>
+ </item>
+ <item>
+ <p> Two Dets bugs have been fixed. When trying to open a
+ short file that is not a Dets file, the file was deleted
+ even with just read access. Calling
+ <c>dets:is_dets_file/1</c> with a file that is not a Dets
+ file, a file descriptor was left open. (Thanks to Håkan
+ Mattsson for reporting the bugs.) </p>
+ <p>
+ Own Id: OTP-11709</p>
+ </item>
+ <item>
+ <p>
+ Fix race bug in <c>ets:all</c>. Concurrent creation of
+ tables could cause other tables to not be included in the
+ result. (Thanks to Florian Schintke for bug report)</p>
+ <p>
+ Own Id: OTP-11726</p>
+ </item>
+ <item>
+ <p>
+ erl_eval now properly evaluates '=='/2 when it is used in
+ guards. (Thanks to José Valim)</p>
+ <p>
+ Own Id: OTP-11747</p>
+ </item>
+ <item>
+ <p>
+ Calls to proplists:get_value/3 are replaced by the faster
+ lists:keyfind/3 in io_lib_pretty. Elements in the list
+ are always 2-tuples. (Thanks to Andrew Thompson)</p>
+ <p>
+ Own Id: OTP-11752</p>
+ </item>
+ <item>
+ <p> A qlc bug where filters were erroneously optimized
+ away has been fixed. Thanks to Sam Bobroff for reporting
+ the bug. </p>
+ <p>
+ Own Id: OTP-11758</p>
+ </item>
+ <item>
+ <p>
+ A number of compiler errors where unusual or nonsensical
+ code would crash the compiler have been reported by Ulf
+ Norell and corrected by Anthony Ramine.</p>
+ <p>
+ Own Id: OTP-11770</p>
+ </item>
+ <item>
+ <p> Since Erlang/OTP R16B the Erlang Core Linter
+ (<c>erl_lint</c>) has not emitted errors when built-in
+ types were re-defined. This bug has been fixed. (Thanks
+ to Roberto Aloi.) </p>
+ <p>
+ Own Id: OTP-11772</p>
+ </item>
+ <item>
+ <p>
+ The functions <c>sys:get_state/1,2</c> and
+ <c>sys:replace_state/2,3</c> are fixed so they can now be
+ run while the process is sys suspended. To accomplish
+ this, the new callbacks <c>Mod:system_get_state/1</c> and
+ <c>Mod:system_replace_state/2</c> are added, which are
+ also implemented by the generic behaviours
+ <c>gen_server</c>, <c>gen_event</c> and <c>gen_fsm</c>.</p>
+ <p>
+ The potential incompatibility refers to</p>
+ <p>
+ <list> <item>The previous behaviour of intercepting the
+ system message and passing a tuple of size 2 as the last
+ argument to <c>sys:handle_system_msg/6</c> is no longer
+ supported.</item> <item>The error handling when
+ <c>StateFun</c> in <c>sys:replace_state/2,3</c> fails is
+ changed from being totally silent to possibly (if the
+ callback module does not catch) throw an exception in the
+ client process.</item> </list></p>
+ <p>
+ (Thanks to James Fish and Steve Vinoski)</p>
+ <p>
+ *** POTENTIAL INCOMPATIBILITY ***</p>
+ <p>
+ Own Id: OTP-11817</p>
+ </item>
+ </list>
+ </section>
+
+
+ <section><title>Improvements and New Features</title>
+ <list>
+ <item>
+ <p>
+ Options to set match_limit and match_limit_recursion are
+ added to re:run. The option report_errors is also added
+ to get more information when re:run fails due to limits
+ or compilation errors.</p>
+ <p>
+ Own Id: OTP-10285</p>
+ </item>
+ <item>
+ <p> The pre-defined types <c>array/0</c>, <c>dict/0</c>,
+ <c>digraph/0</c>, <c>gb_set/0</c>, <c>gb_tree/0</c>,
+ <c>queue/0</c>, <c>set/0</c>, and <c>tid/0</c> have been
+ deprecated. They will be removed in Erlang/OTP 18.0. </p>
+ <p> Instead the types <c>array:array/0</c>,
+ <c>dict:dict/0</c>, <c>digraph:graph/0</c>,
+ <c>gb_set:set/0</c>, <c>gb_tree:tree/0</c>,
+ <c>queue:queue/0</c>, <c>sets:set/0</c>, and
+ <c>ets:tid/0</c> can be used. (Note: it has always been
+ necessary to use <c>ets:tid/0</c>.) </p> <p> It is
+ allowed in Erlang/OTP 17.0 to locally re-define the types
+ <c>array/0</c>, <c>dict/0</c>, and so on. </p> <p> New
+ types <c>array:array/1</c>, <c>dict:dict/2</c>,
+ <c>gb_sets:set/1</c>, <c>gb_trees:tree/2</c>,
+ <c>queue:queue/1</c>, and <c>sets:set/1</c> have been
+ added. </p> <p> A compiler option,
+ <c>nowarn_deprecated_type</c>, has been introduced. By
+ including the attribute </p> <c>
+ -compile(nowarn_deprecated_type).</c> <p> in an Erlang
+ source file, warnings about deprecated types can be
+ avoided in Erlang/OTP 17.0. </p> <p> The option can also
+ be given as a compiler flag: </p> <c> erlc
+ +nowarn_deprecated_type file.erl</c>
+ <p>
+ Own Id: OTP-10342</p>
+ </item>
+ <item>
+ <p>
+ Calls to erlang:open_port/2 with 'spawn' are updated to
+ handle space in the command path.</p>
+ <p>
+ Own Id: OTP-10842</p>
+ </item>
+ <item>
+ <p> Dialyzer's <c>unmatched_return</c> warnings have been
+ corrected. </p>
+ <p>
+ Own Id: OTP-10908</p>
+ </item>
+ <item>
+ <p>
+ Forbid unsized fields in patterns of binary generators
+ and simplified v3_core's translation of bit string
+ generators. (Thanks to Anthony Ramine.)</p>
+ <p>
+ Own Id: OTP-11186</p>
+ </item>
+ <item>
+ <p>
+ The version of the PCRE library Used by Erlang's re
+ module is raised to 8.33 from 7.6. This means, among
+ other things, better Unicode and Unicode Character
+ Properties support. New options connected to PCRE 8.33
+ are also added to the re module (ucd, notempty_atstart,
+ no_start_optimize). PCRE has extended the regular
+ expression syntax between 7.6 and 8.33, why this imposes
+ a potential incompatibility. Only very complicated
+ regular expressions may be affected, but if you know you
+ are using obscure features, please test run your regular
+ expressions and verify that their behavior has not
+ changed.</p>
+ <p>
+ *** POTENTIAL INCOMPATIBILITY ***</p>
+ <p>
+ Own Id: OTP-11204</p>
+ </item>
+ <item>
+ <p>
+ Added dict:is_empty/1 and orddict:is_empty/1. (Thanks to
+ Magnus Henoch.)</p>
+ <p>
+ Own Id: OTP-11353</p>
+ </item>
+ <item>
+ <p>
+ A call to either the <c>garbage_collect/1</c> BIF or the
+ <c>check_process_code/2</c> BIF may trigger garbage
+ collection of another processes than the process calling
+ the BIF. The previous implementations performed these
+ kinds of garbage collections without considering the
+ internal state of the process being garbage collected. In
+ order to be able to more easily and more efficiently
+ implement yielding native code, these types of garbage
+ collections have been rewritten. A garbage collection
+ like this is now triggered by an asynchronous request
+ signal, the actual garbage collection is performed by the
+ process being garbage collected itself, and finalized by
+ a reply signal to the process issuing the request. Using
+ this approach processes can disable garbage collection
+ and yield without having to set up the heap in a state
+ that can be garbage collected.</p>
+ <p>
+ The <seealso
+ marker="erts:erlang#garbage_collect/2"><c>garbage_collect/2</c></seealso>,
+ and <seealso
+ marker="erts:erlang#check_process_code/3"><c>check_process_code/3</c></seealso>
+ BIFs have been introduced. Both taking an option list as
+ last argument. Using these, one can issue asynchronous
+ requests.</p>
+ <p>
+ <c>code:purge/1</c> and <c>code:soft_purge/1</c> have
+ been rewritten to utilize asynchronous
+ <c>check_process_code</c> requests in order to
+ parallelize work.</p>
+ <p>
+ Characteristics impact: A call to the
+ <c>garbage_collect/1</c> BIF or the
+ <c>check_process_code/2</c> BIF will normally take longer
+ time to complete while the system as a whole wont be as
+ much negatively effected by the operation as before. A
+ call to <c>code:purge/1</c> and <c>code:soft_purge/1</c>
+ may complete faster or slower depending on the state of
+ the system while the system as a whole wont be as much
+ negatively effected by the operation as before.</p>
+ <p>
+ Own Id: OTP-11388 Aux Id: OTP-11535, OTP-11648 </p>
+ </item>
+ <item>
+ <p> Improve the documentation of the supervisor's
+ <c>via</c> reference. (Thanks to MaximMinin.) </p>
+ <p>
+ Own Id: OTP-11399</p>
+ </item>
+ <item>
+ <p><c>orddict:from_list/1</c> now uses the optimized sort
+ routines in the <c>lists</c> module instead of
+ (essentially) an insertion sort. Depending on the input
+ data, the speed of the new <c>from_list/1</c> is anything
+ from slightly faster up to several orders of magnitude
+ faster than the old <c>from_list/1</c>.</p> (Thanks to
+ Steve Vinoski.)
+ <p>
+ Own Id: OTP-11552</p>
+ </item>
+ <item>
+ <p>
+ EEP43: New data type - Maps</p>
+ <p>
+ With Maps you may for instance: <taglist> <item><c>M0 =
+ #{ a =&gt; 1, b =&gt; 2}, % create
+ associations</c></item> <item><c>M1 = M0#{ a := 10 }, %
+ update values</c></item> <item><c>M2 = M1#{ "hi" =&gt;
+ "hello"}, % add new associations</c></item> <item><c>#{
+ "hi" := V1, a := V2, b := V3} = M2. % match keys with
+ values</c></item> </taglist></p>
+ <p>
+ For information on how to use Maps please see the
+ <seealso marker="doc/reference_manual:maps">Reference
+ Manual</seealso>.</p>
+ <p>
+ The current implementation is without the following
+ features: <taglist> <item>No variable keys</item>
+ <item>No single value access</item> <item>No map
+ comprehensions</item> </taglist></p>
+ <p>
+ Note that Maps is <em>experimental</em> during OTP 17.0.</p>
+ <p>
+ Own Id: OTP-11616</p>
+ </item>
+ <item>
+ <p>
+ When tab completing the erlang shell now expands
+ zero-arity functions all the way to closing parenthesis,
+ unless there is another function with the same name and a
+ different arity. (Thanks to Pierre Fenoll.)</p>
+ <p>
+ Own Id: OTP-11684</p>
+ </item>
+ <item>
+ <p> The Erlang Code Preprocessor (<c>epp</c>) could loop
+ when encountering a circular macro definition in an
+ included file. This bug has been fixed. </p> <p> Thanks
+ to Maruthavanan Subbarayan for reporting the bug, and to
+ Richard Carlsson for providing a bug fix. </p>
+ <p>
+ Own Id: OTP-11728</p>
+ </item>
+ <item>
+ <p> The Erlang Code Linter (<c>erl_lint</c>) has since
+ Erlang/OTP R13B emitted warnings whenever any of the
+ types <c>arity()</c>, <c>bitstring()</c>,
+ <c>iodata()</c>, or <c>boolean()</c> were re-defined. Now
+ errors are emitted instead. </p>
+ <p>
+ *** POTENTIAL INCOMPATIBILITY ***</p>
+ <p>
+ Own Id: OTP-11771</p>
+ </item>
+ <item>
+ <p> The <c>encoding</c> option of
+ <c>erl_parse:abstract/2</c> has been extended to include
+ <c>none</c> and a callback function (a predicate). </p>
+ <p>
+ Own Id: OTP-11807</p>
+ </item>
+ <item>
+ <p>
+ Export zip option types to allow referal from other
+ modules.</p>
+ <p>
+ Thanks to Pierre Fenoll and Håkan Mattson</p>
+ <p>
+ Own Id: OTP-11828</p>
+ </item>
+ <item>
+ <p>
+ The module <c>pg</c> has been deprecated and will be
+ removed in Erlang/OTP 18.</p>
+ <p>
+ Own Id: OTP-11840</p>
+ </item>
+ </list>
+ </section>
+
+</section>
+
<section><title>STDLIB 1.19.4</title>
<section><title>Fixed Bugs and Malfunctions</title>
diff --git a/lib/stdlib/doc/src/pg.xml b/lib/stdlib/doc/src/pg.xml
index 7cc1b805b4..a3b69884b6 100644
--- a/lib/stdlib/doc/src/pg.xml
+++ b/lib/stdlib/doc/src/pg.xml
@@ -5,7 +5,7 @@
<header>
<copyright>
<year>1996</year>
- <year>2013</year>
+ <year>2014</year>
<holder>Ericsson AB, All Rights Reserved</holder>
</copyright>
<legalnotice>
@@ -32,6 +32,9 @@
<module>pg</module>
<modulesummary>Distributed, Named Process Groups</modulesummary>
<description>
+ <warning>
+ <p>This module is deprecated and will be removed in Erlang/OTP 18.</p>
+ </warning>
<p>This (experimental) module implements process groups. A process
group is a group of processes that can be accessed by a common
name. For example, a group named <c>foobar</c> can include a set
diff --git a/lib/stdlib/doc/src/queue.xml b/lib/stdlib/doc/src/queue.xml
index bcf063bf0f..9c994154d4 100644
--- a/lib/stdlib/doc/src/queue.xml
+++ b/lib/stdlib/doc/src/queue.xml
@@ -4,7 +4,7 @@
<erlref>
<header>
<copyright>
- <year>1996</year><year>2013</year>
+ <year>1996</year><year>2014</year>
<holder>Ericsson AB. All Rights Reserved.</holder>
</copyright>
<legalnotice>
@@ -90,9 +90,15 @@
<datatypes>
<datatype>
- <name><marker id="type-queue">queue()</marker></name>
+ <name name="queue" n_vars="1"/>
<desc><p>As returned by <c>new/0</c>.</p></desc>
</datatype>
+ <datatype>
+ <name name="queue" n_vars="0"/>
+ <desc>
+ <p><c>queue()</c> is equivalent to <c>queue(term())</c>.</p>
+ </desc>
+ </datatype>
</datatypes>
<funcs>
diff --git a/lib/stdlib/doc/src/ref_man.xml b/lib/stdlib/doc/src/ref_man.xml
index 4ecd02a4bf..6c35578bdf 100644
--- a/lib/stdlib/doc/src/ref_man.xml
+++ b/lib/stdlib/doc/src/ref_man.xml
@@ -68,6 +68,7 @@
<xi:include href="lib.xml"/>
<xi:include href="lists.xml"/>
<xi:include href="log_mf_h.xml"/>
+ <xi:include href="maps.xml"/>
<xi:include href="math.xml"/>
<xi:include href="ms_transform.xml"/>
<xi:include href="orddict.xml"/>
diff --git a/lib/stdlib/doc/src/sets.xml b/lib/stdlib/doc/src/sets.xml
index 4b220bdd85..c5b8dce4b7 100644
--- a/lib/stdlib/doc/src/sets.xml
+++ b/lib/stdlib/doc/src/sets.xml
@@ -4,7 +4,7 @@
<erlref>
<header>
<copyright>
- <year>2000</year><year>2013</year>
+ <year>2000</year><year>2014</year>
<holder>Ericsson AB. All Rights Reserved.</holder>
</copyright>
<legalnotice>
@@ -45,9 +45,15 @@
<datatypes>
<datatype>
- <name><marker id="type-dict">set()</marker></name>
+ <name name="set" n_vars="1"/>
<desc><p>As returned by <c>new/0</c>.</p></desc>
</datatype>
+ <datatype>
+ <name name="set" n_vars="0"/>
+ <desc>
+ <p><c>set()</c> is equivalent to <c>set(term())</c>.</p>
+ </desc>
+ </datatype>
</datatypes>
<funcs>
<func>
diff --git a/lib/stdlib/doc/src/specs.xml b/lib/stdlib/doc/src/specs.xml
index 213ce7563f..60a04ed5e7 100644
--- a/lib/stdlib/doc/src/specs.xml
+++ b/lib/stdlib/doc/src/specs.xml
@@ -34,6 +34,7 @@
<xi:include href="../specs/specs_lib.xml"/>
<xi:include href="../specs/specs_lists.xml"/>
<xi:include href="../specs/specs_log_mf_h.xml"/>
+ <xi:include href="../specs/specs_maps.xml"/>
<xi:include href="../specs/specs_math.xml"/>
<xi:include href="../specs/specs_ms_transform.xml"/>
<xi:include href="../specs/specs_orddict.xml"/>
diff --git a/lib/stdlib/doc/src/supervisor.xml b/lib/stdlib/doc/src/supervisor.xml
index 8197684d2d..3a5027d595 100644
--- a/lib/stdlib/doc/src/supervisor.xml
+++ b/lib/stdlib/doc/src/supervisor.xml
@@ -4,7 +4,7 @@
<erlref>
<header>
<copyright>
- <year>1996</year><year>2013</year>
+ <year>1996</year><year>2014</year>
<holder>Ericsson AB. All Rights Reserved.</holder>
</copyright>
<legalnotice>
@@ -262,12 +262,12 @@ child_spec() = {Id,StartFunc,Restart,Shutdown,Type,Modules}
locally as <c>Name</c> using <c>register/2</c>. If
<c><anno>SupName</anno>={global,Name}</c> the supervisor is registered
globally as <c>Name</c> using <c>global:register_name/2</c>. If
- <c><anno>SupName</anno>={via,Module,Name}</c> the supervisor
+ <c><anno>SupName</anno>={via,<anno>Module</anno>,<anno>Name</anno>}</c> the supervisor
is registered as <c>Name</c> using the registry represented by
<c>Module</c>. The <c>Module</c> callback should export the functions
<c>register_name/2</c>, <c>unregister_name/1</c> and <c>send/2</c>,
which should behave like the corresponding functions in <c>global</c>.
- Thus, <c>{via,global,Name}</c> is a valid reference.</p>
+ Thus, <c>{via,global,<anno>Name</anno>}</c> is a valid reference.</p>
<p>If no name is provided, the supervisor is not registered.</p>
<p><c><anno>Module</anno></c> is the name of the callback module.</p>
<p><c><anno>Args</anno></c> is an arbitrary term which is passed as
diff --git a/lib/stdlib/doc/src/sys.xml b/lib/stdlib/doc/src/sys.xml
index ab8b380f49..a46fa1289f 100644
--- a/lib/stdlib/doc/src/sys.xml
+++ b/lib/stdlib/doc/src/sys.xml
@@ -246,6 +246,22 @@
<c>{Module, Id, HandlerState}</c>, where <c>Module</c> is the event handler's module name,
<c>Id</c> is the handler's ID (which is the value <c>false</c> if it was registered without
an ID), and <c>HandlerState</c> is the handler's state.</p>
+ <p>If the callback module exports a <c>system_get_state/1</c> function, it will be called in the
+ target process to get its state. Its argument is the same as the <c>Misc</c> value returned by
+ <seealso marker="#get_status-1">get_status/1,2</seealso>, and the <c>system_get_state/1</c>
+ function is expected to extract the callback module's state from it. The <c>system_get_state/1</c>
+ function must return <c>{ok, State}</c> where <c>State</c> is the callback module's state.</p>
+ <p>If the callback module does not export a <c>system_get_state/1</c> function, <c>get_state/1,2</c>
+ assumes the <c>Misc</c> value is the callback module's state and returns it directly instead.</p>
+ <p>If the callback module's <c>system_get_state/1</c> function crashes or throws an exception, the
+ caller exits with error <c>{callback_failed, {Module, system_get_state}, {Class, Reason}}</c> where
+ <c>Module</c> is the name of the callback module and <c>Class</c> and <c>Reason</c> indicate
+ details of the exception.</p>
+ <p>The <c>system_get_state/1</c> function is primarily useful for user-defined
+ behaviours and modules that implement OTP <seealso marker="#special_process">special
+ processes</seealso>. The <c>gen_server</c>, <c>gen_fsm</c>, and <c>gen_event</c> OTP
+ behaviour modules export this function, and so callback modules for those behaviours
+ need not supply their own.</p>
<p>To obtain more information about a process, including its state, see
<seealso marker="#get_status-1">get_status/1</seealso> and
<seealso marker="#get_status-2">get_status/2</seealso>.</p>
@@ -289,6 +305,28 @@
function means that only the state of the particular event handler it was working on when it
failed or crashed is unchanged; it can still succeed in changing the states of other event
handlers registered in the same <c>gen_event</c> process.</p>
+ <p>If the callback module exports a <c>system_replace_state/2</c> function, it will be called in the
+ target process to replace its state using <c>StateFun</c>. Its two arguments are <c>StateFun</c>
+ and <c>Misc</c>, where <c>Misc</c> is the same as the <c>Misc</c> value returned by
+ <seealso marker="#get_status-1">get_status/1,2</seealso>. A <c>system_replace_state/2</c> function
+ is expected to return <c>{ok, NewState, NewMisc}</c> where <c>NewState</c> is the callback module's
+ new state obtained by calling <c>StateFun</c>, and <c>NewMisc</c> is a possibly new value used to
+ replace the original <c>Misc</c> (required since <c>Misc</c> often contains the callback
+ module's state within it).</p>
+ <p>If the callback module does not export a <c>system_replace_state/2</c> function,
+ <c>replace_state/2,3</c> assumes the <c>Misc</c> value is the callback module's state, passes it
+ to <c>StateFun</c> and uses the return value as both the new state and as the new value of
+ <c>Misc</c>.</p>
+ <p>If the callback module's <c>system_replace_state/2</c> function crashes or throws an exception,
+ the caller exits with error <c>{callback_failed, {Module, system_replace_state}, {Class, Reason}}</c>
+ where <c>Module</c> is the name of the callback module and <c>Class</c> and <c>Reason</c> indicate details
+ of the exception. If the callback module does not provide a <c>system_replace_state/2</c> function and
+ <c>StateFun</c> crashes or throws an exception, the caller exits with error
+ <c>{callback_failed, StateFun, {Class, Reason}}</c>.</p>
+ <p>The <c>system_replace_state/2</c> function is primarily useful for user-defined behaviours and
+ modules that implement OTP <seealso marker="#special_process">special processes</seealso>. The
+ <c>gen_server</c>, <c>gen_fsm</c>, and <c>gen_event</c> OTP behaviour modules export this function,
+ and so callback modules for those behaviours need not supply their own.</p>
</desc>
</func>
<func>
@@ -322,7 +360,7 @@
<section>
<title>Process Implementation Functions</title>
- <p>The following functions are used when implementing a
+ <p><marker id="special_process"/>The following functions are used when implementing a
special process. This is an ordinary process which does not use a
standard behaviour, but a process which understands the standard system messages.</p>
</section>
@@ -375,8 +413,9 @@
process continues the execution, or
<c><anno>Module</anno>:system_terminate(Reason, <anno>Parent</anno>, <anno>Debug</anno>, <anno>Misc</anno>)</c> if
the process should terminate. The <c><anno>Module</anno></c> must export
- <c>system_continue/3</c>, <c>system_terminate/4</c>, and
- <c>system_code_change/4</c> (see below).
+ <c>system_continue/3</c>, <c>system_terminate/4</c>,
+ <c>system_code_change/4</c>, <c>system_get_state/1</c> and
+ <c>system_replace_state/2</c> (see below).
</p>
<p>The <c><anno>Misc</anno></c> argument can be used to save internal data
in a process, for example its state. It is sent to
@@ -444,6 +483,34 @@
defined, the atom <c>undefined</c> is sent.</p>
</desc>
</func>
+ <func>
+ <name>Mod:system_get_state(Misc) -> {ok, State}</name>
+ <fsummary>Called when the process should return its current state</fsummary>
+ <type>
+ <v>Misc = term()</v>
+ <v>State = term()</v>
+ </type>
+ <desc>
+ <p>This function is called from <c>sys:handle_system_msg/6</c> when the process
+ should return a term that reflects its current state. <c>State</c> is the
+ value returned by <c>sys:get_state/2</c>.</p>
+ </desc>
+ </func>
+ <func>
+ <name>Mod:system_replace_state(StateFun, Misc) -> {ok, NState, NMisc}</name>
+ <fsummary>Called when the process should replace its current state</fsummary>
+ <type>
+ <v>StateFun = fun((State :: term()) -> NState)</v>
+ <v>Misc = term()</v>
+ <v>NState = term()</v>
+ <v>NMisc = term()</v>
+ </type>
+ <desc>
+ <p>This function is called from <c>sys:handle_system_msg/6</c> when the process
+ should replace its current state. <c>NState</c> is the value returned by
+ <c>sys:replace_state/3</c>.</p>
+ </desc>
+ </func>
</funcs>
</erlref>
diff --git a/lib/stdlib/doc/src/unicode_usage.xml b/lib/stdlib/doc/src/unicode_usage.xml
index 33cd70e0b7..bebfbd4514 100644
--- a/lib/stdlib/doc/src/unicode_usage.xml
+++ b/lib/stdlib/doc/src/unicode_usage.xml
@@ -5,7 +5,7 @@
<header>
<copyright>
<year>1999</year>
- <year>2013</year>
+ <year>2014</year>
<holder>Ericsson AB. All Rights Reserved.</holder>
</copyright>
<legalnotice>
@@ -41,10 +41,10 @@
future.</p>
<p>The functionality described in EEP10 was implemented in Erlang/OTP
- as of R13A, but that was by no means the end of it. In R14B01 support
+ R13A, but that was by no means the end of it. In Erlang/OTP R14B01 support
for Unicode file names was added, although it was in no way complete
and was by default disabled on platforms where no guarantee was given
- for the file name encoding. With R16A came support for UTF-8 encoded
+ for the file name encoding. With Erlang/OTP R16A came support for UTF-8 encoded
source code, among with enhancements to many of the applications to
support both Unicode encoded file names as well as support for UTF-8
encoded files in several circumstances. Most notable is the support
@@ -52,8 +52,8 @@
for UTF-8 and more support for Unicode character sets in the
I/O-system.</p>
- <p>In R17, the encoding default for Erlang source files will be
- switched to UTF-8 and in R18 Erlang will support atoms in the full
+ <p>In Erlang/OTP 17.0, the encoding default for Erlang source files was
+ switched to UTF-8 and in Erlang/OTP 18.0 Erlang will support atoms in the full
Unicode range, meaning full Unicode function and module
names</p>
@@ -222,7 +222,7 @@
<tag>Representation</tag>
<item>To handle Unicode characters in Erlang, we have to have a
common representation both in lists and binaries. The EEP (10) and
- the subsequent initial implementation in R13A settled a standard
+ the subsequent initial implementation in Erlang/OTP R13A settled a standard
representation of Unicode characters in Erlang.</item>
<tag>Manipulation</tag>
<item>The Unicode characters need to be processed by the Erlang
@@ -274,9 +274,9 @@
(<c>+fnu</c>) on platforms where this is not the default.</item>
<tag>Source code encoding</tag>
<item>When it comes to the Erlang source code, there is support
- for the UTF-8 encoding and bytewise encoding. The default in R16B
- is bytewise (or latin1) encoding. You can control the encoding by
- a comment like:
+ for the UTF-8 encoding and bytewise encoding. The default in
+ Erlang/OTP R16B was bytewise (or latin1) encoding; in Erlang/OTP 17.0
+ it was changed to UTF-8. You can control the encoding by a comment like:
<code>
%% -*- coding: utf-8 -*-
</code>
@@ -290,7 +290,7 @@
<item>Having the source code in UTF-8 also allows you to write
string literals containing Unicode characters with code points &gt;
255, although atoms, module names and function names will be
- restricted to the ISO-Latin-1 range until the R18 release. Binary
+ restricted to the ISO-Latin-1 range until the Erlang/OTP 18.0 release. Binary
literals where you use the <c>/utf8</c> type, can also be
expressed using Unicode characters &gt; 255. Having module names
using characters other than 7-bit ASCII can cause trouble on
@@ -304,7 +304,7 @@
<section>
<title>Standard Unicode Representation</title>
<p>In Erlang, strings are actually lists of integers. A string was
- up until R13 defined to be encoded in the ISO-latin-1 (ISO8859-1)
+ up until Erlang/OTP R13 defined to be encoded in the ISO-latin-1 (ISO8859-1)
character set, which is, code point by code point, a sub-range of
the Unicode character set.</p>
<p>The standard list encoding for strings was therefore easily
@@ -321,7 +321,7 @@
encoding has to be decided upon and the string should be converted
to a binary in the preferred encoding using
<c>unicode:characters_to_binary/{1,2,3}</c>. Strings are not
- generally lists of bytes, as they were before R13. They are lists of
+ generally lists of bytes, as they were before Erlang/OTP R13. They are lists of
characters. Characters are not generally bytes, they are Unicode
code points.</p>
@@ -385,7 +385,7 @@ external_charlist() = maybe_improper_list(char() |
using characters from the ISO-latin-1 character set and atoms are
restricted to the same ISO-latin-1 range. These restrictions in the
language are of course independent of the encoding of the source
- file. Erlang/OTP R18 is expected to handle functions named in
+ file. Erlang/OTP 18.0 is expected to handle functions named in
Unicode as well as Unicode atoms.</p>
<section>
<title>Bit-syntax</title>
@@ -447,8 +447,8 @@ Bin4 = &lt;&lt;"Hello"/utf16&gt;&gt;,</code>
probably will not appreciate). Another way is to keep it backwards
compatible so that only the ISO-Latin-1 character set is used to
detect a string. A third way would be to let the user decide
- exactly what Unicode ranges are to be viewed as characters. In
- R16B you can select either the whole Unicode range or the
+ exactly what Unicode ranges are to be viewed as characters. Since
+ Erlang/OTP R16B you can select either the whole Unicode range or the
ISO-Latin-1 range by supplying the startup flag <c>+pc
</c><i>Range</i>, where <i>Range</i> is either <c>latin1</c> or
<c>unicode</c>. For backwards compatibility, the default is
@@ -662,11 +662,14 @@ Eshell V5.10.1 (abort with ^G)
containing characters having code points between 128 and 255 may
be named either as plain ISO-latin-1 or using UTF-8 encoding. As
no consistency is enforced, the Erlang VM can do no consistent
- translation of all file names. If the VM would automatically
- select encoding based on heuristics, one could get unexpected
- behavior on these systems. By default, Erlang starts in "latin1"
- file name mode on such systems, meaning bytewise encoding in file
- names. This allows for list representation of all file names in
+ translation of all file names.</p>
+
+ <p>By default on such systems, Erlang starts in <c>utf8</c> file
+ name mode if the terminal supports UTF-8, otherwise in
+ <c>latin1</c> mode.</p>
+
+ <p>In the <c>latin1</c> mode, file names are bytewise endcoded.
+ This allows for list representation of all file names in
the system, but, for example, a file named "Östersund.txt", will
appear in <c>file:list_dir/1</c> as either "Östersund.txt" (if
the file name was encoded in bytewise ISO-Latin-1 by the program
@@ -682,7 +685,7 @@ Eshell V5.10.1 (abort with ^G)
</item>
</taglist>
- <p>The Unicode file naming support was introduced with OTP release
+ <p>The Unicode file naming support was introduced with Erlang/OTP
R14B01. A VM operating in Unicode file name translation mode can
work with files having names in any language or character set (as
long as it is supported by the underlying OS and file system). The
@@ -706,7 +709,7 @@ Eshell V5.10.1 (abort with ^G)
problem even if it uses transparent file naming. Very few systems
have mixed file name encodings. A consistent UTF-8 named system will
work perfectly in Unicode file name mode. It was still however
- considered experimental in R14B01 and is still not the default on
+ considered experimental in Erlang/OTP R14B01 and is still not the default on
such systems. Unicode file name translation is turned on with the
<c>+fnu</c> switch to the On Linux, a VM started without explicitly
stating the file name translation mode will default to <c>latin1</c>
@@ -752,9 +755,9 @@ Eshell V5.10.1 (abort with ^G)
<section>
<title>Notes About Raw File Names</title>
-
+ <marker id="notes-about-raw-filenames"/>
<p>Raw file names were introduced together with Unicode file name
- support in erts-5.8.2 (OTP R14B01). The reason &quot;raw file
+ support in erts-5.8.2 (Erlang/OTP R14B01). The reason &quot;raw file
names&quot; was introduced in the system was to be able to
consistently represent file names given in different encodings on
the same system. Having the VM automatically translate a file name
@@ -795,10 +798,10 @@ Eshell V5.10.1 (abort with ^G)
the argument as a binary.</p>
<p>To force Unicode file name translation mode on systems where this
- is not the default was considered experimental in OTP R14B01 due to
+ is not the default was considered experimental in Erlang/OTP R14B01 due to
the fact that the initial implementation did not ignore wrongly
encoded file names, so that raw file names could spread unexpectedly
- throughout the system. Beginning with R16B, the wrongly encoded file
+ throughout the system. Beginning with Erlang/OTP R16B, the wrongly encoded file
names are only retrieved by special functions
(e.g. <c>file:list_dir_all/1</c>), so the impact on existing code is
much lower, why it is now supported. Unicode file name translation
@@ -845,6 +848,7 @@ Eshell V5.10.1 (abort with ^G)
</section>
<section>
<title>Unicode in Environment and Parameters</title>
+ <marker id="unicode_in_environment_and_parameters"/>
<p>Environment variables and their interpretation is handled much in
the same way as file names. If Unicode file names are enabled,
environment variables as well as parameters to the Erlang VM are
@@ -993,7 +997,8 @@ ok
</pre>
</section>
<section>
- <title><marker id="unicode_options_summary"/>Summary of Options</title>
+ <title>Summary of Options</title>
+ <marker id="unicode_options_summary"/>
<p>The Unicode support is controlled by both command line switches,
some standard environment variables and the version of OTP you are
using. Most options affect mainly the way Unicode data is displayed,
@@ -1014,7 +1019,8 @@ ok
allowed. This setting should correspond to the actual terminal
you are using.</p>
<p>The environment can also affect file name interpretation, if
- Erlang is started with the <c>+fna</c> flag.</p>
+ Erlang is started with the <c>+fna</c> flag (which is default from
+ Erlang/OTP 17.0).</p>
<p>You can check the setting of this by calling
<c>io:getopts()</c>, which will give you an option list
containing <c>{encoding,unicode}</c> or
@@ -1028,7 +1034,7 @@ ok
<c>io</c>/<c>io_lib:format</c> with the <c>"~tp"</c> and
<c>~tP</c> formatting instructions, as described above.</p>
<p>You can check this option by calling io:printable_range/0,
- which in R16B will return <c>unicode</c> or <c>latin1</c>. To be
+ which will return <c>unicode</c> or <c>latin1</c>. To be
compatible with future (expected) extensions to the settings,
one should rather use <c>io_lib:printable_list/1</c> to check if
a list is printable according to the setting. That function will
@@ -1046,8 +1052,7 @@ ok
&gt; 255.</p>
<p><c>+fnl</c> means bytewise interpretation of file names, which
was the usual way to represent ISO-Latin-1 file names before
- UTF-8 file naming got widespread. This is the default on all
- Unix-like operating systems except MacOS X.</p>
+ UTF-8 file naming got widespread.</p>
<p><c>+fnu</c> means that file names are encoded in UTF-8, which
is nowadays the common scheme (although not enforced).</p>
<p><c>+fna</c> means that you automatically select between
@@ -1055,8 +1060,8 @@ ok
<c>LC_CTYPE</c> environment variables. This is optimistic
heuristics indeed, nothing enforces a user to have a terminal
with the same encoding as the file system, but usually, this is
- the case. This might be the default behavior in a future
- release.</p>
+ the case. This is the default on all Unix-like operating
+ systems except MacOS X.</p>
<p>The file name translation mode can be read with the
<c>file:native_name_encoding/0</c> function, which returns
@@ -1067,8 +1072,8 @@ ok
<item>
<p>This function returns the default encoding for Erlang source
files (if no encoding comment is present) in the currently
- running release. For R16 this returns <c>latin1</c> (meaning
- bytewise encoding). In R17 and forward it is expected to return
+ running release. In Erlang/OTP R16B <c>latin1</c> was returned (meaning
+ bytewise encoding). In Erlang/OTP 17.0 and forward it returns
<c>utf8</c>.</p>
<p>The encoding of each file can be specified using comments as
described in
diff --git a/lib/stdlib/doc/src/zip.xml b/lib/stdlib/doc/src/zip.xml
index 66c21da193..48b376743d 100644
--- a/lib/stdlib/doc/src/zip.xml
+++ b/lib/stdlib/doc/src/zip.xml
@@ -123,6 +123,18 @@
</taglist>
</desc>
</datatype>
+ <datatype>
+ <name name="filename"/>
+ <p>The name of a zip file.</p>
+ </datatype>
+ <datatype><name name="extension"/></datatype>
+ <datatype><name name="extension_spec"/></datatype>
+ <datatype>
+ <name name="create_option"/>
+ <desc>
+ <p>These options are described in <seealso marker="#zip_options">create/3</seealso>.</p>
+ </desc>
+ </datatype>
</datatypes>
<funcs>
<func>
@@ -160,6 +172,7 @@
set to <c>["gif", "jpg"]</c> and <c>uncompress</c> is set to
<c>["jpg"]</c>, only files with <c>"gif"</c> as extension will
be compressed. No other files will be compressed.</p>
+ <marker id="zip_options"></marker>
<p>The following options are available:</p>
<taglist>
<tag><c>cooked</c></tag>
diff --git a/lib/stdlib/examples/erl_id_trans.erl b/lib/stdlib/examples/erl_id_trans.erl
index 2c842fafc7..e71e26e51a 100644
--- a/lib/stdlib/examples/erl_id_trans.erl
+++ b/lib/stdlib/examples/erl_id_trans.erl
@@ -144,6 +144,13 @@ pattern({cons,Line,H0,T0}) ->
pattern({tuple,Line,Ps0}) ->
Ps1 = pattern_list(Ps0),
{tuple,Line,Ps1};
+pattern({map,Line,Ps0}) ->
+ Ps1 = pattern_list(Ps0),
+ {map,Line,Ps1};
+pattern({map_field_exact,Line,K,V}) ->
+ Ke = expr(K),
+ Ve = pattern(V),
+ {map_field_exact,Line,Ke,Ve};
%%pattern({struct,Line,Tag,Ps0}) ->
%% Ps1 = pattern_list(Ps0),
%% {struct,Line,Tag,Ps1};
@@ -251,6 +258,20 @@ gexpr({float,Line,F}) -> {float,Line,F};
gexpr({atom,Line,A}) -> {atom,Line,A};
gexpr({string,Line,S}) -> {string,Line,S};
gexpr({nil,Line}) -> {nil,Line};
+gexpr({map,Line,Map0,Es0}) ->
+ [Map1|Es1] = gexpr_list([Map0|Es0]),
+ {map,Line,Map1,Es1};
+gexpr({map,Line,Es0}) ->
+ Es1 = gexpr_list(Es0),
+ {map,Line,Es1};
+gexpr({map_field_assoc,Line,K,V}) ->
+ Ke = gexpr(K),
+ Ve = gexpr(V),
+ {map_field_assoc,Line,Ke,Ve};
+gexpr({map_field_exact,Line,K,V}) ->
+ Ke = gexpr(K),
+ Ve = gexpr(V),
+ {map_field_exact,Line,Ke,Ve};
gexpr({cons,Line,H0,T0}) ->
H1 = gexpr(H0),
T1 = gexpr(T0), %They see the same variables
@@ -356,6 +377,20 @@ expr({bc,Line,E0,Qs0}) ->
expr({tuple,Line,Es0}) ->
Es1 = expr_list(Es0),
{tuple,Line,Es1};
+expr({map,Line,Map0,Es0}) ->
+ [Map1|Es1] = exprs([Map0|Es0]),
+ {map,Line,Map1,Es1};
+expr({map,Line,Es0}) ->
+ Es1 = exprs(Es0),
+ {map,Line,Es1};
+expr({map_field_assoc,Line,K,V}) ->
+ Ke = expr(K),
+ Ve = expr(V),
+ {map_field_assoc,Line,Ke,Ve};
+expr({map_field_exact,Line,K,V}) ->
+ Ke = expr(K),
+ Ve = expr(V),
+ {map_field_exact,Line,Ke,Ve};
%%expr({struct,Line,Tag,Es0}) ->
%% Es1 = pattern_list(Es0),
%% {struct,Line,Tag,Es1};
diff --git a/lib/stdlib/src/Makefile b/lib/stdlib/src/Makefile
index f3387d669b..9ab2cd4134 100644
--- a/lib/stdlib/src/Makefile
+++ b/lib/stdlib/src/Makefile
@@ -91,6 +91,7 @@ MODULES= \
lib \
lists \
log_mf_h \
+ maps \
math \
ms_transform \
otp_internal \
diff --git a/lib/stdlib/src/array.erl b/lib/stdlib/src/array.erl
index 2f69e2b0a4..10d2ccea45 100644
--- a/lib/stdlib/src/array.erl
+++ b/lib/stdlib/src/array.erl
@@ -1,7 +1,7 @@
%%
%% %CopyrightBegin%
%%
-%% Copyright Ericsson AB 2007-2011. All Rights Reserved.
+%% Copyright Ericsson AB 2007-2014. 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
@@ -86,6 +86,8 @@
foldr/3, sparse_foldl/3, sparse_foldr/3, fix/1, relax/1, is_fix/1,
resize/1, resize/2]).
+-export_type([array/0, array/1]).
+
%%-define(TEST,1).
-ifdef(TEST).
-include_lib("eunit/include/eunit.hrl").
@@ -144,18 +146,28 @@
%%--------------------------------------------------------------------------
+-type element_tuple(T) ::
+ {T, T, T, T, T, T, T, T, T, T}
+ | {element_tuple(T), element_tuple(T), element_tuple(T),
+ element_tuple(T), element_tuple(T), element_tuple(T),
+ element_tuple(T), element_tuple(T), element_tuple(T),
+ element_tuple(T), non_neg_integer()}.
+
+-type elements(T) :: non_neg_integer()
+ | element_tuple(T)
+ | nil(). % kill reference, for GC
+
-record(array, {size :: non_neg_integer(), %% number of defined entries
max :: non_neg_integer(), %% maximum number of entries
%% in current tree
default, %% the default value (usually 'undefined')
- elements %% the tuple tree
+ elements :: elements(_) %% the tuple tree
}).
-%% A declaration equivalent to the following one is hard-coded in erl_types.
-%% That declaration contains hard-coded information about the #array{}
-%% structure and the types of its fields. So, please make sure that any
-%% changes to its structure are also propagated to erl_types.erl.
-%%
-%% -opaque array() :: #array{}.
+
+-opaque array() :: array(term()).
+
+-opaque array(Type) ::
+ #array{default :: Type, elements :: elements(Type)}.
%%
%% Types
@@ -164,13 +176,13 @@
-type array_indx() :: non_neg_integer().
-type array_opt() :: {'fixed', boolean()} | 'fixed'
- | {'default', Value :: term()}
+ | {'default', Type :: term()}
| {'size', N :: non_neg_integer()}
| (N :: non_neg_integer()).
-type array_opts() :: array_opt() | [array_opt()].
--type indx_pair() :: {Index :: array_indx(), Value :: term()}.
--type indx_pairs() :: [indx_pair()].
+-type indx_pair(Type) :: {Index :: array_indx(), Type}.
+-type indx_pairs(Type) :: [indx_pair(Type)].
%%--------------------------------------------------------------------------
@@ -321,7 +333,7 @@ size(_) -> erlang:error(badarg).
%%
%% @see new/2
--spec default(Array :: array()) -> term().
+-spec default(Array :: array(Type)) -> Value :: Type.
default(#array{default = D}) -> D;
default(_) -> erlang:error(badarg).
@@ -404,7 +416,7 @@ new_test_() ->
%% automatically upon insertion; see also {@link set/3}.
%% @see relax/1
--spec fix(Array :: array()) -> array().
+-spec fix(Array :: array(Type)) -> array(Type).
fix(#array{}=A) ->
A#array{max = 0}.
@@ -452,7 +464,7 @@ fix_test_() ->
%% fix/1}.)
%% @see fix/1
--spec relax(Array :: array()) -> array().
+-spec relax(Array :: array(Type)) -> array(Type).
relax(#array{size = N}=A) ->
A#array{max = find_max(N-1, ?LEAFSIZE)}.
@@ -477,7 +489,8 @@ relax_test_() ->
%% integer, the call fails with reason `badarg'. If the given array has
%% fixed size, the resulting array will also have fixed size.
--spec resize(Size :: non_neg_integer(), Array :: array()) -> array().
+-spec resize(Size :: non_neg_integer(), Array :: array(Type)) ->
+ array(Type).
resize(Size, #array{size = N, max = M, elements = E}=A)
when is_integer(Size), Size >= 0 ->
@@ -508,7 +521,7 @@ resize(_Size, _) ->
%% @see resize/2
%% @see sparse_size/1
--spec resize(Array :: array()) -> array().
+-spec resize(Array :: array(Type)) -> array(Type).
resize(Array) ->
resize(sparse_size(Array), Array).
@@ -558,7 +571,7 @@ resize_test_() ->
%% @see get/2
%% @see reset/2
--spec set(I :: array_indx(), Value :: term(), Array :: array()) -> array().
+-spec set(I :: array_indx(), Value :: Type, Array :: array(Type)) -> array(Type).
set(I, Value, #array{size = N, max = M, default = D, elements = E}=A)
when is_integer(I), I >= 0 ->
@@ -621,7 +634,7 @@ expand(I, _S, X, D) ->
%% @see set/3
--spec get(I :: array_indx(), Array :: array()) -> term().
+-spec get(I :: array_indx(), Array :: array(Type)) -> Value :: Type.
get(I, #array{size = N, max = M, elements = E, default = D})
when is_integer(I), I >= 0 ->
@@ -661,7 +674,7 @@ get_1(I, E, _D) ->
%% TODO: a reset_range function
--spec reset(I :: array_indx(), Array :: array()) -> array().
+-spec reset(I :: array_indx(), Array :: array(Type)) -> array(Type).
reset(I, #array{size = N, max = M, default = D, elements = E}=A)
when is_integer(I), I >= 0 ->
@@ -747,7 +760,7 @@ set_get_test_() ->
%% @see from_list/2
%% @see sparse_to_list/1
--spec to_list(Array :: array()) -> list().
+-spec to_list(Array :: array(Type)) -> list(Value :: Type).
to_list(#array{size = 0}) ->
[];
@@ -820,7 +833,7 @@ to_list_test_() ->
%%
%% @see to_list/1
--spec sparse_to_list(Array :: array()) -> list().
+-spec sparse_to_list(Array :: array(Type)) -> list(Value :: Type).
sparse_to_list(#array{size = 0}) ->
[];
@@ -887,7 +900,7 @@ sparse_to_list_test_() ->
%% @equiv from_list(List, undefined)
--spec from_list(List :: list()) -> array().
+-spec from_list(List :: list(Value :: Type)) -> array(Type).
from_list(List) ->
from_list(List, undefined).
@@ -899,7 +912,7 @@ from_list(List) ->
%% @see new/2
%% @see to_list/1
--spec from_list(List :: list(), Default :: term()) -> array().
+-spec from_list(List :: list(Value :: Type), Default :: term()) -> array(Type).
from_list([], Default) ->
new({default,Default});
@@ -998,7 +1011,7 @@ from_list_test_() ->
%% @see from_orddict/2
%% @see sparse_to_orddict/1
--spec to_orddict(Array :: array()) -> indx_pairs().
+-spec to_orddict(Array :: array(Type)) -> indx_pairs(Value :: Type).
to_orddict(#array{size = 0}) ->
[];
@@ -1035,16 +1048,16 @@ to_orddict_3(N, R, D, L, E, S) ->
to_orddict_2(element(N, E), R, D, L),
E, S).
--spec push_pairs(non_neg_integer(), array_indx(), term(), indx_pairs()) ->
- indx_pairs().
+-spec push_pairs(non_neg_integer(), array_indx(), term(), indx_pairs(Type)) ->
+ indx_pairs(Type).
push_pairs(0, _I, _E, L) ->
L;
push_pairs(N, I, E, L) ->
push_pairs(N-1, I-1, E, [{I, E} | L]).
--spec push_tuple_pairs(non_neg_integer(), array_indx(), term(), indx_pairs()) ->
- indx_pairs().
+-spec push_tuple_pairs(non_neg_integer(), array_indx(), term(), indx_pairs(Type)) ->
+ indx_pairs(Type).
push_tuple_pairs(0, _I, _T, L) ->
L;
@@ -1090,7 +1103,7 @@ to_orddict_test_() ->
%%
%% @see to_orddict/1
--spec sparse_to_orddict(Array :: array()) -> indx_pairs().
+-spec sparse_to_orddict(Array :: array(Type)) -> indx_pairs(Value :: Type).
sparse_to_orddict(#array{size = 0}) ->
[];
@@ -1128,7 +1141,7 @@ sparse_to_orddict_3(N, R, D, L, E, S) ->
E, S).
-spec sparse_push_tuple_pairs(non_neg_integer(), array_indx(),
- _, _, indx_pairs()) -> indx_pairs().
+ _, _, indx_pairs(Type)) -> indx_pairs(Type).
sparse_push_tuple_pairs(0, _I, _D, _T, L) ->
L;
@@ -1170,7 +1183,7 @@ sparse_to_orddict_test_() ->
%% @equiv from_orddict(Orddict, undefined)
--spec from_orddict(Orddict :: indx_pairs()) -> array().
+-spec from_orddict(Orddict :: indx_pairs(Value :: Type)) -> array(Type).
from_orddict(Orddict) ->
from_orddict(Orddict, undefined).
@@ -1184,7 +1197,8 @@ from_orddict(Orddict) ->
%% @see new/2
%% @see to_orddict/1
--spec from_orddict(Orddict :: indx_pairs(), Default :: term()) -> array().
+-spec from_orddict(Orddict :: indx_pairs(Value :: Type), Default :: Type) ->
+ array(Type).
from_orddict([], Default) ->
new({default,Default});
@@ -1379,8 +1393,8 @@ from_orddict_test_() ->
%% @see foldr/3
%% @see sparse_map/2
--spec map(Function, Array :: array()) -> array() when
- Function :: fun((Index :: array_indx(), Value :: _) -> _).
+-spec map(Function, Array :: array(Type1)) -> array(Type2) when
+ Function :: fun((Index :: array_indx(), Type1) -> Type2).
map(Function, Array=#array{size = N, elements = E, default = D})
when is_function(Function, 2) ->
@@ -1471,8 +1485,8 @@ map_test_() ->
%%
%% @see map/2
--spec sparse_map(Function, Array :: array()) -> array() when
- Function :: fun((Index :: array_indx(), Value :: _) -> _).
+-spec sparse_map(Function, Array :: array(Type1)) -> array(Type2) when
+ Function :: fun((Index :: array_indx(), Type1) -> Type2).
sparse_map(Function, Array=#array{size = N, elements = E, default = D})
when is_function(Function, 2) ->
@@ -1567,8 +1581,8 @@ sparse_map_test_() ->
%% @see map/2
%% @see sparse_foldl/3
--spec foldl(Function, InitialAcc :: A, Array :: array()) -> B when
- Function :: fun((Index :: array_indx(), Value :: _, Acc :: A) -> B).
+-spec foldl(Function, InitialAcc :: A, Array :: array(Type)) -> B when
+ Function :: fun((Index :: array_indx(), Value :: Type, Acc :: A) -> B).
foldl(Function, A, #array{size = N, elements = E, default = D})
when is_function(Function, 3) ->
@@ -1640,8 +1654,8 @@ foldl_test_() ->
%% @see foldl/3
%% @see sparse_foldr/3
--spec sparse_foldl(Function, InitialAcc :: A, Array :: array()) -> B when
- Function :: fun((Index :: array_indx(), Value :: _, Acc :: A) -> B).
+-spec sparse_foldl(Function, InitialAcc :: A, Array :: array(Type)) -> B when
+ Function :: fun((Index :: array_indx(), Value :: Type, Acc :: A) -> B).
sparse_foldl(Function, A, #array{size = N, elements = E, default = D})
when is_function(Function, 3) ->
@@ -1717,8 +1731,8 @@ sparse_foldl_test_() ->
%% @see foldl/3
%% @see map/2
--spec foldr(Function, InitialAcc :: A, Array :: array()) -> B when
- Function :: fun((Index :: array_indx(), Value :: _, Acc :: A) -> B).
+-spec foldr(Function, InitialAcc :: A, Array :: array(Type)) -> B when
+ Function :: fun((Index :: array_indx(), Value :: Type, Acc :: A) -> B).
foldr(Function, A, #array{size = N, elements = E, default = D})
when is_function(Function, 3) ->
@@ -1796,8 +1810,8 @@ foldr_test_() ->
%% @see foldr/3
%% @see sparse_foldl/3
--spec sparse_foldr(Function, InitialAcc :: A, Array :: array()) -> B when
- Function :: fun((Index :: array_indx(), Value :: _, Acc :: A) -> B).
+-spec sparse_foldr(Function, InitialAcc :: A, Array :: array(Type)) -> B when
+ Function :: fun((Index :: array_indx(), Value :: Type, Acc :: A) -> B).
sparse_foldr(Function, A, #array{size = N, elements = E, default = D})
when is_function(Function, 3) ->
diff --git a/lib/stdlib/src/c.erl b/lib/stdlib/src/c.erl
index fb6b8c8661..c2256c0cf9 100644
--- a/lib/stdlib/src/c.erl
+++ b/lib/stdlib/src/c.erl
@@ -330,13 +330,18 @@ choice(F) ->
end.
get_line(P, Default) ->
- case io:get_line(P) of
+ case line_string(io:get_line(P)) of
"\n" ->
Default;
L ->
L
end.
+%% If the standard input is set to binary mode
+%% convert it to a list so we can properly match.
+line_string(Binary) when is_binary(Binary) -> unicode:characters_to_list(Binary);
+line_string(Other) -> Other.
+
mfa_string(Fun) when is_function(Fun) ->
{module,M} = erlang:fun_info(Fun, module),
{name,F} = erlang:fun_info(Fun, name),
@@ -450,7 +455,7 @@ m() ->
foreach(fun ({Mod,File}) -> mformat(Mod, File) end, sort(code:all_loaded())).
mformat(A1, A2) ->
- format("~-20s ~s\n", [A1,A2]).
+ format("~-20s ~ts\n", [A1,A2]).
%% erlangrc(Home)
%% Try to run a ".erlang" file, first in the current directory
@@ -716,7 +721,7 @@ ls(Dir) ->
{error, enotdir} ->
ls_print([Dir]);
{error, Error} ->
- format("~s\n", [file:format_error(Error)])
+ format("~ts\n", [file:format_error(Error)])
end.
ls_print([]) -> ok;
diff --git a/lib/stdlib/src/dets.erl b/lib/stdlib/src/dets.erl
index 44dad04f43..c32da1624f 100644
--- a/lib/stdlib/src/dets.erl
+++ b/lib/stdlib/src/dets.erl
@@ -1,7 +1,7 @@
%%
%% %CopyrightBegin%
%%
-%% Copyright Ericsson AB 1996-2013. All Rights Reserved.
+%% Copyright Ericsson AB 1996-2014. 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
@@ -1785,6 +1785,7 @@ read_file_header(FileName, Access, RamFile) ->
Version =:= 9 ->
dets_v9:read_file_header(Fd, FileName);
true ->
+ _ = file:close(Fd),
throw({error, {not_a_dets_file, FileName}})
end.
@@ -2113,6 +2114,8 @@ test_bchunk_format(Head, Term) ->
do_open_file([Fname, Verbose], Parent, Server, Ref) ->
case catch fopen2(Fname, Ref) of
+ {error, {tooshort, _}} ->
+ err({error, {not_a_dets_file, Fname}});
{error, _Reason} = Error ->
err(Error);
{ok, Head} ->
@@ -2126,11 +2129,10 @@ do_open_file([Fname, Verbose], Parent, Server, Ref) ->
[Bad]),
{error, {dets_bug, Fname, Bad}}
end;
-do_open_file([Tab, OpenArgs, Verb], Parent, Server, Ref) ->
+do_open_file([Tab, OpenArgs, Verb], Parent, Server, _Ref) ->
case catch fopen3(Tab, OpenArgs) of
{error, {tooshort, _}} ->
- _ = file:delete(OpenArgs#open_args.file),
- do_open_file([Tab, OpenArgs, Verb], Parent, Server, Ref);
+ err({error, {not_a_dets_file, OpenArgs#open_args.file}});
{error, _Reason} = Error ->
err(Error);
{ok, Head} ->
@@ -2486,7 +2488,6 @@ fopen2(Fname, Tab) ->
{ok, _} ->
Acc = read_write,
Ram = false,
- %% Fd is not always closed upon error, but exit is soon called.
{ok, Fd, FH} = read_file_header(Fname, Acc, Ram),
Mod = FH#fileheader.mod,
Do = case Mod:check_file_header(FH, Fd) of
@@ -2542,7 +2543,6 @@ fopen_existing_file(Tab, OpenArgs) ->
ram_file = Ram, delayed_write = CacheSz, auto_save =
Auto, access = Acc, version = Version, debug = Debug} =
OpenArgs,
- %% Fd is not always closed upon error, but exit is soon called.
{ok, Fd, FH} = read_file_header(Fname, Acc, Ram),
V9 = (Version =:= 9) or (Version =:= default),
MinF = (MinSlots =:= default) or (MinSlots =:= FH#fileheader.min_no_slots),
diff --git a/lib/stdlib/src/dict.erl b/lib/stdlib/src/dict.erl
index 7e198a2469..cf8fb3114a 100644
--- a/lib/stdlib/src/dict.erl
+++ b/lib/stdlib/src/dict.erl
@@ -1,7 +1,7 @@
%%
%% %CopyrightBegin%
%%
-%% Copyright Ericsson AB 2000-2013. All Rights Reserved.
+%% Copyright Ericsson AB 2000-2014. 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
@@ -41,6 +41,8 @@
-export([store/3,append/3,append_list/3,update/3,update/4,update_counter/3]).
-export([fold/3,map/2,filter/2,merge/3]).
+-export_type([dict/0, dict/2]).
+
%% Low-level interface.
%%-export([get_slot/2,get_bucket/2,on_bucket/3,fold_dict/3,
%% maybe_expand/2,maybe_contract/2]).
@@ -53,6 +55,8 @@
-define(exp_size, (?seg_size * ?expand_load)).
-define(con_size, (?seg_size * ?contract_load)).
+-type segs(_Key, _Value) :: tuple().
+
%% Define a hashtable. The default values are the standard ones.
-record(dict,
{size=0 :: non_neg_integer(), % Number of elements
@@ -62,14 +66,13 @@
exp_size=?exp_size :: non_neg_integer(), % Size to expand at
con_size=?con_size :: non_neg_integer(), % Size to contract at
empty :: tuple(), % Empty segment
- segs :: tuple() % Segments
+ segs :: segs(_, _) % Segments
}).
-%% A declaration equivalent to the following one is hard-coded in erl_types.
-%% That declaration contains hard-coded information about the #dict{}
-%% structure and the types of its fields. So, please make sure that any
-%% changes to its structure are also propagated to erl_types.erl.
-%%
-%% -opaque dict() :: #dict{}.
+
+
+-opaque dict() :: dict(_, _).
+
+-opaque dict(Key, Value) :: #dict{segs :: segs(Key, Value)}.
-define(kv(K,V), [K|V]). % Key-Value pair format
%%-define(kv(K,V), {K,V}). % Key-Value pair format
@@ -81,8 +84,7 @@ new() ->
#dict{empty=Empty,segs={Empty}}.
-spec is_key(Key, Dict) -> boolean() when
- Key :: term(),
- Dict :: dict().
+ Dict :: dict(Key, Value :: term()).
is_key(Key, D) ->
Slot = get_slot(D, Key),
@@ -94,15 +96,15 @@ find_key(K, [_|Bkt]) -> find_key(K, Bkt);
find_key(_, []) -> false.
-spec to_list(Dict) -> List when
- Dict :: dict(),
- List :: [{Key :: term(), Value :: term()}].
+ Dict :: dict(Key, Value),
+ List :: [{Key, Value}].
to_list(D) ->
fold(fun (Key, Val, List) -> [{Key,Val}|List] end, [], D).
-spec from_list(List) -> Dict when
- List :: [{Key :: term(), Value :: term()}],
- Dict :: dict().
+ Dict :: dict(Key, Value),
+ List :: [{Key, Value}].
from_list(L) ->
lists:foldl(fun ({K,V}, D) -> store(K, V, D) end, new(), L).
@@ -118,9 +120,7 @@ size(#dict{size=N}) when is_integer(N), N >= 0 -> N.
is_empty(#dict{size=N}) -> N =:= 0.
-spec fetch(Key, Dict) -> Value when
- Key :: term(),
- Dict :: dict(),
- Value :: term().
+ Dict :: dict(Key, Value).
fetch(Key, D) ->
Slot = get_slot(D, Key),
@@ -135,9 +135,7 @@ fetch_val(K, [_|Bkt]) -> fetch_val(K, Bkt);
fetch_val(_, []) -> throw(badarg).
-spec find(Key, Dict) -> {'ok', Value} | 'error' when
- Key :: term(),
- Dict :: dict(),
- Value :: term().
+ Dict :: dict(Key, Value).
find(Key, D) ->
Slot = get_slot(D, Key),
@@ -149,16 +147,16 @@ find_val(K, [_|Bkt]) -> find_val(K, Bkt);
find_val(_, []) -> error.
-spec fetch_keys(Dict) -> Keys when
- Dict :: dict(),
- Keys :: [term()].
+ Dict :: dict(Key, Value :: term()),
+ Keys :: [Key].
fetch_keys(D) ->
fold(fun (Key, _Val, Keys) -> [Key|Keys] end, [], D).
-spec erase(Key, Dict1) -> Dict2 when
- Key :: term(),
- Dict1 :: dict(),
- Dict2 :: dict().
+ Dict1 :: dict(Key, Value),
+ Dict2 :: dict(Key, Value).
+
%% Erase all elements with key Key.
erase(Key, D0) ->
@@ -174,10 +172,8 @@ erase_key(Key, [E|Bkt0]) ->
erase_key(_, []) -> {[],0}.
-spec store(Key, Value, Dict1) -> Dict2 when
- Key :: term(),
- Value :: term(),
- Dict1 :: dict(),
- Dict2 :: dict().
+ Dict1 :: dict(Key, Value),
+ Dict2 :: dict(Key, Value).
store(Key, Val, D0) ->
Slot = get_slot(D0, Key),
@@ -194,10 +190,8 @@ store_bkt_val(Key, New, [Other|Bkt0]) ->
store_bkt_val(Key, New, []) -> {[?kv(Key,New)],1}.
-spec append(Key, Value, Dict1) -> Dict2 when
- Key :: term(),
- Value :: term(),
- Dict1 :: dict(),
- Dict2 :: dict().
+ Dict1 :: dict(Key, Value),
+ Dict2 :: dict(Key, Value).
append(Key, Val, D0) ->
Slot = get_slot(D0, Key),
@@ -214,10 +208,9 @@ append_bkt(Key, Val, [Other|Bkt0]) ->
append_bkt(Key, Val, []) -> {[?kv(Key,[Val])],1}.
-spec append_list(Key, ValList, Dict1) -> Dict2 when
- Key :: term(),
- ValList :: [Value :: term()],
- Dict1 :: dict(),
- Dict2 :: dict().
+ Dict1 :: dict(Key, Value),
+ Dict2 :: dict(Key, Value),
+ ValList :: [Value].
append_list(Key, L, D0) ->
Slot = get_slot(D0, Key),
@@ -288,10 +281,9 @@ app_list_bkt(Key, L, []) -> {[?kv(Key,L)],1}.
%% {[Other|Bkt1],Dc}.
-spec update(Key, Fun, Dict1) -> Dict2 when
- Key :: term(),
- Fun :: fun((Value1 :: term()) -> Value2 :: term()),
- Dict1 :: dict(),
- Dict2 :: dict().
+ Dict1 :: dict(Key, Value),
+ Dict2 :: dict(Key, Value),
+ Fun :: fun((Value1 :: Value) -> Value2 :: Value).
update(Key, F, D0) ->
Slot = get_slot(D0, Key),
@@ -311,11 +303,10 @@ update_bkt(_Key, _F, []) ->
throw(badarg).
-spec update(Key, Fun, Initial, Dict1) -> Dict2 when
- Key :: term(),
- Initial :: term(),
- Fun :: fun((Value1 :: term()) -> Value2 :: term()),
- Dict1 :: dict(),
- Dict2 :: dict().
+ Dict1 :: dict(Key, Value),
+ Dict2 :: dict(Key, Value),
+ Fun :: fun((Value1 :: Value) -> Value2 :: Value),
+ Initial :: Value.
update(Key, F, Init, D0) ->
Slot = get_slot(D0, Key),
@@ -331,10 +322,9 @@ update_bkt(Key, F, I, [Other|Bkt0]) ->
update_bkt(Key, F, I, []) when is_function(F, 1) -> {[?kv(Key,I)],1}.
-spec update_counter(Key, Increment, Dict1) -> Dict2 when
- Key :: term(),
- Increment :: number(),
- Dict1 :: dict(),
- Dict2 :: dict().
+ Dict1 :: dict(Key, Value),
+ Dict2 :: dict(Key, Value),
+ Increment :: number().
update_counter(Key, Incr, D0) when is_number(Incr) ->
Slot = get_slot(D0, Key),
@@ -351,36 +341,35 @@ counter_bkt(Key, I, []) -> {[?kv(Key,I)],1}.
-spec fold(Fun, Acc0, Dict) -> Acc1 when
Fun :: fun((Key, Value, AccIn) -> AccOut),
- Key :: term(),
- Value :: term(),
- Acc0 :: term(),
- Acc1 :: term(),
- AccIn :: term(),
- AccOut :: term(),
- Dict :: dict().
+ Dict :: dict(Key, Value),
+ Acc0 :: Acc,
+ Acc1 :: Acc,
+ AccIn :: Acc,
+ AccOut :: Acc.
+
%% Fold function Fun over all "bags" in Table and return Accumulator.
fold(F, Acc, D) -> fold_dict(F, Acc, D).
-spec map(Fun, Dict1) -> Dict2 when
- Fun :: fun((Key :: term(), Value1 :: term()) -> Value2 :: term()),
- Dict1 :: dict(),
- Dict2 :: dict().
+ Fun :: fun((Key, Value1) -> Value2),
+ Dict1 :: dict(Key, Value1),
+ Dict2 :: dict(Key, Value2).
map(F, D) -> map_dict(F, D).
-spec filter(Pred, Dict1) -> Dict2 when
- Pred :: fun((Key :: term(), Value :: term()) -> boolean()),
- Dict1 :: dict(),
- Dict2 :: dict().
+ Pred :: fun((Key , Value) -> boolean()),
+ Dict1 :: dict(Key, Value),
+ Dict2 :: dict(Key, Value).
filter(F, D) -> filter_dict(F, D).
-spec merge(Fun, Dict1, Dict2) -> Dict3 when
- Fun :: fun((Key :: term(), Value1 :: term(), Value2 :: term()) -> Value :: term()),
- Dict1 :: dict(),
- Dict2 :: dict(),
- Dict3 :: dict().
+ Fun :: fun((Key, Value1, Value2) -> Value),
+ Dict1 :: dict(Key, Value1),
+ Dict2 :: dict(Key, Value2),
+ Dict3 :: dict(Key, Value).
merge(F, D1, D2) when D1#dict.size < D2#dict.size ->
fold_dict(fun (K, V1, D) ->
diff --git a/lib/stdlib/src/digraph.erl b/lib/stdlib/src/digraph.erl
index 78f74631dc..0c21271529 100644
--- a/lib/stdlib/src/digraph.erl
+++ b/lib/stdlib/src/digraph.erl
@@ -1,7 +1,7 @@
%%
%% %CopyrightBegin%
%%
-%% Copyright Ericsson AB 1996-2011. All Rights Reserved.
+%% Copyright Ericsson AB 1996-2014. 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
@@ -36,18 +36,14 @@
-export([get_short_path/3, get_short_cycle/2]).
--export_type([digraph/0, d_type/0, vertex/0, edge/0]).
+-export_type([graph/0, d_type/0, vertex/0, edge/0]).
-record(digraph, {vtab = notable :: ets:tab(),
etab = notable :: ets:tab(),
ntab = notable :: ets:tab(),
cyclic = true :: boolean()}).
-%% A declaration equivalent to the following one is hard-coded in erl_types.
-%% That declaration contains hard-coded information about the #digraph{}
-%% record and the types of its fields. So, please make sure that any
-%% changes to its structure are also propagated to erl_types.erl.
-%%
-%% -opaque digraph() :: #digraph{}.
+
+-opaque graph() :: #digraph{}.
-type edge() :: term().
-type label() :: term().
@@ -67,11 +63,11 @@
-type d_cyclicity() :: 'acyclic' | 'cyclic'.
-type d_type() :: d_cyclicity() | d_protection().
--spec new() -> digraph().
+-spec new() -> graph().
new() -> new([]).
--spec new(Type) -> digraph() when
+-spec new(Type) -> graph() when
Type :: [d_type()].
new(Type) ->
@@ -106,7 +102,7 @@ check_type(_, _, _) -> error.
%%
%% Set graph type
%%
--spec set_type([{'cyclic', boolean()}], digraph()) -> digraph().
+-spec set_type([{'cyclic', boolean()}], graph()) -> graph().
set_type([{cyclic,V} | Ks], G) ->
set_type(Ks, G#digraph{cyclic = V});
@@ -116,7 +112,7 @@ set_type([], G) -> G.
%% Data access functions
-spec delete(G) -> 'true' when
- G :: digraph().
+ G :: graph().
delete(G) ->
ets:delete(G#digraph.vtab),
@@ -124,7 +120,7 @@ delete(G) ->
ets:delete(G#digraph.ntab).
-spec info(G) -> InfoList when
- G :: digraph(),
+ G :: graph(),
InfoList :: [{'cyclicity', Cyclicity :: d_cyclicity()} |
{'memory', NoWords :: non_neg_integer()} |
{'protection', Protection :: d_protection()}].
@@ -142,20 +138,20 @@ info(G) ->
[{cyclicity, Cyclicity}, {memory, Memory}, {protection, Protection}].
-spec add_vertex(G) -> vertex() when
- G :: digraph().
+ G :: graph().
add_vertex(G) ->
do_add_vertex({new_vertex_id(G), []}, G).
-spec add_vertex(G, V) -> vertex() when
- G :: digraph(),
+ G :: graph(),
V :: vertex().
add_vertex(G, V) ->
do_add_vertex({V, []}, G).
-spec add_vertex(G, V, Label) -> vertex() when
- G :: digraph(),
+ G :: graph(),
V :: vertex(),
Label :: label().
@@ -163,21 +159,21 @@ add_vertex(G, V, D) ->
do_add_vertex({V, D}, G).
-spec del_vertex(G, V) -> 'true' when
- G :: digraph(),
+ G :: graph(),
V :: vertex().
del_vertex(G, V) ->
do_del_vertex(V, G).
-spec del_vertices(G, Vertices) -> 'true' when
- G :: digraph(),
+ G :: graph(),
Vertices :: [vertex()].
del_vertices(G, Vs) ->
do_del_vertices(Vs, G).
-spec vertex(G, V) -> {V, Label} | 'false' when
- G :: digraph(),
+ G :: graph(),
V :: vertex(),
Label :: label().
@@ -188,37 +184,37 @@ vertex(G, V) ->
end.
-spec no_vertices(G) -> non_neg_integer() when
- G :: digraph().
+ G :: graph().
no_vertices(G) ->
ets:info(G#digraph.vtab, size).
-spec vertices(G) -> Vertices when
- G :: digraph(),
+ G :: graph(),
Vertices :: [vertex()].
vertices(G) ->
ets:select(G#digraph.vtab, [{{'$1', '_'}, [], ['$1']}]).
--spec source_vertices(digraph()) -> [vertex()].
+-spec source_vertices(graph()) -> [vertex()].
source_vertices(G) ->
collect_vertices(G, in).
--spec sink_vertices(digraph()) -> [vertex()].
+-spec sink_vertices(graph()) -> [vertex()].
sink_vertices(G) ->
collect_vertices(G, out).
-spec in_degree(G, V) -> non_neg_integer() when
- G :: digraph(),
+ G :: graph(),
V :: vertex().
in_degree(G, V) ->
length(ets:lookup(G#digraph.ntab, {in, V})).
-spec in_neighbours(G, V) -> Vertex when
- G :: digraph(),
+ G :: graph(),
V :: vertex(),
Vertex :: [vertex()].
@@ -228,7 +224,7 @@ in_neighbours(G, V) ->
collect_elems(ets:lookup(NT, {in, V}), ET, 2).
-spec in_edges(G, V) -> Edges when
- G :: digraph(),
+ G :: graph(),
V :: vertex(),
Edges :: [edge()].
@@ -236,14 +232,14 @@ in_edges(G, V) ->
ets:select(G#digraph.ntab, [{{{in, V}, '$1'}, [], ['$1']}]).
-spec out_degree(G, V) -> non_neg_integer() when
- G :: digraph(),
+ G :: graph(),
V :: vertex().
out_degree(G, V) ->
length(ets:lookup(G#digraph.ntab, {out, V})).
-spec out_neighbours(G, V) -> Vertices when
- G :: digraph(),
+ G :: graph(),
V :: vertex(),
Vertices :: [vertex()].
@@ -253,7 +249,7 @@ out_neighbours(G, V) ->
collect_elems(ets:lookup(NT, {out, V}), ET, 3).
-spec out_edges(G, V) -> Edges when
- G :: digraph(),
+ G :: graph(),
V :: vertex(),
Edges :: [edge()].
@@ -261,7 +257,7 @@ out_edges(G, V) ->
ets:select(G#digraph.ntab, [{{{out, V}, '$1'}, [], ['$1']}]).
-spec add_edge(G, V1, V2) -> edge() | {'error', add_edge_err_rsn()} when
- G :: digraph(),
+ G :: graph(),
V1 :: vertex(),
V2 :: vertex().
@@ -269,7 +265,7 @@ add_edge(G, V1, V2) ->
do_add_edge({new_edge_id(G), V1, V2, []}, G).
-spec add_edge(G, V1, V2, Label) -> edge() | {'error', add_edge_err_rsn()} when
- G :: digraph(),
+ G :: graph(),
V1 :: vertex(),
V2 :: vertex(),
Label :: label().
@@ -278,7 +274,7 @@ add_edge(G, V1, V2, D) ->
do_add_edge({new_edge_id(G), V1, V2, D}, G).
-spec add_edge(G, E, V1, V2, Label) -> edge() | {'error', add_edge_err_rsn()} when
- G :: digraph(),
+ G :: graph(),
E :: edge(),
V1 :: vertex(),
V2 :: vertex(),
@@ -288,34 +284,34 @@ add_edge(G, E, V1, V2, D) ->
do_add_edge({E, V1, V2, D}, G).
-spec del_edge(G, E) -> 'true' when
- G :: digraph(),
+ G :: graph(),
E :: edge().
del_edge(G, E) ->
do_del_edges([E], G).
-spec del_edges(G, Edges) -> 'true' when
- G :: digraph(),
+ G :: graph(),
Edges :: [edge()].
del_edges(G, Es) ->
do_del_edges(Es, G).
-spec no_edges(G) -> non_neg_integer() when
- G :: digraph().
+ G :: graph().
no_edges(G) ->
ets:info(G#digraph.etab, size).
-spec edges(G) -> Edges when
- G :: digraph(),
+ G :: graph(),
Edges :: [edge()].
edges(G) ->
ets:select(G#digraph.etab, [{{'$1', '_', '_', '_'}, [], ['$1']}]).
-spec edges(G, V) -> Edges when
- G :: digraph(),
+ G :: graph(),
V :: vertex(),
Edges :: [edge()].
@@ -324,7 +320,7 @@ edges(G, V) ->
{{{in, V}, '$1'}, [], ['$1']}]).
-spec edge(G, E) -> {E, V1, V2, Label} | 'false' when
- G :: digraph(),
+ G :: graph(),
E :: edge(),
V1 :: vertex(),
V2 :: vertex(),
@@ -339,7 +335,7 @@ edge(G, E) ->
%%
%% Generate a "unique" edge identifier (relative to this graph)
%%
--spec new_edge_id(digraph()) -> edge().
+-spec new_edge_id(graph()) -> edge().
new_edge_id(G) ->
NT = G#digraph.ntab,
@@ -351,7 +347,7 @@ new_edge_id(G) ->
%%
%% Generate a "unique" vertex identifier (relative to this graph)
%%
--spec new_vertex_id(digraph()) -> vertex().
+-spec new_vertex_id(graph()) -> vertex().
new_vertex_id(G) ->
NT = G#digraph.ntab,
@@ -371,7 +367,7 @@ collect_elems([{_,Key}|Keys], Table, Index, Acc) ->
[ets:lookup_element(Table, Key, Index)|Acc]);
collect_elems([], _, _, Acc) -> Acc.
--spec do_add_vertex({vertex(), label()}, digraph()) -> vertex().
+-spec do_add_vertex({vertex(), label()}, graph()) -> vertex().
do_add_vertex({V, _Label} = VL, G) ->
ets:insert(G#digraph.vtab, VL),
@@ -430,14 +426,14 @@ do_del_edge(E, V1, V2, G) ->
{{{out,V1}, E}, [], [true]}]),
ets:delete(G#digraph.etab, E).
--spec rm_edges([vertex(),...], digraph()) -> 'true'.
+-spec rm_edges([vertex(),...], graph()) -> 'true'.
rm_edges([V1, V2|Vs], G) ->
rm_edge(V1, V2, G),
rm_edges([V2|Vs], G);
rm_edges(_, _) -> true.
--spec rm_edge(vertex(), vertex(), digraph()) -> 'ok'.
+-spec rm_edge(vertex(), vertex(), graph()) -> 'ok'.
rm_edge(V1, V2, G) ->
Es = out_edges(G, V1),
@@ -456,7 +452,7 @@ rm_edge_0([], _, _, #digraph{}) -> ok.
%%
%% Check that endpoints exist
%%
--spec do_add_edge({edge(), vertex(), vertex(), label()}, digraph()) ->
+-spec do_add_edge({edge(), vertex(), vertex(), label()}, graph()) ->
edge() | {'error', add_edge_err_rsn()}.
do_add_edge({E, V1, V2, Label}, G) ->
@@ -484,14 +480,14 @@ other_edge_exists(#digraph{etab = ET}, E, V1, V2) ->
false
end.
--spec do_insert_edge(edge(), vertex(), vertex(), label(), digraph()) -> edge().
+-spec do_insert_edge(edge(), vertex(), vertex(), label(), graph()) -> edge().
do_insert_edge(E, V1, V2, Label, #digraph{ntab=NT, etab=ET}) ->
ets:insert(NT, [{{out, V1}, E}, {{in, V2}, E}]),
ets:insert(ET, {E, V1, V2, Label}),
E.
--spec acyclic_add_edge(edge(), vertex(), vertex(), label(), digraph()) ->
+-spec acyclic_add_edge(edge(), vertex(), vertex(), label(), graph()) ->
edge() | {'error', {'bad_edge', [vertex()]}}.
acyclic_add_edge(_E, V1, V2, _L, _G) when V1 =:= V2 ->
@@ -507,7 +503,7 @@ acyclic_add_edge(E, V1, V2, Label, G) ->
%%
-spec del_path(G, V1, V2) -> 'true' when
- G :: digraph(),
+ G :: graph(),
V1 :: vertex(),
V2 :: vertex().
@@ -529,7 +525,7 @@ del_path(G, V1, V2) ->
%%
-spec get_cycle(G, V) -> Vertices | 'false' when
- G :: digraph(),
+ G :: graph(),
V :: vertex(),
Vertices :: [vertex(),...].
@@ -550,7 +546,7 @@ get_cycle(G, V) ->
%%
-spec get_path(G, V1, V2) -> Vertices | 'false' when
- G :: digraph(),
+ G :: graph(),
V1 :: vertex(),
V2 :: vertex(),
Vertices :: [vertex(),...].
@@ -589,7 +585,7 @@ one_path([], _, [], _, _, _, _, _Counter) -> false.
%%
-spec get_short_cycle(G, V) -> Vertices | 'false' when
- G :: digraph(),
+ G :: graph(),
V :: vertex(),
Vertices :: [vertex(),...].
@@ -602,7 +598,7 @@ get_short_cycle(G, V) ->
%%
-spec get_short_path(G, V1, V2) -> Vertices | 'false' when
- G :: digraph(),
+ G :: graph(),
V1 :: vertex(),
V2 :: vertex(),
Vertices :: [vertex(),...].
diff --git a/lib/stdlib/src/digraph_utils.erl b/lib/stdlib/src/digraph_utils.erl
index 0e248df453..011bcd0260 100644
--- a/lib/stdlib/src/digraph_utils.erl
+++ b/lib/stdlib/src/digraph_utils.erl
@@ -1,7 +1,7 @@
%%
%% %CopyrightBegin%
%%
-%% Copyright Ericsson AB 1999-2013. All Rights Reserved.
+%% Copyright Ericsson AB 1999-2014. 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
@@ -43,28 +43,28 @@
%%
-spec components(Digraph) -> [Component] when
- Digraph :: digraph(),
+ Digraph :: digraph:graph(),
Component :: [digraph:vertex()].
components(G) ->
forest(G, fun inout/3).
-spec strong_components(Digraph) -> [StrongComponent] when
- Digraph :: digraph(),
+ Digraph :: digraph:graph(),
StrongComponent :: [digraph:vertex()].
strong_components(G) ->
forest(G, fun in/3, revpostorder(G)).
-spec cyclic_strong_components(Digraph) -> [StrongComponent] when
- Digraph :: digraph(),
+ Digraph :: digraph:graph(),
StrongComponent :: [digraph:vertex()].
cyclic_strong_components(G) ->
remove_singletons(strong_components(G), G, []).
-spec reachable(Vertices, Digraph) -> Reachable when
- Digraph :: digraph(),
+ Digraph :: digraph:graph(),
Vertices :: [digraph:vertex()],
Reachable :: [digraph:vertex()].
@@ -72,7 +72,7 @@ reachable(Vs, G) when is_list(Vs) ->
lists:append(forest(G, fun out/3, Vs, first)).
-spec reachable_neighbours(Vertices, Digraph) -> Reachable when
- Digraph :: digraph(),
+ Digraph :: digraph:graph(),
Vertices :: [digraph:vertex()],
Reachable :: [digraph:vertex()].
@@ -80,7 +80,7 @@ reachable_neighbours(Vs, G) when is_list(Vs) ->
lists:append(forest(G, fun out/3, Vs, not_first)).
-spec reaching(Vertices, Digraph) -> Reaching when
- Digraph :: digraph(),
+ Digraph :: digraph:graph(),
Vertices :: [digraph:vertex()],
Reaching :: [digraph:vertex()].
@@ -88,7 +88,7 @@ reaching(Vs, G) when is_list(Vs) ->
lists:append(forest(G, fun in/3, Vs, first)).
-spec reaching_neighbours(Vertices, Digraph) -> Reaching when
- Digraph :: digraph(),
+ Digraph :: digraph:graph(),
Vertices :: [digraph:vertex()],
Reaching :: [digraph:vertex()].
@@ -96,7 +96,7 @@ reaching_neighbours(Vs, G) when is_list(Vs) ->
lists:append(forest(G, fun in/3, Vs, not_first)).
-spec topsort(Digraph) -> Vertices | 'false' when
- Digraph :: digraph(),
+ Digraph :: digraph:graph(),
Vertices :: [digraph:vertex()].
topsort(G) ->
@@ -107,13 +107,13 @@ topsort(G) ->
end.
-spec is_acyclic(Digraph) -> boolean() when
- Digraph :: digraph().
+ Digraph :: digraph:graph().
is_acyclic(G) ->
loop_vertices(G) =:= [] andalso topsort(G) =/= false.
-spec arborescence_root(Digraph) -> 'no' | {'yes', Root} when
- Digraph :: digraph(),
+ Digraph :: digraph:graph(),
Root :: digraph:vertex().
arborescence_root(G) ->
@@ -136,29 +136,29 @@ arborescence_root(G) ->
end.
-spec is_arborescence(Digraph) -> boolean() when
- Digraph :: digraph().
+ Digraph :: digraph:graph().
is_arborescence(G) ->
arborescence_root(G) =/= no.
-spec is_tree(Digraph) -> boolean() when
- Digraph :: digraph().
+ Digraph :: digraph:graph().
is_tree(G) ->
(digraph:no_edges(G) =:= digraph:no_vertices(G) - 1)
andalso (length(components(G)) =:= 1).
-spec loop_vertices(Digraph) -> Vertices when
- Digraph :: digraph(),
+ Digraph :: digraph:graph(),
Vertices :: [digraph:vertex()].
loop_vertices(G) ->
[V || V <- digraph:vertices(G), is_reflexive_vertex(V, G)].
-spec subgraph(Digraph, Vertices) -> SubGraph when
- Digraph :: digraph(),
+ Digraph :: digraph:graph(),
Vertices :: [digraph:vertex()],
- SubGraph :: digraph().
+ SubGraph :: digraph:graph().
subgraph(G, Vs) ->
try
@@ -169,8 +169,8 @@ subgraph(G, Vs) ->
end.
-spec subgraph(Digraph, Vertices, Options) -> SubGraph when
- Digraph :: digraph(),
- SubGraph :: digraph(),
+ Digraph :: digraph:graph(),
+ SubGraph :: digraph:graph(),
Vertices :: [digraph:vertex()],
Options :: [{'type', SubgraphType} | {'keep_labels', boolean()}],
SubgraphType :: 'inherit' | [digraph:d_type()].
@@ -184,8 +184,8 @@ subgraph(G, Vs, Opts) ->
end.
-spec condensation(Digraph) -> CondensedDigraph when
- Digraph :: digraph(),
- CondensedDigraph :: digraph().
+ Digraph :: digraph:graph(),
+ CondensedDigraph :: digraph:graph().
condensation(G) ->
SCs = strong_components(G),
@@ -209,14 +209,14 @@ condensation(G) ->
SCG.
-spec preorder(Digraph) -> Vertices when
- Digraph :: digraph(),
+ Digraph :: digraph:graph(),
Vertices :: [digraph:vertex()].
preorder(G) ->
lists:reverse(revpreorder(G)).
-spec postorder(Digraph) -> Vertices when
- Digraph :: digraph(),
+ Digraph :: digraph:graph(),
Vertices :: [digraph:vertex()].
postorder(G) ->
diff --git a/lib/stdlib/src/edlin_expand.erl b/lib/stdlib/src/edlin_expand.erl
index 516c0aa30b..a2b4663219 100644
--- a/lib/stdlib/src/edlin_expand.erl
+++ b/lib/stdlib/src/edlin_expand.erl
@@ -73,7 +73,7 @@ to_atom(Str) ->
error
end.
-match(Prefix, Alts, Extra) ->
+match(Prefix, Alts, Extra0) ->
Len = length(Prefix),
Matches = lists:sort(
[{S, A} || {H, A} <- Alts,
@@ -89,7 +89,11 @@ match(Prefix, Alts, Extra) ->
{yes, Remain, []}
end;
{complete, Str} ->
- {yes, nthtail(Len, Str) ++ Extra, []};
+ Extra = case {Extra0,Matches} of
+ {"(",[{Str,0}]} -> "()";
+ {_,_} -> Extra0
+ end,
+ {yes, nthtail(Len, Str) ++ Extra, []};
no ->
{no, [], []}
end.
diff --git a/lib/stdlib/src/epp.erl b/lib/stdlib/src/epp.erl
index 4fd302e612..9b506b0a44 100644
--- a/lib/stdlib/src/epp.erl
+++ b/lib/stdlib/src/epp.erl
@@ -1,7 +1,7 @@
%%
%% %CopyrightBegin%
%%
-%% Copyright Ericsson AB 1996-2013. All Rights Reserved.
+%% Copyright Ericsson AB 1996-2014. All Rights Reserved.
%%
%% The contents of this file are subject to the Erlang Public License,
%% Version 1.1, (the "License"); you may not use this file except in
@@ -20,12 +20,12 @@
%% An Erlang code preprocessor.
--export([open/2,open/3,open/5,close/1,format_error/1]).
+-export([open/1, open/2,open/3,open/5,close/1,format_error/1]).
-export([scan_erl_form/1,parse_erl_form/1,macro_defs/1]).
--export([parse_file/1, parse_file/3]).
+-export([parse_file/1, parse_file/2, parse_file/3]).
-export([default_encoding/0, encoding_to_string/1,
read_encoding_from_binary/1, read_encoding_from_binary/2,
- set_encoding/1, read_encoding/1, read_encoding/2]).
+ set_encoding/1, set_encoding/2, read_encoding/1, read_encoding/2]).
-export([interpret_file_attribute/1]).
-export([normalize_typed_record_fields/1,restore_typed_record_fields/1]).
@@ -33,21 +33,34 @@
-export_type([source_encoding/0]).
--type macros() :: [{atom(), term()}].
+-type macros() :: [atom() | {atom(), term()}].
-type epp_handle() :: pid().
-type source_encoding() :: latin1 | utf8.
+-type ifdef() :: 'ifdef' | 'ifndef' | 'else'.
+
+-type name() :: {'atom', atom()}.
+-type argspec() :: 'none' %No arguments
+ | non_neg_integer(). %Number of arguments
+-type tokens() :: [erl_scan:token()].
+-type used() :: {name(), argspec()}.
+
+-define(DEFAULT_ENCODING, utf8).
+
%% Epp state record.
--record(epp, {file, %Current file
- location, %Current location
- delta, %Offset from Location (-file)
- name="", %Current file name
- name2="", %-"-, modified by -file
- istk=[], %Ifdef stack
- sstk=[], %State stack
- path=[], %Include-path
- macs = dict:new() :: dict(), %Macros (don't care locations)
- uses = dict:new() :: dict(), %Macro use structure
+-record(epp, {file :: file:io_device(), %Current file
+ location=1, %Current location
+ delta=0 :: non_neg_integer(), %Offset from Location (-file)
+ name="" :: file:name(), %Current file name
+ name2="" :: file:name(), %-"-, modified by -file
+ istk=[] :: [ifdef()], %Ifdef stack
+ sstk=[] :: [#epp{}], %State stack
+ path=[] :: [file:name()], %Include-path
+ macs = dict:new() %Macros (don't care locations)
+ :: dict:dict(name(), {argspec(), tokens()}),
+ uses = dict:new() %Macro use structure
+ :: dict:dict(name(), [{argspec(), [used()]}]),
+ default_encoding = ?DEFAULT_ENCODING :: source_encoding(),
pre_opened = false :: boolean()
}).
@@ -58,6 +71,7 @@
%%% distinction in the internal representation would simplify the code
%%% a little.
+%% open(Options)
%% open(FileName, IncludePath)
%% open(FileName, IncludePath, PreDefMacros)
%% open(FileName, IoDevice, StartLocation, IncludePath, PreDefMacros)
@@ -65,6 +79,7 @@
%% scan_erl_form(Epp)
%% parse_erl_form(Epp)
%% parse_file(Epp)
+%% parse_file(FileName, Options)
%% parse_file(FileName, IncludePath, PreDefMacros)
%% macro_defs(Epp)
@@ -87,14 +102,43 @@ open(Name, Path) ->
ErrorDescriptor :: term().
open(Name, Path, Pdm) ->
- Self = self(),
- Epp = spawn(fun() -> server(Self, Name, Path, Pdm) end),
- epp_request(Epp).
+ internal_open([{name, Name}, {includes, Path}, {macros, Pdm}], #epp{}).
open(Name, File, StartLocation, Path, Pdm) ->
- Self = self(),
- Epp = spawn(fun() -> server(Self, Name, File, StartLocation,Path,Pdm) end),
- epp_request(Epp).
+ internal_open([{name, Name}, {includes, Path}, {macros, Pdm}],
+ #epp{file=File, pre_opened=true, location=StartLocation}).
+
+-spec open(Options) ->
+ {'ok', Epp} | {'ok', Epp, Extra} | {'error', ErrorDescriptor} when
+ Options :: [{'default_encoding', DefEncoding :: source_encoding()} |
+ {'includes', IncludePath :: [DirectoryName :: file:name()]} |
+ {'macros', PredefMacros :: macros()} |
+ {'name',FileName :: file:name()} |
+ 'extra'],
+ Epp :: epp_handle(),
+ Extra :: [{'encoding', source_encoding() | 'none'}],
+ ErrorDescriptor :: term().
+
+open(Options) ->
+ internal_open(Options, #epp{}).
+
+internal_open(Options, St) ->
+ case proplists:get_value(name, Options) of
+ undefined ->
+ erlang:error(badarg);
+ Name ->
+ Self = self(),
+ Epp = spawn(fun() -> server(Self, Name, Options, St) end),
+ case epp_request(Epp) of
+ {ok, Pid, Encoding} ->
+ case proplists:get_bool(extra, Options) of
+ true -> {ok, Pid, [{encoding, Encoding}]};
+ false -> {ok, Pid}
+ end;
+ Other ->
+ Other
+ end
+ end.
-spec close(Epp) -> 'ok' when
Epp :: epp_handle().
@@ -170,9 +214,6 @@ format_error({'NYI',What}) ->
io_lib:format("not yet implemented '~s'", [What]);
format_error(E) -> file:format_error(E).
-%% parse_file(FileName, IncludePath, [PreDefMacro]) ->
-%% {ok,[Form]} | {error,OpenError}
-
-spec parse_file(FileName, IncludePath, PredefMacros) ->
{'ok', [Form]} | {error, OpenError} when
FileName :: file:name(),
@@ -184,17 +225,40 @@ format_error(E) -> file:format_error(E).
OpenError :: file:posix() | badarg | system_limit.
parse_file(Ifile, Path, Predefs) ->
- case open(Ifile, Path, Predefs) of
+ parse_file(Ifile, [{includes, Path}, {macros, Predefs}]).
+
+-spec parse_file(FileName, Options) ->
+ {'ok', [Form]} | {'ok', [Form], Extra} | {error, OpenError} when
+ FileName :: file:name(),
+ Options :: [{'includes', IncludePath :: [DirectoryName :: file:name()]} |
+ {'macros', PredefMacros :: macros()} |
+ {'default_encoding', DefEncoding :: source_encoding()} |
+ 'extra'],
+ Form :: erl_parse:abstract_form() | {'error', ErrorInfo} | {'eof',Line},
+ Line :: erl_scan:line(),
+ ErrorInfo :: erl_scan:error_info() | erl_parse:error_info(),
+ Extra :: [{'encoding', source_encoding() | 'none'}],
+ OpenError :: file:posix() | badarg | system_limit.
+
+parse_file(Ifile, Options) ->
+ case internal_open([{name, Ifile} | Options], #epp{}) of
{ok,Epp} ->
Forms = parse_file(Epp),
close(Epp),
{ok,Forms};
+ {ok,Epp,Extra} ->
+ Forms = parse_file(Epp),
+ close(Epp),
+ {ok,Forms,Extra};
{error,E} ->
{error,E}
end.
-%% parse_file(Epp) ->
-%% [Form]
+-spec parse_file(Epp) -> [Form] when
+ Epp :: epp_handle(),
+ Form :: erl_parse:abstract_form() | {'error', ErrorInfo} | {'eof',Line},
+ Line :: erl_scan:line(),
+ ErrorInfo :: erl_scan:error_info() | erl_parse:error_info().
parse_file(Epp) ->
case parse_erl_form(Epp) of
@@ -219,8 +283,6 @@ parse_file(Epp) ->
[{eof,Location}]
end.
--define(DEFAULT_ENCODING, utf8).
-
-spec default_encoding() -> source_encoding().
default_encoding() ->
@@ -258,9 +320,16 @@ read_encoding(Name, Options) ->
File :: io:device(). % pid(); raw files don't work
set_encoding(File) ->
+ set_encoding(File, ?DEFAULT_ENCODING).
+
+-spec set_encoding(File, Default) -> source_encoding() | none when
+ Default :: source_encoding(),
+ File :: io:device(). % pid(); raw files don't work
+
+set_encoding(File, Default) ->
Encoding = read_encoding_from_file(File, true),
Enc = case Encoding of
- none -> default_encoding();
+ none -> Default;
Encoding -> Encoding
end,
ok = io:setopts(File, [{encoding, Enc}]),
@@ -446,35 +515,37 @@ restore_typed_record_fields([{attribute,La,type,{{record,Record},Fields,[]}}|
restore_typed_record_fields([Form|Forms]) ->
[Form|restore_typed_record_fields(Forms)].
-%% server(StarterPid, FileName, Path, PreDefMacros)
-
-server(Pid, Name, Path, Pdm) ->
+server(Pid, Name, Options, #epp{pre_opened=PreOpened}=St) ->
process_flag(trap_exit, true),
- case file:open(Name, [read]) of
- {ok,File} ->
- Location = 1,
- init_server(Pid, Name, File, Location, Path, Pdm, false);
- {error,E} ->
- epp_reply(Pid, {error,E})
+ case PreOpened of
+ false ->
+ case file:open(Name, [read]) of
+ {ok,File} ->
+ init_server(Pid, Name, Options, St#epp{file = File});
+ {error,E} ->
+ epp_reply(Pid, {error,E})
+ end;
+ true ->
+ init_server(Pid, Name, Options, St)
end.
-%% server(StarterPid, FileName, IoDevice, Location, Path, PreDefMacros)
-server(Pid, Name, File, AtLocation, Path, Pdm) ->
- process_flag(trap_exit, true),
- init_server(Pid, Name, File, AtLocation, Path, Pdm, true).
-
-init_server(Pid, Name, File, AtLocation, Path, Pdm, Pre) ->
+init_server(Pid, Name, Options, St0) ->
+ Pdm = proplists:get_value(macros, Options, []),
Ms0 = predef_macros(Name),
case user_predef(Pdm, Ms0) of
{ok,Ms1} ->
- _ = set_encoding(File),
- epp_reply(Pid, {ok,self()}),
+ #epp{file = File, location = AtLocation} = St0,
+ DefEncoding = proplists:get_value(default_encoding, Options,
+ ?DEFAULT_ENCODING),
+ Encoding = set_encoding(File, DefEncoding),
+ epp_reply(Pid, {ok,self(),Encoding}),
%% ensure directory of current source file is
%% first in path
- Path1 = [filename:dirname(Name) | Path],
- St = #epp{file=File, location=AtLocation, delta=0,
- name=Name, name2=Name, path=Path1, macs=Ms1,
- pre_opened = Pre},
+ Path = [filename:dirname(Name) |
+ proplists:get_value(includes, Options, [])],
+ St = St0#epp{delta=0, name=Name, name2=Name,
+ path=Path, macs=Ms1,
+ default_encoding=DefEncoding},
From = wait_request(St),
enter_file_reply(From, Name, AtLocation, AtLocation),
wait_req_scan(St);
@@ -600,9 +671,11 @@ enter_file2(NewF, Pname, From, St0, AtLocation) ->
%% the path) must be dropped, otherwise the path used within the current
%% file will depend on the order of file inclusions in the parent files
Path = [filename:dirname(Pname) | tl(St0#epp.path)],
- _ = set_encoding(NewF),
+ DefEncoding = St0#epp.default_encoding,
+ _ = set_encoding(NewF, DefEncoding),
#epp{file=NewF,location=Loc,name=Pname,name2=Pname,delta=0,
- sstk=[St0|St0#epp.sstk],path=Path,macs=Ms}.
+ sstk=[St0|St0#epp.sstk],path=Path,macs=Ms,
+ default_encoding=DefEncoding}.
enter_file_reply(From, Name, Location, AtLocation) ->
Attr = loc_attr(AtLocation),
@@ -640,7 +713,7 @@ leave_file(From, St) ->
Ms = dict:store({atom,'FILE'},
{none,[{string,CurrLoc,OldName2}]},
St#epp.macs),
- NextSt = OldSt#epp{sstk=Sts,macs=Ms},
+ NextSt = OldSt#epp{sstk=Sts,macs=Ms,uses=St#epp.uses},
enter_file_reply(From, OldName, CurrLoc, CurrLoc),
case OldName2 =:= OldName of
true ->
diff --git a/lib/stdlib/src/erl_compile.erl b/lib/stdlib/src/erl_compile.erl
index ed8fea5d78..caed4d41d6 100644
--- a/lib/stdlib/src/erl_compile.erl
+++ b/lib/stdlib/src/erl_compile.erl
@@ -1,7 +1,7 @@
%%
%% %CopyrightBegin%
%%
-%% Copyright Ericsson AB 1997-2013. All Rights Reserved.
+%% Copyright Ericsson AB 1997-2014. 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
@@ -66,7 +66,7 @@ my_halt(Reason) ->
compile(List) ->
process_flag(trap_exit, true),
- Pid = spawn_link(fun() -> compiler_runner(List) end),
+ Pid = spawn_link(compiler_runner(List)),
receive
{'EXIT', Pid, {compiler_result, Result}} ->
Result;
@@ -79,14 +79,16 @@ compile(List) ->
error
end.
--spec compiler_runner([cmd_line_arg()]) -> no_return().
+-spec compiler_runner([cmd_line_arg()]) -> fun(() -> no_return()).
compiler_runner(List) ->
- %% We don't want the current directory in the code path.
- %% Remove it.
- Path = [D || D <- code:get_path(), D =/= "."],
- true = code:set_path(Path),
- exit({compiler_result, compile1(List)}).
+ fun() ->
+ %% We don't want the current directory in the code path.
+ %% Remove it.
+ Path = [D || D <- code:get_path(), D =/= "."],
+ true = code:set_path(Path),
+ exit({compiler_result, compile1(List)})
+ end.
%% Parses the first part of the option list.
diff --git a/lib/stdlib/src/erl_eval.erl b/lib/stdlib/src/erl_eval.erl
index 18d8148b15..3cfedfee97 100644
--- a/lib/stdlib/src/erl_eval.erl
+++ b/lib/stdlib/src/erl_eval.erl
@@ -18,6 +18,9 @@
%%
-module(erl_eval).
+%% Guard is_map/1 is not yet supported in HiPE.
+-compile(no_native).
+
%% An evaluator for Erlang abstract syntax.
-export([exprs/2,exprs/3,exprs/4,expr/2,expr/3,expr/4,expr/5,
@@ -239,6 +242,28 @@ expr({record,_,Name,_}, _Bs, _Lf, _Ef, _RBs) ->
erlang:raise(error, {undef_record,Name}, stacktrace());
expr({record,_,_,Name,_}, _Bs, _Lf, _Ef, _RBs) ->
erlang:raise(error, {undef_record,Name}, stacktrace());
+
+%% map
+expr({map,_,Binding,Es}, Bs0, Lf, Ef, RBs) ->
+ {value, Map0, Bs1} = expr(Binding, Bs0, Lf, Ef, none),
+ case Map0 of
+ #{} ->
+ {Vs,Bs2} = eval_map_fields(Es, Bs0, Lf, Ef),
+ Map1 = lists:foldl(fun ({map_assoc,K,V}, Mi) ->
+ maps:put(K, V, Mi);
+ ({map_exact,K,V}, Mi) ->
+ maps:update(K, V, Mi)
+ end, Map0, Vs),
+ ret_expr(Map1, merge_bindings(Bs2, Bs1), RBs);
+ _ ->
+ erlang:raise(error, {badarg,Map0}, stacktrace())
+ end;
+expr({map,_,Es}, Bs0, Lf, Ef, RBs) ->
+ {Vs,Bs} = eval_map_fields(Es, Bs0, Lf, Ef),
+ ret_expr(lists:foldl(fun
+ ({map_assoc,K,V}, Mi) -> maps:put(K,V,Mi)
+ end, maps:new(), Vs), Bs, RBs);
+
expr({block,_,Es}, Bs, Lf, Ef, RBs) ->
exprs(Es, Bs, Lf, Ef, RBs);
expr({'if',_,Cs}, Bs, Lf, Ef, RBs) ->
@@ -726,6 +751,24 @@ eval_filter(F, Bs0, Lf, Ef, CompFun, Acc) ->
end
end.
+%% eval_map_fields([Field], Bindings, LocalFunctionHandler,
+%% ExternalFuncHandler) ->
+%% {[{map_assoc | map_exact,Key,Value}],Bindings}
+
+eval_map_fields(Fs, Bs, Lf, Ef) ->
+ eval_map_fields(Fs, Bs, Lf, Ef, []).
+
+eval_map_fields([{map_field_assoc,_,K0,V0}|Fs], Bs0, Lf, Ef, Acc) ->
+ {value,K1,Bs1} = expr(K0, Bs0, Lf, Ef, none),
+ {value,V1,Bs2} = expr(V0, Bs1, Lf, Ef, none),
+ eval_map_fields(Fs, Bs2, Lf, Ef, [{map_assoc,K1,V1}|Acc]);
+eval_map_fields([{map_field_exact,_,K0,V0}|Fs], Bs0, Lf, Ef, Acc) ->
+ {value,K1,Bs1} = expr(K0, Bs0, Lf, Ef, none),
+ {value,V1,Bs2} = expr(V0, Bs1, Lf, Ef, none),
+ eval_map_fields(Fs, Bs2, Lf, Ef, [{map_exact,K1,V1}|Acc]);
+eval_map_fields([], Bs, _Lf, _Ef, Acc) ->
+ {lists:reverse(Acc),Bs}.
+
%% RBs is the bindings to return when the evalution of a function
%% (fun) has finished. If RBs =:= none, then the evalution took place
@@ -973,12 +1016,16 @@ guard0([], _Bs, _Lf, _Ef) -> true.
guard_test({call,L,{atom,Ln,F},As0}, Bs0, Lf, Ef) ->
TT = type_test(F),
G = {call,L,{atom,Ln,TT},As0},
- try {value,true,_} = expr(G, Bs0, Lf, Ef, none)
- catch error:_ -> {value,false,Bs0} end;
-guard_test({call,L,{remote,_Lr,{atom,_Lm,erlang},{atom,_Lf,_F}=T},As0},
+ expr_guard_test(G, Bs0, Lf, Ef);
+guard_test({call,L,{remote,Lr,{atom,Lm,erlang},{atom,Lf,F}},As0},
Bs0, Lf, Ef) ->
- guard_test({call,L,T,As0}, Bs0, Lf, Ef);
+ TT = type_test(F),
+ G = {call,L,{remote,Lr,{atom,Lm,erlang},{atom,Lf,TT}},As0},
+ expr_guard_test(G, Bs0, Lf, Ef);
guard_test(G, Bs0, Lf, Ef) ->
+ expr_guard_test(G, Bs0, Lf, Ef).
+
+expr_guard_test(G, Bs0, Lf, Ef) ->
try {value,true,_} = expr(G, Bs0, Lf, Ef, none)
catch error:_ -> {value,false,Bs0} end.
@@ -994,6 +1041,7 @@ type_test(port) -> is_port;
type_test(function) -> is_function;
type_test(binary) -> is_binary;
type_test(record) -> is_record;
+type_test(map) -> is_map;
type_test(Test) -> Test.
@@ -1075,6 +1123,10 @@ match1({tuple,_,Elts}, Tuple, Bs, BBs)
match_tuple(Elts, Tuple, 1, Bs, BBs);
match1({tuple,_,_}, _, _Bs, _BBs) ->
throw(nomatch);
+match1({map,_,Fs}, #{}=Map, Bs, BBs) ->
+ match_map(Fs, Map, Bs, BBs);
+match1({map,_,_}, _, _Bs, _BBs) ->
+ throw(nomatch);
match1({bin, _, Fs}, <<_/bitstring>>=B, Bs0, BBs) ->
eval_bits:match_bits(Fs, B, Bs0, BBs,
match_fun(BBs),
@@ -1118,6 +1170,18 @@ match_tuple([E|Es], Tuple, I, Bs0, BBs) ->
match_tuple([], _, _, Bs, _BBs) ->
{match,Bs}.
+match_map([{map_field_exact, _, K, V}|Fs], Map, Bs0, BBs) ->
+ Vm = try
+ {value, Ke, _} = expr(K, new_bindings()),
+ maps:get(Ke,Map)
+ catch error:_ ->
+ throw(nomatch)
+ end,
+ {match, Bs} = match1(V, Vm, Bs0, BBs),
+ match_map(Fs, Map, Bs, BBs);
+match_map([], _, Bs, _) ->
+ {match, Bs}.
+
%% match_list(PatternList, TermList, Bindings) ->
%% {match,NewBindings} | nomatch
%% Try to match a list of patterns against a list of terms with the
diff --git a/lib/stdlib/src/erl_expand_records.erl b/lib/stdlib/src/erl_expand_records.erl
index 776b433613..57e768ba9d 100644
--- a/lib/stdlib/src/erl_expand_records.erl
+++ b/lib/stdlib/src/erl_expand_records.erl
@@ -132,6 +132,13 @@ pattern({cons,Line,H,T}, St0) ->
pattern({tuple,Line,Ps}, St0) ->
{TPs,St1} = pattern_list(Ps, St0),
{{tuple,Line,TPs},St1};
+pattern({map,Line,Ps}, St0) ->
+ {TPs,St1} = pattern_list(Ps, St0),
+ {{map,Line,TPs},St1};
+pattern({map_field_exact,Line,K0,V0}, St0) ->
+ {K,St1} = expr(K0, St0),
+ {V,St2} = pattern(V0, St1),
+ {{map_field_exact,Line,K,V},St2};
%%pattern({struct,Line,Tag,Ps}, St0) ->
%% {TPs,TPsvs,St1} = pattern_list(Ps, St0),
%% {{struct,Line,Tag,TPs},TPsvs,St1};
@@ -301,6 +308,21 @@ expr({bc,Line,E0,Qs0}, St0) ->
expr({tuple,Line,Es0}, St0) ->
{Es1,St1} = expr_list(Es0, St0),
{{tuple,Line,Es1},St1};
+expr({map,Line,Es0}, St0) ->
+ {Es1,St1} = expr_list(Es0, St0),
+ {{map,Line,Es1},St1};
+expr({map,Line,Arg0,Es0}, St0) ->
+ {Arg1,St1} = expr(Arg0, St0),
+ {Es1,St2} = expr_list(Es0, St1),
+ {{map,Line,Arg1,Es1},St2};
+expr({map_field_assoc,Line,K0,V0}, St0) ->
+ {K,St1} = expr(K0, St0),
+ {V,St2} = expr(V0, St1),
+ {{map_field_assoc,Line,K,V},St2};
+expr({map_field_exact,Line,K0,V0}, St0) ->
+ {K,St1} = expr(K0, St0),
+ {V,St2} = expr(V0, St1),
+ {{map_field_exact,Line,K,V},St2};
%%expr({struct,Line,Tag,Es0}, Vs, St0) ->
%% {Es1,Esvs,Esus,St1} = expr_list(Es0, Vs, St0),
%% {{struct,Line,Tag,Es1},Esvs,Esus,St1};
diff --git a/lib/stdlib/src/erl_internal.erl b/lib/stdlib/src/erl_internal.erl
index 28de7205ea..edfb097de0 100644
--- a/lib/stdlib/src/erl_internal.erl
+++ b/lib/stdlib/src/erl_internal.erl
@@ -70,6 +70,7 @@ guard_bif(bit_size, 1) -> true;
guard_bif(byte_size, 1) -> true;
guard_bif(element, 2) -> true;
guard_bif(self, 0) -> true;
+guard_bif(map_size, 1) -> true;
guard_bif(node, 0) -> true;
guard_bif(node, 1) -> true;
guard_bif(tuple_size, 1) -> true;
@@ -82,6 +83,7 @@ guard_bif(is_function, 1) -> true;
guard_bif(is_function, 2) -> true;
guard_bif(is_integer, 1) -> true;
guard_bif(is_list, 1) -> true;
+guard_bif(is_map, 1) -> true;
guard_bif(is_number, 1) -> true;
guard_bif(is_pid, 1) -> true;
guard_bif(is_port, 1) -> true;
@@ -113,6 +115,7 @@ new_type_test(is_function, 1) -> true;
new_type_test(is_function, 2) -> true;
new_type_test(is_integer, 1) -> true;
new_type_test(is_list, 1) -> true;
+new_type_test(is_map, 1) -> true;
new_type_test(is_number, 1) -> true;
new_type_test(is_pid, 1) -> true;
new_type_test(is_port, 1) -> true;
@@ -315,6 +318,7 @@ bif(is_function, 1) -> true;
bif(is_function, 2) -> true;
bif(is_integer, 1) -> true;
bif(is_list, 1) -> true;
+bif(is_map, 1) -> true;
bif(is_number, 1) -> true;
bif(is_pid, 1) -> true;
bif(is_port, 1) -> true;
@@ -335,6 +339,7 @@ bif(list_to_pid, 1) -> true;
bif(list_to_tuple, 1) -> true;
bif(load_module, 2) -> true;
bif(make_ref, 0) -> true;
+bif(map_size,1) -> true;
bif(max,2) -> true;
bif(min,2) -> true;
bif(module_loaded, 1) -> true;
diff --git a/lib/stdlib/src/erl_lint.erl b/lib/stdlib/src/erl_lint.erl
index cf01e1f8cf..39cc03cf7a 100644
--- a/lib/stdlib/src/erl_lint.erl
+++ b/lib/stdlib/src/erl_lint.erl
@@ -2,7 +2,7 @@
%%
%% %CopyrightBegin%
%%
-%% Copyright Ericsson AB 1996-2013. All Rights Reserved.
+%% Copyright Ericsson AB 1996-2014. 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
@@ -80,13 +80,17 @@ value_option(Flag, Default, On, OnVal, Off, OffVal, Opts) ->
-type fa() :: {atom(), arity()}. % function+arity
-type ta() :: {atom(), arity()}. % type+arity
+-record(typeinfo, {attr, line}).
+
%% Usage of records, functions, and imports. The variable table, which
%% is passed on as an argument, holds the usage of variables.
-record(usage, {
calls = dict:new(), %Who calls who
imported = [], %Actually imported functions
- used_records=sets:new() :: set(), %Used record definitions
- used_types = dict:new() :: dict() %Used type definitions
+ used_records = sets:new() %Used record definitions
+ :: sets:set(atom()),
+ used_types = dict:new() %Used type definitions
+ :: dict:dict(ta(), line())
}).
%% Define the lint state record.
@@ -95,13 +99,17 @@ value_option(Flag, Default, On, OnVal, Off, OffVal, Opts) ->
-record(lint, {state=start :: 'start' | 'attribute' | 'function',
module=[], %Module
behaviour=[], %Behaviour
- exports=gb_sets:empty() :: gb_set(), %Exports
- imports=[], %Imports
+ exports=gb_sets:empty() :: gb_sets:set(fa()),%Exports
+ imports=[] :: [fa()], %Imports, an orddict()
compile=[], %Compile flags
- records=dict:new() :: dict(), %Record definitions
- locals=gb_sets:empty() :: gb_set(), %All defined functions (prescanned)
- no_auto=gb_sets:empty() :: gb_set(), %Functions explicitly not autoimported
- defined=gb_sets:empty() :: gb_set(), %Defined fuctions
+ records=dict:new() %Record definitions
+ :: dict:dict(atom(), {line(),Fields :: term()}),
+ locals=gb_sets:empty() %All defined functions (prescanned)
+ :: gb_sets:set(fa()),
+ no_auto=gb_sets:empty() %Functions explicitly not autoimported
+ :: gb_sets:set(fa()) | 'all',
+ defined=gb_sets:empty() %Defined fuctions
+ :: gb_sets:set(fa()),
on_load=[] :: [fa()], %On-load function
on_load_line=0 :: line(), %Line for on_load
clashes=[], %Exported functions named as BIFs
@@ -116,12 +124,16 @@ value_option(Flag, Default, On, OnVal, Off, OffVal, Opts) ->
%outside any fun or lc
xqlc= false :: boolean(), %true if qlc.hrl included
new = false :: boolean(), %Has user-defined 'new/N'
- called= [] :: [{fa(),line()}], %Called functions
+ called= [] :: [{fa(),line()}], %Called functions
usage = #usage{} :: #usage{},
- specs = dict:new() :: dict(), %Type specifications
- callbacks = dict:new() :: dict(), %Callback types
- types = dict:new() :: dict(), %Type definitions
- exp_types=gb_sets:empty():: gb_set() %Exported types
+ specs = dict:new() %Type specifications
+ :: dict:dict(mfa(), line()),
+ callbacks = dict:new() %Callback types
+ :: dict:dict(mfa(), line()),
+ types = dict:new() %Type definitions
+ :: dict:dict(ta(), #typeinfo{}),
+ exp_types=gb_sets:empty() %Exported types
+ :: gb_sets:set(ta())
}).
-type lint_state() :: #lint{}.
@@ -225,6 +237,10 @@ format_error({too_many_arguments,Arity}) ->
"maximum allowed is ~w", [Arity,?MAX_ARGUMENTS]);
%% --- patterns and guards ---
format_error(illegal_pattern) -> "illegal pattern";
+format_error(illegal_map_key) ->
+ "illegal map key";
+format_error({illegal_map_key_variable,K}) ->
+ io_lib:format("illegal use of variable ~w in map",[K]);
format_error(illegal_bin_pattern) ->
"binary patterns cannot be matched in parallel using '='";
format_error(illegal_expr) -> "illegal expression";
@@ -232,6 +248,9 @@ format_error({illegal_guard_local_call, {F,A}}) ->
io_lib:format("call to local/imported function ~w/~w is illegal in guard",
[F,A]);
format_error(illegal_guard_expr) -> "illegal guard expression";
+%% --- maps ---
+format_error(illegal_map_construction) ->
+ "only association operators '=>' are allowed in map construction";
%% --- records ---
format_error({undefined_record,T}) ->
io_lib:format("record ~w undefined", [T]);
@@ -312,10 +331,14 @@ format_error({undefined_type, {TypeName, Arity}}) ->
io_lib:format("type ~w~s undefined", [TypeName, gen_type_paren(Arity)]);
format_error({unused_type, {TypeName, Arity}}) ->
io_lib:format("type ~w~s is unused", [TypeName, gen_type_paren(Arity)]);
-format_error({new_builtin_type, {TypeName, Arity}}) ->
- io_lib:format("type ~w~s is a new builtin type; "
+%% format_error({new_builtin_type, {TypeName, Arity}}) ->
+%% io_lib:format("type ~w~s is a new builtin type; "
+%% "its (re)definition is allowed only until the next release",
+%% [TypeName, gen_type_paren(Arity)]);
+format_error({new_var_arity_type, TypeName}) ->
+ io_lib:format("type ~w is a new builtin type; "
"its (re)definition is allowed only until the next release",
- [TypeName, gen_type_paren(Arity)]);
+ [TypeName]);
format_error({builtin_type, {TypeName, Arity}}) ->
io_lib:format("type ~w~s is a builtin type; it cannot be redefined",
[TypeName, gen_type_paren(Arity)]);
@@ -339,9 +362,19 @@ format_error(spec_wrong_arity) ->
"spec has the wrong arity";
format_error(callback_wrong_arity) ->
"callback has the wrong arity";
-format_error({imported_predefined_type, Name}) ->
- io_lib:format("referring to built-in type ~w as a remote type; "
- "please take out the module name", [Name]);
+format_error({deprecated_builtin_type, {Name, Arity},
+ Replacement, Rel}) ->
+ UseS = case Replacement of
+ {Mod, NewName} ->
+ io_lib:format("use ~w:~w/~w", [Mod, NewName, Arity]);
+ {Mod, NewName, NewArity} ->
+ io_lib:format("use ~w:~w/~w or preferably ~w:~w/~w",
+ [Mod, NewName, Arity,
+ Mod, NewName, NewArity])
+ end,
+ io_lib:format("type ~w/~w is deprecated and will be "
+ "removed in ~s; use ~s",
+ [Name, Arity, Rel, UseS]);
format_error({not_exported_opaque, {TypeName, Arity}}) ->
io_lib:format("opaque type ~w~s is not exported",
[TypeName, gen_type_paren(Arity)]);
@@ -493,6 +526,9 @@ start(File, Opts) ->
{deprecated_function,
bool_option(warn_deprecated_function, nowarn_deprecated_function,
true, Opts)},
+ {deprecated_type,
+ bool_option(warn_deprecated_type, nowarn_deprecated_type,
+ true, Opts)},
{obsolete_guard,
bool_option(warn_obsolete_guard, nowarn_obsolete_guard,
true, Opts)},
@@ -844,8 +880,9 @@ behaviour_callbacks(Line, B, St0) ->
{[], St1}
end.
-behaviour_missing_callbacks([{{Line,B},Bfs}|T], #lint{exports=Exp}=St0) ->
- Missing = ordsets:subtract(ordsets:from_list(Bfs), gb_sets:to_list(Exp)),
+behaviour_missing_callbacks([{{Line,B},Bfs}|T], St0) ->
+ Exports = gb_sets:to_list(exports(St0)),
+ Missing = ordsets:subtract(ordsets:from_list(Bfs), Exports),
St = foldl(fun (F, S0) ->
add_warning(Line, {undefined_behaviour_func,F,B}, S0)
end, St0, Missing),
@@ -1009,9 +1046,10 @@ check_undefined_types(#lint{usage=Usage,types=Def}=St0) ->
Used = Usage#usage.used_types,
UTAs = dict:fetch_keys(Used),
Undef = [{TA,dict:fetch(TA, Used)} ||
- TA <- UTAs,
+ {T,_}=TA <- UTAs,
not dict:is_key(TA, Def),
- not is_default_type(TA)],
+ not is_default_type(TA),
+ not is_newly_introduced_var_arity_type(T)],
foldl(fun ({TA,L}, St) ->
add_error(L, {undefined_type,TA}, St)
end, St0, Undef).
@@ -1149,6 +1187,14 @@ export_type(Line, ETs, #lint{usage = Usage, exp_types = ETs0} = St0) ->
add_error(Line, {bad_export_type, ETs}, St0)
end.
+-spec exports(lint_state()) -> gb_sets:set(fa()).
+
+exports(#lint{compile = Opts, defined = Defs, exports = Es}) ->
+ case lists:member(export_all, Opts) of
+ true -> Defs;
+ false -> Es
+ end.
+
-type import() :: {module(), [fa()]} | module().
-spec import(line(), import(), lint_state()) -> lint_state().
@@ -1357,6 +1403,21 @@ pattern({cons,_Line,H,T}, Vt, Old, Bvt, St0) ->
{vtmerge_pat(Hvt, Tvt),vtmerge_pat(Bvt1,Bvt2),St2};
pattern({tuple,_Line,Ps}, Vt, Old, Bvt, St) ->
pattern_list(Ps, Vt, Old, Bvt, St);
+pattern({map,_Line,Ps}, Vt, Old, Bvt, St) ->
+ foldl(fun
+ ({map_field_assoc,L,_,_}, {Psvt,Bvt0,St0}) ->
+ {Psvt,Bvt0,add_error(L, illegal_pattern, St0)};
+ ({map_field_exact,L,KP,VP}, {Psvt,Bvt0,St0}) ->
+ case is_valid_map_key(KP, pattern, St0) of
+ true ->
+ {Pvt,Bvt1,St1} = pattern(VP, Vt, Old, Bvt, St0),
+ {vtmerge_pat(Pvt, Psvt),vtmerge_pat(Bvt0, Bvt1), St1};
+ false ->
+ {Psvt,Bvt0,add_error(L, illegal_map_key, St0)};
+ {false,variable,Var} ->
+ {Psvt,Bvt0,add_error(L, {illegal_map_key_variable,Var}, St0)}
+ end
+ end, {[],[],St}, Ps);
%%pattern({struct,_Line,_Tag,Ps}, Vt, Old, Bvt, St) ->
%% pattern_list(Ps, Vt, Old, Bvt, St);
pattern({record_index,Line,Name,Field}, _Vt, _Old, _Bvt, St) ->
@@ -1744,6 +1805,12 @@ gexpr({cons,_Line,H,T}, Vt, St) ->
gexpr_list([H,T], Vt, St);
gexpr({tuple,_Line,Es}, Vt, St) ->
gexpr_list(Es, Vt, St);
+gexpr({map,_Line,Es}, Vt, St) ->
+ map_fields(Es, Vt, check_assoc_fields(Es, St), fun gexpr_list/3);
+gexpr({map,_Line,Src,Es}, Vt, St) ->
+ {Svt,St1} = gexpr(Src, Vt, St),
+ {Fvt,St2} = map_fields(Es, Vt, St1, fun gexpr_list/3),
+ {vtmerge(Svt, Fvt),St2};
gexpr({record_index,Line,Name,Field}, _Vt, St) ->
check_record(Line, Name, St,
fun (Dfs, St1) -> record_field(Field, Name, Dfs, St1) end );
@@ -1816,6 +1883,10 @@ gexpr({op,Line,Op,A}, Vt, St0) ->
true -> {Avt,St1};
false -> {Avt,add_error(Line, illegal_guard_expr, St1)}
end;
+gexpr({op,_,'andalso',L,R}, Vt, St) ->
+ gexpr_list([L,R], Vt, St);
+gexpr({op,_,'orelse',L,R}, Vt, St) ->
+ gexpr_list([L,R], Vt, St);
gexpr({op,Line,Op,L,R}, Vt, St0) ->
{Avt,St1} = gexpr_list([L,R], Vt, St0),
case is_gexpr_op(Op, 2) of
@@ -1853,7 +1924,7 @@ is_guard_test(Expression, Forms) ->
end, start(), RecordAttributes),
is_guard_test2(zip_file_and_line(Expression, "nofile"), St0#lint.records).
-%% is_guard_test2(Expression, RecordDefs :: dict()) -> boolean().
+%% is_guard_test2(Expression, RecordDefs :: dict:dict()) -> boolean().
is_guard_test2({call,Line,{atom,Lr,record},[E,A]}, RDs) ->
is_gexpr({call,Line,{atom,Lr,is_record},[E,A]}, RDs);
is_guard_test2({call,_Line,{atom,_La,Test},As}=Call, RDs) ->
@@ -1902,12 +1973,14 @@ is_gexpr({call,L,{tuple,Lt,[{atom,Lm,erlang},{atom,Lf,F}]},As}, RDs) ->
is_gexpr({call,L,{remote,Lt,{atom,Lm,erlang},{atom,Lf,F}},As}, RDs);
is_gexpr({op,_L,Op,A}, RDs) ->
is_gexpr_op(Op, 1) andalso is_gexpr(A, RDs);
+is_gexpr({op,_L,'andalso',A1,A2}, RDs) ->
+ is_gexpr_list([A1,A2], RDs);
+is_gexpr({op,_L,'orelse',A1,A2}, RDs) ->
+ is_gexpr_list([A1,A2], RDs);
is_gexpr({op,_L,Op,A1,A2}, RDs) ->
is_gexpr_op(Op, 2) andalso is_gexpr_list([A1,A2], RDs);
is_gexpr(_Other, _RDs) -> false.
-is_gexpr_op('andalso', 2) -> true;
-is_gexpr_op('orelse', 2) -> true;
is_gexpr_op(Op, A) ->
try erl_internal:op_type(Op, A) of
arith -> true;
@@ -1961,6 +2034,12 @@ expr({bc,_Line,E,Qs}, Vt, St) ->
handle_comprehension(E, Qs, Vt, St);
expr({tuple,_Line,Es}, Vt, St) ->
expr_list(Es, Vt, St);
+expr({map,_Line,Es}, Vt, St) ->
+ map_fields(Es, Vt, check_assoc_fields(Es, St), fun expr_list/3);
+expr({map,_Line,Src,Es}, Vt, St) ->
+ {Svt,St1} = expr(Src, Vt, St),
+ {Fvt,St2} = map_fields(Es, Vt, St1, fun expr_list/3),
+ {vtupdate(Svt, Fvt),St2};
expr({record_index,Line,Name,Field}, _Vt, St) ->
check_record(Line, Name, St,
fun (Dfs, St1) -> record_field(Field, Name, Dfs, St1) end);
@@ -2168,6 +2247,26 @@ record_expr(Line, Rec, Vt, St0) ->
St1 = warn_invalid_record(Line, Rec, St0),
expr(Rec, Vt, St1).
+check_assoc_fields([{map_field_exact,Line,_,_}|Fs], St) ->
+ check_assoc_fields(Fs, add_error(Line, illegal_map_construction, St));
+check_assoc_fields([{map_field_assoc,_,_,_}|Fs], St) ->
+ check_assoc_fields(Fs, St);
+check_assoc_fields([], St) ->
+ St.
+
+map_fields([{Tag,Line,K,V}|Fs], Vt, St, F) when Tag =:= map_field_assoc;
+ Tag =:= map_field_exact ->
+ St1 = case is_valid_map_key(K, St) of
+ true -> St;
+ false -> add_error(Line, illegal_map_key, St);
+ {false,variable,Var} -> add_error(Line, {illegal_map_key_variable,Var}, St)
+ end,
+ {Pvt,St2} = F([K,V], Vt, St1),
+ {Vts,St3} = map_fields(Fs, Vt, St2, F),
+ {vtupdate(Pvt, Vts),St3};
+map_fields([], Vt, St, _) ->
+ {Vt,St}.
+
%% warn_invalid_record(Line, Record, State0) -> State
%% Adds warning if the record is invalid.
@@ -2220,6 +2319,70 @@ is_valid_call(Call) ->
_ -> true
end.
+%% is_valid_map_key(K,St) -> true | false | {false, Var::atom()}
+%% check for value expression without variables
+
+is_valid_map_key(K,St) ->
+ is_valid_map_key(K,expr,St).
+is_valid_map_key(K,Ctx,St) ->
+ case expr(K,[],St) of
+ {[],_} ->
+ is_valid_map_key_value(K,Ctx);
+ {[Var|_],_} ->
+ {false,variable,element(1,Var)}
+ end.
+
+is_valid_map_key_value(K,Ctx) ->
+ case K of
+ {char,_,_} -> true;
+ {integer,_,_} -> true;
+ {float,_,_} -> true;
+ {string,_,_} -> true;
+ {nil,_} -> true;
+ {atom,_,_} -> true;
+ {cons,_,H,T} ->
+ is_valid_map_key_value(H,Ctx) andalso
+ is_valid_map_key_value(T,Ctx);
+ {tuple,_,Es} ->
+ foldl(fun(E,B) ->
+ B andalso is_valid_map_key_value(E,Ctx)
+ end,true,Es);
+ {map,_,Arg,Ps} ->
+ % only check for value expressions to be valid
+ % invalid map expressions are later checked in
+ % core and kernel
+ is_valid_map_key_value(Arg,Ctx) andalso foldl(fun
+ ({Tag,_,Ke,Ve},B) when Tag =:= map_field_assoc;
+ Tag =:= map_field_exact, Ctx =:= expr ->
+ B andalso is_valid_map_key_value(Ke,Ctx)
+ andalso is_valid_map_key_value(Ve,Ctx);
+ (_,_) -> false
+ end,true,Ps);
+ {map,_,Ps} ->
+ foldl(fun
+ ({Tag,_,Ke,Ve},B) when Tag =:= map_field_assoc;
+ Tag =:= map_field_exact, Ctx =:= expr ->
+ B andalso is_valid_map_key_value(Ke,Ctx)
+ andalso is_valid_map_key_value(Ve,Ctx);
+ (_,_) -> false
+ end, true, Ps);
+ {record,_,_,Fs} ->
+ foldl(fun
+ ({record_field,_,Ke,Ve},B) ->
+ B andalso is_valid_map_key_value(Ke,Ctx)
+ andalso is_valid_map_key_value(Ve,Ctx)
+ end,true,Fs);
+ {bin,_,Es} ->
+ % only check for value expressions to be valid
+ % invalid binary expressions are later checked in
+ % core and kernel
+ foldl(fun
+ ({bin_element,_,E,_,_},B) ->
+ B andalso is_valid_map_key_value(E,Ctx)
+ end,true,Es);
+ _ -> false
+ end.
+
%% record_def(Line, RecordName, [RecField], State) -> State.
%% Add a record definition if it does not already exist. Normalise
%% so that all fields have explicit initial value.
@@ -2432,8 +2595,6 @@ find_field(_F, []) -> error.
%% Attr :: 'type' | 'opaque'
%% Checks that a type definition is valid.
--record(typeinfo, {attr, line}).
-
type_def(_Attr, _Line, {record, _RecName}, Fields, [], St0) ->
%% The record field names and such are checked in the record format.
%% We only need to check the types.
@@ -2450,32 +2611,46 @@ type_def(Attr, Line, TypeName, ProtoType, Args, St0) ->
CheckType = {type, -1, product, [ProtoType|Args]},
check_type(CheckType, St#lint{types=NewDefs})
end,
- case (dict:is_key(TypePair, TypeDefs) orelse is_var_arity_type(TypeName)) of
- true ->
- case is_default_type(TypePair) of
- true ->
- case is_newly_introduced_builtin_type(TypePair) of
- %% allow some types just for bootstrapping
- true ->
- Warn = {new_builtin_type, TypePair},
- St1 = add_warning(Line, Warn, St0),
- StoreType(St1);
- false ->
- add_error(Line, {builtin_type, TypePair}, St0)
- end;
- false -> add_error(Line, {redefine_type, TypePair}, St0)
- end;
- false ->
- St1 = case
- Attr =:= opaque andalso
- is_underspecified(ProtoType, Arity)
- of
- true ->
- Warn = {underspecified_opaque, TypePair},
- add_warning(Line, Warn, St0);
- false -> St0
- end,
- StoreType(St1)
+ case is_default_type(TypePair) of
+ true ->
+ case is_obsolete_builtin_type(TypePair) of
+ true -> StoreType(St0);
+ false -> add_error(Line, {builtin_type, TypePair}, St0)
+%% case is_newly_introduced_builtin_type(TypePair) of
+%% %% allow some types just for bootstrapping
+%% true ->
+%% Warn = {new_builtin_type, TypePair},
+%% St1 = add_warning(Line, Warn, St0),
+%% StoreType(St1);
+%% false ->
+%% add_error(Line, {builtin_type, TypePair}, St0)
+%% end
+ end;
+ false ->
+ case
+ dict:is_key(TypePair, TypeDefs) orelse
+ is_var_arity_type(TypeName)
+ of
+ true ->
+ case is_newly_introduced_var_arity_type(TypeName) of
+ true ->
+ Warn = {new_var_arity_type, TypeName},
+ add_warning(Line, Warn, St0);
+ false ->
+ add_error(Line, {redefine_type, TypePair}, St0)
+ end;
+ false ->
+ St1 = case
+ Attr =:= opaque andalso
+ is_underspecified(ProtoType, Arity)
+ of
+ true ->
+ Warn = {underspecified_opaque, TypePair},
+ add_warning(Line, Warn, St0);
+ false -> St0
+ end,
+ StoreType(St1)
+ end
end.
is_underspecified({type,_,term,[]}, 0) -> true;
@@ -2499,18 +2674,12 @@ check_type({paren_type, _L, [Type]}, SeenVars, St) ->
check_type(Type, SeenVars, St);
check_type({remote_type, L, [{atom, _, Mod}, {atom, _, Name}, Args]},
SeenVars, #lint{module=CurrentMod} = St) ->
- St1 =
- case is_default_type({Name, length(Args)})
- orelse is_var_arity_type(Name) of
- true -> add_error(L, {imported_predefined_type, Name}, St);
- false -> St
- end,
case Mod =:= CurrentMod of
- true -> check_type({type, L, Name, Args}, SeenVars, St1);
+ true -> check_type({type, L, Name, Args}, SeenVars, St);
false ->
lists:foldl(fun(T, {AccSeenVars, AccSt}) ->
check_type(T, AccSeenVars, AccSt)
- end, {SeenVars, St1}, Args)
+ end, {SeenVars, St}, Args)
end;
check_type({integer, _L, _}, SeenVars, St) -> {SeenVars, St};
check_type({atom, _L, _}, SeenVars, St) -> {SeenVars, St};
@@ -2540,6 +2709,13 @@ check_type({type, L, range, [From, To]}, SeenVars, St) ->
_ -> add_error(L, {type_syntax, range}, St)
end,
{SeenVars, St1};
+check_type({type, _L, map, any}, SeenVars, St) -> {SeenVars, St};
+check_type({type, _L, map, Pairs}, SeenVars, St) ->
+ lists:foldl(fun(Pair, {AccSeenVars, AccSt}) ->
+ check_type(Pair, AccSeenVars, AccSt)
+ end, {SeenVars, St}, Pairs);
+check_type({type, _L, map_field_assoc, Dom, Range}, SeenVars, St) ->
+ check_type({type, -1, product, [Dom, Range]}, SeenVars, St);
check_type({type, _L, tuple, any}, SeenVars, St) -> {SeenVars, St};
check_type({type, _L, any}, SeenVars, St) -> {SeenVars, St};
check_type({type, L, binary, [Base, Unit]}, SeenVars, St) ->
@@ -2561,14 +2737,35 @@ check_type({type, _L, product, Args}, SeenVars, St) ->
lists:foldl(fun(T, {AccSeenVars, AccSt}) ->
check_type(T, AccSeenVars, AccSt)
end, {SeenVars, St}, Args);
-check_type({type, La, TypeName, Args}, SeenVars, #lint{usage=Usage} = St) ->
+check_type({type, La, TypeName, Args}, SeenVars, St) ->
+ #lint{usage=Usage, module = Module, types=Types} = St,
Arity = length(Args),
+ TypePair = {TypeName, Arity},
St1 = case is_var_arity_type(TypeName) of
true -> St;
false ->
- OldUsed = Usage#usage.used_types,
- UsedTypes = dict:store({TypeName, Arity}, La, OldUsed),
- St#lint{usage=Usage#usage{used_types=UsedTypes}}
+ Obsolete = (is_warn_enabled(deprecated_type, St)
+ andalso obsolete_builtin_type(TypePair)),
+ IsObsolete =
+ case Obsolete of
+ {deprecated, Repl, _} when element(1, Repl) =/= Module ->
+ case dict:find(TypePair, Types) of
+ {ok, _} -> false;
+ error -> true
+ end;
+ _ -> false
+ end,
+ case IsObsolete of
+ true ->
+ {deprecated, Replacement, Rel} = Obsolete,
+ Tag = deprecated_builtin_type,
+ W = {Tag, TypePair, Replacement, Rel},
+ add_warning(La, W, St);
+ false ->
+ OldUsed = Usage#usage.used_types,
+ UsedTypes = dict:store(TypePair, La, OldUsed),
+ St#lint{usage=Usage#usage{used_types=UsedTypes}}
+ end
end,
check_type({type, -1, product, Args}, SeenVars, St1);
check_type(I, SeenVars, St) ->
@@ -2613,6 +2810,7 @@ check_record_types([], _Name, _DefFields, SeenVars, St, _SeenFields) ->
{SeenVars, St}.
is_var_arity_type(tuple) -> true;
+is_var_arity_type(map) -> true;
is_var_arity_type(product) -> true;
is_var_arity_type(union) -> true;
is_var_arity_type(record) -> true;
@@ -2675,20 +2873,32 @@ is_default_type({timeout, 0}) -> true;
is_default_type({var, 1}) -> true;
is_default_type(_) -> false.
-%% R13
-is_newly_introduced_builtin_type({arity, 0}) -> true;
-is_newly_introduced_builtin_type({array, 0}) -> true; % opaque
-is_newly_introduced_builtin_type({bitstring, 0}) -> true;
-is_newly_introduced_builtin_type({dict, 0}) -> true; % opaque
-is_newly_introduced_builtin_type({digraph, 0}) -> true; % opaque
-is_newly_introduced_builtin_type({gb_set, 0}) -> true; % opaque
-is_newly_introduced_builtin_type({gb_tree, 0}) -> true; % opaque
-is_newly_introduced_builtin_type({iodata, 0}) -> true;
-is_newly_introduced_builtin_type({queue, 0}) -> true; % opaque
-is_newly_introduced_builtin_type({set, 0}) -> true; % opaque
-%% R13B01
-is_newly_introduced_builtin_type({boolean, 0}) -> true;
-is_newly_introduced_builtin_type({Name, _}) when is_atom(Name) -> false.
+is_newly_introduced_var_arity_type(map) -> true;
+is_newly_introduced_var_arity_type(_) -> false.
+
+%% is_newly_introduced_builtin_type({Name, _}) when is_atom(Name) -> false.
+
+is_obsolete_builtin_type(TypePair) ->
+ obsolete_builtin_type(TypePair) =/= no.
+
+%% Obsolete in OTP 17.0.
+obsolete_builtin_type({array, 0}) ->
+ {deprecated, {array, array, 1}, "OTP 18.0"};
+obsolete_builtin_type({dict, 0}) ->
+ {deprecated, {dict, dict, 2}, "OTP 18.0"};
+obsolete_builtin_type({digraph, 0}) ->
+ {deprecated, {digraph, graph}, "OTP 18.0"};
+obsolete_builtin_type({gb_set, 0}) ->
+ {deprecated, {gb_sets, set, 1}, "OTP 18.0"};
+obsolete_builtin_type({gb_tree, 0}) ->
+ {deprecated, {gb_trees, tree, 2}, "OTP 18.0"};
+obsolete_builtin_type({queue, 0}) ->
+ {deprecated, {queue, queue, 1}, "OTP 18.0"};
+obsolete_builtin_type({set, 0}) ->
+ {deprecated, {sets, set, 1}, "OTP 18.0"};
+obsolete_builtin_type({tid, 0}) ->
+ {deprecated, {ets, tid}, "OTP 18.0"};
+obsolete_builtin_type({Name, A}) when is_atom(Name), is_integer(A) -> no.
%% spec_decl(Line, Fun, Types, State) -> State.
@@ -3573,15 +3783,22 @@ is_imported_from_erlang(ImportSet,{Func,Arity}) ->
{ok,erlang} -> true;
_ -> false
end.
-%% Build set of functions where auto-import is explicitly supressed
+%% Build set of functions where auto-import is explicitly suppressed
auto_import_suppressed(CompileFlags) ->
- L0 = [ X || {no_auto_import,X} <- CompileFlags ],
- L1 = [ {Y,Z} || {Y,Z} <- lists:flatten(L0), is_atom(Y), is_integer(Z) ],
- gb_sets:from_list(L1).
-%% Predicate to find out if autoimport is explicitly supressed for a function
+ case lists:member(no_auto_import, CompileFlags) of
+ true ->
+ all;
+ false ->
+ L0 = [ X || {no_auto_import,X} <- CompileFlags ],
+ L1 = [ {Y,Z} || {Y,Z} <- lists:flatten(L0), is_atom(Y), is_integer(Z) ],
+ gb_sets:from_list(L1)
+ end.
+%% Predicate to find out if autoimport is explicitly suppressed for a function
+is_autoimport_suppressed(all,{_Func,_Arity}) ->
+ true;
is_autoimport_suppressed(NoAutoSet,{Func,Arity}) ->
gb_sets:is_element({Func,Arity},NoAutoSet).
-%% Predicate to find out if a function specific bif-clash supression (old deprecated) is present
+%% Predicate to find out if a function specific bif-clash suppression (old deprecated) is present
bif_clash_specifically_disabled(St,{F,A}) ->
Nowarn = nowarn_function(nowarn_bif_clash, St#lint.compile),
lists:member({F,A},Nowarn).
diff --git a/lib/stdlib/src/erl_parse.yrl b/lib/stdlib/src/erl_parse.yrl
index 59a05a48ee..e1ae3b7aea 100644
--- a/lib/stdlib/src/erl_parse.yrl
+++ b/lib/stdlib/src/erl_parse.yrl
@@ -2,7 +2,7 @@
%%
%% %CopyrightBegin%
%%
-%% Copyright Ericsson AB 1996-2013. All Rights Reserved.
+%% Copyright Ericsson AB 1996-2014. 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
@@ -34,6 +34,7 @@ binary_comprehension
tuple
%struct
record_expr record_tuple record_field record_fields
+map_expr map_tuple map_field map_field_assoc map_field_exact map_fields map_key
if_expr if_clause if_clauses case_expr cr_clause cr_clauses receive_expr
fun_expr fun_clause fun_clauses atom_or_var integer_or_var
try_expr try_catch try_clause try_clauses
@@ -47,6 +48,7 @@ opt_bit_size_expr bit_size_expr opt_bit_type_list bit_type_list bit_type
top_type top_type_100 top_types type typed_expr typed_attr_val
type_sig type_sigs type_guard type_guards fun_type fun_type_100 binary_type
type_spec spec_fun typed_exprs typed_record_fields field_types field_type
+map_pair_types map_pair_type
bin_base_type bin_unit_type type_200 type_300 type_400 type_500.
Terminals
@@ -59,7 +61,7 @@ char integer float atom string var
'*' '/' 'div' 'rem' 'band' 'and'
'+' '-' 'bor' 'bxor' 'bsl' 'bsr' 'or' 'xor'
'++' '--'
-'==' '/=' '=<' '<' '>=' '>' '=:=' '=/=' '<='
+'==' '/=' '=<' '<' '>=' '>' '=:=' '=/=' '<=' '=>' ':='
'<<' '>>'
'!' '=' '::' '..' '...'
'spec' 'callback' % helper
@@ -154,6 +156,8 @@ type -> '[' ']' : {type, ?line('$1'), nil, []}.
type -> '[' top_type ']' : {type, ?line('$1'), list, ['$2']}.
type -> '[' top_type ',' '...' ']' : {type, ?line('$1'),
nonempty_list, ['$2']}.
+type -> '#' '{' '}' : {type, ?line('$1'), map, []}.
+type -> '#' '{' map_pair_types '}' : {type, ?line('$1'), map, '$3'}.
type -> '{' '}' : {type, ?line('$1'), tuple, []}.
type -> '{' top_types '}' : {type, ?line('$1'), tuple, '$2'}.
type -> '#' atom '{' '}' : {type, ?line('$1'), record, ['$2']}.
@@ -175,6 +179,10 @@ fun_type -> '(' top_types ')' '->' top_type
: {type, ?line('$1'), 'fun',
[{type, ?line('$1'), product, '$2'},'$5']}.
+map_pair_types -> map_pair_type : ['$1'].
+map_pair_types -> map_pair_type ',' map_pair_types : ['$1'|'$3'].
+map_pair_type -> top_type '=>' top_type : {type, ?line('$2'), map_field_assoc,'$1','$3'}.
+
field_types -> field_type : ['$1'].
field_types -> field_type ',' field_types : ['$1'|'$3'].
@@ -247,6 +255,7 @@ expr_500 -> expr_600 : '$1'.
expr_600 -> prefix_op expr_700 :
?mkop1('$1', '$2').
+expr_600 -> map_expr : '$1'.
expr_600 -> expr_700 : '$1'.
expr_700 -> function_call : '$1'.
@@ -327,6 +336,30 @@ tuple -> '{' exprs '}' : {tuple,?line('$1'),'$2'}.
%%struct -> atom tuple :
%% {struct,?line('$1'),element(3, '$1'),element(3, '$2')}.
+map_expr -> '#' map_tuple :
+ {map, ?line('$1'),'$2'}.
+map_expr -> expr_max '#' map_tuple :
+ {map, ?line('$2'),'$1','$3'}.
+map_expr -> map_expr '#' map_tuple :
+ {map, ?line('$2'),'$1','$3'}.
+
+map_tuple -> '{' '}' : [].
+map_tuple -> '{' map_fields '}' : '$2'.
+
+map_fields -> map_field : ['$1'].
+map_fields -> map_field ',' map_fields : ['$1' | '$3'].
+
+map_field -> map_field_assoc : '$1'.
+map_field -> map_field_exact : '$1'.
+
+map_field_assoc -> map_key '=>' expr :
+ {map_field_assoc,?line('$1'),'$1','$3'}.
+
+map_field_exact -> map_key ':=' expr :
+ {map_field_exact,?line('$1'),'$1','$3'}.
+
+map_key -> expr : '$1'.
+
%% N.B. This is called from expr_700.
%% N.B. Field names are returned as the complete object, even if they are
@@ -648,6 +681,8 @@ skip_paren(Type) ->
build_gen_type({atom, La, tuple}) ->
{type, La, tuple, any};
+build_gen_type({atom, La, map}) ->
+ {type, La, map, any};
build_gen_type({atom, La, Name}) ->
{type, La, Name, []}.
@@ -813,10 +848,12 @@ build_fun(Line, Cs) ->
end.
check_clauses(Cs, Name, Arity) ->
- mapl(fun ({clause,L,N,As,G,B}) when N =:= Name, length(As) =:= Arity ->
- {clause,L,As,G,B};
- ({clause,L,_N,_As,_G,_B}) ->
- ret_err(L, "head mismatch") end, Cs).
+ [case C of
+ {clause,L,N,As,G,B} when N =:= Name, length(As) =:= Arity ->
+ {clause,L,As,G,B};
+ {clause,L,_N,_As,_G,_B} ->
+ ret_err(L, "head mismatch")
+ end || C <- Cs].
build_try(L,Es,Scs,{Ccs,As}) ->
{'try',L,Es,Scs,Ccs,As}.
@@ -826,17 +863,6 @@ ret_err(L, S) ->
{location,Location} = get_attribute(L, location),
return_error(Location, S).
-%% mapl(F,List)
-%% an alternative map which always maps from left to right
-%% and makes it possible to interrupt the mapping with throw on
-%% the first occurence from left as expected.
-%% can be removed when the jam machine (and all other machines)
-%% uses the standardized (Erlang 5.0) evaluation order (from left to right)
-mapl(F, [H|T]) ->
- V = F(H),
- [V | mapl(F,T)];
-mapl(_, []) ->
- [].
%% Convert between the abstract form of a term and a term.
@@ -860,6 +886,12 @@ normalise({cons,_,Head,Tail}) ->
[normalise(Head)|normalise(Tail)];
normalise({tuple,_,Args}) ->
list_to_tuple(normalise_list(Args));
+normalise({map,_,Pairs}=M) ->
+ maps:from_list(lists:map(fun
+ %% only allow '=>'
+ ({map_field_assoc,_,K,V}) -> {normalise(K),normalise(V)};
+ (_) -> erlang:error({badarg,M})
+ end, Pairs));
%% Special case for unary +/-.
normalise({op,_,'+',{char,_,I}}) -> I;
normalise({op,_,'+',{integer,_,I}}) -> I;
@@ -878,59 +910,63 @@ normalise_list([]) ->
Data :: term(),
AbsTerm :: abstract_expr().
abstract(T) ->
- abstract(T, 0, epp:default_encoding()).
+ abstract(T, 0, enc_func(epp:default_encoding())).
+
+-type encoding_func() :: fun((non_neg_integer()) -> boolean()).
%%% abstract/2 takes line and encoding options
-spec abstract(Data, Options) -> AbsTerm when
Data :: term(),
Options :: Line | [Option],
Option :: {line, Line} | {encoding, Encoding},
- Encoding :: latin1 | unicode | utf8,
+ Encoding :: 'latin1' | 'unicode' | 'utf8' | 'none' | encoding_func(),
Line :: erl_scan:line(),
AbsTerm :: abstract_expr().
abstract(T, Line) when is_integer(Line) ->
- abstract(T, Line, epp:default_encoding());
+ abstract(T, Line, enc_func(epp:default_encoding()));
abstract(T, Options) when is_list(Options) ->
Line = proplists:get_value(line, Options, 0),
Encoding = proplists:get_value(encoding, Options,epp:default_encoding()),
- abstract(T, Line, Encoding).
+ EncFunc = enc_func(Encoding),
+ abstract(T, Line, EncFunc).
-define(UNICODE(C),
- is_integer(C) andalso
- (C >= 0 andalso C < 16#D800 orelse
+ (C < 16#D800 orelse
C > 16#DFFF andalso C < 16#FFFE orelse
C > 16#FFFF andalso C =< 16#10FFFF)).
+enc_func(latin1) -> fun(C) -> C < 256 end;
+enc_func(unicode) -> fun(C) -> ?UNICODE(C) end;
+enc_func(utf8) -> fun(C) -> ?UNICODE(C) end;
+enc_func(none) -> none;
+enc_func(Fun) when is_function(Fun, 1) -> Fun;
+enc_func(Term) -> erlang:error({badarg, Term}).
+
abstract(T, L, _E) when is_integer(T) -> {integer,L,T};
abstract(T, L, _E) when is_float(T) -> {float,L,T};
abstract(T, L, _E) when is_atom(T) -> {atom,L,T};
abstract([], L, _E) -> {nil,L};
abstract(B, L, _E) when is_bitstring(B) ->
{bin, L, [abstract_byte(Byte, L) || Byte <- bitstring_to_list(B)]};
-abstract([C|T], L, unicode=E) when ?UNICODE(C) ->
- abstract_unicode_string(T, [C], L, E);
-abstract([C|T], L, utf8=E) when ?UNICODE(C) ->
- abstract_unicode_string(T, [C], L, E);
-abstract([C|T], L, latin1=E) when is_integer(C), 0 =< C, C < 256 ->
- abstract_string(T, [C], L, E);
-abstract([H|T], L, E) ->
+abstract([H|T], L, none=E) ->
{cons,L,abstract(H, L, E),abstract(T, L, E)};
+abstract(List, L, E) when is_list(List) ->
+ abstract_list(List, [], L, E);
abstract(Tuple, L, E) when is_tuple(Tuple) ->
- {tuple,L,abstract_list(tuple_to_list(Tuple), L, E)}.
-
-abstract_string([C|T], String, L, E) when is_integer(C), 0 =< C, C < 256 ->
- abstract_string(T, [C|String], L, E);
-abstract_string([], String, L, _E) ->
- {string, L, lists:reverse(String)};
-abstract_string(T, String, L, E) ->
- not_string(String, abstract(T, L, E), L, E).
-
-abstract_unicode_string([C|T], String, L, E) when ?UNICODE(C) ->
- abstract_unicode_string(T, [C|String], L, E);
-abstract_unicode_string([], String, L, _E) ->
+ {tuple,L,abstract_tuple_list(tuple_to_list(Tuple), L, E)}.
+
+abstract_list([H|T], String, L, E) ->
+ case is_integer(H) andalso H >= 0 andalso E(H) of
+ true ->
+ abstract_list(T, [H|String], L, E);
+ false ->
+ AbstrList = {cons,L,abstract(H, L, E),abstract(T, L, E)},
+ not_string(String, AbstrList, L, E)
+ end;
+abstract_list([], String, L, _E) ->
{string, L, lists:reverse(String)};
-abstract_unicode_string(T, String, L, E) ->
+abstract_list(T, String, L, E) ->
not_string(String, abstract(T, L, E), L, E).
not_string([C|T], Result, L, E) ->
@@ -938,9 +974,9 @@ not_string([C|T], Result, L, E) ->
not_string([], Result, _L, _E) ->
Result.
-abstract_list([H|T], L, E) ->
- [abstract(H, L, E)|abstract_list(T, L, E)];
-abstract_list([], _L, _E) ->
+abstract_tuple_list([H|T], L, E) ->
+ [abstract(H, L, E)|abstract_tuple_list(T, L, E)];
+abstract_tuple_list([], _L, _E) ->
[].
abstract_byte(Byte, L) when is_integer(Byte) ->
@@ -1060,3 +1096,5 @@ get_attribute(L, Name) ->
get_attributes(L) ->
erl_scan:attributes_info(L).
+
+%% vim: ft=erlang
diff --git a/lib/stdlib/src/erl_pp.erl b/lib/stdlib/src/erl_pp.erl
index 8a1d8e0440..82bc2c1460 100644
--- a/lib/stdlib/src/erl_pp.erl
+++ b/lib/stdlib/src/erl_pp.erl
@@ -256,6 +256,10 @@ ltype({type,_Line,nonempty_list,[T]}) ->
{seq,$[,$],[$,],[ltype(T),leaf("...")]};
ltype({type,Line,nil,[]}) ->
lexpr({nil,Line}, 0, options(none));
+ltype({type,Line,map,any}) ->
+ simple_type({atom,Line,map}, []);
+ltype({type,_Line,map,Pairs}) ->
+ map_type(Pairs);
ltype({type,Line,tuple,any}) ->
simple_type({atom,Line,tuple}, []);
ltype({type,_Line,tuple,Ts}) ->
@@ -289,6 +293,15 @@ binary_type(I1, I2) ->
E2 = [[leaf("_:_*"),lexpr(I2, P, options(none))] || U],
{seq,'<<','>>',[$,],E1++E2}.
+map_type(Fs) ->
+ {first,[$#],map_pair_types(Fs)}.
+
+map_pair_types(Fs) ->
+ tuple_type(Fs, fun map_pair_type/1).
+
+map_pair_type({type,_Line,map_field_assoc,Ktype,Vtype}) ->
+ {seq,[],[]," =>",[ltype(Ktype),ltype(Vtype)]}.
+
record_type(Name, Fields) ->
{first,[record_name(Name)],field_types(Fields)}.
@@ -479,6 +492,15 @@ lexpr({record_field, _, Rec, F}, Prec, Opts) ->
{L,P,R} = inop_prec('.'),
El = [lexpr(Rec, L, Opts),$.,lexpr(F, R, Opts)],
maybe_paren(P, Prec, El);
+lexpr({map, _, Fs}, Prec, Opts) ->
+ {P,_R} = preop_prec('#'),
+ El = {first,leaf("#"),map_fields(Fs, Opts)},
+ maybe_paren(P, Prec, El);
+lexpr({map, _, Map, Fs}, Prec, Opts) ->
+ {L,P,_R} = inop_prec('#'),
+ Rl = lexpr(Map, L, Opts),
+ El = {first,[Rl,leaf("#")],map_fields(Fs, Opts)},
+ maybe_paren(P, Prec, El);
lexpr({block,_,Es}, _, Opts) ->
{list,[{step,'begin',body(Es, Opts)},'end']};
lexpr({'if',_,Cs}, _, Opts) ->
@@ -671,6 +693,16 @@ record_field({typed_record_field,Field,Type}, Opts) ->
record_field({record_field,_,F}, Opts) ->
lexpr(F, 0, Opts).
+map_fields(Fs, Opts) ->
+ tuple(Fs, fun map_field/2, Opts).
+
+map_field({map_field_assoc,_,K,V}, Opts) ->
+ Pl = lexpr(K, 0, Opts),
+ {list,[{step,[Pl,leaf(" =>")],lexpr(V, 0, Opts)}]};
+map_field({map_field_exact,_,K,V}, Opts) ->
+ Pl = lexpr(K, 0, Opts),
+ {list,[{step,[Pl,leaf(" :=")],lexpr(V, 0, Opts)}]}.
+
list({cons,_,H,T}, Es, Opts) ->
list(T, [H|Es], Opts);
list({nil,_}, Es, Opts) ->
diff --git a/lib/stdlib/src/erl_scan.erl b/lib/stdlib/src/erl_scan.erl
index 4ba6dd01fa..ae59d5f44f 100644
--- a/lib/stdlib/src/erl_scan.erl
+++ b/lib/stdlib/src/erl_scan.erl
@@ -569,7 +569,7 @@ scan1("++"++Cs, St, Line, Col, Toks) ->
tok2(Cs, St, Line, Col, Toks, "++", '++', 2);
scan1("+"=Cs, _St, Line, Col, Toks) ->
{more,{Cs,Col,Toks,Line,[],fun scan/6}};
-%% =:= =/= =< ==
+%% =:= =/= =< == =>
scan1("=:="++Cs, St, Line, Col, Toks) ->
tok2(Cs, St, Line, Col, Toks, "=:=", '=:=', 3);
scan1("=:"=Cs, _St, Line, Col, Toks) ->
@@ -580,6 +580,8 @@ scan1("=/"=Cs, _St, Line, Col, Toks) ->
{more,{Cs,Col,Toks,Line,[],fun scan/6}};
scan1("=<"++Cs, St, Line, Col, Toks) ->
tok2(Cs, St, Line, Col, Toks, "=<", '=<', 2);
+scan1("=>"++Cs, St, Line, Col, Toks) ->
+ tok2(Cs, St, Line, Col, Toks, "=>", '=>', 2);
scan1("=="++Cs, St, Line, Col, Toks) ->
tok2(Cs, St, Line, Col, Toks, "==", '==', 2);
scan1("="=Cs, _St, Line, Col, Toks) ->
@@ -594,6 +596,9 @@ scan1("||"++Cs, St, Line, Col, Toks) ->
tok2(Cs, St, Line, Col, Toks, "||", '||', 2);
scan1("|"=Cs, _St, Line, Col, Toks) ->
{more,{Cs,Col,Toks,Line,[],fun scan/6}};
+%% :=
+scan1(":="++Cs, St, Line, Col, Toks) ->
+ tok2(Cs, St, Line, Col, Toks, ":=", ':=', 2);
%% :-
scan1(":-"++Cs, St, Line, Col, Toks) ->
tok2(Cs, St, Line, Col, Toks, ":-", ':-', 2);
diff --git a/lib/stdlib/src/erl_tar.erl b/lib/stdlib/src/erl_tar.erl
index 40b48d7999..acf7a5cd40 100644
--- a/lib/stdlib/src/erl_tar.erl
+++ b/lib/stdlib/src/erl_tar.erl
@@ -381,7 +381,12 @@ to_octal(Int, Count, Result) ->
to_octal(Int div 8, Count-1, [Int rem 8 + $0|Result]).
to_string(Str0, Count) ->
- Str = list_to_binary(Str0),
+ Str = case file:native_name_encoding() of
+ utf8 ->
+ unicode:characters_to_binary(Str0);
+ latin1 ->
+ list_to_binary(Str0)
+ end,
case byte_size(Str) of
Size when Size < Count ->
[Str|zeroes(Count-Size)];
@@ -392,9 +397,17 @@ to_string(Str0, Count) ->
pad_file(File) ->
{ok,Position} = file:position(File, {cur,0}),
- %% There must be at least one empty record at the end of the file.
- Zeros = zeroes(?block_size - (Position rem ?block_size)),
- file:write(File, Zeros).
+ %% There must be at least two zero records at the end.
+ Fill = case ?block_size - (Position rem ?block_size) of
+ Fill0 when Fill0 < 2*?record_size ->
+ %% We need to another block here to ensure that there
+ %% are at least two zero records at the end.
+ Fill0 + ?block_size;
+ Fill0 ->
+ %% Large enough.
+ Fill0
+ end,
+ file:write(File, zeroes(Fill)).
split_filename(Name) when length(Name) =< ?th_name_len ->
{"", Name};
@@ -608,7 +621,22 @@ typeflag(Bin) ->
%% Get the name of the file from the prefix and name fields of the
%% tar header.
-get_name(Bin) ->
+get_name(Bin0) ->
+ List0 = get_name_raw(Bin0),
+ case file:native_name_encoding() of
+ utf8 ->
+ Bin = list_to_binary(List0),
+ case unicode:characters_to_list(Bin) of
+ {error,_,_} ->
+ List0;
+ List when is_list(List) ->
+ List
+ end;
+ latin1 ->
+ List0
+ end.
+
+get_name_raw(Bin) ->
Name = from_string(Bin, ?th_name, ?th_name_len),
case binary_to_list(Bin, ?th_prefix+1, ?th_prefix+1) of
[0] ->
diff --git a/lib/stdlib/src/escript.erl b/lib/stdlib/src/escript.erl
index 35f6dff57e..6bd0eb8a22 100644
--- a/lib/stdlib/src/escript.erl
+++ b/lib/stdlib/src/escript.erl
@@ -1,7 +1,7 @@
%%
%% %CopyrightBegin%
%%
-%% Copyright Ericsson AB 2007-2013. All Rights Reserved.
+%% Copyright Ericsson AB 2007-2014. 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
@@ -59,7 +59,6 @@
file:filename()
| {file:filename(), binary()}
| {file:filename(), binary(), file:file_info()}.
--type zip_create_option() :: term().
-type section() ::
shebang
| {shebang, shebang() | default | undefined}
@@ -68,8 +67,8 @@
| {emu_args, emu_args() | undefined}
| {source, file:filename() | binary()}
| {beam, file:filename() | binary()}
- | {archive, file:filename() | binary()}
- | {archive, [zip_file()], [zip_create_option()]}.
+ | {archive, zip:filename() | binary()}
+ | {archive, [zip_file()], [zip:create_option()]}.
%%-----------------------------------------------------------------------
@@ -289,6 +288,8 @@ start(EscriptOptions) ->
my_halt(127)
end.
+-spec parse_and_run(_, _, _) -> no_return().
+
parse_and_run(File, Args, Options) ->
CheckOnly = lists:member("s", Options),
{Source, Module, FormsOrBin, HasRecs, Mode} =
@@ -727,6 +728,8 @@ epp_parse_file2(Epp, S, Forms, Parsed) ->
%% Evaluate script
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
+-spec debug(_, _, _) -> no_return().
+
debug(Module, AbsMod, Args) ->
case hidden_apply(debugger, debugger, start, []) of
{ok, _} ->
@@ -742,6 +745,8 @@ debug(Module, AbsMod, Args) ->
fatal("Cannot start the debugger")
end.
+-spec run(_, _) -> no_return().
+
run(Module, Args) ->
try
Module:main(Args),
@@ -751,6 +756,8 @@ run(Module, Args) ->
fatal(format_exception(Class, Reason))
end.
+-spec interpret(_, _, _, _) -> no_return().
+
interpret(Forms, HasRecs, File, Args) ->
%% Basic validation before execution
case erl_lint:module(Forms) of
diff --git a/lib/stdlib/src/ets.erl b/lib/stdlib/src/ets.erl
index cc5e69f574..42b11a97e2 100644
--- a/lib/stdlib/src/ets.erl
+++ b/lib/stdlib/src/ets.erl
@@ -1,7 +1,7 @@
%%
%% %CopyrightBegin%
%%
-%% Copyright Ericsson AB 1996-2013. All Rights Reserved.
+%% Copyright Ericsson AB 1996-2014. 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
@@ -53,10 +53,8 @@
| {tab(),integer(),integer(),binary(),list(),integer()}
| {tab(),_,_,integer(),binary(),list(),integer(),integer()}.
-%% a similar definition is also in erl_types
-opaque tid() :: integer().
-%% these ones are also defined in erl_bif_types
-type match_pattern() :: atom() | tuple().
-type match_spec() :: [{match_pattern(), [_], [_]}].
diff --git a/lib/stdlib/src/filelib.erl b/lib/stdlib/src/filelib.erl
index a266daa084..c0921e4cf1 100644
--- a/lib/stdlib/src/filelib.erl
+++ b/lib/stdlib/src/filelib.erl
@@ -488,7 +488,7 @@ badpattern(Reason) ->
error({badpattern,Reason}).
eval_read_file_info(File, file) ->
- file:read_file_info(File);
+ file:read_link_info(File);
eval_read_file_info(File, erl_prim_loader) ->
case erl_prim_loader:read_file_info(File) of
error -> {error, erl_prim_loader};
diff --git a/lib/stdlib/src/filename.erl b/lib/stdlib/src/filename.erl
index 66e54ef221..e6bde5673c 100644
--- a/lib/stdlib/src/filename.erl
+++ b/lib/stdlib/src/filename.erl
@@ -516,8 +516,10 @@ pathtype(Atom) when is_atom(Atom) ->
pathtype(atom_to_list(Atom));
pathtype(Name) when is_list(Name) or is_binary(Name) ->
case os:type() of
- {unix, _} -> unix_pathtype(Name);
- {win32, _} -> win32_pathtype(Name)
+ {win32, _} ->
+ win32_pathtype(Name);
+ {_, _} ->
+ unix_pathtype(Name)
end.
unix_pathtype(<<$/,_/binary>>) ->
diff --git a/lib/stdlib/src/gb_sets.erl b/lib/stdlib/src/gb_sets.erl
index 237317ac94..0a26d0182d 100644
--- a/lib/stdlib/src/gb_sets.erl
+++ b/lib/stdlib/src/gb_sets.erl
@@ -1,7 +1,7 @@
%%
%% %CopyrightBegin%
%%
-%% Copyright Ericsson AB 2001-2013. All Rights Reserved.
+%% Copyright Ericsson AB 2001-2014. 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
@@ -196,31 +196,32 @@
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
%% Some types.
--export_type([iter/0]).
+-export_type([set/0, set/1, iter/0, iter/1]).
--type gb_set_node() :: 'nil' | {term(), _, _}.
+-type gb_set_node(Element) :: 'nil' | {Element, _, _}.
+-type gb_set_node() :: gb_set_node(_).
+-opaque set(Element) :: {non_neg_integer(), gb_set_node(Element)}.
+-opaque set() :: set(_).
+-opaque iter(Element) :: [gb_set_node(Element)].
-opaque iter() :: [gb_set_node()].
-%% A declaration equivalent to the following is currently hard-coded
-%% in erl_types.erl
-%%
-%% -opaque gb_set() :: {non_neg_integer(), gb_set_node()}.
-
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
+%%% gb_sets:set() in OTP 17 only.
+
-spec empty() -> Set when
- Set :: gb_set().
+ Set :: gb_sets:set().
empty() ->
{0, nil}.
-spec new() -> Set when
- Set :: gb_set().
+ Set :: gb_sets:set().
new() -> empty().
-spec is_empty(Set) -> boolean() when
- Set :: gb_set().
+ Set :: gb_sets:set().
is_empty({0, nil}) ->
true;
@@ -228,27 +229,24 @@ is_empty(_) ->
false.
-spec size(Set) -> non_neg_integer() when
- Set :: gb_set().
+ Set :: gb_sets:set().
size({Size, _}) ->
Size.
--spec singleton(Element) -> gb_set() when
- Element :: term().
+-spec singleton(Element) -> set(Element).
singleton(Key) ->
{1, {Key, nil, nil}}.
-spec is_element(Element, Set) -> boolean() when
- Element :: term(),
- Set :: gb_set().
+ Set :: set(Element).
is_element(Key, S) ->
is_member(Key, S).
-spec is_member(Element, Set) -> boolean() when
- Element :: term(),
- Set :: gb_set().
+ Set :: set(Element).
is_member(Key, {_, T}) ->
is_member_1(Key, T).
@@ -263,9 +261,8 @@ is_member_1(_, nil) ->
false.
-spec insert(Element, Set1) -> Set2 when
- Element :: term(),
- Set1 :: gb_set(),
- Set2 :: gb_set().
+ Set1 :: set(Element),
+ Set2 :: set(Element).
insert(Key, {S, T}) ->
S1 = S + 1,
@@ -322,8 +319,8 @@ count(nil) ->
{1, 0}.
-spec balance(Set1) -> Set2 when
- Set1 :: gb_set(),
- Set2 :: gb_set().
+ Set1 :: set(Element),
+ Set2 :: set(Element).
balance({S, T}) ->
{S, balance(T, S)}.
@@ -349,17 +346,15 @@ balance_list_1(L, 0) ->
{nil, L}.
-spec add_element(Element, Set1) -> Set2 when
- Element :: term(),
- Set1 :: gb_set(),
- Set2 :: gb_set().
+ Set1 :: set(Element),
+ Set2 :: set(Element).
add_element(X, S) ->
add(X, S).
-spec add(Element, Set1) -> Set2 when
- Element :: term(),
- Set1 :: gb_set(),
- Set2 :: gb_set().
+ Set1 :: set(Element),
+ Set2 :: set(Element).
add(X, S) ->
case is_member(X, S) of
@@ -370,32 +365,30 @@ add(X, S) ->
end.
-spec from_list(List) -> Set when
- List :: [term()],
- Set :: gb_set().
+ List :: [Element],
+ Set :: set(Element).
from_list(L) ->
from_ordset(ordsets:from_list(L)).
-spec from_ordset(List) -> Set when
- List :: [term()],
- Set :: gb_set().
+ List :: [Element],
+ Set :: set(Element).
from_ordset(L) ->
S = length(L),
{S, balance_list(L, S)}.
-spec del_element(Element, Set1) -> Set2 when
- Element :: term(),
- Set1 :: gb_set(),
- Set2 :: gb_set().
+ Set1 :: set(Element),
+ Set2 :: set(Element).
del_element(Key, S) ->
delete_any(Key, S).
-spec delete_any(Element, Set1) -> Set2 when
- Element :: term(),
- Set1 :: gb_set(),
- Set2 :: gb_set().
+ Set1 :: set(Element),
+ Set2 :: set(Element).
delete_any(Key, S) ->
case is_member(Key, S) of
@@ -406,9 +399,8 @@ delete_any(Key, S) ->
end.
-spec delete(Element, Set1) -> Set2 when
- Element :: term(),
- Set1 :: gb_set(),
- Set2 :: gb_set().
+ Set1 :: set(Element),
+ Set2 :: set(Element).
delete(Key, {S, T}) ->
{S - 1, delete_1(Key, T)}.
@@ -431,9 +423,8 @@ merge(Smaller, Larger) ->
{Key, Smaller, Larger1}.
-spec take_smallest(Set1) -> {Element, Set2} when
- Set1 :: gb_set(),
- Set2 :: gb_set(),
- Element :: term().
+ Set1 :: set(Element),
+ Set2 :: set(Element).
take_smallest({S, T}) ->
{Key, Larger} = take_smallest1(T),
@@ -445,8 +436,8 @@ take_smallest1({Key, Smaller, Larger}) ->
{Key1, Smaller1} = take_smallest1(Smaller),
{Key1, {Key, Smaller1, Larger}}.
--spec smallest(Set) -> term() when
- Set :: gb_set().
+-spec smallest(Set) -> Element when
+ Set :: set(Element).
smallest({_, T}) ->
smallest_1(T).
@@ -457,9 +448,8 @@ smallest_1({_Key, Smaller, _Larger}) ->
smallest_1(Smaller).
-spec take_largest(Set1) -> {Element, Set2} when
- Set1 :: gb_set(),
- Set2 :: gb_set(),
- Element :: term().
+ Set1 :: set(Element),
+ Set2 :: set(Element).
take_largest({S, T}) ->
{Key, Smaller} = take_largest1(T),
@@ -471,8 +461,8 @@ take_largest1({Key, Smaller, Larger}) ->
{Key1, Larger1} = take_largest1(Larger),
{Key1, {Key, Smaller, Larger1}}.
--spec largest(Set) -> term() when
- Set :: gb_set().
+-spec largest(Set) -> Element when
+ Set :: set(Element).
largest({_, T}) ->
largest_1(T).
@@ -483,8 +473,8 @@ largest_1({_Key, _Smaller, Larger}) ->
largest_1(Larger).
-spec to_list(Set) -> List when
- Set :: gb_set(),
- List :: [term()].
+ Set :: set(Element),
+ List :: [Element].
to_list({_, T}) ->
to_list(T, []).
@@ -496,8 +486,8 @@ to_list({Key, Small, Big}, L) ->
to_list(nil, L) -> L.
-spec iterator(Set) -> Iter when
- Set :: gb_set(),
- Iter :: iter().
+ Set :: set(Element),
+ Iter :: iter(Element).
iterator({_, T}) ->
iterator(T, []).
@@ -513,9 +503,8 @@ iterator(nil, As) ->
As.
-spec next(Iter1) -> {Element, Iter2} | 'none' when
- Iter1 :: iter(),
- Iter2 :: iter(),
- Element :: term().
+ Iter1 :: iter(Element),
+ Iter2 :: iter(Element).
next([{X, _, T} | As]) ->
{X, iterator(T, As)};
@@ -546,9 +535,9 @@ next([]) ->
%% overhead.
-spec union(Set1, Set2) -> Set3 when
- Set1 :: gb_set(),
- Set2 :: gb_set(),
- Set3 :: gb_set().
+ Set1 :: set(Element),
+ Set2 :: set(Element),
+ Set3 :: set(Element).
union({N1, T1}, {N2, T2}) when N2 < N1 ->
union(to_list_1(T2), N2, T1, N1);
@@ -570,7 +559,7 @@ union(L, N1, T2, N2) ->
union_1(L, mk_set(N2, T2))
end.
--spec mk_set(non_neg_integer(), gb_set_node()) -> gb_set().
+-spec mk_set(non_neg_integer(), gb_set_node(T)) -> set(T).
mk_set(N, T) ->
{N, T}.
@@ -651,8 +640,8 @@ balance_revlist_1(L, 0) ->
{nil, L}.
-spec union(SetList) -> Set when
- SetList :: [gb_set(),...],
- Set :: gb_set().
+ SetList :: [set(Element),...],
+ Set :: set(Element).
union([S | Ss]) ->
union_list(S, Ss);
@@ -666,9 +655,9 @@ union_list(S, []) -> S.
%% The rest is modelled on the above.
-spec intersection(Set1, Set2) -> Set3 when
- Set1 :: gb_set(),
- Set2 :: gb_set(),
- Set3 :: gb_set().
+ Set1 :: set(Element),
+ Set2 :: set(Element),
+ Set3 :: set(Element).
intersection({N1, T1}, {N2, T2}) when N2 < N1 ->
intersection(to_list_1(T2), N2, T1, N1);
@@ -717,8 +706,8 @@ intersection_2(_, [], As, S) ->
{S, balance_revlist(As, S)}.
-spec intersection(SetList) -> Set when
- SetList :: [gb_set(),...],
- Set :: gb_set().
+ SetList :: [set(Element),...],
+ Set :: set(Element).
intersection([S | Ss]) ->
intersection_list(S, Ss).
@@ -728,8 +717,8 @@ intersection_list(S, [S1 | Ss]) ->
intersection_list(S, []) -> S.
-spec is_disjoint(Set1, Set2) -> boolean() when
- Set1 :: gb_set(),
- Set2 :: gb_set().
+ Set1 :: set(Element),
+ Set2 :: set(Element).
is_disjoint({N1, T1}, {N2, T2}) when N1 < N2 ->
is_disjoint_1(T1, T2);
@@ -758,17 +747,17 @@ is_disjoint_1(_, nil) ->
%% traverse the whole element list of the left operand.
-spec subtract(Set1, Set2) -> Set3 when
- Set1 :: gb_set(),
- Set2 :: gb_set(),
- Set3 :: gb_set().
+ Set1 :: set(Element),
+ Set2 :: set(Element),
+ Set3 :: set(Element).
subtract(S1, S2) ->
difference(S1, S2).
-spec difference(Set1, Set2) -> Set3 when
- Set1 :: gb_set(),
- Set2 :: gb_set(),
- Set3 :: gb_set().
+ Set1 :: set(Element),
+ Set2 :: set(Element),
+ Set3 :: set(Element).
difference({N1, T1}, {N2, T2}) ->
difference(to_list_1(T1), N1, T2, N2).
@@ -817,8 +806,8 @@ difference_2(Xs, [], As, S) ->
%% without the construction of a new set.
-spec is_subset(Set1, Set2) -> boolean() when
- Set1 :: gb_set(),
- Set2 :: gb_set().
+ Set1 :: set(Element),
+ Set2 :: set(Element).
is_subset({N1, T1}, {N2, T2}) ->
is_subset(to_list_1(T1), N1, T2, N2).
@@ -867,20 +856,20 @@ is_set({N, {_, _, _}}) when is_integer(N), N >= 0 -> true;
is_set(_) -> false.
-spec filter(Pred, Set1) -> Set2 when
- Pred :: fun((E :: term()) -> boolean()),
- Set1 :: gb_set(),
- Set2 :: gb_set().
+ Pred :: fun((Element) -> boolean()),
+ Set1 :: set(Element),
+ Set2 :: set(Element).
filter(F, S) ->
from_ordset([X || X <- to_list(S), F(X)]).
-spec fold(Function, Acc0, Set) -> Acc1 when
- Function :: fun((E :: term(), AccIn) -> AccOut),
- Acc0 :: term(),
- Acc1 :: term(),
- AccIn :: term(),
- AccOut :: term(),
- Set :: gb_set().
+ Function :: fun((Element, AccIn) -> AccOut),
+ Acc0 :: Acc,
+ Acc1 :: Acc,
+ AccIn :: Acc,
+ AccOut :: Acc,
+ Set :: set(Element).
fold(F, A, {_, T}) when is_function(F, 2) ->
fold_1(F, A, T).
diff --git a/lib/stdlib/src/gb_trees.erl b/lib/stdlib/src/gb_trees.erl
index 7a4dfe1a0b..7069b61873 100644
--- a/lib/stdlib/src/gb_trees.erl
+++ b/lib/stdlib/src/gb_trees.erl
@@ -1,7 +1,7 @@
%%
%% %CopyrightBegin%
%%
-%% Copyright Ericsson AB 2001-2013. All Rights Reserved.
+%% Copyright Ericsson AB 2001-2014. 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
@@ -152,25 +152,25 @@
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
%% Some types.
--export_type([iter/0]).
+-export_type([tree/0, tree/2, iter/0, iter/2]).
--type gb_tree_node() :: 'nil' | {_, _, _, _}.
+-type gb_tree_node(K, V) :: 'nil'
+ | {K, V, gb_tree_node(K, V), gb_tree_node(K, V)}.
+-type gb_tree_node() :: gb_tree_node(_, _).
+-opaque tree(Key, Value) :: {non_neg_integer(), gb_tree_node(Key, Value)}.
+-opaque tree() :: tree(_, _).
+-opaque iter(Key, Value) :: [gb_tree_node(Key, Value)].
-opaque iter() :: [gb_tree_node()].
-%% A declaration equivalent to the following is currently hard-coded
-%% in erl_types.erl
-%%
-%% -opaque gb_tree() :: {non_neg_integer(), gb_tree_node()}.
-
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
--spec empty() -> gb_tree().
+-spec empty() -> tree().
empty() ->
{0, nil}.
-spec is_empty(Tree) -> boolean() when
- Tree :: gb_tree().
+ Tree :: tree().
is_empty({0, nil}) ->
true;
@@ -178,17 +178,15 @@ is_empty(_) ->
false.
-spec size(Tree) -> non_neg_integer() when
- Tree :: gb_tree().
+ Tree :: tree().
size({Size, _}) when is_integer(Size), Size >= 0 ->
Size.
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
--spec lookup(Key, Tree) -> 'none' | {'value', Val} when
- Key :: term(),
- Val :: term(),
- Tree :: gb_tree().
+-spec lookup(Key, Tree) -> 'none' | {'value', Value} when
+ Tree :: tree(Key, Value).
lookup(Key, {_, T}) ->
lookup_1(Key, T).
@@ -214,8 +212,7 @@ lookup_1(_, nil) ->
%% This is a specialized version of `lookup'.
-spec is_defined(Key, Tree) -> boolean() when
- Key :: term(),
- Tree :: gb_tree().
+ Tree :: tree(Key, Value :: term()).
is_defined(Key, {_, T}) ->
is_defined_1(Key, T).
@@ -233,10 +230,8 @@ is_defined_1(_, nil) ->
%% This is a specialized version of `lookup'.
--spec get(Key, Tree) -> Val when
- Key :: term(),
- Tree :: gb_tree(),
- Val :: term().
+-spec get(Key, Tree) -> Value when
+ Tree :: tree(Key, Value).
get(Key, {_, T}) ->
get_1(Key, T).
@@ -250,11 +245,9 @@ get_1(_, {_, Value, _, _}) ->
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
--spec update(Key, Val, Tree1) -> Tree2 when
- Key :: term(),
- Val :: term(),
- Tree1 :: gb_tree(),
- Tree2 :: gb_tree().
+-spec update(Key, Value, Tree1) -> Tree2 when
+ Tree1 :: tree(Key, Value),
+ Tree2 :: tree(Key, Value).
update(Key, Val, {S, T}) ->
T1 = update_1(Key, Val, T),
@@ -271,11 +264,9 @@ update_1(Key, Value, {_, _, Smaller, Bigger}) ->
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
--spec insert(Key, Val, Tree1) -> Tree2 when
- Key :: term(),
- Val :: term(),
- Tree1 :: gb_tree(),
- Tree2 :: gb_tree().
+-spec insert(Key, Value, Tree1) -> Tree2 when
+ Tree1 :: tree(Key, Value),
+ Tree2 :: tree(Key, Value).
insert(Key, Val, {S, T}) when is_integer(S) ->
S1 = S+1,
@@ -324,11 +315,9 @@ insert_1(Key, _, _, _) ->
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
--spec enter(Key, Val, Tree1) -> Tree2 when
- Key :: term(),
- Val :: term(),
- Tree1 :: gb_tree(),
- Tree2 :: gb_tree().
+-spec enter(Key, Value, Tree1) -> Tree2 when
+ Tree1 :: tree(Key, Value),
+ Tree2 :: tree(Key, Value).
enter(Key, Val, T) ->
case is_defined(Key, T) of
@@ -352,8 +341,8 @@ count(nil) ->
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
-spec balance(Tree1) -> Tree2 when
- Tree1 :: gb_tree(),
- Tree2 :: gb_tree().
+ Tree1 :: tree(Key, Value),
+ Tree2 :: tree(Key, Value).
balance({S, T}) ->
{S, balance(T, S)}.
@@ -379,8 +368,8 @@ balance_list_1(L, 0) ->
{nil, L}.
-spec from_orddict(List) -> Tree when
- List :: [{Key :: term(), Val :: term()}],
- Tree :: gb_tree().
+ List :: [{Key, Value}],
+ Tree :: tree(Key, Value).
from_orddict(L) ->
S = length(L),
@@ -389,9 +378,8 @@ from_orddict(L) ->
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
-spec delete_any(Key, Tree1) -> Tree2 when
- Key :: term(),
- Tree1 :: gb_tree(),
- Tree2 :: gb_tree().
+ Tree1 :: tree(Key, Value),
+ Tree2 :: tree(Key, Value).
delete_any(Key, T) ->
case is_defined(Key, T) of
@@ -404,9 +392,8 @@ delete_any(Key, T) ->
%%% delete. Assumes that key is present.
-spec delete(Key, Tree1) -> Tree2 when
- Key :: term(),
- Tree1 :: gb_tree(),
- Tree2 :: gb_tree().
+ Tree1 :: tree(Key, Value),
+ Tree2 :: tree(Key, Value).
delete(Key, {S, T}) when is_integer(S), S >= 0 ->
{S - 1, delete_1(Key, T)}.
@@ -432,11 +419,9 @@ merge(Smaller, Larger) ->
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
--spec take_smallest(Tree1) -> {Key, Val, Tree2} when
- Tree1 :: gb_tree(),
- Tree2 :: gb_tree(),
- Key :: term(),
- Val :: term().
+-spec take_smallest(Tree1) -> {Key, Value, Tree2} when
+ Tree1 :: tree(Key, Value),
+ Tree2 :: tree(Key, Value).
take_smallest({Size, Tree}) when is_integer(Size), Size >= 0 ->
{Key, Value, Larger} = take_smallest1(Tree),
@@ -448,10 +433,8 @@ take_smallest1({Key, Value, Smaller, Larger}) ->
{Key1, Value1, Smaller1} = take_smallest1(Smaller),
{Key1, Value1, {Key, Value, Smaller1, Larger}}.
--spec smallest(Tree) -> {Key, Val} when
- Tree :: gb_tree(),
- Key :: term(),
- Val :: term().
+-spec smallest(Tree) -> {Key, Value} when
+ Tree :: tree(Key, Value).
smallest({_, Tree}) ->
smallest_1(Tree).
@@ -461,11 +444,9 @@ smallest_1({Key, Value, nil, _Larger}) ->
smallest_1({_Key, _Value, Smaller, _Larger}) ->
smallest_1(Smaller).
--spec take_largest(Tree1) -> {Key, Val, Tree2} when
- Tree1 :: gb_tree(),
- Tree2 :: gb_tree(),
- Key :: term(),
- Val :: term().
+-spec take_largest(Tree1) -> {Key, Value, Tree2} when
+ Tree1 :: tree(Key, Value),
+ Tree2 :: tree(Key, Value).
take_largest({Size, Tree}) when is_integer(Size), Size >= 0 ->
{Key, Value, Smaller} = take_largest1(Tree),
@@ -477,10 +458,8 @@ take_largest1({Key, Value, Smaller, Larger}) ->
{Key1, Value1, Larger1} = take_largest1(Larger),
{Key1, Value1, {Key, Value, Smaller, Larger1}}.
--spec largest(Tree) -> {Key, Val} when
- Tree :: gb_tree(),
- Key :: term(),
- Val :: term().
+-spec largest(Tree) -> {Key, Value} when
+ Tree :: tree(Key, Value).
largest({_, Tree}) ->
largest_1(Tree).
@@ -492,10 +471,8 @@ largest_1({_Key, _Value, _Smaller, Larger}) ->
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
--spec to_list(Tree) -> [{Key, Val}] when
- Tree :: gb_tree(),
- Key :: term(),
- Val :: term().
+-spec to_list(Tree) -> [{Key, Value}] when
+ Tree :: tree(Key, Value).
to_list({_, T}) ->
to_list(T, []).
@@ -509,8 +486,7 @@ to_list(nil, L) -> L.
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
-spec keys(Tree) -> [Key] when
- Tree :: gb_tree(),
- Key :: term().
+ Tree :: tree(Key, Value :: term()).
keys({_, T}) ->
keys(T, []).
@@ -521,9 +497,8 @@ keys(nil, L) -> L.
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
--spec values(Tree) -> [Val] when
- Tree :: gb_tree(),
- Val :: term().
+-spec values(Tree) -> [Value] when
+ Tree :: tree(Key :: term(), Value).
values({_, T}) ->
values(T, []).
@@ -535,8 +510,8 @@ values(nil, L) -> L.
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
-spec iterator(Tree) -> Iter when
- Tree :: gb_tree(),
- Iter :: iter().
+ Tree :: tree(Key, Value),
+ Iter :: iter(Key, Value).
iterator({_, T}) ->
iterator_1(T).
@@ -554,11 +529,9 @@ iterator({_, _, L, _} = T, As) ->
iterator(nil, As) ->
As.
--spec next(Iter1) -> 'none' | {Key, Val, Iter2} when
- Iter1 :: iter(),
- Iter2 :: iter(),
- Key :: term(),
- Val :: term().
+-spec next(Iter1) -> 'none' | {Key, Value, Iter2} when
+ Iter1 :: iter(Key, Value),
+ Iter2 :: iter(Key, Value).
next([{X, V, _, T} | As]) ->
{X, V, iterator(T, As)};
@@ -568,9 +541,9 @@ next([]) ->
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
-spec map(Function, Tree1) -> Tree2 when
- Function :: fun((K :: term(), V1 :: term()) -> V2 :: term()),
- Tree1 :: gb_tree(),
- Tree2 :: gb_tree().
+ Function :: fun((K :: Key, V1 :: Value1) -> V2 :: Value2),
+ Tree1 :: tree(Key, Value1),
+ Tree2 :: tree(Key, Value2).
map(F, {Size, Tree}) when is_function(F, 2) ->
{Size, map_1(F, Tree)}.
diff --git a/lib/stdlib/src/gen.erl b/lib/stdlib/src/gen.erl
index 7281549ea7..63116fa16e 100644
--- a/lib/stdlib/src/gen.erl
+++ b/lib/stdlib/src/gen.erl
@@ -1,7 +1,7 @@
%%
%% %CopyrightBegin%
%%
-%% Copyright Ericsson AB 1996-2013. All Rights Reserved.
+%% Copyright Ericsson AB 1996-2014. 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
@@ -37,7 +37,9 @@
%%-----------------------------------------------------------------
-type linkage() :: 'link' | 'nolink'.
--type emgr_name() :: {'local', atom()} | {'global', term()} | {via, atom(), term()}.
+-type emgr_name() :: {'local', atom()}
+ | {'global', term()}
+ | {'via', Module :: module(), Name :: term()}.
-type start_ret() :: {'ok', pid()} | 'ignore' | {'error', term()}.
diff --git a/lib/stdlib/src/gen_event.erl b/lib/stdlib/src/gen_event.erl
index 7629e88fbf..d39dd89d3a 100644
--- a/lib/stdlib/src/gen_event.erl
+++ b/lib/stdlib/src/gen_event.erl
@@ -40,6 +40,8 @@
system_continue/3,
system_terminate/4,
system_code_change/4,
+ system_get_state/1,
+ system_replace_state/2,
format_status/2]).
-export_type([handler/0, handler_args/0, add_handler_ret/0,
@@ -229,24 +231,6 @@ wake_hib(Parent, ServerName, MSL, Debug) ->
fetch_msg(Parent, ServerName, MSL, Debug, Hib) ->
receive
- {system, From, get_state} ->
- States = [{Mod,Id,State} || #handler{module=Mod, id=Id, state=State} <- MSL],
- sys:handle_system_msg(get_state, From, Parent, ?MODULE, Debug,
- {States, [ServerName, MSL, Hib]}, Hib);
- {system, From, {replace_state, StateFun}} ->
- {NMSL, NStates} =
- lists:unzip([begin
- Cur = {Mod,Id,State},
- try
- NState = {Mod,Id,NS} = StateFun(Cur),
- {HS#handler{state=NS}, NState}
- catch
- _:_ ->
- {HS, Cur}
- end
- end || #handler{module=Mod, id=Id, state=State}=HS <- MSL]),
- sys:handle_system_msg(replace_state, From, Parent, ?MODULE, Debug,
- {NStates, [ServerName, NMSL, Hib]}, Hib);
{system, From, Req} ->
sys:handle_system_msg(Req, From, Parent, ?MODULE, Debug,
[ServerName, MSL, Hib],Hib);
@@ -383,6 +367,23 @@ system_code_change([ServerName, MSL, Hib], Module, OldVsn, Extra) ->
MSL),
{ok, [ServerName, MSL1, Hib]}.
+system_get_state([_ServerName, MSL, _Hib]) ->
+ {ok, [{Mod,Id,State} || #handler{module=Mod, id=Id, state=State} <- MSL]}.
+
+system_replace_state(StateFun, [ServerName, MSL, Hib]) ->
+ {NMSL, NStates} =
+ lists:unzip([begin
+ Cur = {Mod,Id,State},
+ try
+ NState = {Mod,Id,NS} = StateFun(Cur),
+ {HS#handler{state=NS}, NState}
+ catch
+ _:_ ->
+ {HS, Cur}
+ end
+ end || #handler{module=Mod, id=Id, state=State}=HS <- MSL]),
+ {ok, NStates, [ServerName, NMSL, Hib]}.
+
%%-----------------------------------------------------------------
%% Format debug messages. Print them as the call-back module sees
%% them, not as the real erlang messages. Use trace for that.
diff --git a/lib/stdlib/src/gen_fsm.erl b/lib/stdlib/src/gen_fsm.erl
index e9654322f1..e914f7d0b2 100644
--- a/lib/stdlib/src/gen_fsm.erl
+++ b/lib/stdlib/src/gen_fsm.erl
@@ -118,6 +118,8 @@
system_continue/3,
system_terminate/4,
system_code_change/4,
+ system_get_state/1,
+ system_replace_state/2,
format_status/2]).
-import(error_logger, [format/2]).
@@ -422,17 +424,6 @@ wake_hib(Parent, Name, StateName, StateData, Mod, Debug) ->
decode_msg(Msg,Parent, Name, StateName, StateData, Mod, Time, Debug, Hib) ->
case Msg of
- {system, From, get_state} ->
- Misc = [Name, StateName, StateData, Mod, Time],
- sys:handle_system_msg(get_state, From, Parent, ?MODULE, Debug,
- {{StateName, StateData}, Misc}, Hib);
- {system, From, {replace_state, StateFun}} ->
- State = {StateName, StateData},
- NState = {NStateName, NStateData} = try StateFun(State)
- catch _:_ -> State end,
- NMisc = [Name, NStateName, NStateData, Mod, Time],
- sys:handle_system_msg(replace_state, From, Parent, ?MODULE, Debug,
- {NState, NMisc}, Hib);
{system, From, Req} ->
sys:handle_system_msg(Req, From, Parent, ?MODULE, Debug,
[Name, StateName, StateData, Mod, Time], Hib);
@@ -467,6 +458,13 @@ system_code_change([Name, StateName, StateData, Mod, Time],
Else -> Else
end.
+system_get_state([_Name, StateName, StateData, _Mod, _Time]) ->
+ {ok, {StateName, StateData}}.
+
+system_replace_state(StateFun, [Name, StateName, StateData, Mod, Time]) ->
+ Result = {NStateName, NStateData} = StateFun({StateName, StateData}),
+ {ok, Result, [Name, NStateName, NStateData, Mod, Time]}.
+
%%-----------------------------------------------------------------
%% Format debug messages. Print them as the call-back module sees
%% them, not as the real erlang messages. Use trace for that.
diff --git a/lib/stdlib/src/gen_server.erl b/lib/stdlib/src/gen_server.erl
index 5f14e48b0a..202a931fae 100644
--- a/lib/stdlib/src/gen_server.erl
+++ b/lib/stdlib/src/gen_server.erl
@@ -98,6 +98,8 @@
-export([system_continue/3,
system_terminate/4,
system_code_change/4,
+ system_get_state/1,
+ system_replace_state/2,
format_status/2]).
%% Internal exports
@@ -372,13 +374,6 @@ wake_hib(Parent, Name, State, Mod, Debug) ->
decode_msg(Msg, Parent, Name, State, Mod, Time, Debug, Hib) ->
case Msg of
- {system, From, get_state} ->
- sys:handle_system_msg(get_state, From, Parent, ?MODULE, Debug,
- {State, [Name, State, Mod, Time]}, Hib);
- {system, From, {replace_state, StateFun}} ->
- NState = try StateFun(State) catch _:_ -> State end,
- sys:handle_system_msg(replace_state, From, Parent, ?MODULE, Debug,
- {NState, [Name, NState, Mod, Time]}, Hib);
{system, From, Req} ->
sys:handle_system_msg(Req, From, Parent, ?MODULE, Debug,
[Name, State, Mod, Time], Hib);
@@ -687,6 +682,13 @@ system_code_change([Name, State, Mod, Time], _Module, OldVsn, Extra) ->
Else -> Else
end.
+system_get_state([_Name, State, _Mod, _Time]) ->
+ {ok, State}.
+
+system_replace_state(StateFun, [Name, State, Mod, Time]) ->
+ NState = StateFun(State),
+ {ok, NState, [Name, NState, Mod, Time]}.
+
%%-----------------------------------------------------------------
%% Format debug messages. Print them as the call-back module sees
%% them, not as the real erlang messages. Use trace for that.
diff --git a/lib/stdlib/src/io.erl b/lib/stdlib/src/io.erl
index b11d41e2eb..27e2a82b41 100644
--- a/lib/stdlib/src/io.erl
+++ b/lib/stdlib/src/io.erl
@@ -1,7 +1,7 @@
%%
%% %CopyrightBegin%
%%
-%% Copyright Ericsson AB 1996-2013. All Rights Reserved.
+%% Copyright Ericsson AB 1996-2014. 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
@@ -177,13 +177,15 @@ get_password(Io) ->
| {'expand_fun', expand_fun()}
| {'encoding', encoding()}.
--spec getopts() -> [opt_pair()].
+-spec getopts() -> [opt_pair()] | {'error', Reason} when
+ Reason :: term().
getopts() ->
getopts(default_input()).
--spec getopts(IoDevice) -> [opt_pair()] when
- IoDevice :: device().
+-spec getopts(IoDevice) -> [opt_pair()] | {'error', Reason} when
+ IoDevice :: device(),
+ Reason :: term().
getopts(Io) ->
request(Io, getopts).
diff --git a/lib/stdlib/src/io_lib.erl b/lib/stdlib/src/io_lib.erl
index 375d05f359..adc9a0cf5f 100644
--- a/lib/stdlib/src/io_lib.erl
+++ b/lib/stdlib/src/io_lib.erl
@@ -257,7 +257,9 @@ write(T, D) when is_tuple(T) ->
[write(element(1, T), D-1)|
write_tail(tl(tuple_to_list(T)), D-1, $,)],
$}]
- end.
+ end;
+%write(Term, D) when is_map(Term) -> write_map(Term, D);
+write(Term, D) -> write_map(Term, D).
%% write_tail(List, Depth, CharacterBeforeDots)
%% Test the terminating case first as this looks better with depth.
@@ -275,6 +277,18 @@ write_port(Port) ->
write_ref(Ref) ->
erlang:ref_to_list(Ref).
+write_map(Map, D) when is_integer(D) ->
+ [$#,${,write_map_body(maps:to_list(Map), D),$}].
+
+write_map_body(_, 0) -> "...";
+write_map_body([],_) -> [];
+write_map_body([{K,V}],D) -> write_map_assoc(K,V,D);
+write_map_body([{K,V}|KVs], D) ->
+ [write_map_assoc(K,V,D),$, | write_map_body(KVs,D-1)].
+
+write_map_assoc(K,V,D) ->
+ [write(K,D - 1),"=>",write(V,D-1)].
+
write_binary(B, D) when is_integer(D) ->
[$<,$<,write_binary_body(B, D),$>,$>].
diff --git a/lib/stdlib/src/io_lib_pretty.erl b/lib/stdlib/src/io_lib_pretty.erl
index 7637ad7a3d..aece06afa6 100644
--- a/lib/stdlib/src/io_lib_pretty.erl
+++ b/lib/stdlib/src/io_lib_pretty.erl
@@ -64,13 +64,13 @@ print(Term) ->
(term(), options()) -> chars().
print(Term, Options) when is_list(Options) ->
- Col = proplists:get_value(column, Options, 1),
- Ll = proplists:get_value(line_length, Options, 80),
- D = proplists:get_value(depth, Options, -1),
- M = proplists:get_value(max_chars, Options, -1),
- RecDefFun = proplists:get_value(record_print_fun, Options, no_fun),
- Encoding = proplists:get_value(encoding, Options, epp:default_encoding()),
- Strings = proplists:get_value(strings, Options, true),
+ Col = get_option(column, Options, 1),
+ Ll = get_option(line_length, Options, 80),
+ D = get_option(depth, Options, -1),
+ M = get_option(max_chars, Options, -1),
+ RecDefFun = get_option(record_print_fun, Options, no_fun),
+ Encoding = get_option(encoding, Options, epp:default_encoding()),
+ Strings = get_option(strings, Options, true),
print(Term, Col, Ll, D, M, RecDefFun, Encoding, Strings);
print(Term, RecDefFun) ->
print(Term, -1, RecDefFun).
@@ -101,6 +101,7 @@ print(Term, Col, Ll, D, M, RecDefFun, Enc, Str) when Col =< 0 ->
print(Term, 1, Ll, D, M, RecDefFun, Enc, Str);
print(Term, Col, Ll, D, M0, RecDefFun, Enc, Str) when is_tuple(Term);
is_list(Term);
+ is_map(Term);
is_bitstring(Term) ->
If = {_S, Len} = print_length(Term, D, RecDefFun, Enc, Str),
M = max_cs(M0, Len),
@@ -137,6 +138,10 @@ pp({{tuple,true,L}, _Len}, Col, Ll, M, TInd, Ind, LD, W) ->
[${, pp_tag_tuple(L, Col, Ll, M, TInd, Ind, LD, W + 1), $}];
pp({{tuple,false,L}, _Len}, Col, Ll, M, TInd, Ind, LD, W) ->
[${, pp_list(L, Col + 1, Ll, M, TInd, indent(1, Ind), LD, $,, W + 1), $}];
+pp({{map,Pairs},_Len}, Col, Ll, M, TInd, Ind, LD, W) ->
+ [$#,${, pp_list(Pairs, Col + 2, Ll, M, TInd, indent(2, Ind), LD, $,, W + 1), $}];
+pp({{map_pair,K,V},_Len}, Col, Ll, M, TInd, Ind, LD, W) ->
+ [pp(K, Col, Ll, M, TInd, Ind, LD, W), " => ", pp(V, Col, Ll, M, TInd, Ind, LD, W)];
pp({{record,[{Name,NLen} | L]}, _Len}, Col, Ll, M, TInd, Ind, LD, W) ->
[Name, ${, pp_record(L, NLen, Col, Ll, M, TInd, Ind, LD, W + NLen+1), $}];
pp({{bin,S}, _Len}, Col, Ll, M, _TInd, Ind, LD, W) ->
@@ -283,6 +288,10 @@ write({{tuple, _IsTagged, L}, _}) ->
[${, write_list(L, $,), $}];
write({{list, L}, _}) ->
[$[, write_list(L, $|), $]];
+write({{map, Pairs}, _}) ->
+ [$#,${, write_list(Pairs, $,), $}];
+write({{map_pair, K, V}, _}) ->
+ [write(K)," => ",write(V)];
write({{record, [{Name,_} | L]}, _}) ->
[Name, ${, write_fields(L), $}];
write({{bin, S}, _}) ->
@@ -331,6 +340,8 @@ print_length([], _D, _RF, _Enc, _Str) ->
{"[]", 2};
print_length({}, _D, _RF, _Enc, _Str) ->
{"{}", 2};
+print_length(#{}=M, _D, _RF, _Enc, _Str) when map_size(M) =:= 0 ->
+ {"#{}", 3};
print_length(List, D, RF, Enc, Str) when is_list(List) ->
case Str andalso printable_list(List, D, Enc) of
true ->
@@ -356,6 +367,8 @@ print_length(R, D, RF, Enc, Str) when is_atom(element(1, R)),
end;
print_length(Tuple, D, RF, Enc, Str) when is_tuple(Tuple) ->
print_length_tuple(Tuple, D, RF, Enc, Str);
+print_length(Map, D, RF, Enc, Str) when is_map(Map) ->
+ print_length_map(Map, D, RF, Enc, Str);
print_length(<<>>, _D, _RF, _Enc, _Str) ->
{"<<>>", 4};
print_length(<<_/bitstring>>, 1, _RF, _Enc, _Str) ->
@@ -389,6 +402,25 @@ print_length(Term, _D, _RF, _Enc, _Str) ->
S = io_lib:write(Term),
{S, lists:flatlength(S)}.
+print_length_map(_Map, 1, _RF, _Enc, _Str) ->
+ {"#{...}", 6};
+print_length_map(Map, D, RF, Enc, Str) when is_map(Map) ->
+ Pairs = print_length_map_pairs(maps:to_list(Map), D, RF, Enc, Str),
+ {{map, Pairs}, list_length(Pairs, 3)}.
+
+print_length_map_pairs([], _D, _RF, _Enc, _Str) ->
+ [];
+print_length_map_pairs(_Pairs, 1, _RF, _Enc, _Str) ->
+ {dots, 3};
+print_length_map_pairs([{K,V}|Pairs], D, RF, Enc, Str) ->
+ [print_length_map_pair(K,V,D-1,RF,Enc,Str) |
+ print_length_map_pairs(Pairs,D-1,RF,Enc,Str)].
+
+print_length_map_pair(K, V, D, RF, Enc, Str) ->
+ {KS, KL} = print_length(K, D, RF, Enc, Str),
+ {VS, VL} = print_length(V, D, RF, Enc, Str),
+ {{map_pair, {KS,KL}, {VS,VL}}, KL + VL}.
+
print_length_tuple(_Tuple, 1, _RF, _Enc, _Str) ->
{"{...}", 5};
print_length_tuple(Tuple, D, RF, Enc, Str) ->
@@ -727,3 +759,10 @@ chars(C, N) when (N band 1) =:= 0 ->
chars(C, N) ->
S = chars(C, N bsr 1),
[C, S | S].
+
+get_option(Key, TupleList, Default) ->
+ case lists:keyfind(Key, 1, TupleList) of
+ false -> Default;
+ {Key, Value} -> Value;
+ _ -> Default
+ end.
diff --git a/lib/stdlib/src/lists.erl b/lib/stdlib/src/lists.erl
index d6a9f4645d..6303465d3d 100644
--- a/lib/stdlib/src/lists.erl
+++ b/lib/stdlib/src/lists.erl
@@ -22,7 +22,7 @@
-compile({no_auto_import,[min/2]}).
-export([append/2, append/1, subtract/2, reverse/1,
- nth/2, nthtail/2, prefix/2, suffix/2, last/1,
+ nth/2, nthtail/2, prefix/2, suffix/2, droplast/1, last/1,
seq/2, seq/3, sum/1, duplicate/2, min/1, max/1, sublist/2, sublist/3,
delete/2,
unzip/1, unzip3/1, zip/2, zip3/3, zipwith/3, zipwith3/4,
@@ -203,6 +203,19 @@ suffix(Suffix, List) ->
Delta = length(List) - length(Suffix),
Delta >= 0 andalso nthtail(Delta, List) =:= Suffix.
+%% droplast(List) returns the list dropping its last element
+
+-spec droplast(List) -> InitList when
+ List :: [T, ...],
+ InitList :: [T],
+ T :: term().
+
+%% This is the simple recursive implementation
+%% reverse(tl(reverse(L))) is faster on average,
+%% but creates more garbage.
+droplast([_T]) -> [];
+droplast([H|T]) -> [H|droplast(T)].
+
%% last(List) returns the last element in a list.
-spec last(List) -> Last when
diff --git a/lib/stdlib/src/maps.erl b/lib/stdlib/src/maps.erl
new file mode 100644
index 0000000000..4ef1638e6d
--- /dev/null
+++ b/lib/stdlib/src/maps.erl
@@ -0,0 +1,203 @@
+%%
+%% %CopyrightBegin%
+%%
+%% Copyright Ericsson AB 2013. 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(maps).
+
+-export([
+ fold/3,
+ map/2,
+ size/1,
+ without/2,
+ get/3
+ ]).
+
+
+%%% BIFs
+-export([
+ get/2,
+ find/2,
+ from_list/1,
+ is_key/2,
+ keys/1,
+ merge/2,
+ new/0,
+ put/3,
+ remove/2,
+ to_list/1,
+ update/3,
+ values/1
+ ]).
+
+-spec get(Key,Map) -> Value when
+ Key :: term(),
+ Map :: map(),
+ Value :: term().
+
+get(_,_) -> erlang:nif_error(undef).
+
+
+-spec find(Key,Map) -> {ok, Value} | error when
+ Key :: term(),
+ Map :: map(),
+ Value :: term().
+
+find(_,_) -> erlang:nif_error(undef).
+
+
+-spec from_list(List) -> Map when
+ List :: [{Key,Value}],
+ Key :: term(),
+ Value :: term(),
+ Map :: map().
+
+from_list(_) -> erlang:nif_error(undef).
+
+
+-spec is_key(Key,Map) -> boolean() when
+ Key :: term(),
+ Map :: map().
+
+is_key(_,_) -> erlang:nif_error(undef).
+
+
+-spec keys(Map) -> Keys when
+ Map :: map(),
+ Keys :: [Key],
+ Key :: term().
+
+keys(_) -> erlang:nif_error(undef).
+
+
+-spec merge(Map1,Map2) -> Map3 when
+ Map1 :: map(),
+ Map2 :: map(),
+ Map3 :: map().
+
+merge(_,_) -> erlang:nif_error(undef).
+
+
+
+-spec new() -> Map when
+ Map :: map().
+
+new() -> erlang:nif_error(undef).
+
+
+-spec put(Key,Value,Map1) -> Map2 when
+ Key :: term(),
+ Value :: term(),
+ Map1 :: map(),
+ Map2 :: map().
+
+put(_,_,_) -> erlang:nif_error(undef).
+
+
+-spec remove(Key,Map1) -> Map2 when
+ Key :: term(),
+ Map1 :: map(),
+ Map2 :: map().
+
+remove(_,_) -> erlang:nif_error(undef).
+
+
+-spec to_list(Map) -> [{Key,Value}] when
+ Map :: map(),
+ Key :: term(),
+ Value :: term().
+
+to_list(_) -> erlang:nif_error(undef).
+
+
+-spec update(Key,Value,Map1) -> Map2 when
+ Key :: term(),
+ Value :: term(),
+ Map1 :: map(),
+ Map2 :: map().
+
+update(_,_,_) -> erlang:nif_error(undef).
+
+
+-spec values(Map) -> Keys when
+ Map :: map(),
+ Keys :: [Key],
+ Key :: term().
+
+values(_) -> erlang:nif_error(undef).
+
+
+%%% End of BIFs
+
+-spec get(Key, Map, Default) -> Value | Default when
+ Key :: term(),
+ Map :: map(),
+ Value :: term(),
+ Default :: term().
+
+get(Key, Map, Default) ->
+ case maps:find(Key, Map) of
+ {ok, Value} ->
+ Value;
+ error ->
+ Default
+ end.
+
+
+-spec fold(Fun,Init,Map) -> Acc when
+ Fun :: fun((K, V, AccIn) -> AccOut),
+ Init :: term(),
+ Acc :: term(),
+ AccIn :: term(),
+ AccOut :: term(),
+ Map :: map(),
+ K :: term(),
+ V :: term().
+
+fold(Fun, Init, Map) when is_function(Fun,3), is_map(Map) ->
+ lists:foldl(fun({K,V},A) -> Fun(K,V,A) end,Init,maps:to_list(Map)).
+
+-spec map(Fun,Map1) -> Map2 when
+ Fun :: fun((K, V1) -> V2),
+ Map1 :: map(),
+ Map2 :: map(),
+ K :: term(),
+ V1 :: term(),
+ V2 :: term().
+
+map(Fun, Map) when is_function(Fun, 2), is_map(Map) ->
+ maps:from_list(lists:map(fun
+ ({K,V}) ->
+ {K,Fun(K,V)}
+ end,maps:to_list(Map))).
+
+
+-spec size(Map) -> non_neg_integer() when
+ Map :: map().
+
+size(Map) when is_map(Map) ->
+ erlang:map_size(Map).
+
+
+-spec without(Ks,Map1) -> Map2 when
+ Ks :: [K],
+ Map1 :: map(),
+ Map2 :: map(),
+ K :: term().
+
+without(Ks, M) when is_list(Ks), is_map(M) ->
+ maps:from_list([{K,V}||{K,V} <- maps:to_list(M), not lists:member(K, Ks)]).
diff --git a/lib/stdlib/src/ms_transform.erl b/lib/stdlib/src/ms_transform.erl
index 25b04fe45e..27dfcf52e1 100644
--- a/lib/stdlib/src/ms_transform.erl
+++ b/lib/stdlib/src/ms_transform.erl
@@ -910,6 +910,7 @@ bool_test(is_pid,1) -> true;
bool_test(is_port,1) -> true;
bool_test(is_reference,1) -> true;
bool_test(is_tuple,1) -> true;
+bool_test(is_map,1) -> true;
bool_test(is_binary,1) -> true;
bool_test(is_function,1) -> true;
bool_test(is_record,2) -> true;
@@ -924,6 +925,7 @@ real_guard_function(node,0) -> true;
real_guard_function(node,1) -> true;
real_guard_function(round,1) -> true;
real_guard_function(size,1) -> true;
+real_guard_function(map_size,1) -> true;
real_guard_function(tl,1) -> true;
real_guard_function(trunc,1) -> true;
real_guard_function(self,0) -> true;
diff --git a/lib/stdlib/src/orddict.erl b/lib/stdlib/src/orddict.erl
index da60fc1bb6..c98d78b34d 100644
--- a/lib/stdlib/src/orddict.erl
+++ b/lib/stdlib/src/orddict.erl
@@ -56,8 +56,10 @@ to_list(Dict) -> Dict.
List :: [{Key :: term(), Value :: term()}],
Orddict :: orddict().
+from_list([]) -> [];
+from_list([{_,_}]=Pair) -> Pair;
from_list(Pairs) ->
- lists:foldl(fun ({K,V}, D) -> store(K, V, D) end, [], Pairs).
+ lists:ukeysort(1, reverse_pairs(Pairs, [])).
-spec size(Orddict) -> non_neg_integer() when
Orddict :: orddict().
@@ -235,3 +237,7 @@ merge(F, [{K1,V1}|D1], [{_K2,V2}|D2]) -> %K1 == K2
[{K1,F(K1, V1, V2)}|merge(F, D1, D2)];
merge(F, [], D2) when is_function(F, 3) -> D2;
merge(F, D1, []) when is_function(F, 3) -> D1.
+
+reverse_pairs([{_,_}=H|T], Acc) ->
+ reverse_pairs(T, [H|Acc]);
+reverse_pairs([], Acc) -> Acc.
diff --git a/lib/stdlib/src/otp_internal.erl b/lib/stdlib/src/otp_internal.erl
index cebc9c91bd..c0ee8799c8 100644
--- a/lib/stdlib/src/otp_internal.erl
+++ b/lib/stdlib/src/otp_internal.erl
@@ -1,7 +1,7 @@
%%
%% %CopyrightBegin%
%%
-%% Copyright Ericsson AB 1999-2013. All Rights Reserved.
+%% Copyright Ericsson AB 1999-2014. 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
@@ -83,18 +83,18 @@ obsolete_1(crypto, sha_init, 0) ->
{deprecated, {crypto, hash_init, 1}};
obsolete_1(crypto, md4_update, 2) ->
- {deprecated, {crypto, hash_update, 3}};
+ {deprecated, {crypto, hash_update, 2}};
obsolete_1(crypto, md5_update, 2) ->
- {deprecated, {crypto, hash_update, 3}};
+ {deprecated, {crypto, hash_update, 2}};
obsolete_1(crypto, sha_update, 2) ->
- {deprecated, {crypto, hash_update, 3}};
+ {deprecated, {crypto, hash_update, 2}};
obsolete_1(crypto, md4_final, 1) ->
- {deprecated, {crypto, hash_final, 2}};
+ {deprecated, {crypto, hash_final, 1}};
obsolete_1(crypto, md5_final, 1) ->
- {deprecated, {crypto, hash_final, 2}};
+ {deprecated, {crypto, hash_final, 1}};
obsolete_1(crypto, sha_final, 1) ->
- {deprecated, {crypto, hash_final, 2}};
+ {deprecated, {crypto, hash_final, 1}};
obsolete_1(crypto, md5_mac, 2) ->
{deprecated, {crypto, hmac, 3}};
@@ -104,9 +104,9 @@ obsolete_1(crypto, sha_mac, 3) ->
{deprecated, {crypto, hmac, 4}};
obsolete_1(crypto, sha_mac_96, 2) ->
- {deprecated, {crypto, hmac_n, 3}};
+ {deprecated, {crypto, hmac, 4}};
obsolete_1(crypto, md5_mac_96, 2) ->
- {deprecated, {crypto, hmac_n, 3}};
+ {deprecated, {crypto, hmac, 4}};
obsolete_1(crypto, rsa_sign, 2) ->
{deprecated, {crypto, sign, 4}};
@@ -123,9 +123,9 @@ obsolete_1(crypto, dss_sign, 3) ->
{deprecated, {crypto, sign, 4}};
obsolete_1(crypto, dss_verify, 3) ->
- {deprecated, {crypto, verify, 4}};
+ {deprecated, {crypto, verify, 5}};
obsolete_1(crypto, dss_verify, 4) ->
- {deprecated, {crypto, verify, 4}};
+ {deprecated, {crypto, verify, 5}};
obsolete_1(crypto, mod_exp, 3) ->
{deprecated, {crypto, mod_pow, 3}};
@@ -133,7 +133,7 @@ obsolete_1(crypto, mod_exp, 3) ->
obsolete_1(crypto, dh_compute_key, 3) ->
{deprecated, {crypto, compute_key, 4}};
obsolete_1(crypto, dh_generate_key, 1) ->
- {deprecated, {crypto, generate_key, 3}};
+ {deprecated, {crypto, generate_key, 2}};
obsolete_1(crypto, dh_generate_key, 2) ->
{deprecated, {crypto, generate_key, 3}};
@@ -250,12 +250,12 @@ obsolete_1(snmp, N, A) ->
false ->
no;
true ->
- {deprecated, "Deprecated (will be removed in R17B); use snmpa:"++atom_to_list(N)++"/"++
+ {deprecated, "Deprecated (will be removed in OTP 18); use snmpa:"++atom_to_list(N)++"/"++
integer_to_list(A)++" instead"}
end;
obsolete_1(snmpa, old_info_format, 1) ->
- {deprecated, "Deprecated; (will be removed in R17B); use \"new\" format instead"};
+ {deprecated, "Deprecated; (will be removed in OTP 18); use \"new\" format instead"};
obsolete_1(snmpm, agent_info, 3) ->
{removed, {snmpm, agent_info, 2}, "R16B"};
obsolete_1(snmpm, update_agent_info, 5) ->
@@ -366,23 +366,6 @@ obsolete_1(auth, node_cookie, 1) ->
obsolete_1(auth, node_cookie, 2) ->
{deprecated, "Deprecated; use erlang:set_cookie/2 and net_adm:ping/1 instead"};
-obsolete_1(erlang, is_constant, 1) ->
- {removed, "Removed in R13B"};
-
-%% Added in R12B-0.
-obsolete_1(ssl, port, 1) ->
- {removed, {ssl, sockname, 1}, "R13B"};
-obsolete_1(ssl, accept, A) when A =:= 1; A =:= 2 ->
- {removed, "deprecated; use ssl:transport_accept/1,2 and ssl:ssl_accept/1,2"};
-obsolete_1(erlang, fault, 1) ->
- {removed, {erlang,error,1}, "R13B"};
-obsolete_1(erlang, fault, 2) ->
- {removed, {erlang,error,2}, "R13B"};
-
-%% Added in R12B-2.
-obsolete_1(file, rawopen, 2) ->
- {removed, "deprecated (will be removed in R13B); use file:open/2 with the raw option"};
-
obsolete_1(http, request, 1) -> {removed,{httpc,request,1},"R15B"};
obsolete_1(http, request, 2) -> {removed,{httpc,request,2},"R15B"};
obsolete_1(http, request, 4) -> {removed,{httpc,request,4},"R15B"};
@@ -524,7 +507,7 @@ obsolete_1(docb_xml_check, _, _) ->
%% Added in R15B
obsolete_1(asn1rt, F, _) when F == load_driver; F == unload_driver ->
- {deprecated,"deprecated (will be removed in R16A); has no effect as drivers are no longer used."};
+ {deprecated,"deprecated (will be removed in OTP 18); has no effect as drivers are no longer used"};
obsolete_1(ssl, pid, 1) ->
{removed,"was removed in R16; is no longer needed"};
obsolete_1(inviso, _, _) ->
@@ -532,7 +515,7 @@ obsolete_1(inviso, _, _) ->
%% Added in R15B01.
obsolete_1(gs, _, _) ->
- {deprecated,"the gs application has been deprecated and will be removed in R17; use the wx application instead"};
+ {deprecated,"the gs application has been deprecated and will be removed in OTP 18; use the wx application instead"};
obsolete_1(ssh, sign_data, 2) ->
{deprecated,"deprecated (will be removed in R16A); use public_key:pem_decode/1, public_key:pem_entry_decode/1 "
"and public_key:sign/3 instead"};
@@ -577,6 +560,26 @@ obsolete_1(wxCursor, new, 3) ->
obsolete_1(wxCursor, new, 4) ->
{deprecated,"deprecated function not available in wxWidgets-2.9 and later"};
+%% Added in OTP 17.
+obsolete_1(asn1ct, decode,3) ->
+ {deprecated,"deprecated; use Mod:decode/2 instead"};
+obsolete_1(asn1ct, encode, 3) ->
+ {deprecated,"deprecated; use Mod:encode/2 instead"};
+obsolete_1(asn1rt, decode,3) ->
+ {deprecated,"deprecated; use Mod:decode/2 instead"};
+obsolete_1(asn1rt, encode, 2) ->
+ {deprecated,"deprecated; use Mod:encode/2 instead"};
+obsolete_1(asn1rt, encode, 3) ->
+ {deprecated,"deprecated; use Mod:encode/2 instead"};
+obsolete_1(asn1rt, info, 1) ->
+ {deprecated,"deprecated; use Mod:info/0 instead"};
+obsolete_1(asn1rt, utf8_binary_to_list, 1) ->
+ {deprecated,{unicode,characters_to_list,1}};
+obsolete_1(asn1rt, utf8_list_to_binary, 1) ->
+ {deprecated,{unicode,characters_to_binary,1}};
+obsolete_1(pg, _, _) ->
+ {deprecated,"deprecated; will be removed in OTP 18"};
+
obsolete_1(_, _, _) ->
no.
diff --git a/lib/stdlib/src/pg.erl b/lib/stdlib/src/pg.erl
index ee177e4e0b..a41fd329c2 100644
--- a/lib/stdlib/src/pg.erl
+++ b/lib/stdlib/src/pg.erl
@@ -1,7 +1,7 @@
%%
%% %CopyrightBegin%
%%
-%% Copyright Ericsson AB 1996-2011. All Rights Reserved.
+%% Copyright Ericsson AB 1996-2014. 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
@@ -17,6 +17,7 @@
%% %CopyrightEnd%
%%
-module(pg).
+-deprecated(module).
%% pg provides a process group facility. Messages
%% can be multicasted to all members in the group
diff --git a/lib/stdlib/src/qlc_pt.erl b/lib/stdlib/src/qlc_pt.erl
index c26764eb18..b6bb758dfb 100644
--- a/lib/stdlib/src/qlc_pt.erl
+++ b/lib/stdlib/src/qlc_pt.erl
@@ -1,7 +1,7 @@
%%
%% %CopyrightBegin%
%%
-%% Copyright Ericsson AB 2004-2013. All Rights Reserved.
+%% Copyright Ericsson AB 2004-2014. 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
@@ -1218,13 +1218,14 @@ lu_skip(ColConstants, FilterData, PatternFrame, PatternVars,
%% column, the filter will not be skipped.
%% (an example: {X=1} <- ..., X =:= 1).
length(D = Cols -- PatternColumns) =:= 1,
- Frame <- SFs,
- begin
+ {{_,Col} = Column, Constants} <- D,
+ %% Check that the following holds for all frames.
+ lists:all(
+ fun(Frame) ->
%% The column is compared/matched against a constant.
%% If there are no more comparisons/matches then
%% the filter can be replaced by the lookup of
%% the constant.
- [{{_,Col} = Column, Constants}] = D,
{VarI, FrameI} = unify_column(Frame, PV, Col, BindFun,
Imported),
VarValues = deref_skip(VarI, FrameI, LookupOp, Imported),
@@ -1253,7 +1254,7 @@ lu_skip(ColConstants, FilterData, PatternFrame, PatternVars,
length(VarValues) =< 1 andalso
(Constants -- LookedUpConstants =:= []) andalso
bindings_is_subset(Frame, F2, Imported)
- end],
+ end, SFs)],
ColFils = family_list(ColFil),
%% The skip tag 'all' means that all filters are covered by the lookup.
%% It does not imply that there is only one generator as is the case
diff --git a/lib/stdlib/src/queue.erl b/lib/stdlib/src/queue.erl
index 4bbf5de8a5..472d503b99 100644
--- a/lib/stdlib/src/queue.erl
+++ b/lib/stdlib/src/queue.erl
@@ -1,7 +1,7 @@
%%
%% %CopyrightBegin%
%%
-%% Copyright Ericsson AB 1996-2013. All Rights Reserved.
+%% Copyright Ericsson AB 1996-2014. 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
@@ -32,6 +32,8 @@
-export([cons/2,head/1,tail/1,
snoc/2,last/1,daeh/1,init/1,liat/1,lait/1]).
+-export_type([queue/0, queue/1]).
+
%%--------------------------------------------------------------------------
%% Efficient implementation of double ended fifo queues
%%
@@ -44,10 +46,9 @@
%% that is; the RearList is reversed.
%%
-%% A declaration equivalent to the following is currently hard-coded
-%% in erl_types.erl
-%%
-%% -opaque queue() :: {list(), list()}.
+-opaque queue(Item) :: {list(Item), list(Item)}.
+
+-opaque queue() :: queue(_).
%% Creation, inspection and conversion
@@ -79,7 +80,7 @@ len(Q) ->
erlang:error(badarg, [Q]).
%% O(len(Q))
--spec to_list(Q :: queue()) -> list().
+-spec to_list(Q :: queue(Item)) -> list(Item).
to_list({In,Out}) when is_list(In), is_list(Out) ->
Out++lists:reverse(In, []);
to_list(Q) ->
@@ -88,7 +89,7 @@ to_list(Q) ->
%% Create queue from list
%%
%% O(length(L))
--spec from_list(L :: list()) -> queue().
+-spec from_list(L :: list(Item)) -> queue(Item).
from_list(L) when is_list(L) ->
f2r(L);
from_list(L) ->
@@ -97,7 +98,7 @@ from_list(L) ->
%% Return true or false depending on if element is in queue
%%
%% O(length(Q)) worst case
--spec member(Item :: term(), Q :: queue()) -> boolean().
+-spec member(Item, Q :: queue(Item)) -> boolean().
member(X, {R,F}) when is_list(R), is_list(F) ->
lists:member(X, R) orelse lists:member(X, F);
member(X, Q) ->
@@ -110,7 +111,7 @@ member(X, Q) ->
%% Put at least one element in each list, if it is cheap
%%
%% O(1)
--spec in(Item :: term(), Q1 :: queue()) -> Q2 :: queue().
+-spec in(Item, Q1 :: queue(Item)) -> Q2 :: queue(Item).
in(X, {[_]=In,[]}) ->
{[X], In};
in(X, {In,Out}) when is_list(In), is_list(Out) ->
@@ -122,7 +123,7 @@ in(X, Q) ->
%% Put at least one element in each list, if it is cheap
%%
%% O(1)
--spec in_r(Item :: term(), Q1 :: queue()) -> Q2 :: queue().
+-spec in_r(Item, Q1 :: queue(Item)) -> Q2 :: queue(Item).
in_r(X, {[],[_]=F}) ->
{F,[X]};
in_r(X, {R,F}) when is_list(R), is_list(F) ->
@@ -133,9 +134,9 @@ in_r(X, Q) ->
%% Take from head/front
%%
%% O(1) amortized, O(len(Q)) worst case
--spec out(Q1 :: queue()) ->
- {{value, Item :: term()}, Q2 :: queue()} |
- {empty, Q1 :: queue()}.
+-spec out(Q1 :: queue(Item)) ->
+ {{value, Item}, Q2 :: queue(Item)} |
+ {empty, Q1 :: queue(Item)}.
out({[],[]}=Q) ->
{empty,Q};
out({[V],[]}) ->
@@ -153,9 +154,9 @@ out(Q) ->
%% Take from tail/rear
%%
%% O(1) amortized, O(len(Q)) worst case
--spec out_r(Q1 :: queue()) ->
- {{value, Item :: term()}, Q2 :: queue()} |
- {empty, Q1 :: queue()}.
+-spec out_r(Q1 :: queue(Item)) ->
+ {{value, Item}, Q2 :: queue(Item)} |
+ {empty, Q1 :: queue(Item)}.
out_r({[],[]}=Q) ->
{empty,Q};
out_r({[],[V]}) ->
@@ -176,7 +177,7 @@ out_r(Q) ->
%% Return the first element in the queue
%%
%% O(1) since the queue is supposed to be well formed
--spec get(Q :: queue()) -> Item :: term().
+-spec get(Q :: queue(Item)) -> Item.
get({[],[]}=Q) ->
erlang:error(empty, [Q]);
get({R,F}) when is_list(R), is_list(F) ->
@@ -195,7 +196,7 @@ get([_|R], []) -> % malformed queue -> O(len(Q))
%% Return the last element in the queue
%%
%% O(1) since the queue is supposed to be well formed
--spec get_r(Q :: queue()) -> Item :: term().
+-spec get_r(Q :: queue(Item)) -> Item.
get_r({[],[]}=Q) ->
erlang:error(empty, [Q]);
get_r({[H|_],F}) when is_list(F) ->
@@ -210,7 +211,7 @@ get_r(Q) ->
%% Return the first element in the queue
%%
%% O(1) since the queue is supposed to be well formed
--spec peek(Q :: queue()) -> empty | {value,Item :: term()}.
+-spec peek(Q :: queue(Item)) -> empty | {value, Item}.
peek({[],[]}) ->
empty;
peek({R,[H|_]}) when is_list(R) ->
@@ -225,7 +226,7 @@ peek(Q) ->
%% Return the last element in the queue
%%
%% O(1) since the queue is supposed to be well formed
--spec peek_r(Q :: queue()) -> empty | {value,Item :: term()}.
+-spec peek_r(Q :: queue(Item)) -> empty | {value, Item}.
peek_r({[],[]}) ->
empty;
peek_r({[H|_],F}) when is_list(F) ->
@@ -240,7 +241,7 @@ peek_r(Q) ->
%% Remove the first element and return resulting queue
%%
%% O(1) amortized
--spec drop(Q1 :: queue()) -> Q2 :: queue().
+-spec drop(Q1 :: queue(Item)) -> Q2 :: queue(Item).
drop({[],[]}=Q) ->
erlang:error(empty, [Q]);
drop({[_],[]}) ->
@@ -258,7 +259,7 @@ drop(Q) ->
%% Remove the last element and return resulting queue
%%
%% O(1) amortized
--spec drop_r(Q1 :: queue()) -> Q2 :: queue().
+-spec drop_r(Q1 :: queue(Item)) -> Q2 :: queue(Item).
drop_r({[],[]}=Q) ->
erlang:error(empty, [Q]);
drop_r({[],[_]}) ->
@@ -279,7 +280,7 @@ drop_r(Q) ->
%% Return reversed queue
%%
%% O(1)
--spec reverse(Q1 :: queue()) -> Q2 :: queue().
+-spec reverse(Q1 :: queue(Item)) -> Q2 :: queue(Item).
reverse({R,F}) when is_list(R), is_list(F) ->
{F,R};
reverse(Q) ->
@@ -289,7 +290,7 @@ reverse(Q) ->
%%
%% Q2 empty: O(1)
%% else: O(len(Q1))
--spec join(Q1 :: queue(), Q2 :: queue()) -> Q3 :: queue().
+-spec join(Q1 :: queue(Item), Q2 :: queue(Item)) -> Q3 :: queue(Item).
join({R,F}=Q, {[],[]}) when is_list(R), is_list(F) ->
Q;
join({[],[]}, {R,F}=Q) when is_list(R), is_list(F) ->
@@ -303,8 +304,8 @@ join(Q1, Q2) ->
%%
%% N = 0..len(Q)
%% O(max(N, len(Q)))
--spec split(N :: non_neg_integer(), Q1 :: queue()) ->
- {Q2 :: queue(),Q3 :: queue()}.
+-spec split(N :: non_neg_integer(), Q1 :: queue(Item)) ->
+ {Q2 :: queue(Item),Q3 :: queue(Item)}.
split(0, {R,F}=Q) when is_list(R), is_list(F) ->
{{[],[]},Q};
split(N, {R,F}=Q) when is_integer(N), N >= 1, is_list(R), is_list(F) ->
@@ -345,8 +346,8 @@ split_r1_to_f2(N, [X|R1], F1, R2, F2) ->
%%
%% Fun(_) -> List: O(length(List) * len(Q))
%% else: O(len(Q)
--spec filter(Fun, Q1 :: queue()) -> Q2 :: queue() when
- Fun :: fun((Item :: term()) -> boolean() | list()).
+-spec filter(Fun, Q1 :: queue(Item)) -> Q2 :: queue(Item) when
+ Fun :: fun((Item) -> boolean() | list(Item)).
filter(Fun, {R0,F0}) when is_function(Fun, 1), is_list(R0), is_list(F0) ->
F = filter_f(Fun, F0),
R = filter_r(Fun, R0),
@@ -422,7 +423,7 @@ filter_r(Fun, [X|R0]) ->
%% Cons to head
%%
--spec cons(Item :: term(), Q1 :: queue()) -> Q2 :: queue().
+-spec cons(Item, Q1 :: queue(Item)) -> Q2 :: queue(Item).
cons(X, Q) ->
in_r(X, Q).
@@ -431,7 +432,7 @@ cons(X, Q) ->
%% Return the first element in the queue
%%
%% O(1) since the queue is supposed to be well formed
--spec head(Q :: queue()) -> Item :: term().
+-spec head(Q :: queue(Item)) -> Item.
head({[],[]}=Q) ->
erlang:error(empty, [Q]);
head({R,F}) when is_list(R), is_list(F) ->
@@ -441,7 +442,7 @@ head(Q) ->
%% Remove head element and return resulting queue
%%
--spec tail(Q1 :: queue()) -> Q2 :: queue().
+-spec tail(Q1 :: queue(Item)) -> Q2 :: queue(Item).
tail(Q) ->
drop(Q).
@@ -449,22 +450,22 @@ tail(Q) ->
%% Cons to tail
%%
--spec snoc(Q1 :: queue(), Item :: term()) -> Q2 :: queue().
+-spec snoc(Q1 :: queue(Item), Item) -> Q2 :: queue(Item).
snoc(Q, X) ->
in(X, Q).
%% Return last element
--spec daeh(Q :: queue()) -> Item :: term().
+-spec daeh(Q :: queue(Item)) -> Item.
daeh(Q) -> get_r(Q).
--spec last(Q :: queue()) -> Item :: term().
+-spec last(Q :: queue(Item)) -> Item.
last(Q) -> get_r(Q).
%% Remove last element and return resulting queue
--spec liat(Q1 :: queue()) -> Q2 :: queue().
+-spec liat(Q1 :: queue(Item)) -> Q2 :: queue(Item).
liat(Q) -> drop_r(Q).
--spec lait(Q1 :: queue()) -> Q2 :: queue().
+-spec lait(Q1 :: queue(Item)) -> Q2 :: queue(Item).
lait(Q) -> drop_r(Q). %% Oops, mis-spelled 'tail' reversed. Forget this one.
--spec init(Q1 :: queue()) -> Q2 :: queue().
+-spec init(Q1 :: queue(Item)) -> Q2 :: queue(Item).
init(Q) -> drop_r(Q).
%%--------------------------------------------------------------------------
diff --git a/lib/stdlib/src/re.erl b/lib/stdlib/src/re.erl
index afc63496d0..7f3cd8f592 100644
--- a/lib/stdlib/src/re.erl
+++ b/lib/stdlib/src/re.erl
@@ -1,7 +1,7 @@
%%
%% %CopyrightBegin%
%%
-%% Copyright Ericsson AB 2008-2012. All Rights Reserved.
+%% Copyright Ericsson AB 2008-2014. 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
@@ -19,7 +19,6 @@
-module(re).
-export([grun/3,urun/3,ucompile/2,replace/3,replace/4,split/2,split/3]).
-%-opaque mp() :: {re_pattern, _, _, _, _}.
-type mp() :: {re_pattern, _, _, _, _}.
-type nl_spec() :: cr | crlf | lf | anycrlf | any.
diff --git a/lib/stdlib/src/sets.erl b/lib/stdlib/src/sets.erl
index ebf011a7d9..167a676281 100644
--- a/lib/stdlib/src/sets.erl
+++ b/lib/stdlib/src/sets.erl
@@ -1,7 +1,7 @@
%%
%% %CopyrightBegin%
%%
-%% Copyright Ericsson AB 2000-2013. All Rights Reserved.
+%% Copyright Ericsson AB 2000-2014. 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
@@ -43,6 +43,8 @@
-export([subtract/2,is_subset/2]).
-export([fold/3,filter/2]).
+-export_type([set/0, set/1]).
+
%% Note: mk_seg/1 must be changed too if seg_size is changed.
-define(seg_size, 16).
-define(max_seg, 32).
@@ -53,8 +55,8 @@
%%------------------------------------------------------------------------------
--type seg() :: tuple().
--type segs() :: tuple().
+-type seg() :: tuple().
+-type segs(_Element) :: tuple().
%% Define a hash set. The default values are the standard ones.
-record(set,
@@ -65,14 +67,12 @@
exp_size=?exp_size :: non_neg_integer(), % Size to expand at
con_size=?con_size :: non_neg_integer(), % Size to contract at
empty :: seg(), % Empty segment
- segs :: segs() % Segments
+ segs :: segs(_) % Segments
}).
-%% A declaration equivalent to the following one is hard-coded in erl_types.
-%% That declaration contains hard-coded information about the #set{}
-%% record and the types of its fields. So, please make sure that any
-%% changes to its structure are also propagated to erl_types.erl.
-%%
-%% -opaque set() :: #set{}.
+
+-opaque set() :: set(_).
+
+-opaque set(Element) :: #set{segs :: segs(Element)}.
%%------------------------------------------------------------------------------
@@ -98,24 +98,23 @@ size(S) -> S#set.size.
%% to_list(Set) -> [Elem].
%% Return the elements in Set as a list.
-spec to_list(Set) -> List when
- Set :: set(),
- List :: [term()].
+ Set :: set(Element),
+ List :: [Element].
to_list(S) ->
fold(fun (Elem, List) -> [Elem|List] end, [], S).
%% from_list([Elem]) -> Set.
%% Build a set from the elements in List.
-spec from_list(List) -> Set when
- List :: [term()],
- Set :: set().
+ List :: [Element],
+ Set :: set(Element).
from_list(L) ->
lists:foldl(fun (E, S) -> add_element(E, S) end, new(), L).
%% is_element(Element, Set) -> boolean().
%% Return 'true' if Element is an element of Set, else 'false'.
-spec is_element(Element, Set) -> boolean() when
- Element :: term(),
- Set :: set().
+ Set :: set(Element).
is_element(E, S) ->
Slot = get_slot(S, E),
Bkt = get_bucket(S, Slot),
@@ -124,9 +123,8 @@ is_element(E, S) ->
%% add_element(Element, Set) -> Set.
%% Return Set with Element inserted in it.
-spec add_element(Element, Set1) -> Set2 when
- Element :: term(),
- Set1 :: set(),
- Set2 :: set().
+ Set1 :: set(Element),
+ Set2 :: set(Element).
add_element(E, S0) ->
Slot = get_slot(S0, E),
{S1,Ic} = on_bucket(fun (B0) -> add_bkt_el(E, B0, B0) end, S0, Slot),
@@ -141,9 +139,8 @@ add_bkt_el(E, [], Bkt) -> {[E|Bkt],1}.
%% del_element(Element, Set) -> Set.
%% Return Set but with Element removed.
-spec del_element(Element, Set1) -> Set2 when
- Element :: term(),
- Set1 :: set(),
- Set2 :: set().
+ Set1 :: set(Element),
+ Set2 :: set(Element).
del_element(E, S0) ->
Slot = get_slot(S0, E),
{S1,Dc} = on_bucket(fun (B0) -> del_bkt_el(E, B0) end, S0, Slot),
@@ -159,9 +156,9 @@ del_bkt_el(_, []) -> {[],0}.
%% union(Set1, Set2) -> Set
%% Return the union of Set1 and Set2.
-spec union(Set1, Set2) -> Set3 when
- Set1 :: set(),
- Set2 :: set(),
- Set3 :: set().
+ Set1 :: set(Element),
+ Set2 :: set(Element),
+ Set3 :: set(Element).
union(S1, S2) when S1#set.size < S2#set.size ->
fold(fun (E, S) -> add_element(E, S) end, S2, S1);
union(S1, S2) ->
@@ -170,14 +167,14 @@ union(S1, S2) ->
%% union([Set]) -> Set
%% Return the union of the list of sets.
-spec union(SetList) -> Set when
- SetList :: [set()],
- Set :: set().
+ SetList :: [set(Element)],
+ Set :: set(Element).
union([S1,S2|Ss]) ->
union1(union(S1, S2), Ss);
union([S]) -> S;
union([]) -> new().
--spec union1(set(), [set()]) -> set().
+-spec union1(set(E), [set(E)]) -> set(E).
union1(S1, [S2|Ss]) ->
union1(union(S1, S2), Ss);
union1(S1, []) -> S1.
@@ -185,9 +182,9 @@ union1(S1, []) -> S1.
%% intersection(Set1, Set2) -> Set.
%% Return the intersection of Set1 and Set2.
-spec intersection(Set1, Set2) -> Set3 when
- Set1 :: set(),
- Set2 :: set(),
- Set3 :: set().
+ Set1 :: set(Element),
+ Set2 :: set(Element),
+ Set3 :: set(Element).
intersection(S1, S2) when S1#set.size < S2#set.size ->
filter(fun (E) -> is_element(E, S2) end, S1);
intersection(S1, S2) ->
@@ -196,13 +193,13 @@ intersection(S1, S2) ->
%% intersection([Set]) -> Set.
%% Return the intersection of the list of sets.
-spec intersection(SetList) -> Set when
- SetList :: [set(),...],
- Set :: set().
+ SetList :: [set(Element),...],
+ Set :: set(Element).
intersection([S1,S2|Ss]) ->
intersection1(intersection(S1, S2), Ss);
intersection([S]) -> S.
--spec intersection1(set(), [set()]) -> set().
+-spec intersection1(set(E), [set(E)]) -> set(E).
intersection1(S1, [S2|Ss]) ->
intersection1(intersection(S1, S2), Ss);
intersection1(S1, []) -> S1.
@@ -210,8 +207,8 @@ intersection1(S1, []) -> S1.
%% is_disjoint(Set1, Set2) -> boolean().
%% Check whether Set1 and Set2 are disjoint.
-spec is_disjoint(Set1, Set2) -> boolean() when
- Set1 :: set(),
- Set2 :: set().
+ Set1 :: set(Element),
+ Set2 :: set(Element).
is_disjoint(S1, S2) when S1#set.size < S2#set.size ->
fold(fun (_, false) -> false;
(E, true) -> not is_element(E, S2)
@@ -225,9 +222,9 @@ is_disjoint(S1, S2) ->
%% Return all and only the elements of Set1 which are not also in
%% Set2.
-spec subtract(Set1, Set2) -> Set3 when
- Set1 :: set(),
- Set2 :: set(),
- Set3 :: set().
+ Set1 :: set(Element),
+ Set2 :: set(Element),
+ Set3 :: set(Element).
subtract(S1, S2) ->
filter(fun (E) -> not is_element(E, S2) end, S1).
@@ -235,34 +232,34 @@ subtract(S1, S2) ->
%% Return 'true' when every element of Set1 is also a member of
%% Set2, else 'false'.
-spec is_subset(Set1, Set2) -> boolean() when
- Set1 :: set(),
- Set2 :: set().
+ Set1 :: set(Element),
+ Set2 :: set(Element).
is_subset(S1, S2) ->
fold(fun (E, Sub) -> Sub andalso is_element(E, S2) end, true, S1).
%% fold(Fun, Accumulator, Set) -> Accumulator.
%% Fold function Fun over all elements in Set and return Accumulator.
-spec fold(Function, Acc0, Set) -> Acc1 when
- Function :: fun((E :: term(),AccIn) -> AccOut),
- Set :: set(),
- Acc0 :: T,
- Acc1 :: T,
- AccIn :: T,
- AccOut :: T.
+ Function :: fun((Element, AccIn) -> AccOut),
+ Set :: set(Element),
+ Acc0 :: Acc,
+ Acc1 :: Acc,
+ AccIn :: Acc,
+ AccOut :: Acc.
fold(F, Acc, D) -> fold_set(F, Acc, D).
%% filter(Fun, Set) -> Set.
%% Filter Set with Fun.
-spec filter(Pred, Set1) -> Set2 when
- Pred :: fun((E :: term()) -> boolean()),
- Set1 :: set(),
- Set2 :: set().
+ Pred :: fun((Element) -> boolean()),
+ Set1 :: set(Element),
+ Set2 :: set(Element).
filter(F, D) -> filter_set(F, D).
%% get_slot(Hashdb, Key) -> Slot.
%% Get the slot. First hash on the new range, if we hit a bucket
%% which has not been split use the unsplit buddy bucket.
--spec get_slot(set(), term()) -> non_neg_integer().
+-spec get_slot(set(E), E) -> non_neg_integer().
get_slot(T, Key) ->
H = erlang:phash(Key, T#set.maxn),
if
@@ -276,8 +273,8 @@ get_bucket(T, Slot) -> get_bucket_s(T#set.segs, Slot).
%% on_bucket(Fun, Hashdb, Slot) -> {NewHashDb,Result}.
%% Apply Fun to the bucket in Slot and replace the returned bucket.
--spec on_bucket(fun((_) -> {[_], 0 | 1}), set(), non_neg_integer()) ->
- {set(), 0 | 1}.
+-spec on_bucket(fun((_) -> {[_], 0 | 1}), set(E), non_neg_integer()) ->
+ {set(E), 0 | 1}.
on_bucket(F, T, Slot) ->
SegI = ((Slot-1) div ?seg_size) + 1,
BktI = ((Slot-1) rem ?seg_size) + 1,
@@ -351,7 +348,7 @@ put_bucket_s(Segs, Slot, Bkt) ->
Seg = setelement(BktI, element(SegI, Segs), Bkt),
setelement(SegI, Segs, Seg).
--spec maybe_expand(set(), 0 | 1) -> set().
+-spec maybe_expand(set(E), 0 | 1) -> set(E).
maybe_expand(T0, Ic) when T0#set.size + Ic > T0#set.exp_size ->
T = maybe_expand_segs(T0), %Do we need more segments.
N = T#set.n + 1, %Next slot to expand into
@@ -369,14 +366,14 @@ maybe_expand(T0, Ic) when T0#set.size + Ic > T0#set.exp_size ->
segs = Segs2};
maybe_expand(T, Ic) -> T#set{size = T#set.size + Ic}.
--spec maybe_expand_segs(set()) -> set().
+-spec maybe_expand_segs(set(E)) -> set(E).
maybe_expand_segs(T) when T#set.n =:= T#set.maxn ->
T#set{maxn = 2 * T#set.maxn,
bso = 2 * T#set.bso,
segs = expand_segs(T#set.segs, T#set.empty)};
maybe_expand_segs(T) -> T.
--spec maybe_contract(set(), non_neg_integer()) -> set().
+-spec maybe_contract(set(E), non_neg_integer()) -> set(E).
maybe_contract(T, Dc) when T#set.size - Dc < T#set.con_size,
T#set.n > ?seg_size ->
N = T#set.n,
@@ -395,7 +392,7 @@ maybe_contract(T, Dc) when T#set.size - Dc < T#set.con_size,
segs = Segs2});
maybe_contract(T, Dc) -> T#set{size = T#set.size - Dc}.
--spec maybe_contract_segs(set()) -> set().
+-spec maybe_contract_segs(set(E)) -> set(E).
maybe_contract_segs(T) when T#set.n =:= T#set.bso ->
T#set{maxn = T#set.maxn div 2,
bso = T#set.bso div 2,
@@ -422,7 +419,7 @@ mk_seg(16) -> {[],[],[],[],[],[],[],[],[],[],[],[],[],[],[],[]}.
%% of segments. We special case the powers of 2 upto 32, this should
%% catch most case. N.B. the last element in the segments tuple is
%% an extra element containing a default empty segment.
--spec expand_segs(segs(), seg()) -> segs().
+-spec expand_segs(segs(E), seg()) -> segs(E).
expand_segs({B1}, Empty) ->
{B1,Empty};
expand_segs({B1,B2}, Empty) ->
@@ -440,7 +437,7 @@ expand_segs(Segs, Empty) ->
list_to_tuple(tuple_to_list(Segs)
++ lists:duplicate(tuple_size(Segs), Empty)).
--spec contract_segs(segs()) -> segs().
+-spec contract_segs(segs(E)) -> segs(E).
contract_segs({B1,_}) ->
{B1};
contract_segs({B1,B2,_,_}) ->
diff --git a/lib/stdlib/src/slave.erl b/lib/stdlib/src/slave.erl
index 3e647635bc..1898dc8aba 100644
--- a/lib/stdlib/src/slave.erl
+++ b/lib/stdlib/src/slave.erl
@@ -290,7 +290,10 @@ register_unique_name(Number) ->
%% no need to use rsh.
mk_cmd(Host, Name, Args, Waiter, Prog0) ->
- Prog = quote_progname(Prog0),
+ Prog = case os:type() of
+ {ose,_} -> mk_ose_prog(Prog0);
+ _ -> quote_progname(Prog0)
+ end,
BasicCmd = lists:concat([Prog,
" -detached -noinput -master ", node(),
" ", long_or_short(), Name, "@", Host,
@@ -310,6 +313,24 @@ mk_cmd(Host, Name, Args, Waiter, Prog0) ->
end
end.
+%% On OSE we have to pass the beam arguments directory to the slave
+%% process. To find out what arguments that should be passed on we
+%% make an assumption. All arguments after the last "--" should be
+%% skipped. So given these arguments:
+%% -Muycs256 -A 1 -- -root /mst/ -progname beam.debug.smp -- -home /mst/ -- -kernel inetrc '"/mst/inetrc.conf"' -- -name test@localhost
+%% we send
+%% -Muycs256 -A 1 -- -root /mst/ -progname beam.debug.smp -- -home /mst/ -- -kernel inetrc '"/mst/inetrc.conf"' --
+%% to the slave with whatever other args that are added in mk_cmd.
+mk_ose_prog(Prog) ->
+ SkipTail = fun("--",[]) ->
+ ["--"];
+ (_,[]) ->
+ [];
+ (Arg,Args) ->
+ [Arg," "|Args]
+ end,
+ [Prog,tl(lists:foldr(SkipTail,[],erlang:system_info(emu_args)))].
+
%% This is an attempt to distinguish between spaces in the program
%% path and spaces that separate arguments. The program is quoted to
%% allow spaces in the path.
diff --git a/lib/stdlib/src/sofs.erl b/lib/stdlib/src/sofs.erl
index 34eb224647..0bd67db100 100644
--- a/lib/stdlib/src/sofs.erl
+++ b/lib/stdlib/src/sofs.erl
@@ -1,7 +1,7 @@
%%
%% %CopyrightBegin%
%%
-%% Copyright Ericsson AB 2001-2011. All Rights Reserved.
+%% Copyright Ericsson AB 2001-2014. 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
@@ -1509,7 +1509,7 @@ family_projection(SetFun, F) when ?IS_SET(F) ->
%%%
-spec(family_to_digraph(Family) -> Graph when
- Graph :: digraph(),
+ Graph :: digraph:graph(),
Family :: family()).
family_to_digraph(F) when ?IS_SET(F) ->
case ?TYPE(F) of
@@ -1519,7 +1519,7 @@ family_to_digraph(F) when ?IS_SET(F) ->
end.
-spec(family_to_digraph(Family, GraphType) -> Graph when
- Graph :: digraph(),
+ Graph :: digraph:graph(),
Family :: family(),
GraphType :: [digraph:d_type()]).
family_to_digraph(F, Type) when ?IS_SET(F) ->
@@ -1541,7 +1541,7 @@ family_to_digraph(F, Type) when ?IS_SET(F) ->
end.
-spec(digraph_to_family(Graph) -> Family when
- Graph :: digraph(),
+ Graph :: digraph:graph(),
Family :: family()).
digraph_to_family(G) ->
case catch digraph_family(G) of
@@ -1550,7 +1550,7 @@ digraph_to_family(G) ->
end.
-spec(digraph_to_family(Graph, Type) -> Family when
- Graph :: digraph(),
+ Graph :: digraph:graph(),
Family :: family(),
Type :: type()).
digraph_to_family(G, T) ->
diff --git a/lib/stdlib/src/stdlib.app.src b/lib/stdlib/src/stdlib.app.src
index a30685e830..d388410de0 100644
--- a/lib/stdlib/src/stdlib.app.src
+++ b/lib/stdlib/src/stdlib.app.src
@@ -71,6 +71,7 @@
lib,
lists,
log_mf_h,
+ maps,
math,
ms_transform,
orddict,
@@ -101,5 +102,8 @@
{registered,[timer_server,rsh_starter,take_over_monitor,pool_master,
dets]},
{applications, [kernel]},
- {env, []}]}.
+ {env, []},
+ {runtime_dependencies, ["sasl-2.4","kernel-3.0","erts-6.0","crypto-3.3",
+ "compiler-5.0"]}
+]}.
diff --git a/lib/stdlib/src/stdlib.appup.src b/lib/stdlib/src/stdlib.appup.src
index 749a9a4201..22eefb2514 100644
--- a/lib/stdlib/src/stdlib.appup.src
+++ b/lib/stdlib/src/stdlib.appup.src
@@ -1,7 +1,7 @@
%% -*- erlang -*-
%% %CopyrightBegin%
%%
-%% Copyright Ericsson AB 1999-2013. All Rights Reserved.
+%% Copyright Ericsson AB 1999-2014. 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
@@ -16,12 +16,10 @@
%%
%% %CopyrightEnd%
{"%VSN%",
- %% Up from - max two major revisions back
+ %% Up from - max one major revision back
[{<<"2\\.0(\\.[0-9]+)*">>,[restart_new_emulator]}, %% R17
- {<<"1\\.19(\\.[0-9]+)*">>,[restart_new_emulator]}, %% R16
- {<<"1\\.18(\\.[0-9]+)*">>,[restart_new_emulator]}],%% R15
- %% Down to - max two major revisions back
+ {<<"1\\.19(\\.[0-9]+)*">>,[restart_new_emulator]}],%% R16
+ %% Down to - max one major revision back
[{<<"2\\.0(\\.[0-9]+)*">>,[restart_new_emulator]}, %% R17
- {<<"1\\.19(\\.[0-9]+)*">>,[restart_new_emulator]}, %% R16
- {<<"1\\.18(\\.[0-9]+)*">>,[restart_new_emulator]}] %% R15
+ {<<"1\\.19(\\.[0-9]+)*">>,[restart_new_emulator]}] %% R16
}.
diff --git a/lib/stdlib/src/supervisor.erl b/lib/stdlib/src/supervisor.erl
index d18387568d..ede2742875 100644
--- a/lib/stdlib/src/supervisor.erl
+++ b/lib/stdlib/src/supervisor.erl
@@ -1,7 +1,7 @@
%%
%% %CopyrightBegin%
%%
-%% Copyright Ericsson AB 1996-2013. All Rights Reserved.
+%% Copyright Ericsson AB 1996-2014. 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
@@ -45,10 +45,13 @@
-type restart() :: 'permanent' | 'transient' | 'temporary'.
-type shutdown() :: 'brutal_kill' | timeout().
-type worker() :: 'worker' | 'supervisor'.
--type sup_name() :: {'local', Name :: atom()} | {'global', Name :: atom()}.
+-type sup_name() :: {'local', Name :: atom()}
+ | {'global', Name :: atom()}
+ | {'via', Module :: module(), Name :: any()}.
-type sup_ref() :: (Name :: atom())
| {Name :: atom(), Node :: node()}
| {'global', Name :: atom()}
+ | {'via', Module :: module(), Name :: any()}
| pid().
-type child_spec() :: {Id :: child_id(),
StartFunc :: mfargs(),
@@ -74,14 +77,15 @@
modules = [] :: modules()}).
-type child_rec() :: #child{}.
--define(DICT, dict).
+-define(DICTS, dict).
+-define(DICT, dict:dict).
-define(SETS, sets).
--define(SET, set).
+-define(SET, sets:set).
-record(state, {name,
strategy :: strategy(),
children = [] :: [child_rec()],
- dynamics :: ?DICT() | ?SET(),
+ dynamics :: ?DICT(pid(), list()) | ?SET(pid()),
intensity :: non_neg_integer(),
period :: pos_integer(),
restarts = [],
@@ -441,7 +445,7 @@ handle_call(which_children, _From, #state{children = [#child{restart_type = RTyp
State) when ?is_simple(State) ->
Reply = lists:map(fun({?restarting(_),_}) -> {undefined,restarting,CT,Mods};
({Pid, _}) -> {undefined, Pid, CT, Mods} end,
- ?DICT:to_list(dynamics_db(RType, State#state.dynamics))),
+ ?DICTS:to_list(dynamics_db(RType, State#state.dynamics))),
{reply, Reply, State};
handle_call(which_children, _From, State) ->
@@ -480,7 +484,7 @@ handle_call(count_children, _From, #state{children = [#child{restart_type = RTy
child_type = CT}]} = State)
when ?is_simple(State) ->
{Active, Count} =
- ?DICT:fold(fun(Pid, _Val, {Alive, Tot}) ->
+ ?DICTS:fold(fun(Pid, _Val, {Alive, Tot}) ->
case is_pid(Pid) andalso is_process_alive(Pid) of
true ->
{Alive+1, Tot +1};
@@ -774,17 +778,17 @@ restart(Child, State) ->
restart(simple_one_for_one, Child, State) ->
#child{pid = OldPid, mfargs = {M, F, A}} = Child,
- Dynamics = ?DICT:erase(OldPid, dynamics_db(Child#child.restart_type,
+ Dynamics = ?DICTS:erase(OldPid, dynamics_db(Child#child.restart_type,
State#state.dynamics)),
case do_start_child_i(M, F, A) of
{ok, Pid} ->
- NState = State#state{dynamics = ?DICT:store(Pid, A, Dynamics)},
+ NState = State#state{dynamics = ?DICTS:store(Pid, A, Dynamics)},
{ok, NState};
{ok, Pid, _Extra} ->
- NState = State#state{dynamics = ?DICT:store(Pid, A, Dynamics)},
+ NState = State#state{dynamics = ?DICTS:store(Pid, A, Dynamics)},
{ok, NState};
{error, Error} ->
- NState = State#state{dynamics = ?DICT:store(restarting(OldPid), A,
+ NState = State#state{dynamics = ?DICTS:store(restarting(OldPid), A,
Dynamics)},
report_error(start_error, Error, Child, State#state.name),
{try_again, NState}
@@ -977,7 +981,7 @@ terminate_dynamic_children(Child, Dynamics, SupName) ->
wait_dynamic_children(Child, Pids, Sz, TRef, EStack0)
end,
%% Unroll stacked errors and report them
- ?DICT:fold(fun(Reason, Ls, _) ->
+ ?DICTS:fold(fun(Reason, Ls, _) ->
report_error(shutdown_error, Reason,
Child#child{pid=Ls}, SupName)
end, ok, EStack).
@@ -991,22 +995,22 @@ monitor_dynamic_children(#child{restart_type=temporary}, Dynamics) ->
{error, normal} ->
{Pids, EStack};
{error, Reason} ->
- {Pids, ?DICT:append(Reason, P, EStack)}
+ {Pids, ?DICTS:append(Reason, P, EStack)}
end
- end, {?SETS:new(), ?DICT:new()}, Dynamics);
+ end, {?SETS:new(), ?DICTS:new()}, Dynamics);
monitor_dynamic_children(#child{restart_type=RType}, Dynamics) ->
- ?DICT:fold(fun(P, _, {Pids, EStack}) when is_pid(P) ->
+ ?DICTS:fold(fun(P, _, {Pids, EStack}) when is_pid(P) ->
case monitor_child(P) of
ok ->
{?SETS:add_element(P, Pids), EStack};
{error, normal} when RType =/= permanent ->
{Pids, EStack};
{error, Reason} ->
- {Pids, ?DICT:append(Reason, P, EStack)}
+ {Pids, ?DICTS:append(Reason, P, EStack)}
end;
(?restarting(_), _, {Pids, EStack}) ->
{Pids, EStack}
- end, {?SETS:new(), ?DICT:new()}, Dynamics).
+ end, {?SETS:new(), ?DICTS:new()}, Dynamics).
wait_dynamic_children(_Child, _Pids, 0, undefined, EStack) ->
@@ -1030,7 +1034,7 @@ wait_dynamic_children(#child{shutdown=brutal_kill} = Child, Pids, Sz,
{'DOWN', _MRef, process, Pid, Reason} ->
wait_dynamic_children(Child, ?SETS:del_element(Pid, Pids), Sz-1,
- TRef, ?DICT:append(Reason, Pid, EStack))
+ TRef, ?DICTS:append(Reason, Pid, EStack))
end;
wait_dynamic_children(#child{restart_type=RType} = Child, Pids, Sz,
TRef, EStack) ->
@@ -1045,7 +1049,7 @@ wait_dynamic_children(#child{restart_type=RType} = Child, Pids, Sz,
{'DOWN', _MRef, process, Pid, Reason} ->
wait_dynamic_children(Child, ?SETS:del_element(Pid, Pids), Sz-1,
- TRef, ?DICT:append(Reason, Pid, EStack));
+ TRef, ?DICTS:append(Reason, Pid, EStack));
{timeout, TRef, kill} ->
?SETS:fold(fun(P, _) -> exit(P, kill) end, ok, Pids),
@@ -1070,12 +1074,12 @@ save_child(Child, #state{children = Children} = State) ->
save_dynamic_child(temporary, Pid, _, #state{dynamics = Dynamics} = State) ->
State#state{dynamics = ?SETS:add_element(Pid, dynamics_db(temporary, Dynamics))};
save_dynamic_child(RestartType, Pid, Args, #state{dynamics = Dynamics} = State) ->
- State#state{dynamics = ?DICT:store(Pid, Args, dynamics_db(RestartType, Dynamics))}.
+ State#state{dynamics = ?DICTS:store(Pid, Args, dynamics_db(RestartType, Dynamics))}.
dynamics_db(temporary, undefined) ->
?SETS:new();
dynamics_db(_, undefined) ->
- ?DICT:new();
+ ?DICTS:new();
dynamics_db(_,Dynamics) ->
Dynamics.
@@ -1084,14 +1088,14 @@ dynamic_child_args(Pid, Dynamics) ->
true ->
{ok, undefined};
false ->
- ?DICT:find(Pid, Dynamics)
+ ?DICTS:find(Pid, Dynamics)
end.
state_del_child(#child{pid = Pid, restart_type = temporary}, State) when ?is_simple(State) ->
NDynamics = ?SETS:del_element(Pid, dynamics_db(temporary, State#state.dynamics)),
State#state{dynamics = NDynamics};
state_del_child(#child{pid = Pid, restart_type = RType}, State) when ?is_simple(State) ->
- NDynamics = ?DICT:erase(Pid, dynamics_db(RType, State#state.dynamics)),
+ NDynamics = ?DICTS:erase(Pid, dynamics_db(RType, State#state.dynamics)),
State#state{dynamics = NDynamics};
state_del_child(Child, State) ->
NChildren = del_child(Child#child.name, State#state.children),
@@ -1154,7 +1158,7 @@ is_dynamic_pid(Pid, Dynamics) ->
true ->
?SETS:is_element(Pid, Dynamics);
false ->
- ?DICT:is_key(Pid, Dynamics)
+ ?DICTS:is_key(Pid, Dynamics)
end.
replace_child(Child, State) ->
diff --git a/lib/stdlib/src/supervisor_bridge.erl b/lib/stdlib/src/supervisor_bridge.erl
index e8405ab9a4..ff4502f0b9 100644
--- a/lib/stdlib/src/supervisor_bridge.erl
+++ b/lib/stdlib/src/supervisor_bridge.erl
@@ -101,7 +101,16 @@ handle_cast(_, State) ->
{noreply, State}.
handle_info({'EXIT', Pid, Reason}, State) when State#state.pid =:= Pid ->
- report_error(child_terminated, Reason, State),
+ case Reason of
+ normal ->
+ ok;
+ shutdown ->
+ ok;
+ {shutdown, _Term} ->
+ ok;
+ _ ->
+ report_error(child_terminated, Reason, State)
+ end,
{stop, Reason, State#state{pid = undefined}};
handle_info(_, State) ->
{noreply, State}.
diff --git a/lib/stdlib/src/sys.erl b/lib/stdlib/src/sys.erl
index 04f8dfb61b..e25cc25f57 100644
--- a/lib/stdlib/src/sys.erl
+++ b/lib/stdlib/src/sys.erl
@@ -102,20 +102,31 @@ get_status(Name, Timeout) -> send_system_msg(Name, get_status, Timeout).
-spec get_state(Name) -> State when
Name :: name(),
State :: term().
-get_state(Name) -> send_system_msg(Name, get_state).
+get_state(Name) ->
+ case send_system_msg(Name, get_state) of
+ {error, Reason} -> error(Reason);
+ State -> State
+ end.
-spec get_state(Name, Timeout) -> State when
Name :: name(),
Timeout :: timeout(),
State :: term().
-get_state(Name, Timeout) -> send_system_msg(Name, get_state, Timeout).
+get_state(Name, Timeout) ->
+ case send_system_msg(Name, get_state, Timeout) of
+ {error, Reason} -> error(Reason);
+ State -> State
+ end.
-spec replace_state(Name, StateFun) -> NewState when
Name :: name(),
StateFun :: fun((State :: term()) -> NewState :: term()),
NewState :: term().
replace_state(Name, StateFun) ->
- send_system_msg(Name, {replace_state, StateFun}).
+ case send_system_msg(Name, {replace_state, StateFun}) of
+ {error, Reason} -> error(Reason);
+ State -> State
+ end.
-spec replace_state(Name, StateFun, Timeout) -> NewState when
Name :: name(),
@@ -123,7 +134,10 @@ replace_state(Name, StateFun) ->
Timeout :: timeout(),
NewState :: term().
replace_state(Name, StateFun, Timeout) ->
- send_system_msg(Name, {replace_state, StateFun}, Timeout).
+ case send_system_msg(Name, {replace_state, StateFun}, Timeout) of
+ {error, Reason} -> error(Reason);
+ State -> State
+ end.
-spec change_code(Name, Module, OldVsn, Extra) -> 'ok' | {error, Reason} when
Name :: name(),
@@ -390,10 +404,11 @@ do_cmd(_, suspend, _Parent, _Mod, Debug, Misc) ->
{suspended, ok, Debug, Misc};
do_cmd(_, resume, _Parent, _Mod, Debug, Misc) ->
{running, ok, Debug, Misc};
-do_cmd(SysState, get_state, _Parent, _Mod, Debug, {State, Misc}) ->
- {SysState, State, Debug, Misc};
-do_cmd(SysState, replace_state, _Parent, _Mod, Debug, {State, Misc}) ->
- {SysState, State, Debug, Misc};
+do_cmd(SysState, get_state, _Parent, Mod, Debug, Misc) ->
+ {SysState, do_get_state(Mod, Misc), Debug, Misc};
+do_cmd(SysState, {replace_state, StateFun}, _Parent, Mod, Debug, Misc) ->
+ {Res, NMisc} = do_replace_state(StateFun, Mod, Misc),
+ {SysState, Res, Debug, NMisc};
do_cmd(SysState, get_status, Parent, Mod, Debug, Misc) ->
Res = get_status(SysState, Parent, Mod, Debug, Misc),
{SysState, Res, Debug, Misc};
@@ -407,6 +422,40 @@ do_cmd(suspended, {change_code, Module, Vsn, Extra}, _Parent,
do_cmd(SysState, Other, _Parent, _Mod, Debug, Misc) ->
{SysState, {error, {unknown_system_msg, Other}}, Debug, Misc}.
+do_get_state(Mod, Misc) ->
+ case erlang:function_exported(Mod, system_get_state, 1) of
+ true ->
+ try
+ {ok, State} = Mod:system_get_state(Misc),
+ State
+ catch
+ Cl:Exc ->
+ {error, {callback_failed,{Mod,system_get_state},{Cl,Exc}}}
+ end;
+ false ->
+ Misc
+ end.
+
+do_replace_state(StateFun, Mod, Misc) ->
+ case erlang:function_exported(Mod, system_replace_state, 2) of
+ true ->
+ try
+ {ok, State, NMisc} = Mod:system_replace_state(StateFun, Misc),
+ {State, NMisc}
+ catch
+ Cl:Exc ->
+ {{error, {callback_failed,{Mod,system_replace_state},{Cl,Exc}}}, Misc}
+ end;
+ false ->
+ try
+ NMisc = StateFun(Misc),
+ {NMisc, NMisc}
+ catch
+ Cl:Exc ->
+ {{error, {callback_failed,StateFun,{Cl,Exc}}}, Misc}
+ end
+ end.
+
get_status(SysState, Parent, Mod, Debug, Misc) ->
PDict = get(),
FmtMisc =
diff --git a/lib/stdlib/src/zip.erl b/lib/stdlib/src/zip.erl
index c40ce8e203..b768c6d0b9 100644
--- a/lib/stdlib/src/zip.erl
+++ b/lib/stdlib/src/zip.erl
@@ -203,8 +203,18 @@
zip_comment_length}).
--type zip_file() :: #zip_file{}.
+-type create_option() :: memory | cooked | verbose | {comment, string()}
+ | {cwd, file:filename()}
+ | {compress, extension_spec()}
+ | {uncompress, extension_spec()}.
+-type extension() :: string().
+-type extension_spec() :: all | [extension()] | {add, [extension()]} | {del, [extension()]}.
+-type filename() :: file:filename().
+
-type zip_comment() :: #zip_comment{}.
+-type zip_file() :: #zip_file{}.
+
+-export_type([create_option/0, filename/0]).
%% Open a zip archive with options
%%
@@ -340,13 +350,13 @@ unzip(F) -> unzip(F, []).
-spec(unzip(Archive, Options) -> RetValue when
Archive :: file:name() | binary(),
Options :: [Option],
- Option :: {file_list, FileList}
+ Option :: {file_list, FileList} | cooked
| keep_old_files | verbose | memory |
{file_filter, FileFilter} | {cwd, CWD},
FileList :: [file:name()],
FileBinList :: [{file:name(),binary()}],
FileFilter :: fun((ZipFile) -> boolean()),
- CWD :: string(),
+ CWD :: file:filename(),
ZipFile :: zip_file(),
RetValue :: {ok, FileList}
| {ok, FileBinList}
@@ -430,7 +440,7 @@ zip(F, Files) -> zip(F, Files, []).
What :: all | [Extension] | {add, [Extension]} | {del, [Extension]},
Extension :: string(),
Comment :: string(),
- CWD :: string(),
+ CWD :: file:filename(),
RetValue :: {ok, FileName :: file:name()}
| {ok, {FileName :: file:name(), binary()}}
| {error, Reason :: term()}).
@@ -712,8 +722,8 @@ table(F, O) -> list_dir(F, O).
FileList :: [FileSpec],
FileSpec :: file:name() | {file:name(), binary()}
| {file:name(), binary(), file:file_info()},
- RetValue :: {ok, FileName :: file:name()}
- | {ok, {FileName :: file:name(), binary()}}
+ RetValue :: {ok, FileName :: filename()}
+ | {ok, {FileName :: filename(), binary()}}
| {error, Reason :: term()}).
create(F, Fs) -> zip(F, Fs).
@@ -724,14 +734,9 @@ create(F, Fs) -> zip(F, Fs).
FileSpec :: file:name() | {file:name(), binary()}
| {file:name(), binary(), file:file_info()},
Options :: [Option],
- Option :: memory | cooked | verbose | {comment, Comment}
- | {cwd, CWD} | {compress, What} | {uncompress, What},
- What :: all | [Extension] | {add, [Extension]} | {del, [Extension]},
- Extension :: string(),
- Comment :: string(),
- CWD :: string(),
- RetValue :: {ok, FileName :: file:name()}
- | {ok, {FileName :: file:name(), binary()}}
+ Option :: create_option(),
+ RetValue :: {ok, FileName :: filename()}
+ | {ok, {FileName :: filename(), binary()}}
| {error, Reason :: term()}).
create(F, Fs, O) -> zip(F, Fs, O).
@@ -755,7 +760,7 @@ extract(F) -> unzip(F).
FileList :: [file:name()],
FileBinList :: [{file:name(),binary()}],
FileFilter :: fun((ZipFile) -> boolean()),
- CWD :: string(),
+ CWD :: file:filename(),
ZipFile :: zip_file(),
RetValue :: {ok, FileList}
| {ok, FileBinList}
@@ -1153,7 +1158,7 @@ zip_open(Archive) -> zip_open(Archive, []).
Archive :: file:name() | binary(),
ZipHandle :: pid(),
Options :: [Option],
- Option :: cooked | memory | {cwd, CWD :: string()},
+ Option :: cooked | memory | {cwd, CWD :: file:filename()},
Reason :: term()).
zip_open(Archive, Options) ->
diff --git a/lib/stdlib/test/Makefile b/lib/stdlib/test/Makefile
index af82f22b21..a271229c59 100644
--- a/lib/stdlib/test/Makefile
+++ b/lib/stdlib/test/Makefile
@@ -73,6 +73,8 @@ MODULES= \
supervisor_SUITE \
supervisor_bridge_SUITE \
sys_SUITE \
+ sys_sp1 \
+ sys_sp2 \
tar_SUITE \
timer_SUITE \
timer_simple_SUITE \
@@ -83,7 +85,8 @@ MODULES= \
zip_SUITE \
random_unicode_list \
random_iolist \
- error_logger_forwarder
+ error_logger_forwarder \
+ maps_SUITE
ERL_FILES= $(MODULES:%=%.erl)
diff --git a/lib/stdlib/test/binary_module_SUITE.erl b/lib/stdlib/test/binary_module_SUITE.erl
index d5a0fe21b4..32cec0db6f 100644
--- a/lib/stdlib/test/binary_module_SUITE.erl
+++ b/lib/stdlib/test/binary_module_SUITE.erl
@@ -1,7 +1,7 @@
%%
%% %CopyrightBegin%
%%
-%% Copyright Ericsson AB 1997-2013. All Rights Reserved.
+%% Copyright Ericsson AB 1997-2014. 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
@@ -40,7 +40,7 @@
-export([init_per_testcase/2, end_per_testcase/2]).
% Default timetrap timeout (set in init_per_testcase).
% Some of these testcases are really heavy...
--define(default_timeout, ?t:minutes(20)).
+-define(default_timeout, ?t:minutes(30)).
-endif.
diff --git a/lib/stdlib/test/dets_SUITE.erl b/lib/stdlib/test/dets_SUITE.erl
index 059d553b00..6be37cbecf 100644
--- a/lib/stdlib/test/dets_SUITE.erl
+++ b/lib/stdlib/test/dets_SUITE.erl
@@ -1,7 +1,7 @@
%%
%% %CopyrightBegin%
%%
-%% Copyright Ericsson AB 1996-2013. All Rights Reserved.
+%% Copyright Ericsson AB 1996-2014. 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
@@ -52,7 +52,7 @@
simultaneous_open/1, insert_new/1, repair_continuation/1,
otp_5487/1, otp_6206/1, otp_6359/1, otp_4738/1, otp_7146/1,
otp_8070/1, otp_8856/1, otp_8898/1, otp_8899/1, otp_8903/1,
- otp_8923/1, otp_9282/1, otp_11245/1]).
+ otp_8923/1, otp_9282/1, otp_11245/1, otp_11709/1]).
-export([dets_dirty_loop/0]).
@@ -109,7 +109,7 @@ all() ->
many_clients, otp_4906, otp_5402, simultaneous_open,
insert_new, repair_continuation, otp_5487, otp_6206,
otp_6359, otp_4738, otp_7146, otp_8070, otp_8856, otp_8898,
- otp_8899, otp_8903, otp_8923, otp_9282, otp_11245
+ otp_8899, otp_8903, otp_8923, otp_9282, otp_11245, otp_11709
].
groups() ->
@@ -772,9 +772,9 @@ open_1(Config, V) ->
crash(Fname, TypePos),
{error, {invalid_type_code,Fname}} = dets:open_file(Fname),
truncate(Fname, HeadSize - 10),
- {error, {tooshort,Fname}} = dets:open_file(Fname),
- {ok, TabRef} = dets:open_file(TabRef, [{file,Fname},{version,V}]),
- ok = dets:close(TabRef),
+ {error,{not_a_dets_file,Fname}} = dets:open_file(Fname),
+ {error,{not_a_dets_file,Fname}} =
+ dets:open_file(TabRef, [{file,Fname},{version,V}]),
file:delete(Fname),
{error,{file_error,{foo,bar},_}} = dets:is_dets_file({foo,bar}),
@@ -967,10 +967,12 @@ fast_init_table(Config) ->
{'EXIT', _} =
(catch dets:init_table(TabRef, fun(foo) -> bar end, {format,bchunk})),
dets:close(TabRef),
+ file:delete(Fname),
{ok, _} = dets:open_file(TabRef, Args),
{'EXIT', _} = (catch dets:init_table(TabRef, fun() -> foo end,
{format,bchunk})),
dets:close(TabRef),
+ file:delete(Fname),
{ok, _} = dets:open_file(TabRef, Args),
{'EXIT', {badarg, _}} =
(catch dets:init_table(TabRef, nofun, {format,bchunk})),
@@ -979,10 +981,12 @@ fast_init_table(Config) ->
away = (catch dets:init_table(TabRef, fun(_) -> throw(away) end,
{format,bchunk})),
dets:close(TabRef),
+ file:delete(Fname),
{ok, _} = dets:open_file(TabRef, Args),
{error, {init_fun, fopp}} =
dets:init_table(TabRef, fun(read) -> fopp end, {format,bchunk}),
dets:close(TabRef),
+ file:delete(Fname),
{ok, _} = dets:open_file(TabRef, Args),
dets:safe_fixtable(TabRef, true),
{error, {fixed_table, TabRef}} =
@@ -1389,23 +1393,6 @@ repair(Config, V) ->
{ok, TabRef} = dets:open_file(TabRef, [{file,Fname},{version,V}]),
ok = ins(TabRef, 100),
ok = dets:close(TabRef),
- truncate(Fname, HeadSize - 10),
- %% a new file is created ('tooshort')
- {ok, TabRef} = dets:open_file(TabRef,
- [{file,Fname},{version,V},
- {min_no_slots,1000},
- {max_no_slots,1000000}]),
- case dets:info(TabRef, no_slots) of
- undefined -> ok;
- {Min1,Slot1,Max1} ->
- true = Min1 =< Slot1, true = Slot1 =< Max1,
- true = 1000 < Min1, true = 1000+256 > Min1,
- true = 1000000 < Max1, true = (1 bsl 20)+256 > Max1
- end,
- 0 = dets:info(TabRef, size),
- no_keys_test(TabRef),
- _ = histogram(TabRef, silent),
- ok = dets:close(TabRef),
file:delete(Fname),
%% version bump (v8)
@@ -3920,19 +3907,52 @@ otp_11245(Config) when is_list(Config) ->
file:delete(File),
ok.
+otp_11709(doc) ->
+ ["OTP-11709. Bugfixes."];
+otp_11709(suite) ->
+ [];
+otp_11709(Config) when is_list(Config) ->
+ Short = <<"foo">>,
+ Long = <<"a sufficiently long text">>,
+
+ %% Bug: leaking file descriptor
+ P0 = pps(),
+ File = filename(otp_11709, Config),
+ ok = file:write_file(File, Long),
+ false = dets:is_dets_file(File),
+ check_pps(P0),
+
+ %% Bug: deleting file
+ Args = [[{access, A}, {repair, R}] ||
+ A <- [read, read_write],
+ R <- [true, false, force]],
+ Fun1 = fun(S, As) ->
+ P1 = pps(),
+ ok = file:write_file(File, S),
+ {error,{not_a_dets_file,File}} = dets:open_file(File, As),
+ {ok, S} = file:read_file(File),
+ check_pps(P1)
+ end,
+ Fun2 = fun(S) ->
+ _ = [Fun1(S, As) || As <- Args],
+ ok
+ end,
+ ok = Fun2(Long), % no change here
+ ok = Fun2(Short), % mimic the behaviour for longer files
+
+ %% open_file/1
+ ok = file:write_file(File, Long),
+ {error,{not_a_dets_file,File}} = dets:open_file(File), % no change
+ ok = file:write_file(File, Short),
+ {error,{not_a_dets_file,File}} = dets:open_file(File), % mimic
+
+ _ = file:delete(File),
+ ok.
+
%%
%% Parts common to several test cases
%%
-start_node_rel(Name, Rel, How) ->
- Release = [{release, atom_to_list(Rel)}],
- Pa = filename:dirname(code:which(?MODULE)),
- test_server:start_node(Name, How,
- [{args,
- " -kernel net_setuptime 100 "
- " -pa " ++ Pa},
- {erl, Release}]).
-
crash(File, Where) ->
crash(File, Where, 10).
@@ -4323,7 +4343,7 @@ check_badarg({'EXIT', {badarg, [{M,F,Args,_} | _]}}, M, F, Args) ->
check_badarg({'EXIT', {badarg, [{M,F,A,_} | _]}}, M, F, Args) ->
true = test_server:is_native(M) andalso length(Args) =:= A.
-check_pps(P0) ->
+check_pps({Ports0,Procs0} = P0) ->
case pps() of
P0 ->
ok;
@@ -4335,22 +4355,28 @@ check_pps(P0) ->
case pps() of
P0 ->
ok;
- P1 ->
- io:format("failure, got ~p~n, expected ~p\n", [P1, P0]),
- {Ports0,Procs0} = P0,
- {Ports1,Procs1} = P1,
- show("Old ports", Ports0 -- Ports1),
- show("New ports", Ports1 -- Ports0),
- show("Old procs", Procs0 -- Procs1),
- show("New procs", Procs1 -- Procs0),
- ?t:fail()
- end
+ {Ports1,Procs1} = P1 ->
+ case {Ports1 -- Ports0, Procs1 -- Procs0} of
+ {[], []} -> ok;
+ {PortsDiff,ProcsDiff} ->
+ io:format("failure, got ~p~n, expected ~p\n", [P1, P0]),
+ show("Old port", Ports0 -- Ports1),
+ show("New port", PortsDiff),
+ show("Old proc", Procs0 -- Procs1),
+ show("New proc", ProcsDiff),
+ ?t:fail()
+ end
+ end
end.
show(_S, []) ->
ok;
-show(S, L) ->
- io:format("~s: ~p~n", [S, L]).
+show(S, [Pid|Pids]) when is_pid(Pid) ->
+ io:format("~s: ~p~n", [S, erlang:process_info(Pid)]),
+ show(S, Pids);
+show(S, [Port|Ports]) when is_port(Port)->
+ io:format("~s: ~p~n", [S, erlang:port_info(Port)]),
+ show(S, Ports).
pps() ->
dets:start(),
diff --git a/lib/stdlib/test/edlin_expand_SUITE.erl b/lib/stdlib/test/edlin_expand_SUITE.erl
index 0cd2688e2e..43c980e994 100644
--- a/lib/stdlib/test/edlin_expand_SUITE.erl
+++ b/lib/stdlib/test/edlin_expand_SUITE.erl
@@ -26,11 +26,11 @@
-include_lib("test_server/include/test_server.hrl").
-% Default timetrap timeout (set in init_per_testcase).
+%% Default timetrap timeout (set in init_per_testcase).
-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),
@@ -67,20 +67,21 @@ normal(doc) ->
normal(suite) ->
[];
normal(Config) when is_list(Config) ->
- ?line {module,expand_test} = c:l(expand_test),
- % These tests might fail if another module with the prefix "expand_" happens
- % to also be loaded.
- ?line {yes, "test:", []} = edlin_expand:expand(lists:reverse("expand_")),
- ?line {no, [], []} = edlin_expand:expand(lists:reverse("expandXX_")),
- ?line {no,[],
- [{"a_fun_name",1},
- {"a_less_fun_name",1},
- {"b_comes_after_a",1},
- {"module_info",0},
- {"module_info",1}]} = edlin_expand:expand(lists:reverse("expand_test:")),
- ?line {yes,[],[{"a_fun_name",1},
- {"a_less_fun_name",1}]} = edlin_expand:expand(
- lists:reverse("expand_test:a_")),
+ {module,expand_test} = c:l(expand_test),
+ %% These tests might fail if another module with the prefix
+ %% "expand_" happens to also be loaded.
+ {yes, "test:", []} = do_expand("expand_"),
+ {no, [], []} = do_expand("expandXX_"),
+ {no,[],
+ [{"a_fun_name",1},
+ {"a_less_fun_name",1},
+ {"b_comes_after_a",1},
+ {"expand0arity_entirely",0},
+ {"module_info",0},
+ {"module_info",1}]} = do_expand("expand_test:"),
+ {yes,[],[{"a_fun_name",1},
+ {"a_less_fun_name",1}]} = do_expand("expand_test:a_"),
+ {yes,"arity_entirely()",[]} = do_expand("expand_test:expand0"),
ok.
quoted_fun(doc) ->
@@ -88,38 +89,35 @@ quoted_fun(doc) ->
quoted_fun(suite) ->
[];
quoted_fun(Config) when is_list(Config) ->
- ?line {module,expand_test} = c:l(expand_test),
- ?line {module,expand_test1} = c:l(expand_test1),
+ {module,expand_test} = c:l(expand_test),
+ {module,expand_test1} = c:l(expand_test1),
%% should be no colon after test this time
- ?line {yes, "test", []} = edlin_expand:expand(lists:reverse("expand_")),
- ?line {no, [], []} = edlin_expand:expand(lists:reverse("expandXX_")),
- ?line {no,[],[{"'#weird-fun-name'",0},
- {"'Quoted_fun_name'",0},
- {"'Quoted_fun_too'",0},
- {"a_fun_name",1},
- {"a_less_fun_name",1},
- {"b_comes_after_a",1},
- {"module_info",0},
- {"module_info",1}]} = edlin_expand:expand(
- lists:reverse("expand_test1:")),
- ?line {yes,"_",[]} = edlin_expand:expand(
- lists:reverse("expand_test1:a")),
- ?line {yes,[],[{"a_fun_name",1},
- {"a_less_fun_name",1}]} = edlin_expand:expand(
- lists:reverse("expand_test1:a_")),
- ?line {yes,[],
- [{"'#weird-fun-name'",0},
+ {yes, "test", []} = do_expand("expand_"),
+ {no, [], []} = do_expand("expandXX_"),
+ {no,[],[{"'#weird-fun-name'",1},
{"'Quoted_fun_name'",0},
- {"'Quoted_fun_too'",0}]} = edlin_expand:expand(
- lists:reverse("expand_test1:'")),
- ?line {yes,"uoted_fun_",[]} = edlin_expand:expand(
- lists:reverse("expand_test1:'Q")),
- ?line {yes,[],
- [{"'Quoted_fun_name'",0},
- {"'Quoted_fun_too'",0}]} = edlin_expand:expand(
- lists:reverse("expand_test1:'Quoted_fun_")),
- ?line {yes,"weird-fun-name'(",[]} = edlin_expand:expand(
- lists:reverse("expand_test1:'#")),
+ {"'Quoted_fun_too'",0},
+ {"a_fun_name",1},
+ {"a_less_fun_name",1},
+ {"b_comes_after_a",1},
+ {"module_info",0},
+ {"module_info",1}]} = do_expand("expand_test1:"),
+ {yes,"_",[]} = do_expand("expand_test1:a"),
+ {yes,[],[{"a_fun_name",1},
+ {"a_less_fun_name",1}]} = do_expand("expand_test1:a_"),
+ {yes,[],
+ [{"'#weird-fun-name'",1},
+ {"'Quoted_fun_name'",0},
+ {"'Quoted_fun_too'",0}]} = do_expand("expand_test1:'"),
+ {yes,"uoted_fun_",[]} = do_expand("expand_test1:'Q"),
+ {yes,[],
+ [{"'Quoted_fun_name'",0},
+ {"'Quoted_fun_too'",0}]} = do_expand("expand_test1:'Quoted_fun_"),
+ {yes,"weird-fun-name'(",[]} = do_expand("expand_test1:'#"),
+
+ %% Since there is a module_info/1 as well as a module_info/0
+ %% there should not be a closing parenthesis added.
+ {yes,"(",[]} = do_expand("expand_test:module_info"),
ok.
quoted_module(doc) ->
@@ -127,51 +125,46 @@ quoted_module(doc) ->
quoted_module(suite) ->
[];
quoted_module(Config) when is_list(Config) ->
- ?line {module,'ExpandTestCaps'} = c:l('ExpandTestCaps'),
- ?line {yes, "Caps':", []} = edlin_expand:expand(lists:reverse("'ExpandTest")),
- ?line {no,[],
- [{"a_fun_name",1},
- {"a_less_fun_name",1},
- {"b_comes_after_a",1},
- {"module_info",0},
- {"module_info",1}]} = edlin_expand:expand(lists:reverse("'ExpandTestCaps':")),
- ?line {yes,[],[{"a_fun_name",1},
- {"a_less_fun_name",1}]} = edlin_expand:expand(
- lists:reverse("'ExpandTestCaps':a_")),
+ {module,'ExpandTestCaps'} = c:l('ExpandTestCaps'),
+ {yes, "Caps':", []} = do_expand("'ExpandTest"),
+ {no,[],
+ [{"a_fun_name",1},
+ {"a_less_fun_name",1},
+ {"b_comes_after_a",1},
+ {"module_info",0},
+ {"module_info",1}]} = do_expand("'ExpandTestCaps':"),
+ {yes,[],[{"a_fun_name",1},
+ {"a_less_fun_name",1}]} = do_expand("'ExpandTestCaps':a_"),
ok.
quoted_both(suite) ->
[];
quoted_both(Config) when is_list(Config) ->
- ?line {module,'ExpandTestCaps'} = c:l('ExpandTestCaps'),
- ?line {module,'ExpandTestCaps1'} = c:l('ExpandTestCaps1'),
+ {module,'ExpandTestCaps'} = c:l('ExpandTestCaps'),
+ {module,'ExpandTestCaps1'} = c:l('ExpandTestCaps1'),
%% should be no colon (or quote) after test this time
- ?line {yes, "Caps", []} = edlin_expand:expand(lists:reverse("'ExpandTest")),
- ?line {no,[],[{"'#weird-fun-name'",0},
- {"'Quoted_fun_name'",0},
- {"'Quoted_fun_too'",0},
- {"a_fun_name",1},
- {"a_less_fun_name",1},
- {"b_comes_after_a",1},
- {"module_info",0},
- {"module_info",1}]} = edlin_expand:expand(
- lists:reverse("'ExpandTestCaps1':")),
- ?line {yes,"_",[]} = edlin_expand:expand(
- lists:reverse("'ExpandTestCaps1':a")),
- ?line {yes,[],[{"a_fun_name",1},
- {"a_less_fun_name",1}]} = edlin_expand:expand(
- lists:reverse("'ExpandTestCaps1':a_")),
- ?line {yes,[],
- [{"'#weird-fun-name'",0},
+ {yes, "Caps", []} = do_expand("'ExpandTest"),
+ {no,[],[{"'#weird-fun-name'",0},
{"'Quoted_fun_name'",0},
- {"'Quoted_fun_too'",0}]} = edlin_expand:expand(
- lists:reverse("'ExpandTestCaps1':'")),
- ?line {yes,"uoted_fun_",[]} = edlin_expand:expand(
- lists:reverse("'ExpandTestCaps1':'Q")),
- ?line {yes,[],
- [{"'Quoted_fun_name'",0},
- {"'Quoted_fun_too'",0}]} = edlin_expand:expand(
- lists:reverse("'ExpandTestCaps1':'Quoted_fun_")),
- ?line {yes,"weird-fun-name'(",[]} = edlin_expand:expand(
- lists:reverse("'ExpandTestCaps1':'#")),
+ {"'Quoted_fun_too'",0},
+ {"a_fun_name",1},
+ {"a_less_fun_name",1},
+ {"b_comes_after_a",1},
+ {"module_info",0},
+ {"module_info",1}]} = do_expand("'ExpandTestCaps1':"),
+ {yes,"_",[]} = do_expand("'ExpandTestCaps1':a"),
+ {yes,[],[{"a_fun_name",1},
+ {"a_less_fun_name",1}]} = do_expand("'ExpandTestCaps1':a_"),
+ {yes,[],
+ [{"'#weird-fun-name'",0},
+ {"'Quoted_fun_name'",0},
+ {"'Quoted_fun_too'",0}]} = do_expand("'ExpandTestCaps1':'"),
+ {yes,"uoted_fun_",[]} = do_expand("'ExpandTestCaps1':'Q"),
+ {yes,[],
+ [{"'Quoted_fun_name'",0},
+ {"'Quoted_fun_too'",0}]} = do_expand("'ExpandTestCaps1':'Quoted_fun_"),
+ {yes,"weird-fun-name'()",[]} = do_expand("'ExpandTestCaps1':'#"),
ok.
+
+do_expand(String) ->
+ edlin_expand:expand(lists:reverse(String)).
diff --git a/lib/stdlib/test/epp_SUITE.erl b/lib/stdlib/test/epp_SUITE.erl
index 0cbdf76270..b17e8bd186 100644
--- a/lib/stdlib/test/epp_SUITE.erl
+++ b/lib/stdlib/test/epp_SUITE.erl
@@ -1,7 +1,7 @@
%%
%% %CopyrightBegin%
%%
-%% Copyright Ericsson AB 1998-2013. All Rights Reserved.
+%% Copyright Ericsson AB 1998-2014. 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
@@ -25,7 +25,8 @@
variable_1/1, otp_4870/1, otp_4871/1, otp_5362/1,
pmod/1, not_circular/1, skip_header/1, otp_6277/1, otp_7702/1,
otp_8130/1, overload_mac/1, otp_8388/1, otp_8470/1, otp_8503/1,
- otp_8562/1, otp_8665/1, otp_8911/1, otp_10302/1, otp_10820/1]).
+ otp_8562/1, otp_8665/1, otp_8911/1, otp_10302/1, otp_10820/1,
+ otp_11728/1, encoding/1]).
-export([epp_parse_erl_form/2]).
@@ -67,7 +68,8 @@ all() ->
{group, variable}, otp_4870, otp_4871, otp_5362, pmod,
not_circular, skip_header, otp_6277, otp_7702, otp_8130,
overload_mac, otp_8388, otp_8470, otp_8503, otp_8562,
- otp_8665, otp_8911, otp_10302, otp_10820].
+ otp_8665, otp_8911, otp_10302, otp_10820, otp_11728,
+ encoding].
groups() ->
[{upcase_mac, [], [upcase_mac_1, upcase_mac_2]},
@@ -122,10 +124,22 @@ include_local(Config) when is_list(Config) ->
%%% regular epp:parse_file, the test case will time out, and then epp
%%% server will go on growing until we dump core.
epp_parse_file(File, Inc, Predef) ->
- {ok, Epp} = epp:open(File, Inc, Predef),
+ List = do_epp_parse_file(fun() ->
+ epp:open(File, Inc, Predef)
+ end),
+ List = do_epp_parse_file(fun() ->
+ Opts = [{name, File},
+ {includes, Inc},
+ {macros, Predef}],
+ epp:open(Opts)
+ end),
+ {ok, List}.
+
+do_epp_parse_file(Open) ->
+ {ok, Epp} = Open(),
List = collect_epp_forms(Epp),
epp:close(Epp),
- {ok, List}.
+ List.
collect_epp_forms(Epp) ->
Result = epp_parse_erl_form(Epp),
@@ -1387,6 +1401,88 @@ do_otp_10820(File, C, PC) ->
true = test_server:stop_node(Node),
ok.
+otp_11728(doc) ->
+ ["OTP-11728. Bugfix circular macro."];
+otp_11728(suite) ->
+ [];
+otp_11728(Config) when is_list(Config) ->
+ Dir = ?config(priv_dir, Config),
+ H = <<"-define(MACRO,[[]++?MACRO]).">>,
+ HrlFile = filename:join(Dir, "otp_11728.hrl"),
+ ok = file:write_file(HrlFile, H),
+ C = <<"-module(otp_11728).
+ -compile(export_all).
+
+ -include(\"otp_11728.hrl\").
+
+ function_name()->
+ A=?MACRO, % line 7
+ ok">>,
+ ErlFile = filename:join(Dir, "otp_11728.erl"),
+ ok = file:write_file(ErlFile, C),
+ {ok, L} = epp:parse_file(ErlFile, [Dir], []),
+ true = lists:member({error,{7,epp,{circular,'MACRO',none}}}, L),
+ _ = file:delete(HrlFile),
+ _ = file:delete(ErlFile),
+ ok.
+
+%% Check the new API for setting the default encoding.
+encoding(Config) when is_list(Config) ->
+ Dir = ?config(priv_dir, Config),
+ ErlFile = filename:join(Dir, "encoding.erl"),
+
+ %% Try a latin-1 file with no encoding given.
+ C1 = <<"-module(encoding).
+ %% ",246,"
+ ">>,
+ ok = file:write_file(ErlFile, C1),
+ {ok,[{attribute,1,file,_},
+ {attribute,1,module,encoding},
+ {error,_},
+ {error,{2,epp,cannot_parse}},
+ {eof,2}]} = epp:parse_file(ErlFile, []),
+ {ok,[{attribute,1,file,_},
+ {attribute,1,module,encoding},
+ {eof,3}]} =
+ epp:parse_file(ErlFile, [{default_encoding,latin1}]),
+ {ok,[{attribute,1,file,_},
+ {attribute,1,module,encoding},
+ {eof,3}],[{encoding,none}]} =
+ epp:parse_file(ErlFile, [{default_encoding,latin1},extra]),
+
+ %% Try a latin-1 file with encoding given in a comment.
+ C2 = <<"-module(encoding).
+ %% encoding: latin-1
+ %% ",246,"
+ ">>,
+ ok = file:write_file(ErlFile, C2),
+ {ok,[{attribute,1,file,_},
+ {attribute,1,module,encoding},
+ {eof,4}]} =
+ epp:parse_file(ErlFile, []),
+ {ok,[{attribute,1,file,_},
+ {attribute,1,module,encoding},
+ {eof,4}]} =
+ epp:parse_file(ErlFile, [{default_encoding,latin1}]),
+ {ok,[{attribute,1,file,_},
+ {attribute,1,module,encoding},
+ {eof,4}]} =
+ epp:parse_file(ErlFile, [{default_encoding,utf8}]),
+ {ok,[{attribute,1,file,_},
+ {attribute,1,module,encoding},
+ {eof,4}],[{encoding,latin1}]} =
+ epp:parse_file(ErlFile, [extra]),
+ {ok,[{attribute,1,file,_},
+ {attribute,1,module,encoding},
+ {eof,4}],[{encoding,latin1}]} =
+ epp:parse_file(ErlFile, [{default_encoding,latin1},extra]),
+ {ok,[{attribute,1,file,_},
+ {attribute,1,module,encoding},
+ {eof,4}],[{encoding,latin1}]} =
+ epp:parse_file(ErlFile, [{default_encoding,utf8},extra]),
+ ok.
+
+
check(Config, Tests) ->
eval_tests(Config, fun check_test/2, Tests).
diff --git a/lib/stdlib/test/erl_eval_SUITE.erl b/lib/stdlib/test/erl_eval_SUITE.erl
index c4b6b35e72..b55324161b 100644
--- a/lib/stdlib/test/erl_eval_SUITE.erl
+++ b/lib/stdlib/test/erl_eval_SUITE.erl
@@ -25,7 +25,7 @@
match_bin/1,
string_plusplus/1,
pattern_expr/1,
- guard_3/1, guard_4/1,
+ guard_3/1, guard_4/1, guard_5/1,
lc/1,
simple_cases/1,
unary_plus/1,
@@ -42,7 +42,8 @@
try_catch/1,
eval_expr_5/1,
zero_width/1,
- eep37/1]).
+ eep37/1,
+ eep43/1]).
%%
%% Define to run outside of test server
@@ -78,11 +79,11 @@ suite() -> [{ct_hooks,[ts_install_cth]}].
all() ->
[guard_1, guard_2, match_pattern, string_plusplus,
- pattern_expr, match_bin, guard_3, guard_4, lc,
+ pattern_expr, match_bin, guard_3, guard_4, guard_5, lc,
simple_cases, unary_plus, apply_atom, otp_5269,
otp_6539, otp_6543, otp_6787, otp_6977, otp_7550,
otp_8133, otp_10622, funs, try_catch, eval_expr_5, zero_width,
- eep37].
+ eep37, eep43].
groups() ->
[].
@@ -247,6 +248,20 @@ guard_4(Config) when is_list(Config) ->
false),
ok.
+guard_5(doc) ->
+ ["Guards with erlang:'=='/2"];
+guard_5(suite) ->
+ [];
+guard_5(Config) when is_list(Config) ->
+ {ok,Tokens ,_} =
+ erl_scan:string("case 1 of A when erlang:'=='(A, 1) -> true end."),
+ {ok, [Expr]} = erl_parse:parse_exprs(Tokens),
+ true = guard_5_compiled(),
+ {value, true, [{'A',1}]} = erl_eval:expr(Expr, []),
+ ok.
+
+guard_5_compiled() ->
+ case 1 of A when erlang:'=='(A, 1) -> true end.
lc(doc) ->
["OTP-4518."];
@@ -1424,6 +1439,29 @@ eep37(Config) when is_list(Config) ->
720),
ok.
+eep43(Config) when is_list(Config) ->
+ check(fun () -> #{} end, " #{}.", #{}),
+ check(fun () -> #{a => b} end, "#{a => b}.", #{a => b}),
+ check(fun () ->
+ Map = #{a => b},
+ {Map#{a := b},Map#{a => c},Map#{d => e}}
+ end,
+ "begin "
+ " Map = #{a => B=b}, "
+ " {Map#{a := B},Map#{a => c},Map#{d => e}} "
+ "end.",
+ {#{a => b},#{a => c},#{a => b,d => e}}),
+ check(fun () ->
+ lists:map(fun (X) -> X#{price := 0} end,
+ [#{hello => 0, price => nil}])
+ end,
+ "lists:map(fun (X) -> X#{price := 0} end,
+ [#{hello => 0, price => nil}]).",
+ [#{hello => 0, price => 0}]),
+ error_check("[camembert]#{}.", {badarg,[camembert]}),
+ error_check("#{} = 1.", {badmatch,1}),
+ ok.
+
%% Check the string in different contexts: as is; in fun; from compiled code.
check(F, String, Result) ->
check1(F, String, Result),
diff --git a/lib/stdlib/test/erl_expand_records_SUITE.erl b/lib/stdlib/test/erl_expand_records_SUITE.erl
index 94b4397a9c..43e679f7ed 100644
--- a/lib/stdlib/test/erl_expand_records_SUITE.erl
+++ b/lib/stdlib/test/erl_expand_records_SUITE.erl
@@ -38,7 +38,7 @@
-export([attributes/1, expr/1, guard/1,
init/1, pattern/1, strict/1, update/1,
otp_5915/1, otp_7931/1, otp_5990/1,
- otp_7078/1, otp_7101/1]).
+ otp_7078/1, otp_7101/1, maps/1]).
% Default timetrap timeout (set in init_per_testcase).
-define(default_timeout, ?t:minutes(1)).
@@ -56,7 +56,7 @@ suite() -> [{ct_hooks,[ts_install_cth]}].
all() ->
[attributes, expr, guard, init,
- pattern, strict, update, {group, tickets}].
+ pattern, strict, update, maps, {group, tickets}].
groups() ->
[{tickets, [],
@@ -402,7 +402,22 @@ update(Config) when is_list(Config) ->
],
?line run(Config, Ts),
ok.
-
+
+maps(Config) when is_list(Config) ->
+ Ts = [<<"-record(rr, {a,b,c}).
+ t() ->
+ R0 = id(#rr{a=1,b=2,c=3}),
+ R1 = id(#rr{a=4,b=5,c=6}),
+ [{R0,R1}] =
+ maps:to_list(#{#rr{a=1,b=2,c=3} => #rr{a=4,b=5,c=6}}),
+ #{#rr{a=1,b=2,c=3} := #rr{a=1,b=2,c=3}} =
+ #{#rr{a=1,b=2,c=3} => R1}#{#rr{a=1,b=2,c=3} := R0},
+ ok.
+
+ id(X) -> X.
+ ">>],
+ run(Config, Ts, [strict_record_tests]),
+ ok.
otp_5915(doc) ->
"Strict record tests in guards.";
diff --git a/lib/stdlib/test/erl_lint_SUITE.erl b/lib/stdlib/test/erl_lint_SUITE.erl
index a71d7f3018..ea61b2082b 100644
--- a/lib/stdlib/test/erl_lint_SUITE.erl
+++ b/lib/stdlib/test/erl_lint_SUITE.erl
@@ -1,7 +1,7 @@
%%
%% %CopyrightBegin%
%%
-%% Copyright Ericsson AB 1999-2013. All Rights Reserved.
+%% Copyright Ericsson AB 1999-2014. 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
@@ -52,6 +52,7 @@
guard/1, otp_4886/1, otp_4988/1, otp_5091/1, otp_5276/1, otp_5338/1,
otp_5362/1, otp_5371/1, otp_7227/1, otp_5494/1, otp_5644/1, otp_5878/1,
otp_5917/1, otp_6585/1, otp_6885/1, otp_10436/1, otp_11254/1,
+ otp_11772/1, otp_11771/1, otp_11872/1,
export_all/1,
bif_clash/1,
behaviour_basic/1, behaviour_multiple/1,
@@ -60,7 +61,9 @@
format_warn/1,
on_load_successful/1, on_load_failing/1,
too_many_arguments/1,
- basic_errors/1,bin_syntax_errors/1
+ basic_errors/1,bin_syntax_errors/1,
+ predef/1,
+ maps/1,maps_type/1
]).
% Default timetrap timeout (set in init_per_testcase).
@@ -84,10 +87,12 @@ all() ->
unsized_binary_in_bin_gen_pattern,
otp_4886, otp_4988, otp_5091, otp_5276, otp_5338,
otp_5362, otp_5371, otp_7227, otp_5494, otp_5644,
- otp_5878, otp_5917, otp_6585, otp_6885, otp_10436, otp_11254,export_all,
+ otp_5878, otp_5917, otp_6585, otp_6885, otp_10436, otp_11254,
+ otp_11772, otp_11771, otp_11872, export_all,
bif_clash, behaviour_basic, behaviour_multiple,
otp_7550, otp_8051, format_warn, {group, on_load},
- too_many_arguments, basic_errors, bin_syntax_errors].
+ too_many_arguments, basic_errors, bin_syntax_errors, predef,
+ maps, maps_type].
groups() ->
[{unused_vars_warn, [],
@@ -1274,10 +1279,9 @@ guard(Config) when is_list(Config) ->
tuple.
">>,
[nowarn_obsolete_guard],
- {error,
+ {errors,
[{6,erl_lint,illegal_guard_expr},{18,erl_lint,illegal_guard_expr}],
- [{18,erl_lint,{removed,{erlang,is_constant,1},
- "Removed in R13B"}}]}},
+ []}},
{guard2,
<<"-record(apa,{}).
t1(A) when atom(A), atom(A) ->
@@ -1336,14 +1340,11 @@ guard(Config) when is_list(Config) ->
tuple.
">>,
[nowarn_obsolete_guard],
- {error,[{6,erl_lint,illegal_guard_expr},
- {6,erl_lint,illegal_guard_expr},
- {18,erl_lint,illegal_guard_expr},
- {18,erl_lint,illegal_guard_expr}],
- [{18,erl_lint,{removed,{erlang,is_constant,1},
- "Removed in R13B"}},
- {18,erl_lint,{removed,{erlang,is_constant,1},
- "Removed in R13B"}}]}},
+ {errors,[{6,erl_lint,illegal_guard_expr},
+ {6,erl_lint,illegal_guard_expr},
+ {18,erl_lint,illegal_guard_expr},
+ {18,erl_lint,illegal_guard_expr}],
+ []}},
{guard3,
<<"-record(apa,{}).
t2(A) when atom(A); atom(A) ->
@@ -1493,7 +1494,15 @@ guard(Config) when is_list(Config) ->
[],
{errors,[{1,erl_lint,illegal_guard_expr},
{2,erl_lint,illegal_guard_expr},
- {3,erl_lint,illegal_guard_expr}],[]}}
+ {3,erl_lint,illegal_guard_expr}],[]}},
+ {guard9,
+ <<"t(X, Y) when erlang:'andalso'(X, Y) -> ok;
+ t(X, Y) when erlang:'orelse'(X, Y) -> ok.
+ ">>,
+ [],
+ {errors,[{1,erl_lint,illegal_guard_expr},
+ {2,erl_lint,illegal_guard_expr}],
+ []}}
],
?line [] = run(Config, Ts1),
ok.
@@ -2552,7 +2561,7 @@ otp_10436(Config) when is_list(Config) ->
ok.
otp_11254(doc) ->
- "OTP-11254. Warnings for opaque types.";
+ "OTP-11254. M:F/A could crash the linter.";
otp_11254(suite) -> [];
otp_11254(Config) when is_list(Config) ->
Ts = <<"-module(p2).
@@ -2565,6 +2574,85 @@ otp_11254(Config) when is_list(Config) ->
run_test2(Config, Ts, []),
ok.
+otp_11772(doc) ->
+ "OTP-11772. Reintroduce errors for redefined builtin types.";
+otp_11772(suite) -> [];
+otp_11772(Config) when is_list(Config) ->
+ Ts = <<"
+ -module(newly).
+
+ -compile(export_all).
+
+ %% Built-in:
+ -type node() :: node().
+ -type mfa() :: tuple().
+ -type gb_tree() :: mfa(). % Allowed since Erlang/OTP 17.0
+ -type digraph() :: [_]. % Allowed since Erlang/OTP 17.0
+
+ -type t() :: mfa() | digraph() | gb_tree() | node().
+
+ -spec t() -> t().
+
+ t() ->
+ 1.
+ ">>,
+ {errors,[{7,erl_lint,{builtin_type,{node,0}}},
+ {8,erl_lint,{builtin_type,{mfa,0}}}],
+ []} = run_test2(Config, Ts, []),
+ ok.
+
+otp_11771(doc) ->
+ "OTP-11771. Do not allow redefinition of the types arity(_) &c..";
+otp_11771(suite) -> [];
+otp_11771(Config) when is_list(Config) ->
+ Ts = <<"
+ -module(newly).
+
+ -compile(export_all).
+
+ %% No longer allowed in 17.0:
+ -type arity() :: atom().
+ -type bitstring() :: list().
+ -type iodata() :: integer().
+ -type boolean() :: iodata().
+
+ -type t() :: arity() | bitstring() | iodata() | boolean().
+
+ -spec t() -> t().
+
+ t() ->
+ 1.
+ ">>,
+ {errors,[{7,erl_lint,{builtin_type,{arity,0}}},
+ {8,erl_lint,{builtin_type,{bitstring,0}}},
+ {9,erl_lint,{builtin_type,{iodata,0}}},
+ {10,erl_lint,{builtin_type,{boolean,0}}}],
+ []} = run_test2(Config, Ts, []),
+ ok.
+
+otp_11872(doc) ->
+ "OTP-11872. The type map() undefined when exported.";
+otp_11872(suite) -> [];
+otp_11872(Config) when is_list(Config) ->
+ Ts = <<"
+ -module(map).
+
+ -compile(export_all).
+
+ -export_type([map/0, product/0]).
+
+ -opaque map() :: dict().
+
+ -spec t() -> map().
+
+ t() ->
+ 1.
+ ">>,
+ {error,[{6,erl_lint,{undefined_type,{product,0}}}],
+ [{8,erl_lint,{new_var_arity_type,map}}]} =
+ run_test2(Config, Ts, []),
+ ok.
+
export_all(doc) ->
"OTP-7392. Warning for export_all.";
export_all(Config) when is_list(Config) ->
@@ -2827,7 +2915,24 @@ bif_clash(Config) when is_list(Config) ->
{6,erl_lint,{illegal_guard_local_call,{is_tuple,1}}},
{7,erl_lint,{illegal_guard_local_call,{is_list,1}}},
{8,erl_lint,{illegal_guard_local_call,{is_record,3}}},
- {9,erl_lint,{illegal_guard_local_call,{is_record,3}}}],[]}}
+ {9,erl_lint,{illegal_guard_local_call,{is_record,3}}}],[]}},
+ %% We can also suppress all auto imports at once
+ {clash22,
+ <<"-export([size/1, binary_part/2]).
+ -compile(no_auto_import).
+ size([]) ->
+ 0;
+ size({N,_}) ->
+ N;
+ size([_|T]) ->
+ 1+size(T).
+ binary_part({B,_},{X,Y}) ->
+ binary_part(B,{X,Y});
+ binary_part(B,{X,Y}) ->
+ binary:part(B,X,Y).
+ ">>,
+ [],
+ []}
],
?line [] = run(Config, Ts),
@@ -2859,7 +2964,15 @@ behaviour_basic(Config) when is_list(Config) ->
stop(_) -> ok.
">>,
[],
- []}
+ []},
+
+ {behaviour4,
+ <<"-behavior(application). %% Test callbacks with export_all
+ -compile(export_all).
+ stop(_) -> ok.
+ ">>,
+ [],
+ {warnings,[{1,erl_lint,{undefined_behaviour_func,{start,2},application}}]}}
],
?line [] = run(Config, Ts),
ok.
@@ -3216,6 +3329,151 @@ bin_syntax_errors(Config) ->
[] = run(Config, Ts),
ok.
+predef(doc) ->
+ "OTP-10342: Predefined types: array(), digraph(), and so on";
+predef(suite) -> [];
+predef(Config) when is_list(Config) ->
+ W = get_compilation_warnings(Config, "predef", []),
+ [] = W,
+ W2 = get_compilation_warnings(Config, "predef2", []),
+ Tag = deprecated_builtin_type,
+ [{7,erl_lint,{Tag,{array,0},{array,array,1},"OTP 18.0"}},
+ {12,erl_lint,{Tag,{dict,0},{dict,dict,2},"OTP 18.0"}},
+ {17,erl_lint,{Tag,{digraph,0},{digraph,graph},"OTP 18.0"}},
+ {27,erl_lint,{Tag,{gb_set,0},{gb_sets,set,1},"OTP 18.0"}},
+ {32,erl_lint,{Tag,{gb_tree,0},{gb_trees,tree,2},"OTP 18.0"}},
+ {37,erl_lint,{Tag,{queue,0},{queue,queue,1},"OTP 18.0"}},
+ {42,erl_lint,{Tag,{set,0},{sets,set,1},"OTP 18.0"}},
+ {47,erl_lint,{Tag,{tid,0},{ets,tid},"OTP 18.0"}}] = W2,
+ Ts = [{otp_10342_1,
+ <<"-compile(nowarn_deprecated_type).
+
+ -spec t(dict()) -> non_neg_integer().
+
+ t(D) ->
+ erlang:phash2(D, 3000).
+ ">>,
+ {[nowarn_unused_function]},
+ []},
+ {otp_10342_2,
+ <<"-spec t(dict()) -> non_neg_integer().
+
+ t(D) ->
+ erlang:phash2(D, 3000).
+ ">>,
+ {[nowarn_unused_function]},
+ {warnings,[{1,erl_lint,
+ {deprecated_builtin_type,{dict,0},{dict,dict,2},
+ "OTP 18.0"}}]}}],
+ [] = run(Config, Ts),
+ ok.
+
+maps(Config) ->
+ %% TODO: test key patterns, not done because map patterns are going to be
+ %% changed a lot.
+ Ts = [{illegal_map_construction,
+ <<"t() ->
+ #{ a := b,
+ c => d,
+ e := f
+ }#{ a := b,
+ c => d,
+ e := f };
+ t() when is_map(#{ a := b,
+ c => d
+ }#{ a := b,
+ c => d,
+ e := f }) ->
+ ok.
+ ">>,
+ [],
+ {errors,[{2,erl_lint,illegal_map_construction},
+ {4,erl_lint,illegal_map_construction},
+ {8,erl_lint,illegal_map_construction}],
+ []}},
+ {illegal_pattern,
+ <<"t(#{ a := A,
+ c => d,
+ e := F,
+ g := 1 + 1,
+ h := _,
+ i := (_X = _Y),
+ j := (x ! y) }) ->
+ {A,F}.
+ ">>,
+ [],
+ {errors,[{2,erl_lint,illegal_pattern},
+ {7,erl_lint,illegal_pattern}],
+ []}},
+ {error_in_illegal_map_construction,
+ <<"t() -> #{ a := X }.">>,
+ [],
+ {errors,[{1,erl_lint,illegal_map_construction},
+ {1,erl_lint,{unbound_var,'X'}}],
+ []}},
+ {errors_in_map_keys,
+ <<"t(V) -> #{ a => 1,
+ #{a=>V} => 2,
+ #{ \"hi\" => wazzup, hi => ho } => yep,
+ [try a catch _:_ -> b end] => nope,
+ ok => 1.0,
+ [3+3] => nope,
+ 1.0 => yep,
+ {3.0+3} => nope,
+ {yep} => yep,
+ [case a of a -> a end] => nope
+ }.
+ ">>,
+ [],
+ {errors,[{2,erl_lint,{illegal_map_key_variable,'V'}},
+ {4,erl_lint,illegal_map_key},
+ {6,erl_lint,illegal_map_key},
+ {8,erl_lint,illegal_map_key},
+ {10,erl_lint,illegal_map_key}],[]}},
+ {errors_in_map_keys_pattern,
+ <<"t(#{ a := 2,
+ #{} := A,
+ #{ 3 => 33 } := hi,
+ #{ 3 := 33 } := hi,
+ #{ hi => 54, \"hello\" => 45 } := hi,
+ #{ V => 33 } := hi }) ->
+ A.
+ ">>,
+ [],
+ {errors,[{4,erl_lint,illegal_map_key},
+ {6,erl_lint,{illegal_map_key_variable,'V'}}],[]}}],
+ [] = run(Config, Ts),
+ ok.
+
+maps_type(Config) when is_list(Config) ->
+ Ts = [
+ {maps_type1,
+ <<"
+ -type m() :: #{a => integer()}.
+ -spec t1(#{k=>term()}) -> {term(), map()}.
+
+ t1(#{k:=V}=M) -> {V,M}.
+
+ -spec t2(m()) -> integer().
+
+ t2(#{a:=V}) -> V.
+ ">>,
+ [],
+ []},
+ {maps_type2,
+ <<"
+ %% Built-in var arity map type:
+ -type map() :: tuple().
+ -type a() :: map().
+
+ -spec t(a()) -> a().
+ t(M) -> M.
+ ">>,
+ [],
+ {warnings,[{3,erl_lint,{new_var_arity_type,map}}]}}],
+ [] = run(Config, Ts),
+ ok.
+
run(Config, Tests) ->
F = fun({N,P,Ws,E}, BadL) ->
case catch run_test(Config, P, Ws) of
@@ -3238,8 +3496,10 @@ get_compilation_warnings(Conf, Filename, Warnings) ->
FileS = binary_to_list(Bin),
{match,[{Start,Length}|_]} = re:run(FileS, "-module.*\\n"),
Test = lists:nthtail(Start+Length, FileS),
- {warnings, Ws} = run_test(Conf, Test, Warnings),
- Ws.
+ case run_test(Conf, Test, Warnings) of
+ {warnings, Ws} -> Ws;
+ [] -> []
+ end.
%% Compiles a test module and returns the list of errors and warnings.
diff --git a/lib/stdlib/test/erl_lint_SUITE_data/predef.erl b/lib/stdlib/test/erl_lint_SUITE_data/predef.erl
new file mode 100644
index 0000000000..ee9073aa67
--- /dev/null
+++ b/lib/stdlib/test/erl_lint_SUITE_data/predef.erl
@@ -0,0 +1,67 @@
+-module(predef).
+
+-export([array/1, dict/1, digraph/1, digraph2/1, gb_set/1, gb_tree/1,
+ queue/1, set/1, tid/0, tid2/0]).
+
+-export_type([array/0, digraph/0, gb_set/0]).
+
+%% Before Erlang/OTP 17.0 local re-definitions of pre-defined opaque
+%% types were ignored but did not generate any warning.
+-opaque array() :: atom().
+-opaque digraph() :: atom().
+-opaque gb_set() :: atom().
+-type dict() :: atom().
+-type gb_tree() :: atom().
+-type queue() :: atom().
+-type set() :: atom().
+-type tid() :: atom().
+
+-spec array(array()) -> array:array().
+
+array(A) ->
+ array:relax(A).
+
+-spec dict(dict()) -> dict:dict().
+
+dict(D) ->
+ dict:store(1, a, D).
+
+-spec digraph(digraph()) -> [digraph:edge()].
+
+digraph(G) ->
+ digraph:edges(G).
+
+-spec digraph2(digraph:graph()) -> [digraph:edge()].
+
+digraph2(G) ->
+ digraph:edges(G).
+
+-spec gb_set(gb_set()) -> gb_sets:set().
+
+gb_set(S) ->
+ gb_sets:balance(S).
+
+-spec gb_tree(gb_tree()) -> gb_trees:tree().
+
+gb_tree(S) ->
+ gb_trees:balance(S).
+
+-spec queue(queue()) -> queue:queue().
+
+queue(Q) ->
+ queue:reverse(Q).
+
+-spec set(set()) -> sets:set().
+
+set(S) ->
+ sets:union([S]).
+
+-spec tid() -> tid().
+
+tid() ->
+ ets:new(tid, []).
+
+-spec tid2() -> ets:tid().
+
+tid2() ->
+ ets:new(tid, []).
diff --git a/lib/stdlib/test/erl_lint_SUITE_data/predef2.erl b/lib/stdlib/test/erl_lint_SUITE_data/predef2.erl
new file mode 100644
index 0000000000..b1d941a49a
--- /dev/null
+++ b/lib/stdlib/test/erl_lint_SUITE_data/predef2.erl
@@ -0,0 +1,56 @@
+-module(predef2).
+
+-export([array/1, dict/1, digraph/1, digraph2/1, gb_set/1, gb_tree/1,
+ queue/1, set/1, tid/0, tid2/0]).
+
+-export_type([array/0, digraph/0, gb_set/0]).
+
+-spec array(array()) -> array:array().
+
+array(A) ->
+ array:relax(A).
+
+-spec dict(dict()) -> dict:dict().
+
+dict(D) ->
+ dict:store(1, a, D).
+
+-spec digraph(digraph()) -> [digraph:edge()].
+
+digraph(G) ->
+ digraph:edges(G).
+
+-spec digraph2(digraph:graph()) -> [digraph:edge()].
+
+digraph2(G) ->
+ digraph:edges(G).
+
+-spec gb_set(gb_set()) -> gb_sets:set().
+
+gb_set(S) ->
+ gb_sets:balance(S).
+
+-spec gb_tree(gb_tree()) -> gb_trees:tree().
+
+gb_tree(S) ->
+ gb_trees:balance(S).
+
+-spec queue(queue()) -> queue:queue().
+
+queue(Q) ->
+ queue:reverse(Q).
+
+-spec set(set()) -> sets:set().
+
+set(S) ->
+ sets:union([S]).
+
+-spec tid() -> tid().
+
+tid() ->
+ ets:new(tid, []).
+
+-spec tid2() -> ets:tid().
+
+tid2() ->
+ ets:new(tid, []).
diff --git a/lib/stdlib/test/erl_pp_SUITE.erl b/lib/stdlib/test/erl_pp_SUITE.erl
index cc744ee76b..babf3a49eb 100644
--- a/lib/stdlib/test/erl_pp_SUITE.erl
+++ b/lib/stdlib/test/erl_pp_SUITE.erl
@@ -46,6 +46,7 @@
import_export/1, misc_attrs/1, dialyzer_attrs/1,
hook/1,
neg_indent/1,
+ maps_syntax/1,
otp_6321/1, otp_6911/1, otp_6914/1, otp_8150/1, otp_8238/1,
otp_8473/1, otp_8522/1, otp_8567/1, otp_8664/1, otp_9147/1,
@@ -76,7 +77,8 @@ groups() ->
[{expr, [],
[func, call, recs, try_catch, if_then, receive_after,
bits, head_tail, cond1, block, case1, ops,
- messages, old_mnemosyne_syntax]},
+ messages, old_mnemosyne_syntax, maps_syntax
+ ]},
{attributes, [], [misc_attrs, import_export, dialyzer_attrs]},
{tickets, [],
[otp_6321, otp_6911, otp_6914, otp_8150, otp_8238,
@@ -975,6 +977,35 @@ count_atom(L, A) when is_list(L) ->
count_atom(_, _) ->
0.
+maps_syntax(doc) -> "Maps syntax";
+maps_syntax(suite) -> [];
+maps_syntax(Config) when is_list(Config) ->
+ Ts = [{map_fun_1,
+ <<"t() ->\n"
+ " M0 = #{ 1 => hi, hi => 42, 1.0 => {hi,world}},\n"
+ " M1 = M0#{ 1 := hello, new_val => 1337 },\n"
+ " map_fun_2:val(M1).\n">>},
+ {map_fun_2,
+ <<"val(#{ 1 := V1, hi := V2, new_val := V3}) -> {V1,V2,V3}.\n">>}],
+ compile(Config, Ts),
+
+ ok = pp_expr(<<"#{}">>),
+ ok = pp_expr(<<"#{ a => 1, <<\"hi\">> => \"world\", 33 => 1.0 }">>),
+ ok = pp_expr(<<"#{ a := V1, <<\"hi\">> := V2 } = M">>),
+ ok = pp_expr(<<"M#{ a => V1, <<\"hi\">> := V2 }">>),
+ F = <<"-module(maps_type_syntax).\n"
+ "-compile(export_all).\n"
+ "-type t1() :: map().\n"
+ "-type t2() :: #{ atom() => integer(), atom() => float() }.\n"
+ "-spec f1(t1()) -> 'true'.\n"
+ "f1(M) when is_map(M) -> true.\n"
+ "-spec f2(t2()) -> integer().\n"
+ "f2(#{a := V1,b := V2}) -> V1 + V2.\n"
+ "\n">>,
+ ok = pp_forms(F),
+ ok.
+
+
otp_8567(doc) ->
"OTP_8567. Avoid duplicated 'undefined' in record field types.";
otp_8567(suite) -> [];
diff --git a/lib/stdlib/test/erl_scan_SUITE.erl b/lib/stdlib/test/erl_scan_SUITE.erl
index e628f7248d..35067e8116 100644
--- a/lib/stdlib/test/erl_scan_SUITE.erl
+++ b/lib/stdlib/test/erl_scan_SUITE.erl
@@ -1,7 +1,7 @@
%%
%% %CopyrightBegin%
%%
-%% Copyright Ericsson AB 1998-2013. All Rights Reserved.
+%% Copyright Ericsson AB 1998-2014. 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
@@ -21,7 +21,7 @@
init_per_group/2,end_per_group/2]).
-export([ error_1/1, error_2/1, iso88591/1, otp_7810/1, otp_10302/1,
- otp_10990/1, otp_10992/1]).
+ otp_10990/1, otp_10992/1, otp_11807/1]).
-import(lists, [nth/2,flatten/1]).
-import(io_lib, [print/1]).
@@ -60,7 +60,8 @@ end_per_testcase(_Case, Config) ->
suite() -> [{ct_hooks,[ts_install_cth]}].
all() ->
- [{group, error}, iso88591, otp_7810, otp_10302, otp_10990, otp_10992].
+ [{group, error}, iso88591, otp_7810, otp_10302, otp_10990, otp_10992,
+ otp_11807].
groups() ->
[{error, [], [error_1, error_2]}].
@@ -224,8 +225,8 @@ atoms() ->
punctuations() ->
L = ["<<", "<-", "<=", "<", ">>", ">=", ">", "->", "--",
- "-", "++", "+", "=:=", "=/=", "=<", "==", "=", "/=",
- "/", "||", "|", ":-", "::", ":"],
+ "-", "++", "+", "=:=", "=/=", "=<", "=>", "==", "=", "/=",
+ "/", "||", "|", ":=", ":-", "::", ":"],
%% One token at a time:
[begin
W = list_to_atom(S),
@@ -1144,6 +1145,25 @@ otp_10992(Config) when is_list(Config) ->
erl_parse:abstract([$A,42.0], [{encoding,utf8}]),
ok.
+otp_11807(doc) ->
+ "OTP-11807. Generalize erl_parse:abstract/2.";
+otp_11807(suite) ->
+ [];
+otp_11807(Config) when is_list(Config) ->
+ {cons,0,{integer,0,97},{cons,0,{integer,0,98},{nil,0}}} =
+ erl_parse:abstract("ab", [{encoding,none}]),
+ {cons,0,{integer,0,-1},{nil,0}} =
+ erl_parse:abstract([-1], [{encoding,latin1}]),
+ ASCII = fun(I) -> I >= 0 andalso I < 128 end,
+ {string,0,"xyz"} = erl_parse:abstract("xyz", [{encoding,ASCII}]),
+ {cons,0,{integer,0,228},{nil,0}} =
+ erl_parse:abstract([228], [{encoding,ASCII}]),
+ {cons,0,{integer,0,97},{atom,0,a}} =
+ erl_parse:abstract("a"++a, [{encoding,latin1}]),
+ {'EXIT', {{badarg,bad},_}} = % minor backward incompatibility
+ (catch erl_parse:abstract("string", [{encoding,bad}])),
+ ok.
+
test_string(String, Expected) ->
{ok, Expected, _End} = erl_scan:string(String),
test(String).
diff --git a/lib/stdlib/test/ets_SUITE.erl b/lib/stdlib/test/ets_SUITE.erl
index 82c3e7ecaf..8dc8b2c291 100644
--- a/lib/stdlib/test/ets_SUITE.erl
+++ b/lib/stdlib/test/ets_SUITE.erl
@@ -1,7 +1,7 @@
%%
%% %CopyrightBegin%
%%
-%% Copyright Ericsson AB 1996-2013. All Rights Reserved.
+%% Copyright Ericsson AB 1996-2014. 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
@@ -75,6 +75,7 @@
-export([otp_9932/1]).
-export([otp_9423/1]).
-export([otp_10182/1]).
+-export([ets_all/1]).
-export([memory_check_summary/1]).
-export([init_per_testcase/2, end_per_testcase/2]).
@@ -151,6 +152,7 @@ all() ->
otp_10182,
otp_9932,
otp_9423,
+ ets_all,
memory_check_summary]. % MUST BE LAST
@@ -5565,7 +5567,19 @@ otp_10182(Config) when is_list(Config) ->
ets:delete(Db),
In = Out.
-
+%% Test that ets:all include/exclude tables that we know are created/deleted
+ets_all(Config) when is_list(Config) ->
+ Pids = [spawn_link(fun() -> ets_all_run() end) || _ <- [1,2]],
+ receive after 3*1000 -> ok end,
+ [begin unlink(P), exit(P,kill) end || P <- Pids],
+ ok.
+
+ets_all_run() ->
+ Table = ets:new(undefined, []),
+ true = lists:member(Table, ets:all()),
+ ets:delete(Table),
+ false = lists:member(Table, ets:all()),
+ ets_all_run().
%
diff --git a/lib/stdlib/test/expand_test.erl b/lib/stdlib/test/expand_test.erl
index 63e4bc3aa0..b9db32c352 100644
--- a/lib/stdlib/test/expand_test.erl
+++ b/lib/stdlib/test/expand_test.erl
@@ -20,7 +20,8 @@
-export([a_fun_name/1,
a_less_fun_name/1,
- b_comes_after_a/1]).
+ b_comes_after_a/1,
+ expand0arity_entirely/0]).
a_fun_name(X) ->
X.
@@ -30,3 +31,6 @@ a_less_fun_name(X) ->
b_comes_after_a(X) ->
X.
+
+expand0arity_entirely () ->
+ ok.
diff --git a/lib/stdlib/test/expand_test1.erl b/lib/stdlib/test/expand_test1.erl
index 11b6fec0f3..1d375e5677 100644
--- a/lib/stdlib/test/expand_test1.erl
+++ b/lib/stdlib/test/expand_test1.erl
@@ -23,7 +23,7 @@
b_comes_after_a/1,
'Quoted_fun_name'/0,
'Quoted_fun_too'/0,
- '#weird-fun-name'/0]).
+ '#weird-fun-name'/1]).
a_fun_name(X) ->
X.
@@ -40,5 +40,5 @@ b_comes_after_a(X) ->
'Quoted_fun_too'() ->
too.
-'#weird-fun-name'() ->
+'#weird-fun-name'(_) ->
weird.
diff --git a/lib/stdlib/test/filelib_SUITE.erl b/lib/stdlib/test/filelib_SUITE.erl
index 4a67d68428..8203a03a7a 100644
--- a/lib/stdlib/test/filelib_SUITE.erl
+++ b/lib/stdlib/test/filelib_SUITE.erl
@@ -23,7 +23,7 @@
init_per_group/2,end_per_group/2,
init_per_testcase/2,end_per_testcase/2,
wildcard_one/1,wildcard_two/1,wildcard_errors/1,
- fold_files/1,otp_5960/1,ensure_dir_eexist/1]).
+ fold_files/1,otp_5960/1,ensure_dir_eexist/1,symlinks/1]).
-import(lists, [foreach/2]).
@@ -43,7 +43,7 @@ suite() -> [{ct_hooks,[ts_install_cth]}].
all() ->
[wildcard_one, wildcard_two, wildcard_errors,
- fold_files, otp_5960, ensure_dir_eexist].
+ fold_files, otp_5960, ensure_dir_eexist, symlinks].
groups() ->
[].
@@ -366,3 +366,39 @@ ensure_dir_eexist(Config) when is_list(Config) ->
?line {error, eexist} = filelib:ensure_dir(NeedFile),
?line {error, eexist} = filelib:ensure_dir(NeedFileB),
ok.
+
+symlinks(Config) when is_list(Config) ->
+ PrivDir = ?config(priv_dir, Config),
+ Dir = filename:join(PrivDir, ?MODULE_STRING++"_symlinks"),
+ SubDir = filename:join(Dir, "sub"),
+ AFile = filename:join(SubDir, "a_file"),
+ Alias = filename:join(Dir, "symlink"),
+ ok = file:make_dir(Dir),
+ ok = file:make_dir(SubDir),
+ ok = file:write_file(AFile, "not that big\n"),
+ case file:make_symlink(AFile, Alias) of
+ {error, enotsup} ->
+ {skip, "Links not supported on this platform"};
+ {error, eperm} ->
+ {win32,_} = os:type(),
+ {skip, "Windows user not privileged to create symlinks"};
+ ok ->
+ ["sub","symlink"] =
+ basenames(Dir, filelib:wildcard(filename:join(Dir, "*"))),
+ ["symlink"] =
+ basenames(Dir, filelib:wildcard(filename:join(Dir, "symlink"))),
+ ok = file:delete(AFile),
+ %% The symlink should still be visible even when its target
+ %% has been deleted.
+ ["sub","symlink"] =
+ basenames(Dir, filelib:wildcard(filename:join(Dir, "*"))),
+ ["symlink"] =
+ basenames(Dir, filelib:wildcard(filename:join(Dir, "symlink"))),
+ ok
+ end.
+
+basenames(Dir, Files) ->
+ [begin
+ Dir = filename:dirname(F),
+ filename:basename(F)
+ end || F <- Files].
diff --git a/lib/stdlib/test/filename_SUITE.erl b/lib/stdlib/test/filename_SUITE.erl
index 232df6a13f..ecd9cff9f9 100644
--- a/lib/stdlib/test/filename_SUITE.erl
+++ b/lib/stdlib/test/filename_SUITE.erl
@@ -96,11 +96,19 @@ absname(Config) when is_list(Config) ->
?line file:set_cwd(Cwd),
ok;
- {unix, _} ->
- ?line ok = file:set_cwd("/usr"),
- ?line "/usr/foo" = filename:absname(foo),
- ?line "/usr/foo" = filename:absname("foo"),
- ?line "/usr/../ebin" = filename:absname("../ebin"),
+ Type ->
+ case Type of
+ {unix, _} ->
+ ?line ok = file:set_cwd("/usr"),
+ ?line "/usr/foo" = filename:absname(foo),
+ ?line "/usr/foo" = filename:absname("foo"),
+ ?line "/usr/../ebin" = filename:absname("../ebin");
+ {ose, _} ->
+ ?line ok = file:set_cwd("/romfs"),
+ ?line "/romfs/foo" = filename:absname(foo),
+ ?line "/romfs/foo" = filename:absname("foo"),
+ ?line "/romfs/../ebin" = filename:absname("../ebin")
+ end,
?line file:set_cwd("/"),
?line "/foo" = filename:absname(foo),
@@ -155,7 +163,7 @@ absname_2(Config) when is_list(Config) ->
?line "a:/erlang" = filename:absname("a:erlang", [Drive|":/"]),
ok;
- {unix, _} ->
+ _ ->
?line "/usr/foo" = filename:absname(foo, "/usr"),
?line "/usr/foo" = filename:absname("foo", "/usr"),
?line "/usr/../ebin" = filename:absname("../ebin", "/usr"),
@@ -189,7 +197,7 @@ basename_1(Config) when is_list(Config) ->
?line "foo" = filename:basename(["usr\\foo\\"]),
?line "foo" = filename:basename("A:\\usr\\foo"),
?line "foo" = filename:basename("A:foo");
- {unix, _} ->
+ _ ->
?line "strange\\but\\true" =
filename:basename("strange\\but\\true")
end,
@@ -219,7 +227,7 @@ basename_2(Config) when is_list(Config) ->
?line "foo.erl" = filename:basename("c:\\usr.hrl\\foo.erl",
".hrl"),
?line "foo" = filename:basename("A:\\usr\\foo", ".hrl");
- {unix, _} ->
+ _ ->
?line "strange\\but\\true" =
filename:basename("strange\\but\\true.erl", ".erl"),
?line "strange\\but\\true" =
@@ -317,7 +325,7 @@ join(Config) when is_list(Config) ->
filename:join(["A:","C:usr","foo.erl"]),
?line "d:/foo" = filename:join([$D, $:, $/, []], "foo"),
ok;
- {unix, _} ->
+ _ ->
ok
end.
@@ -332,7 +340,7 @@ pathtype(Config) when is_list(Config) ->
?line volumerelative = filename:pathtype("/usr/local/bin"),
?line volumerelative = filename:pathtype("A:usr/local/bin"),
ok;
- {unix, _} ->
+ _ ->
?line absolute = filename:pathtype("/"),
?line absolute = filename:pathtype("/usr/local/bin"),
ok
@@ -450,10 +458,17 @@ absname_bin(Config) when is_list(Config) ->
?line file:set_cwd(Cwd),
ok;
- {unix, _} ->
- ?line ok = file:set_cwd(<<"/usr">>),
- ?line <<"/usr/foo">> = filename:absname(<<"foo">>),
- ?line <<"/usr/../ebin">> = filename:absname(<<"../ebin">>),
+ Type ->
+ case Type of
+ {unix,_} ->
+ ?line ok = file:set_cwd(<<"/usr">>),
+ ?line <<"/usr/foo">> = filename:absname(<<"foo">>),
+ ?line <<"/usr/../ebin">> = filename:absname(<<"../ebin">>);
+ {ose,_} ->
+ ?line ok = file:set_cwd(<<"/romfs">>),
+ ?line <<"/romfs/foo">> = filename:absname(<<"foo">>),
+ ?line <<"/romfs/../ebin">> = filename:absname(<<"../ebin">>)
+ end,
?line file:set_cwd(<<"/">>),
?line <<"/foo">> = filename:absname(<<"foo">>),
@@ -503,7 +518,7 @@ absname_bin_2(Config) when is_list(Config) ->
?line <<"a:/erlang">> = filename:absname(<<"a:erlang">>, <<Drive:8,":/">>),
ok;
- {unix, _} ->
+ _ ->
?line <<"/usr/foo">> = filename:absname(<<"foo">>, <<"/usr">>),
?line <<"/usr/../ebin">> = filename:absname(<<"../ebin">>, <<"/usr">>),
@@ -527,7 +542,7 @@ basename_bin_1(Config) when is_list(Config) ->
{win32, _} ->
?line <<"foo">> = filename:basename(<<"A:\\usr\\foo">>),
?line <<"foo">> = filename:basename(<<"A:foo">>);
- {unix, _} ->
+ _ ->
?line <<"strange\\but\\true">> =
filename:basename(<<"strange\\but\\true">>)
end,
@@ -551,7 +566,7 @@ basename_bin_2(Config) when is_list(Config) ->
?line <<"foo.erl">> = filename:basename(<<"c:\\usr.hrl\\foo.erl">>,
<<".hrl">>),
?line <<"foo">> = filename:basename(<<"A:\\usr\\foo">>, <<".hrl">>);
- {unix, _} ->
+ _ ->
?line <<"strange\\but\\true">> =
filename:basename(<<"strange\\but\\true.erl">>, <<".erl">>),
?line <<"strange\\but\\true">> =
@@ -639,7 +654,7 @@ join_bin(Config) when is_list(Config) ->
filename:join([<<"A:">>,<<"C:usr">>,<<"foo.erl">>]),
?line <<"d:/foo">> = filename:join([$D, $:, $/, []], <<"foo">>),
ok;
- {unix, _} ->
+ _ ->
ok
end.
@@ -653,7 +668,7 @@ pathtype_bin(Config) when is_list(Config) ->
volumerelative = filename:pathtype(<<"/usr/local/bin">>),
volumerelative = filename:pathtype(<<"A:usr/local/bin">>),
ok;
- {unix, _} ->
+ _ ->
absolute = filename:pathtype(<<"/">>),
absolute = filename:pathtype(<<"/usr/local/bin">>),
ok
diff --git a/lib/stdlib/test/gen_event_SUITE.erl b/lib/stdlib/test/gen_event_SUITE.erl
index 5819ef3890..60a1ba8c60 100644
--- a/lib/stdlib/test/gen_event_SUITE.erl
+++ b/lib/stdlib/test/gen_event_SUITE.erl
@@ -974,6 +974,10 @@ get_state(Config) when is_list(Config) ->
[{dummy1_h,false,State1},{dummy1_h,id,State2}] = lists:sort(Result1),
Result2 = sys:get_state(Pid, 5000),
[{dummy1_h,false,State1},{dummy1_h,id,State2}] = lists:sort(Result2),
+ ok = sys:suspend(Pid),
+ Result3 = sys:get_state(Pid),
+ [{dummy1_h,false,State1},{dummy1_h,id,State2}] = lists:sort(Result3),
+ ok = sys:resume(Pid),
ok = gen_event:stop(Pid),
ok.
@@ -998,4 +1002,11 @@ replace_state(Config) when is_list(Config) ->
Replace3 = fun(_) -> exit(fail) end,
[{dummy1_h,false,NState2}] = sys:replace_state(Pid, Replace3),
[{dummy1_h,false,NState2}] = sys:get_state(Pid),
+ %% verify state replaced if process sys suspended
+ NState3 = "replaced again and again",
+ Replace4 = fun({dummy1_h,false,_}=S) -> setelement(3,S,NState3) end,
+ ok = sys:suspend(Pid),
+ [{dummy1_h,false,NState3}] = sys:replace_state(Pid, Replace4),
+ ok = sys:resume(Pid),
+ [{dummy1_h,false,NState3}] = sys:get_state(Pid),
ok.
diff --git a/lib/stdlib/test/gen_fsm_SUITE.erl b/lib/stdlib/test/gen_fsm_SUITE.erl
index fd15838b7d..8aeec07ae8 100644
--- a/lib/stdlib/test/gen_fsm_SUITE.erl
+++ b/lib/stdlib/test/gen_fsm_SUITE.erl
@@ -426,6 +426,14 @@ get_state(Config) when is_list(Config) ->
{idle, State} = sys:get_state(gfsm),
{idle, State} = sys:get_state(gfsm, 5000),
stop_it(Pid2),
+
+ %% check that get_state works when pid is sys suspended
+ {ok, Pid3} = gen_fsm:start(gen_fsm_SUITE, {state_data, State}, []),
+ {idle, State} = sys:get_state(Pid3),
+ ok = sys:suspend(Pid3),
+ {idle, State} = sys:get_state(Pid3, 5000),
+ ok = sys:resume(Pid3),
+ stop_it(Pid3),
ok.
replace_state(Config) when is_list(Config) ->
@@ -442,8 +450,18 @@ replace_state(Config) when is_list(Config) ->
{state0, NState2} = sys:get_state(Pid),
%% verify no change in state if replace function crashes
Replace3 = fun(_) -> error(fail) end,
- {state0, NState2} = sys:replace_state(Pid, Replace3),
+ {'EXIT',{{callback_failed,
+ {gen_fsm,system_replace_state},{error,fail}},_}} =
+ (catch sys:replace_state(Pid, Replace3)),
{state0, NState2} = sys:get_state(Pid),
+ %% verify state replaced if process sys suspended
+ ok = sys:suspend(Pid),
+ Suffix2 = " and again",
+ NState3 = NState2 ++ Suffix2,
+ Replace4 = fun({StateName, _}) -> {StateName, NState3} end,
+ {state0, NState3} = sys:replace_state(Pid, Replace4),
+ ok = sys:resume(Pid),
+ {state0, NState3} = sys:get_state(Pid, 5000),
stop_it(Pid),
ok.
diff --git a/lib/stdlib/test/gen_server_SUITE.erl b/lib/stdlib/test/gen_server_SUITE.erl
index a360a0809b..960e7f60e7 100644
--- a/lib/stdlib/test/gen_server_SUITE.erl
+++ b/lib/stdlib/test/gen_server_SUITE.erl
@@ -1049,6 +1049,9 @@ get_state(Config) when is_list(Config) ->
{ok, Pid} = gen_server:start_link(?MODULE, {state,State}, []),
State = sys:get_state(Pid),
State = sys:get_state(Pid, 5000),
+ ok = sys:suspend(Pid),
+ State = sys:get_state(Pid),
+ ok = sys:resume(Pid),
ok.
%% Verify that sys:replace_state correctly replaces gen_server state
@@ -1075,8 +1078,18 @@ replace_state(Config) when is_list(Config) ->
NState2 = sys:get_state(Pid, 5000),
%% verify no change in state if replace function crashes
Replace3 = fun(_) -> throw(fail) end,
- NState2 = sys:replace_state(Pid, Replace3),
+ {'EXIT',{{callback_failed,
+ {gen_server,system_replace_state},{throw,fail}},_}} =
+ (catch sys:replace_state(Pid, Replace3)),
NState2 = sys:get_state(Pid, 5000),
+ %% verify state replaced if process sys suspended
+ ok = sys:suspend(Pid),
+ Suffix2 = " and again",
+ NState3 = NState2 ++ Suffix2,
+ Replace4 = fun(S) -> S ++ Suffix2 end,
+ NState3 = sys:replace_state(Pid, Replace4),
+ ok = sys:resume(Pid),
+ NState3 = sys:get_state(Pid, 5000),
ok.
%% Test that the time for a huge message queue is not
diff --git a/lib/stdlib/test/lists_SUITE.erl b/lib/stdlib/test/lists_SUITE.erl
index 92253ef5b9..f4589a8e24 100644
--- a/lib/stdlib/test/lists_SUITE.erl
+++ b/lib/stdlib/test/lists_SUITE.erl
@@ -61,7 +61,7 @@
zip_unzip/1, zip_unzip3/1, zipwith/1, zipwith3/1,
filter_partition/1,
otp_5939/1, otp_6023/1, otp_6606/1, otp_7230/1,
- suffix/1, subtract/1]).
+ suffix/1, subtract/1, droplast/1]).
%% Sort randomized lists until stopped.
%%
@@ -2641,4 +2641,12 @@ sub_non_matching(A, B) ->
sub(A, B) ->
Res = A -- B,
Res = lists:subtract(A, B).
-
+
+%% Test lists:droplast/1
+droplast(Config) when is_list(Config) ->
+ ?line [] = lists:droplast([x]),
+ ?line [x] = lists:droplast([x, y]),
+ ?line {'EXIT', {function_clause, _}} = (catch lists:droplast([])),
+ ?line {'EXIT', {function_clause, _}} = (catch lists:droplast(x)),
+
+ ok.
diff --git a/lib/stdlib/test/maps_SUITE.erl b/lib/stdlib/test/maps_SUITE.erl
new file mode 100644
index 0000000000..c826ee731a
--- /dev/null
+++ b/lib/stdlib/test/maps_SUITE.erl
@@ -0,0 +1,69 @@
+%%
+%% %CopyrightBegin%
+%%
+%% Copyright Ericsson AB 1997-2014. 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%
+%%
+%%%----------------------------------------------------------------
+%%% Purpose: Test suite for the 'maps' module.
+%%%-----------------------------------------------------------------
+
+-module(maps_SUITE).
+
+-include_lib("test_server/include/test_server.hrl").
+
+% Default timetrap timeout (set in init_per_testcase).
+% This should be set relatively high (10-15 times the expected
+% max testcasetime).
+-define(default_timeout, ?t:minutes(4)).
+
+% Test server specific exports
+-export([all/0]).
+-export([suite/0]).
+-export([init_per_suite/1]).
+-export([end_per_suite/1]).
+-export([init_per_testcase/2]).
+-export([end_per_testcase/2]).
+
+-export([get3/1]).
+
+suite() ->
+ [{ct_hooks, [ts_install_cth]}].
+
+all() ->
+ [get3].
+
+init_per_suite(Config) ->
+ Config.
+
+end_per_suite(_Config) ->
+ ok.
+
+init_per_testcase(_Case, Config) ->
+ ?line Dog=test_server:timetrap(?default_timeout),
+ [{watchdog, Dog}|Config].
+
+end_per_testcase(_Case, Config) ->
+ Dog=?config(watchdog, Config),
+ test_server:timetrap_cancel(Dog),
+ ok.
+
+get3(Config) when is_list(Config) ->
+ Map = #{ key1 => value1, key2 => value2 },
+ DefaultValue = "Default value",
+ ?line value1 = maps:get(key1, Map, DefaultValue),
+ ?line value2 = maps:get(key2, Map, DefaultValue),
+ ?line DefaultValue = maps:get(key3, Map, DefaultValue),
+ ok.
diff --git a/lib/stdlib/test/qlc_SUITE.erl b/lib/stdlib/test/qlc_SUITE.erl
index 2846657c09..37fbb5267b 100644
--- a/lib/stdlib/test/qlc_SUITE.erl
+++ b/lib/stdlib/test/qlc_SUITE.erl
@@ -1,7 +1,7 @@
%%
%% %CopyrightBegin%
%%
-%% Copyright Ericsson AB 2004-2013. All Rights Reserved.
+%% Copyright Ericsson AB 2004-2014. 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
@@ -72,7 +72,7 @@
otp_5644/1, otp_5195/1, otp_6038_bug/1, otp_6359/1, otp_6562/1,
otp_6590/1, otp_6673/1, otp_6964/1, otp_7114/1, otp_7238/1,
- otp_7232/1, otp_7552/1, otp_6674/1, otp_7714/1,
+ otp_7232/1, otp_7552/1, otp_6674/1, otp_7714/1, otp_11758/1,
manpage/1,
@@ -142,7 +142,7 @@ groups() ->
{tickets, [],
[otp_5644, otp_5195, otp_6038_bug, otp_6359, otp_6562,
otp_6590, otp_6673, otp_6964, otp_7114, otp_7232,
- otp_7238, otp_7552, otp_6674, otp_7714]},
+ otp_7238, otp_7552, otp_6674, otp_7714, otp_11758]},
{compat, [], [backward, forward]}].
init_per_suite(Config) ->
@@ -6670,6 +6670,19 @@ otp_7714(Config) when is_list(Config) ->
ets:delete(E2)">>],
?line run(Config, Ts).
+otp_11758(doc) ->
+ "OTP-11758. Bug.";
+otp_11758(suite) -> [];
+otp_11758(Config) when is_list(Config) ->
+ Ts = [<<"T = ets:new(r, [{keypos, 2}]),
+ L = [{rrr, xxx, aaa}, {rrr, yyy, bbb}],
+ true = ets:insert(T, L),
+ QH = qlc:q([{rrr, B, C} || {rrr, B, C} <- ets:table(T),
+ (B =:= xxx) or (B =:= yyy) and (C =:= aaa)]),
+ [{rrr,xxx,aaa}] = qlc:e(QH),
+ ets:delete(T)">>],
+ run(Config, Ts).
+
otp_6674(doc) ->
"OTP-6674. match/comparison.";
otp_6674(suite) -> [];
diff --git a/lib/stdlib/test/shell_SUITE.erl b/lib/stdlib/test/shell_SUITE.erl
index 233ba0764f..e016432f4d 100644
--- a/lib/stdlib/test/shell_SUITE.erl
+++ b/lib/stdlib/test/shell_SUITE.erl
@@ -54,7 +54,7 @@ config(priv_dir,_) ->
-include_lib("test_server/include/test_server.hrl").
-export([init_per_testcase/2, end_per_testcase/2]).
% Default timetrap timeout (set in init_per_testcase).
--define(default_timeout, ?t:minutes(2)).
+-define(default_timeout, ?t:minutes(10)).
init_per_testcase(_Case, Config) ->
?line Dog = ?t:timetrap(?default_timeout),
?line OrigPath = code:get_path(),
@@ -146,7 +146,7 @@ start_restricted_from_shell(Config) when is_list(Config) ->
"test_restricted) end.">>),
?line {ok, test_restricted} =
application:get_env(stdlib, restricted_shell),
- ?line "Module" ++ _ = t(<<"begin m() end.">>),
+ ?line "Module" ++ _ = t({<<"begin m() end.">>, utf8}),
?line "exception exit: restricted shell does not allow c(foo)" =
comm_err(<<"begin c(foo) end.">>),
?line "exception exit: restricted shell does not allow init:stop()" =
@@ -225,7 +225,7 @@ start_restricted_on_command_line(Config) when is_list(Config) ->
?line {ok,Node2} = start_node(shell_suite_helper_2,
"-pa "++?config(priv_dir,Config)++
" -stdlib restricted_shell test_restricted2"),
- ?line "Module" ++ _ = t({Node2,<<"begin m() end.">>}),
+ ?line "Module" ++ _ = t({Node2,<<"begin m() end.">>, utf8}),
?line "exception exit: restricted shell does not allow c(foo)" =
comm_err({Node2,<<"begin c(foo) end.">>}),
?line "exception exit: restricted shell does not allow init:stop()" =
@@ -2927,14 +2927,14 @@ t1(Parent, {Bin,Enc}, F) ->
server_loop(S)
catch exit:R -> Parent ! {self(), R};
throw:{?MODULE,LoopReply,latin1} ->
- L0 = binary_to_list(list_to_binary(LoopReply)),
- [$\n | L1] = lists:dropwhile(fun(X) -> X =/= $\n end, L0),
- Parent ! {self(), dotify(L1)};
+ L0 = binary_to_list(list_to_binary(LoopReply)),
+ [$\n | L1] = lists:dropwhile(fun(X) -> X =/= $\n end, L0),
+ Parent ! {self(), dotify(L1)};
throw:{?MODULE,LoopReply,_Uni} ->
- Tmp = unicode:characters_to_binary(LoopReply),
- L0 = unicode:characters_to_list(Tmp),
- [$\n | L1] = lists:dropwhile(fun(X) -> X =/= $\n end, L0),
- Parent ! {self(), dotify(L1)}
+ Tmp = unicode:characters_to_binary(LoopReply),
+ L0 = unicode:characters_to_list(Tmp),
+ [$\n | L1] = lists:dropwhile(fun(X) -> X =/= $\n end, L0),
+ Parent ! {self(), dotify(L1)}
after group_leader(S#state.leader, self())
end.
diff --git a/lib/stdlib/test/stdlib_SUITE.erl b/lib/stdlib/test/stdlib_SUITE.erl
index 8a2cb5ea6b..59821220b4 100644
--- a/lib/stdlib/test/stdlib_SUITE.erl
+++ b/lib/stdlib/test/stdlib_SUITE.erl
@@ -1,7 +1,7 @@
%%
%% %CopyrightBegin%
%%
-%% Copyright Ericsson AB 1997-2011. All Rights Reserved.
+%% Copyright Ericsson AB 1997-2014. 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
@@ -23,10 +23,6 @@
-include_lib("test_server/include/test_server.hrl").
-% Default timetrap timeout (set in init_per_testcase).
--define(default_timeout, ?t:minutes(1)).
--define(application, stdlib).
-
% Test server specific exports
-export([all/0, suite/0,groups/0,init_per_suite/1, end_per_suite/1,
init_per_group/2,end_per_group/2]).
@@ -60,11 +56,8 @@ end_per_group(_GroupName, Config) ->
init_per_testcase(_Case, Config) ->
- ?line Dog=test_server:timetrap(?default_timeout),
- [{watchdog, Dog}|Config].
-end_per_testcase(_Case, Config) ->
- Dog=?config(watchdog, Config),
- test_server:timetrap_cancel(Dog),
+ Config.
+end_per_testcase(_Case, _Config) ->
ok.
%
@@ -78,56 +71,80 @@ app_test(Config) when is_list(Config) ->
?t:app_test(stdlib),
ok.
-%% Test that appup allows upgrade from/downgrade to a maximum of two
-%% major releases back.
+%% Test that appup allows upgrade from/downgrade to a maximum of one
+%% major release back.
appup_test(_Config) ->
- application:load(stdlib),
- {_,_,Vsn} = lists:keyfind(stdlib,1,application:loaded_applications()),
- AppupFile = filename:join([code:lib_dir(stdlib),ebin,"stdlib.appup"]),
+ appup_tests(stdlib,create_test_vsns(stdlib)).
+
+appup_tests(_App,{[],[]}) ->
+ {skip,"no previous releases available"};
+appup_tests(App,{OkVsns,NokVsns}) ->
+ application:load(App),
+ {_,_,Vsn} = lists:keyfind(App,1,application:loaded_applications()),
+ AppupFileName = atom_to_list(App) ++ ".appup",
+ AppupFile = filename:join([code:lib_dir(App),ebin,AppupFileName]),
{ok,[{Vsn,UpFrom,DownTo}=AppupScript]} = file:consult(AppupFile),
ct:log("~p~n",[AppupScript]),
- {OkVsns,NokVsns} = create_test_vsns(Vsn),
+ ct:log("Testing ok versions: ~p~n",[OkVsns]),
check_appup(OkVsns,UpFrom,{ok,[restart_new_emulator]}),
check_appup(OkVsns,DownTo,{ok,[restart_new_emulator]}),
+ ct:log("Testing not ok versions: ~p~n",[NokVsns]),
check_appup(NokVsns,UpFrom,error),
check_appup(NokVsns,DownTo,error),
ok.
-create_test_vsns(Current) ->
- [XStr,YStr|Rest] = string:tokens(Current,"."),
- X = list_to_integer(XStr),
- Y = list_to_integer(YStr),
- SecondMajor = vsn(X,Y-2),
- SecondMinor = SecondMajor ++ ".1.3",
- FirstMajor = vsn(X,Y-1),
- FirstMinor = FirstMajor ++ ".57",
- ThisMajor = vsn(X,Y),
- This =
- case Rest of
- [] ->
- [];
- ["1"] ->
- [ThisMajor];
- _ ->
- ThisMinor = ThisMajor ++ ".1",
- [ThisMajor,ThisMinor]
+create_test_vsns(App) ->
+ ThisMajor = erlang:system_info(otp_release),
+ FirstMajor = previous_major(ThisMajor),
+ SecondMajor = previous_major(FirstMajor),
+ Ok = app_vsn(App,[ThisMajor,FirstMajor]),
+ Nok0 = app_vsn(App,[SecondMajor]),
+ Nok = case Ok of
+ [Ok1|_] ->
+ [Ok1 ++ ",1" | Nok0]; % illegal
+ _ ->
+ Nok0
+ end,
+ {Ok,Nok}.
+
+previous_major("17") ->
+ "r16b";
+previous_major("r16b") ->
+ "r15b";
+previous_major(Rel) ->
+ integer_to_list(list_to_integer(Rel)-1).
+
+app_vsn(App,[R|Rs]) ->
+ OldRel =
+ case test_server:is_release_available(R) of
+ true ->
+ {release,R};
+ false ->
+ case ct:get_config({otp_releases,list_to_atom(R)}) of
+ undefined ->
+ false;
+ Prog0 ->
+ case os:find_executable(Prog0) of
+ false ->
+ false;
+ Prog ->
+ {prog,Prog}
+ end
+ end
end,
- OkVsns = This ++ [FirstMajor, FirstMinor, SecondMajor, SecondMinor],
-
- ThirdMajor = vsn(X,Y-3),
- ThirdMinor = ThirdMajor ++ ".10.12",
- Illegal = ThisMajor ++ ",1",
- Newer1Major = vsn(X,Y+1),
- Newer1Minor = Newer1Major ++ ".1",
- Newer2Major = ThisMajor ++ "1",
- NokVsns = [ThirdMajor,ThirdMinor,
- Illegal,
- Newer1Major,Newer1Minor,
- Newer2Major],
- {OkVsns,NokVsns}.
-
-vsn(X,Y) ->
- integer_to_list(X) ++ "." ++ integer_to_list(Y).
+ case OldRel of
+ false ->
+ app_vsn(App,Rs);
+ _ ->
+ {ok,N} = test_server:start_node(prevrel,peer,[{erl,[OldRel]}]),
+ _ = rpc:call(N,application,load,[App]),
+ As = rpc:call(N,application,loaded_applications,[]),
+ {_,_,V} = lists:keyfind(App,1,As),
+ test_server:stop_node(N),
+ [V|app_vsn(App,Rs)]
+ end;
+app_vsn(_App,[]) ->
+ [].
check_appup([Vsn|Vsns],Instrs,Expected) ->
case systools_relup:appup_search_for_version(Vsn, Instrs) of
diff --git a/lib/stdlib/test/supervisor_SUITE.erl b/lib/stdlib/test/supervisor_SUITE.erl
index ac5a34c3bc..836ea7c030 100644
--- a/lib/stdlib/test/supervisor_SUITE.erl
+++ b/lib/stdlib/test/supervisor_SUITE.erl
@@ -1,7 +1,7 @@
%%
%% %CopyrightBegin%
%%
-%% Copyright Ericsson AB 1996-2013. All Rights Reserved.
+%% Copyright Ericsson AB 1996-2014. 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
@@ -60,7 +60,7 @@
simple_one_for_one_extra/1, simple_one_for_one_shutdown/1]).
%% Misc tests
--export([child_unlink/1, tree/1, count_children_memory/1,
+-export([child_unlink/1, tree/1, count_children/1,
do_not_save_start_parameters_for_temporary_children/1,
do_not_save_child_specs_for_temporary_children/1,
simple_one_for_one_scale_many_temporary_children/1,
@@ -82,7 +82,7 @@ all() ->
{group, normal_termination},
{group, shutdown_termination},
{group, abnormal_termination}, child_unlink, tree,
- count_children_memory, do_not_save_start_parameters_for_temporary_children,
+ count_children, do_not_save_start_parameters_for_temporary_children,
do_not_save_child_specs_for_temporary_children,
simple_one_for_one_scale_many_temporary_children, temporary_bystander,
simple_global_supervisor, hanging_restart_loop, hanging_restart_loop_simple].
@@ -129,23 +129,10 @@ init_per_group(_GroupName, Config) ->
end_per_group(_GroupName, Config) ->
Config.
-init_per_testcase(count_children_memory, Config) ->
- try erlang:memory() of
- _ ->
- erts_debug:set_internal_state(available_internal_state, true),
- Dog = ?t:timetrap(?TIMEOUT),
- [{watchdog,Dog}|Config]
- catch error:notsup ->
- {skip, "+Meamin used during test; erlang:memory/1 not available"}
- end;
init_per_testcase(_Case, Config) ->
Dog = ?t:timetrap(?TIMEOUT),
[{watchdog,Dog}|Config].
-end_per_testcase(count_children_memory, Config) ->
- catch erts_debug:set_internal_state(available_internal_state, false),
- ?t:timetrap_cancel(?config(watchdog,Config)),
- ok;
end_per_testcase(_Case, Config) ->
?t:timetrap_cancel(?config(watchdog,Config)),
ok.
@@ -1249,34 +1236,24 @@ tree(Config) when is_list(Config) ->
[0,0,0,0] = get_child_counts(NewSup2).
%%-------------------------------------------------------------------------
-%% Test that count_children does not eat memory.
-count_children_memory(Config) when is_list(Config) ->
+%% Test count_children
+count_children(Config) when is_list(Config) ->
process_flag(trap_exit, true),
Child = {child, {supervisor_1, start_child, []}, temporary, 1000,
worker, []},
{ok, SupPid} = start_link({ok, {{simple_one_for_one, 2, 3600}, [Child]}}),
[supervisor:start_child(sup_test, []) || _Ignore <- lists:seq(1,1000)],
- garbage_collect(),
- _Size1 = proc_memory(),
Children = supervisor:which_children(sup_test),
- _Size2 = proc_memory(),
ChildCount = get_child_counts(sup_test),
- _Size3 = proc_memory(),
[supervisor:start_child(sup_test, []) || _Ignore2 <- lists:seq(1,1000)],
- garbage_collect(),
- Children2 = supervisor:which_children(sup_test),
- Size4 = proc_memory(),
ChildCount2 = get_child_counts(sup_test),
- Size5 = proc_memory(),
+ Children2 = supervisor:which_children(sup_test),
- garbage_collect(),
- Children3 = supervisor:which_children(sup_test),
- Size6 = proc_memory(),
ChildCount3 = get_child_counts(sup_test),
- Size7 = proc_memory(),
+ Children3 = supervisor:which_children(sup_test),
1000 = length(Children),
[1,1000,0,1000] = ChildCount,
@@ -1285,27 +1262,9 @@ count_children_memory(Config) when is_list(Config) ->
Children3 = Children2,
ChildCount3 = ChildCount2,
- %% count_children consumes memory using an accumulator function,
- %% but the space can be reclaimed incrementally,
- %% which_children may generate garbage that will be reclaimed later.
- case (Size5 =< Size4) of
- true -> ok;
- false ->
- test_server:fail({count_children, used_more_memory,Size4,Size5})
- end,
- case Size7 =< Size6 of
- true -> ok;
- false ->
- test_server:fail({count_children, used_more_memory,Size6,Size7})
- end,
-
[terminate(SupPid, Pid, child, kill) || {undefined, Pid, worker, _Modules} <- Children3],
[1,0,0,0] = get_child_counts(sup_test).
-proc_memory() ->
- erts_debug:set_internal_state(wait, deallocations),
- erlang:memory(processes_used).
-
%%-------------------------------------------------------------------------
%% Temporary children shall not be restarted so they should not save
%% start parameters, as it potentially can take up a huge amount of
@@ -1483,7 +1442,7 @@ simple_one_for_one_scale_many_temporary_children(_Config) ->
if T1 > 0 ->
Scaling = T2 div T1,
- if Scaling > 20 ->
+ if Scaling > 50 ->
%% The scaling shoul be linear (i.e.10, really), but we
%% give some extra here to avoid failing the test
%% unecessarily.
diff --git a/lib/stdlib/test/sys_SUITE.erl b/lib/stdlib/test/sys_SUITE.erl
index c06ba545e7..f38bc87ae5 100644
--- a/lib/stdlib/test/sys_SUITE.erl
+++ b/lib/stdlib/test/sys_SUITE.erl
@@ -19,7 +19,7 @@
-module(sys_SUITE).
-export([all/0, suite/0,groups/0,init_per_suite/1, end_per_suite/1,
init_per_group/2,end_per_group/2,log/1,log_to_file/1,
- stats/1,trace/1,suspend/1,install/1]).
+ stats/1,trace/1,suspend/1,install/1,special_process/1]).
-export([handle_call/3,terminate/2,init/1]).
-include_lib("test_server/include/test_server.hrl").
@@ -27,14 +27,12 @@
%% Doesn't look into change_code at all
-%% Doesn't address writing your own process that understands
-%% system messages at all.
suite() -> [{ct_hooks,[ts_install_cth]}].
all() ->
- [log, log_to_file, stats, trace, suspend, install].
+ [log, log_to_file, stats, trace, suspend, install, special_process].
groups() ->
[].
@@ -157,6 +155,84 @@ install(Config) when is_list(Config) ->
?line stop(),
ok.
+special_process(suite) -> [];
+special_process(Config) when is_list(Config) ->
+ ok = spec_proc(sys_sp1),
+ ok = spec_proc(sys_sp2).
+
+spec_proc(Mod) ->
+ {ok,_} = Mod:start_link(100),
+ ok = sys:statistics(Mod,true),
+ ok = sys:trace(Mod,true),
+ 1 = Ch = Mod:alloc(),
+ Free = lists:seq(2,100),
+ Replace = case sys:get_state(Mod) of
+ {[Ch],Free} ->
+ fun({A,F}) ->
+ Free = F,
+ {A,[2,3,4]}
+ end;
+ {state,[Ch],Free} ->
+ fun({state,A,F}) ->
+ Free = F,
+ {state,A,[2,3,4]}
+ end
+ end,
+ case sys:replace_state(Mod, Replace) of
+ {[Ch],[2,3,4]} -> ok;
+ {state,[Ch],[2,3,4]} -> ok
+ end,
+ ok = Mod:free(Ch),
+ case sys:get_state(Mod) of
+ {[],[1,2,3,4]} -> ok;
+ {state,[],[1,2,3,4]} -> ok
+ end,
+ {ok,[{start_time,_},
+ {current_time,_},
+ {reductions,_},
+ {messages_in,2},
+ {messages_out,1}]} = sys:statistics(Mod,get),
+ ok = sys:statistics(Mod,false),
+ [] = sys:replace_state(Mod, fun(_) -> [] end),
+ process_flag(trap_exit,true),
+ ok = case catch sys:get_state(Mod) of
+ [] ->
+ ok;
+ {'EXIT',{{callback_failed,
+ {Mod,system_get_state},{throw,fail}},_}} ->
+ ok
+ end,
+ Mod:stop(),
+ WaitForUnregister = fun W() ->
+ case whereis(Mod) of
+ undefined -> ok;
+ _ -> timer:sleep(10), W()
+ end
+ end,
+ WaitForUnregister(),
+ {ok,_} = Mod:start_link(4),
+ ok = case catch sys:replace_state(Mod, fun(_) -> {} end) of
+ {} ->
+ ok;
+ {'EXIT',{{callback_failed,
+ {Mod,system_replace_state},{throw,fail}},_}} ->
+ ok
+ end,
+ Mod:stop(),
+ WaitForUnregister(),
+ {ok,_} = Mod:start_link(4),
+ StateFun = fun(_) -> error(fail) end,
+ ok = case catch sys:replace_state(Mod, StateFun) of
+ {} ->
+ ok;
+ {'EXIT',{{callback_failed,
+ {Mod,system_replace_state},{error,fail}},_}} ->
+ ok;
+ {'EXIT',{{callback_failed,StateFun,{error,fail}},_}} ->
+ ok
+ end,
+ Mod:stop().
+
%%%%%%%%%%%%%%%%%%%%
%% Dummy server
diff --git a/lib/stdlib/test/sys_sp1.erl b/lib/stdlib/test/sys_sp1.erl
new file mode 100644
index 0000000000..e84ffcfa12
--- /dev/null
+++ b/lib/stdlib/test/sys_sp1.erl
@@ -0,0 +1,114 @@
+%%
+%% %CopyrightBegin%
+%%
+%% Copyright Ericsson AB 1996-2013. 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(sys_sp1).
+-export([start_link/1, stop/0]).
+-export([alloc/0, free/1]).
+-export([init/1]).
+-export([system_continue/3, system_terminate/4,
+ write_debug/3,
+ system_get_state/1, system_replace_state/2]).
+
+%% Implements the ch4 example from the Design Principles doc. Same as
+%% sys_sp2 except this module exports system_get_state/1 and
+%% system_replace_state/2
+
+start_link(NumCh) ->
+ proc_lib:start_link(?MODULE, init, [[self(),NumCh]]).
+
+stop() ->
+ ?MODULE ! stop,
+ ok.
+
+alloc() ->
+ ?MODULE ! {self(), alloc},
+ receive
+ {?MODULE, Res} ->
+ Res
+ end.
+
+free(Ch) ->
+ ?MODULE ! {free, Ch},
+ ok.
+
+init([Parent,NumCh]) ->
+ register(?MODULE, self()),
+ Chs = channels(NumCh),
+ Deb = sys:debug_options([]),
+ proc_lib:init_ack(Parent, {ok, self()}),
+ loop(Chs, Parent, Deb).
+
+loop(Chs, Parent, Deb) ->
+ receive
+ {From, alloc} ->
+ Deb2 = sys:handle_debug(Deb, fun write_debug/3,
+ ?MODULE, {in, alloc, From}),
+ {Ch, Chs2} = alloc(Chs),
+ From ! {?MODULE, Ch},
+ Deb3 = sys:handle_debug(Deb2, fun write_debug/3,
+ ?MODULE, {out, {?MODULE, Ch}, From}),
+ loop(Chs2, Parent, Deb3);
+ {free, Ch} ->
+ Deb2 = sys:handle_debug(Deb, fun write_debug/3,
+ ?MODULE, {in, {free, Ch}}),
+ Chs2 = free(Ch, Chs),
+ loop(Chs2, Parent, Deb2);
+ {system, From, Request} ->
+ sys:handle_system_msg(Request, From, Parent,
+ ?MODULE, Deb, Chs);
+ stop ->
+ sys:handle_debug(Deb, fun write_debug/3,
+ ?MODULE, {in, stop}),
+ ok
+ end.
+
+system_continue(Parent, Deb, Chs) ->
+ loop(Chs, Parent, Deb).
+
+system_terminate(Reason, _Parent, _Deb, _Chs) ->
+ exit(Reason).
+
+system_get_state([]) ->
+ throw(fail);
+system_get_state(Chs) ->
+ {ok, Chs}.
+
+system_replace_state(_StateFun, {}) ->
+ throw(fail);
+system_replace_state(StateFun, Chs) ->
+ NChs = StateFun(Chs),
+ {ok, NChs, NChs}.
+
+write_debug(Dev, Event, Name) ->
+ io:format(Dev, "~p event = ~p~n", [Name, Event]).
+
+channels(NumCh) ->
+ {_Allocated=[], _Free=lists:seq(1,NumCh)}.
+
+alloc({_, []}) ->
+ {error, "no channels available"};
+alloc({Allocated, [H|T]}) ->
+ {H, {[H|Allocated], T}}.
+
+free(Ch, {Alloc, Free}=Channels) ->
+ case lists:member(Ch, Alloc) of
+ true ->
+ {lists:delete(Ch, Alloc), [Ch|Free]};
+ false ->
+ Channels
+ end.
diff --git a/lib/stdlib/test/sys_sp2.erl b/lib/stdlib/test/sys_sp2.erl
new file mode 100644
index 0000000000..56a5e4d071
--- /dev/null
+++ b/lib/stdlib/test/sys_sp2.erl
@@ -0,0 +1,107 @@
+%%
+%% %CopyrightBegin%
+%%
+%% Copyright Ericsson AB 1996-2013. 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(sys_sp2).
+-export([start_link/1, stop/0]).
+-export([alloc/0, free/1]).
+-export([init/1]).
+-export([system_continue/3, system_terminate/4,
+ write_debug/3]).
+
+%% Implements the ch4 example from the Design Principles doc. Same as
+%% sys_sp1 except this module does not export system_get_state/1 or
+%% system_replace_state/2
+
+start_link(NumCh) ->
+ proc_lib:start_link(?MODULE, init, [[self(),NumCh]]).
+
+stop() ->
+ ?MODULE ! stop,
+ ok.
+
+alloc() ->
+ ?MODULE ! {self(), alloc},
+ receive
+ {?MODULE, Res} ->
+ Res
+ end.
+
+free(Ch) ->
+ ?MODULE ! {free, Ch},
+ ok.
+
+%% can't use 2-tuple for state here as we do in sys_sp1, since the 2-tuple
+%% is not compatible with the backward compatibility handling for
+%% sys:get_state in sys.erl
+-record(state, {alloc,free}).
+
+init([Parent,NumCh]) ->
+ register(?MODULE, self()),
+ Chs = channels(NumCh),
+ Deb = sys:debug_options([]),
+ proc_lib:init_ack(Parent, {ok, self()}),
+ loop(Chs, Parent, Deb).
+
+loop(Chs, Parent, Deb) ->
+ receive
+ {From, alloc} ->
+ Deb2 = sys:handle_debug(Deb, fun write_debug/3,
+ ?MODULE, {in, alloc, From}),
+ {Ch, Chs2} = alloc(Chs),
+ From ! {?MODULE, Ch},
+ Deb3 = sys:handle_debug(Deb2, fun write_debug/3,
+ ?MODULE, {out, {?MODULE, Ch}, From}),
+ loop(Chs2, Parent, Deb3);
+ {free, Ch} ->
+ Deb2 = sys:handle_debug(Deb, fun write_debug/3,
+ ?MODULE, {in, {free, Ch}}),
+ Chs2 = free(Ch, Chs),
+ loop(Chs2, Parent, Deb2);
+ {system, From, Request} ->
+ sys:handle_system_msg(Request, From, Parent,
+ ?MODULE, Deb, Chs);
+ stop ->
+ sys:handle_debug(Deb, fun write_debug/3,
+ ?MODULE, {in, stop}),
+ ok
+ end.
+
+system_continue(Parent, Deb, Chs) ->
+ loop(Chs, Parent, Deb).
+
+system_terminate(Reason, _Parent, _Deb, _Chs) ->
+ exit(Reason).
+
+write_debug(Dev, Event, Name) ->
+ io:format(Dev, "~p event = ~p~n", [Name, Event]).
+
+channels(NumCh) ->
+ #state{alloc=[], free=lists:seq(1,NumCh)}.
+
+alloc(#state{free=[]}=Channels) ->
+ {{error, "no channels available"}, Channels};
+alloc(#state{alloc=Allocated, free=[H|T]}) ->
+ {H, #state{alloc=[H|Allocated], free=T}}.
+
+free(Ch, #state{alloc=Alloc, free=Free}=Channels) ->
+ case lists:member(Ch, Alloc) of
+ true ->
+ #state{alloc=lists:delete(Ch, Alloc), free=[Ch|Free]};
+ false ->
+ Channels
+ end.
diff --git a/lib/stdlib/test/tar_SUITE.erl b/lib/stdlib/test/tar_SUITE.erl
index 5bc34e35af..6349139925 100644
--- a/lib/stdlib/test/tar_SUITE.erl
+++ b/lib/stdlib/test/tar_SUITE.erl
@@ -23,7 +23,7 @@
create_long_names/1, bad_tar/1, errors/1, extract_from_binary/1,
extract_from_binary_compressed/1,
extract_from_open_file/1, symlinks/1, open_add_close/1, cooked_compressed/1,
- memory/1]).
+ memory/1,unicode/1]).
-include_lib("test_server/include/test_server.hrl").
-include_lib("kernel/include/file.hrl").
@@ -34,7 +34,7 @@ all() ->
[borderline, atomic, long_names, create_long_names,
bad_tar, errors, extract_from_binary,
extract_from_binary_compressed, extract_from_open_file,
- symlinks, open_add_close, cooked_compressed, memory].
+ symlinks, open_add_close, cooked_compressed, memory, unicode].
groups() ->
[].
@@ -73,6 +73,7 @@ borderline(Config) when is_list(Config) ->
?line lists:foreach(fun(Size) -> borderline_test(Size, TempDir) end,
[0, 1, 10, 13, 127, 333, Record-1, Record, Record+1,
+ Block-2*Record-1, Block-2*Record, Block-2*Record+1,
Block-Record-1, Block-Record, Block-Record+1,
Block-1, Block, Block+1,
Block+Record-1, Block+Record, Block+Record+1]),
@@ -726,6 +727,56 @@ memory(Config) when is_list(Config) ->
?line ok = delete_files([Name1,Name2]),
ok.
+%% Test filenames with characters outside the US ASCII range.
+unicode(Config) when is_list(Config) ->
+ PrivDir = ?config(priv_dir, Config),
+ do_unicode(PrivDir),
+ case has_transparent_naming() of
+ true ->
+ Pa = filename:dirname(code:which(?MODULE)),
+ Node = start_node(unicode, "+fnl -pa "++Pa),
+ ok = rpc:call(Node, erlang, apply,
+ [fun() -> do_unicode(PrivDir) end,[]]),
+ true = test_server:stop_node(Node),
+ ok;
+ false ->
+ ok
+ end.
+
+has_transparent_naming() ->
+ case os:type() of
+ {unix,darwin} -> false;
+ {unix,_} -> true;
+ _ -> false
+ end.
+
+do_unicode(PrivDir) ->
+ ok = file:set_cwd(PrivDir),
+ ok = file:make_dir("unicöde"),
+
+ Names = unicode_create_files(),
+ Tar = "unicöde.tar",
+ ok = erl_tar:create(Tar, ["unicöde"], []),
+ {ok,Names} = erl_tar:table(Tar, []),
+ _ = [ok = file:delete(Name) || Name <- Names],
+ ok = erl_tar:extract(Tar),
+ _ = [{ok,_} = file:read_file(Name) || Name <- Names],
+ _ = [ok = file:delete(Name) || Name <- Names],
+ ok = file:del_dir("unicöde"),
+ ok.
+
+unicode_create_files() ->
+ FileA = "unicöde/smörgåsbord",
+ ok = file:write_file(FileA, "yum!\n"),
+ [FileA|case file:native_name_encoding() of
+ utf8 ->
+ FileB = "unicöde/Хороший файл!",
+ ok = file:write_file(FileB, "But almost empty.\n"),
+ [FileB];
+ latin1 ->
+ []
+ end].
+
%% Delete the given list of files.
delete_files([]) -> ok;
delete_files([Item|Rest]) ->
@@ -791,3 +842,14 @@ make_temp_dir(Base, I) ->
ok -> Name;
{error,eexist} -> make_temp_dir(Base, I+1)
end.
+
+start_node(Name, Args) ->
+ [_,Host] = string:tokens(atom_to_list(node()), "@"),
+ ct:log("Trying to start ~w@~s~n", [Name,Host]),
+ case test_server:start_node(Name, peer, [{args,Args}]) of
+ {error,Reason} ->
+ test_server:fail(Reason);
+ {ok,Node} ->
+ ct:log("Node ~p started~n", [Node]),
+ Node
+ end.
diff --git a/lib/stdlib/test/unicode_SUITE.erl b/lib/stdlib/test/unicode_SUITE.erl
index e2d789bbe6..10b29d0d28 100644
--- a/lib/stdlib/test/unicode_SUITE.erl
+++ b/lib/stdlib/test/unicode_SUITE.erl
@@ -1,7 +1,7 @@
%%
%% %CopyrightBegin%
%%
-%% Copyright Ericsson AB 2008-2013. All Rights Reserved.
+%% Copyright Ericsson AB 2008-2014. 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
@@ -98,7 +98,7 @@ ex_binaries_errors_utf8(Config) when is_list(Config) ->
unicode:characters_to_list(Chomped),
BrokenPart = iolist_to_binary(DeepBrokenPart2)
end || X <- lists:seq(1,OKLen) ]
- end || N <- lists:seq(1,20) ],
+ end || N <- lists:seq(1,21,4) ],
ok.
ex_binaries_errors_utf16_little(Config) when is_list(Config) ->
@@ -124,7 +124,7 @@ ex_binaries_errors_utf16_little(Config) when is_list(Config) ->
unicode:characters_to_list(Chomped,{utf16,little}),
BrokenPart = iolist_to_binary(DeepBrokenPart2)
end || X <- lists:seq(1,OKLen) ]
- end || N <- lists:seq(1,15) ],
+ end || N <- lists:seq(1,16,3) ],
ok.
ex_binaries_errors_utf16_big(Config) when is_list(Config) ->
BrokenPart = << <<X:16/big>> || X <- lists:seq(16#DC00,16#DFFF) >>,
@@ -149,7 +149,7 @@ ex_binaries_errors_utf16_big(Config) when is_list(Config) ->
unicode:characters_to_list(Chomped,{utf16,big}),
BrokenPart = iolist_to_binary(DeepBrokenPart2)
end || X <- lists:seq(1,OKLen) ]
- end || N <- lists:seq(1,15) ],
+ end || N <- lists:seq(1,16,3) ],
ok.
ex_binaries_errors_utf32_big(Config) when is_list(Config) ->
@@ -175,7 +175,7 @@ ex_binaries_errors_utf32_big(Config) when is_list(Config) ->
unicode:characters_to_list(Chomped,{utf32,big}),
BrokenPart = iolist_to_binary(DeepBrokenPart2)
end || X <- lists:seq(1,OKLen) ]
- end || N <- lists:seq(1,15) ],
+ end || N <- lists:seq(1,16,3) ],
ok.
ex_binaries_errors_utf32_little(Config) when is_list(Config) ->
@@ -201,7 +201,7 @@ ex_binaries_errors_utf32_little(Config) when is_list(Config) ->
unicode:characters_to_list(Chomped,{utf32,little}),
BrokenPart = iolist_to_binary(DeepBrokenPart2)
end || X <- lists:seq(1,OKLen) ]
- end || N <- lists:seq(1,15) ],
+ end || N <- lists:seq(1,16,3) ],
ok.
diff --git a/lib/syntax_tools/doc/src/notes.xml b/lib/syntax_tools/doc/src/notes.xml
index 4b3d578c78..4e1e6d8cb1 100644
--- a/lib/syntax_tools/doc/src/notes.xml
+++ b/lib/syntax_tools/doc/src/notes.xml
@@ -31,6 +31,88 @@
<p>This document describes the changes made to the Syntax_Tools
application.</p>
+<section><title>Syntax_Tools 1.6.14</title>
+
+ <section><title>Fixed Bugs and Malfunctions</title>
+ <list>
+ <item>
+ <p>
+ Application upgrade (appup) files are corrected for the
+ following applications: </p>
+ <p>
+ <c>asn1, common_test, compiler, crypto, debugger,
+ dialyzer, edoc, eldap, erl_docgen, et, eunit, gs, hipe,
+ inets, observer, odbc, os_mon, otp_mibs, parsetools,
+ percept, public_key, reltool, runtime_tools, ssh,
+ syntax_tools, test_server, tools, typer, webtool, wx,
+ xmerl</c></p>
+ <p>
+ A new test utility for testing appup files is added to
+ test_server. This is now used by most applications in
+ OTP.</p>
+ <p>
+ (Thanks to Tobias Schlager)</p>
+ <p>
+ Own Id: OTP-11744</p>
+ </item>
+ </list>
+ </section>
+
+
+ <section><title>Improvements and New Features</title>
+ <list>
+ <item>
+ <p>
+ Add implementation of having erl_tidy print to screen
+ instead of writing to the file provided. (Thanks to Aaron
+ France)</p>
+ <p>
+ Own Id: OTP-11632</p>
+ </item>
+ <item>
+ <p>
+ Support Maps syntax in syntax_tools (Thanks to Anthony
+ Ramine).</p>
+ <p>
+ Own Id: OTP-11663</p>
+ </item>
+ </list>
+ </section>
+
+</section>
+
+<section><title>Syntax_Tools 1.6.13</title>
+
+ <section><title>Fixed Bugs and Malfunctions</title>
+ <list>
+ <item>
+ <p>
+ In syntax_tools-1.6.12 (OTP R16B03) a bug was introduced
+ which broke reverting of local implicit funs. Implicit
+ funs were mistakenly thought to be using abstract terms
+ for their name and arity. This has now been corrected.
+ (Thanks to Anthony Ramine)</p>
+ <p>
+ Own Id: OTP-11576</p>
+ </item>
+ </list>
+ </section>
+
+
+ <section><title>Improvements and New Features</title>
+ <list>
+ <item>
+ <p> The default encoding of Erlang files has been changed
+ from ISO-8859-1 to UTF-8. </p> <p> The encoding of XML
+ files has also been changed to UTF-8. </p>
+ <p>
+ Own Id: OTP-10907</p>
+ </item>
+ </list>
+ </section>
+
+</section>
+
<section><title>Syntax_Tools 1.6.12</title>
<section><title>Fixed Bugs and Malfunctions</title>
diff --git a/lib/syntax_tools/src/erl_prettypr.erl b/lib/syntax_tools/src/erl_prettypr.erl
index 1ffcf31134..877675772f 100644
--- a/lib/syntax_tools/src/erl_prettypr.erl
+++ b/lib/syntax_tools/src/erl_prettypr.erl
@@ -637,6 +637,14 @@ lay_2(Node, Ctxt) ->
sep([follow(text("fun"), D, Ctxt1#ctxt.sub_indent),
text("end")]);
+ named_fun_expr ->
+ Ctxt1 = reset_prec(Ctxt),
+ D1 = lay(erl_syntax:named_fun_expr_name(Node), Ctxt1),
+ D = lay_clauses(erl_syntax:named_fun_expr_clauses(Node),
+ {function,D1}, Ctxt1),
+ sep([follow(text("fun"), D, Ctxt1#ctxt.sub_indent),
+ text("end")]);
+
module_qualifier ->
{PrecL, _Prec, PrecR} = inop_prec(':'),
D1 = lay(erl_syntax:module_qualifier_argument(Node),
@@ -892,6 +900,32 @@ lay_2(Node, Ctxt) ->
beside(floating(text(".")), D2)),
maybe_parentheses(D3, Prec, Ctxt);
+ map_expr ->
+ {PrecL, Prec, _} = inop_prec('#'),
+ Ctxt1 = reset_prec(Ctxt),
+ D1 = par(seq(erl_syntax:map_expr_fields(Node),
+ floating(text(",")), Ctxt1, fun lay/2)),
+ D2 = beside(text("#{"), beside(D1, floating(text("}")))),
+ D3 = case erl_syntax:map_expr_argument(Node) of
+ none ->
+ D2;
+ A ->
+ beside(lay(A, set_prec(Ctxt, PrecL)), D2)
+ end,
+ maybe_parentheses(D3, Prec, Ctxt);
+
+ map_field_assoc ->
+ Ctxt1 = reset_prec(Ctxt),
+ D1 = lay(erl_syntax:map_field_assoc_name(Node), Ctxt1),
+ D2 = lay(erl_syntax:map_field_assoc_value(Node), Ctxt1),
+ par([D1, floating(text("=>")), D2], Ctxt1#ctxt.break_indent);
+
+ map_field_exact ->
+ Ctxt1 = reset_prec(Ctxt),
+ D1 = lay(erl_syntax:map_field_exact_name(Node), Ctxt1),
+ D2 = lay(erl_syntax:map_field_exact_value(Node), Ctxt1),
+ par([D1, floating(text(":=")), D2], Ctxt1#ctxt.break_indent);
+
rule ->
%% Comments on the name will be repeated; cf.
%% `function'.
diff --git a/lib/syntax_tools/src/erl_syntax.erl b/lib/syntax_tools/src/erl_syntax.erl
index 5911502960..46a5ca48df 100644
--- a/lib/syntax_tools/src/erl_syntax.erl
+++ b/lib/syntax_tools/src/erl_syntax.erl
@@ -220,6 +220,16 @@
macro/2,
macro_arguments/1,
macro_name/1,
+ map_expr/1,
+ map_expr/2,
+ map_expr_argument/1,
+ map_expr_fields/1,
+ map_field_assoc/2,
+ map_field_assoc_name/1,
+ map_field_assoc_value/1,
+ map_field_exact/2,
+ map_field_exact_name/1,
+ map_field_exact_value/1,
match_expr/2,
match_expr_body/1,
match_expr_pattern/1,
@@ -443,33 +453,38 @@
%% </tr><tr>
%% <td>list_comp</td>
%% <td>macro</td>
+%% <td>map_expr</td>
+%% <td>map_field_assoc</td>
+%% </tr><tr>
+%% <td>map_field_exact</td>
%% <td>match_expr</td>
%% <td>module_qualifier</td>
-%% </tr><tr>
%% <td>named_fun_expr</td>
+%% </tr><tr>
%% <td>nil</td>
%% <td>operator</td>
%% <td>parentheses</td>
-%% </tr><tr>
%% <td>prefix_expr</td>
+%% </tr><tr>
%% <td>receive_expr</td>
%% <td>record_access</td>
%% <td>record_expr</td>
-%% </tr><tr>
%% <td>record_field</td>
+%% </tr><tr>
%% <td>record_index_expr</td>
%% <td>rule</td>
%% <td>size_qualifier</td>
-%% </tr><tr>
%% <td>string</td>
+%% </tr><tr>
%% <td>text</td>
%% <td>try_expr</td>
%% <td>tuple</td>
-%% </tr><tr>
%% <td>underscore</td>
+%% </tr><tr>
%% <td>variable</td>
%% <td>warning_marker</td>
%% <td></td>
+%% <td></td>
%% </tr>
%% </table></center>
%%
@@ -510,9 +525,12 @@
%% @see list/2
%% @see list_comp/2
%% @see macro/2
+%% @see map_expr/2
+%% @see map_field_assoc/2
+%% @see map_field_exact/2
%% @see match_expr/2
%% @see module_qualifier/2
-%% @see named_fun_expr/1
+%% @see named_fun_expr/2
%% @see nil/0
%% @see operator/1
%% @see parentheses/1
@@ -580,6 +598,10 @@ type(Node) ->
{lc, _, _, _} -> list_comp;
{bc, _, _, _} -> binary_comp;
{match, _, _, _} -> match_expr;
+ {map, _, _, _} -> map_expr;
+ {map, _, _} -> map_expr;
+ {map_field_assoc, _, _, _} -> map_field_assoc;
+ {map_field_exact, _, _, _} -> map_field_exact;
{op, _, _, _, _} -> infix_expr;
{op, _, _, _} -> prefix_expr;
{record, _, _, _, _} -> record_expr;
@@ -1910,6 +1932,208 @@ atom_literal(Node) ->
%% =====================================================================
+%% @equiv map_expr(none, Fields)
+
+-spec map_expr([syntaxTree()]) -> syntaxTree().
+
+map_expr(Fields) ->
+ map_expr(none, Fields).
+
+
+%% =====================================================================
+%% @doc Creates an abstract map expression. If `Fields' is
+%% `[F1, ..., Fn]', then if `Argument' is `none', the result represents
+%% "<code>#{<em>F1</em>, ..., <em>Fn</em>}</code>",
+%% otherwise it represents
+%% "<code><em>Argument</em>#{<em>F1</em>, ..., <em>Fn</em>}</code>".
+%%
+%% @see map_expr/1
+%% @see map_expr_argument/1
+%% @see map_expr_fields/1
+%% @see map_field_assoc/2
+%% @see map_field_exact/2
+
+-record(map_expr, {argument :: 'none' | syntaxTree(),
+ fields :: [syntaxTree()]}).
+
+%% `erl_parse' representation:
+%%
+%% {map, Pos, Fields}
+%% {map, Pos, Argument, Fields}
+
+-spec map_expr('none' | syntaxTree(), [syntaxTree()]) -> syntaxTree().
+
+map_expr(Argument, Fields) ->
+ tree(map_expr, #map_expr{argument = Argument, fields = Fields}).
+
+revert_map_expr(Node) ->
+ Pos = get_pos(Node),
+ Argument = map_expr_argument(Node),
+ Fields = map_expr_fields(Node),
+ case Argument of
+ none ->
+ {map, Pos, Fields};
+ _ ->
+ {map, Pos, Argument, Fields}
+ end.
+
+
+%% =====================================================================
+%% @doc Returns the argument subtree of a `map_expr' node, if any. If `Node'
+%% represents "<code>#{...}</code>", `none' is returned.
+%% Otherwise, if `Node' represents "<code><em>Argument</em>#{...}</code>",
+%% `Argument' is returned.
+%%
+%% @see map_expr/2
+
+-spec map_expr_argument(syntaxTree()) -> 'none' | syntaxTree().
+
+map_expr_argument(Node) ->
+ case unwrap(Node) of
+ {map, _, _} ->
+ none;
+ {map, _, Argument, _} ->
+ Argument;
+ Node1 ->
+ (data(Node1))#map_expr.argument
+ end.
+
+
+%% =====================================================================
+%% @doc Returns the list of field subtrees of a `map_expr' node.
+%%
+%% @see map_expr/2
+
+-spec map_expr_fields(syntaxTree()) -> [syntaxTree()].
+
+map_expr_fields(Node) ->
+ case unwrap(Node) of
+ {map, _, Fields} ->
+ Fields;
+ {map, _, _, Fields} ->
+ Fields;
+ Node1 ->
+ (data(Node1))#map_expr.fields
+ end.
+
+
+%% =====================================================================
+%% @doc Creates an abstract map assoc field. The result represents
+%% "<code><em>Name</em> => <em>Value</em></code>".
+%%
+%% @see map_field_assoc_name/1
+%% @see map_field_assoc_value/1
+%% @see map_expr/2
+
+-record(map_field_assoc, {name :: syntaxTree(), value :: syntaxTree()}).
+
+%% `erl_parse' representation:
+%%
+%% {map_field_assoc, Pos, Name, Value}
+
+-spec map_field_assoc(syntaxTree(), syntaxTree()) -> syntaxTree().
+
+map_field_assoc(Name, Value) ->
+ tree(map_field_assoc, #map_field_assoc{name = Name, value = Value}).
+
+revert_map_field_assoc(Node) ->
+ Pos = get_pos(Node),
+ Name = map_field_assoc_name(Node),
+ Value = map_field_assoc_value(Node),
+ {map_field_assoc, Pos, Name, Value}.
+
+
+%% =====================================================================
+%% @doc Returns the name subtree of a `map_field_assoc' node.
+%%
+%% @see map_field_assoc/2
+
+-spec map_field_assoc_name(syntaxTree()) -> syntaxTree().
+
+map_field_assoc_name(Node) ->
+ case Node of
+ {map_field_assoc, _, Name, _} ->
+ Name;
+ _ ->
+ (data(Node))#map_field_assoc.name
+ end.
+
+
+%% =====================================================================
+%% @doc Returns the value subtree of a `map_field_assoc' node.
+%%
+%% @see map_field_assoc/2
+
+-spec map_field_assoc_value(syntaxTree()) -> syntaxTree().
+
+map_field_assoc_value(Node) ->
+ case Node of
+ {map_field_assoc, _, _, Value} ->
+ Value;
+ _ ->
+ (data(Node))#map_field_assoc.value
+ end.
+
+
+%% =====================================================================
+%% @doc Creates an abstract map exact field. The result represents
+%% "<code><em>Name</em> := <em>Value</em></code>".
+%%
+%% @see map_field_exact_name/1
+%% @see map_field_exact_value/1
+%% @see map_expr/2
+
+-record(map_field_exact, {name :: syntaxTree(), value :: syntaxTree()}).
+
+%% `erl_parse' representation:
+%%
+%% {map_field_exact, Pos, Name, Value}
+
+-spec map_field_exact(syntaxTree(), syntaxTree()) -> syntaxTree().
+
+map_field_exact(Name, Value) ->
+ tree(map_field_exact, #map_field_exact{name = Name, value = Value}).
+
+revert_map_field_exact(Node) ->
+ Pos = get_pos(Node),
+ Name = map_field_exact_name(Node),
+ Value = map_field_exact_value(Node),
+ {map_field_exact, Pos, Name, Value}.
+
+
+%% =====================================================================
+%% @doc Returns the name subtree of a `map_field_exact' node.
+%%
+%% @see map_field_exact/2
+
+-spec map_field_exact_name(syntaxTree()) -> syntaxTree().
+
+map_field_exact_name(Node) ->
+ case Node of
+ {map_field_exact, _, Name, _} ->
+ Name;
+ _ ->
+ (data(Node))#map_field_exact.name
+ end.
+
+
+%% =====================================================================
+%% @doc Returns the value subtree of a `map_field_exact' node.
+%%
+%% @see map_field_exact/2
+
+-spec map_field_exact_value(syntaxTree()) -> syntaxTree().
+
+map_field_exact_value(Node) ->
+ case Node of
+ {map_field_exact, _, _, Value} ->
+ Value;
+ _ ->
+ (data(Node))#map_field_exact.value
+ end.
+
+
+%% =====================================================================
%% @doc Creates an abstract tuple. If `Elements' is
%% `[X1, ..., Xn]', the result represents
%% "<code>{<em>X1</em>, ..., <em>Xn</em>}</code>".
@@ -5493,7 +5717,13 @@ revert_implicit_fun(Node) ->
arity_qualifier ->
F = arity_qualifier_body(Name),
A = arity_qualifier_argument(Name),
- {'fun', Pos, {function, F, A}};
+ case {type(F), type(A)} of
+ {atom, integer} ->
+ {'fun', Pos,
+ {function, concrete(F), concrete(A)}};
+ _ ->
+ Node
+ end;
module_qualifier ->
M = module_qualifier_argument(Name),
Name1 = module_qualifier_body(Name),
@@ -5660,15 +5890,15 @@ fun_expr_arity(Node) ->
-spec named_fun_expr(syntaxTree(), [syntaxTree()]) -> syntaxTree().
named_fun_expr(Name, Clauses) ->
- tree(fun_expr, #named_fun_expr{name = Name, clauses = Clauses}).
+ tree(named_fun_expr, #named_fun_expr{name = Name, clauses = Clauses}).
revert_named_fun_expr(Node) ->
Pos = get_pos(Node),
Name = named_fun_expr_name(Node),
Clauses = [revert_clause(C) || C <- named_fun_expr_clauses(Node)],
case type(Name) of
- var ->
- {named_fun, Pos, concrete(Name), Clauses};
+ variable ->
+ {named_fun, Pos, variable_name(Name), Clauses};
_ ->
Node
end.
@@ -5684,7 +5914,7 @@ revert_named_fun_expr(Node) ->
named_fun_expr_name(Node) ->
case unwrap(Node) of
{named_fun, Pos, Name, _} ->
- set_pos(atom(Name), Pos);
+ set_pos(variable(Name), Pos);
Node1 ->
(data(Node1))#named_fun_expr.name
end.
@@ -5693,7 +5923,7 @@ named_fun_expr_name(Node) ->
%% =====================================================================
%% @doc Returns the list of clause subtrees of a `named_fun_expr' node.
%%
-%% @see named_fun_expr/1
+%% @see named_fun_expr/2
-spec named_fun_expr_clauses(syntaxTree()) -> [syntaxTree()].
@@ -5716,7 +5946,7 @@ named_fun_expr_clauses(Node) ->
%% syntax tree `C' of type `clause' such that
%% `clause_patterns(C)' is a nonempty list.
%%
-%% @see named_fun_expr/1
+%% @see named_fun_expr/2
%% @see named_fun_expr_clauses/1
%% @see clause/3
%% @see clause_patterns/1
@@ -6086,6 +6316,12 @@ revert_root(Node) ->
revert_list(Node);
list_comp ->
revert_list_comp(Node);
+ map_expr ->
+ revert_map_expr(Node);
+ map_field_assoc ->
+ revert_map_field_assoc(Node);
+ map_field_exact ->
+ revert_map_field_exact(Node);
match_expr ->
revert_match_expr(Node);
module_qualifier ->
@@ -6327,6 +6563,19 @@ subtrees(T) ->
As ->
[[macro_name(T)], As]
end;
+ map_expr ->
+ case map_expr_argument(T) of
+ none ->
+ [map_expr_fields(T)];
+ V ->
+ [[V], map_expr_fields(T)]
+ end;
+ map_field_assoc ->
+ [[map_field_assoc_name(T)],
+ [map_field_assoc_value(T)]];
+ map_field_exact ->
+ [[map_field_exact_name(T)],
+ [map_field_exact_value(T)]];
match_expr ->
[[match_expr_pattern(T)],
[match_expr_body(T)]];
@@ -6465,6 +6714,10 @@ make_tree(list, [P, [S]]) -> list(P, S);
make_tree(list_comp, [[T], B]) -> list_comp(T, B);
make_tree(macro, [[N]]) -> macro(N);
make_tree(macro, [[N], A]) -> macro(N, A);
+make_tree(map_expr, [Fs]) -> map_expr(Fs);
+make_tree(map_expr, [[E], Fs]) -> map_expr(E, Fs);
+make_tree(map_field_assoc, [[K], [V]]) -> map_field_assoc(K, V);
+make_tree(map_field_exact, [[K], [V]]) -> map_field_exact(K, V);
make_tree(match_expr, [[P], [E]]) -> match_expr(P, E);
make_tree(named_fun_expr, [[N], C]) -> named_fun_expr(N, C);
make_tree(module_qualifier, [[M], [N]]) -> module_qualifier(M, N);
diff --git a/lib/syntax_tools/src/erl_syntax_lib.erl b/lib/syntax_tools/src/erl_syntax_lib.erl
index e4665b99fc..2f0488abec 100644
--- a/lib/syntax_tools/src/erl_syntax_lib.erl
+++ b/lib/syntax_tools/src/erl_syntax_lib.erl
@@ -288,7 +288,7 @@ mapfoldl(_, S, []) ->
%%
%% @see //stdlib/sets
--spec variables(erl_syntax:syntaxTree()) -> set().
+-spec variables(erl_syntax:syntaxTree()) -> sets:set(atom()).
variables(Tree) ->
variables(Tree, sets:new()).
@@ -343,7 +343,7 @@ default_variable_name(N) ->
%%
%% @see new_variable_name/2
--spec new_variable_name(set()) -> atom().
+-spec new_variable_name(sets:set(atom())) -> atom().
new_variable_name(S) ->
new_variable_name(fun default_variable_name/1, S).
@@ -369,7 +369,7 @@ new_variable_name(S) ->
%% @see //stdlib/sets
%% @see //stdlib/random
--spec new_variable_name(fun((integer()) -> atom()), set()) -> atom().
+-spec new_variable_name(fun((integer()) -> atom()), sets:set(atom())) -> atom().
new_variable_name(F, S) ->
R = start_range(S),
@@ -416,7 +416,7 @@ generate(_Key, Range) ->
%%
%% @see new_variable_name/1
--spec new_variable_names(integer(), set()) -> [atom()].
+-spec new_variable_names(integer(), sets:set(atom())) -> [atom()].
new_variable_names(N, S) ->
new_variable_names(N, fun default_variable_name/1, S).
@@ -432,7 +432,7 @@ new_variable_names(N, S) ->
%%
%% @see new_variable_name/2
--spec new_variable_names(integer(), fun((integer()) -> atom()), set()) ->
+-spec new_variable_names(integer(), fun((integer()) -> atom()), sets:set(atom())) ->
[atom()].
new_variable_names(N, F, S) when is_integer(N) ->
diff --git a/lib/syntax_tools/src/erl_tidy.erl b/lib/syntax_tools/src/erl_tidy.erl
index 0c149634f6..38e0c2099b 100644
--- a/lib/syntax_tools/src/erl_tidy.erl
+++ b/lib/syntax_tools/src/erl_tidy.erl
@@ -14,7 +14,7 @@
%% Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307
%% USA
%%
-%% @copyright 1999-2006 Richard Carlsson
+%% @copyright 1999-2014 Richard Carlsson
%% @author Richard Carlsson <[email protected]>
%% @end
%% =====================================================================
@@ -269,6 +269,13 @@ file(Name) ->
%% is typically most useful if the `verbose' flag is enabled, to
%% generate reports about the program files without affecting
%% them. The default value is `false'.</dd>
+%%
+%% <dt>{stdout, boolean()}</dt>
+%%
+%% <dd>If the value is `true', instead of the file being written
+%% to disk it will be printed to stdout. The default value is
+%% `false'.</dd>
+%%
%% </dl>
%%
%% See the function `module/2' for further options.
@@ -309,9 +316,15 @@ file_2(Name, Opts) ->
true ->
ok;
false ->
- write_module(Tree, Name, Opts1),
- ok
- end.
+ case proplists:get_bool(stdout, Opts1) of
+ true ->
+ print_module(Tree, Opts1),
+ ok;
+ false ->
+ write_module(Tree, Name, Opts1),
+ ok
+ end
+ end.
read_module(Name, Opts) ->
verbose("reading module `~ts'.", [filename(Name)], Opts),
@@ -399,6 +412,10 @@ write_module(Tree, Name, Opts) ->
throw(R)
end.
+print_module(Tree, Opts) ->
+ Printer = proplists:get_value(printer, Opts),
+ io:format(Printer(Tree, Opts)).
+
output(FD, Printer, Tree, Opts) ->
io:put_chars(FD, Printer(Tree, Opts)),
io:nl(FD).
@@ -941,7 +958,7 @@ hidden_uses_2(Tree, Used) ->
-record(env, {file :: file:filename(),
module :: atom(),
current :: fa(),
- imports = dict:new() :: dict(),
+ imports = dict:new() :: dict:dict(atom(), atom()),
context = normal :: context(),
verbosity = 1 :: 0 | 1 | 2,
quiet = false :: boolean(),
@@ -953,12 +970,12 @@ hidden_uses_2(Tree, Used) ->
old_guard_tests = false :: boolean()}).
-record(st, {varc :: non_neg_integer(),
- used = sets:new() :: set(),
- imported :: set(),
- vars :: set(),
- functions :: set(),
+ used = sets:new() :: sets:set({atom(), arity()}),
+ imported :: sets:set({atom(), arity()}),
+ vars :: sets:set(atom()),
+ functions :: sets:set({atom(), arity()}),
new_forms = [] :: [erl_syntax:syntaxTree()],
- rename :: dict()}).
+ rename :: dict:dict(mfa(), {atom(), atom()})}).
visit_used(Names, Defs, Roots, Imports, Module, Opts) ->
File = proplists:get_value(file, Opts, ""),
diff --git a/lib/syntax_tools/src/igor.erl b/lib/syntax_tools/src/igor.erl
index 19b1cd592f..0420508f2a 100644
--- a/lib/syntax_tools/src/igor.erl
+++ b/lib/syntax_tools/src/igor.erl
@@ -14,7 +14,7 @@
%% Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307
%% USA
%%
-%% @copyright 1998-2006 Richard Carlsson
+%% @copyright 1998-2014 Richard Carlsson
%% @author Richard Carlsson <[email protected]>
%% @end
%% =====================================================================
@@ -695,7 +695,7 @@ merge_files1(Files, Opts) ->
preserved :: boolean(),
no_headers :: boolean(),
notes :: notes(),
- redirect :: dict(), % = dict(atom(), atom())
+ redirect :: dict:dict(atom(), atom()),
no_imports :: ordsets:ordset(atom()),
options :: [option()]
}).
@@ -727,7 +727,7 @@ merge_sources(Name, Sources, Opts) ->
%% Data structure for keeping state during transformation.
--record(state, {export :: set()}).
+-record(state, {export :: sets:set({atom(), arity()})}).
state__add_export(Name, Arity, S) ->
S#state{export = sets:add_element({Name, Arity},
@@ -1039,7 +1039,7 @@ make_stub(M, Map, Env) ->
-type atts() :: 'delete' | 'kill'.
-type file_atts() :: 'delete' | 'keep' | 'kill'.
--record(filter, {records :: set(),
+-record(filter, {records :: sets:set(atom()),
file_attributes :: file_atts(),
attributes :: atts()}).
@@ -1588,17 +1588,17 @@ alias_expansions_2(Modules, Table) ->
-record(code, {module :: atom(),
target :: atom(),
- sources :: set(), % set(atom()),
- static :: set(), % set(atom()),
- safe :: set(), % set(atom()),
+ sources :: sets:set(atom()),
+ static :: sets:set(atom()),
+ safe :: sets:set(atom()),
preserved :: boolean(),
no_headers :: boolean(),
notes :: notes(),
map :: map_fun(),
renaming :: fun((atom()) -> map_fun()),
- expand :: dict(), % = dict({atom(), integer()},
- % {atom(), {atom(), integer()}})
- redirect :: dict() % = dict(atom(), atom())
+ expand :: dict:dict({atom(), integer()},
+ {atom(), {atom(), integer()}}),
+ redirect :: dict:dict(atom(), atom())
}).
%% `Trees' must be a list of syntax trees of type `form_list'. The
diff --git a/lib/syntax_tools/src/syntax_tools.app.src b/lib/syntax_tools/src/syntax_tools.app.src
index dc0b9edd62..83dcb5fe23 100644
--- a/lib/syntax_tools/src/syntax_tools.app.src
+++ b/lib/syntax_tools/src/syntax_tools.app.src
@@ -14,4 +14,5 @@
prettypr]},
{registered,[]},
{applications, [stdlib]},
- {env, []}]}.
+ {env, []},
+ {runtime_dependencies, ["stdlib-2.0","kernel-3.0","erts-6.0"]}]}.
diff --git a/lib/syntax_tools/src/syntax_tools.appup.src b/lib/syntax_tools/src/syntax_tools.appup.src
index 54a63833e6..89c25d14d7 100644
--- a/lib/syntax_tools/src/syntax_tools.appup.src
+++ b/lib/syntax_tools/src/syntax_tools.appup.src
@@ -1 +1,21 @@
-{"%VSN%",[],[]}.
+%% -*- erlang -*-
+%% %CopyrightBegin%
+%%
+%% Copyright Ericsson AB 2014. 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%
+{"%VSN%",
+ [{<<".*">>,[{restart_application, syntax_tools}]}],
+ [{<<".*">>,[{restart_application, syntax_tools}]}]
+}.
diff --git a/lib/syntax_tools/test/syntax_tools_SUITE.erl b/lib/syntax_tools/test/syntax_tools_SUITE.erl
index fd381f0b25..6fb3e5ccfb 100644
--- a/lib/syntax_tools/test/syntax_tools_SUITE.erl
+++ b/lib/syntax_tools/test/syntax_tools_SUITE.erl
@@ -24,12 +24,12 @@
init_per_group/2,end_per_group/2]).
%% Test cases
--export([smoke_test/1]).
+-export([app_test/1,appup_test/1,smoke_test/1,revert/1,revert_map/1]).
suite() -> [{ct_hooks,[ts_install_cth]}].
all() ->
- [smoke_test].
+ [app_test,appup_test,smoke_test,revert,revert_map].
groups() ->
[].
@@ -46,6 +46,11 @@ init_per_group(_GroupName, Config) ->
end_per_group(_GroupName, Config) ->
Config.
+app_test(Config) when is_list(Config) ->
+ ok = ?t:app_test(syntax_tools).
+
+appup_test(Config) when is_list(Config) ->
+ ok = ?t:appup_test(syntax_tools).
%% Read and parse all source in the OTP release.
smoke_test(Config) when is_list(Config) ->
@@ -73,12 +78,47 @@ print_error_markers(F, File) ->
case erl_syntax:type(F) of
error_marker ->
{L,M,Info} = erl_syntax:error_marker_info(F),
- io:format("~s:~p: ~s", [File,L,M:format_error(Info)]);
+ io:format("~ts:~p: ~s", [File,L,M:format_error(Info)]);
_ ->
ok
end.
+%% Read with erl_parse, wrap and revert with erl_syntax and check for equality.
+revert(Config) when is_list(Config) ->
+ Dog = ?t:timetrap(?t:minutes(12)),
+ Wc = filename:join([code:lib_dir("stdlib"),"src","*.erl"]),
+ Fs = filelib:wildcard(Wc),
+ Path = [filename:join(code:lib_dir(stdlib), "include"),
+ filename:join(code:lib_dir(kernel), "include")],
+ io:format("~p files\n", [length(Fs)]),
+ case p_run(fun (File) -> revert_file(File, Path) end, Fs) of
+ 0 -> ok;
+ N -> ?line ?t:fail({N,errors})
+ end,
+ ?line ?t:timetrap_cancel(Dog).
+
+revert_file(File, Path) ->
+ case epp:parse_file(File, Path, []) of
+ {ok,Fs0} ->
+ Fs1 = erl_syntax:form_list(Fs0),
+ Fs2 = erl_syntax_lib:map(fun (Node) -> Node end, Fs1),
+ Fs3 = erl_syntax:form_list_elements(Fs2),
+ Fs4 = [ erl_syntax:revert(Form) || Form <- Fs3 ],
+ {ok,_} = compile:forms(Fs4, [report,strong_validation]),
+ ok
+ end.
+
+%% Testing bug fix for reverting map_field_assoc
+revert_map(Config) ->
+ Dog = ?t:timetrap(?t:minutes(1)),
+ ?line [{map_field_assoc,16,{atom,17,name},{var,18,'Value'}}] =
+ erl_syntax:revert_forms([{tree,map_field_assoc,
+ {attr,16,[],none},
+ {map_field_assoc,
+ {atom,17,name},{var,18,'Value'}}}]),
+ ?line ?t:timetrap_cancel(Dog).
+
p_run(Test, List) ->
N = erlang:system_info(schedulers),
p_run_loop(Test, List, N, [], 0).
diff --git a/lib/syntax_tools/vsn.mk b/lib/syntax_tools/vsn.mk
index 6cafc4dd55..cf396ce636 100644
--- a/lib/syntax_tools/vsn.mk
+++ b/lib/syntax_tools/vsn.mk
@@ -1 +1 @@
-SYNTAX_TOOLS_VSN = 1.6.12
+SYNTAX_TOOLS_VSN = 1.6.14
diff --git a/lib/test_server/doc/src/notes.xml b/lib/test_server/doc/src/notes.xml
index d05626094a..556fe94a2a 100644
--- a/lib/test_server/doc/src/notes.xml
+++ b/lib/test_server/doc/src/notes.xml
@@ -32,6 +32,48 @@
<file>notes.xml</file>
</header>
+<section><title>Test_Server 3.7</title>
+
+ <section><title>Fixed Bugs and Malfunctions</title>
+ <list>
+ <item>
+ <p>
+ Application upgrade (appup) files are corrected for the
+ following applications: </p>
+ <p>
+ <c>asn1, common_test, compiler, crypto, debugger,
+ dialyzer, edoc, eldap, erl_docgen, et, eunit, gs, hipe,
+ inets, observer, odbc, os_mon, otp_mibs, parsetools,
+ percept, public_key, reltool, runtime_tools, ssh,
+ syntax_tools, test_server, tools, typer, webtool, wx,
+ xmerl</c></p>
+ <p>
+ A new test utility for testing appup files is added to
+ test_server. This is now used by most applications in
+ OTP.</p>
+ <p>
+ (Thanks to Tobias Schlager)</p>
+ <p>
+ Own Id: OTP-11744</p>
+ </item>
+ </list>
+ </section>
+
+
+ <section><title>Improvements and New Features</title>
+ <list>
+ <item>
+ <p>
+ Calls to erlang:open_port/2 with 'spawn' are updated to
+ handle space in the command path.</p>
+ <p>
+ Own Id: OTP-10842</p>
+ </item>
+ </list>
+ </section>
+
+</section>
+
<section><title>Test_Server 3.6.4</title>
<section><title>Fixed Bugs and Malfunctions</title>
diff --git a/lib/test_server/doc/src/test_server.xml b/lib/test_server/doc/src/test_server.xml
index 4a47a8f45c..ed5569e1fe 100644
--- a/lib/test_server/doc/src/test_server.xml
+++ b/lib/test_server/doc/src/test_server.xml
@@ -625,6 +625,31 @@ Only valid for peer nodes. Note that slave nodes always
</desc>
</func>
<func>
+ <name>appup_test(App) -> ok | test_server:fail()</name>
+ <fsummary>Checks an applications .appup file for obvious errors</fsummary>
+ <type>
+ <v>App = term()</v>
+ <d>The name of the application to test</d>
+ </type>
+ <desc>
+ <p>Checks an applications .appup file for obvious errors.
+ The following is checked:
+ </p>
+ <list type="bulleted">
+ <item>syntax
+ </item>
+ <item>that .app file version and .appup file version match
+ </item>
+ <item>for non-library applications: validity of high-level upgrade
+ instructions, specifying no instructions is explicitly allowed
+ (in this case the application is not upgradeable)</item>
+ <item>for library applications: that there is exactly one wildcard
+ regexp clause restarting the application when upgrading or
+ downgrading from any version</item>
+ </list>
+ </desc>
+ </func>
+ <func>
<name>comment(Comment) -> ok</name>
<fsummary>Print a comment on the HTML result page</fsummary>
<type>
diff --git a/lib/test_server/doc/src/test_server_ctrl.xml b/lib/test_server/doc/src/test_server_ctrl.xml
index f4aae724e0..0cda531716 100644
--- a/lib/test_server/doc/src/test_server_ctrl.xml
+++ b/lib/test_server/doc/src/test_server_ctrl.xml
@@ -773,11 +773,14 @@ test_server_ctrl:cross_cover_analyse(Level,[{s1,S1LogDir},{s2,S2LogDir}])
<p><c>What = tests_start, Data = {Name,NumCases}</c><br></br>
<c>What = loginfo, Data = [{topdir,TestRootDir},{rundir,CurrLogDir}]</c><br></br>
<c>What = tests_done, Data = {Ok,Failed,{UserSkipped,AutoSkipped}}</c><br></br>
- <c>What = tc_start, Data = {{Mod,Func},TCLogFile}</c><br></br>
- <c>What = tc_done, Data = {Mod,Func,Result}</c><br></br>
- <c>What = tc_user_skip, Data = {Mod,Func,Comment}</c><br></br>
- <c>What = tc_auto_skip, Data = {Mod,Func,Comment}</c><br></br>
+ <c>What = tc_start, Data = {{Mod,{Func,GroupName}},TCLogFile}</c><br></br>
+ <c>What = tc_done, Data = {Mod,{Func,GroupName},Result}</c><br></br>
+ <c>What = tc_user_skip, Data = {Mod,{Func,GroupName},Comment}</c><br></br>
+ <c>What = tc_auto_skip, Data = {Mod,{Func,GroupName},Comment}</c><br></br>
<c>What = framework_error, Data = {{FWMod,FWFunc},Error}</c></p>
+ <p>Note that for a test case function that doesn't belong to a group,
+ <c>GroupName</c> has value <c>undefined</c>, otherwise the name of the test
+ case group.</p>
</desc>
</func>
<func>
diff --git a/lib/test_server/src/configure.in b/lib/test_server/src/configure.in
index 3815027721..cd723bcd4d 100644
--- a/lib/test_server/src/configure.in
+++ b/lib/test_server/src/configure.in
@@ -2,7 +2,7 @@ dnl Process this file with autoconf to produce a configure script for Erlang.
dnl
dnl %CopyrightBegin%
dnl
-dnl Copyright Ericsson AB 1997-2013. All Rights Reserved.
+dnl Copyright Ericsson AB 1997-2014. All Rights Reserved.
dnl
dnl The contents of this file are subject to the Erlang Public License,
dnl Version 1.1, (the "License"); you may not use this file except in
@@ -38,6 +38,35 @@ AC_ARG_ENABLE(debug-mode,
*) CFLAGS=$DEBUG_FLAGS ;;
esac ], )
+AC_ARG_ENABLE(m64-build,
+AS_HELP_STRING([--enable-m64-build],
+ [build 64-bit binaries using the -m64 flag to (g)cc]),
+[ case "$enableval" in
+ no) enable_m64_build=no ;;
+ *) enable_m64_build=yes ;;
+ esac
+],enable_m64_build=no)
+
+AC_ARG_ENABLE(m32-build,
+AS_HELP_STRING([--enable-m32-build],
+ [build 32-bit binaries using the -m32 flag to (g)cc]),
+[ case "$enableval" in
+ no) enable_m32_build=no ;;
+ *) enable_m32_build=yes ;;
+ esac
+],enable_m32_build=no)
+
+no_mXX_LDFLAGS="$LDFLAGS"
+
+if test X${enable_m64_build} = Xyes; then
+ CFLAGS="-m64 $CFLAGS"
+ LDFLAGS="-m64 $LDFLAGS"
+fi
+if test X${enable_m32_build} = Xyes; then
+ CFLAGS="-m32 $CFLAGS"
+ LDFLAGS="-m32 $LDFLAGS"
+fi
+
AC_CHECK_LIB(m, sin)
#--------------------------------------------------------------------
@@ -132,21 +161,56 @@ case $system in
AC_CHECK_HEADER(dld.h, [
SHLIB_LD="ld"
SHLIB_LDFLAGS="-shared"])
+ if test X${enable_m64_build} = Xyes; then
+ AC_MSG_ERROR(don't know how to link 64-bit dynamic drivers)
+ fi
+ if test X${enable_m32_build} = Xyes; then
+ AC_MSG_ERROR(don't know how to link 32-bit dynamic drivers)
+ fi
fi
SHLIB_EXTRACT_ALL=""
;;
- *-netbsd*|*-freebsd*|*-openbsd*|*-dragonfly*)
+ *-openbsd*)
+ # Not available on all versions: check for include file.
+ AC_CHECK_HEADER(dlfcn.h, [
+ SHLIB_CFLAGS="-fpic"
+ SHLIB_LD="${CC}"
+ SHLIB_LDFLAGS="$LDFLAGS -shared"
+ SHLIB_SUFFIX=".so"
+ if test X${enable_m64_build} = Xyes; then
+ AC_MSG_ERROR(don't know how to link 64-bit dynamic drivers)
+ fi
+ if test X${enable_m32_build} = Xyes; then
+ AC_MSG_ERROR(don't know how to link 32-bit dynamic drivers)
+ fi
+ ], [
+ # No dynamic loading.
+ SHLIB_CFLAGS=""
+ SHLIB_LD="ld"
+ SHLIB_LDFLAGS=""
+ SHLIB_SUFFIX=""
+ AC_MSG_ERROR(don't know how to compile and link dynamic drivers)
+ ])
+ SHLIB_EXTRACT_ALL=""
+ ;;
+ *-netbsd*|*-freebsd*|*-dragonfly*)
# Not available on all versions: check for include file.
AC_CHECK_HEADER(dlfcn.h, [
SHLIB_CFLAGS="-fpic"
SHLIB_LD="ld"
SHLIB_LDFLAGS="$LDFLAGS -Bshareable -x"
SHLIB_SUFFIX=".so"
+ if test X${enable_m64_build} = Xyes; then
+ AC_MSG_ERROR(don't know how to link 64-bit dynamic drivers)
+ fi
+ if test X${enable_m32_build} = Xyes; then
+ AC_MSG_ERROR(don't know how to link 32-bit dynamic drivers)
+ fi
], [
# No dynamic loading.
SHLIB_CFLAGS=""
SHLIB_LD="ld"
- SHLIB_LDFLAGS="$LDFLAGS"
+ SHLIB_LDFLAGS=""
SHLIB_SUFFIX=""
AC_MSG_ERROR(don't know how to compile and link dynamic drivers)
])
@@ -155,7 +219,13 @@ case $system in
*-solaris2*|*-sysv4*)
SHLIB_CFLAGS="-KPIC"
SHLIB_LD="/usr/ccs/bin/ld"
- SHLIB_LDFLAGS="$LDFLAGS -G -z text"
+ SHLIB_LDFLAGS="$no_mXX_LDFLAGS -G -z text"
+ if test X${enable_m64_build} = Xyes; then
+ SHLIB_LDFLAGS="-64 $SHLIB_LDFLAGS"
+ fi
+ if test X${enable_m32_build} = Xyes; then
+ AC_MSG_ERROR(don't know how to link 32-bit dynamic drivers)
+ fi
SHLIB_SUFFIX=".so"
SHLIB_EXTRACT_ALL="-z allextract"
;;
@@ -170,6 +240,12 @@ case $system in
SHLIB_CFLAGS="-fPIC"
SHLIB_LD="ld"
SHLIB_LDFLAGS="$LDFLAGS -shared"
+ if test X${enable_m64_build} = Xyes; then
+ AC_MSG_ERROR(don't know how to link 64-bit dynamic drivers)
+ fi
+ if test X${enable_m32_build} = Xyes; then
+ AC_MSG_ERROR(don't know how to link 32-bit dynamic drivers)
+ fi
SHLIB_SUFFIX=".so"
SHLIB_EXTRACT_ALL=""
;;
diff --git a/lib/test_server/src/test_server.app.src b/lib/test_server/src/test_server.app.src
index 42e78ed279..5672baa6ef 100644
--- a/lib/test_server/src/test_server.app.src
+++ b/lib/test_server/src/test_server.app.src
@@ -31,5 +31,8 @@
test_server,
test_server_break_process]},
{applications, [kernel,stdlib]},
- {env, []}]}.
+ {env, []},
+ {runtime_dependencies, ["tools-2.6.14","stdlib-2.0","runtime_tools-1.8.14",
+ "observer-2.0","kernel-3.0","inets-5.10",
+ "erts-6.0"]}]}.
diff --git a/lib/test_server/src/test_server.appup.src b/lib/test_server/src/test_server.appup.src
index 0fbe5f23f7..42c6fe2e46 100644
--- a/lib/test_server/src/test_server.appup.src
+++ b/lib/test_server/src/test_server.appup.src
@@ -1 +1,21 @@
-{"%VSN%",[],[]}. \ No newline at end of file
+%% -*- erlang -*-
+%% %CopyrightBegin%
+%%
+%% Copyright Ericsson AB 2014. 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%
+{"%VSN%",
+ [{<<".*">>,[{restart_application, test_server}]}],
+ [{<<".*">>,[{restart_application, test_server}]}]
+}.
diff --git a/lib/test_server/src/test_server.erl b/lib/test_server/src/test_server.erl
index 54be6d4c72..70dc7a1441 100644
--- a/lib/test_server/src/test_server.erl
+++ b/lib/test_server/src/test_server.erl
@@ -1,7 +1,7 @@
%%
%% %CopyrightBegin%
%%
-%% Copyright Ericsson AB 1996-2013. All Rights Reserved.
+%% Copyright Ericsson AB 1996-2014. 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
@@ -40,7 +40,7 @@
-export([call_crash/3,call_crash/4,call_crash/5]).
-export([temp_name/1]).
-export([start_node/3, stop_node/1, wait_for_node/1, is_release_available/1]).
--export([app_test/1, app_test/2]).
+-export([app_test/1, app_test/2, appup_test/1]).
-export([is_native/1]).
-export([comment/1, make_priv_dir/0]).
-export([os_type/0]).
@@ -176,8 +176,6 @@ module_names(Beams) ->
do_cover_compile(Modules) ->
do_cover_compile1(lists:usort(Modules)). % remove duplicates
-do_cover_compile1([Dont|Rest]) when Dont=:=cover ->
- do_cover_compile1(Rest);
do_cover_compile1([M|Rest]) ->
case {code:is_sticky(M),code:is_loaded(M)} of
{true,_} ->
@@ -405,6 +403,7 @@ run_test_case_apply({CaseNum,Mod,Func,Args,Name,
ref :: reference(),
pid :: pid(),
mf :: {atom(),atom()},
+ last_known_loc :: term(),
status :: tc_status() | 'undefined',
ret_val :: term(),
comment :: list(char()),
@@ -436,15 +435,16 @@ run_test_case_apply(Mod, Func, Args, Name, RunInit, TimetrapData) ->
LogOpts, TCCallback)
end),
put(test_server_detected_fail, []),
- St = #st{ref=Ref,pid=Pid,mf={Mod,Func},status=starting,ret_val=[],
- comment="",timeout=infinity,config=hd(Args)},
+ St = #st{ref=Ref,pid=Pid,mf={Mod,Func},last_known_loc=unknown,
+ status=starting,ret_val=[],comment="",timeout=infinity,
+ config=hd(Args)},
run_test_case_msgloop(St).
%% Ugly bug (pre R5A):
%% If this process (group leader of the test case) terminates before
%% all messages have been replied back to the io server, the io server
%% hangs. Fixed by the 20 milli timeout check here, and by using monitor in
-%% io.erl (livrem OCH hangslen mao :)
+%% io.erl.
%%
%% A test case is known to have failed if it returns {'EXIT', _} tuple,
%% or sends a message {failed, File, Line} to it's group_leader
@@ -537,7 +537,22 @@ run_test_case_msgloop(#st{ref=Ref,pid=Pid,end_conf_pid=EndConfPid0}=St0) ->
St = setup_termination(RetVal, St0#st{config=undefined}),
run_test_case_msgloop(St);
{'EXIT',Pid,Reason} ->
- St = handle_tc_exit(Reason, St0),
+ %% This exit typically happens when an unknown external process
+ %% has caused a test case process to terminate (e.g. if a linked
+ %% process has crashed).
+ St =
+ case Reason of
+ {What,[Loc0={_M,_F,A,[{file,_}|_]}|_]} when
+ is_integer(A) ->
+ Loc = rewrite_loc_item(Loc0),
+ handle_tc_exit(What, St0#st{last_known_loc=[Loc]});
+ {What,[Details,Loc0={_M,_F,A,[{file,_}|_]}|_]} when
+ is_integer(A) ->
+ Loc = rewrite_loc_item(Loc0),
+ handle_tc_exit({What,Details}, St0#st{last_known_loc=[Loc]});
+ _ ->
+ handle_tc_exit(Reason, St0)
+ end,
run_test_case_msgloop(St);
{EndConfPid0,{call_end_conf,Data,_Result}} ->
#st{mf={Mod,Func},config=CurrConf} = St0,
@@ -658,7 +673,7 @@ handle_tc_exit({testcase_aborted,{user_timetrap_error,_}=Msg,_}, St) ->
spawn_fw_call(Mod, Func, Config, Pid, Msg, unknown, self()),
St;
handle_tc_exit(Reason, #st{status={framework,FwMod,FwFunc},
- config=Config,pid=Pid}=St) ->
+ config=Config,pid=Pid}=St) ->
R = case Reason of
{timetrap_timeout,TVal,_} ->
{timetrap,TVal};
@@ -695,7 +710,7 @@ handle_tc_exit(Reason, #st{config=Config,mf={Mod,Func0},pid=Pid,
{testcase_aborted=E,AbortReason,Loc0} ->
{{E,AbortReason},Loc0};
Other ->
- {Other,unknown}
+ {Other,St#st.last_known_loc}
end,
Func = case Status of
init_per_testcase=F -> {F,Func0};
@@ -837,9 +852,13 @@ spawn_fw_call(FwMod,FwFunc,_,_Pid,{framework_error,FwError},_,SendTo) ->
spawn_link(FwCall);
spawn_fw_call(Mod,Func,CurrConf,Pid,Error,Loc,SendTo) ->
+ Func1 = case Func of
+ {_InitOrEndPerTC,F} -> F;
+ F -> F
+ end,
FwCall =
fun() ->
- case catch fw_error_notify(Mod,Func,[],
+ case catch fw_error_notify(Mod,Func1,[],
Error,Loc) of
{'EXIT',FwErrorNotifyErr} ->
exit({fw_notify_done,error_notification,
@@ -847,8 +866,8 @@ spawn_fw_call(Mod,Func,CurrConf,Pid,Error,Loc,SendTo) ->
_ ->
ok
end,
- Conf = [{tc_status,{failed,timetrap_timeout}}|CurrConf],
- case catch do_end_tc_call(Mod,Func,
+ Conf = [{tc_status,{failed,Error}}|CurrConf],
+ case catch do_end_tc_call(Mod,Func1,
{Pid,Error,[Conf]},Error) of
{'EXIT',FwEndTCErr} ->
exit({fw_notify_done,end_tc,FwEndTCErr});
@@ -1189,6 +1208,10 @@ do_init_per_testcase(Mod, Args) ->
"a Config list.\n",[]},
{skip,{failed,{Mod,init_per_testcase,bad_return}}}
catch
+ throw:{Skip,Reason} when Skip =:= skip; Skip =:= skipped ->
+ {skip,Reason};
+ exit:{Skip,Reason} when Skip =:= skip; Skip =:= skipped ->
+ {skip,Reason};
throw:Other ->
set_loc(erlang:get_stacktrace()),
Line = get_loc(),
@@ -1359,6 +1382,10 @@ ts_tc(M, F, A) ->
Result = try
apply(M, F, A)
catch
+ throw:{skip, Reason} -> {skip, Reason};
+ throw:{skipped, Reason} -> {skip, Reason};
+ exit:{skip, Reason} -> {skip, Reason};
+ exit:{skipped, Reason} -> {skip, Reason};
Type:Reason ->
Stk = erlang:get_stacktrace(),
set_loc(Stk),
@@ -2429,8 +2456,11 @@ app_test(App) ->
app_test(App, Mode) ->
test_server_sup:app_test(App, Mode).
-%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
-
+%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
+%% appup_test/1
+%%
+appup_test(App) ->
+ test_server_sup:appup_test(App).
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
%% is_native(Mod) -> true | false
diff --git a/lib/test_server/src/test_server_ctrl.erl b/lib/test_server/src/test_server_ctrl.erl
index 352e58f91c..5fbc47a813 100644
--- a/lib/test_server/src/test_server_ctrl.erl
+++ b/lib/test_server/src/test_server_ctrl.erl
@@ -487,6 +487,7 @@ init([]) ->
ok
end,
test_server_sup:cleanup_crash_dumps(),
+ test_server_sup:util_start(),
State = #state{jobs=[],finish=false},
TI0 = test_server:init_target_info(),
TargetHost = test_server_sup:hoststr(),
@@ -1055,6 +1056,7 @@ handle_info(_, State) ->
%% test suites (if any) and any possible remainting slave node
terminate(_Reason, State) ->
+ test_server_sup:util_stop(),
case State#state.trc of
false -> ok;
Sock -> test_server_node:stop_tracer_node(Sock)
@@ -1405,7 +1407,7 @@ remove_conf([{conf, _Ref, Props, _MF}|Cases], NoConf, Repeats) ->
end;
remove_conf([{make,_Ref,_MF}|Cases], NoConf, Repeats) ->
remove_conf(Cases, NoConf, Repeats);
-remove_conf([{skip_case,{{_M,all},_Cmt}}|Cases], NoConf, Repeats) ->
+remove_conf([{skip_case,{{_M,all},_Cmt},_Mode}|Cases], NoConf, Repeats) ->
remove_conf(Cases, NoConf, Repeats);
remove_conf([{skip_case,{Type,_Ref,_MF,_Cmt}}|Cases],
NoConf, Repeats) when Type==conf;
@@ -1429,7 +1431,7 @@ remove_conf([], NoConf, true) ->
remove_conf([], NoConf, false) ->
lists:reverse(NoConf).
-get_suites([{skip_case,{{Mod,_Func},_Cmt}}|Tests], Mods) when is_atom(Mod) ->
+get_suites([{skip_case,{{Mod,_F},_Cmt},_Mode}|Tests], Mods) when is_atom(Mod) ->
case add_mod(Mod, Mods) of
true -> get_suites(Tests, [Mod|Mods]);
false -> get_suites(Tests, Mods)
@@ -1725,30 +1727,33 @@ make_html_link(LinkName, Target, Explanation) ->
ok = write_html_file(LinkName, H).
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
-%% start_minor_log_file(Mod, Func) -> AbsName
+%% start_minor_log_file(Mod, Func, ParallelTC) -> AbsName
%% Mod = atom()
%% Func = atom()
+%% ParallelTC = bool()
%% AbsName = string()
%%
%% Create a minor log file for the test case Mod,Func,Args. The log file
-%% will be stored in the log directory under the name <Mod>.<Func>.log.
-%% Some header info will also be inserted into the log file.
+%% will be stored in the log directory under the name <Mod>.<Func>.html.
+%% Some header info will also be inserted into the log file. If the test
+%% case runs in a parallel group, then to avoid clashing file names if the
+%% case is executed more than once, the name <Mod>.<Func>.<Timestamp>.html
+%% is used.
-start_minor_log_file(Mod, Func) ->
+start_minor_log_file(Mod, Func, ParallelTC) ->
MFA = {Mod,Func,1},
LogDir = get(test_server_log_dir_base),
Name0 = lists:flatten(io_lib:format("~w.~w~ts", [Mod,Func,?html_ext])),
Name = downcase(Name0),
AbsName = filename:join(LogDir, Name),
- case file:read_file_info(AbsName) of
- {error,_} -> %% normal case, unique name
+ case (ParallelTC orelse (element(1,file:read_file_info(AbsName))==ok)) of
+ false -> %% normal case, unique name
start_minor_log_file1(Mod, Func, LogDir, AbsName, MFA);
- {ok,_} -> %% special case, duplicate names
- {_,S,Us} = now(),
+ true -> %% special case, duplicate names
+ Tag = test_server_sup:unique_name(),
Name1_0 =
- lists:flatten(io_lib:format("~w.~w.~w.~w~ts", [Mod,Func,S,
- trunc(Us/1000),
- ?html_ext])),
+ lists:flatten(io_lib:format("~w.~w.~ts~ts", [Mod,Func,Tag,
+ ?html_ext])),
Name1 = downcase(Name1_0),
AbsName1 = filename:join(LogDir, Name1),
start_minor_log_file1(Mod, Func, LogDir, AbsName1, MFA)
@@ -1828,7 +1833,7 @@ html_isolate_modules(List, FwMod) ->
html_isolate_modules(List, sets:new(), FwMod).
html_isolate_modules([], Set, _) -> sets:to_list(Set);
-html_isolate_modules([{skip_case,_}|Cases], Set, FwMod) ->
+html_isolate_modules([{skip_case,{_Case,_Cmt},_Mode}|Cases], Set, FwMod) ->
html_isolate_modules(Cases, Set, FwMod);
html_isolate_modules([{conf,_Ref,Props,{FwMod,_Func}}|Cases], Set, FwMod) ->
Set1 = case proplists:get_value(suite, Props) of
@@ -1932,26 +1937,30 @@ copy_html_file(Src, DestDir) ->
add_init_and_end_per_suite([{make,_,_}=Case|Cases], LastMod, LastRef, FwMod) ->
[Case|add_init_and_end_per_suite(Cases, LastMod, LastRef, FwMod)];
-add_init_and_end_per_suite([{skip_case,{{Mod,all},_}}=Case|Cases], LastMod,
+add_init_and_end_per_suite([{skip_case,{{Mod,all},_},_}=Case|Cases], LastMod,
LastRef, FwMod) when Mod =/= LastMod ->
{PreCases, NextMod, NextRef} =
do_add_end_per_suite_and_skip(LastMod, LastRef, Mod, FwMod),
- PreCases ++ [Case|add_init_and_end_per_suite(Cases, NextMod, NextRef, FwMod)];
-add_init_and_end_per_suite([{skip_case,{{Mod,_},_}}=Case|Cases], LastMod,
- LastRef, FwMod) when Mod =/= LastMod ->
+ PreCases ++ [Case|add_init_and_end_per_suite(Cases, NextMod,
+ NextRef, FwMod)];
+add_init_and_end_per_suite([{skip_case,{{Mod,_},_Cmt},_Mode}=Case|Cases],
+ LastMod, LastRef, FwMod) when Mod =/= LastMod ->
{PreCases, NextMod, NextRef} =
do_add_init_and_end_per_suite(LastMod, LastRef, Mod, FwMod),
- PreCases ++ [Case|add_init_and_end_per_suite(Cases, NextMod, NextRef, FwMod)];
-add_init_and_end_per_suite([{skip_case,{conf,_,{Mod,_},_},_}=Case|Cases], LastMod,
- LastRef, FwMod) when Mod =/= LastMod ->
+ PreCases ++ [Case|add_init_and_end_per_suite(Cases, NextMod,
+ NextRef, FwMod)];
+add_init_and_end_per_suite([{skip_case,{conf,_,{Mod,_},_},_}=Case|Cases],
+ LastMod, LastRef, FwMod) when Mod =/= LastMod ->
{PreCases, NextMod, NextRef} =
do_add_init_and_end_per_suite(LastMod, LastRef, Mod, FwMod),
- PreCases ++ [Case|add_init_and_end_per_suite(Cases, NextMod, NextRef, FwMod)];
+ PreCases ++ [Case|add_init_and_end_per_suite(Cases, NextMod,
+ NextRef, FwMod)];
add_init_and_end_per_suite([{skip_case,{conf,_,{Mod,_},_}}=Case|Cases], LastMod,
LastRef, FwMod) when Mod =/= LastMod ->
{PreCases, NextMod, NextRef} =
do_add_init_and_end_per_suite(LastMod, LastRef, Mod, FwMod),
- PreCases ++ [Case|add_init_and_end_per_suite(Cases, NextMod, NextRef, FwMod)];
+ PreCases ++ [Case|add_init_and_end_per_suite(Cases, NextMod,
+ NextRef, FwMod)];
add_init_and_end_per_suite([{conf,Ref,Props,{FwMod,Func}}=Case|Cases], LastMod,
LastRef, FwMod) ->
%% if Mod == FwMod, this conf test is (probably) a test case group where
@@ -1972,7 +1981,8 @@ add_init_and_end_per_suite([{conf,_,_,{Mod,_}}=Case|Cases], LastMod,
LastRef, FwMod) when Mod =/= LastMod, Mod =/= FwMod ->
{PreCases, NextMod, NextRef} =
do_add_init_and_end_per_suite(LastMod, LastRef, Mod, FwMod),
- PreCases ++ [Case|add_init_and_end_per_suite(Cases, NextMod, NextRef, FwMod)];
+ PreCases ++ [Case|add_init_and_end_per_suite(Cases, NextMod,
+ NextRef, FwMod)];
add_init_and_end_per_suite([SkipCase|Cases], LastMod, LastRef, FwMod)
when element(1,SkipCase) == skip_case ->
[SkipCase|add_init_and_end_per_suite(Cases, LastMod, LastRef, FwMod)];
@@ -1982,12 +1992,14 @@ add_init_and_end_per_suite([{Mod,_}=Case|Cases], LastMod, LastRef, FwMod)
when Mod =/= LastMod, Mod =/= FwMod ->
{PreCases, NextMod, NextRef} =
do_add_init_and_end_per_suite(LastMod, LastRef, Mod, FwMod),
- PreCases ++ [Case|add_init_and_end_per_suite(Cases, NextMod, NextRef, FwMod)];
+ PreCases ++ [Case|add_init_and_end_per_suite(Cases, NextMod,
+ NextRef, FwMod)];
add_init_and_end_per_suite([{Mod,_,_}=Case|Cases], LastMod, LastRef, FwMod)
when Mod =/= LastMod, Mod =/= FwMod ->
{PreCases, NextMod, NextRef} =
do_add_init_and_end_per_suite(LastMod, LastRef, Mod, FwMod),
- PreCases ++ [Case|add_init_and_end_per_suite(Cases, NextMod, NextRef, FwMod)];
+ PreCases ++ [Case|add_init_and_end_per_suite(Cases, NextMod,
+ NextRef, FwMod)];
add_init_and_end_per_suite([Case|Cases], LastMod, LastRef, FwMod)->
[Case|add_init_and_end_per_suite(Cases, LastMod, LastRef, FwMod)];
add_init_and_end_per_suite([], _LastMod, undefined, _FwMod) ->
@@ -2164,7 +2176,7 @@ run_test_cases(TestSpec, Config, TimetrapData) ->
%% comment (which gets printed in the log files) describes why the case
%% was skipped.
%%
-%% {skip_case,{Case,Comment}} A normal test case skipped by the user.
+%% {skip_case,{Case,Comment},Mode} A normal test case skipped by the user.
%% The comment (which gets printed in the log files) describes why the
%% case was skipped.
%%
@@ -2337,7 +2349,7 @@ run_test_cases_loop([{SkipTag,{Type,Ref,Case,Comment},SkipMode}|Cases],
ParentRef ->
Reason = {group_result,GrName,failed},
skip_cases_upto(ParentRef, Cases,
- Reason, tc, Mode,
+ Reason, tc, ParentMode,
SkipTag)
end;
false ->
@@ -2396,22 +2408,27 @@ run_test_cases_loop([{auto_skip_case,{Case,Comment},SkipMode}|Cases],
Config, TimetrapData, Mode, Status) ->
{Mod,Func} = skip_case(auto, undefined, get(test_server_case_num)+1,
Case, Comment, is_io_buffered(), SkipMode),
- test_server_sup:framework_call(report, [tc_auto_skip,{Mod,Func,Comment}]),
+ test_server_sup:framework_call(report, [tc_auto_skip,
+ {Mod,{Func,get_name(SkipMode)},
+ Comment}]),
run_test_cases_loop(Cases, Config, TimetrapData, Mode,
update_status(skipped, Mod, Func, Status));
-run_test_cases_loop([{skip_case,{{Mod,all}=Case,Comment}}|Cases],
+run_test_cases_loop([{skip_case,{{Mod,all}=Case,Comment},SkipMode}|Cases],
Config, TimetrapData, Mode, Status) ->
- skip_case(user, undefined, 0, Case, Comment, false, Mode),
+ skip_case(user, undefined, 0, Case, Comment, false, SkipMode),
test_server_sup:framework_call(report, [tc_user_skip,
- {Mod,all,Comment}]),
+ {Mod,{all,get_name(SkipMode)},
+ Comment}]),
run_test_cases_loop(Cases, Config, TimetrapData, Mode, Status);
-run_test_cases_loop([{skip_case,{Case,Comment}}|Cases],
+run_test_cases_loop([{skip_case,{Case,Comment},SkipMode}|Cases],
Config, TimetrapData, Mode, Status) ->
{Mod,Func} = skip_case(user, undefined, get(test_server_case_num)+1,
- Case, Comment, is_io_buffered()),
- test_server_sup:framework_call(report, [tc_user_skip,{Mod,Func,Comment}]),
+ Case, Comment, is_io_buffered(), SkipMode),
+ test_server_sup:framework_call(report, [tc_user_skip,
+ {Mod,{Func,get_name(SkipMode)},
+ Comment}]),
run_test_cases_loop(Cases, Config, TimetrapData, Mode,
update_status(skipped, Mod, Func, Status));
@@ -2425,8 +2442,9 @@ run_test_cases_loop([{conf,Ref,Props,{Mod,Func}}|_Cases]=Cs0,
{Ref,Ref} ->
case check_props(parallel, tl(Mode0)) of
false ->
- %% this is an end conf for a top level parallel group, collect
- %% results from the test case processes and calc total time
+ %% this is an end conf for a top level parallel group,
+ %% collect results from the test case processes
+ %% and calc total time
OkSkipFail = handle_test_case_io_and_status(),
file:set_cwd(filename:dirname(get(test_server_dir))),
After = ?now,
@@ -2950,7 +2968,6 @@ get_tc_results([{_,{OkSkipFail,_}} | _Status]) ->
get_tc_results([]) -> % in case init_per_suite crashed
{[],[],[]}.
-
conf(Ref, Props) ->
{Ref,Props,?now}.
@@ -3155,10 +3172,6 @@ random_order(N, {Pos,NewSeed}, IxCases, Shuffled) ->
%% SendSync determines if start and finished messages must be sent so
%% that the printouts can be buffered and handled in order with io from
%% parallel processes.
-
-skip_case(Type, Ref, CaseNum, Case, Comment, SendSync) ->
- skip_case(Type, Ref, CaseNum, Case, Comment, SendSync, []).
-
skip_case(Type, Ref, CaseNum, Case, Comment, SendSync, Mode) ->
MF = {Mod,Func} = case Case of
{M,F,_A} -> {M,F};
@@ -3236,7 +3249,7 @@ skip_case1(Type, CaseNum, Mod, Func, Comment, Mode) ->
%% SkipType = skip_case | auto_skip_case
%% Mark all cases tagged with Ref as skipped.
-skip_cases_upto(Ref, Cases, Reason, Origin, Mode, SkipType) ->
+skip_cases_upto(Ref, Cases, Reason, Origin, Mode, SkipType) ->
{_,Modified,Rest} =
modify_cases_upto(Ref, {skip,Reason,Origin,Mode,SkipType}, Cases),
Modified++Rest.
@@ -3321,21 +3334,34 @@ modify_cases_upto1(Ref, {copy,NewRef},
{[C|Orig],[{skip_case,{Type,NewRef,MF,Cmt}}|Alt],T};
%% next is a skip_case, could be one test case or 'all' in suite, we must proceed
-modify_cases_upto1(Ref, ModOp, [{skip_case,{_F,_Cmt}}=MF|T], Orig, Alt) ->
+modify_cases_upto1(Ref, ModOp, [{skip_case,{_F,_Cmt},_Mode}=MF|T], Orig, Alt) ->
modify_cases_upto1(Ref, ModOp, T, [MF|Orig], [MF|Alt]);
%% next is a normal case (possibly in a sequence), mark as skipped, or copy, and proceed
-modify_cases_upto1(Ref, {skip,Reason,_,_,skip_case}=Op,
+modify_cases_upto1(Ref, {skip,Reason,_,Mode,skip_case}=Op,
[{_M,_F}=MF|T], Orig, Alt) ->
- modify_cases_upto1(Ref, Op, T, Orig, [{skip_case,{MF,Reason}}|Alt]);
+ modify_cases_upto1(Ref, Op, T, Orig, [{skip_case,{MF,Reason},Mode}|Alt]);
modify_cases_upto1(Ref, {skip,Reason,_,Mode,auto_skip_case}=Op,
[{_M,_F}=MF|T], Orig, Alt) ->
modify_cases_upto1(Ref, Op, T, Orig, [{auto_skip_case,{MF,Reason},Mode}|Alt]);
modify_cases_upto1(Ref, CopyOp, [{_M,_F}=MF|T], Orig, Alt) ->
modify_cases_upto1(Ref, CopyOp, T, [MF|Orig], [MF|Alt]);
+%% next is a conf case, modify the Mode arg to keep track of sub groups
+modify_cases_upto1(Ref, {skip,Reason,FType,Mode,SkipType},
+ [{conf,OtherRef,Props,_MF}|T], Orig, Alt) ->
+ case hd(Mode) of
+ {OtherRef,_,_} -> % end conf
+ modify_cases_upto1(Ref, {skip,Reason,FType,tl(Mode),SkipType},
+ T, Orig, Alt);
+ _ -> % start conf
+ Mode1 = [conf(OtherRef,Props)|Mode],
+ modify_cases_upto1(Ref, {skip,Reason,FType,Mode1,SkipType},
+ T, Orig, Alt)
+ end;
+
%% next is some other case, ignore or copy
-modify_cases_upto1(Ref, {skip,_,_,_,_}=Op, [_|T], Orig, Alt) ->
+modify_cases_upto1(Ref, {skip,_,_,_,_}=Op, [_Other|T], Orig, Alt) ->
modify_cases_upto1(Ref, Op, T, Orig, Alt);
modify_cases_upto1(Ref, CopyOp, [C|T], Orig, Alt) ->
modify_cases_upto1(Ref, CopyOp, T, [C|Orig], [C|Alt]).
@@ -3631,7 +3657,7 @@ run_test_case1(Ref, Num, Mod, Func, Args, RunInit,
TSDir = get(test_server_dir),
print(major, "=case ~w:~w", [Mod, Func]),
- MinorName = start_minor_log_file(Mod, Func),
+ MinorName = start_minor_log_file(Mod, Func, self() /= Main),
print(minor, "<a name=\"top\"></a>", [], internal_raw),
MinorBase = filename:basename(MinorName),
print(major, "=logfile ~ts", [filename:basename(MinorName)]),
@@ -3660,12 +3686,13 @@ run_test_case1(Ref, Num, Mod, Func, Args, RunInit,
update_config(hd(Args), [{priv_dir,PrivDir++"/"},
{tc_logfile,MinorName}])
end,
-
+ GrName = get_name(Mode),
test_server_sup:framework_call(report,
- [tc_start,{{Mod,Func},MinorName}]),
+ [tc_start,{{Mod,{Func,GrName}},
+ MinorName}]),
print_props((RunInit==skip_init), get_props(Mode)),
- GroupName = case get_name(Mode) of
+ GrNameStr = case GrName of
undefined -> "";
Name -> cast_to_list(Name)
end,
@@ -3678,14 +3705,14 @@ run_test_case1(Ref, Num, Mod, Func, Args, RunInit,
"<td>" ++ Col0 ++ "~ts" ++ Col1 ++ "</td>"
"<td><a href=\"~ts\">~w</a></td>"
"<td><a href=\"~ts#top\"><</a> <a href=\"~ts#end\">></a></td>",
- [num2str(Num),fw_name(Mod),GroupName,EncMinorBase,Func,
+ [num2str(Num),fw_name(Mod),GrNameStr,EncMinorBase,Func,
EncMinorBase,EncMinorBase]),
do_unless_parallel(Main, fun erlang:yield/0),
%% run the test case
{Result,DetectedFail,ProcsBefore,ProcsAfter} =
- run_test_case_apply(Num, Mod, Func, [UpdatedArgs], get_name(Mode),
+ run_test_case_apply(Num, Mod, Func, [UpdatedArgs], GrName,
RunInit, TimetrapData),
{Time,RetVal,Loc,Opts,Comment} =
case Result of
@@ -3704,41 +3731,41 @@ run_test_case1(Ref, Num, Mod, Func, Args, RunInit,
Status =
case {Time,RetVal} of
{died,{timetrap_timeout,TimetrapTimeout}} ->
- progress(failed, Num, Mod, Func, Loc,
+ progress(failed, Num, Mod, Func, GrName, Loc,
timetrap_timeout, TimetrapTimeout, Comment, Style);
{died,Reason} ->
- progress(failed, Num, Mod, Func, Loc, Reason,
+ progress(failed, Num, Mod, Func, GrName, Loc, Reason,
Time, Comment, Style);
{_,{'EXIT',{Skip,Reason}}} when Skip==skip; Skip==skipped;
Skip==auto_skip ->
- progress(skip, Num, Mod, Func, Loc, Reason,
+ progress(skip, Num, Mod, Func, GrName, Loc, Reason,
Time, Comment, Style);
{_,{'EXIT',_Pid,{Skip,Reason}}} when Skip==skip; Skip==skipped ->
- progress(skip, Num, Mod, Func, Loc, Reason,
+ progress(skip, Num, Mod, Func, GrName, Loc, Reason,
Time, Comment, Style);
{_,{'EXIT',_Pid,Reason}} ->
- progress(failed, Num, Mod, Func, Loc, Reason,
+ progress(failed, Num, Mod, Func, GrName, Loc, Reason,
Time, Comment, Style);
{_,{'EXIT',Reason}} ->
- progress(failed, Num, Mod, Func, Loc, Reason,
+ progress(failed, Num, Mod, Func, GrName, Loc, Reason,
Time, Comment, Style);
{_,{Fail,Reason}} when Fail =:= fail; Fail =:= failed ->
- progress(failed, Num, Mod, Func, Loc, Reason,
+ progress(failed, Num, Mod, Func, GrName, Loc, Reason,
Time, Comment, Style);
{_,Reason={auto_skip,_Why}} ->
- progress(skip, Num, Mod, Func, Loc, Reason,
+ progress(skip, Num, Mod, Func, GrName, Loc, Reason,
Time, Comment, Style);
{_,{Skip,Reason}} when Skip==skip; Skip==skipped ->
- progress(skip, Num, Mod, Func, Loc, Reason,
+ progress(skip, Num, Mod, Func, GrName, Loc, Reason,
Time, Comment, Style);
{Time,RetVal} ->
case DetectedFail of
[] ->
- progress(ok, Num, Mod, Func, Loc, RetVal,
+ progress(ok, Num, Mod, Func, GrName, Loc, RetVal,
Time, Comment, Style);
Reason ->
- progress(failed, Num, Mod, Func, Loc, Reason,
+ progress(failed, Num, Mod, Func, GrName, Loc, Reason,
Time, Comment, Style)
end
end,
@@ -3843,7 +3870,7 @@ num2str(N) -> integer_to_list(N).
%% Note: Strings that are to be written to the minor log must
%% be prefixed with "=== " here, or the indentation will be wrong.
-progress(skip, CaseNum, Mod, Func, Loc, Reason, Time,
+progress(skip, CaseNum, Mod, Func, GrName, Loc, Reason, Time,
Comment, {St0,St1}) ->
{Reason1,{Color,Ret,ReportTag}} =
if_auto_skip(Reason,
@@ -3852,7 +3879,7 @@ progress(skip, CaseNum, Mod, Func, Loc, Reason, Time,
print(major, "=result ~w: ~p", [ReportTag,Reason1]),
print(1, "*** SKIPPED ~ts ***",
[get_info_str(Mod,Func, CaseNum, get(test_server_cases))]),
- test_server_sup:framework_call(report, [tc_done,{Mod,Func,
+ test_server_sup:framework_call(report, [tc_done,{Mod,{Func,GrName},
{ReportTag,Reason1}}]),
ReasonStr = reason_to_string(Reason1),
ReasonStr1 = lists:flatten([string:strip(S,left) ||
@@ -3877,13 +3904,13 @@ progress(skip, CaseNum, Mod, Func, Loc, Reason, Time,
print(minor, "=== reason = ~ts", [ReasonStr1]),
Ret;
-progress(failed, CaseNum, Mod, Func, Loc, timetrap_timeout, T,
+progress(failed, CaseNum, Mod, Func, GrName, Loc, timetrap_timeout, T,
Comment0, {St0,St1}) ->
print(major, "=result failed: timeout, ~p", [Loc]),
print(1, "*** FAILED ~ts ***",
[get_info_str(Mod,Func, CaseNum, get(test_server_cases))]),
test_server_sup:framework_call(report,
- [tc_done,{Mod,Func,
+ [tc_done,{Mod,{Func,GrName},
{failed,timetrap_timeout}}]),
FormatLastLoc = test_server_sup:format_loc(get_last_loc(Loc)),
ErrorReason = io_lib:format("{timetrap_timeout,~ts}", [FormatLastLoc]),
@@ -3903,13 +3930,13 @@ progress(failed, CaseNum, Mod, Func, Loc, timetrap_timeout, T,
print(minor, "=== reason = timetrap timeout", []),
failed;
-progress(failed, CaseNum, Mod, Func, Loc, {testcase_aborted,Reason}, _T,
+progress(failed, CaseNum, Mod, Func, GrName, Loc, {testcase_aborted,Reason}, _T,
Comment0, {St0,St1}) ->
print(major, "=result failed: testcase_aborted, ~p", [Loc]),
print(1, "*** FAILED ~ts ***",
[get_info_str(Mod,Func, CaseNum, get(test_server_cases))]),
test_server_sup:framework_call(report,
- [tc_done,{Mod,Func,
+ [tc_done,{Mod,{Func,GrName},
{failed,testcase_aborted}}]),
FormatLastLoc = test_server_sup:format_loc(get_last_loc(Loc)),
ErrorReason = io_lib:format("{testcase_aborted,~ts}", [FormatLastLoc]),
@@ -3929,12 +3956,12 @@ progress(failed, CaseNum, Mod, Func, Loc, {testcase_aborted,Reason}, _T,
print(minor, "=== reason = {testcase_aborted,~p}", [Reason]),
failed;
-progress(failed, CaseNum, Mod, Func, unknown, Reason, Time,
+progress(failed, CaseNum, Mod, Func, GrName, unknown, Reason, Time,
Comment0, {St0,St1}) ->
print(major, "=result failed: ~p, ~w", [Reason,unknown]),
print(1, "*** FAILED ~ts ***",
[get_info_str(Mod,Func, CaseNum, get(test_server_cases))]),
- test_server_sup:framework_call(report, [tc_done,{Mod,Func,
+ test_server_sup:framework_call(report, [tc_done,{Mod,{Func,GrName},
{failed,Reason}}]),
TimeStr = io_lib:format(if is_float(Time) -> "~.3fs";
true -> "~w"
@@ -3965,12 +3992,12 @@ progress(failed, CaseNum, Mod, Func, unknown, Reason, Time,
print(minor, "=== reason = " ++ FStr, [FormattedReason]),
failed;
-progress(failed, CaseNum, Mod, Func, Loc, Reason, Time,
+progress(failed, CaseNum, Mod, Func, GrName, Loc, Reason, Time,
Comment0, {St0,St1}) ->
print(major, "=result failed: ~p, ~p", [Reason,Loc]),
print(1, "*** FAILED ~ts ***",
[get_info_str(Mod,Func, CaseNum, get(test_server_cases))]),
- test_server_sup:framework_call(report, [tc_done,{Mod,Func,
+ test_server_sup:framework_call(report, [tc_done,{Mod,{Func,GrName},
{failed,Reason}}]),
TimeStr = io_lib:format(if is_float(Time) -> "~.3fs";
true -> "~w"
@@ -3992,10 +4019,10 @@ progress(failed, CaseNum, Mod, Func, Loc, Reason, Time,
print(minor, "=== reason = " ++ FStr, [FormattedReason]),
failed;
-progress(ok, _CaseNum, Mod, Func, _Loc, RetVal, Time,
+progress(ok, _CaseNum, Mod, Func, GrName, _Loc, RetVal, Time,
Comment0, {St0,St1}) ->
print(minor, "successfully completed test case", []),
- test_server_sup:framework_call(report, [tc_done,{Mod,Func,ok}]),
+ test_server_sup:framework_call(report, [tc_done,{Mod,{Func,GrName},ok}]),
Comment =
case RetVal of
{comment,RetComment} ->
@@ -4484,18 +4511,18 @@ update_config(Config, []) ->
collect_all_cases(Top, Skip) when is_list(Skip) ->
Result =
- case collect_cases(Top, #cc{mod=[],skip=Skip}) of
+ case collect_cases(Top, #cc{mod=[],skip=Skip}, []) of
{ok,Cases,_St} -> Cases;
Other -> Other
end,
Result.
-collect_cases([], St) -> {ok,[],St};
-collect_cases([Case|Cs0], St0) ->
- case collect_cases(Case, St0) of
+collect_cases([], St, _) -> {ok,[],St};
+collect_cases([Case|Cs0], St0, Mode) ->
+ case collect_cases(Case, St0, Mode) of
{ok,FlatCases1,St1} ->
- case collect_cases(Cs0, St1) of
+ case collect_cases(Cs0, St1, Mode) of
{ok,FlatCases2,St} ->
{ok,FlatCases1 ++ FlatCases2,St};
{error,_Reason} = Error -> Error
@@ -4504,39 +4531,41 @@ collect_cases([Case|Cs0], St0) ->
end;
-collect_cases({module,Case}, St) when is_atom(Case), is_atom(St#cc.mod) ->
- collect_case({St#cc.mod,Case}, St);
-collect_cases({module,Mod,Case}, St) ->
- collect_case({Mod,Case}, St);
-collect_cases({module,Mod,Case,Args}, St) ->
- collect_case({Mod,Case,Args}, St);
-
-collect_cases({dir,SubDir}, St) ->
- collect_files(SubDir, "*_SUITE", St);
-collect_cases({dir,SubDir,Pattern}, St) ->
- collect_files(SubDir, Pattern++"*", St);
-
-collect_cases({conf,InitF,CaseList,FinMF}, St) when is_atom(InitF) ->
- collect_cases({conf,[],{St#cc.mod,InitF},CaseList,FinMF}, St);
-collect_cases({conf,InitMF,CaseList,FinF}, St) when is_atom(FinF) ->
- collect_cases({conf,[],InitMF,CaseList,{St#cc.mod,FinF}}, St);
-collect_cases({conf,InitMF,CaseList,FinMF}, St0) ->
- collect_cases({conf,[],InitMF,CaseList,FinMF}, St0);
-collect_cases({conf,Props,InitF,CaseList,FinMF}, St) when is_atom(InitF) ->
+collect_cases({module,Case}, St, Mode) when is_atom(Case), is_atom(St#cc.mod) ->
+ collect_case({St#cc.mod,Case}, St, Mode);
+collect_cases({module,Mod,Case}, St, Mode) ->
+ collect_case({Mod,Case}, St, Mode);
+collect_cases({module,Mod,Case,Args}, St, Mode) ->
+ collect_case({Mod,Case,Args}, St, Mode);
+
+collect_cases({dir,SubDir}, St, Mode) ->
+ collect_files(SubDir, "*_SUITE", St, Mode);
+collect_cases({dir,SubDir,Pattern}, St, Mode) ->
+ collect_files(SubDir, Pattern++"*", St, Mode);
+
+collect_cases({conf,InitF,CaseList,FinMF}, St, Mode) when is_atom(InitF) ->
+ collect_cases({conf,[],{St#cc.mod,InitF},CaseList,FinMF}, St, Mode);
+collect_cases({conf,InitMF,CaseList,FinF}, St, Mode) when is_atom(FinF) ->
+ collect_cases({conf,[],InitMF,CaseList,{St#cc.mod,FinF}}, St, Mode);
+collect_cases({conf,InitMF,CaseList,FinMF}, St0, Mode) ->
+ collect_cases({conf,[],InitMF,CaseList,FinMF}, St0, Mode);
+collect_cases({conf,Props,InitF,CaseList,FinMF}, St, Mode) when is_atom(InitF) ->
case init_props(Props) of
{error,_} ->
{ok,[],St};
Props1 ->
- collect_cases({conf,Props1,{St#cc.mod,InitF},CaseList,FinMF}, St)
+ collect_cases({conf,Props1,{St#cc.mod,InitF},CaseList,FinMF},
+ St, Mode)
end;
-collect_cases({conf,Props,InitMF,CaseList,FinF}, St) when is_atom(FinF) ->
+collect_cases({conf,Props,InitMF,CaseList,FinF}, St, Mode) when is_atom(FinF) ->
case init_props(Props) of
{error,_} ->
{ok,[],St};
Props1 ->
- collect_cases({conf,Props1,InitMF,CaseList,{St#cc.mod,FinF}}, St)
+ collect_cases({conf,Props1,InitMF,CaseList,{St#cc.mod,FinF}},
+ St, Mode)
end;
-collect_cases({conf,Props,InitMF,CaseList,FinMF} = Conf, St) ->
+collect_cases({conf,Props,InitMF,CaseList,FinMF} = Conf, St, Mode) ->
case init_props(Props) of
{error,_} ->
{ok,[],St};
@@ -4544,13 +4573,13 @@ collect_cases({conf,Props,InitMF,CaseList,FinMF} = Conf, St) ->
Ref = make_ref(),
Skips = St#cc.skip,
Props2 = [{suite,St#cc.mod} | lists:delete(suite,Props1)],
- Mode = [{Ref,Props2,undefined}],
+ Mode1 = [{Ref,Props2,undefined} | Mode],
case in_skip_list({St#cc.mod,Conf}, Skips) of
{true,Comment} -> % conf init skipped
- {ok,[{skip_case,{conf,Ref,InitMF,Comment},Mode} |
+ {ok,[{skip_case,{conf,Ref,InitMF,Comment},Mode1} |
[] ++ [{conf,Ref,[],FinMF}]],St};
{true,Name,Comment} when is_atom(Name) -> % all cases skipped
- case collect_cases(CaseList, St) of
+ case collect_cases(CaseList, St, Mode1) of
{ok,[],_St} = Empty ->
Empty;
{ok,FlatCases,St1} ->
@@ -4558,15 +4587,15 @@ collect_cases({conf,Props,InitMF,CaseList,FinMF} = Conf, St) ->
keep_name(Props1),
FinMF}],
Skipped = skip_cases_upto(Ref, Cases2Skip, Comment,
- conf, Mode, skip_case),
- {ok,[{skip_case,{conf,Ref,InitMF,Comment},Mode} |
+ conf, Mode1, skip_case),
+ {ok,[{skip_case,{conf,Ref,InitMF,Comment},Mode1} |
Skipped],St1};
{error,_Reason} = Error ->
Error
end;
{true,ToSkip,_} when is_list(ToSkip) -> % some cases skipped
case collect_cases(CaseList,
- St#cc{skip=ToSkip++Skips}) of
+ St#cc{skip=ToSkip++Skips}, Mode1) of
{ok,[],_St} = Empty ->
Empty;
{ok,FlatCases,St1} ->
@@ -4578,7 +4607,7 @@ collect_cases({conf,Props,InitMF,CaseList,FinMF} = Conf, St) ->
Error
end;
false ->
- case collect_cases(CaseList, St) of
+ case collect_cases(CaseList, St, Mode1) of
{ok,[],_St} = Empty ->
Empty;
{ok,FlatCases,St1} ->
@@ -4592,8 +4621,8 @@ collect_cases({conf,Props,InitMF,CaseList,FinMF} = Conf, St) ->
end
end;
-collect_cases({make,InitMFA,CaseList,FinMFA}, St0) ->
- case collect_cases(CaseList, St0) of
+collect_cases({make,InitMFA,CaseList,FinMFA}, St0, Mode) ->
+ case collect_cases(CaseList, St0, Mode) of
{ok,[],_St} = Empty -> Empty;
{ok,FlatCases,St} ->
Ref = make_ref(),
@@ -4602,62 +4631,62 @@ collect_cases({make,InitMFA,CaseList,FinMFA}, St0) ->
{error,_Reason} = Error -> Error
end;
-collect_cases({Module, Cases}, St) when is_list(Cases) ->
- case (catch collect_case(Cases, St#cc{mod=Module}, [])) of
+collect_cases({Module, Cases}, St, Mode) when is_list(Cases) ->
+ case (catch collect_case(Cases, St#cc{mod=Module}, [], Mode)) of
{ok, NewCases, NewSt} ->
{ok, NewCases, NewSt};
Other ->
{error, Other}
end;
-collect_cases({_Mod,_Case}=Spec, St) ->
- collect_case(Spec, St);
+collect_cases({_Mod,_Case}=Spec, St, Mode) ->
+ collect_case(Spec, St, Mode);
-collect_cases({_Mod,_Case,_Args}=Spec, St) ->
- collect_case(Spec, St);
-collect_cases(Case, St) when is_atom(Case), is_atom(St#cc.mod) ->
- collect_case({St#cc.mod,Case}, St);
-collect_cases(Other, St) ->
+collect_cases({_Mod,_Case,_Args}=Spec, St, Mode) ->
+ collect_case(Spec, St, Mode);
+collect_cases(Case, St, Mode) when is_atom(Case), is_atom(St#cc.mod) ->
+ collect_case({St#cc.mod,Case}, St, Mode);
+collect_cases(Other, St, _Mode) ->
{error,{bad_subtest_spec,St#cc.mod,Other}}.
-collect_case({Mod,{conf,_,_,_,_}=Conf}, St) ->
- collect_case_invoke(Mod, Conf, [], St);
+collect_case({Mod,{conf,_,_,_,_}=Conf}, St, Mode) ->
+ collect_case_invoke(Mod, Conf, [], St, Mode);
-collect_case(MFA, St) ->
+collect_case(MFA, St, Mode) ->
case in_skip_list(MFA, St#cc.skip) of
{true,Comment} ->
- {ok,[{skip_case,{MFA,Comment}}],St};
+ {ok,[{skip_case,{MFA,Comment},Mode}],St};
false ->
case MFA of
- {Mod,Case} -> collect_case_invoke(Mod, Case, MFA, St);
+ {Mod,Case} -> collect_case_invoke(Mod, Case, MFA, St, Mode);
{_Mod,_Case,_Args} -> {ok,[MFA],St}
end
end.
-collect_case([], St, Acc) ->
+collect_case([], St, Acc, _Mode) ->
{ok, Acc, St};
-collect_case([Case | Cases], St, Acc) ->
- {ok, FlatCases, NewSt} = collect_case({St#cc.mod, Case}, St),
- collect_case(Cases, NewSt, Acc ++ FlatCases).
+collect_case([Case | Cases], St, Acc, Mode) ->
+ {ok, FlatCases, NewSt} = collect_case({St#cc.mod, Case}, St, Mode),
+ collect_case(Cases, NewSt, Acc ++ FlatCases, Mode).
-collect_case_invoke(Mod, Case, MFA, St) ->
+collect_case_invoke(Mod, Case, MFA, St, Mode) ->
case get_fw_mod(undefined) of
undefined ->
case catch apply(Mod, Case, [suite]) of
{'EXIT',_} ->
{ok,[MFA],St};
Suite ->
- collect_subcases(Mod, Case, MFA, St, Suite)
+ collect_subcases(Mod, Case, MFA, St, Suite, Mode)
end;
_ ->
Suite = test_server_sup:framework_call(get_suite,
[Mod,Case],
[]),
- collect_subcases(Mod, Case, MFA, St, Suite)
+ collect_subcases(Mod, Case, MFA, St, Suite, Mode)
end.
-collect_subcases(Mod, Case, MFA, St, Suite) ->
+collect_subcases(Mod, Case, MFA, St, Suite, Mode) ->
case Suite of
[] when Case == all -> {ok,[],St};
[] when element(1, Case) == conf -> {ok,[],St};
@@ -4665,28 +4694,28 @@ collect_subcases(Mod, Case, MFA, St, Suite) ->
%%%! --- START Kept for backwards compatibility ---
%%%! Requirements are not used
{req,ReqList} ->
- collect_case_deny(Mod, Case, MFA, ReqList, [], St);
+ collect_case_deny(Mod, Case, MFA, ReqList, [], St, Mode);
{req,ReqList,SubCases} ->
- collect_case_deny(Mod, Case, MFA, ReqList, SubCases, St);
+ collect_case_deny(Mod, Case, MFA, ReqList, SubCases, St, Mode);
%%%! --- END Kept for backwards compatibility ---
{Skip,Reason} when Skip==skip; Skip==skipped ->
- {ok,[{skip_case,{MFA,Reason}}],St};
+ {ok,[{skip_case,{MFA,Reason},Mode}],St};
{error,Reason} ->
throw(Reason);
SubCases ->
- collect_case_subcases(Mod, Case, SubCases, St)
+ collect_case_subcases(Mod, Case, SubCases, St, Mode)
end.
-collect_case_subcases(Mod, Case, SubCases, St0) ->
+collect_case_subcases(Mod, Case, SubCases, St0, Mode) ->
OldMod = St0#cc.mod,
- case collect_cases(SubCases, St0#cc{mod=Mod}) of
+ case collect_cases(SubCases, St0#cc{mod=Mod}, Mode) of
{ok,FlatCases,St} ->
{ok,FlatCases,St#cc{mod=OldMod}};
{error,Reason} ->
{error,{{Mod,Case},Reason}}
end.
-collect_files(Dir, Pattern, St) ->
+collect_files(Dir, Pattern, St, Mode) ->
{ok,Cwd} = file:get_cwd(),
Dir1 = filename:join(Cwd, Dir),
Wc = filename:join([Dir1,Pattern++code:objfile_extension()]),
@@ -4696,7 +4725,7 @@ collect_files(Dir, Pattern, St) ->
{error,{collect_fail,Dir,Pattern}};
Mods0 ->
Mods = [{path_to_module(Mod),all} || Mod <- lists:sort(Mods0)],
- collect_cases(Mods, St)
+ collect_cases(Mods, St, Mode)
end.
path_to_module(Path) when is_list(Path) ->
@@ -4706,14 +4735,14 @@ path_to_module(Path) when is_list(Path) ->
%% anyway. It should be removed or renamed!
list_to_atom(filename:rootname(filename:basename(Path))).
-collect_case_deny(Mod, Case, MFA, ReqList, SubCases, St) ->
+collect_case_deny(Mod, Case, MFA, ReqList, SubCases, St, Mode) ->
case {check_deny(ReqList, St#cc.skip),SubCases} of
{{denied,Comment},_SubCases} ->
- {ok,[{skip_case,{MFA,Comment}}],St};
+ {ok,[{skip_case,{MFA,Comment},Mode}],St};
{granted,[]} ->
{ok,[MFA],St};
{granted,SubCases} ->
- collect_case_subcases(Mod, Case, SubCases, St)
+ collect_case_subcases(Mod, Case, SubCases, St, Mode)
end.
check_deny([Req|Reqs], DenyList) ->
@@ -4840,7 +4869,7 @@ start_node(Name, Type, Options) ->
case controller_call({start_node,Name,Type,Options}, T) of
{{ok,Nodename}, Host, Cmd, Info, Warning} ->
format(minor,
- "Successfully started node ~w on ~tp with command: ~tp",
+ "Successfully started node ~w on ~tp with command: ~ts",
[Nodename, Host, Cmd]),
format(major, "=node_start ~w", [Nodename]),
case Info of
@@ -4856,7 +4885,7 @@ start_node(Name, Type, Options) ->
{ok, Nodename};
{fail,{Ret, Host, Cmd}} ->
format(minor,
- "Failed to start node ~tp on ~tp with command: ~tp~n"
+ "Failed to start node ~tp on ~tp with command: ~ts~n"
"Reason: ~p",
[Name, Host, Cmd, Ret]),
{fail,Ret};
@@ -4865,7 +4894,7 @@ start_node(Name, Type, Options) ->
Ret;
{Ret, Host, Cmd} ->
format(minor,
- "Failed to start node ~tp on ~tp with command: ~tp~n"
+ "Failed to start node ~tp on ~tp with command: ~ts~n"
"Reason: ~p",
[Name, Host, Cmd, Ret]),
Ret
@@ -5471,10 +5500,16 @@ write_html_file(File,Content) ->
%% The 'major' log file, which is a pure text file is also written
%% with utf8 encoding
open_utf8_file(File) ->
- file:open(File,[write,{encoding,utf8}]).
+ case file:open(File,AllOpts=[write,{encoding,utf8}]) of
+ {error,Reason} -> {error,{Reason,{File,AllOpts}}};
+ Result -> Result
+ end.
open_utf8_file(File,Opts) ->
- file:open(File,[{encoding,utf8}|Opts]).
+ case file:open(File,AllOpts=[{encoding,utf8}|Opts]) of
+ {error,Reason} -> {error,{Reason,{File,AllOpts}}};
+ Result -> Result
+ end.
%% Write a file with specified encoding
write_file(File,Content,latin1) ->
diff --git a/lib/test_server/src/test_server_node.erl b/lib/test_server/src/test_server_node.erl
index 582abb2153..acd47788db 100644
--- a/lib/test_server/src/test_server_node.erl
+++ b/lib/test_server/src/test_server_node.erl
@@ -1,7 +1,7 @@
%%
%% %CopyrightBegin%
%%
-%% Copyright Ericsson AB 2002-2013. All Rights Reserved.
+%% Copyright Ericsson AB 2002-2014. 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
@@ -653,7 +653,7 @@ find_rel_linux(Rel) ->
end.
find_rel_suse(Rel, SuseRel) ->
- Root = "/usr/local/otp/releases/otp_beam_linux_sles",
+ Root = "/usr/local/otp/releases/sles",
case SuseRel of
"11" ->
%% Try both SuSE 11, SuSE 10 and SuSe 9 in that order.
@@ -673,10 +673,10 @@ find_rel_suse(Rel, SuseRel) ->
find_rel_suse_1(Rel, RootWc) ->
case erlang:system_info(wordsize) of
4 ->
- find_rel_suse_2(Rel, RootWc++"_i386");
+ find_rel_suse_2(Rel, RootWc++"_32");
8 ->
- find_rel_suse_2(Rel, RootWc++"_x64") ++
- find_rel_suse_2(Rel, RootWc++"_i386")
+ find_rel_suse_2(Rel, RootWc++"_64") ++
+ find_rel_suse_2(Rel, RootWc++"_32")
end.
find_rel_suse_2(Rel, RootWc) ->
diff --git a/lib/test_server/src/test_server_sup.erl b/lib/test_server/src/test_server_sup.erl
index 377aa21018..96e369a138 100644
--- a/lib/test_server/src/test_server_sup.erl
+++ b/lib/test_server/src/test_server_sup.erl
@@ -1,7 +1,7 @@
%%
%% %CopyrightBegin%
%%
-%% Copyright Ericsson AB 1998-2013. All Rights Reserved.
+%% Copyright Ericsson AB 1998-2014. 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
@@ -29,10 +29,13 @@
hostatom/0, hostatom/1, hoststr/0, hoststr/1,
framework_call/2,framework_call/3,framework_call/4,
format_loc/1,
- call_trace/1]).
+ util_start/0, util_stop/0, unique_name/0,
+ call_trace/1,
+ appup_test/1]).
-include("test_server_internal.hrl").
-define(crash_dump_tar,"crash_dumps.tar.gz").
-define(src_listing_ext, ".src.html").
+-record(util_state, {starter, latest_name}).
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
%% timetrap(Timeout,Scale,Pid) -> Handle
@@ -263,6 +266,249 @@ app_check_export_all([Mod|Mods]) ->
end
end.
+%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
+%% appup_test/1
+%%
+%% Checks one applications .appup file for obvious errors.
+%% Checks..
+%% * .. syntax
+%% * .. that version in app file matches appup file version
+%% * .. validity of appup instructions
+%%
+%% For library application this function checks that the proper
+%% 'restart_application' upgrade and downgrade clauses exist.
+appup_test(Application) ->
+ case is_app(Application) of
+ {ok, AppFile} ->
+ case is_appup(Application, proplists:get_value(vsn, AppFile)) of
+ {ok, Up, Down} ->
+ StartMod = proplists:get_value(mod, AppFile),
+ Modules = proplists:get_value(modules, AppFile),
+ do_appup_tests(StartMod, Application, Up, Down, Modules);
+ Error ->
+ test_server:fail(Error)
+ end;
+ Error ->
+ test_server:fail(Error)
+ end.
+
+is_appup(Application, Version) ->
+ AppupFile = atom_to_list(Application) ++ ".appup",
+ AppupPath = filename:join([code:lib_dir(Application), "ebin", AppupFile]),
+ case file:consult(AppupPath) of
+ {ok, [{Version, Up, Down}]} when is_list(Up), is_list(Down) ->
+ {ok, Up, Down};
+ _ ->
+ test_server:format(
+ minor,
+ "Application upgrade (.appup) file not found, "
+ "or it has very bad syntax.~n"),
+ {error, appup_not_readable}
+ end.
+
+do_appup_tests(undefined, Application, Up, Down, _Modules) ->
+ %% library application
+ case Up of
+ [{<<".*">>, [{restart_application, Application}]}] ->
+ case Down of
+ [{<<".*">>, [{restart_application, Application}]}] ->
+ ok;
+ _ ->
+ test_server:format(
+ minor,
+ "Library application needs restart_application "
+ "downgrade instruction.~n"),
+ {error, library_downgrade_instruction_malformed}
+ end;
+ _ ->
+ test_server:format(
+ minor,
+ "Library application needs restart_application "
+ "upgrade instruction.~n"),
+ {error, library_upgrade_instruction_malformed}
+ end;
+do_appup_tests(_, _Application, Up, Down, Modules) ->
+ %% normal application
+ case check_appup_clauses_plausible(Up, up, Modules) of
+ ok ->
+ case check_appup_clauses_plausible(Down, down, Modules) of
+ ok ->
+ test_server:format(minor, "OK~n");
+ Error ->
+ test_server:format(minor, "ERROR ~p~n", [Error]),
+ test_server:fail(Error)
+ end;
+ Error ->
+ test_server:format(minor, "ERROR ~p~n", [Error]),
+ test_server:fail(Error)
+ end.
+
+check_appup_clauses_plausible([], _Direction, _Modules) ->
+ ok;
+check_appup_clauses_plausible([{Re, Instrs} | Rest], Direction, Modules)
+ when is_binary(Re) ->
+ case re:compile(Re) of
+ {ok, _} ->
+ case check_appup_instructions(Instrs, Direction, Modules) of
+ ok ->
+ check_appup_clauses_plausible(Rest, Direction, Modules);
+ Error ->
+ Error
+ end;
+ {error, Error} ->
+ {error, {version_regex_malformed, Re, Error}}
+ end;
+check_appup_clauses_plausible([{V, Instrs} | Rest], Direction, Modules)
+ when is_list(V) ->
+ case check_appup_instructions(Instrs, Direction, Modules) of
+ ok ->
+ check_appup_clauses_plausible(Rest, Direction, Modules);
+ Error ->
+ Error
+ end;
+check_appup_clauses_plausible(Clause, _Direction, _Modules) ->
+ {error, {clause_malformed, Clause}}.
+
+check_appup_instructions(Instrs, Direction, Modules) ->
+ case check_instructions(Direction, Instrs, Instrs, [], [], Modules) of
+ {_Good, []} ->
+ ok;
+ {_, Bad} ->
+ {error, {bad_instructions, Bad}}
+ end.
+
+check_instructions(_, [], _, Good, Bad, _) ->
+ {lists:reverse(Good), lists:reverse(Bad)};
+check_instructions(UpDown, [Instr | Rest], All, Good, Bad, Modules) ->
+ case catch check_instruction(UpDown, Instr, All, Modules) of
+ ok ->
+ check_instructions(UpDown, Rest, All, [Instr | Good], Bad, Modules);
+ {error, Reason} ->
+ NewBad = [{Instr, Reason} | Bad],
+ check_instructions(UpDown, Rest, All, Good, NewBad, Modules)
+ end.
+
+check_instruction(up, {add_module, Module}, _, Modules) ->
+ %% A new module is added
+ check_module(Module, Modules);
+check_instruction(down, {add_module, Module}, _, Modules) ->
+ %% An old module is re-added
+ case (catch check_module(Module, Modules)) of
+ {error, {unknown_module, Module, Modules}} -> ok;
+ ok -> throw({error, {existing_readded_module, Module}})
+ end;
+check_instruction(_, {load_module, Module}, _, Modules) ->
+ check_module(Module, Modules);
+check_instruction(_, {load_module, Module, DepMods}, _, Modules) ->
+ check_module(Module, Modules),
+ check_depend(DepMods);
+check_instruction(_, {load_module, Module, Pre, Post, DepMods}, _, Modules) ->
+ check_module(Module, Modules),
+ check_depend(DepMods),
+ check_purge(Pre),
+ check_purge(Post);
+check_instruction(up, {delete_module, Module}, _, Modules) ->
+ case (catch check_module(Module, Modules)) of
+ {error, {unknown_module, Module, Modules}} ->
+ ok;
+ ok ->
+ throw({error,{existing_module_deleted, Module}})
+ end;
+check_instruction(down, {delete_module, Module}, _, Modules) ->
+ check_module(Module, Modules);
+check_instruction(_, {update, Module}, _, Modules) ->
+ check_module(Module, Modules);
+check_instruction(_, {update, Module, supervisor}, _, Modules) ->
+ check_module(Module, Modules);
+check_instruction(_, {update, Module, DepMods}, _, Modules)
+ when is_list(DepMods) ->
+ check_module(Module, Modules);
+check_instruction(_, {update, Module, Change}, _, Modules) ->
+ check_module(Module, Modules),
+ check_change(Change);
+check_instruction(_, {update, Module, Change, DepMods}, _, Modules) ->
+ check_module(Module, Modules),
+ check_change(Change),
+ check_depend(DepMods);
+check_instruction(_, {update, Module, Change, Pre, Post, DepMods}, _, Modules) ->
+ check_module(Module, Modules),
+ check_change(Change),
+ check_purge(Pre),
+ check_purge(Post),
+ check_depend(DepMods);
+check_instruction(_,
+ {update, Module, Timeout, Change, Pre, Post, DepMods},
+ _,
+ Modules) ->
+ check_module(Module, Modules),
+ check_timeout(Timeout),
+ check_change(Change),
+ check_purge(Pre),
+ check_purge(Post),
+ check_depend(DepMods);
+check_instruction(_,
+ {update, Module, ModType, Timeout, Change, Pre, Post, DepMods},
+ _,
+ Modules) ->
+ check_module(Module, Modules),
+ check_mod_type(ModType),
+ check_timeout(Timeout),
+ check_change(Change),
+ check_purge(Pre),
+ check_purge(Post),
+ check_depend(DepMods);
+check_instruction(_, {restart_application, Application}, _, _) ->
+ check_application(Application);
+check_instruction(_, {remove_application, Application}, _, _) ->
+ check_application(Application);
+check_instruction(_, {add_application, Application}, _, _) ->
+ check_application(Application);
+check_instruction(_, {add_application, Application, Type}, _, _) ->
+ check_application(Application),
+ check_restart_type(Type);
+check_instruction(_, Instr, _, _) ->
+ throw({error, {low_level_or_invalid_instruction, Instr}}).
+
+check_module(Module, Modules) ->
+ case {is_atom(Module), lists:member(Module, Modules)} of
+ {true, true} -> ok;
+ {true, false} -> throw({error, {unknown_module, Module}});
+ {false, _} -> throw({error, {bad_module, Module}})
+ end.
+
+check_application(App) ->
+ case is_atom(App) of
+ true -> ok;
+ false -> throw({error, {bad_application, App}})
+ end.
+
+check_depend(Dep) when is_list(Dep) -> ok;
+check_depend(Dep) -> throw({error, {bad_depend, Dep}}).
+
+check_restart_type(permanent) -> ok;
+check_restart_type(transient) -> ok;
+check_restart_type(temporary) -> ok;
+check_restart_type(load) -> ok;
+check_restart_type(none) -> ok;
+check_restart_type(Type) -> throw({error, {bad_restart_type, Type}}).
+
+check_timeout(T) when is_integer(T), T > 0 -> ok;
+check_timeout(default) -> ok;
+check_timeout(infinity) -> ok;
+check_timeout(T) -> throw({error, {bad_timeout, T}}).
+
+check_mod_type(static) -> ok;
+check_mod_type(dynamic) -> ok;
+check_mod_type(Type) -> throw({error, {bad_mod_type, Type}}).
+
+check_purge(soft_purge) -> ok;
+check_purge(brutal_purge) -> ok;
+check_purge(Purge) -> throw({error, {bad_purge, Purge}}).
+
+check_change(soft) -> ok;
+check_change({advanced, _}) -> ok;
+check_change(Change) -> throw({error, {bad_change, Change}}).
+
%% Given two sorted lists, L1 and L2, returns {NotInL2, NotInL1},
%% NotInL2 is the elements of L1 which don't occurr in L2,
%% NotInL1 is the elements of L2 which don't ocurr in L1.
@@ -583,6 +829,69 @@ downcase([], Result) ->
lists:reverse(Result).
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
+%% util_start() -> ok
+%%
+%% Start local utility process
+util_start() ->
+ Starter = self(),
+ case whereis(?MODULE) of
+ undefined ->
+ spawn_link(fun() ->
+ register(?MODULE, self()),
+ util_loop(#util_state{starter=Starter})
+ end);
+ _Pid ->
+ ok
+ end.
+
+%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
+%% util_stop() -> ok
+%%
+%% Stop local utility process
+util_stop() ->
+ try (?MODULE ! {self(),stop}) of
+ _ ->
+ receive {?MODULE,stopped} -> ok
+ after 5000 -> exit(whereis(?MODULE), kill)
+ end
+ catch
+ _:_ ->
+ ok
+ end.
+
+%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
+%% unique_name() -> string()
+%%
+unique_name() ->
+ ?MODULE ! {self(),unique_name},
+ receive {?MODULE,Name} -> Name
+ after 5000 -> exit({?MODULE,no_util_process})
+ end.
+
+%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
+%% util_loop(State) -> ok
+%%
+util_loop(State) ->
+ receive
+ {From,unique_name} ->
+ {_,S,Us} = now(),
+ Ms = trunc(Us/1000),
+ Name = lists:flatten(io_lib:format("~w.~w", [S,Ms])),
+ if Name == State#util_state.latest_name ->
+ timer:sleep(1),
+ self() ! {From,unique_name},
+ util_loop(State);
+ true ->
+ From ! {?MODULE,Name},
+ util_loop(State#util_state{latest_name = Name})
+ end;
+ {From,stop} ->
+ catch unlink(State#util_state.starter),
+ From ! {?MODULE,stopped},
+ ok
+ end.
+
+%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
%% call_trace(TraceSpecFile) -> ok
%%
%% Read terms on format {m,Mod} | {f,Mod,Func}
diff --git a/lib/test_server/src/ts.erl b/lib/test_server/src/ts.erl
index 189a71a8ce..bc7d244c7c 100644
--- a/lib/test_server/src/ts.erl
+++ b/lib/test_server/src/ts.erl
@@ -24,7 +24,7 @@
-module(ts).
--export([run/0, run/1, run/2, run/3, run/4,
+-export([run/0, run/1, run/2, run/3, run/4, run/5,
tests/0, tests/1,
install/0, install/1,
bench/0, bench/1, bench/2, benchmarks/0,
@@ -212,6 +212,12 @@ run_all(_Vars) ->
run_some([], _Opts) ->
ok;
+run_some([{Spec,Mod}|Specs], Opts) ->
+ case run(Spec, Mod, Opts) of
+ ok -> ok;
+ Error -> io:format("~p: ~p~n",[{Spec,Mod},Error])
+ end,
+ run_some(Specs, Opts);
run_some([Spec|Specs], Opts) ->
case run(Spec, Opts) of
ok -> ok;
@@ -263,8 +269,17 @@ run(List, Opts) when is_list(List), is_list(Opts) ->
run_some(List, Opts);
%% run/2
-%% Runs one test spec with Options
-run(Testspec, Config) when is_atom(Testspec), is_list(Config) ->
+%% Runs one test spec with list of suites or with options
+run(Testspec, ModsOrConfig) when is_atom(Testspec),
+ is_list(ModsOrConfig) ->
+ case is_list_of_suites(ModsOrConfig) of
+ false ->
+ run(Testspec, {config_list,ModsOrConfig});
+ true ->
+ run_some([{Testspec,M} || M <- ModsOrConfig],
+ [batch])
+ end;
+run(Testspec, {config_list,Config}) ->
Options=check_test_get_opts(Testspec, Config),
IsSmoke=proplists:get_value(smoke,Config),
File=atom_to_list(Testspec),
@@ -310,34 +325,95 @@ run(Testspec, Config) when is_atom(Testspec), is_list(Config) ->
run_test(File, [{spec,[Spec]}], Options);
%% Runs one module in a spec (interactive)
run(Testspec, Mod) when is_atom(Testspec), is_atom(Mod) ->
- run_test({atom_to_list(Testspec), Mod},
+ run_test({atom_to_list(Testspec),Mod},
[{suite,Mod}],
[interactive]).
%% run/3
%% Run one module in a spec with Config
-run(Testspec,Mod,Config) when is_atom(Testspec), is_atom(Mod), is_list(Config) ->
+run(Testspec, Mod, Config) when is_atom(Testspec),
+ is_atom(Mod),
+ is_list(Config) ->
Options=check_test_get_opts(Testspec, Config),
- run_test({atom_to_list(Testspec), Mod},
- [{suite,Mod}],
- Options);
-
-%% Runs one testcase in a module.
-run(Testspec, Mod, Case) when is_atom(Testspec), is_atom(Mod), is_atom(Case) ->
+ run_test({atom_to_list(Testspec),Mod},
+ [{suite,Mod}], Options);
+%% Run multiple modules with Config
+run(Testspec, Mods, Config) when is_atom(Testspec),
+ is_list(Mods),
+ is_list(Config) ->
+ run_some([{Testspec,M} || M <- Mods], Config);
+%% Runs one test case in a module.
+run(Testspec, Mod, Case) when is_atom(Testspec),
+ is_atom(Mod),
+ is_atom(Case) ->
+ Options=check_test_get_opts(Testspec, []),
+ Args = [{suite,Mod},{testcase,Case}],
+ run_test(atom_to_list(Testspec), Args, Options);
+%% Runs one or more groups in a module.
+run(Testspec, Mod, Grs={group,_Groups}) when is_atom(Testspec),
+ is_atom(Mod) ->
Options=check_test_get_opts(Testspec, []),
- Args = [{suite,atom_to_list(Mod)},{testcase,atom_to_list(Case)}],
+ Args = [{suite,Mod},Grs],
+ run_test(atom_to_list(Testspec), Args, Options);
+%% Runs one or more test cases in a module.
+run(Testspec, Mod, TCs={testcase,_Cases}) when is_atom(Testspec),
+ is_atom(Mod) ->
+ Options=check_test_get_opts(Testspec, []),
+ Args = [{suite,Mod},TCs],
run_test(atom_to_list(Testspec), Args, Options).
%% run/4
-%% Run one testcase in a module with Options.
+%% Run one test case in a module with Options.
run(Testspec, Mod, Case, Config) when is_atom(Testspec),
is_atom(Mod),
is_atom(Case),
is_list(Config) ->
Options=check_test_get_opts(Testspec, Config),
- Args = [{suite,atom_to_list(Mod)}, {testcase,atom_to_list(Case)}],
+ Args = [{suite,Mod},{testcase,Case}],
+ run_test(atom_to_list(Testspec), Args, Options);
+%% Run one or more test cases in a module with Options.
+run(Testspec, Mod, {testcase,Cases}, Config) when is_atom(Testspec),
+ is_atom(Mod) ->
+ run(Testspec, Mod, Cases, Config);
+run(Testspec, Mod, Cases, Config) when is_atom(Testspec),
+ is_atom(Mod),
+ is_list(Cases),
+ is_list(Config) ->
+ Options=check_test_get_opts(Testspec, Config),
+ Args = [{suite,Mod},Cases],
+ run_test(atom_to_list(Testspec), Args, Options);
+%% Run one or more groups in a module with Options.
+run(Testspec, Mod, Grs={group,_Groups}, Config) when is_atom(Testspec),
+ is_atom(Mod) ->
+ Options=check_test_get_opts(Testspec, Config),
+ Args = [{suite,Mod},Grs],
run_test(atom_to_list(Testspec), Args, Options).
+%% run/5
+%% Run one or more test cases in a group with Options.
+run(Testspec, Mod, Group, Cases, Config) when is_atom(Testspec),
+ is_atom(Mod),
+ is_list(Config) ->
+ Group1 = if is_tuple(Group) -> Group; true -> {group,Group} end,
+ Cases1 = if is_tuple(Cases) -> Cases; true -> {testcase,Cases} end,
+ Options=check_test_get_opts(Testspec, Config),
+ Args = [{suite,Mod},Group1,Cases1],
+ run_test(atom_to_list(Testspec), Args, Options).
+
+is_list_of_suites(List) ->
+ lists:all(fun(Suite) ->
+ S = if is_atom(Suite) -> atom_to_list(Suite);
+ true -> Suite
+ end,
+ try lists:last(string:tokens(S,"_")) of
+ "SUITE" -> true;
+ "suite" -> true;
+ _ -> false
+ catch
+ _:_ -> false
+ end
+ end, List).
+
%% Create a spec to skip all SUITES, this is used when the application
%% to be tested is not part of the OTP release to be tested.
create_skip_spec(Testspec, SuitesToSkip) ->
diff --git a/lib/test_server/src/ts.unix.config b/lib/test_server/src/ts.unix.config
index 5a2580f464..1ba5d9033e 100644
--- a/lib/test_server/src/ts.unix.config
+++ b/lib/test_server/src/ts.unix.config
@@ -2,3 +2,5 @@
%% Always run a (VNC) X server on host
%% {xserver, "xserver.example.com:66"}.
+
+{unix,[{telnet,"belegost"},{username,"telnet-test"},{password,"tset-tenlet"},{keep_alive,true}]}.
diff --git a/lib/test_server/src/ts_install.erl b/lib/test_server/src/ts_install.erl
index e9e559df5d..bc62015ac3 100644
--- a/lib/test_server/src/ts_install.erl
+++ b/lib/test_server/src/ts_install.erl
@@ -112,6 +112,12 @@ get_vars([], name, [], Result) ->
get_vars(_, _, _, _) ->
{error, fatal_bad_conf_vars}.
+config_flags() ->
+ case os:getenv("CONFIG_FLAGS") of
+ false -> [];
+ CF -> string:tokens(CF, " \t\n")
+ end.
+
unix_autoconf(XConf) ->
Configure = filename:absname("configure"),
Flags = proplists:get_value(crossflags,XConf,[]),
@@ -122,11 +128,14 @@ unix_autoconf(XConf) ->
erlang:system_info(threads) /= false],
Debug = [" --enable-debug-mode" ||
string:str(erlang:system_info(system_version),"debug") > 0],
- Args = Host ++ Build ++ Threads ++ Debug,
+ MXX_Build = [Y || Y <- config_flags(),
+ Y == "--enable-m64-build"
+ orelse Y == "--enable-m32-build"],
+ Args = Host ++ Build ++ Threads ++ Debug ++ " " ++ MXX_Build,
case filelib:is_file(Configure) of
true ->
OSXEnv = macosx_cflags(),
- io:format("Running ~sEnv: ~p~n",
+ io:format("Running ~s~nEnv: ~p~n",
[lists:flatten(Configure ++ Args),Env++OSXEnv]),
Port = open_port({spawn, lists:flatten(["\"",Configure,"\"",Args])},
[stream, eof, {env,Env++OSXEnv}]),
@@ -135,7 +144,6 @@ unix_autoconf(XConf) ->
{error, no_configure_script}
end.
-
get_xcomp_flag(Flag, Flags) ->
get_xcomp_flag(Flag, Flag, Flags).
get_xcomp_flag(Flag, Tag, Flags) ->
diff --git a/lib/test_server/src/ts_lib.erl b/lib/test_server/src/ts_lib.erl
index 9f56f59fed..5368960446 100644
--- a/lib/test_server/src/ts_lib.erl
+++ b/lib/test_server/src/ts_lib.erl
@@ -164,7 +164,7 @@ subst_file(In, Out, Vars) ->
case file:read_file(In) of
{ok, Bin} ->
Subst = subst(b2s(Bin), Vars, []),
- case file:write_file(Out, Subst) of
+ case file:write_file(Out, unicode:characters_to_binary(Subst)) of
ok ->
ok;
{error, Reason} ->
diff --git a/lib/test_server/src/ts_make.erl b/lib/test_server/src/ts_make.erl
index f3266f5836..8727f7ebfe 100644
--- a/lib/test_server/src/ts_make.erl
+++ b/lib/test_server/src/ts_make.erl
@@ -1,7 +1,7 @@
%%
%% %CopyrightBegin%
%%
-%% Copyright Ericsson AB 1997-2012. All Rights Reserved.
+%% Copyright Ericsson AB 1997-2013. 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
@@ -67,7 +67,7 @@ get_port_data(Port, Last0, Complete0) ->
end.
update_last([C|Rest], Line, true) ->
- io:put_chars(Line),
+ io:put_chars(list_to_binary(Line)), %% Utf-8 list to utf-8 binary
io:nl(),
update_last([C|Rest], [], false);
update_last([$\r|Rest], Result, Complete) ->
@@ -79,7 +79,7 @@ update_last([C|Rest], Result, Complete) ->
update_last([], Result, Complete) ->
{Result, Complete};
update_last(eof, Result, _) ->
- Result.
+ unicode:characters_to_list(list_to_binary(Result)).
run_make_script({win32, _}, Make, Dir, Makefile) ->
{"run_make.bat",
diff --git a/lib/test_server/src/ts_run.erl b/lib/test_server/src/ts_run.erl
index 60c9a7a4b7..18d021f780 100644
--- a/lib/test_server/src/ts_run.erl
+++ b/lib/test_server/src/ts_run.erl
@@ -224,7 +224,7 @@ make_command(Vars, Spec, State) ->
CrashFile = filename:join(Cwd,State#state.file ++ "_erl_crash.dump"),
case filelib:is_file(CrashFile) of
true ->
- io:format("ts_run: Deleting dump: ~s\n",[CrashFile]),
+ io:format("ts_run: Deleting dump: ~ts\n",[CrashFile]),
file:delete(CrashFile);
false ->
ok
@@ -258,8 +258,8 @@ make_command(Vars, Spec, State) ->
run_batch(Vars, _Spec, State) ->
process_flag(trap_exit, true),
Command = State#state.command ++ " -noinput -s erlang halt",
- ts_lib:progress(Vars, 1, "Command: ~s~n", [Command]),
- io:format(user, "Command: ~s~n",[Command]),
+ ts_lib:progress(Vars, 1, "Command: ~ts~n", [Command]),
+ io:format(user, "Command: ~ts~n",[Command]),
Port = open_port({spawn, Command}, [stream, in, eof]),
Timeout = 30000 * case os:getenv("TS_RUN_VALGRIND") of
false -> 1;
@@ -398,8 +398,9 @@ make_common_test_args(Args0, Options0, _Vars) ->
end,
ConfigFiles = [{config,[filename:join(ConfigPath,File)
|| File <- get_config_files()]}],
- io_lib:format("~100000p",[Args0++Trace++Cover++Logdir++
- ConfigFiles++Options++TimeTrap]).
+ io_lib:format("~100000p",[[{abort_if_missing_suites,true} |
+ Args0++Trace++Cover++Logdir++
+ ConfigFiles++Options++TimeTrap]]).
to_list(X) when is_atom(X) ->
atom_to_list(X);
diff --git a/lib/test_server/test/test_server_SUITE_data/test_server_parallel01_SUITE.erl b/lib/test_server/test/test_server_SUITE_data/test_server_parallel01_SUITE.erl
index f38f768f3b..9658191289 100644
--- a/lib/test_server/test/test_server_SUITE_data/test_server_parallel01_SUITE.erl
+++ b/lib/test_server/test/test_server_SUITE_data/test_server_parallel01_SUITE.erl
@@ -191,7 +191,7 @@ conf1_end(Config) ->
%% check 2s & 3s < 4s
Ms = timer:now_diff(now(),?config(t0,Config)),
test_server:comment(io_lib:format("~p",[now()])),
- if Ms > 3500000 -> exit({bad_parallel_exec,Ms});
+ if Ms > 4000000 -> exit({bad_parallel_exec,Ms});
Ms < 3000000 -> exit({bad_parallel_exec,Ms});
true -> ok
end.
@@ -204,7 +204,7 @@ conf2_end(Config) ->
%% check 3s & 2s < 4s
Ms = timer:now_diff(now(),?config(t0,Config)),
test_server:comment(io_lib:format("~p",[now()])),
- if Ms > 3500000 -> exit({bad_parallel_exec,Ms});
+ if Ms > 4000000 -> exit({bad_parallel_exec,Ms});
Ms < 3000000 -> exit({bad_parallel_exec,Ms});
true -> ok
end.
@@ -217,7 +217,7 @@ conf3_end(Config) ->
%% check 6s & 6s & (2s & 3s) & 1s = ~6s
Ms = timer:now_diff(now(),?config(t0,Config)),
test_server:comment(io_lib:format("~p",[now()])),
- if Ms > 6500000 -> exit({bad_parallel_exec,Ms});
+ if Ms > 7000000 -> exit({bad_parallel_exec,Ms});
Ms < 6000000 -> exit({bad_parallel_exec,Ms});
true -> ok
end.
@@ -230,7 +230,7 @@ conf4_end(Config) ->
%% check 2s & 3s >= 5s
Ms = timer:now_diff(now(),?config(t0,Config)),
test_server:comment(io_lib:format("~p",[now()])),
- if Ms > 5500000 -> exit({bad_parallel_exec,Ms});
+ if Ms > 6000000 -> exit({bad_parallel_exec,Ms});
Ms < 5000000 -> exit({bad_parallel_exec,Ms});
true -> ok
end.
@@ -243,7 +243,7 @@ conf5_end(Config) ->
%% check 1s & 1s & (3s & 2s) & 1s = ~6s
Ms = timer:now_diff(now(),?config(t0,Config)),
test_server:comment(io_lib:format("~p",[now()])),
- if Ms > 7000000 -> exit({bad_parallel_exec,Ms});
+ if Ms > 7500000 -> exit({bad_parallel_exec,Ms});
Ms < 6000000 -> exit({bad_parallel_exec,Ms});
true -> ok
end.
@@ -257,7 +257,7 @@ conf6_end(Config) ->
%% check 3s & 2s < 5s
Ms = timer:now_diff(now(),?config(t0,Config)),
test_server:comment(io_lib:format("~p",[now()])),
- if Ms > 3500000 -> exit({bad_parallel_exec,Ms});
+ if Ms > 4500000 -> exit({bad_parallel_exec,Ms});
Ms < 3000000 -> exit({bad_parallel_exec,Ms});
true -> ok
end.
@@ -277,7 +277,7 @@ conf7_end(Config) ->
%% check 1s & 1s & (2s & 2s) & 1s = ~3s
Ms = timer:now_diff(now(),?config(t0,Config)),
test_server:comment(io_lib:format("~p",[now()])),
- if Ms > 3500000 -> exit({bad_parallel_exec,Ms});
+ if Ms > 4000000 -> exit({bad_parallel_exec,Ms});
Ms < 3000000 -> exit({bad_parallel_exec,Ms});
true -> ok
end.
@@ -291,7 +291,7 @@ conf8_end(Config) ->
%% check 2s & 2s < 4s
Ms = timer:now_diff(now(),?config(t0,Config)),
test_server:comment(io_lib:format("~p",[now()])),
- if Ms > 2500000 -> exit({bad_parallel_exec,Ms});
+ if Ms > 3000000 -> exit({bad_parallel_exec,Ms});
Ms < 2000000 -> exit({bad_parallel_exec,Ms});
true -> ok
end.
diff --git a/lib/test_server/vsn.mk b/lib/test_server/vsn.mk
index 6871b5bd14..4eb70aa2cd 100644
--- a/lib/test_server/vsn.mk
+++ b/lib/test_server/vsn.mk
@@ -1 +1 @@
-TEST_SERVER_VSN = 3.6.4
+TEST_SERVER_VSN = 3.7
diff --git a/lib/tools/c_src/Makefile.in b/lib/tools/c_src/Makefile.in
index aea5686ae9..b1eb69f9dc 100644
--- a/lib/tools/c_src/Makefile.in
+++ b/lib/tools/c_src/Makefile.in
@@ -96,8 +96,11 @@ DRIVERS=
ifneq ($(strip $(ETHR_LIB_NAME)),)
# Need ethread package for emem
+ifneq ($(findstring ose,$(TARGET)),ose)
+# Do not build on OSE
PROGS += $(BIN_DIR)/emem$(TYPEMARKER)@EXEEXT@
endif
+endif
EMEM_OBJ_DIR=$(OBJ_DIR)/emem
CREATE_DIRS += $(EMEM_OBJ_DIR)
@@ -148,7 +151,12 @@ ERTS_LIB = $(ERL_TOP/erts/lib_src/obj/$(TARGET)/$(TYPE)/MADE
_create_dirs := $(shell mkdir -p $(CREATE_DIRS))
+ifneq ($(findstring ose,$(TARGET)),ose)
all: $(PROGS) $(DRIVERS)
+else
+# Do not build dynamic files on OSE
+all:
+endif
$(ERTS_LIB):
$(make_verbose)cd $(ERL_TOP)/erts/lib_src && $(MAKE) $(TYPE)
diff --git a/lib/tools/doc/src/notes.xml b/lib/tools/doc/src/notes.xml
index 2e4c354fbd..136e0a3127 100644
--- a/lib/tools/doc/src/notes.xml
+++ b/lib/tools/doc/src/notes.xml
@@ -30,6 +30,82 @@
</header>
<p>This document describes the changes made to the Tools application.</p>
+<section><title>Tools 2.6.14</title>
+
+ <section><title>Fixed Bugs and Malfunctions</title>
+ <list>
+ <item>
+ <p>
+ Removed the support for the query keyword from emacs mode
+ (Thanks to Paul Oliver)</p>
+ <p>
+ Own Id: OTP-11568</p>
+ </item>
+ <item>
+ <p>
+ Emacs mode improvements (Thanks to Steve Vinoski)</p>
+ <p>
+ Own Id: OTP-11601</p>
+ </item>
+ <item>
+ <p>
+ Application upgrade (appup) files are corrected for the
+ following applications: </p>
+ <p>
+ <c>asn1, common_test, compiler, crypto, debugger,
+ dialyzer, edoc, eldap, erl_docgen, et, eunit, gs, hipe,
+ inets, observer, odbc, os_mon, otp_mibs, parsetools,
+ percept, public_key, reltool, runtime_tools, ssh,
+ syntax_tools, test_server, tools, typer, webtool, wx,
+ xmerl</c></p>
+ <p>
+ A new test utility for testing appup files is added to
+ test_server. This is now used by most applications in
+ OTP.</p>
+ <p>
+ (Thanks to Tobias Schlager)</p>
+ <p>
+ Own Id: OTP-11744</p>
+ </item>
+ <item>
+ <p>
+ The emacs erlang mode now match erlang keywords more
+ carefully (Thanks to Steve Vinoski)</p>
+ <p>
+ Own Id: OTP-11786</p>
+ </item>
+ <item>
+ <p>
+ The emacs erlang-mode now auto loads for more file types
+ (Thanks to Phil Hagelberg)</p>
+ <p>
+ Own Id: OTP-11788</p>
+ </item>
+ </list>
+ </section>
+
+
+ <section><title>Improvements and New Features</title>
+ <list>
+ <item>
+ <p>
+ <c>cover</c> can run on itself. Also, support for reading
+ BEAM files produced by ancient OTP versions before R9C
+ has been removed.</p>
+ <p>
+ Own Id: OTP-11692</p>
+ </item>
+ <item>
+ <p>
+ Support maps in cover</p>
+ <p>
+ Own Id: OTP-11764</p>
+ </item>
+ </list>
+ </section>
+
+</section>
+
<section><title>Tools 2.6.13</title>
<section><title>Fixed Bugs and Malfunctions</title>
diff --git a/lib/tools/emacs/erlang-skels.el b/lib/tools/emacs/erlang-skels.el
index 527e812444..7379215d68 100644
--- a/lib/tools/emacs/erlang-skels.el
+++ b/lib/tools/emacs/erlang-skels.el
@@ -109,32 +109,32 @@ include separators of the form %%--...")
;; Expression templates:
(defvar erlang-skel-case
'((erlang-skel-skip-blank) o >
- "case " p " of" n> p "_ ->" n> p "ok" n> "end" p)
+ "case " p " of" n> p "_ ->" n> p "ok" n "end" > p)
"*The skeleton of a `case' expression.
Please see the function `tempo-define-template'.")
(defvar erlang-skel-if
'((erlang-skel-skip-blank) o >
- "if" n> p " ->" n> p "ok" n> "end" p)
+ "if" n> p " ->" n> p "ok" n "end" > p)
"The skeleton of an `if' expression.
Please see the function `tempo-define-template'.")
(defvar erlang-skel-receive
'((erlang-skel-skip-blank) o >
- "receive" n> p "_ ->" n> p "ok" n> "end" p)
+ "receive" n> p "_ ->" n> p "ok" n "end" > p)
"*The skeleton of a `receive' expression.
Please see the function `tempo-define-template'.")
(defvar erlang-skel-receive-after
'((erlang-skel-skip-blank) o >
- "receive" n> p "_ ->" n> p "ok" n> "after " p "T ->" n>
- p "ok" n> "end" p)
+ "receive" n> p "_ ->" n> p "ok" n "after " > p "T ->" n>
+ p "ok" n "end" > p)
"*The skeleton of a `receive' expression with an `after' clause.
Please see the function `tempo-define-template'.")
(defvar erlang-skel-receive-loop
'(& o "loop(" p ") ->" n> "receive" n> p "_ ->" n>
- "loop(" p ")" n> "end.")
+ "loop(" p ")" n "end." >)
"*The skeleton of a simple `receive' loop.
Please see the function `tempo-define-template'.")
@@ -256,8 +256,8 @@ Please see the function `tempo-define-template'.")
"loop(From) ->" n>
"receive" n>
p "_ ->" n>
- "loop(From)" n>
- "end." n
+ "loop(From)" n
+ "end." > n
)
"*Template of a small server.
Please see the function `tempo-define-template'.")
@@ -291,8 +291,8 @@ Please see the function `tempo-define-template'.")
"{ok, Pid} ->" n>
"{ok, Pid};" n>
"Error ->" n>
- "Error" n>
- "end." n
+ "Error" n
+ "end." > n
n
(erlang-skel-separator-start 2)
"%% @private" n
@@ -421,8 +421,8 @@ Please see the function `tempo-define-template'.")
"{ok, Pid} ->" n>
"{ok, Pid, #state{}};" n>
"Error ->" n>
- "Error" n>
- "end." n
+ "Error" n
+ "end." > n
n
(erlang-skel-separator-start 2)
"%% @private" n
diff --git a/lib/tools/emacs/erlang.el b/lib/tools/emacs/erlang.el
index c1e9bec6ae..4e3c49c717 100644
--- a/lib/tools/emacs/erlang.el
+++ b/lib/tools/emacs/erlang.el
@@ -73,6 +73,8 @@
;; M-x set-variable RET debug-on-error RET t RET
;;; Code:
+(eval-when-compile (require 'cl))
+
;; Variables:
(defconst erlang-version "2.7"
@@ -620,7 +622,6 @@ resulting regexp is surrounded by \\_< and \\_>."
"if"
"let"
"of"
- "query"
"receive"
"try"
"when")
@@ -663,6 +664,7 @@ resulting regexp is surrounded by \\_< and \\_>."
"is_function"
"is_integer"
"is_list"
+ "is_map"
"is_number"
"is_pid"
"is_port"
@@ -714,7 +716,8 @@ resulting regexp is surrounded by \\_< and \\_>."
"pos_integer"
"string"
"term"
- "timeout")
+ "timeout"
+ "map")
"Erlang type specs types"))
(eval-and-compile
@@ -771,6 +774,7 @@ resulting regexp is surrounded by \\_< and \\_>."
"is_function"
"is_integer"
"is_list"
+ "is_map"
"is_number"
"is_pid"
"is_port"
@@ -790,6 +794,7 @@ resulting regexp is surrounded by \\_< and \\_>."
"list_to_tuple"
"load_module"
"make_ref"
+ "map_size"
"max"
"min"
"module_loaded"
@@ -848,7 +853,6 @@ resulting regexp is surrounded by \\_< and \\_>."
"append_element"
"await_proc_exit"
"await_sched_wall_time_modifications"
- "bitstr_to_list"
"bump_reductions"
"call_on_load_function"
"cancel_timer"
@@ -894,7 +898,6 @@ resulting regexp is surrounded by \\_< and \\_>."
"hibernate"
"insert_element"
"is_builtin"
- "list_to_bitstr"
"load_nif"
"loaded"
"localtime"
@@ -1415,6 +1418,10 @@ Other commands:
(if (boundp 'after-change-major-mode-hook)
(run-hooks 'after-change-major-mode-hook)))
+;;;###autoload
+(dolist (r '("\\.erl$" "\\.app\\.src$" "\\.escript"
+ "\\.hrl$" "\\.xrl$" "\\.yrl" "/ebin/.+\\.app"))
+ (add-to-list 'auto-mode-alist (cons r 'erlang-mode)))
(defun erlang-syntax-table-init ()
(if (null erlang-mode-syntax-table)
@@ -2565,9 +2572,9 @@ Value is list (stack token-start token-type in-what)."
(erlang-pop stack))
(if (and stack (memq (car (car stack)) '(icr begin fun try)))
(erlang-pop stack))))
- ((looking-at "catch.*of")
+ ((looking-at "catch\\b.*of")
t)
- ((looking-at "catch\\s *\\($\\|%\\|.*->\\)")
+ ((looking-at "catch\\b\\s *\\($\\|%\\|.*->\\)")
;; Must pop top icr layer, `catch' in try/catch
;;will push a new layer next.
(progn
@@ -2608,16 +2615,16 @@ Value is list (stack token-start token-type in-what)."
(erlang-skip-blank to)))
(eq (following-char) ?\())
(erlang-push (list 'fun token (current-column)) stack)))
- ((looking-at "\\(begin\\|query\\)[^_a-zA-Z0-9]")
+ ((looking-at "\\(begin\\)[^_a-zA-Z0-9]")
(erlang-push (list 'begin token (current-column)) stack))
;; Normal when case
;;((looking-at "when\\s ")
;;((looking-at "when\\s *\\($\\|%\\)")
((looking-at "when[^_a-zA-Z0-9]")
(erlang-push (list 'when token (current-column)) stack))
- ((looking-at "catch.*of")
+ ((looking-at "catch\\b.*of")
t)
- ((looking-at "catch\\s *\\($\\|%\\|.*->\\)")
+ ((looking-at "catch\\b\\s *\\($\\|%\\|.*->\\)")
(erlang-push (list 'icr token (current-column)) stack))
;;(erlang-push (list '-> token (current-column)) stack))
;;((looking-at "^of$")
@@ -2908,7 +2915,7 @@ Return nil if inside string, t if in a comment."
(if stack
(erlang-caddr (car stack))
0))
- ((looking-at "catch\\($\\|[^_a-zA-Z0-9]\\)")
+ ((looking-at "catch\\b\\($\\|[^_a-zA-Z0-9]\\)")
;; Are we in a try
(let ((start (if (eq (car stack-top) '->)
(car (cdr stack))
@@ -3044,7 +3051,7 @@ This assumes that the preceding expression is either simple
\(i.e. an atom) or parenthesized."
(save-excursion
(or arg (setq arg 1))
- (forward-sexp (- arg))
+ (ignore-errors (forward-sexp (- arg)))
(let ((col (current-column)))
(skip-chars-backward " \t")
;; Special hack to handle: (note line break)
@@ -3118,13 +3125,13 @@ This assumes that the preceding expression is either simple
(defun erlang-at-keyword ()
"Are we looking at an Erlang keyword which will increase indentation?"
- (looking-at (concat "\\(when\\|if\\|fun\\|case\\|begin\\|query\\|"
- "of\\|receive\\|after\\|catch\\|try\\)[^_a-zA-Z0-9]")))
+ (looking-at (concat "\\(when\\|if\\|fun\\|case\\|begin\\|"
+ "of\\|receive\\|after\\|catch\\|try\\)\\b")))
(defun erlang-at-operator ()
"Are we looking at an Erlang operator?"
(looking-at
- "\\(bnot\\|div\\|mod\\|band\\|bor\\|bxor\\|bsl\\|bsr\\)[^_a-zA-Z0-9]"))
+ "\\(bnot\\|div\\|mod\\|band\\|bor\\|bxor\\|bsl\\|bsr\\)\\b"))
(defun erlang-comment-indent ()
"Compute Erlang comment indentation.
@@ -3651,6 +3658,10 @@ Normally used in conjunction with `erlang-beginning-of-clause', e.g.:
(setq cont nil))
((looking-at "\\s *\\($\\|%\\)")
(forward-line 1))
+ ((looking-at "\\s *<<[^>]*?>>")
+ (when (zerop res)
+ (setq res (+ 1 res)))
+ (goto-char (match-end 0)))
((looking-at "\\s *,")
(setq res (+ 1 res))
(goto-char (match-end 0)))
@@ -3932,7 +3943,7 @@ non-whitespace characters following the point on the current line."
(self-insert-command arg)
;; Was this the second char in bit-syntax open (`<<')?
- (unless (< (point) 2)
+ (unless (<= (point) 2)
(save-excursion
(backward-char 2)
(when (and (eq (char-after (point)) ?<)
@@ -3953,7 +3964,7 @@ non-whitespace characters following the point on the current line."
(defun erlang-after-bitsyntax-close ()
"Return t if point is immediately after a bit-syntax close parenthesis (`>>')."
- (and (>= (point) 2)
+ (and (>= (point) 3)
(save-excursion
(backward-char 2)
(and (eq (char-after (point)) ?>)
diff --git a/lib/tools/emacs/test.erl.indented b/lib/tools/emacs/test.erl.indented
index 0de626125c..1c1086ca58 100644
--- a/lib/tools/emacs/test.erl.indented
+++ b/lib/tools/emacs/test.erl.indented
@@ -744,3 +744,19 @@ commas_first() ->
] }
]
}.
+
+
+%% this used to result in a scan-sexp error
+[{
+ }].
+
+%% this used to result in 2x the correct indentation within the function
+%% body, due to the function name being mistaken for a keyword
+catcher(N) ->
+ try generate_exception(N) of
+ Val -> {N, normal, Val}
+ catch
+ throw:X -> {N, caught, thrown, X};
+ exit:X -> {N, caught, exited, X};
+ error:X -> {N, caught, error, X}
+ end.
diff --git a/lib/tools/emacs/test.erl.orig b/lib/tools/emacs/test.erl.orig
index 57263d573b..a9d09000d2 100644
--- a/lib/tools/emacs/test.erl.orig
+++ b/lib/tools/emacs/test.erl.orig
@@ -744,3 +744,19 @@ commas_first() ->
] }
]
}.
+
+
+%% this used to result in a scan-sexp error
+[{
+}].
+
+%% this used to result in 2x the correct indentation within the function
+%% body, due to the function name being mistaken for a keyword
+catcher(N) ->
+try generate_exception(N) of
+Val -> {N, normal, Val}
+catch
+throw:X -> {N, caught, thrown, X};
+exit:X -> {N, caught, exited, X};
+error:X -> {N, caught, error, X}
+end.
diff --git a/lib/tools/src/cover.erl b/lib/tools/src/cover.erl
index 6aeb251ac2..113fa24bd5 100644
--- a/lib/tools/src/cover.erl
+++ b/lib/tools/src/cover.erl
@@ -89,8 +89,9 @@
flush/1,
stop/0, stop/1]).
-export([remote_start/1,get_main_node/0]).
-%-export([bump/5]).
--export([transform/4]). % for test purposes
+
+%% Used internally to ensure we upgrade the code to the latest version.
+-export([main_process_loop/1,remote_process_loop/1]).
-record(main_state, {compiled=[], % [{Module,File}]
imported=[], % [{Module,File,ImportFile}]
@@ -110,7 +111,6 @@
-define(BUMP_REC_NAME,bump).
-record(vars, {module, % atom() Module name
- vsn, % atom()
init_info=[], % [{M,F,A,C,L}]
@@ -230,25 +230,9 @@ compile_directory(Dir) when is_list(Dir) ->
compile_directory(Dir, Options) when is_list(Dir), is_list(Options) ->
case file:list_dir(Dir) of
{ok, Files} ->
-
- %% Filter out all erl files (except cover.erl)
- ErlFileNames =
- lists:filter(fun("cover.erl") ->
- false;
- (File) ->
- case filename:extension(File) of
- ".erl" -> true;
- _ -> false
- end
- end,
- Files),
-
- %% Create a list of .erl file names (incl path) and call
- %% compile_modules/2 with the list of file names.
- ErlFiles = lists:map(fun(ErlFileName) ->
- filename:join(Dir, ErlFileName)
- end,
- ErlFileNames),
+ ErlFiles = [filename:join(Dir, File) ||
+ File <- Files,
+ filename:extension(File) =:= ".erl"],
compile_modules(ErlFiles, Options);
Error ->
Error
@@ -262,7 +246,7 @@ compile_modules([File|Files], Options, Result) ->
R = call({compile, File, Options}),
compile_modules(Files,Options,[R|Result]);
compile_modules([],_Opts,Result) ->
- reverse(Result).
+ lists:reverse(Result).
filter_options(Options) ->
lists:filter(fun(Option) ->
@@ -320,25 +304,9 @@ compile_beam_directory() ->
compile_beam_directory(Dir) when is_list(Dir) ->
case file:list_dir(Dir) of
{ok, Files} ->
-
- %% Filter out all beam files (except cover.beam)
- BeamFileNames =
- lists:filter(fun("cover.beam") ->
- false;
- (File) ->
- case filename:extension(File) of
- ".beam" -> true;
- _ -> false
- end
- end,
- Files),
-
- %% Create a list of .beam file names (incl path) and call
- %% compile_beam/1 for each such file name
- BeamFiles = lists:map(fun(BeamFileName) ->
- filename:join(Dir, BeamFileName)
- end,
- BeamFileNames),
+ BeamFiles = [filename:join(Dir, File) ||
+ File <- Files,
+ filename:extension(File) =:= ".beam"],
compile_beams(BeamFiles);
Error ->
Error
@@ -350,7 +318,7 @@ compile_beams([File|Files],Result) ->
R = compile_beam(File),
compile_beams(Files,[R|Result]);
compile_beams([],Result) ->
- reverse(Result).
+ lists:reverse(Result).
%% analyse(Module) ->
@@ -613,8 +581,11 @@ main_process_loop(State) ->
Compiled = add_compiled(Module, File,
State#main_state.compiled),
Imported = remove_imported(Module,State#main_state.imported),
- main_process_loop(State#main_state{compiled = Compiled,
- imported = Imported});
+ NewState = State#main_state{compiled = Compiled,
+ imported = Imported},
+ %% This module (cover) could have been reloaded. Make
+ %% sure we run the new code.
+ ?MODULE:main_process_loop(NewState);
error ->
reply(From, {error, File}),
main_process_loop(State)
@@ -639,8 +610,11 @@ main_process_loop(State) ->
end,
reply(From,Reply),
Imported = remove_imported(Module,State#main_state.imported),
- main_process_loop(State#main_state{compiled = Compiled,
- imported = Imported});
+ NewState = State#main_state{compiled = Compiled,
+ imported = Imported},
+ %% This module (cover) could have been reloaded. Make
+ %% sure we run the new code.
+ ?MODULE:main_process_loop(NewState);
{error,no_beam} ->
%% The module has first been compiled from .erl, and now
%% someone tries to compile it from .beam
@@ -857,7 +831,7 @@ remote_process_loop(State) ->
{remote,load_compiled,Compiled} ->
Compiled1 = load_compiled(Compiled,State#remote_state.compiled),
remote_reply(State#remote_state.main_node, ok),
- remote_process_loop(State#remote_state{compiled=Compiled1});
+ ?MODULE:remote_process_loop(State#remote_state{compiled=Compiled1});
{remote,unload,UnloadedModules} ->
unload(UnloadedModules),
@@ -1257,12 +1231,12 @@ add_imported(M, F1, ImportFile, [{M,_F2,ImportFiles}|Imported], Acc) ->
dont_import;
false ->
NewEntry = {M, F1, [ImportFile | ImportFiles]},
- {ok, reverse([NewEntry | Acc]) ++ Imported}
+ {ok, lists:reverse([NewEntry | Acc]) ++ Imported}
end;
add_imported(M, F, ImportFile, [H|Imported], Acc) ->
add_imported(M, F, ImportFile, Imported, [H|Acc]);
add_imported(M, F, ImportFile, [], Acc) ->
- {ok, reverse([{M, F, [ImportFile]} | Acc])}.
+ {ok, lists:reverse([{M, F, [ImportFile]} | Acc])}.
%% Removes a module from the list of imported modules and writes a warning
%% This is done when a module is compiled.
@@ -1383,9 +1357,9 @@ do_compile_beam(Module,Beam,UserOptions) ->
{error,E};
encrypted_abstract_code=E ->
{error,E};
- {Vsn,Code} ->
+ {raw_abstract_v1,Code} ->
Forms0 = epp:interpret_file_attribute(Code),
- {Forms,Vars} = transform(Vsn, Forms0, Module, Beam),
+ {Forms,Vars} = transform(Forms0, Module),
%% We need to recover the source from the compilation
%% info otherwise the newly compiled module will have
@@ -1400,7 +1374,7 @@ do_compile_beam(Module,Beam,UserOptions) ->
{module, Module} ->
%% Store info about all function clauses in database
- InitInfo = reverse(Vars#vars.init_info),
+ InitInfo = lists:reverse(Vars#vars.init_info),
ets:insert(?COVER_CLAUSE_TABLE, {Module, InitInfo}),
%% Store binary code so it can be loaded on remote nodes
@@ -1411,7 +1385,11 @@ do_compile_beam(Module,Beam,UserOptions) ->
_Error ->
do_clear(Module),
error
- end
+ end;
+ {_VSN,_Code} ->
+ %% Wrong version of abstract code. Just report that there
+ %% is no abstract code.
+ {error,no_abstract_code}
end.
get_abstract_code(Module, Beam) ->
@@ -1445,28 +1423,9 @@ get_compile_info(Module, Beam) ->
[]
end.
-transform(Vsn, Code, Module, Beam) when Vsn=:=abstract_v1; Vsn=:=abstract_v2 ->
- Vars0 = #vars{module=Module, vsn=Vsn},
- MainFile=find_main_filename(Code),
- {ok, MungedForms,Vars} = transform_2(Code,[],Vars0,MainFile,on),
-
- %% Add module and export information to the munged forms
- %% Information about module_info must be removed as this function
- %% is added at compilation
- {ok, {Module, [{exports,Exports1}]}} = beam_lib:chunks(Beam, [exports]),
- Exports2 = lists:filter(fun(Export) ->
- case Export of
- {module_info,_} -> false;
- _ -> true
- end
- end,
- Exports1),
- Forms = [{attribute,1,module,Module},
- {attribute,2,export,Exports2}]++ MungedForms,
- {Forms,Vars};
-transform(Vsn=raw_abstract_v1, Code, Module, _Beam) ->
+transform(Code, Module) ->
MainFile=find_main_filename(Code),
- Vars0 = #vars{module=Module, vsn=Vsn},
+ Vars0 = #vars{module=Module},
{ok,MungedForms,Vars} = transform_2(Code,[],Vars0,MainFile,on),
{MungedForms,Vars}.
@@ -1486,7 +1445,7 @@ transform_2([Form0|Forms],MungedForms,Vars,MainFile,Switch) ->
transform_2(Forms,[MungedForm|MungedForms],Vars2,MainFile,NewSwitch)
end;
transform_2([],MungedForms,Vars,_,_) ->
- {ok, reverse(MungedForms), Vars}.
+ {ok, lists:reverse(MungedForms), Vars}.
%% Expand short-circuit Boolean expressions.
expand(Expr) ->
@@ -1553,14 +1512,9 @@ aux_var(Vars, N) ->
end.
%% This code traverses the abstract code, stored as the abstract_code
-%% chunk in the BEAM file, as described in absform(3) for Erlang/OTP R8B
-%% (Vsn=abstract_v2).
-%% The abstract format after preprocessing differs slightly from the abstract
-%% format given eg using epp:parse_form, this has been noted in comments.
-%% The switch is turned off when we encounter other files then the main file.
+%% chunk in the BEAM file, as described in absform(3).
+%% The switch is turned off when we encounter other files than the main file.
%% This way we will be able to exclude functions defined in include files.
-munge({function,0,module_info,_Arity,_Clauses},_Vars,_MainFile,_Switch) ->
- ignore; % module_info will be added again when the forms are recompiled
munge({function,Line,Function,Arity,Clauses},Vars,_MainFile,on) ->
Vars2 = Vars#vars{function=Function,
arity=Arity,
@@ -1618,7 +1572,7 @@ munge_clauses([Clause|Clauses], Vars, Lines, MClauses) ->
MClauses])
end;
munge_clauses([], Vars, Lines, MungedClauses) ->
- {reverse(MungedClauses), Vars#vars{lines = Lines}}.
+ {lists:reverse(MungedClauses), Vars#vars{lines = Lines}}.
munge_body(Expr, Vars) ->
munge_body(Expr, Vars, [], []).
@@ -1662,7 +1616,7 @@ munge_body([Expr|Body], Vars, MungedBody, LastExprBumpLines) ->
munge_body(Body, Vars3, MungedExprs1, NewBumps)
end;
munge_body([], Vars, MungedBody, _LastExprBumpLines) ->
- {reverse(MungedBody), Vars}.
+ {lists:reverse(MungedBody), Vars}.
%%% Fix last expression (OTP-8188). A typical example:
%%%
@@ -1800,16 +1754,35 @@ munge_expr({match,Line,ExprL,ExprR}, Vars) ->
munge_expr({tuple,Line,Exprs}, Vars) ->
{MungedExprs, Vars2} = munge_exprs(Exprs, Vars, []),
{{tuple,Line,MungedExprs}, Vars2};
-munge_expr({record,Line,Expr,Exprs}, Vars) ->
- %% Only for Vsn=raw_abstract_v1
- {MungedExprName, Vars2} = munge_expr(Expr, Vars),
+munge_expr({record,Line,Name,Exprs}, Vars) ->
+ {MungedExprFields, Vars2} = munge_exprs(Exprs, Vars, []),
+ {{record,Line,Name,MungedExprFields}, Vars2};
+munge_expr({record,Line,Arg,Name,Exprs}, Vars) ->
+ {MungedArg, Vars2} = munge_expr(Arg, Vars),
{MungedExprFields, Vars3} = munge_exprs(Exprs, Vars2, []),
- {{record,Line,MungedExprName,MungedExprFields}, Vars3};
+ {{record,Line,MungedArg,Name,MungedExprFields}, Vars3};
munge_expr({record_field,Line,ExprL,ExprR}, Vars) ->
- %% Only for Vsn=raw_abstract_v1
- {MungedExprL, Vars2} = munge_expr(ExprL, Vars),
- {MungedExprR, Vars3} = munge_expr(ExprR, Vars2),
- {{record_field,Line,MungedExprL,MungedExprR}, Vars3};
+ {MungedExprR, Vars2} = munge_expr(ExprR, Vars),
+ {{record_field,Line,ExprL,MungedExprR}, Vars2};
+munge_expr({map,Line,Fields}, Vars) ->
+ %% EEP 43
+ {MungedFields, Vars2} = munge_exprs(Fields, Vars, []),
+ {{map,Line,MungedFields}, Vars2};
+munge_expr({map,Line,Arg,Fields}, Vars) ->
+ %% EEP 43
+ {MungedArg, Vars2} = munge_expr(Arg, Vars),
+ {MungedFields, Vars3} = munge_exprs(Fields, Vars2, []),
+ {{map,Line,MungedArg,MungedFields}, Vars3};
+munge_expr({map_field_assoc,Line,Name,Value}, Vars) ->
+ %% EEP 43
+ {MungedName, Vars2} = munge_expr(Name, Vars),
+ {MungedValue, Vars3} = munge_expr(Value, Vars2),
+ {{map_field_assoc,Line,MungedName,MungedValue}, Vars3};
+munge_expr({map_field_exact,Line,Name,Value}, Vars) ->
+ %% EEP 43
+ {MungedName, Vars2} = munge_expr(Name, Vars),
+ {MungedValue, Vars3} = munge_expr(Value, Vars2),
+ {{map_field_exact,Line,MungedName,MungedValue}, Vars3};
munge_expr({cons,Line,ExprH,ExprT}, Vars) ->
{MungedExprH, Vars2} = munge_expr(ExprH, Vars),
{MungedExprT, Vars3} = munge_expr(ExprT, Vars2),
@@ -1871,23 +1844,10 @@ munge_expr({'try',Line,Body,Clauses,CatchClauses,After}, Vars) ->
{MungedAfter, Vars4} = munge_body(After, Vars3),
{{'try',Line,MungedBody,MungedClauses,MungedCatchClauses,MungedAfter},
Vars4};
-%% Difference in abstract format after preprocessing: Funs get an extra
-%% element Extra.
-%% NOT NECESSARY FOR Vsn=raw_abstract_v1
-munge_expr({'fun',Line,{function,Name,Arity},_Extra}, Vars) ->
- {{'fun',Line,{function,Name,Arity}}, Vars};
-munge_expr({'fun',Line,{clauses,Clauses},_Extra}, Vars) ->
- {MungedClauses,Vars2}=munge_clauses(Clauses, Vars),
- {{'fun',Line,{clauses,MungedClauses}}, Vars2};
munge_expr({'fun',Line,{clauses,Clauses}}, Vars) ->
- %% Only for Vsn=raw_abstract_v1
{MungedClauses,Vars2}=munge_clauses(Clauses, Vars),
{{'fun',Line,{clauses,MungedClauses}}, Vars2};
-munge_expr({named_fun,Line,Name,Clauses,_Extra}, Vars) ->
- {MungedClauses,Vars2}=munge_clauses(Clauses, Vars),
- {{named_fun,Line,Name,MungedClauses}, Vars2};
munge_expr({named_fun,Line,Name,Clauses}, Vars) ->
- %% Only for Vsn=raw_abstract_v1
{MungedClauses,Vars2}=munge_clauses(Clauses, Vars),
{{named_fun,Line,Name,MungedClauses}, Vars2};
munge_expr({bin,Line,BinElements}, Vars) ->
@@ -1908,7 +1868,7 @@ munge_exprs([Expr|Exprs], Vars, MungedExprs) ->
{MungedExpr, Vars2} = munge_expr(Expr, Vars),
munge_exprs(Exprs, Vars2, [MungedExpr|MungedExprs]);
munge_exprs([], Vars, MungedExprs) ->
- {reverse(MungedExprs), Vars}.
+ {lists:reverse(MungedExprs), Vars}.
%% Every qualifier is decorated with a counter.
munge_qualifiers(Qualifiers, Vars) ->
@@ -1927,7 +1887,7 @@ munge_qs([Expr|Qs], Vars, MQs) ->
{MungedExpr, Vars2} = munge_expr(Expr, Vars),
munge_qs1(Qs, L, MungedExpr, Vars, Vars2, MQs);
munge_qs([], Vars, MQs) ->
- {reverse(MQs), Vars}.
+ {lists:reverse(MQs), Vars}.
munge_qs1(Qs, Line, NQ, Vars, Vars2, MQs) ->
case new_bumps(Vars2, Vars) of
@@ -2120,7 +2080,7 @@ merge_clauses([{{M,F,A,_C1},R1},{{M,F,A,C2},R2}|Clauses], MFun, Result) ->
merge_clauses([{{M,F,A,_C},R}|Clauses], MFun, Result) ->
merge_clauses(Clauses, MFun, [{{M,F,A},R}|Result]);
merge_clauses([], _Fun, Result) ->
- reverse(Result).
+ lists:reverse(Result).
merge_functions([{_MFA,R}|Functions], MFun) ->
merge_functions(Functions, MFun, R);
@@ -2441,14 +2401,6 @@ not_loaded(_Module,_Else, State) ->
%%%--Div-----------------------------------------------------------------
-reverse(List) ->
- reverse(List,[]).
-reverse([H|T],Acc) ->
- reverse(T,[H|Acc]);
-reverse([],Acc) ->
- Acc.
-
-
escape_lt_and_gt(Rawline,HTML) when HTML =/= true ->
Rawline;
escape_lt_and_gt(Rawline,_HTML) ->
diff --git a/lib/tools/src/tools.app.src b/lib/tools/src/tools.app.src
index 553c5eb96b..ec5b6f3a82 100644
--- a/lib/tools/src/tools.app.src
+++ b/lib/tools/src/tools.app.src
@@ -39,23 +39,9 @@
{applications, [kernel, stdlib]},
{env, [{file_util_search_methods,[{"", ""}, {"ebin", "esrc"}, {"ebin", "src"}]}
]
- }
+ },
+ {runtime_dependencies, ["webtool-0.8.10","stdlib-2.0","runtime_tools-1.8.14",
+ "kernel-3.0","inets-5.10","erts-6.0",
+ "compiler-5.0"]}
]
}.
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
diff --git a/lib/tools/src/tools.appup.src b/lib/tools/src/tools.appup.src
index 8de1ec76c9..9a27456a81 100644
--- a/lib/tools/src/tools.appup.src
+++ b/lib/tools/src/tools.appup.src
@@ -1,19 +1,21 @@
-#
-# %CopyrightBegin%
-#
-# Copyright Ericsson AB 2001-2009. 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%
-#
-{"%VSN%",[],[]}.
+%% -*- erlang -*-
+%% %CopyrightBegin%
+%%
+%% Copyright Ericsson AB 2001-2014. 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%
+{"%VSN%",
+ [{<<".*">>,[{restart_application, tools}]}],
+ [{<<".*">>,[{restart_application, tools}]}]
+}.
diff --git a/lib/tools/src/xref_compiler.erl b/lib/tools/src/xref_compiler.erl
index f0fed502a5..c4b5c04c12 100644
--- a/lib/tools/src/xref_compiler.erl
+++ b/lib/tools/src/xref_compiler.erl
@@ -1,7 +1,7 @@
%%
%% %CopyrightBegin%
%%
-%% Copyright Ericsson AB 2000-2013. All Rights Reserved.
+%% Copyright Ericsson AB 2000-2014. 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
@@ -885,7 +885,7 @@ evaluate([pop | P], T, [_ | S]) ->
evaluate([], T, [R]) ->
{T, R}.
-%% (PossibleGraph, 1 | -1, dict()) -> dict()
+%% (PossibleGraph, 1 | -1, dict:dict()) -> dict:dict()
%% Use the same table for everything... Here: Reference counters for digraphs.
update_graph_counter(Value, Inc, T) ->
case catch digraph:info(Value) of
diff --git a/lib/tools/src/xref_utils.erl b/lib/tools/src/xref_utils.erl
index 7b72165e6f..49c397a140 100644
--- a/lib/tools/src/xref_utils.erl
+++ b/lib/tools/src/xref_utils.erl
@@ -1,7 +1,7 @@
%%
%% %CopyrightBegin%
%%
-%% Copyright Ericsson AB 2000-2013. All Rights Reserved.
+%% Copyright Ericsson AB 2000-2014. 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
@@ -437,7 +437,7 @@ regexpr({ModExpr, FunExpr, ArityExpr}, Var) ->
V2
end.
-%% -> digraph()
+%% -> digraph:graph()
relation_to_graph(S) ->
G = digraph:new(),
Fun = fun({From, To}) ->
diff --git a/lib/tools/test/cover_SUITE.erl b/lib/tools/test/cover_SUITE.erl
index bd71218474..80807b1d38 100644
--- a/lib/tools/test/cover_SUITE.erl
+++ b/lib/tools/test/cover_SUITE.erl
@@ -22,7 +22,8 @@
suite/0,groups/0,init_per_suite/1, end_per_suite/1,
init_per_group/2,end_per_group/2]).
--export([start/1, compile/1, analyse/1, misc/1, stop/1,
+-export([coverage/1, coverage_analysis/1,
+ start/1, compile/1, analyse/1, misc/1, stop/1,
distribution/1, reconnect/1, die_and_reconnect/1,
dont_reconnect_after_stop/1, stop_node_after_disconnect/1,
export_import/1,
@@ -30,6 +31,8 @@
otp_8188/1, otp_8270/1, otp_8273/1, otp_8340/1,
otp_10979_hanging_node/1, compile_beam_opts/1, eep37/1]).
+-export([do_coverage/1]).
+
-include_lib("test_server/include/test_server.hrl").
%%----------------------------------------------------------------------
@@ -46,25 +49,25 @@
suite() -> [{ct_hooks,[ts_install_cth]}].
all() ->
+ NoStartStop = [eif,otp_5305,otp_5418,otp_7095,otp_8273,
+ otp_8340,otp_8188,compile_beam_opts,eep37],
+ StartStop = [start, compile, analyse, misc, stop,
+ distribution, reconnect, die_and_reconnect,
+ dont_reconnect_after_stop, stop_node_after_disconnect,
+ export_import, otp_5031, otp_6115,
+ otp_8270, otp_10979_hanging_node],
case whereis(cover_server) of
undefined ->
- [start, compile, analyse, misc, stop,
- distribution, reconnect, die_and_reconnect,
- dont_reconnect_after_stop, stop_node_after_disconnect,
- export_import, otp_5031, eif, otp_5305, otp_5418,
- otp_6115, otp_7095, otp_8188, otp_8270, otp_8273,
- otp_8340, otp_10979_hanging_node, compile_beam_opts, eep37];
+ [coverage,StartStop ++ NoStartStop];
_pid ->
- {skip,
- "It looks like the test server is running "
- "cover. Can't run cover test."}
+ [coverage|NoStartStop++[coverage_analysis]]
end.
groups() ->
[].
init_per_suite(Config) ->
- Config.
+ [{ct_is_running_cover,whereis(cover_server) =/= undefined}|Config].
end_per_suite(_Config) ->
ok.
@@ -90,13 +93,64 @@ init_per_testcase(TC, Config) when TC =:= misc;
init_per_testcase(_TestCase, Config) ->
Config.
-end_per_testcase(TestCase, _Config) ->
- case lists:member(TestCase,[start,compile,analyse,misc]) of
+end_per_testcase(TestCase, Config) ->
+ NoStop = [start,compile,analyse,misc],
+ DontStop = proplists:get_bool(ct_is_running_cover, Config) orelse
+ lists:member(TestCase, NoStop),
+ case DontStop of
true -> ok;
false -> cover:stop()
end,
ok.
+coverage(Config) when is_list(Config) ->
+ {ok,?MODULE} = cover:compile_beam(?MODULE),
+ ?MODULE:do_coverage(Config).
+
+do_coverage(Config) ->
+ Outdir = ?config(priv_dir, Config),
+ ExportFile = filename:join(Outdir, "export"),
+ ok = cover:export(ExportFile, ?MODULE),
+ {error,{already_started,_}} = cover:start(),
+ {error,_} = cover:compile_beam(non_existing_module),
+ _ = cover:which_nodes(),
+ _ = cover:modules(),
+ _ = cover:imported(),
+ {error,{not_cover_compiled,lists}} = cover:analyze(lists),
+
+ %% Cover escaping of '&' in HTML files.
+
+ case proplists:get_bool(ct_is_running_cover, Config) of
+ false ->
+ %% Cover server was implicitly started when this module
+ %% was cover-compiled. We must stop the cover server, but
+ %% we must ensure that this module is not on the call
+ %% stack when it is unloaded. Therefore, the call that
+ %% follows MUST be tail-recursive.
+ cover:stop();
+ true ->
+ %% Cover server was started by common_test; don't stop it.
+ ok
+ end.
+
+%% This test case will only be run when common_test is running cover.
+coverage_analysis(Config) when is_list(Config) ->
+ {ok,Analysis1} = cover:analyze(?MODULE),
+ io:format("~p\n", [Analysis1]),
+ {ok,Analysis2} = cover:analyze(?MODULE, calls),
+ io:format("~p\n", [Analysis2]),
+ {ok,_Analysis3} = cover:analyze(?MODULE, calls, line),
+
+ Outdir = ?config(priv_dir, Config),
+ Outfile = filename:join(Outdir, ?MODULE),
+
+ {ok,Outfile} = cover:analyze_to_file(?MODULE, Outfile),
+ {ok,Contents} = file:read_file(Outfile),
+ ok = file:delete(Outfile),
+ ok = io:put_chars(Contents),
+ {ok,Outfile} = cover:analyze_to_file(?MODULE, Outfile, [html]),
+ ok.
+
start(suite) -> [];
start(Config) when is_list(Config) ->
?line ok = file:set_cwd(?config(data_dir, Config)),
@@ -462,13 +516,11 @@ reconnect(Config) ->
cover:flush(N1),
rpc:call(N1,f,f1,[]),
- %% This will cause a call to f:f2() when nodes()==[] on N1
+ %% This will cause first casue the N1 node to initiate a
+ %% disconnect and then call f:f2() when nodes() =:= [] on N1.
rpc:cast(N1,f,call_f2_when_isolated,[]),
-
- %% Disconnect and check that node is removed from main cover node
- net_kernel:disconnect(N1),
timer:sleep(500), % allow some to detect disconnect and for f:f2() call
- [] = cover:which_nodes(),
+ cover_which_nodes([]),
%% Do some add one module (b) and remove one module (a)
code:purge(a),
@@ -476,7 +528,7 @@ reconnect(Config) ->
{ok,b} = cover:compile(b),
cover_compiled = code:which(b),
- [] = cover:which_nodes(),
+ cover_which_nodes([]),
check_f_calls(1,0), % only the first call - before the flush
%% Reconnect the node and check that b and f are cover compiled but not a
@@ -519,7 +571,7 @@ die_and_reconnect(Config) ->
%% Kill the node
rpc:call(N1,erlang,halt,[]),
- [] = cover:which_nodes(),
+ cover_which_nodes([]),
check_f_calls(1,0), % only the first call - before the flush
@@ -560,7 +612,7 @@ dont_reconnect_after_stop(Config) ->
%% Stop cover on the node, then terminate the node
cover:stop(N1),
rpc:call(N1,erlang,halt,[]),
- [] = cover:which_nodes(),
+ cover_which_nodes([]),
check_f_calls(1,0),
@@ -568,7 +620,7 @@ dont_reconnect_after_stop(Config) ->
{ok,N1} = ?t:start_node(NodeName,peer,
[{args," -pa " ++ DataDir},{start_cover,false}]),
timer:sleep(300),
- [] = cover:which_nodes(),
+ cover_which_nodes([]),
Beam = rpc:call(N1,code,which,[f]),
false = (Beam==cover_compiled),
@@ -613,7 +665,7 @@ stop_node_after_disconnect(Config) ->
{ok,N1} = ?t:start_node(NodeName,peer,
[{args," -pa " ++ DataDir},{start_cover,false}]),
timer:sleep(300),
- [] = cover:which_nodes(),
+ cover_which_nodes([]),
Beam = rpc:call(N1,code,which,[f]),
false = (Beam==cover_compiled),
@@ -759,7 +811,6 @@ eif(Config) when is_list(Config) ->
%% in cover_inc.beam - not the ones from the included file.
?line cover_inc:func(),
?line {ok, [_, _]} = cover:analyse(cover_inc, line),
- ?line cover:stop(),
ok.
otp_5305(suite) -> [];
@@ -775,7 +826,6 @@ otp_5305(Config) when is_list(Config) ->
">>,
?line ok = file:write_file(File, Test),
?line {ok, t} = cover:compile(File),
- ?line cover:stop(),
?line ok = file:delete(File),
ok.
@@ -790,7 +840,6 @@ otp_5418(Config) when is_list(Config) ->
?line ok = file:write_file(File, Test),
?line {ok, t} = cover:compile(File),
?line {ok,{t,{0,0}}} = cover:analyse(t, module),
- ?line cover:stop(),
?line ok = file:delete(File),
ok.
@@ -952,7 +1001,6 @@ otp_7095(Config) when is_list(Config) ->
{{t,67},1},{{t,69},1},{{t,71},1},{{t,74},1},
{{t,76},0},{{t,78},1},
{{t,82},2}]} = cover:analyse(t, calls, line),
- ?line cover:stop(),
?line ok = file:delete(File),
ok.
@@ -1028,7 +1076,6 @@ otp_8273(Config) when is_list(Config) ->
">>,
?line File = cc_mod(t, Test, Config),
?line ok = t:t(),
- ?line cover:stop(),
?line ok = file:delete(File),
ok.
@@ -1066,7 +1113,6 @@ otp_8188(Config) when is_list(Config) ->
?line File = cc_mod(t, Test, Config),
?line false = t:test(nok),
?line {ok,[{{t,11},1},{{t,12},1}]} = cover:analyse(t, calls, line),
- ?line cover:stop(),
?line ok = file:delete(File),
%% Bit string comprehensions are now traversed;
@@ -1433,6 +1479,8 @@ compile_beam_opts(Config) when is_list(Config) ->
export_all,
debug_info,
return_errors]),
+ code:purge(t),
+ code:delete(t),
Exports =
[{func1,0},
{macro, 0},
@@ -1443,7 +1491,6 @@ compile_beam_opts(Config) when is_list(Config) ->
Exports = t:module_info(exports),
{ok, t} = cover:compile_beam("t"),
Exports = t:module_info(exports),
- cover:stop(),
ok = file:delete("t.beam"),
ok = file:set_cwd(Cwd),
ok.
@@ -1526,3 +1573,21 @@ is_unloaded(What) ->
check_f_calls(F1,F2) ->
{ok,[{{f,f1,0},F1},{{f,f2,0},F2}|_]} = cover:analyse(f,calls,function).
+
+cover_which_nodes(Expected) ->
+ case cover:which_nodes() of
+ Expected ->
+ ok;
+ Other ->
+ {Time,ok} = timer:tc(fun Retry() ->
+ case cover:which_nodes() of
+ Expected -> ok;
+ _ ->
+ ?t:sleep(100),
+ Retry()
+ end
+ end),
+ io:format("~p ms before cover:which_nodes() returned ~p",
+ [Time,Expected]),
+ Expected = Other
+ end.
diff --git a/lib/tools/test/cover_SUITE_data/f.erl b/lib/tools/test/cover_SUITE_data/f.erl
index ce2963014a..a29a67b388 100644
--- a/lib/tools/test/cover_SUITE_data/f.erl
+++ b/lib/tools/test/cover_SUITE_data/f.erl
@@ -10,10 +10,15 @@ f2() ->
f2_line2.
call_f2_when_isolated() ->
+ [Other] = nodes(),
+ net_kernel:disconnect(Other),
+ do_call_f2_when_isolated().
+
+do_call_f2_when_isolated() ->
case nodes() of
[] ->
f2();
_ ->
timer:sleep(100),
- call_f2_when_isolated()
+ do_call_f2_when_isolated()
end.
diff --git a/lib/tools/test/eprof_SUITE.erl b/lib/tools/test/eprof_SUITE.erl
index 26685a6a84..04b522de4a 100644
--- a/lib/tools/test/eprof_SUITE.erl
+++ b/lib/tools/test/eprof_SUITE.erl
@@ -104,7 +104,7 @@ basic(Config) when is_list(Config) ->
profiling = eprof:profile([A]),
true = exit(A, kill_it),
profiling_stopped = eprof:stop_profiling(),
- {error,_} = eprof:profile(fun() -> a = b end),
+ {error,_} = eprof:profile(fun() -> a = id(b) end),
%% with mfa
@@ -127,6 +127,14 @@ basic(Config) when is_list(Config) ->
ok.
basic_option(Config) when is_list(Config) ->
+ %% Eprof is not supported on native-compile code.
+ case lists:module_info(native_addresses) of
+ [] -> basic_option_1(Config);
+ [_|_] -> {skip,"lists is native-compiled"}
+ end.
+
+basic_option_1(Config) ->
+
%% load eprof_test and change directory
{ok, OldCurDir} = file:get_cwd(),
@@ -141,8 +149,7 @@ basic_option(Config) when is_list(Config) ->
% vanilla
{ok, _} = eprof:profile(fun() -> eprof_test:do(10) end, [{set_on_spawn, true}]),
- [{_, MfasDo1},{_, MfasLists1}] = eprof:dump(),
- Mfas1 = MfasDo1 ++ MfasLists1,
+ Mfas1 = lists:foldl(fun({_,Mfas},Out) -> Mfas ++ Out end, [], eprof:dump()),
{value, {_, {11, _}}} = lists:keysearch({eprof_test,dec,1}, 1, Mfas1),
{value, {_, { 1, _}}} = lists:keysearch({eprof_test, go,1}, 1, Mfas1),
@@ -151,8 +158,7 @@ basic_option(Config) when is_list(Config) ->
{ok, _} = eprof:profile(fun() -> eprof_test:do(10) end, [set_on_spawn]),
- [{_, MfasDo2},{_, MfasLists2}] = eprof:dump(),
- Mfas2 = MfasDo2 ++ MfasLists2,
+ Mfas2 = lists:foldl(fun({_,Mfas},Out) -> Mfas ++ Out end, [], eprof:dump()),
{value, {_, {11, _}}} = lists:keysearch({eprof_test,dec,1}, 1, Mfas2),
{value, {_, { 1, _}}} = lists:keysearch({eprof_test, go,1}, 1, Mfas2),
{value, {_, { 9, _}}} = lists:keysearch({lists, split_2,5}, 1, Mfas2),
@@ -247,3 +253,5 @@ ensure_eprof_stopped() ->
Pid ->
stopped=eprof:stop()
end.
+
+id(I) -> I.
diff --git a/lib/tools/test/tools_SUITE.erl b/lib/tools/test/tools_SUITE.erl
index ea3f59dbe1..e3582b995b 100644
--- a/lib/tools/test/tools_SUITE.erl
+++ b/lib/tools/test/tools_SUITE.erl
@@ -30,12 +30,12 @@
-export([init_per_testcase/2, end_per_testcase/2]).
%% Test cases must be exported.
--export([app_test/1]).
+-export([app_test/1, appup_test/1]).
suite() -> [{ct_hooks,[ts_install_cth]}].
all() ->
- [app_test].
+ [app_test, appup_test].
groups() ->
[].
@@ -71,3 +71,7 @@ app_test(suite) ->
[];
app_test(Config) when is_list(Config) ->
?line ?t:app_test(tools, tolerant).
+
+%% Test that the .appup file does not contain any `basic' errors
+appup_test(Config) when is_list(Config) ->
+ ok = ?t:appup_test(tools).
diff --git a/lib/tools/test/xref_SUITE.erl b/lib/tools/test/xref_SUITE.erl
index 353275ae3b..6870aefe5c 100644
--- a/lib/tools/test/xref_SUITE.erl
+++ b/lib/tools/test/xref_SUITE.erl
@@ -1098,7 +1098,6 @@ read_expected(Version) ->
{POS1+1,{FF,{mod17,fun17,0}}},
{POS1+2,{FF,{erlang,spawn,1}}},
{POS1+2,{FF,{read,local,0}}},
- {POS1+3,{FF,{erlang,binary_to_term,1}}},
{POS1+3,{FF,{erlang,spawn,1}}},
{POS1+4,{FF,{dist,func,0}}},
{POS1+4,{FF,{erlang,spawn,1}}},
@@ -1207,6 +1206,7 @@ read_expected(Version) ->
OKB1 = [{POS13+1,{FF,{erts_debug,apply,4}}},
{POS13+2,{FF,{erts_debug,apply,4}}},
{POS13+3,{FF,{erts_debug,apply,4}}},
+ {POS1+3, {FF,{erlang,binary_to_term,1}}},
{POS3+1, {FF,{erlang,spawn,3}}},
{POS3+2, {FF,{erlang,spawn,3}}},
{POS3+3, {FF,{erlang,spawn_link,3}}},
diff --git a/lib/tools/vsn.mk b/lib/tools/vsn.mk
index 0cead00554..2d2970de3a 100644
--- a/lib/tools/vsn.mk
+++ b/lib/tools/vsn.mk
@@ -1 +1 @@
-TOOLS_VSN = 2.6.13
+TOOLS_VSN = 2.6.14
diff --git a/lib/typer/Makefile b/lib/typer/Makefile
index 40a82e9bba..d4396abc9d 100644
--- a/lib/typer/Makefile
+++ b/lib/typer/Makefile
@@ -29,7 +29,7 @@ include $(ERL_TOP)/make/$(TARGET)/otp.mk
# Macros
#
-SUB_DIRECTORIES = src
+SUB_DIRECTORIES = src doc/src
include vsn.mk
VSN = $(TYPER_VSN)
diff --git a/lib/typer/doc/Makefile b/lib/typer/doc/Makefile
new file mode 100644
index 0000000000..4ea0137202
--- /dev/null
+++ b/lib/typer/doc/Makefile
@@ -0,0 +1,39 @@
+#
+# %CopyrightBegin%
+#
+# Copyright Ericsson AB 2006-2012. 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%
+#
+SHELL=/bin/sh
+
+include $(ERL_TOP)/make/target.mk
+include $(ERL_TOP)/make/$(TARGET)/otp.mk
+
+clean:
+ -rm -f *.html edoc-info stylesheet.css erlang.png
+
+distclean: clean
+realclean: clean
+
+# ----------------------------------------------------
+# Special Build Targets
+# ----------------------------------------------------
+
+
+
+# ----------------------------------------------------
+# Release Target
+# ----------------------------------------------------
+include $(ERL_TOP)/make/otp_release_targets.mk
diff --git a/lib/typer/doc/html/.gitignore b/lib/typer/doc/html/.gitignore
new file mode 100644
index 0000000000..e69de29bb2
--- /dev/null
+++ b/lib/typer/doc/html/.gitignore
diff --git a/lib/typer/doc/pdf/.gitignore b/lib/typer/doc/pdf/.gitignore
new file mode 100644
index 0000000000..e69de29bb2
--- /dev/null
+++ b/lib/typer/doc/pdf/.gitignore
diff --git a/lib/typer/doc/src/Makefile b/lib/typer/doc/src/Makefile
new file mode 100644
index 0000000000..2683c08679
--- /dev/null
+++ b/lib/typer/doc/src/Makefile
@@ -0,0 +1,117 @@
+#
+# %CopyrightBegin%
+#
+# Copyright Ericsson AB 2006-2012. 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%
+#
+include $(ERL_TOP)/make/target.mk
+include $(ERL_TOP)/make/$(TARGET)/otp.mk
+
+# ----------------------------------------------------
+# Application version
+# ----------------------------------------------------
+include ../../vsn.mk
+VSN=$(TYPER_VSN)
+APPLICATION=typer
+
+# ----------------------------------------------------
+# Release directory specification
+# ----------------------------------------------------
+RELSYSDIR = $(RELEASE_PATH)/lib/$(APPLICATION)-$(VSN)
+
+# ----------------------------------------------------
+# Target Specs
+# ----------------------------------------------------
+XML_APPLICATION_FILES = ref_man.xml
+XML_REF3_FILES =
+
+XML_PART_FILES = part_notes.xml
+XML_CHAPTER_FILES = notes.xml
+
+BOOK_FILES = book.xml
+
+XML_FILES = \
+ $(BOOK_FILES) $(XML_CHAPTER_FILES) \
+ $(XML_PART_FILES) $(XML_REF3_FILES) $(XML_APPLICATION_FILES)
+
+GIF_FILES =
+
+# ----------------------------------------------------
+
+HTML_FILES = $(XML_APPLICATION_FILES:%.xml=$(HTMLDIR)/%.html) \
+ $(XML_PART_FILES:%.xml=$(HTMLDIR)/%.html)
+
+INFO_FILE = ../../info
+EXTRA_FILES = \
+ $(DEFAULT_GIF_FILES) \
+ $(DEFAULT_HTML_FILES) \
+ $(XML_REF3_FILES:%.xml=$(HTMLDIR)/%.html) \
+ $(XML_CHAPTER_FILES:%.xml=$(HTMLDIR)/%.html)
+
+MAN3_FILES = $(XML_REF3_FILES:%.xml=$(MAN3DIR)/%.3)
+
+HTML_REF_MAN_FILE = $(HTMLDIR)/index.html
+
+TOP_PDF_FILE = $(PDFDIR)/$(APPLICATION)-$(VSN).pdf
+
+# ----------------------------------------------------
+# FLAGS
+# ----------------------------------------------------
+XML_FLAGS +=
+
+# ----------------------------------------------------
+# Targets
+# ----------------------------------------------------
+$(HTMLDIR)/%.gif: %.gif
+ $(INSTALL_DATA) $< $@
+
+docs: pdf html man
+
+$(TOP_PDF_FILE): $(XML_FILES)
+
+pdf: $(TOP_PDF_FILE)
+
+html: gifs $(HTML_REF_MAN_FILE)
+
+man: $(MAN3_FILES)
+
+gifs: $(GIF_FILES:%=$(HTMLDIR)/%)
+
+debug opt:
+
+clean clean_docs:
+ rm -rf $(HTMLDIR)/*
+ rm -f $(MAN3DIR)/*
+ rm -f $(TOP_PDF_FILE) $(TOP_PDF_FILE:%.pdf=%.fo)
+ rm -f errs core *~
+
+distclean: clean
+realclean: clean
+
+# ----------------------------------------------------
+# Release Target
+# ----------------------------------------------------
+include $(ERL_TOP)/make/otp_release_targets.mk
+
+release_docs_spec: docs
+ $(INSTALL_DIR) "$(RELSYSDIR)/doc/pdf"
+ $(INSTALL_DATA) $(TOP_PDF_FILE) "$(RELSYSDIR)/doc/pdf"
+ $(INSTALL_DIR) "$(RELSYSDIR)/doc/html"
+ $(INSTALL_DATA) $(HTMLDIR)/* \
+ "$(RELSYSDIR)/doc/html"
+ $(INSTALL_DATA) $(INFO_FILE) "$(RELSYSDIR)"
+
+
+release_spec:
diff --git a/lib/typer/doc/src/book.xml b/lib/typer/doc/src/book.xml
new file mode 100644
index 0000000000..5cc85a3022
--- /dev/null
+++ b/lib/typer/doc/src/book.xml
@@ -0,0 +1,41 @@
+<?xml version="1.0" encoding="utf-8" ?>
+<!DOCTYPE book SYSTEM "book.dtd">
+
+<book xmlns:xi="http://www.w3.org/2001/XInclude">
+ <header titlestyle="normal">
+ <copyright>
+ <year>2006</year><year>2013</year>
+ <holder>Ericsson AB. All Rights Reserved.</holder>
+ </copyright>
+ <legalnotice>
+ 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.
+
+ </legalnotice>
+
+ <title>TypEr</title>
+ <prepared></prepared>
+ <docno></docno>
+ <date></date>
+ <rev></rev>
+ </header>
+ <pagetext></pagetext>
+ <preamble>
+ </preamble>
+ <pagetext>TypEr</pagetext>
+ <applications>
+ <xi:include href="ref_man.xml"/>
+ </applications>
+ <releasenotes>
+ <xi:include href="notes.xml"/>
+ </releasenotes>
+</book>
+
diff --git a/lib/typer/doc/src/fascicules.xml b/lib/typer/doc/src/fascicules.xml
new file mode 100644
index 0000000000..b15610fa8b
--- /dev/null
+++ b/lib/typer/doc/src/fascicules.xml
@@ -0,0 +1,12 @@
+<?xml version="1.0" encoding="utf-8" ?>
+<!DOCTYPE fascicules SYSTEM "fascicules.dtd">
+
+<fascicules>
+ <fascicule file="part_notes" href="part_notes_frame.html" entry="yes">
+ Release Notes
+ </fascicule>
+ <fascicule file="" href="../../../../doc/print.html" entry="no">
+ Off-Print
+ </fascicule>
+</fascicules>
+
diff --git a/lib/typer/doc/src/notes.xml b/lib/typer/doc/src/notes.xml
new file mode 100644
index 0000000000..53d554820d
--- /dev/null
+++ b/lib/typer/doc/src/notes.xml
@@ -0,0 +1,51 @@
+<?xml version="1.0" encoding="utf-8" ?>
+<!DOCTYPE chapter SYSTEM "chapter.dtd">
+
+<chapter>
+ <header>
+ <copyright>
+ <year>2014</year>
+ <holder>Ericsson AB. All Rights Reserved.</holder>
+ </copyright>
+ <legalnotice>
+ 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.
+
+ </legalnotice>
+
+ <title>TypEr Release Notes</title>
+ <prepared>otp_appnotes</prepared>
+ <docno>nil</docno>
+ <date>nil</date>
+ <rev>nil</rev>
+ <file>notes.xml</file>
+ </header>
+ <p>This document describes the changes made to TypEr.</p>
+
+<section><title>TypEr 0.9.7</title>
+
+ <section><title>Fixed Bugs and Malfunctions</title>
+ <list>
+ <item>
+ <p>
+ Added initial documentation framework for TypEr.</p>
+ <p>
+ Own Id: OTP-11860</p>
+ </item>
+ </list>
+ </section>
+
+</section>
+
+
+
+</chapter>
+
diff --git a/lib/typer/doc/src/part_notes.xml b/lib/typer/doc/src/part_notes.xml
new file mode 100644
index 0000000000..b4ccd3ed77
--- /dev/null
+++ b/lib/typer/doc/src/part_notes.xml
@@ -0,0 +1,35 @@
+<?xml version="1.0" encoding="utf-8" ?>
+<!DOCTYPE part SYSTEM "part.dtd">
+
+<part xmlns:xi="http://www.w3.org/2001/XInclude">
+ <header>
+ <copyright>
+ <year>2006</year><year>2013</year>
+ <holder>Ericsson AB. All Rights Reserved.</holder>
+ </copyright>
+ <legalnotice>
+ 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.
+
+ </legalnotice>
+
+ <title>TypEr Release Notes</title>
+ <prepared></prepared>
+ <docno></docno>
+ <date></date>
+ <rev></rev>
+ </header>
+ <description>
+ <p><em>TypEr</em></p>
+ </description>
+ <xi:include href="notes.xml"/>
+</part>
+
diff --git a/lib/typer/doc/src/ref_man.xml b/lib/typer/doc/src/ref_man.xml
new file mode 100644
index 0000000000..b54a5f5947
--- /dev/null
+++ b/lib/typer/doc/src/ref_man.xml
@@ -0,0 +1,35 @@
+<?xml version="1.0" encoding="utf-8" ?>
+<!DOCTYPE application SYSTEM "application.dtd">
+
+<application xmlns:xi="http://www.w3.org/2001/XInclude">
+ <header>
+ <copyright>
+ <year>2014</year>
+ <holder>Ericsson AB. All Rights Reserved.</holder>
+ </copyright>
+ <legalnotice>
+ 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.
+
+ </legalnotice>
+
+ <title>TypEr</title>
+ <prepared></prepared>
+ <docno></docno>
+ <date></date>
+ <rev></rev>
+ <file>ref_man.xml</file>
+ </header>
+ <description>
+ </description>
+ <xi:include href="typer_app.xml"/>
+</application>
+
diff --git a/lib/typer/doc/src/typer_app.xml b/lib/typer/doc/src/typer_app.xml
new file mode 100644
index 0000000000..469a9be108
--- /dev/null
+++ b/lib/typer/doc/src/typer_app.xml
@@ -0,0 +1,43 @@
+<?xml version="1.0" encoding="utf-8" ?>
+<!DOCTYPE appref SYSTEM "appref.dtd">
+
+<appref>
+ <header>
+ <copyright>
+ <year>2014</year>
+ <holder>Ericsson AB. All Rights Reserved.</holder>
+ </copyright>
+ <legalnotice>
+ 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.
+
+ </legalnotice>
+
+ <title>TypEr</title>
+ <prepared></prepared>
+ <responsible></responsible>
+ <docno></docno>
+ <approved></approved>
+ <checked></checked>
+ <date></date>
+ <rev></rev>
+ <file>typer.xml</file>
+ </header>
+ <app>TypEr</app>
+ <appsummary>The TypEr Application</appsummary>
+ <description>
+ <p>An Erlang/OTP application that shows type information
+ for Erlang modules to the user. Additionally, it can
+ annotate the code of files with such type information.</p>
+ </description>
+
+</appref>
+
diff --git a/lib/typer/info b/lib/typer/info
new file mode 100644
index 0000000000..5145fbcfff
--- /dev/null
+++ b/lib/typer/info
@@ -0,0 +1,2 @@
+group: tools
+short: TypEr
diff --git a/lib/typer/src/Makefile b/lib/typer/src/Makefile
index 13af466755..a7059de971 100644
--- a/lib/typer/src/Makefile
+++ b/lib/typer/src/Makefile
@@ -63,7 +63,7 @@ APPUP_TARGET= $(EBIN)/$(APPUP_FILE)
# ----------------------------------------------------
# FLAGS
# ----------------------------------------------------
-ERL_COMPILE_FLAGS += +warn_exported_vars +warn_untyped_record +warn_missing_spec
+ERL_COMPILE_FLAGS += +warn_export_vars +warn_untyped_record +warn_missing_spec
# ----------------------------------------------------
# Targets
diff --git a/lib/typer/src/typer.app.src b/lib/typer/src/typer.app.src
index 850829e1dc..974091b44c 100644
--- a/lib/typer/src/typer.app.src
+++ b/lib/typer/src/typer.app.src
@@ -6,4 +6,6 @@
{modules, [typer]},
{registered, []},
{applications, [compiler, dialyzer, hipe, kernel, stdlib]},
- {env, []}]}.
+ {env, []},
+ {runtime_dependencies, ["stdlib-2.0","kernel-3.0","hipe-3.10.3","erts-6.0",
+ "dialyzer-2.7","compiler-5.0"]}]}.
diff --git a/lib/typer/src/typer.appup.src b/lib/typer/src/typer.appup.src
index 54a63833e6..bebe7a159c 100644
--- a/lib/typer/src/typer.appup.src
+++ b/lib/typer/src/typer.appup.src
@@ -1 +1,21 @@
-{"%VSN%",[],[]}.
+%% -*- erlang -*-
+%% %CopyrightBegin%
+%%
+%% Copyright Ericsson AB 2014. 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%
+{"%VSN%",
+ [{<<".*">>,[{restart_application, typer}]}],
+ [{<<".*">>,[{restart_application, typer}]}]
+}.
diff --git a/lib/typer/src/typer.erl b/lib/typer/src/typer.erl
index 0ace1d5fb8..572bf24ca4 100644
--- a/lib/typer/src/typer.erl
+++ b/lib/typer/src/typer.erl
@@ -2,7 +2,7 @@
%%-----------------------------------------------------------------------
%% %CopyrightBegin%
%%
-%% Copyright Ericsson AB 2006-2012. All Rights Reserved.
+%% Copyright Ericsson AB 2006-2014. 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
@@ -63,10 +63,10 @@
%% Files in 'fms' are compilable with option 'to_pp'; we keep them
%% as {FileName, ModuleName} in case the ModuleName is different
fms = [] :: [{file:filename(), module()}],
- ex_func = map__new() :: map(),
- record = map__new() :: map(),
- func = map__new() :: map(),
- inc_func = map__new() :: map(),
+ ex_func = map__new() :: map_dict(),
+ record = map__new() :: map_dict(),
+ func = map__new() :: map_dict(),
+ inc_func = map__new() :: map_dict(),
trust_plt = dialyzer_plt:new() :: plt()}).
-type analysis() :: #analysis{}.
@@ -220,11 +220,11 @@ get_external(Exts, Plt) ->
-type fa() :: {atom(), arity()}.
-type func_info() :: {line(), atom(), arity()}.
--record(info, {records = map__new() :: map(),
+-record(info, {records = map__new() :: map_dict(),
functions = [] :: [func_info()],
- types = map__new() :: map(),
+ types = map__new() :: map_dict(),
edoc = false :: boolean()}).
--record(inc, {map = map__new() :: map(), filter = [] :: files()}).
+-record(inc, {map = map__new() :: map_dict(), filter = [] :: files()}).
-type inc() :: #inc{}.
-spec show_or_annotate(analysis()) -> 'ok'.
@@ -1094,29 +1094,29 @@ rcv_ext_types(Self, ExtTypes) ->
%% specialized for the uses in this module
%%--------------------------------------------------------------------
--type map() :: dict().
+-type map_dict() :: dict:dict().
--spec map__new() -> map().
+-spec map__new() -> map_dict().
map__new() ->
dict:new().
--spec map__insert({term(), term()}, map()) -> map().
+-spec map__insert({term(), term()}, map_dict()) -> map_dict().
map__insert(Object, Map) ->
{Key, Value} = Object,
dict:store(Key, Value, Map).
--spec map__lookup(term(), map()) -> term().
+-spec map__lookup(term(), map_dict()) -> term().
map__lookup(Key, Map) ->
try dict:fetch(Key, Map) catch error:_ -> none end.
--spec map__from_list([{fa(), term()}]) -> map().
+-spec map__from_list([{fa(), term()}]) -> map_dict().
map__from_list(List) ->
dict:from_list(List).
--spec map__remove(term(), map()) -> map().
+-spec map__remove(term(), map_dict()) -> map_dict().
map__remove(Key, Dict) ->
dict:erase(Key, Dict).
--spec map__fold(fun((term(), term(), term()) -> map()), map(), map()) -> map().
+-spec map__fold(fun((term(), term(), term()) -> map_dict()), map_dict(), map_dict()) -> map_dict().
map__fold(Fun, Acc0, Dict) ->
dict:fold(Fun, Acc0, Dict).
diff --git a/lib/typer/test/Makefile b/lib/typer/test/Makefile
new file mode 100644
index 0000000000..d6dd22b6cf
--- /dev/null
+++ b/lib/typer/test/Makefile
@@ -0,0 +1,65 @@
+include $(ERL_TOP)/make/target.mk
+include $(ERL_TOP)/make/$(TARGET)/otp.mk
+
+# ----------------------------------------------------
+# Target Specs
+# ----------------------------------------------------
+
+MODULES= \
+ typer_SUITE
+
+ERL_FILES= $(MODULES:%=%.erl)
+
+TARGET_FILES= $(MODULES:%=$(EBIN)/%.$(EMULATOR))
+INSTALL_PROGS= $(TARGET_FILES)
+
+EMAKEFILE=Emakefile
+
+# ----------------------------------------------------
+# Release directory specification
+# ----------------------------------------------------
+RELSYSDIR = $(RELEASE_PATH)/typer_test
+
+# ----------------------------------------------------
+# FLAGS
+# ----------------------------------------------------
+
+ERL_MAKE_FLAGS +=
+ERL_COMPILE_FLAGS += -I$(ERL_TOP)/lib/test_server/include
+
+EBIN = .
+
+# ----------------------------------------------------
+# Targets
+# ----------------------------------------------------
+
+make_emakefile:
+ $(ERL_TOP)/make/make_emakefile $(ERL_COMPILE_FLAGS) -o$(EBIN) $(MODULES) \
+ > $(EMAKEFILE)
+ $(ERL_TOP)/make/make_emakefile $(ERL_COMPILE_FLAGS) -o$(EBIN) '*_SUITE_make' \
+ >> $(EMAKEFILE)
+
+tests debug opt: make_emakefile
+ erl $(ERL_MAKE_FLAGS) -make
+
+clean:
+ rm -f $(EMAKEFILE)
+ rm -f $(TARGET_FILES) $(GEN_FILES)
+ rm -f core
+
+docs:
+
+# ----------------------------------------------------
+# Release Target
+# ----------------------------------------------------
+include $(ERL_TOP)/make/otp_release_targets.mk
+
+release_spec: opt
+
+release_tests_spec: make_emakefile
+ $(INSTALL_DIR) "$(RELSYSDIR)"
+ $(INSTALL_DATA) $(EMAKEFILE) $(ERL_FILES) "$(RELSYSDIR)"
+ $(INSTALL_DATA) typer.spec "$(RELSYSDIR)"
+ chmod -R u+w "$(RELSYSDIR)"
+
+release_docs_spec:
diff --git a/lib/typer/test/typer.spec b/lib/typer/test/typer.spec
new file mode 100644
index 0000000000..79f51b6781
--- /dev/null
+++ b/lib/typer/test/typer.spec
@@ -0,0 +1 @@
+{suites,"../typer_test",all}.
diff --git a/lib/typer/test/typer_SUITE.erl b/lib/typer/test/typer_SUITE.erl
new file mode 100644
index 0000000000..99c4facbad
--- /dev/null
+++ b/lib/typer/test/typer_SUITE.erl
@@ -0,0 +1,56 @@
+%% ``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 via the world wide web 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.
+%%
+%% The Initial Developer of the Original Code is Ericsson Utvecklings AB.
+%% Portions created by Ericsson are Copyright 1999, Ericsson Utvecklings
+%% AB. All Rights Reserved.''
+%%
+-module(typer_SUITE).
+
+-compile([export_all]).
+-include_lib("common_test/include/ct.hrl").
+
+suite() ->
+ [{ct_hooks, [ts_install_cth]}].
+
+all() ->
+ case application:ensure_all_started(typer) of
+ {ok, Apps} ->
+ [application:stop(App) || App <- lists:reverse(Apps)],
+ [app, appup];
+ _ ->
+ [appup]
+ end.
+
+groups() ->
+ [].
+
+init_per_suite(Config) ->
+ Config.
+
+end_per_suite(_Config) ->
+ ok.
+
+init_per_group(_GroupName, Config) ->
+ Config.
+
+end_per_group(_GroupName, Config) ->
+ Config.
+
+app() ->
+ [{doc, "Test that the typer app file is ok"}].
+app(Config) when is_list(Config) ->
+ ok = ?t:app_test(typer).
+
+appup() ->
+ [{doc, "Test that the typer appup file is ok"}].
+appup(Config) when is_list(Config) ->
+ ok = ?t:appup_test(typer).
diff --git a/lib/typer/vsn.mk b/lib/typer/vsn.mk
index 5ac145d9ff..9cc044c621 100644
--- a/lib/typer/vsn.mk
+++ b/lib/typer/vsn.mk
@@ -1 +1 @@
-TYPER_VSN = 0.9.5
+TYPER_VSN = 0.9.7
diff --git a/lib/webtool/doc/src/notes.xml b/lib/webtool/doc/src/notes.xml
index 74e5fd88c1..e571668c91 100644
--- a/lib/webtool/doc/src/notes.xml
+++ b/lib/webtool/doc/src/notes.xml
@@ -31,6 +31,35 @@
<p>This document describes the changes made to the Webtool
application.</p>
+<section><title>WebTool 0.8.10</title>
+
+ <section><title>Fixed Bugs and Malfunctions</title>
+ <list>
+ <item>
+ <p>
+ Application upgrade (appup) files are corrected for the
+ following applications: </p>
+ <p>
+ <c>asn1, common_test, compiler, crypto, debugger,
+ dialyzer, edoc, eldap, erl_docgen, et, eunit, gs, hipe,
+ inets, observer, odbc, os_mon, otp_mibs, parsetools,
+ percept, public_key, reltool, runtime_tools, ssh,
+ syntax_tools, test_server, tools, typer, webtool, wx,
+ xmerl</c></p>
+ <p>
+ A new test utility for testing appup files is added to
+ test_server. This is now used by most applications in
+ OTP.</p>
+ <p>
+ (Thanks to Tobias Schlager)</p>
+ <p>
+ Own Id: OTP-11744</p>
+ </item>
+ </list>
+ </section>
+
+</section>
+
<section><title>WebTool 0.8.9.2</title>
<section><title>Improvements and New Features</title>
diff --git a/lib/webtool/src/Makefile b/lib/webtool/src/Makefile
index f28c777240..af565c8895 100644
--- a/lib/webtool/src/Makefile
+++ b/lib/webtool/src/Makefile
@@ -66,7 +66,7 @@ ERL_COMPILE_FLAGS += +warn_obsolete_guard
debug opt: $(TARGET_FILES) $(APP_TARGET) $(APPUP_TARGET)
clean:
- rm -f $(TARGET_FILES) $(APP_TARGET) $(APP_TARGET)
+ rm -f $(TARGET_FILES) $(APP_TARGET) $(APPUP_TARGET)
rm -f core
docs:
diff --git a/lib/webtool/src/webtool.app.src b/lib/webtool/src/webtool.app.src
index 8c6774c533..3d8d11ea60 100644
--- a/lib/webtool/src/webtool.app.src
+++ b/lib/webtool/src/webtool.app.src
@@ -21,5 +21,7 @@
{vsn,"%VSN%"},
{modules,[webtool,webtool_sup]},
{registered,[web_tool,websup]},
- {applications,[kernel,stdlib]}]}.
+ {applications,[kernel,stdlib]},
+ {runtime_dependencies, ["stdlib-2.0","observer-2.0","kernel-3.0",
+ "inets-5.10","erts-6.0"]}]}.
diff --git a/lib/webtool/src/webtool.appup.src b/lib/webtool/src/webtool.appup.src
index 7a435e9b22..9e6f4b9b5b 100644
--- a/lib/webtool/src/webtool.appup.src
+++ b/lib/webtool/src/webtool.appup.src
@@ -1,7 +1,7 @@
-%%
+%% -*- erlang -*-
%% %CopyrightBegin%
%%
-%% Copyright Ericsson AB 2001-2009. All Rights Reserved.
+%% Copyright Ericsson AB 2001-2014. 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
@@ -15,5 +15,7 @@
%% under the License.
%%
%% %CopyrightEnd%
-%%
-{"%VSN%",[],[]}.
+{"%VSN%",
+ [{<<".*">>,[{restart_application, webtool}]}],
+ [{<<".*">>,[{restart_application, webtool}]}]
+}.
diff --git a/lib/webtool/test/Makefile b/lib/webtool/test/Makefile
new file mode 100644
index 0000000000..93aa1c09eb
--- /dev/null
+++ b/lib/webtool/test/Makefile
@@ -0,0 +1,65 @@
+include $(ERL_TOP)/make/target.mk
+include $(ERL_TOP)/make/$(TARGET)/otp.mk
+
+# ----------------------------------------------------
+# Target Specs
+# ----------------------------------------------------
+
+MODULES= \
+ webtool_SUITE
+
+ERL_FILES= $(MODULES:%=%.erl)
+
+TARGET_FILES= $(MODULES:%=$(EBIN)/%.$(EMULATOR))
+INSTALL_PROGS= $(TARGET_FILES)
+
+EMAKEFILE=Emakefile
+
+# ----------------------------------------------------
+# Release directory specification
+# ----------------------------------------------------
+RELSYSDIR = $(RELEASE_PATH)/webtool_test
+
+# ----------------------------------------------------
+# FLAGS
+# ----------------------------------------------------
+
+ERL_MAKE_FLAGS +=
+ERL_COMPILE_FLAGS += -I$(ERL_TOP)/lib/test_server/include
+
+EBIN = .
+
+# ----------------------------------------------------
+# Targets
+# ----------------------------------------------------
+
+make_emakefile:
+ $(ERL_TOP)/make/make_emakefile $(ERL_COMPILE_FLAGS) -o$(EBIN) $(MODULES) \
+ > $(EMAKEFILE)
+ $(ERL_TOP)/make/make_emakefile $(ERL_COMPILE_FLAGS) -o$(EBIN) '*_SUITE_make' \
+ >> $(EMAKEFILE)
+
+tests debug opt: make_emakefile
+ erl $(ERL_MAKE_FLAGS) -make
+
+clean:
+ rm -f $(EMAKEFILE)
+ rm -f $(TARGET_FILES) $(GEN_FILES)
+ rm -f core
+
+docs:
+
+# ----------------------------------------------------
+# Release Target
+# ----------------------------------------------------
+include $(ERL_TOP)/make/otp_release_targets.mk
+
+release_spec: opt
+
+release_tests_spec: make_emakefile
+ $(INSTALL_DIR) "$(RELSYSDIR)"
+ $(INSTALL_DATA) $(EMAKEFILE) $(ERL_FILES) "$(RELSYSDIR)"
+ $(INSTALL_DATA) webtool.spec "$(RELSYSDIR)"
+ chmod -R u+w "$(RELSYSDIR)"
+
+release_docs_spec:
diff --git a/lib/webtool/test/webtool.spec b/lib/webtool/test/webtool.spec
new file mode 100644
index 0000000000..134e6ed40c
--- /dev/null
+++ b/lib/webtool/test/webtool.spec
@@ -0,0 +1 @@
+{suites,"../webtool_test",all}.
diff --git a/lib/webtool/test/webtool_SUITE.erl b/lib/webtool/test/webtool_SUITE.erl
new file mode 100644
index 0000000000..64ff221a1b
--- /dev/null
+++ b/lib/webtool/test/webtool_SUITE.erl
@@ -0,0 +1,50 @@
+%% ``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 via the world wide web 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.
+%%
+%% The Initial Developer of the Original Code is Ericsson Utvecklings AB.
+%% Portions created by Ericsson are Copyright 1999, Ericsson Utvecklings
+%% AB. All Rights Reserved.''
+%%
+-module(webtool_SUITE).
+
+-compile([export_all]).
+-include_lib("common_test/include/ct.hrl").
+
+suite() ->
+ [{ct_hooks, [ts_install_cth]}].
+
+all() ->
+ [app, appup].
+
+groups() ->
+ [].
+
+init_per_suite(Config) ->
+ Config.
+
+end_per_suite(_Config) ->
+ ok.
+
+init_per_group(_GroupName, Config) ->
+ Config.
+
+end_per_group(_GroupName, Config) ->
+ Config.
+
+app() ->
+ [{doc, "Test that the webtool app file is ok"}].
+app(Config) when is_list(Config) ->
+ ok = ?t:app_test(webtool).
+
+appup() ->
+ [{doc, "Test that the webtool appup file is ok"}].
+appup(Config) when is_list(Config) ->
+ ok = ?t:appup_test(webtool).
diff --git a/lib/webtool/vsn.mk b/lib/webtool/vsn.mk
index d356a8954d..a79c273d9f 100644
--- a/lib/webtool/vsn.mk
+++ b/lib/webtool/vsn.mk
@@ -1 +1 @@
-WEBTOOL_VSN=0.8.9.2
+WEBTOOL_VSN=0.8.10
diff --git a/lib/wx/aclocal.m4 b/lib/wx/aclocal.m4
index 46b30a16b3..ed492d55ff 100644
--- a/lib/wx/aclocal.m4
+++ b/lib/wx/aclocal.m4
@@ -74,6 +74,21 @@ AC_ARG_VAR(erl_xcomp_clock_gettime_cpu_time, [clock_gettime() can be used for re
AC_ARG_VAR(erl_xcomp_after_morecore_hook, [__after_morecore_hook can track malloc()s core memory usage: yes|no (only used when cross compiling)])
AC_ARG_VAR(erl_xcomp_dlsym_brk_wrappers, [dlsym(RTLD_NEXT, _) brk wrappers can track malloc()s core memory usage: yes|no (only used when cross compiling)])
+dnl Cross compilation variables for OSE
+AC_ARG_VAR(erl_xcomp_ose_ldflags_pass1, [Linker flags for the OSE module (pass 1) (only used when cross compiling for OSE)])
+AC_ARG_VAR(erl_xcomp_ose_ldflags_pass2, [Linker flags for the OSE module (pass 2) (only used when cross compiling for OSE)])
+AC_ARG_VAR(erl_xcomp_ose_OSEROOT, [OSE installation root directory (only used when cross compiling for OSE)])
+AC_ARG_VAR(erl_xcomp_ose_STRIP, [Strip utility shipped with the OSE distribution(only used when cross compiling for OSE)])
+AC_ARG_VAR(erl_xcomp_ose_LM_POST_LINK, [OSE postlink tool (only used when cross compiling for OSE)])
+AC_ARG_VAR(erl_xcomp_ose_LM_SET_CONF, [Sets the configuration for an OSE load module (only used when cross compiling for OSE)])
+AC_ARG_VAR(erl_xcomp_ose_LM_ELF_SIZE, [Prints the section size information for an OSE load module (only used when cross compiling for OSE)])
+AC_ARG_VAR(erl_xcomp_ose_LM_LCF, [OSE load module linker configuration file (only used when cross compiling for OSE)])
+AC_ARG_VAR(erl_xcomp_ose_BEAM_LM_CONF, [BEAM OSE load module default configuration file (only used when cross compiling for OSE)])
+AC_ARG_VAR(erl_xcomp_ose_EPMD_LM_CONF, [EPMD OSE load module default configuration file (only used when cross compiling for OSE)])
+AC_ARG_VAR(erl_xcomp_ose_RUN_ERL_LM_CONF, [run_erl_lm OSE load module default configuration file (only used when cross compiling for OSE)])
+AC_ARG_VAR(erl_xcomp_ose_CONFD, [OSE confd source file])
+AC_ARG_VAR(erl_xcomp_ose_CRT0_LM, [OSE crt0 lm source file])
+
])
AC_DEFUN(ERL_XCOMP_SYSROOT_INIT,
@@ -488,6 +503,8 @@ AC_CACHE_VAL(ac_cv_sys_ipv6_support,
#ifdef __WIN32__
#include <winsock2.h>
#include <ws2tcpip.h>
+#elif __OSE__
+#error "no ipv6"
#else
#include <netinet/in.h>
#endif],
@@ -500,6 +517,8 @@ else
#ifdef __WIN32__
#include <winsock2.h>
#include <ws2tcpip.h>
+#elif __OSE__
+#error "no ipv6"
#else
#include <netinet/in.h>
#endif],
@@ -728,6 +747,12 @@ if test "X$host_os" = "Xwin32"; then
THR_LIBS=
THR_LIB_NAME=win32_threads
THR_LIB_TYPE=win32_threads
+elif test "X$host_os" = "Xose"; then
+ AC_MSG_RESULT(yes)
+ THR_DEFS="-DOSE_THREADS"
+ THR_LIBS=
+ THR_LIB_NAME=ose_threads
+ THR_LIB_TYPE=ose_threads
else
AC_MSG_RESULT(no)
THR_DEFS=
@@ -1078,9 +1103,22 @@ case "$THR_LIB_NAME" in
test "$ethr_have_native_atomics" = "yes" && ethr_have_native_spinlock=yes
;;
- pthread)
- ETHR_THR_LIB_BASE_DIR=pthread
- AC_DEFINE(ETHR_PTHREADS, 1, [Define if you have pthreads])
+ pthread|ose_threads)
+ case "$THR_LIB_NAME" in
+ pthread)
+ ETHR_THR_LIB_BASE_DIR=pthread
+ AC_DEFINE(ETHR_PTHREADS, 1, [Define if you have pthreads])
+ ;;
+ ose_threads)
+ AC_DEFINE(ETHR_OSE_THREADS, 1,
+ [Define if you have OSE style threads])
+ ETHR_THR_LIB_BASE_DIR=ose
+ AC_CHECK_HEADER(ose_spi/ose_spi.h,
+ AC_DEFINE(HAVE_OSE_SPI_H, 1,
+ [Define if you have the "ose_spi/ose_spi.h" header file.]))
+ ;;
+ esac
+ if test "x$THR_LIB_NAME" = "xpthread"; then
case $host_os in
openbsd*)
# The default stack size is insufficient for our needs
@@ -1139,6 +1177,7 @@ case "$THR_LIB_NAME" in
*) ;;
esac
+ fi
dnl We sometimes need ETHR_DEFS in order to find certain headers
dnl (at least for pthread.h on osf1).
saved_cppflags="$CPPFLAGS"
@@ -1151,7 +1190,6 @@ case "$THR_LIB_NAME" in
dnl
dnl Check for headers
dnl
-
AC_CHECK_HEADER(pthread.h, \
AC_DEFINE(ETHR_HAVE_PTHREAD_H, 1, \
[Define if you have the <pthread.h> header file.]))
@@ -1184,7 +1222,7 @@ case "$THR_LIB_NAME" in
dnl
dnl Check for functions
dnl
-
+ if test "x$THR_LIB_NAME" = "xpthread"; then
AC_CHECK_FUNC(pthread_spin_lock, \
[ethr_have_native_spinlock=yes \
AC_DEFINE(ETHR_HAVE_PTHREAD_SPIN_LOCK, 1, \
@@ -1311,6 +1349,8 @@ case "$THR_LIB_NAME" in
AC_MSG_RESULT([$linux_futex])
test $linux_futex = yes && AC_DEFINE(ETHR_HAVE_LINUX_FUTEX, 1, [Define if you have a linux futex implementation.])
+ fi
+
AC_CHECK_SIZEOF(int)
AC_CHECK_SIZEOF(long)
AC_CHECK_SIZEOF(long long)
diff --git a/lib/wx/api_gen/Makefile b/lib/wx/api_gen/Makefile
index 8adb485ba9..3e41ac7bc5 100644
--- a/lib/wx/api_gen/Makefile
+++ b/lib/wx/api_gen/Makefile
@@ -1,7 +1,7 @@
#
# %CopyrightBegin%
#
-# Copyright Ericsson AB 2008-2012. All Rights Reserved.
+# Copyright Ericsson AB 2008-2014. 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
@@ -60,7 +60,7 @@ $(GL): glxml_generated $(GL_COMP_T) glapi.conf
erl -noshell -run gl_gen code && touch gl_code_generated
%.beam: %.erl wx_gen.hrl gl_gen.hrl
- $(ERLC) -W $(ERL_FLAGS) $(ERL_COMPILE_FLAGS) $< -o$(EBIN)
+ $(ERLC) -W $(ERL_FLAGS) $(ERL_COMPILE_FLAGS) -o$(EBIN) $<
# TODO split cleans into separate targets?
complete_clean:
diff --git a/lib/wx/api_gen/gen_util.erl b/lib/wx/api_gen/gen_util.erl
index 2ba1c6e16f..9b08815bf7 100644
--- a/lib/wx/api_gen/gen_util.erl
+++ b/lib/wx/api_gen/gen_util.erl
@@ -1,7 +1,7 @@
%%
%% %CopyrightBegin%
%%
-%% Copyright Ericsson AB 2008-2013. All Rights Reserved.
+%% Copyright Ericsson AB 2008-2014. 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
@@ -222,11 +222,12 @@ halt(Reason) ->
erl_copyright() ->
StartYear = start_year(get(current_class)),
+ {CurrentYear,_,_} = erlang:date(),
w("%%~n",[]),
w("%% %CopyrightBegin%~n",[]),
w("%%~n",[]),
- w("%% Copyright Ericsson AB ~p-2013. All Rights Reserved.~n",
- [StartYear]),
+ w("%% Copyright Ericsson AB ~p-~p. All Rights Reserved.~n",
+ [StartYear, CurrentYear]),
w("%%~n",[]),
w("%% The contents of this file are subject to the Erlang Public License,~n",[]),
w("%% Version 1.1, (the \"License\"); you may not use this file except in~n",[]),
@@ -242,10 +243,11 @@ erl_copyright() ->
w("%% %CopyrightEnd%~n",[]).
c_copyright() ->
+ {CurrentYear,_,_} = erlang:date(),
w("/*~n",[]),
w(" * %CopyrightBegin%~n",[]),
w(" *~n",[]),
- w(" * Copyright Ericsson AB 2008-2013. All Rights Reserved.~n",[]),
+ w(" * Copyright Ericsson AB 2008-~p. All Rights Reserved.~n",[CurrentYear]),
w(" *~n",[]),
w(" * The contents of this file are subject to the Erlang Public License,~n",[]),
w(" * Version 1.1, (the \"License\"); you may not use this file except in~n",[]),
diff --git a/lib/wx/api_gen/wx_doxygen.conf b/lib/wx/api_gen/wx_doxygen.conf
index 829702cbbf..a8516aa08e 100644
--- a/lib/wx/api_gen/wx_doxygen.conf
+++ b/lib/wx/api_gen/wx_doxygen.conf
@@ -57,7 +57,6 @@ GENERATE_DEPRECATEDLIST= NO
ENABLED_SECTIONS =
MAX_INITIALIZER_LINES = 30
SHOW_USED_FILES = YES
-SHOW_DIRECTORIES = YES
FILE_VERSION_FILTER =
#---------------------------------------------------------------------------
# configuration options related to warning and progress messages
@@ -110,7 +109,6 @@ HTML_FILE_EXTENSION = .html
HTML_HEADER =
HTML_FOOTER =
HTML_STYLESHEET =
-HTML_ALIGN_MEMBERS = YES
GENERATE_HTMLHELP = NO
CHM_FILE =
HHC_LOCATION =
@@ -252,6 +250,7 @@ PREDEFINED = \
wxUSE_SLIDER=1 \
wxUSE_CLIPBOARD=1 \
wxUSE_SYSTEM_OPTIONS=1 \
+ wxUSE_INTL=1 \
wxABI_VERSION=20809 \
__WXGTK24__=1 \
__WXGTK20__=1 \
diff --git a/lib/wx/api_gen/wx_extra/wxEvtHandler.c_src b/lib/wx/api_gen/wx_extra/wxEvtHandler.c_src
index 9c5f46b253..5d20019d8f 100644
--- a/lib/wx/api_gen/wx_extra/wxEvtHandler.c_src
+++ b/lib/wx/api_gen/wx_extra/wxEvtHandler.c_src
@@ -1,17 +1,5 @@
-case 98: { // wxeEvtListener::wxeEvtListener
- wxeEvtListener *Result = new wxeEvtListener(Ecmd.port);
- rt.addRef(getRef((void *)Result,memenv), "wxeEvtListener");
- break;
-}
-case 99: { // wxeEvtListener::destroy
- wxObject *This = (wxObject *) getPtr(bp,memenv);
- rt.addAtom("ok");
- delete This;
- break;
-}
-case 100: { // wxEvtHandler::Connect
- wxeEvtListener *Listener = (wxeEvtListener *) getPtr(bp,memenv); bp += 4;
+case 100: { // wxEvtHandler::Connect
wxEvtHandler *This = (wxEvtHandler *) getPtr(bp, memenv); bp += 4;
int * winid = (int *) bp; bp += 4;
int * lastId = (int *) bp; bp += 4;
@@ -22,20 +10,22 @@ case 100: { // wxEvtHandler::Connect
int * eventTypeLen = (int *) bp; bp += 4;
int * class_nameLen = (int *) bp; bp += 4;
- if(*haveUserData) {
+ if(*haveUserData) {
userData = new wxeErlTerm(Ecmd.bin[0]);
}
int eventType = wxeEventTypeFromAtom(bp); bp += *eventTypeLen;
char *class_name = bp; bp+= *class_nameLen;
if(eventType > 0 ) {
- wxeCallbackData * Evt_cb = new wxeCallbackData(Ecmd.caller,getRef(This, memenv),
- class_name,*fun_cb,
- *skip, userData, Listener);
+ wxeEvtListener * Evt_cb = new wxeEvtListener(Ecmd.caller,getRef(This, memenv),
+ class_name,*fun_cb,
+ *skip, userData, Ecmd.port);
This->Connect((int) *winid,(int) *lastId,eventType,
(wxObjectEventFunction)(wxEventFunction) &wxeEvtListener::forward,
- Evt_cb, Listener);
+ Evt_cb, Evt_cb);
rt.addAtom("ok");
+ rt.addRef(getRef((void *)Evt_cb,memenv), "wxeEvtListener");
+ rt.addTupleCount(2);
} else {
rt.addAtom("badarg");
rt.addAtom("event_type");
@@ -43,7 +33,7 @@ case 100: { // wxEvtHandler::Connect
}
break;
}
-case 101: { // wxEvtHandler::Disconnect
+case 101: { // wxEvtHandler::Disconnect
wxeEvtListener *Listener = (wxeEvtListener *) getPtr(bp,memenv); bp += 4;
wxEvtHandler *This = (wxEvtHandler *) getPtr(bp, memenv); bp += 4;
int * winid = (int *) bp; bp += 4;
@@ -53,14 +43,14 @@ case 101: { // wxEvtHandler::Disconnect
int eventType = wxeEventTypeFromAtom(bp); bp += *eventTypeLen;
if(eventType > 0) {
bool Result = This->Disconnect((int) *winid,(int) *lastId,eventType,
- (wxObjectEventFunction)(wxEventFunction)
- &wxeEvtListener::forward,
- NULL, Listener);
+ (wxObjectEventFunction)(wxEventFunction)
+ &wxeEvtListener::forward,
+ NULL, Listener);
rt.addBool(Result);
} else {
rt.addAtom("badarg");
rt.addAtom("event_type");
- rt.addTupleCount(2);
+ rt.addTupleCount(2);
}
break;
}
diff --git a/lib/wx/api_gen/wx_extra/wxEvtHandler.erl b/lib/wx/api_gen/wx_extra/wxEvtHandler.erl
index c5802af679..c9726fd475 100644
--- a/lib/wx/api_gen/wx_extra/wxEvtHandler.erl
+++ b/lib/wx/api_gen/wx_extra/wxEvtHandler.erl
@@ -27,15 +27,11 @@
-export([connect/2, connect/3, disconnect/1, disconnect/2, disconnect/3]).
%% internal exports
--export([connect_impl/3, disconnect_impl/2, disconnect_impl/3,
- new_evt_listener/0, destroy_evt_listener/1,
- get_callback/1, replace_fun_with_id/2]).
+-export([connect_impl/2, disconnect_impl/2]).
-export_type([wxEvtHandler/0, wx/0, event/0]).
-type wxEvtHandler() :: wx:wx_object().
--record(evh, {et=null,id=?wxID_ANY,lastId=?wxID_ANY,skip=undefined,userdata=[],cb=0}).
-
%% @doc Equivalent to {@link connect/3. connect(This, EventType, [])}
-spec connect(This::wxEvtHandler(), EventType::wxEventType()) -> ok.
connect(This, EventType) ->
@@ -130,54 +126,34 @@ disconnect(This=#wx_ref{type=ThisT,ref=_ThisRef}, EventType, Opts) ->
%% @hidden
-connect_impl(#wx_ref{type=wxeEvtListener,ref=EvtList},
- #wx_ref{type=ThisT,ref=ThisRef},
- #evh{id=Winid, lastId=LastId, et=EventType,
- skip=Skip, userdata=Userdata, cb=FunID})
+connect_impl(#wx_ref{type=ThisT,ref=ThisRef},
+ #evh{id=Winid, lastId=LastId, et=EventType,
+ skip=Skip, userdata=Userdata, cb=FunID})
when is_integer(FunID)->
EventTypeBin = list_to_binary([atom_to_list(EventType)|[0]]),
ThisTypeBin = list_to_binary([atom_to_list(ThisT)|[0]]),
UD = if Userdata =:= [] -> 0;
- true ->
+ true ->
wxe_util:send_bin(term_to_binary(Userdata)),
1
end,
- wxe_util:call(100, <<EvtList:32/?UI,ThisRef:32/?UI,
+ wxe_util:call(100, <<ThisRef:32/?UI,
Winid:32/?UI,LastId:32/?UI,
(wxe_util:from_bool(Skip)):32/?UI,
UD:32/?UI,
FunID:32/?UI,
(size(EventTypeBin)):32/?UI,
- (size(ThisTypeBin)):32/?UI,
+ (size(ThisTypeBin)):32/?UI,
%% Note no alignment
EventTypeBin/binary,ThisTypeBin/binary>>).
%% @hidden
-disconnect_impl(Listener, Object) ->
- disconnect_impl(Listener, Object, #evh{}).
-%% @hidden
-disconnect_impl(#wx_ref{type=wxeEvtListener,ref=EvtList},
- #wx_ref{type=_ThisT,ref=ThisRef},
- #evh{id=Winid, lastId=LastId, et=EventType}) ->
+disconnect_impl(#wx_ref{type=_ThisT,ref=ThisRef},
+ #evh{id=Winid, lastId=LastId, et=EventType,
+ handler=#wx_ref{type=wxeEvtListener,ref=EvtList}}) ->
EventTypeBin = list_to_binary([atom_to_list(EventType)|[0]]),
- wxe_util:call(101, <<EvtList:32/?UI,
+ wxe_util:call(101, <<EvtList:32/?UI,
ThisRef:32/?UI,Winid:32/?UI,LastId:32/?UI,
(size(EventTypeBin)):32/?UI,
%% Note no alignment
EventTypeBin/binary>>).
-
-%% @hidden
-new_evt_listener() ->
- wxe_util:call(98, <<>>).
-
-%% @hidden
-destroy_evt_listener(#wx_ref{type=wxeEvtListener,ref=EvtList}) ->
- wxe_util:call(99, <<EvtList:32/?UI>>).
-
-%% @hidden
-get_callback(#evh{cb=Callback}) ->
- Callback.
-
-%% @hidden
-replace_fun_with_id(Evh, Id) ->
- Evh#evh{cb=Id}.
diff --git a/lib/wx/api_gen/wx_extra/wxListCtrl.c_src b/lib/wx/api_gen/wx_extra/wxListCtrl.c_src
index 8fa31e512e..d6196d11a2 100644
--- a/lib/wx/api_gen/wx_extra/wxListCtrl.c_src
+++ b/lib/wx/api_gen/wx_extra/wxListCtrl.c_src
@@ -1,7 +1,7 @@
%%
%% %CopyrightBegin%
%%
-%% Copyright Ericsson AB 2011-2013. All Rights Reserved.
+%% Copyright Ericsson AB 2011-2014. 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
@@ -165,7 +165,7 @@ case ~s: { // wxListCtrl::SortItems taylormade
callbackInfo* cb = new callbackInfo();
cb->port = Ecmd.port;
cb->callbackID = sortCallback;
- bool Result = This->SortItems(wxEListCtrlCompare, (long)cb);
+ bool Result = This->SortItems(wxEListCtrlCompare, (wxeIntPtr)cb);
delete cb;
/* Destroy the callback, see wxEPrintout::clear_cb */
diff --git a/lib/wx/api_gen/wx_gen.erl b/lib/wx/api_gen/wx_gen.erl
index 3ca8cd7d14..a60a9a93d5 100644
--- a/lib/wx/api_gen/wx_gen.erl
+++ b/lib/wx/api_gen/wx_gen.erl
@@ -1,7 +1,7 @@
%%
%% %CopyrightBegin%
%%
-%% Copyright Ericsson AB 2008-2013. All Rights Reserved.
+%% Copyright Ericsson AB 2008-2014. 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
@@ -25,7 +25,7 @@
-include_lib("xmerl/include/xmerl.hrl").
--import(lists, [foldl/3,foldr/3,reverse/1, keysearch/3, map/2, filter/2]).
+-import(lists, [foldl/3,foldr/3,reverse/1,keysearch/3,map/2,filter/2,droplast/1]).
-import(proplists, [get_value/2,get_value/3]).
-compile(export_all).
@@ -69,7 +69,7 @@ gen_code() ->
gen_xml() ->
%% {ok, Defs} = file:consult("wxapi.conf"),
-%% Rel = reverse(tl(reverse(os:cmd("wx-config --release")))),
+%% Rel = droplast(os:cmd("wx-config --release")),
%% Dir = " /usr/include/wx-" ++ Rel ++ "/wx/",
%% Files0 = [Dir ++ File || {class, File, _, _, _} <- Defs],
%% Files1 = [Dir ++ File || {doxygen, File} <- Defs],
@@ -172,7 +172,7 @@ parse_defs([], Acc) -> reverse(Acc).
meta_info(C=#class{name=CName,methods=Ms0}) ->
Ms = lists:append(Ms0),
HaveConstructor = lists:keymember(constructor, #method.method_type, Ms),
- case lists:keysearch(destructor, #method.method_type, Ms) of
+ case keysearch(destructor, #method.method_type, Ms) of
false when HaveConstructor ->
Dest = #method{name = "destroy", id = next_id(func_id),
method_type = destructor, params = [this(CName)]},
@@ -288,7 +288,7 @@ parse_attr1([{{attr,_}, #xmlElement{content=C, attributes=Attrs}}|R], AttrList0,
parse_attr1([{_Id,_}|R],AttrList,Info, Res) ->
parse_attr1(R,AttrList,Info, Res);
parse_attr1([],Left,_, Res) ->
- {lists:reverse(Res), Left}.
+ {reverse(Res), Left}.
attr_acc(#param{name=N}, List) ->
Name = list_to_atom(N),
@@ -743,7 +743,14 @@ parse_type2([N="wxTreeItemData"|R],Info,Opts,T) ->
parse_type2(R,Info,Opts,T#type{name="wxETreeItemData",base={term,N}});
parse_type2([N="wxClientData"|R],Info,Opts,T) ->
parse_type2(R,Info,Opts,T#type{name="wxeErlTerm",base={term,N}});
-parse_type2([N="wxChar"|R],Info,Opts,T) ->
+parse_type2([N="wxChar",{by_ref,_}|R],Info,Opts,T = #type{mod=[const]}) ->
+ case get(current_class) of
+ "wxLocale" -> %% Special since changed between 2.8 and 3.0
+ parse_type2(R,Info,Opts,T#type{name="wxeLocaleC",base=string});
+ _ ->
+ parse_type2(R,Info,Opts,T#type{name=N,base=int,single=false})
+ end;
+parse_type2([N="wxChar"|R],Info,Opts,T) ->
parse_type2(R,Info,Opts,T#type{name=N,base=int});
parse_type2(["wxUint32"|R],Info,Opts,T=#type{mod=Mod}) ->
parse_type2(R,Info,Opts,T#type{name=int,base=int,mod=[unsigned|Mod]});
@@ -994,7 +1001,7 @@ erl_skip_opt2([F={_,{N,In,_},M=#method{where=Where}}|Ms],Acc1,Acc2,Check) ->
[] ->
erl_skip_opt2(Ms,[F|Acc1],[M#method{where=erl_no_opt}|Acc2],[]);
_ ->
- Skipped = reverse(tl(reverse(In))),
+ Skipped = droplast(In),
T = fun({_,{_,Args,_},_}) -> true =:= types_differ(Skipped,Args) end,
case lists:all(T, Check) of
true ->
@@ -1274,6 +1281,7 @@ parse_enums([File|Files], Parsed) ->
%%io:format("Parse Enums in ~s ~n", [FileName]),
case xmerl_scan:file(FileName, [{space, normalize}]) of
{error, enoent} ->
+ %% io:format("Ignore ~p~n", [FileName]),
parse_enums(Files, gb_sets:add(File,Parsed));
{Doc, _} ->
ES = "./compounddef/sectiondef/memberdef[@kind=\"enum\"]",
diff --git a/lib/wx/api_gen/wx_gen_cpp.erl b/lib/wx/api_gen/wx_gen_cpp.erl
index 7e35ebfa83..31ed1374c2 100644
--- a/lib/wx/api_gen/wx_gen_cpp.erl
+++ b/lib/wx/api_gen/wx_gen_cpp.erl
@@ -1,7 +1,7 @@
%%
%% %CopyrightBegin%
%%
-%% Copyright Ericsson AB 2008-2013. All Rights Reserved.
+%% Copyright Ericsson AB 2008-2014. 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
@@ -190,10 +190,14 @@ gen_funcs(Defs) ->
%% w(" case WXE_REMOVE_PORT:~n", []),
%% w(" { destroyMemEnv(Ecmd.port); } break;~n", []),
w(" case DESTROY_OBJECT: {~n"),
- w(" wxObject *This = (wxObject *) getPtr(bp,memenv); "),
- w(" if(This) {"),
- w(" ((WxeApp *) wxTheApp)->clearPtr((void *) This);~n"),
- w(" delete This; }~n } break;~n"),
+ w(" wxObject *This = (wxObject *) getPtr(bp,memenv);~n"),
+ w(" if(This) {~n"),
+ w(" if(recurse_level > 1) {~n"),
+ w(" delayed_delete->Append(Ecmd.Save());~n"),
+ w(" } else {~n"),
+ w(" ((WxeApp *) wxTheApp)->clearPtr((void *) This);~n"),
+ w(" delete This; }~n"),
+ w(" } } break;~n"),
w(" case WXE_REGISTER_OBJECT: {~n"
" registerPid(bp, Ecmd.caller, memenv);~n"
" rt.addAtom(\"ok\");~n"
@@ -231,24 +235,27 @@ gen_funcs(Defs) ->
"wxFileDataObject", "wxTextDataObject", "wxBitmapDataObject"
],
- w("void WxeApp::delete_object(void *ptr, wxeRefData *refd) {~n", []),
+ w("bool WxeApp::delete_object(void *ptr, wxeRefData *refd) {~n", []),
w(" switch(refd->type) {~n", []),
- Case = fun(#class{name=Class, id=Id, abstract=IsAbs, parent=P}) when P /= "static" ->
+ Case = fun(C=#class{name=Class, id=Id, abstract=IsAbs, parent=P}) when P /= "static" ->
UglyWorkaround = lists:member(Class, UglySkipList),
+ HaveVirtual = virtual_dest(C),
case hd(reverse(wx_gen_erl:parents(Class))) of
- root when IsAbs == false, UglyWorkaround == false ->
- w(" case ~p: delete (~s *) ptr; break;~n", [Id, Class]);
root when IsAbs == false, UglyWorkaround == true ->
w(" case ~p: /* delete (~s *) ptr;"
"These objects must be deleted by owner object */ "
"break;~n", [Id, Class]);
+ root when IsAbs == false, HaveVirtual == true ->
+ w(" case ~p: delete (E~s *) ptr; return false;~n", [Id, Class]);
+ root when IsAbs == false, UglyWorkaround == false ->
+ w(" case ~p: delete (~s *) ptr; break;~n", [Id, Class]);
_ -> ok
end;
(_) -> ok
end,
[Case(Class) || Class <- Defs],
- w(" default: delete (wxObject *) ptr;~n", []),
- w("}}~n~n", []),
+ w(" default: delete (wxObject *) ptr; return false;~n", []),
+ w(" }~n return true;~n}~n~n", []),
Res.
gen_class(C=#class{name=Name,methods=Ms,options=Opts}) ->
@@ -397,6 +404,8 @@ declare_type(N,true,Def,#type{base=Base,single=true,name=Type,by_val=false,ref={
w(" ~s *~s=~s;~n", [Type,N,Def]);
declare_type(N,true,Def,#type{single=true,name="wxArtClient"}) ->
w(" wxArtClient ~s= ~s;~n", [N,Def]);
+declare_type(N,true,_Def,#type{name="wxeLocaleC", single=true,base=string}) ->
+ w(" wxString ~s= wxEmptyString;~n", [N]);
declare_type(N,true,Def,#type{single=true,base=string}) ->
w(" wxString ~s= ~s;~n", [N,Def]);
%% declare_type(N,true,_Def,#type{name="wxString"}) ->
@@ -855,34 +864,24 @@ call_arg(#param{name=N,type={merged,_,_,_,_,_,_}}) -> N.
to_string(Type) when is_atom(Type) -> atom_to_list(Type);
to_string(Type) when is_list(Type) -> Type.
-virtual_dest(#class{abstract=true, parent="root"}) -> false;
-virtual_dest(#class{abstract=true, parent="object"}) -> true;
virtual_dest(#class{abstract=true, parent=Parent}) ->
- virtual_dest(get({class,Parent}));
+ virtual_dest(get_parent_class(Parent));
virtual_dest(#class{methods=Ms, parent=Parent}) ->
case lists:keysearch(destructor,#method.method_type, lists:append(Ms)) of
{value, #method{method_type=destructor, virtual=Virtual}} ->
case Virtual of
- undefined ->
- case get({class,Parent}) of
- undefined ->
- case Parent of
- "object" ->
- true;
- "root" ->
- false;
- _ ->
- io:format("Error: ~p~n",[Parent]),
- erlang:error(no_parent)
- end;
- PClass ->
- virtual_dest(PClass)
- end;
- _ ->
- Virtual
+ true -> true;
+ _ -> virtual_dest(get_parent_class(Parent))
end;
- false ->
- false
+ false -> virtual_dest(get_parent_class(Parent))
+ end;
+virtual_dest("root") -> false;
+virtual_dest("object") -> true.
+
+get_parent_class(Parent) ->
+ case get({class, Parent}) of
+ undefined -> Parent;
+ Class -> Class
end.
debug(F,A) ->
@@ -1003,6 +1002,8 @@ build_ret(Name,_,#type{base=float,single=true}) ->
w(" rt.addFloat(~s);~n",[Name]);
build_ret(Name,_,#type{base=double,single=true}) ->
w(" rt.addFloat(~s);~n",[Name]);
+build_ret(Name,_,#type{name="wxeLocaleC"}) ->
+ w(" rt.add(wxeLocaleC2String(~s));~n",[Name]);
build_ret(Name,_,#type{base=string,single=true}) ->
w(" rt.add(~s);~n",[Name]);
build_ret(Name,_,#type{name="wxArrayString", single=array}) ->
@@ -1196,15 +1197,6 @@ find_id(OtherClass) ->
encode_events(Evs) ->
?WTC("encode_events"),
- w("void wxeEvtListener::forward(wxEvent& event)~n"
- "{~n"
- "#ifdef DEBUG~n"
- " if(!sendevent(&event, port))~n"
- " fprintf(stderr, \"Couldn't send event!\\r\\n\");~n"
- "#else~n"
- "sendevent(&event, port);~n"
- "#endif~n"
- "}~n~n"),
w("int getRef(void* ptr, wxeMemEnv* memenv)~n"
"{~n"
" WxeApp * app = (WxeApp *) wxTheApp;~n"
@@ -1215,7 +1207,7 @@ encode_events(Evs) ->
" char * evClass = NULL;~n"
" wxMBConvUTF32 UTFconverter;~n"
" wxeEtype *Etype = etmap[event->GetEventType()];~n"
- " wxeCallbackData *cb = (wxeCallbackData *)event->m_callbackUserData;~n"
+ " wxeEvtListener *cb = (wxeEvtListener *)event->m_callbackUserData;~n"
" WxeApp * app = (WxeApp *) wxTheApp;~n"
" wxeMemEnv *memenv = app->getMemEnv(port);~n"
" if(!memenv) return 0;~n~n"
diff --git a/lib/wx/api_gen/wx_gen_erl.erl b/lib/wx/api_gen/wx_gen_erl.erl
index c87187edc5..5ac781b40c 100644
--- a/lib/wx/api_gen/wx_gen_erl.erl
+++ b/lib/wx/api_gen/wx_gen_erl.erl
@@ -1,7 +1,7 @@
%%
%% %CopyrightBegin%
%%
-%% Copyright Ericsson AB 2008-2013. All Rights Reserved.
+%% Copyright Ericsson AB 2008-2014. 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
@@ -44,7 +44,11 @@ gen(Defs) ->
gen_unique_names(Defs),
gen_event_recs(),
gen_enums_ints(),
- [gen_class(Class) || Class <- Defs],
+ Static = gen_static([C || C=#class{parent="static"} <- Defs]),
+ Replace = fun(C=#class{name=Name}, Dfs) ->
+ lists:keyreplace(Name, #class.name, Dfs, C)
+ end,
+ [gen_class(Class) || Class <- lists:foldl(Replace, Defs, Static)],
gen_funcnames().
gen_class(Class) ->
@@ -54,9 +58,8 @@ gen_class(Class) ->
Class
end.
-gen_class1(C=#class{name=Name,parent="static",methods=Ms,options=_Opts}) ->
+gen_static(Files) ->
open_write("../src/gen/wx_misc.erl"),
- put(current_class, Name),
erl_copyright(),
w("", []),
w("%% This file is generated DO NOT EDIT~n~n", []),
@@ -67,17 +70,27 @@ gen_class1(C=#class{name=Name,parent="static",methods=Ms,options=_Opts}) ->
w("-module(wx_misc).~n", []),
w("-include(\"wxe.hrl\").~n",[]),
%% w("-compile(export_all).~n~n", []), %% XXXX remove ???
+ [gen_static_exports(C) || C <- Files],
+ Classes = [gen_static_methods(C) || C <- Files],
+ close(),
+ Classes.
+
+gen_static_exports(C=#class{parent="static",methods=Ms}) ->
Exp = fun(M) -> gen_export(C,M) end,
ExportList = lists:usort(lists:append(lists:map(Exp,reverse(Ms)))),
w("-export([~s]).~n~n", [args(fun({EF,_}) -> EF end, ",", ExportList, 60)]),
+ ok.
+gen_static_methods(C=#class{name=Name, parent="static",methods=Ms}) ->
+ put(current_class, Name),
Gen = fun(M) -> gen_method(Name,M) end,
NewMs = lists:map(Gen,reverse(Ms)),
- close(),
erase(current_class),
- C#class{methods=NewMs};
+ C#class{methods=NewMs}.
+gen_class1(C=#class{parent="static"}) ->
+ C;
gen_class1(C=#class{name=Name,parent=Parent,methods=Ms,options=Opts}) ->
case Opts of
["ignore"] -> throw(skipped);
@@ -137,15 +150,27 @@ gen_class1(C=#class{name=Name,parent=Parent,methods=Ms,options=Opts}) ->
w("%% inherited exports~n",[]),
Done0 = ["Destroy", "New", "Create", "destroy", "new", "create"],
Done = gb_sets:from_list(Done0 ++ [M|| #method{name=M} <- lists:append(Ms)]),
- {_, InExported} = gen_inherited(Parents, Done, []),
- w("-export([~s]).~n~n", [args(fun(EF) -> EF end, ",",
- lists:usort(["parent_class/1"|InExported]),
+ {_, InExported0} = gen_inherited(Parents, Done, []),
+ InExported = lists:ukeysort(2, [{?MODULE,{"parent_class","1"},false}|InExported0]),
+ w("-export([~s]).~n~n", [args(fun({_M,{F,A},_Dep}) -> F ++ "/" ++ A end, ",",
+ InExported,
60)]),
w("-export_type([~s/0]).~n", [Name]),
case lists:filter(fun({_F,Depr}) -> Depr end, ExportList) of
[] -> ok;
Depr -> w("-deprecated([~s]).~n~n", [args(fun({EF,_}) -> EF end, ",", Depr, 60)])
end,
+ case lists:filter(fun({_,_,Depr}) -> Depr end, InExported) of
+ [] -> ok;
+ NoWDepr -> w("-compile([~s]).~n~n",
+ [args(fun({M,{F,A},_}) ->
+ DStr=io_lib:format("{nowarn_deprecated_function, {~s,~s,~s}}",
+ [M,F,A]),
+ lists:flatten(DStr)
+ end, ",", NoWDepr, 60)])
+ end,
+
+
w("%% @hidden~n", []),
parents_check(Parents),
w("-type ~s() :: wx:wx_object().~n", [Name]),
@@ -375,7 +400,7 @@ gen_inherited([Parent|Ps], Done0, Exported0) ->
{Done,Exported} = gen_inherited_ms(Ms, Class, Done0, gb_sets:empty(), Exported0),
gen_inherited(Ps, gb_sets:union(Done,Done0), Exported).
-gen_inherited_ms([[#method{name=Name,alias=A,params=Ps0,where=W,method_type=MT}|_]|R],
+gen_inherited_ms([[M=#method{name=Name,alias=A,params=Ps0,where=W,method_type=MT}|_]|R],
Class,Skip,Done, Exported)
when W =/= merged_c ->
case gb_sets:is_member(Name,Skip) of
@@ -399,8 +424,10 @@ gen_inherited_ms([[#method{name=Name,alias=A,params=Ps0,where=W,method_type=MT}|
_ when W =:= erl_no_opt -> 0;
_ -> 1
end,
- Export = erl_func_name(Name,A) ++ "/" ++ integer_to_list(length(Args) + OptLen),
- gen_inherited_ms(R,Class,Skip, gb_sets:add(Name,Done), [Export|Exported]);
+ {_, Depr} = deprecated(M,ignore),
+ Export = {Class,{erl_func_name(Name,A),integer_to_list(length(Args) + OptLen)}, Depr},
+ gen_inherited_ms(R,Class,Skip, gb_sets:add(Name,Done),
+ [Export|Exported]);
_ ->
gen_inherited_ms(R,Class, Skip, Done, Exported)
end;
@@ -741,7 +768,7 @@ write_spec(Args, Optional, {complex, Res}, Eol) ->
optional_type(Opts, Eol) ->
"Option :: " ++ args(fun optional_type2/1, Eol++"\t\t | ", Opts).
-optional_type2(#param{name=Name, def=Def, type=T}) ->
+optional_type2(#param{name=Name, def=_Def, type=T}) ->
"{" ++ erl_option_name(Name) ++ ", " ++ doc_arg_type2(T) ++ "}". %% %% Default: " ++ Def.
doc_link("utils", Func) ->
@@ -1343,4 +1370,3 @@ split_list(F, Keep, [M|Ms], Acc) ->
split_list(_, _, [], []) -> [];
split_list(_, _, [], Acc) -> [lists:reverse(Acc)].
-
diff --git a/lib/wx/api_gen/wxapi.conf b/lib/wx/api_gen/wxapi.conf
index ff680d0655..3a1dcc7ba5 100644
--- a/lib/wx/api_gen/wxapi.conf
+++ b/lib/wx/api_gen/wxapi.conf
@@ -2,7 +2,7 @@
%%
%% %CopyrightBegin%
%%
-%% Copyright Ericsson AB 2008-2013. All Rights Reserved.
+%% Copyright Ericsson AB 2008-2014. 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
@@ -1577,9 +1577,14 @@
'wxShutdown', {'wxShell', 1}, 'wxLaunchDefaultBrowser',
{'wxGetEmailAddress',0}, {'wxGetUserId',0}, {'wxGetHomeDir',0},
'wxNewId', 'wxRegisterId', 'wxGetCurrentId',
- 'wxGetOsDescription', 'wxIsPlatformLittleEndian', 'wxIsPlatform64Bit'
+ 'wxGetOsDescription', 'wxIsPlatformLittleEndian', 'wxIsPlatform64Bit'
]}.
+{class, gdicmn, static, [],
+ [ {'wxDisplaySize', [{"width", [out]}, {"height", [out]}]}, 'wxSetCursor'
+ ]}.
+
+
{class, wxPrintout, object, [{alias, [{wxePrintout, wxePrintout}]}],
[{'wxPrintout', [{where, taylormade}]},'~wxPrintout',
'GetDC', %% 'GetPageInfo',Callback
@@ -1883,3 +1888,17 @@
[{event,[wxEVT_TASKBAR_MOVE,wxEVT_TASKBAR_LEFT_DOWN,wxEVT_TASKBAR_LEFT_UP,
wxEVT_TASKBAR_RIGHT_DOWN,wxEVT_TASKBAR_RIGHT_UP,
wxEVT_TASKBAR_LEFT_DCLICK,wxEVT_TASKBAR_RIGHT_DCLICK]}],[]}.
+
+{class, wxInitDialogEvent, wxEvent, [{event,[wxEVT_INIT_DIALOG]}], []}.
+
+{class, wxLocale, root, [{skip, [{'wxLocale', 5}, {'Init', 6}]}],
+ ['wxLocale', '~wxLocale', 'Init',
+ 'AddCatalog','AddCatalogLookupPathPrefix',
+ %%'AddLanguage','FindLanguageInfo', 'GetLanguageInfo',
+ 'GetCanonicalName','GetLanguage',
+ 'GetLanguageName','GetLocale','GetName','GetString',
+ 'GetHeaderValue',
+ 'GetSysName',
+ 'GetSystemEncoding','GetSystemEncodingName',
+ 'GetSystemLanguage',
+ 'IsLoaded','IsOk']}.
diff --git a/lib/wx/c_src/Makefile.in b/lib/wx/c_src/Makefile.in
index 5507a74c14..4a7342f714 100644
--- a/lib/wx/c_src/Makefile.in
+++ b/lib/wx/c_src/Makefile.in
@@ -1,7 +1,7 @@
#
# %CopyrightBegin%
#
-# Copyright Ericsson AB 2008-2012. All Rights Reserved.
+# Copyright Ericsson AB 2008-2014. 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
@@ -34,8 +34,9 @@ SO_EXT = @SO_EXT@
OBJC_CC=@OBJC_CC@
OBJC_CFLAGS=@OBJC_CFLAGS@
-GENERAL = wxe_driver wxe_ps_init wxe_impl wxePrintout wxe_return wxe_gl
-GENERAL_H = wxe_driver.h wxe_impl.h wxe_return.h
+GENERAL = wxe_driver wxe_ps_init wxe_main wxe_impl wxe_helpers wxe_callback_impl wxe_return wxe_gl
+GENERAL_H = wxe_callback_impl.h wxe_driver.h wxe_events.h wxe_gl.h \
+ wxe_helpers.h wxe_impl.h wxe_memory.h wxe_return.h
GENERATED_F = wxe_funcs wxe_events wxe_init
GENERATED_H = gen/wxe_macros.h
@@ -79,8 +80,8 @@ TARGET_DIR = ../priv/$(SYS_TYPE)
COMMON_CFLAGS = @DEFS@ $(ERL_INCS)
CC = @CC@
-CPP = @CXX@
-LD = $(CPP)
+CXX = @CXX@
+LD = $(CXX)
LDFLAGS = @LDFLAGS@
RESCOMP = @WX_RESCOMP@
@@ -110,7 +111,7 @@ GL_LIBS = @GL_LIBS@
CC_O = $(V_CC) -c $(CFLAGS) $(WX_CFLAGS) $(COMMON_CFLAGS)
OBJC_CC_O = $(OBJC_CC) -c $(CFLAGS) $(OBJC_CFLAGS) $(WX_CFLAGS) $(COMMON_CFLAGS)
-CPP_O = $(V_CPP) -c $(CXX_FLAGS) $(WX_CXX_FLAGS) $(COMMON_CFLAGS)
+CXX_O = $(V_CXX) -c $(CXX_FLAGS) $(WX_CXX_FLAGS) $(COMMON_CFLAGS)
# Targets
@@ -140,7 +141,7 @@ $(WX_OBJECTS): $(GENERATED_H) $(GENERAL_H)
$(SYS_TYPE)/%.o: %.cpp
$(V_at)mkdir -p $(SYS_TYPE)
- $(CPP_O) $< -o $@
+ $(CXX_O) $< -o $@
$(SYS_TYPE)/%.o: %.c
$(V_at)mkdir -p $(SYS_TYPE)
@@ -152,7 +153,7 @@ $(SYS_TYPE)/wxe_ps_init.o: wxe_ps_init.c
$(SYS_TYPE)/%.o: gen/%.cpp
$(V_at)mkdir -p $(SYS_TYPE)
- $(CPP_O) $< -o $@
+ $(CXX_O) $< -o $@
$(SYS_TYPE)/%.o: gen/%.c
$(V_at)mkdir -p $(SYS_TYPE)
diff --git a/lib/wx/c_src/gen/wxe_derived_dest.h b/lib/wx/c_src/gen/wxe_derived_dest.h
index 8dcaf1c1ac..42925bff3a 100644
--- a/lib/wx/c_src/gen/wxe_derived_dest.h
+++ b/lib/wx/c_src/gen/wxe_derived_dest.h
@@ -1,7 +1,7 @@
/*
* %CopyrightBegin%
*
- * Copyright Ericsson AB 2008-2013. All Rights Reserved.
+ * Copyright Ericsson AB 2008-2014. 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
@@ -736,6 +736,12 @@ class EwxPrintout : public wxPrintout {
EwxPrintout(const wxString& title) : wxPrintout(title) {};
};
+class EwxStyledTextCtrl : public wxStyledTextCtrl {
+ public: ~EwxStyledTextCtrl() {((WxeApp *)wxTheApp)->clearPtr(this);};
+ EwxStyledTextCtrl(wxWindow * parent,wxWindowID id,const wxPoint& pos,const wxSize& size,long style) : wxStyledTextCtrl(parent,id,pos,size,style) {};
+ EwxStyledTextCtrl() : wxStyledTextCtrl() {};
+};
+
class EwxClipboard : public wxClipboard {
public: ~EwxClipboard() {((WxeApp *)wxTheApp)->clearPtr(this);};
EwxClipboard() : wxClipboard() {};
@@ -758,3 +764,9 @@ class EwxTaskBarIcon : public wxTaskBarIcon {
EwxTaskBarIcon() : wxTaskBarIcon() {};
};
+class EwxLocale : public wxLocale {
+ public: ~EwxLocale() {((WxeApp *)wxTheApp)->clearPtr(this);};
+ EwxLocale(int language,int flags) : wxLocale(language,flags) {};
+ EwxLocale() : wxLocale() {};
+};
+
diff --git a/lib/wx/c_src/gen/wxe_events.cpp b/lib/wx/c_src/gen/wxe_events.cpp
index fb3a065448..0ca059ead4 100644
--- a/lib/wx/c_src/gen/wxe_events.cpp
+++ b/lib/wx/c_src/gen/wxe_events.cpp
@@ -1,7 +1,7 @@
/*
* %CopyrightBegin%
*
- * Copyright Ericsson AB 2008-2013. All Rights Reserved.
+ * Copyright Ericsson AB 2008-2014. 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
@@ -220,83 +220,84 @@ void initEventTable()
{wxEVT_STC_HOTSPOT_DCLICK, 203, "stc_hotspot_dclick"},
{wxEVT_STC_CALLTIP_CLICK, 203, "stc_calltip_click"},
{wxEVT_STC_AUTOCOMP_SELECTION, 203, "stc_autocomp_selection"},
- {wxEVT_COMMAND_TREE_BEGIN_DRAG, 208, "command_tree_begin_drag"},
- {wxEVT_COMMAND_TREE_BEGIN_RDRAG, 208, "command_tree_begin_rdrag"},
- {wxEVT_COMMAND_TREE_BEGIN_LABEL_EDIT, 208, "command_tree_begin_label_edit"},
- {wxEVT_COMMAND_TREE_END_LABEL_EDIT, 208, "command_tree_end_label_edit"},
- {wxEVT_COMMAND_TREE_DELETE_ITEM, 208, "command_tree_delete_item"},
- {wxEVT_COMMAND_TREE_GET_INFO, 208, "command_tree_get_info"},
- {wxEVT_COMMAND_TREE_SET_INFO, 208, "command_tree_set_info"},
- {wxEVT_COMMAND_TREE_ITEM_EXPANDED, 208, "command_tree_item_expanded"},
- {wxEVT_COMMAND_TREE_ITEM_EXPANDING, 208, "command_tree_item_expanding"},
- {wxEVT_COMMAND_TREE_ITEM_COLLAPSED, 208, "command_tree_item_collapsed"},
- {wxEVT_COMMAND_TREE_ITEM_COLLAPSING, 208, "command_tree_item_collapsing"},
- {wxEVT_COMMAND_TREE_SEL_CHANGED, 208, "command_tree_sel_changed"},
- {wxEVT_COMMAND_TREE_SEL_CHANGING, 208, "command_tree_sel_changing"},
- {wxEVT_COMMAND_TREE_KEY_DOWN, 208, "command_tree_key_down"},
- {wxEVT_COMMAND_TREE_ITEM_ACTIVATED, 208, "command_tree_item_activated"},
- {wxEVT_COMMAND_TREE_ITEM_RIGHT_CLICK, 208, "command_tree_item_right_click"},
- {wxEVT_COMMAND_TREE_ITEM_MIDDLE_CLICK, 208, "command_tree_item_middle_click"},
- {wxEVT_COMMAND_TREE_END_DRAG, 208, "command_tree_end_drag"},
- {wxEVT_COMMAND_TREE_STATE_IMAGE_CLICK, 208, "command_tree_state_image_click"},
- {wxEVT_COMMAND_TREE_ITEM_GETTOOLTIP, 208, "command_tree_item_gettooltip"},
- {wxEVT_COMMAND_TREE_ITEM_MENU, 208, "command_tree_item_menu"},
- {wxEVT_COMMAND_NOTEBOOK_PAGE_CHANGED, 209, "command_notebook_page_changed"},
- {wxEVT_COMMAND_NOTEBOOK_PAGE_CHANGING, 209, "command_notebook_page_changing"},
- {wxEVT_COMMAND_TEXT_COPY, 215, "command_text_copy"},
- {wxEVT_COMMAND_TEXT_CUT, 215, "command_text_cut"},
- {wxEVT_COMMAND_TEXT_PASTE, 215, "command_text_paste"},
- {wxEVT_COMMAND_SPINCTRL_UPDATED, 216, "command_spinctrl_updated"},
+ {wxEVT_COMMAND_TREE_BEGIN_DRAG, 209, "command_tree_begin_drag"},
+ {wxEVT_COMMAND_TREE_BEGIN_RDRAG, 209, "command_tree_begin_rdrag"},
+ {wxEVT_COMMAND_TREE_BEGIN_LABEL_EDIT, 209, "command_tree_begin_label_edit"},
+ {wxEVT_COMMAND_TREE_END_LABEL_EDIT, 209, "command_tree_end_label_edit"},
+ {wxEVT_COMMAND_TREE_DELETE_ITEM, 209, "command_tree_delete_item"},
+ {wxEVT_COMMAND_TREE_GET_INFO, 209, "command_tree_get_info"},
+ {wxEVT_COMMAND_TREE_SET_INFO, 209, "command_tree_set_info"},
+ {wxEVT_COMMAND_TREE_ITEM_EXPANDED, 209, "command_tree_item_expanded"},
+ {wxEVT_COMMAND_TREE_ITEM_EXPANDING, 209, "command_tree_item_expanding"},
+ {wxEVT_COMMAND_TREE_ITEM_COLLAPSED, 209, "command_tree_item_collapsed"},
+ {wxEVT_COMMAND_TREE_ITEM_COLLAPSING, 209, "command_tree_item_collapsing"},
+ {wxEVT_COMMAND_TREE_SEL_CHANGED, 209, "command_tree_sel_changed"},
+ {wxEVT_COMMAND_TREE_SEL_CHANGING, 209, "command_tree_sel_changing"},
+ {wxEVT_COMMAND_TREE_KEY_DOWN, 209, "command_tree_key_down"},
+ {wxEVT_COMMAND_TREE_ITEM_ACTIVATED, 209, "command_tree_item_activated"},
+ {wxEVT_COMMAND_TREE_ITEM_RIGHT_CLICK, 209, "command_tree_item_right_click"},
+ {wxEVT_COMMAND_TREE_ITEM_MIDDLE_CLICK, 209, "command_tree_item_middle_click"},
+ {wxEVT_COMMAND_TREE_END_DRAG, 209, "command_tree_end_drag"},
+ {wxEVT_COMMAND_TREE_STATE_IMAGE_CLICK, 209, "command_tree_state_image_click"},
+ {wxEVT_COMMAND_TREE_ITEM_GETTOOLTIP, 209, "command_tree_item_gettooltip"},
+ {wxEVT_COMMAND_TREE_ITEM_MENU, 209, "command_tree_item_menu"},
+ {wxEVT_COMMAND_NOTEBOOK_PAGE_CHANGED, 210, "command_notebook_page_changed"},
+ {wxEVT_COMMAND_NOTEBOOK_PAGE_CHANGING, 210, "command_notebook_page_changing"},
+ {wxEVT_COMMAND_TEXT_COPY, 216, "command_text_copy"},
+ {wxEVT_COMMAND_TEXT_CUT, 216, "command_text_cut"},
+ {wxEVT_COMMAND_TEXT_PASTE, 216, "command_text_paste"},
+ {wxEVT_COMMAND_SPINCTRL_UPDATED, 217, "command_spinctrl_updated"},
{wxEVT_SCROLL_LINEUP + wxEVT_USER_FIRST, 165, "spin_up"},
{wxEVT_SCROLL_LINEDOWN + wxEVT_USER_FIRST, 165, "spin_down"},
{wxEVT_SCROLL_THUMBTRACK + wxEVT_USER_FIRST, 165, "spin"},
- {wxEVT_COMMAND_SPLITTER_SASH_POS_CHANGED, 218, "command_splitter_sash_pos_changed"},
- {wxEVT_COMMAND_SPLITTER_SASH_POS_CHANGING, 218, "command_splitter_sash_pos_changing"},
- {wxEVT_COMMAND_SPLITTER_DOUBLECLICKED, 218, "command_splitter_doubleclicked"},
- {wxEVT_COMMAND_SPLITTER_UNSPLIT, 218, "command_splitter_unsplit"},
- {wxEVT_COMMAND_HTML_LINK_CLICKED, 220, "command_html_link_clicked"},
- {wxEVT_COMMAND_AUINOTEBOOK_PAGE_CLOSE, 223, "command_auinotebook_page_close"},
- {wxEVT_COMMAND_AUINOTEBOOK_PAGE_CHANGED, 223, "command_auinotebook_page_changed"},
- {wxEVT_COMMAND_AUINOTEBOOK_PAGE_CHANGING, 223, "command_auinotebook_page_changing"},
- {wxEVT_COMMAND_AUINOTEBOOK_BUTTON, 223, "command_auinotebook_button"},
- {wxEVT_COMMAND_AUINOTEBOOK_BEGIN_DRAG, 223, "command_auinotebook_begin_drag"},
- {wxEVT_COMMAND_AUINOTEBOOK_END_DRAG, 223, "command_auinotebook_end_drag"},
- {wxEVT_COMMAND_AUINOTEBOOK_DRAG_MOTION, 223, "command_auinotebook_drag_motion"},
- {wxEVT_COMMAND_AUINOTEBOOK_ALLOW_DND, 223, "command_auinotebook_allow_dnd"},
+ {wxEVT_COMMAND_SPLITTER_SASH_POS_CHANGED, 219, "command_splitter_sash_pos_changed"},
+ {wxEVT_COMMAND_SPLITTER_SASH_POS_CHANGING, 219, "command_splitter_sash_pos_changing"},
+ {wxEVT_COMMAND_SPLITTER_DOUBLECLICKED, 219, "command_splitter_doubleclicked"},
+ {wxEVT_COMMAND_SPLITTER_UNSPLIT, 219, "command_splitter_unsplit"},
+ {wxEVT_COMMAND_HTML_LINK_CLICKED, 221, "command_html_link_clicked"},
+ {wxEVT_COMMAND_AUINOTEBOOK_PAGE_CLOSE, 224, "command_auinotebook_page_close"},
+ {wxEVT_COMMAND_AUINOTEBOOK_PAGE_CHANGED, 224, "command_auinotebook_page_changed"},
+ {wxEVT_COMMAND_AUINOTEBOOK_PAGE_CHANGING, 224, "command_auinotebook_page_changing"},
+ {wxEVT_COMMAND_AUINOTEBOOK_BUTTON, 224, "command_auinotebook_button"},
+ {wxEVT_COMMAND_AUINOTEBOOK_BEGIN_DRAG, 224, "command_auinotebook_begin_drag"},
+ {wxEVT_COMMAND_AUINOTEBOOK_END_DRAG, 224, "command_auinotebook_end_drag"},
+ {wxEVT_COMMAND_AUINOTEBOOK_DRAG_MOTION, 224, "command_auinotebook_drag_motion"},
+ {wxEVT_COMMAND_AUINOTEBOOK_ALLOW_DND, 224, "command_auinotebook_allow_dnd"},
#if wxCHECK_VERSION(2,8,5)
- {wxEVT_COMMAND_AUINOTEBOOK_TAB_MIDDLE_DOWN, 223, "command_auinotebook_tab_middle_down"},
+ {wxEVT_COMMAND_AUINOTEBOOK_TAB_MIDDLE_DOWN, 224, "command_auinotebook_tab_middle_down"},
#endif
#if wxCHECK_VERSION(2,8,5)
- {wxEVT_COMMAND_AUINOTEBOOK_TAB_MIDDLE_UP, 223, "command_auinotebook_tab_middle_up"},
+ {wxEVT_COMMAND_AUINOTEBOOK_TAB_MIDDLE_UP, 224, "command_auinotebook_tab_middle_up"},
#endif
#if wxCHECK_VERSION(2,8,5)
- {wxEVT_COMMAND_AUINOTEBOOK_TAB_RIGHT_DOWN, 223, "command_auinotebook_tab_right_down"},
+ {wxEVT_COMMAND_AUINOTEBOOK_TAB_RIGHT_DOWN, 224, "command_auinotebook_tab_right_down"},
#endif
#if wxCHECK_VERSION(2,8,5)
- {wxEVT_COMMAND_AUINOTEBOOK_TAB_RIGHT_UP, 223, "command_auinotebook_tab_right_up"},
+ {wxEVT_COMMAND_AUINOTEBOOK_TAB_RIGHT_UP, 224, "command_auinotebook_tab_right_up"},
#endif
#if wxCHECK_VERSION(2,8,5)
- {wxEVT_COMMAND_AUINOTEBOOK_PAGE_CLOSED, 223, "command_auinotebook_page_closed"},
+ {wxEVT_COMMAND_AUINOTEBOOK_PAGE_CLOSED, 224, "command_auinotebook_page_closed"},
#endif
#if wxCHECK_VERSION(2,8,5)
- {wxEVT_COMMAND_AUINOTEBOOK_DRAG_DONE, 223, "command_auinotebook_drag_done"},
+ {wxEVT_COMMAND_AUINOTEBOOK_DRAG_DONE, 224, "command_auinotebook_drag_done"},
#endif
#if wxCHECK_VERSION(2,8,5)
- {wxEVT_COMMAND_AUINOTEBOOK_BG_DCLICK, 223, "command_auinotebook_bg_dclick"},
+ {wxEVT_COMMAND_AUINOTEBOOK_BG_DCLICK, 224, "command_auinotebook_bg_dclick"},
#endif
- {wxEVT_AUI_PANE_BUTTON, 224, "aui_pane_button"},
- {wxEVT_AUI_PANE_CLOSE, 224, "aui_pane_close"},
- {wxEVT_AUI_PANE_MAXIMIZE, 224, "aui_pane_maximize"},
- {wxEVT_AUI_PANE_RESTORE, 224, "aui_pane_restore"},
- {wxEVT_AUI_RENDER, 224, "aui_render"},
- {wxEVT_AUI_FIND_MANAGER, 224, "aui_find_manager"},
- {wxEVT_TASKBAR_MOVE, 227, "taskbar_move"},
- {wxEVT_TASKBAR_LEFT_DOWN, 227, "taskbar_left_down"},
- {wxEVT_TASKBAR_LEFT_UP, 227, "taskbar_left_up"},
- {wxEVT_TASKBAR_RIGHT_DOWN, 227, "taskbar_right_down"},
- {wxEVT_TASKBAR_RIGHT_UP, 227, "taskbar_right_up"},
- {wxEVT_TASKBAR_LEFT_DCLICK, 227, "taskbar_left_dclick"},
- {wxEVT_TASKBAR_RIGHT_DCLICK, 227, "taskbar_right_dclick"},
+ {wxEVT_AUI_PANE_BUTTON, 225, "aui_pane_button"},
+ {wxEVT_AUI_PANE_CLOSE, 225, "aui_pane_close"},
+ {wxEVT_AUI_PANE_MAXIMIZE, 225, "aui_pane_maximize"},
+ {wxEVT_AUI_PANE_RESTORE, 225, "aui_pane_restore"},
+ {wxEVT_AUI_RENDER, 225, "aui_render"},
+ {wxEVT_AUI_FIND_MANAGER, 225, "aui_find_manager"},
+ {wxEVT_TASKBAR_MOVE, 228, "taskbar_move"},
+ {wxEVT_TASKBAR_LEFT_DOWN, 228, "taskbar_left_down"},
+ {wxEVT_TASKBAR_LEFT_UP, 228, "taskbar_left_up"},
+ {wxEVT_TASKBAR_RIGHT_DOWN, 228, "taskbar_right_down"},
+ {wxEVT_TASKBAR_RIGHT_UP, 228, "taskbar_right_up"},
+ {wxEVT_TASKBAR_LEFT_DCLICK, 228, "taskbar_left_dclick"},
+ {wxEVT_TASKBAR_RIGHT_DCLICK, 228, "taskbar_right_dclick"},
+ {wxEVT_INIT_DIALOG, 229, "init_dialog"},
{-1, 0, }
};
for(int i=0; event_types[i].ev_type != -1; i++) {
@@ -315,16 +316,6 @@ void initEventTable()
}
}
-void wxeEvtListener::forward(wxEvent& event)
-{
-#ifdef DEBUG
- if(!sendevent(&event, port))
- fprintf(stderr, "Couldn't send event!\r\n");
-#else
-sendevent(&event, port);
-#endif
-}
-
int getRef(void* ptr, wxeMemEnv* memenv)
{
WxeApp * app = (WxeApp *) wxTheApp;
@@ -337,7 +328,7 @@ bool sendevent(wxEvent *event, ErlDrvTermData port)
char * evClass = NULL;
wxMBConvUTF32 UTFconverter;
wxeEtype *Etype = etmap[event->GetEventType()];
- wxeCallbackData *cb = (wxeCallbackData *)event->m_callbackUserData;
+ wxeEvtListener *cb = (wxeEvtListener *)event->m_callbackUserData;
WxeApp * app = (WxeApp *) wxTheApp;
wxeMemEnv *memenv = app->getMemEnv(port);
if(!memenv) return 0;
@@ -728,7 +719,7 @@ case 203: {// wxStyledTextEvent
rt.addTupleCount(22);
break;
}
-case 208: {// wxTreeEvent
+case 209: {// wxTreeEvent
wxTreeEvent * ev = (wxTreeEvent *) event;
evClass = (char*)"wxTreeEvent";
rt.addAtom((char*)"wxTree");
@@ -739,21 +730,21 @@ case 208: {// wxTreeEvent
rt.addTupleCount(5);
break;
}
-case 209: {// wxNotebookEvent
+case 210: {// wxNotebookEvent
evClass = (char*)"wxNotebookEvent";
rt.addAtom((char*)"wxNotebook");
rt.addAtom(Etype->eName);
rt.addTupleCount(2);
break;
}
-case 215: {// wxClipboardTextEvent
+case 216: {// wxClipboardTextEvent
evClass = (char*)"wxClipboardTextEvent";
rt.addAtom((char*)"wxClipboardText");
rt.addAtom(Etype->eName);
rt.addTupleCount(2);
break;
}
-case 216: {// wxSpinEvent
+case 217: {// wxSpinEvent
wxSpinEvent * ev = (wxSpinEvent *) event;
evClass = (char*)"wxSpinEvent";
rt.addAtom((char*)"wxSpin");
@@ -762,14 +753,14 @@ case 216: {// wxSpinEvent
rt.addTupleCount(3);
break;
}
-case 218: {// wxSplitterEvent
+case 219: {// wxSplitterEvent
evClass = (char*)"wxSplitterEvent";
rt.addAtom((char*)"wxSplitter");
rt.addAtom(Etype->eName);
rt.addTupleCount(2);
break;
}
-case 220: {// wxHtmlLinkEvent
+case 221: {// wxHtmlLinkEvent
wxHtmlLinkEvent * ev = (wxHtmlLinkEvent *) event;
evClass = (char*)"wxHtmlLinkEvent";
rt.addAtom((char*)"wxHtmlLink");
@@ -778,7 +769,7 @@ case 220: {// wxHtmlLinkEvent
rt.addTupleCount(3);
break;
}
-case 223: {// wxAuiNotebookEvent
+case 224: {// wxAuiNotebookEvent
wxAuiNotebookEvent * ev = (wxAuiNotebookEvent *) event;
wxAuiNotebook * GetDragSource = ev->GetDragSource();
evClass = (char*)"wxAuiNotebookEvent";
@@ -790,7 +781,7 @@ case 223: {// wxAuiNotebookEvent
rt.addTupleCount(5);
break;
}
-case 224: {// wxAuiManagerEvent
+case 225: {// wxAuiManagerEvent
wxAuiManagerEvent * ev = (wxAuiManagerEvent *) event;
wxAuiManager * GetManager = ev->GetManager();
wxAuiPaneInfo * GetPane = ev->GetPane();
@@ -807,13 +798,20 @@ case 224: {// wxAuiManagerEvent
rt.addTupleCount(8);
break;
}
-case 227: {// wxTaskBarIconEvent
+case 228: {// wxTaskBarIconEvent
evClass = (char*)"wxTaskBarIconEvent";
rt.addAtom((char*)"wxTaskBarIcon");
rt.addAtom(Etype->eName);
rt.addTupleCount(2);
break;
}
+case 229: {// wxInitDialogEvent
+ evClass = (char*)"wxInitDialogEvent";
+ rt.addAtom((char*)"wxInitDialog");
+ rt.addAtom(Etype->eName);
+ rt.addTupleCount(2);
+ break;
+}
}
rt.addTupleCount(5);
diff --git a/lib/wx/c_src/gen/wxe_funcs.cpp b/lib/wx/c_src/gen/wxe_funcs.cpp
index b5fbac3fe0..c1e9f3829a 100644
--- a/lib/wx/c_src/gen/wxe_funcs.cpp
+++ b/lib/wx/c_src/gen/wxe_funcs.cpp
@@ -1,7 +1,7 @@
/*
* %CopyrightBegin%
*
- * Copyright Ericsson AB 2008-2013. All Rights Reserved.
+ * Copyright Ericsson AB 2008-2014. 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
@@ -45,9 +45,14 @@ void WxeApp::wxe_dispatch(wxeCommand& Ecmd)
switch (Ecmd.op)
{
case DESTROY_OBJECT: {
- wxObject *This = (wxObject *) getPtr(bp,memenv); if(This) { ((WxeApp *) wxTheApp)->clearPtr((void *) This);
- delete This; }
- } break;
+ wxObject *This = (wxObject *) getPtr(bp,memenv);
+ if(This) {
+ if(recurse_level > 1) {
+ delayed_delete->Append(Ecmd.Save());
+ } else {
+ ((WxeApp *) wxTheApp)->clearPtr((void *) This);
+ delete This; }
+ } } break;
case WXE_REGISTER_OBJECT: {
registerPid(bp, Ecmd.caller, memenv);
rt.addAtom("ok");
@@ -62,20 +67,8 @@ void WxeApp::wxe_dispatch(wxeCommand& Ecmd)
case WXE_INIT_OPENGL:
wxe_initOpenGL(rt, bp);
break;
-case 98: { // wxeEvtListener::wxeEvtListener
- wxeEvtListener *Result = new wxeEvtListener(Ecmd.port);
- rt.addRef(getRef((void *)Result,memenv), "wxeEvtListener");
- break;
-}
-case 99: { // wxeEvtListener::destroy
- wxObject *This = (wxObject *) getPtr(bp,memenv);
- rt.addAtom("ok");
- delete This;
- break;
-}
-case 100: { // wxEvtHandler::Connect
- wxeEvtListener *Listener = (wxeEvtListener *) getPtr(bp,memenv); bp += 4;
+case 100: { // wxEvtHandler::Connect
wxEvtHandler *This = (wxEvtHandler *) getPtr(bp, memenv); bp += 4;
int * winid = (int *) bp; bp += 4;
int * lastId = (int *) bp; bp += 4;
@@ -86,20 +79,22 @@ case 100: { // wxEvtHandler::Connect
int * eventTypeLen = (int *) bp; bp += 4;
int * class_nameLen = (int *) bp; bp += 4;
- if(*haveUserData) {
+ if(*haveUserData) {
userData = new wxeErlTerm(Ecmd.bin[0]);
}
int eventType = wxeEventTypeFromAtom(bp); bp += *eventTypeLen;
char *class_name = bp; bp+= *class_nameLen;
if(eventType > 0 ) {
- wxeCallbackData * Evt_cb = new wxeCallbackData(Ecmd.caller,getRef(This, memenv),
- class_name,*fun_cb,
- *skip, userData, Listener);
+ wxeEvtListener * Evt_cb = new wxeEvtListener(Ecmd.caller,getRef(This, memenv),
+ class_name,*fun_cb,
+ *skip, userData, Ecmd.port);
This->Connect((int) *winid,(int) *lastId,eventType,
(wxObjectEventFunction)(wxEventFunction) &wxeEvtListener::forward,
- Evt_cb, Listener);
+ Evt_cb, Evt_cb);
rt.addAtom("ok");
+ rt.addRef(getRef((void *)Evt_cb,memenv), "wxeEvtListener");
+ rt.addTupleCount(2);
} else {
rt.addAtom("badarg");
rt.addAtom("event_type");
@@ -107,7 +102,7 @@ case 100: { // wxEvtHandler::Connect
}
break;
}
-case 101: { // wxEvtHandler::Disconnect
+case 101: { // wxEvtHandler::Disconnect
wxeEvtListener *Listener = (wxeEvtListener *) getPtr(bp,memenv); bp += 4;
wxEvtHandler *This = (wxEvtHandler *) getPtr(bp, memenv); bp += 4;
int * winid = (int *) bp; bp += 4;
@@ -117,14 +112,14 @@ case 101: { // wxEvtHandler::Disconnect
int eventType = wxeEventTypeFromAtom(bp); bp += *eventTypeLen;
if(eventType > 0) {
bool Result = This->Disconnect((int) *winid,(int) *lastId,eventType,
- (wxObjectEventFunction)(wxEventFunction)
- &wxeEvtListener::forward,
- NULL, Listener);
+ (wxObjectEventFunction)(wxEventFunction)
+ &wxeEvtListener::forward,
+ NULL, Listener);
rt.addBool(Result);
} else {
rt.addAtom("badarg");
rt.addAtom("event_type");
- rt.addTupleCount(2);
+ rt.addTupleCount(2);
}
break;
}
@@ -15880,7 +15875,7 @@ case wxListCtrl_SortItems: { // wxListCtrl::SortItems taylormade
callbackInfo* cb = new callbackInfo();
cb->port = Ecmd.port;
cb->callbackID = sortCallback;
- bool Result = This->SortItems(wxEListCtrlCompare, (long)cb);
+ bool Result = This->SortItems(wxEListCtrlCompare, (wxeIntPtr)cb);
delete cb;
/* Destroy the callback, see wxEPrintout::clear_cb */
@@ -26735,6 +26730,20 @@ case utils_wxIsPlatform64Bit: { // utils::wxIsPlatform64Bit
rt.addBool(Result);
break;
}
+case gdicmn_wxDisplaySize: { // gdicmn::wxDisplaySize
+ int width;
+ int height;
+ ::wxDisplaySize(&width,&height);
+ rt.addInt(width);
+ rt.addInt(height);
+ rt.addTupleCount(2);
+ break;
+}
+case gdicmn_wxSetCursor: { // gdicmn::wxSetCursor
+ wxCursor *cursor = (wxCursor *) getPtr(bp,memenv); bp += 4;
+ ::wxSetCursor(*cursor);
+ break;
+}
case wxPrintout_new: { // wxPrintout::wxPrintout taylormade
int onPreparePrinting=0,onBeginPrinting=0,onEndPrinting=0,onBeginDocument=0,
@@ -26953,14 +26962,14 @@ case wxStyledTextCtrl_new_2: { // wxStyledTextCtrl::wxStyledTextCtrl
style = (long)*(int *) bp; bp += 4;
} break;
}};
- wxStyledTextCtrl * Result = new wxStyledTextCtrl(parent,id,pos,size,style);
- /* Possible memory leak here, class is missing virt dest */
+ wxStyledTextCtrl * Result = new EwxStyledTextCtrl(parent,id,pos,size,style);
+ newPtr((void *) Result, 0, memenv);
rt.addRef(getRef((void *)Result,memenv), "wxStyledTextCtrl");
break;
}
case wxStyledTextCtrl_new_0: { // wxStyledTextCtrl::wxStyledTextCtrl
- wxStyledTextCtrl * Result = new wxStyledTextCtrl();
- /* Possible memory leak here, class is missing virt dest */
+ wxStyledTextCtrl * Result = new EwxStyledTextCtrl();
+ newPtr((void *) Result, 0, memenv);
rt.addRef(getRef((void *)Result,memenv), "wxStyledTextCtrl");
break;
}
@@ -30447,7 +30456,7 @@ case wxNotebookEvent_SetSelection: { // wxNotebookEvent::SetSelection
}
case wxFileDataObject_new: { // wxFileDataObject::wxFileDataObject
wxFileDataObject * Result = new wxFileDataObject();
- newPtr((void *) Result, 211, memenv);
+ newPtr((void *) Result, 212, memenv);
rt.addRef(getRef((void *)Result,memenv), "wxFileDataObject");
break;
}
@@ -30483,7 +30492,7 @@ case wxTextDataObject_new: { // wxTextDataObject::wxTextDataObject
} break;
}};
wxTextDataObject * Result = new wxTextDataObject(text);
- newPtr((void *) Result, 212, memenv);
+ newPtr((void *) Result, 213, memenv);
rt.addRef(getRef((void *)Result,memenv), "wxTextDataObject");
break;
}
@@ -30519,7 +30528,7 @@ case wxTextDataObject_destroy: { // wxTextDataObject::destroy
case wxBitmapDataObject_new_1_1: { // wxBitmapDataObject::wxBitmapDataObject
wxBitmap *bitmap = (wxBitmap *) getPtr(bp,memenv); bp += 4;
wxBitmapDataObject * Result = new wxBitmapDataObject(*bitmap);
- newPtr((void *) Result, 213, memenv);
+ newPtr((void *) Result, 214, memenv);
rt.addRef(getRef((void *)Result,memenv), "wxBitmapDataObject");
break;
}
@@ -30531,7 +30540,7 @@ bitmap = (wxBitmap *) getPtr(bp,memenv); bp += 4;
} break;
}};
wxBitmapDataObject * Result = new wxBitmapDataObject(*bitmap);
- newPtr((void *) Result, 213, memenv);
+ newPtr((void *) Result, 214, memenv);
rt.addRef(getRef((void *)Result,memenv), "wxBitmapDataObject");
break;
}
@@ -31364,7 +31373,7 @@ case wxAuiManagerEvent_CanVeto: { // wxAuiManagerEvent::CanVeto
}
case wxLogNull_new: { // wxLogNull::wxLogNull
wxLogNull * Result = new wxLogNull();
- newPtr((void *) Result, 225, memenv);
+ newPtr((void *) Result, 226, memenv);
rt.addRef(getRef((void *)Result,memenv), "wxLogNull");
break;
}
@@ -31411,6 +31420,213 @@ case wxTaskBarIcon_SetIcon: { // wxTaskBarIcon::SetIcon
rt.addBool(Result);
break;
}
+case wxLocale_new_0: { // wxLocale::wxLocale
+ wxLocale * Result = new EwxLocale();
+ newPtr((void *) Result, 230, memenv);
+ rt.addRef(getRef((void *)Result,memenv), "wxLocale");
+ break;
+}
+case wxLocale_new_2: { // wxLocale::wxLocale
+ int flags=wxLOCALE_LOAD_DEFAULT|wxLOCALE_CONV_ENCODING;
+ int * language = (int *) bp; bp += 4;
+ bp += 4; /* Align */
+ while( * (int*) bp) { switch (* (int*) bp) {
+ case 1: {bp += 4;
+ flags = (int)*(int *) bp; bp += 4;
+ } break;
+ }};
+ wxLocale * Result = new EwxLocale(*language,flags);
+ newPtr((void *) Result, 230, memenv);
+ rt.addRef(getRef((void *)Result,memenv), "wxLocale");
+ break;
+}
+case wxLocale_destruct: { // wxLocale::~wxLocale
+ wxLocale *This = (wxLocale *) getPtr(bp,memenv); bp += 4;
+ if(This) { ((WxeApp *) wxTheApp)->clearPtr((void *) This);
+ delete This;}
+ break;
+}
+case wxLocale_Init: { // wxLocale::Init
+ int language=wxLANGUAGE_DEFAULT;
+ int flags=wxLOCALE_LOAD_DEFAULT|wxLOCALE_CONV_ENCODING;
+ wxLocale *This = (wxLocale *) getPtr(bp,memenv); bp += 4;
+ bp += 4; /* Align */
+ while( * (int*) bp) { switch (* (int*) bp) {
+ case 1: {bp += 4;
+ language = (int)*(int *) bp; bp += 4;
+ } break;
+ case 2: {bp += 4;
+ flags = (int)*(int *) bp; bp += 4;
+ } break;
+ }};
+ if(!This) throw wxe_badarg(0);
+ bool Result = This->Init(language,flags);
+ rt.addBool(Result);
+ break;
+}
+case wxLocale_AddCatalog_1: { // wxLocale::AddCatalog
+ wxLocale *This = (wxLocale *) getPtr(bp,memenv); bp += 4;
+ int * szDomainLen = (int *) bp; bp += 4;
+ wxString szDomain = wxString(bp, wxConvUTF8);
+ bp += *szDomainLen+((8-((0+ *szDomainLen) & 7)) & 7);
+ if(!This) throw wxe_badarg(0);
+ bool Result = This->AddCatalog(szDomain);
+ rt.addBool(Result);
+ break;
+}
+case wxLocale_AddCatalog_3: { // wxLocale::AddCatalog
+ wxLocale *This = (wxLocale *) getPtr(bp,memenv); bp += 4;
+ int * szDomainLen = (int *) bp; bp += 4;
+ wxString szDomain = wxString(bp, wxConvUTF8);
+ bp += *szDomainLen+((8-((0+ *szDomainLen) & 7)) & 7);
+ wxLanguage msgIdLanguage = *(wxLanguage *) bp; bp += 4;;
+ int * msgIdCharsetLen = (int *) bp; bp += 4;
+ wxString msgIdCharset = wxString(bp, wxConvUTF8);
+ bp += *msgIdCharsetLen+((8-((0+ *msgIdCharsetLen) & 7)) & 7);
+ if(!This) throw wxe_badarg(0);
+ bool Result = This->AddCatalog(szDomain,msgIdLanguage,msgIdCharset);
+ rt.addBool(Result);
+ break;
+}
+case wxLocale_AddCatalogLookupPathPrefix: { // wxLocale::AddCatalogLookupPathPrefix
+ int * prefixLen = (int *) bp; bp += 4;
+ wxString prefix = wxString(bp, wxConvUTF8);
+ bp += *prefixLen+((8-((4+ *prefixLen) & 7)) & 7);
+ wxLocale::AddCatalogLookupPathPrefix(prefix);
+ break;
+}
+case wxLocale_GetCanonicalName: { // wxLocale::GetCanonicalName
+ wxLocale *This = (wxLocale *) getPtr(bp,memenv); bp += 4;
+ if(!This) throw wxe_badarg(0);
+ wxString Result = This->GetCanonicalName();
+ rt.add(Result);
+ break;
+}
+case wxLocale_GetLanguage: { // wxLocale::GetLanguage
+ wxLocale *This = (wxLocale *) getPtr(bp,memenv); bp += 4;
+ if(!This) throw wxe_badarg(0);
+ int Result = This->GetLanguage();
+ rt.addInt(Result);
+ break;
+}
+case wxLocale_GetLanguageName: { // wxLocale::GetLanguageName
+ int * lang = (int *) bp; bp += 4;
+ wxString Result = wxLocale::GetLanguageName(*lang);
+ rt.add(Result);
+ break;
+}
+case wxLocale_GetLocale: { // wxLocale::GetLocale
+ wxLocale *This = (wxLocale *) getPtr(bp,memenv); bp += 4;
+ if(!This) throw wxe_badarg(0);
+ const wxeLocaleC Result = This->GetLocale();
+ rt.add(wxeLocaleC2String(Result));
+ break;
+}
+case wxLocale_GetName: { // wxLocale::GetName
+ wxLocale *This = (wxLocale *) getPtr(bp,memenv); bp += 4;
+ if(!This) throw wxe_badarg(0);
+ const wxString * Result = &This->GetName();
+ rt.add(Result);
+ break;
+}
+case wxLocale_GetString_2: { // wxLocale::GetString
+ wxString szDomain= wxEmptyString;
+ wxLocale *This = (wxLocale *) getPtr(bp,memenv); bp += 4;
+ int * szOrigStringLen = (int *) bp; bp += 4;
+ wxString szOrigString = wxString(bp, wxConvUTF8);
+ bp += *szOrigStringLen+((8-((0+ *szOrigStringLen) & 7)) & 7);
+ while( * (int*) bp) { switch (* (int*) bp) {
+ case 1: {bp += 4;
+ int * szDomainLen = (int *) bp; bp += 4;
+ szDomain = wxString(bp, wxConvUTF8);
+ bp += *szDomainLen+((8-((0+ *szDomainLen) & 7)) & 7);
+ } break;
+ }};
+ if(!This) throw wxe_badarg(0);
+ const wxeLocaleC Result = This->GetString(szOrigString,szDomain);
+ rt.add(wxeLocaleC2String(Result));
+ break;
+}
+case wxLocale_GetString_4: { // wxLocale::GetString
+ wxString szDomain= wxEmptyString;
+ wxLocale *This = (wxLocale *) getPtr(bp,memenv); bp += 4;
+ int * szOrigStringLen = (int *) bp; bp += 4;
+ wxString szOrigString = wxString(bp, wxConvUTF8);
+ bp += *szOrigStringLen+((8-((0+ *szOrigStringLen) & 7)) & 7);
+ int * szOrigString2Len = (int *) bp; bp += 4;
+ wxString szOrigString2 = wxString(bp, wxConvUTF8);
+ bp += *szOrigString2Len+((8-((4+ *szOrigString2Len) & 7)) & 7);
+ int * n = (int *) bp; bp += 4;
+ bp += 4; /* Align */
+ while( * (int*) bp) { switch (* (int*) bp) {
+ case 1: {bp += 4;
+ int * szDomainLen = (int *) bp; bp += 4;
+ szDomain = wxString(bp, wxConvUTF8);
+ bp += *szDomainLen+((8-((0+ *szDomainLen) & 7)) & 7);
+ } break;
+ }};
+ if(!This) throw wxe_badarg(0);
+ const wxeLocaleC Result = This->GetString(szOrigString,szOrigString2,*n,szDomain);
+ rt.add(wxeLocaleC2String(Result));
+ break;
+}
+case wxLocale_GetHeaderValue: { // wxLocale::GetHeaderValue
+ wxString szDomain= wxEmptyString;
+ wxLocale *This = (wxLocale *) getPtr(bp,memenv); bp += 4;
+ int * szHeaderLen = (int *) bp; bp += 4;
+ wxString szHeader = wxString(bp, wxConvUTF8);
+ bp += *szHeaderLen+((8-((0+ *szHeaderLen) & 7)) & 7);
+ while( * (int*) bp) { switch (* (int*) bp) {
+ case 1: {bp += 4;
+ int * szDomainLen = (int *) bp; bp += 4;
+ szDomain = wxString(bp, wxConvUTF8);
+ bp += *szDomainLen+((8-((0+ *szDomainLen) & 7)) & 7);
+ } break;
+ }};
+ if(!This) throw wxe_badarg(0);
+ wxString Result = This->GetHeaderValue(szHeader,szDomain);
+ rt.add(Result);
+ break;
+}
+case wxLocale_GetSysName: { // wxLocale::GetSysName
+ wxLocale *This = (wxLocale *) getPtr(bp,memenv); bp += 4;
+ if(!This) throw wxe_badarg(0);
+ wxString Result = This->GetSysName();
+ rt.add(Result);
+ break;
+}
+case wxLocale_GetSystemEncoding: { // wxLocale::GetSystemEncoding
+ int Result = wxLocale::GetSystemEncoding();
+ rt.addInt(Result);
+ break;
+}
+case wxLocale_GetSystemEncodingName: { // wxLocale::GetSystemEncodingName
+ wxString Result = wxLocale::GetSystemEncodingName();
+ rt.add(Result);
+ break;
+}
+case wxLocale_GetSystemLanguage: { // wxLocale::GetSystemLanguage
+ int Result = wxLocale::GetSystemLanguage();
+ rt.addInt(Result);
+ break;
+}
+case wxLocale_IsLoaded: { // wxLocale::IsLoaded
+ wxLocale *This = (wxLocale *) getPtr(bp,memenv); bp += 4;
+ int * szDomainLen = (int *) bp; bp += 4;
+ wxString szDomain = wxString(bp, wxConvUTF8);
+ bp += *szDomainLen+((8-((0+ *szDomainLen) & 7)) & 7);
+ if(!This) throw wxe_badarg(0);
+ bool Result = This->IsLoaded(szDomain);
+ rt.addBool(Result);
+ break;
+}
+case wxLocale_IsOk: { // wxLocale::IsOk
+ wxLocale *This = (wxLocale *) getPtr(bp,memenv); bp += 4;
+ if(!This) throw wxe_badarg(0);
+ bool Result = This->IsOk();
+ rt.addBool(Result);
+ break;
+}
default: {
wxeReturn error = wxeReturn(WXE_DRV_PORT, Ecmd.caller, false); error.addAtom("_wxe_error_");
error.addInt((int) Ecmd.op);
@@ -31432,7 +31648,7 @@ case wxTaskBarIcon_SetIcon: { // wxTaskBarIcon::SetIcon
}} /* The End */
-void WxeApp::delete_object(void *ptr, wxeRefData *refd) {
+bool WxeApp::delete_object(void *ptr, wxeRefData *refd) {
switch(refd->type) {
case 24: delete (wxGridCellBoolRenderer *) ptr; break;
case 25: delete (wxGridCellBoolEditor *) ptr; break;
@@ -31451,10 +31667,13 @@ void WxeApp::delete_object(void *ptr, wxeRefData *refd) {
case 101: delete (wxListItemAttr *) ptr; break;
case 103: delete (wxTextAttr *) ptr; break;
case 155: delete (wxAuiPaneInfo *) ptr; break;
- case 211: /* delete (wxFileDataObject *) ptr;These objects must be deleted by owner object */ break;
- case 212: /* delete (wxTextDataObject *) ptr;These objects must be deleted by owner object */ break;
- case 213: /* delete (wxBitmapDataObject *) ptr;These objects must be deleted by owner object */ break;
- case 225: delete (wxLogNull *) ptr; break;
- default: delete (wxObject *) ptr;
-}}
+ case 212: /* delete (wxFileDataObject *) ptr;These objects must be deleted by owner object */ break;
+ case 213: /* delete (wxTextDataObject *) ptr;These objects must be deleted by owner object */ break;
+ case 214: /* delete (wxBitmapDataObject *) ptr;These objects must be deleted by owner object */ break;
+ case 226: delete (wxLogNull *) ptr; break;
+ case 230: delete (EwxLocale *) ptr; return false;
+ default: delete (wxObject *) ptr; return false;
+ }
+ return true;
+}
diff --git a/lib/wx/c_src/gen/wxe_macros.h b/lib/wx/c_src/gen/wxe_macros.h
index a1da6500d5..2da24f5d5e 100644
--- a/lib/wx/c_src/gen/wxe_macros.h
+++ b/lib/wx/c_src/gen/wxe_macros.h
@@ -1,7 +1,7 @@
/*
* %CopyrightBegin%
*
- * Copyright Ericsson AB 2008-2013. All Rights Reserved.
+ * Copyright Ericsson AB 2008-2014. 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
@@ -2756,601 +2756,624 @@
#define utils_wxGetOsDescription 2924
#define utils_wxIsPlatformLittleEndian 2925
#define utils_wxIsPlatform64Bit 2926
-#define wxPrintout_new 2927
-#define wxPrintout_destruct 2928
-#define wxPrintout_GetDC 2929
-#define wxPrintout_GetPageSizeMM 2930
-#define wxPrintout_GetPageSizePixels 2931
-#define wxPrintout_GetPaperRectPixels 2932
-#define wxPrintout_GetPPIPrinter 2933
-#define wxPrintout_GetPPIScreen 2934
-#define wxPrintout_GetTitle 2935
-#define wxPrintout_IsPreview 2936
-#define wxPrintout_FitThisSizeToPaper 2937
-#define wxPrintout_FitThisSizeToPage 2938
-#define wxPrintout_FitThisSizeToPageMargins 2939
-#define wxPrintout_MapScreenSizeToPaper 2940
-#define wxPrintout_MapScreenSizeToPage 2941
-#define wxPrintout_MapScreenSizeToPageMargins 2942
-#define wxPrintout_MapScreenSizeToDevice 2943
-#define wxPrintout_GetLogicalPaperRect 2944
-#define wxPrintout_GetLogicalPageRect 2945
-#define wxPrintout_GetLogicalPageMarginsRect 2946
-#define wxPrintout_SetLogicalOrigin 2947
-#define wxPrintout_OffsetLogicalOrigin 2948
-#define wxStyledTextCtrl_new_2 2949
-#define wxStyledTextCtrl_new_0 2950
-#define wxStyledTextCtrl_destruct 2951
-#define wxStyledTextCtrl_Create 2952
-#define wxStyledTextCtrl_AddText 2953
-#define wxStyledTextCtrl_AddStyledText 2954
-#define wxStyledTextCtrl_InsertText 2955
-#define wxStyledTextCtrl_ClearAll 2956
-#define wxStyledTextCtrl_ClearDocumentStyle 2957
-#define wxStyledTextCtrl_GetLength 2958
-#define wxStyledTextCtrl_GetCharAt 2959
-#define wxStyledTextCtrl_GetCurrentPos 2960
-#define wxStyledTextCtrl_GetAnchor 2961
-#define wxStyledTextCtrl_GetStyleAt 2962
-#define wxStyledTextCtrl_Redo 2963
-#define wxStyledTextCtrl_SetUndoCollection 2964
-#define wxStyledTextCtrl_SelectAll 2965
-#define wxStyledTextCtrl_SetSavePoint 2966
-#define wxStyledTextCtrl_GetStyledText 2967
-#define wxStyledTextCtrl_CanRedo 2968
-#define wxStyledTextCtrl_MarkerLineFromHandle 2969
-#define wxStyledTextCtrl_MarkerDeleteHandle 2970
-#define wxStyledTextCtrl_GetUndoCollection 2971
-#define wxStyledTextCtrl_GetViewWhiteSpace 2972
-#define wxStyledTextCtrl_SetViewWhiteSpace 2973
-#define wxStyledTextCtrl_PositionFromPoint 2974
-#define wxStyledTextCtrl_PositionFromPointClose 2975
-#define wxStyledTextCtrl_GotoLine 2976
-#define wxStyledTextCtrl_GotoPos 2977
-#define wxStyledTextCtrl_SetAnchor 2978
-#define wxStyledTextCtrl_GetCurLine 2979
-#define wxStyledTextCtrl_GetEndStyled 2980
-#define wxStyledTextCtrl_ConvertEOLs 2981
-#define wxStyledTextCtrl_GetEOLMode 2982
-#define wxStyledTextCtrl_SetEOLMode 2983
-#define wxStyledTextCtrl_StartStyling 2984
-#define wxStyledTextCtrl_SetStyling 2985
-#define wxStyledTextCtrl_GetBufferedDraw 2986
-#define wxStyledTextCtrl_SetBufferedDraw 2987
-#define wxStyledTextCtrl_SetTabWidth 2988
-#define wxStyledTextCtrl_GetTabWidth 2989
-#define wxStyledTextCtrl_SetCodePage 2990
-#define wxStyledTextCtrl_MarkerDefine 2991
-#define wxStyledTextCtrl_MarkerSetForeground 2992
-#define wxStyledTextCtrl_MarkerSetBackground 2993
-#define wxStyledTextCtrl_MarkerAdd 2994
-#define wxStyledTextCtrl_MarkerDelete 2995
-#define wxStyledTextCtrl_MarkerDeleteAll 2996
-#define wxStyledTextCtrl_MarkerGet 2997
-#define wxStyledTextCtrl_MarkerNext 2998
-#define wxStyledTextCtrl_MarkerPrevious 2999
-#define wxStyledTextCtrl_MarkerDefineBitmap 3000
-#define wxStyledTextCtrl_MarkerAddSet 3001
-#define wxStyledTextCtrl_MarkerSetAlpha 3002
-#define wxStyledTextCtrl_SetMarginType 3003
-#define wxStyledTextCtrl_GetMarginType 3004
-#define wxStyledTextCtrl_SetMarginWidth 3005
-#define wxStyledTextCtrl_GetMarginWidth 3006
-#define wxStyledTextCtrl_SetMarginMask 3007
-#define wxStyledTextCtrl_GetMarginMask 3008
-#define wxStyledTextCtrl_SetMarginSensitive 3009
-#define wxStyledTextCtrl_GetMarginSensitive 3010
-#define wxStyledTextCtrl_StyleClearAll 3011
-#define wxStyledTextCtrl_StyleSetForeground 3012
-#define wxStyledTextCtrl_StyleSetBackground 3013
-#define wxStyledTextCtrl_StyleSetBold 3014
-#define wxStyledTextCtrl_StyleSetItalic 3015
-#define wxStyledTextCtrl_StyleSetSize 3016
-#define wxStyledTextCtrl_StyleSetFaceName 3017
-#define wxStyledTextCtrl_StyleSetEOLFilled 3018
-#define wxStyledTextCtrl_StyleResetDefault 3019
-#define wxStyledTextCtrl_StyleSetUnderline 3020
-#define wxStyledTextCtrl_StyleSetCase 3021
-#define wxStyledTextCtrl_StyleSetHotSpot 3022
-#define wxStyledTextCtrl_SetSelForeground 3023
-#define wxStyledTextCtrl_SetSelBackground 3024
-#define wxStyledTextCtrl_GetSelAlpha 3025
-#define wxStyledTextCtrl_SetSelAlpha 3026
-#define wxStyledTextCtrl_SetCaretForeground 3027
-#define wxStyledTextCtrl_CmdKeyAssign 3028
-#define wxStyledTextCtrl_CmdKeyClear 3029
-#define wxStyledTextCtrl_CmdKeyClearAll 3030
-#define wxStyledTextCtrl_SetStyleBytes 3031
-#define wxStyledTextCtrl_StyleSetVisible 3032
-#define wxStyledTextCtrl_GetCaretPeriod 3033
-#define wxStyledTextCtrl_SetCaretPeriod 3034
-#define wxStyledTextCtrl_SetWordChars 3035
-#define wxStyledTextCtrl_BeginUndoAction 3036
-#define wxStyledTextCtrl_EndUndoAction 3037
-#define wxStyledTextCtrl_IndicatorSetStyle 3038
-#define wxStyledTextCtrl_IndicatorGetStyle 3039
-#define wxStyledTextCtrl_IndicatorSetForeground 3040
-#define wxStyledTextCtrl_IndicatorGetForeground 3041
-#define wxStyledTextCtrl_SetWhitespaceForeground 3042
-#define wxStyledTextCtrl_SetWhitespaceBackground 3043
-#define wxStyledTextCtrl_GetStyleBits 3044
-#define wxStyledTextCtrl_SetLineState 3045
-#define wxStyledTextCtrl_GetLineState 3046
-#define wxStyledTextCtrl_GetMaxLineState 3047
-#define wxStyledTextCtrl_GetCaretLineVisible 3048
-#define wxStyledTextCtrl_SetCaretLineVisible 3049
-#define wxStyledTextCtrl_GetCaretLineBackground 3050
-#define wxStyledTextCtrl_SetCaretLineBackground 3051
-#define wxStyledTextCtrl_AutoCompShow 3052
-#define wxStyledTextCtrl_AutoCompCancel 3053
-#define wxStyledTextCtrl_AutoCompActive 3054
-#define wxStyledTextCtrl_AutoCompPosStart 3055
-#define wxStyledTextCtrl_AutoCompComplete 3056
-#define wxStyledTextCtrl_AutoCompStops 3057
-#define wxStyledTextCtrl_AutoCompSetSeparator 3058
-#define wxStyledTextCtrl_AutoCompGetSeparator 3059
-#define wxStyledTextCtrl_AutoCompSelect 3060
-#define wxStyledTextCtrl_AutoCompSetCancelAtStart 3061
-#define wxStyledTextCtrl_AutoCompGetCancelAtStart 3062
-#define wxStyledTextCtrl_AutoCompSetFillUps 3063
-#define wxStyledTextCtrl_AutoCompSetChooseSingle 3064
-#define wxStyledTextCtrl_AutoCompGetChooseSingle 3065
-#define wxStyledTextCtrl_AutoCompSetIgnoreCase 3066
-#define wxStyledTextCtrl_AutoCompGetIgnoreCase 3067
-#define wxStyledTextCtrl_UserListShow 3068
-#define wxStyledTextCtrl_AutoCompSetAutoHide 3069
-#define wxStyledTextCtrl_AutoCompGetAutoHide 3070
-#define wxStyledTextCtrl_AutoCompSetDropRestOfWord 3071
-#define wxStyledTextCtrl_AutoCompGetDropRestOfWord 3072
-#define wxStyledTextCtrl_RegisterImage 3073
-#define wxStyledTextCtrl_ClearRegisteredImages 3074
-#define wxStyledTextCtrl_AutoCompGetTypeSeparator 3075
-#define wxStyledTextCtrl_AutoCompSetTypeSeparator 3076
-#define wxStyledTextCtrl_AutoCompSetMaxWidth 3077
-#define wxStyledTextCtrl_AutoCompGetMaxWidth 3078
-#define wxStyledTextCtrl_AutoCompSetMaxHeight 3079
-#define wxStyledTextCtrl_AutoCompGetMaxHeight 3080
-#define wxStyledTextCtrl_SetIndent 3081
-#define wxStyledTextCtrl_GetIndent 3082
-#define wxStyledTextCtrl_SetUseTabs 3083
-#define wxStyledTextCtrl_GetUseTabs 3084
-#define wxStyledTextCtrl_SetLineIndentation 3085
-#define wxStyledTextCtrl_GetLineIndentation 3086
-#define wxStyledTextCtrl_GetLineIndentPosition 3087
-#define wxStyledTextCtrl_GetColumn 3088
-#define wxStyledTextCtrl_SetUseHorizontalScrollBar 3089
-#define wxStyledTextCtrl_GetUseHorizontalScrollBar 3090
-#define wxStyledTextCtrl_SetIndentationGuides 3091
-#define wxStyledTextCtrl_GetIndentationGuides 3092
-#define wxStyledTextCtrl_SetHighlightGuide 3093
-#define wxStyledTextCtrl_GetHighlightGuide 3094
-#define wxStyledTextCtrl_GetLineEndPosition 3095
-#define wxStyledTextCtrl_GetCodePage 3096
-#define wxStyledTextCtrl_GetCaretForeground 3097
-#define wxStyledTextCtrl_GetReadOnly 3098
-#define wxStyledTextCtrl_SetCurrentPos 3099
-#define wxStyledTextCtrl_SetSelectionStart 3100
-#define wxStyledTextCtrl_GetSelectionStart 3101
-#define wxStyledTextCtrl_SetSelectionEnd 3102
-#define wxStyledTextCtrl_GetSelectionEnd 3103
-#define wxStyledTextCtrl_SetPrintMagnification 3104
-#define wxStyledTextCtrl_GetPrintMagnification 3105
-#define wxStyledTextCtrl_SetPrintColourMode 3106
-#define wxStyledTextCtrl_GetPrintColourMode 3107
-#define wxStyledTextCtrl_FindText 3108
-#define wxStyledTextCtrl_FormatRange 3109
-#define wxStyledTextCtrl_GetFirstVisibleLine 3110
-#define wxStyledTextCtrl_GetLine 3111
-#define wxStyledTextCtrl_GetLineCount 3112
-#define wxStyledTextCtrl_SetMarginLeft 3113
-#define wxStyledTextCtrl_GetMarginLeft 3114
-#define wxStyledTextCtrl_SetMarginRight 3115
-#define wxStyledTextCtrl_GetMarginRight 3116
-#define wxStyledTextCtrl_GetModify 3117
-#define wxStyledTextCtrl_SetSelection 3118
-#define wxStyledTextCtrl_GetSelectedText 3119
-#define wxStyledTextCtrl_GetTextRange 3120
-#define wxStyledTextCtrl_HideSelection 3121
-#define wxStyledTextCtrl_LineFromPosition 3122
-#define wxStyledTextCtrl_PositionFromLine 3123
-#define wxStyledTextCtrl_LineScroll 3124
-#define wxStyledTextCtrl_EnsureCaretVisible 3125
-#define wxStyledTextCtrl_ReplaceSelection 3126
-#define wxStyledTextCtrl_SetReadOnly 3127
-#define wxStyledTextCtrl_CanPaste 3128
-#define wxStyledTextCtrl_CanUndo 3129
-#define wxStyledTextCtrl_EmptyUndoBuffer 3130
-#define wxStyledTextCtrl_Undo 3131
-#define wxStyledTextCtrl_Cut 3132
-#define wxStyledTextCtrl_Copy 3133
-#define wxStyledTextCtrl_Paste 3134
-#define wxStyledTextCtrl_Clear 3135
-#define wxStyledTextCtrl_SetText 3136
-#define wxStyledTextCtrl_GetText 3137
-#define wxStyledTextCtrl_GetTextLength 3138
-#define wxStyledTextCtrl_GetOvertype 3139
-#define wxStyledTextCtrl_SetCaretWidth 3140
-#define wxStyledTextCtrl_GetCaretWidth 3141
-#define wxStyledTextCtrl_SetTargetStart 3142
-#define wxStyledTextCtrl_GetTargetStart 3143
-#define wxStyledTextCtrl_SetTargetEnd 3144
-#define wxStyledTextCtrl_GetTargetEnd 3145
-#define wxStyledTextCtrl_ReplaceTarget 3146
-#define wxStyledTextCtrl_SearchInTarget 3147
-#define wxStyledTextCtrl_SetSearchFlags 3148
-#define wxStyledTextCtrl_GetSearchFlags 3149
-#define wxStyledTextCtrl_CallTipShow 3150
-#define wxStyledTextCtrl_CallTipCancel 3151
-#define wxStyledTextCtrl_CallTipActive 3152
-#define wxStyledTextCtrl_CallTipPosAtStart 3153
-#define wxStyledTextCtrl_CallTipSetHighlight 3154
-#define wxStyledTextCtrl_CallTipSetBackground 3155
-#define wxStyledTextCtrl_CallTipSetForeground 3156
-#define wxStyledTextCtrl_CallTipSetForegroundHighlight 3157
-#define wxStyledTextCtrl_CallTipUseStyle 3158
-#define wxStyledTextCtrl_VisibleFromDocLine 3159
-#define wxStyledTextCtrl_DocLineFromVisible 3160
-#define wxStyledTextCtrl_WrapCount 3161
-#define wxStyledTextCtrl_SetFoldLevel 3162
-#define wxStyledTextCtrl_GetFoldLevel 3163
-#define wxStyledTextCtrl_GetLastChild 3164
-#define wxStyledTextCtrl_GetFoldParent 3165
-#define wxStyledTextCtrl_ShowLines 3166
-#define wxStyledTextCtrl_HideLines 3167
-#define wxStyledTextCtrl_GetLineVisible 3168
-#define wxStyledTextCtrl_SetFoldExpanded 3169
-#define wxStyledTextCtrl_GetFoldExpanded 3170
-#define wxStyledTextCtrl_ToggleFold 3171
-#define wxStyledTextCtrl_EnsureVisible 3172
-#define wxStyledTextCtrl_SetFoldFlags 3173
-#define wxStyledTextCtrl_EnsureVisibleEnforcePolicy 3174
-#define wxStyledTextCtrl_SetTabIndents 3175
-#define wxStyledTextCtrl_GetTabIndents 3176
-#define wxStyledTextCtrl_SetBackSpaceUnIndents 3177
-#define wxStyledTextCtrl_GetBackSpaceUnIndents 3178
-#define wxStyledTextCtrl_SetMouseDwellTime 3179
-#define wxStyledTextCtrl_GetMouseDwellTime 3180
-#define wxStyledTextCtrl_WordStartPosition 3181
-#define wxStyledTextCtrl_WordEndPosition 3182
-#define wxStyledTextCtrl_SetWrapMode 3183
-#define wxStyledTextCtrl_GetWrapMode 3184
-#define wxStyledTextCtrl_SetWrapVisualFlags 3185
-#define wxStyledTextCtrl_GetWrapVisualFlags 3186
-#define wxStyledTextCtrl_SetWrapVisualFlagsLocation 3187
-#define wxStyledTextCtrl_GetWrapVisualFlagsLocation 3188
-#define wxStyledTextCtrl_SetWrapStartIndent 3189
-#define wxStyledTextCtrl_GetWrapStartIndent 3190
-#define wxStyledTextCtrl_SetLayoutCache 3191
-#define wxStyledTextCtrl_GetLayoutCache 3192
-#define wxStyledTextCtrl_SetScrollWidth 3193
-#define wxStyledTextCtrl_GetScrollWidth 3194
-#define wxStyledTextCtrl_TextWidth 3195
-#define wxStyledTextCtrl_GetEndAtLastLine 3196
-#define wxStyledTextCtrl_TextHeight 3197
-#define wxStyledTextCtrl_SetUseVerticalScrollBar 3198
-#define wxStyledTextCtrl_GetUseVerticalScrollBar 3199
-#define wxStyledTextCtrl_AppendText 3200
-#define wxStyledTextCtrl_GetTwoPhaseDraw 3201
-#define wxStyledTextCtrl_SetTwoPhaseDraw 3202
-#define wxStyledTextCtrl_TargetFromSelection 3203
-#define wxStyledTextCtrl_LinesJoin 3204
-#define wxStyledTextCtrl_LinesSplit 3205
-#define wxStyledTextCtrl_SetFoldMarginColour 3206
-#define wxStyledTextCtrl_SetFoldMarginHiColour 3207
-#define wxStyledTextCtrl_LineDown 3208
-#define wxStyledTextCtrl_LineDownExtend 3209
-#define wxStyledTextCtrl_LineUp 3210
-#define wxStyledTextCtrl_LineUpExtend 3211
-#define wxStyledTextCtrl_CharLeft 3212
-#define wxStyledTextCtrl_CharLeftExtend 3213
-#define wxStyledTextCtrl_CharRight 3214
-#define wxStyledTextCtrl_CharRightExtend 3215
-#define wxStyledTextCtrl_WordLeft 3216
-#define wxStyledTextCtrl_WordLeftExtend 3217
-#define wxStyledTextCtrl_WordRight 3218
-#define wxStyledTextCtrl_WordRightExtend 3219
-#define wxStyledTextCtrl_Home 3220
-#define wxStyledTextCtrl_HomeExtend 3221
-#define wxStyledTextCtrl_LineEnd 3222
-#define wxStyledTextCtrl_LineEndExtend 3223
-#define wxStyledTextCtrl_DocumentStart 3224
-#define wxStyledTextCtrl_DocumentStartExtend 3225
-#define wxStyledTextCtrl_DocumentEnd 3226
-#define wxStyledTextCtrl_DocumentEndExtend 3227
-#define wxStyledTextCtrl_PageUp 3228
-#define wxStyledTextCtrl_PageUpExtend 3229
-#define wxStyledTextCtrl_PageDown 3230
-#define wxStyledTextCtrl_PageDownExtend 3231
-#define wxStyledTextCtrl_EditToggleOvertype 3232
-#define wxStyledTextCtrl_Cancel 3233
-#define wxStyledTextCtrl_DeleteBack 3234
-#define wxStyledTextCtrl_Tab 3235
-#define wxStyledTextCtrl_BackTab 3236
-#define wxStyledTextCtrl_NewLine 3237
-#define wxStyledTextCtrl_FormFeed 3238
-#define wxStyledTextCtrl_VCHome 3239
-#define wxStyledTextCtrl_VCHomeExtend 3240
-#define wxStyledTextCtrl_ZoomIn 3241
-#define wxStyledTextCtrl_ZoomOut 3242
-#define wxStyledTextCtrl_DelWordLeft 3243
-#define wxStyledTextCtrl_DelWordRight 3244
-#define wxStyledTextCtrl_LineCut 3245
-#define wxStyledTextCtrl_LineDelete 3246
-#define wxStyledTextCtrl_LineTranspose 3247
-#define wxStyledTextCtrl_LineDuplicate 3248
-#define wxStyledTextCtrl_LowerCase 3249
-#define wxStyledTextCtrl_UpperCase 3250
-#define wxStyledTextCtrl_LineScrollDown 3251
-#define wxStyledTextCtrl_LineScrollUp 3252
-#define wxStyledTextCtrl_DeleteBackNotLine 3253
-#define wxStyledTextCtrl_HomeDisplay 3254
-#define wxStyledTextCtrl_HomeDisplayExtend 3255
-#define wxStyledTextCtrl_LineEndDisplay 3256
-#define wxStyledTextCtrl_LineEndDisplayExtend 3257
-#define wxStyledTextCtrl_HomeWrapExtend 3258
-#define wxStyledTextCtrl_LineEndWrap 3259
-#define wxStyledTextCtrl_LineEndWrapExtend 3260
-#define wxStyledTextCtrl_VCHomeWrap 3261
-#define wxStyledTextCtrl_VCHomeWrapExtend 3262
-#define wxStyledTextCtrl_LineCopy 3263
-#define wxStyledTextCtrl_MoveCaretInsideView 3264
-#define wxStyledTextCtrl_LineLength 3265
-#define wxStyledTextCtrl_BraceHighlight 3266
-#define wxStyledTextCtrl_BraceBadLight 3267
-#define wxStyledTextCtrl_BraceMatch 3268
-#define wxStyledTextCtrl_GetViewEOL 3269
-#define wxStyledTextCtrl_SetViewEOL 3270
-#define wxStyledTextCtrl_SetModEventMask 3271
-#define wxStyledTextCtrl_GetEdgeColumn 3272
-#define wxStyledTextCtrl_SetEdgeColumn 3273
-#define wxStyledTextCtrl_SetEdgeMode 3274
-#define wxStyledTextCtrl_GetEdgeMode 3275
-#define wxStyledTextCtrl_GetEdgeColour 3276
-#define wxStyledTextCtrl_SetEdgeColour 3277
-#define wxStyledTextCtrl_SearchAnchor 3278
-#define wxStyledTextCtrl_SearchNext 3279
-#define wxStyledTextCtrl_SearchPrev 3280
-#define wxStyledTextCtrl_LinesOnScreen 3281
-#define wxStyledTextCtrl_UsePopUp 3282
-#define wxStyledTextCtrl_SelectionIsRectangle 3283
-#define wxStyledTextCtrl_SetZoom 3284
-#define wxStyledTextCtrl_GetZoom 3285
-#define wxStyledTextCtrl_GetModEventMask 3286
-#define wxStyledTextCtrl_SetSTCFocus 3287
-#define wxStyledTextCtrl_GetSTCFocus 3288
-#define wxStyledTextCtrl_SetStatus 3289
-#define wxStyledTextCtrl_GetStatus 3290
-#define wxStyledTextCtrl_SetMouseDownCaptures 3291
-#define wxStyledTextCtrl_GetMouseDownCaptures 3292
-#define wxStyledTextCtrl_SetSTCCursor 3293
-#define wxStyledTextCtrl_GetSTCCursor 3294
-#define wxStyledTextCtrl_SetControlCharSymbol 3295
-#define wxStyledTextCtrl_GetControlCharSymbol 3296
-#define wxStyledTextCtrl_WordPartLeft 3297
-#define wxStyledTextCtrl_WordPartLeftExtend 3298
-#define wxStyledTextCtrl_WordPartRight 3299
-#define wxStyledTextCtrl_WordPartRightExtend 3300
-#define wxStyledTextCtrl_SetVisiblePolicy 3301
-#define wxStyledTextCtrl_DelLineLeft 3302
-#define wxStyledTextCtrl_DelLineRight 3303
-#define wxStyledTextCtrl_GetXOffset 3304
-#define wxStyledTextCtrl_ChooseCaretX 3305
-#define wxStyledTextCtrl_SetXCaretPolicy 3306
-#define wxStyledTextCtrl_SetYCaretPolicy 3307
-#define wxStyledTextCtrl_GetPrintWrapMode 3308
-#define wxStyledTextCtrl_SetHotspotActiveForeground 3309
-#define wxStyledTextCtrl_SetHotspotActiveBackground 3310
-#define wxStyledTextCtrl_SetHotspotActiveUnderline 3311
-#define wxStyledTextCtrl_SetHotspotSingleLine 3312
-#define wxStyledTextCtrl_ParaDownExtend 3313
-#define wxStyledTextCtrl_ParaUp 3314
-#define wxStyledTextCtrl_ParaUpExtend 3315
-#define wxStyledTextCtrl_PositionBefore 3316
-#define wxStyledTextCtrl_PositionAfter 3317
-#define wxStyledTextCtrl_CopyRange 3318
-#define wxStyledTextCtrl_CopyText 3319
-#define wxStyledTextCtrl_SetSelectionMode 3320
-#define wxStyledTextCtrl_GetSelectionMode 3321
-#define wxStyledTextCtrl_LineDownRectExtend 3322
-#define wxStyledTextCtrl_LineUpRectExtend 3323
-#define wxStyledTextCtrl_CharLeftRectExtend 3324
-#define wxStyledTextCtrl_CharRightRectExtend 3325
-#define wxStyledTextCtrl_HomeRectExtend 3326
-#define wxStyledTextCtrl_VCHomeRectExtend 3327
-#define wxStyledTextCtrl_LineEndRectExtend 3328
-#define wxStyledTextCtrl_PageUpRectExtend 3329
-#define wxStyledTextCtrl_PageDownRectExtend 3330
-#define wxStyledTextCtrl_StutteredPageUp 3331
-#define wxStyledTextCtrl_StutteredPageUpExtend 3332
-#define wxStyledTextCtrl_StutteredPageDown 3333
-#define wxStyledTextCtrl_StutteredPageDownExtend 3334
-#define wxStyledTextCtrl_WordLeftEnd 3335
-#define wxStyledTextCtrl_WordLeftEndExtend 3336
-#define wxStyledTextCtrl_WordRightEnd 3337
-#define wxStyledTextCtrl_WordRightEndExtend 3338
-#define wxStyledTextCtrl_SetWhitespaceChars 3339
-#define wxStyledTextCtrl_SetCharsDefault 3340
-#define wxStyledTextCtrl_AutoCompGetCurrent 3341
-#define wxStyledTextCtrl_Allocate 3342
-#define wxStyledTextCtrl_FindColumn 3343
-#define wxStyledTextCtrl_GetCaretSticky 3344
-#define wxStyledTextCtrl_SetCaretSticky 3345
-#define wxStyledTextCtrl_ToggleCaretSticky 3346
-#define wxStyledTextCtrl_SetPasteConvertEndings 3347
-#define wxStyledTextCtrl_GetPasteConvertEndings 3348
-#define wxStyledTextCtrl_SelectionDuplicate 3349
-#define wxStyledTextCtrl_SetCaretLineBackAlpha 3350
-#define wxStyledTextCtrl_GetCaretLineBackAlpha 3351
-#define wxStyledTextCtrl_StartRecord 3352
-#define wxStyledTextCtrl_StopRecord 3353
-#define wxStyledTextCtrl_SetLexer 3354
-#define wxStyledTextCtrl_GetLexer 3355
-#define wxStyledTextCtrl_Colourise 3356
-#define wxStyledTextCtrl_SetProperty 3357
-#define wxStyledTextCtrl_SetKeyWords 3358
-#define wxStyledTextCtrl_SetLexerLanguage 3359
-#define wxStyledTextCtrl_GetProperty 3360
-#define wxStyledTextCtrl_GetStyleBitsNeeded 3361
-#define wxStyledTextCtrl_GetCurrentLine 3362
-#define wxStyledTextCtrl_StyleSetSpec 3363
-#define wxStyledTextCtrl_StyleSetFont 3364
-#define wxStyledTextCtrl_StyleSetFontAttr 3365
-#define wxStyledTextCtrl_StyleSetCharacterSet 3366
-#define wxStyledTextCtrl_StyleSetFontEncoding 3367
-#define wxStyledTextCtrl_CmdKeyExecute 3368
-#define wxStyledTextCtrl_SetMargins 3369
-#define wxStyledTextCtrl_GetSelection 3370
-#define wxStyledTextCtrl_PointFromPosition 3371
-#define wxStyledTextCtrl_ScrollToLine 3372
-#define wxStyledTextCtrl_ScrollToColumn 3373
-#define wxStyledTextCtrl_SetVScrollBar 3374
-#define wxStyledTextCtrl_SetHScrollBar 3375
-#define wxStyledTextCtrl_GetLastKeydownProcessed 3376
-#define wxStyledTextCtrl_SetLastKeydownProcessed 3377
-#define wxStyledTextCtrl_SaveFile 3378
-#define wxStyledTextCtrl_LoadFile 3379
-#define wxStyledTextCtrl_DoDragOver 3380
-#define wxStyledTextCtrl_DoDropText 3381
-#define wxStyledTextCtrl_GetUseAntiAliasing 3382
-#define wxStyledTextCtrl_AddTextRaw 3383
-#define wxStyledTextCtrl_InsertTextRaw 3384
-#define wxStyledTextCtrl_GetCurLineRaw 3385
-#define wxStyledTextCtrl_GetLineRaw 3386
-#define wxStyledTextCtrl_GetSelectedTextRaw 3387
-#define wxStyledTextCtrl_GetTextRangeRaw 3388
-#define wxStyledTextCtrl_SetTextRaw 3389
-#define wxStyledTextCtrl_GetTextRaw 3390
-#define wxStyledTextCtrl_AppendTextRaw 3391
-#define wxArtProvider_GetBitmap 3392
-#define wxArtProvider_GetIcon 3393
-#define wxTreeEvent_GetKeyCode 3394
-#define wxTreeEvent_GetItem 3395
-#define wxTreeEvent_GetKeyEvent 3396
-#define wxTreeEvent_GetLabel 3397
-#define wxTreeEvent_GetOldItem 3398
-#define wxTreeEvent_GetPoint 3399
-#define wxTreeEvent_IsEditCancelled 3400
-#define wxTreeEvent_SetToolTip 3401
-#define wxNotebookEvent_GetOldSelection 3402
-#define wxNotebookEvent_GetSelection 3403
-#define wxNotebookEvent_SetOldSelection 3404
-#define wxNotebookEvent_SetSelection 3405
-#define wxFileDataObject_new 3406
-#define wxFileDataObject_AddFile 3407
-#define wxFileDataObject_GetFilenames 3408
-#define wxFileDataObject_destroy 3409
-#define wxTextDataObject_new 3410
-#define wxTextDataObject_GetTextLength 3411
-#define wxTextDataObject_GetText 3412
-#define wxTextDataObject_SetText 3413
-#define wxTextDataObject_destroy 3414
-#define wxBitmapDataObject_new_1_1 3415
-#define wxBitmapDataObject_new_1_0 3416
-#define wxBitmapDataObject_GetBitmap 3417
-#define wxBitmapDataObject_SetBitmap 3418
-#define wxBitmapDataObject_destroy 3419
-#define wxClipboard_new 3421
-#define wxClipboard_destruct 3422
-#define wxClipboard_AddData 3423
-#define wxClipboard_Clear 3424
-#define wxClipboard_Close 3425
-#define wxClipboard_Flush 3426
-#define wxClipboard_GetData 3427
-#define wxClipboard_IsOpened 3428
-#define wxClipboard_Open 3429
-#define wxClipboard_SetData 3430
-#define wxClipboard_UsePrimarySelection 3432
-#define wxClipboard_IsSupported 3433
-#define wxClipboard_Get 3434
-#define wxSpinEvent_GetPosition 3435
-#define wxSpinEvent_SetPosition 3436
-#define wxSplitterWindow_new_0 3437
-#define wxSplitterWindow_new_2 3438
-#define wxSplitterWindow_destruct 3439
-#define wxSplitterWindow_Create 3440
-#define wxSplitterWindow_GetMinimumPaneSize 3441
-#define wxSplitterWindow_GetSashGravity 3442
-#define wxSplitterWindow_GetSashPosition 3443
-#define wxSplitterWindow_GetSplitMode 3444
-#define wxSplitterWindow_GetWindow1 3445
-#define wxSplitterWindow_GetWindow2 3446
-#define wxSplitterWindow_Initialize 3447
-#define wxSplitterWindow_IsSplit 3448
-#define wxSplitterWindow_ReplaceWindow 3449
-#define wxSplitterWindow_SetSashGravity 3450
-#define wxSplitterWindow_SetSashPosition 3451
-#define wxSplitterWindow_SetSashSize 3452
-#define wxSplitterWindow_SetMinimumPaneSize 3453
-#define wxSplitterWindow_SetSplitMode 3454
-#define wxSplitterWindow_SplitHorizontally 3455
-#define wxSplitterWindow_SplitVertically 3456
-#define wxSplitterWindow_Unsplit 3457
-#define wxSplitterWindow_UpdateSize 3458
-#define wxSplitterEvent_GetSashPosition 3459
-#define wxSplitterEvent_GetX 3460
-#define wxSplitterEvent_GetY 3461
-#define wxSplitterEvent_GetWindowBeingRemoved 3462
-#define wxSplitterEvent_SetSashPosition 3463
-#define wxHtmlWindow_new_0 3464
-#define wxHtmlWindow_new_2 3465
-#define wxHtmlWindow_AppendToPage 3466
-#define wxHtmlWindow_GetOpenedAnchor 3467
-#define wxHtmlWindow_GetOpenedPage 3468
-#define wxHtmlWindow_GetOpenedPageTitle 3469
-#define wxHtmlWindow_GetRelatedFrame 3470
-#define wxHtmlWindow_HistoryBack 3471
-#define wxHtmlWindow_HistoryCanBack 3472
-#define wxHtmlWindow_HistoryCanForward 3473
-#define wxHtmlWindow_HistoryClear 3474
-#define wxHtmlWindow_HistoryForward 3475
-#define wxHtmlWindow_LoadFile 3476
-#define wxHtmlWindow_LoadPage 3477
-#define wxHtmlWindow_SelectAll 3478
-#define wxHtmlWindow_SelectionToText 3479
-#define wxHtmlWindow_SelectLine 3480
-#define wxHtmlWindow_SelectWord 3481
-#define wxHtmlWindow_SetBorders 3482
-#define wxHtmlWindow_SetFonts 3483
-#define wxHtmlWindow_SetPage 3484
-#define wxHtmlWindow_SetRelatedFrame 3485
-#define wxHtmlWindow_SetRelatedStatusBar 3486
-#define wxHtmlWindow_ToText 3487
-#define wxHtmlWindow_destroy 3488
-#define wxHtmlLinkEvent_GetLinkInfo 3489
-#define wxSystemSettings_GetColour 3490
-#define wxSystemSettings_GetFont 3491
-#define wxSystemSettings_GetMetric 3492
-#define wxSystemSettings_GetScreenType 3493
-#define wxSystemOptions_GetOption 3494
-#define wxSystemOptions_GetOptionInt 3495
-#define wxSystemOptions_HasOption 3496
-#define wxSystemOptions_IsFalse 3497
-#define wxSystemOptions_SetOption_2_1 3498
-#define wxSystemOptions_SetOption_2_0 3499
-#define wxAuiNotebookEvent_SetSelection 3500
-#define wxAuiNotebookEvent_GetSelection 3501
-#define wxAuiNotebookEvent_SetOldSelection 3502
-#define wxAuiNotebookEvent_GetOldSelection 3503
-#define wxAuiNotebookEvent_SetDragSource 3504
-#define wxAuiNotebookEvent_GetDragSource 3505
-#define wxAuiManagerEvent_SetManager 3506
-#define wxAuiManagerEvent_GetManager 3507
-#define wxAuiManagerEvent_SetPane 3508
-#define wxAuiManagerEvent_GetPane 3509
-#define wxAuiManagerEvent_SetButton 3510
-#define wxAuiManagerEvent_GetButton 3511
-#define wxAuiManagerEvent_SetDC 3512
-#define wxAuiManagerEvent_GetDC 3513
-#define wxAuiManagerEvent_Veto 3514
-#define wxAuiManagerEvent_GetVeto 3515
-#define wxAuiManagerEvent_SetCanVeto 3516
-#define wxAuiManagerEvent_CanVeto 3517
-#define wxLogNull_new 3518
-#define wxLogNull_destroy 3519
-#define wxTaskBarIcon_new 3520
-#define wxTaskBarIcon_destruct 3521
-#define wxTaskBarIcon_PopupMenu 3522
-#define wxTaskBarIcon_RemoveIcon 3523
-#define wxTaskBarIcon_SetIcon 3524
+#define gdicmn_wxDisplaySize 2927
+#define gdicmn_wxSetCursor 2928
+#define wxPrintout_new 2929
+#define wxPrintout_destruct 2930
+#define wxPrintout_GetDC 2931
+#define wxPrintout_GetPageSizeMM 2932
+#define wxPrintout_GetPageSizePixels 2933
+#define wxPrintout_GetPaperRectPixels 2934
+#define wxPrintout_GetPPIPrinter 2935
+#define wxPrintout_GetPPIScreen 2936
+#define wxPrintout_GetTitle 2937
+#define wxPrintout_IsPreview 2938
+#define wxPrintout_FitThisSizeToPaper 2939
+#define wxPrintout_FitThisSizeToPage 2940
+#define wxPrintout_FitThisSizeToPageMargins 2941
+#define wxPrintout_MapScreenSizeToPaper 2942
+#define wxPrintout_MapScreenSizeToPage 2943
+#define wxPrintout_MapScreenSizeToPageMargins 2944
+#define wxPrintout_MapScreenSizeToDevice 2945
+#define wxPrintout_GetLogicalPaperRect 2946
+#define wxPrintout_GetLogicalPageRect 2947
+#define wxPrintout_GetLogicalPageMarginsRect 2948
+#define wxPrintout_SetLogicalOrigin 2949
+#define wxPrintout_OffsetLogicalOrigin 2950
+#define wxStyledTextCtrl_new_2 2951
+#define wxStyledTextCtrl_new_0 2952
+#define wxStyledTextCtrl_destruct 2953
+#define wxStyledTextCtrl_Create 2954
+#define wxStyledTextCtrl_AddText 2955
+#define wxStyledTextCtrl_AddStyledText 2956
+#define wxStyledTextCtrl_InsertText 2957
+#define wxStyledTextCtrl_ClearAll 2958
+#define wxStyledTextCtrl_ClearDocumentStyle 2959
+#define wxStyledTextCtrl_GetLength 2960
+#define wxStyledTextCtrl_GetCharAt 2961
+#define wxStyledTextCtrl_GetCurrentPos 2962
+#define wxStyledTextCtrl_GetAnchor 2963
+#define wxStyledTextCtrl_GetStyleAt 2964
+#define wxStyledTextCtrl_Redo 2965
+#define wxStyledTextCtrl_SetUndoCollection 2966
+#define wxStyledTextCtrl_SelectAll 2967
+#define wxStyledTextCtrl_SetSavePoint 2968
+#define wxStyledTextCtrl_GetStyledText 2969
+#define wxStyledTextCtrl_CanRedo 2970
+#define wxStyledTextCtrl_MarkerLineFromHandle 2971
+#define wxStyledTextCtrl_MarkerDeleteHandle 2972
+#define wxStyledTextCtrl_GetUndoCollection 2973
+#define wxStyledTextCtrl_GetViewWhiteSpace 2974
+#define wxStyledTextCtrl_SetViewWhiteSpace 2975
+#define wxStyledTextCtrl_PositionFromPoint 2976
+#define wxStyledTextCtrl_PositionFromPointClose 2977
+#define wxStyledTextCtrl_GotoLine 2978
+#define wxStyledTextCtrl_GotoPos 2979
+#define wxStyledTextCtrl_SetAnchor 2980
+#define wxStyledTextCtrl_GetCurLine 2981
+#define wxStyledTextCtrl_GetEndStyled 2982
+#define wxStyledTextCtrl_ConvertEOLs 2983
+#define wxStyledTextCtrl_GetEOLMode 2984
+#define wxStyledTextCtrl_SetEOLMode 2985
+#define wxStyledTextCtrl_StartStyling 2986
+#define wxStyledTextCtrl_SetStyling 2987
+#define wxStyledTextCtrl_GetBufferedDraw 2988
+#define wxStyledTextCtrl_SetBufferedDraw 2989
+#define wxStyledTextCtrl_SetTabWidth 2990
+#define wxStyledTextCtrl_GetTabWidth 2991
+#define wxStyledTextCtrl_SetCodePage 2992
+#define wxStyledTextCtrl_MarkerDefine 2993
+#define wxStyledTextCtrl_MarkerSetForeground 2994
+#define wxStyledTextCtrl_MarkerSetBackground 2995
+#define wxStyledTextCtrl_MarkerAdd 2996
+#define wxStyledTextCtrl_MarkerDelete 2997
+#define wxStyledTextCtrl_MarkerDeleteAll 2998
+#define wxStyledTextCtrl_MarkerGet 2999
+#define wxStyledTextCtrl_MarkerNext 3000
+#define wxStyledTextCtrl_MarkerPrevious 3001
+#define wxStyledTextCtrl_MarkerDefineBitmap 3002
+#define wxStyledTextCtrl_MarkerAddSet 3003
+#define wxStyledTextCtrl_MarkerSetAlpha 3004
+#define wxStyledTextCtrl_SetMarginType 3005
+#define wxStyledTextCtrl_GetMarginType 3006
+#define wxStyledTextCtrl_SetMarginWidth 3007
+#define wxStyledTextCtrl_GetMarginWidth 3008
+#define wxStyledTextCtrl_SetMarginMask 3009
+#define wxStyledTextCtrl_GetMarginMask 3010
+#define wxStyledTextCtrl_SetMarginSensitive 3011
+#define wxStyledTextCtrl_GetMarginSensitive 3012
+#define wxStyledTextCtrl_StyleClearAll 3013
+#define wxStyledTextCtrl_StyleSetForeground 3014
+#define wxStyledTextCtrl_StyleSetBackground 3015
+#define wxStyledTextCtrl_StyleSetBold 3016
+#define wxStyledTextCtrl_StyleSetItalic 3017
+#define wxStyledTextCtrl_StyleSetSize 3018
+#define wxStyledTextCtrl_StyleSetFaceName 3019
+#define wxStyledTextCtrl_StyleSetEOLFilled 3020
+#define wxStyledTextCtrl_StyleResetDefault 3021
+#define wxStyledTextCtrl_StyleSetUnderline 3022
+#define wxStyledTextCtrl_StyleSetCase 3023
+#define wxStyledTextCtrl_StyleSetHotSpot 3024
+#define wxStyledTextCtrl_SetSelForeground 3025
+#define wxStyledTextCtrl_SetSelBackground 3026
+#define wxStyledTextCtrl_GetSelAlpha 3027
+#define wxStyledTextCtrl_SetSelAlpha 3028
+#define wxStyledTextCtrl_SetCaretForeground 3029
+#define wxStyledTextCtrl_CmdKeyAssign 3030
+#define wxStyledTextCtrl_CmdKeyClear 3031
+#define wxStyledTextCtrl_CmdKeyClearAll 3032
+#define wxStyledTextCtrl_SetStyleBytes 3033
+#define wxStyledTextCtrl_StyleSetVisible 3034
+#define wxStyledTextCtrl_GetCaretPeriod 3035
+#define wxStyledTextCtrl_SetCaretPeriod 3036
+#define wxStyledTextCtrl_SetWordChars 3037
+#define wxStyledTextCtrl_BeginUndoAction 3038
+#define wxStyledTextCtrl_EndUndoAction 3039
+#define wxStyledTextCtrl_IndicatorSetStyle 3040
+#define wxStyledTextCtrl_IndicatorGetStyle 3041
+#define wxStyledTextCtrl_IndicatorSetForeground 3042
+#define wxStyledTextCtrl_IndicatorGetForeground 3043
+#define wxStyledTextCtrl_SetWhitespaceForeground 3044
+#define wxStyledTextCtrl_SetWhitespaceBackground 3045
+#define wxStyledTextCtrl_GetStyleBits 3046
+#define wxStyledTextCtrl_SetLineState 3047
+#define wxStyledTextCtrl_GetLineState 3048
+#define wxStyledTextCtrl_GetMaxLineState 3049
+#define wxStyledTextCtrl_GetCaretLineVisible 3050
+#define wxStyledTextCtrl_SetCaretLineVisible 3051
+#define wxStyledTextCtrl_GetCaretLineBackground 3052
+#define wxStyledTextCtrl_SetCaretLineBackground 3053
+#define wxStyledTextCtrl_AutoCompShow 3054
+#define wxStyledTextCtrl_AutoCompCancel 3055
+#define wxStyledTextCtrl_AutoCompActive 3056
+#define wxStyledTextCtrl_AutoCompPosStart 3057
+#define wxStyledTextCtrl_AutoCompComplete 3058
+#define wxStyledTextCtrl_AutoCompStops 3059
+#define wxStyledTextCtrl_AutoCompSetSeparator 3060
+#define wxStyledTextCtrl_AutoCompGetSeparator 3061
+#define wxStyledTextCtrl_AutoCompSelect 3062
+#define wxStyledTextCtrl_AutoCompSetCancelAtStart 3063
+#define wxStyledTextCtrl_AutoCompGetCancelAtStart 3064
+#define wxStyledTextCtrl_AutoCompSetFillUps 3065
+#define wxStyledTextCtrl_AutoCompSetChooseSingle 3066
+#define wxStyledTextCtrl_AutoCompGetChooseSingle 3067
+#define wxStyledTextCtrl_AutoCompSetIgnoreCase 3068
+#define wxStyledTextCtrl_AutoCompGetIgnoreCase 3069
+#define wxStyledTextCtrl_UserListShow 3070
+#define wxStyledTextCtrl_AutoCompSetAutoHide 3071
+#define wxStyledTextCtrl_AutoCompGetAutoHide 3072
+#define wxStyledTextCtrl_AutoCompSetDropRestOfWord 3073
+#define wxStyledTextCtrl_AutoCompGetDropRestOfWord 3074
+#define wxStyledTextCtrl_RegisterImage 3075
+#define wxStyledTextCtrl_ClearRegisteredImages 3076
+#define wxStyledTextCtrl_AutoCompGetTypeSeparator 3077
+#define wxStyledTextCtrl_AutoCompSetTypeSeparator 3078
+#define wxStyledTextCtrl_AutoCompSetMaxWidth 3079
+#define wxStyledTextCtrl_AutoCompGetMaxWidth 3080
+#define wxStyledTextCtrl_AutoCompSetMaxHeight 3081
+#define wxStyledTextCtrl_AutoCompGetMaxHeight 3082
+#define wxStyledTextCtrl_SetIndent 3083
+#define wxStyledTextCtrl_GetIndent 3084
+#define wxStyledTextCtrl_SetUseTabs 3085
+#define wxStyledTextCtrl_GetUseTabs 3086
+#define wxStyledTextCtrl_SetLineIndentation 3087
+#define wxStyledTextCtrl_GetLineIndentation 3088
+#define wxStyledTextCtrl_GetLineIndentPosition 3089
+#define wxStyledTextCtrl_GetColumn 3090
+#define wxStyledTextCtrl_SetUseHorizontalScrollBar 3091
+#define wxStyledTextCtrl_GetUseHorizontalScrollBar 3092
+#define wxStyledTextCtrl_SetIndentationGuides 3093
+#define wxStyledTextCtrl_GetIndentationGuides 3094
+#define wxStyledTextCtrl_SetHighlightGuide 3095
+#define wxStyledTextCtrl_GetHighlightGuide 3096
+#define wxStyledTextCtrl_GetLineEndPosition 3097
+#define wxStyledTextCtrl_GetCodePage 3098
+#define wxStyledTextCtrl_GetCaretForeground 3099
+#define wxStyledTextCtrl_GetReadOnly 3100
+#define wxStyledTextCtrl_SetCurrentPos 3101
+#define wxStyledTextCtrl_SetSelectionStart 3102
+#define wxStyledTextCtrl_GetSelectionStart 3103
+#define wxStyledTextCtrl_SetSelectionEnd 3104
+#define wxStyledTextCtrl_GetSelectionEnd 3105
+#define wxStyledTextCtrl_SetPrintMagnification 3106
+#define wxStyledTextCtrl_GetPrintMagnification 3107
+#define wxStyledTextCtrl_SetPrintColourMode 3108
+#define wxStyledTextCtrl_GetPrintColourMode 3109
+#define wxStyledTextCtrl_FindText 3110
+#define wxStyledTextCtrl_FormatRange 3111
+#define wxStyledTextCtrl_GetFirstVisibleLine 3112
+#define wxStyledTextCtrl_GetLine 3113
+#define wxStyledTextCtrl_GetLineCount 3114
+#define wxStyledTextCtrl_SetMarginLeft 3115
+#define wxStyledTextCtrl_GetMarginLeft 3116
+#define wxStyledTextCtrl_SetMarginRight 3117
+#define wxStyledTextCtrl_GetMarginRight 3118
+#define wxStyledTextCtrl_GetModify 3119
+#define wxStyledTextCtrl_SetSelection 3120
+#define wxStyledTextCtrl_GetSelectedText 3121
+#define wxStyledTextCtrl_GetTextRange 3122
+#define wxStyledTextCtrl_HideSelection 3123
+#define wxStyledTextCtrl_LineFromPosition 3124
+#define wxStyledTextCtrl_PositionFromLine 3125
+#define wxStyledTextCtrl_LineScroll 3126
+#define wxStyledTextCtrl_EnsureCaretVisible 3127
+#define wxStyledTextCtrl_ReplaceSelection 3128
+#define wxStyledTextCtrl_SetReadOnly 3129
+#define wxStyledTextCtrl_CanPaste 3130
+#define wxStyledTextCtrl_CanUndo 3131
+#define wxStyledTextCtrl_EmptyUndoBuffer 3132
+#define wxStyledTextCtrl_Undo 3133
+#define wxStyledTextCtrl_Cut 3134
+#define wxStyledTextCtrl_Copy 3135
+#define wxStyledTextCtrl_Paste 3136
+#define wxStyledTextCtrl_Clear 3137
+#define wxStyledTextCtrl_SetText 3138
+#define wxStyledTextCtrl_GetText 3139
+#define wxStyledTextCtrl_GetTextLength 3140
+#define wxStyledTextCtrl_GetOvertype 3141
+#define wxStyledTextCtrl_SetCaretWidth 3142
+#define wxStyledTextCtrl_GetCaretWidth 3143
+#define wxStyledTextCtrl_SetTargetStart 3144
+#define wxStyledTextCtrl_GetTargetStart 3145
+#define wxStyledTextCtrl_SetTargetEnd 3146
+#define wxStyledTextCtrl_GetTargetEnd 3147
+#define wxStyledTextCtrl_ReplaceTarget 3148
+#define wxStyledTextCtrl_SearchInTarget 3149
+#define wxStyledTextCtrl_SetSearchFlags 3150
+#define wxStyledTextCtrl_GetSearchFlags 3151
+#define wxStyledTextCtrl_CallTipShow 3152
+#define wxStyledTextCtrl_CallTipCancel 3153
+#define wxStyledTextCtrl_CallTipActive 3154
+#define wxStyledTextCtrl_CallTipPosAtStart 3155
+#define wxStyledTextCtrl_CallTipSetHighlight 3156
+#define wxStyledTextCtrl_CallTipSetBackground 3157
+#define wxStyledTextCtrl_CallTipSetForeground 3158
+#define wxStyledTextCtrl_CallTipSetForegroundHighlight 3159
+#define wxStyledTextCtrl_CallTipUseStyle 3160
+#define wxStyledTextCtrl_VisibleFromDocLine 3161
+#define wxStyledTextCtrl_DocLineFromVisible 3162
+#define wxStyledTextCtrl_WrapCount 3163
+#define wxStyledTextCtrl_SetFoldLevel 3164
+#define wxStyledTextCtrl_GetFoldLevel 3165
+#define wxStyledTextCtrl_GetLastChild 3166
+#define wxStyledTextCtrl_GetFoldParent 3167
+#define wxStyledTextCtrl_ShowLines 3168
+#define wxStyledTextCtrl_HideLines 3169
+#define wxStyledTextCtrl_GetLineVisible 3170
+#define wxStyledTextCtrl_SetFoldExpanded 3171
+#define wxStyledTextCtrl_GetFoldExpanded 3172
+#define wxStyledTextCtrl_ToggleFold 3173
+#define wxStyledTextCtrl_EnsureVisible 3174
+#define wxStyledTextCtrl_SetFoldFlags 3175
+#define wxStyledTextCtrl_EnsureVisibleEnforcePolicy 3176
+#define wxStyledTextCtrl_SetTabIndents 3177
+#define wxStyledTextCtrl_GetTabIndents 3178
+#define wxStyledTextCtrl_SetBackSpaceUnIndents 3179
+#define wxStyledTextCtrl_GetBackSpaceUnIndents 3180
+#define wxStyledTextCtrl_SetMouseDwellTime 3181
+#define wxStyledTextCtrl_GetMouseDwellTime 3182
+#define wxStyledTextCtrl_WordStartPosition 3183
+#define wxStyledTextCtrl_WordEndPosition 3184
+#define wxStyledTextCtrl_SetWrapMode 3185
+#define wxStyledTextCtrl_GetWrapMode 3186
+#define wxStyledTextCtrl_SetWrapVisualFlags 3187
+#define wxStyledTextCtrl_GetWrapVisualFlags 3188
+#define wxStyledTextCtrl_SetWrapVisualFlagsLocation 3189
+#define wxStyledTextCtrl_GetWrapVisualFlagsLocation 3190
+#define wxStyledTextCtrl_SetWrapStartIndent 3191
+#define wxStyledTextCtrl_GetWrapStartIndent 3192
+#define wxStyledTextCtrl_SetLayoutCache 3193
+#define wxStyledTextCtrl_GetLayoutCache 3194
+#define wxStyledTextCtrl_SetScrollWidth 3195
+#define wxStyledTextCtrl_GetScrollWidth 3196
+#define wxStyledTextCtrl_TextWidth 3197
+#define wxStyledTextCtrl_GetEndAtLastLine 3198
+#define wxStyledTextCtrl_TextHeight 3199
+#define wxStyledTextCtrl_SetUseVerticalScrollBar 3200
+#define wxStyledTextCtrl_GetUseVerticalScrollBar 3201
+#define wxStyledTextCtrl_AppendText 3202
+#define wxStyledTextCtrl_GetTwoPhaseDraw 3203
+#define wxStyledTextCtrl_SetTwoPhaseDraw 3204
+#define wxStyledTextCtrl_TargetFromSelection 3205
+#define wxStyledTextCtrl_LinesJoin 3206
+#define wxStyledTextCtrl_LinesSplit 3207
+#define wxStyledTextCtrl_SetFoldMarginColour 3208
+#define wxStyledTextCtrl_SetFoldMarginHiColour 3209
+#define wxStyledTextCtrl_LineDown 3210
+#define wxStyledTextCtrl_LineDownExtend 3211
+#define wxStyledTextCtrl_LineUp 3212
+#define wxStyledTextCtrl_LineUpExtend 3213
+#define wxStyledTextCtrl_CharLeft 3214
+#define wxStyledTextCtrl_CharLeftExtend 3215
+#define wxStyledTextCtrl_CharRight 3216
+#define wxStyledTextCtrl_CharRightExtend 3217
+#define wxStyledTextCtrl_WordLeft 3218
+#define wxStyledTextCtrl_WordLeftExtend 3219
+#define wxStyledTextCtrl_WordRight 3220
+#define wxStyledTextCtrl_WordRightExtend 3221
+#define wxStyledTextCtrl_Home 3222
+#define wxStyledTextCtrl_HomeExtend 3223
+#define wxStyledTextCtrl_LineEnd 3224
+#define wxStyledTextCtrl_LineEndExtend 3225
+#define wxStyledTextCtrl_DocumentStart 3226
+#define wxStyledTextCtrl_DocumentStartExtend 3227
+#define wxStyledTextCtrl_DocumentEnd 3228
+#define wxStyledTextCtrl_DocumentEndExtend 3229
+#define wxStyledTextCtrl_PageUp 3230
+#define wxStyledTextCtrl_PageUpExtend 3231
+#define wxStyledTextCtrl_PageDown 3232
+#define wxStyledTextCtrl_PageDownExtend 3233
+#define wxStyledTextCtrl_EditToggleOvertype 3234
+#define wxStyledTextCtrl_Cancel 3235
+#define wxStyledTextCtrl_DeleteBack 3236
+#define wxStyledTextCtrl_Tab 3237
+#define wxStyledTextCtrl_BackTab 3238
+#define wxStyledTextCtrl_NewLine 3239
+#define wxStyledTextCtrl_FormFeed 3240
+#define wxStyledTextCtrl_VCHome 3241
+#define wxStyledTextCtrl_VCHomeExtend 3242
+#define wxStyledTextCtrl_ZoomIn 3243
+#define wxStyledTextCtrl_ZoomOut 3244
+#define wxStyledTextCtrl_DelWordLeft 3245
+#define wxStyledTextCtrl_DelWordRight 3246
+#define wxStyledTextCtrl_LineCut 3247
+#define wxStyledTextCtrl_LineDelete 3248
+#define wxStyledTextCtrl_LineTranspose 3249
+#define wxStyledTextCtrl_LineDuplicate 3250
+#define wxStyledTextCtrl_LowerCase 3251
+#define wxStyledTextCtrl_UpperCase 3252
+#define wxStyledTextCtrl_LineScrollDown 3253
+#define wxStyledTextCtrl_LineScrollUp 3254
+#define wxStyledTextCtrl_DeleteBackNotLine 3255
+#define wxStyledTextCtrl_HomeDisplay 3256
+#define wxStyledTextCtrl_HomeDisplayExtend 3257
+#define wxStyledTextCtrl_LineEndDisplay 3258
+#define wxStyledTextCtrl_LineEndDisplayExtend 3259
+#define wxStyledTextCtrl_HomeWrapExtend 3260
+#define wxStyledTextCtrl_LineEndWrap 3261
+#define wxStyledTextCtrl_LineEndWrapExtend 3262
+#define wxStyledTextCtrl_VCHomeWrap 3263
+#define wxStyledTextCtrl_VCHomeWrapExtend 3264
+#define wxStyledTextCtrl_LineCopy 3265
+#define wxStyledTextCtrl_MoveCaretInsideView 3266
+#define wxStyledTextCtrl_LineLength 3267
+#define wxStyledTextCtrl_BraceHighlight 3268
+#define wxStyledTextCtrl_BraceBadLight 3269
+#define wxStyledTextCtrl_BraceMatch 3270
+#define wxStyledTextCtrl_GetViewEOL 3271
+#define wxStyledTextCtrl_SetViewEOL 3272
+#define wxStyledTextCtrl_SetModEventMask 3273
+#define wxStyledTextCtrl_GetEdgeColumn 3274
+#define wxStyledTextCtrl_SetEdgeColumn 3275
+#define wxStyledTextCtrl_SetEdgeMode 3276
+#define wxStyledTextCtrl_GetEdgeMode 3277
+#define wxStyledTextCtrl_GetEdgeColour 3278
+#define wxStyledTextCtrl_SetEdgeColour 3279
+#define wxStyledTextCtrl_SearchAnchor 3280
+#define wxStyledTextCtrl_SearchNext 3281
+#define wxStyledTextCtrl_SearchPrev 3282
+#define wxStyledTextCtrl_LinesOnScreen 3283
+#define wxStyledTextCtrl_UsePopUp 3284
+#define wxStyledTextCtrl_SelectionIsRectangle 3285
+#define wxStyledTextCtrl_SetZoom 3286
+#define wxStyledTextCtrl_GetZoom 3287
+#define wxStyledTextCtrl_GetModEventMask 3288
+#define wxStyledTextCtrl_SetSTCFocus 3289
+#define wxStyledTextCtrl_GetSTCFocus 3290
+#define wxStyledTextCtrl_SetStatus 3291
+#define wxStyledTextCtrl_GetStatus 3292
+#define wxStyledTextCtrl_SetMouseDownCaptures 3293
+#define wxStyledTextCtrl_GetMouseDownCaptures 3294
+#define wxStyledTextCtrl_SetSTCCursor 3295
+#define wxStyledTextCtrl_GetSTCCursor 3296
+#define wxStyledTextCtrl_SetControlCharSymbol 3297
+#define wxStyledTextCtrl_GetControlCharSymbol 3298
+#define wxStyledTextCtrl_WordPartLeft 3299
+#define wxStyledTextCtrl_WordPartLeftExtend 3300
+#define wxStyledTextCtrl_WordPartRight 3301
+#define wxStyledTextCtrl_WordPartRightExtend 3302
+#define wxStyledTextCtrl_SetVisiblePolicy 3303
+#define wxStyledTextCtrl_DelLineLeft 3304
+#define wxStyledTextCtrl_DelLineRight 3305
+#define wxStyledTextCtrl_GetXOffset 3306
+#define wxStyledTextCtrl_ChooseCaretX 3307
+#define wxStyledTextCtrl_SetXCaretPolicy 3308
+#define wxStyledTextCtrl_SetYCaretPolicy 3309
+#define wxStyledTextCtrl_GetPrintWrapMode 3310
+#define wxStyledTextCtrl_SetHotspotActiveForeground 3311
+#define wxStyledTextCtrl_SetHotspotActiveBackground 3312
+#define wxStyledTextCtrl_SetHotspotActiveUnderline 3313
+#define wxStyledTextCtrl_SetHotspotSingleLine 3314
+#define wxStyledTextCtrl_ParaDownExtend 3315
+#define wxStyledTextCtrl_ParaUp 3316
+#define wxStyledTextCtrl_ParaUpExtend 3317
+#define wxStyledTextCtrl_PositionBefore 3318
+#define wxStyledTextCtrl_PositionAfter 3319
+#define wxStyledTextCtrl_CopyRange 3320
+#define wxStyledTextCtrl_CopyText 3321
+#define wxStyledTextCtrl_SetSelectionMode 3322
+#define wxStyledTextCtrl_GetSelectionMode 3323
+#define wxStyledTextCtrl_LineDownRectExtend 3324
+#define wxStyledTextCtrl_LineUpRectExtend 3325
+#define wxStyledTextCtrl_CharLeftRectExtend 3326
+#define wxStyledTextCtrl_CharRightRectExtend 3327
+#define wxStyledTextCtrl_HomeRectExtend 3328
+#define wxStyledTextCtrl_VCHomeRectExtend 3329
+#define wxStyledTextCtrl_LineEndRectExtend 3330
+#define wxStyledTextCtrl_PageUpRectExtend 3331
+#define wxStyledTextCtrl_PageDownRectExtend 3332
+#define wxStyledTextCtrl_StutteredPageUp 3333
+#define wxStyledTextCtrl_StutteredPageUpExtend 3334
+#define wxStyledTextCtrl_StutteredPageDown 3335
+#define wxStyledTextCtrl_StutteredPageDownExtend 3336
+#define wxStyledTextCtrl_WordLeftEnd 3337
+#define wxStyledTextCtrl_WordLeftEndExtend 3338
+#define wxStyledTextCtrl_WordRightEnd 3339
+#define wxStyledTextCtrl_WordRightEndExtend 3340
+#define wxStyledTextCtrl_SetWhitespaceChars 3341
+#define wxStyledTextCtrl_SetCharsDefault 3342
+#define wxStyledTextCtrl_AutoCompGetCurrent 3343
+#define wxStyledTextCtrl_Allocate 3344
+#define wxStyledTextCtrl_FindColumn 3345
+#define wxStyledTextCtrl_GetCaretSticky 3346
+#define wxStyledTextCtrl_SetCaretSticky 3347
+#define wxStyledTextCtrl_ToggleCaretSticky 3348
+#define wxStyledTextCtrl_SetPasteConvertEndings 3349
+#define wxStyledTextCtrl_GetPasteConvertEndings 3350
+#define wxStyledTextCtrl_SelectionDuplicate 3351
+#define wxStyledTextCtrl_SetCaretLineBackAlpha 3352
+#define wxStyledTextCtrl_GetCaretLineBackAlpha 3353
+#define wxStyledTextCtrl_StartRecord 3354
+#define wxStyledTextCtrl_StopRecord 3355
+#define wxStyledTextCtrl_SetLexer 3356
+#define wxStyledTextCtrl_GetLexer 3357
+#define wxStyledTextCtrl_Colourise 3358
+#define wxStyledTextCtrl_SetProperty 3359
+#define wxStyledTextCtrl_SetKeyWords 3360
+#define wxStyledTextCtrl_SetLexerLanguage 3361
+#define wxStyledTextCtrl_GetProperty 3362
+#define wxStyledTextCtrl_GetStyleBitsNeeded 3363
+#define wxStyledTextCtrl_GetCurrentLine 3364
+#define wxStyledTextCtrl_StyleSetSpec 3365
+#define wxStyledTextCtrl_StyleSetFont 3366
+#define wxStyledTextCtrl_StyleSetFontAttr 3367
+#define wxStyledTextCtrl_StyleSetCharacterSet 3368
+#define wxStyledTextCtrl_StyleSetFontEncoding 3369
+#define wxStyledTextCtrl_CmdKeyExecute 3370
+#define wxStyledTextCtrl_SetMargins 3371
+#define wxStyledTextCtrl_GetSelection 3372
+#define wxStyledTextCtrl_PointFromPosition 3373
+#define wxStyledTextCtrl_ScrollToLine 3374
+#define wxStyledTextCtrl_ScrollToColumn 3375
+#define wxStyledTextCtrl_SetVScrollBar 3376
+#define wxStyledTextCtrl_SetHScrollBar 3377
+#define wxStyledTextCtrl_GetLastKeydownProcessed 3378
+#define wxStyledTextCtrl_SetLastKeydownProcessed 3379
+#define wxStyledTextCtrl_SaveFile 3380
+#define wxStyledTextCtrl_LoadFile 3381
+#define wxStyledTextCtrl_DoDragOver 3382
+#define wxStyledTextCtrl_DoDropText 3383
+#define wxStyledTextCtrl_GetUseAntiAliasing 3384
+#define wxStyledTextCtrl_AddTextRaw 3385
+#define wxStyledTextCtrl_InsertTextRaw 3386
+#define wxStyledTextCtrl_GetCurLineRaw 3387
+#define wxStyledTextCtrl_GetLineRaw 3388
+#define wxStyledTextCtrl_GetSelectedTextRaw 3389
+#define wxStyledTextCtrl_GetTextRangeRaw 3390
+#define wxStyledTextCtrl_SetTextRaw 3391
+#define wxStyledTextCtrl_GetTextRaw 3392
+#define wxStyledTextCtrl_AppendTextRaw 3393
+#define wxArtProvider_GetBitmap 3394
+#define wxArtProvider_GetIcon 3395
+#define wxTreeEvent_GetKeyCode 3396
+#define wxTreeEvent_GetItem 3397
+#define wxTreeEvent_GetKeyEvent 3398
+#define wxTreeEvent_GetLabel 3399
+#define wxTreeEvent_GetOldItem 3400
+#define wxTreeEvent_GetPoint 3401
+#define wxTreeEvent_IsEditCancelled 3402
+#define wxTreeEvent_SetToolTip 3403
+#define wxNotebookEvent_GetOldSelection 3404
+#define wxNotebookEvent_GetSelection 3405
+#define wxNotebookEvent_SetOldSelection 3406
+#define wxNotebookEvent_SetSelection 3407
+#define wxFileDataObject_new 3408
+#define wxFileDataObject_AddFile 3409
+#define wxFileDataObject_GetFilenames 3410
+#define wxFileDataObject_destroy 3411
+#define wxTextDataObject_new 3412
+#define wxTextDataObject_GetTextLength 3413
+#define wxTextDataObject_GetText 3414
+#define wxTextDataObject_SetText 3415
+#define wxTextDataObject_destroy 3416
+#define wxBitmapDataObject_new_1_1 3417
+#define wxBitmapDataObject_new_1_0 3418
+#define wxBitmapDataObject_GetBitmap 3419
+#define wxBitmapDataObject_SetBitmap 3420
+#define wxBitmapDataObject_destroy 3421
+#define wxClipboard_new 3423
+#define wxClipboard_destruct 3424
+#define wxClipboard_AddData 3425
+#define wxClipboard_Clear 3426
+#define wxClipboard_Close 3427
+#define wxClipboard_Flush 3428
+#define wxClipboard_GetData 3429
+#define wxClipboard_IsOpened 3430
+#define wxClipboard_Open 3431
+#define wxClipboard_SetData 3432
+#define wxClipboard_UsePrimarySelection 3434
+#define wxClipboard_IsSupported 3435
+#define wxClipboard_Get 3436
+#define wxSpinEvent_GetPosition 3437
+#define wxSpinEvent_SetPosition 3438
+#define wxSplitterWindow_new_0 3439
+#define wxSplitterWindow_new_2 3440
+#define wxSplitterWindow_destruct 3441
+#define wxSplitterWindow_Create 3442
+#define wxSplitterWindow_GetMinimumPaneSize 3443
+#define wxSplitterWindow_GetSashGravity 3444
+#define wxSplitterWindow_GetSashPosition 3445
+#define wxSplitterWindow_GetSplitMode 3446
+#define wxSplitterWindow_GetWindow1 3447
+#define wxSplitterWindow_GetWindow2 3448
+#define wxSplitterWindow_Initialize 3449
+#define wxSplitterWindow_IsSplit 3450
+#define wxSplitterWindow_ReplaceWindow 3451
+#define wxSplitterWindow_SetSashGravity 3452
+#define wxSplitterWindow_SetSashPosition 3453
+#define wxSplitterWindow_SetSashSize 3454
+#define wxSplitterWindow_SetMinimumPaneSize 3455
+#define wxSplitterWindow_SetSplitMode 3456
+#define wxSplitterWindow_SplitHorizontally 3457
+#define wxSplitterWindow_SplitVertically 3458
+#define wxSplitterWindow_Unsplit 3459
+#define wxSplitterWindow_UpdateSize 3460
+#define wxSplitterEvent_GetSashPosition 3461
+#define wxSplitterEvent_GetX 3462
+#define wxSplitterEvent_GetY 3463
+#define wxSplitterEvent_GetWindowBeingRemoved 3464
+#define wxSplitterEvent_SetSashPosition 3465
+#define wxHtmlWindow_new_0 3466
+#define wxHtmlWindow_new_2 3467
+#define wxHtmlWindow_AppendToPage 3468
+#define wxHtmlWindow_GetOpenedAnchor 3469
+#define wxHtmlWindow_GetOpenedPage 3470
+#define wxHtmlWindow_GetOpenedPageTitle 3471
+#define wxHtmlWindow_GetRelatedFrame 3472
+#define wxHtmlWindow_HistoryBack 3473
+#define wxHtmlWindow_HistoryCanBack 3474
+#define wxHtmlWindow_HistoryCanForward 3475
+#define wxHtmlWindow_HistoryClear 3476
+#define wxHtmlWindow_HistoryForward 3477
+#define wxHtmlWindow_LoadFile 3478
+#define wxHtmlWindow_LoadPage 3479
+#define wxHtmlWindow_SelectAll 3480
+#define wxHtmlWindow_SelectionToText 3481
+#define wxHtmlWindow_SelectLine 3482
+#define wxHtmlWindow_SelectWord 3483
+#define wxHtmlWindow_SetBorders 3484
+#define wxHtmlWindow_SetFonts 3485
+#define wxHtmlWindow_SetPage 3486
+#define wxHtmlWindow_SetRelatedFrame 3487
+#define wxHtmlWindow_SetRelatedStatusBar 3488
+#define wxHtmlWindow_ToText 3489
+#define wxHtmlWindow_destroy 3490
+#define wxHtmlLinkEvent_GetLinkInfo 3491
+#define wxSystemSettings_GetColour 3492
+#define wxSystemSettings_GetFont 3493
+#define wxSystemSettings_GetMetric 3494
+#define wxSystemSettings_GetScreenType 3495
+#define wxSystemOptions_GetOption 3496
+#define wxSystemOptions_GetOptionInt 3497
+#define wxSystemOptions_HasOption 3498
+#define wxSystemOptions_IsFalse 3499
+#define wxSystemOptions_SetOption_2_1 3500
+#define wxSystemOptions_SetOption_2_0 3501
+#define wxAuiNotebookEvent_SetSelection 3502
+#define wxAuiNotebookEvent_GetSelection 3503
+#define wxAuiNotebookEvent_SetOldSelection 3504
+#define wxAuiNotebookEvent_GetOldSelection 3505
+#define wxAuiNotebookEvent_SetDragSource 3506
+#define wxAuiNotebookEvent_GetDragSource 3507
+#define wxAuiManagerEvent_SetManager 3508
+#define wxAuiManagerEvent_GetManager 3509
+#define wxAuiManagerEvent_SetPane 3510
+#define wxAuiManagerEvent_GetPane 3511
+#define wxAuiManagerEvent_SetButton 3512
+#define wxAuiManagerEvent_GetButton 3513
+#define wxAuiManagerEvent_SetDC 3514
+#define wxAuiManagerEvent_GetDC 3515
+#define wxAuiManagerEvent_Veto 3516
+#define wxAuiManagerEvent_GetVeto 3517
+#define wxAuiManagerEvent_SetCanVeto 3518
+#define wxAuiManagerEvent_CanVeto 3519
+#define wxLogNull_new 3520
+#define wxLogNull_destroy 3521
+#define wxTaskBarIcon_new 3522
+#define wxTaskBarIcon_destruct 3523
+#define wxTaskBarIcon_PopupMenu 3524
+#define wxTaskBarIcon_RemoveIcon 3525
+#define wxTaskBarIcon_SetIcon 3526
+#define wxLocale_new_0 3527
+#define wxLocale_new_2 3529
+#define wxLocale_destruct 3530
+#define wxLocale_Init 3532
+#define wxLocale_AddCatalog_1 3533
+#define wxLocale_AddCatalog_3 3534
+#define wxLocale_AddCatalogLookupPathPrefix 3535
+#define wxLocale_GetCanonicalName 3536
+#define wxLocale_GetLanguage 3537
+#define wxLocale_GetLanguageName 3538
+#define wxLocale_GetLocale 3539
+#define wxLocale_GetName 3540
+#define wxLocale_GetString_2 3541
+#define wxLocale_GetString_4 3542
+#define wxLocale_GetHeaderValue 3543
+#define wxLocale_GetSysName 3544
+#define wxLocale_GetSystemEncoding 3545
+#define wxLocale_GetSystemEncodingName 3546
+#define wxLocale_GetSystemLanguage 3547
+#define wxLocale_IsLoaded 3548
+#define wxLocale_IsOk 3549
diff --git a/lib/wx/c_src/wxePrintout.cpp b/lib/wx/c_src/wxe_callback_impl.cpp
index fc8782ba95..3a59004eb0 100644
--- a/lib/wx/c_src/wxePrintout.cpp
+++ b/lib/wx/c_src/wxe_callback_impl.cpp
@@ -1,7 +1,7 @@
/*
* %CopyrightBegin%
*
- * Copyright Ericsson AB 2008-2013. All Rights Reserved.
+ * Copyright Ericsson AB 2008-2014. All Rights Reserved.
*
* The contents of this file are subject to the Erlang Public License,
* Version 1.1, (the "License"); you may not use this file except in
@@ -20,9 +20,60 @@
#include <wx/wx.h>
#include "wxe_impl.h"
#include "wxe_return.h"
+#include "wxe_events.h"
+#include "wxe_gl.h"
#include "gen/wxe_macros.h"
#include "gen/wxe_derived_dest.h"
+
+/* ****************************************************************************
+ * CallbackData *
+ * ****************************************************************************/
+
+wxeEvtListener::wxeEvtListener(ErlDrvTermData caller, int req, char *req_type,
+ int funcb, int skip_ev, wxeErlTerm * userData,
+ ErlDrvTermData from_port)
+ : wxEvtHandler()
+{
+ port=from_port;
+ listener = caller;
+ obj = req;
+ fun_id = funcb;
+ strcpy(class_name, req_type);
+ skip = skip_ev;
+ user_data = userData;
+}
+
+wxeEvtListener::~wxeEvtListener() {
+ // fprintf(stderr, "CBD Deleteing %p %s\r\n", this, class_name); fflush(stderr);
+ if(user_data) {
+ delete user_data;
+ }
+ ptrMap::iterator it;
+ it = ((WxeApp *)wxTheApp)->ptr2ref.find(this);
+ if(it != ((WxeApp *)wxTheApp)->ptr2ref.end()) {
+ wxeRefData *refd = it->second;
+ wxeReturn rt = wxeReturn(WXE_DRV_PORT, refd->memenv->owner, false);
+ rt.addAtom("wx_delete_cb");
+ rt.addInt(fun_id);
+ rt.addRef(refd->ref, "wxeEvtListener");
+ rt.addRef(obj, class_name);
+ rt.addTupleCount(4);
+ rt.send();
+ }
+ ((WxeApp *)wxTheApp)->clearPtr(this);
+}
+
+void wxeEvtListener::forward(wxEvent& event)
+{
+#ifdef DEBUG
+ if(!sendevent(&event, port))
+ fprintf(stderr, "Couldn't send event!\r\n");
+#else
+sendevent(&event, port);
+#endif
+}
+
/* *****************************************************************/
/* Special Class impls */
@@ -228,6 +279,35 @@ EwxListCtrl::~EwxListCtrl() {
clear_cb(port, onGetItemColumnImage);
((WxeApp *)wxTheApp)->clearPtr(this);
}
+
+/* ****************************************************************************
+ * wxListCtrlCompare wrapper
+ * ****************************************************************************/
+
+int wxCALLBACK wxEListCtrlCompare(wxeIntPtr item1, wxeIntPtr item2, wxeIntPtr callbackInfoPtr)
+{
+ callbackInfo * cb = (callbackInfo *)callbackInfoPtr;
+ wxeMemEnv * memenv = ((WxeApp *) wxTheApp)->getMemEnv(cb->port);
+ wxeReturn rt = wxeReturn(WXE_DRV_PORT, memenv->owner, false);
+ rt.addInt(cb->callbackID);
+ rt.addInt(item1);
+ rt.addInt(item2);
+ rt.endList(2);
+ rt.addAtom("_wx_invoke_cb_");
+ rt.addTupleCount(3);
+ rt.send();
+ handle_event_callback(WXE_DRV_PORT_HANDLE, memenv->owner);
+
+ if(((WxeApp *) wxTheApp)->cb_buff) {
+ int res = * (int*) ((WxeApp *) wxTheApp)->cb_buff;
+ driver_free(((WxeApp *) wxTheApp)->cb_buff);
+ ((WxeApp *) wxTheApp)->cb_buff = NULL;
+ return res;
+ }
+ return 0;
+}
+
+
// tools
void clear_cb(ErlDrvTermData port, int callback)
diff --git a/lib/wx/c_src/wxe_callback_impl.h b/lib/wx/c_src/wxe_callback_impl.h
new file mode 100644
index 0000000000..ecfcd3db41
--- /dev/null
+++ b/lib/wx/c_src/wxe_callback_impl.h
@@ -0,0 +1,100 @@
+/*
+ * %CopyrightBegin%
+ *
+ * Copyright Ericsson AB 2014. 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%
+ */
+
+#ifndef _WXE_CALLBACK_IMPL_H
+#define _WXE_CALLBACK_IMPL_H
+
+void pre_callback();
+void handle_event_callback(ErlDrvPort port, ErlDrvTermData process);
+
+#if wxCHECK_VERSION(2,9,0)
+ #define wxeIntPtr wxIntPtr
+#else
+ // This is bad but how it was in wx-2.8
+ #define wxeIntPtr long
+#endif
+
+/* Fun Callback id */
+class wxeEvtListener : public wxEvtHandler
+{
+public:
+ wxeEvtListener(ErlDrvTermData caller, int req, char *req_type,
+ int funcb, int skip_ev, wxeErlTerm * userData,
+ ErlDrvTermData Thisport);
+ ~wxeEvtListener();
+ void forward(wxEvent& event);
+ ErlDrvTermData port;
+ ErlDrvTermData listener;
+ int fun_id;
+ int obj;
+ char class_name[40];
+ int skip;
+ wxeErlTerm * user_data;
+};
+
+class wxEPrintout : public wxPrintout
+{
+ public:
+ wxEPrintout(wxString Title, int onPrintP, int onPrepareP,
+ int onBeginP, int onEndP,
+ int onBeginD, int onEndD,
+ int hasP, int getPageI, ErlDrvTermData Port) :
+ wxPrintout(Title),
+ onPrintPage(onPrintP), onPreparePrinting(onPrepareP),
+ onBeginPrinting(onBeginP), onEndPrinting(onEndP),
+ onBeginDocument(onBeginD), onEndDocument(onEndD), hasPage(hasP), getPageInfo(getPageI),
+ port(Port)
+ { } ;
+
+ ~wxEPrintout();
+
+ bool OnBeginDocument(int startPage, int endPage);
+ void OnEndDocument();
+ void OnBeginPrinting();
+ void OnEndPrinting();
+
+ void OnPreparePrinting();
+
+ bool HasPage(int page);
+ bool OnPrintPage(int page);
+ void GetPageInfo(int *minPage, int *maxPage, int *pageFrom, int *pageTo);
+
+ int onPrintPage;
+ int onPreparePrinting;
+ int onBeginPrinting;
+ int onEndPrinting;
+ int onBeginDocument;
+ int onEndDocument;
+ int hasPage;
+ int getPageInfo;
+
+ ErlDrvTermData port;
+};
+
+void clear_cb(ErlDrvTermData port, int callback);
+
+// Implementation of wxListCtrlCompare
+struct callbackInfo {
+ ErlDrvTermData port;
+ int callbackID;
+};
+
+int wxCALLBACK wxEListCtrlCompare(wxeIntPtr item1, wxeIntPtr item2, wxeIntPtr callbackInfoPtr);
+
+#endif
diff --git a/lib/wx/c_src/wxe_driver.c b/lib/wx/c_src/wxe_driver.c
index 4d3aa577bf..ea52737fa2 100644
--- a/lib/wx/c_src/wxe_driver.c
+++ b/lib/wx/c_src/wxe_driver.c
@@ -1,7 +1,7 @@
/*
* %CopyrightBegin%
*
- * Copyright Ericsson AB 2008-2013. All Rights Reserved.
+ * Copyright Ericsson AB 2008-2014. 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
@@ -195,7 +195,7 @@ void wxe_process_died(ErlDrvData handle, ErlDrvMonitor *monitor)
{
/* Callback is active for the dead process */
wxe_data *sd = ((wxe_data *)handle);
- push_command(WXE_CB_RETURN,NULL,0,sd);
+ push_command(WXE_CB_DIED,NULL,0,sd);
/* ErlDrvTermData pid; */
/* pid = driver_get_monitored_process(sd->port_handle, monitor); */
diff --git a/lib/wx/c_src/wxe_driver.h b/lib/wx/c_src/wxe_driver.h
index 0f0143bd4c..e35bbe2118 100644
--- a/lib/wx/c_src/wxe_driver.h
+++ b/lib/wx/c_src/wxe_driver.h
@@ -1,7 +1,7 @@
/*
* %CopyrightBegin%
*
- * Copyright Ericsson AB 2008-2013. All Rights Reserved.
+ * Copyright Ericsson AB 2008-2014. 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
@@ -89,6 +89,7 @@ extern char * erl_wx_privdir;
#define WXE_BIN_INCR 11
#define WXE_BIN_DECR 12
#define WXE_INIT_OPENGL 13
+#define WXE_CB_DIED 14
#define OPENGL_START 5000
diff --git a/lib/wx/c_src/wxe_events.h b/lib/wx/c_src/wxe_events.h
index 718e0ad120..93b5551123 100644
--- a/lib/wx/c_src/wxe_events.h
+++ b/lib/wx/c_src/wxe_events.h
@@ -1,20 +1,20 @@
/*
* %CopyrightBegin%
- *
- * Copyright Ericsson AB 2008-2013. All Rights Reserved.
- *
+ *
+ * Copyright Ericsson AB 2008-2014. 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%
+ *
+ * %CopyrightEnd%
*/
#ifndef __WXE_EVENT_H__
@@ -22,6 +22,8 @@
#include "wxe_driver.h"
+bool sendevent(wxEvent * event, ErlDrvTermData port);
+
class wxeEtype
{
public:
@@ -30,38 +32,7 @@ public:
int cID;
};
-/* One EvtListener per listening erlang process */
-/* If callbacks are used the receiver is wxe_master process */
-/* and a wxeEvtListener pre callback is registered */
-class wxeEvtListener : public wxEvtHandler
-{
- public:
- wxeEvtListener(ErlDrvTermData Thisport) : port(Thisport)
- {}
- // {fprintf(stderr, "Creating %x\r\n", (unsigned int) this); fflush(stderr);}
- ~wxeEvtListener() {}
- void forward(wxEvent& event);
- ErlDrvTermData port;
-};
-
void initEventTable();
int wxeEventTypeFromAtom(char *etype_atom);
-/* Fun Callback id */
-class wxeCallbackData : public wxObject
-{
-public:
- wxeCallbackData(ErlDrvTermData caller, int req, char *req_type,
- int funcb, int skip_ev, wxeErlTerm * userData,
- wxeEvtListener *handler_cb);
- ~wxeCallbackData();
- wxeEvtListener * handler;
- ErlDrvTermData listener;
- int fun_id;
- int obj;
- char class_name[40];
- int skip;
- wxeErlTerm * user_data;
-};
-
#endif
diff --git a/lib/wx/c_src/wxe_gl.cpp b/lib/wx/c_src/wxe_gl.cpp
index 34904397d3..a9feb23831 100644
--- a/lib/wx/c_src/wxe_gl.cpp
+++ b/lib/wx/c_src/wxe_gl.cpp
@@ -1,20 +1,20 @@
/*
* %CopyrightBegin%
- *
- * Copyright Ericsson AB 2008-2013. All Rights Reserved.
- *
+ *
+ * Copyright Ericsson AB 2008-2014. 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%
+ *
+ * %CopyrightEnd%
*/
#include <stdio.h>
@@ -26,8 +26,9 @@
#endif
#include "wxe_impl.h"
#include "wxe_return.h"
+#include "wxe_gl.h"
-/* ****************************************************************************
+/* ****************************************************************************
* Opengl context management *
* ****************************************************************************/
@@ -138,7 +139,7 @@ void gl_dispatch(int op, char *bp,ErlDrvTermData caller,WXEBinRef *bins[]){
else {
ErlDrvTermData rt[] = // Error msg
{ERL_DRV_ATOM, driver_mk_atom((char *) "_egl_error_"),
- ERL_DRV_INT, op,
+ ERL_DRV_INT, (ErlDrvTermData) op,
ERL_DRV_ATOM, driver_mk_atom((char *) "no_gl_context"),
ERL_DRV_TUPLE,3};
erl_drv_send_term(WXE_DRV_PORT,caller,rt,8);
diff --git a/lib/wx/c_src/wxe_gl.h b/lib/wx/c_src/wxe_gl.h
index 1b556ff4ec..dc117bf610 100644
--- a/lib/wx/c_src/wxe_gl.h
+++ b/lib/wx/c_src/wxe_gl.h
@@ -1,22 +1,35 @@
/*
* %CopyrightBegin%
- *
- * Copyright Ericsson AB 2008-2010. All Rights Reserved.
- *
+ *
+ * Copyright Ericsson AB 2008-2014. 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%
+ *
+ * %CopyrightEnd%
*/
+#ifndef _WXE_GL_H
+#define _WXE_GL_H
+
#include "egl_impl.h"
+#include "wxe_return.h"
+void activateGL(ErlDrvTermData caller);
+void setActiveGL(ErlDrvTermData caller, wxGLCanvas *canvas);
+void deleteActiveGL(wxGLCanvas *canvas);
void wxe_initOpenGL(wxeReturn, char*);
+void gl_dispatch(int op, char *bp, ErlDrvTermData caller, WXEBinRef *bins[]);
+
+WX_DECLARE_HASH_MAP(ErlDrvTermData, wxGLCanvas*, wxIntegerHash, wxIntegerEqual, wxeGLC);
+extern wxeGLC glc;
+
+#endif
diff --git a/lib/wx/c_src/wxe_helpers.cpp b/lib/wx/c_src/wxe_helpers.cpp
new file mode 100644
index 0000000000..15d75080d9
--- /dev/null
+++ b/lib/wx/c_src/wxe_helpers.cpp
@@ -0,0 +1,95 @@
+/*
+ * %CopyrightBegin%
+ *
+ * Copyright Ericsson AB 2014. 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%
+ */
+
+#include <wx/wx.h>
+#include "wxe_impl.h"
+
+/* ****************************************************************************
+ * Erlang Commands
+ * ****************************************************************************/
+
+wxeCommand::wxeCommand(int fc,char * cbuf,int buflen, wxe_data *sd)
+ : wxObject()
+{
+ WXEBinRef *temp, *start, *prev;
+ int n = 0;
+ ref_count = 1;
+ caller = driver_caller(sd->port_handle);
+ port = sd->port;
+ op = fc;
+ len = buflen;
+ bin[0] = NULL;
+ bin[1] = NULL;
+ bin[2] = NULL;
+
+ if(cbuf) {
+ buffer = (char *) driver_alloc(len);
+ memcpy((void *) buffer, (void *) cbuf, len);;
+
+ temp = sd->bin;
+
+ prev = NULL;
+ start = temp;
+
+ while(temp) {
+ if(caller == temp->from) {
+ bin[n++] = temp;
+ if(prev) {
+ prev->next = temp->next;
+ } else {
+ start = temp->next;
+ }
+ temp = temp->next;
+ } else {
+ prev = temp;
+ temp = temp->next;
+ }
+ }
+ sd->bin = start;
+ } else { // No-op only PING currently
+ buffer = NULL;
+ }
+}
+
+wxeCommand::~wxeCommand() {
+ int n = 0;
+ if(buffer) {
+ while(bin[n]) {
+ if(bin[n]->bin)
+ driver_free_binary(bin[n]->bin);
+ driver_free(bin[n++]);
+ }
+ driver_free(buffer);
+ }
+}
+
+/* ****************************************************************************
+ * TreeItemData
+ * ****************************************************************************/
+
+wxETreeItemData::wxETreeItemData(int sz, char * data) {
+ size = sz;
+ bin = (char *) driver_alloc(sz);
+ memcpy(bin, data, sz);
+}
+
+wxETreeItemData::~wxETreeItemData()
+{
+ driver_free(bin);
+}
diff --git a/lib/wx/c_src/wxe_helpers.h b/lib/wx/c_src/wxe_helpers.h
new file mode 100644
index 0000000000..659bc666c6
--- /dev/null
+++ b/lib/wx/c_src/wxe_helpers.h
@@ -0,0 +1,122 @@
+/*
+ * %CopyrightBegin%
+ *
+ * Copyright Ericsson AB 2014. 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%
+ */
+
+#ifndef _WXE_HELPER_H
+#define _WXE_HELPER_H
+
+DECLARE_EVENT_TYPE(wxeEVT_META_COMMAND, -1)
+
+class wxeMetaCommand : public wxEvent
+{
+ public:
+ wxeMetaCommand(wxe_data *sd, int EvId)
+ : wxEvent(EvId, wxeEVT_META_COMMAND)
+ { caller = driver_caller(sd->port_handle); port = sd->port; pdl = sd->pdl; } ;
+ wxeMetaCommand(const wxeMetaCommand& event)
+ : wxEvent(event)
+ { caller = event.caller; port = event.port; pdl = event.pdl; };
+ virtual ~wxeMetaCommand() {};
+ virtual wxEvent *Clone() const { return new wxeMetaCommand(*this); }
+
+ ErlDrvTermData caller;
+ ErlDrvTermData port;
+ ErlDrvPDL pdl;
+};
+
+class wxeCommand : public wxObject
+{
+ public:
+ wxeCommand(int fc,char * cbuf,int buflen, wxe_data *);
+ virtual ~wxeCommand(); // Use Delete()
+
+ wxeCommand * Save() {ref_count++; return this; };
+ void Delete() {if(--ref_count < 1) delete this;};
+
+ ErlDrvTermData caller;
+ ErlDrvTermData port;
+ WXEBinRef * bin[3];
+ char * buffer;
+ int len;
+ int op;
+ int ref_count;
+};
+
+class intListElement {
+ public:
+ intListElement(int Element) {car = Element; cdr = NULL;};
+ intListElement(int Element, intListElement *list)
+ {car = Element; cdr = list;};
+ int car;
+ intListElement *cdr;
+};
+
+class intList {
+ public:
+ intList() {list = NULL;};
+ ~intList() {
+ intListElement *head = list;
+ while(head) {
+ intListElement *tail=head->cdr;
+ delete head;
+ head = tail;
+ } };
+ bool IsEmpty() {return list == NULL;};
+ void Append(int Element) { list = new intListElement(Element, list); };
+ int Pop() {
+ intListElement *temp = list;
+ int res = list->car;
+ list = temp->cdr;
+ delete temp;
+ return res;
+ }
+ intListElement *list;
+};
+
+class wxe_badarg
+{
+ public:
+ wxe_badarg(int Ref) : ref(Ref) { } ;
+ int ref;
+};
+
+class wxeErlTerm : public wxClientData
+{
+ public:
+ wxeErlTerm(WXEBinRef * data)
+ {
+ size = data->size;
+ bin = (char *) driver_alloc(size);
+ memcpy(bin, data->base, size);
+ } ;
+ ~wxeErlTerm() { driver_free(bin); };
+ char * bin;
+ int size;
+};
+
+class wxETreeItemData : public wxTreeItemData
+{
+ public:
+ wxETreeItemData(int sz, char * data);
+ ~wxETreeItemData();
+
+ int size;
+ char * bin;
+};
+
+#endif
diff --git a/lib/wx/c_src/wxe_impl.cpp b/lib/wx/c_src/wxe_impl.cpp
index 4968075659..f617aaf349 100644
--- a/lib/wx/c_src/wxe_impl.cpp
+++ b/lib/wx/c_src/wxe_impl.cpp
@@ -1,7 +1,7 @@
/*
* %CopyrightBegin%
*
- * Copyright Ericsson AB 2008-2013. All Rights Reserved.
+ * Copyright Ericsson AB 2008-2014. 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
@@ -23,10 +23,6 @@
#include <wx/wx.h>
-#if defined(_WIN32)
-#include <wx/msw/private.h> // for wxSetInstance
-#endif
-
// Avoid including these in dcbuffer below
#include "wx/dcmemory.h"
#include "wx/dcclient.h"
@@ -34,12 +30,12 @@
// Ok ugly but needed for wxBufferedDC crash workaround
#define private public
#include <wx/dcbuffer.h>
-
#undef private
#include "wxe_impl.h"
#include "wxe_events.h"
#include "wxe_return.h"
+#include "wxe_gl.h"
IMPLEMENT_APP_NO_MAIN(WxeApp)
@@ -47,120 +43,21 @@ DECLARE_APP(WxeApp)
DEFINE_EVENT_TYPE(wxeEVT_META_COMMAND)
-#define WXE_NOT_INITIATED 0
-#define WXE_INITIATED 1
-#define WXE_EXITED 2
-#define WXE_ERROR -1
-
#define WXE_NORMAL 0
#define WXE_CALLBACK 1
#define WXE_STORED 2
-ErlDrvTid wxe_thread;
-
-ErlDrvMutex *wxe_status_m;
-ErlDrvCond *wxe_status_c;
-
-ErlDrvMutex * wxe_batch_locker_m;
-ErlDrvCond * wxe_batch_locker_c;
-
-static int wxe_status = WXE_NOT_INITIATED;
+// Globals initiated in wxe_init.cpp
+extern ErlDrvMutex *wxe_status_m;
+extern ErlDrvCond *wxe_status_c;
+extern ErlDrvMutex * wxe_batch_locker_m;
+extern ErlDrvCond * wxe_batch_locker_c;
+extern ErlDrvTermData init_caller;
+extern int wxe_status;
wxList * wxe_batch = NULL;
wxList * wxe_batch_cb_saved = NULL;
-
-ErlDrvTermData wxe_batch_caller = 0;
-ErlDrvTermData init_caller = 0;
-
-// extern opengl
-void gl_dispatch(int op, char *bp, ErlDrvTermData caller, WXEBinRef *bins[]);
-
-
-// Until fixed in emulator
-#ifndef _WIN32
-extern "C" {
-extern void erts_thread_disable_fpe(void);
-}
-#endif
-
-#if defined(__APPLE__) && defined(__MACH__) && !defined(__DARWIN__)
-#define __DARWIN__ 1
-#endif
-
-#ifdef __DARWIN__
-extern "C" {
- int erl_drv_stolen_main_thread_join(ErlDrvTid tid, void **respp);
- int erl_drv_steal_main_thread(char *name,
- ErlDrvTid *dtid,
- void* (*func)(void*),
- void* arg,
- ErlDrvThreadOpts *opts);
-}
-#endif
-
-void *wxe_main_loop(void * );
-
-/* ************************************************************
- * START AND STOP of driver thread
- * ************************************************************/
-
-int load_native_gui()
-{
- return 1;
-}
-
-int start_native_gui(wxe_data *sd)
-{
- int res;
- wxe_status_m = erl_drv_mutex_create((char *) "wxe_status_m");
- wxe_status_c = erl_drv_cond_create((char *)"wxe_status_c");
-
- wxe_batch_locker_m = erl_drv_mutex_create((char *)"wxe_batch_locker_m");
- wxe_batch_locker_c = erl_drv_cond_create((char *)"wxe_batch_locker_c");
- init_caller = driver_connected(sd->port_handle);
-
-#ifdef __DARWIN__
- res = erl_drv_steal_main_thread((char *)"wxwidgets",
- &wxe_thread,wxe_main_loop,(void *) sd->pdl,NULL);
-#else
- res = erl_drv_thread_create((char *)"wxwidgets",
- &wxe_thread,wxe_main_loop,(void *) sd->pdl,NULL);
-#endif
- if(res == 0) {
- erl_drv_mutex_lock(wxe_status_m);
- for(;wxe_status == WXE_NOT_INITIATED;) {
- erl_drv_cond_wait(wxe_status_c, wxe_status_m);
- }
- erl_drv_mutex_unlock(wxe_status_m);
- return wxe_status;
- } else {
- wxString msg;
- msg.Printf(wxT("Erlang failed to create wxe-thread %d\r\n"), res);
- send_msg("error", &msg);
- return -1;
- }
-}
-
-void stop_native_gui(wxe_data *sd)
-{
- if(wxe_status == WXE_INITIATED) {
- meta_command(WXE_SHUTDOWN, sd);
- }
-#ifdef __DARWIN__
- erl_drv_stolen_main_thread_join(wxe_thread, NULL);
-#else
- erl_drv_thread_join(wxe_thread, NULL);
-#endif
- erl_drv_mutex_destroy(wxe_status_m);
- erl_drv_cond_destroy(wxe_status_c);
- erl_drv_mutex_destroy(wxe_batch_locker_m);
- erl_drv_cond_destroy(wxe_batch_locker_c);
-}
-
-void unload_native_gui()
-{
-
-}
+int wxe_batch_caller = 0; // inside batch if larger than 0
/* ************************************************************
* Commands from erlang
@@ -169,7 +66,8 @@ void unload_native_gui()
void push_command(int op,char * buf,int len, wxe_data *sd)
{
- // fprintf(stderr, "Op %d %d\r\n", op, (int) driver_caller(sd->port_handle)),fflush(stderr);
+ /* fprintf(stderr, "Op %d %d [%ld] %d\r\n", op, (int) driver_caller(sd->port_handle),
+ wxe_batch->size(), wxe_batch_caller),fflush(stderr); */
wxeCommand *Cmd = new wxeCommand(op, buf, len, sd);
erl_drv_mutex_lock(wxe_batch_locker_m);
wxe_batch->Append(Cmd);
@@ -195,9 +93,8 @@ void meta_command(int what, wxe_data *sd) {
wxeCommand *Cmd = new wxeCommand(WXE_DEBUG_PING, NULL, 0, sd);
wxe_batch->Append(Cmd);
erl_drv_cond_signal(wxe_batch_locker_c);
- } else {
- wxWakeUpIdle();
}
+ wxWakeUpIdle();
erl_drv_mutex_unlock(wxe_batch_locker_m);
} else {
if(sd) {
@@ -207,60 +104,19 @@ void meta_command(int what, wxe_data *sd) {
}
}
-/* ************************************************************
- * wxWidgets Thread
- * ************************************************************/
-
-void *wxe_main_loop(void *vpdl)
-{
- int result;
- int argc = 1;
- char * temp = (char *) "Erlang";
- char * argv[] = {temp,NULL};
- ErlDrvPDL pdl = (ErlDrvPDL) vpdl;
-
- driver_pdl_inc_refc(pdl);
-
- // Disable floating point execption if they are on.
- // This should be done in emulator but it's not in yet.
-#ifndef _WIN32
- erts_thread_disable_fpe();
-#else
- // Setup that wxWidgets should look for cursors and icons in
- // this dll and not in werl.exe (which is the default)
- HMODULE WXEHandle = GetModuleHandle(_T("wxe_driver"));
- wxSetInstance((HINSTANCE) WXEHandle);
-#endif
-
- wxe_ps_init();
- result = wxEntry(argc, argv);
- // fprintf(stderr, "WXWidgets quits main loop %d \r\n", result);
- if(result >= 0 && wxe_status == WXE_INITIATED) {
- /* We are done try to make a clean exit */
- wxe_status = WXE_EXITED;
- driver_pdl_dec_refc(pdl);
-#ifndef __DARWIN__
- erl_drv_thread_exit(NULL);
-#endif
- return NULL;
- } else {
- erl_drv_mutex_lock(wxe_status_m);
- wxe_status = WXE_ERROR;
- erl_drv_cond_signal(wxe_status_c);
- erl_drv_mutex_unlock(wxe_status_m);
- driver_pdl_dec_refc(pdl);
- return NULL;
- }
-}
-
-void WxeApp::dummy_close(wxEvent& Ev) {
- // fprintf(stderr, "Dummy Close invoked\r\n");
- // wxMac really wants a top level window which command-q quits if there are no
- // windows open, and this will kill the erlang, override default handling
+void send_msg(const char * type, const wxString * msg) {
+ wxeReturn rt = wxeReturn(WXE_DRV_PORT, init_caller);
+ rt.addAtom((char *) "wxe_driver");
+ rt.addAtom((char *) type);
+ rt.add(msg);
+ rt.addTupleCount(3);
+ rt.send();
}
+/* ************************************************************
+ * Init WxeApp the application emulator
+ * ************************************************************/
-// Init wx-widgets thread
bool WxeApp::OnInit()
{
@@ -268,6 +124,9 @@ bool WxeApp::OnInit()
wxe_batch = new wxList;
wxe_batch_cb_saved = new wxList;
cb_buff = NULL;
+ recurse_level = 0;
+ delayed_cleanup = new wxList;
+ delayed_delete = new wxList;
wxe_ps_init2();
// wxIdleEvent::SetMode(wxIDLE_PROCESS_SPECIFIED); // Hmm printpreview doesn't work in 2.9 with this
@@ -301,17 +160,27 @@ bool WxeApp::OnInit()
return TRUE;
}
+
+#ifdef _MACOSX
+void WxeApp::MacOpenFile(const wxString &filename) {
+ send_msg("open_file", &filename);
+}
+#endif
+
void WxeApp::shutdown(wxeMetaCommand& Ecmd) {
ExitMainLoop();
}
-void send_msg(const char * type, wxString * msg) {
- wxeReturn rt = wxeReturn(WXE_DRV_PORT, init_caller);
- rt.addAtom((char *) "wxe_driver");
- rt.addAtom((char *) type);
- rt.add(msg);
- rt.addTupleCount(3);
- rt.send();
+void WxeApp::dummy_close(wxEvent& Ev) {
+ // fprintf(stderr, "Dummy Close invoked\r\n");
+ // wxMac really wants a top level window which command-q quits if there are no
+ // windows open, and this will kill the erlang, override default handling
+}
+
+// Called by wx thread
+void WxeApp::idle(wxIdleEvent& event) {
+ event.Skip(true);
+ dispatch_cmds();
}
/* ************************************************************
@@ -328,29 +197,51 @@ void handle_event_callback(ErlDrvPort port, ErlDrvTermData process)
{
WxeApp * app = (WxeApp *) wxTheApp;
ErlDrvMonitor monitor;
- driver_monitor_process(port, process, &monitor);
- // Should we be able to handle commands when recursing? probably
- erl_drv_mutex_lock(wxe_batch_locker_m);
- //fprintf(stderr, "\r\nCB EV Start %lu \r\n", process);fflush(stderr);
- app->dispatch_cb(wxe_batch, wxe_batch_cb_saved, process);
- //fprintf(stderr, "CB EV done %lu \r\n", process);fflush(stderr);
- wxe_batch_caller = 0;
- erl_drv_mutex_unlock(wxe_batch_locker_m);
- driver_demonitor_process(port, &monitor);
-}
-
-// Called by wx thread
-void WxeApp::idle(wxIdleEvent& event) {
- event.Skip(true);
- dispatch_cmds();
+ // Is thread safe if pdl have been incremented
+ if(driver_monitor_process(port, process, &monitor) == 0) {
+ // Should we be able to handle commands when recursing? probably
+ erl_drv_mutex_lock(wxe_batch_locker_m);
+ //fprintf(stderr, "\r\nCB EV Start %lu \r\n", process);fflush(stderr);
+ app->recurse_level++;
+ app->dispatch_cb(wxe_batch, wxe_batch_cb_saved, process);
+ app->recurse_level--;
+ //fprintf(stderr, "CB EV done %lu \r\n", process);fflush(stderr);
+ wxe_batch_caller = 0;
+ erl_drv_mutex_unlock(wxe_batch_locker_m);
+ driver_demonitor_process(port, &monitor);
+ }
}
-void WxeApp::dispatch_cmds() {
+void WxeApp::dispatch_cmds()
+{
erl_drv_mutex_lock(wxe_batch_locker_m);
+ recurse_level++;
int level = dispatch(wxe_batch_cb_saved, 0, WXE_STORED);
dispatch(wxe_batch, level, WXE_NORMAL);
+ recurse_level--;
wxe_batch_caller = 0;
erl_drv_mutex_unlock(wxe_batch_locker_m);
+ // Cleanup old memenv's and deleted objects
+ if(recurse_level == 0) {
+ if(delayed_delete->size() > 0)
+ for( wxList::compatibility_iterator node = delayed_delete->GetFirst();
+ node;
+ node = delayed_delete->GetFirst()) {
+ wxeCommand *event = (wxeCommand *)node->GetData();
+ delayed_delete->Erase(node);
+ wxe_dispatch(*event);
+ event->Delete();
+ }
+ if(delayed_cleanup->size() > 0)
+ for( wxList::compatibility_iterator node = delayed_cleanup->GetFirst();
+ node;
+ node = delayed_cleanup->GetFirst()) {
+ wxeMetaCommand *event = (wxeMetaCommand *)node->GetData();
+ delayed_cleanup->Erase(node);
+ destroyMemEnv(*event);
+ delete event;
+ }
+ }
}
// Should have erl_drv_mutex_lock(wxe_batch_locker_m);
@@ -402,7 +293,7 @@ int WxeApp::dispatch(wxList * batch, int blevel, int list_type)
erl_drv_mutex_lock(wxe_batch_locker_m);
break;
}
- delete event;
+ event->Delete();
}
} else {
if((list_type == WXE_STORED) || (blevel <= 0 && list_type == WXE_NORMAL)) {
@@ -434,6 +325,7 @@ void WxeApp::dispatch_cb(wxList * batch, wxList * temp, ErlDrvTermData process)
// fprintf(stderr, " Ev %d %lu\r\n", event->op, event->caller);
if(event->caller == process || // Callbacks from CB process only
event->op == WXE_CB_START || // Event callback start change process
+ event->op == WXE_CB_DIED || // Event callback process died
// Allow connect_cb during CB i.e. msg from wxe_server.
(memenv && event->caller == memenv->owner))
{
@@ -446,7 +338,8 @@ void WxeApp::dispatch_cb(wxList * batch, wxList * temp, ErlDrvTermData process)
if(event->len > 0) {
cb_buff = (char *) driver_alloc(event->len);
memcpy(cb_buff, event->buffer, event->len);
- }
+ } // continue
+ case WXE_CB_DIED:
callback_returned = 1;
return;
case WXE_CB_START:
@@ -481,7 +374,7 @@ void WxeApp::dispatch_cb(wxList * batch, wxList * temp, ErlDrvTermData process)
return;
break;
}
- delete event;
+ event->Delete();
} else {
// fprintf(stderr, " save %d \r\n", event->op);
temp->Append(event);
@@ -518,12 +411,20 @@ void WxeApp::newMemEnv(wxeMetaCommand& Ecmd) {
erl_drv_send_term(WXE_DRV_PORT,Ecmd.caller,rt,2);
}
-void WxeApp::destroyMemEnv(wxeMetaCommand& Ecmd) {
+void WxeApp::destroyMemEnv(wxeMetaCommand& Ecmd)
+{
// Clear incoming cmd queue first
// dispatch_cmds();
wxWindow *parent = NULL;
wxeMemEnv * memenv = refmap[Ecmd.port];
+ if(!memenv) {
+ wxString msg;
+ msg.Printf(wxT("MemEnv already deleted"));
+ send_msg("debug", &msg);
+ return;
+ }
+
if(wxe_debug) {
wxString msg;
msg.Printf(wxT("Destroying all memory "));
@@ -537,26 +438,33 @@ void WxeApp::destroyMemEnv(wxeMetaCommand& Ecmd) {
ptrMap::iterator it = ptr2ref.find(ptr);
if(it != ptr2ref.end()) {
wxeRefData *refd = it->second;
- if(refd->alloc_in_erl) {
- if(refd->type == 2) {
- wxDialog *win = (wxDialog *) ptr;
- if(win->IsModal()) {
- win->EndModal(-1);
- }
- parent = win->GetParent();
- if(parent) {
- ptrMap::iterator parentRef = ptr2ref.find(parent);
- if(parentRef == ptr2ref.end()) {
- // The parent is already dead delete the parent ref
- win->SetParent(NULL);
- }
+ if(refd->alloc_in_erl && refd->type == 2) {
+ wxDialog *win = (wxDialog *) ptr;
+ if(win->IsModal()) {
+ win->EndModal(-1);
+ }
+ parent = win->GetParent();
+ if(parent) {
+ ptrMap::iterator parentRef = ptr2ref.find(parent);
+ if(parentRef == ptr2ref.end()) {
+ // The parent is already dead delete the parent ref
+ win->SetParent(NULL);
}
+ }
+ if(recurse_level > 0) {
+ // Delay delete until we are out of dispatch*
+ } else {
delete win;
}
}
}
}
}
+
+ if(recurse_level > 0) {
+ delayed_cleanup->Append(Ecmd.Clone());
+ return;
+ }
// First pass, delete all top parents/windows of all linked objects
// fprintf(stderr, "close port %x\r\n", Ecmd.port);fflush(stderr);
@@ -592,20 +500,20 @@ void WxeApp::destroyMemEnv(wxeMetaCommand& Ecmd) {
if(it != ptr2ref.end()) {
wxeRefData *refd = it->second;
if(refd->alloc_in_erl) {
- int type = refd->type;
if((refd->type == 1) && ((wxObject *)ptr)->IsKindOf(CLASSINFO(wxBufferedDC))) {
((wxBufferedDC *)ptr)->m_dc = NULL; // Workaround
}
wxString msg;
- if((refd->type == 0)) { // Maybe also class 1
+ bool cleanup_ref=true;
+ if(refd->type == 0) { // Maybe also class 1
wxClassInfo *cinfo = ((wxObject *)ptr)->GetClassInfo();
msg.Printf(wxT("Memory leak: {wx_ref, %d, %s}"),
refd->ref, cinfo->GetClassName());
send_msg("error", &msg);
} else {
- delete_object(ptr, refd);
+ cleanup_ref = delete_object(ptr, refd);
}
- if(type == 0 || type > 2) {
+ if(cleanup_ref) {
// Delete refs for leaks and non overridden allocs
delete refd;
ptr2ref.erase(it);
@@ -713,7 +621,7 @@ void WxeApp::clearPtr(void * ptr) {
if(((int) refd->pid) != -1) {
// Send terminate pid to owner
- wxeReturn rt = wxeReturn(WXE_DRV_PORT,refd->memenv->owner, false);
+ wxeReturn rt = wxeReturn(WXE_DRV_PORT,refd->pid, false);
rt.addAtom("_wxe_destroy_");
rt.add(ERL_DRV_PID, refd->pid);
rt.addTupleCount(2);
@@ -781,161 +689,3 @@ void WxeApp::registerPid(char * bp, ErlDrvTermData pid, wxeMemEnv * memenv) {
};
throw wxe_badarg(index);
}
-
-
-/* ************************************************************
- * Misc utility classes
- * ************************************************************/
-
-/* ****************************************************************************
- * Memory handling
- * ****************************************************************************/
-
-wxeMemEnv::wxeMemEnv() {
- ref2ptr = (void **) driver_alloc(128*sizeof(void *));
- ref2ptr[0] = NULL;
- next = 1;
- max = 128;
-}
-
-wxeMemEnv::~wxeMemEnv() {
- driver_free(ref2ptr);
-}
-
-/* ****************************************************************************
- * Erlang Commands (don't need to be derived of wxEvent anymore should
- * be re-written to own class struct)
- * ****************************************************************************/
-
-wxeCommand::wxeCommand(int fc,char * cbuf,int buflen, wxe_data *sd)
- : wxObject()
-{
- WXEBinRef *temp, *start, *prev;
- int n = 0;
- caller = driver_caller(sd->port_handle);
- port = sd->port;
- op = fc;
- len = buflen;
- bin[0] = NULL;
- bin[1] = NULL;
- bin[2] = NULL;
-
- if(cbuf) {
- buffer = (char *) driver_alloc(len);
- memcpy((void *) buffer, (void *) cbuf, len);;
-
- temp = sd->bin;
-
- prev = NULL;
- start = temp;
-
- while(temp) {
- if(caller == temp->from) {
- bin[n++] = temp;
- if(prev) {
- prev->next = temp->next;
- } else {
- start = temp->next;
- }
- temp = temp->next;
- } else {
- prev = temp;
- temp = temp->next;
- }
- }
- sd->bin = start;
- } else { // No-op only PING currently
- buffer = NULL;
- }
-}
-
-wxeCommand::~wxeCommand() {
- int n = 0;
- if(buffer) {
- while(bin[n]) {
- if(bin[n]->bin)
- driver_free_binary(bin[n]->bin);
- driver_free(bin[n++]);
- }
- driver_free(buffer);
- }
-}
-
-/* ****************************************************************************
- * TreeItemData
- * ****************************************************************************/
-
-wxETreeItemData::wxETreeItemData(int sz, char * data) {
- size = sz;
- bin = (char *) driver_alloc(sz);
- memcpy(bin, data, sz);
-}
-
-wxETreeItemData::~wxETreeItemData()
-{
- driver_free(bin);
-}
-
-/* ****************************************************************************
- * CallbackData *
- * ****************************************************************************/
-
-wxeCallbackData::wxeCallbackData(ErlDrvTermData caller, int req, char *req_type,
- int funcb, int skip_ev, wxeErlTerm * userData,
- wxeEvtListener *handler_cb)
- : wxObject()
-{
- listener = caller;
- obj = req;
- fun_id = funcb;
- strcpy(class_name, req_type);
- skip = skip_ev;
- user_data = userData;
- handler = handler_cb;
-}
-
-wxeCallbackData::~wxeCallbackData() {
- // fprintf(stderr, "CBD Deleteing %p %s\r\n", this, class_name); fflush(stderr);
- if(user_data) {
- delete user_data;
- }
- ptrMap::iterator it;
- it = ((WxeApp *)wxTheApp)->ptr2ref.find(handler);
- if(it != ((WxeApp *)wxTheApp)->ptr2ref.end()) {
- wxeRefData *refd = it->second;
- wxeReturn rt = wxeReturn(WXE_DRV_PORT, refd->memenv->owner, false);
- rt.addAtom("wx_delete_cb");
- rt.addInt(fun_id);
- rt.addRef(refd->ref, "wxeEvtListener");
- rt.addRef(obj, class_name);
- rt.addTupleCount(4);
- rt.send();
- }
-}
-
-/* ****************************************************************************
- * wxListCtrlCompare wrapper
- * ****************************************************************************/
-
-int wxCALLBACK wxEListCtrlCompare(long item1, long item2, long callbackInfoPtr)
-{
- callbackInfo * cb = (callbackInfo *)callbackInfoPtr;
- wxeMemEnv * memenv = ((WxeApp *) wxTheApp)->getMemEnv(cb->port);
- wxeReturn rt = wxeReturn(WXE_DRV_PORT, memenv->owner, false);
- rt.addInt(cb->callbackID);
- rt.addInt(item1);
- rt.addInt(item2);
- rt.endList(2);
- rt.addAtom("_wx_invoke_cb_");
- rt.addTupleCount(3);
- rt.send();
- handle_event_callback(WXE_DRV_PORT_HANDLE, memenv->owner);
-
- if(((WxeApp *) wxTheApp)->cb_buff) {
- int res = * (int*) ((WxeApp *) wxTheApp)->cb_buff;
- driver_free(((WxeApp *) wxTheApp)->cb_buff);
- ((WxeApp *) wxTheApp)->cb_buff = NULL;
- return res;
- }
- return 0;
-}
diff --git a/lib/wx/c_src/wxe_impl.h b/lib/wx/c_src/wxe_impl.h
index a3c57e2598..5b23e1cbbd 100644
--- a/lib/wx/c_src/wxe_impl.h
+++ b/lib/wx/c_src/wxe_impl.h
@@ -1,7 +1,7 @@
/*
* %CopyrightBegin%
*
- * Copyright Ericsson AB 2008-2013. All Rights Reserved.
+ * Copyright Ericsson AB 2008-2014. 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
@@ -14,12 +14,17 @@
* the License for the specific language governing rights and limitations
* under the License.
*
- * %CopyrightEnd%
+ * %CopyrightEnd%
*/
#ifndef _WXE_IMPL_H
#define _WXE_IMPL_H
+#if defined(__APPLE__) && defined(__MACH__) && !defined(__DARWIN__)
+#define __DARWIN__ 1
+#endif
+
+
#include <wx/glcanvas.h>
#include <wx/treectrl.h>
#include <wx/print.h>
@@ -27,124 +32,32 @@ extern "C" {
#include "wxe_driver.h"
}
-DECLARE_EVENT_TYPE(wxeEVT_META_COMMAND, -1)
-
-class wxeMetaCommand : public wxEvent
-{
- public:
- wxeMetaCommand(wxe_data *sd, int EvId)
- : wxEvent(EvId, wxeEVT_META_COMMAND)
- { caller = driver_caller(sd->port_handle); port = sd->port; pdl = sd->pdl; } ;
- wxeMetaCommand(const wxeMetaCommand& event)
- : wxEvent(event)
- { caller = event.caller; port = event.port; pdl = event.pdl; };
- virtual ~wxeMetaCommand() {};
- virtual wxEvent *Clone() const { return new wxeMetaCommand(*this); }
-
- ErlDrvTermData caller;
- ErlDrvTermData port;
- ErlDrvPDL pdl;
-};
-
-class wxeCommand : public wxObject
-{
- public:
- wxeCommand(int fc,char * cbuf,int buflen, wxe_data *);
- virtual ~wxeCommand();
-
- ErlDrvTermData caller;
- ErlDrvTermData port;
- WXEBinRef * bin[3];
- char * buffer;
- int len;
- int op;
-};
-
-#define WXE_EVENT_PTR 0
-#define WXE_OBJECT_PTR 1
-
-class intListElement {
-public:
- intListElement(int Element) {car = Element; cdr = NULL;};
- intListElement(int Element, intListElement *list)
- {car = Element; cdr = list;};
- int car;
- intListElement *cdr;
-};
-
-class intList {
-public:
- intList() {list = NULL;};
- bool IsEmpty() {return list == NULL;};
- void Append(int Element) { list = new intListElement(Element, list); };
- int Pop() {
- intListElement *temp = list;
- int res = list->car;
- list = temp->cdr;
- delete temp;
- return res;
- }
- intListElement *list;
-};
-
-class wxe_badarg
-{
-public:
- wxe_badarg(int Ref) : ref(Ref) { } ;
- int ref;
-};
-
-class wxeErlTerm : public wxClientData
-{
- public:
- wxeErlTerm(WXEBinRef * data)
- {
- size = data->size;
- bin = (char *) driver_alloc(size);
- memcpy(bin, data->base, size);
- } ;
- ~wxeErlTerm() { driver_free(bin); };
- char * bin;
- int size;
-};
-
-class wxeMemEnv
-{
-public:
- wxeMemEnv();
- int next;
- int max;
- void ** ref2ptr;
- intList free;
- ~wxeMemEnv();
- ErlDrvTermData owner;
-};
+#include "wxe_helpers.h"
+#include "wxe_callback_impl.h"
+#include "wxe_memory.h"
-class wxeRefData {
- public:
- wxeRefData(unsigned int dref, int ttype, int is_new, wxeMemEnv *menv) :
- ref(dref), type(ttype), alloc_in_erl(is_new), memenv(menv), pid(-1) { } ;
- int ref;
- int type;
- // 0 = wxWindow subclasses, 1 = wxObject subclasses
- // 2 = wxDialog subclasses, 3 = allocated wxObjects but not returned from new
- // > 3 classes which lack virtual destr, or are supposed to be allocated on
- // the stack
- bool alloc_in_erl;
- wxeMemEnv *memenv;
- ErlDrvTermData pid;
-};
+#if !wxCHECK_VERSION(2,9,0)
+#define wxeLocaleC wxChar *
+#define wxeLocaleC2String(Str) wxString(Str)
+#else
+typedef wxString wxeLocaleC;
+#define wxeLocaleC2String(Str) Str
+#endif
-WX_DECLARE_HASH_MAP(ErlDrvTermData, wxGLCanvas*, wxIntegerHash, wxIntegerEqual, wxeGLC);
-WX_DECLARE_HASH_MAP(ErlDrvTermData, wxeMemEnv*, wxIntegerHash, wxIntegerEqual, wxeMemMap);
+#define WXE_NOT_INITIATED 0
+#define WXE_INITIATED 1
+#define WXE_EXITED 2
+#define WXE_ERROR -1
-
-WX_DECLARE_VOIDPTR_HASH_MAP(wxeRefData *, ptrMap);
+void send_msg(const char *, const wxString *); // For debugging and error msgs
class WxeApp : public wxApp
{
public:
- virtual bool OnInit();
+ virtual bool OnInit();
+#ifdef _MACOSX
+ virtual void MacOpenFile(const wxString &filename);
+#endif
void shutdown(wxeMetaCommand& event);
int dispatch(wxList *, int, int);
@@ -158,101 +71,31 @@ public:
void dummy_close(wxEvent& Ev);
bool sendevent(wxEvent *event);
- // MemEnv handling
+ // MemEnv handling
void newMemEnv(wxeMetaCommand& event);
void destroyMemEnv(wxeMetaCommand& event);
wxeMemEnv * getMemEnv(ErlDrvTermData port);
-
+
int newPtr(void * ptr, int type, wxeMemEnv *memenv);
int getRef(void * ptr, wxeMemEnv *memenv);
- void * getPtr(char * bp, wxeMemEnv *memenv);
+ void * getPtr(char * bp, wxeMemEnv *memenv);
void clearPtr(void *ptr);
void registerPid(char *ptr, ErlDrvTermData pid, wxeMemEnv *memenv);
- void init_nonconsts(wxeMemEnv *memenv, ErlDrvTermData caller);
-
+ void init_nonconsts(wxeMemEnv *memenv, ErlDrvTermData caller);
+
// Code found in gen/wxe_derived_dest.h
- void delete_object(void *ptr, wxeRefData *refd);
-
+ bool delete_object(void *ptr, wxeRefData *refd);
+
wxeMemMap refmap;
ptrMap ptr2ref;
wxeMemEnv * global_me;
-
+
+ int recurse_level;
+ wxList * delayed_cleanup;
+ wxList * delayed_delete;
// Temp container for callbacks
char *cb_buff;
int cb_len;
};
-class wxETreeItemData : public wxTreeItemData
-{
- public:
- wxETreeItemData(int sz, char * data);
-
- ~wxETreeItemData();
-
- int size;
- char * bin;
-};
-
-bool sendevent(wxEvent * event, ErlDrvTermData port);
-void pre_callback();
-void handle_event_callback(ErlDrvPort port, ErlDrvTermData process);
-
-void activateGL(ErlDrvTermData caller);
-void setActiveGL(ErlDrvTermData caller, wxGLCanvas *canvas);
-void deleteActiveGL(wxGLCanvas *canvas);
-
-void send_msg(const char *, wxString *); // For debugging and error msgs
-
-extern wxeGLC glc;
-
-class wxEPrintout : public wxPrintout
-{
- public:
- wxEPrintout(wxString Title, int onPrintP, int onPrepareP,
- int onBeginP, int onEndP,
- int onBeginD, int onEndD,
- int hasP, int getPageI, ErlDrvTermData Port) :
- wxPrintout(Title),
- onPrintPage(onPrintP), onPreparePrinting(onPrepareP),
- onBeginPrinting(onBeginP), onEndPrinting(onEndP),
- onBeginDocument(onBeginD), onEndDocument(onEndD), hasPage(hasP), getPageInfo(getPageI),
- port(Port)
- { } ;
-
- ~wxEPrintout();
-
- bool OnBeginDocument(int startPage, int endPage);
- void OnEndDocument();
- void OnBeginPrinting();
- void OnEndPrinting();
-
- void OnPreparePrinting();
-
- bool HasPage(int page);
- bool OnPrintPage(int page);
- void GetPageInfo(int *minPage, int *maxPage, int *pageFrom, int *pageTo);
-
- int onPrintPage;
- int onPreparePrinting;
- int onBeginPrinting;
- int onEndPrinting;
- int onBeginDocument;
- int onEndDocument;
- int hasPage;
- int getPageInfo;
-
- ErlDrvTermData port;
-};
-
-void clear_cb(ErlDrvTermData port, int callback);
-
-
-// Implementation of wxListCtrlCompare
-struct callbackInfo {
- ErlDrvTermData port;
- int callbackID;
-};
-
-int wxCALLBACK wxEListCtrlCompare(long item1, long item2, long callbackInfoPtr);
-
#endif //_WXE_IMPL_H
diff --git a/lib/wx/c_src/wxe_main.cpp b/lib/wx/c_src/wxe_main.cpp
new file mode 100644
index 0000000000..2bec2422c9
--- /dev/null
+++ b/lib/wx/c_src/wxe_main.cpp
@@ -0,0 +1,163 @@
+/*
+ * %CopyrightBegin%
+ *
+ * Copyright Ericsson AB 2014. 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%
+ */
+
+#if defined(_WIN32)
+#include <wx/msw/private.h> // for wxSetInstance
+#endif
+
+#include "wxe_impl.h"
+
+// Until fixed in emulator
+#ifndef _WIN32
+extern "C" {
+ extern void erts_thread_disable_fpe(void);
+}
+#endif
+
+ErlDrvTid wxe_thread;
+
+ErlDrvMutex *wxe_status_m;
+ErlDrvCond *wxe_status_c;
+
+int wxe_status = WXE_NOT_INITIATED;
+
+ErlDrvMutex * wxe_batch_locker_m;
+ErlDrvCond * wxe_batch_locker_c;
+ErlDrvTermData init_caller = 0;
+
+#ifdef __DARWIN__
+extern "C" {
+ int erl_drv_stolen_main_thread_join(ErlDrvTid tid, void **respp);
+ int erl_drv_steal_main_thread(char *name,
+ ErlDrvTid *dtid,
+ void* (*func)(void*),
+ void* arg,
+ ErlDrvThreadOpts *opts);
+}
+#endif
+
+void *wxe_main_loop(void * );
+
+/* ************************************************************
+ * START AND STOP of driver thread
+ * ************************************************************/
+
+int load_native_gui()
+{
+ return 1;
+}
+
+int start_native_gui(wxe_data *sd)
+{
+ int res;
+ wxe_status_m = erl_drv_mutex_create((char *) "wxe_status_m");
+ wxe_status_c = erl_drv_cond_create((char *)"wxe_status_c");
+
+ wxe_batch_locker_m = erl_drv_mutex_create((char *)"wxe_batch_locker_m");
+ wxe_batch_locker_c = erl_drv_cond_create((char *)"wxe_batch_locker_c");
+ init_caller = driver_connected(sd->port_handle);
+
+#ifdef __DARWIN__
+ res = erl_drv_steal_main_thread((char *)"wxwidgets",
+ &wxe_thread,wxe_main_loop,(void *) sd->pdl,NULL);
+#else
+ res = erl_drv_thread_create((char *)"wxwidgets",
+ &wxe_thread,wxe_main_loop,(void *) sd->pdl,NULL);
+#endif
+ if(res == 0) {
+ erl_drv_mutex_lock(wxe_status_m);
+ for(;wxe_status == WXE_NOT_INITIATED;) {
+ erl_drv_cond_wait(wxe_status_c, wxe_status_m);
+ }
+ erl_drv_mutex_unlock(wxe_status_m);
+ return wxe_status;
+ } else {
+ wxString msg;
+ msg.Printf(wxT("Erlang failed to create wxe-thread %d\r\n"), res);
+ send_msg("error", &msg);
+ return -1;
+ }
+}
+
+void stop_native_gui(wxe_data *sd)
+{
+ if(wxe_status == WXE_INITIATED) {
+ meta_command(WXE_SHUTDOWN, sd);
+ }
+#ifdef __DARWIN__
+ erl_drv_stolen_main_thread_join(wxe_thread, NULL);
+#else
+ erl_drv_thread_join(wxe_thread, NULL);
+#endif
+ erl_drv_mutex_destroy(wxe_status_m);
+ erl_drv_cond_destroy(wxe_status_c);
+ erl_drv_mutex_destroy(wxe_batch_locker_m);
+ erl_drv_cond_destroy(wxe_batch_locker_c);
+}
+
+void unload_native_gui()
+{
+
+}
+
+/* ************************************************************
+ * wxWidgets Thread
+ * ************************************************************/
+
+void *wxe_main_loop(void *vpdl)
+{
+ int result;
+ int argc = 1;
+ char * temp = (char *) "Erlang";
+ char * argv[] = {temp,NULL};
+ ErlDrvPDL pdl = (ErlDrvPDL) vpdl;
+
+ driver_pdl_inc_refc(pdl);
+
+ // Disable floating point execption if they are on.
+ // This should be done in emulator but it's not in yet.
+#ifndef _WIN32
+ erts_thread_disable_fpe();
+#else
+ // Setup that wxWidgets should look for cursors and icons in
+ // this dll and not in werl.exe (which is the default)
+ HMODULE WXEHandle = GetModuleHandle(_T("wxe_driver"));
+ wxSetInstance((HINSTANCE) WXEHandle);
+#endif
+
+ wxe_ps_init();
+ result = wxEntry(argc, argv);
+ // fprintf(stderr, "WXWidgets quits main loop %d \r\n", result);
+ if(result >= 0 && wxe_status == WXE_INITIATED) {
+ /* We are done try to make a clean exit */
+ wxe_status = WXE_EXITED;
+ driver_pdl_dec_refc(pdl);
+#ifndef __DARWIN__
+ erl_drv_thread_exit(NULL);
+#endif
+ return NULL;
+ } else {
+ erl_drv_mutex_lock(wxe_status_m);
+ wxe_status = WXE_ERROR;
+ erl_drv_cond_signal(wxe_status_c);
+ erl_drv_mutex_unlock(wxe_status_m);
+ driver_pdl_dec_refc(pdl);
+ return NULL;
+ }
+}
diff --git a/lib/wx/c_src/wxe_memory.h b/lib/wx/c_src/wxe_memory.h
new file mode 100644
index 0000000000..ec22183bfa
--- /dev/null
+++ b/lib/wx/c_src/wxe_memory.h
@@ -0,0 +1,61 @@
+/*
+ * %CopyrightBegin%
+ *
+ * Copyright Ericsson AB 2014. 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%
+ */
+
+#ifndef _WXE_MEMORY_H
+#define _WXE_MEMORY_H
+
+class wxeMemEnv
+{
+public:
+ wxeMemEnv()
+ {
+ ref2ptr = (void **) driver_alloc(128*sizeof(void *));
+ ref2ptr[0] = NULL;
+ next = 1;
+ max = 128;
+ };
+ ~wxeMemEnv()
+ { driver_free(ref2ptr); };
+ int next;
+ int max;
+ void ** ref2ptr;
+ intList free;
+ ErlDrvTermData owner;
+};
+
+class wxeRefData {
+ public:
+ wxeRefData(unsigned int dref, int ttype, int is_new, wxeMemEnv *menv) :
+ ref(dref), type(ttype), alloc_in_erl(is_new), memenv(menv), pid(-1) { } ;
+ int ref;
+ int type;
+ // 0 = wxWindow subclasses, 1 = wxObject subclasses
+ // 2 = wxDialog subclasses, 3 = allocated wxObjects but not returned from new
+ // > 3 classes which lack virtual destr, or are supposed to be allocated on
+ // the stack
+ bool alloc_in_erl;
+ wxeMemEnv *memenv;
+ ErlDrvTermData pid;
+};
+
+WX_DECLARE_HASH_MAP(ErlDrvTermData, wxeMemEnv*, wxIntegerHash, wxIntegerEqual, wxeMemMap);
+
+WX_DECLARE_VOIDPTR_HASH_MAP(wxeRefData *, ptrMap);
+
+#endif
diff --git a/lib/wx/configure.in b/lib/wx/configure.in
index 12b4de6fe6..a96f1f2632 100755..100644
--- a/lib/wx/configure.in
+++ b/lib/wx/configure.in
@@ -183,7 +183,7 @@ AC_SUBST(OBJC_CFLAGS)
case $host_os in
darwin*)
- LDFLAGS="-bundle -flat_namespace -undefined warning -fPIC $LDFLAGS"
+ LDFLAGS="$MAC_MIN -bundle -flat_namespace -undefined warning -fPIC $LDFLAGS"
# Check sizof_void_p as future will hold 64bit MacOS wx
if test $ac_cv_sizeof_void_p = 4; then
LDFLAGS="-m32 $LDFLAGS"
@@ -211,20 +211,20 @@ dnl ----------------------------------------------------------------------
case $host_os in
mingw32)
DEBUG_CFLAGS="-g -Wall -DDEBUG $CFLAGS"
- CFLAGS="-g -Wall -O2 -fomit-frame-pointer -fno-strict-aliasing $CFLAGS"
+ CFLAGS="-g -Wall -O2 $CFLAGS -fomit-frame-pointer -fno-strict-aliasing"
;;
win32)
- DEBUG_CFLAGS="-g -Wall -DDEBUG $CFLAGS"
+ DEBUG_CFLAGS="-g -Wall $CFLAGS -DDEBUG"
CFLAGS="-g -Wall -O2 $CFLAGS"
;;
darwin*)
- DEBUG_CFLAGS="-g -Wall -fPIC -DDEBUG $CFLAGS"
- # Disable -02 crashes with xcode 5.0.2 (clang-500.2.79)
- CFLAGS="-g -Wall -fPIC -fomit-frame-pointer -fno-strict-aliasing $CFLAGS"
+ DEBUG_CFLAGS="-g -Wall -fPIC $CFLAGS -DDEBUG"
+ # omit-frame-pointer causes seg faults with 10.9 and clang
+ CFLAGS="-g -Wall -fPIC $CFLAGS -fno-strict-aliasing"
;;
*)
- DEBUG_CFLAGS="-g -Wall -fPIC -DDEBUG $CFLAGS"
- CFLAGS="-g -Wall -O2 -fPIC -fomit-frame-pointer -fno-strict-aliasing $CFLAGS"
+ DEBUG_CFLAGS="-g -Wall -fPIC $CFLAGS -DDEBUG"
+ CFLAGS="-g -Wall -O2 -fPIC $CFLAGS -fomit-frame-pointer -fno-strict-aliasing"
;;
esac
@@ -441,12 +441,12 @@ else
else
CWXWIN_PROG=`cygpath -d "$PROGRAMFILES" | cygpath -f - 2>/dev/null`
fi
- CWXWIN3=$CWXWIN_PROG/wxWidgets-2.*.*
- CWXWIN4=$CWXWIN_PROG/wxMSW-2.*.*
- CWX_DOCUMENTED="/opt/local/pgm/wxMSW-2.*.* /opt/local/pgm/wxWidgets-2.*.*"
+ CWXWIN3=$CWXWIN_PROG/wxWidgets-?.*.*
+ CWXWIN4=$CWXWIN_PROG/wxMSW-?.*.*
+ CWX_DOCUMENTED="/opt/local/pgm/wxMSW-?.*.* /opt/local/pgm/wxWidgets-?.*.*"
case $ac_cv_sizeof_void_p in
8)
- CWX_DOCUMENTED="/opt/local64/pgm/wxMSW-2.*.* /opt/local64/pgm/wxWidgets-2.*.* $CWX_DOCUMENTED"
+ CWX_DOCUMENTED="/opt/local64/pgm/wxMSW-?.*.* /opt/local64/pgm/wxWidgets-?.*.* $CWX_DOCUMENTED"
;;
*)
true
@@ -464,12 +464,14 @@ else
WX_CFLAGS="-EHsc -D_UNICODE -DUNICODE -I$WXINCLUDE_MSVC -I$WXINCLUDE_PLAIN -I$WXINCLUDE_CONTRIB -D__WXMSW__"
WX_CXXFLAGS="-TP $WX_CFLAGS"
WX_LIBDIR=$dir/lib/vc_lib
+ WX_LIBDIR64=$dir/lib/vc_x64_lib
WX_RESCOMP="rc.sh -I$WXINCLUDE_PLAIN -D __WIN32__"
RC_FILE_TYPE=res
- for lib in $WX_LIBDIR/wxbase*.lib $WX_LIBDIR2/wxbase*.lib; do
- maybe=`echo $lib | egrep 'wxbase[[0-9]]*u\.lib'`
+ for lib in $WX_LIBDIR $WX_LIBDIR64; do
+ maybe=`ls $lib/wxbase*.lib | egrep 'wxbase[[0-9]]*u\.lib'`
if test '!' -z "$maybe"; then
corelib_number=`echo $maybe | sed 's,.*\([[0-9]].\)u\.lib,\1,'`
+ WX_LIBDIR=$lib
break
fi
done
diff --git a/lib/wx/doc/src/notes.xml b/lib/wx/doc/src/notes.xml
index c330353dd4..daa61fda1e 100644
--- a/lib/wx/doc/src/notes.xml
+++ b/lib/wx/doc/src/notes.xml
@@ -31,6 +31,75 @@
<p>This document describes the changes made to the wxErlang
application.</p>
+<section><title>Wx 1.2</title>
+
+ <section><title>Fixed Bugs and Malfunctions</title>
+ <list>
+ <item>
+ <p>
+ Refactored C++ code, fixed crashes and a deadlock on
+ linux.</p>
+ <p>
+ Own Id: OTP-11586</p>
+ </item>
+ <item>
+ <p>
+ Some local implementations of removing the last element
+ from a list are replaced by <c>lists:droplast/1</c>. Note
+ that this requires at least <c>stdlib-2.0</c>, which is
+ the stdlib version delivered in OTP 17.0. (Thanks to Hans
+ Svensson)</p>
+ <p>
+ Own Id: OTP-11678</p>
+ </item>
+ <item>
+ <p>
+ Reworked the internal event handling to avoid crashes in
+ destroy objects. Thanks Tom for the bug report.</p>
+ <p>
+ Own Id: OTP-11699</p>
+ </item>
+ <item>
+ <p>
+ Application upgrade (appup) files are corrected for the
+ following applications: </p>
+ <p>
+ <c>asn1, common_test, compiler, crypto, debugger,
+ dialyzer, edoc, eldap, erl_docgen, et, eunit, gs, hipe,
+ inets, observer, odbc, os_mon, otp_mibs, parsetools,
+ percept, public_key, reltool, runtime_tools, ssh,
+ syntax_tools, test_server, tools, typer, webtool, wx,
+ xmerl</c></p>
+ <p>
+ A new test utility for testing appup files is added to
+ test_server. This is now used by most applications in
+ OTP.</p>
+ <p>
+ (Thanks to Tobias Schlager)</p>
+ <p>
+ Own Id: OTP-11744</p>
+ </item>
+ </list>
+ </section>
+
+</section>
+
+<section><title>Wx 1.1.2</title>
+
+ <section><title>Fixed Bugs and Malfunctions</title>
+ <list>
+ <item>
+ <p>
+ Fixed a problem which caused the debugger to crash when
+ closing a window. Fixed static linking on mac.</p>
+ <p>
+ Own Id: OTP-11444</p>
+ </item>
+ </list>
+ </section>
+
+</section>
+
<section><title>Wx 1.1.1</title>
<section><title>Fixed Bugs and Malfunctions</title>
diff --git a/lib/wx/include/wx.hrl b/lib/wx/include/wx.hrl
index aa1c81ac0f..ac852ce054 100644
--- a/lib/wx/include/wx.hrl
+++ b/lib/wx/include/wx.hrl
@@ -1,7 +1,7 @@
%%
%% %CopyrightBegin%
%%
-%% Copyright Ericsson AB 2008-2013. All Rights Reserved.
+%% Copyright Ericsson AB 2008-2014. 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
@@ -273,6 +273,10 @@
-type wxAuiManagerEventType() :: aui_pane_button | aui_pane_close | aui_pane_maximize | aui_pane_restore | aui_render | aui_find_manager.
-type wxAuiManager() :: #wxAuiManager{}. %% Callback event: {@link wxAuiManagerEvent}
+-record(wxInitDialog, {type :: wxInitDialogEventType()}). %% Callback event: {@link wxInitDialogEvent}
+-type wxInitDialogEventType() :: init_dialog.
+-type wxInitDialog() :: #wxInitDialog{}. %% Callback event: {@link wxInitDialogEvent}
+
-record(wxCommand,{type :: wxCommandEventType(), %% Callback event: {@link wxCommandEvent}
cmdString :: unicode:chardata(),
commandInt :: integer(),
@@ -312,8 +316,8 @@
-type wxTreeEventType() :: command_tree_begin_drag | command_tree_begin_rdrag | command_tree_begin_label_edit | command_tree_end_label_edit | command_tree_delete_item | command_tree_get_info | command_tree_set_info | command_tree_item_expanded | command_tree_item_expanding | command_tree_item_collapsed | command_tree_item_collapsing | command_tree_sel_changed | command_tree_sel_changing | command_tree_key_down | command_tree_item_activated | command_tree_item_right_click | command_tree_item_middle_click | command_tree_end_drag | command_tree_state_image_click | command_tree_item_gettooltip | command_tree_item_menu.
-type wxTree() :: #wxTree{}. %% Callback event: {@link wxTreeEvent}
--type event() :: wxAuiManager() | wxAuiNotebook() | wxCalendar() | wxChildFocus() | wxClipboardText() | wxClose() | wxColourPicker() | wxCommand() | wxContextMenu() | wxDate() | wxDisplayChanged() | wxErase() | wxFileDirPicker() | wxFocus() | wxFontPicker() | wxGrid() | wxHelp() | wxHtmlLink() | wxIconize() | wxIdle() | wxJoystick() | wxKey() | wxList() | wxMaximize() | wxMenu() | wxMouse() | wxMouseCaptureChanged() | wxMove() | wxNavigationKey() | wxNotebook() | wxPaint() | wxPaletteChanged() | wxQueryNewPalette() | wxSash() | wxScroll() | wxScrollWin() | wxSetCursor() | wxShow() | wxSize() | wxSpin() | wxSplitter() | wxStyledText() | wxSysColourChanged() | wxTaskBarIcon() | wxTree() | wxUpdateUI() | wxWindowCreate() | wxWindowDestroy().
--type wxEventType() :: wxAuiManagerEventType() | wxAuiNotebookEventType() | wxCalendarEventType() | wxChildFocusEventType() | wxClipboardTextEventType() | wxCloseEventType() | wxColourPickerEventType() | wxCommandEventType() | wxContextMenuEventType() | wxDateEventType() | wxDisplayChangedEventType() | wxEraseEventType() | wxFileDirPickerEventType() | wxFocusEventType() | wxFontPickerEventType() | wxGridEventType() | wxHelpEventType() | wxHtmlLinkEventType() | wxIconizeEventType() | wxIdleEventType() | wxJoystickEventType() | wxKeyEventType() | wxListEventType() | wxMaximizeEventType() | wxMenuEventType() | wxMouseCaptureChangedEventType() | wxMouseEventType() | wxMoveEventType() | wxNavigationKeyEventType() | wxNotebookEventType() | wxPaintEventType() | wxPaletteChangedEventType() | wxQueryNewPaletteEventType() | wxSashEventType() | wxScrollEventType() | wxScrollWinEventType() | wxSetCursorEventType() | wxShowEventType() | wxSizeEventType() | wxSpinEventType() | wxSplitterEventType() | wxStyledTextEventType() | wxSysColourChangedEventType() | wxTaskBarIconEventType() | wxTreeEventType() | wxUpdateUIEventType() | wxWindowCreateEventType() | wxWindowDestroyEventType().
+-type event() :: wxAuiManager() | wxAuiNotebook() | wxCalendar() | wxChildFocus() | wxClipboardText() | wxClose() | wxColourPicker() | wxCommand() | wxContextMenu() | wxDate() | wxDisplayChanged() | wxErase() | wxFileDirPicker() | wxFocus() | wxFontPicker() | wxGrid() | wxHelp() | wxHtmlLink() | wxIconize() | wxIdle() | wxInitDialog() | wxJoystick() | wxKey() | wxList() | wxMaximize() | wxMenu() | wxMouse() | wxMouseCaptureChanged() | wxMove() | wxNavigationKey() | wxNotebook() | wxPaint() | wxPaletteChanged() | wxQueryNewPalette() | wxSash() | wxScroll() | wxScrollWin() | wxSetCursor() | wxShow() | wxSize() | wxSpin() | wxSplitter() | wxStyledText() | wxSysColourChanged() | wxTaskBarIcon() | wxTree() | wxUpdateUI() | wxWindowCreate() | wxWindowDestroy().
+-type wxEventType() :: wxAuiManagerEventType() | wxAuiNotebookEventType() | wxCalendarEventType() | wxChildFocusEventType() | wxClipboardTextEventType() | wxCloseEventType() | wxColourPickerEventType() | wxCommandEventType() | wxContextMenuEventType() | wxDateEventType() | wxDisplayChangedEventType() | wxEraseEventType() | wxFileDirPickerEventType() | wxFocusEventType() | wxFontPickerEventType() | wxGridEventType() | wxHelpEventType() | wxHtmlLinkEventType() | wxIconizeEventType() | wxIdleEventType() | wxInitDialogEventType() | wxJoystickEventType() | wxKeyEventType() | wxListEventType() | wxMaximizeEventType() | wxMenuEventType() | wxMouseCaptureChangedEventType() | wxMouseEventType() | wxMoveEventType() | wxNavigationKeyEventType() | wxNotebookEventType() | wxPaintEventType() | wxPaletteChangedEventType() | wxQueryNewPaletteEventType() | wxSashEventType() | wxScrollEventType() | wxScrollWinEventType() | wxSetCursorEventType() | wxShowEventType() | wxSizeEventType() | wxSpinEventType() | wxSplitterEventType() | wxStyledTextEventType() | wxSysColourChangedEventType() | wxTaskBarIconEventType() | wxTreeEventType() | wxUpdateUIEventType() | wxWindowCreateEventType() | wxWindowDestroyEventType().
%% Hardcoded Records
-record(wxMouseState, {x :: integer(), y :: integer(),
@@ -1976,10 +1980,255 @@
-define(wxIMAGELIST_DRAW_SELECTED, 4).
-define(wxIMAGELIST_DRAW_TRANSPARENT, 2).
-define(wxIMAGELIST_DRAW_NORMAL, 1).
+% From "intl.h": wxLanguage
+-define(wxLANGUAGE_DEFAULT, 0).
+-define(wxLANGUAGE_UNKNOWN, 1).
+-define(wxLANGUAGE_ABKHAZIAN, 2).
+-define(wxLANGUAGE_AFAR, 3).
+-define(wxLANGUAGE_AFRIKAANS, 4).
+-define(wxLANGUAGE_ALBANIAN, 5).
+-define(wxLANGUAGE_AMHARIC, 6).
+-define(wxLANGUAGE_ARABIC, 7).
+-define(wxLANGUAGE_ARABIC_ALGERIA, 8).
+-define(wxLANGUAGE_ARABIC_BAHRAIN, 9).
+-define(wxLANGUAGE_ARABIC_EGYPT, 10).
+-define(wxLANGUAGE_ARABIC_IRAQ, 11).
+-define(wxLANGUAGE_ARABIC_JORDAN, 12).
+-define(wxLANGUAGE_ARABIC_KUWAIT, 13).
+-define(wxLANGUAGE_ARABIC_LEBANON, 14).
+-define(wxLANGUAGE_ARABIC_LIBYA, 15).
+-define(wxLANGUAGE_ARABIC_MOROCCO, 16).
+-define(wxLANGUAGE_ARABIC_OMAN, 17).
+-define(wxLANGUAGE_ARABIC_QATAR, 18).
+-define(wxLANGUAGE_ARABIC_SAUDI_ARABIA, 19).
+-define(wxLANGUAGE_ARABIC_SUDAN, 20).
+-define(wxLANGUAGE_ARABIC_SYRIA, 21).
+-define(wxLANGUAGE_ARABIC_TUNISIA, 22).
+-define(wxLANGUAGE_ARABIC_UAE, 23).
+-define(wxLANGUAGE_ARABIC_YEMEN, 24).
+-define(wxLANGUAGE_ARMENIAN, 25).
+-define(wxLANGUAGE_ASSAMESE, 26).
+-define(wxLANGUAGE_AYMARA, 27).
+-define(wxLANGUAGE_AZERI, 28).
+-define(wxLANGUAGE_AZERI_CYRILLIC, 29).
+-define(wxLANGUAGE_AZERI_LATIN, 30).
+-define(wxLANGUAGE_BASHKIR, 31).
+-define(wxLANGUAGE_BASQUE, 32).
+-define(wxLANGUAGE_BELARUSIAN, 33).
+-define(wxLANGUAGE_BENGALI, 34).
+-define(wxLANGUAGE_BHUTANI, 35).
+-define(wxLANGUAGE_BIHARI, 36).
+-define(wxLANGUAGE_BISLAMA, 37).
+-define(wxLANGUAGE_BRETON, 38).
+-define(wxLANGUAGE_BULGARIAN, 39).
+-define(wxLANGUAGE_BURMESE, 40).
+-define(wxLANGUAGE_CAMBODIAN, 41).
+-define(wxLANGUAGE_CATALAN, 42).
+-define(wxLANGUAGE_CHINESE, 43).
+-define(wxLANGUAGE_CHINESE_SIMPLIFIED, 44).
+-define(wxLANGUAGE_CHINESE_TRADITIONAL, 45).
+-define(wxLANGUAGE_CHINESE_HONGKONG, 46).
+-define(wxLANGUAGE_CHINESE_MACAU, 47).
+-define(wxLANGUAGE_CHINESE_SINGAPORE, 48).
+-define(wxLANGUAGE_CHINESE_TAIWAN, 49).
+-define(wxLANGUAGE_CORSICAN, 50).
+-define(wxLANGUAGE_CROATIAN, 51).
+-define(wxLANGUAGE_CZECH, 52).
+-define(wxLANGUAGE_DANISH, 53).
+-define(wxLANGUAGE_DUTCH, 54).
+-define(wxLANGUAGE_DUTCH_BELGIAN, 55).
+-define(wxLANGUAGE_ENGLISH, 56).
+-define(wxLANGUAGE_ENGLISH_UK, 57).
+-define(wxLANGUAGE_ENGLISH_US, 58).
+-define(wxLANGUAGE_ENGLISH_AUSTRALIA, 59).
+-define(wxLANGUAGE_ENGLISH_BELIZE, 60).
+-define(wxLANGUAGE_ENGLISH_BOTSWANA, 61).
+-define(wxLANGUAGE_ENGLISH_CANADA, 62).
+-define(wxLANGUAGE_ENGLISH_CARIBBEAN, 63).
+-define(wxLANGUAGE_ENGLISH_DENMARK, 64).
+-define(wxLANGUAGE_ENGLISH_EIRE, 65).
+-define(wxLANGUAGE_ENGLISH_JAMAICA, 66).
+-define(wxLANGUAGE_ENGLISH_NEW_ZEALAND, 67).
+-define(wxLANGUAGE_ENGLISH_PHILIPPINES, 68).
+-define(wxLANGUAGE_ENGLISH_SOUTH_AFRICA, 69).
+-define(wxLANGUAGE_ENGLISH_TRINIDAD, 70).
+-define(wxLANGUAGE_ENGLISH_ZIMBABWE, 71).
+-define(wxLANGUAGE_ESPERANTO, 72).
+-define(wxLANGUAGE_ESTONIAN, 73).
+-define(wxLANGUAGE_FAEROESE, 74).
+-define(wxLANGUAGE_FARSI, 75).
+-define(wxLANGUAGE_FIJI, 76).
+-define(wxLANGUAGE_FINNISH, 77).
+-define(wxLANGUAGE_FRENCH, 78).
+-define(wxLANGUAGE_FRENCH_BELGIAN, 79).
+-define(wxLANGUAGE_FRENCH_CANADIAN, 80).
+-define(wxLANGUAGE_FRENCH_LUXEMBOURG, 81).
+-define(wxLANGUAGE_FRENCH_MONACO, 82).
+-define(wxLANGUAGE_FRENCH_SWISS, 83).
+-define(wxLANGUAGE_FRISIAN, 84).
+-define(wxLANGUAGE_GALICIAN, 85).
+-define(wxLANGUAGE_GEORGIAN, 86).
+-define(wxLANGUAGE_GERMAN, 87).
+-define(wxLANGUAGE_GERMAN_AUSTRIAN, 88).
+-define(wxLANGUAGE_GERMAN_BELGIUM, 89).
+-define(wxLANGUAGE_GERMAN_LIECHTENSTEIN, 90).
+-define(wxLANGUAGE_GERMAN_LUXEMBOURG, 91).
+-define(wxLANGUAGE_GERMAN_SWISS, 92).
+-define(wxLANGUAGE_GREEK, 93).
+-define(wxLANGUAGE_GREENLANDIC, 94).
+-define(wxLANGUAGE_GUARANI, 95).
+-define(wxLANGUAGE_GUJARATI, 96).
+-define(wxLANGUAGE_HAUSA, 97).
+-define(wxLANGUAGE_HEBREW, 98).
+-define(wxLANGUAGE_HINDI, 99).
+-define(wxLANGUAGE_HUNGARIAN, 100).
+-define(wxLANGUAGE_ICELANDIC, 101).
+-define(wxLANGUAGE_INDONESIAN, 102).
+-define(wxLANGUAGE_INTERLINGUA, 103).
+-define(wxLANGUAGE_INTERLINGUE, 104).
+-define(wxLANGUAGE_INUKTITUT, 105).
+-define(wxLANGUAGE_INUPIAK, 106).
+-define(wxLANGUAGE_IRISH, 107).
+-define(wxLANGUAGE_ITALIAN, 108).
+-define(wxLANGUAGE_ITALIAN_SWISS, 109).
+-define(wxLANGUAGE_JAPANESE, 110).
+-define(wxLANGUAGE_JAVANESE, 111).
+-define(wxLANGUAGE_KANNADA, 112).
+-define(wxLANGUAGE_KASHMIRI, 113).
+-define(wxLANGUAGE_KASHMIRI_INDIA, 114).
+-define(wxLANGUAGE_KAZAKH, 115).
+-define(wxLANGUAGE_KERNEWEK, 116).
+-define(wxLANGUAGE_KINYARWANDA, 117).
+-define(wxLANGUAGE_KIRGHIZ, 118).
+-define(wxLANGUAGE_KIRUNDI, 119).
+-define(wxLANGUAGE_KONKANI, 120).
+-define(wxLANGUAGE_KOREAN, 121).
+-define(wxLANGUAGE_KURDISH, 122).
+-define(wxLANGUAGE_LAOTHIAN, 123).
+-define(wxLANGUAGE_LATIN, 124).
+-define(wxLANGUAGE_LATVIAN, 125).
+-define(wxLANGUAGE_LINGALA, 126).
+-define(wxLANGUAGE_LITHUANIAN, 127).
+-define(wxLANGUAGE_MACEDONIAN, 128).
+-define(wxLANGUAGE_MALAGASY, 129).
+-define(wxLANGUAGE_MALAY, 130).
+-define(wxLANGUAGE_MALAYALAM, 131).
+-define(wxLANGUAGE_MALAY_BRUNEI_DARUSSALAM, 132).
+-define(wxLANGUAGE_MALAY_MALAYSIA, 133).
+-define(wxLANGUAGE_MALTESE, 134).
+-define(wxLANGUAGE_MANIPURI, 135).
+-define(wxLANGUAGE_MAORI, 136).
+-define(wxLANGUAGE_MARATHI, 137).
+-define(wxLANGUAGE_MOLDAVIAN, 138).
+-define(wxLANGUAGE_MONGOLIAN, 139).
+-define(wxLANGUAGE_NAURU, 140).
+-define(wxLANGUAGE_NEPALI, 141).
+-define(wxLANGUAGE_NEPALI_INDIA, 142).
+-define(wxLANGUAGE_NORWEGIAN_BOKMAL, 143).
+-define(wxLANGUAGE_NORWEGIAN_NYNORSK, 144).
+-define(wxLANGUAGE_OCCITAN, 145).
+-define(wxLANGUAGE_ORIYA, 146).
+-define(wxLANGUAGE_OROMO, 147).
+-define(wxLANGUAGE_PASHTO, 148).
+-define(wxLANGUAGE_POLISH, 149).
+-define(wxLANGUAGE_PORTUGUESE, 150).
+-define(wxLANGUAGE_PORTUGUESE_BRAZILIAN, 151).
+-define(wxLANGUAGE_PUNJABI, 152).
+-define(wxLANGUAGE_QUECHUA, 153).
+-define(wxLANGUAGE_RHAETO_ROMANCE, 154).
+-define(wxLANGUAGE_ROMANIAN, 155).
+-define(wxLANGUAGE_RUSSIAN, 156).
+-define(wxLANGUAGE_RUSSIAN_UKRAINE, 157).
+-define(wxLANGUAGE_SAMOAN, 158).
+-define(wxLANGUAGE_SANGHO, 159).
+-define(wxLANGUAGE_SANSKRIT, 160).
+-define(wxLANGUAGE_SCOTS_GAELIC, 161).
+-define(wxLANGUAGE_SERBIAN, 162).
+-define(wxLANGUAGE_SERBIAN_CYRILLIC, 163).
+-define(wxLANGUAGE_SERBIAN_LATIN, 164).
+-define(wxLANGUAGE_SERBO_CROATIAN, 165).
+-define(wxLANGUAGE_SESOTHO, 166).
+-define(wxLANGUAGE_SETSWANA, 167).
+-define(wxLANGUAGE_SHONA, 168).
+-define(wxLANGUAGE_SINDHI, 169).
+-define(wxLANGUAGE_SINHALESE, 170).
+-define(wxLANGUAGE_SISWATI, 171).
+-define(wxLANGUAGE_SLOVAK, 172).
+-define(wxLANGUAGE_SLOVENIAN, 173).
+-define(wxLANGUAGE_SOMALI, 174).
+-define(wxLANGUAGE_SPANISH, 175).
+-define(wxLANGUAGE_SPANISH_ARGENTINA, 176).
+-define(wxLANGUAGE_SPANISH_BOLIVIA, 177).
+-define(wxLANGUAGE_SPANISH_CHILE, 178).
+-define(wxLANGUAGE_SPANISH_COLOMBIA, 179).
+-define(wxLANGUAGE_SPANISH_COSTA_RICA, 180).
+-define(wxLANGUAGE_SPANISH_DOMINICAN_REPUBLIC, 181).
+-define(wxLANGUAGE_SPANISH_ECUADOR, 182).
+-define(wxLANGUAGE_SPANISH_EL_SALVADOR, 183).
+-define(wxLANGUAGE_SPANISH_GUATEMALA, 184).
+-define(wxLANGUAGE_SPANISH_HONDURAS, 185).
+-define(wxLANGUAGE_SPANISH_MEXICAN, 186).
+-define(wxLANGUAGE_SPANISH_MODERN, 187).
+-define(wxLANGUAGE_SPANISH_NICARAGUA, 188).
+-define(wxLANGUAGE_SPANISH_PANAMA, 189).
+-define(wxLANGUAGE_SPANISH_PARAGUAY, 190).
+-define(wxLANGUAGE_SPANISH_PERU, 191).
+-define(wxLANGUAGE_SPANISH_PUERTO_RICO, 192).
+-define(wxLANGUAGE_SPANISH_URUGUAY, 193).
+-define(wxLANGUAGE_SPANISH_US, 194).
+-define(wxLANGUAGE_SPANISH_VENEZUELA, 195).
+-define(wxLANGUAGE_SUNDANESE, 196).
+-define(wxLANGUAGE_SWAHILI, 197).
+-define(wxLANGUAGE_SWEDISH, 198).
+-define(wxLANGUAGE_SWEDISH_FINLAND, 199).
+-define(wxLANGUAGE_TAGALOG, 200).
+-define(wxLANGUAGE_TAJIK, 201).
+-define(wxLANGUAGE_TAMIL, 202).
+-define(wxLANGUAGE_TATAR, 203).
+-define(wxLANGUAGE_TELUGU, 204).
+-define(wxLANGUAGE_THAI, 205).
+-define(wxLANGUAGE_TIBETAN, 206).
+-define(wxLANGUAGE_TIGRINYA, 207).
+-define(wxLANGUAGE_TONGA, 208).
+-define(wxLANGUAGE_TSONGA, 209).
+-define(wxLANGUAGE_TURKISH, 210).
+-define(wxLANGUAGE_TURKMEN, 211).
+-define(wxLANGUAGE_TWI, 212).
+-define(wxLANGUAGE_UIGHUR, 213).
+-define(wxLANGUAGE_UKRAINIAN, 214).
+-define(wxLANGUAGE_URDU, 215).
+-define(wxLANGUAGE_URDU_INDIA, 216).
+-define(wxLANGUAGE_URDU_PAKISTAN, 217).
+-define(wxLANGUAGE_UZBEK, 218).
+-define(wxLANGUAGE_UZBEK_CYRILLIC, 219).
+-define(wxLANGUAGE_UZBEK_LATIN, 220).
+-define(wxLANGUAGE_VIETNAMESE, 221).
+-define(wxLANGUAGE_VOLAPUK, 222).
+-define(wxLANGUAGE_WELSH, 223).
+-define(wxLANGUAGE_WOLOF, 224).
+-define(wxLANGUAGE_XHOSA, 225).
+-define(wxLANGUAGE_YIDDISH, 226).
+-define(wxLANGUAGE_YORUBA, 227).
+-define(wxLANGUAGE_ZHUANG, 228).
+-define(wxLANGUAGE_ZULU, 229).
+-define(wxLANGUAGE_USER_DEFINED, 230).
+-define(wxLANGUAGE_VALENCIAN, 536870911).
+-define(wxLANGUAGE_SAMI, 536870912).
% From "intl.h": wxLayoutDirection
-define(wxLayout_Default, 0).
-define(wxLayout_LeftToRight, 1).
-define(wxLayout_RightToLeft, 2).
+% From "intl.h": wxLocaleCategory
+-define(wxLOCALE_CAT_NUMBER, 0).
+-define(wxLOCALE_CAT_DATE, 1).
+-define(wxLOCALE_CAT_MONEY, 2).
+-define(wxLOCALE_CAT_MAX, 3).
+% From "intl.h": wxLocaleInfo
+-define(wxLOCALE_THOUSANDS_SEP, 0).
+-define(wxLOCALE_DECIMAL_POINT, 1).
+% From "intl.h": wxLocaleInitFlags
+-define(wxLOCALE_LOAD_DEFAULT, 1).
+-define(wxLOCALE_CONV_ENCODING, 2).
% From "layout.h"
-define(wxLAYOUT_DEFAULT_MARGIN, 0).
% From "layout.h": wxEdge
diff --git a/lib/wx/priv/erlang-logo128.png b/lib/wx/priv/erlang-logo128.png
new file mode 100644
index 0000000000..33d1475cea
--- /dev/null
+++ b/lib/wx/priv/erlang-logo128.png
Binary files differ
diff --git a/lib/wx/priv/erlang-logo32.png b/lib/wx/priv/erlang-logo32.png
index a4afed8140..efddf5c5f9 100644
--- a/lib/wx/priv/erlang-logo32.png
+++ b/lib/wx/priv/erlang-logo32.png
Binary files differ
diff --git a/lib/wx/priv/erlang-logo64.png b/lib/wx/priv/erlang-logo64.png
index 91dfbbab53..b7d2128cdb 100644
--- a/lib/wx/priv/erlang-logo64.png
+++ b/lib/wx/priv/erlang-logo64.png
Binary files differ
diff --git a/lib/wx/src/gen/wxBufferedDC.erl b/lib/wx/src/gen/wxBufferedDC.erl
index c69a426d7f..e2504bbaaa 100644
--- a/lib/wx/src/gen/wxBufferedDC.erl
+++ b/lib/wx/src/gen/wxBufferedDC.erl
@@ -1,7 +1,7 @@
%%
%% %CopyrightBegin%
%%
-%% Copyright Ericsson AB 2008-2013. All Rights Reserved.
+%% Copyright Ericsson AB 2008-2014. 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
@@ -54,6 +54,8 @@
setUserScale/3,startDoc/2,startPage/1]).
-export_type([wxBufferedDC/0]).
+-compile([{nowarn_deprecated_function, {wxDC,computeScaleAndOrigin,1}}]).
+
%% @hidden
parent_class(wxMemoryDC) -> true;
parent_class(wxDC) -> true;
diff --git a/lib/wx/src/gen/wxBufferedPaintDC.erl b/lib/wx/src/gen/wxBufferedPaintDC.erl
index 0e11826da0..c3fa80703c 100644
--- a/lib/wx/src/gen/wxBufferedPaintDC.erl
+++ b/lib/wx/src/gen/wxBufferedPaintDC.erl
@@ -1,7 +1,7 @@
%%
%% %CopyrightBegin%
%%
-%% Copyright Ericsson AB 2008-2013. All Rights Reserved.
+%% Copyright Ericsson AB 2008-2014. 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
@@ -56,6 +56,8 @@
startPage/1]).
-export_type([wxBufferedPaintDC/0]).
+-compile([{nowarn_deprecated_function, {wxDC,computeScaleAndOrigin,1}}]).
+
%% @hidden
parent_class(wxBufferedDC) -> true;
parent_class(wxMemoryDC) -> true;
diff --git a/lib/wx/src/gen/wxClientDC.erl b/lib/wx/src/gen/wxClientDC.erl
index 45909859ce..ae16196774 100644
--- a/lib/wx/src/gen/wxClientDC.erl
+++ b/lib/wx/src/gen/wxClientDC.erl
@@ -1,7 +1,7 @@
%%
%% %CopyrightBegin%
%%
-%% Copyright Ericsson AB 2008-2013. All Rights Reserved.
+%% Copyright Ericsson AB 2008-2014. 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
@@ -56,6 +56,8 @@
-export_type([wxClientDC/0]).
-deprecated([new/0]).
+-compile([{nowarn_deprecated_function, {wxDC,computeScaleAndOrigin,1}}]).
+
%% @hidden
parent_class(wxWindowDC) -> true;
parent_class(wxDC) -> true;
diff --git a/lib/wx/src/gen/wxEvtHandler.erl b/lib/wx/src/gen/wxEvtHandler.erl
index 22c203392c..44b7254cfb 100644
--- a/lib/wx/src/gen/wxEvtHandler.erl
+++ b/lib/wx/src/gen/wxEvtHandler.erl
@@ -1,7 +1,7 @@
%%
%% %CopyrightBegin%
%%
-%% Copyright Ericsson AB 2008-2012. All Rights Reserved.
+%% Copyright Ericsson AB 2008-2014. 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
@@ -46,15 +46,11 @@
-export([connect/2, connect/3, disconnect/1, disconnect/2, disconnect/3]).
%% internal exports
--export([connect_impl/3, disconnect_impl/2, disconnect_impl/3,
- new_evt_listener/0, destroy_evt_listener/1,
- get_callback/1, replace_fun_with_id/2]).
+-export([connect_impl/2, disconnect_impl/2]).
-export_type([wxEvtHandler/0, wx/0, event/0]).
-type wxEvtHandler() :: wx:wx_object().
--record(evh, {et=null,id=?wxID_ANY,lastId=?wxID_ANY,skip=undefined,userdata=[],cb=0}).
-
%% @doc Equivalent to {@link connect/3. connect(This, EventType, [])}
-spec connect(This::wxEvtHandler(), EventType::wxEventType()) -> ok.
connect(This, EventType) ->
@@ -149,55 +145,35 @@ disconnect(This=#wx_ref{type=ThisT,ref=_ThisRef}, EventType, Opts) ->
%% @hidden
-connect_impl(#wx_ref{type=wxeEvtListener,ref=EvtList},
- #wx_ref{type=ThisT,ref=ThisRef},
- #evh{id=Winid, lastId=LastId, et=EventType,
- skip=Skip, userdata=Userdata, cb=FunID})
+connect_impl(#wx_ref{type=ThisT,ref=ThisRef},
+ #evh{id=Winid, lastId=LastId, et=EventType,
+ skip=Skip, userdata=Userdata, cb=FunID})
when is_integer(FunID)->
EventTypeBin = list_to_binary([atom_to_list(EventType)|[0]]),
ThisTypeBin = list_to_binary([atom_to_list(ThisT)|[0]]),
UD = if Userdata =:= [] -> 0;
- true ->
+ true ->
wxe_util:send_bin(term_to_binary(Userdata)),
1
end,
- wxe_util:call(100, <<EvtList:32/?UI,ThisRef:32/?UI,
+ wxe_util:call(100, <<ThisRef:32/?UI,
Winid:32/?UI,LastId:32/?UI,
(wxe_util:from_bool(Skip)):32/?UI,
UD:32/?UI,
FunID:32/?UI,
(size(EventTypeBin)):32/?UI,
- (size(ThisTypeBin)):32/?UI,
+ (size(ThisTypeBin)):32/?UI,
%% Note no alignment
EventTypeBin/binary,ThisTypeBin/binary>>).
%% @hidden
-disconnect_impl(Listener, Object) ->
- disconnect_impl(Listener, Object, #evh{}).
-%% @hidden
-disconnect_impl(#wx_ref{type=wxeEvtListener,ref=EvtList},
- #wx_ref{type=_ThisT,ref=ThisRef},
- #evh{id=Winid, lastId=LastId, et=EventType}) ->
+disconnect_impl(#wx_ref{type=_ThisT,ref=ThisRef},
+ #evh{id=Winid, lastId=LastId, et=EventType,
+ handler=#wx_ref{type=wxeEvtListener,ref=EvtList}}) ->
EventTypeBin = list_to_binary([atom_to_list(EventType)|[0]]),
- wxe_util:call(101, <<EvtList:32/?UI,
+ wxe_util:call(101, <<EvtList:32/?UI,
ThisRef:32/?UI,Winid:32/?UI,LastId:32/?UI,
(size(EventTypeBin)):32/?UI,
%% Note no alignment
EventTypeBin/binary>>).
-%% @hidden
-new_evt_listener() ->
- wxe_util:call(98, <<>>).
-
-%% @hidden
-destroy_evt_listener(#wx_ref{type=wxeEvtListener,ref=EvtList}) ->
- wxe_util:call(99, <<EvtList:32/?UI>>).
-
-%% @hidden
-get_callback(#evh{cb=Callback}) ->
- Callback.
-
-%% @hidden
-replace_fun_with_id(Evh, Id) ->
- Evh#evh{cb=Id}.
-
diff --git a/lib/wx/src/gen/wxGridCellBoolEditor.erl b/lib/wx/src/gen/wxGridCellBoolEditor.erl
index bf7e21d11d..c4d6d92618 100644
--- a/lib/wx/src/gen/wxGridCellBoolEditor.erl
+++ b/lib/wx/src/gen/wxGridCellBoolEditor.erl
@@ -1,7 +1,7 @@
%%
%% %CopyrightBegin%
%%
-%% Copyright Ericsson AB 2009-2013. All Rights Reserved.
+%% Copyright Ericsson AB 2009-2014. 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
@@ -34,6 +34,8 @@
parent_class/1,reset/1,setSize/2,show/2,show/3,startingClick/1,startingKey/2]).
-export_type([wxGridCellBoolEditor/0]).
+-compile([{nowarn_deprecated_function, {wxGridCellEditor,endEdit,4}},{nowarn_deprecated_function, {wxGridCellEditor,paintBackground,3}}]).
+
%% @hidden
parent_class(wxGridCellEditor) -> true;
parent_class(_Class) -> erlang:error({badtype, ?MODULE}).
diff --git a/lib/wx/src/gen/wxGridCellChoiceEditor.erl b/lib/wx/src/gen/wxGridCellChoiceEditor.erl
index 08c5f9e147..a49680ffda 100644
--- a/lib/wx/src/gen/wxGridCellChoiceEditor.erl
+++ b/lib/wx/src/gen/wxGridCellChoiceEditor.erl
@@ -1,7 +1,7 @@
%%
%% %CopyrightBegin%
%%
-%% Copyright Ericsson AB 2009-2013. All Rights Reserved.
+%% Copyright Ericsson AB 2009-2014. 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
@@ -34,6 +34,8 @@
parent_class/1,reset/1,setSize/2,show/2,show/3,startingClick/1,startingKey/2]).
-export_type([wxGridCellChoiceEditor/0]).
+-compile([{nowarn_deprecated_function, {wxGridCellEditor,endEdit,4}},{nowarn_deprecated_function, {wxGridCellEditor,paintBackground,3}}]).
+
%% @hidden
parent_class(wxGridCellEditor) -> true;
parent_class(_Class) -> erlang:error({badtype, ?MODULE}).
diff --git a/lib/wx/src/gen/wxGridCellFloatEditor.erl b/lib/wx/src/gen/wxGridCellFloatEditor.erl
index 4b6b3b46e1..5cd0bd6cb5 100644
--- a/lib/wx/src/gen/wxGridCellFloatEditor.erl
+++ b/lib/wx/src/gen/wxGridCellFloatEditor.erl
@@ -1,7 +1,7 @@
%%
%% %CopyrightBegin%
%%
-%% Copyright Ericsson AB 2009-2013. All Rights Reserved.
+%% Copyright Ericsson AB 2009-2014. 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
@@ -34,6 +34,8 @@
parent_class/1,reset/1,setSize/2,show/2,show/3,startingClick/1,startingKey/2]).
-export_type([wxGridCellFloatEditor/0]).
+-compile([{nowarn_deprecated_function, {wxGridCellEditor,endEdit,4}},{nowarn_deprecated_function, {wxGridCellEditor,paintBackground,3}}]).
+
%% @hidden
parent_class(wxGridCellEditor) -> true;
parent_class(_Class) -> erlang:error({badtype, ?MODULE}).
diff --git a/lib/wx/src/gen/wxGridCellNumberEditor.erl b/lib/wx/src/gen/wxGridCellNumberEditor.erl
index 04214be6b8..7cc682a10e 100644
--- a/lib/wx/src/gen/wxGridCellNumberEditor.erl
+++ b/lib/wx/src/gen/wxGridCellNumberEditor.erl
@@ -1,7 +1,7 @@
%%
%% %CopyrightBegin%
%%
-%% Copyright Ericsson AB 2009-2013. All Rights Reserved.
+%% Copyright Ericsson AB 2009-2014. 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
@@ -35,6 +35,8 @@
parent_class/1,reset/1,setSize/2,show/2,show/3,startingClick/1,startingKey/2]).
-export_type([wxGridCellNumberEditor/0]).
+-compile([{nowarn_deprecated_function, {wxGridCellEditor,endEdit,4}},{nowarn_deprecated_function, {wxGridCellEditor,paintBackground,3}}]).
+
%% @hidden
parent_class(wxGridCellTextEditor) -> true;
parent_class(wxGridCellEditor) -> true;
diff --git a/lib/wx/src/gen/wxGridCellTextEditor.erl b/lib/wx/src/gen/wxGridCellTextEditor.erl
index 5755be8638..a024da56c4 100644
--- a/lib/wx/src/gen/wxGridCellTextEditor.erl
+++ b/lib/wx/src/gen/wxGridCellTextEditor.erl
@@ -1,7 +1,7 @@
%%
%% %CopyrightBegin%
%%
-%% Copyright Ericsson AB 2009-2013. All Rights Reserved.
+%% Copyright Ericsson AB 2009-2014. 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
@@ -34,6 +34,8 @@
parent_class/1,reset/1,setSize/2,show/2,show/3,startingClick/1,startingKey/2]).
-export_type([wxGridCellTextEditor/0]).
+-compile([{nowarn_deprecated_function, {wxGridCellEditor,endEdit,4}},{nowarn_deprecated_function, {wxGridCellEditor,paintBackground,3}}]).
+
%% @hidden
parent_class(wxGridCellEditor) -> true;
parent_class(_Class) -> erlang:error({badtype, ?MODULE}).
diff --git a/lib/wx/src/gen/wxInitDialogEvent.erl b/lib/wx/src/gen/wxInitDialogEvent.erl
new file mode 100644
index 0000000000..c8fe6042ac
--- /dev/null
+++ b/lib/wx/src/gen/wxInitDialogEvent.erl
@@ -0,0 +1,64 @@
+%%
+%% %CopyrightBegin%
+%%
+%% Copyright Ericsson AB 2008-2014. 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%
+%% This file is generated DO NOT EDIT
+
+%% @doc See external documentation: <a href="http://www.wxwidgets.org/manuals/2.8.12/wx_wxinitdialogevent.html">wxInitDialogEvent</a>.
+%% <dl><dt>Use {@link wxEvtHandler:connect/3.} with EventType:</dt>
+%% <dd><em>init_dialog</em></dd></dl>
+%% See also the message variant {@link wxEvtHandler:wxInitDialog(). #wxInitDialog{}} event record type.
+%%
+%% <p>This class is derived (and can use functions) from:
+%% <br />{@link wxEvent}
+%% </p>
+%% @type wxInitDialogEvent(). An object reference, The representation is internal
+%% and can be changed without notice. It can't be used for comparsion
+%% stored on disc or distributed for use on other nodes.
+
+-module(wxInitDialogEvent).
+-include("wxe.hrl").
+-export([]).
+
+%% inherited exports
+-export([getId/1,getSkipped/1,getTimestamp/1,isCommandEvent/1,parent_class/1,
+ resumePropagation/2,shouldPropagate/1,skip/1,skip/2,stopPropagation/1]).
+
+-export_type([wxInitDialogEvent/0]).
+%% @hidden
+parent_class(wxEvent) -> true;
+parent_class(_Class) -> erlang:error({badtype, ?MODULE}).
+
+-type wxInitDialogEvent() :: wx:wx_object().
+ %% From wxEvent
+%% @hidden
+stopPropagation(This) -> wxEvent:stopPropagation(This).
+%% @hidden
+skip(This, Options) -> wxEvent:skip(This, Options).
+%% @hidden
+skip(This) -> wxEvent:skip(This).
+%% @hidden
+shouldPropagate(This) -> wxEvent:shouldPropagate(This).
+%% @hidden
+resumePropagation(This,PropagationLevel) -> wxEvent:resumePropagation(This,PropagationLevel).
+%% @hidden
+isCommandEvent(This) -> wxEvent:isCommandEvent(This).
+%% @hidden
+getTimestamp(This) -> wxEvent:getTimestamp(This).
+%% @hidden
+getSkipped(This) -> wxEvent:getSkipped(This).
+%% @hidden
+getId(This) -> wxEvent:getId(This).
diff --git a/lib/wx/src/gen/wxLocale.erl b/lib/wx/src/gen/wxLocale.erl
new file mode 100644
index 0000000000..a1a418bcee
--- /dev/null
+++ b/lib/wx/src/gen/wxLocale.erl
@@ -0,0 +1,278 @@
+%%
+%% %CopyrightBegin%
+%%
+%% Copyright Ericsson AB 2008-2014. 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%
+%% This file is generated DO NOT EDIT
+
+%% @doc See external documentation: <a href="http://www.wxwidgets.org/manuals/2.8.12/wx_wxlocale.html">wxLocale</a>.
+%% @type wxLocale(). An object reference, The representation is internal
+%% and can be changed without notice. It can't be used for comparsion
+%% stored on disc or distributed for use on other nodes.
+
+-module(wxLocale).
+-include("wxe.hrl").
+-export([addCatalog/2,addCatalog/4,addCatalogLookupPathPrefix/1,destroy/1,
+ getCanonicalName/1,getHeaderValue/2,getHeaderValue/3,getLanguage/1,
+ getLanguageName/1,getLocale/1,getName/1,getString/2,getString/3,getString/4,
+ getString/5,getSysName/1,getSystemEncoding/0,getSystemEncodingName/0,
+ getSystemLanguage/0,init/1,init/2,isLoaded/2,isOk/1,new/0,new/1,new/2]).
+
+%% inherited exports
+-export([parent_class/1]).
+
+-export_type([wxLocale/0]).
+%% @hidden
+parent_class(_Class) -> erlang:error({badtype, ?MODULE}).
+
+-type wxLocale() :: wx:wx_object().
+%% @doc See <a href="http://www.wxwidgets.org/manuals/2.8.12/wx_wxlocale.html#wxlocalewxlocale">external documentation</a>.
+-spec new() -> wxLocale().
+new() ->
+ wxe_util:construct(?wxLocale_new_0,
+ <<>>).
+
+%% @equiv new(Language, [])
+-spec new(Language) -> wxLocale() when
+ Language::integer().
+
+new(Language)
+ when is_integer(Language) ->
+ new(Language, []).
+
+%% @doc See <a href="http://www.wxwidgets.org/manuals/2.8.12/wx_wxlocale.html#wxlocalewxlocale">external documentation</a>.
+-spec new(Language, [Option]) -> wxLocale() when
+ Language::integer(),
+ Option :: {flags, integer()}.
+new(Language, Options)
+ when is_integer(Language),is_list(Options) ->
+ MOpts = fun({flags, Flags}, Acc) -> [<<1:32/?UI,Flags:32/?UI>>|Acc];
+ (BadOpt, _) -> erlang:error({badoption, BadOpt}) end,
+ BinOpt = list_to_binary(lists:foldl(MOpts, [<<0:32>>], Options)),
+ wxe_util:construct(?wxLocale_new_2,
+ <<Language:32/?UI, 0:32,BinOpt/binary>>).
+
+%% @equiv init(This, [])
+-spec init(This) -> boolean() when
+ This::wxLocale().
+
+init(This)
+ when is_record(This, wx_ref) ->
+ init(This, []).
+
+%% @doc See <a href="http://www.wxwidgets.org/manuals/2.8.12/wx_wxlocale.html#wxlocaleinit">external documentation</a>.
+-spec init(This, [Option]) -> boolean() when
+ This::wxLocale(),
+ Option :: {language, integer()}
+ | {flags, integer()}.
+init(#wx_ref{type=ThisT,ref=ThisRef}, Options)
+ when is_list(Options) ->
+ ?CLASS(ThisT,wxLocale),
+ MOpts = fun({language, Language}, Acc) -> [<<1:32/?UI,Language:32/?UI>>|Acc];
+ ({flags, Flags}, Acc) -> [<<2:32/?UI,Flags:32/?UI>>|Acc];
+ (BadOpt, _) -> erlang:error({badoption, BadOpt}) end,
+ BinOpt = list_to_binary(lists:foldl(MOpts, [<<0:32>>], Options)),
+ wxe_util:call(?wxLocale_Init,
+ <<ThisRef:32/?UI, 0:32,BinOpt/binary>>).
+
+%% @doc See <a href="http://www.wxwidgets.org/manuals/2.8.12/wx_wxlocale.html#wxlocaleaddcatalog">external documentation</a>.
+-spec addCatalog(This, SzDomain) -> boolean() when
+ This::wxLocale(), SzDomain::unicode:chardata().
+addCatalog(#wx_ref{type=ThisT,ref=ThisRef},SzDomain)
+ when is_list(SzDomain) ->
+ ?CLASS(ThisT,wxLocale),
+ SzDomain_UC = unicode:characters_to_binary([SzDomain,0]),
+ wxe_util:call(?wxLocale_AddCatalog_1,
+ <<ThisRef:32/?UI,(byte_size(SzDomain_UC)):32/?UI,(SzDomain_UC)/binary, 0:(((8- ((0+byte_size(SzDomain_UC)) band 16#7)) band 16#7))/unit:8>>).
+
+%% @doc See <a href="http://www.wxwidgets.org/manuals/2.8.12/wx_wxlocale.html#wxlocaleaddcatalog">external documentation</a>.
+%%<br /> MsgIdLanguage = ?wxLANGUAGE_DEFAULT | ?wxLANGUAGE_UNKNOWN | ?wxLANGUAGE_ABKHAZIAN | ?wxLANGUAGE_AFAR | ?wxLANGUAGE_AFRIKAANS | ?wxLANGUAGE_ALBANIAN | ?wxLANGUAGE_AMHARIC | ?wxLANGUAGE_ARABIC | ?wxLANGUAGE_ARABIC_ALGERIA | ?wxLANGUAGE_ARABIC_BAHRAIN | ?wxLANGUAGE_ARABIC_EGYPT | ?wxLANGUAGE_ARABIC_IRAQ | ?wxLANGUAGE_ARABIC_JORDAN | ?wxLANGUAGE_ARABIC_KUWAIT | ?wxLANGUAGE_ARABIC_LEBANON | ?wxLANGUAGE_ARABIC_LIBYA | ?wxLANGUAGE_ARABIC_MOROCCO | ?wxLANGUAGE_ARABIC_OMAN | ?wxLANGUAGE_ARABIC_QATAR | ?wxLANGUAGE_ARABIC_SAUDI_ARABIA | ?wxLANGUAGE_ARABIC_SUDAN | ?wxLANGUAGE_ARABIC_SYRIA | ?wxLANGUAGE_ARABIC_TUNISIA | ?wxLANGUAGE_ARABIC_UAE | ?wxLANGUAGE_ARABIC_YEMEN | ?wxLANGUAGE_ARMENIAN | ?wxLANGUAGE_ASSAMESE | ?wxLANGUAGE_AYMARA | ?wxLANGUAGE_AZERI | ?wxLANGUAGE_AZERI_CYRILLIC | ?wxLANGUAGE_AZERI_LATIN | ?wxLANGUAGE_BASHKIR | ?wxLANGUAGE_BASQUE | ?wxLANGUAGE_BELARUSIAN | ?wxLANGUAGE_BENGALI | ?wxLANGUAGE_BHUTANI | ?wxLANGUAGE_BIHARI | ?wxLANGUAGE_BISLAMA | ?wxLANGUAGE_BRETON | ?wxLANGUAGE_BULGARIAN | ?wxLANGUAGE_BURMESE | ?wxLANGUAGE_CAMBODIAN | ?wxLANGUAGE_CATALAN | ?wxLANGUAGE_CHINESE | ?wxLANGUAGE_CHINESE_SIMPLIFIED | ?wxLANGUAGE_CHINESE_TRADITIONAL | ?wxLANGUAGE_CHINESE_HONGKONG | ?wxLANGUAGE_CHINESE_MACAU | ?wxLANGUAGE_CHINESE_SINGAPORE | ?wxLANGUAGE_CHINESE_TAIWAN | ?wxLANGUAGE_CORSICAN | ?wxLANGUAGE_CROATIAN | ?wxLANGUAGE_CZECH | ?wxLANGUAGE_DANISH | ?wxLANGUAGE_DUTCH | ?wxLANGUAGE_DUTCH_BELGIAN | ?wxLANGUAGE_ENGLISH | ?wxLANGUAGE_ENGLISH_UK | ?wxLANGUAGE_ENGLISH_US | ?wxLANGUAGE_ENGLISH_AUSTRALIA | ?wxLANGUAGE_ENGLISH_BELIZE | ?wxLANGUAGE_ENGLISH_BOTSWANA | ?wxLANGUAGE_ENGLISH_CANADA | ?wxLANGUAGE_ENGLISH_CARIBBEAN | ?wxLANGUAGE_ENGLISH_DENMARK | ?wxLANGUAGE_ENGLISH_EIRE | ?wxLANGUAGE_ENGLISH_JAMAICA | ?wxLANGUAGE_ENGLISH_NEW_ZEALAND | ?wxLANGUAGE_ENGLISH_PHILIPPINES | ?wxLANGUAGE_ENGLISH_SOUTH_AFRICA | ?wxLANGUAGE_ENGLISH_TRINIDAD | ?wxLANGUAGE_ENGLISH_ZIMBABWE | ?wxLANGUAGE_ESPERANTO | ?wxLANGUAGE_ESTONIAN | ?wxLANGUAGE_FAEROESE | ?wxLANGUAGE_FARSI | ?wxLANGUAGE_FIJI | ?wxLANGUAGE_FINNISH | ?wxLANGUAGE_FRENCH | ?wxLANGUAGE_FRENCH_BELGIAN | ?wxLANGUAGE_FRENCH_CANADIAN | ?wxLANGUAGE_FRENCH_LUXEMBOURG | ?wxLANGUAGE_FRENCH_MONACO | ?wxLANGUAGE_FRENCH_SWISS | ?wxLANGUAGE_FRISIAN | ?wxLANGUAGE_GALICIAN | ?wxLANGUAGE_GEORGIAN | ?wxLANGUAGE_GERMAN | ?wxLANGUAGE_GERMAN_AUSTRIAN | ?wxLANGUAGE_GERMAN_BELGIUM | ?wxLANGUAGE_GERMAN_LIECHTENSTEIN | ?wxLANGUAGE_GERMAN_LUXEMBOURG | ?wxLANGUAGE_GERMAN_SWISS | ?wxLANGUAGE_GREEK | ?wxLANGUAGE_GREENLANDIC | ?wxLANGUAGE_GUARANI | ?wxLANGUAGE_GUJARATI | ?wxLANGUAGE_HAUSA | ?wxLANGUAGE_HEBREW | ?wxLANGUAGE_HINDI | ?wxLANGUAGE_HUNGARIAN | ?wxLANGUAGE_ICELANDIC | ?wxLANGUAGE_INDONESIAN | ?wxLANGUAGE_INTERLINGUA | ?wxLANGUAGE_INTERLINGUE | ?wxLANGUAGE_INUKTITUT | ?wxLANGUAGE_INUPIAK | ?wxLANGUAGE_IRISH | ?wxLANGUAGE_ITALIAN | ?wxLANGUAGE_ITALIAN_SWISS | ?wxLANGUAGE_JAPANESE | ?wxLANGUAGE_JAVANESE | ?wxLANGUAGE_KANNADA | ?wxLANGUAGE_KASHMIRI | ?wxLANGUAGE_KASHMIRI_INDIA | ?wxLANGUAGE_KAZAKH | ?wxLANGUAGE_KERNEWEK | ?wxLANGUAGE_KINYARWANDA | ?wxLANGUAGE_KIRGHIZ | ?wxLANGUAGE_KIRUNDI | ?wxLANGUAGE_KONKANI | ?wxLANGUAGE_KOREAN | ?wxLANGUAGE_KURDISH | ?wxLANGUAGE_LAOTHIAN | ?wxLANGUAGE_LATIN | ?wxLANGUAGE_LATVIAN | ?wxLANGUAGE_LINGALA | ?wxLANGUAGE_LITHUANIAN | ?wxLANGUAGE_MACEDONIAN | ?wxLANGUAGE_MALAGASY | ?wxLANGUAGE_MALAY | ?wxLANGUAGE_MALAYALAM | ?wxLANGUAGE_MALAY_BRUNEI_DARUSSALAM | ?wxLANGUAGE_MALAY_MALAYSIA | ?wxLANGUAGE_MALTESE | ?wxLANGUAGE_MANIPURI | ?wxLANGUAGE_MAORI | ?wxLANGUAGE_MARATHI | ?wxLANGUAGE_MOLDAVIAN | ?wxLANGUAGE_MONGOLIAN | ?wxLANGUAGE_NAURU | ?wxLANGUAGE_NEPALI | ?wxLANGUAGE_NEPALI_INDIA | ?wxLANGUAGE_NORWEGIAN_BOKMAL | ?wxLANGUAGE_NORWEGIAN_NYNORSK | ?wxLANGUAGE_OCCITAN | ?wxLANGUAGE_ORIYA | ?wxLANGUAGE_OROMO | ?wxLANGUAGE_PASHTO | ?wxLANGUAGE_POLISH | ?wxLANGUAGE_PORTUGUESE | ?wxLANGUAGE_PORTUGUESE_BRAZILIAN | ?wxLANGUAGE_PUNJABI | ?wxLANGUAGE_QUECHUA | ?wxLANGUAGE_RHAETO_ROMANCE | ?wxLANGUAGE_ROMANIAN | ?wxLANGUAGE_RUSSIAN | ?wxLANGUAGE_RUSSIAN_UKRAINE | ?wxLANGUAGE_SAMOAN | ?wxLANGUAGE_SANGHO | ?wxLANGUAGE_SANSKRIT | ?wxLANGUAGE_SCOTS_GAELIC | ?wxLANGUAGE_SERBIAN | ?wxLANGUAGE_SERBIAN_CYRILLIC | ?wxLANGUAGE_SERBIAN_LATIN | ?wxLANGUAGE_SERBO_CROATIAN | ?wxLANGUAGE_SESOTHO | ?wxLANGUAGE_SETSWANA | ?wxLANGUAGE_SHONA | ?wxLANGUAGE_SINDHI | ?wxLANGUAGE_SINHALESE | ?wxLANGUAGE_SISWATI | ?wxLANGUAGE_SLOVAK | ?wxLANGUAGE_SLOVENIAN | ?wxLANGUAGE_SOMALI | ?wxLANGUAGE_SPANISH | ?wxLANGUAGE_SPANISH_ARGENTINA | ?wxLANGUAGE_SPANISH_BOLIVIA | ?wxLANGUAGE_SPANISH_CHILE | ?wxLANGUAGE_SPANISH_COLOMBIA | ?wxLANGUAGE_SPANISH_COSTA_RICA | ?wxLANGUAGE_SPANISH_DOMINICAN_REPUBLIC | ?wxLANGUAGE_SPANISH_ECUADOR | ?wxLANGUAGE_SPANISH_EL_SALVADOR | ?wxLANGUAGE_SPANISH_GUATEMALA | ?wxLANGUAGE_SPANISH_HONDURAS | ?wxLANGUAGE_SPANISH_MEXICAN | ?wxLANGUAGE_SPANISH_MODERN | ?wxLANGUAGE_SPANISH_NICARAGUA | ?wxLANGUAGE_SPANISH_PANAMA | ?wxLANGUAGE_SPANISH_PARAGUAY | ?wxLANGUAGE_SPANISH_PERU | ?wxLANGUAGE_SPANISH_PUERTO_RICO | ?wxLANGUAGE_SPANISH_URUGUAY | ?wxLANGUAGE_SPANISH_US | ?wxLANGUAGE_SPANISH_VENEZUELA | ?wxLANGUAGE_SUNDANESE | ?wxLANGUAGE_SWAHILI | ?wxLANGUAGE_SWEDISH | ?wxLANGUAGE_SWEDISH_FINLAND | ?wxLANGUAGE_TAGALOG | ?wxLANGUAGE_TAJIK | ?wxLANGUAGE_TAMIL | ?wxLANGUAGE_TATAR | ?wxLANGUAGE_TELUGU | ?wxLANGUAGE_THAI | ?wxLANGUAGE_TIBETAN | ?wxLANGUAGE_TIGRINYA | ?wxLANGUAGE_TONGA | ?wxLANGUAGE_TSONGA | ?wxLANGUAGE_TURKISH | ?wxLANGUAGE_TURKMEN | ?wxLANGUAGE_TWI | ?wxLANGUAGE_UIGHUR | ?wxLANGUAGE_UKRAINIAN | ?wxLANGUAGE_URDU | ?wxLANGUAGE_URDU_INDIA | ?wxLANGUAGE_URDU_PAKISTAN | ?wxLANGUAGE_UZBEK | ?wxLANGUAGE_UZBEK_CYRILLIC | ?wxLANGUAGE_UZBEK_LATIN | ?wxLANGUAGE_VIETNAMESE | ?wxLANGUAGE_VOLAPUK | ?wxLANGUAGE_WELSH | ?wxLANGUAGE_WOLOF | ?wxLANGUAGE_XHOSA | ?wxLANGUAGE_YIDDISH | ?wxLANGUAGE_YORUBA | ?wxLANGUAGE_ZHUANG | ?wxLANGUAGE_ZULU | ?wxLANGUAGE_USER_DEFINED | ?wxLANGUAGE_VALENCIAN | ?wxLANGUAGE_SAMI
+-spec addCatalog(This, SzDomain, MsgIdLanguage, MsgIdCharset) -> boolean() when
+ This::wxLocale(), SzDomain::unicode:chardata(), MsgIdLanguage::wx:wx_enum(), MsgIdCharset::unicode:chardata().
+addCatalog(#wx_ref{type=ThisT,ref=ThisRef},SzDomain,MsgIdLanguage,MsgIdCharset)
+ when is_list(SzDomain),is_integer(MsgIdLanguage),is_list(MsgIdCharset) ->
+ ?CLASS(ThisT,wxLocale),
+ SzDomain_UC = unicode:characters_to_binary([SzDomain,0]),
+ MsgIdCharset_UC = unicode:characters_to_binary([MsgIdCharset,0]),
+ wxe_util:call(?wxLocale_AddCatalog_3,
+ <<ThisRef:32/?UI,(byte_size(SzDomain_UC)):32/?UI,(SzDomain_UC)/binary, 0:(((8- ((0+byte_size(SzDomain_UC)) band 16#7)) band 16#7))/unit:8,MsgIdLanguage:32/?UI,(byte_size(MsgIdCharset_UC)):32/?UI,(MsgIdCharset_UC)/binary, 0:(((8- ((0+byte_size(MsgIdCharset_UC)) band 16#7)) band 16#7))/unit:8>>).
+
+%% @doc See <a href="http://www.wxwidgets.org/manuals/2.8.12/wx_wxlocale.html#wxlocaleaddcataloglookuppathprefix">external documentation</a>.
+-spec addCatalogLookupPathPrefix(Prefix) -> ok when
+ Prefix::unicode:chardata().
+addCatalogLookupPathPrefix(Prefix)
+ when is_list(Prefix) ->
+ Prefix_UC = unicode:characters_to_binary([Prefix,0]),
+ wxe_util:cast(?wxLocale_AddCatalogLookupPathPrefix,
+ <<(byte_size(Prefix_UC)):32/?UI,(Prefix_UC)/binary, 0:(((8- ((4+byte_size(Prefix_UC)) band 16#7)) band 16#7))/unit:8>>).
+
+%% @doc See <a href="http://www.wxwidgets.org/manuals/2.8.12/wx_wxlocale.html#wxlocalegetcanonicalname">external documentation</a>.
+-spec getCanonicalName(This) -> unicode:charlist() when
+ This::wxLocale().
+getCanonicalName(#wx_ref{type=ThisT,ref=ThisRef}) ->
+ ?CLASS(ThisT,wxLocale),
+ wxe_util:call(?wxLocale_GetCanonicalName,
+ <<ThisRef:32/?UI>>).
+
+%% @doc See <a href="http://www.wxwidgets.org/manuals/2.8.12/wx_wxlocale.html#wxlocalegetlanguage">external documentation</a>.
+-spec getLanguage(This) -> integer() when
+ This::wxLocale().
+getLanguage(#wx_ref{type=ThisT,ref=ThisRef}) ->
+ ?CLASS(ThisT,wxLocale),
+ wxe_util:call(?wxLocale_GetLanguage,
+ <<ThisRef:32/?UI>>).
+
+%% @doc See <a href="http://www.wxwidgets.org/manuals/2.8.12/wx_wxlocale.html#wxlocalegetlanguagename">external documentation</a>.
+-spec getLanguageName(Lang) -> unicode:charlist() when
+ Lang::integer().
+getLanguageName(Lang)
+ when is_integer(Lang) ->
+ wxe_util:call(?wxLocale_GetLanguageName,
+ <<Lang:32/?UI>>).
+
+%% @doc See <a href="http://www.wxwidgets.org/manuals/2.8.12/wx_wxlocale.html#wxlocalegetlocale">external documentation</a>.
+-spec getLocale(This) -> unicode:charlist() when
+ This::wxLocale().
+getLocale(#wx_ref{type=ThisT,ref=ThisRef}) ->
+ ?CLASS(ThisT,wxLocale),
+ wxe_util:call(?wxLocale_GetLocale,
+ <<ThisRef:32/?UI>>).
+
+%% @doc See <a href="http://www.wxwidgets.org/manuals/2.8.12/wx_wxlocale.html#wxlocalegetname">external documentation</a>.
+-spec getName(This) -> unicode:charlist() when
+ This::wxLocale().
+getName(#wx_ref{type=ThisT,ref=ThisRef}) ->
+ ?CLASS(ThisT,wxLocale),
+ wxe_util:call(?wxLocale_GetName,
+ <<ThisRef:32/?UI>>).
+
+%% @equiv getString(This,SzOrigString, [])
+-spec getString(This, SzOrigString) -> unicode:charlist() when
+ This::wxLocale(), SzOrigString::unicode:chardata().
+
+getString(This,SzOrigString)
+ when is_record(This, wx_ref),is_list(SzOrigString) ->
+ getString(This,SzOrigString, []).
+
+%% @doc See <a href="http://www.wxwidgets.org/manuals/2.8.12/wx_wxlocale.html#wxlocalegetstring">external documentation</a>.
+-spec getString(This, SzOrigString, [Option]) -> unicode:charlist() when
+ This::wxLocale(), SzOrigString::unicode:chardata(),
+ Option :: {szDomain, unicode:chardata()}.
+getString(#wx_ref{type=ThisT,ref=ThisRef},SzOrigString, Options)
+ when is_list(SzOrigString),is_list(Options) ->
+ ?CLASS(ThisT,wxLocale),
+ SzOrigString_UC = unicode:characters_to_binary([SzOrigString,0]),
+ MOpts = fun({szDomain, SzDomain}, Acc) -> SzDomain_UC = unicode:characters_to_binary([SzDomain,0]),[<<1:32/?UI,(byte_size(SzDomain_UC)):32/?UI,(SzDomain_UC)/binary, 0:(((8- ((0+byte_size(SzDomain_UC)) band 16#7)) band 16#7))/unit:8>>|Acc];
+ (BadOpt, _) -> erlang:error({badoption, BadOpt}) end,
+ BinOpt = list_to_binary(lists:foldl(MOpts, [<<0:32>>], Options)),
+ wxe_util:call(?wxLocale_GetString_2,
+ <<ThisRef:32/?UI,(byte_size(SzOrigString_UC)):32/?UI,(SzOrigString_UC)/binary, 0:(((8- ((0+byte_size(SzOrigString_UC)) band 16#7)) band 16#7))/unit:8, BinOpt/binary>>).
+
+%% @equiv getString(This,SzOrigString,SzOrigString2,N, [])
+-spec getString(This, SzOrigString, SzOrigString2, N) -> unicode:charlist() when
+ This::wxLocale(), SzOrigString::unicode:chardata(), SzOrigString2::unicode:chardata(), N::integer().
+
+getString(This,SzOrigString,SzOrigString2,N)
+ when is_record(This, wx_ref),is_list(SzOrigString),is_list(SzOrigString2),is_integer(N) ->
+ getString(This,SzOrigString,SzOrigString2,N, []).
+
+%% @doc See <a href="http://www.wxwidgets.org/manuals/2.8.12/wx_wxlocale.html#wxlocalegetstring">external documentation</a>.
+-spec getString(This, SzOrigString, SzOrigString2, N, [Option]) -> unicode:charlist() when
+ This::wxLocale(), SzOrigString::unicode:chardata(), SzOrigString2::unicode:chardata(), N::integer(),
+ Option :: {szDomain, unicode:chardata()}.
+getString(#wx_ref{type=ThisT,ref=ThisRef},SzOrigString,SzOrigString2,N, Options)
+ when is_list(SzOrigString),is_list(SzOrigString2),is_integer(N),is_list(Options) ->
+ ?CLASS(ThisT,wxLocale),
+ SzOrigString_UC = unicode:characters_to_binary([SzOrigString,0]),
+ SzOrigString2_UC = unicode:characters_to_binary([SzOrigString2,0]),
+ MOpts = fun({szDomain, SzDomain}, Acc) -> SzDomain_UC = unicode:characters_to_binary([SzDomain,0]),[<<1:32/?UI,(byte_size(SzDomain_UC)):32/?UI,(SzDomain_UC)/binary, 0:(((8- ((0+byte_size(SzDomain_UC)) band 16#7)) band 16#7))/unit:8>>|Acc];
+ (BadOpt, _) -> erlang:error({badoption, BadOpt}) end,
+ BinOpt = list_to_binary(lists:foldl(MOpts, [<<0:32>>], Options)),
+ wxe_util:call(?wxLocale_GetString_4,
+ <<ThisRef:32/?UI,(byte_size(SzOrigString_UC)):32/?UI,(SzOrigString_UC)/binary, 0:(((8- ((0+byte_size(SzOrigString_UC)) band 16#7)) band 16#7))/unit:8,(byte_size(SzOrigString2_UC)):32/?UI,(SzOrigString2_UC)/binary, 0:(((8- ((4+byte_size(SzOrigString2_UC)) band 16#7)) band 16#7))/unit:8,N:32/?UI, 0:32,BinOpt/binary>>).
+
+%% @equiv getHeaderValue(This,SzHeader, [])
+-spec getHeaderValue(This, SzHeader) -> unicode:charlist() when
+ This::wxLocale(), SzHeader::unicode:chardata().
+
+getHeaderValue(This,SzHeader)
+ when is_record(This, wx_ref),is_list(SzHeader) ->
+ getHeaderValue(This,SzHeader, []).
+
+%% @doc See <a href="http://www.wxwidgets.org/manuals/2.8.12/wx_wxlocale.html#wxlocalegetheadervalue">external documentation</a>.
+-spec getHeaderValue(This, SzHeader, [Option]) -> unicode:charlist() when
+ This::wxLocale(), SzHeader::unicode:chardata(),
+ Option :: {szDomain, unicode:chardata()}.
+getHeaderValue(#wx_ref{type=ThisT,ref=ThisRef},SzHeader, Options)
+ when is_list(SzHeader),is_list(Options) ->
+ ?CLASS(ThisT,wxLocale),
+ SzHeader_UC = unicode:characters_to_binary([SzHeader,0]),
+ MOpts = fun({szDomain, SzDomain}, Acc) -> SzDomain_UC = unicode:characters_to_binary([SzDomain,0]),[<<1:32/?UI,(byte_size(SzDomain_UC)):32/?UI,(SzDomain_UC)/binary, 0:(((8- ((0+byte_size(SzDomain_UC)) band 16#7)) band 16#7))/unit:8>>|Acc];
+ (BadOpt, _) -> erlang:error({badoption, BadOpt}) end,
+ BinOpt = list_to_binary(lists:foldl(MOpts, [<<0:32>>], Options)),
+ wxe_util:call(?wxLocale_GetHeaderValue,
+ <<ThisRef:32/?UI,(byte_size(SzHeader_UC)):32/?UI,(SzHeader_UC)/binary, 0:(((8- ((0+byte_size(SzHeader_UC)) band 16#7)) band 16#7))/unit:8, BinOpt/binary>>).
+
+%% @doc See <a href="http://www.wxwidgets.org/manuals/2.8.12/wx_wxlocale.html#wxlocalegetsysname">external documentation</a>.
+-spec getSysName(This) -> unicode:charlist() when
+ This::wxLocale().
+getSysName(#wx_ref{type=ThisT,ref=ThisRef}) ->
+ ?CLASS(ThisT,wxLocale),
+ wxe_util:call(?wxLocale_GetSysName,
+ <<ThisRef:32/?UI>>).
+
+%% @doc See <a href="http://www.wxwidgets.org/manuals/2.8.12/wx_wxlocale.html#wxlocalegetsystemencoding">external documentation</a>.
+%%<br /> Res = ?wxFONTENCODING_SYSTEM | ?wxFONTENCODING_DEFAULT | ?wxFONTENCODING_ISO8859_1 | ?wxFONTENCODING_ISO8859_2 | ?wxFONTENCODING_ISO8859_3 | ?wxFONTENCODING_ISO8859_4 | ?wxFONTENCODING_ISO8859_5 | ?wxFONTENCODING_ISO8859_6 | ?wxFONTENCODING_ISO8859_7 | ?wxFONTENCODING_ISO8859_8 | ?wxFONTENCODING_ISO8859_9 | ?wxFONTENCODING_ISO8859_10 | ?wxFONTENCODING_ISO8859_11 | ?wxFONTENCODING_ISO8859_12 | ?wxFONTENCODING_ISO8859_13 | ?wxFONTENCODING_ISO8859_14 | ?wxFONTENCODING_ISO8859_15 | ?wxFONTENCODING_ISO8859_MAX | ?wxFONTENCODING_KOI8 | ?wxFONTENCODING_KOI8_U | ?wxFONTENCODING_ALTERNATIVE | ?wxFONTENCODING_BULGARIAN | ?wxFONTENCODING_CP437 | ?wxFONTENCODING_CP850 | ?wxFONTENCODING_CP852 | ?wxFONTENCODING_CP855 | ?wxFONTENCODING_CP866 | ?wxFONTENCODING_CP874 | ?wxFONTENCODING_CP932 | ?wxFONTENCODING_CP936 | ?wxFONTENCODING_CP949 | ?wxFONTENCODING_CP950 | ?wxFONTENCODING_CP1250 | ?wxFONTENCODING_CP1251 | ?wxFONTENCODING_CP1252 | ?wxFONTENCODING_CP1253 | ?wxFONTENCODING_CP1254 | ?wxFONTENCODING_CP1255 | ?wxFONTENCODING_CP1256 | ?wxFONTENCODING_CP1257 | ?wxFONTENCODING_CP12_MAX | ?wxFONTENCODING_UTF7 | ?wxFONTENCODING_UTF8 | ?wxFONTENCODING_EUC_JP | ?wxFONTENCODING_UTF16BE | ?wxFONTENCODING_UTF16LE | ?wxFONTENCODING_UTF32BE | ?wxFONTENCODING_UTF32LE | ?wxFONTENCODING_MACROMAN | ?wxFONTENCODING_MACJAPANESE | ?wxFONTENCODING_MACCHINESETRAD | ?wxFONTENCODING_MACKOREAN | ?wxFONTENCODING_MACARABIC | ?wxFONTENCODING_MACHEBREW | ?wxFONTENCODING_MACGREEK | ?wxFONTENCODING_MACCYRILLIC | ?wxFONTENCODING_MACDEVANAGARI | ?wxFONTENCODING_MACGURMUKHI | ?wxFONTENCODING_MACGUJARATI | ?wxFONTENCODING_MACORIYA | ?wxFONTENCODING_MACBENGALI | ?wxFONTENCODING_MACTAMIL | ?wxFONTENCODING_MACTELUGU | ?wxFONTENCODING_MACKANNADA | ?wxFONTENCODING_MACMALAJALAM | ?wxFONTENCODING_MACSINHALESE | ?wxFONTENCODING_MACBURMESE | ?wxFONTENCODING_MACKHMER | ?wxFONTENCODING_MACTHAI | ?wxFONTENCODING_MACLAOTIAN | ?wxFONTENCODING_MACGEORGIAN | ?wxFONTENCODING_MACARMENIAN | ?wxFONTENCODING_MACCHINESESIMP | ?wxFONTENCODING_MACTIBETAN | ?wxFONTENCODING_MACMONGOLIAN | ?wxFONTENCODING_MACETHIOPIC | ?wxFONTENCODING_MACCENTRALEUR | ?wxFONTENCODING_MACVIATNAMESE | ?wxFONTENCODING_MACARABICEXT | ?wxFONTENCODING_MACSYMBOL | ?wxFONTENCODING_MACDINGBATS | ?wxFONTENCODING_MACTURKISH | ?wxFONTENCODING_MACCROATIAN | ?wxFONTENCODING_MACICELANDIC | ?wxFONTENCODING_MACROMANIAN | ?wxFONTENCODING_MACCELTIC | ?wxFONTENCODING_MACGAELIC | ?wxFONTENCODING_MACKEYBOARD | ?wxFONTENCODING_MAX | ?wxFONTENCODING_MACMIN | ?wxFONTENCODING_MACMAX | ?wxFONTENCODING_UTF16 | ?wxFONTENCODING_UTF32 | ?wxFONTENCODING_UNICODE | ?wxFONTENCODING_GB2312 | ?wxFONTENCODING_BIG5 | ?wxFONTENCODING_SHIFT_JIS
+-spec getSystemEncoding() -> wx:wx_enum().
+getSystemEncoding() ->
+ wxe_util:call(?wxLocale_GetSystemEncoding,
+ <<>>).
+
+%% @doc See <a href="http://www.wxwidgets.org/manuals/2.8.12/wx_wxlocale.html#wxlocalegetsystemencodingname">external documentation</a>.
+-spec getSystemEncodingName() -> unicode:charlist().
+getSystemEncodingName() ->
+ wxe_util:call(?wxLocale_GetSystemEncodingName,
+ <<>>).
+
+%% @doc See <a href="http://www.wxwidgets.org/manuals/2.8.12/wx_wxlocale.html#wxlocalegetsystemlanguage">external documentation</a>.
+-spec getSystemLanguage() -> integer().
+getSystemLanguage() ->
+ wxe_util:call(?wxLocale_GetSystemLanguage,
+ <<>>).
+
+%% @doc See <a href="http://www.wxwidgets.org/manuals/2.8.12/wx_wxlocale.html#wxlocaleisloaded">external documentation</a>.
+-spec isLoaded(This, SzDomain) -> boolean() when
+ This::wxLocale(), SzDomain::unicode:chardata().
+isLoaded(#wx_ref{type=ThisT,ref=ThisRef},SzDomain)
+ when is_list(SzDomain) ->
+ ?CLASS(ThisT,wxLocale),
+ SzDomain_UC = unicode:characters_to_binary([SzDomain,0]),
+ wxe_util:call(?wxLocale_IsLoaded,
+ <<ThisRef:32/?UI,(byte_size(SzDomain_UC)):32/?UI,(SzDomain_UC)/binary, 0:(((8- ((0+byte_size(SzDomain_UC)) band 16#7)) band 16#7))/unit:8>>).
+
+%% @doc See <a href="http://www.wxwidgets.org/manuals/2.8.12/wx_wxlocale.html#wxlocaleisok">external documentation</a>.
+-spec isOk(This) -> boolean() when
+ This::wxLocale().
+isOk(#wx_ref{type=ThisT,ref=ThisRef}) ->
+ ?CLASS(ThisT,wxLocale),
+ wxe_util:call(?wxLocale_IsOk,
+ <<ThisRef:32/?UI>>).
+
+%% @doc Destroys this object, do not use object again
+-spec destroy(This::wxLocale()) -> ok.
+destroy(Obj=#wx_ref{type=Type}) ->
+ ?CLASS(Type,wxLocale),
+ wxe_util:destroy(?wxLocale_destruct,Obj),
+ ok.
diff --git a/lib/wx/src/gen/wxMemoryDC.erl b/lib/wx/src/gen/wxMemoryDC.erl
index c123f0e35d..8de412bdc7 100644
--- a/lib/wx/src/gen/wxMemoryDC.erl
+++ b/lib/wx/src/gen/wxMemoryDC.erl
@@ -1,7 +1,7 @@
%%
%% %CopyrightBegin%
%%
-%% Copyright Ericsson AB 2008-2013. All Rights Reserved.
+%% Copyright Ericsson AB 2008-2014. 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
@@ -53,6 +53,8 @@
startPage/1]).
-export_type([wxMemoryDC/0]).
+-compile([{nowarn_deprecated_function, {wxDC,computeScaleAndOrigin,1}}]).
+
%% @hidden
parent_class(wxDC) -> true;
parent_class(_Class) -> erlang:error({badtype, ?MODULE}).
diff --git a/lib/wx/src/gen/wxMirrorDC.erl b/lib/wx/src/gen/wxMirrorDC.erl
index cfae34cb36..9a681bff2e 100644
--- a/lib/wx/src/gen/wxMirrorDC.erl
+++ b/lib/wx/src/gen/wxMirrorDC.erl
@@ -1,7 +1,7 @@
%%
%% %CopyrightBegin%
%%
-%% Copyright Ericsson AB 2008-2013. All Rights Reserved.
+%% Copyright Ericsson AB 2008-2014. 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
@@ -53,6 +53,8 @@
startPage/1]).
-export_type([wxMirrorDC/0]).
+-compile([{nowarn_deprecated_function, {wxDC,computeScaleAndOrigin,1}}]).
+
%% @hidden
parent_class(wxDC) -> true;
parent_class(_Class) -> erlang:error({badtype, ?MODULE}).
diff --git a/lib/wx/src/gen/wxPaintDC.erl b/lib/wx/src/gen/wxPaintDC.erl
index 3c9b321496..0ff27a8c7a 100644
--- a/lib/wx/src/gen/wxPaintDC.erl
+++ b/lib/wx/src/gen/wxPaintDC.erl
@@ -1,7 +1,7 @@
%%
%% %CopyrightBegin%
%%
-%% Copyright Ericsson AB 2008-2013. All Rights Reserved.
+%% Copyright Ericsson AB 2008-2014. 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
@@ -56,6 +56,8 @@
-export_type([wxPaintDC/0]).
-deprecated([new/0]).
+-compile([{nowarn_deprecated_function, {wxDC,computeScaleAndOrigin,1}}]).
+
%% @hidden
parent_class(wxWindowDC) -> true;
parent_class(wxDC) -> true;
diff --git a/lib/wx/src/gen/wxPostScriptDC.erl b/lib/wx/src/gen/wxPostScriptDC.erl
index e0b22c87eb..e7e498efa1 100644
--- a/lib/wx/src/gen/wxPostScriptDC.erl
+++ b/lib/wx/src/gen/wxPostScriptDC.erl
@@ -1,7 +1,7 @@
%%
%% %CopyrightBegin%
%%
-%% Copyright Ericsson AB 2008-2013. All Rights Reserved.
+%% Copyright Ericsson AB 2008-2014. 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
@@ -55,6 +55,8 @@
-export_type([wxPostScriptDC/0]).
-deprecated([getResolution/0,setResolution/1]).
+-compile([{nowarn_deprecated_function, {wxDC,computeScaleAndOrigin,1}}]).
+
%% @hidden
parent_class(wxDC) -> true;
parent_class(_Class) -> erlang:error({badtype, ?MODULE}).
diff --git a/lib/wx/src/gen/wxScreenDC.erl b/lib/wx/src/gen/wxScreenDC.erl
index 54bdc2d351..21ca4bacfc 100644
--- a/lib/wx/src/gen/wxScreenDC.erl
+++ b/lib/wx/src/gen/wxScreenDC.erl
@@ -1,7 +1,7 @@
%%
%% %CopyrightBegin%
%%
-%% Copyright Ericsson AB 2008-2013. All Rights Reserved.
+%% Copyright Ericsson AB 2008-2014. 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
@@ -53,6 +53,8 @@
startPage/1]).
-export_type([wxScreenDC/0]).
+-compile([{nowarn_deprecated_function, {wxDC,computeScaleAndOrigin,1}}]).
+
%% @hidden
parent_class(wxDC) -> true;
parent_class(_Class) -> erlang:error({badtype, ?MODULE}).
diff --git a/lib/wx/src/gen/wxWindowDC.erl b/lib/wx/src/gen/wxWindowDC.erl
index f5c482d8ca..6bb303cfe6 100644
--- a/lib/wx/src/gen/wxWindowDC.erl
+++ b/lib/wx/src/gen/wxWindowDC.erl
@@ -1,7 +1,7 @@
%%
%% %CopyrightBegin%
%%
-%% Copyright Ericsson AB 2008-2013. All Rights Reserved.
+%% Copyright Ericsson AB 2008-2014. 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
@@ -55,6 +55,8 @@
-export_type([wxWindowDC/0]).
-deprecated([new/0]).
+-compile([{nowarn_deprecated_function, {wxDC,computeScaleAndOrigin,1}}]).
+
%% @hidden
parent_class(wxDC) -> true;
parent_class(_Class) -> erlang:error({badtype, ?MODULE}).
diff --git a/lib/wx/src/gen/wx_misc.erl b/lib/wx/src/gen/wx_misc.erl
index 96912ce651..397d48b727 100644
--- a/lib/wx/src/gen/wx_misc.erl
+++ b/lib/wx/src/gen/wx_misc.erl
@@ -1,7 +1,7 @@
%%
%% %CopyrightBegin%
%%
-%% Copyright Ericsson AB 2008-2013. All Rights Reserved.
+%% Copyright Ericsson AB 2008-2014. 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
@@ -30,6 +30,8 @@
launchDefaultBrowser/2,newId/0,registerId/1,setDetectableAutoRepeat/1,
shell/0,shell/1,shutdown/1]).
+-export([displaySize/0,setCursor/1]).
+
%% @doc See <a href="http://www.wxwidgets.org/manuals/2.8.12/wx_miscellany.html#wxgetkeystate">external documentation</a>.
%%<br /> Key = ?WXK_BACK | ?WXK_TAB | ?WXK_RETURN | ?WXK_ESCAPE | ?WXK_SPACE | ?WXK_DELETE | ?WXK_START | ?WXK_LBUTTON | ?WXK_RBUTTON | ?WXK_CANCEL | ?WXK_MBUTTON | ?WXK_CLEAR | ?WXK_SHIFT | ?WXK_ALT | ?WXK_CONTROL | ?WXK_MENU | ?WXK_PAUSE | ?WXK_CAPITAL | ?WXK_END | ?WXK_HOME | ?WXK_LEFT | ?WXK_UP | ?WXK_RIGHT | ?WXK_DOWN | ?WXK_SELECT | ?WXK_PRINT | ?WXK_EXECUTE | ?WXK_SNAPSHOT | ?WXK_INSERT | ?WXK_HELP | ?WXK_NUMPAD0 | ?WXK_NUMPAD1 | ?WXK_NUMPAD2 | ?WXK_NUMPAD3 | ?WXK_NUMPAD4 | ?WXK_NUMPAD5 | ?WXK_NUMPAD6 | ?WXK_NUMPAD7 | ?WXK_NUMPAD8 | ?WXK_NUMPAD9 | ?WXK_MULTIPLY | ?WXK_ADD | ?WXK_SEPARATOR | ?WXK_SUBTRACT | ?WXK_DECIMAL | ?WXK_DIVIDE | ?WXK_F1 | ?WXK_F2 | ?WXK_F3 | ?WXK_F4 | ?WXK_F5 | ?WXK_F6 | ?WXK_F7 | ?WXK_F8 | ?WXK_F9 | ?WXK_F10 | ?WXK_F11 | ?WXK_F12 | ?WXK_F13 | ?WXK_F14 | ?WXK_F15 | ?WXK_F16 | ?WXK_F17 | ?WXK_F18 | ?WXK_F19 | ?WXK_F20 | ?WXK_F21 | ?WXK_F22 | ?WXK_F23 | ?WXK_F24 | ?WXK_NUMLOCK | ?WXK_SCROLL | ?WXK_PAGEUP | ?WXK_PAGEDOWN | ?WXK_NUMPAD_SPACE | ?WXK_NUMPAD_TAB | ?WXK_NUMPAD_ENTER | ?WXK_NUMPAD_F1 | ?WXK_NUMPAD_F2 | ?WXK_NUMPAD_F3 | ?WXK_NUMPAD_F4 | ?WXK_NUMPAD_HOME | ?WXK_NUMPAD_LEFT | ?WXK_NUMPAD_UP | ?WXK_NUMPAD_RIGHT | ?WXK_NUMPAD_DOWN | ?WXK_NUMPAD_PAGEUP | ?WXK_NUMPAD_PAGEDOWN | ?WXK_NUMPAD_END | ?WXK_NUMPAD_BEGIN | ?WXK_NUMPAD_INSERT | ?WXK_NUMPAD_DELETE | ?WXK_NUMPAD_EQUAL | ?WXK_NUMPAD_MULTIPLY | ?WXK_NUMPAD_ADD | ?WXK_NUMPAD_SEPARATOR | ?WXK_NUMPAD_SUBTRACT | ?WXK_NUMPAD_DECIMAL | ?WXK_NUMPAD_DIVIDE | ?WXK_WINDOWS_LEFT | ?WXK_WINDOWS_RIGHT | ?WXK_WINDOWS_MENU | ?WXK_COMMAND | ?WXK_SPECIAL1 | ?WXK_SPECIAL2 | ?WXK_SPECIAL3 | ?WXK_SPECIAL4 | ?WXK_SPECIAL5 | ?WXK_SPECIAL6 | ?WXK_SPECIAL7 | ?WXK_SPECIAL8 | ?WXK_SPECIAL9 | ?WXK_SPECIAL10 | ?WXK_SPECIAL11 | ?WXK_SPECIAL12 | ?WXK_SPECIAL13 | ?WXK_SPECIAL14 | ?WXK_SPECIAL15 | ?WXK_SPECIAL16 | ?WXK_SPECIAL17 | ?WXK_SPECIAL18 | ?WXK_SPECIAL19 | ?WXK_SPECIAL20
-spec getKeyState(Key) -> boolean() when
@@ -224,3 +226,17 @@ isPlatform64Bit() ->
wxe_util:call(?utils_wxIsPlatform64Bit,
<<>>).
+%% @doc See <a href="http://www.wxwidgets.org/manuals/2.8.12/wx_gdicmn.html#gdicmnwxdisplaysize">external documentation</a>.
+-spec displaySize() -> {Width::integer(), Height::integer()}.
+displaySize() ->
+ wxe_util:call(?gdicmn_wxDisplaySize,
+ <<>>).
+
+%% @doc See <a href="http://www.wxwidgets.org/manuals/2.8.12/wx_gdicmn.html#gdicmnwxsetcursor">external documentation</a>.
+-spec setCursor(Cursor) -> ok when
+ Cursor::wxCursor:wxCursor().
+setCursor(#wx_ref{type=CursorT,ref=CursorRef}) ->
+ ?CLASS(CursorT,wxCursor),
+ wxe_util:cast(?gdicmn_wxSetCursor,
+ <<CursorRef:32/?UI>>).
+
diff --git a/lib/wx/src/gen/wxe_debug.hrl b/lib/wx/src/gen/wxe_debug.hrl
index 1f4f22f704..e208b081e8 100644
--- a/lib/wx/src/gen/wxe_debug.hrl
+++ b/lib/wx/src/gen/wxe_debug.hrl
@@ -1,7 +1,7 @@
%%
%% %CopyrightBegin%
%%
-%% Copyright Ericsson AB 2008-2013. All Rights Reserved.
+%% Copyright Ericsson AB 2008-2014. 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
@@ -2709,602 +2709,625 @@ wxdebug_table() ->
{2924, {utils, getOsDescription, 0}},
{2925, {utils, isPlatformLittleEndian, 0}},
{2926, {utils, isPlatform64Bit, 0}},
- {2927, {wxPrintout, new, 1}},
- {2928, {wxPrintout, destruct, 0}},
- {2929, {wxPrintout, getDC, 0}},
- {2930, {wxPrintout, getPageSizeMM, 2}},
- {2931, {wxPrintout, getPageSizePixels, 2}},
- {2932, {wxPrintout, getPaperRectPixels, 0}},
- {2933, {wxPrintout, getPPIPrinter, 2}},
- {2934, {wxPrintout, getPPIScreen, 2}},
- {2935, {wxPrintout, getTitle, 0}},
- {2936, {wxPrintout, isPreview, 0}},
- {2937, {wxPrintout, fitThisSizeToPaper, 1}},
- {2938, {wxPrintout, fitThisSizeToPage, 1}},
- {2939, {wxPrintout, fitThisSizeToPageMargins, 2}},
- {2940, {wxPrintout, mapScreenSizeToPaper, 0}},
- {2941, {wxPrintout, mapScreenSizeToPage, 0}},
- {2942, {wxPrintout, mapScreenSizeToPageMargins, 1}},
- {2943, {wxPrintout, mapScreenSizeToDevice, 0}},
- {2944, {wxPrintout, getLogicalPaperRect, 0}},
- {2945, {wxPrintout, getLogicalPageRect, 0}},
- {2946, {wxPrintout, getLogicalPageMarginsRect, 1}},
- {2947, {wxPrintout, setLogicalOrigin, 2}},
- {2948, {wxPrintout, offsetLogicalOrigin, 2}},
- {2949, {wxStyledTextCtrl, new_2, 2}},
- {2950, {wxStyledTextCtrl, new_0, 0}},
- {2951, {wxStyledTextCtrl, destruct, 0}},
- {2952, {wxStyledTextCtrl, create, 2}},
- {2953, {wxStyledTextCtrl, addText, 1}},
- {2954, {wxStyledTextCtrl, addStyledText, 1}},
- {2955, {wxStyledTextCtrl, insertText, 2}},
- {2956, {wxStyledTextCtrl, clearAll, 0}},
- {2957, {wxStyledTextCtrl, clearDocumentStyle, 0}},
- {2958, {wxStyledTextCtrl, getLength, 0}},
- {2959, {wxStyledTextCtrl, getCharAt, 1}},
- {2960, {wxStyledTextCtrl, getCurrentPos, 0}},
- {2961, {wxStyledTextCtrl, getAnchor, 0}},
- {2962, {wxStyledTextCtrl, getStyleAt, 1}},
- {2963, {wxStyledTextCtrl, redo, 0}},
- {2964, {wxStyledTextCtrl, setUndoCollection, 1}},
- {2965, {wxStyledTextCtrl, selectAll, 0}},
- {2966, {wxStyledTextCtrl, setSavePoint, 0}},
- {2967, {wxStyledTextCtrl, getStyledText, 2}},
- {2968, {wxStyledTextCtrl, canRedo, 0}},
- {2969, {wxStyledTextCtrl, markerLineFromHandle, 1}},
- {2970, {wxStyledTextCtrl, markerDeleteHandle, 1}},
- {2971, {wxStyledTextCtrl, getUndoCollection, 0}},
- {2972, {wxStyledTextCtrl, getViewWhiteSpace, 0}},
- {2973, {wxStyledTextCtrl, setViewWhiteSpace, 1}},
- {2974, {wxStyledTextCtrl, positionFromPoint, 1}},
- {2975, {wxStyledTextCtrl, positionFromPointClose, 2}},
- {2976, {wxStyledTextCtrl, gotoLine, 1}},
- {2977, {wxStyledTextCtrl, gotoPos, 1}},
- {2978, {wxStyledTextCtrl, setAnchor, 1}},
- {2979, {wxStyledTextCtrl, getCurLine, 1}},
- {2980, {wxStyledTextCtrl, getEndStyled, 0}},
- {2981, {wxStyledTextCtrl, convertEOLs, 1}},
- {2982, {wxStyledTextCtrl, getEOLMode, 0}},
- {2983, {wxStyledTextCtrl, setEOLMode, 1}},
- {2984, {wxStyledTextCtrl, startStyling, 2}},
- {2985, {wxStyledTextCtrl, setStyling, 2}},
- {2986, {wxStyledTextCtrl, getBufferedDraw, 0}},
- {2987, {wxStyledTextCtrl, setBufferedDraw, 1}},
- {2988, {wxStyledTextCtrl, setTabWidth, 1}},
- {2989, {wxStyledTextCtrl, getTabWidth, 0}},
- {2990, {wxStyledTextCtrl, setCodePage, 1}},
- {2991, {wxStyledTextCtrl, markerDefine, 3}},
- {2992, {wxStyledTextCtrl, markerSetForeground, 2}},
- {2993, {wxStyledTextCtrl, markerSetBackground, 2}},
- {2994, {wxStyledTextCtrl, markerAdd, 2}},
- {2995, {wxStyledTextCtrl, markerDelete, 2}},
- {2996, {wxStyledTextCtrl, markerDeleteAll, 1}},
- {2997, {wxStyledTextCtrl, markerGet, 1}},
- {2998, {wxStyledTextCtrl, markerNext, 2}},
- {2999, {wxStyledTextCtrl, markerPrevious, 2}},
- {3000, {wxStyledTextCtrl, markerDefineBitmap, 2}},
- {3001, {wxStyledTextCtrl, markerAddSet, 2}},
- {3002, {wxStyledTextCtrl, markerSetAlpha, 2}},
- {3003, {wxStyledTextCtrl, setMarginType, 2}},
- {3004, {wxStyledTextCtrl, getMarginType, 1}},
- {3005, {wxStyledTextCtrl, setMarginWidth, 2}},
- {3006, {wxStyledTextCtrl, getMarginWidth, 1}},
- {3007, {wxStyledTextCtrl, setMarginMask, 2}},
- {3008, {wxStyledTextCtrl, getMarginMask, 1}},
- {3009, {wxStyledTextCtrl, setMarginSensitive, 2}},
- {3010, {wxStyledTextCtrl, getMarginSensitive, 1}},
- {3011, {wxStyledTextCtrl, styleClearAll, 0}},
- {3012, {wxStyledTextCtrl, styleSetForeground, 2}},
- {3013, {wxStyledTextCtrl, styleSetBackground, 2}},
- {3014, {wxStyledTextCtrl, styleSetBold, 2}},
- {3015, {wxStyledTextCtrl, styleSetItalic, 2}},
- {3016, {wxStyledTextCtrl, styleSetSize, 2}},
- {3017, {wxStyledTextCtrl, styleSetFaceName, 2}},
- {3018, {wxStyledTextCtrl, styleSetEOLFilled, 2}},
- {3019, {wxStyledTextCtrl, styleResetDefault, 0}},
- {3020, {wxStyledTextCtrl, styleSetUnderline, 2}},
- {3021, {wxStyledTextCtrl, styleSetCase, 2}},
- {3022, {wxStyledTextCtrl, styleSetHotSpot, 2}},
- {3023, {wxStyledTextCtrl, setSelForeground, 2}},
- {3024, {wxStyledTextCtrl, setSelBackground, 2}},
- {3025, {wxStyledTextCtrl, getSelAlpha, 0}},
- {3026, {wxStyledTextCtrl, setSelAlpha, 1}},
- {3027, {wxStyledTextCtrl, setCaretForeground, 1}},
- {3028, {wxStyledTextCtrl, cmdKeyAssign, 3}},
- {3029, {wxStyledTextCtrl, cmdKeyClear, 2}},
- {3030, {wxStyledTextCtrl, cmdKeyClearAll, 0}},
- {3031, {wxStyledTextCtrl, setStyleBytes, 2}},
- {3032, {wxStyledTextCtrl, styleSetVisible, 2}},
- {3033, {wxStyledTextCtrl, getCaretPeriod, 0}},
- {3034, {wxStyledTextCtrl, setCaretPeriod, 1}},
- {3035, {wxStyledTextCtrl, setWordChars, 1}},
- {3036, {wxStyledTextCtrl, beginUndoAction, 0}},
- {3037, {wxStyledTextCtrl, endUndoAction, 0}},
- {3038, {wxStyledTextCtrl, indicatorSetStyle, 2}},
- {3039, {wxStyledTextCtrl, indicatorGetStyle, 1}},
- {3040, {wxStyledTextCtrl, indicatorSetForeground, 2}},
- {3041, {wxStyledTextCtrl, indicatorGetForeground, 1}},
- {3042, {wxStyledTextCtrl, setWhitespaceForeground, 2}},
- {3043, {wxStyledTextCtrl, setWhitespaceBackground, 2}},
- {3044, {wxStyledTextCtrl, getStyleBits, 0}},
- {3045, {wxStyledTextCtrl, setLineState, 2}},
- {3046, {wxStyledTextCtrl, getLineState, 1}},
- {3047, {wxStyledTextCtrl, getMaxLineState, 0}},
- {3048, {wxStyledTextCtrl, getCaretLineVisible, 0}},
- {3049, {wxStyledTextCtrl, setCaretLineVisible, 1}},
- {3050, {wxStyledTextCtrl, getCaretLineBackground, 0}},
- {3051, {wxStyledTextCtrl, setCaretLineBackground, 1}},
- {3052, {wxStyledTextCtrl, autoCompShow, 2}},
- {3053, {wxStyledTextCtrl, autoCompCancel, 0}},
- {3054, {wxStyledTextCtrl, autoCompActive, 0}},
- {3055, {wxStyledTextCtrl, autoCompPosStart, 0}},
- {3056, {wxStyledTextCtrl, autoCompComplete, 0}},
- {3057, {wxStyledTextCtrl, autoCompStops, 1}},
- {3058, {wxStyledTextCtrl, autoCompSetSeparator, 1}},
- {3059, {wxStyledTextCtrl, autoCompGetSeparator, 0}},
- {3060, {wxStyledTextCtrl, autoCompSelect, 1}},
- {3061, {wxStyledTextCtrl, autoCompSetCancelAtStart, 1}},
- {3062, {wxStyledTextCtrl, autoCompGetCancelAtStart, 0}},
- {3063, {wxStyledTextCtrl, autoCompSetFillUps, 1}},
- {3064, {wxStyledTextCtrl, autoCompSetChooseSingle, 1}},
- {3065, {wxStyledTextCtrl, autoCompGetChooseSingle, 0}},
- {3066, {wxStyledTextCtrl, autoCompSetIgnoreCase, 1}},
- {3067, {wxStyledTextCtrl, autoCompGetIgnoreCase, 0}},
- {3068, {wxStyledTextCtrl, userListShow, 2}},
- {3069, {wxStyledTextCtrl, autoCompSetAutoHide, 1}},
- {3070, {wxStyledTextCtrl, autoCompGetAutoHide, 0}},
- {3071, {wxStyledTextCtrl, autoCompSetDropRestOfWord, 1}},
- {3072, {wxStyledTextCtrl, autoCompGetDropRestOfWord, 0}},
- {3073, {wxStyledTextCtrl, registerImage, 2}},
- {3074, {wxStyledTextCtrl, clearRegisteredImages, 0}},
- {3075, {wxStyledTextCtrl, autoCompGetTypeSeparator, 0}},
- {3076, {wxStyledTextCtrl, autoCompSetTypeSeparator, 1}},
- {3077, {wxStyledTextCtrl, autoCompSetMaxWidth, 1}},
- {3078, {wxStyledTextCtrl, autoCompGetMaxWidth, 0}},
- {3079, {wxStyledTextCtrl, autoCompSetMaxHeight, 1}},
- {3080, {wxStyledTextCtrl, autoCompGetMaxHeight, 0}},
- {3081, {wxStyledTextCtrl, setIndent, 1}},
- {3082, {wxStyledTextCtrl, getIndent, 0}},
- {3083, {wxStyledTextCtrl, setUseTabs, 1}},
- {3084, {wxStyledTextCtrl, getUseTabs, 0}},
- {3085, {wxStyledTextCtrl, setLineIndentation, 2}},
- {3086, {wxStyledTextCtrl, getLineIndentation, 1}},
- {3087, {wxStyledTextCtrl, getLineIndentPosition, 1}},
- {3088, {wxStyledTextCtrl, getColumn, 1}},
- {3089, {wxStyledTextCtrl, setUseHorizontalScrollBar, 1}},
- {3090, {wxStyledTextCtrl, getUseHorizontalScrollBar, 0}},
- {3091, {wxStyledTextCtrl, setIndentationGuides, 1}},
- {3092, {wxStyledTextCtrl, getIndentationGuides, 0}},
- {3093, {wxStyledTextCtrl, setHighlightGuide, 1}},
- {3094, {wxStyledTextCtrl, getHighlightGuide, 0}},
- {3095, {wxStyledTextCtrl, getLineEndPosition, 1}},
- {3096, {wxStyledTextCtrl, getCodePage, 0}},
- {3097, {wxStyledTextCtrl, getCaretForeground, 0}},
- {3098, {wxStyledTextCtrl, getReadOnly, 0}},
- {3099, {wxStyledTextCtrl, setCurrentPos, 1}},
- {3100, {wxStyledTextCtrl, setSelectionStart, 1}},
- {3101, {wxStyledTextCtrl, getSelectionStart, 0}},
- {3102, {wxStyledTextCtrl, setSelectionEnd, 1}},
- {3103, {wxStyledTextCtrl, getSelectionEnd, 0}},
- {3104, {wxStyledTextCtrl, setPrintMagnification, 1}},
- {3105, {wxStyledTextCtrl, getPrintMagnification, 0}},
- {3106, {wxStyledTextCtrl, setPrintColourMode, 1}},
- {3107, {wxStyledTextCtrl, getPrintColourMode, 0}},
- {3108, {wxStyledTextCtrl, findText, 4}},
- {3109, {wxStyledTextCtrl, formatRange, 7}},
- {3110, {wxStyledTextCtrl, getFirstVisibleLine, 0}},
- {3111, {wxStyledTextCtrl, getLine, 1}},
- {3112, {wxStyledTextCtrl, getLineCount, 0}},
- {3113, {wxStyledTextCtrl, setMarginLeft, 1}},
- {3114, {wxStyledTextCtrl, getMarginLeft, 0}},
- {3115, {wxStyledTextCtrl, setMarginRight, 1}},
- {3116, {wxStyledTextCtrl, getMarginRight, 0}},
- {3117, {wxStyledTextCtrl, getModify, 0}},
- {3118, {wxStyledTextCtrl, setSelection, 2}},
- {3119, {wxStyledTextCtrl, getSelectedText, 0}},
- {3120, {wxStyledTextCtrl, getTextRange, 2}},
- {3121, {wxStyledTextCtrl, hideSelection, 1}},
- {3122, {wxStyledTextCtrl, lineFromPosition, 1}},
- {3123, {wxStyledTextCtrl, positionFromLine, 1}},
- {3124, {wxStyledTextCtrl, lineScroll, 2}},
- {3125, {wxStyledTextCtrl, ensureCaretVisible, 0}},
- {3126, {wxStyledTextCtrl, replaceSelection, 1}},
- {3127, {wxStyledTextCtrl, setReadOnly, 1}},
- {3128, {wxStyledTextCtrl, canPaste, 0}},
- {3129, {wxStyledTextCtrl, canUndo, 0}},
- {3130, {wxStyledTextCtrl, emptyUndoBuffer, 0}},
- {3131, {wxStyledTextCtrl, undo, 0}},
- {3132, {wxStyledTextCtrl, cut, 0}},
- {3133, {wxStyledTextCtrl, copy, 0}},
- {3134, {wxStyledTextCtrl, paste, 0}},
- {3135, {wxStyledTextCtrl, clear, 0}},
- {3136, {wxStyledTextCtrl, setText, 1}},
- {3137, {wxStyledTextCtrl, getText, 0}},
- {3138, {wxStyledTextCtrl, getTextLength, 0}},
- {3139, {wxStyledTextCtrl, getOvertype, 0}},
- {3140, {wxStyledTextCtrl, setCaretWidth, 1}},
- {3141, {wxStyledTextCtrl, getCaretWidth, 0}},
- {3142, {wxStyledTextCtrl, setTargetStart, 1}},
- {3143, {wxStyledTextCtrl, getTargetStart, 0}},
- {3144, {wxStyledTextCtrl, setTargetEnd, 1}},
- {3145, {wxStyledTextCtrl, getTargetEnd, 0}},
- {3146, {wxStyledTextCtrl, replaceTarget, 1}},
- {3147, {wxStyledTextCtrl, searchInTarget, 1}},
- {3148, {wxStyledTextCtrl, setSearchFlags, 1}},
- {3149, {wxStyledTextCtrl, getSearchFlags, 0}},
- {3150, {wxStyledTextCtrl, callTipShow, 2}},
- {3151, {wxStyledTextCtrl, callTipCancel, 0}},
- {3152, {wxStyledTextCtrl, callTipActive, 0}},
- {3153, {wxStyledTextCtrl, callTipPosAtStart, 0}},
- {3154, {wxStyledTextCtrl, callTipSetHighlight, 2}},
- {3155, {wxStyledTextCtrl, callTipSetBackground, 1}},
- {3156, {wxStyledTextCtrl, callTipSetForeground, 1}},
- {3157, {wxStyledTextCtrl, callTipSetForegroundHighlight, 1}},
- {3158, {wxStyledTextCtrl, callTipUseStyle, 1}},
- {3159, {wxStyledTextCtrl, visibleFromDocLine, 1}},
- {3160, {wxStyledTextCtrl, docLineFromVisible, 1}},
- {3161, {wxStyledTextCtrl, wrapCount, 1}},
- {3162, {wxStyledTextCtrl, setFoldLevel, 2}},
- {3163, {wxStyledTextCtrl, getFoldLevel, 1}},
- {3164, {wxStyledTextCtrl, getLastChild, 2}},
- {3165, {wxStyledTextCtrl, getFoldParent, 1}},
- {3166, {wxStyledTextCtrl, showLines, 2}},
- {3167, {wxStyledTextCtrl, hideLines, 2}},
- {3168, {wxStyledTextCtrl, getLineVisible, 1}},
- {3169, {wxStyledTextCtrl, setFoldExpanded, 2}},
- {3170, {wxStyledTextCtrl, getFoldExpanded, 1}},
- {3171, {wxStyledTextCtrl, toggleFold, 1}},
- {3172, {wxStyledTextCtrl, ensureVisible, 1}},
- {3173, {wxStyledTextCtrl, setFoldFlags, 1}},
- {3174, {wxStyledTextCtrl, ensureVisibleEnforcePolicy, 1}},
- {3175, {wxStyledTextCtrl, setTabIndents, 1}},
- {3176, {wxStyledTextCtrl, getTabIndents, 0}},
- {3177, {wxStyledTextCtrl, setBackSpaceUnIndents, 1}},
- {3178, {wxStyledTextCtrl, getBackSpaceUnIndents, 0}},
- {3179, {wxStyledTextCtrl, setMouseDwellTime, 1}},
- {3180, {wxStyledTextCtrl, getMouseDwellTime, 0}},
- {3181, {wxStyledTextCtrl, wordStartPosition, 2}},
- {3182, {wxStyledTextCtrl, wordEndPosition, 2}},
- {3183, {wxStyledTextCtrl, setWrapMode, 1}},
- {3184, {wxStyledTextCtrl, getWrapMode, 0}},
- {3185, {wxStyledTextCtrl, setWrapVisualFlags, 1}},
- {3186, {wxStyledTextCtrl, getWrapVisualFlags, 0}},
- {3187, {wxStyledTextCtrl, setWrapVisualFlagsLocation, 1}},
- {3188, {wxStyledTextCtrl, getWrapVisualFlagsLocation, 0}},
- {3189, {wxStyledTextCtrl, setWrapStartIndent, 1}},
- {3190, {wxStyledTextCtrl, getWrapStartIndent, 0}},
- {3191, {wxStyledTextCtrl, setLayoutCache, 1}},
- {3192, {wxStyledTextCtrl, getLayoutCache, 0}},
- {3193, {wxStyledTextCtrl, setScrollWidth, 1}},
- {3194, {wxStyledTextCtrl, getScrollWidth, 0}},
- {3195, {wxStyledTextCtrl, textWidth, 2}},
- {3196, {wxStyledTextCtrl, getEndAtLastLine, 0}},
- {3197, {wxStyledTextCtrl, textHeight, 1}},
- {3198, {wxStyledTextCtrl, setUseVerticalScrollBar, 1}},
- {3199, {wxStyledTextCtrl, getUseVerticalScrollBar, 0}},
- {3200, {wxStyledTextCtrl, appendText, 1}},
- {3201, {wxStyledTextCtrl, getTwoPhaseDraw, 0}},
- {3202, {wxStyledTextCtrl, setTwoPhaseDraw, 1}},
- {3203, {wxStyledTextCtrl, targetFromSelection, 0}},
- {3204, {wxStyledTextCtrl, linesJoin, 0}},
- {3205, {wxStyledTextCtrl, linesSplit, 1}},
- {3206, {wxStyledTextCtrl, setFoldMarginColour, 2}},
- {3207, {wxStyledTextCtrl, setFoldMarginHiColour, 2}},
- {3208, {wxStyledTextCtrl, lineDown, 0}},
- {3209, {wxStyledTextCtrl, lineDownExtend, 0}},
- {3210, {wxStyledTextCtrl, lineUp, 0}},
- {3211, {wxStyledTextCtrl, lineUpExtend, 0}},
- {3212, {wxStyledTextCtrl, charLeft, 0}},
- {3213, {wxStyledTextCtrl, charLeftExtend, 0}},
- {3214, {wxStyledTextCtrl, charRight, 0}},
- {3215, {wxStyledTextCtrl, charRightExtend, 0}},
- {3216, {wxStyledTextCtrl, wordLeft, 0}},
- {3217, {wxStyledTextCtrl, wordLeftExtend, 0}},
- {3218, {wxStyledTextCtrl, wordRight, 0}},
- {3219, {wxStyledTextCtrl, wordRightExtend, 0}},
- {3220, {wxStyledTextCtrl, home, 0}},
- {3221, {wxStyledTextCtrl, homeExtend, 0}},
- {3222, {wxStyledTextCtrl, lineEnd, 0}},
- {3223, {wxStyledTextCtrl, lineEndExtend, 0}},
- {3224, {wxStyledTextCtrl, documentStart, 0}},
- {3225, {wxStyledTextCtrl, documentStartExtend, 0}},
- {3226, {wxStyledTextCtrl, documentEnd, 0}},
- {3227, {wxStyledTextCtrl, documentEndExtend, 0}},
- {3228, {wxStyledTextCtrl, pageUp, 0}},
- {3229, {wxStyledTextCtrl, pageUpExtend, 0}},
- {3230, {wxStyledTextCtrl, pageDown, 0}},
- {3231, {wxStyledTextCtrl, pageDownExtend, 0}},
- {3232, {wxStyledTextCtrl, editToggleOvertype, 0}},
- {3233, {wxStyledTextCtrl, cancel, 0}},
- {3234, {wxStyledTextCtrl, deleteBack, 0}},
- {3235, {wxStyledTextCtrl, tab, 0}},
- {3236, {wxStyledTextCtrl, backTab, 0}},
- {3237, {wxStyledTextCtrl, newLine, 0}},
- {3238, {wxStyledTextCtrl, formFeed, 0}},
- {3239, {wxStyledTextCtrl, vCHome, 0}},
- {3240, {wxStyledTextCtrl, vCHomeExtend, 0}},
- {3241, {wxStyledTextCtrl, zoomIn, 0}},
- {3242, {wxStyledTextCtrl, zoomOut, 0}},
- {3243, {wxStyledTextCtrl, delWordLeft, 0}},
- {3244, {wxStyledTextCtrl, delWordRight, 0}},
- {3245, {wxStyledTextCtrl, lineCut, 0}},
- {3246, {wxStyledTextCtrl, lineDelete, 0}},
- {3247, {wxStyledTextCtrl, lineTranspose, 0}},
- {3248, {wxStyledTextCtrl, lineDuplicate, 0}},
- {3249, {wxStyledTextCtrl, lowerCase, 0}},
- {3250, {wxStyledTextCtrl, upperCase, 0}},
- {3251, {wxStyledTextCtrl, lineScrollDown, 0}},
- {3252, {wxStyledTextCtrl, lineScrollUp, 0}},
- {3253, {wxStyledTextCtrl, deleteBackNotLine, 0}},
- {3254, {wxStyledTextCtrl, homeDisplay, 0}},
- {3255, {wxStyledTextCtrl, homeDisplayExtend, 0}},
- {3256, {wxStyledTextCtrl, lineEndDisplay, 0}},
- {3257, {wxStyledTextCtrl, lineEndDisplayExtend, 0}},
- {3258, {wxStyledTextCtrl, homeWrapExtend, 0}},
- {3259, {wxStyledTextCtrl, lineEndWrap, 0}},
- {3260, {wxStyledTextCtrl, lineEndWrapExtend, 0}},
- {3261, {wxStyledTextCtrl, vCHomeWrap, 0}},
- {3262, {wxStyledTextCtrl, vCHomeWrapExtend, 0}},
- {3263, {wxStyledTextCtrl, lineCopy, 0}},
- {3264, {wxStyledTextCtrl, moveCaretInsideView, 0}},
- {3265, {wxStyledTextCtrl, lineLength, 1}},
- {3266, {wxStyledTextCtrl, braceHighlight, 2}},
- {3267, {wxStyledTextCtrl, braceBadLight, 1}},
- {3268, {wxStyledTextCtrl, braceMatch, 1}},
- {3269, {wxStyledTextCtrl, getViewEOL, 0}},
- {3270, {wxStyledTextCtrl, setViewEOL, 1}},
- {3271, {wxStyledTextCtrl, setModEventMask, 1}},
- {3272, {wxStyledTextCtrl, getEdgeColumn, 0}},
- {3273, {wxStyledTextCtrl, setEdgeColumn, 1}},
- {3274, {wxStyledTextCtrl, setEdgeMode, 1}},
- {3275, {wxStyledTextCtrl, getEdgeMode, 0}},
- {3276, {wxStyledTextCtrl, getEdgeColour, 0}},
- {3277, {wxStyledTextCtrl, setEdgeColour, 1}},
- {3278, {wxStyledTextCtrl, searchAnchor, 0}},
- {3279, {wxStyledTextCtrl, searchNext, 2}},
- {3280, {wxStyledTextCtrl, searchPrev, 2}},
- {3281, {wxStyledTextCtrl, linesOnScreen, 0}},
- {3282, {wxStyledTextCtrl, usePopUp, 1}},
- {3283, {wxStyledTextCtrl, selectionIsRectangle, 0}},
- {3284, {wxStyledTextCtrl, setZoom, 1}},
- {3285, {wxStyledTextCtrl, getZoom, 0}},
- {3286, {wxStyledTextCtrl, getModEventMask, 0}},
- {3287, {wxStyledTextCtrl, setSTCFocus, 1}},
- {3288, {wxStyledTextCtrl, getSTCFocus, 0}},
- {3289, {wxStyledTextCtrl, setStatus, 1}},
- {3290, {wxStyledTextCtrl, getStatus, 0}},
- {3291, {wxStyledTextCtrl, setMouseDownCaptures, 1}},
- {3292, {wxStyledTextCtrl, getMouseDownCaptures, 0}},
- {3293, {wxStyledTextCtrl, setSTCCursor, 1}},
- {3294, {wxStyledTextCtrl, getSTCCursor, 0}},
- {3295, {wxStyledTextCtrl, setControlCharSymbol, 1}},
- {3296, {wxStyledTextCtrl, getControlCharSymbol, 0}},
- {3297, {wxStyledTextCtrl, wordPartLeft, 0}},
- {3298, {wxStyledTextCtrl, wordPartLeftExtend, 0}},
- {3299, {wxStyledTextCtrl, wordPartRight, 0}},
- {3300, {wxStyledTextCtrl, wordPartRightExtend, 0}},
- {3301, {wxStyledTextCtrl, setVisiblePolicy, 2}},
- {3302, {wxStyledTextCtrl, delLineLeft, 0}},
- {3303, {wxStyledTextCtrl, delLineRight, 0}},
- {3304, {wxStyledTextCtrl, getXOffset, 0}},
- {3305, {wxStyledTextCtrl, chooseCaretX, 0}},
- {3306, {wxStyledTextCtrl, setXCaretPolicy, 2}},
- {3307, {wxStyledTextCtrl, setYCaretPolicy, 2}},
- {3308, {wxStyledTextCtrl, getPrintWrapMode, 0}},
- {3309, {wxStyledTextCtrl, setHotspotActiveForeground, 2}},
- {3310, {wxStyledTextCtrl, setHotspotActiveBackground, 2}},
- {3311, {wxStyledTextCtrl, setHotspotActiveUnderline, 1}},
- {3312, {wxStyledTextCtrl, setHotspotSingleLine, 1}},
- {3313, {wxStyledTextCtrl, paraDownExtend, 0}},
- {3314, {wxStyledTextCtrl, paraUp, 0}},
- {3315, {wxStyledTextCtrl, paraUpExtend, 0}},
- {3316, {wxStyledTextCtrl, positionBefore, 1}},
- {3317, {wxStyledTextCtrl, positionAfter, 1}},
- {3318, {wxStyledTextCtrl, copyRange, 2}},
- {3319, {wxStyledTextCtrl, copyText, 2}},
- {3320, {wxStyledTextCtrl, setSelectionMode, 1}},
- {3321, {wxStyledTextCtrl, getSelectionMode, 0}},
- {3322, {wxStyledTextCtrl, lineDownRectExtend, 0}},
- {3323, {wxStyledTextCtrl, lineUpRectExtend, 0}},
- {3324, {wxStyledTextCtrl, charLeftRectExtend, 0}},
- {3325, {wxStyledTextCtrl, charRightRectExtend, 0}},
- {3326, {wxStyledTextCtrl, homeRectExtend, 0}},
- {3327, {wxStyledTextCtrl, vCHomeRectExtend, 0}},
- {3328, {wxStyledTextCtrl, lineEndRectExtend, 0}},
- {3329, {wxStyledTextCtrl, pageUpRectExtend, 0}},
- {3330, {wxStyledTextCtrl, pageDownRectExtend, 0}},
- {3331, {wxStyledTextCtrl, stutteredPageUp, 0}},
- {3332, {wxStyledTextCtrl, stutteredPageUpExtend, 0}},
- {3333, {wxStyledTextCtrl, stutteredPageDown, 0}},
- {3334, {wxStyledTextCtrl, stutteredPageDownExtend, 0}},
- {3335, {wxStyledTextCtrl, wordLeftEnd, 0}},
- {3336, {wxStyledTextCtrl, wordLeftEndExtend, 0}},
- {3337, {wxStyledTextCtrl, wordRightEnd, 0}},
- {3338, {wxStyledTextCtrl, wordRightEndExtend, 0}},
- {3339, {wxStyledTextCtrl, setWhitespaceChars, 1}},
- {3340, {wxStyledTextCtrl, setCharsDefault, 0}},
- {3341, {wxStyledTextCtrl, autoCompGetCurrent, 0}},
- {3342, {wxStyledTextCtrl, allocate, 1}},
- {3343, {wxStyledTextCtrl, findColumn, 2}},
- {3344, {wxStyledTextCtrl, getCaretSticky, 0}},
- {3345, {wxStyledTextCtrl, setCaretSticky, 1}},
- {3346, {wxStyledTextCtrl, toggleCaretSticky, 0}},
- {3347, {wxStyledTextCtrl, setPasteConvertEndings, 1}},
- {3348, {wxStyledTextCtrl, getPasteConvertEndings, 0}},
- {3349, {wxStyledTextCtrl, selectionDuplicate, 0}},
- {3350, {wxStyledTextCtrl, setCaretLineBackAlpha, 1}},
- {3351, {wxStyledTextCtrl, getCaretLineBackAlpha, 0}},
- {3352, {wxStyledTextCtrl, startRecord, 0}},
- {3353, {wxStyledTextCtrl, stopRecord, 0}},
- {3354, {wxStyledTextCtrl, setLexer, 1}},
- {3355, {wxStyledTextCtrl, getLexer, 0}},
- {3356, {wxStyledTextCtrl, colourise, 2}},
- {3357, {wxStyledTextCtrl, setProperty, 2}},
- {3358, {wxStyledTextCtrl, setKeyWords, 2}},
- {3359, {wxStyledTextCtrl, setLexerLanguage, 1}},
- {3360, {wxStyledTextCtrl, getProperty, 1}},
- {3361, {wxStyledTextCtrl, getStyleBitsNeeded, 0}},
- {3362, {wxStyledTextCtrl, getCurrentLine, 0}},
- {3363, {wxStyledTextCtrl, styleSetSpec, 2}},
- {3364, {wxStyledTextCtrl, styleSetFont, 2}},
- {3365, {wxStyledTextCtrl, styleSetFontAttr, 7}},
- {3366, {wxStyledTextCtrl, styleSetCharacterSet, 2}},
- {3367, {wxStyledTextCtrl, styleSetFontEncoding, 2}},
- {3368, {wxStyledTextCtrl, cmdKeyExecute, 1}},
- {3369, {wxStyledTextCtrl, setMargins, 2}},
- {3370, {wxStyledTextCtrl, getSelection, 2}},
- {3371, {wxStyledTextCtrl, pointFromPosition, 1}},
- {3372, {wxStyledTextCtrl, scrollToLine, 1}},
- {3373, {wxStyledTextCtrl, scrollToColumn, 1}},
- {3374, {wxStyledTextCtrl, setVScrollBar, 1}},
- {3375, {wxStyledTextCtrl, setHScrollBar, 1}},
- {3376, {wxStyledTextCtrl, getLastKeydownProcessed, 0}},
- {3377, {wxStyledTextCtrl, setLastKeydownProcessed, 1}},
- {3378, {wxStyledTextCtrl, saveFile, 1}},
- {3379, {wxStyledTextCtrl, loadFile, 1}},
- {3380, {wxStyledTextCtrl, doDragOver, 3}},
- {3381, {wxStyledTextCtrl, doDropText, 3}},
- {3382, {wxStyledTextCtrl, getUseAntiAliasing, 0}},
- {3383, {wxStyledTextCtrl, addTextRaw, 1}},
- {3384, {wxStyledTextCtrl, insertTextRaw, 2}},
- {3385, {wxStyledTextCtrl, getCurLineRaw, 1}},
- {3386, {wxStyledTextCtrl, getLineRaw, 1}},
- {3387, {wxStyledTextCtrl, getSelectedTextRaw, 0}},
- {3388, {wxStyledTextCtrl, getTextRangeRaw, 2}},
- {3389, {wxStyledTextCtrl, setTextRaw, 1}},
- {3390, {wxStyledTextCtrl, getTextRaw, 0}},
- {3391, {wxStyledTextCtrl, appendTextRaw, 1}},
- {3392, {wxArtProvider, getBitmap, 2}},
- {3393, {wxArtProvider, getIcon, 2}},
- {3394, {wxTreeEvent, getKeyCode, 0}},
- {3395, {wxTreeEvent, getItem, 0}},
- {3396, {wxTreeEvent, getKeyEvent, 0}},
- {3397, {wxTreeEvent, getLabel, 0}},
- {3398, {wxTreeEvent, getOldItem, 0}},
- {3399, {wxTreeEvent, getPoint, 0}},
- {3400, {wxTreeEvent, isEditCancelled, 0}},
- {3401, {wxTreeEvent, setToolTip, 1}},
- {3402, {wxNotebookEvent, getOldSelection, 0}},
- {3403, {wxNotebookEvent, getSelection, 0}},
- {3404, {wxNotebookEvent, setOldSelection, 1}},
- {3405, {wxNotebookEvent, setSelection, 1}},
- {3406, {wxFileDataObject, new, 0}},
- {3407, {wxFileDataObject, addFile, 1}},
- {3408, {wxFileDataObject, getFilenames, 0}},
- {3409, {wxFileDataObject, 'Destroy', undefined}},
- {3410, {wxTextDataObject, new, 1}},
- {3411, {wxTextDataObject, getTextLength, 0}},
- {3412, {wxTextDataObject, getText, 0}},
- {3413, {wxTextDataObject, setText, 1}},
- {3414, {wxTextDataObject, 'Destroy', undefined}},
- {3415, {wxBitmapDataObject, new_1_1, 1}},
- {3416, {wxBitmapDataObject, new_1_0, 1}},
- {3417, {wxBitmapDataObject, getBitmap, 0}},
- {3418, {wxBitmapDataObject, setBitmap, 1}},
- {3419, {wxBitmapDataObject, 'Destroy', undefined}},
- {3421, {wxClipboard, new, 0}},
- {3422, {wxClipboard, destruct, 0}},
- {3423, {wxClipboard, addData, 1}},
- {3424, {wxClipboard, clear, 0}},
- {3425, {wxClipboard, close, 0}},
- {3426, {wxClipboard, flush, 0}},
- {3427, {wxClipboard, getData, 1}},
- {3428, {wxClipboard, isOpened, 0}},
- {3429, {wxClipboard, open, 0}},
- {3430, {wxClipboard, setData, 1}},
- {3432, {wxClipboard, usePrimarySelection, 1}},
- {3433, {wxClipboard, isSupported, 1}},
- {3434, {wxClipboard, get, 0}},
- {3435, {wxSpinEvent, getPosition, 0}},
- {3436, {wxSpinEvent, setPosition, 1}},
- {3437, {wxSplitterWindow, new_0, 0}},
- {3438, {wxSplitterWindow, new_2, 2}},
- {3439, {wxSplitterWindow, destruct, 0}},
- {3440, {wxSplitterWindow, create, 2}},
- {3441, {wxSplitterWindow, getMinimumPaneSize, 0}},
- {3442, {wxSplitterWindow, getSashGravity, 0}},
- {3443, {wxSplitterWindow, getSashPosition, 0}},
- {3444, {wxSplitterWindow, getSplitMode, 0}},
- {3445, {wxSplitterWindow, getWindow1, 0}},
- {3446, {wxSplitterWindow, getWindow2, 0}},
- {3447, {wxSplitterWindow, initialize, 1}},
- {3448, {wxSplitterWindow, isSplit, 0}},
- {3449, {wxSplitterWindow, replaceWindow, 2}},
- {3450, {wxSplitterWindow, setSashGravity, 1}},
- {3451, {wxSplitterWindow, setSashPosition, 2}},
- {3452, {wxSplitterWindow, setSashSize, 1}},
- {3453, {wxSplitterWindow, setMinimumPaneSize, 1}},
- {3454, {wxSplitterWindow, setSplitMode, 1}},
- {3455, {wxSplitterWindow, splitHorizontally, 3}},
- {3456, {wxSplitterWindow, splitVertically, 3}},
- {3457, {wxSplitterWindow, unsplit, 1}},
- {3458, {wxSplitterWindow, updateSize, 0}},
- {3459, {wxSplitterEvent, getSashPosition, 0}},
- {3460, {wxSplitterEvent, getX, 0}},
- {3461, {wxSplitterEvent, getY, 0}},
- {3462, {wxSplitterEvent, getWindowBeingRemoved, 0}},
- {3463, {wxSplitterEvent, setSashPosition, 1}},
- {3464, {wxHtmlWindow, new_0, 0}},
- {3465, {wxHtmlWindow, new_2, 2}},
- {3466, {wxHtmlWindow, appendToPage, 1}},
- {3467, {wxHtmlWindow, getOpenedAnchor, 0}},
- {3468, {wxHtmlWindow, getOpenedPage, 0}},
- {3469, {wxHtmlWindow, getOpenedPageTitle, 0}},
- {3470, {wxHtmlWindow, getRelatedFrame, 0}},
- {3471, {wxHtmlWindow, historyBack, 0}},
- {3472, {wxHtmlWindow, historyCanBack, 0}},
- {3473, {wxHtmlWindow, historyCanForward, 0}},
- {3474, {wxHtmlWindow, historyClear, 0}},
- {3475, {wxHtmlWindow, historyForward, 0}},
- {3476, {wxHtmlWindow, loadFile, 1}},
- {3477, {wxHtmlWindow, loadPage, 1}},
- {3478, {wxHtmlWindow, selectAll, 0}},
- {3479, {wxHtmlWindow, selectionToText, 0}},
- {3480, {wxHtmlWindow, selectLine, 1}},
- {3481, {wxHtmlWindow, selectWord, 1}},
- {3482, {wxHtmlWindow, setBorders, 1}},
- {3483, {wxHtmlWindow, setFonts, 3}},
- {3484, {wxHtmlWindow, setPage, 1}},
- {3485, {wxHtmlWindow, setRelatedFrame, 2}},
- {3486, {wxHtmlWindow, setRelatedStatusBar, 1}},
- {3487, {wxHtmlWindow, toText, 0}},
- {3488, {wxHtmlWindow, 'Destroy', undefined}},
- {3489, {wxHtmlLinkEvent, getLinkInfo, 0}},
- {3490, {wxSystemSettings, getColour, 1}},
- {3491, {wxSystemSettings, getFont, 1}},
- {3492, {wxSystemSettings, getMetric, 2}},
- {3493, {wxSystemSettings, getScreenType, 0}},
- {3494, {wxSystemOptions, getOption, 1}},
- {3495, {wxSystemOptions, getOptionInt, 1}},
- {3496, {wxSystemOptions, hasOption, 1}},
- {3497, {wxSystemOptions, isFalse, 1}},
- {3498, {wxSystemOptions, setOption_2_1, 2}},
- {3499, {wxSystemOptions, setOption_2_0, 2}},
- {3500, {wxAuiNotebookEvent, setSelection, 1}},
- {3501, {wxAuiNotebookEvent, getSelection, 0}},
- {3502, {wxAuiNotebookEvent, setOldSelection, 1}},
- {3503, {wxAuiNotebookEvent, getOldSelection, 0}},
- {3504, {wxAuiNotebookEvent, setDragSource, 1}},
- {3505, {wxAuiNotebookEvent, getDragSource, 0}},
- {3506, {wxAuiManagerEvent, setManager, 1}},
- {3507, {wxAuiManagerEvent, getManager, 0}},
- {3508, {wxAuiManagerEvent, setPane, 1}},
- {3509, {wxAuiManagerEvent, getPane, 0}},
- {3510, {wxAuiManagerEvent, setButton, 1}},
- {3511, {wxAuiManagerEvent, getButton, 0}},
- {3512, {wxAuiManagerEvent, setDC, 1}},
- {3513, {wxAuiManagerEvent, getDC, 0}},
- {3514, {wxAuiManagerEvent, veto, 1}},
- {3515, {wxAuiManagerEvent, getVeto, 0}},
- {3516, {wxAuiManagerEvent, setCanVeto, 1}},
- {3517, {wxAuiManagerEvent, canVeto, 0}},
- {3518, {wxLogNull, new, 0}},
- {3519, {wxLogNull, 'Destroy', undefined}},
- {3520, {wxTaskBarIcon, new, 0}},
- {3521, {wxTaskBarIcon, destruct, 0}},
- {3522, {wxTaskBarIcon, popupMenu, 1}},
- {3523, {wxTaskBarIcon, removeIcon, 0}},
- {3524, {wxTaskBarIcon, setIcon, 2}},
+ {2927, {gdicmn, displaySize, 2}},
+ {2928, {gdicmn, setCursor, 1}},
+ {2929, {wxPrintout, new, 1}},
+ {2930, {wxPrintout, destruct, 0}},
+ {2931, {wxPrintout, getDC, 0}},
+ {2932, {wxPrintout, getPageSizeMM, 2}},
+ {2933, {wxPrintout, getPageSizePixels, 2}},
+ {2934, {wxPrintout, getPaperRectPixels, 0}},
+ {2935, {wxPrintout, getPPIPrinter, 2}},
+ {2936, {wxPrintout, getPPIScreen, 2}},
+ {2937, {wxPrintout, getTitle, 0}},
+ {2938, {wxPrintout, isPreview, 0}},
+ {2939, {wxPrintout, fitThisSizeToPaper, 1}},
+ {2940, {wxPrintout, fitThisSizeToPage, 1}},
+ {2941, {wxPrintout, fitThisSizeToPageMargins, 2}},
+ {2942, {wxPrintout, mapScreenSizeToPaper, 0}},
+ {2943, {wxPrintout, mapScreenSizeToPage, 0}},
+ {2944, {wxPrintout, mapScreenSizeToPageMargins, 1}},
+ {2945, {wxPrintout, mapScreenSizeToDevice, 0}},
+ {2946, {wxPrintout, getLogicalPaperRect, 0}},
+ {2947, {wxPrintout, getLogicalPageRect, 0}},
+ {2948, {wxPrintout, getLogicalPageMarginsRect, 1}},
+ {2949, {wxPrintout, setLogicalOrigin, 2}},
+ {2950, {wxPrintout, offsetLogicalOrigin, 2}},
+ {2951, {wxStyledTextCtrl, new_2, 2}},
+ {2952, {wxStyledTextCtrl, new_0, 0}},
+ {2953, {wxStyledTextCtrl, destruct, 0}},
+ {2954, {wxStyledTextCtrl, create, 2}},
+ {2955, {wxStyledTextCtrl, addText, 1}},
+ {2956, {wxStyledTextCtrl, addStyledText, 1}},
+ {2957, {wxStyledTextCtrl, insertText, 2}},
+ {2958, {wxStyledTextCtrl, clearAll, 0}},
+ {2959, {wxStyledTextCtrl, clearDocumentStyle, 0}},
+ {2960, {wxStyledTextCtrl, getLength, 0}},
+ {2961, {wxStyledTextCtrl, getCharAt, 1}},
+ {2962, {wxStyledTextCtrl, getCurrentPos, 0}},
+ {2963, {wxStyledTextCtrl, getAnchor, 0}},
+ {2964, {wxStyledTextCtrl, getStyleAt, 1}},
+ {2965, {wxStyledTextCtrl, redo, 0}},
+ {2966, {wxStyledTextCtrl, setUndoCollection, 1}},
+ {2967, {wxStyledTextCtrl, selectAll, 0}},
+ {2968, {wxStyledTextCtrl, setSavePoint, 0}},
+ {2969, {wxStyledTextCtrl, getStyledText, 2}},
+ {2970, {wxStyledTextCtrl, canRedo, 0}},
+ {2971, {wxStyledTextCtrl, markerLineFromHandle, 1}},
+ {2972, {wxStyledTextCtrl, markerDeleteHandle, 1}},
+ {2973, {wxStyledTextCtrl, getUndoCollection, 0}},
+ {2974, {wxStyledTextCtrl, getViewWhiteSpace, 0}},
+ {2975, {wxStyledTextCtrl, setViewWhiteSpace, 1}},
+ {2976, {wxStyledTextCtrl, positionFromPoint, 1}},
+ {2977, {wxStyledTextCtrl, positionFromPointClose, 2}},
+ {2978, {wxStyledTextCtrl, gotoLine, 1}},
+ {2979, {wxStyledTextCtrl, gotoPos, 1}},
+ {2980, {wxStyledTextCtrl, setAnchor, 1}},
+ {2981, {wxStyledTextCtrl, getCurLine, 1}},
+ {2982, {wxStyledTextCtrl, getEndStyled, 0}},
+ {2983, {wxStyledTextCtrl, convertEOLs, 1}},
+ {2984, {wxStyledTextCtrl, getEOLMode, 0}},
+ {2985, {wxStyledTextCtrl, setEOLMode, 1}},
+ {2986, {wxStyledTextCtrl, startStyling, 2}},
+ {2987, {wxStyledTextCtrl, setStyling, 2}},
+ {2988, {wxStyledTextCtrl, getBufferedDraw, 0}},
+ {2989, {wxStyledTextCtrl, setBufferedDraw, 1}},
+ {2990, {wxStyledTextCtrl, setTabWidth, 1}},
+ {2991, {wxStyledTextCtrl, getTabWidth, 0}},
+ {2992, {wxStyledTextCtrl, setCodePage, 1}},
+ {2993, {wxStyledTextCtrl, markerDefine, 3}},
+ {2994, {wxStyledTextCtrl, markerSetForeground, 2}},
+ {2995, {wxStyledTextCtrl, markerSetBackground, 2}},
+ {2996, {wxStyledTextCtrl, markerAdd, 2}},
+ {2997, {wxStyledTextCtrl, markerDelete, 2}},
+ {2998, {wxStyledTextCtrl, markerDeleteAll, 1}},
+ {2999, {wxStyledTextCtrl, markerGet, 1}},
+ {3000, {wxStyledTextCtrl, markerNext, 2}},
+ {3001, {wxStyledTextCtrl, markerPrevious, 2}},
+ {3002, {wxStyledTextCtrl, markerDefineBitmap, 2}},
+ {3003, {wxStyledTextCtrl, markerAddSet, 2}},
+ {3004, {wxStyledTextCtrl, markerSetAlpha, 2}},
+ {3005, {wxStyledTextCtrl, setMarginType, 2}},
+ {3006, {wxStyledTextCtrl, getMarginType, 1}},
+ {3007, {wxStyledTextCtrl, setMarginWidth, 2}},
+ {3008, {wxStyledTextCtrl, getMarginWidth, 1}},
+ {3009, {wxStyledTextCtrl, setMarginMask, 2}},
+ {3010, {wxStyledTextCtrl, getMarginMask, 1}},
+ {3011, {wxStyledTextCtrl, setMarginSensitive, 2}},
+ {3012, {wxStyledTextCtrl, getMarginSensitive, 1}},
+ {3013, {wxStyledTextCtrl, styleClearAll, 0}},
+ {3014, {wxStyledTextCtrl, styleSetForeground, 2}},
+ {3015, {wxStyledTextCtrl, styleSetBackground, 2}},
+ {3016, {wxStyledTextCtrl, styleSetBold, 2}},
+ {3017, {wxStyledTextCtrl, styleSetItalic, 2}},
+ {3018, {wxStyledTextCtrl, styleSetSize, 2}},
+ {3019, {wxStyledTextCtrl, styleSetFaceName, 2}},
+ {3020, {wxStyledTextCtrl, styleSetEOLFilled, 2}},
+ {3021, {wxStyledTextCtrl, styleResetDefault, 0}},
+ {3022, {wxStyledTextCtrl, styleSetUnderline, 2}},
+ {3023, {wxStyledTextCtrl, styleSetCase, 2}},
+ {3024, {wxStyledTextCtrl, styleSetHotSpot, 2}},
+ {3025, {wxStyledTextCtrl, setSelForeground, 2}},
+ {3026, {wxStyledTextCtrl, setSelBackground, 2}},
+ {3027, {wxStyledTextCtrl, getSelAlpha, 0}},
+ {3028, {wxStyledTextCtrl, setSelAlpha, 1}},
+ {3029, {wxStyledTextCtrl, setCaretForeground, 1}},
+ {3030, {wxStyledTextCtrl, cmdKeyAssign, 3}},
+ {3031, {wxStyledTextCtrl, cmdKeyClear, 2}},
+ {3032, {wxStyledTextCtrl, cmdKeyClearAll, 0}},
+ {3033, {wxStyledTextCtrl, setStyleBytes, 2}},
+ {3034, {wxStyledTextCtrl, styleSetVisible, 2}},
+ {3035, {wxStyledTextCtrl, getCaretPeriod, 0}},
+ {3036, {wxStyledTextCtrl, setCaretPeriod, 1}},
+ {3037, {wxStyledTextCtrl, setWordChars, 1}},
+ {3038, {wxStyledTextCtrl, beginUndoAction, 0}},
+ {3039, {wxStyledTextCtrl, endUndoAction, 0}},
+ {3040, {wxStyledTextCtrl, indicatorSetStyle, 2}},
+ {3041, {wxStyledTextCtrl, indicatorGetStyle, 1}},
+ {3042, {wxStyledTextCtrl, indicatorSetForeground, 2}},
+ {3043, {wxStyledTextCtrl, indicatorGetForeground, 1}},
+ {3044, {wxStyledTextCtrl, setWhitespaceForeground, 2}},
+ {3045, {wxStyledTextCtrl, setWhitespaceBackground, 2}},
+ {3046, {wxStyledTextCtrl, getStyleBits, 0}},
+ {3047, {wxStyledTextCtrl, setLineState, 2}},
+ {3048, {wxStyledTextCtrl, getLineState, 1}},
+ {3049, {wxStyledTextCtrl, getMaxLineState, 0}},
+ {3050, {wxStyledTextCtrl, getCaretLineVisible, 0}},
+ {3051, {wxStyledTextCtrl, setCaretLineVisible, 1}},
+ {3052, {wxStyledTextCtrl, getCaretLineBackground, 0}},
+ {3053, {wxStyledTextCtrl, setCaretLineBackground, 1}},
+ {3054, {wxStyledTextCtrl, autoCompShow, 2}},
+ {3055, {wxStyledTextCtrl, autoCompCancel, 0}},
+ {3056, {wxStyledTextCtrl, autoCompActive, 0}},
+ {3057, {wxStyledTextCtrl, autoCompPosStart, 0}},
+ {3058, {wxStyledTextCtrl, autoCompComplete, 0}},
+ {3059, {wxStyledTextCtrl, autoCompStops, 1}},
+ {3060, {wxStyledTextCtrl, autoCompSetSeparator, 1}},
+ {3061, {wxStyledTextCtrl, autoCompGetSeparator, 0}},
+ {3062, {wxStyledTextCtrl, autoCompSelect, 1}},
+ {3063, {wxStyledTextCtrl, autoCompSetCancelAtStart, 1}},
+ {3064, {wxStyledTextCtrl, autoCompGetCancelAtStart, 0}},
+ {3065, {wxStyledTextCtrl, autoCompSetFillUps, 1}},
+ {3066, {wxStyledTextCtrl, autoCompSetChooseSingle, 1}},
+ {3067, {wxStyledTextCtrl, autoCompGetChooseSingle, 0}},
+ {3068, {wxStyledTextCtrl, autoCompSetIgnoreCase, 1}},
+ {3069, {wxStyledTextCtrl, autoCompGetIgnoreCase, 0}},
+ {3070, {wxStyledTextCtrl, userListShow, 2}},
+ {3071, {wxStyledTextCtrl, autoCompSetAutoHide, 1}},
+ {3072, {wxStyledTextCtrl, autoCompGetAutoHide, 0}},
+ {3073, {wxStyledTextCtrl, autoCompSetDropRestOfWord, 1}},
+ {3074, {wxStyledTextCtrl, autoCompGetDropRestOfWord, 0}},
+ {3075, {wxStyledTextCtrl, registerImage, 2}},
+ {3076, {wxStyledTextCtrl, clearRegisteredImages, 0}},
+ {3077, {wxStyledTextCtrl, autoCompGetTypeSeparator, 0}},
+ {3078, {wxStyledTextCtrl, autoCompSetTypeSeparator, 1}},
+ {3079, {wxStyledTextCtrl, autoCompSetMaxWidth, 1}},
+ {3080, {wxStyledTextCtrl, autoCompGetMaxWidth, 0}},
+ {3081, {wxStyledTextCtrl, autoCompSetMaxHeight, 1}},
+ {3082, {wxStyledTextCtrl, autoCompGetMaxHeight, 0}},
+ {3083, {wxStyledTextCtrl, setIndent, 1}},
+ {3084, {wxStyledTextCtrl, getIndent, 0}},
+ {3085, {wxStyledTextCtrl, setUseTabs, 1}},
+ {3086, {wxStyledTextCtrl, getUseTabs, 0}},
+ {3087, {wxStyledTextCtrl, setLineIndentation, 2}},
+ {3088, {wxStyledTextCtrl, getLineIndentation, 1}},
+ {3089, {wxStyledTextCtrl, getLineIndentPosition, 1}},
+ {3090, {wxStyledTextCtrl, getColumn, 1}},
+ {3091, {wxStyledTextCtrl, setUseHorizontalScrollBar, 1}},
+ {3092, {wxStyledTextCtrl, getUseHorizontalScrollBar, 0}},
+ {3093, {wxStyledTextCtrl, setIndentationGuides, 1}},
+ {3094, {wxStyledTextCtrl, getIndentationGuides, 0}},
+ {3095, {wxStyledTextCtrl, setHighlightGuide, 1}},
+ {3096, {wxStyledTextCtrl, getHighlightGuide, 0}},
+ {3097, {wxStyledTextCtrl, getLineEndPosition, 1}},
+ {3098, {wxStyledTextCtrl, getCodePage, 0}},
+ {3099, {wxStyledTextCtrl, getCaretForeground, 0}},
+ {3100, {wxStyledTextCtrl, getReadOnly, 0}},
+ {3101, {wxStyledTextCtrl, setCurrentPos, 1}},
+ {3102, {wxStyledTextCtrl, setSelectionStart, 1}},
+ {3103, {wxStyledTextCtrl, getSelectionStart, 0}},
+ {3104, {wxStyledTextCtrl, setSelectionEnd, 1}},
+ {3105, {wxStyledTextCtrl, getSelectionEnd, 0}},
+ {3106, {wxStyledTextCtrl, setPrintMagnification, 1}},
+ {3107, {wxStyledTextCtrl, getPrintMagnification, 0}},
+ {3108, {wxStyledTextCtrl, setPrintColourMode, 1}},
+ {3109, {wxStyledTextCtrl, getPrintColourMode, 0}},
+ {3110, {wxStyledTextCtrl, findText, 4}},
+ {3111, {wxStyledTextCtrl, formatRange, 7}},
+ {3112, {wxStyledTextCtrl, getFirstVisibleLine, 0}},
+ {3113, {wxStyledTextCtrl, getLine, 1}},
+ {3114, {wxStyledTextCtrl, getLineCount, 0}},
+ {3115, {wxStyledTextCtrl, setMarginLeft, 1}},
+ {3116, {wxStyledTextCtrl, getMarginLeft, 0}},
+ {3117, {wxStyledTextCtrl, setMarginRight, 1}},
+ {3118, {wxStyledTextCtrl, getMarginRight, 0}},
+ {3119, {wxStyledTextCtrl, getModify, 0}},
+ {3120, {wxStyledTextCtrl, setSelection, 2}},
+ {3121, {wxStyledTextCtrl, getSelectedText, 0}},
+ {3122, {wxStyledTextCtrl, getTextRange, 2}},
+ {3123, {wxStyledTextCtrl, hideSelection, 1}},
+ {3124, {wxStyledTextCtrl, lineFromPosition, 1}},
+ {3125, {wxStyledTextCtrl, positionFromLine, 1}},
+ {3126, {wxStyledTextCtrl, lineScroll, 2}},
+ {3127, {wxStyledTextCtrl, ensureCaretVisible, 0}},
+ {3128, {wxStyledTextCtrl, replaceSelection, 1}},
+ {3129, {wxStyledTextCtrl, setReadOnly, 1}},
+ {3130, {wxStyledTextCtrl, canPaste, 0}},
+ {3131, {wxStyledTextCtrl, canUndo, 0}},
+ {3132, {wxStyledTextCtrl, emptyUndoBuffer, 0}},
+ {3133, {wxStyledTextCtrl, undo, 0}},
+ {3134, {wxStyledTextCtrl, cut, 0}},
+ {3135, {wxStyledTextCtrl, copy, 0}},
+ {3136, {wxStyledTextCtrl, paste, 0}},
+ {3137, {wxStyledTextCtrl, clear, 0}},
+ {3138, {wxStyledTextCtrl, setText, 1}},
+ {3139, {wxStyledTextCtrl, getText, 0}},
+ {3140, {wxStyledTextCtrl, getTextLength, 0}},
+ {3141, {wxStyledTextCtrl, getOvertype, 0}},
+ {3142, {wxStyledTextCtrl, setCaretWidth, 1}},
+ {3143, {wxStyledTextCtrl, getCaretWidth, 0}},
+ {3144, {wxStyledTextCtrl, setTargetStart, 1}},
+ {3145, {wxStyledTextCtrl, getTargetStart, 0}},
+ {3146, {wxStyledTextCtrl, setTargetEnd, 1}},
+ {3147, {wxStyledTextCtrl, getTargetEnd, 0}},
+ {3148, {wxStyledTextCtrl, replaceTarget, 1}},
+ {3149, {wxStyledTextCtrl, searchInTarget, 1}},
+ {3150, {wxStyledTextCtrl, setSearchFlags, 1}},
+ {3151, {wxStyledTextCtrl, getSearchFlags, 0}},
+ {3152, {wxStyledTextCtrl, callTipShow, 2}},
+ {3153, {wxStyledTextCtrl, callTipCancel, 0}},
+ {3154, {wxStyledTextCtrl, callTipActive, 0}},
+ {3155, {wxStyledTextCtrl, callTipPosAtStart, 0}},
+ {3156, {wxStyledTextCtrl, callTipSetHighlight, 2}},
+ {3157, {wxStyledTextCtrl, callTipSetBackground, 1}},
+ {3158, {wxStyledTextCtrl, callTipSetForeground, 1}},
+ {3159, {wxStyledTextCtrl, callTipSetForegroundHighlight, 1}},
+ {3160, {wxStyledTextCtrl, callTipUseStyle, 1}},
+ {3161, {wxStyledTextCtrl, visibleFromDocLine, 1}},
+ {3162, {wxStyledTextCtrl, docLineFromVisible, 1}},
+ {3163, {wxStyledTextCtrl, wrapCount, 1}},
+ {3164, {wxStyledTextCtrl, setFoldLevel, 2}},
+ {3165, {wxStyledTextCtrl, getFoldLevel, 1}},
+ {3166, {wxStyledTextCtrl, getLastChild, 2}},
+ {3167, {wxStyledTextCtrl, getFoldParent, 1}},
+ {3168, {wxStyledTextCtrl, showLines, 2}},
+ {3169, {wxStyledTextCtrl, hideLines, 2}},
+ {3170, {wxStyledTextCtrl, getLineVisible, 1}},
+ {3171, {wxStyledTextCtrl, setFoldExpanded, 2}},
+ {3172, {wxStyledTextCtrl, getFoldExpanded, 1}},
+ {3173, {wxStyledTextCtrl, toggleFold, 1}},
+ {3174, {wxStyledTextCtrl, ensureVisible, 1}},
+ {3175, {wxStyledTextCtrl, setFoldFlags, 1}},
+ {3176, {wxStyledTextCtrl, ensureVisibleEnforcePolicy, 1}},
+ {3177, {wxStyledTextCtrl, setTabIndents, 1}},
+ {3178, {wxStyledTextCtrl, getTabIndents, 0}},
+ {3179, {wxStyledTextCtrl, setBackSpaceUnIndents, 1}},
+ {3180, {wxStyledTextCtrl, getBackSpaceUnIndents, 0}},
+ {3181, {wxStyledTextCtrl, setMouseDwellTime, 1}},
+ {3182, {wxStyledTextCtrl, getMouseDwellTime, 0}},
+ {3183, {wxStyledTextCtrl, wordStartPosition, 2}},
+ {3184, {wxStyledTextCtrl, wordEndPosition, 2}},
+ {3185, {wxStyledTextCtrl, setWrapMode, 1}},
+ {3186, {wxStyledTextCtrl, getWrapMode, 0}},
+ {3187, {wxStyledTextCtrl, setWrapVisualFlags, 1}},
+ {3188, {wxStyledTextCtrl, getWrapVisualFlags, 0}},
+ {3189, {wxStyledTextCtrl, setWrapVisualFlagsLocation, 1}},
+ {3190, {wxStyledTextCtrl, getWrapVisualFlagsLocation, 0}},
+ {3191, {wxStyledTextCtrl, setWrapStartIndent, 1}},
+ {3192, {wxStyledTextCtrl, getWrapStartIndent, 0}},
+ {3193, {wxStyledTextCtrl, setLayoutCache, 1}},
+ {3194, {wxStyledTextCtrl, getLayoutCache, 0}},
+ {3195, {wxStyledTextCtrl, setScrollWidth, 1}},
+ {3196, {wxStyledTextCtrl, getScrollWidth, 0}},
+ {3197, {wxStyledTextCtrl, textWidth, 2}},
+ {3198, {wxStyledTextCtrl, getEndAtLastLine, 0}},
+ {3199, {wxStyledTextCtrl, textHeight, 1}},
+ {3200, {wxStyledTextCtrl, setUseVerticalScrollBar, 1}},
+ {3201, {wxStyledTextCtrl, getUseVerticalScrollBar, 0}},
+ {3202, {wxStyledTextCtrl, appendText, 1}},
+ {3203, {wxStyledTextCtrl, getTwoPhaseDraw, 0}},
+ {3204, {wxStyledTextCtrl, setTwoPhaseDraw, 1}},
+ {3205, {wxStyledTextCtrl, targetFromSelection, 0}},
+ {3206, {wxStyledTextCtrl, linesJoin, 0}},
+ {3207, {wxStyledTextCtrl, linesSplit, 1}},
+ {3208, {wxStyledTextCtrl, setFoldMarginColour, 2}},
+ {3209, {wxStyledTextCtrl, setFoldMarginHiColour, 2}},
+ {3210, {wxStyledTextCtrl, lineDown, 0}},
+ {3211, {wxStyledTextCtrl, lineDownExtend, 0}},
+ {3212, {wxStyledTextCtrl, lineUp, 0}},
+ {3213, {wxStyledTextCtrl, lineUpExtend, 0}},
+ {3214, {wxStyledTextCtrl, charLeft, 0}},
+ {3215, {wxStyledTextCtrl, charLeftExtend, 0}},
+ {3216, {wxStyledTextCtrl, charRight, 0}},
+ {3217, {wxStyledTextCtrl, charRightExtend, 0}},
+ {3218, {wxStyledTextCtrl, wordLeft, 0}},
+ {3219, {wxStyledTextCtrl, wordLeftExtend, 0}},
+ {3220, {wxStyledTextCtrl, wordRight, 0}},
+ {3221, {wxStyledTextCtrl, wordRightExtend, 0}},
+ {3222, {wxStyledTextCtrl, home, 0}},
+ {3223, {wxStyledTextCtrl, homeExtend, 0}},
+ {3224, {wxStyledTextCtrl, lineEnd, 0}},
+ {3225, {wxStyledTextCtrl, lineEndExtend, 0}},
+ {3226, {wxStyledTextCtrl, documentStart, 0}},
+ {3227, {wxStyledTextCtrl, documentStartExtend, 0}},
+ {3228, {wxStyledTextCtrl, documentEnd, 0}},
+ {3229, {wxStyledTextCtrl, documentEndExtend, 0}},
+ {3230, {wxStyledTextCtrl, pageUp, 0}},
+ {3231, {wxStyledTextCtrl, pageUpExtend, 0}},
+ {3232, {wxStyledTextCtrl, pageDown, 0}},
+ {3233, {wxStyledTextCtrl, pageDownExtend, 0}},
+ {3234, {wxStyledTextCtrl, editToggleOvertype, 0}},
+ {3235, {wxStyledTextCtrl, cancel, 0}},
+ {3236, {wxStyledTextCtrl, deleteBack, 0}},
+ {3237, {wxStyledTextCtrl, tab, 0}},
+ {3238, {wxStyledTextCtrl, backTab, 0}},
+ {3239, {wxStyledTextCtrl, newLine, 0}},
+ {3240, {wxStyledTextCtrl, formFeed, 0}},
+ {3241, {wxStyledTextCtrl, vCHome, 0}},
+ {3242, {wxStyledTextCtrl, vCHomeExtend, 0}},
+ {3243, {wxStyledTextCtrl, zoomIn, 0}},
+ {3244, {wxStyledTextCtrl, zoomOut, 0}},
+ {3245, {wxStyledTextCtrl, delWordLeft, 0}},
+ {3246, {wxStyledTextCtrl, delWordRight, 0}},
+ {3247, {wxStyledTextCtrl, lineCut, 0}},
+ {3248, {wxStyledTextCtrl, lineDelete, 0}},
+ {3249, {wxStyledTextCtrl, lineTranspose, 0}},
+ {3250, {wxStyledTextCtrl, lineDuplicate, 0}},
+ {3251, {wxStyledTextCtrl, lowerCase, 0}},
+ {3252, {wxStyledTextCtrl, upperCase, 0}},
+ {3253, {wxStyledTextCtrl, lineScrollDown, 0}},
+ {3254, {wxStyledTextCtrl, lineScrollUp, 0}},
+ {3255, {wxStyledTextCtrl, deleteBackNotLine, 0}},
+ {3256, {wxStyledTextCtrl, homeDisplay, 0}},
+ {3257, {wxStyledTextCtrl, homeDisplayExtend, 0}},
+ {3258, {wxStyledTextCtrl, lineEndDisplay, 0}},
+ {3259, {wxStyledTextCtrl, lineEndDisplayExtend, 0}},
+ {3260, {wxStyledTextCtrl, homeWrapExtend, 0}},
+ {3261, {wxStyledTextCtrl, lineEndWrap, 0}},
+ {3262, {wxStyledTextCtrl, lineEndWrapExtend, 0}},
+ {3263, {wxStyledTextCtrl, vCHomeWrap, 0}},
+ {3264, {wxStyledTextCtrl, vCHomeWrapExtend, 0}},
+ {3265, {wxStyledTextCtrl, lineCopy, 0}},
+ {3266, {wxStyledTextCtrl, moveCaretInsideView, 0}},
+ {3267, {wxStyledTextCtrl, lineLength, 1}},
+ {3268, {wxStyledTextCtrl, braceHighlight, 2}},
+ {3269, {wxStyledTextCtrl, braceBadLight, 1}},
+ {3270, {wxStyledTextCtrl, braceMatch, 1}},
+ {3271, {wxStyledTextCtrl, getViewEOL, 0}},
+ {3272, {wxStyledTextCtrl, setViewEOL, 1}},
+ {3273, {wxStyledTextCtrl, setModEventMask, 1}},
+ {3274, {wxStyledTextCtrl, getEdgeColumn, 0}},
+ {3275, {wxStyledTextCtrl, setEdgeColumn, 1}},
+ {3276, {wxStyledTextCtrl, setEdgeMode, 1}},
+ {3277, {wxStyledTextCtrl, getEdgeMode, 0}},
+ {3278, {wxStyledTextCtrl, getEdgeColour, 0}},
+ {3279, {wxStyledTextCtrl, setEdgeColour, 1}},
+ {3280, {wxStyledTextCtrl, searchAnchor, 0}},
+ {3281, {wxStyledTextCtrl, searchNext, 2}},
+ {3282, {wxStyledTextCtrl, searchPrev, 2}},
+ {3283, {wxStyledTextCtrl, linesOnScreen, 0}},
+ {3284, {wxStyledTextCtrl, usePopUp, 1}},
+ {3285, {wxStyledTextCtrl, selectionIsRectangle, 0}},
+ {3286, {wxStyledTextCtrl, setZoom, 1}},
+ {3287, {wxStyledTextCtrl, getZoom, 0}},
+ {3288, {wxStyledTextCtrl, getModEventMask, 0}},
+ {3289, {wxStyledTextCtrl, setSTCFocus, 1}},
+ {3290, {wxStyledTextCtrl, getSTCFocus, 0}},
+ {3291, {wxStyledTextCtrl, setStatus, 1}},
+ {3292, {wxStyledTextCtrl, getStatus, 0}},
+ {3293, {wxStyledTextCtrl, setMouseDownCaptures, 1}},
+ {3294, {wxStyledTextCtrl, getMouseDownCaptures, 0}},
+ {3295, {wxStyledTextCtrl, setSTCCursor, 1}},
+ {3296, {wxStyledTextCtrl, getSTCCursor, 0}},
+ {3297, {wxStyledTextCtrl, setControlCharSymbol, 1}},
+ {3298, {wxStyledTextCtrl, getControlCharSymbol, 0}},
+ {3299, {wxStyledTextCtrl, wordPartLeft, 0}},
+ {3300, {wxStyledTextCtrl, wordPartLeftExtend, 0}},
+ {3301, {wxStyledTextCtrl, wordPartRight, 0}},
+ {3302, {wxStyledTextCtrl, wordPartRightExtend, 0}},
+ {3303, {wxStyledTextCtrl, setVisiblePolicy, 2}},
+ {3304, {wxStyledTextCtrl, delLineLeft, 0}},
+ {3305, {wxStyledTextCtrl, delLineRight, 0}},
+ {3306, {wxStyledTextCtrl, getXOffset, 0}},
+ {3307, {wxStyledTextCtrl, chooseCaretX, 0}},
+ {3308, {wxStyledTextCtrl, setXCaretPolicy, 2}},
+ {3309, {wxStyledTextCtrl, setYCaretPolicy, 2}},
+ {3310, {wxStyledTextCtrl, getPrintWrapMode, 0}},
+ {3311, {wxStyledTextCtrl, setHotspotActiveForeground, 2}},
+ {3312, {wxStyledTextCtrl, setHotspotActiveBackground, 2}},
+ {3313, {wxStyledTextCtrl, setHotspotActiveUnderline, 1}},
+ {3314, {wxStyledTextCtrl, setHotspotSingleLine, 1}},
+ {3315, {wxStyledTextCtrl, paraDownExtend, 0}},
+ {3316, {wxStyledTextCtrl, paraUp, 0}},
+ {3317, {wxStyledTextCtrl, paraUpExtend, 0}},
+ {3318, {wxStyledTextCtrl, positionBefore, 1}},
+ {3319, {wxStyledTextCtrl, positionAfter, 1}},
+ {3320, {wxStyledTextCtrl, copyRange, 2}},
+ {3321, {wxStyledTextCtrl, copyText, 2}},
+ {3322, {wxStyledTextCtrl, setSelectionMode, 1}},
+ {3323, {wxStyledTextCtrl, getSelectionMode, 0}},
+ {3324, {wxStyledTextCtrl, lineDownRectExtend, 0}},
+ {3325, {wxStyledTextCtrl, lineUpRectExtend, 0}},
+ {3326, {wxStyledTextCtrl, charLeftRectExtend, 0}},
+ {3327, {wxStyledTextCtrl, charRightRectExtend, 0}},
+ {3328, {wxStyledTextCtrl, homeRectExtend, 0}},
+ {3329, {wxStyledTextCtrl, vCHomeRectExtend, 0}},
+ {3330, {wxStyledTextCtrl, lineEndRectExtend, 0}},
+ {3331, {wxStyledTextCtrl, pageUpRectExtend, 0}},
+ {3332, {wxStyledTextCtrl, pageDownRectExtend, 0}},
+ {3333, {wxStyledTextCtrl, stutteredPageUp, 0}},
+ {3334, {wxStyledTextCtrl, stutteredPageUpExtend, 0}},
+ {3335, {wxStyledTextCtrl, stutteredPageDown, 0}},
+ {3336, {wxStyledTextCtrl, stutteredPageDownExtend, 0}},
+ {3337, {wxStyledTextCtrl, wordLeftEnd, 0}},
+ {3338, {wxStyledTextCtrl, wordLeftEndExtend, 0}},
+ {3339, {wxStyledTextCtrl, wordRightEnd, 0}},
+ {3340, {wxStyledTextCtrl, wordRightEndExtend, 0}},
+ {3341, {wxStyledTextCtrl, setWhitespaceChars, 1}},
+ {3342, {wxStyledTextCtrl, setCharsDefault, 0}},
+ {3343, {wxStyledTextCtrl, autoCompGetCurrent, 0}},
+ {3344, {wxStyledTextCtrl, allocate, 1}},
+ {3345, {wxStyledTextCtrl, findColumn, 2}},
+ {3346, {wxStyledTextCtrl, getCaretSticky, 0}},
+ {3347, {wxStyledTextCtrl, setCaretSticky, 1}},
+ {3348, {wxStyledTextCtrl, toggleCaretSticky, 0}},
+ {3349, {wxStyledTextCtrl, setPasteConvertEndings, 1}},
+ {3350, {wxStyledTextCtrl, getPasteConvertEndings, 0}},
+ {3351, {wxStyledTextCtrl, selectionDuplicate, 0}},
+ {3352, {wxStyledTextCtrl, setCaretLineBackAlpha, 1}},
+ {3353, {wxStyledTextCtrl, getCaretLineBackAlpha, 0}},
+ {3354, {wxStyledTextCtrl, startRecord, 0}},
+ {3355, {wxStyledTextCtrl, stopRecord, 0}},
+ {3356, {wxStyledTextCtrl, setLexer, 1}},
+ {3357, {wxStyledTextCtrl, getLexer, 0}},
+ {3358, {wxStyledTextCtrl, colourise, 2}},
+ {3359, {wxStyledTextCtrl, setProperty, 2}},
+ {3360, {wxStyledTextCtrl, setKeyWords, 2}},
+ {3361, {wxStyledTextCtrl, setLexerLanguage, 1}},
+ {3362, {wxStyledTextCtrl, getProperty, 1}},
+ {3363, {wxStyledTextCtrl, getStyleBitsNeeded, 0}},
+ {3364, {wxStyledTextCtrl, getCurrentLine, 0}},
+ {3365, {wxStyledTextCtrl, styleSetSpec, 2}},
+ {3366, {wxStyledTextCtrl, styleSetFont, 2}},
+ {3367, {wxStyledTextCtrl, styleSetFontAttr, 7}},
+ {3368, {wxStyledTextCtrl, styleSetCharacterSet, 2}},
+ {3369, {wxStyledTextCtrl, styleSetFontEncoding, 2}},
+ {3370, {wxStyledTextCtrl, cmdKeyExecute, 1}},
+ {3371, {wxStyledTextCtrl, setMargins, 2}},
+ {3372, {wxStyledTextCtrl, getSelection, 2}},
+ {3373, {wxStyledTextCtrl, pointFromPosition, 1}},
+ {3374, {wxStyledTextCtrl, scrollToLine, 1}},
+ {3375, {wxStyledTextCtrl, scrollToColumn, 1}},
+ {3376, {wxStyledTextCtrl, setVScrollBar, 1}},
+ {3377, {wxStyledTextCtrl, setHScrollBar, 1}},
+ {3378, {wxStyledTextCtrl, getLastKeydownProcessed, 0}},
+ {3379, {wxStyledTextCtrl, setLastKeydownProcessed, 1}},
+ {3380, {wxStyledTextCtrl, saveFile, 1}},
+ {3381, {wxStyledTextCtrl, loadFile, 1}},
+ {3382, {wxStyledTextCtrl, doDragOver, 3}},
+ {3383, {wxStyledTextCtrl, doDropText, 3}},
+ {3384, {wxStyledTextCtrl, getUseAntiAliasing, 0}},
+ {3385, {wxStyledTextCtrl, addTextRaw, 1}},
+ {3386, {wxStyledTextCtrl, insertTextRaw, 2}},
+ {3387, {wxStyledTextCtrl, getCurLineRaw, 1}},
+ {3388, {wxStyledTextCtrl, getLineRaw, 1}},
+ {3389, {wxStyledTextCtrl, getSelectedTextRaw, 0}},
+ {3390, {wxStyledTextCtrl, getTextRangeRaw, 2}},
+ {3391, {wxStyledTextCtrl, setTextRaw, 1}},
+ {3392, {wxStyledTextCtrl, getTextRaw, 0}},
+ {3393, {wxStyledTextCtrl, appendTextRaw, 1}},
+ {3394, {wxArtProvider, getBitmap, 2}},
+ {3395, {wxArtProvider, getIcon, 2}},
+ {3396, {wxTreeEvent, getKeyCode, 0}},
+ {3397, {wxTreeEvent, getItem, 0}},
+ {3398, {wxTreeEvent, getKeyEvent, 0}},
+ {3399, {wxTreeEvent, getLabel, 0}},
+ {3400, {wxTreeEvent, getOldItem, 0}},
+ {3401, {wxTreeEvent, getPoint, 0}},
+ {3402, {wxTreeEvent, isEditCancelled, 0}},
+ {3403, {wxTreeEvent, setToolTip, 1}},
+ {3404, {wxNotebookEvent, getOldSelection, 0}},
+ {3405, {wxNotebookEvent, getSelection, 0}},
+ {3406, {wxNotebookEvent, setOldSelection, 1}},
+ {3407, {wxNotebookEvent, setSelection, 1}},
+ {3408, {wxFileDataObject, new, 0}},
+ {3409, {wxFileDataObject, addFile, 1}},
+ {3410, {wxFileDataObject, getFilenames, 0}},
+ {3411, {wxFileDataObject, 'Destroy', undefined}},
+ {3412, {wxTextDataObject, new, 1}},
+ {3413, {wxTextDataObject, getTextLength, 0}},
+ {3414, {wxTextDataObject, getText, 0}},
+ {3415, {wxTextDataObject, setText, 1}},
+ {3416, {wxTextDataObject, 'Destroy', undefined}},
+ {3417, {wxBitmapDataObject, new_1_1, 1}},
+ {3418, {wxBitmapDataObject, new_1_0, 1}},
+ {3419, {wxBitmapDataObject, getBitmap, 0}},
+ {3420, {wxBitmapDataObject, setBitmap, 1}},
+ {3421, {wxBitmapDataObject, 'Destroy', undefined}},
+ {3423, {wxClipboard, new, 0}},
+ {3424, {wxClipboard, destruct, 0}},
+ {3425, {wxClipboard, addData, 1}},
+ {3426, {wxClipboard, clear, 0}},
+ {3427, {wxClipboard, close, 0}},
+ {3428, {wxClipboard, flush, 0}},
+ {3429, {wxClipboard, getData, 1}},
+ {3430, {wxClipboard, isOpened, 0}},
+ {3431, {wxClipboard, open, 0}},
+ {3432, {wxClipboard, setData, 1}},
+ {3434, {wxClipboard, usePrimarySelection, 1}},
+ {3435, {wxClipboard, isSupported, 1}},
+ {3436, {wxClipboard, get, 0}},
+ {3437, {wxSpinEvent, getPosition, 0}},
+ {3438, {wxSpinEvent, setPosition, 1}},
+ {3439, {wxSplitterWindow, new_0, 0}},
+ {3440, {wxSplitterWindow, new_2, 2}},
+ {3441, {wxSplitterWindow, destruct, 0}},
+ {3442, {wxSplitterWindow, create, 2}},
+ {3443, {wxSplitterWindow, getMinimumPaneSize, 0}},
+ {3444, {wxSplitterWindow, getSashGravity, 0}},
+ {3445, {wxSplitterWindow, getSashPosition, 0}},
+ {3446, {wxSplitterWindow, getSplitMode, 0}},
+ {3447, {wxSplitterWindow, getWindow1, 0}},
+ {3448, {wxSplitterWindow, getWindow2, 0}},
+ {3449, {wxSplitterWindow, initialize, 1}},
+ {3450, {wxSplitterWindow, isSplit, 0}},
+ {3451, {wxSplitterWindow, replaceWindow, 2}},
+ {3452, {wxSplitterWindow, setSashGravity, 1}},
+ {3453, {wxSplitterWindow, setSashPosition, 2}},
+ {3454, {wxSplitterWindow, setSashSize, 1}},
+ {3455, {wxSplitterWindow, setMinimumPaneSize, 1}},
+ {3456, {wxSplitterWindow, setSplitMode, 1}},
+ {3457, {wxSplitterWindow, splitHorizontally, 3}},
+ {3458, {wxSplitterWindow, splitVertically, 3}},
+ {3459, {wxSplitterWindow, unsplit, 1}},
+ {3460, {wxSplitterWindow, updateSize, 0}},
+ {3461, {wxSplitterEvent, getSashPosition, 0}},
+ {3462, {wxSplitterEvent, getX, 0}},
+ {3463, {wxSplitterEvent, getY, 0}},
+ {3464, {wxSplitterEvent, getWindowBeingRemoved, 0}},
+ {3465, {wxSplitterEvent, setSashPosition, 1}},
+ {3466, {wxHtmlWindow, new_0, 0}},
+ {3467, {wxHtmlWindow, new_2, 2}},
+ {3468, {wxHtmlWindow, appendToPage, 1}},
+ {3469, {wxHtmlWindow, getOpenedAnchor, 0}},
+ {3470, {wxHtmlWindow, getOpenedPage, 0}},
+ {3471, {wxHtmlWindow, getOpenedPageTitle, 0}},
+ {3472, {wxHtmlWindow, getRelatedFrame, 0}},
+ {3473, {wxHtmlWindow, historyBack, 0}},
+ {3474, {wxHtmlWindow, historyCanBack, 0}},
+ {3475, {wxHtmlWindow, historyCanForward, 0}},
+ {3476, {wxHtmlWindow, historyClear, 0}},
+ {3477, {wxHtmlWindow, historyForward, 0}},
+ {3478, {wxHtmlWindow, loadFile, 1}},
+ {3479, {wxHtmlWindow, loadPage, 1}},
+ {3480, {wxHtmlWindow, selectAll, 0}},
+ {3481, {wxHtmlWindow, selectionToText, 0}},
+ {3482, {wxHtmlWindow, selectLine, 1}},
+ {3483, {wxHtmlWindow, selectWord, 1}},
+ {3484, {wxHtmlWindow, setBorders, 1}},
+ {3485, {wxHtmlWindow, setFonts, 3}},
+ {3486, {wxHtmlWindow, setPage, 1}},
+ {3487, {wxHtmlWindow, setRelatedFrame, 2}},
+ {3488, {wxHtmlWindow, setRelatedStatusBar, 1}},
+ {3489, {wxHtmlWindow, toText, 0}},
+ {3490, {wxHtmlWindow, 'Destroy', undefined}},
+ {3491, {wxHtmlLinkEvent, getLinkInfo, 0}},
+ {3492, {wxSystemSettings, getColour, 1}},
+ {3493, {wxSystemSettings, getFont, 1}},
+ {3494, {wxSystemSettings, getMetric, 2}},
+ {3495, {wxSystemSettings, getScreenType, 0}},
+ {3496, {wxSystemOptions, getOption, 1}},
+ {3497, {wxSystemOptions, getOptionInt, 1}},
+ {3498, {wxSystemOptions, hasOption, 1}},
+ {3499, {wxSystemOptions, isFalse, 1}},
+ {3500, {wxSystemOptions, setOption_2_1, 2}},
+ {3501, {wxSystemOptions, setOption_2_0, 2}},
+ {3502, {wxAuiNotebookEvent, setSelection, 1}},
+ {3503, {wxAuiNotebookEvent, getSelection, 0}},
+ {3504, {wxAuiNotebookEvent, setOldSelection, 1}},
+ {3505, {wxAuiNotebookEvent, getOldSelection, 0}},
+ {3506, {wxAuiNotebookEvent, setDragSource, 1}},
+ {3507, {wxAuiNotebookEvent, getDragSource, 0}},
+ {3508, {wxAuiManagerEvent, setManager, 1}},
+ {3509, {wxAuiManagerEvent, getManager, 0}},
+ {3510, {wxAuiManagerEvent, setPane, 1}},
+ {3511, {wxAuiManagerEvent, getPane, 0}},
+ {3512, {wxAuiManagerEvent, setButton, 1}},
+ {3513, {wxAuiManagerEvent, getButton, 0}},
+ {3514, {wxAuiManagerEvent, setDC, 1}},
+ {3515, {wxAuiManagerEvent, getDC, 0}},
+ {3516, {wxAuiManagerEvent, veto, 1}},
+ {3517, {wxAuiManagerEvent, getVeto, 0}},
+ {3518, {wxAuiManagerEvent, setCanVeto, 1}},
+ {3519, {wxAuiManagerEvent, canVeto, 0}},
+ {3520, {wxLogNull, new, 0}},
+ {3521, {wxLogNull, 'Destroy', undefined}},
+ {3522, {wxTaskBarIcon, new, 0}},
+ {3523, {wxTaskBarIcon, destruct, 0}},
+ {3524, {wxTaskBarIcon, popupMenu, 1}},
+ {3525, {wxTaskBarIcon, removeIcon, 0}},
+ {3526, {wxTaskBarIcon, setIcon, 2}},
+ {3527, {wxLocale, new_0, 0}},
+ {3529, {wxLocale, new_2, 2}},
+ {3530, {wxLocale, destruct, 0}},
+ {3532, {wxLocale, init, 1}},
+ {3533, {wxLocale, addCatalog_1, 1}},
+ {3534, {wxLocale, addCatalog_3, 3}},
+ {3535, {wxLocale, addCatalogLookupPathPrefix, 1}},
+ {3536, {wxLocale, getCanonicalName, 0}},
+ {3537, {wxLocale, getLanguage, 0}},
+ {3538, {wxLocale, getLanguageName, 1}},
+ {3539, {wxLocale, getLocale, 0}},
+ {3540, {wxLocale, getName, 0}},
+ {3541, {wxLocale, getString_2, 2}},
+ {3542, {wxLocale, getString_4, 4}},
+ {3543, {wxLocale, getHeaderValue, 2}},
+ {3544, {wxLocale, getSysName, 0}},
+ {3545, {wxLocale, getSystemEncoding, 0}},
+ {3546, {wxLocale, getSystemEncodingName, 0}},
+ {3547, {wxLocale, getSystemLanguage, 0}},
+ {3548, {wxLocale, isLoaded, 1}},
+ {3549, {wxLocale, isOk, 0}},
{-1, {mod, func, -1}}
].
diff --git a/lib/wx/src/gen/wxe_funcs.hrl b/lib/wx/src/gen/wxe_funcs.hrl
index 109368adb3..97f9bd9695 100644
--- a/lib/wx/src/gen/wxe_funcs.hrl
+++ b/lib/wx/src/gen/wxe_funcs.hrl
@@ -1,7 +1,7 @@
%%
%% %CopyrightBegin%
%%
-%% Copyright Ericsson AB 2008-2013. All Rights Reserved.
+%% Copyright Ericsson AB 2008-2014. 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
@@ -2706,599 +2706,622 @@
-define(utils_wxGetOsDescription, 2924).
-define(utils_wxIsPlatformLittleEndian, 2925).
-define(utils_wxIsPlatform64Bit, 2926).
--define(wxPrintout_new, 2927).
--define(wxPrintout_destruct, 2928).
--define(wxPrintout_GetDC, 2929).
--define(wxPrintout_GetPageSizeMM, 2930).
--define(wxPrintout_GetPageSizePixels, 2931).
--define(wxPrintout_GetPaperRectPixels, 2932).
--define(wxPrintout_GetPPIPrinter, 2933).
--define(wxPrintout_GetPPIScreen, 2934).
--define(wxPrintout_GetTitle, 2935).
--define(wxPrintout_IsPreview, 2936).
--define(wxPrintout_FitThisSizeToPaper, 2937).
--define(wxPrintout_FitThisSizeToPage, 2938).
--define(wxPrintout_FitThisSizeToPageMargins, 2939).
--define(wxPrintout_MapScreenSizeToPaper, 2940).
--define(wxPrintout_MapScreenSizeToPage, 2941).
--define(wxPrintout_MapScreenSizeToPageMargins, 2942).
--define(wxPrintout_MapScreenSizeToDevice, 2943).
--define(wxPrintout_GetLogicalPaperRect, 2944).
--define(wxPrintout_GetLogicalPageRect, 2945).
--define(wxPrintout_GetLogicalPageMarginsRect, 2946).
--define(wxPrintout_SetLogicalOrigin, 2947).
--define(wxPrintout_OffsetLogicalOrigin, 2948).
--define(wxStyledTextCtrl_new_2, 2949).
--define(wxStyledTextCtrl_new_0, 2950).
--define(wxStyledTextCtrl_destruct, 2951).
--define(wxStyledTextCtrl_Create, 2952).
--define(wxStyledTextCtrl_AddText, 2953).
--define(wxStyledTextCtrl_AddStyledText, 2954).
--define(wxStyledTextCtrl_InsertText, 2955).
--define(wxStyledTextCtrl_ClearAll, 2956).
--define(wxStyledTextCtrl_ClearDocumentStyle, 2957).
--define(wxStyledTextCtrl_GetLength, 2958).
--define(wxStyledTextCtrl_GetCharAt, 2959).
--define(wxStyledTextCtrl_GetCurrentPos, 2960).
--define(wxStyledTextCtrl_GetAnchor, 2961).
--define(wxStyledTextCtrl_GetStyleAt, 2962).
--define(wxStyledTextCtrl_Redo, 2963).
--define(wxStyledTextCtrl_SetUndoCollection, 2964).
--define(wxStyledTextCtrl_SelectAll, 2965).
--define(wxStyledTextCtrl_SetSavePoint, 2966).
--define(wxStyledTextCtrl_GetStyledText, 2967).
--define(wxStyledTextCtrl_CanRedo, 2968).
--define(wxStyledTextCtrl_MarkerLineFromHandle, 2969).
--define(wxStyledTextCtrl_MarkerDeleteHandle, 2970).
--define(wxStyledTextCtrl_GetUndoCollection, 2971).
--define(wxStyledTextCtrl_GetViewWhiteSpace, 2972).
--define(wxStyledTextCtrl_SetViewWhiteSpace, 2973).
--define(wxStyledTextCtrl_PositionFromPoint, 2974).
--define(wxStyledTextCtrl_PositionFromPointClose, 2975).
--define(wxStyledTextCtrl_GotoLine, 2976).
--define(wxStyledTextCtrl_GotoPos, 2977).
--define(wxStyledTextCtrl_SetAnchor, 2978).
--define(wxStyledTextCtrl_GetCurLine, 2979).
--define(wxStyledTextCtrl_GetEndStyled, 2980).
--define(wxStyledTextCtrl_ConvertEOLs, 2981).
--define(wxStyledTextCtrl_GetEOLMode, 2982).
--define(wxStyledTextCtrl_SetEOLMode, 2983).
--define(wxStyledTextCtrl_StartStyling, 2984).
--define(wxStyledTextCtrl_SetStyling, 2985).
--define(wxStyledTextCtrl_GetBufferedDraw, 2986).
--define(wxStyledTextCtrl_SetBufferedDraw, 2987).
--define(wxStyledTextCtrl_SetTabWidth, 2988).
--define(wxStyledTextCtrl_GetTabWidth, 2989).
--define(wxStyledTextCtrl_SetCodePage, 2990).
--define(wxStyledTextCtrl_MarkerDefine, 2991).
--define(wxStyledTextCtrl_MarkerSetForeground, 2992).
--define(wxStyledTextCtrl_MarkerSetBackground, 2993).
--define(wxStyledTextCtrl_MarkerAdd, 2994).
--define(wxStyledTextCtrl_MarkerDelete, 2995).
--define(wxStyledTextCtrl_MarkerDeleteAll, 2996).
--define(wxStyledTextCtrl_MarkerGet, 2997).
--define(wxStyledTextCtrl_MarkerNext, 2998).
--define(wxStyledTextCtrl_MarkerPrevious, 2999).
--define(wxStyledTextCtrl_MarkerDefineBitmap, 3000).
--define(wxStyledTextCtrl_MarkerAddSet, 3001).
--define(wxStyledTextCtrl_MarkerSetAlpha, 3002).
--define(wxStyledTextCtrl_SetMarginType, 3003).
--define(wxStyledTextCtrl_GetMarginType, 3004).
--define(wxStyledTextCtrl_SetMarginWidth, 3005).
--define(wxStyledTextCtrl_GetMarginWidth, 3006).
--define(wxStyledTextCtrl_SetMarginMask, 3007).
--define(wxStyledTextCtrl_GetMarginMask, 3008).
--define(wxStyledTextCtrl_SetMarginSensitive, 3009).
--define(wxStyledTextCtrl_GetMarginSensitive, 3010).
--define(wxStyledTextCtrl_StyleClearAll, 3011).
--define(wxStyledTextCtrl_StyleSetForeground, 3012).
--define(wxStyledTextCtrl_StyleSetBackground, 3013).
--define(wxStyledTextCtrl_StyleSetBold, 3014).
--define(wxStyledTextCtrl_StyleSetItalic, 3015).
--define(wxStyledTextCtrl_StyleSetSize, 3016).
--define(wxStyledTextCtrl_StyleSetFaceName, 3017).
--define(wxStyledTextCtrl_StyleSetEOLFilled, 3018).
--define(wxStyledTextCtrl_StyleResetDefault, 3019).
--define(wxStyledTextCtrl_StyleSetUnderline, 3020).
--define(wxStyledTextCtrl_StyleSetCase, 3021).
--define(wxStyledTextCtrl_StyleSetHotSpot, 3022).
--define(wxStyledTextCtrl_SetSelForeground, 3023).
--define(wxStyledTextCtrl_SetSelBackground, 3024).
--define(wxStyledTextCtrl_GetSelAlpha, 3025).
--define(wxStyledTextCtrl_SetSelAlpha, 3026).
--define(wxStyledTextCtrl_SetCaretForeground, 3027).
--define(wxStyledTextCtrl_CmdKeyAssign, 3028).
--define(wxStyledTextCtrl_CmdKeyClear, 3029).
--define(wxStyledTextCtrl_CmdKeyClearAll, 3030).
--define(wxStyledTextCtrl_SetStyleBytes, 3031).
--define(wxStyledTextCtrl_StyleSetVisible, 3032).
--define(wxStyledTextCtrl_GetCaretPeriod, 3033).
--define(wxStyledTextCtrl_SetCaretPeriod, 3034).
--define(wxStyledTextCtrl_SetWordChars, 3035).
--define(wxStyledTextCtrl_BeginUndoAction, 3036).
--define(wxStyledTextCtrl_EndUndoAction, 3037).
--define(wxStyledTextCtrl_IndicatorSetStyle, 3038).
--define(wxStyledTextCtrl_IndicatorGetStyle, 3039).
--define(wxStyledTextCtrl_IndicatorSetForeground, 3040).
--define(wxStyledTextCtrl_IndicatorGetForeground, 3041).
--define(wxStyledTextCtrl_SetWhitespaceForeground, 3042).
--define(wxStyledTextCtrl_SetWhitespaceBackground, 3043).
--define(wxStyledTextCtrl_GetStyleBits, 3044).
--define(wxStyledTextCtrl_SetLineState, 3045).
--define(wxStyledTextCtrl_GetLineState, 3046).
--define(wxStyledTextCtrl_GetMaxLineState, 3047).
--define(wxStyledTextCtrl_GetCaretLineVisible, 3048).
--define(wxStyledTextCtrl_SetCaretLineVisible, 3049).
--define(wxStyledTextCtrl_GetCaretLineBackground, 3050).
--define(wxStyledTextCtrl_SetCaretLineBackground, 3051).
--define(wxStyledTextCtrl_AutoCompShow, 3052).
--define(wxStyledTextCtrl_AutoCompCancel, 3053).
--define(wxStyledTextCtrl_AutoCompActive, 3054).
--define(wxStyledTextCtrl_AutoCompPosStart, 3055).
--define(wxStyledTextCtrl_AutoCompComplete, 3056).
--define(wxStyledTextCtrl_AutoCompStops, 3057).
--define(wxStyledTextCtrl_AutoCompSetSeparator, 3058).
--define(wxStyledTextCtrl_AutoCompGetSeparator, 3059).
--define(wxStyledTextCtrl_AutoCompSelect, 3060).
--define(wxStyledTextCtrl_AutoCompSetCancelAtStart, 3061).
--define(wxStyledTextCtrl_AutoCompGetCancelAtStart, 3062).
--define(wxStyledTextCtrl_AutoCompSetFillUps, 3063).
--define(wxStyledTextCtrl_AutoCompSetChooseSingle, 3064).
--define(wxStyledTextCtrl_AutoCompGetChooseSingle, 3065).
--define(wxStyledTextCtrl_AutoCompSetIgnoreCase, 3066).
--define(wxStyledTextCtrl_AutoCompGetIgnoreCase, 3067).
--define(wxStyledTextCtrl_UserListShow, 3068).
--define(wxStyledTextCtrl_AutoCompSetAutoHide, 3069).
--define(wxStyledTextCtrl_AutoCompGetAutoHide, 3070).
--define(wxStyledTextCtrl_AutoCompSetDropRestOfWord, 3071).
--define(wxStyledTextCtrl_AutoCompGetDropRestOfWord, 3072).
--define(wxStyledTextCtrl_RegisterImage, 3073).
--define(wxStyledTextCtrl_ClearRegisteredImages, 3074).
--define(wxStyledTextCtrl_AutoCompGetTypeSeparator, 3075).
--define(wxStyledTextCtrl_AutoCompSetTypeSeparator, 3076).
--define(wxStyledTextCtrl_AutoCompSetMaxWidth, 3077).
--define(wxStyledTextCtrl_AutoCompGetMaxWidth, 3078).
--define(wxStyledTextCtrl_AutoCompSetMaxHeight, 3079).
--define(wxStyledTextCtrl_AutoCompGetMaxHeight, 3080).
--define(wxStyledTextCtrl_SetIndent, 3081).
--define(wxStyledTextCtrl_GetIndent, 3082).
--define(wxStyledTextCtrl_SetUseTabs, 3083).
--define(wxStyledTextCtrl_GetUseTabs, 3084).
--define(wxStyledTextCtrl_SetLineIndentation, 3085).
--define(wxStyledTextCtrl_GetLineIndentation, 3086).
--define(wxStyledTextCtrl_GetLineIndentPosition, 3087).
--define(wxStyledTextCtrl_GetColumn, 3088).
--define(wxStyledTextCtrl_SetUseHorizontalScrollBar, 3089).
--define(wxStyledTextCtrl_GetUseHorizontalScrollBar, 3090).
--define(wxStyledTextCtrl_SetIndentationGuides, 3091).
--define(wxStyledTextCtrl_GetIndentationGuides, 3092).
--define(wxStyledTextCtrl_SetHighlightGuide, 3093).
--define(wxStyledTextCtrl_GetHighlightGuide, 3094).
--define(wxStyledTextCtrl_GetLineEndPosition, 3095).
--define(wxStyledTextCtrl_GetCodePage, 3096).
--define(wxStyledTextCtrl_GetCaretForeground, 3097).
--define(wxStyledTextCtrl_GetReadOnly, 3098).
--define(wxStyledTextCtrl_SetCurrentPos, 3099).
--define(wxStyledTextCtrl_SetSelectionStart, 3100).
--define(wxStyledTextCtrl_GetSelectionStart, 3101).
--define(wxStyledTextCtrl_SetSelectionEnd, 3102).
--define(wxStyledTextCtrl_GetSelectionEnd, 3103).
--define(wxStyledTextCtrl_SetPrintMagnification, 3104).
--define(wxStyledTextCtrl_GetPrintMagnification, 3105).
--define(wxStyledTextCtrl_SetPrintColourMode, 3106).
--define(wxStyledTextCtrl_GetPrintColourMode, 3107).
--define(wxStyledTextCtrl_FindText, 3108).
--define(wxStyledTextCtrl_FormatRange, 3109).
--define(wxStyledTextCtrl_GetFirstVisibleLine, 3110).
--define(wxStyledTextCtrl_GetLine, 3111).
--define(wxStyledTextCtrl_GetLineCount, 3112).
--define(wxStyledTextCtrl_SetMarginLeft, 3113).
--define(wxStyledTextCtrl_GetMarginLeft, 3114).
--define(wxStyledTextCtrl_SetMarginRight, 3115).
--define(wxStyledTextCtrl_GetMarginRight, 3116).
--define(wxStyledTextCtrl_GetModify, 3117).
--define(wxStyledTextCtrl_SetSelection, 3118).
--define(wxStyledTextCtrl_GetSelectedText, 3119).
--define(wxStyledTextCtrl_GetTextRange, 3120).
--define(wxStyledTextCtrl_HideSelection, 3121).
--define(wxStyledTextCtrl_LineFromPosition, 3122).
--define(wxStyledTextCtrl_PositionFromLine, 3123).
--define(wxStyledTextCtrl_LineScroll, 3124).
--define(wxStyledTextCtrl_EnsureCaretVisible, 3125).
--define(wxStyledTextCtrl_ReplaceSelection, 3126).
--define(wxStyledTextCtrl_SetReadOnly, 3127).
--define(wxStyledTextCtrl_CanPaste, 3128).
--define(wxStyledTextCtrl_CanUndo, 3129).
--define(wxStyledTextCtrl_EmptyUndoBuffer, 3130).
--define(wxStyledTextCtrl_Undo, 3131).
--define(wxStyledTextCtrl_Cut, 3132).
--define(wxStyledTextCtrl_Copy, 3133).
--define(wxStyledTextCtrl_Paste, 3134).
--define(wxStyledTextCtrl_Clear, 3135).
--define(wxStyledTextCtrl_SetText, 3136).
--define(wxStyledTextCtrl_GetText, 3137).
--define(wxStyledTextCtrl_GetTextLength, 3138).
--define(wxStyledTextCtrl_GetOvertype, 3139).
--define(wxStyledTextCtrl_SetCaretWidth, 3140).
--define(wxStyledTextCtrl_GetCaretWidth, 3141).
--define(wxStyledTextCtrl_SetTargetStart, 3142).
--define(wxStyledTextCtrl_GetTargetStart, 3143).
--define(wxStyledTextCtrl_SetTargetEnd, 3144).
--define(wxStyledTextCtrl_GetTargetEnd, 3145).
--define(wxStyledTextCtrl_ReplaceTarget, 3146).
--define(wxStyledTextCtrl_SearchInTarget, 3147).
--define(wxStyledTextCtrl_SetSearchFlags, 3148).
--define(wxStyledTextCtrl_GetSearchFlags, 3149).
--define(wxStyledTextCtrl_CallTipShow, 3150).
--define(wxStyledTextCtrl_CallTipCancel, 3151).
--define(wxStyledTextCtrl_CallTipActive, 3152).
--define(wxStyledTextCtrl_CallTipPosAtStart, 3153).
--define(wxStyledTextCtrl_CallTipSetHighlight, 3154).
--define(wxStyledTextCtrl_CallTipSetBackground, 3155).
--define(wxStyledTextCtrl_CallTipSetForeground, 3156).
--define(wxStyledTextCtrl_CallTipSetForegroundHighlight, 3157).
--define(wxStyledTextCtrl_CallTipUseStyle, 3158).
--define(wxStyledTextCtrl_VisibleFromDocLine, 3159).
--define(wxStyledTextCtrl_DocLineFromVisible, 3160).
--define(wxStyledTextCtrl_WrapCount, 3161).
--define(wxStyledTextCtrl_SetFoldLevel, 3162).
--define(wxStyledTextCtrl_GetFoldLevel, 3163).
--define(wxStyledTextCtrl_GetLastChild, 3164).
--define(wxStyledTextCtrl_GetFoldParent, 3165).
--define(wxStyledTextCtrl_ShowLines, 3166).
--define(wxStyledTextCtrl_HideLines, 3167).
--define(wxStyledTextCtrl_GetLineVisible, 3168).
--define(wxStyledTextCtrl_SetFoldExpanded, 3169).
--define(wxStyledTextCtrl_GetFoldExpanded, 3170).
--define(wxStyledTextCtrl_ToggleFold, 3171).
--define(wxStyledTextCtrl_EnsureVisible, 3172).
--define(wxStyledTextCtrl_SetFoldFlags, 3173).
--define(wxStyledTextCtrl_EnsureVisibleEnforcePolicy, 3174).
--define(wxStyledTextCtrl_SetTabIndents, 3175).
--define(wxStyledTextCtrl_GetTabIndents, 3176).
--define(wxStyledTextCtrl_SetBackSpaceUnIndents, 3177).
--define(wxStyledTextCtrl_GetBackSpaceUnIndents, 3178).
--define(wxStyledTextCtrl_SetMouseDwellTime, 3179).
--define(wxStyledTextCtrl_GetMouseDwellTime, 3180).
--define(wxStyledTextCtrl_WordStartPosition, 3181).
--define(wxStyledTextCtrl_WordEndPosition, 3182).
--define(wxStyledTextCtrl_SetWrapMode, 3183).
--define(wxStyledTextCtrl_GetWrapMode, 3184).
--define(wxStyledTextCtrl_SetWrapVisualFlags, 3185).
--define(wxStyledTextCtrl_GetWrapVisualFlags, 3186).
--define(wxStyledTextCtrl_SetWrapVisualFlagsLocation, 3187).
--define(wxStyledTextCtrl_GetWrapVisualFlagsLocation, 3188).
--define(wxStyledTextCtrl_SetWrapStartIndent, 3189).
--define(wxStyledTextCtrl_GetWrapStartIndent, 3190).
--define(wxStyledTextCtrl_SetLayoutCache, 3191).
--define(wxStyledTextCtrl_GetLayoutCache, 3192).
--define(wxStyledTextCtrl_SetScrollWidth, 3193).
--define(wxStyledTextCtrl_GetScrollWidth, 3194).
--define(wxStyledTextCtrl_TextWidth, 3195).
--define(wxStyledTextCtrl_GetEndAtLastLine, 3196).
--define(wxStyledTextCtrl_TextHeight, 3197).
--define(wxStyledTextCtrl_SetUseVerticalScrollBar, 3198).
--define(wxStyledTextCtrl_GetUseVerticalScrollBar, 3199).
--define(wxStyledTextCtrl_AppendText, 3200).
--define(wxStyledTextCtrl_GetTwoPhaseDraw, 3201).
--define(wxStyledTextCtrl_SetTwoPhaseDraw, 3202).
--define(wxStyledTextCtrl_TargetFromSelection, 3203).
--define(wxStyledTextCtrl_LinesJoin, 3204).
--define(wxStyledTextCtrl_LinesSplit, 3205).
--define(wxStyledTextCtrl_SetFoldMarginColour, 3206).
--define(wxStyledTextCtrl_SetFoldMarginHiColour, 3207).
--define(wxStyledTextCtrl_LineDown, 3208).
--define(wxStyledTextCtrl_LineDownExtend, 3209).
--define(wxStyledTextCtrl_LineUp, 3210).
--define(wxStyledTextCtrl_LineUpExtend, 3211).
--define(wxStyledTextCtrl_CharLeft, 3212).
--define(wxStyledTextCtrl_CharLeftExtend, 3213).
--define(wxStyledTextCtrl_CharRight, 3214).
--define(wxStyledTextCtrl_CharRightExtend, 3215).
--define(wxStyledTextCtrl_WordLeft, 3216).
--define(wxStyledTextCtrl_WordLeftExtend, 3217).
--define(wxStyledTextCtrl_WordRight, 3218).
--define(wxStyledTextCtrl_WordRightExtend, 3219).
--define(wxStyledTextCtrl_Home, 3220).
--define(wxStyledTextCtrl_HomeExtend, 3221).
--define(wxStyledTextCtrl_LineEnd, 3222).
--define(wxStyledTextCtrl_LineEndExtend, 3223).
--define(wxStyledTextCtrl_DocumentStart, 3224).
--define(wxStyledTextCtrl_DocumentStartExtend, 3225).
--define(wxStyledTextCtrl_DocumentEnd, 3226).
--define(wxStyledTextCtrl_DocumentEndExtend, 3227).
--define(wxStyledTextCtrl_PageUp, 3228).
--define(wxStyledTextCtrl_PageUpExtend, 3229).
--define(wxStyledTextCtrl_PageDown, 3230).
--define(wxStyledTextCtrl_PageDownExtend, 3231).
--define(wxStyledTextCtrl_EditToggleOvertype, 3232).
--define(wxStyledTextCtrl_Cancel, 3233).
--define(wxStyledTextCtrl_DeleteBack, 3234).
--define(wxStyledTextCtrl_Tab, 3235).
--define(wxStyledTextCtrl_BackTab, 3236).
--define(wxStyledTextCtrl_NewLine, 3237).
--define(wxStyledTextCtrl_FormFeed, 3238).
--define(wxStyledTextCtrl_VCHome, 3239).
--define(wxStyledTextCtrl_VCHomeExtend, 3240).
--define(wxStyledTextCtrl_ZoomIn, 3241).
--define(wxStyledTextCtrl_ZoomOut, 3242).
--define(wxStyledTextCtrl_DelWordLeft, 3243).
--define(wxStyledTextCtrl_DelWordRight, 3244).
--define(wxStyledTextCtrl_LineCut, 3245).
--define(wxStyledTextCtrl_LineDelete, 3246).
--define(wxStyledTextCtrl_LineTranspose, 3247).
--define(wxStyledTextCtrl_LineDuplicate, 3248).
--define(wxStyledTextCtrl_LowerCase, 3249).
--define(wxStyledTextCtrl_UpperCase, 3250).
--define(wxStyledTextCtrl_LineScrollDown, 3251).
--define(wxStyledTextCtrl_LineScrollUp, 3252).
--define(wxStyledTextCtrl_DeleteBackNotLine, 3253).
--define(wxStyledTextCtrl_HomeDisplay, 3254).
--define(wxStyledTextCtrl_HomeDisplayExtend, 3255).
--define(wxStyledTextCtrl_LineEndDisplay, 3256).
--define(wxStyledTextCtrl_LineEndDisplayExtend, 3257).
--define(wxStyledTextCtrl_HomeWrapExtend, 3258).
--define(wxStyledTextCtrl_LineEndWrap, 3259).
--define(wxStyledTextCtrl_LineEndWrapExtend, 3260).
--define(wxStyledTextCtrl_VCHomeWrap, 3261).
--define(wxStyledTextCtrl_VCHomeWrapExtend, 3262).
--define(wxStyledTextCtrl_LineCopy, 3263).
--define(wxStyledTextCtrl_MoveCaretInsideView, 3264).
--define(wxStyledTextCtrl_LineLength, 3265).
--define(wxStyledTextCtrl_BraceHighlight, 3266).
--define(wxStyledTextCtrl_BraceBadLight, 3267).
--define(wxStyledTextCtrl_BraceMatch, 3268).
--define(wxStyledTextCtrl_GetViewEOL, 3269).
--define(wxStyledTextCtrl_SetViewEOL, 3270).
--define(wxStyledTextCtrl_SetModEventMask, 3271).
--define(wxStyledTextCtrl_GetEdgeColumn, 3272).
--define(wxStyledTextCtrl_SetEdgeColumn, 3273).
--define(wxStyledTextCtrl_SetEdgeMode, 3274).
--define(wxStyledTextCtrl_GetEdgeMode, 3275).
--define(wxStyledTextCtrl_GetEdgeColour, 3276).
--define(wxStyledTextCtrl_SetEdgeColour, 3277).
--define(wxStyledTextCtrl_SearchAnchor, 3278).
--define(wxStyledTextCtrl_SearchNext, 3279).
--define(wxStyledTextCtrl_SearchPrev, 3280).
--define(wxStyledTextCtrl_LinesOnScreen, 3281).
--define(wxStyledTextCtrl_UsePopUp, 3282).
--define(wxStyledTextCtrl_SelectionIsRectangle, 3283).
--define(wxStyledTextCtrl_SetZoom, 3284).
--define(wxStyledTextCtrl_GetZoom, 3285).
--define(wxStyledTextCtrl_GetModEventMask, 3286).
--define(wxStyledTextCtrl_SetSTCFocus, 3287).
--define(wxStyledTextCtrl_GetSTCFocus, 3288).
--define(wxStyledTextCtrl_SetStatus, 3289).
--define(wxStyledTextCtrl_GetStatus, 3290).
--define(wxStyledTextCtrl_SetMouseDownCaptures, 3291).
--define(wxStyledTextCtrl_GetMouseDownCaptures, 3292).
--define(wxStyledTextCtrl_SetSTCCursor, 3293).
--define(wxStyledTextCtrl_GetSTCCursor, 3294).
--define(wxStyledTextCtrl_SetControlCharSymbol, 3295).
--define(wxStyledTextCtrl_GetControlCharSymbol, 3296).
--define(wxStyledTextCtrl_WordPartLeft, 3297).
--define(wxStyledTextCtrl_WordPartLeftExtend, 3298).
--define(wxStyledTextCtrl_WordPartRight, 3299).
--define(wxStyledTextCtrl_WordPartRightExtend, 3300).
--define(wxStyledTextCtrl_SetVisiblePolicy, 3301).
--define(wxStyledTextCtrl_DelLineLeft, 3302).
--define(wxStyledTextCtrl_DelLineRight, 3303).
--define(wxStyledTextCtrl_GetXOffset, 3304).
--define(wxStyledTextCtrl_ChooseCaretX, 3305).
--define(wxStyledTextCtrl_SetXCaretPolicy, 3306).
--define(wxStyledTextCtrl_SetYCaretPolicy, 3307).
--define(wxStyledTextCtrl_GetPrintWrapMode, 3308).
--define(wxStyledTextCtrl_SetHotspotActiveForeground, 3309).
--define(wxStyledTextCtrl_SetHotspotActiveBackground, 3310).
--define(wxStyledTextCtrl_SetHotspotActiveUnderline, 3311).
--define(wxStyledTextCtrl_SetHotspotSingleLine, 3312).
--define(wxStyledTextCtrl_ParaDownExtend, 3313).
--define(wxStyledTextCtrl_ParaUp, 3314).
--define(wxStyledTextCtrl_ParaUpExtend, 3315).
--define(wxStyledTextCtrl_PositionBefore, 3316).
--define(wxStyledTextCtrl_PositionAfter, 3317).
--define(wxStyledTextCtrl_CopyRange, 3318).
--define(wxStyledTextCtrl_CopyText, 3319).
--define(wxStyledTextCtrl_SetSelectionMode, 3320).
--define(wxStyledTextCtrl_GetSelectionMode, 3321).
--define(wxStyledTextCtrl_LineDownRectExtend, 3322).
--define(wxStyledTextCtrl_LineUpRectExtend, 3323).
--define(wxStyledTextCtrl_CharLeftRectExtend, 3324).
--define(wxStyledTextCtrl_CharRightRectExtend, 3325).
--define(wxStyledTextCtrl_HomeRectExtend, 3326).
--define(wxStyledTextCtrl_VCHomeRectExtend, 3327).
--define(wxStyledTextCtrl_LineEndRectExtend, 3328).
--define(wxStyledTextCtrl_PageUpRectExtend, 3329).
--define(wxStyledTextCtrl_PageDownRectExtend, 3330).
--define(wxStyledTextCtrl_StutteredPageUp, 3331).
--define(wxStyledTextCtrl_StutteredPageUpExtend, 3332).
--define(wxStyledTextCtrl_StutteredPageDown, 3333).
--define(wxStyledTextCtrl_StutteredPageDownExtend, 3334).
--define(wxStyledTextCtrl_WordLeftEnd, 3335).
--define(wxStyledTextCtrl_WordLeftEndExtend, 3336).
--define(wxStyledTextCtrl_WordRightEnd, 3337).
--define(wxStyledTextCtrl_WordRightEndExtend, 3338).
--define(wxStyledTextCtrl_SetWhitespaceChars, 3339).
--define(wxStyledTextCtrl_SetCharsDefault, 3340).
--define(wxStyledTextCtrl_AutoCompGetCurrent, 3341).
--define(wxStyledTextCtrl_Allocate, 3342).
--define(wxStyledTextCtrl_FindColumn, 3343).
--define(wxStyledTextCtrl_GetCaretSticky, 3344).
--define(wxStyledTextCtrl_SetCaretSticky, 3345).
--define(wxStyledTextCtrl_ToggleCaretSticky, 3346).
--define(wxStyledTextCtrl_SetPasteConvertEndings, 3347).
--define(wxStyledTextCtrl_GetPasteConvertEndings, 3348).
--define(wxStyledTextCtrl_SelectionDuplicate, 3349).
--define(wxStyledTextCtrl_SetCaretLineBackAlpha, 3350).
--define(wxStyledTextCtrl_GetCaretLineBackAlpha, 3351).
--define(wxStyledTextCtrl_StartRecord, 3352).
--define(wxStyledTextCtrl_StopRecord, 3353).
--define(wxStyledTextCtrl_SetLexer, 3354).
--define(wxStyledTextCtrl_GetLexer, 3355).
--define(wxStyledTextCtrl_Colourise, 3356).
--define(wxStyledTextCtrl_SetProperty, 3357).
--define(wxStyledTextCtrl_SetKeyWords, 3358).
--define(wxStyledTextCtrl_SetLexerLanguage, 3359).
--define(wxStyledTextCtrl_GetProperty, 3360).
--define(wxStyledTextCtrl_GetStyleBitsNeeded, 3361).
--define(wxStyledTextCtrl_GetCurrentLine, 3362).
--define(wxStyledTextCtrl_StyleSetSpec, 3363).
--define(wxStyledTextCtrl_StyleSetFont, 3364).
--define(wxStyledTextCtrl_StyleSetFontAttr, 3365).
--define(wxStyledTextCtrl_StyleSetCharacterSet, 3366).
--define(wxStyledTextCtrl_StyleSetFontEncoding, 3367).
--define(wxStyledTextCtrl_CmdKeyExecute, 3368).
--define(wxStyledTextCtrl_SetMargins, 3369).
--define(wxStyledTextCtrl_GetSelection, 3370).
--define(wxStyledTextCtrl_PointFromPosition, 3371).
--define(wxStyledTextCtrl_ScrollToLine, 3372).
--define(wxStyledTextCtrl_ScrollToColumn, 3373).
--define(wxStyledTextCtrl_SetVScrollBar, 3374).
--define(wxStyledTextCtrl_SetHScrollBar, 3375).
--define(wxStyledTextCtrl_GetLastKeydownProcessed, 3376).
--define(wxStyledTextCtrl_SetLastKeydownProcessed, 3377).
--define(wxStyledTextCtrl_SaveFile, 3378).
--define(wxStyledTextCtrl_LoadFile, 3379).
--define(wxStyledTextCtrl_DoDragOver, 3380).
--define(wxStyledTextCtrl_DoDropText, 3381).
--define(wxStyledTextCtrl_GetUseAntiAliasing, 3382).
--define(wxStyledTextCtrl_AddTextRaw, 3383).
--define(wxStyledTextCtrl_InsertTextRaw, 3384).
--define(wxStyledTextCtrl_GetCurLineRaw, 3385).
--define(wxStyledTextCtrl_GetLineRaw, 3386).
--define(wxStyledTextCtrl_GetSelectedTextRaw, 3387).
--define(wxStyledTextCtrl_GetTextRangeRaw, 3388).
--define(wxStyledTextCtrl_SetTextRaw, 3389).
--define(wxStyledTextCtrl_GetTextRaw, 3390).
--define(wxStyledTextCtrl_AppendTextRaw, 3391).
--define(wxArtProvider_GetBitmap, 3392).
--define(wxArtProvider_GetIcon, 3393).
--define(wxTreeEvent_GetKeyCode, 3394).
--define(wxTreeEvent_GetItem, 3395).
--define(wxTreeEvent_GetKeyEvent, 3396).
--define(wxTreeEvent_GetLabel, 3397).
--define(wxTreeEvent_GetOldItem, 3398).
--define(wxTreeEvent_GetPoint, 3399).
--define(wxTreeEvent_IsEditCancelled, 3400).
--define(wxTreeEvent_SetToolTip, 3401).
--define(wxNotebookEvent_GetOldSelection, 3402).
--define(wxNotebookEvent_GetSelection, 3403).
--define(wxNotebookEvent_SetOldSelection, 3404).
--define(wxNotebookEvent_SetSelection, 3405).
--define(wxFileDataObject_new, 3406).
--define(wxFileDataObject_AddFile, 3407).
--define(wxFileDataObject_GetFilenames, 3408).
--define(wxFileDataObject_destroy, 3409).
--define(wxTextDataObject_new, 3410).
--define(wxTextDataObject_GetTextLength, 3411).
--define(wxTextDataObject_GetText, 3412).
--define(wxTextDataObject_SetText, 3413).
--define(wxTextDataObject_destroy, 3414).
--define(wxBitmapDataObject_new_1_1, 3415).
--define(wxBitmapDataObject_new_1_0, 3416).
--define(wxBitmapDataObject_GetBitmap, 3417).
--define(wxBitmapDataObject_SetBitmap, 3418).
--define(wxBitmapDataObject_destroy, 3419).
--define(wxClipboard_new, 3421).
--define(wxClipboard_destruct, 3422).
--define(wxClipboard_AddData, 3423).
--define(wxClipboard_Clear, 3424).
--define(wxClipboard_Close, 3425).
--define(wxClipboard_Flush, 3426).
--define(wxClipboard_GetData, 3427).
--define(wxClipboard_IsOpened, 3428).
--define(wxClipboard_Open, 3429).
--define(wxClipboard_SetData, 3430).
--define(wxClipboard_UsePrimarySelection, 3432).
--define(wxClipboard_IsSupported, 3433).
--define(wxClipboard_Get, 3434).
--define(wxSpinEvent_GetPosition, 3435).
--define(wxSpinEvent_SetPosition, 3436).
--define(wxSplitterWindow_new_0, 3437).
--define(wxSplitterWindow_new_2, 3438).
--define(wxSplitterWindow_destruct, 3439).
--define(wxSplitterWindow_Create, 3440).
--define(wxSplitterWindow_GetMinimumPaneSize, 3441).
--define(wxSplitterWindow_GetSashGravity, 3442).
--define(wxSplitterWindow_GetSashPosition, 3443).
--define(wxSplitterWindow_GetSplitMode, 3444).
--define(wxSplitterWindow_GetWindow1, 3445).
--define(wxSplitterWindow_GetWindow2, 3446).
--define(wxSplitterWindow_Initialize, 3447).
--define(wxSplitterWindow_IsSplit, 3448).
--define(wxSplitterWindow_ReplaceWindow, 3449).
--define(wxSplitterWindow_SetSashGravity, 3450).
--define(wxSplitterWindow_SetSashPosition, 3451).
--define(wxSplitterWindow_SetSashSize, 3452).
--define(wxSplitterWindow_SetMinimumPaneSize, 3453).
--define(wxSplitterWindow_SetSplitMode, 3454).
--define(wxSplitterWindow_SplitHorizontally, 3455).
--define(wxSplitterWindow_SplitVertically, 3456).
--define(wxSplitterWindow_Unsplit, 3457).
--define(wxSplitterWindow_UpdateSize, 3458).
--define(wxSplitterEvent_GetSashPosition, 3459).
--define(wxSplitterEvent_GetX, 3460).
--define(wxSplitterEvent_GetY, 3461).
--define(wxSplitterEvent_GetWindowBeingRemoved, 3462).
--define(wxSplitterEvent_SetSashPosition, 3463).
--define(wxHtmlWindow_new_0, 3464).
--define(wxHtmlWindow_new_2, 3465).
--define(wxHtmlWindow_AppendToPage, 3466).
--define(wxHtmlWindow_GetOpenedAnchor, 3467).
--define(wxHtmlWindow_GetOpenedPage, 3468).
--define(wxHtmlWindow_GetOpenedPageTitle, 3469).
--define(wxHtmlWindow_GetRelatedFrame, 3470).
--define(wxHtmlWindow_HistoryBack, 3471).
--define(wxHtmlWindow_HistoryCanBack, 3472).
--define(wxHtmlWindow_HistoryCanForward, 3473).
--define(wxHtmlWindow_HistoryClear, 3474).
--define(wxHtmlWindow_HistoryForward, 3475).
--define(wxHtmlWindow_LoadFile, 3476).
--define(wxHtmlWindow_LoadPage, 3477).
--define(wxHtmlWindow_SelectAll, 3478).
--define(wxHtmlWindow_SelectionToText, 3479).
--define(wxHtmlWindow_SelectLine, 3480).
--define(wxHtmlWindow_SelectWord, 3481).
--define(wxHtmlWindow_SetBorders, 3482).
--define(wxHtmlWindow_SetFonts, 3483).
--define(wxHtmlWindow_SetPage, 3484).
--define(wxHtmlWindow_SetRelatedFrame, 3485).
--define(wxHtmlWindow_SetRelatedStatusBar, 3486).
--define(wxHtmlWindow_ToText, 3487).
--define(wxHtmlWindow_destroy, 3488).
--define(wxHtmlLinkEvent_GetLinkInfo, 3489).
--define(wxSystemSettings_GetColour, 3490).
--define(wxSystemSettings_GetFont, 3491).
--define(wxSystemSettings_GetMetric, 3492).
--define(wxSystemSettings_GetScreenType, 3493).
--define(wxSystemOptions_GetOption, 3494).
--define(wxSystemOptions_GetOptionInt, 3495).
--define(wxSystemOptions_HasOption, 3496).
--define(wxSystemOptions_IsFalse, 3497).
--define(wxSystemOptions_SetOption_2_1, 3498).
--define(wxSystemOptions_SetOption_2_0, 3499).
--define(wxAuiNotebookEvent_SetSelection, 3500).
--define(wxAuiNotebookEvent_GetSelection, 3501).
--define(wxAuiNotebookEvent_SetOldSelection, 3502).
--define(wxAuiNotebookEvent_GetOldSelection, 3503).
--define(wxAuiNotebookEvent_SetDragSource, 3504).
--define(wxAuiNotebookEvent_GetDragSource, 3505).
--define(wxAuiManagerEvent_SetManager, 3506).
--define(wxAuiManagerEvent_GetManager, 3507).
--define(wxAuiManagerEvent_SetPane, 3508).
--define(wxAuiManagerEvent_GetPane, 3509).
--define(wxAuiManagerEvent_SetButton, 3510).
--define(wxAuiManagerEvent_GetButton, 3511).
--define(wxAuiManagerEvent_SetDC, 3512).
--define(wxAuiManagerEvent_GetDC, 3513).
--define(wxAuiManagerEvent_Veto, 3514).
--define(wxAuiManagerEvent_GetVeto, 3515).
--define(wxAuiManagerEvent_SetCanVeto, 3516).
--define(wxAuiManagerEvent_CanVeto, 3517).
--define(wxLogNull_new, 3518).
--define(wxLogNull_destroy, 3519).
--define(wxTaskBarIcon_new, 3520).
--define(wxTaskBarIcon_destruct, 3521).
--define(wxTaskBarIcon_PopupMenu, 3522).
--define(wxTaskBarIcon_RemoveIcon, 3523).
--define(wxTaskBarIcon_SetIcon, 3524).
+-define(gdicmn_wxDisplaySize, 2927).
+-define(gdicmn_wxSetCursor, 2928).
+-define(wxPrintout_new, 2929).
+-define(wxPrintout_destruct, 2930).
+-define(wxPrintout_GetDC, 2931).
+-define(wxPrintout_GetPageSizeMM, 2932).
+-define(wxPrintout_GetPageSizePixels, 2933).
+-define(wxPrintout_GetPaperRectPixels, 2934).
+-define(wxPrintout_GetPPIPrinter, 2935).
+-define(wxPrintout_GetPPIScreen, 2936).
+-define(wxPrintout_GetTitle, 2937).
+-define(wxPrintout_IsPreview, 2938).
+-define(wxPrintout_FitThisSizeToPaper, 2939).
+-define(wxPrintout_FitThisSizeToPage, 2940).
+-define(wxPrintout_FitThisSizeToPageMargins, 2941).
+-define(wxPrintout_MapScreenSizeToPaper, 2942).
+-define(wxPrintout_MapScreenSizeToPage, 2943).
+-define(wxPrintout_MapScreenSizeToPageMargins, 2944).
+-define(wxPrintout_MapScreenSizeToDevice, 2945).
+-define(wxPrintout_GetLogicalPaperRect, 2946).
+-define(wxPrintout_GetLogicalPageRect, 2947).
+-define(wxPrintout_GetLogicalPageMarginsRect, 2948).
+-define(wxPrintout_SetLogicalOrigin, 2949).
+-define(wxPrintout_OffsetLogicalOrigin, 2950).
+-define(wxStyledTextCtrl_new_2, 2951).
+-define(wxStyledTextCtrl_new_0, 2952).
+-define(wxStyledTextCtrl_destruct, 2953).
+-define(wxStyledTextCtrl_Create, 2954).
+-define(wxStyledTextCtrl_AddText, 2955).
+-define(wxStyledTextCtrl_AddStyledText, 2956).
+-define(wxStyledTextCtrl_InsertText, 2957).
+-define(wxStyledTextCtrl_ClearAll, 2958).
+-define(wxStyledTextCtrl_ClearDocumentStyle, 2959).
+-define(wxStyledTextCtrl_GetLength, 2960).
+-define(wxStyledTextCtrl_GetCharAt, 2961).
+-define(wxStyledTextCtrl_GetCurrentPos, 2962).
+-define(wxStyledTextCtrl_GetAnchor, 2963).
+-define(wxStyledTextCtrl_GetStyleAt, 2964).
+-define(wxStyledTextCtrl_Redo, 2965).
+-define(wxStyledTextCtrl_SetUndoCollection, 2966).
+-define(wxStyledTextCtrl_SelectAll, 2967).
+-define(wxStyledTextCtrl_SetSavePoint, 2968).
+-define(wxStyledTextCtrl_GetStyledText, 2969).
+-define(wxStyledTextCtrl_CanRedo, 2970).
+-define(wxStyledTextCtrl_MarkerLineFromHandle, 2971).
+-define(wxStyledTextCtrl_MarkerDeleteHandle, 2972).
+-define(wxStyledTextCtrl_GetUndoCollection, 2973).
+-define(wxStyledTextCtrl_GetViewWhiteSpace, 2974).
+-define(wxStyledTextCtrl_SetViewWhiteSpace, 2975).
+-define(wxStyledTextCtrl_PositionFromPoint, 2976).
+-define(wxStyledTextCtrl_PositionFromPointClose, 2977).
+-define(wxStyledTextCtrl_GotoLine, 2978).
+-define(wxStyledTextCtrl_GotoPos, 2979).
+-define(wxStyledTextCtrl_SetAnchor, 2980).
+-define(wxStyledTextCtrl_GetCurLine, 2981).
+-define(wxStyledTextCtrl_GetEndStyled, 2982).
+-define(wxStyledTextCtrl_ConvertEOLs, 2983).
+-define(wxStyledTextCtrl_GetEOLMode, 2984).
+-define(wxStyledTextCtrl_SetEOLMode, 2985).
+-define(wxStyledTextCtrl_StartStyling, 2986).
+-define(wxStyledTextCtrl_SetStyling, 2987).
+-define(wxStyledTextCtrl_GetBufferedDraw, 2988).
+-define(wxStyledTextCtrl_SetBufferedDraw, 2989).
+-define(wxStyledTextCtrl_SetTabWidth, 2990).
+-define(wxStyledTextCtrl_GetTabWidth, 2991).
+-define(wxStyledTextCtrl_SetCodePage, 2992).
+-define(wxStyledTextCtrl_MarkerDefine, 2993).
+-define(wxStyledTextCtrl_MarkerSetForeground, 2994).
+-define(wxStyledTextCtrl_MarkerSetBackground, 2995).
+-define(wxStyledTextCtrl_MarkerAdd, 2996).
+-define(wxStyledTextCtrl_MarkerDelete, 2997).
+-define(wxStyledTextCtrl_MarkerDeleteAll, 2998).
+-define(wxStyledTextCtrl_MarkerGet, 2999).
+-define(wxStyledTextCtrl_MarkerNext, 3000).
+-define(wxStyledTextCtrl_MarkerPrevious, 3001).
+-define(wxStyledTextCtrl_MarkerDefineBitmap, 3002).
+-define(wxStyledTextCtrl_MarkerAddSet, 3003).
+-define(wxStyledTextCtrl_MarkerSetAlpha, 3004).
+-define(wxStyledTextCtrl_SetMarginType, 3005).
+-define(wxStyledTextCtrl_GetMarginType, 3006).
+-define(wxStyledTextCtrl_SetMarginWidth, 3007).
+-define(wxStyledTextCtrl_GetMarginWidth, 3008).
+-define(wxStyledTextCtrl_SetMarginMask, 3009).
+-define(wxStyledTextCtrl_GetMarginMask, 3010).
+-define(wxStyledTextCtrl_SetMarginSensitive, 3011).
+-define(wxStyledTextCtrl_GetMarginSensitive, 3012).
+-define(wxStyledTextCtrl_StyleClearAll, 3013).
+-define(wxStyledTextCtrl_StyleSetForeground, 3014).
+-define(wxStyledTextCtrl_StyleSetBackground, 3015).
+-define(wxStyledTextCtrl_StyleSetBold, 3016).
+-define(wxStyledTextCtrl_StyleSetItalic, 3017).
+-define(wxStyledTextCtrl_StyleSetSize, 3018).
+-define(wxStyledTextCtrl_StyleSetFaceName, 3019).
+-define(wxStyledTextCtrl_StyleSetEOLFilled, 3020).
+-define(wxStyledTextCtrl_StyleResetDefault, 3021).
+-define(wxStyledTextCtrl_StyleSetUnderline, 3022).
+-define(wxStyledTextCtrl_StyleSetCase, 3023).
+-define(wxStyledTextCtrl_StyleSetHotSpot, 3024).
+-define(wxStyledTextCtrl_SetSelForeground, 3025).
+-define(wxStyledTextCtrl_SetSelBackground, 3026).
+-define(wxStyledTextCtrl_GetSelAlpha, 3027).
+-define(wxStyledTextCtrl_SetSelAlpha, 3028).
+-define(wxStyledTextCtrl_SetCaretForeground, 3029).
+-define(wxStyledTextCtrl_CmdKeyAssign, 3030).
+-define(wxStyledTextCtrl_CmdKeyClear, 3031).
+-define(wxStyledTextCtrl_CmdKeyClearAll, 3032).
+-define(wxStyledTextCtrl_SetStyleBytes, 3033).
+-define(wxStyledTextCtrl_StyleSetVisible, 3034).
+-define(wxStyledTextCtrl_GetCaretPeriod, 3035).
+-define(wxStyledTextCtrl_SetCaretPeriod, 3036).
+-define(wxStyledTextCtrl_SetWordChars, 3037).
+-define(wxStyledTextCtrl_BeginUndoAction, 3038).
+-define(wxStyledTextCtrl_EndUndoAction, 3039).
+-define(wxStyledTextCtrl_IndicatorSetStyle, 3040).
+-define(wxStyledTextCtrl_IndicatorGetStyle, 3041).
+-define(wxStyledTextCtrl_IndicatorSetForeground, 3042).
+-define(wxStyledTextCtrl_IndicatorGetForeground, 3043).
+-define(wxStyledTextCtrl_SetWhitespaceForeground, 3044).
+-define(wxStyledTextCtrl_SetWhitespaceBackground, 3045).
+-define(wxStyledTextCtrl_GetStyleBits, 3046).
+-define(wxStyledTextCtrl_SetLineState, 3047).
+-define(wxStyledTextCtrl_GetLineState, 3048).
+-define(wxStyledTextCtrl_GetMaxLineState, 3049).
+-define(wxStyledTextCtrl_GetCaretLineVisible, 3050).
+-define(wxStyledTextCtrl_SetCaretLineVisible, 3051).
+-define(wxStyledTextCtrl_GetCaretLineBackground, 3052).
+-define(wxStyledTextCtrl_SetCaretLineBackground, 3053).
+-define(wxStyledTextCtrl_AutoCompShow, 3054).
+-define(wxStyledTextCtrl_AutoCompCancel, 3055).
+-define(wxStyledTextCtrl_AutoCompActive, 3056).
+-define(wxStyledTextCtrl_AutoCompPosStart, 3057).
+-define(wxStyledTextCtrl_AutoCompComplete, 3058).
+-define(wxStyledTextCtrl_AutoCompStops, 3059).
+-define(wxStyledTextCtrl_AutoCompSetSeparator, 3060).
+-define(wxStyledTextCtrl_AutoCompGetSeparator, 3061).
+-define(wxStyledTextCtrl_AutoCompSelect, 3062).
+-define(wxStyledTextCtrl_AutoCompSetCancelAtStart, 3063).
+-define(wxStyledTextCtrl_AutoCompGetCancelAtStart, 3064).
+-define(wxStyledTextCtrl_AutoCompSetFillUps, 3065).
+-define(wxStyledTextCtrl_AutoCompSetChooseSingle, 3066).
+-define(wxStyledTextCtrl_AutoCompGetChooseSingle, 3067).
+-define(wxStyledTextCtrl_AutoCompSetIgnoreCase, 3068).
+-define(wxStyledTextCtrl_AutoCompGetIgnoreCase, 3069).
+-define(wxStyledTextCtrl_UserListShow, 3070).
+-define(wxStyledTextCtrl_AutoCompSetAutoHide, 3071).
+-define(wxStyledTextCtrl_AutoCompGetAutoHide, 3072).
+-define(wxStyledTextCtrl_AutoCompSetDropRestOfWord, 3073).
+-define(wxStyledTextCtrl_AutoCompGetDropRestOfWord, 3074).
+-define(wxStyledTextCtrl_RegisterImage, 3075).
+-define(wxStyledTextCtrl_ClearRegisteredImages, 3076).
+-define(wxStyledTextCtrl_AutoCompGetTypeSeparator, 3077).
+-define(wxStyledTextCtrl_AutoCompSetTypeSeparator, 3078).
+-define(wxStyledTextCtrl_AutoCompSetMaxWidth, 3079).
+-define(wxStyledTextCtrl_AutoCompGetMaxWidth, 3080).
+-define(wxStyledTextCtrl_AutoCompSetMaxHeight, 3081).
+-define(wxStyledTextCtrl_AutoCompGetMaxHeight, 3082).
+-define(wxStyledTextCtrl_SetIndent, 3083).
+-define(wxStyledTextCtrl_GetIndent, 3084).
+-define(wxStyledTextCtrl_SetUseTabs, 3085).
+-define(wxStyledTextCtrl_GetUseTabs, 3086).
+-define(wxStyledTextCtrl_SetLineIndentation, 3087).
+-define(wxStyledTextCtrl_GetLineIndentation, 3088).
+-define(wxStyledTextCtrl_GetLineIndentPosition, 3089).
+-define(wxStyledTextCtrl_GetColumn, 3090).
+-define(wxStyledTextCtrl_SetUseHorizontalScrollBar, 3091).
+-define(wxStyledTextCtrl_GetUseHorizontalScrollBar, 3092).
+-define(wxStyledTextCtrl_SetIndentationGuides, 3093).
+-define(wxStyledTextCtrl_GetIndentationGuides, 3094).
+-define(wxStyledTextCtrl_SetHighlightGuide, 3095).
+-define(wxStyledTextCtrl_GetHighlightGuide, 3096).
+-define(wxStyledTextCtrl_GetLineEndPosition, 3097).
+-define(wxStyledTextCtrl_GetCodePage, 3098).
+-define(wxStyledTextCtrl_GetCaretForeground, 3099).
+-define(wxStyledTextCtrl_GetReadOnly, 3100).
+-define(wxStyledTextCtrl_SetCurrentPos, 3101).
+-define(wxStyledTextCtrl_SetSelectionStart, 3102).
+-define(wxStyledTextCtrl_GetSelectionStart, 3103).
+-define(wxStyledTextCtrl_SetSelectionEnd, 3104).
+-define(wxStyledTextCtrl_GetSelectionEnd, 3105).
+-define(wxStyledTextCtrl_SetPrintMagnification, 3106).
+-define(wxStyledTextCtrl_GetPrintMagnification, 3107).
+-define(wxStyledTextCtrl_SetPrintColourMode, 3108).
+-define(wxStyledTextCtrl_GetPrintColourMode, 3109).
+-define(wxStyledTextCtrl_FindText, 3110).
+-define(wxStyledTextCtrl_FormatRange, 3111).
+-define(wxStyledTextCtrl_GetFirstVisibleLine, 3112).
+-define(wxStyledTextCtrl_GetLine, 3113).
+-define(wxStyledTextCtrl_GetLineCount, 3114).
+-define(wxStyledTextCtrl_SetMarginLeft, 3115).
+-define(wxStyledTextCtrl_GetMarginLeft, 3116).
+-define(wxStyledTextCtrl_SetMarginRight, 3117).
+-define(wxStyledTextCtrl_GetMarginRight, 3118).
+-define(wxStyledTextCtrl_GetModify, 3119).
+-define(wxStyledTextCtrl_SetSelection, 3120).
+-define(wxStyledTextCtrl_GetSelectedText, 3121).
+-define(wxStyledTextCtrl_GetTextRange, 3122).
+-define(wxStyledTextCtrl_HideSelection, 3123).
+-define(wxStyledTextCtrl_LineFromPosition, 3124).
+-define(wxStyledTextCtrl_PositionFromLine, 3125).
+-define(wxStyledTextCtrl_LineScroll, 3126).
+-define(wxStyledTextCtrl_EnsureCaretVisible, 3127).
+-define(wxStyledTextCtrl_ReplaceSelection, 3128).
+-define(wxStyledTextCtrl_SetReadOnly, 3129).
+-define(wxStyledTextCtrl_CanPaste, 3130).
+-define(wxStyledTextCtrl_CanUndo, 3131).
+-define(wxStyledTextCtrl_EmptyUndoBuffer, 3132).
+-define(wxStyledTextCtrl_Undo, 3133).
+-define(wxStyledTextCtrl_Cut, 3134).
+-define(wxStyledTextCtrl_Copy, 3135).
+-define(wxStyledTextCtrl_Paste, 3136).
+-define(wxStyledTextCtrl_Clear, 3137).
+-define(wxStyledTextCtrl_SetText, 3138).
+-define(wxStyledTextCtrl_GetText, 3139).
+-define(wxStyledTextCtrl_GetTextLength, 3140).
+-define(wxStyledTextCtrl_GetOvertype, 3141).
+-define(wxStyledTextCtrl_SetCaretWidth, 3142).
+-define(wxStyledTextCtrl_GetCaretWidth, 3143).
+-define(wxStyledTextCtrl_SetTargetStart, 3144).
+-define(wxStyledTextCtrl_GetTargetStart, 3145).
+-define(wxStyledTextCtrl_SetTargetEnd, 3146).
+-define(wxStyledTextCtrl_GetTargetEnd, 3147).
+-define(wxStyledTextCtrl_ReplaceTarget, 3148).
+-define(wxStyledTextCtrl_SearchInTarget, 3149).
+-define(wxStyledTextCtrl_SetSearchFlags, 3150).
+-define(wxStyledTextCtrl_GetSearchFlags, 3151).
+-define(wxStyledTextCtrl_CallTipShow, 3152).
+-define(wxStyledTextCtrl_CallTipCancel, 3153).
+-define(wxStyledTextCtrl_CallTipActive, 3154).
+-define(wxStyledTextCtrl_CallTipPosAtStart, 3155).
+-define(wxStyledTextCtrl_CallTipSetHighlight, 3156).
+-define(wxStyledTextCtrl_CallTipSetBackground, 3157).
+-define(wxStyledTextCtrl_CallTipSetForeground, 3158).
+-define(wxStyledTextCtrl_CallTipSetForegroundHighlight, 3159).
+-define(wxStyledTextCtrl_CallTipUseStyle, 3160).
+-define(wxStyledTextCtrl_VisibleFromDocLine, 3161).
+-define(wxStyledTextCtrl_DocLineFromVisible, 3162).
+-define(wxStyledTextCtrl_WrapCount, 3163).
+-define(wxStyledTextCtrl_SetFoldLevel, 3164).
+-define(wxStyledTextCtrl_GetFoldLevel, 3165).
+-define(wxStyledTextCtrl_GetLastChild, 3166).
+-define(wxStyledTextCtrl_GetFoldParent, 3167).
+-define(wxStyledTextCtrl_ShowLines, 3168).
+-define(wxStyledTextCtrl_HideLines, 3169).
+-define(wxStyledTextCtrl_GetLineVisible, 3170).
+-define(wxStyledTextCtrl_SetFoldExpanded, 3171).
+-define(wxStyledTextCtrl_GetFoldExpanded, 3172).
+-define(wxStyledTextCtrl_ToggleFold, 3173).
+-define(wxStyledTextCtrl_EnsureVisible, 3174).
+-define(wxStyledTextCtrl_SetFoldFlags, 3175).
+-define(wxStyledTextCtrl_EnsureVisibleEnforcePolicy, 3176).
+-define(wxStyledTextCtrl_SetTabIndents, 3177).
+-define(wxStyledTextCtrl_GetTabIndents, 3178).
+-define(wxStyledTextCtrl_SetBackSpaceUnIndents, 3179).
+-define(wxStyledTextCtrl_GetBackSpaceUnIndents, 3180).
+-define(wxStyledTextCtrl_SetMouseDwellTime, 3181).
+-define(wxStyledTextCtrl_GetMouseDwellTime, 3182).
+-define(wxStyledTextCtrl_WordStartPosition, 3183).
+-define(wxStyledTextCtrl_WordEndPosition, 3184).
+-define(wxStyledTextCtrl_SetWrapMode, 3185).
+-define(wxStyledTextCtrl_GetWrapMode, 3186).
+-define(wxStyledTextCtrl_SetWrapVisualFlags, 3187).
+-define(wxStyledTextCtrl_GetWrapVisualFlags, 3188).
+-define(wxStyledTextCtrl_SetWrapVisualFlagsLocation, 3189).
+-define(wxStyledTextCtrl_GetWrapVisualFlagsLocation, 3190).
+-define(wxStyledTextCtrl_SetWrapStartIndent, 3191).
+-define(wxStyledTextCtrl_GetWrapStartIndent, 3192).
+-define(wxStyledTextCtrl_SetLayoutCache, 3193).
+-define(wxStyledTextCtrl_GetLayoutCache, 3194).
+-define(wxStyledTextCtrl_SetScrollWidth, 3195).
+-define(wxStyledTextCtrl_GetScrollWidth, 3196).
+-define(wxStyledTextCtrl_TextWidth, 3197).
+-define(wxStyledTextCtrl_GetEndAtLastLine, 3198).
+-define(wxStyledTextCtrl_TextHeight, 3199).
+-define(wxStyledTextCtrl_SetUseVerticalScrollBar, 3200).
+-define(wxStyledTextCtrl_GetUseVerticalScrollBar, 3201).
+-define(wxStyledTextCtrl_AppendText, 3202).
+-define(wxStyledTextCtrl_GetTwoPhaseDraw, 3203).
+-define(wxStyledTextCtrl_SetTwoPhaseDraw, 3204).
+-define(wxStyledTextCtrl_TargetFromSelection, 3205).
+-define(wxStyledTextCtrl_LinesJoin, 3206).
+-define(wxStyledTextCtrl_LinesSplit, 3207).
+-define(wxStyledTextCtrl_SetFoldMarginColour, 3208).
+-define(wxStyledTextCtrl_SetFoldMarginHiColour, 3209).
+-define(wxStyledTextCtrl_LineDown, 3210).
+-define(wxStyledTextCtrl_LineDownExtend, 3211).
+-define(wxStyledTextCtrl_LineUp, 3212).
+-define(wxStyledTextCtrl_LineUpExtend, 3213).
+-define(wxStyledTextCtrl_CharLeft, 3214).
+-define(wxStyledTextCtrl_CharLeftExtend, 3215).
+-define(wxStyledTextCtrl_CharRight, 3216).
+-define(wxStyledTextCtrl_CharRightExtend, 3217).
+-define(wxStyledTextCtrl_WordLeft, 3218).
+-define(wxStyledTextCtrl_WordLeftExtend, 3219).
+-define(wxStyledTextCtrl_WordRight, 3220).
+-define(wxStyledTextCtrl_WordRightExtend, 3221).
+-define(wxStyledTextCtrl_Home, 3222).
+-define(wxStyledTextCtrl_HomeExtend, 3223).
+-define(wxStyledTextCtrl_LineEnd, 3224).
+-define(wxStyledTextCtrl_LineEndExtend, 3225).
+-define(wxStyledTextCtrl_DocumentStart, 3226).
+-define(wxStyledTextCtrl_DocumentStartExtend, 3227).
+-define(wxStyledTextCtrl_DocumentEnd, 3228).
+-define(wxStyledTextCtrl_DocumentEndExtend, 3229).
+-define(wxStyledTextCtrl_PageUp, 3230).
+-define(wxStyledTextCtrl_PageUpExtend, 3231).
+-define(wxStyledTextCtrl_PageDown, 3232).
+-define(wxStyledTextCtrl_PageDownExtend, 3233).
+-define(wxStyledTextCtrl_EditToggleOvertype, 3234).
+-define(wxStyledTextCtrl_Cancel, 3235).
+-define(wxStyledTextCtrl_DeleteBack, 3236).
+-define(wxStyledTextCtrl_Tab, 3237).
+-define(wxStyledTextCtrl_BackTab, 3238).
+-define(wxStyledTextCtrl_NewLine, 3239).
+-define(wxStyledTextCtrl_FormFeed, 3240).
+-define(wxStyledTextCtrl_VCHome, 3241).
+-define(wxStyledTextCtrl_VCHomeExtend, 3242).
+-define(wxStyledTextCtrl_ZoomIn, 3243).
+-define(wxStyledTextCtrl_ZoomOut, 3244).
+-define(wxStyledTextCtrl_DelWordLeft, 3245).
+-define(wxStyledTextCtrl_DelWordRight, 3246).
+-define(wxStyledTextCtrl_LineCut, 3247).
+-define(wxStyledTextCtrl_LineDelete, 3248).
+-define(wxStyledTextCtrl_LineTranspose, 3249).
+-define(wxStyledTextCtrl_LineDuplicate, 3250).
+-define(wxStyledTextCtrl_LowerCase, 3251).
+-define(wxStyledTextCtrl_UpperCase, 3252).
+-define(wxStyledTextCtrl_LineScrollDown, 3253).
+-define(wxStyledTextCtrl_LineScrollUp, 3254).
+-define(wxStyledTextCtrl_DeleteBackNotLine, 3255).
+-define(wxStyledTextCtrl_HomeDisplay, 3256).
+-define(wxStyledTextCtrl_HomeDisplayExtend, 3257).
+-define(wxStyledTextCtrl_LineEndDisplay, 3258).
+-define(wxStyledTextCtrl_LineEndDisplayExtend, 3259).
+-define(wxStyledTextCtrl_HomeWrapExtend, 3260).
+-define(wxStyledTextCtrl_LineEndWrap, 3261).
+-define(wxStyledTextCtrl_LineEndWrapExtend, 3262).
+-define(wxStyledTextCtrl_VCHomeWrap, 3263).
+-define(wxStyledTextCtrl_VCHomeWrapExtend, 3264).
+-define(wxStyledTextCtrl_LineCopy, 3265).
+-define(wxStyledTextCtrl_MoveCaretInsideView, 3266).
+-define(wxStyledTextCtrl_LineLength, 3267).
+-define(wxStyledTextCtrl_BraceHighlight, 3268).
+-define(wxStyledTextCtrl_BraceBadLight, 3269).
+-define(wxStyledTextCtrl_BraceMatch, 3270).
+-define(wxStyledTextCtrl_GetViewEOL, 3271).
+-define(wxStyledTextCtrl_SetViewEOL, 3272).
+-define(wxStyledTextCtrl_SetModEventMask, 3273).
+-define(wxStyledTextCtrl_GetEdgeColumn, 3274).
+-define(wxStyledTextCtrl_SetEdgeColumn, 3275).
+-define(wxStyledTextCtrl_SetEdgeMode, 3276).
+-define(wxStyledTextCtrl_GetEdgeMode, 3277).
+-define(wxStyledTextCtrl_GetEdgeColour, 3278).
+-define(wxStyledTextCtrl_SetEdgeColour, 3279).
+-define(wxStyledTextCtrl_SearchAnchor, 3280).
+-define(wxStyledTextCtrl_SearchNext, 3281).
+-define(wxStyledTextCtrl_SearchPrev, 3282).
+-define(wxStyledTextCtrl_LinesOnScreen, 3283).
+-define(wxStyledTextCtrl_UsePopUp, 3284).
+-define(wxStyledTextCtrl_SelectionIsRectangle, 3285).
+-define(wxStyledTextCtrl_SetZoom, 3286).
+-define(wxStyledTextCtrl_GetZoom, 3287).
+-define(wxStyledTextCtrl_GetModEventMask, 3288).
+-define(wxStyledTextCtrl_SetSTCFocus, 3289).
+-define(wxStyledTextCtrl_GetSTCFocus, 3290).
+-define(wxStyledTextCtrl_SetStatus, 3291).
+-define(wxStyledTextCtrl_GetStatus, 3292).
+-define(wxStyledTextCtrl_SetMouseDownCaptures, 3293).
+-define(wxStyledTextCtrl_GetMouseDownCaptures, 3294).
+-define(wxStyledTextCtrl_SetSTCCursor, 3295).
+-define(wxStyledTextCtrl_GetSTCCursor, 3296).
+-define(wxStyledTextCtrl_SetControlCharSymbol, 3297).
+-define(wxStyledTextCtrl_GetControlCharSymbol, 3298).
+-define(wxStyledTextCtrl_WordPartLeft, 3299).
+-define(wxStyledTextCtrl_WordPartLeftExtend, 3300).
+-define(wxStyledTextCtrl_WordPartRight, 3301).
+-define(wxStyledTextCtrl_WordPartRightExtend, 3302).
+-define(wxStyledTextCtrl_SetVisiblePolicy, 3303).
+-define(wxStyledTextCtrl_DelLineLeft, 3304).
+-define(wxStyledTextCtrl_DelLineRight, 3305).
+-define(wxStyledTextCtrl_GetXOffset, 3306).
+-define(wxStyledTextCtrl_ChooseCaretX, 3307).
+-define(wxStyledTextCtrl_SetXCaretPolicy, 3308).
+-define(wxStyledTextCtrl_SetYCaretPolicy, 3309).
+-define(wxStyledTextCtrl_GetPrintWrapMode, 3310).
+-define(wxStyledTextCtrl_SetHotspotActiveForeground, 3311).
+-define(wxStyledTextCtrl_SetHotspotActiveBackground, 3312).
+-define(wxStyledTextCtrl_SetHotspotActiveUnderline, 3313).
+-define(wxStyledTextCtrl_SetHotspotSingleLine, 3314).
+-define(wxStyledTextCtrl_ParaDownExtend, 3315).
+-define(wxStyledTextCtrl_ParaUp, 3316).
+-define(wxStyledTextCtrl_ParaUpExtend, 3317).
+-define(wxStyledTextCtrl_PositionBefore, 3318).
+-define(wxStyledTextCtrl_PositionAfter, 3319).
+-define(wxStyledTextCtrl_CopyRange, 3320).
+-define(wxStyledTextCtrl_CopyText, 3321).
+-define(wxStyledTextCtrl_SetSelectionMode, 3322).
+-define(wxStyledTextCtrl_GetSelectionMode, 3323).
+-define(wxStyledTextCtrl_LineDownRectExtend, 3324).
+-define(wxStyledTextCtrl_LineUpRectExtend, 3325).
+-define(wxStyledTextCtrl_CharLeftRectExtend, 3326).
+-define(wxStyledTextCtrl_CharRightRectExtend, 3327).
+-define(wxStyledTextCtrl_HomeRectExtend, 3328).
+-define(wxStyledTextCtrl_VCHomeRectExtend, 3329).
+-define(wxStyledTextCtrl_LineEndRectExtend, 3330).
+-define(wxStyledTextCtrl_PageUpRectExtend, 3331).
+-define(wxStyledTextCtrl_PageDownRectExtend, 3332).
+-define(wxStyledTextCtrl_StutteredPageUp, 3333).
+-define(wxStyledTextCtrl_StutteredPageUpExtend, 3334).
+-define(wxStyledTextCtrl_StutteredPageDown, 3335).
+-define(wxStyledTextCtrl_StutteredPageDownExtend, 3336).
+-define(wxStyledTextCtrl_WordLeftEnd, 3337).
+-define(wxStyledTextCtrl_WordLeftEndExtend, 3338).
+-define(wxStyledTextCtrl_WordRightEnd, 3339).
+-define(wxStyledTextCtrl_WordRightEndExtend, 3340).
+-define(wxStyledTextCtrl_SetWhitespaceChars, 3341).
+-define(wxStyledTextCtrl_SetCharsDefault, 3342).
+-define(wxStyledTextCtrl_AutoCompGetCurrent, 3343).
+-define(wxStyledTextCtrl_Allocate, 3344).
+-define(wxStyledTextCtrl_FindColumn, 3345).
+-define(wxStyledTextCtrl_GetCaretSticky, 3346).
+-define(wxStyledTextCtrl_SetCaretSticky, 3347).
+-define(wxStyledTextCtrl_ToggleCaretSticky, 3348).
+-define(wxStyledTextCtrl_SetPasteConvertEndings, 3349).
+-define(wxStyledTextCtrl_GetPasteConvertEndings, 3350).
+-define(wxStyledTextCtrl_SelectionDuplicate, 3351).
+-define(wxStyledTextCtrl_SetCaretLineBackAlpha, 3352).
+-define(wxStyledTextCtrl_GetCaretLineBackAlpha, 3353).
+-define(wxStyledTextCtrl_StartRecord, 3354).
+-define(wxStyledTextCtrl_StopRecord, 3355).
+-define(wxStyledTextCtrl_SetLexer, 3356).
+-define(wxStyledTextCtrl_GetLexer, 3357).
+-define(wxStyledTextCtrl_Colourise, 3358).
+-define(wxStyledTextCtrl_SetProperty, 3359).
+-define(wxStyledTextCtrl_SetKeyWords, 3360).
+-define(wxStyledTextCtrl_SetLexerLanguage, 3361).
+-define(wxStyledTextCtrl_GetProperty, 3362).
+-define(wxStyledTextCtrl_GetStyleBitsNeeded, 3363).
+-define(wxStyledTextCtrl_GetCurrentLine, 3364).
+-define(wxStyledTextCtrl_StyleSetSpec, 3365).
+-define(wxStyledTextCtrl_StyleSetFont, 3366).
+-define(wxStyledTextCtrl_StyleSetFontAttr, 3367).
+-define(wxStyledTextCtrl_StyleSetCharacterSet, 3368).
+-define(wxStyledTextCtrl_StyleSetFontEncoding, 3369).
+-define(wxStyledTextCtrl_CmdKeyExecute, 3370).
+-define(wxStyledTextCtrl_SetMargins, 3371).
+-define(wxStyledTextCtrl_GetSelection, 3372).
+-define(wxStyledTextCtrl_PointFromPosition, 3373).
+-define(wxStyledTextCtrl_ScrollToLine, 3374).
+-define(wxStyledTextCtrl_ScrollToColumn, 3375).
+-define(wxStyledTextCtrl_SetVScrollBar, 3376).
+-define(wxStyledTextCtrl_SetHScrollBar, 3377).
+-define(wxStyledTextCtrl_GetLastKeydownProcessed, 3378).
+-define(wxStyledTextCtrl_SetLastKeydownProcessed, 3379).
+-define(wxStyledTextCtrl_SaveFile, 3380).
+-define(wxStyledTextCtrl_LoadFile, 3381).
+-define(wxStyledTextCtrl_DoDragOver, 3382).
+-define(wxStyledTextCtrl_DoDropText, 3383).
+-define(wxStyledTextCtrl_GetUseAntiAliasing, 3384).
+-define(wxStyledTextCtrl_AddTextRaw, 3385).
+-define(wxStyledTextCtrl_InsertTextRaw, 3386).
+-define(wxStyledTextCtrl_GetCurLineRaw, 3387).
+-define(wxStyledTextCtrl_GetLineRaw, 3388).
+-define(wxStyledTextCtrl_GetSelectedTextRaw, 3389).
+-define(wxStyledTextCtrl_GetTextRangeRaw, 3390).
+-define(wxStyledTextCtrl_SetTextRaw, 3391).
+-define(wxStyledTextCtrl_GetTextRaw, 3392).
+-define(wxStyledTextCtrl_AppendTextRaw, 3393).
+-define(wxArtProvider_GetBitmap, 3394).
+-define(wxArtProvider_GetIcon, 3395).
+-define(wxTreeEvent_GetKeyCode, 3396).
+-define(wxTreeEvent_GetItem, 3397).
+-define(wxTreeEvent_GetKeyEvent, 3398).
+-define(wxTreeEvent_GetLabel, 3399).
+-define(wxTreeEvent_GetOldItem, 3400).
+-define(wxTreeEvent_GetPoint, 3401).
+-define(wxTreeEvent_IsEditCancelled, 3402).
+-define(wxTreeEvent_SetToolTip, 3403).
+-define(wxNotebookEvent_GetOldSelection, 3404).
+-define(wxNotebookEvent_GetSelection, 3405).
+-define(wxNotebookEvent_SetOldSelection, 3406).
+-define(wxNotebookEvent_SetSelection, 3407).
+-define(wxFileDataObject_new, 3408).
+-define(wxFileDataObject_AddFile, 3409).
+-define(wxFileDataObject_GetFilenames, 3410).
+-define(wxFileDataObject_destroy, 3411).
+-define(wxTextDataObject_new, 3412).
+-define(wxTextDataObject_GetTextLength, 3413).
+-define(wxTextDataObject_GetText, 3414).
+-define(wxTextDataObject_SetText, 3415).
+-define(wxTextDataObject_destroy, 3416).
+-define(wxBitmapDataObject_new_1_1, 3417).
+-define(wxBitmapDataObject_new_1_0, 3418).
+-define(wxBitmapDataObject_GetBitmap, 3419).
+-define(wxBitmapDataObject_SetBitmap, 3420).
+-define(wxBitmapDataObject_destroy, 3421).
+-define(wxClipboard_new, 3423).
+-define(wxClipboard_destruct, 3424).
+-define(wxClipboard_AddData, 3425).
+-define(wxClipboard_Clear, 3426).
+-define(wxClipboard_Close, 3427).
+-define(wxClipboard_Flush, 3428).
+-define(wxClipboard_GetData, 3429).
+-define(wxClipboard_IsOpened, 3430).
+-define(wxClipboard_Open, 3431).
+-define(wxClipboard_SetData, 3432).
+-define(wxClipboard_UsePrimarySelection, 3434).
+-define(wxClipboard_IsSupported, 3435).
+-define(wxClipboard_Get, 3436).
+-define(wxSpinEvent_GetPosition, 3437).
+-define(wxSpinEvent_SetPosition, 3438).
+-define(wxSplitterWindow_new_0, 3439).
+-define(wxSplitterWindow_new_2, 3440).
+-define(wxSplitterWindow_destruct, 3441).
+-define(wxSplitterWindow_Create, 3442).
+-define(wxSplitterWindow_GetMinimumPaneSize, 3443).
+-define(wxSplitterWindow_GetSashGravity, 3444).
+-define(wxSplitterWindow_GetSashPosition, 3445).
+-define(wxSplitterWindow_GetSplitMode, 3446).
+-define(wxSplitterWindow_GetWindow1, 3447).
+-define(wxSplitterWindow_GetWindow2, 3448).
+-define(wxSplitterWindow_Initialize, 3449).
+-define(wxSplitterWindow_IsSplit, 3450).
+-define(wxSplitterWindow_ReplaceWindow, 3451).
+-define(wxSplitterWindow_SetSashGravity, 3452).
+-define(wxSplitterWindow_SetSashPosition, 3453).
+-define(wxSplitterWindow_SetSashSize, 3454).
+-define(wxSplitterWindow_SetMinimumPaneSize, 3455).
+-define(wxSplitterWindow_SetSplitMode, 3456).
+-define(wxSplitterWindow_SplitHorizontally, 3457).
+-define(wxSplitterWindow_SplitVertically, 3458).
+-define(wxSplitterWindow_Unsplit, 3459).
+-define(wxSplitterWindow_UpdateSize, 3460).
+-define(wxSplitterEvent_GetSashPosition, 3461).
+-define(wxSplitterEvent_GetX, 3462).
+-define(wxSplitterEvent_GetY, 3463).
+-define(wxSplitterEvent_GetWindowBeingRemoved, 3464).
+-define(wxSplitterEvent_SetSashPosition, 3465).
+-define(wxHtmlWindow_new_0, 3466).
+-define(wxHtmlWindow_new_2, 3467).
+-define(wxHtmlWindow_AppendToPage, 3468).
+-define(wxHtmlWindow_GetOpenedAnchor, 3469).
+-define(wxHtmlWindow_GetOpenedPage, 3470).
+-define(wxHtmlWindow_GetOpenedPageTitle, 3471).
+-define(wxHtmlWindow_GetRelatedFrame, 3472).
+-define(wxHtmlWindow_HistoryBack, 3473).
+-define(wxHtmlWindow_HistoryCanBack, 3474).
+-define(wxHtmlWindow_HistoryCanForward, 3475).
+-define(wxHtmlWindow_HistoryClear, 3476).
+-define(wxHtmlWindow_HistoryForward, 3477).
+-define(wxHtmlWindow_LoadFile, 3478).
+-define(wxHtmlWindow_LoadPage, 3479).
+-define(wxHtmlWindow_SelectAll, 3480).
+-define(wxHtmlWindow_SelectionToText, 3481).
+-define(wxHtmlWindow_SelectLine, 3482).
+-define(wxHtmlWindow_SelectWord, 3483).
+-define(wxHtmlWindow_SetBorders, 3484).
+-define(wxHtmlWindow_SetFonts, 3485).
+-define(wxHtmlWindow_SetPage, 3486).
+-define(wxHtmlWindow_SetRelatedFrame, 3487).
+-define(wxHtmlWindow_SetRelatedStatusBar, 3488).
+-define(wxHtmlWindow_ToText, 3489).
+-define(wxHtmlWindow_destroy, 3490).
+-define(wxHtmlLinkEvent_GetLinkInfo, 3491).
+-define(wxSystemSettings_GetColour, 3492).
+-define(wxSystemSettings_GetFont, 3493).
+-define(wxSystemSettings_GetMetric, 3494).
+-define(wxSystemSettings_GetScreenType, 3495).
+-define(wxSystemOptions_GetOption, 3496).
+-define(wxSystemOptions_GetOptionInt, 3497).
+-define(wxSystemOptions_HasOption, 3498).
+-define(wxSystemOptions_IsFalse, 3499).
+-define(wxSystemOptions_SetOption_2_1, 3500).
+-define(wxSystemOptions_SetOption_2_0, 3501).
+-define(wxAuiNotebookEvent_SetSelection, 3502).
+-define(wxAuiNotebookEvent_GetSelection, 3503).
+-define(wxAuiNotebookEvent_SetOldSelection, 3504).
+-define(wxAuiNotebookEvent_GetOldSelection, 3505).
+-define(wxAuiNotebookEvent_SetDragSource, 3506).
+-define(wxAuiNotebookEvent_GetDragSource, 3507).
+-define(wxAuiManagerEvent_SetManager, 3508).
+-define(wxAuiManagerEvent_GetManager, 3509).
+-define(wxAuiManagerEvent_SetPane, 3510).
+-define(wxAuiManagerEvent_GetPane, 3511).
+-define(wxAuiManagerEvent_SetButton, 3512).
+-define(wxAuiManagerEvent_GetButton, 3513).
+-define(wxAuiManagerEvent_SetDC, 3514).
+-define(wxAuiManagerEvent_GetDC, 3515).
+-define(wxAuiManagerEvent_Veto, 3516).
+-define(wxAuiManagerEvent_GetVeto, 3517).
+-define(wxAuiManagerEvent_SetCanVeto, 3518).
+-define(wxAuiManagerEvent_CanVeto, 3519).
+-define(wxLogNull_new, 3520).
+-define(wxLogNull_destroy, 3521).
+-define(wxTaskBarIcon_new, 3522).
+-define(wxTaskBarIcon_destruct, 3523).
+-define(wxTaskBarIcon_PopupMenu, 3524).
+-define(wxTaskBarIcon_RemoveIcon, 3525).
+-define(wxTaskBarIcon_SetIcon, 3526).
+-define(wxLocale_new_0, 3527).
+-define(wxLocale_new_2, 3529).
+-define(wxLocale_destruct, 3530).
+-define(wxLocale_Init, 3532).
+-define(wxLocale_AddCatalog_1, 3533).
+-define(wxLocale_AddCatalog_3, 3534).
+-define(wxLocale_AddCatalogLookupPathPrefix, 3535).
+-define(wxLocale_GetCanonicalName, 3536).
+-define(wxLocale_GetLanguage, 3537).
+-define(wxLocale_GetLanguageName, 3538).
+-define(wxLocale_GetLocale, 3539).
+-define(wxLocale_GetName, 3540).
+-define(wxLocale_GetString_2, 3541).
+-define(wxLocale_GetString_4, 3542).
+-define(wxLocale_GetHeaderValue, 3543).
+-define(wxLocale_GetSysName, 3544).
+-define(wxLocale_GetSystemEncoding, 3545).
+-define(wxLocale_GetSystemEncodingName, 3546).
+-define(wxLocale_GetSystemLanguage, 3547).
+-define(wxLocale_IsLoaded, 3548).
+-define(wxLocale_IsOk, 3549).
diff --git a/lib/wx/src/wx.app.src b/lib/wx/src/wx.app.src
index e13982b0c1..d5ac478f20 100644
--- a/lib/wx/src/wx.app.src
+++ b/lib/wx/src/wx.app.src
@@ -33,5 +33,6 @@
]},
{registered, []},
{applications, [stdlib, kernel]},
- {env, []}
+ {env, []},
+ {runtime_dependencies, ["stdlib-2.0","kernel-3.0","erts-6.0"]}
]}.
diff --git a/lib/wx/src/wx.appup.src b/lib/wx/src/wx.appup.src
index 1102af612e..311c0c0f52 100644
--- a/lib/wx/src/wx.appup.src
+++ b/lib/wx/src/wx.appup.src
@@ -1,8 +1,7 @@
-%% This is an -*- erlang -*- file.
-%%
+%% -*- erlang -*-
%% %CopyrightBegin%
%%
-%% Copyright Ericsson AB 2010-2011. All Rights Reserved.
+%% Copyright Ericsson AB 2010-2014. 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
@@ -16,8 +15,7 @@
%% under the License.
%%
%% %CopyrightEnd%
-
{"%VSN%",
- [ ],
- [ ]
+ [{<<".*">>,[{restart_application, wx}]}],
+ [{<<".*">>,[{restart_application, wx}]}]
}.
diff --git a/lib/wx/src/wxe.hrl b/lib/wx/src/wxe.hrl
index bd34b13385..66ec9ac45e 100644
--- a/lib/wx/src/wxe.hrl
+++ b/lib/wx/src/wxe.hrl
@@ -29,6 +29,11 @@
-record(wx_mem, {bin, size}).
+-record(evh, {et=null,id=-1,lastId=-1,cb=0,
+ skip=undefined,userdata=[], % temp
+ handler=undefined % added after connect
+ }).
+
-define(CLASS(Type,Class), ((Type) =:= Class) orelse (Type):parent_class(Class)).
-define(CLASS_T(Type,Class),
diff --git a/lib/wx/src/wxe_master.erl b/lib/wx/src/wxe_master.erl
index b98a7c793e..4b8a8f5720 100644
--- a/lib/wx/src/wxe_master.erl
+++ b/lib/wx/src/wxe_master.erl
@@ -28,7 +28,7 @@
-behaviour(gen_server).
%% API
--export([start/1, init_port/1, init_opengl/0]).
+-export([start/1, init_port/1, init_opengl/0, fetch_msgs/0]).
%% gen_server callbacks
-export([init/1, handle_call/3, handle_cast/2, handle_info/2,
@@ -36,7 +36,9 @@
-record(state, {cb_port, %% Callback port and to erlang messages goes via it.
users, %% List of wx servers, needed ??
- driver}). %% Driver name so wx_server can create it's own port
+ driver, %% Driver name so wx_server can create it's own port
+ msgs=[] %% Early messages (such as openfiles on OSX)
+ }).
-include("wxe.hrl").
-include("gen/wxe_debug.hrl").
@@ -76,12 +78,18 @@ init_port(SilentStart) ->
%%--------------------------------------------------------------------
-%% Initlizes the opengl library
+%% Initalizes the opengl library
%%--------------------------------------------------------------------
init_opengl() ->
GLLib = wxe_util:wxgl_dl(),
wxe_util:call(?WXE_INIT_OPENGL, <<(list_to_binary(GLLib))/binary, 0:8>>).
+%%--------------------------------------------------------------------
+%% Fetch early messages, hack to get start up args on mac
+%%--------------------------------------------------------------------
+fetch_msgs() ->
+ gen_server:call(?MODULE, fetch_msgs, infinity).
+
%%====================================================================
%% gen_server callbacks
%%====================================================================
@@ -152,6 +160,8 @@ init([SilentStart]) ->
%%--------------------------------------------------------------------
handle_call(init_port, From, State=#state{driver=Driver,cb_port=CBPort, users=Users}) ->
{reply, {Driver,CBPort}, State#state{users=gb_sets:add(From,Users)}};
+handle_call(fetch_msgs, _From, State=#state{msgs=Msgs}) ->
+ {reply, lists:reverse(Msgs), State#state{msgs=[]}};
handle_call(_Request, _From, State) ->
%%io:format("Unknown request ~p sent to ~p from ~p ~n",[_Request, ?MODULE, _From]),
Reply = ok,
@@ -182,6 +192,8 @@ handle_info({wxe_driver, internal_error, Msg}, State) ->
handle_info({wxe_driver, debug, Msg}, State) ->
io:format("WX DBG: ~s~n", [Msg]),
{noreply, State};
+handle_info({wxe_driver, open_file, File}, State=#state{msgs=Msgs}) ->
+ {noreply, State#state{msgs=[File|Msgs]}};
handle_info(_Info, State) ->
io:format("Unknown message ~p sent to ~p~n",[_Info, ?MODULE]),
{noreply, State}.
diff --git a/lib/wx/src/wxe_server.erl b/lib/wx/src/wxe_server.erl
index 04e0d0faf4..465b9da2e0 100644
--- a/lib/wx/src/wxe_server.erl
+++ b/lib/wx/src/wxe_server.erl
@@ -1,7 +1,7 @@
%%
%% %CopyrightBegin%
%%
-%% Copyright Ericsson AB 2008-2013. All Rights Reserved.
+%% Copyright Ericsson AB 2008-2014. 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
@@ -36,8 +36,8 @@
terminate/2, code_change/3]).
-record(state, {port,cb_port,users,cleaners=[],cb,cb_cnt}).
--record(user, {events=[], evt_handler}).
--record(event, {object, callback, cb_handler}).
+-record(user, {events=[]}).
+%%-record(event, {object, callback, cb_handler}).
-define(APPLICATION, wxe).
-define(log(S,A), log(?MODULE,?LINE,S,A)).
@@ -119,7 +119,7 @@ handle_call(stop,{_From,_},State = #state{users=Users0, cleaners=Cs0}) ->
Env = get(?WXE_IDENTIFIER),
Users = gb_trees:to_list(Users0),
Cs = lists:map(fun({_Pid,User}) ->
- spawn_link(fun() -> cleanup(Env,[User], false) end)
+ spawn_link(fun() -> cleanup(Env,[User]) end)
end, Users),
{noreply, State#state{users=gb_trees:empty(), cleaners=Cs ++ Cs0}};
@@ -178,13 +178,13 @@ handle_info({'DOWN',_,process,Pid,_}, State=#state{users=Users0,cleaners=Cs}) ->
Users = gb_trees:delete(Pid,Users0),
Env = wx:get_env(),
case User of
- #user{events=[], evt_handler=undefined} -> %% No need to spawn
+ #user{events=[]} -> %% No need to spawn
case Cs =:= [] andalso gb_trees:is_empty(Users) of
- true -> {stop, normal, State#state{cleaners=Cs}};
- false -> {noreply, State#state{users=Users,cleaners=Cs}}
+ true -> {stop, normal, State#state{users=Users}};
+ false -> {noreply, State#state{users=Users}}
end;
_ ->
- Cleaner = spawn_link(fun() -> cleanup(Env,[User],true) end),
+ Cleaner = spawn_link(fun() -> cleanup(Env,[User]) end),
{noreply, State#state{users=Users,cleaners=[Cleaner|Cs]}}
end
catch _E:_R ->
@@ -192,17 +192,6 @@ handle_info({'DOWN',_,process,Pid,_}, State=#state{users=Users0,cleaners=Cs}) ->
{noreply, State}
end;
-handle_info(Msg = {'_wxe_destroy_', Pid}, State)
- when is_pid(Pid) ->
- case erlang:is_process_alive(Pid) of
- true ->
- Pid ! Msg,
- ok;
- false ->
- ok
- end,
- {noreply, State};
-
handle_info(_Info, State) ->
?log("Unknown message ~p sent to ~p~n",[_Info, ?MODULE]),
{noreply, State}.
@@ -222,36 +211,26 @@ code_change(_OldVsn, State, _Extra) ->
log(Mod,Line,Str,Args) ->
error_logger:format("~p:~p: " ++ Str, [Mod,Line|Args]).
-handle_connect(Object, EvData, From, State0 = #state{users=Users}) ->
- User0 = #user{events=Evs0,evt_handler=Handler0} = gb_trees:get(From, Users),
- Callback = wxEvtHandler:get_callback(EvData),
- case Handler0 of
- #wx_ref{} when Callback =:= 0 ->
- CBHandler = Handler0,
- Handler = Handler0;
- undefined when Callback =:= 0 ->
- Handler = new_evt_listener(State0, From),
- CBHandler = Handler;
- _ ->
- CBHandler = new_evt_listener(State0, From),
- Handler = Handler0
- end,
- Evs = [#event{object=Object,callback=Callback, cb_handler=CBHandler}|Evs0],
- User = User0#user{events=Evs, evt_handler=Handler},
- State1 = State0#state{users=gb_trees:update(From, User, Users)},
- if is_function(Callback) orelse is_pid(Callback) ->
- {FunId, State} = attach_fun(Callback,State1),
- Res = wxEvtHandler:connect_impl(CBHandler,Object,
- wxEvtHandler:replace_fun_with_id(EvData,FunId)),
- case Res of
- ok -> {reply,Res,State};
- _Error -> {reply,Res,State0}
- end;
-
- true ->
- Res = {call_impl, connect_cb, CBHandler},
- {reply, Res, State1}
- end.
+handle_connect(Object, #evh{handler=undefined, cb=Callback} = EvData0,
+ From, State0) ->
+ %% Callback let this process listen to the events
+ {FunId, State} = attach_fun(Callback,State0),
+ EvData1 = EvData0#evh{cb=FunId},
+ case wxEvtHandler:connect_impl(Object,EvData1) of
+ {ok, Handler} ->
+ EvData = EvData1#evh{handler=Handler,userdata=undefined},
+ handle_connect(Object, EvData, From, State);
+ Error ->
+ {reply, Error, State0}
+ end;
+handle_connect(Object, EvData=#evh{handler=Handler},
+ From, State0 = #state{users=Users}) ->
+ %% Correct process is already listening just register it
+ put(Handler, From),
+ User0 = #user{events=Listeners0} = gb_trees:get(From, Users),
+ User = User0#user{events=[{Object,EvData}|Listeners0]},
+ State = State0#state{users=gb_trees:update(From, User, Users)},
+ {reply, ok, State}.
invoke_cb({{Ev=#wx{}, Ref=#wx_ref{}}, FunId,_}, _S) ->
%% Event callbacks
@@ -329,20 +308,6 @@ get_wx_object_state(Pid) ->
_ -> ignore
end.
-new_evt_listener(State, Owner) ->
- #wx_env{port=Port} = wx:get_env(),
- _ = erlang:port_control(Port,98,<<>>),
- Listener = get_result(State),
- put(Listener, Owner),
- Listener.
-
-get_result(_State) ->
- receive
- {'_wxe_result_', Res} -> Res;
- {'_wxe_error_', Op, Error} ->
- erlang:error({Error, {wxEvtHandler, {internal_installer, Op}}})
- end.
-
attach_fun(Fun, S = #state{cb=CB,cb_cnt=Next}) ->
case gb_trees:lookup(Fun,CB) of
{value, ID} ->
@@ -367,90 +332,72 @@ delete_fun(FunId, State = #state{cb=CB}) ->
State
end.
-cleanup_evt_listener(U=#user{events=Evs0,evt_handler=Handler}, EvtListener, Object) ->
- {Evs, Del} = lists:foldl(fun(#event{object=Obj,cb_handler=CBH}, {Acc, Delete})
- when CBH =:= EvtListener, Obj =:= Object ->
- {Acc, Delete};
- (Event = #event{cb_handler=CBH}, {Acc, _Delete})
- when CBH =:= EvtListener ->
- {[Event|Acc], false};
- (Event, {Acc, Delete}) ->
- {[Event|Acc], Delete}
- end, {[], true}, Evs0),
- Del andalso wxEvtHandler:destroy_evt_listener(EvtListener),
- case Del andalso Handler =:= EvtListener of
- true ->
- U#user{events=Evs, evt_handler=undefined};
- false ->
- U#user{events=Evs}
- end.
+cleanup_evt_listener(U=#user{events=Evs0}, EvtListener, Object) ->
+ Filter = fun({Obj,#evh{handler=Evl}}) ->
+ not (Object =:= Obj andalso Evl =:= EvtListener)
+ end,
+ U#user{events=lists:filter(Filter, Evs0)}.
-handle_disconnect(Object, Evh, From, State0 = #state{users=Users0}) ->
+handle_disconnect(Object, Evh = #evh{cb=Fun}, From,
+ State0 = #state{users=Users0, cb=Callbacks}) ->
#user{events=Evs0} = gb_trees:get(From, Users0),
- Fun = wxEvtHandler:get_callback(Evh),
- case find_handler(Evs0, Object, Fun) of
- [] -> {reply, false, State0};
+ FunId = gb_trees:lookup(Fun, Callbacks),
+ case find_handler(Evs0, Object, Evh#evh{cb=FunId}) of
+ [] ->
+ {reply, false, State0};
Handlers ->
- case disconnect(Object,Evh, Handlers) of
- #event{} ->
- {reply, true, State0};
- Result ->
- {reply, Result, State0}
+ case disconnect(Object,Handlers) of
+ #evh{} -> {reply, true, State0};
+ Result -> {reply, Result, State0}
end
end.
-disconnect(Object,Evh,[Ev=#event{cb_handler=Handler}|Evs]) ->
- try wxEvtHandler:disconnect_impl(Handler,Object,Evh) of
+disconnect(Object,[Ev|Evs]) ->
+ try wxEvtHandler:disconnect_impl(Object,Ev) of
true -> Ev;
- false -> disconnect(Object, Evh, Evs);
+ false -> disconnect(Object, Evs);
Error -> Error
catch _:_ ->
false
end;
-disconnect(_, _, []) -> false.
-
-find_handler(Evs, Object, Fun) ->
- find_handler(Evs, Object, Fun, []).
-
-find_handler([Ev =#event{object=Object,callback=FunReg}|Evs],Object,Search,Acc) ->
- case FunReg =:= Search of
- true -> find_handler(Evs,Object,Search,[Ev|Acc]);
- false when is_function(FunReg), Search =:= 0 ->
- find_handler(Evs,Object,Search,[Ev|Acc]);
- _ ->
- find_handler(Evs,Object,Search,Acc)
+disconnect(_, []) -> false.
+
+find_handler([{Object,Evh}|Evs], Object, Match) ->
+ case match_handler(Match, Evh) of
+ false -> find_handler(Evs, Object, Match);
+ Res -> [Res|find_handler(Evs,Object,Match)]
end;
-find_handler([_|Evs],Object,Fun,Res) ->
- find_handler(Evs,Object,Fun,Res);
-find_handler([],_Object,_Fun,Res) ->
- Res.
+find_handler([_|Evs], Object, Match) ->
+ find_handler(Evs, Object, Match);
+find_handler([], _, _) -> [].
+
+match_handler(M=#evh{et=MET, cb=MCB},
+ #evh{et=ET, cb=CB, handler=Handler}) ->
+ %% Let wxWidgets handle the id matching
+ Match = match_et(MET, ET)
+ andalso match_cb(MCB, CB),
+ Match andalso M#evh{handler=Handler}.
+match_et(null, _) -> true;
+match_et(Met, Et) -> Met =:= Et.
+
+match_cb(none, _) -> true;
+match_cb({value,MId}, Id) -> MId =:= Id.
%% Cleanup
%% The server handles callbacks from driver so every other wx call must
%% be called from another process, therefore the cleaning must be spawned.
%%
-%% Using Disconnect when we terminate can crash, it is timing releated
-%% but it seems that disconnect on windows that are being deleted are bad.
-%% Since we are terminating the data will be cleaned up anyway.
-cleanup(Env, Data, Disconnect) ->
+cleanup(Env, Data) ->
put(?WXE_IDENTIFIER, Env),
- lists:foreach(fun(User) -> cleanup(User, Disconnect) end, Data),
+ Disconnect = fun({Object, Ev}) ->
+ try wxEvtHandler:disconnect_impl(Object,Ev)
+ catch _:_ -> ok
+ end
+ end,
+
+ lists:foreach(fun(#user{events=Evs}) ->
+ [Disconnect(Ev) || Ev <- Evs]
+ end, Data),
gen_server:cast(Env#wx_env.sv, {cleaned, self()}),
normal.
-
-cleanup(#user{events=Evs, evt_handler=Handler}, Disconnect) ->
- lists:foreach(fun(#event{object=O, callback=CB, cb_handler=CbH}) ->
- Disconnect andalso (catch wxEvtHandler:disconnect_impl(CbH,O)),
- case is_function(CB) of
- true ->
- wxEvtHandler:destroy_evt_listener(CbH);
- false ->
- ignore
- end
- end, Evs),
- case Handler of
- undefined -> ignore;
- _ -> wxEvtHandler:destroy_evt_listener(Handler)
- end,
- ok.
diff --git a/lib/wx/src/wxe_util.erl b/lib/wx/src/wxe_util.erl
index a31c3e30b8..02ac4ddfa6 100644
--- a/lib/wx/src/wxe_util.erl
+++ b/lib/wx/src/wxe_util.erl
@@ -74,7 +74,7 @@ call(Op, Args) ->
true ->
debug_call(Dbg band 15, Op, Args, Port)
end.
-
+
rec(Op) ->
receive
{'_wxe_result_', Res} -> Res;
@@ -108,21 +108,26 @@ send_bin(Bin) when is_binary(Bin) ->
get_cbId(Fun) ->
gen_server:call((wx:get_env())#wx_env.sv,{register_cb, Fun}, infinity).
-connect_cb(Object,EvData) ->
- handle_listener(connect_cb, Object, EvData).
-
-disconnect_cb(Object,EvData) ->
- handle_listener(disconnect_cb, Object, EvData).
-
-handle_listener(Op,Object,EvData) ->
- Listener = gen_server:call((wx:get_env())#wx_env.sv, {Op,Object,EvData}, infinity),
- case Listener of
- {call_impl, connect_cb, EvtList} ->
- wxEvtHandler:connect_impl(EvtList,Object,EvData);
- Res ->
- Res
+connect_cb(Object,EvData0 = #evh{cb=Callback}) ->
+ Server = (wx:get_env())#wx_env.sv,
+ case Callback of
+ 0 -> %% Message api connect from this process
+ case wxEvtHandler:connect_impl(Object,EvData0) of
+ {ok, Listener} ->
+ EvData = EvData0#evh{handler=Listener, userdata=undefined},
+ gen_server:call(Server, {connect_cb,Object,EvData}, infinity);
+ Error ->
+ Error
+ end;
+ _ -> %% callback, fun or pid (pid for wx_object:sync_events masked callbacks)
+ %% let the server do the connect
+ gen_server:call(Server, {connect_cb,Object,EvData0}, infinity)
end.
+disconnect_cb(Object,EvData) ->
+ Server = (wx:get_env())#wx_env.sv,
+ gen_server:call(Server, {disconnect_cb,Object,EvData}, infinity).
+
debug_cast(1, Op, _Args, _Port) ->
check_previous(),
case ets:lookup(wx_debug_info,Op) of
diff --git a/lib/wx/test/wx_app_SUITE.erl b/lib/wx/test/wx_app_SUITE.erl
index 162923eaa3..6331180ece 100644
--- a/lib/wx/test/wx_app_SUITE.erl
+++ b/lib/wx/test/wx_app_SUITE.erl
@@ -26,6 +26,7 @@
-compile(export_all).
-include("wx_test_lib.hrl").
+-include_lib("common_test/include/ct.hrl").
t() -> wx_test_lib:t(?MODULE).
@@ -50,7 +51,7 @@ end_per_testcase(Func,Config) ->
suite() -> [{ct_hooks,[ts_install_cth]}].
all() ->
- [fields, modules, exportall, app_depend, undef_funcs].
+ [fields, modules, exportall, app_depend, undef_funcs, appup].
groups() ->
[].
@@ -281,3 +282,9 @@ key1search(Key, L) ->
{value, {Key, Value}} ->
Value
end.
+
+%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
+
+%% Test that the wx appup file is ok
+appup(Config) when is_list(Config) ->
+ ok = ?t:appup_test(wx).
diff --git a/lib/wx/test/wx_basic_SUITE.erl b/lib/wx/test/wx_basic_SUITE.erl
index df92348b3d..e3bbb21a23 100644
--- a/lib/wx/test/wx_basic_SUITE.erl
+++ b/lib/wx/test/wx_basic_SUITE.erl
@@ -1,7 +1,7 @@
%%
%% %CopyrightBegin%
%%
-%% Copyright Ericsson AB 2008-2013. All Rights Reserved.
+%% Copyright Ericsson AB 2008-2014. 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
@@ -98,8 +98,23 @@ several_apps(Config) ->
Pids = [spawn_link(fun() -> several_apps(Parent, N, Config) end)
|| N <- lists:seq(1,4)],
process_flag(trap_exit,true),
- ?m_multi_receive([{complete,Pid} || Pid <- Pids]),
+ Wait = fun(Pid,Acc) ->
+ receive {complete, Pid} -> Acc
+ after 20000 -> [Pid|Acc]
+ end
+ end,
+ Res = lists:foldl(Wait, [], Pids),
[Pid ! quit || Pid <- Pids],
+
+ Dbg = fun(Pid) ->
+ io:format("Stack ~p~n",[erlang:process_info(Pid, current_stacktrace)]),
+ io:format("Stack ~p~n",[erlang:process_info(Pid)])
+ end,
+ case Res of
+ [] -> ok;
+ Failed ->
+ [Dbg(Pid)|| Pid <- Failed]
+ end,
case wx_test_lib:user_available(Config) of
true ->
receive {'EXIT',_,foo} -> ok end;
@@ -216,7 +231,7 @@ create_menus(Frame) ->
%% Test the wx_misc.erl api functionality.
wx_misc(TestInfo) when is_atom(TestInfo) -> wx_test_lib:tc_info(TestInfo);
-wx_misc(Config) ->
+wx_misc(_Config) ->
wx:new([{debug, trace}]),
put(wx_test_verbose, true),
?m(ok, wx_misc:bell()),
@@ -241,21 +256,6 @@ wx_misc(Config) ->
%% wx:shutdown() %% How do you test this?
- case os:type() of
- {win32, _} -> %% These hangs when running automatic tests
- skip; %% through ssh on windows. Works otherwise
- _ ->
- wx_misc:shell([{command,"echo TESTING close the popup shell"}])
- end,
-
- case wx_test_lib:user_available(Config) of
- true ->
- wx_misc:shell();
- false ->
- %% Don't want to spawn a shell if no user
- skip %% is available
- end,
-
?m(false, wx_misc:isBusy()),
?m(ok, wx_misc:beginBusyCursor([])),
?m(true, wx_misc:isBusy()),
@@ -323,29 +323,40 @@ data_types(_Config) ->
wx_object(TestInfo) when is_atom(TestInfo) -> wx_test_lib:tc_info(TestInfo);
wx_object(Config) ->
wx:new(),
- Frame = ?mt(wxFrame, wx_obj_test:start([])),
+ Me = self(),
+ Init = fun() ->
+ Frame = wxFrame:new(wx:null(), ?wxID_ANY, "Test wx_object", [{size, {500, 400}}]),
+ Sz = wxBoxSizer:new(?wxHORIZONTAL),
+ Panel = wxPanel:new(Frame),
+ wxSizer:add(Sz, Panel, [{flag, ?wxEXPAND}, {proportion, 1}]),
+ wxPanel:connect(Panel, size, [{skip, true}]),
+ wxPanel:connect(Panel, paint, [callback, {userData, Me}]),
+ wxWindow:show(Frame),
+ {Frame, {Frame, Panel}}
+ end,
+ Frame = ?mt(wxFrame, wx_obj_test:start([{init, Init}])),
timer:sleep(500),
?m(ok, check_events(flush())),
Me = self(),
?m({call, foobar, {Me, _}}, wx_object:call(Frame, foobar)),
?m(ok, wx_object:cast(Frame, foobar2)),
- ?m([{cast, foobar2}], flush()),
+ ?m([{cast, foobar2}|_], flush()),
FramePid = wx_object:get_pid(Frame),
io:format("wx_object pid ~p~n",[FramePid]),
FramePid ! foo3,
- ?m([{info, foo3}], flush()),
+ ?m([{info, foo3}|_], flush()),
?m(ok, wx_object:cast(Frame, fun(_) -> hehe end)),
- ?m([{cast, hehe}], flush()),
+ ?m([{cast, hehe}|_], flush()),
wxWindow:refresh(Frame),
- ?m([{sync_event, #wx{event=#wxPaint{}}, _}], flush()),
+ ?m([{sync_event, #wx{event=#wxPaint{}}, _}|_], flush()),
?m(ok, wx_object:cast(Frame, fun(_) -> timer:sleep(200), slept end)),
%% The sleep above should not hinder the Paint event below
%% Which it did in my buggy handling of the sync_callback
wxWindow:refresh(Frame),
- ?m([{sync_event, #wx{event=#wxPaint{}}, _}], flush()),
- ?m([{cast, slept}], flush()),
+ timer:sleep(500),
+ ?m([{sync_event, #wx{event=#wxPaint{}}, _}, {cast, slept}|_], flush()),
Monitor = erlang:monitor(process, FramePid),
case proplists:get_value(user, Config, false) of
@@ -385,7 +396,7 @@ check_events([], Async, Sync) ->
end.
flush() ->
- flush([], 500).
+ flush([], 1500).
flush(Acc, Wait) ->
receive
diff --git a/lib/wx/test/wx_class_SUITE.erl b/lib/wx/test/wx_class_SUITE.erl
index 0e151ccc9b..b375c9d515 100644
--- a/lib/wx/test/wx_class_SUITE.erl
+++ b/lib/wx/test/wx_class_SUITE.erl
@@ -1,7 +1,7 @@
%%
%% %CopyrightBegin%
%%
-%% Copyright Ericsson AB 2008-2013. All Rights Reserved.
+%% Copyright Ericsson AB 2008-2014. 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
@@ -344,21 +344,21 @@ listCtrlSort(Config) ->
Wx = wx:new(),
Frame = wxFrame:new(Wx, ?wxID_ANY, "Frame"),
- LC = wxListCtrl:new(Frame, [{style, ?wxLC_REPORT bor ?wxLC_SORT_ASCENDING}]),
+ LC = wxListCtrl:new(Frame, [{style, ?wxLC_REPORT}]),
%% must be done crashes in wxwidgets otherwise.
wxListCtrl:insertColumn(LC, 0, "Column"),
Add = fun(Int) ->
- wxListCtrl:insertItem(LC, Int, integer_to_list(Int)),
+ wxListCtrl:insertItem(LC, Int, "ABC " ++ integer_to_list(Int)),
%% ItemData Can only be integers currently
- wxListCtrl:setItemData(LC, Int, abs(2500-Int))
+ wxListCtrl:setItemData(LC, Int, abs(50-Int))
end,
- wx:foreach(Add, lists:seq(0,5000)),
+ wx:foreach(Add, lists:seq(0,50)),
wxWindow:show(Frame),
- timer:sleep(200),
+ timer:sleep(2000),
Sort = fun() ->
wxListCtrl:sortItems(LC, fun(A, B) ->
@@ -374,11 +374,12 @@ listCtrlSort(Config) ->
io:format("Sorted ~p ~n",[Time]),
Item = wxListItem:new(),
+ wxListItem:setMask(Item, ?wxLIST_MASK_TEXT),
_List = wx:map(fun(Int) ->
wxListItem:setId(Item, Int),
?m(true, wxListCtrl:getItem(LC, Item)),
- io:format("~s~n",[wxListItem:getText(Item)])
- end, lists:seq(0,100)),
+ io:format("~p: ~s~n",[Int, wxListItem:getText(Item)])
+ end, lists:seq(0,10)),
wxListItem:destroy(Item),
wx_test_lib:wx_destroy(Frame,Config).
diff --git a/lib/wx/test/wx_event_SUITE.erl b/lib/wx/test/wx_event_SUITE.erl
index 6a9f19ad51..076f16ba16 100644
--- a/lib/wx/test/wx_event_SUITE.erl
+++ b/lib/wx/test/wx_event_SUITE.erl
@@ -1,7 +1,7 @@
%%
%% %CopyrightBegin%
%%
-%% Copyright Ericsson AB 2008-2013. All Rights Reserved.
+%% Copyright Ericsson AB 2008-2014. 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
@@ -48,7 +48,7 @@ suite() -> [{ct_hooks,[ts_install_cth]}].
all() ->
[connect, disconnect, connect_msg_20, connect_cb_20,
mouse_on_grid, spin_event, connect_in_callback, recursive,
- char_events, callback_clean
+ dialog, char_events, callback_clean
].
groups() ->
@@ -149,7 +149,7 @@ disconnect(Config) ->
timer:sleep(1000),
wx_test_lib:flush(),
- ?m({'EXIT', {{badarg,_},_}}, wxEvtHandler:disconnect(Panel, non_existing_event_type)),
+ ?m(false, wxEvtHandler:disconnect(Panel, non_existing_event_type)),
?m(true, wxEvtHandler:disconnect(Panel, size)),
?m(ok, wxWindow:setSize(Panel, {200,102})),
timer:sleep(1000),
@@ -402,6 +402,42 @@ recursive(Config) ->
wx_test_lib:wx_destroy(Frame, Config).
+dialog(TestInfo) when is_atom(TestInfo) -> wx_test_lib:tc_info(TestInfo);
+dialog(Config) ->
+ Wx = wx:new(),
+ Frame = wxFrame:new(Wx, ?wxID_ANY, "Testing"),
+ wxFrame:show(Frame),
+ Env = wx:get_env(),
+ Tester = self(),
+ PD = wxProgressDialog:new("Dialog","Testing",
+ [%%{parent, Frame},
+ {maximum,101},
+ {style, ?wxPD_SMOOTH bor ?wxPD_AUTO_HIDE}]),
+ Forward = fun(#wx{event=#wxInitDialog{}}, Ev) ->
+ ?mt(wxInitDialogEvent, Ev),
+ io:format("Heyhoo~n", []),
+ wxEvent:skip(Ev),
+ Tester ! {progress_dialog,PD}
+ end,
+ wxDialog:connect(PD, init_dialog, [{callback, Forward}]),
+ Recurse = fun(Recurse, N) ->
+ true = wxProgressDialog:update(PD, min(N,100)),
+ timer:sleep(5),
+ Recurse(Recurse,N+1)
+ end,
+ Run = fun() ->
+ wx:set_env(Env),
+ Recurse(Recurse, 0)
+ end,
+ Worker = spawn_link(Run),
+ timer:sleep(500),
+ io:format("Got ~p~n", [wx_test_lib:flush()]),
+ unlink(Worker),
+ wxProgressDialog:destroy(PD),
+ wx_test_lib:wx_destroy(Frame, Config).
+
+
+
char_events(TestInfo) when is_atom(TestInfo) -> wx_test_lib:tc_info(TestInfo);
char_events(Config) ->
Wx = wx:new(),
@@ -463,14 +499,14 @@ callback_clean(Config) ->
end
end),
timer:sleep(500), %% Give it time to remove it
- ?m({[{Pid,_,_}],[_],[_]}, white_box_check_event_handlers()),
+ ?m({[{Pid,_}],[_],[_]}, white_box_check_event_handlers()),
Pid ! remove,
timer:sleep(500), %% Give it time to remove it
?m({[],[],[]}, white_box_check_event_handlers()),
SetupEventHandlers(),
- ?m({[{_,_,_}],[_],[_]}, white_box_check_event_handlers()),
+ ?m({[{_,_}],[_],[_]}, white_box_check_event_handlers()),
wxDialog:show(Dlg),
wx_test_lib:wx_close(Dlg, Config),
@@ -484,14 +520,47 @@ callback_clean(Config) ->
%% timer:sleep(infinity),
%% ok.
+
white_box_check_event_handlers() ->
{_,_,Server,_} = wx:get_env(),
{status, _, _, [Env, _, _, _, Data]} = sys:get_status(Server),
[_H, _data, {data, [{_, Record}]}] = Data,
{state, _Port1, _Port2, Users, [], CBs, _Next} = Record,
- {[{Pid, Evs, Listener} ||
- {Pid, {user, Evs, Listener}} <- gb_trees:to_list(Users),
- (Evs =/= [] orelse Listener =/= undefined)], %% Ignore empty
+ {[{Pid, Evs} ||
+ {Pid, {user, Evs}} <- gb_trees:to_list(Users),
+ Evs =/= []], %% Ignore empty
gb_trees:to_list(CBs),
[Funs || Funs = {Id, {Fun,_}} <- Env, is_integer(Id), is_function(Fun)]
}.
+
+handler_clean(TestInfo) when is_atom(TestInfo) ->
+ wx_test_lib:tc_info(TestInfo);
+handler_clean(_Config) ->
+ wx:new(),
+ Init = fun() -> create_window() end,
+ Frame1 = wx_obj_test:start([{init, Init}]),
+ ?mt(wxFrame, Frame1),
+ wxWindow:show(Frame1),
+ ?m([_|_], lists:sort(wx_test_lib:flush())),
+ ?m({stop,_}, wx_obj_test:stop(Frame1, fun(_) -> normal end)),
+ ?m([{terminate,normal}], lists:sort(wx_test_lib:flush())),
+
+ Frame2 = wx_obj_test:start([{init, Init}]),
+ wxWindow:show(Frame2),
+ ?m([_|_], lists:sort(wx_test_lib:flush())),
+ ?m({stop,_}, wx_obj_test:stop(Frame2, fun(_) -> wxWindow:destroy(Frame2), normal end)),
+ ?m([{terminate,normal}], lists:sort(wx_test_lib:flush())),
+ timer:sleep(104),
+ ?m({[],[],[]}, white_box_check_event_handlers()),
+ ?m(ok, wx:destroy()),
+ ok.
+
+create_window() ->
+ Frame = wxFrame:new(wx:null(), ?wxID_ANY, "Test wx_object", [{size, {500, 400}}]),
+ Sz = wxBoxSizer:new(?wxHORIZONTAL),
+ Panel = wxPanel:new(Frame),
+ wxSizer:add(Sz, Panel, [{flag, ?wxEXPAND}, {proportion, 1}]),
+ wxWindow:connect(Frame, show),
+ %% wxPanel:connect(Panel, paint, [callback, {userData, foobar}]),
+ wxWindow:connect(Panel, size, [callback]),
+ {Frame, {Frame, Panel}}.
diff --git a/lib/wx/test/wx_obj_test.erl b/lib/wx/test/wx_obj_test.erl
index b4d7640c7e..f47f2fbc46 100644
--- a/lib/wx/test/wx_obj_test.erl
+++ b/lib/wx/test/wx_obj_test.erl
@@ -1,7 +1,7 @@
%%
%% %CopyrightBegin%
%%
-%% Copyright Ericsson AB 2011. All Rights Reserved.
+%% Copyright Ericsson AB 2011-2013. 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
@@ -18,69 +18,71 @@
-module(wx_obj_test).
-include_lib("wx/include/wx.hrl").
--export([start/1]).
+-export([start/1, stop/2]).
%% wx_object callbacks
-export([init/1, handle_info/2, terminate/2, code_change/3, handle_call/3,
handle_sync_event/3, handle_event/2, handle_cast/2]).
--record(state, {frame, panel, opts}).
+-record(state, {parent, opts, user_state}).
start(Opts) ->
- wx_object:start_link(?MODULE, [{parent, self()}, Opts], []).
+ wx_object:start_link(?MODULE, [{parent, self()}| Opts], []).
+
+stop(Object, Fun) ->
+ wx_object:call(Object, {stop, Fun}).
init(Opts) ->
- put(parent_pid, proplists:get_value(parent, Opts)),
- Frame = wxFrame:new(wx:null(), ?wxID_ANY, "Test wx_object", [{size, {500, 400}}]),
- Sz = wxBoxSizer:new(?wxHORIZONTAL),
- Panel = wxPanel:new(Frame),
- wxSizer:add(Sz, Panel, [{flag, ?wxEXPAND}, {proportion, 1}]),
- wxPanel:connect(Panel, size, [{skip, true}]),
- wxPanel:connect(Panel, paint, [callback, {userData, proplists:get_value(parent, Opts)}]),
- wxWindow:show(Frame),
- {Frame, #state{frame=Frame, panel=Panel, opts=Opts}}.
+ Parent = proplists:get_value(parent, Opts),
+ put(parent_pid, Parent),
+ Init = proplists:get_value(init, Opts),
+ {Obj, UserState} = Init(),
+ {Obj, #state{parent=Parent, opts=Opts, user_state=UserState}}.
-handle_sync_event(Event = #wx{obj=Panel}, WxEvent, #state{opts=Opts}) ->
- DC=wxPaintDC:new(Panel), %% We must create & destroy paintDC, or call wxEvent:skip(WxEvent))
- wxPaintDC:destroy(DC), %% in sync_event. Otherwise wx on windows keeps sending the events.
- Pid = proplists:get_value(parent, Opts),
- true = is_pid(Pid),
- Pid ! {sync_event, Event, WxEvent},
+handle_sync_event(Event = #wx{obj=Panel, event=#wxPaint{}},
+ WxEvent, #state{parent=Parent, user_state=US, opts=Opts}) ->
+ case proplists:get_value(redraw, Opts) of
+ undefined ->
+ DC=wxPaintDC:new(Panel), %% We must create & destroy paintDC, or call wxEvent:skip(WxEvent))
+ wxPaintDC:destroy(DC), %% in sync_event. Otherwise wx on windows keeps sending the events.
+ Parent ! {sync_event, Event, WxEvent};
+ Redraw ->
+ Redraw(Event, WxEvent, US)
+ end,
+ ok;
+handle_sync_event(Event, WxEvent, #state{parent=Parent}) ->
+ Parent ! {sync_event, Event, WxEvent},
ok.
-handle_event(Event, State = #state{opts=Opts}) ->
- Pid = proplists:get_value(parent, Opts),
- Pid ! {event, Event},
+handle_event(Event, State = #state{parent=Parent}) ->
+ Parent ! {event, Event},
{noreply, State}.
-handle_call(What, From, State) when is_function(What) ->
- Result = What(State),
+handle_call(What, From, State = #state{user_state=US}) when is_function(What) ->
+ Result = What(US),
{reply, {call, Result, From}, State};
+handle_call({stop, Fun}, From, State = #state{user_state=US}) ->
+ {stop, Fun(US), {stop, From}, State};
handle_call(What, From, State) ->
{reply, {call, What, From}, State}.
-handle_cast(What, State = #state{opts=Opts}) when is_function(What) ->
- Result = What(State),
- Pid = proplists:get_value(parent, Opts),
+handle_cast(What, State = #state{parent=Pid, user_state=US}) when is_function(What) ->
+ Result = What(US),
Pid ! {cast, Result},
{noreply, State};
-handle_cast(What, State = #state{opts=Opts}) ->
- Pid = proplists:get_value(parent, Opts),
+handle_cast(What, State = #state{parent=Pid}) ->
Pid ! {cast, What},
{noreply, State}.
-handle_info(What, State = #state{opts=Opts}) ->
- Pid = proplists:get_value(parent, Opts),
+handle_info(What, State = #state{parent=Pid}) ->
Pid ! {info, What},
{noreply, State}.
-terminate(What, #state{opts=Opts}) ->
- Pid = proplists:get_value(parent, Opts),
+terminate(What, #state{parent=Pid}) ->
Pid ! {terminate, What},
ok.
-code_change(Ver1, Ver2, State = #state{opts=Opts}) ->
- Pid = proplists:get_value(parent, Opts),
+code_change(Ver1, Ver2, State = #state{parent=Pid}) ->
Pid ! {code_change, Ver1, Ver2},
State.
diff --git a/lib/wx/vsn.mk b/lib/wx/vsn.mk
index 24c62390f4..5523c20440 100644
--- a/lib/wx/vsn.mk
+++ b/lib/wx/vsn.mk
@@ -1 +1 @@
-WX_VSN = 1.1.1
+WX_VSN = 1.2
diff --git a/lib/xmerl/doc/src/notes.xml b/lib/xmerl/doc/src/notes.xml
index 8f51262c81..3fa1f01a79 100644
--- a/lib/xmerl/doc/src/notes.xml
+++ b/lib/xmerl/doc/src/notes.xml
@@ -31,6 +31,64 @@
<p>This document describes the changes made to the Xmerl application.</p>
+<section><title>Xmerl 1.3.7</title>
+
+ <section><title>Fixed Bugs and Malfunctions</title>
+ <list>
+ <item>
+ <p>
+ Application upgrade (appup) files are corrected for the
+ following applications: </p>
+ <p>
+ <c>asn1, common_test, compiler, crypto, debugger,
+ dialyzer, edoc, eldap, erl_docgen, et, eunit, gs, hipe,
+ inets, observer, odbc, os_mon, otp_mibs, parsetools,
+ percept, public_key, reltool, runtime_tools, ssh,
+ syntax_tools, test_server, tools, typer, webtool, wx,
+ xmerl</c></p>
+ <p>
+ A new test utility for testing appup files is added to
+ test_server. This is now used by most applications in
+ OTP.</p>
+ <p>
+ (Thanks to Tobias Schlager)</p>
+ <p>
+ Own Id: OTP-11744</p>
+ </item>
+ </list>
+ </section>
+
+</section>
+
+<section><title>Xmerl 1.3.6</title>
+
+ <section><title>Fixed Bugs and Malfunctions</title>
+ <list>
+ <item>
+ <p> Fixed a problem in the SAX parser when the header of
+ the next document was appearing in the buffer when using
+ xmerl_sax_parser:stream/2 function. </p>
+ <p>
+ Own Id: OTP-11551 Aux Id: seq12505 </p>
+ </item>
+ </list>
+ </section>
+
+
+ <section><title>Improvements and New Features</title>
+ <list>
+ <item>
+ <p> The default encoding of Erlang files has been changed
+ from ISO-8859-1 to UTF-8. </p> <p> The encoding of XML
+ files has also been changed to UTF-8. </p>
+ <p>
+ Own Id: OTP-10907</p>
+ </item>
+ </list>
+ </section>
+
+</section>
+
<section><title>Xmerl 1.3.5</title>
<section><title>Improvements and New Features</title>
diff --git a/lib/xmerl/src/xmerl.app.src b/lib/xmerl/src/xmerl.app.src
index b471447bbd..45cfe9d250 100644
--- a/lib/xmerl/src/xmerl.app.src
+++ b/lib/xmerl/src/xmerl.app.src
@@ -39,5 +39,6 @@
{registered, []},
{env, []},
- {applications, [kernel, stdlib]}
+ {applications, [kernel, stdlib]},
+ {runtime_dependencies, ["stdlib-2.0","kernel-3.0","erts-6.0"]}
]}.
diff --git a/lib/xmerl/src/xmerl.appup.src b/lib/xmerl/src/xmerl.appup.src
index 0d8aa4eb04..0a84966576 100644
--- a/lib/xmerl/src/xmerl.appup.src
+++ b/lib/xmerl/src/xmerl.appup.src
@@ -1,14 +1,21 @@
+%% -*- erlang -*-
+%% %CopyrightBegin%
+%%
+%% Copyright Ericsson AB 2014. 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%
{"%VSN%",
- [
- {"1.1.11",
- [
- ]
- }
- ],
- [
- {"1.1.11",
- [
- ]
- }
- ]
+ [{<<".*">>,[{restart_application, xmerl}]}],
+ [{<<".*">>,[{restart_application, xmerl}]}]
}.
diff --git a/lib/xmerl/src/xmerl_sax_parser.erl b/lib/xmerl/src/xmerl_sax_parser.erl
index 5c006aada2..ad71072d95 100644
--- a/lib/xmerl/src/xmerl_sax_parser.erl
+++ b/lib/xmerl/src/xmerl_sax_parser.erl
@@ -74,7 +74,8 @@ file(Name,Options) ->
CL = filename:absname(Dir),
File = filename:basename(Name),
ContinuationFun = fun default_continuation_cb/1,
- Res = stream(<<>>, [{continuation_fun, ContinuationFun},
+ Res = stream(<<>>,
+ [{continuation_fun, ContinuationFun},
{continuation_state, FD},
{current_location, CL},
{entity, File}
@@ -98,9 +99,13 @@ stream(Xml, Options) when is_list(Xml), is_list(Options) ->
State = parse_options(Options, initial_state()),
case State#xmerl_sax_parser_state.file_type of
dtd ->
- xmerl_sax_parser_list:parse_dtd(Xml, State#xmerl_sax_parser_state{encoding = list});
+ xmerl_sax_parser_list:parse_dtd(Xml,
+ State#xmerl_sax_parser_state{encoding = list,
+ input_type = stream});
normal ->
- xmerl_sax_parser_list:parse(Xml, State#xmerl_sax_parser_state{encoding = list})
+ xmerl_sax_parser_list:parse(Xml,
+ State#xmerl_sax_parser_state{encoding = list,
+ input_type = stream})
end;
stream(Xml, Options) when is_binary(Xml), is_list(Options) ->
case parse_options(Options, initial_state()) of
@@ -124,17 +129,14 @@ stream(Xml, Options) when is_binary(Xml), is_list(Options) ->
[],
State#xmerl_sax_parser_state.event_state};
{Xml1, State1} ->
- parse(Xml1, State1, ParseFunction)
+ parse_binary(Xml1,
+ State1#xmerl_sax_parser_state{input_type = stream},
+ ParseFunction)
end
end.
-
-%%======================================================================
-%% Internal functions
-%%======================================================================
-
%%----------------------------------------------------------------------
-%% Function: parse(Encoding, Xml, State, F) -> Result
+%% Function: parse_binary(Encoding, Xml, State, F) -> Result
%% Input: Encoding = atom()
%% Xml = [integer()] | binary()
%% State = #xmerl_sax_parser_state
@@ -144,15 +146,15 @@ stream(Xml, Options) when is_binary(Xml), is_list(Options) ->
%% EventState = term()
%% Description: Chooses the correct parser depending on the encoding.
%%----------------------------------------------------------------------
-parse(Xml, #xmerl_sax_parser_state{encoding=utf8}=State, F) ->
+parse_binary(Xml, #xmerl_sax_parser_state{encoding=utf8}=State, F) ->
xmerl_sax_parser_utf8:F(Xml, State);
-parse(Xml, #xmerl_sax_parser_state{encoding={utf16,little}}=State, F) ->
+parse_binary(Xml, #xmerl_sax_parser_state{encoding={utf16,little}}=State, F) ->
xmerl_sax_parser_utf16le:F(Xml, State);
-parse(Xml, #xmerl_sax_parser_state{encoding={utf16,big}}=State, F) ->
+parse_binary(Xml, #xmerl_sax_parser_state{encoding={utf16,big}}=State, F) ->
xmerl_sax_parser_utf16be:F(Xml, State);
-parse(Xml, #xmerl_sax_parser_state{encoding=latin1}=State, F) ->
+parse_binary(Xml, #xmerl_sax_parser_state{encoding=latin1}=State, F) ->
xmerl_sax_parser_latin1:F(Xml, State);
-parse(_, #xmerl_sax_parser_state{encoding=Enc}, _) ->
+parse_binary(_, #xmerl_sax_parser_state{encoding=Enc}, _) ->
{error, lists:flatten(io_lib:format("Charcter set ~p not supported", [Enc]))}.
%%----------------------------------------------------------------------
diff --git a/lib/xmerl/src/xmerl_sax_parser.hrl b/lib/xmerl/src/xmerl_sax_parser.hrl
index 736316e069..b433dd6cf9 100644
--- a/lib/xmerl/src/xmerl_sax_parser.hrl
+++ b/lib/xmerl/src/xmerl_sax_parser.hrl
@@ -86,7 +86,15 @@
file_type = normal, % Can be normal, dtd and entity
current_location, % Location of the currently parsed XML entity
entity, % Parsed XML entity
- skip_external_dtd = false % If true the external DTD is skipped during parsing
+ skip_external_dtd = false,% If true the external DTD is skipped during parsing
+ input_type % Source type: file | stream.
+ % This field is a preparation for an fix in R17 of a bug in
+ % the conformance against the standard.
+ % Today a file which contains two XML documents will be considered
+ % well-formed and the second is placed in the rest part of the
+ % return tuple, according to the conformance tests this should fail.
+ % In the future this will fail if xmerl_sax_aprser:file/2 is used but
+ % left to the user in the xmerl_sax_aprser:stream/2 case.
}).
diff --git a/lib/xmerl/src/xmerl_sax_parser_base.erlsrc b/lib/xmerl/src/xmerl_sax_parser_base.erlsrc
index 7b64d7c302..e198f2fef5 100644
--- a/lib/xmerl/src/xmerl_sax_parser_base.erlsrc
+++ b/lib/xmerl/src/xmerl_sax_parser_base.erlsrc
@@ -113,6 +113,10 @@ parse_dtd(Xml, State) ->
State3 = event_callback(endDocument, State2),
ets:delete(RefTable),
{ok, State3#xmerl_sax_parser_state.event_state, Rest};
+ {endDocument, Rest, State2} when is_record(State2, xmerl_sax_parser_state) ->
+ State3 = event_callback(endDocument, State2),
+ ets:delete(RefTable),
+ {ok, State3#xmerl_sax_parser_state.event_state, Rest};
Other ->
_State2 = event_callback(endDocument, State1),
ets:delete(RefTable),
@@ -207,8 +211,14 @@ parse_prolog(?STRING_EMPTY, State) ->
parse_prolog(?STRING("<") = Bytes, State) ->
cf(Bytes, State, fun parse_prolog/2);
parse_prolog(?STRING_REST("<?", Rest), State) ->
- {Rest1, State1} = parse_pi(Rest, State),
- parse_prolog(Rest1, State1);
+ case parse_pi(Rest, State) of
+ {Rest1, State1} ->
+ parse_prolog(Rest1, State1);
+ {endDocument, Rest1, State1} ->
+ parse_prolog(Rest1, State1)
+ % IValue = ?TO_INPUT_FORMAT("<?"),
+ % {?APPEND_STRING(IValue, Rest1), State1}
+ end;
parse_prolog(?STRING_REST("<!", Rest), State) ->
parse_prolog_1(Rest, State);
parse_prolog(?STRING_REST("<", Rest), State) ->
@@ -409,10 +419,11 @@ parse_pi(?STRING_UNBOUND_REST(C, Rest) = Bytes, State) ->
parse_name(Rest, State, [C]),
case string:to_lower(PiTarget) of
"xml" ->
- case State#xmerl_sax_parser_state.end_tags of
- [] ->
- {Bytes, State};
- _ ->
+ case check_if_new_doc_allowed(State#xmerl_sax_parser_state.input_type,
+ State#xmerl_sax_parser_state.end_tags) of
+ true ->
+ {endDocument, Bytes, State};
+ false ->
?fatal_error(State1, "<?xml ...?> not first in document")
end;
_ ->
@@ -426,6 +437,11 @@ parse_pi(?STRING_UNBOUND_REST(C, Rest) = Bytes, State) ->
parse_pi(Bytes, State) ->
unicode_incomplete_check([Bytes, State, fun parse_pi/2], undefined).
+check_if_new_doc_allowed(stream, []) ->
+ true;
+check_if_new_doc_allowed(_, _) ->
+ false.
+
%%----------------------------------------------------------------------
%% Function: parse_pi_1(Rest, State) -> Result
%% Input: Rest = string() | binary()
@@ -657,8 +673,13 @@ parse_misc(?STRING_EMPTY, State, Eod) ->
parse_misc(?STRING("<") = Rest, State, Eod) ->
cf(Rest, State, Eod, fun parse_misc/3);
parse_misc(?STRING_REST("<?", Rest), State, Eod) ->
- {Rest1, State1} = parse_pi(Rest, State),
- parse_misc(Rest1, State1, Eod);
+ case parse_pi(Rest, State) of
+ {Rest1, State1} ->
+ parse_misc(Rest1, State1, Eod);
+ {endDocument, _Rest1, State1} ->
+ IValue = ?TO_INPUT_FORMAT("<?"),
+ {?APPEND_STRING(IValue, Rest), State1}
+ end;
parse_misc(?STRING("<!") = Rest, State, Eod) ->
cf(Rest, State, Eod, fun parse_misc/3);
parse_misc(?STRING("<!-") = Rest, State, Eod) ->
@@ -1063,8 +1084,13 @@ parse_content(?STRING_REST("<!--", Rest), State, Acc, IgnorableWS) ->
parse_content(Rest1, State2, [], true);
parse_content(?STRING_REST("<?", Rest), State, Acc, IgnorableWS) ->
State1 = send_character_event(length(Acc), IgnorableWS, lists:reverse(Acc), State),
- {Rest1, State2} = parse_pi(Rest, State1),
- parse_content(Rest1, State2, [], true);
+ case parse_pi(Rest, State1) of
+ {Rest1, State2} ->
+ parse_content(Rest1, State2, [], true);
+ {endDocument, _Rest1, State2} ->
+ IValue = ?TO_INPUT_FORMAT("<?"),
+ {?APPEND_STRING(IValue, Rest), State2}
+ end;
parse_content(?STRING_REST("<!", Rest1) = Rest, #xmerl_sax_parser_state{end_tags = ET} = State, Acc, IgnorableWS) ->
case ET of
[] ->
@@ -1649,8 +1675,9 @@ handle_external_entity({file, FileToOpen}, State) ->
{?STRING_EMPTY, EntityState} =
parse_external_entity_1(<<>>,
State#xmerl_sax_parser_state{continuation_state=FD,
- current_location=filename:dirname(FileToOpen),
- entity=filename:basename(FileToOpen)}),
+ current_location=filename:dirname(FileToOpen),
+ entity=filename:basename(FileToOpen),
+ input_type=file}),
file:close(FD),
EntityState#xmerl_sax_parser_state.event_state
end;
@@ -1667,8 +1694,9 @@ handle_external_entity({http, Url}, State) ->
{?STRING_EMPTY, EntityState} =
parse_external_entity_1(<<>>,
State#xmerl_sax_parser_state{continuation_state=FD,
- current_location=filename:dirname(Url),
- entity=filename:basename(Url)}),
+ current_location=filename:dirname(Url),
+ entity=filename:basename(Url),
+ input_type=file}),
file:close(FD),
file:delete(TmpFile),
EntityState#xmerl_sax_parser_state.event_state
@@ -1881,8 +1909,13 @@ parse_doctype_decl(?STRING_EMPTY, State) ->
parse_doctype_decl(?STRING("<"), State) ->
cf(?STRING("<"), State, fun parse_doctype_decl/2);
parse_doctype_decl(?STRING_REST("<?", Rest), State) ->
- {Rest1, State1} = parse_pi(Rest, State),
- parse_doctype_decl(Rest1, State1);
+ case parse_pi(Rest, State) of
+ {Rest1, State1} ->
+ parse_doctype_decl(Rest1, State1);
+ {endDocument, _Rest1, State1} ->
+ IValue = ?TO_INPUT_FORMAT("<?"),
+ {?APPEND_STRING(IValue, Rest), State1}
+ end;
parse_doctype_decl(?STRING_REST("%", Rest), State) ->
{Ref, Rest1, State1} = parse_pe_reference(Rest, State),
case Ref of
diff --git a/lib/xmerl/test/xmerl_appup_test.erl b/lib/xmerl/test/xmerl_appup_test.erl
index 80c8d8e4fd..ff6b368bcc 100644
--- a/lib/xmerl/test/xmerl_appup_test.erl
+++ b/lib/xmerl/test/xmerl_appup_test.erl
@@ -23,20 +23,7 @@
-module(xmerl_appup_test).
-compile(export_all).
-
-%-include("megaco_test_lib.hrl").
-
-
-%t() -> megaco_test_lib:t(?MODULE).
-%t(Case) -> megaco_test_lib:t({?MODULE, Case}).
-
-
-%% Test server callbacks
-% init_per_testcase(Case, Config) ->
-% megaco_test_lib:init_per_testcase(Case, Config).
-
-% end_per_testcase(Case, Config) ->
-% megaco_test_lib:end_per_testcase(Case, Config).
+-include_lib("common_test/include/ct.hrl").
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
@@ -58,14 +45,7 @@ end_per_group(_GroupName, Config) ->
init_per_suite(suite) -> [];
init_per_suite(doc) -> [];
init_per_suite(Config) when is_list(Config) ->
- AppFile = file_name(xmerl, ".app"),
- AppupFile = file_name(xmerl, ".appup"),
- [{app_file, AppFile}, {appup_file, AppupFile}|Config].
-
-
-file_name(App, Ext) ->
- LibDir = code:lib_dir(App),
- filename:join([LibDir, "ebin", atom_to_list(App) ++ Ext]).
+ Config.
end_per_suite(suite) -> [];
@@ -76,317 +56,6 @@ end_per_suite(Config) when is_list(Config) ->
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
-appup(suite) ->
- [];
-appup(doc) ->
- "perform a simple check of the appup file";
+%% perform a simple check of the appup file
appup(Config) when is_list(Config) ->
- AppupFile = key1search(appup_file, Config),
- AppFile = key1search(app_file, Config),
- Modules = modules(AppFile),
- check_appup(AppupFile, Modules).
-
-modules(File) ->
- case file:consult(File) of
- {ok, [{application,xmerl,Info}]} ->
- case lists:keysearch(modules,1,Info) of
- {value, {modules, Modules}} ->
- Modules;
- false ->
- fail({bad_appinfo, Info})
- end;
- Error ->
- fail({bad_appfile, Error})
- end.
-
-
-check_appup(AppupFile, Modules) ->
- case file:consult(AppupFile) of
- {ok, [{V, UpFrom, DownTo}]} ->
- io:format("V= ~p, UpFrom= ~p, DownTo= ~p, Modules= ~p~n",
- [V, UpFrom, DownTo, Modules]),
- check_appup(V, UpFrom, DownTo, Modules);
- Else ->
- fail({bad_appupfile, Else})
- end.
-
-
-check_appup(V, UpFrom, DownTo, Modules) ->
- check_version(V),
- check_depends(up, UpFrom, Modules),
- check_depends(down, DownTo, Modules),
- ok.
-
-
-check_depends(_, [], _) ->
- ok;
-check_depends(UpDown, [Dep|Deps], Modules) ->
- check_depend(UpDown, Dep, Modules),
- check_depends(UpDown, Deps, Modules).
-
-
-check_depend(up,I={add_application, _App}, Modules) ->
- d("check_instructions(~w) -> entry with"
- "~n Instruction: ~p"
- "~n Modules: ~p", [up,I , Modules]),
- ok;
-check_depend(down,I={remove_application, _App}, Modules) ->
- d("check_instructions(~w) -> entry with"
- "~n Instruction: ~p"
- "~n Modules: ~p", [down,I , Modules]),
- ok;
-check_depend(UpDown, {V, Instructions}, Modules) ->
- d("check_instructions(~w) -> entry with"
- "~n V: ~p"
- "~n Modules: ~p", [UpDown, V, Modules]),
- check_version(V),
- case check_instructions(UpDown,
- Instructions, Instructions, [], [], Modules) of
- {_Good, []} ->
- ok;
- {_, Bad} ->
- fail({bad_instructions, Bad, UpDown})
- end.
-
-
-check_instructions(_, [], _, Good, Bad, _) ->
- {lists:reverse(Good), lists:reverse(Bad)};
-check_instructions(UpDown, [Instr|Instrs], AllInstr, Good, Bad, Modules) ->
- d("check_instructions(~w) -> entry with"
- "~n Instr: ~p", [UpDown,Instr]),
- case (catch check_instruction(UpDown, Instr, AllInstr, Modules)) of
- ok ->
- check_instructions(UpDown, Instrs, AllInstr,
- [Instr|Good], Bad, Modules);
- {error, Reason} ->
- d("check_instructions(~w) -> bad instruction: "
- "~n Reason: ~p", [UpDown,Reason]),
- check_instructions(UpDown, Instrs, AllInstr, Good,
- [{Instr, Reason}|Bad], Modules)
- end.
-
-%% A new module is added
-check_instruction(up, {add_module, Module}, _, Modules)
- when is_atom(Module) ->
- d("check_instruction -> entry when up-add_module instruction with"
- "~n Module: ~p", [Module]),
- check_module(Module, Modules);
-
-%% An old module is re-added
-check_instruction(down, {add_module, Module}, _, Modules)
- when is_atom(Module) ->
- d("check_instruction -> entry when down-add_module instruction with"
- "~n Module: ~p", [Module]),
- case (catch check_module(Module, Modules)) of
- {error, {unknown_module, Module, Modules}} ->
- ok;
- ok ->
- local_error({existing_readded_module, Module})
- end;
-
-%% Removing a module on upgrade:
-%% - the module has been removed from the app-file.
-%% - check that no module depends on this (removed) module
-check_instruction(up, {remove, {Module, Pre, Post}}, _, Modules)
- when is_atom(Module), is_atom(Pre), is_atom(Post) ->
- d("check_instruction -> entry when up-remove instruction with"
- "~n Module: ~p"
- "~n Pre: ~p"
- "~n Post: ~p", [Module, Pre, Post]),
- case (catch check_module(Module, Modules)) of
- {error, {unknown_module, Module, Modules}} ->
- check_purge(Pre),
- check_purge(Post);
- ok ->
- local_error({existing_removed_module, Module})
- end;
-
-%% Removing a module on downgrade: the module exist
-%% in the app-file.
-check_instruction(down, {remove, {Module, Pre, Post}}, AllInstr, Modules)
- when is_atom(Module), is_atom(Pre), is_atom(Post) ->
- d("check_instruction -> entry when down-remove instruction with"
- "~n Module: ~p"
- "~n Pre: ~p"
- "~n Post: ~p", [Module, Pre, Post]),
- case (catch check_module(Module, Modules)) of
- ok ->
- check_purge(Pre),
- check_purge(Post),
- check_no_remove_depends(Module, AllInstr);
- {error, {unknown_module, Module, Modules}} ->
- local_error({nonexisting_removed_module, Module})
- end;
-
-check_instruction(_, {load_module, Module, Pre, Post, Depend},
- AllInstr, Modules)
- when is_atom(Module), is_atom(Pre), is_atom(Post), is_list(Depend) ->
- d("check_instruction -> entry when load_module instruction with"
- "~n Module: ~p"
- "~n Pre: ~p"
- "~n Post: ~p"
- "~n Depend: ~p", [Module, Pre, Post, Depend]),
- check_module(Module, Modules),
- check_module_depend(Module, Depend, Modules),
- check_module_depend(Module, Depend, updated_modules(AllInstr, [])),
- check_purge(Pre),
- check_purge(Post);
-
-check_instruction(_, {update, Module, Change, Pre, Post, Depend},
- AllInstr, Modules)
- when is_atom(Module), is_atom(Pre), is_atom(Post), is_list(Depend) ->
- d("check_instruction -> entry when update instruction with"
- "~n Module: ~p"
- "~n Change: ~p"
- "~n Pre: ~p"
- "~n Post: ~p"
- "~n Depend: ~p", [Module, Change, Pre, Post, Depend]),
- check_module(Module, Modules),
- check_module_depend(Module, Depend, Modules),
- check_module_depend(Module, Depend, updated_modules(AllInstr, [])),
- check_change(Change),
- check_purge(Pre),
- check_purge(Post);
-
-check_instruction(_, Instr, _AllInstr, _Modules) ->
- d("check_instruction -> entry when unknown instruction with"
- "~n Instr: ~p", [Instr]),
- local_error({error, {unknown_instruction, Instr}}).
-
-
-%% If Module X depends on Module Y, then module Y must have an update
-%% instruction of some sort (otherwise the depend is faulty).
-updated_modules([], Modules) ->
- d("update_modules -> entry when done with"
- "~n Modules: ~p", [Modules]),
- Modules;
-updated_modules([Instr |Instrs], Modules) ->
- d("update_modules -> entry with"
- "~n Instr: ~p"
- "~n Modules: ~p", [Instr,Modules]),
- Module = instruction_module(Instr),
- d("update_modules -> Module: ~p", [Module]),
- updated_modules(Instrs, [Module|Modules]).
-
-instruction_module({add_module, Module}) ->
- Module;
-instruction_module({remove, {Module, _, _}}) ->
- Module;
-instruction_module({load_module, Module, _, _, _}) ->
- Module;
-instruction_module({update, Module, _, _, _, _}) ->
- Module;
-instruction_module(Instr) ->
- d("instruction_module -> entry when unknown instruction with"
- "~n Instr: ~p", [Instr]),
- local_error({error, {unknown_instruction, Instr}}).
-
-%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
-
-check_version(V) when is_list(V) ->
- ok;
-check_version(V) ->
- local_error({bad_version, V}).
-
-
-check_module(M, Modules) when is_atom(M) ->
- case lists:member(M,Modules) of
- true ->
- ok;
- false ->
- local_error({unknown_module, M, Modules})
- end;
-check_module(M, _) ->
- local_error({bad_module, M}).
-
-
-check_module_depend(M, [], _) when is_atom(M) ->
- d("check_module_depend -> entry with"
- "~n M: ~p", [M]),
- ok;
-check_module_depend(M, Deps, Modules) when is_atom(M), is_list(Deps) ->
- d("check_module_depend -> entry with"
- "~n M: ~p"
- "~n Deps: ~p"
- "~n Modules: ~p", [M, Deps, Modules]),
- case [Dep || Dep <- Deps, lists:member(Dep, Modules) == false] of
- [] ->
- ok;
- Unknown ->
- local_error({unknown_depend_modules, Unknown})
- end;
-check_module_depend(_M, D, _Modules) ->
- d("check_module_depend -> entry when bad depend with"
- "~n D: ~p", [D]),
- local_error({bad_depend, D}).
-
-
-check_no_remove_depends(_Module, []) ->
- ok;
-check_no_remove_depends(Module, [Instr|Instrs]) ->
- check_no_remove_depend(Module, Instr),
- check_no_remove_depends(Module, Instrs).
-
-check_no_remove_depend(Module, {load_module, Mod, _Pre, _Post, Depend}) ->
- case lists:member(Module, Depend) of
- true ->
- local_error({removed_module_in_depend, load_module, Mod, Module});
- false ->
- ok
- end;
-check_no_remove_depend(Module, {update, Mod, _Change, _Pre, _Post, Depend}) ->
- case lists:member(Module, Depend) of
- true ->
- local_error({removed_module_in_depend, update, Mod, Module});
- false ->
- ok
- end;
-check_no_remove_depend(_, _) ->
- ok.
-
-
-check_change(soft) ->
- ok;
-check_change({advanced, _Something}) ->
- ok;
-check_change(Change) ->
- local_error({bad_change, Change}).
-
-
-check_purge(soft_purge) ->
- ok;
-check_purge(brutal_purge) ->
- ok;
-check_purge(Purge) ->
- local_error({bad_purge, Purge}).
-
-
-
-%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
-
-local_error(Reason) ->
- throw({error, Reason}).
-
-fail(Reason) ->
- exit({suite_failed, Reason}).
-
-key1search(Key, L) ->
- case lists:keysearch(Key, 1, L) of
- undefined ->
- fail({not_found, Key, L});
- {value, {Key, Value}} ->
- Value
- end.
-
-
-%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
-
-d(F, A) ->
- d(false, F, A).
-
-d(true, F, A) ->
- io:format(F ++ "~n", A);
-d(_, _, _) ->
- ok.
-
-
+ ok = ?t:appup_test(xmerl).
diff --git a/lib/xmerl/test/xmerl_sax_SUITE.erl b/lib/xmerl/test/xmerl_sax_SUITE.erl
index 563bbaaa06..10a96f470b 100644
--- a/lib/xmerl/test/xmerl_sax_SUITE.erl
+++ b/lib/xmerl/test/xmerl_sax_SUITE.erl
@@ -67,7 +67,8 @@ end_per_testcase(_Func,_Config) ->
%% Description: Checks that end of document is checked properly when continuation fun is missing.
ticket_8213(suite) -> [];
ticket_8213(_Config) ->
- ?line {ok,ok,[]} = xmerl_sax_parser:stream("<elem/>", [{event_fun, fun (_E,_,_) -> ok end}]).
+ ?line {ok,ok,[]} = xmerl_sax_parser:stream("<elem/>", [{event_fun, fun (_E,_,_) -> ok end}]),
+ ok.
%%----------------------------------------------------------------------
@@ -86,7 +87,35 @@ ticket_8214(_Config) ->
({startElement, _, "elem",_,_}, _,_) ->
throw({test, "Error in startElement tuple"});
(_E,_,_) -> ok
- end}]).
+ end}]),
+ ok.
+
+%%----------------------------------------------------------------------
+%% Test Case
+%% ID: ticket_8214
+%% Description: Checks that attributes with default namespace don't get [] in NS field.
+ticket_11551(suite) -> [];
+ticket_11551(Config) ->
+ Stream1 = <<"<?xml version=\"1.0\" encoding=\"utf-8\" ?>
+<a>hej</a>
+<?xml version=\"1.0\" encoding=\"utf-8\" ?>
+<a>hej</a>">>,
+ ?line {ok, undefined, <<"<?xml", _/binary>>} = xmerl_sax_parser:stream(Stream1, []),
+ Stream2= <<"<?xml version=\"1.0\" encoding=\"utf-8\" ?>
+<a>hej</a>
+
+
+<?xml version=\"1.0\" encoding=\"utf-8\" ?>
+<a>hej</a>">>,
+ ?line {ok, undefined, <<"<?xml", _/binary>>} = xmerl_sax_parser:stream(Stream2, []),
+ Stream3= <<"<a>hej</a>
+
+<?xml version=\"1.0\" encoding=\"utf-8\" ?>
+<a>hej</a>">>,
+ ?line {ok, undefined, <<"<?xml", _/binary>>} = xmerl_sax_parser:stream(Stream3, []),
+ ok.
+
+
%%----------------------------------------------------------------------
%% Bug test cases
@@ -99,7 +128,7 @@ all() ->
[{group, bugs}].
groups() ->
- [{bugs, [], [ticket_8213, ticket_8214]}].
+ [{bugs, [], [ticket_8213, ticket_8214, ticket_11551]}].
init_per_group(_GroupName, Config) ->
Config.
diff --git a/lib/xmerl/test/xmerl_sax_std_SUITE.erl b/lib/xmerl/test/xmerl_sax_std_SUITE.erl
index 2b7b59dacf..6440329112 100644
--- a/lib/xmerl/test/xmerl_sax_std_SUITE.erl
+++ b/lib/xmerl/test/xmerl_sax_std_SUITE.erl
@@ -2074,8 +2074,9 @@ end_per_testcase(_Func,_Config) ->
%% Special case becase we returns everything after a legal document
%% as an rest instead of giving and error to let the user handle
%% multipple docs on a stream.
- ?line {ok,_,<<"xml version=\"1.0\"?>\r\n">>} = xmerl_sax_parser:file(Path, [{event_fun, fun(_,_,S) -> S end}]).
- %%?line check_result(R, "not-wf").
+ ?line {ok,_,<<"<?xml version=\"1.0\"?>\r\n">>} = xmerl_sax_parser:file(Path, [{event_fun, fun(_,_,S) -> S end}]).
+ % ?line R = xmerl_sax_parser:file(Path, [{event_fun, fun(_,_,S) -> S end}]),
+ % ?line check_result(R, "not-wf").
%%----------------------------------------------------------------------
%% Test Case
@@ -12361,8 +12362,9 @@ end_per_testcase(_Func,_Config) ->
%% Special case becase we returns everything after a legal document
%% as an rest instead of giving and error to let the user handle
%% multipple docs on a stream.
- ?line {ok,_, <<"xml version=\"1.0\"?>", _/binary>>} = xmerl_sax_parser:file(Path, [{event_fun, fun(_,_,S) -> S end}]).
- %%?line check_result(R, "not-wf").
+ ?line {ok,_, <<"<?xml version=\"1.0\"?>", _/binary>>} = xmerl_sax_parser:file(Path, [{event_fun, fun(_,_,S) -> S end}]).
+ % ?line R = xmerl_sax_parser:file(Path, [{event_fun, fun(_,_,S) -> S end}]),
+ % ?line check_result(R, "not-wf").
%%----------------------------------------------------------------------
%% Test Case
@@ -24625,7 +24627,7 @@ groups() ->
'not-wf-sa-136', 'not-wf-sa-137', 'not-wf-sa-138',
'not-wf-sa-139', 'not-wf-sa-140', 'not-wf-sa-141',
'not-wf-sa-142', 'not-wf-sa-143', 'not-wf-sa-144',
- 'not-wf-sa-145', 'not-wf-sa-146', 'not-wf-sa-147',
+ 'not-wf-sa-145', 'not-wf-sa-146', %'not-wf-sa-147', LATH: Check this later
'not-wf-sa-148', 'not-wf-sa-149', 'not-wf-sa-150',
'not-wf-sa-151', 'not-wf-sa-152', 'not-wf-sa-153',
'not-wf-sa-154', 'not-wf-sa-155', 'not-wf-sa-156',
diff --git a/lib/xmerl/test/xmerl_xsd_MS2002-01-16_SUITE.erl b/lib/xmerl/test/xmerl_xsd_MS2002-01-16_SUITE.erl
index 44ec4b592d..34a65ac6ff 100644
--- a/lib/xmerl/test/xmerl_xsd_MS2002-01-16_SUITE.erl
+++ b/lib/xmerl/test/xmerl_xsd_MS2002-01-16_SUITE.erl
@@ -1,7 +1,7 @@
%%
%% %CopyrightBegin%
%%
-%% Copyright Ericsson AB 2006-2010. All Rights Reserved.
+%% Copyright Ericsson AB 2006-2013. 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
@@ -32,7 +32,7 @@
all() ->
- [att, ct, elem, group, idc_, id, mgABCD, mgEFG, mgHIJ,
+ [att, ct, elem, model_group, idc_, id, mgABCD, mgEFG, mgHIJ,
mgK, mgLM, mgN, mgOP, mgQR, mgS, particlesAB,
particlesCDE, particlesFHI, particlesJ,
particlesKOSRTQUVW, stABCDE, stFGH, stIJK, stZ,
@@ -5743,8 +5743,7 @@ elem(Config) when is_list(Config) ->
%% Syntax Checking Model Group Tests.
%% Content Checking Model Group Tests.
-
-group(Config) when is_list(Config) ->
+model_group(Config) when is_list(Config) ->
STResList0 = [],
?line {STRes0,_} = xmerl_xsd_lib:schema_test(Config,'./msxsdtest/Group/groupA001.xsd','./msxsdtest/Group',valid),
diff --git a/lib/xmerl/test/xmerl_xsd_MS2002-01-16_SUITE_data/msx_failed_cases.log b/lib/xmerl/test/xmerl_xsd_MS2002-01-16_SUITE_data/msx_failed_cases.log
index a89a9a798c..7ee2a56c20 100644
--- a/lib/xmerl/test/xmerl_xsd_MS2002-01-16_SUITE_data/msx_failed_cases.log
+++ b/lib/xmerl/test/xmerl_xsd_MS2002-01-16_SUITE_data/msx_failed_cases.log
@@ -532,7 +532,7 @@
"elemQ018.xml",
"elemO011.xml",
"elemO006.xml"],[]}}.
-{group,{["groupO027.xsd",
+{model_group,{["groupO027.xsd",
"groupO025.xsd",
"groupO024.xsd",
"groupO023.xsd",
diff --git a/lib/xmerl/vsn.mk b/lib/xmerl/vsn.mk
index 4b933deb4a..aab2a37d6c 100644
--- a/lib/xmerl/vsn.mk
+++ b/lib/xmerl/vsn.mk
@@ -1 +1 @@
-XMERL_VSN = 1.3.5
+XMERL_VSN = 1.3.7