Skip to content

yy_parse completely fails on riscv64 architecture #6

@gyx47

Description

@gyx47

Description:

When deploying libsieve to parse files under riscv64 architecture, it is found that no matter what the input is, a syntax error will be returned.

Running ./example script1.sv messagea.mbox
Validating script...Error is SCRIPT PARSE:   Line is 8
  Message is syntax error
 not valid.
Executing script...
Error is SCRIPT PARSE:   Line is 15
  Message is syntax error
  no actions taken; keeping message.
Action is KEEP
Test failed for script1.sv with messagea.mbox

environment

  • libsieve-2.3.1-6
  • Platform: RISC-V 64
  • log files:

My operating environment is an riscv64 environment virtual machine of the arch architecture of Windows WSL.

reproduce

The process is as follows:

  1. Prepare the necessary environment
  2. run ./configure --prefix=/usr
  3. run(cd src/sv_parser && for i in ls -1 *.l | sed 's|.l||'; do flex --header-file=$i.h -o $i.c $i.l; done)
  4. runmake
  5. run./src/sv_test/example ./src/sv_test/script1.sv ./src/sv_test/messagea.mbox

debug

After experimentation, it is known that there is no problem from extracting the script file to storing buf. However, after yyparse of the libsieve_sieveparse function, a syntax error is always output. This is probably due to the memory and byte offset problems caused by the architecture. As a result, the subsequent libsieve_callback_do and cur_call.values ​​have problems, and the script finally returns NULL.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions