Skip to content

GitLab

  • Projects
  • Groups
  • Snippets
  • Help
    • Loading...
  • Help
    • Help
    • Support
    • Community forum
    • Submit feedback
    • Contribute to GitLab
  • Sign in / Register
Vorbis
Vorbis
  • Project overview
    • Project overview
    • Details
    • Activity
    • Releases
  • Repository
    • Repository
    • Files
    • Commits
    • Branches
    • Tags
    • Contributors
    • Graph
    • Compare
  • Issues 21
    • Issues 21
    • List
    • Boards
    • Labels
    • Service Desk
    • Milestones
  • Merge Requests 0
    • Merge Requests 0
  • CI / CD
    • CI / CD
    • Pipelines
    • Jobs
    • Schedules
  • Operations
    • Operations
    • Incidents
    • Environments
  • Packages & Registries
    • Packages & Registries
    • Container Registry
  • Analytics
    • Analytics
    • CI / CD
    • Repository
    • Value Stream
  • Wiki
    • Wiki
  • Members
    • Members
  • Activity
  • Graph
  • Create a new issue
  • Jobs
  • Commits
  • Issue Boards
Collapse sidebar
  • Xiph.Org
  • VorbisVorbis
  • Issues
  • #77

Closed
Open
Opened Nov 09, 2001 by chouser@chouser

unaligned access on 64-bit platform

I was getting the following error when playing some (not all) ogg vorbis streams:

Unaligned access pid=54825 <ogg123> va=0x11fff96b4 pc=0x3ffbffe9ba0
ra=0x3ff801b4b68 inst=0xa6100000
Segmentation fault (core dumped)

The crash is happening in icomp(), lib/floor1.c.  I tracked it down to the qsort
that calls icomp() passing an incorrect size argument.  It uses sizeof(int) when
it means sizeof(int*).  This only shows up on machines where a pointer is begger
than an int, that is generally 64-bit platforms.

Here is a patch for 1.0rc2 -- I couldn't determine if you've already fixed this
problem because I wasn't able to get anon cvs working.

--- lib/floor1.c.orig	Mon Aug 13 07:33:39 2001
+++ lib/floor1.c	Fri Nov  9 15:29:56 2001
@@ -226,7 +226,7 @@
 
   /* also store a sorted position index */
   for(i=0;i<n;i++)sortpointer[i]=info->postlist+i;
-  qsort(sortpointer,n,sizeof(int),icomp);
+  qsort(sortpointer,n,sizeof(int*),icomp);
 
   /* points from sort order back to range number */
   for(i=0;i<n;i++)look->forward_index[i]=sortpointer[i]-info->postlist;

--Chouser
Assignee
Assign to
None
Milestone
None
Assign milestone
Time tracking
None
Due date
None
Reference: xiph/vorbis#77