Stéphane Glondu <[email protected]> writes:

> tags 602170 + confirmed
> severity 602170 important
> thanks
>
> Le 02/11/2010 09:28, Joost Yervante Damad a écrit :
>> whenever there's something wrong, the binding looks up the exception to be
>> thrown, and throws it.
>> [...]
>> more details, including a patch with a possible solution can be found at:
>>
>> https://forge.ocamlcore.org/tracker/index.php?func=detail&aid=768&group_id=63&atid=338
>
> If you add "let _ = Bz2.version;;" at the beginning of your
> segfaulting example, it doesn't segfault any more.
>
> The reason why exceptions are not registered is because the Bz2 module
> is not linked in, and therefore its side-effects are not
> executed. This is because your example uses only externals that are
> declared as such in bz2.mli. This is unfortunate, but a known issue.
>
> I don't agree with you patch. The right fix IMHO would be to make one
> (or all) of the externals abstract in the .mli file. This would
> theoretically impact performances in bytecode, but I think not in
> native code because of inlining. But if performances are critical even
> in bytecode, I'd rather name the proposed function "init" instead of
> "register_exceptions" which doesn't look very elegant... Any other
> opinion on this would be welcome.
>
> Anyway, this would be an intrusive change (ABI change in interface ->
> binNMU of all reverse-dependencies), the problem is known and can be
> worked around, and we are in freeze, so I'd rather fix it later, after
> Squeeze release. Therefore, I hereby downgrade the severity to
> important.
>
>
> Cheers,

Please do fix this though. Make some/all externals abstract to force
linking in the module. Some speed penalty is preferable to
segfaults. Hoping users will call Bz2.version is just not going to work.

MfG
        Goswin



--
To UNSUBSCRIBE, email to [email protected]
with a subject of "unsubscribe". Trouble? Contact [email protected]
Archive: http://lists.debian.org/[email protected]

Reply via email to