[GHC] #7914: base library's MD5 symbols clash with others

GHC cvs-ghc at haskell.org
Thu May 16 05:22:33 CEST 2013


#7914: base library's MD5 symbols clash with others
-----------------------------+----------------------------------------------
Reporter:  bos               |          Owner:                  
    Type:  bug               |         Status:  new             
Priority:  normal            |      Component:  libraries/base  
 Version:  7.6.3             |       Keywords:                  
      Os:  Unknown/Multiple  |   Architecture:  Unknown/Multiple
 Failure:  Runtime crash     |      Blockedby:                  
Blocking:                    |        Related:                  
-----------------------------+----------------------------------------------
 We have a large C++ application into which we are linking the GHC runtime.
 Being large, this app has many components, among which is one that defines
 a bunch of MD5 functions that have overlapping names with those defined in
 base, but different ABIs.

 Depending on the order in which the linker runs across the object files,
 we end up with a crash during application startup as a result of one
 component picking up the other component's MD5 symbols.

 The offending source file is libraries/base/cbits/md5.c.

 A simple fix for this would be to prefix the function names with e.g.
 _ghc_ or something similar, so that the names would not clash.

 There are perhaps other functions in base (probably many others) that
 could benefit from a similar treatment, but we're not crashing on those
 yet.

-- 
Ticket URL: <http://hackage.haskell.org/trac/ghc/ticket/7914>
GHC <http://www.haskell.org/ghc/>
The Glasgow Haskell Compiler



More information about the ghc-tickets mailing list