lpereira / lwan

Experimental, scalable, high performance HTTP server
https://lwan.ws
GNU General Public License v2.0
5.92k stars 549 forks source link

Getting Segmentation Fault running nlohmann/json inside a handler. #191

Closed GuacheSuede closed 6 years ago

GuacheSuede commented 7 years ago

This is the code

static enum lwan_http_status uHandler(struct lwan_request *request, struct lwan_response *response, void *data){
   static struct lwan_key_value rheaders[] = {
    { .key = "Access-Control-Allow-Origin", .value = "*" },
   };    
 json j;`

 j["pi"] = 3.141;`

 std::cout <<  j.dump()    << std::endl;
return HTTP_OK;

}

Thank You

GuacheSuede commented 7 years ago

The same thing happens for rapidjson and staticjson libs

lpereira commented 7 years ago

@GuacheSuede It took me a while to fix an esoteric crashing issue, but it seems I got it now. Could you please recheck?

lpereira commented 6 years ago

Closing as fixed.

hariseenivasan commented 4 years ago

Is this issue really fixed?

191 and #203 have been closed with a cyclic dependency and no confirmation of any fixes.

lpereira commented 4 years ago

The issue where Lwan would crash when using floating pointing numbers with SSE instructions have been fixed, yes.