null check fTeam in CoreDumper::Dump()
gcc warns "writing 4 bytes into a region of size 0" on ARM64 (-march=armv8.1-a -mno-outline-atomics) if it thinks fTeam can be null in atomic_or. Change-Id: I44c88dadf0cee6e3e54d2baaf0453ae70aa1f3c1 Reviewed-on: https://review.haiku-os.org/c/haiku/+/6838 Reviewed-by: Niels Sascha Reedijk <[email protected]> Tested-by: Commit checker robot <[email protected]>
This commit is contained in:
committed by
Adrien Destugues
parent
82272adad5
commit
2bffaa64dd
@@ -777,6 +777,11 @@ struct CoreDumper {
|
||||
|
||||
status_t Dump(const char* path, bool killTeam)
|
||||
{
|
||||
// gcc thinks fTeam may be null in atomic_or
|
||||
// and warn which causes error on some configs
|
||||
if (fTeam == NULL)
|
||||
return B_ERROR;
|
||||
|
||||
// the path must be absolute
|
||||
if (path[0] != '/')
|
||||
return B_BAD_VALUE;
|
||||
|
||||
Reference in New Issue
Block a user