Skip to content
Snippets Groups Projects
Commit cef0c0bb authored by Alexander Monakov's avatar Alexander Monakov
Browse files

do not tailcall __sanitizer_cov_trace_pc [PR90746]

When instrumentation is requested via -fsanitize-coverage=trace-pc, GCC
emits calls of __sanitizer_cov_trace_pc callback in each basic block.
This callback is supposed to be implemented by the user, and should be
able to identify the containing basic block by inspecting its return
address. Tailcalling the callback prevents that, so disallow it.

gcc/ChangeLog:

	PR sanitizer/90746
	* calls.cc (can_implement_as_sibling_call_p): Reject calls
	to __sanitizer_cov_trace_pc.

gcc/testsuite/ChangeLog:

	PR sanitizer/90746
	* gcc.dg/sancov/basic0.c: Verify absence of tailcall.
parent 1c26adba
No related branches found
No related tags found
No related merge requests found
Loading
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment