2 views

Skip to first unread message

Jul 1, 2010, 6:18:42 PM7/1/10

to sage-...@googlegroups.com

When Sage starts on my OpenSolaris machine it crashes, with a segfault and a

message about "...or is not properly wrapped with _sig_on, _sig_off"

message about "...or is not properly wrapped with _sig_on, _sig_off"

Having a look in the source code, I believe _sig_on and _sig_off should be in

pairs - is that correct? If so, should there not be an equal number of _sig_on's

and _sig_off's in any one file?

A quick check shows this is not the case - see below. One file in particular

(sage/libs/pari/gen.pyx) has 332 occurances of the text _sig_on, but only 33

occurrences of _sig_off.

My checking ignores comments, but a quick check of at least a few of the files

below shows that the differences are not due to comments (but in some cases it

might be, there are some lines with a comment which contain _sig_on or _sig_off).

In the list below, the filename is followed by the number of lines with _sig_on

or _sig_off. The first is the _sig_on and the second the _sig_off.

Does this indicate a problem, or am I worrying about nothing?

Dave

drkirkby@hawk:~/serial/sage-4.5.alpha1/spkg/standard/sage-4.5.alpha1$ ggrep -cR

_sig_on * > /tmp/on

drkirkby@hawk:~/serial/sage-4.5.alpha1/spkg/standard/sage-4.5.alpha1$ ggrep -cR

_sig_off * > /tmp/off

drkirkby@hawk:~/serial/sage-4.5.alpha1/spkg/standard/sage-4.5.alpha1$ diff

/tmp/on /tmp/off

133c133

< doc/en/developer/coding_in_other.rst:3

---

> doc/en/developer/coding_in_other.rst:2

1124c1124

< doc/output/html/en/developer/_sources/coding_in_other.txt:3

---

> doc/output/html/en/developer/_sources/coding_in_other.txt:2

3607c3607

< sage/plot/plot3d/index_face_set.pyx:5

---

> sage/plot/plot3d/index_face_set.pyx:6

3610c3610

< sage/plot/plot3d/parametric_surface.pyx:1

---

> sage/plot/plot3d/parametric_surface.pyx:2

3884c3884

< sage/matrix/matrix_sparse.pyx:2

---

> sage/matrix/matrix_sparse.pyx:3

3914c3914

< sage/matrix/matrix_rational_dense.pyx:25

---

> sage/matrix/matrix_rational_dense.pyx:26

3992c3992

< sage/rings/padics/padic_ZZ_pX_FM_element.pyx:6

---

> sage/rings/padics/padic_ZZ_pX_FM_element.pyx:5

4096c4096

< sage/rings/finite_rings/element_givaro.pyx:4

---

> sage/rings/finite_rings/element_givaro.pyx:5

4120c4120

< sage/rings/complex_double.pyx:6

---

> sage/rings/complex_double.pyx:5

4662c4662

< sage/libs/mpmath/ext_main.pyx:1

---

> sage/libs/mpmath/ext_main.pyx:0

4680c4680

< sage/libs/mwrank/mwrank.pyx:21

---

> sage/libs/mwrank/mwrank.pyx:16

4687c4687

< sage/libs/pari/gen.pyx:332

---

> sage/libs/pari/gen.pyx:33

4721c4721

< sage/libs/ntl/ntl_ZZ_pEX.pyx:29

---

> sage/libs/ntl/ntl_ZZ_pEX.pyx:28

4728c4728

< sage/libs/ntl/ntl_ZZ_pE.pyx:9

---

> sage/libs/ntl/ntl_ZZ_pE.pyx:8

4738c4738

< sage/libs/ntl/ntl_ZZ.pyx:7

---

> sage/libs/ntl/ntl_ZZ.pyx:8

4744,4745c4744,4745

< sage/libs/ntl/ntl_ZZX.pyx:23

< sage/libs/ntl/ntl_ZZ_pX.pyx:31

---

> sage/libs/ntl/ntl_ZZX.pyx:7

> sage/libs/ntl/ntl_ZZ_pX.pyx:32

Jul 1, 2010, 6:24:57 PM7/1/10

to sage-...@googlegroups.com, Gonzalo Tornaria

On Thu, Jul 1, 2010 at 3:18 PM, Dr. David Kirkby

<david....@onetel.net> wrote:

> When Sage starts on my OpenSolaris machine it crashes, with a segfault and a

> message about "...or is not properly wrapped with _sig_on, _sig_off"

>

> Having a look in the source code, I believe _sig_on and _sig_off should be

> in pairs - is that correct?

<david....@onetel.net> wrote:

> When Sage starts on my OpenSolaris machine it crashes, with a segfault and a

> message about "...or is not properly wrapped with _sig_on, _sig_off"

>

> Having a look in the source code, I believe _sig_on and _sig_off should be

> in pairs - is that correct?

They should be *called* in pairs.

> If so, should there not be an equal number of

> _sig_on's and _sig_off's in any one file?

No. Here is an example of _sig_on and _sig_off's, which are called

in pairs, but for which there is one _sig_off and two _sig_on's.

cdef foo():

_sig_off

def f1():

_sig_on

2+2

foo()

def f2():

_sig_on

2+3

foo()

> Does this indicate a problem, or am I worrying about nothing?

I'm sure we should worry more about _sig_on / _sig_off. However, the

worries are more subtle.

William

> --

> To post to this group, send an email to sage-...@googlegroups.com

> To unsubscribe from this group, send an email to

> sage-devel+...@googlegroups.com

> For more options, visit this group at

> http://groups.google.com/group/sage-devel

> URL: http://www.sagemath.org

>

--

William Stein

Professor of Mathematics

University of Washington

http://wstein.org

Reply all

Reply to author

Forward

0 new messages

Search

Clear search

Close search

Google apps

Main menu