[3.15] gh-151295: Fix use-after-free in bytes.join()/bytearray.join() via re-entrant __buffer__ (GH-151296) (GH-151304)

(cherry picked from commit 84a322aa1555df745a2c115df03bfb7a4ed8c594)

Co-authored-by: tonghuaroot (童话) <tonghuaroot@gmail.com>
3 files changed