Thanks to visit codestin.com
Credit goes to github.com

Skip to content

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 2 commits into from
Mar 27, 2025
Merged

Conversation

ktsaou
Copy link
Member

@ktsaou ktsaou commented Mar 27, 2025

No description provided.

Copy link
Contributor

@vkalintiris vkalintiris left a 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.

Copy link
Contributor

@vkalintiris vkalintiris left a comment

Choose a reason for hiding this comment

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

Looking good.

@ktsaou ktsaou merged commit 3e18d2d into netdata:master Mar 27, 2025
102 of 103 checks passed
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)
@stelfrag stelfrag mentioned this pull request Mar 27, 2025
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
Labels
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants