[MacRuby] #1434: ruby_xmalloc_memory assertion fails
MacRuby
ruby-noreply at macosforge.org
Thu Jan 5 12:16:53 PST 2012
#1434: ruby_xmalloc_memory assertion fails
-------------------------------+--------------------------------------------
Reporter: dopperman@… | Owner: lsansonetti@…
Type: defect | Status: new
Priority: minor | Milestone:
Component: MacRuby | Keywords:
-------------------------------+--------------------------------------------
not sure if this is a defect, but the assertion in gc.c on line 107 fails
when passing in size 0. i realize it sounds a little dubious to try to
allocate 0 bytes but several popular gems will try. mysql and mysqlplus
both attempt to allocate 0 bytes when querying an empty table containing
varchar (or blobs, or similar) from a prepared statement. rubyzip does
this as well when decompressing a file that does not contain a comment in
the zipheader. i patched the gems to work with macruby 0.12 but i suspect
the assertion is non-standard. i haven't tried to verify these cases with
ruby 1.9.3, but it seems likely that ruby_xmalloc_memory should probably
return NULL when attempting to allocate 0 bytes.
--
Ticket URL: <http://www.macruby.org/trac/ticket/1434>
MacRuby <http://macruby.org/>
More information about the macruby-tickets
mailing list