This is the mail archive of the cygwin@sourceware.cygnus.com mailing list for the Cygwin project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]

Re: cygwin.dll bug


Hi, you wrote:

: > I hope that's not very old, bad code relying to dereference NULL...

: I wrote the original post. I still haven't had time to check for problems
: in my own code but I am not a very experienced C++ programmer and got
: curious about your comment: What is "...relying to deference NULL"?
                                                     ^^^^^^^^^
Sorry, you mad a cool typo! I just looked up this word in a dictionary.
Everybody should really honour and respect NULL pointers 8-)

Most older hardware and software didn't have memory protection at all,
and some data or code could legally reside at address zero, thus reads
or maybe even writes were allowed.

Our HP-UX box can do both, the default allowing it! From it's man ld:

           -z             Arrange for run-time dereferencing of null
                          pointers to produce a SIGSEGV signal.  (This is
                          the complement of the -Z option.)

           -Z             Arrange to allow run-time dereferencing of null
                          pointers.  See the discussions of -Z and pointers
                          in cc(1).  (This is the complement of the -z
                          option.)

Now guess why I compile my programs -z ...


Bye, Heribert (dahms@ifk20.mach.uni-karlsruhe.de)
-
For help on using this list, send a message to
"gnu-win32-request@cygnus.com" with one line of text: "help".


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]