mate-desktop / mate-calc

Calculator for MATE
http://www.mate-desktop.org
GNU General Public License v2.0
39 stars 33 forks source link

Inverse trig functions with no arguments crash the calculator #226

Closed dotto44 closed 2 weeks ago

dotto44 commented 1 month ago

Expected behaviour

cos⁻¹ is an invalid expression

Actual behaviour

mate-calc crashes:

munmap_chunk(): invalid pointer
Aborted (core dumped)

Steps to reproduce the behaviour

  1. Install + Open mate-calc
  2. Select mode -> Advanced
  3. Hit "cos", "x⁻¹", "=" A variety of functions work here in place of cos (e.g. any trig function, conj_, Im)

MATE general version

~$ mate-calc -v
mate-calc 1.26.0

Package version

Version: 1.26.0-1

Linux Distribution

Ubuntu 22.04.4 LTS x86_64

Link to bugreport of your Distribution (requirement)

https://bugs.launchpad.net/ubuntu/+source/mate-calc/+bug/2076854

lukefromdc commented 2 weeks ago

Tangent worked here for invoking the bug, cosine did not, giving an error message about an unknown variable instead. Good enough to test this though