Mantis Bug Tracker

View Issue Details Jump to Notes ] Issue History ] Print ]
IDProjectCategoryView StatusDate SubmittedLast Update
0004839OCamlOCaml generalpublic2009-07-22 08:152015-11-28 10:24
Assigned To 
PlatformOSOS Version
Product Version3.11.1 
Target VersionlaterFixed in Version 
Summary0004839: natdynlink reproducible segfault
DescriptionA packed module in a dll cmxs overwrites the packed module of the same name in the host program at dynlinking. If these two packed modules have incompatible signatures, the program may easily seg-faults.

We have found this when we wrongly created dll cmxs linking with a module of the host program. I upload a reproducible example. make all test shows the crash.

- plugin : a base dll which works fine
- plugin2 : a dll with a incompatible signature. Rejected correctly at linking.
- plugin3 : same as plugin2, but mistakenly linked with the api module. Self-contained. Crashes the host program at linking.
- plugin4 : a dll which shows that the overwrite. The host programs is overwritten by the dll's
TagsNo tags attached.
Attached Filestgz file icon natdynlink-crash.tgz [^] (1,666 bytes) 2009-07-22 08:15

- Relationships
related to 0004231closedlefessan Link multiple casse le système de types 
related to 0004229acknowledged Casser le typage avec Dynlink 
related to 0006462acknowledged Dynlinking duplicate module clobbers host program state 
related to 0006957acknowledged Modules name conflict during dynamic loading 

-  Notes
frisch (developer)
2009-07-22 09:18

I reported such a problem some time ago: 0004229. In fact, you don't even need to use dynlink in order to break the type system when you link in different modules with the same name/signature; regular packing/linking will do: 0004231.
frisch (developer)
2015-11-27 16:56

Turning to later: no clear resolution plan, and bug present for years.
xleroy (administrator)
2015-11-28 10:24

Just refusing to dynlink a compilation unit A if the main program already contains a unit named A would go a long way towards fixing this group of PRs.

- Issue History
Date Modified Username Field Change
2009-07-22 08:15 furuse New Issue
2009-07-22 08:15 furuse File Added: natdynlink-crash.tgz
2009-07-22 09:18 frisch Note Added: 0005028
2009-07-22 09:18 frisch Relationship added related to 0004231
2009-07-22 09:19 frisch Relationship added parent of 0004229
2009-07-22 09:19 frisch Relationship deleted parent of 0004229
2009-07-22 09:19 frisch Relationship added related to 0004229
2010-04-21 11:34 doligez Status new => acknowledged
2012-07-06 16:08 doligez Target Version => 4.01.0+dev
2012-07-31 13:36 doligez Target Version 4.01.0+dev => 4.00.1+dev
2012-09-06 19:12 frisch Target Version 4.00.1+dev => 4.00.2+dev
2013-06-03 16:48 doligez Target Version 4.00.2+dev => 4.02.0+dev
2013-07-12 18:15 doligez Target Version 4.02.0+dev => 4.01.1+dev
2014-05-25 20:20 doligez Target Version 4.01.1+dev => 4.02.0+dev
2014-07-16 10:22 doligez Relationship added related to 0006462
2014-07-16 20:07 doligez Target Version 4.02.0+dev => 4.02.1+dev
2014-09-04 00:25 doligez Target Version 4.02.1+dev => undecided
2014-09-26 17:42 doligez Target Version undecided => 4.03.0+dev
2015-11-20 18:10 xleroy Relationship added related to 0006957
2015-11-27 16:56 frisch Note Added: 0014867
2015-11-27 16:56 frisch Target Version 4.03.0+dev => later
2015-11-28 10:24 xleroy Note Added: 0014876

Copyright © 2000 - 2011 MantisBT Group
Powered by Mantis Bugtracker