Ticket #1155 (closed defect: fixed)
gsmd segfault in network_opers_parse
| Reported by: | mail@… | Owned by: | sean_chiang@… |
|---|---|---|---|
| Priority: | high | Milestone: | |
| Component: | gsmd | Version: | current svn head |
| Severity: | normal | Keywords: | |
| Cc: | buglog@…, erin_yueh@… | Blocked By: | |
| Blocking: | Estimated Completion (week): | ||
| HasPatchForReview: | PatchReviewResult: | ||
| Reproducible: |
Description
In a gsmd build that's patched to prevent the #1154 problem I observed a
segfault in the network_opers_parse() function:
Program terminated with signal 11, Segmentation fault.
#0 0x0000f0c0 in network_opers_parse (str=<value optimized out>, out=0x0)
at usock.c:661
661 usock.c: No such file or directory.
in usock.c
(gdb) where
#0 0x0000f0c0 in network_opers_parse (str=<value optimized out>, out=0x0)
at usock.c:661
#1 0x0000f14c in network_opers_cb (cmd=0x30ce8, ctx=0x307e0,
resp=0x401316f8
"\207(???\027\023@?\027\023@?\027\023@?\027\023@?\027\023@?\027\023@?\027\023@@\027\023@")
at usock.c:682
#2 0x0000b634 in atcmd_done (g=0x1e454, cmd=0x30ce8, buf=0x1e4a8 "OK")
at atcmd.c:232
#3 0x0000c440 in atcmd_select_cb (fd=3, what=1, data=<value optimized out>)
at atcmd.c:174
#4 0x0000c888 in gsmd_select_main () at select.c:98
#5 0x0000b098 in main (argc=7, argv=<value optimized out>) at gsmd.c:500
libgsmd package version is: 0.1+svnr3759-r40
Attachments
Change History
Changed 5 years ago by mail@…
- Attachment gsm.log.tail added
comment:2 Changed 5 years ago by mail@…
Note that the line numbers have changed since I did my build - line 661 in
usock.c is now line 807:
if (n < 10 str[n - 1] != ')')
which can have trouble if n is less than or equal to 0.
comment:3 Changed 5 years ago by erin_yueh@…
- Cc erin_yueh@… added
- Owner changed from erin_yueh@… to sean_chiang@…
hi Mike, Thanks a lot for reporting this bug with log file for us.
hi Sean, please help to check this issue. Thanks! -erin
Changed 5 years ago by sean_chiang@…
- Attachment segfault-when-network_opers_parse.patch added
refactoring the network_opers_parse() to solve segfault issue

Partial /tmp/gsm.log