about summary refs log tree commit diff
path: root/debug/Makefile
diff options
context:
space:
mode:
authorAndreas Schwab <schwab@suse.de>2022-06-22 13:16:30 +0200
committerAndreas Schwab <schwab@suse.de>2022-06-22 17:00:44 +0200
commitdc30acf20bd635d71cd4c84100e842fdf0429e48 (patch)
tree9b94660663d2cca159afc77e8e41bc41bec31038 /debug/Makefile
parent2249ec60a987f9a7aa585890de2bd365b3656d28 (diff)
downloadglibc-dc30acf20bd635d71cd4c84100e842fdf0429e48.tar.gz
glibc-dc30acf20bd635d71cd4c84100e842fdf0429e48.tar.xz
glibc-dc30acf20bd635d71cd4c84100e842fdf0429e48.zip
debug: make __read_chk a cancellation point (bug 29274)
The __read_chk function, as the implementation behind the fortified read
function, must be a cancellation point, thus it cannot use INLINE_SYSCALL.
Diffstat (limited to 'debug/Makefile')
-rw-r--r--debug/Makefile7
1 files changed, 7 insertions, 0 deletions
diff --git a/debug/Makefile b/debug/Makefile
index 96029f32ee..456b349c4d 100644
--- a/debug/Makefile
+++ b/debug/Makefile
@@ -110,6 +110,7 @@ CPPFLAGS-tst-longjmp_chk2.c += -D_FORTIFY_SOURCE=1
 CFLAGS-tst-longjmp_chk3.c += -fexceptions -fasynchronous-unwind-tables
 CPPFLAGS-tst-longjmp_chk3.c += -D_FORTIFY_SOURCE=1
 CPPFLAGS-tst-realpath-chk.c += -D_FORTIFY_SOURCE=2
+CPPFLAGS-tst-read-chk-cancel.c += -D_FORTIFY_SOURCE=2
 
 # _FORTIFY_SOURCE tests.
 # Auto-generate tests for _FORTIFY_SOURCE for different levels, compilers and
@@ -204,6 +205,10 @@ ifeq ($(have-ssp),yes)
 tests += tst-ssp-1
 endif
 
+ifeq ($(have-thread-library), yes)
+tests += tst-read-chk-cancel
+endif
+
 ifeq (,$(CXX))
 tests-unsupported = $(tests-cc-chk)
 endif
@@ -242,3 +247,5 @@ $(objpfx)xtrace: xtrace.sh
 	    -e 's|@BINDIR@|$(bindir)|' -e 's|@PKGVERSION@|$(PKGVERSION)|' \
 	    -e 's|@REPORT_BUGS_TO@|$(REPORT_BUGS_TO)|' $^ > $@.new \
 	&& rm -f $@ && mv $@.new $@ && chmod +x $@
+
+$(objpfx)tst-read-chk-cancel: $(shared-thread-library)