Bug 514713 - KCalc crashes (SIGABRT) when attempting to handle or display calculations involving extremely large numbers (high power/exponentiation). The crash occurs in the GMP library (libgmp) during a string conversion or large-scale multiplication process. +3
Summary: KCalc crashes (SIGABRT) when attempting to handle or display calculations inv...
Status: RESOLVED UNMAINTAINED
Alias: None
Product: kcalc
Classification: Applications
Component: general (other bugs)
Version First Reported In: 24.12.1
Platform: Debian stable Linux
: NOR crash
Target Milestone: ---
Assignee: Evan Teran
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2026-01-16 23:24 UTC by Hamza Mahmoud Ahmed
Modified: 2026-01-20 21:20 UTC (History)
2 users (show)

See Also:
Latest Commit:
Version Fixed/Implemented In:
Sentry Crash Report:


Attachments
KDE Crash Bug (13.57 KB, text/vnd.kde.kcrash-report)
2026-01-16 23:24 UTC, Hamza Mahmoud Ahmed
Details

Note You need to log in before you can comment on or make changes to this bug.
Description Hamza Mahmoud Ahmed 2026-01-16 23:24:09 UTC
Created attachment 188605 [details]
KDE Crash Bug

SUMMARY : KCalc crashes (SIGABRT) when attempting to handle or display calculations involving extremely large numbers (high power/exponentiation). The crash occurs in the GMP library (libgmp) during a string conversion or large-scale multiplication process.
+3

STEPS TO REPRODUCE
1. Open KCalc
2. Enter a very large number (e.g., 999999999999999999999).
3. Raise it to a huge power (e.g., press x^y and enter 99999999999999).
4. Press equals (=) or try to process the calculation.

OBSERVED RESULT
The application freezes momentarily and then crashes immediately. The crash handler (DrKonqi) is triggered, showing a backtrace involving __gmpn_mul_fft and __gmpz_get_str.

EXPECTED RESULT
The application should either display the result using scientific notation, show an "Overflow" error, or cap the calculation to prevent a memory-related crash.

SOFTWARE/OS VERSIONS
Operating System: Kali GNU/Linux 2025.1
KDE Plasma Version: 6.3.0
KDE Frameworks Version: 6.11.0
Qt Version: 6.7.2
Kernel Version: 6.12.13-amd64 (64-bit)
Graphics Platform: Wayland
Processors: 8 × Intel® Core™ i5-8365U CPU @ 1.60GHz
Memory: 7.5 GiB of RAM
Graphics Processor: Mesa Intel® UHD Graphics 620
Manufacturer: Dell Inc.
Product Name: Latitude 5400

ADDITIONAL INFORMATION
The crash log indicates that the failure happens in the GNU Multiple Precision Arithmetic Library (libgmp.so.10) while the application is trying to convert a very large integer to a string for display in the UI. This suggests an issue with how KCalc handles memory allocation or buffer sizes for massive numeric outputs.
Comment 1 TraceyC 2026-01-20 21:20:38 UTC
Thanks for the bug report. Unfortunately, these versions of KCalc and Plasma are no longer maintained by KDE. Debian advises users to not submit bugs upstream (https://www.debian.org/Bugs/Reporting). It's possible that the bug exists only in Debian at this point. 

Could you report the bug to Debian using the report bug utility (https://packages.debian.org/stable/utils/reportbug)? If necessary, the maintainer of the package will forward the bug upstream.

Thanks for understanding.