Skip to content

fix: Fix undefined behavior in sample_motifs(sample = NULL)#1565

Closed
krlmlr wants to merge 1 commit intomainfrom
b-1564-motifs-null
Closed

fix: Fix undefined behavior in sample_motifs(sample = NULL)#1565
krlmlr wants to merge 1 commit intomainfrom
b-1564-motifs-null

Conversation

@krlmlr
Copy link
Copy Markdown
Contributor

@krlmlr krlmlr commented Oct 30, 2024

Closes #1564.

@aviator-app
Copy link
Copy Markdown
Contributor

aviator-app bot commented Oct 30, 2024

Current Aviator status

Aviator will automatically update this comment as the status of the PR changes.
Comment /aviator refresh to force Aviator to re-examine your PR (or learn about other /aviator commands).

This PR was closed without merging. If you still want to merge this PR, re-open it.


See the real-time status of this PR on the Aviator webapp.
Use the Aviator Chrome Extension to see the status of your PR within GitHub.

@aviator-app aviator-app bot added the blocked label Oct 30, 2024
@aviator-app
Copy link
Copy Markdown
Contributor

aviator-app bot commented Oct 30, 2024

This pull request failed to merge: some required checks failed. After you have resolved the problem, you should remove the blocked pull request label from this PR and then try to re-queue the PR. Note that the pull request will be automatically re-queued if it has the mergequeue label.

Failed checks: Sanitizer

.Call(
R_igraph_motifs_randesu_estimate, graph, as.numeric(size),
as.numeric(cut.prob), as.numeric(sample.size), as.numeric(sample)
as.numeric(cut.prob), as.numeric(sample.size), sample
Copy link
Copy Markdown
Member

@szhorvat szhorvat Oct 31, 2024

Choose a reason for hiding this comment

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

Suggested change
as.numeric(cut.prob), as.numeric(sample.size), sample
as.numeric(cut.prob), as.numeric(sample.size), if (!is.null(sample) as_igraph_vs(graph, sample)-1 else NULL

I think the correct way to proceed is what I outline above. Can you change this before merging, @krlmlr ?

@szhorvat
Copy link
Copy Markdown
Member

Please use #1568 instead. I marked this as draft for safety, to make sure you see this message.

@szhorvat
Copy link
Copy Markdown
Member

Please use #1568 instead

#15698 was merged, so closing this one.

@szhorvat szhorvat closed this Nov 10, 2024
@github-actions github-actions bot locked as resolved and limited conversation to collaborators Nov 11, 2025
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.

Labels

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Bad conversion of NULL when passing integer vector

2 participants