The following string sent to maxima causes a seg-fault and core dump:

> 
/home/rllozes/sage-8.0/local/lib/python2.7/site-packages/sage/interfaces/maxima_lib.py(452)_eval_line()
    450                     line = line[ind_semi+1:]
    451                 if statement:
2-> 452                     result = ((result + '\n') if result else '') + 
max_to_string(maxima_eval("#$%s$"%statement))
    453             else:
    454                 statement = line[:ind_dollar]

ipdb> p "#$%s$"%statement
'#$is 
(equal(-(_SAGE_VAR_r13^2*_SAGE_VAR_r23-_SAGE_VAR_r23^3)/((-_SAGE_VAR_r23^4)+2*_SAGE_VAR_r13^2*_SAGE_VAR_r23^2-_SAGE_VAR_r13^4+_SAGE_VAR_r12^4),0))$'
ipdb> s


;;;
;;; Detected access to protected memory, also kwown as 'bus or segmentation 
fault'.
;;; Jumping to the outermost toplevel prompt
;;;

 ... [elided]

Segmentation fault (core dumped)

NOTE 1: The line numbering corresponds to SageMath version 8.0 and 
Maxima-5.40.0. 
           I observe the same behavior with Maxima-5.39.0 but did not 
trace. 

NOTE 2: Not visible in the ipdb session are the declarations of the 
variables. So, in addition to the ipdb session, I attach the .sage source.

-- 
You received this message because you are subscribed to the Google Groups 
"sage-devel" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to sage-devel+unsubscr...@googlegroups.com.
To post to this group, send email to sage-devel@googlegroups.com.
Visit this group at https://groups.google.com/group/sage-devel.
For more options, visit https://groups.google.com/d/optout.
------------- S A G E --------------------
 
┌────────────────────────────────────────────────────────────────────┐
│ SageMath version 8.0, Release Date: 2017-07-21                     │
│ Type "notebook()" for the browser-based notebook interface.        │
│ Type "help()" for help.                                      
└────────────────────────────────────────────────────────────────────┘
│ NOTE Maxima-5.40.0 used herein.
       Maxima-5.39.0 shows same problem.


sage: load ("He(rij).sage")
> <string>(1)<module>()

ipdb> s
--Call--
> /home/rllozes/sage-8.0/local/lib/python2.7/site-packages/sage/manifolds/differentiable/metric.py(696)connection()
    694         return self._inverse
    695 
--> 696     def connection(self, name=None, latex_name=None):
    697         r"""
    698         Return the unique torsion-free affine connection compatible with

ipdb> 
> /home/rllozes/sage-8.0/local/lib/python2.7/site-packages/sage/manifolds/differentiable/metric.py(757)connection()
    755 
    756         """
--> 757         from sage.manifolds.differentiable.levi_civita_connection 
import \    
    758                                                            
LeviCivitaConnection
    759         if self._connection is None:

ipdb> 
--Call--
> /home/rllozes/sage-8.0/local/lib/python2.7/site-packages/six.py(184)find_module()
    182         return self.known_modules[self.name + "." + fullname]
    183 
--> 184     def find_module(self, fullname, path=None):
    185         if fullname in self.known_modules:
    186             return self

ipdb> 
> /home/rllozes/sage-8.0/local/lib/python2.7/site-packages/six.py(185)find_module()
    183 
    184     def find_module(self, fullname, path=None):
--> 185         if fullname in self.known_modules:
    186             return self
    187         return None

ipdb> 
> /home/rllozes/sage-8.0/local/lib/python2.7/site-packages/six.py(187)find_module()
    185         if fullname in self.known_modules:
    186             return self
--> 187         return None
    188 
    189     def __get_module(self, fullname):

ipdb> 
--Return--
None
> /home/rllozes/sage-8.0/local/lib/python2.7/site-packages/six.py(187)find_module()
    185         if fullname in self.known_modules:
    186             return self
--> 187         return None
    188 
    189     def __get_module(self, fullname):

ipdb> 
--Call--
> /home/rllozes/sage-8.0/local/lib/python2.7/site-packages/pkg_resources/extern/__init__.py(23)find_module()
     21         yield ''
     22 
