eric wang writes:
> How did you think it's calling pthread_mutex_lock(NULL), but no other e.g. 
> pthread_mutex_lock("invalid address, e.g. 0xfffffffffffff)?
> 
> I think the NULL pointer into pthread_mutex_lock is not accordant with signal 
> SEGV (access to address exceeded protections). 

What do you mean by "accordant?"

SIGSEGV is exactly what you get if you try to touch storage via a NULL
(zero) pointer.  This can be shown fairly easily:

% echo 'void main(void) { *(char *)0 = 1; }' > foo.c
% cc -o foo foo.c
% ./foo
Segmentation fault (core dumped)
% echo ::status | sudo mdb core
debugging core file of foo (32-bit) from phorcys
initial argv: ./foo
threading model: native threads
status: process terminated by SIGSEGV (Segmentation Fault)
% 

-- 
James Carlson, Solaris Networking              <[EMAIL PROTECTED]>
Sun Microsystems / 1 Network Drive         71.232W   Vox +1 781 442 2084
MS UBUR02-212 / Burlington MA 01803-2757   42.496N   Fax +1 781 442 1677
_______________________________________________
opensolaris-discuss mailing list
opensolaris-discuss@opensolaris.org

Reply via email to