[SDL] Running a single binary on different versions of fedora

Stephane Marchesin stephane.marchesin at wanadoo.fr
Tue Jan 4 10:00:09 PST 2005


pallavnawani at sancharnet.in wrote:

>Hello,
>
>I am trying to port my game RiotBall  (uses SDL) to linux. It compiles
>and runs well, but I have a strange problem.
>
>I have two pcs, pc1 is celeron with fedora core 1 installed, pc2 is an
>athlon xp with fedora core 3 installed.
>
>If I try to run the binary compiled on pc1 on pc2, I get the following
>error:
>
>*** glibc detected *** double free or corruption: 0x08e33fe0 ***
>Aborted
>
>And the program is aborted. If I compile the game on pc2, however, it
>runs just fine. And of course, the binary compiled on pc2 does not run
>on pc1 because it demands different version of glibc.
>
>The executables run well on the pc on which they are compiled.
>
>pc1 has SDL 1.2.5 and pc2 has SDL 1.2.7. They
>have different versions of gcc. pc1 ->  3.3.2, pc2 -> 3.4.2
>
>What I want to do is to compile a single executable that will run on all
>versions of fedora (1 to 3 and maybe newer ones too).
>
>Any suggestions on what is going wrong? A better way to do this? I
>could compile a static binary, but I think the problem above will
>probably not go away.
>
No, because it's probably a bug in your code.
Recent linux distributions include a small memcheck tool in the 
mallocing routines (which is good if you ask me) and this tool found a bug.

I advise using a real memory checker (valgrind is the best you can get) 
and fix your code.

Stephane







More information about the SDL mailing list