You get the error message: Bad address
In C/C++ or Objective C programming an EFAULT is a bad buffer address... are you sure you've actually initialized this buffer to point to something valid? It's obviously a global or sometime... which itself is a pretty bad idea. You should allocate it in your function or it should be an ivar (if you're using Obj-C).
The POSIX error code 14 is called EFAULT, and it means you made a system call with an invalid pointer value. This is almost certainly some user-supplied buffer pointer to a read or write system call of some sort. Check all of the buffer pointers and make sure they're not NULL. Check the return value from malloc() - you might be failing to allocate a buffer.
Check on the file under /usr/include/asm/errno.h that contains a complete list of basic error codes.
# cat /usr/include/bits/errno.h
# cat /usr/include/asm-generic/errno.h
Bad address; an invalid pointer was detected. In the GNU system, this error never happens; you get a signal instead.
ERROR IS "cat: write error: Bad address."
The Postfix "bad address syntax" has nothing to do with the EFAULT bad address!
Disclaimer:The information provided in this document is intended for your information only. Lubby makes no claims to the validity of this information. Use of this information is at own risk!
About the Author
Author: Wim Peeters - Keskon GmbH & Co. KG
Wim Peeters is electronics engineer with an additional master in IT and over 30 years of experience, including time spent in support, development, consulting, training and database administration. Wim has worked with SQL Server since version 6.5. He has developed in C/C++, Java and C# on Windows and Linux. He writes knowledge base articles to solve IT problems and publishes them on the Lubby Knowledge Platform.