This is the mail archive of the cygwin mailing list for the Cygwin project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

RE: 1.5.19: changes have broken Qt3


On 23 May 2006 18:10, Ralf Habacker wrote:

  Oh no, not this old saw again!

> C:\cygwin\home\Habacker\src\pthreads-snap-2005-03-08\tests>strace
> mutex1n | grep  C0000005
> - --- Process 4872, exception C0000005 at 610B1005
>   155   78759 [main] mutex1n 4872 _cygtls::handle_exceptions: In
> cygwin_except_handler exc 0xC0000005 at 0x610B1005 sp 0x22CC00

[ snip many more ].

> I identified the problem to the function pthread_mutexattr_init address
> 0x610b1005 in which a null pointer (%eax below) causes this seg faults

  Yes, but it's wrapped in an exception handler.  That's why you get to see an
strace error message, rather than having the process exit.  Names like
"cygwin_except_handler" and "_cygtls::handle_exceptions" should have given you
some clues about this!

> The following patch catch this zero pointer, although I'm not sure if
> this  zero pointer indicates a major fault conditions in the threading stuff

  If you don't know whether or not it's a bug, you shouldn't be trying to fix
it.  You should *understand* the code first, and think about patching it
second.

  And you know, if you think you've found a bug, and you think you've got some
testcases, and you think you've developed a patch, well, surely you actually
TRIED it out and saw that the testcases were still failing?

> 	* thread.cc (verifyable_object_isvalid): catch zero pointer.

  If you had even googled the list archive, you would have seen this being
suggested before.  See, e.g.

http://article.gmane.org/gmane.os.cygwin.patches/2976

> After some more investigation I found that there are additional cases
> where seg faults happens because of object pointer not being null and
> not be valid. This needs more research.

  Yep.  Start by looking up what efault.faulted is all about!

    cheers,
      DaveK
-- 
Can't think of a witty .sigline today....


--
Unsubscribe info:      http://cygwin.com/ml/#unsubscribe-simple
Problem reports:       http://cygwin.com/problems.html
Documentation:         http://cygwin.com/docs.html
FAQ:                   http://cygwin.com/faq/


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]