Opened 10 years ago

Closed 10 years ago

#11079 closed defect (fixed)

SIGSEGV test throws SIGBUS instead on certain systems

Reported by: jdemeyer Owned by: mvngu
Priority: major Milestone: sage-4.7
Component: doctest coverage Keywords:
Cc: kcrisman 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 GeorgSWeber)

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 jdemeyer 10 years ago.

Download all attachments as: .zip

Change History (8)

comment:1 Changed 10 years ago by jdemeyer

  • Status changed from new to needs_review

comment:2 Changed 10 years ago by kcrisman

  • Cc kcrisman added

comment:3 Changed 10 years ago by kcrisman

  • Reviewers set to Karl-Dieter Crisman
  • Status changed from needs_review to positive_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 10 years ago by jdemeyer

  • Description modified (diff)

comment:5 Changed 10 years ago by GeorgSWeber

  • 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 10 years ago by jdemeyer

comment:6 Changed 10 years ago by jdemeyer

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 10 years ago by jdemeyer

  • Merged in set to sage-4.7.alpha4
  • Resolution set to fixed
  • Status changed from positive_review to closed
Note: See TracTickets for help on using tickets.