foonathan / lexy

C++ parsing DSL
https://lexy.foonathan.net
Boost Software License 1.0
991 stars 66 forks source link

SIGSEGV on Iterator lexy::_detail::min_range_end #184

Closed basdp closed 8 months ago

basdp commented 9 months ago

I get a SIGSEGV on some examples, including the 'peek_not' example from the Playground. It is also crashing in the current version in the playground: https://lexy.foonathan.net/playground/ (select the "peek_not" example)

struct production
{
    struct trailing_spaces
    {
        static constexpr auto name = "trailing spaces";
    };

    static constexpr auto rule
        = LEXY_LIT("Hello World")
          + dsl::peek_not(dsl::while_one(dsl::ascii::space)).error<trailing_spaces> + dsl::eof;
};

The error there is:

output.s: /app/example.cpp:1729: Iterator lexy::_detail::min_range_end(Iterator, Iterator, Iterator) [Iterator = const char8_t *]: Assertion `begin <= end_a && begin <= end_b' failed.
Program terminated with signal: SIGSEGV
foonathan commented 8 months ago

Sorry, forgot about it, but it is now fixed.