Opened 13 days ago

Last modified 12 days ago

#5 new defect

Invalid YAML report for programs with options or stdin

Reported by: Vladimír Štill Owned by: mornfall
Priority: major Milestone:
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 13 days ago.
Original report
gzip_hello_edited.report (12.1 KB) - added by Vladimír Štill 13 days ago.
Valid report with stdin stripped

Download all attachments as: .zip

Change History (3)

Changed 13 days ago by Vladimír Štill

Attachment: gzip_hello.report added

Original report

Changed 13 days ago by Vladimír Štill

Attachment: gzip_hello_edited.report added

Valid report with stdin stripped

comment:1 Changed 12 days ago by mornfall

Component: simUI
Summary: Invalid YAML report for programs with options and stdinInvalid YAML report for programs with options or stdin
Note: See TracTickets for help on using tickets.