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

these lines checks seem to be triggering stack overflows #3805

Draft
wants to merge 1 commit into
base: master
Choose a base branch
from

Conversation

jdodds
Copy link

@jdodds jdodds commented Mar 2, 2020

see #3690

Removing the (x,y).Depth parts of the compare calls, or swapping their order will cause paket to run without causing a StackOverflow on my repro. The behavior is the same whether or not the checks for IsGlobalOverride are separated.:

// this
let c = compare
    (not y.VersionRequirement.Range.IsGlobalOverride,y.Depth)
    (not x.VersionRequirement.Range.IsGlobalOverride,x.Depth)

// and this both "succeed"
let c = compare (x.VersionRequirement.Range.IsGlobalOverride, y.VersionRequirement.Range.IsGlobalOverride)
if c <> 0 then c else
let c = compare (y.Depth, x.Depth)

// this
let c = compare
     (not x.VersionRequirement.Range.IsGlobalOverride,x.Depth)
     (not y.VersionRequirement.Range.IsGlobalOverride,y.Depth)

// and this both "fail"
let c = compare (x.VersionRequirement.Range.IsGlobalOverride, y.VersionRequirement.Range.IsGlobalOverride)
if c<> 0 then c else
let c = compare (x.Depth, y.Depth)

Commenting the lines out as per 89d9144 also "succeeds". Seems like there might be something funky going on / a missed infinite recursion path around the logic for updating the requirements graph of a PackageRequirement?

@forki
Copy link
Member

forki commented Feb 5, 2022

but that changes the order, right?

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