git.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* SEGV when lookup_* returns NULL
@ 2006-11-27 21:13 Martin Waitz
  2006-11-27 21:55 ` Junio C Hamano
  0 siblings, 1 reply; 5+ messages in thread
From: Martin Waitz @ 2006-11-27 21:13 UTC (permalink / raw)
  To: git

[-- Attachment #1: Type: text/plain, Size: 571 bytes --]

hoi :)

When trying to an unmodified GIT on a repository with submodules
it segfaults a lot.

All the lookup_{blob,tree,commit} functions check that the object
really is of the requested type and return NULL otherwise.
However this NULL pointer is not checked in the calling functions.

Should we make lookup_* to just die when invoked on another object-type?
Or modify all the callers?
Is there a sane error-handling strategy besides dying in this case?
Really checking all the return values in the whole chain would be
a lot of work.

-- 
Martin Waitz

[-- Attachment #2: Digital signature --]
[-- Type: application/pgp-signature, Size: 189 bytes --]

^ permalink raw reply	[flat|nested] 5+ messages in thread

end of thread, other threads:[~2006-11-28  2:23 UTC | newest]

Thread overview: 5+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2006-11-27 21:13 SEGV when lookup_* returns NULL Martin Waitz
2006-11-27 21:55 ` Junio C Hamano
2006-11-27 23:33   ` Johannes Schindelin
2006-11-28  0:13     ` Junio C Hamano
2006-11-28  2:23       ` Morten Welinder

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).