Re: [LAD] Segfault when trying to dereference __midi_event.buffer (c++ newbie question)

Previous message: [thread] [date] [author]
Next message: [thread] [date] [author]
To: <linux-audio-dev@...>
Date: Wednesday, November 21, 2012 - 12:49 pm

--20cf3074b29872679c04cf00c8a1
Content-Type: text/plain; charset=UTF-8

That's it. Apparently the cause of segfault is dereferencing the pointer
when there's no data.
After adding checks for available data the segfault 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.

--20cf3074b29872679c04cf00c8a1
Content-Type: text/html; charset=UTF-8
Content-Transfer-Encoding: quoted-printable

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.

--20cf3074b29872679c04cf00c8a1--

Previous message: [thread] [date] [author]
Next message: [thread] [date] [author]

Messages in current thread:
[LAD] Segfault when trying to dereference __midi_event.buffe..., Shani Hadiyanto Pribadi, (Wed Nov 21, 11:54 am)
Re: [LAD] Segfault when trying to dereference __midi_event.b..., Shani Hadiyanto Pribadi, (Wed Nov 21, 12:49 pm)
Re: [LAD] Segfault when trying to dereference __midi_event.b..., Harry van Haaren, (Wed Nov 21, 12:14 pm)