Fix: protect visibility of filter-parser functions
A message that is not in the archive (sent off-list or not yet received): [email protected]
-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1
Merged!
Quoted 50 lines · Julien Desfossez
From: Mathieu Desnoyers <[email protected]>
Some functions share the same name between ctf-parser/lexer and filter-parser/lexer.
This patch protects the visibility of the functions with the same name to avoid linkage confusions.
Signed-off-by Mathieu Desnoyers <[email protected]>Signed-off-by Julien Desfossez <[email protected]> ---src/lib/lttng-ctl/filter-parser.y | 11 +++++++++++ 1 file changed, 11
insertions(+)(quoted diff) +0
-0b/src/lib/lttng-ctl/filter-parser.y index ea43352..8be5e43 100644 --- a/src/lib/lttng-ctl/filter-parser.y +++ b/src/lib/lttng-ctl/filter-parser.y @@ -32,13 +32,19 @@ #include "
filter-ast.h" #include "filter-parser.h"+__attribute__((visibility("protected"))) int yydebug; int
filter_parser_debug= 0;+__attribute__((visibility("protected"))) int
yyparse(struct filter_parser_ctx *parser_ctx); +__attribute__((visibility("protected"))) intyylex(union YYSTYPE *yyval, struct filter_parser_ctx *parser_ctx); +__attribute__((visibility("protected"))) intyylex_init_extra(struct filter_parser_ctx *parser_ctx, yyscan_t * ptr_yy_globals); +__attribute__((visibility("protected"))) intyylex_destroy(yyscan_t yyparser_ctx); +__attribute__((visibility("protected"))) voidyyrestart(FILE * in_str, yyscan_t parser_ctx);struct
gc_string{ @@ -55,6 +61,7 @@ static const char *node_type_to_str[] = { [NODE_UNARY_OP] = "NODE_UNARY_OP", };+__attribute__((visibility("protected"))) const char *node_type(struct
filter_node*node) { if (node->type<NR_NODE_TYPES) @@ -85,6 +92,7 @@ static structgc_string*gc_string_alloc(structfilter_parser_ctx*parser_ctx, * gsrc will be garbage collected immediately, and gstr might be. * Should only be used to append characters to a string literal or constant. */ +__attribute__((visibility("protected"))) structgc_string*gc_string_append(structfilter_parser_ctx*parser_ctx, structgc_string*gstr, structgc_string*gsrc) @@ -114,6 +122,7 @@ structgc_string*gc_string_append(structfilter_parser_ctx*parser_ctx, return gstr; }+__attribute__((visibility("protected"))) void
setstring(struct filter_parser_ctx *parser_ctx, YYSTYPE *lvalp, const char *src){lvalp->gs=gc_string_alloc(parser_ctx, strlen(src) + 1); @@ -175,11 +184,13 @@ static structfilter_node*make_op_node(structfilter_parser_ctx*scanner, return node; }
Quoted 5 lines
+__attribute__((visibility("protected"))) void
yyerror(struct filter_parser_ctx *parser_ctx, const char *str){fprintf(stderr, "error %s\n", str); }+__attribute__((visibility("protected"))) int yywrap(void) { return 1;
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.4.12 (GNU/Linux)
iQEcBAEBAgAGBQJQJXt6AAoJEELoaioR9I0263gIALoOPhf7ldD7rgtOk+gRcHTM HI/Rr7Fo2tsl8EzyRxpyy+2JZfAOoFAqG17VLAXQ9wozgS3KJ/wgvrRWIhEFvSPv RWlahrg6XHscbrVD5Vf02+L3M0MG6MbaXNYFl2dpHdxKufbmOk3WWW7uxgHAVTpI kWEyMvIeqphxiLqyEF9+LbW0pBQ2Sl/7AjFU6S7ZT5gAGo1EOp3F2LnBXQVBEI9s TJY/rnM/pq0TZAXMRuAY7eALzYYVq6oQ00MAaAgdxk/+ElA9KLd6TxlNOR+orpqD Txp5a1QYTPnavW+6htiq4iQCqDozTy5z1nMoJXuR9Q7UirKjxKfk7DD+baVz7lI= =gdS3
-----END PGP SIGNATURE-----