mesos-reviews mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Benjamin Mahler <bmah...@apache.org>
Subject Review Request 72233: Fixed undefined behavior in ActionObject::reserve.
Date Thu, 12 Mar 2020 22:00:25 GMT

-----------------------------------------------------------
This is an automatically generated e-mail. To reply, visit:
https://reviews.apache.org/r/72233/
-----------------------------------------------------------

Review request for mesos and Andrei Sekretenko.


Repository: mesos


Description
-------

Found by Andrei Sekretenko using -fsanitize=address, the following
expression has an intermediate temporary!

  const RepeatedPtrField<Resource::ReservationInfo>&
    ancestorReservations =
    RepeatedPtrField<Resource>(ancestor).begin()->reservations();

Therefore, the intermediate temporary will not have its lifetime
extended and this is undefined behavior which leads to a crash
in the windows CI.


Diffs
-----

  src/master/authorization.cpp 6dfa59ad621d9aa0fd1dbbdbe4fa8965e413774f 


Diff: https://reviews.apache.org/r/72233/diff/1/


Testing
-------

Ran through windows CI.


Thanks,

Benjamin Mahler


Mime
  • Unnamed multipart/alternative (inline, None, 0 bytes)
View raw message