---> 23     def find_module(self, fullname, path=None):
     24         """
     25         Return self when fullname starts with root_name and the

ipdb> 
> /home/rllozes/sage-8.0/local/lib/python2.7/site-packages/pkg_resources/extern/__init__.py(28)find_module()
     26         target module is one vendored through this importer.
     27         """
---> 28         root, base, target = fullname.partition(self.root_name + '.')
     29         if root:
     30             return

ipdb> 
> /home/rllozes/sage-8.0/local/lib/python2.7/site-packages/pkg_resources/extern/__init__.py(29)find_module()
     27         """
     28         root, base, target = fullname.partition(self.root_name + '.')
---> 29         if root:
     30             return
     31         if not any(map(target.startswith, self.vendored_names)):

ipdb> 
> /home/rllozes/sage-8.0/local/lib/python2.7/site-packages/pkg_resources/extern/__init__.py(30)find_module()
     28         root, base, target = fullname.partition(self.root_name + '.')
     29         if root:
---> 30             return
     31         if not any(map(target.startswith, self.vendored_names)):
     32             return

ipdb> 
--Return--
None
> /home/rllozes/sage-8.0/local/lib/python2.7/site-packages/pkg_resources/extern/__init__.py(30)find_module()
     28         root, base, target = fullname.partition(self.root_name + '.')
     29         if root:
---> 30             return
     31         if not any(map(target.startswith, self.vendored_names)):
     32             return

ipdb> 
--Call--
> /home/rllozes/sage-8.0/local/lib/python2.7/site-packages/pkg_resources/_vendor/six.py(184)find_module()
    182         return self.known_modules[self.name + "." + fullname]
    183 
--> 184     def find_module(self, fullname, path=None):
    185         if fullname in self.known_modules:
    186             return self

ipdb> 
> /home/rllozes/sage-8.0/local/lib/python2.7/site-packages/pkg_resources/_vendor/six.py(185)find_module()
    183 
    184     def find_module(self, fullname, path=None):
--> 185         if fullname in self.known_modules:
    186             return self
    187         return None

ipdb> 
> /home/rllozes/sage-8.0/local/lib/python2.7/site-packages/pkg_resources/_vendor/six.py(187)find_module()
    185         if fullname in self.known_modules:
    186             return self
--> 187         return None
    188 
    189     def __get_module(self, fullname):

ipdb> 
--Return--
None
> /home/rllozes/sage-8.0/local/lib/python2.7/site-packages/pkg_resources/_vendor/six.py(187)find_module()
    185         if fullname in self.known_modules:
    186             return self
--> 187         return None
    188 
    189     def __get_module(self, fullname):

ipdb> 
--Call--
> /home/rllozes/sage-8.0/local/lib/python2.7/site-packages/sage/manifolds/differentiable/levi_civita_connection.py(20)<module>()
     18 - [ONe1983]_
     19 
---> 20 """
     21 
#****************************************************************************** 
                                                                                
    
     22 #       Copyright (C) 2015 Eric Gourgoulhon <eric.gourgoul...@obspm.fr>

ipdb> b 542
Breakpoint 1 at 
/home/rllozes/sage-8.0/local/lib/python2.7/site-packages/sage/manifolds/differentiable/levi_civita_connection.py:542
ipdb> c
> /home/rllozes/sage-8.0/local/lib/python2.7/site-packages/sage/manifolds/differentiable/levi_civita_connection.py(542)coef()
    540                                                   + gg[j,s, 
chart].diff(k)
    541                                                   - gg[j,k, 
chart].diff(s) )
1-> 542                             gam[i,j,k, chart] = rsum / 2
    543 
    544                     # Assignation of results

ipdb> p 1,j,k
(1, 1, 1)
ipdb> p rsum/2
-(r13^4 - 2*r13^2*r23^2 + r23^4)/(r12^5 - r12*r13^4 + 2*r12*r13^2*r23^2 - 
r12*r23^4)
ipdb> c
> /home/rllozes/sage-8.0/local/lib/python2.7/site-packages/sage/manifolds/differentiable/levi_civita_connection.py(542)coef()
    540                                                   + gg[j,s, 
chart].diff(k)
    541                                                   - gg[j,k, 
chart].diff(s) )
1-> 542                             gam[i,j,k, chart] = rsum / 2
    543 
    544                     # Assignation of results

