[PATCH] Ensure __va_list_tag has default visibility

Stephan Bergmann sbergman at redhat.com
Wed Jun 25 08:45:44 PDT 2014

I stumbled across this on Linux with -fvisibility=hidden when 
-fsanitize=function reported a false positive for an indirect call to a 
function with a va_list (aka __builtin_va_list, aka __va_list_tag 
(*)[1]) parameter.  Because __va_list_tag was considered hidden, the 
RTTI for the function's type was not exported from the two shared 
libraries involved, so the equality check failed.

This would apparently also need to be fixed in the other 
Create*BuiltinVaListDecl variants, but I'm not sure (a) whether the 
added const_cast is really deemed appropriate here (though I guess so, 
given the large number of existing similar const_casts across 
ASTContext.cpp), and (b) what the preferred way would be to break that 
long line. ;)

-------------- next part --------------
A non-text attachment was scrubbed...
Name: va_list_tag_default_visibility.patch
Type: text/x-patch
Size: 536 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/cfe-commits/attachments/20140625/586bb6b4/attachment.bin>

More information about the cfe-commits mailing list