script_core 0.1.1 → 0.2.0
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/.gitignore +2 -0
- data/.rubocop.yml +8 -6
- data/.ruby-version +1 -1
- data/Gemfile +2 -1
- data/bin/sandbox +1 -1
- data/ext/enterprise_script_service/Rakefile +1 -1
- data/ext/enterprise_script_service/flags.rb +5 -0
- data/ext/enterprise_script_service/libseccomp/CHANGELOG +15 -0
- data/ext/enterprise_script_service/libseccomp/CREDITS +3 -0
- data/ext/enterprise_script_service/libseccomp/Makefile.am +1 -1
- data/ext/enterprise_script_service/libseccomp/README.md +1 -1
- data/ext/enterprise_script_service/libseccomp/SECURITY.md +45 -0
- data/ext/enterprise_script_service/libseccomp/configure.ac +3 -3
- data/ext/enterprise_script_service/libseccomp/doc/admin/MAINTAINER_PROCESS.md +95 -0
- data/ext/enterprise_script_service/libseccomp/{RELEASE_PROCESS.md → doc/admin/RELEASE_PROCESS.md} +9 -1
- data/ext/enterprise_script_service/libseccomp/include/Makefile.am +1 -1
- data/ext/enterprise_script_service/libseccomp/include/seccomp-syscalls.h +2292 -0
- data/ext/enterprise_script_service/libseccomp/include/seccomp.h.in +3 -1065
- data/ext/enterprise_script_service/libseccomp/src/arch-aarch64-syscalls.c +35 -3
- data/ext/enterprise_script_service/libseccomp/src/arch-arm-syscalls.c +35 -3
- data/ext/enterprise_script_service/libseccomp/src/arch-mips-syscalls.c +43 -11
- data/ext/enterprise_script_service/libseccomp/src/arch-mips64-syscalls.c +33 -1
- data/ext/enterprise_script_service/libseccomp/src/arch-mips64n32-syscalls.c +33 -1
- data/ext/enterprise_script_service/libseccomp/src/arch-parisc-syscalls.c +34 -2
- data/ext/enterprise_script_service/libseccomp/src/arch-ppc-syscalls.c +43 -11
- data/ext/enterprise_script_service/libseccomp/src/arch-ppc64-syscalls.c +44 -12
- data/ext/enterprise_script_service/libseccomp/src/arch-s390-syscalls.c +46 -14
- data/ext/enterprise_script_service/libseccomp/src/arch-s390.c +142 -18
- data/ext/enterprise_script_service/libseccomp/src/arch-s390x-syscalls.c +47 -15
- data/ext/enterprise_script_service/libseccomp/src/arch-s390x.c +143 -17
- data/ext/enterprise_script_service/libseccomp/src/arch-x32-syscalls.c +33 -1
- data/ext/enterprise_script_service/libseccomp/src/arch-x86-syscalls.c +94 -12
- data/ext/enterprise_script_service/libseccomp/src/arch-x86.c +142 -19
- data/ext/enterprise_script_service/libseccomp/src/arch-x86_64-syscalls.c +33 -1
- data/ext/enterprise_script_service/libseccomp/src/db.c +1 -0
- data/ext/enterprise_script_service/libseccomp/src/gen_bpf.c +10 -3
- data/ext/enterprise_script_service/libseccomp/src/python/Makefile.am +4 -4
- data/ext/enterprise_script_service/libseccomp/src/python/seccomp.pyx +2 -0
- data/ext/enterprise_script_service/libseccomp/tests/.gitignore +1 -0
- data/ext/enterprise_script_service/libseccomp/tests/50-sim-hash_collision.c +98 -0
- data/ext/enterprise_script_service/libseccomp/tests/50-sim-hash_collision.py +61 -0
- data/ext/enterprise_script_service/libseccomp/tests/50-sim-hash_collision.tests +18 -0
- data/ext/enterprise_script_service/libseccomp/tests/Makefile.am +6 -3
- data/ext/enterprise_script_service/libseccomp/tools/Makefile.am +0 -2
- data/ext/enterprise_script_service/libseccomp/tools/check-syntax +1 -0
- data/ext/enterprise_script_service/libseccomp/tools/scmp_bpf_sim.c +2 -0
- data/ext/enterprise_script_service/mruby-mpdecimal/src/ext.c +1 -1
- data/ext/enterprise_script_service/mruby/.gitignore +2 -2
- data/ext/enterprise_script_service/mruby/CONTRIBUTING.md +10 -3
- data/ext/enterprise_script_service/mruby/Doxyfile +2408 -0
- data/ext/enterprise_script_service/mruby/README.md +21 -8
- data/ext/enterprise_script_service/mruby/Rakefile +4 -13
- data/ext/enterprise_script_service/mruby/appveyor_config.rb +1 -1
- data/ext/enterprise_script_service/mruby/build_config.rb +3 -3
- data/ext/enterprise_script_service/mruby/doc/guides/compile.md +42 -42
- data/ext/enterprise_script_service/mruby/doc/guides/debugger.md +1 -1
- data/ext/enterprise_script_service/mruby/doc/guides/mrbconf.md +45 -6
- data/ext/enterprise_script_service/mruby/doc/guides/mrbgems.md +5 -0
- data/ext/enterprise_script_service/mruby/doc/limitations.md +88 -38
- data/ext/enterprise_script_service/mruby/doc/mruby_logo_red_icon.png +0 -0
- data/ext/enterprise_script_service/mruby/doc/opcode.md +94 -94
- data/ext/enterprise_script_service/mruby/include/mrbconf.h +74 -11
- data/ext/enterprise_script_service/mruby/include/mruby.h +242 -146
- data/ext/enterprise_script_service/mruby/include/mruby/array.h +7 -7
- data/ext/enterprise_script_service/mruby/include/mruby/boxing_nan.h +2 -9
- data/ext/enterprise_script_service/mruby/include/mruby/boxing_no.h +11 -10
- data/ext/enterprise_script_service/mruby/include/mruby/boxing_word.h +104 -69
- data/ext/enterprise_script_service/mruby/include/mruby/class.h +7 -5
- data/ext/enterprise_script_service/mruby/include/mruby/common.h +9 -7
- data/ext/enterprise_script_service/mruby/include/mruby/compile.h +6 -6
- data/ext/enterprise_script_service/mruby/include/mruby/data.h +5 -5
- data/ext/enterprise_script_service/mruby/include/mruby/debug.h +2 -2
- data/ext/enterprise_script_service/mruby/include/mruby/dump.h +3 -7
- data/ext/enterprise_script_service/mruby/include/mruby/error.h +34 -6
- data/ext/enterprise_script_service/mruby/include/mruby/gc.h +2 -2
- data/ext/enterprise_script_service/mruby/include/mruby/hash.h +4 -11
- data/ext/enterprise_script_service/mruby/include/mruby/irep.h +16 -4
- data/ext/enterprise_script_service/mruby/include/mruby/istruct.h +4 -4
- data/ext/enterprise_script_service/mruby/include/mruby/khash.h +2 -2
- data/ext/enterprise_script_service/mruby/include/mruby/numeric.h +41 -7
- data/ext/enterprise_script_service/mruby/include/mruby/object.h +8 -9
- data/ext/enterprise_script_service/mruby/include/mruby/opcode.h +2 -2
- data/ext/enterprise_script_service/mruby/include/mruby/ops.h +6 -6
- data/ext/enterprise_script_service/mruby/include/mruby/proc.h +19 -13
- data/ext/enterprise_script_service/mruby/include/mruby/range.h +10 -4
- data/ext/enterprise_script_service/mruby/include/mruby/re.h +2 -2
- data/ext/enterprise_script_service/mruby/include/mruby/string.h +130 -107
- data/ext/enterprise_script_service/mruby/include/mruby/throw.h +2 -2
- data/ext/enterprise_script_service/mruby/include/mruby/value.h +137 -49
- data/ext/enterprise_script_service/mruby/include/mruby/variable.h +3 -5
- data/ext/enterprise_script_service/mruby/include/mruby/version.h +24 -10
- data/ext/enterprise_script_service/mruby/lib/mruby-core-ext.rb +2 -39
- data/ext/enterprise_script_service/mruby/lib/mruby/build.rb +32 -15
- data/ext/enterprise_script_service/mruby/lib/mruby/build/command.rb +63 -17
- data/ext/enterprise_script_service/mruby/lib/mruby/build/load_gems.rb +24 -10
- data/ext/enterprise_script_service/mruby/lib/mruby/gem.rb +11 -7
- data/ext/enterprise_script_service/mruby/lib/mruby/lockfile.rb +81 -0
- data/ext/enterprise_script_service/mruby/minirake +27 -11
- data/ext/enterprise_script_service/mruby/mrbgems/default.gembox +3 -0
- data/ext/enterprise_script_service/mruby/mrbgems/mruby-array-ext/mrbgem.rake +0 -1
- data/ext/enterprise_script_service/mruby/mrbgems/mruby-array-ext/mrblib/array.rb +47 -9
- data/ext/enterprise_script_service/mruby/mrbgems/mruby-array-ext/src/array.c +3 -3
- data/ext/enterprise_script_service/mruby/mrbgems/mruby-array-ext/test/array.rb +50 -29
- data/ext/enterprise_script_service/mruby/mrbgems/mruby-bin-debugger/tools/mrdb/apibreak.c +3 -3
- data/ext/enterprise_script_service/mruby/mrbgems/mruby-bin-debugger/tools/mrdb/apiprint.c +2 -2
- data/ext/enterprise_script_service/mruby/mrbgems/mruby-bin-debugger/tools/mrdb/cmdprint.c +3 -3
- data/ext/enterprise_script_service/mruby/mrbgems/mruby-bin-debugger/tools/mrdb/mrdb.c +2 -2
- data/ext/enterprise_script_service/mruby/mrbgems/mruby-bin-debugger/tools/mrdb/mrdb.h +1 -1
- data/ext/enterprise_script_service/mruby/mrbgems/mruby-bin-debugger/tools/mrdb/mrdbconf.h +4 -0
- data/ext/enterprise_script_service/mruby/mrbgems/mruby-bin-mirb/tools/mirb/mirb.c +28 -1
- data/ext/enterprise_script_service/mruby/mrbgems/mruby-bin-mrbc/tools/mrbc/mrbc.c +1 -2
- data/ext/enterprise_script_service/mruby/mrbgems/mruby-bin-mruby/bintest/mruby.rb +75 -8
- data/ext/enterprise_script_service/mruby/mrbgems/mruby-bin-mruby/tools/mruby/mruby.c +134 -90
- data/ext/enterprise_script_service/mruby/mrbgems/mruby-class-ext/src/class.c +7 -8
- data/ext/enterprise_script_service/mruby/mrbgems/mruby-compiler/core/codegen.c +69 -46
- data/ext/enterprise_script_service/mruby/mrbgems/mruby-compiler/core/keywords +0 -3
- data/ext/enterprise_script_service/mruby/mrbgems/mruby-compiler/core/lex.def +51 -59
- data/ext/enterprise_script_service/mruby/mrbgems/mruby-compiler/core/parse.y +430 -241
- data/ext/enterprise_script_service/mruby/mrbgems/mruby-complex/mrbgem.rake +10 -0
- data/ext/enterprise_script_service/mruby/mrbgems/mruby-complex/mrblib/complex.rb +122 -0
- data/ext/enterprise_script_service/mruby/mrbgems/mruby-complex/src/complex.c +249 -0
- data/ext/enterprise_script_service/mruby/mrbgems/mruby-complex/test/complex.rb +153 -0
- data/ext/enterprise_script_service/mruby/mrbgems/mruby-enum-chain/mrblib/chain.rb +19 -17
- data/ext/enterprise_script_service/mruby/mrbgems/mruby-enum-chain/test/enum_chain.rb +41 -9
- data/ext/enterprise_script_service/mruby/mrbgems/mruby-enum-ext/mrblib/enum.rb +30 -4
- data/ext/enterprise_script_service/mruby/mrbgems/mruby-enum-ext/test/enum.rb +8 -3
- data/ext/enterprise_script_service/mruby/mrbgems/mruby-enumerator/mrbgem.rake +0 -1
- data/ext/enterprise_script_service/mruby/mrbgems/mruby-enumerator/mrblib/enumerator.rb +46 -14
- data/ext/enterprise_script_service/mruby/mrbgems/mruby-enumerator/test/enumerator.rb +51 -2
- data/ext/enterprise_script_service/mruby/mrbgems/mruby-error/src/exception.c +10 -0
- data/ext/enterprise_script_service/mruby/mrbgems/mruby-eval/src/eval.c +47 -44
- data/ext/enterprise_script_service/mruby/mrbgems/mruby-eval/test/eval.rb +2 -2
- data/ext/enterprise_script_service/mruby/mrbgems/mruby-exit/src/mruby-exit.c +9 -4
- data/ext/enterprise_script_service/mruby/mrbgems/mruby-fiber/src/fiber.c +16 -12
- data/ext/enterprise_script_service/mruby/mrbgems/mruby-fiber/test/fiber.rb +1 -1
- data/ext/enterprise_script_service/mruby/mrbgems/mruby-hash-ext/mrbgem.rake +0 -2
- data/ext/enterprise_script_service/mruby/mrbgems/mruby-hash-ext/mrblib/hash.rb +3 -0
- data/ext/enterprise_script_service/mruby/mrbgems/mruby-hash-ext/test/hash.rb +3 -7
- data/ext/enterprise_script_service/mruby/mrbgems/mruby-io/README.md +1 -3
- data/ext/enterprise_script_service/mruby/mrbgems/mruby-io/mrbgem.rake +1 -1
- data/ext/enterprise_script_service/mruby/mrbgems/mruby-io/mrblib/file.rb +0 -5
- data/ext/enterprise_script_service/mruby/mrbgems/mruby-io/mrblib/io.rb +24 -38
- data/ext/enterprise_script_service/mruby/mrbgems/mruby-io/mrblib/kernel.rb +16 -0
- data/ext/enterprise_script_service/mruby/mrbgems/mruby-io/src/file.c +19 -18
- data/ext/enterprise_script_service/mruby/mrbgems/mruby-io/src/file_test.c +5 -16
- data/ext/enterprise_script_service/mruby/mrbgems/mruby-io/src/io.c +54 -42
- data/ext/enterprise_script_service/mruby/mrbgems/mruby-io/test/file.rb +24 -20
- data/ext/enterprise_script_service/mruby/mrbgems/mruby-io/test/file_test.rb +4 -9
- data/ext/enterprise_script_service/mruby/mrbgems/mruby-io/test/io.rb +41 -35
- data/ext/enterprise_script_service/mruby/mrbgems/mruby-io/test/mruby_io_test.c +9 -36
- data/ext/enterprise_script_service/mruby/mrbgems/mruby-kernel-ext/mrbgem.rake +1 -1
- data/ext/enterprise_script_service/mruby/mrbgems/mruby-kernel-ext/src/kernel.c +9 -27
- data/ext/enterprise_script_service/mruby/mrbgems/mruby-kernel-ext/test/kernel.rb +2 -0
- data/ext/enterprise_script_service/mruby/mrbgems/mruby-math/src/math.c +5 -2
- data/ext/enterprise_script_service/mruby/mrbgems/mruby-metaprog/src/metaprog.c +39 -24
- data/ext/enterprise_script_service/mruby/mrbgems/mruby-metaprog/test/metaprog.rb +48 -17
- data/ext/enterprise_script_service/mruby/mrbgems/mruby-method/mrblib/method.rb +0 -12
- data/ext/enterprise_script_service/mruby/mrbgems/mruby-method/src/method.c +134 -101
- data/ext/enterprise_script_service/mruby/mrbgems/mruby-method/test/method.rb +9 -1
- data/ext/enterprise_script_service/mruby/mrbgems/mruby-numeric-ext/mrblib/numeric_ext.rb +1 -5
- data/ext/enterprise_script_service/mruby/mrbgems/mruby-numeric-ext/src/numeric_ext.c +17 -37
- data/ext/enterprise_script_service/mruby/mrbgems/mruby-numeric-ext/test/numeric.rb +0 -8
- data/ext/enterprise_script_service/mruby/mrbgems/mruby-object-ext/mrbgem.rake +1 -1
- data/ext/enterprise_script_service/mruby/mrbgems/mruby-object-ext/mrblib/object.rb +15 -1
- data/ext/enterprise_script_service/mruby/mrbgems/mruby-object-ext/src/object.c +35 -6
- data/ext/enterprise_script_service/mruby/mrbgems/mruby-object-ext/test/nil.rb +4 -0
- data/ext/enterprise_script_service/mruby/mrbgems/mruby-objectspace/src/mruby_objectspace.c +1 -5
- data/ext/enterprise_script_service/mruby/mrbgems/mruby-objectspace/test/objectspace.rb +1 -1
- data/ext/enterprise_script_service/mruby/mrbgems/mruby-pack/src/pack.c +28 -23
- data/ext/enterprise_script_service/mruby/mrbgems/mruby-pack/test/pack.rb +43 -49
- data/ext/enterprise_script_service/mruby/mrbgems/mruby-print/mrblib/print.rb +3 -9
- data/ext/enterprise_script_service/mruby/mrbgems/mruby-proc-ext/src/proc.c +6 -9
- data/ext/enterprise_script_service/mruby/mrbgems/mruby-proc-ext/test/proc.rb +21 -5
- data/ext/enterprise_script_service/mruby/mrbgems/mruby-random/src/random.c +157 -124
- data/ext/enterprise_script_service/mruby/mrbgems/mruby-random/test/random.rb +72 -26
- data/ext/enterprise_script_service/mruby/mrbgems/mruby-range-ext/mrblib/range.rb +38 -0
- data/ext/enterprise_script_service/mruby/mrbgems/mruby-range-ext/src/range.c +26 -11
- data/ext/enterprise_script_service/mruby/mrbgems/mruby-range-ext/test/range.rb +111 -1
- data/ext/enterprise_script_service/mruby/mrbgems/mruby-rational/mrbgem.rake +5 -0
- data/ext/enterprise_script_service/mruby/mrbgems/mruby-rational/mrblib/rational.rb +117 -0
- data/ext/enterprise_script_service/mruby/mrbgems/mruby-rational/src/rational.c +209 -0
- data/ext/enterprise_script_service/mruby/mrbgems/mruby-rational/test/rational.rb +308 -0
- data/ext/enterprise_script_service/mruby/mrbgems/mruby-socket/README.md +1 -1
- data/ext/enterprise_script_service/mruby/mrbgems/mruby-socket/src/socket.c +10 -9
- data/ext/enterprise_script_service/mruby/mrbgems/mruby-sprintf/src/kernel.c +2 -2
- data/ext/enterprise_script_service/mruby/mrbgems/mruby-sprintf/src/sprintf.c +22 -24
- data/ext/enterprise_script_service/mruby/mrbgems/mruby-string-ext/mrbgem.rake +0 -1
- data/ext/enterprise_script_service/mruby/mrbgems/mruby-string-ext/mrblib/string.rb +8 -4
- data/ext/enterprise_script_service/mruby/mrbgems/mruby-string-ext/src/string.c +116 -117
- data/ext/enterprise_script_service/mruby/mrbgems/mruby-string-ext/test/numeric.rb +29 -0
- data/ext/enterprise_script_service/mruby/mrbgems/mruby-string-ext/test/range.rb +26 -0
- data/ext/enterprise_script_service/mruby/mrbgems/mruby-string-ext/test/string.rb +32 -50
- data/ext/enterprise_script_service/mruby/mrbgems/mruby-struct/mrblib/struct.rb +5 -7
- data/ext/enterprise_script_service/mruby/mrbgems/mruby-struct/src/struct.c +43 -57
- data/ext/enterprise_script_service/mruby/mrbgems/mruby-struct/test/struct.rb +16 -11
- data/ext/enterprise_script_service/mruby/mrbgems/mruby-symbol-ext/src/symbol.c +2 -2
- data/ext/enterprise_script_service/mruby/mrbgems/mruby-symbol-ext/test/symbol.rb +1 -1
- data/ext/enterprise_script_service/mruby/mrbgems/mruby-test/driver.c +152 -1
- data/ext/enterprise_script_service/mruby/mrbgems/mruby-test/mrbgem.rake +4 -3
- data/ext/enterprise_script_service/mruby/mrbgems/mruby-test/vformat.c +200 -0
- data/ext/enterprise_script_service/mruby/mrbgems/mruby-time/include/mruby/time.h +2 -1
- data/ext/enterprise_script_service/mruby/mrbgems/mruby-time/src/time.c +199 -68
- data/ext/enterprise_script_service/mruby/mrbgems/mruby-time/test/time.rb +81 -46
- data/ext/enterprise_script_service/mruby/mrblib/array.rb +14 -16
- data/ext/enterprise_script_service/mruby/mrblib/enum.rb +13 -9
- data/ext/enterprise_script_service/mruby/mrblib/hash.rb +5 -7
- data/ext/enterprise_script_service/mruby/mrblib/kernel.rb +1 -1
- data/ext/enterprise_script_service/mruby/mrblib/numeric.rb +4 -4
- data/ext/enterprise_script_service/mruby/mrblib/range.rb +1 -1
- data/ext/enterprise_script_service/mruby/mrblib/string.rb +55 -112
- data/ext/enterprise_script_service/mruby/mruby-source.gemspec +1 -1
- data/ext/enterprise_script_service/mruby/oss-fuzz/config/mruby.dict +105 -0
- data/ext/enterprise_script_service/mruby/oss-fuzz/config/mruby_fuzzer.options +5 -0
- data/ext/enterprise_script_service/mruby/oss-fuzz/config/mruby_proto_fuzzer.options +4 -0
- data/ext/enterprise_script_service/mruby/oss-fuzz/mruby_fuzzer.c +18 -0
- data/ext/enterprise_script_service/mruby/oss-fuzz/mruby_proto_fuzzer.cpp +44 -0
- data/ext/enterprise_script_service/mruby/oss-fuzz/proto_to_ruby.cpp +455 -0
- data/ext/enterprise_script_service/mruby/oss-fuzz/proto_to_ruby.h +55 -0
- data/ext/enterprise_script_service/mruby/oss-fuzz/ruby.proto +201 -0
- data/ext/enterprise_script_service/mruby/src/array.c +95 -46
- data/ext/enterprise_script_service/mruby/src/backtrace.c +6 -8
- data/ext/enterprise_script_service/mruby/src/class.c +370 -278
- data/ext/enterprise_script_service/mruby/src/codedump.c +34 -34
- data/ext/enterprise_script_service/mruby/src/debug.c +2 -2
- data/ext/enterprise_script_service/mruby/src/dump.c +8 -6
- data/ext/enterprise_script_service/mruby/src/enum.c +1 -1
- data/ext/enterprise_script_service/mruby/src/error.c +157 -55
- data/ext/enterprise_script_service/mruby/src/etc.c +13 -46
- data/ext/enterprise_script_service/mruby/src/fmt_fp.c +2 -2
- data/ext/enterprise_script_service/mruby/src/gc.c +30 -11
- data/ext/enterprise_script_service/mruby/src/hash.c +23 -14
- data/ext/enterprise_script_service/mruby/src/kernel.c +16 -54
- data/ext/enterprise_script_service/mruby/src/load.c +40 -76
- data/ext/enterprise_script_service/mruby/src/numeric.c +164 -94
- data/ext/enterprise_script_service/mruby/src/object.c +16 -39
- data/ext/enterprise_script_service/mruby/src/pool.c +0 -2
- data/ext/enterprise_script_service/mruby/src/proc.c +47 -48
- data/ext/enterprise_script_service/mruby/src/range.c +22 -35
- data/ext/enterprise_script_service/mruby/src/state.c +5 -94
- data/ext/enterprise_script_service/mruby/src/string.c +874 -710
- data/ext/enterprise_script_service/mruby/src/symbol.c +73 -48
- data/ext/enterprise_script_service/mruby/src/variable.c +58 -38
- data/ext/enterprise_script_service/mruby/src/vm.c +133 -304
- data/ext/enterprise_script_service/mruby/tasks/doc.rake +48 -0
- data/ext/enterprise_script_service/mruby/tasks/toolchains/clang.rake +3 -4
- data/ext/enterprise_script_service/mruby/tasks/toolchains/gcc.rake +20 -19
- data/ext/enterprise_script_service/mruby/tasks/toolchains/visualcpp.rake +0 -12
- data/ext/enterprise_script_service/mruby/test/assert.rb +186 -25
- data/ext/enterprise_script_service/mruby/test/t/array.rb +34 -6
- data/ext/enterprise_script_service/mruby/test/t/class.rb +26 -0
- data/ext/enterprise_script_service/mruby/test/t/enumerable.rb +2 -2
- data/ext/enterprise_script_service/mruby/test/t/float.rb +17 -17
- data/ext/enterprise_script_service/mruby/test/t/hash.rb +2 -0
- data/ext/enterprise_script_service/mruby/test/t/integer.rb +14 -6
- data/ext/enterprise_script_service/mruby/test/t/kernel.rb +38 -19
- data/ext/enterprise_script_service/mruby/test/t/module.rb +87 -14
- data/ext/enterprise_script_service/mruby/test/t/numeric.rb +65 -23
- data/ext/enterprise_script_service/mruby/test/t/range.rb +4 -4
- data/ext/enterprise_script_service/mruby/test/t/string.rb +211 -49
- data/ext/enterprise_script_service/mruby/test/t/syntax.rb +19 -2
- data/ext/enterprise_script_service/mruby/test/t/vformat.rb +92 -0
- data/ext/enterprise_script_service/mruby/travis_config.rb +2 -2
- data/ext/enterprise_script_service/mruby_config.rb +10 -0
- data/ext/enterprise_script_service/mruby_engine.cpp +2 -2
- data/ext/enterprise_script_service/mruby_engine.gembox +1 -0
- data/ext/enterprise_script_service/msgpack/CHANGELOG.md +14 -0
- data/ext/enterprise_script_service/msgpack/Files.cmake +4 -0
- data/ext/enterprise_script_service/msgpack/README.md +1 -1
- data/ext/enterprise_script_service/msgpack/appveyor.yml +1 -1
- data/ext/enterprise_script_service/msgpack/erb/v1/cpp03_msgpack_tuple.hpp.erb +1 -1
- data/ext/enterprise_script_service/msgpack/erb/v1/cpp03_msgpack_tuple_decl.hpp.erb +1 -1
- data/ext/enterprise_script_service/msgpack/erb/v1/cpp03_zone.hpp.erb +3 -3
- data/ext/enterprise_script_service/msgpack/example/boost/asio_send_recv.cpp +1 -1
- data/ext/enterprise_script_service/msgpack/include/msgpack/adaptor/cpp11/timespec.hpp +16 -0
- data/ext/enterprise_script_service/msgpack/include/msgpack/adaptor/wstring.hpp +15 -0
- data/ext/enterprise_script_service/msgpack/include/msgpack/object.h +2 -0
- data/ext/enterprise_script_service/msgpack/include/msgpack/pack_template.h +17 -9
- data/ext/enterprise_script_service/msgpack/include/msgpack/sysdep.h +27 -16
- data/ext/enterprise_script_service/msgpack/include/msgpack/type.hpp +2 -0
- data/ext/enterprise_script_service/msgpack/include/msgpack/unpack_template.h +5 -0
- data/ext/enterprise_script_service/msgpack/include/msgpack/v1/adaptor/array_ref.hpp +0 -1
- data/ext/enterprise_script_service/msgpack/include/msgpack/v1/adaptor/check_container_size.hpp +1 -1
- data/ext/enterprise_script_service/msgpack/include/msgpack/v1/adaptor/cpp11/chrono.hpp +5 -5
- data/ext/enterprise_script_service/msgpack/include/msgpack/v1/adaptor/cpp11/timespec.hpp +140 -0
- data/ext/enterprise_script_service/msgpack/include/msgpack/v1/adaptor/detail/cpp03_msgpack_tuple.hpp +32 -32
- data/ext/enterprise_script_service/msgpack/include/msgpack/v1/adaptor/detail/cpp03_msgpack_tuple_decl.hpp +32 -32
- data/ext/enterprise_script_service/msgpack/include/msgpack/v1/adaptor/detail/cpp11_msgpack_tuple.hpp +6 -6
- data/ext/enterprise_script_service/msgpack/include/msgpack/v1/adaptor/detail/cpp11_msgpack_tuple_decl.hpp +10 -10
- data/ext/enterprise_script_service/msgpack/include/msgpack/v1/adaptor/ext.hpp +1 -1
- data/ext/enterprise_script_service/msgpack/include/msgpack/v1/adaptor/fixint.hpp +5 -4
- data/ext/enterprise_script_service/msgpack/include/msgpack/v1/adaptor/int.hpp +40 -13
- data/ext/enterprise_script_service/msgpack/include/msgpack/v1/adaptor/int_decl.hpp +3 -2
- data/ext/enterprise_script_service/msgpack/include/msgpack/v1/adaptor/wstring.hpp +121 -0
- data/ext/enterprise_script_service/msgpack/include/msgpack/v1/detail/cpp03_zone.hpp +3 -3
- data/ext/enterprise_script_service/msgpack/include/msgpack/v1/detail/cpp11_zone.hpp +3 -3
- data/ext/enterprise_script_service/msgpack/include/msgpack/v1/object.hpp +6 -6
- data/ext/enterprise_script_service/msgpack/include/msgpack/v1/object_fwd.hpp +1 -1
- data/ext/enterprise_script_service/msgpack/include/msgpack/v1/pack.hpp +40 -5
- data/ext/enterprise_script_service/msgpack/include/msgpack/v1/unpack.hpp +11 -11
- data/ext/enterprise_script_service/msgpack/include/msgpack/v1/vrefbuffer.hpp +7 -7
- data/ext/enterprise_script_service/msgpack/include/msgpack/v1/zbuffer.hpp +5 -5
- data/ext/enterprise_script_service/msgpack/include/msgpack/v2/adaptor/int_decl.hpp +1 -1
- data/ext/enterprise_script_service/msgpack/include/msgpack/v2/create_object_visitor.hpp +1 -1
- data/ext/enterprise_script_service/msgpack/include/msgpack/v2/parse.hpp +13 -13
- data/ext/enterprise_script_service/msgpack/include/msgpack/v2/x3_parse.hpp +28 -26
- data/ext/enterprise_script_service/msgpack/include/msgpack/v3/adaptor/int_decl.hpp +1 -1
- data/ext/enterprise_script_service/msgpack/include/msgpack/v3/parse.hpp +13 -13
- data/ext/enterprise_script_service/msgpack/include/msgpack/version_master.h +2 -2
- data/ext/enterprise_script_service/msgpack/include/msgpack/zbuffer.h +6 -6
- data/ext/enterprise_script_service/msgpack/include/msgpack/zone.h +1 -1
- data/ext/enterprise_script_service/msgpack/src/objectc.c +83 -148
- data/ext/enterprise_script_service/msgpack/src/unpack.c +73 -47
- data/ext/enterprise_script_service/msgpack/test/CMakeLists.txt +1 -1
- data/ext/enterprise_script_service/msgpack/test/array_ref.cpp +5 -0
- data/ext/enterprise_script_service/msgpack/test/boost_fusion.cpp +5 -0
- data/ext/enterprise_script_service/msgpack/test/boost_optional.cpp +7 -0
- data/ext/enterprise_script_service/msgpack/test/boost_string_ref.cpp +7 -0
- data/ext/enterprise_script_service/msgpack/test/boost_string_view.cpp +6 -0
- data/ext/enterprise_script_service/msgpack/test/boost_variant.cpp +15 -9
- data/ext/enterprise_script_service/msgpack/test/buffer.cpp +7 -0
- data/ext/enterprise_script_service/msgpack/test/carray.cpp +7 -0
- data/ext/enterprise_script_service/msgpack/test/cases.cpp +7 -1
- data/ext/enterprise_script_service/msgpack/test/convert.cpp +6 -0
- data/ext/enterprise_script_service/msgpack/test/fixint.cpp +7 -1
- data/ext/enterprise_script_service/msgpack/test/fixint_c.cpp +6 -1
- data/ext/enterprise_script_service/msgpack/test/fuzz_unpack_pack_fuzzer_cpp11.cpp +5 -0
- data/ext/enterprise_script_service/msgpack/test/iterator_cpp11.cpp +8 -2
- data/ext/enterprise_script_service/msgpack/test/json.cpp +6 -0
- data/ext/enterprise_script_service/msgpack/test/limit.cpp +7 -0
- data/ext/enterprise_script_service/msgpack/test/msgpack_basic.cpp +128 -6
- data/ext/enterprise_script_service/msgpack/test/msgpack_c.cpp +7 -2
- data/ext/enterprise_script_service/msgpack/test/msgpack_container.cpp +20 -3
- data/ext/enterprise_script_service/msgpack/test/msgpack_cpp11.cpp +159 -0
- data/ext/enterprise_script_service/msgpack/test/msgpack_cpp17.cpp +5 -0
- data/ext/enterprise_script_service/msgpack/test/msgpack_stream.cpp +8 -3
- data/ext/enterprise_script_service/msgpack/test/msgpack_tuple.cpp +6 -0
- data/ext/enterprise_script_service/msgpack/test/msgpack_vref.cpp +5 -0
- data/ext/enterprise_script_service/msgpack/test/msgpack_x3_parse.cpp +23 -18
- data/ext/enterprise_script_service/msgpack/test/object.cpp +77 -45
- data/ext/enterprise_script_service/msgpack/test/object_with_zone.cpp +28 -10
- data/ext/enterprise_script_service/msgpack/test/pack_unpack.cpp +25 -18
- data/ext/enterprise_script_service/msgpack/test/pack_unpack_c.cpp +7 -0
- data/ext/enterprise_script_service/msgpack/test/raw.cpp +17 -12
- data/ext/enterprise_script_service/msgpack/test/reference.cpp +6 -0
- data/ext/enterprise_script_service/msgpack/test/reference_cpp11.cpp +6 -0
- data/ext/enterprise_script_service/msgpack/test/reference_wrapper_cpp11.cpp +6 -0
- data/ext/enterprise_script_service/msgpack/test/shared_ptr_cpp11.cpp +6 -0
- data/ext/enterprise_script_service/msgpack/test/size_equal_only.cpp +6 -2
- data/ext/enterprise_script_service/msgpack/test/streaming.cpp +10 -3
- data/ext/enterprise_script_service/msgpack/test/streaming_c.cpp +7 -0
- data/ext/enterprise_script_service/msgpack/test/unique_ptr_cpp11.cpp +6 -0
- data/ext/enterprise_script_service/msgpack/test/user_class.cpp +5 -0
- data/ext/enterprise_script_service/msgpack/test/version.cpp +6 -0
- data/ext/enterprise_script_service/msgpack/test/visitor.cpp +7 -0
- data/ext/enterprise_script_service/msgpack/test/zone.cpp +6 -0
- data/lib/script_core/version.rb +1 -1
- data/lib/tasks/mruby/engine.gembox.example +1 -0
- data/lib/tasks/script_core.rake +21 -3
- data/spec/dummy/app/helpers/fields_helper.rb +2 -2
- data/spec/dummy/mruby/engine.gembox +1 -0
- data/spec/script_core_spec.rb +1 -1
- metadata +38 -22
- data/ext/enterprise_script_service/mruby/mrbgems/mruby-io/.gitignore +0 -1
- data/ext/enterprise_script_service/mruby/mrbgems/mruby-io/.travis.yml +0 -2
- data/ext/enterprise_script_service/mruby/mrbgems/mruby-io/run_test.rb +0 -26
- data/ext/enterprise_script_service/mruby/mrbgems/mruby-kernel-ext/mrblib/kernel.rb +0 -15
- data/ext/enterprise_script_service/mruby/mrbgems/mruby-method/mrblib/unbound_method.rb +0 -9
- data/ext/enterprise_script_service/mruby/mrbgems/mruby-pack/.gitignore +0 -5
- data/ext/enterprise_script_service/mruby/mrbgems/mruby-pack/.travis.yml +0 -2
- data/ext/enterprise_script_service/mruby/mrbgems/mruby-pack/packtest.rb +0 -157
- data/ext/enterprise_script_service/mruby/mrbgems/mruby-pack/run_test.rb +0 -26
- data/ext/enterprise_script_service/mruby/mrbgems/mruby-random/src/mt19937ar.c +0 -224
- data/ext/enterprise_script_service/mruby/mrbgems/mruby-random/src/mt19937ar.h +0 -80
- data/ext/enterprise_script_service/mruby/mrbgems/mruby-random/src/random.h +0 -12
- data/ext/enterprise_script_service/mruby/mrbgems/mruby-sleep/.gitignore +0 -4
- data/ext/enterprise_script_service/mruby/mrbgems/mruby-sleep/.travis.yml +0 -29
- data/ext/enterprise_script_service/mruby/mrbgems/mruby-sleep/.travis_build_config.rb +0 -6
- data/ext/enterprise_script_service/mruby/mrbgems/mruby-sleep/Rakefile +0 -29
- data/ext/enterprise_script_service/mruby/mrbgems/mruby-socket/.travis.yml +0 -4
- data/ext/enterprise_script_service/mruby/mrbgems/mruby-socket/run_test.rb +0 -28
@@ -18,7 +18,7 @@
|
|
18
18
|
|
19
19
|
|
20
20
|
typedef struct {
|
21
|
-
msgpack_zone
|
21
|
+
msgpack_zone** z;
|
22
22
|
bool referenced;
|
23
23
|
} unpack_user;
|
24
24
|
|
@@ -189,15 +189,30 @@ static inline int template_callback_false(unpack_user* u, msgpack_object* o)
|
|
189
189
|
|
190
190
|
static inline int template_callback_array(unpack_user* u, unsigned int n, msgpack_object* o)
|
191
191
|
{
|
192
|
-
|
192
|
+
size_t size;
|
193
|
+
// Let's leverage the fact that sizeof(msgpack_object) is a compile time constant
|
194
|
+
// to check for int overflows.
|
195
|
+
// Note - while n is constrained to 32-bit, the product of n * sizeof(msgpack_object)
|
196
|
+
// might not be constrained to 4GB on 64-bit systems
|
197
|
+
#if SIZE_MAX == UINT_MAX
|
198
|
+
if (n > SIZE_MAX/sizeof(msgpack_object))
|
199
|
+
return MSGPACK_UNPACK_NOMEM_ERROR;
|
200
|
+
#endif
|
201
|
+
|
193
202
|
o->type = MSGPACK_OBJECT_ARRAY;
|
194
203
|
o->via.array.size = 0;
|
195
|
-
|
196
|
-
|
197
|
-
|
198
|
-
|
204
|
+
|
205
|
+
size = n * sizeof(msgpack_object);
|
206
|
+
|
207
|
+
if (*u->z == NULL) {
|
208
|
+
*u->z = msgpack_zone_new(MSGPACK_ZONE_CHUNK_SIZE);
|
209
|
+
if(*u->z == NULL) {
|
210
|
+
return MSGPACK_UNPACK_NOMEM_ERROR;
|
211
|
+
}
|
199
212
|
}
|
200
|
-
|
213
|
+
|
214
|
+
// Unsure whether size = 0 should be an error, and if so, what to return
|
215
|
+
o->via.array.ptr = (msgpack_object*)msgpack_zone_malloc(*u->z, size);
|
201
216
|
if(o->via.array.ptr == NULL) { return MSGPACK_UNPACK_NOMEM_ERROR; }
|
202
217
|
return 0;
|
203
218
|
}
|
@@ -216,15 +231,32 @@ static inline int template_callback_array_item(unpack_user* u, msgpack_object* c
|
|
216
231
|
|
217
232
|
static inline int template_callback_map(unpack_user* u, unsigned int n, msgpack_object* o)
|
218
233
|
{
|
219
|
-
|
234
|
+
size_t size;
|
235
|
+
// Let's leverage the fact that sizeof(msgpack_object_kv) is a compile time constant
|
236
|
+
// to check for int overflows
|
237
|
+
// Note - while n is constrained to 32-bit, the product of n * sizeof(msgpack_object)
|
238
|
+
// might not be constrained to 4GB on 64-bit systems
|
239
|
+
|
240
|
+
// Note - this will always be false on 64-bit systems
|
241
|
+
#if SIZE_MAX == UINT_MAX
|
242
|
+
if (n > SIZE_MAX/sizeof(msgpack_object_kv))
|
243
|
+
return MSGPACK_UNPACK_NOMEM_ERROR;
|
244
|
+
#endif
|
245
|
+
|
220
246
|
o->type = MSGPACK_OBJECT_MAP;
|
221
247
|
o->via.map.size = 0;
|
222
|
-
|
223
|
-
|
224
|
-
|
225
|
-
|
248
|
+
|
249
|
+
size = n * sizeof(msgpack_object_kv);
|
250
|
+
|
251
|
+
if (*u->z == NULL) {
|
252
|
+
*u->z = msgpack_zone_new(MSGPACK_ZONE_CHUNK_SIZE);
|
253
|
+
if(*u->z == NULL) {
|
254
|
+
return MSGPACK_UNPACK_NOMEM_ERROR;
|
255
|
+
}
|
226
256
|
}
|
227
|
-
|
257
|
+
|
258
|
+
// Should size = 0 be an error? If so, what error to return?
|
259
|
+
o->via.map.ptr = (msgpack_object_kv*)msgpack_zone_malloc(*u->z, size);
|
228
260
|
if(o->via.map.ptr == NULL) { return MSGPACK_UNPACK_NOMEM_ERROR; }
|
229
261
|
return 0;
|
230
262
|
}
|
@@ -245,8 +277,13 @@ static inline int template_callback_map_item(unpack_user* u, msgpack_object* c,
|
|
245
277
|
|
246
278
|
static inline int template_callback_str(unpack_user* u, const char* b, const char* p, unsigned int l, msgpack_object* o)
|
247
279
|
{
|
248
|
-
MSGPACK_UNUSED(u);
|
249
280
|
MSGPACK_UNUSED(b);
|
281
|
+
if (*u->z == NULL) {
|
282
|
+
*u->z = msgpack_zone_new(MSGPACK_ZONE_CHUNK_SIZE);
|
283
|
+
if(*u->z == NULL) {
|
284
|
+
return MSGPACK_UNPACK_NOMEM_ERROR;
|
285
|
+
}
|
286
|
+
}
|
250
287
|
o->type = MSGPACK_OBJECT_STR;
|
251
288
|
o->via.str.ptr = p;
|
252
289
|
o->via.str.size = l;
|
@@ -256,8 +293,13 @@ static inline int template_callback_str(unpack_user* u, const char* b, const cha
|
|
256
293
|
|
257
294
|
static inline int template_callback_bin(unpack_user* u, const char* b, const char* p, unsigned int l, msgpack_object* o)
|
258
295
|
{
|
259
|
-
MSGPACK_UNUSED(u);
|
260
296
|
MSGPACK_UNUSED(b);
|
297
|
+
if (*u->z == NULL) {
|
298
|
+
*u->z = msgpack_zone_new(MSGPACK_ZONE_CHUNK_SIZE);
|
299
|
+
if(*u->z == NULL) {
|
300
|
+
return MSGPACK_UNPACK_NOMEM_ERROR;
|
301
|
+
}
|
302
|
+
}
|
261
303
|
o->type = MSGPACK_OBJECT_BIN;
|
262
304
|
o->via.bin.ptr = p;
|
263
305
|
o->via.bin.size = l;
|
@@ -267,11 +309,16 @@ static inline int template_callback_bin(unpack_user* u, const char* b, const cha
|
|
267
309
|
|
268
310
|
static inline int template_callback_ext(unpack_user* u, const char* b, const char* p, unsigned int l, msgpack_object* o)
|
269
311
|
{
|
312
|
+
MSGPACK_UNUSED(b);
|
270
313
|
if (l == 0) {
|
271
314
|
return MSGPACK_UNPACK_PARSE_ERROR;
|
272
315
|
}
|
273
|
-
|
274
|
-
|
316
|
+
if (*u->z == NULL) {
|
317
|
+
*u->z = msgpack_zone_new(MSGPACK_ZONE_CHUNK_SIZE);
|
318
|
+
if(*u->z == NULL) {
|
319
|
+
return MSGPACK_UNPACK_NOMEM_ERROR;
|
320
|
+
}
|
321
|
+
}
|
275
322
|
o->type = MSGPACK_OBJECT_EXT;
|
276
323
|
o->via.ext.type = *p;
|
277
324
|
o->via.ext.ptr = p + 1;
|
@@ -317,7 +364,6 @@ bool msgpack_unpacker_init(msgpack_unpacker* mpac, size_t initial_buffer_size)
|
|
317
364
|
{
|
318
365
|
char* buffer;
|
319
366
|
void* ctx;
|
320
|
-
msgpack_zone* z;
|
321
367
|
|
322
368
|
if(initial_buffer_size < COUNTER_SIZE) {
|
323
369
|
initial_buffer_size = COUNTER_SIZE;
|
@@ -334,26 +380,19 @@ bool msgpack_unpacker_init(msgpack_unpacker* mpac, size_t initial_buffer_size)
|
|
334
380
|
return false;
|
335
381
|
}
|
336
382
|
|
337
|
-
z = msgpack_zone_new(MSGPACK_ZONE_CHUNK_SIZE);
|
338
|
-
if(z == NULL) {
|
339
|
-
free(ctx);
|
340
|
-
free(buffer);
|
341
|
-
return false;
|
342
|
-
}
|
343
|
-
|
344
383
|
mpac->buffer = buffer;
|
345
384
|
mpac->used = COUNTER_SIZE;
|
346
385
|
mpac->free = initial_buffer_size - mpac->used;
|
347
386
|
mpac->off = COUNTER_SIZE;
|
348
387
|
mpac->parsed = 0;
|
349
388
|
mpac->initial_buffer_size = initial_buffer_size;
|
350
|
-
mpac->z =
|
389
|
+
mpac->z = NULL;
|
351
390
|
mpac->ctx = ctx;
|
352
391
|
|
353
392
|
init_count(mpac->buffer);
|
354
393
|
|
355
394
|
template_init(CTX_CAST(mpac->ctx));
|
356
|
-
CTX_CAST(mpac->ctx)->user.z = mpac->z;
|
395
|
+
CTX_CAST(mpac->ctx)->user.z = &mpac->z;
|
357
396
|
CTX_CAST(mpac->ctx)->user.referenced = false;
|
358
397
|
|
359
398
|
return true;
|
@@ -480,21 +519,15 @@ msgpack_object msgpack_unpacker_data(msgpack_unpacker* mpac)
|
|
480
519
|
|
481
520
|
msgpack_zone* msgpack_unpacker_release_zone(msgpack_unpacker* mpac)
|
482
521
|
{
|
483
|
-
msgpack_zone*
|
484
|
-
msgpack_zone* old;
|
522
|
+
msgpack_zone* old = mpac->z;
|
485
523
|
|
524
|
+
if (old == NULL) return NULL;
|
486
525
|
if(!msgpack_unpacker_flush_zone(mpac)) {
|
487
526
|
return NULL;
|
488
527
|
}
|
489
528
|
|
490
|
-
|
491
|
-
|
492
|
-
return NULL;
|
493
|
-
}
|
494
|
-
|
495
|
-
old = mpac->z;
|
496
|
-
mpac->z = r;
|
497
|
-
CTX_CAST(mpac->ctx)->user.z = mpac->z;
|
529
|
+
mpac->z = NULL;
|
530
|
+
CTX_CAST(mpac->ctx)->user.z = &mpac->z;
|
498
531
|
|
499
532
|
return old;
|
500
533
|
}
|
@@ -596,7 +629,7 @@ msgpack_unpack(const char* data, size_t len, size_t* off,
|
|
596
629
|
template_context ctx;
|
597
630
|
template_init(&ctx);
|
598
631
|
|
599
|
-
ctx.user.z = result_zone;
|
632
|
+
ctx.user.z = &result_zone;
|
600
633
|
ctx.user.referenced = false;
|
601
634
|
|
602
635
|
e = template_execute(&ctx, data, len, &noff);
|
@@ -633,19 +666,12 @@ msgpack_unpack_next(msgpack_unpacked* result,
|
|
633
666
|
return MSGPACK_UNPACK_CONTINUE;
|
634
667
|
}
|
635
668
|
|
636
|
-
|
637
|
-
result->zone = msgpack_zone_new(MSGPACK_ZONE_CHUNK_SIZE);
|
638
|
-
}
|
639
|
-
|
640
|
-
if (!result->zone) {
|
641
|
-
return MSGPACK_UNPACK_NOMEM_ERROR;
|
642
|
-
}
|
643
|
-
else {
|
669
|
+
{
|
644
670
|
int e;
|
645
671
|
template_context ctx;
|
646
672
|
template_init(&ctx);
|
647
673
|
|
648
|
-
ctx.user.z = result->zone;
|
674
|
+
ctx.user.z = &result->zone;
|
649
675
|
ctx.user.referenced = false;
|
650
676
|
|
651
677
|
e = template_execute(&ctx, data, len, &noff);
|
@@ -89,7 +89,7 @@ FOREACH (source_file ${check_PROGRAMS})
|
|
89
89
|
)
|
90
90
|
ADD_TEST (${source_file_we} ${source_file_we})
|
91
91
|
IF ("${CMAKE_CXX_COMPILER_ID}" STREQUAL "Clang" OR "${CMAKE_CXX_COMPILER_ID}" STREQUAL "GNU")
|
92
|
-
SET_PROPERTY (TARGET ${source_file_we} APPEND_STRING PROPERTY COMPILE_FLAGS " -Wall -Wextra")
|
92
|
+
SET_PROPERTY (TARGET ${source_file_we} APPEND_STRING PROPERTY COMPILE_FLAGS " -Wall -Wextra -Wconversion")
|
93
93
|
ENDIF ()
|
94
94
|
IF ("${CMAKE_CXX_COMPILER_ID}" STREQUAL "Clang")
|
95
95
|
SET_PROPERTY (TARGET ${source_file_we} APPEND_STRING PROPERTY COMPILE_FLAGS " -Wno-mismatched-tags")
|
@@ -1,8 +1,15 @@
|
|
1
1
|
#include <msgpack.hpp>
|
2
2
|
#include <sstream>
|
3
3
|
#include <iterator>
|
4
|
+
|
5
|
+
#pragma GCC diagnostic push
|
6
|
+
#pragma GCC diagnostic ignored "-Wconversion"
|
7
|
+
|
4
8
|
#include <gtest/gtest.h>
|
5
9
|
|
10
|
+
#pragma GCC diagnostic pop
|
11
|
+
|
12
|
+
|
6
13
|
#ifdef HAVE_CONFIG_H
|
7
14
|
#include "config.h"
|
8
15
|
#endif
|
@@ -1,8 +1,15 @@
|
|
1
1
|
#include <msgpack.hpp>
|
2
2
|
#include <sstream>
|
3
3
|
#include <iterator>
|
4
|
+
|
5
|
+
#pragma GCC diagnostic push
|
6
|
+
#pragma GCC diagnostic ignored "-Wconversion"
|
7
|
+
|
4
8
|
#include <gtest/gtest.h>
|
5
9
|
|
10
|
+
#pragma GCC diagnostic pop
|
11
|
+
|
12
|
+
|
6
13
|
#ifdef HAVE_CONFIG_H
|
7
14
|
#include "config.h"
|
8
15
|
#endif
|
@@ -1,8 +1,14 @@
|
|
1
1
|
#include <msgpack.hpp>
|
2
2
|
#include <sstream>
|
3
3
|
#include <iterator>
|
4
|
+
|
5
|
+
#pragma GCC diagnostic push
|
6
|
+
#pragma GCC diagnostic ignored "-Wconversion"
|
7
|
+
|
4
8
|
#include <gtest/gtest.h>
|
5
9
|
|
10
|
+
#pragma GCC diagnostic pop
|
11
|
+
|
6
12
|
#ifdef HAVE_CONFIG_H
|
7
13
|
#include "config.h"
|
8
14
|
#endif
|
@@ -2,8 +2,14 @@
|
|
2
2
|
#include <msgpack.hpp>
|
3
3
|
#include <sstream>
|
4
4
|
#include <iterator>
|
5
|
+
|
6
|
+
#pragma GCC diagnostic push
|
7
|
+
#pragma GCC diagnostic ignored "-Wconversion"
|
8
|
+
|
5
9
|
#include <gtest/gtest.h>
|
6
10
|
|
11
|
+
#pragma GCC diagnostic pop
|
12
|
+
|
7
13
|
#ifdef HAVE_CONFIG_H
|
8
14
|
#include "config.h"
|
9
15
|
#endif
|
@@ -393,10 +399,10 @@ TEST(MSGPACK_BOOST, object_with_zone_variant_raw_ref)
|
|
393
399
|
v.push_back('a');
|
394
400
|
v.push_back('b');
|
395
401
|
v.push_back('c');
|
396
|
-
msgpack::type::raw_ref rr(&v.front(), v.size());
|
402
|
+
msgpack::type::raw_ref rr(&v.front(), static_cast<uint32_t>(v.size()));
|
397
403
|
msgpack::type::variant val1 = rr;
|
398
404
|
EXPECT_TRUE(val1.is_raw_ref());
|
399
|
-
EXPECT_EQ(val1.as_raw_ref(), msgpack::type::raw_ref(&v.front(), v.size()));
|
405
|
+
EXPECT_EQ(val1.as_raw_ref(), msgpack::type::raw_ref(&v.front(), static_cast<uint32_t>(v.size())));
|
400
406
|
msgpack::object obj(val1, z);
|
401
407
|
msgpack::type::variant val2 = obj.as<msgpack::type::variant>();
|
402
408
|
// Converted as std::vector<char>.
|
@@ -418,7 +424,7 @@ TEST(MSGPACK_BOOST, pack_convert_variant_ext)
|
|
418
424
|
v.push_back('a');
|
419
425
|
v.push_back('b');
|
420
426
|
v.push_back('c');
|
421
|
-
msgpack::type::ext e(42, v.data(), v.size());
|
427
|
+
msgpack::type::ext e(42, v.data(), static_cast<uint32_t>(v.size()));
|
422
428
|
msgpack::type::variant val1(e);
|
423
429
|
EXPECT_TRUE(val1.is_ext());
|
424
430
|
EXPECT_EQ(val1.as_ext(), e);
|
@@ -443,7 +449,7 @@ TEST(MSGPACK_BOOST, object_with_zone_variant_ext)
|
|
443
449
|
v.push_back('a');
|
444
450
|
v.push_back('b');
|
445
451
|
v.push_back('c');
|
446
|
-
msgpack::type::ext e(42, v.data(), v.size());
|
452
|
+
msgpack::type::ext e(42, v.data(), static_cast<uint32_t>(v.size()));
|
447
453
|
msgpack::type::variant val1(e);
|
448
454
|
EXPECT_TRUE(val1.is_ext());
|
449
455
|
EXPECT_EQ(val1.as_ext(), e);
|
@@ -463,7 +469,7 @@ TEST(MSGPACK_BOOST, object_with_zone_variant_ext_ref)
|
|
463
469
|
v.push_back('a');
|
464
470
|
v.push_back('b');
|
465
471
|
v.push_back('c');
|
466
|
-
msgpack::type::ext_ref e(v.data(), v.size());
|
472
|
+
msgpack::type::ext_ref e(v.data(), static_cast<uint32_t>(v.size()));
|
467
473
|
msgpack::type::variant val1(e);
|
468
474
|
EXPECT_TRUE(val1.is_ext_ref());
|
469
475
|
EXPECT_EQ(val1.as_ext_ref(), e);
|
@@ -616,7 +622,7 @@ TEST(MSGPACK_BOOST, pack_convert_variant_ref_bin)
|
|
616
622
|
v.push_back('a');
|
617
623
|
v.push_back('b');
|
618
624
|
v.push_back('c');
|
619
|
-
msgpack::type::raw_ref rr(v.data(), v.size());
|
625
|
+
msgpack::type::raw_ref rr(v.data(), static_cast<uint32_t>(v.size()));
|
620
626
|
msgpack::type::variant_ref val1 = rr;
|
621
627
|
EXPECT_TRUE(val1.is_raw_ref());
|
622
628
|
EXPECT_EQ(val1.as_raw_ref(), rr);
|
@@ -641,7 +647,7 @@ TEST(MSGPACK_BOOST, object_with_zone_variant_ref_bin)
|
|
641
647
|
v.push_back('a');
|
642
648
|
v.push_back('b');
|
643
649
|
v.push_back('c');
|
644
|
-
msgpack::type::raw_ref rr(v.data(), v.size());
|
650
|
+
msgpack::type::raw_ref rr(v.data(), static_cast<uint32_t>(v.size()));
|
645
651
|
msgpack::type::variant_ref val1 = rr;
|
646
652
|
EXPECT_TRUE(val1.is_raw_ref());
|
647
653
|
EXPECT_EQ(val1.as_raw_ref(), rr);
|
@@ -663,7 +669,7 @@ TEST(MSGPACK_BOOST, pack_convert_variant_ref_ext)
|
|
663
669
|
v.push_back('a');
|
664
670
|
v.push_back('b');
|
665
671
|
v.push_back('c');
|
666
|
-
msgpack::type::ext_ref er(v.data(), v.size());
|
672
|
+
msgpack::type::ext_ref er(v.data(), static_cast<uint32_t>(v.size()));
|
667
673
|
msgpack::type::variant_ref val1(er);
|
668
674
|
EXPECT_TRUE(val1.is_ext_ref());
|
669
675
|
EXPECT_EQ(val1.as_ext_ref(), er);
|
@@ -688,7 +694,7 @@ TEST(MSGPACK_BOOST, object_with_zone_variant_ref_ext)
|
|
688
694
|
v.push_back('a');
|
689
695
|
v.push_back('b');
|
690
696
|
v.push_back('c');
|
691
|
-
msgpack::type::ext_ref er(v.data(), v.size());
|
697
|
+
msgpack::type::ext_ref er(v.data(), static_cast<uint32_t>(v.size()));
|
692
698
|
msgpack::type::variant_ref val1(er);
|
693
699
|
EXPECT_TRUE(val1.is_ext_ref());
|
694
700
|
EXPECT_EQ(val1.as_ext_ref(), er);
|
@@ -3,7 +3,14 @@
|
|
3
3
|
#include <msgpack/fbuffer.h>
|
4
4
|
#include <msgpack/zbuffer.hpp>
|
5
5
|
#include <msgpack/zbuffer.h>
|
6
|
+
|
7
|
+
#pragma GCC diagnostic push
|
8
|
+
#pragma GCC diagnostic ignored "-Wconversion"
|
9
|
+
|
6
10
|
#include <gtest/gtest.h>
|
11
|
+
|
12
|
+
#pragma GCC diagnostic pop
|
13
|
+
|
7
14
|
#include <string.h>
|
8
15
|
|
9
16
|
TEST(buffer, sbuffer)
|
@@ -1,13 +1,19 @@
|
|
1
1
|
#include <msgpack.hpp>
|
2
2
|
#include <fstream>
|
3
|
+
|
4
|
+
#pragma GCC diagnostic push
|
5
|
+
#pragma GCC diagnostic ignored "-Wconversion"
|
6
|
+
|
3
7
|
#include <gtest/gtest.h>
|
4
8
|
|
9
|
+
#pragma GCC diagnostic pop
|
10
|
+
|
5
11
|
static void feed_file(msgpack::unpacker& pac, const char* path)
|
6
12
|
{
|
7
13
|
std::ifstream fin(path);
|
8
14
|
while(true) {
|
9
15
|
pac.reserve_buffer(32*1024);
|
10
|
-
fin.read(pac.buffer(), pac.buffer_capacity());
|
16
|
+
fin.read(pac.buffer(), static_cast<std::streamsize>(pac.buffer_capacity()));
|
11
17
|
if(fin.bad()) {
|
12
18
|
throw std::runtime_error("read failed");
|
13
19
|
}
|