-
-
Notifications
You must be signed in to change notification settings - Fork 5.5k
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
Try to get GC analysis clean again #32090
Conversation
``` /home/keno/julia-old/src/gf.c:1220:30: note: Started tracking value here jl_value_t *isect2 = jl_type_intersection((jl_value_t*)mth->sig, (jl_value_t*)sig); ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ /home/keno/julia-old/src/gf.c:1223:13: note: Passing non-rooted value as argument to function that may GC if (jl_types_equal(isect, isect2)) { ^ ~~~~~~ ```
@staticfloat Once this is merged, can we set up a separate buildbot that runs these? Perhaps it can also run the llvmpasses tests and later also the ClangSA test suite once that's hooked up. |
Yes; we already have a |
Not, I want it to run on every commit, it can just run in parallel with the regular tester. |
src/jltypes.c
Outdated
@@ -1677,7 +1680,7 @@ void jl_init_types(void) JL_GC_DISABLED | |||
// create base objects | |||
jl_datatype_type = jl_new_uninitialized_datatype(); | |||
jl_set_typeof(jl_datatype_type, jl_datatype_type); | |||
jl_typename_type = jl_new_uninitialized_datatype(); | |||
jl_typename_type = jl_new_uninitialized_datatype(); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
whitespace issue?
This gets everything except for rtutils.c (which is also moved out of the make target). rtutils will require some refactoring since the printing functions now are syntactically safe points (just happen not to be on the path we care about there).
@@ -729,8 +730,10 @@ static char *jl_alloc_fiber(jl_ucontext_t *t, size_t *ssize, jl_task_t *owner) | |||
char *stkbuf = (char*)jl_malloc_stack(ssize, owner); | |||
if (stkbuf == NULL) | |||
return NULL; | |||
#ifndef __clang_analyzer__ |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Curious why this is here?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
The analyzer gets confused by this syntax construct because it's inside a rooted value. &ptls->base_ctx
. Could probably be fixed, but didn't seem worth the effort.
@@ -44,9 +44,9 @@ RUNTIME_C_SRCS := \ | |||
dlload sys init task array dump staticdata toplevel jl_uv datatype \ | |||
simplevector runtime_intrinsics precompile \ | |||
threading partr stackwalk gc gc-debug gc-pages gc-stacks method \ | |||
jlapi signal-handling safepoint jloptions timing subtype rtutils \ | |||
jlapi signal-handling safepoint jloptions timing subtype \ |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Does this mean this file doesn't get analyzed now?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
yes, see commit message. jl_printf is now a safepoint, so that file needs some refactoring that I thought would be too extensive for this commit.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Why is jl_printf now a safepoint?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
The mutex around uv_write can cause gc.
Also fix one missing GC root I found in the process.