On 2019-03-05 15:18, John Nemeth wrote:
On Mar 4, 10:07am, Kern Sibbald wrote:
}
} abort() is not portable -- it behaves differently on different
} systems.

     abort() is part of the C standard, which means that it is
completely portable.

} A segfault is portable, so we use have used it for 20 years now, and it
} works fine.  Use abort() at your own risk.

     Derefencing a NULL pointer is undefined behaviour.  Modern
compilers are getting extremely aggressive in their handling of
undefined behaviour.  Dereference NULL pointers at your own risk.

}-- End of excerpt from Kern Sibbald

I have to agree with John here, not only is "abort()" part of the C and POSIX and related standards and highly portable, the use of "*0 = ..." is not.

It might be a memory from the early 1980s, straight out of uni and into the fray, but a lot of microprocessors don't consider location "0" to be magical.

        Cheers,
                Gary    B-)


_______________________________________________
Bacula-devel mailing list
Bacula-devel@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/bacula-devel

Reply via email to