Closed asmwarrior closed 1 year ago
I think I have found this crash issue, it is here:
diff --git a/limn.h b/limn.h
index 5722ef5..9fa896e 100644
--- a/limn.h
+++ b/limn.h
@@ -369,7 +369,7 @@ namespace lm {
};
template <typename Base>
- struct match_call_ final : public impl::parser_base<match_<Base>> {
+ struct match_call_ final : public impl::parser_base<match_call_<Base>> {
constexpr explicit match_call_(Base base, std::function<void(const std::string_view&)> callback) noexcept
: base(std::move(base))
, callback(std::move(callback))
I'm not sure why it used such recursive class inheritance here, since for match_call_
, we need:
struct match_call_ final : public impl::parser_base<match_call_<Base>> {
Not the old match_
.
I have added a PR to fix this crash issue.
I think it is a copy/paste error originally from your comment in issue #1 , never mind, we have fixed it.
Thanks.
merged + fixed - thank you!
In the recent commit: 0a3865f in 2023-01-13. When testing, I noticed that the code here:
I see a lot of the code using the member function of
impl::match_
, if we only initialized theimpl:: match_call_
instance, you will get crash, for example, one crash here:In the line
Because the
out
is not initialized.