You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
For some function pointers in a library, we don't want those to be rewritten because we know the function pointers are entirely internal to the compartment. We can use IA2_IGNORE in all of the places where function addresses are taken, but the fn ptr type will still get rewritten, resulting in compiler errors. We need a general mechanism for marking function pointer types that shouldn't be rewritten at all. IA2_BEGIN_NO_WRAP seems like the right mechanism for this, but currently it only applies to direct function calls, and can't be used in the way we want.
The text was updated successfully, but these errors were encountered:
using the being_no_wrap macro is gonna be more complicated here. Basically changing FnPtrTypes::run will keep the those types as fn ptrs (instead of structs) in the sources output by the rewriter, but in the input sources they'll still be seen as fn ptrs so the other libtooling passes (i.e. FnPtrExpr::run, FnPtrCall::run, etc.) may still find matches for things with those types. I think most of the other passes will need changes but it may be tricky for some of them because I don't think you can put attributes on expressions in C.
I'll handle this since it's not as simple as I anticipated and we'd really like to avoid the hacky workarounds that @kkysen needed for this.
For some function pointers in a library, we don't want those to be rewritten because we know the function pointers are entirely internal to the compartment. We can use
IA2_IGNORE
in all of the places where function addresses are taken, but the fn ptr type will still get rewritten, resulting in compiler errors. We need a general mechanism for marking function pointer types that shouldn't be rewritten at all.IA2_BEGIN_NO_WRAP
seems like the right mechanism for this, but currently it only applies to direct function calls, and can't be used in the way we want.The text was updated successfully, but these errors were encountered: