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

#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

#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: -----------------------------+---------------------------------------------- Comment(by bos): By the way, the specific third-party library with the conflicting symbols is mhash: http://mhash.sourceforge.net/ -- Ticket URL: http://hackage.haskell.org/trac/ghc/ticket/7914#comment:1 GHC http://www.haskell.org/ghc/ The Glasgow Haskell Compiler

#7914: base library's MD5 symbols clash with others ---------------------------------+------------------------------------------ Reporter: bos | Owner: simonmar Type: bug | Status: new Priority: high | Milestone: 7.8.1 Component: libraries/base | Version: 7.6.3 Keywords: | Os: Unknown/Multiple Architecture: Unknown/Multiple | Failure: Runtime crash Difficulty: Unknown | Testcase: Blockedby: | Blocking: Related: | ---------------------------------+------------------------------------------ Changes (by simonmar): * owner: => simonmar * difficulty: => Unknown * priority: normal => high * milestone: => 7.8.1 -- Ticket URL: http://hackage.haskell.org/trac/ghc/ticket/7914#comment:2 GHC http://www.haskell.org/ghc/ The Glasgow Haskell Compiler

#7914: base library's MD5 symbols clash with others
-------------------------------+--------------------------------------------
Reporter: bos | Owner: simonmar
Type: bug | Status: closed
Priority: high | Milestone: 7.8.1
Component: libraries/base | Version: 7.6.3
Resolution: fixed | Keywords:
Os: Unknown/Multiple | Architecture: Unknown/Multiple
Failure: Runtime crash | Difficulty: Unknown
Testcase: | Blockedby:
Blocking: | Related:
-------------------------------+--------------------------------------------
Changes (by simonmar):
* cc: agallagher@… (added)
* status: new => closed
* resolution: => fixed
Comment:
Fixed:
commit 749730c1617641ef0fba03f2703f99fa5c24f3d4
{{{
Author: Simon Marlow
participants (1)
-
GHC