First time here? Check out the FAQ!

Ask Your Question
4

Stack overflow in boolean test

asked 5 years ago

Florentin Jaffredo gravatar image

updated 2 years ago

tmonteil gravatar image

Using SageMath 8.8, I encountered a strange error involving boolean tests. The following code reproduces the issue:

x, y = var('x, y')
assume(x>0)
assume(y>0)
bool(y*(x-y)==0)

RuntimeError: ECL says: C-STACK overflow at size 1048576. Stack can probably be resized. Proceed with caution.

This code should obviously return False. Changing y*(x-y) to x*(y-x) indeed returns False, which means x and y cannot be exchanged. Without the assumptions, the code works as expected.

I initially thought it was due to my Sage installation, but running this code on https://sagecell.sagemath.org/ also produces asymmetric behavior, though no error comes out (just a blank answer).

Is this a known issue ? Can someone reproduce this ?

Preview: (hide)

Comments

Gives me a "core dumped" with 8.9.rc0. This is a bug.

FrédéricC gravatar imageFrédéricC ( 5 years ago )

Confirmed with Sage 8.9.rc0, as well as with Sage 8.3. So the bug has been there for a while...

eric_g gravatar imageeric_g ( 5 years ago )

With 8.9.rc1+Trac#28534, I get a Sage crash ("Segmentation error").

Nice one...

Emmanuel Charpentier gravatar imageEmmanuel Charpentier ( 5 years ago )

1 Answer

Sort by » oldest newest most voted
3

answered 5 years ago

tmonteil gravatar image

This is clearly a bug, thanks for reporting, it is now trac ticket 28538

Preview: (hide)
link

Comments

The ticket fixed the issue, and was merged in Sage 9.2.beta11. Any later version of Sage, in particular Sage 9.2 and later, is free from this bug.

slelievre gravatar imageslelievre ( 4 years ago )

Your Answer

Please start posting anonymously - your entry will be published after you log in or create a new account.

Add Answer

Question Tools

1 follower

Stats

Asked: 5 years ago

Seen: 590 times

Last updated: Sep 26 '19