Control: reassign -1 ruby-ox 1.8.9-2 Control: tag -1 patch Control: affects -1 ruby-multi-xml
On Fri, Mar 21, 2014 at 01:05:52PM +0000, Colin Watson wrote: > Here's a somewhat smaller reproduction recipe, following a build: > > $ ruby1.9.1 -S rspec -f d ./spec/multi_xml_spec.rb -e 'MultiXml Ox parser > behaves like a parser .parse a valid XML document' > Run options: include {:full_description=>/MultiXml\ Ox\ parser\ behaves\ > like\ a\ parser\ \.parse\ a\ valid\ XML\ document/} > > MultiXml > Ox parser > behaves like a parser > .parse > a valid XML document > parses correctly > with CDATA > returns the correct CDATA > with content > returns the correct content > with an attribute > returns the correct attribute > with multiple attributes > returns the correct attributes > with :symbolize_keys => true > symbolizes keys > when value is true > ruby1.9.1: malloc.c:2368: sysmalloc: Assertion `(old_top == (((mbinptr) > (((char *) &((av)->bins[((1) - 1) * 2])) - __builtin_offsetof (struct > malloc_chunk, fd)))) && old_size == 0) || ((unsigned long) (old_size) >= > (unsigned long)((((__builtin_offsetof (struct malloc_chunk, fd_nextsize))+((2 > * (sizeof(size_t))) - 1)) & ~((2 * (sizeof(size_t))) - 1))) && > ((old_top)->size & 0x1) && ((unsigned long)old_end & pagemask) == 0)' failed. > Aborted (core dumped) > > (The tests for the other parsers seem to be fine.) I finally disentangled this. It's fixed upstream in ruby-ox 1.9.2, or you could backport the small patch as follows: * Backport cache allocation fix from upstream (closes: #715190). diff -Nru ruby-ox-1.8.9/debian/patches/001-fix-cache-allocation.patch ruby-ox-1.8.9/debian/patches/001-fix-cache-allocation.patch --- ruby-ox-1.8.9/debian/patches/001-fix-cache-allocation.patch 1970-01-01 01:00:00.000000000 +0100 +++ ruby-ox-1.8.9/debian/patches/001-fix-cache-allocation.patch 2014-03-21 13:31:06.000000000 +0000 @@ -0,0 +1,47 @@ +Description: Fix cache allocation bug +Author: Peter Ohler <pe...@ohler.com> +Origin: backport, https://github.com/ohler55/ox/commit/5d6cdcc1f68f5ab0512575df4e6bb5c7b895255d +Bug-Debian: https://bugs.debian.org/715190 +Forwarded: not-needed +Last-Update: 2014-03-21 + +Index: b/ext/ox/cache.c +=================================================================== +--- a/ext/ox/cache.c ++++ b/ext/ox/cache.c +@@ -50,7 +50,7 @@ + + static char* form_key(const char *s) { + size_t len = strlen(s); +- char *d = ALLOC_N(char, len); ++ char *d = ALLOC_N(char, len + 2); + + *d = (255 <= len) ? 255 : len; + memcpy(d + 1, s, len + 1); +Index: b/ext/ox/cache_test.c +=================================================================== +--- a/ext/ox/cache_test.c ++++ b/ext/ox/cache_test.c +@@ -31,6 +31,7 @@ + #include "cache.h" + + static const char *data[] = { ++#if 1 + "one", + "two", + "one", +@@ -38,6 +39,14 @@ + "oney", + "one", + "tw", ++ "onexyzabcdefgh", ++#else ++ "abc", ++ "abcd", ++ "ab", ++ "a", ++ "abcdefghijklmnop", ++#endif + 0 + }; + diff -Nru ruby-ox-1.8.9/debian/patches/series ruby-ox-1.8.9/debian/patches/series --- ruby-ox-1.8.9/debian/patches/series 2013-04-15 18:59:50.000000000 +0100 +++ ruby-ox-1.8.9/debian/patches/series 2014-03-21 13:27:32.000000000 +0000 @@ -1 +1,2 @@ 000-fix-so-load-path.patch +001-fix-cache-allocation.patch Thanks, -- Colin Watson [cjwat...@debian.org] -- To UNSUBSCRIBE, email to debian-bugs-dist-requ...@lists.debian.org with a subject of "unsubscribe". Trouble? Contact listmas...@lists.debian.org