[erlang-questions] erl_ddll bugfixes

Jean-Sébastien Pédron js.pedron@REDACTED
Wed Oct 18 17:33:41 CEST 2006


-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1

Hello,

Note: I posted a mail a week ago on erlang-patches@ about a bug in
erl_ddll but didn't get any feedback so I try again here.

erl_ddll contains a bug with reference count. You'll find an example of
it in my first mail:
http://www.erlang.org/pipermail/erlang-patches/2006-October/000164.html

To sum up quickly the problem, ddll_server will only keep a reference
for the first and the last processes who loaded a library. Every
in-between process references will be dropped with each call to
erl_ddll:load_driver/2.

The consequence is that if the first and the last processes unload the
driver, the library will be effectively unloaded and every still running
port drivers will become unusable.

Since then, I found another bug regarding the link established between
ddll_server and the process who called erl_ddll:load_driver/2. This link
exists only between ddll_server and the first process. Following
processes who load the same library won't have a link and if they exit
without calling erl_ddll:unload_driver/1, their reference in ddll_server
will remain there until ddll_server terminates.

These two bugs exist at least from R10B-7 up to R11B-1.

- --
Jean-Sébastien Pédron
Meetic Corp.
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.4.2.2 (GNU/Linux)
Comment: Using GnuPG with Mozilla - http://enigmail.mozdev.org

iD8DBQFFNklVa+xGJsFYOlMRAvJOAJ4qKOgbDJt17QUxx6WuAN2mpmm6UQCgy1+2
+UeV0bjkxt4c7D1MMF9f7lg=
=ZL0b
-----END PGP SIGNATURE-----
-------------- next part --------------
A non-text attachment was scrubbed...
Name: otp_src_R11B-1-erl_ddll-reference_count.patch
Type: text/x-patch
Size: 604 bytes
Desc: not available
URL: <http://erlang.org/pipermail/erlang-questions/attachments/20061018/7719927c/attachment.bin>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: otp_src_R11B-1-erl_ddll-process-link.patch
Type: text/x-patch
Size: 461 bytes
Desc: not available
URL: <http://erlang.org/pipermail/erlang-questions/attachments/20061018/7719927c/attachment-0001.bin>


More information about the erlang-questions mailing list