This is the mail archive of the gcc-patches@gcc.gnu.org mailing list for the GCC project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

[PATCH] Document -fsanitize=vptr (PR sanitizer/64706)


Hi!

I forgot to document this, is this ok for trunk or do you prefer some other
wording?

Slightly off-topic, what do you think about replacing *this ={v} {CLOBBER};
stmts in dtors of objects with virtual methods with storing of
NULL or some other value into the vtable pointer field, so that we would
(sometimes) catch member accesses and method calls after destruction?

2015-01-21  Jakub Jelinek  <jakub@redhat.com>

	PR sanitizer/64706
	* doc/invoke.texi (-fsanitize=vptr): Document.

--- gcc/doc/invoke.texi.jj	2015-01-20 11:51:41.000000000 +0100
+++ gcc/doc/invoke.texi	2015-01-21 12:49:14.679867871 +0100
@@ -5761,6 +5761,13 @@ This option enables instrumentation of l
 a value outside the range of values for the enum type is loaded,
 a run-time error is issued.
 
+@item -fsanitize=vptr
+@opindex fsanitize=vptr
+
+This option enables instrumentation of C++ member function calls, member
+accesses and some downcasts and upcasts, to verify the referenced object
+has the correct dynamic type.
+
 @end table
 
 While @option{-ftrapv} causes traps for signed overflows to be emitted,

	Jakub


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]