Release: OTP-R11b-5<br>Operating system: All<br><br>Problem description:<br><br>When the STDLIB module log_mf_h stores a problem report in the on-disk round-robin database, it can't store a problem report above a size of 64Kilobytes[*]. The reason is that the format used is to encode the report is (bit-syntax notation)
<br><br><<Size:16/integer, Report/binary>><br><br>So since 2^16 = 64K, trying to store a larger problem report fails. Then, when the SASL module 'rb' tries to read the problem report, it fails becase the report has the wrong size.
<br><br>Problem solution:<br><br>The attached patch changes the code so it<br>** Uses bit syntax rather than old peek/poke<br>** Uses a 4 byte size field rather than a 2 byte size field.<br><br>Solution considerations:<br>
<br>The patch will make all old log_mf_h logs on-disk unreadable. There is no upgrade path incorporated.<br><br>With a 32-bit integer word, it is possible to write enormously large error-reports to disk. Several gigabytes at least.
<br><br>Solution alternatives:<br><br>Use a 3-byte field. Not because of space, but because it is then a 8/16Mb report that can be written which makes the second consideration much more tolerable.<br><br>Use list_to_binary(Bin, [compressed]). We would save some space and trade Disk I/O for CPU cycles. However, I don't know how well that is supported in the system.
<br><br>[*] Maybe this is only 32 kilobytes because of signedness<br><br>