[vorbis-dev] Re: Re: [fwd] Ogg123 crash report on EV4 Multia

Timothy J. Wood tjw at omnigroup.com
Fri Feb 9 17:29:16 PST 2001



   I often try to use macros like the following:

#define MY_MALLOC(x) x = malloc(sizeof(*(x)))

   Doesn't work with variable sized structures, but with those I often 
try to have a static inline that computes the size based on the size of 
the base struct and any variables that influence the size rather than 
hand coding the computation everywhere.

-tim

On Friday, February 9, 2001, at 05:11 PM, Monty wrote:

>
>
>
> On Fri, Feb 09, 2001 at 02:33:06PM -0500, Bill Nottingham wrote:
>> Monty (xiphmont at xiph.org) said:
>>>> It dies identically on an alpha in testing here, and on ia64 as
>>>> well - it's corrupting memory somewhere. I'm guessing *something*
>>>> is using longs when it really wants int32s, but I haven't tracked
>>>> down what yet.
>>>
>>> ...or more possibly int/long/float when it means int*/long*/float*.
>>> There was one such slipup found last week.
>>>
>>> Do you have electric fence handy?  That's usually the easiest place 
>>> to start.
>>
>> Tried, didn't help too much. However, using glibc's internal malloc
>> checking, it aborts the program at info.c:252
>> 	ci->book_param[i] = _ogg_calloc(1, sizeof(static_codebook));
>> the third time it's called. That's at least where it first
>> detects that something is screwed up in the memory pool.
>
> Ah!  I think I got it: an _ogg_malloc(sizeof(float)... where I meant
> _ogg_malloc(sizeof(long)...
>
> I'll bet that long is 64 bit and float is still 32.  Committing fix
> now.  Very odd that electric fence would not have seen that though.
>
> Monty
>
> --- >8 ----
> List archives:  http://www.xiph.org/archives/
> Ogg project homepage: http://www.xiph.org/ogg/
> To unsubscribe from this list, send a message to 'vorbis-dev-
> request at xiph.org'
> containing only the word 'unsubscribe' in the body.  No subject is 
> needed.
> Unsubscribe messages sent to the list will be ignored/filtered.
>

--- >8 ----
List archives:  http://www.xiph.org/archives/
Ogg project homepage: http://www.xiph.org/ogg/
To unsubscribe from this list, send a message to 'vorbis-dev-request at xiph.org'
containing only the word 'unsubscribe' in the body.  No subject is needed.
Unsubscribe messages sent to the list will be ignored/filtered.



More information about the Vorbis-dev mailing list