ipdb> p i,j,k
(1, 1, 2)
ipdb> p rsum/2
(r13^3 - r13*r23^2)/(r12^4 - r13^4 + 2*r13^2*r23^2 - r23^4)
ipdb> c
> /home/rllozes/sage-8.0/local/lib/python2.7/site-packages/sage/manifolds/differentiable/levi_civita_connection.py(542)coef()
    540                                                   + gg[j,s, 
chart].diff(k)
    541                                                   - gg[j,k, 
chart].diff(s) )
1-> 542                             gam[i,j,k, chart] = rsum / 2
    543 
    544                     # Assignation of results

ipdb> p i,j,k
(1, 1, 3)
ipdb> p rsum/2
-(r13^2*r23 - r23^3)/(r12^4 - r13^4 + 2*r13^2*r23^2 - r23^4)
ipdb> p chart
Chart (U, (r12, r13, r23))
ipdb> s
3
ipdb> step
--Call--
> /home/rllozes/sage-8.0/local/lib/python2.7/site-packages/sage/manifolds/coord_func_symb.py(883)_lmul_()
    881         return type(self)(self.parent(), other * self._express)
    882 
--> 883     def _lmul_(self, other):
    884         """
    885         Return ``self * other``.

ipdb> 
> /home/rllozes/sage-8.0/local/lib/python2.7/site-packages/sage/manifolds/coord_func_symb.py(900)_lmul_()
    898             (x, y) |--> pi*(x + y)
    899         """
--> 900         try:
    901             other = SR(other)
    902         except (TypeError, ValueError):

ipdb> b 
/home/rllozes/sage-8.0/local/lib/python2.7/site-packages/sage/interfaces/maxima_lib.py:452
Breakpoint 2 at 
/home/rllozes/sage-8.0/local/lib/python2.7/site-packages/sage/interfaces/maxima_lib.py:452
ipdb> c
> /home/rllozes/sage-8.0/local/lib/python2.7/site-packages/sage/interfaces/maxima_lib.py(452)_eval_line()
    450                     line = line[ind_semi+1:]
    451                 if statement:
2-> 452                     result = ((result + '\n') if result else '') + 
max_to_string(maxima_eval("#$%s$"%statement))
    453             else:
    454                 statement = line[:ind_dollar]

ipdb> p "#$%s$"%statement
'#$sage7495$'
ipdb> c
> /home/rllozes/sage-8.0/local/lib/python2.7/site-packages/sage/interfaces/maxima_lib.py(452)_eval_line()
    450                     line = line[ind_semi+1:]
    451                 if statement:
2-> 452                     result = ((result + '\n') if result else '') + 
max_to_string(maxima_eval("#$%s$"%statement))
    453             else:
    454                 statement = line[:ind_dollar]

ipdb> p "#$%s$"%statement)
*** SyntaxError: SyntaxError('unexpected EOF while parsing', ('<string>', 1, 
18, '"#$%s$"%statement)'))
ipdb> p "#$%s$"%statement
'#$sage7496$'
ipdb> c
> /home/rllozes/sage-8.0/local/lib/python2.7/site-packages/sage/interfaces/maxima_lib.py(452)_eval_line()
    450                     line = line[ind_semi+1:]
    451                 if statement:
2-> 452                     result = ((result + '\n') if result else '') + 
max_to_string(maxima_eval("#$%s$"%statement))
    453             else:
    454                 statement = line[:ind_dollar]

ipdb> p "#$%s$"%statement
'#$sage7497$'
ipdb> w
  /home/rllozes/sage-8.0/local/lib/python2.7/bdb.py(400)run()
    398             cmd = cmd+'\n'
    399         try:
--> 400             exec cmd in globals, locals
    401         except BdbQuit:
    402             pass

  <string>(1)<module>()

  
/home/rllozes/sage-8.0/local/lib/python2.7/site-packages/sage/manifolds/differentiable/metric.py(768)connection()
    766                 name = 'nabla_' + self._name
    767             self._connection = LeviCivitaConnection(self, name,
--> 768                                                     
latex_name=latex_name)
    769         return self._connection
    770 

  
