Skip to content

Commit

Permalink
net.http: add a temporary fix for the intermittent segfault with http…
Browse files Browse the repository at this point in the history
….get_ text/1 and `-prod -cc gcc` 13.2.0 (fix #20506) (#20660)
  • Loading branch information
GGRei committed Jan 26, 2024
1 parent 8714233 commit 2c6a8c5
Showing 1 changed file with 2 additions and 0 deletions.
2 changes: 2 additions & 0 deletions vlib/net/http/http.v
Expand Up @@ -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')
Expand Down

0 comments on commit 2c6a8c5

Please sign in to comment.