diff --git a/regtests/0341_hpack/test.opt b/regtests/0341_hpack/test.opt deleted file mode 100644 index 5cf5570fb..000000000 --- a/regtests/0341_hpack/test.opt +++ /dev/null @@ -1,2 +0,0 @@ -ppc-linux XFAIL Server crash; see eng/toolchain/aws#4. -ppc64-linux XFAIL Server crash; see eng/toolchain/aws#4. diff --git a/regtests/0344_http2_hello/test.opt b/regtests/0344_http2_hello/test.opt deleted file mode 100644 index 5cf5570fb..000000000 --- a/regtests/0344_http2_hello/test.opt +++ /dev/null @@ -1,2 +0,0 @@ -ppc-linux XFAIL Server crash; see eng/toolchain/aws#4. -ppc64-linux XFAIL Server crash; see eng/toolchain/aws#4. diff --git a/regtests/0346_http2_post_attachments/test.opt b/regtests/0346_http2_post_attachments/test.opt deleted file mode 100644 index 5cf5570fb..000000000 --- a/regtests/0346_http2_post_attachments/test.opt +++ /dev/null @@ -1,2 +0,0 @@ -ppc-linux XFAIL Server crash; see eng/toolchain/aws#4. -ppc64-linux XFAIL Server crash; see eng/toolchain/aws#4. diff --git a/regtests/0347_http2_post_connection/test.opt b/regtests/0347_http2_post_connection/test.opt deleted file mode 100644 index 5cf5570fb..000000000 --- a/regtests/0347_http2_post_connection/test.opt +++ /dev/null @@ -1,2 +0,0 @@ -ppc-linux XFAIL Server crash; see eng/toolchain/aws#4. -ppc64-linux XFAIL Server crash; see eng/toolchain/aws#4. diff --git a/regtests/0348_http2_client_status/test.opt b/regtests/0348_http2_client_status/test.opt deleted file mode 100644 index 5cf5570fb..000000000 --- a/regtests/0348_http2_client_status/test.opt +++ /dev/null @@ -1,2 +0,0 @@ -ppc-linux XFAIL Server crash; see eng/toolchain/aws#4. -ppc64-linux XFAIL Server crash; see eng/toolchain/aws#4. diff --git a/src/http2/aws-http2-hpack-huffman.adb b/src/http2/aws-http2-hpack-huffman.adb index 508bca2a8..e0565a867 100644 --- a/src/http2/aws-http2-hpack-huffman.adb +++ b/src/http2/aws-http2-hpack-huffman.adb @@ -380,7 +380,6 @@ package body AWS.HTTP2.HPACK.Huffman is EOS : constant Unsigned_32 := 16#fffffffa#; - type Byte_Bits is array (0 .. 7) of Bit with Pack; Iter : Node_Access := Root; Padding : Natural := 0; Pad_0 : Boolean := False; @@ -390,7 +389,6 @@ package body AWS.HTTP2.HPACK.Huffman is for K in Str'Range loop declare E : constant Stream_Element := Str (K); - Bits : Byte_Bits with Size => 8, Address => E'Address; C : Character; begin -- Keep last four bytes to check for EOS @@ -406,7 +404,8 @@ package body AWS.HTTP2.HPACK.Huffman is for B in reverse 0 .. 7 loop declare - Bit : constant Huffman.Bit := Bits (B); + Bit : constant Huffman.Bit := + Huffman.Bit (Shift_Right (Unsigned_8 (E), B) and 1); begin if Decode_Bit (Iter, Bit, C) then I := I + 1; diff --git a/src/http2/aws-http2-hpack.adb b/src/http2/aws-http2-hpack.adb index 023bc712d..053d90cdd 100644 --- a/src/http2/aws-http2-hpack.adb +++ b/src/http2/aws-http2-hpack.adb @@ -28,6 +28,7 @@ ------------------------------------------------------------------------------ with Interfaces; +with System; with AWS.HTTP2.Connection; with AWS.HTTP2.HPACK.Huffman; @@ -93,6 +94,11 @@ package body AWS.HTTP2.HPACK is B41 at 0 range 0 .. 3; end record; + -- Pick an explicit bit indexing order for this record, otherwise + -- the position & ranges in the component clauses will be + -- interpreted differently depending on endianness. + for RFC_Byte'Bit_Order use System.Low_Order_First; + B_II : constant Bit2 := 2#01#; -- Incremental Indexing