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

Incomplete Type in request parms #3318

Closed
joaquinbejar opened this issue Feb 4, 2022 · 0 comments
Closed

Incomplete Type in request parms #3318

joaquinbejar opened this issue Feb 4, 2022 · 0 comments

Comments

@joaquinbejar
Copy link

joaquinbejar commented Feb 4, 2022

A performance test with several threads raises a segmentation fault due to an Incomplete Type in request param.

    mux.handle("/ip/egnr/{ip}").get([&](served::response &res, const served::request &req) {
        json j;
        std::string sip = req.params["ip"]; // Incomplete type
        auto to_print = [&sip]() { std::cout << Color::sWhite + "/ip/egnr/" + sip << "->"; };
        to_print();
        j["name"] = getName(l_cache_name.get(), redisname.get(), sip)["name"];
        to_print();
        j["repu"] = getRepu(l_cache_repu.get(), redisrepu.get(), sip, mariadb.get())["repu"];
        to_print();
        j["geoip"] = getGeoip(l_cache_geoip.get(), redisgeoip.get(), sip, maxmind.get())["geoip"];
        to_print();
        j["euipo"] = getEUIPO(l_cache_euipo.get(), rediseuipo.get(), sip, excel.get())["euipo"];
        res << j.dump();
        res.set_header("Content-type", "application/json");
    });

Screenshot 2022-02-04 at 13 03 42

Traceback (most recent call last):
File "/tmp/12767894-b562-41c3-a6f3-64723a1f2770/.clion.resources/pretty_printers/gdb/libstdcxx/v6/printers.py", line 893, in to_string
ptr = self.val ['_M_dataplus']['_M_p']
gdb.error: There is no member named _M_dataplus.

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

No branches or pull requests

1 participant