compnerd wrote:

> However, creating an arbitrary runtime function without ensuring that we 
> don't have an existing "user defined" function here is concerning. What 
> happens if you assign a 'personality' to the name of a different function? Is 
> that not problematic? Particularly if the type doesn't match?

I understand and acknowledge the concern.

I think the question is what is "user defined"? In some senses it is exactly 
what we need here - the user is the language runtime author.

The conflict issue exists today as well. I could define my own implementation 
of the C or C++ personality and cause that conflict, which would likely be 
given higher precedence by the linker being locally defined.

We can certainly do more type checking on the personality routine. Keep in mind 
that even for cases where we could in theory do more today 
(`__gxx_personality_v0` from libc++abi) we do not.

I agree that any additional analysis that we can do, the better it is, but the 
possibility of preventing misuse is difficult when it is such low level.

https://github.com/llvm/llvm-project/pull/185225
_______________________________________________
cfe-commits mailing list
[email protected]
https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

Reply via email to