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

Submitter:  Greg Chicares <chicares>
Submitted:  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>
Group 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?

Thanks!

Vadim Zeitlin <zeitlin>
Group 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':

                warning()
                    << "Line #" << current_line << ": "
...
                    << LMI_FLUSH
                    ;
// 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
code--see:

http://cvs.savannah.gnu.org/viewvc/lmi/lmi/census_view.cpp?view=diff&r1=1.36&r2=1.37

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>
Group administrator

 

(Note: upload size limit is set to 16384 kB, after insertion of the required escape characters.)

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)
  •  

    There are 0 votes so far. Votes easily highlight which items people would like to see resolved in priority, independently of the priority of the item set by tracker managers.

     

    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.13-758e.
    Corresponding source code