[kea-dev] Accidentally found infinite recursion in Kea 1.3 Option...

Dave Cole davecole at nbnco.com.au
Sun Feb 4 22:06:53 UTC 2018


While adding more tests for my code I stumbled on a problem in Kea.  It is a small thing in the scheme of things, but it might be of interest.

(keapython) djc at dave:~/work/keapython/keamodule$ gdb python
GNU gdb (Ubuntu 7.12.50.20170314-0ubuntu1.1) 7.12.50.20170314-git
Copyright (C) 2017 Free Software Foundation, Inc.
License GPLv3+: GNU GPL version 3 or later <http://gnu.org/licenses/gpl.html>
This is free software: you are free to change and redistribute it.
There is NO WARRANTY, to the extent permitted by law.  Type "show copying"
and "show warranty" for details.
This GDB was configured as "x86_64-linux-gnu".
Type "show configuration" for configuration details.
For bug reporting instructions, please see:
<http://www.gnu.org/software/gdb/bugs/>.
Find the GDB manual and other documentation resources online at:
<http://www.gnu.org/software/gdb/documentation/>.
For help, type "help".
Type "apropos word" to search for commands related to "word"...
Reading symbols from python...(no debugging symbols found)...done.
(gdb) run
Starting program: /home/djc/env/keapython/bin/python 
[Thread debugging using libthread_db enabled]
Using host libthread_db library "/lib/x86_64-linux-gnu/libthread_db.so.1".
Python 2.7.13 (default, Nov 23 2017, 15:37:09) 
[GCC 6.3.0 20170406] on linux2
Type "help", "copyright", "credits" or "license" for more information.
>>> from kea import *
>>> p = Pkt4(DHCPDISCOVER, 0)
>>> o = Option(1)
>>> o.addOption(o)
>>> p.addOption(o)
>>> p.pack()

Program received signal SIGSEGV, Segmentation fault.
isc::dhcp::Option::len (this=0x555555ba3140) at option.cc:176
176	    size_t length = getHeaderLen() + data_.size();
(gdb) where
#0  isc::dhcp::Option::len (this=0x555555ba3140) at option.cc:176
#1  0x00007ffff5cc4d42 in isc::dhcp::Option::len (this=0x555555ba3140) at option.cc:182
#2  0x00007ffff5cc4d42 in isc::dhcp::Option::len (this=0x555555ba3140) at option.cc:182
#3  0x00007ffff5cc4d42 in isc::dhcp::Option::len (this=0x555555ba3140) at option.cc:182
#4  0x00007ffff5cc4d42 in isc::dhcp::Option::len (this=0x555555ba3140) at option.cc:182
#5  0x00007ffff5cc4d42 in isc::dhcp::Option::len (this=0x555555ba3140) at option.cc:182
#6  0x00007ffff5cc4d42 in isc::dhcp::Option::len (this=0x555555ba3140) at option.cc:182
#7  0x00007ffff5cc4d42 in isc::dhcp::Option::len (this=0x555555ba3140) at option.cc:182

And so on...


More information about the kea-dev mailing list