--e89a8f22bd89999e5204cf0115ad
Content-Type: text/plain; charset=ISO-8859-1On Wed, Nov 21, 2012 at 7:49 AM, Shani Hadiyanto Pribadi <
shanipribadi@gmx.net> wrote:> That's it. Apparently the cause of segfault is dereferencing the pointer
accessing an undefined pointer has undefined results. you can rely on that.
in C, in C++ and in any other language with pointers.
--e89a8f22bd89999e5204cf0115ad
Content-Type: text/html; charset=ISO-8859-1
Content-Transfer-Encoding: quoted-printable
On Wed, Nov 21, 2012 at 7:49 AM, Shani H=
adiyanto Pribadi <shanipribadi@gmx.net> wrote:
That's it. Apparently the cause of segfault is dereferencing the pointe=
r when there's no data.After adding checks for available data the s=
egfault does not happen anymore.It never occured to me that was the=
cause because on the C version, accessing the pointer when there's no =
data
returns 0x6a but didn't segfault. accessing a=
n undefined pointer has undefined results. you can rely on that. in C, in C=
++ and in any other language with pointers.
--e89a8f22bd89999e5204cf0115ad--
LINUX® is a registered trademark of Linus Torvalds in the USA and other countries.
Linuxaudio.org logo copyright Thorsten Wilms © 2006.
Hosting provided by the Virginia Tech Department of Music and DISIS.