sanitizer_common: fix crashes in parsing of memory profiles
ParseUnixMemoryProfile assumes well-formed input with \n at the end, etc. It can over-read the input and crash on basically every line in the case of malformed input. ReadFileToBuffer has cap the max file size (64MB) and returns truncated contents if the file is larger. Thus even if kernel behaves, ParseUnixMemoryProfile crashes on too large /proc/self/smaps. Fix input over-reading in ParseUnixMemoryProfile. Depends on D112792. Reviewed By: melver Differential Revision: https://reviews.llvm.org/D112793
Loading
Please sign in to comment