On Tue, Jul 11, 2000 at 11:07:16AM +0200, Kallweit, Heiner wrote:
> To answer the question of Lutz: I compiled OpenSSL
> with _REENTRANT, so errno is a #define to *__errno().

You are obviously using a different version than I am doing, since
  find . -name "*" -print | xargs grep __errno
doesn't yield anything. But I run HP-UX 10.20, you have 11.

> The reason for the crash is always a SIGSEGV. Of course
> I also thought first of a heap corruption. But the wicked
> thing is that the crash sometimes happens when just entering
> a function which doesn't access malloced data.

Given the stacktrace you did show with the crash at __errno(), this would
mean the following: The place at which the errno for the particular
thread is stored is returned by __errno() and OpenSSL tries to write "0"
to that location. The location however does not exist inside the
address range of your process.
I don't have an idea about the internal working of HP-UX 11-threads,
but probably whenever you create a thread, memory must be allocated
in some manner to save the per-thread information.
So, even if an innocent call to "errno" may require a lookup into
memory, that has been allocated on the run a long time ago and that
was damaged at some completely other part of the program.
[I don't want to insist on my theory though, I just cannot offer something
better at this point :-)]

Of course, you can also have corrupted stack :-)

Best regards,
        Lutz
-- 
Lutz Jaenicke                             [EMAIL PROTECTED]
BTU Cottbus               http://www.aet.TU-Cottbus.DE/personen/jaenicke/
Lehrstuhl Allgemeine Elektrotechnik                  Tel. +49 355 69-4129
Universitaetsplatz 3-4, D-03044 Cottbus              Fax. +49 355 69-4153
______________________________________________________________________
OpenSSL Project                                 http://www.openssl.org
User Support Mailing List                    [EMAIL PROTECTED]
Automated List Manager                           [EMAIL PROTECTED]

Reply via email to