MCPcopy Index your code
hub / github.com/python/cpython / cet_protection

Function cet_protection

Lib/test/test_gdb/util.py:132–142  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

130
131# Control-flow enforcement technology
132def cet_protection():
133 cflags = sysconfig.get_config_var('CFLAGS')
134 if not cflags:
135 return False
136 flags = cflags.split()
137 # True if "-mcet -fcf-protection" options are found, but false
138 # if "-fcf-protection=none" or "-fcf-protection=return" is found.
139 return (('-mcet' in flags)
140 and any((flag.startswith('-fcf-protection')
141 and not flag.endswith(("=none", "=return")))
142 for flag in flags))
143CET_PROTECTION = cet_protection()
144
145

Callers 1

util.pyFile · 0.85

Calls 4

anyFunction · 0.50
splitMethod · 0.45
startswithMethod · 0.45
endswithMethod · 0.45

Tested by

no test coverage detected

Used in the wild real call sites across dependent graphs

searching dependent graphs…