Open daxtens opened 7 years ago
Any attempt to run GSL::Blas.zgemm causes a crash:
GSL::Blas.zgemm
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:
rb_gsl_blas_zgemm
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
(*pa).dat[0] = 1.0; (*pa).dat[1] = 0.0;
This causes the null pointer dereference.
I found this with cppcheck.
cppcheck
Any attempt to run
GSL::Blas.zgemm
causes a crash:This is a NULL pointer dereference in
rb_gsl_blas_zgemm
inblas3.c
:In line 94, you have:
Then line 97 tries to dereference
pa
and assign something to a member:This causes the null pointer dereference.
I found this with
cppcheck
.