Skip to content

Segfault while processing a mustache template #899

@GEOEGII555

Description

@GEOEGII555
Program received signal SIGSEGV, Segmentation fault.
0x000000555557f460 in crow::mustache::template_t::parse (this=0x7ffffef938)
    at /usr/local/include/crow/mustache.h:521
521                                     auto& matched = actions_[blockPositions.back()];
(gdb) bt
#0  0x000000555557f460 in crow::mustache::template_t::parse (this=0x7ffffef938)
    at /usr/local/include/crow/mustache.h:521
#1  0x000000555557d268 in crow::mustache::template_t::template_t (
    this=0x7ffffef938, body="")
    at /usr/local/include/crow/mustache.h:140
#2  0x0000005555580978 in crow::mustache::compile (
    body="<!DOCTYPE html>\n<html lang=\"en\">\n<head>\n    <meta charset=\"UTF-8\">\n    <meta name=\"viewport\" content=\"width=device-width, initial-scale=1.0\">\n    <link rel=\"stylesheet\" href=\"/static/style.css\">\n    <"...)
    at /usr/local/include/crow/mustache.h:693
#3  0x00000055555810a0 in crow::mustache::load (filename="base.html")
    at /usr/local/include/crow/mustache.h:816
#4  0x00000055555627b8 in main ()
    at main.cpp:86

The code that loads the template:

auto basePage = crow::mustache::load("base.html");

Metadata

Metadata

Assignees

No one assigned

    Labels

    bugSomething isn't workingdiscussionThe viability / implementation of the issue is up for debate

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions