Skip to content

Be more forgiving with relative paths in search dirs - #88

Merged
dra27 merged 1 commit into
ocaml:masterfrom
yakobowski:master
Jan 5, 2022
Merged

dra27 merged 1 commit into
ocaml:masterfrom
yakobowski:master

Conversation

@yakobowski

Copy link
Copy Markdown
Contributor

If a search dir is relative and starts by '..', the current code is going
to crash. Instead, accept it without normalizing it.

@dra27 dra27 left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Sorry for the slow response time. Out of curiosity, have you actually seen this crashing?

Comment thread reloc.ml Resolved
@yakobowski

Copy link
Copy Markdown
Contributor Author

To answer your question, yes we saw this crashing. However we are building in a very specific env:

  • regular MinGW compiler (i.e. not the "cross" one from Cygwin)
  • tons of systems libraries at non-standard paths.
    So I cannot extract a repro case, I'm afraid.

@yakobowski
yakobowski force-pushed the master branch 3 times, most recently from 696ae2c to 264b541 Compare January 4, 2022 23:30
@yakobowski

Copy link
Copy Markdown
Contributor Author

I rebased and pushed a minor variation which does not use when. Apologies for the back-and-forth.

We should only get absolute library paths in search dirs, but
sometimes we currently get ./../lib. Accept this case

Change-Id: I8c0710dcbe9c2c8690070a190f16c84025559dc3
@dra27
dra27 merged commit 217ae0d into ocaml:master Jan 5, 2022
@dra27

dra27 commented Jan 5, 2022

Copy link
Copy Markdown
Member

Thank you for swift update! That looks great to me. No problem about the repro - I was only curious as to whether you'd got a "real" setup which hit this, or if you'd just noticed it reading the code.

I shall shortly tag 0.40, which will include this.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants