FS#38585 - [calc] crashes & archlinux does not ship readline version

Attached to Project: Community Packages
Opened by Mathias Buhr (napcode) - Monday, 20 January 2014, 09:25 GMT
Last edited by Sergej Pupykin (sergej) - Monday, 27 January 2014, 09:04 GMT
Task Type Bug Report
Category Packages
Status Closed
Assigned To Sergej Pupykin (sergej)
Architecture All
Severity Low
Priority Normal
Reported Version
Due in Version Undecided
Due Date Undecided
Percent Complete 100%
Votes 0
Private No

Details

Description:
Calc's internal history implementation segfaults (at least on x86_64). I already wrote a patch for the calc developers but my mail didn't come through.
Nevertheless, there is a readline version which is working and probably better supported but archlinux does not ship this version. It can be enabled in the Makefile by (un-)commenting the appropriate lines. I suggest building & shipping the readline version.


Additional info:
* package version(s): calc-2.12.4.3
* config and/or log files etc.


Steps to reproduce:
Enter a few commands & calculations in calc and navigate though the history using the arrow keys. Valgrind reports problems as well.
This task depends upon

Closed by  Sergej Pupykin (sergej)
Monday, 27 January 2014, 09:04 GMT
Reason for closing:  Fixed
Additional comments about closing:  or try to reproduce it on clean system and provide steps to reproduce.
Comment by Mathias Buhr (napcode) - Sunday, 26 January 2014, 05:10 GMT
  • Field changed: Percent Complete (100% → 0%)
Bug still exists in calc-2.12.13. I suggest building & shipping the readline version of calc (see Makefile)
Comment by Sergej Pupykin (sergej) - Sunday, 26 January 2014, 08:27 GMT
current calc should use readline:

$ ldd /usr/bin/calc
linux-vdso.so.1 (0x00007fff899fe000)
libcalc.so.2.12.4.13 => /usr/lib/libcalc.so.2.12.4.13 (0x00007f0c6f7ad000)
libcustcalc.so.2.12.4.13 => /usr/lib/libcustcalc.so.2.12.4.13 (0x00007f0c6f5a7000)
libreadline.so.6 => /usr/lib/libreadline.so.6 (0x00007f0c6f361000)
libhistory.so.6 => /usr/lib/libhistory.so.6 (0x00007f0c6f158000)
libncursesw.so.5 => /usr/lib/libncursesw.so.5 (0x00007f0c6eef3000)
libc.so.6 => /usr/lib/libc.so.6 (0x00007f0c6eb49000)
/lib64/ld-linux-x86-64.so.2 (0x00007f0c6fa89000)

it is built using

make USE_READLINE="-DUSE_READLINE" READLINE_LIB="-lreadline" READLINE_EXTRAS="-lhistory -lncurses" -j1
Comment by Sergej Pupykin (sergej) - Sunday, 26 January 2014, 08:28 GMT
also it works for me

$ calc
C-style arbitrary precision calculator (version 2.12.4.13)
Calc is open software. For license details type: help copyright
[Type "exit" to exit, or "help" for help.]

; 2+2
4
; 3+3
6
; 4+4
8
; 2+2
4
;

$ pacman -Q calc
calc 2.12.4.13-1
Comment by Mathias Buhr (napcode) - Sunday, 26 January 2014, 10:12 GMT
Hmm, I'm on another machine (x86_64) right now and I could verify sergej's findings. The calc-2.12.4.13 package does seem to use readline and doesn't crash. I must have done something wrong or maybe updating the package went wrong on the other machine. Anyway, I guess this issue can be closed again.

Loading...