Skip to content

Commit

Permalink
Revert "[sanitizer] Do not mmap FlagParser::flags_"
Browse files Browse the repository at this point in the history
Reverting since this caused Linux/odd_stack_size.cpp to fail on a bunch
of builders.

This reverts commit 34e2f4f.
  • Loading branch information
PiJoules committed Aug 29, 2023
1 parent ca0aa53 commit 21d7287
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 2 deletions.
5 changes: 4 additions & 1 deletion compiler-rt/lib/sanitizer_common/sanitizer_flag_parser.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -182,6 +182,9 @@ void FlagParser::RegisterHandler(const char *name, FlagHandlerBase *handler,
++n_flags_;
}

FlagParser::FlagParser() : n_flags_(0), buf_(nullptr), pos_(0) {}
FlagParser::FlagParser() : n_flags_(0), buf_(nullptr), pos_(0) {
flags_ =
(Flag *)GetGlobalLowLevelAllocator().Allocate(sizeof(Flag) * kMaxFlags);
}

} // namespace __sanitizer
2 changes: 1 addition & 1 deletion compiler-rt/lib/sanitizer_common/sanitizer_flag_parser.h
Original file line number Diff line number Diff line change
Expand Up @@ -163,7 +163,7 @@ class FlagParser {
const char *name;
const char *desc;
FlagHandlerBase *handler;
} flags_[kMaxFlags];
} *flags_;
int n_flags_;

const char *buf_;
Expand Down

0 comments on commit 21d7287

Please sign in to comment.