You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
Unsupported relocation kind 0003 for __GSHandlerCheck in libcamlrun.lib(intern.obj) #29
I'm getting this when building OCaml 4.03.0 for x64 with bootstrapped flexlink and Visual Studio 2015. The relocation kind is IMAGE_REL_AMD64_ADDR32NB. I have not yet investigated exactly what that means.
This is a SEH relocation. It appears because the /GS switch uses SEH to indicate the failure of stack cookie validation. The error can be fixed by adding -GS- to BYTECC and NATIVECC in config/Makefile.
I decided to not implement this relocation because it is not clear to me how exactly that works, and given the high effort required for verifying a code path that in all likelihood will never be invoked, I opt to not risk including a broken implementation in flexdll.
The workaround does not work if one wishes to link with the libucrt.lib (the static C runtime library from Visual Studio 2015, as explained here), since that is built with /GS also. The workaround is to link the dynamic runtime library ucrt.lib.
@dra27 I don't see any reason this would be fixed. As for the repro case--sure, as described in the first comment, building OCaml using VS2015 and the default Makefile.config is enough IIRC.
I've been building x64 4.03.0 and 4.04.0 with VS2015 with no problems for ages - including all the work I'm presently doing. Do you see the same thing with trunk?
Just capturing for myself that I am getting this problem; don't have the time to investigate this properly. Much more time-consuming since this only appears on GitLab CI/CD.
But it does seem clear that we shouldn't be ignoring valid relocations, regardless of how they are triggered.
Activity
whitequark commentedon Oct 8, 2016
This is a SEH relocation. It appears because the
/GSswitch uses SEH to indicate the failure of stack cookie validation. The error can be fixed by adding-GS-toBYTECCandNATIVECCinconfig/Makefile.I decided to not implement this relocation because it is not clear to me how exactly that works, and given the high effort required for verifying a code path that in all likelihood will never be invoked, I opt to not risk including a broken implementation in flexdll.
whitequark commentedon Oct 8, 2016
The workaround does not work if one wishes to link with the
libucrt.lib(the static C runtime library from Visual Studio 2015, as explained here), since that is built with/GSalso. The workaround is to link the dynamic runtime libraryucrt.lib.dra27 commentedon Dec 17, 2016
I've not seen this - is it still the case and is there an easy repro case?
whitequark commentedon Dec 17, 2016
@dra27 I don't see any reason this would be fixed. As for the repro case--sure, as described in the first comment, building OCaml using VS2015 and the default Makefile.config is enough IIRC.
dra27 commentedon Dec 17, 2016
I've been building x64 4.03.0 and 4.04.0 with VS2015 with no problems for ages - including all the work I'm presently doing. Do you see the same thing with trunk?
whitequark commentedon Dec 17, 2016
OK, I will try again soon.
bschommer commentedon Jun 7, 2017
I encountered a similar issue when compiling zarith with the VS2015 and used
/z7for generating debug information.jonahbeckford commentedon Sep 28, 2023
Just capturing for myself that I am getting this problem; don't have the time to investigate this properly. Much more time-consuming since this only appears on GitLab CI/CD.
But it does seem clear that we shouldn't be ignoring valid relocations, regardless of how they are triggered.
Problem
I recently switched to
ucrtin https://github.com/jonahbeckford/flexdll/commits/0.43%2Bucrt, but haven't compiled the code that triggers this error before. There is a horrid mitigation for this issue which I will neither mention nor confirm.Errors:
and
jonahbeckford commentedon Jul 29, 2024
PR #141 has the fix.
Try to get the link of date to work on windows