Opened 2 years ago

Closed 14 months ago

#25823 closed defect (fixed)

maxima segfaults on integral computation

Reported by: tmonteil Owned by:
Priority: major Milestone: sage-8.9
Component: symbolics Keywords: integrate, Maxima, segfault
Cc: slelievre Merged in:
Authors: Thierry Monteil Reviewers: Frédéric Chapoton
Report Upstream: Reported upstream. No feedback yet. Work issues:
Branch: 5f0254b (Commits) Commit: 5f0254ba3c8cab606d1411ab21f29d5f2ce8996e
Dependencies: Stopgaps:

Description (last modified by slelievre)

As reported on this Ask Sage question:

integrate(log(sin(x))*sin(x)^2, x)

;;;
;;; Detected access to protected memory, also kwown as 'bus or segmentation fault'.
;;; Jumping to the outermost toplevel prompt
;;;

Change History (15)

comment:1 Changed 2 years ago by nbruin

  • Milestone changed from sage-8.3 to sage-duplicate/invalid/wontfix
  • Status changed from new to needs_review

comment:2 Changed 2 years ago by slelievre

  • Cc slelievre added
  • Keywords integrate Maxima added

Maybe it's best if #25636 just tracks the issue with integrate(x^m/sqrt(a + b*x^(2 - m)), x) and the present ticket tracks the issue with integrate(log(sin(x))*sin(x)^2, x). Unless they come from the same underlying bug in Maxima?

comment:3 follow-up: Changed 2 years ago by slelievre

  • Description modified (diff)

Is there a reference for the upstream bug report on Maxima's issue tracker?

comment:4 Changed 2 years ago by slelievre

  • Description modified (diff)
  • Keywords segfault added

comment:5 Changed 2 years ago by nbruin

There's a good chance that the underlying issue is the same because all these integrals succeed on maxima with default setting and fail with sage's setting due to an infinite recursion (and hence a stack overflow). But the number of open tickets on sage is already so high that it wouldn't hurt if you prefer to track this particular issue with a separate one. Perhaps some blog decides to measure open source project activity by number of open issues and then we'll win a prize :-).

comment:6 in reply to: ↑ 3 Changed 2 years ago by nbruin

Replying to slelievre:

Is there a reference for the upstream bug report on Maxima's issue tracker?

I see you're reporting this example as "reported upstream". I don't think the particular example is there. You could post it as well, either on a separate maxima ticket or on the maxima ticket that is tracking one of these other failing integrals.

comment:7 Changed 2 years ago by slelievre

tmonteil, did you set the upstream field to "Reported upstream" when you opened the ticket? Did you have a reference in mind for the upstream bug report?

comment:8 Changed 14 months ago by chapoton

Works in 8.9.beta7 with py3.

comment:9 Changed 14 months ago by tmonteil

  • Branch set to u/tmonteil/maxima_segfaults_on_integral_computation

comment:10 Changed 14 months ago by tmonteil

  • Authors set to Thierry Monteil
  • Commit set to c92ec2063a7c1d32c32ce76671f5cbd10eb22936
  • Milestone changed from sage-duplicate/invalid/wontfix to sage-8.9

Thanks for noticing, here is a branch with a doctest.

By the way, note that we get an example where full_simplify() is not idempotent.


New commits:

c92ec20#25823 : doctest the integral of log(sin(x))*sin(x)^2

comment:11 Changed 14 months ago by chapoton

maybe break the long line ?

comment:12 Changed 14 months ago by git

  • Commit changed from c92ec2063a7c1d32c32ce76671f5cbd10eb22936 to 5f0254ba3c8cab606d1411ab21f29d5f2ce8996e

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

5f0254b#25823 : cut the long line (reviewer comment 11)

comment:13 Changed 14 months ago by tmonteil

Done.

comment:14 Changed 14 months ago by chapoton

  • Reviewers set to Frédéric Chapoton
  • Status changed from needs_review to positive_review

Merci.

comment:15 Changed 14 months ago by vbraun

  • Branch changed from u/tmonteil/maxima_segfaults_on_integral_computation to 5f0254ba3c8cab606d1411ab21f29d5f2ce8996e
  • Resolution set to fixed
  • Status changed from positive_review to closed
Note: See TracTickets for help on using tickets.