From 2c6a8c536cf36767ad11468eea9f44e38f6b52d2 Mon Sep 17 00:00:00 2001 From: GGRei Date: Fri, 26 Jan 2024 10:33:09 +0100 Subject: [PATCH] net.http: add a temporary fix for the intermittent segfault with http.get_ text/1 and `-prod -cc gcc` 13.2.0 (fix #20506) (#20660) --- vlib/net/http/http.v | 2 ++ 1 file changed, 2 insertions(+) diff --git a/vlib/net/http/http.v b/vlib/net/http/http.v index 566c142e19..e3f22de9c5 100644 --- a/vlib/net/http/http.v +++ b/vlib/net/http/http.v @@ -143,7 +143,9 @@ pub fn delete(url string) !Response { return fetch(method: .delete, url: url) } +// TODO - @[noinline] attribut is used for temporary fix the 'get_text()' intermittent segfault / nil value when compiling with GCC 13.2.x and -prod option ( Issue #20506 ) // fetch sends an HTTP request to the `url` with the given method and configuration. +@[noinline] pub fn fetch(config FetchConfig) !Response { if config.url == '' { return error('http.fetch: empty url')