summaryrefslogtreecommitdiff
path: root/methods
diff options
context:
space:
mode:
authorJulian Andres Klode <julian.klode@canonical.com>2025-01-17 20:27:34 +0100
committerJulian Andres Klode <julian.klode@canonical.com>2025-01-17 20:32:40 +0100
commit98ddccc166d6f212ea466598485f1ea94f1c92f9 (patch)
tree9d00970f81025333c21eccd3e2f520c4637a5fda /methods
parent9bd81ac3c85d8c9fee01d0ecfc681841aa89e6eb (diff)
Workaround gcc 14.2.0-9 regression in no-tree-slp-vectorize on Graviton
gcc 14.2.0-9 causes vector instructions to be emitted in the constructor when it is being inlined into BaseHttpMethod::Loop(), which seemingly only on Graviton instances, causes the field to be initialized to 0 (Chunked) instead of 2 (Closes), causing the code to fail later when it tries to interpret file data as the chunk size. It's plausible we are missing some register saving here - that is, the q31 register overrides an x register. Work around this by making Closes element 0, such that 0 initialisation results in the correct Closes value. Reported-By: Myon on IRC
Diffstat (limited to 'methods')
-rw-r--r--methods/basehttp.h2
1 files changed, 1 insertions, 1 deletions
diff --git a/methods/basehttp.h b/methods/basehttp.h
index 1d3ed1ace..31a7a6b26 100644
--- a/methods/basehttp.h
+++ b/methods/basehttp.h
@@ -54,7 +54,7 @@ struct RequestState
time_t Date;
HaveContent haveContent = HaveContent::TRI_UNKNOWN;
- enum {Chunked,Stream,Closes} Encoding = Closes;
+ enum {Closes,Chunked,Stream} Encoding = Closes;
enum {Header, Data} State = Header;
std::string Location;
time_t RetryAfter = 0;