aboutsummaryrefslogtreecommitdiffstats
path: root/lib/observer/test
diff options
context:
space:
mode:
authorBjörn Gustavsson <[email protected]>2017-10-11 14:45:11 +0200
committerBjörn Gustavsson <[email protected]>2017-10-18 14:05:01 +0200
commitea1ddd8800c82fb8ae7ac2f54f4217a35d6f463d (patch)
treeadb5e3b476cab193b7f047df32dd7d2d403d929b /lib/observer/test
parent008b44b75a5abf32b26365334597835a3c6fcfd1 (diff)
downloadotp-ea1ddd8800c82fb8ae7ac2f54f4217a35d6f463d.tar.gz
otp-ea1ddd8800c82fb8ae7ac2f54f4217a35d6f463d.tar.bz2
otp-ea1ddd8800c82fb8ae7ac2f54f4217a35d6f463d.zip
Dump literals separately to avoid incomplete heap data
When a literal was used from several processes, the literal would be dumped in only one of the processes. The other processes that referenced the literals would have incomplete heap data.
Diffstat (limited to 'lib/observer/test')
-rw-r--r--lib/observer/test/crashdump_viewer_SUITE.erl5
1 files changed, 4 insertions, 1 deletions
diff --git a/lib/observer/test/crashdump_viewer_SUITE.erl b/lib/observer/test/crashdump_viewer_SUITE.erl
index 0ec6d8dcfc..6ac9d7d3fb 100644
--- a/lib/observer/test/crashdump_viewer_SUITE.erl
+++ b/lib/observer/test/crashdump_viewer_SUITE.erl
@@ -613,7 +613,10 @@ truncate_dump(File) ->
{win32,_} -> <<"\r\n">>;
_ -> <<"\n">>
end,
- [StartBin,AfterTag] = binary:split(Bin,BinTag),
+ %% Split after "our binary" created by crashdump_helper
+ %% (it may not be the first binary).
+ RE = <<"\n=binary:(?=[0-9A-Z]+",NewLine/binary,"FF:010203)">>,
+ [StartBin,AfterTag] = re:split(Bin,RE,[{parts,2}]),
[AddrAndSize,BinaryAndRest] = binary:split(AfterTag,Colon),
[Binary,_Rest] = binary:split(BinaryAndRest,NewLine),
TruncSize = byte_size(Binary) - 2,