bugLet me illustrate... - Bugs: bug #20240, Segfault induced by very long...


You are not allowed to post comments on this tracker with your current authentication level.

bug #20240: Segfault induced by very long error message

Submitted by:  Greg Chicares <chicares>
Submitted on:  Fri 22 Jun 2007 05:37:07 PM UTC  
Category:  GUI Severity:  3 - Normal
Item Group:  None Status:  Fixed
Privacy:  Public Assigned to:  None
Open/Closed:  Closed

Tue 13 Feb 2018 11:00:31 AM UTC, comment #2:

Closing because the only place in the code where this ever
seemed to matter was commented out a year ago:
commit 4d92a3834ab61ee5787d7a3d7b7f4a7b5c89907d

Greg Chicares <chicares>
Project Administrator
Sat 02 Aug 2008 04:18:53 PM UTC, comment #1:

I can't reproduce the problem, at least not with wx svn trunk. I tested logging functions with long strings and they seem to work fine.

Can anybody else still reproduce this?


Vadim Zeitlin <zeitlin>
Project Member
Fri 22 Jun 2007 05:37:07 PM UTC, original submission:

Here is an unclean workaround for an observed segfault.
We need to find the root cause and fix it, because the
observed problem could arise in a different case where
we don't happen to use such a workaround.

In 'census_view.cpp':

<< "Line #" << current_line << ": "
// TODO ?? It would be better to use fatal_error() instead of
// warning() followed by fatal_error() with a short string, but
// apparently that can segfault with very long strings. Is there
// a limit on exception size that should be tested here?
fatal_error() << "Invalid input." << LMI_FLUSH;

I never documented a failing testcase; we should try to
establish one using the applicable portion of the original


I believe that ultimately wxSafeShowMessage() should have
been called, but it would seem strange indeed for that
function to segfault, so we really need to nail down a
reproducible testcase. It seems conceivable that the
original code

throw std::range_error(error.str());

caused the segfault before it had a chance to be caught
and fed to wxSafeShowMessage(), though again that would
seem most strange.

Greg Chicares <chicares>
Project Administrator


No files currently attached


Depends on the following items: None found

Items that depend on this one: None found


Carbon-Copy List
  • -email is unavailable- added by chicares (Submitted the item)

    Do you think this task is very important?
    If so, you can add your encouragement to it.
    This task has 0 encouragements so far.

    Only logged-in users can vote.




    Follow 2 latest changes.

    Date Changed by Updated Field Previous Value => Replaced by
    2018-02-13 chicares StatusNone => Fixed
        Open/ClosedOpen => Closed

    Back to the top

    Powered by Savane 3.3