[Tremor] Segfault problems with tremor

Dimitry Andric dimitry at andric.com
Thu Nov 11 11:41:17 PST 2004


On 2004-11-11 at 14:33:52 Andrew de Quincey wrote:

> int vorbis_block_init(vorbis_dsp_state *v, vorbis_block *vb){
===
> Specifically,   the memset(vb,0,sizeof(*vb));
> This is NOT wiping the supplied vorbis_block structure; it is only wiping the
> first 4 bytes of it - the size of a pointer on the PPC

Note that it says sizeof(*vb), not sizeof(vb), so your compiler must
be buggy, since it should set the whole structure to 0.  In other
words, sizeof(vorbis_block) is precisely the same value as
sizeof(*vb).  You should be able to verify that by printing them on
stdout.
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: application/pgp-signature
Size: 183 bytes
Desc: not available
Url : http://lists.xiph.org/pipermail/tremor/attachments/20041111/a0673462/attachment.pgp


More information about the Tremor mailing list