#20715 closed defect (fixed)

is_numpy_type(object) crashes Sage

Reported by: jdemeyer Owned by:
Priority: major Milestone: sage-7.3
Component: coercion Keywords: days74
Cc: vdelecroix Merged in:
Authors: Vincent Delecroix Reviewers: Jeroen Demeyer
Report Upstream: N/A Work issues:
Branch: 80ef400 (Commits) Commit: 80ef40062b12fc0be8f330de58e305490ed65f78
Dependencies: Stopgaps:

Description (last modified by jdemeyer)

Segfault Sage in 10 characters:

sage: 1+object()
------------------------------------------------------------------------
Unhandled SIGSEGV: A segmentation fault occurred.
This probably occurred because a *compiled* module has a bug
in it and is not properly wrapped with sig_on(), sig_off().
Python will now terminate.
------------------------------------------------------------------------

The reason:

sage: from sage.structure.coerce import is_numpy_type
sage: is_numpy_type(object)
------------------------------------------------------------------------
Unhandled SIGSEGV: A segmentation fault occurred.
This probably occurred because a *compiled* module has a bug
in it and is not properly wrapped with sig_on(), sig_off().
Python will now terminate.
------------------------------------------------------------------------

Change History (9)

comment:1 Changed 12 months ago by jdemeyer

  • Description modified (diff)

comment:2 Changed 12 months ago by jdemeyer

  • Description modified (diff)

comment:3 Changed 12 months ago by vdelecroix

The thing is that tp_base is NULL in that case.

comment:4 Changed 12 months ago by vdelecroix

  • Authors set to Vincent Delecroix
  • Branch set to public/20715
  • Commit set to e98adc4ecfa3c65731fb23873a07aecff357098d
  • Keywords days74 added
  • Status changed from new to needs_review

New commits:

e98adc4Trac 20715: fix is_numpy_type

comment:5 Changed 12 months ago by jdemeyer

This use to -> This used to.

Apart from this: positive_review.

comment:6 Changed 12 months ago by git

  • Commit changed from e98adc4ecfa3c65731fb23873a07aecff357098d to 80ef40062b12fc0be8f330de58e305490ed65f78

Branch pushed to git repo; I updated commit sha1. New commits:

80ef400Trac 20715: a subtle 'd'

comment:7 Changed 12 months ago by vdelecroix

bad typo from my part

comment:8 Changed 12 months ago by jdemeyer

  • Reviewers set to Jeroen Demeyer
  • Status changed from needs_review to positive_review

comment:9 Changed 12 months ago by vbraun

  • Branch changed from public/20715 to 80ef40062b12fc0be8f330de58e305490ed65f78
  • Resolution set to fixed
  • Status changed from positive_review to closed
Note: See TracTickets for help on using tickets.