Skip to content

Conversation

@lyokha
Copy link

@lyokha lyokha commented Apr 28, 2024

See details here, the removed functions were replaced by proposed erlang functions which existed since very early releases and had the same behavior (I tested that

%%%    ... erlang:integer_to_list(X, 16) returns hex
%%%    values <10 as only 1 character, ie. "0F" is simply returned as
%%%    "F"* ...

), so the change must be ok with older OTP versions too.

On my Fedora 39 with OTP 26 sessions that contain apply_to_content='ts_digest:md5hex' break with

** Reason for termination ==
** {'function not exported',
       [{httpd_util,integer_to_hexlist,"Ô",[]},
        {ts_digest,'-tohex/1-fun-0-',1,
            [{file,"src/tsung/ts_digest.erl"},{line,75}]},
        {lists,map,2,[{file,"lists.erl"},{line,1559}]},
        {ts_digest,tohex,1,[{file,"src/tsung/ts_digest.erl"},{line,77}]},
        {ts_search,match,5,[{file,"src/tsung/ts_search.erl"},{line,142}]},
        {ts_client,handle_data_msg,2,
            [{file,"src/tsung/ts_client.erl"},{line,1150}]},
        {ts_client,handle_info2,3,
            [{file,"src/tsung/ts_client.erl"},{line,251}]},
        {gen_fsm,handle_msg,8,[{file,"gen_fsm.erl"},{line,475}]}]}

(in tsung installed by dnf), and worse, it hugely leaks memory. If I compile tsung from source, I get

$ make
Compiling  src/tsung/ts_digest.erl ... 
src/tsung/ts_digest.erl:75:44: Warning: httpd_util:integer_to_hexlist/1 is removed; use erlang:integer_to_list/2 with base 16 instead
%   75|                   ts_utils:to_lower(padhex(httpd_util:integer_to_hexlist(X)))
%     |                                            ^

This patch fixes the memory leak and the build.

see details [here](https://www.erlang.org/doc/general_info/removed),
the removed functions were replaced by proposed erlang functions which existed
since very early releases and had the same behavior, so the change must be ok
with older OTP versions too
@VlkrS
Copy link

VlkrS commented May 23, 2025

Yes please!

@VlkrS VlkrS mentioned this pull request May 23, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants