8devices / wakaama

Eclipse Wakaama (formerly liblwm2m) is an implementation of the Open Mobile Alliance's LightWeight M2M protocol (LWM2M).
0 stars 4 forks source link

Segmentation fault on subscription PUT DELETE PUT between updates #19

Closed Lycopersicum closed 6 years ago

Lycopersicum commented 6 years ago

How to reproduce:

  1. Connect endpoint to restserver.
  2. Send PUT request to /subscriptions/<endpoint-UUID>/<path/to/resource>.
  3. Send DELETE request to same path ( /subscriptions/<endpoint-UUID>/<path/to/resource>).
  4. Send one more PUT request to /subscriptions/<endpoint-UUID>/<path/to/resource>.

Note: Last three steps must be performed between updates (endpoint musn't send response to any of those observation requests, therefore first PUT request callback is not triggered).

GDB backtrace:

#0  strlen () at ../sysdeps/x86_64/strlen.S:106
#1  0x00007ffff79c3c1e in json_string ()
   from /usr/lib/x86_64-linux-gnu/libjansson.so.4
#2  0x00000000004077f1 in rest_subscriptions_put_cb ()
#3  0x00007ffff7bcc65c in ulfius_webservice_dispatcher ()
   from /usr/local/lib/libulfius.so
#4  0x00007ffff71dc344 in ?? ()
   from /usr/lib/x86_64-linux-gnu/libmicrohttpd.so.10
#5  0x00007ffff71dd3fc in ?? ()
   from /usr/lib/x86_64-linux-gnu/libmicrohttpd.so.10
#6  0x00007ffff71e1289 in ?? ()
   from /usr/lib/x86_64-linux-gnu/libmicrohttpd.so.10
#7  0x00007ffff633b6ba in start_thread (arg=0x7ffff1406700)
    at pthread_create.c:333
#8  0x00007ffff74f641d in clone ()