Skip to content

Commit

Permalink
Merge branch 'dev' of git://github.com/erlang/otp into hipe-fixes
Browse files Browse the repository at this point in the history
  • Loading branch information
kostis committed Apr 8, 2010
2 parents 77dbda1 + 91bec64 commit 1050a85
Show file tree
Hide file tree
Showing 11 changed files with 237 additions and 38 deletions.
10 changes: 9 additions & 1 deletion configure.in
Expand Up @@ -386,10 +386,18 @@ if test -f "erts/doc/CONF_INFO"; then
echo '*********************************************************************'
echo
printf "%-15s: \n" documentation;
havexsltproc="yes"
for cmd in `cat erts/doc/CONF_INFO`; do
echo " $cmd is missing."
if test $cmd = "xsltproc"; then
havexsltproc="no"
fi
done
echo ' The documentation can not be built.'
if test $havexsltproc = "no"; then
echo ' The documentation can not be built.'
else
echo ' Using fakefop to generate placeholder PDF files.'
fi
echo
echo '*********************************************************************'
fi
5 changes: 3 additions & 2 deletions erts/configure.in
Expand Up @@ -821,13 +821,14 @@ fi
AC_CHECK_PROGS(XSLTPROC, xsltproc)
if test -z "$XSLTPROC"; then
echo "xsltproc" >> doc/CONF_INFO
AC_MSG_WARN([No 'xsltproc' command found: the documentation can not be built])
AC_MSG_WARN([No 'xsltproc' command found: the documentation cannot be built])
fi

AC_CHECK_PROGS(FOP, fop)
if test -z "$FOP"; then
FOP="$ERL_TOP/make/fakefop"
echo "fop" >> doc/CONF_INFO
AC_MSG_WARN([No 'fop' command found: the documentation can not be built])
AC_MSG_WARN([No 'fop' command found: going to generate placeholder PDF files])
fi

dnl
Expand Down
17 changes: 11 additions & 6 deletions lib/hipe/arm/hipe_arm_pp.erl
@@ -1,20 +1,20 @@
%% -*- erlang-indent-level: 2 -*-
%%
%% %CopyrightBegin%
%%
%% Copyright Ericsson AB 2005-2009. All Rights Reserved.
%%
%%
%% Copyright Ericsson AB 2005-2010. All Rights Reserved.
%%
%% The contents of this file are subject to the Erlang Public License,
%% Version 1.1, (the "License"); you may not use this file except in
%% compliance with the License. You should have received a copy of the
%% Erlang Public License along with this software. If not, it can be
%% retrieved online at http://www.erlang.org/.
%%
%%
%% Software distributed under the License is distributed on an "AS IS"
%% basis, WITHOUT WARRANTY OF ANY KIND, either express or implied. See
%% the License for the specific language governing rights and limitations
%% under the License.
%%
%%
%% %CopyrightEnd%
%%

Expand Down Expand Up @@ -246,6 +246,11 @@ stop_suffix(StOp) ->
'strb' -> "b"
end.

imm8m_decode(Value, 0) ->
Value;
imm8m_decode(Value, Rot) ->
(Value bsr (2 * Rot)) bor (Value bsl (2 * (16 - Rot))).

