[erlang-patches] Fix serialization problem in xmerl export

Henrik Nord <>
Mon Nov 11 15:33:22 CET 2013


This was merged to maint on the 6th of november.

Thank you for your contribution!


On 2013-10-30 13:35, Richard Carlsson wrote:
> Ping?
>
>    /Richard
>
> On 2013-09-27 14:32, Fredrik wrote:
>> On 09/27/2013 01:49 PM, Richard Carlsson wrote:
>>> The inheritance mechanism in xmerl uses 'catch apply(M,F,Args)'
>>> to try different modules M until one was found that had a function
>>> F/A. However, when M:F/A does not exist, apply/3 will trap to
>>> error_handler:undefined_function/3, which will call
>>> code:ensure_loaded(M), making a synchronous request to the code
>>> server process. If many processes tried to use xmerl:export()
>>> concurrently, they would get serialized waiting for the code server
>>> process.
>>>
>>> This patch uses erlang:function_exported/3 instead to check if M:F/A
>>> exists. If M exists, it should already have been loaded at that point
>>> due to the inheritance checking in the xmerl:callbacks/1 function.
>>>
>>> git fetch :richcarl/otp.git
>>> xmerl-avoid-code-server-serialization
>>>
>>> https://github.com/richcarl/otp/tree/xmerl-avoid-code-server-serialization 
>>>
>>>
>>>
>>>
>>>    /Richard
>>> _______________________________________________
>>> erlang-patches mailing list
>>> 
>>> http://erlang.org/mailman/listinfo/erlang-patches
>> Hello Richard,
>> I've created a pullrequest for your patch, which you can follow here:
>> https://github.com/erlang/otp/pull/87
>> The patch will be run through initial tests and then be assigned to be
>> reviewed by responsible developers.
>> Thanks,
>>
>> -- 
>>
>> BR Fredrik Gustafsson
>> Erlang OTP Team
>>
>
> _______________________________________________
> erlang-patches mailing list
> 
> http://erlang.org/mailman/listinfo/erlang-patches

-- 
/Henrik Nord Erlang/OTP



More information about the erlang-patches mailing list