[DRE-maint] Bug#633302: Bug#633302: ruby-bcrypt: FTBFS everywhere: [BUG] Segmentation fault

Antonio Terceiro terceiro at softwarelivre.org
Sat Jul 16 19:07:02 UTC 2011

tags 633302 + pending


Cédric Boutillier escreveu isso aí:
> Hi,
> I investigated this a little bit. The problem occurs during this call:
>   lambda { BCrypt::Password.create(nil) }.should_not raise_error(BCrypt::Errors::InvalidSecret)
> in the password_spec.rb test file.
> It seems that the value (10) of the BCrypt::Engine::DEFAULT_COST constant
> is to high (at least in the case when the RUBY_PLATFORM is not java).
> When BCrypt::Password.create is called with one argument, the default
> value {:cost =>  BCrypt::Engine::DEFAULT_COST} is used for the second
> parameter.
> In irb, BCrypt::Password.create(nil, :cost=> 4) works as expected, but 
> BCrypt::Password.create(nil, :cost=> 10) yields a segfault of ruby.
> Values less or equal to 8 work ok.
> I see there is a test for cost>=GIL_UNLOCK_COST_THRESHOLD (set to 9) for
> ruby1.9 in ext/mri/bcrypt_ext.c.
> Lowering the value of the BCrypt::Engine::DEFAULT_COST helps passing
> some tests, but it fails later (engine_spec.rb, during Engine.calibrate,
> because the :cost constantly increases.
> Best regards,

Actually this is a packaging problem: the tests for Ruby 1.8 are being
run against the compiled extension for Ruby 1.9.

I've fixed the problem in the git repository:

As you can see in the changelog, an upload with the fix will have to
wait for a new upload of gem2deb first. I will do this soon.

Antonio Terceiro <terceiro at softwarelivre.org>

-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 836 bytes
Desc: Digital signature
URL: <http://lists.alioth.debian.org/pipermail/pkg-ruby-extras-maintainers/attachments/20110716/cafa3dcf/attachment.pgp>

More information about the Pkg-ruby-extras-maintainers mailing list