[Debian-science-sagemath] Buster todo list

Ximin Luo infinity0 at debian.org
Wed Jan 23 17:32:00 GMT 2019


Ximin Luo:
> Ximin Luo:
>> [..]
>> The one in C xerbla.c from lapack does *not* call exit(0), 

Actually it can call exit(-1) eventually, but in our case of matrix_double_dense.pyx it does not. The code is:

https://sources.debian.org/src/lapack/3.8.0-2/CBLAS/src/xerbla.c/
   if (CBLAS_CallFromC)
   {
      for(i=0; i != XerblaStrLen; i++) rout[i+6] = tolower(srname[i]);
      rout[XerblaStrLen+6] = '\0';
      cblas_xerbla(*info+1,rout,"");
   }
   else
   {
      fprintf(stderr, "Parameter %d to routine %s was incorrect\n",
              *info, srname);
   }

cblas_xerbla itself calls exit(-1) later. However for our case, CBLAS_CallFromC happens to be 0 and so this branch is not taken.

Why is it 0? I dunno. It's a global variable defined here:
https://sources.debian.org/src/lapack/3.8.0-2/CBLAS/src/cblas_globals.c/

and is certainly not thread-safe... lots of other places in the lapack code do stupid stuff like CBLAS_CallFromC = 1 then CBLAS_CallFromC = 0 in some exit-branches but not others.

At any rate, it seems like sagemath (and probably scipy) actually do rely on it never calling exit(). But it turns out this is really really unreliable.

I hate software.

X

-- 
GPG: ed25519/56034877E1F87C35
GPG: rsa4096/1318EFAC5FBBDBCE
https://github.com/infinity0/pubkeys.git



More information about the Debian-science-sagemath mailing list