git/list[1] front-page[2] threads[3] people[4] search[5] about
 

Re: Pack files, standards compliance, and efficiency

From
brian m. carlson <sandals@crustytoothpaste.net>
Date
Jun 5, 2015, 19:42 UTC
Message-ID
<20150605194200.GB356121@vauxhall.crustytoothpaste.net>
In-Reply-To
<5571BEA0.2080305@alum.mit.edu>
On Fri, Jun 05, 2015 at 05:22:08PM +0200, Michael Haggerty wrote:
Show 13 quoted lines
> I don't know that there would necessarily be problems, but I would worry
> about code involving structure assignment. For example, suppose the
> following snippet:
> 
>     void f(struct object_id *oid)
>     {
>         struct object_id oid_copy = *oid;
>         /* ... */
>     }
> 
> The compiler is allowed to implement the copy using instructions that
> rely on proper alignment. Such code would fail if oid is not properly
> aligned.

We use oidcpy which doesn't use object assignment. I brought that up previously, and Junio was opposed to doing *dest = *src. So I don't think this ends up being an issue.

-- 
brian m. carlson / brian with sandals: Houston, Texas, US
+1 832 623 2791 | http://www.crustytoothpaste.net/~bmc | My opinion only
OpenPGP: RSA v4 4096b: 88AC E9B2 9196 305B A994 7552 F1BA 225C 0223 B187
Previous: Michael HaggertyNext: Michael Haggerty
Message 9 of 10 in “Pack files, standards compliance, and efficiency”
  1. brian m. carlsonJun 5, 2015
  2. Jeff KingJun 5, 2015
  3. Duy NguyenJun 5, 2015
  4. Jeff KingJun 5, 2015
  5. Duy NguyenJun 5, 2015
  6. brian m. carlsonJun 5, 2015
  7. Junio C HamanoJun 5, 2015
  8. Michael HaggertyJun 5, 2015
  9. brian m. carlsonJun 5, 2015
  10. Michael HaggertyJun 5, 2015

Read the whole thread, see it on lore, or plain text.

$ cat FOOTERMessages come from the public archive at lore.kernel.org/git, fetched every hour. The front page is chosen and written each morning by an AI editor and can be wrong; the threads themselves are the record. About and API. For agents: an MCP server at https://gitlist.dev/mcp, and any thread, story or person page as Markdown by adding .md to its URL (or sending Accept: text/markdown). Details in /llms.txt.