Having some issues moving subagent from running with 5.8 to 5.9
Lennart Sorensen <[email protected]> Mon, 12 Aug 2024 14:20:31 -0400
| Newsgroups | gmane.network.net-snmp.devel |
|---|---|
| Message-ID | <CAKFUpPtB0sK8A8oWeZ49M0w+n6g72uTan=KL2yXRBCBUuhBm-w@mail.gmail.com> |
--===============8971373869738358770== Content-Type: multipart/alternative; boundary="00000000000018bd78061f808d64" --00000000000018bd78061f808d64 Content-Type: text/plain; charset="UTF-8" I am trying to get a subagent to work after moving from net-snmp 5.8 to 5.9, but it keeps segfaulting for me. I have tracked down that it is failing when trying to sort the table due to the structure not being what it should be. It is using table_container to store the tables that are causing issues. If I switch them to linked_list, they work fine, and no more bad pointer accesses. The bad pointer accesses are showing as trying to compare oids where the length is in fact one of the pointers rather than the actual length of the oid, so it makes sense to be crashing when that happens. The code has not really changed in years and has been working with many versions of net-snmp so far, but 5.9 for reasons I have failed to figure out is different in some way. Nothing in the changelogs or diff'ing the header files have pointed me in the right direction. I don't think switching to linked_list is the right thing to do since that might make it quite a bit slower. Does anyone have any idea where I should have a look to try and narrow down where the data structure is ending up wrong when using table_container (aka binary_array)? Thanks. -- Len --00000000000018bd78061f808d64 Content-Type: text/html; charset="UTF-8" Content-Transfer-Encoding: quoted-printable <div dir=3D"ltr"><div>I am trying to get a subagent to work after moving fr= om net-snmp 5.8 to 5.9, but it keeps segfaulting for me.=C2=A0 I have track= ed down that it is failing when trying to sort the table due to the structu= re not being what it should be.=C2=A0 It is using table_container to store = the tables that are causing issues.=C2=A0 If I switch them to linked_list, = they work fine, and no more bad pointer accesses.=C2=A0 The bad pointer acc= esses are showing as trying to compare oids where the length is in fact one= of the pointers rather than the actual length of the oid, so it makes sens= e to be crashing when that happens.=C2=A0 The code has not really changed i= n years and has been working with many versions of net-snmp so far, but 5.9= for reasons I have failed to figure out is different in some way.=C2=A0 No= thing in the changelogs or diff'ing the header files have pointed me in= the right direction.=C2=A0 I don't think switching to linked_list is t= he right thing to do since that might make it quite a bit slower.</div><div= ><br></div><div>Does anyone have any idea where I should have a look to try= and narrow down where the data structure is ending up wrong when using tab= le_container (aka binary_array)?</div><div><br></div><div>Thanks.<br></div>= <div><div><br><span class=3D"gmail_signature_prefix">-- </span><br><div dir= =3D"ltr" class=3D"gmail_signature" data-smartmail=3D"gmail_signature">Len</= div></div></div></div> --00000000000018bd78061f808d64-- --===============8971373869738358770== Content-Type: text/plain; charset="us-ascii" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit Content-Disposition: inline --===============8971373869738358770== Content-Type: text/plain; charset="us-ascii" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit Content-Disposition: inline _______________________________________________ Net-snmp-coders mailing list [email protected] https://lists.sourceforge.net/lists/listinfo/net-snmp-coders --===============8971373869738358770==--