Article View: bnr.lang.c++
Article #3Re: Is pointer in my address space?
From: Andrzej Bieszczad
Date: Fri, 09 Oct 1992 18:54
Date: Fri, 09 Oct 1992 18:54
24 lines
1605 bytes
1605 bytes
In article <1992Oct9.160154.2427@bnr.ca> crlstu4@bnr.ca (Goetz von Escher) writes: Hi there! Is there a way to find out if a pointer is a valid pointer in C/C++? Or in other words: If I want to read a value in memory, how do I know wether I can read the value at this address without causing an exception (bus error, segmentation fault and that stuff)? Anything? Goetz Perhaps you can intercept the signals? However, using an invalid pointer is a bug that should be fixed and not handled. Use PURIFY to clean up your programs. -- ========================================================================== Andrzej Bieszczad | Phone: (613) 763-2259 Bell-Northern Research, Ltd., | Fax: (613) 763-2626 Dept. 9K12, P.O. Box 3511, Station C, | email: andrzej@BNR.CA Ottawa, Ontario, Canada, K1Y 4H7 | "Welcome to the machine"-Pink Floyd ===========================================================================
Technical Details
Message-ID:
<ANDRZEJ.92Oct9135447@bcars268.bnr.ca>Path:
arc1-ca.pugleaf.net!sparky!uunet!spool.mu.edu!caen!zaphod.mps.ohio-state.edu!pacific.mps.ohio-state.edu!linac!convex!news.utdallas.edu!corpgate!bnrgate!bcars267!bcars267!andrzejReferences:
<1992Oct9.160154.2427@bnr.ca>Show Full Headers
Complete Article Headers
Newsgroups: bnr.lang.c++,comp.lang.c++ Path: arc1-ca.pugleaf.net!sparky!uunet!spool.mu.edu!caen!zaphod.mps.ohio-state.edu!pacific.mps.ohio-state.edu!linac!convex!news.utdallas.edu!corpgate!bnrgate!bcars267!bcars267!andrzej From: andrzej@bnr.ca (Andrzej Bieszczad) Subject: Re: Is pointer in my address space? In-Reply-To: crlstu4@bnr.ca's message of Fri, 9 Oct 92 16:01:54 GMT Message-ID: <ANDRZEJ.92Oct9135447@bcars268.bnr.ca> Sender: news@bnr.ca (usenet) Nntp-Posting-Host: bcars268 Organization: Bell-Northern Research Ltd., References: <1992Oct9.160154.2427@bnr.ca> Date: Fri, 9 Oct 1992 18:54:47 GMT Lines: 25