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

Regex: VERIFICATION FAILED: false at LibRegex/RegexOptimizer.cpp:306 #2975

Open
rmg-x opened this issue Dec 19, 2024 · 1 comment
Open

Regex: VERIFICATION FAILED: false at LibRegex/RegexOptimizer.cpp:306 #2975

rmg-x opened this issue Dec 19, 2024 · 1 comment

Comments

@rmg-x
Copy link
Contributor

rmg-x commented Dec 19, 2024

This was found while trying to load https://discord.com/login

Pattern:

\*{2}([^\n]+?)\*{2}

Reduced example:

<script>
  const pattern = /\*{2}([^\n]+?)\*{2}/;
</script>

Full log:

VERIFICATION FAILED: false at /Libraries/LibRegex/RegexOptimizer.cpp:306
/Build/release/lib/liblagom-ak.so.0(ak_trap+0x35) [0x7f44aabde195]
/Build/release/lib/liblagom-ak.so.0(+0x154af) [0x7f44aabde4af]
/Build/release/lib/liblagom-regex.so.0(+0x3d897) [0x7f44a88ac897]
/Build/release/lib/liblagom-regex.so.0 regex::Regex<regex::ECMA262Parser>::attempt_rewrite_loops_as_atomic_groups(AK::Vector<regex::Detail::Block, 0ul> const&) 0x30d) [0x7f44a88b23bd]
/Build/release/lib/liblagom-regex.so.0 regex::Regex<regex::ECMA262Parser>::run_optimization_passes() 0x62) [0x7f44a88b0e52]
/Build/release/lib/liblagom-regex.so.0 regex::Regex<regex::ECMA262Parser>::Regex(regex::Parser::Result, AK::ByteString, regex::RegexOptions<regex::ECMAScriptFlags>) 0xe8) [0x7f44a889a1c8]
/Build/release/lib/liblagom-js.so.0(+0x190915) [0x7f44ab115915]
/Build/release/lib/liblagom-js.so.0 JS::Bytecode::Interpreter::run_bytecode(unsigned long) 0xb44e) [0x7f44ab0f762e]
/Build/release/lib/liblagom-js.so.0 JS::Bytecode::Interpreter::run_executable(JS::Bytecode::Executable&, AK::Optional<unsigned long>, JS::Value) 0x1ec) [0x7f44ab0ebeec]
/Build/release/lib/liblagom-js.so.0 JS::Bytecode::Interpreter::run(JS::Script&, GC::Ptr<JS::Environment>) 0x286) [0x7f44ab0eba26]
/Build/release/lib/liblagom-web.so.0 Web::HTML::ClassicScript::run(Web::HTML::ClassicScript::RethrowErrors, GC::Ptr<JS::Environment>) 0xa5) [0x7f44ac007a95]
/Build/release/lib/liblagom-web.so.0 Web::HTML::HTMLScriptElement::execute_script() 0x246) [0x7f44abf86dd6]
/Build/release/lib/liblagom-web.so.0 Web::HTML::HTMLScriptElement::prepare_script() 0x118c) [0x7f44abf880ac]
/Build/release/lib/liblagom-web.so.0 Web::HTML::HTMLParser::handle_text(Web::HTML::HTMLToken&) 0x241) [0x7f44abfde481]
/Build/release/lib/liblagom-web.so.0 Web::HTML::HTMLParser::run(Web::HTML::HTMLTokenizer::StopAtInsertionPoint) 0xde) [0x7f44abfd7eee]
/Build/release/lib/liblagom-web.so.0 Web::HTML::HTMLParser::run(URL::URL const&, Web::HTML::HTMLTokenizer::StopAtInsertionPoint) 0x100) [0x7f44abfd90a0]
/Build/release/lib/liblagom-web.so.0(+0x89ed93) [0x7f44abdeed93]
/Build/release/lib/liblagom-web.so.0(+0x6469ff) [0x7f44abb969ff]
/Build/release/lib/liblagom-core.so.0(+0x2988f) [0x7f44aadd688f]
/Build/release/lib/liblagom-core.so.0 Core::ThreadEventQueue::process() 0x16b) [0x7f44aade16ab]
/Build/release/lib/liblagom-webview.so.0 WebView::EventLoopManagerQt::event_target_received_event(AK::Badge<WebView::EventLoopImplementationQtEventTarget>, QEvent*) 0x2f) [0x7f44ad24ea4f]
/Build/release/lib/liblagom-webview.so.0 WebView::EventLoopImplementationQtEventTarget::event(QEvent*) 0x1c) [0x7f44ad25111c]
/lib/x86_64-linux-gnu/libQt6Core.so.6 QCoreApplication::notifyInternal2(QObject*, QEvent*) 0xfd) [0x7f44ad400a2d]
/lib/x86_64-linux-gnu/libQt6Core.so.6 QCoreApplicationPrivate::sendPostedEvents(QObject*, int, QThreadData*) 0x19a) [0x7f44ad40436a]
/lib/x86_64-linux-gnu/libQt6Core.so.6(+0x37c637) [0x7f44ad629637]
/lib/x86_64-linux-gnu/libglib-2.0.so.0(g_main_context_dispatch+0x26b) [0x7f44aa492d3b]
/lib/x86_64-linux-gnu/libglib-2.0.so.0(+0xab2b8) [0x7f44aa4e82b8]
/lib/x86_64-linux-gnu/libglib-2.0.so.0(g_main_context_iteration+0x33) [0x7f44aa4903e3]
/lib/x86_64-linux-gnu/libQt6Core.so.6 QEventDispatcherGlib::processEvents(QFlags<QEventLoop::ProcessEventsFlag>) 0x6e) [0x7f44ad628eae]
/lib/x86_64-linux-gnu/libQt6Core.so.6 QEventLoop::exec(QFlags<QEventLoop::ProcessEventsFlag>) 0x17b) [0x7f44ad40dadb]
/Build/release/lib/liblagom-core.so.0 Core::EventLoop::exec() 0x37) [0x7f44aadd3c87]
/Build/release/libexec/WebContent(+0x454e1) [0x5622f76de4e1]
/Build/release/libexec/WebContent(+0x108a1f) [0x5622f77a1a1f]
/lib/x86_64-linux-gnu/libc.so.6(+0x29d90) [0x7f44aa696d90]
/lib/x86_64-linux-gnu/libc.so.6(__libc_start_main+0x80) [0x7f44aa696e40]
/Build/release/libexec/WebContent(+0x43775) [0x5622f76dc775]
@alimpfard
Copy link
Contributor

alimpfard commented Dec 19, 2024

// These do not occur in valid bytecode.

That's not good...

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

No branches or pull requests

2 participants