Skip to content
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

input file causes it to hang #473

Closed
ietf-svn-bot opened this issue Dec 17, 2019 · 4 comments
Closed

input file causes it to hang #473

ietf-svn-bot opened this issue Dec 17, 2019 · 4 comments
Labels

Comments

@ietf-svn-bot
Copy link

owner:henrik@levkowetz.com resolution_fixed type_defect | by arusso@amsl.com


This input file causes v2.37.1 to hang:
https://www.rfc-editor.org/v3test/draft-ietf-alto-xdom-disc-06_test.xml

(However, if we edit the file to remove all the instances of  , <, and >, then xml2rfc runs fine.)

Command: xml2rfc --text --verbose
Output:

[...resolves lots of entities...]
  Resolving entity... https://xml2rfc.ietf.org/public/rfc/bibxml3/reference.I-D.kiesel-alto-alto4alto.xml
  Loaded from cache /home/username/.cache/xml2rfc/reference.I-D.kiesel-alto-alto4alto.xml

[nothing happens; it hangs; hit ^C]

Traceback (most recent call last):
  File "/usr/bin/xml2rfc", line 11, in <module>
    load_entry_point('xml2rfc==2.37.1', 'console_scripts', 'xml2rfc')()
  File "/usr/lib/python2.7/site-packages/xml2rfc/run.py", line 587, in main
    xmlrfc.tree = prep.prep()
  File "/usr/lib/python2.7/site-packages/xml2rfc/writers/preptool.py", line 343, in prep
    func(e, e.getparent())
  File "/usr/lib/python2.7/site-packages/xml2rfc/writers/preptool.py", line 528, in check_ascii_text
    self.downcode_punctuation()
  File "/usr/lib/python2.7/site-packages/xml2rfc/writers/base.py", line 1856, in downcode_punctuation
    self.downcode(replacements=punctuation)
  File "/usr/lib/python2.7/site-packages/xml2rfc/writers/base.py", line 1873, in downcode
    e.text = downcode(e.text, replacements=replacements)
  File "/usr/lib/python2.7/site-packages/xml2rfc/util/unicode.py", line 189, in downcode
    match = re.search(u'([^ -\x7e\u2060\u200B\u00A0\u2011\u2028\uE060\r\n])', str)
  File "/usr/lib64/python2.7/re.py", line 146, in search
    return _compile(pattern, flags).search(string)
  File "/usr/lib64/python2.7/re.py", line 235, in _compile
    cachekey = (type(key[0]),) + key
KeyboardInterrupt

Issue migrated from trac:473 at 2022-02-08 07:04:47 +0000

@ietf-svn-bot
Copy link
Author

@henrik@levkowetz.com commented


Yes, this seems to be the same issue Megan ran into last week. Fixed in my sources, the fix will be part of next release, which I expect later today (2019-12-17).

@ietf-svn-bot
Copy link
Author

@henrik@levkowetz.com changed status from new to closed

@ietf-svn-bot
Copy link
Author

@henrik@levkowetz.com changed resolution from `` to fixed

@ietf-svn-bot
Copy link
Author

@henrik@levkowetz.com commented


Fixed in 5ecc4c0:

Refined the non-ascii punctuation (smart-quotes, etc.) downcoding, and eliminated a bug that could lead to infinite looping. Fixes issue #473.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

1 participant