/home/rllozes/sage-8.0/local/lib/python2.7/site-packages/sage/manifolds/differentiable/levi_civita_connection.py(231)__init__()
    229             # the domain (i.e. disregarding the subcharts)
    230             for chart in self._domain.top_charts():
--> 231                 self.coef(chart._frame)
    232 
    233     def _repr_(self):

  
/home/rllozes/sage-8.0/local/lib/python2.7/site-packages/sage/manifolds/differentiable/levi_civita_connection.py(542)coef()
    540                                                   + gg[j,s, 
chart].diff(k)
    541                                                   - gg[j,k, 
chart].diff(s) )
1-> 542                             gam[i,j,k, chart] = rsum / 2
    543 
    544                     # Assignation of results

  
/home/rllozes/sage-8.0/local/lib/python2.7/site-packages/sage/tensor/modules/comp.py(3263)__setitem__()
   3261                 if ind in self._comp:
   3262                     del self._comp[ind]  # zero values are not stored
-> 3263             elif value == 0:
   3264                 if ind in self._comp:
   3265                     del self._comp[ind]  # zero values are not stored

  
/home/rllozes/sage-8.0/local/lib/python2.7/site-packages/sage/manifolds/coord_func_symb.py(673)__eq__()
    671                 return bool(other._express == self._express)
    672         else:
--> 673             return bool(self._express == other)
    674 
    675     def __neg__(self):

  
/home/rllozes/sage-8.0/local/lib/python2.7/site-packages/sage/symbolic/relation.py(477)test_relation_maxima()
    475     if relation.operator() == operator.eq: # operator is equality
    476         try:
--> 477             s = m.parent()._eval_line('is 
(equal(%s,%s))'%(repr(m.lhs()),repr(m.rhs())))
    478         except TypeError:
    479             raise ValueError("unable to evaluate the predicate '%s'" % 
repr(relation))

  
/home/rllozes/sage-8.0/local/lib/python2.7/site-packages/sage/interfaces/interface.py(1103)__repr__()
   1101             s = cr
   1102         else:
-> 1103             s = self._repr_()
   1104         if self._name in s:
   1105             try:

  
/home/rllozes/sage-8.0/local/lib/python2.7/site-packages/sage/interfaces/interface.py(1159)_repr_()
   1157                 return P.get_using_file(self._name).strip()
   1158         except AttributeError:
-> 1159             return self.parent().get(self._name).strip()
   1160 
   1161     def __getattr__(self, attrname):

  
/home/rllozes/sage-8.0/local/lib/python2.7/site-packages/sage/interfaces/maxima_lib.py(555)get()
    553             '2'
    554         """
--> 555         s = self.eval('%s;'%var)
    556         return s
    557 

> /home/rllozes/sage-8.0/local/lib/python2.7/site-packages/sage/interfaces/maxima_lib.py(452)_eval_line()
    450                     line = line[ind_semi+1:]
    451                 if statement:
2-> 452                     result = ((result + '\n') if result else '') + 
max_to_string(maxima_eval("#$%s$"%statement))
    453             else:
    454                 statement = line[:ind_dollar]

ipdb> c
> /home/rllozes/sage-8.0/local/lib/python2.7/site-packages/sage/interfaces/maxima_lib.py(452)_eval_line()
    450                     line = line[ind_semi+1:]
    451                 if statement:
2-> 452                     result = ((result + '\n') if result else '') + 
max_to_string(maxima_eval("#$%s$"%statement))
    453             else:
    454                 statement = line[:ind_dollar]

ipdb> p "#$%s$"%statement
'#$is 
(equal(-(_SAGE_VAR_r13^2*_SAGE_VAR_r23-_SAGE_VAR_r23^3)/((-_SAGE_VAR_r23^4)+2*_SAGE_VAR_r13^2*_SAGE_VAR_r23^2-_SAGE_VAR_r13^4+_SAGE_VAR_r12^4),0))$'
ipdb> s


;;;
;;; Detected access to protected memory, also kwown as 'bus or segmentation 
fault'.
;;; Jumping to the outermost toplevel prompt
;;;

 ... [elided]

;;;
;;; Detected access to protected memory, also kwown as 'bus or segmentation 
fault'.
;;; Jumping to the outermost toplevel prompt
;;;

Segmentation fault (core dumped)

Attachment: He(rij).sage
Description: Binary data

Reply via email to