Learn how easy it is to sync an existing GitHub or Google Code repo to a SourceForge project! See Demo

Close

#15 Internal history implementation segfaults on x86_64 linux

v1.0_(example)
open
nobody
None
5
2014-01-21
2014-01-20
Mathias Buhr
No

I've noticed some segfaults and sigbus errors on archlinux x86_64 (they don't
ship the readline version) with calc. As it turns out there are some
bugs (overlapping pointers to memcpy) in the internal history
implementation.
The attached patch replaces the implementation with a doubly linked list.
This requires a bit more memory but is much more flexible, readable and
robust.

The patch does not modify HIST_SIZE in hist.h. This define now specifies
the max number of history entries. I didn't know what a good value could
look like.

Please let me know if I made any mistakes or didn't provide the patch in
the needed format.

1 Attachments

Discussion

  • Hello,

    Just got back from an expedition to the South Pole. Right before the start, we had to make an emergency move of our calc code base due to the ISP owner going into retirement. The mailing list has been redirected into my mailbox.

    Just as soon as we find a new build platform and a new calc mailing list host, we will process this bug (and a few others reported via EMail). Thanks for the report … we will address it in our next release.

    Any suggestions for a mailing list service that does good anti-spam filtering?

    What do you think about moving the calc source to a git repository?

    chongo (Landon Curt Noll) /\oo/\

     
  • Mathias Buhr
    Mathias Buhr
    2014-01-21

    Hi Landon,

    Monday, January 20, 2014, 9:12:56 PM, you wrote:

    Hello,

    Just got back from an expedition to the South Pole. Right before
    the start, we had to make an emergency move of our calc code base
    due to the ISP owner going into retirement. The mailing list has been redirected into my mailbox.

    Wow...and since you brought it up, I guess you have to post a picture or it
    didn't happen :)

    Just as soon as we find a new build platform and a new calc mailing
    list host, we will process this bug (and a few others reported via
    EMail). Thanks for the report … we will address it in our next release.

    I tried to contact the bug mail address (calc-bugs@asthe.com) in september
    beforehand but my mail came back. Don't remember why. Sorry that it took
    me so long to find calc@sourceforge.

    Any suggestions for a mailing list service that does good anti-spam filtering?

    What do you think about moving the calc source to a git repository?

    There are some other projects I'm contributing to and we're using
    github. So far it works nicely and most of the younger/new developers
    are probably used to git anyway. Hence, I would prefer
    a git repo.
    As for the mailing list I don't really have a good recommendation.
    Maybe google groups?

    Regards
    Mathias

    P.S.: I read your post in the other report: this report is not about the readline version. Readline works fine. It's about the non-readline version (which archlinux ships currently).

     
    Last edit: Mathias Buhr 2014-01-21