Opened 7 years ago

Closed 7 years ago

#14067 closed defect (fixed)

generic_graph_pyx.pyx invalid free() with MALLOC_CHECK_=3

Reported by: jdemeyer Owned by: rlm
Priority: blocker Milestone: sage-5.7
Component: memleak Keywords:
Cc: jpflori, SimonKing Merged in: sage-5.7.beta4
Authors: Jeroen Demeyer Reviewers: Jean-Pierre Flori
Report Upstream: N/A Work issues:
Branch: Commit:
Dependencies: Stopgaps:

Description (last modified by jdemeyer)

$ env MALLOC_CHECK_=3 ./sage -c 'from sage.graphs.generic_graph_pyx import SubgraphSearch; SubgraphSearch(Graph(5),Graph(1))'
*** glibc detected *** python: free(): invalid pointer: 0x00000000030838e0 ***

Crash log: sage_crash_SHRqxx.log

Attachments (2)

sage_crash_SHRqxx.log (13.0 KB) - added by jdemeyer 7 years ago.
14067_invalid_free.patch (2.2 KB) - added by jdemeyer 7 years ago.

Download all attachments as: .zip

Change History (12)

comment:1 Changed 7 years ago by jdemeyer

  • Cc jpflori SimonKing added

comment:2 Changed 7 years ago by jdemeyer

  • Description modified (diff)

comment:3 Changed 7 years ago by jdemeyer

  • Description modified (diff)

Changed 7 years ago by jdemeyer

comment:4 Changed 7 years ago by jdemeyer

  • Description modified (diff)

comment:5 Changed 7 years ago by jdemeyer

  • Description modified (diff)

comment:6 Changed 7 years ago by jpflori

The problem occurs when deallocating self.stack.

comment:7 Changed 7 years ago by jdemeyer

Got it, we are assigning self.stack[1] even if self.stack is an array with just one element.

Changed 7 years ago by jdemeyer

comment:8 Changed 7 years ago by jdemeyer

  • Authors set to Jeroen Demeyer
  • Status changed from new to needs_review

comment:9 Changed 7 years ago by jpflori

  • Reviewers set to Jean-Pierre Flori
  • Status changed from needs_review to positive_review

Works well.

comment:10 Changed 7 years ago by jdemeyer

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