[hazards] calls to lambda functions can be aliased
Categories
(Core :: JavaScript: GC, defect, P3)
Tracking
()
People
(Reporter: sfink, Unassigned)
References
(Blocks 1 open bug)
Details
template <typename Function>
void Call(Function&& f) {
f();
}
.
.
.
void function_pointers() {
Call([]() { printf("First lambda\n"): });
Call([]() { printf("Second lambda\n"): });
}
There are two specialized instances of the Call
function here, which sixgill distinguishes, but the invocations of f
within the two look identical in the sixgill output. It's not a fundamental problem; the information to distinguish them is present. But both look like source.cpp:void function_pointers()::<lambda()>
where source.cpp
is the filename, and function_pointers()
is the name of the function where the lambdas syntactically appear.
The specialized Call
instances have names like:
source.cpp:void Call1(_Z17function_pointersv::__lambda0&&) [with Function = function_pointers()::<lambda()>]
source.cpp:void Call2(_Z27annotated_function_pointersv::__lambda1&&) [with Function = annotated_function_pointers()::<lambda()>]
which shows that the compiler is numbering the lambdas, which is what we want. But the function-scoped and numbered names of the lambdas are not used for the call within the body of the templatized function.
Reporter | ||
Comment 1•2 years ago
|
||
This is using gcc's builtin mechanism for fetching the name of a function, so it's not a simple matter of adding smarts to sixgill. It may require detecting and customizing the function name generation for lambda calls.
Updated•2 years ago
|
Description
•