Opened 12 years ago

Closed 12 years ago

#11079 closed defect (fixed)

SIGSEGV test throws SIGBUS instead on certain systems

Reported by: Jeroen Demeyer Owned by: Minh Van Nguyen
Priority: major Milestone: sage-4.7
Component: doctest coverage Keywords:
Cc: Karl-Dieter Crisman Merged in: sage-4.7.alpha4
Authors: Jeroen Demeyer Reviewers: Karl-Dieter Crisman
Report Upstream: N/A Work issues:
Branch: Commit:
Dependencies: Stopgaps:

Status badges

Description (last modified by Georg S. Weber)

In the file sage/tests/interrupt.pyx there is a test for a segmentation fault by explicitly dereferencing a NULL pointer. However, on some systems (Mac OS X 10.4 PPC, Mac OS X 10.4 Intel, and Mac OS X 10.5.8 Intel) this generates a SIGBUS instead of a SIGSEGV.

Attachments (1)

11079_sigsegv_test.patch (2.9 KB) - added by Jeroen Demeyer 12 years ago.

Download all attachments as: .zip

Change History (8)

comment:1 Changed 12 years ago by Jeroen Demeyer

Status: newneeds_review

comment:2 Changed 12 years ago by Karl-Dieter Crisman

Cc: Karl-Dieter Crisman added

comment:3 Changed 12 years ago by Karl-Dieter Crisman

Reviewers: Karl-Dieter Crisman
Status: needs_reviewpositive_review

This patch looks correct, and

Dasher-03:~/Desktop/sage-4.7.alpha2 student$ ./sage -t -long devel/sage/sage/tests/interrupt.pyx 
sage -t -long "devel/sage/sage/tests/interrupt.pyx"         
         [436.2 s]
 
----------------------------------------------------------------------
All tests passed!
Total time for all tests: 436.4 seconds

Positive review. Nice (better) way to name those functions, too; now I know what they actually do!

comment:4 Changed 12 years ago by Jeroen Demeyer

Description: modified (diff)

comment:5 Changed 12 years ago by Georg S. Weber

Description: modified (diff)

I see this on MacIntel? OS X 10.4.11, too, so I updated the description. The patch looks superb (although I didn't apply and test it myself); hopefully it gets into the next alpha/rc release.

Changed 12 years ago by Jeroen Demeyer

Attachment: 11079_sigsegv_test.patch added

comment:6 Changed 12 years ago by Jeroen Demeyer

Updated patch. Only change is this comment (changed to reflect that various Mac OS X systems have this issue):

# Dereference a NULL pointer on purpose. This signals a SIGSEGV on most
# systems, but on older Mac OS X and possibly other systems, this
# signals a SIGBUS instead. In any case, this should give some signal.

comment:7 Changed 12 years ago by Jeroen Demeyer

Merged in: sage-4.7.alpha4
Resolution: fixed
Status: positive_reviewclosed
Note: See TracTickets for help on using tickets.