From: Arnaud Charlet Date: Tue, 20 May 2008 12:43:59 +0000 (+0200) Subject: re PR ada/24533 (FAIL: a85013b: *** glibc detected *** free(): invalid pointer... X-Git-Url: https://git.libre-soc.org/?a=commitdiff_plain;h=0e5b1d0b4926ea5adeb1cb9dba0e8c5f2b232640;p=gcc.git re PR ada/24533 (FAIL: a85013b: *** glibc detected *** free(): invalid pointer: 0x00062a00 ***) 2008-05-20 Arnaud Charlet * s-linux-hppa.ads (atomic_lock_t): Put back proper alignment now that the underlying issue with malloc/free has been fixed. Remove associated comments. Minor reformatting. Related to PR ada/24533 From-SVN: r135614 --- diff --git a/gcc/ada/s-linux-hppa.ads b/gcc/ada/s-linux-hppa.ads index 3c746de3a92..72d1673d832 100644 --- a/gcc/ada/s-linux-hppa.ads +++ b/gcc/ada/s-linux-hppa.ads @@ -97,21 +97,18 @@ package System.Linux is -- struct_sigaction offsets - sa_flags_pos : constant := Standard'Address_Size / 8; - sa_mask_pos : constant := sa_flags_pos * 2; + sa_flags_pos : constant := Standard'Address_Size / 8; + sa_mask_pos : constant := sa_flags_pos * 2; - SA_SIGINFO : constant := 16#10#; - SA_ONSTACK : constant := 16#01#; + SA_SIGINFO : constant := 16#10#; + SA_ONSTACK : constant := 16#01#; type lock_array is array (1 .. 4) of Integer; type atomic_lock_t is record lock : lock_array; end record; pragma Convention (C, atomic_lock_t); - -- ??? Alignment should be 16 but this is larger than BIGGEST_ALIGNMENT. - -- This causes an erroneous pointer value to sometimes be passed to free - -- during deallocation. See PR ada/24533 for more details. - for atomic_lock_t'Alignment use 8; + for atomic_lock_t'Alignment use 16; type struct_pthread_fast_lock is record spinlock : atomic_lock_t;