-
Notifications
You must be signed in to change notification settings - Fork 274
xml rendering issue when encountering string "\x01" #7073
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Comments
This issue might be related #7038 |
Agree. This is likely the same issue as #7038 |
This issue is related to #7038 as it is the same invariant. However the issue isn't exactly the same. The other issue relates to character codes greater than or equal to 128, which are printable and non-control code characters. This issue relates to control code characters, which would be those in the range 0-31 inclusive. The codes for \n and \r are currently omitted from the output. This avoids avoids violating the INVARIANT for them, but even this isn't ideal as there is information which is then missing from the XML. Therefore we need to decide on a solution for printing characters in the 0-31 range. Technically these control codes are permitted in XML as I understand it. However I'd suggest that we use decimal character references in order to make the work of XML readers both human and algorithmic easier. This would encode character code 1 as |
I would strongly endorse finding some way to continue printing XML (probably best to add in these #nnn; codings) rather than exiting ungracefully as we do now. The current experience is unpleasant for users and gives them few clues of how to move one. I would really like to see the solution you propose implemented. |
@thomasspriggs if you can do this do you want to self-assign? |
I can work out how to make the changes needed to raise PR a for this kind of change. However I'd like to discuss the prioritisation for this piece of work with the rest of my team before I commit to it. |
@jimgrundy I should have time to work on this next week. |
Where are we on this @thomasspriggs ? |
We can't print character code '\x01' whether it is the raw character, or encoded using XML standard escaping as this is not allowed by XML standard 1.0. We could use XML escaping for character code '\x01' (but not '\x00') if we moved to XML standard version 1.1. However XML standard 1.1 has not been widely adopted despite having been released over a decade ago. My PR to move to the newer standard was rejected and closed due to the lack of adoption of the newer standard. This brings us back to the idea of using C style escaping as it is presented in the input source code. I think that idea has legs. Unfortunately there are a combination of implementation/architectural related problems which make implementing the fix unexpectedly time-consuming -
None of the above issues are insurmountable they just lead to a surprisingly large amount of effort to be required. We shifted team priorities elsewhere due to the time involved. @NlightNFotis I believe you looked at this after I first started investigating. Do you have anything further to add? |
@thomasspriggs I think what you've mentioned so far covers everything - I don't have anything more to add. |
Uh oh!
There was an error while loading. Please reload this page.
CBMC version: 5.53.1
Operating system: linux
Exact command line resulting in the issue: cbmc issue.c --trace --xml-ui
What behaviour did you expect: Successfully generated xml file
What happened instead: Program aborted with an error
Problem program issue.c:
Last several lines of output when running
cbmc issue.c --trace --xml-ui
:The text was updated successfully, but these errors were encountered: