Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

Already on GitHub? Sign in to your account

Fix compilation with clang, work around double free #6

merged 2 commits into from Mar 9, 2013


None yet
2 participants

fuzxxl commented Mar 9, 2013

These patches fix two things

  • there is some point in the code that does a double free. As I was not able to fix that, the first patch turns off automatic abortion in case of double free. This fixes bug #1.
  • Some functions that are not declared void return without a value. Fix that by returning a dummy value. This makes compilation with clang possible

fuzxxl added some commits Mar 9, 2013

Workaround double free problems
The source code for handling images has a double free problem. Recent versions
of the GNU libc have a mechanism to automagically abort the program in such a
case. This causes Mosaic to crash if images are displayed.

I work around this issue by turning of automatical program abortion with a call
to mallopt().
Enable compilation with clang
Some functions that ought to return a value call return without any value. This
commit adds a dummy value to each of those returns so that clang stops

alandipert added a commit that referenced this pull request Mar 9, 2013

Merge pull request #6 from fuzxxl/master
Fix compilation with clang, work around double free

@alandipert alandipert merged commit c89d60c into alandipert:master Mar 9, 2013


alandipert commented Mar 9, 2013


Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment