Movatterモバイル変換


[0]ホーム

URL:


Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

re: undocumented exception is raised #109747

Closed
Assignees
serhiy-storchaka
Labels
3.11only security fixes3.12only security fixes3.13bugs and security fixesdocsDocumentation in the Doc dirtopic-regextype-bugAn unexpected behavior, bug, or error
@fuzzah

Description

@fuzzah

Bug report

Bug description:

There module's documentation says it only raises there.error exception, but the regex"\x00(?<!\x00{2147483648})" causes RuntimeError:

Python3.11.5 (main,Sep202023,10:46:56) [GCC12.2.0]onlinuxType"help","copyright","credits"or"license"formoreinformation.>>>importre>>>re.compile("\x00(?<!\x00{2147483647})")re.compile('\x00(?<!\x00{2147483647})')>>>>>>>>>re.compile("\x00(?<!\x00{2147483648})")Traceback (mostrecentcalllast):File"<stdin>",line1,in<module>File"/usr/local/lib/python3.11/re/__init__.py",line227,incompilereturn_compile(pattern,flags)^^^^^^^^^^^^^^^^^^^^^^^^File"/usr/local/lib/python3.11/re/__init__.py",line294,in_compilep=_compiler.compile(pattern,flags)^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^File"/usr/local/lib/python3.11/re/_compiler.py",line759,incompilereturn_sre.compile(^^^^^^^^^^^^^RuntimeError:invalidSREcode

Otherre methods, such asmatch orsplit show the same result.

For brevity:
"\x00(?<!\x00{2147483648})" -> RuntimeError
"\x00(?<!\x00{2147483647})" -> no errors

I have found this with libFuzzer by testing thefuzz_sre_compile binary.

CPython versions tested on:

3.11

Operating systems tested on:

Linux

Linked PRs

Metadata

Metadata

Labels

3.11only security fixes3.12only security fixes3.13bugs and security fixesdocsDocumentation in the Doc dirtopic-regextype-bugAn unexpected behavior, bug, or error

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions


    [8]ページ先頭

    ©2009-2025 Movatter.jp