GithubHelp home page GithubHelp logo

Comments (2)

Delta-in-hub avatar Delta-in-hub commented on July 17, 2024

The problem seems to be with the statement #include <linux/watch_queue.h>

from bpftrace.

ajor avatar ajor commented on July 17, 2024

Minimised repro:

#include <linux/watch_queue.h>

BEGIN
{
  IOC_WATCH_QUEUE_SET_FILTER;
}

I assume it's a problem with our dodgy macro parsing code:

bpftrace/src/lexer.l

Lines 251 to 287 in ce8f81a

{ident} {
static int unput_count = 0;
if (driver.bpftrace_.macros_.count(yytext) != 0)
{
const char *s = driver.bpftrace_.macros_[yytext].c_str();
int z;
// NOTE(mmarchini) workaround for simple recursive
// macros. More complex recursive macros (for
// example, with operators) will go into an
// infinite loop. Yes, we should fix that in the
// future.
if (strcmp(s, yytext) == 0)
{
unput_count = 0;
return Parser::make_IDENT(yytext, loc);
}
else
{
int leng = YY_BUF_SIZE;
std::string original_s(s);
std::string original_yytext(yytext);
for (z=strlen(s) - 1; z >= 0; z--){
if (unput_count >= 1000 || leng <= 0) {
driver.error(loc, std::string("Macro recursion limit reached: ")
+ original_yytext + ", " + original_s);
yyterminate();
}
unput(s[z]);
unput_count++;
leng--;
}
}
} else {
unput_count = 0;
return Parser::make_IDENT(yytext, loc);
}
}

from bpftrace.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.