bumptech/bump-api-ios

Crash with SHA1 functions

mick180 opened this issue · 1 comments

Hi!
About a month ago I tried to add a bumping ability to the my application, but all the time after some first BumpAPI initializing functions were called the app crashed with very strange behavior - it seemed there was a stack corruption or something like that. I debugged the app for a couple of days but could not find the reason of the crash - the only thing I noticed that the newly created application with only BumpAPI added worked well. Then I looked through the symbols table of libBump.a and got the reason! I noticed that you used the same SHA1 lib that I did and the final application's binary had a double of those SHA1 functions, but I didn't have any warnings regarding this from compiler. And as a result it seemed the execution flow went wrong and I had that strange crash without any information what went wrong. So, I just changed names of SHA1 functions from my lib (I added prefixes) and everything started working well!
So, something like a petition for the future :-) Could you please change names of your SHA1 lib (and other public libs you use) in order not to have the issues like that? :-)
Thanks in advance!

Hey Mick, thanks for the report and sorry about that! Simply prefixing the symbols is a bit tricky in a large library like OpenSSL. Instead, we hope to provide a version that doesn't statically link OpenSSL, and will ask you to instead link against OpenSSL yourself. We will also provide a list of OpenSSL versions that we support. Timeframe for this would perhaps be sometime in the next month or two.

In the meantime, there is a thread on the google group in which at least one person was able to work around this by s/conflicting_symbol/prefixed_conflicting_symbols/g on the .a:

http://groups.google.com/group/bump-api/browse_thread/thread/5993c0b2d1be3863/765a03ee1907300f?lnk=gst&q=md5#765a03ee1907300f

Not sure if this will create more headache than it's worth.

Thomas