X-Recipient: archive-cygwin AT delorie DOT com X-SWARE-Spam-Status: No, hits=-4.6 required=5.0 tests=AWL,BAYES_00,DKIM_SIGNED,DKIM_VALID,DKIM_VALID_AU,FREEMAIL_FROM,KHOP_RCVD_TRUST,KHOP_THREADED,RCVD_IN_DNSWL_LOW,RCVD_IN_HOSTKARMA_YE X-Spam-Check-By: sourceware.org MIME-Version: 1.0 In-Reply-To: <3e6368c8-5f18-496c-b677-cf499369b3be@email.android.com> References: <1358135756673-95377 DOT post AT n5 DOT nabble DOT com> <3e6368c8-5f18-496c-b677-cf499369b3be AT email DOT android DOT com> Date: Mon, 14 Jan 2013 13:11:01 +0100 Message-ID: Subject: Re: Using the free(*ptr) routine and getting an exception, "Exception: STATUS_ACCESS_VIOLATION" From: Csaba Raduly To: cygwin AT cygwin DOT com Content-Type: text/plain; charset=ISO-8859-1 Mailing-List: contact cygwin-help AT cygwin DOT com; run by ezmlm Precedence: bulk List-Id: List-Unsubscribe: List-Subscribe: List-Archive: List-Post: List-Help: , Sender: cygwin-owner AT cygwin DOT com Mail-Followup-To: cygwin AT cygwin DOT com Delivered-To: mailing list cygwin AT cygwin DOT com Content-Transfer-Encoding: 8bit X-MIME-Autoconverted: from quoted-printable to 8bit by delorie.com id r0EJol06005646 Hi, On Mon, Jan 14, 2013 at 6:11 AM, YZFury wrote: > Whoops. I was making the pointer point to x instead of putting x's value in the memory that was just allocated. Now i understand that. Really sorry for a stupid syntax error question on my part. thanks for the quick reply though :). Like I said basically new to C. > Nitpick: it wasn't a syntax error but a logic error. Your program was syntactically correct. Compilers are not allowed to generate object code from C++ which contains a syntax error. Note that your question had nothing to do with Cygwin. You happened to use Cygwin, but the behavior would have been the same with any C compiler and operating system. It would be better to ask in a general C programming forum, e.g. stackoverflow. Csaba -- GCS a+ e++ d- C++ ULS$ L+$ !E- W++ P+++$ w++$ tv+ b++ DI D++ 5++ The Tao of math: The numbers you can count are not the real numbers. Life is complex, with real and imaginary parts. "Ok, it boots. Which means it must be bug-free and perfect. " -- Linus Torvalds "People disagree with me. I just ignore them." -- Linus Torvalds -- Problem reports: http://cygwin.com/problems.html FAQ: http://cygwin.com/faq/ Documentation: http://cygwin.com/docs.html Unsubscribe info: http://cygwin.com/ml/#unsubscribe-simple