Re: jc/lookup-object-hash from pu crashes on ARM

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



Jonathan Nieder <jrnieder@xxxxxxxxx> writes:

> Even better could be to start aligning the hashes we pass around,
> using something like this:
>
> 	union object_hash {
> 		unsigned char sha1[20];
> 		uint32_t chunk[5];
> 	};
>
> which could speed up functions like hashcpy(), hashcmp(), and
> hasheq().  But it's probably not worth the fuss.

The "flag" field in struct ref_list should be moved down to assure
alignment.

        struct ref_list {
                struct ref_list *next;
                unsigned char flag; /* ISSYMREF? ISPACKED? */
                unsigned char sha1[20];
                unsigned char peeled[20];
                char name[FLEX_ARRAY];
        };

I am very tempted to take that "union" approach (modulo that I would call
that an "object_name") in the longer run, though.

--
To unsubscribe from this list: send the line "unsubscribe git" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at  http://vger.kernel.org/majordomo-info.html


[Index of Archives]     [Linux Kernel Development]     [Gcc Help]     [IETF Annouce]     [DCCP]     [Netdev]     [Networking]     [Security]     [V4L]     [Bugtraq]     [Yosemite]     [MIPS Linux]     [ARM Linux]     [Linux Security]     [Linux RAID]     [Linux SCSI]     [Fedora Users]