Skip to content

system/ping: Fix a segmentation fault when using ping#3617

Open
acassis wants to merge 1 commit into
apache:masterfrom
acassis:fix_ping_crash
Open

system/ping: Fix a segmentation fault when using ping#3617
acassis wants to merge 1 commit into
apache:masterfrom
acassis:fix_ping_crash

Conversation

@acassis

@acassis acassis commented Jul 7, 2026

Copy link
Copy Markdown
Contributor

Summary

nsh> ping google.com
[ 37.180000] dns_query_error: ERROR: IPv4 dns_recv_response fa: -84,
server address: 8.8.8.8
Segmentation fault.

Impact

BUG Fix!

Testing

$ sudo ./nuttx 
[sudo] password for alan: 

NuttShell (NSH) NuttX-13.0.0-RC2
nsh> ifup eth0
ifup eth0...OK
nsh> ping google.com
PING 172.217.29.78 56 bytes of data
56 bytes from 172.217.29.78: icmp_seq=0 time=20.0 ms
56 bytes from 172.217.29.78: icmp_seq=1 time=20.0 ms
56 bytes from 172.217.29.78: icmp_seq=2 time=20.0 ms
56 bytes from 172.217.29.78: icmp_seq=3 time=20.0 ms
56 bytes from 172.217.29.78: icmp_seq=4 time=20.0 ms
56 bytes from 172.217.29.78: icmp_seq=5 time=20.0 ms
56 bytes from 172.217.29.78: icmp_seq=6 time=20.0 ms
56 bytes from 172.217.29.78: icmp_seq=7 time=20.0 ms
56 bytes from 172.217.29.78: icmp_seq=8 time=20.0 ms
56 bytes from 172.217.29.78: icmp_seq=9 time=20.0 ms
10 packets transmitted, 10 received, 0% packet loss, time 10100 ms
rtt min/avg/max/mdev = 20.000/20.000/20.000/0.000 ms
nsh> 

nsh> ping google.com
[   37.180000] dns_query_error: ERROR: IPv4 dns_recv_response fa: -84,
               server address: 8.8.8.8
Segmentation fault.

Signed-off-by: Alan C. Assis <acassis@gmail.com>

@cederom cederom left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Wow, good catch, thank you @acassis :-)

@acassis

acassis commented Jul 7, 2026

Copy link
Copy Markdown
Contributor Author

Wow, good catch, thank you @acassis :-)

I got some help:
https://claude.ai/share/321e19f6-cd11-4f44-b0b6-eac5e278f86f

@cederom

cederom commented Jul 7, 2026

Copy link
Copy Markdown
Contributor

Hmm, how much does it cost? I have some js application to fix and do not want to waste more time maybe its a good task for that AI stuff? :D

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants