Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]


Groups > comp.lang.c++ > #12658

Re: C++ standard library and exceptions

From 88888 Dihedral <dihedral88888@googlemail.com>
Newsgroups comp.lang.c++
Subject Re: C++ standard library and exceptions
Date 2011-12-19 03:52 -0800
Organization http://groups.google.com
Message-ID <15855200.589.1324295544860.JavaMail.geo-discussion-forums@pril5> (permalink)
References (4 earlier) <4EE31545.3060802@gmail.com> <4ee43401$0$1389$4fafbaef@reader2.news.tin.it> <20111212111524.16a909e9@corefixtop.gillibert.homelinux.net> <20111212092105.701@kylheku.com> <da311f31-f83c-4928-83f0-3006c75af08a@t16g2000vba.googlegroups.com>

Show all headers | View raw


On Monday, December 19, 2011 6:38:03 PM UTC+8, Sektor van Skijlen wrote:
> On Dec 12, 6:28 pm, Kaz Kylheku <k....@kylheku.com> wrote:
> > > Well-defined programs cannot have any segfault... Any program having a
> > > segfault is in inconsistent state. Important data may have been
> > > damaged, and there is no guarantee of any sort of recovery.
> >
> > Sorry, that's a ridiculous assertion. Catching segfaults is a useful
> > software technique that can be used to do cool things.  A software emulator for
> > a CPU can catch a segfault to detect that writes are taking place to simulated
> > I/O space.  Garbage collectors can use segfaults. Some Lisp implementations
> > catch SIGSEGV as part of their garbage collector implementation. For instance
> > CLISP has a "libsigsegv" library for handling access violations and fixing them
> > up:
> >
> > http://libsigsegv.sourceforge.net/
> 
> That's an implementation detail, strongly cooperating with system
> level. It has
> completely nothing to do with SEGV occuring in C++ programs.
> 
> > > For the sake of security and data integrity, a good system detecting
> > > such an error, should kill/abort/terminate the program immediately.
> >
> > That is a silly view. Detecting the error already provides security and
> > integrity.
> 
> SEGV is not "detecting the error". SEGV is detecting the situation
> that shouldn't
> have occurred - it means that, of course, reporting SEGV means error,
> but this
> can quickly lead us to a statement that "not reporting SEGV means no
> error in
> data integrity", which is not true anyway - SEGV might have been only
> one of
> possible realizations of "undefined behavior". Others are e.g. writing
> to a
> memory not expected to be written.
> 
> What I mean is that SEGV doesn't just mean that "well, some error
> happened".

In a true virtual memory system of a robust OS, 
it is not allowed to write directly  to some wrong address outside those
allowed.

But this does not solve any indirect calling dead cycle formed 
by lousy  programs. 

Back to comp.lang.c++ | Previous | Next — Previous in thread | Next in thread | Find similar | Unroll thread


Thread

C++ standard library and exceptions ittium <ittium@gmail.com> - 2011-12-08 12:17 +0530
  Re: C++ standard library and exceptions ittium <ittium@gmail.com> - 2011-12-08 12:22 +0530
  Re: C++ standard library and exceptions Goran <goran.pusic@gmail.com> - 2011-12-08 01:02 -0800
    Re: C++ standard library and exceptions ittium <ittium@gmail.com> - 2011-12-08 16:35 +0530
      Re: C++ standard library and exceptions Goran <goran.pusic@gmail.com> - 2011-12-08 05:08 -0800
        Re: C++ standard library and exceptions ittium <ittium@gmail.com> - 2011-12-10 13:46 +0530
          Re: C++ standard library and exceptions "io_x" <a@b.c.invalid> - 2011-12-11 05:43 +0100
            Re: C++ standard library and exceptions "io_x" <a@b.c.invalid> - 2011-12-12 03:21 +0100
            Re: C++ standard library and exceptions André Gillibert <MetaEntropy.removeThis@gmail.com> - 2011-12-12 11:15 +0100
              Re: C++ standard library and exceptions Nobody <nobody@nowhere.com> - 2011-12-12 12:59 +0000
              Re: C++ standard library and exceptions Kaz Kylheku <kaz@kylheku.com> - 2011-12-12 17:28 +0000
                Re: C++ standard library and exceptions Paavo Helde <myfirstname@osa.pri.ee> - 2011-12-12 12:42 -0600
                Re: C++ standard library and exceptions Joshua Maurice <joshuamaurice@gmail.com> - 2011-12-12 14:18 -0800
                Re: C++ standard library and exceptions Sektor van Skijlen <ethouris@gmail.com> - 2011-12-19 02:38 -0800
                Re: C++ standard library and exceptions 88888 Dihedral <dihedral88888@googlemail.com> - 2011-12-19 03:52 -0800
              Re: C++ standard library and exceptions "io_x" <a@b.c.invalid> - 2011-12-13 09:16 +0100
              Re: C++ standard library and exceptions "io_x" <a@b.c.invalid> - 2011-12-13 09:17 +0100
                Re: C++ standard library and exceptions "Wolfgang.Draxinger" <Wolfgang.Draxinger@physik.uni-muenchen.de> - 2011-12-15 12:14 +0100
                Re: C++ standard library and exceptions Joshua Maurice <joshuamaurice@gmail.com> - 2011-12-15 15:50 -0800
                Re: C++ standard library and exceptions hanukas <jukka@liimatta.org> - 2011-12-17 21:57 -0800
                Re: C++ standard library and exceptions "io_x" <a@b.c.invalid> - 2011-12-19 04:02 +0100
                Re: C++ standard library and exceptions Joshua Maurice <joshuamaurice@gmail.com> - 2011-12-19 01:32 -0800
                Re: C++ standard library and exceptions Tobias Müller <troplin@bluewin.ch> - 2011-12-19 07:14 +0000
                Re: C++ standard library and exceptions Joshua Maurice <joshuamaurice@gmail.com> - 2011-12-19 01:29 -0800

csiph-web