fix: increase max crash key value length (#24782)
* fix: increase max crash key value length * chore: fix linting * chore: fix linux * Update spec-main/api-crash-reporter-spec.ts Co-authored-by: Jeremy Rose <jeremya@chromium.org> Co-authored-by: Samuel Attard <samuel.r.attard@gmail.com> Co-authored-by: Samuel Attard <sattard@slack-corp.com>
This commit is contained in:
parent
01023435c0
commit
d93bb34ac4
3 changed files with 34 additions and 5 deletions
|
@ -24,7 +24,19 @@ namespace crash_keys {
|
|||
|
||||
namespace {
|
||||
|
||||
using ExtraCrashKeys = std::deque<crash_reporter::CrashKeyString<127>>;
|
||||
#if defined(OS_LINUX)
|
||||
// Breakpad has a flawed system of calculating the number of chunks
|
||||
// we add 127 bytes to force an extra chunk
|
||||
constexpr size_t kMaxCrashKeyValueSize = 20479;
|
||||
#else
|
||||
constexpr size_t kMaxCrashKeyValueSize = 20320;
|
||||
#endif
|
||||
|
||||
static_assert(kMaxCrashKeyValueSize < crashpad::Annotation::kValueMaxSize,
|
||||
"max crash key value length above what crashpad supports");
|
||||
|
||||
using ExtraCrashKeys =
|
||||
std::deque<crash_reporter::CrashKeyString<kMaxCrashKeyValueSize>>;
|
||||
ExtraCrashKeys& GetExtraCrashKeys() {
|
||||
static base::NoDestructor<ExtraCrashKeys> extra_keys;
|
||||
return *extra_keys;
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue