Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fix to solve [BUG] Bus Error On Mac OS X Lion - Ruby 1.9.2-p180 #6

Merged
merged 1 commit into from
Jul 15, 2011
Merged

Fix to solve [BUG] Bus Error On Mac OS X Lion - Ruby 1.9.2-p180 #6

merged 1 commit into from
Jul 15, 2011

Conversation

lucasefe
Copy link
Contributor

When doing this on Mac OS X Lion with ruby 1.9.2-p180 (rvm):

ruby -e '(0..255).zip(0..255)'

I get this:

-e:1: [BUG] Bus Error
ruby 1.9.2p180 (2011-02-18 revision 30909) [x86_64-darwin11.0.0]

-- control frame ----------
c:0007 p:---- s:0016 b:0016 l:001dd0 d:001dd0 CFUNC  :next
c:0006 p:---- s:0014 b:0014 l:000009 d:000013 IFUNC 
c:0005 p:---- s:0012 b:0012 l:000011 d:000011 CFUNC  :each
c:0004 p:---- s:0010 b:0010 l:000009 d:000009 CFUNC  :zip
c:0003 p:0014 s:0006 b:0006 l:002478 d:001c78 EVAL   -e:1
c:0002 p:---- s:0004 b:0004 l:000003 d:000003 FINISH
c:0001 p:0000 s:0002 b:0002 l:002478 d:002478 TOP   
---------------------------
-- Ruby level backtrace information ----------------------------------------
-e:1:in `'
-e:1:in `zip'
-e:1:in `each'
-e:1:in `next'

-- C level backtrace information -------------------------------------------
0   libruby.1.9.1.dylib                 0x000000010696d64e rb_vm_bugreport + 110
1   libruby.1.9.1.dylib                 0x00000001068614b3 report_bug + 259
2   libruby.1.9.1.dylib                 0x0000000106861621 rb_bug + 161
3   libruby.1.9.1.dylib                 0x00000001069040c2 sigbus + 18
4   libsystem_c.dylib                   0x00007fff8b6edcfa _sigtramp + 26
5   ???                                 0x00007fff66461120 0x0 + 140734909255968

[NOTE]
You may have encountered a bug in the Ruby interpreter or extension libraries.
Bug reports are welcome.
For details: http://www.ruby-lang.org/bugreport.html

[1]    48988 abort      ruby -e '(0..255).zip(0..255)'

This also happens on Ruby 1.9.2-p0 and head.

The problem is a ruby problem and I am trying to report it to ruby through a ruby-committer friend. What I am sending is a work-around.

Best regards
Lucas Florio

@bradediger
Copy link
Member

@sandal, what's your opinion on this? I'd rather not make a practice of working around blatant Ruby interpreter / OS bugs, but I'm open to it if enough users are affected.

@lucasefe, OS X Lion hasn't been publicly released yet, right? We might consider a workaround if the bug persists in the retail release, but this is certain to affect much more than just ttfunk / prawn. Thanks!

@practicingruby
Copy link
Member

@bradediger: The workaround seems at least relatively small and innocuous, I'd pull it in with an explicit comment about why it's written that way in the source.

@bradediger bradediger merged commit 855ea4e into prawnpdf:master Jul 15, 2011
@bradediger
Copy link
Member

Workaround added with a short explanation. Thanks @lucasefe.

@lucasefe
Copy link
Contributor Author

@sandal, @bradediger: I think I am using Xcode 4.1 Preview release 5 (not sure).

Lion uses gcc version 4.2.1 (Based on Apple Inc. build 5658) (LLVM build 2335.14.00) but Snow Leopard uses gcc version 4.2.1 (Apple Inc. build 5666) (dot 3). I don't think that's going to change in the final version of Xcode.

I've reported this issue to ruby-core (http://redmine.ruby-lang.org/issues/5031)

Anyway, for now I am using my fork, but I will love to go back to use the official ttfunk gem.

@kaluznyo
Copy link

kaluznyo commented Aug 2, 2011

Any up for an official fix ?

@bradediger
Copy link
Member

ttfunk 1.0.2 has been released. This is a patchlevel update that includes the segmentation fault fix. Thanks for your patience.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Development

Successfully merging this pull request may close these issues.

4 participants