chicken-users
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[Chicken-users] Problem with finalizers?


From: Alejandro Forero Cuervo
Subject: [Chicken-users] Problem with finalizers?
Date: Sun, 1 May 2005 10:59:25 -0500
User-agent: Mutt/1.5.6+20040907i

Are finalizers actually getting called?

One of my applications recently started crashing.  After a few days of
debugging it (it misteriously crashes at random points after it has
been running for 40 minutes), I noticed that if I removed its use of
the iconv egg, it wouldn't crash.  Unable to find any bugs in the
iconv egg, I made it print the addresses of the pointers it mallocs.
Voila: they go up and up and up until around 0xbf000000 (yes, and
my process has a virtual memory space of around 3G) and then malloc
starts returning small addresses and the process crashes quickly.

This crash is easy to reproduce: after use'ing srfi-1 and iconv,
evaluate the following expression repeatedly in CSI:

  (for-each (lambda a (iconv-open "us-ascii" "us-ascii")) (iota 10000))

Watch memory usage grow up and up...

Interestingly, the following expression does not trigger the problem:

  (do () (#f) (iconv-open "us-ascii" "us-ascii"))

As a sideline, would it be too difficult to have Chicken print an "out
of memory" message instead of crashing when no more memory is
available?

I'm using Chicken 1.89, but I think 1.66 is affected as well (I
upgraded to 1.89 after my application started crashing).

Thanks!

Alejo.
http://bachue.com/alejo

---=(  Comunidad de Usuarios de Software Libre en Colombia  )=---
---=(  http://bachue.com/colibri )=--=( address@hidden  )=---




reply via email to

[Prev in Thread] Current Thread [Next in Thread]