Skip to content
Merged
Show file tree
Hide file tree
Changes from 22 commits
Commits
Show all changes
23 commits
Select commit Hold shift + click to select a range
2c9cf6b
merge revision(s) 44425,44460: [Backport #9320]
nurse Feb 24, 2014
ba39ed7
bump version to 2.1.2
nurse Feb 24, 2014
3b12b75
merge revision(s) 44433: [Backport #9299]
nurse Mar 1, 2014
d5c45b5
merge revision(s) 44370: [Backport #9576]
nurse Mar 1, 2014
3159b64
merge revision(s) 44432: [Backport #9299]
nurse Mar 1, 2014
ccbe6f3
merge revision(s) r45225,r45240,r45488: [Backport #9578] [Backport #9…
nagachika May 1, 2014
fa375ea
merge revision(s) r45518: [Backport #9578] [Backport #9630] [Backport…
nagachika May 1, 2014
7afd1c5
merge revision(s) r45271: [Backport #9592] [Backport #9671]
nagachika May 1, 2014
1b814b5
merge revision(s) r45393: [Backport #9668]
nagachika May 4, 2014
f55b93f
merge revision(s) r45221: [Backport #9798]
nagachika May 4, 2014
e6a782e
merge revision(s) r45453,r45455,r45577: [Backport #9798]
nagachika May 4, 2014
23bed1e
merge revision(s) r45015: [Backport #9657]
nagachika May 4, 2014
d8eba40
merge revision(s) r45468: [Backport #9687]
nagachika May 4, 2014
916c913
merge revision(s) r45638: [Backport #9518]
nagachika May 4, 2014
e82dd50
merge revision(s) r45298,r45311: [Backport #9518]
nagachika May 4, 2014
0385f54
merge revision(s) r45291,r45299,r45314,r45325: [Backport #9518]
nagachika May 4, 2014
eabdb7b
merge revision(s) r45595: [Backport #9743] [Backport #9745]
nagachika May 4, 2014
006bb0b
merge revision(s) r45760: [Backport #9796]
nagachika May 5, 2014
dfaab03
merge revision(s) r44619:
nagachika May 7, 2014
b0a974d
merge revision(s) r45190,r45202,r45204,r45713: [Backport #9586]
nagachika May 7, 2014
e9dce8d
add tag v2_1_2
nagachika May 8, 2014
0124377
Merge tag 'v2_1_2' into merge-upstream-2.1.2
dbussink May 10, 2014
9a21a49
Cleanup Changelog merge lines
dbussink May 12, 2014
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
121 changes: 121 additions & 0 deletions ChangeLog
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,127 @@ Thu Mar 6 10:33:31 2014 Martin Bosslet <Martin.Bosslet@gmail.com>
Reported by Jeff Hodges.
[ruby-core:59829] [Bug #9424]

Thu May 8 01:13:10 2014 NARUSE, Yui <naruse@ruby-lang.org>

* configure.in: correct pthread_setname_np's prototype on NetBSD.
[Bug #9586]

Tue May 6 00:54:56 2014 Narihiro Nakamura <authornari@gmail.com>

* gc.c (gc_after_sweep): suppress unnecessary expanding heap.
Tomb heap pages are freed pages here, so expanding heap is
not required.

Mon May 5 02:35:20 2014 Nobuyoshi Nakada <nobu@ruby-lang.org>

* ext/openssl/ossl_pkey.c (ossl_pkey_verify): as EVP_VerifyFinal()
finalizes only a copy of the digest context, the context must be
cleaned up after initialization by EVP_MD_CTX_cleanup() or a
memory leak will occur. [ruby-core:62038] [Bug #9743]

Mon May 5 02:21:48 2014 Nobuyoshi Nakada <nobu@ruby-lang.org>

* ext/dl/cptr.c (dlptr_free), ext/dl/handle.c (dlhandle_free),
ext/fiddle/handle.c (fiddle_handle_free),
ext/fiddle/pointer.c (fiddle_ptr_free): fix memory leak.
based on the patch Heesob Park at [ruby-dev:48021] [Bug #9599].

Mon May 5 01:20:27 2014 Eric Wong <e@80x24.org>

* gc.c (rb_gc_writebarrier): drop special case for big hash/array
[Bug #9518]

Mon May 5 01:13:00 2014 Koichi Sasada <ko1@atdot.net>

* gc.c (gc_before_sweep): cap `malloc_limit' to
gc_params.malloc_limit_max. It can grow and grow with such case:
`loop{"a" * (1024 ** 2)}'
[Bug #9687]

This issue is pointed by Tim Robertson.
http://www.omniref.com/blog/blog/2014/03/27/ruby-garbage-collection-still-not-ready-for-production/

Mon May 5 00:52:18 2014 Kenta Murata <mrkn@mrkn.jp>

* ext/bigdecimal/bigdecimal.c (BigDecimal_initialize): Insert GC guard.

* ext/bigdecimal/bigdecimal.c (BigDecimal_global_new): ditto.

Mon May 5 00:42:35 2014 SHIBATA Hiroshi <shibata.hiroshi@gmail.com>

* ext/psych/psych.gemspec: update gemspec for psych-2.0.5

Mon May 5 00:42:35 2014 SHIBATA Hiroshi <shibata.hiroshi@gmail.com>

* ext/psych/lib/psych.rb: Merge psych-2.0.5. bump version to
libyaml-0.1.6 for CVE-2014-2525.
* ext/psych/yaml/config.h: ditto.
* ext/psych/yaml/scanner.c: ditto.
* ext/psych/yaml/yaml_private.h: ditto.

Mon May 5 00:35:20 2014 Aaron Patterson <aaron@tenderlovemaking.com>

* ext/psych/lib/psych/visitors/yaml_tree.rb: support dumping Encoding
objects.

* ext/psych/lib/psych/visitors/to_ruby.rb: support loading Encoding
objects.

* test/psych/test_encoding.rb: add test

* ext/psych/lib/psych.rb: add version

Mon May 5 00:16:35 2014 SHIBATA Hiroshi <shibata.hiroshi@gmail.com>

* gc.c: Fix up default GC params by @csfrancis [fix GH-556]

Fri May 2 00:19:36 2014 Nobuyoshi Nakada <nobu@ruby-lang.org>

* ext/openssl/ossl.c (ossl_make_error): check NULL for unknown
error reasons with old OpenSSL, and insert a colon iff formatted
message is not empty.

Thu May 1 20:56:56 2014 Nobuyoshi Nakada <nobu@ruby-lang.org>

* ext/readline/extconf.rb (rl_hook_func_t): check pointer type.
[ruby-dev:48089] [Bug #9702]

Thu May 1 20:47:08 2014 Nobuyoshi Nakada <nobu@ruby-lang.org>

* ext/readline/extconf.rb: fix typo, `$defs` not `$DEFS`.
[ruby-core:61756] [Bug #9578]

Thu May 1 20:47:08 2014 Nobuyoshi Nakada <nobu@ruby-lang.org>

* ext/readline/extconf.rb (rl_hook_func_t): define as Function for
very old readline versions. [ruby-core:61209] [Bug #9578]

Thu May 1 20:47:08 2014 Tanaka Akira <akr@fsij.org>

* ext/readline/readline.c (Init_readline): Use rl_hook_func_t instead
of Function to support readline-6.3. (rl_hook_func_t is available
since readline-4.2.)
Reported by Dmitry Medvinsky. [ruby-core:61141] [Bug #9578]

Sat Mar 1 21:00:27 2014 Marc-Andre Lafortune <ruby-core@marc-andre.ca>

* proc.c: Having optional keyword arguments makes maximum arity +1,
not unlimited [#8072]

Sat Mar 1 17:25:12 2014 Marc-Andre Lafortune <ruby-core@marc-andre.ca>

* proc.c: Having any mandatory keyword argument increases min arity
[#9299]

Mon Feb 24 14:56:41 2014 WATANABE Hirofumi <eban@ruby-lang.org>

* tool/make-snapshot: needs CXXFLAGS. [ruby-core:59393][Bug #9320]

Mon Feb 24 14:56:41 2014 NAKAMURA Usaku <usa@ruby-lang.org>

* tool/make-snapshot: support new version scheme.
>>>>>>> v2_1_2
Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

👀

Copy link
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks, cleaned these up.


Mon Feb 24 13:05:48 2014 Aaron Patterson <aaron@tenderlovemaking.com>

* ext/psych/lib/psych.rb: New release of psych.
Expand Down
30 changes: 30 additions & 0 deletions configure.in
Original file line number Diff line number Diff line change
Expand Up @@ -2455,6 +2455,36 @@ if test x"$enable_pthread" = xyes; then
else
AC_CHECK_FUNCS(pthread_attr_init)
fi
if test "$ac_cv_func_pthread_setname_np" = yes; then
AC_CACHE_CHECK([arguments of pthread_setname_np], [rb_cv_func_pthread_setname_np_arguments],
[rb_cv_func_pthread_setname_np_arguments=
# Linux,AIX, (pthread_self(), name)
# NetBSD (pthread_self(), name, \"%s\")
# Darwin (name)
for mac in \
"(pthread_self(), name)" \
"(pthread_self(), name, \"%s\")" \
"(name)" \
; do
AC_TRY_COMPILE([
@%:@include <pthread.h>
@%:@ifdef HAVE_PTHREAD_NP_H
@%:@include <pthread_np.h>
@%:@endif
@%:@define SET_THREAD_NAME(name) pthread_setname_np${mac}
],
[if (SET_THREAD_NAME("conftest")) return 1;],
[rb_cv_func_pthread_setname_np_arguments="${mac}"
break])
done
]
)
if test -n "${rb_cv_func_pthread_setname_np_arguments}"; then
AC_DEFINE_UNQUOTED(SET_THREAD_NAME(name), pthread_setname_np${rb_cv_func_pthread_setname_np_arguments})
else
AC_DEFINE_UNQUOTED(SET_THREAD_NAME(name), (void)0)
fi
fi
fi
if test x"$ac_cv_header_ucontext_h" = xyes; then
if test x"$rb_with_pthread" = xyes; then
Expand Down
9 changes: 7 additions & 2 deletions ext/bigdecimal/bigdecimal.c
Original file line number Diff line number Diff line change
Expand Up @@ -2456,9 +2456,11 @@ static Real *BigDecimal_new(int argc, VALUE *argv);
static VALUE
BigDecimal_initialize(int argc, VALUE *argv, VALUE self)
{
ENTER(1);
Real *pv = rb_check_typeddata(self, &BigDecimal_data_type);
Real *x = BigDecimal_new(argc, argv);
Real *x;

GUARD_OBJ(x, BigDecimal_new(argc, argv));
if (ToValue(x)) {
pv = VpCopy(pv, x);
}
Expand Down Expand Up @@ -2539,7 +2541,10 @@ BigDecimal_new(int argc, VALUE *argv)
static VALUE
BigDecimal_global_new(int argc, VALUE *argv, VALUE self)
{
Real *pv = BigDecimal_new(argc, argv);
ENTER(1);
Real *pv;

GUARD_OBJ(pv, BigDecimal_new(argc, argv));
if (ToValue(pv)) pv = VpCopy(NULL, pv);
pv->obj = TypedData_Wrap_Struct(rb_cBigDecimal, &BigDecimal_data_type, pv);
return pv->obj;
Expand Down
1 change: 1 addition & 0 deletions ext/dl/cptr.c
Original file line number Diff line number Diff line change
Expand Up @@ -49,6 +49,7 @@ dlptr_free(void *ptr)
(*(data->free))(data->ptr);
}
}
xfree(ptr);
}

static size_t
Expand Down
1 change: 1 addition & 0 deletions ext/dl/handle.c
Original file line number Diff line number Diff line change
Expand Up @@ -38,6 +38,7 @@ dlhandle_free(void *ptr)
if( dlhandle->ptr && dlhandle->open && dlhandle->enable_close ){
dlclose(dlhandle->ptr);
}
xfree(ptr);
}

static size_t
Expand Down
1 change: 1 addition & 0 deletions ext/fiddle/handle.c
Original file line number Diff line number Diff line change
Expand Up @@ -40,6 +40,7 @@ fiddle_handle_free(void *ptr)
if( fiddle_handle->ptr && fiddle_handle->open && fiddle_handle->enable_close ){
dlclose(fiddle_handle->ptr);
}
xfree(ptr);
}

static size_t
Expand Down
1 change: 1 addition & 0 deletions ext/fiddle/pointer.c
Original file line number Diff line number Diff line change
Expand Up @@ -56,6 +56,7 @@ fiddle_ptr_free(void *ptr)
(*(data->free))(data->ptr);
}
}
xfree(ptr);
}

static size_t
Expand Down
5 changes: 3 additions & 2 deletions ext/openssl/ossl.c
Original file line number Diff line number Diff line change
Expand Up @@ -311,10 +311,11 @@ ossl_make_error(VALUE exc, const char *fmt, va_list args)
else
msg = ERR_reason_error_string(e);
if (NIL_P(str)) {
str = rb_str_new_cstr(msg);
if (msg) str = rb_str_new_cstr(msg);
}
else {
rb_str_cat2(rb_str_cat2(str, ": "), msg);
if (RSTRING_LEN(str)) rb_str_cat2(str, ": ");
rb_str_cat2(str, msg ? msg : "(null)");
}
}
if (dOSSL == Qtrue){ /* show all errors on the stack */
Expand Down
7 changes: 5 additions & 2 deletions ext/openssl/ossl_pkey.c
Original file line number Diff line number Diff line change
Expand Up @@ -318,13 +318,16 @@ ossl_pkey_verify(VALUE self, VALUE digest, VALUE sig, VALUE data)
{
EVP_PKEY *pkey;
EVP_MD_CTX ctx;
int result;

GetPKey(self, pkey);
EVP_VerifyInit(&ctx, GetDigestPtr(digest));
StringValue(sig);
StringValue(data);
EVP_VerifyInit(&ctx, GetDigestPtr(digest));
EVP_VerifyUpdate(&ctx, RSTRING_PTR(data), RSTRING_LEN(data));
switch (EVP_VerifyFinal(&ctx, (unsigned char *)RSTRING_PTR(sig), RSTRING_LENINT(sig), pkey)) {
result = EVP_VerifyFinal(&ctx, (unsigned char *)RSTRING_PTR(sig), RSTRING_LENINT(sig), pkey);
EVP_MD_CTX_cleanup(&ctx);
switch (result) {
case 0:
return Qfalse;
case 1:
Expand Down
4 changes: 2 additions & 2 deletions ext/psych/lib/psych.rb
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@
#
# Psych is a YAML parser and emitter.
# Psych leverages libyaml [Home page: http://pyyaml.org/wiki/LibYAML]
# or [Git repo: https://github.com/zerotao/libyaml] for its YAML parsing
# or [HG repo: https://bitbucket.org/xi/libyaml] for its YAML parsing
# and emitting capabilities. In addition to wrapping libyaml, Psych also
# knows how to serialize and de-serialize most Ruby objects to and from
# the YAML format.
Expand Down Expand Up @@ -217,7 +217,7 @@

module Psych
# The version is Psych you're using
VERSION = '2.0.3'
VERSION = '2.0.5'

# The version of libyaml Psych is using
LIBYAML_VERSION = Psych.libyaml_version.join '.'
Expand Down
2 changes: 2 additions & 0 deletions ext/psych/lib/psych/visitors/to_ruby.rb
Original file line number Diff line number Diff line change
Expand Up @@ -75,6 +75,8 @@ def deserialize o
class_loader.date_time
require 'date'
@ss.parse_time(o.value).to_datetime
when '!ruby/encoding'
::Encoding.find o.value
when "!ruby/object:Complex"
class_loader.complex
Complex(o.value)
Expand Down
5 changes: 5 additions & 0 deletions ext/psych/lib/psych/visitors/yaml_tree.rb
Original file line number Diff line number Diff line change
Expand Up @@ -157,6 +157,11 @@ def visit_Psych_Omap o
@emitter.end_sequence
end

def visit_Encoding o
tag = "!ruby/encoding"
@emitter.scalar o.name, nil, tag, false, false, Nodes::Scalar::ANY
end

def visit_Object o
tag = Psych.dump_tags[o.class]
unless tag
Expand Down
6 changes: 3 additions & 3 deletions ext/psych/psych.gemspec
Original file line number Diff line number Diff line change
Expand Up @@ -2,12 +2,12 @@

Gem::Specification.new do |s|
s.name = "psych"
s.version = "2.0.3"
s.version = "2.0.5"

s.required_rubygems_version = Gem::Requirement.new(">= 0") if s.respond_to? :required_rubygems_version=
s.require_paths = ["lib"]
s.authors = ["Aaron Patterson"]
s.date = "2014-02-04"
s.date = "2014-03-27"
s.description = "Psych is a YAML parser and emitter. Psych leverages libyaml[http://pyyaml.org/wiki/LibYAML]\nfor its YAML parsing and emitting capabilities. In addition to wrapping\nlibyaml, Psych also knows how to serialize and de-serialize most Ruby objects\nto and from the YAML format."
s.email = ["aaron@tenderlovemaking.com"]
s.extensions = ["ext/psych/extconf.rb"]
Expand All @@ -17,7 +17,7 @@ Gem::Specification.new do |s|
s.rdoc_options = ["--main", "README.rdoc"]
s.required_ruby_version = Gem::Requirement.new(">= 1.9.2")
s.rubyforge_project = "psych"
s.rubygems_version = "2.2.1"
s.rubygems_version = "2.2.2"
s.summary = "Psych is a YAML parser and emitter"
s.test_files = ["test/psych/handlers/test_recorder.rb", "test/psych/json/test_stream.rb", "test/psych/nodes/test_enumerable.rb", "test/psych/test_alias_and_anchor.rb", "test/psych/test_array.rb", "test/psych/test_boolean.rb", "test/psych/test_class.rb", "test/psych/test_coder.rb", "test/psych/test_date_time.rb", "test/psych/test_deprecated.rb", "test/psych/test_document.rb", "test/psych/test_emitter.rb", "test/psych/test_encoding.rb", "test/psych/test_engine_manager.rb", "test/psych/test_exception.rb", "test/psych/test_hash.rb", "test/psych/test_json_tree.rb", "test/psych/test_merge_keys.rb", "test/psych/test_nil.rb", "test/psych/test_null.rb", "test/psych/test_numeric.rb", "test/psych/test_object.rb", "test/psych/test_object_references.rb", "test/psych/test_omap.rb", "test/psych/test_parser.rb", "test/psych/test_psych.rb", "test/psych/test_safe_load.rb", "test/psych/test_scalar.rb", "test/psych/test_scalar_scanner.rb", "test/psych/test_serialize_subclasses.rb", "test/psych/test_set.rb", "test/psych/test_stream.rb", "test/psych/test_string.rb", "test/psych/test_struct.rb", "test/psych/test_symbol.rb", "test/psych/test_tainted.rb", "test/psych/test_to_yaml_properties.rb", "test/psych/test_tree_builder.rb", "test/psych/test_yaml.rb", "test/psych/test_yamldbm.rb", "test/psych/test_yamlstore.rb", "test/psych/visitors/test_depth_first.rb", "test/psych/visitors/test_emitter.rb", "test/psych/visitors/test_to_ruby.rb", "test/psych/visitors/test_yaml_tree.rb"]
end
9 changes: 4 additions & 5 deletions ext/psych/yaml/config.h
Original file line number Diff line number Diff line change
@@ -1,11 +1,10 @@

#define PACKAGE_NAME "yaml"
#define PACKAGE_TARNAME "yaml"
#define PACKAGE_VERSION "0.1.5"
#define PACKAGE_STRING "yaml 0.1.5"
#define PACKAGE_VERSION "0.1.6"
#define PACKAGE_STRING "yaml 0.1.6"
#define PACKAGE_BUGREPORT "http://pyyaml.org/newticket?component libyaml"
#define PACKAGE_URL ""
#define YAML_VERSION_MAJOR 0
#define YAML_VERSION_MINOR 1
#define YAML_VERSION_PATCH 5
#define YAML_VERSION_STRING "0.1.5"
#define YAML_VERSION_PATCH 6
#define YAML_VERSION_STRING "0.1.6"
3 changes: 3 additions & 0 deletions ext/psych/yaml/scanner.c
Original file line number Diff line number Diff line change
Expand Up @@ -2629,6 +2629,9 @@ yaml_parser_scan_tag_uri(yaml_parser_t *parser, int directive,
/* Check if it is a URI-escape sequence. */

if (CHECK(parser->buffer, '%')) {
if (!STRING_EXTEND(parser, string))
goto error;

if (!yaml_parser_scan_uri_escapes(parser,
directive, start_mark, &string)) goto error;
}
Expand Down
7 changes: 5 additions & 2 deletions ext/psych/yaml/yaml_private.h
Original file line number Diff line number Diff line change
Expand Up @@ -146,9 +146,12 @@ yaml_string_join(
(string).start = (string).pointer = (string).end = 0)

#define STRING_EXTEND(context,string) \
(((string).pointer+5 < (string).end) \
((((string).pointer+5 < (string).end) \
|| yaml_string_extend(&(string).start, \
&(string).pointer, &(string).end))
&(string).pointer, &(string).end)) ? \
1 : \
((context)->error = YAML_MEMORY_ERROR, \
0))

#define CLEAR(context,string) \
((string).pointer = (string).start, \
Expand Down
3 changes: 0 additions & 3 deletions ext/readline/extconf.rb
Original file line number Diff line number Diff line change
Expand Up @@ -99,9 +99,6 @@ def readline.have_type(type)
readline.have_func("rl_insert_text")
readline.have_func("rl_delete_text")
unless readline.have_type("rl_hook_func_t*")
# rl_hook_func_t is available since readline-4.2 (2001).
# Function is removed at readline-6.3 (2014).
# However, editline (NetBSD 6.1.3, 2014) doesn't have rl_hook_func_t.
$defs << "-Drl_hook_func_t=Function"
end

Expand Down
Loading