Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
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.
warning: Dereference of null pointer [clang-analyzer-core.NullDereference]
Additional context
ggml.c:14165: Assuming 'n_threads' is <= 1
ggml.c:14165: '?' condition is false
ggml.c:14165: 'workers' initialized to a null pointer value
ggml.c:14168: 'n_threads' is <= 1
ggml.c:14168: Taking false branch
ggml.c:14198: Assuming 'i' is < field 'n_nodes'
ggml.c:14198: Loop condition is true. Entering loop body
ggml.c:14201: Control jumps to 'case GGML_OP_MAP_UNARY:' at line 14432
ggml.c:14435: Execution continues on line 14199
= 1; ^
ggml.c:14198: Assuming 'i' is >= field 'n_nodes'
ggml.c:14198: Loop condition is false. Execution continues on line 14448
ggml.c:14447: Assuming field 'work' is equal to NULL
ggml.c:14447: Left side of '&&' is false
ggml.c:14451: 'work_size' is <= 0
ggml.c:14451: Left side of '&&' is false
ggml.c:14462: Loop condition is true. Entering loop body
ggml.c:14480: Field 'work' is null
ggml.c:14480: '?' condition is false
ggml.c:14481: Field 'work' is null
: 0, ^
ggml.c:14481: '?' condition is false
: 0, ^
ggml.c:14484: Calling 'ggml_compute_forward'
ggml.c:12939: 'params' is non-null
ggml.h:204: expanded from macro 'GGML_ASSERT'
if (!(x)) { \ ^
ggml.c:12939: Taking false branch
ggml.h:204: expanded from macro 'GGML_ASSERT'
if (!(x)) { \ ^
ggml.c:12939: Loop condition is false. Exiting loop
ggml.h:203: expanded from macro 'GGML_ASSERT'
do { \ ^
ggml.c:12941: Control jumps to 'case GGML_OP_MAP_UNARY:' at line 13138
ggml.c:13140: Calling 'ggml_compute_forward_map_unary'
ggml.c:12875: Control jumps to 'case GGML_TYPE_F32:' at line 12877
ggml.c:12878: Calling 'ggml_compute_forward_map_unary_f32'
ggml.c:12850: Taking false branch
ggml.h:204: expanded from macro 'GGML_ASSERT'
if (!(x)) { \ ^
ggml.c:12850: Loop condition is false. Exiting loop
ggml.h:203: expanded from macro 'GGML_ASSERT'
do { \ ^
ggml.c:12852: Field 'type' is equal to GGML_TASK_INIT
ggml.c:12852: Left side of '||' is true
ggml.c:12853: Returning without writing to 'dst->op', which participates in a condition later
ggml.c:12878: Returning from 'ggml_compute_forward_map_unary_f32'
ggml.c:12879: Execution continues on line 12879
ggml.c:12887: Returning without writing to 'dst->op', which participates in a condition later
ggml.c:13140: Returning from 'ggml_compute_forward_map_unary'
ggml.c:13142: Execution continues on line 13141
ggml.c:13160: Returning without writing to 'tensor->op', which participates in a condition later
ggml.c:14484: Returning from 'ggml_compute_forward'
ggml.c:14487: Field 'n_tasks' is <= 1
ggml.c:14487: Taking false branch
ggml.c:14520: Calling 'ggml_compute_forward'
ggml.c:12939: 'params' is non-null
ggml.h:204: expanded from macro 'GGML_ASSERT'
if (!(x)) { \ ^
ggml.c:12939: Taking false branch
ggml.h:204: expanded from macro 'GGML_ASSERT'
if (!(x)) { \ ^
ggml.c:12939: Loop condition is false. Exiting loop
ggml.h:203: expanded from macro 'GGML_ASSERT'
do { \ ^
ggml.c:12941: Control jumps to 'case GGML_OP_MAP_UNARY:' at line 13138
ggml.c:13140: Calling 'ggml_compute_forward_map_unary'
ggml.c:12875: Control jumps to 'case GGML_TYPE_F32:' at line 12877
ggml.c:12878: Value assigned to field 'op', which participates in a condition later
ggml.c:12879: Execution continues on line 12879
ggml.c:13140: Returning from 'ggml_compute_forward_map_unary'
ggml.c:13142: Execution continues on line 13141
ggml.c:14520: Returning from 'ggml_compute_forward'
ggml.c:14523: Assuming field 'n_tasks' is > 1
ggml.c:14523: Taking true branch
ggml.c:14524: Assuming the condition is false
1) { ^
/usr/lib/llvm-15/lib/clang/15.0.7/include/stdatomic.h:141: expanded from macro 'atomic_fetch_add'
ggml.c:14524: Taking false branch
1) { ^
ggml.c:14528: Loop condition is false. Execution continues on line 14534
ggml.c:14535: Loop condition is false. Execution continues on line 14543
1); ^
ggml.c:14542: Field 'n_tasks' is > 1
ggml.c:14542: Left side of '&&' is true
ggml.c:14542: Assuming the condition is true
ggml.c:14542: Taking true branch
ggml.c:14543: Assuming the condition is false
/usr/lib/llvm-15/lib/clang/15.0.7/include/stdatomic.h:141: expanded from macro 'atomic_fetch_add'
ggml.c:14543: Taking false branch
ggml.c:14547: Loop condition is false. Execution continues on line 14554
ggml.c:14553: Assuming the condition is true
ggml.c:14553: Loop condition is true. Entering loop body
ggml.c:14558: Field 'work' is null
ggml.c:14558: '?' condition is false
ggml.c:14559: Field 'work' is null
: 0, ^
ggml.c:14559: '?' condition is false
: 0, ^
ggml.c:14554: Dereference of null pointer