[erlang-bugs] bug in filelib:ensure_dir on Windows.

luc.tanguay <>
Wed May 23 06:07:23 CEST 2012


Hi.

I run R14B02 on Windows 2K8 64-bit server (but Erlang is 32-bit).  But looking at the latest code from GitHub, the problem is still there.

When I try filelib:ensure_dir("Y:/toto.txt") and the drive "Y:" does not exist, the VM crashes after a few minutes with eheap_alloc cannot allocate 1425410620 bytes of memory (of type "heap").

Looking at the Erlang source code for ensure_dir/1, and if I'm reading it right,  the endless loop is caused because the dirname in "Y:/toto.txt" is "Y:/" but "Y:/" is not considered a directory by do_is_dir/2. So a recursive call to ensure_dir/1 is done, and.....

Is it really a bug?

Luc

---
Le cri du nourrisson est le résultat de plusieurs années de recherche dans le domaine du signal d'alarme.
(Serge Bouchard)
---
Luc Tanguay, ing./P.Eng.
Bell Canada
671 De La Gauchetière 4e étage,
Montréal H3B 2M8
514-786-6440
cell: 514-229-7585

-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://erlang.org/pipermail/erlang-bugs/attachments/20120523/66a26d2c/attachment.html>


More information about the erlang-bugs mailing list