pp_temp(Dev, Temp=#arm_temp{reg=Reg, type=Type}) ->
case hipe_arm:temp_is_precoloured(Temp) of
true ->
Expand Down Expand Up @@ -292,7 +297,7 @@ pp_am1(Dev, Am1) ->
io:format(Dev, "#~w", [Imm5])
end;
{Imm8,Imm4} ->
io:format(Dev, "#~w, 2*~w", [Imm8,Imm4])
io:format(Dev, "#~s", [to_hex(imm8m_decode(Imm8, Imm4))])
end.

pp_am2(Dev, #am2{src=Src,sign=Sign,offset=Am2Offset}) ->
Expand Down
26 changes: 15 additions & 11 deletions lib/ssl/src/ssl.erl
Expand Up @@ -154,17 +154,21 @@ transport_accept(#sslsocket{pid = {ListenSocket, #config{cb=CbInfo, ssl=SslOpts}
EmOptions = emulated_options(),
{ok, InetValues} = inet:getopts(ListenSocket, EmOptions),
{CbModule,_,_} = CbInfo,
{ok, Socket} = CbModule:accept(ListenSocket, Timeout),
inet:setopts(Socket, internal_inet_values()),
{ok, Port} = inet:port(Socket),
case ssl_connection_sup:start_child([server, "localhost", Port, Socket,
{SslOpts, socket_options(InetValues)}, self(),
CbInfo]) of
{ok, Pid} ->
CbModule:controlling_process(Socket, Pid),
{ok, SslSocket#sslsocket{pid = Pid}};
{error, Reason} ->
{error, Reason}
case CbModule:accept(ListenSocket, Timeout) of
{ok, Socket} ->
inet:setopts(Socket, internal_inet_values()),
{ok, Port} = inet:port(Socket),
ConnArgs = [server, "localhost", Port, Socket,
{SslOpts, socket_options(InetValues)}, self(), CbInfo],
case ssl_connection_sup:start_child(ConnArgs) of
{ok, Pid} ->
CbModule:controlling_process(Socket, Pid),
{ok, SslSocket#sslsocket{pid = Pid}};
{error, Reason} ->
{error, Reason}
end;
{error, Reason} ->
{error, Reason}
end;

transport_accept(#sslsocket{} = ListenSocket, Timeout) ->
Expand Down
50 changes: 39 additions & 11 deletions lib/ssl/test/ssl_basic_SUITE.erl
Expand Up @@ -155,7 +155,7 @@ all(suite) ->
upgrade, upgrade_with_timeout, tcp_connect,
ipv6, ekeyfile, ecertfile, ecacertfile, eoptions, shutdown,
shutdown_write, shutdown_both, shutdown_error, ciphers,
send_close, dh_params,
send_close, close_transport_accept, dh_params,
server_verify_peer_passive,
server_verify_peer_active, server_verify_peer_active_once,
server_verify_none_passive, server_verify_none_active,
Expand Down Expand Up @@ -729,6 +729,32 @@ send_close(Config) when is_list(Config) ->
gen_tcp:close(TcpS),
{error, _} = ssl:send(SslS, "Hello world"),
ssl_test_lib:close(Server).

%%--------------------------------------------------------------------
close_transport_accept(doc) ->
["Tests closing ssl socket when waiting on ssl:transport_accept/1"];

close_transport_accept(suite) ->
[];

close_transport_accept(Config) when is_list(Config) ->
ServerOpts = ?config(server_opts, Config),
{_ClientNode, ServerNode, _Hostname} = ssl_test_lib:run_where(Config),

Port = 0,
Opts = [{active, false} | ServerOpts],
{ok, ListenSocket} = rpc:call(ServerNode, ssl, listen, [Port, Opts]),
spawn_link(fun() ->
test_server:sleep(?SLEEP),
rpc:call(ServerNode, ssl, close, [ListenSocket])
end),
case rpc:call(ServerNode, ssl, transport_accept, [ListenSocket]) of
{error, closed} ->
ok;
Other ->
exit({?LINE, Other})
end.

%%--------------------------------------------------------------------
dh_params(doc) ->
["Test to specify DH-params file in server."];
Expand Down Expand Up @@ -860,7 +886,7 @@ tcp_connect(Config) when is_list(Config) ->
Server = ssl_test_lib:start_upgrade_server([{node, ServerNode}, {port, 0},
{from, self()},
{timeout, 5000},
{mfa, {?MODULE, should_close, []}},
{mfa, {?MODULE, dummy, []}},
{tcp_options, TcpOpts},
{ssl_options, ServerOpts}]),
Port = ssl_test_lib:inet_port(Server),
Expand All @@ -869,18 +895,20 @@ tcp_connect(Config) when is_list(Config) ->
test_server:format("Testcase ~p connected to Server ~p ~n", [self(), Server]),
gen_tcp:send(Socket, "<SOME GARBLED NON SSL MESSAGE>"),

ssl_test_lib:check_result(Server, {error,esslerrssl}, tcp_closed, Socket),

receive
{tcp_closed, Socket} ->
receive
{Server, {error, Error}} ->
test_server:format("Error ~p", [Error])
end
end,
ssl_test_lib:close(Server).


should_close(Socket) ->
receive
{ssl, Socket, closed} ->
server_closed;
Other ->
exit({?LINE, Other})
end.
dummy(Socket) ->
%% Should not happen as the ssl connection will not be established
%% due to fatal handshake failiure
exit(kill).

%%--------------------------------------------------------------------
ipv6(doc) ->
Expand Down
14 changes: 12 additions & 2 deletions lib/ssl/test/ssl_test_lib.erl
Expand Up @@ -448,9 +448,19 @@ trigger_renegotiate(Socket, _, 0, Id) ->
test_server:sleep(1000),
case ssl:session_info(Socket) of
[{session_id, Id} | _ ] ->
%% If a warning alert is received
%% from openssl this may not be
%% an error!
fail_session_not_renegotiated;
_ ->
ok
%% Tests that uses this function will not reuse
%% sessions so if we get a new session id the
%% renegotiation has succeeded.
[{session_id, _} | _ ] ->
ok;
{error, closed} ->
fail_session_fatal_alert_during_renegotiation;
{error, timeout} ->
fail_timeout
end;

trigger_renegotiate(Socket, ErlData, N, Id) ->
Expand Down
2 changes: 1 addition & 1 deletion lib/ssl/test/ssl_to_openssl_SUITE.erl
Expand Up @@ -327,7 +327,7 @@ erlang_client_openssl_server_no_wrap_sequence_number(Config) when is_list(Config

{ClientNode, _, Hostname} = ssl_test_lib:run_where(Config),

ErlData = "From erlang to openssl",
ErlData = "From erlang to openssl\n",
N = 10,

Port = ssl_test_lib:inet_port(node()),
Expand Down
5 changes: 4 additions & 1 deletion lib/ssl/vsn.mk
Expand Up @@ -19,7 +19,10 @@

SSL_VSN = 3.11

TICKETS = OTP-8517 OTP-7046
TICKETS = OTP-8517 \
OTP-7046 \
OTP-8557 \
OTP-8560

#TICKETS_3.10.9 = OTP-8510

Expand Down
24 changes: 24 additions & 0 deletions lib/xmerl/doc/src/notes.xml
Expand Up @@ -31,6 +31,30 @@
<p>This document describes the changes made to the Xmerl application.</p>


<section><title>Xmerl 1.2.5</title>

<section><title>Improvements and New Features</title>
<list>
<item>
<p>
All Erlang files are now built by the test server instead of the test directory Makefile.
</p>
<p>
Erlang files in data directories are now built by the test suites instead of using
prebuilt versions under version control.
</p>
<p>
Removed a number of obsolete guards.
</p>
<p>
Own Id: OTP-8537
</p>
</item>
</list>
</section>

</section>

<section><title>Xmerl 1.2.4</title>

<section><title>Improvements and New Features</title>
Expand Down
9 changes: 6 additions & 3 deletions lib/xmerl/vsn.mk
Expand Up @@ -17,14 +17,17 @@
# %CopyrightEnd%
#

XMERL_VSN = 1.2.4
XMERL_VSN = 1.2.5


TICKETS = \
OTP-8343
OTP-8537

TICKETS_1.2.5 = \
OTP-8537

TICKETS_1.2.4 = \
OTP-8343
OTP-8343

TICKETS_1.2.3 = \
OTP-8251 \
Expand Down

0 comments on commit 1050a85

Please sign in to comment.