Ralph Giles
2008-Feb-11 12:47 UTC
[Vorbis-dev] Re: [xiph-commits] r14479 - trunk/vorbis-tools/ogg123
On 11-Feb-08, at 12:37 PM, ivo@svn.xiph.org wrote:> Author: ivo > Date: 2008-02-11 12:37:13 -0800 (Mon, 11 Feb 2008) > New Revision: 14479 > > Patch by Christian Weisgerber to fix possible problems in 64bit > systems with "int shuffle" and "int repeat".I'm confused. How does making these long help? -r
Ivo Emanuel Gonçalves
2008-Feb-11 12:52 UTC
[Vorbis-dev] Re: [xiph-commits] r14479 - trunk/vorbis-tools/ogg123
On 2/11/08, Ralph Giles <giles@xiph.org> wrote:> I'm confused. How does making these long help?I was going to post, or rather forward, Christian's explanation to the vorbis-tools 1.2.0 thread. Might as well do it here: "ogg123 suffers from a 32/64-bit screwup on LP64 platforms. cfgfile_options.c expects opt_type_bool and opt_type_int settings to be stored in long int variables. However, ogg123.c:fileopts[] points to options.shuffle and options.repeat that are defined as int in ogg123.h. This causes 64-bit writes to 32-bit variables. Depending on endianness, strict alignment requirements, and luck, this can result in garbage or address errors. (E.g., on sparc64, ogg123 immediately dumps core.) The easiest way to fix this is to bump options.shuffle and .repeat to type long int."