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

Re: [PATCH] Don't rely on unspecified behavior

From
Thomas Schwinge <tschwinge@gnu.org>
Date
Jul 28, 2007, 18:25 UTC
Message-ID
<20070728182542.GA22651@fencepost.gnu.org>
In-Reply-To
<20070728173948.GD23337@cip.informatik.uni-erlangen.de>
Hello!
On Sat, Jul 28, 2007 at 07:39:48PM +0200, Thomas Glanzmann wrote:
Show 9 quoted lines
> > Calling access(p, m) with p == NULL is not specified, so don't do
> > that.  On GNU/Hurd systems doing so will result in an SIGSEGV.
> 
> a friend of mine choked on this one when tried git for the second time
> (the first time "git-repack -a -d -f" screwed his repository after the
> initial checkout. This is fixed for a long time). Lucky me that he had
> his libusbdriver in LD_PRELOAD which could not handle the NULL argument.
> And I always thought libc would make the check before it does the system
> call or does GNU/hurts not use the gnu libc?

GNU/Hurd systems do (obviously ;-) use the GNU libc. The glibc maintainer Roland McGrath explicitly told me that ``access (NULL, m)'' shall not be caught as it is not specified and thus must not be invoked like this.

I noticed that the patch I sent was prepared for an old version of the file. I'll send an updated patch that applies to the current revision.

Regards,
 Thomas
Previous: Thomas GlanzmannNext: Thomas Schwinge
Message 4 of 11 in “Support building on GNU/Hurd”
  1. Support building on GNU/HurdThomas Schwinge, Jul 28, 2007
  2. Don't rely on unspecified behaviorThomas Schwinge, Jul 28, 2007
  3. Thomas GlanzmannJul 28, 2007
  4. Thomas SchwingeJul 28, 2007
  5. Don't rely on unspecified behaviorThomas Schwinge, Jul 28, 2007
  6. Johannes SchindelinJul 28, 2007
  7. Thomas GlanzmannJul 28, 2007
  8. Johannes SchindelinJul 28, 2007
  9. Thomas GlanzmannJul 28, 2007
  10. Thomas SchwingeJul 28, 2007
  11. Johannes SchindelinJul 28, 2007

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.