Mistake: openssl linked -lmalloc + mallopt(M_KEEP,0) ran on USII (no vis2). Our own application still crashed. Anyhow, this is something for Sun to fix IMO.
Kees -----Original Message----- From: Kees Dekker Sent: Thursday, 26 August, 2010 14:16 To: 'r...@openssl.org' Cc: openssl-dev@openssl.org Subject: RE: [openssl.org #2321] bug report: core dump on OPENSSL_cpuid_setup() on Solaris 10 with a Sun Enterprise 450 system Hi, Sorry, I forgot to test with mallinfo(). Now added a call in sparcv9cap.c, just before dlopen(), but it did not solve the problem :-(. The reproduction provided by you also crashed on my SparcIII machine if -lmalloc was used. A call to mallopt(M_KEEP,0) did not solve the SIGSEGV, because libdevinfo was loaded before... (I assume). I will try to file a defect to our Sun friends. Regards, Kees -----Original Message----- From: Andy Polyakov via RT [mailto:r...@openssl.org] Sent: Wednesday, 25 August, 2010 20:51 To: Kees Dekker Cc: openssl-dev@openssl.org Subject: Re: [openssl.org #2321] bug report: core dump on OPENSSL_cpuid_setup() on Solaris 10 with a Sun Enterprise 450 system > Why does Solaris 10 on SparcIII not suffer from this problem, is > unclear to me. Because there is a shortcut. VIS2-capable CPUs are excused from libdevinfo voodoo and USIII is VIS2-capable CPU. Because all so-far observed VIS2-capable CPUs has identical qualities from OpenSSL viewpoint. VIS2 capability is determined with sysinfo(SI_ISALIST). > Unfortunatelly, (our) support for Solaris is system limited, and we > do not have a contract on our UltraII box :-( I can’t ask Sun for a > fix. Can you please provide me the sources for reproduction on > Solaris x86. Can't you write following yourself: #include <libdevinfo.h> static int walk_nodename(di_node_t node, void *p) { return DI_WALK_CONTINUE; } int main() { di_node_t root_node; if ((root_node = di_init("/",DINFOSUBTREE))!=DI_NODE_NIL) { di_walk_node(root_node,DI_WALK_SIBFIRST, NULL,walk_nodename); di_fini(root_node); } } Link with -ldevinfo - works, with -ldevinfo -lmalloc - crashes. > As act of desperation I've added call to mallopt(M_KEEP,0) prior dlopen > and SIGSEGV ... gone. Can you check this with your application? Note > that it wouldn't work to add the call to your main() function, because > OPENSSL_cpuid is called earlier from .init segment. You have to add it > to OPENSSL_cpuid_setup in crypto/sparcv9cap.c... Pleeeeeeeaaaaase. It's also possible to switch to the detection procedure used on Linux (in which case it might have to be refined). This procedure relies on SIGILL to determine CPU capabilities. A.