3 Commits

Author SHA1 Message Date
Christopher Ferris
0a39f1a7e5
[scudo] Add errno description to mmap failure. (#87713)
Added unit tests for all of the linux report error functions.
2024-04-05 14:25:39 -07:00
Christopher Ferris
1949f7d6c9
[scudo] Clean up string handling (#86364)
Do not abort if a vector cannot increase its own capacity. In that case,
push_back calls silently fail.

Modify the ScopedString implementation so that it no longer requires two
passes to do the format. Move the helper functions to be private member
functions so that they can use push_back directly. This allows the
capacity to be increased under the hood and/or silently discards data if
the capacity is exceeded and cannot be increased.

Add new tests for the Vector and ScopedString for capacity increase
failures.

Doing this so that if a map call fails, and we are attempting to write
an error string, we can still get some of the message dumped. This also
avoids crashing in Scudo code, and makes the caller handle any failures.
2024-03-26 14:47:48 -07:00
Christopher Ferris
99d92d18e3
[scudo] Add specific die functions for linux specific failures. (#68650)
While running into failures on unmap calls, it becomes difficult to
figure out what's wrong. Break the dieOnMapUnmapError into specific
versions for map, unmap, and then one for mprotect.

Also, put these in a common linux space so that all linux derived code
can reuse this code.
2023-10-13 12:19:11 -07:00