Skip to content

Conversation

tautschnig
Copy link
Collaborator

We previously did not perform sanity checks that expressions translate
to valid XML 1.0 (which requires that all characters are printable). In
most contexts we only handle printable strings, but expressions
appearing in goto traces may include non-printable characters. In such
cases, just output the underlying array of bytes.

  • Each commit message has a non-empty body, explaining why the change was made.
  • Methods or procedures I have added are documented, following the guidelines provided in CODING_STANDARD.md.
  • n/a The feature or user visible behaviour I have added or modified has been documented in the User Guide in doc/cprover-manual/
  • Regression or unit tests are included, or existing tests cover the modified code (in this case I have detailed which ones those are in the commit message).
  • n/a My commit message includes data points confirming performance improvements (if claimed).
  • My PR is restricted to a single feature or bugfix.
  • n/a White-space or formatting changes outside the feature-related changed lines are in commits of their own.

@codecov
Copy link

codecov bot commented Jan 20, 2021

Codecov Report

Merging #5774 (15db9d0) into develop (d613b01) will increase coverage by 0.00%.
The diff coverage is 82.14%.

Impacted file tree graph

@@           Coverage Diff            @@
##           develop    #5774   +/-   ##
========================================
  Coverage    69.67%   69.68%           
========================================
  Files         1248     1248           
  Lines       100836   100855   +19     
========================================
+ Hits         70262    70278   +16     
- Misses       30574    30577    +3     
Flag Coverage Δ
cproversmt2 43.43% <71.42%> (+0.01%) ⬆️
regression 66.66% <82.14%> (+<0.01%) ⬆️
unit 32.20% <0.00%> (-0.01%) ⬇️

Flags with carried forward coverage won't be shown. Click here to find out more.

Impacted Files Coverage Δ
src/util/xml.h 100.00% <ø> (ø)
src/goto-programs/graphml_witness.cpp 55.55% <25.00%> (-0.67%) ⬇️
src/util/xml.cpp 75.89% <77.77%> (+0.19%) ⬆️
src/goto-programs/xml_goto_trace.cpp 100.00% <100.00%> (ø)
src/ansi-c/c_misc.cpp 43.47% <0.00%> (+2.17%) ⬆️

Continue to review full report at Codecov.

Legend - Click here to learn more
Δ = absolute <relative> (impact), ø = not affected, ? = missing data
Powered by Codecov. Last update d613b01...15db9d0. Read the comment docs.

@tautschnig tautschnig force-pushed the xml-escaping branch 3 times, most recently from 2a74098 to 0a6370f Compare January 20, 2021 20:12
We previously did not perform sanity checks that expressions translate
to valid XML 1.0 (which requires that all characters are printable). In
most contexts we only handle printable strings, but expressions
appearing in goto traces may include non-printable characters. In such
cases, just output the underlying array of bytes.

This problem was surfaced by SV-COMP benchmarks such as
pthread-driver-races/char_generic_nvram_nvram_llseek_nvram_unlocked_ioctl.i
(and some of the LDV examples), which use non-printable characters in
printk invocations.
@tautschnig tautschnig merged commit 5b1f614 into diffblue:develop Jan 21, 2021
@tautschnig tautschnig deleted the xml-escaping branch January 21, 2021 12:57
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants