Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Subst.compose is coded wrongly. #4996

Closed
vicuna opened this issue Mar 9, 2010 · 1 comment
Closed

Subst.compose is coded wrongly. #4996

vicuna opened this issue Mar 9, 2010 · 1 comment
Assignees
Labels

Comments

@vicuna
Copy link

vicuna commented Mar 9, 2010

Original bug ID: 4996
Reporter: rose
Assigned to: @xavierleroy
Status: closed (set by @xavierleroy on 2011-05-29T10:19:44Z)
Resolution: fixed
Priority: normal
Severity: minor
Version: 3.11.2
Fixed in version: 3.12.0+dev
Category: ~DO NOT USE (was: OCaml general)

Bug description

Correct me if I am wrong, but after studying the code for substitutions in subst.ml I think, that 'Subst.compose' is wrong. It should concatenate two substitutions 'suba' and 'subb', but in fact only concatenates entries, which are already present in 'subb'. If 'subb' is the identity (empty tables), the composition should be 'suba', but is in fact also wrongly the identity substitution. The function 'Subst.compose' is only used for relocation of debugging info when packaging CMO-files. Therefore I think this makes the debugger unhappy with packed CMO-files. There is already a bug about this topic, but its closed. But the reason for that bug might not come from the debugger itself, but is possibly present because of this issue with 'compose'.

@vicuna
Copy link
Author

vicuna commented Apr 20, 2010

Comment author: @xavierleroy

Well spotted. I fixed the implementation so that it is a proper composition. We will see what impacts this has on debug info for packed modules, but I optimistically assume it can only make them better. Will go in 3.12.0.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

2 participants