uw-pluverse / perses

language-agnostic program reducer.
GNU General Public License v3.0
171 stars 24 forks source link

msg: token recognition error at: '#u' #23

Open sendaoYan opened 1 year ago

sendaoYan commented 1 year ago

test command:

./dragonwell-11.0.19.15+7-GA/bin/java -jar perses_deploy.jar --threads 1 --test-script $PWD/reduce.sh --input-file test.c -o result

result:

[11:12:40] [INFO   ] Tree Building: Start building spar-tree from input file SourceFile{file=FileWithContent{file=/root/test.c}, lang=LanguageC{name=c, extensions=[c], defaultCodeFormatControl=SINGLE 
[11:12:40] [INFO   ] Tree Building: Step 1: Antlr parsing. 
Exception in thread "main" org.perses.grammar.AntlrFailureException: Error in parsing file: <in memory>
Details: recognizer: org.perses.grammar.c.PnfCLexer@23e3f5cd
offendingSymbol: null
line: 430
column: 0
msg: token recognition error at: '#u'

Caused by: LexerNoViableAltException('#')
        at org.antlr.v4.runtime.atn.LexerATNSimulator.failOrAccept(LexerATNSimulator.java:309)
        at org.antlr.v4.runtime.atn.LexerATNSimulator.execATN(LexerATNSimulator.java:230)
        at org.antlr.v4.runtime.atn.LexerATNSimulator.match(LexerATNSimulator.java:114)
        at org.antlr.v4.runtime.Lexer.nextToken(Lexer.java:141)
        at org.antlr.v4.runtime.BufferedTokenStream.fetch(BufferedTokenStream.java:169)
        at org.antlr.v4.runtime.BufferedTokenStream.sync(BufferedTokenStream.java:152)
        at org.antlr.v4.runtime.BufferedTokenStream.consume(BufferedTokenStream.java:136)
        at org.antlr.v4.runtime.Parser.consume(Parser.java:571)
        at org.antlr.v4.runtime.Parser.match(Parser.java:205)
        at org.perses.grammar.c.PnfCParser.compoundStatement(PnfCParser.java:2378)
        at org.perses.grammar.c.PnfCParser.functionDefinition(PnfCParser.java:2535)
        at org.perses.grammar.c.PnfCParser.aux_rule__translationUnit_2(PnfCParser.java:9468)
        at org.perses.grammar.c.PnfCParser.kleene_plus__translationUnit_3(PnfCParser.java:7316)
        at org.perses.grammar.c.PnfCParser.translationUnit(PnfCParser.java:7066)
        at org.perses.grammar.c.PnfCParserFacade.startParsing(PnfCParserFacade.java:48)
        at org.perses.grammar.c.PnfCParserFacade.startParsing(PnfCParserFacade.java:25)
        at org.perses.grammar.AbstractDefaultParserFacade$parseReader$3.apply(AbstractDefaultParserFacade.kt:70)
        at org.perses.grammar.AbstractDefaultParserFacade$parseReader$3.apply(AbstractDefaultParserFacade.kt:65)
        at org.perses.grammar.AbstractDefaultParserFacade$Companion.parseReader(AbstractDefaultParserFacade.kt:151)
        at org.perses.grammar.AbstractDefaultParserFacade.parseReader(AbstractDefaultParserFacade.kt:65)
        at org.perses.grammar.AbstractParserFacade.parseString(AbstractParserFacade.kt:86)
        at org.perses.grammar.AbstractParserFacade.parseString$default(AbstractParserFacade.kt:84)
        at org.perses.reduction.AbstractProgramReductionDriver$Companion.createSparTree(AbstractProgramReductionDriver.kt:607)
        at org.perses.reduction.RegularProgramReductionDriver$Companion.create(RegularProgramReductionDriver.kt:116)
        at org.perses.Main.createReductionDriver(Main.kt:81)
        at org.perses.AbstractMain.internalRun(AbstractMain.kt:33)
        at org.perses.util.cmd.AbstractMain.run(AbstractMain.kt:53)
        at org.perses.Main$Companion.main(Main.kt:87)
        at org.perses.Main.main(Main.kt)

reduce.sh.txt

test.c.txt generate from syzkaller

sendaoYan commented 1 year ago

error message after preprocess:

Exception in thread "main" org.perses.grammar.AntlrFailureException: Error in parsing file: <in memory>
Details: recognizer: org.perses.grammar.c.PnfCParser@3f67f2ff
offendingSymbol: [@45990,266837:266837='(',<66>,12626:27]
line: 12626
column: 27
msg: no viable alternative at input '((((__extension__(('

Caused by: org.antlr.v4.runtime.NoViableAltException
        at org.antlr.v4.runtime.atn.ParserATNSimulator.noViableAlt(ParserATNSimulator.java:2014)
        at org.antlr.v4.runtime.atn.ParserATNSimulator.execATN(ParserATNSimulator.java:445)
        at org.antlr.v4.runtime.atn.ParserATNSimulator.adaptivePredict(ParserATNSimulator.java:371)
        at org.perses.grammar.c.PnfCParser.assignmentExpression(PnfCParser.java:673)