Skip to content

Conversation

@adienes
Copy link
Member

@adienes adienes commented Aug 31, 2025

builtins have empty method tables so invoke will segfault or otherwise crash (see some tests). this PR attempts to fix that

@adienes adienes added error handling Handling of exceptions by Julia or the user bugfix This change fixes an existing bug labels Aug 31, 2025
@adienes
Copy link
Member Author

adienes commented Aug 31, 2025

I guess this breaks trimming. would it be better for this to just be always an error can't invoke builtins or something, rather than trying to make it work?

@nsajko nsajko added needs docs Documentation for this change is required needs news A NEWS entry is required for this change feature Indicates new feature / enhancement requests labels Sep 1, 2025
@adienes
Copy link
Member Author

adienes commented Sep 3, 2025

this now solely turns internal errors into surface errors so I'm removing the feature and news label (although docs probably good here)

@adienes adienes removed needs news A NEWS entry is required for this change feature Indicates new feature / enhancement requests labels Sep 3, 2025
@adienes
Copy link
Member Author

adienes commented Sep 3, 2025

with the clarification in Functions.md that builtins are not generic, I think the docstring of invoke no longer needs updating (as it specifics generic functions). but I can tag triage to be sure, unless this gets definitively decided before the next meeting

@adienes adienes added triage This should be discussed on a triage call and removed needs docs Documentation for this change is required labels Sep 3, 2025
Copy link
Member

@vtjnash vtjnash left a comment

Choose a reason for hiding this comment

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

They are generic functions (or rather just functions, since Julia doesn't have any non-generic function). There's a mistake that slipped in to jl_specializations_get_linfo_ though, since it is supposed to return unspecialized if source and generated are both NULL, but it instead checks if it is a non-generic function (sig == jl_anytuple_type), but we don't have any non-generic functions.

@adienes adienes removed the triage This should be discussed on a triage call label Sep 12, 2025
@adienes
Copy link
Member Author

adienes commented Sep 12, 2025

thanks for the advice. does the latest version look closer to what you had in mind?

@vtjnash vtjnash added the backport 1.12 Change should be backported to release-1.12 label Sep 12, 2025
@adienes adienes merged commit 1811564 into JuliaLang:master Sep 12, 2025
9 checks passed
@adienes adienes deleted the meta_invoke branch September 12, 2025 17:06
KristofferC pushed a commit that referenced this pull request Sep 15, 2025
builtins have empty method tables so `invoke` will segfault or otherwise
crash (see some tests). this PR attempts to fix that

(cherry picked from commit 1811564)
KristofferC pushed a commit that referenced this pull request Sep 15, 2025
builtins have empty method tables so `invoke` will segfault or otherwise
crash (see some tests). this PR attempts to fix that

(cherry picked from commit 1811564)
@KristofferC KristofferC removed the backport 1.12 Change should be backported to release-1.12 label Sep 17, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

bugfix This change fixes an existing bug error handling Handling of exceptions by Julia or the user

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants