glibc/gmon
Sergey Bugaev 533deafbdf Use O_CLOEXEC in more places (BZ #15722)
When opening a temporary file without O_CLOEXEC we risk leaking the
file descriptor if another thread calls (fork and then) exec while we
have the fd open. Fix this by consistently passing O_CLOEXEC everywhere
where we open a file for internal use (and not to return it to the user,
in which case the API defines whether or not the close-on-exec flag
shall be set on the returned fd).

Reviewed-by: Adhemerval Zanella <adhemerval.zanella@linaro.org>
Signed-off-by: Sergey Bugaev <bugaevc@gmail.com>
Message-Id: <20230419160207.65988-4-bugaevc@gmail.com>
2023-04-22 13:50:14 +02:00
..
sys gmon: improve mcount overflow handling [BZ# 27576] 2023-02-22 21:00:14 -05:00
gmon.c Use O_CLOEXEC in more places (BZ #15722) 2023-04-22 13:50:14 +02:00
Makefile gmon: fix memory corruption issues [BZ# 30101] 2023-02-22 21:03:30 -05:00
mcount.c gmon: improve mcount overflow handling [BZ# 27576] 2023-02-22 21:00:14 -05:00
prof-freq.c Moved to csu/errno-loc.c. 2005-12-14 15:06:39 +00:00
profil.c Update copyright dates with scripts/update-copyrights 2023-01-06 21:14:39 +00:00
sprofil.c Update copyright dates with scripts/update-copyrights 2023-01-06 21:14:39 +00:00
tst-gmon-gprof.sh Update copyright dates with scripts/update-copyrights 2023-01-06 21:14:39 +00:00
tst-gmon-pie.c Support profiling PIE [BZ #22284] 2017-10-12 03:49:40 -07:00
tst-gmon-static-gprof.sh Update copyright dates with scripts/update-copyrights 2023-01-06 21:14:39 +00:00
tst-gmon-static-pie.c Add --enable-static-pie configure option to build static PIE [BZ #19574] 2017-12-15 17:12:14 -08:00
tst-gmon-static.c Add a test for profiling static executable 2017-10-14 12:58:55 -07:00
tst-gmon.c Update copyright dates with scripts/update-copyrights 2023-01-06 21:14:39 +00:00
tst-mcleanup.c gmon: fix memory corruption issues [BZ# 30101] 2023-02-22 21:03:30 -05:00
tst-mcount-overflow-check.sh gmon: improve mcount overflow handling [BZ# 27576] 2023-02-22 21:00:14 -05:00
tst-mcount-overflow.c gmon: improve mcount overflow handling [BZ# 27576] 2023-02-22 21:00:14 -05:00
tst-profile-static.c * elf/dl-reloc.c [PROF] (_dl_relocate_object): Define 2005-07-07 02:39:45 +00:00
tst-sprofil.c Update copyright dates with scripts/update-copyrights 2023-01-06 21:14:39 +00:00
Versions linux: Make profil_counter a compat_symbol (BZ#17726) 2019-08-23 11:30:56 -03:00