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

GSL::Blas.zgemm crashes #45

Open
daxtens opened this issue Jan 18, 2017 · 0 comments
Open

GSL::Blas.zgemm crashes #45

daxtens opened this issue Jan 18, 2017 · 0 comments

Comments

@daxtens
Copy link

daxtens commented Jan 18, 2017

Any attempt to run GSL::Blas.zgemm causes a crash:

2.2.6 :001 > require 'gsl'
 => true 
2.2.6 :002 > GSL::Blas.zgemm
irb):2: [BUG] Segmentation fault at 0x00000000000000
ruby 2.2.6p396 (2016-11-15 revision 56800) [powerpc64le-linux]

-- Control frame information -----------------------------------------------
c:0019 p:---- s:0075 e:000074 CFUNC  :zgemm
c:0018 p:0013 s:0072 e:000071 EVAL   (irb):2 [FINISH]
<snip>

This is a NULL pointer dereference in
rb_gsl_blas_zgemm in blas3.c:

In line 94, you have:

  gsl_complex *pa = NULL, *pb = NULL;

Then line 97 tries to dereference pa and assign something to a member:

  (*pa).dat[0] = 1.0; (*pa).dat[1] = 0.0;

This causes the null pointer dereference.

I found this with cppcheck.

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

No branches or pull requests

1 participant