Opened 6 years ago

Closed 5 years ago

Last modified 5 years ago

#5 closed defect (fixed)

Invalid YAML report for programs with options or stdin

Reported by: Vladimír Štill Owned by: mornfall
Priority: major Milestone: 5.0
Component: UI Keywords: stdin report
Cc: divine@…, kdudka@…

Description

divine check outputs invalid report if there is a binary file given using --stdin, or if options of the program can be interpreted as YAML (e.g. when they start with -, which they often do). The report cannot be loaded with divine sim --load-report

  • for the stdin, it would be probably a good idea to encode it to base64 and use the !!binary YAML prefix if the parser can deal with it
  • for options we need to escape or quote them

Reproducing

Follow the https://divine.fi.muni.cz/2018/dios/#building-gzip, with the newest DIVINE (tested with https://divine.fi.muni.cz/download/static-amd64-linux/divcc-4.1.6+2018.05.31 and https://divine.fi.muni.cz/download/static-amd64-linux/divine-4.1.6+2018.05.31). Then run the following:

$ divine-4.1.6+2018.05.31 check --report-filename gzip_hello.report --stdin hello.gz ./gzip -f -d -
# ...
$ divine-4.1.6+2018.05.31 sim --load-report gzip_hello.report
YAML:292:14: error: Got empty plain scalar
  vfs.stdin: !S[�H���W(�/�I�-�
E: YAML error: expected scalar
found key trace:
remaining keys:
Aborted

Workaround

As a workaround, the stdin part of the report can be dropped and replaced by --stdin option on sim's commandline (divine sim --stdin FILE --load-report REPORT). The arguments should be quoted manually in the report file.

Attachments (2)

gzip_hello.report (12.2 KB) - added by Vladimír Štill 6 years ago.
Original report
gzip_hello_edited.report (12.1 KB) - added by Vladimír Štill 6 years ago.
Valid report with stdin stripped

Download all attachments as: .zip

Change History (5)

Changed 6 years ago by Vladimír Štill

Attachment: gzip_hello.report added

Original report

Changed 6 years ago by Vladimír Štill

Attachment: gzip_hello_edited.report added

Valid report with stdin stripped

comment:1 Changed 6 years ago by mornfall

Component: simUI
Summary: Invalid YAML report for programs with options and stdinInvalid YAML report for programs with options or stdin

comment:2 Changed 5 years ago by mornfall

Resolution: fixed
Status: newclosed

Should be fixed in next.

comment:3 Changed 5 years ago by mornfall

Milestone: future5.0

Milestone renamed

Note: See TracTickets for help on using tickets.