I'm using openssl-0.9.4 on solirs 2.6 on a Sun E3500 (sparc)
with the egcs gcc compiler v. 2.91.60. The application is multithreaded
using pthreads.

I have tried re-compiling with each of the available Configure
comandline params that mention solaris. Only those with gcc
will compile.

Anyway, when I run my app, I call n = SSL_read( ssl, (char *)&ch, 1 );
to retrieve a byte into an int named ch. I find that my correct byte is
returned in the most significant byte of the int. This seems to indicate
that I have some sort of an alignment issue. I could use help solving this
problem.

The other problem is with my multithreading. I'm opening a thread
for each new accepted socket. When I do this I I call SSL_new, set
the fd to my newly accepted connection and call SSL_accept.
Here's the code from my server:

  pthread_mutex_lock( &mallfree_mutex );
  myev->ssl = SSL_new (ctx);         
  CHK_NULL( myev->ssl ); 
  SSL_set_fd (myev->ssl, myev->fd);
  err = SSL_accept (myev->ssl);
  if( err == -1 ) {
        close( myev->fd );
        SSL_free(myev->ssl);
        free( myev );
        pthread_mutex_unlock( &mallfree_mutex );
        continue;
  }      
  pthread_mutex_unlock( &mallfree_mutex );


When I open more than three simultaneous threads, my server does a
segmentation fault and crashes. Anybody got any ideas what I need
to do?

--randy



______________________________________________________________________
OpenSSL Project                                 http://www.openssl.org
User Support Mailing List                    [EMAIL PROTECTED]
Automated List Manager                           [EMAIL PROTECTED]

Reply via email to