From: "jeremyevans0 (Jeremy Evans)" Date: 2013-02-28T10:21:05+09:00 Subject: [ruby-core:53018] [ruby-trunk - Bug #7982] rb_raise segfaults on %lli format with (0xffffffff + 1) Issue #7982 has been updated by jeremyevans0 (Jeremy Evans). I don't think this is just the %lli format. It is probably at least the %li format as well. home_run's test suite fails on 2.0.0-p0 (working fine on 1.8.7 and 1.9.3), with the following backtrace: #0 0x0000031c9da03eea in kill () at :2 #1 0x0000031c9da6a6ca in abort () at /usr/src/lib/libc/stdlib/abort.c:70 #2 0x0000031c931a82ad in rb_bug () from /usr/local/lib/libruby20.so.0.0 #3 0x0000031c932514bd in sigsegv () from /usr/local/lib/libruby20.so.0.0 #4 #5 0x0000031c9325efd0 in rb_obj_as_string () from /usr/local/lib/libruby20.so.0.0 #6 0x0000031c93254be8 in ruby__sfvextra () from /usr/local/lib/libruby20.so.0.0 #7 0x0000031c9325310f in BSD_vfprintf () from /usr/local/lib/libruby20.so.0.0 #8 0x0000031c93254eef in rb_enc_vsprintf () from /usr/local/lib/libruby20.so.0.0 #9 0x0000031c931a6f0f in rb_raise () from /usr/local/lib/libruby20.so.0.0 #10 0x0000031c9e6d582b in rhrd_s_civil (argc=3, argv=0x31c8ffd0358, klass=3421292953680) at ../../../../ext/date_ext/date_ext.c:1565 1565 rb_raise(rb_eArgError, "invalid date (year: %li, month: %li, day: %li)", year, month, day); Changing %li to %ld makes it no longer fail at that location (it fails at the next location using %li instead). This is on: ruby 2.0.0p0 (2013-02-24 revision 39474) [x86_64-openbsd] ---------------------------------------- Bug #7982: rb_raise segfaults on %lli format with (0xffffffff + 1) https://bugs.ruby-lang.org/issues/7982#change-37171 Author: erik.s.chang (Erik Chang) Status: Open Priority: Normal Assignee: Category: Target version: current: 2.1.0 ruby -v: ruby 2.0.0p0 (2013-02-24 revision 39474) [x86_64-linux] This was not a problem on 1.9.3 Run attached "t" extension with: ruby -rt -e '"".blowup(0xffffffff + 1)' to reproduce. Using %lld works around the issue. -- http://bugs.ruby-lang.org/