aboutsummaryrefslogtreecommitdiffstats
path: root/lib
diff options
context:
space:
mode:
authorSverker Eriksson <[email protected]>2012-08-15 21:00:37 +0200
committerSverker Eriksson <[email protected]>2012-08-15 21:00:37 +0200
commit68e0078eb58803dc4a7e0bfd801f32c2c92b7f26 (patch)
tree982ae87e5232a392b576fd2bedf65ef401664e26 /lib
parent125f494f3a0e31502d209fd050d16f47b9d417da (diff)
parent29921882be8873f763f6135badc864442de74304 (diff)
downloadotp-68e0078eb58803dc4a7e0bfd801f32c2c92b7f26.tar.gz
otp-68e0078eb58803dc4a7e0bfd801f32c2c92b7f26.tar.bz2
otp-68e0078eb58803dc4a7e0bfd801f32c2c92b7f26.zip
Merge branch 'sverk/ets-compressed-binary-bug/OTP-10182' into maint
* sverk/ets-compressed-binary-bug/OTP-10182: Fix corrupted binaries in compressed ETS tables Make ETS compile with #define DEBUG_CLONE
Diffstat (limited to 'lib')
-rw-r--r--lib/stdlib/test/ets_SUITE.erl16
1 files changed, 16 insertions, 0 deletions
diff --git a/lib/stdlib/test/ets_SUITE.erl b/lib/stdlib/test/ets_SUITE.erl
index 297c4ec1c9..97ac433cb9 100644
--- a/lib/stdlib/test/ets_SUITE.erl
+++ b/lib/stdlib/test/ets_SUITE.erl
@@ -74,6 +74,7 @@
-export([bad_table/1, types/1]).
-export([otp_9932/1]).
-export([otp_9423/1]).
+-export([otp_10182/1]).
-export([init_per_testcase/2, end_per_testcase/2]).
%% Convenience for manual testing
@@ -146,6 +147,7 @@ all() ->
exit_many_large_table_owner, exit_many_tables_owner,
exit_many_many_tables_owner, write_concurrency, heir,
give_away, setopts, bad_table, types,
+ otp_10182,
otp_9932,
otp_9423].
@@ -5470,6 +5472,20 @@ otp_9423(Config) when is_list(Config) ->
Skipped -> Skipped
end.
+
+%% Corrupted binary in compressed table
+otp_10182(Config) when is_list(Config) ->
+ Bin = <<"aHR0cDovL2hvb3RzdWl0ZS5jb20vYy9wcm8tYWRyb2xsLWFi">>,
+ Key = {test, Bin},
+ Value = base64:decode(Bin),
+ In = {Key,Value},
+ Db = ets:new(undefined, [set, protected, {read_concurrency, true}, compressed]),
+ ets:insert(Db, In),
+ [Out] = ets:lookup(Db, Key),
+ io:format("In : ~p\nOut: ~p\n", [In,Out]),
+ ets:delete(Db),
+ In = Out.
+