Bart, I was actually working on this yesterday. This is what I know so far after a few hours of digging into this: It appears that there's an issue with getting to the memory address that EVP_sha512() returns when it's called in sc_get_openssl_hashfn(). Why this is so, I don't know. Below are details of what I've figured out so far:
On my environment, I'm using OpenSSL 1.0.2o installed using mac ports. EVP_sha512() simply returns the address of a static const struct env_md_st instance once you expand the EVP_MD typedef (see the source here: https://github.com/openssl/openssl/blob/3ce7bc40a3c48da1c96c2d04c10045bd797c6aa3/crypto/evp/m_sha1.c#L216). When I was stepping through using the lldb debugger, when I inspect the value of hashfn after the call to EVP_sha512() it actually reports an error that the address is inaccessible. That one's got me stumped. In line 192, the call EVP_DigestInit() happens and the address returned by EVP_sha512() is passed as the 2nd parameter to that function. Kaboom for obvious reasons. I'm no expert on the rules of accessing memory space from dynamic libraries. Hopefully, someone else can chime in. My next step is to write a small test program to isolate the digest initialization code to see if I can replicate the issue outside of Net-SNMP. Thanks, Keith On Sat, Apr 21, 2018, at 8:20 PM, Bart Van Assche wrote: > Hello, > > Can someone who has access to a Darwin (OS/X) system analyze why test > T024snmpv3getSHA512_simple from the master branch triggers a > segmentation fault on Darwin? I noticed this while trying to make the > Net-SNMP tests pass on Travis. See also > https://travis-ci.org/bvanassche/net-snmp/jobs/369646490 for how > Net-SNMP was configured and also for the job output. > > Thanks, > > Bart. > > ------------------------------------------------------------------------------ > Check out the vibrant tech community on one of the world's most > engaging tech sites, Slashdot.org! http://sdm.link/slashdot > _______________________________________________ > Net-snmp-coders mailing list > Net-snmp-coders@lists.sourceforge.net > https://lists.sourceforge.net/lists/listinfo/net-snmp-coders -- Thanks, Keith (pantherse) ------------------------------------------------------------------------------ Check out the vibrant tech community on one of the world's most engaging tech sites, Slashdot.org! http://sdm.link/slashdot _______________________________________________ Net-snmp-coders mailing list Net-snmp-coders@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/net-snmp-coders