-
Notifications
You must be signed in to change notification settings - Fork 6.1k
do not allocate or access zero sized arrays #19983
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
Merged
Merged
Conversation
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
vkalintiris
approved these changes
Mar 27, 2025
vkalintiris
requested changes
Mar 27, 2025
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.
Thread 40 "HEALTH" received signal SIGTRAP, Trace/breakpoint trap.
[Switching to Thread 0x7fffd7a018c0 (LWP 403550)]
0x0000555555cc0dc8 in rrdr2value (r=0x7ffff7ea8048, i=0, options=16809988, all_values_are_null=0x7fffd7a00d0c, anomaly_rate=0x0) at /home/pi/repos/nd/master/src/web/api/formatters/value/value.c:8
8 NETDATA_DOUBLE *cn = &r->v[ i * r->d ];
(gdb) bt
#0 0x0000555555cc0dc8 in rrdr2value (r=0x7ffff7ea8048, i=0, options=16809988, all_values_are_null=0x7fffd7a00d0c, anomaly_rate=0x0) at /home/pi/repos/nd/master/src/web/api/formatters/value/value.c:8
#1 0x0000555555c7016c in rrdset2value_api_v1 (st=0x7fffec0c6d38, wb=0x0, n=0x7ffff0584900, dimensions=0x5555579cb588 "received", points=1, after=-600, before=0, group_method=RRDR_GROUPING_SUM, group_options=0x0, resampling_time=0, options=16809988, db_after=0x7ffff0584948, db_before=0x7ffff0584950, db_points_read=0x0, db_points_per_tier=0x0, result_points_generated=0x0, value_is_null=0x7fffd7a00d0c, anomaly_rate=0x0, timeout=0, tier=0, query_source=QUERY_SOURCE_HEALTH, priority=STORAGE_PRIORITY_SYNCHRONOUS)
at /home/pi/repos/nd/master/src/web/api/formatters/rrd2json.c:93
#2 0x0000555555dfd600 in health_event_loop_for_host (host=0x5555576ed2f0, apply_hibernation_delay=false, now=1743078665, next_run=0x7fffd7a00ec8) at /home/pi/repos/nd/master/src/health/health_event_loop.c:380
#3 0x0000555555dfb62c in health_event_loop () at /home/pi/repos/nd/master/src/health/health_event_loop.c:692
#4 0x0000555555dfb0f0 in health_main (ptr=0x555557635b30) at /home/pi/repos/nd/master/src/health/health_event_loop.c:736
#5 0x0000555556f171e8 in nd_thread_starting_point (ptr=0x555557fd45e0) at /home/pi/repos/nd/master/src/libnetdata/threads/threads.c:362
#6 0x00007ffff71cee90 in start_thread (arg=0x7fffffffda77) at ./nptl/pthread_create.c:442
#7 0x00007ffff7237b1c in thread_start () at ../sysdeps/unix/sysv/linux/aarch64/clone.S:79
FWIW, it's a query run on net_drops.wlan0
.
vkalintiris
approved these changes
Mar 27, 2025
vkalintiris
approved these changes
Mar 27, 2025
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.
Looking good.
stelfrag
pushed a commit
to stelfrag/netdata
that referenced
this pull request
Mar 27, 2025
* do not allocate or access zero sized arrays * do not access zero dimensions or points (cherry picked from commit 3e18d2d)
Merged
stelfrag
pushed a commit
to stelfrag/netdata
that referenced
this pull request
Mar 28, 2025
* do not allocate or access zero sized arrays * do not access zero dimensions or points (cherry picked from commit 3e18d2d)
Ferroin
pushed a commit
that referenced
this pull request
Apr 2, 2025
* do not allocate or access zero sized arrays * do not access zero dimensions or points (cherry picked from commit 3e18d2d)
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
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.
No description provided.